diff --git a/ASSETS.md b/ASSETS.md
index 62626843b6..89eb4be74e 100644
--- a/ASSETS.md
+++ b/ASSETS.md
@@ -158,6 +158,7 @@ Generated-in-code art is original and has no file to list. This covers the defau
| `assets/icons/dc-crystallize.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | |
| `assets/icons/dc-cube.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | |
| `assets/icons/dc-curvature-circle.svg` | VectorCraft contributors | Original work, drawn for VectorCraft (an arch with the circle that touches it at its top, and that circle's center) | MIT OR Apache-2.0 | |
+| `assets/icons/dc-cycle-sizes.svg` | VectorCraft contributors | Original work, drawn for VectorCraft (two stacked triangles, a panel's Cycle Display Sizes control) | MIT OR Apache-2.0 | |
| `assets/icons/dc-dash-align.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | |
| `assets/icons/dc-dash-exact.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | |
| `assets/icons/dc-dimension.svg` | Osama Amin | Original work, drawn for VectorCraft: a dimension line with arrowheads between two extension lines | MIT OR Apache-2.0 | |
@@ -206,6 +207,7 @@ Generated-in-code art is original and has no file to list. This covers the defau
| `assets/icons/dc-graphic-styles.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | |
| `assets/icons/dc-grid-view.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | |
| `assets/icons/dc-group-select.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | |
+| `assets/icons/dc-help.svg` | VectorCraft contributors | Original work, drawn for VectorCraft (a question mark in a circle) | MIT OR Apache-2.0 | |
| `assets/icons/dc-join-bevel.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | |
| `assets/icons/dc-join-miter.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | |
| `assets/icons/dc-join-round.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | |
@@ -285,7 +287,10 @@ Generated-in-code art is original and has no file to list. This covers the defau
| `assets/icons/dc-stroke-outside.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | |
| `assets/icons/dc-stroke.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | |
| `assets/icons/dc-swap.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | |
+| `assets/icons/dc-swatch-global.svg` | VectorCraft contributors | Original work, drawn for VectorCraft (a square with a filled corner, a global process color) | MIT OR Apache-2.0 | |
| `assets/icons/dc-swatch-kinds.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | |
+| `assets/icons/dc-swatch-process.svg` | VectorCraft contributors | Original work, drawn for VectorCraft (a square, a process color) | MIT OR Apache-2.0 | |
+| `assets/icons/dc-swatch-spot.svg` | VectorCraft contributors | Original work, drawn for VectorCraft (a dot in a ring, a spot color) | MIT OR Apache-2.0 | |
| `assets/icons/dc-symbol-screener.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | |
| `assets/icons/dc-symbol-scruncher.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | |
| `assets/icons/dc-symbol-shifter.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | |
diff --git a/Cargo.lock b/Cargo.lock
index 2db5a4112b..193e5ed374 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1134,7 +1134,7 @@ dependencies = [
[[package]]
name = "craft"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"craft-automation",
"craft-behavior",
@@ -1175,7 +1175,7 @@ dependencies = [
[[package]]
name = "craft-affinity"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"crc32fast",
"flate2",
@@ -1186,7 +1186,7 @@ dependencies = [
[[package]]
name = "craft-appkit"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"block2 0.6.2",
"objc2-app-kit 0.3.2",
@@ -1196,7 +1196,7 @@ dependencies = [
[[package]]
name = "craft-atomic"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"rustix 1.1.6",
]
@@ -1204,11 +1204,12 @@ dependencies = [
[[package]]
name = "craft-automation"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
- "base64 0.22.1",
+ "base64 0.23.1",
"craft-behavior",
"craft-control",
+ "craft-host",
"craft-keymap",
"craft-platform",
"craft-theme",
@@ -1228,7 +1229,7 @@ dependencies = [
[[package]]
name = "craft-behavior"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"accesskit",
"bitflags 2.13.2",
@@ -1246,7 +1247,7 @@ dependencies = [
[[package]]
name = "craft-browse"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"craft-behavior",
"craft-docpath",
@@ -1264,7 +1265,7 @@ dependencies = [
[[package]]
name = "craft-cdr"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"crc32fast",
"flate2",
@@ -1273,7 +1274,7 @@ dependencies = [
[[package]]
name = "craft-cloud-ui"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"egui",
]
@@ -1281,7 +1282,7 @@ dependencies = [
[[package]]
name = "craft-cms"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"md-5",
"rayon",
@@ -1290,12 +1291,12 @@ dependencies = [
[[package]]
name = "craft-codepage"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
[[package]]
name = "craft-color-ui"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"craft-behavior",
"craft-cms",
@@ -1315,7 +1316,7 @@ dependencies = [
[[package]]
name = "craft-control"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"getrandom 0.3.4",
"serde",
@@ -1325,7 +1326,7 @@ dependencies = [
[[package]]
name = "craft-dds"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"rayon",
]
@@ -1333,7 +1334,7 @@ dependencies = [
[[package]]
name = "craft-dialogs"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"block2 0.6.2",
"craft-atomic",
@@ -1358,7 +1359,7 @@ dependencies = [
[[package]]
name = "craft-docpath"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"serde",
]
@@ -1366,7 +1367,7 @@ dependencies = [
[[package]]
name = "craft-draw"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"craft-behavior",
"craft-color-ui",
@@ -1385,7 +1386,7 @@ dependencies = [
[[package]]
name = "craft-dxf"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"craft-codepage",
"encoding_rs",
@@ -1397,12 +1398,12 @@ dependencies = [
[[package]]
name = "craft-eps"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
[[package]]
name = "craft-font-catalog"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"fontique",
"harfrust 0.13.3",
@@ -1417,7 +1418,7 @@ dependencies = [
[[package]]
name = "craft-font-manager"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"craft-behavior",
"craft-font-catalog",
@@ -1436,7 +1437,7 @@ dependencies = [
[[package]]
name = "craft-font-store"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"cap-primitives",
"craft-atomic",
@@ -1457,12 +1458,12 @@ dependencies = [
[[package]]
name = "craft-fonts-build"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
[[package]]
name = "craft-gif"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"gif",
]
@@ -1470,7 +1471,7 @@ dependencies = [
[[package]]
name = "craft-gzip"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"flate2",
]
@@ -1478,7 +1479,7 @@ dependencies = [
[[package]]
name = "craft-host"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"bitflags 2.13.2",
"craft-i18n",
@@ -1491,7 +1492,7 @@ dependencies = [
[[package]]
name = "craft-i18n"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"chrono",
"fixed_decimal",
@@ -1519,7 +1520,7 @@ dependencies = [
[[package]]
name = "craft-image-codecs"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"craft-dds",
"craft-jpeg",
@@ -1546,7 +1547,7 @@ dependencies = [
[[package]]
name = "craft-imaging"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"craft-behavior",
"craft-color-ui",
@@ -1564,7 +1565,7 @@ dependencies = [
[[package]]
name = "craft-jpeg"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"thiserror 2.0.21",
]
@@ -1572,7 +1573,7 @@ dependencies = [
[[package]]
name = "craft-jxl"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"brotli-decompressor 5.0.3",
"jixel",
@@ -1583,7 +1584,7 @@ dependencies = [
[[package]]
name = "craft-keymap"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"craft-host",
"craft-i18n",
@@ -1598,7 +1599,7 @@ dependencies = [
[[package]]
name = "craft-layers"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"craft-behavior",
"craft-i18n",
@@ -1612,7 +1613,7 @@ dependencies = [
[[package]]
name = "craft-menu"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"craft-behavior",
"craft-host",
@@ -1630,7 +1631,7 @@ dependencies = [
[[package]]
name = "craft-metadata"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"brotli-decompressor 6.3.2",
"chrono",
@@ -1642,7 +1643,7 @@ dependencies = [
[[package]]
name = "craft-metafile"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"encoding_rs",
"image",
@@ -1653,7 +1654,7 @@ dependencies = [
[[package]]
name = "craft-mime"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"chrono",
"craft-codepage",
@@ -1663,7 +1664,7 @@ dependencies = [
[[package]]
name = "craft-pages"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"craft-behavior",
"craft-keymap",
@@ -1673,12 +1674,13 @@ dependencies = [
"egui",
"kurbo 0.13.1",
"serde",
+ "serde_json",
]
[[package]]
name = "craft-pdf"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"hayro-interpret",
"hayro-syntax",
@@ -1690,7 +1692,7 @@ dependencies = [
[[package]]
name = "craft-platform"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"async-channel",
"async-io",
@@ -1699,6 +1701,7 @@ dependencies = [
"craft-atomic",
"craft-docpath",
"craft-host",
+ "craft-i18n",
"craft-theme",
"futures-lite",
"js-sys",
@@ -1720,7 +1723,7 @@ dependencies = [
[[package]]
name = "craft-plotter"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"kurbo 0.13.1",
"thiserror 2.0.21",
@@ -1729,10 +1732,11 @@ dependencies = [
[[package]]
name = "craft-print"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"craft-behavior",
"craft-host",
+ "craft-theme",
"craft-ui",
"craft-winprint-gdi",
"egui",
@@ -1752,7 +1756,7 @@ dependencies = [
[[package]]
name = "craft-proof"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"log",
"miniz_oxide 0.9.1",
@@ -1763,7 +1767,7 @@ dependencies = [
[[package]]
name = "craft-ps"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"craft-eps",
"flate2",
@@ -1777,7 +1781,7 @@ dependencies = [
[[package]]
name = "craft-psd"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"encoding_rs",
"flate2",
@@ -1788,19 +1792,22 @@ dependencies = [
[[package]]
name = "craft-quit"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"dispatch2",
"egui",
"objc2 0.6.5",
"objc2-app-kit 0.3.2",
+ "wasm-bindgen",
+ "web-sys",
]
[[package]]
name = "craft-review"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
+ "base64 0.23.1",
"craft-behavior",
"craft-host",
"craft-i18n",
@@ -1817,7 +1824,7 @@ dependencies = [
[[package]]
name = "craft-settings"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"craft-atomic",
"craft-host",
@@ -1834,7 +1841,7 @@ dependencies = [
[[package]]
name = "craft-stream-codecs"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"fax",
"hayro-ccitt",
@@ -1845,7 +1852,7 @@ dependencies = [
[[package]]
name = "craft-svg"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"craft-image-codecs",
"craft-xml",
@@ -1866,7 +1873,7 @@ dependencies = [
[[package]]
name = "craft-table"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"craft-behavior",
"craft-keymap",
@@ -1878,7 +1885,7 @@ dependencies = [
[[package]]
name = "craft-text"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"craft-behavior",
"craft-font-manager",
@@ -1903,7 +1910,7 @@ dependencies = [
[[package]]
name = "craft-theme"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"bitflags 2.13.2",
"craft-tracked",
@@ -1918,7 +1925,7 @@ dependencies = [
[[package]]
name = "craft-theme-store"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"craft-atomic",
"craft-behavior",
@@ -1933,7 +1940,7 @@ dependencies = [
[[package]]
name = "craft-tiff"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"serde",
"thiserror 2.0.21",
@@ -1943,7 +1950,7 @@ dependencies = [
[[package]]
name = "craft-time"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"serde",
"thiserror 2.0.21",
@@ -1952,7 +1959,7 @@ dependencies = [
[[package]]
name = "craft-timeline"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"craft-behavior",
"craft-keymap",
@@ -1967,12 +1974,12 @@ dependencies = [
[[package]]
name = "craft-tracked"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
[[package]]
name = "craft-ui"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"craft-cloud-ui",
"craft-ui-canvas",
@@ -1986,7 +1993,7 @@ dependencies = [
[[package]]
name = "craft-ui-canvas"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"craft-behavior",
"craft-i18n",
@@ -2002,7 +2009,7 @@ dependencies = [
[[package]]
name = "craft-ui-contract"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"accesskit",
"craft-behavior",
@@ -2033,13 +2040,14 @@ dependencies = [
"smallvec",
"toml",
"typeid",
+ "wasm-bindgen-futures",
"web-time",
]
[[package]]
name = "craft-ui-macros"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"proc-macro-crate",
"proc-macro2",
@@ -2050,7 +2058,7 @@ dependencies = [
[[package]]
name = "craft-ui-panels"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"craft-behavior",
"craft-host",
@@ -2068,7 +2076,7 @@ dependencies = [
[[package]]
name = "craft-ui-patterns"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"craft-behavior",
"craft-host",
@@ -2089,7 +2097,7 @@ dependencies = [
[[package]]
name = "craft-ui-shell"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"craft-behavior",
"craft-host",
@@ -2110,16 +2118,18 @@ dependencies = [
[[package]]
name = "craft-ui-widgets"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"craft-behavior",
"craft-host",
"craft-i18n",
"craft-keymap",
+ "craft-svg",
"craft-theme",
"craft-ui-contract",
"craft-ui-macros",
"egui",
+ "log",
"serde",
"smallvec",
]
@@ -2127,7 +2137,7 @@ dependencies = [
[[package]]
name = "craft-update"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"chrono",
"craft-host",
@@ -2156,7 +2166,7 @@ dependencies = [
[[package]]
name = "craft-vectorcraft-format"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"flate2",
"serde",
@@ -2167,7 +2177,7 @@ dependencies = [
[[package]]
name = "craft-wayland"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"raw-window-handle",
"wayland-backend",
@@ -2177,7 +2187,7 @@ dependencies = [
[[package]]
name = "craft-web-api"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"js-sys",
"serde_json",
@@ -2188,7 +2198,7 @@ dependencies = [
[[package]]
name = "craft-win32"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"winsafe",
]
@@ -2196,7 +2206,7 @@ dependencies = [
[[package]]
name = "craft-window"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"craft-appkit",
"craft-atomic",
@@ -2228,7 +2238,7 @@ dependencies = [
[[package]]
name = "craft-xml"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"quick-xml 0.41.0",
"serde",
@@ -3496,7 +3506,7 @@ checksum = "9f4d0e94ddd48749f06bbe4e5389fb9799a0c45bcaf00495042076ef05e3241a"
[[package]]
name = "hayro-cmap"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"brotli",
"hayro-postscript",
@@ -3505,7 +3515,7 @@ dependencies = [
[[package]]
name = "hayro-interpret"
version = "0.7.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"bitflags 2.13.2",
"hayro-cmap",
@@ -3523,7 +3533,7 @@ dependencies = [
[[package]]
name = "hayro-jbig2"
version = "0.3.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"fearless_simd",
"hayro-ccitt",
@@ -3541,12 +3551,12 @@ dependencies = [
[[package]]
name = "hayro-postscript"
version = "0.1.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
[[package]]
name = "hayro-syntax"
version = "0.7.2"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"flate2",
"hayro-ccitt",
@@ -4477,7 +4487,7 @@ dependencies = [
[[package]]
name = "krilla"
version = "0.8.2"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"base64 0.22.1",
"bumpalo",
@@ -4634,7 +4644,7 @@ checksum = "d4a5ff6bcca6c4867b1c4fd4ef63e4db7436ef363e0ad7531d1558856bae64f4"
[[package]]
name = "linesweeper"
version = "0.5.0"
-source = "git+https://github.com/storytold/craft-libs?rev=bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0#bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0"
+source = "git+https://github.com/storytold/craft-libs?rev=a4b6d3b6ca04a65d5972339b808d1049a14c7167#a4b6d3b6ca04a65d5972339b808d1049a14c7167"
dependencies = [
"arrayvec",
"kurbo 0.13.1",
diff --git a/Cargo.toml b/Cargo.toml
index bbc2a8bc2d..c03d9a7146 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -11,44 +11,44 @@ rust-version = "1.95"
repository = "https://github.com/storytold/vectorcraft"
[workspace.dependencies]
-craft-cms = { git = "https://github.com/storytold/craft-libs", rev = "bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0" }
-craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0", default-features = false, features = ["interpret", "write"] }
-craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0" }
-craft-proof = { git = "https://github.com/storytold/craft-libs", rev = "bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0" }
+craft-cms = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" }
+craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167", default-features = false, features = ["interpret", "write"] }
+craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" }
+craft-proof = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" }
# 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 = "bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0" }
-craft-gzip = { git = "https://github.com/storytold/craft-libs", rev = "bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0" }
+craft-vectorcraft-format = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" }
+craft-gzip = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" }
# Native Affinity documents (craft-libs#914).
-craft-affinity = { git = "https://github.com/storytold/craft-libs", rev = "bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0" }
+craft-affinity = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" }
# Bounded CDR (v1-v27) and CMX (32-bit) reader (craft-libs#778).
-craft-cdr = { git = "https://github.com/storytold/craft-libs", rev = "bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0" }
+craft-cdr = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" }
# SVG parsing, limits, SVGZ and writer (craft-libs#778).
-craft-svg = { git = "https://github.com/storytold/craft-libs", rev = "bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0", features = ["tree"] }
-craft-mime = { git = "https://github.com/storytold/craft-libs", rev = "bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0" }
+craft-svg = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167", features = ["tree"] }
+craft-mime = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" }
# EPS container, previews, ASCII85 and DSC comments (craft-libs#778).
-craft-eps = { git = "https://github.com/storytold/craft-libs", rev = "bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0" }
+craft-eps = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" }
# DXF tags, reader and writer (craft-libs#778, #926, #927).
-craft-plotter = { git = "https://github.com/storytold/craft-libs", rev = "bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0" }
-craft-dxf = { git = "https://github.com/storytold/craft-libs", rev = "bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0" }
+craft-plotter = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" }
+craft-dxf = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" }
# WMF, EMF and EMF+ reader (craft-libs#778).
-craft-metafile = { git = "https://github.com/storytold/craft-libs", rev = "bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0" }
-craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0" }
-craft-image-codecs = { git = "https://github.com/storytold/craft-libs", rev = "bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0" }
-craft-gif = { git = "https://github.com/storytold/craft-libs", rev = "bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0" }
-craft-tiff = { git = "https://github.com/storytold/craft-libs", rev = "bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0" }
-craft-ps = { git = "https://github.com/storytold/craft-libs", rev = "bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0", default-features = false, features = ["read", "write"] }
-craft-psd = { git = "https://github.com/storytold/craft-libs", rev = "bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0" }
-craft-stream-codecs = { git = "https://github.com/storytold/craft-libs", rev = "bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0" }
-craft-jxl = { git = "https://github.com/storytold/craft-libs", rev = "bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0" }
-craft-codepage = { git = "https://github.com/storytold/craft-libs", rev = "bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0" }
+craft-metafile = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" }
+craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" }
+craft-image-codecs = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" }
+craft-gif = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" }
+craft-tiff = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" }
+craft-ps = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167", default-features = false, features = ["read", "write"] }
+craft-psd = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" }
+craft-stream-codecs = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" }
+craft-jxl = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" }
+craft-codepage = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" }
# 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 = "bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0" }
+craft = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" }
# 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 = "bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0" }
-craft-theme = { git = "https://github.com/storytold/craft-libs", rev = "bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0" }
-craft-fonts-build = { git = "https://github.com/storytold/craft-libs", rev = "bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0" }
+craft-color-ui = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" }
+craft-theme = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" }
+craft-fonts-build = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" }
# internal
vectorcraft-geom = { path = "crates/geom" }
vectorcraft-color = { path = "crates/color" }
@@ -191,13 +191,13 @@ lto = "thin"
codegen-units = 1
[patch.crates-io]
-hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0" }
-hayro-interpret = { git = "https://github.com/storytold/craft-libs", rev = "bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0" }
-hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0" }
-hayro-cmap = { git = "https://github.com/storytold/craft-libs", rev = "bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0" }
-hayro-postscript = { git = "https://github.com/storytold/craft-libs", rev = "bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0" }
-krilla = { git = "https://github.com/storytold/craft-libs", rev = "bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0" }
-linesweeper = { git = "https://github.com/storytold/craft-libs", rev = "bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0" }
+hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" }
+hayro-interpret = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" }
+hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" }
+hayro-cmap = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" }
+hayro-postscript = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" }
+krilla = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" }
+linesweeper = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167" }
ecolor = { git = "https://github.com/storytold/egui.git", rev = "f5025284445ea19c35f746d96fc0b75468b3f560" }
emath = { git = "https://github.com/storytold/egui.git", rev = "f5025284445ea19c35f746d96fc0b75468b3f560" }
epaint = { git = "https://github.com/storytold/egui.git", rev = "f5025284445ea19c35f746d96fc0b75468b3f560" }
diff --git a/apps/vectorcraft-web/Cargo.toml b/apps/vectorcraft-web/Cargo.toml
index 780259f957..70709d274d 100644
--- a/apps/vectorcraft-web/Cargo.toml
+++ b/apps/vectorcraft-web/Cargo.toml
@@ -27,7 +27,7 @@ log = { 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 = "bf62d509fb26e92ab5c45a9fd613d8aab9ffafd0", version = "0.1.0" }
+craft-web-api = { git = "https://github.com/storytold/craft-libs", rev = "a4b6d3b6ca04a65d5972339b808d1049a14c7167", version = "0.1.0" }
wasm-bindgen = "0.2"
serde_json = { workspace = true }
diff --git a/apps/vectorcraft/src/main.rs b/apps/vectorcraft/src/main.rs
index 0a1f938ced..dd9dc3f774 100644
--- a/apps/vectorcraft/src/main.rs
+++ b/apps/vectorcraft/src/main.rs
@@ -614,8 +614,6 @@ fn main() -> std::process::ExitCode {
};
embed::install(ctx, spec, &vectorcraft_ui_egui::ui_fonts()).map_err(|e| e.to_string())?;
egui_extras::install_image_loaders(ctx);
- craft::ui::primitives::register_app_icons(&vectorcraft_ui_egui::icons::APP_ICONS);
- craft::ui::primitives::register_app_icons(&vectorcraft_ui_egui::cursors::CURSOR_ICONS);
let folders = settings.lock().get().ui.last_folders.clone();
let wake = {
let ctx = ctx.clone();
diff --git a/assets/icons/dc-cycle-sizes.svg b/assets/icons/dc-cycle-sizes.svg
new file mode 100644
index 0000000000..77bcc7c9af
--- /dev/null
+++ b/assets/icons/dc-cycle-sizes.svg
@@ -0,0 +1 @@
+
diff --git a/assets/icons/dc-help.svg b/assets/icons/dc-help.svg
new file mode 100644
index 0000000000..2b6f6f5bab
--- /dev/null
+++ b/assets/icons/dc-help.svg
@@ -0,0 +1 @@
+
diff --git a/assets/icons/dc-swatch-global.svg b/assets/icons/dc-swatch-global.svg
new file mode 100644
index 0000000000..972e265f41
--- /dev/null
+++ b/assets/icons/dc-swatch-global.svg
@@ -0,0 +1 @@
+
diff --git a/assets/icons/dc-swatch-process.svg b/assets/icons/dc-swatch-process.svg
new file mode 100644
index 0000000000..708d9dd27e
--- /dev/null
+++ b/assets/icons/dc-swatch-process.svg
@@ -0,0 +1 @@
+
diff --git a/assets/icons/dc-swatch-spot.svg b/assets/icons/dc-swatch-spot.svg
new file mode 100644
index 0000000000..7ba3dcaef3
--- /dev/null
+++ b/assets/icons/dc-swatch-spot.svg
@@ -0,0 +1 @@
+
diff --git a/crates/doc/src/appearance/layers.rs b/crates/doc/src/appearance/layers.rs
index 11d2b0664d..614616dadd 100644
--- a/crates/doc/src/appearance/layers.rs
+++ b/crates/doc/src/appearance/layers.rs
@@ -13,6 +13,18 @@ pub struct Effect {
pub visible: bool,
}
+impl Effect {
+ /// Whether this effect gives an image's fill or stroke a shape to paint: it is a visible
+ /// Convert to Shape or Outline Object.
+ pub fn gives_image_shape(&self) -> bool {
+ self.visible
+ && matches!(
+ self.id.as_str(),
+ "convertToShape.rectangle" | "convertToShape.roundedRectangle" | "convertToShape.ellipse" | "path.outlineObject"
+ )
+ }
+}
+
fn yes() -> bool {
true
}
diff --git a/crates/doc/src/dimension.rs b/crates/doc/src/dimension.rs
index 4d66f5d74c..3e08f96977 100644
--- a/crates/doc/src/dimension.rs
+++ b/crates/doc/src/dimension.rs
@@ -389,6 +389,12 @@ pub enum DimensionSource {
#[serde(default, rename = "freeB", skip_serializing_if = "Option::is_none")]
free_b: Option,
},
+ /// A whole path, measured between its outermost points ([`extent`]): the leftmost and the
+ /// rightmost while the dimension is horizontal or aligned, the topmost and the bottommost while
+ /// it is vertical. Versions without this source do not open the file.
+ Extent {
+ node: NodeId,
+ },
}
impl DimensionSource {
@@ -396,7 +402,7 @@ impl DimensionSource {
match self {
Self::Segment { edge } | Self::Arc { edge } => vec![edge.node],
Self::Angle { first, second } => vec![first.node, second.node],
- Self::Circle { node } => vec![*node],
+ Self::Circle { node } | Self::Extent { node } => vec![*node],
Self::Points { a, b, vertex, free_a, free_b } => [a, b, vertex]
.into_iter()
.filter_map(|p| p.as_ref().map(|r| r.node))
@@ -407,7 +413,7 @@ impl DimensionSource {
/// Anchor indexes cannot safely follow a topology replacement. Ordinary moves and handle
/// edits keep their topology and remain linked.
pub fn topology_changed(&self, before: &Document, after: &Document) -> bool {
- if matches!(self, Self::Circle { .. }) {
+ if matches!(self, Self::Circle { .. } | Self::Extent { .. }) {
return false;
}
self.nodes().iter().any(|id| {
@@ -418,9 +424,19 @@ impl DimensionSource {
old.is_some() && old != counts(after)
})
}
+ /// Whether a path it measures differs between `before` and `after`, or is in only one of them.
+ /// A node without a path, or missing from both, counts as changed.
+ pub fn art_changed(&self, before: &Document, after: &Document) -> bool {
+ self.nodes().into_iter().any(|id| match (before.node(id), after.node(id)) {
+ (Some(old), Some(new)) => old.path_data().is_none() || (!std::ptr::eq(old, new) && old.path_data() != new.path_data()),
+ _ => true,
+ })
+ }
/// The map that took the measured art from `before` to `after`, when every path it measures
/// went through one [`art_transform`] that reflects it (a negative determinant). None when a
- /// measured path is unchanged, or when two of them went through different maps.
+ /// measured path is unchanged, or when two of them went through different maps. None for a
+ /// dimension of a whole path whose path's box through its outermost points stays where it
+ /// was, as after its direction is reversed.
pub fn reflection(&self, before: &Document, after: &Document) -> Option {
let mut first: Option = None;
for id in self.nodes() {
@@ -429,6 +445,9 @@ impl DimensionSource {
return None;
}
let xf = fitted(before, after, id, |xf| xf.determinant() < 0.0)?;
+ if matches!(self, Self::Extent { .. }) && same_extents(before, after, id) {
+ return None;
+ }
match first {
None => first = Some(xf),
Some(f) => {
@@ -759,19 +778,22 @@ impl Dimension {
/// outside them as it was, on the same side: the gap is measured from the outermost point
/// on the line's side, so the line stays clear of art that turns. A line that lay between
/// the two points keeps its distance from the first point.
- pub fn keep_gap(&mut self, old: &Dimension) {
+ /// With `docs`, the documents `old` and this dimension were read from, the gap of a dimension of
+ /// a whole path is measured from the whole path ([`Self::span`]), also when only parts of the
+ /// path other than its measured points moved, and also when the dimension is aligned (each
+ /// along its own normal).
+ pub fn keep_gap(&mut self, old: &Dimension, docs: Option<(&Document, &Document)>) {
+ let whole = docs.is_some() && matches!(self.source, Some(DimensionSource::Extent { .. }));
if self.mode != DimensionMode::Linear
- || self.orientation == Orientation::Aligned
+ || (self.orientation == Orientation::Aligned && !whole)
|| old.orientation != self.orientation
- || (self.a, self.b) == (old.a, old.b)
+ || ((self.a, self.b) == (old.a, old.b) && !whole)
{
return;
}
- let n = self.normal();
- let across = |p: Point| p.to_vec2().dot(n);
- let line = across(old.a) + old.offset;
- let (low, high) = (across(old.a).min(across(old.b)), across(old.a).max(across(old.b)));
- let (new_low, new_high) = (across(self.a).min(across(self.b)), across(self.a).max(across(self.b)));
+ let line = old.a.to_vec2().dot(old.normal()) + old.offset;
+ let (low, high) = old.span(docs.map(|(before, _)| before));
+ let (new_low, new_high) = self.span(docs.map(|(_, after)| after));
let at = if line >= high {
new_high + (line - high)
} else if line <= low {
@@ -779,7 +801,7 @@ impl Dimension {
} else {
return;
};
- let offset = at - across(self.a);
+ let offset = at - self.a.to_vec2().dot(self.normal());
if offset.is_finite() && offset.abs() <= 1e6 {
self.offset = offset;
}
@@ -787,8 +809,9 @@ impl Dimension {
/// A linear dimension whose art was reflected, its points now moved from `old`'s: its line goes
/// to the side of the points that `image` (where the reflection put `old`'s line) is on, as far
/// past the outermost point on that side as `old`'s line was. A line that lay between the two
- /// points is left as it is.
- pub fn mirror_line(&mut self, old: &Dimension, image: Point) {
+ /// points is left as it is. With `docs`, as in [`Self::keep_gap`], a dimension of a whole path
+ /// measures from the whole path.
+ pub fn mirror_line(&mut self, old: &Dimension, image: Point, docs: Option<(&Document, &Document)>) {
if self.mode != DimensionMode::Linear || old.mode != DimensionMode::Linear {
return;
}
@@ -796,7 +819,7 @@ impl Dimension {
let n = old.normal();
let across = |p: Point| p.to_vec2().dot(n);
let line = across(old.a) + old.offset;
- let (low, high) = (across(old.a).min(across(old.b)), across(old.a).max(across(old.b)));
+ let (low, high) = old.span(docs.map(|(before, _)| before));
if line >= high {
line - high
} else if line <= low {
@@ -807,13 +830,25 @@ impl Dimension {
};
let n = self.normal();
let across = |p: Point| p.to_vec2().dot(n);
- let (low, high) = (across(self.a).min(across(self.b)), across(self.a).max(across(self.b)));
+ let (low, high) = self.span(docs.map(|(_, after)| after));
let at = if 2.0 * across(image) >= low + high { high + gap } else { low - gap };
let offset = at - across(self.a);
if offset.is_finite() && offset.abs() <= 1e6 {
self.offset = offset;
}
}
+ /// Where a linear dimension's art lies along its normal, lowest and highest: its two points,
+ /// or, for a dimension of a whole path read from `doc`, the whole path ([`reach`]), so that
+ /// the whole path is on one side of a line outside the span.
+ fn span(&self, doc: Option<&Document>) -> (f64, f64) {
+ let n = self.normal();
+ let (a, b) = (self.a.to_vec2().dot(n), self.b.to_vec2().dot(n));
+ let (low, high) = (a.min(b), a.max(b));
+ match (doc, &self.source) {
+ (Some(doc), Some(DimensionSource::Extent { node })) => reach(doc, *node, n).map_or((low, high), |(l, h)| (low.min(l), high.max(h))),
+ _ => (low, high),
+ }
+ }
/// Whether a linear dimension's line lies strictly between its two points along the normal.
fn line_between_points(&self) -> bool {
let n = self.normal();
@@ -824,30 +859,67 @@ impl Dimension {
/// Makes a linear dimension measure in `orientation`, with its line on the side of the points
/// it was on. The line goes through the middle of the old line when that point lies outside
/// the two points along the new normal; otherwise it lies as far past the outermost point on
- /// that side as the old line lay from its points.
- pub fn set_orientation(&mut self, orientation: Orientation) {
+ /// that side as the old line lay from its points. A dimension of a whole path
+ /// ([`DimensionSource::Extent`]) first reads from `doc` the outermost points it measures in the
+ /// new orientation, and its line keeps its distance from the whole path ([`Self::span`]), on
+ /// the side the middle of the old line is on. A line that lay across the path goes as far past
+ /// the path as it lay from its first point. For such a dimension it is an error when the path
+ /// no longer exists, or when the line would lie more than 1,000,000 pt from its first point,
+ /// and the dimension is then left as it was.
+ pub fn set_orientation(&mut self, orientation: Orientation, doc: &Document) -> Result<(), String> {
if self.mode != DimensionMode::Linear || self.orientation == orientation {
self.orientation = orientation;
- return;
+ return Ok(());
}
- let (handle, gap) = (self.handle(), self.offset.abs());
- self.orientation = orientation;
- let n = self.normal();
- let across = |p: Point| p.to_vec2().dot(n);
- let (low, high) = (across(self.a).min(across(self.b)), across(self.a).max(across(self.b)));
- let h = across(handle);
- let at = if h >= high || h <= low {
+ let mut next = self.clone();
+ let (handle, mut gap) = (next.handle(), next.offset.abs());
+ if let Some(DimensionSource::Extent { .. }) = &next.source {
+ // Measured from the whole path, relative to the first point, which the line is
+ // `offset` from. A line on the path's edge, to within the rounding of the
+ // projections, is outside it.
+ let n = next.normal();
+ let base = next.a.to_vec2().dot(n);
+ let (low, high) = next.span(Some(doc));
+ let eps = 8.0 * f64::EPSILON * ((next.a.x * n.x).abs() + (next.a.y * n.y).abs() + low.abs() + high.abs());
+ let (low, high, line) = (low - base, high - base, next.offset);
+ gap = if line >= high - eps {
+ (line - high).max(0.0)
+ } else if line <= low + eps {
+ (low - line).max(0.0)
+ } else {
+ gap
+ };
+ }
+ next.orientation = orientation;
+ if let Some(DimensionSource::Extent { node }) = &next.source {
+ (next.a, next.b) = extent(doc, *node, orientation == Orientation::Vertical).ok_or("Measured path no longer exists")?;
+ }
+ // Along the new normal, relative to the new first point, so that the result is the offset.
+ let n = next.normal();
+ let base = next.a.to_vec2().dot(n);
+ let (low, high) = next.span(Some(doc));
+ let (low, high, h) = (low - base, high - base, handle.to_vec2().dot(n) - base);
+ let whole = matches!(next.source, Some(DimensionSource::Extent { .. }));
+ let at = if whole && h >= high {
+ high + gap
+ } else if whole && h <= low {
+ low - gap
+ } else if h >= high || h <= low {
h
} else if 2.0 * h >= low + high {
high + gap
} else {
low - gap
};
- let offset = at - across(self.a);
- if offset.is_finite() && offset.abs() <= 1e6 {
- self.offset = offset;
+ if at.is_finite() && at.abs() <= 1e6 {
+ next.offset = at;
+ } else if whole {
+ // The old offset would put the line across the path.
+ return Err("Invalid dimension offset".into());
}
- self.length = self.measured();
+ next.length = next.measured();
+ *self = next;
+ Ok(())
}
fn bisector(&self) -> Vec2 {
let start = (self.a - self.vertex).atan2();
@@ -889,7 +961,7 @@ impl Dimension {
self.offset = offset;
}
if self.line_between_points() && !old.line_between_points() {
- self.keep_gap(&old);
+ self.keep_gap(&old, None);
}
} else if self.mode == DimensionMode::Linear && xf.determinant() < 0.0 && (self.b - self.a).hypot() > 1e-9 {
// A reflection turns the left normal of a → b to the other side, so an aligned
@@ -948,6 +1020,12 @@ impl Dimension {
let (center, radius) = arc(doc, edge).ok_or("Choose a circle or a perfect arc")?;
self.set_radial(center, radius);
}
+ Some(DimensionSource::Extent { node }) => {
+ let (a, b) = extent(doc, *node, self.orientation == Orientation::Vertical).ok_or("Measured path no longer exists")?;
+ self.a = a;
+ self.b = b;
+ self.length = self.measured();
+ }
None => {}
}
self.validate()
@@ -1048,6 +1126,87 @@ pub fn arc(doc: &Document, edge: &SegmentRef) -> Option<(Point, f64)> {
Some((center, radius))
}
+/// The outermost points of a path's outline, read from its segments (an anchor that starts no
+/// segment is not part of it): the leftmost and the rightmost, then the topmost and the
+/// bottommost. Of points level with each other, the first point is the topmost or leftmost of
+/// them and the second the bottommost or rightmost, so a straight vertical line has two points
+/// across its width too. None for a node without a path or without segments.
+pub fn extents(doc: &Document, id: NodeId) -> Option<[(Point, Point); 2]> {
+ use vectorcraft_geom::kurbo::{ParamCurve, ParamCurveExtrema};
+ let path = doc.node(id)?.path_data()?;
+ let before = |p: Point, q: Point, vertical: bool| {
+ let key = |p: Point| if vertical { (p.y, p.x) } else { (p.x, p.y) };
+ let (a, b) = (key(p), key(q));
+ a.0.total_cmp(&b.0).then(a.1.total_cmp(&b.1)).is_lt()
+ };
+ let mut ends: Option<[(Point, Point); 2]> = None;
+ let mut take = |p: Point| {
+ let ends = ends.get_or_insert([(p, p); 2]);
+ for (axis, (low, high)) in ends.iter_mut().enumerate() {
+ if before(p, *low, axis == 1) {
+ *low = p;
+ }
+ if before(*high, p, axis == 1) {
+ *high = p;
+ }
+ }
+ };
+ for sp in &path.subpaths {
+ for i in 0..sp.segment_count() {
+ let seg = sp.segment(i);
+ take(seg.p0);
+ take(seg.p3);
+ for t in seg.extrema() {
+ take(seg.eval(t));
+ }
+ }
+ }
+ ends
+}
+
+/// Whether the box through a path's outermost points ([`extents`]) is where it was in `before`,
+/// each side to within rounding against the larger coordinate on its axis.
+fn same_extents(before: &Document, after: &Document, id: NodeId) -> bool {
+ let sides = |doc: &Document| extents(doc, id).map(|[(left, right), (top, bottom)]| [left.x, right.x, top.y, bottom.y]);
+ let (Some(old), Some(new)) = (sides(before), sides(after)) else { return false };
+ [0, 2].into_iter().all(|i| {
+ let scale = old[i].abs().max(old[i + 1].abs()).max(1.0);
+ (i..i + 2).all(|j| (old[j] - new[j]).abs() <= 1e-12 * scale)
+ })
+}
+
+/// [`extents`] along one axis: the leftmost and the rightmost points, or with `vertical` the
+/// topmost and the bottommost.
+pub fn extent(doc: &Document, id: NodeId, vertical: bool) -> Option<(Point, Point)> {
+ extents(doc, id).map(|ends| ends[usize::from(vertical)])
+}
+
+/// How far a path's outline reaches along the unit direction `u`: the lowest and the highest
+/// `p · u` over the points of its segments. None for a node without a path or without segments.
+pub fn reach(doc: &Document, id: NodeId, u: Vec2) -> Option<(f64, f64)> {
+ use vectorcraft_geom::kurbo::{ParamCurve, ParamCurveExtrema};
+ let path = doc.node(id)?.path_data()?;
+ // Turns `u` onto the x axis, so the turned curve's extrema include those along `u`.
+ let turn = Affine::new([u.x, -u.y, u.y, u.x, 0.0, 0.0]);
+ let mut span: Option<(f64, f64)> = None;
+ let mut take = |p: Point| {
+ let v = p.to_vec2().dot(u);
+ let (low, high) = span.get_or_insert((v, v));
+ (*low, *high) = (low.min(v), high.max(v));
+ };
+ for sp in &path.subpaths {
+ for i in 0..sp.segment_count() {
+ let seg = sp.segment(i);
+ take(seg.p0);
+ take(seg.p3);
+ for t in (turn * seg).extrema() {
+ take(seg.eval(t));
+ }
+ }
+ }
+ span
+}
+
/// The two straight segments that meet at a corner anchor, if both are straight.
pub fn corner(doc: &Document, node: NodeId, subpath: usize, anchor: usize) -> Option<(SegmentRef, SegmentRef)> {
let sp = doc.node(node)?.path_data()?.subpaths.get(subpath)?;
diff --git a/crates/doc/src/document.rs b/crates/doc/src/document.rs
index 04a96c97fd..3e5743aec3 100644
--- a/crates/doc/src/document.rs
+++ b/crates/doc/src/document.rs
@@ -343,18 +343,27 @@ impl Document {
/// tree order where `id` appears.
pub fn index_path(&self, id: NodeId) -> Option> {
crate::id_index::note_path_lookup();
+ // No cache yet: build it, and answer from it (an id it doesn't have is not in the tree; one
+ // that appears more than once is walked to, as below).
+ let Some(cached) = self.index.get() else {
+ let fresh = self.index.rebuild(&self.layers);
+ return match fresh.get(&id) {
+ Some(Some(p)) => Some(p),
+ _ if fresh.contains_key(&id) => self.walk_index_path(id),
+ _ => None,
+ };
+ };
// The cached path, while the node there still has the id ([`id_index`]).
- let cached = self.index.get();
- match cached.as_ref().and_then(|m| m.get(&id)) {
+ match cached.get(&id) {
Some(Some(p)) if self.node_at(&p).is_some_and(|n| n.id == id) => return Some(p),
Some(None) => return self.walk_index_path(id),
_ => {}
}
- // A stale path (the tree changed), an id the cache doesn't have (deleted or added since),
- // or no cache yet: walk, and rebuild now and then.
+ // A stale path (the tree changed) or an id the cache doesn't have (deleted or added
+ // since): walk, and rebuild now and then.
let found = self.walk_index_path(id);
- let stale = cached.as_ref().is_some_and(|m| m.contains_key(&id));
- if cached.is_none() || ((stale || found.is_some()) && self.index.missed()) {
+ let stale = cached.contains_key(&id);
+ if (stale || found.is_some()) && self.index.missed() {
self.index.rebuild(&self.layers);
}
found
@@ -618,10 +627,38 @@ impl Document {
/// children of each parent. Each id is listed once and none lies inside another listed node, as
/// in a list of top-level objects. For an id that is not in the tree, is listed twice or lies
/// inside another listed node, it fails with `NoNode` and leaves the document as it was.
+ ///
+ /// The lookup cache ([`id_index`]) is kept, with the listed nodes taken out of it, while it has
+ /// each listed node where it is, until the nodes removed since it was built are half its
+ /// entries; otherwise it is cleared.
pub fn remove_many(&mut self, ids: &[NodeId]) -> Result>, DocError> {
let places = self.places(ids)?;
+ // Each listed node's place in the cache's table, while the cache has it where it is.
+ let gone = self.index.get().and_then(|cache| {
+ let listed = places.iter().flat_map(|(up, kids)| kids.iter().map(move |&(i, k)| (up, i, k)));
+ listed
+ .map(|(up, i, k)| {
+ let id = ids.get(k)?;
+ let path = cache.get(id)??;
+ (path.split_last() == Some((&i, up.as_slice()))).then(|| cache.table_place(id)).flatten()
+ })
+ .collect::