diff --git a/Cargo.lock b/Cargo.lock index 3f47ef1ed5a..467b509d340 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1376,7 +1376,7 @@ dependencies = [ [[package]] name = "craft" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "craft-automation", "craft-behavior", @@ -1417,7 +1417,7 @@ dependencies = [ [[package]] name = "craft-affinity" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "crc32fast", "flate2", @@ -1438,7 +1438,7 @@ dependencies = [ [[package]] name = "craft-appkit" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "block2 0.6.2", "objc2 0.6.5", @@ -1450,7 +1450,7 @@ dependencies = [ [[package]] name = "craft-atomic" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "rustix 1.1.6", ] @@ -1458,7 +1458,7 @@ dependencies = [ [[package]] name = "craft-automation" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "base64 0.23.1", "craft-behavior", @@ -1483,7 +1483,7 @@ dependencies = [ [[package]] name = "craft-behavior" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "accesskit", "bitflags 2.13.2", @@ -1501,7 +1501,7 @@ dependencies = [ [[package]] name = "craft-browse" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "craft-behavior", "craft-docpath", @@ -1519,7 +1519,7 @@ dependencies = [ [[package]] name = "craft-cloud-ui" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "egui", ] @@ -1527,7 +1527,7 @@ dependencies = [ [[package]] name = "craft-cms" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "md-5", "rayon", @@ -1536,12 +1536,12 @@ dependencies = [ [[package]] name = "craft-codepage" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" [[package]] name = "craft-color" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "serde", ] @@ -1549,7 +1549,7 @@ dependencies = [ [[package]] name = "craft-color-transform" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "craft-cms", "craft-color", @@ -1559,7 +1559,7 @@ dependencies = [ [[package]] name = "craft-color-ui" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "craft-behavior", "craft-cms", @@ -1580,7 +1580,7 @@ dependencies = [ [[package]] name = "craft-control" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "craft-ai-agents", "craft-atomic", @@ -1596,7 +1596,7 @@ dependencies = [ [[package]] name = "craft-control-protocol" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "getrandom 0.3.4", "serde_json", @@ -1606,7 +1606,7 @@ dependencies = [ [[package]] name = "craft-crs" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "craft-metadata", "craft-xml", @@ -1616,7 +1616,7 @@ dependencies = [ [[package]] name = "craft-crw" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "thiserror 2.0.21", ] @@ -1624,7 +1624,7 @@ dependencies = [ [[package]] name = "craft-dds" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "rayon", ] @@ -1632,7 +1632,7 @@ dependencies = [ [[package]] name = "craft-develop" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "craft-color", "craft-color-transform", @@ -1647,7 +1647,7 @@ dependencies = [ [[package]] name = "craft-develop-model" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "craft-geom", "craft-metadata", @@ -1659,7 +1659,7 @@ dependencies = [ [[package]] name = "craft-dialogs" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "block2 0.6.2", "craft-appkit", @@ -1685,7 +1685,7 @@ dependencies = [ [[package]] name = "craft-docpath" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "serde", ] @@ -1693,7 +1693,7 @@ dependencies = [ [[package]] name = "craft-draw" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "craft-behavior", "craft-color-ui", @@ -1712,7 +1712,7 @@ dependencies = [ [[package]] name = "craft-drawingml" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "chrono", "craft-xml", @@ -1724,12 +1724,12 @@ dependencies = [ [[package]] name = "craft-eps" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" [[package]] name = "craft-file-formats" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "craft-eps", "craft-idml", @@ -1747,7 +1747,7 @@ dependencies = [ [[package]] name = "craft-flags" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "craft-atomic", "dirs", @@ -1757,7 +1757,7 @@ dependencies = [ [[package]] name = "craft-font-catalog" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "fontique", "harfrust 0.13.3", @@ -1772,7 +1772,7 @@ dependencies = [ [[package]] name = "craft-font-manager" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "craft-behavior", "craft-font-catalog", @@ -1792,7 +1792,7 @@ dependencies = [ [[package]] name = "craft-font-os-windows" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "windows-registry", "windows-sys 0.61.2", @@ -1801,7 +1801,7 @@ dependencies = [ [[package]] name = "craft-font-store" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "cap-primitives", "craft-atomic", @@ -1824,12 +1824,12 @@ dependencies = [ [[package]] name = "craft-fonts-build" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" [[package]] name = "craft-geom" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "serde", ] @@ -1837,7 +1837,7 @@ dependencies = [ [[package]] name = "craft-heif" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "heic-rs", "rayon", @@ -1846,7 +1846,7 @@ dependencies = [ [[package]] name = "craft-host" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "bitflags 2.13.2", "craft-i18n", @@ -1859,7 +1859,7 @@ dependencies = [ [[package]] name = "craft-i18n" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "brotli 9.1.3", "brotli-decompressor 6.3.2", @@ -1889,7 +1889,7 @@ dependencies = [ [[package]] name = "craft-idml" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "craft-xml", "craft-zip", @@ -1899,7 +1899,7 @@ dependencies = [ [[package]] name = "craft-image-codecs" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "craft-dds", "craft-heif", @@ -1927,7 +1927,7 @@ dependencies = [ [[package]] name = "craft-imaging" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "craft-behavior", "craft-color-ui", @@ -1945,12 +1945,12 @@ dependencies = [ [[package]] name = "craft-ipp" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" [[package]] name = "craft-jpeg" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "thiserror 2.0.21", ] @@ -1958,7 +1958,7 @@ dependencies = [ [[package]] name = "craft-keymap" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "craft-host", "craft-i18n", @@ -1973,7 +1973,7 @@ dependencies = [ [[package]] name = "craft-kra" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "craft-xml", "craft-zip", @@ -1983,7 +1983,7 @@ dependencies = [ [[package]] name = "craft-layers" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "craft-behavior", "craft-i18n", @@ -1997,7 +1997,7 @@ dependencies = [ [[package]] name = "craft-menu" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "craft-behavior", "craft-host", @@ -2015,7 +2015,7 @@ dependencies = [ [[package]] name = "craft-metadata" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "brotli-decompressor 6.3.2", "chrono", @@ -2027,7 +2027,7 @@ dependencies = [ [[package]] name = "craft-nightly" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "uds_windows", "winsafe", @@ -2036,7 +2036,7 @@ dependencies = [ [[package]] name = "craft-ora" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "craft-xml", "craft-zip", @@ -2046,7 +2046,7 @@ dependencies = [ [[package]] name = "craft-pages" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "craft-behavior", "craft-keymap", @@ -2062,7 +2062,7 @@ dependencies = [ [[package]] name = "craft-pcraft-bundle" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "blake3", "craft-atomic", @@ -2075,7 +2075,7 @@ dependencies = [ [[package]] name = "craft-pcraft-format" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "flate2", "serde", @@ -2086,7 +2086,7 @@ dependencies = [ [[package]] name = "craft-pdf" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "bytemuck", "flate2", @@ -2101,7 +2101,7 @@ dependencies = [ [[package]] name = "craft-pdn" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "flate2", "thiserror 2.0.21", @@ -2110,7 +2110,7 @@ dependencies = [ [[package]] name = "craft-platform" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "async-channel", "async-io", @@ -2143,7 +2143,7 @@ dependencies = [ [[package]] name = "craft-plist" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "thiserror 2.0.21", ] @@ -2151,7 +2151,7 @@ dependencies = [ [[package]] name = "craft-print" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "craft-behavior", "craft-host", @@ -2175,7 +2175,7 @@ dependencies = [ [[package]] name = "craft-psd" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "encoding_rs", "flate2", @@ -2186,7 +2186,7 @@ dependencies = [ [[package]] name = "craft-quit" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "dispatch2", "egui", @@ -2199,7 +2199,7 @@ dependencies = [ [[package]] name = "craft-raw" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "chrono", "craft-crw", @@ -2217,7 +2217,7 @@ dependencies = [ [[package]] name = "craft-review" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "base64 0.23.1", "craft-behavior", @@ -2236,7 +2236,7 @@ dependencies = [ [[package]] name = "craft-settings" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "craft-atomic", "craft-host", @@ -2253,7 +2253,7 @@ dependencies = [ [[package]] name = "craft-svg" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "craft-image-codecs", "craft-xml", @@ -2274,7 +2274,7 @@ dependencies = [ [[package]] name = "craft-table" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "craft-behavior", "craft-keymap", @@ -2286,7 +2286,7 @@ dependencies = [ [[package]] name = "craft-testkit" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "rustix 1.1.6", "tempfile", @@ -2296,7 +2296,7 @@ dependencies = [ [[package]] name = "craft-text" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "craft-behavior", "craft-font-manager", @@ -2319,7 +2319,7 @@ dependencies = [ [[package]] name = "craft-theme" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "bitflags 2.13.2", "craft-tracked", @@ -2334,7 +2334,7 @@ dependencies = [ [[package]] name = "craft-theme-editor" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "craft-behavior", "craft-theme", @@ -2345,7 +2345,7 @@ dependencies = [ [[package]] name = "craft-theme-store" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "craft-atomic", "craft-behavior", @@ -2360,7 +2360,7 @@ dependencies = [ [[package]] name = "craft-tiff" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "serde", "thiserror 2.0.21", @@ -2370,7 +2370,7 @@ dependencies = [ [[package]] name = "craft-time" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "serde", "thiserror 2.0.21", @@ -2379,7 +2379,7 @@ dependencies = [ [[package]] name = "craft-timeline" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "craft-behavior", "craft-keymap", @@ -2394,7 +2394,7 @@ dependencies = [ [[package]] name = "craft-tracked" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "serde", ] @@ -2402,7 +2402,7 @@ dependencies = [ [[package]] name = "craft-ui" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "craft-cloud-ui", "craft-ui-canvas", @@ -2416,7 +2416,7 @@ dependencies = [ [[package]] name = "craft-ui-canvas" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "craft-behavior", "craft-font-catalog", @@ -2433,7 +2433,7 @@ dependencies = [ [[package]] name = "craft-ui-contract" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "accesskit", "craft-behavior", @@ -2475,7 +2475,7 @@ dependencies = [ [[package]] name = "craft-ui-macros" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2486,7 +2486,7 @@ dependencies = [ [[package]] name = "craft-ui-panels" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "craft-behavior", "craft-host", @@ -2504,7 +2504,7 @@ dependencies = [ [[package]] name = "craft-ui-patterns" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "craft-behavior", "craft-host", @@ -2525,7 +2525,7 @@ dependencies = [ [[package]] name = "craft-ui-shell" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "craft-behavior", "craft-host", @@ -2545,7 +2545,7 @@ dependencies = [ [[package]] name = "craft-ui-widgets" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "craft-behavior", "craft-host", @@ -2564,7 +2564,7 @@ dependencies = [ [[package]] name = "craft-update" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "base64 0.22.1", "chrono", @@ -2596,7 +2596,7 @@ dependencies = [ [[package]] name = "craft-win32" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "winsafe", ] @@ -2604,7 +2604,7 @@ dependencies = [ [[package]] name = "craft-window" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "craft-appkit", "craft-atomic", @@ -2636,7 +2636,7 @@ dependencies = [ [[package]] name = "craft-xcf" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "flate2", "thiserror 2.0.21", @@ -2645,7 +2645,7 @@ dependencies = [ [[package]] name = "craft-xml" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "quick-xml 0.41.0", "serde", @@ -2655,7 +2655,7 @@ dependencies = [ [[package]] name = "craft-zip" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "flate2", "thiserror 2.0.21", @@ -4179,7 +4179,7 @@ dependencies = [ [[package]] name = "hayro" version = "0.7.1" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "bytemuck", "hayro-interpret", @@ -4209,7 +4209,7 @@ dependencies = [ [[package]] name = "hayro-interpret" version = "0.7.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "bitflags 2.13.2", "hayro-cmap", @@ -4227,7 +4227,7 @@ dependencies = [ [[package]] name = "hayro-jbig2" version = "0.3.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "fearless_simd", "hayro-ccitt", @@ -4251,7 +4251,7 @@ checksum = "bc2d80da85f31c3fdc0366431f44cfd645a9da1e242ed1f4a61f213d9765660f" [[package]] name = "hayro-syntax" version = "0.7.2" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "flate2", "hayro-ccitt", @@ -5344,7 +5344,7 @@ checksum = "d4a5ff6bcca6c4867b1c4fd4ef63e4db7436ef363e0ad7531d1558856bae64f4" [[package]] name = "linesweeper" version = "0.5.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "arrayvec", "kurbo 0.13.1", @@ -9857,7 +9857,7 @@ dependencies = [ [[package]] name = "vello_common" version = "0.0.8" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "bytemuck", "fearless_simd", @@ -9905,7 +9905,7 @@ dependencies = [ [[package]] name = "vello_cpu" version = "0.0.8" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" dependencies = [ "bytemuck", "glifo 0.1.1", @@ -11551,14 +11551,14 @@ source = "git+https://github.com/storytold/egui.git?rev=07c20531f89717e461c0f387 [[patch.unused]] name = "hayro-cmap" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" [[patch.unused]] name = "hayro-postscript" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" [[patch.unused]] name = "krilla" version = "0.8.2" -source = "git+https://github.com/storytold/craft-libs?rev=475f6feb712bd2db2f235d9999be61c68477ae39#475f6feb712bd2db2f235d9999be61c68477ae39" +source = "git+https://github.com/storytold/craft-libs?rev=fc3262f68babdb19a98a89c415c84c6b327073d3#fc3262f68babdb19a98a89c415c84c6b327073d3" diff --git a/Cargo.toml b/Cargo.toml index 61da67d493e..c941befcf2b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,21 +12,21 @@ rust-version = "1.95" [workspace.dependencies] # The craft framework through its facade (`craft::ui::…`). The egui `[patch]` below must match # `craft::egui_fork::REV` (checked by `cargo xtask ci`). -craft = { git = "https://github.com/storytold/craft-libs", rev = "475f6feb712bd2db2f235d9999be61c68477ae39", default-features = false } -craft-tracked = { git = "https://github.com/storytold/craft-libs", rev = "475f6feb712bd2db2f235d9999be61c68477ae39" } -craft-ui-macros = { git = "https://github.com/storytold/craft-libs", rev = "475f6feb712bd2db2f235d9999be61c68477ae39" } +craft = { git = "https://github.com/storytold/craft-libs", rev = "fc3262f68babdb19a98a89c415c84c6b327073d3", default-features = false } +craft-tracked = { git = "https://github.com/storytold/craft-libs", rev = "fc3262f68babdb19a98a89c415c84c6b327073d3" } +craft-ui-macros = { git = "https://github.com/storytold/craft-libs", rev = "fc3262f68babdb19a98a89c415c84c6b327073d3" } # internal photocraft-geom = { path = "crates/geom" } photocraft-color = { path = "crates/color" } photocraft-raster = { path = "crates/raster" } photocraft-doc = { path = "crates/doc" } photocraft-ops = { path = "crates/ops" } -craft-plist = { git = "https://github.com/storytold/craft-libs", rev = "475f6feb712bd2db2f235d9999be61c68477ae39" } -craft-psd = { git = "https://github.com/storytold/craft-libs", rev = "475f6feb712bd2db2f235d9999be61c68477ae39" } -photocraft-codecs = { package = "craft-image-codecs", git = "https://github.com/storytold/craft-libs", rev = "475f6feb712bd2db2f235d9999be61c68477ae39" } -photocraft-formats = { package = "craft-file-formats", git = "https://github.com/storytold/craft-libs", rev = "475f6feb712bd2db2f235d9999be61c68477ae39", features = ["raster-codecs", "pdf", "svg", "ora", "kra", "xcf", "pdn", "raw", "psd", "affinity", "pcraft"] } +craft-plist = { git = "https://github.com/storytold/craft-libs", rev = "fc3262f68babdb19a98a89c415c84c6b327073d3" } +craft-psd = { git = "https://github.com/storytold/craft-libs", rev = "fc3262f68babdb19a98a89c415c84c6b327073d3" } +photocraft-codecs = { package = "craft-image-codecs", git = "https://github.com/storytold/craft-libs", rev = "fc3262f68babdb19a98a89c415c84c6b327073d3" } +photocraft-formats = { package = "craft-file-formats", git = "https://github.com/storytold/craft-libs", rev = "fc3262f68babdb19a98a89c415c84c6b327073d3", features = ["raster-codecs", "pdf", "svg", "ora", "kra", "xcf", "pdn", "raw", "psd", "affinity", "pcraft"] } photocraft-raw = { path = "crates/raw" } -craft-affinity = { git = "https://github.com/storytold/craft-libs", rev = "475f6feb712bd2db2f235d9999be61c68477ae39" } +craft-affinity = { git = "https://github.com/storytold/craft-libs", rev = "fc3262f68babdb19a98a89c415c84c6b327073d3" } photocraft-compose = { path = "crates/compose" } photocraft-gpu = { path = "crates/gpu" } photocraft-paint = { path = "crates/paint" } @@ -48,38 +48,38 @@ photocraft-ipp = { path = "crates/ipp" } # external # ICC colour management: the shared crate (replaces crates/cms; craft-libs#779). -craft-cms = { git = "https://github.com/storytold/craft-libs", rev = "475f6feb712bd2db2f235d9999be61c68477ae39" } -craft-print = { git = "https://github.com/storytold/craft-libs", rev = "475f6feb712bd2db2f235d9999be61c68477ae39" } +craft-cms = { git = "https://github.com/storytold/craft-libs", rev = "fc3262f68babdb19a98a89c415c84c6b327073d3" } +craft-print = { git = "https://github.com/storytold/craft-libs", rev = "fc3262f68babdb19a98a89c415c84c6b327073d3" } # HEIC/HEIF: the shared decoder (replaces crates/heif; craft-libs#784). -craft-heif = { git = "https://github.com/storytold/craft-libs", rev = "475f6feb712bd2db2f235d9999be61c68477ae39" } -craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "475f6feb712bd2db2f235d9999be61c68477ae39", features = ["raster", "write-raster"] } -craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "475f6feb712bd2db2f235d9999be61c68477ae39" } -craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "475f6feb712bd2db2f235d9999be61c68477ae39" } -craft-jpeg = { git = "https://github.com/storytold/craft-libs", rev = "475f6feb712bd2db2f235d9999be61c68477ae39" } -craft-pcraft-format = { git = "https://github.com/storytold/craft-libs", rev = "475f6feb712bd2db2f235d9999be61c68477ae39" } -craft-pcraft-bundle = { git = "https://github.com/storytold/craft-libs", rev = "475f6feb712bd2db2f235d9999be61c68477ae39" } -craft-zip = { git = "https://github.com/storytold/craft-libs", rev = "475f6feb712bd2db2f235d9999be61c68477ae39" } -craft-ora = { git = "https://github.com/storytold/craft-libs", rev = "475f6feb712bd2db2f235d9999be61c68477ae39" } -craft-kra = { git = "https://github.com/storytold/craft-libs", rev = "475f6feb712bd2db2f235d9999be61c68477ae39" } -craft-xcf = { git = "https://github.com/storytold/craft-libs", rev = "475f6feb712bd2db2f235d9999be61c68477ae39" } -craft-pdn = { git = "https://github.com/storytold/craft-libs", rev = "475f6feb712bd2db2f235d9999be61c68477ae39" } +craft-heif = { git = "https://github.com/storytold/craft-libs", rev = "fc3262f68babdb19a98a89c415c84c6b327073d3" } +craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "fc3262f68babdb19a98a89c415c84c6b327073d3", features = ["raster", "write-raster"] } +craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "fc3262f68babdb19a98a89c415c84c6b327073d3" } +craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "fc3262f68babdb19a98a89c415c84c6b327073d3" } +craft-jpeg = { git = "https://github.com/storytold/craft-libs", rev = "fc3262f68babdb19a98a89c415c84c6b327073d3" } +craft-pcraft-format = { git = "https://github.com/storytold/craft-libs", rev = "fc3262f68babdb19a98a89c415c84c6b327073d3" } +craft-pcraft-bundle = { git = "https://github.com/storytold/craft-libs", rev = "fc3262f68babdb19a98a89c415c84c6b327073d3" } +craft-zip = { git = "https://github.com/storytold/craft-libs", rev = "fc3262f68babdb19a98a89c415c84c6b327073d3" } +craft-ora = { git = "https://github.com/storytold/craft-libs", rev = "fc3262f68babdb19a98a89c415c84c6b327073d3" } +craft-kra = { git = "https://github.com/storytold/craft-libs", rev = "fc3262f68babdb19a98a89c415c84c6b327073d3" } +craft-xcf = { git = "https://github.com/storytold/craft-libs", rev = "fc3262f68babdb19a98a89c415c84c6b327073d3" } +craft-pdn = { git = "https://github.com/storytold/craft-libs", rev = "fc3262f68babdb19a98a89c415c84c6b327073d3" } # Keep the shared embedded-image validation API until the framework revision includes it. -craft-svg = { git = "https://github.com/storytold/craft-libs", rev = "475f6feb712bd2db2f235d9999be61c68477ae39", features = ["tree-render", "tree-render-system-fonts"] } -craft-raw = { git = "https://github.com/storytold/craft-libs", rev = "475f6feb712bd2db2f235d9999be61c68477ae39" } -craft-tiff = { git = "https://github.com/storytold/craft-libs", rev = "475f6feb712bd2db2f235d9999be61c68477ae39" } +craft-svg = { git = "https://github.com/storytold/craft-libs", rev = "fc3262f68babdb19a98a89c415c84c6b327073d3", features = ["tree-render", "tree-render-system-fonts"] } +craft-raw = { git = "https://github.com/storytold/craft-libs", rev = "fc3262f68babdb19a98a89c415c84c6b327073d3" } +craft-tiff = { git = "https://github.com/storytold/craft-libs", rev = "fc3262f68babdb19a98a89c415c84c6b327073d3" } # Camera-field EXIF reader/writer, shared prerequisite craft-libs#1563. -craft-metadata = { git = "https://github.com/storytold/craft-libs", rev = "475f6feb712bd2db2f235d9999be61c68477ae39" } -craft-crs = { git = "https://github.com/storytold/craft-libs", rev = "475f6feb712bd2db2f235d9999be61c68477ae39" } -craft-develop = { git = "https://github.com/storytold/craft-libs", rev = "475f6feb712bd2db2f235d9999be61c68477ae39" } -craft-develop-model = { git = "https://github.com/storytold/craft-libs", rev = "475f6feb712bd2db2f235d9999be61c68477ae39" } +craft-metadata = { git = "https://github.com/storytold/craft-libs", rev = "fc3262f68babdb19a98a89c415c84c6b327073d3" } +craft-crs = { git = "https://github.com/storytold/craft-libs", rev = "fc3262f68babdb19a98a89c415c84c6b327073d3" } +craft-develop = { git = "https://github.com/storytold/craft-libs", rev = "fc3262f68babdb19a98a89c415c84c6b327073d3" } +craft-develop-model = { git = "https://github.com/storytold/craft-libs", rev = "fc3262f68babdb19a98a89c415c84c6b327073d3" } # Interface translations: lookup, fallback, CLDR plurals and language names over the craft-i18n # catalogs that `crates/ui-egui/build.rs` embeds from `CRAFT_I18N_DIR` (storytold/craft-i18n, at # the commit in `craft-i18n.rev`). Already in the tree through craft. -craft-i18n = { git = "https://github.com/storytold/craft-libs", rev = "475f6feb712bd2db2f235d9999be61c68477ae39" } +craft-i18n = { git = "https://github.com/storytold/craft-libs", rev = "fc3262f68babdb19a98a89c415c84c6b327073d3" } # 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 = "475f6feb712bd2db2f235d9999be61c68477ae39", features = ["ui"] } +craft-update = { git = "https://github.com/storytold/craft-libs", version = "=0.1.0", rev = "fc3262f68babdb19a98a89c415c84c6b327073d3", features = ["ui"] } # Self-contained nightly profile isolation, launch protocol, and security fence. -craft-nightly = { git = "https://github.com/storytold/craft-libs", rev = "475f6feb712bd2db2f235d9999be61c68477ae39" } +craft-nightly = { git = "https://github.com/storytold/craft-libs", rev = "fc3262f68babdb19a98a89c415c84c6b327073d3" } thiserror = "2" serde = { version = "1", features = ["derive", "rc"] } serde_json = "1" @@ -352,16 +352,16 @@ opt-level = 3 # Keep the complete egui family and native event bridge on reviewed fork commits. [patch.crates-io] -krilla = { git = "https://github.com/storytold/craft-libs", rev = "475f6feb712bd2db2f235d9999be61c68477ae39" } -hayro = { git = "https://github.com/storytold/craft-libs", rev = "475f6feb712bd2db2f235d9999be61c68477ae39" } -hayro-interpret = { git = "https://github.com/storytold/craft-libs", rev = "475f6feb712bd2db2f235d9999be61c68477ae39" } -hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "475f6feb712bd2db2f235d9999be61c68477ae39" } -hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "475f6feb712bd2db2f235d9999be61c68477ae39" } -hayro-cmap = { git = "https://github.com/storytold/craft-libs", rev = "475f6feb712bd2db2f235d9999be61c68477ae39" } -hayro-postscript = { git = "https://github.com/storytold/craft-libs", rev = "475f6feb712bd2db2f235d9999be61c68477ae39" } -linesweeper = { git = "https://github.com/storytold/craft-libs", rev = "475f6feb712bd2db2f235d9999be61c68477ae39" } -vello_common = { git = "https://github.com/storytold/craft-libs", rev = "475f6feb712bd2db2f235d9999be61c68477ae39" } -vello_cpu = { git = "https://github.com/storytold/craft-libs", rev = "475f6feb712bd2db2f235d9999be61c68477ae39" } +krilla = { git = "https://github.com/storytold/craft-libs", rev = "fc3262f68babdb19a98a89c415c84c6b327073d3" } +hayro = { git = "https://github.com/storytold/craft-libs", rev = "fc3262f68babdb19a98a89c415c84c6b327073d3" } +hayro-interpret = { git = "https://github.com/storytold/craft-libs", rev = "fc3262f68babdb19a98a89c415c84c6b327073d3" } +hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "fc3262f68babdb19a98a89c415c84c6b327073d3" } +hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "fc3262f68babdb19a98a89c415c84c6b327073d3" } +hayro-cmap = { git = "https://github.com/storytold/craft-libs", rev = "fc3262f68babdb19a98a89c415c84c6b327073d3" } +hayro-postscript = { git = "https://github.com/storytold/craft-libs", rev = "fc3262f68babdb19a98a89c415c84c6b327073d3" } +linesweeper = { git = "https://github.com/storytold/craft-libs", rev = "fc3262f68babdb19a98a89c415c84c6b327073d3" } +vello_common = { git = "https://github.com/storytold/craft-libs", rev = "fc3262f68babdb19a98a89c415c84c6b327073d3" } +vello_cpu = { git = "https://github.com/storytold/craft-libs", rev = "fc3262f68babdb19a98a89c415c84c6b327073d3" } ecolor = { git = "https://github.com/storytold/egui.git", rev = "07c20531f89717e461c0f387dd1f9649553f9321" } emath = { git = "https://github.com/storytold/egui.git", rev = "07c20531f89717e461c0f387dd1f9649553f9321" } epaint = { git = "https://github.com/storytold/egui.git", rev = "07c20531f89717e461c0f387dd1f9649553f9321" } diff --git a/apps/photocraft/src/main.rs b/apps/photocraft/src/main.rs index 34abab284a1..cd5d580945b 100644 --- a/apps/photocraft/src/main.rs +++ b/apps/photocraft/src/main.rs @@ -258,6 +258,8 @@ fn claim_single_instance( // launch that sets only `PHOTOCRAFT_PRESENT_MODE` (say) has per-process options too, so it // keeps its own process instead of handing its files over and being ignored. launch_options.extend_from_slice(&single_instance::env_launch_options()); + // The CPU-compatibility relaunch's `--safe-gpu` is not a person's: it takes part. + let launch_options = single_instance::without_relaunch_safe_gpu(launch_options, std::env::var_os("PHOTOCRAFT_GPU_STARTUP_FAILURE").as_deref()); let context = single_instance::LaunchContext { per_user_settings: launch_profile::current().is_nightly() || app_dirs::current().mode == app_dirs::Mode::Platform, new_instance_flag: new_instance && !nightly, diff --git a/apps/photocraft/src/single_instance.rs b/apps/photocraft/src/single_instance.rs index 4d836adc907..782b234e2b3 100644 --- a/apps/photocraft/src/single_instance.rs +++ b/apps/photocraft/src/single_instance.rs @@ -29,9 +29,7 @@ use std::io::{BufReader, Read, Write}; use std::net::{Ipv4Addr, SocketAddr, TcpListener, TcpStream}; #[cfg(unix)] use std::os::unix::net::{UnixListener, UnixStream}; -use std::path::Path; -#[cfg(unix)] -use std::path::PathBuf; +use std::path::{Path, PathBuf}; use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering}; use std::sync::mpsc::{SyncSender, sync_channel}; use std::sync::{Arc, Mutex, PoisonError}; @@ -181,6 +179,22 @@ fn env_launch_options_from(get: impl Fn(&str) -> Option) -> ENV_LAUNCH_OPTIONS.iter().filter(|(name, _, is_on)| get(name).is_some_and(|v| is_on(&v.to_string_lossy()))).map(|(_, option, _)| *option).collect() } +/// Whether `--safe-gpu` keeps a launch out of single-instance. It does when a person passes it, but +/// not for the CPU-compatibility relaunch (which sets `PHOTOCRAFT_GPU_STARTUP_FAILURE`): that one +/// takes the place of a launch that has already shut its instance down. +pub fn safe_gpu_is_launch_option(gpu_startup_failure: Option<&std::ffi::OsStr>) -> bool { + gpu_startup_failure.is_none() +} + +/// `options` without the `--safe-gpu` the CPU-compatibility relaunch adds; a person's stays +/// ([`safe_gpu_is_launch_option`]). Every other option is kept. +pub fn without_relaunch_safe_gpu(mut options: Vec, gpu_startup_failure: Option<&std::ffi::OsStr>) -> Vec { + if !safe_gpu_is_launch_option(gpu_startup_failure) { + options.retain(|option| *option != PerProcess::SafeGpu); + } + options +} + /// Why this launch runs as its own instance, or `None` to take part in single-instance. pub fn skip_reason(c: &LaunchContext) -> Option { if !c.per_user_settings { @@ -210,6 +224,8 @@ pub struct Primary { /// then, so the second call (`Drop`) can't remove the socket the next primary has bound. #[cfg(unix)] socket: Mutex>, + /// Where `instance.json` is, removed on [`Primary::shutdown`]. + dir: PathBuf, } struct Shared { @@ -255,7 +271,13 @@ impl Primary { if let Some(path) = self.socket.lock().unwrap_or_else(PoisonError::into_inner).take() { let _ = std::fs::remove_file(path); } - drop(self.lock.lock().unwrap_or_else(PoisonError::into_inner).take()); + let mut lock = self.lock.lock().unwrap_or_else(PoisonError::into_inner); + if let Some(file) = lock.take() { + // Before the lock goes, so the file can only be ours: a later launch never reads an + // endpoint that has since been freed (or taken by another program). + remove_info(&self.dir); + drop(file); + } } } @@ -324,11 +346,11 @@ pub fn claim_with(dir: &Path, paths: &[String], timing: Timing) -> Launch { /// once a quitting or crashed primary is gone) and then the running primary, wherever /// `instance.json` says it listens. pub fn claim_in(dir: &Path, paths: &[String], timing: Timing, transport: &Transport) -> Launch { - if let Err(e) = std::fs::create_dir_all(dir) { + if let Err(e) = create_private_dir(dir) { return Launch::Standalone(format!("{}: {e}", dir.display())); } let lock_path = dir.join(LOCK_FILE); - let lock = match OpenOptions::new().read(true).write(true).create(true).truncate(false).open(&lock_path) { + let lock = match open_lock(&lock_path) { Ok(lock) => lock, Err(e) => return Launch::Standalone(format!("{}: {e}", lock_path.display())), }; @@ -407,9 +429,39 @@ fn serve(dir: &Path, lock: File, timing: Timing, transport: &Transport) -> Resul shared, #[cfg(unix)] socket: Mutex::new(socket), + dir: dir.to_path_buf(), }) } +/// The settings folder, the user's alone (0700) on Unix when this is the first to create it. +fn create_private_dir(dir: &Path) -> std::io::Result<()> { + let mut builder = std::fs::DirBuilder::new(); + builder.recursive(true); + #[cfg(unix)] + std::os::unix::fs::DirBuilderExt::mode(&mut builder, 0o700); + builder.create(dir) +} + +/// `instance.lock`, the user's alone (0600) on Unix: another local user who could open it could +/// hold the lock, and every launch would then wait out its hand-off time and start on its own. +fn open_lock(path: &Path) -> std::io::Result { + let mut options = OpenOptions::new(); + options.read(true).write(true).create(true).truncate(false); + #[cfg(unix)] + std::os::unix::fs::OpenOptionsExt::mode(&mut options, 0o600); + let lock = options.open(path)?; + // The mode applies only on create: narrow a lock file an earlier version left readable. + #[cfg(unix)] + { + use std::os::unix::fs::PermissionsExt; + let wide = lock.metadata().is_ok_and(|m| m.permissions().mode() & 0o077 != 0); + if wide && let Err(e) = lock.set_permissions(std::fs::Permissions::from_mode(0o600)) { + log::warn!("{}: couldn't make it private: {e}", path.display()); + } + } + Ok(lock) +} + /// The primary's listener on either transport. enum Listener { Tcp(TcpListener), @@ -574,6 +626,15 @@ fn write_info(dir: &Path, endpoint: &Endpoint, token: &str) -> Result<(), String }) } +/// Remove `instance.json` if this process wrote it. +fn remove_info(dir: &Path) { + let path = dir.join(INFO_FILE); + let pid = std::fs::read(&path).ok().and_then(|b| serde_json::from_slice::(&b).ok()).and_then(|v| v.get("pid")?.as_u64()); + if pid == Some(u64::from(std::process::id())) { + let _ = std::fs::remove_file(&path); + } +} + fn read_info(dir: &Path) -> Option<(Endpoint, String)> { let v: Value = serde_json::from_slice(&std::fs::read(dir.join(INFO_FILE)).ok()?).ok()?; let token = v.get("token")?.as_str()?.to_string(); diff --git a/apps/photocraft/src/single_instance/tests.rs b/apps/photocraft/src/single_instance/tests.rs index e450758865b..309d55873f5 100644 --- a/apps/photocraft/src/single_instance/tests.rs +++ b/apps/photocraft/src/single_instance/tests.rs @@ -133,9 +133,10 @@ fn a_launch_waiting_on_a_closing_instance_takes_over() { std::thread::sleep(Duration::from_millis(1)); } primary.shutdown(); - assert!(matches!(waiting.join().unwrap(), Launch::Primary(_)), "the waiting launch becomes the primary"); - // After shutdown new connections are refused too. + let Launch::Primary(next) = waiting.join().unwrap() else { panic!("the waiting launch becomes the primary") }; + // After shutdown new connections are refused too. (Read before the drop, which removes the file.) let (endpoint, token) = read_info(&dir).unwrap(); + drop(next); drop(primary); let short = Instant::now() + Duration::from_millis(300); assert!(send(&endpoint, &token, &["b.psd".into()], short).is_err()); @@ -227,6 +228,82 @@ fn the_token_file_is_private_to_the_user() { let _ = std::fs::remove_dir_all(&dir); } +/// Follow-up to #3755, point 1: another local user can't open the lock, so can't hold it. +#[cfg(unix)] +#[test] +fn the_lock_file_and_a_new_settings_folder_are_private_to_the_user() { + use std::os::unix::fs::PermissionsExt; + let mode = |p: &Path| std::fs::metadata(p).unwrap().permissions().mode() & 0o777; + let dir = temp_dir("lock-mode").join("photocraft"); + let first = primary(&dir); + assert_eq!((mode(&dir), mode(&dir.join(LOCK_FILE))), (0o700, 0o600)); + drop(first); + // A lock file an earlier version created 0644 is narrowed on the next start. + std::fs::set_permissions(dir.join(LOCK_FILE), std::fs::Permissions::from_mode(0o644)).unwrap(); + let second = primary(&dir); + assert_eq!(mode(&dir.join(LOCK_FILE)), 0o600); + drop(second); + let _ = std::fs::remove_dir_all(dir.parent().unwrap()); +} + +/// Follow-up to #3755, point 3: a primary that shuts down takes its `instance.json` with it, +/// and a second `shutdown` (the drop) leaves the next primary's alone. +#[test] +fn shutdown_removes_the_instance_file_but_not_the_next_ones() { + let dir = temp_dir("info-cleanup"); + let first = primary(&dir); + assert!(read_info(&dir).is_some()); + first.shutdown(); + assert!(read_info(&dir).is_none(), "no endpoint left behind for a later launch"); + let second = primary(&dir); + let port = port_of(&dir); + drop(first); + assert_eq!(port_of(&dir), port, "the running primary's file stays"); + drop(second); + assert!(read_info(&dir).is_none()); + let _ = std::fs::remove_dir_all(&dir); +} + +/// Follow-up to #3755, point 2: the CPU-compatibility relaunch takes part in single-instance; +/// `--safe-gpu` given by a person still gets its own process. +#[test] +fn the_cpu_relaunch_takes_part_in_single_instance() { + assert!(safe_gpu_is_launch_option(None)); + assert!(!safe_gpu_is_launch_option(Some(std::ffi::OsStr::new("wgpu: no adapter")))); + // The relaunch sets the reason even when it is empty. + assert!(!safe_gpu_is_launch_option(Some(std::ffi::OsStr::new("")))); +} + +/// The filtering `claim_single_instance` applies, through to `skip_reason`: the relaunch's own +/// `--safe-gpu` takes part, a person's stays separate, and the relaunch keeps any other option. +#[test] +fn the_cpu_relaunch_filter_decides_who_takes_part() { + let check = |options: &[PerProcess], failure: Option<&str>| { + let launch_options = without_relaunch_safe_gpu(options.to_vec(), failure.map(std::ffi::OsStr::new)); + let context = LaunchContext { + per_user_settings: true, + new_instance_flag: false, + new_instance_env: None, + control: false, + unreadable_paths: false, + launch_options: &launch_options, + }; + (launch_options.clone(), skip_reason(&context)) + }; + // The CPU relaunch with no other options takes part, whatever its reason says. + for failure in ["wgpu: no adapter", ""] { + assert_eq!(check(&[PerProcess::SafeGpu], Some(failure)), (vec![], None)); + } + // A person's `--safe-gpu` keeps its own process. + let (kept, reason) = check(&[PerProcess::SafeGpu], None); + assert_eq!(kept, [PerProcess::SafeGpu]); + assert!(reason.is_some()); + // The relaunch drops only its own `--safe-gpu`: another option still keeps it separate. + let (kept, reason) = check(&[PerProcess::SafeGpu, PerProcess::GpuAdapterEnv], Some("wgpu: no adapter")); + assert_eq!(kept, [PerProcess::GpuAdapterEnv]); + assert!(reason.is_some()); +} + #[test] fn an_unreachable_instance_falls_back_to_a_standalone_launch() { let dir = temp_dir("unreachable"); diff --git a/crates/engine-core/Cargo.toml b/crates/engine-core/Cargo.toml index ac24b32f634..be32b115541 100644 --- a/crates/engine-core/Cargo.toml +++ b/crates/engine-core/Cargo.toml @@ -19,7 +19,7 @@ photocraft-geom = { workspace = true } photocraft-color = { workspace = true } craft-cms = { workspace = true } # PCTIP codec from craft-libs#1564; kept at the same shared revision as the workspace. -craft-pcraft-tip = { package = "craft-pcraft-format", git = "https://github.com/storytold/craft-libs", rev = "475f6feb712bd2db2f235d9999be61c68477ae39" } +craft-pcraft-tip = { package = "craft-pcraft-format", git = "https://github.com/storytold/craft-libs", rev = "fc3262f68babdb19a98a89c415c84c6b327073d3" } photocraft-raster = { workspace = true } photocraft-doc = { workspace = true } photocraft-ops = { workspace = true } diff --git a/crates/ipp/Cargo.toml b/crates/ipp/Cargo.toml index b25a5ccd3f7..8c4df389b76 100644 --- a/crates/ipp/Cargo.toml +++ b/crates/ipp/Cargo.toml @@ -7,7 +7,7 @@ license.workspace = true rust-version.workspace = true [dependencies] -craft-ipp = { git = "https://github.com/storytold/craft-libs", rev = "475f6feb712bd2db2f235d9999be61c68477ae39" } +craft-ipp = { git = "https://github.com/storytold/craft-libs", rev = "fc3262f68babdb19a98a89c415c84c6b327073d3" } [lints] workspace = true diff --git a/crates/paint/src/brush_tests.rs b/crates/paint/src/brush_tests.rs index dbb2e57790f..3e265d9869c 100644 --- a/crates/paint/src/brush_tests.rs +++ b/crates/paint/src/brush_tests.rs @@ -284,6 +284,43 @@ fn pencil_1px_freehand_line_never_breaks_where_it_turns() { assert_eq!(reached.len(), painted.len(), "the line breaks along {path:?}"); } } + +#[test] +fn pencil_1px_curve_has_no_holes() { + // #9003: a curve drawn with the 1 px Pencil broke where it bent. Each segment steps from its + // own column, so a pixel could be skipped between the end of one segment and the next. + let b = BrushSettings { aliased: true, hardness: 1.0, size: 1.0, ..brush() }; + let curves: [Vec; 3] = [ + (0..70).map(|i| StrokePoint::new(6.0 + 0.75 * f64::from(i), 24.0 + 13.0 * (f64::from(i) / 7.0).sin(), 1.0)).collect(), + (0..60).map(|i| StrokePoint::new(30.0 + 20.0 * (f64::from(i) / 9.5).cos(), 24.0 + 14.0 * (f64::from(i) / 9.5).sin(), 1.0)).collect(), + vec![ + StrokePoint::new(4.3, 30.6, 1.0), + StrokePoint::new(9.8, 8.2, 1.0), + StrokePoint::new(15.1, 30.9, 1.0), + StrokePoint::new(27.6, 12.4, 1.0), + StrokePoint::new(33.2, 31.7, 1.0), + ], + ]; + for (k, pts) in curves.iter().enumerate() { + let s = paint(&b, pts, 64, 48); + let painted: std::collections::BTreeSet<(i32, i32)> = + (0..48).flat_map(|y| (0..64).map(move |x| (x, y))).filter(|&(x, y)| s.rgba(x, y)[3] > 0.0).collect(); + let Some(&start) = painted.iter().next() else { panic!("curve {k}: nothing painted") }; + let mut seen = std::collections::BTreeSet::from([start]); + let mut todo = vec![start]; + while let Some((x, y)) = todo.pop() { + for (dx, dy) in [(-1, -1), (0, -1), (1, -1), (-1, 0), (1, 0), (-1, 1), (0, 1), (1, 1)] { + let q = (x + dx, y + dy); + if painted.contains(&q) && seen.insert(q) { + todo.push(q); + } + } + } + let holes: Vec<_> = painted.difference(&seen).collect(); + assert!(holes.is_empty(), "curve {k}: the stroke breaks before {holes:?}"); + } +} + // ---------- spacing ---------- #[test] diff --git a/crates/paint/src/dynamics.rs b/crates/paint/src/dynamics.rs index 51962e59e32..9809e215ce3 100644 --- a/crates/paint/src/dynamics.rs +++ b/crates/paint/src/dynamics.rs @@ -283,8 +283,9 @@ pub struct PathWalker { /// Pixel-grid stepping for small aliased tips: the dab-centre offset inside a pixel (see /// [`PathWalker::pixel_grid`]). grid: Option, - /// The grid cell of the last pixel-grid step, so the next segment joins it (#8040). - cell: Option<(f64, f64)>, + /// The last pixel-grid step, on its grid cell, so the next segment joins it (#8040). Only pixel + /// steps set it: speed spacing and airbrush build-up leave their gaps on purpose. + cell: Option, } impl PathWalker { @@ -329,6 +330,7 @@ impl PathWalker { let (dm, dn) = (pm - am, pn - an); let n = (m1 - m0).abs(); if !(n.is_finite() && dn.is_finite()) || n > MAX_GRID_STEPS || dm == 0.0 { + self.cell = None; return false; } let dir = (m1 - m0).signum(); @@ -342,6 +344,7 @@ impl PathWalker { (q.x, q.y) = if steep { (cn, c) } else { (c, cn) }; self.bridge(&q, out); self.emit(q, out); + self.cell = Some(q); } true } @@ -350,11 +353,14 @@ impl PathWalker { /// samples its own line, so where a freehand stroke turns, the last pixel of one segment and /// the first of the next can sit two pixels apart, and the 1 px Pencil line breaks (#8040). fn bridge(&mut self, q: &StrokePoint, out: &mut impl FnMut(StepInput)) { - let Some((mut x, mut y)) = self.cell else { return }; + let Some(last) = self.cell else { return }; + let (mut x, mut y) = (last.x, last.y); + let n = (q.x - x).abs().max((q.y - y).abs()).round(); // Only a turn's small gap: a step cut off by the walker's budget is not filled in. - if (q.x - x).abs().max((q.y - y).abs()) > MAX_BRIDGE { + if n > MAX_BRIDGE { return; } + let mut i = 0.0; while (q.x - x).abs() > 1.5 || (q.y - y).abs() > 1.5 { if (q.x - x).abs() > 0.5 { x += (q.x - x).signum(); @@ -362,7 +368,9 @@ impl PathWalker { if (q.y - y).abs() > 0.5 { y += (q.y - y).signum(); } - self.emit(StrokePoint { x, y, ..*q }, out); + // Pressure, tilt and time run on across the filled-in cells too. + i += 1.0; + self.emit(StrokePoint { x, y, ..lerp_pt(&last, q, i / n) }, out); } } @@ -386,9 +394,6 @@ impl PathWalker { if self.step >= MAX_STEPS_PER_STROKE { return; } - if let Some(g) = self.grid { - self.cell = Some((grid_cell(point.x, g), grid_cell(point.y, g))); - } let s = StepInput { point, direction: self.dir, initial_direction: self.initial_dir.unwrap_or(self.dir), step: self.step }; self.step += 1; out(s); @@ -415,6 +420,9 @@ impl PathWalker { } } if let Some(f) = self.pending_first.take() { + if let Some(g) = self.grid { + self.cell = Some(StrokePoint { x: grid_cell(f.x, g), y: grid_cell(f.y, g), ..f }); + } self.emit_first(f, out); } if len > 1e-9 { @@ -438,6 +446,8 @@ impl PathWalker { } } Some(iv) => { + // The stroke moves on without pixel steps: a later pixel segment starts afresh. + self.cell = None; self.speed_acc += dt; let max_n = (len / MIN_SPEED_STEP).ceil().max(1.0) as usize; let mut n = 0; @@ -1168,6 +1178,56 @@ mod streaming_tests { } } +#[cfg(test)] +mod grid_bridge_tests { + use super::*; + + fn walk(mut walker: PathWalker, pts: &[StrokePoint]) -> Vec { + let mut steps = Vec::new(); + let mut out = |s: StepInput| steps.push(s.point); + for p in pts { + walker.push(*p, &|_: &StrokePoint| 1.0, &mut out); + } + walker.finish(&mut out); + steps + } + + fn at(x: f64, y: f64, time: f64) -> StrokePoint { + StrokePoint { time, ..StrokePoint::new(x, y, 1.0) } + } + + /// #9059 review: the bridge joins pixel steps only. Speed spacing leaves its gaps on purpose + /// (Spacing off: faster movement spreads the dabs out), so a pixel segment after one starts + /// afresh instead of filling the gap back in from the cell before it. + #[test] + fn a_pixel_segment_after_speed_spacing_leaves_its_gap() { + // A fast 8 px move in 60 ms: speed steps about every 1.07 px, the last (at 7.97) half a pixel + // short of the move's end. The segment after it has no timestamps, so it takes pixel steps. + let pts = [at(0.5, 0.5, 0.0), at(8.5, 0.5, 60.0), at(12.5, 0.5, 60.0)]; + let steps = walk(PathWalker::new(None).speed_spacing(SPEED_SPACING_MS).pixel_grid(0.5), &pts); + let xs: Vec = steps.iter().map(|p| p.x).collect(); + assert!(xs.iter().all(|x| !(8.0..9.4).contains(x)), "no cell filled in after the last speed step: {xs:?}"); + assert!(xs.windows(2).all(|w| w[1] > w[0]), "forward only: {xs:?}"); + assert!(steps.windows(2).all(|w| w[1].time >= w[0].time), "time runs on: {steps:?}"); + } + + /// #9059 review: a cell filled in at a bend takes the pressure and time between its two + /// neighbours, not the later one's, so pressure dynamics change across it. + #[test] + fn a_bridged_cell_blends_its_neighbours_dynamics() { + // Shallow, then steep: the steep segment's first step lands two cells from the last one. + let bend = [(0.3, 0.6), (10.6, 3.0), (13.0, 14.0)]; + let pts: Vec<_> = bend.iter().enumerate().map(|(i, &(x, y))| StrokePoint { pressure: 0.5 * i as f32, ..at(x, y, 100.0 * i as f64) }).collect(); + let steps = walk(PathWalker::new(None).pixel_grid(0.5), &pts); + let cell = |p: &StrokePoint| (grid_cell(p.x, 0.5), grid_cell(p.y, 0.5)); + for w in steps.windows(2) { + let ((ax, ay), (bx, by)) = (cell(&w[0]), cell(&w[1])); + assert!((bx - ax).abs() <= 1.0 && (by - ay).abs() <= 1.0, "8-connected: {:?} then {:?}", w[0], w[1]); + assert!(w[1].time > w[0].time && w[1].pressure > w[0].pressure, "dynamics run on: {:?} then {:?}", w[0], w[1]); + } + } +} + #[cfg(test)] #[path = "smoothing_lag_tests.rs"] mod smoothing_lag_tests; diff --git a/crates/ui-egui/src/panels/type_panels_ui/style_options.rs b/crates/ui-egui/src/panels/type_panels_ui/style_options.rs index 255a6aeddbf..538be23058c 100644 --- a/crates/ui-egui/src/panels/type_panels_ui/style_options.rs +++ b/crates/ui-egui/src/panels/type_panels_ui/style_options.rs @@ -7,7 +7,7 @@ use craft::text::ui::character::{ StyleOptionValues, StyleOptionsChange, TextAlign, TextStyleOptions, }; use craft::theme::Rgba; -use photocraft_doc::text::{CharStyle, ParagraphStyle}; +use photocraft_doc::text::{CharStyle, Digits, ParagraphStyle}; use serde_json::{Value, json}; use super::{color_picker, run}; @@ -157,9 +157,28 @@ pub(crate) fn character_values(style: &CharStyle) -> CharacterValues { values.strikethrough = Some(style.strikethrough); values.opentype = opentype; values.language = style.language.clone(); + values.digits = Some(digit_name(style.digits).to_string()); values } +/// The engine's `digits` name of a digit style. +pub(crate) fn digit_name(d: Digits) -> &'static str { + match d { + Digits::AsTyped => "asTyped", + Digits::Western => "western", + Digits::Contextual => "contextual", + Digits::Devanagari => "devanagari", + Digits::Bengali => "bengali", + Digits::Gurmukhi => "gurmukhi", + Digits::Gujarati => "gujarati", + Digits::Odia => "odia", + Digits::Tamil => "tamil", + Digits::Telugu => "telugu", + Digits::Kannada => "kannada", + Digits::Malayalam => "malayalam", + } +} + /// The values the Paragraph controls show for `style`. pub(crate) fn paragraph_values(style: &ParagraphStyle) -> ParagraphValues { use photocraft_doc::text::TextDirection as D; diff --git a/crates/ui-egui/src/tools/type_tool/character_panel_digits_tests.rs b/crates/ui-egui/src/tools/type_tool/character_panel_digits_tests.rs new file mode 100644 index 00000000000..1e35edee681 --- /dev/null +++ b/crates/ui-egui/src/tools/type_tool/character_panel_digits_tests.rs @@ -0,0 +1,68 @@ +//! The Character panel's Digits select (#10996): it shows the selected layer's digit style, and a pick restyles the +//! selected type layer's digits through the type command, in one history step. + +use egui::accesskit::Role; +use egui::vec2; +use egui_kittest::Harness; +use egui_kittest::kittest::Queryable; +use photocraft_doc::LayerId; +use photocraft_doc::text::Digits; +use serde_json::json; + +use crate::PhotocraftApp; +use crate::app::framework::BuildApp; + +const SELECT: &str = "Digits"; + +/// One selected type layer with digits in its text. +fn one_layer() -> (Box, LayerId) { + let mut app = PhotocraftApp::new(photocraft_engine::Session::new(), crate::Services::default()); + app.run("file.new", json!({"width": 800, "height": 600})).unwrap(); + app.sync_views(); + app.ui.tool = crate::state::Tool::Type; + let made = app.run("type.create", json!({"text": "Room 42", "font": "Inter", "size": 24, "x": 40, "y": 80})).unwrap(); + let id = LayerId(made["layer"].as_u64().unwrap()); + app.run("layer.select", json!({"layer": id.0, "mode": "replace"})).unwrap(); + (app, id) +} + +fn harness(app: Box) -> Harness<'static, Box> { + // Wait for the font scan: while it runs the panels repaint every 100 ms and `Harness::run` gives up. + let _ = photocraft_text::shared(); + let mut h = Harness::builder().with_context(app.ctx().clone()).with_size(vec2(760.0, 1200.0)).with_max_steps(16).build_app( + move |ui, app: &mut PhotocraftApp| { + ui.set_width(340.0); + super::character_panel(app, ui, false); + }, + app, + ); + h.run_steps(4); + h +} + +fn digits(app: &PhotocraftApp, id: LayerId) -> Vec { + let text = super::super::text_layer(&app.session.active().unwrap().doc, id).unwrap(); + text.char_runs().into_iter().map(|r| r.style.digits).collect() +} + +fn shown(h: &Harness<'static, Box>) -> String { + h.get_by_role_and_label(Role::ComboBox, SELECT).value().unwrap_or_default() +} + +#[test] +fn a_digits_pick_restyles_the_selected_layer_in_one_history_step() { + let (app, id) = one_layer(); + let before = digits(&app, id); + let steps = app.session.active().unwrap().history.entries().len(); + let mut h = harness(app); + let was = shown(&h); + h.get_by_role_and_label(Role::ComboBox, SELECT).click(); + h.run(); + h.get_by_role_and_label(Role::ListBoxOption, "Devanagari").click(); + h.run(); + let after = digits(h.state(), id); + assert_ne!(after, before, "the pick changed the layer's digits"); + assert!(after.iter().all(|d| *d == Digits::Devanagari), "every run takes the picked style: {after:?}"); + assert_eq!(h.state().session.active().unwrap().history.entries().len(), steps + 1, "one history step"); + assert_ne!(shown(&h), was, "the select shows the new style"); +} diff --git a/crates/ui-egui/src/tools/type_tool/defaults.rs b/crates/ui-egui/src/tools/type_tool/defaults.rs index 06b16782653..568d2cad6cb 100644 --- a/crates/ui-egui/src/tools/type_tool/defaults.rs +++ b/crates/ui-egui/src/tools/type_tool/defaults.rs @@ -240,6 +240,8 @@ pub(super) fn apply(app: &mut PhotocraftApp, props: serde_json::Value, coalesce: if insertion_style::set_font(app, &props) { return; } + // A font chosen at the caret and not yet typed outlives another character change there (#10996). + let kept = insertion_style::pending(app).cloned(); app.ui.type_insertion_style = None; let Some(mut p) = formatting_params(app) else { apply_defaults(app, &props); @@ -253,7 +255,11 @@ pub(super) fn apply(app: &mut PhotocraftApp, props: serde_json::Value, coalesce: if let Some(key) = app.ui.text_edit.as_ref().map(|ed| ed.session.clone()).or(coalesce) { p["coalesce"] = json!(key); } - let _ = app.run("type.setStyle", p); + if app.run("type.setStyle", p).is_ok() + && let Some(kept) = kept + { + insertion_style::rebase(app, kept, &props); + } } /// Open the shared Color Picker with a snapshot of the text target. Sampling or cancelling diff --git a/crates/ui-egui/src/tools/type_tool/font_commit_tests.rs b/crates/ui-egui/src/tools/type_tool/font_commit_tests.rs index 9d1c96e054d..81fa78c3711 100644 --- a/crates/ui-egui/src/tools/type_tool/font_commit_tests.rs +++ b/crates/ui-egui/src/tools/type_tool/font_commit_tests.rs @@ -385,3 +385,52 @@ fn an_existing_empty_layer_keeps_its_font_when_committed() { assert_eq!(families(&saved(&h, id)), [FONTS[1]]); } } + +/// A font chosen at the caret survives a Digits change there before typing (#10996): the typed digit takes the +/// chosen font and the picked digit style. +#[test] +fn a_digits_change_at_the_caret_keeps_the_chosen_typing_font() { + let (mut h, id) = fixture(0, "abcdef"); + select(&mut h, [3, 3]); + h.run(); + choose(&mut h, FONTS[1], "enter"); + assert!(super::insertion_style::pending(h.state()).is_some(), "a pending font at the caret"); + super::apply(h.state_mut(), json!({"digits": "devanagari"}), None); + assert!(super::insertion_style::pending(h.state()).is_some(), "the Digits change keeps the pending font"); + super::host::type_text(h.state_mut(), "5"); + h.run(); + assert_eq!(families(&saved(&h, id))[3], FONTS[1], "the typed digit takes the chosen font"); + let t = layer(&h.state().session.active().unwrap().doc, id); + let mut offset = 0; + let digits = t.char_runs().into_iter().find_map(|r| { + offset += r.len; + (offset > 3).then_some(r.style.digits) + }); + assert_eq!(digits, Some(photocraft_doc::text::Digits::Devanagari), "the typed digit takes the picked digit style"); +} + +/// An axis change at the caret after a font was chosen there wins over the chosen font's saved axes; the axes it does +/// not set keep their chosen values. +#[test] +fn an_axis_change_at_the_caret_keeps_its_value_with_the_chosen_typing_font() { + let (mut h, id) = fixture(0, "abcdef"); + h.state_mut().run("type.setStyle", json!({"layer": id.0, "variations": {"wght": 650, "wdth": 95}})).unwrap(); + select(&mut h, [3, 3]); + h.run(); + choose(&mut h, FONTS[1], "enter"); + super::apply(h.state_mut(), json!({"variations": {"wdth": 110}}), None); + super::host::type_text(h.state_mut(), "X"); + h.run(); + assert_eq!(families(&saved(&h, id))[3], FONTS[1], "the typed letter takes the chosen font"); + let mut offset = 0; + let axes = layer(&h.state().session.active().unwrap().doc, id) + .char_runs() + .into_iter() + .find_map(|r| { + offset += r.len; + (offset > 3).then_some(r.style.variations) + }) + .unwrap(); + assert!(axes.iter().any(|v| v.axis == "wdth" && v.value == 110.0), "the changed axis holds: {axes:?}"); + assert!(axes.iter().any(|v| v.axis == "wght" && v.value == 650.0), "an axis the change left keeps its value: {axes:?}"); +} diff --git a/crates/ui-egui/src/tools/type_tool/font_picker_tests.rs b/crates/ui-egui/src/tools/type_tool/font_picker_tests.rs index 3cfabae49fb..d2b06737823 100644 --- a/crates/ui-egui/src/tools/type_tool/font_picker_tests.rs +++ b/crates/ui-egui/src/tools/type_tool/font_picker_tests.rs @@ -233,3 +233,22 @@ fn hovering_a_font_adds_no_history_step_and_a_pick_adds_one() { assert_eq!(layer_font(h.state()), "JetBrains Mono"); assert_eq!(history_len(h.state()), before + 1, "the pick is one history step"); } + +/// The toolbar's Script select offers the Indic scripts (#10996); picking Devanagari narrows the family list and is +/// kept as the pickers' filter. Fonts come from the host, so the test checks only the bundled Latin-only Inter. +#[test] +fn the_family_list_filters_by_an_indic_script() { + let mut h = bar_harness(app_with_layer()); + h.run_steps(4); + assert_eq!(h.state().ui.font_filters.script, None, "no script filter at first"); + field(&h).click(); + h.run(); + let inter = |h: &Harness<'static, Box>| h.query_by_role_and_label(Role::TreeItem, "Inter").is_some(); + assert!(inter(&h), "the layer's Latin-only family is listed before the filter"); + h.get_by_role_and_label(Role::ComboBox, "Script").click(); + h.run(); + h.get_by_label("Devanagari").click(); + h.run(); + assert_eq!(h.state().ui.font_filters.script, Some(craft::font_manager::picker::FontScript::Devanagari)); + assert!(!inter(&h), "a Latin-only family leaves the Devanagari list"); +} diff --git a/crates/ui-egui/src/tools/type_tool/fonts.rs b/crates/ui-egui/src/tools/type_tool/fonts.rs index 034d72a3f8d..db04c76ced3 100644 --- a/crates/ui-egui/src/tools/type_tool/fonts.rs +++ b/crates/ui-egui/src/tools/type_tool/fonts.rs @@ -1,4 +1,4 @@ -use craft::font_manager::picker::{FontFilters, FontPickerSettings, FontPreviewSize}; +use craft::font_manager::picker::{FontFilters, FontPickerSettings, FontPreviewSize, FontScript}; use craft::text::ui::character::FontPickerSource; use craft::ui::contract::Bind; use photocraft_engine::prefs::FontPreview; @@ -95,6 +95,23 @@ pub(super) fn preview_text(app: &PhotocraftApp) -> Option { (!line.is_empty()).then_some(line) } +/// The scripts the font pickers' script row offers: Latin, the Indic scripts, then the East Asian ones and Thai. +const PICKER_SCRIPTS: [FontScript; 13] = [ + FontScript::Latin, + FontScript::Devanagari, + FontScript::Bengali, + FontScript::Gurmukhi, + FontScript::Gujarati, + FontScript::Odia, + FontScript::Tamil, + FontScript::Telugu, + FontScript::Kannada, + FontScript::Malayalam, + FontScript::EastAsian, + FontScript::Japanese, + FontScript::Thai, +]; + /// The font picker's most recent families the settings may hold, whatever the preference says. const MAX_RECENT_FONTS: usize = 50; @@ -137,7 +154,11 @@ impl FontSourceState { /// The picker's source over this state. pub(crate) fn source(&mut self) -> FontPickerSource<'_> { let catalog = photocraft_text::fonts::catalog(); - let mut source = FontPickerSource::new(catalog).settings(Bind::bound(&mut self.settings)).filters(Bind::bound(&mut self.filters)).served(&self.served); + let mut source = FontPickerSource::new(catalog) + .settings(Bind::bound(&mut self.settings)) + .filters(Bind::bound(&mut self.filters)) + .served(&self.served) + .scripts(&PICKER_SCRIPTS); if let Some(text) = self.preview_text.as_deref() { source = source.preview_text(text); } diff --git a/crates/ui-egui/src/tools/type_tool/insertion_style.rs b/crates/ui-egui/src/tools/type_tool/insertion_style.rs index 05a2624c99a..aa6e023bd0b 100644 --- a/crates/ui-egui/src/tools/type_tool/insertion_style.rs +++ b/crates/ui-egui/src/tools/type_tool/insertion_style.rs @@ -49,6 +49,33 @@ pub(super) fn set_font(app: &mut PhotocraftApp, props: &serde_json::Value) -> bo true } +/// Keeps the caret's pending font `kept` after another character change at the same caret: the style the command +/// stored there (in the layer's own units) with the chosen font on it, for the new revision, so the next typed text +/// still takes the chosen font and the change. +pub(super) fn rebase(app: &mut PhotocraftApp, mut kept: TypeInsertionStyle, props: &serde_json::Value) { + let Some((mut style, _)) = styles_at(app) else { return }; + let Some(st) = app.session.active() else { return }; + let chosen = &kept.style; + style.font_family.clone_from(&chosen.font_family); + style.weight = chosen.weight; + style.italic = chosen.italic; + style.postscript_name.clone_from(&chosen.postscript_name); + style.variations.clone_from(&chosen.variations); + // An axis the change set itself wins over the chosen font's saved value; the others stay as chosen. + if let Some(axes) = props.get("variations").and_then(serde_json::Value::as_object) { + for (axis, value) in axes { + let Some(value) = value.as_f64() else { continue }; + match style.variations.iter_mut().find(|v| v.axis == *axis) { + Some(v) => v.value = value as f32, + None => style.variations.push(photocraft_doc::text::FontVariation { axis: axis.clone(), value: value as f32 }), + } + } + } + kept.style = style; + kept.revision = st.revision; + app.ui.type_insertion_style = Some(kept); +} + /// How many characters `text` adds once the engine stores it: a CRLF pair becomes one `\n` (a lone CR is one /// character either way), so a pasted Windows line break moves the caret by one, not two. pub(super) fn stored_chars(text: &str) -> usize { diff --git a/crates/ui-egui/src/tools/type_tool/panel.rs b/crates/ui-egui/src/tools/type_tool/panel.rs index e9eb1a7d1f0..32cb870607b 100644 --- a/crates/ui-egui/src/tools/type_tool/panel.rs +++ b/crates/ui-egui/src/tools/type_tool/panel.rs @@ -78,7 +78,8 @@ fn character_controls(app: &mut PhotocraftApp, ui: &mut egui::Ui, unit: DocUnit, let styles = values::style_names(app, &shown); let face = values::face_axes(app); let mut font_state = fonts::font_state(app); - let mut controls = CharacterControls::new(tl!("Character"), &shown, &families, &styles).unit(unit); + let digits = values::digit_entries(); + let mut controls = CharacterControls::new(tl!("Character"), &shown, &families, &styles).unit(unit).digits(&digits); controls = controls.font_picker(font_state.source()); if let Some(face) = &face { controls = controls.axes(face.view()); @@ -147,6 +148,10 @@ fn type_options(app: &mut PhotocraftApp, ui: &mut egui::Ui) { }); } +#[cfg(test)] +#[path = "character_panel_digits_tests.rs"] +mod character_panel_digits_tests; + #[cfg(test)] #[path = "character_panel_anti_alias_tests.rs"] mod character_panel_anti_alias_tests; diff --git a/crates/ui-egui/src/tools/type_tool/values.rs b/crates/ui-egui/src/tools/type_tool/values.rs index c9bdb4fe9e5..6653f9db7d4 100644 --- a/crates/ui-egui/src/tools/type_tool/values.rs +++ b/crates/ui-egui/src/tools/type_tool/values.rs @@ -16,14 +16,14 @@ use craft::text::ui::character::{ use craft::text::ui::type_bar::TypeBarChange; use craft::text::ui::type_options::{TextAntiAlias, TextOrientation}; use craft::ui::runtime::env::UnitKind; -use photocraft_doc::text::{CharStyle, ParagraphStyle}; +use photocraft_doc::text::{CharStyle, Digits, ParagraphStyle}; use super::defaults::{apply, default_styles, formatting_params, open_color_picker, shown_scale, target, target_doc, target_text}; use super::fonts; use super::options_bar::{kerning_at, styles_at}; use super::panel::{OPENTYPE_BUTTONS, toggle_opentype}; use super::{LayerId, PhotocraftApp, byte_of, json, text_layer}; -use crate::panels::type_panels_ui::style_options::{character_values as style_character_values, paragraph_values as style_paragraph_values}; +use crate::panels::type_panels_ui::style_options::{character_values as style_character_values, digit_name, paragraph_values as style_paragraph_values}; /// The unit the type controls show lengths in (Preferences ▸ Units & Rulers ▸ Type); pixels follow the document's /// resolution. Values stay in points. @@ -93,6 +93,27 @@ fn runs_at_target(app: &PhotocraftApp) -> Option<(Vec, Vec Vec<(String, String)> { + [ + (Digits::AsTyped, tl!("As Typed")), + (Digits::Western, tl!("Western")), + (Digits::Contextual, tl!("Contextual")), + (Digits::Devanagari, tl!("Devanagari")), + (Digits::Bengali, tl!("Bengali")), + (Digits::Gurmukhi, tl!("Gurmukhi")), + (Digits::Gujarati, tl!("Gujarati")), + (Digits::Odia, tl!("Odia")), + (Digits::Tamil, tl!("Tamil")), + (Digits::Telugu, tl!("Telugu")), + (Digits::Kannada, tl!("Kannada")), + (Digits::Malayalam, tl!("Malayalam")), + ] + .into_iter() + .map(|(d, label)| (digit_name(d).to_string(), label.to_string())) + .collect() +} + /// The character values at the target: equal values shown, differing ones mixed. Sizes show as the layer appears /// (a 12 pt layer scaled 200 % reads 24 pt). pub(crate) fn character_values(app: &PhotocraftApp) -> CharacterValues { @@ -305,6 +326,7 @@ fn character_step(change: &CharacterChange) -> Option { CharacterChange::Strikethrough(on) => json!({"strikethrough": on}), CharacterChange::OpenType { tag, on, .. } => return Some(Step::OpenType { tag, on: *on }), CharacterChange::Language(tag) => json!({"language": tag}), + CharacterChange::Digits(tag) => json!({"digits": tag}), CharacterChange::Axes(axes) => { let map: serde_json::Map = axes.iter().map(|(tag, v)| (String::from_utf8_lossy(tag).trim().to_string(), json!(v))).collect(); diff --git a/docs/development.md b/docs/development.md index d9d8fd0adbe..309de5bb11b 100644 --- a/docs/development.md +++ b/docs/development.md @@ -152,7 +152,7 @@ CRAFT_I18N_DIR="$PWD/../craft-i18n" cargo run --release -p photocraft ## One instance per user -On Windows and Linux the first PhotoCraft holds an exclusive lock on `instance.lock` in the config directory and listens on a loopback port named in `instance.json` (with a fresh 256-bit token; the file is 0600 on Unix). Inside a Flatpak it listens on a Unix socket instead, `$XDG_RUNTIME_DIR/app//instance.sock` (0600), because Flatpak isolates each sandbox's network namespace, loopback included, unless the app is granted `--share=network`, while that runtime directory is shared by all sandboxes of the app (#1540); the lock, token and protocol are the same. A later launch hands its file arguments there and exits, so files opened from Explorer or a file manager become tabs in the running window (#3708). The primary answers `ok` only once its UI has taken the files; a launch that gets anything else (the primary is starting, hung or closing) keeps retrying the lock for up to 10 s, becoming the primary itself once the old one lets go, and then starts a separate instance, so a file is never acknowledged and lost. When the event loop ends (and before the CPU-compatibility relaunch) the primary refuses new files and frees the lock. It applies only with the per-user settings folder: a portable copy (`PhotoCraftData` beside the executable) or `PHOTOCRAFT_CONFIG_DIR` may be shared between users, so those launches run separately. So do `--new-instance` (or `PHOTOCRAFT_NEW_INSTANCE=1`), every `--control` launch, and launches given a per-process option (`--safe-gpu`, `--present-mode`, `--frame-latency`, `--stroke-trace`, `--in-window-menus`, `--automation-*-root`). A `cargo run` while an installed PhotoCraft is running forwards to it: pass `--new-instance` or set `PHOTOCRAFT_CONFIG_DIR`. macOS gets the same behaviour from LaunchServices (`apple_events.rs`). On native Wayland the running window can't bring itself forward (that takes the launcher's `XDG_ACTIVATION_TOKEN`, and winit 0.30 can't activate an existing window with one), so it asks for attention instead and the taskbar highlights it; X11, XWayland and Windows bring it to the front. Code: `apps/photocraft/src/single_instance.rs`. +On Windows and Linux the first PhotoCraft holds an exclusive lock on `instance.lock` in the config directory (0600 on Unix, narrowed on the next start if an earlier version left it readable; the directory is 0700 when single-instance creates it) and listens on a loopback port named in `instance.json` (with a fresh 256-bit token; the file is 0600 on Unix). Inside a Flatpak it listens on a Unix socket instead, `$XDG_RUNTIME_DIR/app//instance.sock` (0600), because Flatpak isolates each sandbox's network namespace, loopback included, unless the app is granted `--share=network`, while that runtime directory is shared by all sandboxes of the app (#1540); the lock, token and protocol are the same. A later launch hands its file arguments there and exits, so files opened from Explorer or a file manager become tabs in the running window (#3708). The primary answers `ok` only once its UI has taken the files; a launch that gets anything else (the primary is starting, hung or closing) keeps retrying the lock for up to 10 s, becoming the primary itself once the old one lets go, and then starts a separate instance, so a file is never acknowledged and lost. When the event loop ends (and before the CPU-compatibility relaunch) the primary refuses new files, removes its `instance.json` (only while it still names this process) and then frees the lock. It applies only with the per-user settings folder: a portable copy (`PhotoCraftData` beside the executable) or `PHOTOCRAFT_CONFIG_DIR` may be shared between users, so those launches run separately. So do `--new-instance` (or `PHOTOCRAFT_NEW_INSTANCE=1`), every `--control` launch, and launches given a per-process option (`--safe-gpu`, `--present-mode`, `--frame-latency`, `--stroke-trace`, `--in-window-menus`, `--automation-*-root`). The CPU-compatibility relaunch is the exception: the `--safe-gpu` it adds itself (it also sets `PHOTOCRAFT_GPU_STARTUP_FAILURE`) doesn't count, so the relaunch takes over as the primary from the launch that failed; a `--safe-gpu` a person passes still runs separately. A `cargo run` while an installed PhotoCraft is running forwards to it: pass `--new-instance` or set `PHOTOCRAFT_CONFIG_DIR`. macOS gets the same behaviour from LaunchServices (`apple_events.rs`). On native Wayland the running window can't bring itself forward (that takes the launcher's `XDG_ACTIVATION_TOKEN`, and winit 0.30 can't activate an existing window with one), so it asks for attention instead and the taskbar highlights it; X11, XWayland and Windows bring it to the front. Code: `apps/photocraft/src/single_instance.rs`. ## Graphics startup and device loss diff --git a/docs/scorecard.md b/docs/scorecard.md index e984cf914e7..e3bc83e3aa3 100644 --- a/docs/scorecard.md +++ b/docs/scorecard.md @@ -10,7 +10,7 @@ Generated by `cargo xtask scorecard` from `perf/budgets.toml`, `perf/baseline.js | [File compatibility](#file-compatibility) | 11 | 14 | 2 | io corpus: oracle ≥ 148/170, round trip ≥ 169/170; psd-tools corpus: oracle ≥ 249/309, round trip ≥ 308/309; photoshop oracles: oracle ≥ 190/258, round trip ≥ 258/258 | | [Tools](#tools) | 36 | 9 | 0 | | | [Workspace and UI](#workspace-and-ui) | 15 | 6 | 2 | settings that do nothing: 9 of 204 (target 0) | -| [Type](#type) | 5 | 6 | 0 | | +| [Type](#type) | 6 | 6 | 0 | | | [Automation](#automation) | 6 | 4 | 2 | 663 of 663 menu items live (100.0%) | | [Reliability](#reliability) | 5 | 2 | 0 | never-crash lints on 28 of 28 crates; panic_hunt present | | [Distribution](#distribution) | 5 | 5 | 1 | | @@ -261,7 +261,8 @@ Unread: `general.color_picker`, `workspace.auto_show_hidden_panels`, `workspace. | TYPE-218-8 | Text editing: select all, double/triple/quadruple-click selection, paste, with tests | done | [#218](https://github.com/storytold/photocraft/issues/218) | Like Photoshop, 2 clicks select the word, 3 the laid-out line (a column in vertical type), 4 the paragraph up to the hard return, 5 all text, and the next quick click starts over (#3493; type_tool.rs next_click_count, click_selection, multi_click). Tested through real canvas clicks in point, paragraph and vertical type, with paste replacing the selection and Cmd+A selecting all (type_tool_tests.rs multi_click_selects_word_line_paragraph_and_all_in_point_text, multi_click_separates_wrapped_lines_from_paragraphs, click_counts_cycle_and_restart, click_selection_without_layout_and_on_hostile_input, multi_click_without_a_session_does_nothing) | | TYPE-218-9 | Distort/Perspective/Warp on live type as in Photoshop (was: offer 'Rasterize and continue?'; Photoshop doesn't prompt) | done | [#218](https://github.com/storytold/photocraft/issues/218) | Photoshop 2026 prompts for none of these: Edit › Transform › Warp on live type stays enabled with no rasterize prompt and offers only the warp styles (the mesh can't be dragged), so the type stays editable; Distort, Perspective and the split warps are greyed. PhotoCraft does the same: Warp on type commits the layer's Warp Text in one step (transform_tool.rs enter_type_warp, warp_cmds.rs warp_type_layer, #3004; warp_on_type_takes_a_style_and_keeps_the_type_editable), Distort/Perspective greyed (enable_rules.rs, #2701) | | TYPE-218-10 | Area type: Type tool click inside a closed path or shape wraps text inside it, holes and dents included, PSD round trip | partial | [#218](https://github.com/storytold/photocraft/issues/218) | TextShape::Area (doc text.rs) laid out line by line into the spans the path leaves (text area.rs, layout.rs break_area), type.fillPath (engine type_area_cmds.rs), released to box text by type.detachFromPath, area/path cursors and click-to-place (ui-egui type_tool.rs path_target), .pcraft round trip. Missing: PSD area type (saves as paragraph text over the path's bounds, with an export warning); mixed type sizes in one area paragraph space at its largest line; area type takes paths of at most 4096 anchors: beyond that a Type tool click makes point text (the pointer shows the plain I-beam), and type.fillPath refuses the path with "the path has too many anchor points" (type.attachToPath still takes a subpath of up to 100,000 anchors); a word too wide for every span in the shape overflows its span (box text breaks it at the edge, #6694); the first line starts about 0.24 em lower than in a text box of the same size; Photoshop area type in a PSD opens as box text; the area path has no handles to edit it after the type is placed | -| TYPE-10996-1 | Digit style: digits drawn as typed, Western, by the script of the letters before them, or in an Indic script (Devanagari, Bengali, Gurmukhi, Gujarati, Odia, Tamil, Telugu, Kannada, Malayalam) | partial | [#10996](https://github.com/storytold/photocraft/issues/10996) | CharStyle `digits` (doc text.rs), drawn in shaping (text digits.rs) while the layer text keeps the typed digits; set through the type commands' `digits` key. No Character panel control yet (needs the shared panel in craft-libs); Arabic and Persian digits are #6685; not saved in PSD | +| TYPE-10996-2 | Font menu filter by script, with the Indic scripts (Devanagari, Bengali, Gurmukhi, Gujarati, Odia, Tamil, Telugu, Kannada, Malayalam) beside Latin, East Asian, Japanese and Thai | done | [#10996](https://github.com/storytold/photocraft/issues/10996) | The font pickers (options bar, Character panel, Style Options) offer the script row (ui-egui type_tool fonts.rs); coverage is read from the cmap in craft-font-manager. Arabic and Hebrew are not offered yet | +| TYPE-10996-1 | Digit style: digits drawn as typed, Western, by the script of the letters before them, or in an Indic script (Devanagari, Bengali, Gurmukhi, Gujarati, Odia, Tamil, Telugu, Kannada, Malayalam) | partial | [#10996](https://github.com/storytold/photocraft/issues/10996) | CharStyle `digits` (doc text.rs), drawn in shaping (text digits.rs) while the layer text keeps the typed digits; set through the type commands' `digits` key. The Character panel's Digits select sets it; Arabic and Persian digits are #6685; not saved in PSD | ## Automation diff --git a/scorecard/type.toml b/scorecard/type.toml index 579e92e5715..6a0c910199a 100644 --- a/scorecard/type.toml +++ b/scorecard/type.toml @@ -74,9 +74,16 @@ status = "partial" issue = 218 note = "TextShape::Area (doc text.rs) laid out line by line into the spans the path leaves (text area.rs, layout.rs break_area), type.fillPath (engine type_area_cmds.rs), released to box text by type.detachFromPath, area/path cursors and click-to-place (ui-egui type_tool.rs path_target), .pcraft round trip. Missing: PSD area type (saves as paragraph text over the path's bounds, with an export warning); mixed type sizes in one area paragraph space at its largest line; area type takes paths of at most 4096 anchors: beyond that a Type tool click makes point text (the pointer shows the plain I-beam), and type.fillPath refuses the path with \"the path has too many anchor points\" (type.attachToPath still takes a subpath of up to 100,000 anchors); a word too wide for every span in the shape overflows its span (box text breaks it at the edge, #6694); the first line starts about 0.24 em lower than in a text box of the same size; Photoshop area type in a PSD opens as box text; the area path has no handles to edit it after the type is placed" +[[item]] +id = "TYPE-10996-2" +target = "Font menu filter by script, with the Indic scripts (Devanagari, Bengali, Gurmukhi, Gujarati, Odia, Tamil, Telugu, Kannada, Malayalam) beside Latin, East Asian, Japanese and Thai" +status = "done" +issue = 10996 +note = "The font pickers (options bar, Character panel, Style Options) offer the script row (ui-egui type_tool fonts.rs); coverage is read from the cmap in craft-font-manager. Arabic and Hebrew are not offered yet" + [[item]] id = "TYPE-10996-1" target = "Digit style: digits drawn as typed, Western, by the script of the letters before them, or in an Indic script (Devanagari, Bengali, Gurmukhi, Gujarati, Odia, Tamil, Telugu, Kannada, Malayalam)" status = "partial" issue = 10996 -note = "CharStyle `digits` (doc text.rs), drawn in shaping (text digits.rs) while the layer text keeps the typed digits; set through the type commands' `digits` key. No Character panel control yet (needs the shared panel in craft-libs); Arabic and Persian digits are #6685; not saved in PSD" +note = "CharStyle `digits` (doc text.rs), drawn in shaping (text digits.rs) while the layer text keeps the typed digits; set through the type commands' `digits` key. The Character panel's Digits select sets it; Arabic and Persian digits are #6685; not saved in PSD"