commit 9536cf0dbee8341da66aa36baa0818cc74d409f5 Author: Romulus21 Date: Fri Oct 9 12:33:27 2026 +0200 first commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3b61748 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/target +lisette.db* diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..a08e828 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,3314 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "aho-corasick" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c982642fa9e8606056828ee9a8505737230110bb1099153c79efe865c59d12ba" +dependencies = [ + "memchr", +] + +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + +[[package]] +name = "any_spawner" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1384d3fe1eecb464229fcf6eebb72306591c56bf27b373561489458a7c73027d" +dependencies = [ + "futures", + "thiserror 2.0.21", + "tokio", + "wasm-bindgen-futures", +] + +[[package]] +name = "anyhow" +version = "1.0.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470" + +[[package]] +name = "async-lock" +version = "3.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290f7f2596bd5b78a9fec8088ccd89180d7f9f55b94b0576823bbbdc72ee8311" +dependencies = [ + "event-listener", + "event-listener-strategy", + "pin-project-lite", +] + +[[package]] +name = "async-once-cell" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4288f83726785267c6f2ef073a3d83dc3f9b81464e9f99898240cced85fce35a" + +[[package]] +name = "async-trait" +version = "0.1.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82f6aeea286b8eb4dd3431a1be1b59d290ace00f5bfd8e2a159bc2a05e2c1667" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.6", +] + +[[package]] +name = "atoi" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f28d99ec8bfea296261ca1af174f24225171fea9664ba9003cbebee704810528" +dependencies = [ + "num-traits", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "attribute-derive" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2f9ef7a68684657ce9da341c934c73b63df7a3585a61e366d84c84ed5d3d167" +dependencies = [ + "attribute-derive-macro", + "manyhow", + "proc-macro2", + "quote", + "syn 3.0.6", +] + +[[package]] +name = "attribute-derive-macro" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "300d426e5e73549125bb8e4649bdd5508f82c94ddf898fb0517246e71dfb8e98" +dependencies = [ + "collection_literals", + "interpolator", + "manyhow", + "proc-macro-utils", + "proc-macro2", + "quote", + "quote-use", + "syn 3.0.6", +] + +[[package]] +name = "autocfg" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" + +[[package]] +name = "axum" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31b698c5f9a010f6573133b09e0de5408834d0c82f8d7475a89fc1867a71cd90" +dependencies = [ + "axum-core", + "base64", + "bytes", + "form_urlencoded", + "futures-util", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-util", + "itoa", + "matchit", + "memchr", + "mime", + "multer", + "percent-encoding", + "pin-project-lite", + "serde_core", + "serde_json", + "serde_path_to_error", + "serde_urlencoded", + "sha1", + "sync_wrapper", + "tokio", + "tokio-tungstenite", + "tower", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "axum-core" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08c78f31d7b1291f7ee735c1c6780ccde7785daae9a9206026862dab7d8792d1" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "http-body-util", + "mime", + "pin-project-lite", + "sync_wrapper", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "base16" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d27c3610c36aee21ce8ac510e6224498de4228ad772a171ed65643a24693a5a8" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "base64ct" +version = "1.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06" + +[[package]] +name = "bitflags" +version = "2.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06" +dependencies = [ + "serde_core", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "bumpalo" +version = "3.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" + +[[package]] +name = "camino" +version = "1.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbbad30e4b4c14a39e3cc8aed085a12a327257c316619c93581e017bc52be591" + +[[package]] +name = "cc" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f74872d07caf508b30a21f6836e7d7016a2eaf7d9ff4f48deaa58cd8a0407630" +dependencies = [ + "find-msvc-tools", + "shlex", +] + +[[package]] +name = "cfg-if" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600" + +[[package]] +name = "codee" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9dbbdc4b4d349732bc6690de10a9de952bd39ba6a065c586e26600b6b0b91f5" +dependencies = [ + "serde", + "serde_json", + "thiserror 2.0.21", +] + +[[package]] +name = "collection_literals" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2550f75b8cfac212855f6b1885455df8eaee8fe8e246b647d69146142e016084" + +[[package]] +name = "config" +version = "0.15.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38e9fbc53afcec54441422f1c596cd054655b32e70e1cbac956651b7b175a404" +dependencies = [ + "convert_case 0.6.0", + "pathdiff", + "serde_core", + "toml", + "winnow", +] + +[[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", + "wasm-bindgen", +] + +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "const-str" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18f12cc9948ed9604230cdddc7c86e270f9401ccbe3c2e98a4378c5e7632212f" + +[[package]] +name = "const_format" +version = "0.2.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4481a617ad9a412be3b97c5d403fef8ed023103368908b9c50af598ff467cc1e" +dependencies = [ + "const_format_proc_macros", + "konst", +] + +[[package]] +name = "const_format_proc_macros" +version = "0.2.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d57c2eccfb16dbac1f4e61e206105db5820c9d26c3c472bc17c774259ef7744" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + +[[package]] +name = "const_str_slice_concat" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f67855af358fcb20fac58f9d714c94e2b228fe5694c1c9b4ead4a366343eda1b" + +[[package]] +name = "convert_case" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "convert_case" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "affbf0190ed2caf063e3def54ff444b449371d55c58e513a95ab98eca50adb49" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "convert_case_extras" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589c70f0faf8aa9d17787557d5eae854d7755cac50f5c3d12c81d3d57661cebb" +dependencies = [ + "convert_case 0.11.0", +] + +[[package]] +name = "core_detect" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f8f80099a98041a3d1622845c271458a2d73e688351bf3cb999266764b81d48" + +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "crc" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5eb8a2a1cd12ab0d987a5d5e825195d372001a4094a0376319d5a0ad71c1ba0d" +dependencies = [ + "crc-catalog", +] + +[[package]] +name = "crc-catalog" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "217698eaf96b4a3f0bc4f3662aaa55bdf913cd54d7204591faa790070c6d0853" + +[[package]] +name = "crossbeam-queue" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03e8bd762f7479489c70ed6c768ddca99d7296857de437a68dcb2a94365b3fae" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a31eee39dddec8330830986fcd7625edb5a24ec90ea038215273bbc3adb08ac6" + +[[package]] +name = "crypto-common" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "data-encoding" +version = "2.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4583a4551df46e2792f82ceeac45e850d2e2d5debba0b91f102385cda5b11f06" + +[[package]] +name = "der" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" +dependencies = [ + "const-oid", + "pem-rfc7468", + "zeroize", +] + +[[package]] +name = "derive-where" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e2b94854e8576378ccda7c8de8a66ed8b4e8acbd2c50ec3418ea6c8aaf4b567" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.6", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "const-oid", + "crypto-common", + "subtle", +] + +[[package]] +name = "displaydoc" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.6", +] + +[[package]] +name = "dotenvy" +version = "0.15.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" + +[[package]] +name = "drain_filter_polyfill" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "669a445ee724c5c69b1b06fe0b63e70a1c84bc9bb7d9696cd4f4e3ec45050408" + +[[package]] +name = "either" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e9c71c2167ca323c882b99918929403426e2373ea17242ff5653e0d5e1058be" +dependencies = [ + "serde", +] + +[[package]] +name = "either_of" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5060e0a4cbf26a87550792688ade88e6b8aec9208613631a7a363bda7bc2d4cd" +dependencies = [ + "paste", + "pin-project-lite", +] + +[[package]] +name = "encoding_rs" +version = "0.8.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e985e0451871ad22fb8d2b6b076e2028a502a0d3950998c2c5c0a4f9b5d9679" +dependencies = [ + "cfg-if", + "core_detect", + "multiversion_no_op", + "rustversion", + "scopeguard", + "simdutf8", +] + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "erased" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1731451909bde27714eacba19c2566362a7f35224f52b153d3f42cf60f72472" + +[[package]] +name = "etcetera" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "136d1b5283a1ab77bd9257427ffd09d8667ced0570b6f938942bc7568ed5b943" +dependencies = [ + "cfg-if", + "home", + "windows-sys 0.48.0", +] + +[[package]] +name = "event-listener" +version = "5.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a23add41df1562121a9393cb065eab5146a1242410f23a644851e90cfd669d2" +dependencies = [ + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener-strategy" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93" +dependencies = [ + "event-listener", + "pin-project-lite", +] + +[[package]] +name = "find-msvc-tools" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aedcfb3409746eddb02b9e19ebda1c3394f759a152e48ee875a0844d1b955484" + +[[package]] +name = "flume" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da0e4dd2a88388a1f4ccc7c9ce104604dab68d9f408dc34cd45823d5a9069095" +dependencies = [ + "futures-core", + "futures-sink", + "spin", +] + +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + +[[package]] +name = "form_urlencoded" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a31d2a3fbaaeb2af2368bbdd904aa8e812d3c04a1ee10d3171f52d556e5d0a3" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f9e3d69d39e4862ffed03ed071a76f9a13ba1d9109d355b0f0aa6b15e393c4" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92d699e522242e69e3003b94ecc1f960f3a5e015aa7c5d7486e65ad01dd94f5e" + +[[package]] +name = "futures-executor" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "031b47cf1a3c6cc8bc2fc76cd437f521619387907d469316e7c0bc278f1f5432" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-intrusive" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d930c203dd0b6ff06e0201a4a2fe9149b43c684fd4420555b26d21b1a02956f" +dependencies = [ + "futures-core", + "lock_api", + "parking_lot", +] + +[[package]] +name = "futures-io" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53c0fa8157de1303bfffdaa1cc2a673bfffb60102f76b0ef4441659124373fed" + +[[package]] +name = "futures-macro" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb9654ba8355388abeb8dcb4fc62f511300867002afc858860463bdd9fe0c44" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.6", +] + +[[package]] +name = "futures-sink" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1944426bf7d03f1d14f708785e4b33efd750b36d48a157b836b3efc15ede8e1d" + +[[package]] +name = "futures-task" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd417de3d1d015fc3bfd2b1ea46dfc7bab72ef86f1cc7cc9c78e728b34a6d1fd" + +[[package]] +name = "futures-util" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d50a92467f8ba5dd6e3ee5d4bd04d73ab2e4e1c44474a0674821dfce14b79bc" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "libc", + "r-efi 5.3.0", + "wasip2", +] + +[[package]] +name = "getrandom" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "r-efi 6.0.0", + "wasm-bindgen", +] + +[[package]] +name = "gloo-net" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06f627b1a58ca3d42b45d6104bf1e1a03799df472df00988b6ba21accc10580" +dependencies = [ + "futures-channel", + "futures-core", + "futures-sink", + "gloo-utils", + "http", + "js-sys", + "pin-project", + "serde", + "serde_json", + "thiserror 1.0.69", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "gloo-utils" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b5555354113b18c547c1d3a98fbf7fb32a9ff4f6fa112ce823a21641a0ba3aa" +dependencies = [ + "js-sys", + "serde", + "serde_json", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "guardian" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17e2ac29387b1aa07a1e448f7bb4f35b500787971e965b02842b900afa5c8f6f" + +[[package]] +name = "hashbrown" +version = "0.15.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash", +] + +[[package]] +name = "hashbrown" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" + +[[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 = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hkdf" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" +dependencies = [ + "hmac", +] + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest", +] + +[[package]] +name = "home" +version = "0.5.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc627f471c528ff0c4a49e1d5e60450c8f6461dd6d10ba9dcd3a61d3dff7728d" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "html-escape" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9356095b4b41197bba32173600e1582792cda618f65d12f68e2e77d273413c5" + +[[package]] +name = "http" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "918d3568bebf352712bc2ef3d46a8bcf1a75b373be6539de198e9105cbbf9ce0" +dependencies = [ + "bytes", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2a8f2913ee65f60facd6a5905613afaa448497a0230cc41ce022d93290bc2c" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23169fe34a5fbcdd3f3862e78fb9b6fccd5f02a6dc6f732547005d45631ce71c" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "http-range-header" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9171a2ea8a68358193d15dd5d70c1c10a2afc3e7e4c5bc92bc9f025cebd7359c" + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "hydration_context" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "285b05858fe7d58c5eff059f7b46c228fd86996d996c59eb35fc0340d174f640" +dependencies = [ + "futures", + "js-sys", + "or_poisoned", + "pin-project-lite", + "serde", + "throw_error", + "wasm-bindgen", +] + +[[package]] +name = "hyper" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c3e324da4c95177d6291d4c8730197c0d1822f8a9766814a4a44fa5ab797c9c" +dependencies = [ + "atomic-waker", + "bytes", + "futures-core", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", +] + +[[package]] +name = "hyper-util" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddc03d96684f9226b8a787cdb71488417b53ab5ea8fdb1dac946cb9431cc8bff" +dependencies = [ + "bytes", + "http", + "http-body", + "hyper", + "pin-project-lite", + "tokio", + "tower-service", +] + +[[package]] +name = "icu_collections" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa68d21081c4a05d5a901a1c62add574c77048b6a1c67be3b50ce0b60d4ca513" +dependencies = [ + "displaydoc", + "potential_utf", + "utf8_iter", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d56e28588da92eee5c3201a6eff33fabdd49b62269c8938d4ff050ce4d900deb" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12f9cf5f235641ed274641dd81c3f28d870e276763d0797aeeab72317b1c646f" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1563da1ed3e0b3bf3d74c9b85917ac9c56464d2f57242270c09c9e752f8021a0" + +[[package]] +name = "icu_properties" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e7ca276ad3145661a65914e6daf131ca5120cd3dcee8f8f3214b8875184a148" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e590f038c1464a96894fd6d10127e90a8be4509f56ff7ecef851b15cee0b7caa" + +[[package]] +name = "icu_provider" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d27bbb9d3abbefac45d55f647c9de1d44aafcd1186eb91879afef17c396c3e73" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "indexmap" +version = "2.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc4e190f5d26ca7051642629da2c52fc03bde85a03197c99408dcd291734c855" +dependencies = [ + "equivalent", + "hashbrown 0.17.1", +] + +[[package]] +name = "interpolator" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71dd52191aae121e8611f1e8dc3e324dd0dd1dee1e6dd91d10ee07a3cfb4d9d8" + +[[package]] +name = "inventory" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6928282826c822ad91bf1c9a1cb90a30ba1c26770749929b4656cd6be829cd7c" +dependencies = [ + "rustversion", +] + +[[package]] +name = "itertools" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" + +[[package]] +name = "js-sys" +version = "0.3.105" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce57d20d1ea864ce2ac172ab472d409214f4fd359f0b2a2775abdf522e2af99e" +dependencies = [ + "cfg-if", + "futures-util", + "wasm-bindgen", +] + +[[package]] +name = "konst" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "128133ed7824fcd73d6e7b17957c5eb7bacb885649bd8c69708b2331a10bcefb" +dependencies = [ + "konst_macro_rules", +] + +[[package]] +name = "konst_macro_rules" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4933f3f57a8e9d9da04db23fb153356ecaf00cbd14aee46279c33dc80925c37" + +[[package]] +name = "lazy_static" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20870f649af7073d53e38067b2a84312175d56ea15217e1b15bc83506ec50afb" +dependencies = [ + "spin", +] + +[[package]] +name = "leptos" +version = "0.8.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "713ee6895e3d1126ea9781280d01414f5643f3f201a949b71efffac07d735f00" +dependencies = [ + "any_spawner", + "base64", + "cfg-if", + "either_of", + "futures", + "getrandom 0.4.3", + "hydration_context", + "leptos_config", + "leptos_dom", + "leptos_hot_reload", + "leptos_macro", + "leptos_server", + "oco_ref", + "or_poisoned", + "paste", + "rand 0.9.5", + "reactive_graph", + "rustc-hash", + "rustc_version", + "send_wrapper", + "serde", + "serde_json", + "serde_qs", + "server_fn", + "slotmap", + "tachys", + "thiserror 2.0.21", + "throw_error", + "typed-builder", + "typed-builder-macro", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm_split_helpers", + "web-sys", +] + +[[package]] +name = "leptos_axum" +version = "0.8.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "513e2dd5fe81512b53304429b9ca77cceb954d23af88921c0c33119380f07cbe" +dependencies = [ + "any_spawner", + "axum", + "futures", + "hydration_context", + "leptos", + "leptos_integration_utils", + "leptos_macro", + "leptos_meta", + "leptos_router", + "or_poisoned", + "server_fn", + "tachys", + "tokio", + "tower", + "tower-http", +] + +[[package]] +name = "leptos_config" +version = "0.8.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c06f751315bccc0d193fab302ac01d25bcfcd97474d4676440e7e3250dc3fc3" +dependencies = [ + "config", + "regex", + "serde", + "thiserror 2.0.21", + "typed-builder", +] + +[[package]] +name = "leptos_dom" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35742e9ed8f8aaf9e549b454c68a7ac0992536e06856365639b111f72ab07884" +dependencies = [ + "js-sys", + "or_poisoned", + "reactive_graph", + "send_wrapper", + "tachys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "leptos_hot_reload" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d84989bd3d604e66adbfe13a32bec2ea47bdcb6c9fcd643f784facbb32f6ef10" +dependencies = [ + "anyhow", + "camino", + "indexmap", + "or_poisoned", + "proc-macro2", + "quote", + "rstml", + "serde", + "syn 3.0.6", + "walkdir", +] + +[[package]] +name = "leptos_integration_utils" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd93f4fd62ee9845cc50b0925272bccce6fd18e8168c4ad8a4f50eef9a93f747" +dependencies = [ + "futures", + "hydration_context", + "leptos", + "leptos_config", + "leptos_meta", + "leptos_router", + "reactive_graph", +] + +[[package]] +name = "leptos_macro" +version = "0.8.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0902af1e6947ffc7e906b7003a165f76f178dc711a47b74241025090b0c32a72" +dependencies = [ + "attribute-derive", + "cfg-if", + "convert_case 0.11.0", + "convert_case_extras", + "html-escape", + "itertools", + "leptos_hot_reload", + "prettyplease", + "proc-macro2", + "quote", + "rstml", + "rustc_version", + "server_fn_macro", + "syn 3.0.6", + "uuid", +] + +[[package]] +name = "leptos_meta" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "987b1a07addba2647da43c0689408cccc0f428236b714ea606127b9e347d35d8" +dependencies = [ + "futures", + "indexmap", + "leptos", + "or_poisoned", + "send_wrapper", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "leptos_router" +version = "0.8.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f92787ebcb5f25af6a67513dacfd75cbffce5bda3f361e2e947c3fc4e3adc14b" +dependencies = [ + "any_spawner", + "either_of", + "futures", + "gloo-net", + "js-sys", + "leptos", + "leptos_router_macro", + "or_poisoned", + "percent-encoding", + "reactive_graph", + "rustc_version", + "send_wrapper", + "tachys", + "thiserror 2.0.21", + "url", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "leptos_router_macro" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bb5c81012dcab0d5cc032a2da0a364a18ce74a0fbeb88f091e9b53a0679bc85" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "leptos_server" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "202b2d1261c22d886f307934760a6bb566444f68f39b24f6f10defdc23633049" +dependencies = [ + "any_spawner", + "base64", + "codee", + "futures", + "hydration_context", + "or_poisoned", + "reactive_graph", + "send_wrapper", + "serde", + "serde_json", + "server_fn", + "tachys", +] + +[[package]] +name = "libc" +version = "0.2.190" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce5d3ddc6d3fa000eb1536d85e147bfe31aacaba692ed6a876f95cb7c855be78" + +[[package]] +name = "libm" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" + +[[package]] +name = "libredox" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61ff90caf6077a803a240f62fdbe88645a890bbca49ef8174c3cb0404362171d" +dependencies = [ + "bitflags", + "libc", + "plain", + "redox_syscall 0.9.4", +] + +[[package]] +name = "libsqlite3-sys" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e99fb7a497b1e3339bc746195567ed8d3e24945ecd636e3619d20b9de9e9149" +dependencies = [ + "cc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "lisette" +version = "0.1.0" +dependencies = [ + "axum", + "console_error_panic_hook", + "leptos", + "leptos_axum", + "leptos_meta", + "leptos_router", + "serde", + "sqlx", + "tokio", + "wasm-bindgen", +] + +[[package]] +name = "litemap" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47d9d19d1d6efa0109d2f65ff4c85cddd50bd572e5a00127ab10987290bcefae" + +[[package]] +name = "lock_api" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9f8bd3e56ce4dfc153cf470fffbfa98c7620958b312ca5c3a4b8d5181fd13c6" + +[[package]] +name = "manyhow" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c69ea6e469ca785c846b25dd69eac9e9c916b51d8ada1f212866787ee1da12d" +dependencies = [ + "manyhow-macros", + "proc-macro2", + "quote", + "syn 3.0.6", +] + +[[package]] +name = "manyhow-macros" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22fc5c1b2c4000056dae3619fea36e79ce79dabfee4907d2dcad6612b189e370" +dependencies = [ + "proc-macro-utils", + "proc-macro2", + "quote", +] + +[[package]] +name = "matchit" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" + +[[package]] +name = "md-5" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" +dependencies = [ + "cfg-if", + "digest", +] + +[[package]] +name = "memchr" +version = "2.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "mime_guess" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" +dependencies = [ + "mime", + "unicase", +] + +[[package]] +name = "mio" +version = "1.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1788edb87fdc09c7e26304471e2f5be8cdefb1b6930d6e3985fc02ff53bf86ee" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.61.2", +] + +[[package]] +name = "multer" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83e87776546dc87511aa5ee218730c92b666d7264ab6ed41f9d215af9cd5224b" +dependencies = [ + "bytes", + "encoding_rs", + "futures-util", + "http", + "httparse", + "memchr", + "mime", + "spin", + "version_check", +] + +[[package]] +name = "multiversion_no_op" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "743fb55ba31b18fb1ecef6bdc9aa2743314978ac084044301a7eee33fb99a20d" + +[[package]] +name = "next_tuple" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60993920e071b0c9b66f14e2b32740a4e27ffc82854dcd72035887f336a09a28" + +[[package]] +name = "num-bigint-dig" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e661dda6640fad38e827a6d4a310ff4763082116fe217f279885c97f511bb0b7" +dependencies = [ + "lazy_static", + "libm", + "num-integer", + "num-iter", + "num-traits", + "rand 0.8.8", + "smallvec", + "zeroize", +] + +[[package]] +name = "num-integer" +version = "0.1.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ce2d95d4b3734dc35aa2f45e1aa22cd416814592a4f9d9205e11affd5b8e10b" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-iter" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c92800bd69a1eac91786bcfe9da64a897eb72911b8dc3095decbd07429e8048b" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", + "libm", +] + +[[package]] +name = "oco_ref" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed0423ff9973dea4d6bd075934fdda86ebb8c05bdf9d6b0507067d4a1226371d" +dependencies = [ + "serde", + "thiserror 2.0.21", +] + +[[package]] +name = "once_cell" +version = "1.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" + +[[package]] +name = "or_poisoned" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c04f5d74368e4d0dfe06c45c8627c81bd7c317d52762d118fb9b3076f6420fd" + +[[package]] +name = "parking" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" + +[[package]] +name = "parking_lot" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall 0.5.18", + "smallvec", + "windows-link", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" +dependencies = [ + "base64ct", +] + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "pin-project" +version = "1.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2466b2336ed02bcdca6b294417127b90ec92038d1d5c4fbeac971a922e0e0924" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c96395f0a926bc13b1c17622aaddda1ecb55d49c8f1bf9777e4d877800a43f8b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" + +[[package]] +name = "pkcs1" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8ffb9f10fa047879315e6625af03c164b16962a5368d724ed16323b68ace47f" +dependencies = [ + "der", + "pkcs8", + "spki", +] + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + +[[package]] +name = "pkg-config" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6b464fbc74e149a392436b17d523f769e057cb6877f6a5c4618bc6f11800548" + +[[package]] +name = "plain" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" + +[[package]] +name = "potential_utf" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d83eb9bc6d8e5cf568e7a1101d60ee05e81ed50ea106026f3d18deeb046d7661" +dependencies = [ + "zerovec", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "prettyplease" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bfe0f4c752e450fc2faf62654f1c134747922825d5b04ca717b8874f41a40c0" +dependencies = [ + "proc-macro2", + "syn 3.0.6", +] + +[[package]] +name = "proc-macro-utils" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eeaf08a13de400bc215877b5bdc088f241b12eb42f0a548d3390dc1c56bb7071" +dependencies = [ + "proc-macro2", + "quote", + "smallvec", +] + +[[package]] +name = "proc-macro2" +version = "1.0.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "proc-macro2-diagnostics" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df921e1ef974ebc8dd9effdb0c037a96928ae8cbf871438e02d6fd67204b595e" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.6", + "version_check", +] + +[[package]] +name = "quote" +version = "1.0.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "quote-use" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48356e493823dc3c1d7e9fc7b3ff204ecec48afbdd718fc4134091b88eb63f3d" +dependencies = [ + "quote", + "quote-use-macros", +] + +[[package]] +name = "quote-use-macros" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cf1c5de6a7cc231c71e03c77aa4c7019097859ea7029156b54d2894a8430704" +dependencies = [ + "proc-macro-utils", + "proc-macro2", + "quote", + "syn 3.0.6", +] + +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + +[[package]] +name = "rand" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e058c7de0b26af77780c769414d6257830bb240f3c38477dbc2c16e5f54d6d4c" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9ef1d0d795eb7d84685bca4f72f3649f064e6641543d3a8c415898726a57b41" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.5", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.5", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.17", +] + +[[package]] +name = "rand_core" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" +dependencies = [ + "getrandom 0.3.4", +] + +[[package]] +name = "reactive_graph" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79f11fac67625645add76313dab8dae510fca0654d96ef98fd8f961a7d2e22c1" +dependencies = [ + "any_spawner", + "async-lock", + "futures", + "guardian", + "hydration_context", + "indexmap", + "or_poisoned", + "paste", + "pin-project-lite", + "rustc-hash", + "rustc_version", + "send_wrapper", + "serde", + "slotmap", + "thiserror 2.0.21", + "web-sys", +] + +[[package]] +name = "reactive_stores" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a29e469b556f25486678e9f5f65fa21a0351d98affde9a7eea9fee286bf8ebd6" +dependencies = [ + "guardian", + "indexmap", + "itertools", + "or_poisoned", + "paste", + "reactive_graph", + "reactive_stores_macro", + "rustc-hash", + "send_wrapper", +] + +[[package]] +name = "reactive_stores_macro" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d11f1b82859d94577892b8037c35f8a4f066cbb3864583e22e68def0af49a88" +dependencies = [ + "convert_case 0.11.0", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "redox_syscall" +version = "0.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +dependencies = [ + "bitflags", +] + +[[package]] +name = "redox_syscall" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "737970939a87c6fa31e7acad13307bccbb017a073b695b6089a2c484f929e20e" +dependencies = [ + "bitflags", +] + +[[package]] +name = "regex" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad8553b9b26413251cbf30e620595c7a41b3887f03da04579c0e6b0d6a06b4b2" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4" + +[[package]] +name = "rsa" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8573f03f5883dcaebdfcf4725caa1ecb9c15b2ef50c43a07b816e06799bb12d" +dependencies = [ + "const-oid", + "digest", + "num-bigint-dig", + "num-integer", + "num-traits", + "pkcs1", + "pkcs8", + "rand_core 0.6.4", + "signature", + "spki", + "subtle", + "zeroize", +] + +[[package]] +name = "rstml" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6bd1bfba3c4c0b57aae906204d9e5744f3f65800ce6c75bd4cc162f2c26f3aa" +dependencies = [ + "derive-where", + "proc-macro2", + "proc-macro2-diagnostics", + "quote", + "syn 3.0.6", + "thiserror 2.0.21", +] + +[[package]] +name = "rustc-hash" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d" + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + +[[package]] +name = "rustversion" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" + +[[package]] +name = "ryu" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "semver" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" + +[[package]] +name = "send_wrapper" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" +dependencies = [ + "futures-core", +] + +[[package]] +name = "serde" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.6", +] + +[[package]] +name = "serde_json" +version = "1.0.151" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14" +dependencies = [ + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", +] + +[[package]] +name = "serde_path_to_error" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10a9ff822e371bb5403e391ecd83e182e0e77ba7f6fe0160b795797109d1b457" +dependencies = [ + "itoa", + "serde", + "serde_core", +] + +[[package]] +name = "serde_qs" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3faaf9e727533a19351a43cc5a8de957372163c7d35cc48c90b75cdda13c352" +dependencies = [ + "percent-encoding", + "serde", + "thiserror 2.0.21", +] + +[[package]] +name = "serde_spanned" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e7523beb55eece201a2356bee0bbca0d1ab466c14c07703b2e0ee6d42cb0c2c" +dependencies = [ + "serde_core", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "server_fn" +version = "0.8.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be8559dd05af1b5b7e363a150616589d5a88af5187273f7f331ba0dae8922812" +dependencies = [ + "axum", + "base64", + "bytes", + "const-str", + "const_format", + "futures", + "gloo-net", + "http", + "http-body-util", + "hyper", + "inventory", + "js-sys", + "or_poisoned", + "pin-project-lite", + "rustc_version", + "rustversion", + "send_wrapper", + "serde", + "serde_json", + "serde_qs", + "server_fn_macro_default", + "thiserror 2.0.21", + "throw_error", + "tokio", + "tower", + "tower-layer", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams", + "web-sys", + "xxhash-rust", +] + +[[package]] +name = "server_fn_macro" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce79d7b6ab93f7994e5ff4999eb962f2aea370d7c3b91986eb75da738a8e65f9" +dependencies = [ + "const_format", + "convert_case 0.11.0", + "proc-macro2", + "quote", + "rustc_version", + "syn 3.0.6", + "xxhash-rust", +] + +[[package]] +name = "server_fn_macro_default" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9a4f81a0d855f279c3448243138a55cbfdd9851da9341b9c1e5971b90089e61" +dependencies = [ + "server_fn_macro", + "syn 3.0.6", +] + +[[package]] +name = "sha1" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a978451301f4db1d02937a4ab3ccce137717b81826e79b7d49ffe3244a13c3b8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "shlex" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" + +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest", + "rand_core 0.6.4", +] + +[[package]] +name = "simdutf8" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" + +[[package]] +name = "slab" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" + +[[package]] +name = "slotmap" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdd58c3c93c3d278ca835519292445cb4b0d4dc59ccfdf7ceadaab3f8aeb4038" +dependencies = [ + "version_check", +] + +[[package]] +name = "smallvec" +version = "1.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9395f0f0eee849a9b707b2f06bb92a6a422090e2123bb2ef8e87a0e61892a8e" +dependencies = [ + "serde", +] + +[[package]] +name = "socket2" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "spin" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3763264f6b73151db08c50ff20d7d8a0b8796e021cdea7ceedad07b80155fa0e" +dependencies = [ + "lock_api", +] + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "sqlx" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fefb893899429669dcdd979aff487bd78f4064e5e7907e4269081e0ef7d97dc" +dependencies = [ + "sqlx-core", + "sqlx-macros", + "sqlx-mysql", + "sqlx-postgres", + "sqlx-sqlite", +] + +[[package]] +name = "sqlx-core" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee6798b1838b6a0f69c007c133b8df5866302197e404e8b6ee8ed3e3a5e68dc6" +dependencies = [ + "base64", + "bytes", + "crc", + "crossbeam-queue", + "either", + "event-listener", + "futures-core", + "futures-intrusive", + "futures-io", + "futures-util", + "hashbrown 0.15.5", + "hashlink", + "indexmap", + "log", + "memchr", + "once_cell", + "percent-encoding", + "serde", + "serde_json", + "sha2", + "smallvec", + "thiserror 2.0.21", + "tokio", + "tokio-stream", + "tracing", + "url", +] + +[[package]] +name = "sqlx-macros" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2d452988ccaacfbf5e0bdbc348fb91d7c8af5bee192173ac3636b5fb6e6715d" +dependencies = [ + "proc-macro2", + "quote", + "sqlx-core", + "sqlx-macros-core", + "syn 2.0.119", +] + +[[package]] +name = "sqlx-macros-core" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19a9c1841124ac5a61741f96e1d9e2ec77424bf323962dd894bdb93f37d5219b" +dependencies = [ + "dotenvy", + "either", + "heck", + "hex", + "once_cell", + "proc-macro2", + "quote", + "serde", + "serde_json", + "sha2", + "sqlx-core", + "sqlx-sqlite", + "syn 2.0.119", + "tokio", + "url", +] + +[[package]] +name = "sqlx-mysql" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa003f0038df784eb8fecbbac13affe3da23b45194bd57dba231c8f48199c526" +dependencies = [ + "atoi", + "base64", + "bitflags", + "byteorder", + "bytes", + "crc", + "digest", + "dotenvy", + "either", + "futures-channel", + "futures-core", + "futures-io", + "futures-util", + "generic-array", + "hex", + "hkdf", + "hmac", + "itoa", + "log", + "md-5", + "memchr", + "once_cell", + "percent-encoding", + "rand 0.8.8", + "rsa", + "sha1", + "sha2", + "smallvec", + "sqlx-core", + "stringprep", + "thiserror 2.0.21", + "tracing", + "whoami", +] + +[[package]] +name = "sqlx-postgres" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db58fcd5a53cf07c184b154801ff91347e4c30d17a3562a635ff028ad5deda46" +dependencies = [ + "atoi", + "base64", + "bitflags", + "byteorder", + "crc", + "dotenvy", + "etcetera", + "futures-channel", + "futures-core", + "futures-util", + "hex", + "hkdf", + "hmac", + "home", + "itoa", + "log", + "md-5", + "memchr", + "once_cell", + "rand 0.8.8", + "serde", + "serde_json", + "sha2", + "smallvec", + "sqlx-core", + "stringprep", + "thiserror 2.0.21", + "tracing", + "whoami", +] + +[[package]] +name = "sqlx-sqlite" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2d12fe70b2c1b4401038055f90f151b78208de1f9f89a7dbfd41587a10c3eea" +dependencies = [ + "atoi", + "flume", + "futures-channel", + "futures-core", + "futures-executor", + "futures-intrusive", + "futures-util", + "libsqlite3-sys", + "log", + "percent-encoding", + "serde", + "serde_urlencoded", + "sqlx-core", + "thiserror 2.0.21", + "tracing", + "url", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + +[[package]] +name = "stringprep" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b4df3d392d81bd458a8a621b8bffbd2302a12ffe288a9d931670948749463b1" +dependencies = [ + "unicode-bidi", + "unicode-normalization", + "unicode-properties", +] + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "syn" +version = "2.0.119" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "3.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8593e8e72159ed2257d083c7a454a85cbf854f37a0966d8d483aff8c8a3ebcee" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" + +[[package]] +name = "synstructure" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "901704edd0dfe137f1987838ee4f259e4e063c31371bdb423f7ae38ec6f77f02" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.6", +] + +[[package]] +name = "tachys" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e47e2220bb9d2a3be976a22a0fb7685a0b84499bb11ea5cb3bbc82907675ac68" +dependencies = [ + "any_spawner", + "async-trait", + "const_str_slice_concat", + "drain_filter_polyfill", + "either_of", + "erased", + "futures", + "html-escape", + "indexmap", + "itertools", + "js-sys", + "next_tuple", + "oco_ref", + "or_poisoned", + "paste", + "reactive_graph", + "reactive_stores", + "rustc-hash", + "rustc_version", + "send_wrapper", + "slotmap", + "throw_error", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09e52cb86a36cede5cb101bf8908837b3e4c6e5e59fe7fd85c23fb56200d189e" +dependencies = [ + "thiserror-impl 2.0.21", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.6", +] + +[[package]] +name = "throw_error" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc0ed6038fcbc0795aca7c92963ddda636573b956679204e044492d2b13c8f64" +dependencies = [ + "pin-project-lite", +] + +[[package]] +name = "tinystr" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1e27c91459209c2986af3dcf603a5a74a4368754ce37414f59acc971167f643" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tinyvec" +version = "1.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd3ca314f692efd6c868f8408f53fe444634a845f96c028b97d35f6a1f79f0ee" + +[[package]] +name = "tokio" +version = "1.53.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e95f91fcc7a621e8b030f6aa23c71fe9838ae2fb4d8118b75602a328f5144044" +dependencies = [ + "bytes", + "libc", + "mio", + "pin-project-lite", + "socket2", + "tokio-macros", + "windows-sys 0.61.2", +] + +[[package]] +name = "tokio-macros" +version = "2.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78773a2a397f451582ce068015985c33193cf6dea8b74d2a639fe457b2f07b0e" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.6", +] + +[[package]] +name = "tokio-stream" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3d06f0b082ba57c26b79407372e57cf2a1e28124f78e9479fe80322cf53420b" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tokio-tungstenite" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f72a05e828585856dacd553fba484c242c46e391fb0e58917c942ee9202915c" +dependencies = [ + "futures-util", + "log", + "tokio", + "tungstenite", +] + +[[package]] +name = "tokio-util" +version = "0.7.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "494815d09bf52b5548659851081238f0ca39ff638363907596da739561c62c52" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "toml" +version = "1.1.8+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20489e00e4d8741d6be680764cc12e270655e375a20d1011e844a9c3379e678d" +dependencies = [ + "indexmap", + "serde_core", + "serde_spanned", + "toml_datetime", + "toml_parser", + "toml_writer", + "winnow", +] + +[[package]] +name = "toml_datetime" +version = "1.1.2+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b86d767906c6c42421dcba507eb9d203e779497710a47782a224bb871653053" +dependencies = [ + "serde_core", +] + +[[package]] +name = "toml_parser" +version = "1.1.5+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baa693a8032d7e1cada7d0041e96126df243179ff061456783ac7f12bda4744c" +dependencies = [ + "winnow", +] + +[[package]] +name = "toml_writer" +version = "1.1.3+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06bdbd8cfc056b8d2e2e85f29b56a3bdbecb527cef81eb39e3e7b98af4652770" + +[[package]] +name = "tower" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-http" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cfcf7e2740e6fc6d4d688b4ef00650406bb94adf4731e43c096c3a19fe40840" +dependencies = [ + "bitflags", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "http-body-util", + "http-range-header", + "httpdate", + "mime", + "mime_guess", + "percent-encoding", + "pin-project-lite", + "tokio", + "tokio-util", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" +dependencies = [ + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "tracing-core" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" +dependencies = [ + "once_cell", +] + +[[package]] +name = "tungstenite" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c01152af293afb9c7c2a57e4b559c5620b421f6d133261c60dd2d0cdb38e6b8" +dependencies = [ + "bytes", + "data-encoding", + "http", + "httparse", + "log", + "rand 0.9.5", + "sha1", + "thiserror 2.0.21", +] + +[[package]] +name = "typed-builder" +version = "0.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31aa81521b70f94402501d848ccc0ecaa8f93c8eb6999eb9747e72287757ffda" +dependencies = [ + "typed-builder-macro", +] + +[[package]] +name = "typed-builder-macro" +version = "0.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "076a02dc54dd46795c2e9c8282ed40bcfb1e22747e955de9389a1de28190fb26" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "typenum" +version = "1.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" + +[[package]] +name = "unicase" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "357cc3acc6a036009fd6c973ed009037c732d60d0b4f6c673e9041497482a28f" + +[[package]] +name = "unicode-bidi" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" + +[[package]] +name = "unicode-ident" +version = "1.0.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d245f478577f809a851594d02313b640fb437e0bb33866753cff937863096954" + +[[package]] +name = "unicode-normalization" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fd4f6878c9cb28d874b009da9e8d183b5abc80117c40bbd187a1fde336be6e8" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-properties" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7df058c713841ad818f1dc5d3fd88063241cc61f49f5fbea4b951e8cf5a8d71d" + +[[package]] +name = "unicode-segmentation" +version = "1.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8" + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + +[[package]] +name = "url" +version = "2.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", +] + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "uuid" +version = "1.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97277d36b9c3ace13e58fa6e753f8b0bbbf302a18dd193240d70f9e29681059a" +dependencies = [ + "getrandom 0.4.3", + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasip2" +version = "1.0.4+wasi-0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasite" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" + +[[package]] +name = "wasm-bindgen" +version = "0.2.128" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aecb87a33d3b0c5e3b7aa46336eaf486cffafbd281b195e4c8b80d50df2351bf" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.78" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ef4c5d3d2cdf5c54f4231181768f5510842e350db025faf1f7163b1030ed928" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.128" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a690d511e3c1a8b3a55e33511e3c2c00c78415cd23650f32b808627f5696b9ed" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.128" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "411e4887f0071ef2d2164a9d5fdf2d20efbef78fccd3a78b0c10a1dc5295e48a" +dependencies = [ + "bumpalo", + "proc-macro2", + "quote", + "syn 3.0.6", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.128" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81941cd78d0c92026c33e5e01312845a4cb1e9af3407f9134b100dd03144103e" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "wasm-streams" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d1ec4f6517c9e11ae630e200b2b65d193279042e28edd4a2cda233e46670bbb" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "wasm_split_helpers" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab578aae2fe2916edaea06843187d50f87b0965622da0ceef648edca27b385ba" +dependencies = [ + "async-once-cell", + "wasm_split_macros", +] + +[[package]] +name = "wasm_split_macros" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e653af7ee4a9ef0fce481a9ec6f43cb78de20d0cdb4f4f5862e1dc6e407e6c8" +dependencies = [ + "base16", + "quote", + "sha2", + "syn 2.0.119", +] + +[[package]] +name = "web-sys" +version = "0.3.105" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fbddc4a036f00ec4f18c83445bd3115cb306a91da554919a099d9222fe4a7f8" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "whoami" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d4a4db5077702ca3015d3d02d74974948aba2ad9e12ab7df718ee64ccd7e97d" +dependencies = [ + "libredox", + "wasite", +] + +[[package]] +name = "winapi-util" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "winnow" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b97319f7b8343df12cc98938e5c3eb436064524c8d2b4e30a1d3a36eecdf81" +dependencies = [ + "memchr", +] + +[[package]] +name = "wit-bindgen" +version = "0.57.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" + +[[package]] +name = "writeable" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ad82d2a33cdc9674dc7465672f271e096168fcdbe0f799d9e6db8c5892679dc" + +[[package]] +name = "xxhash-rust" +version = "0.8.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "550a2b930b62486a393c52d5c3b84bff264b28aa437ed64694d31e93b1757af7" + +[[package]] +name = "yoke" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "709fe23a0424b6a435d82152b1bd3fdfb0833487d5fa90d05d42762a9891fef5" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec8ebde2db3681e8c9980cc27822030e68752690ddfa9473e739aeb4dbde6d71" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.6", + "synstructure", +] + +[[package]] +name = "zerocopy" +version = "0.8.62" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86502bf56ac7c77571a32e2647bb2a15894565e981fb2a48d7bde2d91c965a9d" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.62" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5457206954b06561e2608c7e19cf58b1926586d999c246eebe4502f7e2039d1a" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "zerofrom" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f75b4683f6c7f45248d4d64056a24298c6281e0993356d7d1b4a1a962ef10d4a" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.6", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13084392c5e4bc371903e2935a5eaeed24905a7511356b883835e18a78f6879" + +[[package]] +name = "zerotrie" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ea269c3bd32f0a32c321907a2ae912ba6f4649bb0fc764a15627e99a7095a3f" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb0464e17806c1d976d5cba29399c7f08e516e279e2ba493f63123b5fca67dd8" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34df6fc39dbd26ddc9c10e6a2984476e13acce22e64e4487636ef494369225da" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.6", +] + +[[package]] +name = "zmij" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..cf86b11 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,54 @@ +[package] +name = "lisette" +version = "0.1.0" +edition = "2024" + +[lib] +crate-type = ["cdylib", "rlib"] + +[dependencies] +leptos = { version = "0.8" } +leptos_router = { version = "0.8" } +leptos_meta = { version = "0.8" } +leptos_axum = { version = "0.8", optional = true } +axum = { version = "0.8", optional = true } +tokio = { version = "1", features = ["rt-multi-thread", "macros"], optional = true } +sqlx = { version = "0.8", default-features = false, features = ["sqlite", "runtime-tokio", "macros", "migrate"], optional = true } +serde = { version = "1", features = ["derive"] } +wasm-bindgen = { version = "=0.2.128", optional = true } +console_error_panic_hook = { version = "0.1", optional = true } + +[features] +hydrate = ["leptos/hydrate", "dep:console_error_panic_hook", "dep:wasm-bindgen"] +ssr = [ + "dep:axum", + "dep:tokio", + "dep:sqlx", + "dep:leptos_axum", + "leptos/ssr", + "leptos_meta/ssr", + "leptos_router/ssr", +] + +[profile.wasm-release] +inherits = "release" +opt-level = 'z' +lto = true +codegen-units = 1 +panic = "abort" + +[package.metadata.leptos] +output-name = "lisette" +site-root = "target/site" +site-pkg-dir = "pkg" +tailwind-input-file = "style/main.css" +assets-dir = "public" +site-addr = "127.0.0.1:3002" +reload-port = 3001 +browserquery = "defaults" +env = "DEV" +bin-features = ["ssr"] +bin-default-features = false +lib-features = ["hydrate"] +lib-default-features = false +lib-profile-release = "wasm-release" diff --git a/migrations/0001_init.sql b/migrations/0001_init.sql new file mode 100644 index 0000000..1b2dae6 --- /dev/null +++ b/migrations/0001_init.sql @@ -0,0 +1,37 @@ +CREATE TABLE lists ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + name TEXT NOT NULL, + color TEXT NOT NULL DEFAULT 'lime', + created_at TEXT NOT NULL DEFAULT (date('now')) +); + +CREATE TABLE items ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + list_id INTEGER NOT NULL REFERENCES lists(id) ON DELETE CASCADE, + name TEXT NOT NULL, + amount REAL, + unit TEXT, + icon TEXT NOT NULL, + category TEXT NOT NULL, + checked INTEGER NOT NULL DEFAULT 0 +); + +CREATE INDEX items_list_id ON items(list_id); + +-- Products already bought at least once; feeds the suggestion tiles. +CREATE TABLE catalog ( + name TEXT PRIMARY KEY COLLATE NOCASE, + icon TEXT NOT NULL, + category TEXT NOT NULL, + use_count INTEGER NOT NULL DEFAULT 0 +); + +INSERT INTO lists (name, color) VALUES ('Courses de la semaine', 'lime'); + +INSERT INTO catalog (name, icon, category, use_count) VALUES + ('Beurre', 'cheese', 'frais', 3), + ('Œufs', 'egg', 'frais', 3), + ('Citrons', 'lemon', 'fruits_legumes', 2), + ('Pain complet', 'bread', 'boulangerie', 2), + ('Bananes', 'banana', 'fruits_legumes', 2), + ('Café en grains', 'coffee', 'epicerie', 1); diff --git a/public/favicon.svg b/public/favicon.svg new file mode 100644 index 0000000..d281af5 --- /dev/null +++ b/public/favicon.svg @@ -0,0 +1 @@ + diff --git a/public/manifest.webmanifest b/public/manifest.webmanifest new file mode 100644 index 0000000..d0876e0 --- /dev/null +++ b/public/manifest.webmanifest @@ -0,0 +1,11 @@ +{ + "name": "Lisette", + "short_name": "Lisette", + "description": "Mes listes de courses", + "lang": "fr", + "start_url": "/", + "display": "standalone", + "background_color": "#bfe383", + "theme_color": "#bfe383", + "icons": [{ "src": "/favicon.svg", "sizes": "any", "type": "image/svg+xml" }] +} diff --git a/src/api.rs b/src/api.rs new file mode 100644 index 0000000..03cd176 --- /dev/null +++ b/src/api.rs @@ -0,0 +1,91 @@ +use leptos::prelude::*; +use leptos::server_fn::codec::Json; + +use crate::model::{Item, ItemInput, ListColor, ShoppingList, Suggestion}; + +#[cfg(feature = "ssr")] +mod server { + use leptos::prelude::*; + use sqlx::SqlitePool; + + pub fn pool() -> Result { + use_context::().ok_or_else(|| ServerFnError::new("database pool missing")) + } + + pub fn db_err(err: sqlx::Error) -> ServerFnError { + leptos::logging::error!("database error: {err}"); + ServerFnError::new("Erreur de base de données") + } + + pub fn clean_name(name: &str) -> Result { + let name = name.trim(); + if name.is_empty() || name.chars().count() > 60 { + return Err(ServerFnError::new("Le nom doit faire entre 1 et 60 caractères")); + } + Ok(name.to_owned()) + } +} + +#[server] +pub async fn get_lists() -> Result, ServerFnError> { + use server::*; + crate::db::lists(&pool()?).await.map_err(db_err) +} + +#[server] +pub async fn create_list(name: String, color: ListColor) -> Result { + use server::*; + let name = clean_name(&name)?; + crate::db::create_list(&pool()?, &name, color).await.map_err(db_err) +} + +#[server] +pub async fn rename_list(id: i64, name: String) -> Result<(), ServerFnError> { + use server::*; + let name = clean_name(&name)?; + crate::db::rename_list(&pool()?, id, &name).await.map_err(db_err) +} + +#[server] +pub async fn delete_list(id: i64) -> Result<(), ServerFnError> { + use server::*; + crate::db::delete_list(&pool()?, id).await.map_err(db_err) +} + +#[server] +pub async fn get_items(list_id: i64) -> Result, ServerFnError> { + use server::*; + crate::db::items(&pool()?, list_id).await.map_err(db_err) +} + +#[server(input = Json)] +pub async fn add_item(list_id: i64, input: ItemInput) -> Result { + use server::*; + let input = ItemInput { name: clean_name(&input.name)?, ..input }; + crate::db::add_item(&pool()?, list_id, &input).await.map_err(db_err) +} + +#[server(input = Json)] +pub async fn update_item(id: i64, input: ItemInput) -> Result<(), ServerFnError> { + use server::*; + let input = ItemInput { name: clean_name(&input.name)?, ..input }; + crate::db::update_item(&pool()?, id, &input).await.map_err(db_err) +} + +#[server] +pub async fn delete_item(id: i64) -> Result<(), ServerFnError> { + use server::*; + crate::db::delete_item(&pool()?, id).await.map_err(db_err) +} + +#[server] +pub async fn set_checked(id: i64, checked: bool) -> Result<(), ServerFnError> { + use server::*; + crate::db::set_checked(&pool()?, id, checked).await.map_err(db_err) +} + +#[server] +pub async fn get_suggestions(list_id: i64) -> Result, ServerFnError> { + use server::*; + crate::db::suggestions(&pool()?, list_id, 3).await.map_err(db_err) +} diff --git a/src/app/icons.rs b/src/app/icons.rs new file mode 100644 index 0000000..39de1e8 --- /dev/null +++ b/src/app/icons.rs @@ -0,0 +1,101 @@ +use leptos::prelude::*; + +use crate::model::Icon; + +/// SVG path data (24×24 viewBox, filled with `currentColor`). +fn paths(icon: Icon) -> &'static [&'static str] { + match icon { + Icon::Apple => &[ + "M12 7.5c-1.6-1.2-4.2-1.5-6 .2C3.9 9.6 4 13.4 5.6 16.4 7 19 8.9 21 11 20.5c.6-.1.9-.4 1-.4s.4.3 1 .4c2.1.5 4-1.5 5.4-4.1 1.6-3 1.7-6.8-.4-8.7-1.8-1.7-4.4-1.4-6 0Z", + "M11.4 7.2c-.2-1.7.3-3.4 1.3-4.6l1.1.9c-.8 1-1.1 2.3-.9 3.6Z", + "M13.2 5.6c.8-1.6 2.5-2.4 4.3-2.1-.4 1.7-2 2.8-4.3 2.1Z", + ], + Icon::Banana => &[ + "M4 6.5c1.3-.3 2.2.4 2.4 1.5.7 4.4 4 7.6 8.5 8.1 1.6.2 3.3 0 4.8-.6l.6 1.3c-2.2 1.9-5.1 2.8-8 2.4C7 18.5 3.4 13.8 3.3 8.2c0-.8.3-1.5.7-1.7Z", + "M3.4 4.6 5.6 4l.5 2.4-1.9.5Z", + ], + Icon::Carrot => &[ + "M14.8 9.2c-1.3-1.3-3.4-1.3-4.7 0L3.3 19.4c-.4.6.3 1.3.9.9l10.2-6.8c1.6-1.1 1.8-3.3.4-4.3Z", + "M15.5 8.5c.2-2 1.2-4.2 3-5.3l.8 1.2c-1.2.8-2 2.3-2.3 3.8 1.5-.3 3-1 3.9-2.2l1.1.9c-1.2 1.8-3.8 2.8-6.5 1.6Z", + ], + Icon::Lemon => &[ + "M19.6 6.5c.9-.4 1.1-1.6.4-2.3-.7-.7-1.9-.5-2.3.4-3.4-1.6-8-.4-10.9 2.5S2.6 13.8 4.2 17.2c-.9.4-1.1 1.6-.4 2.3.7.7 1.9.5 2.3-.4 3.4 1.6 8 .4 10.9-2.5s4.2-6.7 2.6-10.1Z", + ], + Icon::Glass => &[ + "M5 3h14l-1.6 16.2A2 2 0 0 1 15.4 21H8.6a2 2 0 0 1-2-1.8Z", + ], + Icon::Milk => &[ + "M8 2h8v3l2 3.5V20a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2V8.5L8 5Z", + ], + Icon::IceCream => &[ + "M12 2a5 5 0 0 0-4.9 4A3.5 3.5 0 0 0 7.5 13h9a3.5 3.5 0 0 0 .4-7A5 5 0 0 0 12 2Z", + "M8 14h8l-3.3 7.4a.8.8 0 0 1-1.4 0Z", + ], + Icon::Cheese => &[ + "M2.5 11 14 4.5c2.8.3 5.7 2.5 7.5 6.5v8a1 1 0 0 1-1 1h-17a1 1 0 0 1-1-1Zm6 4a1.5 1.5 0 1 0 0-.01Zm8-1.5a1 1 0 1 0 0-.01Z", + ], + Icon::Egg => &[ + "M12 2.5c-3.6 0-7 6.3-7 11.2A7 7 0 0 0 12 21a7 7 0 0 0 7-7.3c0-4.9-3.4-11.2-7-11.2Z", + ], + Icon::Coffee => &[ + "M3 6h13v6a6 6 0 0 1-6 6H9a6 6 0 0 1-6-6Zm13 1.5h1.5a3 3 0 0 1 0 6h-1.8l.3-2h1.5a1 1 0 0 0 0-2H16Z", + "M3 20h13v1.8H3Z", + ], + Icon::Bread => &[ + "M12 3C6.5 3 3 5.3 3 8.3c0 1.4 1 2.4 2 2.7V19a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-8c1-.3 2-1.3 2-2.7C21 5.3 17.5 3 12 3Z", + ], + Icon::Croissant => &[ + "M9.5 5.5 12 4l2.5 1.5-1 9h-3Z", + "M8.3 6.6 6.8 15H4.5L3 9.6Zm7.4 0 5.3 3-1.5 5.4h-2.3Z", + "M2 11.5 4 17H2.5L1 13Zm20 0L23 13l-1.5 4H20Z", + ], + Icon::Pasta => &[ + "M4 10h16v2a8 8 0 0 1-16 0Z", + "M7 9c0-3 1.5-6 3-7l1 .6C9.8 4 9 6.4 9 9Zm4 0c0-3 1.5-6 3-7l1 .6c-1.2 1.4-2 3.8-2 6.4Z", + ], + Icon::Meat => &[ + "M14.5 3.5c3.6 0 6 2.7 6 6 0 4.4-4.6 8-8.5 8-1.1 0-2 .4-2.6 1.1l-1.7 2a1.8 1.8 0 1 1-2.6-2.4l.3-.3a1.8 1.8 0 1 1 1.1-3.3c.9-.6 1.4-1.6 1.4-2.7 0-4 3-8.4 6.6-8.4Z", + ], + Icon::Fish => &[ + "M2 12c2.5-3.6 6-5.5 9.6-5.5 3.7 0 6.6 2.4 8 5.5-1.4 3.1-4.3 5.5-8 5.5C8 17.5 4.5 15.6 2 12Zm14.5-1.2a1.2 1.2 0 1 0 0 .01Z", + "M20.5 12 23 8v8Z", + ], + Icon::Bottle => &[ + "M10 2h4v4.5c2 1 3 2.7 3 4.8V20a2 2 0 0 1-2 2H9a2 2 0 0 1-2-2v-8.7c0-2.1 1-3.8 3-4.8Z", + ], + Icon::Basket => &[ + "M7.6 9 11 3.4l1.3.8L9.3 9h5.4l-3-4.8 1.3-.8L16.4 9H22l-2 10.5a2 2 0 0 1-2 1.5H6a2 2 0 0 1-2-1.5L2 9Z", + ], + } +} + +pub fn icon_label(icon: Icon) -> &'static str { + match icon { + Icon::Apple => "Pomme", + Icon::Banana => "Banane", + Icon::Carrot => "Carotte", + Icon::Lemon => "Citron", + Icon::Glass => "Verre", + Icon::Milk => "Brique de lait", + Icon::IceCream => "Glace", + Icon::Cheese => "Fromage", + Icon::Egg => "Œuf", + Icon::Coffee => "Café", + Icon::Bread => "Pain", + Icon::Croissant => "Viennoiserie", + Icon::Pasta => "Pâtes", + Icon::Meat => "Viande", + Icon::Fish => "Poisson", + Icon::Bottle => "Bouteille", + Icon::Basket => "Panier", + } +} + +#[component] +pub fn IconSvg(icon: Icon, #[prop(into, optional)] class: String) -> impl IntoView { + view! { + + } +} diff --git a/src/app/mod.rs b/src/app/mod.rs new file mode 100644 index 0000000..05c97f4 --- /dev/null +++ b/src/app/mod.rs @@ -0,0 +1,446 @@ +mod icons; +mod sheets; +mod tiles; + +use std::collections::HashMap; +use std::future::Future; + +use leptos::prelude::*; +use leptos::task::spawn_local; +use leptos_meta::{Link, Meta, MetaTags, Stylesheet, Title, provide_meta_context}; +use leptos_router::components::{A, Redirect, Route, Router, Routes}; +use leptos_router::hooks::use_params_map; +use leptos_router::path; + +use crate::api::{get_items, get_lists, get_suggestions}; +use crate::model::{Item, ShoppingList, Suggestion}; +use sheets::{ItemEditor, ItemSheet, ListEditor, ListSheet}; +use tiles::{BasketTile, ItemTile, SuggestionTile}; + +pub fn shell(options: LeptosOptions) -> impl IntoView { + view! { + + + + + + + + + + + + + + } +} + +#[component] +pub fn App() -> impl IntoView { + provide_meta_context(); + + view! { + + + + + + + + + + <Router> + <Routes fallback=|| view! { <p class="p-4">"Page introuvable."</p> }> + <Route path=path!("/") view=ListsPage /> + <Route path=path!("/l/:id") view=ListsPage /> + </Routes> + </Router> + } +} + +/// Page-wide state shared by tiles and sheets. +#[derive(Clone, Copy)] +pub struct Ctx { + /// Bumped after every mutation so resources refetch. + refresh: RwSignal<u32>, + error: RwSignal<Option<String>>, + /// Checked state applied before the server confirms it. + optimistic: RwSignal<HashMap<i64, bool>>, + item_editor: RwSignal<Option<ItemEditor>>, + list_editor: RwSignal<Option<ListEditor>>, +} + +impl Ctx { + /// Runs a server call, then refreshes data or reports the error. + fn mutate<T: 'static>( + self, + call: impl Future<Output = Result<T, ServerFnError>> + 'static, + on_ok: impl FnOnce(T) + 'static, + ) { + spawn_local(async move { + match call.await { + Ok(value) => { + on_ok(value); + self.refresh.update(|n| *n += 1); + } + Err(err) => self.error.set(Some(error_message(err))), + } + }); + } + + fn toggle(self, item: &Item) { + let (id, checked) = (item.id, !item.checked); + self.optimistic.update(|map| { + map.insert(id, checked); + }); + spawn_local(async move { + if let Err(err) = crate::api::set_checked(id, checked).await { + self.optimistic.update(|map| { + map.remove(&id); + }); + self.error.set(Some(error_message(err))); + } + }); + } +} + +fn error_message(err: ServerFnError) -> String { + match err { + ServerFnError::ServerError(msg) => msg, + _ => "Impossible de joindre le serveur.".to_owned(), + } +} + +#[component] +fn ListsPage() -> impl IntoView { + let ctx = Ctx { + refresh: RwSignal::new(0), + error: RwSignal::new(None), + optimistic: RwSignal::new(HashMap::new()), + item_editor: RwSignal::new(None), + list_editor: RwSignal::new(None), + }; + provide_context(ctx); + + let params = use_params_map(); + let active_id = Memo::new(move |_| params.read().get("id").and_then(|id| id.parse::<i64>().ok())); + + let lists = Resource::new(move || ctx.refresh.get(), |_| get_lists()); + let items = Resource::new( + move || (active_id.get(), ctx.refresh.get()), + |(id, _)| async move { + match id { + Some(id) => get_items(id).await, + None => Ok(Vec::new()), + } + }, + ); + let suggestions = Resource::new( + move || (active_id.get(), ctx.refresh.get()), + |(id, _)| async move { + match id { + Some(id) => get_suggestions(id).await, + None => Ok(Vec::new()), + } + }, + ); + + view! { + <main class="mx-auto flex min-h-dvh max-w-md flex-col px-4 pt-[max(1.5rem,env(safe-area-inset-top))] pb-32"> + <header class="flex items-start justify-between gap-4"> + <h1 class="font-display text-5xl leading-[0.9] font-extrabold tracking-tight"> + "mes"<br />"listes" + </h1> + <div + class="grid size-14 shrink-0 place-items-center rounded-2xl bg-ink font-display text-lg font-bold text-lime" + aria-label="Profil" + > + "CL" + </div> + </header> + + <ErrorBanner /> + + <Transition fallback=|| view! { <TicketSkeleton /> }> + <ErrorBoundary fallback=|errors| { + view! { + <p class="mt-6 rounded-2xl bg-paper p-4"> + "Oups : " + {move || { + errors.get().into_iter().map(|(_, e)| e.to_string()).collect::<Vec<_>>().join(", ") + }} + </p> + } + }> + {move || Suspend::new(async move { + let lists = lists.await?; + let items = items.await?; + let suggestions = suggestions.await?; + Ok::<_, ServerFnError>(view! { + <ListsContent lists items suggestions active_id=active_id.get() /> + }) + })} + </ErrorBoundary> + </Transition> + </main> + + <ItemSheet list_id=active_id /> + <ListSheet /> + } +} + +#[component] +fn ListsContent( + lists: Vec<ShoppingList>, + items: Vec<Item>, + suggestions: Vec<Suggestion>, + active_id: Option<i64>, +) -> impl IntoView { + let ctx = expect_context::<Ctx>(); + + let Some(active_id) = active_id else { + return match lists.first() { + Some(first) => view! { <Redirect path=format!("/l/{}", first.id) /> }.into_any(), + None => view! { + <ListTabs lists active=None remaining=0 /> + <EmptyState /> + } + .into_any(), + }; + }; + let Some(list) = lists.iter().find(|l| l.id == active_id).cloned() else { + return view! { + <ListTabs lists active=None remaining=0 /> + <p class="mt-6 rounded-2xl bg-paper p-4">"Cette liste n'existe plus."</p> + } + .into_any(); + }; + + // Items with pending checkbox changes applied. + let items = StoredValue::new(items); + let current = Memo::new(move |_| { + let optimistic = ctx.optimistic.get(); + items.with_value(|items| { + items + .iter() + .cloned() + .map(|mut item| { + if let Some(&checked) = optimistic.get(&item.id) { + item.checked = checked; + } + item + }) + .collect::<Vec<_>>() + }) + }); + let to_get = Memo::new(move |_| current.with(|items| items.iter().filter(|i| !i.checked).cloned().collect::<Vec<_>>())); + let in_basket = Memo::new(move |_| current.with(|items| items.iter().filter(|i| i.checked).cloned().collect::<Vec<_>>())); + let total = move || current.with(Vec::len); + let remaining = Signal::derive(move || to_get.with(Vec::len)); + + let edit_list = { + let list = list.clone(); + move |_| ctx.list_editor.set(Some(ListEditor::Edit(list.clone()))) + }; + + view! { + <ListTabs lists active=Some(active_id) remaining /> + + <section class="ticket relative mt-6 bg-paper px-5 pt-6 pb-8"> + <div class="flex items-start justify-between gap-2"> + <p class="font-mono text-sm tracking-[0.2em] text-ink/60 uppercase"> + {format!("Ticket N°{:03} · {}", list.id, ticket_date(&list.created_at))} + </p> + <button + class="-mt-2 -mr-2 grid size-11 place-items-center rounded-full text-ink/60 active:bg-ink/5" + aria-label="Modifier la liste" + on:click=edit_list + > + <svg viewBox="0 0 24 24" fill="currentColor" class="size-6" aria-hidden="true"> + <circle cx="5" cy="12" r="2" /> + <circle cx="12" cy="12" r="2" /> + <circle cx="19" cy="12" r="2" /> + </svg> + </button> + </div> + <h2 class="mt-1 font-display text-[1.7rem] leading-tight font-bold tracking-tight"> + {list.name.clone()} + </h2> + <p class="mt-1 text-lg text-ink/70">{move || remaining_text(remaining.get(), total())}</p> + + <div class="mt-5 grid grid-cols-3 gap-3"> + <For each=move || to_get.get() key=|item| (item.id, item.quantity.map(|q| q.label()), item.name.clone(), item.icon, item.category) let:item> + <ItemTile item /> + </For> + {suggestions + .into_iter() + .map(|suggestion| view! { <SuggestionTile suggestion list_id=active_id /> }) + .collect_view()} + </div> + + <Show when=move || !in_basket.with(Vec::is_empty)> + <div class="mt-6 border-t-2 border-dashed border-ink/15 pt-5"> + <div class="flex justify-between font-mono text-sm tracking-[0.2em] text-ink/60 uppercase"> + <span>"Déjà dans le panier"</span> + <span>{move || format!("{}/{}", in_basket.with(Vec::len), total())}</span> + </div> + <div class="mt-4 grid grid-cols-4 gap-2"> + <For each=move || in_basket.get() key=|item| (item.id, item.name.clone(), item.icon) let:item> + <BasketTile item /> + </For> + </div> + </div> + </Show> + </section> + + <button + class="tile-shadow fixed right-[max(1rem,calc(50vw-14rem+1rem))] bottom-[max(1.25rem,env(safe-area-inset-bottom))] z-10 rounded-2xl border-2 border-ink bg-pink px-6 py-4 font-display text-xl font-bold active:translate-y-1 active:shadow-none" + on:click=move |_| ctx.item_editor.set(Some(ItemEditor::New)) + > + "+ article" + </button> + } + .into_any() +} + +#[component] +fn ListTabs(lists: Vec<ShoppingList>, active: Option<i64>, #[prop(into)] remaining: Signal<usize>) -> impl IntoView { + let ctx = expect_context::<Ctx>(); + view! { + <nav class="-mx-4 mt-5 flex gap-3 overflow-x-auto px-4 pb-1 [scrollbar-width:none]"> + {lists + .into_iter() + .map(|list| { + let is_active = active == Some(list.id); + let class = if is_active { + "border-ink bg-ink text-paper" + } else { + "border-ink bg-paper" + }; + view! { + <A + href=format!("/l/{}", list.id) + attr:class=format!( + "flex shrink-0 items-center gap-2 rounded-2xl border-2 px-5 py-3 text-lg font-semibold whitespace-nowrap {class}", + ) + > + {(!is_active) + .then(|| { + view! { + <span class=format!( + "size-4 rounded-full border-2 border-ink {}", + list.color.dot_class(), + ) /> + } + })} + {list.name.clone()} + {is_active.then_some(move || format!(" · {}", remaining.get()))} + </A> + } + }) + .collect_view()} + <button + class="shrink-0 rounded-2xl border-2 border-dashed border-ink/50 px-5 py-3 text-lg font-semibold text-ink/70" + aria-label="Nouvelle liste" + on:click=move |_| ctx.list_editor.set(Some(ListEditor::New)) + > + "+" + </button> + </nav> + } +} + +#[component] +fn ErrorBanner() -> impl IntoView { + let ctx = expect_context::<Ctx>(); + view! { + {move || { + ctx.error + .get() + .map(|msg| { + view! { + <div + role="alert" + class="mt-4 flex items-center justify-between gap-3 rounded-2xl border-2 border-ink bg-pink px-4 py-3 font-medium" + > + <span>{msg}</span> + <button class="font-bold" on:click=move |_| ctx.error.set(None)> + "OK" + </button> + </div> + } + }) + }} + } +} + +#[component] +fn EmptyState() -> impl IntoView { + let ctx = expect_context::<Ctx>(); + view! { + <section class="ticket relative mt-6 bg-paper px-5 pt-6 pb-8 text-center"> + <p class="text-lg text-ink/70">"Aucune liste pour l'instant."</p> + <button + class="tile-shadow mt-4 rounded-2xl border-2 border-ink bg-pink px-5 py-3 font-display font-bold" + on:click=move |_| ctx.list_editor.set(Some(ListEditor::New)) + > + "Créer une liste" + </button> + </section> + } +} + +#[component] +fn TicketSkeleton() -> impl IntoView { + view! { <div class="ticket mt-20 h-96 animate-pulse bg-paper/60"></div> } +} + +fn remaining_text(remaining: usize, total: usize) -> String { + match (remaining, total) { + (_, 0) => "Liste vide : ajoute ton premier article.".to_owned(), + (0, _) => "Tout est dans le panier !".to_owned(), + (1, _) => "Encore 1 article à attraper.".to_owned(), + (n, _) => format!("Encore {n} articles à attraper."), + } +} + +/// "2026-10-07" → "mer. 07/10" (upper-cased by CSS). +fn ticket_date(iso: &str) -> String { + const DAYS: [&str; 7] = ["dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."]; + const OFFSETS: [i32; 12] = [0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4]; + + let mut parts = iso.split('-').map(|p| p.parse::<i32>().ok()); + let (Some(Some(y)), Some(Some(m @ 1..=12)), Some(Some(d))) = (parts.next(), parts.next(), parts.next()) + else { + return String::new(); + }; + // Sakamoto's algorithm, 0 = Sunday. + let y_adj = if m < 3 { y - 1 } else { y }; + let weekday = (y_adj + y_adj / 4 - y_adj / 100 + y_adj / 400 + OFFSETS[(m - 1) as usize] + d) % 7; + format!("{} {d:02}/{m:02}", DAYS[weekday as usize]) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn formats_ticket_date() { + assert_eq!(ticket_date("2026-10-07"), "mer. 07/10"); + assert_eq!(ticket_date("2024-02-29"), "jeu. 29/02"); + assert_eq!(ticket_date("garbage"), ""); + } + + #[test] + fn remaining_wording() { + assert_eq!(remaining_text(5, 7), "Encore 5 articles à attraper."); + assert_eq!(remaining_text(1, 2), "Encore 1 article à attraper."); + assert_eq!(remaining_text(0, 2), "Tout est dans le panier !"); + } +} diff --git a/src/app/sheets.rs b/src/app/sheets.rs new file mode 100644 index 0000000..77c03e6 --- /dev/null +++ b/src/app/sheets.rs @@ -0,0 +1,382 @@ +use leptos::ev; +use leptos::prelude::*; +use leptos_router::hooks::use_navigate; + +use super::Ctx; +use super::icons::{IconSvg, icon_label}; +use crate::model::{Category, Icon, Item, ItemInput, ListColor, Quantity, ShoppingList, Unit}; + +#[derive(Clone, Debug, PartialEq)] +pub enum ItemEditor { + New, + Edit(Item), +} + +#[derive(Clone, Debug, PartialEq)] +pub enum ListEditor { + New, + Edit(ShoppingList), +} + +/// Bottom sheet with a backdrop; `on_close` runs on backdrop tap or Escape. +#[component] +fn Sheet(title: String, on_close: impl Fn() + Copy + Send + Sync + 'static, children: Children) -> impl IntoView { + let handle = window_event_listener(ev::keydown, move |ev| { + if ev.key() == "Escape" { + on_close(); + } + }); + on_cleanup(move || handle.remove()); + + view! { + <div class="fixed inset-0 z-20 flex items-end justify-center" role="dialog" aria-modal="true"> + <div class="absolute inset-0 bg-ink/50" on:click=move |_| on_close()></div> + <div class="relative max-h-[90dvh] w-full max-w-md overflow-y-auto rounded-t-3xl border-2 border-b-0 border-ink bg-paper px-5 pt-3 pb-[max(1.5rem,env(safe-area-inset-bottom))]"> + <div class="mx-auto mb-4 h-1.5 w-12 rounded-full bg-ink/20"></div> + <h2 class="font-display text-2xl font-bold">{title}</h2> + {children()} + </div> + </div> + } +} + +#[component] +pub fn ItemSheet(#[prop(into)] list_id: Signal<Option<i64>>) -> impl IntoView { + let ctx = expect_context::<Ctx>(); + move || { + let editor = ctx.item_editor.get()?; + let list_id = list_id.get()?; + Some(view! { <ItemForm editor list_id /> }) + } +} + +#[component] +fn ItemForm(editor: ItemEditor, list_id: i64) -> impl IntoView { + let ctx = expect_context::<Ctx>(); + let close = move || ctx.item_editor.set(None); + + let existing = match &editor { + ItemEditor::Edit(item) => Some(item.clone()), + ItemEditor::New => None, + }; + let name = RwSignal::new(existing.as_ref().map(|i| i.name.clone()).unwrap_or_default()); + let amount = RwSignal::new( + existing + .as_ref() + .and_then(|i| i.quantity) + .map(|q| q.amount.to_string().replace('.', ",")) + .unwrap_or_default(), + ); + let unit = RwSignal::new(existing.as_ref().and_then(|i| i.quantity).map_or(Unit::Piece, |q| q.unit)); + let icon = RwSignal::new(existing.as_ref().map_or(Icon::Basket, |i| i.icon)); + let category = RwSignal::new(existing.as_ref().map_or(Category::Autre, |i| i.category)); + let item_id = existing.as_ref().map(|i| i.id); + + let invalid_amount = Memo::new(move |_| amount.with(|a| !a.trim().is_empty() && parse_amount(a).is_none())); + + let submit = move |ev: ev::SubmitEvent| { + ev.prevent_default(); + if invalid_amount.get() { + return; + } + let input = ItemInput { + name: name.get(), + quantity: parse_amount(&amount.get()).map(|amount| Quantity { amount, unit: unit.get() }), + icon: icon.get(), + category: category.get(), + }; + match item_id { + Some(id) => ctx.mutate(crate::api::update_item(id, input), move |_| close()), + None => ctx.mutate(crate::api::add_item(list_id, input), move |_| close()), + } + }; + let delete = move |_| { + if let Some(id) = item_id { + ctx.mutate(crate::api::delete_item(id), move |_| close()); + } + }; + + let title = if item_id.is_some() { "Modifier l'article" } else { "Nouvel article" }; + + view! { + <Sheet title=title.to_owned() on_close=close> + <form class="mt-4 flex flex-col gap-5" on:submit=submit> + <label class="flex flex-col gap-1.5"> + <span class="font-mono text-xs tracking-[0.2em] text-ink/60 uppercase">"Nom"</span> + <input + class="field" + required + maxlength="60" + autofocus + placeholder="Avocats" + bind:value=name + /> + </label> + + <div class="flex flex-col gap-1.5"> + <span class="font-mono text-xs tracking-[0.2em] text-ink/60 uppercase"> + "Quantité (facultatif)" + </span> + <div class="flex gap-2"> + <input + class="field w-28" + inputmode="decimal" + placeholder="3" + aria-label="Quantité" + aria-invalid=move || invalid_amount.get().to_string() + bind:value=amount + /> + <select + class="field flex-1" + aria-label="Unité" + on:change=move |ev| { + if let Some(u) = Unit::parse(&event_target_value(&ev)) { + unit.set(u); + } + } + > + {Unit::ALL + .iter() + .map(|&u| { + view! { + <option value=u.as_str() selected=move || unit.get() == u> + {u.label()} + </option> + } + }) + .collect_view()} + </select> + </div> + <Show when=move || invalid_amount.get()> + <p class="text-sm text-red-700">"Quantité invalide."</p> + </Show> + </div> + + <fieldset class="flex flex-col gap-1.5"> + <legend class="mb-1.5 font-mono text-xs tracking-[0.2em] text-ink/60 uppercase"> + "Rayon" + </legend> + <div class="flex flex-wrap gap-2"> + {Category::ALL + .iter() + .map(|&c| { + view! { + <button + type="button" + class=move || { + format!( + "rounded-full border-2 px-3 py-1.5 text-sm font-semibold {} {}", + c.tile_class(), + if category.get() == c { "border-ink" } else { "border-transparent opacity-70" }, + ) + } + aria-pressed=move || (category.get() == c).to_string() + on:click=move |_| category.set(c) + > + {c.label()} + </button> + } + }) + .collect_view()} + </div> + </fieldset> + + <fieldset class="flex flex-col gap-1.5"> + <legend class="mb-1.5 font-mono text-xs tracking-[0.2em] text-ink/60 uppercase"> + "Icône" + </legend> + <div class="grid grid-cols-6 gap-2"> + {Icon::ALL + .iter() + .map(|&i| { + view! { + <button + type="button" + class=move || { + format!( + "grid aspect-square place-items-center rounded-xl border-2 {}", + if icon.get() == i { + "border-ink bg-lime" + } else { + "border-ink/10 bg-mist" + }, + ) + } + title=icon_label(i) + aria-label=icon_label(i) + aria-pressed=move || (icon.get() == i).to_string() + on:click=move |_| icon.set(i) + > + <IconSvg icon=i class="size-7" /> + </button> + } + }) + .collect_view()} + </div> + </fieldset> + + <div class="flex gap-3"> + {item_id + .map(|_| { + view! { + <button + type="button" + class="rounded-2xl border-2 border-ink px-4 py-3 font-semibold" + on:click=delete + > + "Supprimer" + </button> + } + })} + <button + type="submit" + class="tile-shadow flex-1 rounded-2xl border-2 border-ink bg-pink px-4 py-3 font-display text-lg font-bold active:translate-y-1 active:shadow-none" + > + {if item_id.is_some() { "Enregistrer" } else { "Ajouter" }} + </button> + </div> + </form> + </Sheet> + } +} + +/// "1,5" / "1.5" / "3" → Some; empty or non-positive → None. +fn parse_amount(text: &str) -> Option<f64> { + let value = text.trim().replace(',', ".").parse::<f64>().ok()?; + (value.is_finite() && value > 0.0).then_some(value) +} + +#[component] +pub fn ListSheet() -> impl IntoView { + let ctx = expect_context::<Ctx>(); + move || ctx.list_editor.get().map(|editor| view! { <ListForm editor /> }) +} + +#[component] +fn ListForm(editor: ListEditor) -> impl IntoView { + let ctx = expect_context::<Ctx>(); + let navigate = use_navigate(); + let close = move || ctx.list_editor.set(None); + + let existing = match &editor { + ListEditor::Edit(list) => Some(list.clone()), + ListEditor::New => None, + }; + let list_id = existing.as_ref().map(|l| l.id); + let name = RwSignal::new(existing.map(|l| l.name).unwrap_or_default()); + let color = RwSignal::new(ListColor::Pink); + + let submit = { + let navigate = navigate.clone(); + move |ev: ev::SubmitEvent| { + ev.prevent_default(); + match list_id { + Some(id) => ctx.mutate(crate::api::rename_list(id, name.get()), move |_| close()), + None => { + let navigate = navigate.clone(); + ctx.mutate(crate::api::create_list(name.get(), color.get()), move |id| { + close(); + navigate(&format!("/l/{id}"), Default::default()); + }) + } + } + } + }; + let delete = move |_| { + let Some(id) = list_id else { return }; + let confirmed = window() + .confirm_with_message("Supprimer cette liste et tous ses articles ?") + .unwrap_or(false); + if confirmed { + let navigate = navigate.clone(); + ctx.mutate(crate::api::delete_list(id), move |_| { + close(); + navigate("/", Default::default()); + }); + } + }; + + let title = if list_id.is_some() { "Modifier la liste" } else { "Nouvelle liste" }; + + view! { + <Sheet title=title.to_owned() on_close=close> + <form class="mt-4 flex flex-col gap-5" on:submit=submit> + <label class="flex flex-col gap-1.5"> + <span class="font-mono text-xs tracking-[0.2em] text-ink/60 uppercase">"Nom"</span> + <input + class="field" + required + maxlength="60" + autofocus + placeholder="Apéro de samedi" + bind:value=name + /> + </label> + + <Show when=move || list_id.is_none()> + <fieldset> + <legend class="mb-1.5 font-mono text-xs tracking-[0.2em] text-ink/60 uppercase"> + "Couleur" + </legend> + <div class="flex gap-3"> + {ListColor::ALL + .iter() + .map(|&c| { + view! { + <button + type="button" + class=move || { + format!( + "size-11 rounded-full border-2 {} {}", + c.dot_class(), + if color.get() == c { "border-ink ring-2 ring-ink ring-offset-2 ring-offset-paper" } else { "border-ink/40" }, + ) + } + aria-label=c.as_str() + aria-pressed=move || (color.get() == c).to_string() + on:click=move |_| color.set(c) + ></button> + } + }) + .collect_view()} + </div> + </fieldset> + </Show> + + <div class="flex gap-3"> + {list_id + .map(|_| { + view! { + <button + type="button" + class="rounded-2xl border-2 border-ink px-4 py-3 font-semibold" + on:click=delete + > + "Supprimer" + </button> + } + })} + <button + type="submit" + class="tile-shadow flex-1 rounded-2xl border-2 border-ink bg-pink px-4 py-3 font-display text-lg font-bold active:translate-y-1 active:shadow-none" + > + {if list_id.is_some() { "Enregistrer" } else { "Créer" }} + </button> + </div> + </form> + </Sheet> + } +} + +#[cfg(test)] +mod tests { + use super::parse_amount; + + #[test] + fn parses_amounts() { + assert_eq!(parse_amount("1,5"), Some(1.5)); + assert_eq!(parse_amount(" 3 "), Some(3.0)); + assert_eq!(parse_amount("0"), None); + assert_eq!(parse_amount("abc"), None); + } +} diff --git a/src/app/tiles.rs b/src/app/tiles.rs new file mode 100644 index 0000000..a26d7ec --- /dev/null +++ b/src/app/tiles.rs @@ -0,0 +1,125 @@ +use leptos::ev; +use leptos::prelude::*; + +use super::icons::IconSvg; +use super::{Ctx, ItemEditor}; +use crate::model::{Item, ItemInput, Suggestion}; + +const LONG_PRESS_MS: u64 = 450; + +/// Item still to buy: tap moves it to the basket, long press opens the editor. +#[component] +pub fn ItemTile(item: Item) -> impl IntoView { + let ctx = expect_context::<Ctx>(); + let item = StoredValue::new(item); + let timer = StoredValue::new(None::<TimeoutHandle>); + // Set once the long press fired, so the following click is ignored. + let long_pressed = StoredValue::new(false); + + let open_editor = move || { + long_pressed.set_value(true); + ctx.item_editor.set(Some(ItemEditor::Edit(item.get_value()))); + }; + let cancel_timer = move |_| { + if let Some(handle) = timer.get_value() { + handle.clear(); + timer.set_value(None); + } + }; + let start_timer = move |_: ev::PointerEvent| { + long_pressed.set_value(false); + let handle = set_timeout_with_handle(open_editor, std::time::Duration::from_millis(LONG_PRESS_MS)).ok(); + timer.set_value(handle); + }; + let on_click = move |_| { + if long_pressed.get_value() { + long_pressed.set_value(false); + } else { + item.with_value(|item| ctx.toggle(item)); + } + }; + let on_context_menu = move |ev: ev::MouseEvent| { + ev.prevent_default(); + cancel_timer(()); + open_editor(); + }; + + let (name, icon, category, badge) = item.with_value(|item| { + (item.name.clone(), item.icon, item.category, item.quantity.map(|q| q.label())) + }); + let aria_label = format!("{name} : mettre dans le panier"); + + view! { + <button + class=format!( + "tile-shadow relative flex aspect-square touch-manipulation flex-col items-center gap-1 rounded-2xl border-2 border-ink p-2 pb-2.5 text-center select-none active:translate-y-1 active:shadow-none [-webkit-touch-callout:none] {}", + category.tile_class(), + ) + aria-label=aria_label + on:click=on_click + on:contextmenu=on_context_menu + on:pointerdown=start_timer + on:pointerup=move |_| cancel_timer(()) + on:pointerleave=move |_| cancel_timer(()) + on:pointercancel=move |_| cancel_timer(()) + > + {badge + .map(|badge| { + view! { + <span class="absolute top-2 right-2 rounded-lg bg-ink px-1.5 py-0.5 font-mono text-xs text-paper"> + {badge} + </span> + } + })} + <IconSvg icon class="min-h-0 w-full flex-1 text-ink" /> + <span class="line-clamp-2 text-[0.95rem] leading-tight font-semibold break-words hyphens-auto"> + {name} + </span> + </button> + } +} + +/// Dashed "+ Beurre" tile: one tap adds a frequently bought product. +#[component] +pub fn SuggestionTile(suggestion: Suggestion, list_id: i64) -> impl IntoView { + let ctx = expect_context::<Ctx>(); + let Suggestion { name, icon, category } = suggestion; + let label = format!("+ {name}"); + + let add = move |_| { + let input = ItemInput { name: name.clone(), quantity: None, icon, category }; + ctx.mutate(crate::api::add_item(list_id, input), |_| ()); + }; + + view! { + <button + class="relative flex aspect-square flex-col items-center gap-1 rounded-2xl border-2 border-dashed border-ink/35 p-2 pb-2.5 text-center text-ink/55 active:bg-ink/5" + on:click=add + > + <IconSvg icon class="min-h-0 w-full flex-1 opacity-60" /> + <span class="line-clamp-2 text-[0.95rem] leading-tight font-semibold">{label}</span> + </button> + } +} + +/// Greyed tile in "Déjà dans le panier": tap puts the item back on the list. +#[component] +pub fn BasketTile(item: Item) -> impl IntoView { + let ctx = expect_context::<Ctx>(); + let (name, icon) = (item.name.clone(), item.icon); + let aria_label = format!("{name} : remettre dans la liste"); + let item = StoredValue::new(item); + + view! { + <button + class="flex aspect-square flex-col items-center gap-0.5 rounded-2xl bg-mist p-1.5 text-center text-ink/45 active:bg-ink/10" + aria-label=aria_label + on:click=move |_| item.with_value(|item| ctx.toggle(item)) + > + <IconSvg icon class="min-h-0 w-full flex-1" /> + <span class="line-clamp-2 text-xs leading-tight font-medium line-through decoration-ink/30"> + {name} + </span> + </button> + } +} diff --git a/src/db.rs b/src/db.rs new file mode 100644 index 0000000..cd11617 --- /dev/null +++ b/src/db.rs @@ -0,0 +1,249 @@ +use sqlx::sqlite::{SqliteConnectOptions, SqlitePool, SqlitePoolOptions, SqliteRow}; +use sqlx::Row; +use std::str::FromStr; + +use crate::model::{Category, Icon, Item, ItemInput, ListColor, Quantity, ShoppingList, Suggestion, Unit}; + +pub async fn connect(url: &str) -> Result<SqlitePool, sqlx::Error> { + let options = SqliteConnectOptions::from_str(url)? + .create_if_missing(true) + .foreign_keys(true); + // Each connection to `:memory:` opens a distinct database. + let max = if url.contains(":memory:") { 1 } else { 5 }; + let pool = SqlitePoolOptions::new() + .max_connections(max) + .connect_with(options) + .await?; + sqlx::migrate!().run(&pool).await?; + Ok(pool) +} + +fn decode<T>(value: Option<T>, column: &str) -> Result<T, sqlx::Error> { + value.ok_or_else(|| sqlx::Error::Decode(format!("invalid value in column `{column}`").into())) +} + +fn list_from_row(row: &SqliteRow) -> Result<ShoppingList, sqlx::Error> { + Ok(ShoppingList { + id: row.try_get("id")?, + name: row.try_get("name")?, + color: decode(ListColor::parse(row.try_get("color")?), "color")?, + created_at: row.try_get("created_at")?, + }) +} + +fn item_from_row(row: &SqliteRow) -> Result<Item, sqlx::Error> { + let amount: Option<f64> = row.try_get("amount")?; + let unit: Option<String> = row.try_get("unit")?; + let quantity = match (amount, unit) { + (Some(amount), Some(unit)) => Some(Quantity { + amount, + unit: decode(Unit::parse(&unit), "unit")?, + }), + _ => None, + }; + Ok(Item { + id: row.try_get("id")?, + list_id: row.try_get("list_id")?, + name: row.try_get("name")?, + quantity, + icon: decode(Icon::parse(row.try_get("icon")?), "icon")?, + category: decode(Category::parse(row.try_get("category")?), "category")?, + checked: row.try_get("checked")?, + }) +} + +pub async fn lists(pool: &SqlitePool) -> Result<Vec<ShoppingList>, sqlx::Error> { + sqlx::query("SELECT id, name, color, created_at FROM lists ORDER BY id") + .fetch_all(pool) + .await? + .iter() + .map(list_from_row) + .collect() +} + +pub async fn create_list(pool: &SqlitePool, name: &str, color: ListColor) -> Result<i64, sqlx::Error> { + let row = sqlx::query("INSERT INTO lists (name, color) VALUES (?, ?) RETURNING id") + .bind(name) + .bind(color.as_str()) + .fetch_one(pool) + .await?; + row.try_get("id") +} + +pub async fn rename_list(pool: &SqlitePool, id: i64, name: &str) -> Result<(), sqlx::Error> { + sqlx::query("UPDATE lists SET name = ? WHERE id = ?") + .bind(name) + .bind(id) + .execute(pool) + .await?; + Ok(()) +} + +pub async fn delete_list(pool: &SqlitePool, id: i64) -> Result<(), sqlx::Error> { + sqlx::query("DELETE FROM lists WHERE id = ?").bind(id).execute(pool).await?; + Ok(()) +} + +pub async fn items(pool: &SqlitePool, list_id: i64) -> Result<Vec<Item>, sqlx::Error> { + sqlx::query( + "SELECT id, list_id, name, amount, unit, icon, category, checked + FROM items WHERE list_id = ? ORDER BY id", + ) + .bind(list_id) + .fetch_all(pool) + .await? + .iter() + .map(item_from_row) + .collect() +} + +/// Remembers the product in the catalog so it can be suggested later. +async fn record_in_catalog(pool: &SqlitePool, input: &ItemInput) -> Result<(), sqlx::Error> { + sqlx::query( + "INSERT INTO catalog (name, icon, category, use_count) VALUES (?, ?, ?, 1) + ON CONFLICT(name) DO UPDATE SET + icon = excluded.icon, + category = excluded.category, + use_count = use_count + 1", + ) + .bind(&input.name) + .bind(input.icon.as_str()) + .bind(input.category.as_str()) + .execute(pool) + .await?; + Ok(()) +} + +pub async fn add_item(pool: &SqlitePool, list_id: i64, input: &ItemInput) -> Result<i64, sqlx::Error> { + let row = sqlx::query( + "INSERT INTO items (list_id, name, amount, unit, icon, category) + VALUES (?, ?, ?, ?, ?, ?) RETURNING id", + ) + .bind(list_id) + .bind(&input.name) + .bind(input.quantity.map(|q| q.amount)) + .bind(input.quantity.map(|q| q.unit.as_str())) + .bind(input.icon.as_str()) + .bind(input.category.as_str()) + .fetch_one(pool) + .await?; + record_in_catalog(pool, input).await?; + row.try_get("id") +} + +pub async fn update_item(pool: &SqlitePool, id: i64, input: &ItemInput) -> Result<(), sqlx::Error> { + sqlx::query( + "UPDATE items SET name = ?, amount = ?, unit = ?, icon = ?, category = ? WHERE id = ?", + ) + .bind(&input.name) + .bind(input.quantity.map(|q| q.amount)) + .bind(input.quantity.map(|q| q.unit.as_str())) + .bind(input.icon.as_str()) + .bind(input.category.as_str()) + .bind(id) + .execute(pool) + .await?; + Ok(()) +} + +pub async fn delete_item(pool: &SqlitePool, id: i64) -> Result<(), sqlx::Error> { + sqlx::query("DELETE FROM items WHERE id = ?").bind(id).execute(pool).await?; + Ok(()) +} + +pub async fn set_checked(pool: &SqlitePool, id: i64, checked: bool) -> Result<(), sqlx::Error> { + sqlx::query("UPDATE items SET checked = ? WHERE id = ?") + .bind(checked) + .bind(id) + .execute(pool) + .await?; + Ok(()) +} + +/// Most used catalog products not already on the list. +pub async fn suggestions(pool: &SqlitePool, list_id: i64, limit: i64) -> Result<Vec<Suggestion>, sqlx::Error> { + sqlx::query( + "SELECT name, icon, category FROM catalog c + WHERE NOT EXISTS ( + SELECT 1 FROM items i WHERE i.list_id = ? AND i.name = c.name COLLATE NOCASE + ) + ORDER BY use_count DESC, name + LIMIT ?", + ) + .bind(list_id) + .bind(limit) + .fetch_all(pool) + .await? + .iter() + .map(|row| { + Ok(Suggestion { + name: row.try_get("name")?, + icon: decode(Icon::parse(row.try_get("icon")?), "icon")?, + category: decode(Category::parse(row.try_get("category")?), "category")?, + }) + }) + .collect() +} + +#[cfg(test)] +mod tests { + use super::*; + + async fn pool() -> SqlitePool { + connect("sqlite::memory:").await.unwrap() + } + + fn input(name: &str) -> ItemInput { + ItemInput { + name: name.into(), + quantity: Some(Quantity { amount: 3.0, unit: Unit::Piece }), + icon: Icon::Apple, + category: Category::FruitsLegumes, + } + } + + #[tokio::test] + async fn item_crud_and_toggle() { + let pool = pool().await; + let list = lists(&pool).await.unwrap()[0].id; + + let id = add_item(&pool, list, &input("Avocats")).await.unwrap(); + let mut edited = input("Avocats"); + edited.quantity = Some(Quantity { amount: 4.0, unit: Unit::Piece }); + update_item(&pool, id, &edited).await.unwrap(); + set_checked(&pool, id, true).await.unwrap(); + + let all = items(&pool, list).await.unwrap(); + assert_eq!(all.len(), 1); + assert_eq!(all[0].quantity.unwrap().label(), "×4"); + assert!(all[0].checked); + + delete_item(&pool, id).await.unwrap(); + assert!(items(&pool, list).await.unwrap().is_empty()); + } + + #[tokio::test] + async fn suggestions_skip_items_on_list() { + let pool = pool().await; + let list = lists(&pool).await.unwrap()[0].id; + add_item(&pool, list, &input("beurre")).await.unwrap(); + + let names: Vec<_> = suggestions(&pool, list, 3) + .await + .unwrap() + .into_iter() + .map(|s| s.name) + .collect(); + assert!(!names.iter().any(|n| n.eq_ignore_ascii_case("beurre"))); + assert_eq!(names.len(), 3); + } + + #[tokio::test] + async fn deleting_list_cascades() { + let pool = pool().await; + let list = create_list(&pool, "Apéro", ListColor::Pink).await.unwrap(); + add_item(&pool, list, &input("Chips")).await.unwrap(); + delete_list(&pool, list).await.unwrap(); + assert!(items(&pool, list).await.unwrap().is_empty()); + } +} diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..f332f02 --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,13 @@ +pub mod api; +pub mod app; +pub mod model; + +#[cfg(feature = "ssr")] +pub mod db; + +#[cfg(feature = "hydrate")] +#[wasm_bindgen::prelude::wasm_bindgen] +pub fn hydrate() { + console_error_panic_hook::set_once(); + leptos::mount::hydrate_body(app::App); +} diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..10b7d22 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,44 @@ +#[cfg(feature = "ssr")] +#[tokio::main] +async fn main() { + use axum::Router; + use leptos::prelude::*; + use leptos_axum::{LeptosRoutes, generate_route_list}; + use lisette::app::{App, shell}; + + let conf = get_configuration(None).expect("invalid Leptos configuration"); + let leptos_options = conf.leptos_options; + let addr = leptos_options.site_addr; + + let database_url = + std::env::var("DATABASE_URL").unwrap_or_else(|_| "sqlite://lisette.db".to_owned()); + let pool = lisette::db::connect(&database_url) + .await + .expect("cannot open database"); + + let routes = generate_route_list(App); + let app = Router::new() + .leptos_routes_with_context( + &leptos_options, + routes, + { + let pool = pool.clone(); + move || provide_context(pool.clone()) + }, + { + let leptos_options = leptos_options.clone(); + move || shell(leptos_options.clone()) + }, + ) + .fallback(leptos_axum::file_and_error_handler(shell)) + .with_state(leptos_options); + + // Server functions are registered by `leptos_routes_with_context`; they get the pool + // from the same context closure. + let listener = tokio::net::TcpListener::bind(&addr).await.unwrap(); + leptos::logging::log!("listening on http://{addr}"); + axum::serve(listener, app.into_make_service()).await.unwrap(); +} + +#[cfg(not(feature = "ssr"))] +pub fn main() {} diff --git a/src/model.rs b/src/model.rs new file mode 100644 index 0000000..c051d57 --- /dev/null +++ b/src/model.rs @@ -0,0 +1,243 @@ +use serde::{Deserialize, Serialize}; + +/// Generates `as_str` / `from_str` / `ALL` for a fieldless enum stored as TEXT. +macro_rules! text_enum { + ($name:ident { $($variant:ident => $text:literal),+ $(,)? }) => { + impl $name { + pub const ALL: &'static [$name] = &[$($name::$variant),+]; + + pub fn as_str(self) -> &'static str { + match self { + $($name::$variant => $text),+ + } + } + + pub fn parse(s: &str) -> Option<Self> { + match s { + $($text => Some($name::$variant),)+ + _ => None, + } + } + } + }; +} + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ShoppingList { + pub id: i64, + pub name: String, + pub color: ListColor, + pub created_at: String, +} + +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] +pub enum ListColor { + Lime, + Pink, + Sky, + Peach, +} + +text_enum!(ListColor { + Lime => "lime", + Pink => "pink", + Sky => "sky", + Peach => "peach", +}); + +impl ListColor { + pub fn dot_class(self) -> &'static str { + match self { + ListColor::Lime => "bg-lime", + ListColor::Pink => "bg-pink", + ListColor::Sky => "bg-sky", + ListColor::Peach => "bg-peach", + } + } +} + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct Item { + pub id: i64, + pub list_id: i64, + pub name: String, + pub quantity: Option<Quantity>, + pub icon: Icon, + pub category: Category, + pub checked: bool, +} + +#[derive(Clone, Copy, Debug, PartialEq, Serialize, Deserialize)] +pub struct Quantity { + pub amount: f64, + pub unit: Unit, +} + +impl Quantity { + /// Short label for the tile badge: "×3", "500 g", "1,5 L". + pub fn label(&self) -> String { + let amount = if self.amount.fract() == 0.0 { + format!("{}", self.amount as i64) + } else { + format!("{}", self.amount).replace('.', ",") + }; + match self.unit { + Unit::Piece => format!("×{amount}"), + unit => format!("{amount} {}", unit.label()), + } + } +} + +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] +pub enum Unit { + Piece, + Gram, + Kilogram, + Millilitre, + Litre, +} + +text_enum!(Unit { + Piece => "pc", + Gram => "g", + Kilogram => "kg", + Millilitre => "ml", + Litre => "l", +}); + +impl Unit { + pub fn label(self) -> &'static str { + match self { + Unit::Piece => "pièce(s)", + Unit::Gram => "g", + Unit::Kilogram => "kg", + Unit::Millilitre => "mL", + Unit::Litre => "L", + } + } +} + +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] +pub enum Category { + FruitsLegumes, + Frais, + Epicerie, + Viande, + Boulangerie, + Autre, +} + +text_enum!(Category { + FruitsLegumes => "fruits_legumes", + Frais => "frais", + Epicerie => "epicerie", + Viande => "viande", + Boulangerie => "boulangerie", + Autre => "autre", +}); + +impl Category { + pub fn label(self) -> &'static str { + match self { + Category::FruitsLegumes => "Fruits & légumes", + Category::Frais => "Frais", + Category::Epicerie => "Épicerie", + Category::Viande => "Viande & poisson", + Category::Boulangerie => "Boulangerie", + Category::Autre => "Autre", + } + } + + /// Tailwind background class for the item tile. + pub fn tile_class(self) -> &'static str { + match self { + Category::FruitsLegumes => "bg-lime", + Category::Frais => "bg-sky", + Category::Epicerie => "bg-peach", + Category::Viande => "bg-rose", + Category::Boulangerie => "bg-sand", + Category::Autre => "bg-lilac", + } + } +} + +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] +pub enum Icon { + Apple, + Banana, + Carrot, + Lemon, + Glass, + Milk, + IceCream, + Cheese, + Egg, + Coffee, + Bread, + Croissant, + Pasta, + Meat, + Fish, + Bottle, + Basket, +} + +text_enum!(Icon { + Apple => "apple", + Banana => "banana", + Carrot => "carrot", + Lemon => "lemon", + Glass => "glass", + Milk => "milk", + IceCream => "ice_cream", + Cheese => "cheese", + Egg => "egg", + Coffee => "coffee", + Bread => "bread", + Croissant => "croissant", + Pasta => "pasta", + Meat => "meat", + Fish => "fish", + Bottle => "bottle", + Basket => "basket", +}); + +/// A frequently bought product, offered as a dashed "+ Beurre" tile. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct Suggestion { + pub name: String, + pub icon: Icon, + pub category: Category, +} + +/// Payload for creating or editing an item. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ItemInput { + pub name: String, + pub quantity: Option<Quantity>, + pub icon: Icon, + pub category: Category, +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn quantity_labels() { + let q = |amount, unit| Quantity { amount, unit }.label(); + assert_eq!(q(3.0, Unit::Piece), "×3"); + assert_eq!(q(500.0, Unit::Gram), "500 g"); + assert_eq!(q(1.5, Unit::Litre), "1,5 L"); + } + + #[test] + fn text_roundtrip() { + for icon in Icon::ALL { + assert_eq!(Icon::parse(icon.as_str()), Some(*icon)); + } + for cat in Category::ALL { + assert_eq!(Category::parse(cat.as_str()), Some(*cat)); + } + } +} diff --git a/style/main.css b/style/main.css new file mode 100644 index 0000000..f6ab2d4 --- /dev/null +++ b/style/main.css @@ -0,0 +1,57 @@ +@import "tailwindcss"; + +@theme { + --color-lime: #bfe383; + --color-sky: #7fdffb; + --color-peach: #ffbd76; + --color-pink: #ffadd6; + --color-rose: #ff9b8a; + --color-sand: #f2d9a4; + --color-lilac: #cdb8ff; + --color-ink: #1c1c24; + --color-paper: #fdfcf7; + --color-mist: #efede8; + + --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif; + --font-display: "Unbounded", "Inter", ui-sans-serif, sans-serif; + --font-mono: "JetBrains Mono", ui-monospace, monospace; +} + +/* Hard drop shadow under tiles and buttons. */ +@utility tile-shadow { + box-shadow: 0 5px 0 0 var(--color-ink); +} + +@utility field { + border-radius: 0.875rem; + border: 2px solid var(--color-ink); + background: white; + padding: 0.75rem 0.875rem; + font-size: 1.0625rem; /* ≥16px: no zoom on iOS focus */ + outline: none; + + &:focus { + box-shadow: 0 0 0 3px var(--color-lime); + } + &[aria-invalid="true"] { + border-color: var(--color-rose); + } +} + +/* Torn receipt edge along the bottom of the ticket. */ +@layer components { + .ticket::after { + content: ""; + position: absolute; + inset-inline: 0; + top: 100%; + height: 10px; + background: + linear-gradient(135deg, var(--color-paper) 50%, transparent 50%) 0 0 / 14px 10px repeat-x, + linear-gradient(225deg, var(--color-paper) 50%, transparent 50%) 0 0 / 14px 10px repeat-x; + } +} + +html { + -webkit-tap-highlight-color: transparent; +}