Merge pull request #10049 from dotCooCoo/fix/craft-libs-869c970

Dependencies: craft-libs 869c9704d9
This commit is contained in:
.CooCoo authored and GitHub committed 2026-11-29 09:05:27 -08:00
commit a886bd1148
53 files changed
+470 -544

No files matched your search

Generated
+99 -99
View File
@@ -1239,7 +1239,7 @@ dependencies = [
[[package]]
name = "craft"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"craft-automation",
"craft-behavior",
@@ -1280,7 +1280,7 @@ dependencies = [
[[package]]
name = "craft-affinity"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"crc32fast",
"flate2",
@@ -1291,7 +1291,7 @@ dependencies = [
[[package]]
name = "craft-appkit"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"block2 0.6.2",
"objc2 0.6.5",
@@ -1302,7 +1302,7 @@ dependencies = [
[[package]]
name = "craft-atomic"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"rustix 1.1.6",
]
@@ -1310,7 +1310,7 @@ dependencies = [
[[package]]
name = "craft-automation"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"base64 0.23.1",
"craft-behavior",
@@ -1335,7 +1335,7 @@ dependencies = [
[[package]]
name = "craft-behavior"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"accesskit",
"bitflags 2.13.2",
@@ -1353,7 +1353,7 @@ dependencies = [
[[package]]
name = "craft-browse"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"craft-behavior",
"craft-docpath",
@@ -1371,7 +1371,7 @@ dependencies = [
[[package]]
name = "craft-cdr"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"crc32fast",
"flate2",
@@ -1380,7 +1380,7 @@ dependencies = [
[[package]]
name = "craft-cloud-ui"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"egui",
]
@@ -1388,7 +1388,7 @@ dependencies = [
[[package]]
name = "craft-cms"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"md-5",
"rayon",
@@ -1397,12 +1397,12 @@ dependencies = [
[[package]]
name = "craft-codepage"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
[[package]]
name = "craft-color-ui"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"craft-behavior",
"craft-cms",
@@ -1422,7 +1422,7 @@ dependencies = [
[[package]]
name = "craft-control"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"craft-control-protocol",
"craft-platform",
@@ -1433,7 +1433,7 @@ dependencies = [
[[package]]
name = "craft-control-protocol"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"getrandom 0.3.4",
"serde_json",
@@ -1443,7 +1443,7 @@ dependencies = [
[[package]]
name = "craft-dds"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"rayon",
]
@@ -1451,7 +1451,7 @@ dependencies = [
[[package]]
name = "craft-dialogs"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"block2 0.6.2",
"craft-appkit",
@@ -1477,7 +1477,7 @@ dependencies = [
[[package]]
name = "craft-doc"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"blake3",
"craft-ecproj-format",
@@ -1493,7 +1493,7 @@ dependencies = [
[[package]]
name = "craft-docpath"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"serde",
]
@@ -1501,7 +1501,7 @@ dependencies = [
[[package]]
name = "craft-draw"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"craft-behavior",
"craft-color-ui",
@@ -1520,7 +1520,7 @@ dependencies = [
[[package]]
name = "craft-dxf"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"craft-codepage",
"encoding_rs",
@@ -1532,7 +1532,7 @@ dependencies = [
[[package]]
name = "craft-ecproj-format"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"serde",
"serde_json",
@@ -1542,12 +1542,12 @@ dependencies = [
[[package]]
name = "craft-eps"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
[[package]]
name = "craft-font-catalog"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"fontique",
"harfrust 0.13.3",
@@ -1562,7 +1562,7 @@ dependencies = [
[[package]]
name = "craft-font-manager"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"craft-behavior",
"craft-font-catalog",
@@ -1581,7 +1581,7 @@ dependencies = [
[[package]]
name = "craft-font-os-windows"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"windows-registry",
"windows-sys 0.61.2",
@@ -1590,7 +1590,7 @@ dependencies = [
[[package]]
name = "craft-font-store"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"cap-primitives",
"craft-atomic",
@@ -1613,12 +1613,12 @@ dependencies = [
[[package]]
name = "craft-fonts-build"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
[[package]]
name = "craft-gif"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"gif",
]
@@ -1626,7 +1626,7 @@ dependencies = [
[[package]]
name = "craft-gzip"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"flate2",
]
@@ -1634,7 +1634,7 @@ dependencies = [
[[package]]
name = "craft-host"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"bitflags 2.13.2",
"craft-i18n",
@@ -1647,7 +1647,7 @@ dependencies = [
[[package]]
name = "craft-i18n"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"chrono",
"fixed_decimal",
@@ -1675,7 +1675,7 @@ dependencies = [
[[package]]
name = "craft-image-codecs"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"craft-dds",
"craft-jpeg",
@@ -1702,7 +1702,7 @@ dependencies = [
[[package]]
name = "craft-imaging"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"craft-behavior",
"craft-color-ui",
@@ -1720,7 +1720,7 @@ dependencies = [
[[package]]
name = "craft-jpeg"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"thiserror 2.0.21",
]
@@ -1728,7 +1728,7 @@ dependencies = [
[[package]]
name = "craft-jxl"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"brotli-decompressor 5.0.3",
"jixel",
@@ -1739,7 +1739,7 @@ dependencies = [
[[package]]
name = "craft-keymap"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"craft-host",
"craft-i18n",
@@ -1754,7 +1754,7 @@ dependencies = [
[[package]]
name = "craft-layers"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"craft-behavior",
"craft-i18n",
@@ -1768,7 +1768,7 @@ dependencies = [
[[package]]
name = "craft-menu"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"craft-behavior",
"craft-host",
@@ -1786,7 +1786,7 @@ dependencies = [
[[package]]
name = "craft-metadata"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"brotli-decompressor 6.3.2",
"chrono",
@@ -1798,7 +1798,7 @@ dependencies = [
[[package]]
name = "craft-metafile"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"encoding_rs",
"image",
@@ -1809,7 +1809,7 @@ dependencies = [
[[package]]
name = "craft-mime"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"chrono",
"craft-codepage",
@@ -1819,7 +1819,7 @@ dependencies = [
[[package]]
name = "craft-pages"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"craft-behavior",
"craft-keymap",
@@ -1835,7 +1835,7 @@ dependencies = [
[[package]]
name = "craft-pcraft-format"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"flate2",
"serde",
@@ -1846,7 +1846,7 @@ dependencies = [
[[package]]
name = "craft-pdf"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"hayro-interpret",
"hayro-syntax",
@@ -1858,7 +1858,7 @@ dependencies = [
[[package]]
name = "craft-platform"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"async-channel",
"async-io",
@@ -1889,7 +1889,7 @@ dependencies = [
[[package]]
name = "craft-plotter"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"kurbo 0.13.1",
"thiserror 2.0.21",
@@ -1898,7 +1898,7 @@ dependencies = [
[[package]]
name = "craft-print"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"craft-behavior",
"craft-host",
@@ -1922,7 +1922,7 @@ dependencies = [
[[package]]
name = "craft-proof"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"log",
"miniz_oxide 0.9.1",
@@ -1933,7 +1933,7 @@ dependencies = [
[[package]]
name = "craft-ps"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"craft-eps",
"flate2",
@@ -1947,7 +1947,7 @@ dependencies = [
[[package]]
name = "craft-psd"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"encoding_rs",
"flate2",
@@ -1958,7 +1958,7 @@ dependencies = [
[[package]]
name = "craft-quit"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"dispatch2",
"egui",
@@ -1971,7 +1971,7 @@ dependencies = [
[[package]]
name = "craft-review"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"base64 0.23.1",
"craft-behavior",
@@ -1990,7 +1990,7 @@ dependencies = [
[[package]]
name = "craft-settings"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"craft-atomic",
"craft-host",
@@ -2007,7 +2007,7 @@ dependencies = [
[[package]]
name = "craft-stream-codecs"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"fax",
"hayro-ccitt",
@@ -2018,7 +2018,7 @@ dependencies = [
[[package]]
name = "craft-svg"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"craft-image-codecs",
"craft-xml",
@@ -2039,7 +2039,7 @@ dependencies = [
[[package]]
name = "craft-table"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"craft-behavior",
"craft-keymap",
@@ -2051,7 +2051,7 @@ dependencies = [
[[package]]
name = "craft-text"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"craft-behavior",
"craft-font-manager",
@@ -2076,7 +2076,7 @@ dependencies = [
[[package]]
name = "craft-theme"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"bitflags 2.13.2",
"craft-tracked",
@@ -2091,7 +2091,7 @@ dependencies = [
[[package]]
name = "craft-theme-store"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"craft-atomic",
"craft-behavior",
@@ -2106,7 +2106,7 @@ dependencies = [
[[package]]
name = "craft-tiff"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"serde",
"thiserror 2.0.21",
@@ -2116,7 +2116,7 @@ dependencies = [
[[package]]
name = "craft-time"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"serde",
"thiserror 2.0.21",
@@ -2125,7 +2125,7 @@ dependencies = [
[[package]]
name = "craft-timeline"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"craft-behavior",
"craft-keymap",
@@ -2140,12 +2140,12 @@ dependencies = [
[[package]]
name = "craft-tracked"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
[[package]]
name = "craft-ui"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"craft-cloud-ui",
"craft-ui-canvas",
@@ -2159,7 +2159,7 @@ dependencies = [
[[package]]
name = "craft-ui-canvas"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"craft-behavior",
"craft-i18n",
@@ -2175,7 +2175,7 @@ dependencies = [
[[package]]
name = "craft-ui-contract"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"accesskit",
"craft-behavior",
@@ -2213,7 +2213,7 @@ dependencies = [
[[package]]
name = "craft-ui-macros"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"proc-macro-crate",
"proc-macro2",
@@ -2224,7 +2224,7 @@ dependencies = [
[[package]]
name = "craft-ui-panels"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"craft-behavior",
"craft-host",
@@ -2242,7 +2242,7 @@ dependencies = [
[[package]]
name = "craft-ui-patterns"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"craft-behavior",
"craft-host",
@@ -2263,7 +2263,7 @@ dependencies = [
[[package]]
name = "craft-ui-shell"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"craft-behavior",
"craft-host",
@@ -2284,7 +2284,7 @@ dependencies = [
[[package]]
name = "craft-ui-widgets"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"craft-behavior",
"craft-host",
@@ -2303,7 +2303,7 @@ dependencies = [
[[package]]
name = "craft-update"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"base64 0.22.1",
"chrono",
@@ -2335,7 +2335,7 @@ dependencies = [
[[package]]
name = "craft-vectorcraft-format"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"flate2",
"serde",
@@ -2346,7 +2346,7 @@ dependencies = [
[[package]]
name = "craft-wayland"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"raw-window-handle",
"wayland-backend",
@@ -2356,7 +2356,7 @@ dependencies = [
[[package]]
name = "craft-web-api"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"js-sys",
"serde_json",
@@ -2367,7 +2367,7 @@ dependencies = [
[[package]]
name = "craft-win32"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"winsafe",
]
@@ -2375,7 +2375,7 @@ dependencies = [
[[package]]
name = "craft-window"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"craft-appkit",
"craft-atomic",
@@ -2407,7 +2407,7 @@ dependencies = [
[[package]]
name = "craft-xml"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"quick-xml 0.41.0",
"serde",
@@ -2752,7 +2752,7 @@ checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813"
[[package]]
name = "ecolor"
version = "0.37.0"
source = "git+https://github.com/storytold/egui.git?rev=932a73b28560acb1a695533307b2cd0d66a42081#932a73b28560acb1a695533307b2cd0d66a42081"
source = "git+https://github.com/storytold/egui.git?rev=14c39fed181756be6f357c284354e0ab55b64443#14c39fed181756be6f357c284354e0ab55b64443"
dependencies = [
"bytemuck",
"emath",
@@ -2785,7 +2785,7 @@ dependencies = [
[[package]]
name = "eframe"
version = "0.37.0"
source = "git+https://github.com/storytold/egui.git?rev=932a73b28560acb1a695533307b2cd0d66a42081#932a73b28560acb1a695533307b2cd0d66a42081"
source = "git+https://github.com/storytold/egui.git?rev=14c39fed181756be6f357c284354e0ab55b64443#14c39fed181756be6f357c284354e0ab55b64443"
dependencies = [
"ahash",
"bytemuck",
@@ -2820,7 +2820,7 @@ dependencies = [
[[package]]
name = "egui"
version = "0.37.0"
source = "git+https://github.com/storytold/egui.git?rev=932a73b28560acb1a695533307b2cd0d66a42081#932a73b28560acb1a695533307b2cd0d66a42081"
source = "git+https://github.com/storytold/egui.git?rev=14c39fed181756be6f357c284354e0ab55b64443#14c39fed181756be6f357c284354e0ab55b64443"
dependencies = [
"accesskit",
"ahash",
@@ -2839,7 +2839,7 @@ dependencies = [
[[package]]
name = "egui-wgpu"
version = "0.37.0"
source = "git+https://github.com/storytold/egui.git?rev=932a73b28560acb1a695533307b2cd0d66a42081#932a73b28560acb1a695533307b2cd0d66a42081"
source = "git+https://github.com/storytold/egui.git?rev=14c39fed181756be6f357c284354e0ab55b64443#14c39fed181756be6f357c284354e0ab55b64443"
dependencies = [
"ahash",
"bytemuck",
@@ -2858,7 +2858,7 @@ dependencies = [
[[package]]
name = "egui-winit"
version = "0.37.0"
source = "git+https://github.com/storytold/egui.git?rev=932a73b28560acb1a695533307b2cd0d66a42081#932a73b28560acb1a695533307b2cd0d66a42081"
source = "git+https://github.com/storytold/egui.git?rev=14c39fed181756be6f357c284354e0ab55b64443#14c39fed181756be6f357c284354e0ab55b64443"
dependencies = [
"accesskit_winit",
"arboard",
@@ -2883,7 +2883,7 @@ dependencies = [
[[package]]
name = "egui_extras"
version = "0.37.0"
source = "git+https://github.com/storytold/egui.git?rev=932a73b28560acb1a695533307b2cd0d66a42081#932a73b28560acb1a695533307b2cd0d66a42081"
source = "git+https://github.com/storytold/egui.git?rev=14c39fed181756be6f357c284354e0ab55b64443#14c39fed181756be6f357c284354e0ab55b64443"
dependencies = [
"ahash",
"egui",
@@ -2897,7 +2897,7 @@ dependencies = [
[[package]]
name = "egui_glow"
version = "0.37.0"
source = "git+https://github.com/storytold/egui.git?rev=932a73b28560acb1a695533307b2cd0d66a42081#932a73b28560acb1a695533307b2cd0d66a42081"
source = "git+https://github.com/storytold/egui.git?rev=14c39fed181756be6f357c284354e0ab55b64443#14c39fed181756be6f357c284354e0ab55b64443"
dependencies = [
"bytemuck",
"egui",
@@ -2910,7 +2910,7 @@ dependencies = [
[[package]]
name = "egui_kittest"
version = "0.37.0"
source = "git+https://github.com/storytold/egui.git?rev=932a73b28560acb1a695533307b2cd0d66a42081#932a73b28560acb1a695533307b2cd0d66a42081"
source = "git+https://github.com/storytold/egui.git?rev=14c39fed181756be6f357c284354e0ab55b64443#14c39fed181756be6f357c284354e0ab55b64443"
dependencies = [
"dify",
"eframe",
@@ -2936,7 +2936,7 @@ checksum = "0e9c71c2167ca323c882b99918929403426e2373ea17242ff5653e0d5e1058be"
[[package]]
name = "emath"
version = "0.37.0"
source = "git+https://github.com/storytold/egui.git?rev=932a73b28560acb1a695533307b2cd0d66a42081#932a73b28560acb1a695533307b2cd0d66a42081"
source = "git+https://github.com/storytold/egui.git?rev=14c39fed181756be6f357c284354e0ab55b64443#14c39fed181756be6f357c284354e0ab55b64443"
dependencies = [
"bytemuck",
]
@@ -3017,7 +3017,7 @@ dependencies = [
[[package]]
name = "epaint"
version = "0.37.0"
source = "git+https://github.com/storytold/egui.git?rev=932a73b28560acb1a695533307b2cd0d66a42081#932a73b28560acb1a695533307b2cd0d66a42081"
source = "git+https://github.com/storytold/egui.git?rev=14c39fed181756be6f357c284354e0ab55b64443#14c39fed181756be6f357c284354e0ab55b64443"
dependencies = [
"ahash",
"bytemuck",
@@ -3043,7 +3043,7 @@ dependencies = [
[[package]]
name = "epaint_default_fonts"
version = "0.37.0"
source = "git+https://github.com/storytold/egui.git?rev=932a73b28560acb1a695533307b2cd0d66a42081#932a73b28560acb1a695533307b2cd0d66a42081"
source = "git+https://github.com/storytold/egui.git?rev=14c39fed181756be6f357c284354e0ab55b64443#14c39fed181756be6f357c284354e0ab55b64443"
[[package]]
name = "equivalent"
@@ -3762,7 +3762,7 @@ checksum = "9f4d0e94ddd48749f06bbe4e5389fb9799a0c45bcaf00495042076ef05e3241a"
[[package]]
name = "hayro-cmap"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"brotli",
"hayro-postscript",
@@ -3771,7 +3771,7 @@ dependencies = [
[[package]]
name = "hayro-interpret"
version = "0.7.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"bitflags 2.13.2",
"hayro-cmap",
@@ -3789,7 +3789,7 @@ dependencies = [
[[package]]
name = "hayro-jbig2"
version = "0.3.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"fearless_simd",
"hayro-ccitt",
@@ -3807,12 +3807,12 @@ dependencies = [
[[package]]
name = "hayro-postscript"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
[[package]]
name = "hayro-syntax"
version = "0.7.2"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"flate2",
"hayro-ccitt",
@@ -4795,7 +4795,7 @@ dependencies = [
[[package]]
name = "krilla"
version = "0.8.2"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"base64 0.22.1",
"bumpalo",
@@ -4952,7 +4952,7 @@ checksum = "d4a5ff6bcca6c4867b1c4fd4ef63e4db7436ef363e0ad7531d1558856bae64f4"
[[package]]
name = "linesweeper"
version = "0.5.0"
source = "git+https://github.com/storytold/craft-libs?rev=610c86792a02aa3d416926ee44e3ec3788dea853#610c86792a02aa3d416926ee44e3ec3788dea853"
source = "git+https://github.com/storytold/craft-libs?rev=186a229c8da8db5916f8a863dfd894f1879af735#186a229c8da8db5916f8a863dfd894f1879af735"
dependencies = [
"arrayvec",
"kurbo 0.13.1",
@@ -10762,14 +10762,14 @@ dependencies = [
[[patch.unused]]
name = "egui_demo_lib"
version = "0.37.0"
source = "git+https://github.com/storytold/egui.git?rev=932a73b28560acb1a695533307b2cd0d66a42081#932a73b28560acb1a695533307b2cd0d66a42081"
source = "git+https://github.com/storytold/egui.git?rev=14c39fed181756be6f357c284354e0ab55b64443#14c39fed181756be6f357c284354e0ab55b64443"
[[patch.unused]]
name = "egui_inspection"
version = "0.37.0"
source = "git+https://github.com/storytold/egui.git?rev=932a73b28560acb1a695533307b2cd0d66a42081#932a73b28560acb1a695533307b2cd0d66a42081"
source = "git+https://github.com/storytold/egui.git?rev=14c39fed181756be6f357c284354e0ab55b64443#14c39fed181756be6f357c284354e0ab55b64443"
[[patch.unused]]
name = "egui_system_font_provider"
version = "0.37.0"
source = "git+https://github.com/storytold/egui.git?rev=932a73b28560acb1a695533307b2cd0d66a42081#932a73b28560acb1a695533307b2cd0d66a42081"
source = "git+https://github.com/storytold/egui.git?rev=14c39fed181756be6f357c284354e0ab55b64443#14c39fed181756be6f357c284354e0ab55b64443"
+49 -49
View File
@@ -11,46 +11,46 @@ rust-version = "1.95"
repository = "https://github.com/storytold/vectorcraft"
[workspace.dependencies]
craft-cms = { git = "https://github.com/storytold/craft-libs", rev = "610c86792a02aa3d416926ee44e3ec3788dea853" }
craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "610c86792a02aa3d416926ee44e3ec3788dea853", default-features = false, features = ["interpret", "write"] }
craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "610c86792a02aa3d416926ee44e3ec3788dea853" }
craft-proof = { git = "https://github.com/storytold/craft-libs", rev = "610c86792a02aa3d416926ee44e3ec3788dea853" }
craft-cms = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735", default-features = false, features = ["interpret", "write"] }
craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
craft-proof = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
# 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 = "610c86792a02aa3d416926ee44e3ec3788dea853" }
craft-gzip = { git = "https://github.com/storytold/craft-libs", rev = "610c86792a02aa3d416926ee44e3ec3788dea853" }
craft-vectorcraft-format = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
craft-gzip = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
# `.pcraft` documents: their manifest, full-size composite, preview, layer pixels and ICC profile.
craft-doc = { git = "https://github.com/storytold/craft-libs", rev = "610c86792a02aa3d416926ee44e3ec3788dea853", features = ["pcraft-pixels"] }
craft-doc = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735", features = ["pcraft-pixels"] }
# Native Affinity documents (craft-libs#914).
craft-affinity = { git = "https://github.com/storytold/craft-libs", rev = "610c86792a02aa3d416926ee44e3ec3788dea853" }
craft-affinity = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
# Bounded CDR (v1-v27) and CMX (32-bit) reader (craft-libs#778).
craft-cdr = { git = "https://github.com/storytold/craft-libs", rev = "610c86792a02aa3d416926ee44e3ec3788dea853" }
craft-cdr = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
# SVG parsing, limits, SVGZ and writer (craft-libs#778).
craft-svg = { git = "https://github.com/storytold/craft-libs", rev = "610c86792a02aa3d416926ee44e3ec3788dea853", features = ["tree"] }
craft-mime = { git = "https://github.com/storytold/craft-libs", rev = "610c86792a02aa3d416926ee44e3ec3788dea853" }
craft-svg = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735", features = ["tree"] }
craft-mime = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
# EPS container, previews, ASCII85 and DSC comments (craft-libs#778).
craft-eps = { git = "https://github.com/storytold/craft-libs", rev = "610c86792a02aa3d416926ee44e3ec3788dea853" }
craft-eps = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
# DXF tags, reader and writer (craft-libs#778, #926, #927).
craft-plotter = { git = "https://github.com/storytold/craft-libs", rev = "610c86792a02aa3d416926ee44e3ec3788dea853" }
craft-dxf = { git = "https://github.com/storytold/craft-libs", rev = "610c86792a02aa3d416926ee44e3ec3788dea853" }
craft-plotter = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
craft-dxf = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
# WMF, EMF and EMF+ reader (craft-libs#778).
craft-metafile = { git = "https://github.com/storytold/craft-libs", rev = "610c86792a02aa3d416926ee44e3ec3788dea853" }
craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "610c86792a02aa3d416926ee44e3ec3788dea853" }
craft-image-codecs = { git = "https://github.com/storytold/craft-libs", rev = "610c86792a02aa3d416926ee44e3ec3788dea853" }
craft-gif = { git = "https://github.com/storytold/craft-libs", rev = "610c86792a02aa3d416926ee44e3ec3788dea853" }
craft-tiff = { git = "https://github.com/storytold/craft-libs", rev = "610c86792a02aa3d416926ee44e3ec3788dea853" }
craft-ps = { git = "https://github.com/storytold/craft-libs", rev = "610c86792a02aa3d416926ee44e3ec3788dea853", default-features = false, features = ["read", "write"] }
craft-psd = { git = "https://github.com/storytold/craft-libs", rev = "610c86792a02aa3d416926ee44e3ec3788dea853" }
craft-stream-codecs = { git = "https://github.com/storytold/craft-libs", rev = "610c86792a02aa3d416926ee44e3ec3788dea853" }
craft-jxl = { git = "https://github.com/storytold/craft-libs", rev = "610c86792a02aa3d416926ee44e3ec3788dea853" }
craft-codepage = { git = "https://github.com/storytold/craft-libs", rev = "610c86792a02aa3d416926ee44e3ec3788dea853" }
craft-metafile = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
craft-image-codecs = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
craft-gif = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
craft-tiff = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
craft-ps = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735", default-features = false, features = ["read", "write"] }
craft-psd = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
craft-stream-codecs = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
craft-jxl = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
craft-codepage = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
# 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 = "610c86792a02aa3d416926ee44e3ec3788dea853" }
craft = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
# 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 = "610c86792a02aa3d416926ee44e3ec3788dea853" }
craft-theme = { git = "https://github.com/storytold/craft-libs", rev = "610c86792a02aa3d416926ee44e3ec3788dea853" }
craft-fonts-build = { git = "https://github.com/storytold/craft-libs", rev = "610c86792a02aa3d416926ee44e3ec3788dea853" }
craft-color-ui = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
craft-theme = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
craft-fonts-build = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
# internal
vectorcraft-geom = { path = "crates/geom" }
vectorcraft-color = { path = "crates/color" }
@@ -193,25 +193,25 @@ lto = "thin"
codegen-units = 1
[patch.crates-io]
hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "610c86792a02aa3d416926ee44e3ec3788dea853" }
hayro-interpret = { git = "https://github.com/storytold/craft-libs", rev = "610c86792a02aa3d416926ee44e3ec3788dea853" }
hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "610c86792a02aa3d416926ee44e3ec3788dea853" }
hayro-cmap = { git = "https://github.com/storytold/craft-libs", rev = "610c86792a02aa3d416926ee44e3ec3788dea853" }
hayro-postscript = { git = "https://github.com/storytold/craft-libs", rev = "610c86792a02aa3d416926ee44e3ec3788dea853" }
krilla = { git = "https://github.com/storytold/craft-libs", rev = "610c86792a02aa3d416926ee44e3ec3788dea853" }
linesweeper = { git = "https://github.com/storytold/craft-libs", rev = "610c86792a02aa3d416926ee44e3ec3788dea853" }
ecolor = { git = "https://github.com/storytold/egui.git", rev = "932a73b28560acb1a695533307b2cd0d66a42081" }
emath = { git = "https://github.com/storytold/egui.git", rev = "932a73b28560acb1a695533307b2cd0d66a42081" }
epaint = { git = "https://github.com/storytold/egui.git", rev = "932a73b28560acb1a695533307b2cd0d66a42081" }
epaint_default_fonts = { git = "https://github.com/storytold/egui.git", rev = "932a73b28560acb1a695533307b2cd0d66a42081" }
egui = { git = "https://github.com/storytold/egui.git", rev = "932a73b28560acb1a695533307b2cd0d66a42081" }
egui-winit = { git = "https://github.com/storytold/egui.git", rev = "932a73b28560acb1a695533307b2cd0d66a42081" }
egui-wgpu = { git = "https://github.com/storytold/egui.git", rev = "932a73b28560acb1a695533307b2cd0d66a42081" }
egui_glow = { git = "https://github.com/storytold/egui.git", rev = "932a73b28560acb1a695533307b2cd0d66a42081" }
egui_extras = { git = "https://github.com/storytold/egui.git", rev = "932a73b28560acb1a695533307b2cd0d66a42081" }
egui_kittest = { git = "https://github.com/storytold/egui.git", rev = "932a73b28560acb1a695533307b2cd0d66a42081" }
egui_system_font_provider = { git = "https://github.com/storytold/egui.git", rev = "932a73b28560acb1a695533307b2cd0d66a42081" }
eframe = { git = "https://github.com/storytold/egui.git", rev = "932a73b28560acb1a695533307b2cd0d66a42081" }
egui_demo_lib = { git = "https://github.com/storytold/egui.git", rev = "932a73b28560acb1a695533307b2cd0d66a42081" }
egui_inspection = { git = "https://github.com/storytold/egui.git", rev = "932a73b28560acb1a695533307b2cd0d66a42081" }
hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
hayro-interpret = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
hayro-cmap = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
hayro-postscript = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
krilla = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
linesweeper = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735" }
ecolor = { git = "https://github.com/storytold/egui.git", rev = "14c39fed181756be6f357c284354e0ab55b64443" }
emath = { git = "https://github.com/storytold/egui.git", rev = "14c39fed181756be6f357c284354e0ab55b64443" }
epaint = { git = "https://github.com/storytold/egui.git", rev = "14c39fed181756be6f357c284354e0ab55b64443" }
epaint_default_fonts = { git = "https://github.com/storytold/egui.git", rev = "14c39fed181756be6f357c284354e0ab55b64443" }
egui = { git = "https://github.com/storytold/egui.git", rev = "14c39fed181756be6f357c284354e0ab55b64443" }
egui-winit = { git = "https://github.com/storytold/egui.git", rev = "14c39fed181756be6f357c284354e0ab55b64443" }
egui-wgpu = { git = "https://github.com/storytold/egui.git", rev = "14c39fed181756be6f357c284354e0ab55b64443" }
egui_glow = { git = "https://github.com/storytold/egui.git", rev = "14c39fed181756be6f357c284354e0ab55b64443" }
egui_extras = { git = "https://github.com/storytold/egui.git", rev = "14c39fed181756be6f357c284354e0ab55b64443" }
egui_kittest = { git = "https://github.com/storytold/egui.git", rev = "14c39fed181756be6f357c284354e0ab55b64443" }
egui_system_font_provider = { git = "https://github.com/storytold/egui.git", rev = "14c39fed181756be6f357c284354e0ab55b64443" }
eframe = { git = "https://github.com/storytold/egui.git", rev = "14c39fed181756be6f357c284354e0ab55b64443" }
egui_demo_lib = { git = "https://github.com/storytold/egui.git", rev = "14c39fed181756be6f357c284354e0ab55b64443" }
egui_inspection = { git = "https://github.com/storytold/egui.git", rev = "14c39fed181756be6f357c284354e0ab55b64443" }
winit = { git = "https://github.com/storytold/winit.git", rev = "a517b3846ee8457d84ee4975110bfda6797c44dc" }
+1 -1
View File
@@ -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 = "610c86792a02aa3d416926ee44e3ec3788dea853", version = "0.1.0" }
craft-web-api = { git = "https://github.com/storytold/craft-libs", rev = "186a229c8da8db5916f8a863dfd894f1879af735", version = "0.1.0" }
wasm-bindgen = "0.2"
serde_json = { workspace = true }
+3 -2
View File
@@ -25,8 +25,9 @@ use crate::{Action, Overlay, PointerEvent, ToolContext};
pub const DIALOG: &str = "corners";
/// Widgets sit at least this far inside their corner along each side of a right angle (screen px;
/// √2 times it along the bisector, at any angle), further in once the radius is.
const MIN_INSET_PX: f64 = 10.0;
/// √2 times it along the bisector, at any angle), further in once the radius is. The canvas draws the
/// widgets at the framework's `CornerWidgets::INSET`, which the UI's tests hold equal to this value.
pub const MIN_INSET_PX: f64 = 10.0;
/// Corners with a side shorter than this on screen (px) hide their widgets.
const MIN_SIDE_PX: f64 = 3.0 * MIN_INSET_PX;
+2 -5
View File
@@ -405,15 +405,12 @@ fn compass(app: &VectorcraftApp, ui: &mut Ui, space: &CanvasSpace) -> Option<Can
})
}
/// `rect` without the strip the vertical scroll bar takes along its right edge (the bar's thickness and its margin,
/// the sizes `CanvasScrollbars` draws with), in the screen modes that show the scroll bars.
/// `rect` without the strips the scroll bars take, in the screen modes that show them ([`scroll_bars`]).
fn clear_of_scroll_bars(app: &VectorcraftApp, ui: &Ui, rect: egui::Rect) -> egui::Rect {
if app.ui.screen_mode >= 2 {
return rect;
}
let env = Env::of(ui);
let strip = env.tokens.size.icon.md + env.tokens.space.gap.tight;
egui::Rect::from_min_max(rect.min, egui::pos2((rect.right() - strip).max(rect.left()), rect.bottom()))
CanvasScrollbars::clear_of(ui, rect, false, false)
}
/// The scroll bars along the right and bottom edges (Normal and Full Screen with Menu Bar): the view
+8 -20
View File
@@ -38,20 +38,12 @@ fn frame(app: &mut VectorcraftApp, ctx: &egui::Context, events: Vec<egui::Event>
/// [`frame`] on a window `size` points large.
fn frame_in(app: &mut VectorcraftApp, ctx: &egui::Context, events: Vec<egui::Event>, size: egui::Vec2) -> Vec<Shape> {
fn flat(s: Shape, out: &mut Vec<Shape>) {
match s {
Shape::Vec(v) => v.into_iter().for_each(|s| flat(s, out)),
s => out.push(s),
}
}
let raw =
egui::RawInput { screen_rect: Some(egui::Rect::from_min_size(Pos2::ZERO, size)), max_texture_side: Some(8192), events, ..Default::default() };
let mut out = ctx.run_ui(raw, |ui| app.canvas_area(ui));
// A pane's picture is uploaded once, maybe in this frame: [`wait_ready`] finds it later.
note_uploads(&mut out.textures_delta);
let mut shapes = vec![];
out.shapes.into_iter().for_each(|c| flat(c.shape, &mut shapes));
shapes
crate::tests_labels::flat_painted_shapes(&out.shapes)
}
/// A texture's picture: its pixels and size.
@@ -627,15 +619,10 @@ fn art_carried_through_a_tab_drops_into_a_third_documents_pane() {
// A tab's title starts with its document's name (an inactive tab shows the name alone).
let names: Vec<String> = app.session.documents().iter().map(|d| d.title()).collect();
let titles = |out: egui::FullOutput| -> Vec<egui::Rect> {
let mut t: Vec<_> = out
.shapes
.iter()
.filter_map(|s| match &s.shape {
Shape::Text(t) if names.iter().any(|n| t.galley.text().starts_with(n.as_str())) => {
Some(egui::Rect::from_min_size(t.pos, t.galley.size()))
}
_ => None,
})
let mut t: Vec<_> = crate::tests_labels::text_shapes(&out)
.into_iter()
.filter(|(t, _)| names.iter().any(|n| t.galley.text().starts_with(n.as_str())))
.map(|(t, transform)| transform * egui::Rect::from_min_size(t.pos, t.galley.size()))
.collect();
t.sort_by(|a, b| a.left().total_cmp(&b.left()));
t
@@ -1002,14 +989,15 @@ fn other_panes_draw_through_their_documents_profiles() {
let fills = |out: &egui::FullOutput, rgb: [u8; 3]| {
fn any(s: &Shape, f: &dyn Fn(Color32) -> bool) -> bool {
match s {
Shape::Vec(v) => v.iter().any(|s| any(s, f)),
Shape::Path(p) => f(p.fill),
Shape::Rect(r) => f(r.fill),
Shape::Mesh(m) if m.texture_id == egui::TextureId::default() => m.vertices.iter().any(|v| f(v.color)),
_ => false,
}
}
out.shapes.iter().any(|c| any(&c.shape, &|c: Color32| c.a() == 255 && near([c.r(), c.g(), c.b()], rgb)))
crate::tests_labels::painted_shapes(&out.shapes)
.into_iter()
.any(|(s, ..)| any(s, &|c: Color32| c.a() == 255 && near([c.r(), c.g(), c.b()], rgb)))
};
let ctx = crate::testing::ui_context();
let raw = || egui::RawInput {
+3 -10
View File
@@ -956,17 +956,10 @@ fn shapes(app: &mut VectorcraftApp, ctx: &egui::Context) -> Vec<Shape> {
shapes
}
/// The shapes of a frame's output, `Shape::Vec`s flattened: the canvas's picture slot holds the art's.
/// The shapes of a frame's output, `Shape::Vec`s and retained paint chunks flattened: the canvas's
/// picture slot holds the art's.
fn flat_shapes(clipped: Vec<egui::epaint::ClippedShape>) -> Vec<Shape> {
fn flat(s: Shape, out: &mut Vec<Shape>) {
match s {
Shape::Vec(v) => v.into_iter().for_each(|s| flat(s, out)),
s => out.push(s),
}
}
let mut v = vec![];
clipped.into_iter().for_each(|c| flat(c.shape, &mut v));
v
crate::tests_labels::flat_painted_shapes(&clipped)
}
/// One headless canvas frame → the shapes drawn ([`flat_shapes`]) and the textures uploaded by it
@@ -101,6 +101,12 @@ fn corner_widgets_hide_above_the_preference_angle() {
assert!(corners(&app, app.session.tool_id(), app.view_info().zoom).is_none());
}
/// The tools hit-test corner widgets at the inset the canvas draws them at.
#[test]
fn corner_widgets_are_hit_tested_at_the_inset_they_are_drawn_at() {
assert_eq!(vectorcraft_tools::corners::MIN_INSET_PX, f64::from(CornerWidgets::INSET));
}
/// #1232: the pointer within 5 screen points of a corner widget gives the cut of the corner it controls, in the
/// layer colour, with Direct Selection, the Selection tool and the Rectangle tool. It gives none with a mouse button
/// down (a press on the widget or a pan), during a drag from the widget, off the canvas, away from the widgets, or
+22 -1
View File
@@ -241,7 +241,7 @@ fn show_navigation(p: &mut Navigation<'_>, ui: &mut Ui) {
let (view, document) = (p.view, p.document);
let zoom = Field::new(tl!("Zoom"))
.side(SideLabel::new().kind(LabelKind::Hidden))
.show(ui, |ui, _| ZoomField::new(tl!("Zoom"), view, document).scrub(true).show(ui));
.show(ui, |ui, _| ZoomField::new(tl!("Zoom"), view, document).scrub(true).status_bar().show(ui));
// The field edits the canvas view, whose zoom is divided by UI Scaling; `view.setZoom` takes the view's zoom.
if let Some(zoom) = zoom.inner {
if let Some(view) = zoom.view.committed() {
@@ -500,6 +500,27 @@ mod tests {
}
}
/// The Zoom field draws in the status bar's look: no outline while it does not have the focus.
#[test]
fn the_zoom_field_draws_in_the_status_bars_look() {
let mut app = VectorcraftApp::new(vectorcraft_engine::Session::new(), Default::default());
app.run("file.new", json!({"width": 300, "height": 200})).unwrap();
app.view_mut().unwrap().rect = egui::Rect::from_min_size(egui::Pos2::ZERO, egui::vec2(600.0, 400.0));
let mut panel = Panel::new(app, status_bar);
panel.room(egui::vec2(1200.0, 300.0));
panel.frame();
let field = panel.rect("Zoom");
let (shapes, _) = panel.paint_at(1.0);
let outlines = shapes
.iter()
.filter(|shape| match shape {
egui::Shape::Rect(rect) => rect.stroke.width > 0.0 && rect.stroke.color.a() > 0 && rect.rect.intersects(field),
_ => false,
})
.count();
assert_eq!(outlines, 0, "the status bar's Zoom field draws no outline");
}
#[test]
fn with_no_document_the_artboard_navigator_shows_a_dash() {
let app = VectorcraftApp::new(vectorcraft_engine::Session::new(), Default::default());
+1 -11
View File
@@ -3292,13 +3292,6 @@ struct StyleFace {
/// The Style field of the settled bar. `textures` holds the textures the frames uploaded since the fixture began
/// recording; the uploads of these frames are applied to it.
fn style_face(bar: &mut Shown, textures: &mut std::collections::HashMap<egui::TextureId, egui::ColorImage>) -> StyleFace {
fn flat(shape: egui::Shape, out: &mut Vec<egui::Shape>) {
if let egui::Shape::Vec(shapes) = shape {
shapes.into_iter().for_each(|s| flat(s, out));
} else {
out.push(shape);
}
}
let field = bar.settle().named("Graphic Styles").rect;
let mut paint = bar.fixture.take_paint().expect("the fixture records what it paints");
for (id, delta) in paint.textures_delta.set.iter().flat_map(|(id, deltas)| deltas.iter().map(move |delta| (id, delta))) {
@@ -3320,10 +3313,7 @@ fn style_face(bar: &mut Shown, textures: &mut std::collections::HashMap<egui::Te
}
// The uploads are applied to `textures`, not to a renderer.
paint.textures_delta.clear();
let mut shapes = Vec::new();
for clipped in std::mem::take(&mut paint.shapes) {
flat(clipped.shape, &mut shapes);
}
let shapes = crate::tests_labels::flat_painted_shapes(&paint.shapes);
let mut face = StyleFace { field, pictures: Vec::new(), fills: Vec::new() };
for shape in shapes {
match shape {
+17 -8
View File
@@ -32,6 +32,7 @@ use craft::ui::buttons::{Button, IconButton};
use craft::ui::contract::{Bind, PopupKind, Props as _, Show as _, ShowContainer as _, Trigger};
use craft::ui::dialog::DialogResult;
use craft::ui::display::{Divider, Shade, Text};
use craft::ui::layout_components::Row;
use craft::ui::menu::{Menu, MenuItem};
use craft::ui::patterns::form_dialogs::{
DialogFields, FieldValue, HostedListManager, HostedParamDialog, ListManagerAction, ListManagerChoice, ListManagerEntry, ListManagerWords, Param,
@@ -895,21 +896,29 @@ fn command_button(app: &VectorcraftApp, ui: &mut egui::Ui, bar: &str, look: &Com
(Some(t), Some(keys)) => format!("{} {keys}", t.name),
(Some(t), None) => t.name.clone(),
};
let button = match &look.text {
Some(t) => Button::command(t.command.clone()).label(look.said()),
None => Button::new(look.said()).enabled(false),
};
// The face paints the label; the accessible name stays `said`.
let button = if look.own.is_some() { button.painted(look.label().to_string()) } else { button };
let response = button.tooltip(tip).show(ui).response;
let mut response = None;
// A menu owned by a dimmed button takes no clicks, so the row around the button owns the menu and a right
// click on the button opens it: Rename Button… and the rest work while the command is dimmed.
let row = Row::new()
.show(ui, |ui, _| {
let button = match &look.text {
Some(t) => Button::command(t.command.clone()).label(look.said()),
None => Button::new(look.said()).enabled(false),
};
// The face paints the label; the accessible name stays `said`.
let button = if look.own.is_some() { button.painted(look.label().to_string()) } else { button };
response = Some(button.tooltip(tip.clone()).show(ui).response);
})
.output;
if measuring {
return;
}
let Some(response) = response else { return };
let (i, n) = place;
let moved = |at: usize| CommandRef::with_params("toolbar.addCommand", json!({ "command": look.id, "toolbar": bar, "at": at }));
let removed = CommandRef::with_params("toolbar.removeCommand", json!({ "command": look.id, "toolbar": bar }));
let renamed = CommandRef::with_params("toolbar.renameCommand", json!({ "command": look.id, "toolbar": bar }));
Menu::context(look.name().to_string(), &response).show(ui, |ui, _| {
Menu::context(look.name().to_string(), &row).opened_by(&response, Trigger::Context).show(ui, |ui, _| {
MenuItem::command(moved(i.saturating_sub(1))).label(tl!("Move Up")).enabled(i > 0).show(ui);
MenuItem::command(moved(i + 1)).label(tl!("Move Down")).enabled(i + 1 < n).show(ui);
MenuItem::command(renamed.clone()).label(tl!("Rename Button…")).show(ui);
@@ -1126,7 +1126,15 @@ macro_rules! style_dialog {
}
fn show(&mut self, ui: &mut egui::Ui, stack: &craft::ui::dialog::DialogStack) -> Option<craft::ui::dialog::DialogResult<Self::Result>> {
craft::ui::dialog::StackDialog::show(&mut self.inner, ui, stack)
// A measuring run can end without running the dialog's body and then sets the first tab as the
// shown one. The dialog keeps the tab that was shown before that run.
let measuring = craft::ui::runtime::measure::active(ui.ctx());
let tab = self.inner.tab();
let shown = craft::ui::dialog::StackDialog::show(&mut self.inner, ui, stack);
if measuring && self.inner.tab() != tab {
let _ = craft::ui::dialog::StackDialog::set_json_field(&mut self.inner, ui.ctx(), "tab", serde_json::json!(tab));
}
shown
}
fn key(&self) -> Option<&str> {
+4 -9
View File
@@ -1084,16 +1084,13 @@ mod tests {
/// did; before, it showed the words, and Landscape, cut short, ran into Artboards.
#[test]
fn orientation_shows_two_page_icons_beside_artboards() {
fn texts(s: &egui::Shape, out: &mut Vec<(String, egui::Pos2)>) {
match s {
egui::Shape::Text(t) => out.push((t.galley.text().to_string(), t.visual_bounding_rect().center())),
egui::Shape::Vec(v) => v.iter().for_each(|s| texts(s, out)),
_ => {}
}
}
let mut app = app();
open(&mut app);
let out = laid_out(&mut app);
let drawn: Vec<(String, egui::Pos2)> = crate::tests_labels::text_shapes(&out)
.into_iter()
.map(|(t, transform)| (t.galley.text().to_string(), (transform * t.visual_bounding_rect()).center()))
.collect();
let nodes = out.platform_output.accesskit_update.map(|u| u.nodes).unwrap_or_default();
let bounds = |label: &str, role: egui::accesskit::Role| {
let (_, n) = nodes.iter().find(|(_, n)| n.label() == Some(label) && n.role() == role).unwrap_or_else(|| panic!("no {role:?} {label}"));
@@ -1104,8 +1101,6 @@ mod tests {
// Artboards follows Landscape on its line, or wraps below it when the column has no room for it.
assert!(landscape.x1 <= artboards.x0 || landscape.y1 <= artboards.y0, "Landscape {landscape:?} stays clear of Artboards {artboards:?}");
let group = bounds("Orientation", egui::accesskit::Role::RadioGroup);
let mut drawn = Vec::new();
out.shapes.iter().for_each(|s| texts(&s.shape, &mut drawn));
let inside: Vec<_> = drawn
.iter()
.filter(|(_, at)| (group.x0..=group.x1).contains(&f64::from(at.x)) && (group.y0..=group.y1).contains(&f64::from(at.y)))
@@ -609,7 +609,9 @@ fn tabs_buttons(unit: Unit) -> Param {
let (rows, _, _) = tab_rows(fields);
let can_add = new_tab_position(&rows, unit).is_some();
let (mut add, mut delete, mut clear) = (false, false, false);
let line = Row::new().wrap(true).show(ui, |ui, _| {
// Wrap against the form's offered width rather than measuring an intrinsic-width
// strip that may be clipped by the property group on small screens.
let line = Row::new().fill_width().wrap(true).show(ui, |ui, _| {
add = clicked(&Button::new(tl!("Add")).enabled(can_add).show(ui));
delete = clicked(&Button::new(tl!("Delete Tab")).enabled(!rows.is_empty()).show(ui));
clear = clicked(&Button::new(tl!("Clear All Tabs")).enabled(!rows.is_empty()).show(ui));
@@ -574,11 +574,17 @@ fn clear_all_tabs_can_be_clicked_in_a_narrow_viewport() {
for _ in 0..5 {
frame(&mut app, vec![]);
}
// The dialog's first frames measure it before its body runs; the Tabs pane picked before them stays shown.
assert_eq!(fields(&app)["tab"], json!("tabs"), "the dialog left Tabs in its first frames at {width} points");
let out = frame(&mut app, vec![]);
let nodes = out.platform_output.accesskit_update.unwrap().nodes;
let clear = nodes.iter().find(|(_, node)| node.role() == Role::Button && node.label() == Some("Clear All Tabs")).unwrap();
let clear = nodes
.iter()
.find(|(_, node)| node.role() == Role::Button && node.label() == Some("Clear All Tabs"))
.unwrap_or_else(|| panic!("Clear All Tabs is missing at {width} points"));
let bounds = clear.1.bounds().unwrap();
let at = pos2(((bounds.x0 + bounds.x1) * 0.5) as f32, ((bounds.y0 + bounds.y1) * 0.5) as f32);
assert!(screen.contains(at), "Clear All Tabs at {bounds:?} is outside the {width}-point viewport");
assert_eq!(tab_rows(&app).len(), 2);
frame(&mut app, vec![Event::PointerMoved(at)]);
@@ -532,14 +532,15 @@ fn labelled_controls(app: &mut VectorcraftApp) -> Vec<(String, egui::Rect)> {
.collect()
}
/// The bounds of the control labelled `label` in `controls`, with or without a final colon.
/// The bounds of the control labelled `label` in `controls`, with or without a final colon. A check box and the text of
/// its label are two nodes with the same name side by side, so the bounds take in every node so named on the first
/// one's line.
fn control(controls: &[(String, egui::Rect)], label: &str) -> egui::Rect {
let bare = |l: &str| l.trim_end_matches(':').to_string();
controls
.iter()
.find(|(l, _)| bare(l) == bare(label))
.map(|(_, r)| *r)
.unwrap_or_else(|| panic!("no control labelled {label:?} in {:?}", controls.iter().map(|(l, _)| l).collect::<Vec<_>>()))
let named: Vec<egui::Rect> = controls.iter().filter(|(l, _)| bare(l) == bare(label)).map(|(_, r)| *r).collect();
let first =
*named.first().unwrap_or_else(|| panic!("no control labelled {label:?} in {:?}", controls.iter().map(|(l, _)| l).collect::<Vec<_>>()));
named.iter().filter(|r| r.top() < first.bottom() && first.top() < r.bottom()).fold(first, |all, r| all.union(*r))
}
/// The All and Range radios stand right under the artboard check box, and EPS's Transparent and Opaque radios right
+12 -18
View File
@@ -295,18 +295,15 @@ fn checked_artboards_read_as_a_range() {
/// The rect the frame `shapes` paint `texture` over; `None` when none paints it.
fn painted(shapes: &[egui::epaint::ClippedShape], texture: egui::TextureId) -> Option<egui::Rect> {
fn walk(shape: &egui::Shape, texture: egui::TextureId, out: &mut Option<egui::Rect>) {
match shape {
egui::Shape::Vec(all) => all.iter().for_each(|s| walk(s, texture, out)),
egui::Shape::Mesh(mesh) if mesh.texture_id == texture => {
let at = mesh.calc_bounds();
*out = Some(out.map_or(at, |r| r.union(at)));
}
_ => {}
let mut out: Option<egui::Rect> = None;
for (shape, transform, _) in crate::tests_labels::painted_shapes(shapes) {
if let egui::Shape::Mesh(mesh) = shape
&& mesh.texture_id == texture
{
let at = transform * mesh.calc_bounds();
out = Some(out.map_or(at, |r| r.union(at)));
}
}
let mut out = None;
shapes.iter().for_each(|clipped| walk(&clipped.shape, texture, &mut out));
out
}
@@ -943,14 +940,11 @@ fn a_preset_export_reopens_on_its_rows() {
}
fn screen_text_at(out: &egui::FullOutput, label: &str) -> egui::Pos2 {
fn find(shape: &egui::Shape, label: &str) -> Option<egui::Pos2> {
match shape {
egui::Shape::Text(t) if t.galley.text().trim() == label => Some(t.visual_bounding_rect().center()),
egui::Shape::Vec(v) => v.iter().find_map(|s| find(s, label)),
_ => None,
}
}
out.shapes.iter().find_map(|s| find(&s.shape, label)).unwrap_or_else(|| panic!("missing {label}: {}", crate::tests_labels::shapes_text(out)))
crate::tests_labels::text_shapes(out)
.into_iter()
.find(|(t, _)| t.galley.text().trim() == label)
.map(|(t, transform)| (transform * t.visual_bounding_rect()).center())
.unwrap_or_else(|| panic!("missing {label}: {}", crate::tests_labels::shapes_text(out)))
}
/// First-directory entries of the big-endian TIFF chosen below: tag, type, count, inline value.
@@ -72,16 +72,6 @@ fn frame_texts(app: &VectorcraftApp, ctx: &egui::Context) -> Vec<String> {
/// The texts the dialogs paint with where each is drawn and its font, once they have faded in.
fn frame_runs(app: &VectorcraftApp, ctx: &egui::Context) -> Vec<(String, egui::Rect, Option<egui::FontId>)> {
fn walk(s: &egui::Shape, out: &mut Vec<(String, egui::Rect, Option<egui::FontId>)>) {
match s {
egui::Shape::Text(t) => {
let font = t.galley.job.sections.first().map(|section| section.format.font_id.clone());
out.push((t.galley.text().to_string(), t.galley.rect.translate(t.pos.to_vec2()), font));
}
egui::Shape::Vec(v) => v.iter().for_each(|s| walk(s, out)),
_ => {}
}
}
let dialogs = app.dialogs().expect("a window");
let screen = egui::Rect::from_min_size(egui::Pos2::ZERO, egui::vec2(1200.0, 1200.0));
let mut texts = vec![];
@@ -89,8 +79,13 @@ fn frame_runs(app: &VectorcraftApp, ctx: &egui::Context) -> Vec<(String, egui::R
let raw = egui::RawInput { screen_rect: Some(screen), time: Some(f64::from(k) * 0.25), ..Default::default() };
let mut out = ctx.run_ui(raw, |ui| dialogs.with(|host| host.run(ui)));
out.textures_delta.clear();
texts.clear();
out.shapes.iter().for_each(|c| walk(&c.shape, &mut texts));
texts = crate::tests_labels::text_shapes(&out)
.into_iter()
.map(|(t, transform)| {
let font = t.galley.job.sections.first().map(|section| section.format.font_id.clone());
(t.galley.text().to_string(), transform * t.galley.rect.translate(t.pos.to_vec2()), font)
})
.collect();
}
texts
}
+2 -10
View File
@@ -15,18 +15,10 @@ fn app_with(n: usize) -> VectorcraftApp {
/// One headless frame of the canvas panel's body (the tabs and the canvas or panes) on a
/// 1200 × 800 window, then the floating document windows, which egui draws inside the window, run
/// as the hosts run a frame → the shapes it drew, `Shape::Vec`s flattened.
/// as the hosts run a frame → the shapes it drew, `Shape::Vec`s and retained paint chunks flattened.
fn frame(app: &mut VectorcraftApp, ctx: &egui::Context, events: Vec<egui::Event>) -> Vec<Shape> {
fn flat(s: Shape, out: &mut Vec<Shape>) {
match s {
Shape::Vec(v) => v.into_iter().for_each(|s| flat(s, out)),
s => out.push(s),
}
}
let out = run_frame(app, ctx, events);
let mut shapes = vec![];
out.shapes.into_iter().for_each(|c| flat(c.shape, &mut shapes));
shapes
crate::tests_labels::flat_painted_shapes(&out.shapes)
}
/// One headless frame of the canvas panel's body and the floating document windows on a 1200 ×
+3 -5
View File
@@ -132,11 +132,9 @@ mod tests {
let mut out = ctx.run_ui(egui::RawInput::default(), |ui| super::show(app, ui));
out.textures_delta.clear();
let mut texts = String::new();
for shape in out.shapes {
if let egui::epaint::Shape::Text(t) = shape.shape {
texts.push_str(t.galley.text());
texts.push('\n');
}
for (t, _) in crate::tests_labels::text_shapes(&out) {
texts.push_str(t.galley.text());
texts.push('\n');
}
texts
}
+1 -1
View File
@@ -738,7 +738,7 @@ fn run_ui_part6(app: &mut VectorcraftApp, id: &str, p: &Value) -> Option<Result<
// Tab: hide the panels, the toolbars and the Control bar, or show what the last Tab
// hid; the window's shell applies it in its next pass.
Some(ctx) => {
let hidden = craft::ui::shell::chrome_state(&ctx, egui::ViewportId::ROOT).hidden;
let hidden = crate::panel_docking::tab_hidden(app);
request_chrome_toggle(&ctx, egui::ViewportId::ROOT, if hidden { ChromeToggle::ShowPanels } else { ChromeToggle::Panels });
Ok(json!(hidden))
}
+20 -13
View File
@@ -262,6 +262,21 @@ fn help_f1_opens_discover_without_a_document() {
assert!(crate::panel_docking::showing(&app.ui, "discover"));
}
/// In Standard Screen Mode Tab hides the panels, the toolbars and the Control bar, and the next Tab
/// shows them again.
#[test]
fn a_second_tab_shows_what_the_first_hid() {
let mut app = VectorcraftApp::new(vectorcraft_engine::Session::new(), crate::Services::default());
let ctx = crate::testing::ui_context();
app.ui_ctx = Some(ctx.clone());
assert_eq!(app.run("window.dock", json!({})).unwrap(), json!(false));
app_frame(&mut app, &ctx, vec![]);
assert!(crate::panel_docking::tab_hidden(&app));
assert_eq!(app.run("window.dock", json!({})).unwrap(), json!(true), "the second Tab shows what the first hid");
app_frame(&mut app, &ctx, vec![]);
assert!(!crate::panel_docking::tab_hidden(&app));
}
/// With the toolbars hidden by Tab, choosing a tool in Help, or a tool's link in a tutorial Help
/// shows, marks nothing and the status bar says why.
#[test]
@@ -273,18 +288,10 @@ fn discover_says_why_a_tool_cannot_be_marked() {
}
fn texts(ctx: &egui::Context, app: &mut VectorcraftApp, events: Vec<egui::Event>) -> Vec<(String, egui::Rect)> {
let out = pass(ctx, app, events);
fn collect(s: &egui::Shape, out: &mut Vec<(String, egui::Rect)>) {
match s {
egui::Shape::Text(t) => out.push((t.galley.text().to_string(), t.visual_bounding_rect())),
egui::Shape::Vec(v) => v.iter().for_each(|s| collect(s, out)),
_ => {}
}
}
let mut texts = vec![];
for c in &out.shapes {
collect(&c.shape, &mut texts);
}
texts
crate::tests_labels::text_shapes(&out)
.into_iter()
.map(|(t, transform)| (t.galley.text().to_string(), transform * t.visual_bounding_rect()))
.collect()
}
fn click(ctx: &egui::Context, app: &mut VectorcraftApp, label: &str) {
texts(ctx, app, vec![]);
@@ -314,7 +321,7 @@ fn discover_says_why_a_tool_cannot_be_marked() {
// Tab hides the toolbars in the shell's next pass.
app.run("window.dock", json!({})).unwrap();
app_frame(&mut app, &ctx, vec![]);
assert!(craft::ui::shell::chrome_state(&ctx, egui::ViewportId::ROOT).hidden);
assert!(crate::panel_docking::tab_hidden(&app));
let reason = app.run("learn.locateTool", json!({"tool": "rectangle"})).unwrap()["reason"].as_str().unwrap().to_string();
let found = app.run("help.discover.search", json!({"query": "rectangle"})).unwrap();
+3 -5
View File
@@ -522,11 +522,9 @@ fn progress(app: &mut VectorcraftApp, ctx: &egui::Context) -> String {
let mut out = ctx.run_ui(egui::RawInput::default(), |ui| crate::export_progress::show(app, ui));
out.textures_delta.clear();
let mut texts = String::new();
for shape in out.shapes {
if let egui::epaint::Shape::Text(t) = shape.shape {
texts.push_str(t.galley.text());
texts.push('\n');
}
for (t, _) in crate::tests_labels::text_shapes(&out) {
texts.push_str(t.galley.text());
texts.push('\n');
}
texts
}
+1 -1
View File
@@ -534,7 +534,7 @@ fn tool_home(app: &VectorcraftApp, tool: &str) -> String {
None => name.to_string(),
};
// Tab hides every toolbar with the panels, as the main window's shell left it.
let tab_hidden = app.ui_ctx.as_ref().is_some_and(|ctx| craft::ui::shell::chrome_state(ctx, egui::ViewportId::ROOT).hidden);
let tab_hidden = crate::panel_docking::tab_hidden(app);
let toolbars_shown = app.ui.screen_mode < 3 && !tab_hidden;
let main = crate::toolbar::slots(app).into_iter().map(|(_, s)| s).find(|s| s.contains(&tool));
// A group torn off into a strip shows each of its tools on its own button.
+6 -3
View File
@@ -226,20 +226,23 @@ fn settle(app: &mut VectorcraftApp) {
/// last pass left it, and Presentation Mode is off? With no window yet nothing hides them.
pub(crate) fn panels_shown(app: &VectorcraftApp) -> bool {
let chrome = app.ui_ctx.as_ref().map(|ctx| chrome_state(ctx, egui::ViewportId::ROOT)).unwrap_or_default();
!chrome.hidden && !chrome.panels_hidden && app.ui.screen_mode < 3
!chrome.hidden && !chrome.chrome_hidden && !chrome.panels_hidden && app.ui.screen_mode < 3
}
/// Whether Tab hides the main window's panels, toolbars and Control bar (Shift+Tab leaves the
/// toolbars).
pub(crate) fn tab_hidden(app: &VectorcraftApp) -> bool {
app.ui_ctx.as_ref().is_some_and(|ctx| chrome_state(ctx, egui::ViewportId::ROOT).hidden)
app.ui_ctx.as_ref().is_some_and(|ctx| {
let chrome = chrome_state(ctx, egui::ViewportId::ROOT);
chrome.hidden || chrome.chrome_hidden
})
}
/// Ends Tab and Shift+Tab hiding the panels in the main window; nothing while they show.
pub(crate) fn show_panels(app: &VectorcraftApp) {
let Some(ctx) = &app.ui_ctx else { return };
let chrome = chrome_state(ctx, egui::ViewportId::ROOT);
if chrome.hidden || chrome.panels_hidden {
if chrome.hidden || chrome.chrome_hidden || chrome.panels_hidden {
request_chrome_toggle(ctx, egui::ViewportId::ROOT, ChromeToggle::ShowPanels);
}
}
@@ -113,15 +113,10 @@ impl Host {
};
let mut full = ctx.run_ui(input, |ui| (viewport.viewport_ui_cb)(ui));
full.textures_delta.clear();
fn texts(s: &egui::Shape, out: &mut Vec<(String, Rect)>) {
match s {
egui::Shape::Text(t) => out.push((t.galley.text().to_string(), t.visual_bounding_rect())),
egui::Shape::Vec(v) => v.iter().for_each(|s| texts(s, out)),
_ => {}
}
}
let mut shown = Vec::new();
full.shapes.iter().for_each(|c| texts(&c.shape, &mut shown));
let shown: Vec<(String, Rect)> = crate::tests_labels::text_shapes(&full)
.into_iter()
.map(|(t, transform)| (t.galley.text().to_string(), transform * t.visual_bounding_rect()))
.collect();
let nodes = full.platform_output.accesskit_update.as_ref().map_or_else(Vec::new, |update| {
let rect = |b: egui::accesskit::Rect| Rect::from_min_max(pos2(b.x0 as f32, b.y0 as f32), pos2(b.x1 as f32, b.y1 as f32));
update.nodes.iter().filter_map(|(_, node)| Some((node.label()?.to_string(), rect(node.bounds()?)))).collect()
+4 -5
View File
@@ -1080,11 +1080,10 @@ fn footer_strip_shows_no_rows(h: &mut Harness, case: &str) {
egui::Shape::Mesh(m) => m.vertices.iter().all(|v| v.color.a() == 0),
_ => false,
};
let showing: Vec<Rect> = h
.shapes
.iter()
.filter(|c| !transparent(&c.shape))
.map(|c| (c.shape.visual_bounding_rect(), c.clip_rect))
let showing: Vec<Rect> = crate::tests_labels::painted_shapes(&h.shapes)
.into_iter()
.filter(|(shape, ..)| !transparent(shape))
.map(|(shape, transform, clip)| (transform * shape.visual_bounding_rect(), clip))
.filter(|(bounds, clip)| {
let seen = clip.intersect(*bounds).intersect(strip);
bounds.height() < 60.0 && bounds.top() < footer.top() && seen.is_positive() && seen.height() > 0.5
@@ -860,7 +860,8 @@ fn create_strokes_traces_again_and_keeps_one_kind_on() {
for s in ["Create:", "Fills", "Strokes", "Stroke"] {
assert!(panel.shows(s), "{s}");
}
assert_eq!(panel.value("Stroke").as_deref().and_then(number), Some(10.0));
// The dimmed row holds a slider and a number box under one name: read the slider.
assert_eq!(panel.value_role("Stroke", craft::ui::contract::Role::SLIDER).as_deref().and_then(number), Some(10.0));
// Fills alone can't be turned off.
panel.click("Fills");
assert_eq!(create(&panel), (Some(json!(true)), Some(json!(false))));
@@ -767,14 +767,12 @@ fn built_in_library_swatches_are_listed_in_the_ui_language() {
let panel = shown(&app);
app.run("ui.libraryPanel", json!({"panel": panel, "view": "smallList"})).unwrap();
let draw = |app: &mut VectorcraftApp, ui: &mut Ui| show(app, ui, &panel);
let mut texts = vec![];
for _ in 0..2 {
let out = draw_frame(&mut app, &ctx, &draw, vec![]);
texts =
out.shapes.iter().filter_map(|c| if let egui::Shape::Text(t) = &c.shape { Some(t.galley.text().to_string()) } else { None }).collect();
}
assert!(texts.iter().any(|t| t == "Argile") && texts.iter().any(|t| t == "Argile 1"), "{texts:?}");
assert!(!texts.iter().any(|t| t == "Clay" || t == "Clay 1"), "{texts:?}");
draw_frame(&mut app, &ctx, &draw, vec![]);
let out = draw_frame(&mut app, &ctx, &draw, vec![]);
let painted = crate::tests_labels::shapes_text(&out);
let texts: Vec<_> = painted.lines().collect();
assert!(texts.contains(&"Argile") && texts.contains(&"Argile 1"), "{texts:?}");
assert!(!texts.contains(&"Clay") && !texts.contains(&"Clay 1"), "{texts:?}");
let lib = SwatchLibraries::get(&app, "earth-tones").unwrap().1;
// The browser's Find matches the shown name and the stored one.
let rows = SwatchLibraries::rows(&lib, "earth-tones");
+4 -12
View File
@@ -43,18 +43,10 @@ pub(super) fn frame_raw(
) -> Vec<(String, egui::Rect)> {
let mut out = ctx.run_ui(raw, |ui| f(app, ui));
out.textures_delta.clear();
fn collect(s: &egui::Shape, out: &mut Vec<(String, egui::Rect)>) {
match s {
egui::Shape::Text(t) => out.push((t.galley.text().to_string(), t.visual_bounding_rect())),
egui::Shape::Vec(v) => v.iter().for_each(|s| collect(s, out)),
_ => {}
}
}
let mut texts = vec![];
for c in &out.shapes {
collect(&c.shape, &mut texts);
}
texts
crate::tests_labels::text_shapes(&out)
.into_iter()
.map(|(t, transform)| (t.galley.text().to_string(), transform * t.visual_bounding_rect()))
.collect()
}
/// Click at `pos` over three frames of `f` (hover, press, release).
@@ -20,20 +20,11 @@ fn app() -> VectorcraftApp {
/// One frame of `draw` with `events`; the texts it painted.
fn frame(ctx: &egui::Context, events: Vec<Event>, time: f64, mut draw: impl FnMut(&mut egui::Ui)) -> Vec<String> {
fn texts(s: &egui::Shape, out: &mut Vec<String>) {
match s {
egui::Shape::Text(t) => out.push(t.galley.text().to_string()),
egui::Shape::Vec(v) => v.iter().for_each(|s| texts(s, out)),
_ => {}
}
}
let screen_rect = Some(Rect::from_min_size(Pos2::ZERO, vec2(1200.0, 800.0)));
let input = egui::RawInput { events, time: Some(time), screen_rect, ..Default::default() };
let mut out = ctx.run_ui(input, &mut draw);
out.textures_delta.clear();
let mut v = vec![];
out.shapes.iter().for_each(|c| texts(&c.shape, &mut v));
v
crate::tests_labels::text_shapes(&out).into_iter().map(|(t, _)| t.galley.text().to_string()).collect()
}
fn undo_len(app: &VectorcraftApp) -> usize {
@@ -25,21 +25,12 @@ fn app() -> VectorcraftApp {
/// One frame of `draw` with `events` and `modifiers` held; the texts it painted.
fn frame(ctx: &egui::Context, events: Vec<Event>, modifiers: Modifiers, time: f64, mut draw: impl FnMut(&mut egui::Ui)) -> Vec<String> {
fn texts(s: &egui::Shape, out: &mut Vec<String>) {
match s {
egui::Shape::Text(t) => out.push(t.galley.text().to_string()),
egui::Shape::Vec(v) => v.iter().for_each(|s| texts(s, out)),
_ => {}
}
}
let screen_rect = Some(Rect::from_min_size(Pos2::ZERO, vec2(1200.0, 800.0)));
let events = std::iter::once(Event::ModifiersChanged(modifiers)).chain(events).collect();
let input = egui::RawInput { events, time: Some(time), screen_rect, ..Default::default() };
let mut out = ctx.run_ui(input, &mut draw);
out.textures_delta.clear();
let mut v = vec![];
out.shapes.iter().for_each(|c| texts(&c.shape, &mut v));
v
crate::tests_labels::text_shapes(&out).into_iter().map(|(t, _)| t.galley.text().to_string()).collect()
}
fn undo_len(app: &VectorcraftApp) -> usize {
@@ -21,20 +21,11 @@ fn app() -> VectorcraftApp {
/// One frame of `draw` with `events`; the texts it painted.
fn frame(ctx: &egui::Context, events: Vec<Event>, time: f64, mut draw: impl FnMut(&mut egui::Ui)) -> Vec<String> {
fn texts(s: &egui::Shape, out: &mut Vec<String>) {
match s {
egui::Shape::Text(t) => out.push(t.galley.text().to_string()),
egui::Shape::Vec(v) => v.iter().for_each(|s| texts(s, out)),
_ => {}
}
}
let screen_rect = Some(Rect::from_min_size(Pos2::ZERO, vec2(1200.0, 800.0)));
let input = egui::RawInput { events, time: Some(time), screen_rect, ..Default::default() };
let mut out = ctx.run_ui(input, &mut draw);
out.textures_delta.clear();
let mut v = vec![];
out.shapes.iter().for_each(|c| texts(&c.shape, &mut v));
v
crate::tests_labels::text_shapes(&out).into_iter().map(|(t, _)| t.galley.text().to_string()).collect()
}
fn undo_len(app: &VectorcraftApp) -> usize {
+3 -5
View File
@@ -1951,11 +1951,9 @@ fn progress(app: &mut VectorcraftApp, ctx: &egui::Context) -> String {
let mut out = ctx.run_ui(egui::RawInput::default(), |ui| crate::export_progress::show(app, ui));
out.textures_delta.clear();
let mut texts = String::new();
for shape in out.shapes {
if let egui::epaint::Shape::Text(t) = shape.shape {
texts.push_str(t.galley.text());
texts.push('\n');
}
for (t, _) in crate::tests_labels::text_shapes(&out) {
texts.push_str(t.galley.text());
texts.push('\n');
}
texts
}
+1 -1
View File
@@ -1265,7 +1265,7 @@ fn access_frame(a: &mut VectorcraftApp, events: Vec<egui::Event>) -> (Vec<(Strin
script_access::show(a, &mut w.script_access, ui);
a.prefs = Some(w);
});
(crate::tests_removeanchors::shapes_text(&out.shapes.iter().map(|c| c.shape.clone()).collect::<Vec<_>>()), out)
(crate::tests_removeanchors::shapes_text(&crate::tests_labels::flat_painted_shapes(&out.shapes)), out)
}
/// The texts of General › Script File Access after the frames it lays itself out in.
+1 -10
View File
@@ -362,19 +362,10 @@ fn quitting_waits_for_background_saves() {
/// The status bar's texts in one headless frame.
pub(super) fn status_bar_texts(app: &mut VectorcraftApp) -> Vec<String> {
fn texts(s: &egui::Shape, out: &mut Vec<String>) {
match s {
egui::Shape::Text(t) => out.push(t.galley.text().to_string()),
egui::Shape::Vec(v) => v.iter().for_each(|s| texts(s, out)),
_ => {}
}
}
let ctx = crate::testing::ui_context();
let mut out = ctx.run_ui(egui::RawInput::default(), |ui| crate::chrome::status_bar(app, ui));
out.textures_delta.clear();
let mut v = vec![];
out.shapes.iter().for_each(|c| texts(&c.shape, &mut v));
v
crate::tests_labels::text_shapes(&out).into_iter().map(|(t, _)| t.galley.text().to_string()).collect()
}
#[test]
+4 -10
View File
@@ -48,21 +48,15 @@ fn step(h: &mut Window) {
/// The texts the window paints with `command` run, each with where it was drawn, a field label's colon left off.
fn texts(command: &str, params: Value) -> Vec<(String, Rect)> {
fn collect(s: &egui::Shape, out: &mut Vec<(String, Rect)>) {
match s {
egui::Shape::Text(t) => out.push((t.galley.text().trim().trim_end_matches(':').to_owned(), t.visual_bounding_rect())),
egui::Shape::Vec(v) => v.iter().for_each(|s| collect(s, out)),
_ => {}
}
}
let mut h = window();
crate::menus::invoke(h.state_mut(), command, params);
for _ in 0..6 {
step(&mut h);
}
let mut out = vec![];
h.output().shapes.iter().for_each(|c| collect(&c.shape, &mut out));
out
crate::tests_labels::text_shapes(h.output())
.into_iter()
.map(|(t, transform)| (t.galley.text().trim().trim_end_matches(':').to_owned(), transform * t.visual_bounding_rect()))
.collect()
}
/// Where each painted `label` was drawn, top to bottom.
+4 -9
View File
@@ -37,15 +37,10 @@ fn frame(app: &mut VectorcraftApp, ctx: &egui::Context, time: f64, events: Vec<E
out.textures_delta.clear();
// A tab's title starts with its document's name (an inactive tab shows the name alone).
let names: Vec<String> = app.session.documents().iter().map(|d| d.title()).collect();
let mut titles: Vec<_> = out
.shapes
.iter()
.filter_map(|s| match &s.shape {
egui::Shape::Text(t) if names.iter().any(|n| t.galley.text().starts_with(n.as_str())) => {
Some(egui::Rect::from_min_size(t.pos, t.galley.size()))
}
_ => None,
})
let mut titles: Vec<_> = crate::tests_labels::text_shapes(&out)
.into_iter()
.filter(|(t, _)| names.iter().any(|n| t.galley.text().starts_with(n.as_str())))
.map(|(t, transform)| transform * egui::Rect::from_min_size(t.pos, t.galley.size()))
.collect();
titles.sort_by(|a, b| a.left().total_cmp(&b.left()));
titles
+56 -11
View File
@@ -25,21 +25,66 @@ pub(crate) fn painted_text(app: &mut VectorcraftApp, mut f: impl FnMut(&mut Vect
shapes_text(&out)
}
/// Every string a frame painted, one per line.
pub(crate) fn shapes_text(out: &egui::FullOutput) -> String {
fn collect(s: &Shape, out: &mut String) {
match s {
Shape::Text(t) => {
out.push_str(t.galley.text());
out.push('\n');
}
Shape::Vec(v) => v.iter().for_each(|s| collect(s, out)),
/// Text shapes in paint order, with their composed window transform.
pub(crate) fn text_shapes(out: &egui::FullOutput) -> Vec<(&egui::epaint::TextShape, egui::emath::TSTransform)> {
use egui::emath::TSTransform;
fn collect<'a>(shape: &'a Shape, transform: TSTransform, out: &mut Vec<(&'a egui::epaint::TextShape, TSTransform)>) {
match shape {
Shape::Text(text) => out.push((text, transform)),
Shape::Vec(shapes) => shapes.iter().for_each(|shape| collect(shape, transform, out)),
Shape::PaintChunk(shapes) => shapes.iter().for_each(|clipped| {
collect(&clipped.shape, transform * clipped.transform_after_tessellation, out);
}),
_ => {}
}
}
let mut text = Vec::new();
for clipped in &out.shapes {
collect(&clipped.shape, clipped.transform_after_tessellation, &mut text);
}
text
}
/// Every painted shape other than `Shape::Vec` and `Shape::PaintChunk` (whose members it lists
/// instead), in paint order, with its composed window transform and the clip rectangle it is drawn in.
pub(crate) fn painted_shapes(clipped: &[egui::epaint::ClippedShape]) -> Vec<(&Shape, egui::emath::TSTransform, egui::Rect)> {
use egui::emath::TSTransform;
fn collect<'a>(shape: &'a Shape, transform: TSTransform, clip: egui::Rect, out: &mut Vec<(&'a Shape, TSTransform, egui::Rect)>) {
match shape {
Shape::Vec(shapes) => shapes.iter().for_each(|shape| collect(shape, transform, clip, out)),
Shape::PaintChunk(shapes) => shapes.iter().for_each(|clipped| {
collect(&clipped.shape, transform * clipped.transform_after_tessellation, clip.intersect(transform * clipped.clip_rect), out);
}),
shape => out.push((shape, transform, clip)),
}
}
let mut shapes = Vec::new();
for clipped in clipped {
collect(&clipped.shape, clipped.transform_after_tessellation, clipped.clip_rect, &mut shapes);
}
shapes
}
/// [`painted_shapes`] as owned shapes, each moved by its transform.
pub(crate) fn flat_painted_shapes(clipped: &[egui::epaint::ClippedShape]) -> Vec<Shape> {
painted_shapes(clipped)
.into_iter()
.map(|(shape, transform, _)| {
let mut shape = shape.clone();
shape.transform(transform);
shape
})
.collect()
}
/// Every string a frame painted, one per line.
pub(crate) fn shapes_text(out: &egui::FullOutput) -> String {
let mut text = String::new();
for c in &out.shapes {
collect(&c.shape, &mut text);
for (shape, _) in text_shapes(out) {
text.push_str(shape.galley.text());
text.push('\n');
}
text
}
+2 -8
View File
@@ -397,14 +397,8 @@ impl Panel {
let images = paint.textures_delta.set.iter().flat_map(|(id, deltas)| deltas.iter().map(move |delta| (*id, delta.image.clone()))).collect();
// The test reads the images; no renderer applies them.
paint.textures_delta.clear();
let mut shapes = Vec::new();
let mut open: Vec<egui::Shape> = paint.shapes.into_iter().map(|clipped| clipped.shape).collect();
while let Some(shape) = open.pop() {
match shape {
egui::Shape::Vec(nested) => open.extend(nested),
shape => shapes.push(shape),
}
}
// Last painted first.
let shapes = crate::tests_labels::flat_painted_shapes(&paint.shapes).into_iter().rev().collect();
(shapes, images)
}
+4 -10
View File
@@ -261,19 +261,13 @@ fn frame(
events: Vec<egui::Event>,
draw: &impl Fn(&mut VectorcraftApp, &mut egui::Ui),
) -> Vec<(String, Rect)> {
fn texts(s: &egui::Shape, out: &mut Vec<(String, Rect)>) {
match s {
egui::Shape::Text(t) => out.push((t.galley.text().to_string(), t.visual_bounding_rect())),
egui::Shape::Vec(v) => v.iter().for_each(|s| texts(s, out)),
_ => {}
}
}
let raw = egui::RawInput { screen_rect: Some(Rect::from_min_size(Pos2::ZERO, vec2(SCREEN.0, SCREEN.1))), events, ..Default::default() };
// With the app's frame input, as the window's frames have it: its host carries the file service a dialog picks with.
let out = crate::testing::part_frame(app, ctx, raw, |app, ui| draw(app, ui));
let mut v = vec![];
out.shapes.iter().for_each(|c| texts(&c.shape, &mut v));
v
crate::tests_labels::text_shapes(&out)
.into_iter()
.map(|(t, transform)| (t.galley.text().to_string(), transform * t.visual_bounding_rect()))
.collect()
}
/// Where text `label` was drawn (menu items pad theirs).
+3 -3
View File
@@ -59,7 +59,7 @@ pub(crate) const CONTROL_ROOM: egui::Vec2 = vec2(2200.0, 900.0);
pub(crate) fn control_frame(app: &mut VectorcraftApp, ctx: &egui::Context, events: Vec<Event>) -> Vec<(String, Rect)> {
let raw = egui::RawInput { screen_rect: Some(Rect::from_min_size(Pos2::ZERO, CONTROL_ROOM)), events, ..Default::default() };
let out = crate::testing::part_frame(app, ctx, raw, chrome::control_bar);
shapes_text(&out.shapes.iter().map(|c| c.shape.clone()).collect::<Vec<_>>())
shapes_text(&crate::tests_labels::flat_painted_shapes(&out.shapes))
}
pub(crate) fn click_control(app: &mut VectorcraftApp, ctx: &egui::Context, at: Pos2) {
@@ -74,7 +74,7 @@ fn canvas_frame(app: &mut VectorcraftApp, ctx: &egui::Context, events: Vec<Event
let screen = Rect::from_min_size(Pos2::ZERO, vec2(800.0, 600.0));
let raw = egui::RawInput { screen_rect: Some(screen), events, ..Default::default() };
let out = crate::testing::part_frame(app, ctx, raw, canvas::show);
shapes_text(&out.shapes.iter().map(|c| c.shape.clone()).collect::<Vec<_>>())
shapes_text(&crate::tests_labels::flat_painted_shapes(&out.shapes))
}
fn click_canvas(app: &mut VectorcraftApp, ctx: &egui::Context, at: Pos2, button: PointerButton) -> Vec<(String, Rect)> {
@@ -92,7 +92,7 @@ pub(crate) fn properties_frame(app: &mut VectorcraftApp, width: f32) -> Vec<(Str
crate::panels::properties::show(app, ui);
});
out.textures_delta.clear();
shapes_text(&out.shapes.iter().map(|c| c.shape.clone()).collect::<Vec<_>>())
shapes_text(&crate::tests_labels::flat_painted_shapes(&out.shapes))
}
pub(crate) fn has(texts: &[(String, Rect)], label: &str) -> bool {
+3 -5
View File
@@ -39,11 +39,9 @@ fn has_type(app: &VectorcraftApp) -> bool {
fn progress(app: &mut VectorcraftApp, ctx: &egui::Context, time: f64) -> String {
let out = crate::testing::part_frame(app, ctx, egui::RawInput { time: Some(time), ..Default::default() }, export_progress::show);
let mut texts = String::new();
for shape in out.shapes {
if let egui::epaint::Shape::Text(t) = shape.shape {
texts.push_str(t.galley.text());
texts.push('\n');
}
for (t, _) in crate::tests_labels::text_shapes(&out) {
texts.push_str(t.galley.text());
texts.push('\n');
}
texts
}
+4 -10
View File
@@ -30,16 +30,10 @@ fn frame(app: &mut VectorcraftApp, ctx: &egui::Context, events: Vec<Event>, draw
..Default::default()
};
let out = crate::testing::part_frame(app, ctx, raw, draw);
fn walk(s: &egui::Shape, v: &mut Vec<(String, Rect)>) {
match s {
egui::Shape::Text(t) => v.push((t.galley.text().to_string(), Rect::from_min_size(t.pos, t.galley.size()))),
egui::Shape::Vec(s) => s.iter().for_each(|s| walk(s, v)),
_ => {}
}
}
let mut texts = vec![];
out.shapes.iter().for_each(|c| walk(&c.shape, &mut texts));
texts
crate::tests_labels::text_shapes(&out)
.into_iter()
.map(|(t, transform)| (t.galley.text().to_string(), transform * Rect::from_min_size(t.pos, t.galley.size())))
.collect()
}
/// How many fields show `v` points: painted as one run, or as its number with the unit as the next run on its row.
+2 -10
View File
@@ -626,13 +626,6 @@ fn a_scripts_file_dialog_keeps_at_most_2048_picked_files() {
/// The texts the open warning draws, after a few frames of the whole app.
fn dialog_texts(app: &mut VectorcraftApp) -> Vec<String> {
fn texts(s: &egui::Shape, out: &mut Vec<String>) {
match s {
egui::Shape::Text(t) => out.push(t.galley.text().to_string()),
egui::Shape::Vec(v) => v.iter().for_each(|s| texts(s, out)),
_ => {}
}
}
let ctx = app.ui_ctx.clone().unwrap();
let screen = egui::Rect::from_min_size(egui::Pos2::ZERO, egui::vec2(1600.0, 4000.0));
let mut out = None;
@@ -640,9 +633,8 @@ fn dialog_texts(app: &mut VectorcraftApp) -> Vec<String> {
let raw = egui::RawInput { time: Some(0.1 * f64::from(i)), screen_rect: Some(screen), ..Default::default() };
out = Some(crate::testing::app_frame(app, &ctx, raw));
}
let mut v = vec![];
out.unwrap().shapes.iter().for_each(|c| texts(&c.shape, &mut v));
v
let out = out.unwrap();
crate::tests_labels::text_shapes(&out).into_iter().map(|(t, _)| t.galley.text().to_string()).collect()
}
/// The warning before a run lists the files the script writes, read without running it.
+4 -8
View File
@@ -18,14 +18,10 @@ pub(super) fn window(app: &mut VectorcraftApp, ui: &mut egui::Ui) {
fn app_frame(app: &mut VectorcraftApp, ctx: &egui::Context, events: Vec<Event>, text: &str) -> Option<Rect> {
let screen_rect = Some(Rect::from_min_size(Pos2::ZERO, vec2(1600.0, 900.0)));
let out = crate::testing::app_frame(app, ctx, egui::RawInput { events, screen_rect, ..Default::default() });
fn find(shape: &egui::Shape, text: &str) -> Option<Rect> {
match shape {
egui::Shape::Text(t) if t.galley.text() == text => Some(t.galley.rect.translate(t.pos.to_vec2())),
egui::Shape::Vec(v) => v.iter().find_map(|s| find(s, text)),
_ => None,
}
}
out.shapes.iter().find_map(|s| find(&s.shape, text))
crate::tests_labels::text_shapes(&out)
.into_iter()
.find(|(t, _)| t.galley.text() == text)
.map(|(t, transform)| transform * t.galley.rect.translate(t.pos.to_vec2()))
}
fn app_with_rect() -> (VectorcraftApp, egui::Context) {
+9 -12
View File
@@ -297,13 +297,11 @@ fn the_clipboard_keys_in_a_focused_field_edit_its_text() {
/// The rectangle of the text `text` painted last in a frame's output.
fn text_rect(out: &egui::FullOutput, text: &str) -> Rect {
out.shapes
.iter()
crate::tests_labels::text_shapes(out)
.into_iter()
.rev()
.find_map(|s| match &s.shape {
egui::Shape::Text(t) if t.galley.text() == text => Some(t.galley.rect.translate(t.pos.to_vec2())),
_ => None,
})
.find(|(shape, ..)| shape.galley.text() == text)
.map(|(shape, transform)| transform * shape.galley.rect.translate(shape.pos.to_vec2()))
.unwrap_or_else(|| panic!("no {text:?} painted"))
}
@@ -567,12 +565,11 @@ fn panel_text_copied_before_the_art_formats_are_written_stays_on_the_clipboard()
/// The centre of the text `label` painted last (in the topmost layer) in a frame's output; with
/// `title`, the first one painted (the menu bar's).
fn text_at(out: &egui::FullOutput, label: &str, title: bool) -> Pos2 {
let mut shapes: Box<dyn Iterator<Item = _>> = if title { Box::new(out.shapes.iter()) } else { Box::new(out.shapes.iter().rev()) };
shapes
.find_map(|s| match &s.shape {
egui::Shape::Text(t) if t.galley.text().trim() == label => Some(Rect::from_min_size(t.pos, t.galley.size()).center()),
_ => None,
})
let shapes = crate::tests_labels::text_shapes(out);
let label_matches = |(shape, _): &(&egui::epaint::TextShape, egui::emath::TSTransform)| shape.galley.text().trim() == label;
let found = if title { shapes.into_iter().find(label_matches) } else { shapes.into_iter().rev().find(label_matches) };
found
.map(|(shape, transform)| transform * Rect::from_min_size(shape.pos, shape.galley.size()).center())
.unwrap_or_else(|| panic!("no {label:?} painted"))
}
+1 -7
View File
@@ -18,13 +18,7 @@ fn frame_texts(app: &mut VectorcraftApp, ctx: &egui::Context) -> Vec<String> {
let raw = egui::RawInput { screen_rect: Some(egui::Rect::from_min_size(Pos2::ZERO, vec2(800.0, 600.0))), ..Default::default() };
let mut out = ctx.run_ui(raw, |ui| crate::canvas::show(app, ui));
out.textures_delta.clear();
out.shapes
.iter()
.filter_map(|c| match &c.shape {
egui::Shape::Text(t) => Some(t.galley.text().to_string()),
_ => None,
})
.collect()
crate::tests_labels::text_shapes(&out).into_iter().map(|(shape, _)| shape.galley.text().to_string()).collect()
}
#[test]
+1 -8
View File
@@ -77,14 +77,7 @@ fn undos(app: &VectorcraftApp) -> usize {
fn progress(app: &mut VectorcraftApp, ctx: &egui::Context, time: f64) -> String {
let mut out = ctx.run_ui(egui::RawInput { time: Some(time), ..Default::default() }, |ui| export_progress::show(app, ui));
out.textures_delta.clear();
let mut texts = String::new();
for shape in out.shapes {
if let egui::epaint::Shape::Text(t) = shape.shape {
texts.push_str(t.galley.text());
texts.push('\n');
}
}
texts
crate::tests_labels::shapes_text(&out)
}
/// Object › Image Trace › Make traces in the background, the status bar saying so, and its result is
+8 -20
View File
@@ -321,14 +321,7 @@ fn the_controls_under_the_tools_share_a_line_under_a_rule() {
let proxy = named_rect(&nodes, "Fill and Stroke");
let screen_rect = Some(egui::Rect::from_min_size(Pos2::ZERO, egui::vec2(1200.0, 2000.0)));
let out = crate::testing::app_frame(&mut app, &ctx, egui::RawInput { time: Some(1.0), screen_rect, ..Default::default() });
let mut flat = Vec::new();
let mut stack: Vec<egui::Shape> = out.shapes.into_iter().map(|clipped| clipped.shape).collect();
while let Some(shape) = stack.pop() {
match shape {
egui::Shape::Vec(inner) => stack.extend(inner),
shape => flat.push(shape),
}
}
let flat = crate::tests_labels::flat_painted_shapes(&out.shapes);
// A rule is a thin horizontal line or bar across most of the rail's width, between the tools and the controls.
let between = |y: f32| y > last.bottom() && y < proxy.top();
let across = |left: f32, right: f32| right - left >= last.width() * 0.75 && left < last.right() && right > last.left();
@@ -595,20 +588,15 @@ fn a_short_tools_rail_shows_its_scroll_bar_at_rest() {
let rail = nodes.iter().find(|n| n.role() == Role::Toolbar && n.label() == Some("Tools")).and_then(bounds).expect("the rail is drawn");
let screen_rect = Some(egui::Rect::from_min_size(Pos2::ZERO, egui::vec2(1200.0, height)));
let out = crate::testing::app_frame(app, &ctx, egui::RawInput { time: Some(t0 + 0.2), screen_rect, ..Default::default() });
let mut stack: Vec<egui::Shape> = out.shapes.into_iter().map(|clipped| clipped.shape).collect();
let mut found = 0;
while let Some(shape) = stack.pop() {
match shape {
egui::Shape::Vec(inner) => stack.extend(inner),
egui::Shape::Rect(r) => {
let b = r.rect;
let narrow = b.width() > 0.0 && b.width() <= rail.width() * 0.25 && b.height() >= b.width() * 3.0;
let at_end = rail.expand(0.5).contains_rect(b) && b.center().x > rail.center().x;
if narrow && at_end {
found += 1;
}
for shape in crate::tests_labels::flat_painted_shapes(&out.shapes) {
if let egui::Shape::Rect(r) = shape {
let b = r.rect;
let narrow = b.width() > 0.0 && b.width() <= rail.width() * 0.25 && b.height() >= b.width() * 3.0;
let at_end = rail.expand(0.5).contains_rect(b) && b.center().x > rail.center().x;
if narrow && at_end {
found += 1;
}
_ => {}
}
}
found
@@ -999,6 +999,7 @@ fn review_preset_assert_shown(app: &mut VectorcraftApp, ctx: &egui::Context, pre
match shape {
egui::Shape::Text(drawn) => out.push(drawn.galley.text().to_string()),
egui::Shape::Vec(shapes) => shapes.iter().for_each(|shape| texts(shape, out)),
egui::Shape::PaintChunk(shapes) => shapes.iter().for_each(|clipped| texts(&clipped.shape, out)),
_ => {}
}
}
+39 -39
View File
@@ -175,35 +175,44 @@ fn copies(out: &egui::FullOutput) -> Vec<String> {
out.platform_output.commands.iter().filter_map(|c| if let egui::OutputCommand::CopyText(s) = c { Some(s.clone()) } else { None }).collect()
}
fn text_shape<'a>(shape: &'a Shape, text: &str) -> Option<&'a egui::epaint::TextShape> {
match shape {
Shape::Text(t) if t.galley.text() == text => Some(t),
Shape::Vec(v) => v.iter().rev().find_map(|s| text_shape(s, text)),
_ => None,
fn visible_paint(out: &egui::FullOutput) -> Vec<(&egui::epaint::TextShape, Rect, Pos2)> {
use egui::emath::TSTransform;
fn collect<'a>(shape: &'a Shape, transform: TSTransform, clip: Rect, text: &mut Vec<(&'a egui::epaint::TextShape, Rect, Pos2)>) {
match shape {
Shape::Text(t) => {
let drawn = transform * t.galley.rect.translate(t.pos.to_vec2());
let bounds = drawn.intersect(clip);
if bounds.is_positive() {
text.push((t, bounds, drawn.center()));
}
}
Shape::Vec(v) => v.iter().for_each(|s| collect(s, transform, clip, text)),
Shape::PaintChunk(v) => v.iter().for_each(|s| {
collect(&s.shape, transform * s.transform_after_tessellation, clip.intersect(transform * s.clip_rect), text);
}),
_ => {}
}
}
let mut text = Vec::new();
for s in &out.shapes {
collect(&s.shape, s.transform_after_tessellation, s.clip_rect, &mut text);
}
text
}
fn painted(out: &egui::FullOutput, text: &str) -> (Rect, bool) {
out.shapes
.iter()
visible_paint(out)
.into_iter()
.rev()
.find_map(|s| {
let t = text_shape(&s.shape, text)?;
let r = t.galley.rect.translate(t.pos.to_vec2());
s.clip_rect.intersects(r).then_some((r.intersect(s.clip_rect), t.galley.elided))
})
.find(|(shape, ..)| shape.galley.text() == text)
.map(|(shape, bounds, _)| (bounds, shape.galley.elided))
.unwrap_or_else(|| panic!("fixture: no visible actual readout {text:?}"))
}
fn visible_text_count(out: &egui::FullOutput, text: &str) -> usize {
fn count(shape: &Shape, clip: Rect, text: &str) -> usize {
match shape {
Shape::Text(t) if t.galley.text() == text => usize::from(t.galley.rect.translate(t.pos.to_vec2()).intersect(clip).is_positive()),
Shape::Vec(v) => v.iter().map(|s| count(s, clip, text)).sum(),
_ => 0,
}
}
out.shapes.iter().map(|s| count(&s.shape, s.clip_rect, text)).sum()
visible_paint(out).into_iter().filter(|(shape, ..)| shape.galley.text() == text).count()
}
fn copy_at(a: &mut App, at: Pos2, value: &str) -> egui::FullOutput {
@@ -344,12 +353,11 @@ fn copy_long_link_value(a: &mut App) {
assert_eq!(names.len(), 1, "one actual full-name copy readout");
assert_eq!(names[0].1.description(), Some("Copy"));
let area = location_node_rect(&names[0].1);
let (value, clipped) = out
.shapes
.iter()
.find_map(|s| {
let t = text_shape(&s.shape, &name)?;
let r = t.galley.rect.translate(t.pos.to_vec2()).intersect(s.clip_rect).intersect(area);
let (value, clipped) = visible_paint(&out)
.into_iter()
.filter(|(t, ..)| t.galley.text() == name)
.find_map(|(t, bounds, _)| {
let r = bounds.intersect(area);
r.is_positive().then_some((r, t.galley.elided || r.width() < t.galley.rect.width()))
})
.expect("the actual selected image's Link Info Name value");
@@ -626,15 +634,10 @@ fn location_node_rect(node: &egui::accesskit::Node) -> Rect {
Rect::from_min_max(egui::pos2(b.x0 as f32, b.y0 as f32), egui::pos2(b.x1 as f32, b.y1 as f32))
}
fn shortened_location(shape: &Shape, rect: Rect, full: &str) -> bool {
match shape {
Shape::Text(t) => {
let painted = t.galley.rect.translate(t.pos.to_vec2());
rect.contains(painted.center()) && t.galley.text().contains('…') && t.galley.text() != full
}
Shape::Vec(shapes) => shapes.iter().any(|s| shortened_location(s, rect, full)),
_ => false,
}
fn shortened_location(out: &egui::FullOutput, rect: Rect, full: &str) -> bool {
visible_paint(out).into_iter().any(|(shape, bounds, center)| {
rect.contains(center) && bounds.contains(center) && shape.galley.text().contains('…') && shape.galley.text() != full
})
}
#[test]
@@ -721,10 +724,7 @@ fn panel_readout_long_location_fits_and_copies_by_pointer_accessibility_and_keyb
let (location_id, node) = locations[0];
let location_rect = location_node_rect(node);
assert!(body.contains_rect(location_rect), "{locale}: the fitted Location remains inside the panel");
assert!(
out.shapes.iter().any(|s| shortened_location(&s.shape, location_rect, location)),
"{locale}: the long path must actually be shortened on screen"
);
assert!(shortened_location(&out, location_rect, location), "{locale}: the long path must actually be shortened on screen");
let buttons: Vec<_> =
nodes.iter().filter(|(_, n)| n.role() == Role::Button && n.label() == Some(vectorcraft_ui_egui::i18n::t("Copy Location"))).collect();
assert_eq!(buttons.len(), 1, "{locale}: one named native Copy Location button");
+1 -1
View File
@@ -5,7 +5,7 @@ use std::process::Command;
use serde_json::Value;
const REV: &str = "610c86792a02aa3d416926ee44e3ec3788dea853";
const REV: &str = "186a229c8da8db5916f8a863dfd894f1879af735";
const PACKAGES: &[(&str, &str, &str)] = &[
("craft-pdf", "0.1.0", REV),
("krilla", "0.8.2", REV),