summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPolesznyák Márk László <116908301+pml68@users.noreply.github.com>2025-03-23 02:49:57 +0100
committerGitHub <noreply@github.com>2025-03-23 02:49:57 +0100
commit3076889c00116b22f022792471253e7188c6e93e (patch)
treebff0cda7a9152e9f94d3176bbf5acaf879394f5f
parentfeat: update to Rust 2024 (diff)
parentfeat: finish `ApplyOptions` impls (diff)
downloadiced-builder-3076889c00116b22f022792471253e7188c6e93e.tar.gz
Merge pull request #7 from pml68/feat/options-backend
Options backend done (for now)
-rw-r--r--.cargo/config.toml7
-rw-r--r--.github/workflows/ci.yml (renamed from .github/workflows/lint.yml)6
-rw-r--r--.nvchecker.toml4
-rw-r--r--Cargo.lock1102
-rw-r--r--Cargo.toml9
-rw-r--r--PKGBUILD49
-rw-r--r--TODO.md2
-rw-r--r--build.rs50
-rw-r--r--src/config.rs3
-rw-r--r--src/dialogs.rs19
-rw-r--r--src/environment.rs13
-rw-r--r--src/error.rs6
-rw-r--r--src/main.rs147
-rw-r--r--src/options.rs334
-rw-r--r--src/panes/code_view.rs3
-rw-r--r--src/types.rs14
-rw-r--r--src/types/project.rs7
-rwxr-xr-xsrc/types/rendered_element.rs105
-rw-r--r--src/values.rs17
-rw-r--r--src/values/alignment.rs65
-rw-r--r--src/values/content_fit.rs69
-rw-r--r--src/values/length.rs145
-rw-r--r--src/values/line_height.rs117
-rw-r--r--src/values/padding.rs201
-rw-r--r--src/values/pixels.rs18
-rwxr-xr-xsrc/values/rotation.rs114
26 files changed, 2085 insertions, 541 deletions
diff --git a/.cargo/config.toml b/.cargo/config.toml
index feb6aad..e0aa01f 100644
--- a/.cargo/config.toml
+++ b/.cargo/config.toml
@@ -1,3 +1,10 @@
[alias]
lint = "clippy --no-deps -- -D warnings"
lint-all = "clippy --no-deps -- -D clippy::pedantic"
+
+# [target.x86_64-unknown-linux-gnu]
+# linker = "clang"
+# rustflags = ["-C", "link-arg=-fuse-ld=/usr/bin/mold"]
+
+# [build]
+# rustflags = ["-Z", "threads=6"]
diff --git a/.github/workflows/lint.yml b/.github/workflows/ci.yml
index 4647a07..eba27cf 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/ci.yml
@@ -1,7 +1,7 @@
-name: Lint
+name: CI
on: [push, pull_request]
jobs:
- lint:
+ ci:
runs-on: ubuntu-latest
steps:
- uses: hecrj/setup-rust-action@v2
@@ -15,3 +15,5 @@ jobs:
sudo apt-get install -y libxkbcommon-dev libgtk-3-dev
- name: Check lints
run: cargo lint
+ - name: Run tests
+ run: cargo test --verbose
diff --git a/.nvchecker.toml b/.nvchecker.toml
new file mode 100644
index 0000000..5a07fb4
--- /dev/null
+++ b/.nvchecker.toml
@@ -0,0 +1,4 @@
+[iced-builder]
+source = "git"
+git = "https://github.com/pml68/iced-builder"
+include_regex = "\\d+\\.\\d+\\.\\d+"
diff --git a/Cargo.lock b/Cargo.lock
index 01a6443..9b36cfb 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -54,7 +54,7 @@ dependencies = [
"getrandom 0.2.15",
"once_cell",
"version_check",
- "zerocopy",
+ "zerocopy 0.7.35",
]
[[package]]
@@ -70,7 +70,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ef6978589202a00cd7e118380c448a08b6ed394c3a8df3a430d0898e3a42d046"
dependencies = [
"android-properties",
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"cc",
"cesu8",
"jni",
@@ -101,9 +101,9 @@ dependencies = [
[[package]]
name = "anyhow"
-version = "1.0.96"
+version = "1.0.97"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6b964d184e89d9b6b67dd2715bc8e74cf3107fb2b529990c90cf517326150bf4"
+checksum = "dcfed56ad506cb2c684a14971b8861fdc3baaaae314b9e5f9bb532cbe3ba7a4f"
[[package]]
name = "approx"
@@ -163,24 +163,37 @@ dependencies = [
[[package]]
name = "ashpd"
-version = "0.10.2"
+version = "0.10.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e9c39d707614dbcc6bed00015539f488d8e3fe3e66ed60961efc0c90f4b380b3"
+checksum = "de3d60bee1a1d38c2077030f4788e1b4e31058d2e79a8cfc8f2b440bd44db290"
dependencies = [
"async-fs",
"async-net",
"enumflags2",
"futures-channel",
"futures-util",
- "rand",
+ "rand 0.8.5",
+ "serde",
+ "serde_repr",
+ "url",
+ "zbus",
+]
+
+[[package]]
+name = "ashpd"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6cbdf310d77fd3aaee6ea2093db7011dc2d35d2eb3481e5607f1f8d942ed99df"
+dependencies = [
+ "enumflags2",
+ "futures-channel",
+ "futures-util",
+ "rand 0.9.0",
"raw-window-handle",
"serde",
"serde_repr",
"tokio",
"url",
- "wayland-backend",
- "wayland-client",
- "wayland-protocols",
"zbus",
]
@@ -271,7 +284,7 @@ dependencies = [
"futures-lite",
"parking",
"polling",
- "rustix",
+ "rustix 0.38.44",
"slab",
"tracing",
"windows-sys 0.59.0",
@@ -314,7 +327,7 @@ dependencies = [
"cfg-if",
"event-listener 5.4.0",
"futures-lite",
- "rustix",
+ "rustix 0.38.44",
"tracing",
]
@@ -341,7 +354,7 @@ dependencies = [
"cfg-if",
"futures-core",
"futures-io",
- "rustix",
+ "rustix 0.38.44",
"signal-hook-registry",
"slab",
"windows-sys 0.59.0",
@@ -349,9 +362,9 @@ dependencies = [
[[package]]
name = "async-std"
-version = "1.13.0"
+version = "1.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c634475f29802fde2b8f0b505b1bd00dfe4df7d4a000f0b36f7671197d5c3615"
+checksum = "730294c1c08c2e0f85759590518f6333f0d5a0a766a27d519c1b244c3dfd8a24"
dependencies = [
"async-channel 1.9.0",
"async-global-executor",
@@ -381,9 +394,9 @@ checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de"
[[package]]
name = "async-trait"
-version = "0.1.86"
+version = "0.1.88"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "644dd749086bf3771a2fbc5f256fdb982d53f011c7d5d560304eafeecebce79d"
+checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5"
dependencies = [
"proc-macro2",
"quote",
@@ -430,9 +443,9 @@ dependencies = [
[[package]]
name = "avif-serialize"
-version = "0.8.2"
+version = "0.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e335041290c43101ca215eed6f43ec437eb5a42125573f600fc3fa42b9bddd62"
+checksum = "98922d6a4cfbcb08820c69d8eeccc05bb1f29bfa06b4f5b1dbfe9a868bd7608e"
dependencies = [
"arrayvec",
]
@@ -496,9 +509,12 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "bitflags"
-version = "2.8.0"
+version = "2.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36"
+checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd"
+dependencies = [
+ "serde",
+]
[[package]]
name = "bitstream-io"
@@ -527,7 +543,16 @@ version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f"
dependencies = [
- "objc2",
+ "objc2 0.5.2",
+]
+
+[[package]]
+name = "block2"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1d59b4c170e16f0405a2e95aff44432a0d41aa97675f3d52623effe95792a037"
+dependencies = [
+ "objc2 0.6.0",
]
[[package]]
@@ -563,18 +588,18 @@ checksum = "64fa3c856b712db6612c019f14756e64e4bcea13337a6b33b696333a9eaa2d06"
[[package]]
name = "bytemuck"
-version = "1.21.0"
+version = "1.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ef657dfab802224e671f5818e9a4935f9b1957ed18e58292690cc39e7a4092a3"
+checksum = "b6b1fc10dbac614ebc03540c9dbd60e83887fda27794998c6528f1782047d540"
dependencies = [
"bytemuck_derive",
]
[[package]]
name = "bytemuck_derive"
-version = "1.8.1"
+version = "1.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3fa76293b4f7bb636ab88fd78228235b5248b4d05cc589aed610f954af5d7c7a"
+checksum = "2ff22c2722516255d1823ce3cc4bc0b154dbc9364be5c905d6baa6eccbbc8774"
dependencies = [
"proc-macro2",
"quote",
@@ -595,28 +620,26 @@ checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495"
[[package]]
name = "bytes"
-version = "1.10.0"
+version = "1.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f61dac84819c6588b558454b194026eb1f09c293b9036ae9b159e74e73ab6cf9"
+checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a"
[[package]]
name = "bzip2"
-version = "0.4.4"
+version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8"
+checksum = "49ecfb22d906f800d4fe833b6282cf4dc1c298f5057ca0b5445e5c209735ca47"
dependencies = [
"bzip2-sys",
- "libc",
]
[[package]]
name = "bzip2-sys"
-version = "0.1.12+1.0.8"
+version = "0.1.13+1.0.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "72ebc2f1a417f01e1da30ef264ee86ae31d2dcd2d603ea283d3c244a883ca2a9"
+checksum = "225bff33b2141874fe80d71e07d6eec4f85c5c216453dd96388240f96e1acc14"
dependencies = [
"cc",
- "libc",
"pkg-config",
]
@@ -636,10 +659,10 @@ version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b99da2f8558ca23c71f4fd15dc57c906239752dd27ff3c00a1d56b685b7cbfec"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"log",
"polling",
- "rustix",
+ "rustix 0.38.44",
"slab",
"thiserror 1.0.69",
]
@@ -651,16 +674,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95a66a987056935f7efce4ab5668920b5d0dac4a7c99991a67395f13702ddd20"
dependencies = [
"calloop",
- "rustix",
+ "rustix 0.38.44",
"wayland-backend",
"wayland-client",
]
[[package]]
name = "cc"
-version = "1.2.15"
+version = "1.2.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c736e259eea577f443d5c86c304f9f4ae0295c43f3ba05c21f1d66b5f06001af"
+checksum = "1fcb57c740ae1daf453ae85f16e37396f672b039e00d9d866e07ddb24e328e3a"
dependencies = [
"jobserver",
"libc",
@@ -691,12 +714,6 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "cfg_aliases"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e"
-
-[[package]]
-name = "cfg_aliases"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724"
@@ -726,9 +743,9 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b7f4aaa047ba3c3630b080bb9860894732ff23e2aee290a418909aa6d5df38f"
dependencies = [
- "objc2",
- "objc2-app-kit",
- "objc2-foundation",
+ "objc2 0.5.2",
+ "objc2-app-kit 0.2.2",
+ "objc2-foundation 0.2.2",
]
[[package]]
@@ -836,7 +853,7 @@ version = "0.24.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fa95a34622365fa5bbf40b20b75dba8dfa8c94c734aea8ac9a5ca38af14316f1"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"core-foundation 0.10.0",
"core-graphics-types 0.2.0",
"foreign-types 0.5.0",
@@ -860,25 +877,25 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"core-foundation 0.10.0",
"libc",
]
[[package]]
name = "cosmic-text"
-version = "0.12.1"
+version = "0.13.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "59fd57d82eb4bfe7ffa9b1cec0c05e2fd378155b47f255a67983cb4afe0e80c2"
+checksum = "e418dd4f5128c3e93eab12246391c54a20c496811131f85754dc8152ee207892"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"fontdb 0.16.2",
"log",
"rangemap",
- "rayon",
"rustc-hash 1.1.0",
"rustybuzz",
"self_cell",
+ "smol_str",
"swash",
"sys-locale",
"ttf-parser 0.21.1",
@@ -953,6 +970,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "43da5946c66ffcc7745f48db692ffbb10a83bfe0afd96235c5c2a4fb23994929"
[[package]]
+name = "cryoglyph"
+version = "0.1.0"
+source = "git+https://github.com/iced-rs/cryoglyph.git?rev=be2defe4a13fd7c97c6f4c81e8e085463eb578dc#be2defe4a13fd7c97c6f4c81e8e085463eb578dc"
+dependencies = [
+ "cosmic-text",
+ "etagere",
+ "lru",
+ "rustc-hash 2.1.1",
+ "wgpu",
+]
+
+[[package]]
name = "crypto-common"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -980,10 +1009,10 @@ version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "18e1a09f280e29a8b00bc7e81eca5ac87dca0575639c9422a5fa25a07bb884b8"
dependencies = [
- "ashpd",
+ "ashpd 0.10.3",
"async-std",
- "objc2",
- "objc2-foundation",
+ "objc2 0.5.2",
+ "objc2-foundation 0.2.2",
"web-sys",
"winreg",
]
@@ -1002,9 +1031,9 @@ checksum = "da692b8d1080ea3045efaab14434d40468c3d8657e42abddfffca87b428f4c1b"
[[package]]
name = "deranged"
-version = "0.3.11"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4"
+checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e"
dependencies = [
"powerfmt",
]
@@ -1059,6 +1088,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b"
[[package]]
+name = "dispatch2"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1a0d569e003ff27784e0e14e4a594048698e0c0f0b66cabcb51511be55a7caa0"
+dependencies = [
+ "bitflags 2.9.0",
+ "block2 0.6.0",
+ "libc",
+ "objc2 0.6.0",
+]
+
+[[package]]
name = "displaydoc"
version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1104,11 +1145,11 @@ version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "98888c4bbd601524c11a7ed63f814b8825f420514f78e96f752c437ae9cbb5d1"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"bytemuck",
"drm-ffi",
"drm-fourcc",
- "rustix",
+ "rustix 0.38.44",
]
[[package]]
@@ -1118,7 +1159,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "97c98727e48b7ccb4f4aea8cfe881e5b07f702d17b7875991881b41af7278d53"
dependencies = [
"drm-sys",
- "rustix",
+ "rustix 0.38.44",
]
[[package]]
@@ -1139,9 +1180,9 @@ dependencies = [
[[package]]
name = "either"
-version = "1.13.0"
+version = "1.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0"
+checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719"
[[package]]
name = "embed-resource"
@@ -1159,9 +1200,9 @@ dependencies = [
[[package]]
name = "embed-resource"
-version = "3.0.1"
+version = "3.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4762ce03154ba57ebaeee60cc631901ceae4f18219cbb874e464347471594742"
+checksum = "7fbc6e0d8e0c03a655b53ca813f0463d2c956bc4db8138dbc89f120b066551e3"
dependencies = [
"cc",
"memchr",
@@ -1313,9 +1354,9 @@ dependencies = [
[[package]]
name = "flate2"
-version = "1.0.35"
+version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c"
+checksum = "11faaf5a5236997af9848be0bef4db95824b1d534ebc64d0f0c6cf3e67bd38dc"
dependencies = [
"crc32fast",
"miniz_oxide",
@@ -1335,15 +1376,15 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
[[package]]
name = "foldhash"
-version = "0.1.4"
+version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a0d2fde1f7b3d48b8395d5f2de76c18a528bd6a9cdde438df747bfcba3e05d6f"
+checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2"
[[package]]
name = "font-types"
-version = "0.7.3"
+version = "0.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b3971f9a5ca983419cdc386941ba3b9e1feba01a0ab888adf78739feb2798492"
+checksum = "d868ec188a98bb014c606072edd47e52e7ab7297db943b0b28503121e1d037bd"
dependencies = [
"bytemuck",
]
@@ -1611,14 +1652,16 @@ dependencies = [
[[package]]
name = "getrandom"
-version = "0.3.1"
+version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8"
+checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0"
dependencies = [
"cfg-if",
+ "js-sys",
"libc",
- "wasi 0.13.3+wasi-0.2.2",
- "windows-targets 0.52.6",
+ "r-efi",
+ "wasi 0.14.2+wasi-0.2.4",
+ "wasm-bindgen",
]
[[package]]
@@ -1691,9 +1734,9 @@ dependencies = [
[[package]]
name = "glow"
-version = "0.14.2"
+version = "0.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d51fa363f025f5c111e03f13eda21162faeacb6911fe8caa0c0349f9cf0c4483"
+checksum = "c5e5ea60d70410161c8bf5da3fdfeaa1c72ed2c15f8bbb9d19fe3a4fad085f08"
dependencies = [
"js-sys",
"slotmap",
@@ -1711,18 +1754,6 @@ dependencies = [
]
[[package]]
-name = "glyphon"
-version = "0.5.0"
-source = "git+https://github.com/hecrj/glyphon.git?rev=09712a70df7431e9a3b1ac1bbd4fb634096cb3b4#09712a70df7431e9a3b1ac1bbd4fb634096cb3b4"
-dependencies = [
- "cosmic-text",
- "etagere",
- "lru",
- "rustc-hash 2.1.1",
- "wgpu",
-]
-
-[[package]]
name = "gobject-sys"
version = "0.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1739,7 +1770,7 @@ version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fbcd2dba93594b227a1f57ee09b8b9da8892c34d55aa332e034a228d0fe6a171"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"gpu-alloc-types",
]
@@ -1749,7 +1780,7 @@ version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "98ff03b468aa837d70984d55f5d3f846f6ec31fe34bbb97c4f85219caeee1ca4"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
]
[[package]]
@@ -1770,7 +1801,7 @@ version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dcf29e94d6d243368b7a56caa16bc213e4f9f8ed38c4d9557069527b5d5281ca"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"gpu-descriptor-types",
"hashbrown",
]
@@ -1781,7 +1812,7 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fdf242682df893b86f33a73828fb09ca4b2d3bb6cc95249707fc684d27484b91"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
]
[[package]]
@@ -1833,9 +1864,9 @@ dependencies = [
[[package]]
name = "half"
-version = "2.4.1"
+version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888"
+checksum = "7db2ff139bba50379da6aa0766b52fdcb62cb5b263009b09ed58ba604e14bbd1"
dependencies = [
"cfg-if",
"crunchy",
@@ -1891,9 +1922,9 @@ dependencies = [
[[package]]
name = "http"
-version = "1.2.0"
+version = "1.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f16ca2af56261c99fba8bac40a10251ce8188205a4c448fbb745a2e4daa76fea"
+checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565"
dependencies = [
"bytes",
"fnv",
@@ -1912,12 +1943,12 @@ dependencies = [
[[package]]
name = "http-body-util"
-version = "0.1.2"
+version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f"
+checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a"
dependencies = [
"bytes",
- "futures-util",
+ "futures-core",
"http",
"http-body",
"pin-project-lite",
@@ -1925,9 +1956,9 @@ dependencies = [
[[package]]
name = "httparse"
-version = "1.10.0"
+version = "1.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f2d708df4e7140240a16cd6ab0ab65c972d7433ab77819ea693fde9c43811e2a"
+checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87"
[[package]]
name = "hyper"
@@ -2004,7 +2035,7 @@ dependencies = [
[[package]]
name = "iced"
version = "0.14.0-dev"
-source = "git+https://github.com/iced-rs/iced?rev=97f1db3783dca5a4f60a9f89668613de4dfe9edd#97f1db3783dca5a4f60a9f89668613de4dfe9edd"
+source = "git+https://github.com/pml68/iced?branch=feat%2Frehighlight-on-redraw#1a84a8019cbd95ae1b1c88f75aeb0a15f0f3caf2"
dependencies = [
"iced_core",
"iced_futures",
@@ -2017,8 +2048,8 @@ dependencies = [
[[package]]
name = "iced_anim"
-version = "0.2.0"
-source = "git+https://github.com/pml68/iced_anim#62ea3717ee372b68458cf2fe77bba3ead97f8931"
+version = "0.2.1"
+source = "git+https://github.com/pml68/iced_anim#0c833c0943493c8fc22a60e138785e4c688ef8d8"
dependencies = [
"iced",
"iced_anim_derive",
@@ -2027,7 +2058,7 @@ dependencies = [
[[package]]
name = "iced_anim_derive"
version = "0.2.0"
-source = "git+https://github.com/pml68/iced_anim#62ea3717ee372b68458cf2fe77bba3ead97f8931"
+source = "git+https://github.com/pml68/iced_anim#0c833c0943493c8fc22a60e138785e4c688ef8d8"
dependencies = [
"quote",
"syn",
@@ -2038,7 +2069,7 @@ name = "iced_builder"
version = "0.1.0"
dependencies = [
"dirs-next",
- "embed-resource 3.0.1",
+ "embed-resource 3.0.2",
"fxhash",
"iced",
"iced_anim",
@@ -2049,7 +2080,7 @@ dependencies = [
"rust-format",
"serde",
"serde_json",
- "thiserror 2.0.11",
+ "thiserror 2.0.12",
"tokio",
"tokio-stream",
"toml",
@@ -2060,9 +2091,9 @@ dependencies = [
[[package]]
name = "iced_core"
version = "0.14.0-dev"
-source = "git+https://github.com/iced-rs/iced?rev=97f1db3783dca5a4f60a9f89668613de4dfe9edd#97f1db3783dca5a4f60a9f89668613de4dfe9edd"
+source = "git+https://github.com/pml68/iced?branch=feat%2Frehighlight-on-redraw#1a84a8019cbd95ae1b1c88f75aeb0a15f0f3caf2"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"bytes",
"dark-light",
"glam",
@@ -2079,10 +2110,11 @@ dependencies = [
[[package]]
name = "iced_custom_highlighter"
version = "0.1.0"
-source = "git+https://github.com/pml68/iced_custom_highlighter?branch=fix%2Ftemp-update-on-theme-changed#e9b8a7705b10f516963f55b994b771cb52e8c91f"
+source = "git+https://github.com/pml68/iced_custom_highlighter?branch=master#a112785b008d98d86be84d8a39bc37bc2a7647be"
dependencies = [
"iced_core",
"syntect",
+ "two-face",
]
[[package]]
@@ -2109,7 +2141,7 @@ dependencies = [
[[package]]
name = "iced_futures"
version = "0.14.0-dev"
-source = "git+https://github.com/iced-rs/iced?rev=97f1db3783dca5a4f60a9f89668613de4dfe9edd#97f1db3783dca5a4f60a9f89668613de4dfe9edd"
+source = "git+https://github.com/pml68/iced?branch=feat%2Frehighlight-on-redraw#1a84a8019cbd95ae1b1c88f75aeb0a15f0f3caf2"
dependencies = [
"futures",
"iced_core",
@@ -2117,15 +2149,15 @@ dependencies = [
"rustc-hash 2.1.1",
"tokio",
"wasm-bindgen-futures",
- "wasm-timer",
+ "wasmtimer",
]
[[package]]
name = "iced_graphics"
version = "0.14.0-dev"
-source = "git+https://github.com/iced-rs/iced?rev=97f1db3783dca5a4f60a9f89668613de4dfe9edd#97f1db3783dca5a4f60a9f89668613de4dfe9edd"
+source = "git+https://github.com/pml68/iced?branch=feat%2Frehighlight-on-redraw#1a84a8019cbd95ae1b1c88f75aeb0a15f0f3caf2"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"bytemuck",
"cosmic-text",
"half",
@@ -2143,7 +2175,7 @@ dependencies = [
[[package]]
name = "iced_renderer"
version = "0.14.0-dev"
-source = "git+https://github.com/iced-rs/iced?rev=97f1db3783dca5a4f60a9f89668613de4dfe9edd#97f1db3783dca5a4f60a9f89668613de4dfe9edd"
+source = "git+https://github.com/pml68/iced?branch=feat%2Frehighlight-on-redraw#1a84a8019cbd95ae1b1c88f75aeb0a15f0f3caf2"
dependencies = [
"iced_graphics",
"iced_tiny_skia",
@@ -2155,7 +2187,7 @@ dependencies = [
[[package]]
name = "iced_runtime"
version = "0.14.0-dev"
-source = "git+https://github.com/iced-rs/iced?rev=97f1db3783dca5a4f60a9f89668613de4dfe9edd#97f1db3783dca5a4f60a9f89668613de4dfe9edd"
+source = "git+https://github.com/pml68/iced?branch=feat%2Frehighlight-on-redraw#1a84a8019cbd95ae1b1c88f75aeb0a15f0f3caf2"
dependencies = [
"bytes",
"iced_core",
@@ -2168,7 +2200,7 @@ dependencies = [
[[package]]
name = "iced_tiny_skia"
version = "0.14.0-dev"
-source = "git+https://github.com/iced-rs/iced?rev=97f1db3783dca5a4f60a9f89668613de4dfe9edd#97f1db3783dca5a4f60a9f89668613de4dfe9edd"
+source = "git+https://github.com/pml68/iced?branch=feat%2Frehighlight-on-redraw#1a84a8019cbd95ae1b1c88f75aeb0a15f0f3caf2"
dependencies = [
"bytemuck",
"cosmic-text",
@@ -2184,13 +2216,13 @@ dependencies = [
[[package]]
name = "iced_wgpu"
version = "0.14.0-dev"
-source = "git+https://github.com/iced-rs/iced?rev=97f1db3783dca5a4f60a9f89668613de4dfe9edd#97f1db3783dca5a4f60a9f89668613de4dfe9edd"
+source = "git+https://github.com/pml68/iced?branch=feat%2Frehighlight-on-redraw#1a84a8019cbd95ae1b1c88f75aeb0a15f0f3caf2"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"bytemuck",
+ "cryoglyph",
"futures",
"glam",
- "glyphon",
"guillotiere",
"iced_graphics",
"log",
@@ -2203,7 +2235,7 @@ dependencies = [
[[package]]
name = "iced_widget"
version = "0.14.0-dev"
-source = "git+https://github.com/iced-rs/iced?rev=97f1db3783dca5a4f60a9f89668613de4dfe9edd#97f1db3783dca5a4f60a9f89668613de4dfe9edd"
+source = "git+https://github.com/pml68/iced?branch=feat%2Frehighlight-on-redraw#1a84a8019cbd95ae1b1c88f75aeb0a15f0f3caf2"
dependencies = [
"iced_renderer",
"iced_runtime",
@@ -2217,7 +2249,7 @@ dependencies = [
[[package]]
name = "iced_winit"
version = "0.14.0-dev"
-source = "git+https://github.com/iced-rs/iced?rev=97f1db3783dca5a4f60a9f89668613de4dfe9edd#97f1db3783dca5a4f60a9f89668613de4dfe9edd"
+source = "git+https://github.com/pml68/iced?branch=feat%2Frehighlight-on-redraw#1a84a8019cbd95ae1b1c88f75aeb0a15f0f3caf2"
dependencies = [
"iced_futures",
"iced_graphics",
@@ -2418,9 +2450,9 @@ checksum = "d0263a3d970d5c054ed9312c0057b4f3bde9c0b33836d3637361d4a9e6e7a408"
[[package]]
name = "indexmap"
-version = "2.7.1"
+version = "2.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8c9c992b02b5b4c94ea26e32fe5bccb7aa7d9f390ab5c1221ff895bc7ea8b652"
+checksum = "3954d50fe15b02142bf25d3b8bdadb634ec3948f103d04ffe3031bc8fe9d7058"
dependencies = [
"equivalent",
"hashbrown",
@@ -2436,15 +2468,6 @@ dependencies = [
]
[[package]]
-name = "instant"
-version = "0.1.13"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222"
-dependencies = [
- "cfg-if",
-]
-
-[[package]]
name = "interpolate_name"
version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2472,9 +2495,9 @@ dependencies = [
[[package]]
name = "itoa"
-version = "1.0.14"
+version = "1.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674"
+checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c"
[[package]]
name = "jni"
@@ -2586,9 +2609,9 @@ checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8"
[[package]]
name = "libc"
-version = "0.2.169"
+version = "0.2.171"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a"
+checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6"
[[package]]
name = "libfuzzer-sys"
@@ -2622,16 +2645,16 @@ version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"libc",
- "redox_syscall 0.5.9",
+ "redox_syscall 0.5.10",
]
[[package]]
name = "lilt"
-version = "0.8.0"
+version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1ab94c7e69044511f79ce4b4201a49324b7f5b35410f862264e044690b950a67"
+checksum = "f67562e5eff6b20553fa9be1c503356768420994e28f67e3eafe6f41910e57ad"
dependencies = [
"web-time",
]
@@ -2649,10 +2672,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2a385b1be4e5c3e362ad2ffa73c392e53f031eaa5b7d648e64cd87f27f6063d7"
[[package]]
+name = "linux-raw-sys"
+version = "0.9.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fe7db12097d22ec582439daf8618b8fdd1a7bef6270e9af3b1ebcd30893cf413"
+
+[[package]]
name = "litemap"
-version = "0.7.4"
+version = "0.7.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104"
+checksum = "23fb14cb19457329c82206317a5663005a4d404783dc74f4252769b0d5f42856"
[[package]]
name = "litrs"
@@ -2711,6 +2740,17 @@ dependencies = [
]
[[package]]
+name = "lzma-sys"
+version = "0.1.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5fda04ab3764e6cde78b9974eec4f779acaba7c4e84b36eca3cf77c581b85d27"
+dependencies = [
+ "cc",
+ "libc",
+ "pkg-config",
+]
+
+[[package]]
name = "malloc_buf"
version = "0.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2755,11 +2795,11 @@ dependencies = [
[[package]]
name = "metal"
-version = "0.29.0"
+version = "0.31.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7ecfd3296f8c56b7c1f6fbac3c71cefa9d78ce009850c45000015f206dc7fa21"
+checksum = "f569fb946490b5743ad69813cb19629130ce9374034abe31614a36402d18f99e"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"block",
"core-graphics-types 0.1.3",
"foreign-types 0.5.0",
@@ -2792,9 +2832,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
[[package]]
name = "miniz_oxide"
-version = "0.8.4"
+version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b3b1c9bd4fe1f0f8b387f6eb9eb3b4a1aa26185e5750efb9140301703f62cd1b"
+checksum = "8e3e04debbb59698c15bacbb6d93584a8c0ca9cc3213cb423d31f760d8843ce5"
dependencies = [
"adler2",
"simd-adler32",
@@ -2819,22 +2859,23 @@ checksum = "16cf681a23b4d0a43fc35024c176437f9dcd818db34e0f42ab456a0ee5ad497b"
[[package]]
name = "naga"
-version = "23.1.0"
+version = "24.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "364f94bc34f61332abebe8cad6f6cd82a5b65cff22c828d05d0968911462ca4f"
+checksum = "e380993072e52eef724eddfcde0ed013b0c023c3f0417336ed041aa9f076994e"
dependencies = [
"arrayvec",
"bit-set",
- "bitflags 2.8.0",
- "cfg_aliases 0.1.1",
+ "bitflags 2.9.0",
+ "cfg_aliases",
"codespan-reporting",
"hexf-parse",
"indexmap",
"log",
"rustc-hash 1.1.0",
"spirv",
+ "strum",
"termcolor",
- "thiserror 1.0.69",
+ "thiserror 2.0.12",
"unicode-xid",
]
@@ -2861,7 +2902,7 @@ version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"jni-sys",
"log",
"ndk-sys 0.6.0+11769913",
@@ -2906,9 +2947,9 @@ version = "0.29.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"cfg-if",
- "cfg_aliases 0.2.1",
+ "cfg_aliases",
"libc",
"memoffset",
]
@@ -3042,32 +3083,53 @@ dependencies = [
]
[[package]]
+name = "objc2"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3531f65190d9cff863b77a99857e74c314dd16bf56c538c4b57c7cbc3f3a6e59"
+dependencies = [
+ "objc2-encode",
+]
+
+[[package]]
name = "objc2-app-kit"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff"
dependencies = [
- "bitflags 2.8.0",
- "block2",
+ "bitflags 2.9.0",
+ "block2 0.5.1",
"libc",
- "objc2",
+ "objc2 0.5.2",
"objc2-core-data",
"objc2-core-image",
- "objc2-foundation",
+ "objc2-foundation 0.2.2",
"objc2-quartz-core",
]
[[package]]
+name = "objc2-app-kit"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5906f93257178e2f7ae069efb89fbd6ee94f0592740b5f8a1512ca498814d0fb"
+dependencies = [
+ "bitflags 2.9.0",
+ "block2 0.6.0",
+ "objc2 0.6.0",
+ "objc2-foundation 0.3.0",
+]
+
+[[package]]
name = "objc2-cloud-kit"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009"
dependencies = [
- "bitflags 2.8.0",
- "block2",
- "objc2",
+ "bitflags 2.9.0",
+ "block2 0.5.1",
+ "objc2 0.5.2",
"objc2-core-location",
- "objc2-foundation",
+ "objc2-foundation 0.2.2",
]
[[package]]
@@ -3076,9 +3138,9 @@ version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a5ff520e9c33812fd374d8deecef01d4a840e7b41862d849513de77e44aa4889"
dependencies = [
- "block2",
- "objc2",
- "objc2-foundation",
+ "block2 0.5.1",
+ "objc2 0.5.2",
+ "objc2-foundation 0.2.2",
]
[[package]]
@@ -3087,10 +3149,20 @@ version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef"
dependencies = [
- "bitflags 2.8.0",
- "block2",
- "objc2",
- "objc2-foundation",
+ "bitflags 2.9.0",
+ "block2 0.5.1",
+ "objc2 0.5.2",
+ "objc2-foundation 0.2.2",
+]
+
+[[package]]
+name = "objc2-core-foundation"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "daeaf60f25471d26948a1c2f840e3f7d86f4109e3af4e8e4b5cd70c39690d925"
+dependencies = [
+ "bitflags 2.9.0",
+ "objc2 0.6.0",
]
[[package]]
@@ -3099,9 +3171,9 @@ version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80"
dependencies = [
- "block2",
- "objc2",
- "objc2-foundation",
+ "block2 0.5.1",
+ "objc2 0.5.2",
+ "objc2-foundation 0.2.2",
"objc2-metal",
]
@@ -3111,10 +3183,10 @@ version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "000cfee34e683244f284252ee206a27953279d370e309649dc3ee317b37e5781"
dependencies = [
- "block2",
- "objc2",
+ "block2 0.5.1",
+ "objc2 0.5.2",
"objc2-contacts",
- "objc2-foundation",
+ "objc2-foundation 0.2.2",
]
[[package]]
@@ -3129,11 +3201,22 @@ version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8"
dependencies = [
- "bitflags 2.8.0",
- "block2",
+ "bitflags 2.9.0",
+ "block2 0.5.1",
"dispatch",
"libc",
- "objc2",
+ "objc2 0.5.2",
+]
+
+[[package]]
+name = "objc2-foundation"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3a21c6c9014b82c39515db5b396f91645182611c97d24637cf56ac01e5f8d998"
+dependencies = [
+ "bitflags 2.9.0",
+ "objc2 0.6.0",
+ "objc2-core-foundation",
]
[[package]]
@@ -3142,10 +3225,10 @@ version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1a1ae721c5e35be65f01a03b6d2ac13a54cb4fa70d8a5da293d7b0020261398"
dependencies = [
- "block2",
- "objc2",
- "objc2-app-kit",
- "objc2-foundation",
+ "block2 0.5.1",
+ "objc2 0.5.2",
+ "objc2-app-kit 0.2.2",
+ "objc2-foundation 0.2.2",
]
[[package]]
@@ -3154,10 +3237,10 @@ version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6"
dependencies = [
- "bitflags 2.8.0",
- "block2",
- "objc2",
- "objc2-foundation",
+ "bitflags 2.9.0",
+ "block2 0.5.1",
+ "objc2 0.5.2",
+ "objc2-foundation 0.2.2",
]
[[package]]
@@ -3166,10 +3249,10 @@ version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a"
dependencies = [
- "bitflags 2.8.0",
- "block2",
- "objc2",
- "objc2-foundation",
+ "bitflags 2.9.0",
+ "block2 0.5.1",
+ "objc2 0.5.2",
+ "objc2-foundation 0.2.2",
"objc2-metal",
]
@@ -3179,8 +3262,8 @@ version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0a684efe3dec1b305badae1a28f6555f6ddd3bb2c2267896782858d5a78404dc"
dependencies = [
- "objc2",
- "objc2-foundation",
+ "objc2 0.5.2",
+ "objc2-foundation 0.2.2",
]
[[package]]
@@ -3189,14 +3272,14 @@ version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f"
dependencies = [
- "bitflags 2.8.0",
- "block2",
- "objc2",
+ "bitflags 2.9.0",
+ "block2 0.5.1",
+ "objc2 0.5.2",
"objc2-cloud-kit",
"objc2-core-data",
"objc2-core-image",
"objc2-core-location",
- "objc2-foundation",
+ "objc2-foundation 0.2.2",
"objc2-link-presentation",
"objc2-quartz-core",
"objc2-symbols",
@@ -3210,9 +3293,9 @@ version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "44fa5f9748dbfe1ca6c0b79ad20725a11eca7c2218bceb4b005cb1be26273bfe"
dependencies = [
- "block2",
- "objc2",
- "objc2-foundation",
+ "block2 0.5.1",
+ "objc2 0.5.2",
+ "objc2-foundation 0.2.2",
]
[[package]]
@@ -3221,11 +3304,11 @@ version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3"
dependencies = [
- "bitflags 2.8.0",
- "block2",
- "objc2",
+ "bitflags 2.9.0",
+ "block2 0.5.1",
+ "objc2 0.5.2",
"objc2-core-location",
- "objc2-foundation",
+ "objc2-foundation 0.2.2",
]
[[package]]
@@ -3239,9 +3322,9 @@ dependencies = [
[[package]]
name = "once_cell"
-version = "1.20.3"
+version = "1.21.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "945462a4b81e43c4e3ba96bd7b49d834c6f61198356aa858733bc4acf3cbe62e"
+checksum = "d75b0bedcc4fe52caa0e03d9f1151a323e4aa5e2d78ba3580400cd3c9e2bc4bc"
[[package]]
name = "onig"
@@ -3271,7 +3354,7 @@ version = "0.10.71"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5e14130c6a98cd258fdcb0fb6d744152343ff729cbfcb28c656a9d12b999fbcd"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"cfg-if",
"foreign-types 0.3.2",
"libc",
@@ -3319,6 +3402,15 @@ dependencies = [
]
[[package]]
+name = "ordered-float"
+version = "4.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7bb71e1b3fa6ca1c61f383464aaf2bb0e2f8e772a1f01d486832464de363b951"
+dependencies = [
+ "num-traits",
+]
+
+[[package]]
name = "ordered-stream"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3381,37 +3473,12 @@ checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba"
[[package]]
name = "parking_lot"
-version = "0.11.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99"
-dependencies = [
- "instant",
- "lock_api",
- "parking_lot_core 0.8.6",
-]
-
-[[package]]
-name = "parking_lot"
version = "0.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27"
dependencies = [
"lock_api",
- "parking_lot_core 0.9.10",
-]
-
-[[package]]
-name = "parking_lot_core"
-version = "0.8.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc"
-dependencies = [
- "cfg-if",
- "instant",
- "libc",
- "redox_syscall 0.2.16",
- "smallvec",
- "winapi",
+ "parking_lot_core",
]
[[package]]
@@ -3422,7 +3489,7 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8"
dependencies = [
"cfg-if",
"libc",
- "redox_syscall 0.5.9",
+ "redox_syscall 0.5.10",
"smallvec",
"windows-targets 0.52.6",
]
@@ -3466,7 +3533,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d"
dependencies = [
"phf_shared",
- "rand",
+ "rand 0.8.5",
]
[[package]]
@@ -3499,18 +3566,18 @@ checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315"
[[package]]
name = "pin-project"
-version = "1.1.9"
+version = "1.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dfe2e71e1471fe07709406bf725f710b02927c9c54b2b5b2ec0e8087d97c327d"
+checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a"
dependencies = [
"pin-project-internal",
]
[[package]]
name = "pin-project-internal"
-version = "1.1.9"
+version = "1.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f6e859e6e5bd50440ab63c47e3ebabc90f26251f7c73c3d3e837b74a1cc3fa67"
+checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861"
dependencies = [
"proc-macro2",
"quote",
@@ -3542,9 +3609,9 @@ dependencies = [
[[package]]
name = "pkg-config"
-version = "0.3.31"
+version = "0.3.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2"
+checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c"
[[package]]
name = "png"
@@ -3569,7 +3636,7 @@ dependencies = [
"concurrent-queue",
"hermit-abi 0.4.0",
"pin-project-lite",
- "rustix",
+ "rustix 0.38.44",
"tracing",
"windows-sys 0.59.0",
]
@@ -3582,11 +3649,11 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
[[package]]
name = "ppv-lite86"
-version = "0.2.20"
+version = "0.2.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04"
+checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9"
dependencies = [
- "zerocopy",
+ "zerocopy 0.8.24",
]
[[package]]
@@ -3597,18 +3664,18 @@ checksum = "e8cf8e6a8aa66ce33f63993ffc4ea4271eb5b0530a9002db8455ea6050c77bfa"
[[package]]
name = "proc-macro-crate"
-version = "3.2.0"
+version = "3.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b"
+checksum = "edce586971a4dfaa28950c6f18ed55e0406c1ab88bbce2c6f6293a7aaba73d35"
dependencies = [
"toml_edit",
]
[[package]]
name = "proc-macro2"
-version = "1.0.93"
+version = "1.0.94"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99"
+checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84"
dependencies = [
"unicode-ident",
]
@@ -3658,22 +3725,39 @@ dependencies = [
[[package]]
name = "quote"
-version = "1.0.38"
+version = "1.0.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc"
+checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d"
dependencies = [
"proc-macro2",
]
[[package]]
+name = "r-efi"
+version = "5.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5"
+
+[[package]]
name = "rand"
version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
dependencies = [
"libc",
- "rand_chacha",
- "rand_core",
+ "rand_chacha 0.3.1",
+ "rand_core 0.6.4",
+]
+
+[[package]]
+name = "rand"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3779b94aeb87e8bd4e834cee3650289ee9e0d5677f976ecdb6d219e5f4f6cd94"
+dependencies = [
+ "rand_chacha 0.9.0",
+ "rand_core 0.9.3",
+ "zerocopy 0.8.24",
]
[[package]]
@@ -3683,7 +3767,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
dependencies = [
"ppv-lite86",
- "rand_core",
+ "rand_core 0.6.4",
+]
+
+[[package]]
+name = "rand_chacha"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb"
+dependencies = [
+ "ppv-lite86",
+ "rand_core 0.9.3",
]
[[package]]
@@ -3696,6 +3790,15 @@ dependencies = [
]
[[package]]
+name = "rand_core"
+version = "0.9.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38"
+dependencies = [
+ "getrandom 0.3.2",
+]
+
+[[package]]
name = "range-alloc"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3733,8 +3836,8 @@ dependencies = [
"once_cell",
"paste",
"profiling",
- "rand",
- "rand_chacha",
+ "rand 0.8.5",
+ "rand_chacha 0.3.1",
"simd_helpers",
"system-deps",
"thiserror 1.0.69",
@@ -3785,9 +3888,9 @@ dependencies = [
[[package]]
name = "read-fonts"
-version = "0.22.7"
+version = "0.25.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "69aacb76b5c29acfb7f90155d39759a29496aebb49395830e928a9703d2eec2f"
+checksum = "f6f9e8a4f503e5c8750e4cd3b32a4e090035c46374b305a15c70bad833dca05f"
dependencies = [
"bytemuck",
"font-types",
@@ -3795,15 +3898,6 @@ dependencies = [
[[package]]
name = "redox_syscall"
-version = "0.2.16"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a"
-dependencies = [
- "bitflags 1.3.2",
-]
-
-[[package]]
-name = "redox_syscall"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa"
@@ -3813,11 +3907,11 @@ dependencies = [
[[package]]
name = "redox_syscall"
-version = "0.5.9"
+version = "0.5.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "82b568323e98e49e2a0899dcee453dd679fae22d69adf9b11dd508d1549b7e2f"
+checksum = "0b8c0c260b63a8219631167be35e6a988e9554dbd323f8bd08439c8ed1302bd1"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
]
[[package]]
@@ -3845,9 +3939,9 @@ checksum = "19b30a45b0cd0bcca8037f3d0dc3421eaf95327a17cad11964fb8179b4fc4832"
[[package]]
name = "reqwest"
-version = "0.12.12"
+version = "0.12.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "43e734407157c3c2034e0258f5e4473ddb361b1e85f95a66690d67264d7cd1da"
+checksum = "d19c46a6fdd48bc4dab94b6103fccc55d34c67cc0ad04653aad4ea2a07cd7bbb"
dependencies = [
"base64",
"bytes",
@@ -3907,22 +4001,22 @@ dependencies = [
[[package]]
name = "rfd"
-version = "0.15.2"
+version = "0.15.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6a24763657bff09769a8ccf12c8b8a50416fb035fe199263b4c5071e4e3f006f"
+checksum = "80c844748fdc82aae252ee4594a89b6e7ebef1063de7951545564cbc4e57075d"
dependencies = [
- "ashpd",
- "block2",
- "core-foundation 0.10.0",
- "core-foundation-sys",
+ "ashpd 0.11.0",
+ "block2 0.6.0",
+ "dispatch2",
"glib-sys",
"gobject-sys",
"gtk-sys",
"js-sys",
"log",
- "objc2",
- "objc2-app-kit",
- "objc2-foundation",
+ "objc2 0.6.0",
+ "objc2-app-kit 0.3.0",
+ "objc2-core-foundation",
+ "objc2-foundation 0.3.0",
"raw-window-handle",
"wasm-bindgen",
"wasm-bindgen-futures",
@@ -3941,9 +4035,9 @@ dependencies = [
[[package]]
name = "ring"
-version = "0.17.9"
+version = "0.17.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e75ec5e92c4d8aede845126adc388046234541629e76029599ed35a003c7ed24"
+checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7"
dependencies = [
"cc",
"cfg-if",
@@ -3998,7 +4092,7 @@ version = "0.38.44"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"errno",
"libc",
"linux-raw-sys 0.4.15",
@@ -4006,10 +4100,23 @@ dependencies = [
]
[[package]]
+name = "rustix"
+version = "1.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e56a18552996ac8d29ecc3b190b4fdbb2d91ca4ec396de7bbffaf43f3d637e96"
+dependencies = [
+ "bitflags 2.9.0",
+ "errno",
+ "libc",
+ "linux-raw-sys 0.9.3",
+ "windows-sys 0.59.0",
+]
+
+[[package]]
name = "rustls"
-version = "0.23.23"
+version = "0.23.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "47796c98c480fce5406ef69d1c76378375492c3b0a0de587be0c1d9feb12f395"
+checksum = "822ee9188ac4ec04a2f0531e55d035fb2de73f18b41a63c70c2712503b6fb13c"
dependencies = [
"once_cell",
"rustls-pki-types",
@@ -4035,9 +4142,9 @@ checksum = "917ce264624a4b4db1c364dcc35bfca9ded014d0a958cd47ad3e960e988ea51c"
[[package]]
name = "rustls-webpki"
-version = "0.102.8"
+version = "0.103.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9"
+checksum = "0aa4eeac2588ffff23e9d7a7e9b3f971c5fb5b7ebc9452745e0c232c64f83b2f"
dependencies = [
"ring",
"rustls-pki-types",
@@ -4046,9 +4153,9 @@ dependencies = [
[[package]]
name = "rustversion"
-version = "1.0.19"
+version = "1.0.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4"
+checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2"
[[package]]
name = "rustybuzz"
@@ -4056,7 +4163,7 @@ version = "0.14.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cfb9cf8877777222e4a3bc7eb247e398b56baba500c38c1c46842431adc8b55c"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"bytemuck",
"libm",
"smallvec",
@@ -4069,9 +4176,9 @@ dependencies = [
[[package]]
name = "ryu"
-version = "1.0.19"
+version = "1.0.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6ea1a2d0a644769cc99faa24c3ad26b379b786fe7c36fd3c546254801650e6dd"
+checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f"
[[package]]
name = "same-file"
@@ -4122,7 +4229,7 @@ version = "2.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"core-foundation 0.9.4",
"core-foundation-sys",
"libc",
@@ -4147,24 +4254,24 @@ checksum = "c2fdfc24bc566f839a2da4c4295b82db7d25a24253867d5c64355abb5799bdbe"
[[package]]
name = "semver"
-version = "1.0.25"
+version = "1.0.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f79dfe2d285b0488816f30e700a7438c5a73d816b5b7d3ac72fbc48b0d185e03"
+checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0"
[[package]]
name = "serde"
-version = "1.0.218"
+version = "1.0.219"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e8dfc9d19bdbf6d17e22319da49161d5d0108e4188e8b680aef6299eed22df60"
+checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
-version = "1.0.218"
+version = "1.0.219"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f09503e191f4e797cb8aac08e9a4a4695c5edf6a2e70e376d961ddd5c969f82b"
+checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00"
dependencies = [
"proc-macro2",
"quote",
@@ -4173,9 +4280,9 @@ dependencies = [
[[package]]
name = "serde_json"
-version = "1.0.139"
+version = "1.0.140"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "44f86c3acccc9c65b153fe1b85a3be07fe5515274ec9f0653b4a0875731c72a6"
+checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373"
dependencies = [
"itoa",
"memchr",
@@ -4185,9 +4292,9 @@ dependencies = [
[[package]]
name = "serde_repr"
-version = "0.1.19"
+version = "0.1.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9"
+checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c"
dependencies = [
"proc-macro2",
"quote",
@@ -4294,9 +4401,9 @@ dependencies = [
[[package]]
name = "skrifa"
-version = "0.22.3"
+version = "0.26.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8e1c44ad1f6c5bdd4eefed8326711b7dbda9ea45dfd36068c427d332aa382cbe"
+checksum = "8cc1aa86c26dbb1b63875a7180aa0819709b33348eb5b1491e4321fae388179d"
dependencies = [
"bytemuck",
"read-fonts",
@@ -4332,14 +4439,14 @@ version = "0.19.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3457dea1f0eb631b4034d61d4d8c32074caa6cd1ab2d59f2327bd8461e2c0016"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"calloop",
"calloop-wayland-source",
"cursor-icon",
"libc",
"log",
"memmap2",
- "rustix",
+ "rustix 0.38.44",
"thiserror 1.0.69",
"wayland-backend",
"wayland-client",
@@ -4389,7 +4496,7 @@ checksum = "18051cdd562e792cad055119e0cdb2cfc137e44e3987532e0f9659a77931bb08"
dependencies = [
"as-raw-xcb-connection",
"bytemuck",
- "cfg_aliases 0.2.1",
+ "cfg_aliases",
"core-graphics 0.24.0",
"drm",
"fastrand",
@@ -4397,12 +4504,12 @@ dependencies = [
"js-sys",
"log",
"memmap2",
- "objc2",
- "objc2-foundation",
+ "objc2 0.5.2",
+ "objc2-foundation 0.2.2",
"objc2-quartz-core",
"raw-window-handle",
- "redox_syscall 0.5.9",
- "rustix",
+ "redox_syscall 0.5.10",
+ "rustix 0.38.44",
"tiny-xlib",
"wasm-bindgen",
"wayland-backend",
@@ -4419,7 +4526,7 @@ version = "0.3.0+sdk-1.3.268.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eda41003dc44290527a59b13432d4a0379379fa074b70174882adfbdfd917844"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
]
[[package]]
@@ -4444,6 +4551,28 @@ dependencies = [
]
[[package]]
+name = "strum"
+version = "0.26.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06"
+dependencies = [
+ "strum_macros",
+]
+
+[[package]]
+name = "strum_macros"
+version = "0.26.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be"
+dependencies = [
+ "heck",
+ "proc-macro2",
+ "quote",
+ "rustversion",
+ "syn",
+]
+
+[[package]]
name = "subtle"
version = "2.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -4467,9 +4596,9 @@ dependencies = [
[[package]]
name = "swash"
-version = "0.1.19"
+version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cbd59f3f359ddd2c95af4758c18270eddd9c730dde98598023cdabff472c2ca2"
+checksum = "13d5bbc2aa266907ed8ee977c9c9e16363cc2b001266104e13397b57f1d15f71"
dependencies = [
"skrifa",
"yazi",
@@ -4478,9 +4607,9 @@ dependencies = [
[[package]]
name = "syn"
-version = "2.0.98"
+version = "2.0.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "36147f1a48ae0ec2b5b3bc5b537d267457555a10dc06f3dbc8cb11ba3006d3b1"
+checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0"
dependencies = [
"proc-macro2",
"quote",
@@ -4542,7 +4671,7 @@ version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"core-foundation 0.9.4",
"system-configuration-sys",
]
@@ -4578,15 +4707,14 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
[[package]]
name = "tempfile"
-version = "3.17.1"
+version = "3.19.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "22e5a0acb1f3f55f65cc4a866c361b2fb2a0ff6366785ae6fbb5f85df07ba230"
+checksum = "7437ac7763b9b123ccf33c338a5cc1bac6f69b45a136c19bdd8a65e3916435bf"
dependencies = [
- "cfg-if",
"fastrand",
- "getrandom 0.3.1",
+ "getrandom 0.3.2",
"once_cell",
- "rustix",
+ "rustix 1.0.3",
"windows-sys 0.59.0",
]
@@ -4610,11 +4738,11 @@ dependencies = [
[[package]]
name = "thiserror"
-version = "2.0.11"
+version = "2.0.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d452f284b73e6d76dd36758a0c8684b1d5be31f92b89d07fd5822175732206fc"
+checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708"
dependencies = [
- "thiserror-impl 2.0.11",
+ "thiserror-impl 2.0.12",
]
[[package]]
@@ -4630,9 +4758,9 @@ dependencies = [
[[package]]
name = "thiserror-impl"
-version = "2.0.11"
+version = "2.0.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2"
+checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d"
dependencies = [
"proc-macro2",
"quote",
@@ -4652,9 +4780,9 @@ dependencies = [
[[package]]
name = "time"
-version = "0.3.37"
+version = "0.3.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21"
+checksum = "9d9c75b47bdff86fa3334a3db91356b8d7d86a9b839dab7d0bdc5c3d3a077618"
dependencies = [
"deranged",
"num-conv",
@@ -4665,9 +4793,9 @@ dependencies = [
[[package]]
name = "time-core"
-version = "0.1.2"
+version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3"
+checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c"
[[package]]
name = "tiny-skia"
@@ -4720,9 +4848,9 @@ dependencies = [
[[package]]
name = "tinyvec"
-version = "1.8.1"
+version = "1.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "022db8904dfa342efe721985167e9fcd16c29b226db4397ed752a761cfce81e8"
+checksum = "09b3661f17e86524eccd4371ab0429194e0d7c008abb45f7a7495b1719463c71"
dependencies = [
"tinyvec_macros",
]
@@ -4735,9 +4863,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]]
name = "tokio"
-version = "1.43.0"
+version = "1.44.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3d61fa4ffa3de412bfea335c6ecff681de2b609ba3c77ef3e00e521813a9ed9e"
+checksum = "f382da615b842244d4b8738c82ed1275e6c5dd90c459a30941cd07080b06c91a"
dependencies = [
"backtrace",
"bytes",
@@ -4762,9 +4890,9 @@ dependencies = [
[[package]]
name = "tokio-rustls"
-version = "0.26.1"
+version = "0.26.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5f6d0975eaace0cf0fcadee4e4aaa5da15b5c079146f2cffb67c113be122bf37"
+checksum = "8e727b36a1a0e8b74c376ac2211e40c2c8af09fb4013c60d910495810f008e9b"
dependencies = [
"rustls",
"tokio",
@@ -4783,9 +4911,9 @@ dependencies = [
[[package]]
name = "tokio-util"
-version = "0.7.13"
+version = "0.7.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d7fcaa8d55a2bdd6b83ace262b016eca0d79ee02818c5c1bcdf0305114081078"
+checksum = "6b9590b93e6fcc1739458317cccd391ad3955e2bde8913edf6f95f9e65a8f034"
dependencies = [
"bytes",
"futures-core",
@@ -4911,6 +5039,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d2df906b07856748fa3f6e0ad0cbaa047052d4a7dd609e231c4f72cee8c36f31"
[[package]]
+name = "two-face"
+version = "0.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "384eda438ddf62e2c6f39a174452d952d9d9df5a8ad5ade22198609f8dcaf852"
+dependencies = [
+ "once_cell",
+ "serde",
+ "syntect",
+]
+
+[[package]]
name = "typenum"
version = "1.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -4953,9 +5092,9 @@ checksum = "1df77b101bcc4ea3d78dafc5ad7e4f58ceffe0b2b16bf446aeb50b6cb4157656"
[[package]]
name = "unicode-ident"
-version = "1.0.17"
+version = "1.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "00e2473a93778eb0bad35909dff6a10d28e63f792f16ed15e404fca9d5eeedbe"
+checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512"
[[package]]
name = "unicode-linebreak"
@@ -5138,9 +5277,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
[[package]]
name = "wasi"
-version = "0.13.3+wasi-0.2.2"
+version = "0.14.2+wasi-0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "26816d2e1a4a36a2940b96c5296ce403917633dff8f3440e9b236ed6f6bacad2"
+checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3"
dependencies = [
"wit-bindgen-rt",
]
@@ -5217,18 +5356,17 @@ dependencies = [
]
[[package]]
-name = "wasm-timer"
-version = "0.2.5"
+name = "wasmtimer"
+version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f"
+checksum = "0048ad49a55b9deb3953841fa1fc5858f0efbcb7a18868c899a360269fac1b23"
dependencies = [
"futures",
"js-sys",
- "parking_lot 0.11.2",
+ "parking_lot",
"pin-utils",
+ "slab",
"wasm-bindgen",
- "wasm-bindgen-futures",
- "web-sys",
]
[[package]]
@@ -5239,7 +5377,7 @@ checksum = "b7208998eaa3870dad37ec8836979581506e0c5c64c20c9e79e9d2a10d6f47bf"
dependencies = [
"cc",
"downcast-rs",
- "rustix",
+ "rustix 0.38.44",
"scoped-tls",
"smallvec",
"wayland-sys",
@@ -5251,8 +5389,8 @@ version = "0.31.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2120de3d33638aaef5b9f4472bff75f07c56379cf76ea320bd3a3d65ecaf73f"
dependencies = [
- "bitflags 2.8.0",
- "rustix",
+ "bitflags 2.9.0",
+ "rustix 0.38.44",
"wayland-backend",
"wayland-scanner",
]
@@ -5263,7 +5401,7 @@ version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"cursor-icon",
"wayland-backend",
]
@@ -5274,7 +5412,7 @@ version = "0.31.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a93029cbb6650748881a00e4922b076092a6a08c11e7fbdb923f064b23968c5d"
dependencies = [
- "rustix",
+ "rustix 0.38.44",
"wayland-client",
"xcursor",
]
@@ -5285,7 +5423,7 @@ version = "0.32.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0781cf46869b37e36928f7b432273c0995aa8aed9552c556fb18754420541efc"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"wayland-backend",
"wayland-client",
"wayland-scanner",
@@ -5297,7 +5435,7 @@ version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ccaacc76703fefd6763022ac565b590fcade92202492381c95b2edfdf7d46b3"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"wayland-backend",
"wayland-client",
"wayland-protocols",
@@ -5310,7 +5448,7 @@ version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "248a02e6f595aad796561fa82d25601bd2c8c3b145b1c7453fc8f94c1a58f8b2"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"wayland-backend",
"wayland-client",
"wayland-protocols",
@@ -5368,17 +5506,18 @@ checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082"
[[package]]
name = "wgpu"
-version = "23.0.1"
+version = "24.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "80f70000db37c469ea9d67defdc13024ddf9a5f1b89cb2941b812ad7cde1735a"
+checksum = "35904fb00ba2d2e0a4d002fcbbb6e1b89b574d272a50e5fc95f6e81cf281c245"
dependencies = [
"arrayvec",
- "cfg_aliases 0.1.1",
+ "bitflags 2.9.0",
+ "cfg_aliases",
"document-features",
"js-sys",
"log",
"naga",
- "parking_lot 0.12.3",
+ "parking_lot",
"profiling",
"raw-window-handle",
"smallvec",
@@ -5393,43 +5532,43 @@ dependencies = [
[[package]]
name = "wgpu-core"
-version = "23.0.1"
+version = "24.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d63c3c478de8e7e01786479919c8769f62a22eec16788d8c2ac77ce2c132778a"
+checksum = "671c25545d479b47d3f0a8e373aceb2060b67c6eb841b24ac8c32348151c7a0c"
dependencies = [
"arrayvec",
"bit-vec",
- "bitflags 2.8.0",
- "cfg_aliases 0.1.1",
+ "bitflags 2.9.0",
+ "cfg_aliases",
"document-features",
"indexmap",
"log",
"naga",
"once_cell",
- "parking_lot 0.12.3",
+ "parking_lot",
"profiling",
"raw-window-handle",
"rustc-hash 1.1.0",
"smallvec",
- "thiserror 1.0.69",
+ "thiserror 2.0.12",
"wgpu-hal",
"wgpu-types",
]
[[package]]
name = "wgpu-hal"
-version = "23.0.1"
+version = "24.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "89364b8a0b211adc7b16aeaf1bd5ad4a919c1154b44c9ce27838213ba05fd821"
+checksum = "4317a17171dc20e6577bf606796794580accae0716a69edbc7388c86a3ec9f23"
dependencies = [
"android_system_properties",
"arrayvec",
"ash",
"bit-set",
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"block",
"bytemuck",
- "cfg_aliases 0.1.1",
+ "cfg_aliases",
"core-graphics-types 0.1.3",
"glow",
"glutin_wgl_sys",
@@ -5446,14 +5585,15 @@ dependencies = [
"ndk-sys 0.5.0+25.2.9519653",
"objc",
"once_cell",
- "parking_lot 0.12.3",
+ "ordered-float",
+ "parking_lot",
"profiling",
"range-alloc",
"raw-window-handle",
"renderdoc-sys",
"rustc-hash 1.1.0",
"smallvec",
- "thiserror 1.0.69",
+ "thiserror 2.0.12",
"wasm-bindgen",
"web-sys",
"wgpu-types",
@@ -5463,12 +5603,13 @@ dependencies = [
[[package]]
name = "wgpu-types"
-version = "23.0.0"
+version = "24.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "610f6ff27778148c31093f3b03abc4840f9636d58d597ca2f5977433acfe0068"
+checksum = "50ac044c0e76c03a0378e7786ac505d010a873665e2d51383dcff8dd227dc69c"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"js-sys",
+ "log",
"web-sys",
]
@@ -5535,8 +5676,8 @@ checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99"
dependencies = [
"windows-implement",
"windows-interface",
- "windows-result",
- "windows-strings",
+ "windows-result 0.2.0",
+ "windows-strings 0.1.0",
"windows-targets 0.52.6",
]
@@ -5563,14 +5704,20 @@ dependencies = [
]
[[package]]
+name = "windows-link"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38"
+
+[[package]]
name = "windows-registry"
-version = "0.2.0"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0"
+checksum = "4286ad90ddb45071efd1a66dfa43eb02dd0dfbae1545ad6cc3c51cf34d7e8ba3"
dependencies = [
- "windows-result",
- "windows-strings",
- "windows-targets 0.52.6",
+ "windows-result 0.3.2",
+ "windows-strings 0.3.1",
+ "windows-targets 0.53.0",
]
[[package]]
@@ -5583,16 +5730,34 @@ dependencies = [
]
[[package]]
+name = "windows-result"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c64fd11a4fd95df68efcfee5f44a294fe71b8bc6a91993e2791938abcc712252"
+dependencies = [
+ "windows-link",
+]
+
+[[package]]
name = "windows-strings"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10"
dependencies = [
- "windows-result",
+ "windows-result 0.2.0",
"windows-targets 0.52.6",
]
[[package]]
+name = "windows-strings"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "87fa48cc5d406560701792be122a10132491cff9d0aeb23583cc2dcafc847319"
+dependencies = [
+ "windows-link",
+]
+
+[[package]]
name = "windows-sys"
version = "0.45.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -5667,7 +5832,7 @@ dependencies = [
"windows_aarch64_gnullvm 0.52.6",
"windows_aarch64_msvc 0.52.6",
"windows_i686_gnu 0.52.6",
- "windows_i686_gnullvm",
+ "windows_i686_gnullvm 0.52.6",
"windows_i686_msvc 0.52.6",
"windows_x86_64_gnu 0.52.6",
"windows_x86_64_gnullvm 0.52.6",
@@ -5675,6 +5840,22 @@ dependencies = [
]
[[package]]
+name = "windows-targets"
+version = "0.53.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b1e4c7e8ceaaf9cb7d7507c974735728ab453b67ef8f18febdd7c11fe59dca8b"
+dependencies = [
+ "windows_aarch64_gnullvm 0.53.0",
+ "windows_aarch64_msvc 0.53.0",
+ "windows_i686_gnu 0.53.0",
+ "windows_i686_gnullvm 0.53.0",
+ "windows_i686_msvc 0.53.0",
+ "windows_x86_64_gnu 0.53.0",
+ "windows_x86_64_gnullvm 0.53.0",
+ "windows_x86_64_msvc 0.53.0",
+]
+
+[[package]]
name = "windows_aarch64_gnullvm"
version = "0.42.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -5693,6 +5874,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
[[package]]
+name = "windows_aarch64_gnullvm"
+version = "0.53.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764"
+
+[[package]]
name = "windows_aarch64_msvc"
version = "0.42.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -5711,6 +5898,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
[[package]]
+name = "windows_aarch64_msvc"
+version = "0.53.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c"
+
+[[package]]
name = "windows_exe_info"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -5738,12 +5931,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
[[package]]
+name = "windows_i686_gnu"
+version = "0.53.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3"
+
+[[package]]
name = "windows_i686_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
[[package]]
+name = "windows_i686_gnullvm"
+version = "0.53.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11"
+
+[[package]]
name = "windows_i686_msvc"
version = "0.42.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -5762,6 +5967,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
[[package]]
+name = "windows_i686_msvc"
+version = "0.53.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d"
+
+[[package]]
name = "windows_x86_64_gnu"
version = "0.42.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -5780,6 +5991,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
[[package]]
+name = "windows_x86_64_gnu"
+version = "0.53.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba"
+
+[[package]]
name = "windows_x86_64_gnullvm"
version = "0.42.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -5798,6 +6015,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
[[package]]
+name = "windows_x86_64_gnullvm"
+version = "0.53.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57"
+
+[[package]]
name = "windows_x86_64_msvc"
version = "0.42.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -5816,6 +6039,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
[[package]]
+name = "windows_x86_64_msvc"
+version = "0.53.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486"
+
+[[package]]
name = "winit"
version = "0.30.8"
source = "git+https://github.com/iced-rs/winit.git?rev=11414b6aa45699f038114e61b4ddf5102b2d3b4b#11414b6aa45699f038114e61b4ddf5102b2d3b4b"
@@ -5823,11 +6052,11 @@ dependencies = [
"ahash",
"android-activity",
"atomic-waker",
- "bitflags 2.8.0",
- "block2",
+ "bitflags 2.9.0",
+ "block2 0.5.1",
"bytemuck",
"calloop",
- "cfg_aliases 0.2.1",
+ "cfg_aliases",
"concurrent-queue",
"core-foundation 0.9.4",
"core-graphics 0.23.2",
@@ -5837,16 +6066,16 @@ dependencies = [
"libc",
"memmap2",
"ndk",
- "objc2",
- "objc2-app-kit",
- "objc2-foundation",
+ "objc2 0.5.2",
+ "objc2-app-kit 0.2.2",
+ "objc2-foundation 0.2.2",
"objc2-ui-kit",
"orbclient",
"percent-encoding",
"pin-project",
"raw-window-handle",
"redox_syscall 0.4.1",
- "rustix",
+ "rustix 0.38.44",
"sctk-adwaita",
"smithay-client-toolkit",
"smol_str",
@@ -5868,9 +6097,9 @@ dependencies = [
[[package]]
name = "winnow"
-version = "0.7.3"
+version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0e7f4ea97f6f78012141bcdb6a216b2609f0979ada50b20ca5b52dde2eac2bb1"
+checksum = "0e97b544156e9bebe1a0ffbc03484fc1ffe3100cbce3ffb17eac35f7cdd7ab36"
dependencies = [
"memchr",
]
@@ -5887,11 +6116,11 @@ dependencies = [
[[package]]
name = "wit-bindgen-rt"
-version = "0.33.0"
+version = "0.39.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c"
+checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
]
[[package]]
@@ -5928,7 +6157,7 @@ dependencies = [
"libc",
"libloading",
"once_cell",
- "rustix",
+ "rustix 0.38.44",
"x11rb-protocol",
]
@@ -5966,7 +6195,7 @@ version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d039de8032a9a8856a6be89cea3e5d12fdd82306ab7c94d74e6deab2460651c5"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"dlib",
"log",
"once_cell",
@@ -5992,10 +6221,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec7a2a501ed189703dba8b08142f057e887dfc4b2cc4db2d343ac6376ba3e0b9"
[[package]]
+name = "xz2"
+version = "0.1.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "388c44dc09d76f1536602ead6d325eb532f5c122f17782bd57fb47baeeb767e2"
+dependencies = [
+ "lzma-sys",
+]
+
+[[package]]
name = "yazi"
-version = "0.1.6"
+version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c94451ac9513335b5e23d7a8a2b61a7102398b8cca5160829d313e84c9d98be1"
+checksum = "e01738255b5a16e78bbb83e7fbba0a1e7dd506905cfc53f4622d89015a03fbb5"
[[package]]
name = "yoke"
@@ -6087,9 +6325,9 @@ dependencies = [
[[package]]
name = "zeno"
-version = "0.2.3"
+version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dd15f8e0dbb966fd9245e7498c7e9e5055d9e5c8b676b95bd67091cd11a1e697"
+checksum = "cc0de2315dc13d00e5df3cd6b8d2124a6eaec6a2d4b6a1c5f37b7efad17fcc17"
[[package]]
name = "zerocopy"
@@ -6097,8 +6335,16 @@ version = "0.7.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0"
dependencies = [
- "byteorder",
- "zerocopy-derive",
+ "zerocopy-derive 0.7.35",
+]
+
+[[package]]
+name = "zerocopy"
+version = "0.8.24"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2586fea28e186957ef732a5f8b3be2da217d65c5969d4b1e17f973ebbe876879"
+dependencies = [
+ "zerocopy-derive 0.8.24",
]
[[package]]
@@ -6113,19 +6359,30 @@ dependencies = [
]
[[package]]
+name = "zerocopy-derive"
+version = "0.8.24"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a996a8f63c5c4448cd959ac1bab0aaa3306ccfd060472f85943ee0750f0169be"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
name = "zerofrom"
-version = "0.1.5"
+version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e"
+checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5"
dependencies = [
"zerofrom-derive",
]
[[package]]
name = "zerofrom-derive"
-version = "0.1.5"
+version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808"
+checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502"
dependencies = [
"proc-macro2",
"quote",
@@ -6177,9 +6434,9 @@ dependencies = [
[[package]]
name = "zip"
-version = "2.2.2"
+version = "2.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ae9c1ea7b3a5e1f4b922ff856a129881167511563dc219869afe3787fc0c1a45"
+checksum = "fabe6324e908f85a1c52063ce7aa26b68dcb7eb6dbc83a2d148403c9bc3eba50"
dependencies = [
"aes",
"arbitrary",
@@ -6190,15 +6447,16 @@ dependencies = [
"deflate64",
"displaydoc",
"flate2",
+ "getrandom 0.3.2",
"hmac",
"indexmap",
"lzma-rs",
"memchr",
"pbkdf2",
- "rand",
"sha1",
- "thiserror 2.0.11",
+ "thiserror 2.0.12",
"time",
+ "xz2",
"zeroize",
"zopfli",
"zstd",
@@ -6229,18 +6487,18 @@ dependencies = [
[[package]]
name = "zstd-safe"
-version = "7.2.3"
+version = "7.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f3051792fbdc2e1e143244dc28c60f73d8470e93f3f9cbd0ead44da5ed802722"
+checksum = "8f49c4d5f0abb602a93fb8736af2a4f4dd9512e36f7f570d66e65ff867ed3b9d"
dependencies = [
"zstd-sys",
]
[[package]]
name = "zstd-sys"
-version = "2.0.14+zstd.1.5.7"
+version = "2.0.15+zstd.1.5.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8fb060d4926e4ac3a3ad15d864e99ceb5f343c6b34f5bd6d81ae6ed417311be5"
+checksum = "eb81183ddd97d0c74cedf1d50d85c8d08c1b8b68ee863bdee9e706eedba1a237"
dependencies = [
"cc",
"pkg-config",
diff --git a/Cargo.toml b/Cargo.toml
index c071357..6110c21 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -13,6 +13,7 @@ rust-version = "1.85.0"
[dependencies]
iced.workspace = true
iced_anim = { git = "https://github.com/pml68/iced_anim", features = ["derive"] }
+iced_custom_highlighter = { git = "https://github.com/pml68/iced_custom_highlighter", branch = "master" }
iced_drop = { path = "iced_drop" }
serde = { version = "1.0.217", features = ["derive"] }
serde_json = "1.0.138"
@@ -26,14 +27,10 @@ thiserror = "2.0.11"
dirs-next = "2.0.0"
[workspace.dependencies.iced]
-git = "https://github.com/iced-rs/iced"
-rev = "97f1db3783dca5a4f60a9f89668613de4dfe9edd"
+git = "https://github.com/pml68/iced"
+branch = "feat/rehighlight-on-redraw"
features = ["image", "svg", "advanced", "tokio"]
-[dependencies.iced_custom_highlighter]
-git = "https://github.com/pml68/iced_custom_highlighter"
-branch = "fix/temp-update-on-theme-changed"
-
[build-dependencies]
iced_fontello = "0.13.2"
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 0000000..073c1cb
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,49 @@
+# Maintainer: pml68 <contact@pml68.dev>
+
+pkgname=iced-builder
+_pkgver=0.1.0
+pkgver=0.1.0.g256e3ba
+pkgrel=1
+pkgdesc='UI builder for iced, built with iced.'
+arch=(x86_64)
+url='https://github.com/pml68/iced-builder'
+license=('GPL-3.0-or-later')
+depends=(
+ gcc-libs
+ glibc
+ gtk3
+ rustfmt
+)
+makedepends=(
+ git
+ cargo
+)
+options=('!lto' '!debug')
+source=("$pkgname::git+${url}.git")
+sha256sums=('SKIP')
+
+prepare() {
+ cd "${pkgname}"
+
+ export RUSTUP_TOOLCHAIN=stable
+ cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
+}
+
+pkgver() {
+ cd "${pkgname}"
+ echo "${_pkgver}.g$(git describe --always --exclude='*')"
+}
+
+build() {
+ cd "${pkgname}"
+
+ export RUSTUP_TOOLCHAIN=stable
+ export CARGO_TARGET_DIR=target
+ cargo build --frozen --release
+}
+
+package() {
+ cd "${pkgname}"
+
+ install -Dm755 "target/release/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
+}
diff --git a/TODO.md b/TODO.md
new file mode 100644
index 0000000..664931a
--- /dev/null
+++ b/TODO.md
@@ -0,0 +1,2 @@
+- [ ] Make Designer view more usable
+- [ ] Rework options backend to work on-project-load
diff --git a/build.rs b/build.rs
index 438ce37..d1a02af 100644
--- a/build.rs
+++ b/build.rs
@@ -1,4 +1,54 @@
+// (c) 2023 Cory Forsstrom
+// (c) 2024-2025 Polesznyák Márk László
+
+use std::path::Path;
+use std::process::Command;
+
fn main() {
+ let git_hash = Command::new("git")
+ .args(["describe", "--always", "--dirty", "--exclude='*'"])
+ .output()
+ .ok()
+ .filter(|output| output.status.success())
+ .and_then(|x| String::from_utf8(x.stdout).ok());
+
+ if let Some(hash) = git_hash.as_ref() {
+ println!("cargo:rustc-env=GIT_HASH={}", hash);
+ }
+
+ if git_hash.is_none() {
+ return;
+ }
+
+ let Some(git_dir): Option<String> = Command::new("git")
+ .args(["rev-parse", "--git-dir"])
+ .output()
+ .ok()
+ .filter(|output| output.status.success())
+ .and_then(|x| String::from_utf8(x.stdout).ok())
+ else {
+ return;
+ };
+
+ let head = Path::new(&git_dir).join("HEAD");
+ if head.exists() {
+ println!("cargo:rerun-if-changed={}", head.display());
+ }
+
+ let Some(head_ref): Option<String> = Command::new("git")
+ .args(["symbolic-ref", "HEAD"])
+ .output()
+ .ok()
+ .filter(|output| output.status.success())
+ .and_then(|x| String::from_utf8(x.stdout).ok())
+ else {
+ return;
+ };
+ let head_ref = Path::new(&git_dir).join(head_ref);
+ if head_ref.exists() {
+ println!("cargo:rerun-if-changed={}", head_ref.display());
+ }
+
println!("cargo::rerun-if-changed=fonts/icons.toml");
iced_fontello::build("fonts/icons.toml").expect("Build icons font");
#[cfg(windows)]
diff --git a/src/config.rs b/src/config.rs
index 975437f..1da1239 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -1,3 +1,6 @@
+// (c) 2022-2024 Cory Forsstrom, Casper Rogild Storm, Calvin Lee, Andrew Baldwin, Reza Alizadeh Majd
+// (c) 2024-2025 Polesznyák Márk László
+
use std::path::PathBuf;
use serde::Deserialize;
diff --git a/src/dialogs.rs b/src/dialogs.rs
index 2d916b1..5954ff5 100644
--- a/src/dialogs.rs
+++ b/src/dialogs.rs
@@ -1,21 +1,26 @@
-use rfd::{MessageButtons, MessageDialog, MessageDialogResult, MessageLevel};
+use rfd::{
+ AsyncMessageDialog, MessageButtons, MessageDialog, MessageDialogResult,
+ MessageLevel,
+};
-pub fn error_dialog(description: impl Into<String>) {
- let _ = MessageDialog::new()
+pub async fn error_dialog(description: impl Into<String>) {
+ let _ = AsyncMessageDialog::new()
.set_level(MessageLevel::Error)
.set_buttons(MessageButtons::Ok)
.set_title("Oops! Something went wrong.")
.set_description(description)
- .show();
+ .show()
+ .await;
}
-pub fn warning_dialog(description: impl Into<String>) {
- let _ = MessageDialog::new()
+pub async fn warning_dialog(description: impl Into<String>) {
+ let _ = AsyncMessageDialog::new()
.set_level(MessageLevel::Warning)
.set_buttons(MessageButtons::Ok)
.set_title("Heads up!")
.set_description(description)
- .show();
+ .show()
+ .await;
}
pub fn unsaved_changes_dialog(description: impl Into<String>) -> bool {
diff --git a/src/environment.rs b/src/environment.rs
index 1ebb81b..8efc425 100644
--- a/src/environment.rs
+++ b/src/environment.rs
@@ -1,7 +1,20 @@
+// (c) 2023-2025 Cory Forsstrom, Casper Rogild Storm
+// (c) 2024-2025 Polesznyák Márk László
+
use std::env;
use std::path::PathBuf;
pub const CONFIG_FILE_NAME: &str = "config.toml";
+pub const VERSION: &str = env!("CARGO_PKG_VERSION");
+pub const GIT_HASH: Option<&str> = option_env!("GIT_HASH");
+
+pub fn formatted_version() -> String {
+ let hash = GIT_HASH
+ .map(|hash| format!(" ({hash})"))
+ .unwrap_or_default();
+
+ format!("{}{hash}", VERSION)
+}
pub fn config_dir() -> PathBuf {
portable_dir().unwrap_or_else(platform_specific_config_dir)
diff --git a/src/error.rs b/src/error.rs
index 002a1fc..9e1ee9d 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -7,16 +7,16 @@ use thiserror::Error;
#[error(transparent)]
pub enum Error {
IO(Arc<io::Error>),
- #[error("config does not exist")]
+ #[error("Config does not exist")]
ConfigMissing,
#[error("JSON parsing error: {0}")]
SerdeJSON(Arc<serde_json::Error>),
#[error("TOML parsing error: {0}")]
SerdeTOML(#[from] toml::de::Error),
RustFmt(Arc<rust_format::Error>),
- #[error("the element tree contains no matching element")]
+ #[error("The element tree contains no matching element")]
NonExistentElement,
- #[error("the file dialog has been closed without selecting a valid option")]
+ #[error("The file dialog has been closed without selecting a valid option")]
DialogClosed,
#[error("{0}")]
Other(String),
diff --git a/src/main.rs b/src/main.rs
index 13510b9..336378e 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -4,19 +4,21 @@ mod environment;
mod error;
#[allow(clippy::all, dead_code)]
mod icon;
+mod options;
mod panes;
mod theme;
mod types;
+mod values;
mod widget;
use std::path::PathBuf;
+use std::sync::Arc;
use config::Config;
use dialogs::{error_dialog, unsaved_changes_dialog, warning_dialog};
use error::Error;
use iced::advanced::widget::Id;
-use iced::widget::pane_grid::{self, Pane, PaneGrid};
-use iced::widget::{Column, container, pick_list, row, text_editor};
+use iced::widget::{Column, container, pane_grid, pick_list, row, text_editor};
use iced::{Alignment, Element, Length, Task, Theme, clipboard, keyboard};
use iced_anim::transition::Easing;
use iced_anim::{Animated, Animation};
@@ -25,13 +27,12 @@ use tokio::runtime;
use types::{Action, DesignerPane, ElementName, Message, Project};
fn main() -> Result<(), Box<dyn std::error::Error>> {
- let mut args = std::env::args();
- let _ = args.next();
-
- let version = args.next().is_some_and(|s| s == "--version" || s == "-V");
+ let version = std::env::args()
+ .nth(1)
+ .is_some_and(|s| s == "--version" || s == "-V");
if version {
- println!("{}", env!("CARGO_PKG_VERSION"));
+ println!("iced-builder {}", environment::formatted_version());
println!("{}", env!("CARGO_PKG_REPOSITORY"));
return Ok(());
@@ -59,10 +60,10 @@ struct App {
is_loading: bool,
project_path: Option<PathBuf>,
project: Project,
- config: Config,
+ config: Arc<Config>,
theme: Animated<Theme>,
pane_state: pane_grid::State<Panes>,
- focus: Option<Pane>,
+ focus: Option<pane_grid::Pane>,
designer_page: DesignerPane,
element_list: &'static [ElementName],
editor_content: text_editor::Content,
@@ -85,24 +86,25 @@ impl App {
},
);
- let config = config_load.unwrap_or_default();
+ let config = Arc::new(config_load.unwrap_or_default());
let theme = config.selected_theme();
- let mut task = Task::none();
-
- if let Some(path) = config.last_project.clone() {
+ let task = if let Some(path) = config.last_project.clone() {
if path.exists() && path.is_file() {
- task = Task::perform(
+ Task::perform(
Project::from_path(path, config.clone()),
Message::FileOpened,
- );
+ )
} else {
- warning_dialog(format!(
+ Task::future(warning_dialog(format!(
"The file {} does not exist, or isn't a file.",
path.to_string_lossy()
- ));
+ )))
+ .discard()
}
- }
+ } else {
+ Task::none()
+ };
(
Self {
@@ -146,32 +148,37 @@ impl App {
match message {
Message::SwitchTheme(event) => {
self.theme.update(event);
+
+ Task::none()
}
- Message::CopyCode => {
- return clipboard::write(self.editor_content.text());
+ Message::CopyCode => clipboard::write(self.editor_content.text()),
+ Message::SwitchPage(page) => {
+ self.designer_page = page;
+ Task::none()
}
- Message::SwitchPage(page) => self.designer_page = page,
Message::EditorAction(action) => {
if let text_editor::Action::Scroll { lines: _ } = action {
self.editor_content.perform(action);
}
+ Task::none()
}
Message::RefreshEditorContent => {
match self.project.app_code(&self.config) {
Ok(code) => {
self.editor_content =
text_editor::Content::with_text(&code);
+ Task::none()
}
- Err(error) => error_dialog(error),
+ Err(error) => Task::future(error_dialog(error)).discard(),
}
}
Message::DropNewElement(name, point, _) => {
- return iced_drop::zones_on_point(
+ iced_drop::zones_on_point(
move |zones| Message::HandleNew(name.clone(), zones),
point,
None,
None,
- );
+ )
}
Message::HandleNew(name, zones) => {
let ids: Vec<Id> = zones.into_iter().map(|z| z.0).collect();
@@ -182,25 +189,29 @@ impl App {
self.project.element_tree.as_mut(),
action,
);
+ self.is_dirty = true;
match result {
Ok(Some(ref element)) => {
self.project.element_tree = Some(element.clone());
}
- Err(error) => error_dialog(error),
+ Err(error) => {
+ return Task::future(error_dialog(error))
+ .map(|_| Message::RefreshEditorContent);
+ }
_ => {}
}
-
- self.is_dirty = true;
- return Task::done(Message::RefreshEditorContent);
+ Task::done(Message::RefreshEditorContent)
+ } else {
+ Task::none()
}
}
Message::MoveElement(element, point, _) => {
- return iced_drop::zones_on_point(
+ iced_drop::zones_on_point(
move |zones| Message::HandleMove(element.clone(), zones),
point,
None,
None,
- );
+ )
}
Message::HandleMove(element, zones) => {
let ids: Vec<Id> = zones.into_iter().map(|z| z.0).collect();
@@ -209,33 +220,38 @@ impl App {
let action = Action::new(
&ids,
eltree_clone.as_ref(),
- Some(element.get_id()),
+ Some(element.id()),
);
let result = element.handle_action(
self.project.element_tree.as_mut(),
action,
);
if let Err(error) = result {
- error_dialog(error);
+ return Task::future(error_dialog(error)).discard();
}
self.is_dirty = true;
- return Task::done(Message::RefreshEditorContent);
+ Task::done(Message::RefreshEditorContent)
+ } else {
+ Task::none()
}
}
Message::PaneResized(pane_grid::ResizeEvent { split, ratio }) => {
self.pane_state.resize(split, ratio);
+ Task::none()
}
Message::PaneClicked(pane) => {
self.focus = Some(pane);
+ Task::none()
}
Message::PaneDragged(pane_grid::DragEvent::Dropped {
pane,
target,
}) => {
self.pane_state.drop(pane, target);
+ Task::none()
}
- Message::PaneDragged(_) => {}
+ Message::PaneDragged(_) => Task::none(),
Message::NewFile => {
if !self.is_loading {
if !self.is_dirty {
@@ -251,26 +267,32 @@ impl App {
self.editor_content = text_editor::Content::new();
}
}
+
+ Task::none()
}
Message::OpenFile => {
if !self.is_loading {
if !self.is_dirty {
self.is_loading = true;
- return Task::perform(
+ Task::perform(
Project::from_file(self.config.clone()),
Message::FileOpened,
- );
+ )
} else if unsaved_changes_dialog(
"You have unsaved changes. Do you wish to discard these and open another project?",
) {
self.is_dirty = false;
self.is_loading = true;
- return Task::perform(
+ Task::perform(
Project::from_file(self.config.clone()),
Message::FileOpened,
- );
+ )
+ } else {
+ Task::none()
}
+ } else {
+ Task::none()
}
}
Message::FileOpened(result) => {
@@ -281,31 +303,35 @@ impl App {
Ok((path, project)) => {
self.project = project;
self.project_path = Some(path);
- return Task::done(Message::RefreshEditorContent);
+ Task::done(Message::RefreshEditorContent)
}
- Err(error) => error_dialog(error),
+ Err(error) => Task::future(error_dialog(error)).discard(),
}
}
Message::SaveFile => {
if !self.is_loading {
self.is_loading = true;
- return Task::perform(
+ Task::perform(
self.project
.clone()
.write_to_file(self.project_path.clone()),
Message::FileSaved,
- );
+ )
+ } else {
+ Task::none()
}
}
Message::SaveFileAs => {
if !self.is_loading {
self.is_loading = true;
- return Task::perform(
+ Task::perform(
self.project.clone().write_to_file(None),
Message::FileSaved,
- );
+ )
+ } else {
+ Task::none()
}
}
Message::FileSaved(result) => {
@@ -315,13 +341,12 @@ impl App {
Ok(path) => {
self.project_path = Some(path);
self.is_dirty = false;
+ Task::none()
}
- Err(error) => error_dialog(error),
+ Err(error) => Task::future(error_dialog(error)).discard(),
}
}
}
-
- Task::none()
}
fn subscription(&self) -> iced::Subscription<Message> {
@@ -354,8 +379,9 @@ impl App {
|theme| Message::SwitchTheme(theme.into())
)]
.width(200);
- let pane_grid =
- PaneGrid::new(&self.pane_state, |id, pane, _is_maximized| {
+ let pane_grid = pane_grid::PaneGrid::new(
+ &self.pane_state,
+ |id, pane, _is_maximized| {
let is_focused = Some(id) == self.focus;
match pane {
Panes::Designer => match &self.designer_page {
@@ -364,23 +390,22 @@ impl App {
self.project.get_theme(&self.config),
is_focused,
),
- DesignerPane::CodeView => code_view::view(
- &self.editor_content,
- self.theme.value().clone(),
- is_focused,
- ),
+ DesignerPane::CodeView => {
+ code_view::view(&self.editor_content, is_focused)
+ }
},
Panes::ElementList => {
element_list::view(self.element_list, is_focused)
}
}
- })
- .width(Length::Fill)
- .height(Length::Fill)
- .spacing(10)
- .on_resize(10, Message::PaneResized)
- .on_click(Message::PaneClicked)
- .on_drag(Message::PaneDragged);
+ },
+ )
+ .width(Length::Fill)
+ .height(Length::Fill)
+ .spacing(10)
+ .on_resize(10, Message::PaneResized)
+ .on_click(Message::PaneClicked)
+ .on_drag(Message::PaneDragged);
let content = Column::new()
.push(header)
diff --git a/src/options.rs b/src/options.rs
new file mode 100644
index 0000000..2dc25d7
--- /dev/null
+++ b/src/options.rs
@@ -0,0 +1,334 @@
+use std::collections::BTreeMap;
+use std::str::FromStr;
+
+use iced::widget::text::LineHeight;
+#[allow(unused_imports)]
+use iced::widget::{Button, Column, Container, Image, Row, Svg, Text};
+use iced::{Alignment, ContentFit, Length, Padding, Pixels, Rotation};
+
+use crate::values::Value;
+
+pub trait ApplyOptions {
+ fn apply_options(self, options: BTreeMap<String, Option<String>>) -> Self;
+}
+
+impl<Message> ApplyOptions for Button<'_, Message> {
+ fn apply_options(self, options: BTreeMap<String, Option<String>>) -> Self {
+ let mut button = self;
+
+ if let Some(width) = options.get("width").expect("width key") {
+ let width = Length::from_str(width).unwrap();
+ button = button.width(width);
+ }
+
+ if let Some(height) = options.get("height").expect("height key") {
+ let height = Length::from_str(height).unwrap();
+ button = button.height(height);
+ }
+
+ if let Some(padding) = options.get("padding").expect("padding key") {
+ let padding = Padding::from_str(padding).unwrap();
+ button = button.padding(padding);
+ }
+
+ if let Some(clip) = options.get("clip").expect("clip key") {
+ let clip = bool::from_str(clip).unwrap();
+ button = button.clip(clip);
+ }
+
+ button
+ }
+}
+
+impl ApplyOptions for Text<'_> {
+ fn apply_options(self, options: BTreeMap<String, Option<String>>) -> Self {
+ let mut text = self;
+
+ if let Some(size) = options.get("size").expect("size key") {
+ let size = Pixels::from_str(size).unwrap();
+ text = text.size(size);
+ }
+
+ if let Some(line_height) =
+ options.get("line_height").expect("line_height key")
+ {
+ let line_height = LineHeight::from_str(line_height).unwrap();
+ text = text.line_height(line_height);
+ }
+
+ if let Some(width) = options.get("width").expect("width key") {
+ let width = Length::from_str(width).unwrap();
+ text = text.width(width);
+ }
+
+ if let Some(height) = options.get("height").expect("height key") {
+ let height = Length::from_str(height).unwrap();
+ text = text.height(height);
+ }
+
+ if let Some(align_x) = options.get("align_x").expect("align_x key") {
+ let align_x = Alignment::from_str(align_x).unwrap();
+ text = text.align_x(align_x);
+ }
+
+ if let Some(align_y) = options.get("align_y").expect("align_y key") {
+ let align_y = Alignment::from_str(align_y).unwrap();
+ text = text.align_y(align_y);
+ }
+
+ text
+ }
+}
+
+impl<Message> ApplyOptions for Container<'_, Message> {
+ fn apply_options(self, options: BTreeMap<String, Option<String>>) -> Self {
+ let mut container = self;
+
+ if let Some(padding) = options.get("padding").expect("padding key") {
+ let padding = Padding::from_str(padding).unwrap();
+ container = container.padding(padding);
+ }
+
+ if let Some(width) = options.get("width").expect("width key") {
+ let width = Length::from_str(width).unwrap();
+ container = container.width(width);
+ }
+
+ if let Some(height) = options.get("height").expect("height key") {
+ let height = Length::from_str(height).unwrap();
+ container = container.height(height);
+ }
+
+ if let Some(max_width) =
+ options.get("max_width").expect("max_width key")
+ {
+ let max_width = Pixels::from_str(max_width).unwrap();
+ container = container.max_width(max_width);
+ }
+
+ if let Some(max_height) =
+ options.get("max_height").expect("max_height key")
+ {
+ let max_height = Pixels::from_str(max_height).unwrap();
+ container = container.max_height(max_height);
+ }
+
+ if let Some(center_x) = options.get("center_x").expect("center_x key") {
+ let center_x = Length::from_str(center_x).unwrap();
+ container = container.center_x(center_x);
+ }
+
+ if let Some(center_y) = options.get("center_y").expect("center_y key") {
+ let center_y = Length::from_str(center_y).unwrap();
+ container = container.center_y(center_y);
+ }
+
+ if let Some(center) = options.get("center").expect("center key") {
+ let center = Length::from_str(center).unwrap();
+ container = container.center(center);
+ }
+
+ if let Some(align_left) =
+ options.get("align_left").expect("align_left key")
+ {
+ let align_left = Length::from_str(align_left).unwrap();
+ container = container.align_left(align_left);
+ }
+
+ if let Some(align_right) =
+ options.get("align_right").expect("align_right key")
+ {
+ let align_right = Length::from_str(align_right).unwrap();
+ container = container.align_right(align_right);
+ }
+
+ if let Some(align_top) =
+ options.get("align_top").expect("align_top key")
+ {
+ let align_top = Length::from_str(align_top).unwrap();
+ container = container.align_top(align_top);
+ }
+
+ if let Some(align_bottom) =
+ options.get("align_bottom").expect("align_bottom key")
+ {
+ let align_bottom = Length::from_str(align_bottom).unwrap();
+ container = container.align_bottom(align_bottom);
+ }
+
+ if let Some(align_x) = options.get("align_x").expect("align_x key") {
+ let align_x = Alignment::from_str(align_x).unwrap();
+ container = container.align_x(align_x);
+ }
+
+ if let Some(align_y) = options.get("align_y").expect("align_y key") {
+ let align_y = Alignment::from_str(align_y).unwrap();
+ container = container.align_y(align_y);
+ }
+
+ if let Some(clip) = options.get("clip").expect("clip key") {
+ let clip = bool::from_str(clip).unwrap();
+ container = container.clip(clip);
+ }
+
+ container
+ }
+}
+
+impl<Message> ApplyOptions for Column<'_, Message> {
+ fn apply_options(self, options: BTreeMap<String, Option<String>>) -> Self {
+ let mut column = self;
+
+ if let Some(spacing) = options.get("spacing").expect("spacing key") {
+ let spacing = Pixels::from_str(spacing).unwrap();
+ column = column.spacing(spacing);
+ }
+
+ if let Some(padding) = options.get("padding").expect("padding key") {
+ let padding = Padding::from_str(padding).unwrap();
+ column = column.padding(padding);
+ }
+
+ if let Some(width) = options.get("width").expect("width key") {
+ let width = Length::from_str(width).unwrap();
+ column = column.width(width);
+ }
+
+ if let Some(height) = options.get("height").expect("height key") {
+ let height = Length::from_str(height).unwrap();
+ column = column.height(height);
+ }
+
+ if let Some(max_width) =
+ options.get("max_width").expect("max_width key")
+ {
+ let max_width = Pixels::from_str(max_width).unwrap();
+ column = column.max_width(max_width);
+ }
+
+ if let Some(align_x) = options.get("align_x").expect("align_x key") {
+ let align_x = Alignment::from_str(align_x).unwrap();
+ column = column.align_x(align_x);
+ }
+
+ if let Some(clip) = options.get("clip").expect("clip key") {
+ let clip = bool::from_str(clip).unwrap();
+ column = column.clip(clip);
+ }
+
+ column
+ }
+}
+
+impl<Message> ApplyOptions for Row<'_, Message> {
+ fn apply_options(self, options: BTreeMap<String, Option<String>>) -> Self {
+ let mut row = self;
+
+ if let Some(spacing) = options.get("spacing").expect("spacing key") {
+ let spacing = Pixels::from_str(spacing).unwrap();
+ row = row.spacing(spacing);
+ }
+
+ if let Some(padding) = options.get("padding").expect("padding key") {
+ let padding = Padding::from_str(padding).unwrap();
+ row = row.padding(padding);
+ }
+
+ if let Some(width) = options.get("width").expect("width key") {
+ let width = Length::from_str(width).unwrap();
+ row = row.width(width);
+ }
+
+ if let Some(height) = options.get("height").expect("height key") {
+ let height = Length::from_str(height).unwrap();
+ row = row.height(height);
+ }
+
+ if let Some(align_y) = options.get("align_y").expect("align_y key") {
+ let align_y = Alignment::from_str(align_y).unwrap();
+ row = row.align_y(align_y);
+ }
+
+ if let Some(clip) = options.get("clip").expect("clip key") {
+ let clip = bool::from_str(clip).unwrap();
+ row = row.clip(clip);
+ }
+
+ row
+ }
+}
+
+impl<Handle> ApplyOptions for Image<Handle> {
+ fn apply_options(self, options: BTreeMap<String, Option<String>>) -> Self {
+ let mut image = self;
+
+ if let Some(width) = options.get("width").expect("width key") {
+ let width = Length::from_str(width).unwrap();
+ image = image.width(width);
+ }
+
+ if let Some(height) = options.get("height").expect("height key") {
+ let height = Length::from_str(height).unwrap();
+ image = image.height(height);
+ }
+
+ if let Some(content_fit) =
+ options.get("content_fit").expect("content_fit key")
+ {
+ let content_fit = ContentFit::from_str(content_fit).unwrap();
+ image = image.content_fit(content_fit);
+ }
+
+ if let Some(rotation) = options.get("rotation").expect("rotation key") {
+ let rotation = Rotation::from_str(rotation).unwrap();
+ image = image.rotation(rotation);
+ }
+
+ if let Some(opacity) = options.get("opacity").expect("opacity key") {
+ let opacity = f32::from_str(opacity).unwrap();
+ image = image.opacity(opacity);
+ }
+
+ if let Some(scale) = options.get("scale").expect("scale key") {
+ let scale = f32::from_str(scale).unwrap();
+ image = image.scale(scale);
+ }
+
+ image
+ }
+}
+
+impl ApplyOptions for Svg<'_> {
+ fn apply_options(self, options: BTreeMap<String, Option<String>>) -> Self {
+ let mut svg = self;
+
+ if let Some(width) = options.get("width").expect("width key") {
+ let width = Length::from_str(width).unwrap();
+ svg = svg.width(width);
+ }
+
+ if let Some(height) = options.get("height").expect("height key") {
+ let height = Length::from_str(height).unwrap();
+ svg = svg.height(height);
+ }
+
+ if let Some(content_fit) =
+ options.get("content_fit").expect("content_fit key")
+ {
+ let content_fit = ContentFit::from_str(content_fit).unwrap();
+ svg = svg.content_fit(content_fit);
+ }
+
+ if let Some(rotation) = options.get("rotation").expect("rotation key") {
+ let rotation = Rotation::from_str(rotation).unwrap();
+ svg = svg.rotation(rotation);
+ }
+
+ if let Some(opacity) = options.get("opacity").expect("opacity key") {
+ let opacity = f32::from_str(opacity).unwrap();
+ svg = svg.opacity(opacity);
+ }
+
+ svg
+ }
+}
diff --git a/src/panes/code_view.rs b/src/panes/code_view.rs
index e133078..551347c 100644
--- a/src/panes/code_view.rs
+++ b/src/panes/code_view.rs
@@ -20,7 +20,6 @@ fn highlight_style(theme: &Theme, scope: &Scope) -> Format<Font> {
pub fn view(
editor_content: &text_editor::Content,
- theme: Theme,
is_focused: bool,
) -> pane_grid::Content<'_, Message> {
let title = row![
@@ -47,7 +46,7 @@ pub fn view(
.on_action(Message::EditorAction)
.font(Font::MONOSPACE)
.highlight_with::<Highlighter>(
- Settings::new(vec![], highlight_style, theme, "rs"),
+ Settings::new(vec![], highlight_style, "rs"),
Highlight::to_format,
)
.style(|theme, _| {
diff --git a/src/types.rs b/src/types.rs
index 2b743cd..73728e3 100644
--- a/src/types.rs
+++ b/src/types.rs
@@ -5,7 +5,7 @@ pub mod rendered_element;
use std::path::PathBuf;
pub use element_name::ElementName;
-use iced::Theme;
+use iced::advanced::widget::Id;
use iced::widget::{pane_grid, text_editor};
use iced_anim::Event;
pub use project::Project;
@@ -15,21 +15,15 @@ use crate::Error;
#[derive(Debug, Clone)]
pub enum Message {
- SwitchTheme(Event<Theme>),
+ SwitchTheme(Event<iced::Theme>),
CopyCode,
SwitchPage(DesignerPane),
EditorAction(text_editor::Action),
RefreshEditorContent,
DropNewElement(ElementName, iced::Point, iced::Rectangle),
- HandleNew(
- ElementName,
- Vec<(iced::advanced::widget::Id, iced::Rectangle)>,
- ),
+ HandleNew(ElementName, Vec<(Id, iced::Rectangle)>),
MoveElement(RenderedElement, iced::Point, iced::Rectangle),
- HandleMove(
- RenderedElement,
- Vec<(iced::advanced::widget::Id, iced::Rectangle)>,
- ),
+ HandleMove(RenderedElement, Vec<(Id, iced::Rectangle)>),
PaneResized(pane_grid::ResizeEvent),
PaneClicked(pane_grid::Pane),
PaneDragged(pane_grid::DragEvent),
diff --git a/src/types/project.rs b/src/types/project.rs
index e665d5e..721783e 100644
--- a/src/types/project.rs
+++ b/src/types/project.rs
@@ -1,4 +1,5 @@
use std::path::{Path, PathBuf};
+use std::sync::Arc;
extern crate fxhash;
use fxhash::FxHashMap;
@@ -58,7 +59,7 @@ impl Project {
pub async fn from_path(
path: PathBuf,
- config: Config,
+ config: Arc<Config>,
) -> Result<(PathBuf, Self), Error> {
let contents = tokio::fs::read_to_string(&path).await?;
let mut project: Self = serde_json::from_str(&contents)?;
@@ -68,7 +69,9 @@ impl Project {
Ok((path, project))
}
- pub async fn from_file(config: Config) -> Result<(PathBuf, Self), Error> {
+ pub async fn from_file(
+ config: Arc<Config>,
+ ) -> Result<(PathBuf, Self), Error> {
let picked_file = rfd::AsyncFileDialog::new()
.set_title("Open a JSON file...")
.add_filter("*.json, *.JSON", &["json", "JSON"])
diff --git a/src/types/rendered_element.rs b/src/types/rendered_element.rs
index e321449..ee3def8 100755
--- a/src/types/rendered_element.rs
+++ b/src/types/rendered_element.rs
@@ -4,9 +4,9 @@ use iced::advanced::widget::Id;
use iced::{Element, Length, widget};
use serde::{Deserialize, Serialize};
-use super::ElementName;
use crate::Error;
-use crate::types::Message;
+use crate::options::ApplyOptions;
+use crate::types::{ElementName, Message};
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct RenderedElement {
@@ -36,12 +36,12 @@ impl RenderedElement {
}
}
- pub fn get_id(&self) -> &Id {
+ pub fn id(&self) -> &Id {
&self.id
}
pub fn find_by_id(&mut self, id: &Id) -> Option<&mut Self> {
- if self.get_id() == id {
+ if self.id() == id {
Some(self)
} else if let Some(child_elements) = self.child_elements.as_mut() {
for element in child_elements {
@@ -111,7 +111,7 @@ impl RenderedElement {
pub fn insert_after(&mut self, id: &Id, element: &RenderedElement) {
if let Some(child_elements) = self.child_elements.as_mut() {
if let Some(index) =
- child_elements.iter().position(|x| x.get_id() == id)
+ child_elements.iter().position(|x| x.id() == id)
{
child_elements.insert(index + 1, element.clone());
} else {
@@ -158,25 +158,25 @@ impl RenderedElement {
fn preset_options(mut self, options: &[&str]) -> Self {
for opt in options {
- let _ = self.options.insert(opt.to_string(), None);
+ let _ = self.options.insert((*opt).to_string(), None);
}
self
}
- pub fn option<'a>(mut self, option: &'a str, value: &'a str) -> Self {
+ pub fn option(mut self, option: String, value: String) -> Self {
let _ = self
.options
- .entry(option.to_owned())
- .and_modify(|opt| *opt = Some(value.to_owned()));
+ .entry(option)
+ .and_modify(|opt| *opt = Some(value));
self
}
- pub fn into_element<'a>(self) -> Element<'a, Message> {
+ pub fn text_view<'a>(self) -> Element<'a, Message> {
let mut children = widget::column![];
if let Some(els) = self.child_elements.clone() {
for el in els {
- children = children.push(el.clone().into_element());
+ children = children.push(el.clone().text_view());
}
}
iced_drop::droppable(
@@ -191,7 +191,7 @@ impl RenderedElement {
.padding(10)
.style(widget::container::bordered_box),
)
- .id(self.get_id().clone())
+ .id(self.id().clone())
.drag_hide(true)
.on_drop(move |point, rect| {
Message::MoveElement(self.clone(), point, rect)
@@ -313,28 +313,34 @@ impl std::fmt::Display for RenderedElement {
impl<'a> From<RenderedElement> for Element<'a, Message> {
fn from(value: RenderedElement) -> Self {
- let child_elements = match value.child_elements {
- Some(ref elements) => elements.clone(),
- None => vec![],
- };
+ let copy = value.clone();
+ let child_elements = copy.child_elements.unwrap_or_default();
- let content: Element<'a, Message> = match value.name.clone() {
+ let content: Element<'a, Message> = match copy.name {
ElementName::Text(s) => {
- if s == String::new() {
+ if s.is_empty() {
widget::text("New Text").into()
} else {
widget::text(s).into()
}
}
ElementName::Button(s) => {
- if s == String::new() {
- widget::button(widget::text("New Button")).into()
+ if s.is_empty() {
+ widget::button(widget::text("New Button"))
+ .apply_options(copy.options)
+ .into()
} else {
- widget::button(widget::text(s)).into()
+ widget::button(widget::text(s))
+ .apply_options(copy.options)
+ .into()
}
}
- ElementName::Svg(p) => widget::svg(p).into(),
- ElementName::Image(p) => widget::image(p).into(),
+ ElementName::Svg(p) => {
+ widget::svg(p).apply_options(copy.options).into()
+ }
+ ElementName::Image(p) => {
+ widget::image(p).apply_options(copy.options).into()
+ }
ElementName::Container => {
widget::container(if child_elements.len() == 1 {
child_elements[0].clone().into()
@@ -348,15 +354,17 @@ impl<'a> From<RenderedElement> for Element<'a, Message> {
child_elements.into_iter().map(Into::into).collect(),
)
.padding(20)
+ .apply_options(copy.options)
.into(),
ElementName::Column => widget::Column::from_vec(
child_elements.into_iter().map(Into::into).collect(),
)
.padding(20)
+ .apply_options(copy.options)
.into(),
};
iced_drop::droppable(content)
- .id(value.get_id().clone())
+ .id(value.id().clone())
.drag_hide(true)
.on_drop(move |point, rect| {
Message::MoveElement(value.clone(), point, rect)
@@ -433,19 +441,35 @@ pub fn text(text: &str) -> RenderedElement {
"line_height",
"width",
"height",
+ "align_x",
+ "align_y",
])
}
pub fn button(text: &str) -> RenderedElement {
RenderedElement::new(ElementName::Button(text.to_owned()))
+ .preset_options(&["width", "height", "padding", "clip"])
}
pub fn svg(path: &str) -> RenderedElement {
- RenderedElement::new(ElementName::Svg(path.to_owned()))
+ RenderedElement::new(ElementName::Svg(path.to_owned())).preset_options(&[
+ "width",
+ "height",
+ "content_fit",
+ "rotation",
+ "opacity",
+ ])
}
pub fn image(path: &str) -> RenderedElement {
- RenderedElement::new(ElementName::Image(path.to_owned()))
+ RenderedElement::new(ElementName::Image(path.to_owned())).preset_options(&[
+ "width",
+ "height",
+ "content_fit",
+ "rotation",
+ "opacity",
+ "scale",
+ ])
}
pub fn container(content: Option<RenderedElement>) -> RenderedElement {
@@ -453,10 +477,30 @@ pub fn container(content: Option<RenderedElement>) -> RenderedElement {
Some(el) => RenderedElement::with(ElementName::Container, vec![el]),
None => RenderedElement::with(ElementName::Container, vec![]),
}
+ .preset_options(&[
+ "padding",
+ "width",
+ "height",
+ "max_width",
+ "max_height",
+ "center_x",
+ "center_y",
+ "center",
+ "align_left",
+ "align_right",
+ "align_top",
+ "align_bottom",
+ "align_x",
+ "align_y",
+ "clip",
+ ])
}
pub fn row(child_elements: Option<Vec<RenderedElement>>) -> RenderedElement {
RenderedElement::with(ElementName::Row, child_elements.unwrap_or_default())
+ .preset_options(&[
+ "spacing", "padding", "width", "height", "align_y", "clip",
+ ])
}
pub fn column(child_elements: Option<Vec<RenderedElement>>) -> RenderedElement {
@@ -464,4 +508,13 @@ pub fn column(child_elements: Option<Vec<RenderedElement>>) -> RenderedElement {
ElementName::Column,
child_elements.unwrap_or_default(),
)
+ .preset_options(&[
+ "spacing",
+ "padding",
+ "width",
+ "height",
+ "max_width",
+ "align_x",
+ "clip",
+ ])
}
diff --git a/src/values.rs b/src/values.rs
new file mode 100644
index 0000000..d2dae74
--- /dev/null
+++ b/src/values.rs
@@ -0,0 +1,17 @@
+mod alignment;
+mod content_fit;
+mod length;
+mod line_height;
+mod padding;
+mod pixels;
+mod rotation;
+
+pub trait Value: Sized {
+ type Err;
+
+ fn from_str(s: &str) -> Result<Self, Self::Err>;
+
+ // TODO: remove this once RenderedElement's options field is redone
+ #[allow(dead_code)]
+ fn to_string(&self) -> String;
+}
diff --git a/src/values/alignment.rs b/src/values/alignment.rs
new file mode 100644
index 0000000..7e9fcab
--- /dev/null
+++ b/src/values/alignment.rs
@@ -0,0 +1,65 @@
+use iced::Alignment;
+
+use super::Value;
+
+#[derive(Debug, thiserror::Error, Clone, PartialEq)]
+pub enum ParseAlignmentError {
+ #[error("cannot parse rotation from empty string")]
+ Empty,
+ #[error("invalid variant")]
+ InvalidVariant,
+}
+
+impl Value for Alignment {
+ type Err = ParseAlignmentError;
+
+ fn from_str(s: &str) -> Result<Self, Self::Err> {
+ let s = s.trim();
+
+ if s.is_empty() {
+ return Err(ParseAlignmentError::Empty);
+ }
+
+ match s {
+ "start" => Ok(Self::Start),
+ "center" => Ok(Self::Center),
+ "end" => Ok(Self::End),
+ _ => Err(ParseAlignmentError::InvalidVariant),
+ }
+ }
+
+ fn to_string(&self) -> String {
+ match self {
+ Self::Start => String::from("start"),
+ Self::Center => String::from("center"),
+ Self::End => String::from("end"),
+ }
+ }
+}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+
+ #[test]
+ fn can_parse_with_spaces() {
+ assert_eq!(Alignment::from_str(" start"), Ok(Alignment::Start));
+
+ assert_eq!(Alignment::from_str(" center "), Ok(Alignment::Center));
+
+ assert_eq!(Alignment::from_str("end "), Ok(Alignment::End))
+ }
+
+ #[test]
+ fn cant_parse_invalid_variant() {
+ assert_eq!(
+ Alignment::from_str("middle"),
+ Err(ParseAlignmentError::InvalidVariant)
+ )
+ }
+
+ #[test]
+ fn cant_parse_empty_string() {
+ assert_eq!(Alignment::from_str(" "), Err(ParseAlignmentError::Empty))
+ }
+}
diff --git a/src/values/content_fit.rs b/src/values/content_fit.rs
new file mode 100644
index 0000000..053431f
--- /dev/null
+++ b/src/values/content_fit.rs
@@ -0,0 +1,69 @@
+use iced::ContentFit;
+
+use super::Value;
+
+#[derive(Debug, thiserror::Error, Clone, PartialEq)]
+pub enum ParseContentFitError {
+ #[error("invalid variant")]
+ InvalidVariant,
+}
+
+impl Value for ContentFit {
+ type Err = ParseContentFitError;
+
+ fn from_str(s: &str) -> Result<Self, Self::Err> {
+ let s = s.trim();
+
+ if s.is_empty() {
+ Ok(Self::default())
+ } else {
+ match s {
+ "fill" => Ok(Self::Fill),
+ "none" => Ok(Self::None),
+ "cover" => Ok(Self::Cover),
+ "contain" => Ok(Self::Contain),
+ "scale_down" => Ok(Self::ScaleDown),
+ _ => Err(ParseContentFitError::InvalidVariant),
+ }
+ }
+ }
+
+ fn to_string(&self) -> String {
+ match self {
+ Self::Fill => String::from("fill"),
+ Self::None => String::from("none"),
+ Self::Cover => String::from("cover"),
+ Self::Contain => String::from("contain"),
+ Self::ScaleDown => String::from("scale_down"),
+ }
+ }
+}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+
+ #[test]
+ fn can_parse_with_spaces() {
+ assert_eq!(ContentFit::from_str(" fill"), Ok(ContentFit::Fill));
+
+ assert_eq!(ContentFit::from_str(" none "), Ok(ContentFit::None));
+
+ assert_eq!(ContentFit::from_str("cover "), Ok(ContentFit::Cover));
+
+ assert_eq!(ContentFit::from_str("contain"), Ok(ContentFit::Contain));
+
+ assert_eq!(
+ ContentFit::from_str("scale_down"),
+ Ok(ContentFit::ScaleDown)
+ )
+ }
+
+ #[test]
+ fn cant_parse_invalid_variant() {
+ assert_eq!(
+ ContentFit::from_str("clip"),
+ Err(ParseContentFitError::InvalidVariant)
+ )
+ }
+}
diff --git a/src/values/length.rs b/src/values/length.rs
new file mode 100644
index 0000000..556f8ff
--- /dev/null
+++ b/src/values/length.rs
@@ -0,0 +1,145 @@
+use std::num::{ParseFloatError, ParseIntError};
+use std::str::FromStr;
+
+use iced::Length;
+
+use super::Value;
+
+#[derive(Debug, thiserror::Error, Clone, PartialEq)]
+pub enum ParseLengthError {
+ #[error("float parsing error: {0}")]
+ ParseFloatError(ParseFloatError),
+ #[error("int parsing error: {0}")]
+ ParseIntError(ParseIntError),
+ #[error("invalid type")]
+ InvalidType,
+ #[error("invalid prefix")]
+ InvalidPrefix,
+ #[error("missing prefix")]
+ MissingPrefix,
+ #[error("cannot parse length from empty string")]
+ Empty,
+}
+
+impl From<ParseFloatError> for ParseLengthError {
+ fn from(value: ParseFloatError) -> Self {
+ Self::ParseFloatError(value)
+ }
+}
+
+impl From<ParseIntError> for ParseLengthError {
+ fn from(value: ParseIntError) -> Self {
+ Self::ParseIntError(value)
+ }
+}
+
+impl Value for Length {
+ type Err = ParseLengthError;
+
+ fn from_str(s: &str) -> Result<Self, Self::Err> {
+ let s = s.trim();
+
+ if s.is_empty() {
+ return Err(ParseLengthError::Empty);
+ }
+
+ if !s.contains(|c: char| c.is_ascii_digit()) {
+ match s {
+ "fill" => Ok(Self::Fill),
+ "shrink" => Ok(Self::Shrink),
+ _ => Err(ParseLengthError::InvalidType),
+ }
+ } else {
+ if s.starts_with(|c: char| c.is_ascii_digit()) {
+ return Err(ParseLengthError::MissingPrefix);
+ }
+
+ let (prefix, value) = s.split_at(2);
+ match prefix.to_lowercase().as_str() {
+ "fx" => Ok(Self::Fixed(f32::from_str(value)?)),
+ "fp" => Ok(Self::FillPortion(u16::from_str(value)?)),
+ _ => Err(ParseLengthError::InvalidPrefix),
+ }
+ }
+ }
+
+ fn to_string(&self) -> String {
+ match self {
+ Self::Fill => String::from("fill"),
+ Self::Shrink => String::from("shrink"),
+ Self::Fixed(value) => format!("fx{}", value),
+ Self::FillPortion(value) => format!("fp{}", value),
+ }
+ }
+}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+
+ #[test]
+ fn can_parse_fill() {
+ assert_eq!(Length::from_str("fill"), Ok(Length::Fill))
+ }
+
+ #[test]
+ fn can_parse_shrink_with_space() {
+ assert_eq!(Length::from_str("shrink "), Ok(Length::Shrink))
+ }
+
+ #[test]
+ fn can_parse_fill_portion() {
+ assert_eq!(Length::from_str("fp15"), Ok(Length::FillPortion(15)))
+ }
+
+ #[test]
+ fn can_parse_fixed_with_spaces() {
+ assert_eq!(Length::from_str(" fx3.1 "), Ok(Length::Fixed(3.1)))
+ }
+
+ #[test]
+ fn cant_parse_invalid_type() {
+ assert_eq!(
+ Length::from_str("fillportion"),
+ Err(ParseLengthError::InvalidType)
+ )
+ }
+
+ #[test]
+ fn cant_parse_invalid_prefix() {
+ assert_eq!(
+ Length::from_str("f2.0"),
+ Err(ParseLengthError::InvalidPrefix),
+ )
+ }
+
+ #[test]
+ fn cant_parse_invalid_float() {
+ assert_eq!(
+ Length::from_str(" fx2.a"),
+ Err(ParseLengthError::ParseFloatError(
+ f32::from_str("2.a").expect_err("float parse should fail")
+ ))
+ )
+ }
+
+ #[test]
+ fn cant_parse_invalid_integer() {
+ assert_eq!(
+ Length::from_str("fp1a "),
+ Err(ParseLengthError::ParseIntError(
+ u16::from_str("1a").expect_err("integer parse should fail")
+ ))
+ )
+ }
+
+ #[test]
+ fn cant_parse_with_missing_prefix() {
+ assert_eq!(Length::from_str("24"), Err(ParseLengthError::MissingPrefix))
+ }
+
+ #[test]
+ fn cant_parse_empty_string() {
+ assert_eq!(Length::from_str(" "), Err(ParseLengthError::Empty))
+ }
+}
diff --git a/src/values/line_height.rs b/src/values/line_height.rs
new file mode 100644
index 0000000..0ea1524
--- /dev/null
+++ b/src/values/line_height.rs
@@ -0,0 +1,117 @@
+use std::num::ParseFloatError;
+use std::str::FromStr;
+
+use iced::Pixels;
+use iced::advanced::text::LineHeight;
+
+use super::Value;
+
+#[derive(Debug, thiserror::Error, Clone, PartialEq)]
+pub enum ParseLineHeightError {
+ #[error("float parsing error: {0}")]
+ ParseFloatError(ParseFloatError),
+ #[error("missing prefix")]
+ MissingPrefix,
+ #[error("invalid prefix")]
+ InvalidPrefix,
+ #[error("cannot parse line height from empty string")]
+ Empty,
+}
+
+impl From<ParseFloatError> for ParseLineHeightError {
+ fn from(value: ParseFloatError) -> Self {
+ Self::ParseFloatError(value)
+ }
+}
+
+impl Value for LineHeight {
+ type Err = ParseLineHeightError;
+
+ fn from_str(s: &str) -> Result<Self, Self::Err> {
+ let s = s.trim();
+
+ if s.is_empty() {
+ return Err(ParseLineHeightError::Empty);
+ }
+
+ if s.starts_with(|c: char| !c.is_ascii_digit()) {
+ let (prefix, value) = s.split_at(1);
+ match prefix.to_lowercase().as_str() {
+ "r" => Ok(Self::Relative(f32::from_str(value)?)),
+ "a" => Ok(Self::Absolute(Pixels::from_str(value)?)),
+ _ => Err(ParseLineHeightError::InvalidPrefix),
+ }
+ } else {
+ Err(ParseLineHeightError::MissingPrefix)
+ }
+ }
+
+ fn to_string(&self) -> String {
+ match self {
+ Self::Relative(value) => format!("r{}", value),
+ Self::Absolute(value) => format!("a{}", value.0),
+ }
+ }
+}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+
+ #[test]
+ fn can_parse_with_r_prefix() {
+ assert_eq!(
+ LineHeight::from_str(" r3.2"),
+ Ok(LineHeight::Relative(3.2))
+ );
+
+ assert_eq!(
+ LineHeight::from_str(" R6.5 "),
+ Ok(LineHeight::Relative(6.5))
+ )
+ }
+
+ #[test]
+ fn can_parse_with_a_prefix() {
+ assert_eq!(
+ LineHeight::from_str("a9.4 "),
+ Ok(LineHeight::Absolute(Pixels(9.4)))
+ );
+
+ assert_eq!(
+ LineHeight::from_str("A1.3"),
+ Ok(LineHeight::Absolute(Pixels(1.3)))
+ )
+ }
+
+ #[test]
+ fn cant_parse_with_missing_prefix() {
+ assert_eq!(
+ LineHeight::from_str("5.1"),
+ Err(ParseLineHeightError::MissingPrefix)
+ )
+ }
+
+ #[test]
+ fn cant_parse_invalid_prefix() {
+ assert_eq!(
+ LineHeight::from_str("g21"),
+ Err(ParseLineHeightError::InvalidPrefix)
+ )
+ }
+
+ #[test]
+ fn cant_parse_invalid_float() {
+ assert_eq!(
+ LineHeight::from_str("a2f"),
+ Err(ParseLineHeightError::ParseFloatError(
+ f32::from_str("2f").expect_err("float parse should fail")
+ ))
+ )
+ }
+
+ #[test]
+ fn cant_parse_empty_string() {
+ assert_eq!(LineHeight::from_str(" "), Err(ParseLineHeightError::Empty))
+ }
+}
diff --git a/src/values/padding.rs b/src/values/padding.rs
new file mode 100644
index 0000000..b6d3947
--- /dev/null
+++ b/src/values/padding.rs
@@ -0,0 +1,201 @@
+use std::num::ParseFloatError;
+use std::str::FromStr;
+
+use iced::Padding;
+
+use super::Value;
+
+#[derive(Debug, thiserror::Error, Clone, PartialEq)]
+pub enum ParsePaddingError {
+ #[error("wrong number of values: {0}, expected 1-4")]
+ WrongNumberOfValues(usize),
+ #[error("float parsing error: {0}")]
+ ParseFloatError(ParseFloatError),
+ #[error("missing bracket")]
+ MissingBracket,
+ #[error("cannot parse padding from empty string")]
+ Empty,
+}
+
+impl From<ParseFloatError> for ParsePaddingError {
+ fn from(value: ParseFloatError) -> Self {
+ Self::ParseFloatError(value)
+ }
+}
+
+impl Value for Padding {
+ type Err = ParsePaddingError;
+
+ fn from_str(s: &str) -> Result<Self, Self::Err> {
+ let s = s.trim();
+
+ if s.is_empty() {
+ return Err(ParsePaddingError::Empty);
+ }
+
+ if !s.contains(['[', ',', ']']) {
+ let value = f32::from_str(s)?;
+ Ok(Padding {
+ top: value,
+ right: value,
+ bottom: value,
+ left: value,
+ })
+ } else {
+ let values = s
+ .strip_prefix('[')
+ .and_then(|s| s.strip_suffix(']'))
+ .ok_or(ParsePaddingError::MissingBracket)?
+ .split(',')
+ .map(str::trim)
+ .map(f32::from_str)
+ .collect::<Result<Vec<_>, _>>()?;
+
+ match values.len() {
+ 1 => Ok(Padding {
+ top: values[0],
+ right: values[0],
+ bottom: values[0],
+ left: values[0],
+ }),
+ 2 => Ok(Padding {
+ top: values[0],
+ right: values[1],
+ bottom: values[0],
+ left: values[1],
+ }),
+ 3 => Ok(Padding {
+ top: values[0],
+ right: values[1],
+ bottom: values[2],
+ left: values[1],
+ }),
+ 4 => Ok(Padding {
+ top: values[0],
+ right: values[1],
+ bottom: values[2],
+ left: values[3],
+ }),
+ other => Err(ParsePaddingError::WrongNumberOfValues(other)),
+ }
+ }
+ }
+
+ fn to_string(&self) -> String {
+ format!(
+ "[{}, {}, {}, {}]",
+ self.top, self.right, self.bottom, self.left
+ )
+ }
+}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+
+ #[test]
+ fn can_parse_single_value() {
+ assert_eq!(
+ Padding::from_str("[1.5]"),
+ Ok(Padding {
+ top: 1.5,
+ right: 1.5,
+ bottom: 1.5,
+ left: 1.5,
+ }),
+ )
+ }
+
+ #[test]
+ fn can_parse_single_value_without_brackets() {
+ assert_eq!(
+ Padding::from_str("1.5"),
+ Ok(Padding {
+ top: 1.5,
+ right: 1.5,
+ bottom: 1.5,
+ left: 1.5,
+ }),
+ )
+ }
+
+ #[test]
+ fn can_parse_two_values() {
+ assert_eq!(
+ Padding::from_str("[3.2, 6.7]"),
+ Ok(Padding {
+ top: 3.2,
+ right: 6.7,
+ bottom: 3.2,
+ left: 6.7,
+ }),
+ )
+ }
+
+ #[test]
+ fn can_parse_three_values() {
+ assert_eq!(
+ Padding::from_str("[4.8, 8.1,5.9]"),
+ Ok(Padding {
+ top: 4.8,
+ right: 8.1,
+ bottom: 5.9,
+ left: 8.1,
+ }),
+ )
+ }
+
+ #[test]
+ fn can_parse_four_values() {
+ assert_eq!(
+ Padding::from_str("[35.4,74.6 ,53.1, 25.0]"),
+ Ok(Padding {
+ top: 35.4,
+ right: 74.6,
+ bottom: 53.1,
+ left: 25.0,
+ }),
+ )
+ }
+
+ #[test]
+ fn cant_parse_five_values() {
+ assert_eq!(
+ Padding::from_str("[1,2,3,4,5]"),
+ Err(ParsePaddingError::WrongNumberOfValues(5)),
+ )
+ }
+
+ #[test]
+ fn cant_parse_invalid_floats() {
+ assert_eq!(
+ Padding::from_str("[1f,2,3,4]"),
+ Err(ParsePaddingError::ParseFloatError(
+ f32::from_str("1f").expect_err("float parse should fail")
+ ))
+ )
+ }
+
+ #[test]
+ fn cant_parse_with_missing_bracket() {
+ assert_eq!(
+ Padding::from_str("1,2,3,4,5]"),
+ Err(ParsePaddingError::MissingBracket)
+ );
+
+ assert_eq!(
+ Padding::from_str("[1,2,3,4,5"),
+ Err(ParsePaddingError::MissingBracket)
+ );
+
+ assert_eq!(
+ Padding::from_str("1,2,3,4,5"),
+ Err(ParsePaddingError::MissingBracket)
+ )
+ }
+
+ #[test]
+ fn cant_parse_empty_string() {
+ assert_eq!(Padding::from_str(" "), Err(ParsePaddingError::Empty))
+ }
+}
diff --git a/src/values/pixels.rs b/src/values/pixels.rs
new file mode 100644
index 0000000..b2b0047
--- /dev/null
+++ b/src/values/pixels.rs
@@ -0,0 +1,18 @@
+use std::num::ParseFloatError;
+use std::str::FromStr;
+
+use iced::Pixels;
+
+use super::Value;
+
+impl Value for Pixels {
+ type Err = ParseFloatError;
+
+ fn from_str(s: &str) -> Result<Self, Self::Err> {
+ Ok(Pixels(f32::from_str(s.trim())?))
+ }
+
+ fn to_string(&self) -> String {
+ self.0.to_string()
+ }
+}
diff --git a/src/values/rotation.rs b/src/values/rotation.rs
new file mode 100755
index 0000000..90e3f84
--- /dev/null
+++ b/src/values/rotation.rs
@@ -0,0 +1,114 @@
+use std::num::ParseFloatError;
+use std::str::FromStr;
+
+use iced::{Radians, Rotation};
+
+use super::Value;
+
+#[derive(Debug, thiserror::Error, Clone, PartialEq)]
+pub enum ParseRotationError {
+ #[error("float parsing error: {0}")]
+ ParseFloatError(ParseFloatError),
+ #[error("invalid prefix")]
+ InvalidPrefix,
+ #[error("cannot parse rotation from empty string")]
+ Empty,
+}
+
+impl From<ParseFloatError> for ParseRotationError {
+ fn from(value: ParseFloatError) -> Self {
+ Self::ParseFloatError(value)
+ }
+}
+
+impl Value for Rotation {
+ type Err = ParseRotationError;
+
+ fn from_str(s: &str) -> Result<Self, Self::Err> {
+ let s = s.trim();
+
+ if s.is_empty() {
+ return Err(ParseRotationError::Empty);
+ }
+
+ if s.starts_with(|c: char| !c.is_ascii_digit()) {
+ let (prefix, value) = s.split_at(1);
+ match prefix.to_lowercase().as_str() {
+ "s" => Ok(Rotation::Solid(Radians(f32::from_str(value)?))),
+ "f" => Ok(Rotation::Floating(Radians(f32::from_str(value)?))),
+ _ => Err(ParseRotationError::InvalidPrefix),
+ }
+ } else {
+ Ok(Rotation::Floating(Radians(f32::from_str(s)?)))
+ }
+ }
+
+ fn to_string(&self) -> String {
+ match self {
+ Self::Floating(value) => format!("f{}", value),
+ Self::Solid(value) => format!("s{}", value),
+ }
+ }
+}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+
+ #[test]
+ fn can_parse_without_prefix() {
+ assert_eq!(
+ Rotation::from_str("10.5"),
+ Ok(Rotation::Floating(Radians(10.5)))
+ )
+ }
+
+ #[test]
+ fn can_parse_with_s_prefix() {
+ assert_eq!(
+ Rotation::from_str(" s12.3"),
+ Ok(Rotation::Solid(Radians(12.3)))
+ );
+
+ assert_eq!(
+ Rotation::from_str("S9.4"),
+ Ok(Rotation::Solid(Radians(9.4)))
+ )
+ }
+
+ #[test]
+ fn can_parse_with_f_prefix() {
+ assert_eq!(
+ Rotation::from_str("f16.9"),
+ Ok(Rotation::Floating(Radians(16.9)))
+ );
+
+ assert_eq!(
+ Rotation::from_str("F21.45 "),
+ Ok(Rotation::Floating(Radians(21.45)))
+ )
+ }
+
+ #[test]
+ fn cant_parse_invalid_prefix() {
+ assert_eq!(
+ Rotation::from_str("a6.0"),
+ Err(ParseRotationError::InvalidPrefix)
+ )
+ }
+
+ #[test]
+ fn cant_parse_invalid_float() {
+ assert_eq!(
+ Rotation::from_str("3.a"),
+ Err(ParseRotationError::ParseFloatError(
+ f32::from_str("3.a").expect_err("float parse should fail")
+ ))
+ )
+ }
+
+ #[test]
+ fn cant_parse_empty_string() {
+ assert_eq!(Rotation::from_str(" "), Err(ParseRotationError::Empty))
+ }
+}