From 2e43ddd557fb3be58cf700f690e4e0ea4aed9261 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Thu, 3 Dec 2026 13:04:54 -0800 Subject: [PATCH 1/2] Type: an unfinished Character value stays with the text it was typed for A value typed into a number field of the Character panel or of the Properties panel's Character section and not yet committed (for example "3+" in Font size, Leading, Tracking or Kerning) stayed in the field when other text with the same value was selected, and Enter then committed it to that text. The controls now pass an edit target to CharacterControls::edit_target: the document, its File > Revert and Undo or Redo counts, and the text the change goes to, which is the Type tool's range or story (by its own offsets, so a caret position counts for Kerning) or else the selected stories. When the target changes, every number field of the rows drops the unfinished value. The craft-libs pin moves to the commit that adds CharacterControls::edit_target. --- Cargo.lock | 176 ++++++------- Cargo.toml | 78 +++--- apps/vectorcraft-web/Cargo.toml | 2 +- crates/doc/src/selection.rs | 2 +- crates/ui-egui/src/panels/character.rs | 22 +- crates/ui-egui/src/panels/character/tests.rs | 256 +++++++++++++++++++ xtask/src/pdf_deps.rs | 2 +- 7 files changed, 406 insertions(+), 132 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 75c87011b4..297380c1cd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1231,7 +1231,7 @@ dependencies = [ [[package]] name = "craft" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "craft-automation", "craft-behavior", @@ -1272,7 +1272,7 @@ dependencies = [ [[package]] name = "craft-affinity" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "crc32fast", "flate2", @@ -1283,7 +1283,7 @@ dependencies = [ [[package]] name = "craft-appkit" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "block2 0.6.2", "objc2 0.6.5", @@ -1295,7 +1295,7 @@ dependencies = [ [[package]] name = "craft-atomic" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "rustix 1.1.6", ] @@ -1303,7 +1303,7 @@ dependencies = [ [[package]] name = "craft-automation" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "base64 0.23.1", "craft-behavior", @@ -1328,7 +1328,7 @@ dependencies = [ [[package]] name = "craft-behavior" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "accesskit", "bitflags 2.13.2", @@ -1346,7 +1346,7 @@ dependencies = [ [[package]] name = "craft-browse" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "craft-behavior", "craft-docpath", @@ -1364,7 +1364,7 @@ dependencies = [ [[package]] name = "craft-cdr" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "crc32fast", "flate2", @@ -1373,7 +1373,7 @@ dependencies = [ [[package]] name = "craft-cloud-ui" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "egui", ] @@ -1381,7 +1381,7 @@ dependencies = [ [[package]] name = "craft-cms" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "md-5", "rayon", @@ -1390,12 +1390,12 @@ dependencies = [ [[package]] name = "craft-codepage" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" [[package]] name = "craft-color-ui" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "craft-behavior", "craft-cms", @@ -1415,7 +1415,7 @@ dependencies = [ [[package]] name = "craft-control" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "craft-control-protocol", "craft-platform", @@ -1426,7 +1426,7 @@ dependencies = [ [[package]] name = "craft-control-protocol" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "getrandom 0.3.4", "serde_json", @@ -1436,7 +1436,7 @@ dependencies = [ [[package]] name = "craft-dds" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "rayon", ] @@ -1444,7 +1444,7 @@ dependencies = [ [[package]] name = "craft-dialogs" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "block2 0.6.2", "craft-appkit", @@ -1470,7 +1470,7 @@ dependencies = [ [[package]] name = "craft-doc" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "blake3", "craft-ecproj-format", @@ -1486,7 +1486,7 @@ dependencies = [ [[package]] name = "craft-docpath" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "serde", ] @@ -1494,7 +1494,7 @@ dependencies = [ [[package]] name = "craft-draw" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "craft-behavior", "craft-color-ui", @@ -1513,7 +1513,7 @@ dependencies = [ [[package]] name = "craft-dxf" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "craft-codepage", "encoding_rs", @@ -1525,7 +1525,7 @@ dependencies = [ [[package]] name = "craft-ecproj-format" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "serde", "serde_json", @@ -1535,12 +1535,12 @@ dependencies = [ [[package]] name = "craft-eps" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" [[package]] name = "craft-font-catalog" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "fontique", "harfrust 0.13.3", @@ -1555,7 +1555,7 @@ dependencies = [ [[package]] name = "craft-font-manager" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "craft-behavior", "craft-font-catalog", @@ -1574,7 +1574,7 @@ dependencies = [ [[package]] name = "craft-font-os-windows" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "windows-registry", "windows-sys 0.61.2", @@ -1583,7 +1583,7 @@ dependencies = [ [[package]] name = "craft-font-store" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "cap-primitives", "craft-atomic", @@ -1606,12 +1606,12 @@ dependencies = [ [[package]] name = "craft-fonts-build" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" [[package]] name = "craft-gif" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "gif", ] @@ -1619,7 +1619,7 @@ dependencies = [ [[package]] name = "craft-gzip" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "flate2", ] @@ -1627,7 +1627,7 @@ dependencies = [ [[package]] name = "craft-host" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "bitflags 2.13.2", "craft-i18n", @@ -1640,7 +1640,7 @@ dependencies = [ [[package]] name = "craft-i18n" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "brotli 9.1.3", "brotli-decompressor 6.3.2", @@ -1670,7 +1670,7 @@ dependencies = [ [[package]] name = "craft-image-codecs" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "craft-dds", "craft-jpeg", @@ -1697,7 +1697,7 @@ dependencies = [ [[package]] name = "craft-imaging" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "craft-behavior", "craft-color-ui", @@ -1715,7 +1715,7 @@ dependencies = [ [[package]] name = "craft-jpeg" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "thiserror 2.0.21", ] @@ -1723,7 +1723,7 @@ dependencies = [ [[package]] name = "craft-jxl" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "brotli-decompressor 5.0.3", "jixel", @@ -1734,7 +1734,7 @@ dependencies = [ [[package]] name = "craft-keymap" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "craft-host", "craft-i18n", @@ -1749,7 +1749,7 @@ dependencies = [ [[package]] name = "craft-layers" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "craft-behavior", "craft-i18n", @@ -1763,7 +1763,7 @@ dependencies = [ [[package]] name = "craft-menu" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "craft-behavior", "craft-host", @@ -1781,7 +1781,7 @@ dependencies = [ [[package]] name = "craft-metadata" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "brotli-decompressor 6.3.2", "chrono", @@ -1793,7 +1793,7 @@ dependencies = [ [[package]] name = "craft-metafile" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "encoding_rs", "image", @@ -1804,7 +1804,7 @@ dependencies = [ [[package]] name = "craft-mime" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "chrono", "craft-codepage", @@ -1814,7 +1814,7 @@ dependencies = [ [[package]] name = "craft-nightly" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "uds_windows", "winsafe", @@ -1823,7 +1823,7 @@ dependencies = [ [[package]] name = "craft-pages" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "craft-behavior", "craft-keymap", @@ -1839,7 +1839,7 @@ dependencies = [ [[package]] name = "craft-pbr" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "craft-texture", "thiserror 2.0.21", @@ -1848,7 +1848,7 @@ dependencies = [ [[package]] name = "craft-pcraft-format" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "flate2", "serde", @@ -1859,7 +1859,7 @@ dependencies = [ [[package]] name = "craft-pdf" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "hayro-interpret", "hayro-syntax", @@ -1871,7 +1871,7 @@ dependencies = [ [[package]] name = "craft-platform" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "async-channel", "async-io", @@ -1904,7 +1904,7 @@ dependencies = [ [[package]] name = "craft-plotter" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "kurbo 0.13.1", "thiserror 2.0.21", @@ -1913,7 +1913,7 @@ dependencies = [ [[package]] name = "craft-print" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "craft-behavior", "craft-host", @@ -1937,7 +1937,7 @@ dependencies = [ [[package]] name = "craft-proof" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "log", "miniz_oxide 0.9.1", @@ -1948,7 +1948,7 @@ dependencies = [ [[package]] name = "craft-ps" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "craft-eps", "flate2", @@ -1962,7 +1962,7 @@ dependencies = [ [[package]] name = "craft-psd" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "encoding_rs", "flate2", @@ -1973,7 +1973,7 @@ dependencies = [ [[package]] name = "craft-quit" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "dispatch2", "egui", @@ -1986,7 +1986,7 @@ dependencies = [ [[package]] name = "craft-review" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "base64 0.23.1", "craft-behavior", @@ -2005,7 +2005,7 @@ dependencies = [ [[package]] name = "craft-settings" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "craft-atomic", "craft-host", @@ -2022,7 +2022,7 @@ dependencies = [ [[package]] name = "craft-stream-codecs" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "fax", "hayro-ccitt", @@ -2033,7 +2033,7 @@ dependencies = [ [[package]] name = "craft-svg" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "craft-image-codecs", "craft-xml", @@ -2054,7 +2054,7 @@ dependencies = [ [[package]] name = "craft-table" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "craft-behavior", "craft-keymap", @@ -2066,7 +2066,7 @@ dependencies = [ [[package]] name = "craft-text" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "craft-behavior", "craft-font-manager", @@ -2091,7 +2091,7 @@ dependencies = [ [[package]] name = "craft-texture" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "thiserror 2.0.21", ] @@ -2099,7 +2099,7 @@ dependencies = [ [[package]] name = "craft-theme" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "bitflags 2.13.2", "craft-tracked", @@ -2114,7 +2114,7 @@ dependencies = [ [[package]] name = "craft-theme-store" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "craft-atomic", "craft-behavior", @@ -2129,7 +2129,7 @@ dependencies = [ [[package]] name = "craft-tiff" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "serde", "thiserror 2.0.21", @@ -2139,7 +2139,7 @@ dependencies = [ [[package]] name = "craft-time" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "serde", "thiserror 2.0.21", @@ -2148,7 +2148,7 @@ dependencies = [ [[package]] name = "craft-timeline" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "craft-behavior", "craft-keymap", @@ -2163,12 +2163,12 @@ dependencies = [ [[package]] name = "craft-tracked" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" [[package]] name = "craft-ui" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "craft-cloud-ui", "craft-ui-canvas", @@ -2182,7 +2182,7 @@ dependencies = [ [[package]] name = "craft-ui-canvas" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "craft-behavior", "craft-font-catalog", @@ -2199,7 +2199,7 @@ dependencies = [ [[package]] name = "craft-ui-contract" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "accesskit", "craft-behavior", @@ -2237,7 +2237,7 @@ dependencies = [ [[package]] name = "craft-ui-macros" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2248,7 +2248,7 @@ dependencies = [ [[package]] name = "craft-ui-panels" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "craft-behavior", "craft-host", @@ -2266,7 +2266,7 @@ dependencies = [ [[package]] name = "craft-ui-patterns" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "craft-behavior", "craft-host", @@ -2287,7 +2287,7 @@ dependencies = [ [[package]] name = "craft-ui-shell" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "craft-behavior", "craft-host", @@ -2308,7 +2308,7 @@ dependencies = [ [[package]] name = "craft-ui-widgets" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "craft-behavior", "craft-host", @@ -2327,7 +2327,7 @@ dependencies = [ [[package]] name = "craft-update" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "base64 0.22.1", "chrono", @@ -2359,7 +2359,7 @@ dependencies = [ [[package]] name = "craft-vectorcraft-format" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "flate2", "serde", @@ -2370,7 +2370,7 @@ dependencies = [ [[package]] name = "craft-wayland" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "raw-window-handle", "wayland-backend", @@ -2380,7 +2380,7 @@ dependencies = [ [[package]] name = "craft-web-api" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "js-sys", "serde_json", @@ -2391,7 +2391,7 @@ dependencies = [ [[package]] name = "craft-win32" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "winsafe", ] @@ -2399,7 +2399,7 @@ dependencies = [ [[package]] name = "craft-window" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "craft-appkit", "craft-atomic", @@ -2431,7 +2431,7 @@ dependencies = [ [[package]] name = "craft-xml" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "quick-xml 0.41.0", "serde", @@ -3790,7 +3790,7 @@ checksum = "9f4d0e94ddd48749f06bbe4e5389fb9799a0c45bcaf00495042076ef05e3241a" [[package]] name = "hayro-cmap" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "brotli 8.0.4", "hayro-postscript", @@ -3799,7 +3799,7 @@ dependencies = [ [[package]] name = "hayro-interpret" version = "0.7.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "bitflags 2.13.2", "hayro-cmap", @@ -3817,7 +3817,7 @@ dependencies = [ [[package]] name = "hayro-jbig2" version = "0.3.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "fearless_simd", "hayro-ccitt", @@ -3835,12 +3835,12 @@ dependencies = [ [[package]] name = "hayro-postscript" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" [[package]] name = "hayro-syntax" version = "0.7.2" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "flate2", "hayro-ccitt", @@ -4823,7 +4823,7 @@ dependencies = [ [[package]] name = "krilla" version = "0.8.2" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "base64 0.22.1", "bumpalo", @@ -4980,7 +4980,7 @@ checksum = "d4a5ff6bcca6c4867b1c4fd4ef63e4db7436ef363e0ad7531d1558856bae64f4" [[package]] name = "linesweeper" version = "0.5.0" -source = "git+https://github.com/storytold/craft-libs?rev=77ade517ecb2a6ad86feb2f9983a098ad5738fc6#77ade517ecb2a6ad86feb2f9983a098ad5738fc6" +source = "git+https://github.com/storytold/craft-libs?rev=53c27ce2422e73784f15ca93a43dd0a32fc33280#53c27ce2422e73784f15ca93a43dd0a32fc33280" dependencies = [ "arrayvec", "kurbo 0.13.1", diff --git a/Cargo.toml b/Cargo.toml index 7dab0c8895..60055c372a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,53 +10,53 @@ license = "MIT OR Apache-2.0" rust-version = "1.95" [workspace.dependencies] -craft-cms = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6", default-features = false, features = ["interpret", "write"] } -craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -craft-proof = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } +craft-cms = { git = "https://github.com/storytold/craft-libs", rev = "53c27ce2422e73784f15ca93a43dd0a32fc33280" } +craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "53c27ce2422e73784f15ca93a43dd0a32fc33280", default-features = false, features = ["interpret", "write"] } +craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "53c27ce2422e73784f15ca93a43dd0a32fc33280" } +craft-proof = { git = "https://github.com/storytold/craft-libs", rev = "53c27ce2422e73784f15ca93a43dd0a32fc33280" } # Language packs: the Craft apps' shared font store installs them (#4936). -craft-font-store = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -craft-font-catalog = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } +craft-font-store = { git = "https://github.com/storytold/craft-libs", rev = "53c27ce2422e73784f15ca93a43dd0a32fc33280" } +craft-font-catalog = { git = "https://github.com/storytold/craft-libs", rev = "53c27ce2422e73784f15ca93a43dd0a32fc33280" } # The `.vectorcraft` envelope: its members, version, embedded images and the data after the JSON. -craft-vectorcraft-format = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -craft-gzip = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } +craft-vectorcraft-format = { git = "https://github.com/storytold/craft-libs", rev = "53c27ce2422e73784f15ca93a43dd0a32fc33280" } +craft-gzip = { git = "https://github.com/storytold/craft-libs", rev = "53c27ce2422e73784f15ca93a43dd0a32fc33280" } # `.pcraft` documents: their manifest, full-size composite, preview, layer pixels and ICC profile. -craft-doc = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6", features = ["pcraft-pixels"] } +craft-doc = { git = "https://github.com/storytold/craft-libs", rev = "53c27ce2422e73784f15ca93a43dd0a32fc33280", features = ["pcraft-pixels"] } # Native Affinity documents (craft-libs#914). -craft-affinity = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } +craft-affinity = { git = "https://github.com/storytold/craft-libs", rev = "53c27ce2422e73784f15ca93a43dd0a32fc33280" } # Bounded CDR (v1-v27) and CMX (32-bit) reader (craft-libs#778). -craft-cdr = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } +craft-cdr = { git = "https://github.com/storytold/craft-libs", rev = "53c27ce2422e73784f15ca93a43dd0a32fc33280" } # SVG parsing, limits, SVGZ and writer (craft-libs#778). -craft-svg = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6", features = ["tree"] } -craft-mime = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } +craft-svg = { git = "https://github.com/storytold/craft-libs", rev = "53c27ce2422e73784f15ca93a43dd0a32fc33280", features = ["tree"] } +craft-mime = { git = "https://github.com/storytold/craft-libs", rev = "53c27ce2422e73784f15ca93a43dd0a32fc33280" } # EPS container, previews, ASCII85 and DSC comments (craft-libs#778). -craft-eps = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } +craft-eps = { git = "https://github.com/storytold/craft-libs", rev = "53c27ce2422e73784f15ca93a43dd0a32fc33280" } # DXF tags, reader and writer (craft-libs#778, #926, #927). -craft-plotter = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -craft-dxf = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } +craft-plotter = { git = "https://github.com/storytold/craft-libs", rev = "53c27ce2422e73784f15ca93a43dd0a32fc33280" } +craft-dxf = { git = "https://github.com/storytold/craft-libs", rev = "53c27ce2422e73784f15ca93a43dd0a32fc33280" } # WMF, EMF and EMF+ reader (craft-libs#778). -craft-metafile = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -craft-image-codecs = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -craft-gif = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -craft-tiff = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -craft-ps = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6", default-features = false, features = ["read", "write"] } -craft-psd = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -craft-stream-codecs = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -craft-jxl = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -craft-codepage = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } +craft-metafile = { git = "https://github.com/storytold/craft-libs", rev = "53c27ce2422e73784f15ca93a43dd0a32fc33280" } +craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "53c27ce2422e73784f15ca93a43dd0a32fc33280" } +craft-image-codecs = { git = "https://github.com/storytold/craft-libs", rev = "53c27ce2422e73784f15ca93a43dd0a32fc33280" } +craft-gif = { git = "https://github.com/storytold/craft-libs", rev = "53c27ce2422e73784f15ca93a43dd0a32fc33280" } +craft-tiff = { git = "https://github.com/storytold/craft-libs", rev = "53c27ce2422e73784f15ca93a43dd0a32fc33280" } +craft-ps = { git = "https://github.com/storytold/craft-libs", rev = "53c27ce2422e73784f15ca93a43dd0a32fc33280", default-features = false, features = ["read", "write"] } +craft-psd = { git = "https://github.com/storytold/craft-libs", rev = "53c27ce2422e73784f15ca93a43dd0a32fc33280" } +craft-stream-codecs = { git = "https://github.com/storytold/craft-libs", rev = "53c27ce2422e73784f15ca93a43dd0a32fc33280" } +craft-jxl = { git = "https://github.com/storytold/craft-libs", rev = "53c27ce2422e73784f15ca93a43dd0a32fc33280" } +craft-codepage = { git = "https://github.com/storytold/craft-libs", rev = "53c27ce2422e73784f15ca93a43dd0a32fc33280" } # The metallic-roughness BRDF and environment light the 3D effects' Roughness and Metallic shade with. -craft-pbr = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } +craft-pbr = { git = "https://github.com/storytold/craft-libs", rev = "53c27ce2422e73784f15ca93a43dd0a32fc33280" } # The framework facade (`craft::ui`, `craft::settings`, `craft::platform`, ...). No default features: each crate names # the members it imports. -craft = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } +craft = { git = "https://github.com/storytold/craft-libs", rev = "53c27ce2422e73784f15ca93a43dd0a32fc33280" } # Below the egui layer, so not through the facade: the colour harmony rules and their settings (craft-color-ui # without its `ui` feature), the colour type they work in, and the craft-fonts tables the text crate's build writes. -craft-color-ui = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -craft-theme = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -craft-fonts-build = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } +craft-color-ui = { git = "https://github.com/storytold/craft-libs", rev = "53c27ce2422e73784f15ca93a43dd0a32fc33280" } +craft-theme = { git = "https://github.com/storytold/craft-libs", rev = "53c27ce2422e73784f15ca93a43dd0a32fc33280" } +craft-fonts-build = { git = "https://github.com/storytold/craft-libs", rev = "53c27ce2422e73784f15ca93a43dd0a32fc33280" } # Nightly profile isolation, launch protocol, and security fence. -craft-nightly = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } +craft-nightly = { git = "https://github.com/storytold/craft-libs", rev = "53c27ce2422e73784f15ca93a43dd0a32fc33280" } # internal vectorcraft-geom = { path = "crates/geom" } vectorcraft-color = { path = "crates/color" } @@ -196,13 +196,13 @@ lto = "thin" codegen-units = 1 [patch.crates-io] -hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -hayro-interpret = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -hayro-cmap = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -hayro-postscript = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -krilla = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } -linesweeper = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6" } +hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "53c27ce2422e73784f15ca93a43dd0a32fc33280" } +hayro-interpret = { git = "https://github.com/storytold/craft-libs", rev = "53c27ce2422e73784f15ca93a43dd0a32fc33280" } +hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "53c27ce2422e73784f15ca93a43dd0a32fc33280" } +hayro-cmap = { git = "https://github.com/storytold/craft-libs", rev = "53c27ce2422e73784f15ca93a43dd0a32fc33280" } +hayro-postscript = { git = "https://github.com/storytold/craft-libs", rev = "53c27ce2422e73784f15ca93a43dd0a32fc33280" } +krilla = { git = "https://github.com/storytold/craft-libs", rev = "53c27ce2422e73784f15ca93a43dd0a32fc33280" } +linesweeper = { git = "https://github.com/storytold/craft-libs", rev = "53c27ce2422e73784f15ca93a43dd0a32fc33280" } ecolor = { git = "https://github.com/storytold/egui.git", rev = "861d60a65c50850e995bbb3dcee7c1f3b06815f6" } emath = { git = "https://github.com/storytold/egui.git", rev = "861d60a65c50850e995bbb3dcee7c1f3b06815f6" } epaint = { git = "https://github.com/storytold/egui.git", rev = "861d60a65c50850e995bbb3dcee7c1f3b06815f6" } diff --git a/apps/vectorcraft-web/Cargo.toml b/apps/vectorcraft-web/Cargo.toml index 70aae32f73..250cbbfe65 100644 --- a/apps/vectorcraft-web/Cargo.toml +++ b/apps/vectorcraft-web/Cargo.toml @@ -28,7 +28,7 @@ egui_extras = { workspace = true } # `wgpu` pulls egui-wgpu's defaults: WebGPU plus the WebGL2 fallback. eframe = { workspace = true, features = ["default_fonts", "wgpu", "accesskit"] } # The page command API (storytold/craft-libs#413): the request plumbing behind window.vectorcraft. -craft-web-api = { git = "https://github.com/storytold/craft-libs", rev = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6", version = "0.1.0" } +craft-web-api = { git = "https://github.com/storytold/craft-libs", rev = "53c27ce2422e73784f15ca93a43dd0a32fc33280", version = "0.1.0" } wasm-bindgen = "0.2" serde_json = { workspace = true } diff --git a/crates/doc/src/selection.rs b/crates/doc/src/selection.rs index 02c4391921..ead201ffab 100644 --- a/crates/doc/src/selection.rs +++ b/crates/doc/src/selection.rs @@ -78,7 +78,7 @@ pub struct Selection { } /// See [`Selection::symbol_part`]. -#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] pub struct SymbolPart { /// The symbol instance. pub instance: NodeId, diff --git a/crates/ui-egui/src/panels/character.rs b/crates/ui-egui/src/panels/character.rs index 677eec516a..7dde6b8938 100644 --- a/crates/ui-egui/src/panels/character.rs +++ b/crates/ui-egui/src/panels/character.rs @@ -316,7 +316,7 @@ fn run_format_after_typing(app: &mut VectorcraftApp, mut p: Value, editing: Opti app.run("text.setRangeStyle", p) } -#[derive(PartialEq, Eq)] +#[derive(Debug, PartialEq, Eq, Hash)] pub(crate) enum FormatTarget { Objects(Vec, Option), Story(Vec), @@ -338,6 +338,22 @@ pub(crate) fn format_target_kept(app: &mut VectorcraftApp) -> Result Option<(u64, u64, u64, FormatTarget)> { + let st = app.session.active()?; + let o = app.session.tool_options(); + let offset = |k: &str| o.get(k).and_then(Value::as_u64).map_or(0, |v| v as usize); + let editing = text_editing(app).map(|(id, _, _)| (id, offset("start"), offset("end"))); + Some((st.uid, st.reverts, st.history_restores, format_target(app, editing))) +} + /// Apply a settings dialog to its opening text only. Compare before keeping typing so a /// refused confirmation on different text does not commit that text's in-progress edit. pub(crate) fn run_format_at_target(app: &mut VectorcraftApp, p: Value, target: &FormatTarget) -> Result { @@ -1230,6 +1246,7 @@ pub(crate) fn controls(app: &mut VectorcraftApp, ui: &mut Ui, rows: CharacterRow let sets = font_menu::family_sets(hold.document.as_deref(), &hold.recently_added); let sample = font_menu::sample_text(app); let unit = type_unit(app); + let target = character_target(app); let mut source = FontPickerSource::new(catalog) .settings(Bind::bound(&mut hold.settings)) .filters(Bind::bound(&mut hold.filters)) @@ -1244,7 +1261,8 @@ pub(crate) fn controls(app: &mut VectorcraftApp, ui: &mut Ui, rows: CharacterRow .rows(rows) .font_picker(source) .axes_layout(AxesLayout::Button) - .anti_alias_methods(&ANTI_ALIAS_METHODS); + .anti_alias_methods(&ANTI_ALIAS_METHODS) + .edit_target(target); if let Some(languages) = &languages { controls = controls.languages(languages); } diff --git a/crates/ui-egui/src/panels/character/tests.rs b/crates/ui-egui/src/panels/character/tests.rs index d1f6be332e..835e77325a 100644 --- a/crates/ui-egui/src/panels/character/tests.rs +++ b/crates/ui-egui/src/panels/character/tests.rs @@ -433,6 +433,262 @@ fn highlight_commands_ask_the_framework_to_focus_the_field_by_key() { } } +/// A number field of the character controls, by name, and the attribute of a character it sets. +type CharacterField = (&'static str, fn(&CharStyle) -> f64); + +/// The Character panel's number fields with its options and the East Asian and Middle Eastern +/// options shown. Properties shows the first four. +const CHARACTER_FIELDS: [CharacterField; 13] = [ + ("Font size", |s| s.size), + ("Leading", |s| s.leading.unwrap_or(0.0)), + ("Kerning", |s| s.kerning.unwrap_or(0.0)), + ("Tracking", |s| s.tracking), + ("Vertical scale", |s| s.v_scale), + ("Horizontal scale", |s| s.h_scale), + ("Baseline shift", |s| s.baseline_shift), + ("Rotation", |s| s.rotation), + ("Insert Aki Left", |s| s.aki_left), + ("Insert Aki Right", |s| s.aki_right), + ("Tsume", |s| s.tsume), + ("Horizontal Diacritic Position", |s| s.diacritic_horizontal), + ("Vertical Diacritic Position", |s| s.diacritic_vertical), +]; + +/// A panel that shows the character controls: its name, how it draws and the fields it shows. +type CharacterDraw = (&'static str, fn(&mut VectorcraftApp, &mut egui::Ui), &'static [CharacterField]); + +/// The Character panel and Properties with the fields each shows. +fn character_draws() -> [CharacterDraw; 2] { + [("Character", show, &CHARACTER_FIELDS), ("Properties", super::super::properties::show, &CHARACTER_FIELDS[..4])] +} + +/// A document with two text objects, `Ab` and `Cd`, at 12 pt with a leading of 20 pt and a tracking +/// of 10, and the East Asian and Middle Eastern options shown. +fn two_styled_texts() -> (VectorcraftApp, u64, u64) { + let mut app = VectorcraftApp::new(Session::new(), Default::default()); + app.session.prefs.show_east_asian_options = true; + app.session.prefs.show_indic_options = true; + app.run("file.new", json!({"width": 300, "height": 300})).unwrap(); + let a = app.run("text.create", json!({"x": 20, "y": 40, "text": "Ab", "size": 12})).unwrap()["id"].as_u64().unwrap(); + let b = app.run("text.create", json!({"x": 20, "y": 140, "text": "Cd", "size": 12})).unwrap()["id"].as_u64().unwrap(); + app.run("text.setStyle", json!({"ids": [a, b], "leading": 20, "tracking": 10})).unwrap(); + (app, a, b) +} + +/// Types `3+` into the field `name` without committing it. +fn type_unfinished(p: &mut crate::tests::panel_harness::Panel, name: &str) { + p.focus(name); + p.key(egui::Key::A, egui::Modifiers::COMMAND); + p.type_text("3+"); +} + +/// Draws a frame, then types `1` and Enter into the focused field. +fn finish_typing(p: &mut crate::tests::panel_harness::Panel) { + p.frame(); + p.type_text("1"); + p.key(egui::Key::Enter, egui::Modifiers::NONE); +} + +/// The attribute `read` of each run of the text `id`. +fn run_values(app: &VectorcraftApp, id: u64, read: fn(&CharStyle) -> f64) -> Vec<(String, f64)> { + block_text(app, NodeId(id)).runs.iter().map(|r| (r.text.clone(), read(&r.style))).collect() +} + +/// The number fields of the Character panel and Properties keep a value typed and not yet committed +/// while the text it was typed for stays selected, and drop it when other text with the same value +/// is selected. +#[test] +fn an_unfinished_character_value_does_not_reach_other_selected_text() { + use crate::tests::panel_harness::Panel; + for (panel, draw, fields) in character_draws() { + for &(name, read) in fields { + let (mut app, a, b) = two_styled_texts(); + let before = run_values(&app, a, read); + app.run("select.set", json!({"ids": [a]})).unwrap(); + let mut p = Panel::new(app, draw); + type_unfinished(&mut p, name); + finish_typing(&mut p); + assert_eq!(run_values(&p.app(), a, read), [("Ab".to_string(), 4.0)], "{panel} {name}: an unchanged selection keeps 3+"); + p.app().run("edit.undo", json!({})).unwrap(); + assert_eq!(run_values(&p.app(), a, read), before, "{panel} {name}: undone"); + + type_unfinished(&mut p, name); + p.app().run("select.set", json!({"ids": [b]})).unwrap(); + finish_typing(&mut p); + let app = p.app(); + assert_eq!( + (run_values(&app, a, read), run_values(&app, b, read)), + (before, vec![("Cd".to_string(), 1.0)]), + "{panel} {name}: b takes 1, not 3+1" + ); + } + } +} + +/// While the Type tool edits text, a value typed into the Character panel belongs to the selected +/// characters: another range in the same text drops it. +#[test] +fn an_unfinished_character_value_does_not_reach_another_text_range() { + use crate::tests::panel_harness::Panel; + for (panel, draw, _) in character_draws() { + let mut app = VectorcraftApp::new(Session::new(), Default::default()); + app.run("file.new", json!({"width": 300, "height": 300})).unwrap(); + let id = app.run("text.create", json!({"x": 20, "y": 40, "text": "Abcd", "size": 12})).unwrap()["id"].as_u64().unwrap(); + app.run("select.set", json!({"ids": [id]})).unwrap(); + app.session.select_tool("type", Default::default()).unwrap(); + app.session.set_tool_option("textSelection", &json!({"editing": id, "anchor": 0, "caret": 2})); + let mut p = Panel::new(app, draw); + type_unfinished(&mut p, "Tracking"); + p.app().session.set_tool_option("textSelection", &json!({"editing": id, "anchor": 2, "caret": 4})); + finish_typing(&mut p); + let want = vec![("Ab".to_string(), 0.0), ("cd".to_string(), 1.0)]; + assert_eq!(run_values(&p.app(), id, |s| s.tracking), want, "{panel}: the second range takes 1, not 3+1"); + } +} + +/// At a caret the Kerning field sets the pair at the caret, so a value typed there does not reach +/// the pair at another caret position in the same text, though both pairs have the same kerning. +#[test] +fn an_unfinished_kerning_does_not_reach_another_caret_position() { + use crate::tests::panel_harness::Panel; + for (panel, draw, _) in character_draws() { + let mut app = VectorcraftApp::new(Session::new(), Default::default()); + app.run("file.new", json!({"width": 300, "height": 300})).unwrap(); + let id = app.run("text.create", json!({"x": 20, "y": 40, "text": "Abcd", "size": 12})).unwrap()["id"].as_u64().unwrap(); + app.run("text.setRangeStyle", json!({"id": id, "kerning": 10})).unwrap(); + app.run("select.set", json!({"ids": [id]})).unwrap(); + app.session.select_tool("type", Default::default()).unwrap(); + app.session.set_tool_option("textSelection", &json!({"editing": id, "anchor": 1, "caret": 1})); + let mut p = Panel::new(app, draw); + type_unfinished(&mut p, "Kerning"); + p.app().session.set_tool_option("textSelection", &json!({"editing": id, "anchor": 3, "caret": 3})); + finish_typing(&mut p); + let kernings: Vec = run_values(&p.app(), id, |s| s.kerning.unwrap_or(0.0)).into_iter().map(|(_, k)| k).collect(); + assert!(kernings.contains(&1.0) && !kernings.contains(&4.0), "{panel}: the pair at the second caret takes 1, not 3+1: {kernings:?}"); + } +} + +/// Another document whose text has the same id and tracking drops the value. +#[test] +fn an_unfinished_character_value_does_not_reach_another_document() { + use crate::tests::panel_harness::Panel; + let (mut app, a, _) = two_styled_texts(); + app.run("file.new", json!({"width": 300, "height": 300})).unwrap(); + let other = app.run("text.create", json!({"x": 20, "y": 40, "text": "Ab", "size": 12})).unwrap()["id"].as_u64().unwrap(); + assert_eq!(other, a, "both documents' texts have the same id"); + app.run("text.setStyle", json!({"ids": [a], "tracking": 10})).unwrap(); + app.run("select.set", json!({"ids": [a]})).unwrap(); + app.run("document.activate", json!({"index": 0})).unwrap(); + app.run("select.set", json!({"ids": [a]})).unwrap(); + let mut p = Panel::new(app, show); + type_unfinished(&mut p, "Tracking"); + p.app().run("document.activate", json!({"index": 1})).unwrap(); + finish_typing(&mut p); + let tracking = |s: &CharStyle| s.tracking; + let second = run_values(&p.app(), a, tracking); + p.app().run("document.activate", json!({"index": 0})).unwrap(); + let first = run_values(&p.app(), a, tracking); + assert_eq!((first, second), (vec![("Ab".to_string(), 10.0)], vec![("Ab".to_string(), 1.0)]), "the other document takes 1"); +} + +/// File › Revert drops the value, though the restored text has the same id and tracking. +#[test] +fn an_unfinished_character_value_is_dropped_by_file_revert() { + use crate::tests::panel_harness::Panel; + let (mut app, a, _) = two_styled_texts(); + let dir = vectorcraft_testkit::TempDir::new("character-value-revert"); + app.services.read = Some(Box::new(|path| std::fs::read(path).map_err(|e| e.to_string()))); + app.services.write = Some(Box::new(|path, bytes| std::fs::write(path, bytes).map_err(|e| e.to_string()))); + app.run("file.saveAs", json!({"path": dir.join("Type.vectorcraft")})).unwrap(); + // An unsaved change for Revert to undo, leaving the text as saved. + app.run("shape.rectangle", json!({"x": 100, "y": 200, "width": 20, "height": 20})).unwrap(); + app.run("select.set", json!({"ids": [a]})).unwrap(); + let mut p = Panel::new(app, show); + type_unfinished(&mut p, "Tracking"); + p.app().run("file.revert", json!({"confirmed": true})).unwrap(); + p.app().run("select.set", json!({"ids": [a]})).unwrap(); + finish_typing(&mut p); + assert_eq!(run_values(&p.app(), a, |s| s.tracking), [("Ab".to_string(), 1.0)], "Revert drops the unfinished value"); +} + +/// Undo drops the value, though the text it takes away and the text made and selected after it +/// have the same id and tracking. +#[test] +fn an_unfinished_character_value_is_dropped_by_undo() { + use crate::tests::panel_harness::Panel; + let mut app = VectorcraftApp::new(Session::new(), Default::default()); + app.run("file.new", json!({"width": 300, "height": 300})).unwrap(); + let a = app.run("text.create", json!({"x": 20, "y": 40, "text": "Ab", "size": 12})).unwrap()["id"].as_u64().unwrap(); + app.run("select.set", json!({"ids": [a]})).unwrap(); + let mut p = Panel::new(app, show); + type_unfinished(&mut p, "Tracking"); + p.app().run("edit.undo", json!({})).unwrap(); + let b = p.app().run("text.create", json!({"x": 20, "y": 40, "text": "Cd", "size": 12})).unwrap()["id"].as_u64().unwrap(); + assert_eq!(b, a, "the new text has the undone text's id"); + p.app().run("select.set", json!({"ids": [b]})).unwrap(); + finish_typing(&mut p); + assert_eq!(run_values(&p.app(), b, |s| s.tracking), [("Cd".to_string(), 1.0)], "Undo drops the unfinished value"); +} + +/// With Real-time Drawing off, a Type tool range that reaches into typing not applied yet is +/// another range than the applied text it starts in. +#[test] +fn an_unfinished_character_value_does_not_reach_a_range_with_unapplied_typing() { + use crate::tests::panel_harness::Panel; + let mut app = VectorcraftApp::new(Session::new(), Default::default()); + app.run("file.new", json!({"width": 300, "height": 300})).unwrap(); + app.session.execute("prefs.set", &json!({"key": "realTimeDrawing", "value": false})).unwrap(); + let id = app.run("text.create", json!({"x": 20, "y": 40, "text": "Ab", "size": 12})).unwrap()["id"].as_u64().unwrap(); + app.run("select.set", json!({"ids": [id]})).unwrap(); + app.select_tool("type"); + app.session.apply_actions(vec![vectorcraft_tools::Action::Notify("text.editNew".into())]).unwrap(); + app.session.set_tool_option("select", &json!({"start": 2, "end": 2})); + let mut app = crate::testing::windowed(app); + let ctx = app.ui_ctx.clone().unwrap(); + // The keymap builds in the first pass. + crate::tests::synthetic::key_frame(&mut app, &ctx, vec![]); + crate::tests::synthetic::key_frame(&mut app, &ctx, vec![egui::Event::Text("Cd".into())]); + assert_eq!(app.session.tool_options()["typing"], json!(true)); + let tracking = |s: &CharStyle| s.tracking; + assert_eq!(run_values(&app, id, tracking), [("Ab".to_string(), 0.0)], "the typing is not applied yet"); + app.session.set_tool_option("select", &json!({"start": 0, "end": 2})); + let mut p = Panel::new(app, show); + type_unfinished(&mut p, "Tracking"); + p.app().session.set_tool_option("select", &json!({"start": 0, "end": 4})); + finish_typing(&mut p); + assert_eq!(run_values(&p.app(), id, tracking), [("AbCd".to_string(), 1.0)], "the longer range takes 1, not 3+1"); +} + +/// Settling unapplied typing keeps an unfinished Character value for the Select All range. +#[test] +fn an_unfinished_character_value_survives_select_all_typing_settling() { + use crate::tests::panel_harness::Panel; + let mut app = VectorcraftApp::new(Session::new(), Default::default()); + app.run("file.new", json!({"width": 300, "height": 300})).unwrap(); + app.session.execute("prefs.set", &json!({"key": "realTimeDrawing", "value": false})).unwrap(); + let id = app.run("text.create", json!({"x": 20, "y": 40, "text": "Ab", "size": 12})).unwrap()["id"].as_u64().unwrap(); + app.run("select.set", json!({"ids": [id]})).unwrap(); + app.select_tool("type"); + app.session.apply_actions(vec![vectorcraft_tools::Action::Notify("text.editNew".into())]).unwrap(); + app.session.set_tool_option("select", &json!({"start": 2, "end": 2})); + let mut app = crate::testing::windowed(app); + let ctx = app.ui_ctx.clone().unwrap(); + // The keymap builds in the first pass. + crate::tests::synthetic::key_frame(&mut app, &ctx, vec![]); + crate::tests::synthetic::key_frame(&mut app, &ctx, vec![egui::Event::Text("Cd".into())]); + assert_eq!(app.session.tool_options()["typing"], json!(true)); + let tracking = |s: &CharStyle| s.tracking; + assert_eq!(run_values(&app, id, tracking), [("Ab".to_string(), 0.0)], "the typing is not applied yet"); + app.run("select.all", json!({})).unwrap(); + assert_eq!(app.session.tool_options()["typing"], json!(true)); + let mut p = Panel::new(app, show); + type_unfinished(&mut p, "Tracking"); + end_typing(&mut p.app()); + assert_eq!(run_values(&p.app(), id, tracking), [("AbCd".to_string(), 0.0)], "the typing is applied"); + finish_typing(&mut p); + assert_eq!(run_values(&p.app(), id, tracking), [("AbCd".to_string(), 4.0)], "settling the typing keeps 3+"); +} + /// The slider list and its gestures are the framework's. What the app decides: which axes the selection /// shares, that a change carries only the axes that moved (so a mixed axis stays as it is), the /// command (the object, or the Type tool's range) and that Reset Panel leaves the settings. diff --git a/xtask/src/pdf_deps.rs b/xtask/src/pdf_deps.rs index 542a3e8c41..be756f03de 100644 --- a/xtask/src/pdf_deps.rs +++ b/xtask/src/pdf_deps.rs @@ -5,7 +5,7 @@ use std::process::Command; use serde_json::Value; -const REV: &str = "77ade517ecb2a6ad86feb2f9983a098ad5738fc6"; +const REV: &str = "53c27ce2422e73784f15ca93a43dd0a32fc33280"; const PACKAGES: &[(&str, &str, &str)] = &[ ("craft-pdf", "0.1.0", REV), ("krilla", "0.8.2", REV), From 19f01cc673b046e42603be92c0706264ac623d6c Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Fri, 4 Dec 2026 12:12:43 -0800 Subject: [PATCH 2/2] Type: Select All keeps an unfinished Character value for the same characters The Character panel and Properties keyed a Type tool range by the tool's raw offsets. Select All stores an end past the text, so a range dragged over the whole text and Select All gave different keys and dropped a value typed for the same characters. character_target now resolves the range the way the bars' Font Size field does, and that field uses it as well, so the two keys come from one function: the range is clamped to the stored text, or to the length the text has with unapplied typing while Real-time Drawing is off. The Character controls keep a caret's offset for Kerning; the Font Size field keys a caret and a range over the whole text as all of the text. --- crates/ui-egui/src/panels/character.rs | 75 ++++++++------------ crates/ui-egui/src/panels/character/tests.rs | 20 ++++++ 2 files changed, 51 insertions(+), 44 deletions(-) diff --git a/crates/ui-egui/src/panels/character.rs b/crates/ui-egui/src/panels/character.rs index 03fa1ec8d0..65081baa4f 100644 --- a/crates/ui-egui/src/panels/character.rs +++ b/crates/ui-egui/src/panels/character.rs @@ -338,19 +338,37 @@ pub(crate) fn format_target_kept(app: &mut VectorcraftApp) -> Result Option<(u64, u64, u64, FormatTarget)> { +/// What a character field edits, as its edit target: the document, how many times File › Revert +/// and Undo or Redo replaced its content (after which a node id can name another object), and the +/// text the changes go to ([`format_target`]): the range or story the Type tool has selected, else +/// the selected stories. With `caret` set, a caret keeps its offset, since the Character panel's +/// Kerning field sets the pair at the caret ([`set_kerning`]). Without it, a caret and a range over +/// the whole text both key as all of the text, which is what `text.setStyle` changes at a caret +/// ([`range_style`]). A field drops a value typed and not yet committed when this changes, even +/// where the new text has the same value. +fn character_target(app: &VectorcraftApp, caret: bool) -> Option<(u64, u64, u64, FormatTarget)> { let st = app.session.active()?; + // The range [`text_editing`] clamps to the stored text, or, while Real-time Drawing off leaves + // typing unapplied, the Type tool's own offsets, which can reach into that typing, clamped to + // the length the text has with it ([`pending_text_len`]). The same characters key the same + // whether a drag or Select All, whose end lies past the text, selected them. let o = app.session.tool_options(); let offset = |k: &str| o.get(k).and_then(Value::as_u64).map_or(0, |v| v as usize); - let editing = text_editing(app).map(|(id, _, _)| (id, offset("start"), offset("end"))); + let editing = text_editing(app).map(|(id, a, b)| { + let unapplied_typing = o.get("typing").and_then(Value::as_bool) == Some(true) + && st.interaction.as_ref().is_some_and(|it| it.label == "Typing" && it.preview.is_some() && std::sync::Arc::ptr_eq(&it.doc, &st.doc)); + let (a, b, len) = if unapplied_typing { + let (a, b) = (offset("start"), offset("end")); + pending_text_len(st, id).map_or((a, b, None), |len| (a.min(len), b.min(len), Some(len))) + } else { + let len = st.doc.node(id).and_then(|node| match &node.kind { + NodeKind::Text(t) => Some(vectorcraft_text::edit::runs_len(&t.runs)), + _ => None, + }); + (a, b, len) + }; + if caret || (b > a && !(a == 0 && len.is_some_and(|len| b >= len))) { (id, a, b) } else { (id, 0, 0) } + }); Some((st.uid, st.reverts, st.history_restores, format_target(app, editing))) } @@ -1246,7 +1264,7 @@ pub(crate) fn controls(app: &mut VectorcraftApp, ui: &mut Ui, rows: CharacterRow let sets = font_menu::family_sets(hold.document.as_deref(), &hold.recently_added); let sample = font_menu::sample_text(app); let unit = type_unit(app); - let target = character_target(app); + let target = character_target(app, true); let mut source = FontPickerSource::new(catalog) .settings(Bind::bound(&mut hold.settings)) .filters(Bind::bound(&mut hold.filters)) @@ -1341,37 +1359,6 @@ fn snap_to_glyph(app: &mut VectorcraftApp, ui: &mut Ui) { }); } -/// What the bars' Font Size field edits, as its edit target: the document, how many times File › -/// Revert and Undo or Redo replaced its content (after which a node id can name another object), -/// and the text `text.setStyle` changes ([`format_target`]): the range or story the Type tool has -/// selected, all of the edited text at a caret, else the selected stories. The field drops a value -/// typed and not yet committed when this changes, even where the new text has the same size. -fn size_target(app: &VectorcraftApp) -> Option<(u64, u64, u64, FormatTarget)> { - let st = app.session.active()?; - // The range [`text_editing`] clamps to the stored text, or, while Real-time Drawing off leaves - // typing unapplied, the Type tool's own offsets, which can reach into that typing, clamped to - // the length the text has with it ([`pending_text_len`]). A caret changes the whole text - // wherever it is ([`range_style`]); a range over the whole text keys as a caret does. - let o = app.session.tool_options(); - let offset = |k: &str| o.get(k).and_then(Value::as_u64).map_or(0, |v| v as usize); - let editing = text_editing(app).map(|(id, a, b)| { - let unapplied_typing = o.get("typing").and_then(Value::as_bool) == Some(true) - && st.interaction.as_ref().is_some_and(|it| it.label == "Typing" && it.preview.is_some() && std::sync::Arc::ptr_eq(&it.doc, &st.doc)); - let (a, b, len) = if unapplied_typing { - let (a, b) = (offset("start"), offset("end")); - pending_text_len(st, id).map_or((a, b, None), |len| (a.min(len), b.min(len), Some(len))) - } else { - let len = st.doc.node(id).and_then(|node| match &node.kind { - NodeKind::Text(t) => Some(vectorcraft_text::edit::runs_len(&t.runs)), - _ => None, - }); - (a, b, len) - }; - if b > a && !(a == 0 && len.is_some_and(|len| b >= len)) { (id, a, b) } else { (id, 0, 0) } - }); - Some((st.uid, st.reverts, st.history_restores, format_target(app, editing))) -} - /// The byte length text `id` will have once the typing that Real-time Drawing off leaves unapplied /// is applied: the stored text with the `text.editRange` preview's range replaced by its runs. /// `None` for a frame of a threaded story, whose text can reflow from other frames, when the @@ -1398,9 +1385,9 @@ fn pending_text_len(st: &DocState, id: NodeId) -> Option { /// The Font Size field of the bars, named `name`: typed, stepped, scrubbed or picked from the /// presets, in the type unit, blank where the selected text's sizes differ. A value typed and not -/// yet committed stays with the text it was typed for ([`size_target`]). +/// yet committed stays with the text it was typed for ([`character_target`]). fn size_field(app: &mut VectorcraftApp, ui: &mut Ui, name: &'static str) { - let target = size_target(app); + let target = character_target(app, false); let unit = type_unit(app); let scale = unit_scale(unit); let units = Env::of(ui).units(); diff --git a/crates/ui-egui/src/panels/character/tests.rs b/crates/ui-egui/src/panels/character/tests.rs index 887a93ca73..22b6114ce8 100644 --- a/crates/ui-egui/src/panels/character/tests.rs +++ b/crates/ui-egui/src/panels/character/tests.rs @@ -546,6 +546,26 @@ fn an_unfinished_character_value_does_not_reach_another_text_range() { } } +/// While the Type tool edits text, a range dragged over the whole text and Select All select the same +/// characters, so a value typed with one selected is kept when the other replaces it. +#[test] +fn an_unfinished_character_value_survives_select_all_over_the_same_characters() { + use crate::tests::panel_harness::Panel; + for (panel, draw, _) in character_draws() { + let mut app = VectorcraftApp::new(Session::new(), Default::default()); + app.run("file.new", json!({"width": 300, "height": 300})).unwrap(); + let id = app.run("text.create", json!({"x": 20, "y": 40, "text": "Abcd", "size": 12})).unwrap()["id"].as_u64().unwrap(); + app.run("select.set", json!({"ids": [id]})).unwrap(); + app.session.select_tool("type", Default::default()).unwrap(); + app.session.set_tool_option("textSelection", &json!({"editing": id, "anchor": 0, "caret": 4})); + let mut p = Panel::new(app, draw); + type_unfinished(&mut p, "Tracking"); + p.app().run("select.all", json!({})).unwrap(); + finish_typing(&mut p); + assert_eq!(run_values(&p.app(), id, |s| s.tracking), [("Abcd".to_string(), 4.0)], "{panel}: Select All keeps 3+"); + } +} + /// At a caret the Kerning field sets the pair at the caret, so a value typed there does not reach /// the pair at another caret position in the same text, though both pairs have the same kerning. #[test]