mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-12-05 13:32:45 -05:00
Merge main into fix/new-type-new-art-appearance
This commit is contained in:
commit
e35d10ebbf
53 files changed
+1249
-355
No files matched your search
@@ -67,7 +67,8 @@ jobs:
|
||||
# The warm build runs as one `cache warm <k>/6` leg per shard, in parallel (each builds what
|
||||
# its shard builds), and `cache warm` puts their files into the one entry it saves.
|
||||
warm-split: true
|
||||
# The dependency cache also keeps the compiled workspace crates and test executables, so a
|
||||
# The dependency cache also keeps the compiled workspace crates and their library and binary
|
||||
# test executables (not the integration tests' executables), so a
|
||||
# pull request's shards rebuild only the crates its changes reach. Each main run's `cache
|
||||
# warm` leg saves a rolling entry of its own, every leg restores the newest one, and
|
||||
# cache-prune.yml deletes the one it replaced after each attempt. The nightly run restores
|
||||
|
||||
Generated
+129
-120
@@ -4,9 +4,8 @@ version = 4
|
||||
|
||||
[[package]]
|
||||
name = "acadrust"
|
||||
version = "0.6.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8923c99ea1f151cb7fc17ce2fc14f8b1e330fa22611e535602d985c0cc3c89a2"
|
||||
version = "0.6.9"
|
||||
source = "git+https://github.com/storytold/acadrust.git?rev=468b9d8e317755209020d5d3f2f1c8a76210c47f#468b9d8e317755209020d5d3f2f1c8a76210c47f"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bitflags 2.13.2",
|
||||
@@ -16,6 +15,7 @@ dependencies = [
|
||||
"foldhash 0.2.0",
|
||||
"indexmap",
|
||||
"itoa",
|
||||
"memchr",
|
||||
"memmap2",
|
||||
"nom 7.1.3",
|
||||
"oem_cp",
|
||||
@@ -24,6 +24,7 @@ dependencies = [
|
||||
"ryu",
|
||||
"thiserror 2.0.21",
|
||||
"web-time",
|
||||
"whichever",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1255,7 +1256,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"craft-automation",
|
||||
"craft-behavior",
|
||||
@@ -1297,7 +1298,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-affinity"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"crc32fast",
|
||||
"flate2",
|
||||
@@ -1318,7 +1319,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-appkit"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"block2 0.6.2",
|
||||
"objc2 0.6.5",
|
||||
@@ -1330,7 +1331,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-atomic"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"rustix 1.1.6",
|
||||
]
|
||||
@@ -1338,7 +1339,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-automation"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"base64 0.23.1",
|
||||
"craft-behavior",
|
||||
@@ -1363,11 +1364,12 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-behavior"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"accesskit",
|
||||
"bitflags 2.13.2",
|
||||
"craft-host",
|
||||
"craft-i18n",
|
||||
"craft-keymap",
|
||||
"craft-theme",
|
||||
"craft-tracked",
|
||||
@@ -1381,7 +1383,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-browse"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"craft-behavior",
|
||||
"craft-docpath",
|
||||
@@ -1399,7 +1401,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-cdr"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"crc32fast",
|
||||
"flate2",
|
||||
@@ -1408,7 +1410,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-cloud-ui"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"egui",
|
||||
]
|
||||
@@ -1416,7 +1418,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-cms"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"md-5",
|
||||
"rayon",
|
||||
@@ -1425,12 +1427,12 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-codepage"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
|
||||
[[package]]
|
||||
name = "craft-color-ui"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"craft-behavior",
|
||||
"craft-cms",
|
||||
@@ -1450,7 +1452,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-control"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"craft-ai-agents",
|
||||
"craft-atomic",
|
||||
@@ -1466,7 +1468,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-control-protocol"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"getrandom 0.3.4",
|
||||
"serde_json",
|
||||
@@ -1476,7 +1478,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-dds"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"rayon",
|
||||
]
|
||||
@@ -1484,7 +1486,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-dialogs"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"block2 0.6.2",
|
||||
"craft-appkit",
|
||||
@@ -1510,7 +1512,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-doc"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"blake3",
|
||||
"craft-ecproj-format",
|
||||
@@ -1526,7 +1528,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-docpath"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"serde",
|
||||
]
|
||||
@@ -1534,7 +1536,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-draw"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"craft-behavior",
|
||||
"craft-color-ui",
|
||||
@@ -1553,16 +1555,17 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-dwg"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"acadrust",
|
||||
"craft-dxf",
|
||||
"log",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "craft-dxf"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"craft-codepage",
|
||||
"encoding_rs",
|
||||
@@ -1574,7 +1577,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-ecproj-format"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"serde_json",
|
||||
@@ -1584,12 +1587,12 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-eps"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
|
||||
[[package]]
|
||||
name = "craft-flags"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"craft-atomic",
|
||||
"dirs",
|
||||
@@ -1599,7 +1602,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-font-catalog"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"fontique",
|
||||
"harfrust 0.13.3",
|
||||
@@ -1614,7 +1617,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-font-manager"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"craft-behavior",
|
||||
"craft-font-catalog",
|
||||
@@ -1633,7 +1636,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-font-os-windows"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"windows-registry",
|
||||
"windows-sys 0.61.2",
|
||||
@@ -1642,7 +1645,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-font-store"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"cap-primitives",
|
||||
"craft-atomic",
|
||||
@@ -1665,12 +1668,12 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-fonts-build"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
|
||||
[[package]]
|
||||
name = "craft-gif"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"gif",
|
||||
]
|
||||
@@ -1678,7 +1681,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-gzip"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"flate2",
|
||||
]
|
||||
@@ -1686,7 +1689,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-host"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"bitflags 2.13.2",
|
||||
"craft-i18n",
|
||||
@@ -1699,7 +1702,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-i18n"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"brotli 9.1.3",
|
||||
"brotli-decompressor 6.3.2",
|
||||
@@ -1729,7 +1732,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-image-codecs"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"craft-dds",
|
||||
"craft-jpeg",
|
||||
@@ -1756,7 +1759,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-imaging"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"craft-behavior",
|
||||
"craft-color-ui",
|
||||
@@ -1774,7 +1777,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-jpeg"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"thiserror 2.0.21",
|
||||
]
|
||||
@@ -1782,7 +1785,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-jxl"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"brotli-decompressor 5.0.3",
|
||||
"jixel",
|
||||
@@ -1793,7 +1796,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-keymap"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"craft-host",
|
||||
"craft-i18n",
|
||||
@@ -1808,7 +1811,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-layers"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"craft-behavior",
|
||||
"craft-i18n",
|
||||
@@ -1822,7 +1825,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-menu"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"craft-behavior",
|
||||
"craft-host",
|
||||
@@ -1840,7 +1843,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-metadata"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"brotli-decompressor 6.3.2",
|
||||
"chrono",
|
||||
@@ -1852,7 +1855,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-metafile"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"encoding_rs",
|
||||
"image",
|
||||
@@ -1863,7 +1866,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-mime"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"craft-codepage",
|
||||
@@ -1873,7 +1876,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-nightly"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"uds_windows",
|
||||
"winsafe",
|
||||
@@ -1882,7 +1885,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-pages"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"craft-behavior",
|
||||
"craft-keymap",
|
||||
@@ -1898,7 +1901,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-pbr"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"craft-texture",
|
||||
"thiserror 2.0.21",
|
||||
@@ -1907,7 +1910,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-pcraft-format"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"flate2",
|
||||
"serde",
|
||||
@@ -1918,7 +1921,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-pdf"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"hayro-interpret",
|
||||
"hayro-syntax",
|
||||
@@ -1930,7 +1933,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-platform"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"async-channel",
|
||||
"async-io",
|
||||
@@ -1963,7 +1966,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-plotter"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"kurbo 0.13.1",
|
||||
"thiserror 2.0.21",
|
||||
@@ -1972,7 +1975,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-print"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"craft-behavior",
|
||||
"craft-host",
|
||||
@@ -1996,7 +1999,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-proof"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"log",
|
||||
"miniz_oxide 0.9.1",
|
||||
@@ -2007,7 +2010,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-ps"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"craft-eps",
|
||||
"flate2",
|
||||
@@ -2021,7 +2024,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-psd"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"encoding_rs",
|
||||
"flate2",
|
||||
@@ -2032,7 +2035,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-quit"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"dispatch2",
|
||||
"egui",
|
||||
@@ -2045,7 +2048,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-raster3d"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"rayon",
|
||||
"thiserror 2.0.21",
|
||||
@@ -2054,7 +2057,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-review"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"base64 0.23.1",
|
||||
"craft-behavior",
|
||||
@@ -2073,7 +2076,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-settings"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"craft-atomic",
|
||||
"craft-host",
|
||||
@@ -2090,7 +2093,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-stream-codecs"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"fax",
|
||||
"hayro-ccitt",
|
||||
@@ -2101,7 +2104,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-svg"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"craft-image-codecs",
|
||||
"craft-xml",
|
||||
@@ -2122,7 +2125,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-table"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"craft-behavior",
|
||||
"craft-keymap",
|
||||
@@ -2134,7 +2137,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-text"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"craft-behavior",
|
||||
"craft-font-manager",
|
||||
@@ -2159,7 +2162,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-texture"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"thiserror 2.0.21",
|
||||
]
|
||||
@@ -2167,7 +2170,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-theme"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"bitflags 2.13.2",
|
||||
"craft-tracked",
|
||||
@@ -2182,7 +2185,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-theme-store"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"craft-atomic",
|
||||
"craft-behavior",
|
||||
@@ -2197,7 +2200,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-tiff"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"thiserror 2.0.21",
|
||||
@@ -2207,7 +2210,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-time"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"thiserror 2.0.21",
|
||||
@@ -2216,7 +2219,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-timeline"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"craft-behavior",
|
||||
"craft-keymap",
|
||||
@@ -2231,12 +2234,12 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-tracked"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
|
||||
[[package]]
|
||||
name = "craft-ui"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"craft-cloud-ui",
|
||||
"craft-ui-canvas",
|
||||
@@ -2250,7 +2253,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-ui-canvas"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"craft-behavior",
|
||||
"craft-font-catalog",
|
||||
@@ -2267,7 +2270,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-ui-contract"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"accesskit",
|
||||
"craft-behavior",
|
||||
@@ -2305,7 +2308,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-ui-macros"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"proc-macro-crate",
|
||||
"proc-macro2",
|
||||
@@ -2316,7 +2319,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-ui-panels"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"craft-behavior",
|
||||
"craft-host",
|
||||
@@ -2334,7 +2337,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-ui-patterns"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"craft-behavior",
|
||||
"craft-host",
|
||||
@@ -2355,7 +2358,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-ui-shell"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"craft-behavior",
|
||||
"craft-host",
|
||||
@@ -2376,7 +2379,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-ui-widgets"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"craft-behavior",
|
||||
"craft-host",
|
||||
@@ -2395,7 +2398,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-update"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"chrono",
|
||||
@@ -2427,7 +2430,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-vectorcraft-format"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"flate2",
|
||||
"serde",
|
||||
@@ -2438,7 +2441,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-wayland"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"raw-window-handle",
|
||||
"wayland-backend",
|
||||
@@ -2448,7 +2451,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-web-api"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"js-sys",
|
||||
"serde_json",
|
||||
@@ -2459,7 +2462,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-win32"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"winsafe",
|
||||
]
|
||||
@@ -2467,7 +2470,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-window"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"craft-appkit",
|
||||
"craft-atomic",
|
||||
@@ -2499,7 +2502,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "craft-xml"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"quick-xml 0.41.0",
|
||||
"serde",
|
||||
@@ -2844,7 +2847,7 @@ checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813"
|
||||
[[package]]
|
||||
name = "ecolor"
|
||||
version = "0.37.0"
|
||||
source = "git+https://github.com/storytold/egui.git?rev=861d60a65c50850e995bbb3dcee7c1f3b06815f6#861d60a65c50850e995bbb3dcee7c1f3b06815f6"
|
||||
source = "git+https://github.com/storytold/egui.git?rev=399fc6e0ea65059e37de680f11ebbd177bf7d4ff#399fc6e0ea65059e37de680f11ebbd177bf7d4ff"
|
||||
dependencies = [
|
||||
"bytemuck",
|
||||
"emath",
|
||||
@@ -2877,7 +2880,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "eframe"
|
||||
version = "0.37.0"
|
||||
source = "git+https://github.com/storytold/egui.git?rev=861d60a65c50850e995bbb3dcee7c1f3b06815f6#861d60a65c50850e995bbb3dcee7c1f3b06815f6"
|
||||
source = "git+https://github.com/storytold/egui.git?rev=399fc6e0ea65059e37de680f11ebbd177bf7d4ff#399fc6e0ea65059e37de680f11ebbd177bf7d4ff"
|
||||
dependencies = [
|
||||
"ahash",
|
||||
"bytemuck",
|
||||
@@ -2912,7 +2915,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "egui"
|
||||
version = "0.37.0"
|
||||
source = "git+https://github.com/storytold/egui.git?rev=861d60a65c50850e995bbb3dcee7c1f3b06815f6#861d60a65c50850e995bbb3dcee7c1f3b06815f6"
|
||||
source = "git+https://github.com/storytold/egui.git?rev=399fc6e0ea65059e37de680f11ebbd177bf7d4ff#399fc6e0ea65059e37de680f11ebbd177bf7d4ff"
|
||||
dependencies = [
|
||||
"accesskit",
|
||||
"ahash",
|
||||
@@ -2931,7 +2934,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "egui-wgpu"
|
||||
version = "0.37.0"
|
||||
source = "git+https://github.com/storytold/egui.git?rev=861d60a65c50850e995bbb3dcee7c1f3b06815f6#861d60a65c50850e995bbb3dcee7c1f3b06815f6"
|
||||
source = "git+https://github.com/storytold/egui.git?rev=399fc6e0ea65059e37de680f11ebbd177bf7d4ff#399fc6e0ea65059e37de680f11ebbd177bf7d4ff"
|
||||
dependencies = [
|
||||
"ahash",
|
||||
"bytemuck",
|
||||
@@ -2950,7 +2953,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "egui-winit"
|
||||
version = "0.37.0"
|
||||
source = "git+https://github.com/storytold/egui.git?rev=861d60a65c50850e995bbb3dcee7c1f3b06815f6#861d60a65c50850e995bbb3dcee7c1f3b06815f6"
|
||||
source = "git+https://github.com/storytold/egui.git?rev=399fc6e0ea65059e37de680f11ebbd177bf7d4ff#399fc6e0ea65059e37de680f11ebbd177bf7d4ff"
|
||||
dependencies = [
|
||||
"accesskit_winit",
|
||||
"arboard",
|
||||
@@ -2976,7 +2979,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "egui_extras"
|
||||
version = "0.37.0"
|
||||
source = "git+https://github.com/storytold/egui.git?rev=861d60a65c50850e995bbb3dcee7c1f3b06815f6#861d60a65c50850e995bbb3dcee7c1f3b06815f6"
|
||||
source = "git+https://github.com/storytold/egui.git?rev=399fc6e0ea65059e37de680f11ebbd177bf7d4ff#399fc6e0ea65059e37de680f11ebbd177bf7d4ff"
|
||||
dependencies = [
|
||||
"ahash",
|
||||
"egui",
|
||||
@@ -2990,7 +2993,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "egui_glow"
|
||||
version = "0.37.0"
|
||||
source = "git+https://github.com/storytold/egui.git?rev=861d60a65c50850e995bbb3dcee7c1f3b06815f6#861d60a65c50850e995bbb3dcee7c1f3b06815f6"
|
||||
source = "git+https://github.com/storytold/egui.git?rev=399fc6e0ea65059e37de680f11ebbd177bf7d4ff#399fc6e0ea65059e37de680f11ebbd177bf7d4ff"
|
||||
dependencies = [
|
||||
"bytemuck",
|
||||
"egui",
|
||||
@@ -3003,7 +3006,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "egui_kittest"
|
||||
version = "0.37.0"
|
||||
source = "git+https://github.com/storytold/egui.git?rev=861d60a65c50850e995bbb3dcee7c1f3b06815f6#861d60a65c50850e995bbb3dcee7c1f3b06815f6"
|
||||
source = "git+https://github.com/storytold/egui.git?rev=399fc6e0ea65059e37de680f11ebbd177bf7d4ff#399fc6e0ea65059e37de680f11ebbd177bf7d4ff"
|
||||
dependencies = [
|
||||
"dify",
|
||||
"eframe",
|
||||
@@ -3029,7 +3032,7 @@ checksum = "0e9c71c2167ca323c882b99918929403426e2373ea17242ff5653e0d5e1058be"
|
||||
[[package]]
|
||||
name = "emath"
|
||||
version = "0.37.0"
|
||||
source = "git+https://github.com/storytold/egui.git?rev=861d60a65c50850e995bbb3dcee7c1f3b06815f6#861d60a65c50850e995bbb3dcee7c1f3b06815f6"
|
||||
source = "git+https://github.com/storytold/egui.git?rev=399fc6e0ea65059e37de680f11ebbd177bf7d4ff#399fc6e0ea65059e37de680f11ebbd177bf7d4ff"
|
||||
dependencies = [
|
||||
"bytemuck",
|
||||
]
|
||||
@@ -3110,7 +3113,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "epaint"
|
||||
version = "0.37.0"
|
||||
source = "git+https://github.com/storytold/egui.git?rev=861d60a65c50850e995bbb3dcee7c1f3b06815f6#861d60a65c50850e995bbb3dcee7c1f3b06815f6"
|
||||
source = "git+https://github.com/storytold/egui.git?rev=399fc6e0ea65059e37de680f11ebbd177bf7d4ff#399fc6e0ea65059e37de680f11ebbd177bf7d4ff"
|
||||
dependencies = [
|
||||
"ahash",
|
||||
"bytemuck",
|
||||
@@ -3136,7 +3139,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "epaint_default_fonts"
|
||||
version = "0.37.0"
|
||||
source = "git+https://github.com/storytold/egui.git?rev=861d60a65c50850e995bbb3dcee7c1f3b06815f6#861d60a65c50850e995bbb3dcee7c1f3b06815f6"
|
||||
source = "git+https://github.com/storytold/egui.git?rev=399fc6e0ea65059e37de680f11ebbd177bf7d4ff#399fc6e0ea65059e37de680f11ebbd177bf7d4ff"
|
||||
dependencies = [
|
||||
"brotli 9.1.3",
|
||||
"brotli-decompressor 6.3.2",
|
||||
@@ -3859,7 +3862,7 @@ checksum = "9f4d0e94ddd48749f06bbe4e5389fb9799a0c45bcaf00495042076ef05e3241a"
|
||||
[[package]]
|
||||
name = "hayro-cmap"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"brotli 8.0.4",
|
||||
"hayro-postscript",
|
||||
@@ -3868,7 +3871,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "hayro-interpret"
|
||||
version = "0.7.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"bitflags 2.13.2",
|
||||
"hayro-cmap",
|
||||
@@ -3886,7 +3889,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "hayro-jbig2"
|
||||
version = "0.3.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"fearless_simd",
|
||||
"hayro-ccitt",
|
||||
@@ -3904,12 +3907,12 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "hayro-postscript"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
|
||||
[[package]]
|
||||
name = "hayro-syntax"
|
||||
version = "0.7.2"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"flate2",
|
||||
"hayro-ccitt",
|
||||
@@ -4892,7 +4895,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "krilla"
|
||||
version = "0.8.2"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"bumpalo",
|
||||
@@ -5049,7 +5052,7 @@ checksum = "d4a5ff6bcca6c4867b1c4fd4ef63e4db7436ef363e0ad7531d1558856bae64f4"
|
||||
[[package]]
|
||||
name = "linesweeper"
|
||||
version = "0.5.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=c2a47dfea38b215245f739c675da3662c89f1e09#c2a47dfea38b215245f739c675da3662c89f1e09"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8"
|
||||
dependencies = [
|
||||
"arrayvec",
|
||||
"kurbo 0.13.1",
|
||||
@@ -9663,19 +9666,6 @@ dependencies = [
|
||||
"wayland-scanner",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wayland-protocols-plasma"
|
||||
version = "0.3.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2b6d8cf1eb2c1c31ed1f5643c88a6e53538129d4af80030c8cabd1f9fa884d91"
|
||||
dependencies = [
|
||||
"bitflags 2.13.2",
|
||||
"wayland-backend",
|
||||
"wayland-client",
|
||||
"wayland-protocols",
|
||||
"wayland-scanner",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wayland-protocols-wlr"
|
||||
version = "0.3.12"
|
||||
@@ -9976,6 +9966,26 @@ dependencies = [
|
||||
"web-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "whichever"
|
||||
version = "0.7.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "68887c9512981e597d730f1d95b2eb6abdd53385e4e76c35a95e7121e16232b0"
|
||||
dependencies = [
|
||||
"whichever-macros",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "whichever-macros"
|
||||
version = "0.7.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cb15ad553239d9fdefac12e31e16c7682dc62a2106ba035aec69c5dd15835a7b"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 3.0.9",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "widestring"
|
||||
version = "1.2.1"
|
||||
@@ -10219,7 +10229,7 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
|
||||
[[package]]
|
||||
name = "winit"
|
||||
version = "0.30.13"
|
||||
source = "git+https://github.com/storytold/winit.git?rev=0dfcec0eb62fda5904137a63a6dd0c3d83295f45#0dfcec0eb62fda5904137a63a6dd0c3d83295f45"
|
||||
source = "git+https://github.com/storytold/winit.git?rev=3fd7ae64762f82a73b78bd24f453f82c4291067d#3fd7ae64762f82a73b78bd24f453f82c4291067d"
|
||||
dependencies = [
|
||||
"ahash",
|
||||
"android-activity",
|
||||
@@ -10258,7 +10268,6 @@ dependencies = [
|
||||
"wayland-backend",
|
||||
"wayland-client",
|
||||
"wayland-protocols",
|
||||
"wayland-protocols-plasma",
|
||||
"web-sys",
|
||||
"web-time",
|
||||
"windows-sys 0.52.0",
|
||||
|
||||
+54
-53
@@ -10,57 +10,57 @@ license = "MIT OR Apache-2.0"
|
||||
rust-version = "1.95"
|
||||
|
||||
[workspace.dependencies]
|
||||
craft-cms = { git = "https://github.com/storytold/craft-libs", rev = "c2a47dfea38b215245f739c675da3662c89f1e09" }
|
||||
craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "c2a47dfea38b215245f739c675da3662c89f1e09", default-features = false, features = ["interpret", "write"] }
|
||||
craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "c2a47dfea38b215245f739c675da3662c89f1e09" }
|
||||
craft-proof = { git = "https://github.com/storytold/craft-libs", rev = "c2a47dfea38b215245f739c675da3662c89f1e09" }
|
||||
craft-cms = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" }
|
||||
craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8", default-features = false, features = ["interpret", "write"] }
|
||||
craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" }
|
||||
craft-proof = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" }
|
||||
# Language packs: the Craft apps' shared font store installs them (#4936).
|
||||
craft-font-store = { git = "https://github.com/storytold/craft-libs", rev = "c2a47dfea38b215245f739c675da3662c89f1e09" }
|
||||
craft-font-catalog = { git = "https://github.com/storytold/craft-libs", rev = "c2a47dfea38b215245f739c675da3662c89f1e09" }
|
||||
craft-font-store = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" }
|
||||
craft-font-catalog = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" }
|
||||
# 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 = "c2a47dfea38b215245f739c675da3662c89f1e09" }
|
||||
craft-gzip = { git = "https://github.com/storytold/craft-libs", rev = "c2a47dfea38b215245f739c675da3662c89f1e09" }
|
||||
craft-vectorcraft-format = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" }
|
||||
craft-gzip = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" }
|
||||
# `.pcraft` documents: their manifest, full-size composite, preview, layer pixels and ICC profile.
|
||||
craft-doc = { git = "https://github.com/storytold/craft-libs", rev = "c2a47dfea38b215245f739c675da3662c89f1e09", features = ["pcraft-pixels"] }
|
||||
craft-doc = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8", features = ["pcraft-pixels"] }
|
||||
# Native Affinity documents (craft-libs#914).
|
||||
craft-affinity = { git = "https://github.com/storytold/craft-libs", rev = "c2a47dfea38b215245f739c675da3662c89f1e09" }
|
||||
craft-affinity = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" }
|
||||
# Bounded CDR (v1-v27) and CMX (32-bit) reader (craft-libs#778).
|
||||
craft-cdr = { git = "https://github.com/storytold/craft-libs", rev = "c2a47dfea38b215245f739c675da3662c89f1e09" }
|
||||
craft-cdr = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" }
|
||||
# SVG parsing, limits, SVGZ and writer (craft-libs#778).
|
||||
craft-svg = { git = "https://github.com/storytold/craft-libs", rev = "c2a47dfea38b215245f739c675da3662c89f1e09", features = ["tree"] }
|
||||
craft-mime = { git = "https://github.com/storytold/craft-libs", rev = "c2a47dfea38b215245f739c675da3662c89f1e09" }
|
||||
craft-svg = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8", features = ["tree"] }
|
||||
craft-mime = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" }
|
||||
# EPS container, previews, ASCII85 and DSC comments (craft-libs#778).
|
||||
craft-eps = { git = "https://github.com/storytold/craft-libs", rev = "c2a47dfea38b215245f739c675da3662c89f1e09" }
|
||||
craft-eps = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" }
|
||||
# DXF tags, reader and writer (craft-libs#778, #926, #927).
|
||||
craft-plotter = { git = "https://github.com/storytold/craft-libs", rev = "c2a47dfea38b215245f739c675da3662c89f1e09" }
|
||||
craft-dxf = { git = "https://github.com/storytold/craft-libs", rev = "c2a47dfea38b215245f739c675da3662c89f1e09" }
|
||||
craft-plotter = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" }
|
||||
craft-dxf = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" }
|
||||
# DWG to DXF bytes, in a child process on desktop builds (acadrust 0.6.6, MPL-2.0, unmodified).
|
||||
craft-dwg = { git = "https://github.com/storytold/craft-libs", rev = "c2a47dfea38b215245f739c675da3662c89f1e09" }
|
||||
craft-dwg = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" }
|
||||
# WMF, EMF and EMF+ reader (craft-libs#778).
|
||||
craft-metafile = { git = "https://github.com/storytold/craft-libs", rev = "c2a47dfea38b215245f739c675da3662c89f1e09" }
|
||||
craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "c2a47dfea38b215245f739c675da3662c89f1e09" }
|
||||
craft-image-codecs = { git = "https://github.com/storytold/craft-libs", rev = "c2a47dfea38b215245f739c675da3662c89f1e09" }
|
||||
craft-gif = { git = "https://github.com/storytold/craft-libs", rev = "c2a47dfea38b215245f739c675da3662c89f1e09" }
|
||||
craft-tiff = { git = "https://github.com/storytold/craft-libs", rev = "c2a47dfea38b215245f739c675da3662c89f1e09" }
|
||||
craft-ps = { git = "https://github.com/storytold/craft-libs", rev = "c2a47dfea38b215245f739c675da3662c89f1e09", default-features = false, features = ["read", "write"] }
|
||||
craft-psd = { git = "https://github.com/storytold/craft-libs", rev = "c2a47dfea38b215245f739c675da3662c89f1e09" }
|
||||
craft-stream-codecs = { git = "https://github.com/storytold/craft-libs", rev = "c2a47dfea38b215245f739c675da3662c89f1e09" }
|
||||
craft-jxl = { git = "https://github.com/storytold/craft-libs", rev = "c2a47dfea38b215245f739c675da3662c89f1e09" }
|
||||
craft-codepage = { git = "https://github.com/storytold/craft-libs", rev = "c2a47dfea38b215245f739c675da3662c89f1e09" }
|
||||
craft-metafile = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" }
|
||||
craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" }
|
||||
craft-image-codecs = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" }
|
||||
craft-gif = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" }
|
||||
craft-tiff = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" }
|
||||
craft-ps = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8", default-features = false, features = ["read", "write"] }
|
||||
craft-psd = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" }
|
||||
craft-stream-codecs = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" }
|
||||
craft-jxl = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" }
|
||||
craft-codepage = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" }
|
||||
# The metallic-roughness BRDF and environment light the 3D effects' Roughness and Metallic shade with.
|
||||
craft-pbr = { git = "https://github.com/storytold/craft-libs", rev = "c2a47dfea38b215245f739c675da3662c89f1e09" }
|
||||
craft-pbr = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" }
|
||||
# The CPU rasterizer that draws a 3D effect's Render Settings › Rendered image: depth-buffered triangles, shadow maps.
|
||||
craft-raster3d = { git = "https://github.com/storytold/craft-libs", rev = "c2a47dfea38b215245f739c675da3662c89f1e09" }
|
||||
craft-raster3d = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" }
|
||||
# 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 = "c2a47dfea38b215245f739c675da3662c89f1e09" }
|
||||
craft = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" }
|
||||
# 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 = "c2a47dfea38b215245f739c675da3662c89f1e09" }
|
||||
craft-theme = { git = "https://github.com/storytold/craft-libs", rev = "c2a47dfea38b215245f739c675da3662c89f1e09" }
|
||||
craft-fonts-build = { git = "https://github.com/storytold/craft-libs", rev = "c2a47dfea38b215245f739c675da3662c89f1e09" }
|
||||
craft-color-ui = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" }
|
||||
craft-theme = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" }
|
||||
craft-fonts-build = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" }
|
||||
# Nightly profile isolation, launch protocol, and security fence.
|
||||
craft-nightly = { git = "https://github.com/storytold/craft-libs", rev = "c2a47dfea38b215245f739c675da3662c89f1e09" }
|
||||
craft-nightly = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" }
|
||||
# internal
|
||||
vectorcraft-geom = { path = "crates/geom" }
|
||||
vectorcraft-color = { path = "crates/color" }
|
||||
@@ -200,24 +200,25 @@ lto = "thin"
|
||||
codegen-units = 1
|
||||
|
||||
[patch.crates-io]
|
||||
hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "c2a47dfea38b215245f739c675da3662c89f1e09" }
|
||||
hayro-interpret = { git = "https://github.com/storytold/craft-libs", rev = "c2a47dfea38b215245f739c675da3662c89f1e09" }
|
||||
hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "c2a47dfea38b215245f739c675da3662c89f1e09" }
|
||||
hayro-cmap = { git = "https://github.com/storytold/craft-libs", rev = "c2a47dfea38b215245f739c675da3662c89f1e09" }
|
||||
hayro-postscript = { git = "https://github.com/storytold/craft-libs", rev = "c2a47dfea38b215245f739c675da3662c89f1e09" }
|
||||
krilla = { git = "https://github.com/storytold/craft-libs", rev = "c2a47dfea38b215245f739c675da3662c89f1e09" }
|
||||
linesweeper = { git = "https://github.com/storytold/craft-libs", rev = "c2a47dfea38b215245f739c675da3662c89f1e09" }
|
||||
hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" }
|
||||
hayro-interpret = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" }
|
||||
hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" }
|
||||
hayro-cmap = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" }
|
||||
hayro-postscript = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" }
|
||||
krilla = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" }
|
||||
linesweeper = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" }
|
||||
# skrifa 0.44 (epaint, glifo, usvg) with the automatic hinter's long blue-zone exit (craft-libs vendor/skrifa).
|
||||
# It stays at this rev until craft-libs#5222 merges.
|
||||
skrifa = { git = "https://github.com/storytold/craft-libs", rev = "37d0532f42eb3421769c8a454e3e25a20fbcff97" }
|
||||
ecolor = { git = "https://github.com/storytold/egui.git", rev = "861d60a65c50850e995bbb3dcee7c1f3b06815f6" }
|
||||
emath = { git = "https://github.com/storytold/egui.git", rev = "861d60a65c50850e995bbb3dcee7c1f3b06815f6" }
|
||||
epaint = { git = "https://github.com/storytold/egui.git", rev = "861d60a65c50850e995bbb3dcee7c1f3b06815f6" }
|
||||
epaint_default_fonts = { git = "https://github.com/storytold/egui.git", rev = "861d60a65c50850e995bbb3dcee7c1f3b06815f6" }
|
||||
egui = { git = "https://github.com/storytold/egui.git", rev = "861d60a65c50850e995bbb3dcee7c1f3b06815f6" }
|
||||
egui-winit = { git = "https://github.com/storytold/egui.git", rev = "861d60a65c50850e995bbb3dcee7c1f3b06815f6" }
|
||||
egui-wgpu = { git = "https://github.com/storytold/egui.git", rev = "861d60a65c50850e995bbb3dcee7c1f3b06815f6" }
|
||||
egui_glow = { git = "https://github.com/storytold/egui.git", rev = "861d60a65c50850e995bbb3dcee7c1f3b06815f6" }
|
||||
egui_extras = { git = "https://github.com/storytold/egui.git", rev = "861d60a65c50850e995bbb3dcee7c1f3b06815f6" }
|
||||
egui_kittest = { git = "https://github.com/storytold/egui.git", rev = "861d60a65c50850e995bbb3dcee7c1f3b06815f6" }
|
||||
eframe = { git = "https://github.com/storytold/egui.git", rev = "861d60a65c50850e995bbb3dcee7c1f3b06815f6" }
|
||||
winit = { git = "https://github.com/storytold/winit.git", rev = "0dfcec0eb62fda5904137a63a6dd0c3d83295f45" }
|
||||
ecolor = { git = "https://github.com/storytold/egui.git", rev = "399fc6e0ea65059e37de680f11ebbd177bf7d4ff" }
|
||||
emath = { git = "https://github.com/storytold/egui.git", rev = "399fc6e0ea65059e37de680f11ebbd177bf7d4ff" }
|
||||
epaint = { git = "https://github.com/storytold/egui.git", rev = "399fc6e0ea65059e37de680f11ebbd177bf7d4ff" }
|
||||
epaint_default_fonts = { git = "https://github.com/storytold/egui.git", rev = "399fc6e0ea65059e37de680f11ebbd177bf7d4ff" }
|
||||
egui = { git = "https://github.com/storytold/egui.git", rev = "399fc6e0ea65059e37de680f11ebbd177bf7d4ff" }
|
||||
egui-winit = { git = "https://github.com/storytold/egui.git", rev = "399fc6e0ea65059e37de680f11ebbd177bf7d4ff" }
|
||||
egui-wgpu = { git = "https://github.com/storytold/egui.git", rev = "399fc6e0ea65059e37de680f11ebbd177bf7d4ff" }
|
||||
egui_glow = { git = "https://github.com/storytold/egui.git", rev = "399fc6e0ea65059e37de680f11ebbd177bf7d4ff" }
|
||||
egui_extras = { git = "https://github.com/storytold/egui.git", rev = "399fc6e0ea65059e37de680f11ebbd177bf7d4ff" }
|
||||
egui_kittest = { git = "https://github.com/storytold/egui.git", rev = "399fc6e0ea65059e37de680f11ebbd177bf7d4ff" }
|
||||
eframe = { git = "https://github.com/storytold/egui.git", rev = "399fc6e0ea65059e37de680f11ebbd177bf7d4ff" }
|
||||
winit = { git = "https://github.com/storytold/winit.git", rev = "3fd7ae64762f82a73b78bd24f453f82c4291067d" }
|
||||
@@ -28,7 +28,7 @@ egui_extras = { workspace = true }
|
||||
# `wgpu` pulls egui-wgpu's defaults: WebGPU plus the WebGL2 fallback.
|
||||
eframe = { workspace = true, features = ["default_fonts", "wgpu", "accesskit"] }
|
||||
# The page command API (storytold/craft-libs#413): the request plumbing behind window.vectorcraft.
|
||||
craft-web-api = { git = "https://github.com/storytold/craft-libs", rev = "c2a47dfea38b215245f739c675da3662c89f1e09", version = "0.1.0" }
|
||||
craft-web-api = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8", version = "0.1.0" }
|
||||
|
||||
wasm-bindgen = "0.2"
|
||||
serde_json = { workspace = true }
|
||||
|
||||
@@ -0,0 +1,115 @@
|
||||
//! Block definitions and INSERT entities for the DXF writer.
|
||||
//!
|
||||
//! Temporary: `craft_dxf::drawing` at the pinned craft-libs revision writes only the model and
|
||||
//! paper space blocks. storytold/craft-libs#5381 adds `Block`, `Drawing::blocks` and
|
||||
//! `Codes::insert`; once it merges and the pin moves past it, this module is removed and
|
||||
//! `scene.rs` uses those instead. Until then [`write`] adds the user blocks to the file that
|
||||
//! `Drawing::write` returns, with the same group codes #5381 writes.
|
||||
|
||||
use craft_dxf::drawing::{Codes, Drawing, Handle, fixed};
|
||||
|
||||
/// A block definition: entities written once, which INSERT entities place ([`insert`]). Its base
|
||||
/// point is the origin.
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct Block {
|
||||
pub name: String,
|
||||
/// The handle of its BLOCK_RECORD (from R13), which owns its entities.
|
||||
pub record: Handle,
|
||||
/// The handles of its BLOCK and ENDBLK records.
|
||||
pub begin: Handle,
|
||||
pub end: Handle,
|
||||
/// The entities' group codes, written with `record` as their owner.
|
||||
pub entities: String,
|
||||
}
|
||||
|
||||
/// The start of an object: its type, and from R13 its handle, owner and first subclass.
|
||||
fn object(c: &mut Codes, kind: &str, h: Handle, owner: Handle, subclass: &str) {
|
||||
c.raw(0, kind);
|
||||
if c.v.handles() {
|
||||
c.handle(5, h);
|
||||
c.handle(330, owner);
|
||||
c.raw(100, subclass);
|
||||
}
|
||||
}
|
||||
|
||||
/// An INSERT entity owned by `owner` on `layer` that places block `block` at the origin, unscaled
|
||||
/// and unrotated. It has no color of its own (ByLayer).
|
||||
pub fn insert(c: &mut Codes, h: Handle, owner: Handle, layer: &str, block: &str) {
|
||||
object(c, "INSERT", h, owner, "AcDbEntity");
|
||||
c.str(8, layer);
|
||||
if c.v.handles() {
|
||||
c.raw(100, "AcDbBlockReference");
|
||||
}
|
||||
c.str(2, block);
|
||||
c.xyz(10, 0.0, 0.0);
|
||||
}
|
||||
|
||||
/// The whole file of `d` with `blocks` written after the model and paper space blocks.
|
||||
pub fn write(d: Drawing, blocks: &[Block]) -> String {
|
||||
let v = d.version;
|
||||
let out = d.write();
|
||||
if blocks.is_empty() {
|
||||
return out;
|
||||
}
|
||||
let mut defs = Codes::new(v);
|
||||
for b in blocks {
|
||||
object(&mut defs, "BLOCK", b.begin, b.record, "AcDbEntity");
|
||||
defs.raw(8, "0");
|
||||
if v.handles() {
|
||||
defs.raw(100, "AcDbBlockBegin");
|
||||
}
|
||||
defs.str(2, &b.name);
|
||||
defs.int(70, 0);
|
||||
defs.xyz(10, 0.0, 0.0);
|
||||
defs.str(3, &b.name);
|
||||
defs.raw(1, "");
|
||||
defs.append(&b.entities);
|
||||
object(&mut defs, "ENDBLK", b.end, b.record, "AcDbEntity");
|
||||
defs.raw(8, "0");
|
||||
if v.handles() {
|
||||
defs.raw(100, "AcDbBlockEnd");
|
||||
}
|
||||
}
|
||||
let defs = defs.into_string();
|
||||
if !v.handles() {
|
||||
// R12 has no model and paper space blocks: its BLOCKS section holds the user blocks only.
|
||||
let at = " 0\nSECTION\n 2\nENTITIES\n";
|
||||
return match out.find(at) {
|
||||
Some(i) => format!("{} 0\nSECTION\n 2\nBLOCKS\n{defs} 0\nENDSEC\n{}", &out[..i], &out[i..]),
|
||||
None => out,
|
||||
};
|
||||
}
|
||||
let mut records = Codes::new(v);
|
||||
for b in blocks {
|
||||
object(&mut records, "BLOCK_RECORD", b.record, fixed::BLOCK_RECORD_TABLE, "AcDbSymbolTableRecord");
|
||||
records.raw(100, "AcDbBlockTableRecord");
|
||||
records.str(2, &b.name);
|
||||
if v.r2000() {
|
||||
records.handle(340, Handle(0));
|
||||
records.int(70, 0);
|
||||
records.int(280, 1);
|
||||
records.int(281, 0);
|
||||
}
|
||||
}
|
||||
let records = records.into_string();
|
||||
let (Some(table), Some(blocks_at)) = (out.find(" 0\nTABLE\n 2\nBLOCK_RECORD\n"), out.find(" 0\nSECTION\n 2\nBLOCKS\n")) else {
|
||||
return out;
|
||||
};
|
||||
let count = " 70\n2\n";
|
||||
let (Some(c), Some(t_end), Some(b_end)) = (
|
||||
out[table..].find(count).map(|i| table + i),
|
||||
out[table..].find(" 0\nENDTAB\n").map(|i| table + i),
|
||||
out[blocks_at..].find(" 0\nENDSEC\n").map(|i| blocks_at + i),
|
||||
) else {
|
||||
return out;
|
||||
};
|
||||
let mut s = String::with_capacity(out.len() + records.len() + defs.len());
|
||||
s.push_str(&out[..c]);
|
||||
s.push_str(&format!(" 70\n{}\n", 2 + blocks.len()));
|
||||
s.push_str(&out[c + count.len()..t_end]);
|
||||
s.push_str(&records);
|
||||
s.push_str(&out[t_end..b_end]);
|
||||
s.push_str(&defs);
|
||||
s.push_str(&out[b_end..]);
|
||||
s
|
||||
}
|
||||
@@ -5,7 +5,8 @@
|
||||
//! layer (hidden ones switched off, locked ones locked, non-printing ones not plotted), paths
|
||||
//! become polylines (straight segments) or cubic splines (curves), fills their outlines and solid
|
||||
//! hatches, type text entities or glyph outlines, and placed images image entities linked to PNG
|
||||
//! or JPEG files the caller writes next to the drawing. Coordinates are y-up, in drawing units: `scale` units per
|
||||
//! or JPEG files the caller writes next to the drawing; with [`DxfOptions::group_blocks`] groups
|
||||
//! become blocks placed by INSERT entities. Coordinates are y-up, in drawing units: `scale` units per
|
||||
//! `unit` of the art, with the origin at the bottom-left corner of [`DxfOptions::region`].
|
||||
//! [`export_drawings`] writes one such drawing for each of several regions, applying the live
|
||||
//! effects once for all of them.
|
||||
@@ -26,6 +27,8 @@
|
||||
#![doc(test(attr(deny(unsafe_code))))]
|
||||
|
||||
mod aci;
|
||||
// Temporary until storytold/craft-libs#5381 merges and the craft-libs pin moves past it.
|
||||
mod blocks_compat;
|
||||
pub mod dwg;
|
||||
#[cfg(test)]
|
||||
mod expansion_test;
|
||||
@@ -316,6 +319,10 @@ pub struct DxfOptions {
|
||||
pub alter_paths: bool,
|
||||
/// Type is written as glyph outlines (always with [`Preserve::Appearance`]).
|
||||
pub outline_text: bool,
|
||||
/// Always Export Group as Block Reference: each group is written as a block definition of its
|
||||
/// contents, placed by an INSERT entity on the group's layer (groups inside it are blocks
|
||||
/// placed inside that block). Off: a group's contents are written as plain entities.
|
||||
pub group_blocks: bool,
|
||||
/// The drawing's origin is this region's bottom-left corner (document space).
|
||||
pub region: Rect,
|
||||
/// Leave out objects entirely outside `region` (one drawing per artboard).
|
||||
@@ -336,6 +343,7 @@ impl Default for DxfOptions {
|
||||
preserve: Preserve::default(),
|
||||
alter_paths: false,
|
||||
outline_text: false,
|
||||
group_blocks: false,
|
||||
region: Rect::ZERO,
|
||||
crop: false,
|
||||
}
|
||||
|
||||
+51
-13
@@ -2,7 +2,8 @@
|
||||
//! order. Fills are their outlines then solid hatches (the outlines alone in R12 or with
|
||||
//! hatches left out), placed images are linked image files unless left out, strokes
|
||||
//! polylines (with bulges for circular arcs) and cubic splines with a lineweight and dashes, or
|
||||
//! filled outlines where the look needs them.
|
||||
//! filled outlines where the look needs them. With [`DxfOptions::group_blocks`] each group is a
|
||||
//! block, placed by an INSERT.
|
||||
|
||||
use std::collections::HashMap;
|
||||
|
||||
@@ -14,6 +15,8 @@ use vectorcraft_geom::{Affine, BezPath, FillRule, PathData, Point, Rect, Vec2};
|
||||
|
||||
use crate::aci::nearest_aci;
|
||||
use crate::{CAP_HEIGHT, ColorDepth, DxfImage, DxfOptions, DxfOutput, MAX_NEST, Preserve, RasterFormat};
|
||||
// Block and the INSERT writer come from craft-libs#5381 once it merges; see `blocks_compat`.
|
||||
use crate::blocks_compat::Block;
|
||||
use craft_dxf::drawing::{Codes, Drawing, EntityStyle, Handle, ImageDef, Layer, LineType, STANDARD_STYLE, fixed};
|
||||
|
||||
/// Curves are flattened to within this distance (points) where DXF needs straight segments
|
||||
@@ -503,8 +506,13 @@ pub(crate) struct Scene<'a> {
|
||||
to_dxf: Affine,
|
||||
/// Drawing units per point.
|
||||
k: f64,
|
||||
/// The entities written so far.
|
||||
/// The entities written so far: those of model space, or of the group block being written.
|
||||
e: Codes,
|
||||
/// The owner of the entities in `e`: model space, or the group block's record.
|
||||
owner: Handle,
|
||||
/// Group blocks written so far ([`DxfOptions::group_blocks`]), each after the blocks it inserts.
|
||||
blocks: Vec<Block>,
|
||||
block_names: Names,
|
||||
next: u32,
|
||||
layers: Vec<Layer>,
|
||||
layer_names: Names,
|
||||
@@ -544,6 +552,9 @@ impl<'a> Scene<'a> {
|
||||
to_dxf: Affine::new([k, 0.0, 0.0, -k, -r.x0 * k, r.y1 * k]),
|
||||
k,
|
||||
e: Codes::new(o.version.into()),
|
||||
owner: fixed::MODEL_RECORD,
|
||||
blocks: vec![],
|
||||
block_names: Names::with(&["*Model_Space", "*Paper_Space"]),
|
||||
next: fixed::FIRST_FREE,
|
||||
layers: vec![],
|
||||
layer_names: Names::with(&["0", "Defpoints"]),
|
||||
@@ -593,7 +604,12 @@ impl<'a> Scene<'a> {
|
||||
metric: matches!(self.o.unit, Unit::Millimeters | Unit::Centimeters | Unit::Meters),
|
||||
next: self.next,
|
||||
};
|
||||
DxfOutput { bytes: drawing.write().into_bytes(), images: self.files, warnings: self.warnings, setting_notes: self.setting_notes }
|
||||
DxfOutput {
|
||||
bytes: crate::blocks_compat::write(drawing, &self.blocks).into_bytes(),
|
||||
images: self.files,
|
||||
warnings: self.warnings,
|
||||
setting_notes: self.setting_notes,
|
||||
}
|
||||
}
|
||||
|
||||
/// Note `w`, once, about something of the document that the drawing leaves out or that reaches
|
||||
@@ -660,6 +676,7 @@ impl<'a> Scene<'a> {
|
||||
self.children(children, *clip);
|
||||
(self.layer, self.flags) = outer;
|
||||
}
|
||||
NodeKind::Group { children, clip } if self.o.group_blocks => self.group_block(n, children, *clip),
|
||||
NodeKind::Group { children, clip } => self.children(children, *clip),
|
||||
NodeKind::Path { path, rule, guide, .. } => {
|
||||
if !*guide {
|
||||
@@ -754,6 +771,27 @@ impl<'a> Scene<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
/// Group `n` as a block of its children's entities and an INSERT that places it on the current
|
||||
/// layer ([`DxfOptions::group_blocks`]). The block's base point is the drawing's origin, so its
|
||||
/// entities keep their coordinates. A group that writes no entity writes no block.
|
||||
fn group_block(&mut self, n: &Node, children: &[std::sync::Arc<Node>], clip: bool) {
|
||||
let (record, begin, end, insert) = (self.handle(), self.handle(), self.handle(), self.handle());
|
||||
let outer = std::mem::replace(&mut self.e, Codes::new(self.o.version.into()));
|
||||
let owner = std::mem::replace(&mut self.owner, record);
|
||||
self.children(children, clip);
|
||||
let entities = std::mem::replace(&mut self.e, outer).into_string();
|
||||
self.owner = owner;
|
||||
if entities.is_empty() {
|
||||
return;
|
||||
}
|
||||
let long = self.o.version.r2000();
|
||||
let base = symbol_name(n.name.as_deref().unwrap_or_default(), long);
|
||||
let base = if base.is_empty() { symbol_name("Group", long) } else { base };
|
||||
let name = self.block_names.unique(&base, if long { 255 } else { 31 });
|
||||
crate::blocks_compat::insert(&mut self.e, insert, self.owner, &self.layer, &name);
|
||||
self.blocks.push(Block { name, record, begin, end, entities });
|
||||
}
|
||||
|
||||
/// Warn about what DXF can't hold in `n`'s look.
|
||||
fn note_losses(&mut self, n: &Node) {
|
||||
if n.blend != vectorcraft_color::BlendMode::Normal {
|
||||
@@ -959,7 +997,7 @@ impl<'a> Scene<'a> {
|
||||
}
|
||||
let h = self.handle();
|
||||
let layer = self.layer.clone();
|
||||
self.e.entity("HATCH", h, fixed::MODEL_RECORD, &layer, style, "AcDbHatch");
|
||||
self.e.entity("HATCH", h, self.owner, &layer, style, "AcDbHatch");
|
||||
self.e.xyz(10, 0.0, 0.0);
|
||||
self.e.normal();
|
||||
self.e.raw(2, "SOLID");
|
||||
@@ -1040,7 +1078,7 @@ impl<'a> Scene<'a> {
|
||||
let (a, b) = (self.pt(a), self.pt(b));
|
||||
let layer = self.layer.clone();
|
||||
let h = self.handle();
|
||||
self.e.entity("LINE", h, fixed::MODEL_RECORD, &layer, style, "AcDbLine");
|
||||
self.e.entity("LINE", h, self.owner, &layer, style, "AcDbLine");
|
||||
self.e.xyz(10, a.x, a.y);
|
||||
self.e.xyz(11, b.x, b.y);
|
||||
}
|
||||
@@ -1058,7 +1096,7 @@ impl<'a> Scene<'a> {
|
||||
// Bit 128: a linetype runs on through the vertices instead of restarting at each one.
|
||||
let flags = i64::from(closed) | if style.linetype.is_some() { 128 } else { 0 };
|
||||
if self.o.version.lwpolyline() {
|
||||
self.e.entity("LWPOLYLINE", h, fixed::MODEL_RECORD, &layer, style, "AcDbPolyline");
|
||||
self.e.entity("LWPOLYLINE", h, self.owner, &layer, style, "AcDbPolyline");
|
||||
self.e.int(90, pts.len() as i64);
|
||||
self.e.int(70, flags);
|
||||
if let Some(w) = width {
|
||||
@@ -1072,7 +1110,7 @@ impl<'a> Scene<'a> {
|
||||
}
|
||||
return;
|
||||
}
|
||||
self.e.entity("POLYLINE", h, fixed::MODEL_RECORD, &layer, style, "AcDb2dPolyline");
|
||||
self.e.entity("POLYLINE", h, self.owner, &layer, style, "AcDb2dPolyline");
|
||||
self.e.int(66, 1);
|
||||
self.e.xyz(10, 0.0, 0.0);
|
||||
self.e.int(70, flags);
|
||||
@@ -1134,7 +1172,7 @@ impl<'a> Scene<'a> {
|
||||
let layer = self.layer.clone();
|
||||
let h = self.handle();
|
||||
if sub.closed {
|
||||
self.e.entity("CIRCLE", h, fixed::MODEL_RECORD, &layer, style, "AcDbCircle");
|
||||
self.e.entity("CIRCLE", h, self.owner, &layer, style, "AcDbCircle");
|
||||
self.e.xyz(10, centre.x, centre.y);
|
||||
self.e.num(40, radius);
|
||||
self.e.normal();
|
||||
@@ -1150,7 +1188,7 @@ impl<'a> Scene<'a> {
|
||||
if !on_ccw_arc(a0, a1, am) {
|
||||
std::mem::swap(&mut a0, &mut a1);
|
||||
}
|
||||
self.e.entity("ARC", h, fixed::MODEL_RECORD, &layer, style, "AcDbCircle");
|
||||
self.e.entity("ARC", h, self.owner, &layer, style, "AcDbCircle");
|
||||
self.e.xyz(10, centre.x, centre.y);
|
||||
self.e.num(40, radius);
|
||||
self.e.normal();
|
||||
@@ -1197,7 +1235,7 @@ impl<'a> Scene<'a> {
|
||||
|
||||
let layer = self.layer.clone();
|
||||
let h = self.handle();
|
||||
self.e.entity("ELLIPSE", h, fixed::MODEL_RECORD, &layer, style, "AcDbEllipse");
|
||||
self.e.entity("ELLIPSE", h, self.owner, &layer, style, "AcDbEllipse");
|
||||
self.e.xyz(10, centre.x, centre.y);
|
||||
self.e.xyz(11, axis.x, axis.y);
|
||||
self.e.normal();
|
||||
@@ -1232,7 +1270,7 @@ impl<'a> Scene<'a> {
|
||||
let ctrl: Vec<Point> = ctrl.iter().map(|p| self.pt(*p)).collect();
|
||||
let layer = self.layer.clone();
|
||||
let h = self.handle();
|
||||
self.e.entity("SPLINE", h, fixed::MODEL_RECORD, &layer, style, "AcDbSpline");
|
||||
self.e.entity("SPLINE", h, self.owner, &layer, style, "AcDbSpline");
|
||||
self.e.normal();
|
||||
// Planar (bit 3) and, if the subpath is closed, also closed (bit 0). A geometrically
|
||||
// closed cut needs the closed flag set so CAM/CAM tools (e.g. VCarve) treat it as a
|
||||
@@ -1308,7 +1346,7 @@ impl<'a> Scene<'a> {
|
||||
let p = self.pt(t.xf * origin);
|
||||
let layer = self.layer.clone();
|
||||
let h = self.handle();
|
||||
self.e.entity("TEXT", h, fixed::MODEL_RECORD, &layer, &style, "AcDbText");
|
||||
self.e.entity("TEXT", h, self.owner, &layer, &style, "AcDbText");
|
||||
self.e.xyz(10, p.x, p.y);
|
||||
self.e.num(40, height);
|
||||
let s: String = s.chars().take(MAX_TEXT).collect();
|
||||
@@ -1368,7 +1406,7 @@ impl<'a> Scene<'a> {
|
||||
let def = def.handle;
|
||||
let layer = self.layer.clone();
|
||||
let style = EntityStyle { aci: 7, ..EntityStyle::default() };
|
||||
self.e.entity("IMAGE", handle, fixed::MODEL_RECORD, &layer, &style, "AcDbRasterImage");
|
||||
self.e.entity("IMAGE", handle, self.owner, &layer, &style, "AcDbRasterImage");
|
||||
self.e.int(90, 0);
|
||||
self.e.xyz(10, at.x, at.y);
|
||||
self.e.xyz(11, u.x, u.y);
|
||||
|
||||
@@ -8,6 +8,8 @@ use vectorcraft_geom::{Affine, ParamCurve, PathData, Point, Rect, Shape, shapes}
|
||||
|
||||
use crate::*;
|
||||
|
||||
mod blocks;
|
||||
|
||||
type Pairs = Vec<(i32, String)>;
|
||||
|
||||
/// The `(code, value)` pairs of a DXF file.
|
||||
|
||||
@@ -0,0 +1,125 @@
|
||||
//! Always Export Group as Block Reference: groups written as blocks placed by INSERT entities.
|
||||
|
||||
use super::*;
|
||||
|
||||
/// The user blocks of a drawing (not model or paper space): each its name and the entities
|
||||
/// between its BLOCK and its ENDBLK.
|
||||
fn blocks(out: &DxfOutput) -> Vec<(String, Vec<Pairs>)> {
|
||||
let mut found: Vec<(String, Vec<Pairs>)> = vec![];
|
||||
let mut open = false;
|
||||
for o in section(&pairs(&out.bytes), "BLOCKS") {
|
||||
match kind(&o) {
|
||||
"BLOCK" => {
|
||||
found.push((get(&o, 2).unwrap_or_default().to_string(), vec![]));
|
||||
open = true;
|
||||
}
|
||||
"ENDBLK" => open = false,
|
||||
_ if open => found.last_mut().expect("a block").1.push(o),
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
found.retain(|(name, _)| !name.starts_with('*'));
|
||||
found
|
||||
}
|
||||
|
||||
/// A filled square outside any group; the group `Frame` holding a stroked rectangle and the group
|
||||
/// `Ring` holding a circle, on a second layer `Parts`.
|
||||
fn grouped_doc() -> Document {
|
||||
let mut d = doc_with(|d| vec![path(d, shapes::rectangle(Rect::new(150.0, 10.0, 170.0, 30.0)), Paint::solid(Color::BLACK), Paint::None, 0.0)]);
|
||||
let parts = d.add_layer(Some("Parts"));
|
||||
let rect = path(&mut d, shapes::rectangle(Rect::new(10.0, 10.0, 110.0, 60.0)), Paint::None, Paint::solid(Color::BLACK), 1.0);
|
||||
let circle = path(&mut d, shapes::ellipse(Rect::new(40.0, 20.0, 70.0, 50.0)), Paint::None, Paint::solid(Color::rgb(0.0, 0.0, 1.0)), 1.0);
|
||||
let mut ring = Node::group(d.alloc_id(), vec![Arc::new(circle)]);
|
||||
ring.name = Some("Ring".into());
|
||||
let mut frame = Node::group(d.alloc_id(), vec![Arc::new(rect), Arc::new(ring)]);
|
||||
frame.name = Some("Frame".into());
|
||||
d.insert(Some(parts), usize::MAX, frame).unwrap();
|
||||
d
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn groups_are_blocks_placed_by_inserts_in_every_version() {
|
||||
let d = grouped_doc();
|
||||
for v in DxfVersion::ALL {
|
||||
let out = export(&d, &DxfOptions { version: v, group_blocks: true, ..opts(&d) }).unwrap();
|
||||
let top = entities(&out);
|
||||
let inserts: Vec<&Pairs> = top.iter().filter(|e| kind(e) == "INSERT").collect();
|
||||
assert_eq!(inserts.len(), 1, "{v:?}: the outer group alone is placed in model space");
|
||||
// Before 2000, names are capitals, letters, digits and $-_ only.
|
||||
let long = v >= DxfVersion::R2000;
|
||||
let (frame, ring, parts, first) = if long { ("Frame", "Ring", "Parts", "Layer 1") } else { ("FRAME", "RING", "PARTS", "LAYER_1") };
|
||||
assert_eq!((get(inserts[0], 2), get(inserts[0], 8)), (Some(frame), Some(parts)), "{v:?}");
|
||||
assert!(top.iter().any(|e| kind(e) != "INSERT" && get(e, 8) == Some(first)), "{v:?}: the loose square stays in model space");
|
||||
let found = blocks(&out);
|
||||
let names: Vec<&str> = found.iter().map(|b| b.0.as_str()).collect();
|
||||
assert_eq!(names, [ring, frame], "{v:?}: the inner block comes first");
|
||||
let (ring_entities, frame_entities) = (&found[0].1, &found[1].1);
|
||||
assert!(!ring_entities.is_empty() && ring_entities.iter().all(|e| kind(e) != "INSERT"), "{v:?}: the circle is in its group's block");
|
||||
let nested: Vec<&Pairs> = frame_entities.iter().filter(|e| kind(e) == "INSERT").collect();
|
||||
assert_eq!(nested.len(), 1, "{v:?}: the inner group is placed inside the outer block");
|
||||
assert_eq!(get(nested[0], 2), Some(ring), "{v:?}");
|
||||
assert!(frame_entities.iter().any(|e| kind(e) != "INSERT"), "{v:?}: the rectangle is in the outer block");
|
||||
if v >= DxfVersion::R13 {
|
||||
// Each block's entities are owned by its BLOCK_RECORD, and the INSERTs by what holds them.
|
||||
let records = table(&out, "BLOCK_RECORD");
|
||||
let record = |name: &str| records.iter().find(|r| get(r, 2) == Some(name)).and_then(|r| get(r, 5).map(str::to_string));
|
||||
for (name, ents) in &found {
|
||||
let owner = record(name).unwrap_or_else(|| panic!("{v:?}: no BLOCK_RECORD for {name}"));
|
||||
// A polyline's vertices and its SEQEND are owned by the polyline.
|
||||
let owned: Vec<&Pairs> = ents.iter().filter(|e| !matches!(kind(e), "VERTEX" | "SEQEND")).collect();
|
||||
assert!(!owned.is_empty() && owned.iter().all(|e| get(e, 330) == Some(owner.as_str())), "{v:?}: {name}");
|
||||
}
|
||||
assert_eq!(get(inserts[0], 330).map(str::to_string), record("*Model_Space"), "{v:?}: the outer INSERT is in model space");
|
||||
assert_eq!(get(nested[0], 330).map(str::to_string), record(frame), "{v:?}: the inner INSERT is in the outer block");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn without_the_option_groups_are_written_as_their_contents() {
|
||||
let d = grouped_doc();
|
||||
let out = export(&d, &opts(&d)).unwrap();
|
||||
assert!(blocks(&out).is_empty());
|
||||
assert!(!kinds(&out).iter().any(|k| k == "INSERT"));
|
||||
let with = export(&d, &DxfOptions { group_blocks: true, ..opts(&d) }).unwrap();
|
||||
// The same entities are written, moved into blocks.
|
||||
let count = |o: &DxfOutput| {
|
||||
let drawn = |ents: &[Pairs]| ents.iter().filter(|e| kind(e) != "INSERT").count();
|
||||
drawn(&entities(o)) + blocks(o).iter().map(|b| drawn(&b.1)).sum::<usize>()
|
||||
};
|
||||
assert_eq!(count(&out), count(&with));
|
||||
assert_eq!(header(&pairs(&out.bytes), "$EXTMIN"), header(&pairs(&with.bytes), "$EXTMIN"));
|
||||
assert_eq!(header(&pairs(&out.bytes), "$EXTMAX"), header(&pairs(&with.bytes), "$EXTMAX"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn blocks_read_back_at_the_place_their_group_was() {
|
||||
let d = grouped_doc();
|
||||
let o = ImportOptions { unit: Some(Unit::Points), scale: Some(1.0), center: false, ..ImportOptions::default() };
|
||||
let plain = import(&export(&d, &opts(&d)).unwrap().bytes, &o).unwrap().document;
|
||||
let blocked = import(&export(&d, &DxfOptions { group_blocks: true, ..opts(&d) }).unwrap().bytes, &o).unwrap().document;
|
||||
let names: Vec<&str> = blocked.symbols.iter().map(|s| s.name.as_str()).collect();
|
||||
assert!(names.contains(&"Frame") && names.contains(&"Ring"), "{names:?}");
|
||||
let (a, b) = (plain.art_bounds().unwrap(), blocked.art_bounds().unwrap());
|
||||
assert!(close_to(&[a.x0, a.y0, a.x1, a.y1], &[b.x0, b.y0, b.x1, b.y1], 1e-6), "{a:?} against {b:?}");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_group_with_nothing_written_is_no_block_and_names_stay_unique() {
|
||||
let mut d = Document::new(200.0, 100.0);
|
||||
let layer = d.layers[0].id;
|
||||
let mut hidden = path(&mut d, shapes::rectangle(Rect::new(0.0, 0.0, 5.0, 5.0)), Paint::solid(Color::BLACK), Paint::None, 0.0);
|
||||
hidden.visible = false;
|
||||
let empty = Node::group(d.alloc_id(), vec![Arc::new(hidden)]);
|
||||
d.insert(Some(layer), usize::MAX, empty).unwrap();
|
||||
for name in [Some("Part"), Some("part"), None, Some("*Model_Space")] {
|
||||
let p = path(&mut d, shapes::rectangle(Rect::new(10.0, 10.0, 20.0, 20.0)), Paint::solid(Color::BLACK), Paint::None, 0.0);
|
||||
let mut g = Node::group(d.alloc_id(), vec![Arc::new(p)]);
|
||||
g.name = name.map(str::to_string);
|
||||
d.insert(Some(layer), usize::MAX, g).unwrap();
|
||||
}
|
||||
let out = export(&d, &DxfOptions { group_blocks: true, ..opts(&d) }).unwrap();
|
||||
let names: Vec<String> = blocks(&out).into_iter().map(|b| b.0).collect();
|
||||
assert_eq!(names, ["Part", "part_2", "Group", "_Model_Space"], "the hidden-only group writes no block");
|
||||
assert_eq!(kinds(&out).iter().filter(|k| *k == "INSERT").count(), 4);
|
||||
}
|
||||
@@ -22,7 +22,7 @@ pub fn specs() -> Vec<CommandSpec> {
|
||||
"Export DXF",
|
||||
[],
|
||||
None,
|
||||
"{path?, dxfPreset?: custom (default)|cnc (CNC / CAM: version 2000, the oldest version that has both lightweight polylines and lineweights; unit mm, scale 1; colors 256, all 2000 holds; preserve editability and alterPaths false, so strokes stay center lines; outlineText true, so type is paths; includeImages and includeHatches false, so fills are their outlines and no image files are written; rasterFormat png; the options given override it), version?: R12|R13|R14|2000|2004|2007|2010|2013|2018 (default), unit?: mm (default; any unit name: pt, in, cm…), scale?: 1 (drawing units per unit), scaleLineweights?: false, colors?: 8|16|256|true (default; true colour needs 2004+, else 256), rasterFormat?: png (default)|jpeg (placed images, written next to the file), includeImages?: true (false: placed images and their files are left out), includeHatches?: true (false: fills are their outlines, without solid hatches), preserve?: appearance (default: type as outlines; strokes a CAD line can't draw as filled outlines; brush art)|editability (type as text; every stroke a line with its lineweight and dashes), alterPaths?: false (strokes a CAD line can't draw as their filled outlines, with editability too; also strokes wider than 2.11 mm, and every stroke in R13 and R14), outlineText?: false, selectedOnly?: false (the selected objects, in their layers), artboard?: 0 (the origin is its bottom-left corner), useArtboards?: true (one drawing per chosen artboard, artboards?/range?, holding the art over it: {stem}-{artboard}.dxf) | false (the origin at the art's bounds)} → {path, bytes, warnings, files?, linked?: [image files]}; no path → {dataBase64, …, linked?: [{name, dataBase64}]}. Layers become DXF layers (hidden: off; locked; non-printing: not plotted); paths become polylines and splines, fills their outlines (which laser and cutter software reads) and solid hatches. Same as document.export {format: dxf}. A key DXF doesn't take is refused",
|
||||
"{path?, dxfPreset?: custom (default)|cnc (CNC / CAM: version 2000, the oldest version that has both lightweight polylines and lineweights; unit mm, scale 1; colors 256, all 2000 holds; preserve editability and alterPaths false, so strokes stay center lines; outlineText true, so type is paths; includeImages and includeHatches false, so fills are their outlines and no image files are written; rasterFormat png; the options given override it), version?: R12|R13|R14|2000|2004|2007|2010|2013|2018 (default), unit?: mm (default; any unit name: pt, in, cm…), scale?: 1 (drawing units per unit), scaleLineweights?: false, colors?: 8|16|256|true (default; true colour needs 2004+, else 256), rasterFormat?: png (default)|jpeg (placed images, written next to the file), includeImages?: true (false: placed images and their files are left out), includeHatches?: true (false: fills are their outlines, without solid hatches), preserve?: appearance (default: type as outlines; strokes a CAD line can't draw as filled outlines; brush art)|editability (type as text; every stroke a line with its lineweight and dashes), alterPaths?: false (strokes a CAD line can't draw as their filled outlines, with editability too; also strokes wider than 2.11 mm, and every stroke in R13 and R14), outlineText?: false, groupBlocks?: false (Always Export Group as Block Reference: each group a block of its contents, nested groups blocks inside it, placed by an INSERT on the group's layer), selectedOnly?: false (the selected objects, in their layers), artboard?: 0 (the origin is its bottom-left corner), useArtboards?: true (one drawing per chosen artboard, artboards?/range?, holding the art over it: {stem}-{artboard}.dxf) | false (the origin at the art's bounds)} → {path, bytes, warnings, files?, linked?: [image files]}; no path → {dataBase64, …, linked?: [{name, dataBase64}]}. Layers become DXF layers (hidden: off; locked; non-printing: not plotted); paths become polylines and splines, fills their outlines (which laser and cutter software reads) and solid hatches. Same as document.export {format: dxf}. A key DXF doesn't take is refused",
|
||||
has_doc,
|
||||
export_dxf
|
||||
)]
|
||||
@@ -86,6 +86,12 @@ pub(crate) const OPTIONS: &[FormatOption] = &[
|
||||
description: "Alter Paths for Appearance: strokes a CAD line can't draw as their filled outlines, with editability too; also strokes wider than 2.11 mm, and every stroke in R13 and R14",
|
||||
},
|
||||
FormatOption { name: "outlineText", ty: "boolean", default: "false", description: "type as glyph outlines (always with preserve: appearance)" },
|
||||
FormatOption {
|
||||
name: "groupBlocks",
|
||||
ty: "boolean",
|
||||
default: "false",
|
||||
description: "Always Export Group as Block Reference: each group is a block, placed by an INSERT on its layer",
|
||||
},
|
||||
FormatOption { name: "selectedOnly", ty: "boolean", default: "false", description: "only the selected objects, in their layers" },
|
||||
];
|
||||
|
||||
@@ -149,6 +155,7 @@ struct Params {
|
||||
preserve: Option<String>,
|
||||
alter_paths: Option<bool>,
|
||||
outline_text: Option<bool>,
|
||||
group_blocks: Option<bool>,
|
||||
}
|
||||
|
||||
/// A string or number param as text (`2018` and `"2018"` alike).
|
||||
@@ -194,6 +201,7 @@ fn parse(p: &Value) -> Result<(DxfOptions, ArtboardPick)> {
|
||||
preserve: choice("preserve", q.preserve, Preserve::from_id, d.preserve, "appearance or editability")?,
|
||||
alter_paths: q.alter_paths.unwrap_or(d.alter_paths),
|
||||
outline_text: q.outline_text.unwrap_or(d.outline_text),
|
||||
group_blocks: q.group_blocks.unwrap_or(d.group_blocks),
|
||||
..d
|
||||
};
|
||||
Ok((opts, q.boards))
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
//! layers and artboards (its manifest's `outputKinds`): the artboards it returns replace the one
|
||||
//! around the art of a new document, and File › Place leaves them out.
|
||||
|
||||
use std::borrow::Cow;
|
||||
use std::sync::Arc;
|
||||
|
||||
use serde_json::Value;
|
||||
@@ -202,17 +203,43 @@ fn read_path_for(path: &str, _: &Value, _: Mode, _: &str) -> Result<Vec<u8>> {
|
||||
/// The file `file.place`'s params `p` name, as [`super::source`] reads it for command `cmd`, except
|
||||
/// that a file an importer would place (one `importer` names, or an extension no built-in format
|
||||
/// reads that an importer which places its files lists) is read, or decoded, only when it is at
|
||||
/// most [`import::MAX_INPUT_BYTES`] long.
|
||||
pub(crate) fn place_source<'a>(p: &'a Value, cmd: &str) -> Result<Source<'a>> {
|
||||
/// most [`import::MAX_INPUT_BYTES`] long. `given`: the bytes of the file `path` names, read already,
|
||||
/// which are borrowed instead of reading the path again (by the same size rule).
|
||||
pub(crate) fn place_source<'a, 'b>(p: &'a Value, cmd: &str, given: Option<&'b [u8]>) -> Result<PlaceSource<'a, 'b>> {
|
||||
match str_param(p, "path") {
|
||||
Some(path) => Ok(Source { name: path, bytes: read_path_for(path, p, Mode::Place, cmd)?, path: Some(path) }),
|
||||
Some(path) => {
|
||||
let bytes: Cow<'b, [u8]> = match given {
|
||||
Some(bytes) => {
|
||||
// The roots in force now still apply to the path, though it is not read again.
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
super::may_read(path)?;
|
||||
let explicit = named(p, cmd)?.is_some();
|
||||
let importer = explicit || importer_reads(&extension(path), Mode::Place);
|
||||
let built_in = !explicit && detect(path, bytes.get(..SNIFF_BYTES).unwrap_or(bytes)).is_some();
|
||||
if importer && !built_in && bytes.len() > import::MAX_INPUT_BYTES {
|
||||
return Err(too_large(path, Mode::Place));
|
||||
}
|
||||
Cow::Borrowed(bytes)
|
||||
}
|
||||
None => Cow::Owned(read_path_for(path, p, Mode::Place, cmd)?),
|
||||
};
|
||||
Ok(PlaceSource { name: path, bytes, path: Some(path) })
|
||||
}
|
||||
None => {
|
||||
check_data_for(p, Mode::Place, cmd)?;
|
||||
super::source(p, cmd)
|
||||
let Source { name, bytes, path } = super::source(p, cmd)?;
|
||||
Ok(PlaceSource { name, bytes: Cow::Owned(bytes), path })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// The file [`place_source`] gives: as [`Source`], its bytes borrowed when they were given.
|
||||
pub(crate) struct PlaceSource<'a, 'b> {
|
||||
pub name: &'a str,
|
||||
pub bytes: Cow<'b, [u8]>,
|
||||
pub path: Option<&'a str>,
|
||||
}
|
||||
|
||||
/// What [`read`] gives: the importer's format, the new document, its objects' ids, the artboards
|
||||
/// the importer returned and its warnings.
|
||||
type Read = (&'static Format, Document, Vec<NodeId>, Vec<import::OutArtboard>, Vec<String>);
|
||||
|
||||
@@ -174,6 +174,27 @@ fn placed_images_come_back_as_linked_files() {
|
||||
let _ = std::fs::remove_dir_all(dir);
|
||||
}
|
||||
|
||||
/// `groupBlocks` writes a group as an INSERT of a block holding its contents; off by default, and
|
||||
/// not set by CNC / CAM.
|
||||
#[test]
|
||||
fn group_blocks_write_a_group_as_an_insert() {
|
||||
let mut s = two_boards();
|
||||
s.execute("select.all", &json!({})).unwrap();
|
||||
s.execute("object.group", &json!({})).unwrap();
|
||||
let plain = s.execute("document.exportDxf", &json!({})).unwrap();
|
||||
assert_eq!(entities(&text(&plain)), ["LWPOLYLINE", "HATCH", "LWPOLYLINE", "HATCH"]);
|
||||
for (cmd, p) in
|
||||
[("document.exportDxf", json!({"groupBlocks": true})), ("document.export", json!({"format": "dxf", "dxfPreset": "cnc", "groupBlocks": true}))]
|
||||
{
|
||||
let dxf = text(&s.execute(cmd, &p).unwrap());
|
||||
assert_eq!(entities(&dxf), ["INSERT"], "{p}");
|
||||
let blocks = &dxf[dxf.find("\nBLOCKS\n").unwrap()..dxf.find("\nENTITIES\n").unwrap()];
|
||||
assert_eq!(blocks.matches("\nLWPOLYLINE\n").count(), 2, "{p}: the group's rectangles are in its block");
|
||||
}
|
||||
let cnc = s.execute("document.exportDxf", &json!({"dxfPreset": "cnc"})).unwrap();
|
||||
assert!(!entities(&text(&cnc)).contains(&"INSERT".to_string()));
|
||||
}
|
||||
|
||||
/// `includeImages` and `includeHatches` leave out placed images (with their files) and fill
|
||||
/// hatches, each on its own, through both commands, with and without a path; CNC / CAM leaves
|
||||
/// out both, and the options given override it.
|
||||
@@ -259,6 +280,7 @@ fn bad_dxf_options_are_refused() {
|
||||
json!({"alterPaths": "yes"}),
|
||||
json!({"includeImages": "no"}),
|
||||
json!({"includeHatches": 0}),
|
||||
json!({"groupBlocks": "yes"}),
|
||||
] {
|
||||
let e = s.execute("document.exportDxf", &p).unwrap_err().to_string();
|
||||
assert!(e.contains("DXF"), "{p}: {e}");
|
||||
@@ -286,6 +308,7 @@ fn formats_list_dxf_and_what_can_not_be_written() {
|
||||
"preserve",
|
||||
"alterPaths",
|
||||
"outlineText",
|
||||
"groupBlocks",
|
||||
"selectedOnly",
|
||||
"useArtboards",
|
||||
] {
|
||||
|
||||
@@ -3061,6 +3061,22 @@ fn unembed_bytes(blob: &vectorcraft_doc::ImageBlob, ext: &str) -> std::result::R
|
||||
if same { Ok(blob.bytes.to_vec()) } else { convert_image(&blob.bytes, ext) }
|
||||
}
|
||||
|
||||
/// `path` with `.ext` added when it has no extension: the file Unembed writes for a `path` given.
|
||||
fn with_unembed_extension(path: &str, ext: &str) -> String {
|
||||
if fileio::extension(path).is_empty() { format!("{path}.{ext}") } else { path.to_string() }
|
||||
}
|
||||
|
||||
/// The file `links.unembed {id, path}` writes embedded image `id` of the active document to: `path`
|
||||
/// with the extension of the format the image is stored in added when `path` has none. `None` when
|
||||
/// `id` is not an embedded image there.
|
||||
pub fn unembed_path(s: &Session, id: u64, path: &str) -> Option<String> {
|
||||
let st = s.doc().ok()?;
|
||||
let doc = with_brush_art(&st.doc);
|
||||
let im = image_of(&doc, NodeId(id)).filter(|im| im.link.is_none())?;
|
||||
let blob = st.doc.images.get(&im.key)?;
|
||||
Some(with_unembed_extension(path, stored_extension(blob)))
|
||||
}
|
||||
|
||||
fn unembed(s: &mut Session, p: &Value) -> Result<Value> {
|
||||
const C: &str = "links.unembed";
|
||||
let given = |k: &str| p.get(k).is_some_and(|v| !v.is_null());
|
||||
@@ -3097,7 +3113,7 @@ fn unembed(s: &mut Session, p: &Value) -> Result<Value> {
|
||||
let stem = Path::new(&name).file_stem().map_or_else(|| name.clone(), |s| s.to_string_lossy().into_owned());
|
||||
return Ok(json!({ "name": format!("{stem}.{ext}"), "dataBase64": vectorcraft_format::base64_encode(&bytes) }));
|
||||
};
|
||||
let path = absolute_path(&if fileio::extension(path).is_empty() { format!("{path}.{ext}") } else { path.to_string() });
|
||||
let path = absolute_path(&with_unembed_extension(path, &ext));
|
||||
// Read before writing: pixels that can't be read leave no file behind.
|
||||
let img = linked_image(&bytes, Some(&path))?;
|
||||
write_file(&path, &bytes)?;
|
||||
|
||||
@@ -183,13 +183,13 @@ pub(crate) fn pt_per_px(ppi: Option<(f64, f64)>) -> (f64, f64) {
|
||||
|
||||
/// [`load_sliced`] without the slices.
|
||||
fn load(p: &Value, cmd: &str, board: Option<Rect>, link_pdf: bool) -> Result<Loaded> {
|
||||
load_into(p, cmd, board, link_pdf, &mut vec![])
|
||||
load_into(p, cmd, board, link_pdf, None, &mut vec![])
|
||||
}
|
||||
|
||||
/// [`load_into`], with the slices of a PSD or PSB file that `importSlices` brings in.
|
||||
fn load_sliced(p: &Value, cmd: &str, board: Option<Rect>, link_pdf: bool) -> Result<(Loaded, Slices)> {
|
||||
fn load_sliced(p: &Value, cmd: &str, board: Option<Rect>, link_pdf: bool, given: Option<&[u8]>) -> Result<(Loaded, Slices)> {
|
||||
let mut slices = vec![];
|
||||
let l = load_into(p, cmd, board, link_pdf, &mut slices)?;
|
||||
let l = load_into(p, cmd, board, link_pdf, given, &mut slices)?;
|
||||
Ok((l, slices))
|
||||
}
|
||||
|
||||
@@ -197,9 +197,10 @@ fn load_sliced(p: &Value, cmd: &str, board: Option<Rect>, link_pdf: bool) -> Res
|
||||
/// (unless the params name their own box). A PDF/.ai page or an EPS file read from a path is placed
|
||||
/// linked with Link when `link_pdf` (false for the queries, which read it embedded). A PSD or PSB
|
||||
/// file's slices go to `slices`. A file an importer plug-in places (the one `importer` names, or one
|
||||
/// no built-in format reads) is read by it ([`plugin_art`]).
|
||||
fn load_into(p: &Value, cmd: &str, board: Option<Rect>, link_pdf: bool, slices_out: &mut Slices) -> Result<Loaded> {
|
||||
let src = fileio::importer::place_source(p, cmd)?;
|
||||
/// no built-in format reads) is read by it ([`plugin_art`]). `given`: the bytes of the file `p`'s
|
||||
/// `path` names, read already ([`PlaceJob::with_bytes`]).
|
||||
fn load_into(p: &Value, cmd: &str, board: Option<Rect>, link_pdf: bool, given: Option<&[u8]>, slices_out: &mut Slices) -> Result<Loaded> {
|
||||
let src = fileio::importer::place_source(p, cmd, given)?;
|
||||
let name = fileio::file_name(src.name);
|
||||
if let Some(plugin) = fileio::importer::named_for_place(src.name, p, cmd)? {
|
||||
return plugin_art(name, src.name, &src.bytes, &plugin, p, cmd);
|
||||
@@ -760,8 +761,13 @@ pub struct PlaceJob {
|
||||
/// The object Replace swaps as it was when Place started.
|
||||
replaced: Option<Node>,
|
||||
target: Option<Rect>,
|
||||
/// The bytes of the file `path` names, read already ([`PlaceJob::with_bytes`]).
|
||||
bytes: Option<GivenBytes>,
|
||||
}
|
||||
|
||||
/// The bytes of a file read already, shared with whoever read them ([`PlaceJob::with_bytes`]).
|
||||
pub type GivenBytes = Arc<dyn AsRef<[u8]> + Send + Sync>;
|
||||
|
||||
/// A file [`PlaceJob::read`] read, which [`Session::place_read`] places.
|
||||
pub struct PlaceRead {
|
||||
job: PlaceJob,
|
||||
@@ -775,6 +781,14 @@ impl PlaceJob {
|
||||
str_param(&self.params, "path").or_else(|| str_param(&self.params, "name")).map(fileio::file_name).unwrap_or_else(|| "Untitled".into())
|
||||
}
|
||||
|
||||
/// The job placing `bytes` as the file its `path` names, which [`PlaceJob::read`] then does not
|
||||
/// read again: the placed object's link and the journaled params keep the path. Without a
|
||||
/// `path` the bytes are not used.
|
||||
pub fn with_bytes(mut self, bytes: GivenBytes) -> Self {
|
||||
self.bytes = Some(bytes);
|
||||
self
|
||||
}
|
||||
|
||||
/// Read and decode the file, as `file.place` does, without the session. The pixels of a PNG,
|
||||
/// JPEG, GIF or WebP file are decoded here to check that they can be read (an error when they
|
||||
/// can't), a linked image's preview is made from that decode, and the decoded pixels are kept in
|
||||
@@ -782,7 +796,7 @@ impl PlaceJob {
|
||||
/// ([`super::links::readable_and_kept`]).
|
||||
pub fn read(self) -> Result<PlaceRead> {
|
||||
crate::cancel::check()?;
|
||||
let (mut loaded, slices) = load_sliced(&self.params, PLACE, self.target, true)?;
|
||||
let (mut loaded, slices) = load_sliced(&self.params, PLACE, self.target, true, self.bytes.as_deref().map(AsRef::as_ref))?;
|
||||
let linked = loaded.link.is_some() && bool_or(&self.params, "link", true);
|
||||
match &mut loaded.art {
|
||||
Art::Image(img, _) => {
|
||||
@@ -941,12 +955,12 @@ fn prepare(s: &Session, p: &Value) -> Result<PlaceJob> {
|
||||
(true, _) => return Err(bad(PLACE, "replace: select the one object to replace")),
|
||||
};
|
||||
let replaced = old.and_then(|id| st.doc.node(id)).cloned();
|
||||
Ok(PlaceJob { doc: st.uid, params: s.prefs.with_pdf_font_choice(p), old, replaced, target: board_at(&st.doc, at) })
|
||||
Ok(PlaceJob { doc: st.uid, params: s.prefs.with_pdf_font_choice(p), old, replaced, target: board_at(&st.doc, at), bytes: None })
|
||||
}
|
||||
|
||||
/// Place the file `read` holds in the active document.
|
||||
fn apply(s: &mut Session, read: PlaceRead) -> Result<Value> {
|
||||
let PlaceRead { job: PlaceJob { params, old, target: read_for, .. }, mut loaded, slices: read_slices } = read;
|
||||
let PlaceRead { job: PlaceJob { params, old, target: read_for, bytes, .. }, mut loaded, slices: read_slices } = read;
|
||||
let p = ¶ms;
|
||||
let template = bool_or(p, "template", false);
|
||||
let at = at_param(p)?;
|
||||
@@ -957,10 +971,11 @@ fn apply(s: &mut Session, read: PlaceRead) -> Result<Value> {
|
||||
None => None,
|
||||
};
|
||||
// The artboard under `at` as it is now, as a replay of the journal finds it: a DXF drawing laid
|
||||
// out on the artboard it was read for is read again when that artboard changed meanwhile.
|
||||
// out on the artboard it was read for is read again when that artboard changed meanwhile, from
|
||||
// the same bytes when the job was given them.
|
||||
let target = board_at(&st.doc, at);
|
||||
if loaded.board.is_some() && target != read_for {
|
||||
loaded = load(p, PLACE, target, true)?;
|
||||
loaded = load_into(p, PLACE, target, true, bytes.as_deref().map(AsRef::as_ref), &mut vec![])?;
|
||||
}
|
||||
// Type reflows rather than scales: its frame takes the size it is placed at.
|
||||
let is_text = matches!(loaded.art, Art::Text(_));
|
||||
@@ -1347,7 +1362,7 @@ pub fn read_info(p: &Value) -> Result<Value> {
|
||||
check_switches(p, &["link"], "file.place.info")?;
|
||||
check_numbers(p, &["thumbnail"], "file.place.info")?;
|
||||
// A PDF/.ai page linked or not has the same size and art.
|
||||
let (mut l, slices) = load_sliced(p, "file.place.info", None, false)?;
|
||||
let (mut l, slices) = load_sliced(p, "file.place.info", None, false, None)?;
|
||||
let natural = l.natural;
|
||||
let mut out = json!({
|
||||
"name": l.name,
|
||||
|
||||
@@ -603,12 +603,19 @@ fn collect_resources(src: &Document, nodes: &mut [Node], composites: bool) -> (U
|
||||
pub(crate) fn adopt(dst: &mut Document, src: &Document, nodes: &mut [Node], cmd: &str) -> Result<()> {
|
||||
let composites = !src.composite_fonts.is_empty() || !dst.composite_fonts.is_empty();
|
||||
let (used, mut src_brushes, families, dimension_families) = collect_resources(src, nodes, composites);
|
||||
let fonts = src.composite_fonts.iter().filter(|font| families.contains(&font.name.to_lowercase())).cloned().collect::<Vec<_>>();
|
||||
// The source's type was measured without its composite fonts that fail their checks or are
|
||||
// named like an installed font (the font database does not lend them), so they don't come in.
|
||||
let db = vectorcraft_text::FontDb::global();
|
||||
let fonts = src
|
||||
.composite_fonts
|
||||
.iter()
|
||||
.filter(|font| families.contains(&font.name.to_lowercase()) && font.check().is_ok() && !db.has_installed_family(&font.name))
|
||||
.cloned()
|
||||
.collect::<Vec<_>>();
|
||||
// A family the source does not define as a composite font, which the destination defines as
|
||||
// one, would draw in the destination's composite font after placement.
|
||||
let undefined_clash = families
|
||||
.iter()
|
||||
.any(|family| CompositeFont::named(&src.composite_fonts, family).is_none() && CompositeFont::named(&dst.composite_fonts, family).is_some());
|
||||
let undefined_clash =
|
||||
families.iter().any(|family| CompositeFont::named(&fonts, family).is_none() && CompositeFont::named(&dst.composite_fonts, family).is_some());
|
||||
// All representability/validation errors precede incoming or destination mutation.
|
||||
let plan = if fonts.is_empty() && !undefined_clash { None } else { Some(plan_import(fonts, families, dimension_families, dst, cmd)?) };
|
||||
let staged;
|
||||
|
||||
@@ -102,6 +102,27 @@ fn kept_text(session: &mut Session, font: &CompositeFont) -> (NodeId, Node) {
|
||||
(id, document(session).node(id).unwrap().clone())
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn placing_a_document_whose_composite_font_names_an_installed_font_keeps_the_installed_font() {
|
||||
let _context = FontContext::hold();
|
||||
assert!(FontDb::global().has_installed_family("Source Sans 3"), "CONTROL: the bundled test face is installed");
|
||||
let mut source = destination(&[]);
|
||||
source.execute("text.create", &json!({"x": 4, "y": 16, "text": "Ab", "font": "Source Sans 3"})).unwrap();
|
||||
let mut doc: Document = document(&source).clone();
|
||||
*doc.composite_fonts = vec![CompositeFont::new("Source Sans 3", "NativeInstalledNamePart", "Regular")];
|
||||
let dir = TempDir::new("native-composite-installed");
|
||||
let path = dir.join("installed.vectorcraft");
|
||||
let options = vectorcraft_format::SaveOptions { include_linked: true, precision: None, ..Default::default() };
|
||||
std::fs::write(&path, vectorcraft_format::save_with(&doc, &options).unwrap()).unwrap();
|
||||
for linked in [false, true] {
|
||||
let mut session = destination(&[]);
|
||||
let id = place(&mut session, &path, linked);
|
||||
assert_eq!(placed_family(&session, id), "Source Sans 3", "the placed type keeps the installed family it was measured in");
|
||||
let fonts = &document(&session).composite_fonts;
|
||||
assert!(fonts.is_empty(), "no composite font comes in for a name the source could not use: {fonts:?}");
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn native_composite_meanings_survive_editable_and_embedded_placement() {
|
||||
let _context = FontContext::hold();
|
||||
|
||||
@@ -167,6 +167,7 @@ impl VectorcraftApp {
|
||||
hover_object: None,
|
||||
grab: None,
|
||||
carry_target: None,
|
||||
removed_press: false,
|
||||
last_drag: None,
|
||||
escaped_press: false,
|
||||
pressed_at: None,
|
||||
@@ -291,6 +292,7 @@ impl VectorcraftApp {
|
||||
prefs_changed: false,
|
||||
touch_screen: false,
|
||||
automation_roots: None,
|
||||
confined_drop: None,
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
agents: None,
|
||||
pending_plugin_install: None,
|
||||
@@ -365,9 +367,19 @@ impl VectorcraftApp {
|
||||
}
|
||||
|
||||
/// The folders this pass may read and write: the automation roots while the pass carries
|
||||
/// input the control channel injected, anywhere otherwise.
|
||||
/// input the control channel injected, or delivers files the OS dropped in such a pass;
|
||||
/// anywhere otherwise.
|
||||
fn automation_scope(&self, ctx: &egui::Context) -> Option<Arc<AutomationRoots>> {
|
||||
WindowHost::of(ctx).injected_pass().then(|| self.automation_roots.clone()).flatten()
|
||||
let delivers = self.confined_drop.is_some_and(|last| ctx.cumulative_frame_nr_for(egui::ViewportId::ROOT) <= last);
|
||||
(WindowHost::of(ctx).injected_pass() || delivers).then(|| self.automation_roots.clone()).flatten()
|
||||
}
|
||||
|
||||
/// Notes files the OS dropped in a pass that carries injected input: the drag session delivers
|
||||
/// them in the next root frame, which [`Self::automation_scope`] confines too.
|
||||
fn note_confined_drop(&mut self, ctx: &egui::Context) {
|
||||
if WindowHost::of(ctx).injected_pass() && ctx.input(|i| !i.raw.dropped_files.is_empty()) {
|
||||
self.confined_drop = Some(ctx.cumulative_frame_nr_for(egui::ViewportId::ROOT) + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -722,10 +734,6 @@ impl VectorcraftApp {
|
||||
let Ok(mut app) = app.try_borrow_mut() else { return };
|
||||
let app: &mut VectorcraftApp = &mut app;
|
||||
app.canvas.windows.area = Some(ui.available_rect_before_wrap());
|
||||
// Only the shown pass starts the frame's panes: a measuring run before it would drop the last frame's.
|
||||
if !craft::ui::runtime::measure::active(ui.ctx()) {
|
||||
app.canvas.windows.last_noted = std::mem::take(&mut app.canvas.windows.noted);
|
||||
}
|
||||
let floats = crate::doc_windows::current_floats(app);
|
||||
// The current window's body is in its floating window, drawn after this pane: the pane's drop catcher
|
||||
// waits for it ([`crate::doc_windows::show`]).
|
||||
@@ -761,6 +769,7 @@ impl VectorcraftApp {
|
||||
self.perf.early_events_ms = 0.0;
|
||||
}
|
||||
self.adopt_context(&ctx);
|
||||
self.note_confined_drop(&ctx);
|
||||
let confined = self.automation_scope(&ctx);
|
||||
if let Err(msg) = file_access::confine(confined.as_ref(), || {
|
||||
vectorcraft_engine::guard::catch_panic(|| {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use std::cell::RefCell;
|
||||
use std::rc::Rc;
|
||||
|
||||
use craft::ui::dialog::UnsavedChangesDialog;
|
||||
use craft::ui::dialog::HostedUnsavedChangesDialog;
|
||||
use craft::ui::shell::embed::{self, CloseDecision};
|
||||
use craft::ui::testing::Fixture;
|
||||
use serde_json::json;
|
||||
@@ -57,9 +57,9 @@ fn close_frame(app: &mut VectorcraftApp, ctx: &egui::Context) -> Option<CloseDec
|
||||
}
|
||||
|
||||
/// Whether the window's dialog host shows the Unsaved Changes question.
|
||||
// PLAN: assumed shell-w15's `unsaved::close_all` opens `UnsavedChangesDialog` itself on the window's host (the sheet's Tests row names it).
|
||||
// PLAN: assumed shell-w15's `unsaved::close_all` opens `HostedUnsavedChangesDialog` itself on the window's host (the sheet's Tests row names it).
|
||||
fn asks_about_unsaved(app: &VectorcraftApp) -> bool {
|
||||
app.dialogs().is_some_and(|dialogs| dialogs.with(|host| host.get::<UnsavedChangesDialog>().is_some()))
|
||||
app.dialogs().is_some_and(|dialogs| dialogs.with(|host| host.get::<HostedUnsavedChangesDialog>().is_some()))
|
||||
}
|
||||
|
||||
/// The window's close asks about unsaved documents instead of closing the window: with a modified
|
||||
|
||||
@@ -126,6 +126,9 @@ pub struct CanvasCache {
|
||||
/// The uid of the document a tab rest showed while art carried off the canvas waits over it: only its canvas takes
|
||||
/// the art, so a target closed or left by other means carries nothing (`canvas::drops`).
|
||||
pub carry_target: Option<u64>,
|
||||
/// The tool host ended the tool's press with a `Removed` cancel in this pass: the canvas was hidden for a pass, as
|
||||
/// when art carried off it rests on another document's tab and comes back (`tool_adapter::resume_carry`).
|
||||
pub removed_press: bool,
|
||||
/// The last drag the tool was sent and the screen point it was at: when the view scrolls under the held
|
||||
/// pointer, the drag goes on at that point in the scrolled view.
|
||||
pub last_drag: Option<(egui::Pos2, vectorcraft_tools::PointerEvent)>,
|
||||
|
||||
@@ -213,16 +213,11 @@ impl Component for CanvasDrops<'_> {
|
||||
/// the carry it catches: the pane's area is noted instead.
|
||||
pub(crate) fn show(app: &mut VectorcraftApp, ui: &mut Ui, win: Win, kind: BodyKind) {
|
||||
let rect = ui.max_rect();
|
||||
if kind == BodyKind::Pane {
|
||||
if let Some(later) = &mut app.canvas.panes.drops {
|
||||
later.push((win, rect, ui.layer_id()));
|
||||
return;
|
||||
}
|
||||
// A pane outside Tile (a floating window's, the main window's while the current window floats), as shown: a
|
||||
// measuring run's area is not where it draws.
|
||||
if !craft::ui::runtime::measure::active(ui.ctx()) {
|
||||
app.canvas.windows.noted.push((win, rect));
|
||||
}
|
||||
if kind == BodyKind::Pane
|
||||
&& let Some(later) = &mut app.canvas.panes.drops
|
||||
{
|
||||
later.push((win, rect, ui.layer_id()));
|
||||
return;
|
||||
}
|
||||
let view = match kind {
|
||||
BodyKind::Live => app.canvas_view(),
|
||||
@@ -230,7 +225,7 @@ pub(crate) fn show(app: &mut VectorcraftApp, ui: &mut Ui, win: Win, kind: BodyKi
|
||||
};
|
||||
let (Some(view), Some((document, reverts))) = (view, app.session.documents().get(win.0).map(|d| (d.uid, d.reverts))) else { return };
|
||||
let contents = app.session.documents().iter().map(|d| (d.uid, d.reverts)).collect();
|
||||
let sources = app.session.documents().iter().map(|d| (d.uid, d.revision)).chain(app.canvas.panes.released_from).collect();
|
||||
let sources = app.session.documents().iter().map(|d| (d.uid, d.revision)).collect();
|
||||
// A tab rest leaves the art to the document it showed while that is the current one: any canvas or pane takes it
|
||||
// then, and nothing once that document was closed or left by other means.
|
||||
let current = app.session.active().map(|d| d.uid);
|
||||
@@ -280,17 +275,6 @@ pub(crate) fn drop_on_pane(app: &mut VectorcraftApp, win: Win, drop: &Dropped) {
|
||||
}
|
||||
}
|
||||
|
||||
/// Art carried off the canvas and released at `at` (screen) over a pane this pass noted, or a pane outside Tile the
|
||||
/// last frame drew (the front one first), in the frame the pointer reached it, before the pane could take it as a drop:
|
||||
/// the pane's window and the drop there.
|
||||
pub(crate) fn released_on_pane(app: &VectorcraftApp, art: CarriedArt, at: Pos2, op: DropOperation) -> Option<(Win, Dropped)> {
|
||||
let outside = app.canvas.windows.last_noted.iter().rev();
|
||||
let waiting = app.canvas.panes.drops.iter().flatten().rev().map(|(win, rect, _)| (*win, *rect));
|
||||
let (win, rect) = outside.copied().chain(waiting).find(|(_, rect)| rect.contains(at))?;
|
||||
let view = pane_view(app, win, rect)?;
|
||||
Some((win, Dropped { payload: Payload::Art(art), at: view.to_doc(at), zoom: view.zoom, op }))
|
||||
}
|
||||
|
||||
/// Starts carrying the art of a Selection, Direct Selection or Group Selection move that left the canvas, handing it
|
||||
/// to the drag session. Moves of anchors or segments stay reshapes. `covered`: another window is over the canvas at the
|
||||
/// pointer. → whether a carry runs.
|
||||
|
||||
@@ -101,11 +101,6 @@ pub struct Panes {
|
||||
/// panes drawn so far, by window, with their layers. Their drop catchers show after the current window's body
|
||||
/// ([`super::drops::show`]).
|
||||
pub(crate) drops: Option<Vec<(Win, egui::Rect, egui::LayerId)>>,
|
||||
/// Art released over a pane in the frame the pointer reached it, applied after the current window's body.
|
||||
pub(crate) released: Option<(Win, super::drops::Dropped)>,
|
||||
/// The `(uid, revision)` of the document whose carried art was released this pass, before the release gave up its
|
||||
/// move: the drop catchers that run after the release still take that art.
|
||||
pub(crate) released_from: Option<(u64, u64)>,
|
||||
}
|
||||
|
||||
impl Panes {
|
||||
@@ -387,7 +382,6 @@ pub(crate) fn tiled_area(app: &mut VectorcraftApp, ui: &mut Ui) -> bool {
|
||||
show_body(app, ui, w, cell, BodyKind::Live);
|
||||
}
|
||||
catch_waiting(app, ui);
|
||||
drop_released(app);
|
||||
note_fits(app, &areas, &unfitted);
|
||||
});
|
||||
let activated = split.output.activated;
|
||||
@@ -400,15 +394,6 @@ pub(crate) fn tiled_area(app: &mut VectorcraftApp, ui: &mut Ui) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
/// Drops the art released over a pane in the frame the pointer reached it ([`super::drops::released_on_pane`]), once
|
||||
/// the panes that could have taken it as a drop have drawn.
|
||||
pub(crate) fn drop_released(app: &mut VectorcraftApp) {
|
||||
app.canvas.panes.released_from = None;
|
||||
if let Some((w, drop)) = app.canvas.panes.released.take() {
|
||||
super::drops::drop_on_pane(app, w, &drop);
|
||||
}
|
||||
}
|
||||
|
||||
/// Shows the drop catchers of the panes that waited ([`super::drops::show`]) for the current window's body, whose tool
|
||||
/// may start the carry they catch.
|
||||
pub(crate) fn catch_waiting(app: &mut VectorcraftApp, ui: &mut Ui) {
|
||||
|
||||
@@ -1,15 +1,20 @@
|
||||
//! The document tool as the framework's `CanvasTool`: the pointer and key calls of the tool host go to the engine
|
||||
//! session, and what the session asks of the UI is applied here.
|
||||
|
||||
use std::any::Any;
|
||||
use std::cell::{Cell, RefCell, RefMut};
|
||||
use std::sync::Arc;
|
||||
|
||||
use craft::behavior::{CancelReason, CanvasView, Cursor, DropOperation, PointerKind as Device, PressPhase};
|
||||
use craft::behavior::{CancelReason, CanvasView, Cursor, PointerKind as Device, PressPhase};
|
||||
use craft::keymap::{Chord, Key};
|
||||
use craft::ui::canvas::ToolPath;
|
||||
use craft::ui::canvas::{
|
||||
Autoscroll, CanvasTool, Momentary, MomentaryCommands, MomentaryShift, ToolAction, ToolClaims, ToolContext, ToolHost, ToolHostResponse, ToolKey,
|
||||
ToolPass, ToolPointer,
|
||||
};
|
||||
use craft::ui::contract::DragPreview;
|
||||
use craft::ui::runtime::drag;
|
||||
use craft::ui::runtime::env::Env;
|
||||
use serde_json::json;
|
||||
use vectorcraft_engine::ViewInfo;
|
||||
use vectorcraft_geom::Point;
|
||||
@@ -392,20 +397,15 @@ impl CanvasTool for SessionTool<'_> {
|
||||
// The press ends where it went up, with the keys held at its release.
|
||||
let up = self.at_release(pointer, pointer_event(PointerKind::Up, pointer, cx));
|
||||
let covered = self.covered(pointer);
|
||||
let carried = super::drops::carried(&self.app(), cx, pointer, covered);
|
||||
self.app().canvas.panes.released_from = carried.as_ref().map(|art| (art.document, art.revision));
|
||||
let given_up = cx.over_drop_target() || carried.is_some();
|
||||
// Carried art released off the canvas goes to the target the drag session resolves in this pass, a pane drawn
|
||||
// later in the pass included: the session delivers the drop in the next pass.
|
||||
let carried = super::drops::carried(&self.app(), cx, pointer, covered).is_some();
|
||||
let given_up = cx.over_drop_target() || carried;
|
||||
if given_up {
|
||||
// The art goes to the drop target, or nowhere off the canvas: the move is given up where it started.
|
||||
self.send_samples();
|
||||
let _ = self.app().session.cancel_interaction();
|
||||
}
|
||||
if let Some(art) = carried.filter(|_| !cx.over_drop_target()) {
|
||||
// Released over a pane in the frame the pointer reached it: no target could take it yet.
|
||||
let op = if up.mods.alt { DropOperation::Copy } else { DropOperation::Move };
|
||||
let mut app = self.app();
|
||||
app.canvas.panes.released = super::drops::released_on_pane(&app, art, pointer.pos, op);
|
||||
}
|
||||
self.app().canvas.grab = None;
|
||||
// When the pointer moved or the keys changed since the drag's last move, the tool gets a move where the press went
|
||||
// up first, as it does while held: the last move of the release's pass still sizes the shape, and Shift pressed in
|
||||
@@ -452,6 +452,9 @@ impl CanvasTool for SessionTool<'_> {
|
||||
fn cancel(&mut self, reason: CancelReason, cx: &mut ToolContext<'_>) {
|
||||
self.send_samples();
|
||||
let mut app = self.app();
|
||||
if reason == CancelReason::Removed {
|
||||
app.canvas.removed_press = true;
|
||||
}
|
||||
if app.ui.screen_mode == 3 {
|
||||
// The tool had no press of Presentation Mode's.
|
||||
app.canvas.last_drag = None;
|
||||
@@ -739,6 +742,8 @@ pub(crate) fn run(app: &mut VectorcraftApp, ui: &mut Ui, pass: &ToolPass) -> Too
|
||||
app.canvas.keys_at = Some(ui.input(|i| i.time));
|
||||
}
|
||||
let view_info = app.view_info();
|
||||
let carry = carried_session(ui.ctx());
|
||||
app.canvas.removed_press = false;
|
||||
let mut picked = ToolHostResponse::default();
|
||||
let mut response = if crate::dialogs::recolor::edit_tab::with_theme_pick(app, |app, tool| picked = host_run(app, ui, pass, tool)) {
|
||||
picked
|
||||
@@ -772,6 +777,7 @@ pub(crate) fn run(app: &mut VectorcraftApp, ui: &mut Ui, pass: &ToolPass) -> Too
|
||||
drop(tool);
|
||||
response
|
||||
};
|
||||
resume_carry(app, ui, pass, carry);
|
||||
// The framework ends a press at Escape; the engine's tool still takes the release that ends it.
|
||||
if app.canvas.escaped_press && !ui.input(|i| i.pointer.primary_down()) {
|
||||
app.canvas.escaped_press = false;
|
||||
@@ -820,6 +826,28 @@ pub(crate) fn run(app: &mut VectorcraftApp, ui: &mut Ui, pass: &ToolPass) -> Too
|
||||
response
|
||||
}
|
||||
|
||||
/// The art a move carries off the canvas and what the panels see of it, while that drag session runs.
|
||||
type Carry = (Arc<super::drops::CarriedArt>, Arc<crate::panel_drag::PanelDrag>);
|
||||
|
||||
/// The drag session of art carried off the canvas, when one runs.
|
||||
fn carried_session(ctx: &egui::Context) -> Option<Carry> {
|
||||
Some((drag::active::<super::drops::CarriedArt>(ctx)?, drag::active::<crate::panel_drag::PanelDrag>(ctx)?))
|
||||
}
|
||||
|
||||
/// Starts the drag session `carry` again when the tool host ended it in this pass with the press's `Removed` cancel
|
||||
/// while the button is still held. The canvas was hidden for a pass, as when the art rests on another document's tab
|
||||
/// and comes back, and the release then drops the art where it lands.
|
||||
// Workaround: storytold/craft-libs#5281 keeps the session running; remove this with the pin bump that takes it.
|
||||
fn resume_carry(app: &mut VectorcraftApp, ui: &Ui, pass: &ToolPass, carry: Option<Carry>) {
|
||||
let removed = std::mem::take(&mut app.canvas.removed_press);
|
||||
let Some((art, panel)) = carry else { return };
|
||||
if !removed || drag::active::<super::drops::CarriedArt>(ui.ctx()).is_some() || !ui.input(|i| i.pointer.primary_down()) {
|
||||
return;
|
||||
}
|
||||
let also: Arc<dyn Any + Send + Sync> = panel;
|
||||
drag::start(ui.ctx(), pass.id, &Env::of(ui).view(), art, vec![also], DragPreview::None);
|
||||
}
|
||||
|
||||
fn host_run_session(tool: &mut SessionTool<'_>, ui: &Ui, pass: &ToolPass) -> ToolHostResponse {
|
||||
let mut app = tool.app();
|
||||
// The host borrows the tool and the app both through the cell, one call at a time.
|
||||
|
||||
@@ -528,7 +528,7 @@ fn the_title_bars_close_button_closes_the_window() {
|
||||
.textures_delta
|
||||
.clear();
|
||||
assert_eq!(decision, Some(craft::ui::shell::embed::CloseDecision::Hold), "the modified document keeps the window open");
|
||||
let asks = app.dialogs().is_some_and(|dialogs| dialogs.with(|host| host.get::<craft::ui::dialog::UnsavedChangesDialog>().is_some()));
|
||||
let asks = app.dialogs().is_some_and(|dialogs| dialogs.with(|host| host.get::<craft::ui::dialog::HostedUnsavedChangesDialog>().is_some()));
|
||||
assert!(asks, "the close asks about the modified document");
|
||||
}
|
||||
|
||||
|
||||
@@ -532,8 +532,14 @@ fn confirm(app: &mut VectorcraftApp, source: &Source, choices: &DxfChoices) -> R
|
||||
if let Some(converted) = &source.converted {
|
||||
app.placing.keep_next = Some(Box::new(converted.held.clone()));
|
||||
}
|
||||
// The drawing placed is the one the dialog showed, not the file as it is on disk now;
|
||||
// its link and the journal keep the path.
|
||||
if let Some(path) = &source.path {
|
||||
app.placing.bytes_next = Some((path.clone(), source.file.clone()));
|
||||
}
|
||||
let r = crate::place::run_for_user(app, &p).map(|_| ());
|
||||
app.placing.keep_next = None;
|
||||
app.placing.bytes_next = None;
|
||||
if let (Some(current), Some(insertion)) = (current, restore) {
|
||||
current.restore_changed(&insertion, app);
|
||||
}
|
||||
@@ -965,6 +971,56 @@ mod tests {
|
||||
});
|
||||
}
|
||||
|
||||
/// A DWG drawing placed through its dialog is the drawing the dialog previewed: a file written
|
||||
/// over it on disk while the dialog is open is not placed.
|
||||
#[cfg(not(any(target_arch = "wasm32", all(target_os = "freebsd", target_arch = "aarch64"))))]
|
||||
#[test]
|
||||
fn ok_places_the_drawing_the_dialog_previewed() {
|
||||
fn placed_size(app: &mut VectorcraftApp) -> (f64, f64) {
|
||||
while !app.placing.pending.is_empty() {
|
||||
crate::placing::wait(app);
|
||||
crate::placing::poll(app);
|
||||
}
|
||||
let st = app.session.doc().unwrap();
|
||||
let mut out: Option<vectorcraft_geom::Rect> = None;
|
||||
st.doc.node(st.selection.objects[0]).unwrap().walk(&mut |c| {
|
||||
if let Some(b) = c.path_data().and_then(vectorcraft_geom::PathData::bounds) {
|
||||
out = Some(out.map_or(b, |o| o.union(b)));
|
||||
}
|
||||
});
|
||||
let r = out.unwrap();
|
||||
(r.width(), r.height())
|
||||
}
|
||||
vectorcraft_engine::dwg::allow_in_process();
|
||||
let (_dir, plan) = dwg_file("dxf-import-dwg-previewed");
|
||||
let flatter = String::from_utf8(drawing()).unwrap().replace(" 21\n50\n", " 21\n10\n");
|
||||
crate::opening::tests::with_threads(|| {
|
||||
let mut app = host::app();
|
||||
app.services.read = Some(Box::new(|p: &str| std::fs::read(p).map_err(|e| e.to_string())));
|
||||
app.run("file.new", json!({"width": 600, "height": 400})).unwrap();
|
||||
crate::place::run_for_user(&mut app, &json!({ "path": plan })).unwrap();
|
||||
finish_conversions(&mut app);
|
||||
host::confirm(&mut app, KIND).unwrap();
|
||||
let previewed = placed_size(&mut app);
|
||||
crate::place::run_for_user(&mut app, &json!({ "path": plan })).unwrap();
|
||||
finish_conversions(&mut app);
|
||||
assert_eq!(host::fields(&app, KIND)["mode"], "place");
|
||||
std::fs::write(&plan, craft_dwg::dxf_to_dwg_as(flatter.as_bytes(), "AC1018").unwrap()).unwrap();
|
||||
let before = app.session.doc().unwrap().selection.objects.clone();
|
||||
host::confirm(&mut app, KIND).unwrap();
|
||||
let size = placed_size(&mut app);
|
||||
assert_ne!(app.session.doc().unwrap().selection.objects, before, "OK places a new object");
|
||||
assert_eq!(size, previewed, "OK places the drawing the dialog opened on");
|
||||
assert!(app.placing.bytes_next.is_none());
|
||||
// Placed again, the file as it is on disk now is read.
|
||||
let before = app.session.doc().unwrap().selection.objects.clone();
|
||||
crate::place::run_for_user(&mut app, &json!({ "path": plan, "showImportOptions": false })).unwrap();
|
||||
let size = placed_size(&mut app);
|
||||
assert_ne!(app.session.doc().unwrap().selection.objects, before, "the place adds a new object");
|
||||
assert_ne!(size, previewed, "a later place reads the new file");
|
||||
});
|
||||
}
|
||||
|
||||
/// A DWG drawing converted off the UI thread and placed keeps its conversion until the place
|
||||
/// read off the UI thread is done.
|
||||
#[cfg(not(any(target_arch = "wasm32", all(target_os = "freebsd", target_arch = "aarch64"))))]
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
//! cutting software and shows Custom again once one is changed), version, scale (1 unit of the
|
||||
//! art = N drawing units) and lineweights, number of colours, the format of placed images and
|
||||
//! Include Placed Images, Preserve Appearance or Maximize Editability, and Export Selected Art
|
||||
//! Only, Alter Paths for Appearance, Outline Text and Include Fill Hatches.
|
||||
//! Only, Alter Paths for Appearance, Outline Text, Include Fill Hatches and Always Export Group as
|
||||
//! Block Reference (not set by a preset).
|
||||
//!
|
||||
//! Fields: `document.export` params (`format: dxf`, `path?`, the artboard choice) and the DXF
|
||||
//! options of `document.exportDxf`. OK remembers the options for next time and writes the file
|
||||
@@ -37,6 +38,7 @@ fn defaults() -> Map<String, Value> {
|
||||
let mut m = preset_fields(DxfPreset::Custom);
|
||||
m.insert(PRESET.into(), json!(DxfPreset::Custom.id()));
|
||||
m.insert("selectedOnly".into(), json!(false));
|
||||
m.insert("groupBlocks".into(), json!(DxfPreset::Custom.options().group_blocks));
|
||||
m
|
||||
}
|
||||
|
||||
@@ -132,6 +134,7 @@ fn rows(selection: bool, has_selection: bool, note: bool) -> Vec<Param> {
|
||||
// Preserve Appearance always outlines type.
|
||||
check_param("outlineText", tl!("Outline Text")).enabled_when("preserve", FieldValue::Text(Preserve::Editability.id().into())),
|
||||
check_param("includeHatches", tl!("Include Fill Hatches")),
|
||||
check_param("groupBlocks", tl!("Always Export Group as Block Reference")),
|
||||
]);
|
||||
rows
|
||||
}
|
||||
|
||||
@@ -556,10 +556,24 @@ fn list_templates(app: &mut VectorcraftApp) -> (Vec<(String, String)>, Option<St
|
||||
|
||||
/// Save Metadata Template…: the fields as they are in the dialog, at the path a save pick answered. A name
|
||||
/// typed without `.xmp` takes it, so the templates list shows the file; a file already there under the
|
||||
/// completed name is replaced only after a question.
|
||||
/// completed name is replaced only after a question. In the document portal, which takes only the name
|
||||
/// answered, the save pick opens again with the completed name in the answer's folder.
|
||||
fn save_template(app: &mut VectorcraftApp, picked: PathBuf, fields: Info) -> Result<(), String> {
|
||||
let picked = picked.to_string_lossy().into_owned();
|
||||
let path = if picked.to_ascii_lowercase().ends_with(&format!(".{XMP_EXT}")) { picked.clone() } else { format!("{picked}.{XMP_EXT}") };
|
||||
if let Some((name, folder)) = crate::io::save::portal_ask_again(app, &picked, &path) {
|
||||
let mut request = template_request(name);
|
||||
if let Some(folder) = folder {
|
||||
request = request.directory(folder);
|
||||
}
|
||||
file_asks::ask(app, request, file_asks::Owner::Free, move |app, picked| {
|
||||
if let Some(path) = picked.first_path() {
|
||||
save_template(app, path, fields)?;
|
||||
}
|
||||
Ok(Value::Null)
|
||||
});
|
||||
return Ok(());
|
||||
}
|
||||
// The save pick does not ask about the completed name.
|
||||
app.session.execute("file.info.templates", &json!({ "create": true })).map_err(|e| e.to_string())?;
|
||||
let save = {
|
||||
@@ -573,6 +587,11 @@ fn save_template(app: &mut VectorcraftApp, picked: PathBuf, fields: Info) -> Res
|
||||
save(app).map(|_| ())
|
||||
}
|
||||
|
||||
/// A save pick for a metadata template, suggesting `name`.
|
||||
fn template_request(name: String) -> PickRequest {
|
||||
PickRequest::save(PURPOSE).file_name(name).suggested_extension(XMP_EXT).filter(tl!("XMP metadata templates"), &[XMP_EXT])
|
||||
}
|
||||
|
||||
/// Save the draft through the browser's file service. Serializing it changes neither drawing nor draft.
|
||||
fn download_template(app: &mut VectorcraftApp, fields: Info) -> Result<(), String> {
|
||||
let title = text_of(&fields, "title");
|
||||
@@ -580,8 +599,7 @@ fn download_template(app: &mut VectorcraftApp, fields: Info) -> Result<(), Strin
|
||||
let name = format!("{stem}.{XMP_EXT}");
|
||||
let result = app.run("file.info.saveTemplate", json!({"fields": fields}))?;
|
||||
let data = result["data"].as_str().ok_or("the metadata template contains no data")?.as_bytes().to_vec();
|
||||
let request = PickRequest::save(PURPOSE).file_name(name).suggested_extension(XMP_EXT).filter(tl!("XMP metadata templates"), &[XMP_EXT]);
|
||||
file_asks::save(app, request, data, file_asks::Owner::Free, |app, picked| {
|
||||
file_asks::save(app, template_request(name), data, file_asks::Owner::Free, |app, picked| {
|
||||
match picked {
|
||||
Picked::Downloaded(name) => app.status(format!("Saved {name}")),
|
||||
Picked::Saved { path, .. } => app.status(format!("Saved {}", path.display())),
|
||||
@@ -884,6 +902,32 @@ mod tests {
|
||||
assert!(app.session.active().unwrap().history.undo.is_empty());
|
||||
}
|
||||
|
||||
/// In the document portal, which takes only the name the save pick answered, Save Metadata
|
||||
/// Template… writes nothing under the completed name (`Card` for `Card.xmp`): the save pick opens
|
||||
/// again in the answer's folder suggesting `Card.xmp`, and its answer is written.
|
||||
#[test]
|
||||
fn a_template_save_asks_again_for_a_name_the_document_portal_did_not_grant() {
|
||||
let dir = vectorcraft_testkit::TempDir::new("ui-file-info-portal");
|
||||
let mut app = VectorcraftApp::new(Session::new(), Default::default());
|
||||
let picker = crate::tests::picks::scripted(&mut app);
|
||||
app.session.attach_metadata_templates_dir(dir.join("Metadata Templates"));
|
||||
app.run("file.new", json!({"width": 200, "height": 200})).unwrap();
|
||||
let portal = "/run/user/1000/doc/a1b2c3d4";
|
||||
let fields = json!({"author": "Ada"}).as_object().cloned().unwrap_or_default();
|
||||
super::save_template(&mut app, format!("{portal}/Card").into(), fields).unwrap();
|
||||
let requests = picker.requests();
|
||||
let [again] = requests.as_slice() else { panic!("the save pick opens again: {requests:?}") };
|
||||
assert_eq!(again.file_name.as_deref(), Some("Card.xmp"));
|
||||
assert_eq!(again.directory.as_deref(), Some(std::path::Path::new(portal)));
|
||||
assert!(app.ui.status.contains("Card.xmp"), "{}", app.ui.status);
|
||||
let granted = dir.join("Card.xmp");
|
||||
picker.answer_saved(&granted.to_string_lossy(), None);
|
||||
let ctx = app.ui_ctx.clone().unwrap_or_default();
|
||||
crate::tests::picks::poll(&mut app, &ctx);
|
||||
assert!(std::fs::read_to_string(&granted).is_ok_and(|xmp| xmp.contains("Ada")), "the granted name is written");
|
||||
assert_eq!(picker.requests().len(), 1, "a granted name is written without asking again");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn an_imported_template_fills_the_fields_and_ok_is_one_undo_step() {
|
||||
let dir = vectorcraft_testkit::TempDir::new("ui-file-info-template");
|
||||
|
||||
@@ -69,6 +69,13 @@ impl DialogFile {
|
||||
}
|
||||
}
|
||||
|
||||
/// The file's bytes, as a place given them reads them ([`vectorcraft_engine::cmd::place::GivenBytes`]).
|
||||
impl AsRef<[u8]> for DialogFile {
|
||||
fn as_ref(&self) -> &[u8] {
|
||||
&self.bytes
|
||||
}
|
||||
}
|
||||
|
||||
/// Equal by token: a token names one file's bytes, so a dialog's values compare without reading them.
|
||||
impl PartialEq for DialogFile {
|
||||
fn eq(&self, other: &Self) -> bool {
|
||||
|
||||
@@ -151,6 +151,29 @@ fn include_placed_images_and_fill_hatches_follow_the_preset_and_a_change_shows_c
|
||||
assert_eq!(shown(&app), ("custom".into(), true, true));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn always_export_group_as_block_reference_writes_an_insert_and_stays_through_a_preset() {
|
||||
let (mut app, written) = app(1);
|
||||
app.run("object.group", json!({})).unwrap();
|
||||
app.run("ui.dxfOptionsDialog", json!({"path": "/out/a.dxf"})).unwrap();
|
||||
frame(&mut app);
|
||||
assert_eq!(fields(&app).bool("groupBlocks"), Some(false), "off by default");
|
||||
set(&mut app, "groupBlocks", json!(true));
|
||||
// A preset sets the fields it sets and leaves this one as it is.
|
||||
set(&mut app, "dxfPreset", json!("cnc"));
|
||||
frame(&mut app);
|
||||
assert_eq!((show(&fields(&app), "dxfPreset"), fields(&app).bool("groupBlocks")), ("cnc".into(), Some(true)));
|
||||
confirm(&mut app);
|
||||
let dxf = text(&written.borrow()[0].1);
|
||||
let start = dxf.find("\nENTITIES\n").unwrap();
|
||||
let entities = &dxf[start..start + dxf[start..].find("\nENDSEC\n").unwrap()];
|
||||
assert_eq!(entities.matches("\n 0\n").count(), 1, "the group alone, as one entity: {entities}");
|
||||
assert!(entities.contains("\n 0\nINSERT\n"), "{entities}");
|
||||
assert_eq!(app.ui.dxf_options["groupBlocks"].as_bool(), Some(true), "remembered for the next export");
|
||||
crate::menus::invoke(&mut app, "ui.dxfOptionsDialog", json!({}));
|
||||
assert_eq!(fields(&app).bool("groupBlocks"), Some(true));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn bad_dxf_options_keep_the_dialog_open() {
|
||||
let (mut app, written) = app(1);
|
||||
|
||||
@@ -131,10 +131,6 @@ pub struct Windows {
|
||||
known: Vec<u64>,
|
||||
/// The documents' views beyond the one each shows ([`views`]).
|
||||
pub(crate) views: Views,
|
||||
/// The panes drawn outside Tile in this frame so far (the floating windows', the main window's while the current
|
||||
/// window floats), back to front, with the art area each takes drops in; and those of the last frame.
|
||||
pub(crate) noted: Vec<(Win, egui::Rect)>,
|
||||
pub(crate) last_noted: Vec<(Win, egui::Rect)>,
|
||||
/// The main window's density and the floating windows' ([`floating_ppi`]) when the views were
|
||||
/// last settled each frame ([`VectorcraftApp::settle_screen_ppi_if_changed`]).
|
||||
pub(crate) settled: Option<(crate::ScreenPpi, Vec<FloatingPpi>)>,
|
||||
@@ -373,12 +369,10 @@ pub(crate) fn focus_main_window(app: &VectorcraftApp, ctx: &egui::Context) {
|
||||
}
|
||||
|
||||
/// Draw the floating document windows, after the main window's canvas, then the drop catcher of the main window's
|
||||
/// pane, which waited for the current window's body. Call once per frame from the main window. Art released over a
|
||||
/// pane in the frame the pointer reached it drops there then.
|
||||
/// pane, which waited for the current window's body. Call once per frame from the main window.
|
||||
pub(crate) fn show(app: &mut VectorcraftApp, ui: &mut egui::Ui) {
|
||||
show_windows(app, ui);
|
||||
crate::canvas::panes::catch_waiting(app, ui);
|
||||
crate::canvas::panes::drop_released(app);
|
||||
}
|
||||
|
||||
/// [`show`]'s windows.
|
||||
|
||||
@@ -127,13 +127,14 @@ impl VectorcraftApp {
|
||||
/// after losing its graphics), everything uploaded to the old one is made again: the fonts and
|
||||
/// theme, the canvas, the place cursor's thumbnails and every [`TexCache`]. The host hands it
|
||||
/// the window's context when it creates the app, so the first frame's input has the app's
|
||||
/// commands.
|
||||
/// commands. Each new context draws its text without hinting ([`crate::ui_fonts::hinting_off`]).
|
||||
pub fn adopt_context(&mut self, ctx: &egui::Context) {
|
||||
let tag = context_tag(ctx);
|
||||
self.ui_ctx = Some(ctx.clone());
|
||||
if self.context == tag {
|
||||
return;
|
||||
}
|
||||
crate::ui_fonts::hinting_off(ctx);
|
||||
if self.context != 0 {
|
||||
log::info!("vectorcraft: new graphics context: uploading the UI again");
|
||||
forget_textures();
|
||||
|
||||
@@ -235,9 +235,43 @@ fn write_step(app: &mut VectorcraftApp, uid: u64, path: &str, target: SaveTarget
|
||||
let path = with_picked_type(&answered, &suggested, picked_ext.as_deref(), first.format, mode);
|
||||
// The flow ends here: the questions and options dialogs that follow run on the path alone.
|
||||
app.saves.release(uid);
|
||||
if portal_renamed(&answered, &path) {
|
||||
let name = confirm_portal_name(app, &answered, &path);
|
||||
let folder = Path::new(&answered).parent().map(Path::to_path_buf);
|
||||
return ask_again(app, mode, ¶ms, ask, target, retrying, (name, folder));
|
||||
}
|
||||
replaces_unasked(app, &answered, &path, move |app, path| finish_picked(app, mode, ¶ms, ask, &path, retrying))
|
||||
}
|
||||
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
/// The save panel again for the active document's save (`mode`, `params`), in the folder the last
|
||||
/// answer was in and suggesting `name` in the format its extension names, as a new flow with the
|
||||
/// same options question (`ask_options`) and `target`. A read-only retry (`retrying`) that changes
|
||||
/// format drops the options it carries and asks for the new format's, as [`finish_picked`] does.
|
||||
fn ask_again(
|
||||
app: &mut VectorcraftApp,
|
||||
mode: SaveMode,
|
||||
params: &Value,
|
||||
mut ask_options: bool,
|
||||
target: SaveTarget,
|
||||
retrying: bool,
|
||||
(name, directory): (String, Option<PathBuf>),
|
||||
) -> Result<Value, String> {
|
||||
let original = plan(app, mode, &acknowledged(params))?.format.id;
|
||||
let mut q = if params.is_object() { params.clone() } else { json!({}) };
|
||||
if let Some(f) = fileio::format_for_name(&name) {
|
||||
if retrying && f.id != original {
|
||||
if let Some(o) = q.as_object_mut() {
|
||||
o.remove("options");
|
||||
}
|
||||
ask_options = true;
|
||||
}
|
||||
q["format"] = json!(f.id);
|
||||
}
|
||||
let first = plan(app, mode, &acknowledged(&q))?;
|
||||
start_flow(app, &first, Start { mode, params: &q, ask_options, target, retry: None, name, directory, retrying })
|
||||
}
|
||||
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
/// What [`start_flow`] needs besides the plan.
|
||||
struct Start<'a> {
|
||||
@@ -456,7 +490,7 @@ fn ask_path(
|
||||
return then(app, with_written_extension(&name, &ext, &keeps));
|
||||
}
|
||||
let mut request = PickRequest::save("export").file_name(name);
|
||||
request.filters = filters;
|
||||
request.filters = filters.clone();
|
||||
if let Some(folder) = folder {
|
||||
request = request.directory(folder);
|
||||
}
|
||||
@@ -464,10 +498,54 @@ fn ask_path(
|
||||
let Picked::Saved { path: picked, .. } = picked else { return Err("cancelled".into()) };
|
||||
let picked = picked.to_string_lossy().into_owned();
|
||||
let path = with_written_extension(&picked, &ext, &keeps);
|
||||
if let Some((name, folder)) = portal_ask_again(app, &picked, &path) {
|
||||
let folder = folder.map(|p| p.to_string_lossy().into_owned());
|
||||
return ask_path(app, None, name, folder, filters, ext, keeps, then);
|
||||
}
|
||||
replaces_unasked(app, &picked, &path, then)
|
||||
}))
|
||||
}
|
||||
|
||||
/// Whether `path` is a file in a folder of the document portal (`/run/user/<uid>/doc/<id>/` or
|
||||
/// `/run/flatpak/doc/<id>/`), where the save panel's answers point in a Flatpak sandbox. The portal
|
||||
/// puts only the name the panel answered into the folder picked in it: a file written there under
|
||||
/// another name is written without an error, and the folder gets no file.
|
||||
fn in_document_portal(path: &str) -> bool {
|
||||
let rest = path.strip_prefix("/run/flatpak/doc/").or_else(|| {
|
||||
let (uid, rest) = path.strip_prefix("/run/user/")?.split_once('/')?;
|
||||
if uid.is_empty() || !uid.bytes().all(|b| b.is_ascii_digit()) {
|
||||
return None;
|
||||
}
|
||||
rest.strip_prefix("doc/")
|
||||
});
|
||||
rest.and_then(|r| r.split_once('/')).is_some_and(|(id, name)| !id.is_empty() && !name.is_empty() && !name.contains('/'))
|
||||
}
|
||||
|
||||
/// Whether the save panel's answer `picked` was made into another name, `path`, in a folder of the
|
||||
/// document portal ([`in_document_portal`]).
|
||||
fn portal_renamed(picked: &str, path: &str) -> bool {
|
||||
path != picked && in_document_portal(picked)
|
||||
}
|
||||
|
||||
/// The file name of `path`, for the save panel to ask with again in place of the answer `picked`;
|
||||
/// the status bar says why the panel opens again.
|
||||
fn confirm_portal_name(app: &mut VectorcraftApp, picked: &str, path: &str) -> String {
|
||||
let name = fileio::file_name(path);
|
||||
app.status(format!("The file chooser can only save “{}”: confirm “{name}” to save it", fileio::file_name(picked)));
|
||||
name
|
||||
}
|
||||
|
||||
/// When `path`, the file the save panel's answer `picked` was made into, is another name in a
|
||||
/// folder of the document portal ([`portal_renamed`]): the name for the save panel to ask with
|
||||
/// again and the folder of the answer, for it to open in. The status bar says why.
|
||||
pub(crate) fn portal_ask_again(app: &mut VectorcraftApp, picked: &str, path: &str) -> Option<(String, Option<PathBuf>)> {
|
||||
if !portal_renamed(picked, path) {
|
||||
return None;
|
||||
}
|
||||
let name = confirm_portal_name(app, picked, path);
|
||||
Some((name, std::path::Path::new(picked).parent().map(std::path::Path::to_path_buf)))
|
||||
}
|
||||
|
||||
/// `path` as typed in a save panel for a file with extension `ext`: kept when its extension is
|
||||
/// `ext` in any letter case, or names the format `ext` names (`photo.jpeg` for a `.jpg` file) or
|
||||
/// a format `keeps` takes. An extension that names another format (`card.svg` for a `.png` file)
|
||||
|
||||
@@ -310,6 +310,31 @@ fn readonly_changed_format_asks_for_its_options_before_writing() {
|
||||
assert_eq!(files.lock().unwrap().attempts, ["/locked/Poster.svg"]);
|
||||
}
|
||||
|
||||
/// The retry's save panel in the document portal, with PDF picked and `Poster.svg` kept: the panel
|
||||
/// opens again for `Poster.pdf`, and its answer asks for the PDF options before writing.
|
||||
#[test]
|
||||
fn readonly_changed_format_in_the_document_portal_asks_for_its_options_before_writing() {
|
||||
let portal = "/run/user/1000/doc/a1b2c3d4";
|
||||
let (mut app, files) = app("svg", ErrorKind::PermissionDenied);
|
||||
let before = state(&app);
|
||||
let picker = scripted(&mut app);
|
||||
assert_eq!(app.run("file.save", json!({})).unwrap()["pending"], "fileDialog");
|
||||
let pdf = picker.requests()[0].filters.iter().position(|f| f.extensions.iter().any(|e| e == "pdf"));
|
||||
assert!(pdf.is_some(), "the retry's save panel offers PDF");
|
||||
picker.answer_saved(&format!("{portal}/Poster.svg"), pdf);
|
||||
poll(&mut app);
|
||||
assert!(fields_of(&app, "pdf-export").is_none(), "no options before the name is granted");
|
||||
assert_eq!(picker.requests().len(), 2, "the save panel opens again");
|
||||
assert_eq!(picker.requests()[1].file_name.as_deref(), Some("Poster.pdf"));
|
||||
picker.answer_saved(&format!("{portal}/Poster.pdf"), None);
|
||||
poll(&mut app);
|
||||
assert!(fields_of(&app, "pdf-export").is_some(), "the picked format's Save dialog");
|
||||
let job = app.save_pdf.as_ref().and_then(|open| open.job.as_ref());
|
||||
assert_eq!(job.and_then(|job| job.path.clone()), Some(format!("{portal}/Poster.pdf")));
|
||||
assert_eq!(state(&app), before);
|
||||
assert_eq!(files.lock().unwrap().attempts, ["/locked/Poster.svg"]);
|
||||
}
|
||||
|
||||
/// Typed saves keep the sidecar preflight both before the refused write and at the retry's
|
||||
/// destination. Confirming the ordinary Save still permits its one read-only fallback.
|
||||
#[test]
|
||||
|
||||
@@ -354,6 +354,9 @@ pub struct VectorcraftApp {
|
||||
/// (`--automation-read-root`, `--automation-write-root`); `None`: anywhere. See
|
||||
/// [`Self::with_automation_roots`].
|
||||
automation_roots: Option<Arc<AutomationRoots>>,
|
||||
/// The last root frame of a drop of files the OS made in a pass that carried injected input: the drag session
|
||||
/// delivers that drop in the next frame, which [`Self::ui`] confines to the automation roots as well.
|
||||
confined_drop: Option<u64>,
|
||||
/// The agents link while the ArtCraft Launcher's switch may let agents in ([`Self::with_agents`]).
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
pub(crate) agents: Option<Box<agents::Agents>>,
|
||||
|
||||
@@ -1326,19 +1326,15 @@ pub(crate) fn os_window_at(app: &VectorcraftApp, ctx: &egui::Context, pos: egui:
|
||||
if app.dock_rt.windows.is_empty() {
|
||||
return false;
|
||||
}
|
||||
// Workaround for craft-libs#4739: `WindowHost::viewports_at` still lists palette windows that are minimized, or
|
||||
// hidden while a dialog or popup shows. Remove these checks when the craft-libs pin includes craft-libs#4739.
|
||||
// A dialog hides the palette windows a few passes after it opens, and `WindowHost::viewports_at` lists them until
|
||||
// then: while a dialog is open, none counts.
|
||||
if app.any_dialog_open() {
|
||||
return false;
|
||||
}
|
||||
let origin = ctx.input(|i| i.raw.viewports.get(&i.raw.viewport_id).and_then(|v| v.inner_rect).map(|r| r.min.to_vec2()));
|
||||
let Some(origin) = origin else { return false };
|
||||
let host = craft::ui::runtime::windows::WindowHost::of(ctx);
|
||||
let under = host.viewports_at(pos + origin);
|
||||
// Workaround for craft-libs#4739 (see above).
|
||||
let restored =
|
||||
|viewport: &egui::ViewportId| host.facts(*viewport).is_some_and(|facts| facts.state != craft::host::target::WindowState::Minimized);
|
||||
under.iter().filter(|viewport| restored(viewport)).any(|viewport| app.dock_rt.windows.iter().any(|(_, shown)| shown == viewport))
|
||||
let under = craft::ui::runtime::windows::WindowHost::of(ctx).viewports_at(pos + origin);
|
||||
under.iter().any(|viewport| app.dock_rt.windows.iter().any(|(_, shown)| shown == viewport))
|
||||
}
|
||||
|
||||
/// Brings the OS window of the floating window holding `panel` forward, as it was last drawn.
|
||||
|
||||
@@ -696,7 +696,8 @@ fn a_hidden_palette_window_does_not_cover_the_canvas() {
|
||||
let id = h.app.dialogs().expect("a window").with(|host| host.open_dialogs().last().map(|d| d.id)).expect("a dialog is open");
|
||||
assert!(h.app.dialogs().expect("a window").with(|host| host.cancel_by_id(&ctx, id)), "the dialog took the answer");
|
||||
crate::dialogs::host::pump(&mut h.app, &ctx);
|
||||
h.frames(2);
|
||||
// The palettes show again in the pass after the one that saw the dialog gone, which that pass asks for.
|
||||
h.frames(3);
|
||||
assert!(!h.app.any_dialog_open(), "the dialog closed");
|
||||
assert!(os_window_at(&h.app, &h.ctx, middle), "the palette covers the canvas again once the dialog closes");
|
||||
}
|
||||
@@ -2,7 +2,7 @@ use super::tests_support::*;
|
||||
use super::*;
|
||||
use craft::automation::actions::{Action, ActionList, ActionStep};
|
||||
use craft::quit::CloseAnswer;
|
||||
use craft::ui::dialog::{DialogHost, UnsavedChangesDialog};
|
||||
use craft::ui::dialog::{DialogHost, HostedUnsavedChangesDialog};
|
||||
use vectorcraft_engine::Session;
|
||||
|
||||
/// The list index of the first action of the first set: the action the fixtures build and these tests edit.
|
||||
@@ -507,8 +507,8 @@ fn closing_the_playing_document_ends_a_paced_playback() {
|
||||
let close = |app: &mut VectorcraftApp, p: Value| {
|
||||
assert_eq!(app.run("file.close", p).unwrap(), json!({"pending": crate::unsaved::KIND}));
|
||||
on_host(app, |host, ctx| {
|
||||
host.get_mut::<UnsavedChangesDialog>().unwrap().set_answer(CloseAnswer::DontSave);
|
||||
host.confirm::<UnsavedChangesDialog>(ctx)
|
||||
host.get_mut::<HostedUnsavedChangesDialog>().unwrap().set_answer(CloseAnswer::DontSave);
|
||||
host.confirm::<HostedUnsavedChangesDialog>(ctx)
|
||||
});
|
||||
};
|
||||
// Step by Step, the only document closed: no document is active when the next step is due.
|
||||
|
||||
@@ -599,11 +599,12 @@ fn cmd_click_on_the_gradient_fill_box_resets_only_the_selected_characters() {
|
||||
}
|
||||
|
||||
// PLAN: assumed color-w10's Swatches panel: each swatch tile is named by its swatch's name and drags a `PanelDrag::Paint` with `params {swatch}` (wg.S7).
|
||||
/// The Swatches panel over the Gradient panel: a swatch tile dragged onto the slider is a real drop.
|
||||
/// The Gradient panel over the Swatches panel, which fills the room under it: a swatch tile dragged onto the slider is
|
||||
/// a real drop.
|
||||
fn with_swatches(app: &mut VectorcraftApp, ui: &mut Ui) {
|
||||
Stack::new().show(ui, |ui, _| {
|
||||
super::super::swatches::show(app, ui);
|
||||
show(app, ui);
|
||||
super::super::swatches::show(app, ui);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -428,7 +428,22 @@ pub(crate) fn unembed(app: &mut VectorcraftApp, id: u64, name: &str) {
|
||||
}
|
||||
return;
|
||||
}
|
||||
ask(app, PickRequest::save("links").file_name(name), move |app, path| {
|
||||
ask_unembed(app, id, PickRequest::save("links").file_name(name));
|
||||
}
|
||||
|
||||
/// Asks `request`'s save panel where to write embedded image `id`, and unembeds it there. In the
|
||||
/// document portal, which takes only the name answered, a name without an extension opens the panel
|
||||
/// again with the stored format's extension added, in the answer's folder.
|
||||
fn ask_unembed(app: &mut VectorcraftApp, id: u64, request: PickRequest) {
|
||||
ask(app, request, move |app, path| {
|
||||
let written = vectorcraft_engine::cmd::links::unembed_path(&app.session, id, &path);
|
||||
if let Some((name, folder)) = written.and_then(|written| crate::io::save::portal_ask_again(app, &path, &written)) {
|
||||
let mut request = PickRequest::save("links").file_name(name);
|
||||
if let Some(folder) = folder {
|
||||
request = request.directory(folder);
|
||||
}
|
||||
return ask_unembed(app, id, request);
|
||||
}
|
||||
let r = app.run("links.unembed", json!({ "id": id, "path": path }));
|
||||
report(app, r, |v| format!("Unembedded to {}", v["path"].as_str().unwrap_or_default()));
|
||||
});
|
||||
|
||||
@@ -1037,6 +1037,33 @@ fn unembed_writes_several_images_to_one_picked_folder() {
|
||||
assert_eq!(app.ui.status, format!("Unembedded 2 images to {picked}"));
|
||||
}
|
||||
|
||||
/// In the document portal, which takes only the name its save panel answered, Unembed… writes
|
||||
/// nothing under a name it had to complete (`photo` for a PNG): the panel opens again in the answer's
|
||||
/// folder suggesting `photo.png`, and its answer is written and linked.
|
||||
#[test]
|
||||
fn unembed_asks_again_for_a_name_the_document_portal_did_not_grant() {
|
||||
use crate::tests::picks::{poll, scripted};
|
||||
let dir = Folder::new("unembed-portal");
|
||||
let (mut app, _, embedded) = app(&dir);
|
||||
let picker = scripted(&mut app);
|
||||
let ctx = crate::testing::ui_context();
|
||||
let portal = "/run/user/1000/doc/a1b2c3d4";
|
||||
super::links::unembed(&mut app, embedded, "embedded.png");
|
||||
picker.answer_saved(&format!("{portal}/photo"), None);
|
||||
poll(&mut app, &ctx);
|
||||
assert_eq!(app.run("links.info", json!({"id": embedded})).unwrap()["status"], "embedded", "nothing is written or linked");
|
||||
let requests = picker.requests();
|
||||
let [_, again] = requests.as_slice() else { panic!("the save panel opens again: {requests:?}") };
|
||||
assert_eq!(again.file_name.as_deref(), Some("photo.png"));
|
||||
assert_eq!(again.directory.as_deref(), Some(std::path::Path::new(portal)));
|
||||
assert!(app.ui.status.contains("photo.png"), "{}", app.ui.status);
|
||||
let granted = dir.0.join("photo.png").to_string_lossy().into_owned();
|
||||
picker.answer_saved(&granted, None);
|
||||
poll(&mut app, &ctx);
|
||||
assert_eq!(app.run("links.info", json!({"id": embedded})).unwrap()["path"], granted.as_str());
|
||||
assert_eq!(picker.requests().len(), 2, "a granted name is written without asking again");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn switching_documents_dismisses_a_links_row_menu() {
|
||||
let dir = Folder::new("context-switched-document");
|
||||
|
||||
@@ -346,7 +346,27 @@ fn place_file_in(app: &mut VectorcraftApp, p: &Value, read: Read) -> Result<Valu
|
||||
}
|
||||
r
|
||||
}
|
||||
_ => engine(app, "file.place", &p),
|
||||
_ => match crate::placing::given_bytes(app, &p) {
|
||||
// A drawing placed through its import options places the bytes the dialog showed.
|
||||
Some(bytes) => {
|
||||
// The edit the tool computes on another thread comes first; when it fails, nothing
|
||||
// is placed, as `file.place` run as a command does.
|
||||
let r = app.session.finish_tool_edit();
|
||||
let failed = r.as_ref().err().map(ToString::to_string);
|
||||
crate::canvas::apply_requests(app, r);
|
||||
if let Some(e) = failed {
|
||||
return Err(e);
|
||||
}
|
||||
let job = app.session.prepare_place(&p).and_then(|job| job.with_bytes(bytes).read());
|
||||
let r = job.and_then(|read| app.session.place_read(read)).map_err(|e| e.to_string());
|
||||
app.sync_views();
|
||||
if let Err(e) = &r {
|
||||
app.status(e.clone());
|
||||
}
|
||||
r
|
||||
}
|
||||
None => engine(app, "file.place", &p),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -202,6 +202,10 @@ pub struct Placing {
|
||||
/// dropped: the conversion of a DWG drawing placed through its import options, which the read
|
||||
/// then finds without converting the drawing again.
|
||||
pub(crate) keep_next: Option<Box<dyn std::any::Any + Send>>,
|
||||
/// The path and the bytes of a drawing placed through its import options: the next place of
|
||||
/// that path ([`crate::place::run_for_user`]) places these bytes, the ones the dialog showed,
|
||||
/// instead of reading the file again.
|
||||
pub(crate) bytes_next: Option<(String, vectorcraft_engine::cmd::place::GivenBytes)>,
|
||||
/// A deferred paste awaiting its own Swatch Conflict dialog.
|
||||
swatch_paste: Option<PendingSwatch>,
|
||||
/// Set by unit tests whose app reads the files the user places off the UI thread.
|
||||
@@ -305,12 +309,23 @@ pub fn start(app: &mut VectorcraftApp, p: &Value, dropped: bool) -> Result<Value
|
||||
// one selected after it.
|
||||
let r = app.session.finish_tool_edit();
|
||||
crate::canvas::apply_requests(app, r);
|
||||
let job = app.session.prepare_place(p).map_err(|e| e.to_string())?;
|
||||
let given = given_bytes(app, p);
|
||||
let mut job = app.session.prepare_place(p).map_err(|e| e.to_string())?;
|
||||
if let Some(bytes) = given {
|
||||
job = job.with_bytes(bytes);
|
||||
}
|
||||
let name = job.name();
|
||||
let insertion = Insertion::of(app).ok_or("no document")?;
|
||||
spawn(app, name.clone(), name, dropped, move || job.read().map(|r| Read::Place(Box::new(r), insertion)).map_err(|e| e.to_string()))
|
||||
}
|
||||
|
||||
/// The bytes [`Placing::bytes_next`] holds for the file `p`'s `path` names, taken; `None` (and the
|
||||
/// bytes dropped) for any other place.
|
||||
pub(crate) fn given_bytes(app: &mut VectorcraftApp, p: &Value) -> Option<vectorcraft_engine::cmd::place::GivenBytes> {
|
||||
let (path, bytes) = app.placing.bytes_next.take()?;
|
||||
(p.get("path").and_then(Value::as_str) == Some(path.as_str())).then_some(bytes)
|
||||
}
|
||||
|
||||
/// `file.place.queue` with `p` for the active document, its files read and their thumbnails made off
|
||||
/// the UI thread → `{background: true, status}`; the place cursor is loaded once they are ready.
|
||||
/// `asks`: the cursor's files ask for their import options when placed ([`crate::place::show_thumbnails`]).
|
||||
|
||||
@@ -1703,24 +1703,7 @@ fn export_text(app: &mut VectorcraftApp, p: &Value) -> Result<Value, String> {
|
||||
}
|
||||
let shown = format.unwrap_or(TextFormat::Text);
|
||||
if !crate::io::is_web(app) {
|
||||
let offered: Vec<TextFormat> = format.map_or_else(|| TextFormat::ALL.to_vec(), |f| vec![f]);
|
||||
let request = offered.iter().fold(PickRequest::save(SHORTCUT_SETS).file_name(shown.file_name()), |r, f| f.filter(r));
|
||||
let (km, set) = (keymap.clone(), name.clone());
|
||||
let asked = file_asks::ask(app, request, Owner::Free, move |app, picked| {
|
||||
let Picked::Saved { path, file_type } = picked else { return Err("cancelled".into()) };
|
||||
let answer = path.to_string_lossy().into_owned();
|
||||
let typed = file_type.and_then(|i| offered.get(i)).copied();
|
||||
let picked = format.unwrap_or_else(|| TextFormat::picked(&answer, typed.map(TextFormat::extension)));
|
||||
// The format that `format` names, or that the dialog reports as the type picked, gives
|
||||
// the name its extension. A file already at a path changed that way, which the dialog
|
||||
// did not check, is replaced only after asking.
|
||||
let path = if format.is_some() || typed.is_some() { TextFormat::with_extension(&answer, picked) } else { answer.clone() };
|
||||
if path != answer && std::path::Path::new(&path).exists() {
|
||||
let to = path.clone();
|
||||
return Ok(file_asks::ask_replace(app, &path, &answer, move |app| write_text_file(app, &km, &set, picked, page, Some(to))));
|
||||
}
|
||||
write_text_file(app, &km, &set, picked, page, Some(path))
|
||||
});
|
||||
let asked = ask_text_file(app, format, (shown.file_name(), None), keymap.clone(), name.clone(), page);
|
||||
if !asked.is_null() {
|
||||
return Ok(asked);
|
||||
}
|
||||
@@ -1728,6 +1711,43 @@ fn export_text(app: &mut VectorcraftApp, p: &Value) -> Result<Value, String> {
|
||||
write_text_file(app, &keymap, &name, shown, page, None)
|
||||
}
|
||||
|
||||
/// Export Text's save panel, suggesting `file` in `folder` (the last folder used when `None`) and
|
||||
/// offering the file type `format` names, or every one. The answer is written as [`export_text`]
|
||||
/// says; an answer in the document portal that would be written under another name opens the panel
|
||||
/// again with that name in the answer's folder, for the picked format.
|
||||
fn ask_text_file(
|
||||
app: &mut VectorcraftApp,
|
||||
format: Option<TextFormat>,
|
||||
(file, folder): (String, Option<std::path::PathBuf>),
|
||||
km: Keymap,
|
||||
set: String,
|
||||
page: PageSize,
|
||||
) -> Value {
|
||||
let offered: Vec<TextFormat> = format.map_or_else(|| TextFormat::ALL.to_vec(), |f| vec![f]);
|
||||
let mut request = offered.iter().fold(PickRequest::save(SHORTCUT_SETS).file_name(file), |r, f| f.filter(r));
|
||||
if let Some(folder) = folder {
|
||||
request = request.directory(folder);
|
||||
}
|
||||
file_asks::ask(app, request, Owner::Free, move |app, picked| {
|
||||
let Picked::Saved { path, file_type } = picked else { return Err("cancelled".into()) };
|
||||
let answer = path.to_string_lossy().into_owned();
|
||||
let typed = file_type.and_then(|i| offered.get(i)).copied();
|
||||
let picked = format.unwrap_or_else(|| TextFormat::picked(&answer, typed.map(TextFormat::extension)));
|
||||
// The format that `format` names, or that the dialog reports as the type picked, gives
|
||||
// the name its extension. A file already at a path changed that way, which the dialog
|
||||
// did not check, is replaced only after asking.
|
||||
let path = if format.is_some() || typed.is_some() { TextFormat::with_extension(&answer, picked) } else { answer.clone() };
|
||||
if let Some(again) = crate::io::save::portal_ask_again(app, &answer, &path) {
|
||||
return Ok(ask_text_file(app, Some(picked), again, km, set, page));
|
||||
}
|
||||
if path != answer && std::path::Path::new(&path).exists() {
|
||||
let to = path.clone();
|
||||
return Ok(file_asks::ask_replace(app, &path, &answer, move |app| write_text_file(app, &km, &set, picked, page, Some(to))));
|
||||
}
|
||||
write_text_file(app, &km, &set, picked, page, Some(path))
|
||||
})
|
||||
}
|
||||
|
||||
/// Writes Export Text's file to `path`; with none, downloads it, or returns it.
|
||||
fn write_text_file(
|
||||
app: &mut VectorcraftApp,
|
||||
|
||||
@@ -608,6 +608,21 @@ fn control_render_draws_the_trace_view_with_trace_views() {
|
||||
/// file the person drops outside them is refused in it, and opened in the passes after.
|
||||
#[test]
|
||||
fn a_pass_with_injected_input_runs_inside_the_roots() {
|
||||
// A key is injected as a press and, in the next pass, its release.
|
||||
drop_in_an_injected_pass_is_confined("ui.key", json!({"key": "Escape"}));
|
||||
}
|
||||
|
||||
/// Text is injected in one pass: the drag session delivers a drop of files made in that pass in the
|
||||
/// next one, which carries no injected input, and the drop is still refused.
|
||||
#[test]
|
||||
fn a_drop_in_a_pass_with_one_step_of_injected_input_is_confined_when_delivered() {
|
||||
drop_in_an_injected_pass_is_confined("ui.text", json!({"text": "a"}));
|
||||
}
|
||||
|
||||
/// Injects `method` with `params`, has the person drop a file outside the automation roots in the
|
||||
/// same pass, and checks that the drop opens nothing, then that a later drop of the person's opens
|
||||
/// the file.
|
||||
fn drop_in_an_injected_pass_is_confined(method: &str, params: Value) {
|
||||
#[derive(Debug)]
|
||||
struct Dropped(PathBuf);
|
||||
impl egui::DroppedFile for Dropped {
|
||||
@@ -618,7 +633,7 @@ fn a_pass_with_injected_input_runs_inside_the_roots() {
|
||||
std::fs::read(&self.0).map_err(|e| e.to_string())
|
||||
}
|
||||
}
|
||||
let (mut app, tx, base) = confined("synthetic");
|
||||
let (mut app, tx, base) = confined(&format!("synthetic-{method}"));
|
||||
let ctx = crate::testing::ui_context();
|
||||
let outside = base.join("outside/b.svg");
|
||||
// The OS holds the file over the window in the pass before it drops it (`hovered`), as a desktop drag does.
|
||||
@@ -634,15 +649,18 @@ fn a_pass_with_injected_input_runs_inside_the_roots() {
|
||||
app.session.documents().len()
|
||||
};
|
||||
pass(&mut app, true, false);
|
||||
let (req, _reply) = ControlRequest::new("ui.key", json!({"key": "Escape"}));
|
||||
let (req, _reply) = ControlRequest::new(method, params);
|
||||
tx.send(req).unwrap();
|
||||
app.run_control(&ctx);
|
||||
assert_eq!(pass(&mut app, false, true), 0, "the pass carrying the key is confined");
|
||||
pass(&mut app, false, true);
|
||||
// The drag session delivers a drop of files in the pass after the one the OS dropped them in.
|
||||
assert_eq!(pass(&mut app, false, false), 0, "{method}: the drop of the pass carrying the input is confined");
|
||||
for _ in 0..4 {
|
||||
pass(&mut app, false, false);
|
||||
}
|
||||
pass(&mut app, true, false);
|
||||
assert_eq!(pass(&mut app, false, true), 1, "the person's pass is not");
|
||||
pass(&mut app, false, true);
|
||||
assert_eq!(pass(&mut app, false, false), 1, "{method}: the person's pass is not");
|
||||
let _ = std::fs::remove_dir_all(base);
|
||||
}
|
||||
|
||||
|
||||
@@ -77,10 +77,10 @@ fn samples_show_the_text_in_the_family_or_a_generic_sample() {
|
||||
|
||||
/// A face with no hinting instructions draws a sample in a context the app has adopted, as the font list and the
|
||||
/// font picker draw each family's sample in its own face (a document face of the context): a Hebrew letter that is a
|
||||
/// bar 20 by 700 thousandths of an em. The context hints text in both themes, so the sample goes through skrifa's
|
||||
/// automatic hinter, whose blue-zone search for such a letter ends with the pinned skrifa. The face is served to the
|
||||
/// fixture's context only, so the font database other tests read does not change. The sample is one rasterized glyph
|
||||
/// from that face. It is drawn on a thread of its own, and the test fails when it has not ended after 300 s.
|
||||
/// bar 20 by 700 thousandths of an em, whose blue zones the automatic hinter of skrifa 0.44 never finishes measuring.
|
||||
/// The face is served to the fixture's context only, so the font database other tests read does not change. The
|
||||
/// sample is one rasterized glyph from that face. It is drawn on a thread of its own, and the test fails when it has
|
||||
/// not ended after 300 s.
|
||||
#[test]
|
||||
fn a_face_without_hinting_instructions_draws_its_sample() {
|
||||
use std::sync::{Arc, Mutex};
|
||||
@@ -145,9 +145,9 @@ fn a_face_without_hinting_instructions_draws_its_sample() {
|
||||
let (texts, [hinting, light_hinting, dark_hinting], fixture_has_glyph, nonempty_glyph) =
|
||||
rx.recv_timeout(std::time::Duration::from_secs(300)).unwrap_or_else(|e| panic!("drawing the sample: {e}"));
|
||||
assert!(texts.iter().any(|t| t == "\u{5d1}"), "the sample is the letter, in the face: {texts:?}");
|
||||
assert!(hinting, "a context the app adopts hints text");
|
||||
assert!(light_hinting, "the light theme hints text");
|
||||
assert!(dark_hinting, "the dark theme hints text");
|
||||
assert!(!hinting, "a context the app adopts draws text without hinting");
|
||||
assert!(!light_hinting, "the light theme draws text without hinting");
|
||||
assert!(!dark_hinting, "the dark theme draws text without hinting");
|
||||
assert!(fixture_has_glyph, "the sample's face maps U+05D1");
|
||||
assert!(nonempty_glyph, "the sample is one rasterized glyph for U+05D1");
|
||||
}
|
||||
|
||||
@@ -597,6 +597,37 @@ fn keyboard_shortcuts_export_text_writes_the_format_picked_in_its_save_dialog()
|
||||
}
|
||||
}
|
||||
|
||||
/// In the document portal, which takes only the name its save panel answered, Export Text writes
|
||||
/// nothing under a name it had to change (`list` with the sheet picked): the panel opens again in the
|
||||
/// answer's folder, suggesting `list.pdf` and offering only the sheet, and its answer is written.
|
||||
#[test]
|
||||
fn keyboard_shortcuts_export_text_asks_again_for_a_name_the_document_portal_did_not_grant() {
|
||||
let portal = "/run/user/1000/doc/a1b2c3d4";
|
||||
let mut app = app();
|
||||
let picker = scripted(&mut app);
|
||||
let files: Rc<RefCell<Vec<String>>> = Default::default();
|
||||
let f = files.clone();
|
||||
app.services.write = Some(Box::new(move |path: &str, _: &[u8]| {
|
||||
f.borrow_mut().push(path.to_string());
|
||||
Ok(())
|
||||
}));
|
||||
app_frame(&app.ui_ctx.clone().unwrap(), &mut app, false);
|
||||
let _ = app.run("shortcuts.exportText", json!({}));
|
||||
picker.answer_saved(&format!("{portal}/list"), Some(1));
|
||||
settle(&mut app);
|
||||
assert!(files.borrow().is_empty(), "nothing is written under a name the portal did not grant: {:?}", files.borrow());
|
||||
let requests = picker.requests();
|
||||
let [_, again] = requests.as_slice() else { panic!("the save panel opens again: {requests:?}") };
|
||||
assert_eq!(again.file_name.as_deref(), Some("list.pdf"));
|
||||
assert_eq!(again.directory.as_deref(), Some(std::path::Path::new(portal)));
|
||||
assert_eq!(again.filters.iter().map(|f| f.extensions.join(",")).collect::<Vec<_>>(), ["pdf"]);
|
||||
assert!(app.ui.status.contains("list.pdf"), "{}", app.ui.status);
|
||||
picker.answer_saved(&format!("{portal}/list.pdf"), Some(0));
|
||||
settle(&mut app);
|
||||
assert_eq!(files.borrow().as_slice(), [format!("{portal}/list.pdf")]);
|
||||
assert_eq!(picker.requests().len(), 2, "a granted name is written without asking again");
|
||||
}
|
||||
|
||||
/// Keyboard Shortcuts' Import opens a shortcut set another app saved as text (`.kys`) in a review
|
||||
/// over the dialog when its file dialog answers; Cancel shows Keyboard Shortcuts again.
|
||||
#[test]
|
||||
|
||||
@@ -552,3 +552,62 @@ fn an_export_keeps_a_typed_extension_of_the_format_it_writes() {
|
||||
answer_top(&mut app, &[], true);
|
||||
assert_eq!(last(&w), "/tmp/sel.pdf", "Export Selection takes its format from the typed name");
|
||||
}
|
||||
|
||||
/// The file name the last save panel suggested.
|
||||
fn suggested_name(picker: &Picker) -> Option<String> {
|
||||
picker.requests().last()?.file_name.clone()
|
||||
}
|
||||
|
||||
/// The folder the last save panel opened in.
|
||||
fn panel_folder(picker: &Picker) -> Option<PathBuf> {
|
||||
picker.requests().last()?.directory.clone()
|
||||
}
|
||||
|
||||
/// In a Flatpak sandbox the save panel answers with a path in the document portal, which puts only
|
||||
/// that name into the folder picked. A name the export has to change (`poster` for a PDF) is not
|
||||
/// written: the save panel opens again suggesting `poster.pdf`, and its answer is written. A
|
||||
/// look-alike path outside the portal gets the extension at once.
|
||||
#[test]
|
||||
fn an_export_asks_again_for_a_name_the_document_portal_did_not_grant() {
|
||||
for portal in ["/run/user/1000/doc/a1b2c3d4", "/run/flatpak/doc/a1b2c3d4"] {
|
||||
let (mut app, picker, w) = saving_app();
|
||||
save_via(&mut app, &picker, |a| io::export_pdf(a, json!({})), (&format!("{portal}/poster"), None));
|
||||
assert!(w.borrow().is_empty(), "nothing is written under a name the portal did not grant: {:?}", w.borrow());
|
||||
assert_eq!(picker.requests().len(), 2, "the save panel opens again");
|
||||
assert_eq!(suggested_name(&picker).as_deref(), Some("poster.pdf"));
|
||||
assert_eq!(panel_folder(&picker).as_deref(), Some(Path::new(portal)), "the folder of the last answer");
|
||||
assert!(app.ui.status.contains("poster.pdf"), "{}", app.ui.status);
|
||||
picker.answer_saved(&format!("{portal}/poster.pdf"), None);
|
||||
poll(&mut app);
|
||||
assert_eq!(w.borrow().as_slice(), [format!("{portal}/poster.pdf")]);
|
||||
assert_eq!(picker.requests().len(), 2, "a granted name is written without asking again");
|
||||
}
|
||||
let (mut app, picker, w) = saving_app();
|
||||
save_via(&mut app, &picker, |a| io::export_pdf(a, json!({})), ("/home/me/run/user/1000/doc/a1b2/poster", None));
|
||||
assert_eq!(w.borrow().as_slice(), ["/home/me/run/user/1000/doc/a1b2/poster.pdf"]);
|
||||
assert_eq!(picker.requests().len(), 1);
|
||||
}
|
||||
|
||||
/// Save As in the document portal with PDF picked and the suggested `Untitled-1.vectorcraft` kept:
|
||||
/// the save panel opens again suggesting `Untitled-1.pdf` with PDF as the file type, and the PDF
|
||||
/// options and the write follow its answer.
|
||||
#[test]
|
||||
fn save_as_asks_again_for_a_name_the_document_portal_did_not_grant() {
|
||||
let portal = "/run/user/1000/doc/a1b2c3d4";
|
||||
let (mut app, picker, w) = saving_app();
|
||||
let _ = app.run("file.saveAs", json!({}));
|
||||
let pdf = type_index(&picker, "pdf").expect("Save As offers PDF");
|
||||
picker.answer_saved(&format!("{portal}/Untitled-1.vectorcraft"), Some(pdf));
|
||||
poll(&mut app);
|
||||
assert!(w.borrow().is_empty(), "{:?}", w.borrow());
|
||||
assert!(dialog_path(&app).is_none(), "no PDF options before the name is granted");
|
||||
assert_eq!(picker.requests().len(), 2, "the save panel opens again");
|
||||
assert_eq!(suggested_name(&picker).as_deref(), Some("Untitled-1.pdf"));
|
||||
assert_eq!(panel_folder(&picker).as_deref(), Some(Path::new(portal)), "the folder of the last answer");
|
||||
assert_eq!(type_index(&picker, "pdf"), Some(0), "PDF is the first file type offered");
|
||||
picker.answer_saved(&format!("{portal}/Untitled-1.pdf"), Some(0));
|
||||
poll(&mut app);
|
||||
assert_eq!(dialog_path(&app), Some(format!("{portal}/Untitled-1.pdf")));
|
||||
answer_top(&mut app, &[], true);
|
||||
assert_eq!(last(&w), format!("{portal}/Untitled-1.pdf"));
|
||||
}
|
||||
@@ -24,6 +24,17 @@ pub fn ui_fonts() -> UiFonts<'static> {
|
||||
}
|
||||
}
|
||||
|
||||
/// Turns font hinting off for all text `ctx` draws, in both themes. With hinting on, egui hints a TrueType face that
|
||||
/// has no hinting instructions (no `fpgm`, no `prep` and no glyph instructions) with skrifa 0.44's automatic hinter,
|
||||
/// whose blue-zone search never ends for some glyphs, such as a tall narrow Hebrew letter, so the font list stops
|
||||
/// responding when a row draws such a face. The font list and the samples get their faces through craft-libs, which
|
||||
/// sets no hinting option per face, so the switch covers every face of the context. Hinting stays off until the
|
||||
/// skrifa blue-zone exit (storytold/craft-libs#5222) is in the build; the craft-libs pin that brings it removes this
|
||||
/// function and its call.
|
||||
pub(crate) fn hinting_off(ctx: &egui::Context) {
|
||||
ctx.all_styles_mut(|style| style.visuals.text_options.font_hinting = false);
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
struct FontSelection {
|
||||
language: Lang,
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
//! question per document); Cancel stops the whole operation and a cancelled Save As keeps the
|
||||
//! document open.
|
||||
//!
|
||||
//! The question is the framework's `UnsavedChangesDialog` on the dialog host, and a `CloseGuard`
|
||||
//! The question is the framework's `HostedUnsavedChangesDialog` on the dialog host, and a `CloseGuard`
|
||||
//! (`VectorcraftApp::closing`) decides what comes next. Agents answer it like any other dialog:
|
||||
//! `ui.dialog.set {field: "choice", value: "dontSave"}` then `ui.dialog.confirm`, or
|
||||
//! `ui.dialog.cancel`. [`pump`] reads the answer each frame.
|
||||
|
||||
use craft::quit::{CloseAnswer, CloseGuard, CloseScope, GuardStep};
|
||||
use craft::ui::dialog::UnsavedChangesDialog;
|
||||
use craft::ui::dialog::{HostedUnsavedChangesDialog, UnsavedChangesDialog};
|
||||
use serde_json::{Value, json};
|
||||
use vectorcraft_engine::cmd::fileio::SaveMode;
|
||||
|
||||
@@ -137,7 +137,7 @@ fn show_question(app: &mut VectorcraftApp, guard: &CloseGuard<u64>, uid: u64) ->
|
||||
// PLAN: assumed `VectorcraftApp::dialogs() -> Option<handle>` whose `with(|host: &mut DialogHost| ..)` runs on the host (wg.S1).
|
||||
let dialogs = app.dialogs().ok_or("no window")?;
|
||||
dialogs.with(|h| {
|
||||
h.open(UnsavedChangesDialog::new(scope, name).remaining(remaining));
|
||||
h.open(HostedUnsavedChangesDialog::new(UnsavedChangesDialog::new(scope, name).remaining(remaining)));
|
||||
});
|
||||
Ok(())
|
||||
}
|
||||
@@ -190,7 +190,7 @@ pub(crate) fn pump(app: &mut VectorcraftApp, ctx: &egui::Context) {
|
||||
ctx.request_repaint();
|
||||
return;
|
||||
}
|
||||
let Some(result) = app.dialogs().and_then(|d| d.with(|h| h.take::<UnsavedChangesDialog>())) else { return };
|
||||
let Some(result) = app.dialogs().and_then(|d| d.with(|h| h.take::<HostedUnsavedChangesDialog>())) else { return };
|
||||
let Some(mut closing) = app.closing.take() else { return };
|
||||
// Closed from outside: the same as Cancel.
|
||||
let (answer, all) = result.ok().map_or((CloseAnswer::Cancel, false), |a| (a.answer, a.apply_to_all));
|
||||
@@ -334,14 +334,14 @@ mod tests {
|
||||
}
|
||||
|
||||
fn question_open(app: &VectorcraftApp) -> bool {
|
||||
app.dialogs().is_some_and(|d| d.with(|h| h.is_open::<UnsavedChangesDialog>()))
|
||||
app.dialogs().is_some_and(|d| d.with(|h| h.is_open::<HostedUnsavedChangesDialog>()))
|
||||
}
|
||||
|
||||
/// Answers the open question on the host as its button would, then runs the pump.
|
||||
fn answer(app: &mut VectorcraftApp, ctx: &egui::Context, answer: CloseAnswer) {
|
||||
app.dialogs().unwrap().with(|h| {
|
||||
h.get_mut::<UnsavedChangesDialog>().unwrap().set_answer(answer);
|
||||
assert!(h.confirm::<UnsavedChangesDialog>(ctx), "a question is open");
|
||||
h.get_mut::<HostedUnsavedChangesDialog>().unwrap().set_answer(answer);
|
||||
assert!(h.confirm::<HostedUnsavedChangesDialog>(ctx), "a question is open");
|
||||
});
|
||||
pump(app, ctx);
|
||||
}
|
||||
|
||||
@@ -877,7 +877,8 @@ DXF Options: Export As… with the DXF format (`file.exportAs {format: "dxf"}`,
|
||||
`document.export` params: `dxfPreset` (`custom`, `cnc`), `version`, `unit` (a unit name such as `Millimeters`), `scale`,
|
||||
`scaleLineweights`, `colors` (`8`, `16`, `256`, `true`), `rasterFormat` (`png`, `jpeg`), `includeImages` (Include
|
||||
Placed Images), `preserve` (`appearance`, `editability`), `selectedOnly`, `alterPaths`, `outlineText`, `includeHatches`
|
||||
(Include Fill Hatches), plus `path` and the artboard choice. Setting `dxfPreset` to
|
||||
(Include Fill Hatches), `groupBlocks` (Always Export Group as Block Reference, which no preset sets), plus `path` and
|
||||
the artboard choice. Setting `dxfPreset` to
|
||||
`cnc` sets the fields it sets (see `document.exportDxf`), and `dxfPreset` reads `custom` again once one of them is
|
||||
changed; setting it to `custom` puts back the defaults. `ui.dialog.confirm` checks them (a bad value, or
|
||||
Export Selected Art Only with nothing selected, keeps the dialog open), remembers them for the next DXF Options and
|
||||
|
||||
+8
-1
@@ -11952,6 +11952,9 @@ When placed editable art names a font family it does not define as a composite f
|
||||
composite font of that name, the placed type gets a free name such as "Name 2" so it keeps the font it was laid out in.
|
||||
A placed live dimension's label options take the same new name, so a redrawn label keeps that font; a document
|
||||
composite font with the same name and the same definition is reused, and the dimension keeps its own spelling of it.
|
||||
A composite font of the placed file that is named like an installed font, or whose own name or part values are out of
|
||||
range, does not come in: the file's type was laid out without it, and keeps that font. Two definitions of one name
|
||||
that both come in still refuse the placement.
|
||||
A DCS file (Desktop Color Separation, version 1.0 or 2.0: an EPS file whose header names one EPS program per printing
|
||||
plate, <http://www.telegraphics.net/doc/DCS.txt>) is placed only from its `path` with link, as one linked image
|
||||
([Import DCS files](https://helpx.adobe.com/illustrator/desktop/add-and-import-files/import-other-file-types/import-dcs-files.html)).
|
||||
@@ -12846,7 +12849,11 @@ from the bottom-left corner of the first artboard (or `artboard`), in drawing un
|
||||
width profiles, arrowheads, dashes offset into their pattern) as filled outlines; `"editability"` keeps type as text
|
||||
and every stroke a line. `alterPaths` writes as filled outlines those strokes (with `"editability"` too), strokes
|
||||
wider than the widest lineweight (2.11 mm), and every stroke in R13 and R14, which have no lineweights; it keeps other
|
||||
strokes as lines. `outlineText` outlines type, `selectedOnly` writes only the
|
||||
strokes as lines. `outlineText` outlines type. `groupBlocks: true` (Always Export Group as Block Reference; default
|
||||
`false`, and `dxfPreset` does not set it) writes each group as a block definition holding its contents, placed by one
|
||||
INSERT on its layer at the origin, unscaled; a group inside it becomes a block placed inside that block, and a group
|
||||
that writes nothing writes no block. Block names come from the group names (`Group` for an unnamed one), made unique
|
||||
with `_2`, `_3`…. `selectedOnly` writes only the
|
||||
selected objects in their layers (every export takes it), and `useArtboards: true` writes one drawing per chosen
|
||||
artboard holding the art over it. `dxfPreset: "cnc"` (CNC / CAM; default `"custom"`) sets the options for cutting
|
||||
software that the call does not give: version `2000` (the oldest version that has both lightweight polylines and lineweights), `unit:
|
||||
|
||||
@@ -2571,6 +2571,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
|
||||
- DXF export's Include Placed Images and Include Fill Hatches (`includeImages`, `includeHatches`; VectorCraft's own options, on by default and off in CNC / CAM) leave out placed images with their linked files, without decoding them, and the solid hatch after each filled area's outlines, each on its own, with one note in `warnings` when something was left out; R12 keeps its own notes. An open path's fill outline is closed, as the fill is, in every version (`an_open_path_s_fill_outline_keeps_its_closing_edge`, `fills_without_hatches_keep_their_outlines`, `images_can_be_left_out_with_their_files`, `images_and_hatches_are_left_out_independently_and_the_cnc_preset_leaves_out_both`, `placed_images_and_fill_hatches_can_be_left_out`, `include_placed_images_and_fill_hatches_follow_the_preset_and_a_change_shows_custom`).
|
||||
- DXF export writes a path of straight segments and circular arcs (a slot, a D shape, a rounded rectangle, a pie) as one polyline whose vertices carry a bulge (group 42) for each arc: an LWPOLYLINE in R14 and later, a POLYLINE with VERTEX entities in R12 and R13, closed when the path is closed, and it reads back as the same outline (#1299, `crates/cad/src/tests.rs`). Such a path was written as one SPLINE (a flattened polyline in R12); a path with any other curve still is. A shallow curve becomes an ARC or a bulge only when it lies on the circle within 5e-4 of its own extent as well as of the radius, and the drawing extents (`$EXTMIN`, `$EXTMAX`) reach the furthest points of every ARC and bulge.
|
||||
- DXF export with Use Artboards applies live effects and places symbols' art once for all the artboards' drawings instead of once for each drawing; each drawing's bytes, linked images, warnings and notes are the same as before (`drawings_apply_the_live_effects_once_and_match_drawings_written_alone`, `each_artboard_s_drawing_is_the_drawing_of_that_artboard_alone`).
|
||||
- DXF Options' Always Export Group as Block Reference (`groupBlocks`, off by default and not set by a preset) writes each group with output as a block of its contents, placed by an INSERT on its layer, with groups inside it as blocks placed inside that block, in every version from R12 to 2018; a group whose contents write no entity (an empty group, or one whose objects are all hidden or left out) writes no block or INSERT; the drawing reads back with the same art bounds (`groups_are_blocks_placed_by_inserts_in_every_version`, `blocks_read_back_at_the_place_their_group_was`, `group_blocks_write_a_group_as_an_insert`). Behavior reference: [Export artwork, AutoCAD export options](https://helpx.adobe.com/illustrator/using/exporting-artwork.html).
|
||||
- DWG drawings open and place in the desktop build, and `document.dxfInfo` reads them: craft-dwg converts the drawing to DXF, in a copy of the app started with `--dwg-worker`, off the UI thread when the user opens or places it, and the DXF reader reads it with the DXF Import Options. The web build and R1.x and R2.x drawings return an error that says to save the drawing as DXF. DWG is not written: Export As keeps it greyed out, exporting to it says to export DXF, and Save over the drawing is refused (`a_dwg_drawing_comes_in_as_its_dxf_does`, `document_open_reads_a_dwg_drawing_as_its_dxf`, `dxf_info_and_place_read_a_dwg`, `a_dwg_opened_is_never_written_back_as_dwg`; scores and estimates unchanged).
|
||||
- `.dws` drawing standards files and `.dwt` drawing templates, which are DWG files, open and place as DWG drawings, are listed in the open and place dialogs, and go through the DXF Import Options; a `.dwt` opens as a new untitled document (`a_dwt_template_opens_untitled_and_a_dws_opens_as_its_drawing`, `a_dwt_or_dws_drawing_places_as_a_dwg_does`, `dwt_and_dws_are_read_only_and_exporting_them_says_to_write_dxf`; scores and estimates unchanged).
|
||||
- Affinity documents in (AF.1–AF.4): `.af` (Affinity 3) and `.afdesign`/`.afphoto`/`.afpub` (Affinity 1 and 2, container versions 8–12) open and place as editable art: layers and sublayers, groups (pass-through or isolated), artboards (with their names and backgrounds) and Publisher pages side by side, curves with live corners, parametric shapes (rectangles with corner radii, ellipses, polygons, stars, pies, triangles, trapezoids), compound shapes, solid/linear/elliptical gradient fills and strokes (weight, dashes, alignment, scale-with-object), clipping by nesting, vector and pixel masks, artistic and frame text with fonts, sizes, tracking, leading and alignment, placed images (their original JPEG/PNG) and pixel layers (8/16-bit RGB, CMYK), opacity, visibility, locking and blend modes, at the document's resolution in points. Effects, adjustments, brushes and pressure profiles, transparency gradients, master pages, symbol instances (imported as their cached picture), special shapes (cloud, heart, cog…, imported as ellipses) and Affinity-only blend modes are named in the import warning. A file whose native data can't be read opens as its embedded preview with the reason, and that preview can't be placed. Save never writes back over the Affinity file and there is no Affinity export. AF.5 (from DesignCraft's import, storytold/designcraft#291) adds master pages (on a locked layer behind the pages that show them), tables (area type per cell and a line per edge), each paragraph's alignment, indents, spacing and leading, horizontal text scale, outlined text, frame text sized by its text scale, drop shadows and outer glows as live effects (inner shadows as inner glows), outline effects as strokes, colour and gradient overlays baked into the paint, embedded Affinity documents as editable content (their artboards don't become artboards), pixel layers over 64 MP at a reduced resolution and HEIC photos from their stored pixels; automatic leading (size plus the font's line gap) fitted on thumbnails; underlines and strikethrough; strokes whose style is None (every shape stores one) left out, which also brings 6 public files closer to their thumbnails; line breaks inside a paragraph; table cell text centred as Affinity centres it, also where it is taller than its cell; CMYK pixel layers converted through the document's embedded CMYK profile (relative colorimetric with black-point compensation, as each layer's colour settings name), or kept as CMYK images when there is none; outline effects on stroked shapes around their stroke; artistic text whose paragraphs align differently aligned within its longest line, a frame's first baseline at cap height, and frames whose last lines' descenders hang out made tall enough to show them (all measured on a local document's own PDF export: baselines match to 0.1 pt); a local 56-artboard document's mean thumbnail difference went from 16.2 to 11.4, and its pages' mean difference from the owner's PDF export from 12.9 to 9.3. AF.4 adds Affinity 3 artboard recognition and actual-outline clipping, source-backed JPEG/PNG raster tiles, Unicode text-run recovery, stored fallback/exact installed fonts, OpenType feature flags and compound-geometry limits. 51 public CC0/MIT/Apache-2.0 files (33 current `.af`), pinned and sha256-verified (`cargo xtask corpus --affinity`), test native retention and every-board native/SVG/PDF/PSD output for current files; selected files compare their saved thumbnails. No Affinity reopen or independent paired PSD oracle was available; [source audit and complex-font gaps](affinity-validation.md); [scope, provenance and limits](../crates/affinity/README.md).
|
||||
|
||||
+30
-18
@@ -420,11 +420,13 @@ fn cmd_ci_shard() -> Result<(), String> {
|
||||
run_steps(&steps)
|
||||
}
|
||||
|
||||
/// `cargo xtask ci warm`: for each run of each test shard, builds the test targets it runs without
|
||||
/// running them, then builds what the checks shard builds, so one dependency-cache entry holds the
|
||||
/// dependencies of every shard with the features that shard builds them with (cargo resolves
|
||||
/// features over the packages each command selects). The test builds select the same crates and
|
||||
/// targets as the test shards' runs, so the cache also holds the test executables the shards run.
|
||||
/// `cargo xtask ci warm`: for each test shard, builds the library and binary tests of the crates
|
||||
/// it tests without running them, then builds what the checks shard builds, so one
|
||||
/// dependency-cache entry holds the dependencies of every shard with the features that shard builds
|
||||
/// them with (cargo resolves features over the packages each command selects). It does not build
|
||||
/// the integration tests ([`warm_runs`], [`warm_tests`]), which take the same dependencies and
|
||||
/// dev-dependencies as the library tests. Cargo warns `unused dependency vectorcraft-testkit` for
|
||||
/// vectorcraft-cli, whose integration tests are the only ones that use it.
|
||||
///
|
||||
/// With `GATE_SHARD` and `GATE_SHARDS` set (the gate's split warm legs), it builds only what that
|
||||
/// shard builds: a test shard's tests, or the checks shard's builds. A split's later parts build
|
||||
@@ -446,7 +448,7 @@ fn cmd_ci_warm() -> Result<(), String> {
|
||||
let mut steps: Vec<Step> = Vec::new();
|
||||
for i in tests {
|
||||
if let shards::Shard::Tests(runs, _) = checked[i].clone() {
|
||||
for r in runs {
|
||||
for r in warm_runs(runs) {
|
||||
steps.push((
|
||||
"build tests",
|
||||
Box::new(move || {
|
||||
@@ -490,11 +492,19 @@ fn push_warm_checks(steps: &mut Vec<Step>) {
|
||||
steps.push(("wasm", Box::new(cmd_wasm)));
|
||||
}
|
||||
|
||||
/// The command `ci warm` builds the tests of one run of a test shard with, and its description.
|
||||
/// The runs of a test shard that `ci warm` builds: every run except an integration-test run, whose
|
||||
/// crate has its library tests in a run on another shard.
|
||||
fn warm_runs(runs: Vec<shards::Run>) -> impl Iterator<Item = shards::Run> {
|
||||
runs.into_iter().filter(|r| r.targets != shards::Targets::Integration)
|
||||
}
|
||||
|
||||
/// The command `ci warm` builds the library and binary tests of one run of a test shard with, and
|
||||
/// its description.
|
||||
fn warm_tests(r: &shards::Run) -> (Command, String) {
|
||||
let units = shards::Targets::Units;
|
||||
let mut c = cargo();
|
||||
c.arg("test").args(shards::select(&r.crates)).args(r.targets.args()).arg("--no-run");
|
||||
(c, format!("cargo test {} --no-run ({})", r.targets.shown(), shards::names(&r.crates)))
|
||||
c.arg("test").args(shards::select(&r.crates)).args(units.args()).arg("--no-run");
|
||||
(c, format!("cargo test {} --no-run ({})", units.shown(), shards::names(&r.crates)))
|
||||
}
|
||||
|
||||
/// Runs `steps` in turn, stopping at the first that fails; the summary names the steps that passed
|
||||
@@ -646,15 +656,17 @@ mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn warm_builds_the_test_targets_the_shards_run() {
|
||||
let a = shards::Member { name: "a".into(), id: "path+file:///w/a#0.1.0".into(), version: "0.1.0".into(), doctests: true };
|
||||
fn warm_builds_library_and_binary_tests_without_integration_tests() {
|
||||
let m =
|
||||
|name: &str| shards::Member { name: name.into(), id: format!("path+file:///w/{name}#0.1.0"), version: "0.1.0".into(), doctests: true };
|
||||
let args = |r: &shards::Run| warm_tests(r).0.get_args().map(|a| a.to_string_lossy().into_owned()).collect::<Vec<String>>();
|
||||
let all = shards::Run::all(vec![a.clone()]);
|
||||
assert_eq!(args(&all), ["test", "-p", "path+file:///w/a#0.1.0", "--lib", "--bins", "--tests", "--no-run"]);
|
||||
assert_eq!(warm_tests(&all).1, "cargo test --lib --bins --tests --no-run (a)");
|
||||
let units = shards::Run { targets: shards::Targets::Units, crates: vec![a.clone()] };
|
||||
assert_eq!(args(&units), ["test", "-p", "path+file:///w/a#0.1.0", "--lib", "--bins", "--no-run"]);
|
||||
let integration = shards::Run { targets: shards::Targets::Integration, crates: vec![a] };
|
||||
assert_eq!(args(&integration), ["test", "-p", "path+file:///w/a#0.1.0", "--test", "*", "--no-run"]);
|
||||
let all = shards::Run::all(vec![m("a")]);
|
||||
assert_eq!(args(&all), ["test", "-p", "path+file:///w/a#0.1.0", "--lib", "--bins", "--no-run"]);
|
||||
assert_eq!(warm_tests(&all).1, "cargo test --lib --bins --no-run (a)");
|
||||
let units = shards::Run { targets: shards::Targets::Units, crates: vec![m("b")] };
|
||||
assert_eq!(args(&units), ["test", "-p", "path+file:///w/b#0.1.0", "--lib", "--bins", "--no-run"]);
|
||||
let integration = shards::Run { targets: shards::Targets::Integration, crates: vec![m("b")] };
|
||||
let built: Vec<shards::Run> = warm_runs(vec![all.clone(), integration, units.clone()]).collect();
|
||||
assert_eq!(built, [all, units]);
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@ use std::process::Command;
|
||||
|
||||
use serde_json::Value;
|
||||
|
||||
const REV: &str = "c2a47dfea38b215245f739c675da3662c89f1e09";
|
||||
const REV: &str = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8";
|
||||
const PACKAGES: &[(&str, &str, &str)] = &[
|
||||
("craft-pdf", "0.1.0", REV),
|
||||
("krilla", "0.8.2", REV),
|
||||
|
||||
Reference in new issue
Block a user