mirror of
https://github.com/storytold/gridcraft.git
synced 2026-11-22 22:04:57 -06:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f085cea83c | ||
|
|
544a50c5cf |
Generated
+106
-133
@@ -195,6 +195,15 @@ version = "1.0.104"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470"
|
||||
|
||||
[[package]]
|
||||
name = "arbitrary"
|
||||
version = "1.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3bc62ac97cc33321f50863d514c3bc38a453947a8f9e781137e47c7401020aed"
|
||||
dependencies = [
|
||||
"derive_arbitrary",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "arboard"
|
||||
version = "3.7.0"
|
||||
@@ -1111,7 +1120,7 @@ dependencies = [
|
||||
"objc2 0.6.5",
|
||||
"objc2-app-kit 0.3.2",
|
||||
"objc2-foundation 0.3.2",
|
||||
"skrifa 0.44.0",
|
||||
"skrifa",
|
||||
"wasm-bindgen",
|
||||
"wasm-bindgen-futures",
|
||||
"web-sys",
|
||||
@@ -1141,7 +1150,7 @@ dependencies = [
|
||||
"verifysign",
|
||||
"winreg",
|
||||
"winsafe",
|
||||
"zip",
|
||||
"zip 9.1.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1244,7 +1253,7 @@ source = "git+https://github.com/storytold/craft-libs?rev=010702ee9b030844c85293
|
||||
dependencies = [
|
||||
"flate2",
|
||||
"thiserror 2.0.21",
|
||||
"zip",
|
||||
"zip 9.1.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1254,7 +1263,7 @@ source = "git+https://github.com/storytold/craft-libs?rev=a20dfd1623709b0bd98301
|
||||
dependencies = [
|
||||
"flate2",
|
||||
"thiserror 2.0.21",
|
||||
"zip",
|
||||
"zip 9.1.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1382,6 +1391,17 @@ version = "0.5.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9e9de72ce2ad1f90dc62fa25f0f430ef85eb4b0d8fa0be4f30373bc40a21d28e"
|
||||
|
||||
[[package]]
|
||||
name = "derive_arbitrary"
|
||||
version = "1.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1b034bd7d5f032402a2479444dcc6f74e36a03f31854d41680fb240ef682a1ac"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 3.0.6",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dify"
|
||||
version = "0.8.0"
|
||||
@@ -1513,7 +1533,7 @@ dependencies = [
|
||||
"objc2-foundation 0.3.2",
|
||||
"parking_lot",
|
||||
"percent-encoding",
|
||||
"pollster",
|
||||
"pollster 1.0.1",
|
||||
"profiling",
|
||||
"raw-window-handle",
|
||||
"send_wrapper",
|
||||
@@ -1628,7 +1648,7 @@ dependencies = [
|
||||
"kittest",
|
||||
"log",
|
||||
"open",
|
||||
"pollster",
|
||||
"pollster 1.0.1",
|
||||
"serde",
|
||||
"tempfile",
|
||||
"toml",
|
||||
@@ -1721,13 +1741,13 @@ dependencies = [
|
||||
"emath",
|
||||
"epaint_default_fonts",
|
||||
"font-types",
|
||||
"harfrust 0.12.0",
|
||||
"harfrust",
|
||||
"log",
|
||||
"nohash-hasher",
|
||||
"parking_lot",
|
||||
"profiling",
|
||||
"self_cell",
|
||||
"skrifa 0.44.0",
|
||||
"skrifa",
|
||||
"smallvec",
|
||||
"unicode-bidi",
|
||||
"unicode-general-category",
|
||||
@@ -1933,9 +1953,9 @@ checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb"
|
||||
|
||||
[[package]]
|
||||
name = "font-types"
|
||||
version = "0.12.7"
|
||||
version = "0.12.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "835ae9d781464a79026cde387f9cbc650c9a4909d7cf7e658b127e3c35d2f35d"
|
||||
checksum = "6c92d9081c7ab3bd83ef1eecdfad090f3d966e3ce74106779664114cfe1a6274"
|
||||
dependencies = [
|
||||
"bytemuck",
|
||||
]
|
||||
@@ -2148,7 +2168,7 @@ dependencies = [
|
||||
"hashbrown 0.17.1",
|
||||
"log",
|
||||
"peniko",
|
||||
"skrifa 0.44.0",
|
||||
"skrifa",
|
||||
"smallvec",
|
||||
"vello_common",
|
||||
]
|
||||
@@ -2266,7 +2286,7 @@ dependencies = [
|
||||
"muda",
|
||||
"objc2 0.6.5",
|
||||
"objc2-app-kit 0.3.2",
|
||||
"pollster",
|
||||
"pollster 1.0.1",
|
||||
"rfd",
|
||||
"serde_json",
|
||||
"winit",
|
||||
@@ -2304,9 +2324,9 @@ dependencies = [
|
||||
"gridcraft-mcp",
|
||||
"gridcraft-sandbox",
|
||||
"log",
|
||||
"quick-xml 0.42.0",
|
||||
"quick-xml 0.41.0",
|
||||
"serde_json",
|
||||
"zip",
|
||||
"zip 3.0.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2343,7 +2363,7 @@ dependencies = [
|
||||
"thiserror 2.0.21",
|
||||
"unicode-segmentation",
|
||||
"web-time",
|
||||
"zip",
|
||||
"zip 3.0.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2409,9 +2429,9 @@ version = "0.19.1"
|
||||
dependencies = [
|
||||
"craft-pdf",
|
||||
"craft-stream-codecs",
|
||||
"harfrust 0.16.0",
|
||||
"harfrust",
|
||||
"sha2 0.11.1",
|
||||
"skrifa 0.48.0",
|
||||
"skrifa",
|
||||
"unicode-bidi",
|
||||
]
|
||||
|
||||
@@ -2421,7 +2441,7 @@ version = "0.19.1"
|
||||
dependencies = [
|
||||
"landlock",
|
||||
"libc",
|
||||
"nix 0.32.0",
|
||||
"nix",
|
||||
"seccompiler",
|
||||
"thiserror 2.0.21",
|
||||
]
|
||||
@@ -2444,7 +2464,7 @@ dependencies = [
|
||||
"log",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"skrifa 0.48.0",
|
||||
"skrifa",
|
||||
"sys-locale",
|
||||
"toml",
|
||||
"unicode-bidi",
|
||||
@@ -2491,10 +2511,10 @@ dependencies = [
|
||||
"gridcraft-functions",
|
||||
"gridcraft-math",
|
||||
"gridcraft-model",
|
||||
"quick-xml 0.42.0",
|
||||
"quick-xml 0.41.0",
|
||||
"sha2 0.11.1",
|
||||
"thiserror 2.0.21",
|
||||
"zip",
|
||||
"zip 3.0.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2545,23 +2565,10 @@ checksum = "c03d949a14aa089bbb282f7dd76a498a7f684428e4257202efc119ec010376f9"
|
||||
dependencies = [
|
||||
"bitflags 2.13.2",
|
||||
"bytemuck",
|
||||
"read-fonts 0.41.0",
|
||||
"read-fonts",
|
||||
"smallvec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "harfrust"
|
||||
version = "0.16.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "741c9cd8fb2f39c393366b9cf13e8c31ad6adbbd9d817f0a18fe47cff36a3cca"
|
||||
dependencies = [
|
||||
"bitflags 2.13.2",
|
||||
"bytemuck",
|
||||
"read-fonts 0.47.0",
|
||||
"smallvec",
|
||||
"yoke",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hashbrown"
|
||||
version = "0.15.5"
|
||||
@@ -3186,9 +3193,9 @@ checksum = "20870f649af7073d53e38067b2a84312175d56ea15217e1b15bc83506ec50afb"
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.191"
|
||||
version = "0.2.190"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a"
|
||||
checksum = "ce5d3ddc6d3fa000eb1536d85e147bfe31aacaba692ed6a876f95cb7c855be78"
|
||||
|
||||
[[package]]
|
||||
name = "libloading"
|
||||
@@ -3262,9 +3269,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "log"
|
||||
version = "0.4.35"
|
||||
version = "0.4.34"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5d15f86d12da44cd8d4ec3c73984537eb7f4cadcb9776a575a0a8a05ca11005c"
|
||||
checksum = "f9f8bd3e56ce4dfc153cf470fffbfa98c7620958b312ca5c3a4b8d5181fd13c6"
|
||||
|
||||
[[package]]
|
||||
name = "lru-slab"
|
||||
@@ -3447,21 +3454,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "nix"
|
||||
version = "0.31.4"
|
||||
version = "0.31.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2bc81ce8148d3b4f3274da811f11cdd824ae661ee4ef732cdb229825cf5be7f7"
|
||||
dependencies = [
|
||||
"bitflags 2.13.2",
|
||||
"cfg-if",
|
||||
"cfg_aliases",
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nix"
|
||||
version = "0.32.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "77730ed34f01f4990cb2ea67fec715ecebc6fab9a6396cf83c5529b13f581bdc"
|
||||
checksum = "cf20d2fde8ff38632c426f1165ed7436270b44f199fc55284c38276f9db47c3d"
|
||||
dependencies = [
|
||||
"bitflags 2.13.2",
|
||||
"cfg-if",
|
||||
@@ -3575,7 +3570,6 @@ dependencies = [
|
||||
"objc2-core-foundation",
|
||||
"objc2-core-graphics",
|
||||
"objc2-foundation 0.3.2",
|
||||
"objc2-uniform-type-identifiers 0.3.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -3794,7 +3788,7 @@ dependencies = [
|
||||
"objc2-link-presentation",
|
||||
"objc2-quartz-core 0.2.2",
|
||||
"objc2-symbols",
|
||||
"objc2-uniform-type-identifiers 0.2.2",
|
||||
"objc2-uniform-type-identifiers",
|
||||
"objc2-user-notifications",
|
||||
]
|
||||
|
||||
@@ -3821,16 +3815,6 @@ dependencies = [
|
||||
"objc2-foundation 0.2.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "objc2-uniform-type-identifiers"
|
||||
version = "0.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7902ac02859fc1f7045f8b598c63f1ae0cc7efeaa06a9bc9f3d9a3c955974fa4"
|
||||
dependencies = [
|
||||
"objc2 0.6.5",
|
||||
"objc2-foundation 0.3.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "objc2-user-notifications"
|
||||
version = "0.2.2"
|
||||
@@ -3985,13 +3969,12 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "phf"
|
||||
version = "0.13.1"
|
||||
version = "0.11.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c1562dc717473dbaa4c1f85a36410e03c047b2e7df7f45ee938fbef64ae7fadf"
|
||||
checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078"
|
||||
dependencies = [
|
||||
"phf_macros 0.13.1",
|
||||
"phf_shared 0.13.1",
|
||||
"serde",
|
||||
"phf_macros 0.11.3",
|
||||
"phf_shared 0.11.3",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -4007,12 +3990,12 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "phf_generator"
|
||||
version = "0.13.1"
|
||||
version = "0.11.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "135ace3a761e564ec88c03a77317a7c6b80bb7f7135ef2544dbe054243b89737"
|
||||
checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d"
|
||||
dependencies = [
|
||||
"fastrand",
|
||||
"phf_shared 0.13.1",
|
||||
"phf_shared 0.11.3",
|
||||
"rand 0.8.8",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -4027,12 +4010,12 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "phf_macros"
|
||||
version = "0.13.1"
|
||||
version = "0.11.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "812f032b54b1e759ccd5f8b6677695d5268c588701effba24601f6932f8269ef"
|
||||
checksum = "f84ac04429c13a7ff43785d75ad27569f2951ce0ffd30a3321230db2fc727216"
|
||||
dependencies = [
|
||||
"phf_generator 0.13.1",
|
||||
"phf_shared 0.13.1",
|
||||
"phf_generator 0.11.3",
|
||||
"phf_shared 0.11.3",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.119",
|
||||
@@ -4053,9 +4036,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "phf_shared"
|
||||
version = "0.13.1"
|
||||
version = "0.11.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e57fef6bc5981e38c2ce2d63bfa546861309f875b8a75f092d1d54ae2d64f266"
|
||||
checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5"
|
||||
dependencies = [
|
||||
"siphasher",
|
||||
]
|
||||
@@ -4160,9 +4143,15 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "pollster"
|
||||
version = "1.0.2"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3c2c80c4e3afbec8224b9d3e641fbf3a5690cc7595b887b0a27a926bb357ed5c"
|
||||
checksum = "2f3a9f18d041e6d0e102a0a46750538147e5e8992d3b4873aaafee2520b00ce3"
|
||||
|
||||
[[package]]
|
||||
name = "pollster"
|
||||
version = "1.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bc6355899e1c9462875b6757c79f3caa011a1fdae12bbb1a2e72dd1f234f8336"
|
||||
|
||||
[[package]]
|
||||
name = "polycool"
|
||||
@@ -4329,7 +4318,7 @@ dependencies = [
|
||||
"bytes",
|
||||
"getrandom 0.4.3",
|
||||
"lru-slab",
|
||||
"rand",
|
||||
"rand 0.10.3",
|
||||
"rand_pcg",
|
||||
"ring",
|
||||
"rustc-hash 2.1.3",
|
||||
@@ -4377,6 +4366,15 @@ version = "6.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"
|
||||
|
||||
[[package]]
|
||||
name = "rand"
|
||||
version = "0.8.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e058c7de0b26af77780c769414d6257830bb240f3c38477dbc2c16e5f54d6d4c"
|
||||
dependencies = [
|
||||
"rand_core 0.6.4",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand"
|
||||
version = "0.10.3"
|
||||
@@ -4417,11 +4415,11 @@ checksum = "ca45419789ae5a7899559e9512e58ca889e41f04f1f2445e9f4b290ceccd1d08"
|
||||
|
||||
[[package]]
|
||||
name = "ratex-font"
|
||||
version = "0.1.16"
|
||||
version = "0.1.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1c3599bafdf0e0637d1bb9cf97c01528eaa46fab0c6810c3959c2da5f66b2242"
|
||||
checksum = "6a7b73531dabe934a3e725ed5c90d18dacf43778b7a208381390943a9a8c24db"
|
||||
dependencies = [
|
||||
"phf 0.13.1",
|
||||
"phf 0.11.3",
|
||||
"ratex-types",
|
||||
]
|
||||
|
||||
@@ -4468,9 +4466,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ratex-types"
|
||||
version = "0.1.16"
|
||||
version = "0.1.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "74b856c4a2c1d4b9669a10f03b207f97e16a53119bf607501732b97b5c87007f"
|
||||
checksum = "0cf0be3d050525f0f7d37af55a443d7648c222ccc617639950e3de1f8e6f9900"
|
||||
dependencies = [
|
||||
"serde",
|
||||
]
|
||||
@@ -4524,33 +4522,6 @@ dependencies = [
|
||||
"once_cell",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "read-fonts"
|
||||
version = "0.45.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4edc8db0d972de88e53a085b1f01fb3fbdae7bb0cb7a0ce2b2f8285a412fe3ef"
|
||||
dependencies = [
|
||||
"bytemuck",
|
||||
"foldhash 0.2.0",
|
||||
"font-types",
|
||||
"once_cell",
|
||||
"yoke",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "read-fonts"
|
||||
version = "0.47.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a39d2f8f681030a7bcbbcf3e8568775ac2393afd51401a2e2133ee89e3953897"
|
||||
dependencies = [
|
||||
"bytemuck",
|
||||
"foldhash 0.2.0",
|
||||
"font-types",
|
||||
"once_cell",
|
||||
"smallvec",
|
||||
"yoke",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "redox_syscall"
|
||||
version = "0.4.1"
|
||||
@@ -4664,9 +4635,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rfd"
|
||||
version = "0.18.0"
|
||||
version = "0.17.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c4b9d4857b10297ffb0f64cae711e983a7aeaee561848d56d429d3858bd8ed93"
|
||||
checksum = "20dafead71c16a34e1ff357ddefc8afc11e7d51d6d2b9fbd07eaa48e3e540220"
|
||||
dependencies = [
|
||||
"block2 0.6.2",
|
||||
"dispatch2",
|
||||
@@ -4677,9 +4648,8 @@ dependencies = [
|
||||
"objc2-app-kit 0.3.2",
|
||||
"objc2-core-foundation",
|
||||
"objc2-foundation 0.3.2",
|
||||
"objc2-uniform-type-identifiers 0.3.2",
|
||||
"percent-encoding",
|
||||
"pollster",
|
||||
"pollster 0.4.0",
|
||||
"raw-window-handle",
|
||||
"wasm-bindgen",
|
||||
"wasm-bindgen-futures",
|
||||
@@ -5208,7 +5178,7 @@ dependencies = [
|
||||
"const-oid 0.9.6",
|
||||
"der",
|
||||
"hex",
|
||||
"rand",
|
||||
"rand 0.10.3",
|
||||
"reqwest",
|
||||
"rustls-pki-types",
|
||||
"rustls-webpki",
|
||||
@@ -5300,17 +5270,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "819ab7d62b1d3e72d9d9dea5650bac30424f9111364bb94928dbf5ecad1baa68"
|
||||
dependencies = [
|
||||
"bytemuck",
|
||||
"read-fonts 0.41.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "skrifa"
|
||||
version = "0.48.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a5213b4825bac3587046330052d61bfac7bd3bd0d203c758d7c2ef726fcea034"
|
||||
dependencies = [
|
||||
"bytemuck",
|
||||
"read-fonts 0.45.1",
|
||||
"read-fonts",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -7280,6 +7240,20 @@ dependencies = [
|
||||
"syn 3.0.6",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zip"
|
||||
version = "3.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "12598812502ed0105f607f941c386f43d441e00148fce9dec3ca5ffb0bde9308"
|
||||
dependencies = [
|
||||
"arbitrary",
|
||||
"crc32fast",
|
||||
"flate2",
|
||||
"indexmap",
|
||||
"memchr",
|
||||
"zopfli",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zip"
|
||||
version = "9.1.0"
|
||||
@@ -7291,10 +7265,9 @@ dependencies = [
|
||||
"getrandom 0.4.3",
|
||||
"indexmap",
|
||||
"memchr",
|
||||
"nix 0.31.4",
|
||||
"nix",
|
||||
"typed-path",
|
||||
"windows-sys 0.61.2",
|
||||
"zopfli",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
||||
+6
-6
@@ -64,8 +64,8 @@ chrono = { version = "0.4.45", default-features = false, features = ["std", "clo
|
||||
web-time = "1.1.0"
|
||||
rayon = "1"
|
||||
regex = { version = "1", default-features = false, features = ["std", "unicode", "perf"] }
|
||||
quick-xml = "0.42"
|
||||
zip = { version = "9", default-features = false, features = ["deflate"] }
|
||||
quick-xml = "0.41"
|
||||
zip = { version = "3", default-features = false, features = ["deflate"] }
|
||||
sha2 = { version = "0.11", default-features = false }
|
||||
image = { version = "0.25", default-features = false, features = ["png", "jpeg"] }
|
||||
|
||||
@@ -73,21 +73,21 @@ image = { version = "0.25", default-features = false, features = ["png", "jpeg"]
|
||||
# young (0.1.x), and the gate recorded in docs/decisions.md vetted this release.
|
||||
ratex-parser = "=0.1.14"
|
||||
ratex-layout = "=0.1.14"
|
||||
ratex-types = "=0.1.16"
|
||||
ratex-font = "=0.1.16"
|
||||
ratex-types = "=0.1.14"
|
||||
ratex-font = "=0.1.14"
|
||||
|
||||
# ui
|
||||
egui = "0.37"
|
||||
egui_extras = { version = "0.37", default-features = false }
|
||||
eframe = { version = "0.37", default-features = false }
|
||||
egui_kittest = "0.37"
|
||||
rfd = "0.18"
|
||||
rfd = "0.17"
|
||||
arboard = { version = "3.6", default-features = false }
|
||||
# The desktop's preferred language, for the first-run interface language (native only).
|
||||
sys-locale = "0.3"
|
||||
# Font parser egui's epaint uses; the UI validates system font files with it before handing them
|
||||
# to egui, which panics on a file it can't parse. Same version as epaint's, so no second copy.
|
||||
skrifa = { version = "0.48", default-features = false, features = ["std"] }
|
||||
skrifa = { version = "0.44", default-features = false, features = ["std"] }
|
||||
# Real font bytes for tests (Ubuntu Light, compiled into epaint).
|
||||
epaint_default_fonts = "0.37"
|
||||
# One native window per workbook: the window list, Window menu titles and the immediate-viewport
|
||||
|
||||
@@ -12,7 +12,7 @@ workspace = true
|
||||
[dependencies]
|
||||
craft-pdf.workspace = true
|
||||
craft-stream-codecs.workspace = true
|
||||
harfrust = "=0.16.0"
|
||||
harfrust = "=0.12.0"
|
||||
skrifa = { workspace = true }
|
||||
unicode-bidi = "=0.3.18"
|
||||
|
||||
|
||||
@@ -19,4 +19,4 @@ seccompiler = "=0.5.0"
|
||||
libc = "0.2"
|
||||
|
||||
[target.'cfg(any(target_os = "linux", target_os = "macos"))'.dependencies]
|
||||
nix = { version = "=0.32.0", default-features = false, features = ["fs", "signal"] }
|
||||
nix = { version = "=0.31.3", default-features = false, features = ["fs", "signal"] }
|
||||
|
||||
@@ -467,10 +467,35 @@ fn xlsb_external_book_formulas_and_names_decode_and_roundtrip_through_xlsx() {
|
||||
tabs.extend(wide("Other Sheet"));
|
||||
ext_bin.extend(record(359, &tabs));
|
||||
ext_bin.extend(record(577, &wide("ExtName")));
|
||||
// BrtSupNameFmla (585): ExtPtgRef3D (0x3A, sheet 0..0, r=0, c=0)
|
||||
let mut fmla_payload = 9u32.to_le_bytes().to_vec();
|
||||
fmla_payload.push(0x3A);
|
||||
fmla_payload.extend(0u16.to_le_bytes());
|
||||
fmla_payload.extend(0u16.to_le_bytes());
|
||||
fmla_payload.extend(0u16.to_le_bytes());
|
||||
fmla_payload.extend(0u16.to_le_bytes());
|
||||
ext_bin.extend(record(585, &fmla_payload));
|
||||
let mut bits = vec![0u8; 7];
|
||||
bits[2..6].copy_from_slice(&0u32.to_le_bytes());
|
||||
ext_bin.extend(record(586, &bits));
|
||||
ext_bin.extend(record(587, &[]));
|
||||
// Sheet-scoped external name ("LocalExt" on sheet 1 -> sheetId="0")
|
||||
ext_bin.extend(record(577, &wide("LocalExt")));
|
||||
let mut local_bits = vec![0u8; 7];
|
||||
local_bits[2..6].copy_from_slice(&1u32.to_le_bytes());
|
||||
ext_bin.extend(record(586, &local_bits));
|
||||
ext_bin.extend(record(587, &[]));
|
||||
// BrtExternTableStart (363) with refreshError=1, row 0, and all 5 cell types.
|
||||
let mut t_start = 0u32.to_le_bytes().to_vec();
|
||||
t_start.push(1);
|
||||
ext_bin.extend(record(363, &t_start));
|
||||
ext_bin.extend(record(366, &0u32.to_le_bytes()));
|
||||
ext_bin.extend(record(367, &0u32.to_le_bytes()));
|
||||
ext_bin.extend(record(368, &[&1u32.to_le_bytes()[..], &4.5f64.to_le_bytes()[..]].concat()));
|
||||
ext_bin.extend(record(369, &[&2u32.to_le_bytes()[..], &[1u8]].concat()));
|
||||
ext_bin.extend(record(370, &[&3u32.to_le_bytes()[..], &[0x07u8]].concat()));
|
||||
ext_bin.extend(record(371, &[&4u32.to_le_bytes()[..], &wide("hi")[..]].concat()));
|
||||
ext_bin.extend(record(364, &[]));
|
||||
ext_bin.extend(record(588, &[]));
|
||||
|
||||
let fmla_num = |col: u32, cached: f64, rgce: &[u8]| {
|
||||
@@ -521,9 +546,130 @@ fn xlsb_external_book_formulas_and_names_decode_and_roundtrip_through_xlsx() {
|
||||
assert_eq!(c1.value, Value::Number(12.5));
|
||||
assert_eq!(c1.formula.as_ref().map(|f| f.text.as_str()), Some("[1]!ExtName"));
|
||||
|
||||
let (rt, _) = read_xlsx(&write_xlsx(&wb).unwrap()).unwrap();
|
||||
let saved = write_xlsx(&wb).unwrap();
|
||||
let (rt, _) = read_xlsx(&saved).unwrap();
|
||||
assert_eq!(rt.sheets[0].cell(CellRef::new(0, 0)).and_then(|c| c.formula.as_ref()).map(|f| f.text.as_str()), Some("[1]Data!$A$1"));
|
||||
assert_eq!(rt.sheets[0].value(CellRef::new(0, 0)), Value::Number(99.0));
|
||||
assert_eq!(rt.sheets[0].cell(CellRef::new(0, 1)).and_then(|c| c.formula.as_ref()).map(|f| f.text.as_str()), Some("[1]!ExtName"));
|
||||
assert_eq!(rt.sheets[0].value(CellRef::new(0, 1)), Value::Number(12.5));
|
||||
|
||||
// Verify the external workbook target relationship survives XLSB -> XLSX -> read_xlsx -> XLSX.
|
||||
let saved2 = write_xlsx(&rt).unwrap();
|
||||
let mut zip = zip::ZipArchive::new(std::io::Cursor::new(saved2)).unwrap();
|
||||
let read_zip = |z: &mut zip::ZipArchive<std::io::Cursor<Vec<u8>>>, name: &str| {
|
||||
let mut s = String::new();
|
||||
std::io::Read::read_to_string(&mut z.by_name(name).unwrap(), &mut s).unwrap();
|
||||
s
|
||||
};
|
||||
let wb_xml = read_zip(&mut zip, "xl/workbook.xml");
|
||||
assert!(wb_xml.contains("<externalReferences"), "{wb_xml}");
|
||||
let wb_rels = read_zip(&mut zip, "xl/_rels/workbook.xml.rels");
|
||||
let link_target = wb_rels
|
||||
.split("<Relationship ")
|
||||
.find(|r| r.contains("externalLink\""))
|
||||
.and_then(|r| r.split("Target=\"").nth(1))
|
||||
.and_then(|s| s.split('"').next())
|
||||
.expect("workbook.xml.rels should have an externalLink relationship")
|
||||
.trim_start_matches('/')
|
||||
.to_string();
|
||||
let link_part = if link_target.starts_with("xl/") { link_target } else { format!("xl/{link_target}") };
|
||||
let link_xml = read_zip(&mut zip, &link_part);
|
||||
assert!(link_xml.contains("<sheetName val=\"Data\"/>") && link_xml.contains("name=\"ExtName\""), "{link_xml}");
|
||||
let (dir, file) = link_part.rsplit_once('/').unwrap();
|
||||
let link_rels_xml = read_zip(&mut zip, &format!("{dir}/_rels/{file}.rels"));
|
||||
assert!(
|
||||
link_rels_xml.contains("externalLinkPath")
|
||||
&& link_rels_xml.contains("Target=\"Book2.xlsx\"")
|
||||
&& link_rels_xml.contains("TargetMode=\"External\""),
|
||||
"{link_rels_xml}"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn xlsb_external_link_ordinals_preserve_missing_slots_on_xlsx_save() {
|
||||
let mut wb_records = record(131, &[]);
|
||||
let mut props = 0u32.to_le_bytes().to_vec();
|
||||
props.extend(0u32.to_le_bytes());
|
||||
props.extend(wide(""));
|
||||
wb_records.extend(record(153, &props));
|
||||
wb_records.extend(record(143, &[]));
|
||||
let mut s1 = 0u32.to_le_bytes().to_vec();
|
||||
s1.extend(1u32.to_le_bytes());
|
||||
s1.extend(wide("one"));
|
||||
s1.extend(wide("Data"));
|
||||
wb_records.extend(record(156, &s1));
|
||||
wb_records.extend(record(144, &[]));
|
||||
// Book 0 = self, Book 1 = missing ("missing"), Book 2 = valid ("ext2").
|
||||
wb_records.extend(record(357, &[]));
|
||||
wb_records.extend(record(355, &wide("missing")));
|
||||
wb_records.extend(record(355, &wide("ext2")));
|
||||
let mut xti = 2u32.to_le_bytes().to_vec();
|
||||
for (bk, first, last) in [(1u32, 0i32, 0i32), (2, 0, 0)] {
|
||||
xti.extend(bk.to_le_bytes());
|
||||
xti.extend(first.to_le_bytes());
|
||||
xti.extend(last.to_le_bytes());
|
||||
}
|
||||
wb_records.extend(record(362, &xti));
|
||||
wb_records.extend(record(132, &[]));
|
||||
|
||||
let mut ext_bin = Vec::new();
|
||||
let mut begin_sup = 0u16.to_le_bytes().to_vec();
|
||||
begin_sup.extend(wide("rId1"));
|
||||
begin_sup.extend(u32::MAX.to_le_bytes());
|
||||
ext_bin.extend(record(360, &begin_sup));
|
||||
let mut tabs = 1u32.to_le_bytes().to_vec();
|
||||
tabs.extend(wide("SheetA"));
|
||||
ext_bin.extend(record(359, &tabs));
|
||||
ext_bin.extend(record(588, &[]));
|
||||
|
||||
let fmla_num = |col: u32, cached: f64, rgce: &[u8]| {
|
||||
let mut data = col.to_le_bytes().to_vec();
|
||||
data.extend([0; 4]);
|
||||
data.extend(cached.to_le_bytes());
|
||||
data.extend([0; 2]);
|
||||
data.extend((rgce.len() as u32).to_le_bytes());
|
||||
data.extend(rgce);
|
||||
data.extend(0u32.to_le_bytes());
|
||||
record(9, &data)
|
||||
};
|
||||
let ptg_1 = {
|
||||
let mut v = vec![0x3A, 0, 0];
|
||||
v.extend(0u32.to_le_bytes());
|
||||
v.extend(0u16.to_le_bytes());
|
||||
v
|
||||
};
|
||||
let ptg_2 = {
|
||||
let mut v = vec![0x3A, 1, 0];
|
||||
v.extend(0u32.to_le_bytes());
|
||||
v.extend(0u16.to_le_bytes());
|
||||
v
|
||||
};
|
||||
let mut data = row(0);
|
||||
data.extend(fmla_num(0, 11.0, &ptg_1));
|
||||
data.extend(fmla_num(1, 22.0, &ptg_2));
|
||||
|
||||
let rels = r#"<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="one" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="../data/one.bin"/><Relationship Id="strings" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings" Target="../text/strings.bin"/><Relationship Id="ext2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink" Target="../links/externalLink2.bin"/></Relationships>"#;
|
||||
let types = r#"<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Override PartName="/records/book.bin" ContentType="application/vnd.ms-excel.sheet.binary.macroEnabled.main"/><Override PartName="/data/one.bin" ContentType="application/vnd.ms-excel.worksheet"/><Override PartName="/text/strings.bin" ContentType="application/vnd.ms-excel.sharedStrings"/><Override PartName="/links/externalLink2.bin" ContentType="application/vnd.ms-excel.externalLink"/></Types>"#;
|
||||
let link_rels = r#"<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLinkPath" Target="SecondBook.xlsx" TargetMode="External"/></Relationships>"#;
|
||||
let bytes = make_zip(&[
|
||||
("[Content_Types].xml", types.as_bytes()),
|
||||
("_rels/.rels", ROOT.as_bytes()),
|
||||
("records/book.bin", &wb_records),
|
||||
("records/_rels/book.bin.rels", rels.as_bytes()),
|
||||
("data/one.bin", &worksheet(&data, &[])),
|
||||
("text/strings.bin", &sst()),
|
||||
("links/externalLink2.bin", &ext_bin),
|
||||
("links/_rels/externalLink2.bin.rels", link_rels.as_bytes()),
|
||||
]);
|
||||
|
||||
let (wb, report) = read_xlsb(&bytes).unwrap();
|
||||
assert!(report.warnings.iter().any(|w| w.contains("external link")), "{:?}", report.warnings);
|
||||
assert!(wb.sheets[0].cell(CellRef::new(0, 0)).is_some_and(|c| c.formula.is_none() && c.value == Value::Number(11.0)));
|
||||
assert_eq!(wb.sheets[0].cell(CellRef::new(0, 1)).and_then(|c| c.formula.as_ref()).map(|f| f.text.as_str()), Some("[2]SheetA!$A$1"));
|
||||
|
||||
let saved = write_xlsx(&wb).unwrap();
|
||||
let mut zip = zip::ZipArchive::new(std::io::Cursor::new(saved)).unwrap();
|
||||
let mut wb_xml = String::new();
|
||||
std::io::Read::read_to_string(&mut zip.by_name("xl/workbook.xml").unwrap(), &mut wb_xml).unwrap();
|
||||
assert!(wb_xml.contains("<externalReference/><externalReference r:id="), "{wb_xml}");
|
||||
}
|
||||
|
||||
+116
-1
@@ -2,11 +2,15 @@
|
||||
//! Cell values, formulas, defined names, and merged cells are imported; formatting, charts,
|
||||
//! images, macros and other workbook features are not imported.
|
||||
|
||||
use std::collections::BTreeMap;
|
||||
use std::fmt::Write as _;
|
||||
use std::sync::Arc;
|
||||
|
||||
use gridcraft_core::{CellError, CellRef, DateSystem, RangeRef, Value};
|
||||
use gridcraft_model::{Cell, DefinedName, Formula, Sheet, StyleId, Visibility, Workbook};
|
||||
use gridcraft_model::{Cell, DefinedName, Formula, Preserved, PreservedPart, PreservedRel, PreservedXml, Sheet, StyleId, Visibility, Workbook};
|
||||
|
||||
use crate::write::{NS_MAIN, NS_REL, XML_DECL};
|
||||
use crate::xml::{esc, esc_attr};
|
||||
use crate::{IoError, ReadReport};
|
||||
|
||||
fn map_error(err: craft_xlsx::Error) -> IoError {
|
||||
@@ -189,6 +193,10 @@ pub fn read_xlsb(bytes: &[u8]) -> Result<(Workbook, ReadReport), IoError> {
|
||||
wb.sheets.push(Arc::new(sheet));
|
||||
}
|
||||
import_defined_names(&book, &file_to_model, &mut wb);
|
||||
let external_links = package.external_links(&book).map_err(map_error)?;
|
||||
if let Some(preserved) = preserve_external_links(&external_links) {
|
||||
wb.preserved = Some(Arc::new(preserved));
|
||||
}
|
||||
for warning in package.warnings() {
|
||||
report.warn(warning);
|
||||
}
|
||||
@@ -202,3 +210,110 @@ pub fn read_xlsb(bytes: &[u8]) -> Result<(Workbook, ReadReport), IoError> {
|
||||
pub(crate) fn is_xlsb(bytes: &[u8]) -> bool {
|
||||
craft_xlsx::is_xlsb(bytes)
|
||||
}
|
||||
|
||||
fn preserve_external_links(links: &[(String, Option<craft_xlsx::ExternalLink>)]) -> Option<Preserved> {
|
||||
if links.is_empty() {
|
||||
return None;
|
||||
}
|
||||
const CT_EXT_LINK: &str = "application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml";
|
||||
let mut p = Preserved::default();
|
||||
let mut refs_xml = format!("<externalReferences xmlns:r=\"{NS_REL}\">");
|
||||
let mut has_any = false;
|
||||
for (i, (_, link)) in links.iter().enumerate() {
|
||||
let Some(link) = link else {
|
||||
// Preserve the 1-based `[n]` ordinal for later links when an earlier slot is missing.
|
||||
refs_xml.push_str("<externalReference/>");
|
||||
continue;
|
||||
};
|
||||
has_any = true;
|
||||
let rid = format!("rId{}", i + 1);
|
||||
let part_name = format!("xl/externalLinks/externalLink{}.xml", i + 1);
|
||||
let (xml, rels) = external_link_part_xml(link);
|
||||
p.rels.push(PreservedRel { id: rid.clone(), rel_type: format!("{NS_REL}/externalLink"), target: part_name.clone(), external: false });
|
||||
p.parts.push(PreservedPart { name: part_name, content_type: CT_EXT_LINK.into(), data: xml.into_bytes().into(), rels });
|
||||
let _ = write!(refs_xml, "<externalReference r:id=\"{rid}\"/>");
|
||||
}
|
||||
if !has_any {
|
||||
return None;
|
||||
}
|
||||
refs_xml.push_str("</externalReferences>");
|
||||
p.elements.push(PreservedXml { slot: "externalReferences".into(), xml: refs_xml });
|
||||
Some(p)
|
||||
}
|
||||
|
||||
fn external_link_part_xml(link: &craft_xlsx::ExternalLink) -> (String, Vec<PreservedRel>) {
|
||||
let mut xml = format!("{XML_DECL}<externalLink xmlns=\"{NS_MAIN}\" xmlns:r=\"{NS_REL}\">");
|
||||
let mut rels = Vec::new();
|
||||
if let craft_xlsx::ExternalLink::Book(book) = link {
|
||||
xml.push_str("<externalBook");
|
||||
if let Some(target) = &book.target {
|
||||
xml.push_str(" r:id=\"rId1\"");
|
||||
rels.push(PreservedRel { id: "rId1".into(), rel_type: format!("{NS_REL}/externalLinkPath"), target: target.clone(), external: true });
|
||||
}
|
||||
xml.push('>');
|
||||
if !book.sheet_names.is_empty() {
|
||||
xml.push_str("<sheetNames>");
|
||||
for name in &book.sheet_names {
|
||||
let _ = write!(xml, "<sheetName val=\"{}\"/>", esc_attr(name));
|
||||
}
|
||||
xml.push_str("</sheetNames>");
|
||||
}
|
||||
if !book.defined_names.is_empty() {
|
||||
xml.push_str("<definedNames>");
|
||||
for dn in &book.defined_names {
|
||||
let _ = write!(xml, "<definedName name=\"{}\"", esc_attr(&dn.name));
|
||||
if let Some(refers_to) = &dn.refers_to {
|
||||
let _ = write!(xml, " refersTo=\"{}\"", esc_attr(refers_to));
|
||||
}
|
||||
if let Some(sheet_id) = dn.sheet_id {
|
||||
let _ = write!(xml, " sheetId=\"{sheet_id}\"");
|
||||
}
|
||||
xml.push_str("/>");
|
||||
}
|
||||
xml.push_str("</definedNames>");
|
||||
}
|
||||
if !book.sheet_data.is_empty() {
|
||||
xml.push_str("<sheetDataSet>");
|
||||
for sd in &book.sheet_data {
|
||||
let _ = write!(xml, "<sheetData sheetId=\"{}\"", sd.sheet_id);
|
||||
if sd.refresh_error {
|
||||
xml.push_str(" refreshError=\"1\"");
|
||||
}
|
||||
xml.push('>');
|
||||
let mut rows: BTreeMap<u32, Vec<(craft_xlsx::CellRef, &craft_xlsx::Value)>> = BTreeMap::new();
|
||||
for (pos, val) in &sd.cells {
|
||||
rows.entry(pos.row).or_default().push((*pos, val));
|
||||
}
|
||||
for (r, cells) in rows {
|
||||
let _ = write!(xml, "<row r=\"{}\">", r + 1);
|
||||
for (pos, val) in cells {
|
||||
let r_attr = CellRef::new(pos.row, pos.col);
|
||||
match val {
|
||||
craft_xlsx::Value::Empty => {
|
||||
let _ = write!(xml, "<cell r=\"{r_attr}\"/>");
|
||||
}
|
||||
craft_xlsx::Value::Number(n) => {
|
||||
let _ = write!(xml, "<cell r=\"{r_attr}\"><v>{n}</v></cell>");
|
||||
}
|
||||
craft_xlsx::Value::Text(t) => {
|
||||
let _ = write!(xml, "<cell r=\"{r_attr}\" t=\"str\"><v>{}</v></cell>", esc(t));
|
||||
}
|
||||
craft_xlsx::Value::Bool(b) => {
|
||||
let _ = write!(xml, "<cell r=\"{r_attr}\" t=\"b\"><v>{}</v></cell>", if *b { "1" } else { "0" });
|
||||
}
|
||||
craft_xlsx::Value::Error(e) => {
|
||||
let _ = write!(xml, "<cell r=\"{r_attr}\" t=\"e\"><v>{}</v></cell>", esc(map_cell_error(*e).as_str()));
|
||||
}
|
||||
}
|
||||
}
|
||||
xml.push_str("</row>");
|
||||
}
|
||||
xml.push_str("</sheetData>");
|
||||
}
|
||||
xml.push_str("</sheetDataSet>");
|
||||
}
|
||||
xml.push_str("</externalBook>");
|
||||
}
|
||||
xml.push_str("</externalLink>");
|
||||
(xml, rels)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user