Merge main into fix/menu-keymap-state-key

This commit is contained in:
dotCooCoo committed 2026-11-30 06:59:34 -08:00
commit bb2f6e0c09
44 files changed
+894 -250

No files matched your search

Generated
+121 -119
View File
@@ -626,12 +626,6 @@ dependencies = [
"cpufeatures 0.3.1",
]
[[package]]
name = "block"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a"
[[package]]
name = "block-buffer"
version = "0.10.4"
@@ -725,6 +719,17 @@ dependencies = [
"brotli-decompressor 5.0.3",
]
[[package]]
name = "brotli"
version = "9.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9071f285ed78f04f37d675abaaef5de7689e2f30a216c8dc6795465d81910a13"
dependencies = [
"alloc-no-stdlib 3.0.0",
"alloc-stdlib 0.3.0",
"brotli-decompressor 6.3.2",
]
[[package]]
name = "brotli-decompressor"
version = "5.0.3"
@@ -1184,19 +1189,6 @@ dependencies = [
"libc",
]
[[package]]
name = "core-graphics2"
version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b65858d95344d2711161cd92196732f67d6c5fea238cf12f994584828731a5c"
dependencies = [
"bitflags 2.13.2",
"block",
"cfg-if",
"core-foundation 0.10.1",
"libc",
]
[[package]]
name = "core_detect"
version = "1.0.0"
@@ -1239,7 +1231,7 @@ dependencies = [
[[package]]
name = "craft"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"craft-automation",
"craft-behavior",
@@ -1280,7 +1272,7 @@ dependencies = [
[[package]]
name = "craft-affinity"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"crc32fast",
"flate2",
@@ -1291,18 +1283,19 @@ dependencies = [
[[package]]
name = "craft-appkit"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"block2 0.6.2",
"objc2 0.6.5",
"objc2-app-kit 0.3.2",
"objc2-core-graphics",
"objc2-foundation 0.3.2",
]
[[package]]
name = "craft-atomic"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"rustix 1.1.6",
]
@@ -1310,7 +1303,7 @@ dependencies = [
[[package]]
name = "craft-automation"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"base64 0.23.1",
"craft-behavior",
@@ -1335,7 +1328,7 @@ dependencies = [
[[package]]
name = "craft-behavior"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"accesskit",
"bitflags 2.13.2",
@@ -1353,7 +1346,7 @@ dependencies = [
[[package]]
name = "craft-browse"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"craft-behavior",
"craft-docpath",
@@ -1371,7 +1364,7 @@ dependencies = [
[[package]]
name = "craft-cdr"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"crc32fast",
"flate2",
@@ -1380,7 +1373,7 @@ dependencies = [
[[package]]
name = "craft-cloud-ui"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"egui",
]
@@ -1388,7 +1381,7 @@ dependencies = [
[[package]]
name = "craft-cms"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"md-5",
"rayon",
@@ -1397,12 +1390,12 @@ dependencies = [
[[package]]
name = "craft-codepage"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
[[package]]
name = "craft-color-ui"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"craft-behavior",
"craft-cms",
@@ -1422,7 +1415,7 @@ dependencies = [
[[package]]
name = "craft-control"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"craft-control-protocol",
"craft-platform",
@@ -1433,7 +1426,7 @@ dependencies = [
[[package]]
name = "craft-control-protocol"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"getrandom 0.3.4",
"serde_json",
@@ -1443,7 +1436,7 @@ dependencies = [
[[package]]
name = "craft-dds"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"rayon",
]
@@ -1451,7 +1444,7 @@ dependencies = [
[[package]]
name = "craft-dialogs"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"block2 0.6.2",
"craft-appkit",
@@ -1477,7 +1470,7 @@ dependencies = [
[[package]]
name = "craft-doc"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"blake3",
"craft-ecproj-format",
@@ -1493,7 +1486,7 @@ dependencies = [
[[package]]
name = "craft-docpath"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"serde",
]
@@ -1501,7 +1494,7 @@ dependencies = [
[[package]]
name = "craft-draw"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"craft-behavior",
"craft-color-ui",
@@ -1520,7 +1513,7 @@ dependencies = [
[[package]]
name = "craft-dxf"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"craft-codepage",
"encoding_rs",
@@ -1532,7 +1525,7 @@ dependencies = [
[[package]]
name = "craft-ecproj-format"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"serde",
"serde_json",
@@ -1542,12 +1535,12 @@ dependencies = [
[[package]]
name = "craft-eps"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
[[package]]
name = "craft-font-catalog"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"fontique",
"harfrust 0.13.3",
@@ -1562,7 +1555,7 @@ dependencies = [
[[package]]
name = "craft-font-manager"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"craft-behavior",
"craft-font-catalog",
@@ -1581,7 +1574,7 @@ dependencies = [
[[package]]
name = "craft-font-os-windows"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"windows-registry",
"windows-sys 0.61.2",
@@ -1590,7 +1583,7 @@ dependencies = [
[[package]]
name = "craft-font-store"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"cap-primitives",
"craft-atomic",
@@ -1613,12 +1606,12 @@ dependencies = [
[[package]]
name = "craft-fonts-build"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
[[package]]
name = "craft-gif"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"gif",
]
@@ -1626,7 +1619,7 @@ dependencies = [
[[package]]
name = "craft-gzip"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"flate2",
]
@@ -1634,7 +1627,7 @@ dependencies = [
[[package]]
name = "craft-host"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"bitflags 2.13.2",
"craft-i18n",
@@ -1647,8 +1640,10 @@ dependencies = [
[[package]]
name = "craft-i18n"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"brotli 9.1.3",
"brotli-decompressor 6.3.2",
"chrono",
"fixed_decimal",
"icu_calendar",
@@ -1675,7 +1670,7 @@ dependencies = [
[[package]]
name = "craft-image-codecs"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"craft-dds",
"craft-jpeg",
@@ -1702,7 +1697,7 @@ dependencies = [
[[package]]
name = "craft-imaging"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"craft-behavior",
"craft-color-ui",
@@ -1720,7 +1715,7 @@ dependencies = [
[[package]]
name = "craft-jpeg"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"thiserror 2.0.21",
]
@@ -1728,7 +1723,7 @@ dependencies = [
[[package]]
name = "craft-jxl"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"brotli-decompressor 5.0.3",
"jixel",
@@ -1739,7 +1734,7 @@ dependencies = [
[[package]]
name = "craft-keymap"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"craft-host",
"craft-i18n",
@@ -1754,7 +1749,7 @@ dependencies = [
[[package]]
name = "craft-layers"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"craft-behavior",
"craft-i18n",
@@ -1768,7 +1763,7 @@ dependencies = [
[[package]]
name = "craft-menu"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"craft-behavior",
"craft-host",
@@ -1786,7 +1781,7 @@ dependencies = [
[[package]]
name = "craft-metadata"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"brotli-decompressor 6.3.2",
"chrono",
@@ -1798,7 +1793,7 @@ dependencies = [
[[package]]
name = "craft-metafile"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"encoding_rs",
"image",
@@ -1809,7 +1804,7 @@ dependencies = [
[[package]]
name = "craft-mime"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"chrono",
"craft-codepage",
@@ -1819,15 +1814,16 @@ dependencies = [
[[package]]
name = "craft-nightly"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=1f6c3a21f85ed96f8fd4ddd5a959d4e1edbedb24#1f6c3a21f85ed96f8fd4ddd5a959d4e1edbedb24"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"uds_windows",
"winsafe",
]
[[package]]
name = "craft-pages"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"craft-behavior",
"craft-keymap",
@@ -1843,7 +1839,7 @@ dependencies = [
[[package]]
name = "craft-pcraft-format"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"flate2",
"serde",
@@ -1854,7 +1850,7 @@ dependencies = [
[[package]]
name = "craft-pdf"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"hayro-interpret",
"hayro-syntax",
@@ -1866,12 +1862,12 @@ dependencies = [
[[package]]
name = "craft-platform"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"async-channel",
"async-io",
"async-process",
"core-graphics2",
"craft-appkit",
"craft-atomic",
"craft-docpath",
"craft-host",
@@ -1881,6 +1877,8 @@ dependencies = [
"js-sys",
"log",
"objc2-app-kit 0.3.2",
"objc2-core-foundation",
"objc2-core-graphics",
"rfd",
"serde",
"serde_json",
@@ -1897,7 +1895,7 @@ dependencies = [
[[package]]
name = "craft-plotter"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"kurbo 0.13.1",
"thiserror 2.0.21",
@@ -1906,7 +1904,7 @@ dependencies = [
[[package]]
name = "craft-print"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"craft-behavior",
"craft-host",
@@ -1930,7 +1928,7 @@ dependencies = [
[[package]]
name = "craft-proof"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"log",
"miniz_oxide 0.9.1",
@@ -1941,7 +1939,7 @@ dependencies = [
[[package]]
name = "craft-ps"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"craft-eps",
"flate2",
@@ -1955,7 +1953,7 @@ dependencies = [
[[package]]
name = "craft-psd"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"encoding_rs",
"flate2",
@@ -1966,7 +1964,7 @@ dependencies = [
[[package]]
name = "craft-quit"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"dispatch2",
"egui",
@@ -1979,7 +1977,7 @@ dependencies = [
[[package]]
name = "craft-review"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"base64 0.23.1",
"craft-behavior",
@@ -1998,7 +1996,7 @@ dependencies = [
[[package]]
name = "craft-settings"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"craft-atomic",
"craft-host",
@@ -2015,7 +2013,7 @@ dependencies = [
[[package]]
name = "craft-stream-codecs"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"fax",
"hayro-ccitt",
@@ -2026,7 +2024,7 @@ dependencies = [
[[package]]
name = "craft-svg"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"craft-image-codecs",
"craft-xml",
@@ -2047,7 +2045,7 @@ dependencies = [
[[package]]
name = "craft-table"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"craft-behavior",
"craft-keymap",
@@ -2059,7 +2057,7 @@ dependencies = [
[[package]]
name = "craft-text"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"craft-behavior",
"craft-font-manager",
@@ -2084,7 +2082,7 @@ dependencies = [
[[package]]
name = "craft-theme"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"bitflags 2.13.2",
"craft-tracked",
@@ -2099,7 +2097,7 @@ dependencies = [
[[package]]
name = "craft-theme-store"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"craft-atomic",
"craft-behavior",
@@ -2114,7 +2112,7 @@ dependencies = [
[[package]]
name = "craft-tiff"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"serde",
"thiserror 2.0.21",
@@ -2124,7 +2122,7 @@ dependencies = [
[[package]]
name = "craft-time"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"serde",
"thiserror 2.0.21",
@@ -2133,7 +2131,7 @@ dependencies = [
[[package]]
name = "craft-timeline"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"craft-behavior",
"craft-keymap",
@@ -2148,12 +2146,12 @@ dependencies = [
[[package]]
name = "craft-tracked"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
[[package]]
name = "craft-ui"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"craft-cloud-ui",
"craft-ui-canvas",
@@ -2167,7 +2165,7 @@ dependencies = [
[[package]]
name = "craft-ui-canvas"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"craft-behavior",
"craft-i18n",
@@ -2183,7 +2181,7 @@ dependencies = [
[[package]]
name = "craft-ui-contract"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"accesskit",
"craft-behavior",
@@ -2221,7 +2219,7 @@ dependencies = [
[[package]]
name = "craft-ui-macros"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"proc-macro-crate",
"proc-macro2",
@@ -2232,7 +2230,7 @@ dependencies = [
[[package]]
name = "craft-ui-panels"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"craft-behavior",
"craft-host",
@@ -2250,7 +2248,7 @@ dependencies = [
[[package]]
name = "craft-ui-patterns"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"craft-behavior",
"craft-host",
@@ -2271,7 +2269,7 @@ dependencies = [
[[package]]
name = "craft-ui-shell"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"craft-behavior",
"craft-host",
@@ -2292,7 +2290,7 @@ dependencies = [
[[package]]
name = "craft-ui-widgets"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"craft-behavior",
"craft-host",
@@ -2311,7 +2309,7 @@ dependencies = [
[[package]]
name = "craft-update"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"base64 0.22.1",
"chrono",
@@ -2343,7 +2341,7 @@ dependencies = [
[[package]]
name = "craft-vectorcraft-format"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"flate2",
"serde",
@@ -2354,7 +2352,7 @@ dependencies = [
[[package]]
name = "craft-wayland"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"raw-window-handle",
"wayland-backend",
@@ -2364,7 +2362,7 @@ dependencies = [
[[package]]
name = "craft-web-api"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"js-sys",
"serde_json",
@@ -2375,7 +2373,7 @@ dependencies = [
[[package]]
name = "craft-win32"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"winsafe",
]
@@ -2383,7 +2381,7 @@ dependencies = [
[[package]]
name = "craft-window"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"craft-appkit",
"craft-atomic",
@@ -2415,7 +2413,7 @@ dependencies = [
[[package]]
name = "craft-xml"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"quick-xml 0.41.0",
"serde",
@@ -2760,7 +2758,7 @@ checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813"
[[package]]
name = "ecolor"
version = "0.37.0"
source = "git+https://github.com/storytold/egui.git?rev=14c39fed181756be6f357c284354e0ab55b64443#14c39fed181756be6f357c284354e0ab55b64443"
source = "git+https://github.com/storytold/egui.git?rev=07c20531f89717e461c0f387dd1f9649553f9321#07c20531f89717e461c0f387dd1f9649553f9321"
dependencies = [
"bytemuck",
"emath",
@@ -2793,7 +2791,7 @@ dependencies = [
[[package]]
name = "eframe"
version = "0.37.0"
source = "git+https://github.com/storytold/egui.git?rev=14c39fed181756be6f357c284354e0ab55b64443#14c39fed181756be6f357c284354e0ab55b64443"
source = "git+https://github.com/storytold/egui.git?rev=07c20531f89717e461c0f387dd1f9649553f9321#07c20531f89717e461c0f387dd1f9649553f9321"
dependencies = [
"ahash",
"bytemuck",
@@ -2828,7 +2826,7 @@ dependencies = [
[[package]]
name = "egui"
version = "0.37.0"
source = "git+https://github.com/storytold/egui.git?rev=14c39fed181756be6f357c284354e0ab55b64443#14c39fed181756be6f357c284354e0ab55b64443"
source = "git+https://github.com/storytold/egui.git?rev=07c20531f89717e461c0f387dd1f9649553f9321#07c20531f89717e461c0f387dd1f9649553f9321"
dependencies = [
"accesskit",
"ahash",
@@ -2847,7 +2845,7 @@ dependencies = [
[[package]]
name = "egui-wgpu"
version = "0.37.0"
source = "git+https://github.com/storytold/egui.git?rev=14c39fed181756be6f357c284354e0ab55b64443#14c39fed181756be6f357c284354e0ab55b64443"
source = "git+https://github.com/storytold/egui.git?rev=07c20531f89717e461c0f387dd1f9649553f9321#07c20531f89717e461c0f387dd1f9649553f9321"
dependencies = [
"ahash",
"bytemuck",
@@ -2866,7 +2864,7 @@ dependencies = [
[[package]]
name = "egui-winit"
version = "0.37.0"
source = "git+https://github.com/storytold/egui.git?rev=14c39fed181756be6f357c284354e0ab55b64443#14c39fed181756be6f357c284354e0ab55b64443"
source = "git+https://github.com/storytold/egui.git?rev=07c20531f89717e461c0f387dd1f9649553f9321#07c20531f89717e461c0f387dd1f9649553f9321"
dependencies = [
"accesskit_winit",
"arboard",
@@ -2891,7 +2889,7 @@ dependencies = [
[[package]]
name = "egui_extras"
version = "0.37.0"
source = "git+https://github.com/storytold/egui.git?rev=14c39fed181756be6f357c284354e0ab55b64443#14c39fed181756be6f357c284354e0ab55b64443"
source = "git+https://github.com/storytold/egui.git?rev=07c20531f89717e461c0f387dd1f9649553f9321#07c20531f89717e461c0f387dd1f9649553f9321"
dependencies = [
"ahash",
"egui",
@@ -2905,7 +2903,7 @@ dependencies = [
[[package]]
name = "egui_glow"
version = "0.37.0"
source = "git+https://github.com/storytold/egui.git?rev=14c39fed181756be6f357c284354e0ab55b64443#14c39fed181756be6f357c284354e0ab55b64443"
source = "git+https://github.com/storytold/egui.git?rev=07c20531f89717e461c0f387dd1f9649553f9321#07c20531f89717e461c0f387dd1f9649553f9321"
dependencies = [
"bytemuck",
"egui",
@@ -2918,7 +2916,7 @@ dependencies = [
[[package]]
name = "egui_kittest"
version = "0.37.0"
source = "git+https://github.com/storytold/egui.git?rev=14c39fed181756be6f357c284354e0ab55b64443#14c39fed181756be6f357c284354e0ab55b64443"
source = "git+https://github.com/storytold/egui.git?rev=07c20531f89717e461c0f387dd1f9649553f9321#07c20531f89717e461c0f387dd1f9649553f9321"
dependencies = [
"dify",
"eframe",
@@ -2944,7 +2942,7 @@ checksum = "0e9c71c2167ca323c882b99918929403426e2373ea17242ff5653e0d5e1058be"
[[package]]
name = "emath"
version = "0.37.0"
source = "git+https://github.com/storytold/egui.git?rev=14c39fed181756be6f357c284354e0ab55b64443#14c39fed181756be6f357c284354e0ab55b64443"
source = "git+https://github.com/storytold/egui.git?rev=07c20531f89717e461c0f387dd1f9649553f9321#07c20531f89717e461c0f387dd1f9649553f9321"
dependencies = [
"bytemuck",
]
@@ -3025,7 +3023,7 @@ dependencies = [
[[package]]
name = "epaint"
version = "0.37.0"
source = "git+https://github.com/storytold/egui.git?rev=14c39fed181756be6f357c284354e0ab55b64443#14c39fed181756be6f357c284354e0ab55b64443"
source = "git+https://github.com/storytold/egui.git?rev=07c20531f89717e461c0f387dd1f9649553f9321#07c20531f89717e461c0f387dd1f9649553f9321"
dependencies = [
"ahash",
"bytemuck",
@@ -3051,7 +3049,11 @@ dependencies = [
[[package]]
name = "epaint_default_fonts"
version = "0.37.0"
source = "git+https://github.com/storytold/egui.git?rev=14c39fed181756be6f357c284354e0ab55b64443#14c39fed181756be6f357c284354e0ab55b64443"
source = "git+https://github.com/storytold/egui.git?rev=07c20531f89717e461c0f387dd1f9649553f9321#07c20531f89717e461c0f387dd1f9649553f9321"
dependencies = [
"brotli 9.1.3",
"brotli-decompressor 6.3.2",
]
[[package]]
name = "equivalent"
@@ -3770,16 +3772,16 @@ checksum = "9f4d0e94ddd48749f06bbe4e5389fb9799a0c45bcaf00495042076ef05e3241a"
[[package]]
name = "hayro-cmap"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"brotli",
"brotli 8.0.4",
"hayro-postscript",
]
[[package]]
name = "hayro-interpret"
version = "0.7.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"bitflags 2.13.2",
"hayro-cmap",
@@ -3797,7 +3799,7 @@ dependencies = [
[[package]]
name = "hayro-jbig2"
version = "0.3.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"fearless_simd",
"hayro-ccitt",
@@ -3815,12 +3817,12 @@ dependencies = [
[[package]]
name = "hayro-postscript"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
[[package]]
name = "hayro-syntax"
version = "0.7.2"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"flate2",
"hayro-ccitt",
@@ -4803,7 +4805,7 @@ dependencies = [
[[package]]
name = "krilla"
version = "0.8.2"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"base64 0.22.1",
"bumpalo",
@@ -4960,7 +4962,7 @@ checksum = "d4a5ff6bcca6c4867b1c4fd4ef63e4db7436ef363e0ad7531d1558856bae64f4"
[[package]]
name = "linesweeper"
version = "0.5.0"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
dependencies = [
"arrayvec",
"kurbo 0.13.1",
@@ -10076,7 +10078,7 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
[[package]]
name = "winit"
version = "0.30.13"
source = "git+https://github.com/storytold/winit.git?rev=a517b3846ee8457d84ee4975110bfda6797c44dc#a517b3846ee8457d84ee4975110bfda6797c44dc"
source = "git+https://github.com/storytold/winit.git?rev=0dfcec0eb62fda5904137a63a6dd0c3d83295f45#0dfcec0eb62fda5904137a63a6dd0c3d83295f45"
dependencies = [
"ahash",
"android-activity",
+50 -50
View File
@@ -10,51 +10,51 @@ license = "MIT OR Apache-2.0"
rust-version = "1.95"
[workspace.dependencies]
craft-cms = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735", default-features = false, features = ["interpret", "write"] }
craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
craft-proof = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
craft-cms = { git = "https://github.com/storytold/craft-libs", rev = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d" }
craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d", default-features = false, features = ["interpret", "write"] }
craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d" }
craft-proof = { git = "https://github.com/storytold/craft-libs", rev = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d" }
# Language packs: the Craft apps' shared font store installs them (#4936).
craft-font-store = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
craft-font-catalog = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
craft-font-store = { git = "https://github.com/storytold/craft-libs", rev = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d" }
craft-font-catalog = { git = "https://github.com/storytold/craft-libs", rev = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d" }
# 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 = "186a229c8da8db5916f8a863dfd894f1879af735" }
craft-gzip = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
craft-vectorcraft-format = { git = "https://github.com/storytold/craft-libs", rev = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d" }
craft-gzip = { git = "https://github.com/storytold/craft-libs", rev = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d" }
# `.pcraft` documents: their manifest, full-size composite, preview, layer pixels and ICC profile.
craft-doc = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735", features = ["pcraft-pixels"] }
craft-doc = { git = "https://github.com/storytold/craft-libs", rev = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d", features = ["pcraft-pixels"] }
# Native Affinity documents (craft-libs#914).
craft-affinity = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
craft-affinity = { git = "https://github.com/storytold/craft-libs", rev = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d" }
# Bounded CDR (v1-v27) and CMX (32-bit) reader (craft-libs#778).
craft-cdr = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
craft-cdr = { git = "https://github.com/storytold/craft-libs", rev = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d" }
# SVG parsing, limits, SVGZ and writer (craft-libs#778).
craft-svg = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735", features = ["tree"] }
craft-mime = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
craft-svg = { git = "https://github.com/storytold/craft-libs", rev = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d", features = ["tree"] }
craft-mime = { git = "https://github.com/storytold/craft-libs", rev = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d" }
# EPS container, previews, ASCII85 and DSC comments (craft-libs#778).
craft-eps = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
craft-eps = { git = "https://github.com/storytold/craft-libs", rev = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d" }
# DXF tags, reader and writer (craft-libs#778, #926, #927).
craft-plotter = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
craft-dxf = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
craft-plotter = { git = "https://github.com/storytold/craft-libs", rev = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d" }
craft-dxf = { git = "https://github.com/storytold/craft-libs", rev = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d" }
# WMF, EMF and EMF+ reader (craft-libs#778).
craft-metafile = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
craft-image-codecs = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
craft-gif = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
craft-tiff = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
craft-ps = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735", default-features = false, features = ["read", "write"] }
craft-psd = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
craft-stream-codecs = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
craft-jxl = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
craft-codepage = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
craft-metafile = { git = "https://github.com/storytold/craft-libs", rev = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d" }
craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d" }
craft-image-codecs = { git = "https://github.com/storytold/craft-libs", rev = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d" }
craft-gif = { git = "https://github.com/storytold/craft-libs", rev = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d" }
craft-tiff = { git = "https://github.com/storytold/craft-libs", rev = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d" }
craft-ps = { git = "https://github.com/storytold/craft-libs", rev = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d", default-features = false, features = ["read", "write"] }
craft-psd = { git = "https://github.com/storytold/craft-libs", rev = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d" }
craft-stream-codecs = { git = "https://github.com/storytold/craft-libs", rev = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d" }
craft-jxl = { git = "https://github.com/storytold/craft-libs", rev = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d" }
craft-codepage = { git = "https://github.com/storytold/craft-libs", rev = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d" }
# 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 = "186a229c8da8db5916f8a863dfd894f1879af735" }
craft = { git = "https://github.com/storytold/craft-libs", rev = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d" }
# 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 = "186a229c8da8db5916f8a863dfd894f1879af735" }
craft-theme = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
craft-fonts-build = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
craft-color-ui = { git = "https://github.com/storytold/craft-libs", rev = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d" }
craft-theme = { git = "https://github.com/storytold/craft-libs", rev = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d" }
craft-fonts-build = { git = "https://github.com/storytold/craft-libs", rev = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d" }
# Nightly profile isolation, launch protocol, and security fence.
craft-nightly = { git = "https://github.com/storytold/craft-libs", rev = "1f6c3a21f85ed96f8fd4ddd5a959d4e1edbedb24" }
craft-nightly = { git = "https://github.com/storytold/craft-libs", rev = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d" }
# internal
vectorcraft-geom = { path = "crates/geom" }
vectorcraft-color = { path = "crates/color" }
@@ -194,22 +194,22 @@ lto = "thin"
codegen-units = 1
[patch.crates-io]
hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
hayro-interpret = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
hayro-cmap = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
hayro-postscript = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
krilla = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
linesweeper = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
ecolor = { git = "https://github.com/storytold/egui.git", rev = "14c39fed181756be6f357c284354e0ab55b64443" }
emath = { git = "https://github.com/storytold/egui.git", rev = "14c39fed181756be6f357c284354e0ab55b64443" }
epaint = { git = "https://github.com/storytold/egui.git", rev = "14c39fed181756be6f357c284354e0ab55b64443" }
epaint_default_fonts = { git = "https://github.com/storytold/egui.git", rev = "14c39fed181756be6f357c284354e0ab55b64443" }
egui = { git = "https://github.com/storytold/egui.git", rev = "14c39fed181756be6f357c284354e0ab55b64443" }
egui-winit = { git = "https://github.com/storytold/egui.git", rev = "14c39fed181756be6f357c284354e0ab55b64443" }
egui-wgpu = { git = "https://github.com/storytold/egui.git", rev = "14c39fed181756be6f357c284354e0ab55b64443" }
egui_glow = { git = "https://github.com/storytold/egui.git", rev = "14c39fed181756be6f357c284354e0ab55b64443" }
egui_extras = { git = "https://github.com/storytold/egui.git", rev = "14c39fed181756be6f357c284354e0ab55b64443" }
egui_kittest = { git = "https://github.com/storytold/egui.git", rev = "14c39fed181756be6f357c284354e0ab55b64443" }
eframe = { git = "https://github.com/storytold/egui.git", rev = "14c39fed181756be6f357c284354e0ab55b64443" }
winit = { git = "https://github.com/storytold/winit.git", rev = "a517b3846ee8457d84ee4975110bfda6797c44dc" }
hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d" }
hayro-interpret = { git = "https://github.com/storytold/craft-libs", rev = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d" }
hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d" }
hayro-cmap = { git = "https://github.com/storytold/craft-libs", rev = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d" }
hayro-postscript = { git = "https://github.com/storytold/craft-libs", rev = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d" }
krilla = { git = "https://github.com/storytold/craft-libs", rev = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d" }
linesweeper = { git = "https://github.com/storytold/craft-libs", rev = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d" }
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" }
epaint_default_fonts = { git = "https://github.com/storytold/egui.git", rev = "07c20531f89717e461c0f387dd1f9649553f9321" }
egui = { git = "https://github.com/storytold/egui.git", rev = "07c20531f89717e461c0f387dd1f9649553f9321" }
egui-winit = { git = "https://github.com/storytold/egui.git", rev = "07c20531f89717e461c0f387dd1f9649553f9321" }
egui-wgpu = { git = "https://github.com/storytold/egui.git", rev = "07c20531f89717e461c0f387dd1f9649553f9321" }
egui_glow = { git = "https://github.com/storytold/egui.git", rev = "07c20531f89717e461c0f387dd1f9649553f9321" }
egui_extras = { git = "https://github.com/storytold/egui.git", rev = "07c20531f89717e461c0f387dd1f9649553f9321" }
egui_kittest = { git = "https://github.com/storytold/egui.git", rev = "07c20531f89717e461c0f387dd1f9649553f9321" }
eframe = { git = "https://github.com/storytold/egui.git", rev = "07c20531f89717e461c0f387dd1f9649553f9321" }
winit = { git = "https://github.com/storytold/winit.git", rev = "0dfcec0eb62fda5904137a63a6dd0c3d83295f45" }
+1 -1
View File
@@ -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 = "186a229c8da8db5916f8a863dfd894f1879af735", version = "0.1.0" }
craft-web-api = { git = "https://github.com/storytold/craft-libs", rev = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d", version = "0.1.0" }
wasm-bindgen = "0.2"
serde_json = { workspace = true }
+46 -3
View File
@@ -112,6 +112,43 @@ use prefs::{load_prefs, log_dir, open_store, prefs_enabled};
const DEFAULT_SIZE: [f32; 2] = [1440.0, 900.0];
const MIN_SIZE: [f32; 2] = [800.0, 500.0];
/// Apply the saved main-window placement before the first frame. On a first launch the
/// framework maximizes the window when its default size would not fit the current screen.
fn restore_main_window(window: &winit::window::Window, store: &Store, legacy: Option<vectorcraft_ui_egui::state::LegacyWindow>, wayland: bool) {
use craft::behavior::placement::{Defaults, Placement, place};
use craft::behavior::{Monitor, MonitorKey};
use winit::dpi::{LogicalSize, PhysicalPosition};
let handles: Vec<_> = window.available_monitors().collect();
let monitors: Vec<_> = handles
.iter()
.map(|monitor| {
let size = monitor.size();
let size = [size.width, size.height];
let position = monitor.position();
Monitor::new(MonitorKey::new(monitor.name().unwrap_or_default(), size), [position.x, position.y], size, monitor.scale_factor() as f32)
})
.collect();
let home = window.current_monitor().or_else(|| window.primary_monitor()).and_then(|monitor| handles.iter().position(|m| *m == monitor));
let defaults = Defaults::new(DEFAULT_SIZE, MIN_SIZE).with_no_position(wayland);
let saved = store.get(craft::window::restore::MAIN).or_else(|| {
let old = legacy?;
let mut placement = Placement::new(old.size, window.scale_factor() as f32);
placement.position_px = old.pos;
placement.maximized = old.maximized;
placement.repaired()
});
let placement = place(saved.as_ref(), &monitors, home, &defaults);
if let Some([x, y]) = placement.position_px {
window.set_outer_position(PhysicalPosition::new(x, y));
}
let [width, height] = placement.normal.size;
let _ = window.request_inner_size(LogicalSize::new(width, height));
if placement.maximized {
window.set_maximized(true);
}
}
/// The window, Dock, taskbar and app-switcher icon (`assets/app-icon/`, see its README). macOS gets
/// the version with Apple's transparent margin; elsewhere the full-bleed tile. The app ID matches
/// `packaging/linux/ai.storyteller.vectorcraft.desktop` so Wayland docks find the launcher icon.
@@ -781,9 +818,13 @@ fn main() -> std::process::ExitCode {
Box::new(move |cc| {
let ctx = &cc.egui_ctx;
let winit_window = cc.winit_window().cloned();
let placement = placement_store();
if let Some(window) = &winit_window {
restore_main_window(window, &placement, settings.lock().get().ui.legacy_window, wayland);
}
let spec = InstallSpec::new(shell_info, Arc::new(SystemWindows))
.app_id(vectorcraft_ui_egui::os_window::app_id())
.placement(Arc::new(Mutex::new(placement_store())))
.placement(Arc::new(Mutex::new(placement)))
.frame(decision);
let spec = match start_pen(&winit_window) {
Some(pen) => spec.pen(pen),
@@ -798,7 +839,7 @@ fn main() -> std::process::ExitCode {
};
let (files, file_panels) = file_service(wake, folders);
let files = Arc::new(files);
craft::host::Host::builder(AppInfo {
let host = craft::host::Host::builder(AppInfo {
id: vectorcraft_ui_egui::os_window::SETTINGS_APP_ID,
name: vectorcraft_ui_egui::os_window::name(),
version: vectorcraft_ui_egui::os_window::version(),
@@ -806,7 +847,8 @@ fn main() -> std::process::ExitCode {
.i18n(vectorcraft_ui_egui::i18n::shared())
.settings(Arc::new(settings.clone()))
.files(files.clone())
.install(ctx);
.build();
host.clone().install(ctx);
let mut session = Session::new();
// The profiles loaded before come back before the preferences name any of them.
prefs_dir::attach_profile_store(&mut session);
@@ -831,6 +873,7 @@ fn main() -> std::process::ExitCode {
prefs_dir::attach_proof_setups(&mut session);
prefs_dir::attach_script_data(&mut session);
let mut app = VectorcraftApp::new(session, services(winit_window.clone()));
app.host = Arc::new(host);
app.adopt_context(&cc.egui_ctx);
// A nightly is updated by the Launcher: it never checks for a stable release, which
// would install this program's own updater over the nightly build.
+9 -2
View File
@@ -162,7 +162,7 @@ pub fn specs() -> Vec<CommandSpec> {
"Cut",
["Edit"],
Some("Cmd+X"),
"{selectedArtboards?: [n…], art?: bool, lockedAndHidden?: bool (the Artboard tool chosen, as artboard.cut)} (as edit.copy) removes the objects it copies, in one undo step: a compound-path member selected on its own leaves the compound's other members in the compound (selected ruler guides go too; the Artboard tool chosen, or selectedArtboards given: artboard.cut); refused while an object of a symbol instance's art is selected",
"{artboard?: index (the source artboard for copied objects), selectedArtboards?: [n…], art?: bool, lockedAndHidden?: bool (the Artboard tool chosen, as artboard.cut)} (as edit.copy) removes the objects it copies, in one undo step: a compound-path member selected on its own leaves the compound's other members in the compound (selected ruler guides go too; the Artboard tool chosen, or selectedArtboards given: artboard.cut); refused while an object of a symbol instance's art is selected",
has_selection_guides_or_artboard_tool,
cut
),
@@ -171,7 +171,7 @@ pub fn specs() -> Vec<CommandSpec> {
"Copy",
["Edit"],
Some("Cmd+C"),
"{selectedArtboards?: [n…] (the artboards the Artboard tool had selected, which the journal records for a replay; it runs artboard.copy with any tool chosen), art?: bool (default: the Artboard tool's moveArt option; the journal records it beside selectedArtboards), lockedAndHidden?: bool (the Artboard tool chosen, as artboard.copy)} the selection with what it uses (a compound-path member selected on its own, whole or in part, with Direct or Group Selection, is copied as an ordinary path with the compound's paint, transparency, opacity mask, fill rule and graphic style link (while it has that style's look), a gradient keeping the compound's fit; the compound is copied when it is selected, or when every member is selected whole outside isolation mode), and the selected ruler guides (pasted on the layer new art goes to, moved as the objects are; alone, where they were); the Artboard tool chosen: artboard.copy; with an object of a symbol instance's art selected, the instance is copied whole → {copied, guides}",
"{artboard?: index (the source artboard for copied objects; without it, the artboard containing the selection center), selectedArtboards?: [n…] (the artboards the Artboard tool had selected, which the journal records for a replay; it runs artboard.copy with any tool chosen), art?: bool (default: the Artboard tool's moveArt option; the journal records it beside selectedArtboards), lockedAndHidden?: bool (the Artboard tool chosen, as artboard.copy)} the selection with what it uses (a compound-path member selected on its own, whole or in part, with Direct or Group Selection, is copied as an ordinary path with the compound's paint, transparency, opacity mask, fill rule and graphic style link (while it has that style's look), a gradient keeping the compound's fit; the compound is copied when it is selected, or when every member is selected whole outside isolation mode), and the selected ruler guides (pasted on the layer new art goes to, moved as the objects are; alone, where they were); the Artboard tool chosen: artboard.copy; with an object of a symbol instance's art selected, the instance is copied whole → {copied, guides}",
has_selection_guides_or_artboard_tool,
copy
),
@@ -1163,6 +1163,13 @@ fn copy(s: &mut Session, p: &Value) -> Result<Value> {
});
clip.source_artboard = board.map(|a| a.rect);
}
if let Some(value) = p.get("artboard") {
let board = value
.as_u64()
.and_then(|v| st.doc.artboards.get(index(v)))
.ok_or_else(|| bad("edit.copy", "`artboard` must be the index of an artboard of the document"))?;
clip.source_artboard = Some(board.rect);
}
clip.guides = guides;
s.clipboard = clip;
Ok(json!({ "copied": s.clipboard.nodes.len(), "guides": s.clipboard.guides.len() }))
+41 -4
View File
@@ -185,14 +185,27 @@ fn can_change_mask(s: &Session) -> std::result::Result<(), String> {
/// most one outermost object, which it masks with `ids` (a call's `ids` stand in for the selection
/// here). A targeted layer is one subject root however many objects it selects. `make` itself
/// refuses any single target in those modes, a layer included, so a selection with a target counts
/// as one object.
/// as one object. The check sorts the selection into paint order for its outermost objects only when it has one
/// subject root and no target.
fn can_make(s: &Session) -> std::result::Result<(), String> {
has_doc(s)?;
let Some(st) = s.active() else { return Ok(()) };
let roots = super::appearance::subject_roots(s).map_or(0, |r| r.len());
let outermost = super::edit::outermost(&st.doc, st.selection.in_paint_order(&st.doc)).len();
let targeted = st.selection.target.is_some();
if roots == 1 && (outermost <= 1 || targeted) { super::maskedit::can_edit_mask(s) } else { Ok(()) }
if roots != 1 {
return Ok(());
}
let one = st.selection.target.is_some() || {
#[cfg(test)]
OUTERMOST_FOUND.set(OUTERMOST_FOUND.get() + 1);
super::edit::outermost(&st.doc, st.selection.in_paint_order(&st.doc)).len() <= 1
};
if one { super::maskedit::can_edit_mask(s) } else { Ok(()) }
}
#[cfg(test)]
thread_local! {
/// How many times [`can_make`] found the selection's outermost objects on this thread.
static OUTERMOST_FOUND: std::cell::Cell<u64> = const { std::cell::Cell::new(0) };
}
fn make(s: &mut Session, p: &Value) -> Result<Value> {
@@ -485,6 +498,12 @@ impl Session {
_ => TransparencyInfo::default(),
}
}
/// The first of the objects the Transparency panel shows ([`TransparencyInfo::ids`]), without comparing their
/// values.
pub fn transparency_target(&self) -> Option<NodeId> {
transparency_targets(self, &Value::Null).ok()?.first().copied()
}
}
fn info(s: &mut Session, p: &Value) -> Result<Value> {
@@ -759,4 +778,22 @@ mod tests {
let back = vectorcraft_format::load(&bytes).unwrap();
assert_eq!(back.node(NodeId(a)).unwrap().extras().mask, d.node(NodeId(a)).unwrap().extras().mask);
}
/// Make Opacity Mask's check sorts the selection for its outermost objects only when the selection has one
/// subject root; with several roots it is enabled without that sort.
#[test]
fn the_make_check_sorts_only_a_selection_with_one_root() {
let (mut s, a, b) = session_with_two();
let found = || OUTERMOST_FOUND.get();
select(&mut s, &[a, b]);
let before = found();
assert_eq!(can_make(&s), Ok(()));
assert_eq!(found(), before, "two roots: no paint-order sort");
select(&mut s, &[a]);
assert_eq!(can_make(&s), Ok(()));
assert_eq!(found(), before + 1, "one root: the outermost objects are found");
s.execute("select.none", &json!({})).unwrap();
assert_eq!(can_make(&s), Ok(()));
assert_eq!(found(), before + 1, "no roots: no sort");
}
}
+6 -2
View File
@@ -5,7 +5,9 @@ use super::{NodeId, Value, cmd, find_command};
/// Objects and Distribute Spacing with Align to Artboard distribute objects across it, All on
/// Active Artboard selects on it, and Edit Symbol from the Symbols panel centers the symbol's art
/// on it. A `command.batch` given `artboard` passes it on to each of their steps that names none.
pub const ON_ACTIVE_ARTBOARD: [&str; 8] = [
pub const ON_ACTIVE_ARTBOARD: [&str; 10] = [
"edit.copy",
"edit.cut",
"edit.pasteInPlace",
"edit.pasteInFront",
"edit.pasteInBack",
@@ -35,7 +37,9 @@ pub const DRAWS_SHAPE: [&str; 5] = ["shape.rectangle", "shape.ellipse", "shape.p
/// Artboard tool had selected for its commands and for Paste in Place, in Front and in Back; the artboards and art Cut and Copy took with that
/// tool chosen; the view's center the app passes to Edit Symbol); an action leaves them out
/// ([`Session::journal_for_action`]).
const REPLAY_ONLY: [(&str, &str); 35] = [
const REPLAY_ONLY: [(&str, &str); 37] = [
("edit.copy", "artboard"),
("edit.cut", "artboard"),
("file.new", "created"),
("edit.newDocumentFromState", "created"),
("document.save", "modified"),
+54 -8
View File
@@ -338,32 +338,78 @@ fn made_content(infos: &[SlotInfo], made: Vec<Option<Made>>, laid: bool) -> Vec<
/// it, as far as strokes round type reach) as type the page draws. How many of the page's text
/// objects no made type takes, shown or not: none that holds a piece of the object has its words
/// ([`spelling`]). Past `MAX_PAIRS` comparisons nothing is marked or counted (`None`).
///
/// The page can draw two text objects as one word: a word and a letter set apart from it (a swash
/// "h" after "Spirit") come out of the page as one piece, "Spirith", that neither spells. A word
/// left that is the last word of one text object holding the piece joined to the first word of
/// another that holds it and draws after it, along the first one's lines, is theirs
/// ([`joined_by_two`]).
fn see_page_type(content: &mut [Content], shown: &[Vec<Arc<Node>>]) -> Option<usize> {
let texts = |o: &[Arc<Node>]| o.iter().filter_map(|n| if let NodeKind::Text(_) = &n.kind { Some(n.clone()) } else { None }).collect::<Vec<_>>();
// Each object's pieces of type, and the words of them that no made type holding it has yet.
let mut objects: Vec<(Vec<Rect>, Vec<String>, bool)> =
shown.iter().map(|o| (texts(o).iter().filter_map(|n| n.visual_bounds()).collect(), object_words(o), false)).collect();
let pieces: usize = objects.iter().map(|o| o.0.len()).sum();
if content.len().saturating_mul(pieces) > MAX_PAIRS {
return None;
}
let mut budget = MAX_PAIRS.checked_sub(content.len().checked_mul(pieces)?)?;
let holds = |drawn: Rect, r: &Rect| drawn.inflate(OUTLINE_REACH, OUTLINE_REACH).intersect(*r).area() >= 0.5 * r.area().max(1e-9);
for c in content {
let Content::Made(node, region, seen) = c else { continue };
// The made type holding each object, in order: where it draws and its words.
let mut holders: Vec<Vec<Arc<Holder>>> = vec![vec![]; objects.len()];
let mut seen_slots = Vec::new();
for (slot, c) in content.iter().enumerate() {
let Content::Made(node, region, _) = c else { continue };
// Hidden made type has no region: where it draws, shown, is its own box.
let Some(drawn) = region.or_else(|| node.visual_bounds()) else { continue };
let spelled = if let NodeKind::Text(t) = &node.kind { spelling(&t.plain_text()) } else { String::new() };
for (rects, words, held) in &mut objects {
let (spelled, holder) = match &node.kind {
NodeKind::Text(t) => {
let text = t.plain_text();
let [a, b, ..] = t.xf.as_coeffs();
(spelling(&text), Some(Arc::new((drawn.center(), (a, b), word_pieces(&text).map(spelling).filter(|w| !w.is_empty()).collect()))))
}
_ => (String::new(), None),
};
for ((rects, words, held), by) in objects.iter_mut().zip(&mut holders) {
if rects.iter().any(|r| holds(drawn, r)) {
*held = true;
*seen |= region.is_some();
if region.is_some() && seen_slots.last() != Some(&slot) {
seen_slots.push(slot);
}
words.retain(|w| !spelled.contains(w.as_str()));
by.extend(holder.clone());
}
}
}
for ((_, words, _), by) in objects.iter_mut().zip(&holders) {
if !words.is_empty() && !by.is_empty() {
// Each unmatched word can visit every ordered pair of holders, plus the first-holder scan.
budget = budget.checked_sub(words.len().checked_mul(by.len())?.checked_mul(by.len().checked_add(1)?)?)?;
words.retain(|w| !joined_by_two(w, by));
}
}
for slot in seen_slots {
if let Content::Made(_, _, seen) = &mut content[slot] {
*seen = true;
}
}
Some(objects.iter().filter(|(_, words, held)| !held || !words.is_empty()).count())
}
/// A made text object that holds a piece of the page's type: the centre of where it draws, the
/// way its lines run (the first column of its transform) and its words ([`spelling`]).
type Holder = (Point, (f64, f64), Vec<String>);
/// Is `word` (a [`spelling`]) the last word of one of `by` joined to the first word of another of
/// them that draws after it, along the first one's lines? Each part is a whole word of its text
/// object, so a piece is never made up of bits of words.
fn joined_by_two(word: &str, by: &[Arc<Holder>]) -> bool {
by.iter().map(Arc::as_ref).any(|(at, (a, b), first)| {
let Some(head) = first.last().filter(|h| word.len() > h.len() && word.starts_with(h.as_str())) else { return false };
let tail = &word[head.len()..];
by.iter()
.map(Arc::as_ref)
.any(|(next, _, second)| (next.x - at.x) * a + (next.y - at.y) * b > 0.0 && second.first().is_some_and(|w| w == tail))
})
}
/// What goes into each of `infos`' slots when the file's text document can't make the type of every
/// slot that shows: type made from the text document (`made`) where it can, else the page's type that
/// the text document puts where the page has it, else the page's type in a copy that a layer's or
+32
View File
@@ -8663,3 +8663,35 @@ fn trusted_editing_data_keeps_an_artboard_taller_than_its_pdf_page() {
let (_, w, read) = crate::layered_ai(&private(&art), Document::new(12000.0, 14400.0), vec![], false, true, 1.0);
assert!(!read, "the uncapped dimension must still match: {w:?}");
}
/// The page's "2014" drawn as one piece 20 points across the art, and two text objects "20" and
/// "14" anchored at `twenty` and `fourteen`, set in the bundled Source Sans 3 at 14 points (a digit
/// 6.958 points wide) so that where they draw doesn't hang on the fonts installed.
fn word_of_two_text_objects(fourteen: f64, twenty: f64) -> crate::import::Imported {
let stories = [("20\r", 0, (twenty, 8180.0), (0.0, 0.0), 0.0), ("14\r", 0, (fourteen, 8180.0), (0.0, 0.0), 0.0)];
let doc = text_document(&stories).replacen("/0 (Helvetica)", "/0 (SourceSans3-Regular)", 1);
let art = native_with_text(&layer("Art", true, &(text_object(0) + &text_object(1))), &doc);
let page = "0 1 0 0 setcmykcolor /SourceSans3-Regular findfont 14 scalefont setfont 20 61.5 moveto (2014) show";
import(&eps(page, &art)).unwrap()
}
/// The page can draw two text objects as one word: "20" and "14" set one after the other come out
/// of the page as one piece, "2014", that neither spells. The word is the last word of the one
/// joined to the first word of the one after it, so the page's type is theirs and nothing is noted
/// as left out.
#[test]
fn a_word_the_page_draws_from_two_text_objects_in_a_row_is_their_type() {
let r = word_of_two_text_objects(8161.5 + 13.916, 8161.5);
assert_eq!(names(&r.document), ["Art"], "{:?}", r.warnings);
let texts: Vec<String> = text_of(&r.document.layers[0]).iter().map(|t| t.plain_text()).collect();
assert_eq!(texts, ["20", "14"], "{:?}", r.warnings);
assert!(!r.warnings.iter().any(|w| crate::is_loss(w)), "{:?}", r.warnings);
}
/// The two text objects the other way round ("14" before "20") don't make the page's "2014": its
/// word keeps the loss note.
#[test]
fn two_text_objects_the_other_way_round_arent_the_word_the_page_draws() {
let r = word_of_two_text_objects(8161.5, 8161.5 + 13.916);
assert!(r.warnings.iter().any(|w| w.contains("some of the page's type has no text object in the layers")), "{:?}", r.warnings);
}
+10
View File
@@ -139,6 +139,7 @@ impl VectorcraftApp {
spelling: Default::default(),
text_nodes: Default::default(),
momentary: None,
hand: None,
selection_box: None,
selection_bounds: None,
selection_marks: None,
@@ -716,7 +717,13 @@ impl VectorcraftApp {
export_progress::show(self, ui);
// After every window this pass may open, and before the palette's field takes the keyboard.
panel_docking::close_overlays_for_modal(self, &ctx);
let drawn_document = self.session.active().map(|st| (st.uid, st.revision));
dialogs::host::pump(self, &ctx);
// The canvas has already painted. A dialog can apply or roll back its preview
// on the final input frame, with no further mouse movement to wake the window.
if self.session.active().map(|st| (st.uid, st.revision)) != drawn_document {
ctx.request_repaint();
}
prefs_dialog::show(self, ui);
crate::shortcut_editor::show(self, ui);
credits::open_taken_link(self);
@@ -823,6 +830,9 @@ pub(crate) fn root_env(prefs: &vectorcraft_engine::Prefs, native_ppp: f32, print
root.escape_leaves_fields = true;
// A held key repeats its command (Cmd+= keeps zooming in).
root.shortcuts_repeat = true;
// The wheel steps a focused number field only while the pointer is over it; elsewhere it scrolls what is under the
// pointer.
root.pointer_scoped_field_wheel = true;
root
}
+2 -1
View File
@@ -129,11 +129,12 @@ impl VectorcraftApp {
/// document without artboards they get neither.
fn add_active_artboard(&self, id: &str, params: &mut Value) {
let paste = matches!(id, "edit.pasteInPlace" | "edit.pasteInFront" | "edit.pasteInBack");
let clipboard_command = paste || matches!(id, "edit.copy" | "edit.cut");
if (vectorcraft_engine::ON_ACTIVE_ARTBOARD.contains(&id) || id == "command.batch")
&& params.get("artboard").is_none()
&& !(paste && params.get("artboards").is_some())
&& self.view().is_some()
&& let Some(n) = self.session.active().map(|d| d.doc.artboards.len()).filter(|n| *n > 0 || !paste)
&& let Some(n) = self.session.active().map(|d| d.doc.artboards.len()).filter(|n| *n > 0 || !clipboard_command)
&& let Some(p) = params.as_object_mut()
{
let picked = panels::artboards::picked(self, n);
+1
View File
@@ -81,6 +81,7 @@ pub struct CanvasCache {
/// The Hand, Zoom and Rotate View tools the Space key and its chords lend the canvas, between
/// passes; the tool adapter takes it out for its call and puts it back.
pub momentary: Option<craft::ui::canvas::Momentary>,
pub hand: Option<craft::ui::canvas::HandTool>,
/// [`VectorcraftApp::selection_box`] for (document uid, revision, Use Preview Bounds and
/// Measure Type by Glyph Bounds).
pub selection_box: Option<((u64, u64, vectorcraft_effects::preview::Measure), Option<vectorcraft_doc::OrientedBox>)>,
+36
View File
@@ -426,6 +426,23 @@ fn a_click_activates_its_artboard_and_paste_in_place_goes_onto_it() {
assert_eq!((b.x0, b.y0), (boards[2].x0 + 10.0, boards[2].y0 + 15.0));
}
/// Copy uses the active board as its origin even when selected art lies on a different board.
#[test]
fn copy_and_paste_use_the_active_source_and_destination_artboards() {
let mut app = VectorcraftApp::new(Session::new(), Default::default());
app.run("file.new", json!({"width": 200, "height": 100, "artboards": 3})).unwrap();
let boards: Vec<_> = app.session.active().unwrap().doc.artboards.iter().map(|a| a.rect).collect();
let origin = Point::new(boards[1].x0 + 10.0, boards[1].y0 + 15.0);
app.run("shape.rectangle", json!({"x": origin.x, "y": origin.y, "width": 20, "height": 20})).unwrap();
app.views[0].artboard = 0;
app.run("edit.copy", json!({})).unwrap();
app.views[0].artboard = 2;
let pasted = app.run("edit.pasteInPlace", json!({})).unwrap();
let id = vectorcraft_doc::NodeId(pasted["ids"][0].as_u64().unwrap());
let bounds = app.session.active().unwrap().doc.bounds_of(&[id], false).unwrap();
assert_eq!(bounds.origin(), origin + (boards[2].origin() - boards[0].origin()));
}
/// A Shift-click with the Selection tool on an empty spot inside an artboard makes it the active
/// one and keeps the selection, and Align to Artboard then aligns the objects to it unless the
/// call names another artboard.
@@ -4926,6 +4943,25 @@ fn a_flip_during_a_press_waits_for_the_release() {
assert_eq!(app.session.tool_id(), "eraser", "the frame after the release");
}
/// A selected Hand tracks its drag in the framework, outside the document tool's grab.
#[test]
fn turning_the_pen_during_a_hand_drag_waits_for_release() {
let (mut app, stylus, ctx) = pen_app();
app.select_tool("hand");
let at = app.canvas_view().unwrap().rect.center();
let to = at + egui::vec2(30.0, 20.0);
let button = |pos, pressed| egui::Event::PointerButton { pos, button: egui::PointerButton::Primary, pressed, modifiers: Default::default() };
stylus.set(tip(0.5));
frame(&mut app, &ctx, vec![egui::Event::PointerMoved(at), button(at, true)]);
stylus.set(eraser_end(0.5));
frame(&mut app, &ctx, vec![egui::Event::PointerMoved(to)]);
assert_eq!(app.session.tool_id(), "hand");
frame(&mut app, &ctx, vec![button(to, false)]);
assert_eq!(app.session.tool_id(), "hand");
frame(&mut app, &ctx, vec![]);
assert_eq!(app.session.tool_id(), "eraser");
}
/// #764: a tool chosen while the eraser end stands in (the toolbar and shortcuts call
/// `select_tool`; menus and MCP run `tool.select`) stays when the tip comes back.
#[test]
@@ -127,10 +127,12 @@ fn a_hand_drag_held_near_the_edge_does_not_scroll_on() {
let (mut app, ctx, _) = zoomed_in("hand");
let rect = app.canvas_view().unwrap().rect;
let start = rect.center();
let before = center(&app);
frame(&mut app, &ctx, vec![egui::Event::PointerMoved(start), button(start, true)]);
let edge = pos2(rect.right() - 4.0, start.y);
frame(&mut app, &ctx, vec![egui::Event::PointerMoved(edge)]);
let c0 = center(&app);
assert!(c0.x < before.x, "dragging the selected Hand right must pan the view");
for _ in 0..3 {
frame(&mut app, &ctx, vec![]);
}
+12
View File
@@ -629,6 +629,7 @@ pub(crate) fn run(app: &mut VectorcraftApp, ui: &mut Ui, pass: &ToolPass) -> Too
// the release, and a pointer over another window for the pointer to come in.
if ui.ctx().current_pass_index() == 0
&& app.canvas.grab.is_none()
&& !ToolHost::in_gesture(ui.ctx(), pass.id)
&& ui.input(|i| i.pointer.has_pointer())
&& crate::stylus::sync_eraser_tool(app)
{
@@ -650,7 +651,18 @@ pub(crate) fn run(app: &mut VectorcraftApp, ui: &mut Ui, pass: &ToolPass) -> Too
let mut picked = ToolHostResponse::default();
let mut response = if crate::dialogs::recolor::edit_tab::with_theme_pick(app, |app, tool| picked = host_run(app, ui, pass, tool)) {
picked
} else if app.session.tool_id() == "hand" && app.ui.screen_mode != 3 && app.ui.rearrange_placement.is_none() {
let options = crate::app::view::navigation(&app.session.prefs);
let mut hand = app.canvas.hand.take().unwrap_or_else(|| craft::ui::canvas::HandTool::new(options));
hand.options = options;
let response = host_run(app, ui, pass, &mut hand);
if response.gesture.is_some() && !view_tool_held(app) && ui.input(|i| i.pointer.primary_down() || i.pointer.primary_pressed()) {
crate::shortcuts::note_tool_use(app);
}
app.canvas.hand = Some(hand);
response
} else {
app.canvas.hand = None;
let mut tool = SessionTool::new(app, view_info, ui);
let response = host_run_session(&mut tool, ui, pass);
drop(tool);
+14 -4
View File
@@ -42,7 +42,7 @@ use std::sync::Arc;
use std::sync::atomic::{AtomicU64, Ordering};
use craft::menu::Node;
use craft::ui::contract::Show as _;
use craft::ui::contract::{Bind, Show as _};
use craft::ui::dialog::{DialogId, DialogResult, DialogStack, Prompt, StackDialog, dialog_id};
use craft::ui::display::{Shade, Text};
use craft::ui::patterns::form_dialogs::{DialogFields, HostedParamDialog, Param, ParamDialog};
@@ -548,7 +548,13 @@ pub(super) fn heading(plugin: &str, command: Option<&str>, gone: &str) -> String
/// The builder of a hosted plug-in dialog over its values: the rows of `all` whose parameter is
/// shown for the values (`m.visible`), after the description. The rows are made again in the UI
/// language when it changes while the dialog is open; the field values stay as they are.
fn build(key: &'static str, m: Manifest, all: Arc<[Param]>, look: Look) -> impl for<'b> Fn(&'b mut DialogFields) -> ParamDialog<'b> + Send + 'static {
fn build(
key: &'static str,
m: Manifest,
all: Arc<[Param]>,
look: Look,
canvas: Option<egui::Id>,
) -> impl for<'b> Fn(&'b mut DialogFields) -> ParamDialog<'b> + Send + 'static {
let rows_in = std::sync::Mutex::new((lang(), all));
move |fields| {
let all = {
@@ -564,7 +570,10 @@ fn build(key: &'static str, m: Manifest, all: Arc<[Param]>, look: Look) -> impl
rows.push(Param::read_only_text("description", "", look.description.clone()).full_width());
}
rows.extend(all.iter().filter(|p| shown.contains(p.key.as_str())).cloned());
let mut dialog = ParamDialog::new(key, look.heading(), Cow::Owned(rows)).previews(look.previews);
let mut dialog = ParamDialog::new(key, look.heading(), Cow::Owned(rows)).previews(look.previews).values(Bind::bound(fields));
if let Some(canvas) = canvas.filter(|_| look.previews) {
dialog = dialog.canvas(canvas);
}
if let Some(ok) = look.ok {
dialog = dialog.ok_label(ok.into());
}
@@ -592,7 +601,8 @@ fn open_hosted(
close_open(app);
let all: Arc<[Param]> = form::plugin_params(&m, &values).into();
let fields = form::fields_of(&all, &values);
let dialog = HostedParamDialog::new(&ctx, key, fields, build(key, m, Arc::clone(&all), look)).instance(instance.to_string());
let canvas = crate::doc_windows::current(app).map(crate::canvas::canvas_id);
let dialog = HostedParamDialog::new(&ctx, key, fields, build(key, m, Arc::clone(&all), look, canvas)).instance(instance.to_string());
let id = dialogs.with(|host| host.open(dialog));
Ok((id, all))
}
+5
View File
@@ -150,11 +150,16 @@ pub(crate) fn open(app: &mut VectorcraftApp, kind: Kind, tool: &Value) {
let document = app.session.active().map(|doc| (doc.uid, doc.reverts));
let rows = rows(app, kind, &opening);
let fields = fields_of(&rows, &opening);
let canvas = crate::doc_windows::current(app).map(crate::canvas::canvas_id);
let dialog = HostedParamDialog::new(&ctx, kind.command(), fields, move |f| {
if kind == Kind::Move {
link_distance_and_angle(f);
}
let dialog = ParamDialog::new(kind.command(), kind.title(), rows.clone()).previews(true).values(Bind::bound(f));
let dialog = match canvas {
Some(canvas) => dialog.canvas(canvas),
None => dialog,
};
if kind == Kind::Move { dialog.remember(MOVE_KEY) } else { dialog }
});
// A dialog this one replaces leaves its preview behind otherwise.
+1 -1
View File
@@ -114,7 +114,7 @@ pub(crate) fn family_picker<'a>(
.filters(filters)
.sets(sets)
.scripts(&FontScript::ALL)
.filter_layout(FilterLayout::Chips)
.filter_layout(FilterLayout::Toolbar)
}
/// What one pass of a picker reads of the app, for a host that has no `app` while it draws (a dialog).
+2
View File
@@ -92,6 +92,8 @@ pub use run::{check_params, run_ui_command};
pub(crate) use run::{normalize_panel, opt_bool, opt_index, opt_number};
#[cfg(test)]
use slots::RECENT_FONT_IDS;
#[cfg(test)]
pub(crate) use state::WHY_OFF_ASKED;
pub use state::{checked, enabled, plugin_revision, shortcut_of, shown_state};
pub(crate) use state::{command_shortcuts, shown_state_with, why_off};
pub(crate) use submenus::PATH_EFFECTS;
+32 -2
View File
@@ -640,8 +640,12 @@ impl Build<'_> {
state = state.checked(on);
}
let mut item = item;
let tip = if id == "ui.expandDialog" && vectorcraft_engine::cmd::expand::has_appearance(&self.app.session) {
Some(crate::i18n::tr(self.lang, crate::dialogs::expand::appearance_first()).to_string())
// Expand… dimmed for appearance attributes says so in its tooltip; `why` holds what its check found, kept from
// the state above.
let appearance_first = crate::dialogs::expand::appearance_first();
let why = if id == "ui.expandDialog" { self.checks.why_off(self.app, id) } else { None };
let tip = if why.as_ref().is_some_and(|w| w.as_deref() == Some(appearance_first)) {
Some(crate::i18n::tr(self.lang, appearance_first).to_string())
} else if enabled {
None
} else {
@@ -847,4 +851,30 @@ mod tests {
assert!(app.menus.states.get(&CommandRef::new(id)).is_some_and(|s| !s.is_enabled()), "{id} is still dimmed");
}
}
/// A rebuild walks the selection's appearance once for Object › Expand…, for its state and its tooltip together.
#[test]
fn a_rebuild_walks_the_appearance_once_for_expand() {
let (mut app, ctx) = app_with_document();
let expand = CommandRef::new("ui.expandDialog");
let tooltip = |app: &VectorcraftApp| app.menus.bar.items().into_iter().find(|it| it.command == expand).and_then(|it| it.tooltip.clone());
let walks = |app: &mut VectorcraftApp| {
super::super::state::APPEARANCE_WALKS.set(0);
refresh(app, &ctx);
super::super::state::APPEARANCE_WALKS.get()
};
app.run("shape.rectangle", json!({"x": 0, "y": 0, "width": 10, "height": 10})).unwrap();
assert_eq!(walks(&mut app), 1, "a plain rectangle");
assert!(app.menus.states.get(&expand).is_some_and(CommandState::is_enabled));
assert_eq!(tooltip(&app), None);
app.run("appearance.addFill", json!({})).unwrap();
assert_eq!(walks(&mut app), 1, "two fills");
assert!(app.menus.states.get(&expand).is_some_and(|s| !s.is_enabled()));
assert_eq!(tooltip(&app).as_deref(), Some(crate::dialogs::expand::appearance_first()));
app.run("select.none", json!({})).unwrap();
assert_eq!(walks(&mut app), 0, "nothing selected");
// Dimmed with nothing selected, the row keeps the general reason as its tooltip, as before.
let tip = tooltip(&app);
assert!(tip.as_deref().is_some_and(|t| t != crate::dialogs::expand::appearance_first()), "{tip:?}");
}
}
+21 -4
View File
@@ -301,9 +301,30 @@ pub(crate) fn why_off(app: &VectorcraftApp, id: &str) -> Option<Option<String>>
Err(why) => Some(Some(why)),
};
}
if id == "ui.expandDialog" {
return expand_dialog_off(app);
}
(!ui_enabled(app, id)).then_some(None)
}
#[cfg(test)]
thread_local! {
/// How many times [`expand_dialog_off`] walked the selection's appearance on this thread.
pub(crate) static APPEARANCE_WALKS: std::cell::Cell<usize> = const { std::cell::Cell::new(0) };
}
/// Why Object › Expand… can't open now: dimmed with nothing selected, and with
/// [`crate::dialogs::expand::appearance_first`] for appearance attributes, which Expand Appearance expands first
/// (#3089). The selection's appearance is walked once, for the row's state and its tooltip together.
fn expand_dialog_off(app: &VectorcraftApp) -> Option<Option<String>> {
if !app.session.active().is_some_and(|d| !d.selection.is_empty()) {
return Some(None);
}
#[cfg(test)]
APPEARANCE_WALKS.set(APPEARANCE_WALKS.get() + 1);
vectorcraft_engine::cmd::expand::has_appearance(&app.session).then(|| Some(crate::dialogs::expand::appearance_first().to_string()))
}
/// Can UI command `id` run now?
fn ui_enabled(app: &VectorcraftApp, id: &str) -> bool {
match id {
@@ -394,10 +415,6 @@ fn ui_enabled(app: &VectorcraftApp, id: &str) -> bool {
id if id.starts_with(crate::panels::symbols::USER_SLOT) => crate::panels::symbols::user_library(app, id).is_some(),
"ui.saveBrushLibrary" => crate::panels::brushes::has_brushes(app),
id if id.starts_with(crate::panels::brushes::USER_SLOT) => crate::panels::brushes::user_library(app, id).is_some(),
// Dimmed for appearance attributes, which Expand Appearance expands first (#3089).
"ui.expandDialog" => {
app.session.active().is_some_and(|d| !d.selection.is_empty()) && !vectorcraft_engine::cmd::expand::has_appearance(&app.session)
}
"ui.spotColors" => app.session.active().is_some(),
"ui.menuDialog" => app.session.active().is_some_and(|d| !d.selection.is_empty()),
"ui.simplifyAuto" | "ui.simplifyMoreOptions" => crate::dialogs::simplify_slider::showing(app),
+48 -1
View File
@@ -681,13 +681,35 @@ pub(crate) fn mixed_paints(app: &VectorcraftApp, ctx: &egui::Context) -> (bool,
match pstate::<Option<(Key, (bool, bool))>>(ctx, "proxy-mixed") {
Some((k, mixed)) if k == key => mixed,
_ => {
let mixed = app.session.proxy_mixed();
let mixed = walk_mixed_paints(app);
set_pstate(ctx, "proxy-mixed", Some((key, mixed)));
mixed
}
}
}
/// [`mixed_paints`] for readers without a `Ui`, such as the panel menus' states: from the same cache while the app
/// has its interface context, else from a walk of the selection.
pub(crate) fn mixed_paints_now(app: &VectorcraftApp) -> (bool, bool) {
match &app.ui_ctx {
Some(ctx) => mixed_paints(app, ctx),
None => walk_mixed_paints(app),
}
}
/// [`vectorcraft_engine::Session::proxy_mixed`], which walks the selection.
fn walk_mixed_paints(app: &VectorcraftApp) -> (bool, bool) {
#[cfg(test)]
MIXED_PAINT_WALKS.set(MIXED_PAINT_WALKS.get() + 1);
app.session.proxy_mixed()
}
#[cfg(test)]
thread_local! {
/// How many times [`walk_mixed_paints`] walked the selection on this thread.
pub(crate) static MIXED_PAINT_WALKS: std::cell::Cell<u64> = const { std::cell::Cell::new(0) };
}
/// The stroke the Stroke panel, Control bar and Properties show: while the Type tool edits text,
/// the selected characters' stroke, else [`vectorcraft_engine::Session::shown_stroke`].
pub(crate) fn current_stroke(app: &VectorcraftApp) -> Option<StrokeLayer> {
@@ -1108,6 +1130,31 @@ pub(crate) fn popover_body<R>(ui: &mut Ui, mut body: impl FnMut(&mut Ui) -> R) -
mod tests {
use super::*;
/// The panel menus' states (the Color and Color Wheel menus) read whether the fill and stroke differ from the
/// proxies' cache: one walk of the selection for each revision, which the proxies read too.
#[test]
fn panel_menu_states_walk_the_mixed_paints_once_per_revision() {
let mut app = crate::VectorcraftApp::new(vectorcraft_engine::Session::new(), Default::default());
let ctx = crate::testing::ui_context();
app.adopt_context(&ctx);
app.run("file.new", json!({"width": 200, "height": 200})).unwrap();
for x in [10, 60, 110] {
app.run("shape.rectangle", json!({"x": x, "y": 10, "width": 40, "height": 40})).unwrap();
}
app.run("select.all", json!({})).unwrap();
let walks = || MIXED_PAINT_WALKS.get();
let start = walks();
let mut states = CommandStates::new();
panel_menu_states(&app, &mut states);
assert_eq!(walks(), start + 1, "the menus walk the selection once");
panel_menu_states(&app, &mut states);
assert_eq!(mixed_paints(&app, &ctx), (false, false));
assert_eq!(walks(), start + 1, "the same revision is not walked again, by the menus or the proxies");
app.run("paint.setFill", json!({"color": "#ff0000"})).unwrap();
panel_menu_states(&app, &mut states);
assert_eq!(walks(), start + 2, "an edit is walked again");
}
#[test]
fn proxy_events_run_their_commands() {
let ran = |activated, double, swap, defaults| -> Vec<(&'static str, Value)> { proxy_commands(activated, double, swap, defaults) };
@@ -89,7 +89,9 @@ fn actions_play_on_the_artboard_active_when_they_play() {
app.ui.actions.push(Action { set, ..Action::new(name, steps) }).unwrap();
set_actions(app, 0).len() - 1
};
app.view_mut().unwrap().artboard = 1;
app.run("edit.copy", json!({})).unwrap();
app.view_mut().unwrap().artboard = 0;
let align = record(&mut app, "Align Left", "object.align", json!({"horizontal": "left", "to": "artboard"}));
assert_eq!(bounds(&app, &[rect]).x0, boards[0].x0, "aligned to artboard 0 while recording");
let paste = record(&mut app, "Paste in Place", "edit.pasteInPlace", json!({}));
+17 -8
View File
@@ -34,8 +34,8 @@ use craft::theme::Variant;
use craft::theme::variant::Tone;
use craft::ui::buttons::{Button, IconButton};
use craft::ui::contract::{
Bind, CollectionEvent, Entry, Props as _, RowAlign, SelectMode, Show as _, ShowCollection as _, ShowContainer as _, Sizing, TooltipSpec, clicked,
request_rename,
Bind, CollectionEvent, Entry, Props as _, RowAlign, Scroll, SelectMode, Show as _, ShowCollection as _, ShowContainer as _, Sizing, TooltipSpec,
clicked, request_rename,
};
use craft::ui::dialog::StackDialog as _;
use craft::ui::display::{Divider, Shade, Text};
@@ -524,13 +524,22 @@ pub fn show(app: &mut VectorcraftApp, ui: &mut Ui) {
let (selection, saving) = (&mut model.selection, &mut model.saving);
let (mut export_clicked, mut footer, mut screens) = (false, None, false);
// The grid takes the room the settings, Export and the footer bar leave.
// The settings scroll in at most half the panel's height, so a long list of format rows stays reachable.
// The preset name row stays below them, in view when Save As Preset opens it.
let settings_room = ui.available_height() / 2.0;
let settings_id = ui.scope_id().with(("asset-export-settings", uid));
let footed = Stack::new().fill().footer(|ui, _| {
crate::panels::section(tl!("Export Settings")).show(ui, |ui, _| {
let (change, files_each) = settings(ui, st);
(seen.change, seen.files_each) = (change, files_each);
seen.format_3d = format_3d(ui, st, &sel_or_all(&shown_sel, &all));
seen.save = save_row(ui, saving);
});
Stack::new().id(settings_id).label(tl!("Export Settings")).fill_width().scroll(Scroll::vertical()).room_height(settings_room).show(
ui,
|ui, _| {
crate::panels::section(tl!("Export Settings")).show(ui, |ui, _| {
let (change, files_each) = settings(ui, st);
(seen.change, seen.files_each) = (change, files_each);
seen.format_3d = format_3d(ui, st, &sel_or_all(&shown_sel, &all));
});
},
);
seen.save = save_row(ui, saving);
Row::new().fill_width().align(RowAlign::End).show(ui, |ui, _| {
let label = if shown_sel.is_empty() || shown_sel.len() == all.len() {
tl!("Export").to_string()
+17 -13
View File
@@ -6,7 +6,6 @@ use std::cell::RefCell;
use std::collections::HashSet;
use std::rc::Rc;
use std::sync::{Arc, Mutex, Weak};
use std::time::SystemTime;
// PLAN: assumed the framework paths below (craft::text::ui re-exports, craft_ui widgets and runtime, craft::font_manager).
use craft::behavior::EditEvent;
@@ -47,12 +46,15 @@ use crate::font_menu;
/// attributes of the paragraph the selection starts in (else of the first paragraph).
/// Font/paragraph controls and named-style capture use this; dimensional fields use `shared_effective`.
pub(crate) fn text_style(app: &VectorcraftApp) -> Option<(CharStyle, vectorcraft_doc::ParaStyle)> {
let state = app.session.active()?;
// Hover changes the canvas, but the picker compares its next row click against the committed font.
let doc = state.interaction.as_ref().filter(|_| app.font_preview_owner.is_some()).map_or(&state.doc, |preview| &preview.doc);
if let Some((id, a, b)) = text_editing(app)
&& let Some(NodeKind::Text(t)) = app.session.active().and_then(|d| d.doc.node(id)).map(|n| &n.kind)
&& let Some(NodeKind::Text(t)) = doc.node(id).map(|n| &n.kind)
{
return Some((vectorcraft_text::edit::insertion_style(&t.runs, a, b), t.para_at(t.paragraphs_in(a, a).start).clone()));
}
let t = first_selected_text(app)?;
let NodeKind::Text(t) = &first_selected_text_node_in(state, doc)?.kind else { return None };
Some((t.first_style(), t.para_at(0).clone()))
}
@@ -68,7 +70,11 @@ pub(crate) fn first_selected_text(app: &VectorcraftApp) -> Option<&vectorcraft_d
/// their descendants, in selection order, then paint order within each selected object.
pub(crate) fn first_selected_text_node(app: &VectorcraftApp) -> Option<&vectorcraft_doc::Node> {
let st = app.session.active()?;
for node in st.selection.objects.iter().filter_map(|id| st.doc.node(*id)) {
first_selected_text_node_in(st, &st.doc)
}
fn first_selected_text_node_in<'a>(state: &DocState, doc: &'a vectorcraft_doc::Document) -> Option<&'a vectorcraft_doc::Node> {
for node in state.selection.objects.iter().filter_map(|id| doc.node(*id)) {
let mut text = None;
node.walk(&mut |n| {
if text.is_none() && matches!(n.kind, NodeKind::Text(_)) {
@@ -1219,19 +1225,17 @@ pub(crate) fn controls(app: &mut VectorcraftApp, ui: &mut Ui, rows: CharacterRow
let languages: Option<Vec<(String, String)>> =
rows.contains(CharacterRows::STYLE_TOGGLES).then(|| LANGUAGES.iter().map(|(name, _, _)| (name.to_string(), name.to_string())).collect());
let catalog = vectorcraft_text::FontDb::global().catalog();
let before = font_menu::picker_settings(app);
let mut settings = before.clone();
let document = font_menu::document_family_set(app);
let recent = font_menu::recently_added_set(app, SystemTime::now());
let sets = font_menu::family_sets(Some(&document[..]), &recent[..]);
let mut hold = font_menu::hold(app);
let before = hold.settings.clone();
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 mut source = FontPickerSource::new(catalog)
.settings(Bind::bound(&mut settings))
.filters(Bind::bound(&mut app.ui.font_filters))
.settings(Bind::bound(&mut hold.settings))
.filters(Bind::bound(&mut hold.filters))
.sets(&sets)
.scripts(&FontScript::ALL)
.filter_layout(FilterLayout::Chips);
.filter_layout(FilterLayout::Toolbar);
if let Some(text) = &sample {
source = source.preview_text(text);
}
@@ -1248,7 +1252,7 @@ pub(crate) fn controls(app: &mut VectorcraftApp, ui: &mut Ui, rows: CharacterRow
controls = controls.axes(FaceAxes::new(axes, instances).italic(face_of(&current.font_style).2));
}
let out = controls.show(ui);
font_menu::store_picker_settings(app, &before, settings);
hold.store(app, &before);
let CharacterControlsOutput { picker, preview_family, edits, .. } = out;
if let Some(owner) = picker {
font_menu::apply_preview(app, owner, preview_family);
+7 -6
View File
@@ -314,14 +314,14 @@ fn target(app: &VectorcraftApp, ui: &Ui) -> Target {
target_with(app, super::active_mixed(app, ui.ctx()))
}
/// Whether the active proxy is "?", read from the session (the panel reads its per-frame cache).
/// Whether the active proxy is "?", from the proxies' cache ([`super::mixed_paints_now`]).
fn mixed_now(app: &VectorcraftApp) -> bool {
let (fill, stroke) = app.session.proxy_mixed();
let (fill, stroke) = super::mixed_paints_now(app);
if app.session.fill_active { fill } else { stroke }
}
/// [`target`] with `mixed` for a "?" active proxy: the panel reads it from its per-frame cache,
/// `ui.colorPanel` from the session.
/// `ui.colorPanel` and the panel menus through [`mixed_now`].
fn target_with(app: &VectorcraftApp, mixed: bool) -> Target {
if mixed {
return Target::Paint(None, None);
@@ -440,7 +440,7 @@ pub(crate) fn apply_output(app: &mut VectorcraftApp, out: &ColorPanelOutput) {
apply_with(app, &tgt, out);
}
/// [`target`] with the session's "?" state, for callers without the panel's pass.
/// [`target`] with the "?" state of [`mixed_now`], for callers without the panel's pass.
pub(crate) fn target_now(app: &VectorcraftApp) -> Target {
target_with(app, mixed_now(app))
}
@@ -616,8 +616,9 @@ pub(crate) fn menu_rows(_app: &VectorcraftApp) -> Vec<PanelRow> {
/// The checks, titles and enabled states of [`menu_rows`]: the mode the panel shows is checked, and
/// the rows that need a colour are off without one.
pub(crate) fn menu_states(app: &VectorcraftApp, states: &mut CommandStates) {
let tgt = target_now(app);
let has_color = tgt.color().is_some() || mixed_now(app);
let mixed = mixed_now(app);
let tgt = target_with(app, mixed);
let has_color = tgt.color().is_some() || mixed;
for (command, state) in ColorPanelMenu::states(LAYOUT, &app.ui.color_panel, &shown(app, &tgt), has_color) {
let state = if command == ColorPanelCommand::NewSwatch && !crate::menus::enabled(app, "swatch.new") { state.enabled(false) } else { state };
states.set(command, state);
+3 -2
View File
@@ -618,14 +618,15 @@ pub(crate) fn menu_rows(_app: &VectorcraftApp) -> Vec<PanelRow> {
/// without a solid color, and CSS oklch() also while the active document's RGB space is not sRGB.
pub(crate) fn menu_states(app: &VectorcraftApp, states: &mut CommandStates) {
let srgb = cms::active().rgb_is_srgb();
for item in items(&app.ui.color_wheel, srgb, target_now(app).color()) {
let color = target_now(app).color();
for item in items(&app.ui.color_wheel, srgb, color) {
let mut state = CommandState::new().title(item.label).enabled(item.enabled).checked(item.checked);
if let Some(hint) = item.hint {
state = state.hint(hint);
}
states.set(CommandRef::new(row_id(&item.id)), state);
}
let has_color = target_now(app).color().is_some();
let has_color = color.is_some();
for (notation, label) in copy_notations() {
let oklch = notation == "oklch";
let mut state = CommandState::new().title(label.to_string()).enabled(has_color && (srgb || !oklch));
+6
View File
@@ -59,6 +59,12 @@ pub(crate) fn copy_value(ui: &mut Ui, label: &str, value: &str, mono: bool) -> b
/// The same guarded full-value copy for an already shown readout. An elided path remains
/// static text: selection indices must describe the text actually shown by the framework.
pub(crate) fn copy_shown(ui: &mut Ui, shown: &egui::Response, value: &str) -> bool {
// A container's measuring run shows the readout in an invisible sizing pass before the frame's real run, with the
// same id and the same input. It neither copies nor reads or clears the remembered press: clearing it there would
// leave the real run's release without its press.
if ui.is_sizing_pass() {
return false;
}
// The click's own position and keys: a move or a key change after the release in the same
// frame leaves the pointer and the held keys elsewhere. A frame with more than one release
// copies nothing, since the click flags below do not say which release they describe.
+18 -7
View File
@@ -182,8 +182,9 @@ pub struct LayersUi {
/// The selection square clicked last in each open document, by the document's `uid`: where a Shift-click on another
/// square starts.
pub art_anchors: HashMap<u64, NodeId>,
/// The active document's rows with the [`LayerRows::key`] they were listed at.
rows: Option<(u64, Tracked<LayerRows>)>,
/// The active document's rows with the [`LayerRows::key`] they were listed at and the document's `uid` and
/// `reverts`.
rows: Option<(u64, (u64, u64), Tracked<LayerRows>)>,
}
impl Default for LayersUi {
@@ -223,7 +224,7 @@ pub fn show(app: &mut VectorcraftApp, ui: &mut Ui) {
thumbnails.hold(app.session.active().is_some_and(|st| st.interaction.is_some()) || app.session.tool_busy());
let settings = app.ui.layers_panel.settings();
refresh_rows(app);
let (Some(st), Some((_, kept))) = (app.session.active(), &app.ui.layers_ui.rows) else { return };
let (Some(st), Some((_, _, kept))) = (app.session.active(), &app.ui.layers_ui.rows) else { return };
let tree = DocLayers::of(st, kept);
let source = thumbs::LayerThumbs { doc: &st.doc };
let mut panel = LayersPanel::new(kept)
@@ -294,13 +295,23 @@ fn unrevealed<T>(app: &mut VectorcraftApp, f: impl FnOnce(&mut VectorcraftApp) -
r
}
/// Lists the active document's rows again when what they are listed from changed.
/// Lists the active document's rows again when what they are listed from changed. The new rows go into the kept
/// [`Tracked`] while the document is the same, so the panel keeps its display order when the
/// [order revision](LayerRows::order_of) stays; another document, or the same one after File › Revert, gets a new one.
fn refresh_rows(app: &mut VectorcraftApp) {
let Some(st) = app.session.active() else { return };
let key = LayerRows::key(app, st);
if app.ui.layers_ui.rows.as_ref().is_none_or(|(kept, _)| *kept != key) {
let rows = Tracked::new(LayerRows::new(app, st));
app.ui.layers_ui.rows = Some((key, rows));
let doc = (st.uid, st.reverts);
if app.ui.layers_ui.rows.as_ref().is_some_and(|(kept, _, _)| *kept == key) {
return;
}
let new = LayerRows::new(app, st);
match &mut app.ui.layers_ui.rows {
Some((kept, of, rows)) if *of == doc => {
rows.edit(|rows| *rows = new);
*kept = key;
}
slot => *slot = Some((key, doc, Tracked::new(new))),
}
}
+28 -1
View File
@@ -202,6 +202,14 @@ pub(super) struct LayerRows {
/// In isolation mode, the isolated node: the top row.
#[plain_data(assume = "a node id is an integer")]
root: Option<NodeId>,
/// What the display order is built from ([`LayerRows::order_of`]).
order: u64,
}
#[cfg(test)]
thread_local! {
/// How many times [`LayerRows::children`] was asked on this thread.
pub(super) static CHILDREN_CALLS: std::cell::Cell<usize> = const { std::cell::Cell::new(0) };
}
/// [`LayerRows`] with the editing state of their document, for the panel's host code in one pass.
@@ -243,7 +251,9 @@ impl LayerRows {
let guide_rows = ruler.iter().enumerate().filter_map(|(i, g)| Some((g.id?, i))).collect();
let blends = st.selection.objects.iter().copied().filter(|id| doc.node(*id).is_some_and(|n| matches!(n.kind, NodeKind::Blend { .. })));
let selected: HashSet<NodeId> = st.selection.objects.iter().copied().collect();
let root = st.isolation.and_then(|i| isolated_root(doc, i)).map(|(n, ..)| n.id);
Self {
order: Self::order_of(doc, &st.layers_open, app.ui.layers_panel.layers_only, root),
doc: doc.clone(),
opts: app.ui.layers_panel.clone(),
xml_id: by_xml_id(app),
@@ -258,10 +268,20 @@ impl LayerRows {
holding: super::rows::holding(doc, &selected),
selected,
blends: blends.collect(),
root: st.isolation.and_then(|i| isolated_root(doc, i)).map(|(n, ..)| n.id),
root,
}
}
/// A hash of everything the display order reads ([`LayerTree::children`] and [`LayerTree::is_open`]): the
/// document, which an edit replaces and a selection change keeps (its ruler guides and an opacity mask being
/// edited are in it), the open rows, Show Layers Only and the isolated node. The selection, the highlighted rows,
/// the current layer, the names and the other Panel Options are not in it.
fn order_of(doc: &Arc<Document>, open: &OpenRows, layers_only: bool, root: Option<NodeId>) -> u64 {
let mut hasher = DefaultHasher::new();
(Arc::as_ptr(doc) as usize, open.generation(), layers_only, root).hash(&mut hasher);
hasher.finish()
}
/// What the rows of `st` are listed from: the document and its revision (which every edit and
/// selection change moves), the open rows, isolation mode, the highlighted rows and the current
/// layer, the Panel Options, Identify Objects By and the language.
@@ -461,6 +481,8 @@ impl LayerTree for LayerRows {
/// The top rows are the layers (only the opacity mask's while one is edited), or in isolation
/// mode the isolated layer, sublayer, group or object.
fn children(&self, parent: Option<&RowId>) -> Vec<RowId> {
#[cfg(test)]
CHILDREN_CALLS.with(|c| c.set(c.get() + 1));
match parent {
None => match self.root {
Some(root) => vec![RowId::Node(root)],
@@ -491,6 +513,11 @@ impl LayerTree for LayerRows {
false
}
/// The display order changes only with what [`LayerRows::order_of`] hashes: a selection change keeps it.
fn order_revision(&self) -> Option<u64> {
Some(self.order)
}
fn info(&self, id: &RowId) -> LayerInfo {
match *id {
RowId::Node(id) => match self.doc.node(id) {
+75
View File
@@ -1352,3 +1352,78 @@ fn idle_frames_walk_no_node_for_the_selection_squares() {
}
assert!((1..=12).contains(&(visits() - before)), "a new selection walks the tree once: {}", visits() - before);
}
/// A selection change keeps the panel's display order: no row is asked for the rows inside it. Closing a row, Show
/// Layers Only and an edit build the order again, and the rows follow.
#[test]
fn a_selection_change_keeps_the_display_order() {
use crate::tests::panel_harness::Panel;
let calls = || super::model::CHILDREN_CALLS.with(std::cell::Cell::get);
let (mut app, [_, sub, _, b, a, c]) = nested();
for (id, name) in [(sub, "Sub"), (b, "B"), (a, "A"), (c, "C")] {
name_row(&mut app, id, name);
}
app.session.execute("select.set", &json!({"ids": [b.0]})).unwrap();
let mut panel = Panel::new(app, show);
panel.frame();
let before = calls();
panel.app().session.execute("select.set", &json!({"ids": [a.0]})).unwrap();
for _ in 0..3 {
panel.frame();
}
assert_eq!(calls() - before, 0, "a selection change asks no row for its rows");
assert!(panel.shows("A") && panel.shows("B"), "the rows stay");
expand(&mut panel.app(), &json!({"ids": [sub.0], "open": false})).unwrap();
let before = calls();
panel.frame();
panel.frame();
assert!(calls() > before, "closing a row builds the order again");
assert!(!panel.shows("A") && panel.shows("Sub") && panel.shows("C"), "the closed sublayer's rows are gone");
panel.app().ui.layers_panel.layers_only = true;
panel.frame();
panel.frame();
assert!(!panel.shows("C") && panel.shows("Sub"), "Show Layers Only leaves the objects out");
panel.app().ui.layers_panel.layers_only = false;
panel.app().session.execute("object.isolate", &json!({"id": sub.0})).unwrap();
panel.frame();
panel.frame();
assert!(panel.shows("Sub") && !panel.shows("C"), "isolation mode lists only the isolated sublayer");
panel.app().session.execute("object.exitIsolation", &json!({})).unwrap();
expand(&mut panel.app(), &json!({"ids": [sub.0], "open": true})).unwrap();
let made = panel.app().session.execute("shape.rectangle", &json!({"x": 200, "y": 200, "width": 10, "height": 10})).unwrap();
let d = NodeId(made["id"].as_u64().unwrap());
name_row(&mut panel.app(), d, "D");
panel.frame();
panel.frame();
assert!(panel.shows("D") && panel.shows("C"), "an edit lists the new object");
}
/// The order revision stays through a selection change and moves with the document, the open rows, Show Layers Only
/// and isolation mode.
#[test]
fn the_order_revision_follows_what_the_display_order_reads() {
let order = |app: &VectorcraftApp| LayerRows::new(app, app.session.active().unwrap()).order_revision();
let (mut app, [_, sub, g, b, a, _]) = nested();
let first = order(&app);
assert!(first.is_some(), "the rows report an order revision");
app.session.execute("select.set", &json!({"ids": [b.0]})).unwrap();
assert_eq!(order(&app), first, "a selection change keeps it");
app.session.execute("object.isolate", &json!({"id": sub.0})).unwrap();
let isolated = order(&app);
assert_ne!(isolated, first, "isolation mode moves it");
app.session.execute("object.exitIsolation", &json!({})).unwrap();
let left = order(&app);
assert_ne!(left, isolated, "leaving isolation mode moves it");
app.ui.layers_panel.layers_only = true;
assert_ne!(order(&app), left, "Show Layers Only moves it");
app.ui.layers_panel.layers_only = false;
assert_eq!(order(&app), left, "and turning it off gives it back");
expand(&mut app, &json!({"ids": [g.0], "open": false})).unwrap();
let closed = order(&app);
assert_ne!(closed, left, "closing a row moves it");
name_row(&mut app, a, "A");
assert_ne!(order(&app), closed, "an edit moves it");
}
@@ -309,4 +309,44 @@ mod tests {
assert_eq!(panel.value("Name").as_deref(), Some("Dots"));
assert!(panel.app().session.active().unwrap().doc.pattern("Dots").is_some());
}
/// The tile's width and height of the pattern "Dots".
fn tile_size(panel: &Panel) -> (f64, f64) {
let app = panel.app();
let tile = &app.session.active().unwrap().doc.pattern("Dots").unwrap().tile;
(tile.width(), tile.height())
}
/// With the Width field focused, a wheel notch steps it only while the pointer is over it: over another control,
/// or over the unfocused Height field, the wheel scrolls the panel and the tile keeps its size.
#[test]
fn the_wheel_steps_the_focused_number_field_only_under_the_pointer() {
use craft::ui::contract::Role;
let mut panel = editing_panel();
panel.room(egui::vec2(220.0, 320.0));
panel.frame();
assert_eq!(tile_size(&panel), (10.0, 10.0));
panel.click_role("Width", Role::SPIN_BUTTON);
assert!(panel.focused("Width"), "the click focuses Width");
// One notch at `at`, then the frame after the wheel gesture's gap, which ends the gesture.
let notch = |panel: &mut Panel, at: egui::Pos2| {
panel.scroll_at(at, -30.0);
panel.advance(1.0);
panel.frame();
};
let check = panel.rect("Size Tile to Art").center();
notch(&mut panel, check);
assert_eq!(tile_size(&panel), (10.0, 10.0), "a notch over Size Tile to Art leaves the focused Width alone");
assert!(panel.focused("Width"), "Width keeps the focus");
let height = panel.rect_role("Height", Role::SPIN_BUTTON).center();
notch(&mut panel, height);
assert_eq!(tile_size(&panel), (10.0, 10.0), "a notch over the unfocused Height steps neither field");
let width = panel.rect_role("Width", Role::SPIN_BUTTON).center();
notch(&mut panel, width);
assert_eq!(tile_size(&panel), (9.0, 10.0), "a notch over the focused Width steps it");
}
}
@@ -1016,6 +1016,42 @@ fn the_scale_row_fits_the_panel_width() {
}
}
/// In a short panel with many format rows, the Export Settings heading and the first row stay inside the panel, and
/// the settings scroll above Export and the footer bar.
#[test]
fn the_settings_scroll_inside_a_short_panel() {
use craft::ui::contract::Role;
let (mut app, _, [a, _]) = app(true);
app.run("assets.add", json!({"ids": [a]})).unwrap();
let mut p = panel(app);
p.room(egui::vec2(300.0, 1600.0));
p.frame();
for _ in 0..7 {
p.click("+ Add Scale");
}
assert_eq!(settings(&p)["formats"].as_array().unwrap().len(), 8);
p.room(egui::vec2(300.0, 280.0));
p.frame();
p.frame();
let heading = p.painted("Export Settings");
assert!(!heading.is_empty(), "the Export Settings heading is painted");
for rect in heading {
assert!(rect.top() >= -0.5 && rect.bottom() <= 280.5, "the Export Settings heading at {rect:?} is outside a 280 pt panel");
}
let scale = p.rect_role("Scale", Role::COMBO_BOX);
assert!(p.in_view("Scale") && scale.top() >= -0.5, "the first format row at {scale:?} is outside the panel");
let export = p.rect("Export");
assert!(export.top() >= -0.5 && export.bottom() <= 280.5, "Export at {export:?} is outside a 280 pt panel");
// The wheel over the settings brings the last row's Add Scale into view, and Export stays where it was.
for _ in 0..20 {
p.scroll_at(scale.center(), -120.0);
p.frame();
}
let add = p.rect("+ Add Scale");
assert!(p.in_view("+ Add Scale") && add.bottom() <= 280.5, "Add Scale at {add:?} is not reachable");
assert_eq!(p.rect("Export"), export, "Export moved while the settings scrolled");
}
/// The menu adds the selected artwork as one asset or one per object (an object that is an asset already keeps its
/// asset), and is off with no artwork selected.
#[test]
+29 -3
View File
@@ -380,11 +380,13 @@ fn mask_items(mask: Option<&OpacityMask>, can_make: bool) -> [(&'static str, &'s
}
/// The masked object's mask, also while editing it (the selection then is the mask art), whether the
/// object controls apply, and whether Make is possible.
/// object controls apply, and whether Make is possible. Make's check runs only for an object without a mask, the one
/// case whose rows read it ([`mask_items`]).
fn menu_context(app: &VectorcraftApp) -> (Option<Arc<Node>>, bool, bool) {
let editing = app.session.active().is_some_and(|d| d.doc.mask_edit.is_some());
let n = first_node(app, &app.session.transparency_info());
let can_make = n.is_some() && !editing && crate::menus::enabled(app, "transparency.makeOpacityMask");
let n = app.session.transparency_target().and_then(|id| super::layers::node_arc(&app.session.active()?.doc, id));
let unmasked = n.as_ref().is_some_and(|n| n.extras().mask.is_none());
let can_make = unmasked && !editing && crate::menus::enabled(app, "transparency.makeOpacityMask");
(n, object_controls(app, editing), can_make)
}
@@ -452,6 +454,30 @@ mod tests {
app
}
/// The menu's states check Make Opacity Mask only for a first object without a mask: a masked one shows Release,
/// Disable and Unlink instead, and Make dimmed without its check.
#[test]
fn the_menu_checks_make_only_for_an_object_without_a_mask() {
let mut app = new_app();
let rectangle = |app: &mut VectorcraftApp, x| run_cmd(app, "shape.rectangle", json!({"x": x, "y": 10, "width": 20, "height": 20}));
let masked = rectangle(&mut app, 10)["id"].clone();
let art = rectangle(&mut app, 12)["id"].clone();
let plain = rectangle(&mut app, 50)["id"].clone();
run_cmd(&mut app, "transparency.makeOpacityMask", json!({"ids": [masked, art]}));
// How many times the states asked for Make's check, and whether Make is enabled.
let asked = |app: &VectorcraftApp| {
let mut states = CommandStates::new();
crate::menus::WHY_OFF_ASKED.with_borrow_mut(Vec::clear);
menu_states(app, &mut states);
let make = crate::menus::WHY_OFF_ASKED.take().iter().filter(|a| *a == "transparency.makeOpacityMask").count();
(make, states.get(&CommandRef::new("transparency.makeOpacityMask")).is_some_and(CommandState::is_enabled))
};
run_cmd(&mut app, "select.set", json!({"ids": [masked]}));
assert_eq!(asked(&app), (0, false), "a masked object: Make is dimmed without its check");
run_cmd(&mut app, "select.set", json!({"ids": [plain]}));
assert_eq!(asked(&app), (1, true), "an object without a mask: Make's check runs once");
}
#[test]
fn transparency_shows_each_selected_symbol_parts_values() {
let mut app = new_app();
+13
View File
@@ -490,6 +490,15 @@ pub struct ContextSpelling {
pub suggestions: Vec<String>,
}
/// The main window as saved in the UI preferences through 0.24.1. Positions are desktop pixels.
#[derive(Clone, Copy, Debug, Deserialize)]
pub struct LegacyWindow {
pub pos: Option<[i32; 2]>,
pub size: [f32; 2],
#[serde(default)]
pub maximized: bool,
}
/// Two states are equal when they save the same: the settings store writes only a changed saved form,
/// and the panels' session state is no change to save.
#[derive(Clone, Debug, Serialize, Deserialize)]
@@ -500,6 +509,9 @@ pub struct UiState {
/// it is never written back.
#[serde(rename = "language", skip_serializing)]
pub legacy_language: Option<String>,
/// Used until the shared window store has recorded the main window.
#[serde(rename = "window", skip_serializing)]
pub legacy_window: Option<LegacyWindow>,
pub brightness: Brightness,
/// The panel arrangement: docks, floating windows, closed panels and where each goes back. One
/// `Arc` the dock area keeps across frames; writers change it through `Arc::make_mut`.
@@ -1448,6 +1460,7 @@ impl Default for UiState {
fn default() -> Self {
Self {
legacy_language: None,
legacy_window: None,
brightness: Brightness::MediumDark,
dock_workspace: std::sync::Arc::new(crate::panel_docking::default_workspace(&[])),
tools_last_used: Default::default(),
+5
View File
@@ -86,6 +86,11 @@ fn preview_changes_the_text_live_and_only_a_choice_is_a_step() {
let before = steps(&app);
apply_preview(&mut app, owner(), Preview::Shows("Source Serif 4".into()));
assert_eq!(font_of(&app, id), "Source Serif 4", "previewed on the text");
assert_eq!(
crate::panels::character::values(&mut app).family.as_deref(),
Some("Inter"),
"the picker must still be able to commit the previewed row"
);
apply_preview(&mut app, owner(), Preview::Shows("Source Sans 3".into()));
assert_eq!(font_of(&app, id), "Source Sans 3");
apply_preview(&mut app, owner(), Preview::Ended);
+14 -4
View File
@@ -355,10 +355,11 @@ fn a_control_port_cancel_of_a_dialog_preview_reads_the_menus() {
}
/// OK applies the rotation a dialog previews as one undo step: the menus are read then, with Undo
/// naming it, and not for the angles previewed before.
/// naming it, and not for the angles previewed before. Once the dialog's angle field no longer takes
/// the keys, the menus are sent once more without the text-editing gate.
#[test]
fn applying_a_dialog_preview_reads_the_menus() {
let (m, (read, synced, closed, after)) = undisturbed(|m| {
let (m, (read, synced, applied, closed, after)) = undisturbed(|m| {
m.rotate_preview();
let read = m.angles(4);
let synced = m.fake.synced();
@@ -367,12 +368,21 @@ fn applying_a_dialog_preview_reads_the_menus() {
// gone two frames later.
m.frame(vec![]);
m.frame(vec![]);
let applied = m.fake.synced();
// The frame after the field gives up the keys sets the gate.
for _ in 0..4 {
if !m.ctx.egui_wants_keyboard_input() {
break;
}
m.frame(vec![]);
}
m.frame(vec![]);
(read, synced, !m.app.session.in_interaction() && !m.app.any_dialog_open(), m.fake.synced())
(read, synced, applied, !m.app.session.in_interaction() && !m.app.any_dialog_open(), m.fake.synced())
});
assert_eq!(read, 0, "the menus weren't read while the dialog previewed the angles");
assert!(closed);
assert_eq!(after, synced + 1, "the menus were read");
assert_eq!(applied, synced + 1, "the menus were read");
assert_eq!(after, synced + 2, "and sent once more when the gate changed");
assert_eq!(find(&m.fake.last(), "edit.undo").label, "Undo Rotate");
}
+27 -1
View File
@@ -181,7 +181,9 @@ fn plugins_are_listed_in_the_object_and_effect_menus() {
#[test]
fn filter_dialog_previews_and_commits_one_undo_step() {
let mut h = window(app());
let mut app = app();
app.canvas.worker_started = true; // Canvas uploads finish within the frame being asserted.
let mut h = window(app);
h.state_mut().run("plugin.install", json!({"dataBase64": vectorcraft_format::base64_encode(DESATURATE)})).unwrap();
let id = red_rect(h.state_mut());
let undo = h.state().session.doc().unwrap().history.undo.len();
@@ -189,12 +191,36 @@ fn filter_dialog_previews_and_commits_one_undo_step() {
step(&mut h);
assert!(top(h.state()).is_some(), "dialog open");
assert_eq!(fields(h.state())["amount"], json!(100.0));
// A click in the visible slider must reach the same values the live preview reads.
use egui_kittest::kittest::Queryable as _;
// Let the modal finish its opening placement before reading a widget's screen bounds.
for _ in 0..3 {
step(&mut h);
}
let at = h.get_by_role(egui::accesskit::Role::Dialog).get_by_role(egui::accesskit::Role::Slider).rect().center();
h.input_mut().events.push(egui::Event::PointerMoved(at));
step(&mut h);
for pressed in [true, false] {
h.input_mut().events.push(egui::Event::PointerButton {
pos: at,
button: egui::PointerButton::Primary,
pressed,
modifiers: Default::default(),
});
step(&mut h);
}
let clicked = fields(h.state());
assert!(clicked["amount"].as_f64().is_some_and(|amount| amount > 0.0 && amount < 100.0), "slider at {at:?}: {clicked}");
// Agents set fields like `ui.dialog.set` does; the frame previews them.
set_field(&mut h, "amount", json!(50)).unwrap();
step(&mut h);
assert!(h.state().session.in_interaction(), "previewing");
let [r, g, _] = fill_rgb(h.state(), id);
assert!(r < 1.0 && g > 0.0, "half desaturated on the canvas: {r} {g}");
step(&mut h);
let (shown, _) = h.state().canvas.shown.as_ref().expect("a rendered canvas frame");
let shown_fill = shown.node(id).unwrap().appearance.fill_paint().color().unwrap().to_rgb_uncalibrated();
assert_eq!(shown_fill, fill_rgb(h.state(), id), "the canvas showed the preview before OK");
answer(&mut h, true);
assert!(top(h.state()).is_none());
let st = h.state().session.doc().unwrap();
+4
View File
@@ -166,10 +166,14 @@ const SIZES: &[u8] = br#"{
"size.page.button_side": 16,
"size.page.link": 24
},
"comfortable": {
"size.icon.lg": 26
},
"compact": {
"size.control.md": 26,
"size.button": 24,
"size.icon.glyph_md": 16,
"size.icon.lg": 24,
"size.rail.width": 38,
"size.dock.column": 310,
"size.bar.column": 14,
+1 -1
View File
@@ -823,7 +823,7 @@ fn bottom_controls(app: &mut VectorcraftApp, ui: &mut Ui, footer: RailFooter) {
None => button,
};
// Small in two columns, where the three sit side by side in the rail's width.
let button = if two { button.size(ControlSize::Sm) } else { button };
let button = if two { button.size(ControlSize::Sm).glyphs(craft::ui::style::GlyphRole::Tool) } else { button };
button.show(ui).clicked()
};
let mut run = None;
+1
View File
@@ -425,6 +425,7 @@ Stop opacity on translated artboards remains outside this regression coverage.
| Date | Change | Summary |
|---|---|---|
| 2026-11-30 | minor | `.ai` and EPS import: a word the page draws from two text objects in a row is their type. Where the text document makes the type of every text object that shows, a word of the page's type is the type of the made type holding its piece when that type spells it. The page can draw two text objects as one word: a word and a letter set apart from it (a swash "h" after "Spirit") come out of the page as one piece, "Spirith", that neither spells. It was counted as type with no text object, with the note "some of the page's type has no text object in the layers, so it is left out" (a loss, so `convert` wouldn't write over the file), though both text objects come in and draw it. Now a word left that is the last word of one text object holding the piece joined to the first word of another holding it that draws after it, along the first one's lines, is theirs (`joined_by_two` in `see_page_type`). Each part is a whole word of its text object, and the two the other way round don't make the word. Tests: `a_word_the_page_draws_from_two_text_objects_in_a_row_is_their_type`, `two_text_objects_the_other_way_round_arent_the_word_the_page_draws`. |
| 2026-11-27 | minor | `.ai` save: type in a spot ink, a global process colour or Registration keeps its swatch link and its tint. Its fill and stroke in the text document name (key 5 of the paint) an art style of one paint, `0 1 Xd`, whose paint is the colour as a path's fill writes it (`x`, `Xx`, `Xk`, `Xs`), the form `.ai` import reads since the change below; key 0 still holds the process values at the tint. Each style is read back before it is written and kept only when the reader gives the same swatch and tint, so such type no longer counts among the attributes of type left out; a link to a process swatch that isn't global still does. Test `ai_editing::tests::type_in_spot_and_global_colors_reads_back_linked_at_its_tint` |
| 2026-11-27 | minor | `.ai` and EPS import: type set in a spot ink or a global process colour keeps its ink. In the text document a character's fill or stroke is a colour (key 0: grey, RGB or CMYK) and the name of an art style (key 5). In users' files (used locally, never committed) that style is one paint (`/SimpleStyle`), always its fill's, for a stroke too; for a spot ink or a global process colour it is `c m y k (name) tint x`, `Xx` or `Xk`, and key 0 keeps only the ink's process values at that tint. Such type came in as that process colour, so it separated onto the process plates, and white type in a white ink onto none. It now takes the style's paint: the colour at its tint, linked to the document's swatch of that name, which the style's colour makes when the art doesn't (after the art's colours, before the header's custom colours). A style whose paint is a process colour or a gradient, one that also sets a stroke's colour or pattern (before or after the fill's) or another fill paint after it, one whose `Xd` doesn't turn on its fill alone, and a paint that names no style of the file, keep the colour of key 0 as before; type filled with a gradient still comes in black. Tests `type_set_in_a_spot_ink_takes_it_from_the_art_style_its_paint_names` in `crates/eps/src/import/tests_native.rs`, `a_run_painted_by_a_swatch_colours_art_style_takes_the_swatch` in `crates/eps/src/import/ate.rs` and `only_a_style_of_one_swatch_colour_holds_it_for_type` in `crates/eps/src/import/ai/style/tests.rs`. Scores and estimates unchanged. |
| 2026-11-26 | minor | `.ai` and EPS import: where the text document makes the type of every text object that shows, point type made from it is matched with the page's type where it draws. Made type has no layout when it is matched, and its box was the estimate of type without one (0.55 em a character, running right from its anchor): beside right-aligned type, over half of centered type, across vertical type, and too short for a wide font. The page's type there was counted as type with no text object, with the note "some of the page's type has no text object in the layers, so it is left out" (a loss, so `convert` wouldn't write over the file), and the made type went on to be weighed against the page as type the page may not draw, and could be taken out. The box of made point type that shows now comes from its layout in the fonts the import has; the text object keeps no layout, so the document measures it when it opens, as before. Files where some text object's type isn't made keep the estimate: there the page's pieces where made type draws can belong to text objects stacked on it. The page comparison takes the same box for the layers' type areas (`type_areas` in `compare.rs`): made point type that differs from the page (laid out again, or in another font) counts as type where it draws, whatever its alignment. Counted as art beside the estimate, it could send the file to its PDF part or page, or be noted as art that differs. A file whose layers failed the comparison that way and opened without it now passes it and shows its notes. Tests `right_aligned_and_centered_point_type_takes_the_pages_type_where_it_draws`, `centered_point_type_at_a_heading_s_size_takes_the_pages_type_where_it_draws` and `right_aligned_point_type_that_differs_from_the_page_differs_as_type` in `crates/eps/src/import/tests_native.rs`, and `made_point_type_s_box_is_where_its_alignment_and_orientation_draw_it` in `crates/eps/src/import/native/slots.rs`. Scores and estimates unchanged. |
+3 -1
View File
@@ -12490,7 +12490,9 @@ Open Location after Export run these two (sub-folders sort the pictures; `assets
folder itself), and its Format Settings… opens Export for Screens on the first row's format
settings. `document.exportForScreens {assets: [id…]}` does the same with its own params
(the dialog's Assets tab). An asset's crop, and the crop of `export` with `selection: true`, is the bounds the
renderer measures for what the art draws, its effects included.
renderer measures for what the art draws, its effects included. In the panel, Export Settings takes at most half the
panel's height and scrolls on its own, so every format row can be reached in a short panel while Export and the footer
bar stay in place.
```json
{"name":"run_command","arguments":{"command":"assets.add","params":{"multiple":true}}}
+1
View File
@@ -1086,6 +1086,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
- Batch… over data sets offers None, Save and Close and Folder as the destination, as for a folder source. Save and Close saves the open document over its own file after each data set, so the file keeps only the last data set, unless a recorded Save step that Override Save points into the destination folder first makes each data set's file the document's own. A recorded Save, Save a Copy, Save as Template or export step that writes a file and that the batch does not point into the destination folder (destination None, Override Save or Override Export off, or a copy, template, PDF, EPS, DXF, Save for Web or Save for Office Documents step) also writes the same file for every data set. In either case the dialog shows a warning and `action.batch` returns a `warning`. Unless a recorded Save or Save As step writes a file and makes it the document's own first, `action.batch` refuses Save and Close over the data sets of a document that was never saved, was converted from an older version or was restored by Data Recovery.
- Export for Screens: the dialog's Example line shows the path of the file the export writes first, sub-folder included, named as the export names it, for the first chosen artboard, asset, layer or object (`document.exportForScreens`).
- Export presets: the Asset Export panel menu lists the export presets of Export for Screens, with Import Preset… and Export Preset…, which read and write `.vcexportpresets` files (`document.exportPresets.import`, `document.exportPresets.export`). An imported preset whose name is taken gets a number. In the panel, a preset applies to the shared export settings (`assets.settings.set {exportPreset}`), and Save Preset… saves them. With Create Sub-folders off, the panel's Export writes every file into the folder itself, mobile and density rows included.
- Export Settings in the Asset Export panel scroll on their own in a short panel.
- Export for Screens artboard names can be double-clicked to rename them in grid or list view (#7275). Enter, a click outside the field or switching to Assets commits the name; Escape cancels the edit. The dialog stays open, checked artboards stay selected and the rename is undoable. The typed name goes to the artboard that was double-clicked even when the artboards change order while it is typed; the field closes when its artboard is deleted or another document becomes active. Evidence: `dialogs::tests_screens::double_clicking_an_artboard_name_in_export_for_screens_renames_it`, `dialogs::tests_screens::switching_export_tabs_commits_an_artboard_name`, `dialogs::tests_screens::an_artboard_name_follows_its_artboard_while_it_is_typed` and `dialogs::tests_screens::an_artboard_name_stays_with_its_document`.
- Asset Export tile context menus (2026-11-20): Export / Remove operate on the selected assets, with plural labels; Rename edits the clicked tile inline; Select Artwork on Canvas selects its source nodes; collecting selected artwork as one or multiple assets is enabled only with canvas selection. Right-click selects an unselected tile and preserves an existing multi-selection. Export shares the raster/3D path; removal is one undo step without removing art. Headless regressions: `panels::tests_asset_export` (selection, export targets, removal/Undo/Redo, source artwork, rename and collection). This reduces G12; UI parity scores and estimates are unchanged.
- Asset Export panel menu: Create Sub-folders (on by default) and Open Location after Export are check items that set the dialog's two checkboxes (`assets.settings.set {subfolders, openLocation}`), and the panel's Export follows them, including a folder per format or item that Export for Screens remembers (3D assets' mesh files go in the folder itself); Format Settings… opens Export for Screens on the first row's format settings ([Asset Export panel](https://helpx.adobe.com/illustrator/desktop/save-and-export/export-files-to-different-formats/collect-and-export-assets-from-asset-export-panel.html)). Tests: `panels::tests_asset_export`.
+1 -1
View File
@@ -5,7 +5,7 @@ use std::process::Command;
use serde_json::Value;
const REV: &str = "186a229c8da8db5916f8a863dfd894f1879af735";
const REV: &str = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d";
const PACKAGES: &[(&str, &str, &str)] = &[
("craft-pdf", "0.1.0", REV),
("krilla", "0.8.2", REV),