Bring in web component library

This commit is contained in:
Jeremy Wall 2023-11-25 09:37:29 -05:00
parent 39456bb35d
commit 50eecf9a7c
3 changed files with 159 additions and 11 deletions

160
Cargo.lock generated
View File

@ -568,7 +568,7 @@ dependencies = [
"atty",
"bitflags",
"clap_lex",
"indexmap",
"indexmap 1.9.2",
"once_cell",
"strsim",
"termcolor",
@ -832,6 +832,12 @@ dependencies = [
"serde",
]
[[package]]
name = "equivalent"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
[[package]]
name = "errno"
version = "0.2.8"
@ -1105,7 +1111,7 @@ dependencies = [
"futures-sink",
"futures-util",
"http",
"indexmap",
"indexmap 1.9.2",
"slab",
"tokio",
"tokio-util",
@ -1127,13 +1133,19 @@ dependencies = [
"ahash",
]
[[package]]
name = "hashbrown"
version = "0.14.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156"
[[package]]
name = "hashlink"
version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "69fe1fcf8b4278d860ad0548329f892a3631fb63f82574df68275f34cdbe0ffa"
dependencies = [
"hashbrown",
"hashbrown 0.12.3",
]
[[package]]
@ -1324,7 +1336,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399"
dependencies = [
"autocfg",
"hashbrown",
"hashbrown 0.12.3",
]
[[package]]
name = "indexmap"
version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f"
dependencies = [
"equivalent",
"hashbrown 0.14.2",
]
[[package]]
@ -1427,6 +1449,7 @@ dependencies = [
"chrono",
"console_error_panic_hook",
"js-sys",
"maud",
"recipes",
"reqwasm",
"serde",
@ -1438,6 +1461,7 @@ dependencies = [
"tracing-subscriber",
"tracing-web",
"wasm-bindgen",
"wasm-web-component",
"web-sys",
]
@ -1559,6 +1583,28 @@ version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "73cbba799671b762df5a175adf59ce145165747bb891505c43d09aefbbf38beb"
[[package]]
name = "maud"
version = "0.25.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b0bab19cef8a7fe1c18a43e881793bfc9d4ea984befec3ae5bd0415abf3ecf00"
dependencies = [
"itoa 1.0.5",
"maud_macros",
]
[[package]]
name = "maud_macros"
version = "0.25.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0be95d66c3024ffce639216058e5bae17a83ecaf266ffc6e4d060ad447c9eed2"
dependencies = [
"proc-macro-error",
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "memchr"
version = "2.5.0"
@ -1592,7 +1638,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8603921e1f54ef386189335f288441af761e0fc61bcb552168d9cedfe63ebc70"
dependencies = [
"hyper",
"indexmap",
"indexmap 1.9.2",
"ipnet",
"metrics",
"metrics-util",
@ -1638,7 +1684,7 @@ checksum = "f7d24dc2dbae22bff6f1f9326ffce828c9f07ef9cc1e8002e5279f845432a30a"
dependencies = [
"crossbeam-epoch",
"crossbeam-utils",
"hashbrown",
"hashbrown 0.12.3",
"metrics",
"num_cpus",
"parking_lot 0.12.1",
@ -1924,6 +1970,40 @@ version = "0.2.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
[[package]]
name = "proc-macro-crate"
version = "1.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919"
dependencies = [
"once_cell",
"toml_edit",
]
[[package]]
name = "proc-macro-error"
version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
dependencies = [
"proc-macro-error-attr",
"proc-macro2",
"quote",
"syn",
"version_check",
]
[[package]]
name = "proc-macro-error-attr"
version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
dependencies = [
"proc-macro2",
"quote",
"version_check",
]
[[package]]
name = "proc-macro2"
version = "1.0.49"
@ -2406,7 +2486,7 @@ dependencies = [
"futures-util",
"hashlink",
"hex",
"indexmap",
"indexmap 1.9.2",
"itoa 1.0.5",
"libc",
"libsqlite3-sys",
@ -2458,6 +2538,16 @@ dependencies = [
"futures-rustls",
]
[[package]]
name = "str_inflector"
version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec0b848d5a7695b33ad1be00f84a3c079fe85c9278a325ff9159e6c99cef4ef7"
dependencies = [
"lazy_static",
"regex",
]
[[package]]
name = "stringprep"
version = "0.1.2"
@ -2487,7 +2577,7 @@ source = "git+https://github.com/sycamore-rs/sycamore/?rev=5d49777b4a66fb5730c40
dependencies = [
"ahash",
"futures",
"indexmap",
"indexmap 1.9.2",
"js-sys",
"paste",
"sycamore-core",
@ -2538,7 +2628,7 @@ source = "git+https://github.com/sycamore-rs/sycamore/?rev=5d49777b4a66fb5730c40
dependencies = [
"ahash",
"bumpalo",
"indexmap",
"indexmap 1.9.2",
"serde",
"slotmap",
"smallvec",
@ -2584,7 +2674,7 @@ version = "0.8.2"
source = "git+https://github.com/sycamore-rs/sycamore/?rev=5d49777b4a66fb5730c40898fd2ee8cde15bcdc3#5d49777b4a66fb5730c40898fd2ee8cde15bcdc3"
dependencies = [
"html-escape",
"indexmap",
"indexmap 1.9.2",
"js-sys",
"once_cell",
"sycamore-core",
@ -2761,6 +2851,23 @@ dependencies = [
"tracing",
]
[[package]]
name = "toml_datetime"
version = "0.6.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1"
[[package]]
name = "toml_edit"
version = "0.19.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421"
dependencies = [
"indexmap 2.1.0",
"toml_datetime",
"winnow",
]
[[package]]
name = "tower"
version = "0.4.13"
@ -3141,6 +3248,30 @@ dependencies = [
"quote",
]
[[package]]
name = "wasm-web-component"
version = "0.2.0"
source = "git+https://github.com/zaphar/wasm-web-components.git?rev=v0.3.0#e3ba5170c0907da0c32af27447f1cd26fc6b6434"
dependencies = [
"js-sys",
"wasm-bindgen",
"wasm-bindgen-test",
"wasm-web-component-macros",
"web-sys",
]
[[package]]
name = "wasm-web-component-macros"
version = "0.2.0"
source = "git+https://github.com/zaphar/wasm-web-components.git?rev=v0.3.0#e3ba5170c0907da0c32af27447f1cd26fc6b6434"
dependencies = [
"proc-macro-crate",
"proc-macro2",
"quote",
"str_inflector",
"syn",
]
[[package]]
name = "web-sys"
version = "0.3.60"
@ -3300,6 +3431,15 @@ version = "0.42.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0"
[[package]]
name = "winnow"
version = "0.5.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "829846f3e3db426d4cee4510841b71a8e58aa2a76b1132579487ae430ccd9c7b"
dependencies = [
"memchr",
]
[[package]]
name = "zeroize"
version = "1.5.7"

View File

@ -14,6 +14,7 @@ let
cargoDeps = (pkgs.rustPlatform.importCargoLock { inherit lockFile; outputHashes = {
# I'm maintaining some patches for these so the lockfile hashes are a little
# incorrect. We override those here.
"wasm-web-component-0.2.0" = "sha256-quuPgzGb2F96blHmD3BAUjsWQYbSyJGZl27PVrwL92k=";
"sycamore-0.8.2" = "sha256-D968+8C5EelGGmot9/LkAlULZOf/Cr+1WYXRCMwb1nQ=";
"sqlx-0.6.2" = "sha256-X/LFvtzRfiOIEZJiVzmFvvULPpjhqvI99pSwH7a//GM=";
};
@ -41,4 +42,4 @@ stdenv.mkDerivation {
cp -r index.html $out
cp -r favicon.ico $out
'';
}
}

View File

@ -25,6 +25,8 @@ async-trait = "0.1.57"
base64 = "0.21.0"
sycamore-router = "0.8"
js-sys = "0.3.60"
wasm-web-component = { git = "https://github.com/zaphar/wasm-web-components.git", rev = "v0.3.0" }
maud = "*"
[dependencies.serde]
version = "<=1.0.171"
@ -52,9 +54,14 @@ version = "= 0.2.84"
version = "0.3"
features = [
"Event",
"CustomEvent",
"EventTarget",
"History",
"HtmlAnchorElement",
"HtmlDivElement",
"HtmlSpanElement",
"HtmlInputElement",
"HtmlTextAreaElement",
"HtmlBaseElement",
"HtmlDialogElement",
"KeyboardEvent",