From 3e1965e274cb5741aa815c5971938eb87fc960dd Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Thu, 12 Nov 2026 05:34:09 +0000 Subject: [PATCH] Dependencies: pin craft-libs at current main --- Cargo.lock | 132 ++++++++++++++++++++++++++++++------ Cargo.toml | 42 ++++++------ crates/lottie/src/anim.rs | 2 +- crates/lottie/src/import.rs | 12 ++-- crates/lottie/src/shapes.rs | 22 +++++- crates/lottie/src/text.rs | 4 +- crates/media/src/dpx.rs | 11 ++- crates/model/src/lib.rs | 2 +- crates/model/src/scene.rs | 3 +- crates/model/src/tests.rs | 1 - crates/pdf/README.md | 2 +- xtask/src/pdf_deps.rs | 2 +- 12 files changed, 175 insertions(+), 60 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 319a0a63c..3def04dfc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1092,41 +1092,67 @@ dependencies = [ [[package]] name = "craft-aep" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=c31fc02ab9867ce3a8312b40cb6a8eae85cff639#c31fc02ab9867ce3a8312b40cb6a8eae85cff639" +source = "git+https://github.com/storytold/craft-libs?rev=4cb271b785b02e7aafd83ab91d3737f2939111fb#4cb271b785b02e7aafd83ab91d3737f2939111fb" [[package]] name = "craft-audio" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=c31fc02ab9867ce3a8312b40cb6a8eae85cff639#c31fc02ab9867ce3a8312b40cb6a8eae85cff639" +source = "git+https://github.com/storytold/craft-libs?rev=4cb271b785b02e7aafd83ab91d3737f2939111fb#4cb271b785b02e7aafd83ab91d3737f2939111fb" dependencies = [ - "craft-media 0.1.0 (git+https://github.com/storytold/craft-libs?rev=c31fc02ab9867ce3a8312b40cb6a8eae85cff639)", + "craft-media 0.1.0 (git+https://github.com/storytold/craft-libs?rev=4cb271b785b02e7aafd83ab91d3737f2939111fb)", "thiserror 2.0.21", ] [[package]] name = "craft-docpath" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=c31fc02ab9867ce3a8312b40cb6a8eae85cff639#c31fc02ab9867ce3a8312b40cb6a8eae85cff639" +source = "git+https://github.com/storytold/craft-libs?rev=4cb271b785b02e7aafd83ab91d3737f2939111fb#4cb271b785b02e7aafd83ab91d3737f2939111fb" + +[[package]] +name = "craft-dpx" +version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=4cb271b785b02e7aafd83ab91d3737f2939111fb#4cb271b785b02e7aafd83ab91d3737f2939111fb" +dependencies = [ + "thiserror 2.0.21", +] [[package]] name = "craft-ecproj-format" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=c31fc02ab9867ce3a8312b40cb6a8eae85cff639#c31fc02ab9867ce3a8312b40cb6a8eae85cff639" +source = "git+https://github.com/storytold/craft-libs?rev=4cb271b785b02e7aafd83ab91d3737f2939111fb#4cb271b785b02e7aafd83ab91d3737f2939111fb" dependencies = [ "serde", "serde_json", "thiserror 2.0.21", ] +[[package]] +name = "craft-eps" +version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=4cb271b785b02e7aafd83ab91d3737f2939111fb#4cb271b785b02e7aafd83ab91d3737f2939111fb" + +[[package]] +name = "craft-exr" +version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=4cb271b785b02e7aafd83ab91d3737f2939111fb#4cb271b785b02e7aafd83ab91d3737f2939111fb" +dependencies = [ + "serde_json", +] + [[package]] name = "craft-fonts-build" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=c31fc02ab9867ce3a8312b40cb6a8eae85cff639#c31fc02ab9867ce3a8312b40cb6a8eae85cff639" +source = "git+https://github.com/storytold/craft-libs?rev=4cb271b785b02e7aafd83ab91d3737f2939111fb#4cb271b785b02e7aafd83ab91d3737f2939111fb" + +[[package]] +name = "craft-gif" +version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=4cb271b785b02e7aafd83ab91d3737f2939111fb#4cb271b785b02e7aafd83ab91d3737f2939111fb" [[package]] name = "craft-i18n" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=c31fc02ab9867ce3a8312b40cb6a8eae85cff639#c31fc02ab9867ce3a8312b40cb6a8eae85cff639" +source = "git+https://github.com/storytold/craft-libs?rev=4cb271b785b02e7aafd83ab91d3737f2939111fb#4cb271b785b02e7aafd83ab91d3737f2939111fb" dependencies = [ "fixed_decimal", "icu_decimal", @@ -1146,10 +1172,19 @@ dependencies = [ "writeable", ] +[[package]] +name = "craft-lottie" +version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=4cb271b785b02e7aafd83ab91d3737f2939111fb#4cb271b785b02e7aafd83ab91d3737f2939111fb" +dependencies = [ + "serde_json", + "thiserror 2.0.21", +] + [[package]] name = "craft-media" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=c31fc02ab9867ce3a8312b40cb6a8eae85cff639#c31fc02ab9867ce3a8312b40cb6a8eae85cff639" +source = "git+https://github.com/storytold/craft-libs?rev=4cb271b785b02e7aafd83ab91d3737f2939111fb#4cb271b785b02e7aafd83ab91d3737f2939111fb" dependencies = [ "thiserror 2.0.21", ] @@ -1162,19 +1197,39 @@ dependencies = [ "thiserror 2.0.21", ] +[[package]] +name = "craft-mesh" +version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=4cb271b785b02e7aafd83ab91d3737f2939111fb#4cb271b785b02e7aafd83ab91d3737f2939111fb" +dependencies = [ + "miniz_oxide 0.9.1", + "serde_json", +] + [[package]] name = "craft-pdf" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=c31fc02ab9867ce3a8312b40cb6a8eae85cff639#c31fc02ab9867ce3a8312b40cb6a8eae85cff639" +source = "git+https://github.com/storytold/craft-libs?rev=4cb271b785b02e7aafd83ab91d3737f2939111fb#4cb271b785b02e7aafd83ab91d3737f2939111fb" dependencies = [ "hayro-syntax", "thiserror 2.0.21", ] +[[package]] +name = "craft-psd" +version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=4cb271b785b02e7aafd83ab91d3737f2939111fb#4cb271b785b02e7aafd83ab91d3737f2939111fb" +dependencies = [ + "encoding_rs", + "flate2", + "rayon", + "thiserror 2.0.21", +] + [[package]] name = "craft-quit" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=c31fc02ab9867ce3a8312b40cb6a8eae85cff639#c31fc02ab9867ce3a8312b40cb6a8eae85cff639" +source = "git+https://github.com/storytold/craft-libs?rev=4cb271b785b02e7aafd83ab91d3737f2939111fb#4cb271b785b02e7aafd83ab91d3737f2939111fb" dependencies = [ "dispatch2", "egui", @@ -1182,10 +1237,22 @@ dependencies = [ "objc2-app-kit 0.3.2", ] +[[package]] +name = "craft-svg" +version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=4cb271b785b02e7aafd83ab91d3737f2939111fb#4cb271b785b02e7aafd83ab91d3737f2939111fb" +dependencies = [ + "craft-xml", + "flate2", + "kurbo", + "roxmltree", + "thiserror 2.0.21", +] + [[package]] name = "craft-ui" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=c31fc02ab9867ce3a8312b40cb6a8eae85cff639#c31fc02ab9867ce3a8312b40cb6a8eae85cff639" +source = "git+https://github.com/storytold/craft-libs?rev=4cb271b785b02e7aafd83ab91d3737f2939111fb#4cb271b785b02e7aafd83ab91d3737f2939111fb" dependencies = [ "craft-fonts-build", "craft-i18n", @@ -1206,7 +1273,7 @@ dependencies = [ [[package]] name = "craft-update" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=c31fc02ab9867ce3a8312b40cb6a8eae85cff639#c31fc02ab9867ce3a8312b40cb6a8eae85cff639" +source = "git+https://github.com/storytold/craft-libs?rev=4cb271b785b02e7aafd83ab91d3737f2939111fb#4cb271b785b02e7aafd83ab91d3737f2939111fb" dependencies = [ "chrono", "dunce", @@ -1233,13 +1300,30 @@ dependencies = [ [[package]] name = "craft-video" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=c31fc02ab9867ce3a8312b40cb6a8eae85cff639#c31fc02ab9867ce3a8312b40cb6a8eae85cff639" +source = "git+https://github.com/storytold/craft-libs?rev=4cb271b785b02e7aafd83ab91d3737f2939111fb#4cb271b785b02e7aafd83ab91d3737f2939111fb" dependencies = [ - "craft-media 0.1.0 (git+https://github.com/storytold/craft-libs?rev=c31fc02ab9867ce3a8312b40cb6a8eae85cff639)", + "craft-media 0.1.0 (git+https://github.com/storytold/craft-libs?rev=4cb271b785b02e7aafd83ab91d3737f2939111fb)", "rayon", "thiserror 2.0.21", ] +[[package]] +name = "craft-webp" +version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=4cb271b785b02e7aafd83ab91d3737f2939111fb#4cb271b785b02e7aafd83ab91d3737f2939111fb" +dependencies = [ + "thiserror 2.0.21", +] + +[[package]] +name = "craft-xml" +version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=4cb271b785b02e7aafd83ab91d3737f2939111fb#4cb271b785b02e7aafd83ab91d3737f2939111fb" +dependencies = [ + "quick-xml 0.41.0", + "thiserror 2.0.21", +] + [[package]] name = "crc32fast" version = "1.5.2" @@ -1597,7 +1681,7 @@ name = "effectcraft-export" version = "0.24.1" dependencies = [ "craft-audio", - "craft-media 0.1.0 (git+https://github.com/storytold/craft-libs?rev=c31fc02ab9867ce3a8312b40cb6a8eae85cff639)", + "craft-media 0.1.0 (git+https://github.com/storytold/craft-libs?rev=4cb271b785b02e7aafd83ab91d3737f2939111fb)", "craft-video", "effectcraft-color", "effectcraft-effects", @@ -1743,6 +1827,7 @@ name = "effectcraft-lottie" version = "0.24.1" dependencies = [ "craft-docpath", + "craft-lottie", "effectcraft-color", "effectcraft-effects", "effectcraft-keyframe", @@ -1762,7 +1847,11 @@ version = "0.24.1" dependencies = [ "craft-audio", "craft-docpath", - "craft-media 0.1.0 (git+https://github.com/storytold/craft-libs?rev=c31fc02ab9867ce3a8312b40cb6a8eae85cff639)", + "craft-dpx", + "craft-exr", + "craft-gif", + "craft-media 0.1.0 (git+https://github.com/storytold/craft-libs?rev=4cb271b785b02e7aafd83ab91d3737f2939111fb)", + "craft-webp", "effectcraft-color", "effectcraft-effects", "effectcraft-model", @@ -1793,12 +1882,11 @@ dependencies = [ name = "effectcraft-model" version = "0.24.1" dependencies = [ + "craft-mesh", "effectcraft-geom", "image", "log", - "miniz_oxide 0.9.1", "serde", - "serde_json", "thiserror 2.0.21", ] @@ -1825,6 +1913,7 @@ dependencies = [ name = "effectcraft-pdf" version = "0.24.1" dependencies = [ + "craft-eps", "craft-pdf", "effectcraft-raster", "effectcraft-svg", @@ -1867,6 +1956,7 @@ dependencies = [ name = "effectcraft-psd" version = "0.24.1" dependencies = [ + "craft-psd", "miniz_oxide 0.9.1", ] @@ -1874,6 +1964,7 @@ dependencies = [ name = "effectcraft-raster" version = "0.24.1" dependencies = [ + "craft-exr", "effectcraft-color", "effectcraft-geom", "rayon", @@ -1949,6 +2040,7 @@ dependencies = [ name = "effectcraft-svg" version = "0.24.1" dependencies = [ + "craft-svg", "effectcraft-geom", "effectcraft-path", "effectcraft-raster", @@ -3328,7 +3420,7 @@ checksum = "9f4d0e94ddd48749f06bbe4e5389fb9799a0c45bcaf00495042076ef05e3241a" [[package]] name = "hayro-jbig2" version = "0.3.0" -source = "git+https://github.com/storytold/craft-libs?rev=c31fc02ab9867ce3a8312b40cb6a8eae85cff639#c31fc02ab9867ce3a8312b40cb6a8eae85cff639" +source = "git+https://github.com/storytold/craft-libs?rev=4cb271b785b02e7aafd83ab91d3737f2939111fb#4cb271b785b02e7aafd83ab91d3737f2939111fb" dependencies = [ "hayro-ccitt", ] @@ -3342,7 +3434,7 @@ checksum = "c75ab947623ef4ccaa7acf0579edf7cbb5a73838e3839a7be73335e522f433a1" [[package]] name = "hayro-syntax" version = "0.7.2" -source = "git+https://github.com/storytold/craft-libs?rev=c31fc02ab9867ce3a8312b40cb6a8eae85cff639#c31fc02ab9867ce3a8312b40cb6a8eae85cff639" +source = "git+https://github.com/storytold/craft-libs?rev=4cb271b785b02e7aafd83ab91d3737f2939111fb#4cb271b785b02e7aafd83ab91d3737f2939111fb" dependencies = [ "hayro-jbig2", "hayro-jpeg2000", diff --git a/Cargo.toml b/Cargo.toml index 70782c345..018ec6848 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,22 +11,22 @@ rust-version = "1.95" repository = "https://github.com/storytold/effectcraft" [workspace.dependencies] -craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "c31fc02ab9867ce3a8312b40cb6a8eae85cff639", version = "=0.1.0", default-features = false, features = ["read"] } -craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "c31fc02ab9867ce3a8312b40cb6a8eae85cff639" } -craft-quit = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "c31fc02ab9867ce3a8312b40cb6a8eae85cff639" } -craft-ecproj-format = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "c31fc02ab9867ce3a8312b40cb6a8eae85cff639" } -craft-dpx = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "c31fc02ab9867ce3a8312b40cb6a8eae85cff639" } -craft-eps = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "c31fc02ab9867ce3a8312b40cb6a8eae85cff639" } -craft-exr = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "c31fc02ab9867ce3a8312b40cb6a8eae85cff639" } -craft-gif = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "c31fc02ab9867ce3a8312b40cb6a8eae85cff639" } -craft-psd = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "c31fc02ab9867ce3a8312b40cb6a8eae85cff639" } -craft-svg = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "c31fc02ab9867ce3a8312b40cb6a8eae85cff639" } -craft-webp = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "c31fc02ab9867ce3a8312b40cb6a8eae85cff639" } -craft-lottie = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "c31fc02ab9867ce3a8312b40cb6a8eae85cff639" } -craft-mesh = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "c31fc02ab9867ce3a8312b40cb6a8eae85cff639", default-features = false, features = ["stl", "obj", "gltf", "fbx"] } -craft-aep = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "c31fc02ab9867ce3a8312b40cb6a8eae85cff639" } +craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "4cb271b785b02e7aafd83ab91d3737f2939111fb", version = "=0.1.0", default-features = false, features = ["read"] } +craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "4cb271b785b02e7aafd83ab91d3737f2939111fb" } +craft-quit = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "4cb271b785b02e7aafd83ab91d3737f2939111fb" } +craft-ecproj-format = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "4cb271b785b02e7aafd83ab91d3737f2939111fb" } +craft-dpx = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "4cb271b785b02e7aafd83ab91d3737f2939111fb" } +craft-eps = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "4cb271b785b02e7aafd83ab91d3737f2939111fb" } +craft-exr = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "4cb271b785b02e7aafd83ab91d3737f2939111fb" } +craft-gif = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "4cb271b785b02e7aafd83ab91d3737f2939111fb" } +craft-psd = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "4cb271b785b02e7aafd83ab91d3737f2939111fb" } +craft-svg = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "4cb271b785b02e7aafd83ab91d3737f2939111fb" } +craft-webp = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "4cb271b785b02e7aafd83ab91d3737f2939111fb" } +craft-lottie = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "4cb271b785b02e7aafd83ab91d3737f2939111fb" } +craft-mesh = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "4cb271b785b02e7aafd83ab91d3737f2939111fb", default-features = false, features = ["stl", "obj", "gltf", "fbx"] } +craft-aep = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "4cb271b785b02e7aafd83ab91d3737f2939111fb" } # craft-update: app-specific pretend versions apply to startup and manual checks. -craft-update = { git = "https://github.com/storytold/craft-libs", version = "=0.1.0", rev = "c31fc02ab9867ce3a8312b40cb6a8eae85cff639", features = ["egui"] } +craft-update = { git = "https://github.com/storytold/craft-libs", version = "=0.1.0", rev = "4cb271b785b02e7aafd83ab91d3737f2939111fb", features = ["egui"] } # internal effectcraft-time = { path = "crates/time" } effectcraft-geom = { path = "crates/geom" } @@ -90,9 +90,9 @@ same-file = "1.0" tempfile = "3.27" # codecs + containers shared by the Craft apps (crates/media, crates/export); keep all three on one rev. -craft-media = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "c31fc02ab9867ce3a8312b40cb6a8eae85cff639", default-features = false, features = ["isobmff", "matroska"] } -craft-audio = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "c31fc02ab9867ce3a8312b40cb6a8eae85cff639", default-features = false, features = ["aac-decode", "aac-encode", "opus-decode"] } -craft-video = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "c31fc02ab9867ce3a8312b40cb6a8eae85cff639", features = ["h264-encode", "prores", "hevc-encode", "vp9-encode", "av1", "threads"] } +craft-media = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "4cb271b785b02e7aafd83ab91d3737f2939111fb", default-features = false, features = ["isobmff", "matroska"] } +craft-audio = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "4cb271b785b02e7aafd83ab91d3737f2939111fb", default-features = false, features = ["aac-decode", "aac-encode", "opus-decode"] } +craft-video = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "4cb271b785b02e7aafd83ab91d3737f2939111fb", features = ["h264-encode", "prores", "hevc-encode", "vp9-encode", "av1", "threads"] } # footage decoding: FilmCraft's pure-Rust crates, pinned to a revision (plan/adr/0001). # Only `crates/media`, `crates/export` and `crates/interchange` may depend on these. @@ -122,7 +122,7 @@ half = "2.7" # ui # Shared frontend components; keep this dependency above the engine boundary. # Shared UI and the complete egui family select reviewed immutable commits below. -craft-ui = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "c31fc02ab9867ce3a8312b40cb6a8eae85cff639", features = ["serde"] } +craft-ui = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "4cb271b785b02e7aafd83ab91d3737f2939111fb", features = ["serde"] } # `default_fonts` and `monochrome_emoji_fonts` are explicit: the app's `FontDefinitions::default()` # and its `✔`/`▣` chrome glyphs need both, and kittest's own dev-dependencies do not propagate. egui = { version = "0.37", default-features = false, features = ["default_fonts", "monochrome_emoji_fonts"] } @@ -231,8 +231,8 @@ lto = "thin" codegen-units = 1 [patch.crates-io] -hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "c31fc02ab9867ce3a8312b40cb6a8eae85cff639", version = "=0.7.2" } -hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "c31fc02ab9867ce3a8312b40cb6a8eae85cff639", version = "=0.3.0" } +hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "4cb271b785b02e7aafd83ab91d3737f2939111fb", version = "=0.7.2" } +hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "4cb271b785b02e7aafd83ab91d3737f2939111fb", version = "=0.3.0" } ecolor = { git = "https://github.com/storytold/egui.git", rev = "6d518fc799681571963842f95b55a6b68431b15a" } emath = { git = "https://github.com/storytold/egui.git", rev = "6d518fc799681571963842f95b55a6b68431b15a" } epaint = { git = "https://github.com/storytold/egui.git", rev = "6d518fc799681571963842f95b55a6b68431b15a" } diff --git a/crates/lottie/src/anim.rs b/crates/lottie/src/anim.rs index 8a2233459..62550f86f 100644 --- a/crates/lottie/src/anim.rs +++ b/crates/lottie/src/anim.rs @@ -294,7 +294,7 @@ pub(crate) fn to_vec3(j: &Json, z: f64) -> Option { pub(crate) fn to_color(j: &Json) -> Option { // Some files use 0–255: `craft_lottie::color` divides those. - craft_lottie::color(j).map(|c| Value::Color(c.map(|x| x as f32))) + craft_lottie::color(j).map(Value::Color) } pub(crate) fn to_bool(j: &Json) -> Option { diff --git a/crates/lottie/src/import.rs b/crates/lottie/src/import.rs index 7411df4bf..6534727dc 100644 --- a/crates/lottie/src/import.rs +++ b/crates/lottie/src/import.rs @@ -3,6 +3,8 @@ use std::collections::{BTreeMap, HashMap}; use std::sync::Arc; +use craft_lottie::model::{Asset, Effect, Layer as LottieLayer, LayerContent, Mask, Transform}; +use craft_lottie::{Animated, Animation, Json}; use effectcraft_color::Label; use effectcraft_keyframe::{ShapePath, Value}; use effectcraft_project::build::{self, Ids}; @@ -10,8 +12,6 @@ use effectcraft_project::{ AlphaMode, AutoOrient, Comp, Footage, FootageKind, GroupKind, ItemId, ItemKind, Layer, LayerId, LayerSource, Marker, MatteKind, Node, ParamUi, Project, PropGroup, Property, Solid, TrackMatte, }; -use craft_lottie::model::{Asset, Effect, Layer as LottieLayer, LayerContent, Mask, Transform}; -use craft_lottie::{Animated, Animation, Json}; use effectcraft_time::{FrameRate, Tick}; use crate::anim::{self, Im, import_animated, import_prop}; @@ -283,8 +283,12 @@ fn transform(im: &Im, ks: &Transform, tr: &mut PropGroup, next: &mut u64) { // Separated dimensions: X/Y/Z Position after Position. let at = tr.children.iter().position(|c| c.match_id() == "position").map(|i| i + 1).unwrap_or(tr.children.len()); let base = tr.get("position").map(|p| p.value.as_vec3()).unwrap_or([0.0; 3]); - for (d, (j, m, name)) in - dims.iter().zip([("positionX", "X Position"), ("positionY", "Y Position"), ("positionZ", "Z Position")]).map(|(j, (m, n))| (j, m, n)).enumerate().rev() + for (d, (j, m, name)) in dims + .iter() + .zip([("positionX", "X Position"), ("positionY", "Y Position"), ("positionZ", "Z Position")]) + .map(|(j, (m, n))| (j, m, n)) + .enumerate() + .rev() { let mut pr = Property::new(*next, m, name, Value::Scalar(base[d])).with_ui(ParamUi::Number); *next += 1; diff --git a/crates/lottie/src/shapes.rs b/crates/lottie/src/shapes.rs index e41dc4c2c..ab13374e9 100644 --- a/crates/lottie/src/shapes.rs +++ b/crates/lottie/src/shapes.rs @@ -626,7 +626,16 @@ pub(crate) fn import_items<'a>(im: &mut Im, ids: &mut Ids, items: &mut dyn Itera ShapeKind::GradientFill(gf) => { let radial = int(gf.gradient_type, x, "t") == Some(2); let mut g = build::shape_gradient_fill(ids, radial, [0.0, 0.0], [100.0, 0.0], Gradient::default()); - gradient_common(im, &mut g, gf.opacity.as_ref(), gf.start.as_ref(), gf.end.as_ref(), gf.highlight_length.as_ref(), gf.highlight_angle.as_ref(), gf.colors.as_ref()); + gradient_common( + im, + &mut g, + gf.opacity.as_ref(), + gf.start.as_ref(), + gf.end.as_ref(), + gf.highlight_length.as_ref(), + gf.highlight_angle.as_ref(), + gf.colors.as_ref(), + ); if int(gf.rule, x, "r") == Some(2) { set_enum(&mut g, "rule", 1); } @@ -636,7 +645,16 @@ pub(crate) fn import_items<'a>(im: &mut Im, ids: &mut Ids, items: &mut dyn Itera ShapeKind::GradientStroke(gs) => { let radial = int(gs.gradient_type, x, "t") == Some(2); let mut g = build::shape_gradient_stroke(ids, radial, [0.0, 0.0], [100.0, 0.0], Gradient::default(), 2.0); - gradient_common(im, &mut g, gs.opacity.as_ref(), gs.start.as_ref(), gs.end.as_ref(), gs.highlight_length.as_ref(), gs.highlight_angle.as_ref(), gs.colors.as_ref()); + gradient_common( + im, + &mut g, + gs.opacity.as_ref(), + gs.start.as_ref(), + gs.end.as_ref(), + gs.highlight_length.as_ref(), + gs.highlight_angle.as_ref(), + gs.colors.as_ref(), + ); let fields = StrokeIn { width: gs.width.as_ref(), cap: int(gs.cap, x, "lc"), diff --git a/crates/lottie/src/text.rs b/crates/lottie/src/text.rs index a847720b1..2bb17572c 100644 --- a/crates/lottie/src/text.rs +++ b/crates/lottie/src/text.rs @@ -1,7 +1,9 @@ //! Text layers ↔ Lottie text data (`t`: document keys `d`, animators `a`, more options `m`), //! and text converted to glyph shapes. -use craft_lottie::model::{Font, Map, Path, Shape, ShapeKind, TextAlign, TextData, TextDocKey, TextDocs, TextDocument, TextFollowPath, TextRange, TextSelector, TextStyle}; +use craft_lottie::model::{ + Font, Map, Path, Shape, ShapeKind, TextAlign, TextData, TextDocKey, TextDocs, TextDocument, TextFollowPath, TextRange, TextSelector, TextStyle, +}; use craft_lottie::{Animated, Json}; use effectcraft_keyframe::{Justify, TextDoc, Value}; use effectcraft_project::build::{self, Ids}; diff --git a/crates/media/src/dpx.rs b/crates/media/src/dpx.rs index 229e7ae47..17df4bb85 100644 --- a/crates/media/src/dpx.rs +++ b/crates/media/src/dpx.rs @@ -73,11 +73,8 @@ pub(crate) fn probe(path: &str, bytes: &[u8]) -> Result> { let alpha = h.layout.has_alpha(); let mut f = crate::probe::still_footage(path, h.width, h.height, image::ImageFormat::Png, alpha); f.alpha = if alpha { AlphaMode::Straight } else { AlphaMode::Ignore }; - f.pixel_aspect = h - .pixel_aspect - .map(|(x, y)| f64::from(x) / f64::from(y)) - .filter(|a| (0.1..=10.0).contains(a) && h.kind == craft_dpx::Kind::Dpx) - .unwrap_or(1.0); + f.pixel_aspect = + h.pixel_aspect.map(|(x, y)| f64::from(x) / f64::from(y)).filter(|a| (0.1..=10.0).contains(a) && h.kind == craft_dpx::Kind::Dpx).unwrap_or(1.0); let name = if h.kind == craft_dpx::Kind::Dpx { "DPX" } else { "Cineon" }; f.codec = format!("{name} {}-bit {}", h.bits, layout_name(&h)); let t = transfer(&h); @@ -172,7 +169,9 @@ mod tests { assert!(decode("t.dpx", good.get(..n).expect("cut")).is_err(), "{n}"); } // huge, zero, Y'CbCr, unsupported depth, transposed - for (w, h, d, bits, p, o) in [(u32::MAX, u32::MAX, 50, 10, 1, 0), (0, 4, 50, 10, 1, 0), (4, 4, 102, 10, 1, 0), (4, 4, 50, 32, 0, 0), (4, 4, 50, 10, 1, 5)] { + for (w, h, d, bits, p, o) in + [(u32::MAX, u32::MAX, 50, 10, 1, 0), (0, 4, 50, 10, 1, 0), (4, 4, 102, 10, 1, 0), (4, 4, 50, 32, 0, 0), (4, 4, 50, 10, 1, 5)] + { let mut b = dpx_header(w, h, d, bits, p, o); b.extend(std::iter::repeat_n(0, 64)); assert!(probe("h.dpx", &b).is_err() && decode("h.dpx", &b).is_err(), "{w}x{h} {d} {bits} {p} {o}"); diff --git a/crates/model/src/lib.rs b/crates/model/src/lib.rs index cbc758bdc..7a1b7f30e 100644 --- a/crates/model/src/lib.rs +++ b/crates/model/src/lib.rs @@ -49,7 +49,7 @@ pub(crate) fn perr(s: impl Into) -> ModelError { } /// Texture coordinate wrapping (glTF sampler wrap modes). -#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)] +#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)] pub enum Wrap { #[default] Repeat, diff --git a/crates/model/src/scene.rs b/crates/model/src/scene.rs index abacc556d..c3ec05415 100644 --- a/crates/model/src/scene.rs +++ b/crates/model/src/scene.rs @@ -229,7 +229,8 @@ fn mesh(m: &cm::Mesh, materials: &[Material], missing: MissingNormals) -> Mesh { continue; } for c in t { - let key = cm::Corner { position: c.position, normal: if normals { c.normal } else { cm::NONE }, uv: if uvs.is_some() { c.uv } else { cm::NONE } }; + let key = + cm::Corner { position: c.position, normal: if normals { c.normal } else { cm::NONE }, uv: if uvs.is_some() { c.uv } else { cm::NONE } }; let next = p.positions.len() as u32; let id = *ids.entry(key).or_insert_with(|| { let at = c.position as usize; diff --git a/crates/model/src/tests.rs b/crates/model/src/tests.rs index 012b85d66..b63ec558c 100644 --- a/crates/model/src/tests.rs +++ b/crates/model/src/tests.rs @@ -682,4 +682,3 @@ fn gltf_buffer_less_accessors_share_one_zero_budget() { let doc = gltf_doc(acc, r#"{"buffer": 0}"#, 3); assert!(crate::gltf::parse(doc.as_bytes(), &|_| None).is_ok()); } - diff --git a/crates/pdf/README.md b/crates/pdf/README.md index 868ce5e0f..5d3685090 100644 --- a/crates/pdf/README.md +++ b/crates/pdf/README.md @@ -144,7 +144,7 @@ ffmpeg elsewhere) to check the code tables against an independent implementation ## Shared parser setup and bounds The workspace pins `craft-pdf` to `craft-libs` Git revision -`c31fc02ab9867ce3a8312b40cb6a8eae85cff639`, with `default-features = false` and only the explicit `read` +`4cb271b785b02e7aafd83ab91d3737f2939111fb`, with `default-features = false` and only the explicit `read` feature. This excludes the backend's bundled fonts and Adobe CMaps and preserves EffectCraft's font and asset policies. The shared parser does not change the supported drawing operators, image codecs, continuously rasterized SVG tree, editable shapes, or EPS interpreter. diff --git a/xtask/src/pdf_deps.rs b/xtask/src/pdf_deps.rs index 58ef9bcc7..d6fa0d87b 100644 --- a/xtask/src/pdf_deps.rs +++ b/xtask/src/pdf_deps.rs @@ -5,7 +5,7 @@ use std::process::Command; use serde_json::Value; -const REV: &str = "c31fc02ab9867ce3a8312b40cb6a8eae85cff639"; +const REV: &str = "4cb271b785b02e7aafd83ab91d3737f2939111fb"; const PACKAGES: &[(&str, &str)] = &[("craft-pdf", "0.1.0"), ("hayro-syntax", "0.7.2"), ("hayro-jbig2", "0.3.0")]; pub fn run(root: &Path) -> Result<(), String> {