Delegate IDML color XML to craft-idml

This commit is contained in:
Dylan M. Taylor committed 2026-11-13 06:37:14 -05:00
1 parent 8bf4e29ad8
commit 91e86fc77a
3 files changed
+27 -26

No files matched your search

Generated
+11 -11
View File
@@ -1242,10 +1242,10 @@ dependencies = [
[[package]]
name = "craft-idml"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=632ad8800#632ad8800da272b74a2fe46831926c92be63d7e8"
source = "git+https://github.com/storytold/craft-libs?rev=9eec083e9#9eec083e9f0355841784b54952a6f01f3b7f2dbe"
dependencies = [
"craft-xml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=632ad8800)",
"craft-zip 0.1.0 (git+https://github.com/storytold/craft-libs?rev=632ad8800)",
"craft-xml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=9eec083e9)",
"craft-zip 0.1.0 (git+https://github.com/storytold/craft-libs?rev=9eec083e9)",
"thiserror 2.0.21",
]
@@ -1656,7 +1656,7 @@ dependencies = [
[[package]]
name = "craft-xml"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=632ad8800#632ad8800da272b74a2fe46831926c92be63d7e8"
source = "git+https://github.com/storytold/craft-libs?rev=8abfa9d0f14bafbfc3449fc552ffeafb9ca6a551#8abfa9d0f14bafbfc3449fc552ffeafb9ca6a551"
dependencies = [
"quick-xml 0.41.0",
"thiserror 2.0.21",
@@ -1665,7 +1665,7 @@ dependencies = [
[[package]]
name = "craft-xml"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=8abfa9d0f14bafbfc3449fc552ffeafb9ca6a551#8abfa9d0f14bafbfc3449fc552ffeafb9ca6a551"
source = "git+https://github.com/storytold/craft-libs?rev=9eec083e9#9eec083e9f0355841784b54952a6f01f3b7f2dbe"
dependencies = [
"quick-xml 0.41.0",
"thiserror 2.0.21",
@@ -1730,7 +1730,7 @@ dependencies = [
[[package]]
name = "craft-zip"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=632ad8800#632ad8800da272b74a2fe46831926c92be63d7e8"
source = "git+https://github.com/storytold/craft-libs?rev=8abfa9d0f14bafbfc3449fc552ffeafb9ca6a551#8abfa9d0f14bafbfc3449fc552ffeafb9ca6a551"
dependencies = [
"flate2",
"thiserror 2.0.21",
@@ -1740,7 +1740,7 @@ dependencies = [
[[package]]
name = "craft-zip"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=8abfa9d0f14bafbfc3449fc552ffeafb9ca6a551#8abfa9d0f14bafbfc3449fc552ffeafb9ca6a551"
source = "git+https://github.com/storytold/craft-libs?rev=9eec083e9#9eec083e9f0355841784b54952a6f01f3b7f2dbe"
dependencies = [
"flate2",
"thiserror 2.0.21",
@@ -2021,7 +2021,7 @@ dependencies = [
"craft-prepress",
"craft-print",
"craft-svg 0.1.0 (git+https://github.com/storytold/craft-libs?rev=cc23ffd4d26f3074808e2187d332564817624f8f)",
"craft-xml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=632ad8800)",
"craft-xml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=9eec083e9)",
"craft-xml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=f23b0f33f0d00b157476533a43cbbcfd901aa1f1)",
"designcraft-color",
"designcraft-compose",
@@ -2103,9 +2103,9 @@ name = "designcraft-idml"
version = "0.20.1"
dependencies = [
"craft-file-formats",
"craft-idml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=632ad8800)",
"craft-idml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=9eec083e9)",
"craft-svg 0.1.0 (git+https://github.com/storytold/craft-libs?rev=cc23ffd4d26f3074808e2187d332564817624f8f)",
"craft-xml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=632ad8800)",
"craft-xml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=9eec083e9)",
"designcraft-color",
"designcraft-compose",
"designcraft-doc",
@@ -2222,7 +2222,7 @@ version = "0.20.1"
dependencies = [
"craft-docx",
"craft-file-formats",
"craft-idml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=632ad8800)",
"craft-idml 0.1.0 (git+https://github.com/storytold/craft-libs?rev=9eec083e9)",
"craft-rtf",
"craft-wordmodel",
"craft-xlsx",
+2 -2
View File
@@ -16,10 +16,10 @@ craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "4052591363
craft-designcraft-format = { git = "https://github.com/storytold/craft-libs", rev = "19692b6190465671e41967c75d0cd4c439d0c84c", version = "=0.1.0" }
craft-eps = { git = "https://github.com/storytold/craft-libs", rev = "ba24fe2435adb3c81ad6057faf36365fbba736cf", version = "=0.1.0" }
craft-epub = { git = "https://github.com/storytold/craft-libs", rev = "ba24fe2435adb3c81ad6057faf36365fbba736cf", version = "=0.1.0" }
craft-idml = { git = "https://github.com/storytold/craft-libs", rev = "632ad8800", version = "=0.1.0" }
craft-idml = { git = "https://github.com/storytold/craft-libs", rev = "9eec083e9", version = "=0.1.0" }
craft-indd = { git = "https://github.com/storytold/craft-libs", rev = "47bf5650b0d503b97bfb5e841746c4957897d11f", version = "=0.1.0" }
craft-svg = { git = "https://github.com/storytold/craft-libs", rev = "cc23ffd4d26f3074808e2187d332564817624f8f", version = "=0.1.0", features = ["tree-render", "tree-text"] }
craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "632ad8800", version = "=0.1.0" }
craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "9eec083e9", version = "=0.1.0" }
craft-xml-dtd = { package = "craft-xml", git = "https://github.com/storytold/craft-libs", rev = "f23b0f33f0d00b157476533a43cbbcfd901aa1f1", version = "=0.1.0" }
craft-rtf = { git = "https://github.com/storytold/craft-libs", rev = "ba24fe2435adb3c81ad6057faf36365fbba736cf", version = "=0.1.0" }
craft-xlsx = { git = "https://github.com/storytold/craft-libs", rev = "ba24fe2435adb3c81ad6057faf36365fbba736cf", version = "=0.1.0" }
+14 -13
View File
@@ -233,17 +233,18 @@ const STROKE_STYLES: &[&str] = &[
/// A `Color` element. `flags` is (editable, removable, visible).
fn color_el(self_id: &str, name: &str, model: &str, c: &Color, over: &str, (editable, removable, visible): (bool, bool, bool)) -> El {
let (space, val) = color_value(c);
El::new("Color")
.attr("Self", self_id)
.attr("Model", model)
.attr("Space", space)
.attr("ColorValue", val)
.attr("ColorOverride", over)
.attr("AlternateSpace", "NoAlternateColor")
.attr("AlternateColorValue", "")
.attr("Name", name)
.attr("ColorEditable", bool_s(editable))
.attr("ColorRemovable", bool_s(removable))
.attr("Visible", bool_s(visible))
.attr("SwatchCreatorID", "7937")
crate::xml::from_craft(
craft_idml::model::ColorDefinition {
self_id: self_id.to_string(),
name: name.to_string(),
model: model.to_string(),
space: space.to_string(),
value: val,
override_kind: over.to_string(),
editable,
removable,
visible,
}
.to_el(),
)
}