From 965d53263d62bea36fdf0c655093274667ee4245 Mon Sep 17 00:00:00 2001 From: imgurbot12 Date: Tue, 18 Jun 2024 22:41:33 -0700 Subject: [PATCH] feat: upgrade deps, incomplete work on dioxus 5 rewrite --- Cargo.lock | 2522 +++++++++++++++++++++++++------------ plugin-network/Cargo.toml | 24 +- plugin-window/Cargo.toml | 8 +- rmenu-plugin/Cargo.toml | 7 +- rmenu/Cargo.toml | 33 +- rmenu/src/cache.rs | 87 -- rmenu/src/cli.rs | 443 ------- rmenu/src/config.rs | 407 ++---- rmenu/src/exec.rs | 61 - rmenu/src/gui.rs | 308 ----- rmenu/src/gui/entry.rs | 11 + rmenu/src/gui/mod.rs | 158 +++ rmenu/src/gui/state.rs | 152 +++ rmenu/src/image.rs | 82 -- rmenu/src/main.rs | 82 +- rmenu/src/state.rs | 314 ----- 16 files changed, 2168 insertions(+), 2531 deletions(-) delete mode 100644 rmenu/src/cache.rs delete mode 100644 rmenu/src/cli.rs delete mode 100644 rmenu/src/exec.rs delete mode 100644 rmenu/src/gui.rs create mode 100644 rmenu/src/gui/entry.rs create mode 100644 rmenu/src/gui/mod.rs create mode 100644 rmenu/src/gui/state.rs delete mode 100644 rmenu/src/image.rs delete mode 100644 rmenu/src/state.rs diff --git a/Cargo.lock b/Cargo.lock index 6ed58a0..d559257 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "addr2line" -version = "0.21.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" dependencies = [ "gimli", ] @@ -17,6 +17,18 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "ahash" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + [[package]] name = "aho-corasick" version = "1.1.3" @@ -27,48 +39,55 @@ dependencies = [ ] [[package]] -name = "anstream" -version = "0.6.13" +name = "allocator-api2" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" +checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" + +[[package]] +name = "anstream" +version = "0.6.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", + "is_terminal_polyfill", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.6" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" +checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" [[package]] name = "anstyle-parse" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" +checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" +checksum = "a64c907d4e79225ac72e2a354c9ce84d50ebb4586dee56c82b3ee73004f537f5" dependencies = [ "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.2" +version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" +checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" dependencies = [ "anstyle", "windows-sys 0.52.0", @@ -76,9 +95,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.82" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" [[package]] name = "arrayref" @@ -92,6 +111,36 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +[[package]] +name = "ashpd" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd884d7c72877a94102c3715f3b1cd09ff4fac28221add3e57cfbe25c236d093" +dependencies = [ + "async-fs", + "async-net", + "enumflags2", + "futures-channel", + "futures-util", + "rand 0.8.5", + "serde", + "serde_repr", + "url", + "zbus", +] + +[[package]] +name = "async-broadcast" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "258b52a1aa741b9f09783b2d86cf0aeeb617bbf847f6933340a39644227acbdb" +dependencies = [ + "event-listener 5.3.1", + "event-listener-strategy 0.5.2", + "futures-core", + "pin-project-lite", +] + [[package]] name = "async-channel" version = "1.9.0" @@ -105,12 +154,11 @@ dependencies = [ [[package]] name = "async-channel" -version = "2.2.1" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "136d4d23bcc79e27423727b36823d86233aad06dfea531837b038394d11e9928" +checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a" dependencies = [ "concurrent-queue", - "event-listener 5.3.0", "event-listener-strategy 0.5.2", "futures-core", "pin-project-lite", @@ -118,9 +166,9 @@ dependencies = [ [[package]] name = "async-executor" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b10202063978b3351199d68f8b22c4e47e4b1b822f8d43fd862d5ea8c006b29a" +checksum = "c8828ec6e544c02b0d6691d21ed9f9218d0384a82542855073c2a3f58304aaf0" dependencies = [ "async-task", "concurrent-queue", @@ -129,13 +177,24 @@ dependencies = [ "slab", ] +[[package]] +name = "async-fs" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebcd09b382f40fcd159c2d695175b2ae620ffa5f3bd6f664131efff4e8b9e04a" +dependencies = [ + "async-lock 3.3.0", + "blocking", + "futures-lite 2.3.0", +] + [[package]] name = "async-global-executor" version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05b1b633a2115cd122d73b955eadd9916c18c8f510ec9cd1686404c60ad1c29c" dependencies = [ - "async-channel 2.2.1", + "async-channel 2.3.1", "async-executor", "async-io 2.3.2", "async-lock 3.3.0", @@ -203,6 +262,66 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "async-net" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b948000fad4873c1c9339d60f2623323a0cfd3816e5181033c6a5cb68b2accf7" +dependencies = [ + "async-io 2.3.2", + "blocking", + "futures-lite 2.3.0", +] + +[[package]] +name = "async-process" +version = "2.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a53fc6301894e04a92cb2584fedde80cb25ba8e02d9dc39d4a87d036e22f397d" +dependencies = [ + "async-channel 2.3.1", + "async-io 2.3.2", + "async-lock 3.3.0", + "async-signal", + "async-task", + "blocking", + "cfg-if", + "event-listener 5.3.1", + "futures-lite 2.3.0", + "rustix 0.38.34", + "tracing", + "windows-sys 0.52.0", +] + +[[package]] +name = "async-recursion" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "async-signal" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afe66191c335039c7bb78f99dc7520b0cbb166b3a1cb33a03f53d8a1c6f2afda" +dependencies = [ + "async-io 2.3.2", + "async-lock 3.3.0", + "atomic-waker", + "cfg-if", + "futures-core", + "futures-io", + "rustix 0.38.34", + "signal-hook-registry", + "slab", + "windows-sys 0.52.0", +] + [[package]] name = "async-std" version = "1.12.0" @@ -243,35 +362,28 @@ checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.66", ] -[[package]] -name = "async_once" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ce4f10ea3abcd6617873bae9f91d1c5332b4a778bd9ce34d0cd517474c1de82" - [[package]] name = "atk" -version = "0.16.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39991bc421ddf72f70159011b323ff49b0f783cc676a7287c59453da2e2531cf" +checksum = "b4af014b17dd80e8af9fa689b2d4a211ddba6eb583c1622f35d0cb543f6b17e4" dependencies = [ "atk-sys", - "bitflags 1.3.2", - "glib 0.16.9", + "glib 0.18.5", "libc", ] [[package]] name = "atk-sys" -version = "0.16.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11ad703eb64dc058024f0e57ccfa069e15a413b98dbd50a1a950e743b7f11148" +checksum = "251e0b7d90e33e0ba930891a505a9a35ece37b2dd37a14f3ffc306c13b980009" dependencies = [ - "glib-sys 0.16.3", - "gobject-sys 0.16.3", + "glib-sys 0.18.1", + "gobject-sys 0.18.0", "libc", "system-deps 6.2.2", ] @@ -284,15 +396,15 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "backtrace" -version = "0.3.71" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +checksum = "17c6a35df3749d2e8bb1b7b21a976d82b15548788d2735b9d82f329268f71a11" dependencies = [ "addr2line", "cc", @@ -303,12 +415,6 @@ dependencies = [ "rustc-demangle", ] -[[package]] -name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - [[package]] name = "base64" version = "0.21.7" @@ -316,13 +422,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] -name = "bincode" -version = "1.3.3" +name = "base64" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" -dependencies = [ - "serde", -] +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "bitflags" @@ -356,12 +459,11 @@ dependencies = [ [[package]] name = "blocking" -version = "1.6.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "495f7104e962b7356f0aeb34247aca1fe7d2e783b346582db7f2904cb5717e88" +checksum = "703f41c54fc768e63e091340b424302bb1c29ef4aa0c7f10fe849dfb114d29ea" dependencies = [ - "async-channel 2.2.1", - "async-lock 3.3.0", + "async-channel 2.3.1", "async-task", "futures-io", "futures-lite 2.3.0", @@ -376,9 +478,9 @@ checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "bytemuck" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d6d68c57235a3a081186990eca2867354726650f42f7516ca50c28d6281fd15" +checksum = "78834c15cb5d5efe3452d58b1e8ba890dd62d21907f867f383358198e56ebca5" [[package]] name = "byteorder" @@ -392,82 +494,15 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" -[[package]] -name = "cached" -version = "0.40.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b4147cd94d5fbdc2ab71b11d50a2f45493625576b3bb70257f59eedea69f3d" -dependencies = [ - "async-trait", - "async_once", - "cached_proc_macro 0.15.0", - "cached_proc_macro_types", - "futures", - "hashbrown 0.12.3", - "instant", - "lazy_static", - "once_cell", - "thiserror", - "tokio", -] - -[[package]] -name = "cached" -version = "0.44.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b195e4fbc4b6862bbd065b991a34750399c119797efff72492f28a5864de8700" -dependencies = [ - "async-trait", - "cached_proc_macro 0.17.0", - "cached_proc_macro_types", - "futures", - "hashbrown 0.13.2", - "instant", - "once_cell", - "thiserror", - "tokio", -] - -[[package]] -name = "cached_proc_macro" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "751f7f4e7a091545e7f6c65bacc404eaee7e87bfb1f9ece234a1caa173dc16f2" -dependencies = [ - "cached_proc_macro_types", - "darling 0.13.4", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "cached_proc_macro" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b48814962d2fd604c50d2b9433c2a41a0ab567779ee2c02f7fba6eca1221f082" -dependencies = [ - "cached_proc_macro_types", - "darling 0.14.4", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "cached_proc_macro_types" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ade8366b8bd5ba243f0a58f036cc0ca8a2f069cff1a2351ef1cac6b083e16fc0" - [[package]] name = "cairo-rs" -version = "0.16.7" +version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3125b15ec28b84c238f6f476c6034016a5f6cc0221cb514ca46c532139fc97d" +checksum = "8ca26ef0159422fb77631dc9d17b102f253b876fe1586b03b803e63a309b4ee2" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.5.0", "cairo-sys-rs", - "glib 0.16.9", + "glib 0.18.5", "libc", "once_cell", "thiserror", @@ -475,20 +510,52 @@ dependencies = [ [[package]] name = "cairo-sys-rs" -version = "0.16.3" +version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c48f4af05fabdcfa9658178e1326efa061853f040ce7d72e33af6885196f421" +checksum = "685c9fa8e590b8b3d678873528d83411db17242a73fccaed827770ea0fedda51" dependencies = [ - "glib-sys 0.16.3", + "glib-sys 0.18.1", "libc", "system-deps 6.2.2", ] [[package]] -name = "cc" -version = "1.0.95" +name = "camino" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32a725bc159af97c3e629873bb9f88fb8cf8a4867175f76dc987815ea07c83b" +checksum = "e0ec6b951b160caa93cc0c7b209e5a3bff7aae9062213451ac99493cd844c239" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo-platform" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" +dependencies = [ + "camino", + "cargo-platform", + "semver", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "cc" +version = "1.0.98" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41c270e7540d725e65ac7f1b212ac8ce349719624d7bcff99f8e2e488e8cf03f" [[package]] name = "cesu8" @@ -523,6 +590,39 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_aliases" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" + +[[package]] +name = "ciborium" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e" +dependencies = [ + "ciborium-io", + "ciborium-ll", + "serde", +] + +[[package]] +name = "ciborium-io" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757" + +[[package]] +name = "ciborium-ll" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9" +dependencies = [ + "ciborium-io", + "half", +] + [[package]] name = "clap" version = "4.5.4" @@ -542,7 +642,7 @@ dependencies = [ "anstream", "anstyle", "clap_lex", - "strsim 0.11.1", + "strsim", ] [[package]] @@ -554,7 +654,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.66", ] [[package]] @@ -565,9 +665,9 @@ checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" [[package]] name = "cocoa" -version = "0.24.1" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f425db7937052c684daec3bd6375c8abe2d146dca4b8b143d6db777c39138f3a" +checksum = "f6140449f97a6e97f9511815c5632d84c8aacf8ac271ad77c559218161a1373c" dependencies = [ "bitflags 1.3.2", "block", @@ -601,9 +701,9 @@ checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" [[package]] name = "colorchoice" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" [[package]] name = "combine" @@ -639,11 +739,31 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" dependencies = [ - "getrandom 0.2.14", + "getrandom 0.2.15", "once_cell", "tiny-keccak", ] +[[package]] +name = "const_format" +version = "0.2.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3a214c7af3d04997541b18d432afaff4c455e79e2029079647e72fc2bd27673" +dependencies = [ + "const_format_proc_macros", +] + +[[package]] +name = "const_format_proc_macros" +version = "0.2.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7f6ff08fd20f4f299298a28e2dfa8a8ba1036e6cd2460ac1de7b425d76f2500" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + [[package]] name = "constcat" version = "0.3.1" @@ -656,6 +776,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" +[[package]] +name = "convert_case" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" +dependencies = [ + "unicode-segmentation", +] + [[package]] name = "core-foundation" version = "0.9.4" @@ -674,9 +803,9 @@ checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "core-graphics" -version = "0.22.3" +version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2581bbab3b8ffc6fcbd550bf46c355135d16e9ff2a6ea032ad6b9bf1d7efe4fb" +checksum = "c07782be35f9e1140080c6b96f0d44b739e2278479f64e02fdab4e32dfd8b081" dependencies = [ "bitflags 1.3.2", "core-foundation", @@ -707,27 +836,46 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.4.0" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ "cfg-if", ] [[package]] name = "crossbeam-channel" -version = "0.5.12" +version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab3db02a9c5b5121e1e42fbdb1aeb65f5e02624cc58c43f2884c6ccac0b82f95" +checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" dependencies = [ "crossbeam-utils", ] [[package]] name = "crossbeam-utils" -version = "0.8.19" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "crunchy" @@ -755,7 +903,7 @@ dependencies = [ "dtoa-short", "itoa 0.4.8", "matches", - "phf", + "phf 0.8.0", "proc-macro2", "quote", "smallvec", @@ -769,118 +917,72 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" dependencies = [ "quote", - "syn 2.0.60", + "syn 2.0.66", ] [[package]] name = "darling" -version = "0.13.4" +version = "0.20.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" +checksum = "83b2eb4d90d12bdda5ed17de686c2acb4c57914f8f921b8da7e112b5a36f3fe1" dependencies = [ - "darling_core 0.13.4", - "darling_macro 0.13.4", -] - -[[package]] -name = "darling" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" -dependencies = [ - "darling_core 0.14.4", - "darling_macro 0.14.4", -] - -[[package]] -name = "darling" -version = "0.20.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54e36fcd13ed84ffdfda6f5be89b31287cbb80c439841fe69e04841435464391" -dependencies = [ - "darling_core 0.20.8", - "darling_macro 0.20.8", + "darling_core", + "darling_macro", ] [[package]] name = "darling_core" -version = "0.13.4" +version = "0.20.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" +checksum = "622687fe0bac72a04e5599029151f5796111b90f1baaa9b544d807a5e31cd120" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", - "strsim 0.10.0", - "syn 1.0.109", -] - -[[package]] -name = "darling_core" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim 0.10.0", - "syn 1.0.109", -] - -[[package]] -name = "darling_core" -version = "0.20.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c2cf1c23a687a1feeb728783b993c4e1ad83d99f351801977dd809b48d0a70f" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "syn 2.0.60", + "syn 2.0.66", ] [[package]] name = "darling_macro" -version = "0.13.4" +version = "0.20.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" +checksum = "733cabb43482b1a1b53eee8583c2b9e8684d592215ea83efd305dd31bc2f0178" dependencies = [ - "darling_core 0.13.4", + "darling_core", "quote", - "syn 1.0.109", + "syn 2.0.66", ] [[package]] -name = "darling_macro" -version = "0.14.4" +name = "dashmap" +version = "5.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" +checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ - "darling_core 0.14.4", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "darling_macro" -version = "0.20.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" -dependencies = [ - "darling_core 0.20.8", - "quote", - "syn 2.0.60", + "cfg-if", + "hashbrown 0.14.5", + "lock_api", + "once_cell", + "parking_lot_core", ] [[package]] name = "data-url" -version = "0.2.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d7439c3735f405729d52c3fbbe4de140eaf938a1fe47d227c27f8254d4302a5" +checksum = "5c297a1c74b71ae29df00c3e22dd9534821d60eb9af5a0192823fa2acea70c2a" + +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] [[package]] name = "derive_more" @@ -888,7 +990,7 @@ version = "0.99.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ - "convert_case", + "convert_case 0.4.0", "proc-macro2", "quote", "rustc_version", @@ -903,9 +1005,10 @@ dependencies = [ "freedesktop-icons", "log", "once_cell", + "rayon", "regex", "rmenu-plugin", - "rust-ini 0.19.0", + "rust-ini 0.21.0", "serde_json", "shellexpand", "thiserror", @@ -924,48 +1027,73 @@ dependencies = [ [[package]] name = "dioxus" -version = "0.4.3" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d9e3b0725e520250bf23213f996d241cca29cea4360a9bf08a44e0033f8e569" +checksum = "1e50735a28b303b0d67e1b5637fb57e4711bf2776266290cbc987c0adfdabb55" dependencies = [ + "dioxus-config-macro", "dioxus-core", "dioxus-core-macro", + "dioxus-desktop", + "dioxus-fullstack", "dioxus-hooks", "dioxus-hot-reload", "dioxus-html", - "dioxus-rsx", + "dioxus-signals", ] [[package]] -name = "dioxus-core" -version = "0.4.3" +name = "dioxus-cli-config" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f33186615b2e90bceab24a195b3cfad4e0b4d91a33ec44a94845876bfb25c13" +checksum = "a5d4661064bad2f0b12929faf6c9cea4d94e60217ba6b11ff4146b505a57124b" dependencies = [ - "bumpalo", - "futures-channel", - "futures-util", - "longest-increasing-subsequence", - "rustc-hash", + "once_cell", "serde", - "slab", - "smallbox", + "serde_json", "tracing", ] [[package]] -name = "dioxus-core-macro" -version = "0.4.3" +name = "dioxus-config-macro" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21afaccb28587aed0ba98856335912f5ce7052c0aafa74b213829a3b8bfd2345" +checksum = "ebe244197b320dec9e9f38742985fe98c058136ada770df73e9429878ed92863" +dependencies = [ + "proc-macro2", + "quote", +] + +[[package]] +name = "dioxus-core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "088daa3f45aaa729e9eef32dc0a9393dd709ee906b092089e5839cad1cad7c85" +dependencies = [ + "futures-channel", + "futures-util", + "generational-box", + "longest-increasing-subsequence", + "rustc-hash", + "serde", + "slab", + "tracing", + "tracing-subscriber", +] + +[[package]] +name = "dioxus-core-macro" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e29a07448245451334eec2883a394e207f28caedf0a57fd1a903e9ccea0b9531" dependencies = [ "constcat", - "dioxus-core", + "convert_case 0.6.0", "dioxus-rsx", "prettyplease", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.66", ] [[package]] @@ -976,26 +1104,35 @@ checksum = "2ea539174bb236e0e7dc9c12b19b88eae3cb574dedbd0252a2d43ea7e6de13e2" [[package]] name = "dioxus-desktop" -version = "0.4.3" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf3ea0b1f6e64157b43e73d7ec3985df904c89ecf313bff93e06ff7d3b40d1cb" +checksum = "d85f5008be950e1dd255d947d8037e82e424ccc538892cf251b09a22558dc296" dependencies = [ "async-trait", + "cocoa", "core-foundation", + "dioxus-cli-config", "dioxus-core", + "dioxus-hooks", "dioxus-hot-reload", "dioxus-html", "dioxus-interpreter-js", "dunce", "futures-channel", "futures-util", + "generational-box", + "global-hotkey", "infer", + "muda", "objc", "objc_id", "rfd", + "rustc-hash", "serde", "serde_json", + "signal-hook", "slab", + "tao", "thiserror", "tokio", "tracing", @@ -1006,22 +1143,47 @@ dependencies = [ [[package]] name = "dioxus-free-icons" -version = "0.7.0" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba0f39d8cc51f55139246e3527a97153bbc6764bfe8ecf0b2505e7c6b7650580" +checksum = "b4b60c5a6f9c15bc3b0e12291f8a91162042b9eb5b3015f561185aac813df834" dependencies = [ "dioxus", ] [[package]] -name = "dioxus-hooks" -version = "0.4.3" +name = "dioxus-fullstack" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bb23ce82df4fb13e9ddaa01d1469f1f32d683dd4636204bd0a0eaf434b65946" +checksum = "db7fb1a22ff7af8756bc9506eebfbecf374b1c8c57f087c85c752ba8bd767fce" +dependencies = [ + "async-trait", + "base64 0.21.7", + "bytes", + "ciborium", + "dioxus-desktop", + "dioxus-hot-reload", + "dioxus-lib", + "dioxus_server_macro", + "futures-util", + "once_cell", + "serde", + "serde_json", + "server_fn", + "tracing", +] + +[[package]] +name = "dioxus-hooks" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a8c7019308a6d8381fce84a51006f207407af265aebc5425871399c98d788e4" dependencies = [ "dioxus-core", "dioxus-debug-cell", + "dioxus-signals", "futures-channel", + "futures-util", + "generational-box", "slab", "thiserror", "tracing", @@ -1029,9 +1191,9 @@ dependencies = [ [[package]] name = "dioxus-hot-reload" -version = "0.4.3" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7d8c9e89e866a6b84b8ad696f0ff2f6f6563d2235eb99acc6952f19e516cc09" +checksum = "8d5a28a2af6655473c6521fb5a428538807b985e8e5f1a8c30e2ab71bd54e637" dependencies = [ "dioxus-core", "dioxus-html", @@ -1043,40 +1205,108 @@ dependencies = [ [[package]] name = "dioxus-html" -version = "0.4.3" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "828a42a2d70688a2412a8538c8b5a5eceadf68f682f899dc4455a0169db39dfd" +checksum = "a8d612d9732f32adc1852e13e1387a9d5baa710b0b004641b5123def53065c8d" dependencies = [ - "async-channel 1.9.0", "async-trait", "dioxus-core", + "dioxus-html-internal-macro", "enumset", "euclid", - "keyboard-types 0.7.0", + "futures-channel", + "generational-box", + "keyboard-types", "serde", "serde-value", "serde_json", "serde_repr", "tokio", + "tracing", "web-sys", ] [[package]] -name = "dioxus-interpreter-js" -version = "0.4.3" +name = "dioxus-html-internal-macro" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9a3115cf9f550a9af88de615c21a15a72dee44230602087dd7b0c5d01f46c37" +checksum = "1799f34affdb158f6ebec23b46b11f9e65de0bbadbbb781dc68c3eddfe6fd32b" +dependencies = [ + "convert_case 0.6.0", + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "dioxus-interpreter-js" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc68a22e33562317b40ccc7b2d140017e510745c5d7e062e911c6a4f9042e4b1" +dependencies = [ + "dioxus-core", + "dioxus-html", + "md5", + "sledgehammer_bindgen", + "sledgehammer_utils", +] + +[[package]] +name = "dioxus-lib" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9af36a9f985ad68783acf62dc276b0a8f0aa928f1c3b42f78e2ae222b19d445c" +dependencies = [ + "dioxus-core", + "dioxus-core-macro", + "dioxus-hooks", + "dioxus-html", + "dioxus-rsx", + "dioxus-signals", +] [[package]] name = "dioxus-rsx" -version = "0.4.3" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c974133c7c95497a486d587e40449927711430b308134b9cd374b8d35eceafb3" +checksum = "faa83056104f63fdc6f7f9fc1137208c7b7648bf88d6c86db1e095f15297a0f3" dependencies = [ "dioxus-core", + "internment", + "krates", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.66", + "tracing", +] + +[[package]] +name = "dioxus-signals" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fd04e2b3739d5c12255005cbf3185446e750fc2b3eeee9fa4e83c989132415c" +dependencies = [ + "dioxus-core", + "futures-channel", + "futures-util", + "generational-box", + "once_cell", + "parking_lot", + "rustc-hash", + "tracing", +] + +[[package]] +name = "dioxus_server_macro" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b723da95503f739f9fc5fb23b6ad1e456f1438a496a0427210fa94e4e0d5fe9" +dependencies = [ + "convert_case 0.6.0", + "proc-macro2", + "quote", + "server_fn_macro", + "syn 2.0.66", ] [[package]] @@ -1126,6 +1356,29 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" +[[package]] +name = "dlopen2" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1297103d2bbaea85724fcee6294c2d50b1081f9ad47d0f6f6f61eda65315a6" +dependencies = [ + "dlopen2_derive", + "libc", + "once_cell", + "winapi", +] + +[[package]] +name = "dlopen2_derive" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2b99bf03862d7f545ebc28ddd33a665b50865f4dfd84031a393823879bd4c54" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + [[package]] name = "dlv-list" version = "0.5.2" @@ -1158,9 +1411,36 @@ checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" [[package]] name = "either" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" +checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" + +[[package]] +name = "endi" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3d8a32ae18130a3c84dd492d4215c3d913c3b07c6b63c2eb3eb7ff1101ab7bf" + +[[package]] +name = "enumflags2" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3278c9d5fb675e0a51dabcf4c0d355f692b064171535ba72361be1528a9d8e8d" +dependencies = [ + "enumflags2_derive", + "serde", +] + +[[package]] +name = "enumflags2_derive" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c785274071b1b420972453b306eeca06acf4633829db4223b58a2a8c5953bc4" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] [[package]] name = "enumset" @@ -1177,23 +1457,33 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e08b6c6ab82d70f08844964ba10c7babb716de2ecaeab9be5717918a5177d3af" dependencies = [ - "darling 0.20.8", + "darling", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.66", +] + +[[package]] +name = "env_filter" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a009aa4810eb158359dda09d0c87378e4bbb89b5a801f016885a4707ba24f7ea" +dependencies = [ + "log", + "regex", ] [[package]] name = "env_logger" -version = "0.10.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" +checksum = "38b35839ba51819680ba087cd351788c9a3c476841207e0b8cee0b04722343b9" dependencies = [ + "anstream", + "anstyle", + "env_filter", "humantime", - "is-terminal", "log", - "regex", - "termcolor", ] [[package]] @@ -1204,9 +1494,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", "windows-sys 0.52.0", @@ -1214,9 +1504,9 @@ dependencies = [ [[package]] name = "euclid" -version = "0.22.9" +version = "0.22.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f253bc5c813ca05792837a0ff4b3a580336b224512d48f7eda1d7dd9210787" +checksum = "e0f0eb73b934648cd7a4a61f1b15391cd95dab0b4da6e2e66c2a072c144b4a20" dependencies = [ "num-traits", "serde", @@ -1241,9 +1531,9 @@ dependencies = [ [[package]] name = "event-listener" -version = "5.3.0" +version = "5.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d9944b8ca13534cdfb2800775f8dd4902ff3fc75a50101466decadfdf322a24" +checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba" dependencies = [ "concurrent-queue", "parking", @@ -1266,7 +1556,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" dependencies = [ - "event-listener 5.3.0", + "event-listener 5.3.1", "pin-project-lite", ] @@ -1305,10 +1595,16 @@ dependencies = [ ] [[package]] -name = "flate2" -version = "1.0.29" +name = "fixedbitset" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4556222738635b7a3417ae6130d8f52201e45a0c4d1a907f0826383adb5f85e7" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" + +[[package]] +name = "flate2" +version = "1.0.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" dependencies = [ "crc32fast", "miniz_oxide", @@ -1332,37 +1628,49 @@ version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a595cb550439a117696039dfc69830492058211b771a2a165379f2a1a53d84d" dependencies = [ - "roxmltree 0.19.0", + "roxmltree", ] [[package]] name = "fontdb" -version = "0.14.1" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af8d8cbea8f21307d7e84bca254772981296f058a1d36b461bf4d83a7499fc9e" +checksum = "b0299020c3ef3f60f526a4f64ab4a3d4ce116b1acbf24cdd22da0068e5d81dc3" dependencies = [ "fontconfig-parser", "log", "memmap2", "slotmap", "tinyvec", - "ttf-parser 0.19.2", + "ttf-parser", ] [[package]] name = "foreign-types" -version = "0.3.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" dependencies = [ + "foreign-types-macros", "foreign-types-shared", ] [[package]] -name = "foreign-types-shared" -version = "0.1.1" +name = "foreign-types-macros" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" +checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "foreign-types-shared" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" [[package]] name = "form_urlencoded" @@ -1417,6 +1725,7 @@ checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" dependencies = [ "futures-channel", "futures-core", + "futures-executor", "futures-io", "futures-sink", "futures-task", @@ -1492,7 +1801,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.66", ] [[package]] @@ -1513,6 +1822,7 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ + "futures-channel", "futures-core", "futures-io", "futures-macro", @@ -1535,57 +1845,56 @@ dependencies = [ [[package]] name = "gdk" -version = "0.16.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa9cb33da481c6c040404a11f8212d193889e9b435db2c14fd86987f630d3ce1" +checksum = "f5ba081bdef3b75ebcdbfc953699ed2d7417d6bd853347a42a37d76406a33646" dependencies = [ - "bitflags 1.3.2", "cairo-rs", "gdk-pixbuf", "gdk-sys", - "gio 0.16.7", - "glib 0.16.9", + "gio 0.18.4", + "glib 0.18.5", "libc", "pango", ] [[package]] name = "gdk-pixbuf" -version = "0.16.7" +version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3578c60dee9d029ad86593ed88cb40f35c1b83360e12498d055022385dd9a05" +checksum = "50e1f5f1b0bfb830d6ccc8066d18db35c487b1b2b1e8589b5dfe9f07e8defaec" dependencies = [ - "bitflags 1.3.2", "gdk-pixbuf-sys", - "gio 0.16.7", - "glib 0.16.9", + "gio 0.18.4", + "glib 0.18.5", "libc", + "once_cell", ] [[package]] name = "gdk-pixbuf-sys" -version = "0.16.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3092cf797a5f1210479ea38070d9ae8a5b8e9f8f1be9f32f4643c529c7d70016" +checksum = "3f9839ea644ed9c97a34d129ad56d38a25e6756f99f3a88e15cd39c20629caf7" dependencies = [ - "gio-sys 0.16.3", - "glib-sys 0.16.3", - "gobject-sys 0.16.3", + "gio-sys 0.18.1", + "glib-sys 0.18.1", + "gobject-sys 0.18.0", "libc", "system-deps 6.2.2", ] [[package]] name = "gdk-sys" -version = "0.16.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d76354f97a913e55b984759a997b693aa7dc71068c9e98bcce51aa167a0a5c5a" +checksum = "31ff856cb3386dae1703a920f803abafcc580e9b5f711ca62ed1620c25b51ff2" dependencies = [ "cairo-sys-rs", "gdk-pixbuf-sys", - "gio-sys 0.16.3", - "glib-sys 0.16.3", - "gobject-sys 0.16.3", + "gio-sys 0.18.1", + "glib-sys 0.18.1", + "gobject-sys 0.18.0", "libc", "pango-sys", "pkg-config", @@ -1594,31 +1903,54 @@ dependencies = [ [[package]] name = "gdkwayland-sys" -version = "0.16.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4511710212ed3020b61a8622a37aa6f0dd2a84516575da92e9b96928dcbe83ba" +checksum = "a90fbf5c033c65d93792192a49a8efb5bb1e640c419682a58bb96f5ae77f3d4a" dependencies = [ "gdk-sys", - "glib-sys 0.16.3", - "gobject-sys 0.16.3", + "glib-sys 0.18.1", + "gobject-sys 0.18.0", "libc", "pkg-config", "system-deps 6.2.2", ] [[package]] -name = "gdkx11-sys" -version = "0.16.0" +name = "gdkx11" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa2bf8b5b8c414bc5d05e48b271896d0fd3ddb57464a3108438082da61de6af" +checksum = "db2ea8a4909d530f79921290389cbd7c34cb9d623bfe970eaae65ca5f9cd9cce" +dependencies = [ + "gdk", + "gdkx11-sys", + "gio 0.18.4", + "glib 0.18.5", + "libc", + "x11", +] + +[[package]] +name = "gdkx11-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fee8f00f4ee46cad2939b8990f5c70c94ff882c3028f3cc5abf950fa4ab53043" dependencies = [ "gdk-sys", - "glib-sys 0.16.3", + "glib-sys 0.18.1", "libc", "system-deps 6.2.2", "x11", ] +[[package]] +name = "generational-box" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f132919c96b85c02a067ceae965fd50ace57111e2f55c7384b95ac191f4d966b" +dependencies = [ + "parking_lot", +] + [[package]] name = "generic-array" version = "0.14.7" @@ -1642,9 +1974,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "libc", @@ -1673,9 +2005,9 @@ dependencies = [ [[package]] name = "gif" -version = "0.12.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80792593675e051cf94a4b111980da2ba60d4a83e43e0048c5693baab3977045" +checksum = "3fb2d69b19215e18bb912fa30f7ce15846e301408695e44e0ef719f1da9e19f2" dependencies = [ "color_quant", "weezl", @@ -1683,23 +2015,22 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.1" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" [[package]] name = "gio" -version = "0.16.7" +version = "0.18.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a1c84b4534a290a29160ef5c6eff2a9c95833111472e824fc5cb78b513dd092" +checksum = "d4fc8f532f87b79cbc51a79748f16a6828fb784be93145a322fa14d06d354c73" dependencies = [ - "bitflags 1.3.2", "futures-channel", "futures-core", "futures-io", "futures-util", - "gio-sys 0.16.3", - "glib 0.16.9", + "gio-sys 0.18.1", + "glib 0.18.5", "libc", "once_cell", "pin-project-lite", @@ -1727,12 +2058,12 @@ dependencies = [ [[package]] name = "gio-sys" -version = "0.16.3" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9b693b8e39d042a95547fc258a7b07349b1f0b48f4b2fa3108ba3c51c0b5229" +checksum = "37566df850baf5e4cb0dfb78af2e4b9898d817ed9263d1090a2df958c64737d2" dependencies = [ - "glib-sys 0.16.3", - "gobject-sys 0.16.3", + "glib-sys 0.18.1", + "gobject-sys 0.18.0", "libc", "system-deps 6.2.2", "winapi", @@ -1752,21 +2083,22 @@ dependencies = [ [[package]] name = "glib" -version = "0.16.9" +version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16aa2475c9debed5a32832cb5ff2af5a3f9e1ab9e69df58eaadc1ab2004d6eba" +checksum = "233daaf6e83ae6a12a52055f568f9d7cf4671dabb78ff9560ab6da230ce00ee5" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.5.0", "futures-channel", "futures-core", "futures-executor", "futures-task", "futures-util", - "gio-sys 0.16.3", - "glib-macros 0.16.8", - "glib-sys 0.16.3", - "gobject-sys 0.16.3", + "gio-sys 0.18.1", + "glib-macros 0.18.5", + "glib-sys 0.18.1", + "gobject-sys 0.18.0", "libc", + "memchr", "once_cell", "smallvec", "thiserror", @@ -1796,17 +2128,16 @@ dependencies = [ [[package]] name = "glib-macros" -version = "0.16.8" +version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb1a9325847aa46f1e96ffea37611b9d51fc4827e67f79e7de502a297560a67b" +checksum = "0bb0228f477c0900c880fd78c8759b95c7636dbd7842707f49e132378aa2acdc" dependencies = [ - "anyhow", "heck 0.4.1", - "proc-macro-crate", + "proc-macro-crate 2.0.2", "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.66", ] [[package]] @@ -1815,18 +2146,18 @@ version = "0.19.0" source = "git+https://github.com/gtk-rs/gtk-rs-core?rev=cab7e1c549675cbe98af461ebbcc04c33c8f1295#cab7e1c549675cbe98af461ebbcc04c33c8f1295" dependencies = [ "heck 0.4.1", - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.66", ] [[package]] name = "glib-sys" -version = "0.16.3" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61a4f46316d06bfa33a7ac22df6f0524c8be58e3db2d9ca99ccb1f357b62a65" +checksum = "063ce2eb6a8d0ea93d2bf8ba1957e78dbab6be1c2220dd3daca57d5a9d869898" dependencies = [ "libc", "system-deps 6.2.2", @@ -1841,6 +2172,44 @@ dependencies = [ "system-deps 6.2.2", ] +[[package]] +name = "global-hotkey" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89cb13e8c52c87e28a46eae3e5e65b8f0cd465c4c9e67b13d56c70412e792bc3" +dependencies = [ + "bitflags 2.5.0", + "cocoa", + "crossbeam-channel", + "keyboard-types", + "objc", + "once_cell", + "thiserror", + "windows-sys 0.52.0", + "x11-dl", +] + +[[package]] +name = "gloo-net" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43aaa242d1239a8822c15c645f02166398da4f8b5c4bae795c1f5b44e9eee173" +dependencies = [ + "futures-channel", + "futures-core", + "futures-sink", + "gloo-utils", + "http 0.2.12", + "js-sys", + "pin-project", + "serde", + "serde_json", + "thiserror", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + [[package]] name = "gloo-timers" version = "0.2.6" @@ -1854,12 +2223,25 @@ dependencies = [ ] [[package]] -name = "gobject-sys" -version = "0.16.3" +name = "gloo-utils" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3520bb9c07ae2a12c7f2fbb24d4efc11231c8146a86956413fb1a79bb760a0f1" +checksum = "0b5555354113b18c547c1d3a98fbf7fb32a9ff4f6fa112ce823a21641a0ba3aa" dependencies = [ - "glib-sys 0.16.3", + "js-sys", + "serde", + "serde_json", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "gobject-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0850127b514d1c4a4654ead6dedadb18198999985908e6ffe4436f53c785ce44" +dependencies = [ + "glib-sys 0.18.1", "libc", "system-deps 6.2.2", ] @@ -1876,40 +2258,38 @@ dependencies = [ [[package]] name = "gtk" -version = "0.16.2" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4d3507d43908c866c805f74c9dd593c0ce7ba5c38e576e41846639cdcd4bee6" +checksum = "93c4f5e0e20b60e10631a5f06da7fe3dda744b05ad0ea71fee2f47adf865890c" dependencies = [ "atk", - "bitflags 1.3.2", "cairo-rs", "field-offset", "futures-channel", "gdk", "gdk-pixbuf", - "gio 0.16.7", - "glib 0.16.9", + "gio 0.18.4", + "glib 0.18.5", "gtk-sys", "gtk3-macros", "libc", - "once_cell", "pango", "pkg-config", ] [[package]] name = "gtk-sys" -version = "0.16.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b5f8946685d5fe44497007786600c2f368ff6b1e61a16251c89f72a97520a3" +checksum = "771437bf1de2c1c0b496c11505bdf748e26066bbe942dfc8f614c9460f6d7722" dependencies = [ "atk-sys", "cairo-sys-rs", "gdk-pixbuf-sys", "gdk-sys", - "gio-sys 0.16.3", - "glib-sys 0.16.3", - "gobject-sys 0.16.3", + "gio-sys 0.18.1", + "glib-sys 0.18.1", + "gobject-sys 0.18.0", "libc", "pango-sys", "system-deps 6.2.2", @@ -1917,16 +2297,25 @@ dependencies = [ [[package]] name = "gtk3-macros" -version = "0.16.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "096eb63c6fedf03bafe65e5924595785eaf1bcb7200dac0f2cbe9c9738f05ad8" +checksum = "c6063efb63db582968fb7df72e1ae68aa6360dcfb0a75143f34fc7d616bad75e" dependencies = [ - "anyhow", - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.66", +] + +[[package]] +name = "half" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" +dependencies = [ + "cfg-if", + "crunchy", ] [[package]] @@ -1937,15 +2326,13 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "hashbrown" -version = "0.13.2" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" - -[[package]] -name = "hashbrown" -version = "0.14.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", + "allocator-api2", +] [[package]] name = "heck" @@ -1974,6 +2361,12 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + [[package]] name = "home" version = "0.5.9" @@ -1985,9 +2378,9 @@ dependencies = [ [[package]] name = "html5ever" -version = "0.25.2" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5c13fb08e5d4dfc151ee5e88bae63f7773d61852f3bdc73c9f4b9e1bde03148" +checksum = "bea68cab48b8459f17cf1c944c67ddc572d272d9f2b274140f223ecb1da4a3b7" dependencies = [ "log", "mac", @@ -2008,6 +2401,17 @@ dependencies = [ "itoa 1.0.11", ] +[[package]] +name = "http" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +dependencies = [ + "bytes", + "fnv", + "itoa 1.0.11", +] + [[package]] name = "humantime" version = "2.1.0" @@ -2030,24 +2434,22 @@ dependencies = [ "unicode-normalization", ] -[[package]] -name = "image" -version = "0.24.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5690139d2f55868e080017335e4b94cb7414274c74f1669c84fb5feba2c9f69d" -dependencies = [ - "bytemuck", - "byteorder", - "color_quant", - "num-traits", -] - [[package]] name = "imagesize" version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "029d73f573d8e8d63e6d5020011d3255b28c3ba85d6cf870a07184ed23de9284" +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", +] + [[package]] name = "indexmap" version = "2.2.6" @@ -2055,7 +2457,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", - "hashbrown 0.14.3", + "hashbrown 0.14.5", ] [[package]] @@ -2069,13 +2471,23 @@ dependencies = [ [[package]] name = "instant" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" dependencies = [ "cfg-if", ] +[[package]] +name = "internment" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04e8e537b529b8674e97e9fb82c10ff168a290ac3867a0295f112061ffbca1ef" +dependencies = [ + "hashbrown 0.14.5", + "parking_lot", +] + [[package]] name = "interprocess-docfix" version = "1.2.2" @@ -2114,15 +2526,10 @@ dependencies = [ ] [[package]] -name = "is-terminal" -version = "0.4.12" +name = "is_terminal_polyfill" +version = "1.70.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" -dependencies = [ - "hermit-abi", - "libc", - "windows-sys 0.52.0", -] +checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" [[package]] name = "itoa" @@ -2138,41 +2545,27 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "javascriptcore-rs" -version = "0.17.0" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "110b9902c80c12bf113c432d0b71c7a94490b294a8234f326fd0abca2fac0b00" +checksum = "ca5671e9ffce8ffba57afc24070e906da7fc4b1ba66f2cabebf61bf2ea257fcc" dependencies = [ "bitflags 1.3.2", - "glib 0.16.9", + "glib 0.18.5", "javascriptcore-rs-sys", ] [[package]] name = "javascriptcore-rs-sys" -version = "0.5.1" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98a216519a52cd941a733a0ad3f1023cfdb1cd47f3955e8e863ed56f558f916c" +checksum = "af1be78d14ffa4b75b66df31840478fef72b51f8c2465d4ca7c194da9f7a5124" dependencies = [ - "glib-sys 0.16.3", - "gobject-sys 0.16.3", + "glib-sys 0.18.1", + "gobject-sys 0.18.0", "libc", "system-deps 6.2.2", ] -[[package]] -name = "jni" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "039022cdf4d7b1cf548d31f60ae783138e5fd42013f6271049d7df7afadef96c" -dependencies = [ - "cesu8", - "combine", - "jni-sys", - "log", - "thiserror", - "walkdir", -] - [[package]] name = "jni" version = "0.21.1" @@ -2210,17 +2603,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "keyboard-types" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7668b7cff6a51fe61cdde64cd27c8a220786f399501b57ebe36f7d8112fd68" -dependencies = [ - "bitflags 1.3.2", - "serde", - "unicode-segmentation", -] - [[package]] name = "keyboard-types" version = "0.7.0" @@ -2233,24 +2615,39 @@ dependencies = [ ] [[package]] -name = "kuchiki" -version = "0.8.1" +name = "krates" +version = "0.16.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ea8e9c6e031377cff82ee3001dc8026cdf431ed4e2e6b51f98ab8c73484a358" +checksum = "7fcb3baf2360eb25ad31f0ada3add63927ada6db457791979b82ac199f835cb9" +dependencies = [ + "cargo-platform", + "cargo_metadata", + "cfg-expr", + "petgraph", + "semver", +] + +[[package]] +name = "kuchikiki" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f29e4755b7b995046f510a7520c42b2fed58b77bd94d5a87a8eb43d2fd126da8" dependencies = [ "cssparser", "html5ever", + "indexmap 1.9.3", "matches", "selectors", ] [[package]] name = "kurbo" -version = "0.9.5" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd85a5776cd9500c2e2059c8c76c3b01528566b7fcbaf8098b55a33fc298849b" +checksum = "6e5aa9f0f96a938266bdb12928a67169e8d22c6a786fda8ed984b85e6ba93c3c" dependencies = [ "arrayvec", + "smallvec", ] [[package]] @@ -2262,16 +2659,6 @@ dependencies = [ "log", ] -[[package]] -name = "lastlog" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6cd620618b3d9bcc37383986e4786208802ba17c57f3d576bbb79a905d9269d3" -dependencies = [ - "cached 0.40.0", - "libc", -] - [[package]] name = "lazy_static" version = "1.4.0" @@ -2280,9 +2667,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.153" +version = "0.2.155" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" [[package]] name = "libredox" @@ -2294,6 +2681,25 @@ dependencies = [ "libc", ] +[[package]] +name = "libxdo" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00333b8756a3d28e78def82067a377de7fa61b24909000aeaa2b446a948d14db" +dependencies = [ + "libxdo-sys", +] + +[[package]] +name = "libxdo-sys" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db23b9e7e2b7831bbd8aac0bbeeeb7b68cbebc162b227e7052e8e55829a09212" +dependencies = [ + "libc", + "x11", +] + [[package]] name = "linux-raw-sys" version = "0.3.8" @@ -2302,9 +2708,9 @@ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "locale_config" @@ -2344,6 +2750,15 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3bd0dd2cd90571056fdb71f6275fada10131182f84899f4b2a916e565d81d86" +[[package]] +name = "lru" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3262e75e648fce39813cb56ac41f3c3e3f65217ebf3844d818d1f9398cfb0dc" +dependencies = [ + "hashbrown 0.14.5", +] + [[package]] name = "mac" version = "0.1.1" @@ -2361,13 +2776,13 @@ dependencies = [ [[package]] name = "markup5ever" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a24f40fb03852d1cdd84330cddcaf98e9ec08a7b7768e952fad3b4cf048ec8fd" +checksum = "7a2629bb1404f3d34c2e921f21fd34ba00b206124c81f65c50b43b6aaefeb016" dependencies = [ "log", - "phf", - "phf_codegen", + "phf 0.10.1", + "phf_codegen 0.10.0", "string_cache", "string_cache_codegen", "tendril", @@ -2379,6 +2794,12 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" +[[package]] +name = "md5" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771" + [[package]] name = "memchr" version = "2.7.2" @@ -2387,9 +2808,9 @@ checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" [[package]] name = "memmap2" -version = "0.6.2" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d28bba84adfe6646737845bc5ebbfa2c08424eb1c37e94a1fd2a82adb56a872" +checksum = "fe751422e4a8caa417e13c3ea66452215d7d63e19e604f4980461212f3ae1322" dependencies = [ "libc", ] @@ -2405,24 +2826,43 @@ dependencies = [ [[package]] name = "miniz_oxide" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +checksum = "87dfd01fe195c66b572b37921ad8803d010623c0aca821bea2302239d155cdae" dependencies = [ "adler", "simd-adler32", ] [[package]] -name = "ndk" -version = "0.6.0" +name = "muda" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2032c77e030ddee34a6787a64166008da93f6a352b629261d0fee232b8742dd4" +checksum = "4c47e7625990fc1af2226ea4f34fb2412b03c12639fcb91868581eb3a6893453" +dependencies = [ + "cocoa", + "crossbeam-channel", + "gtk", + "keyboard-types", + "libxdo", + "objc", + "once_cell", + "png", + "thiserror", + "windows-sys 0.52.0", +] + +[[package]] +name = "ndk" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "451422b7e4718271c8b5b3aadf5adedba43dc76312454b387e98fae0fc951aa0" dependencies = [ "bitflags 1.3.2", "jni-sys", "ndk-sys", "num_enum", + "raw-window-handle 0.5.2", "thiserror", ] @@ -2434,9 +2874,9 @@ checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" [[package]] name = "ndk-sys" -version = "0.3.0" +version = "0.4.1+23.1.7779620" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e5a6ae77c8ee183dcbbba6150e2e6b9f3f4196a7666c02a715a95692ec1fa97" +checksum = "3cf2aae958bd232cac5069850591667ad422d263686d75b52a065f9badeee5a3" dependencies = [ "jni-sys", ] @@ -2455,7 +2895,7 @@ dependencies = [ "env_logger", "futures-channel", "glib 0.19.0", - "keyboard-types 0.6.2", + "keyboard-types", "log", "nm", "once_cell", @@ -2469,6 +2909,18 @@ version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" +[[package]] +name = "nix" +version = "0.27.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" +dependencies = [ + "bitflags 2.5.0", + "cfg-if", + "libc", + "memoffset", +] + [[package]] name = "nm" version = "0.4.0" @@ -2509,10 +2961,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" [[package]] -name = "num-traits" -version = "0.2.18" +name = "nu-ansi-term" +version = "0.46.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", ] @@ -2542,7 +3004,7 @@ version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 1.0.109", @@ -2589,9 +3051,9 @@ dependencies = [ [[package]] name = "object" -version = "0.32.2" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "b8ec7ab813848ba4522158d5517a6093db1ded27575b070f4177b8d12b41db5e" dependencies = [ "memchr", ] @@ -2617,16 +3079,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "ordered-multimap" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ed8acf08e98e744e5384c8bc63ceb0364e68a6854187221c18df61c4797690e" -dependencies = [ - "dlv-list", - "hashbrown 0.13.2", -] - [[package]] name = "ordered-multimap" version = "0.7.3" @@ -2634,18 +3086,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49203cdcae0030493bad186b28da2fa25645fa276a51b6fec8010d281e02ef79" dependencies = [ "dlv-list", - "hashbrown 0.14.3", + "hashbrown 0.14.5", ] [[package]] -name = "pango" -version = "0.16.5" +name = "ordered-stream" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdff66b271861037b89d028656184059e03b0b6ccb36003820be19f7200b1e94" +checksum = "9aa2b01e1d916879f73a53d01d1d6cee68adbb31d6d9177a8cfce093cced1d50" dependencies = [ - "bitflags 1.3.2", - "gio 0.16.7", - "glib 0.16.9", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + +[[package]] +name = "pango" +version = "0.18.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ca27ec1eb0457ab26f3036ea52229edbdb74dee1edd29063f5b9b010e7ebee4" +dependencies = [ + "gio 0.18.4", + "glib 0.18.5", "libc", "once_cell", "pango-sys", @@ -2653,12 +3120,12 @@ dependencies = [ [[package]] name = "pango-sys" -version = "0.16.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e134909a9a293e04d2cc31928aa95679c5e4df954d0b85483159bd20d8f047f" +checksum = "436737e391a843e5933d6d9aa102cb126d501e815b83601365a948a518555dc5" dependencies = [ - "glib-sys 0.16.3", - "gobject-sys 0.16.3", + "glib-sys 0.18.1", + "gobject-sys 0.18.0", "libc", "system-deps 6.2.2", ] @@ -2671,9 +3138,9 @@ checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" [[package]] name = "parking_lot" -version = "0.12.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e4af0ca4f6caed20e900d564c242b8e5d4903fdacf31d3daf527b66fe6f42fb" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", "parking_lot_core", @@ -2698,6 +3165,16 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +[[package]] +name = "petgraph" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" +dependencies = [ + "fixedbitset", + "indexmap 2.2.6", +] + [[package]] name = "phf" version = "0.8.0" @@ -2709,6 +3186,15 @@ dependencies = [ "proc-macro-hack", ] +[[package]] +name = "phf" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259" +dependencies = [ + "phf_shared 0.10.0", +] + [[package]] name = "phf_codegen" version = "0.8.0" @@ -2719,6 +3205,16 @@ dependencies = [ "phf_shared 0.8.0", ] +[[package]] +name = "phf_codegen" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fb1c3a8bc4dd4e5cfce29b44ffc14bedd2ee294559a294e2a4d4c9e9a6a13cd" +dependencies = [ + "phf_generator 0.10.0", + "phf_shared 0.10.0", +] + [[package]] name = "phf_generator" version = "0.8.0" @@ -2759,7 +3255,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c00cf8b9eafe68dde5e9eaa2cef8ee84a9336a47d566ec55ca16589633b65af7" dependencies = [ - "siphasher", + "siphasher 0.3.11", ] [[package]] @@ -2768,7 +3264,7 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" dependencies = [ - "siphasher", + "siphasher 0.3.11", ] [[package]] @@ -2777,6 +3273,26 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315" +[[package]] +name = "pin-project" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + [[package]] name = "pin-project-lite" version = "0.2.14" @@ -2791,9 +3307,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "piper" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4" +checksum = "464db0c665917b13ebb5d453ccdec4add5658ee1adc7affc7677615356a8afaf" dependencies = [ "atomic-waker", "fastrand 2.1.0", @@ -2850,6 +3366,12 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "pollster" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22686f4785f02a4fcc856d3b3bb19bf6c8160d103f7a99cc258bddd0251dc7f2" + [[package]] name = "ppv-lite86" version = "0.2.17" @@ -2864,12 +3386,12 @@ checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" [[package]] name = "prettyplease" -version = "0.2.19" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ac2cf0f2e4f42b49f5ffd07dae8d746508ef7526c13940e5f524012ae6c6550" +checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" dependencies = [ "proc-macro2", - "syn 2.0.60", + "syn 2.0.66", ] [[package]] @@ -2882,6 +3404,16 @@ dependencies = [ "toml_edit 0.19.15", ] +[[package]] +name = "proc-macro-crate" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b00f26d3400549137f92511a46ac1cd8ce37cb5598a96d382381458b992a5d24" +dependencies = [ + "toml_datetime", + "toml_edit 0.20.2", +] + [[package]] name = "proc-macro-error" version = "1.0.4" @@ -2914,22 +3446,13 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.81" +version = "1.0.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" +checksum = "ec96c6a92621310b51366f1e28d05ef11489516e93be030060e5fc12024a49d6" dependencies = [ "unicode-ident", ] -[[package]] -name = "quick-xml" -version = "0.30.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eff6510e86862b57b210fd8cbe8ed3f0d7d600b9c2863cd4549a2e033c66e956" -dependencies = [ - "memchr", -] - [[package]] name = "quote" version = "1.0.36" @@ -2999,7 +3522,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.14", + "getrandom 0.2.15", ] [[package]] @@ -3027,10 +3550,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" [[package]] -name = "rctree" -version = "0.5.0" +name = "raw-window-handle" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b42e27ef78c35d3998403c1d26f3efd9e135d3e5121b0a4845cc5cc27547f4f" +checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" + +[[package]] +name = "rayon" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] [[package]] name = "redox_syscall" @@ -3047,7 +3590,7 @@ version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" dependencies = [ - "getrandom 0.2.14", + "getrandom 0.2.15", "libredox", "thiserror", ] @@ -3083,9 +3626,9 @@ checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" [[package]] name = "resvg" -version = "0.35.0" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6554f47c38eca56827eea7f285c2a3018b4e12e0e195cc105833c008be338f1" +checksum = "c2327ced609dadeed3e9702fec3e6b2ddd208758a9268d13e06566c6101ba533" dependencies = [ "gif", "jpeg-decoder", @@ -3100,27 +3643,25 @@ dependencies = [ [[package]] name = "rfd" -version = "0.11.4" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fe664af397d2b6a13a8ba1d172a2b5c87c6c5149039edbf8fa122b98c9ed96f" +checksum = "25a73a7337fc24366edfca76ec521f51877b114e42dab584008209cca6719251" dependencies = [ - "async-io 1.13.0", + "ashpd", "block", "dispatch", - "futures-util", - "glib-sys 0.16.3", - "gobject-sys 0.16.3", - "gtk-sys", "js-sys", "log", "objc", "objc-foundation", "objc_id", - "raw-window-handle", + "pollster", + "raw-window-handle 0.6.2", + "urlencoding", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "windows", + "windows-sys 0.48.0", ] [[package]] @@ -3136,30 +3677,19 @@ dependencies = [ name = "rmenu" version = "1.2.2" dependencies = [ - "cached 0.44.0", "clap", "dioxus", "dioxus-desktop", - "dioxus-html", "env_logger", - "heck 0.4.1", - "keyboard-types 0.6.2", - "lastlog", + "heck 0.5.0", "log", - "once_cell", - "png", - "quick-xml", "regex", "resvg", "rmenu-plugin", "serde", "serde_json", "serde_yaml", - "shell-words", "shellexpand", - "strfmt", - "thiserror", - "which", "xdg", ] @@ -3167,21 +3697,11 @@ dependencies = [ name = "rmenu-plugin" version = "0.0.2" dependencies = [ - "bincode", "clap", "serde", "serde_json", ] -[[package]] -name = "roxmltree" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "862340e351ce1b271a378ec53f304a5558f7db87f3769dc655a8f6ecbb68b302" -dependencies = [ - "xmlparser", -] - [[package]] name = "roxmltree" version = "0.19.0" @@ -3192,21 +3712,12 @@ checksum = "3cd14fd5e3b777a7422cca79358c57a8f6e3a703d9ac187448d0daf220c2407f" name = "run" version = "0.0.1" dependencies = [ + "rayon", "rmenu-plugin", "serde_json", "walkdir", ] -[[package]] -name = "rust-ini" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e2a3bcec1f113553ef1c88aae6c020a369d03d55b58de9869a0908930385091" -dependencies = [ - "cfg-if", - "ordered-multimap 0.6.0", -] - [[package]] name = "rust-ini" version = "0.20.0" @@ -3214,14 +3725,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e0698206bcb8882bf2a9ecb4c1e7785db57ff052297085a6efd4fe42302068a" dependencies = [ "cfg-if", - "ordered-multimap 0.7.3", + "ordered-multimap", +] + +[[package]] +name = "rust-ini" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d625ed57d8f49af6cfa514c42e1a71fadcff60eb0b1c517ff82fe41aa025b41" +dependencies = [ + "cfg-if", + "ordered-multimap", + "trim-in-place", ] [[package]] name = "rustc-demangle" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc-hash" @@ -3261,31 +3783,31 @@ dependencies = [ "bitflags 2.5.0", "errno", "libc", - "linux-raw-sys 0.4.13", + "linux-raw-sys 0.4.14", "windows-sys 0.52.0", ] [[package]] name = "rustybuzz" -version = "0.7.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "162bdf42e261bee271b3957691018634488084ef577dddeb6420a9684cab2a6a" +checksum = "88117946aa1bfb53c2ae0643ceac6506337f44887f8c9fbfb43587b1cc52ba49" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.5.0", "bytemuck", "smallvec", - "ttf-parser 0.18.1", + "ttf-parser", "unicode-bidi-mirroring", "unicode-ccc", - "unicode-general-category", + "unicode-properties", "unicode-script", ] [[package]] name = "ryu" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "same-file" @@ -3314,8 +3836,8 @@ dependencies = [ "fxhash", "log", "matches", - "phf", - "phf_codegen", + "phf 0.8.0", + "phf_codegen 0.8.0", "precomputed-hash", "servo_arc", "smallvec", @@ -3324,15 +3846,27 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +dependencies = [ + "serde", +] + +[[package]] +name = "send_wrapper" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" +dependencies = [ + "futures-core", +] [[package]] name = "serde" -version = "1.0.199" +version = "1.0.203" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c9f6e76df036c77cd94996771fb40db98187f096dd0b9af39c6c6e452ba966a" +checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" dependencies = [ "serde_derive", ] @@ -3349,26 +3883,37 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.199" +version = "1.0.203" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11bd257a6541e141e42ca6d24ae26f7714887b47e89aa739099104c7e4d3b7fc" +checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.66", ] [[package]] name = "serde_json" -version = "1.0.116" +version = "1.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" +checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" dependencies = [ "itoa 1.0.11", "ryu", "serde", ] +[[package]] +name = "serde_qs" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0431a35568651e363364210c91983c1da5eb29404d9f0928b67d4ebcfa7d330c" +dependencies = [ + "percent-encoding", + "serde", + "thiserror", +] + [[package]] name = "serde_repr" version = "0.1.19" @@ -3377,14 +3922,14 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.66", ] [[package]] name = "serde_spanned" -version = "0.6.5" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" +checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" dependencies = [ "serde", ] @@ -3395,13 +3940,65 @@ version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap", + "indexmap 2.2.6", "itoa 1.0.11", "ryu", "serde", "unsafe-libyaml", ] +[[package]] +name = "server_fn" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "536a5b959673643ee01e59ae41bf01425482c8070dee95d7061ee2d45296b59c" +dependencies = [ + "bytes", + "const_format", + "dashmap", + "futures", + "gloo-net", + "http 1.1.0", + "js-sys", + "once_cell", + "send_wrapper", + "serde", + "serde_json", + "serde_qs", + "server_fn_macro_default", + "thiserror", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams", + "web-sys", + "xxhash-rust", +] + +[[package]] +name = "server_fn_macro" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "064dd9b256e78bf2886774f265cc34d2aefdd05b430c58c78a69eceef21b5e60" +dependencies = [ + "const_format", + "convert_case 0.6.0", + "proc-macro2", + "quote", + "syn 2.0.66", + "xxhash-rust", +] + +[[package]] +name = "server_fn_macro_default" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4ad11700cbccdbd313703916eb8c97301ee423c4a06e5421b77956fdcb36a9f" +dependencies = [ + "server_fn_macro", + "syn 2.0.66", +] + [[package]] name = "servo_arc" version = "0.1.1" @@ -3412,6 +4009,17 @@ dependencies = [ "stable_deref_trait", ] +[[package]] +name = "sha1" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + [[package]] name = "sha2" version = "0.10.8" @@ -3424,10 +4032,13 @@ dependencies = [ ] [[package]] -name = "shell-words" -version = "1.1.0" +name = "sharded-slab" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] [[package]] name = "shellexpand" @@ -3438,6 +4049,25 @@ dependencies = [ "dirs 5.0.1", ] +[[package]] +name = "signal-hook" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" +dependencies = [ + "libc", + "signal-hook-registry", +] + +[[package]] +name = "signal-hook-registry" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" +dependencies = [ + "libc", +] + [[package]] name = "simd-adler32" version = "0.3.7" @@ -3459,6 +4089,12 @@ version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" +[[package]] +name = "siphasher" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" + [[package]] name = "slab" version = "0.4.9" @@ -3468,6 +4104,36 @@ dependencies = [ "autocfg", ] +[[package]] +name = "sledgehammer_bindgen" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcfaf791ff02f48f3518ce825d32cf419c13a43c1d8b1232f74ac89f339c46d2" +dependencies = [ + "sledgehammer_bindgen_macro", +] + +[[package]] +name = "sledgehammer_bindgen_macro" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdd941cc539bd3dc694edaf9d0c4e1221d02baa67c6b45ec04fad1024d9e8139" +dependencies = [ + "quote", + "syn 2.0.66", +] + +[[package]] +name = "sledgehammer_utils" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f20798defa0e9d4eff9ca451c7f84774c7378a9c3b5a40112cfa2b3eadb97ae2" +dependencies = [ + "lru", + "once_cell", + "rustc-hash", +] + [[package]] name = "slotmap" version = "1.0.7" @@ -3477,12 +4143,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "smallbox" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d92359f97e6b417da4328a970cf04a044db104fbd57f7d72cb7ff665bb8806af" - [[package]] name = "smallvec" version = "1.13.2" @@ -3501,28 +4161,26 @@ dependencies = [ [[package]] name = "soup3" -version = "0.3.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82bc46048125fefd69d30b32b9d263d6556c9ffe82a7a7df181a86d912da5616" +checksum = "471f924a40f31251afc77450e781cb26d55c0b650842efafc9c6cbd2f7cc4f9f" dependencies = [ - "bitflags 1.3.2", "futures-channel", - "gio 0.16.7", - "glib 0.16.9", + "gio 0.18.4", + "glib 0.18.5", "libc", - "once_cell", "soup3-sys", ] [[package]] name = "soup3-sys" -version = "0.3.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "014bbeb1c4cdb30739dc181e8d98b7908f124d9555843afa89b5570aaf4ec62b" +checksum = "7ebe8950a680a12f24f15ebe1bf70db7af98ad242d9db43596ad3108aab86c27" dependencies = [ - "gio-sys 0.16.3", - "glib-sys 0.16.3", - "gobject-sys 0.16.3", + "gio-sys 0.18.1", + "glib-sys 0.18.1", + "gobject-sys 0.18.0", "libc", "system-deps 6.2.2", ] @@ -3543,10 +4201,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] -name = "strfmt" -version = "0.2.4" +name = "static_assertions" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a8348af2d9fc3258c8733b8d9d8db2e56f54b2363a4b5b81585c7875ed65e65" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "strict-num" @@ -3583,12 +4241,6 @@ dependencies = [ "quote", ] -[[package]] -name = "strsim" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - [[package]] name = "strsim" version = "0.11.1" @@ -3615,12 +4267,12 @@ dependencies = [ [[package]] name = "svgtypes" -version = "0.11.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed4b0611e7f3277f68c0fa18e385d9e2d26923691379690039548f867cef02a7" +checksum = "fae3064df9b89391c9a76a0425a69d124aee9c5c28455204709e72c39868a43c" dependencies = [ "kurbo", - "siphasher", + "siphasher 1.0.1", ] [[package]] @@ -3636,9 +4288,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.60" +version = "2.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" +checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" dependencies = [ "proc-macro2", "quote", @@ -3669,36 +4321,28 @@ dependencies = [ "cfg-expr", "heck 0.5.0", "pkg-config", - "toml 0.8.12", + "toml 0.8.2", "version-compare 0.2.0", ] [[package]] name = "tao" -version = "0.19.1" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "746ae5d0ca57ae275a792f109f6e992e0b41a443abdf3f5c6eff179ef5b3443a" +checksum = "69ebbccb78deb5a36744c079eea2981b4a48ecbbe6b1b2ffbaa528bea3f5e5db" dependencies = [ "bitflags 1.3.2", - "cairo-rs", - "cc", "cocoa", "core-foundation", "core-graphics", "crossbeam-channel", "dispatch", - "gdk", - "gdk-pixbuf", - "gdk-sys", + "dlopen2", "gdkwayland-sys", "gdkx11-sys", - "gio 0.16.7", - "glib 0.16.9", - "glib-sys 0.16.3", "gtk", - "image", "instant", - "jni 0.20.0", + "jni", "lazy_static", "libc", "log", @@ -3708,15 +4352,14 @@ dependencies = [ "objc", "once_cell", "parking_lot", - "png", - "raw-window-handle", + "raw-window-handle 0.5.2", + "raw-window-handle 0.6.2", "scopeguard", - "serde", "tao-macros", "unicode-segmentation", - "uuid", - "windows", - "windows-implement", + "url", + "windows 0.54.0", + "windows-version", "x11-dl", ] @@ -3743,6 +4386,18 @@ version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f227968ec00f0e5322f9b8173c7a0cbcff6181a0a5b28e9892491c286277231" +[[package]] +name = "tempfile" +version = "3.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +dependencies = [ + "cfg-if", + "fastrand 2.1.0", + "rustix 0.38.34", + "windows-sys 0.52.0", +] + [[package]] name = "tendril" version = "0.4.3" @@ -3754,15 +4409,6 @@ dependencies = [ "utf-8", ] -[[package]] -name = "termcolor" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" -dependencies = [ - "winapi-util", -] - [[package]] name = "thin-slice" version = "0.1.1" @@ -3771,22 +4417,32 @@ checksum = "8eaa81235c7058867fa8c0e7314f33dcce9c215f535d1913822a2b3f5e289f3c" [[package]] name = "thiserror" -version = "1.0.59" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0126ad08bff79f29fc3ae6a55cc72352056dfff61e3ff8bb7129476d44b23aa" +checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.59" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1cd413b5d558b4c5bf3680e324a6fa5014e7b7c067a51e69dbdf47eb7148b66" +checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.66", +] + +[[package]] +name = "thread_local" +version = "1.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +dependencies = [ + "cfg-if", + "once_cell", ] [[package]] @@ -3800,9 +4456,9 @@ dependencies = [ [[package]] name = "tiny-skia" -version = "0.10.0" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7db11798945fa5c3e5490c794ccca7c6de86d3afdd54b4eb324109939c6f37bc" +checksum = "83d13394d44dae3207b52a326c0c85a8bf87f1541f23b0d143811088497b09ab" dependencies = [ "arrayref", "arrayvec", @@ -3815,9 +4471,9 @@ dependencies = [ [[package]] name = "tiny-skia-path" -version = "0.10.0" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f60aa35c89ac2687ace1a2556eaaea68e8c0d47408a2e3e7f5c98a489e7281c" +checksum = "9c9e7fc0c2e86a30b117d0462aa261b72b7a99b7ebd7deb3a14ceda95c5bdc93" dependencies = [ "arrayref", "bytemuck", @@ -3854,7 +4510,6 @@ dependencies = [ "backtrace", "bytes", "num_cpus", - "parking_lot", "pin-project-lite", "tokio-macros", ] @@ -3867,7 +4522,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.66", ] [[package]] @@ -3881,21 +4536,21 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.12" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3" +checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.12", + "toml_edit 0.20.2", ] [[package]] name = "toml_datetime" -version = "0.6.5" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" dependencies = [ "serde", ] @@ -3906,22 +4561,22 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap", + "indexmap 2.2.6", "toml_datetime", - "winnow 0.5.40", + "winnow", ] [[package]] name = "toml_edit" -version = "0.22.12" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3328d4f68a705b2a4498da1d580585d39a6510f98318a2cec3018a7ec61ddef" +checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" dependencies = [ - "indexmap", + "indexmap 2.2.6", "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.7", + "winnow", ] [[package]] @@ -3943,7 +4598,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.66", ] [[package]] @@ -3953,19 +4608,45 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", + "valuable", ] [[package]] -name = "ttf-parser" -version = "0.18.1" +name = "tracing-log" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0609f771ad9c6155384897e1df4d948e692667cc0588548b68eb44d052b27633" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +dependencies = [ + "nu-ansi-term", + "sharded-slab", + "smallvec", + "thread_local", + "tracing-core", + "tracing-log", +] + +[[package]] +name = "trim-in-place" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "343e926fc669bc8cde4fa3129ab681c63671bae288b1f1081ceee6d9d37904fc" [[package]] name = "ttf-parser" -version = "0.19.2" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49d64318d8311fc2668e48b63969f4343e0a85c4a109aa8460d6672e364b8bd1" +checksum = "17f77d76d837a7830fe1d4f12b7b4ba4192c1888001c7164257e4bc6d21d96b4" [[package]] name = "typenum" @@ -3973,6 +4654,17 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +[[package]] +name = "uds_windows" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89daebc3e6fd160ac4aa9fc8b3bf71e1f74fbf92367ae71fb83a037e8bf164b9" +dependencies = [ + "memoffset", + "tempfile", + "winapi", +] + [[package]] name = "unicode-bidi" version = "0.3.15" @@ -3981,21 +4673,15 @@ checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-bidi-mirroring" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56d12260fb92d52f9008be7e4bca09f584780eb2266dc8fecc6a192bec561694" +checksum = "23cb788ffebc92c5948d0e997106233eeb1d8b9512f93f41651f52b6c5f5af86" [[package]] name = "unicode-ccc" -version = "0.1.2" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc2520efa644f8268dce4dcd3050eaa7fc044fca03961e9998ac7e2e92b77cf1" - -[[package]] -name = "unicode-general-category" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2281c8c1d221438e373249e065ca4989c4c36952c211ff21a0ee91c44a3869e7" +checksum = "1df77b101bcc4ea3d78dafc5ad7e4f58ceffe0b2b16bf446aeb50b6cb4157656" [[package]] name = "unicode-ident" @@ -4012,6 +4698,12 @@ dependencies = [ "tinyvec", ] +[[package]] +name = "unicode-properties" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4259d9d4425d9f0661581b804cb85fe66a4c631cadd8f490d1c13a35d5d9291" + [[package]] name = "unicode-script" version = "0.5.6" @@ -4030,6 +4722,12 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1d386ff53b415b7fe27b50bb44679e2cc4660272694b7b6f3326d8480823a94" +[[package]] +name = "unicode-xid" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" + [[package]] name = "unsafe-libyaml" version = "0.2.11" @@ -4045,6 +4743,7 @@ dependencies = [ "form_urlencoded", "idna", "percent-encoding", + "serde", ] [[package]] @@ -4055,63 +4754,29 @@ checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" [[package]] name = "usvg" -version = "0.35.0" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14d09ddfb0d93bf84824c09336d32e42f80961a9d1680832eb24fdf249ce11e6" -dependencies = [ - "base64 0.21.7", - "log", - "pico-args", - "usvg-parser", - "usvg-text-layout", - "usvg-tree", - "xmlwriter", -] - -[[package]] -name = "usvg-parser" -version = "0.35.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d19bf93d230813599927d88557014e0908ecc3531666d47c634c6838bc8db408" +checksum = "5c704361d822337cfc00387672c7b59eaa72a1f0744f62b2a68aa228a0c6927d" dependencies = [ + "base64 0.22.1", "data-url", "flate2", + "fontdb", "imagesize", "kurbo", "log", - "roxmltree 0.18.1", - "simplecss", - "siphasher", - "svgtypes", - "usvg-tree", -] - -[[package]] -name = "usvg-text-layout" -version = "0.35.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "035044604e89652c0a2959b8b356946997a52649ba6cade45928c2842376feb4" -dependencies = [ - "fontdb", - "kurbo", - "log", + "pico-args", + "roxmltree", "rustybuzz", - "unicode-bidi", - "unicode-script", - "unicode-vo", - "usvg-tree", -] - -[[package]] -name = "usvg-tree" -version = "0.35.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7939a7e4ed21cadb5d311d6339730681c3e24c3e81d60065be80e485d3fc8b92" -dependencies = [ - "rctree", + "simplecss", + "siphasher 1.0.1", "strict-num", "svgtypes", "tiny-skia-path", + "unicode-bidi", + "unicode-script", + "unicode-vo", + "xmlwriter", ] [[package]] @@ -4131,15 +4796,18 @@ name = "uuid" version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" -dependencies = [ - "getrandom 0.2.14", -] + +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" [[package]] name = "value-bag" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74797339c3b98616c009c7c3eb53a0ce41e85c8ec66bd3db96ed132d20cfdee8" +checksum = "5a84c137d37ab0142f0f2ddfe332651fdbf252e7b7dbb4e67b6c1f1b2e925101" [[package]] name = "version-compare" @@ -4161,9 +4829,9 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "waker-fn" -version = "1.1.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" +checksum = "317211a0dc0ceedd78fb2ca9a44aed3d7b9b26f81870d485c07122b4350673b7" [[package]] name = "walkdir" @@ -4208,7 +4876,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.66", "wasm-bindgen-shared", ] @@ -4242,7 +4910,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.66", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -4253,6 +4921,19 @@ version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +[[package]] +name = "wasm-streams" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + [[package]] name = "web-sys" version = "0.3.69" @@ -4271,30 +4952,30 @@ checksum = "db67ae75a9405634f5882791678772c94ff5f16a66535aae186e26aa0841fc8b" dependencies = [ "core-foundation", "home", - "jni 0.21.1", + "jni", "log", "ndk-context", "objc", - "raw-window-handle", + "raw-window-handle 0.5.2", "url", "web-sys", ] [[package]] name = "webkit2gtk" -version = "0.19.2" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8eea819afe15eb8dcdff4f19d8bfda540bae84d874c10e6f4b8faf2d6704bd1" +checksum = "76b1bc1e54c581da1e9f179d0b38512ba358fb1af2d634a1affe42e37172361a" dependencies = [ "bitflags 1.3.2", "cairo-rs", "gdk", "gdk-sys", - "gio 0.16.7", - "gio-sys 0.16.3", - "glib 0.16.9", - "glib-sys 0.16.3", - "gobject-sys 0.16.3", + "gio 0.18.4", + "gio-sys 0.18.1", + "glib 0.18.5", + "glib-sys 0.18.1", + "gobject-sys 0.18.0", "gtk", "gtk-sys", "javascriptcore-rs", @@ -4306,16 +4987,16 @@ dependencies = [ [[package]] name = "webkit2gtk-sys" -version = "0.19.1" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0ac7a95ddd3fdfcaf83d8e513b4b1ad101b95b413b6aa6662ed95f284fc3d5b" +checksum = "62daa38afc514d1f8f12b8693d30d5993ff77ced33ce30cd04deebc267a6d57c" dependencies = [ "bitflags 1.3.2", "cairo-sys-rs", "gdk-sys", - "gio-sys 0.16.3", - "glib-sys 0.16.3", - "gobject-sys 0.16.3", + "gio-sys 0.18.1", + "glib-sys 0.18.1", + "gobject-sys 0.18.0", "gtk-sys", "javascriptcore-rs-sys", "libc", @@ -4326,40 +5007,38 @@ dependencies = [ [[package]] name = "webview2-com" -version = "0.22.1" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11296e5daf3a653b79bf47d66c380e4143d5b9c975818871179a3bda79499562" +checksum = "e0ae9c7e420783826cf769d2c06ac9ba462f450eca5893bb8c6c6529a4e5dd33" dependencies = [ "webview2-com-macros", "webview2-com-sys", - "windows", - "windows-implement", + "windows 0.52.0", + "windows-core 0.52.0", + "windows-implement 0.52.0", + "windows-interface 0.52.0", ] [[package]] name = "webview2-com-macros" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaebe196c01691db62e9e4ca52c5ef1e4fd837dcae27dae3ada599b5a8fd05ac" +checksum = "ac1345798ecd8122468840bcdf1b95e5dc6d2206c5e4b0eafa078d061f59c9bc" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.66", ] [[package]] name = "webview2-com-sys" -version = "0.22.1" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde542bed28058a5b028d459689ee57f1d06685bb6c266da3b91b1be6703952f" +checksum = "d6ad85fceee6c42fa3d61239eba5a11401bf38407a849ed5ea1b407df08cca72" dependencies = [ - "regex", - "serde", - "serde_json", "thiserror", - "windows", - "windows-bindgen", - "windows-metadata", + "windows 0.52.0", + "windows-core 0.52.0", ] [[package]] @@ -4368,18 +5047,6 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082" -[[package]] -name = "which" -version = "4.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" -dependencies = [ - "either", - "home", - "once_cell", - "rustix 0.38.34", -] - [[package]] name = "winapi" version = "0.3.9" @@ -4424,52 +5091,99 @@ dependencies = [ [[package]] name = "windows" -version = "0.44.0" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e745dab35a0c4c77aa3ce42d595e13d2003d6902d6b08c9ef5fc326d08da12b" +checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" dependencies = [ - "windows-implement", - "windows-interface", - "windows-targets 0.42.2", + "windows-core 0.52.0", + "windows-implement 0.52.0", + "windows-interface 0.52.0", + "windows-targets 0.52.5", ] [[package]] -name = "windows-bindgen" -version = "0.44.0" +name = "windows" +version = "0.54.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "222204ecf46521382a4d88b4a1bbefca9f8855697b4ab7d20803901425e061a3" +checksum = "9252e5725dbed82865af151df558e754e4a3c2c30818359eb17465f1346a1b49" dependencies = [ - "windows-metadata", - "windows-tokens", + "windows-core 0.54.0", + "windows-implement 0.53.0", + "windows-interface 0.53.0", + "windows-targets 0.52.5", +] + +[[package]] +name = "windows-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets 0.52.5", +] + +[[package]] +name = "windows-core" +version = "0.54.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12661b9c89351d684a50a8a643ce5f608e20243b9fb84687800163429f161d65" +dependencies = [ + "windows-result", + "windows-targets 0.52.5", ] [[package]] name = "windows-implement" -version = "0.44.0" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce87ca8e3417b02dc2a8a22769306658670ec92d78f1bd420d6310a67c245c6" +checksum = "12168c33176773b86799be25e2a2ba07c7aab9968b37541f1094dbd7a60c8946" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.66", +] + +[[package]] +name = "windows-implement" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "942ac266be9249c84ca862f0a164a39533dc2f6f33dc98ec89c8da99b82ea0bd" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", ] [[package]] name = "windows-interface" -version = "0.44.0" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "853f69a591ecd4f810d29f17e902d40e349fb05b0b11fff63b08b826bfe39c7f" +checksum = "9d8dc32e0095a7eeccebd0e3f09e9509365ecb3fc6ac4d6f5f14a3f6392942d1" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.66", ] [[package]] -name = "windows-metadata" -version = "0.44.0" +name = "windows-interface" +version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee78911e3f4ce32c1ad9d3c7b0bd95389662ad8d8f1a3155688fed70bd96e2b6" +checksum = "da33557140a288fae4e1d5f8873aaf9eb6613a9cf82c3e070223ff177f598b60" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "windows-result" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "749f0da9cc72d82e600d8d2e44cadd0b9eedb9038f71a1c58556ac1c5791813b" +dependencies = [ + "windows-targets 0.52.5", +] [[package]] name = "windows-sys" @@ -4545,10 +5259,13 @@ dependencies = [ ] [[package]] -name = "windows-tokens" -version = "0.44.0" +name = "windows-version" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa4251900975a0d10841c5d4bde79c56681543367ef811f3fabb8d1803b0959b" +checksum = "6998aa457c9ba8ff2fb9f13e9d2a930dabcea28f1d0ab94d687d8b3654844515" +dependencies = [ + "windows-targets 0.52.5", +] [[package]] name = "windows_aarch64_gnullvm" @@ -4691,52 +5408,49 @@ dependencies = [ "memchr", ] -[[package]] -name = "winnow" -version = "0.6.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14b9415ee827af173ebb3f15f9083df5a122eb93572ec28741fb153356ea2578" -dependencies = [ - "memchr", -] - [[package]] name = "wry" -version = "0.28.3" +version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d15f9f827d537cefe6d047be3930f5d89b238dfb85e08ba6a319153217635aa" +checksum = "8b717040ba9771fd88eb428c6ea6b555f8e734ff8534f02c13e8f10d97f5935e" dependencies = [ - "base64 0.13.1", + "base64 0.21.7", "block", + "cfg_aliases", "cocoa", "core-graphics", "crossbeam-channel", "dunce", - "gdk", - "gio 0.16.7", - "glib 0.16.9", + "gdkx11", "gtk", "html5ever", - "http", + "http 0.2.12", "javascriptcore-rs", - "kuchiki", + "jni", + "kuchikiki", "libc", "log", + "ndk", + "ndk-context", + "ndk-sys", "objc", "objc_id", "once_cell", + "percent-encoding", + "raw-window-handle 0.6.2", "serde", "serde_json", "sha2", "soup3", - "tao", + "tao-macros", "thiserror", - "url", "webkit2gtk", "webkit2gtk-sys", "webview2-com", - "windows", - "windows-implement", + "windows 0.52.0", + "windows-implement 0.52.0", + "windows-version", + "x11-dl", ] [[package]] @@ -4767,13 +5481,145 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "213b7324336b53d2414b2db8537e56544d981803139155afa84f76eeebb7a546" [[package]] -name = "xmlparser" -version = "0.13.6" +name = "xdg-home" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66fee0b777b0f5ac1c69bb06d361268faafa61cd4682ae064a171c16c433e9e4" +checksum = "21e5a325c3cb8398ad6cf859c1135b25dd29e186679cf2da7581d9679f63b38e" +dependencies = [ + "libc", + "winapi", +] [[package]] name = "xmlwriter" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec7a2a501ed189703dba8b08142f057e887dfc4b2cc4db2d343ac6376ba3e0b9" + +[[package]] +name = "xxhash-rust" +version = "0.8.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "927da81e25be1e1a2901d59b81b37dd2efd1fc9c9345a55007f09bf5a2d3ee03" + +[[package]] +name = "zbus" +version = "4.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b8e3d6ae3342792a6cc2340e4394334c7402f3d793b390d2c5494a4032b3030" +dependencies = [ + "async-broadcast", + "async-executor", + "async-fs", + "async-io 2.3.2", + "async-lock 3.3.0", + "async-process", + "async-recursion", + "async-task", + "async-trait", + "blocking", + "derivative", + "enumflags2", + "event-listener 5.3.1", + "futures-core", + "futures-sink", + "futures-util", + "hex", + "nix", + "ordered-stream", + "rand 0.8.5", + "serde", + "serde_repr", + "sha1", + "static_assertions", + "tracing", + "uds_windows", + "windows-sys 0.52.0", + "xdg-home", + "zbus_macros", + "zbus_names", + "zvariant", +] + +[[package]] +name = "zbus_macros" +version = "4.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7a3e850ff1e7217a3b7a07eba90d37fe9bb9e89a310f718afcde5885ca9b6d7" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro2", + "quote", + "regex", + "syn 1.0.109", + "zvariant_utils", +] + +[[package]] +name = "zbus_names" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b9b1fef7d021261cc16cba64c351d291b715febe0fa10dc3a443ac5a5022e6c" +dependencies = [ + "serde", + "static_assertions", + "zvariant", +] + +[[package]] +name = "zerocopy" +version = "0.7.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae87e3fcd617500e5d106f0380cf7b77f3c6092aae37191433159dda23cfb087" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "zvariant" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e09e8be97d44eeab994d752f341e67b3b0d80512a8b315a0671d47232ef1b65" +dependencies = [ + "endi", + "enumflags2", + "serde", + "static_assertions", + "url", + "zvariant_derive", +] + +[[package]] +name = "zvariant_derive" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72a5857e2856435331636a9fbb415b09243df4521a267c5bedcd5289b4d5799e" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro2", + "quote", + "syn 1.0.109", + "zvariant_utils", +] + +[[package]] +name = "zvariant_utils" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00bedb16a193cc12451873fee2a1bc6550225acece0e36f333e68326c73c8172" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] diff --git a/plugin-network/Cargo.toml b/plugin-network/Cargo.toml index 993c58a..9e4624c 100644 --- a/plugin-network/Cargo.toml +++ b/plugin-network/Cargo.toml @@ -6,19 +6,19 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -anyhow = "1.0.72" +anyhow = "1.0.86" async-std = "1.12.0" -clap = { version = "4.3.21", features = ["derive"] } -dioxus = "0.4.3" -dioxus-desktop = "0.4.3" -dioxus-free-icons = { version = "0.7.0", features = ["font-awesome-regular"] } -dioxus-html = "0.4.3" -env_logger = "0.10.0" -futures-channel = "0.3.28" +clap = { version = "4.5.4", features = ["derive"] } +dioxus = "0.5.1" +dioxus-desktop = "0.5.1" +dioxus-free-icons = { version = "0.8.5", features = ["font-awesome-regular"] } +dioxus-html = "0.5.1" +env_logger = "0.11.3" +futures-channel = "0.3.30" glib = { git = "https://github.com/gtk-rs/gtk-rs-core", rev = 'cab7e1c549675cbe98af461ebbcc04c33c8f1295' } -keyboard-types = "0.6.2" -log = "0.4.20" +keyboard-types = "0.7.0" +log = "0.4.21" nm = { git = "https://github.com/imgurbot12/libnm-rs.git", version = "0.4.0" } -once_cell = "1.18.0" +once_cell = "1.19.0" rmenu-plugin = { version = "0.0.2", path = "../rmenu-plugin" } -serde_json = "1.0.104" +serde_json = "1.0.117" diff --git a/plugin-window/Cargo.toml b/plugin-window/Cargo.toml index 08912bb..adffc22 100644 --- a/plugin-window/Cargo.toml +++ b/plugin-window/Cargo.toml @@ -10,8 +10,8 @@ default = ["sway"] sway = [] [dependencies] -anyhow = "1.0.72" -clap = { version = "4.3.21", features = ["derive"] } +anyhow = "1.0.86" +clap = { version = "4.5.4", features = ["derive"] } rmenu-plugin = { version = "0.0.2", path = "../rmenu-plugin" } -serde = { version = "1.0.183", features = ["derive"] } -serde_json = "1.0.104" +serde = { version = "1.0.203", features = ["derive"] } +serde_json = "1.0.117" diff --git a/rmenu-plugin/Cargo.toml b/rmenu-plugin/Cargo.toml index 329b486..8874a91 100644 --- a/rmenu-plugin/Cargo.toml +++ b/rmenu-plugin/Cargo.toml @@ -14,7 +14,6 @@ name = "rmenu-build" path = "src/bin/main.rs" [dependencies] -bincode = "1.3.3" -clap = { version = "4.3.22", features = ["derive"] } -serde = { version = "1.0.171", features = ["derive"] } -serde_json = "1.0.105" +clap = { version = "4.5.4", features = ["derive"] } +serde = { version = "1.0.203", features = ["derive"] } +serde_json = "1.0.117" diff --git a/rmenu/Cargo.toml b/rmenu/Cargo.toml index bf1e004..c627fc0 100644 --- a/rmenu/Cargo.toml +++ b/rmenu/Cargo.toml @@ -6,28 +6,17 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -cached = "0.44.0" -clap = { version = "4.3.15", features = ["derive", "env"] } -dioxus = "0.4.3" -dioxus-desktop = "0.4.3" -dioxus-html = "0.4.3" -env_logger = "0.10.0" -heck = "0.4.1" -keyboard-types = "0.6.2" -lastlog = { version = "0.2.3", features = ["libc"] } -log = "0.4.19" -once_cell = "1.18.0" -png = "0.17.9" -quick-xml = "0.30.0" -regex = { version = "1.9.1" } -resvg = "0.35.0" +clap = { version = "4.5.4", features = ["derive", "env"] } +dioxus = { version = "0.5.1", features = ["desktop"] } +dioxus-desktop = "0.5.1" +env_logger = "0.11.3" +heck = "0.5.0" +log = "0.4.21" +regex = { version = "1.10.4" } +resvg = "0.41.0" rmenu-plugin = { version = "0.0.2", path = "../rmenu-plugin" } -serde = { version = "1.0.171", features = ["derive"] } -serde_json = "1.0.103" -serde_yaml = "0.9.24" -shell-words = "1.1.0" +serde = { version = "1.0.203", features = ["derive"] } +serde_json = "1.0.117" +serde_yaml = "0.9.34" shellexpand = "3.1.0" -strfmt = "0.2.4" -thiserror = "1.0.43" -which = "4.4.0" xdg = "2.5.2" diff --git a/rmenu/src/cache.rs b/rmenu/src/cache.rs deleted file mode 100644 index 679f9fd..0000000 --- a/rmenu/src/cache.rs +++ /dev/null @@ -1,87 +0,0 @@ -//! RMenu Plugin Result Cache -use std::fs; -use std::path::PathBuf; -use std::time::{Duration, SystemTime}; - -use rmenu_plugin::Entry; -use thiserror::Error; - -use crate::config::{CacheSetting, PluginConfig}; -use crate::XDG_PREFIX; - -#[derive(Debug, Error)] -pub enum CacheError { - #[error("Cache Not Available")] - NotAvailable, - #[error("Cache Invalid")] - InvalidCache, - #[error("Cache Expired")] - CacheExpired, - #[error("Cache File Error")] - FileError(#[from] std::io::Error), - #[error("Encoding Error")] - EncodingError(#[from] serde_json::Error), -} - -#[inline] -fn cache_file(name: &str) -> PathBuf { - xdg::BaseDirectories::with_prefix(XDG_PREFIX) - .expect("Failed to read xdg base dirs") - .place_cache_file(format!("{name}.cache")) - .expect("Failed to write xdg cache dirs") -} - -/// Read Entries from Cache (if Valid and Available) -pub fn read_cache(name: &str, cfg: &PluginConfig) -> Result, CacheError> { - // confirm cache exists - let path = cache_file(name); - if !path.exists() { - return Err(CacheError::NotAvailable); - } - // get file modified date - let meta = path.metadata()?; - let modified = meta.modified()?; - // confirm cache is not expired - match cfg.cache { - CacheSetting::NoCache => return Err(CacheError::InvalidCache), - CacheSetting::Never => {} - CacheSetting::OnLogin => { - if let Ok(record) = lastlog::search_self() { - if let Some(last) = record.last_login.into() { - if modified <= last { - return Err(CacheError::CacheExpired); - } - } - } - } - CacheSetting::AfterSeconds(secs) => { - let now = SystemTime::now(); - let duration = Duration::from_secs(secs as u64); - let diff = now - .duration_since(modified) - .unwrap_or_else(|_| Duration::from_secs(0)); - if diff >= duration { - return Err(CacheError::CacheExpired); - } - } - } - // attempt to read content - let data = fs::read(path)?; - let results: Vec = serde_json::from_slice(&data)?; - Ok(results) -} - -/// Write Results to Cache (if Allowed) -pub fn write_cache(name: &str, cfg: &PluginConfig, entries: &Vec) -> Result<(), CacheError> { - // write cache if allowed - match cfg.cache { - CacheSetting::NoCache => {} - _ => { - log::debug!("{name:?} writing {} entries", entries.len()); - let path = cache_file(name); - let f = fs::File::create(path)?; - serde_json::to_writer(f, entries)?; - } - } - Ok(()) -} diff --git a/rmenu/src/cli.rs b/rmenu/src/cli.rs deleted file mode 100644 index 7ffeff5..0000000 --- a/rmenu/src/cli.rs +++ /dev/null @@ -1,443 +0,0 @@ -use std::fs::File; -use std::io::{BufRead, BufReader, Read}; -use std::path::PathBuf; -use std::process::{Command, ExitStatus, Stdio}; -use std::str::FromStr; -use std::{fmt::Display, fs::read_to_string}; - -use clap::Parser; -use rmenu_plugin::{Entry, Message}; -use thiserror::Error; - -use crate::config::{cfg_replace, Config, Keybind}; -use crate::{DEFAULT_CONFIG, DEFAULT_THEME, ENV_ACTIVE_PLUGINS, XDG_PREFIX}; - -/// Allowed Formats for Entry Ingestion -#[derive(Debug, Clone)] -pub enum Format { - Json, - DMenu, -} - -impl Display for Format { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - f.write_str(&format!("{self:?}").to_lowercase()) - } -} - -impl FromStr for Format { - type Err = String; - - fn from_str(s: &str) -> std::result::Result { - match s.to_ascii_lowercase().as_str() { - "json" => Ok(Format::Json), - "dmenu" => Ok(Format::DMenu), - _ => Err("No Such Format".to_owned()), - } - } -} - -/// Dynamic Applicaiton-Menu Tool (Built with Rust) -#[derive(Parser, Debug)] -#[command(author, version, about, long_about = None)] -#[command(propagate_version = true)] -pub struct Args { - // simple configuration arguments - /// Filepath for entry input - #[arg(short, long)] - input: Option, - /// Format to accept entries - #[arg(short, long, default_value_t=Format::Json)] - format: Format, - /// Plugins to run - #[arg(short, long)] - run: Vec, - /// Override default configuration path - #[arg(short, long, env = "RMENU_CONFIG")] - config: Option, - /// Override base css theme styling - #[arg(long, env = "RMENU_THEME")] - theme: Option, - /// Include additional css settings - #[arg(long, env = "RMENU_CSS")] - css: Option, - - // root config settings - /// Override terminal command - #[arg(long, env = "RMENU_TERMINAL")] - terminal: Option, - /// Number of results to include for each page - #[arg(long)] - page_size: Option, - /// Control ratio on when to load next page - #[arg(long)] - page_load: Option, - /// Force enable/disable comments - #[arg(long)] - use_icons: Option, - /// Force enable/disable comments - #[arg(long)] - use_comments: Option, - /// Allow Selection by Mouse Hover - #[arg(long)] - hover_select: Option, - /// Activate Menu Result with Single Click - #[arg(long)] - single_click: Option, - - // search settings - /// Enforce Regex Pattern on Search - #[arg(long)] - search_restrict: Option, - /// Enforce Minimum Length on Search - #[arg(long)] - search_min_length: Option, - /// Enforce Maximum Length on Search - #[arg(long)] - search_max_length: Option, - /// Force enable/disable regex in search - #[arg(long)] - search_regex: Option, - /// Force enable/disable ignore-case in search - #[arg(long)] - ignore_case: Option, - /// Override placeholder in searchbar - #[arg(short, long)] - placeholder: Option, - - // keybinding settings - /// Override exec keybind - #[arg(long)] - key_exec: Option>, - /// Override exit keybind - #[arg(long)] - key_exit: Option>, - /// Override move-next keybind - #[arg(long)] - key_move_next: Option>, - /// Override move-previous keybind - #[arg(long)] - key_move_prev: Option>, - /// Override open-menu keybind - #[arg(long)] - key_open_menu: Option>, - /// Override close-menu keybind - #[arg(long)] - key_close_menu: Option>, - /// Override jump-next keybind - #[arg(long)] - key_jump_next: Option>, - /// Override jump-previous keybind - #[arg(long)] - key_jump_prev: Option>, - - //window settings - /// Override Window Title - #[arg(long)] - title: Option, - /// Override Window Width - #[arg(long)] - width: Option, - /// Override Window Height - #[arg(long)] - height: Option, - /// Override Window X Position - #[arg(long)] - xpos: Option, - /// Override Window Y Position - #[arg(long)] - ypos: Option, - /// Override Window Focus on Startup - #[arg(long)] - focus: Option, - /// Override Window Decoration - #[arg(long)] - decorate: Option, - /// Override Window Transparent - #[arg(long)] - transparent: Option, - /// Override Window Always-On-Top - #[arg(long)] - always_top: Option, - /// Override Fullscreen Settings - #[arg(long)] - fullscreen: Option, -} - -#[derive(Error, Debug)] -pub enum RMenuError { - #[error("Invalid Config")] - InvalidConfig(#[from] serde_yaml::Error), - #[error("File Error")] - FileError(#[from] std::io::Error), - #[error("No Such Plugin")] - NoSuchPlugin(String), - #[error("Invalid Plugin Specified")] - InvalidPlugin(String), - #[error("Invalid Keybind Definition")] - InvalidKeybind(String), - #[error("Command Runtime Exception")] - CommandError(Option), - #[error("Invalid JSON Entry Object")] - InvalidJson(#[from] serde_json::Error), -} - -pub type Result = std::result::Result; - -impl Args { - /// Find a specifically named file across xdg config paths - fn find_xdg_file(&self, name: &str, base: &Option) -> Option { - return base - .clone() - .or_else(|| { - xdg::BaseDirectories::with_prefix(XDG_PREFIX) - .expect("Failed to read xdg base dirs") - .find_config_file(name) - }) - .map(|f| { - let f = f.to_string_lossy().to_string(); - shellexpand::tilde(&f).to_string() - }); - } - - /// Load Configuration File - pub fn get_config(&self) -> Result { - let config = self.find_xdg_file(DEFAULT_CONFIG, &self.config); - - if let Some(path) = config { - let config: Config = match read_to_string(path) { - Ok(content) => serde_yaml::from_str(&content), - Err(err) => { - log::error!("Failed to Load Config: {err:?}"); - Ok(Config::default()) - } - }?; - return Ok(config); - } - log::error!("Failed to Load Config: no file found in xdg config paths"); - Ok(Config::default()) - } - - /// Update Configuration w/ CLI Specified Settings - pub fn update_config(&self, mut config: Config) -> Config { - // override basic settings - config.terminal = self.terminal.clone().or_else(|| config.terminal); - config.page_size = self.page_size.unwrap_or(config.page_size); - config.page_load = self.page_load.unwrap_or(config.page_load); - config.use_icons = self.use_icons.unwrap_or(config.use_icons); - config.use_comments = self.use_icons.unwrap_or(config.use_comments); - config.hover_select = self.hover_select.unwrap_or(config.hover_select); - config.single_click = self.single_click.unwrap_or(config.single_click); - // override search settings - cfg_replace!(config.search.restrict, self.search_restrict); - cfg_replace!(config.search.min_length, self.search_min_length); - cfg_replace!(config.search.max_length, self.search_max_length); - cfg_replace!(config.search.use_regex, self.search_regex, true); - cfg_replace!(config.search.ignore_case, self.ignore_case, true); - cfg_replace!(config.search.placeholder, self.placeholder); - // override keybind settings - cfg_replace!(config.keybinds.exec, self.key_exec, true); - cfg_replace!(config.keybinds.exit, self.key_exit, true); - cfg_replace!(config.keybinds.move_next, self.key_move_next, true); - cfg_replace!(config.keybinds.move_prev, self.key_move_prev, true); - cfg_replace!(config.keybinds.open_menu, self.key_open_menu, true); - cfg_replace!(config.keybinds.close_menu, self.key_close_menu, true); - cfg_replace!(config.keybinds.jump_next, self.key_jump_next, true); - cfg_replace!(config.keybinds.jump_prev, self.key_jump_prev, true); - // override window settings - cfg_replace!(config.window.title, self.title, true); - cfg_replace!(config.window.size.width, self.width, true); - cfg_replace!(config.window.size.height, self.height, true); - cfg_replace!(config.window.position.x, self.xpos, true); - cfg_replace!(config.window.position.y, self.ypos, true); - cfg_replace!(config.window.focus, self.focus, true); - cfg_replace!(config.window.decorate, self.decorate, true); - cfg_replace!(config.window.transparent, self.transparent, true); - cfg_replace!(config.window.always_top, self.always_top, true); - cfg_replace!(config.window.fullscreen, self.fullscreen); - config - } - - /// Load CSS Theme or Default - pub fn get_theme(&self) -> String { - self.find_xdg_file(DEFAULT_THEME, &self.theme) - .map(read_to_string) - .map(|f| { - f.unwrap_or_else(|err| { - log::error!("Failed to load CSS: {err:?}"); - String::new() - }) - }) - .unwrap_or_else(String::new) - } - - /// Load Additional CSS or Default - pub fn get_css(&self, c: &Config) -> String { - let css = self - .css - .clone() - .map(|s| s.to_string_lossy().to_string()) - .or(c.css.clone()); - if let Some(path) = css { - let path = shellexpand::tilde(&path).to_string(); - match read_to_string(&path) { - Ok(css) => return css, - Err(err) => log::error!("Failed to load Theme: {err:?}"), - } - } - String::new() - } - - fn read_entries( - &mut self, - r: BufReader, - v: &mut Vec, - c: &mut Config, - ) -> Result<()> { - for line in r.lines().filter_map(|l| l.ok()) { - match &self.format { - Format::DMenu => v.push(Entry::echo(line.trim(), None)), - Format::Json => { - let msg: Message = serde_json::from_str(&line)?; - match msg { - Message::Entry(entry) => v.push(entry), - Message::Options(options) => c - .update(&options) - .map_err(|s| RMenuError::InvalidKeybind(s))?, - } - } - } - } - Ok(()) - } - - /// Read Entries from a Configured Input - fn load_input(&mut self, input: &str, config: &mut Config) -> Result> { - // retrieve input file - let input = if input == "-" { "/dev/stdin" } else { input }; - let fpath = shellexpand::tilde(input).to_string(); - // read entries into iterator and collect - log::info!("reading from: {fpath:?}"); - let file = File::open(fpath)?; - let reader = BufReader::new(file); - let mut entries = vec![]; - self.read_entries(reader, &mut entries, config)?; - Ok(entries) - } - - /// Read Entries from a Plugin Source - fn load_plugins(&mut self, config: &mut Config) -> Result> { - let mut entries = vec![]; - for name in self.run.clone().into_iter() { - // retrieve plugin configuration - log::info!("running plugin: {name:?}"); - let plugin = config - .plugins - .get(&name) - .cloned() - .ok_or_else(|| RMenuError::NoSuchPlugin(name.to_owned()))?; - // update config w/ plugin options when available - if let Some(options) = plugin.options.as_ref() { - config - .update(options) - .map_err(|e| RMenuError::InvalidKeybind(e))?; - } - // read cache when available - match crate::cache::read_cache(&name, &plugin) { - Err(err) => log::error!("cache read failed: {err:?}"), - Ok(cached) => { - entries.extend(cached); - continue; - } - } - // build command arguments - let args: Vec = plugin - .exec - .iter() - .map(|s| shellexpand::tilde(s).to_string()) - .collect(); - let main = args - .get(0) - .ok_or_else(|| RMenuError::InvalidPlugin(name.to_owned()))?; - // spawn command - let mut command = Command::new(main) - .args(&args[1..]) - .stdout(Stdio::piped()) - .spawn()?; - let stdout = command - .stdout - .as_mut() - .ok_or_else(|| RMenuError::CommandError(None))?; - // parse and read entries into vector of results - let reader = BufReader::new(stdout); - let mut entry = vec![]; - self.read_entries(reader, &mut entry, config)?; - let status = command.wait()?; - if !status.success() { - return Err(RMenuError::CommandError(Some(status))); - } - // finalize settings and save to cache - if config.search.placeholder.is_none() { - config.search.placeholder = plugin.placeholder.clone(); - } - match crate::cache::write_cache(&name, &plugin, &entry) { - Ok(_) => {} - Err(err) => log::error!("cache write error: {err:?}"), - } - // write collected entries to main output - entries.append(&mut entry); - } - Ok(entries) - } - - /// Load Entries from Enabled/Configured Entry-Sources - pub fn get_entries(&mut self, config: &mut Config) -> Result> { - // configure default source if none are given - let mut input = self.input.clone(); - let mut entries = vec![]; - if input.is_none() && self.run.is_empty() { - input = Some("-".to_owned()); - } - // load entries - if let Some(input) = input { - entries.extend(self.load_input(&input, config)?); - } - entries.extend(self.load_plugins(config)?); - Ok(entries) - } - - /// Configure Environment Variables for Multi-Stage Execution - pub fn set_env(&self) { - let mut running = self.run.join(","); - if let Ok(already_running) = std::env::var(ENV_ACTIVE_PLUGINS) { - running = format!("{running},{already_running}"); - } - std::env::set_var(ENV_ACTIVE_PLUGINS, running); - } - - /// Load Settings from Environment Variables for Multi-Stage Execution - pub fn load_env(&mut self, config: &mut Config) -> Result<()> { - let env_plugins = std::env::var(ENV_ACTIVE_PLUGINS).unwrap_or_default(); - let active_plugins: Vec<&str> = env_plugins - .split(",") - .map(|s| s.trim()) - .filter(|s| !s.is_empty()) - .collect(); - for name in active_plugins { - // retrieve plugin configuration - log::info!("reloading plugin configuration for {name:?}"); - let plugin = config - .plugins - .get(name) - .cloned() - .ok_or_else(|| RMenuError::NoSuchPlugin(name.to_owned()))?; - // update config w/ plugin options when available - if let Some(options) = plugin.options.as_ref() { - config - .update(options) - .map_err(|e| RMenuError::InvalidKeybind(e))?; - } - } - Ok(()) - } -} diff --git a/rmenu/src/config.rs b/rmenu/src/config.rs index 7e12d84..d03b35f 100644 --- a/rmenu/src/config.rs +++ b/rmenu/src/config.rs @@ -1,15 +1,106 @@ -//! RMENU Configuration Implementations -use std::collections::BTreeMap; use std::str::FromStr; -use dioxus_desktop::tao::{ - dpi::{LogicalPosition, LogicalSize}, - window::Fullscreen, -}; -use dioxus_html::input_data::keyboard_types::{Code, Modifiers}; -use heck::AsPascalCase; -use rmenu_plugin::Options; -use serde::{de::Error, Deserialize}; +use dioxus::events::{Code, Modifiers}; +use serde::de::Error; +use serde::Deserialize; + +#[inline] +fn _true() -> bool { + true +} + +/// Global RMenu Complete Configuration +#[derive(Debug, PartialEq, Deserialize)] +#[serde(default)] +pub struct Config { + pub page_size: usize, + pub page_load: f64, + pub jump_dist: usize, + #[serde(default = "_true")] + pub use_icons: bool, + #[serde(default = "_true")] + pub use_comments: bool, + pub hover_select: bool, + pub single_click: bool, + pub search: SearchConfig, + pub keybinds: KeyConfig, +} + +impl Default for Config { + fn default() -> Self { + Self { + page_size: 50, + page_load: 0.8, + jump_dist: 5, + use_icons: true, + use_comments: true, + hover_select: false, + single_click: false, + search: Default::default(), + keybinds: Default::default(), + } + } +} + +#[inline] +fn _maxlen() -> usize { + 999 +} + +/// Search Configuration Settings +#[derive(Debug, PartialEq, Deserialize)] +#[serde(default)] +pub struct SearchConfig { + pub restrict: Option, + #[serde(default = "_maxlen")] + pub max_length: usize, + pub placeholder: Option, + #[serde(default = "_true")] + pub use_regex: bool, + #[serde(default = "_true")] + pub ignore_case: bool, +} + +impl Default for SearchConfig { + fn default() -> Self { + Self { + restrict: Default::default(), + max_length: 999, + placeholder: Default::default(), + use_regex: true, + ignore_case: true, + } + } +} + +/// Global GUI Keybind Settings Options +#[derive(Debug, PartialEq, Deserialize)] +#[serde(default)] +pub struct KeyConfig { + pub exec: Vec, + pub exit: Vec, + pub move_next: Vec, + pub move_prev: Vec, + pub open_menu: Vec, + pub close_menu: Vec, + pub jump_next: Vec, + pub jump_prev: Vec, +} + +impl Default for KeyConfig { + fn default() -> Self { + return Self { + exec: vec![Keybind::new(Code::Enter)], + exit: vec![Keybind::new(Code::Escape)], + move_next: vec![Keybind::new(Code::ArrowDown)], + move_prev: vec![Keybind::new(Code::ArrowUp)], + open_menu: vec![], + close_menu: vec![], + jump_next: vec![Keybind::new(Code::PageDown)], + jump_prev: vec![Keybind::new(Code::PageUp)], + }; + } +} // parse supported modifiers from string fn mod_from_str(s: &str) -> Option { @@ -42,309 +133,45 @@ impl FromStr for Keybind { type Err = String; fn from_str(s: &str) -> Result { - // parse modifiers/keys from string + // parse keys & modifiers from string let mut mods = vec![]; let mut keys = vec![]; for item in s.split("+") { - let camel = format!("{}", AsPascalCase(item)); + let camel = format!("{}", heck::AsPascalCase(item)); match Code::from_str(&camel) { Ok(key) => keys.push(key), Err(_) => match mod_from_str(item) { Some(keymod) => mods.push(keymod), - None => return Err(format!("invalid key/modifier: {item}")), + None => return Err(format!("Invalid key/modifier: {item}")), }, } } // generate final keybind let kmod = mods.into_iter().fold(Modifiers::empty(), |m1, m2| m1 | m2); match keys.len() { - 0 => Err(format!("no keys specified")), + 0 => Err(format!("No keys specified")), 1 => Ok(Keybind { mods: kmod, key: keys.pop().unwrap(), }), - _ => Err(format!("too many keys: {keys:?}")), + _ => Err(format!("Too many keys: {keys:?}")), } } } -impl<'de> Deserialize<'de> for Keybind { - fn deserialize(deserializer: D) -> Result - where - D: serde::Deserializer<'de>, - { - let s: &str = Deserialize::deserialize(deserializer)?; - Keybind::from_str(s).map_err(D::Error::custom) - } -} - -/// Global GUI Keybind Settings Options -#[derive(Debug, PartialEq, Deserialize)] -#[serde(default)] -pub struct KeyConfig { - pub exec: Vec, - pub exit: Vec, - pub move_next: Vec, - pub move_prev: Vec, - pub open_menu: Vec, - pub close_menu: Vec, - pub jump_next: Vec, - pub jump_prev: Vec, -} - -impl Default for KeyConfig { - fn default() -> Self { - return Self { - exec: vec![Keybind::new(Code::Enter)], - exit: vec![Keybind::new(Code::Escape)], - move_next: vec![Keybind::new(Code::ArrowUp)], - move_prev: vec![Keybind::new(Code::ArrowDown)], - open_menu: vec![], - close_menu: vec![], - jump_next: vec![Keybind::new(Code::PageDown)], - jump_prev: vec![Keybind::new(Code::PageUp)], - }; - } -} - -/// GUI Desktop Window Configuration Settings -#[derive(Debug, PartialEq, Deserialize)] -pub struct WindowConfig { - pub title: String, - pub size: LogicalSize, - pub position: LogicalPosition, - #[serde(default = "_true")] - pub focus: bool, - pub decorate: bool, - pub transparent: bool, - #[serde(default = "_true")] - pub always_top: bool, - pub fullscreen: Option, - pub dark_mode: Option, -} - -impl WindowConfig { - /// Retrieve Desktop Compatabible Fullscreen Settings - pub fn get_fullscreen(&self) -> Option { - self.fullscreen.and_then(|fs| match fs { - true => Some(Fullscreen::Borderless(None)), - false => None, - }) - } -} - -impl Default for WindowConfig { - fn default() -> Self { - Self { - title: "RMenu - App Launcher".to_owned(), - size: LogicalSize { - width: 700.0, - height: 400.0, - }, - position: LogicalPosition { x: 100.0, y: 100.0 }, - focus: true, - decorate: false, - transparent: false, - always_top: true, - fullscreen: None, - dark_mode: None, - } - } -} - -/// Cache Settings for Configured RMenu Plugins -#[derive(Debug, Clone, PartialEq)] -pub enum CacheSetting { - NoCache, - Never, - OnLogin, - AfterSeconds(usize), -} - -impl FromStr for CacheSetting { - type Err = String; - fn from_str(s: &str) -> Result { - match s { - "never" => Ok(Self::Never), - "false" | "disable" | "disabled" => Ok(Self::NoCache), - "true" | "login" | "onlogin" => Ok(Self::OnLogin), - _ => { - let secs: usize = s - .parse() - .map_err(|_| format!("Invalid Cache Setting: {s:?}"))?; - Ok(Self::AfterSeconds(secs)) +macro_rules! de_fromstr { + ($s:ident) => { + impl<'de> Deserialize<'de> for $s { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let s: &str = Deserialize::deserialize(deserializer)?; + $s::from_str(s).map_err(D::Error::custom) } } - } -} - -impl<'de> Deserialize<'de> for CacheSetting { - fn deserialize(deserializer: D) -> Result - where - D: serde::Deserializer<'de>, - { - let s: &str = Deserialize::deserialize(deserializer)?; - CacheSetting::from_str(s).map_err(D::Error::custom) - } -} - -impl Default for CacheSetting { - fn default() -> Self { - Self::NoCache - } -} - -/// RMenu Data-Source Plugin Configuration -#[derive(Debug, Clone, PartialEq, Deserialize)] -pub struct PluginConfig { - pub exec: Vec, - #[serde(default)] - pub cache: CacheSetting, - #[serde(default)] - pub placeholder: Option, - #[serde(default)] - pub options: Option, -} - -#[inline] -fn _true() -> bool { - true -} - -#[inline] -fn _false() -> bool { - false -} - -#[derive(Debug, PartialEq, Deserialize)] -#[serde(default)] -pub struct SearchConfig { - pub restrict: Option, - pub min_length: Option, - pub max_length: Option, - pub placeholder: Option, - #[serde(default = "_true")] - pub use_regex: bool, - #[serde(default = "_true")] - pub ignore_case: bool, -} - -impl Default for SearchConfig { - fn default() -> Self { - Self { - restrict: Default::default(), - min_length: Default::default(), - max_length: Default::default(), - placeholder: Default::default(), - use_regex: true, - ignore_case: true, - } - } -} - -/// Global RMenu Complete Configuration -#[derive(Debug, PartialEq, Deserialize)] -#[serde(default)] -pub struct Config { - pub page_size: usize, - pub page_load: f64, - pub jump_dist: usize, - #[serde(default = "_true")] - pub use_icons: bool, - #[serde(default = "_true")] - pub use_comments: bool, - #[serde(default = "_false")] - pub hover_select: bool, - #[serde(default = "_false")] - pub single_click: bool, - pub search: SearchConfig, - pub plugins: BTreeMap, - pub keybinds: KeyConfig, - pub window: WindowConfig, - pub css: Option, - pub terminal: Option, -} - -impl Default for Config { - fn default() -> Self { - Self { - page_size: 50, - page_load: 0.8, - jump_dist: 5, - use_icons: true, - use_comments: true, - hover_select: false, - single_click: false, - search: Default::default(), - plugins: Default::default(), - keybinds: Default::default(), - window: Default::default(), - css: None, - terminal: None, - } - } -} - -macro_rules! cfg_replace { - ($key:expr, $repl:expr) => { - if $repl.is_some() { - $key = $repl.clone(); - } - }; - ($key:expr, $repl:expr, true) => { - if let Some(value) = $repl.as_ref() { - $key = value.to_owned(); - } }; } -macro_rules! cfg_keybind { - ($key:expr, $repl:expr) => { - if let Some(bind_strings) = $repl.as_ref() { - let mut keybinds = vec![]; - for bind_str in bind_strings.iter() { - let bind = Keybind::from_str(bind_str)?; - keybinds.push(bind); - } - $key = keybinds; - } - }; -} - -pub(crate) use cfg_keybind; -pub(crate) use cfg_replace; - -impl Config { - /// Update Configuration from Options Object - pub fn update(&mut self, options: &Options) -> Result<(), String> { - cfg_replace!(self.css, options.css); - cfg_replace!(self.page_size, options.page_size, true); - cfg_replace!(self.page_load, options.page_load, true); - cfg_replace!(self.jump_dist, options.jump_dist, true); - cfg_replace!(self.hover_select, options.hover_select, true); - cfg_replace!(self.single_click, options.single_click, true); - // search settings - cfg_replace!(self.search.placeholder, options.placeholder); - cfg_replace!(self.search.restrict, options.search_restrict); - cfg_replace!(self.search.min_length, options.search_min_length); - cfg_replace!(self.search.max_length, options.search_max_length); - // keybind settings - cfg_keybind!(self.keybinds.exec, options.key_exec); - cfg_keybind!(self.keybinds.exec, options.key_exec); - cfg_keybind!(self.keybinds.exit, options.key_exit); - cfg_keybind!(self.keybinds.move_next, options.key_move_next); - cfg_keybind!(self.keybinds.move_prev, options.key_move_prev); - cfg_keybind!(self.keybinds.open_menu, options.key_open_menu); - cfg_keybind!(self.keybinds.close_menu, options.key_close_menu); - cfg_keybind!(self.keybinds.jump_next, options.key_jump_next); - cfg_keybind!(self.keybinds.jump_prev, options.key_jump_prev); - // window settings - cfg_replace!(self.window.title, options.title, true); - cfg_replace!(self.window.decorate, options.decorate, true); - cfg_replace!(self.window.fullscreen, options.fullscreen); - cfg_replace!(self.window.transparent, options.transparent, true); - cfg_replace!(self.window.size.width, options.window_width, true); - cfg_replace!(self.window.size.height, options.window_height, true); - Ok(()) - } -} +// implement `Deserialize` using `FromStr` +de_fromstr!(Keybind); diff --git a/rmenu/src/exec.rs b/rmenu/src/exec.rs deleted file mode 100644 index 6ac6b71..0000000 --- a/rmenu/src/exec.rs +++ /dev/null @@ -1,61 +0,0 @@ -//! Execution Implementation for Entry Actions -use std::process::Command; -use std::{collections::HashMap, os::unix::process::CommandExt}; - -use rmenu_plugin::{Action, Method}; -use shell_words::split; -use strfmt::strfmt; -use which::which; - -/// Find Best Terminal To Execute -fn find_terminal() -> String { - vec![ - ("alacritty", "-e {cmd}"), - ("kitty", "{cmd}"), - ("gnome-terminal", "-x {cmd}"), - ("foot", "-e {cmd}"), - ("xterm", "-C {cmd}"), - ] - .into_iter() - .map(|(t, v)| (which(t), v)) - .filter(|(c, _)| c.is_ok()) - .map(|(c, v)| (c.unwrap(), v)) - .map(|(p, v)| { - ( - p.to_str() - .expect("Failed to Parse Terminal Path") - .to_owned(), - v, - ) - }) - .find_map(|(p, v)| Some(format!("{p} {v}"))) - .expect("Failed to Find Terminal Executable!") -} - -#[inline] -fn parse_args(exec: &str) -> Vec { - match split(exec) { - Ok(args) => args, - Err(err) => panic!("{:?} invalid command {err}", exec), - } -} - -pub fn execute(action: &Action, term: Option) { - log::info!("executing: {:?} {:?}", action.name, action.exec); - let args = match &action.exec { - Method::Run(exec) => parse_args(&exec), - Method::Terminal(exec) => { - let mut args = HashMap::new(); - let terminal = term.unwrap_or_else(find_terminal); - args.insert("cmd".to_string(), exec.to_owned()); - let command = strfmt(&terminal, &args).expect("Failed String Format"); - parse_args(&command) - } - Method::Echo(echo) => { - println!("{echo}"); - std::process::exit(0); - } - }; - let err = Command::new(&args[0]).args(&args[1..]).exec(); - panic!("Command Error: {err:?}"); -} diff --git a/rmenu/src/gui.rs b/rmenu/src/gui.rs deleted file mode 100644 index 8cff85c..0000000 --- a/rmenu/src/gui.rs +++ /dev/null @@ -1,308 +0,0 @@ -//! RMENU GUI Implementation using Dioxus -#![allow(non_snake_case)] -use std::fmt::Display; - -use dioxus::prelude::*; -use dioxus_html::input_data::keyboard_types::{Code, Modifiers}; -use rmenu_plugin::Entry; - -use crate::config::Keybind; -use crate::state::{AppState, KeyEvent}; -use crate::{App, DEFAULT_CSS_CONTENT}; - -/// spawn and run the app on the configured platform -pub fn run(app: App) { - let theme = match app.config.window.dark_mode { - Some(dark) => match dark { - true => Some(dioxus_desktop::tao::window::Theme::Dark), - false => Some(dioxus_desktop::tao::window::Theme::Light), - }, - None => None, - }; - let builder = dioxus_desktop::WindowBuilder::new() - .with_title(app.config.window.title.clone()) - .with_inner_size(app.config.window.size) - .with_position(app.config.window.position) - .with_focused(app.config.window.focus) - .with_decorations(app.config.window.decorate) - .with_transparent(app.config.window.transparent) - .with_always_on_top(app.config.window.always_top) - .with_fullscreen(app.config.window.get_fullscreen()) - .with_theme(theme); - let config = dioxus_desktop::Config::new().with_window(builder); - dioxus_desktop::launch_with_props(App, app, config); -} - -#[derive(PartialEq, Props)] -struct GEntry<'a> { - pos: usize, - subpos: usize, - index: usize, - entry: &'a Entry, - state: AppState<'a>, -} - -#[inline] -fn render_comment(comment: Option<&String>) -> &str { - comment.map(|s| s.as_str()).unwrap_or("") -} - -#[inline] -fn render_image<'a, T>( - cx: Scope<'a, T>, - image: Option<&String>, - alt: Option<&String>, -) -> Element<'a> { - if let Some(img) = image { - if img.ends_with(".svg") { - if let Some(content) = crate::image::convert_svg(img.to_owned()) { - return cx.render(rsx! { img { class: "image", src: "{content}" } }); - } - } - if crate::image::image_exists(img.to_owned()) { - return cx.render(rsx! { img { class: "image", src: "{img}" } }); - } - } - let alt = alt.map(|s| s.as_str()).unwrap_or_else(|| "?"); - return cx.render(rsx! { div { class: "icon_alt", dangerous_inner_html: "{alt}" } }); -} - -/// render a single result entry w/ the given information -fn TableEntry<'a>(cx: Scope<'a, GEntry<'a>>) -> Element<'a> { - // build css classes for result and actions (if nessesary) - let main_select = cx.props.index == cx.props.pos; - let action_select = main_select && cx.props.subpos > 0; - let action_classes = match action_select { - true => "active", - false => "", - }; - let multi_classes = match cx.props.entry.actions.len() > 1 { - true => "submenu", - false => "", - }; - let result_classes = match main_select && !action_select { - true => "selected", - false => "", - }; - // build sub-actions if present - let hover_select = cx.props.state.config().hover_select; - let single_click = cx.props.state.config().single_click; - let actions = cx - .props - .entry - .actions - .iter() - .skip(1) - .enumerate() - .map(|(idx, action)| { - let act_class = match action_select && idx + 1 == cx.props.subpos { - true => "selected", - false => "", - }; - cx.render(rsx! { - div { - class: "action {act_class}", - onmouseenter: move |_| { - if hover_select { - cx.props.state.set_position(cx.props.index, idx + 1); - } - }, - onclick: move |_| { - cx.props.state.set_position(cx.props.index, idx + 1); - if single_click { - cx.props.state.set_event(KeyEvent::Exec); - } - }, - ondblclick: |_| cx.props.state.set_event(KeyEvent::Exec), - div { - class: "action-name", - dangerous_inner_html: "{action.name}" - } - div { - class: "action-comment", - render_comment(action.comment.as_ref()) - } - } - }) - }); - cx.render(rsx! { - div { - class: "result-entry", - div { - id: "result-{cx.props.index}", - class: "result {result_classes} {multi_classes}", - onmouseenter: move |_| { - if hover_select { - cx.props.state.set_position(cx.props.index, 0); - } - }, - onclick: move |_| { - cx.props.state.set_position(cx.props.index, 0); - if single_click { - cx.props.state.set_event(KeyEvent::Exec); - } - }, - ondblclick: |_| cx.props.state.set_event(KeyEvent::Exec), - if cx.props.state.config().use_icons { - cx.render(rsx! { - div { - class: "icon", - render_image(cx, cx.props.entry.icon.as_ref(), cx.props.entry.icon_alt.as_ref()) - } - }) - } - match cx.props.state.config().use_comments { - true => cx.render(rsx! { - div { - class: "name", - dangerous_inner_html: "{cx.props.entry.name}" - } - div { - class: "comment", - dangerous_inner_html: render_comment(cx.props.entry.comment.as_ref()) - } - }), - false => cx.render(rsx! { - div { - class: "entry", - dangerous_inner_html: "{cx.props.entry.name}" - } - }) - } - } - div { - id: "result-{cx.props.index}-actions", - class: "actions {action_classes}", - actions.into_iter() - } - } - }) -} - -#[inline] -fn focus(cx: Scope) { - let eval = use_eval(cx); - let js = "document.getElementById(`search`).focus()"; - let _ = eval(js); -} - -/// check if the current inputs match any of the given keybindings -#[inline] -fn matches(bind: &Vec, mods: &Modifiers, key: &Code) -> bool { - bind.iter().any(|b| mods.contains(b.mods) && &b.key == key) -} - -/// retrieve string value for display-capable enum -#[inline] -fn get_str(item: Option) -> String { - item.map(|i| i.to_string()).unwrap_or_else(String::new) -} - -/// main application function/loop -fn App<'a>(cx: Scope) -> Element { - let mut state = AppState::new(cx, cx.props); - - // always ensure focus - focus(cx); - - // log current position - let search = state.search(); - let (pos, subpos) = state.position(); - log::debug!("search: {search:?}, pos: {pos}, {subpos}"); - - // generate state tracker instances - let results = state.results(&cx.props.entries); - let k_updater = state.partial_copy(); - let s_updater = state.partial_copy(); - - // build keyboard actions event handler - let keybinds = &cx.props.config.keybinds; - let keyboard_controls = move |e: KeyboardEvent| { - let code = e.code(); - let mods = e.modifiers(); - if matches(&keybinds.exec, &mods, &code) { - k_updater.set_event(KeyEvent::Exec); - } else if matches(&keybinds.exit, &mods, &code) { - k_updater.set_event(KeyEvent::Exit); - } else if matches(&keybinds.move_next, &mods, &code) { - k_updater.set_event(KeyEvent::MoveNext); - } else if matches(&keybinds.move_prev, &mods, &code) { - k_updater.set_event(KeyEvent::MovePrev); - } else if matches(&keybinds.open_menu, &mods, &code) { - k_updater.set_event(KeyEvent::OpenMenu); - } else if matches(&keybinds.close_menu, &mods, &code) { - k_updater.set_event(KeyEvent::CloseMenu); - } else if matches(&keybinds.jump_next, &mods, &code) { - k_updater.set_event(KeyEvent::JumpNext) - } else if matches(&keybinds.jump_prev, &mods, &code) { - k_updater.set_event(KeyEvent::JumpPrev) - } - }; - - // handle keyboard events - state.handle_events(cx); - - // render results objects - let rendered_results = results.iter().enumerate().map(|(i, e)| { - let state = state.partial_copy(); - cx.render(rsx! { - TableEntry{ - pos: pos, - subpos: subpos, - index: i, - entry: e, - state: state, - } - }) - }); - - // get input settings - let minlen = get_str(cx.props.config.search.min_length.as_ref()); - let maxlen = get_str(cx.props.config.search.max_length.as_ref()); - let placeholder = get_str(cx.props.config.search.placeholder.as_ref()); - - // complete final rendering - cx.render(rsx! { - style { DEFAULT_CSS_CONTENT } - style { "{cx.props.theme}" } - style { "{cx.props.css}" } - div { - id: "content", - class: "content", - div { - id: "navbar", - class: "navbar", - match cx.props.config.search.restrict.as_ref() { - Some(pattern) => cx.render(rsx! { - input { - id: "search", - value: "{search}", - pattern: "{pattern}", - minlength: "{minlen}", - maxlength: "{maxlen}", - placeholder: "{placeholder}", - oninput: move |e| s_updater.set_search(cx, e.value.clone()), - onkeydown: keyboard_controls, - } - }), - None => cx.render(rsx! { - input { - id: "search", - value: "{search}", - minlength: "{minlen}", - maxlength: "{maxlen}", - placeholder: "{placeholder}", - oninput: move |e| s_updater.set_search(cx, e.value.clone()), - onkeydown: keyboard_controls, - } - }) - } - } - div { - id: "results", - class: "results", - rendered_results.into_iter() - } - } - }) -} diff --git a/rmenu/src/gui/entry.rs b/rmenu/src/gui/entry.rs new file mode 100644 index 0000000..5262bed --- /dev/null +++ b/rmenu/src/gui/entry.rs @@ -0,0 +1,11 @@ +use dioxus::prelude::*; +use rmenu_plugin::Entry; + +/// Dioxus Search Entry Component +#[derive(PartialEq, Clone, Props)] +pub struct SearchEntry { + pub index: usize, + pub entry: MappedSignal, + pub pos: usize, + pub subpos: usize, +} diff --git a/rmenu/src/gui/mod.rs b/rmenu/src/gui/mod.rs new file mode 100644 index 0000000..b466973 --- /dev/null +++ b/rmenu/src/gui/mod.rs @@ -0,0 +1,158 @@ +use std::{cell::RefCell, rc::Rc}; + +use dioxus::prelude::*; + +mod entry; +mod state; + +use crate::App; +use state::{Context, Position}; + +const DEFAULT_CSS_CONTENT: &'static str = include_str!("../../public/default.css"); + +type Ctx = Rc>; + +pub fn run(app: App) { + let ctx = Context::new(app.css, app.theme, app.config, app.entries); + LaunchBuilder::desktop() + .with_context(Rc::new(RefCell::new(ctx))) + .launch(gui_main); +} + +#[derive(Clone, Props)] +struct Row { + position: Signal, + search_index: usize, + entry_index: usize, +} + +impl PartialEq for Row { + fn eq(&self, other: &Self) -> bool { + self.entry_index == other.entry_index + } +} + +fn gui_entry(mut row: Row) -> Element { + // retrieve entry information based on index + let ctx = use_context::(); + let context = ctx.borrow(); + let entry = context.get_entry(row.entry_index); + let hover_select = context.config.hover_select; + let (pos, subpos) = row.position.with(|p| (p.pos, p.subpos)); + // build element from entry + let aclass = (pos == row.search_index && subpos > 0) + .then_some("active") + .unwrap_or_default(); + let rclass = (pos == row.search_index && subpos == 0) + .then_some("selected") + .unwrap_or_default(); + rsx! { + div { + class: "result-entry", + div { + id: "result-{row.entry_index}", + class: "result {rclass}", + // actions + onmouseenter: move |_| { + if hover_select { + row.position.with_mut(|p| p.set(row.search_index, 0)); + } + }, + onclick: move |_| { + row.position.with_mut(|p| p.set(row.search_index, 0)); + }, + ondoubleclick: move |_| { + // row.position.with_mut(|p| p.set(row.search_index, 0)); + }, + // content + if context.config.use_comments { + {rsx! { + div { + class: "name", + dangerous_inner_html: "{entry.name}" + } + div { + class: "comment", + dangerous_inner_html: entry.comment.as_ref().map(|s| s.as_str()).unwrap_or(""), + } + }} + } else { + {rsx! { + div { + class: "entry", + dangerous_inner_html: "{entry.name}" + } + }} + } + } + } + } +} + +fn gui_main() -> Element { + // build context and signals for state + let ctx = use_context::(); + let mut search = use_signal(String::new); + let mut position = use_signal(Position::default); + let mut results = use_signal(|| ctx.borrow().all_results()); + + // update search results on search + use_effect(move || { + let ctx = use_context::(); + let search = search(); + results.set(ctx.borrow_mut().set_search(&search, &mut position)); + }); + + // declare keyboard handler + let keydown = move |e: KeyboardEvent| { + let ctx = use_context::(); + let context = ctx.borrow(); + // calculate current entry + let pos = position.with(|p| p.pos); + let index = results.with(|r| r[pos]); + let entry = context.get_entry(index); + // update keybinds + context.handle_keybinds(e, entry, &mut position); + // scroll when required + let script = format!("document.getElementById(`result-{index}`).scrollIntoView(false)"); + eval(&script); + }; + + let context = ctx.borrow(); + let pattern = context.config.search.restrict.clone(); + let maxlength = context.config.search.max_length as i64; + let max_result = context.calc_limit(&position); + rsx! { + style { "{DEFAULT_CSS_CONTENT}" } + style { "{context.theme}" } + style { "{context.css}" } + div { + id: "content", + class: "content", + onkeydown: keydown, + div { + id: "navbar", + class: "navbar", + input { + id: "search", + value: "{search}", + pattern: pattern, + maxlength: maxlength, + oninput: move |e| search.set(e.value()), + } + } + div { + id: "results", + class: "results", + for (pos, index) in results().iter().take(max_result).enumerate() { + gui_entry { + key: "{pos}-{index}", + position, + search_index: pos, + entry_index: *index, + } + } + } + } + } +} diff --git a/rmenu/src/gui/state.rs b/rmenu/src/gui/state.rs new file mode 100644 index 0000000..c7db812 --- /dev/null +++ b/rmenu/src/gui/state.rs @@ -0,0 +1,152 @@ +use dioxus::prelude::*; +use rmenu_plugin::Entry; + +use crate::config::{Config, Keybind}; +use crate::search::new_searchfn; + +/// Global Position Tracker +#[derive(Default)] +pub struct Position { + pub pos: usize, + pub subpos: usize, +} + +impl Position { + pub fn set(&mut self, pos: usize, subpos: usize) { + self.pos = pos; + self.subpos = subpos; + } + pub fn reset(&mut self) { + self.set(0, 0) + } +} + +/// Alias for Signal wrapped Position +type Pos = Signal; + +/// Contain and Track Search Results +pub struct Context { + pub css: String, + pub theme: String, + pub config: Config, + // search results and controls + entries: Vec, + num_results: usize, +} + +impl Context { + pub fn new(css: String, theme: String, config: Config, entries: Vec) -> Self { + println!( + "page_size: {}, threshold: {}", + config.page_size, config.page_load + ); + Self { + num_results: entries.len(), + entries, + config, + theme, + css, + } + } + + // ** Search Results Management ** + + pub fn all_results(&self) -> Vec { + (0..self.entries.len()).collect() + } + + pub fn set_search(&mut self, search: &str, pos: &mut Pos) -> Vec { + let _ = pos.with_mut(|p| p.reset()); + let filter = new_searchfn(&self.config, &search); + let results: Vec = self + .entries + .iter() + .enumerate() + .filter(|(_, e)| filter(e)) + .map(|(i, _)| i) + .collect(); + self.num_results = results.len(); + results + } + + pub fn calc_limit(&self, pos: &Pos) -> usize { + let pos = pos.with(|p| p.pos); + let page_size = self.config.page_size; + // calc current page number + let partial = pos % page_size; + let page = (pos - partial) / page_size; + // calc ratio of completion for current page + let ratio = partial as f64 / page_size as f64; + let threshold = self.config.page_load; + // increment total results by 1 page if beyond threshold + let md = if ratio < threshold { 1 } else { 2 }; + let limit = (page + md) * page_size; + println!("pos: {pos}, page: {page}, ratio: {ratio}, limit: {limit}"); + limit + } + + #[inline] + pub fn get_entry(&self, index: usize) -> &Entry { + &self.entries[index] + } + + // ** Keybind Management ** + + #[inline] + fn matches(&self, bind: &Vec, mods: &Modifiers, key: &Code) -> bool { + bind.iter().any(|b| mods.contains(b.mods) && &b.key == key) + } + + pub fn handle_keybinds(&self, event: KeyboardEvent, index: usize, pos: &mut Pos) { + let code = event.code(); + let modifiers = event.modifiers(); + let keybinds = &self.config.keybinds; + if self.matches(&keybinds.exec, &modifiers, &code) { + println!("exec!"); + } else if self.matches(&keybinds.exit, &modifiers, &code) { + std::process::exit(0); + } else if self.matches(&keybinds.move_next, &modifiers, &code) { + self.move_next(index, pos); + } else if self.matches(&keybinds.move_prev, &modifiers, &code) { + self.move_prev(pos); + } else if self.matches(&keybinds.open_menu, &modifiers, &code) { + } else if self.matches(&keybinds.close_menu, &modifiers, &code) { + } else if self.matches(&keybinds.jump_next, &modifiers, &code) { + self.move_down(self.config.jump_dist, pos); + } else if self.matches(&keybinds.jump_prev, &modifiers, &code) { + self.move_up(self.config.jump_dist, pos); + } + } + + // ** Position Management ** + + pub fn move_up(&self, dist: usize, pos: &mut Pos) { + pos.with_mut(|p| { + p.subpos = 0; + p.pos = std::cmp::max(p.pos, dist) - dist; + }) + } + pub fn move_down(&self, dist: usize, pos: &mut Pos) { + let max_pos = self.num_results; + pos.with_mut(move |p| { + p.subpos = 0; + p.pos = std::cmp::min(p.pos + dist, max_pos); + }) + } + pub fn move_prev(&self, pos: &mut Pos) { + let subpos = pos.with(|p| p.subpos); + match subpos > 0 { + true => pos.with_mut(|p| p.subpos -= 1), + false => self.move_up(1, pos), + } + } + pub fn move_next(&self, index: usize, pos: &mut Pos) { + let entry = self.get_entry(index); + let subpos = pos.with(|p| p.subpos); + if subpos > 0 && subpos < entry.actions.len() - 1 { + return pos.with_mut(|p| p.subpos += 1); + } + println!("moving down 1"); + self.move_down(1, pos); + } +} diff --git a/rmenu/src/image.rs b/rmenu/src/image.rs deleted file mode 100644 index b77f0a6..0000000 --- a/rmenu/src/image.rs +++ /dev/null @@ -1,82 +0,0 @@ -//! GUI Image Processing -use std::fs::{create_dir_all, write}; -use std::io; -use std::path::PathBuf; -use std::sync::Mutex; - -use cached::proc_macro::cached; -use once_cell::sync::Lazy; -use resvg::usvg::TreeParsing; -use thiserror::Error; - -static TEMP_EXISTS: Lazy>> = Lazy::new(|| Mutex::new(vec![])); -static TEMP_DIR: Lazy = Lazy::new(|| PathBuf::from("/tmp/rmenu")); - -#[derive(Debug, Error)] -enum SvgError { - #[error("Invalid SVG Filepath")] - InvalidFile(#[from] std::io::Error), - #[error("Invalid Document")] - InvalidTree(#[from] resvg::usvg::Error), - #[error("Failed to Alloc PixBuf")] - NoPixBuf(u32, u32, u32), - #[error("Failed to Convert SVG to PNG")] - PngError(#[from] png::EncodingError), -} - -/// Make Temporary Directory for Generated PNGs -fn make_temp() -> Result<(), io::Error> { - let mut temp = TEMP_EXISTS.lock().expect("Failed to Access Global Mutex"); - if temp.len() == 0 { - create_dir_all(TEMP_DIR.to_owned())?; - temp.push(true); - } - Ok(()) -} - -/// Convert SVG to PNG Image -fn svg_to_png(path: &str, dest: &PathBuf, pixels: u32) -> Result<(), SvgError> { - // read and convert to resvg document tree - let xml = std::fs::read(path)?; - let opt = resvg::usvg::Options::default(); - let tree = resvg::usvg::Tree::from_data(&xml, &opt)?; - let rtree = resvg::Tree::from_usvg(&tree); - // generate pixel-buffer and scale according to size preference - let size = rtree.size.to_int_size(); - let scale = pixels as f32 / size.width() as f32; - let width = (size.width() as f32 * scale) as u32; - let height = (size.height() as f32 * scale) as u32; - let mut pixmap = resvg::tiny_skia::Pixmap::new(width, height) - .ok_or_else(|| SvgError::NoPixBuf(width, height, pixels))?; - let form = resvg::tiny_skia::Transform::from_scale(scale, scale); - // render as png to memory - rtree.render(form, &mut pixmap.as_mut()); - let png = pixmap.encode_png()?; - // base64 encode png - Ok(write(dest, png)?) -} - -#[cached] -pub fn convert_svg(path: String) -> Option { - // ensure temporary directory exists - let _ = make_temp(); - // convert path to new temporary png filepath - let (_, fname) = path.rsplit_once('/')?; - let (name, _) = fname.rsplit_once(".")?; - let name = format!("{name}.png"); - let new_path = TEMP_DIR.join(name); - // generate png if it doesnt already exist - if !new_path.exists() { - log::debug!("generating png {new_path:?}"); - match svg_to_png(&path, &new_path, 64) { - Err(err) => log::error!("failed svg->png: {err:?}"), - _ => {} - } - } - Some(new_path.to_str()?.to_string()) -} - -#[cached] -pub fn image_exists(path: String) -> bool { - PathBuf::from(path).exists() -} diff --git a/rmenu/src/main.rs b/rmenu/src/main.rs index fa05423..03b81dd 100644 --- a/rmenu/src/main.rs +++ b/rmenu/src/main.rs @@ -1,80 +1,30 @@ -mod cache; -mod cli; mod config; -mod exec; mod gui; -mod image; mod search; -mod state; -use clap::Parser; -use rmenu_plugin::{self_exe, Entry}; +use rmenu_plugin::Entry; -static DEFAULT_THEME: &'static str = "style.css"; -static DEFAULT_CONFIG: &'static str = "config.yaml"; -static XDG_PREFIX: &'static str = "rmenu"; -static DEFAULT_CSS_CONTENT: &'static str = include_str!("../public/default.css"); - -static ENV_BIN: &'static str = "RMENU"; -static ENV_ACTIVE_PLUGINS: &'static str = "RMENU_ACTIVE_PLUGINS"; - -/// Application State for GUI -#[derive(Debug, PartialEq)] +#[derive(Debug)] pub struct App { css: String, - name: String, theme: String, - entries: Vec, config: config::Config, + entries: Vec, } -//TODO: how should scripting work? -// - need a better mechanism for rmenu and another executable to go back and forth -// - need some way to preserve settings between executions of rmenu -// - need some way for plugins to customize configuration according to preference +fn main() { + // temp building of app + let s = std::fs::read_to_string("/home/andrew/.cache/rmenu/run.cache").unwrap(); + let entries: Vec = serde_json::from_str(&s).unwrap(); + let mut config = config::Config::default(); + config.search.max_length = 5; -fn main() -> cli::Result<()> { - // export self to environment for other scripts - let exe = self_exe(); - std::env::set_var(ENV_BIN, exe); - - // enable log and set default level - if std::env::var("RUST_LOG").is_err() { - std::env::set_var("RUST_LOG", "info"); - } - env_logger::init(); - - // parse cli and retrieve values for app - let mut cli = cli::Args::parse(); - let mut config = cli.get_config()?; - let entries = cli.get_entries(&mut config)?; - - // update config based on cli-settings and entries - config = cli.update_config(config); - config.use_icons = config.use_icons - && entries - .iter() - .any(|e| e.icon.is_some() || e.icon_alt.is_some()); - config.use_comments = config.use_comments && entries.iter().any(|e| e.comment.is_some()); - - // load additional configuration settings from env - cli.load_env(&mut config)?; - - // configure css theme and css overrides - let theme = cli.get_theme(); - let css = cli.get_css(&config); - - // set environment variables before running app - cli.set_env(); - - // genrate app context and run gui - gui::run(App { - name: "rmenu".to_owned(), - css, - theme, - entries, + let app = App { + css: String::new(), + theme: String::new(), config, - }); - - Ok(()) + entries, + }; + // run gui + gui::run(app); } diff --git a/rmenu/src/state.rs b/rmenu/src/state.rs deleted file mode 100644 index 2faa4f2..0000000 --- a/rmenu/src/state.rs +++ /dev/null @@ -1,314 +0,0 @@ -use dioxus::prelude::{use_eval, use_ref, Scope, UseRef}; -use regex::Regex; -use rmenu_plugin::Entry; - -use crate::config::Config; -use crate::exec::execute; -use crate::search::new_searchfn; -use crate::App; - -#[inline] -fn scroll(cx: Scope, pos: usize) { - let eval = use_eval(cx); - let js = format!("document.getElementById(`result-{pos}`).scrollIntoView(false)"); - let _ = eval(&js); -} - -#[derive(Debug, PartialEq, Clone)] -pub enum KeyEvent { - Exec, - Exit, - MovePrev, - MoveNext, - OpenMenu, - CloseMenu, - JumpNext, - JumpPrev, -} - -pub struct InnerState { - pos: usize, - subpos: usize, - page: usize, - search: String, - event: Option, - search_regex: Option, -} - -impl InnerState { - /// Move X Primary Results Upwards - pub fn move_up(&mut self, x: usize) { - self.subpos = 0; - self.pos = std::cmp::max(self.pos, x) - x; - } - - /// Move X Primary Results Downwards - pub fn move_down(&mut self, x: usize, max: usize) { - self.subpos = 0; - self.pos = std::cmp::min(self.pos + x, max - 1) - } - - /// Jump a spefified number of results upwards - #[inline] - pub fn jump_up(&mut self, jump: usize) { - self.move_up(jump) - } - - /// Jump a specified number of results downwards - pub fn jump_down(&mut self, jump: usize, results: &Vec<&Entry>) { - let max = std::cmp::max(results.len(), 1); - self.move_down(jump, max); - } - - /// Move Up Once With Context of SubMenu - pub fn move_prev(&mut self) { - if self.subpos > 0 { - self.subpos -= 1; - return; - } - self.move_up(1); - } - - /// Move Down Once With Context of SubMenu - pub fn move_next(&mut self, results: &Vec<&Entry>) { - if let Some(result) = results.get(self.pos) { - if self.subpos > 0 && self.subpos < result.actions.len() - 1 { - self.subpos += 1; - return; - } - } - self.jump_down(1, results) - } -} - -#[derive(PartialEq)] -pub struct AppState<'a> { - state: &'a UseRef, - app: &'a App, - results: Vec<&'a Entry>, -} - -impl<'a> AppState<'a> { - /// Spawn new Application State Tracker - pub fn new(cx: Scope<'a, T>, app: &'a App) -> Self { - Self { - state: use_ref(cx, || InnerState { - pos: 0, - subpos: 0, - page: 0, - search: "".to_string(), - event: None, - search_regex: app.config.search.restrict.clone().and_then(|mut r| { - if !r.starts_with('^') { - r = format!("^{r}") - }; - if !r.ends_with('$') { - r = format!("{r}$") - }; - match Regex::new(&r) { - Ok(regex) => Some(regex), - Err(err) => { - log::error!("Invalid Regex Expression: {:?}", err); - None - } - } - }), - }), - app, - results: vec![], - } - } - - /// Create Partial Copy of Self (Not Including Results) - pub fn partial_copy(&self) -> Self { - Self { - state: self.state, - app: self.app, - results: vec![], - } - } - - /// Retrieve Configuration - #[inline] - pub fn config(&self) -> &Config { - &self.app.config - } - - /// Retrieve Current Position State - #[inline] - pub fn position(&self) -> (usize, usize) { - self.state.with(|s| (s.pos, s.subpos)) - } - - /// Retrieve Current Search String - #[inline] - pub fn search(&self) -> String { - self.state.with(|s| s.search.clone()) - } - - /// Execute the Current Action - pub fn execute(&self) { - let (pos, subpos) = self.position(); - log::debug!("execute {pos} {subpos}"); - let Some(result) = self.results.get(pos) else { - return; - }; - log::debug!("result: {result:?}"); - let Some(action) = result.actions.get(subpos) else { - return; - }; - log::debug!("action: {action:?}"); - execute(action, self.app.config.terminal.clone()); - } - - /// Set Current Key/Action for Later Evaluation - #[inline] - pub fn set_event(&self, event: KeyEvent) { - self.state.with_mut(|s| s.event = Some(event)); - } - - /// React to Previously Activated KeyEvents - pub fn handle_events(&self, cx: Scope<'a, App>) { - match self.state.with(|s| s.event.clone()) { - None => {} - Some(event) => { - match event { - KeyEvent::Exit => std::process::exit(0), - KeyEvent::Exec => self.execute(), - KeyEvent::OpenMenu => self.open_menu(), - KeyEvent::CloseMenu => self.close_menu(), - KeyEvent::MovePrev => { - self.move_prev(); - let pos = self.position().0; - scroll(cx, if pos <= 3 { pos } else { pos + 3 }) - } - KeyEvent::MoveNext => { - self.move_next(); - scroll(cx, self.position().0 + 3) - } - KeyEvent::JumpPrev => { - self.jump_prev(); - let pos = self.position().0; - scroll(cx, if pos <= 3 { pos } else { pos + 3 }) - } - KeyEvent::JumpNext => { - self.jump_next(); - scroll(cx, self.position().0 + 3) - } - }; - self.state.with_mut(|s| s.event = None); - } - } - } - - /// Generate and return Results PTR - pub fn results(&mut self, entries: &'a Vec) -> Vec<&'a Entry> { - let ratio = self.app.config.page_load; - let page_size = self.app.config.page_size; - let (pos, page, search) = self.state.with(|s| (s.pos, s.page, s.search.clone())); - // determine current page based on position and configuration - let next = (pos % page_size) as f64 / page_size as f64 > ratio; - let pos_page = (pos + 1) / page_size + 1 + next as usize; - let new_page = std::cmp::max(pos_page, page); - let index = page_size * new_page; - // update page counter if higher than before - if new_page > page { - self.state.with_mut(|s| s.page = new_page); - } - // render results and stop at page-limit - let sfn = new_searchfn(&self.app.config, &search); - self.results = entries.iter().filter(|e| sfn(e)).take(index).collect(); - self.results.clone() - } - - /// Update Search and Reset Position - pub fn set_search(&self, cx: Scope<'_, App>, search: String) { - // confirm search meets required criteria - if let Some(min) = self.app.config.search.min_length.as_ref() { - if search.len() < *min { - return; - } - } - if let Some(min) = self.app.config.search.min_length.as_ref() { - if search.len() < *min { - return; - } - } - let is_match = self.state.with(|s| { - s.search_regex - .as_ref() - .map(|r| r.is_match(&search)) - .unwrap_or(true) - }); - if !is_match { - return; - } - // update search w/ new content - self.state.with_mut(|s| { - s.pos = 0; - s.subpos = 0; - s.search = search; - }); - scroll(cx, 0); - } - - /// Manually Set Position/SubPosition (with Click) - pub fn set_position(&self, pos: usize, subpos: usize) { - self.state.with_mut(|s| { - s.pos = pos; - s.subpos = subpos; - }) - } - - /// Automatically Increase PageCount When Nearing Bottom - // pub fn scroll_down(&self) { - // self.state.with_mut(|s| { - // if self.app.config.page_size * s.page < self.app.entries.len() { - // s.page += 1; - // } - // }); - // } - - /// Move Position To SubMenu if it Exists - pub fn open_menu(&self) { - let pos = self.state.with(|s| s.pos); - if let Some(result) = self.results.get(pos) { - if result.actions.len() > 1 { - self.state.with_mut(|s| s.subpos += 1); - } - } - } - - // Reset and Close SubMenu Position - #[inline] - pub fn close_menu(&self) { - self.state.with_mut(|s| s.subpos = 0); - } - - /// Move Up Once With Context of SubMenu - #[inline] - pub fn move_prev(&self) { - self.state.with_mut(|s| s.move_prev()); - } - - /// Move Down Once With Context of SubMenu - #[inline] - pub fn move_next(&self) { - self.state.with_mut(|s| s.move_next(&self.results)) - } - - /// Jump a Configured Distance Up the Results - #[inline] - pub fn jump_prev(&self) { - let distance = self.app.config.jump_dist; - self.state.with_mut(|s| s.jump_up(distance)) - } - - /// Jump a Configured Distance Down the Results - #[inline] - pub fn jump_next(&self) { - let distance = self.app.config.jump_dist; - self.state - .with_mut(|s| s.jump_down(distance, &self.results)) - } -}