diff --git a/crate/Cargo.lock b/crate/Cargo.lock index 99c0a5f..d75ae5d 100644 --- a/crate/Cargo.lock +++ b/crate/Cargo.lock @@ -1,29 +1,14 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. [[package]] -name = "autocfg" -version = "0.1.7" +name = "anyhow" +version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "backtrace" -version = "0.3.40" +name = "autocfg" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "backtrace-sys 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "backtrace-sys" -version = "0.1.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cc 1.0.46 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] name = "bitflags" @@ -35,11 +20,6 @@ name = "bumpalo" version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "cc" -version = "1.0.46" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "cfg-if" version = "0.1.10" @@ -51,7 +31,7 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -76,26 +56,6 @@ name = "enclose" version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "failure" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "backtrace 0.3.40 (registry+https://github.com/rust-lang/crates.io-index)", - "failure_derive 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "failure_derive" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "synstructure 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "futures" version = "0.1.29" @@ -114,9 +74,9 @@ name = "gloo-timers" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "js-sys 0.3.30 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", - "web-sys 0.3.30 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)", + "web-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -152,10 +112,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "js-sys" -version = "0.3.30" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "wasm-bindgen 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -259,11 +219,6 @@ name = "redox_syscall" version = "0.1.56" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "rustc-demangle" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "ryu" version = "1.0.2" @@ -276,8 +231,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "seed" -version = "0.4.2" -source = "git+https://github.com/seed-rs/seed#e29041f431c361dad7636fb03a41df3985a56435" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "cookie 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -286,14 +241,14 @@ dependencies = [ "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "gloo-timers 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "indexmap 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "js-sys 0.3.30 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)", "pulldown-cmark 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)", "version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)", "wasm-bindgen-futures 0.3.27 (registry+https://github.com/rust-lang/crates.io-index)", - "web-sys 0.3.30 (registry+https://github.com/rust-lang/crates.io-index)", + "web-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -301,12 +256,12 @@ name = "seed_rs_org" version = "0.1.0" dependencies = [ "pulldown-cmark 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "seed 0.4.2 (git+https://github.com/seed-rs/seed)", + "seed 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)", "wasm-bindgen-test 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", - "web-sys 0.3.30 (registry+https://github.com/rust-lang/crates.io-index)", + "web-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -357,17 +312,6 @@ dependencies = [ "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "synstructure" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "time" version = "0.1.42" @@ -444,18 +388,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "wasm-bindgen" -version = "0.2.53" +version = "0.2.55" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-macro 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-macro 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.53" +version = "0.2.55" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bumpalo 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -464,7 +408,7 @@ dependencies = [ "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "syn 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-shared 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-shared 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -474,35 +418,35 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "js-sys 0.3.30 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", - "web-sys 0.3.30 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)", + "web-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.53" +version = "0.2.55" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-macro-support 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-macro-support 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.53" +version = "0.2.55" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "syn 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-backend 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-shared 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-backend 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-shared 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.53" +version = "0.2.55" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -512,9 +456,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "js-sys 0.3.30 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)", "scoped-tls 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)", "wasm-bindgen-futures 0.3.27 (registry+https://github.com/rust-lang/crates.io-index)", "wasm-bindgen-test-macro 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -530,29 +474,29 @@ dependencies = [ [[package]] name = "wasm-bindgen-webidl" -version = "0.2.53" +version = "0.2.55" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "anyhow 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "syn 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-backend 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-backend 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)", "weedle 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "web-sys" -version = "0.3.30" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "js-sys 0.3.30 (registry+https://github.com/rust-lang/crates.io-index)", + "anyhow 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)", "sourcefile 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-webidl 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-webidl 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -583,19 +527,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" [metadata] +"checksum anyhow 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "9267dff192e68f3399525901e709a48c1d3982c9c072fa32f2127a0cb0babf14" "checksum autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" -"checksum backtrace 0.3.40 (registry+https://github.com/rust-lang/crates.io-index)" = "924c76597f0d9ca25d762c25a4d369d51267536465dc5064bdf0eb073ed477ea" -"checksum backtrace-sys 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)" = "5d6575f128516de27e3ce99689419835fce9643a9b215a14d2b5b685be018491" "checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" "checksum bumpalo 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ad807f2fc2bf185eeb98ff3a901bd46dc5ad58163d0fa4577ba0d25674d71708" -"checksum cc 1.0.46 (registry+https://github.com/rust-lang/crates.io-index)" = "0213d356d3c4ea2c18c40b037c3be23cd639825c18f25ee670ac7813beeef99c" "checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" "checksum console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "b8d976903543e0c48546a91908f21588a680a8c8f984df9a5d69feccb2b2a211" "checksum cookie 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "888604f00b3db336d2af898ec3c1d5d0ddf5e6d462220f2ededc33a87ac4bbd5" "checksum dbg 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4677188513e0e9d7adced5997cf9a1e7a3c996c994f90093325c5332c1a8b221" "checksum enclose 1.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "1056f553da426e9c025a662efa48b52e62e0a3a7648aa2d15aeaaf7f0d329357" -"checksum failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "f8273f13c977665c5db7eb2b99ae520952fe5ac831ae4cd09d80c4c7042b5ed9" -"checksum failure_derive 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0bc225b78e0391e4b8683440bf2e63c2deeeb2ce5189eab46e2b68c6d3725d08" "checksum futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)" = "1b980f2816d6ee8673b6517b52cb0e808a180efc92e5c19d02cdda79066703ef" "checksum getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)" = "14dbbfd5c71d70241ecf9e6f13737f7b5ce823821063188d7e46c41d371eebd5" "checksum gloo-timers 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "31e1136fb2586cee1d7eeea23a85eab15f9336294bb8fccafac62fa3410a1f28" @@ -603,7 +543,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" "checksum indexmap 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712d7b3ea5827fcb9d4fda14bf4da5f136f0db2ae9c8f4bd4e2d1c6fde4e6db2" "checksum itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f" -"checksum js-sys 0.3.30 (registry+https://github.com/rust-lang/crates.io-index)" = "a60f6ca5eb7ae3014e3ab34e3189a1560267245216e19f76a021a4c669817e62" +"checksum js-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)" = "1c840fdb2167497b0bd0db43d6dfe61e91637fa72f9d061f8bd17ddc44ba6414" "checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" "checksum libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)" = "1a31a0627fdf1f6a39ec0dd577e101440b7db22672c0901fe00a9a6fbb5c24e8" "checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" @@ -618,17 +558,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" "checksum quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" "checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" -"checksum rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" "checksum ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bfa8506c1de11c9c4e4c38863ccbe02a305c8188e85a05a784c9e11e1c3910c8" "checksum scoped-tls 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2" -"checksum seed 0.4.2 (git+https://github.com/seed-rs/seed)" = "" +"checksum seed 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dc7f19588e95ec9196a3957a5aa36e94604475542967b319a8d71d51bb1cb9f0" "checksum serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)" = "0c4b39bd9b0b087684013a792c59e3e07a46a01d2322518d8a1104641a0b1be0" "checksum serde_derive 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)" = "ca13fc1a832f793322228923fbb3aba9f3f44444898f835d31ad1b74fa0a2bf8" "checksum serde_json 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)" = "2f72eb2a68a7dc3f9a691bfda9305a1c017a6215e5a4545c258500d2099a37c2" "checksum smallvec 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "533e29e15d0748f28afbaf4ff7cab44d73e483a8e50b38c40bd13b7f3d48f542" "checksum sourcefile 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4bf77cb82ba8453b42b6ae1d692e4cdc92f9a47beaf89a847c8be83f4e328ad3" "checksum syn 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "0e7bedb3320d0f3035594b0b723c8a28d7d336a3eda3881db79e61d676fb644c" -"checksum synstructure 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3f085a5855930c0441ca1288cf044ea4aecf4f43a91668abdb870b4ba546a203" "checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" "checksum unicase 2.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2e2e6bd1e59e56598518beb94fd6db628ded570326f0a98c679a304bd9f00150" "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" @@ -640,16 +578,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" "checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" "checksum version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "078775d0255232fb988e6fccf26ddc9d1ac274299aaedcedce21c6f72cc533ce" -"checksum wasm-bindgen 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)" = "4c29d57d5c3b3bc53bbe35c5a4f4a0df994d870b7d3cb0ad1c2065e21822ae41" -"checksum wasm-bindgen-backend 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)" = "aa2868fa93e5bf36a9364d1277a0f97392748a8217d9aa0ec3f1cdbdf7ad1a60" +"checksum wasm-bindgen 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)" = "29ae32af33bacd663a9a28241abecf01f2be64e6a185c6139b04f18b6385c5f2" +"checksum wasm-bindgen-backend 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)" = "1845584bd3593442dc0de6e6d9f84454a59a057722f36f005e44665d6ab19d85" "checksum wasm-bindgen-futures 0.3.27 (registry+https://github.com/rust-lang/crates.io-index)" = "83420b37346c311b9ed822af41ec2e82839bfe99867ec6c54e2da43b7538771c" -"checksum wasm-bindgen-macro 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)" = "41e80594782a241bf3d92ee5d1247b8fb496250a8a2ff1e136942d433fbbce14" -"checksum wasm-bindgen-macro-support 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)" = "74b9950355b1d92ca09de0984bdd4de7edda5e8af12daf0c052a0a075e8c9157" -"checksum wasm-bindgen-shared 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)" = "7493fe67ad99672ef3de3e6ba513fb03db276358c8cc9588ce5a008c6e48ad68" +"checksum wasm-bindgen-macro 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)" = "87fcc747e6b73c93d22c947a6334644d22cfec5abd8b66238484dc2b0aeb9fe4" +"checksum wasm-bindgen-macro-support 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)" = "3dc4b3f2c4078c8c4a5f363b92fcf62604c5913cbd16c6ff5aaf0f74ec03f570" +"checksum wasm-bindgen-shared 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)" = "ca0b78d6d3be8589b95d1d49cdc0794728ca734adf36d7c9f07e6459508bb53d" "checksum wasm-bindgen-test 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)" = "a2d9693b63a742d481c7f80587e057920e568317b2806988c59cd71618bc26c1" "checksum wasm-bindgen-test-macro 0.2.50 (registry+https://github.com/rust-lang/crates.io-index)" = "0789dac148a8840bbcf9efe13905463b733fa96543bfbf263790535c11af7ba5" -"checksum wasm-bindgen-webidl 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)" = "8272d9a8831be66b30908996b71b3eaf9b83de050f89e4dc34826a19980eb59d" -"checksum web-sys 0.3.30 (registry+https://github.com/rust-lang/crates.io-index)" = "0232f38e5c66384edaedaa726ae2d6313e3ed3ae860693c497a3193af3e161ce" +"checksum wasm-bindgen-webidl 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)" = "3126356474ceb717c8fb5549ae387c9fbf4872818454f4d87708bee997214bb5" +"checksum web-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)" = "98405c0a2e722ed3db341b4c5b70eb9fe0021621f7350bab76df93b09b649bbf" "checksum weedle 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3bb43f70885151e629e2a19ce9e50bd730fd436cfd4b666894c9ce4de9141164" "checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" diff --git a/crate/Cargo.toml b/crate/Cargo.toml index 885ec54..7a6eaf8 100644 --- a/crate/Cargo.toml +++ b/crate/Cargo.toml @@ -24,8 +24,8 @@ wasm-bindgen-test = "^0.2.50" # sync with `wasm-bindgen` wasm-bindgen = "^0.2.50" # sync with `wasm-bindgen-test` serde = { version = "^1.0.102", features = ['derive'] } serde_json = "^1.0.41" -#seed = "0.5.0" -seed = { git = "https://github.com/seed-rs/seed", branch="master" } +seed = "0.5.0" +#seed = { git = "https://github.com/seed-rs/seed", branch="master" } #seed = { path = "../../seed" } [dependencies.web-sys] diff --git a/crate/guides/about.md b/crate/guides/about.md index 62e41b9..b37bad7 100644 --- a/crate/guides/about.md +++ b/crate/guides/about.md @@ -32,7 +32,9 @@ are worth it. ## Where to start if you're familiar with existing frontend frameworks -The [todomvc example](https://github.com/seed-rs/seed/tree/master/examples/todomvc) is an implementation of the [TodoMVC project](http://todomvc.com/), +Check out the (Code comparison)[https://seed-rs.org/guide/code-comarison]) section of this guide. Additionally, +the [todomvc example](https://github.com/seed-rs/seed/tree/master/examples/todomvc) is an implementation of +the [TodoMVC project](https://todomvc.com/), which has example code in other frameworks that produce identitcal apps. Compare the example in this project to one on that page that uses a framework you're familiar with. diff --git a/crate/guides/changelog.md b/crate/guides/changelog.md index 0e71898..62a2451 100644 --- a/crate/guides/changelog.md +++ b/crate/guides/changelog.md @@ -1,5 +1,25 @@ # Changelog +## 0.5.0 +- Added helper `seed::canvas()`, and `seed::canvas_context()` helper functions. +- Fixed `Url` parsing (resolves issue with hash routing). +- [BREAKING] `From for Url` changed to `TryFrom for Url`. +- Fixed jumping cursor in inputs (#158) . +- Added method `orders.after_next_render(Option)` (#207). +- Fixed a bug with back/forward routing to the landing page (#296). +- Deprecated `Init` struct, replacing it with `BeforeMount` and `AfterMount` structs to +better denote state before and after mounting the `App` occurs. +- Added a new function `builder` which replaces `build` as part of deprecating `Init`. +- Added a new function `build_and_start` which replaces `finish` as part of deprecating `Init`. +- Added `IntoInit`and `IntoAfterMount` traits. It is possible to use these +in place of a closure or function to produce the corresponding `Init` and `AfterMount` structs. +- Messages sent from `IntoAfterMount` will now be run after the routing message. +- Added example `app_builder`. +- `events::Listener` is included in `prelude`. +- `()`s have been replaced with structs - e.g. `GMs = ()` => `GMs = UndefinedGMs`. +- `WindowEvents` alias changed to `WindowEventsFn` for consistency with other `*Fn`. +- Commented builder and helper methods. + ## v0.4.2 - Added an `Init` struct, which can help with initial routing (Breaking) - The `routes` function now returns an `Option` (Breaking) diff --git a/crate/guides/code_comparison.md b/crate/guides/code_comparison.md new file mode 100644 index 0000000..dfd31de --- /dev/null +++ b/crate/guides/code_comparison.md @@ -0,0 +1,151 @@ +# Comparisons to React and Vue code + +On this page, we'll show equivalent code snippets in Seed, and other frameworks. For now, we + include examples from `React` and `Vue`. +The [TodoMVC example](https://github.com/seed-rs/seed/tree/master/examples/todomvc) can be used to +compare to [its implementation in other frameworks](http://todomvc.com/). + +Note that there are multiple ways to manage state in React, we've picked one where we store state +in the top-level component, and use functional components thereafter. +A closer structure match would be using it coupled with Redux. The Context API's an additional +way to handle it. We're also using Typescript. + +## A simple template, ready for state management + +## React + +```jsx +import * as React from "react" +import * as ReactDOM from "react-dom" + +interface MainProps {} +interface MainState { + val: number +} + +class Main extends React.Component { + constructor(props) { + super(props) + + this.state = { + val: 0 + } + + this.increment = this.increment.bind(this) + } + + increment() { + this.setState({val: this.state.val + 1}) + } + + render() { + return ( + + ) + } +} + +ReactDOM.render(
, document.getElementById("app")) +``` + + +## Seed +From the Seed quickstart repo + +```rust +use seed::{*, prelude::*}; + +struct Model { + pub val: i32, +} + +impl Default for Model { // In this case, we could derive `Default` instead. + fn default() -> Self { + Self { + val: 0, + } + } +} + +#[derive(Clone)] +enum Msg { + Increment, +} + +fn update(msg: Msg, model: &mut Model, _: &mut impl Orders) { + match msg { + Msg::Increment => model.val += 1, + } +} + +fn view(model: &Model) -> impl View { + button![ + simple_ev(Ev::Click, Msg::Increment), + format!("Hello, World × {}", model.val) + ] +} + +#[wasm_bindgen(start)] +pub fn render() { + App::builder(update, view) + .build_and_start(); +} +``` + +## A component with attributes, styles, and events + +## React + +```jsx +const Form = ({name, color, value, changeText, doIt}: + {name: string, color: string, value: number, changeText: Function, doIt: Function}) { + // A description + const style: CSSProperties = {fontSize: 12, color: color} + + return ( + <> + changeText(ev)} /> + + + + ) +} +``` + +## Seed + +```rust +/// A description +fn form(name: &str, color: &str, value: u32) -> Vec> { + let style = style!{St::fontSize => px(12), St::Color => color}; + + vec![ + input![ attrs!{At::Value => value}, input_ev(Ev::Input, Msg::ChangeText)], + + button![ + class!("buttons"), + attrs!{At::Title => "Click me!"}, + style, + simple_ev(Ev::Click, Msg::DoIt) + name, + ] + ] + +} +``` + + +## Reusable UI items (todo) + +## HTTP Requests (todo) + +## Configuration files and tooling (todo) diff --git a/crate/guides/events.md b/crate/guides/events.md index f5a458f..2d3cb34 100644 --- a/crate/guides/events.md +++ b/crate/guides/events.md @@ -176,7 +176,7 @@ where it handles text input triggered by a key press, and uses prevent_default() ## Window events We handle events triggered by the overall window specially, since it doesn't fit directly -into our virtual DOM. We pass to `Seed::App::build::window_events()` a function that accepts a +into our virtual DOM. We pass to `App::builder::window_events()` a function that accepts a ref to `Model`, and returns a `Vec`. We use it to control which listeners are attached to the window based on the model. Excerpt from the [window_events](https://github.com/seed-rs/seed/blob/master/examples/window_events/src/lib.rs) @@ -211,10 +211,9 @@ fn window_events(model: &Model) -> Vec> { #[wasm_bindgen] pub fn render() { - seed::App::build(Init::new(Model::default()), update, view) + App::builder(update, view) .window_events(window_events) - .finish() - .run(); + .build_and_start() } ``` If `model.watching` is `true`, the window listens for keyboard and mouse events, then diff --git a/crate/guides/fetch.md b/crate/guides/fetch.md index 5d24b74..4242ff0 100644 --- a/crate/guides/fetch.md +++ b/crate/guides/fetch.md @@ -59,15 +59,15 @@ fn view(model: &Model) -> Node { )] } -fn init(_: Url, orders: &mut impl Orders) -> Init { +fn after_mount(_: Url, orders: &mut impl Orders) -> AfterMount { orders.perform_cmd(fetch_data()); - Init::new(Model::default()) + AfterMount::default() } #[wasm_bindgen] pub fn render() { - let app = seed::App::build(init, update, view) - .finish() + let app = seed::App::builder(update, view) + .after_mount(after_mount) .run(); app.update(Msg::FetchData); @@ -102,6 +102,7 @@ fn view(model: &Model) -> Vec> { } ``` + ## Sending data Example showing a POST request where we send data to a server and receive the response, @@ -170,4 +171,4 @@ fn view(model: &Model) -> Node { Reference the `Request` API docs (linked above) for a full list of methods available to configure the request, and links to the `MDN` docs describing -them. (eg: `credentials`, `mode`, `integrity`) +them. (eg: `credentials`, `mode`, `integrity`) \ No newline at end of file diff --git a/crate/guides/misc.md b/crate/guides/misc.md index 556c63f..96eccd1 100644 --- a/crate/guides/misc.md +++ b/crate/guides/misc.md @@ -32,9 +32,7 @@ Rust data structure that implements serde's Serialize. Example use: ```rust extern crate serde; -#[macro_use] -extern crate serde_derive; -extern crate serde_json; +use seed::{*, prelude::*}; // ... #[derive(Serialize, Deserialize)] @@ -131,7 +129,7 @@ fn view(model: &Model) -> Vec> { Additionally, use `seed::html_document()` in the same way, to return a [HtmlDocument](https://rustwasm.github.io/wasm-bindgen/api/web_sys/struct.HtmlDocument.html) -We also include `seed::canvas()`, and `seed::canvas_context()`. (Unreleased) +We also include `seed::canvas()`, and `seed::canvas_context()`. You can call `seed::cookies()` to retrieve all cookies from the current `HtmlDocument`. diff --git a/crate/guides/quickstart.md b/crate/guides/quickstart.md index c1eecaf..51cfb7e 100644 --- a/crate/guides/quickstart.md +++ b/crate/guides/quickstart.md @@ -39,8 +39,7 @@ The subsequent ones load your app's wasm modules. The quickstart repo includes this file. You will eventually need to modify it to change the page's title, add a description, favicon, stylesheet etc. -`Cargo.toml`, which is a file created by Cargo that describes your app, needs `wasm-bindgen`, `web-sys`, and `seed` as depdendencies, -and crate-type +`Cargo.toml`, which is a file created by Cargo that describes your app, needs `wasm-bindgen`, `web-sys`, and `seed` as dependencies, and crate-type of `"cdylib"`. The version in the quickstart repo has these set up already. Example: ```toml @@ -54,24 +53,21 @@ edition = "2018" crate-type = ["cdylib"] [dependencies] -seed = "^0.4.1" +seed = "^0.5.0" wasm-bindgen = "^0.2.50" ``` ## A short example Here's an example demonstrating structure and syntax; it can be found in working form -in the [counter example](https://github.com/seed-rs/seed/tree/master/examples/counter) +in the [counter example](https://github.com/seed-rs/seed/tree/master/examples/counter). Descriptions of its parts are in the Guide section below. Its structure follows [The Elm Architecture](https://guide.elm-lang.org/architecture/). _lib.rs_: ```rust -#[macro_use] -extern crate seed; -use seed::prelude::*; - +use seed::{*, prelude::*}; // Model @@ -161,7 +157,7 @@ fn view(model: &Model) -> impl View { #[wasm_bindgen(start)] pub fn render() { - seed::App::build(|_, _| Init::new(Model::default()), update, view) + App::builder(update, view) .build_and_start(); } ``` @@ -187,4 +183,4 @@ When server(s) are running, open [127.0.0.1:8000](http://127.0.0.1:8000) in your ## Resources - [Awesome-seed-rs](https://github.com/seed-rs/awesome-seed-rs): A curated list of resources - [Seed Realworld](https://github.com/seed-rs/seed-rs-realworld): A detailed realworld example site -- [Engineering Rust Web Applications](https://erwabook.com/): A book describing full-stack Rust web-development, using Seed for the frontend +- [Engineering Rust Web Applications](https://erwabook.com/): A book describing full-stack Rust web-development, using Seed for the frontend \ No newline at end of file diff --git a/crate/guides/routing.md b/crate/guides/routing.md index 46fe69f..08a9061 100644 --- a/crate/guides/routing.md +++ b/crate/guides/routing.md @@ -40,10 +40,9 @@ fn routes(url: Url) -> Option { #[wasm_bindgen(start)] pub fn render() { - seed::App::build(|_, _| Init::new(Model::default()), update, view) + App::builder(update, view) .routes(routes) - .finish() - .run(); + .build_and_start(); } ``` diff --git a/crate/guides/structure.md b/crate/guides/structure.md index e278faa..965365c 100644 --- a/crate/guides/structure.md +++ b/crate/guides/structure.md @@ -68,7 +68,7 @@ enum Msg { ``` The update [function]( https://doc.rust-lang.org/book/ch03-03-how-functions-work.html) -you pass to `seed::App::build(` describes how the state should change, upon +you pass to `App::builder(` describes how the state should change, upon receiving each type of message. It's the only place where the model is changed. It accepts a message, and model as parameters, and returns an `Update` struct. `Update` contains `ShouldRender` and `Effect` enums. `ShouldRender` and its variants are imported in the prelude, @@ -141,7 +141,7 @@ See the [view section](https://seed-rs.org/guide/view) for details. ## Initializing -To start your app, call the `seed::App::build` method, which takes the following parameters: +To start your app, call the `App::builder` method, which takes the following parameters: - An `init` function which accepts an initial routing, initial orders, and outputs an [Init struct](https://docs.rs/seed/0.4.1/seed/struct.Init.html) (imported in the prelude), @@ -160,16 +160,16 @@ And must must complete with the method `.build_and_start();`. `.mount()` takes a single argument, which can be the id of the element you wish to mount in, a `web_sys::Element`, or a `web_sys::HtmlElement`. Examples: -`seed::App::build(|_, _| Model::default(), update, view).mount(seed::body())` -`seed::App::build(|_, _| Model::default(), update, view).mount('a_div_id`)` +`App::builder(update, view).mount(seed::body())` +`App::builder(update, view).mount('a_div_id`)` ``` -seed::App::build(|_, _| Model::default(), update, view).mount( +App::builder(update, view).mount( seed::body().querySelector("section").unwrap().unwrap() ) ``` -The `seed::App::build` call must be wrapped in a function with the `#[wasm_bindgen(start)]` invocation. +The `App::builder` call must be wrapped in a function with the `#[wasm_bindgen(start)]` invocation. This will render your app to the element holding the id you passed; in the case of this example, "main". The only part of the web page Seed will interact with is that element, so you can @@ -179,7 +179,7 @@ Example, with optional methods: ```rust #[wasm_bindgen(start)] pub fn render() { - seed::App::build(|_, _| Init::new(Model::default()), update, view) + App::builder(update, view) .mount("main") .routes(routes) .window_events(window_events) @@ -187,31 +187,27 @@ pub fn render() { } ``` -Example of using a standalone `init` function: +Example of using an `after_mount` function: ```rust -fn init(url: Url, orders: &mut impl Orders) -> Init { - Init::new(Model::default()) +fn after_mount(url: Url, orders: &mut impl Orders) -> AfterMount { + AfterMount::default() } #[wasm_bindgen(start)] pub fn render() { - seed::App::build(init, update, view) + App::builder(update, view) + .after_mount(after_mount) .build_and_start(); } ``` -`Init` has the following fields: +`AfterMount` has the following fields: - `model`: The initial model - `url_handling`: A [Urlhandling](https://docs.rs/seed/0.4.1/seed/enum.UrlHandling.html) enum, which has variants `PassToRoutes`: default with `Init::new()`), and `None` - - `mount_type`: A [MountType](https://docs.rs/seed/0.4.1/seed/enum.MountType.html) enum, which has variants `Append`: default with `Init::new()`, - Leave the previously existing elements in the mount alone. This does not make guarantees of - elements added after the `App` has been mounted), - and `Takeover`: Take control of previously existing elements in the mount. This does not make guarantees of - elements added after the `App` has been mounted. Note that existing elements in the DOM will - be recreated. This can be dangerous for script tags and other, similar tags. -`Init::new()` covers the most common use-cases of the `Init`, but pass an `Init` literal if you'd -like to use `url_handling` or `mount_type`. `UrlHandling` and `MountType` are imported in the prelude. +`AfterMount::default()` covers the most common use-cases, where the model is initialized with its + `default::Default` implementation. (This is also true if we don't use the `.after_mount()` method. + You can pass a different model by using `after_mount::new(model)`, where `model` here is your model. diff --git a/crate/guides/view.md b/crate/guides/view.md index 49e66d5..8be76a8 100644 --- a/crate/guides/view.md +++ b/crate/guides/view.md @@ -6,11 +6,11 @@ is represented by a macro, eg `div![]`. These act as functions that accept an ar number of parameters, in any order: They handle the parameters based exclusively on type. The view's defined by a function that's passed to -[seed::App::build](https://docs.rs/seed/0.4.2/seed/struct.App.html#method.build). This takes a `&Model` +[App::builder](https://docs.rs/seed/0.4.2/seed/struct.App.html#method.build). This takes a `&Model` as its parameter, and outputs something that implements the ` View` trait, which is imported in the prelude. Usually, this is a `Node`, or `Vec`, representing all nodes that will be inserted as children on the top-level one. (The top-level `Node` is in the html file, and specified with -[seed::App::build.mount()](https://docs.rs/seed/0.4.2/seed/struct.AppBuilder.html#method.mount), +[App::builder.mount()](https://docs.rs/seed/0.4.2/seed/struct.AppBuilder.html#method.mount), or as a default, the element with id `app`). It may composed into sub-functions, which can be thought of like components in other frameworks. @@ -48,8 +48,7 @@ Created using the `empty![]` macro, or `seed::empty()`. Elements are created using macros, named by the lowercase name of each element, and imported into the global namespace. Eg `div!` above. We use this code to import them: ```rust -#[macro_use] -extern crate seed; +use seed::{*, prelude::*}; ``` These macros accept any combination of the following parameters: @@ -346,13 +345,13 @@ fn draw() { ctx.line_to(200., 100.); ctx.stroke(); } -``` #[wasm_bindgen(start)] pub fn render() { - seed::App::build(|_, _| Init::new(Model {}), update, view).build_and_start(); + App::builder(update, view).build_and_start(); draw(); } +``` ## Components diff --git a/crate/src/guide.rs b/crate/src/guide.rs index 8dc8809..a0dce86 100644 --- a/crate/src/guide.rs +++ b/crate/src/guide.rs @@ -30,6 +30,7 @@ macro_rules! guide { pub fn guides() -> Vec { vec![ guide!(slug: "about", menu_title: "About", file_name: "about", prepend_menu_divider: false), + guide!(slug: "code-comparison", menu_title: "Code comparison", file_name: "code_comparison", prepend_menu_divider: false), guide!(slug: "quickstart", menu_title: "Quickstart", file_name: "quickstart", prepend_menu_divider: false), guide!(slug: "prereqs", menu_title: "Prereqs", file_name: "prereqs", prepend_menu_divider: false), guide!(slug: "structure", menu_title: "Structure", file_name: "structure", prepend_menu_divider: false), diff --git a/crate/src/lib.rs b/crate/src/lib.rs index d4460df..4f39b98 100644 --- a/crate/src/lib.rs +++ b/crate/src/lib.rs @@ -18,7 +18,7 @@ use serde_json; use std::{convert::identity, fmt}; use Visibility::*; -const SEED_VERSION: &str = "0.4.2 (Nov 05, 2019)"; +const SEED_VERSION: &str = "0.5.0 (Dec 04, 2019)"; const TITLE_SUFFIX: &str = "Seed"; const STORAGE_KEY: &str = "seed"; const USER_AGENT_FOR_PRERENDERING: &str = "ReactSnap"; @@ -57,6 +57,14 @@ fn local_storage() -> storage::Storage { storage::get_storage().expect("get local storage") } +// ------ ------ +// Before Mount +// ------ ------ + +fn before_mount(_: Url) -> BeforeMount { + BeforeMount::new().mount_type(MountType::Takeover) +} + // ------ ------ // Model // ------ ------ @@ -144,10 +152,13 @@ impl Page { } // ------ ------ -// Init +// After Mount // ------ ------ -pub fn init(url: Url, orders: &mut impl Orders) -> Init { +pub fn after_mount( + url: Url, + orders: &mut impl Orders, +) -> AfterMount { let guides = guide::guides(); let model = Model { page: Page::from_route_and_replace_history(&url.into(), &guides), @@ -162,11 +173,7 @@ pub fn init(url: Url, orders: &mut impl Orders) -> Init { orders.send_msg(Msg::UpdatePageTitle); - Init { - model, - url_handling: UrlHandling::None, - mount_type: MountType::Takeover, - } + AfterMount::new(model).url_handling(UrlHandling::None) } fn load_config() -> Config { @@ -335,5 +342,9 @@ pub fn view(model: &Model) -> impl View { #[wasm_bindgen(start)] pub fn run() { - App::build(init, update, view).routes(routes).build_and_start(); + App::builder(update, view) + .before_mount(before_mount) + .after_mount(after_mount) + .routes(routes) + .build_and_start(); }