From 9345aba3d62519d37817ec37de2d1d676306af0f Mon Sep 17 00:00:00 2001 From: Orual Date: Sat, 1 Nov 2025 16:50:32 -0400 Subject: [PATCH] working on render server --- Cargo.lock | 2428 +++++++++-------- Cargo.toml | 5 +- .../lexicons/sh_weaver_notebook_chapter.json | 11 +- .../lexicons/sh_weaver_notebook_defs.json | 24 +- .../lexicons/sh_weaver_notebook_page.json | 46 + crates/weaver-api/src/sh_weaver/notebook.rs | 278 +- .../src/sh_weaver/notebook/chapter.rs | 82 +- .../weaver-api/src/sh_weaver/notebook/page.rs | 444 +++ crates/weaver-appview/Cargo.toml | 1 - crates/weaver-cli/Cargo.toml | 3 +- crates/weaver-common/Cargo.toml | 17 +- crates/weaver-common/src/error.rs | 2 - crates/weaver-common/src/lib.rs | 7 +- crates/weaver-common/src/view.rs | 284 ++ crates/weaver-renderer/Cargo.toml | 6 +- crates/weaver-renderer/src/css.rs | 55 +- crates/weaver-renderer/src/lib.rs | 2 + crates/weaver-renderer/src/theme.rs | 4 + crates/weaver-server/Cargo.toml | 15 +- .../assets/dx-components-theme.css | 83 + crates/weaver-server/clippy.toml | 8 - .../src/components/avatar/component.rs | 81 + .../src/components/avatar/mod.rs | 2 + .../src/components/avatar/style.css | 92 + .../weaver-server/src/components/cssblob.rs | 2 + crates/weaver-server/src/components/echo.rs | 61 - crates/weaver-server/src/components/entry.rs | 65 + crates/weaver-server/src/components/hero.rs | 25 - .../weaver-server/src/components/identity.rs | 41 + crates/weaver-server/src/components/mod.rs | 11 +- crates/weaver-server/src/fetch.rs | 140 + crates/weaver-server/src/main.rs | 69 +- crates/weaver-server/src/views/blog.rs | 39 - crates/weaver-server/src/views/home.rs | 17 +- crates/weaver-server/src/views/mod.rs | 9 +- crates/weaver-server/src/views/navbar.rs | 5 +- crates/weaver-server/src/views/notebook.rs | 30 + .../weaver-server/src/views/notebookpage.rs | 25 + crates/weaver-workspace-hack/.gitattributes | 4 - crates/weaver-workspace-hack/Cargo.toml | 110 - crates/weaver-workspace-hack/build.rs | 2 - crates/weaver-workspace-hack/src/lib.rs | 1 - flake.lock | 140 +- flake.nix | 50 +- lexicons/notebook/defs.json | 16 +- lexicons/notebook/page.json | 2 +- 46 files changed, 3159 insertions(+), 1685 deletions(-) create mode 100644 crates/weaver-api/lexicons/sh_weaver_notebook_page.json create mode 100644 crates/weaver-api/src/sh_weaver/notebook/page.rs create mode 100644 crates/weaver-common/src/view.rs create mode 100644 crates/weaver-server/assets/dx-components-theme.css delete mode 100644 crates/weaver-server/clippy.toml create mode 100644 crates/weaver-server/src/components/avatar/component.rs create mode 100644 crates/weaver-server/src/components/avatar/mod.rs create mode 100644 crates/weaver-server/src/components/avatar/style.css create mode 100644 crates/weaver-server/src/components/cssblob.rs delete mode 100644 crates/weaver-server/src/components/echo.rs create mode 100644 crates/weaver-server/src/components/entry.rs delete mode 100644 crates/weaver-server/src/components/hero.rs create mode 100644 crates/weaver-server/src/components/identity.rs create mode 100644 crates/weaver-server/src/fetch.rs delete mode 100644 crates/weaver-server/src/views/blog.rs create mode 100644 crates/weaver-server/src/views/notebook.rs create mode 100644 crates/weaver-server/src/views/notebookpage.rs delete mode 100644 crates/weaver-workspace-hack/.gitattributes delete mode 100644 crates/weaver-workspace-hack/Cargo.toml delete mode 100644 crates/weaver-workspace-hack/build.rs delete mode 100644 crates/weaver-workspace-hack/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index e89e628..5175161 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9,7 +9,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "087113bd50d9adce24850eed5d0476c7d199d532fce8fab5173650331e09033a" dependencies = [ "abnf-core", - "nom 7.1.3", + "nom", ] [[package]] @@ -18,7 +18,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c44e09c43ae1c368fb91a03a566472d0087c26cf7e1b9e8e289c14ede681dd7d" dependencies = [ - "nom 7.1.3", + "nom", ] [[package]] @@ -48,7 +48,7 @@ version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" dependencies = [ - "memchr 2.7.6", + "memchr", ] [[package]] @@ -87,15 +87,6 @@ dependencies = [ "libc", ] -[[package]] -name = "ansi_term" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" -dependencies = [ - "winapi", -] - [[package]] name = "anstream" version = "0.6.21" @@ -146,6 +137,12 @@ dependencies = [ "windows-sys 0.60.2", ] +[[package]] +name = "anyhow" +version = "1.0.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" + [[package]] name = "arraydeque" version = "0.5.1" @@ -160,21 +157,31 @@ checksum = "d92bec98840b8f03a5ff5413de5293bfcd8bf96467cf5452609f939ec6f5de16" [[package]] name = "ashpd" -version = "0.8.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd884d7c72877a94102c3715f3b1cd09ff4fac28221add3e57cfbe25c236d093" +checksum = "6cbdf310d77fd3aaee6ea2093db7011dc2d35d2eb3481e5607f1f8d942ed99df" dependencies = [ "enumflags2", "futures-channel", "futures-util", - "rand 0.8.5", + "rand 0.9.2", + "raw-window-handle 0.6.2", "serde", "serde_repr", "tokio", "url", + "wayland-backend", + "wayland-client", + "wayland-protocols", "zbus", ] +[[package]] +name = "askama_escape" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3df27b8d5ddb458c5fb1bbc1ce172d4a38c614a97d550b0ac89003897fb01de4" + [[package]] name = "async-broadcast" version = "0.7.2" @@ -187,18 +194,6 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "async-channel" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "924ed96dd52d1b75e9c1a3e6275715fd320f5f9439fb5a4a11fa51f4221158d2" -dependencies = [ - "concurrent-queue", - "event-listener-strategy", - "futures-core", - "pin-project-lite", -] - [[package]] name = "async-compression" version = "0.4.32" @@ -212,24 +207,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "async-io" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "456b8a8feb6f42d237746d4b3e9a178494627745c3c56c6ea55d92ba50d026fc" -dependencies = [ - "autocfg", - "cfg-if 1.0.4", - "concurrent-queue", - "futures-io", - "futures-lite", - "parking", - "polling", - "rustix", - "slab", - "windows-sys 0.61.2", -] - [[package]] name = "async-lock" version = "3.4.1" @@ -241,24 +218,6 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "async-process" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc50921ec0055cdd8a16de48773bfeec5c972598674347252c0399676be7da75" -dependencies = [ - "async-channel", - "async-io", - "async-lock", - "async-signal", - "async-task", - "blocking", - "cfg-if 1.0.4", - "event-listener", - "futures-lite", - "rustix", -] - [[package]] name = "async-recursion" version = "1.1.1" @@ -271,28 +230,26 @@ dependencies = [ ] [[package]] -name = "async-signal" -version = "0.2.13" +name = "async-stream" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43c070bbf59cd3570b6b2dd54cd772527c7c3620fce8be898406dd3ed6adc64c" +checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" dependencies = [ - "async-io", - "async-lock", - "atomic-waker", - "cfg-if 1.0.4", + "async-stream-impl", "futures-core", - "futures-io", - "rustix", - "signal-hook-registry", - "slab", - "windows-sys 0.61.2", + "pin-project-lite", ] [[package]] -name = "async-task" -version = "4.7.1" +name = "async-stream-impl" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" +checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.108", +] [[package]] name = "async-trait" @@ -305,6 +262,22 @@ dependencies = [ "syn 2.0.108", ] +[[package]] +name = "async-tungstenite" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee88b4c88ac8c9ea446ad43498955750a4bbe64c4392f21ccfe5d952865e318f" +dependencies = [ + "atomic-waker", + "futures-core", + "futures-io", + "futures-task", + "futures-util", + "log", + "pin-project-lite", + "tungstenite 0.27.0", +] + [[package]] name = "atk" version = "0.18.2" @@ -334,17 +307,6 @@ version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", -] - [[package]] name = "autocfg" version = "1.5.0" @@ -358,6 +320,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a18ed336352031311f4e0b4dd2ff392d4fbb370777c9d18d7fc9d7359f73871" dependencies = [ "axum-core", + "axum-macros", + "base64 0.22.1", "bytes", "form_urlencoded", "futures-util", @@ -366,18 +330,21 @@ dependencies = [ "http-body-util", "hyper", "hyper-util", - "itoa 1.0.15", + "itoa", "matchit", - "memchr 2.7.6", + "memchr", "mime", + "multer", "percent-encoding", "pin-project-lite", "serde_core", "serde_json", "serde_path_to_error", "serde_urlencoded", + "sha1", "sync_wrapper", "tokio", + "tokio-tungstenite 0.28.0", "tower", "tower-layer", "tower-service", @@ -403,6 +370,40 @@ dependencies = [ "tracing", ] +[[package]] +name = "axum-extra" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9963ff19f40c6102c76756ef0a46004c0d58957d87259fc9208ff8441c12ab96" +dependencies = [ + "axum", + "axum-core", + "bytes", + "futures-util", + "headers", + "http", + "http-body", + "http-body-util", + "mime", + "pin-project-lite", + "rustversion", + "serde_core", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "axum-macros" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "604fde5e028fea851ce1d8570bbdc034bec850d157f7569d10f347d06808c05c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.108", +] + [[package]] name = "backtrace" version = "0.3.76" @@ -410,7 +411,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb531853791a215d7c62a30daf0dde835f381ab5de4589cfe7c649d2cbe92bd6" dependencies = [ "addr2line", - "cfg-if 1.0.4", + "cfg-if", "libc", "miniz_oxide", "object", @@ -433,6 +434,12 @@ version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" +[[package]] +name = "base16" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d27c3610c36aee21ce8ac510e6224498de4228ad772a171ed65643a24693a5a8" + [[package]] name = "base16ct" version = "0.2.0" @@ -445,7 +452,7 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5e9430d9a245a77c92176e649af6e275f20839a48389859d1661e9a128d077c" dependencies = [ - "const-str", + "const-str 0.4.3", "match-lookup", ] @@ -521,35 +528,13 @@ dependencies = [ "generic-array", ] -[[package]] -name = "block2" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f" -dependencies = [ - "objc2 0.5.2", -] - [[package]] name = "block2" version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cdeb9d870516001442e364c5220d3574d2da8dc765554b4a617230d33fa58ef5" dependencies = [ - "objc2 0.6.3", -] - -[[package]] -name = "blocking" -version = "1.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e83f8d02be6967315521be875afa792a316e28d57b5a2d401897e2a7921b7f21" -dependencies = [ - "async-channel", - "async-task", - "futures-io", - "futures-lite", - "piper", + "objc2", ] [[package]] @@ -619,7 +604,7 @@ version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "63044e1ae8e69f3b5a92c736ca6269b8d12fa7efe39bf34ddb06d102cf0e2cab" dependencies = [ - "memchr 2.7.6", + "memchr", "serde", ] @@ -653,7 +638,7 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b953a6887648bb07a535631f2bc00fbdb2a2216f135552cb3f534ed136b9c07f" dependencies = [ - "memchr 2.7.6", + "memchr", "safemem", ] @@ -663,6 +648,12 @@ version = "3.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" +[[package]] +name = "bytecount" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175812e0be2bccb6abe50bb8d566126198344f707e304f45c648fd8f2cc0365e" + [[package]] name = "byteorder" version = "1.5.0" @@ -703,6 +694,37 @@ dependencies = [ "system-deps", ] +[[package]] +name = "camino" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "276a59bf2b2c967788139340c9f0c5b12d7fd6630315c15c217e559de85d2609" +dependencies = [ + "serde_core", +] + +[[package]] +name = "cargo-platform" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e35af189006b9c0f00a064685c727031e3ed2d8020f7ba284d78cc2671bd36ea" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4acbb09d9ee8e23699b9634375c72795d095bf268439da88562cf9b501f181fa" +dependencies = [ + "camino", + "cargo-platform", + "semver", + "serde", + "serde_json", +] + [[package]] name = "cbor4ii" version = "0.2.14" @@ -760,12 +782,6 @@ dependencies = [ "target-lexicon", ] -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.4" @@ -778,6 +794,16 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" +[[package]] +name = "charset" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1f927b07c74ba84c7e5fe4db2baeb3e996ab2688992e39ac68ce3220a677c7e" +dependencies = [ + "base64 0.22.1", + "encoding_rs", +] + [[package]] name = "chrono" version = "0.4.42" @@ -822,7 +848,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9" dependencies = [ "ciborium-io", - "half 2.7.1", + "half", ] [[package]] @@ -839,21 +865,6 @@ dependencies = [ "unsigned-varint", ] -[[package]] -name = "clap" -version = "2.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" -dependencies = [ - "ansi_term", - "atty", - "bitflags 1.3.2", - "strsim 0.8.0", - "textwrap 0.11.0", - "unicode-width 0.1.14", - "vec_map", -] - [[package]] name = "clap" version = "4.5.51" @@ -873,7 +884,7 @@ dependencies = [ "anstream", "anstyle", "clap_lex", - "strsim 0.11.1", + "strsim", "unicase", "unicode-width 0.2.2", ] @@ -896,31 +907,6 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d" -[[package]] -name = "cloudabi" -version = "0.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "cocoa" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6140449f97a6e97f9511815c5632d84c8aacf8ac271ad77c559218161a1373c" -dependencies = [ - "bitflags 1.3.2", - "block", - "cocoa-foundation 0.1.2", - "core-foundation 0.9.4", - "core-graphics 0.23.2", - "foreign-types 0.5.0", - "libc", - "objc", -] - [[package]] name = "cocoa" version = "0.26.1" @@ -929,28 +915,14 @@ checksum = "ad36507aeb7e16159dfe68db81ccc27571c3ccd4b76fb2fb72fc59e7a4b1b64c" dependencies = [ "bitflags 2.10.0", "block", - "cocoa-foundation 0.2.1", + "cocoa-foundation", "core-foundation 0.10.1", - "core-graphics 0.24.0", + "core-graphics", "foreign-types 0.5.0", "libc", "objc", ] -[[package]] -name = "cocoa-foundation" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c6234cbb2e4c785b456c0644748b1ac416dd045799740356f8363dfe00c93f7" -dependencies = [ - "bitflags 1.3.2", - "block", - "core-foundation 0.9.4", - "core-graphics-types 0.1.3", - "libc", - "objc", -] - [[package]] name = "cocoa-foundation" version = "0.2.1" @@ -960,7 +932,7 @@ dependencies = [ "bitflags 2.10.0", "block", "core-foundation 0.10.1", - "core-graphics-types 0.2.0", + "core-graphics-types", "objc", ] @@ -977,7 +949,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" dependencies = [ "bytes", - "memchr 2.7.6", + "memchr", ] [[package]] @@ -998,7 +970,7 @@ checksum = "ef8a506ec4b81c460798f572caead636d57d3d7e940f998160f52bd254bf2d23" dependencies = [ "compression-core", "flate2", - "memchr 2.7.6", + "memchr", ] [[package]] @@ -1028,16 +1000,6 @@ dependencies = [ "windows-sys 0.59.0", ] -[[package]] -name = "console_error_panic_hook" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" -dependencies = [ - "cfg-if 1.0.4", - "wasm-bindgen", -] - [[package]] name = "const-oid" version = "0.9.6" @@ -1046,9 +1008,9 @@ checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" [[package]] name = "const-serialize" -version = "0.6.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08259976d62c715c4826cb4a3d64a3a9e5c5f68f964ff6087319857f569f93a6" +checksum = "4b4acbf274e71b0a53ff15f8669b86df421586a9fcac6398bc374c0b7146b6a3" dependencies = [ "const-serialize-macro", "serde", @@ -1056,9 +1018,9 @@ dependencies = [ [[package]] name = "const-serialize-macro" -version = "0.6.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04382d0d9df7434af6b1b49ea1a026ef39df1b0738b1cc373368cf175354f6eb" +checksum = "b2d3f3be18d39289c06c906cb7fb7ea1f027607ac5fa0cb0c4f1e91719042c52" dependencies = [ "proc-macro2", "quote", @@ -1071,6 +1033,12 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2f421161cb492475f1661ddc9815a745a1c894592070661180fdec3d4872e9c3" +[[package]] +name = "const-str" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4d34b8f066904ed7cfa4a6f9ee96c3214aa998cb44b69ca20bd2054f47402ed" + [[package]] name = "const_format" version = "0.2.35" @@ -1091,6 +1059,15 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "content_disposition" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc14a88e1463ddd193906285abe5c360c7e8564e05ccc5d501755f7fbc9ca9c" +dependencies = [ + "charset", +] + [[package]] name = "convert_case" version = "0.4.0" @@ -1099,9 +1076,9 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" [[package]] name = "convert_case" -version = "0.6.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" +checksum = "baaaa0ecca5b51987b9423ccdc971514dd8b0bb7b4060b983d3664dad3f1f89f" dependencies = [ "unicode-segmentation", ] @@ -1117,6 +1094,24 @@ dependencies = [ "version_check", ] +[[package]] +name = "cookie_store" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2eac901828f88a5241ee0600950ab981148a18f2f756900ffba1b125ca6a3ef9" +dependencies = [ + "cookie", + "document-features", + "idna", + "log", + "publicsuffix", + "serde", + "serde_derive", + "serde_json", + "time", + "url", +] + [[package]] name = "cordyceps" version = "0.3.4" @@ -1153,19 +1148,6 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" -[[package]] -name = "core-graphics" -version = "0.23.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c07782be35f9e1140080c6b96f0d44b739e2278479f64e02fdab4e32dfd8b081" -dependencies = [ - "bitflags 1.3.2", - "core-foundation 0.9.4", - "core-graphics-types 0.1.3", - "foreign-types 0.5.0", - "libc", -] - [[package]] name = "core-graphics" version = "0.24.0" @@ -1174,22 +1156,11 @@ checksum = "fa95a34622365fa5bbf40b20b75dba8dfa8c94c734aea8ac9a5ca38af14316f1" dependencies = [ "bitflags 2.10.0", "core-foundation 0.10.1", - "core-graphics-types 0.2.0", + "core-graphics-types", "foreign-types 0.5.0", "libc", ] -[[package]] -name = "core-graphics-types" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf" -dependencies = [ - "bitflags 1.3.2", - "core-foundation 0.9.4", - "libc", -] - [[package]] name = "core-graphics-types" version = "0.2.0" @@ -1207,7 +1178,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b49ba7ef1ad6107f8824dbe97de947cbaac53c44e7f9756a1fba0d37c1eec505" dependencies = [ - "memchr 2.7.6", + "memchr", ] [[package]] @@ -1225,7 +1196,7 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" dependencies = [ - "cfg-if 1.0.4", + "cfg-if", ] [[package]] @@ -1292,15 +1263,15 @@ dependencies = [ [[package]] name = "cssparser" -version = "0.27.2" +version = "0.29.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "754b69d351cdc2d8ee09ae203db831e005560fc6030da058f86ad60c92a9cb0a" +checksum = "f93d03419cb5950ccfd3daf3ff1c7a36ace64609a1a8746d493df1ca0afde0fa" dependencies = [ "cssparser-macros", "dtoa-short", - "itoa 0.4.8", + "itoa", "matches", - "phf 0.8.0", + "phf 0.10.1", "proc-macro2", "quote", "smallvec", @@ -1323,7 +1294,7 @@ version = "4.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" dependencies = [ - "cfg-if 1.0.4", + "cfg-if", "cpufeatures", "curve25519-dalek-derive", "digest", @@ -1374,7 +1345,7 @@ dependencies = [ "ident_case", "proc-macro2", "quote", - "strsim 0.11.1", + "strsim", "syn 2.0.108", ] @@ -1388,7 +1359,7 @@ dependencies = [ "ident_case", "proc-macro2", "quote", - "strsim 0.11.1", + "strsim", "syn 2.0.108", ] @@ -1420,11 +1391,11 @@ version = "5.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ - "cfg-if 1.0.4", + "cfg-if", "hashbrown 0.14.5", - "lock_api 0.4.14", + "lock_api", "once_cell", - "parking_lot_core 0.9.12", + "parking_lot_core", ] [[package]] @@ -1433,12 +1404,12 @@ version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" dependencies = [ - "cfg-if 1.0.4", + "cfg-if", "crossbeam-utils", "hashbrown 0.14.5", - "lock_api 0.4.14", + "lock_api", "once_cell", - "parking_lot_core 0.9.12", + "parking_lot_core", ] [[package]] @@ -1535,7 +1506,16 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05" dependencies = [ - "derive_more-impl", + "derive_more-impl 1.0.0", +] + +[[package]] +name = "derive_more" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "093242cf7570c207c83073cf82f79706fe7b8317e98620a47d5be7c3d8497678" +dependencies = [ + "derive_more-impl 2.0.1", ] [[package]] @@ -1550,6 +1530,18 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "derive_more-impl" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda628edc44c4bb645fbe0f758797143e4e07926f7ebf4e9bdfbd3d2ce621df3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.108", + "unicode-xid", +] + [[package]] name = "diatomic-waker" version = "0.2.3" @@ -1566,7 +1558,7 @@ dependencies = [ "byteorder", "chrono", "diesel_derives", - "itoa 1.0.15", + "itoa", "libsqlite3-sys", "pq-sys", "serde_json", @@ -1635,78 +1627,114 @@ dependencies = [ [[package]] name = "dioxus" -version = "0.6.3" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a247114500f1a78e87022defa8173de847accfada8e8809dfae23a118a580c" +checksum = "9361dcb0cacb57f8af31010e1a3503404415ce5ff33dd83c760dfdcf505aded9" dependencies = [ + "dioxus-asset-resolver", "dioxus-cli-config", "dioxus-config-macro", + "dioxus-config-macros", "dioxus-core", "dioxus-core-macro", "dioxus-desktop", "dioxus-devtools", "dioxus-document", "dioxus-fullstack", + "dioxus-fullstack-macro", "dioxus-history", "dioxus-hooks", "dioxus-html", + "dioxus-liveview", "dioxus-logger", - "dioxus-mobile", "dioxus-router", + "dioxus-server", "dioxus-signals", + "dioxus-ssr", + "dioxus-stores", "dioxus-web", "manganis", "serde", + "subsecond", "warnings", ] +[[package]] +name = "dioxus-asset-resolver" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "954badc855b8e61d8880d204c7e3e2570daa59302c3843b2de1fae30ec266e64" +dependencies = [ + "dioxus-cli-config", + "http", + "infer", + "jni", + "js-sys", + "ndk", + "ndk-context", + "ndk-sys", + "percent-encoding", + "thiserror 2.0.17", + "tokio", + "wasm-bindgen-futures", + "web-sys", +] + [[package]] name = "dioxus-cli-config" -version = "0.6.3" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdd16948f1ffdb068dd9a64812158073a4250e2af4e98ea31fdac0312e6bce86" +checksum = "d28a6973d779e73f4b8ce705b1ea4c96f4083567ede862e734da2ab7c1dfc4b6" dependencies = [ "wasm-bindgen", ] [[package]] name = "dioxus-config-macro" -version = "0.6.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75cbf582fbb1c32d34a1042ea675469065574109c95154468710a4d73ee98b49" +checksum = "b9b5a9360dbf7a8499f67a96b8408f0c4d45222b0f19d7e42a7c49030b1a4085" dependencies = [ "proc-macro2", "quote", ] +[[package]] +name = "dioxus-config-macros" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "060c2e384709a434a74d24a676f4ccd61e7a97f812b0807fa71a8ef8896cfd3b" + [[package]] name = "dioxus-core" -version = "0.6.3" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c03f451a119e47433c16e2d8eb5b15bf7d6e6734eb1a4c47574e6711dadff8d" +checksum = "743e05cc98a6c7189e7df49791c0affb860cb858ba2a19dde4ecadf2a8729e8c" dependencies = [ + "anyhow", "const_format", "dioxus-core-types", "futures-channel", "futures-util", "generational-box", "longest-increasing-subsequence", - "rustc-hash 1.1.0", + "rustc-hash 2.1.1", "rustversion", "serde", "slab", "slotmap", + "subsecond", "tracing", "warnings", ] [[package]] name = "dioxus-core-macro" -version = "0.6.3" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "105c954caaaedf8cd10f3d1ba576b01e18aa8d33ad435182125eefe488cf0064" +checksum = "fa557c3d165eb2df73414f4678912e4595de80d6cd13566a3377f16c438c5ec3" dependencies = [ - "convert_case 0.6.0", + "convert_case 0.8.0", "dioxus-rsx", "proc-macro2", "quote", @@ -1715,23 +1743,22 @@ dependencies = [ [[package]] name = "dioxus-core-types" -version = "0.6.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91a82fccfa48574eb7aa183e297769540904694844598433a9eb55896ad9f93b" -dependencies = [ - "once_cell", -] +checksum = "6d16343cebee52e82686963ccd6f5590ebca567229bfa59aa3d598210f3a9fc0" [[package]] name = "dioxus-desktop" -version = "0.6.3" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b0cca3e7a10a4a3df37ea52c4cc7a53e5c9233489e03ee3f2829471fc3099a" +checksum = "4dfcfa2ae65f643a05583acb27e5a52b22de52b2f49583d012c8e58b6c495941" dependencies = [ "async-trait", "base64 0.22.1", - "cocoa 0.25.0", - "core-foundation 0.9.4", + "bytes", + "cocoa", + "core-foundation 0.10.1", + "dioxus-asset-resolver", "dioxus-cli-config", "dioxus-core", "dioxus-devtools", @@ -1748,61 +1775,70 @@ dependencies = [ "global-hotkey", "infer", "jni", - "lazy-js-bundle", - "muda 0.11.5", + "lazy-js-bundle 0.7.0", + "libc", + "muda", "ndk", "ndk-context", "ndk-sys", "objc", "objc_id", - "once_cell", + "percent-encoding", + "rand 0.9.2", "rfd", - "rustc-hash 1.1.0", + "rustc-hash 2.1.1", "serde", "serde_json", "signal-hook", "slab", + "subtle", "tao", - "thiserror 1.0.69", + "thiserror 2.0.17", "tokio", "tracing", "tray-icon", - "urlencoding", - "webbrowser", + "tungstenite 0.27.0", + "webbrowser 1.0.6", "wry", ] [[package]] name = "dioxus-devtools" -version = "0.6.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712a7300f1e8181218187b03502044157eef04e0a25b518117c5ef9ae1096880" +checksum = "419353dace2fb67ac7b35070a56c00a66c920c0191e7a81cf9c9ac8dd7ab3798" dependencies = [ + "dioxus-cli-config", "dioxus-core", "dioxus-devtools-types", "dioxus-signals", + "futures-channel", + "futures-util", "serde", "serde_json", + "subsecond", + "thiserror 2.0.17", "tracing", - "tungstenite 0.23.0", + "tungstenite 0.27.0", "warnings", ] [[package]] name = "dioxus-devtools-types" -version = "0.6.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f62434973c0c9c5a3bc42e9cd5e7070401c2062a437fb5528f318c3e42ebf4ff" +checksum = "e6eb8755823ca644da88a50e80676330f4f0c1a40650af03d2fd617d3478a8e7" dependencies = [ "dioxus-core", "serde", + "subsecond-types", ] [[package]] name = "dioxus-document" -version = "0.6.3" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "802a2014d1662b6615eec0a275745822ee4fc66aacd9d0f2fb33d6c8da79b8f2" +checksum = "94cc73e120c260a07689353b09b8fdb0c49960fb88ba8e669992245c80720bb6" dependencies = [ "dioxus-core", "dioxus-core-macro", @@ -1811,7 +1847,7 @@ dependencies = [ "futures-channel", "futures-util", "generational-box", - "lazy-js-bundle", + "lazy-js-bundle 0.7.0", "serde", "serde_json", "tracing", @@ -1819,35 +1855,116 @@ dependencies = [ [[package]] name = "dioxus-fullstack" -version = "0.6.3" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe99b48a1348eec385b5c4bd3e80fd863b0d3b47257d34e2ddc58754dec5d128" +checksum = "f55dfce343a754869dfde344e41c79a3ec4737867f90501dcfe8850eceeb37ea" dependencies = [ + "anyhow", + "async-stream", + "async-tungstenite", + "axum", + "axum-core", + "axum-extra", "base64 0.22.1", "bytes", "ciborium", - "dioxus-desktop", - "dioxus-devtools", + "const-str 0.7.0", + "const_format", + "content_disposition", + "derive_more 2.0.1", + "dioxus-asset-resolver", + "dioxus-cli-config", + "dioxus-core", + "dioxus-fullstack-core", + "dioxus-fullstack-macro", + "dioxus-hooks", + "dioxus-html", + "dioxus-signals", + "form_urlencoded", + "futures", + "futures-channel", + "futures-util", + "gloo-net", + "headers", + "http", + "http-body", + "http-body-util", + "inventory", + "js-sys", + "mime", + "pin-project", + "reqwest", + "rustversion", + "send_wrapper", + "serde", + "serde_json", + "serde_qs", + "serde_urlencoded", + "thiserror 2.0.17", + "tokio", + "tokio-stream", + "tokio-tungstenite 0.27.0", + "tokio-util", + "tower", + "tower-http", + "tower-layer", + "tracing", + "tungstenite 0.27.0", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams", + "web-sys", + "xxhash-rust", +] + +[[package]] +name = "dioxus-fullstack-core" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f486f2b8864d1a0843189acbec74af6d9d206e82694ded6e5923a6c6f774b15" +dependencies = [ + "anyhow", + "axum-core", + "base64 0.22.1", + "ciborium", + "dioxus-core", + "dioxus-document", "dioxus-history", - "dioxus-lib", - "dioxus-mobile", - "dioxus-web", - "dioxus_server_macro", + "dioxus-hooks", + "dioxus-signals", "futures-channel", "futures-util", "generational-box", - "once_cell", + "http", + "inventory", + "parking_lot", "serde", - "server_fn", + "serde_json", + "thiserror 2.0.17", + "tokio", "tracing", - "web-sys", +] + +[[package]] +name = "dioxus-fullstack-macro" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a59c844d648dae315b5aa264956f0c6fd9f34a5cedbf79fd0744820bf302bc5" +dependencies = [ + "const_format", + "convert_case 0.8.0", + "proc-macro2", + "quote", + "syn 2.0.108", + "xxhash-rust", ] [[package]] name = "dioxus-history" -version = "0.6.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ae4e22616c698f35b60727313134955d885de2d32e83689258e586ebc9b7909" +checksum = "1ea04ad918a08b81af66f1128f759162e33e8f7e7e062597e6dd542a45211905" dependencies = [ "dioxus-core", "tracing", @@ -1855,9 +1972,9 @@ dependencies = [ [[package]] name = "dioxus-hooks" -version = "0.6.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "948e2b3f20d9d4b2c300aaa60281b1755f3298684448920b27106da5841896d0" +checksum = "0e7c1a9c7e8d2422198d082d03a9e1f4eb5789cdc1d73f1eb08e0d36a62fdfcb" dependencies = [ "dioxus-core", "dioxus-signals", @@ -1872,11 +1989,12 @@ dependencies = [ [[package]] name = "dioxus-html" -version = "0.6.3" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59c9a40e6fee20ce7990095492dedb6a753eebe05e67d28271a249de74dc796d" +checksum = "fe86f40430acb0ee310f91e7dbdd48ea4e26267dedab6e54f0c45f0c692db924" dependencies = [ "async-trait", + "bytes", "dioxus-core", "dioxus-core-macro", "dioxus-core-types", @@ -1885,9 +2003,10 @@ dependencies = [ "enumset", "euclid", "futures-channel", + "futures-util", "generational-box", "keyboard-types", - "lazy-js-bundle", + "lazy-js-bundle 0.7.0", "rustversion", "serde", "serde_json", @@ -1897,11 +2016,11 @@ dependencies = [ [[package]] name = "dioxus-html-internal-macro" -version = "0.6.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43ba87b53688a2c9f619ecdf4b3b955bc1f08bd0570a80a0d626c405f6d14a76" +checksum = "267ca3487501aa1b95a5d65554ee36839da660b03174146c5c27d54014067abd" dependencies = [ - "convert_case 0.6.0", + "convert_case 0.8.0", "proc-macro2", "quote", "syn 2.0.108", @@ -1909,16 +2028,16 @@ dependencies = [ [[package]] name = "dioxus-interpreter-js" -version = "0.6.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "330707b10ca75cb0eb05f9e5f8d80217cd0d7e62116a8277ae363c1a09b57a22" +checksum = "14c429cd5057cec2eb00acef02a699ebd359a98d392629464b2e1c350eaed8ce" dependencies = [ "dioxus-core", "dioxus-core-types", "dioxus-html", "js-sys", - "lazy-js-bundle", - "rustc-hash 1.1.0", + "lazy-js-bundle 0.7.0", + "rustc-hash 2.1.1", "serde", "sledgehammer_bindgen", "sledgehammer_utils", @@ -1928,30 +2047,39 @@ dependencies = [ ] [[package]] -name = "dioxus-lib" -version = "0.6.2" +name = "dioxus-liveview" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5405b71aa9b8b0c3e0d22728f12f34217ca5277792bd315878cc6ecab7301b72" +checksum = "36d558d71ee41b33d2b35fd39444bfaab65fbda0b608c3eba33ea8ff97247115" dependencies = [ - "dioxus-config-macro", + "axum", + "dioxus-cli-config", "dioxus-core", - "dioxus-core-macro", + "dioxus-devtools", "dioxus-document", "dioxus-history", - "dioxus-hooks", "dioxus-html", - "dioxus-rsx", - "dioxus-signals", - "warnings", + "dioxus-interpreter-js", + "futures-channel", + "futures-util", + "generational-box", + "rustc-hash 2.1.1", + "serde", + "serde_json", + "slab", + "thiserror 2.0.17", + "tokio", + "tokio-stream", + "tokio-util", + "tracing", ] [[package]] name = "dioxus-logger" -version = "0.6.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "545961e752f6c8bf59c274951b3c8b18a106db6ad2f9e2035b29e1f2a3e899b1" +checksum = "7a54751cf6aa00132c8a17343ad8d8cdb587d67a4b71acfc19ed78a924128edb" dependencies = [ - "console_error_panic_hook", "dioxus-cli-config", "tracing", "tracing-subscriber", @@ -1959,52 +2087,59 @@ dependencies = [ ] [[package]] -name = "dioxus-mobile" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d1295388909f427758993f32a571e0f8698d6ce0f125fa0e81b8bfdec3fa952" +name = "dioxus-primitives" +version = "0.0.1" +source = "git+https://github.com/DioxusLabs/components#8e25631c7d4234ee070509156ed2abebb7b1d6e9" dependencies = [ - "dioxus-cli-config", - "dioxus-desktop", - "dioxus-lib", - "jni", - "libc", - "once_cell", + "dioxus", + "dioxus-time", + "lazy-js-bundle 0.6.2", + "num-integer", + "time", + "tracing", ] [[package]] name = "dioxus-router" -version = "0.6.3" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7266a76fc9e4a91f56499d1d1aecfff7168952b6627a6008b4e9748d6bf863e4" +checksum = "577cc2680066242ef0e672c379c7b63072dee838a7dac6a4296f0c768ab2f72f" dependencies = [ "dioxus-cli-config", + "dioxus-core", + "dioxus-core-macro", + "dioxus-fullstack-core", "dioxus-history", - "dioxus-lib", + "dioxus-hooks", + "dioxus-html", "dioxus-router-macro", + "dioxus-signals", + "percent-encoding", "rustversion", "tracing", "url", - "urlencoding", ] [[package]] name = "dioxus-router-macro" -version = "0.6.3" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2743ffb79e9a7d33d779c87d6deea2a6c047d0736012f95d63b909b83f0a6fd2" +checksum = "a924da6e4b92053266b1f153292bd2282ce1ff2b035b29002f1520112a4d00e5" dependencies = [ + "base16", + "digest", "proc-macro2", "quote", + "sha2", "slab", "syn 2.0.108", ] [[package]] name = "dioxus-rsx" -version = "0.6.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3eb588e05800b5a7eb90b2f40fca5bbd7626e823fb5e1ba21e011de649b45aa1" +checksum = "e290f814c6ee06f34d40bb5f3db976500f39e1776c80984fb23815377c2c9cd0" dependencies = [ "proc-macro2", "proc-macro2-diagnostics", @@ -2012,36 +2147,138 @@ dependencies = [ "syn 2.0.108", ] +[[package]] +name = "dioxus-server" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b3b6b8658b79b05c44e66dd934ca3e419a175d1ea9c130b07aa6512605e8df5" +dependencies = [ + "anyhow", + "async-trait", + "axum", + "base64 0.22.1", + "bytes", + "chrono", + "ciborium", + "dashmap 6.1.0", + "dioxus-cli-config", + "dioxus-core", + "dioxus-core-macro", + "dioxus-devtools", + "dioxus-document", + "dioxus-fullstack-core", + "dioxus-history", + "dioxus-hooks", + "dioxus-html", + "dioxus-interpreter-js", + "dioxus-logger", + "dioxus-router", + "dioxus-signals", + "dioxus-ssr", + "enumset", + "futures", + "futures-channel", + "futures-util", + "generational-box", + "http", + "http-body-util", + "hyper", + "hyper-util", + "inventory", + "lru", + "parking_lot", + "pin-project", + "rustc-hash 2.1.1", + "serde", + "serde_json", + "serde_qs", + "subsecond", + "thiserror 2.0.17", + "tokio", + "tokio-tungstenite 0.27.0", + "tokio-util", + "tower", + "tower-http", + "tracing", + "tracing-futures", + "url", + "walkdir", +] + [[package]] name = "dioxus-signals" -version = "0.6.3" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10e032dbb3a2c0386ec8b8ee59bc20b5aeb67038147c855801237b45b13d72ac" +checksum = "4fce8fe43f49769d7a05bef9e1acafcefc9b5f7da2b9bb58e0bde12a145028b9" dependencies = [ "dioxus-core", "futures-channel", "futures-util", "generational-box", - "once_cell", - "parking_lot 0.12.5", - "rustc-hash 1.1.0", + "parking_lot", + "rustc-hash 2.1.1", "tracing", "warnings", ] +[[package]] +name = "dioxus-ssr" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c180307efbf0f2cb64ad125fd4e6e00d0586dba73875bdea0d6587f5c89524b7" +dependencies = [ + "askama_escape", + "dioxus-core", + "dioxus-core-types", + "rustc-hash 2.1.1", +] + +[[package]] +name = "dioxus-stores" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01f9b29b4486f4aa515ab59b5d5b9177b1abf1a3f4c1940cedc8031ca6c11933" +dependencies = [ + "dioxus-core", + "dioxus-signals", + "dioxus-stores-macro", +] + +[[package]] +name = "dioxus-stores-macro" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d63865f35106c145a11b1072eb84dd9d0d4ca4a78861ad666c297ebae8f42d" +dependencies = [ + "convert_case 0.8.0", + "proc-macro2", + "quote", + "syn 2.0.108", +] + +[[package]] +name = "dioxus-time" +version = "0.7.0" +source = "git+https://github.com/ealmloff/dioxus-std?branch=0.7#e5a74354cd36be440febdd6b701f584bd552bd62" +dependencies = [ + "dioxus", + "futures", + "gloo-timers", + "tokio", +] + [[package]] name = "dioxus-web" -version = "0.6.3" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e7c12475c3d360058b8afe1b68eb6dfc9cbb7dcd760aed37c5f85c561c83ed1" +checksum = "6d877058b49e547fee2b0fe26af17018142983262a9dd3f739963903799aea8e" dependencies = [ - "async-trait", - "ciborium", "dioxus-cli-config", "dioxus-core", "dioxus-core-types", "dioxus-devtools", "dioxus-document", + "dioxus-fullstack-core", "dioxus-history", "dioxus-html", "dioxus-interpreter-js", @@ -2049,30 +2286,21 @@ dependencies = [ "futures-channel", "futures-util", "generational-box", + "gloo-timers", "js-sys", - "lazy-js-bundle", - "rustc-hash 1.1.0", + "lazy-js-bundle 0.7.0", + "rustc-hash 2.1.1", + "send_wrapper", "serde", "serde-wasm-bindgen", "serde_json", "tracing", "wasm-bindgen", "wasm-bindgen-futures", + "wasm-streams", "web-sys", ] -[[package]] -name = "dioxus_server_macro" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "371a5b21989a06b53c5092e977b3f75d0e60a65a4c15a2aa1d07014c3b2dda97" -dependencies = [ - "proc-macro2", - "quote", - "server_fn_macro", - "syn 2.0.108", -] - [[package]] name = "dirs" version = "6.0.0" @@ -2107,7 +2335,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89a09f22a6c6069a18470eb92d2298acf25463f14256d24778e1230d789a2aec" dependencies = [ "bitflags 2.10.0", - "objc2 0.6.3", + "block2", + "libc", + "objc2", ] [[package]] @@ -2121,11 +2351,20 @@ dependencies = [ "syn 2.0.108", ] +[[package]] +name = "dlib" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" +dependencies = [ + "libloading 0.8.9", +] + [[package]] name = "dlopen2" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1297103d2bbaea85724fcee6294c2d50b1081f9ad47d0f6f6f61eda65315a6" +checksum = "b54f373ccf864bf587a89e880fb7610f8d73f3045f13580948ccbcaff26febff" dependencies = [ "dlopen2_derive", "libc", @@ -2144,12 +2383,27 @@ dependencies = [ "syn 2.0.108", ] +[[package]] +name = "document-features" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4b8a88685455ed29a21542a33abd9cb6510b6b129abadabdcef0f4c55bc8f61" +dependencies = [ + "litrs", +] + [[package]] name = "dotenvy" version = "0.15.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" +[[package]] +name = "downcast-rs" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" + [[package]] name = "dpi" version = "0.1.2" @@ -2296,7 +2550,7 @@ version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" dependencies = [ - "cfg-if 1.0.4", + "cfg-if", ] [[package]] @@ -2375,6 +2629,15 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "error-chain" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d2f06b9cac1506ece98fe3231e3cc9c4410ec3d5b1f24ae1c8946f0742cdefc" +dependencies = [ + "version_check", +] + [[package]] name = "euclid" version = "0.22.11" @@ -2470,7 +2733,7 @@ version = "0.2.26" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc0505cd1b6fa6580283f6bdf70a73fcf4aba1184038c90902b92b3dd0df63ed" dependencies = [ - "cfg-if 1.0.4", + "cfg-if", "libc", "libredox", "windows-sys 0.60.2", @@ -2482,12 +2745,6 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52051878f80a721bb68ebfbc930e07b65ba72f2da88968ea5c06fd6ca3d3a127" -[[package]] -name = "fixedbitset" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37ab347416e802de484e4d03c7316c48f1ecb56574dfd4a46a80f173ce1de04d" - [[package]] name = "flate2" version = "1.1.5" @@ -2520,6 +2777,12 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" +[[package]] +name = "foldhash" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" + [[package]] name = "foreign-types" version = "0.3.2" @@ -2690,7 +2953,7 @@ dependencies = [ "futures-macro", "futures-sink", "futures-task", - "memchr 2.7.6", + "memchr", "pin-project-lite", "pin-utils", "slab", @@ -2777,20 +3040,6 @@ dependencies = [ "system-deps", ] -[[package]] -name = "gdkx11" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3caa00e14351bebbc8183b3c36690327eb77c49abc2268dd4bd36b856db3fbfe" -dependencies = [ - "gdk", - "gdkx11-sys", - "gio", - "glib", - "libc", - "x11", -] - [[package]] name = "gdkx11-sys" version = "0.18.2" @@ -2806,11 +3055,11 @@ dependencies = [ [[package]] name = "generational-box" -version = "0.6.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a673cf4fb0ea6a91aa86c08695756dfe875277a912cdbf33db9a9f62d47ed82b" +checksum = "0f067a79c49f237b1017258357a9789477be4f47f11422c74547a8bec189adb4" dependencies = [ - "parking_lot 0.12.5", + "parking_lot", "tracing", ] @@ -2821,11 +3070,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "605183a538e3e2a9c1038635cc5c2d194e2ee8fd0d1b66b8349fad7dbacce5a2" dependencies = [ "cc", - "cfg-if 1.0.4", + "cfg-if", "libc", "log", "rustversion", - "windows 0.61.3", + "windows", ] [[package]] @@ -2840,6 +3089,16 @@ dependencies = [ "zeroize", ] +[[package]] +name = "gethostname" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bd49230192a3797a9a4d6abe9b3eed6f7fa4c8a8a4947977c6f80025f92cbd8" +dependencies = [ + "rustix", + "windows-link 0.2.1", +] + [[package]] name = "getopts" version = "0.2.24" @@ -2855,7 +3114,7 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" dependencies = [ - "cfg-if 1.0.4", + "cfg-if", "libc", "wasi 0.9.0+wasi-snapshot-preview1", ] @@ -2866,7 +3125,7 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" dependencies = [ - "cfg-if 1.0.4", + "cfg-if", "js-sys", "libc", "wasi 0.11.1+wasi-snapshot-preview1", @@ -2879,7 +3138,7 @@ version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" dependencies = [ - "cfg-if 1.0.4", + "cfg-if", "js-sys", "libc", "r-efi", @@ -2942,7 +3201,7 @@ dependencies = [ "glib-sys", "gobject-sys", "libc", - "memchr 2.7.6", + "memchr", "once_cell", "smallvec", "thiserror 1.0.69", @@ -2972,21 +3231,27 @@ dependencies = [ "system-deps", ] +[[package]] +name = "glob" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" + [[package]] name = "global-hotkey" -version = "0.5.5" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b436093d1598b05e3b7fddc097b2bad32763f53a1beb25ab6f9718c6a60acd09" +checksum = "b9247516746aa8e53411a0db9b62b0e24efbcf6a76e0ba73e5a91b512ddabed7" dependencies = [ - "bitflags 2.10.0", - "cocoa 0.25.0", "crossbeam-channel", "keyboard-types", - "objc", + "objc2", + "objc2-app-kit", "once_cell", - "thiserror 1.0.69", - "windows-sys 0.52.0", - "x11-dl", + "thiserror 2.0.17", + "windows-sys 0.59.0", + "x11rb", + "xkeysym", ] [[package]] @@ -3023,6 +3288,18 @@ dependencies = [ "web-sys", ] +[[package]] +name = "gloo-timers" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbb143cf96099802033e0d4f4963b19fd2e0b728bcf076cd9cf7f6634f092994" +dependencies = [ + "futures-channel", + "futures-core", + "js-sys", + "wasm-bindgen", +] + [[package]] name = "gloo-utils" version = "0.2.0" @@ -3138,19 +3415,13 @@ dependencies = [ "tracing", ] -[[package]] -name = "half" -version = "1.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b43ede17f21864e81be2fa654110bf1e793774238d86ef8555c37e6519c0403" - [[package]] name = "half" version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b" dependencies = [ - "cfg-if 1.0.4", + "cfg-if", "crunchy", "zerocopy", ] @@ -3175,7 +3446,7 @@ checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" dependencies = [ "allocator-api2", "equivalent", - "foldhash", + "foldhash 0.1.5", "serde", ] @@ -3183,15 +3454,44 @@ dependencies = [ name = "hashbrown" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d" +checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash 0.2.0", +] + +[[package]] +name = "hashlink" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7382cf6263419f2d8df38c55d7da83da5c18aef87fc7a7fc1fb1e344edfe14c1" +dependencies = [ + "hashbrown 0.15.5", +] + +[[package]] +name = "headers" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3314d5adb5d94bcdf56771f2e50dbbc80bb4bdf88967526706205ac9eff24eb" +dependencies = [ + "base64 0.22.1", + "bytes", + "headers-core", + "http", + "httpdate", + "mime", + "sha1", +] [[package]] -name = "hashlink" -version = "0.10.0" +name = "headers-core" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7382cf6263419f2d8df38c55d7da83da5c18aef87fc7a7fc1fb1e344edfe14c1" +checksum = "54b4a22553d4242c49fddb9ba998a99962b5cc6f22cb5a3482bec22522403ce4" dependencies = [ - "hashbrown 0.15.5", + "http", ] [[package]] @@ -3206,15 +3506,6 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - [[package]] name = "hermit-abi" version = "0.5.2" @@ -3240,7 +3531,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92652067c9ce6f66ce53cc38d1169daa36e6e7eb7dd3b63b5103bd9d97117248" dependencies = [ "async-trait", - "cfg-if 1.0.4", + "cfg-if", "data-encoding", "enum-as-inner", "futures-channel", @@ -3263,13 +3554,13 @@ version = "0.24.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cbb117a1ca520e111743ab2f6688eddee69db4e0ea242545a604dce8a66fd22e" dependencies = [ - "cfg-if 1.0.4", + "cfg-if", "futures-util", "hickory-proto", "ipconfig", "lru-cache", "once_cell", - "parking_lot 0.12.5", + "parking_lot", "rand 0.8.5", "resolv-conf", "smallvec", @@ -3298,30 +3589,28 @@ dependencies = [ [[package]] name = "html5ever" -version = "0.26.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bea68cab48b8459f17cf1c944c67ddc572d272d9f2b274140f223ecb1da4a3b7" +checksum = "c13771afe0e6e846f1e67d038d4cb29998a6779f93c809212e4e9c32efd244d4" dependencies = [ "log", "mac", - "markup5ever 0.11.0", + "markup5ever 0.12.1", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.108", ] [[package]] name = "html5ever" -version = "0.27.0" +version = "0.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c13771afe0e6e846f1e67d038d4cb29998a6779f93c809212e4e9c32efd244d4" +checksum = "3b7410cae13cbc75623c98ac4cbfd1f0bedddf3227afc24f370cf0f50a44a11c" dependencies = [ "log", "mac", - "markup5ever 0.12.1", - "proc-macro2", - "quote", - "syn 2.0.108", + "markup5ever 0.14.1", + "match_token", ] [[package]] @@ -3332,7 +3621,7 @@ checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" dependencies = [ "bytes", "fnv", - "itoa 1.0.15", + "itoa", ] [[package]] @@ -3391,7 +3680,7 @@ dependencies = [ "http-body", "httparse", "httpdate", - "itoa 1.0.15", + "itoa", "pin-project-lite", "pin-utils", "smallvec", @@ -3599,7 +3888,7 @@ dependencies = [ "crossbeam-deque", "globset", "log", - "memchr 2.7.6", + "memchr", "regex-automata", "same-file", "walkdir", @@ -3640,9 +3929,9 @@ dependencies = [ [[package]] name = "infer" -version = "0.11.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a6c16b11a665b26aeeb9b1d7f954cdeb034be38dd00adab4f2ae921a8fee804" +checksum = "a588916bfdfd92e71cacef98a63d9b1f0d74d6599980d11894290e7ddefffcf7" dependencies = [ "cfb", ] @@ -3659,15 +3948,6 @@ dependencies = [ "similar", ] -[[package]] -name = "instant" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" -dependencies = [ - "cfg-if 1.0.4", -] - [[package]] name = "inventory" version = "0.3.21" @@ -3712,7 +3992,7 @@ version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dbc5ebe9c3a1a7a5127f920a418f7585e9e758e911d0466ed004f393b0e380b2" dependencies = [ - "memchr 2.7.6", + "memchr", "serde", ] @@ -3728,12 +4008,6 @@ version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" -[[package]] -name = "itoa" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" - [[package]] name = "itoa" version = "1.0.15" @@ -3755,6 +4029,7 @@ dependencies = [ "jacquard-oauth", "jose-jwk", "miette 7.6.0", + "n0-future", "regex", "reqwest", "serde", @@ -3763,7 +4038,6 @@ dependencies = [ "smol_str", "thiserror 2.0.17", "tokio", - "tracing", "trait-variant", "url", "webpage", @@ -3846,7 +4120,6 @@ dependencies = [ "tokio", "tokio-tungstenite-wasm", "tokio-util", - "tracing", "trait-variant", "url", "zstd", @@ -3878,6 +4151,7 @@ dependencies = [ "jacquard-lexicon", "miette 7.6.0", "moka", + "n0-future", "percent-encoding", "reqwest", "serde", @@ -3885,7 +4159,6 @@ dependencies = [ "serde_json", "thiserror 2.0.17", "tokio", - "tracing", "trait-variant", "url", "urlencoding", @@ -3933,6 +4206,7 @@ dependencies = [ "jose-jwa", "jose-jwk", "miette 7.6.0", + "n0-future", "p256", "rand 0.8.5", "rouille", @@ -3944,10 +4218,9 @@ dependencies = [ "smol_str", "thiserror 2.0.17", "tokio", - "tracing", "trait-variant", "url", - "webbrowser", + "webbrowser 0.8.15", ] [[package]] @@ -3980,7 +4253,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" dependencies = [ "cesu8", - "cfg-if 1.0.4", + "cfg-if", "combine", "jni-sys", "log", @@ -4012,7 +4285,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de791f8b277ef903d49b0c6f3f3b866569ae8cb1d0829825eea28374cc4c803c" dependencies = [ "base64ct", - "cfg-if 1.0.4", + "cfg-if", "digest", "ecdsa", "ed25519-dalek", @@ -4090,7 +4363,7 @@ version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" dependencies = [ - "cfg-if 1.0.4", + "cfg-if", "ecdsa", "elliptic-curve", "sha2", @@ -4103,7 +4376,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e03e2e96c5926fe761088d66c8c2aee3a4352a2573f4eaca50043ad130af9117" dependencies = [ "miette 5.10.0", - "nom 7.1.3", + "nom", "thiserror 1.0.69", ] @@ -4120,14 +4393,13 @@ dependencies = [ [[package]] name = "kuchikiki" -version = "0.8.2" +version = "0.8.8-speedreader" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e4755b7b995046f510a7520c42b2fed58b77bd94d5a87a8eb43d2fd126da8" +checksum = "02cb977175687f33fa4afa0c95c112b987ea1443e5a51c8f8ff27dc618270cc2" dependencies = [ "cssparser", - "html5ever 0.26.0", - "indexmap 1.9.3", - "matches", + "html5ever 0.29.1", + "indexmap 2.12.0", "selectors", ] @@ -4148,6 +4420,12 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e49596223b9d9d4947a14a25c142a6e7d8ab3f27eb3ade269d238bb8b5c267e2" +[[package]] +name = "lazy-js-bundle" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb1a786b3e81c7a8c1809f8e430cc53f26b37695d929ba41bc30d71679c80e0a" + [[package]] name = "lazy_static" version = "1.5.0" @@ -4177,7 +4455,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e9ec52138abedcc58dc17a7c6c0c00a2bdb4f3427c7f63fa97fd0d859155caf" dependencies = [ "gtk-sys", - "libloading", + "libloading 0.7.4", "once_cell", ] @@ -4193,10 +4471,20 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" dependencies = [ - "cfg-if 1.0.4", + "cfg-if", "winapi", ] +[[package]] +name = "libloading" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55" +dependencies = [ + "cfg-if", + "windows-link 0.2.1", +] + [[package]] name = "libm" version = "0.2.15" @@ -4211,7 +4499,7 @@ checksum = "416f7e718bdb06000964960ffa43b4335ad4012ae8b99060261aa4a8088d5ccb" dependencies = [ "bitflags 2.10.0", "libc", - "redox_syscall 0.5.18", + "redox_syscall", ] [[package]] @@ -4262,13 +4550,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" [[package]] -name = "lock_api" -version = "0.3.4" +name = "litrs" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" -dependencies = [ - "scopeguard", -] +checksum = "11d3d7f243d5c5a8b9bb5d6dd2b1602c0cb0b9db1621bafc7ed66e35ff9fe092" [[package]] name = "lock_api" @@ -4297,13 +4582,22 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "419e0dc8046cb947daa77eb95ae174acfbddb7673b4151f56d1eed8e93fbfaca" dependencies = [ - "cfg-if 1.0.4", + "cfg-if", "generator", "scoped-tls", "tracing", "tracing-subscriber", ] +[[package]] +name = "lru" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96051b46fc183dc9cd4a223960ef37b9af631b55191852a8274bfef064cda20f" +dependencies = [ + "hashbrown 0.16.0", +] + [[package]] name = "lru-cache" version = "0.1.2" @@ -4325,6 +4619,17 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" +[[package]] +name = "macro-string" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b27834086c65ec3f9387b096d66e99f221cf081c2b738042aa252bcd41204e3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.108", +] + [[package]] name = "malloc_buf" version = "0.0.6" @@ -4336,9 +4641,9 @@ dependencies = [ [[package]] name = "manganis" -version = "0.6.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317af44b15e7605b85f04525449a3bb631753040156c9b318e6cba8a3ea4ef73" +checksum = "bcdad2e00822f2705d142c76843e4d0de796754e1dfa7e459e4e2b1742d6e632" dependencies = [ "const-serialize", "manganis-core", @@ -4347,9 +4652,9 @@ dependencies = [ [[package]] name = "manganis-core" -version = "0.6.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c38bee65cc725b2bba23b5dbb290f57c8be8fadbe2043fb7e2ce73022ea06519" +checksum = "058d5b28351649020f1a1a3c36a8019a5e1d747f4103e3adb6b5eef15f1683e0" dependencies = [ "const-serialize", "dioxus-cli-config", @@ -4359,11 +4664,12 @@ dependencies = [ [[package]] name = "manganis-macro" -version = "0.6.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9f4f71310913c40174d9f0cfcbcb127dad0329ecdb3945678a120db22d3d065" +checksum = "bd5449ca340d41990d79be6accc063aa9b6a70b83766a0210d5230dd76e40dd7" dependencies = [ "dunce", + "macro-string", "manganis-core", "proc-macro2", "quote", @@ -4378,7 +4684,7 @@ dependencies = [ "bitflags 2.10.0", "getopts", "markdown-weaver-escape", - "memchr 2.7.6", + "memchr", "serde", "unicase", ] @@ -4390,13 +4696,13 @@ source = "git+https://github.com/rsform/markdown-weaver#46f3eee6c93118da84a5de3d [[package]] name = "markup5ever" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2629bb1404f3d34c2e921f21fd34ba00b206124c81f65c50b43b6aaefeb016" +checksum = "16ce3abbeba692c8b8441d036ef91aea6df8da2c6b6e21c7e14d3c18e526be45" dependencies = [ "log", - "phf 0.10.1", - "phf_codegen 0.10.0", + "phf 0.11.3", + "phf_codegen 0.11.3", "string_cache", "string_cache_codegen", "tendril", @@ -4404,9 +4710,9 @@ dependencies = [ [[package]] name = "markup5ever" -version = "0.12.1" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16ce3abbeba692c8b8441d036ef91aea6df8da2c6b6e21c7e14d3c18e526be45" +checksum = "c7a7213d12e1864c0f002f52c2923d4556935a43dec5e71355c2760e0f6e7a18" dependencies = [ "log", "phf 0.11.3", @@ -4439,6 +4745,17 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "match_token" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88a9689d8d44bf9964484516275f5cd4c9b59457a6940c1d5d0ecbb94510a36b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.108", +] + [[package]] name = "matchers" version = "0.2.0" @@ -4466,7 +4783,7 @@ version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" dependencies = [ - "cfg-if 1.0.4", + "cfg-if", "digest", ] @@ -4481,18 +4798,27 @@ dependencies = [ [[package]] name = "memchr" -version = "1.0.2" +version = "2.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" + +[[package]] +name = "memfd" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "148fab2e51b4f1cfc66da2a7c32981d1d3c083a803978268bb11fe4b86925e7a" +checksum = "ad38eb12aea514a0466ea40a80fd8cc83637065948eb4a426e4aa46261175227" dependencies = [ - "libc", + "rustix", ] [[package]] -name = "memchr" -version = "2.7.6" +name = "memmap2" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" +checksum = "744133e4a0e0a658e1374cf3bf8e415c4052a15a111acd372764c55b4177d490" +dependencies = [ + "libc", +] [[package]] name = "memoffset" @@ -4523,7 +4849,7 @@ checksum = "5f98efec8807c63c752b5bd61f862c165c115b0a35685bdcfd9238c7aeb592b7" dependencies = [ "backtrace", "backtrace-ext", - "cfg-if 1.0.4", + "cfg-if", "miette-derive 7.6.0", "owo-colors", "supports-color", @@ -4531,7 +4857,7 @@ dependencies = [ "supports-unicode", "syntect", "terminal_size", - "textwrap 0.16.2", + "textwrap", "unicode-width 0.1.14", ] @@ -4584,6 +4910,16 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" +[[package]] +name = "mime-sniffer" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b8b2a64cd735f1d5f17ff6701ced3cc3c54851f9448caf454cd9c923d812408" +dependencies = [ + "mime", + "url", +] + [[package]] name = "mime_guess" version = "2.0.5" @@ -4594,6 +4930,21 @@ dependencies = [ "unicase", ] +[[package]] +name = "mini-moka" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c325dfab65f261f386debee8b0969da215b3fa0037e74c8a1234db7ba986d803" +dependencies = [ + "crossbeam-channel", + "crossbeam-utils", + "dashmap 5.5.3", + "skeptic", + "smallvec", + "tagptr", + "triomphe", +] + [[package]] name = "minijinja" version = "2.12.0" @@ -4653,7 +5004,7 @@ dependencies = [ "equivalent", "event-listener", "futures-util", - "parking_lot 0.12.5", + "parking_lot", "portable-atomic", "rustc_version", "smallvec", @@ -4663,40 +5014,40 @@ dependencies = [ [[package]] name = "muda" -version = "0.11.5" +version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c47e7625990fc1af2226ea4f34fb2412b03c12639fcb91868581eb3a6893453" +checksum = "01c1738382f66ed56b3b9c8119e794a2e23148ac8ea214eda86622d4cb9d415a" dependencies = [ - "cocoa 0.25.0", "crossbeam-channel", + "dpi", "gtk", "keyboard-types", "libxdo", - "objc", + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-foundation", "once_cell", "png", - "thiserror 1.0.69", - "windows-sys 0.52.0", + "thiserror 2.0.17", + "windows-sys 0.60.2", ] [[package]] -name = "muda" -version = "0.15.3" +name = "multer" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdae9c00e61cc0579bcac625e8ad22104c60548a025bfc972dc83868a28e1484" +checksum = "83e87776546dc87511aa5ee218730c92b666d7264ab6ed41f9d215af9cd5224b" dependencies = [ - "crossbeam-channel", - "dpi", - "gtk", - "keyboard-types", - "libxdo", - "objc2 0.5.2", - "objc2-app-kit 0.2.2", - "objc2-foundation 0.2.2", - "once_cell", - "png", - "thiserror 1.0.69", - "windows-sys 0.59.0", + "bytes", + "encoding_rs", + "futures-util", + "http", + "httparse", + "memchr", + "mime", + "spin 0.9.8", + "version_check", ] [[package]] @@ -4816,12 +5167,12 @@ checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" [[package]] name = "nix" -version = "0.29.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" +checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6" dependencies = [ "bitflags 2.10.0", - "cfg-if 1.0.4", + "cfg-if", "cfg_aliases", "libc", "memoffset", @@ -4833,22 +5184,13 @@ version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" -[[package]] -name = "nom" -version = "3.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05aec50c70fd288702bcd93284a8444607f3292dbdf2a30de5ea5dcdbe72287b" -dependencies = [ - "memchr 1.0.2", -] - [[package]] name = "nom" version = "7.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" dependencies = [ - "memchr 2.7.6", + "memchr", "minimal-lexical", ] @@ -4920,7 +5262,7 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91df4bbde75afed763b708b7eee1e8e7651e02d97f6d5dd763e89367e957b23b" dependencies = [ - "hermit-abi 0.5.2", + "hermit-abi", "libc", ] @@ -4962,34 +5304,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" dependencies = [ "malloc_buf", - "objc_exception", -] - -[[package]] -name = "objc-foundation" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9" -dependencies = [ - "block", - "objc", - "objc_id", -] - -[[package]] -name = "objc-sys" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310" - -[[package]] -name = "objc2" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46a785d4eeff09c14c487497c162e92766fbb3e4059a71840cecc03d9a50b804" -dependencies = [ - "objc-sys", - "objc2-encode", ] [[package]] @@ -4999,22 +5313,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b7c2599ce0ec54857b29ce62166b0ed9b4f6f1a70ccc9a71165b6154caca8c05" dependencies = [ "objc2-encode", -] - -[[package]] -name = "objc2-app-kit" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" -dependencies = [ - "bitflags 2.10.0", - "block2 0.5.1", - "libc", - "objc2 0.5.2", - "objc2-core-data", - "objc2-core-image", - "objc2-foundation 0.2.2", - "objc2-quartz-core", + "objc2-exception-helper", ] [[package]] @@ -5024,21 +5323,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d49e936b501e5c5bf01fda3a9452ff86dc3ea98ad5f283e1455153142d97518c" dependencies = [ "bitflags 2.10.0", - "objc2 0.6.3", + "block2", + "objc2", "objc2-core-foundation", - "objc2-foundation 0.3.2", -] - -[[package]] -name = "objc2-core-data" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" -dependencies = [ - "bitflags 2.10.0", - "block2 0.5.1", - "objc2 0.5.2", - "objc2-foundation 0.2.2", + "objc2-foundation", ] [[package]] @@ -5049,7 +5337,7 @@ checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" dependencies = [ "bitflags 2.10.0", "dispatch2", - "objc2 0.6.3", + "objc2", ] [[package]] @@ -5062,18 +5350,6 @@ dependencies = [ "objc2-core-foundation", ] -[[package]] -name = "objc2-core-image" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80" -dependencies = [ - "block2 0.5.1", - "objc2 0.5.2", - "objc2-foundation 0.2.2", - "objc2-metal", -] - [[package]] name = "objc2-encode" version = "4.1.0" @@ -5081,15 +5357,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" [[package]] -name = "objc2-foundation" -version = "0.2.2" +name = "objc2-exception-helper" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" +checksum = "c7a1c5fbb72d7735b076bb47b578523aedc40f3c439bea6dfd595c089d79d98a" dependencies = [ - "bitflags 2.10.0", - "block2 0.5.1", - "libc", - "objc2 0.5.2", + "cc", ] [[package]] @@ -5099,43 +5372,35 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" dependencies = [ "bitflags 2.10.0", - "block2 0.6.2", - "objc2 0.6.3", + "block2", + "objc2", "objc2-core-foundation", ] [[package]] -name = "objc2-metal" -version = "0.2.2" +name = "objc2-ui-kit" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" +checksum = "d87d638e33c06f577498cbcc50491496a3ed4246998a7fbba7ccb98b1e7eab22" dependencies = [ "bitflags 2.10.0", - "block2 0.5.1", - "objc2 0.5.2", - "objc2-foundation 0.2.2", + "objc2", + "objc2-core-foundation", + "objc2-foundation", ] [[package]] -name = "objc2-quartz-core" -version = "0.2.2" +name = "objc2-web-kit" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" +checksum = "b2e5aaab980c433cf470df9d7af96a7b46a9d892d521a2cbbb2f8a4c16751e7f" dependencies = [ "bitflags 2.10.0", - "block2 0.5.1", - "objc2 0.5.2", - "objc2-foundation 0.2.2", - "objc2-metal", -] - -[[package]] -name = "objc_exception" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad970fb455818ad6cba4c122ad012fae53ae8b4795f86378bce65e4f6bab2ca4" -dependencies = [ - "cc", + "block2", + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-foundation", ] [[package]] @@ -5153,7 +5418,7 @@ version = "0.37.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff76201f031d8863c38aa7f905eca4f53abbfa15f609db4277d44cd8938f33fe" dependencies = [ - "memchr 2.7.6", + "memchr", ] [[package]] @@ -5197,7 +5462,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24ad14dd45412269e1a30f52ad8f0664f0f4f4a89ee8fe28c3b3527021ebb654" dependencies = [ "bitflags 2.10.0", - "cfg-if 1.0.4", + "cfg-if", "foreign-types 0.3.2", "libc", "once_cell", @@ -5344,38 +5609,14 @@ version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" -[[package]] -name = "parking_lot" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" -dependencies = [ - "lock_api 0.3.4", - "parking_lot_core 0.7.3", -] - [[package]] name = "parking_lot" version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" dependencies = [ - "lock_api 0.4.14", - "parking_lot_core 0.9.12", -] - -[[package]] -name = "parking_lot_core" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b93f386bb233083c799e6e642a9d73db98c24a5deeb95ffc85bf281255dffc98" -dependencies = [ - "cfg-if 0.1.10", - "cloudabi", - "libc", - "redox_syscall 0.1.57", - "smallvec", - "winapi", + "lock_api", + "parking_lot_core", ] [[package]] @@ -5384,19 +5625,13 @@ version = "0.9.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" dependencies = [ - "cfg-if 1.0.4", + "cfg-if", "libc", - "redox_syscall 0.5.18", + "redox_syscall", "smallvec", "windows-link 0.2.1", ] -[[package]] -name = "pathdiff" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3" - [[package]] name = "pem-rfc7468" version = "0.7.0" @@ -5412,25 +5647,13 @@ version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" -[[package]] -name = "petgraph" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "467d164a6de56270bd7c4d070df81d07beace25012d5103ced4e9ff08d6afdb7" -dependencies = [ - "fixedbitset", - "indexmap 1.9.3", -] - [[package]] name = "phf" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3dfb61232e34fcb633f43d12c58f83c1df82962dcdfa565a4e866ffc17dafe12" dependencies = [ - "phf_macros", "phf_shared 0.8.0", - "proc-macro-hack", ] [[package]] @@ -5439,7 +5662,9 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259" dependencies = [ + "phf_macros", "phf_shared 0.10.0", + "proc-macro-hack", ] [[package]] @@ -5471,16 +5696,6 @@ 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_codegen" version = "0.11.3" @@ -5523,12 +5738,12 @@ dependencies = [ [[package]] name = "phf_macros" -version = "0.8.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f6fde18ff429ffc8fe78e2bf7f8b7a5a5a6e2a8b58bc5a9ac69198bbda9189c" +checksum = "58fdf3184dd560f160dd73922bea2d5cd6e8f064bf4b13110abd81b03697b4e0" dependencies = [ - "phf_generator 0.8.0", - "phf_shared 0.8.0", + "phf_generator 0.10.0", + "phf_shared 0.10.0", "proc-macro-hack", "proc-macro2", "quote", @@ -5603,17 +5818,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" -[[package]] -name = "piper" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066" -dependencies = [ - "atomic-waker", - "fastrand", - "futures-io", -] - [[package]] name = "pkcs1" version = "0.7.5" @@ -5649,7 +5853,7 @@ checksum = "740ebea15c5d1428f910cd1a5f52cebf8d25006245ed8ade92702f4943d91e07" dependencies = [ "base64 0.22.1", "indexmap 2.12.0", - "quick-xml", + "quick-xml 0.38.3", "serde", "time", ] @@ -5667,25 +5871,11 @@ dependencies = [ "miniz_oxide", ] -[[package]] -name = "polling" -version = "3.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d0e4f59085d47d8241c88ead0f274e8a0cb551f3625263c05eb8dd897c34218" -dependencies = [ - "cfg-if 1.0.4", - "concurrent-queue", - "hermit-abi 0.5.2", - "pin-project-lite", - "rustix", - "windows-sys 0.61.2", -] - [[package]] name = "pollster" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22686f4785f02a4fcc856d3b3bb19bf6c8160d103f7a99cc258bddd0251dc7f2" +checksum = "2f3a9f18d041e6d0e102a0a46750538147e5e8992d3b4873aaafee2520b00ce3" [[package]] name = "portable-atomic" @@ -5705,7 +5895,7 @@ dependencies = [ "fallible-iterator", "hmac", "md-5", - "memchr 2.7.6", + "memchr", "rand 0.9.2", "sha2", "stringprep", @@ -5862,19 +6052,55 @@ dependencies = [ "yansi", ] +[[package]] +name = "psl-types" +version = "2.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33cb294fe86a74cbcf50d4445b37da762029549ebeea341421c7c70370f86cac" + +[[package]] +name = "publicsuffix" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f42ea446cab60335f76979ec15e12619a2165b5ae2c12166bef27d283a9fadf" +dependencies = [ + "idna", + "psl-types", +] + +[[package]] +name = "pulldown-cmark" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57206b407293d2bcd3af849ce869d52068623f19e1b5ff8e8778e3309439682b" +dependencies = [ + "bitflags 2.10.0", + "memchr", + "unicase", +] + [[package]] name = "quick-error" version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" +[[package]] +name = "quick-xml" +version = "0.37.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "331e97a1af0bf59823e6eadffe373d7b27f485be8748f71471c662c1f269b7fb" +dependencies = [ + "memchr", +] + [[package]] name = "quick-xml" version = "0.38.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42a232e7487fc2ef313d96dde7948e7a3c05101870d8985e4fd8d26aedd27b89" dependencies = [ - "memchr 2.7.6", + "memchr", ] [[package]] @@ -6075,12 +6301,6 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" -[[package]] -name = "redox_syscall" -version = "0.1.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" - [[package]] name = "redox_syscall" version = "0.5.18" @@ -6128,7 +6348,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" dependencies = [ "aho-corasick", - "memchr 2.7.6", + "memchr", "regex-automata", "regex-syntax", ] @@ -6140,7 +6360,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" dependencies = [ "aho-corasick", - "memchr 2.7.6", + "memchr", "regex-syntax", ] @@ -6159,6 +6379,8 @@ dependencies = [ "async-compression", "base64 0.22.1", "bytes", + "cookie", + "cookie_store", "encoding_rs", "futures-core", "futures-util", @@ -6217,25 +6439,26 @@ dependencies = [ [[package]] name = "rfd" -version = "0.14.1" +version = "0.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25a73a7337fc24366edfca76ec521f51877b114e42dab584008209cca6719251" +checksum = "ef2bee61e6cffa4635c72d7d81a84294e28f0930db0ddcb0f66d10244674ebed" dependencies = [ "ashpd", - "block", - "dispatch", + "block2", + "dispatch2", "js-sys", "log", - "objc", - "objc-foundation", - "objc_id", + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-foundation", "pollster", "raw-window-handle 0.6.2", "urlencoding", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] @@ -6245,7 +6468,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" dependencies = [ "cc", - "cfg-if 1.0.4", + "cfg-if", "getrandom 0.2.16", "libc", "untrusted", @@ -6458,12 +6681,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" -[[package]] -name = "scoped_threadpool" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d51f5df5af43ab3f1360b429fa5e0152ac5ce8c0bd6485cae490332e96846a8" - [[package]] name = "scopeguard" version = "1.2.0" @@ -6533,22 +6750,20 @@ dependencies = [ [[package]] name = "selectors" -version = "0.22.0" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df320f1889ac4ba6bc0cdc9c9af7af4bd64bb927bccdf32d81140dc1f9be12fe" +checksum = "0c37578180969d00692904465fb7f6b3d50b9a2b952b87c23d0e2e5cb5013416" dependencies = [ "bitflags 1.3.2", "cssparser", "derive_more 0.99.20", "fxhash", "log", - "matches", "phf 0.8.0", "phf_codegen 0.8.0", "precomputed-hash", "servo_arc", "smallvec", - "thin-slice", ] [[package]] @@ -6556,6 +6771,10 @@ name = "semver" version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" +dependencies = [ + "serde", + "serde_core", +] [[package]] name = "send_wrapper" @@ -6588,9 +6807,9 @@ dependencies = [ [[package]] name = "serde-wasm-bindgen" -version = "0.5.0" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3b143e2833c57ab9ad3ea280d21fd34e285a42837aeb0ee301f4f41890fa00e" +checksum = "8302e169f0eddcc139c70f139d19d6467353af16f9fce27e8c30158036a1e16b" dependencies = [ "js-sys", "serde", @@ -6607,16 +6826,6 @@ dependencies = [ "serde_core", ] -[[package]] -name = "serde_cbor" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5" -dependencies = [ - "half 1.8.3", - "serde", -] - [[package]] name = "serde_core" version = "1.0.228" @@ -6645,7 +6854,7 @@ checksum = "b2f2d7ff8a2140333718bb329f5c40fc5f0865b84c426183ce14c97d2ab8154f" dependencies = [ "form_urlencoded", "indexmap 2.12.0", - "itoa 1.0.15", + "itoa", "ryu", "serde_core", ] @@ -6669,8 +6878,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" dependencies = [ "indexmap 2.12.0", - "itoa 1.0.15", - "memchr 2.7.6", + "itoa", + "memchr", "ryu", "serde", "serde_core", @@ -6682,20 +6891,20 @@ version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "10a9ff822e371bb5403e391ecd83e182e0e77ba7f6fe0160b795797109d1b457" dependencies = [ - "itoa 1.0.15", + "itoa", "serde", "serde_core", ] [[package]] name = "serde_qs" -version = "0.12.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0431a35568651e363364210c91983c1da5eb29404d9f0928b67d4ebcfa7d330c" +checksum = "f3faaf9e727533a19351a43cc5a8de957372163c7d35cc48c90b75cdda13c352" dependencies = [ "percent-encoding", "serde", - "thiserror 1.0.69", + "thiserror 2.0.17", ] [[package]] @@ -6734,7 +6943,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", - "itoa 1.0.15", + "itoa", "ryu", "serde", ] @@ -6780,64 +6989,11 @@ dependencies = [ "serde", ] -[[package]] -name = "server_fn" -version = "0.6.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fae7a3038a32e5a34ba32c6c45eb4852f8affaf8b794ebfcd4b1099e2d62ebe" -dependencies = [ - "bytes", - "const_format", - "dashmap 5.5.3", - "futures", - "gloo-net", - "http", - "js-sys", - "once_cell", - "reqwest", - "send_wrapper", - "serde", - "serde_json", - "serde_qs", - "server_fn_macro_default", - "thiserror 1.0.69", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "wasm-streams", - "web-sys", - "xxhash-rust", -] - -[[package]] -name = "server_fn_macro" -version = "0.6.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faaaf648c6967aef78177c0610478abb5a3455811f401f3c62d10ae9bd3901a1" -dependencies = [ - "const_format", - "convert_case 0.6.0", - "proc-macro2", - "quote", - "syn 2.0.108", - "xxhash-rust", -] - -[[package]] -name = "server_fn_macro_default" -version = "0.6.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f2aa8119b558a17992e0ac1fd07f080099564f24532858811ce04f742542440" -dependencies = [ - "server_fn_macro", - "syn 2.0.108", -] - [[package]] name = "servo_arc" -version = "0.1.1" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d98238b800e0d1576d8b6e3de32827c2d74bee68bb97748dcf5071fb53965432" +checksum = "d52aa42f8fdf0fed91e5ce7f23d8138441002fa31dca008acf47e6fd4721f741" dependencies = [ "nodrop", "stable_deref_trait", @@ -6849,7 +7005,7 @@ version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ - "cfg-if 1.0.4", + "cfg-if", "cpufeatures", "digest", ] @@ -6866,7 +7022,7 @@ version = "0.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" dependencies = [ - "cfg-if 1.0.4", + "cfg-if", "cpufeatures", "digest", ] @@ -6939,6 +7095,21 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" +[[package]] +name = "skeptic" +version = "0.13.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16d23b015676c90a0f01c197bfdc786c20342c73a0afdda9025adb0bc42940a8" +dependencies = [ + "bytecount", + "cargo_metadata", + "error-chain", + "glob", + "pulldown-cmark", + "tempfile", + "walkdir", +] + [[package]] name = "slab" version = "0.4.11" @@ -7107,7 +7278,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf776ba3fa74f83bf4b63c3dcbbf82173db2632ed8452cb2d891d33f459de70f" dependencies = [ "new_debug_unreachable", - "parking_lot 0.12.5", + "parking_lot", "phf_shared 0.11.3", "precomputed-hash", "serde", @@ -7138,15 +7309,37 @@ dependencies = [ [[package]] name = "strsim" -version = "0.8.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] -name = "strsim" -version = "0.11.1" +name = "subsecond" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" +checksum = "e778134c310fa884270b226bbf58df76da727acf921f46834b0af896d739235c" +dependencies = [ + "js-sys", + "libc", + "libloading 0.8.9", + "memfd", + "memmap2", + "serde", + "subsecond-types", + "thiserror 2.0.17", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "subsecond-types" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcfc02dd02f2ce7c9aa6c0eb4f490fc455925c2590de7a3c54dde088c3ef481d" +dependencies = [ + "serde", +] [[package]] name = "subtle" @@ -7273,15 +7466,6 @@ dependencies = [ "version-compare", ] -[[package]] -name = "tabwriter" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fce91f2f0ec87dff7e6bcbbeb267439aa1188703003c6055193c821487400432" -dependencies = [ - "unicode-width 0.2.2", -] - [[package]] name = "tagptr" version = "0.2.0" @@ -7290,14 +7474,14 @@ checksum = "7b2093cf4c8eb1e67749a6762251bc9cd836b6fc171623bd0a9d324d37af2417" [[package]] name = "tao" -version = "0.30.8" +version = "0.34.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6682a07cf5bab0b8a2bd20d0a542917ab928b5edb75ebd4eda6b05cbaab872da" +checksum = "f3a753bdc39c07b192151523a3f77cd0394aa75413802c883a0f6f6a0e5ee2e7" dependencies = [ "bitflags 2.10.0", - "cocoa 0.26.1", + "block2", "core-foundation 0.10.1", - "core-graphics 0.24.0", + "core-graphics", "crossbeam-channel", "dispatch", "dlopen2", @@ -7305,7 +7489,6 @@ dependencies = [ "gdkwayland-sys", "gdkx11-sys", "gtk", - "instant", "jni", "lazy_static", "libc", @@ -7313,17 +7496,19 @@ dependencies = [ "ndk", "ndk-context", "ndk-sys", - "objc", + "objc2", + "objc2-app-kit", + "objc2-foundation", "once_cell", - "parking_lot 0.12.5", + "parking_lot", "raw-window-handle 0.5.2", "raw-window-handle 0.6.2", "scopeguard", "tao-macros", "unicode-segmentation", "url", - "windows 0.58.0", - "windows-core 0.58.0", + "windows", + "windows-core 0.61.2", "windows-version", "x11-dl", ] @@ -7379,15 +7564,6 @@ dependencies = [ "windows-sys 0.60.2", ] -[[package]] -name = "textwrap" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" -dependencies = [ - "unicode-width 0.1.14", -] - [[package]] name = "textwrap" version = "0.16.2" @@ -7398,12 +7574,6 @@ dependencies = [ "unicode-width 0.2.2", ] -[[package]] -name = "thin-slice" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eaa81235c7058867fa8c0e7314f33dcce9c215f535d1913822a2b3f5e289f3c" - [[package]] name = "thiserror" version = "1.0.69" @@ -7450,7 +7620,7 @@ version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" dependencies = [ - "cfg-if 1.0.4", + "cfg-if", ] [[package]] @@ -7469,7 +7639,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91e7d9e3bb61134e77bde20dd4825b97c010155709965fedf0f49bb138e52a9d" dependencies = [ "deranged", - "itoa 1.0.15", + "itoa", "libc", "num-conv", "num_threads", @@ -7541,7 +7711,7 @@ dependencies = [ "bytes", "libc", "mio", - "parking_lot 0.12.5", + "parking_lot", "pin-project-lite", "signal-hook-registry", "socket2 0.6.1", @@ -7584,7 +7754,7 @@ dependencies = [ "futures-channel", "futures-util", "log", - "parking_lot 0.12.5", + "parking_lot", "percent-encoding", "phf 0.13.1", "pin-project-lite", @@ -7607,6 +7777,18 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-stream" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", + "tokio-util", +] + [[package]] name = "tokio-tungstenite" version = "0.24.0" @@ -7623,6 +7805,30 @@ dependencies = [ "tungstenite 0.24.0", ] +[[package]] +name = "tokio-tungstenite" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "489a59b6730eda1b0171fcfda8b121f4bee2b35cba8645ca35c5f7ba3eb736c1" +dependencies = [ + "futures-util", + "log", + "tokio", + "tungstenite 0.27.0", +] + +[[package]] +name = "tokio-tungstenite" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d25a406cddcc431a75d3d9afc6a7c0f7428d4891dd973e4d54c56b46127bf857" +dependencies = [ + "futures-util", + "log", + "tokio", + "tungstenite 0.28.0", +] + [[package]] name = "tokio-tungstenite-wasm" version = "0.4.0" @@ -7637,7 +7843,7 @@ dependencies = [ "rustls", "thiserror 1.0.69", "tokio", - "tokio-tungstenite", + "tokio-tungstenite 0.24.0", "wasm-bindgen", "web-sys", ] @@ -7650,6 +7856,7 @@ checksum = "14307c986784f72ef81c89db7d9e28d6ac26d16213b109ea501696195e6e3ce5" dependencies = [ "bytes", "futures-core", + "futures-io", "futures-sink", "futures-util", "pin-project-lite", @@ -7797,7 +8004,7 @@ dependencies = [ "cookie", "futures-util", "http", - "parking_lot 0.12.5", + "parking_lot", "pin-project-lite", "tower-layer", "tower-service", @@ -7863,7 +8070,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3566e8ce28cc0a3fe42519fc80e6b4c943cc4c8cef275620eb8dac2d3d4e06cf" dependencies = [ "crossbeam-channel", - "parking_lot 0.12.5", + "parking_lot", "thiserror 1.0.69", "time", "tracing-subscriber", @@ -7890,6 +8097,16 @@ dependencies = [ "valuable", ] +[[package]] +name = "tracing-futures" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" +dependencies = [ + "pin-project", + "tracing", +] + [[package]] name = "tracing-log" version = "0.2.0" @@ -7956,43 +8173,31 @@ dependencies = [ [[package]] name = "tray-icon" -version = "0.19.3" +version = "0.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eadd75f5002e2513eaa19b2365f533090cc3e93abd38788452d9ea85cff7b48a" +checksum = "e3d5572781bee8e3f994d7467084e1b1fd7a93ce66bd480f8156ba89dee55a2b" dependencies = [ "crossbeam-channel", "dirs", "libappindicator", - "muda 0.15.3", - "objc2 0.6.3", - "objc2-app-kit 0.3.2", + "muda", + "objc2", + "objc2-app-kit", "objc2-core-foundation", "objc2-core-graphics", - "objc2-foundation 0.3.2", + "objc2-foundation", "once_cell", - "png", - "thiserror 2.0.17", - "windows-sys 0.59.0", -] - -[[package]] -name = "tree_magic" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1d99367ce3e553a84738f73bd626ccca541ef90ae757fdcdc4cbe728e6cb629" -dependencies = [ - "clap 2.34.0", - "fnv", - "lazy_static", - "nom 3.2.1", - "num_cpus", - "parking_lot 0.10.2", - "petgraph", - "scoped_threadpool", - "tabwriter", - "walkdir", + "png", + "thiserror 2.0.17", + "windows-sys 0.60.2", ] +[[package]] +name = "triomphe" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd69c5aa8f924c7519d6372789a74eac5b94fb0f8fcf0d4a97eb0bfc3e785f39" + [[package]] name = "try-lock" version = "0.2.5" @@ -8001,9 +8206,9 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "tungstenite" -version = "0.23.0" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e2e2ce1e47ed2994fd43b04c8f618008d4cabdd5ee34027cf14f9d918edd9c8" +checksum = "18e5b8366ee7a95b16d32197d0b2604b43a0be89dc5fac9f8e96ccafbaedda8a" dependencies = [ "byteorder", "bytes", @@ -8012,6 +8217,8 @@ dependencies = [ "httparse", "log", "rand 0.8.5", + "rustls", + "rustls-pki-types", "sha1", "thiserror 1.0.69", "utf-8", @@ -8019,21 +8226,37 @@ dependencies = [ [[package]] name = "tungstenite" -version = "0.24.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18e5b8366ee7a95b16d32197d0b2604b43a0be89dc5fac9f8e96ccafbaedda8a" +checksum = "eadc29d668c91fcc564941132e17b28a7ceb2f3ebf0b9dae3e03fd7a6748eb0d" dependencies = [ - "byteorder", "bytes", "data-encoding", "http", "httparse", "log", - "rand 0.8.5", + "native-tls", + "rand 0.9.2", "rustls", - "rustls-pki-types", "sha1", - "thiserror 1.0.69", + "thiserror 2.0.17", + "utf-8", +] + +[[package]] +name = "tungstenite" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8628dcc84e5a09eb3d8423d6cb682965dea9133204e8fb3efee74c2a0c259442" +dependencies = [ + "bytes", + "data-encoding", + "http", + "httparse", + "log", + "rand 0.9.2", + "sha1", + "thiserror 2.0.17", "utf-8", ] @@ -8043,7 +8266,7 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "59b11b2b5241ba34be09c3cc85a36e56e48f9888862e19cedf23336d35316ed1" dependencies = [ - "memchr 2.7.6", + "memchr", ] [[package]] @@ -8198,12 +8421,6 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" -[[package]] -name = "vec_map" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" - [[package]] name = "version-compare" version = "0.2.1" @@ -8290,7 +8507,7 @@ version = "0.2.105" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da95793dfc411fbbd93f5be7715b0578ec61fe87cb1a42b12eb625caa5c5ea60" dependencies = [ - "cfg-if 1.0.4", + "cfg-if", "once_cell", "rustversion", "wasm-bindgen-macro", @@ -8303,7 +8520,7 @@ version = "0.4.55" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "551f88106c6d5e7ccc7cd9a16f312dd3b5d36ea8b4954304657d5dfba115d4a0" dependencies = [ - "cfg-if 1.0.4", + "cfg-if", "js-sys", "once_cell", "wasm-bindgen", @@ -8355,6 +8572,66 @@ dependencies = [ "web-sys", ] +[[package]] +name = "wayland-backend" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "673a33c33048a5ade91a6b139580fa174e19fb0d23f396dca9fa15f2e1e49b35" +dependencies = [ + "cc", + "downcast-rs", + "rustix", + "scoped-tls", + "smallvec", + "wayland-sys", +] + +[[package]] +name = "wayland-client" +version = "0.31.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c66a47e840dc20793f2264eb4b3e4ecb4b75d91c0dd4af04b456128e0bdd449d" +dependencies = [ + "bitflags 2.10.0", + "rustix", + "wayland-backend", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols" +version = "0.32.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efa790ed75fbfd71283bd2521a1cfdc022aabcc28bdcff00851f9e4ae88d9901" +dependencies = [ + "bitflags 2.10.0", + "wayland-backend", + "wayland-client", + "wayland-scanner", +] + +[[package]] +name = "wayland-scanner" +version = "0.31.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54cb1e9dc49da91950bdfd8b848c49330536d9d1fb03d4bfec8cae50caa50ae3" +dependencies = [ + "proc-macro2", + "quick-xml 0.37.5", + "quote", +] + +[[package]] +name = "wayland-sys" +version = "0.31.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34949b42822155826b41db8e5d0c1be3a2bd296c747577a43a3e6daefc296142" +dependencies = [ + "dlib", + "log", + "pkg-config", +] + [[package]] name = "weaver-api" version = "0.1.0" @@ -8377,7 +8654,7 @@ version = "0.1.0" dependencies = [ "axum", "chrono", - "clap 4.5.51", + "clap", "dashmap 6.1.0", "diesel", "diesel-async", @@ -8407,14 +8684,13 @@ dependencies = [ "url", "uuid", "weaver-common", - "weaver-workspace-hack", ] [[package]] name = "weaver-cli" version = "0.1.0" dependencies = [ - "clap 4.5.51", + "clap", "dirs", "jacquard", "jacquard-api", @@ -8423,50 +8699,39 @@ dependencies = [ "tokio", "weaver-common", "weaver-renderer", - "weaver-workspace-hack", ] [[package]] name = "weaver-common" version = "0.1.0" dependencies = [ - "dirs", - "hickory-resolver", "http", "jacquard", - "jose-jwk", "markdown-weaver", "markdown-weaver-escape", "miette 7.6.0", + "mime-sniffer", "minijinja", - "multibase", "n0-future", "owo-colors", "regex", "reqwest", "serde", "serde_bytes", - "serde_cbor", "serde_html_form", "serde_ipld_dagcbor", "serde_json", "thiserror 2.0.17", "tokio", - "toml 0.8.23", - "tower-layer", - "tower-service", "tracing", "trait-variant", - "tree_magic", "weaver-api", - "weaver-workspace-hack", ] [[package]] name = "weaver-renderer" version = "0.1.0" dependencies = [ - "async-trait", "bitflags 2.10.0", "compact_string", "dashmap 6.1.0", @@ -8478,7 +8743,6 @@ dependencies = [ "markdown-weaver-escape", "miette 7.6.0", "n0-future", - "pathdiff", "pin-project", "pin-utils", "regex", @@ -8491,7 +8755,6 @@ dependencies = [ "unicode-normalization", "url", "weaver-common", - "weaver-workspace-hack", "yaml-rust2", ] @@ -8499,67 +8762,16 @@ dependencies = [ name = "weaver-server" version = "0.1.0" dependencies = [ + "dashmap 6.1.0", "dioxus", + "dioxus-primitives", "jacquard", + "jacquard-axum", + "markdown-weaver", + "mini-moka", + "moka", + "weaver-api", "weaver-common", - "weaver-workspace-hack", -] - -[[package]] -name = "weaver-workspace-hack" -version = "0.1.0" -dependencies = [ - "aho-corasick", - "byteorder", - "bytes", - "data-encoding", - "diesel", - "diesel-async", - "diesel_derives", - "elliptic-curve", - "futures-channel", - "futures-core", - "futures-task", - "futures-util", - "generic-array", - "hashbrown 0.15.5", - "idna", - "jacquard", - "jacquard-api", - "jacquard-common", - "jacquard-identity", - "jacquard-lexicon", - "jacquard-oauth", - "log", - "memchr 2.7.6", - "miette 7.6.0", - "minijinja", - "minimal-lexical", - "nom 7.1.3", - "num-traits", - "p384", - "percent-encoding", - "rand 0.8.5", - "regex-automata", - "reqwest", - "sec1", - "serde_json", - "sha2", - "smallvec", - "subtle", - "syn 2.0.108", - "syntect", - "time", - "tokio", - "tokio-util", - "toml 0.8.23", - "tower-http", - "tracing", - "tracing-core", - "uuid", - "winnow 0.7.13", - "zerocopy", - "zeroize", ] [[package]] @@ -8599,6 +8811,22 @@ dependencies = [ "web-sys", ] +[[package]] +name = "webbrowser" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00f1243ef785213e3a32fa0396093424a3a6ea566f9948497e5a2309261a4c97" +dependencies = [ + "core-foundation 0.10.1", + "jni", + "log", + "ndk-context", + "objc2", + "objc2-foundation", + "url", + "web-sys", +] + [[package]] name = "webkit2gtk" version = "2.0.1" @@ -8666,16 +8894,16 @@ dependencies = [ [[package]] name = "webview2-com" -version = "0.33.0" +version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f61ff3d9d0ee4efcb461b14eb3acfda2702d10dc329f339303fc3e57215ae2c" +checksum = "d4ba622a989277ef3886dd5afb3e280e3dd6d974b766118950a08f8f678ad6a4" dependencies = [ "webview2-com-macros", "webview2-com-sys", - "windows 0.58.0", - "windows-core 0.58.0", - "windows-implement 0.58.0", - "windows-interface 0.58.0", + "windows", + "windows-core 0.61.2", + "windows-implement", + "windows-interface", ] [[package]] @@ -8691,13 +8919,13 @@ dependencies = [ [[package]] name = "webview2-com-sys" -version = "0.33.0" +version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3a3e2eeb58f82361c93f9777014668eb3d07e7d174ee4c819575a9208011886" +checksum = "36695906a1b53a3bf5c4289621efedac12b73eeb0b89e7e1a89b517302d5d75c" dependencies = [ - "thiserror 1.0.69", - "windows 0.58.0", - "windows-core 0.58.0", + "thiserror 2.0.17", + "windows", + "windows-core 0.61.2", ] [[package]] @@ -8748,16 +8976,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "windows" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" -dependencies = [ - "windows-core 0.58.0", - "windows-targets 0.52.6", -] - [[package]] name = "windows" version = "0.61.3" @@ -8780,27 +8998,14 @@ dependencies = [ "windows-core 0.61.2", ] -[[package]] -name = "windows-core" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" -dependencies = [ - "windows-implement 0.58.0", - "windows-interface 0.58.0", - "windows-result 0.2.0", - "windows-strings 0.1.0", - "windows-targets 0.52.6", -] - [[package]] name = "windows-core" version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" dependencies = [ - "windows-implement 0.60.2", - "windows-interface 0.59.3", + "windows-implement", + "windows-interface", "windows-link 0.1.3", "windows-result 0.3.4", "windows-strings 0.4.2", @@ -8812,8 +9017,8 @@ version = "0.62.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" dependencies = [ - "windows-implement 0.60.2", - "windows-interface 0.59.3", + "windows-implement", + "windows-interface", "windows-link 0.2.1", "windows-result 0.4.1", "windows-strings 0.5.1", @@ -8830,17 +9035,6 @@ dependencies = [ "windows-threading", ] -[[package]] -name = "windows-implement" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.108", -] - [[package]] name = "windows-implement" version = "0.60.2" @@ -8852,17 +9046,6 @@ dependencies = [ "syn 2.0.108", ] -[[package]] -name = "windows-interface" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.108", -] - [[package]] name = "windows-interface" version = "0.59.3" @@ -8907,15 +9090,6 @@ dependencies = [ "windows-strings 0.4.2", ] -[[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-result" version = "0.3.4" @@ -8934,16 +9108,6 @@ dependencies = [ "windows-link 0.2.1", ] -[[package]] -name = "windows-strings" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" -dependencies = [ - "windows-result 0.2.0", - "windows-targets 0.52.6", -] - [[package]] name = "windows-strings" version = "0.4.2" @@ -9283,7 +9447,7 @@ version = "0.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" dependencies = [ - "memchr 2.7.6", + "memchr", ] [[package]] @@ -9292,7 +9456,7 @@ version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf" dependencies = [ - "memchr 2.7.6", + "memchr", ] [[package]] @@ -9301,7 +9465,7 @@ version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ - "cfg-if 1.0.4", + "cfg-if", "windows-sys 0.48.0", ] @@ -9319,42 +9483,45 @@ checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" [[package]] name = "wry" -version = "0.45.0" +version = "0.53.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac0099a336829fbf54c26b5f620c68980ebbe37196772aeaf6118df4931b5cb0" +checksum = "728b7d4c8ec8d81cab295e0b5b8a4c263c0d41a785fb8f8c4df284e5411140a2" dependencies = [ "base64 0.22.1", - "block", - "cocoa 0.26.1", - "core-graphics 0.24.0", + "block2", + "cookie", "crossbeam-channel", + "dirs", "dpi", "dunce", - "gdkx11", "gtk", - "html5ever 0.26.0", + "html5ever 0.29.1", "http", "javascriptcore-rs", "jni", "kuchikiki", "libc", "ndk", - "objc", - "objc_id", + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-foundation", + "objc2-ui-kit", + "objc2-web-kit", "once_cell", "percent-encoding", "raw-window-handle 0.6.2", "sha2", "soup3", "tao-macros", - "thiserror 1.0.69", + "thiserror 2.0.17", + "url", "webkit2gtk", "webkit2gtk-sys", "webview2-com", - "windows 0.58.0", - "windows-core 0.58.0", + "windows", + "windows-core 0.61.2", "windows-version", - "x11-dl", ] [[package]] @@ -9379,15 +9546,28 @@ dependencies = [ ] [[package]] -name = "xdg-home" -version = "1.3.0" +name = "x11rb" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec1cdab258fb55c0da61328dc52c8764709b249011b2cad0454c72f0bf10a1f6" +checksum = "9993aa5be5a26815fe2c3eacfc1fde061fc1a1f094bf1ad2a18bf9c495dd7414" dependencies = [ - "libc", - "windows-sys 0.59.0", + "gethostname", + "rustix", + "x11rb-protocol", ] +[[package]] +name = "x11rb-protocol" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea6fc2961e4ef194dcbfe56bb845534d0dc8098940c7e5c012a258bfec6701bd" + +[[package]] +name = "xkeysym" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9cc00251562a284751c9973bace760d86c0276c471b4be569fe6b068ee97a56" + [[package]] name = "xml5ever" version = "0.18.1" @@ -9456,32 +9636,28 @@ dependencies = [ [[package]] name = "zbus" -version = "4.4.0" +version = "5.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb97012beadd29e654708a0fdb4c84bc046f537aecfde2c3ee0a9e4b4d48c725" +checksum = "b622b18155f7a93d1cd2dc8c01d2d6a44e08fb9ebb7b3f9e6ed101488bad6c91" dependencies = [ "async-broadcast", - "async-process", "async-recursion", "async-trait", "enumflags2", "event-listener", "futures-core", - "futures-sink", - "futures-util", + "futures-lite", "hex", "nix", "ordered-stream", - "rand 0.8.5", "serde", "serde_repr", - "sha1", - "static_assertions", "tokio", "tracing", "uds_windows", - "windows-sys 0.52.0", - "xdg-home", + "uuid", + "windows-sys 0.61.2", + "winnow 0.7.13", "zbus_macros", "zbus_names", "zvariant", @@ -9489,25 +9665,28 @@ dependencies = [ [[package]] name = "zbus_macros" -version = "4.4.0" +version = "5.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "267db9407081e90bbfa46d841d3cbc60f59c0351838c4bc65199ecd79ab1983e" +checksum = "1cdb94821ca8a87ca9c298b5d1cbd80e2a8b67115d99f6e4551ac49e42b6a314" dependencies = [ "proc-macro-crate 3.4.0", "proc-macro2", "quote", "syn 2.0.108", + "zbus_names", + "zvariant", "zvariant_utils", ] [[package]] name = "zbus_names" -version = "3.0.0" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b9b1fef7d021261cc16cba64c351d291b715febe0fa10dc3a443ac5a5022e6c" +checksum = "7be68e64bf6ce8db94f63e72f0c7eb9a60d733f7e0499e628dfab0f84d6bcb97" dependencies = [ "serde", "static_assertions", + "winnow 0.7.13", "zvariant", ] @@ -9636,23 +9815,24 @@ dependencies = [ [[package]] name = "zvariant" -version = "4.2.0" +version = "5.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2084290ab9a1c471c38fc524945837734fbf124487e105daec2bb57fd48c81fe" +checksum = "2be61892e4f2b1772727be11630a62664a1826b62efa43a6fe7449521cb8744c" dependencies = [ "endi", "enumflags2", "serde", - "static_assertions", "url", + "winnow 0.7.13", "zvariant_derive", + "zvariant_utils", ] [[package]] name = "zvariant_derive" -version = "4.2.0" +version = "5.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73e2ba546bda683a90652bac4a279bc146adad1386f25379cf73200d2002c449" +checksum = "da58575a1b2b20766513b1ec59d8e2e68db2745379f961f86650655e862d2006" dependencies = [ "proc-macro-crate 3.4.0", "proc-macro2", @@ -9663,11 +9843,13 @@ dependencies = [ [[package]] name = "zvariant_utils" -version = "2.1.0" +version = "3.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c51bcff7cc3dbb5055396bcf774748c3dab426b4b8659046963523cee4808340" +checksum = "c6949d142f89f6916deca2232cf26a8afacf2b9fdc35ce766105e104478be599" dependencies = [ "proc-macro2", "quote", + "serde", "syn 2.0.108", + "winnow 0.7.13", ] diff --git a/Cargo.toml b/Cargo.toml index dad8d50..7dde3db 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ resolver = "2" # paths because the flake.nix is written in a way such that top-level members # (`weaver-cli` and `weaver-server`) are built as different derivations which avoid being # rebuilt if the other package's sources change. -members = ["crates/*", "crates/weaver-server"] +members = ["crates/*", "crates/weaver-server", "crates/weaver-server"] #default-members = ["crates/weaver-cli"] @@ -39,10 +39,9 @@ lexicon_cid = { package = "cid", version = "0.10.1", features = [ markdown-weaver = { git = "https://github.com/rsform/markdown-weaver" } markdown-weaver-escape = { git = "https://github.com/rsform/markdown-weaver" } -jacquard = { git = "https://tangled.org/@nonbinary.computer/jacquard", default-features = false, features = ["derive", "api_bluesky", "dns"] } +jacquard = { git = "https://tangled.org/@nonbinary.computer/jacquard", default-features = false, features = ["derive", "api_bluesky"] } jacquard-api = { git = "https://tangled.org/@nonbinary.computer/jacquard" } jacquard-axum = { git = "https://tangled.org/@nonbinary.computer/jacquard" } -tree_magic = { version = "0.2.3", features = ["cli"] } [profile] diff --git a/crates/weaver-api/lexicons/sh_weaver_notebook_chapter.json b/crates/weaver-api/lexicons/sh_weaver_notebook_chapter.json index 23d86f5..7f38bc3 100644 --- a/crates/weaver-api/lexicons/sh_weaver_notebook_chapter.json +++ b/crates/weaver-api/lexicons/sh_weaver_notebook_chapter.json @@ -4,7 +4,7 @@ "defs": { "main": { "type": "record", - "description": "A grouping of entries in a notebook, intended to be displayed as a single page.", + "description": "A grouping of entries in a notebook.", "key": "tid", "record": { "type": "object", @@ -14,6 +14,13 @@ "entryList" ], "properties": { + "authors": { + "type": "array", + "items": { + "type": "ref", + "ref": "sh.weaver.actor.defs#author" + } + }, "createdAt": { "type": "string", "description": "Client-declared timestamp when this was originally created.", @@ -28,7 +35,7 @@ }, "notebook": { "type": "ref", - "description": "The notebook this page belongs to.", + "description": "The notebook this chapter belongs to.", "ref": "com.atproto.repo.strongRef" }, "tags": { diff --git a/crates/weaver-api/lexicons/sh_weaver_notebook_defs.json b/crates/weaver-api/lexicons/sh_weaver_notebook_defs.json index e9302c6..2085a9b 100644 --- a/crates/weaver-api/lexicons/sh_weaver_notebook_defs.json +++ b/crates/weaver-api/lexicons/sh_weaver_notebook_defs.json @@ -5,14 +5,10 @@ "authorListView": { "type": "object", "required": [ - "profile", + "record", "index" ], "properties": { - "cid": { - "type": "string", - "format": "cid" - }, "index": { "type": "integer" }, @@ -84,14 +80,17 @@ "required": [ "uri", "cid", - "author", + "authors", "record", "indexedAt" ], "properties": { "authors": { - "type": "ref", - "ref": "#authorListView" + "type": "array", + "items": { + "type": "ref", + "ref": "#authorListView" + } }, "cid": { "type": "string", @@ -127,14 +126,17 @@ "required": [ "uri", "cid", - "author", + "authors", "record", "indexedAt" ], "properties": { "authors": { - "type": "ref", - "ref": "#authorListView" + "type": "array", + "items": { + "type": "ref", + "ref": "#authorListView" + } }, "cid": { "type": "string", diff --git a/crates/weaver-api/lexicons/sh_weaver_notebook_page.json b/crates/weaver-api/lexicons/sh_weaver_notebook_page.json new file mode 100644 index 0000000..ee87933 --- /dev/null +++ b/crates/weaver-api/lexicons/sh_weaver_notebook_page.json @@ -0,0 +1,46 @@ +{ + "lexicon": 1, + "id": "sh.weaver.notebook.page", + "defs": { + "main": { + "type": "record", + "description": "A grouping of entries in a notebook, intended to be displayed as a single page.", + "key": "tid", + "record": { + "type": "object", + "required": [ + "notebook", + "authors", + "entryList" + ], + "properties": { + "createdAt": { + "type": "string", + "description": "Client-declared timestamp when this was originally created.", + "format": "datetime" + }, + "entryList": { + "type": "array", + "items": { + "type": "ref", + "ref": "com.atproto.repo.strongRef" + } + }, + "notebook": { + "type": "ref", + "description": "The notebook this page belongs to.", + "ref": "com.atproto.repo.strongRef" + }, + "tags": { + "type": "ref", + "ref": "sh.weaver.notebook.defs#tags" + }, + "title": { + "type": "ref", + "ref": "sh.weaver.notebook.defs#title" + } + } + } + } + } +} \ No newline at end of file diff --git a/crates/weaver-api/src/sh_weaver/notebook.rs b/crates/weaver-api/src/sh_weaver/notebook.rs index 50caafe..1be79d5 100644 --- a/crates/weaver-api/src/sh_weaver/notebook.rs +++ b/crates/weaver-api/src/sh_weaver/notebook.rs @@ -9,6 +9,7 @@ pub mod authors; pub mod book; pub mod chapter; pub mod entry; +pub mod page; #[jacquard_derive::lexicon] #[derive( @@ -22,13 +23,9 @@ pub mod entry; )] #[serde(rename_all = "camelCase")] pub struct AuthorListView<'a> { - #[serde(skip_serializing_if = "std::option::Option::is_none")] - #[serde(borrow)] - pub cid: Option>, pub index: i64, - #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] - pub record: Option>, + pub record: jacquard_common::types::value::Data<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub uri: Option>, @@ -44,35 +41,35 @@ pub mod author_list_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Profile; + type Record; type Index; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Profile = Unset; + type Record = Unset; type Index = Unset; } - ///State transition - sets the `profile` field to Set - pub struct SetProfile(PhantomData S>); - impl sealed::Sealed for SetProfile {} - impl State for SetProfile { - type Profile = Set; + ///State transition - sets the `record` field to Set + pub struct SetRecord(PhantomData S>); + impl sealed::Sealed for SetRecord {} + impl State for SetRecord { + type Record = Set; type Index = S::Index; } ///State transition - sets the `index` field to Set pub struct SetIndex(PhantomData S>); impl sealed::Sealed for SetIndex {} impl State for SetIndex { - type Profile = S::Profile; + type Record = S::Record; type Index = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `profile` field - pub struct profile(()); + ///Marker type for the `record` field + pub struct record(()); ///Marker type for the `index` field pub struct index(()); } @@ -82,7 +79,6 @@ pub mod author_list_view_state { pub struct AuthorListViewBuilder<'a, S: author_list_view_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( - ::core::option::Option>, ::core::option::Option, ::core::option::Option>, ::core::option::Option>, @@ -102,31 +98,12 @@ impl<'a> AuthorListViewBuilder<'a, author_list_view_state::Empty> { pub fn new() -> Self { AuthorListViewBuilder { _phantom_state: ::core::marker::PhantomData, - __unsafe_private_named: (None, None, None, None), + __unsafe_private_named: (None, None, None), _phantom: ::core::marker::PhantomData, } } } -impl<'a, S: author_list_view_state::State> AuthorListViewBuilder<'a, S> { - /// Set the `cid` field (optional) - pub fn cid( - mut self, - value: impl Into>>, - ) -> Self { - self.__unsafe_private_named.0 = value.into(); - self - } - /// Set the `cid` field to an Option value (optional) - pub fn maybe_cid( - mut self, - value: Option>, - ) -> Self { - self.__unsafe_private_named.0 = value; - self - } -} - impl<'a, S> AuthorListViewBuilder<'a, S> where S: author_list_view_state::State, @@ -137,7 +114,7 @@ where mut self, value: impl Into, ) -> AuthorListViewBuilder<'a, author_list_view_state::SetIndex> { - self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); + self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); AuthorListViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, @@ -146,22 +123,22 @@ where } } -impl<'a, S: author_list_view_state::State> AuthorListViewBuilder<'a, S> { - /// Set the `record` field (optional) +impl<'a, S> AuthorListViewBuilder<'a, S> +where + S: author_list_view_state::State, + S::Record: author_list_view_state::IsUnset, +{ + /// Set the `record` field (required) pub fn record( mut self, - value: impl Into>>, - ) -> Self { - self.__unsafe_private_named.2 = value.into(); - self - } - /// Set the `record` field to an Option value (optional) - pub fn maybe_record( - mut self, - value: Option>, - ) -> Self { - self.__unsafe_private_named.2 = value; - self + value: impl Into>, + ) -> AuthorListViewBuilder<'a, author_list_view_state::SetRecord> { + self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); + AuthorListViewBuilder { + _phantom_state: ::core::marker::PhantomData, + __unsafe_private_named: self.__unsafe_private_named, + _phantom: ::core::marker::PhantomData, + } } } @@ -171,7 +148,7 @@ impl<'a, S: author_list_view_state::State> AuthorListViewBuilder<'a, S> { mut self, value: impl Into>>, ) -> Self { - self.__unsafe_private_named.3 = value.into(); + self.__unsafe_private_named.2 = value.into(); self } /// Set the `uri` field to an Option value (optional) @@ -179,7 +156,7 @@ impl<'a, S: author_list_view_state::State> AuthorListViewBuilder<'a, S> { mut self, value: Option>, ) -> Self { - self.__unsafe_private_named.3 = value; + self.__unsafe_private_named.2 = value; self } } @@ -187,16 +164,15 @@ impl<'a, S: author_list_view_state::State> AuthorListViewBuilder<'a, S> { impl<'a, S> AuthorListViewBuilder<'a, S> where S: author_list_view_state::State, - S::Profile: author_list_view_state::IsSet, + S::Record: author_list_view_state::IsSet, S::Index: author_list_view_state::IsSet, { /// Build the final struct pub fn build(self) -> AuthorListView<'a> { AuthorListView { - cid: self.__unsafe_private_named.0, - index: self.__unsafe_private_named.1.unwrap(), - record: self.__unsafe_private_named.2, - uri: self.__unsafe_private_named.3, + index: self.__unsafe_private_named.0.unwrap(), + record: self.__unsafe_private_named.1.unwrap(), + uri: self.__unsafe_private_named.2, extra_data: Default::default(), } } @@ -209,10 +185,9 @@ where >, ) -> AuthorListView<'a> { AuthorListView { - cid: self.__unsafe_private_named.0, - index: self.__unsafe_private_named.1.unwrap(), - record: self.__unsafe_private_named.2, - uri: self.__unsafe_private_named.3, + index: self.__unsafe_private_named.0.unwrap(), + record: self.__unsafe_private_named.1.unwrap(), + uri: self.__unsafe_private_named.2, extra_data: Some(extra_data), } } @@ -234,7 +209,7 @@ fn lexicon_doc_sh_weaver_notebook_defs() -> ::jacquard_lexicon::lexicon::Lexicon description: None, required: Some( vec![ - ::jacquard_common::smol_str::SmolStr::new_static("profile"), + ::jacquard_common::smol_str::SmolStr::new_static("record"), ::jacquard_common::smol_str::SmolStr::new_static("index") ], ), @@ -242,23 +217,6 @@ fn lexicon_doc_sh_weaver_notebook_defs() -> ::jacquard_lexicon::lexicon::Lexicon properties: { #[allow(unused_mut)] let mut map = ::std::collections::BTreeMap::new(); - map.insert( - ::jacquard_common::smol_str::SmolStr::new_static("cid"), - ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { - description: None, - format: Some( - ::jacquard_lexicon::lexicon::LexStringFormat::Cid, - ), - default: None, - min_length: None, - max_length: None, - min_graphemes: None, - max_graphemes: None, - r#enum: None, - r#const: None, - known_values: None, - }), - ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("index"), ::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger { @@ -421,7 +379,7 @@ fn lexicon_doc_sh_weaver_notebook_defs() -> ::jacquard_lexicon::lexicon::Lexicon vec![ ::jacquard_common::smol_str::SmolStr::new_static("uri"), ::jacquard_common::smol_str::SmolStr::new_static("cid"), - ::jacquard_common::smol_str::SmolStr::new_static("author"), + ::jacquard_common::smol_str::SmolStr::new_static("authors"), ::jacquard_common::smol_str::SmolStr::new_static("record"), ::jacquard_common::smol_str::SmolStr::new_static("indexedAt") ], @@ -432,11 +390,16 @@ fn lexicon_doc_sh_weaver_notebook_defs() -> ::jacquard_lexicon::lexicon::Lexicon let mut map = ::std::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("authors"), - ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { + ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { description: None, - r#ref: ::jacquard_common::CowStr::new_static( - "#authorListView", - ), + items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef { + description: None, + r#ref: ::jacquard_common::CowStr::new_static( + "#authorListView", + ), + }), + min_length: None, + max_length: None, }), ); map.insert( @@ -535,7 +498,7 @@ fn lexicon_doc_sh_weaver_notebook_defs() -> ::jacquard_lexicon::lexicon::Lexicon vec![ ::jacquard_common::smol_str::SmolStr::new_static("uri"), ::jacquard_common::smol_str::SmolStr::new_static("cid"), - ::jacquard_common::smol_str::SmolStr::new_static("author"), + ::jacquard_common::smol_str::SmolStr::new_static("authors"), ::jacquard_common::smol_str::SmolStr::new_static("record"), ::jacquard_common::smol_str::SmolStr::new_static("indexedAt") ], @@ -546,11 +509,16 @@ fn lexicon_doc_sh_weaver_notebook_defs() -> ::jacquard_lexicon::lexicon::Lexicon let mut map = ::std::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("authors"), - ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { + ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { description: None, - r#ref: ::jacquard_common::CowStr::new_static( - "#authorListView", - ), + items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef { + description: None, + r#ref: ::jacquard_common::CowStr::new_static( + "#authorListView", + ), + }), + min_length: None, + max_length: None, }), ); map.insert( @@ -1138,9 +1106,8 @@ impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ContentFormat<'a> { )] #[serde(rename_all = "camelCase")] pub struct EntryView<'a> { - #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] - pub authors: Option>, + pub authors: Vec>, #[serde(borrow)] pub cid: jacquard_common::types::string::Cid<'a>, pub indexed_at: jacquard_common::types::string::Datetime, @@ -1171,7 +1138,7 @@ pub mod entry_view_state { pub trait State: sealed::Sealed { type Uri; type Cid; - type Author; + type Authors; type Record; type IndexedAt; } @@ -1181,7 +1148,7 @@ pub mod entry_view_state { impl State for Empty { type Uri = Unset; type Cid = Unset; - type Author = Unset; + type Authors = Unset; type Record = Unset; type IndexedAt = Unset; } @@ -1191,7 +1158,7 @@ pub mod entry_view_state { impl State for SetUri { type Uri = Set; type Cid = S::Cid; - type Author = S::Author; + type Authors = S::Authors; type Record = S::Record; type IndexedAt = S::IndexedAt; } @@ -1201,17 +1168,17 @@ pub mod entry_view_state { impl State for SetCid { type Uri = S::Uri; type Cid = Set; - type Author = S::Author; + type Authors = S::Authors; type Record = S::Record; type IndexedAt = S::IndexedAt; } - ///State transition - sets the `author` field to Set - pub struct SetAuthor(PhantomData S>); - impl sealed::Sealed for SetAuthor {} - impl State for SetAuthor { + ///State transition - sets the `authors` field to Set + pub struct SetAuthors(PhantomData S>); + impl sealed::Sealed for SetAuthors {} + impl State for SetAuthors { type Uri = S::Uri; type Cid = S::Cid; - type Author = Set; + type Authors = Set; type Record = S::Record; type IndexedAt = S::IndexedAt; } @@ -1221,7 +1188,7 @@ pub mod entry_view_state { impl State for SetRecord { type Uri = S::Uri; type Cid = S::Cid; - type Author = S::Author; + type Authors = S::Authors; type Record = Set; type IndexedAt = S::IndexedAt; } @@ -1231,7 +1198,7 @@ pub mod entry_view_state { impl State for SetIndexedAt { type Uri = S::Uri; type Cid = S::Cid; - type Author = S::Author; + type Authors = S::Authors; type Record = S::Record; type IndexedAt = Set; } @@ -1242,8 +1209,8 @@ pub mod entry_view_state { pub struct uri(()); ///Marker type for the `cid` field pub struct cid(()); - ///Marker type for the `author` field - pub struct author(()); + ///Marker type for the `authors` field + pub struct authors(()); ///Marker type for the `record` field pub struct record(()); ///Marker type for the `indexed_at` field @@ -1255,7 +1222,7 @@ pub mod entry_view_state { pub struct EntryViewBuilder<'a, S: entry_view_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( - ::core::option::Option>, + ::core::option::Option>>, ::core::option::Option>, ::core::option::Option, ::core::option::Option>, @@ -1285,22 +1252,22 @@ impl<'a> EntryViewBuilder<'a, entry_view_state::Empty> { } } -impl<'a, S: entry_view_state::State> EntryViewBuilder<'a, S> { - /// Set the `authors` field (optional) +impl<'a, S> EntryViewBuilder<'a, S> +where + S: entry_view_state::State, + S::Authors: entry_view_state::IsUnset, +{ + /// Set the `authors` field (required) pub fn authors( mut self, - value: impl Into>>, - ) -> Self { - self.__unsafe_private_named.0 = value.into(); - self - } - /// Set the `authors` field to an Option value (optional) - pub fn maybe_authors( - mut self, - value: Option>, - ) -> Self { - self.__unsafe_private_named.0 = value; - self + value: impl Into>>, + ) -> EntryViewBuilder<'a, entry_view_state::SetAuthors> { + self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); + EntryViewBuilder { + _phantom_state: ::core::marker::PhantomData, + __unsafe_private_named: self.__unsafe_private_named, + _phantom: ::core::marker::PhantomData, + } } } @@ -1442,14 +1409,14 @@ where S: entry_view_state::State, S::Uri: entry_view_state::IsSet, S::Cid: entry_view_state::IsSet, - S::Author: entry_view_state::IsSet, + S::Authors: entry_view_state::IsSet, S::Record: entry_view_state::IsSet, S::IndexedAt: entry_view_state::IsSet, { /// Build the final struct pub fn build(self) -> EntryView<'a> { EntryView { - authors: self.__unsafe_private_named.0, + authors: self.__unsafe_private_named.0.unwrap(), cid: self.__unsafe_private_named.1.unwrap(), indexed_at: self.__unsafe_private_named.2.unwrap(), record: self.__unsafe_private_named.3.unwrap(), @@ -1469,7 +1436,7 @@ where >, ) -> EntryView<'a> { EntryView { - authors: self.__unsafe_private_named.0, + authors: self.__unsafe_private_named.0.unwrap(), cid: self.__unsafe_private_named.1.unwrap(), indexed_at: self.__unsafe_private_named.2.unwrap(), record: self.__unsafe_private_named.3.unwrap(), @@ -1511,9 +1478,8 @@ impl<'a> ::jacquard_lexicon::schema::LexiconSchema for EntryView<'a> { )] #[serde(rename_all = "camelCase")] pub struct NotebookView<'a> { - #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] - pub authors: Option>, + pub authors: Vec>, #[serde(borrow)] pub cid: jacquard_common::types::string::Cid<'a>, pub indexed_at: jacquard_common::types::string::Datetime, @@ -1541,7 +1507,7 @@ pub mod notebook_view_state { pub trait State: sealed::Sealed { type Uri; type Cid; - type Author; + type Authors; type Record; type IndexedAt; } @@ -1551,7 +1517,7 @@ pub mod notebook_view_state { impl State for Empty { type Uri = Unset; type Cid = Unset; - type Author = Unset; + type Authors = Unset; type Record = Unset; type IndexedAt = Unset; } @@ -1561,7 +1527,7 @@ pub mod notebook_view_state { impl State for SetUri { type Uri = Set; type Cid = S::Cid; - type Author = S::Author; + type Authors = S::Authors; type Record = S::Record; type IndexedAt = S::IndexedAt; } @@ -1571,17 +1537,17 @@ pub mod notebook_view_state { impl State for SetCid { type Uri = S::Uri; type Cid = Set; - type Author = S::Author; + type Authors = S::Authors; type Record = S::Record; type IndexedAt = S::IndexedAt; } - ///State transition - sets the `author` field to Set - pub struct SetAuthor(PhantomData S>); - impl sealed::Sealed for SetAuthor {} - impl State for SetAuthor { + ///State transition - sets the `authors` field to Set + pub struct SetAuthors(PhantomData S>); + impl sealed::Sealed for SetAuthors {} + impl State for SetAuthors { type Uri = S::Uri; type Cid = S::Cid; - type Author = Set; + type Authors = Set; type Record = S::Record; type IndexedAt = S::IndexedAt; } @@ -1591,7 +1557,7 @@ pub mod notebook_view_state { impl State for SetRecord { type Uri = S::Uri; type Cid = S::Cid; - type Author = S::Author; + type Authors = S::Authors; type Record = Set; type IndexedAt = S::IndexedAt; } @@ -1601,7 +1567,7 @@ pub mod notebook_view_state { impl State for SetIndexedAt { type Uri = S::Uri; type Cid = S::Cid; - type Author = S::Author; + type Authors = S::Authors; type Record = S::Record; type IndexedAt = Set; } @@ -1612,8 +1578,8 @@ pub mod notebook_view_state { pub struct uri(()); ///Marker type for the `cid` field pub struct cid(()); - ///Marker type for the `author` field - pub struct author(()); + ///Marker type for the `authors` field + pub struct authors(()); ///Marker type for the `record` field pub struct record(()); ///Marker type for the `indexed_at` field @@ -1625,7 +1591,7 @@ pub mod notebook_view_state { pub struct NotebookViewBuilder<'a, S: notebook_view_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( - ::core::option::Option>, + ::core::option::Option>>, ::core::option::Option>, ::core::option::Option, ::core::option::Option>, @@ -1654,22 +1620,22 @@ impl<'a> NotebookViewBuilder<'a, notebook_view_state::Empty> { } } -impl<'a, S: notebook_view_state::State> NotebookViewBuilder<'a, S> { - /// Set the `authors` field (optional) +impl<'a, S> NotebookViewBuilder<'a, S> +where + S: notebook_view_state::State, + S::Authors: notebook_view_state::IsUnset, +{ + /// Set the `authors` field (required) pub fn authors( mut self, - value: impl Into>>, - ) -> Self { - self.__unsafe_private_named.0 = value.into(); - self - } - /// Set the `authors` field to an Option value (optional) - pub fn maybe_authors( - mut self, - value: Option>, - ) -> Self { - self.__unsafe_private_named.0 = value; - self + value: impl Into>>, + ) -> NotebookViewBuilder<'a, notebook_view_state::SetAuthors> { + self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); + NotebookViewBuilder { + _phantom_state: ::core::marker::PhantomData, + __unsafe_private_named: self.__unsafe_private_named, + _phantom: ::core::marker::PhantomData, + } } } @@ -1792,14 +1758,14 @@ where S: notebook_view_state::State, S::Uri: notebook_view_state::IsSet, S::Cid: notebook_view_state::IsSet, - S::Author: notebook_view_state::IsSet, + S::Authors: notebook_view_state::IsSet, S::Record: notebook_view_state::IsSet, S::IndexedAt: notebook_view_state::IsSet, { /// Build the final struct pub fn build(self) -> NotebookView<'a> { NotebookView { - authors: self.__unsafe_private_named.0, + authors: self.__unsafe_private_named.0.unwrap(), cid: self.__unsafe_private_named.1.unwrap(), indexed_at: self.__unsafe_private_named.2.unwrap(), record: self.__unsafe_private_named.3.unwrap(), @@ -1818,7 +1784,7 @@ where >, ) -> NotebookView<'a> { NotebookView { - authors: self.__unsafe_private_named.0, + authors: self.__unsafe_private_named.0.unwrap(), cid: self.__unsafe_private_named.1.unwrap(), indexed_at: self.__unsafe_private_named.2.unwrap(), record: self.__unsafe_private_named.3.unwrap(), diff --git a/crates/weaver-api/src/sh_weaver/notebook/chapter.rs b/crates/weaver-api/src/sh_weaver/notebook/chapter.rs index 3fc6012..52030b6 100644 --- a/crates/weaver-api/src/sh_weaver/notebook/chapter.rs +++ b/crates/weaver-api/src/sh_weaver/notebook/chapter.rs @@ -5,7 +5,7 @@ // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. -/// A grouping of entries in a notebook, intended to be displayed as a single page. +/// A grouping of entries in a notebook. #[jacquard_derive::lexicon] #[derive( serde::Serialize, @@ -18,12 +18,14 @@ )] #[serde(rename_all = "camelCase")] pub struct Chapter<'a> { + #[serde(borrow)] + pub authors: Vec>, /// Client-declared timestamp when this was originally created. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub created_at: Option, #[serde(borrow)] pub entry_list: Vec>, - /// The notebook this page belongs to. + /// The notebook this chapter belongs to. #[serde(borrow)] pub notebook: crate::com_atproto::repo::strong_ref::StrongRef<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] @@ -96,6 +98,7 @@ pub mod chapter_state { pub struct ChapterBuilder<'a, S: chapter_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( + ::core::option::Option>>, ::core::option::Option, ::core::option::Option>>, ::core::option::Option>, @@ -117,7 +120,26 @@ impl<'a> ChapterBuilder<'a, chapter_state::Empty> { pub fn new() -> Self { ChapterBuilder { _phantom_state: ::core::marker::PhantomData, - __unsafe_private_named: (None, None, None, None, None), + __unsafe_private_named: (None, None, None, None, None, None), + _phantom: ::core::marker::PhantomData, + } + } +} + +impl<'a, S> ChapterBuilder<'a, S> +where + S: chapter_state::State, + S::Authors: chapter_state::IsUnset, +{ + /// Set the `authors` field (required) + pub fn authors( + mut self, + value: impl Into>>, + ) -> ChapterBuilder<'a, chapter_state::SetAuthors> { + self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); + ChapterBuilder { + _phantom_state: ::core::marker::PhantomData, + __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } @@ -129,7 +151,7 @@ impl<'a, S: chapter_state::State> ChapterBuilder<'a, S> { mut self, value: impl Into>, ) -> Self { - self.__unsafe_private_named.0 = value.into(); + self.__unsafe_private_named.1 = value.into(); self } /// Set the `createdAt` field to an Option value (optional) @@ -137,7 +159,7 @@ impl<'a, S: chapter_state::State> ChapterBuilder<'a, S> { mut self, value: Option, ) -> Self { - self.__unsafe_private_named.0 = value; + self.__unsafe_private_named.1 = value; self } } @@ -152,7 +174,7 @@ where mut self, value: impl Into>>, ) -> ChapterBuilder<'a, chapter_state::SetEntryList> { - self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); + self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into()); ChapterBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, @@ -171,7 +193,7 @@ where mut self, value: impl Into>, ) -> ChapterBuilder<'a, chapter_state::SetNotebook> { - self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into()); + self.__unsafe_private_named.3 = ::core::option::Option::Some(value.into()); ChapterBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, @@ -186,7 +208,7 @@ impl<'a, S: chapter_state::State> ChapterBuilder<'a, S> { mut self, value: impl Into>>, ) -> Self { - self.__unsafe_private_named.3 = value.into(); + self.__unsafe_private_named.4 = value.into(); self } /// Set the `tags` field to an Option value (optional) @@ -194,7 +216,7 @@ impl<'a, S: chapter_state::State> ChapterBuilder<'a, S> { mut self, value: Option>, ) -> Self { - self.__unsafe_private_named.3 = value; + self.__unsafe_private_named.4 = value; self } } @@ -205,7 +227,7 @@ impl<'a, S: chapter_state::State> ChapterBuilder<'a, S> { mut self, value: impl Into>>, ) -> Self { - self.__unsafe_private_named.4 = value.into(); + self.__unsafe_private_named.5 = value.into(); self } /// Set the `title` field to an Option value (optional) @@ -213,7 +235,7 @@ impl<'a, S: chapter_state::State> ChapterBuilder<'a, S> { mut self, value: Option>, ) -> Self { - self.__unsafe_private_named.4 = value; + self.__unsafe_private_named.5 = value; self } } @@ -228,11 +250,12 @@ where /// Build the final struct pub fn build(self) -> Chapter<'a> { Chapter { - created_at: self.__unsafe_private_named.0, - entry_list: self.__unsafe_private_named.1.unwrap(), - notebook: self.__unsafe_private_named.2.unwrap(), - tags: self.__unsafe_private_named.3, - title: self.__unsafe_private_named.4, + authors: self.__unsafe_private_named.0.unwrap(), + created_at: self.__unsafe_private_named.1, + entry_list: self.__unsafe_private_named.2.unwrap(), + notebook: self.__unsafe_private_named.3.unwrap(), + tags: self.__unsafe_private_named.4, + title: self.__unsafe_private_named.5, extra_data: Default::default(), } } @@ -245,11 +268,12 @@ where >, ) -> Chapter<'a> { Chapter { - created_at: self.__unsafe_private_named.0, - entry_list: self.__unsafe_private_named.1.unwrap(), - notebook: self.__unsafe_private_named.2.unwrap(), - tags: self.__unsafe_private_named.3, - title: self.__unsafe_private_named.4, + authors: self.__unsafe_private_named.0.unwrap(), + created_at: self.__unsafe_private_named.1, + entry_list: self.__unsafe_private_named.2.unwrap(), + notebook: self.__unsafe_private_named.3.unwrap(), + tags: self.__unsafe_private_named.4, + title: self.__unsafe_private_named.5, extra_data: Some(extra_data), } } @@ -348,7 +372,7 @@ fn lexicon_doc_sh_weaver_notebook_chapter() -> ::jacquard_lexicon::lexicon::Lexi ::jacquard_lexicon::lexicon::LexUserType::Record(::jacquard_lexicon::lexicon::LexRecord { description: Some( ::jacquard_common::CowStr::new_static( - "A grouping of entries in a notebook, intended to be displayed as a single page.", + "A grouping of entries in a notebook.", ), ), key: Some(::jacquard_common::CowStr::new_static("tid")), @@ -365,6 +389,20 @@ fn lexicon_doc_sh_weaver_notebook_chapter() -> ::jacquard_lexicon::lexicon::Lexi properties: { #[allow(unused_mut)] let mut map = ::std::collections::BTreeMap::new(); + map.insert( + ::jacquard_common::smol_str::SmolStr::new_static("authors"), + ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { + description: None, + items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef { + description: None, + r#ref: ::jacquard_common::CowStr::new_static( + "sh.weaver.actor.defs#author", + ), + }), + min_length: None, + max_length: None, + }), + ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "createdAt", diff --git a/crates/weaver-api/src/sh_weaver/notebook/page.rs b/crates/weaver-api/src/sh_weaver/notebook/page.rs new file mode 100644 index 0000000..3d753ab --- /dev/null +++ b/crates/weaver-api/src/sh_weaver/notebook/page.rs @@ -0,0 +1,444 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: sh.weaver.notebook.page +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +/// A grouping of entries in a notebook, intended to be displayed as a single page. +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic +)] +#[serde(rename_all = "camelCase")] +pub struct Page<'a> { + /// Client-declared timestamp when this was originally created. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub created_at: Option, + #[serde(borrow)] + pub entry_list: Vec>, + /// The notebook this page belongs to. + #[serde(borrow)] + pub notebook: crate::com_atproto::repo::strong_ref::StrongRef<'a>, + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub tags: Option>, + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub title: Option>, +} + +pub mod page_state { + + pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; + #[allow(unused)] + use ::core::marker::PhantomData; + mod sealed { + pub trait Sealed {} + } + /// State trait tracking which required fields have been set + pub trait State: sealed::Sealed { + type Notebook; + type Authors; + type EntryList; + } + /// Empty state - all required fields are unset + pub struct Empty(()); + impl sealed::Sealed for Empty {} + impl State for Empty { + type Notebook = Unset; + type Authors = Unset; + type EntryList = Unset; + } + ///State transition - sets the `notebook` field to Set + pub struct SetNotebook(PhantomData S>); + impl sealed::Sealed for SetNotebook {} + impl State for SetNotebook { + type Notebook = Set; + type Authors = S::Authors; + type EntryList = S::EntryList; + } + ///State transition - sets the `authors` field to Set + pub struct SetAuthors(PhantomData S>); + impl sealed::Sealed for SetAuthors {} + impl State for SetAuthors { + type Notebook = S::Notebook; + type Authors = Set; + type EntryList = S::EntryList; + } + ///State transition - sets the `entry_list` field to Set + pub struct SetEntryList(PhantomData S>); + impl sealed::Sealed for SetEntryList {} + impl State for SetEntryList { + type Notebook = S::Notebook; + type Authors = S::Authors; + type EntryList = Set; + } + /// Marker types for field names + #[allow(non_camel_case_types)] + pub mod members { + ///Marker type for the `notebook` field + pub struct notebook(()); + ///Marker type for the `authors` field + pub struct authors(()); + ///Marker type for the `entry_list` field + pub struct entry_list(()); + } +} + +/// Builder for constructing an instance of this type +pub struct PageBuilder<'a, S: page_state::State> { + _phantom_state: ::core::marker::PhantomData S>, + __unsafe_private_named: ( + ::core::option::Option, + ::core::option::Option>>, + ::core::option::Option>, + ::core::option::Option>, + ::core::option::Option>, + ), + _phantom: ::core::marker::PhantomData<&'a ()>, +} + +impl<'a> Page<'a> { + /// Create a new builder for this type + pub fn new() -> PageBuilder<'a, page_state::Empty> { + PageBuilder::new() + } +} + +impl<'a> PageBuilder<'a, page_state::Empty> { + /// Create a new builder with all fields unset + pub fn new() -> Self { + PageBuilder { + _phantom_state: ::core::marker::PhantomData, + __unsafe_private_named: (None, None, None, None, None), + _phantom: ::core::marker::PhantomData, + } + } +} + +impl<'a, S: page_state::State> PageBuilder<'a, S> { + /// Set the `createdAt` field (optional) + pub fn created_at( + mut self, + value: impl Into>, + ) -> Self { + self.__unsafe_private_named.0 = value.into(); + self + } + /// Set the `createdAt` field to an Option value (optional) + pub fn maybe_created_at( + mut self, + value: Option, + ) -> Self { + self.__unsafe_private_named.0 = value; + self + } +} + +impl<'a, S> PageBuilder<'a, S> +where + S: page_state::State, + S::EntryList: page_state::IsUnset, +{ + /// Set the `entryList` field (required) + pub fn entry_list( + mut self, + value: impl Into>>, + ) -> PageBuilder<'a, page_state::SetEntryList> { + self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); + PageBuilder { + _phantom_state: ::core::marker::PhantomData, + __unsafe_private_named: self.__unsafe_private_named, + _phantom: ::core::marker::PhantomData, + } + } +} + +impl<'a, S> PageBuilder<'a, S> +where + S: page_state::State, + S::Notebook: page_state::IsUnset, +{ + /// Set the `notebook` field (required) + pub fn notebook( + mut self, + value: impl Into>, + ) -> PageBuilder<'a, page_state::SetNotebook> { + self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into()); + PageBuilder { + _phantom_state: ::core::marker::PhantomData, + __unsafe_private_named: self.__unsafe_private_named, + _phantom: ::core::marker::PhantomData, + } + } +} + +impl<'a, S: page_state::State> PageBuilder<'a, S> { + /// Set the `tags` field (optional) + pub fn tags( + mut self, + value: impl Into>>, + ) -> Self { + self.__unsafe_private_named.3 = value.into(); + self + } + /// Set the `tags` field to an Option value (optional) + pub fn maybe_tags( + mut self, + value: Option>, + ) -> Self { + self.__unsafe_private_named.3 = value; + self + } +} + +impl<'a, S: page_state::State> PageBuilder<'a, S> { + /// Set the `title` field (optional) + pub fn title( + mut self, + value: impl Into>>, + ) -> Self { + self.__unsafe_private_named.4 = value.into(); + self + } + /// Set the `title` field to an Option value (optional) + pub fn maybe_title( + mut self, + value: Option>, + ) -> Self { + self.__unsafe_private_named.4 = value; + self + } +} + +impl<'a, S> PageBuilder<'a, S> +where + S: page_state::State, + S::Notebook: page_state::IsSet, + S::Authors: page_state::IsSet, + S::EntryList: page_state::IsSet, +{ + /// Build the final struct + pub fn build(self) -> Page<'a> { + Page { + created_at: self.__unsafe_private_named.0, + entry_list: self.__unsafe_private_named.1.unwrap(), + notebook: self.__unsafe_private_named.2.unwrap(), + tags: self.__unsafe_private_named.3, + title: self.__unsafe_private_named.4, + extra_data: Default::default(), + } + } + /// Build the final struct with custom extra_data + pub fn build_with_data( + self, + extra_data: std::collections::BTreeMap< + jacquard_common::smol_str::SmolStr, + jacquard_common::types::value::Data<'a>, + >, + ) -> Page<'a> { + Page { + created_at: self.__unsafe_private_named.0, + entry_list: self.__unsafe_private_named.1.unwrap(), + notebook: self.__unsafe_private_named.2.unwrap(), + tags: self.__unsafe_private_named.3, + title: self.__unsafe_private_named.4, + extra_data: Some(extra_data), + } + } +} + +impl<'a> Page<'a> { + pub fn uri( + uri: impl Into>, + ) -> Result< + jacquard_common::types::uri::RecordUri<'a, PageRecord>, + jacquard_common::types::uri::UriError, + > { + jacquard_common::types::uri::RecordUri::try_from_uri( + jacquard_common::types::string::AtUri::new_cow(uri.into())?, + ) + } +} + +/// Typed wrapper for GetRecord response with this collection's record type. +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic +)] +#[serde(rename_all = "camelCase")] +pub struct PageGetRecordOutput<'a> { + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub cid: std::option::Option>, + #[serde(borrow)] + pub uri: jacquard_common::types::string::AtUri<'a>, + #[serde(borrow)] + pub value: Page<'a>, +} + +impl From> for Page<'_> { + fn from(output: PageGetRecordOutput<'_>) -> Self { + use jacquard_common::IntoStatic; + output.value.into_static() + } +} + +impl jacquard_common::types::collection::Collection for Page<'_> { + const NSID: &'static str = "sh.weaver.notebook.page"; + type Record = PageRecord; +} + +/// Marker type for deserializing records from this collection. +#[derive(Debug, serde::Serialize, serde::Deserialize)] +pub struct PageRecord; +impl jacquard_common::xrpc::XrpcResp for PageRecord { + const NSID: &'static str = "sh.weaver.notebook.page"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = PageGetRecordOutput<'de>; + type Err<'de> = jacquard_common::types::collection::RecordError<'de>; +} + +impl jacquard_common::types::collection::Collection for PageRecord { + const NSID: &'static str = "sh.weaver.notebook.page"; + type Record = PageRecord; +} + +impl<'a> ::jacquard_lexicon::schema::LexiconSchema for Page<'a> { + fn nsid() -> &'static str { + "sh.weaver.notebook.page" + } + fn def_name() -> &'static str { + "main" + } + fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { + lexicon_doc_sh_weaver_notebook_page() + } + fn validate( + &self, + ) -> ::std::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { + Ok(()) + } +} + +fn lexicon_doc_sh_weaver_notebook_page() -> ::jacquard_lexicon::lexicon::LexiconDoc< + 'static, +> { + ::jacquard_lexicon::lexicon::LexiconDoc { + lexicon: ::jacquard_lexicon::lexicon::Lexicon::Lexicon1, + id: ::jacquard_common::CowStr::new_static("sh.weaver.notebook.page"), + revision: None, + description: None, + defs: { + let mut map = ::std::collections::BTreeMap::new(); + map.insert( + ::jacquard_common::smol_str::SmolStr::new_static("main"), + ::jacquard_lexicon::lexicon::LexUserType::Record(::jacquard_lexicon::lexicon::LexRecord { + description: Some( + ::jacquard_common::CowStr::new_static( + "A grouping of entries in a notebook, intended to be displayed as a single page.", + ), + ), + key: Some(::jacquard_common::CowStr::new_static("tid")), + record: ::jacquard_lexicon::lexicon::LexRecordRecord::Object(::jacquard_lexicon::lexicon::LexObject { + description: None, + required: Some( + vec![ + ::jacquard_common::smol_str::SmolStr::new_static("notebook"), + ::jacquard_common::smol_str::SmolStr::new_static("authors"), + ::jacquard_common::smol_str::SmolStr::new_static("entryList") + ], + ), + nullable: None, + properties: { + #[allow(unused_mut)] + let mut map = ::std::collections::BTreeMap::new(); + map.insert( + ::jacquard_common::smol_str::SmolStr::new_static( + "createdAt", + ), + ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { + description: Some( + ::jacquard_common::CowStr::new_static( + "Client-declared timestamp when this was originally created.", + ), + ), + format: Some( + ::jacquard_lexicon::lexicon::LexStringFormat::Datetime, + ), + default: None, + min_length: None, + max_length: None, + min_graphemes: None, + max_graphemes: None, + r#enum: None, + r#const: None, + known_values: None, + }), + ); + map.insert( + ::jacquard_common::smol_str::SmolStr::new_static( + "entryList", + ), + ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { + description: None, + items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef { + description: None, + r#ref: ::jacquard_common::CowStr::new_static( + "com.atproto.repo.strongRef", + ), + }), + min_length: None, + max_length: None, + }), + ); + map.insert( + ::jacquard_common::smol_str::SmolStr::new_static( + "notebook", + ), + ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { + description: None, + r#ref: ::jacquard_common::CowStr::new_static( + "com.atproto.repo.strongRef", + ), + }), + ); + map.insert( + ::jacquard_common::smol_str::SmolStr::new_static("tags"), + ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { + description: None, + r#ref: ::jacquard_common::CowStr::new_static( + "sh.weaver.notebook.defs#tags", + ), + }), + ); + map.insert( + ::jacquard_common::smol_str::SmolStr::new_static("title"), + ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { + description: None, + r#ref: ::jacquard_common::CowStr::new_static( + "sh.weaver.notebook.defs#title", + ), + }), + ); + map + }, + }), + }), + ); + map + }, + } +} \ No newline at end of file diff --git a/crates/weaver-appview/Cargo.toml b/crates/weaver-appview/Cargo.toml index 26cf110..42aa0b1 100644 --- a/crates/weaver-appview/Cargo.toml +++ b/crates/weaver-appview/Cargo.toml @@ -11,7 +11,6 @@ embedded-db = ["diesel/sqlite", "diesel-async/sync-connection-wrapper"] [dependencies] weaver-common = { path = "../weaver-common", default-features = false } -weaver-workspace-hack = { version = "0.1", path = "../weaver-workspace-hack" } clap = { version = "4.5", features = ["derive", "env", "cargo", "unicode"] } dotenvy = "0.15" diff --git a/crates/weaver-cli/Cargo.toml b/crates/weaver-cli/Cargo.toml index 8b1a135..8ae9493 100644 --- a/crates/weaver-cli/Cargo.toml +++ b/crates/weaver-cli/Cargo.toml @@ -13,10 +13,9 @@ path = "src/main.rs" clap = { version = "4.5", features = ["derive", "env", "cargo", "unicode"] } weaver-common = { path = "../weaver-common", features = ["native"] } weaver-renderer = { path = "../weaver-renderer" } -weaver-workspace-hack = { version = "0.1", path = "../weaver-workspace-hack" } miette = { workspace = true, features = ["fancy"] } -jacquard = { workspace = true, features = ["loopback"] } +jacquard = { workspace = true, features = ["loopback", "dns"] } jacquard-api = { workspace = true, features = ["sh_weaver"] } tokio = { version = "1.45.0", features = ["full"] } diff --git a/crates/weaver-common/Cargo.toml b/crates/weaver-common/Cargo.toml index 1cc35e5..ca7e9a4 100644 --- a/crates/weaver-common/Cargo.toml +++ b/crates/weaver-common/Cargo.toml @@ -8,11 +8,10 @@ publish = false [features] default = ["dev"] dev = [] -native = ["tokio"] +native = ["jacquard/dns"] [dependencies] n0-future = { workspace = true } -weaver-workspace-hack = { version = "0.1", path = "../weaver-workspace-hack" } weaver-api = { version = "0.1", path = "../weaver-api" } markdown-weaver = { workspace = true } #libsqlite3-sys = { version = "0.30.1", features = ["bundled"] } @@ -25,9 +24,9 @@ trait-variant = "0.1" serde = { workspace = true } serde_json = { version = "1.0.140", features = ["preserve_order", "raw_value"] } serde_ipld_dagcbor = { version = "0.6.1", features = ["codec"] } -serde_cbor = "0.11.2" serde_html_form = "0.2.7" serde_bytes = "0.11.17" +tokio = { version = "1.44", features = ["sync"] } minijinja = { workspace = true, features = [ "builtins", @@ -45,20 +44,10 @@ miette = { workspace = true } owo-colors = { workspace = true } thiserror = { workspace = true } tracing = { workspace = true } -hickory-resolver = "0.24.1" -toml = "0.8.22" -#jose = { version = "0.0.2", features = ["crypto-rustcrypto"] } -jose-jwk = "0.1.2" reqwest = "0.12.15" -tokio = { version = "1.44", features = ["full"], optional = true } - -tower-service = "0.3.3" -tower-layer = "0.3.3" -multibase = "0.9.1" -dirs = "6.0.0" regex = "1.11.1" markdown-weaver-escape = { workspace = true, features = ["std"] } -tree_magic.workspace = true +mime-sniffer = "^0.1" [dev-dependencies] diff --git a/crates/weaver-common/src/error.rs b/crates/weaver-common/src/error.rs index 7375f0f..f425d89 100644 --- a/crates/weaver-common/src/error.rs +++ b/crates/weaver-common/src/error.rs @@ -112,8 +112,6 @@ pub enum SerDeError { #[diagnostic_source] Json(#[from] serde_json::Error), #[error(transparent)] - Cbor(#[from] serde_cbor::Error), - #[error(transparent)] DagCbor(#[from] serde_ipld_dagcbor::error::CodecError), #[error(transparent)] HtmlForm(#[from] serde_html_form::ser::Error), diff --git a/crates/weaver-common/src/lib.rs b/crates/weaver-common/src/lib.rs index c277d30..69c570f 100644 --- a/crates/weaver-common/src/lib.rs +++ b/crates/weaver-common/src/lib.rs @@ -1,6 +1,7 @@ //! Weaver common library - thin wrapper around jacquard with notebook-specific conveniences pub mod error; +pub mod view; // Re-export jacquard for convenience pub use jacquard; @@ -18,6 +19,7 @@ use jacquard::smol_str::SmolStr; use jacquard::types::blob::{BlobRef, MimeType}; use jacquard::types::string::{AtUri, Cid, Did, Handle, RecordKey}; use jacquard::xrpc::Response; +use mime_sniffer::MimeTypeSniffer; use std::path::Path; use std::sync::LazyLock; use tokio::sync::Mutex; @@ -90,7 +92,10 @@ impl WeaverExt for Agent { url_path: &'a str, prev: Option, ) -> Result<(StrongRef<'a>, PublishedBlob<'a>), WeaverError> { - let mime_type = MimeType::new_owned(tree_magic::from_u8(blob.as_ref())); + let mime_type = MimeType::new_owned( + blob.sniff_mime_type() + .unwrap_or("applicaction/octet-stream"), + ); let blob = self.upload_blob(blob, mime_type).await?; let publish_record = PublishedBlob::new() diff --git a/crates/weaver-common/src/view.rs b/crates/weaver-common/src/view.rs new file mode 100644 index 0000000..3f7950c --- /dev/null +++ b/crates/weaver-common/src/view.rs @@ -0,0 +1,284 @@ +use std::sync::Arc; + +use jacquard::{ + IntoStatic, + client::{AgentSessionExt, BasicClient}, + from_data, + prelude::IdentityResolver, + to_data, + types::{ + aturi::AtUri, collection::Collection, did::Did, ident::AtIdentifier, nsid::Nsid, + string::Datetime, + }, + xrpc::XrpcExt, +}; +use miette::{IntoDiagnostic, Result}; +use weaver_api::{ + app_bsky::actor::profile::Profile as BskyProfile, + com_atproto::repo::{list_records::ListRecords, strong_ref::StrongRef}, + sh_weaver::notebook::{ + AuthorListView, BookEntryRef, BookEntryView, EntryView, NotebookView, book::Book, + entry::Entry, page::Page, + }, +}; + +pub async fn view_notebook( + client: Arc, + uri: &AtUri<'_>, +) -> Result<(NotebookView<'static>, Vec>)> { + let notebook = client.get_record::(uri).await?.into_output()?; + + let title = notebook.value.title.clone(); + let tags = notebook.value.tags.clone(); + + let mut authors = Vec::new(); + + for (index, author) in notebook.value.authors.iter().enumerate() { + // TODO: swap to using weaver profiles here, or pick between them + let author_uri = + BskyProfile::uri(format!("at://{}/app.bsky.actor.profile/self", author.did))?; + let author_profile = client.fetch_record(&author_uri).await?; + + authors.push( + AuthorListView::new() + .uri(author_uri.as_uri().clone()) + .record(to_data(&author_profile)?) + .index(index as i64) + .build(), + ); + } + let entries = notebook + .value + .entry_list + .iter() + .cloned() + .map(IntoStatic::into_static) + .collect(); + + Ok(( + NotebookView::new() + .cid(notebook.cid.unwrap()) + .uri(notebook.uri) + .indexed_at(Datetime::now()) + .maybe_title(title) + .maybe_tags(tags) + .authors(authors) + .record(to_data(¬ebook.value)?) + .build(), + entries, + )) +} + +pub async fn fetch_entry_view<'a>( + client: Arc, + notebook: &NotebookView<'a>, + entry_ref: &StrongRef<'_>, +) -> Result> { + let entry = client + .fetch_record(&Entry::uri(entry_ref.uri.clone())?) + .await?; + + let title = entry.value.title.clone(); + let tags = entry.value.tags.clone(); + + Ok(EntryView::new() + .cid(entry.cid.unwrap()) + .uri(entry.uri) + .indexed_at(Datetime::now()) + .record(to_data(&entry.value)?) + .maybe_tags(tags) + .title(title) + .authors(notebook.authors.clone()) + .build()) +} + +pub async fn view_entry<'a>( + client: Arc, + notebook: &NotebookView<'a>, + entries: &[StrongRef<'_>], + index: usize, +) -> Result> { + let entry_ref = entries + .get(index) + .ok_or(miette::miette!("entry out of bounds"))?; + let entry = fetch_entry_view(client.clone(), notebook, entry_ref).await?; + let prev_entry = if index > 0 { + let prev_entry_ref = entries[index - 1].clone(); + fetch_entry_view(client.clone(), notebook, &prev_entry_ref) + .await + .ok() + } else { + None + } + .map(|e| BookEntryRef::new().entry(e).build()); + let next_entry = if index < entries.len() - 1 { + let next_entry_ref = entries[index + 1].clone(); + fetch_entry_view(client.clone(), notebook, &next_entry_ref) + .await + .ok() + } else { + None + } + .map(|e| BookEntryRef::new().entry(e).build()); + Ok(BookEntryView::new() + .entry(entry) + .maybe_next(next_entry) + .maybe_prev(prev_entry) + .index(index as i64) + .build()) +} + +pub async fn fetch_page_view<'a>( + client: Arc, + notebook: &NotebookView<'a>, + entry_ref: &StrongRef<'_>, +) -> Result> { + let entry = client + .fetch_record(&Page::uri(entry_ref.uri.clone())?) + .await?; + + let title = entry.value.title.clone(); + let tags = entry.value.tags.clone(); + + Ok(EntryView::new() + .cid(entry.cid.unwrap()) + .uri(entry.uri) + .indexed_at(Datetime::now()) + .record(to_data(&entry.value)?) + .maybe_tags(tags) + .title(title) + .authors(notebook.authors.clone()) + .build()) +} + +pub async fn view_page<'a>( + client: Arc, + notebook: &NotebookView<'a>, + pages: &[StrongRef<'_>], + index: usize, +) -> Result> { + let entry_ref = pages + .get(index) + .ok_or(miette::miette!("entry out of bounds"))?; + let entry = fetch_page_view(client.clone(), notebook, entry_ref).await?; + let prev_entry = if index > 0 { + let prev_entry_ref = pages[index - 1].clone(); + fetch_page_view(client.clone(), notebook, &prev_entry_ref) + .await + .ok() + } else { + None + } + .map(|e| BookEntryRef::new().entry(e).build()); + let next_entry = if index < pages.len() - 1 { + let next_entry_ref = pages[index + 1].clone(); + fetch_page_view(client.clone(), notebook, &next_entry_ref) + .await + .ok() + } else { + None + } + .map(|e| BookEntryRef::new().entry(e).build()); + Ok(BookEntryView::new() + .entry(entry) + .maybe_next(next_entry) + .maybe_prev(prev_entry) + .index(index as i64) + .build()) +} + +pub async fn entry_by_title<'a>( + client: Arc, + notebook: &NotebookView<'a>, + entries: &[StrongRef<'_>], + title: &str, +) -> Result, Entry<'a>)>> { + for (index, entry_ref) in entries.iter().enumerate() { + let resp = client.get_record::(&entry_ref.uri).await?; + if let Ok(entry) = resp.parse() + && entry.value.title == title + { + return Ok(Some(( + view_entry(client.clone(), notebook, entries, index).await?, + entry.value.into_static(), + ))); + } + } + Ok(None) +} + +pub async fn notebook_by_title<'a>( + client: Arc, + ident: &AtIdentifier<'_>, + title: &str, +) -> Result, Vec>)>> { + let (repo_did, pds_url) = match ident { + AtIdentifier::Did(did) => { + let pds = client.pds_for_did(did).await?; + (did.clone(), pds) + } + AtIdentifier::Handle(handle) => client.pds_for_handle(handle).await?, + }; + // TODO: use the cursor to search through all records with this NSID for the repo + let resp = client + .xrpc(pds_url) + .send( + &ListRecords::new() + .repo(repo_did) + .collection(Nsid::raw(Book::NSID)) + .limit(100) + .build(), + ) + .await?; + if let Ok(list) = resp.parse() { + for record in list.records { + let notebook: Book = from_data(&record.value).into_diagnostic()?; + if let Some(book_title) = notebook.title + && book_title == title + { + let tags = notebook.tags.clone(); + + let mut authors = Vec::new(); + + for (index, author) in notebook.authors.iter().enumerate() { + // TODO: swap to using weaver profiles here, or pick between them + let author_uri = BskyProfile::uri(format!( + "at://{}/app.bsky.actor.profile/self", + author.did + ))?; + let author_profile = client.fetch_record(&author_uri).await?; + + authors.push( + AuthorListView::new() + .uri(author_uri.as_uri().clone()) + .record(to_data(&author_profile)?) + .index(index as i64) + .build(), + ); + } + let entries = notebook + .entry_list + .iter() + .cloned() + .map(IntoStatic::into_static) + .collect(); + + return Ok(Some(( + NotebookView::new() + .cid(record.cid) + .uri(record.uri) + .indexed_at(Datetime::now()) + .title(book_title) + .maybe_tags(tags) + .authors(authors) + .record(record.value.clone()) + .build() + .into_static(), + entries, + ))); + } + } + } + + Ok(None) +} diff --git a/crates/weaver-renderer/Cargo.toml b/crates/weaver-renderer/Cargo.toml index f91d98f..41cb948 100644 --- a/crates/weaver-renderer/Cargo.toml +++ b/crates/weaver-renderer/Cargo.toml @@ -9,7 +9,6 @@ publish = false n0-future.workspace = true weaver-common = { path = "../weaver-common" } markdown-weaver = { workspace = true } -weaver-workspace-hack = { version = "0.1", path = "../weaver-workspace-hack" } compact_string = "0.1.0" http = "1.3.1" url = "2.5.4" @@ -17,17 +16,15 @@ syntect = { workspace = true, default-features = false, features = ["default-fan markdown-weaver-escape = { workspace = true, features = ["std"] } thiserror.workspace = true miette.workspace = true -pathdiff = "0.2.3" unicode-normalization = "0.1.24" yaml-rust2 = { version = "0.10.2" } bitflags = "2.9.1" -ignore = "0.4.23" + dashmap = "6.1.0" regex = "1.11.1" pin-utils = "0.1.0" pin-project = "1.1.10" dynosaur = "0.2.0" -async-trait = "0.1.88" smol_str = { version = "0.3", features = ["serde"] } reqwest = { version = "0.12.7", default-features = false, features = [ "json", @@ -37,6 +34,7 @@ reqwest = { version = "0.12.7", default-features = false, features = [ [target.'cfg(not(all(target_family = "wasm", target_os = "unknown")))'.dependencies] tokio = { version = "1.28", features = ["rt", "time"] } tokio-util = { version = "0.7.14", features = ["rt"] } +ignore = "0.4.23" [dev-dependencies] insta = { version = "1.40", features = ["yaml"] } diff --git a/crates/weaver-renderer/src/css.rs b/crates/weaver-renderer/src/css.rs index 7c3564d..658a355 100644 --- a/crates/weaver-renderer/src/css.rs +++ b/crates/weaver-renderer/src/css.rs @@ -1,9 +1,9 @@ use crate::theme::Theme; use miette::IntoDiagnostic; +use std::io::Cursor; use syntect::highlighting::{Theme as SyntectTheme, ThemeSet}; use syntect::html::{ClassStyle, css_for_theme_with_class_style}; use syntect::parsing::SyntaxSet; -use std::io::Cursor; // Embed rose-pine themes at compile time const ROSE_PINE_THEME: &str = include_str!("../themes/rose-pine.tmTheme"); @@ -24,6 +24,8 @@ pub fn generate_base_css(theme: &Theme) -> String { --color-foreground: {}; --color-link: {}; --color-link-hover: {}; + --color-primary: {}; + --color-secondary: {}; --font-body: {}; --font-heading: {}; @@ -57,11 +59,26 @@ h1, h2, h3, h4, h5, h6 {{ line-height: 1.2; }} -h1 {{ font-size: 2.5rem; }} -h2 {{ font-size: 2rem; }} -h3 {{ font-size: 1.5rem; }} -h4 {{ font-size: 1.25rem; }} -h5 {{ font-size: 1.125rem; }} +h1 {{ + font-size: 2.5rem; + color: var(--color-primary); +}} +h2 {{ + font-size: 2rem; + color: var(--color-secondary); +}} +h3 {{ + font-size: 1.5rem; + color: var(--color-primary); +}} +h4 {{ + font-size: 1.25rem; + color: var(--color-secondary); +}} +h5 {{ + font-size: 1.125rem; + color: var(--color-primary); +}} h6 {{ font-size: 1rem; }} p {{ @@ -174,6 +191,8 @@ hr {{ theme.colors.foreground, theme.colors.link, theme.colors.link_hover, + theme.colors.primary, + theme.colors.secondary, theme.fonts.body, theme.fonts.heading, theme.fonts.monospace, @@ -183,15 +202,14 @@ hr {{ ) } -pub fn generate_syntax_css( - theme: &Theme, - _syntax_set: &SyntaxSet, -) -> miette::Result { +pub fn generate_syntax_css(theme: &Theme, _syntax_set: &SyntaxSet) -> miette::Result { let syntect_theme = if let Some(custom_path) = &theme.custom_syntect_theme_path { // Load custom theme from file ThemeSet::get_theme(custom_path) .into_diagnostic() - .map_err(|e| miette::miette!("Failed to load custom theme from {:?}: {}", custom_path, e))? + .map_err(|e| { + miette::miette!("Failed to load custom theme from {:?}: {}", custom_path, e) + })? } else { // Check for embedded themes first match theme.syntect_theme_name.as_str() { @@ -199,13 +217,17 @@ pub fn generate_syntax_css( let mut cursor = Cursor::new(ROSE_PINE_THEME.as_bytes()); ThemeSet::load_from_reader(&mut cursor) .into_diagnostic() - .map_err(|e| miette::miette!("Failed to load embedded rose-pine theme: {}", e))? + .map_err(|e| { + miette::miette!("Failed to load embedded rose-pine theme: {}", e) + })? } "rose-pine-dawn" => { let mut cursor = Cursor::new(ROSE_PINE_DAWN_THEME.as_bytes()); ThemeSet::load_from_reader(&mut cursor) .into_diagnostic() - .map_err(|e| miette::miette!("Failed to load embedded rose-pine-dawn theme: {}", e))? + .map_err(|e| { + miette::miette!("Failed to load embedded rose-pine-dawn theme: {}", e) + })? } _ => { // Fall back to syntect's built-in themes @@ -213,7 +235,12 @@ pub fn generate_syntax_css( theme_set .themes .get(theme.syntect_theme_name.as_str()) - .ok_or_else(|| miette::miette!("Theme '{}' not found in defaults", theme.syntect_theme_name))? + .ok_or_else(|| { + miette::miette!( + "Theme '{}' not found in defaults", + theme.syntect_theme_name + ) + })? .clone() } } diff --git a/crates/weaver-renderer/src/lib.rs b/crates/weaver-renderer/src/lib.rs index 9e1cd65..883681f 100644 --- a/crates/weaver-renderer/src/lib.rs +++ b/crates/weaver-renderer/src/lib.rs @@ -25,10 +25,12 @@ pub mod atproto; pub mod base_html; pub mod code_pretty; pub mod css; +#[cfg(not(target_family = "wasm"))] pub mod static_site; pub mod theme; pub mod types; pub mod utils; +#[cfg(not(target_family = "wasm"))] pub mod walker; pub static OBSIDIAN_NOTE_LINK_RE: LazyLock = LazyLock::new(|| { diff --git a/crates/weaver-renderer/src/theme.rs b/crates/weaver-renderer/src/theme.rs index 315a74e..c426998 100644 --- a/crates/weaver-renderer/src/theme.rs +++ b/crates/weaver-renderer/src/theme.rs @@ -16,6 +16,8 @@ pub struct ColorScheme { pub foreground: SmolStr, pub link: SmolStr, pub link_hover: SmolStr, + pub primary: SmolStr, + pub secondary: SmolStr, } #[derive(Debug, Clone)] @@ -51,6 +53,8 @@ impl Default for ColorScheme { foreground: SmolStr::new("#2b303b"), link: SmolStr::new("#286983"), link_hover: SmolStr::new("#56949f"), + primary: SmolStr::new("#c4a7e7"), + secondary: SmolStr::new("#3e8fb0"), } } } diff --git a/crates/weaver-server/Cargo.toml b/crates/weaver-server/Cargo.toml index 2ec4218..edd3ce2 100644 --- a/crates/weaver-server/Cargo.toml +++ b/crates/weaver-server/Cargo.toml @@ -7,11 +7,16 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -dioxus = { version = "0.6.0", features = ["router", "fullstack"] } +dashmap = "6.1.0" +dioxus = { version = "0.7.0", features = ["router", "fullstack"] } weaver-common = { path = "../weaver-common" } -weaver-workspace-hack = { version = "0.1", path = "../weaver-workspace-hack" } - -jacquard = { workspace = true, features = ["tracing"] } +jacquard = { workspace = true, features = ["streaming"] } +jacquard-axum = { workspace = true, optional = true } +weaver-api = { path = "../weaver-api", features = ["streaming"] } +markdown-weaver = { workspace = true } +moka = { version = "0.12", features = ["future"], optional = true } +mini-moka = { version = "0.10" } +dioxus-primitives = { git = "https://github.com/DioxusLabs/components", version = "0.0.1", default-features = false } [features] default = ["web"] @@ -21,3 +26,5 @@ web = ["dioxus/web"] desktop = ["dioxus/desktop"] # The feature that are only required for the mobile = ["dioxus/mobile"] build target should be optional and only enabled in the mobile = ["dioxus/mobile"] feature mobile = ["dioxus/mobile"] +# The feature that are only required for the server = ["dioxus/server"] build target should be optional and only enabled in the server = ["dioxus/server"] feature +server = ["dioxus/server", "dep:jacquard-axum", "dep:moka"] diff --git a/crates/weaver-server/assets/dx-components-theme.css b/crates/weaver-server/assets/dx-components-theme.css new file mode 100644 index 0000000..6d51a26 --- /dev/null +++ b/crates/weaver-server/assets/dx-components-theme.css @@ -0,0 +1,83 @@ +/* This file contains the global styles for the styled dioxus components. You only + * need to import this file once in your project root. + */ +@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap"); + +body { + padding: 0; + margin: 0; + background-color: var(--primary-color); + color: var(--secondary-color-4); + font-family: Inter, sans-serif; + font-optical-sizing: auto; + font-style: normal; + font-weight: 400; +} + +@media (prefers-color-scheme: dark) { + :root { + --dark: initial; + --light: ; + } +} + +@media (prefers-color-scheme: light) { + :root { + --dark: ; + --light: initial; + } +} + +:root { + /* Primary colors */ + --primary-color: var(--dark, #000) var(--light, #fff); + --primary-color-1: var(--dark, #0e0e0e) var(--light, #fbfbfb); + --primary-color-2: var(--dark, #0a0a0a) var(--light, #fff); + --primary-color-3: var(--dark, #141313) var(--light, #f8f8f8); + --primary-color-4: var(--dark, #1a1a1a) var(--light, #f8f8f8); + --primary-color-5: var(--dark, #262626) var(--light, #f5f5f5); + --primary-color-6: var(--dark, #232323) var(--light, #e5e5e5); + --primary-color-7: var(--dark, #3e3e3e) var(--light, #b0b0b0); + + /* Secondary colors */ + --secondary-color: var(--dark, #fff) var(--light, #000); + --secondary-color-1: var(--dark, #fafafa) var(--light, #000); + --secondary-color-2: var(--dark, #e6e6e6) var(--light, #0d0d0d); + --secondary-color-3: var(--dark, #dcdcdc) var(--light, #2b2b2b); + --secondary-color-4: var(--dark, #d4d4d4) var(--light, #111); + --secondary-color-5: var(--dark, #a1a1a1) var(--light, #848484); + --secondary-color-6: var(--dark, #5d5d5d) var(--light, #d0d0d0); + + /* Highlight colors */ + --focused-border-color: var(--dark, #2b7fff) var(--light, #2b7fff); + --primary-success-color: var(--dark, #02271c) var(--light, #ecfdf5); + --secondary-success-color: var(--dark, #b6fae3) var(--light, #10b981); + --primary-warning-color: var(--dark, #342203) var(--light, #fffbeb); + --secondary-warning-color: var(--dark, #feeac7) var(--light, #f59e0b); + --primary-error-color: var(--dark, #a22e2e) var(--light, #dc2626); + --secondary-error-color: var(--dark, #9b1c1c) var(--light, #ef4444); + --contrast-error-color: var(--dark, var(--secondary-color-3)) + var(--light, var(--primary-color)); + --primary-info-color: var(--dark, var(--primary-color-5)) + var(--light, var(--primary-color)); + --secondary-info-color: var(--dark, var(--primary-color-7)) + var(--light, var(--secondary-color-3)); +} + +/* Modern browsers with `scrollbar-*` support */ +@supports (scrollbar-width: auto) { + :not(:hover) { + scrollbar-color: rgb(0 0 0 / 0%) rgb(0 0 0 / 0%); + } + + :hover { + scrollbar-color: var(--secondary-color-2) rgb(0 0 0 / 0%); + } +} + +/* Legacy browsers with `::-webkit-scrollbar-*` support */ +@supports selector(::-webkit-scrollbar) { + :root::-webkit-scrollbar-track { + background: transparent; + } +} diff --git a/crates/weaver-server/clippy.toml b/crates/weaver-server/clippy.toml deleted file mode 100644 index 40456af..0000000 --- a/crates/weaver-server/clippy.toml +++ /dev/null @@ -1,8 +0,0 @@ -await-holding-invalid-types = [ - "generational_box::GenerationalRef", - { path = "generational_box::GenerationalRef", reason = "Reads should not be held over an await point. This will cause any writes to fail while the await is pending since the read borrow is still active." }, - "generational_box::GenerationalRefMut", - { path = "generational_box::GenerationalRefMut", reason = "Write should not be held over an await point. This will cause any reads or writes to fail while the await is pending since the write borrow is still active." }, - "dioxus_signals::Write", - { path = "dioxus_signals::Write", reason = "Write should not be held over an await point. This will cause any reads or writes to fail while the await is pending since the write borrow is still active." }, -] diff --git a/crates/weaver-server/src/components/avatar/component.rs b/crates/weaver-server/src/components/avatar/component.rs new file mode 100644 index 0000000..ddb43d7 --- /dev/null +++ b/crates/weaver-server/src/components/avatar/component.rs @@ -0,0 +1,81 @@ +use dioxus::prelude::*; +use dioxus_primitives::avatar::{self, AvatarFallbackProps, AvatarImageProps, AvatarState}; + +#[derive(Clone, Copy, PartialEq, Default)] +pub enum AvatarImageSize { + #[default] + Small, + Medium, + Large, +} + +impl AvatarImageSize { + fn to_class(self) -> &'static str { + match self { + AvatarImageSize::Small => "avatar-sm", + AvatarImageSize::Medium => "avatar-md", + AvatarImageSize::Large => "avatar-lg", + } + } +} + +/// The props for the [`Avatar`] component. +#[derive(Props, Clone, PartialEq)] +pub struct AvatarProps { + /// Callback when image loads successfully + #[props(default)] + pub on_load: Option>, + + /// Callback when image fails to load + #[props(default)] + pub on_error: Option>, + + /// Callback when the avatar state changes + #[props(default)] + pub on_state_change: Option>, + + #[props(default)] + pub size: AvatarImageSize, + + /// Additional attributes for the avatar element + #[props(extends = GlobalAttributes)] + pub attributes: Vec, + + /// The children of the Avatar component, which can include AvatarImage and AvatarFallback + pub children: Element, +} + +#[component] +pub fn Avatar(props: AvatarProps) -> Element { + rsx! { + document::Link { rel: "stylesheet", href: asset!("./style.css") } + + avatar::Avatar { + class: "avatar {props.size.to_class()}", + on_load: props.on_load, + on_error: props.on_error, + on_state_change: props.on_state_change, + attributes: props.attributes, + {props.children} + } + } +} + +#[component] +pub fn AvatarImage(props: AvatarImageProps) -> Element { + rsx! { + avatar::AvatarImage { + class: "avatar-image", + src: props.src, + alt: props.alt, + attributes: props.attributes, + } + } +} + +#[component] +pub fn AvatarFallback(props: AvatarFallbackProps) -> Element { + rsx! { + avatar::AvatarFallback { class: "avatar-fallback", attributes: props.attributes, {props.children} } + } +} diff --git a/crates/weaver-server/src/components/avatar/mod.rs b/crates/weaver-server/src/components/avatar/mod.rs new file mode 100644 index 0000000..9a8ae55 --- /dev/null +++ b/crates/weaver-server/src/components/avatar/mod.rs @@ -0,0 +1,2 @@ +mod component; +pub use component::*; \ No newline at end of file diff --git a/crates/weaver-server/src/components/avatar/style.css b/crates/weaver-server/src/components/avatar/style.css new file mode 100644 index 0000000..2d487dc --- /dev/null +++ b/crates/weaver-server/src/components/avatar/style.css @@ -0,0 +1,92 @@ +.avatar-item { + display: flex; + flex-direction: column; + align-items: center; + gap: 0.5rem; +} + +.avatar-label { + margin: 0; + color: var(--secondary-color-4); + font-size: 0.875rem; +} + +/* Avatar Component Styles */ +.avatar { + position: relative; + display: inline-flex; + overflow: hidden; + width: 64px; + height: 64px; + flex-shrink: 0; + align-items: center; + justify-content: center; + border-radius: 3.40282e+38px; + color: var(--secondary-color-4); + cursor: pointer; + font-weight: 500; +} + +.avatar-image { + width: 100%; + height: 100%; + aspect-ratio: 1; +} + +/* Avatar sizes */ +.avatar-sm { + width: 2rem; + height: 2rem; + font-size: 0.875rem; +} + +.avatar-md { + width: 3rem; + height: 3rem; + font-size: 1.25rem; +} + +.avatar-lg { + width: 4rem; + height: 4rem; + font-size: 1.75rem; +} + +/* State-specific styles */ +.avatar[data-state="loading"] { + animation: pulse 1.5s infinite ease-in-out; +} + +.avatar[data-state="empty"] { + background: var(--primary-color-2); +} + +@keyframes pulse { + 0% { + opacity: 1; + } + + 50% { + opacity: 0.7; + } + + 100% { + opacity: 1; + } +} + +.avatar-fallback { + display: flex; + width: 100%; + height: 100%; + align-items: center; + justify-content: center; + background: var(--primary-color); + color: var(--secondary-color-4); + font-size: 1.5rem; +} + +.avatar[data-state="error"] .avatar-fallback { + background: var(--primary-color-3); + color: var(--secondary-color-4); +} diff --git a/crates/weaver-server/src/components/cssblob.rs b/crates/weaver-server/src/components/cssblob.rs new file mode 100644 index 0000000..1611b67 --- /dev/null +++ b/crates/weaver-server/src/components/cssblob.rs @@ -0,0 +1,2 @@ +use dioxus::prelude::*; +use weaver_common::jacquard::smol_str::SmolStr; diff --git a/crates/weaver-server/src/components/echo.rs b/crates/weaver-server/src/components/echo.rs deleted file mode 100644 index 119962d..0000000 --- a/crates/weaver-server/src/components/echo.rs +++ /dev/null @@ -1,61 +0,0 @@ -use dioxus::prelude::*; - -const ECHO_CSS: Asset = asset!("/assets/styling/echo.css"); - -/// Echo component that demonstrates fullstack server functions. -#[component] -pub fn Echo() -> Element { - // use_signal is a hook. Hooks in dioxus must be run in a consistent order every time the component is rendered. - // That means they can't be run inside other hooks, async blocks, if statements, or loops. - // - // use_signal is a hook that creates a state for the component. It takes a closure that returns the initial value of the state. - // The state is automatically tracked and will rerun any other hooks or components that read it whenever it changes. - let mut response = use_signal(|| String::new()); - - rsx! { - document::Link { rel: "stylesheet", href: ECHO_CSS } - - div { - id: "echo", - h4 { "ServerFn Echo" } - input { - placeholder: "Type here to echo...", - // `oninput` is an event handler that will run when the input changes. It can return either nothing or a future - // that will be run when the event runs. - oninput: move |event| async move { - // When we call the echo_server function from the client, it will fire a request to the server and return - // the response. It handles serialization and deserialization of the request and response for us. - let data = echo_server(event.value()).await.unwrap(); - - // After we have the data from the server, we can set the state of the signal to the new value. - // Since we read the `response` signal later in this component, the component will rerun. - response.set(data); - }, - } - - // Signals can be called like a function to clone the current value of the signal - if !response().is_empty() { - p { - "Server echoed: " - // Since we read the signal inside this component, the component "subscribes" to the signal. Whenever - // the signal changes, the component will rerun. - i { "{response}" } - } - } - } - } -} - -// Server functions let us define public APIs on the server that can be called like a normal async function from the client. -// Each server function needs to be annotated with the `#[server]` attribute, accept and return serializable types, and return -// a `Result` with the error type [`ServerFnError`]. -// -// When the server function is called from the client, it will just serialize the arguments, call the API, and deserialize the -// response. -#[server] -async fn echo_server(input: String) -> Result { - // The body of server function like this comment are only included on the server. If you have any server-only logic like - // database queries, you can put it here. Any imports for the server function should either be imported inside the function - // or imported under a `#[cfg(feature = "server")]` block. - Ok(input) -} diff --git a/crates/weaver-server/src/components/entry.rs b/crates/weaver-server/src/components/entry.rs new file mode 100644 index 0000000..a07b0e3 --- /dev/null +++ b/crates/weaver-server/src/components/entry.rs @@ -0,0 +1,65 @@ +#![allow(non_snake_case)] + +use crate::fetch; +use dioxus::prelude::*; +use jacquard::{smol_str::SmolStr, types::string::AtIdentifier, CowStr}; +use weaver_api::sh_weaver::notebook::{entry, BookEntryView}; + +#[component] +pub fn Entry(ident: AtIdentifier<'static>, book_title: SmolStr, title: SmolStr) -> Element { + let entry = use_resource(use_reactive!(|(ident, book_title, title)| async move { + let fetcher = use_context::(); + fetcher + .get_entry(ident, book_title, title) + .await + .ok() + .flatten() + })); + + rsx! { + match &*entry.read_unchecked() { + Some(Some(entry)) => { + let class = use_signal(|| String::from("entry")); + let content = use_signal(||entry.1.clone()); + rsx! { EntryMarkdown { + class, + content + } } + }, + Some(None) => rsx! { p { "Loading entry failed" } }, + None => rsx! { p { "Loading..." } } + } + } +} + +#[component] +pub fn EntryCard(entry: BookEntryView<'static>) -> Element { + rsx! {} +} + +#[derive(Props, Clone, PartialEq)] +pub struct EntryMarkdownProps { + #[props(default)] + id: Signal, + #[props(default)] + class: Signal, + + content: ReadSignal>, +} + +/// Render some text as markdown. +pub fn EntryMarkdown(props: EntryMarkdownProps) -> Element { + let content = &*props.content.read(); + let parser = markdown_weaver::Parser::new(&content.content); + + let mut html_buf = String::new(); + markdown_weaver::html::push_html(&mut html_buf, parser); + + rsx! { + div { + id: "{&*props.id.read()}", + class: "{&*props.class.read()}", + dangerous_inner_html: "{html_buf}" + } + } +} diff --git a/crates/weaver-server/src/components/hero.rs b/crates/weaver-server/src/components/hero.rs deleted file mode 100644 index 3088c5c..0000000 --- a/crates/weaver-server/src/components/hero.rs +++ /dev/null @@ -1,25 +0,0 @@ -use dioxus::prelude::*; - -const HEADER_SVG: Asset = asset!("/assets/header.svg"); - -#[component] -pub fn Hero() -> Element { - rsx! { - // We can create elements inside the rsx macro with the element name followed by a block of attributes and children. - div { - // Attributes should be defined in the element before any children - id: "hero", - // After all attributes are defined, we can define child elements and components - img { src: HEADER_SVG, id: "header" } - div { id: "links", - // The RSX macro also supports text nodes surrounded by quotes - a { href: "https://dioxuslabs.com/learn/0.6/", "📚 Learn Dioxus" } - a { href: "https://dioxuslabs.com/awesome", "🚀 Awesome Dioxus" } - a { href: "https://github.com/dioxus-community/", "📡 Community Libraries" } - a { href: "https://github.com/DioxusLabs/sdk", "⚙️ Dioxus Development Kit" } - a { href: "https://marketplace.visualstudio.com/items?itemName=DioxusLabs.dioxus", "💫 VSCode Extension" } - a { href: "https://discord.gg/XgGxMSkvUM", "👋 Community Discord" } - } - } - } -} diff --git a/crates/weaver-server/src/components/identity.rs b/crates/weaver-server/src/components/identity.rs new file mode 100644 index 0000000..8155d61 --- /dev/null +++ b/crates/weaver-server/src/components/identity.rs @@ -0,0 +1,41 @@ +use crate::{fetch, Route}; +use dioxus::prelude::*; +use jacquard::{ + client::BasicClient, + types::{ident::AtIdentifier, tid::Tid}, + CowStr, +}; +use weaver_api::sh_weaver::notebook::NotebookView; +#[component] +pub fn Repository(ident: AtIdentifier<'static>) -> Element { + rsx! { + // We can create elements inside the rsx macro with the element name followed by a block of attributes and children. + div { + Outlet:: {} + } + } +} + +#[component] +pub fn RepositoryIndex(ident: AtIdentifier<'static>) -> Element { + let fetcher = use_context::(); + let notebooks = use_signal(|| fetcher.list_recent_notebooks()); + rsx! { + for notebook in notebooks.iter() { + { + let view = ¬ebook.0; + rsx! { + div { + key: "{view.cid}", + NotebookCard { notebook: view.clone() } + } + } + } + } + } +} + +#[component] +pub fn NotebookCard(notebook: NotebookView<'static>) -> Element { + rsx! {} +} diff --git a/crates/weaver-server/src/components/mod.rs b/crates/weaver-server/src/components/mod.rs index 57bc3b9..2aaea3f 100644 --- a/crates/weaver-server/src/components/mod.rs +++ b/crates/weaver-server/src/components/mod.rs @@ -2,8 +2,11 @@ //! They can be used to defined common UI elements like buttons, forms, and modals. In this template, we define a Hero //! component and an Echo component for fullstack apps to be used in our app. -mod hero; -pub use hero::Hero; +mod cssblob; -mod echo; -pub use echo::Echo; +mod entry; +pub use entry::{Entry, EntryCard}; + +mod identity; +pub use identity::{Repository, RepositoryIndex}; +pub mod avatar; diff --git a/crates/weaver-server/src/fetch.rs b/crates/weaver-server/src/fetch.rs new file mode 100644 index 0000000..e50e8c8 --- /dev/null +++ b/crates/weaver-server/src/fetch.rs @@ -0,0 +1,140 @@ +use dioxus::{CapturedError, Result}; +use jacquard::{client::BasicClient, smol_str::SmolStr, types::ident::AtIdentifier}; +use std::{ + sync::{Arc, Mutex}, + time::Duration, +}; +use weaver_api::{ + com_atproto::repo::strong_ref::StrongRef, + sh_weaver::notebook::{entry::Entry, BookEntryView, NotebookView}, +}; +use weaver_common::view::{entry_by_title, fetch_entry_view, notebook_by_title, view_entry}; + +#[derive(Clone)] +pub struct CachedFetcher { + client: Arc, + + book_cache: Arc< + Mutex< + mini_moka::unsync::Cache< + (AtIdentifier<'static>, SmolStr), + Arc<(NotebookView<'static>, Vec>)>, + >, + >, + >, + entry_cache: Arc< + Mutex< + mini_moka::unsync::Cache< + (AtIdentifier<'static>, SmolStr), + Arc<(BookEntryView<'static>, Entry<'static>)>, + >, + >, + >, +} + +impl CachedFetcher { + pub fn new(client: Arc) -> Self { + let book_cache = mini_moka::unsync::Cache::builder() + .max_capacity(100) + .time_to_idle(Duration::from_secs(1200)) + .build(); + let entry_cache = mini_moka::unsync::Cache::builder() + .max_capacity(100) + .time_to_idle(Duration::from_secs(600)) + .build(); + + Self { + client, + book_cache: Arc::new(Mutex::new(book_cache)), + entry_cache: Arc::new(Mutex::new(entry_cache)), + } + } + + pub async fn get_notebook( + &self, + ident: AtIdentifier<'static>, + title: SmolStr, + ) -> Result, Vec>)>>> { + if let Ok(mut book_cache) = self.book_cache.lock() { + if let Some(entry) = book_cache.get(&(ident.clone(), title.clone())) { + Ok(Some(entry.clone())) + } else { + if let Some((notebook, entries)) = + notebook_by_title(self.client.clone(), &ident, &title) + .await + .map_err(|e| dioxus::CapturedError::from_display(e))? + { + let stored = Arc::new((notebook, entries)); + book_cache.insert((ident.clone(), title.into()), stored.clone()); + Ok(Some(stored)) + } else { + Ok(None) + } + } + } else { + Ok(None) + } + } + + pub async fn get_entry( + &self, + ident: AtIdentifier<'static>, + book_title: SmolStr, + entry_title: SmolStr, + ) -> Result, Entry<'static>)>>> { + if let Some(result) = self.get_notebook(ident.clone(), book_title).await? { + let (notebook, entries) = result.as_ref(); + if let Ok(mut entry_cache) = self.entry_cache.lock() { + if let Some(entry) = entry_cache.get(&(ident.clone(), entry_title.clone())) { + Ok(Some(entry.clone())) + } else { + if let Some(entry) = entry_by_title( + self.client.clone(), + notebook, + entries.as_ref(), + &entry_title, + ) + .await + .map_err(|e| dioxus::CapturedError::from_display(e))? + { + let stored = Arc::new(entry); + entry_cache.insert((ident.clone(), entry_title.into()), stored.clone()); + Ok(Some(stored)) + } else { + Ok(None) + } + } + } else { + Ok(None) + } + } else { + Ok(None) + } + } + + pub fn list_recent_entries(&self) -> Vec, Entry<'static>)>> { + if let Ok(entry_cache) = self.entry_cache.lock() { + let mut entries = Vec::new(); + for (_, entry) in entry_cache.iter() { + entries.push(entry.clone()); + } + entries + } else { + Vec::new() + } + } + + pub fn list_recent_notebooks( + &self, + ) -> Vec, Vec>)>> { + if let Ok(book_cache) = self.book_cache.lock() { + let mut entries = Vec::new(); + for (_, entry) in book_cache.iter() { + entries.push(entry.clone()); + } + entries + } else { + Vec::new() + } + } +} diff --git a/crates/weaver-server/src/main.rs b/crates/weaver-server/src/main.rs index 2fcd3f1..5d48a1d 100644 --- a/crates/weaver-server/src/main.rs +++ b/crates/weaver-server/src/main.rs @@ -1,17 +1,22 @@ // The dioxus prelude contains a ton of common items used in dioxus apps. It's a good idea to import wherever you // need dioxus -use dioxus::prelude::*; - -use views::{Blog, Home, Navbar}; +use components::{Entry, Repository, RepositoryIndex}; +use dioxus::{fullstack::FullstackContext, prelude::*}; +use jacquard::{ + client::BasicClient, smol_str::SmolStr, types::did::Did, types::string::AtIdentifier, CowStr, +}; +use std::sync::Arc; +use views::{Home, Navbar, Notebook, NotebookIndex, NotebookPage}; /// Define a components module that contains all shared components for our app. mod components; +mod fetch; /// Define a views module that contains the UI for all Layouts and Routes for our app. mod views; /// The Route enum is used to define the structure of internal routes in our app. All route enums need to derive /// the [`Routable`] trait, which provides the necessary methods for the router to work. -/// +/// /// Each variant represents a different URL pattern that can be matched by the router. If that pattern is matched, /// the components for that route will be rendered. #[derive(Debug, Clone, Routable, PartialEq)] @@ -24,12 +29,18 @@ enum Route { // the component for that route will be rendered. The component name that is rendered defaults to the variant name. #[route("/")] Home {}, - // The route attribute can include dynamic parameters that implement [`std::str::FromStr`] and [`std::fmt::Display`] with the `:` syntax. - // In this case, id will match any integer like `/blog/123` or `/blog/-456`. - #[route("/blog/:id")] - // Fields of the route variant will be passed to the component as props. In this case, the blog component must accept - // an `id` prop of type `i32`. - Blog { id: i32 }, + #[layout(ErrorLayout)] + #[nest("/:ident")] + #[layout(components::Repository)] + #[route("/")] + RepositoryIndex { ident: AtIdentifier<'static> }, + #[nest("/:book_title")] + #[layout(views::Notebook)] + #[route("/")] + NotebookIndex { ident: AtIdentifier<'static>, book_title: SmolStr }, + #[route("/:title")] + Entry { ident: AtIdentifier<'static>, book_title: SmolStr, title: SmolStr } + } // We can import assets in dioxus with the `asset!` macro. This macro takes a path to an asset relative to the crate root. @@ -39,8 +50,20 @@ const FAVICON: Asset = asset!("/assets/favicon.ico"); const MAIN_CSS: Asset = asset!("/assets/styling/main.css"); fn main() { - // The `launch` function is the main entry point for a dioxus app. It takes a component and renders it with the platform feature - // you have enabled + // Run `serve()` on the server only + #[cfg(feature = "server")] + dioxus::serve(|| async move { + // Create a new router for our app using the `router` function + let mut router = dioxus::server::router(App); + + // .. customize the router, adding layers and new routes + + // And then return the router + Ok(router) + }); + + // When not on the server, just run `launch()` like normal + #[cfg(not(feature = "server"))] dioxus::launch(App); } @@ -51,6 +74,7 @@ fn main() { #[component] fn App() -> Element { // The `rsx!` macro lets us define HTML inside of rust. It expands to an Element with all of our HTML inside. + use_context_provider(|| fetch::CachedFetcher::new(Arc::new(BasicClient::unauthenticated()))); rsx! { // In addition to element and text (which we will see later), rsx can contain other components. In this case, // we are using the `document::Link` component to add a link to our favicon and main CSS file into the head of our app. @@ -63,3 +87,24 @@ fn App() -> Element { Router:: {} } } + +// And then our Outlet is wrapped in a fallback UI +#[component] +fn ErrorLayout() -> Element { + rsx! { + ErrorBoundary { + handle_error: move |err: ErrorContext| { + let http_error = FullstackContext::commit_error_status(err.error().unwrap()); + match http_error.status { + StatusCode::NOT_FOUND => rsx! { div { "404 - Page not found" } }, + _ => rsx! { div { "An unknown error occurred" } }, + } + }, + Outlet:: {} + } + } +} + +struct Config { + did: Option>, +} diff --git a/crates/weaver-server/src/views/blog.rs b/crates/weaver-server/src/views/blog.rs deleted file mode 100644 index 50c2ba7..0000000 --- a/crates/weaver-server/src/views/blog.rs +++ /dev/null @@ -1,39 +0,0 @@ -use crate::Route; -use dioxus::prelude::*; - -const BLOG_CSS: Asset = asset!("/assets/styling/blog.css"); - -/// The Blog page component that will be rendered when the current route is `[Route::Blog]` -/// -/// The component takes a `id` prop of type `i32` from the route enum. Whenever the id changes, the component function will be -/// re-run and the rendered HTML will be updated. -#[component] -pub fn Blog(id: i32) -> Element { - rsx! { - document::Link { rel: "stylesheet", href: BLOG_CSS } - - div { - id: "blog", - - // Content - h1 { "This is blog #{id}!" } - p { "In blog #{id}, we show how the Dioxus router works and how URL parameters can be passed as props to our route components." } - - // Navigation links - // The `Link` component lets us link to other routes inside our app. It takes a `to` prop of type `Route` and - // any number of child nodes. - Link { - // The `to` prop is the route that the link should navigate to. We can use the `Route` enum to link to the - // blog page with the id of -1. Since we are using an enum instead of a string, all of the routes will be checked - // at compile time to make sure they are valid. - to: Route::Blog { id: id - 1 }, - "Previous" - } - span { " <---> " } - Link { - to: Route::Blog { id: id + 1 }, - "Next" - } - } - } -} diff --git a/crates/weaver-server/src/views/home.rs b/crates/weaver-server/src/views/home.rs index 686ce7d..feff6e4 100644 --- a/crates/weaver-server/src/views/home.rs +++ b/crates/weaver-server/src/views/home.rs @@ -1,11 +1,22 @@ -use crate::components::{Echo, Hero}; +use crate::{components::EntryCard, fetch}; use dioxus::prelude::*; /// The Home page component that will be rendered when the current route is `[Route::Home]` #[component] pub fn Home() -> Element { + let fetcher = use_context::(); + let entries = use_signal(|| fetcher.list_recent_entries()); rsx! { - Hero {} - Echo {} + for entry in entries.iter() { + { + let view = &entry.0; + rsx! { + div { + key: "{view.entry.cid}", + EntryCard { entry: view.clone() } + } + } + } + } } } diff --git a/crates/weaver-server/src/views/mod.rs b/crates/weaver-server/src/views/mod.rs index 0a41003..c1739f2 100644 --- a/crates/weaver-server/src/views/mod.rs +++ b/crates/weaver-server/src/views/mod.rs @@ -11,8 +11,11 @@ mod home; pub use home::Home; -mod blog; -pub use blog::Blog; - mod navbar; pub use navbar::Navbar; + +mod notebookpage; +pub use notebookpage::NotebookPage; + +mod notebook; +pub use notebook::{Notebook, NotebookIndex}; diff --git a/crates/weaver-server/src/views/navbar.rs b/crates/weaver-server/src/views/navbar.rs index 1b13536..ce7bf64 100644 --- a/crates/weaver-server/src/views/navbar.rs +++ b/crates/weaver-server/src/views/navbar.rs @@ -19,10 +19,7 @@ pub fn Navbar() -> Element { to: Route::Home {}, "Home" } - Link { - to: Route::Blog { id: 1 }, - "Blog" - } + } // The `Outlet` component is used to render the next component inside the layout. In this case, it will render either diff --git a/crates/weaver-server/src/views/notebook.rs b/crates/weaver-server/src/views/notebook.rs new file mode 100644 index 0000000..43cff7c --- /dev/null +++ b/crates/weaver-server/src/views/notebook.rs @@ -0,0 +1,30 @@ +use crate::{fetch, Route}; +use dioxus::prelude::*; +use jacquard::{ + client::BasicClient, + smol_str::SmolStr, + types::{ident::AtIdentifier, tid::Tid}, + CowStr, +}; +use std::sync::Arc; + +const BLOG_CSS: Asset = asset!("/assets/styling/blog.css"); + +/// The Blog page component that will be rendered when the current route is `[Route::Blog]` +/// +/// The component takes a `id` prop of type `i32` from the route enum. Whenever the id changes, the component function will be +/// re-run and the rendered HTML will be updated. +#[component] +pub fn Notebook(ident: AtIdentifier<'static>, book_title: SmolStr) -> Element { + let fetcher = use_context::(); + rsx! { + document::Link { rel: "stylesheet", href: BLOG_CSS } + Outlet:: {} + } +} + +#[component] +pub fn NotebookIndex(ident: AtIdentifier<'static>, book_title: SmolStr) -> Element { + let fetcher = use_context::(); + rsx! {} +} diff --git a/crates/weaver-server/src/views/notebookpage.rs b/crates/weaver-server/src/views/notebookpage.rs new file mode 100644 index 0000000..69d573b --- /dev/null +++ b/crates/weaver-server/src/views/notebookpage.rs @@ -0,0 +1,25 @@ +use crate::Route; +use dioxus::prelude::*; +use jacquard::types::tid::Tid; + +const BLOG_CSS: Asset = asset!("/assets/styling/blog.css"); + +/// The Blog page component that will be rendered when the current route is `[Route::Blog]` +/// +/// The component takes a `id` prop of type `i32` from the route enum. Whenever the id changes, the component function will be +/// re-run and the rendered HTML will be updated. +#[component] +pub fn NotebookPage(id: Tid, children: Element) -> Element { + rsx! { + document::Link { rel: "stylesheet", href: BLOG_CSS } + + div { + id: "blog", + + // Content + h1 { "This is blog #{id}!" } + p { "In blog #{id}, we show how the Dioxus router works and how URL parameters can be passed as props to our route components." } + + } + } +} diff --git a/crates/weaver-workspace-hack/.gitattributes b/crates/weaver-workspace-hack/.gitattributes deleted file mode 100644 index 3e9dba4..0000000 --- a/crates/weaver-workspace-hack/.gitattributes +++ /dev/null @@ -1,4 +0,0 @@ -# Avoid putting conflict markers in the generated Cargo.toml file, since their presence breaks -# Cargo. -# Also do not check out the file as CRLF on Windows, as that's what hakari needs. -Cargo.toml merge=binary -crlf diff --git a/crates/weaver-workspace-hack/Cargo.toml b/crates/weaver-workspace-hack/Cargo.toml deleted file mode 100644 index 4a7825e..0000000 --- a/crates/weaver-workspace-hack/Cargo.toml +++ /dev/null @@ -1,110 +0,0 @@ -# This file is generated by `cargo hakari`. -# To regenerate, run: -# cargo hakari generate - -[package] -name = "weaver-workspace-hack" -version = "0.1.0" -description = "workspace-hack package, managed by hakari" -license.workspace = true -edition.workspace = true -# You can choose to publish this crate: see https://docs.rs/cargo-hakari/latest/cargo_hakari/publishing. -publish = false - -# The parts of the file between the BEGIN HAKARI SECTION and END HAKARI SECTION comments -# are managed by hakari. - -### BEGIN HAKARI SECTION -[dependencies] -aho-corasick = { version = "1" } -byteorder = { version = "1" } -bytes = { version = "1", features = ["serde"] } -data-encoding = { version = "2" } -diesel = { version = "2", features = ["chrono", "i-implement-a-third-party-backend-and-opt-into-breaking-changes", "postgres", "serde_json", "sqlite"] } -diesel-async = { version = "0.5", features = ["deadpool", "postgres", "sync-connection-wrapper"] } -elliptic-curve = { version = "0.13", features = ["digest", "hazmat", "jwk", "pem", "std"] } -futures-channel = { version = "0.3", features = ["sink"] } -futures-core = { version = "0.3" } -futures-task = { version = "0.3", default-features = false, features = ["std"] } -futures-util = { version = "0.3", features = ["channel", "io", "sink"] } -generic-array = { version = "0.14", default-features = false, features = ["more_lengths", "serde", "zeroize"] } -hashbrown = { version = "0.15", features = ["serde"] } -idna = { version = "1" } -jacquard = { git = "https://tangled.org/@nonbinary.computer/jacquard", default-features = false, features = ["api_bluesky", "derive", "dns", "loopback", "tracing", "websocket", "zstd"] } -jacquard-api = { git = "https://tangled.org/@nonbinary.computer/jacquard", features = ["bluesky", "sh_weaver"] } -jacquard-common = { git = "https://tangled.org/@nonbinary.computer/jacquard", features = ["tracing", "websocket", "zstd"] } -jacquard-identity = { git = "https://tangled.org/@nonbinary.computer/jacquard", default-features = false, features = ["cache", "dns", "tracing"] } -jacquard-lexicon = { git = "https://tangled.org/@nonbinary.computer/jacquard" } -jacquard-oauth = { git = "https://tangled.org/@nonbinary.computer/jacquard", features = ["browser-open", "loopback", "tracing"] } -log = { version = "0.4", default-features = false, features = ["std"] } -memchr = { version = "2" } -miette = { version = "7", features = ["fancy", "syntect-highlighter"] } -minijinja = { version = "2" } -minimal-lexical = { version = "0.2", default-features = false, features = ["std"] } -nom = { version = "7" } -num-traits = { version = "0.2", default-features = false, features = ["i128", "libm", "std"] } -p384 = { version = "0.13", default-features = false, features = ["ecdsa"] } -percent-encoding = { version = "2" } -rand = { version = "0.8", features = ["small_rng"] } -regex-automata = { version = "0.4", default-features = false, features = ["dfa", "hybrid", "meta", "nfa", "perf", "std", "unicode"] } -reqwest = { version = "0.12", features = ["gzip", "json", "rustls-tls", "stream"] } -sec1 = { version = "0.7", features = ["pem", "serde", "std", "subtle"] } -serde_json = { version = "1", features = ["alloc", "preserve_order", "raw_value"] } -sha2 = { version = "0.10", features = ["oid"] } -smallvec = { version = "1", default-features = false, features = ["const_new"] } -subtle = { version = "2" } -syn = { version = "2", features = ["extra-traits", "fold", "full", "visit", "visit-mut"] } -syntect = { version = "5", features = ["default-fancy"] } -time = { version = "0.3", features = ["formatting", "macros", "parsing"] } -tokio = { version = "1", features = ["full"] } -tokio-util = { version = "0.7", features = ["codec", "io"] } -toml = { version = "0.8", features = ["preserve_order"] } -tower-http = { version = "0.6", features = ["cors", "fs", "normalize-path", "request-id", "timeout", "trace"] } -tracing = { version = "0.1", features = ["log"] } -tracing-core = { version = "0.1" } -uuid = { version = "1", features = ["serde", "v4", "v7"] } -winnow = { version = "0.7" } -zerocopy = { version = "0.8", default-features = false, features = ["derive", "simd"] } -zeroize = { version = "1", features = ["derive", "serde"] } - -[build-dependencies] -aho-corasick = { version = "1" } -bytes = { version = "1", features = ["serde"] } -data-encoding = { version = "2" } -diesel_derives = { version = "2", features = ["32-column-tables", "chrono", "postgres", "sqlite", "with-deprecated"] } -elliptic-curve = { version = "0.13", features = ["digest", "hazmat", "jwk", "pem", "std"] } -futures-channel = { version = "0.3", features = ["sink"] } -futures-core = { version = "0.3" } -futures-task = { version = "0.3", default-features = false, features = ["std"] } -futures-util = { version = "0.3", features = ["channel", "io", "sink"] } -generic-array = { version = "0.14", default-features = false, features = ["more_lengths", "serde", "zeroize"] } -idna = { version = "1" } -jacquard-common = { git = "https://tangled.org/@nonbinary.computer/jacquard", features = ["tracing", "websocket", "zstd"] } -jacquard-lexicon = { git = "https://tangled.org/@nonbinary.computer/jacquard" } -log = { version = "0.4", default-features = false, features = ["std"] } -memchr = { version = "2" } -miette = { version = "7", features = ["fancy", "syntect-highlighter"] } -minimal-lexical = { version = "0.2", default-features = false, features = ["std"] } -nom = { version = "7" } -num-traits = { version = "0.2", default-features = false, features = ["i128", "libm", "std"] } -percent-encoding = { version = "2" } -rand = { version = "0.8", features = ["small_rng"] } -regex-automata = { version = "0.4", default-features = false, features = ["dfa", "hybrid", "meta", "nfa", "perf", "std", "unicode"] } -reqwest = { version = "0.12", features = ["gzip", "json", "rustls-tls", "stream"] } -sec1 = { version = "0.7", features = ["pem", "serde", "std", "subtle"] } -serde_json = { version = "1", features = ["alloc", "preserve_order", "raw_value"] } -sha2 = { version = "0.10", features = ["oid"] } -smallvec = { version = "1", default-features = false, features = ["const_new"] } -subtle = { version = "2" } -syn = { version = "2", features = ["extra-traits", "fold", "full", "visit", "visit-mut"] } -syntect = { version = "5", features = ["default-fancy"] } -time = { version = "0.3", features = ["formatting", "macros", "parsing"] } -tokio = { version = "1", features = ["full"] } -tokio-util = { version = "0.7", features = ["codec", "io"] } -tracing = { version = "0.1", features = ["log"] } -tracing-core = { version = "0.1" } -winnow = { version = "0.7" } -zerocopy = { version = "0.8", default-features = false, features = ["derive", "simd"] } -zeroize = { version = "1", features = ["derive", "serde"] } - -### END HAKARI SECTION diff --git a/crates/weaver-workspace-hack/build.rs b/crates/weaver-workspace-hack/build.rs deleted file mode 100644 index 92518ef..0000000 --- a/crates/weaver-workspace-hack/build.rs +++ /dev/null @@ -1,2 +0,0 @@ -// A build script is required for cargo to consider build dependencies. -fn main() {} diff --git a/crates/weaver-workspace-hack/src/lib.rs b/crates/weaver-workspace-hack/src/lib.rs deleted file mode 100644 index 22489f6..0000000 --- a/crates/weaver-workspace-hack/src/lib.rs +++ /dev/null @@ -1 +0,0 @@ -// This is a stub lib.rs. diff --git a/flake.lock b/flake.lock index 96367ce..7ca4438 100644 --- a/flake.lock +++ b/flake.lock @@ -31,10 +31,49 @@ "type": "github" } }, - "flake-utils": { + "dioxus": { "inputs": { + "flake-parts": "flake-parts", + "nixpkgs": "nixpkgs", + "rust-overlay": "rust-overlay", "systems": "systems" }, + "locked": { + "lastModified": 1761886294, + "narHash": "sha256-GEyOUuFbqWzpQIKO6mT2oCEp2JnUvNkOW/WsrHOFK6I=", + "owner": "DioxusLabs", + "repo": "dioxus", + "rev": "2ab9a5586dc6b4d95e210eded692f50e7ab7575e", + "type": "github" + }, + "original": { + "owner": "DioxusLabs", + "repo": "dioxus", + "type": "github" + } + }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1743550720, + "narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "c621e8422220273271f52058f618c94e405bb0f5", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-utils": { + "inputs": { + "systems": "systems_2" + }, "locked": { "lastModified": 1731533236, "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", @@ -51,11 +90,58 @@ }, "nixpkgs": { "locked": { - "lastModified": 1761594641, - "narHash": "sha256-sImk6SJQASDLQo8l+0zWWaBgg7TueLS6lTvdH5pBZpo=", + "lastModified": 1744536153, + "narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-lib": { + "locked": { + "lastModified": 1743296961, + "narHash": "sha256-b1EdN3cULCqtorQ4QeWgLMrd5ZGOjLSLemfa00heasc=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "e4822aea2a6d1cdd36653c134cacfd64c97ff4fa", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1744536153, + "narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1761880412, + "narHash": "sha256-QoJjGd4NstnyOG4mm4KXF+weBzA2AH/7gn1Pmpfcb0A=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1666250dbe4141e4ca8aaf89b40a3a51c2e36144", + "rev": "a7fc11be66bdfb5cdde611ee5ce381c183da8386", "type": "github" }, "original": { @@ -65,7 +151,7 @@ "type": "github" } }, - "nixpkgs_2": { + "nixpkgs_4": { "locked": { "lastModified": 1744536153, "narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=", @@ -85,9 +171,10 @@ "inputs": { "advisory-db": "advisory-db", "crane": "crane", + "dioxus": "dioxus", "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs", - "rust-overlay": "rust-overlay" + "nixpkgs": "nixpkgs_3", + "rust-overlay": "rust-overlay_2" } }, "rust-overlay": { @@ -95,11 +182,29 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1761619008, - "narHash": "sha256-vp97eNmi5GG/+jlvnBpmG6EVO2F1+nqMQFF9GT2TIQg=", + "lastModified": 1744684506, + "narHash": "sha256-pDPDMT1rdkTWi8MIoZ67gT3L817R7P0Jo+PP+BrnyJI=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "7bc7d2f706ebe5479d230d2c6806b5dc757ae4cd", + "rev": "47beae969336c05e892e1e4a9dbaac9593de34ab", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, + "rust-overlay_2": { + "inputs": { + "nixpkgs": "nixpkgs_4" + }, + "locked": { + "lastModified": 1761878277, + "narHash": "sha256-6fCtyVdTzoQejwoextAu7dCLoy5fyD3WVh+Qm7t2Nhg=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "6604534e44090c917db714faa58d47861657690c", "type": "github" }, "original": { @@ -122,6 +227,21 @@ "repo": "default", "type": "github" } + }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 4a89c84..7742474 100644 --- a/flake.nix +++ b/flake.nix @@ -12,6 +12,7 @@ rust-overlay.url = "github:oxalica/rust-overlay"; crane.url = "github:ipetkov/crane"; + dioxus.url = "github:DioxusLabs/dioxus"; }; outputs = { @@ -21,6 +22,7 @@ rust-overlay, flake-utils, advisory-db, + dioxus, ... }: let name = "weaver"; @@ -28,7 +30,12 @@ flake-utils.lib.eachDefaultSystem (system: let pkgs = import nixpkgs { inherit system; - overlays = [(import rust-overlay)]; + overlays = [ + (import rust-overlay) + (_: prev: { + dioxus-cli = dioxus.packages.${prev.system}.dioxus-cli; + }) + ]; }; inherit (pkgs) lib; @@ -37,7 +44,7 @@ toolchain.default.override { # Set the build targets supported by the toolchain, # wasm32-unknown-unknown is required for trunk. - targets = ["wasm32-unknown-unknown"]; + targets = ["wasm32-unknown-unknown" "wasm32-wasip1" "wasm32-wasip2"]; extensions = [ "rust-src" "rust-analyzer" @@ -93,8 +100,8 @@ fileset = lib.fileset.unions [ ./Cargo.toml ./Cargo.lock + (lib.fileset.maybeMissing ./crates/weaver-server/Dioxus.lock) (craneLib.fileset.commonCargoSources ./crates/weaver-common) - (craneLib.fileset.commonCargoSources ./crates/weaver-workspace-hack) (craneLib.fileset.commonCargoSources crate) ]; }; @@ -178,24 +185,6 @@ partitionType = "count"; cargoNextestPartitionsExtraArgs = "--no-tests=pass"; }); - - # Ensure that cargo-hakari is up to date - "${name}-workspace-hakari" = craneLib.mkCargoDerivation { - inherit src; - pname = "${name}-workspace-hakari"; - cargoArtifacts = null; - doInstallCargoArtifacts = false; - - buildPhaseCargoCommand = '' - cargo hakari generate --diff # workspace-hack Cargo.toml is up-to-date - cargo hakari manage-deps --dry-run # all workspace crates depend on workspace-hack - cargo hakari verify - ''; - - nativeBuildInputs = with pkgs; [ - cargo-hakari - ]; - }; }; packages = @@ -218,15 +207,15 @@ }; devShells.default = let - dioxus-cli = pkgs.dioxus-cli.overrideAttrs (_: { - postPatch = '' - rm Cargo.lock - cp ${./crates/weaver-server/Dioxus.lock} Cargo.lock - ''; - cargoDeps = pkgs.rustPlatform.importCargoLock { - lockFile = ./crates/weaver-server/Dioxus.lock; - }; - }); + # dioxus-cli = pkgs.dioxus-cli.overrideAttrs (_: { + # postPatch = '' + # rm Cargo.lock + # cp ${./crates/weaver-server/Dioxus.lock} Cargo.lock + # ''; + # cargoDeps = pkgs.rustPlatform.importCargoLock { + # lockFile = ./crates/weaver-server/Dioxus.lock; + # }; + # }); cargoLock = builtins.fromTOML (builtins.readFile ./Cargo.lock); wasmBindgen = @@ -269,7 +258,6 @@ # Extra inputs can be added here; cargo and rustc are provided by default. packages = with pkgs; [ - cargo-hakari nixd alejandra diesel-cli diff --git a/lexicons/notebook/defs.json b/lexicons/notebook/defs.json index ca1a940..2cdfd1d 100644 --- a/lexicons/notebook/defs.json +++ b/lexicons/notebook/defs.json @@ -4,7 +4,7 @@ "defs": { "notebookView": { "type": "object", - "required": ["uri", "cid", "author", "record", "indexedAt"], + "required": ["uri", "cid", "authors", "record", "indexedAt"], "properties": { "title": { "type": "ref", "ref": "#title" }, @@ -12,8 +12,8 @@ "uri": { "type": "string", "format": "at-uri" }, "cid": { "type": "string", "format": "cid" }, "authors": { - "type": "ref", - "ref": "#authorListView" + "type": "array", + "items": { "type": "ref", "ref": "#authorListView" } }, "record": { "type": "unknown" }, "indexedAt": { "type": "string", "format": "datetime" } @@ -21,7 +21,7 @@ }, "entryView": { "type": "object", - "required": ["uri", "cid", "author", "record", "indexedAt"], + "required": ["uri", "cid", "authors", "record", "indexedAt"], "properties": { "title": { "type": "ref", "ref": "#title" }, @@ -29,8 +29,8 @@ "uri": { "type": "string", "format": "at-uri" }, "cid": { "type": "string", "format": "cid" }, "authors": { - "type": "ref", - "ref": "#authorListView" + "type": "array", + "items": { "type": "ref", "ref": "#authorListView" } }, "record": { "type": "unknown" }, "renderedView": { @@ -60,10 +60,9 @@ }, "authorListView": { "type": "object", - "required": ["profile", "index"], + "required": ["record", "index"], "properties": { "uri": { "type": "string", "format": "at-uri" }, - "cid": { "type": "string", "format": "cid" }, "record": { "type": "unknown" }, "index": { "type": "integer" } } @@ -89,6 +88,7 @@ } } }, + "bookEntryRef": { "type": "object", "required": ["entry"], diff --git a/lexicons/notebook/page.json b/lexicons/notebook/page.json index ab4226a..116b444 100644 --- a/lexicons/notebook/page.json +++ b/lexicons/notebook/page.json @@ -1,6 +1,6 @@ { "lexicon": 1, - "id": "sh.weaver.notebook.chapter", + "id": "sh.weaver.notebook.page", "defs": { "main": { "type": "record", -- knotmirror 0.0.1