diff --git a/Cargo.lock b/Cargo.lock index bcd4ec4..45e30be 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -111,7 +111,7 @@ dependencies = [ "bitflags 2.6.0", "cc", "cesu8", - "jni 0.21.1", + "jni", "jni-sys", "libc", "log", @@ -261,26 +261,33 @@ dependencies = [ ] [[package]] -name = "async-broadcast" -version = "0.7.1" +name = "ashpd" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20cd0e2e25ea8e5f7e9df04578dc6cf5c83577fd09b1a46aaf5c85e1c33f2a7e" +checksum = "dd884d7c72877a94102c3715f3b1cd09ff4fac28221add3e57cfbe25c236d093" dependencies = [ - "event-listener 5.3.1", - "event-listener-strategy", - "futures-core", - "pin-project-lite", + "async-fs", + "async-net", + "enumflags2", + "futures-channel", + "futures-util", + "rand 0.8.5", + "serde", + "serde_repr", + "url", + "zbus", ] [[package]] -name = "async-channel" -version = "1.9.0" +name = "async-broadcast" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" +checksum = "20cd0e2e25ea8e5f7e9df04578dc6cf5c83577fd09b1a46aaf5c85e1c33f2a7e" dependencies = [ - "concurrent-queue", - "event-listener 2.5.3", + "event-listener", + "event-listener-strategy", "futures-core", + "pin-project-lite", ] [[package]] @@ -303,8 +310,8 @@ checksum = "d7ebdfa2ebdab6b1760375fa7d6f382b9f486eac35fc994625a00e89280bdbb7" dependencies = [ "async-task", "concurrent-queue", - "fastrand 2.1.1", - "futures-lite 2.3.0", + "fastrand", + "futures-lite", "slab", ] @@ -314,29 +321,9 @@ version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebcd09b382f40fcd159c2d695175b2ae620ffa5f3bd6f664131efff4e8b9e04a" dependencies = [ - "async-lock 3.4.0", + "async-lock", "blocking", - "futures-lite 2.3.0", -] - -[[package]] -name = "async-io" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" -dependencies = [ - "async-lock 2.8.0", - "autocfg", - "cfg-if", - "concurrent-queue", - "futures-lite 1.13.0", - "log", - "parking", - "polling 2.8.0", - "rustix 0.37.27", - "slab", - "socket2", - "waker-fn", + "futures-lite", ] [[package]] @@ -345,14 +332,14 @@ version = "2.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "444b0228950ee6501b3568d3c93bf1176a1fdbc3b758dcd9475046d30f4dc7e8" dependencies = [ - "async-lock 3.4.0", + "async-lock", "cfg-if", "concurrent-queue", "futures-io", - "futures-lite 2.3.0", + "futures-lite", "parking", - "polling 3.7.3", - "rustix 0.38.34", + "polling", + "rustix", "slab", "tracing", "windows-sys 0.59.0", @@ -360,22 +347,24 @@ dependencies = [ [[package]] name = "async-lock" -version = "2.8.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" +checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" dependencies = [ - "event-listener 2.5.3", + "event-listener", + "event-listener-strategy", + "pin-project-lite", ] [[package]] -name = "async-lock" -version = "3.4.0" +name = "async-net" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" +checksum = "b948000fad4873c1c9339d60f2623323a0cfd3816e5181033c6a5cb68b2accf7" dependencies = [ - "event-listener 5.3.1", - "event-listener-strategy", - "pin-project-lite", + "async-io", + "blocking", + "futures-lite", ] [[package]] @@ -384,16 +373,16 @@ version = "2.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8a07789659a4d385b79b18b9127fc27e1a59e1e89117c78c5ea3b806f016374" dependencies = [ - "async-channel 2.3.1", - "async-io 2.3.4", - "async-lock 3.4.0", + "async-channel", + "async-io", + "async-lock", "async-signal", "async-task", "blocking", "cfg-if", - "event-listener 5.3.1", - "futures-lite 2.3.0", - "rustix 0.38.34", + "event-listener", + "futures-lite", + "rustix", "tracing", "windows-sys 0.59.0", ] @@ -415,13 +404,13 @@ version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "637e00349800c0bdf8bfc21ebbc0b6524abea702b0da4168ac00d070d0c0b9f3" dependencies = [ - "async-io 2.3.4", - "async-lock 3.4.0", + "async-io", + "async-lock", "atomic-waker", "cfg-if", "futures-core", "futures-io", - "rustix 0.38.34", + "rustix", "signal-hook-registry", "slab", "windows-sys 0.59.0", @@ -446,21 +435,20 @@ dependencies = [ [[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", "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", "gobject-sys", @@ -520,9 +508,9 @@ dependencies = [ [[package]] name = "base64" -version = "0.13.1" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "base64" @@ -630,10 +618,10 @@ version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "703f41c54fc768e63e091340b424302bb1c29ef4aa0c7f10fe849dfb114d29ea" dependencies = [ - "async-channel 2.3.1", + "async-channel", "async-task", "futures-io", - "futures-lite 2.3.0", + "futures-lite", "piper", ] @@ -657,9 +645,9 @@ checksum = "64fa3c856b712db6612c019f14756e64e4bcea13337a6b33b696333a9eaa2d06" [[package]] name = "bytemuck" -version = "1.17.0" +version = "1.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fd4c6dcc3b0aea2f5c0b4b82c2b15fe39ddbc76041a310848f4706edf76bb31" +checksum = "773d90827bc3feecfb67fab12e24de0749aad83c74b9504ecde46237b5cd24e2" dependencies = [ "bytemuck_derive", ] @@ -716,11 +704,11 @@ dependencies = [ [[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.6.0", "cairo-sys-rs", "glib", "libc", @@ -730,9 +718,9 @@ 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", "libc", @@ -747,8 +735,8 @@ checksum = "fba7adb4dd5aa98e5553510223000e7148f621165ec5f9acd7113f6ca4995298" dependencies = [ "bitflags 2.6.0", "log", - "polling 3.7.3", - "rustix 0.38.34", + "polling", + "rustix", "slab", "thiserror", ] @@ -761,8 +749,8 @@ checksum = "b99da2f8558ca23c71f4fd15dc57c906239752dd27ff3c00a1d56b685b7cbfec" dependencies = [ "bitflags 2.6.0", "log", - "polling 3.7.3", - "rustix 0.38.34", + "polling", + "rustix", "slab", "thiserror", ] @@ -774,7 +762,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f0ea9b9476c7fad82841a8dbb380e2eae480c21910feba80725b46931ed8f02" dependencies = [ "calloop 0.12.4", - "rustix 0.38.34", + "rustix", "wayland-backend", "wayland-client", ] @@ -786,7 +774,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95a66a987056935f7efce4ab5668920b5d0dac4a7c99991a67395f13702ddd20" dependencies = [ "calloop 0.13.0", - "rustix 0.38.34", + "rustix", "wayland-backend", "wayland-client", ] @@ -796,6 +784,32 @@ name = "camino" version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3" +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 = "cast" @@ -814,9 +828,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.14" +version = "1.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d2eb3cd3d1bf4529e31c215ee6f93ec5a3d536d9f578f93d9d33ee19562932" +checksum = "57b6a275aa2903740dc87da01c62040406b8812552e97129a63ea8850a17c6e6" dependencies = [ "jobserver", "libc", @@ -1001,16 +1015,16 @@ dependencies = [ [[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", "cocoa-foundation", "core-foundation", - "core-graphics 0.22.3", - "foreign-types 0.3.2", + "core-graphics", + "foreign-types", "libc", "objc", ] @@ -1101,11 +1115,31 @@ dependencies = [ "crossbeam-utils", ] +[[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 = "constant_time_eq" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" +checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" [[package]] name = "constcat" @@ -1119,6 +1153,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" @@ -1135,19 +1178,6 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" -[[package]] -name = "core-graphics" -version = "0.22.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2581bbab3b8ffc6fcbd550bf46c355135d16e9ff2a6ea032ad6b9bf1d7efe4fb" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "core-graphics-types", - "foreign-types 0.3.2", - "libc", -] - [[package]] name = "core-graphics" version = "0.23.2" @@ -1157,7 +1187,7 @@ dependencies = [ "bitflags 1.3.2", "core-foundation", "core-graphics-types", - "foreign-types 0.5.0", + "foreign-types", "libc", ] @@ -1427,6 +1457,19 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7762d17f1241643615821a8455a0b2c3e803784b058693d990b11f2dce25a0ca" +[[package]] +name = "dashmap" +version = "5.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" +dependencies = [ + "cfg-if", + "hashbrown 0.14.5", + "lock_api", + "once_cell", + "parking_lot_core 0.9.10", +] + [[package]] name = "datasize" version = "0.2.15" @@ -1494,7 +1537,7 @@ version = "0.99.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" dependencies = [ - "convert_case", + "convert_case 0.4.0", "proc-macro2", "quote", "rustc_version", @@ -1520,43 +1563,69 @@ dependencies = [ [[package]] name = "dioxus" -version = "0.4.3" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d9e3b0725e520250bf23213f996d241cca29cea4360a9bf08a44e0033f8e569" +checksum = "b8e7fe217b50d43b27528b0f24c89b411f742a3e7564d1cfbf85253f967954db" 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-cli-config" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7dffc452ed91af6ef772b0d9a5899573f6785314e97c533733ec55413c01df3" +dependencies = [ + "once_cell", + "serde", + "serde_json", + "tracing", +] + +[[package]] +name = "dioxus-config-macro" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb1a1aa34cc04c1f7fcbb7a10791ba773cc02d834fe3ec1fe05647699f3b101f" +dependencies = [ + "proc-macro2", + "quote", ] [[package]] name = "dioxus-core" -version = "0.4.3" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f33186615b2e90bceab24a195b3cfad4e0b4d91a33ec44a94845876bfb25c13" +checksum = "3730d2459ab66951cedf10b09eb84141a6eda7f403c28057cbe010495be156b7" dependencies = [ - "bumpalo", "futures-channel", "futures-util", + "generational-box", "longest-increasing-subsequence", "rustc-hash", "serde", "slab", - "smallbox", + "slotmap", "tracing", + "tracing-subscriber", ] [[package]] name = "dioxus-core-macro" -version = "0.4.3" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21afaccb28587aed0ba98856335912f5ce7052c0aafa74b213829a3b8bfd2345" +checksum = "0d9c0dfe0e6a46626fa716c4aa1d2ccb273441337909cfeacad5bb6fcfb947d2" dependencies = [ "constcat", - "dioxus-core", + "convert_case 0.6.0", "dioxus-rsx", "prettyplease", "proc-macro2", @@ -1572,26 +1641,35 @@ checksum = "2ea539174bb236e0e7dc9c12b19b88eae3cb574dedbd0252a2d43ea7e6de13e2" [[package]] name = "dioxus-desktop" -version = "0.4.3" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf3ea0b1f6e64157b43e73d7ec3985df904c89ecf313bff93e06ff7d3b40d1cb" +checksum = "a2e0380cfcf44ed9310c6fd28454a7351293134d47b7e0b7baeaad5c5beded68" 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", @@ -1600,15 +1678,40 @@ dependencies = [ "wry", ] +[[package]] +name = "dioxus-fullstack" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b80f0ac18166302341164e681322e0385131c08a11c3cc1c51ee8df799ab0d3d" +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.4.3" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bb23ce82df4fb13e9ddaa01d1469f1f32d683dd4636204bd0a0eaf434b65946" +checksum = "fa8f9c661eea82295219d25555d5c0b597e74186b029038ceb5e3700ccbd4380" dependencies = [ "dioxus-core", "dioxus-debug-cell", + "dioxus-signals", "futures-channel", + "futures-util", + "generational-box", "slab", "thiserror", "tracing", @@ -1616,9 +1719,9 @@ dependencies = [ [[package]] name = "dioxus-hot-reload" -version = "0.4.3" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7d8c9e89e866a6b84b8ad696f0ff2f6f6563d2235eb99acc6952f19e516cc09" +checksum = "77d01246cb1b93437fb0bbd0dd11cfc66342d86b4311819e76654f2017ce1473" dependencies = [ "dioxus-core", "dioxus-html", @@ -1630,39 +1733,107 @@ dependencies = [ [[package]] name = "dioxus-html" -version = "0.4.3" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "828a42a2d70688a2412a8538c8b5a5eceadf68f682f899dc4455a0169db39dfd" +checksum = "f01a0826f179adad6ea8d6586746e8edde0c602cc86f4eb8e5df7a3b204c4018" dependencies = [ - "async-channel 1.9.0", "async-trait", "dioxus-core", + "dioxus-html-internal-macro", "enumset", "euclid", + "futures-channel", + "generational-box", "keyboard-types", "serde", "serde-value", "serde_json", "serde_repr", "tokio", + "tracing", "web-sys", ] +[[package]] +name = "dioxus-html-internal-macro" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b96f35a608d0ab8f4ca6f66ce1828354e4ebd41580b12454f490221a11da93c" +dependencies = [ + "convert_case 0.6.0", + "proc-macro2", + "quote", + "syn 2.0.76", +] + [[package]] name = "dioxus-interpreter-js" -version = "0.4.3" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9a3115cf9f550a9af88de615c21a15a72dee44230602087dd7b0c5d01f46c37" +checksum = "351fad098c657d14f3ac2900362d2b86e83c22c4c620a404839e1ab628f3395b" +dependencies = [ + "dioxus-core", + "dioxus-html", + "md5", + "sledgehammer_bindgen", + "sledgehammer_utils", +] + +[[package]] +name = "dioxus-lib" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bd39b2c41dd1915dcb91d914ea72d8b646f1f8995aaeff82816b862ec586ecd" +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.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15c400bc8a779107d8f3a67b14375db07dbd2bc31163bf085a8e9097f36f7179" +dependencies = [ + "dioxus-core", + "internment", + "krates", + "proc-macro2", + "quote", + "syn 2.0.76", + "tracing", +] + +[[package]] +name = "dioxus-signals" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c974133c7c95497a486d587e40449927711430b308134b9cd374b8d35eceafb3" +checksum = "7e3e224cd3d3713f159f0199fc088c292a0f4adb94996b48120157f6a8f8342d" dependencies = [ "dioxus-core", + "futures-channel", + "futures-util", + "generational-box", + "once_cell", + "parking_lot 0.12.3", + "rustc-hash", + "tracing", +] + +[[package]] +name = "dioxus_server_macro" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5ef2cad17001c1155f019cb69adbacd620644566d78a77d0778807bb106a337" +dependencies = [ + "convert_case 0.6.0", "proc-macro2", "quote", + "server_fn_macro", "syn 2.0.76", ] @@ -1712,6 +1883,29 @@ dependencies = [ "libloading 0.8.5", ] +[[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.76", +] + [[package]] name = "dlv-list" version = "0.3.0" @@ -1740,7 +1934,7 @@ dependencies = [ "bytemuck", "drm-ffi", "drm-fourcc", - "rustix 0.38.34", + "rustix", ] [[package]] @@ -1750,7 +1944,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97c98727e48b7ccb4f4aea8cfe881e5b07f702d17b7875991881b41af7278d53" dependencies = [ "drm-sys", - "rustix 0.38.34", + "rustix", ] [[package]] @@ -1830,7 +2024,7 @@ dependencies = [ "camino", "eco-cbz", "eco-pack", - "html5ever 0.26.0", + "html5ever", "image 0.25.2", "markup5ever_rcdom", "mobi", @@ -1873,7 +2067,6 @@ dependencies = [ "camino", "dark-light", "dioxus", - "dioxus-desktop", "dunce", "eco-cbz", "epub", @@ -2050,20 +2243,14 @@ dependencies = [ [[package]] name = "euclid" -version = "0.22.10" +version = "0.22.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0f0eb73b934648cd7a4a61f1b15391cd95dab0b4da6e2e66c2a072c144b4a20" +checksum = "ad9cdb4b747e485a12abb0e6566612956c7a1bafa3bdb8d682c5b6d403589e48" dependencies = [ "num-traits", "serde", ] -[[package]] -name = "event-listener" -version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" - [[package]] name = "event-listener" version = "5.3.1" @@ -2081,7 +2268,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" dependencies = [ - "event-listener 5.3.1", + "event-listener", "pin-project-lite", ] @@ -2107,15 +2294,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd2e7510819d6fbf51a5545c8f922716ecfb14df168a3242f7d33e0239efe6a1" -[[package]] -name = "fastrand" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" -dependencies = [ - "instant", -] - [[package]] name = "fastrand" version = "2.1.1" @@ -2161,6 +2339,12 @@ dependencies = [ "rustc_version", ] +[[package]] +name = "fixedbitset" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" + [[package]] name = "flate2" version = "1.0.33" @@ -2218,15 +2402,6 @@ dependencies = [ "ttf-parser 0.19.2", ] -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared 0.1.1", -] - [[package]] name = "foreign-types" version = "0.5.0" @@ -2234,7 +2409,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" dependencies = [ "foreign-types-macros", - "foreign-types-shared 0.3.1", + "foreign-types-shared", ] [[package]] @@ -2248,12 +2423,6 @@ dependencies = [ "syn 2.0.76", ] -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - [[package]] name = "foreign-types-shared" version = "0.3.1" @@ -2328,28 +2497,13 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" -[[package]] -name = "futures-lite" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" -dependencies = [ - "fastrand 1.9.0", - "futures-core", - "futures-io", - "memchr", - "parking", - "pin-project-lite", - "waker-fn", -] - [[package]] name = "futures-lite" version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" dependencies = [ - "fastrand 2.1.1", + "fastrand", "futures-core", "futures-io", "parking", @@ -2408,11 +2562,10 @@ 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", @@ -2424,22 +2577,22 @@ dependencies = [ [[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", "glib", "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", "glib-sys", @@ -2450,9 +2603,9 @@ dependencies = [ [[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", @@ -2467,9 +2620,9 @@ 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", @@ -2479,11 +2632,25 @@ dependencies = [ "system-deps", ] +[[package]] +name = "gdkx11" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2ea8a4909d530f79921290389cbd7c34cb9d623bfe970eaae65ca5f9cd9cce" +dependencies = [ + "gdk", + "gdkx11-sys", + "gio", + "glib", + "libc", + "x11", +] + [[package]] name = "gdkx11-sys" -version = "0.16.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa2bf8b5b8c414bc5d05e48b271896d0fd3ddb57464a3108438082da61de6af" +checksum = "fee8f00f4ee46cad2939b8990f5c70c94ff882c3028f3cc5abf950fa4ab53043" dependencies = [ "gdk-sys", "glib-sys", @@ -2492,6 +2659,15 @@ dependencies = [ "x11", ] +[[package]] +name = "generational-box" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "557cf2cbacd0504c6bf8c29f52f8071e0de1d9783346713dc6121d7fa1e5d0e0" +dependencies = [ + "parking_lot 0.12.3", +] + [[package]] name = "generic-array" version = "0.14.7" @@ -2552,11 +2728,10 @@ 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", @@ -2572,9 +2747,9 @@ 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", "gobject-sys", @@ -2602,11 +2777,11 @@ checksum = "151665d9be52f9bb40fc7966565d39666f2d1e69233571b71b87791c7e0528b3" [[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.6.0", "futures-channel", "futures-core", "futures-executor", @@ -2617,6 +2792,7 @@ dependencies = [ "glib-sys", "gobject-sys", "libc", + "memchr", "once_cell", "smallvec", "thiserror", @@ -2624,24 +2800,23 @@ 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 1.3.1", + "proc-macro-crate 2.0.0", "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.76", ] [[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", @@ -2653,6 +2828,23 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +[[package]] +name = "global-hotkey" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b436093d1598b05e3b7fddc097b2bad32763f53a1beb25ab6f9718c6a60acd09" +dependencies = [ + "bitflags 2.6.0", + "cocoa", + "crossbeam-channel", + "keyboard-types", + "objc", + "once_cell", + "thiserror", + "windows-sys 0.52.0", + "x11-dl", +] + [[package]] name = "globalcache" version = "0.2.4" @@ -2664,6 +2856,40 @@ dependencies = [ "web-time 1.1.0", ] +[[package]] +name = "gloo-net" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06f627b1a58ca3d42b45d6104bf1e1a03799df472df00988b6ba21accc10580" +dependencies = [ + "futures-channel", + "futures-core", + "futures-sink", + "gloo-utils", + "http 1.1.0", + "js-sys", + "pin-project", + "serde", + "serde_json", + "thiserror", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "gloo-utils" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b5555354113b18c547c1d3a98fbf7fb32a9ff4f6fa112ce823a21641a0ba3aa" +dependencies = [ + "js-sys", + "serde", + "serde_json", + "wasm-bindgen", + "web-sys", +] + [[package]] name = "glow" version = "0.13.1" @@ -2699,9 +2925,9 @@ dependencies = [ [[package]] name = "gobject-sys" -version = "0.16.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3520bb9c07ae2a12c7f2fbb24d4efc11231c8146a86956413fb1a79bb760a0f1" +checksum = "0850127b514d1c4a4654ead6dedadb18198999985908e6ffe4436f53c785ce44" dependencies = [ "glib-sys", "libc", @@ -2762,12 +2988,11 @@ 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", @@ -2778,16 +3003,15 @@ dependencies = [ "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", @@ -2803,16 +3027,15 @@ 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 1.3.1", "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.76", ] [[package]] @@ -2925,41 +3148,106 @@ 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", - "markup5ever 0.10.1", + "markup5ever", "proc-macro2", "quote", "syn 1.0.109", ] [[package]] -name = "html5ever" -version = "0.26.0" +name = "http" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bea68cab48b8459f17cf1c944c67ddc572d272d9f2b274140f223ecb1da4a3b7" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" dependencies = [ - "log", - "mac", - "markup5ever 0.11.0", - "proc-macro2", - "quote", - "syn 1.0.109", + "bytes", + "fnv", + "itoa 1.0.11", ] [[package]] name = "http" -version = "0.2.12" +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 = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http 1.1.0", +] + +[[package]] +name = "http-body-util" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" +dependencies = [ + "bytes", + "futures-util", + "http 1.1.0", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" + +[[package]] +name = "hyper" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http 1.1.0", + "http-body", + "httparse", + "itoa 1.0.11", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-util" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +checksum = "cde7055719c54e36e95e8719f95883f22072a48ede39db7fc17a4e1d5281e9b9" dependencies = [ "bytes", - "fnv", - "itoa 1.0.11", + "futures-channel", + "futures-util", + "http 1.1.0", + "http-body", + "hyper", + "pin-project-lite", + "socket2", + "tokio", + "tower", + "tower-service", + "tracing", ] [[package]] @@ -2973,7 +3261,7 @@ dependencies = [ "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows-core", + "windows-core 0.52.0", ] [[package]] @@ -3289,6 +3577,16 @@ 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 0.12.3", +] + [[package]] name = "interpolate_name" version = "0.2.4" @@ -3327,15 +3625,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae52f28f45ac2bc96edb7714de995cffc174a395fb0abf5bff453587c980d7b9" [[package]] -name = "io-lifetimes" -version = "1.0.11" +name = "ipnet" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" -dependencies = [ - "hermit-abi 0.3.9", - "libc", - "windows-sys 0.48.0", -] +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "is-terminal" @@ -3395,9 +3688,9 @@ 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", @@ -3406,9 +3699,9 @@ dependencies = [ [[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", "gobject-sys", @@ -3416,20 +3709,6 @@ dependencies = [ "system-deps", ] -[[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" @@ -3517,13 +3796,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" [[package]] -name = "kuchiki" -version = "0.8.1" +name = "krates" +version = "0.16.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +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 = "1ea8e9c6e031377cff82ee3001dc8026cdf431ed4e2e6b51f98ab8c73484a358" +checksum = "f29e4755b7b995046f510a7520c42b2fed58b77bd94d5a87a8eb43d2fd126da8" dependencies = [ "cssparser", - "html5ever 0.25.2", + "html5ever", + "indexmap 1.9.3", "matches", "selectors", ] @@ -3639,10 +3932,23 @@ dependencies = [ ] [[package]] -name = "linux-raw-sys" -version = "0.3.8" +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 = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" +checksum = "db23b9e7e2b7831bbd8aac0bbeeeb7b68cbebc162b227e7052e8e55829a09212" +dependencies = [ + "libc", + "x11", +] [[package]] name = "linux-raw-sys" @@ -3727,20 +4033,6 @@ dependencies = [ "libc", ] -[[package]] -name = "markup5ever" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a24f40fb03852d1cdd84330cddcaf98e9ec08a7b7768e952fad3b4cf048ec8fd" -dependencies = [ - "log", - "phf 0.8.0", - "phf_codegen 0.8.0", - "string_cache", - "string_cache_codegen", - "tendril", -] - [[package]] name = "markup5ever" version = "0.11.0" @@ -3761,8 +4053,8 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9521dd6750f8e80ee6c53d65e2e4656d7de37064f3a7a5d2d11d05df93839c2" dependencies = [ - "html5ever 0.26.0", - "markup5ever 0.11.0", + "html5ever", + "markup5ever", "tendril", "xml5ever", ] @@ -3830,12 +4122,28 @@ dependencies = [ "bitflags 2.6.0", "block", "core-graphics-types", - "foreign-types 0.5.0", + "foreign-types", "log", "objc", "paste", ] +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "mime_guess" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" +dependencies = [ + "mime", + "unicase", +] + [[package]] name = "minimal-lexical" version = "0.2.1" @@ -3861,6 +4169,18 @@ dependencies = [ "adler2", ] +[[package]] +name = "mio" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" +dependencies = [ + "hermit-abi 0.3.9", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.52.0", +] + [[package]] name = "mobi" version = "0.8.0" @@ -3872,6 +4192,24 @@ dependencies = [ "thiserror", ] +[[package]] +name = "muda" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c47e7625990fc1af2226ea4f34fb2412b03c12639fcb91868581eb3a6893453" +dependencies = [ + "cocoa", + "crossbeam-channel", + "gtk", + "keyboard-types", + "libxdo", + "objc", + "once_cell", + "png", + "thiserror", + "windows-sys 0.52.0", +] + [[package]] name = "mutate_once" version = "0.1.1" @@ -3900,14 +4238,15 @@ dependencies = [ [[package]] name = "ndk" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2032c77e030ddee34a6787a64166008da93f6a352b629261d0fee232b8742dd4" +checksum = "451422b7e4718271c8b5b3aadf5adedba43dc76312454b387e98fae0fc951aa0" dependencies = [ "bitflags 1.3.2", "jni-sys", - "ndk-sys 0.3.0", + "ndk-sys 0.4.1+23.1.7779620", "num_enum 0.5.11", + "raw-window-handle 0.5.2", "thiserror", ] @@ -3934,9 +4273,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", ] @@ -4103,7 +4442,7 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", "syn 2.0.76", @@ -4266,9 +4605,9 @@ dependencies = [ [[package]] name = "object" -version = "0.36.3" +version = "0.36.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27b64972346851a39438c60b341ebc01bba47464ae329e55cf343eb93964efd9" +checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a" dependencies = [ "memchr", ] @@ -4364,11 +4703,10 @@ dependencies = [ [[package]] name = "pango" -version = "0.16.5" +version = "0.18.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdff66b271861037b89d028656184059e03b0b6ccb36003820be19f7200b1e94" +checksum = "7ca27ec1eb0457ab26f3036ea52229edbdb74dee1edd29063f5b9b010e7ebee4" dependencies = [ - "bitflags 1.3.2", "gio", "glib", "libc", @@ -4378,9 +4716,9 @@ 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", "gobject-sys", @@ -4503,6 +4841,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.4.0", +] + [[package]] name = "phf" version = "0.8.0" @@ -4637,6 +4985,26 @@ dependencies = [ "siphasher", ] +[[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.76", +] + [[package]] name = "pin-project-lite" version = "0.2.14" @@ -4656,7 +5024,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066" dependencies = [ "atomic-waker", - "fastrand 2.1.1", + "fastrand", "futures-io", ] @@ -4707,22 +5075,6 @@ dependencies = [ "miniz_oxide 0.7.4", ] -[[package]] -name = "polling" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" -dependencies = [ - "autocfg", - "bitflags 1.3.2", - "cfg-if", - "concurrent-queue", - "libc", - "log", - "pin-project-lite", - "windows-sys 0.48.0", -] - [[package]] name = "polling" version = "3.7.3" @@ -4733,11 +5085,17 @@ dependencies = [ "concurrent-queue", "hermit-abi 0.4.0", "pin-project-lite", - "rustix 0.38.34", + "rustix", "tracing", "windows-sys 0.59.0", ] +[[package]] +name = "pollster" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22686f4785f02a4fcc856d3b3bb19bf6c8160d103f7a99cc258bddd0251dc7f2" + [[package]] name = "powerfmt" version = "0.2.0" @@ -4767,9 +5125,9 @@ checksum = "e8cf8e6a8aa66ce33f63993ffc4ea4271eb5b0530a9002db8455ea6050c77bfa" [[package]] name = "prettyplease" -version = "0.2.21" +version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a909e6e8053fa1a5ad670f5816c7d93029ee1fa8898718490544a6b0d5d38b3e" +checksum = "479cf940fbbb3426c32c5d5176f62ad57549a0bb84773423ba8be9d089f5faba" dependencies = [ "proc-macro2", "syn 2.0.76", @@ -4787,11 +5145,20 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "3.1.0" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" +dependencies = [ + "toml_edit 0.20.7", +] + +[[package]] +name = "proc-macro-crate" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" dependencies = [ - "toml_edit 0.21.1", + "toml_edit 0.22.20", ] [[package]] @@ -5151,29 +5518,65 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19b30a45b0cd0bcca8037f3d0dc3421eaf95327a17cad11964fb8179b4fc4832" +[[package]] +name = "reqwest" +version = "0.12.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8f4955649ef5c38cc7f9e8aa41761d48fb9677197daea9984dc54f56aad5e63" +dependencies = [ + "base64 0.22.1", + "bytes", + "futures-core", + "futures-util", + "http 1.1.0", + "http-body", + "http-body-util", + "hyper", + "hyper-util", + "ipnet", + "js-sys", + "log", + "mime", + "mime_guess", + "once_cell", + "percent-encoding", + "pin-project-lite", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tokio-util", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams", + "web-sys", + "windows-registry", +] + [[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", - "gobject-sys", - "gtk-sys", "js-sys", "log", "objc", "objc-foundation", "objc_id", - "raw-window-handle 0.5.2", + "pollster", + "raw-window-handle 0.6.2", + "urlencoding", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "windows 0.44.0", + "windows-sys 0.48.0", ] [[package]] @@ -5221,32 +5624,18 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver", ] [[package]] name = "rustix" -version = "0.37.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" -dependencies = [ - "bitflags 1.3.2", - "errno", - "io-lifetimes", - "libc", - "linux-raw-sys 0.3.8", - "windows-sys 0.48.0", -] - -[[package]] -name = "rustix" -version = "0.38.34" +version = "0.38.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +checksum = "a85d50532239da68e9addb745ba38ff4612a242c1c7ceea689c4bc7c2f43c36f" dependencies = [ "bitflags 2.6.0", "errno", @@ -5353,6 +5742,18 @@ name = "semver" version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" 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" @@ -5385,35 +5786,111 @@ dependencies = [ ] [[package]] -name = "serde_json" -version = "1.0.127" +name = "serde_json" +version = "1.0.127" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad" +dependencies = [ + "itoa 1.0.11", + "memchr", + "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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.76", +] + +[[package]] +name = "serde_spanned" +version = "0.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ + "form_urlencoded", "itoa 1.0.11", - "memchr", "ryu", "serde", ] [[package]] -name = "serde_repr" -version = "0.1.19" +name = "server_fn" +version = "0.6.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" +checksum = "024b400db1aca5bd4188714f7bbbf7a2e1962b9a12a80b2a21e937e509086963" +dependencies = [ + "bytes", + "const_format", + "dashmap", + "futures", + "gloo-net", + "http 1.1.0", + "js-sys", + "once_cell", + "reqwest", + "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.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cf0e6f71fc924df36e87f27dfbd447f0bedd092d365db3a5396878256d9f00c" dependencies = [ + "const_format", + "convert_case 0.6.0", "proc-macro2", "quote", "syn 2.0.76", + "xxhash-rust", ] [[package]] -name = "serde_spanned" -version = "0.6.7" +name = "server_fn_macro_default" +version = "0.6.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" +checksum = "556e4fd51eb9ee3e7d9fb0febec6cef486dcbc8f7f427591dfcfebee1abe1ad4" dependencies = [ - "serde", + "server_fn_macro", + "syn 2.0.76", ] [[package]] @@ -5463,6 +5940,16 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" +[[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" @@ -5512,21 +5999,46 @@ 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.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edc90d3e8623d29a664cd8dba5078b600dd203444f00b9739f744e4c6e7aeaf2" +dependencies = [ + "quote", + "syn 2.0.76", +] + +[[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" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dbff4acf519f630b3a3ddcfaea6c06b42174d9a44bc70c620e9ed1649d58b82a" dependencies = [ + "serde", "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" @@ -5546,7 +6058,7 @@ dependencies = [ "libc", "log", "memmap2 0.9.4", - "rustix 0.38.34", + "rustix", "thiserror", "wayland-backend", "wayland-client", @@ -5571,7 +6083,7 @@ dependencies = [ "libc", "log", "memmap2 0.9.4", - "rustix 0.38.34", + "rustix", "thiserror", "wayland-backend", "wayland-client", @@ -5627,12 +6139,12 @@ dependencies = [ [[package]] name = "socket2" -version = "0.4.10" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" dependencies = [ "libc", - "winapi", + "windows-sys 0.52.0", ] [[package]] @@ -5644,10 +6156,10 @@ dependencies = [ "as-raw-xcb-connection", "bytemuck", "cfg_aliases 0.2.1", - "core-graphics 0.23.2", + "core-graphics", "drm", - "fastrand 2.1.1", - "foreign-types 0.5.0", + "fastrand", + "foreign-types", "js-sys", "log", "memmap2 0.9.4", @@ -5657,7 +6169,7 @@ dependencies = [ "objc2-quartz-core", "raw-window-handle 0.6.2", "redox_syscall 0.5.3", - "rustix 0.38.34", + "rustix", "tiny-xlib", "wasm-bindgen", "wayland-backend", @@ -5670,24 +6182,22 @@ 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", "glib", "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", "glib-sys", @@ -5829,6 +6339,15 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "sync_wrapper" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +dependencies = [ + "futures-core", +] + [[package]] name = "sys-locale" version = "0.3.1" @@ -5853,48 +6372,39 @@ dependencies = [ [[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 0.22.3", + "core-graphics", "crossbeam-channel", "dispatch", - "gdk", - "gdk-pixbuf", - "gdk-sys", + "dlopen2", "gdkwayland-sys", "gdkx11-sys", - "gio", - "glib", - "glib-sys", "gtk", - "image 0.24.9", "instant", - "jni 0.20.0", + "jni", "lazy_static", "libc", "log", - "ndk 0.6.0", + "ndk 0.7.0", "ndk-context", - "ndk-sys 0.3.0", + "ndk-sys 0.4.1+23.1.7779620", "objc", "once_cell", "parking_lot 0.12.3", - "png", "raw-window-handle 0.5.2", + "raw-window-handle 0.6.2", "scopeguard", - "serde", "tao-macros", "unicode-segmentation", - "uuid", - "windows 0.44.0", - "windows-implement", + "url", + "windows 0.54.0", + "windows-version", "x11-dl", ] @@ -5922,9 +6432,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" dependencies = [ "cfg-if", - "fastrand 2.1.1", + "fastrand", "once_cell", - "rustix 0.38.34", + "rustix", "windows-sys 0.59.0", ] @@ -6098,8 +6608,12 @@ checksum = "9babc99b9923bfa4804bd74722ff02c0381021eafa4db9949217e3be8e84fff5" dependencies = [ "backtrace", "bytes", + "libc", + "mio", "pin-project-lite", + "socket2", "tokio-macros", + "windows-sys 0.52.0", ] [[package]] @@ -6113,6 +6627,19 @@ dependencies = [ "syn 2.0.76", ] +[[package]] +name = "tokio-util" +version = "0.7.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + [[package]] name = "toml" version = "0.8.19" @@ -6147,9 +6674,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.21.1" +version = "0.20.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" +checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" dependencies = [ "indexmap 2.4.0", "toml_datetime", @@ -6169,6 +6696,33 @@ dependencies = [ "winnow 0.6.18", ] +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "pin-project", + "pin-project-lite", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + [[package]] name = "tracing" version = "0.1.40" @@ -6226,6 +6780,12 @@ dependencies = [ "tracing-log", ] +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + [[package]] name = "ttf-parser" version = "0.19.2" @@ -6271,6 +6831,15 @@ dependencies = [ "winapi", ] +[[package]] +name = "unicase" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" +dependencies = [ + "version_check", +] + [[package]] name = "unicode-bidi" version = "0.3.15" @@ -6349,6 +6918,7 @@ dependencies = [ "form_urlencoded", "idna", "percent-encoding", + "serde", ] [[package]] @@ -6374,9 +6944,6 @@ name = "uuid" version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" -dependencies = [ - "getrandom 0.2.15", -] [[package]] name = "v_frame" @@ -6407,12 +6974,6 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" -[[package]] -name = "waker-fn" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317211a0dc0ceedd78fb2ca9a44aed3d7b9b26f81870d485c07122b4350673b7" - [[package]] name = "walkdir" version = "2.5.0" @@ -6423,6 +6984,15 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + [[package]] name = "wasi" version = "0.9.0+wasi-snapshot-preview1" @@ -6502,6 +7072,19 @@ version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" +[[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 = "wasm-timer" version = "0.2.5" @@ -6525,7 +7108,7 @@ checksum = "f90e11ce2ca99c97b940ee83edbae9da2d56a08f9ea8158550fd77fa31722993" dependencies = [ "cc", "downcast-rs", - "rustix 0.38.34", + "rustix", "scoped-tls", "smallvec", "wayland-sys", @@ -6538,7 +7121,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7e321577a0a165911bdcfb39cf029302479d7527b517ee58ab0f6ad09edf0943" dependencies = [ "bitflags 2.6.0", - "rustix 0.38.34", + "rustix", "wayland-backend", "wayland-scanner", ] @@ -6560,7 +7143,7 @@ version = "0.31.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ef9489a8df197ebf3a8ce8a7a7f0a2320035c3743f3c1bd0bdbccf07ce64f95" dependencies = [ - "rustix 0.38.34", + "rustix", "wayland-client", "xcursor", ] @@ -6689,7 +7272,7 @@ checksum = "db67ae75a9405634f5882791678772c94ff5f16a66535aae186e26aa0841fc8b" dependencies = [ "core-foundation", "home", - "jni 0.21.1", + "jni", "log", "ndk-context", "objc", @@ -6700,9 +7283,9 @@ dependencies = [ [[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", @@ -6724,9 +7307,9 @@ 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", @@ -6744,40 +7327,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 0.44.0", - "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.76", ] [[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 0.44.0", - "windows-bindgen", - "windows-metadata", + "windows 0.52.0", + "windows-core 0.52.0", ] [[package]] @@ -6946,71 +7527,129 @@ 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.6", ] [[package]] name = "windows" -version = "0.52.0" +version = "0.54.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" +checksum = "9252e5725dbed82865af151df558e754e4a3c2c30818359eb17465f1346a1b49" dependencies = [ - "windows-core", + "windows-core 0.54.0", + "windows-implement 0.53.0", + "windows-interface 0.53.0", "windows-targets 0.52.6", ] [[package]] -name = "windows-bindgen" -version = "0.44.0" +name = "windows-core" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "222204ecf46521382a4d88b4a1bbefca9f8855697b4ab7d20803901425e061a3" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-metadata", - "windows-tokens", + "windows-targets 0.52.6", ] [[package]] name = "windows-core" -version = "0.52.0" +version = "0.54.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +checksum = "12661b9c89351d684a50a8a643ce5f608e20243b9fb84687800163429f161d65" dependencies = [ + "windows-result 0.1.2", "windows-targets 0.52.6", ] [[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.76", +] + +[[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.76", ] [[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.76", +] + +[[package]] +name = "windows-interface" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da33557140a288fae4e1d5f8873aaf9eb6613a9cf82c3e070223ff177f598b60" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.76", +] + +[[package]] +name = "windows-registry" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" +dependencies = [ + "windows-result 0.2.0", + "windows-strings", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-result" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets 0.52.6", ] [[package]] -name = "windows-metadata" -version = "0.44.0" +name = "windows-strings" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee78911e3f4ce32c1ad9d3c7b0bd95389662ad8d8f1a3155688fed70bd96e2b6" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result 0.2.0", + "windows-targets 0.52.6", +] [[package]] name = "windows-sys" @@ -7095,10 +7734,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.6", +] [[package]] name = "windows_aarch64_gnullvm" @@ -7246,7 +7888,7 @@ dependencies = [ "calloop 0.12.4", "cfg_aliases 0.1.1", "core-foundation", - "core-graphics 0.23.2", + "core-graphics", "cursor-icon", "icrate", "js-sys", @@ -7261,7 +7903,7 @@ dependencies = [ "percent-encoding", "raw-window-handle 0.6.2", "redox_syscall 0.3.5", - "rustix 0.38.34", + "rustix", "sctk-adwaita", "smithay-client-toolkit 0.18.1", "smol_str", @@ -7309,41 +7951,47 @@ dependencies = [ [[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 0.1.1", "cocoa", - "core-graphics 0.22.3", + "core-graphics", "crossbeam-channel", "dunce", - "gdk", - "gio", - "glib", + "gdkx11", "gtk", - "html5ever 0.25.2", - "http", + "html5ever", + "http 0.2.12", "javascriptcore-rs", - "kuchiki", + "jni", + "kuchikiki", "libc", "log", + "ndk 0.7.0", + "ndk-context", + "ndk-sys 0.4.1+23.1.7779620", "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 0.44.0", - "windows-implement", + "windows 0.52.0", + "windows-implement 0.52.0", + "windows-version", + "x11-dl", ] [[package]] @@ -7378,7 +8026,7 @@ dependencies = [ "libc", "libloading 0.8.5", "once_cell", - "rustix 0.38.34", + "rustix", "x11rb-protocol", ] @@ -7437,7 +8085,7 @@ checksum = "4034e1d05af98b51ad7214527730626f019682d797ba38b51689212118d8e650" dependencies = [ "log", "mac", - "markup5ever 0.11.0", + "markup5ever", ] [[package]] @@ -7461,15 +8109,15 @@ dependencies = [ "async-broadcast", "async-executor", "async-fs", - "async-io 2.3.4", - "async-lock 3.4.0", + "async-io", + "async-lock", "async-process", "async-recursion", "async-task", "async-trait", "blocking", "enumflags2", - "event-listener 5.3.1", + "event-listener", "futures-core", "futures-sink", "futures-util", @@ -7496,7 +8144,7 @@ version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "267db9407081e90bbfa46d841d3cbc60f59c0351838c4bc65199ecd79ab1983e" dependencies = [ - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", "syn 2.0.76", @@ -7682,6 +8330,7 @@ dependencies = [ "enumflags2", "serde", "static_assertions", + "url", "zvariant_derive", ] @@ -7691,7 +8340,7 @@ version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73e2ba546bda683a90652bac4a279bc146adad1386f25379cf73200d2002c449" dependencies = [ - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", "syn 2.0.76", diff --git a/Cargo.toml b/Cargo.toml index 2a149bf..afddeb7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,8 +18,7 @@ chrono = "0.4.38" criterion = { version = "0.5.1", features = ["html_reports"] } dark-light = "1.1.1" dialoguer = "0.11.0" -dioxus = "0.4.0" -dioxus-desktop = "0.4.0" +dioxus = { version = "^0.5.6", features = ["desktop"] } dunce = "1.0.5" eco-cbz = { path = "./eco-cbz" } eco-convert = { path = "./eco-convert" } diff --git a/eco-view/Cargo.toml b/eco-view/Cargo.toml index 76d9305..40189c5 100644 --- a/eco-view/Cargo.toml +++ b/eco-view/Cargo.toml @@ -9,7 +9,6 @@ base64.workspace = true camino.workspace = true dark-light.workspace = true dioxus.workspace = true -dioxus-desktop.workspace = true dunce.workspace = true eco-cbz = { workspace = true, features = ["metadata"] } epub.workspace = true diff --git a/eco-view/src/components/commands.rs b/eco-view/src/components/commands.rs new file mode 100644 index 0000000..e1fd8b6 --- /dev/null +++ b/eco-view/src/components/commands.rs @@ -0,0 +1,38 @@ +use dioxus::prelude::*; + +#[component] +pub fn Commands( + max_page: usize, + nb_loaded_pages: ReadOnlySignal, + current_page: Signal, + on_prev_page_request: EventHandler, + on_next_page_request: EventHandler, +) -> Element { + rsx! { + div { class: "flex flex-row items-center justify-center gap-1 h-8 mb-2", + button { + class: "btn btn-outline-primary btn-sm", + onclick: move |_evt| on_prev_page_request.call(()), + "Prev" + } + span { class: "flex flex-row items-center justify-center bg-backgroundSecondary h-8 px-2 rounded-sm", + "{current_page} / {nb_loaded_pages}" + } + button { + class: "btn btn-outline-primary btn-sm", + onclick: move |_evt| on_next_page_request.call(()), + "Next" + } + } + div { class: "w-full flex flex-row items-center justify-center gap-1 h-8 mb-2", + input { + class: "w-11/12", + r#type: "range", + min: "1", + value: "{current_page}", + max: "{max_page}", + oninput: move |evt| { current_page.set(evt.value().parse().unwrap_or(1)) } + } + } + } +} diff --git a/eco-view/src/components/doc_page.rs b/eco-view/src/components/doc_page.rs index c01f401..f797386 100644 --- a/eco-view/src/components/doc_page.rs +++ b/eco-view/src/components/doc_page.rs @@ -1,28 +1,23 @@ use dioxus::prelude::*; -use crate::doc::{Doc, SharedDoc}; +use crate::FileType; -#[allow(clippy::module_name_repetitions)] -#[derive(Props)] -pub struct DocPageProps<'a> { - doc: SharedDoc, - content: &'a str, -} - -pub fn DocPage<'a, 'b: 'a>(cx: Scope<'a, DocPageProps<'b>>) -> Element<'a> { - let content = cx.props.content; +#[component] +pub fn DocPage(content: ReadOnlySignal) -> Element { + let file_type = use_context::(); - match *cx.props.doc.lock().unwrap() { - Doc::Cbz { .. } => cx.render(rsx!(img { + match file_type { + FileType::Cbz => rsx!(img { class: "h-px grow", src: "data:image/png;base64,{content}" - })), - Doc::Epub { .. } => cx.render(rsx!(div { - class: "h-px grow spect-[12/16]", - iframe { - class: "h-full w-full", - src: "data:text/html;charset=utf-8,{content}" + }), + FileType::Epub => rsx!( + div { class: "h-px grow spect-[12/16]", + iframe { + class: "h-full w-full", + src: "data:text/html;charset=utf-8,{content}" + } } - })), + ), } } diff --git a/eco-view/src/components/mod.rs b/eco-view/src/components/mod.rs index 73fb199..0bdf853 100644 --- a/eco-view/src/components/mod.rs +++ b/eco-view/src/components/mod.rs @@ -1 +1,2 @@ +pub mod commands; pub mod doc_page; diff --git a/eco-view/src/doc.rs b/eco-view/src/doc.rs index b1bd604..be63f69 100644 --- a/eco-view/src/doc.rs +++ b/eco-view/src/doc.rs @@ -16,7 +16,7 @@ use crate::errors::{Error, Result}; #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum FileType { Cbz, - EPub, + Epub, } impl FromStr for FileType { @@ -25,7 +25,7 @@ impl FromStr for FileType { fn from_str(s: &str) -> Result { match s.to_lowercase().as_str() { "cbz" => Ok(FileType::Cbz), - "epub" => Ok(FileType::EPub), + "epub" => Ok(FileType::Epub), _ => Err(Error::InvalidFileType(s.to_string())), } } @@ -60,7 +60,7 @@ impl Doc { pages: Vec::with_capacity(max_page), }) } - FileType::EPub => { + FileType::Epub => { let doc = epub::doc::EpubDoc::new(path)?; let max_page = doc.get_num_pages(); Ok(Doc::Epub { diff --git a/eco-view/src/lib.rs b/eco-view/src/lib.rs index ba8414c..ebd43da 100644 --- a/eco-view/src/lib.rs +++ b/eco-view/src/lib.rs @@ -2,14 +2,15 @@ // Necessary for Dioxus #![allow(non_snake_case, clippy::ignored_unit_patterns)] -use std::{cell::Cell, thread}; +use std::sync::{Arc, Mutex}; +use std::thread::{self, sleep}; +use std::time::Duration; use camino::Utf8PathBuf; -use dioxus::{ - html::{geometry::WheelDelta, input_data::keyboard_types::Key}, - prelude::*, -}; -use dioxus_desktop::{Config, WindowBuilder}; +use components::commands::Commands; +use dioxus::desktop::{Config, WindowBuilder}; +use dioxus::html::{geometry::WheelDelta, input_data::keyboard_types::Key}; +use dioxus::prelude::*; use doc::try_load_shared_doc_from_path; use futures::{channel::mpsc, executor::block_on, SinkExt, StreamExt}; use tracing::{debug, error}; @@ -24,31 +25,6 @@ mod doc; pub mod errors; mod measure; -fn load_pages( - doc: SharedDoc, - max_page: usize, - mut page_loaded_sender: UnboundedSender<()>, - done: F, -) where - F: 'static + Send + FnOnce(), -{ - thread::spawn(move || { - for page in 1..=max_page { - let mut doc = doc.lock().unwrap(); - if let Err(err) = doc.load_page(page) { - error!("page load failed: {err}"); - } - drop(doc); - // Gives some breath to the UI - std::thread::sleep(std::time::Duration::from_millis(1000 / 60)); - if let Err(err) = block_on(page_loaded_sender.send(())) { - error!("page loaded channel error: {err}"); - } - } - done(); - }); -} - #[derive(Debug)] pub struct ViewOptions { /// The path to the e-book file to view @@ -86,168 +62,161 @@ pub fn view(opts: ViewOptions) -> Result<()> { drop(measure); }); - dioxus_desktop::launch_with_props( - App, - AppProps { - doc, - max_page, - page_loaded_receiver: Cell::new(Some(page_loaded_receiver)), - }, - Config::default() - .with_custom_head( - r#" - - - "# - .to_string(), - ) - .with_window(WindowBuilder::default().with_title(format!("Eco Viewer - {path}"))), - ); + LaunchBuilder::desktop() + .with_cfg(desktop!({ + Config::new() + .with_custom_head( + r#" + + + "# + .to_string(), + ) + .with_window(WindowBuilder::default().with_title(format!("Eco Viewer - {path}"))) + })) + .with_context(doc) + .with_context(MaxPage(max_page)) + .with_context(PageLoadedReceiver(Arc::new(Mutex::new(Some( + page_loaded_receiver, + ))))) + .with_context(file_type) + .launch(app); Ok(()) } -pub struct AppProps { +#[derive(Clone)] +struct PageLoadedReceiver(Arc>>>); + +#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)] +struct MaxPage(usize); + +fn load_pages( doc: SharedDoc, max_page: usize, - // Wrapped in an `Option` so it can be moved out from the struct - page_loaded_receiver: Cell>>, + mut page_loaded_sender: UnboundedSender<()>, + done: F, +) where + F: Send + FnOnce() + 'static, +{ + thread::spawn(move || { + for page in 1..=max_page { + let mut doc = doc.lock().unwrap(); + if let Err(err) = doc.load_page(page) { + error!("page load failed: {err}"); + } + drop(doc); + // Gives some breath to the UI + sleep(Duration::from_millis(1)); + if let Err(err) = block_on(page_loaded_sender.send(())) { + error!("page loaded channel error: {err}"); + } + } + done(); + }); } -#[allow(clippy::too_many_lines)] -fn App(cx: Scope) -> Element { - let page_loaded_receiver = cx.props.page_loaded_receiver.replace(None); - // Forces reactivity on page loaded - let nb_loaded_pages = use_state(cx, || 0); - let current_page = use_state(cx, || 1_usize); - #[allow(clippy::cast_precision_loss)] - let progress = use_memo(cx, (nb_loaded_pages,), |(nb_loaded_pages,)| { - 1.0 / (cx.props.max_page as f32) * (*nb_loaded_pages.get() as f32) * 100.0 +fn app() -> Element { + let doc = use_context::(); + let MaxPage(max_page) = use_context::(); + let PageLoadedReceiver(page_loaded_receiver) = use_context::(); + + let mut nb_loaded_pages = use_signal(|| 0); + let mut current_page = use_signal(|| 1_usize); + + let current_content = use_memo({ + let doc = doc.clone(); + move || { + let doc = doc.lock().unwrap(); + doc.content_for_page(current_page()) + } }); - let current_content = use_memo( - cx, - (current_page, nb_loaded_pages), - |(current_page, _nb_loaded_pages)| { - let doc = cx.props.doc.lock().unwrap(); - doc.content_for_page(*current_page.get()) - }, - ); - - use_future!(cx, || { - to_owned![nb_loaded_pages]; - async move { - let mut page_loaded_receiver = - page_loaded_receiver.expect("page loaded receiver to be accessed once"); + + spawn(async move { + let mut page_loaded_receiver = page_loaded_receiver.lock().unwrap().take(); + if let Some(page_loaded_receiver) = page_loaded_receiver.as_mut() { while page_loaded_receiver.next().await.is_some() { - nb_loaded_pages.modify(|nb_loaded_pages| *nb_loaded_pages + 1); + nb_loaded_pages += 1; } } }); - cx.render(rsx! { + let mut go_to_prev_page = move || { + if current_page() == 1 { + return; + } + current_page -= 1; + debug!("reading index {current_page}"); + }; + + let mut go_to_next_page = move || { + if current_page() == nb_loaded_pages() { + return; + } + current_page += 1; + debug!("reading index {current_page}"); + }; + + let handle_wheel_events = move |evt: Event| { + let delta = match evt.delta() { + WheelDelta::Pixels(px) => px.y, + WheelDelta::Lines(lines) => lines.y, + WheelDelta::Pages(pages) => pages.y, + }; + if delta < 0.0 { + go_to_prev_page(); + } else { + go_to_next_page(); + } + }; + + let handle_keyup_events = move |evt: Event| match evt.key() { + Key::ArrowLeft | Key::ArrowUp => go_to_prev_page(), + Key::ArrowRight | Key::ArrowDown => go_to_next_page(), + _ => {} + }; + + rsx! { div { class: "w-full h-screen flex flex-col gap-1 items-center outline-none", autofocus: true, tabindex: -1, - onwheel: move |evt| { - let delta = match evt.delta() { - WheelDelta::Pixels(px) => px.y, - WheelDelta::Lines(lines) => lines.y, - WheelDelta::Pages(pages) => pages.y, - }; - if delta < 0.0 { - let page = *current_page.get(); - if page == 1 { - return; - } - - current_page.set(page - 1); - debug!("reading index {}", page - 2); - } else { - let page = *current_page.get(); - if page == *nb_loaded_pages.get() { - return; - } - - current_page.set(page + 1); - debug!("reading index {}", page); - } - }, - onkeyup: move |evt| { - match evt.key() { - Key::ArrowLeft | Key::ArrowUp => { - let page = *current_page.get(); - if page == 1 { - return; - } - - current_page.set(page - 1); - debug!("reading index {}", page - 2); - }, - Key::ArrowRight | Key::ArrowDown => { - let page = *current_page.get(); - if page == *nb_loaded_pages.get() { - return; - } - - current_page.set(page + 1); - debug!("reading index {}", page); - }, - _ => {} - } - }, - div { - class: "relative h-2 w-full shrink-0 px-2 mt-1", - if *nb_loaded_pages.get() < cx.props.max_page { - rsx!(progress { - class: "progress progress-flat-primary absolute h-2 w-[calc(100%-1rem)]", - value: "{progress}", - max: "100" - }) + onwheel: handle_wheel_events, + onkeyup: handle_keyup_events, + div { class: "relative h-2 w-full shrink-0 px-2 mt-1", + if nb_loaded_pages() < max_page { + Progress { max_page, nb_loaded_pages } } } - div { - class: "flex flex-col h-full w-full items-center justify-center", - if let Some(current_content) = current_content { - rsx!(DocPage { doc: cx.props.doc.clone(), content: current_content }) + div { class: "flex flex-col h-full w-full items-center justify-center", + if let Some(content) = current_content() { + DocPage { content } } } - div { - class: "flex flex-row items-center justify-center gap-1 h-8 mb-2", - button { - class: "btn btn-outline-primary btn-sm", - onclick: move |_evt| { - let page = *current_page.get(); - if page == 1 { - return; - } - - current_page.set(page - 1); - debug!("reading index {}", page - 2); - }, - "Prev" - }, - span { - class: "flex flex-row items-center justify-center bg-backgroundSecondary h-8 px-2 rounded-sm", - "{current_page} / {nb_loaded_pages}" - }, - button { - class: "btn btn-outline-primary btn-sm", - onclick: move |_evt| { - let page = *current_page.get(); - if page == *nb_loaded_pages.get() { - return; - } - - current_page.set(page + 1); - debug!("reading index {}", page); - }, - "Next" - }, + Commands { + max_page, + nb_loaded_pages, + current_page, + on_prev_page_request: move |()| go_to_prev_page(), + on_next_page_request: move |()| go_to_next_page() } } - }) + } +} + +#[component] +fn Progress(max_page: usize, nb_loaded_pages: ReadOnlySignal) -> Element { + #[allow(clippy::cast_precision_loss)] + let progress = use_memo(move || 1.0 / (max_page as f32) * (nb_loaded_pages() as f32) * 100.0); + + rsx! { + progress { + class: "progress progress-flat-primary absolute h-2 w-[calc(100%-1rem)]", + value: "{progress}", + max: "100" + } + } } diff --git a/eco/src/types.rs b/eco/src/types.rs index a23d43f..6c605f0 100644 --- a/eco/src/types.rs +++ b/eco/src/types.rs @@ -60,7 +60,7 @@ impl From for eco_view::FileType { fn from(value: FileType) -> Self { match value { FileType::Cbz => Self::Cbz, - FileType::EPub => Self::EPub, + FileType::EPub => Self::Epub, } } }