diff --git a/.gitignore b/.gitignore index ab19156b..65db440e 100644 --- a/.gitignore +++ b/.gitignore @@ -8,5 +8,3 @@ **/local.*.toml **/local.toml .env -.cargo -.vscode diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 48fe96bf..00000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,130 +0,0 @@ -# Guía de contribución a PageTop - -Gracias por tu interés en contribuir a **PageTop** 🎉 - -Este documento describe **cómo participar en el desarrollo del proyecto**, el flujo de trabajo y las -normas que permitan garantizar un historial limpio, trazable y sostenible a largo plazo. - -Por favor, léelo completo antes de abrir una *issue* o una *pull request*. - - -## 1. Repositorios - -PageTop mantiene **un único repositorio oficial**: - - * **Repositorio oficial:** https://git.cillero.es/manuelcillero/pagetop - * **Repositorio espejo:** https://github.com/manuelcillero/pagetop - -> ⚠️ **Importante** -> Aunque GitHub permite abrir *issues* y *pull requests*, **la integración del código se realiza -> únicamente en el repositorio oficial**. GitHub actúa como repositorio espejo que se sincroniza -> automáticamente para reflejar el mismo estado. - - -## 2. Issues (incidencias, propuestas, preguntas) - -Antes de abrir una *issue* **en GitHub**: - - * comprueba que no exista ya una similar, - * describe claramente el problema o propuesta, - * incluye pasos de reproducción si se trata de un *bug*, - * indica versión, entorno y contexto cuando sea relevante. - -Las *issues* se usan para: - - * informar de errores, - * propuestas de mejora, - * discusión técnica previa a cambios relevantes. - - -## 3. Pull Requests (PRs) - -### 3.1 Dónde abrirlas - -Las *pull requests* se abren **en GitHub**, normalmente contra la rama `main`. GitHub es el punto de -entrada recomendado para contribuciones externas. - -### 3.2 Reglas generales para PRs - - * Cada PR debe abordar **un único objetivo claro**. - * Mantén el alcance lo más acotado posible. - * Incluye descripción clara del cambio. - * Si el PR corrige una *issue*, enlázala explícitamente. - * Asegúrate de que el código compila y pasa las pruebas. - -### 3.3 Revisión y aceptación - -Todas las PRs son **revisadas manualmente** y pueden recibir comentarios o solicitudes de cambios. - -Las PRs aceptadas se integran en el repositorio oficial, nunca directamente en GitHub, preservando -siempre la **autoría original** del contribuidor. - - -### 3.4. Cierre de Pull Requests y sincronización - -Una vez que el cambio ha sido integrado en el repositorio oficial: - - * La PR en GitHub se **cierra manualmente**. - * Se añade un **mensaje estándar de cierre** indicando que el cambio ha sido integrado. - * El repositorio de GitHub **se sincroniza automáticamente** como espejo. - - -## 4. Estilo de código y calidad - - * Sigue el estilo existente del proyecto. - * Mantén los comentarios claros y precisos. - * La documentación es parte del código: actualízala cuando sea necesario. - * Cambios públicos o estructurales deben ir acompañados de documentación. - - -## 5. Commits - -PageTop usa la especificación **gitmoji** para los mensajes de *commit*. El formato recomendado es: - - ```text - [(ámbito opcional):] - «LÍNEA EN BLANCO» - Cuerpo opcional - «LÍNEA EN BLANCO» - Nota(s) al pie opcional(es) para referencias, incidencias o cambios incompatibles - ``` - -Ejemplos (no más de 50 caracteres en la primera línea, y no más de 80 en el resto): - - * `📝 Actualiza la guía de contribución` - * `♻️ (locale): Refactoriza sistema de localización` - * Un mensaje completo: - ``` - 🎨 (bootsier): Mejora la asignación de clases - - - Simplifica la generación de clases CSS para componentes Bootstrap. - - Elimina duplicidades en enums de estilos y centraliza la lógica de composición - para reducir errores y facilitar mantenimiento. - - Alinea los nombres de variantes con la documentación pública. - - Refs: PR #123 - ``` - -El emoji puede usarse en formato Unicode o como *shortcode*, por ejemplo `:sparkles:` en vez de ✨. - -Consulta la especificación oficial en https://gitmoji.dev/specification - -Durante la integración, los *commits* pueden ajustarse para adaptarse al historial del proyecto. - -Un *commit* debe representar una unidad lógica de cambio. Usa mensajes claros y descriptivos. - - -## 6. Comunicación y respeto - -PageTop sigue un enfoque profesional y colaborativo: - - * Sé respetuoso en revisiones y discusiones. - * Acepta sugerencias técnicas como parte del proceso. - * Recuerda que todas las contribuciones son revisadas con el objetivo de mejorar el proyecto. - -Si tienes dudas sobre el proceso, abre una *issue* de tipo pregunta para tratar la cuestión en -comunidad. - ---- - -Gracias por contribuir a **PageTop** 🚀 Cada aportación contribuye a mejorar el proyecto. diff --git a/CREDITS.md b/CREDITS.md index eaf97333..c5a7bd2e 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -1,7 +1,7 @@ # 🔃 Dependencias PageTop está basado en [Rust](https://www.rust-lang.org/) y crece a hombros de gigantes aprovechando -algunas de las librerías más robustas y populares del [ecosistema Rust](https://lib.rs/) como son: +algunas de las librerías más robustas y populares del [ecosistema Rust](https://lib.rs) como son: * [Actix Web](https://actix.rs/) para los servicios web. * [Config](https://docs.rs/config) para cargar y procesar las opciones de configuración. @@ -26,15 +26,8 @@ para mostrar un banner de presentación en el terminal con el nombre de la aplic * [starwars.flf](http://www.figlet.org/fontdb_example.cgi?font=starwars.flf) de *Ryan Youck* -# 🎨 CSS +# 🎨 Icono -La extensión `pagetop-bootsier` es un tema que integra [Bootstrap 5.3.8](https://getbootstrap.com/) -para los estilos y componentes de la interfaz. Bootstrap está distribuido bajo licencia -[MIT](https://github.com/twbs/bootstrap/blob/main/LICENSE). - - -# 👾 Icono - -"La Mascota" sonriente es una simpática creación de [Webalys](https://www.iconfinder.com/webalys). +"La Criatura" sonriente es una simpática creación de [Webalys](https://www.iconfinder.com/webalys). Forma parte de su colección [Nasty Icons](https://www.iconfinder.com/iconsets/nasty), disponible en [ICONFINDER](https://www.iconfinder.com). diff --git a/Cargo.lock b/Cargo.lock index c2f07b3a..2f9fa42e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -21,9 +21,9 @@ dependencies = [ [[package]] name = "actix-files" -version = "0.6.10" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df8c4f30e3272d7c345f88ae0aac3848507ef5ba871f9cc2a41c8085a0f0523b" +checksum = "6c0d87f10d70e2948ad40e8edea79c8e77c6c66e0250a4c1f09b690465199576" dependencies = [ "actix-http", "actix-service", @@ -31,7 +31,7 @@ dependencies = [ "actix-web", "bitflags", "bytes", - "derive_more 2.1.1", + "derive_more 2.0.1", "futures-core", "http-range", "log", @@ -44,9 +44,9 @@ dependencies = [ [[package]] name = "actix-http" -version = "3.12.1" +version = "3.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93acb4a42f64936f9b8cae4a433b237599dd6eb6ed06124eb67132ef8cc90662" +checksum = "7926860314cbe2fb5d1f13731e387ab43bd32bca224e82e6e2db85de0a3dba49" dependencies = [ "actix-codec", "actix-rt", @@ -57,7 +57,7 @@ dependencies = [ "brotli", "bytes", "bytestring", - "derive_more 2.1.1", + "derive_more 2.0.1", "encoding_rs", "flate2", "foldhash", @@ -72,7 +72,7 @@ dependencies = [ "mime", "percent-encoding", "pin-project-lite", - "rand 0.10.1", + "rand 0.9.2", "sha1", "smallvec", "tokio", @@ -93,9 +93,9 @@ dependencies = [ [[package]] name = "actix-router" -version = "0.5.4" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14f8c75c51892f18d9c46150c5ac7beb81c95f78c8b83a634d49f4ca32551fe7" +checksum = "13d324164c51f63867b57e73ba5936ea151b8a41a1d23d1031eeb9f70d0236f8" dependencies = [ "bytestring", "cfg-if", @@ -153,8 +153,8 @@ dependencies = [ "actix-utils", "actix-web", "anyhow", - "derive_more 2.1.1", - "rand 0.9.4", + "derive_more 2.0.1", + "rand 0.9.2", "serde", "serde_json", "tracing", @@ -172,9 +172,9 @@ dependencies = [ [[package]] name = "actix-web" -version = "4.13.0" +version = "4.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff87453bc3b56e9b2b23c1cc0b1be8797184accf51d2abe0f8a33ec275d316bf" +checksum = "a597b77b5c6d6a1e1097fddde329a83665e25c5437c696a3a9a4aa514a614dea" dependencies = [ "actix-codec", "actix-http", @@ -189,7 +189,7 @@ dependencies = [ "bytestring", "cfg-if", "cookie", - "derive_more 2.1.1", + "derive_more 2.0.1", "encoding_rs", "foldhash", "futures-core", @@ -207,7 +207,7 @@ dependencies = [ "serde_json", "serde_urlencoded", "smallvec", - "socket2 0.6.3", + "socket2 0.5.10", "time", "tracing", "url", @@ -225,6 +225,15 @@ dependencies = [ "syn", ] +[[package]] +name = "addr2line" +version = "0.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5d307320b3181d6d7954e663bd7c774a838b8220fe0593c86d9fb09f498b4b" +dependencies = [ + "gimli", +] + [[package]] name = "adler2" version = "2.0.1" @@ -237,7 +246,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" dependencies = [ - "crypto-common 0.1.7", + "crypto-common", "generic-array", ] @@ -249,7 +258,7 @@ checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" dependencies = [ "cfg-if", "cipher", - "cpufeatures 0.2.17", + "cpufeatures", ] [[package]] @@ -280,9 +289,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.4" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] @@ -319,9 +328,9 @@ dependencies = [ [[package]] name = "anstream" -version = "1.0.0" +version = "0.6.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d" +checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" dependencies = [ "anstyle", "anstyle-parse", @@ -334,44 +343,44 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.14" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000" +checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" [[package]] name = "anstyle-parse" -version = "1.0.0" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e" +checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.5" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" +checksum = "9e231f6134f61b71076a3eab506c379d4f36122f2af15a9ff04415ea4c3339e2" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] name = "anstyle-wincon" -version = "3.0.11" +version = "3.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" +checksum = "3e0633414522a32ffaac8ac6cc8f748e090c5717661fddeea04219e2344f5f2a" dependencies = [ "anstyle", "once_cell_polyfill", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] name = "anyhow" -version = "1.0.102" +version = "1.0.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" +checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" [[package]] name = "autocfg" @@ -379,6 +388,21 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" +[[package]] +name = "backtrace" +version = "0.3.76" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb531853791a215d7c62a30daf0dde835f381ab5de4589cfe7c649d2cbe92bd6" +dependencies = [ + "addr2line", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", + "windows-link", +] + [[package]] name = "base64" version = "0.20.0" @@ -393,9 +417,9 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "bitflags" -version = "2.11.1" +version = "2.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3" +checksum = "2261d10cca569e4643e526d8dc2e62e433cc8aba21ab764233731f8d369bf394" [[package]] name = "block-buffer" @@ -406,15 +430,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "block-buffer" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdd35008169921d80bc60d3d0ab416eecb028c4cd653352907921d95084790be" -dependencies = [ - "hybrid-array", -] - [[package]] name = "brotli" version = "8.0.2" @@ -438,9 +453,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.12.1" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63044e1ae8e69f3b5a92c736ca6269b8d12fa7efe39bf34ddb06d102cf0e2cab" +checksum = "234113d19d0d7d613b40e86fb654acf958910802bcceab913a4f9e7cda03b1a4" dependencies = [ "memchr", "serde", @@ -448,36 +463,30 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.20.2" +version = "3.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb" - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" +checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" [[package]] name = "bytes" -version = "1.11.1" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" +checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" [[package]] name = "bytestring" -version = "1.5.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86566c496f2f47d9b8147a4c8b02ffdb69c919fe0c2b2e7195d22cbba0e635c9" +checksum = "113b4343b5f6617e7ad401ced8de3cc8b012e73a594347c307b90db3e9271289" dependencies = [ "bytes", ] [[package]] name = "cc" -version = "1.2.61" +version = "1.2.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d16d90359e986641506914ba71350897565610e87ce0ad9e6f28569db3dd5c6d" +checksum = "ac9fe6cdbb24b6ade63616c0a0688e45bb56732262c158df3c0c4bea4ca47cb7" dependencies = [ "find-msvc-tools", "jobserver", @@ -487,20 +496,9 @@ dependencies = [ [[package]] name = "cfg-if" -version = "1.0.4" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" - -[[package]] -name = "chacha20" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f8d983286843e49675a4b7a2d174efe136dc93a18d69130dd18198a6c167601" -dependencies = [ - "cfg-if", - "cpufeatures 0.3.0", - "rand_core 0.10.1", -] +checksum = "2fd1289c04a9ea8cb22300a459a72a385d7c73d3259e2ed7dcb2af674838cfa9" [[package]] name = "change-detection" @@ -514,9 +512,9 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.44" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c673075a2e0e5f4a1dde27ce9dee1ea4558c7ffe648f576438a20ca1d2acc4b0" +checksum = "145052bdd345b87320e369255277e3fb5152762ad123a901ef5c262dd38fe8d2" dependencies = [ "iana-time-zone", "js-sys", @@ -531,24 +529,24 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" dependencies = [ - "crypto-common 0.1.7", + "crypto-common", "inout", ] [[package]] name = "clap" -version = "4.6.1" +version = "4.5.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ddb117e43bbf7dacf0a4190fef4d345b9bad68dfc649cb349e7d17d28428e51" +checksum = "e2134bb3ea021b78629caa971416385309e0131b351b25e01dc16fb54e1b5fae" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.6.0" +version = "4.5.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "714a53001bf66416adb0e2ef5ac857140e7dc3a0c48fb28b2f10762fc4b5069f" +checksum = "c2ba64afa3c0a6df7fa517765e31314e983f51dda798ffba27b988194fb65dc9" dependencies = [ "anstream", "anstyle", @@ -558,9 +556,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "1.1.0" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" +checksum = "b94f61472cee1439c0b966b47e3aca9ae07e45d070759512cd390ea2bebc6675" [[package]] name = "codemap" @@ -570,17 +568,17 @@ checksum = "b9e769b5c8c8283982a987c6e948e540254f1058d5a74b8794914d4ef5fc2a24" [[package]] name = "colorchoice" -version = "1.0.5" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570" +checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" [[package]] name = "colored" -version = "3.1.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faf9468729b8cbcea668e36183cb69d317348c2e08e994829fb56ebfdfbaac34" +checksum = "fde0e0ec90c9dfb3b4b1a0891a7dcd0e2bffde2f7efed5fe7c9bb00e5bfb915e" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -591,9 +589,9 @@ checksum = "7439becb5fafc780b6f4de382b1a7a3e70234afe783854a4702ee8adbb838609" [[package]] name = "config" -version = "0.15.22" +version = "0.15.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e68cfe19cd7d23ffde002c24ffa5cda73931913ef394d5eaaa32037dc940c0c" +checksum = "180e549344080374f9b32ed41bf3b6b57885ff6a289367b3dbc10eea8acc1918" dependencies = [ "pathdiff", "serde_core", @@ -601,27 +599,12 @@ dependencies = [ "winnow", ] -[[package]] -name = "const-oid" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6ef517f0926dd24a1582492c791b6a4818a4d94e789a334894aa15b0d12f55c" - [[package]] name = "convert_case" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" -[[package]] -name = "convert_case" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "633458d4ef8c78b72454de2d54fd6ab2e60f9e02be22f3c6104cdc8a4e0fceb9" -dependencies = [ - "unicode-segmentation", -] - [[package]] name = "cookie" version = "0.16.2" @@ -633,7 +616,7 @@ dependencies = [ "hkdf", "hmac", "percent-encoding", - "rand 0.8.6", + "rand 0.8.5", "sha2", "subtle", "time", @@ -655,15 +638,6 @@ dependencies = [ "libc", ] -[[package]] -name = "cpufeatures" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201" -dependencies = [ - "libc", -] - [[package]] name = "crc32fast" version = "1.5.0" @@ -709,24 +683,15 @@ checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "crypto-common" -version = "0.1.7" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", "rand_core 0.6.4", "typenum", ] -[[package]] -name = "crypto-common" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77727bb15fa921304124b128af125e7e3b968275d1b108b379190264f4423710" -dependencies = [ - "hybrid-array", -] - [[package]] name = "ctr" version = "0.9.2" @@ -738,9 +703,9 @@ dependencies = [ [[package]] name = "deranged" -version = "0.5.8" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" +checksum = "a41953f86f8a05768a6cda24def994fd2f424b04ec5c719cf89989779f199071" dependencies = [ "powerfmt", ] @@ -751,7 +716,7 @@ version = "0.99.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6edb4b64a43d977b8e99788fe3a04d483834fba1215a7e02caa415b626497f7f" dependencies = [ - "convert_case 0.4.0", + "convert_case", "proc-macro2", "quote", "rustc_version", @@ -760,23 +725,21 @@ dependencies = [ [[package]] name = "derive_more" -version = "2.1.1" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d751e9e49156b02b44f9c1815bcb94b984cdcc4396ecc32521c739452808b134" +checksum = "093242cf7570c207c83073cf82f79706fe7b8317e98620a47d5be7c3d8497678" dependencies = [ "derive_more-impl", ] [[package]] name = "derive_more-impl" -version = "2.1.1" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "799a97264921d8623a957f6c3b9011f3b5492f557bbb7a5a19b7fa6d06ba8dcb" +checksum = "bda628edc44c4bb645fbe0f758797143e4e07926f7ebf4e9bdfbd3d2ce621df3" dependencies = [ - "convert_case 0.10.0", "proc-macro2", "quote", - "rustc_version", "syn", "unicode-xid", ] @@ -787,22 +750,11 @@ version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "block-buffer 0.10.4", - "crypto-common 0.1.7", + "block-buffer", + "crypto-common", "subtle", ] -[[package]] -name = "digest" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4850db49bf08e663084f7fb5c87d202ef91a3907271aff24a94eb97ff039153c" -dependencies = [ - "block-buffer 0.12.0", - "const-oid", - "crypto-common 0.2.1", -] - [[package]] name = "displaydoc" version = "0.2.5" @@ -841,30 +793,27 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.4.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] name = "figlet-rs" -version = "1.0.0" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aad4cf7e378685c1af30f41b4832c29700325524c648d47752cabd5b97e7b09b" -dependencies = [ - "zip", -] +checksum = "4742a071cd9694fc86f9fa1a08fa3e53d40cc899d7ee532295da2d085639fbc5" [[package]] name = "find-msvc-tools" -version = "0.1.9" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" +checksum = "52051878f80a721bb68ebfbc930e07b65ba72f2da88968ea5c06fd6ca3d3a127" [[package]] name = "flate2" -version = "1.1.9" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c" +checksum = "dc5a4e564e38c699f2880d3fda590bedc2e69f3f84cd48b457bd892ce61d0aa9" dependencies = [ "crc32fast", "miniz_oxide", @@ -888,9 +837,9 @@ dependencies = [ [[package]] name = "fluent-langneg" -version = "0.13.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eebbe59450baee8282d71676f3bfed5689aeab00b27545e83e5f14b1195e8b0" +checksum = "2c4ad0989667548f06ccd0e306ed56b61bd4d35458d54df5ec7587c0e8ed5e94" dependencies = [ "unic-langid", ] @@ -902,14 +851,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "54f0d287c53ffd184d04d8677f590f4ac5379785529e5e08b1c8083acdd5c198" dependencies = [ "memchr", - "thiserror", + "thiserror 2.0.17", ] [[package]] name = "fluent-template-macros" -version = "0.14.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6b1dac7e7f07f8a60aa844f616bede13deeffaf24e9e35ae9e4979a7dac4a5c" +checksum = "e6222b8a208b9f0e7b984da3616651b0cc74e4461571b118cb1c713e0f7617ee" dependencies = [ "flume", "ignore", @@ -921,9 +870,9 @@ dependencies = [ [[package]] name = "fluent-templates" -version = "0.14.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d48ac2b8e7c3a2198fc584af78e674d15dacdede8a6cebb686c844713f7d0ba" +checksum = "f8a893d77c0e48dc3f78421e9cba5d82e02bcb85d4520c506cec2fbebd0f513b" dependencies = [ "fluent-bundle", "fluent-langneg", @@ -933,7 +882,7 @@ dependencies = [ "ignore", "intl-memoizer", "log", - "thiserror", + "thiserror 1.0.69", "unic-langid", ] @@ -969,31 +918,32 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.32" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-sink" -version = "0.3.32" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.32" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" -version = "0.3.32" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-core", "futures-task", "pin-project-lite", + "pin-utils", "slab", ] @@ -1009,52 +959,27 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.17" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" +checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" dependencies = [ "cfg-if", "js-sys", "libc", - "wasi", + "wasi 0.11.1+wasi-snapshot-preview1", "wasm-bindgen", ] [[package]] name = "getrandom" -version = "0.3.4" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" dependencies = [ "cfg-if", "libc", - "r-efi 5.3.0", - "wasip2", -] - -[[package]] -name = "getrandom" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555" -dependencies = [ - "cfg-if", - "libc", - "r-efi 6.0.0", - "rand_core 0.10.1", - "wasip2", - "wasip3", -] - -[[package]] -name = "getter-methods" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c43d815f896a3c730f0d76b8348a1700dc8d8fd6c377e4590d531bdd646574d8" -dependencies = [ - "proc-macro2", - "quote", - "syn", + "r-efi", + "wasi 0.14.7+wasi-0.2.4", ] [[package]] @@ -1067,6 +992,12 @@ dependencies = [ "polyval", ] +[[package]] +name = "gimli" +version = "0.32.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e629b9b98ef3dd8afe6ca2bd0f89306cec16d43d907889945bc5d6687f2f13c7" + [[package]] name = "glob" version = "0.3.3" @@ -1075,9 +1006,9 @@ checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" [[package]] name = "globset" -version = "0.4.18" +version = "0.4.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52dfc19153a48bde0cbd630453615c8151bce3a5adfac7a0aebfbf0a1e1f57e3" +checksum = "54a1028dfc5f5df5da8a56a73e6c153c9a9708ec57232470703592a3f18e49f5" dependencies = [ "aho-corasick", "bstr", @@ -1093,7 +1024,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7a68216437ef68f0738e48d6c7bb9e6e6a92237e001b03d838314b068f33c94" dependencies = [ "clap", - "getrandom 0.2.17", + "getrandom 0.2.16", "grass_compiler", ] @@ -1108,7 +1039,7 @@ dependencies = [ "lasso", "once_cell", "phf", - "rand 0.8.6", + "rand 0.8.5", ] [[package]] @@ -1142,24 +1073,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.15.5" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" -dependencies = [ - "foldhash", -] - -[[package]] -name = "hashbrown" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f467dd6dccf739c208452f8014c75c18bb8301b050ad1cfb27153803edb0f51" - -[[package]] -name = "heck" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" +checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d" [[package]] name = "hkdf" @@ -1176,7 +1092,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest 0.10.7", + "digest", ] [[package]] @@ -1208,20 +1124,11 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" -[[package]] -name = "hybrid-array" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d46837a0ed51fe95bd3b05de33cd64a1ee88fc797477ca48446872504507c5" -dependencies = [ - "typenum", -] - [[package]] name = "iana-time-zone" -version = "0.1.65" +version = "0.1.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" +checksum = "33e57f83510bb73707521ebaffa789ec8caf86f9657cad665b092b581d40e9fb" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -1243,13 +1150,12 @@ dependencies = [ [[package]] name = "icu_collections" -version = "2.2.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2984d1cd16c883d7935b9e07e44071dca8d917fd52ecc02c04d5fa0b5a3f191c" +checksum = "200072f5d0e3614556f94a9930d5dc3e0662a652823904c3a75dc3b0af7fee47" dependencies = [ "displaydoc", "potential_utf", - "utf8_iter", "yoke", "zerofrom", "zerovec", @@ -1257,9 +1163,9 @@ dependencies = [ [[package]] name = "icu_locale_core" -version = "2.2.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92219b62b3e2b4d88ac5119f8904c10f8f61bf7e95b640d25ba3075e6cac2c29" +checksum = "0cde2700ccaed3872079a65fb1a78f6c0a36c91570f28755dda67bc8f7d9f00a" dependencies = [ "displaydoc", "litemap", @@ -1270,10 +1176,11 @@ dependencies = [ [[package]] name = "icu_normalizer" -version = "2.2.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c56e5ee99d6e3d33bd91c5d85458b6005a22140021cc324cea84dd0e72cff3b4" +checksum = "436880e8e18df4d7bbc06d58432329d6458cc84531f7ac5f024e93deadb37979" dependencies = [ + "displaydoc", "icu_collections", "icu_normalizer_data", "icu_properties", @@ -1284,38 +1191,42 @@ dependencies = [ [[package]] name = "icu_normalizer_data" -version = "2.2.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da3be0ae77ea334f4da67c12f149704f19f81d1adf7c51cf482943e84a2bad38" +checksum = "00210d6893afc98edb752b664b8890f0ef174c8adbb8d0be9710fa66fbbf72d3" [[package]] name = "icu_properties" -version = "2.2.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bee3b67d0ea5c2cca5003417989af8996f8604e34fb9ddf96208a033901e70de" +checksum = "016c619c1eeb94efb86809b015c58f479963de65bdb6253345c1a1276f22e32b" dependencies = [ + "displaydoc", "icu_collections", "icu_locale_core", "icu_properties_data", "icu_provider", + "potential_utf", "zerotrie", "zerovec", ] [[package]] name = "icu_properties_data" -version = "2.2.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e2bbb201e0c04f7b4b3e14382af113e17ba4f63e2c9d2ee626b720cbce54a14" +checksum = "298459143998310acd25ffe6810ed544932242d3f07083eee1084d83a71bd632" [[package]] name = "icu_provider" -version = "2.2.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "139c4cf31c8b5f33d7e199446eff9c1e02decfc2f0eec2c8d71f65befa45b421" +checksum = "03c80da27b5f4187909049ee2d72f276f0d9f99a42c306bd0131ecfe04d8e5af" dependencies = [ "displaydoc", "icu_locale_core", + "stable_deref_trait", + "tinystr", "writeable", "yoke", "zerofrom", @@ -1323,12 +1234,6 @@ dependencies = [ "zerovec", ] -[[package]] -name = "id-arena" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" - [[package]] name = "idna" version = "1.1.0" @@ -1342,9 +1247,9 @@ dependencies = [ [[package]] name = "idna_adapter" -version = "1.2.2" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" +checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" dependencies = [ "icu_normalizer", "icu_properties", @@ -1352,9 +1257,9 @@ dependencies = [ [[package]] name = "ignore" -version = "0.4.25" +version = "0.4.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3d782a365a015e0f5c04902246139249abf769125006fbe7649e2ee88169b4a" +checksum = "6d89fd380afde86567dfba715db065673989d6253f42b88179abd3eae47bda4b" dependencies = [ "crossbeam-deque", "globset", @@ -1374,24 +1279,19 @@ checksum = "e8a5a9a0ff0086c7a148acb942baaabeadf9504d10400b5a05645853729b9cd2" [[package]] name = "indexmap" -version = "2.14.0" +version = "2.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" +checksum = "4b0f83760fb341a774ed326568e19f5a863af4a952def8c39f9ab92fd95b88e5" dependencies = [ "equivalent", - "hashbrown 0.17.0", - "serde", - "serde_core", + "hashbrown 0.16.0", ] [[package]] name = "indoc" -version = "2.0.7" +version = "2.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706" -dependencies = [ - "rustversion", -] +checksum = "f4c7245a08504955605670dbf141fceab975f15ca21570696aebe9d2e71576bd" [[package]] name = "inout" @@ -1422,16 +1322,27 @@ dependencies = [ ] [[package]] -name = "is_terminal_polyfill" -version = "1.70.2" +name = "io-uring" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" +checksum = "046fa2d4d00aea763528b4950358d0ead425372445dc8ff86312b3c69ff7727b" +dependencies = [ + "bitflags", + "cfg-if", + "libc", +] + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "itoa" -version = "1.0.18" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" [[package]] name = "jobserver" @@ -1439,18 +1350,16 @@ version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" dependencies = [ - "getrandom 0.3.4", + "getrandom 0.3.3", "libc", ] [[package]] name = "js-sys" -version = "0.3.97" +version = "0.3.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1840c94c045fbcf8ba2812c95db44499f7c64910a912551aaaa541decebcacf" +checksum = "ec48937a97411dcb524a265206ccd4c90bb711fca92b2792c407f268825b9305" dependencies = [ - "cfg-if", - "futures-util", "once_cell", "wasm-bindgen", ] @@ -1476,29 +1385,23 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" -[[package]] -name = "leb128fmt" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" - [[package]] name = "libc" -version = "0.2.186" +version = "0.2.177" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" +checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976" [[package]] name = "linux-raw-sys" -version = "0.12.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" +checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" [[package]] name = "litemap" -version = "0.8.2" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0" +checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" [[package]] name = "local-channel" @@ -1528,9 +1431,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.29" +version = "0.4.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" +checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" [[package]] name = "matchers" @@ -1543,9 +1446,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.8.0" +version = "2.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" +checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" [[package]] name = "mime" @@ -1575,14 +1478,14 @@ dependencies = [ [[package]] name = "mio" -version = "1.2.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50b7e5b27aa02a74bac8c3f23f448f8d87ff11f92d3aac1a6ed369ee08cc56c1" +checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" dependencies = [ "libc", "log", - "wasi", - "windows-sys 0.61.2", + "wasi 0.11.1+wasi-snapshot-preview1", + "windows-sys 0.59.0", ] [[package]] @@ -1593,18 +1496,18 @@ checksum = "e94e1e6445d314f972ff7395df2de295fe51b71821694f0b0e1e79c4f12c8577" [[package]] name = "nu-ansi-term" -version = "0.50.3" +version = "0.50.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" +checksum = "d4a28e057d01f97e61255210fcff094d74ed0466038633e95017f5beb68e4399" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] name = "num-conv" -version = "0.2.1" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6673768db2d862beb9b39a78fdcb1a69439615d5794a1be50caa9bc92c81967" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" [[package]] name = "num-traits" @@ -1616,16 +1519,25 @@ dependencies = [ ] [[package]] -name = "once_cell" -version = "1.21.4" +name = "object" +version = "0.37.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" +checksum = "ff76201f031d8863c38aa7f905eca4f53abbfa15f609db4277d44cd8938f33fe" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" [[package]] name = "once_cell_polyfill" -version = "1.70.2" +version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" +checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad" [[package]] name = "opaque-debug" @@ -1642,19 +1554,19 @@ dependencies = [ "actix-web", "chrono", "colored", + "concat-string", "config", "figlet-rs", "fluent-templates", - "getter-methods", - "indexmap", + "indoc", "itoa", "pagetop-aliner", "pagetop-bootsier", "pagetop-build", "pagetop-macros", - "pagetop-minimal", "pagetop-statics", "parking_lot", + "pastey", "serde", "serde_json", "substring", @@ -1702,15 +1614,6 @@ dependencies = [ "syn", ] -[[package]] -name = "pagetop-minimal" -version = "0.0.10" -dependencies = [ - "concat-string", - "indoc", - "pastey", -] - [[package]] name = "pagetop-statics" version = "0.1.2" @@ -1748,9 +1651,9 @@ dependencies = [ [[package]] name = "pastey" -version = "0.2.2" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5a797f0e07bdf071d15742978fc3128ec6c22891c31a3a931513263904c982a" +checksum = "35fb2e5f958ec131621fdd531e9fc186ed768cbe395337403ae56c17a74c68ec" [[package]] name = "path-matchers" @@ -1802,7 +1705,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" dependencies = [ "phf_shared", - "rand 0.8.6", + "rand 0.8.5", ] [[package]] @@ -1829,18 +1732,18 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.11" +version = "1.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1749c7ed4bcaf4c3d0a3efc28538844fb29bcdd7d2b67b2be7e20ba861ff517" +checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.11" +version = "1.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b20ed30f105399776b9c883e68e536ef602a16ae6f596d2c473591d6ad64c6" +checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" dependencies = [ "proc-macro2", "quote", @@ -1849,15 +1752,21 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.17" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.33" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19f132c84eca552bf34cab8ec81f1c1dcc229b811638f9d283dceabe58c5569e" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" [[package]] name = "polyval" @@ -1866,16 +1775,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" dependencies = [ "cfg-if", - "cpufeatures 0.2.17", + "cpufeatures", "opaque-debug", "universal-hash", ] [[package]] name = "potential_utf" -version = "0.1.5" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0103b1cef7ec0cf76490e969665504990193874ea05c85ff9bab8b911d0a0564" +checksum = "84df19adbe5b5a0782edcab45899906947ab039ccf4573713735ee7de1e6b08a" dependencies = [ "zerovec", ] @@ -1895,16 +1804,6 @@ dependencies = [ "zerocopy", ] -[[package]] -name = "prettyplease" -version = "0.2.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" -dependencies = [ - "proc-macro2", - "syn", -] - [[package]] name = "proc-macro-hack" version = "0.5.20+deprecated" @@ -1913,9 +1812,9 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.106" +version = "1.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" +checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de" dependencies = [ "unicode-ident", ] @@ -1934,9 +1833,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.45" +version = "1.0.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" +checksum = "ce25767e7b499d1b604768e7cde645d14cc8584231ea6b295e9c9eb22c02e1d1" dependencies = [ "proc-macro2", ] @@ -1947,17 +1846,11 @@ 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.6" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca0ecfa931c29007047d1bc58e623ab12e5590e8c7cc53200d5202b69266d8a" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", "rand_chacha 0.3.1", @@ -1966,23 +1859,12 @@ dependencies = [ [[package]] name = "rand" -version = "0.9.4" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c5af06bb1b7d3216d91932aed5265164bf384dc89cd6ba05cf59a35f5f76ea" +checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" dependencies = [ "rand_chacha 0.9.0", - "rand_core 0.9.5", -] - -[[package]] -name = "rand" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2e8e8bcc7961af1fdac401278c6a831614941f6164ee3bf4ce61b7edb162207" -dependencies = [ - "chacha20", - "getrandom 0.4.2", - "rand_core 0.10.1", + "rand_core 0.9.3", ] [[package]] @@ -2002,7 +1884,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" dependencies = [ "ppv-lite86", - "rand_core 0.9.5", + "rand_core 0.9.3", ] [[package]] @@ -2011,24 +1893,18 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.17", + "getrandom 0.2.16", ] [[package]] name = "rand_core" -version = "0.9.5" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" +checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" dependencies = [ - "getrandom 0.3.4", + "getrandom 0.3.3", ] -[[package]] -name = "rand_core" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" - [[package]] name = "redox_syscall" version = "0.5.18" @@ -2040,9 +1916,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.12.3" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276" +checksum = "4a52d8d02cacdb176ef4678de6c052efb4b3da14b78e4db683a4252762be5433" dependencies = [ "aho-corasick", "memchr", @@ -2052,9 +1928,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.14" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" +checksum = "722166aa0d7438abbaa4d5cc2c649dac844e8c56d82fb3d33e9c34b5cd268fc6" dependencies = [ "aho-corasick", "memchr", @@ -2063,21 +1939,27 @@ dependencies = [ [[package]] name = "regex-lite" -version = "0.1.9" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cab834c73d247e67f4fae452806d17d3c7501756d98c8808d7c9c7aa7d18f973" +checksum = "943f41321c63ef1c92fd763bfe054d2668f7f225a5c29f0105903dc2fc04ba30" [[package]] name = "regex-syntax" -version = "0.8.10" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" +checksum = "caf4aa5b0f434c91fe5c7f1ecb6a5ece2130b02ad2a590589dda5146df959001" + +[[package]] +name = "rustc-demangle" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" [[package]] name = "rustc-hash" -version = "2.1.2" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94300abf3f1ae2e2b8ffb7b58043de3d399c73fa6f4b73826402a5c457614dbe" +checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" [[package]] name = "rustc_version" @@ -2090,9 +1972,9 @@ dependencies = [ [[package]] name = "rustix" -version = "1.1.4" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" +checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e" dependencies = [ "bitflags", "errno", @@ -2109,9 +1991,9 @@ checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "ryu" -version = "1.0.23" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" [[package]] name = "same-file" @@ -2130,15 +2012,15 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "self_cell" -version = "1.2.2" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b12e76d157a900eb52e81bc6e9f3069344290341720e9178cde2407113ac8d89" +checksum = "0f7d95a54511e0c7be3f51e8867aa8cf35148d7b9445d44de2f943e2b206e749" [[package]] name = "semver" -version = "1.0.28" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" +checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" [[package]] name = "serde" @@ -2172,22 +2054,22 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.149" +version = "1.0.145" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" +checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" dependencies = [ "itoa", "memchr", + "ryu", "serde", "serde_core", - "zmij", ] [[package]] name = "serde_spanned" -version = "1.1.1" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6662b5879511e06e8999a8a235d848113e942c9124f211511b16466ee2995f26" +checksum = "e24345aa0fe688594e73770a5f6d1b216508b4f93484c0026d521acd30134392" dependencies = [ "serde_core", ] @@ -2206,13 +2088,13 @@ dependencies = [ [[package]] name = "sha1" -version = "0.11.0" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aacc4cc499359472b4abe1bf11d0b12e688af9a805fa5e3016f9a386dc2d0214" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ "cfg-if", - "cpufeatures 0.3.0", - "digest 0.11.2", + "cpufeatures", + "digest", ] [[package]] @@ -2222,8 +2104,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" dependencies = [ "cfg-if", - "cpufeatures 0.2.17", - "digest 0.10.7", + "cpufeatures", + "digest", ] [[package]] @@ -2243,31 +2125,30 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "signal-hook-registry" -version = "1.4.8" +version = "1.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" +checksum = "b2a4719bff48cee6b39d12c020eeb490953ad2443b7055bd0b21fca26bd8c28b" dependencies = [ - "errno", "libc", ] [[package]] name = "simd-adler32" -version = "0.3.9" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "703d5c7ef118737c72f1af64ad2f6f8c5e1921f818cdcb97b8fe6fc69bf66214" +checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" [[package]] name = "siphasher" -version = "1.0.2" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2aa850e253778c88a04c3d7323b043aeda9d3e30d5971937c1855769763678e" +checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" [[package]] name = "slab" -version = "0.4.12" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" +checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" [[package]] name = "smallvec" @@ -2287,12 +2168,12 @@ dependencies = [ [[package]] name = "socket2" -version = "0.6.3" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e" +checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -2331,17 +2212,11 @@ version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" -[[package]] -name = "symlink" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7973cce6668464ea31f176d85b13c7ab3bba2cb3b77a2ed26abd7801688010a" - [[package]] name = "syn" -version = "2.0.117" +version = "2.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" +checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6" dependencies = [ "proc-macro2", "quote", @@ -2361,12 +2236,12 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.27.0" +version = "3.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" +checksum = "2d31c77bdf42a745371d260a26ca7163f1e0924b64afa0b688e61b5a9fa02f16" dependencies = [ "fastrand", - "getrandom 0.4.2", + "getrandom 0.3.3", "once_cell", "rustix", "windows-sys 0.61.2", @@ -2374,28 +2249,48 @@ dependencies = [ [[package]] name = "terminal_size" -version = "0.4.4" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "230a1b821ccbd75b185820a1f1ff7b14d21da1e442e22c0863ea5f08771a8874" +checksum = "60b8cb979cb11c32ce1603f8137b22262a9d131aaa5c37b5678025f22b8becd0" dependencies = [ "rustix", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] name = "thiserror" -version = "2.0.18" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ - "thiserror-impl", + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8" +dependencies = [ + "thiserror-impl 2.0.17", ] [[package]] name = "thiserror-impl" -version = "2.0.18" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" dependencies = [ "proc-macro2", "quote", @@ -2413,30 +2308,30 @@ dependencies = [ [[package]] name = "time" -version = "0.3.47" +version = "0.3.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c" +checksum = "91e7d9e3bb61134e77bde20dd4825b97c010155709965fedf0f49bb138e52a9d" dependencies = [ "deranged", "itoa", "num-conv", "powerfmt", - "serde_core", + "serde", "time-core", "time-macros", ] [[package]] name = "time-core" -version = "0.1.8" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca" +checksum = "40868e7c1d2f0b8d73e4a8c7f0ff63af4f6d19be117e90bd73eb1d62cf831c6b" [[package]] name = "time-macros" -version = "0.2.27" +version = "0.2.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e70e4c5a0e0a8a4823ad65dfe1a6930e4f4d756dcd9dd7939022b5e8c501215" +checksum = "30cfb0125f12d9c277f35663a0a33f8c30190f4e4574868a330595412d34ebf3" dependencies = [ "num-conv", "time-core", @@ -2444,36 +2339,38 @@ dependencies = [ [[package]] name = "tinystr" -version = "0.8.3" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8323304221c2a851516f22236c5722a72eaa19749016521d6dff0824447d96d" +checksum = "5d4f6d1145dcb577acf783d4e601bc1d76a13337bb54e6233add580b07344c8b" dependencies = [ "displaydoc", - "serde_core", "zerovec", ] [[package]] name = "tokio" -version = "1.52.1" +version = "1.47.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67dee974fe86fd92cc45b7a95fdd2f99a36a6d7b0d431a231178d3d670bbcc6" +checksum = "89e49afdadebb872d3145a5638b59eb0691ea23e46ca484037cfab3b76b95038" dependencies = [ + "backtrace", "bytes", + "io-uring", "libc", "mio", "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2 0.6.3", - "windows-sys 0.61.2", + "slab", + "socket2 0.6.0", + "windows-sys 0.59.0", ] [[package]] name = "tokio-util" -version = "0.7.18" +version = "0.7.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098" +checksum = "14307c986784f72ef81c89db7d9e28d6ac26d16213b109ea501696195e6e3ce5" dependencies = [ "bytes", "futures-core", @@ -2484,9 +2381,9 @@ dependencies = [ [[package]] name = "toml" -version = "1.1.2+spec-1.1.0" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81f3d15e84cbcd896376e6730314d59fb5a87f31e4b038454184435cd57defee" +checksum = "f0dc8b1fb61449e27716ec0e1bdf0f6b8f3e8f6b05391e8497b8b6d7804ea6d8" dependencies = [ "serde_core", "serde_spanned", @@ -2497,27 +2394,27 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "1.1.1+spec-1.1.0" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3165f65f62e28e0115a00b2ebdd37eb6f3b641855f9d636d3cd4103767159ad7" +checksum = "f2cdb639ebbc97961c51720f858597f7f24c4fc295327923af55b74c3c724533" dependencies = [ "serde_core", ] [[package]] name = "toml_parser" -version = "1.1.2+spec-1.1.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2abe9b86193656635d2411dc43050282ca48aa31c2451210f4202550afb7526" +checksum = "c0cbe268d35bdb4bb5a56a2de88d0ad0eb70af5384a99d648cd4b3d04039800e" dependencies = [ "winnow", ] [[package]] name = "tracing" -version = "0.1.44" +version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" dependencies = [ "log", "pin-project-lite", @@ -2527,9 +2424,9 @@ dependencies = [ [[package]] name = "tracing-actix-web" -version = "0.7.21" +version = "0.7.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ca6b15407f9bfcb35f82d0e79e603e1629ece4e91cc6d9e58f890c184dd20af" +checksum = "5360edd490ec8dee9fedfc6a9fd83ac2f01b3e1996e3261b9ad18a61971fe064" dependencies = [ "actix-web", "mutually_exclusive_features", @@ -2540,22 +2437,21 @@ dependencies = [ [[package]] name = "tracing-appender" -version = "0.2.5" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "050686193eb999b4bb3bc2acfa891a13da00f79734704c4b8b4ef1a10b368a3c" +checksum = "3566e8ce28cc0a3fe42519fc80e6b4c943cc4c8cef275620eb8dac2d3d4e06cf" dependencies = [ "crossbeam-channel", - "symlink", - "thiserror", + "thiserror 1.0.69", "time", "tracing-subscriber", ] [[package]] name = "tracing-attributes" -version = "0.1.31" +version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" +checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" dependencies = [ "proc-macro2", "quote", @@ -2564,9 +2460,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.36" +version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" +checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" dependencies = [ "once_cell", "valuable", @@ -2595,9 +2491,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.23" +version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7f578e5945fb242538965c2d0b04418d38ec25c79d160cd279bf0731c8d319" +checksum = "2054a14f5307d601f88daf0553e1cbf472acc4f2c51afab632431cdcd72124d5" dependencies = [ "matchers", "nu-ansi-term", @@ -2625,9 +2521,9 @@ dependencies = [ [[package]] name = "typenum" -version = "1.20.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ce102ab67701b8526c123c1bab5cbe42d7040ccfd0f64af1a385808d2f43de" +checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" [[package]] name = "unic-langid" @@ -2674,21 +2570,15 @@ dependencies = [ [[package]] name = "unicase" -version = "2.9.0" +version = "2.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142" +checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" [[package]] name = "unicode-ident" -version = "1.0.24" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" - -[[package]] -name = "unicode-segmentation" -version = "1.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9629274872b2bfaf8d66f5f15725007f635594914870f65218920345aa11aa8c" +checksum = "f63a545481291138910575129486daeaf8ac54aee4387fe7906919f7830c7d9d" [[package]] name = "unicode-xid" @@ -2702,15 +2592,15 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" dependencies = [ - "crypto-common 0.1.7", + "crypto-common", "subtle", ] [[package]] name = "url" -version = "2.5.8" +version = "2.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" +checksum = "08bc136a29a3d1758e07a9cca267be308aeebf5cfd5a10f3f67ab2097683ef5b" dependencies = [ "form_urlencoded", "idna", @@ -2732,11 +2622,11 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.23.1" +version = "1.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddd74a9687298c6858e9b88ec8935ec45d22e8fd5e6394fa1bd4e99a87789c76" +checksum = "2f87b8aa10b915a06587d0dec516c282ff295b475d94abf425d62b57710070a2" dependencies = [ - "getrandom 0.4.2", + "getrandom 0.3.3", "js-sys", "wasm-bindgen", ] @@ -2776,28 +2666,28 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] -name = "wasip2" -version = "1.0.3+wasi-0.2.9" +name = "wasi" +version = "0.14.7+wasi-0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20064672db26d7cdc89c7798c48a0fdfac8213434a1186e5ef29fd560ae223d6" +checksum = "883478de20367e224c0090af9cf5f9fa85bed63a95c1abf3afc5c083ebc06e8c" dependencies = [ - "wit-bindgen 0.57.1", + "wasip2", ] [[package]] -name = "wasip3" -version = "0.4.0+wasi-0.3.0-rc-2026-01-06" +name = "wasip2" +version = "1.0.1+wasi-0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5" +checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" dependencies = [ - "wit-bindgen 0.51.0", + "wit-bindgen", ] [[package]] name = "wasm-bindgen" -version = "0.2.120" +version = "0.2.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df52b6d9b87e0c74c9edfa1eb2d9bf85e5d63515474513aa50fa181b3c4f5db1" +checksum = "c1da10c01ae9f1ae40cbfac0bac3b1e724b320abfcf52229f80b547c0d250e2d" dependencies = [ "cfg-if", "once_cell", @@ -2807,22 +2697,13 @@ dependencies = [ ] [[package]] -name = "wasm-bindgen-macro" -version = "0.2.120" +name = "wasm-bindgen-backend" +version = "0.2.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b1041f495fb322e64aca85f5756b2172e35cd459376e67f2a6c9dffcedb103" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.120" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dcd0ff20416988a18ac686d4d4d0f6aae9ebf08a389ff5d29012b05af2a1b41" +checksum = "671c9a5a66f49d8a47345ab942e2cb93c7d1d0339065d4f8139c486121b43b19" dependencies = [ "bumpalo", + "log", "proc-macro2", "quote", "syn", @@ -2830,48 +2711,37 @@ dependencies = [ ] [[package]] -name = "wasm-bindgen-shared" -version = "0.2.120" +name = "wasm-bindgen-macro" +version = "0.2.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49757b3c82ebf16c57d69365a142940b384176c24df52a087fb748e2085359ea" +checksum = "7ca60477e4c59f5f2986c50191cd972e3a50d8a95603bc9434501cf156a9a119" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f07d2f20d4da7b26400c9f4a0511e6e0345b040694e8a75bd41d578fa4421d7" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bad67dc8b2a1a6e5448428adec4c3e84c43e561d8c9ee8a9e5aabeb193ec41d1" dependencies = [ "unicode-ident", ] -[[package]] -name = "wasm-encoder" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319" -dependencies = [ - "leb128fmt", - "wasmparser", -] - -[[package]] -name = "wasm-metadata" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" -dependencies = [ - "anyhow", - "indexmap", - "wasm-encoder", - "wasmparser", -] - -[[package]] -name = "wasmparser" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" -dependencies = [ - "bitflags", - "hashbrown 0.15.5", - "indexmap", - "semver", -] - [[package]] name = "winapi-util" version = "0.1.11" @@ -2946,7 +2816,25 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.5", ] [[package]] @@ -2964,14 +2852,31 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.53.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" +dependencies = [ + "windows-link", + "windows_aarch64_gnullvm 0.53.1", + "windows_aarch64_msvc 0.53.1", + "windows_i686_gnu 0.53.1", + "windows_i686_gnullvm 0.53.1", + "windows_i686_msvc 0.53.1", + "windows_x86_64_gnu 0.53.1", + "windows_x86_64_gnullvm 0.53.1", + "windows_x86_64_msvc 0.53.1", ] [[package]] @@ -2980,42 +2885,84 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" + [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" + [[package]] name = "windows_i686_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" +[[package]] +name = "windows_i686_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" + [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" + [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +[[package]] +name = "windows_i686_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" + [[package]] name = "windows_x86_64_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" + [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" + [[package]] name = "windows_x86_64_msvc" version = "0.52.6" @@ -3023,120 +2970,39 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] -name = "winnow" -version = "1.0.2" +name = "windows_x86_64_msvc" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ee1708bef14716a11bae175f579062d4554d95be2c6829f518df847b7b3fdd0" +checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" + +[[package]] +name = "winnow" +version = "0.7.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf" dependencies = [ "memchr", ] [[package]] name = "wit-bindgen" -version = "0.51.0" +version = "0.46.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" -dependencies = [ - "wit-bindgen-rust-macro", -] - -[[package]] -name = "wit-bindgen" -version = "0.57.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" - -[[package]] -name = "wit-bindgen-core" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc" -dependencies = [ - "anyhow", - "heck", - "wit-parser", -] - -[[package]] -name = "wit-bindgen-rust" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21" -dependencies = [ - "anyhow", - "heck", - "indexmap", - "prettyplease", - "syn", - "wasm-metadata", - "wit-bindgen-core", - "wit-component", -] - -[[package]] -name = "wit-bindgen-rust-macro" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c0f9bfd77e6a48eccf51359e3ae77140a7f50b1e2ebfe62422d8afdaffab17a" -dependencies = [ - "anyhow", - "prettyplease", - "proc-macro2", - "quote", - "syn", - "wit-bindgen-core", - "wit-bindgen-rust", -] - -[[package]] -name = "wit-component" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" -dependencies = [ - "anyhow", - "bitflags", - "indexmap", - "log", - "serde", - "serde_derive", - "serde_json", - "wasm-encoder", - "wasm-metadata", - "wasmparser", - "wit-parser", -] - -[[package]] -name = "wit-parser" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736" -dependencies = [ - "anyhow", - "id-arena", - "indexmap", - "log", - "semver", - "serde", - "serde_derive", - "serde_json", - "unicode-xid", - "wasmparser", -] +checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" [[package]] name = "writeable" -version = "0.6.3" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4" +checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb" [[package]] name = "yoke" -version = "0.8.2" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abe8c5fda708d9ca3df187cae8bfb9ceda00dd96231bed36e445a1a48e66f9ca" +checksum = "5f41bb01b8226ef4bfd589436a297c53d118f65921786300e427be8d487695cc" dependencies = [ + "serde", "stable_deref_trait", "yoke-derive", "zerofrom", @@ -3144,9 +3010,9 @@ dependencies = [ [[package]] name = "yoke-derive" -version = "0.8.2" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e" +checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" dependencies = [ "proc-macro2", "quote", @@ -3156,18 +3022,18 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.8.48" +version = "0.8.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eed437bf9d6692032087e337407a86f04cd8d6a16a37199ed57949d415bd68e9" +checksum = "0894878a5fa3edfd6da3f88c4805f4c8558e2b996227a3d864f47fe11e38282c" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.48" +version = "0.8.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70e3cd084b1788766f53af483dd21f93881ff30d7320490ec3ef7526d203bad4" +checksum = "88d2b8d9c68ad2b9e4340d7832716a4d21a22a1154777ad56ea55c51a9cf3831" dependencies = [ "proc-macro2", "quote", @@ -3176,18 +3042,18 @@ dependencies = [ [[package]] name = "zerofrom" -version = "0.1.7" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69faa1f2a1ea75661980b013019ed6687ed0e83d069bc1114e2cc74c6c04c4df" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" dependencies = [ "zerofrom-derive", ] [[package]] name = "zerofrom-derive" -version = "0.1.7" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", @@ -3197,9 +3063,9 @@ dependencies = [ [[package]] name = "zerotrie" -version = "0.2.4" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f9152d31db0792fa83f70fb2f83148effb5c1f5b8c7686c3459e361d9bc20bf" +checksum = "36f0bbd478583f79edad978b407914f61b2972f5af6fa089686016be8f9af595" dependencies = [ "displaydoc", "yoke", @@ -3208,11 +3074,10 @@ dependencies = [ [[package]] name = "zerovec" -version = "0.11.6" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90f911cbc359ab6af17377d242225f4d75119aec87ea711a880987b18cd7b239" +checksum = "e7aa2bd55086f1ab526693ecbe444205da57e25f4489879da80635a46d90e73b" dependencies = [ - "serde", "yoke", "zerofrom", "zerovec-derive", @@ -3220,33 +3085,15 @@ dependencies = [ [[package]] name = "zerovec-derive" -version = "0.11.3" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555" +checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" dependencies = [ "proc-macro2", "quote", "syn", ] -[[package]] -name = "zip" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" -dependencies = [ - "byteorder", - "crc32fast", - "crossbeam-utils", - "flate2", -] - -[[package]] -name = "zmij" -version = "1.0.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" - [[package]] name = "zstd" version = "0.13.3" diff --git a/Cargo.toml b/Cargo.toml index 6846372f..b1bae0a6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,13 +16,14 @@ authors.workspace = true [dependencies] chrono = "0.4" -colored = "3.1" +colored = "3.0" +concat-string = "1.0" config = { version = "0.15", default-features = false, features = ["toml"] } -figlet-rs = "1.0" -getter-methods = "2.0" +figlet-rs = "0.1" +indoc = "2.0" itoa = "1.0" -indexmap = "2.14" parking_lot = "0.12" +paste = { package = "pastey", version = "0.1" } substring = "1.4" terminal_size = "0.4" @@ -31,7 +32,7 @@ tracing-appender = "0.2" tracing-subscriber = { version = "0.3", features = ["json", "env-filter"] } tracing-actix-web = "0.7" -fluent-templates = "0.14" +fluent-templates = "0.13" unic-langid = { version = "0.9", features = ["macros"] } actix-web = { workspace = true, default-features = true } @@ -41,7 +42,6 @@ actix-web-files = { package = "actix-files", version = "0.6" } serde.workspace = true pagetop-macros.workspace = true -pagetop-minimal.workspace = true pagetop-statics.workspace = true [features] @@ -49,7 +49,7 @@ default = [] testing = [] [dev-dependencies] -tempfile = "3.27" +tempfile = "3.23" serde_json = "1.0" pagetop-aliner.workspace = true pagetop-bootsier.workspace = true @@ -64,7 +64,6 @@ members = [ # Helpers "helpers/pagetop-build", "helpers/pagetop-macros", - "helpers/pagetop-minimal", "helpers/pagetop-statics", # Extensions "extensions/pagetop-aliner", @@ -78,12 +77,11 @@ license = "MIT OR Apache-2.0" authors = ["Manuel Cillero "] [workspace.dependencies] -actix-web = { version = "4.13", default-features = false } +actix-web = { version = "4.11", default-features = false } serde = { version = "1.0", features = ["derive"] } # Helpers pagetop-build = { version = "0.3", path = "helpers/pagetop-build" } pagetop-macros = { version = "0.2", path = "helpers/pagetop-macros" } -pagetop-minimal = { version = "0.0", path = "helpers/pagetop-minimal" } pagetop-statics = { version = "0.1", path = "helpers/pagetop-statics" } # Extensions pagetop-aliner = { version = "0.0", path = "extensions/pagetop-aliner" } diff --git a/MAINTAINERS.md b/MAINTAINERS.md deleted file mode 100644 index 25559841..00000000 --- a/MAINTAINERS.md +++ /dev/null @@ -1,156 +0,0 @@ -# MAINTAINERS.md - -## Guía para mantenedores de PageTop - -Este documento describe **el flujo técnico interno de revisión e integración de contribuciones** en -**PageTop**. - -Está dirigido a **mantenedores del proyecto** y **no forma parte de la guía de contribución para -usuarios externos**. Su objetivo es servir como **referencia operativa**, garantizando coherencia, -trazabilidad y preservación de la autoría en un entorno con repositorios espejo. - - -## 1. Repositorios y principios - -PageTop mantiene **un único repositorio oficial**: - - * **Repositorio oficial:** https://git.cillero.es/manuelcillero/pagetop - * **Repositorio espejo:** https://github.com/manuelcillero/pagetop - -### Principios clave - - * El repositorio oficial **es la única fuente de verdad** del historial. - * **Nunca se realizan *merges* en GitHub**. - * Toda integración definitiva se realiza en el repositorio oficial. - * La autoría original debe preservarse siempre. - - -## 2. Configuración local recomendada - -El remoto `github` debe configurarse únicamente para operaciones de lectura (*fetch*), con la URL de -*push* deshabilitada para evitar publicaciones accidentales en el repositorio espejo. - -Estado esperado de `git remote -v`: - -```text -origin git@git.cillero.es:manuelcillero/pagetop.git (fetch) -origin git@git.cillero.es:manuelcillero/pagetop.git (push) -github git@github.com:manuelcillero/pagetop.git (fetch) -github DISABLED (push) -``` - -Convenciones usadas en este documento: - - * `origin` -> Repositorio oficial - * `github` -> Repositorio espejo - - -## 3. Recepción y revisión de Pull Requests - -Las PRs externas llegan por GitHub, normalmente contra la rama `main`. - -Se asume que el repositorio local está configurado para recuperar PRs de GitHub como referencias -remotas (`refs/pull//head`): - -```bash -git fetch github --prune -git checkout -b pr-123 github/pr/123 -``` - -Antes de integrar: - - * Revisar el código manualmente. - * Verificar formato, análisis y pruebas: - - ```bash - cargo fmt - cargo clippy - cargo test - ``` - - * Comprobar impacto en documentación. - * Evaluar coherencia con la arquitectura y el estilo del proyecto. - -Los cambios adicionales se solicitan o se aplican explicando claramente el motivo. - - -## 4. Estrategia de integración - -La integración **se realiza siempre en el repositorio oficial** (`origin`). - -### 4.1 Estrategia por defecto: *rebase* + *fast-forward* - -Esta es la **estrategia estándar y recomendada** en PageTop. Ventajas: - - * conserva los commits originales, - * preserva la autoría real de cada cambio, - * mantiene un historial lineal y trazable, - * facilita auditoría y depuración. - -Procedimiento típico: - -```bash -git checkout pr-123 -git rebase main - -# Resolver conflictos si los hay - -git checkout main -git merge --ff-only pr-123 -``` - -Si `merge --ff-only` falla, **no se debe continuar**, indica divergencias que deben resolverse antes -de integrar la PR. - -### 4.2 Estrategia excepcional: *Squash* - -Sólo debe usarse cuando esté justificado: - - * la PR contiene múltiples commits de prueba o ruido, - * el historial aportado no es significativo, - * el cambio es pequeño y autocontenido. - -En este caso, se debe **preservar explícitamente la autoría**: - -```bash -git checkout main -git merge --squash pr-123 -git commit --author="Nombre Apellido " -``` - - -### 4.3. Publicación en el repositorio oficial - -```bash -git push origin main -``` - -Este *push* representa la **integración definitiva** del cambio en la rama `main`. - - -## 5. Cierre de la PR y sincronización - -Tras integrar el cambio en el repositorio oficial, se cierra manualmente la PR en GitHub con un -mensaje estándar: - -```text -Gracias por tu contribución. - -Este cambio ha sido integrado en el repositorio oficial en `main` (``). -GitHub actúa como repositorio espejo sincronizado. -``` - - -## 6. Principios de mantenimiento - - * Priorizar **claridad y trazabilidad** frente a rapidez. - * Mantener un historial legible y significativo. - * Documentar cambios estructurales o públicos. - * Tratar las contribuciones externas con respeto y transparencia. - ---- - -Este documento puede evolucionar con el proyecto. - -No se trata de imponer rigidez, sino de **capturar el conocimiento operativo real** de PageTop como -guía práctica para el mantenimiento. diff --git a/README.md b/README.md index 463855f2..9a12c845 100644 --- a/README.md +++ b/README.md @@ -26,10 +26,10 @@ según las necesidades de cada proyecto, incluyendo: * **Extensiones** (*extensions*): añaden, extienden o personalizan funcionalidades usando las APIs de PageTop o de terceros. * **Temas** (*themes*): son extensiones que permiten modificar la apariencia de páginas y - componentes. + componentes sin comprometer su funcionalidad. -## ⚡️ Guía rápida +# ⚡️ Guía rápida La aplicación más sencilla de PageTop se ve así: @@ -74,7 +74,7 @@ Este programa implementa una extensión llamada `HelloWorld` que sirve una pági (`/`) mostrando el texto "Hello world!" dentro de un elemento HTML `

`. -## 📂 Proyecto +# 📂 Repositorio El código se organiza en un *workspace* donde actualmente se incluyen los siguientes subproyectos: @@ -82,25 +82,21 @@ El código se organiza en un *workspace* donde actualmente se incluyen los sigui fuente de la librería principal. Reúne algunos de los *crates* más estables y populares del ecosistema Rust para proporcionar APIs y recursos para la creación avanzada de soluciones web. -### Auxiliares +## Auxiliares + + * **[pagetop-statics](https://git.cillero.es/manuelcillero/pagetop/src/branch/main/helpers/pagetop-statics)**, + es la librería que permite incluir archivos estáticos en el ejecutable de las aplicaciones + PageTop para servirlos de forma eficiente, con detección de cambios que optimizan el tiempo de + compilación. * **[pagetop-build](https://git.cillero.es/manuelcillero/pagetop/src/branch/main/helpers/pagetop-build)**, prepara los archivos estáticos o archivos SCSS compilados para incluirlos en el binario de las aplicaciones PageTop durante la compilación de los ejecutables. * **[pagetop-macros](https://git.cillero.es/manuelcillero/pagetop/src/branch/main/helpers/pagetop-macros)**, - proporciona una colección de macros procedurales que mejoran la experiencia de desarrollo con - PageTop. + proporciona una colección de macros que mejoran la experiencia de desarrollo con PageTop. - * **[pagetop-minimal](https://git.cillero.es/manuelcillero/pagetop/src/branch/main/helpers/pagetop-minimal)**, - ofrece macros declarativas esenciales para optimizar tareas comunes como la composición de - texto, la concatenación de cadenas y el manejo de colecciones clave-valor. - - * **[pagetop-statics](https://git.cillero.es/manuelcillero/pagetop/src/branch/main/helpers/pagetop-statics)**, - permite incluir archivos estáticos en el ejecutable de las aplicaciones PageTop para servirlos - de forma eficiente, con detección de cambios que optimizan el tiempo de compilación. - -### Extensiones +## Extensiones * **[pagetop-aliner](https://git.cillero.es/manuelcillero/pagetop/src/branch/main/extensions/pagetop-aliner)**, es un tema para demos y pruebas que muestra esquemáticamente la composición de las páginas HTML. @@ -110,7 +106,7 @@ El código se organiza en un *workspace* donde actualmente se incluyen los sigui componentes flexibles. -## 🧪 Pruebas +# 🧪 Pruebas Para simplificar el flujo de trabajo, el repositorio incluye varios **alias de Cargo** declarados en `.cargo/config.toml`. Basta con ejecutarlos desde la raíz del proyecto: @@ -127,14 +123,14 @@ Para simplificar el flujo de trabajo, el repositorio incluye varios **alias de C > Si quieres **activar** las trazas del registro de eventos entonces usa simplemente `cargo test`. -## 🚧 Advertencia +# 🚧 Advertencia **PageTop** es un proyecto personal para aprender [Rust](https://www.rust-lang.org/es) y conocer su ecosistema. Su API está sujeta a cambios frecuentes. No se recomienda su uso en producción, al menos hasta que se libere la versión **1.0.0**. -## 📜 Licencia +# 📜 Licencia El código está disponible bajo una doble licencia: @@ -148,28 +144,7 @@ Puedes elegir la licencia que prefieras. Este enfoque de doble licencia es el es el ecosistema Rust. -## ✨ Contribuir - -PageTop mantiene **un único repositorio oficial**: - - * **Repositorio oficial:** https://git.cillero.es/manuelcillero/pagetop - * **Repositorio espejo:** https://github.com/manuelcillero/pagetop - -El repositorio de GitHub actúa como espejo y punto de entrada para: - - * dar mayor visibilidad al proyecto, - * facilitar la participación de la comunidad, - * centralizar *issues* y *pull requests* externas. - -Aunque GitHub permite abrir *pull requests*, **la integración del código se realiza únicamente en el -repositorio oficial**. El repositorio de GitHub se sincroniza posteriormente para reflejar el mismo -estado. - -En todos los casos, se respeta la **autoría original** de las contribuciones integradas, tanto en el -historial como en la documentación asociada al cambio. - -Para conocer el proceso completo de participación, revisión e integración de cambios, consulta el -archivo [`CONTRIBUTING.md`](CONTRIBUTING.md). +# ✨ Contribuir Cualquier contribución para añadir al proyecto se considerará automáticamente bajo la doble licencia indicada arriba (MIT o Apache v2.0), sin términos o condiciones adicionales, tal y como permite la diff --git a/examples/form-controls.rs b/examples/form-controls.rs deleted file mode 100644 index e49844e8..00000000 --- a/examples/form-controls.rs +++ /dev/null @@ -1,456 +0,0 @@ -use pagetop::prelude::*; - -use pagetop_bootsier::prelude::*; - -include_locales!(LOC from "examples/locale"); - -struct FormControls; - -impl Extension for FormControls { - fn dependencies(&self) -> Vec { - vec![&pagetop_aliner::Aliner, &pagetop_bootsier::Bootsier] - } - - fn configure_service(&self, scfg: &mut service::web::ServiceConfig) { - scfg.route("/", service::web::get().to(form_controls)); - } -} - -async fn form_controls(request: HttpRequest) -> ResultPage { - Page::new(request) - .with_child( - Intro::default() - .with_opening(IntroOpening::Custom) - .with_title(L10n::t("title", &LOC)) - .with_slogan(L10n::t("slogan", &LOC)) - .with_button(None::<(L10n, FnPathByContext)>) - // Bloque 1: casillas, interruptores y botones de opción. - .with_child( - Block::new() - .with_title(L10n::t("block_selections", &LOC)) - .with_child( - Form::new() - .with_id("form-selections") - .with_action("/") - .with_method(form::Method::Post) - // Casillas e interruptores (form::Checkbox). - .with_child( - form::Fieldset::new() - .with_legend(L10n::t("fieldset_checkbox", &LOC)) - .with_description(L10n::t("desc_checkbox", &LOC)) - .with_child( - form::Checkbox::new() - .with_name("accept_terms") - .with_label(L10n::t("label_terms", &LOC)) - .with_required(true), - ) - .with_child( - form::Checkbox::new() - .with_name("accept_marketing") - .with_label(L10n::t("label_marketing", &LOC)) - .with_checked(true) - .with_inline(true), - ) - .with_child( - form::Checkbox::new() - .with_name("newsletter") - .with_label(L10n::t("label_newsletter", &LOC)) - .with_inline(true), - ) - .with_child( - form::Checkbox::switch() - .with_name("notifications") - .with_label(L10n::t("label_notifications", &LOC)) - .with_checked(true) - .with_reverse(true), - ) - .with_child( - form::Checkbox::switch() - .with_name("dark_mode") - .with_label(L10n::t("label_dark_mode", &LOC)) - .with_disabled(true), - ), - ) - // Grupo de casillas de verificación (form::check::Field). - .with_child( - form::Fieldset::new() - .with_legend(L10n::t("fieldset_checkgroup", &LOC)) - .with_child( - form::check::Field::new() - .with_name("interests") - .with_label(L10n::t("label_interests", &LOC)) - .with_help_text(L10n::t("help_interests", &LOC)) - .with_item( - form::check::Item::new( - "rust", - L10n::t("check_rust", &LOC), - ) - .with_checked(true), - ) - .with_item(form::check::Item::new( - "web", - L10n::t("check_web", &LOC), - )) - .with_item(form::check::Item::new( - "ai", - L10n::t("check_ai", &LOC), - )) - .with_item( - form::check::Item::new( - "games", - L10n::t("check_games", &LOC), - ) - .with_disabled(true), - ), - ), - ) - // Botones de opción (form::radio::Field). - .with_child( - form::Fieldset::new() - .with_legend(L10n::t("fieldset_radio", &LOC)) - .with_child( - form::radio::Field::new() - .with_name("frequency") - .with_label(L10n::t("label_frequency", &LOC)) - .with_item(form::radio::Item::new( - "daily", - L10n::t("radio_daily", &LOC), - )) - .with_item( - form::radio::Item::new( - "weekly", - L10n::t("radio_weekly", &LOC), - ) - .with_checked(true), - ) - .with_item(form::radio::Item::new( - "monthly", - L10n::t("radio_monthly", &LOC), - )) - .with_item( - form::radio::Item::new( - "never", - L10n::t("radio_never", &LOC), - ) - .with_disabled(true), - ), - ), - ) - // Campo oculto (form::Hidden). - .with_child( - form::Hidden::new() - .with_name("origin") - .with_value("form-selections"), - ) - // Botones de acción. - .with_child( - Button::submit(L10n::t("btn_submit", &LOC)) - .with_color(ButtonColor::Background(Color::Primary)), - ) - .with_child( - Button::reset(L10n::t("btn_reset", &LOC)) - .with_color(ButtonColor::Outline(Color::Secondary)), - ) - .with_child( - Button::plain(L10n::t("btn_cancel", &LOC)) - .with_color(ButtonColor::Link), - ), - ), - ) - // Bloque 2: campos de texto, multilínea y rango. - .with_child( - Block::new() - .with_title(L10n::t("block_text", &LOC)) - .with_child( - Form::new() - .with_id("form-text") - .with_action("/") - .with_method(form::Method::Post) - // Campos de texto (form::input::Field). - .with_child( - form::Fieldset::new() - .with_legend(L10n::t("fieldset_text", &LOC)) - .with_child( - form::input::Field::text() - .with_name("name") - .with_label(L10n::t("label_name", &LOC)) - .with_placeholder(L10n::t("placeholder_name", &LOC)) - .with_required(true), - ) - .with_child( - form::input::Field::email() - .with_name("email") - .with_label(L10n::t("label_email", &LOC)) - .with_placeholder(L10n::t( - "placeholder_email", - &LOC, - )) - .with_autocomplete( - Some(form::Autocomplete::email()), - ) - .with_required(true), - ) - .with_child( - form::input::Field::password() - .with_name("password") - .with_label(L10n::t("label_password", &LOC)) - .with_autocomplete(Some( - form::Autocomplete::new_password(), - )) - .with_required(true), - ) - .with_child( - form::input::Field::telephone() - .with_name("phone") - .with_label(L10n::t("label_phone", &LOC)) - .with_placeholder(L10n::t( - "placeholder_phone", - &LOC, - )), - ) - .with_child( - form::input::Field::url() - .with_name("website") - .with_label(L10n::t("label_url", &LOC)) - .with_placeholder(L10n::t("placeholder_url", &LOC)), - ) - .with_child( - form::input::Field::search() - .with_name("search") - .with_label(L10n::t("label_search", &LOC)) - .with_placeholder(L10n::t( - "placeholder_search", - &LOC, - )), - ), - ) - // Área de texto (form::Textarea). - .with_child( - form::Fieldset::new() - .with_legend(L10n::t("fieldset_textarea", &LOC)) - .with_child( - form::Textarea::new() - .with_name("comment") - .with_label(L10n::t("label_comment", &LOC)) - .with_placeholder(L10n::t( - "placeholder_comment", - &LOC, - )) - .with_rows(Some(4)) - .with_help_text(L10n::t("help_comment", &LOC)), - ), - ) - // Control deslizante (form::Range). - .with_child( - form::Fieldset::new() - .with_legend(L10n::t("fieldset_range", &LOC)) - .with_child( - form::Range::new() - .with_name("rating") - .with_label(L10n::t("label_rating", &LOC)) - .with_min(Some(1.0)) - .with_max(Some(10.0)) - .with_step(Some(1.0)) - .with_value(Some(5.0)) - .with_help_text(L10n::t("help_rating", &LOC)), - ), - ) - // Campo oculto (form::Hidden). - .with_child( - form::Hidden::new() - .with_name("origin") - .with_value("form-text"), - ) - // Botones de acción. - .with_child( - Button::submit(L10n::t("btn_submit", &LOC)) - .with_color(ButtonColor::Background(Color::Primary)), - ) - .with_child( - Button::reset(L10n::t("btn_reset", &LOC)) - .with_color(ButtonColor::Outline(Color::Secondary)), - ) - .with_child( - Button::plain(L10n::t("btn_cancel", &LOC)) - .with_color(ButtonColor::Link), - ), - ), - ) - // Bloque 3: listas de selección y etiquetas flotantes. - .with_child( - Block::new() - .with_title(L10n::t("block_lists", &LOC)) - .with_child( - Form::new() - .with_id("form-lists") - .with_action("/") - .with_method(form::Method::Post) - // Listas de selección (form::select::Field). - .with_child( - form::Fieldset::new() - .with_legend(L10n::t("fieldset_select", &LOC)) - .with_child( - form::select::Field::new() - .with_name("language") - .with_label(L10n::t("label_language", &LOC)) - .with_item( - form::select::Item::new( - "", - L10n::t("select_choose", &LOC), - ) - .with_selected(true), - ) - .with_group( - form::select::Group::new(L10n::t( - "select_group_europe", - &LOC, - )) - .with_item(form::select::Item::new( - "es", - L10n::t("select_spanish", &LOC), - )) - .with_item(form::select::Item::new( - "fr", - L10n::t("select_french", &LOC), - )), - ) - .with_group( - form::select::Group::new(L10n::t( - "select_group_americas", - &LOC, - )) - .with_item(form::select::Item::new( - "en", - L10n::t("select_english", &LOC), - )) - .with_item(form::select::Item::new( - "pt", - L10n::t("select_portuguese", &LOC), - )), - ) - .with_item( - form::select::Item::new( - "xx", - L10n::t("select_disabled", &LOC), - ) - .with_disabled(true), - ) - .with_required(true), - ) - .with_child( - form::select::Field::new() - .with_name("technologies") - .with_label(L10n::t("label_technologies", &LOC)) - .with_item( - form::select::Item::new( - "rust", - L10n::n("Rust"), - ) - .with_selected(true), - ) - .with_item( - form::select::Item::new( - "python", - L10n::n("Python"), - ) - .with_selected(true), - ) - .with_item(form::select::Item::new( - "javascript", - L10n::n("JavaScript"), - )) - .with_item(form::select::Item::new( - "go", - L10n::n("Go"), - )) - .with_item(form::select::Item::new( - "typescript", - L10n::n("TypeScript"), - )) - .with_multiple(true) - .with_rows(Some(4)) - .with_help_text(L10n::t("help_technologies", &LOC)), - ), - ) - // Etiquetas flotantes. - .with_child( - form::Fieldset::new() - .with_legend(L10n::t("fieldset_floating", &LOC)) - .with_child( - form::input::Field::text() - .with_name("fl_name") - .with_label(L10n::t("label_name", &LOC)) - .with_placeholder(L10n::t("placeholder_name", &LOC)) - .with_floating_label(true) - .with_required(true), - ) - .with_child( - form::Textarea::new() - .with_name("fl_comment") - .with_label(L10n::t("label_comment", &LOC)) - .with_placeholder(L10n::t( - "placeholder_comment", - &LOC, - )) - .with_floating_label(true), - ) - .with_child( - form::select::Field::new() - .with_name("fl_country") - .with_label(L10n::t("label_country", &LOC)) - .with_item( - form::select::Item::new( - "", - L10n::t("select_choose", &LOC), - ) - .with_selected(true), - ) - .with_item(form::select::Item::new( - "de", - L10n::t("select_germany", &LOC), - )) - .with_item(form::select::Item::new( - "es", - L10n::t("select_spain", &LOC), - )) - .with_item(form::select::Item::new( - "fr", - L10n::t("select_france", &LOC), - )) - .with_item(form::select::Item::new( - "pt", - L10n::t("select_portugal", &LOC), - )) - .with_floating_label(true) - .with_required(true), - ), - ) - // Campo oculto (form::Hidden). - .with_child( - form::Hidden::new() - .with_name("origin") - .with_value("form-lists"), - ) - // Botones de acción. - .with_child( - Button::submit(L10n::t("btn_submit", &LOC)) - .with_color(ButtonColor::Background(Color::Primary)), - ) - .with_child( - Button::reset(L10n::t("btn_reset", &LOC)) - .with_color(ButtonColor::Outline(Color::Secondary)), - ) - .with_child( - Button::plain(L10n::t("btn_cancel", &LOC)) - .with_color(ButtonColor::Link), - ), - ), - ), - ) - .render() -} - -#[pagetop::main] -async fn main() -> std::io::Result<()> { - Application::prepare(&FormControls).run()?.await -} diff --git a/examples/hello-name.rs b/examples/hello-name.rs index e2904c6f..c6a82aaf 100644 --- a/examples/hello-name.rs +++ b/examples/hello-name.rs @@ -14,11 +14,7 @@ async fn hello_name( ) -> ResultPage { let name = path.into_inner(); Page::new(request) - .with_child(Html::with(move |_| { - html! { - h1 style="text-align: center;" { "Hello " (name) "!" } - } - })) + .add_child(Html::with(move |_| html! { h1 { "Hello " (name) "!" } })) .render() } diff --git a/examples/hello-world.rs b/examples/hello-world.rs index e6127af9..64817466 100644 --- a/examples/hello-world.rs +++ b/examples/hello-world.rs @@ -10,11 +10,7 @@ impl Extension for HelloWorld { async fn hello_world(request: HttpRequest) -> ResultPage { Page::new(request) - .with_child(Html::with(|_| { - html! { - h1 style="text-align: center;" { "Hello World!" } - } - })) + .add_child(Html::with(|_| html! { h1 { "Hello World!" } })) .render() } diff --git a/examples/intro-colors.rs b/examples/intro-colors.rs deleted file mode 100644 index 57ddeed4..00000000 --- a/examples/intro-colors.rs +++ /dev/null @@ -1,82 +0,0 @@ -use pagetop::prelude::*; - -include_locales!(LOC from "examples/locale"); - -struct IntroColors; - -impl Extension for IntroColors { - fn configure_service(&self, scfg: &mut service::web::ServiceConfig) { - scfg.route("/", service::web::get().to(intro_colors)); - } -} - -async fn intro_colors(request: HttpRequest) -> ResultPage { - Page::new(request) - .with_child( - Intro::default() - .with_opening(IntroOpening::Custom) - .with_title(L10n::n("PageTop")) - .with_slogan(L10n::t("colors_slogan", &LOC)) - .with_button(None::<(L10n, FnPathByContext)>) - .with_child( - Block::new() - .with_title(L10n::t("colors_block", &LOC).with_arg("n", "1")) - .with_child(Html::with(|cx| { - html! { - p { (L10n::t("colors_val_1", &LOC).using(cx)) } - } - })), - ) - .with_child( - Block::new() - .with_title(L10n::t("colors_block", &LOC).with_arg("n", "2")) - .with_child(Html::with(|cx| { - html! { - p { (L10n::t("colors_val_2", &LOC).using(cx)) } - } - })), - ) - .with_child( - Block::new() - .with_title(L10n::t("colors_block", &LOC).with_arg("n", "3")) - .with_child(Html::with(|cx| { - html! { - p { (L10n::t("colors_val_3", &LOC).using(cx)) } - } - })), - ) - .with_child( - Block::new() - .with_title(L10n::t("colors_block", &LOC).with_arg("n", "4")) - .with_child(Html::with(|cx| { - html! { - p { (L10n::t("colors_val_4", &LOC).using(cx)) } - } - })), - ) - .with_child( - Block::new() - .with_title(L10n::t("colors_block", &LOC).with_arg("n", "5")) - .with_child(Html::with(|cx| { - html! { - p { (L10n::t("colors_val_5", &LOC).using(cx)) } - } - })), - ) - .with_child( - Block::new() - .with_title(L10n::t("colors_block", &LOC).with_arg("n", "6")) - .with_child(Html::with(|cx| { - html! { - p { (L10n::t("colors_val_6", &LOC).using(cx)) } - } - })), - ), - ) - .render() -} - -#[pagetop::main] -async fn main() -> std::io::Result<()> { - Application::prepare(&IntroColors).run()?.await -} diff --git a/examples/locale/en-US/form-controls.ftl b/examples/locale/en-US/form-controls.ftl deleted file mode 100644 index 7c2b3c96..00000000 --- a/examples/locale/en-US/form-controls.ftl +++ /dev/null @@ -1,74 +0,0 @@ -title = Form controls -slogan = Bootsier form components showcase -block_selections = Checkboxes, switches and radio buttons -block_text = Text fields, multiline and range -block_lists = Select lists and floating labels - -fieldset_text = Text fields -label_name = Full name -placeholder_name = e.g.: Jane Smith -label_email = Email address -placeholder_email = user@example.com -label_password = Password -label_phone = Phone number -placeholder_phone = +1 555 000 0000 -label_url = Website -placeholder_url = https://example.com -label_search = Search -placeholder_search = Search term... - -fieldset_textarea = Multiline text -label_comment = Comment -placeholder_comment = Write your comment here... -help_comment = Maximum 500 characters. - -fieldset_select = Selection lists -label_language = Language -label_country = Country -label_technologies = Preferred technologies -help_technologies = Hold Ctrl (or Cmd on Mac) to select multiple options. -select_choose = — Choose an option — -select_group_europe = Europe -select_spanish = Spanish -select_french = French -select_group_americas = Americas -select_english = English -select_portuguese = Portuguese -select_disabled = Not available -select_germany = Germany -select_spain = Spain -select_france = France -select_portugal = Portugal - -fieldset_checkbox = Checkboxes and switches -desc_checkbox = This group shows standard checkboxes, inline checkboxes, reverse-aligned options, and toggle switches for binary choices. -label_terms = I accept the terms and conditions -label_marketing = Commercial emails (inline) -label_newsletter = Newsletter (inline) -label_notifications = Enable notifications (reverse) -label_dark_mode = Dark mode (unavailable) - -fieldset_radio = Radio buttons -label_frequency = Newsletter frequency -radio_daily = Daily -radio_weekly = Weekly -radio_monthly = Monthly -radio_never = Never (disabled) - -fieldset_checkgroup = Checkbox group -label_interests = Areas of interest -help_interests = Select all options that apply. -check_rust = Rust programming -check_web = Web development -check_ai = Artificial intelligence -check_games = Game development (disabled) - -fieldset_floating = Floating labels - -fieldset_range = Slider -label_rating = Overall rating -help_rating = From 1 (very poor) to 10 (excellent). - -btn_submit = Submit -btn_reset = Reset -btn_cancel = Cancel diff --git a/examples/locale/en-US/intro-colors.ftl b/examples/locale/en-US/intro-colors.ftl deleted file mode 100644 index 8b33f218..00000000 --- a/examples/locale/en-US/intro-colors.ftl +++ /dev/null @@ -1,8 +0,0 @@ -colors_slogan = Chromatic intro test -colors_block = Block { $n } — intro-bg-block-{ $n } -colors_val_1 = Background color: #FFB84B — Amber gold. -colors_val_2 = Background color: #FFC66F — Light golden. -colors_val_3 = Background color: #FFD493 — Pale golden. -colors_val_4 = Background color: #FFE3B7 — Light peach. -colors_val_5 = Background color: #FFF1DB — Cream. -colors_val_6 = Background color: #FFFFFF — White. diff --git a/examples/locale/en-US/navbar-menus.ftl b/examples/locale/en-US/navbar-menus.ftl deleted file mode 100644 index 98de2401..00000000 --- a/examples/locale/en-US/navbar-menus.ftl +++ /dev/null @@ -1,23 +0,0 @@ -menus_item_label = Label -menus_item_link = Link -menus_item_blank = External link -menus_item_disabled = Disabled link - -menus_test_title = Dropdown - -menus_dev_header = Intro -menus_dev_getting_started = Getting started -menus_dev_guides = Development guides -menus_dev_forum = Developers forum - -menus_sdk_header = Software Development Kits -menus_sdk_rust = SDKs Rust -menus_sdk_js = SDKs JavaScript -menus_sdk_python = SDKs Python - -menus_plugin_header = Plugins -menus_plugin_auth = Rust Plugin Auth -menus_plugin_cache = Rust Plugin Cache - -menus_item_sign_up = Sign up -menus_item_login = Login diff --git a/examples/locale/es-ES/form-controls.ftl b/examples/locale/es-ES/form-controls.ftl deleted file mode 100644 index 67a0fd2c..00000000 --- a/examples/locale/es-ES/form-controls.ftl +++ /dev/null @@ -1,74 +0,0 @@ -title = Controles de formulario -slogan = Componentes Bootsier para formularios -block_selections = Casillas, interruptores y botones de opción -block_text = Campos de texto, multilínea y rango -block_lists = Listas de selección y etiquetas flotantes - -fieldset_text = Campos de texto -label_name = Nombre completo -placeholder_name = Ej.: Ana García -label_email = Correo electrónico -placeholder_email = usuario@ejemplo.com -label_password = Contraseña -label_phone = Teléfono -placeholder_phone = +34 600 000 -label_url = Sitio web -placeholder_url = https://ejemplo.com -label_search = Búsqueda -placeholder_search = Término de búsqueda... - -fieldset_textarea = Texto multilínea -label_comment = Comentario -placeholder_comment = Escribe tu comentario aquí... -help_comment = Máximo 500 caracteres. - -fieldset_select = Listas de selección -label_language = Idioma -label_country = País -label_technologies = Tecnologías preferidas -help_technologies = Mantén Ctrl (o Cmd en Mac) para seleccionar varias opciones. -select_choose = — Elige una opción — -select_group_europe = Europa -select_spanish = Español -select_french = Francés -select_group_americas = América -select_english = Inglés -select_portuguese = Portugués -select_disabled = No disponible -select_germany = Alemania -select_spain = España -select_france = Francia -select_portugal = Portugal - -fieldset_checkbox = Casillas e interruptores -desc_checkbox = Este grupo muestra casillas de verificación estándar, casillas en línea, opciones alineadas a la derecha e interruptores para elecciones binarias. -label_terms = Acepto los términos y condiciones -label_marketing = Emails comerciales (en línea) -label_newsletter = Boletín (en línea) -label_notifications = Activar notificaciones (invertida) -label_dark_mode = Modo oscuro (no disponible) - -fieldset_radio = Botones de opción -label_frequency = Frecuencia del boletín -radio_daily = Diario -radio_weekly = Semanal -radio_monthly = Mensual -radio_never = Nunca (deshabilitado) - -fieldset_checkgroup = Grupo de casillas -label_interests = Áreas de interés -help_interests = Selecciona todas las opciones que correspondan. -check_rust = Programación en Rust -check_web = Desarrollo web -check_ai = Inteligencia artificial -check_games = Desarrollo de videojuegos (deshabilitado) - -fieldset_floating = Etiquetas flotantes - -fieldset_range = Control deslizante -label_rating = Valoración general -help_rating = De 1 (muy malo) a 10 (excelente). - -btn_submit = Enviar -btn_reset = Restablecer -btn_cancel = Cancelar diff --git a/examples/locale/es-ES/intro-colors.ftl b/examples/locale/es-ES/intro-colors.ftl deleted file mode 100644 index 280ecb11..00000000 --- a/examples/locale/es-ES/intro-colors.ftl +++ /dev/null @@ -1,8 +0,0 @@ -colors_slogan = Prueba de intro cromática -colors_block = Bloque { $n } — intro-bg-block-{ $n } -colors_val_1 = Color de fondo: #FFB84B — Ámbar dorado. -colors_val_2 = Color de fondo: #FFC66F — Dorado claro. -colors_val_3 = Color de fondo: #FFD493 — Dorado pálido. -colors_val_4 = Color de fondo: #FFE3B7 — Melocotón claro. -colors_val_5 = Color de fondo: #FFF1DB — Crema. -colors_val_6 = Color de fondo: #FFFFFF — Blanco. diff --git a/examples/locale/es-ES/navbar-menus.ftl b/examples/locale/es-ES/navbar-menus.ftl deleted file mode 100644 index af0b1ec3..00000000 --- a/examples/locale/es-ES/navbar-menus.ftl +++ /dev/null @@ -1,23 +0,0 @@ -menus_item_label = Etiqueta -menus_item_link = Enlace -menus_item_blank = Enlace externo -menus_item_disabled = Enlace deshabilitado - -menus_test_title = Desplegable - -menus_dev_header = Introducción -menus_dev_getting_started = Primeros pasos -menus_dev_guides = Guías de desarrollo -menus_dev_forum = Foro de desarrolladores - -menus_sdk_header = Kits de Desarrollo Software -menus_sdk_rust = SDKs de Rust -menus_sdk_js = SDKs de JavaScript -menus_sdk_python = SDKs de Python - -menus_plugin_header = Plugins -menus_plugin_auth = Plugin Rust de autenticación -menus_plugin_cache = Plugin Rust de caché - -menus_item_sign_up = Registrarse -menus_item_login = Iniciar sesión diff --git a/examples/navbar-menus.rs b/examples/navbar-menus.rs index a0d85f3b..341d394a 100644 --- a/examples/navbar-menus.rs +++ b/examples/navbar-menus.rs @@ -2,8 +2,6 @@ use pagetop::prelude::*; use pagetop_bootsier::prelude::*; -include_locales!(LOC from "examples/locale"); - struct SuperMenu; impl Extension for SuperMenu { @@ -12,87 +10,96 @@ impl Extension for SuperMenu { } fn initialize(&self) { - let navbar_menu = Navbar::brand_left(navbar::Brand::new()) + let home_path = |cx: &Context| match cx.langid().language.as_str() { + "en" => "/en", + _ => "/", + }; + + let navbar_menu = Navbar::brand_left(navbar::Brand::new().with_path(Some(home_path))) .with_expand(BreakPoint::LG) - .with_item(navbar::Item::nav( + .add_item(navbar::Item::nav( Nav::new() - .with_item(nav::Item::link(L10n::t("menus_item_link", &LOC), |cx| { - cx.route("/") - })) - .with_item(nav::Item::link_blank( - L10n::t("menus_item_blank", &LOC), - |_| "https://docs.rs/pagetop".into(), + .add_item(nav::Item::link( + L10n::l("sample_menus_item_link"), + home_path, )) - .with_item(nav::Item::dropdown( + .add_item(nav::Item::link_blank( + L10n::l("sample_menus_item_blank"), + |_| "https://docs.rs/pagetop", + )) + .add_item(nav::Item::dropdown( Dropdown::new() - .with_title(L10n::t("menus_test_title", &LOC)) - .with_item(dropdown::Item::header(L10n::t("menus_dev_header", &LOC))) - .with_item(dropdown::Item::link( - L10n::t("menus_dev_getting_started", &LOC), - |cx| cx.route("/dev/getting-started"), + .with_title(L10n::l("sample_menus_test_title")) + .add_item(dropdown::Item::header(L10n::l("sample_menus_dev_header"))) + .add_item(dropdown::Item::link( + L10n::l("sample_menus_dev_getting_started"), + |_| "/dev/getting-started", )) - .with_item(dropdown::Item::link( - L10n::t("menus_dev_guides", &LOC), - |cx| cx.route("/dev/guides"), + .add_item(dropdown::Item::link( + L10n::l("sample_menus_dev_guides"), + |_| "/dev/guides", )) - .with_item(dropdown::Item::link_blank( - L10n::t("menus_dev_forum", &LOC), - |_| "https://forum.example.dev".into(), + .add_item(dropdown::Item::link_blank( + L10n::l("sample_menus_dev_forum"), + |_| "https://forum.example.dev", )) - .with_item(dropdown::Item::divider()) - .with_item(dropdown::Item::header(L10n::t("menus_sdk_header", &LOC))) - .with_item(dropdown::Item::link( - L10n::t("menus_sdk_rust", &LOC), - |cx| cx.route("/dev/sdks/rust"), + .add_item(dropdown::Item::divider()) + .add_item(dropdown::Item::header(L10n::l("sample_menus_sdk_header"))) + .add_item(dropdown::Item::link( + L10n::l("sample_menus_sdk_rust"), + |_| "/dev/sdks/rust", )) - .with_item(dropdown::Item::link(L10n::t("menus_sdk_js", &LOC), |cx| { - cx.route("/dev/sdks/js") + .add_item(dropdown::Item::link(L10n::l("sample_menus_sdk_js"), |_| { + "/dev/sdks/js" })) - .with_item(dropdown::Item::link( - L10n::t("menus_sdk_python", &LOC), - |cx| cx.route("/dev/sdks/python"), + .add_item(dropdown::Item::link( + L10n::l("sample_menus_sdk_python"), + |_| "/dev/sdks/python", )) - .with_item(dropdown::Item::divider()) - .with_item(dropdown::Item::header(L10n::t("menus_plugin_header", &LOC))) - .with_item(dropdown::Item::link( - L10n::t("menus_plugin_auth", &LOC), - |cx| cx.route("/dev/sdks/rust/plugins/auth"), + .add_item(dropdown::Item::divider()) + .add_item(dropdown::Item::header(L10n::l( + "sample_menus_plugin_header", + ))) + .add_item(dropdown::Item::link( + L10n::l("sample_menus_plugin_auth"), + |_| "/dev/sdks/rust/plugins/auth", )) - .with_item(dropdown::Item::link( - L10n::t("menus_plugin_cache", &LOC), - |cx| cx.route("/dev/sdks/rust/plugins/cache"), + .add_item(dropdown::Item::link( + L10n::l("sample_menus_plugin_cache"), + |_| "/dev/sdks/rust/plugins/cache", )) - .with_item(dropdown::Item::divider()) - .with_item(dropdown::Item::label(L10n::t("menus_item_label", &LOC))) - .with_item(dropdown::Item::link_disabled( - L10n::t("menus_item_disabled", &LOC), - |cx| cx.route("#"), + .add_item(dropdown::Item::divider()) + .add_item(dropdown::Item::label(L10n::l("sample_menus_item_label"))) + .add_item(dropdown::Item::link_disabled( + L10n::l("sample_menus_item_disabled"), + |_| "#", )), )) - .with_item(nav::Item::link_disabled( - L10n::t("menus_item_disabled", &LOC), - |cx| cx.route("#"), + .add_item(nav::Item::link_disabled( + L10n::l("sample_menus_item_disabled"), + |_| "#", )), )) - .with_item(navbar::Item::nav( + .add_item(navbar::Item::nav( Nav::new() .with_classes( ClassesOp::Add, classes::Margin::with(Side::Start, ScaleSize::Auto).to_class(), ) - .with_item(nav::Item::link(L10n::t("menus_item_sign_up", &LOC), |cx| { - cx.route("/auth/sign-up") - })) - .with_item(nav::Item::link(L10n::t("menus_item_login", &LOC), |cx| { - cx.route("/auth/login") + .add_item(nav::Item::link( + L10n::l("sample_menus_item_sign_up"), + |_| "/auth/sign-up", + )) + .add_item(nav::Item::link(L10n::l("sample_menus_item_login"), |_| { + "/auth/login" })), )); - InRegion::Global(&DefaultRegion::Header).add( + InRegion::Named("header").add(Child::with( Container::new() .with_width(container::Width::FluidMax(UnitValue::RelRem(75.0))) - .with_child(navbar_menu), - ); + .add_child(navbar_menu), + )); } } diff --git a/extensions/pagetop-aliner/README.md b/extensions/pagetop-aliner/README.md index 09a337eb..f4670aae 100644 --- a/extensions/pagetop-aliner/README.md +++ b/extensions/pagetop-aliner/README.md @@ -12,20 +12,20 @@
-## 🧭 Sobre PageTop +## Sobre PageTop [PageTop](https://docs.rs/pagetop) es un entorno de desarrollo que reivindica la esencia de la web clásica para crear soluciones web SSR (*renderizadas en el servidor*) modulares, extensibles y configurables, basadas en HTML, CSS y JavaScript. -## ⚡️ Guía rápida +# ⚡️ Guía rápida Igual que con otras extensiones, **añade la dependencia** a tu `Cargo.toml`: ```toml [dependencies] -pagetop-aliner = { ... } +pagetop-aliner = "..." ``` **Declara la extensión** en tu aplicación (o extensión que la requiera). Recuerda que el orden en @@ -59,7 +59,7 @@ Y **selecciona el tema en la configuración** de la aplicación: theme = "Aliner" ``` -o **fuerza el tema por código** en una página concreta: +…o **fuerza el tema por código** en una página concreta: ```rust,no_run use pagetop::prelude::*; @@ -80,14 +80,14 @@ async fn homepage(request: HttpRequest) -> ResultPage { ``` -## 🚧 Advertencia +# 🚧 Advertencia **PageTop** es un proyecto personal para aprender [Rust](https://www.rust-lang.org/es) y conocer su ecosistema. Su API está sujeta a cambios frecuentes. No se recomienda su uso en producción, al menos hasta que se libere la versión **1.0.0**. -## 📜 Licencia +# 📜 Licencia El código está disponible bajo una doble licencia: diff --git a/extensions/pagetop-aliner/src/lib.rs b/extensions/pagetop-aliner/src/lib.rs index 95f22196..4ae4121e 100644 --- a/extensions/pagetop-aliner/src/lib.rs +++ b/extensions/pagetop-aliner/src/lib.rs @@ -26,7 +26,7 @@ Igual que con otras extensiones, **añade la dependencia** a tu `Cargo.toml`: ```toml [dependencies] -pagetop-aliner = { ... } +pagetop-aliner = "..." ``` **Declara la extensión** en tu aplicación (o extensión que la requiera). Recuerda que el orden en @@ -60,7 +60,7 @@ Y **selecciona el tema en la configuración** de la aplicación: theme = "Aliner" ``` -o **fuerza el tema por código** en una página concreta: +…o **fuerza el tema por código** en una página concreta: ```rust,no_run use pagetop::prelude::*; @@ -69,10 +69,10 @@ use pagetop_aliner::Aliner; async fn homepage(request: HttpRequest) -> ResultPage { Page::new(request) .with_theme(&Aliner) - .with_child( + .add_child( Block::new() .with_title(L10n::l("sample_title")) - .with_child(Html::with(|cx| html! { + .add_child(Html::with(|cx| html! { p { (L10n::l("sample_content").using(cx)) } })), ) @@ -104,25 +104,12 @@ impl Extension for Aliner { } impl Theme for Aliner { - fn before_render_page_body(&self, page: &mut Page) { - page.alter_assets(AssetsOp::AddStyleSheet( - StyleSheet::from("/css/normalize.css") - .with_version("8.0.1") - .with_weight(-99), - )) - .alter_assets(AssetsOp::AddStyleSheet( - StyleSheet::from("/css/basic.css") - .with_version(PAGETOP_VERSION) - .with_weight(-99), - )) - .alter_assets(AssetsOp::AddStyleSheet( - StyleSheet::from("/aliner/css/styles.css") - .with_version(env!("CARGO_PKG_VERSION")) - .with_weight(-99), - )) - .alter_child_in( - &DefaultRegion::Footer, - ChildOp::AddIfEmpty(PoweredBy::new().into()), - ); + fn after_render_page_body(&self, page: &mut Page) { + page.alter_param("include_basic_assets", true) + .alter_assets(ContextOp::AddStyleSheet( + StyleSheet::from("/aliner/css/styles.css") + .with_version(env!("CARGO_PKG_VERSION")) + .with_weight(-90), + )); } } diff --git a/extensions/pagetop-aliner/static/css/styles.css b/extensions/pagetop-aliner/static/css/styles.css index 85d0811a..1cc2f5dc 100644 --- a/extensions/pagetop-aliner/static/css/styles.css +++ b/extensions/pagetop-aliner/static/css/styles.css @@ -29,14 +29,12 @@ h1, h2, h3, h4,h5, h6, p { } *::before, *::after { + background: #faa; border-radius: 3px; font: normal normal 400 10px/1.2 monospace; vertical-align: middle; padding: 1px 3px; margin: 0 3px; - background: #faa; - color: #fff; - -webkit-text-fill-color: currentColor; } *::before { content: "("; diff --git a/extensions/pagetop-bootsier/README.md b/extensions/pagetop-bootsier/README.md index b34eeb51..d6e1666a 100644 --- a/extensions/pagetop-bootsier/README.md +++ b/extensions/pagetop-bootsier/README.md @@ -12,20 +12,20 @@
-## 🧭 Sobre PageTop +## Sobre PageTop [PageTop](https://docs.rs/pagetop) es un entorno de desarrollo que reivindica la esencia de la web clásica para crear soluciones web SSR (*renderizadas en el servidor*) modulares, extensibles y configurables, basadas en HTML, CSS y JavaScript. -## ⚡️ Guía rápida +# ⚡️ Guía rápida Igual que con otras extensiones, **añade la dependencia** a tu `Cargo.toml`: ```toml [dependencies] -pagetop-bootsier = { ... } +pagetop-bootsier = "..." ``` **Declara la extensión** en tu aplicación (o extensión que la requiera). Recuerda que el orden en @@ -59,7 +59,7 @@ Y **selecciona el tema en la configuración** de la aplicación: theme = "Bootsier" ``` -o **fuerza el tema por código** en una página concreta: +…o **fuerza el tema por código** en una página concreta: ```rust,no_run use pagetop::prelude::*; @@ -80,14 +80,14 @@ async fn homepage(request: HttpRequest) -> ResultPage { ``` -## 🚧 Advertencia +# 🚧 Advertencia **PageTop** es un proyecto personal para aprender [Rust](https://www.rust-lang.org/es) y conocer su ecosistema. Su API está sujeta a cambios frecuentes. No se recomienda su uso en producción, al menos hasta que se libere la versión **1.0.0**. -## 📜 Licencia +# 📜 Licencia El código está disponible bajo una doble licencia: diff --git a/extensions/pagetop-bootsier/src/lib.rs b/extensions/pagetop-bootsier/src/lib.rs index d562ec09..0bf94f47 100644 --- a/extensions/pagetop-bootsier/src/lib.rs +++ b/extensions/pagetop-bootsier/src/lib.rs @@ -26,7 +26,7 @@ Igual que con otras extensiones, **añade la dependencia** a tu `Cargo.toml`: ```toml [dependencies] -pagetop-bootsier = { ... } +pagetop-bootsier = "..." ``` **Declara la extensión** en tu aplicación (o extensión que la requiera). Recuerda que el orden en @@ -60,7 +60,7 @@ Y **selecciona el tema en la configuración** de la aplicación: theme = "Bootsier" ``` -o **fuerza el tema por código** en una página concreta: +…o **fuerza el tema por código** en una página concreta: ```rust,no_run use pagetop::prelude::*; @@ -69,10 +69,10 @@ use pagetop_bootsier::Bootsier; async fn homepage(request: HttpRequest) -> ResultPage { Page::new(request) .with_theme(&Bootsier) - .with_child( + .add_child( Block::new() .with_title(L10n::l("sample_title")) - .with_child(Html::with(|cx| html! { + .add_child(Html::with(|cx| html! { p { (L10n::l("sample_content").using(cx)) } })), ) @@ -102,34 +102,6 @@ pub mod prelude { pub use crate::theme::*; } -/// Plantillas que Bootsier añade. -#[derive(AutoDefault)] -pub enum BootsierTemplate { - /// Plantilla predeterminada de Bootsier. - #[default] - Standard, -} - -impl Template for BootsierTemplate { - fn render(&'static self, cx: &mut Context) -> Markup { - match self { - Self::Standard => theme::Container::new() - .with_classes(ClassesOp::Add, "container-wrapper") - .with_width(theme::container::Width::FluidMax( - config::SETTINGS.bootsier.max_width, - )) - .with_child(Html::with(|cx| { - html! { - (DefaultRegion::Header.render(cx)) - (DefaultRegion::Content.render(cx)) - (DefaultRegion::Footer.render(cx)) - } - })), - } - .render(cx) - } -} - /// Implementa el tema. pub struct Bootsier; @@ -145,25 +117,16 @@ impl Extension for Bootsier { } impl Theme for Bootsier { - #[inline] - fn default_template(&self) -> TemplateRef { - &BootsierTemplate::Standard - } - - fn before_render_page_body(&self, page: &mut Page) { - page.alter_assets(AssetsOp::AddStyleSheet( + fn after_render_page_body(&self, page: &mut Page) { + page.alter_assets(ContextOp::AddStyleSheet( StyleSheet::from("/bootsier/bs/bootstrap.min.css") .with_version(BOOTSTRAP_VERSION) .with_weight(-90), )) - .alter_assets(AssetsOp::AddJavaScript( + .alter_assets(ContextOp::AddJavaScript( JavaScript::defer("/bootsier/js/bootstrap.bundle.min.js") .with_version(BOOTSTRAP_VERSION) .with_weight(-90), - )) - .alter_child_in( - &DefaultRegion::Footer, - ChildOp::AddIfEmpty(PoweredBy::new().into()), - ); + )); } } diff --git a/extensions/pagetop-bootsier/src/locale/en-US/bootsier.ftl b/extensions/pagetop-bootsier/src/locale/en-US/bootsier.ftl index 2454c84e..0e8969cd 100644 --- a/extensions/pagetop-bootsier/src/locale/en-US/bootsier.ftl +++ b/extensions/pagetop-bootsier/src/locale/en-US/bootsier.ftl @@ -1,5 +1,5 @@ -e404_description = Oops! Page Not Found -e404_message = The page you are looking for may have been removed, had its name changed, or is temporarily unavailable. -e500_description = Oops! Unexpected Error -e500_message = We're having an issue. Please report this error to an administrator. -back_homepage = Back to homepage +e404-description = Oops! Page Not Found +e404-message = The page you are looking for may have been removed, had its name changed, or is temporarily unavailable. +e500-description = Oops! Unexpected Error +e500-message = We're having an issue. Please report this error to an administrator. +back-homepage = Back to homepage diff --git a/extensions/pagetop-bootsier/src/locale/en-US/components.ftl b/extensions/pagetop-bootsier/src/locale/en-US/components.ftl index c73478bf..e3b0d6e6 100644 --- a/extensions/pagetop-bootsier/src/locale/en-US/components.ftl +++ b/extensions/pagetop-bootsier/src/locale/en-US/components.ftl @@ -1,11 +1,8 @@ # Dropdown dropdown_toggle = Toggle Dropdown -# form::Input -input_required = This field is required +# Offcanvas +offcanvas_close = Close # Navbar toggle = Toggle navigation - -# Offcanvas -offcanvas_close = Close diff --git a/extensions/pagetop-bootsier/src/locale/en-US/regions.ftl b/extensions/pagetop-bootsier/src/locale/en-US/regions.ftl index af830a4e..f3b76e22 100644 --- a/extensions/pagetop-bootsier/src/locale/en-US/regions.ftl +++ b/extensions/pagetop-bootsier/src/locale/en-US/regions.ftl @@ -1,9 +1,9 @@ -region_header = Header -region_nav_branding = Navigation branding region -region_nav_main = Main navigation region -region_nav_additional = Additional navigation region (eg search form, social icons, etc) -region_breadcrumb = Breadcrumb -region_content = Main content -region_sidebar_first = Sidebar first -region_sidebar_second = Sidebar second -region_footer = Footer +header = Header +nav_branding = Navigation branding region +nav_main = Main navigation region +nav_additional = Additional navigation region (eg search form, social icons, etc) +breadcrumb = Breadcrumb +content = Main content +sidebar_first = Sidebar first +sidebar_second = Sidebar second +footer = Footer diff --git a/extensions/pagetop-bootsier/src/locale/es-ES/bootsier.ftl b/extensions/pagetop-bootsier/src/locale/es-ES/bootsier.ftl index bd97c2ed..998b54f2 100644 --- a/extensions/pagetop-bootsier/src/locale/es-ES/bootsier.ftl +++ b/extensions/pagetop-bootsier/src/locale/es-ES/bootsier.ftl @@ -1,5 +1,5 @@ -e404_description = ¡Vaya! Página No Encontrada -e404_message = La página que está buscando puede haber sido eliminada, cambiada de nombre o no está disponible temporalmente. -e500_description = ¡Vaya! Error Inesperado -e500_message = Está ocurriendo una incidencia. Por favor, informe de este error a un administrador. -back_homepage = Volver al inicio +e404-description = ¡Vaya! Página No Encontrada +e404-message = La página que está buscando puede haber sido eliminada, cambiada de nombre o no está disponible temporalmente. +e500-description = ¡Vaya! Error Inesperado +e500-message = Está ocurriendo una incidencia. Por favor, informe de este error a un administrador. +back-homepage = Volver al inicio diff --git a/extensions/pagetop-bootsier/src/locale/es-ES/components.ftl b/extensions/pagetop-bootsier/src/locale/es-ES/components.ftl index 21b52c91..ab7ff687 100644 --- a/extensions/pagetop-bootsier/src/locale/es-ES/components.ftl +++ b/extensions/pagetop-bootsier/src/locale/es-ES/components.ftl @@ -1,11 +1,8 @@ # Dropdown dropdown_toggle = Mostrar/ocultar menú -# form::Input -input_required = Este campo es obligatorio +# Offcanvas +offcanvas_close = Cerrar # Navbar toggle = Mostrar/ocultar navegación - -# Offcanvas -offcanvas_close = Cerrar diff --git a/extensions/pagetop-bootsier/src/locale/es-ES/regions.ftl b/extensions/pagetop-bootsier/src/locale/es-ES/regions.ftl index e4665add..674fc4b1 100644 --- a/extensions/pagetop-bootsier/src/locale/es-ES/regions.ftl +++ b/extensions/pagetop-bootsier/src/locale/es-ES/regions.ftl @@ -1,9 +1,9 @@ -region_header = Cabecera -region_nav_branding = Navegación y marca -region_nav_main = Navegación principal -region_nav_additional = Navegación adicional (p.e. formulario de búsqueda, iconos sociales, etc.) -region_breadcrumb = Ruta de posicionamiento -region_content = Contenido principal -region_sidebar_first = Barra lateral primera -region_sidebar_second = Barra lateral segunda -region_footer = Pie +header = Cabecera +nav_branding = Navegación y marca +nav_main = Navegación principal +nav_additional = Navegación adicional (p.e. formulario de búsqueda, iconos sociales, etc.) +breadcrumb = Ruta de posicionamiento +content = Contenido principal +sidebar_first = Barra lateral primera +sidebar_second = Barra lateral segunda +footer = Pie diff --git a/extensions/pagetop-bootsier/src/theme.rs b/extensions/pagetop-bootsier/src/theme.rs index 39ed51cb..2c6b5757 100644 --- a/extensions/pagetop-bootsier/src/theme.rs +++ b/extensions/pagetop-bootsier/src/theme.rs @@ -9,10 +9,6 @@ pub use aux::*; pub mod classes; -// Button. -mod button; -pub use button::Button; - // Container. pub mod container; #[doc(inline)] @@ -23,11 +19,6 @@ pub mod dropdown; #[doc(inline)] pub use dropdown::Dropdown; -// Form. -pub mod form; -#[doc(inline)] -pub use form::Form; - // Image. pub mod image; #[doc(inline)] diff --git a/extensions/pagetop-bootsier/src/theme/aux.rs b/extensions/pagetop-bootsier/src/theme/aux.rs index e5f0a82f..99431fe3 100644 --- a/extensions/pagetop-bootsier/src/theme/aux.rs +++ b/extensions/pagetop-bootsier/src/theme/aux.rs @@ -17,4 +17,4 @@ mod rounded; pub use rounded::RoundedRadius; mod button; -pub use button::{ButtonAction, ButtonColor, ButtonSize}; +pub use button::{ButtonColor, ButtonSize}; diff --git a/extensions/pagetop-bootsier/src/theme/aux/border.rs b/extensions/pagetop-bootsier/src/theme/aux/border.rs index bf81bced..43882767 100644 --- a/extensions/pagetop-bootsier/src/theme/aux/border.rs +++ b/extensions/pagetop-bootsier/src/theme/aux/border.rs @@ -2,15 +2,15 @@ use pagetop::prelude::*; use crate::theme::aux::Color; -/// Esquema de color para los bordes ([`classes::Border`](crate::theme::classes::Border)). +/// Colores `border-*` para los bordes ([`classes::Border`](crate::theme::classes::Border)). #[derive(AutoDefault, Clone, Copy, Debug, PartialEq)] pub enum BorderColor { /// No define ninguna clase. #[default] Default, - /// Genera la clase `border-{color}`. + /// Genera internamente clases `border-{color}`. Theme(Color), - /// Genera la clase `border-{color}-subtle` (un tono suavizado del color). + /// Genera internamente clases `border-{color}-subtle` (un tono suavizado del color). Subtle(Color), /// Color negro. Black, @@ -22,7 +22,7 @@ impl BorderColor { const BORDER: &str = "border"; const BORDER_PREFIX: &str = "border-"; - /// Devuelve el sufijo de la clase `border-*`, o `None` si no define ninguna clase. + // Devuelve el sufijo de la clase `border-*`, o `None` si no define ninguna clase. #[rustfmt::skip] #[inline] const fn suffix(self) -> Option<&'static str> { @@ -35,7 +35,7 @@ impl BorderColor { } } - /// Añade la clase `border-*` a la cadena de clases. + // Añade la clase `border-*` a la cadena de clases. #[inline] pub(crate) fn push_class(self, classes: &mut String) { if let Some(suffix) = self.suffix() { @@ -64,6 +64,7 @@ impl BorderColor { /// assert_eq!(BorderColor::Black.to_class(), "border-black"); /// assert_eq!(BorderColor::Default.to_class(), ""); /// ``` + #[inline] pub fn to_class(self) -> String { if let Some(suffix) = self.suffix() { let base_len = match self { diff --git a/extensions/pagetop-bootsier/src/theme/aux/breakpoint.rs b/extensions/pagetop-bootsier/src/theme/aux/breakpoint.rs index 992f8525..4d9a7626 100644 --- a/extensions/pagetop-bootsier/src/theme/aux/breakpoint.rs +++ b/extensions/pagetop-bootsier/src/theme/aux/breakpoint.rs @@ -19,7 +19,7 @@ pub enum BreakPoint { } impl BreakPoint { - /// Devuelve la identificación del punto de ruptura. + // Devuelve la identificación del punto de ruptura. #[rustfmt::skip] #[inline] pub(crate) const fn as_str(self) -> &'static str { @@ -33,11 +33,11 @@ impl BreakPoint { } } - /// Añade el punto de ruptura con un prefijo y un sufijo (opcional) separados por un guion `-` a - /// la cadena de clases. - /// - /// - Para `None` - `prefix` o `prefix-suffix` (si `suffix` no está vacío). - /// - Para `SM..XXL` - `prefix-{breakpoint}` o `prefix-{breakpoint}-{suffix}`. + // Añade el punto de ruptura con un prefijo y un sufijo (opcional) separados por un guion `-` a + // la cadena de clases. + // + // - Para `None` - `prefix` o `prefix-suffix` (si `suffix` no está vacío). + // - Para `SM..XXL` - `prefix-{breakpoint}` o `prefix-{breakpoint}-{suffix}`. #[inline] pub(crate) fn push_class(self, classes: &mut String, prefix: &str, suffix: &str) { if prefix.is_empty() { @@ -60,30 +60,30 @@ impl BreakPoint { } } - /// Devuelve la clase para el punto de ruptura, con un prefijo y un sufijo opcional, separados - /// por un guion `-`. - /// - /// - Para `None` - `prefix` o `prefix-suffix` (si `suffix` no está vacío). - /// - Para `SM..XXL` - `prefix-{breakpoint}` o `prefix-{breakpoint}-{suffix}`. - /// - Si `prefix` está vacío devuelve `""`. - /// - /// # Ejemplos - /// - /// ```rust - /// # use pagetop_bootsier::prelude::*; - /// let bp = BreakPoint::MD; - /// assert_eq!(bp.class_with("col", ""), "col-md"); - /// assert_eq!(bp.class_with("col", "6"), "col-md-6"); - /// - /// let bp = BreakPoint::None; - /// assert_eq!(bp.class_with("offcanvas", ""), "offcanvas"); - /// assert_eq!(bp.class_with("col", "12"), "col-12"); - /// - /// let bp = BreakPoint::LG; - /// assert_eq!(bp.class_with("", "3"), ""); - /// ``` - #[doc(hidden)] - pub fn class_with(self, prefix: &str, suffix: &str) -> String { + // Devuelve la clase para el punto de ruptura, con un prefijo y un sufijo opcional, separados + // por un guion `-`. + // + // - Para `None` - `prefix` o `prefix-suffix` (si `suffix` no está vacío). + // - Para `SM..XXL` - `prefix-{breakpoint}` o `prefix-{breakpoint}-{suffix}`. + // - Si `prefix` está vacío devuelve `""`. + // + // # Ejemplos + // + // ```rust + // # use pagetop_bootsier::prelude::*; + // let bp = BreakPoint::MD; + // assert_eq!(bp.class_with("col", ""), "col-md"); + // assert_eq!(bp.class_with("col", "6"), "col-md-6"); + // + // let bp = BreakPoint::None; + // assert_eq!(bp.class_with("offcanvas", ""), "offcanvas"); + // assert_eq!(bp.class_with("col", "12"), "col-12"); + // + // let bp = BreakPoint::LG; + // assert_eq!(bp.class_with("", "3"), ""); + // ``` + #[inline] + pub(crate) fn class_with(self, prefix: &str, suffix: &str) -> String { if prefix.is_empty() { return String::new(); } diff --git a/extensions/pagetop-bootsier/src/theme/aux/button.rs b/extensions/pagetop-bootsier/src/theme/aux/button.rs index 1464e288..0d1df87d 100644 --- a/extensions/pagetop-bootsier/src/theme/aux/button.rs +++ b/extensions/pagetop-bootsier/src/theme/aux/button.rs @@ -2,42 +2,17 @@ use pagetop::prelude::*; use crate::theme::aux::Color; -// **< ButtonAction >********************************************************************************* - -/// Comportamiento de un [`Button`](crate::theme::Button) al activarse. -#[derive(AutoDefault, Clone, Copy, Debug, PartialEq)] -pub enum ButtonAction { - /// Envía un formulario al servidor. Es el **tipo por defecto**. - #[default] - Submit, - /// Restablece todos los campos de un formulario a sus valores iniciales. - Reset, - /// Botón de propósito general, sin efecto predeterminado. Su comportamiento podría definirse - /// mediante JavaScript. - Plain, -} - -impl std::fmt::Display for ButtonAction { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - f.write_str(match self { - ButtonAction::Submit => "submit", - ButtonAction::Reset => "reset", - ButtonAction::Plain => "button", - }) - } -} - // **< ButtonColor >******************************************************************************** -/// Esquema de color para [`Button`](crate::theme::Button). +/// Variantes de color `btn-*` para botones. #[derive(AutoDefault, Clone, Copy, Debug, PartialEq)] pub enum ButtonColor { /// No define ninguna clase. #[default] Default, - /// Genera la clase `btn-{color}` (botón sólido). + /// Genera internamente clases `btn-{color}` (botón relleno). Background(Color), - /// Genera la clase `btn-outline-{color}` (fondo transparente con contorno coloreado). + /// Genera `btn-outline-{color}` (fondo transparente y contorno con borde). Outline(Color), /// Aplica estilo de los enlaces (`btn-link`), sin caja ni fondo, heredando el color de texto. Link, @@ -48,7 +23,7 @@ impl ButtonColor { const BTN_OUTLINE_PREFIX: &str = "btn-outline-"; const BTN_LINK: &str = "btn-link"; - /// Añade la clase `btn-*` a la cadena de clases. + // Añade la clase `btn-*` a la cadena de clases. #[inline] pub(crate) fn push_class(self, classes: &mut String) { if let Self::Default = self { @@ -58,6 +33,7 @@ impl ButtonColor { classes.push(' '); } match self { + Self::Default => unreachable!(), Self::Background(c) => { classes.push_str(Self::BTN_PREFIX); classes.push_str(c.as_str()); @@ -66,8 +42,9 @@ impl ButtonColor { classes.push_str(Self::BTN_OUTLINE_PREFIX); classes.push_str(c.as_str()); } - Self::Link => classes.push_str(Self::BTN_LINK), - Self::Default => unreachable!(), + Self::Link => { + classes.push_str(Self::BTN_LINK); + } } } @@ -88,10 +65,26 @@ impl ButtonColor { /// assert_eq!(ButtonColor::Link.to_class(), "btn-link"); /// assert_eq!(ButtonColor::Default.to_class(), ""); /// ``` + #[inline] pub fn to_class(self) -> String { - let mut class = String::new(); - self.push_class(&mut class); - class + match self { + Self::Default => String::new(), + Self::Background(c) => { + let color = c.as_str(); + let mut class = String::with_capacity(Self::BTN_PREFIX.len() + color.len()); + class.push_str(Self::BTN_PREFIX); + class.push_str(color); + class + } + Self::Outline(c) => { + let color = c.as_str(); + let mut class = String::with_capacity(Self::BTN_OUTLINE_PREFIX.len() + color.len()); + class.push_str(Self::BTN_OUTLINE_PREFIX); + class.push_str(color); + class + } + Self::Link => Self::BTN_LINK.to_string(), + } } } @@ -105,7 +98,7 @@ pub enum ButtonSize { Default, /// Botón compacto. Small, - /// Botón grande. + /// Botón destacado/grande. Large, } @@ -113,18 +106,20 @@ impl ButtonSize { const BTN_SM: &str = "btn-sm"; const BTN_LG: &str = "btn-lg"; - /// Añade la clase de tamaño `btn-sm` o `btn-lg` a la cadena de clases. + // Añade la clase de tamaño `btn-sm` o `btn-lg` a la cadena de clases. #[inline] pub(crate) fn push_class(self, classes: &mut String) { - let class = match self { - Self::Default => return, - Self::Small => Self::BTN_SM, - Self::Large => Self::BTN_LG, - }; + if let Self::Default = self { + return; + } if !classes.is_empty() { classes.push(' '); } - classes.push_str(class); + match self { + Self::Default => unreachable!(), + Self::Small => classes.push_str(Self::BTN_SM), + Self::Large => classes.push_str(Self::BTN_LG), + } } /// Devuelve la clase `btn-sm` o `btn-lg` correspondiente al tamaño del botón. @@ -137,9 +132,12 @@ impl ButtonSize { /// assert_eq!(ButtonSize::Large.to_class(), "btn-lg"); /// assert_eq!(ButtonSize::Default.to_class(), ""); /// ``` + #[inline] pub fn to_class(self) -> String { - let mut class = String::new(); - self.push_class(&mut class); - class + match self { + Self::Default => String::new(), + Self::Small => Self::BTN_SM.to_string(), + Self::Large => Self::BTN_LG.to_string(), + } } } diff --git a/extensions/pagetop-bootsier/src/theme/aux/color.rs b/extensions/pagetop-bootsier/src/theme/aux/color.rs index c408aadc..480ff3d8 100644 --- a/extensions/pagetop-bootsier/src/theme/aux/color.rs +++ b/extensions/pagetop-bootsier/src/theme/aux/color.rs @@ -5,9 +5,9 @@ use pagetop::prelude::*; /// Paleta de colores temáticos. /// /// Equivalen a los nombres estándar definidos por Bootstrap (`primary`, `secondary`, `success`, -/// etc.). Este tipo enumerado sirve de referencia para componer las clases de color para el fondo -/// ([`classes::Background`](crate::theme::classes::Background)), los bordes -/// ([`classes::Border`](crate::theme::classes::Border)) o para el texto +/// etc.). Este tipo enumerado sirve de base para componer las clases de color para fondo +/// ([`classes::Background`](crate::theme::classes::Background)), bordes +/// ([`classes::Border`](crate::theme::classes::Border)) y texto /// ([`classes::Text`](crate::theme::classes::Text)). #[derive(AutoDefault, Clone, Copy, Debug, PartialEq)] pub enum Color { @@ -23,7 +23,7 @@ pub enum Color { } impl Color { - /// Devuelve el nombre del color. + // Devuelve el nombre del color. #[rustfmt::skip] #[inline] pub(crate) const fn as_str(self) -> &'static str { @@ -39,6 +39,15 @@ impl Color { } } + /* Añade el nombre del color a la cadena de clases (reservado). + #[inline] + pub(crate) fn push_class(self, classes: &mut String) { + if !classes.is_empty() { + classes.push(' '); + } + classes.push_str(self.as_str()); + } */ + /// Devuelve la clase correspondiente al color. /// /// # Ejemplos @@ -85,7 +94,7 @@ impl Opacity { const OPACITY: &str = "opacity"; const OPACITY_PREFIX: &str = "-opacity"; - /// Devuelve el sufijo para `*opacity-*`, o `None` si no define ninguna clase. + // Devuelve el sufijo para `*opacity-*`, o `None` si no define ninguna clase. #[rustfmt::skip] #[inline] const fn suffix(self) -> Option<&'static str> { @@ -100,8 +109,8 @@ impl Opacity { } } - /// Añade la opacidad a la cadena de clases usando el prefijo dado (`bg`, `border`, `text`, o - /// vacío para `opacity-*`). + // Añade la opacidad a la cadena de clases usando el prefijo dado (`bg`, `border`, `text`, o + // vacío para `opacity-*`). #[inline] pub(crate) fn push_class(self, classes: &mut String, prefix: &str) { if let Some(suffix) = self.suffix() { @@ -118,20 +127,20 @@ impl Opacity { } } - /// Devuelve la clase de opacidad con el prefijo dado (`bg`, `border`, `text`, o vacío para - /// `opacity-*`). - /// - /// # Ejemplos - /// - /// ```rust - /// # use pagetop_bootsier::prelude::*; - /// assert_eq!(Opacity::Opaque.class_with(""), "opacity-100"); - /// assert_eq!(Opacity::Half.class_with("bg"), "bg-opacity-50"); - /// assert_eq!(Opacity::SemiTransparent.class_with("text"), "text-opacity-25"); - /// assert_eq!(Opacity::Default.class_with("bg"), ""); - /// ``` - #[doc(hidden)] - pub fn class_with(self, prefix: &str) -> String { + // Devuelve la clase de opacidad con el prefijo dado (`bg`, `border`, `text`, o vacío para + // `opacity-*`). + // + // # Ejemplos + // + // ```rust + // # use pagetop_bootsier::prelude::*; + // assert_eq!(Opacity::Opaque.class_with(""), "opacity-100"); + // assert_eq!(Opacity::Half.class_with("bg"), "bg-opacity-50"); + // assert_eq!(Opacity::SemiTransparent.class_with("text"), "text-opacity-25"); + // assert_eq!(Opacity::Default.class_with("bg"), ""); + // ``` + #[inline] + pub(crate) fn class_with(self, prefix: &str) -> String { if let Some(suffix) = self.suffix() { let base_len = if prefix.is_empty() { Self::OPACITY.len() @@ -169,7 +178,7 @@ impl Opacity { // **< ColorBg >************************************************************************************ -/// Esquema de color para el fondo. +/// Colores `bg-*` para el fondo. #[derive(AutoDefault, Clone, Copy, Debug, PartialEq)] pub enum ColorBg { /// No define ninguna clase. @@ -181,9 +190,9 @@ pub enum ColorBg { BodySecondary, /// Fondo predefinido del tema (`bg-body-tertiary`). BodyTertiary, - /// Genera la clase `bg-{color}` (p. ej., `bg-primary`). + /// Genera internamente clases `bg-{color}` (p. ej., `bg-primary`). Theme(Color), - /// Genera la clase `bg-{color}-subtle` (un tono suavizado del color). + /// Genera internamente clases `bg-{color}-subtle` (un tono suavizado del color). Subtle(Color), /// Color negro. Black, @@ -197,7 +206,7 @@ impl ColorBg { const BG: &str = "bg"; const BG_PREFIX: &str = "bg-"; - /// Devuelve el sufijo de la clase `bg-*`, o `None` si no define ninguna clase. + // Devuelve el sufijo de la clase `bg-*`, o `None` si no define ninguna clase. #[rustfmt::skip] #[inline] const fn suffix(self) -> Option<&'static str> { @@ -214,7 +223,7 @@ impl ColorBg { } } - /// Añade la clase de fondo `bg-*` a la cadena de clases. + // Añade la clase de fondo `bg-*` a la cadena de clases. #[inline] pub(crate) fn push_class(self, classes: &mut String) { if let Some(suffix) = self.suffix() { @@ -244,16 +253,31 @@ impl ColorBg { /// assert_eq!(ColorBg::Transparent.to_class(), "bg-transparent"); /// assert_eq!(ColorBg::Default.to_class(), ""); /// ``` + #[inline] pub fn to_class(self) -> String { - let mut class = String::new(); - self.push_class(&mut class); - class + if let Some(suffix) = self.suffix() { + let base_len = match self { + Self::Theme(c) | Self::Subtle(c) => Self::BG_PREFIX.len() + c.as_str().len(), + _ => Self::BG.len(), + }; + let mut class = String::with_capacity(base_len + suffix.len()); + match self { + Self::Theme(c) | Self::Subtle(c) => { + class.push_str(Self::BG_PREFIX); + class.push_str(c.as_str()); + } + _ => class.push_str(Self::BG), + } + class.push_str(suffix); + return class; + } + String::new() } } // **< ColorText >********************************************************************************** -/// Esquema de color para el texto. +/// Colores `text-*` para el texto. #[derive(AutoDefault, Clone, Copy, Debug, PartialEq)] pub enum ColorText { /// No define ninguna clase. @@ -267,9 +291,9 @@ pub enum ColorText { BodySecondary, /// Color predefinido del tema (`text-body-tertiary`). BodyTertiary, - /// Genera la clase `text-{color}`. + /// Genera internamente clases `text-{color}`. Theme(Color), - /// Genera la clase `text-{color}-emphasis` (mayor contraste acorde al tema). + /// Genera internamente clases `text-{color}-emphasis` (mayor contraste acorde al tema). Emphasis(Color), /// Color negro. Black, @@ -281,7 +305,7 @@ impl ColorText { const TEXT: &str = "text"; const TEXT_PREFIX: &str = "text-"; - /// Devuelve el sufijo de la clase `text-*`, o `None` si no define ninguna clase. + // Devuelve el sufijo de la clase `text-*`, o `None` si no define ninguna clase. #[rustfmt::skip] #[inline] const fn suffix(self) -> Option<&'static str> { @@ -298,7 +322,7 @@ impl ColorText { } } - /// Añade la clase de texto `text-*` a la cadena de clases. + // Añade la clase de texto `text-*` a la cadena de clases. #[inline] pub(crate) fn push_class(self, classes: &mut String) { if let Some(suffix) = self.suffix() { @@ -328,9 +352,24 @@ impl ColorText { /// assert_eq!(ColorText::Black.to_class(), "text-black"); /// assert_eq!(ColorText::Default.to_class(), ""); /// ``` + #[inline] pub fn to_class(self) -> String { - let mut class = String::new(); - self.push_class(&mut class); - class + if let Some(suffix) = self.suffix() { + let base_len = match self { + Self::Theme(c) | Self::Emphasis(c) => Self::TEXT_PREFIX.len() + c.as_str().len(), + _ => Self::TEXT.len(), + }; + let mut class = String::with_capacity(base_len + suffix.len()); + match self { + Self::Theme(c) | Self::Emphasis(c) => { + class.push_str(Self::TEXT_PREFIX); + class.push_str(c.as_str()); + } + _ => class.push_str(Self::TEXT), + } + class.push_str(suffix); + return class; + } + String::new() } } diff --git a/extensions/pagetop-bootsier/src/theme/aux/layout.rs b/extensions/pagetop-bootsier/src/theme/aux/layout.rs index a1255dc0..1d351582 100644 --- a/extensions/pagetop-bootsier/src/theme/aux/layout.rs +++ b/extensions/pagetop-bootsier/src/theme/aux/layout.rs @@ -25,8 +25,8 @@ pub enum ScaleSize { } impl ScaleSize { - /// Devuelve el sufijo para el tamaño (`"-0"`, `"-1"`, etc.), o `None` si no define ninguna - /// clase, o `""` para el tamaño automático. + // Devuelve el sufijo para el tamaño (`"-0"`, `"-1"`, etc.), o `None` si no define ninguna + // clase, o `""` para el tamaño automático. #[rustfmt::skip] #[inline] const fn suffix(self) -> Option<&'static str> { @@ -42,7 +42,7 @@ impl ScaleSize { } } - /// Añade el tamaño a la cadena de clases usando el prefijo dado. + // Añade el tamaño a la cadena de clases usando el prefijo dado. #[inline] pub(crate) fn push_class(self, classes: &mut String, prefix: &str) { if !prefix.is_empty() { @@ -57,18 +57,18 @@ impl ScaleSize { } /* Devuelve la clase del tamaño para el prefijo, o una cadena vacía si no aplica (reservado). - /// - /// # Ejemplo - /// - /// ```rust - /// # use pagetop_bootsier::prelude::*; - /// assert_eq!(ScaleSize::Auto.class_with("border"), "border"); - /// assert_eq!(ScaleSize::Zero.class_with("m"), "m-0"); - /// assert_eq!(ScaleSize::Three.class_with("p"), "p-3"); - /// assert_eq!(ScaleSize::None.class_with("border"), ""); - /// ``` - #[doc(hidden)] - pub fn class_with(self, prefix: &str) -> String { + // + // # Ejemplo + // + // ```rust + // # use pagetop_bootsier::prelude::*; + // assert_eq!(ScaleSize::Auto.class_with("border"), "border"); + // assert_eq!(ScaleSize::Zero.class_with("m"), "m-0"); + // assert_eq!(ScaleSize::Three.class_with("p"), "p-3"); + // assert_eq!(ScaleSize::None.class_with("border"), ""); + // ``` + #[inline] + pub(crate) fn class_with(self, prefix: &str) -> String { if !prefix.is_empty() { if let Some(suffix) = self.suffix() { let mut class = String::with_capacity(prefix.len() + suffix.len()); diff --git a/extensions/pagetop-bootsier/src/theme/aux/rounded.rs b/extensions/pagetop-bootsier/src/theme/aux/rounded.rs index 69976142..20e061d6 100644 --- a/extensions/pagetop-bootsier/src/theme/aux/rounded.rs +++ b/extensions/pagetop-bootsier/src/theme/aux/rounded.rs @@ -29,8 +29,8 @@ pub enum RoundedRadius { impl RoundedRadius { const ROUNDED: &str = "rounded"; - /// Devuelve el sufijo para `*rounded-*`, o `None` si no define ninguna clase, o `""` para el - /// redondeo por defecto. + // Devuelve el sufijo para `*rounded-*`, o `None` si no define ninguna clase, o `""` para el + // redondeo por defecto. #[rustfmt::skip] #[inline] const fn suffix(self) -> Option<&'static str> { @@ -48,8 +48,8 @@ impl RoundedRadius { } } - /// Añade el redondeo de esquinas a la cadena de clases usando el prefijo dado (`rounded-top`, - /// `rounded-bottom-start`, o vacío para `rounded-*`). + // Añade el redondeo de esquinas a la cadena de clases usando el prefijo dado (`rounded-top`, + // `rounded-bottom-start`, o vacío para `rounded-*`). #[inline] pub(crate) fn push_class(self, classes: &mut String, prefix: &str) { if let Some(suffix) = self.suffix() { @@ -65,21 +65,21 @@ impl RoundedRadius { } } - /// Devuelve la clase para el redondeo de esquinas con el prefijo dado (`rounded-top`, - /// `rounded-bottom-start`, o vacío para `rounded-*`). - /// - /// # Ejemplos - /// - /// ```rust - /// # use pagetop_bootsier::prelude::*; - /// assert_eq!(RoundedRadius::Scale2.class_with(""), "rounded-2"); - /// assert_eq!(RoundedRadius::Zero.class_with("rounded-top"), "rounded-top-0"); - /// assert_eq!(RoundedRadius::Scale3.class_with("rounded-top-end"), "rounded-top-end-3"); - /// assert_eq!(RoundedRadius::Circle.class_with(""), "rounded-circle"); - /// assert_eq!(RoundedRadius::None.class_with("rounded-bottom-start"), ""); - /// ``` - #[doc(hidden)] - pub fn class_with(self, prefix: &str) -> String { + // Devuelve la clase para el redondeo de esquinas con el prefijo dado (`rounded-top`, + // `rounded-bottom-start`, o vacío para `rounded-*`). + // + // # Ejemplos + // + // ```rust + // # use pagetop_bootsier::prelude::*; + // assert_eq!(RoundedRadius::Scale2.class_with(""), "rounded-2"); + // assert_eq!(RoundedRadius::Zero.class_with("rounded-top"), "rounded-top-0"); + // assert_eq!(RoundedRadius::Scale3.class_with("rounded-top-end"), "rounded-top-end-3"); + // assert_eq!(RoundedRadius::Circle.class_with(""), "rounded-circle"); + // assert_eq!(RoundedRadius::None.class_with("rounded-bottom-start"), ""); + // ``` + #[inline] + pub(crate) fn class_with(self, prefix: &str) -> String { if let Some(suffix) = self.suffix() { let base_len = if prefix.is_empty() { Self::ROUNDED.len() diff --git a/extensions/pagetop-bootsier/src/theme/button.rs b/extensions/pagetop-bootsier/src/theme/button.rs deleted file mode 100644 index 48eb7283..00000000 --- a/extensions/pagetop-bootsier/src/theme/button.rs +++ /dev/null @@ -1,213 +0,0 @@ -use pagetop::prelude::*; - -use crate::theme::{ButtonAction, ButtonColor, ButtonSize}; - -/// Componente para crear un **botón**. -/// -/// Renderiza un botón con soporte para las variantes disponibles en [`ButtonAction`] (`submit`, -/// `reset` y botón genérico) y con la variedad de estilos del tema a través de [`ButtonColor`] y -/// [`ButtonSize`]. -/// -/// El comportamiento del botón se establece al crearlo: -/// -/// - [`Button::submit()`]: botón de envío (por defecto). -/// - [`Button::reset()`]: botón de restablecimiento de valores. -/// - [`Button::plain()`]: botón genérico sin comportamiento predeterminado. -/// -/// El botón puede usarse dentro o fuera de un formulario. -/// -/// # Ejemplo -/// -/// ```rust -/// # use pagetop::prelude::*; -/// # use pagetop_bootsier::prelude::*; -/// let save = Button::submit(L10n::n("Save")) -/// .with_color(ButtonColor::Background(Color::Primary)); -/// -/// let cancel = Button::plain(L10n::n("Cancel")) -/// .with_color(ButtonColor::Outline(Color::Secondary)); -/// -/// let clear = Button::reset(L10n::n("Clear")) -/// .with_size(ButtonSize::Small); -/// ``` -/// -/// Cuando el botón activa el envío, el navegador incluye el par `name=value` en los datos del -/// formulario **sólo si** tiene el atributo `name` definido. Es la forma habitual de identificar -/// cuál de los botones de envío fue pulsado. En el servidor se deserializa como `Option`: -/// -/// ```rust,ignore -/// #[derive(serde::Deserialize)] -/// struct FormData { -/// #[serde(default)] -/// action: Option, // p. ej., "save" o "delete"; `None` si el botón no tenía `name`. -/// } -/// ``` -#[derive(AutoDefault, Clone, Debug, Getters)] -pub struct Button { - #[getters(skip)] - id: AttrId, - /// Devuelve las clases CSS del botón. - classes: Classes, - /// Devuelve el comportamiento del botón al activarse. - kind: ButtonAction, - /// Devuelve el esquema de color del botón. - color: ButtonColor, - /// Devuelve el tamaño visual del botón. - size: ButtonSize, - /// Devuelve el nombre del botón. - name: AttrName, - /// Devuelve el valor del botón. - value: AttrValue, - /// Devuelve la etiqueta del botón. - label: Attr, - /// Devuelve si el botón recibe el foco automáticamente al cargar la página. - autofocus: bool, - /// Devuelve si el botón está deshabilitado. - disabled: bool, -} - -impl Component for Button { - fn new() -> Self { - Self::default() - } - - fn id(&self) -> Option { - self.id.get() - } - - fn setup(&mut self, _cx: &Context) { - let mut classes = "btn".to_string(); - (*self.color()).push_class(&mut classes); - (*self.size()).push_class(&mut classes); - self.alter_classes(ClassesOp::Prepend, classes); - } - - fn prepare(&self, cx: &mut Context) -> Result { - Ok(html! { - button - id=[self.id()] - type=(self.kind()) - class=[self.classes().get()] - name=[self.name().get()] - value=[self.value().get()] - autofocus[*self.autofocus()] - disabled[*self.disabled()] - { - @if let Some(label) = self.label().lookup(cx) { - (label) - } - } - }) - } -} - -impl Button { - /// Crea un botón de **envío** (`type="submit"`). - /// - /// Es la acción predeterminada al pulsar un botón en la mayoría de los formularios: envía los - /// datos al servidor. - pub fn submit(label: L10n) -> Self { - Self { - kind: ButtonAction::Submit, - label: Attr::some(label), - ..Default::default() - } - } - - /// Crea un botón de **restablecimiento** (`type="reset"`). - /// - /// Al pulsarlo, devuelve todos los campos del formulario a sus valores iniciales. - pub fn reset(label: L10n) -> Self { - Self { - kind: ButtonAction::Reset, - label: Attr::some(label), - ..Default::default() - } - } - - /// Crea un **botón genérico** (`type="button"`). - /// - /// No tiene un comportamiento predeterminado sobre el formulario. Su comportamiento puede - /// definirse mediante JavaScript. - pub fn plain(label: L10n) -> Self { - Self { - kind: ButtonAction::Plain, - label: Attr::some(label), - ..Default::default() - } - } - - // **< Button BUILDER >************************************************************************* - - /// Establece el identificador único (`id`) del botón. - #[builder_fn] - pub fn with_id(mut self, id: impl AsRef) -> Self { - self.id.alter_id(id); - self - } - - /// Modifica la lista de clases CSS aplicadas al botón. - #[builder_fn] - pub fn with_classes(mut self, op: ClassesOp, classes: impl AsRef) -> Self { - self.classes.alter_classes(op, classes); - self - } - - /// Establece el esquema de color del botón. - /// - /// Usa [`ButtonColor::Background`] para botones sólidos o [`ButtonColor::Outline`] para - /// variantes con contorno. - #[builder_fn] - pub fn with_color(mut self, color: ButtonColor) -> Self { - self.color = color; - self - } - - /// Establece el tamaño visual del botón. - #[builder_fn] - pub fn with_size(mut self, size: ButtonSize) -> Self { - self.size = size; - self - } - - /// Establece el nombre del botón (atributo `name`). - /// - /// Cuando el formulario tiene varios botones de envío, el navegador incluye en el envío el par - /// `name=value` sólo del botón que activó el formulario. Permite identificar cuál fue pulsado. - #[builder_fn] - pub fn with_name(mut self, name: impl AsRef) -> Self { - self.name.alter_name(name); - self - } - - /// Establece el valor del botón (atributo `value`). - /// - /// Es el dato que el navegador transmite al servidor junto con el `name` cuando este botón - /// activa el envío. Útil para distinguir entre varios botones de envío en un mismo formulario. - #[builder_fn] - pub fn with_value(mut self, value: impl AsRef) -> Self { - self.value.alter_str(value); - self - } - - /// Establece o elimina la etiqueta visible del botón (basta pasar `None` para quitarla). - #[builder_fn] - pub fn with_label(mut self, label: impl Into>) -> Self { - self.label.alter_opt(label.into()); - self - } - - /// Establece si el botón recibe el foco automáticamente al cargar la página. - #[builder_fn] - pub fn with_autofocus(mut self, autofocus: bool) -> Self { - self.autofocus = autofocus; - self - } - - /// Establece si el botón está deshabilitado. - #[builder_fn] - pub fn with_disabled(mut self, disabled: bool) -> Self { - self.disabled = disabled; - self - } -} diff --git a/extensions/pagetop-bootsier/src/theme/classes/border.rs b/extensions/pagetop-bootsier/src/theme/classes/border.rs index 2da7bfbb..3095498c 100644 --- a/extensions/pagetop-bootsier/src/theme/classes/border.rs +++ b/extensions/pagetop-bootsier/src/theme/classes/border.rs @@ -145,6 +145,7 @@ impl Border { /// `"border border-top-0 border-end-3 border-primary border-opacity-50"`, etc.). /// /// Si no se define ningún tamaño, color ni opacidad, devuelve `""`. + #[inline] pub fn to_class(self) -> String { let mut classes = String::new(); self.push_class(&mut classes); diff --git a/extensions/pagetop-bootsier/src/theme/classes/color.rs b/extensions/pagetop-bootsier/src/theme/classes/color.rs index 4f5b4650..162b7849 100644 --- a/extensions/pagetop-bootsier/src/theme/classes/color.rs +++ b/extensions/pagetop-bootsier/src/theme/classes/color.rs @@ -76,6 +76,7 @@ impl Background { /// Devuelve las clases de fondo como cadena (`"bg-primary"`, `"bg-body-secondary bg-opacity-50"`, etc.). /// /// Si no se define ni color ni opacidad, devuelve `""`. + #[inline] pub fn to_class(self) -> String { let mut classes = String::new(); self.push_class(&mut classes); @@ -188,6 +189,7 @@ impl Text { /// etc.). /// /// Si no se define ni color ni opacidad, devuelve `""`. + #[inline] pub fn to_class(self) -> String { let mut classes = String::new(); self.push_class(&mut classes); diff --git a/extensions/pagetop-bootsier/src/theme/classes/layout.rs b/extensions/pagetop-bootsier/src/theme/classes/layout.rs index 8b53cf15..e9d7e248 100644 --- a/extensions/pagetop-bootsier/src/theme/classes/layout.rs +++ b/extensions/pagetop-bootsier/src/theme/classes/layout.rs @@ -48,7 +48,7 @@ impl Margin { // **< Margin HELPERS >************************************************************************* - /// Devuelve el prefijo `m*` según el lado. + // Devuelve el prefijo `m*` según el lado. #[rustfmt::skip] #[inline] const fn side_prefix(&self) -> &'static str { @@ -63,7 +63,7 @@ impl Margin { } } - /// Devuelve el sufijo del tamaño (`auto`, `0`..`5`), o `None` si no define clase. + // Devuelve el sufijo del tamaño (`auto`, `0`..`5`), o `None` si no define clase. #[rustfmt::skip] #[inline] const fn size_suffix(&self) -> Option<&'static str> { @@ -79,9 +79,22 @@ impl Margin { } } + /* Añade la clase de **margin** a la cadena de clases (reservado). + // + // No añade nada si `size` es `ScaleSize::None`. + #[inline] + pub(crate) fn push_class(self, classes: &mut String) { + let Some(size) = self.size_suffix() else { + return; + }; + self.breakpoint + .push_class(classes, self.side_prefix(), size); + } */ + /// Devuelve la clase de **margin** como cadena (`"mt-3"`, `"ms-lg-auto"`, etc.). /// /// Si `size` es `ScaleSize::None`, devuelve `""`. + #[inline] pub fn to_class(self) -> String { let Some(size) = self.size_suffix() else { return String::new(); @@ -135,7 +148,7 @@ impl Padding { // **< Padding HELPERS >************************************************************************ - /// Devuelve el prefijo `p*` según el lado. + // Devuelve el prefijo `p*` según el lado. #[rustfmt::skip] #[inline] const fn prefix(&self) -> &'static str { @@ -150,9 +163,9 @@ impl Padding { } } - /// Devuelve el sufijo del tamaño (`0`..`5`), o `None` si no define clase. - /// - /// Nota: `ScaleSize::Auto` **no aplica** a padding ⇒ devuelve `None`. + // Devuelve el sufijo del tamaño (`0`..`5`), o `None` si no define clase. + // + // Nota: `ScaleSize::Auto` **no aplica** a padding ⇒ devuelve `None`. #[rustfmt::skip] #[inline] const fn suffix(&self) -> Option<&'static str> { @@ -168,9 +181,21 @@ impl Padding { } } - /// Devuelve la clase de **padding** como cadena (`"px-2"`, `"pe-sm-4"`, etc.). - /// - /// Si `size` es `ScaleSize::None` o `ScaleSize::Auto`, devuelve `""`. + /* Añade la clase de **padding** a la cadena de clases (reservado). + // + // No añade nada si `size` es `ScaleSize::None` o `ScaleSize::Auto`. + #[inline] + pub(crate) fn push_class(self, classes: &mut String) { + let Some(size) = self.suffix() else { + return; + }; + self.breakpoint.push_class(classes, self.prefix(), size); + } */ + + // Devuelve la clase de **padding** como cadena (`"px-2"`, `"pe-sm-4"`, etc.). + // + // Si `size` es `ScaleSize::None` o `ScaleSize::Auto`, devuelve `""`. + #[inline] pub fn to_class(self) -> String { let Some(size) = self.suffix() else { return String::new(); diff --git a/extensions/pagetop-bootsier/src/theme/classes/rounded.rs b/extensions/pagetop-bootsier/src/theme/classes/rounded.rs index 077740e1..58d50b86 100644 --- a/extensions/pagetop-bootsier/src/theme/classes/rounded.rs +++ b/extensions/pagetop-bootsier/src/theme/classes/rounded.rs @@ -160,6 +160,7 @@ impl Rounded { /// `"rounded-top rounded-bottom-start-4 rounded-bottom-end-circle"`, etc.). /// /// Si no se define ningún radio, devuelve `""`. + #[inline] pub fn to_class(self) -> String { let mut classes = String::new(); self.push_class(&mut classes); diff --git a/extensions/pagetop-bootsier/src/theme/container/component.rs b/extensions/pagetop-bootsier/src/theme/container/component.rs index 0635ad18..068d24a3 100644 --- a/extensions/pagetop-bootsier/src/theme/container/component.rs +++ b/extensions/pagetop-bootsier/src/theme/container/component.rs @@ -6,83 +6,79 @@ use crate::prelude::*; /// /// Envuelve un contenido con la etiqueta HTML indicada por [`container::Kind`]. Sólo se renderiza /// si existen componentes hijos (*children*). -#[derive(AutoDefault, Clone, Debug, Getters)] +#[rustfmt::skip] +#[derive(AutoDefault)] pub struct Container { - #[getters(skip)] - id: AttrId, - /// Devuelve las clases CSS asociadas al contenedor. - classes: Classes, - /// Devuelve el tipo semántico del contenedor. - container_kind: container::Kind, - /// Devuelve el comportamiento para el ancho del contenedor. + id : AttrId, + classes : AttrClasses, + container_kind : container::Kind, container_width: container::Width, - /// Devuelve la lista de componentes (`children`) del contenedor. - children: Children, + children : Children, } impl Component for Container { fn new() -> Self { - Self::default() + Container::default() } fn id(&self) -> Option { self.id.get() } - fn setup(&mut self, _cx: &Context) { - self.alter_classes(ClassesOp::Prepend, self.container_width().to_class()); + fn setup_before_prepare(&mut self, _cx: &mut Context) { + self.alter_classes(ClassesOp::Prepend, self.width().to_class()); } - fn prepare(&self, cx: &mut Context) -> Result { + fn prepare_component(&self, cx: &mut Context) -> PrepareMarkup { let output = self.children().render(cx); if output.is_empty() { - return Ok(html! {}); + return PrepareMarkup::None; } - let style = match self.container_width() { + let style = match self.width() { container::Width::FluidMax(w) if w.is_measurable() => { - Some(util::join!("max-width: ", w.to_string(), ";")) + Some(join!("max-width: ", w.to_string(), ";")) } _ => None, }; - Ok(match self.container_kind() { - container::Kind::Default => html! { + match self.container_kind() { + container::Kind::Default => PrepareMarkup::With(html! { div id=[self.id()] class=[self.classes().get()] style=[style] { (output) } - }, - container::Kind::Main => html! { + }), + container::Kind::Main => PrepareMarkup::With(html! { main id=[self.id()] class=[self.classes().get()] style=[style] { (output) } - }, - container::Kind::Header => html! { + }), + container::Kind::Header => PrepareMarkup::With(html! { header id=[self.id()] class=[self.classes().get()] style=[style] { (output) } - }, - container::Kind::Footer => html! { + }), + container::Kind::Footer => PrepareMarkup::With(html! { footer id=[self.id()] class=[self.classes().get()] style=[style] { (output) } - }, - container::Kind::Section => html! { + }), + container::Kind::Section => PrepareMarkup::With(html! { section id=[self.id()] class=[self.classes().get()] style=[style] { (output) } - }, - container::Kind::Article => html! { + }), + container::Kind::Article => PrepareMarkup::With(html! { article id=[self.id()] class=[self.classes().get()] style=[style] { (output) } - }, - }) + }), + } } } impl Container { /// Crea un contenedor de tipo `Main` (`
`). pub fn main() -> Self { - Self { + Container { container_kind: container::Kind::Main, ..Default::default() } @@ -90,7 +86,7 @@ impl Container { /// Crea un contenedor de tipo `Header` (`
`). pub fn header() -> Self { - Self { + Container { container_kind: container::Kind::Header, ..Default::default() } @@ -98,7 +94,7 @@ impl Container { /// Crea un contenedor de tipo `Footer` (`