Merge main into fix/linked-profile-listing

This commit is contained in:
dotCooCoo
2026-11-30 18:52:47 -08:00
41 changed files with 976 additions and 411 deletions
Generated
+86 -86
View File
@@ -1231,7 +1231,7 @@ dependencies = [
[[package]]
name = "craft"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"craft-automation",
"craft-behavior",
@@ -1272,7 +1272,7 @@ dependencies = [
[[package]]
name = "craft-affinity"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"crc32fast",
"flate2",
@@ -1283,7 +1283,7 @@ dependencies = [
[[package]]
name = "craft-appkit"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"block2 0.6.2",
"objc2 0.6.5",
@@ -1295,7 +1295,7 @@ dependencies = [
[[package]]
name = "craft-atomic"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"rustix 1.1.6",
]
@@ -1303,7 +1303,7 @@ dependencies = [
[[package]]
name = "craft-automation"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"base64 0.23.1",
"craft-behavior",
@@ -1328,7 +1328,7 @@ dependencies = [
[[package]]
name = "craft-behavior"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"accesskit",
"bitflags 2.13.2",
@@ -1346,7 +1346,7 @@ dependencies = [
[[package]]
name = "craft-browse"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"craft-behavior",
"craft-docpath",
@@ -1364,7 +1364,7 @@ dependencies = [
[[package]]
name = "craft-cdr"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"crc32fast",
"flate2",
@@ -1373,7 +1373,7 @@ dependencies = [
[[package]]
name = "craft-cloud-ui"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"egui",
]
@@ -1381,7 +1381,7 @@ dependencies = [
[[package]]
name = "craft-cms"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"md-5",
"rayon",
@@ -1390,12 +1390,12 @@ dependencies = [
[[package]]
name = "craft-codepage"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
[[package]]
name = "craft-color-ui"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"craft-behavior",
"craft-cms",
@@ -1415,7 +1415,7 @@ dependencies = [
[[package]]
name = "craft-control"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"craft-control-protocol",
"craft-platform",
@@ -1426,7 +1426,7 @@ dependencies = [
[[package]]
name = "craft-control-protocol"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"getrandom 0.3.4",
"serde_json",
@@ -1436,7 +1436,7 @@ dependencies = [
[[package]]
name = "craft-dds"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"rayon",
]
@@ -1444,7 +1444,7 @@ dependencies = [
[[package]]
name = "craft-dialogs"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"block2 0.6.2",
"craft-appkit",
@@ -1470,7 +1470,7 @@ dependencies = [
[[package]]
name = "craft-doc"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"blake3",
"craft-ecproj-format",
@@ -1486,7 +1486,7 @@ dependencies = [
[[package]]
name = "craft-docpath"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"serde",
]
@@ -1494,7 +1494,7 @@ dependencies = [
[[package]]
name = "craft-draw"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"craft-behavior",
"craft-color-ui",
@@ -1513,7 +1513,7 @@ dependencies = [
[[package]]
name = "craft-dxf"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"craft-codepage",
"encoding_rs",
@@ -1525,7 +1525,7 @@ dependencies = [
[[package]]
name = "craft-ecproj-format"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"serde",
"serde_json",
@@ -1535,12 +1535,12 @@ dependencies = [
[[package]]
name = "craft-eps"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
[[package]]
name = "craft-font-catalog"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"fontique",
"harfrust 0.13.3",
@@ -1555,7 +1555,7 @@ dependencies = [
[[package]]
name = "craft-font-manager"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"craft-behavior",
"craft-font-catalog",
@@ -1574,7 +1574,7 @@ dependencies = [
[[package]]
name = "craft-font-os-windows"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"windows-registry",
"windows-sys 0.61.2",
@@ -1583,7 +1583,7 @@ dependencies = [
[[package]]
name = "craft-font-store"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"cap-primitives",
"craft-atomic",
@@ -1606,12 +1606,12 @@ dependencies = [
[[package]]
name = "craft-fonts-build"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
[[package]]
name = "craft-gif"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"gif",
]
@@ -1619,7 +1619,7 @@ dependencies = [
[[package]]
name = "craft-gzip"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"flate2",
]
@@ -1627,7 +1627,7 @@ dependencies = [
[[package]]
name = "craft-host"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"bitflags 2.13.2",
"craft-i18n",
@@ -1640,7 +1640,7 @@ dependencies = [
[[package]]
name = "craft-i18n"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"brotli 9.1.3",
"brotli-decompressor 6.3.2",
@@ -1670,7 +1670,7 @@ dependencies = [
[[package]]
name = "craft-image-codecs"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"craft-dds",
"craft-jpeg",
@@ -1697,7 +1697,7 @@ dependencies = [
[[package]]
name = "craft-imaging"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"craft-behavior",
"craft-color-ui",
@@ -1715,7 +1715,7 @@ dependencies = [
[[package]]
name = "craft-jpeg"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"thiserror 2.0.21",
]
@@ -1723,7 +1723,7 @@ dependencies = [
[[package]]
name = "craft-jxl"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"brotli-decompressor 5.0.3",
"jixel",
@@ -1734,7 +1734,7 @@ dependencies = [
[[package]]
name = "craft-keymap"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"craft-host",
"craft-i18n",
@@ -1749,7 +1749,7 @@ dependencies = [
[[package]]
name = "craft-layers"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"craft-behavior",
"craft-i18n",
@@ -1763,7 +1763,7 @@ dependencies = [
[[package]]
name = "craft-menu"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"craft-behavior",
"craft-host",
@@ -1781,7 +1781,7 @@ dependencies = [
[[package]]
name = "craft-metadata"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"brotli-decompressor 6.3.2",
"chrono",
@@ -1793,7 +1793,7 @@ dependencies = [
[[package]]
name = "craft-metafile"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"encoding_rs",
"image",
@@ -1804,7 +1804,7 @@ dependencies = [
[[package]]
name = "craft-mime"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"chrono",
"craft-codepage",
@@ -1814,7 +1814,7 @@ dependencies = [
[[package]]
name = "craft-nightly"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"uds_windows",
"winsafe",
@@ -1823,7 +1823,7 @@ dependencies = [
[[package]]
name = "craft-pages"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"craft-behavior",
"craft-keymap",
@@ -1839,7 +1839,7 @@ dependencies = [
[[package]]
name = "craft-pcraft-format"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"flate2",
"serde",
@@ -1850,7 +1850,7 @@ dependencies = [
[[package]]
name = "craft-pdf"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"hayro-interpret",
"hayro-syntax",
@@ -1862,7 +1862,7 @@ dependencies = [
[[package]]
name = "craft-platform"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"async-channel",
"async-io",
@@ -1895,7 +1895,7 @@ dependencies = [
[[package]]
name = "craft-plotter"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"kurbo 0.13.1",
"thiserror 2.0.21",
@@ -1904,7 +1904,7 @@ dependencies = [
[[package]]
name = "craft-print"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"craft-behavior",
"craft-host",
@@ -1928,7 +1928,7 @@ dependencies = [
[[package]]
name = "craft-proof"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"log",
"miniz_oxide 0.9.1",
@@ -1939,7 +1939,7 @@ dependencies = [
[[package]]
name = "craft-ps"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"craft-eps",
"flate2",
@@ -1953,7 +1953,7 @@ dependencies = [
[[package]]
name = "craft-psd"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"encoding_rs",
"flate2",
@@ -1964,7 +1964,7 @@ dependencies = [
[[package]]
name = "craft-quit"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"dispatch2",
"egui",
@@ -1977,7 +1977,7 @@ dependencies = [
[[package]]
name = "craft-review"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"base64 0.23.1",
"craft-behavior",
@@ -1996,7 +1996,7 @@ dependencies = [
[[package]]
name = "craft-settings"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"craft-atomic",
"craft-host",
@@ -2013,7 +2013,7 @@ dependencies = [
[[package]]
name = "craft-stream-codecs"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"fax",
"hayro-ccitt",
@@ -2024,7 +2024,7 @@ dependencies = [
[[package]]
name = "craft-svg"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"craft-image-codecs",
"craft-xml",
@@ -2045,7 +2045,7 @@ dependencies = [
[[package]]
name = "craft-table"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"craft-behavior",
"craft-keymap",
@@ -2057,7 +2057,7 @@ dependencies = [
[[package]]
name = "craft-text"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"craft-behavior",
"craft-font-manager",
@@ -2082,7 +2082,7 @@ dependencies = [
[[package]]
name = "craft-theme"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"bitflags 2.13.2",
"craft-tracked",
@@ -2097,7 +2097,7 @@ dependencies = [
[[package]]
name = "craft-theme-store"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"craft-atomic",
"craft-behavior",
@@ -2112,7 +2112,7 @@ dependencies = [
[[package]]
name = "craft-tiff"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"serde",
"thiserror 2.0.21",
@@ -2122,7 +2122,7 @@ dependencies = [
[[package]]
name = "craft-time"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"serde",
"thiserror 2.0.21",
@@ -2131,7 +2131,7 @@ dependencies = [
[[package]]
name = "craft-timeline"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"craft-behavior",
"craft-keymap",
@@ -2146,12 +2146,12 @@ dependencies = [
[[package]]
name = "craft-tracked"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
[[package]]
name = "craft-ui"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"craft-cloud-ui",
"craft-ui-canvas",
@@ -2165,7 +2165,7 @@ dependencies = [
[[package]]
name = "craft-ui-canvas"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"craft-behavior",
"craft-i18n",
@@ -2181,7 +2181,7 @@ dependencies = [
[[package]]
name = "craft-ui-contract"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"accesskit",
"craft-behavior",
@@ -2219,7 +2219,7 @@ dependencies = [
[[package]]
name = "craft-ui-macros"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"proc-macro-crate",
"proc-macro2",
@@ -2230,7 +2230,7 @@ dependencies = [
[[package]]
name = "craft-ui-panels"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"craft-behavior",
"craft-host",
@@ -2248,7 +2248,7 @@ dependencies = [
[[package]]
name = "craft-ui-patterns"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"craft-behavior",
"craft-host",
@@ -2269,7 +2269,7 @@ dependencies = [
[[package]]
name = "craft-ui-shell"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"craft-behavior",
"craft-host",
@@ -2290,7 +2290,7 @@ dependencies = [
[[package]]
name = "craft-ui-widgets"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"craft-behavior",
"craft-host",
@@ -2309,7 +2309,7 @@ dependencies = [
[[package]]
name = "craft-update"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"base64 0.22.1",
"chrono",
@@ -2341,7 +2341,7 @@ dependencies = [
[[package]]
name = "craft-vectorcraft-format"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"flate2",
"serde",
@@ -2352,7 +2352,7 @@ dependencies = [
[[package]]
name = "craft-wayland"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"raw-window-handle",
"wayland-backend",
@@ -2362,7 +2362,7 @@ dependencies = [
[[package]]
name = "craft-web-api"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"js-sys",
"serde_json",
@@ -2373,7 +2373,7 @@ dependencies = [
[[package]]
name = "craft-win32"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"winsafe",
]
@@ -2381,7 +2381,7 @@ dependencies = [
[[package]]
name = "craft-window"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"craft-appkit",
"craft-atomic",
@@ -2413,7 +2413,7 @@ dependencies = [
[[package]]
name = "craft-xml"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"quick-xml 0.41.0",
"serde",
@@ -3772,7 +3772,7 @@ checksum = "9f4d0e94ddd48749f06bbe4e5389fb9799a0c45bcaf00495042076ef05e3241a"
[[package]]
name = "hayro-cmap"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"brotli 8.0.4",
"hayro-postscript",
@@ -3781,7 +3781,7 @@ dependencies = [
[[package]]
name = "hayro-interpret"
version = "0.7.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"bitflags 2.13.2",
"hayro-cmap",
@@ -3799,7 +3799,7 @@ dependencies = [
[[package]]
name = "hayro-jbig2"
version = "0.3.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"fearless_simd",
"hayro-ccitt",
@@ -3817,12 +3817,12 @@ dependencies = [
[[package]]
name = "hayro-postscript"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
[[package]]
name = "hayro-syntax"
version = "0.7.2"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"flate2",
"hayro-ccitt",
@@ -4805,7 +4805,7 @@ dependencies = [
[[package]]
name = "krilla"
version = "0.8.2"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"base64 0.22.1",
"bumpalo",
@@ -4962,7 +4962,7 @@ checksum = "d4a5ff6bcca6c4867b1c4fd4ef63e4db7436ef363e0ad7531d1558856bae64f4"
[[package]]
name = "linesweeper"
version = "0.5.0"
source = "git+https://github.com/storytold/craft-libs?rev=2680a3b3fe464c7afa3d260b33a828fa94e12f6d#2680a3b3fe464c7afa3d260b33a828fa94e12f6d"
source = "git+https://github.com/storytold/craft-libs?rev=a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0#a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0"
dependencies = [
"arrayvec",
"kurbo 0.13.1",
+38 -38
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 = "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" }
craft-cms = { git = "https://github.com/storytold/craft-libs", rev = "a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0" }
craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0", default-features = false, features = ["interpret", "write"] }
craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0" }
craft-proof = { git = "https://github.com/storytold/craft-libs", rev = "a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0" }
# Language packs: the Craft apps' shared font store installs them (#4936).
craft-font-store = { git = "https://github.com/storytold/craft-libs", rev = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d" }
craft-font-catalog = { git = "https://github.com/storytold/craft-libs", rev = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d" }
craft-font-store = { git = "https://github.com/storytold/craft-libs", rev = "a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0" }
craft-font-catalog = { git = "https://github.com/storytold/craft-libs", rev = "a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0" }
# 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 = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d" }
craft-gzip = { git = "https://github.com/storytold/craft-libs", rev = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d" }
craft-vectorcraft-format = { git = "https://github.com/storytold/craft-libs", rev = "a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0" }
craft-gzip = { git = "https://github.com/storytold/craft-libs", rev = "a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0" }
# `.pcraft` documents: their manifest, full-size composite, preview, layer pixels and ICC profile.
craft-doc = { git = "https://github.com/storytold/craft-libs", rev = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d", features = ["pcraft-pixels"] }
craft-doc = { git = "https://github.com/storytold/craft-libs", rev = "a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0", features = ["pcraft-pixels"] }
# Native Affinity documents (craft-libs#914).
craft-affinity = { git = "https://github.com/storytold/craft-libs", rev = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d" }
craft-affinity = { git = "https://github.com/storytold/craft-libs", rev = "a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0" }
# Bounded CDR (v1-v27) and CMX (32-bit) reader (craft-libs#778).
craft-cdr = { git = "https://github.com/storytold/craft-libs", rev = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d" }
craft-cdr = { git = "https://github.com/storytold/craft-libs", rev = "a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0" }
# SVG parsing, limits, SVGZ and writer (craft-libs#778).
craft-svg = { git = "https://github.com/storytold/craft-libs", rev = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d", features = ["tree"] }
craft-mime = { git = "https://github.com/storytold/craft-libs", rev = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d" }
craft-svg = { git = "https://github.com/storytold/craft-libs", rev = "a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0", features = ["tree"] }
craft-mime = { git = "https://github.com/storytold/craft-libs", rev = "a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0" }
# EPS container, previews, ASCII85 and DSC comments (craft-libs#778).
craft-eps = { git = "https://github.com/storytold/craft-libs", rev = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d" }
craft-eps = { git = "https://github.com/storytold/craft-libs", rev = "a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0" }
# DXF tags, reader and writer (craft-libs#778, #926, #927).
craft-plotter = { git = "https://github.com/storytold/craft-libs", rev = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d" }
craft-dxf = { git = "https://github.com/storytold/craft-libs", rev = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d" }
craft-plotter = { git = "https://github.com/storytold/craft-libs", rev = "a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0" }
craft-dxf = { git = "https://github.com/storytold/craft-libs", rev = "a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0" }
# WMF, EMF and EMF+ reader (craft-libs#778).
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" }
craft-metafile = { git = "https://github.com/storytold/craft-libs", rev = "a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0" }
craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0" }
craft-image-codecs = { git = "https://github.com/storytold/craft-libs", rev = "a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0" }
craft-gif = { git = "https://github.com/storytold/craft-libs", rev = "a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0" }
craft-tiff = { git = "https://github.com/storytold/craft-libs", rev = "a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0" }
craft-ps = { git = "https://github.com/storytold/craft-libs", rev = "a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0", default-features = false, features = ["read", "write"] }
craft-psd = { git = "https://github.com/storytold/craft-libs", rev = "a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0" }
craft-stream-codecs = { git = "https://github.com/storytold/craft-libs", rev = "a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0" }
craft-jxl = { git = "https://github.com/storytold/craft-libs", rev = "a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0" }
craft-codepage = { git = "https://github.com/storytold/craft-libs", rev = "a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0" }
# 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 = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d" }
craft = { git = "https://github.com/storytold/craft-libs", rev = "a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0" }
# 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 = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d" }
craft-theme = { git = "https://github.com/storytold/craft-libs", rev = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d" }
craft-fonts-build = { git = "https://github.com/storytold/craft-libs", rev = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d" }
craft-color-ui = { git = "https://github.com/storytold/craft-libs", rev = "a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0" }
craft-theme = { git = "https://github.com/storytold/craft-libs", rev = "a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0" }
craft-fonts-build = { git = "https://github.com/storytold/craft-libs", rev = "a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0" }
# Nightly profile isolation, launch protocol, and security fence.
craft-nightly = { git = "https://github.com/storytold/craft-libs", rev = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d" }
craft-nightly = { git = "https://github.com/storytold/craft-libs", rev = "a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0" }
# internal
vectorcraft-geom = { path = "crates/geom" }
vectorcraft-color = { path = "crates/color" }
@@ -194,13 +194,13 @@ lto = "thin"
codegen-units = 1
[patch.crates-io]
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" }
hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0" }
hayro-interpret = { git = "https://github.com/storytold/craft-libs", rev = "a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0" }
hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0" }
hayro-cmap = { git = "https://github.com/storytold/craft-libs", rev = "a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0" }
hayro-postscript = { git = "https://github.com/storytold/craft-libs", rev = "a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0" }
krilla = { git = "https://github.com/storytold/craft-libs", rev = "a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0" }
linesweeper = { git = "https://github.com/storytold/craft-libs", rev = "a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0" }
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" }
+2 -2
View File
@@ -233,8 +233,8 @@ VectorCraft is under active development. [**ROADMAP.md**](ROADMAP.md) has the st
and what's next; [`docs/target-app-parity.md`](docs/target-app-parity.md) the full parity assessment and
[`docs/gaps.md`](docs/gaps.md) the ranked list of what's missing.
**Where we are (2026-10-10): alpha.** About 88% of core menu items, tools, effects and formats exist
(92.5% of menu items do something), feature depth is ~75%, and we estimate ~65% ready for real work for a mainstream illustrator (~62% across all tracked features): everyday
**Where we are (2026-11-30): alpha.** About 96% of core menu items, tools, effects and formats exist
(99.9% of menu items do something), feature depth is ~79%, and we estimate ~65% ready for real work for a mainstream illustrator (~67% across all tracked features): everyday
vector illustration is close to usable: drawing and path tools,
Pathfinder and Shape Builder, paint, gradients, appearance and transparency, type with styles, threading and Hebrew/Arabic bidirectional layout, and
files (SVG, PDF and PDF-compatible `.ai` with PDF/X, legacy version 7 `.ai` keeping layers, groups and type, EPS, DXF, EMF/WMF, raster formats, PSD out, PSD/PSB opened with their layers and placed as their merged image, JPEG XL in, Print, Package).
+29 -29
View File
@@ -10,7 +10,7 @@ control channel. This page is the summary; the evidence is in [`docs/target-app-
and the work list in [`docs/gaps.md`](docs/gaps.md).
**Why alpha:** the core workflows exist end to end (drawing and path editing, Pathfinder, paint and appearance,
type, SVG/PDF/EPS, print, export) and feature depth is ~75%, but a professional can't yet switch: Illustrator's
type, SVG/PDF/EPS, print, export) and feature depth is ~79%, but a professional can't yet switch: Illustrator's
own `.ai` files open with a wrong layer structure in real cases and are saved back with an editing copy that
keeps live effects only on paths, compound paths and groups that qualify (at most a fill and a stroke, a non-zero fill rule when filled, no large canvas) and whose appearance and effects the art-style writer supports (see [docs/file-format-parity.md](docs/file-format-parity.md)), and writes live objects as their art, the interaction details have never been checked side by side, and some machines fail to start the
app. Beta needs those closed (the beta list in [gaps.md](docs/gaps.md)). It passes the core-workflow
@@ -24,8 +24,8 @@ blocking it ([Alpha gate](docs/roadmap.md#alpha-gate)).
| | Value | Kind |
|---|---|---|
| **Feature breadth** (Illustrator's menu items, tools, effects, formats exist) | **~88%** | measured in part: menu items 717/719 wired (99.7%), tools 89/92, Illustrator effects 46/50, Photoshop effects 57/57, 3D 4/4 (initial types, no materials) |
| **Feature depth** (weighted by use, scored by behaviour) | **~75%** | estimated |
| **Feature breadth** (Illustrator's menu items, tools, effects, formats exist) | **~96%** | measured in part: menu items 815/816 wired (99.9%), tools 91/92, Illustrator effects 50/50, Photoshop effects 57/57, 3D 4/4 plus 3 Classic (initial types, graphics on the Materials page (#6960), no base materials) |
| **Feature depth** (weighted by use, scored by behaviour) | **~79%** | estimated |
| **To beta** | **~170–270 h** one agent · ~50–80 h with 4–6 agents | estimated |
| **To full parity** | **~360–590 h** one agent · ~95–165 h with 4–6 agents | estimated |
@@ -33,9 +33,9 @@ blocking it ([Alpha gate](docs/roadmap.md#alpha-gate)).
| Audience | Ready % | Opus 5.5 agent hours to ~95% (one agent) | With 4–6 agents | Work that dominates |
|---|---:|---:|---:|---|
| **Full Illustrator** (ready for real work; decides the stage) | **~62%** (57–67%) | **~340–560 h** | ~95–160 h | the mainstream work below, plus 3D (50–85 h), raster effects (23–39 h), advanced type (20–28 h), generative AI (30–60 h), localization (50–85 h) and ecosystem |
| **Full Illustrator** (ready for real work; decides the stage) | **~67%** (62–72%) | **~340–560 h** | ~95–160 h | the mainstream work below, plus 3D (50–85 h), raster effects (23–39 h), advanced type (20–28 h), generative AI (30–60 h), localization (50–85 h) and ecosystem |
| **Mainstream illustrator** | **~65%** (60–70%) | **~230–380 h** | ~65–110 h | the interaction-fidelity pass (60–90 h), hardening and QA (30–50 h), stability (20–35 h), performance budgets (15–25 h), `.ai` exchange (10–20 h), the remaining depth of the everyday areas |
| **Essentials user** | **~75%** (70–80%) | **~60–105 h** | ~25–45 h | launch and stability on Windows (20–35 h), in-app help and onboarding (8–15 h), basic QA (10–15 h), Shape Builder depth (4–8 h; #937's reproduced case is fixed, unconfirmed on the reporter's file), UI polish |
| **Essentials user** | **~77%** (72–82%) | **~60–105 h** | ~25–45 h | launch and stability on Windows (20–35 h), the Windows print crashes (#8021, #9261), help articles and onboarding (8–15 h), basic QA (10–15 h), Shape Builder depth (4–8 h; #937's reproduced case is fixed, unconfirmed on the reporter's file), UI polish |
Hours are Opus 5.5 agent wall-clock hours, calibrated from this repo's merged-PR timestamps (e.g. 0.7–1.2 h per
Photoshop-style filter, ~0.8 h per medium feature); see [calibration](docs/target-app-parity.md#calibration).
@@ -46,15 +46,15 @@ everything is measured from our code against Illustrator's public documentation.
| Dimension | % | One agent (h) | Doc |
|---|---:|---:|---|
| Features (depth) | 75% | 220–360 | [target-app-parity.md](docs/target-app-parity.md) |
| UI/UX fidelity | 55% | 70–110 | [ui-parity.md](docs/ui-parity.md) |
| Features (depth) | 79% | 220–360 | [target-app-parity.md](docs/target-app-parity.md) |
| UI/UX fidelity | 60% | 70–110 | [ui-parity.md](docs/ui-parity.md) |
| File formats | 75% | 15–30 | [file-format-parity.md](docs/file-format-parity.md) |
| Hardware (GPU, pen, touch, displays) | 35% | 25–45 | [hardware-parity.md](docs/hardware-parity.md) |
| Localization (12 key languages) | 74% (measured) | 50–85 | [localization-parity.md](docs/localization-parity.md) |
| Hardware (GPU, pen, touch, displays) | 45% | 25–45 | [hardware-parity.md](docs/hardware-parity.md) |
| Localization (12 key languages) | 87% (measured) | 50–85 | [localization-parity.md](docs/localization-parity.md) |
| Performance | ~60% | 15–25 | [gaps.md › G15](docs/gaps.md#g15-performance-budgets-and-a-gpu-renderer) |
| Stability | ~60% | 30–50 | [gaps.md › G10](docs/gaps.md#g10-launch-and-stability-on-real-machines) |
| Platforms | 80% | 15–25 | [gaps.md › G8](docs/gaps.md#g8-hardening-at-scale) |
| Ecosystem and plug-ins | 15% | 30–60 | [gaps.md › G17](docs/gaps.md#g17-ecosystem-third-party-plug-ins) |
| Stability | ~55% | 30–50 | [gaps.md › G10](docs/gaps.md#g10-launch-and-stability-on-real-machines) |
| Platforms | 82% | 15–25 | [gaps.md › G8](docs/gaps.md#g8-hardening-at-scale) |
| Ecosystem and plug-ins | 30% | 30–60 | [gaps.md › G17](docs/gaps.md#g17-ecosystem-third-party-plug-ins) |
| AI features (generative) | 0% | 30–60 + owner decision | [gaps.md › G18](docs/gaps.md#g18-generative-ai-features) |
| Agent automation | beyond Illustrator | — | [mcp.md](docs/mcp.md) |
@@ -64,26 +64,26 @@ The dimension hours overlap (feature rows hold some UI, format and AI work), so
| Area | % | One agent (h) |
|---|---:|---:|
| Selection, transform & align | 85% | 4–6 |
| Drawing tools | 85% | 8–13 |
| Path operations, Pathfinder, Shape Builder, Live Paint | 80% | 4–8 |
| Selection, transform & align | 86% | 4–6 |
| Drawing tools | 88% | 8–13 |
| Path operations, Pathfinder, Shape Builder, Live Paint | 85% | 4–8 |
| Colour, swatches, gradients, patterns, mesh, recolor | 92% | 4–7 |
| Strokes, brushes, width profiles | 88% | 8–15 |
| Strokes, brushes, width profiles | 90% | 8–15 |
| Appearance, transparency, graphic styles, masks | 97% | 1–2 |
| Live vector effects | 85% | 4–8 |
| Raster effects (Effect Gallery) — [effects-parity.md](docs/effects-parity.md) | 88% | — |
| 3D and Materials | ~25% | 30–55 |
| Type core — [type-parity.md](docs/type-parity.md) | 80% | 14–19 |
| Type advanced (CJK, spelling, Touch Type) | 50% | 20–28 |
| Symbols, blends, envelopes, Repeat, perspective | 88% | 4–7 |
| Image Trace, graphs, image tools | 75% | 5–8 |
| Layers, artboards, document setup | 78% | 5–8 |
| View & navigation | 70% | 9–14 |
| Live vector effects | 90% | 4–8 |
| Raster effects (Effect Gallery) — [effects-parity.md](docs/effects-parity.md) | 55% | — |
| 3D and Materials | ~35% | 30–55 |
| Type core — [type-parity.md](docs/type-parity.md) | 83% | 14–19 |
| Type advanced (CJK, spelling, Touch Type) | 60% | 20–28 |
| Symbols, blends, envelopes, Repeat, perspective | 90% | 4–7 |
| Image Trace, graphs, image tools | 78% | 5–8 |
| Layers, artboards, document setup | 82% | 5–8 |
| View & navigation | 80% | 9–14 |
| Guides, grids, smart guides, snapping | 80% | 4–7 |
| File formats — [file-format-parity.md](docs/file-format-parity.md) | 75% | 10–20 |
| Export for Screens, Asset Export, slices | 85% | 2–4 |
| Export for Screens, Asset Export, slices | 87% | 2–4 |
| Print, colour management, separations | 80% | 2–4 |
| Automation (Actions, Variables, scripting) | 60% | 8–14 |
| Automation (Actions, Variables, scripting) | 80% | 8–14 |
| UI chrome (panels, Properties, preferences) | 80% | 13–20 |
| Libraries, Links, Package | 82% | 2–3 |
| Generative AI | 0% | 30–60 |
@@ -95,7 +95,7 @@ Weights, evidence and the missing items per area: [target-app-parity.md](docs/ta
| Language | Code | Status | Translated |
|---|---|---|---:|
| English | `en` | full | 100% |
| Simplified Chinese | `zh-hans` | partial (messages in English) | 85% |
| Simplified Chinese | `zh-hans` | partial (messages translated, #2578) | 85% |
| Spanish | `es` | full | 100% |
| Hindi | `hi` | catalog complete; machine-assisted draft, native review pending | complete under the scanner |
| Gujarati | `gu` | 4,673 contributor-reviewed catalog rows; 11 corrections applied to the 387 additions | menus and dialogs; status/error messages partial |
@@ -119,7 +119,7 @@ Ranked; detail in [docs/roadmap.md](docs/roadmap.md) and [docs/gaps.md](docs/gap
1. **Interaction-fidelity pass** (G1), tool by tool from [ui-parity.md](docs/ui-parity.md): 60–90 h.
2. **`.ai` files from real users** (G9): layer structure, guides, speed: 10–20 h.
3. **Launch and stability on real machines** (G10): 20–35 h.
4. **Core-tool correctness** (G11: the unit preference reverting to points, #864, SVG export units fixed; a Transform effect in a fill's or stroke's own effects, #885; Shape Builder regions and Asset Export borders are fixed): 6–13 h.
4. **Core-tool correctness** (G11: the unit preference reverting to points, #864, SVG export units fixed; a Transform effect in a fill's or stroke's own effects (#5221, #885), Shape Builder regions and Asset Export borders are fixed): 6–13 h.
5. **Then:** type core and advanced type (G4), the Illustrator 2026 additions (G13), 3D (G3). The Effect Gallery's filter thumbnails and in-dialog preview are in (G2).
## Progress log
+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 = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d", version = "0.1.0" }
craft-web-api = { git = "https://github.com/storytold/craft-libs", rev = "a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0", version = "0.1.0" }
wasm-bindgen = "0.2"
serde_json = { workspace = true }
+1 -1
View File
@@ -171,7 +171,7 @@ pub fn specs() -> Vec<CommandSpec> {
"Nudge in Perspective",
[],
None,
"{dx, dy: arrow direction (-1, 0 or 1), big?: bool (×10), copy?: bool} move the selection in perspective by the keyboard increment, as the arrow keys do with the Perspective Selection tool → {ids}",
"{dx, dy: arrow direction (-1, 0 or 1), big?: bool (×10), fine?: bool (÷10; with big, one increment), copy?: bool} move the selection in perspective by the keyboard increment (Snap to Grid doesn't apply), as the arrow keys do with the Perspective Selection tool → {ids}",
has_selection,
persp_nudge
),
@@ -563,13 +563,16 @@ pub(super) fn plane_match(s: &mut Session, p: &Value) -> Result<Value> {
Ok(json!({ "plane": plane.id(), "offset": depth }))
}
/// `perspective.nudge`, the arrow keys with the Perspective Selection tool: the selection moves
/// within its plane by [`nudge_step`](crate::cmd::object::nudge_step), measured on the page at the
/// centre of its perspective box, without Snap to Grid.
pub(super) fn persp_nudge(s: &mut Session, p: &Value) -> Result<Value> {
const C: &str = "perspective.nudge";
let (dx, dy) = (number_or(p, "dx", 0.0, C)?, number_or(p, "dy", 0.0, C)?);
if !(dx.is_finite() && dy.is_finite()) || (dx == 0.0 && dy == 0.0) {
return Err(bad(C, "dx and dy give the arrow's direction"));
}
let k = s.prefs.keyboard_increment * if switch_or(p, "big", false, C)? { 10.0 } else { 1.0 };
let k = crate::cmd::object::nudge_step(s.prefs.keyboard_increment, switch_or(p, "big", false, C)?, switch_or(p, "fine", false, C)?);
let copy = switch_or(p, "copy", false, C)?;
let ids = selected_roots(s)?;
// The step is measured on the page at the centre of the selection's perspective box.
@@ -578,7 +581,12 @@ pub(super) fn persp_nudge(s: &mut Session, p: &Value) -> Result<Value> {
let (plane, depth, rect) = g.plane_bounds(&st.doc, &ids).ok_or_else(|| EngineError::Other("the selection isn't in perspective".into()))?;
let from = g.homography_at(plane, depth).and_then(|h| h.apply(rect.center())).ok_or_else(beyond_horizon)?;
let to = from + vectorcraft_geom::Vec2::new(dx.clamp(-1.0, 1.0), dy.clamp(-1.0, 1.0)) * k;
persp_move(s, &json!({"ids": ids.iter().map(|i| i.0).collect::<Vec<_>>(), "from": [from.x, from.y], "to": [to.x, to.y], "copy": copy}))
// The arrow keys move by the step: Snap to Grid would pull an edge on a gridline back onto it,
// so a nudge smaller than a quarter cell would move nothing.
persp_move(
s,
&json!({"ids": ids.iter().map(|i| i.0).collect::<Vec<_>>(), "from": [from.x, from.y], "to": [to.x, to.y], "copy": copy, "snap": false}),
)
}
pub(super) fn persp_draw(s: &mut Session, p: &Value) -> Result<Value> {
+1 -1
View File
@@ -41,5 +41,5 @@ pub(crate) use pixelgrid::{
snap_if_aligned, snap_symbol_art,
};
pub(super) use shape::recut;
pub(crate) use transform::{apply_transform, preview_copies, scaling, transform_node, transform_patterns, transforms_objects};
pub(crate) use transform::{apply_transform, nudge_step, preview_copies, scaling, transform_node, transform_patterns, transforms_objects};
pub use transform::{reflect_axis, scale_factors, shear_tangent};
+1 -1
View File
@@ -79,7 +79,7 @@ pub fn specs() -> Vec<CommandSpec> {
"Nudge",
[],
None,
"{dx: -1|0|1, dy: -1|0|1, big?: bool (×10), copy?: bool, patterns?: bool (Transform Patterns: pattern fills and strokes transform with the objects that move whole; default: prefs transformPatternTiles), typeAreas?: bool (area type: the frame is reshaped and the text reflows at its size), objects?: bool (Transform Objects, as object.move), interpolate?: bool (as path.moveAnchors's; default: prefs interpolateControlPoints)} arrow-key nudge by the keyboard increment (the selected anchors (a selected curved segment bends instead: its anchors stay and its handles keep their directions while its middle moves by the step), else objects, along the x and y axes turned by the constrainAngle preference; else ruler guides, along the page axes)",
"{dx: -1|0|1, dy: -1|0|1, big?: bool (×10), fine?: bool (÷10; with big, one increment), copy?: bool, patterns?: bool (Transform Patterns: pattern fills and strokes transform with the objects that move whole; default: prefs transformPatternTiles), typeAreas?: bool (area type: the frame is reshaped and the text reflows at its size), objects?: bool (Transform Objects, as object.move), interpolate?: bool (as path.moveAnchors's; default: prefs interpolateControlPoints)} arrow-key nudge by the keyboard increment (the selected anchors (a selected curved segment bends instead: its anchors stay and its handles keep their directions while its middle moves by the step), else objects, along the x and y axes turned by the constrainAngle preference; else ruler guides, along the page axes)",
has_selection_or_guides,
nudge
),
+7 -2
View File
@@ -438,11 +438,16 @@ pub(crate) fn along_constrain_angle(dx: f64, dy: f64, deg: f64) -> (f64, f64) {
(v.x, v.y)
}
pub(crate) use vectorcraft_tools::nudge_step;
/// `object.nudge`, the arrow keys: the selected anchors, else the selected objects (and the guides
/// that move with them), else the selected ruler guides move by [`nudge_step`] in the arrow's
/// direction, in one undo step.
pub(super) fn nudge(s: &mut Session, p: &Value) -> Result<Value> {
check_numbers(p, &["dx", "dy"], "object.nudge")?;
check_switches(p, &TRANSFORM_SWITCHES, "object.nudge")?;
check_switches(p, &["big", "interpolate"], "object.nudge")?;
let k = s.prefs.keyboard_increment * if bool_or(p, "big", false) { 10.0 } else { 1.0 };
check_switches(p, &["big", "fine", "interpolate"], "object.nudge")?;
let k = nudge_step(s.prefs.keyboard_increment, bool_or(p, "big", false), bool_or(p, "fine", false));
let (dx, dy) = (f64_or(p, "dx", 0.0) * k, f64_or(p, "dy", 0.0) * k);
// Guides keep to the page's axes; art and anchors move along the constrain angle's.
let (gx, gy) = (dx, dy);
+26 -7
View File
@@ -4,11 +4,11 @@
use serde_json::{Value, json};
use vectorcraft_geom::{Rect, Vec2, rotate_deg};
use super::edit::{copy_above, selected_roots};
use super::edit::selected_roots;
use super::object::group_nodes;
use super::{Affine, CommandSpec, NodeId, Result, Session, bad, check_numbers, check_switches, cmd, has_selection, switch_or};
use crate::EngineError;
use vectorcraft_doc::Scaling;
use vectorcraft_doc::{Node, Scaling};
const CMD: &str = "object.stepAndRepeat";
const MAX_CELLS: usize = 10_000;
@@ -20,7 +20,7 @@ pub fn specs() -> Vec<CommandSpec> {
"Step and Repeat…",
["Object", "Transform"],
None,
"{rows?: n (default 1), columns?: n (default 1), fill?: bool (rows and columns are as many as fit the sheet, ignoring `rows` and `columns`; the first copy goes to the sheet's top-left corner plus `margin`), sheet?: {x, y, width, height} (pt; default the artboard that holds the selection's center, else the first), margin?: pt (fill only, default 0), gap?: pt (between neighbors, both axes), gapX?: pt, gapY?: pt (default `gap`, default 0; measured between the bounds of `cutId`, else of the selection, not between centers), cutId?: id (a selected object whose geometric bounds measure the spacing and the 180° turn; default the selection), rotate?: \"none\"|\"columns\"|\"rows\" (turn every other column or row by 180° about its cell's center, the same clockwise or counter-clockwise; default none), patterns?: bool} copy the selection into a grid of cells, left to right and top to bottom, the first cell being the selection itself (moved to the sheet's corner with fill); copies of pixel-aligned objects stay on the pixel grid, so a fractional gap between them is rounded to it, and gaps of other objects are exact; a selection of several objects is grouped first, so that a cut contour stays with its artwork in every copy; one undo step; the copies are selected → {ids: [id…], rows, columns, count}",
"{rows?: n (default 1), columns?: n (default 1), fill?: bool (rows and columns are as many as fit the sheet, ignoring `rows` and `columns`; the first copy goes to the sheet's top-left corner plus `margin`), sheet?: {x, y, width, height} (pt; default the artboard that holds the selection's center, else the first), margin?: pt (fill only, default 0, not negative), gap?: pt (between neighbors, both axes), gapX?: pt, gapY?: pt (default `gap`, default 0; measured between the bounds of `cutId`, else of the selection, not between centers; a negative gap overlaps neighbors and must be smaller than the width or height it is between), cutId?: id (a selected object whose geometric bounds measure the spacing and the 180° turn; default the selection), rotate?: \"none\"|\"columns\"|\"rows\" (turn every other column or row by 180° about its cell's center, the same clockwise or counter-clockwise; default none), patterns?: bool} copy the selection into a grid of cells, left to right and top to bottom, the first cell being the selection itself (moved to the sheet's corner with fill); copies of pixel-aligned objects stay on the pixel grid, so a fractional gap between them is rounded to it, and gaps of other objects are exact; a selection of several objects is grouped first, so that a cut contour stays with its artwork in every copy; one undo step; the copies are selected → {ids: [id…], rows, columns, count}",
has_selection,
step_and_repeat
)]
@@ -119,6 +119,9 @@ fn step_and_repeat(s: &mut Session, p: &Value) -> Result<Value> {
if !(gx.is_finite() && gy.is_finite() && margin.is_finite()) {
return Err(bad(CMD, "gaps and margin must be finite"));
}
if margin < 0.0 {
return Err(bad(CMD, "`margin` must be 0 or more"));
}
let (rows, cols) = if fill { (1, 1) } else { (count_param(p, "rows")?, count_param(p, "columns")?) };
let sheet = sheet_param(p)?;
let mut roots = selected_roots(s)?;
@@ -148,6 +151,9 @@ fn step_and_repeat(s: &mut Session, p: &Value) -> Result<Value> {
if !(w.is_finite() && h.is_finite()) || w <= 0.0 || h <= 0.0 {
return Err(EngineError::Other("the selection has no area to repeat".into()));
}
if w + gx <= EPS || h + gy <= EPS {
return Err(bad(CMD, "a negative gap must be smaller than the width or height it is between"));
}
let anchor = if fill {
let sheet = sheet.or_else(|| {
let c = d.bounds_of(&roots, false).unwrap_or(b).center();
@@ -180,6 +186,9 @@ fn step_and_repeat(s: &mut Session, p: &Value) -> Result<Value> {
if roots.len() > 1 {
roots = vec![group_nodes(d, &roots)?];
}
// Every copy is made first, and all of them go in with one insertion.
let originals: Vec<(NodeId, Node)> = roots.iter().filter_map(|id| d.node(*id).map(|n| (*id, n.clone()))).collect();
let mut lists: Vec<(NodeId, Vec<Node>)> = originals.iter().map(|(id, _)| (*id, Vec::with_capacity(cells.len()))).collect();
let mut copied: Vec<NodeId> = vec![];
let mut first = Affine::IDENTITY;
for c in &cells {
@@ -188,11 +197,21 @@ fn step_and_repeat(s: &mut Session, p: &Value) -> Result<Value> {
first = m;
continue;
}
let copies = copy_above(d, &roots, |_, _, n| {
for ((_, original), (_, list)) in originals.iter().zip(lists.iter_mut()) {
let mut n = d.reid(original);
n.transform(m, sc);
super::object::keep_pixel_aligned(n, sc);
})?;
copied.extend(copies);
super::object::keep_pixel_aligned(&mut n, sc);
copied.push(n.id);
list.push(n);
}
}
if !copied.is_empty() {
// The copy of the last cell goes directly above its original and the first cell's on top.
for (_, list) in &mut lists {
list.reverse();
}
d.insert_beside(lists, false)?;
super::typecmd::refresh_bounds_of(d, &copied);
}
if first != Affine::IDENTITY {
for id in &roots {
@@ -131,6 +131,46 @@ fn rejects_bad_params_and_a_selection_that_does_not_fit() {
assert!(e.execute(CMD, &json!({})).is_err());
}
#[test]
fn rejects_a_negative_margin_and_gaps_that_fold_the_grid_back() {
let (mut s, _) = setup();
let steps = undo_steps(&s);
assert!(s.execute(CMD, &json!({"fill": true, "margin": -5})).is_err());
assert!(s.execute(CMD, &json!({"rows": 1, "columns": 3, "gapX": -50})).is_err());
assert!(s.execute(CMD, &json!({"rows": 3, "columns": 1, "gapY": -40})).is_err());
assert!(s.execute(CMD, &json!({"fill": true, "gap": -50})).is_err());
assert_eq!(undo_steps(&s), steps, "a refusal records no undo step");
let r = s.execute(CMD, &json!({"rows": 1, "columns": 2, "gapX": -10})).unwrap();
assert_eq!(bounds(&s, r["ids"][1].as_u64().unwrap()), (40.0, 0.0, 90.0, 30.0), "a gap above minus the width overlaps neighbors");
}
#[test]
fn copies_go_in_with_one_walk_of_the_document_whatever_the_count() {
let walks = |columns: u64| {
let (mut s, _) = setup();
for i in 0..50 {
s.execute("shape.rectangle", &json!({"x": 0, "y": 100 + i, "width": 5, "height": 5})).unwrap();
}
let id = s.execute("shape.rectangle", &json!({"x": 0, "y": 0, "width": 2, "height": 2})).unwrap()["id"].as_u64().unwrap();
s.execute("select.set", &json!({"ids": [id]})).unwrap();
let before = vectorcraft_doc::tree_walks();
let r = s.execute(CMD, &json!({"rows": 1, "columns": columns, "gap": 1})).unwrap();
assert_eq!(r["count"], json!(columns));
vectorcraft_doc::tree_walks() - before
};
assert_eq!(walks(40), walks(2), "the walks of the document do not grow with the number of copies");
}
#[test]
fn the_last_cells_copy_sits_directly_above_the_original() {
let (mut s, id) = setup();
let r = s.execute(CMD, &json!({"rows": 1, "columns": 3, "gap": 1})).unwrap();
let ids: Vec<u64> = r["ids"].as_array().unwrap().iter().map(|i| i.as_u64().unwrap()).collect();
let d = &s.doc().unwrap().doc;
let order: Vec<u64> = d.layers[0].children().unwrap().iter().map(|n| n.id.0).collect();
assert_eq!(order, [id, ids[2], ids[1]]);
}
#[test]
fn fill_ignores_explicit_counts() {
let (mut s, _) = setup();
+29 -8
View File
@@ -1013,13 +1013,13 @@ fn app_set_coords(h: &Host, a: &[Data]) -> Answer {
Ok(Data::Undefined)
}
/// A path as `getIsFileOpen` compares it: `\` and `/` alike, and on Windows paths (a drive letter
/// or a `\`) letters in one case.
/// A path as `getIsFileOpen` compares it. A Windows path (any path on Windows, or one that starts
/// with a drive letter) takes `\` and `/` alike and letters in one case. On other systems `\` is a
/// character of a file name, so `/work/a\b.ai` and `/work/a/b.ai` are different files.
fn path_key(p: &str) -> String {
let windows = p.contains('\\') || p.as_bytes().get(1) == Some(&b':');
let p = p.replace('\\', "/");
let p = p.trim_end_matches('/').to_string();
if windows { p.to_lowercase() } else { p }
let b = p.as_bytes();
let windows = cfg!(windows) || (b.len() >= 2 && b[0].is_ascii_alphabetic() && b[1] == b':');
if windows { p.replace('\\', "/").trim_end_matches('/').to_lowercase() } else { p.trim_end_matches('/').to_string() }
}
/// `app.redraw()`: returns without changing anything. The app draws a frame between the run's
@@ -1503,6 +1503,13 @@ fn docs_add_document(h: &Host, a: &[Data]) -> Answer {
})
}
/// `documents.addDocumentNoUI(startupPreset)`: a new document from the New Document profile
/// `startupPreset` names, as `addDocument(startupPreset)` makes it, without the New Document
/// dialog. Arguments after `startupPreset` are ignored.
fn docs_add_document_no_ui(h: &Host, a: &[Data]) -> Answer {
docs_add_document(h, &a[..a.len().min(2)])
}
/// `new DocumentPreset()`: a record of new-document settings with the defaults the help page
/// <https://ai-scripting.docsforadobe.dev/jsobjref/DocumentPreset/> gives; the other settings are
/// left out. The settings stay with the run, which hands the script an object of the
@@ -1581,6 +1588,19 @@ fn preset_of(h: &Host, d: &Data) -> Option<usize> {
(i < h.dom.presets.borrow().len()).then_some(i)
}
/// `DocumentPreset.typename`: a `TypeError` for a preset from an earlier run, as its settings give.
fn preset_typename(h: &Host, a: &[Data]) -> Answer {
preset_of(h, arg(a, 0)).ok_or_else(|| HostError::Type("this is not a DocumentPreset".into()))?;
Ok(text("DocumentPreset"))
}
/// `DocumentPreset.toString()`: `[DocumentPreset]`, or a `TypeError` for a preset from an earlier
/// run.
fn preset_to_string(h: &Host, a: &[Data]) -> Answer {
preset_of(h, arg(a, 0)).ok_or_else(|| HostError::Type("this is not a DocumentPreset".into()))?;
Ok(text("[DocumentPreset]"))
}
/// The enumeration whose values the `DocumentPreset` setting `key` takes, when it takes one.
fn preset_enum(key: &str) -> Option<&'static str> {
Some(match key {
@@ -2949,8 +2969,8 @@ fn classes(link: &Link) -> Vec<HostClass> {
new_preset(&h)
});
let mut members = vec![
("typename".to_string(), typename_of("DocumentPreset"), typed("string")),
("toString".to_string(), class_text("DocumentPreset"), returns("string", &[])),
("typename".to_string(), get(link, preset_typename), typed("string")),
("toString".to_string(), method(link, preset_to_string), returns("string", &[])),
];
members.extend(PRESET_FIELDS.iter().map(|k| (k.to_string(), preset_field(link, k), typed(preset_type(k)))));
HostClass { construct: Some(f), ..class("DocumentPreset", None, members, None) }
@@ -2988,6 +3008,7 @@ fn classes(link: &Link) -> Vec<HostClass> {
method(l, docs_add_document),
returns("Document", &[("startupPreset", "string"), ("presetSettings", "DocumentPreset"), ("showOptionsDialog", "boolean")]),
),
("addDocumentNoUI", method(l, docs_add_document_no_ui), returns("Document", &[("startupPreset", "string")])),
("toString", class_text("Documents"), returns("string", &[])),
]),
Some(function(l, docs_at)),
+1
View File
@@ -1517,6 +1517,7 @@ fn a_boolean_given_as_text_for_a_transform_is_an_error() {
("object.move", json!({"dx": 5, "copy": "true"}), "copy"),
("object.move", json!({"dx": 5, "objects": 0}), "objects"),
("object.nudge", json!({"dx": 1, "big": "true"}), "big"),
("object.nudge", json!({"dx": 1, "fine": "true"}), "fine"),
("object.rotate", json!({"angle": 45, "absolute": "true"}), "absolute"),
("object.scale", json!({"sx": 200, "strokes": "false"}), "strokes"),
("object.scale", json!({"sx": 200, "corners": [true]}), "corners"),
+10 -14
View File
@@ -835,9 +835,10 @@ fn perspective_grid_commands_refuse_a_boolean_given_as_text() {
/// For an object in perspective, Move in Perspective by 0 (along its plane or its normal),
/// Transform in Perspective by the identity, Transform Again after each, and a Perspective Selection
/// drag that ends where it started record no undo step. So do a Move by 0 and a 1 pt Nudge that
/// Snap to Grid takes back to the gridlines the object's edges are on, and Transform Again after
/// each. With Copy, the identity copies the object in one undo step.
/// drag that ends where it started record no undo step. So do a Move by 0 of an object Snap to Grid
/// keeps on the gridlines its edges are on, and Transform Again after it. With Copy, the identity
/// copies the object in one undo step. (A Nudge in Perspective isn't snapped: it moves by its step,
/// see `arrow_keys_nudge_in_perspective_by_the_step_with_snap_to_grid`.)
#[test]
fn perspective_moves_that_move_nothing_record_no_undo_step() {
let mut s = session();
@@ -869,8 +870,8 @@ fn perspective_moves_that_move_nothing_record_no_undo_step() {
assert_eq!(s.journal.last().unwrap().0, "perspective.move");
let (undo, redo, _) = history(&s);
assert_eq!(((undo, redo), path(&s, a)), ((before.0, before.1), shape.clone()), "a drag back to its start");
// Snap to Grid takes a move that ends 0.3 pt past a gridline crossing onto the crossing. Then it
// takes a move by 0 and a 1 pt nudge back there, and Transform Again after each moves nothing.
// Snap to Grid takes a move that ends 0.3 pt past a gridline crossing onto the crossing. Then a
// move by 0 there, and Transform Again after it, moves nothing.
s.execute("perspective.grid.snap", &json!({"on": true})).unwrap();
let g = grid(&s);
let (_, _, b) = g.plane_bounds(&s.doc().unwrap().doc, &[a]).unwrap();
@@ -881,12 +882,7 @@ fn perspective_moves_that_move_nothing_record_no_undo_step() {
with_a_step_to_redo(&mut s);
let before = history(&s);
let on_grid = path(&s, a);
let calls = [
("perspective.move", json!({"from": [to.x, to.y], "to": [to.x, to.y]})),
("object.transformAgain", json!({})),
("perspective.nudge", json!({"dx": 1, "dy": 0})),
("object.transformAgain", json!({})),
];
let calls = [("perspective.move", json!({"from": [to.x, to.y], "to": [to.x, to.y]})), ("object.transformAgain", json!({}))];
for (c, p) in calls {
assert_eq!(s.execute(c, &p).unwrap(), json!({"ids": [a.0]}), "{c} {p}");
assert_eq!((history(&s), path(&s, a)), (before, on_grid.clone()), "{c} {p}");
@@ -898,7 +894,7 @@ fn perspective_moves_that_move_nothing_record_no_undo_step() {
}
/// Move in Perspective refuses a `copy`, `perpendicular` or `snap`, Transform in Perspective a `copy`,
/// and Nudge in Perspective a `big` or `copy`, given as text or as another value that is not true or
/// and Nudge in Perspective a `big`, `fine` or `copy`, given as text or as another value that is not true or
/// false: the object stays where it is, nothing is copied, and the undo history stays as it was. Null
/// is read as the key left out.
#[test]
@@ -916,7 +912,7 @@ fn perspective_moves_refuse_a_boolean_given_as_text() {
refuses_non_boolean(&mut s, "perspective.move", &json!({"from": from, "to": to, key: v}), key);
}
refuses_non_boolean(&mut s, "perspective.transform", &json!({"matrix": [1.5, 0, 0, 1.5, 0, 0], "copy": v}), "copy");
for key in ["big", "copy"] {
for key in ["big", "fine", "copy"] {
refuses_non_boolean(&mut s, "perspective.nudge", &json!({"dx": 1, "dy": 0, key: v}), key);
}
assert_eq!(state(&s), before, "{v}");
@@ -924,7 +920,7 @@ fn perspective_moves_refuse_a_boolean_given_as_text() {
let calls = [
("perspective.move", json!({"from": from, "to": to, "copy": null, "perpendicular": null, "snap": null})),
("perspective.transform", json!({"matrix": [1.5, 0, 0, 1.5, 0, 0], "copy": null})),
("perspective.nudge", json!({"dx": 1, "dy": 0, "big": null, "copy": null})),
("perspective.nudge", json!({"dx": 1, "dy": 0, "big": null, "fine": null, "copy": null})),
];
for (i, (c, p)) in calls.into_iter().enumerate() {
assert_eq!(s.execute(c, &p).unwrap(), json!({"ids": [a.0]}), "{c} {p}");
+19 -32
View File
@@ -631,13 +631,14 @@ fn rearrange_refuses_bad_indices_and_at() {
assert_eq!((r["indices"].clone(), boards(&s)[2]), (json!([2]), Rect::new(0.0, 500.0, 100.0, 550.0)));
}
/// A session whose New Document profiles are in a fresh folder for test `name` (not made yet).
fn with_profiles(name: &str) -> (Session, std::path::PathBuf) {
let dir = std::env::temp_dir().join(format!("vc-newdoc-profiles-{name}-{}", std::process::id()));
let _ = std::fs::remove_dir_all(&dir);
/// A session whose New Document profiles are in a fresh folder for test `name` (not made yet),
/// inside the returned temporary folder, which is removed when dropped, also when the test fails.
fn with_profiles(name: &str) -> (Session, std::path::PathBuf, vectorcraft_testkit::TempDir) {
let root = vectorcraft_testkit::TempDir::new(&format!("newdoc-profiles-{name}"));
let dir = root.join(format!("vc-newdoc-profiles-{name}"));
let mut s = Session::new();
s.attach_new_doc_profiles(dir.clone());
(s, dir)
(s, dir, root)
}
fn swatch_names(s: &Session) -> Vec<String> {
@@ -705,7 +706,7 @@ fn edit_print_profile(s: &mut Session, dir: &std::path::Path) {
#[test]
fn an_edited_profile_starts_the_documents_of_its_category() {
let (mut s, dir) = with_profiles("edited");
let (mut s, dir, _root) = with_profiles("edited");
let listed = s.execute("file.newProfiles", &json!({})).unwrap();
let names: Vec<&str> = listed["profiles"].as_array().unwrap().iter().map(|p| p["name"].as_str().unwrap()).collect();
assert_eq!(names, ["Mobile", "Web", "Print", "Film & Video", "Art & Illustration", "Branding", "Social"]);
@@ -733,7 +734,6 @@ fn an_edited_profile_starts_the_documents_of_its_category() {
s.execute("file.new", &json!({"preset": "A4", "colorMode": "rgb"})).unwrap();
let red = s.doc().unwrap().doc.swatches.iter().find(|w| w.name == "Brand Red").cloned().expect("converted, not dropped");
assert!(matches!(red.paint, vectorcraft_color::Paint::Solid { color: vectorcraft_color::Color::Rgb { .. }, .. }), "{:?}", red.paint);
let _ = std::fs::remove_dir_all(&dir);
}
/// The fill, stroke and weight of `id` in the active document.
@@ -745,7 +745,7 @@ fn look(s: &Session, id: u64) -> (vectorcraft_color::Paint, vectorcraft_color::P
#[test]
fn a_redefined_default_graphic_style_in_a_profile_is_the_default_fill_and_stroke() {
use vectorcraft_color::Paint;
let (mut s, dir) = with_profiles("default-style");
let (mut s, _, _root) = with_profiles("default-style");
// The Print profile's Default Graphic Style becomes no fill and a 0.25 pt red stroke.
s.execute("file.newProfiles.edit", &json!({"name": "Print"})).unwrap();
s.execute("shape.rectangle", &json!({"x": 10, "y": 10, "width": 40, "height": 40})).unwrap();
@@ -796,12 +796,11 @@ fn a_redefined_default_graphic_style_in_a_profile_is_the_default_fill_and_stroke
assert_eq!(s.paint.fill, green);
s.execute("paint.default", &json!({})).unwrap();
assert_eq!(s.paint, vectorcraft_tools::PaintDefaults::default());
let _ = std::fs::remove_dir_all(&dir);
}
#[test]
fn the_profile_follows_the_preset_access_and_reset() {
let (mut s, dir) = with_profiles("choice");
let (mut s, dir, _root) = with_profiles("choice");
edit_print_profile(&mut s, &dir);
// A request that may not read the folder gets the defaults, and the reason; edit is refused
// before anything is written.
@@ -841,7 +840,6 @@ fn the_profile_follows_the_preset_access_and_reset() {
assert_eq!(s.execute("file.newProfiles.reset", &json!({"name": "Print"})).unwrap(), json!({"name": "Print", "reset": false}));
let r = s.execute("file.new", &json!({"preset": "A4"})).unwrap();
assert!(r.get("profile").is_none() && !swatch_names(&s).contains(&"Brand Red".to_string()), "{r}");
let _ = std::fs::remove_dir_all(&dir);
}
/// The first run's style of text object `id`.
@@ -853,7 +851,7 @@ fn first_run(s: &Session, id: &Value) -> vectorcraft_doc::CharStyle {
#[test]
fn a_profiles_normal_character_style_is_the_default_font() {
let (mut s, dir) = with_profiles("default-font");
let (mut s, _, _root) = with_profiles("default-font");
// The Print profile's [Normal Character Style] becomes Source Serif 4 Regular at 9 pt.
s.execute("file.newProfiles.edit", &json!({"name": "Print"})).unwrap();
let attrs = json!({"font_family": "Source Serif 4", "font_style": "Regular", "size": 9, "charAlign": "emBoxBottom"});
@@ -891,13 +889,12 @@ fn a_profiles_normal_character_style_is_the_default_font() {
let st = first_run(&s, &made["id"]);
let default = vectorcraft_doc::CharStyle::default();
assert_eq!((st.font_family, st.size), (default.font_family, default.size));
let _ = std::fs::remove_dir_all(&dir);
}
#[test]
fn an_open_document_takes_another_profiles_default_fill_stroke_and_font() {
use vectorcraft_color::Paint;
let (mut s, dir) = with_profiles("apply-defaults");
let (mut s, _, _root) = with_profiles("apply-defaults");
const GLOW: &str = r#"<filter id="Glow7653"><feOffset dx="3" dy="3"/></filter>"#;
// The CMYK Print profile: no fill and a 0.25 pt stroke of the global swatch Laser Red, with
// the SVG filter Glow7653, and red type in Source Serif 4 at 9 pt.
@@ -987,7 +984,6 @@ fn an_open_document_takes_another_profiles_default_fill_stroke_and_font() {
assert!(s.execute("file.newProfiles.applyDefaults", &json!({"name": "Posters"})).is_err());
assert!(s.execute("file.newProfiles.applyDefaults", &json!({})).is_err());
assert_eq!(s.doc().unwrap().history.step(), step);
let _ = std::fs::remove_dir_all(&dir);
}
/// With New Art Has Basic Appearance off, the selected object's look does not replace the profile's
@@ -995,7 +991,7 @@ fn an_open_document_takes_another_profiles_default_fill_stroke_and_font() {
#[test]
fn profile_defaults_stay_with_an_unrelated_object_selected() {
use vectorcraft_color::Paint;
let (mut s, dir) = with_profiles("apply-defaults-selected");
let (mut s, _, _root) = with_profiles("apply-defaults-selected");
s.execute("file.newProfiles.edit", &json!({"name": "Print"})).unwrap();
s.execute("shape.rectangle", &json!({"x": 10, "y": 10, "width": 40, "height": 40})).unwrap();
s.execute("paint.setFill", &json!({"none": true})).unwrap();
@@ -1013,7 +1009,6 @@ fn profile_defaults_stay_with_an_unrelated_object_selected() {
assert_eq!((s.paint.fill.clone(), s.paint.stroke_width), (Paint::None, 0.25));
let id = s.execute("shape.rectangle", &json!({"x": 60, "y": 80, "width": 30, "height": 30})).unwrap()["id"].as_u64().unwrap();
assert_eq!((look(&s, id).0, look(&s, id).2), (Paint::None, Some(0.25)));
let _ = std::fs::remove_dir_all(&dir);
}
/// A profile whose [Normal Character Style] is set in one of its composite fonts gives the open
@@ -1026,7 +1021,7 @@ fn profile_defaults_bring_the_composite_font_of_the_default_font() {
"roman": {"font": "JetBrains Mono", "size": roman},
}})
};
let (mut s, dir) = with_profiles("apply-defaults-composite");
let (mut s, _, _root) = with_profiles("apply-defaults-composite");
s.execute("file.newProfiles.edit", &json!({"name": "Print"})).unwrap();
s.execute("type.compositeFonts.set", &json!({"fonts": [font(50.0)]})).unwrap();
let t = s.execute("text.create", &json!({"x": 10, "y": 80, "text": "Ab", "font": "CF Profile 7653", "size": 12})).unwrap();
@@ -1052,12 +1047,11 @@ fn profile_defaults_bring_the_composite_font_of_the_default_font() {
s.execute("edit.undo", &json!({})).unwrap();
s.execute("edit.undo", &json!({})).unwrap();
assert_eq!(profile(&s), Some(100.0));
let _ = std::fs::remove_dir_all(&dir);
}
#[test]
fn profile_errors_name_the_file_by_its_name_outside_the_read_roots() {
let (mut s, dir) = with_profiles("errors");
let (mut s, dir, _root) = with_profiles("errors");
let elsewhere = dir.with_extension("elsewhere");
std::fs::create_dir_all(&dir).unwrap();
std::fs::create_dir_all(&elsewhere).unwrap();
@@ -1084,22 +1078,19 @@ fn profile_errors_name_the_file_by_its_name_outside_the_read_roots() {
let inside = crate::file_access::AutomationRoots::new(&[dir.as_path()], &[dir.as_path()]).unwrap().unwrap();
let e = run(&mut s, &inside, "file.newProfiles.reset");
assert!(e.starts_with(&format!("{whole}: ")), "{e}");
let _ = std::fs::remove_dir_all(&elsewhere);
let _ = std::fs::remove_dir_all(&dir);
}
/// The new document's links find their files from the profile's file, as a document opened from
/// that file does; a document without a profile has no such file.
#[test]
fn the_new_document_links_from_the_profile_file() {
let (mut s, dir) = with_profiles("links");
let (mut s, dir, _root) = with_profiles("links");
edit_print_profile(&mut s, &dir);
assert_eq!(s.execute("file.new", &json!({"preset": "A4"})).unwrap()["profile"], "Print");
let file = dir.join("Print.vectorcraft").to_string_lossy().to_string();
assert_eq!(s.doc().unwrap().links_from.as_deref(), Some(file.as_str()));
s.execute("file.new", &json!({"preset": "Web 1920×1080"})).unwrap();
assert_eq!(s.doc().unwrap().links_from, None);
let _ = std::fs::remove_dir_all(&dir);
}
/// A color profile the profile's file carries is installed when this machine lacks it, as opening
@@ -1111,7 +1102,7 @@ fn a_profile_brings_the_color_profile_its_file_carries() {
return;
}
use vectorcraft_color::cms;
let (mut s, dir) = with_profiles("icc");
let (mut s, dir, _root) = with_profiles("icc");
let builtin = cms::profiles().into_iter().find(|p| p.kind == cms::ProfileKind::Rgb && p.builtin && p.name != cms::SRGB).unwrap();
let icc = cms::icc_bytes(&builtin.name).unwrap().to_vec();
let name = format!("Profile RGB {}", std::process::id());
@@ -1140,12 +1131,11 @@ fn a_profile_brings_the_color_profile_its_file_carries() {
std::fs::write(dir.join("Web.vectorcraft"), serde_json::to_vec(&v).unwrap()).unwrap();
let r = s.execute("file.new", &json!({"preset": "Web 1920×1080"})).unwrap();
assert!(r["profile"] == "Web" && r["warnings"][0].as_str().unwrap_or_default().contains(&broken), "{r}");
let _ = std::fs::remove_dir_all(&dir);
}
#[test]
fn a_damaged_or_oversized_profile_leaves_the_defaults_and_is_reported() {
let (mut s, dir) = with_profiles("damaged");
let (mut s, dir, _root) = with_profiles("damaged");
s.execute("file.new", &json!({"preset": "Letter", "profile": null})).unwrap();
let defaults = swatch_names(&s);
std::fs::create_dir_all(&dir).unwrap();
@@ -1162,23 +1152,20 @@ fn a_damaged_or_oversized_profile_leaves_the_defaults_and_is_reported() {
let r = s.execute("file.new", &json!({"preset": "Web 1920×1080"})).unwrap();
assert!(r["profileError"]["reason"].as_str().unwrap_or("").contains("larger than"), "{r}");
assert_eq!(s.doc().unwrap().doc.artboards[0].rect.width(), 1920.0);
let _ = std::fs::remove_dir_all(&dir);
}
#[cfg(unix)]
#[test]
fn a_profile_that_is_a_link_is_not_followed() {
let (mut s, dir) = with_profiles("link");
let (mut s, dir, root) = with_profiles("link");
s.execute("file.newProfiles.edit", &json!({"name": "Print"})).unwrap();
// A profile the folder held, moved out and linked back in.
let outside = std::env::temp_dir().join(format!("vc-newdoc-profile-outside-{}.vectorcraft", std::process::id()));
let outside = root.join("outside.vectorcraft");
std::fs::rename(dir.join("Print.vectorcraft"), &outside).unwrap();
std::os::unix::fs::symlink(&outside, dir.join("Print.vectorcraft")).unwrap();
let r = s.execute("file.new", &json!({"preset": "Letter"})).unwrap();
assert_eq!(r["profileError"]["reason"], "not a plain file", "{r}");
assert!(r.get("profile").is_none(), "{r}");
let _ = std::fs::remove_file(&outside);
let _ = std::fs::remove_dir_all(&dir);
}
/// The listing entry of profile `name`.
+42
View File
@@ -561,6 +561,41 @@ fn transform_again_repeats_a_perspective_scale_and_copies() {
assert!(s.execute("perspective.transform", &json!({"matrix": [1, 0, 0, 1, 0, 0], "depth": f64::MAX})).is_err());
}
/// Snap to Grid (on by default) leaves the arrow keys' step alone: art whose edges are on
/// gridlines moves by the step (a tenth of it with Ctrl/Cmd) in one undo step each, instead of
/// being pulled back onto the gridlines and not moving at all.
#[test]
fn arrow_keys_nudge_in_perspective_by_the_step_with_snap_to_grid() {
let (mut s, id) = persp_session();
s.execute("perspective.grid.snap", &json!({"on": true})).unwrap();
// A move that ends 0.3 pt past a gridline crossing snaps the corner onto it.
let g = grid(&s);
let b = bounds_of(&plane_pts(&s, id, Plane::Right, 0.0));
let past = |v: f64| (v / g.cell).ceil() * g.cell + 0.3 - v;
let (c, dv) = (b.center(), Vec2::new(past(b.x0), past(b.y0)));
let (from, to) = (g.to_page(Plane::Right, c).unwrap(), g.to_page(Plane::Right, c + dv).unwrap());
s.execute("perspective.move", &json!({"from": [from.x, from.y], "to": [to.x, to.y]})).unwrap();
let on_grid = bounds_of(&plane_pts(&s, id, Plane::Right, 0.0));
assert!((on_grid.x0 / g.cell - (on_grid.x0 / g.cell).round()).abs() < 1e-6, "{on_grid:?}");
// The page step measured at the centre of the selection, as `perspective.nudge` measures it.
let page_step = |s: &Session, before: &[Point]| {
let after = plane_pts(s, id, Plane::Right, 0.0);
let h = grid(s).homography(Plane::Right).unwrap();
let c = bounds_of(before).center();
h.apply(c + (after[0] - before[0])).unwrap() - h.apply(c).unwrap()
};
let v = ViewInfo::default();
s.select_tool("perspectiveSelection", v).unwrap();
let k = s.prefs.keyboard_increment;
for (mods, step) in [(Mods::default(), k), (Mods { cmd: true, ..Default::default() }, k / 10.0)] {
let (before, n) = (plane_pts(&s, id, Plane::Right, 0.0), undo_len(&s));
s.tool_key(ToolKey::Right, mods, v).unwrap();
assert_eq!(undo_len(&s), n + 1, "{mods:?}");
let d = page_step(&s, &before);
assert!((d - Vec2::new(step, 0.0)).hypot() < 1e-6, "{mods:?} {d:?}");
}
}
#[test]
fn arrow_keys_nudge_in_perspective() {
let (mut s, id) = persp_session();
@@ -581,6 +616,13 @@ fn arrow_keys_nudge_in_perspective() {
let c = bounds_of(&before).center();
let step = h.apply(c + d).unwrap() - h.apply(c).unwrap();
assert!((step - Vec2::new(s.prefs.keyboard_increment, 0.0)).hypot() < 1e-6, "{step:?}");
// Ctrl/Cmd takes a tenth of a step.
let before = plane_pts(&s, id, Plane::Right, 0.0);
s.tool_key(ToolKey::Right, Mods { cmd: true, ..Default::default() }, v).unwrap();
let after = plane_pts(&s, id, Plane::Right, 0.0);
let c = bounds_of(&before).center();
let step = h.apply(c + (after[0] - before[0])).unwrap() - h.apply(c).unwrap();
assert!((step - Vec2::new(s.prefs.keyboard_increment / 10.0, 0.0)).hypot() < 1e-6, "{step:?}");
// Alt copies; Shift takes ten steps.
s.tool_key(ToolKey::Left, Mods { alt: true, shift: true, ..Default::default() }, v).unwrap();
let copy = *s.doc().unwrap().selection.objects.first().unwrap();
+43
View File
@@ -64,6 +64,49 @@ fn set_and_get_keyboard_increment_drives_nudge() {
assert!((b.x0 - 15.0).abs() < 1e-9);
}
/// Ctrl/Cmd+arrow (`fine`) nudges by a tenth of the keyboard increment, and Shift+Ctrl+arrow
/// (`big` and `fine`) by one increment: art, direct-selected anchors and ruler guides, one undo
/// step per press, and repeated fine nudges add up to whole increments.
#[test]
fn fine_nudge_moves_a_tenth_of_the_keyboard_increment() {
let mut s = Session::new();
s.execute("prefs.set", &json!({"key": "keyboardIncrement", "value": 5})).unwrap();
s.execute("file.new", &json!({"width": 400, "height": 400})).unwrap();
let r = s.execute("shape.rectangle", &json!({"x": 10, "y": 10, "width": 20, "height": 20})).unwrap();
let id = NodeId(r["id"].as_u64().unwrap());
let x0 = |s: &Session| s.doc().unwrap().doc.node(id).unwrap().geometric_bounds().unwrap().x0;
let undo = |s: &Session| s.doc().unwrap().history.undo.len();
let n = undo(&s);
s.execute("object.nudge", &json!({"dx": 1, "dy": 0, "fine": true})).unwrap();
assert!((x0(&s) - 10.5).abs() < 1e-9, "{}", x0(&s));
assert_eq!(undo(&s), n + 1, "one undo step per press");
s.execute("object.nudge", &json!({"dx": -1, "dy": 0, "big": true, "fine": true})).unwrap();
assert!((x0(&s) - 5.5).abs() < 1e-9, "Shift+Ctrl: one increment, {}", x0(&s));
for _ in 0..10 {
s.execute("object.nudge", &json!({"dx": 1, "dy": 0, "fine": true})).unwrap();
}
assert!((x0(&s) - 10.5).abs() < 1e-9, "ten fine nudges are one increment, {}", x0(&s));
assert_eq!(undo(&s), n + 12);
// Direct-selected anchors.
s.execute("select.anchors", &json!({"id": id.0, "anchors": [[0, 0]]})).unwrap();
let p0 = |s: &Session| s.doc().unwrap().doc.node(id).unwrap().path_data().unwrap().subpaths[0].anchors[0].p;
let before = p0(&s);
s.execute("object.nudge", &json!({"dx": 0, "dy": 1, "fine": true})).unwrap();
let d = p0(&s) - before;
assert!(d.x.abs() < 1e-9 && (d.y - 0.5).abs() < 1e-9, "{d:?}");
// Ruler guides.
s.execute("select.none", &json!({})).unwrap();
s.execute("guide.add", &json!({"vertical": true, "pos": 100})).unwrap();
s.execute("guide.select", &json!({"indexes": [0]})).unwrap();
s.execute("object.nudge", &json!({"dx": 1, "dy": 0, "fine": true})).unwrap();
let pos = s.doc().unwrap().doc.ruler_guides()[0].pos;
assert!((pos - 100.5).abs() < 1e-9, "{pos}");
assert!(s.execute("object.nudge", &json!({"dx": 1, "fine": "true"})).is_err());
}
#[test]
fn set_rejects_out_of_range_and_wrong_types() {
let mut s = Session::new();
+72 -13
View File
@@ -970,7 +970,11 @@ fn clearing_anchors_with_keep_empty_keeps_the_compound_path() {
s.execute("edit.clear", &json!({"keepEmpty": keep})).unwrap();
let d = &s.active().unwrap().doc;
assert!(d.node(a).is_none() && d.node(b).is_none(), "keepEmpty {keep}: both paths are deleted");
assert_eq!(d.node(compound).is_some_and(|n| n.children().is_some_and(|c| c.is_empty())), keep, "keepEmpty {keep}");
if keep {
assert!(d.node(compound).is_some_and(|n| n.children().is_some_and(|c| c.is_empty())), "keepEmpty true keeps it, empty");
} else {
assert!(d.node(compound).is_none(), "keepEmpty false deletes the compound path");
}
}
}
@@ -1002,11 +1006,23 @@ fn a_grid_by_column_takes_the_number_of_rows() {
let distinct = |mut v: Vec<i64>| {
v.sort_unstable();
v.dedup();
v.len()
v
};
let tops = distinct(boards.iter().map(|b| b.rect.y0.round() as i64).collect());
let lefts = distinct(boards.iter().map(|b| b.rect.x0.round() as i64).collect());
assert_eq!((tops, lefts), (rows, cols), "{layout} {count}");
assert_eq!((tops.len(), lefts.len()), (rows, cols), "{layout} {count}");
// Each artboard's row and column, counted from the top and from the left: a grid by column
// fills each column top to bottom, and the right-to-left grid starts at the rightmost column.
let index = |v: &[i64], x: f64| v.iter().position(|&t| t == x.round() as i64);
let placed: Vec<_> = boards.iter().map(|b| (index(&tops, b.rect.y0), index(&lefts, b.rect.x0))).collect();
let expected: Vec<_> = (0..count)
.map(|i| match layout {
"GridByRow" => (Some(i / cols), Some(i % cols)),
"GridByCol" => (Some(i % rows), Some(i / rows)),
_ => (Some(i % rows), Some(cols - 1 - i / rows)),
})
.collect();
assert_eq!(placed, expected, "{layout} {count}");
}
}
@@ -1382,6 +1398,18 @@ fn a_document_preset_is_an_instance_of_its_class() {
assert_eq!(out, vec![json!(true), json!("DocumentPreset"), json!(612)]);
}
/// A preset kept from an earlier run throws from `typename` and `toString()` as it does from its
/// settings.
#[test]
fn a_document_preset_from_an_earlier_run_throws_from_typename_and_to_string() {
let mut s = Session::new();
run(&mut s, "#targetengine keep\nvar p = new DocumentPreset();").unwrap();
for member in ["p.width", "p.typename", "p.toString()", "String(p)"] {
let e = failure(&mut s, &format!("#targetengine keep\n{member};"));
assert!(e.contains("TypeError") && e.contains("not a DocumentPreset"), "{member}: {e}");
}
}
/// The values the presets hold count against the run's heap, a value assigned again in place of
/// the one before it.
#[test]
@@ -1559,6 +1587,23 @@ fn headless_add_document_dialog_fails_without_creating() {
assert_eq!(s.documents().len(), 1);
}
/// `addDocumentNoUI(startupPreset)` makes the document `addDocument(startupPreset)` makes, and
/// ignores the arguments after the preset's name.
#[test]
fn add_document_no_ui_makes_the_startup_presets_document() {
let mut s = Session::new();
let out = log(
&mut s,
"var a = app.documents.addDocument('Web'); var p = new DocumentPreset(); p.width = 333;\
var b = app.documents.addDocumentNoUI('Web', p, true);\
vc.log([b.typename, b.width === a.width, b.height === a.height, b.width === 333, app.documents.length]);",
);
assert_eq!(out, vec![json!(["Document", true, true, false, 2])]);
let e = failure(&mut s, "app.documents.addDocumentNoUI('No Such Preset');");
assert!(e.contains("no startup preset called No Such Preset"), "{e}");
assert_eq!(s.documents().len(), 2);
}
#[test]
fn setting_selected_keeps_how_the_other_objects_are_selected() {
let (mut s, a, b) = doc();
@@ -1598,16 +1643,19 @@ fn add_document_takes_only_a_document_preset() {
#[test]
fn add_document_applies_the_profile_file_and_throws_when_it_cannot_be_read() {
let dir = std::env::temp_dir().join(format!("vc-script-add-document-profile-{}", std::process::id()));
let _ = std::fs::remove_dir_all(&dir);
let root = vectorcraft_testkit::TempDir::new("script-add-document-profile");
let dir = root.join("profiles");
let mut s = Session::new();
s.attach_new_doc_profiles(dir.clone());
// A profile with no file gives the defaults.
let out = log(&mut s, "vc.log(app.documents.addDocument('Web').typename);");
assert_eq!(out, vec![json!("Document")]);
assert_eq!(s.doc().unwrap().links_from, None);
// A script reads the profile's file in the app's own folder.
// A script reads the profile's file in the app's own folder, with no document open from it.
s.execute("file.newProfiles.edit", &json!({"name": "Print"})).unwrap();
while !s.documents().is_empty() {
s.execute("file.close", &json!({})).unwrap();
}
let file = dir.join("Print.vectorcraft").to_string_lossy().to_string();
log(&mut s, "app.documents.addDocument('Print');");
assert_eq!(s.doc().unwrap().links_from.as_deref(), Some(file.as_str()));
@@ -1634,13 +1682,12 @@ fn add_document_applies_the_profile_file_and_throws_when_it_cannot_be_read() {
// A startup preset with no profile reads no file.
let out = log(&mut s, "vc.log(app.documents.addDocument('Basic RGB').documentColorSpace);");
assert_eq!(out, vec![json!("DocumentColorSpace.RGB")]);
let _ = std::fs::remove_dir_all(&dir);
}
#[test]
fn add_document_names_a_color_profile_of_the_profile_file_that_cannot_be_used() {
let dir = std::env::temp_dir().join(format!("vc-script-add-document-warning-{}", std::process::id()));
let _ = std::fs::remove_dir_all(&dir);
let root = vectorcraft_testkit::TempDir::new("script-add-document-warning");
let dir = root.join("profiles");
let mut s = Session::new();
s.attach_new_doc_profiles(dir.clone());
s.execute("file.newProfiles.edit", &json!({"name": "Print"})).unwrap();
@@ -1658,7 +1705,6 @@ fn add_document_names_a_color_profile_of_the_profile_file_that_cannot_be_used()
let named = lines.iter().filter_map(Value::as_str).any(|l| l.starts_with("addDocument: ") && l.contains(&broken));
assert!(named, "{lines:?}");
assert_eq!(s.documents().len(), 1);
let _ = std::fs::remove_dir_all(&dir);
}
#[test]
@@ -1761,8 +1807,7 @@ fn setters_on_a_stale_item_report_it_before_a_bad_value() {
fn objects_read_before_a_revert_are_stale_and_ones_read_after_are_the_loaded_ones() {
// `pageItems[0]` is the topmost object, the one made last.
let (mut s, _, b) = doc();
let dir = std::env::temp_dir().join(format!("vc-dom-revert-{}", std::process::id()));
std::fs::create_dir_all(&dir).unwrap();
let dir = vectorcraft_testkit::TempDir::new("dom-revert");
let path = dir.join("saved.vectorcraft");
s.execute("document.save", &json!({"path": path.to_string_lossy()})).unwrap();
for read in ["i.name", "i.name = 'after'", "app.activeDocument.selection = i", "l.name"] {
@@ -1778,7 +1823,6 @@ fn objects_read_before_a_revert_are_stale_and_ones_read_after_are_the_loaded_one
);
assert_eq!(out, vec![json!(2)]);
assert_eq!(s.active().unwrap().doc.node(b).unwrap().name.as_deref(), Some("loaded"));
let _ = std::fs::remove_dir_all(&dir);
}
#[test]
@@ -2046,6 +2090,21 @@ fn get_is_file_open_cannot_probe_outside_script_scope() {
assert!(failure(&mut s, "app.getIsFileOpen(new Array(5000).join('a'));").contains("too long"));
}
/// Outside Windows a `\` is part of a file name: `<dir>/a\b.svg` is not the open `<dir>/a/b.svg`.
#[test]
fn get_is_file_open_keeps_a_backslash_in_a_unix_file_name() {
let (mut s, _, _) = doc();
let fixture = vectorcraft_testkit::TempDir::new("script-file-open-backslash");
let dir = fixture.join("a");
std::fs::create_dir_all(&dir).unwrap();
let path = dir.join("b.svg");
s.execute("document.save", &json!({"path": path.to_string_lossy()})).unwrap();
let same = serde_json::to_string(&path.to_string_lossy()).unwrap();
let backslash = serde_json::to_string(&format!("{}\\b.svg", dir.to_string_lossy())).unwrap();
let out = log(&mut s, &format!("vc.log(app.getIsFileOpen({same})); vc.log(app.getIsFileOpen({backslash}));"));
assert_eq!(out, vec![json!(true), json!(cfg!(windows))]);
}
#[test]
fn a_menu_command_runs_its_command_on_the_selection() {
let (mut s, a, b) = doc();
+16 -35
View File
@@ -88,10 +88,10 @@ fn a_run_is_one_undo_step_in_each_document_it_changed() {
#[test]
fn a_run_that_changes_nothing_leaves_no_step_no_mark_and_no_journal_entry() {
let dir = fresh_folder("noop");
for source in ["", "var a = 1 + 2;", "vc.log(vc.document); vc.commands.length;"] {
let mut s = two_docs();
s.execute("document.save", &json!({"path": std::env::temp_dir().join(format!("vc-noop-{}.svg", std::process::id())).to_string_lossy()}))
.unwrap();
s.execute("document.save", &json!({"path": dir.join("noop.svg").to_string_lossy()})).unwrap();
let before = state(&s);
let revisions = |s: &Session| s.documents().iter().map(|d| d.revision).collect::<Vec<_>>();
let revisions_before = revisions(&s);
@@ -183,6 +183,11 @@ fn failed_script_report_keeps_message_and_adds_origin() {
("throw new RangeError('invalid array length');", "thrown", "RangeError: invalid array length", "script"),
("throw 'invalid array length';", "thrown", "invalid array length", "script"),
("throw 'ReferenceError: BridgeTalk is not defined';", "thrown", "ReferenceError: BridgeTalk is not defined", "script"),
("throw new ReferenceError('BridgeTalk is not defined');", "thrown", "ReferenceError: BridgeTalk is not defined", "script"),
("throw 'ReferenceError: Window is not defined';", "thrown", "ReferenceError: Window is not defined", "script"),
("throw new ReferenceError('Window is not defined');", "thrown", "ReferenceError: Window is not defined", "script"),
("throw 'ReferenceError: activeDocument is not defined';", "thrown", "ReferenceError: activeDocument is not defined", "script"),
("throw new ReferenceError('activeDocument is not defined');", "thrown", "ReferenceError: activeDocument is not defined", "script"),
("try { new Array(-1); } catch (e) { throw new Error(e.message); }", "thrown", "Error: invalid array length", "script"),
("new Array(-1);", "thrown", "RangeError: invalid array length", "built-in"),
("try { new Array(-1); } catch (e) { throw e; }", "thrown", "RangeError: invalid array length", "built-in"),
@@ -266,9 +271,7 @@ fn bad_parameters_are_refused_before_anything_runs() {
#[test]
fn files_are_checked_before_they_are_read() {
let dir = std::env::temp_dir().join(format!("vc-script-run-{}", std::process::id()));
let _ = std::fs::remove_dir_all(&dir);
std::fs::create_dir_all(&dir).unwrap();
let dir = fresh_folder("checked");
let write = |name: &str, bytes: &[u8]| {
let p = dir.join(name);
std::fs::write(&p, bytes).unwrap();
@@ -296,7 +299,6 @@ fn files_are_checked_before_they_are_read() {
assert_eq!(s.execute("script.run", &path(&upper)).unwrap()["log"], json!([3]));
std::fs::create_dir_all(dir.join("folder.js")).unwrap();
assert!(s.execute("script.run", &path(&dir.join("folder.js").to_string_lossy())).is_err());
let _ = std::fs::remove_dir_all(&dir);
}
#[test]
@@ -341,7 +343,6 @@ fn a_js_script_reads_ecmascript_2015_and_a_jsx_script_does_not() {
assert_eq!(kept["log"], json!(["1xy"]), "{kept}");
let e = s.execute("script.run", &path(&write("pattern.jsx", "var [a] = [1];"))).unwrap_err().to_string();
assert!(e.contains("SyntaxError"), "{e}");
let _ = std::fs::remove_dir_all(&dir);
}
#[test]
@@ -367,7 +368,6 @@ fn a_js_script_reads_object_literal_extensions_and_function_names_and_a_jsx_scri
assert_eq!(legacy["log"], json!([false]), "{legacy}");
// Script text given without a file keeps the ExtendScript language.
assert!(run(&mut s, "var a = 1; var o = { a };").unwrap_err().to_string().contains("SyntaxError"));
let _ = std::fs::remove_dir_all(&dir);
}
#[test]
@@ -390,7 +390,6 @@ fn a_js_script_reads_optional_chains_and_coalescing_and_a_jsx_script_does_not()
}
// Script text given without a file keeps the ExtendScript language.
assert!(run(&mut s, "vc.log(null ?? 1);").unwrap_err().to_string().contains("SyntaxError"));
let _ = std::fs::remove_dir_all(&dir);
}
#[test]
@@ -417,7 +416,6 @@ fn a_js_script_runs_generators_and_a_jsx_script_does_not_read_them() {
s.execute("script.run", &path(&write("keep.jsx", "#targetengine genkept\nvar a = 1;"))).unwrap();
let e = s.execute("script.run", &path(&write("keep.js", "#targetengine genkept\nfunction* g() {}\ng();"))).unwrap_err().to_string();
assert!(e.contains("TypeError"), "{e}");
let _ = std::fs::remove_dir_all(&dir);
}
#[test]
@@ -451,7 +449,6 @@ fn every_script_reads_e4x_and_has_the_xml_objects() {
s.execute("script.run", &path(&write("first.js", "#targetengine xmlkept\nlet k = 1;"))).unwrap();
let later = s.execute("script.run", &path(&write("second.jsx", "#targetengine xmlkept\nvc.log(XML('<k>2</k>').toString());"))).unwrap();
assert_eq!(later["log"], json!(["2"]), "{later}");
let _ = std::fs::remove_dir_all(&dir);
}
#[test]
@@ -474,15 +471,11 @@ fn a_js_script_defines_classes_and_a_jsx_script_cannot() {
assert!(e.contains("SyntaxError"), "{name}: {e}");
}
assert!(run(&mut s, "var C = class {};").unwrap_err().to_string().contains("SyntaxError"));
let _ = std::fs::remove_dir_all(&dir);
}
/// A new empty folder for test `name`.
fn fresh_folder(name: &str) -> std::path::PathBuf {
let dir = std::env::temp_dir().join(format!("vc-script-run-{name}-{}", std::process::id()));
let _ = std::fs::remove_dir_all(&dir);
std::fs::create_dir_all(&dir).unwrap();
dir
/// A new empty folder for test `name`, removed when dropped, also when the test fails.
fn fresh_folder(name: &str) -> vectorcraft_testkit::TempDir {
vectorcraft_testkit::TempDir::new(&format!("script-run-{name}"))
}
/// Starts `source` in the app after a folder dialog it opens first, and allows the script the folder
@@ -530,7 +523,6 @@ fn a_failed_batch_puts_back_the_session_and_names_a_file_it_wrote() {
assert!(!s.guides_locked(), "the failed batch's Lock Guides does not stay");
assert!(path.exists());
assert_eq!(r["written"], json!([p]), "{r}");
let _ = std::fs::remove_dir_all(&dir);
}
#[test]
@@ -544,7 +536,6 @@ fn an_export_that_fails_names_no_file() {
assert_eq!(r["log"], json!(["Error"]), "{r}");
assert!(!path.exists());
assert_eq!(r["written"], json!([]), "{r}");
let _ = std::fs::remove_dir_all(&dir);
}
/// The commands a script runs read and write only where its `File` and `Folder` objects may (its
@@ -594,7 +585,6 @@ fn a_scripts_commands_reach_only_its_own_places_and_the_open_documents() {
let r = run(&mut s, &call("document.save", &own)).unwrap();
assert_eq!(r["log"], json!(["ok"]), "a document's own file that was removed is made again: {r}");
assert!(own.exists());
let _ = std::fs::remove_dir_all(&dir);
}
/// The color at the middle of the PNG at `path`.
@@ -656,7 +646,6 @@ fn a_scripts_export_reads_the_files_the_documents_open_before_it_link_to() {
assert!(near(middle_color(&first), BLUE), "the linked file, not its preview: {:?}", middle_color(&first));
assert!(near(middle_color(&second), RED), "a document the script opened gets no linked file: {:?}", middle_color(&second));
assert_eq!(std::fs::read(&pic).unwrap(), png(600, 300, BLUE), "the linked file is not written");
let _ = std::fs::remove_dir_all(&dir);
}
/// A script line that runs command `id` with `params` and logs `ok`, or `denied` when the gate
@@ -674,7 +663,8 @@ fn tried(id: &str, params: &str) -> String {
#[test]
fn a_document_a_script_opened_from_a_linked_file_stays_read_only_in_later_runs() {
use crate::tests_links::{RED, open, place, png, save, session, write};
let art = fresh_folder("gate-linked-runs").join("art");
let root = fresh_folder("gate-linked-runs");
let art = root.join("art");
std::fs::create_dir_all(&art).unwrap();
let p = |f: std::path::PathBuf| f.to_string_lossy().into_owned();
let (pic, inner, poster) = (p(art.join("photo.png")), p(art.join("inner.vectorcraft")), p(art.join("poster.vectorcraft")));
@@ -704,7 +694,6 @@ fn a_document_a_script_opened_from_a_linked_file_stays_read_only_in_later_runs()
log.push(later["log"][0].clone());
assert_eq!(log, [json!("denied"), json!("denied")], "a save in the next run, then a read once nothing the person left links to it");
assert_eq!(std::fs::read(&inner).unwrap(), bytes, "the linked file is as it was");
let _ = std::fs::remove_dir_all(art.parent().unwrap());
}
/// A data set value a script gives a document, and a document a script opens, let no later run
@@ -741,7 +730,6 @@ fn what_a_script_adds_to_the_documents_lets_no_later_run_read_more() {
s.execute("document.save", &json!({"path": mine})).unwrap();
let saved = run(&mut s, &read_secret).unwrap();
assert_eq!(saved["log"], json!(["ok"]), "saved by the person: {saved}");
let _ = std::fs::remove_dir_all(&dir);
}
/// A save the person started before a script's command changed the document, and that finishes
@@ -766,7 +754,6 @@ fn a_save_started_before_a_scripts_change_lets_no_later_run_read_more() {
job.complete(&mut s, uid);
let r = run(&mut s, &tried("file.place", &format!("{{path: {secret:?}, at: [200, 150]}}"))).unwrap();
assert_eq!(r["log"], json!(["denied"]), "{r}");
let _ = std::fs::remove_dir_all(&dir);
}
/// A command a script runs does not save into the app's own libraries; the same command run
@@ -784,7 +771,6 @@ fn a_scripts_commands_do_not_save_into_the_apps_libraries() {
assert!(std::fs::read_dir(&user).map_or(true, |mut d| d.next().is_none()), "nothing is written in the user library folder");
s.execute("swatch.library.save", &json!({"user": true, "name": "Mine"})).unwrap();
assert_eq!(std::fs::read_dir(&user).unwrap().count(), 1);
let _ = std::fs::remove_dir_all(&dir);
}
#[test]
@@ -867,7 +853,6 @@ fn an_abandoned_run_reports_the_files_it_wrote() {
let report = s.script_report().unwrap();
assert_eq!((report["kind"].as_str(), report["written"].clone()), (Some("stopped"), json!([p])), "{report}");
assert!(s.script_failure_text().unwrap().contains(&p));
let _ = std::fs::remove_dir_all(&dir);
}
#[test]
@@ -1457,15 +1442,13 @@ fn a_file_saved_before_a_failure_stays_written_and_is_named() {
assert!(e.contains(&p), "{e}");
assert_eq!(s.script_report().unwrap()["written"], json!([p]));
assert_eq!(state(&s), before, "the document does not keep the new path");
let _ = std::fs::remove_dir_all(&dir);
}
/// A run in the app's frames keeps the file-access scope its `script.run` came in, whatever scope
/// the frames that advance it run in.
#[test]
fn a_framed_run_keeps_the_file_access_scope_it_started_in() {
let dir = std::env::temp_dir().join(format!("vc-script-scope-{}", std::process::id()));
let _ = std::fs::remove_dir_all(&dir);
let dir = fresh_folder("scope");
let (allowed, outside) = (dir.join("allowed"), dir.join("outside"));
std::fs::create_dir_all(&allowed).unwrap();
std::fs::create_dir_all(&outside).unwrap();
@@ -1492,13 +1475,12 @@ fn a_framed_run_keeps_the_file_access_scope_it_started_in() {
let r = crate::file_access::confine(Some(&roots), || finish(&mut s)).unwrap();
assert_eq!(r["log"], json!(["ok"]), "a run the person started is not confined by a later caller: {r}");
assert!(user_target.exists());
let _ = std::fs::remove_dir_all(&dir);
}
#[test]
fn a_committed_run_exports_what_it_drew() {
let path = std::env::temp_dir().join(format!("vc-script-export-{}.svg", std::process::id()));
let _ = std::fs::remove_file(&path);
let dir = fresh_folder("export");
let path = dir.join("export.svg");
let p = path.to_string_lossy().into_owned();
let mut s = Session::new();
s.execute("file.new", &json!({})).unwrap();
@@ -1509,7 +1491,6 @@ fn a_committed_run_exports_what_it_drew() {
assert_eq!(svg.matches("<rect").count() + svg.matches("<path").count(), 7, "{svg}");
let inspected = s.execute("document.inspect", &json!({})).unwrap();
assert_eq!(inspected["layers"][0]["children"].as_array().map(Vec::len), Some(7));
let _ = std::fs::remove_file(&path);
}
#[test]
+1
View File
@@ -679,6 +679,7 @@ fn structured_junk() {
("perspective.transform", json!({"matrix": [1, 0, 0, 1, 0, 0], "depth": -1e9, "plane": "left", "copy": true})),
("perspective.transform", json!({"matrix": [1, 0, 0, 1, 1e300, 0], "plane": "left"})),
("perspective.nudge", json!({"dx": 1e308, "dy": -1e308, "big": true, "copy": true})),
("perspective.nudge", json!({"dx": 1e308, "dy": -1e308, "fine": true})),
("perspective.plane.move", json!({"plane": "ground", "offset": 1e308, "objects": "copy"})),
("perspective.plane.move", json!({"plane": "left", "by": -1e7, "objects": "move"})),
("perspective.plane.move", json!({"plane": "none", "offset": 0})),
@@ -108,7 +108,7 @@ const INSIDE: &[(&str, &str)] = &[
toString transparencyGrid transparencyGrid= typename units units= width width=",
),
("Documents.", "prototype"),
("Documents.prototype.", "add addDocument constructor getByName index length parent toString typename"),
("Documents.prototype.", "add addDocument addDocumentNoUI constructor getByName index length parent toString typename"),
("Document.", "prototype"),
(
"Document.prototype.",
+15 -2
View File
@@ -314,8 +314,21 @@ fn get_at(interp: &mut Interp, o: ObjId, k: f64) -> JsResult<Value> {
interp.get_from(o, &key_of(k), &Value::Object(o))
}
fn has_at(interp: &mut Interp, o: ObjId, k: f64) -> JsResult<bool> {
interp.has_property_indexed(o, &key_of(k))
/// The element at `k` when the object or its prototypes have one: [[HasProperty]], then [[Get]].
/// An object of a host class with an indexer answers an array index with one call of the indexer,
/// made as `k in object` makes it, and has the element when the answer is not `undefined`.
fn element_at(interp: &mut Interp, o: ObjId, k: f64) -> JsResult<Option<Value>> {
let key = key_of(k);
if crate::value::array_index(&key).is_some()
&& let Some(f) = interp.host_indexer(o)?
{
let v = interp.host_index(&f, o, crate::Data::Number(k), true)?;
return Ok((!matches!(v, Value::Undefined)).then_some(v));
}
if !interp.has_property_indexed(o, &key)? {
return Ok(None);
}
interp.get_from(o, &key, &Value::Object(o)).map(Some)
}
/// The estimated bytes a new element adds.
+8 -9
View File
@@ -5,11 +5,12 @@
//! the range is much longer than the object has properties (a sparse array such as
//! `new Array(4294967295)`), so a long empty range costs nothing and no index is allocated for
//! it. The list of indices is made again whenever a script adds an index property to any object
//! while the method runs. Every index visited takes a unit of fuel.
//! while the method runs. An object of a host class with an indexer has every index of the range
//! visited, since its elements are not properties. Every index visited takes a unit of fuel.
use super::{
Builder, ELEMENT_BYTES, arg, constructor, create_at, delete_at, get_at, has_at, length_of, method, native, new_array, object_to_string, put_at,
require_callable, to_integer,
Builder, ELEMENT_BYTES, arg, constructor, create_at, delete_at, element_at, get_at, length_of, method, native, new_array, object_to_string,
put_at, require_callable, to_integer,
};
use crate::heap::{Class, NativeKind, ObjId};
use crate::interp::{Abrupt, Interp, JsResult, strict_eq};
@@ -121,7 +122,9 @@ fn chain(interp: &Interp, obj: ObjId) -> Vec<(ObjId, usize)> {
impl Indices {
fn new(interp: &mut Interp, obj: ObjId, lo: u64, hi: u64, ascending: bool, maps: Vec<Map>) -> JsResult<Self> {
let mut it = Indices { obj, lo, hi, ascending, maps, sparse: None };
if hi.saturating_sub(lo) > DENSE_SPAN {
// An object of a host class with an indexer holds its elements in the host, not in
// properties, so every index of the range is visited.
if hi.saturating_sub(lo) > DENSE_SPAN && interp.host_indexer(obj)?.is_none() {
let present: usize = chain(interp, obj).iter().map(|(_, n)| *n).fold(0, usize::saturating_add);
if hi - lo > (present as u64).saturating_mul(8) {
it.sparse = Some(it.gather(interp)?);
@@ -206,11 +209,7 @@ impl Indices {
/// The element at `k` when the object or its prototypes have one.
fn element(interp: &mut Interp, o: ObjId, k: u64) -> JsResult<Option<Value>> {
let k = k as f64;
if !has_at(interp, o, k)? {
return Ok(None);
}
get_at(interp, o, k).map(Some)
element_at(interp, o, k as f64)
}
/// ToObject of `this`, kept reachable while `f` runs.
+10 -3
View File
@@ -21,7 +21,10 @@
//! has. Names the engine looks up itself, such as `toJSON` in `JSON.stringify`, do not go to the
//! indexer. Assigning to such a name reads it with the indexer first, so the assignment throws what
//! the read throws; otherwise the value is not kept. `k in object` calls the indexer with `true` as
//! a third argument, and is true when it gives a value other than `undefined`.
//! a third argument, and is true when it gives a value other than `undefined`. The `Array.prototype`
//! methods that skip missing elements, such as `forEach` and `map`, read each index of such an
//! object with that one call and take its answer as the element, so an indexer called with `true`
//! gives the element itself, or `undefined` when there is none.
//!
//! `hasOwnProperty` and `propertyIsEnumerable` are true on an object of a host class for each
//! member of its class and of the classes it descends from, apart from the members that are not
@@ -105,7 +108,10 @@ pub struct HostClass {
/// What `reflect` tells of the members, each under the name of one of `members`. A member
/// without an entry has the type `unknown` and nothing else.
pub info: Vec<(String, MemberInfo)>,
/// What `object[i]` gives for an array index `i`.
/// What `object[i]` gives for an array index `i`. Called with `true` as a third argument, it
/// gives the same element, or `undefined` when there is none. The `Array.prototype` methods that
/// skip missing elements, such as `forEach` and `map`, make that call and use its answer as the
/// element; reads without the third argument, such as those of `join`, are ordinary reads.
pub index: Option<HostFunction>,
/// What `new Name(...)` and `Name(...)` give; without it both throw a `TypeError`.
pub construct: Option<HostFunction>,
@@ -365,7 +371,8 @@ impl Interp {
/// `object[k]` of an object of a host class, which its class's indexer `f` answers: `k` is an
/// array index as a number, or a name as a string. With `probe`, for `k in object`, the indexer
/// gets `true` as a third argument.
/// gets `true` as a third argument and gives the element itself, or `undefined` when there is
/// none, not a marker.
pub(crate) fn host_index(&mut self, f: &HostFunction, id: ObjId, k: Data, probe: bool) -> JsResult<Value> {
self.use_fuel()?;
if self.host_ref_size(id)?.is_none() {
+43
View File
@@ -1035,6 +1035,49 @@ fn assigning_a_name_a_prototype_has_does_not_call_the_indexer() {
assert_eq!(calls.get(), 1);
}
/// A realm with `it`, a host collection of `len` numbers whose element `i` is `i`, and the count
/// of the indexer's calls.
fn numbers(len: usize) -> (Realm, Rc<Cell<u32>>) {
let mut r = realm(10_000_000);
let calls: Rc<Cell<u32>> = Rc::default();
let seen = calls.clone();
let index: HostFunction = Rc::new(move |a| {
seen.set(seen.get() + 1);
match a.get(1) {
Some(Data::Number(n)) if *n < len as f64 => Ok(Data::Number(*n)),
_ => Ok(Data::Undefined),
}
});
let length: HostFunction = Rc::new(move |_| Ok(Data::Number(len as f64)));
let class = HostClass {
name: "Numbers".into(),
parent: None,
members: vec![("length".into(), HostMember::Get(length))],
info: Vec::new(),
index: Some(index),
construct: None,
};
r.define_host_classes(vec![class], vec![("it".into(), host_ref("Numbers", &[1.0]))]).unwrap();
(r, calls)
}
#[test]
fn array_methods_visit_every_element_of_a_long_host_collection() {
let (mut r, _) = numbers(5000);
let source = "var n = 0; Array.prototype.forEach.call(it, function () { n++; }); \
var m = Array.prototype.map.call(it, function (x) { return x; }); \
[n, m.length, m[4999], Array.prototype.lastIndexOf.call(it, 0), Array.prototype.indexOf.call(it, 4999)].join()";
assert_eq!(r.run(source).unwrap(), JsValue::String("5000,5000,4999,0,4999".into()));
}
#[test]
fn array_methods_call_the_indexer_once_for_each_element() {
let (mut r, calls) = numbers(3);
let source = "var s = 0; Array.prototype.forEach.call(it, function (x) { s += x; }); s";
assert_eq!(r.run(source).unwrap(), JsValue::Number(3.0));
assert_eq!(calls.get(), 3);
}
#[test]
fn a_converted_function_reads_each_argument_as_its_list_says() {
let mut r = realm(1_000_000);
+16 -3
View File
@@ -409,11 +409,12 @@ impl ToolContext<'_> {
pub fn star_radii_label(&self, outer: f64, inner: f64) -> String {
format!("R1: {}\nR2: {}", self.len(outer), self.len(inner))
}
/// The move an arrow key nudges by: General › Keyboard Increment (ten times with Shift),
/// along General › Constrain Angle's axes; `None` for other keys.
/// The move an arrow key nudges by: General › Keyboard Increment, ten times with Shift and a
/// tenth with Ctrl/Cmd ([`nudge_step`]), along General › Constrain Angle's axes; `None` for
/// other keys.
pub fn arrow_nudge(&self, key: crate::ToolKey, mods: crate::Mods) -> Option<Vec2> {
use crate::ToolKey;
let step = self.keyboard_increment * if mods.shift { 10.0 } else { 1.0 };
let step = nudge_step(self.keyboard_increment, mods.shift, mods.cmd);
let d = match key {
ToolKey::Left => Point::new(-step, 0.0),
ToolKey::Right => Point::new(step, 0.0),
@@ -486,3 +487,15 @@ impl ToolContext<'_> {
vectorcraft_doc::hit::HitOptions { clip_outlines: true, unfilled_interiors: true, ..self.hit_options() }
}
}
/// The arrow keys' step: the keyboard increment, ×10 with Shift (`big`) and ÷10 with Ctrl/Cmd
/// (`fine`), so Shift+Ctrl+arrow moves by one increment. Divided, not multiplied by 0.1, so a tenth
/// of a 1 pt increment is the nearest `f64` to 0.1.
pub fn nudge_step(increment: f64, big: bool, fine: bool) -> f64 {
match (big, fine) {
(true, true) => increment,
(true, false) => increment * 10.0,
(false, true) => increment / 10.0,
(false, false) => increment,
}
}
+4 -1
View File
@@ -681,7 +681,8 @@ fn a_marquee_selects_frame_anchors_of_area_type() {
assert_eq!(a[0], Action::Begin("Reshape Type Area".into()));
assert_eq!(a[1], Action::Preview("text.reshapeArea".into(), json!({"id": text.0, "anchors": [[0, 1], [0, 2]], "dx": 20.0, "dy": 20.0})));
assert_eq!(t.pointer(&cx2, &ev(PointerKind::Up, 440.0, 360.0)), vec![Action::Commit, Action::Notify(FRAME_PICKED.into())]);
// The arrow keys nudge them by the keyboard increment, ten times that with Shift.
// The arrow keys nudge them by the keyboard increment, ten times that with Shift, a tenth with
// Ctrl/Cmd and one increment with both (#5258).
let nudged = |anchors: Value, dx: f64, dy: f64| {
vec![
Action::Exec("text.reshapeArea".into(), json!({"id": text.0, "anchors": anchors, "dx": dx, "dy": dy})),
@@ -691,6 +692,8 @@ fn a_marquee_selects_frame_anchors_of_area_type() {
assert!(t.claims_key(&cx2, ToolKey::Right) && !t.claims_key(&cx2, ToolKey::Enter));
assert_eq!(t.key(&cx2, ToolKey::Right, Mods::default()), nudged(json!([[0, 1], [0, 2]]), 1.0, 0.0));
assert_eq!(t.key(&cx2, ToolKey::Up, Mods { shift: true, ..Mods::default() }), nudged(json!([[0, 1], [0, 2]]), 0.0, -10.0));
assert_eq!(t.key(&cx2, ToolKey::Left, Mods { cmd: true, ..Mods::default() }), nudged(json!([[0, 1], [0, 2]]), -0.1, 0.0));
assert_eq!(t.key(&cx2, ToolKey::Down, Mods { shift: true, cmd: true, ..Mods::default() }), nudged(json!([[0, 1], [0, 2]]), 0.0, 1.0));
// Any other change of the document or the selection (Deselect, then the same type selected
// again) leaves the type selected whole: the arrow keys are no longer the tool's.
let mut later = cx(&d, &s, &p);
@@ -337,7 +337,7 @@ impl Tool for PerspectiveSelectionTool {
if !self.claims_key(cx, key) {
return vec![];
}
vec![Action::Exec("perspective.nudge".into(), json!({"dx": dx, "dy": dy, "big": mods.shift, "copy": mods.alt}))]
vec![Action::Exec("perspective.nudge".into(), json!({"dx": dx, "dy": dy, "big": mods.shift, "fine": mods.cmd, "copy": mods.alt}))]
}
fn claims_key(&self, cx: &ToolContext, key: ToolKey) -> bool {
// The arrows nudge a selection in perspective.
+1 -1
View File
@@ -67,7 +67,7 @@ mod cursor;
mod input;
mod readout;
pub use context::{GlyphSnap, MarqueeMode, PaintDefaults, PixelOp, PixelSnap, ScreenFrame, ToolContext, ordinary_isolation};
pub use context::{GlyphSnap, MarqueeMode, PaintDefaults, PixelOp, PixelSnap, ScreenFrame, ToolContext, nudge_step, ordinary_isolation};
pub use cursor::Cursor;
pub use input::{Action, Mods, PenPose, PointerEvent, PointerKind, ToolKey};
pub use readout::Readout;
+24 -10
View File
@@ -1137,21 +1137,35 @@ mod tests {
open(&mut app);
let out = laid_out(&mut app);
let nodes = out.platform_output.accesskit_update.as_ref().map(|u| u.nodes.clone()).unwrap_or_default();
let card = nodes
// The Home screen's own document cards stand behind the dialog, and the update lists nodes in no fixed order:
// the card is looked for under the dialog only.
let by_id: std::collections::HashMap<_, _> = nodes.iter().map(|(id, n)| (*id, n)).collect();
let mut in_dialog = Vec::new();
let mut stack: Vec<_> = nodes.iter().filter(|(_, n)| n.role() == egui::accesskit::Role::Dialog).map(|(id, _)| *id).collect();
while let Some(id) = stack.pop() {
if let Some(node) = by_id.get(&id) {
in_dialog.push(*node);
stack.extend(node.children().iter().copied());
}
}
let cards: Vec<_> = in_dialog
.iter()
.find(|(_, n)| n.role() == egui::accesskit::Role::ListItem && n.label().is_some_and(|l| !l.is_empty()) && n.is_selected() == Some(false))
.and_then(|(_, n)| n.bounds())
.filter(|n| n.role() == egui::accesskit::Role::ListItem && n.label().is_some_and(|l| !l.is_empty()) && n.is_selected() == Some(false))
.filter_map(|n| n.bounds())
.map(|b| egui::Rect::from_min_max(egui::pos2(b.x0 as f32, b.y0 as f32), egui::pos2(b.x1 as f32, b.y1 as f32)))
.expect("a preset card that is not selected");
.collect();
assert!(!cards.is_empty(), "a preset card that is not selected");
let shapes = crate::tests_labels::flat_painted_shapes(&out.shapes);
let rects: Vec<_> = shapes.iter().filter_map(|shape| if let egui::Shape::Rect(rect) = shape { Some(rect) } else { None }).collect();
let veil = |fill: egui::Color32| fill.a() > 0 && fill.a() < scrim.a() && fill.to_opaque() == scrim.to_opaque();
assert!(
rects.iter().any(|rect| veil(rect.fill) && rect.rect.contains_rect(card.shrink(1.0)) && card.expand(1.0).contains_rect(rect.rect)),
"a veil of the scrim {scrim:?} covers the resting card {card:?}: {:?}",
rects.iter().filter(|rect| card.expand(1.0).contains_rect(rect.rect)).map(|rect| (rect.rect, rect.fill)).collect::<Vec<_>>()
);
assert!(rects.iter().any(|rect| rect.fill == egui::Color32::WHITE && card.contains_rect(rect.rect)), "the card's paper is on the tile");
for card in cards {
assert!(
rects.iter().any(|rect| veil(rect.fill) && rect.rect.contains_rect(card.shrink(1.0)) && card.expand(1.0).contains_rect(rect.rect)),
"a veil of the scrim {scrim:?} covers the resting card {card:?}: {:?}",
rects.iter().filter(|rect| card.expand(1.0).contains_rect(rect.rect)).map(|rect| (rect.rect, rect.fill)).collect::<Vec<_>>()
);
assert!(rects.iter().any(|rect| rect.fill == egui::Color32::WHITE && card.contains_rect(rect.rect)), "the card's paper is on the tile");
}
}
/// Recent shows each entry as it was made: a portrait and a landscape A3 are two documents, and
+144 -6
View File
@@ -21,6 +21,40 @@ pub(crate) const CMD: &str = "object.stepAndRepeat";
pub(crate) struct Open {
pub id: DialogId,
pub preview: LivePreview,
/// The opening document's uid and revert count.
document: (u64, u64),
}
impl Open {
fn in_source(&self, app: &VectorcraftApp) -> bool {
app.session.active().is_some_and(|doc| (doc.uid, doc.reverts) == self.document)
}
/// Why OK is refused while the opening document is not the active one, after a revert too.
fn away(&self, app: &mut VectorcraftApp) -> Option<String> {
if self.in_source(app) {
return None;
}
let (uid, _) = self.document;
if app.session.active().is_some_and(|doc| doc.uid == uid) {
let reason = tl!("The document was reverted. Reopen this dialog to continue.");
app.status(reason);
Some(reason.into())
} else if app.session.documents().iter().any(|doc| doc.uid == uid) {
Some("switch back to the document where Step and Repeat was opened".into())
} else {
Some("the document where Step and Repeat was opened has closed".into())
}
}
}
/// Rolls back the preview of an open dialog and drops its record.
fn cancel_open(app: &mut VectorcraftApp) {
if let Some(open) = app.object_dialogs.step.take()
&& open.in_source(app)
{
open.preview.cancel(app);
}
}
fn cut_ids(doc: &vectorcraft_doc::Document, selected: &[vectorcraft_doc::NodeId]) -> Vec<(u64, String)> {
@@ -104,6 +138,9 @@ pub(crate) fn open(app: &mut VectorcraftApp) {
fn try_open(app: &mut VectorcraftApp) -> Result<Value, String> {
let ctx = app.ui_ctx.clone().ok_or("no window")?;
// Rolls back the preview of a dialog this one replaces, before the cut paths are listed.
cancel_open(app);
let document = app.session.active().map(|doc| (doc.uid, doc.reverts)).ok_or("no document")?;
let lengths = LengthUnits::new(UnitKind::Points, super::rearrange_artboards::length_kind(app.session.general_unit()), 72.0);
let lengths = crate::fields::bare_points(lengths, app.session.prefs.numbers_without_units_are_points);
let cuts = cut_options(app);
@@ -112,23 +149,28 @@ fn try_open(app: &mut VectorcraftApp) -> Result<Value, String> {
});
let ok = |app: &mut VectorcraftApp, result: &ParamResult| {
let mut open = app.object_dialogs.step.take().ok_or("the dialog is closed")?;
if let Some(reason) = open.away(app) {
app.object_dialogs.step = Some(open);
return Err(reason);
}
let done = std::mem::take(&mut open.preview).commit(app, CMD, params(&result.fields));
if done.is_err() {
app.object_dialogs.step = Some(open);
}
done.map(|_| ())
};
let cancel: Box<dyn FnOnce(&mut VectorcraftApp)> = Box::new(|app| {
if let Some(open) = app.object_dialogs.step.take() {
open.preview.cancel(app);
}
});
let cancel: Box<dyn FnOnce(&mut VectorcraftApp)> = Box::new(cancel_open);
let id = open_held_with(app, dialog, ok, HeldOptions { cancel: Some(cancel), ..Default::default() }).ok_or("no window")?;
app.object_dialogs.step = Some(Open { id, preview: LivePreview::default() });
app.object_dialogs.step = Some(Open { id, preview: LivePreview::default(), document });
Ok(Value::Null)
}
/// Each frame: previews the dialog's values on the opening document while Preview is on. Another
/// document, or the opening one after a revert, gets no preview.
pub(crate) fn pump(app: &mut VectorcraftApp, _ctx: &egui::Context) {
if !app.object_dialogs.step.as_ref().is_some_and(|open| open.in_source(app)) {
return;
}
let Some(mut open) = app.object_dialogs.step.take() else { return };
let shown =
app.dialogs().and_then(|host| host.with(|h| h.get_by_id::<HostedParamDialog>(open.id).map(|d| (d.is_previewing(), params(d.fields())))));
@@ -165,4 +207,100 @@ mod tests {
let ids: Vec<u64> = cut_ids(doc, &[vectorcraft_doc::NodeId(outer)]).into_iter().map(|(i, _)| i).collect();
assert!([outer, inner, a, b, c].iter().all(|i| ids.contains(i)));
}
type Harness = egui_kittest::Harness<'static, VectorcraftApp>;
/// An app with two documents, each with one selected square, the first one active.
fn two_documents() -> VectorcraftApp {
let mut app = VectorcraftApp::new(vectorcraft_engine::Session::new(), Default::default());
for x in [20, 70] {
app.run("file.new", json!({"width": 300, "height": 300})).unwrap();
app.run("shape.rectangle", json!({"x": x, "y": 20, "width": 50, "height": 50})).unwrap();
app.run("select.all", json!({})).unwrap();
}
app.run("document.activate", json!({"index": 0})).unwrap();
app
}
/// A harness that shows the dialog host and runs this module's pump each frame.
fn start(app: VectorcraftApp) -> Harness {
let mut ready = false;
let mut h = egui_kittest::Harness::builder().with_size(egui::vec2(900.0, 700.0)).build_ui_state(
move |ui, app: &mut VectorcraftApp| {
if !std::mem::replace(&mut ready, true) {
crate::testing::install(ui.ctx());
app.adopt_context(ui.ctx());
return;
}
if let Some(dialogs) = app.dialogs() {
dialogs.with(|host| host.run(ui));
}
pump(app, ui.ctx());
crate::dialogs::host::pump(app, ui.ctx());
},
app,
);
h.run_steps(2);
h
}
fn id(h: &Harness) -> DialogId {
h.state().object_dialogs.step.as_ref().expect("Step and Repeat is open").id
}
fn set(h: &mut Harness, key: &str, value: Value) {
let (ctx, id) = (h.ctx.clone(), id(h));
h.state().dialogs().unwrap().with(|host| host.set_json_field(&ctx, id, key, value)).unwrap();
h.run_steps(2);
}
fn confirm(h: &mut Harness) {
let (ctx, id) = (h.ctx.clone(), id(h));
assert!(h.state().dialogs().unwrap().with(|host| host.confirm_by_id(&ctx, id)) || h.state().object_dialogs.step.is_some());
h.run_steps(3);
}
fn objects(h: &Harness) -> usize {
h.state().session.doc().unwrap().doc.layers[0].children().unwrap().len()
}
#[test]
fn preview_and_ok_stay_on_the_opening_document() {
let mut h = start(two_documents());
open(h.state_mut());
h.run_steps(2);
set(&mut h, "columns", json!(3));
assert_eq!(objects(&h), 6, "the opening document previews 2 × 3");
h.state_mut().run("document.activate", json!({"index": 1})).unwrap();
let other = h.state().session.doc().unwrap().doc.clone();
set(&mut h, "columns", json!(4));
assert_eq!(h.state().session.doc().unwrap().doc, other, "Preview must leave the other document unchanged");
confirm(&mut h);
assert_eq!(h.state().session.doc().unwrap().doc, other, "OK must leave the other document unchanged");
assert!(h.state().object_dialogs.step.is_some(), "the dialog stays open");
h.state_mut().run("document.activate", json!({"index": 0})).unwrap();
confirm(&mut h);
assert!(h.state().object_dialogs.step.is_none(), "OK applies on the opening document");
assert_eq!(objects(&h), 8);
}
#[test]
fn reopening_rolls_back_the_earlier_preview() {
let mut h = start(two_documents());
open(h.state_mut());
h.run_steps(2);
set(&mut h, "columns", json!(3));
assert_eq!(objects(&h), 6);
open(h.state_mut());
h.run_steps(2);
set(&mut h, "preview", json!(false));
assert_eq!(objects(&h), 1, "the first dialog's preview is rolled back");
assert!(!h.state().session.in_interaction());
set(&mut h, "columns", json!(3));
confirm(&mut h);
assert!(h.state().object_dialogs.step.is_none(), "OK of the reopened dialog applies");
assert_eq!(objects(&h), 6);
}
}
+2 -2
View File
@@ -225,7 +225,7 @@ fn escape_ends_one_thing(app: &mut VectorcraftApp, ctx: &egui::Context) {
/// An arrow nudge of the window or of a tool that left it. `direction` points the way of the arrow. In
/// Presentation Mode Left and Right step the artboard and nothing moves; with only type selected, Alt steps the
/// type's spacing; otherwise the selection moves (Shift ×10, Alt copies, `patterns_only` moves pattern fills only).
/// type's spacing; otherwise the selection moves (Shift ×10, Ctrl/Cmd ÷10, Alt copies, `patterns_only` moves pattern fills only).
pub(crate) fn nudge(app: &mut VectorcraftApp, direction: egui::Vec2, mods: Mods, patterns_only: bool) {
if app.ui.screen_mode == 3 {
if direction.x != 0.0 {
@@ -249,7 +249,7 @@ pub(crate) fn nudge(app: &mut VectorcraftApp, direction: egui::Vec2, mods: Mods,
return;
}
if app.session.active().is_some_and(|d| d.selection.has_objects_or_guides()) {
let mut params = json!({"dx": f64::from(direction.x), "dy": f64::from(direction.y), "big": mods.shift, "copy": mods.alt});
let mut params = json!({"dx": f64::from(direction.x), "dy": f64::from(direction.y), "big": mods.shift, "fine": mods.cmd, "copy": mods.alt});
if patterns_only {
params["objects"] = json!(false);
params["patterns"] = json!(true);
+18
View File
@@ -1172,6 +1172,24 @@ fn selected_vertical_area_and_path_type_use_vertical_spacing_chords() {
}
}
/// #5258: Ctrl/Cmd+arrow nudges the selection by a tenth of the keyboard increment, and Shift+Ctrl/Cmd+arrow by one
/// increment, one undo step each.
#[test]
fn command_arrows_nudge_by_a_tenth_of_the_keyboard_increment() {
let mut app = new_app();
let id = app.session.execute("shape.rectangle", &json!({"x": 20, "y": 20, "width": 10, "height": 10})).unwrap()["id"].as_u64().unwrap();
app.select_tool("selection");
app.session.execute("select.set", &json!({"ids": [id]})).unwrap();
let x0 = |app: &VectorcraftApp| app.session.active().unwrap().doc.node(NodeId(id)).unwrap().geometric_bounds().unwrap().x0;
let ctx = ready(&mut app);
let before = undo_len(&app);
for (m, x, n) in [(cmd(), 20.1, 1), (cmd() | Modifiers::SHIFT, 21.1, 2), (Modifiers::NONE, 22.1, 3)] {
key_frame(&mut app, &ctx, tap(Key::ArrowRight, m));
assert!((x0(&app) - x).abs() < 1e-9, "{m:?}: {}", x0(&app));
assert_eq!(undo_len(&app), before + n, "{m:?}");
}
}
/// Alt+arrows step a selected type object instead of copying it; a rectangle with Alt is copied.
#[test]
fn alt_arrows_step_selected_type_object() {
@@ -0,0 +1,110 @@
//! A menu bar menu opens under its title when the window sits on a second monitor that does not start at a multiple
//! of its own size (a landscape monitor beside a portrait one, their bottoms aligned).
#![allow(clippy::unwrap_used, clippy::expect_used, clippy::panic)]
use std::sync::{Arc, Mutex};
use craft::behavior::{Monitor, MonitorKey};
use craft::ui::testing::windows::FakeSystem;
use egui::accesskit::Role;
use egui::{Event, Pos2, RawInput, Rect, pos2, vec2};
use serde_json::json;
use vectorcraft_engine::Session;
use vectorcraft_ui_egui::{VectorcraftApp, i18n};
// Integration tests link the production global shortcut mirror; each App owns it until its case ends.
static INPUT: Mutex<()> = Mutex::new(());
/// The window's content size in pixels, below a 44 px title bar on the landscape monitor.
const WINDOW_PX: [f32; 2] = [1920.0, 1156.0];
/// Where the window's content starts on the desktop, in pixels.
const WINDOW_AT_PX: [f32; 2] = [1200.0, 764.0];
/// A portrait monitor at the desktop's origin and a landscape one to its right, their bottoms aligned.
fn monitors(scale: f32) -> Vec<Monitor> {
let portrait = Monitor::new(MonitorKey::new("portrait", [1200, 1920]), [0, 0], [1200, 1920], scale);
let landscape = Monitor::new(MonitorKey::new("landscape", [1920, 1200]), [1200, 720], [1920, 1200], scale);
vec![portrait, landscape]
}
struct Scene {
app: VectorcraftApp,
ctx: egui::Context,
time: f64,
scale: f32,
}
impl Scene {
fn new(scale: f32) -> Self {
let mut app = VectorcraftApp::new(Session::new(), Default::default());
app.run("file.new", json!({"width": 400, "height": 300})).unwrap();
let ctx = egui::Context::default();
ctx.enable_accesskit();
let system = FakeSystem::new();
system.set_monitors(monitors(scale));
let spec = craft::ui::InstallSpec::new(craft::host::target::ShellInfo::default(), Arc::new(system));
craft::ui::shell::embed::install(&ctx, spec, &vectorcraft_ui_egui::ui_fonts()).unwrap();
Self { app, ctx, time: 0.0, scale }
}
/// One frame of the whole window; returns the accessibility nodes with their bounds.
fn frame(&mut self, events: Vec<Event>) -> Vec<(Role, String, Rect)> {
self.time += 1.0 / 30.0;
let points = |[x, y]: [f32; 2]| pos2(x, y) / self.scale;
let size = points(WINDOW_PX).to_vec2();
let mut raw =
RawInput { events, time: Some(self.time), focused: true, screen_rect: Some(Rect::from_min_size(Pos2::ZERO, size)), ..Default::default() };
let viewport = raw.viewports.entry(egui::ViewportId::ROOT).or_default();
viewport.native_pixels_per_point = Some(self.scale);
viewport.monitor_size = Some(vec2(1920.0, 1200.0) / self.scale);
viewport.inner_rect = Some(Rect::from_min_size(points(WINDOW_AT_PX), size));
viewport.outer_rect = Some(Rect::from_min_size(points(WINDOW_AT_PX) - vec2(0.0, 44.0 / self.scale), size + vec2(0.0, 44.0 / self.scale)));
craft::ui::shell::embed::before_input(&self.ctx, |out| self.app.frame_input(out));
let mut out = self.ctx.run_ui(raw, |ui| self.app.ui(ui));
let _ = self.app.frame_input(craft::ui::runtime::frame::take_output(&self.ctx));
out.textures_delta.clear();
let update = out.platform_output.accesskit_update.take().unwrap();
update
.nodes
.into_iter()
.filter_map(|(_, node)| {
let b = node.bounds()?;
let rect = Rect::from_min_max(pos2(b.x0 as f32, b.y0 as f32), pos2(b.x1 as f32, b.y1 as f32));
Some((node.role(), node.label().unwrap_or_default().to_string(), rect))
})
.collect()
}
}
#[test]
fn the_file_menu_opens_under_its_title_on_a_monitor_beside_a_portrait_one() {
let _input = INPUT.lock().unwrap_or_else(std::sync::PoisonError::into_inner);
let previous = i18n::current();
i18n::set_current(i18n::Lang::EN);
for scale in [1.0, 1.5] {
let mut scene = Scene::new(scale);
for _ in 0..3 {
scene.frame(vec![]);
}
let nodes = scene.frame(vec![]);
let title = nodes.iter().find(|(role, label, _)| *role == Role::MenuItem && label == "File").map(|(_, _, rect)| *rect);
let title = title.unwrap_or_else(|| panic!("no File title at {scale}x: {nodes:?}"));
let at = title.center();
let button = |pressed| Event::PointerButton { pos: at, button: egui::PointerButton::Primary, pressed, modifiers: egui::Modifiers::NONE };
scene.frame(vec![Event::PointerMoved(at)]);
scene.frame(vec![button(true)]);
scene.frame(vec![button(false)]);
let nodes = scene.frame(vec![]);
let menu = nodes.iter().filter(|(role, _, _)| *role == Role::Menu).map(|(_, _, rect)| *rect).next();
let menu = menu.unwrap_or_else(|| panic!("the File menu did not open at {scale}x: {nodes:?}"));
// The menu's list sits inside the popup's frame, a few points in from the title's corner.
assert!(
(menu.left() - title.left()).abs() <= 8.0 && (menu.top() - title.bottom()).abs() <= 8.0,
"at {scale}x the File menu opens at {menu:?}, not under its title at {title:?}"
);
// The whole menu shows: the window's content lies on the landscape monitor, so nothing cuts its room.
let items = nodes.iter().filter(|(role, _, rect)| *role == Role::MenuItem && menu.contains_rect(*rect)).count();
assert!(items >= 15, "at {scale}x the File menu shows {items} items in {menu:?}");
}
i18n::set_current(previous);
}
+1 -1
View File
@@ -13,7 +13,7 @@ Part of [target-app-parity.md](target-app-parity.md); open work is in [gaps.md](
|---|---:|---:|---:|---:|
| Illustrator effects (vector and stylize) | 50 | 50 | 100% | — |
| Photoshop effects (raster, Effect Gallery) | 57 | 57 | 100% | — |
| 3D and Materials | 4 (+3 Classic) | 4 (+3 Classic; initial: Extrude & Bevel, Revolve, Inflate, Rotate, Extrude & Bevel (Classic), Revolve (Classic), Rotate (Classic)) | ~25% | 25–45 |
| 3D and Materials | 4 (+3 Classic) | 4 (+3 Classic; initial: Extrude & Bevel, Revolve, Inflate, Rotate, Extrude & Bevel (Classic), Revolve (Classic), Rotate (Classic)) | ~35% | 25–45 |
| Beyond Illustrator: Effect › Color Adjustments (6), effect plug-ins (WebAssembly) | — | 6 + plug-ins | — | — |
## Illustrator effects
File diff suppressed because one or more lines are too long
+23 -14
View File
@@ -2524,7 +2524,7 @@ The transform, Align, Object Properties and Live Shape Properties commands refus
that is not true or false with `` `strokes` must be true or false ``, naming the key, and leave the document and its
undo history as they were: the options `copy`, `strokes`, `corners`, `patterns`, `objects` and `typeAreas` in
`object.transform`, `object.move`, `object.nudge`, `object.rotate`, `object.scale`, `object.reflect`, `object.shear`,
`object.transformAgain` and `object.setBounds`; `anchors`, `releaseOutside` and `drawBehind` in `object.transform`; `big` in `object.nudge`;
`object.transformAgain` and `object.setBounds`; `anchors`, `releaseOutside` and `drawBehind` in `object.transform`; `big` and `fine` in `object.nudge`;
`absolute` in `object.rotate`; `proportional` in `object.setBounds`; `patterns` in `object.align`, `object.distribute`
and `object.distributeSpacing`; `visible`, `locked`, `isolate` and `knockoutShape` in `object.setProps`; and
`invertPie`, `makeSidesEqual`, `relativeRadii`, `strokes` and `patterns` in `object.setLiveShape`. A null is read as a
@@ -2969,8 +2969,10 @@ through `$`:
name in that thread chooses is VectorCraft's own reading; names with no VectorCraft tool throw. `app.documents`
(https://ai-scripting.docsforadobe.dev/jsobjref/Documents/) has `length`, `[i]`, `index(key)`, `getByName(name)`
and `add(colorSpace?, width?, height?, numArtBoards?, artboardLayout?, artboardSpacing?, artboardRowsOrCols?)`,
which runs `file.new` (`artboardRowsOrCols` is the number of rows for `GridByCol` and `RLGridByCol`, and of
columns for the other layouts), and `addDocument(startupPreset, presetSettings?, showOptionsDialog?)`, which runs `file.new`
which runs `file.new` (`artboardRowsOrCols` is the number of rows for `GridByCol` and `RLGridByCol` and the number
of columns for `GridByRow` and `RLGridByRow`; `Row`, `RLRow` and `Column` put the artboards in one row or column and
do not use it; a supplied value must still be a whole number from 1 to `numArtBoards`, which is 1 when omitted, or
`add` throws a `RangeError`), and `addDocument(startupPreset, presetSettings?, showOptionsDialog?)`, which runs `file.new`
with the New Document profile `startupPreset` names (`Print`, `Web`, `Mobile`, `Video`, another profile of
`file.newPresets`, or `Basic CMYK` and `Basic RGB` for no profile), starting from the first preset
`file.newPresets` lists for that profile, and the settings of a `new DocumentPreset()`
@@ -2990,7 +2992,10 @@ through `$`:
profile and the reason, and makes no document. Each warning from reading the profile's file (a color profile in it
that cannot be used, for example) goes to the Script Console as a line `addDocument: <warning>`. A `previewMode` of
`DocumentPreviewMode.PixelPreview` throws an error that says it is not available yet, and no document is made.
`showOptionsDialog` true throws `Dialog unavailable` with no document made. A `Document` (https://ai-scripting.docsforadobe.dev/jsobjref/Document/) has `name`,
`showOptionsDialog` true throws `Dialog unavailable` with no document made. `addDocumentNoUI(startupPreset)`
makes the document `addDocument(startupPreset)` makes and ignores any further arguments. A `DocumentPreset` kept
from an earlier run (with `#targetengine`) throws a `TypeError` when its settings are read or assigned and when its `typename`
or `toString()` is read. A `Document` (https://ai-scripting.docsforadobe.dev/jsobjref/Document/) has `name`,
`width`, `height`, `rulerUnits`, `documentColorSpace`, `rulerOrigin`, `convertCoordinate(point, source,
destination)`, `pageItems`, `selection` and `views`. `views` (https://ai-scripting.docsforadobe.dev/jsobjref/Views/)
lists each window, tab, or tiled pane the desktop app has drawn for the document, in view-number order. Each view
@@ -3022,8 +3027,9 @@ through `$`:
object that is hidden or locked, in a hidden or locked layer or group, or on a locked artboard), `zOrderPosition`,
`duplicate(relativeObject?, insertionLocation?)`,
`move(relativeObject, insertionLocation?)`, `remove()` and `zOrder(method)`
(https://ai-scripting.docsforadobe.dev/jsobjref/GroupItem/). `move` runs `node.move`, and `duplicate` runs
`edit.duplicate` and then `node.move` on the copy. The relative object is a page item or a layer of the same
(https://ai-scripting.docsforadobe.dev/jsobjref/GroupItem/). `move` runs `node.move` unless the object is already in
the place it names. `duplicate` runs `edit.duplicate`, and with a relative object it then runs `node.move` on the
copy the same way; without one, the copy stays where `edit.duplicate` puts it. The relative object is a page item or a layer of the same
document; `ElementPlacement.INSIDE` and `PLACEATBEGINNING` (the default) put the object on top of a layer's or a
group's contents, `PLACEATEND` under them, `PLACEBEFORE` directly above the relative object and `PLACEAFTER`
directly below it. An object of another document throws `Cross-document placement is not available`, and when
@@ -3093,7 +3099,9 @@ through `$`:
nothing changed. While View › Guides › Lock Guides is on, a path made into a guide cannot be selected this way or
with `selected`. Assigning a page item's `selected` leaves the direct-selected anchors and segments of the other
selected objects selected. `getIsFileOpen` compares the path with the open documents' files as text (in a Windows path,
letter case is ignored and `\` matches `/`) and does not resolve the path it is given. A document counts only when
letter case is ignored and `\` matches `/`) and does not resolve the path it is given. On Windows every path is a
Windows path; on macOS and Linux only a path that starts with a drive letter is, and in the others `\` is a
character of a file name. A document counts only when
the automation read roots allow its file, and that check can look the document's file up on disk. A path with
`..`, a network path, a NUL character or more than 4,096 bytes throws an error. `app.redraw()` returns `undefined`
and does not change the documents or add an undo step. In the app, the documents are drawn as they were before the
@@ -4504,8 +4512,9 @@ or unknown id leaves the document unchanged. An empty `ids` array does nothing.
are kept, and selecting an ancestor together with its descendants deletes that subtree once.
Without `ids`, direct-selected anchors or selected ruler guides retain their usual Clear behavior.
With `ids`, `guides: true` also deletes the selected ruler guides. The command rejects a `guides` value that is not a
boolean. A compound path left with no paths is deleted too, unless `keepEmpty: true` is given, which keeps it, empty,
also when the deleted parts are direct-selected anchors; a `keepEmpty` value that is not a boolean is rejected.
boolean or `null`. A compound path left with no paths is deleted too, unless `keepEmpty: true` is given, which keeps
it, empty, also when the deleted parts are direct-selected anchors; a `keepEmpty` value that is not a boolean or `null`
is rejected. `null` for `guides`, `keepEmpty` or `keepJoined` counts as leaving the key out.
Without `ids`, `keepJoined: true` removes the direct-selected anchors of each path that has no selected segment as
`path.removeAnchors` does (see Removing anchor points): the path stays joined, and the next anchor along is selected
(the one before at an open path's end). When no subpath that lost an anchor keeps two anchors, the path stays selected
@@ -4513,7 +4522,7 @@ whole, as `path.removeAnchors` leaves it, so the next Delete removes the whole p
cut there, and their selected anchors stay in the path, as with `keepJoined: false`; and objects selected whole are deleted, in the
same undo step. `keepJoined` defaults to the `deleteKeepsPathsJoined` preference, and the value used joins the journal
entry; a saved step without it opens the paths, as it did when it was recorded. With `ids`, `keepJoined` has no
effect. A `keepJoined` value that is not a boolean is an error, with or without `ids`.
effect. A `keepJoined` value that is not a boolean or `null` is an error, with or without `ids`.
`edit.copy` takes a compound-path member selected on its own (whole or in part, with Direct or Group Selection) as an
ordinary path with the compound's paint, transparency, opacity mask and fill rule. The path is linked to the compound's
@@ -16165,8 +16174,8 @@ edge also lands only when it ends within a quarter cell of a gridline: a horizon
edge on its own axis, and a 45° move lands the edge on the axis whose nonzero correction is smaller. When no edge on
those axes is that close, the move does not snap. A perpendicular move does not snap.
`press_key` Escape during a move, a resize or a plane widget drag cancels it and puts the objects and the
grid back. The arrow keys nudge a selection in perspective by the keyboard increment (`perspective.nudge`; Shift ×10, Alt
copies). Object › Transform › Transform Again repeats the last perspective move or scale in plane space.
grid back. The arrow keys nudge a selection in perspective by the keyboard increment (`perspective.nudge`; Shift ×10,
Ctrl/Cmd ÷10 (`fine`), Shift+Ctrl/Cmd one increment, Alt copies); Snap to Grid doesn't pull a nudge onto the gridlines. Object › Transform › Transform Again repeats the last perspective move or scale in plane space.
```json
{"name":"pointer_gesture","arguments":{"tool":"perspectiveSelection","events":[{"kind":"down","x":480,"y":410},{"kind":"drag","x":470,"y":405}]}}
@@ -16178,8 +16187,8 @@ copies). Object › Transform › Transform Again repeats the last perspective m
The perspective, width point, Liquify and Puppet Warp commands refuse a string, a number or another value that is not
true or false with `` `copy` must be true or false ``, naming the key, and leave the document and its undo history as
they were: `copy`, `perpendicular` and `snap` in `perspective.move`; `copy` in `perspective.transform`; `big` and
`copy` in `perspective.nudge`; `snap` in `perspective.draw`; `reproject` in `perspective.grid.set`; `visible` in
they were: `copy`, `perpendicular` and `snap` in `perspective.move`; `copy` in `perspective.transform`; `big`, `fine`
and `copy` in `perspective.nudge`; `snap` in `perspective.draw`; `reproject` in `perspective.grid.set`; `visible` in
`perspective.grid.show`; `adjustAdjoining` in `stroke.widthPoint.set`; `usePressure`, `simplifyOn`, `affectAnchors`,
`affectIn` and `affectOut` in `object.liquify`, with any `tool`; and `rest` in `object.puppetWarp`. A null is read as
a key left out.
File diff suppressed because one or more lines are too long
+13 -12
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -5,7 +5,7 @@ use std::process::Command;
use serde_json::Value;
const REV: &str = "2680a3b3fe464c7afa3d260b33a828fa94e12f6d";
const REV: &str = "a5669ed2f1ba62545a1f0d884ecbd0fd0fbd06e0";
const PACKAGES: &[(&str, &str, &str)] = &[
("craft-pdf", "0.1.0", REV),
("krilla", "0.8.2", REV),