diff --git a/Cargo.lock b/Cargo.lock index 9121c89..29a6c2c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -29,78 +29,6 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d032745fe46100dbcb28ee6e30f12c4b148786f8889e07cd0a3445eeb54970f" -[[package]] -name = "ansi-to-tui" -version = "8.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e42366bb9d958f042bf58f0a85e1b2d091997c1257ca49bddd7e4827aadc65fd" -dependencies = [ - "nom 8.0.0", - "ratatui-core", - "simdutf8", - "smallvec", - "thiserror 2.0.18", -] - -[[package]] -name = "ansi_term" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" -dependencies = [ - "winapi", -] - -[[package]] -name = "anstream" -version = "0.6.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" -dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "is_terminal_polyfill", - "utf8parse", -] - -[[package]] -name = "anstyle" -version = "1.0.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" - -[[package]] -name = "anstyle-parse" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" -dependencies = [ - "utf8parse", -] - -[[package]] -name = "anstyle-query" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" -dependencies = [ - "windows-sys", -] - -[[package]] -name = "anstyle-wincon" -version = "3.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" -dependencies = [ - "anstyle", - "once_cell_polyfill", - "windows-sys", -] - [[package]] name = "anyhow" version = "1.0.100" @@ -169,12 +97,6 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" -[[package]] -name = "bit_field" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e4b40c7323adcfc0a41c4b88143ed58346ff65a288fc144329c5c45e05d70c6" - [[package]] name = "bitflags" version = "1.3.2" @@ -245,12 +167,6 @@ version = "1.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8efb64bd706a16a1bdde310ae86b351e4d21550d98d056f22f8a7f7a2183fec" -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - [[package]] name = "castaway" version = "0.2.4" @@ -272,58 +188,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" -[[package]] -name = "clap" -version = "4.5.56" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75ca66430e33a14957acc24c5077b503e7d374151b2b4b3a10c83b4ceb4be0e" -dependencies = [ - "clap_builder", - "clap_derive", -] - -[[package]] -name = "clap_builder" -version = "4.5.56" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793207c7fa6300a0608d1080b858e5fdbe713cdc1c8db9fb17777d8a13e63df0" -dependencies = [ - "anstream", - "anstyle", - "clap_lex", - "strsim", -] - -[[package]] -name = "clap_derive" -version = "4.5.55" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a92793da1a46a5f2a02a6f4c46c6496b28c43638adea8306fcb0caa1634f24e5" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn 2.0.114", -] - -[[package]] -name = "clap_lex" -version = "0.7.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3e64b0cc0439b12df2fa678eae89a1c56a529fd067a9115f7827f1fffd22b32" - -[[package]] -name = "color_quant" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" - -[[package]] -name = "colorchoice" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" - [[package]] name = "compact_str" version = "0.9.0" @@ -366,40 +230,6 @@ dependencies = [ "libc", ] -[[package]] -name = "crc32fast" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crossbeam-deque" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" -dependencies = [ - "crossbeam-epoch", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" - [[package]] name = "crossterm" version = "0.29.0" @@ -427,12 +257,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "crunchy" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" - [[package]] name = "crypto-common" version = "0.1.7" @@ -640,21 +464,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "exr" -version = "1.74.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4300e043a56aa2cb633c01af81ca8f699a321879a7854d3896a0ba89056363be" -dependencies = [ - "bit_field", - "half", - "lebe", - "miniz_oxide", - "rayon-core", - "smallvec", - "zune-inflate", -] - [[package]] name = "fancy-regex" version = "0.11.0" @@ -665,15 +474,6 @@ dependencies = [ "regex", ] -[[package]] -name = "fdeflate" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c" -dependencies = [ - "simd-adler32", -] - [[package]] name = "filedescriptor" version = "0.8.3" @@ -697,22 +497,18 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" -[[package]] -name = "flate2" -version = "1.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c" -dependencies = [ - "crc32fast", - "miniz_oxide", -] - [[package]] name = "fnv" version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + [[package]] name = "foldhash" version = "0.2.0" @@ -773,32 +569,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" dependencies = [ "cfg-if", - "js-sys", "libc", "r-efi", "wasip2", - "wasm-bindgen", ] [[package]] -name = "gif" -version = "0.13.3" +name = "getrandom" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ae047235e33e2829703574b54fdec96bfbad892062d97fed2f76022287de61b" +checksum = "139ef39800118c7683f2fd3c98c1b23c09ae076556b435f8e9064ae108aaeeec" dependencies = [ - "color_quant", - "weezl", + "cfg-if", + "js-sys", + "libc", + "r-efi", + "wasip2", + "wasip3", + "wasm-bindgen", ] [[package]] -name = "half" -version = "2.7.1" +name = "hashbrown" +version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" dependencies = [ - "cfg-if", - "crunchy", - "zerocopy", + "foldhash 0.1.5", ] [[package]] @@ -809,7 +606,7 @@ checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" dependencies = [ "allocator-api2", "equivalent", - "foldhash", + "foldhash 0.2.0", ] [[package]] @@ -824,6 +621,12 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "id-arena" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" + [[package]] name = "ident_case" version = "1.0.1" @@ -831,21 +634,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] -name = "image" -version = "0.24.9" +name = "indexmap" +version = "2.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5690139d2f55868e080017335e4b94cb7414274c74f1669c84fb5feba2c9f69d" +checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" dependencies = [ - "bytemuck", - "byteorder", - "color_quant", - "exr", - "gif", - "jpeg-decoder", - "num-traits", - "png", - "qoi", - "tiff", + "equivalent", + "hashbrown 0.16.1", + "serde", + "serde_core", ] [[package]] @@ -870,12 +667,6 @@ dependencies = [ "syn 2.0.114", ] -[[package]] -name = "is_terminal_polyfill" -version = "1.70.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" - [[package]] name = "itertools" version = "0.10.5" @@ -900,15 +691,6 @@ version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" -[[package]] -name = "jpeg-decoder" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00810f1d8b74be64b13dbf3db89ac67740615d6c891f0e7b6179326533011a07" -dependencies = [ - "rayon", -] - [[package]] name = "js-sys" version = "0.3.85" @@ -923,25 +705,19 @@ dependencies = [ name = "kanash" version = "0.1.6" dependencies = [ - "ansi-to-tui", - "clap", "crossterm", "kanash-components", - "rascii_art", "ratatui", "tachyonfx", "tui-big-text", - "wana_kana", ] [[package]] name = "kanash-components" version = "0.1.6" dependencies = [ - "ansi-to-tui", - "getrandom", + "getrandom 0.4.1", "rand 0.9.2", - "rascii_art", "ratatui", "ratzilla", "tui-rain", @@ -957,7 +733,6 @@ dependencies = [ "ratzilla", "tachyonfx", "tui-big-text", - "wasm-bindgen", "web-sys", "web-time", ] @@ -968,7 +743,7 @@ version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fe90c1150662e858c7d5f945089b7517b0a80d8bf7ba4b1b5ffc984e7230a5b" dependencies = [ - "hashbrown", + "hashbrown 0.16.1", "portable-atomic", "thiserror 2.0.18", ] @@ -986,10 +761,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] -name = "lebe" -version = "0.5.3" +name = "leb128fmt" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a79a3332a6609480d7d0c9eab957bca6b455b91bb84e66d19f5ff66294b85b8" +checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" [[package]] name = "libc" @@ -1039,7 +814,7 @@ version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1dc47f592c06f33f8e3aea9591776ec7c9f9e4124778ff8a3c3b87159f7e593" dependencies = [ - "hashbrown", + "hashbrown 0.16.1", ] [[package]] @@ -1092,7 +867,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" dependencies = [ "adler2", - "simd-adler32", ] [[package]] @@ -1130,15 +904,6 @@ dependencies = [ "minimal-lexical", ] -[[package]] -name = "nom" -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df9761775871bdef83bee530e60050f7e54b1105350d6884eb0fb4f46c2f9405" -dependencies = [ - "memchr", -] - [[package]] name = "num-conv" version = "0.2.0" @@ -1180,12 +945,6 @@ 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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" - [[package]] name = "ordered-float" version = "4.6.0" @@ -1325,19 +1084,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" -[[package]] -name = "png" -version = "0.17.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82151a2fc869e011c153adc57cf2789ccb8d9906ce52c0b39a6b5697749d7526" -dependencies = [ - "bitflags 1.3.2", - "crc32fast", - "fdeflate", - "flate2", - "miniz_oxide", -] - [[package]] name = "portable-atomic" version = "1.13.1" @@ -1378,15 +1124,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "qoi" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f6d64c71eb498fe9eae14ce4ec935c555749aef511cca85b5568910d6e48001" -dependencies = [ - "bytemuck", -] - [[package]] name = "quote" version = "1.0.44" @@ -1449,7 +1186,7 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" dependencies = [ - "getrandom", + "getrandom 0.3.4", ] [[package]] @@ -1461,18 +1198,6 @@ dependencies = [ "rand_core 0.6.4", ] -[[package]] -name = "rascii_art" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e27f573a36aab4d4f2dd4aae8f44e8c5409a3d2cefce01d116cb11de546b1c65" -dependencies = [ - "ansi_term", - "clap", - "image", - "unicode-segmentation", -] - [[package]] name = "ratatui" version = "0.30.0" @@ -1495,7 +1220,7 @@ checksum = "5ef8dea09a92caaf73bff7adb70b76162e5937524058a7e5bff37869cbbec293" dependencies = [ "bitflags 2.10.0", "compact_str", - "hashbrown", + "hashbrown 0.16.1", "indoc", "itertools 0.14.0", "kasuari", @@ -1546,7 +1271,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7dbfa023cd4e604c2553483820c5fe8aa9d71a42eea5aa77c6e7f35756612db" dependencies = [ "bitflags 2.10.0", - "hashbrown", + "hashbrown 0.16.1", "indoc", "instability", "itertools 0.14.0", @@ -1574,26 +1299,6 @@ dependencies = [ "web-sys", ] -[[package]] -name = "rayon" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368f01d005bf8fd9b1206fb6fa653e6c4a81ceb1466406b81792d87c5677a58f" -dependencies = [ - "either", - "rayon-core", -] - -[[package]] -name = "rayon-core" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91" -dependencies = [ - "crossbeam-deque", - "crossbeam-utils", -] - [[package]] name = "redox_syscall" version = "0.5.18" @@ -1708,6 +1413,19 @@ dependencies = [ "syn 2.0.114", ] +[[package]] +name = "serde_json" +version = "1.0.149" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" +dependencies = [ + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", +] + [[package]] name = "sha2" version = "0.10.9" @@ -1750,18 +1468,6 @@ dependencies = [ "libc", ] -[[package]] -name = "simd-adler32" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e320a6c5ad31d271ad523dcf3ad13e2767ad8b1cb8f047f75a8aeaf8da139da2" - -[[package]] -name = "simdutf8" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" - [[package]] name = "siphasher" version = "1.0.2" @@ -1864,7 +1570,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4ea810f0692f9f51b382fff5893887bb4580f5fa246fde546e0b13e7fcee662" dependencies = [ "fnv", - "nom 7.1.3", + "nom", "phf", "phf_codegen", ] @@ -1960,17 +1666,6 @@ dependencies = [ "syn 2.0.114", ] -[[package]] -name = "tiff" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba1310fcea54c6a9a4fd1aad794ecc02c31682f6bfbecdf460bf19533eed1e3e" -dependencies = [ - "flate2", - "jpeg-decoder", - "weezl", -] - [[package]] name = "time" version = "0.3.46" @@ -2055,6 +1750,12 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + [[package]] name = "utf8parse" version = "0.2.2" @@ -2068,7 +1769,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee48d38b119b0cd71fe4141b30f5ba9c7c5d9f4e7a3a8b4a674e4b6ef789976f" dependencies = [ "atomic", - "getrandom", + "getrandom 0.3.4", "js-sys", "wasm-bindgen", ] @@ -2114,6 +1815,15 @@ dependencies = [ "wit-bindgen", ] +[[package]] +name = "wasip3" +version = "0.4.0+wasi-0.3.0-rc-2026-01-06" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5" +dependencies = [ + "wit-bindgen", +] + [[package]] name = "wasm-bindgen" version = "0.2.108" @@ -2173,6 +1883,40 @@ 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 2.10.0", + "hashbrown 0.15.5", + "indexmap", + "semver", +] + [[package]] name = "web-sys" version = "0.3.85" @@ -2193,12 +1937,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "weezl" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28ac98ddc8b9274cb41bb4d9d4d5c425b6020c50c46f25559911905610b4a88" - [[package]] name = "wezterm-bidi" version = "0.2.3" @@ -2215,7 +1953,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "692daff6d93d94e29e4114544ef6d5c942a7ed998b37abdc19b17136ea428eb7" dependencies = [ - "getrandom", + "getrandom 0.3.4", "mac_address", "sha2", "thiserror 1.0.69", @@ -2313,6 +2051,88 @@ name = "wit-bindgen" version = "0.51.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" +dependencies = [ + "wit-bindgen-rust-macro", +] + +[[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 2.0.114", + "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 2.0.114", + "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 2.10.0", + "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", +] [[package]] name = "wyz" @@ -2344,10 +2164,7 @@ dependencies = [ ] [[package]] -name = "zune-inflate" -version = "0.2.54" +name = "zmij" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73ab332fe2f6680068f3582b16a24f90ad7096d5d39b974d1c0aff0125116f02" -dependencies = [ - "simd-adler32", -] +checksum = "3ff05f8caa9038894637571ae6b9e29466c1f4f829d26c9b28f869a29cbe3445" diff --git a/kanash-components/Cargo.toml b/kanash-components/Cargo.toml index 67d300d..6e2f366 100644 --- a/kanash-components/Cargo.toml +++ b/kanash-components/Cargo.toml @@ -12,13 +12,11 @@ keywords = ["ratatui", "learning", "japanese", "TUI"] rand = "0.9.0" wana_kana = "4.0.0" tui-rain = { git = "https://github.com/SuperJappie08/tui-rain.git", branch = "ratatui-0.30.0" } -rascii_art = "0.4.5" [target.'cfg(target_arch = "wasm32")'.dependencies] -getrandom = { version = "0.3", features = ["wasm_js"] } +getrandom = { version = "0.4", features = ["wasm_js"] } ratzilla = "0.3.0" web-time = "1.1.0" [target.'cfg(not(target_arch = "wasm32"))'.dependencies] ratatui = "0.30.0" -ansi-to-tui = "8.0.1" diff --git a/kanash-components/src/app.rs b/kanash-components/src/app.rs index affd8b8..1484dc6 100644 --- a/kanash-components/src/app.rs +++ b/kanash-components/src/app.rs @@ -1,16 +1,6 @@ use super::{home::HomeModel, kana::KanaModel, *}; use crate::helper::rain; -#[cfg(not(target_arch = "wasm32"))] -use ansi_to_tui::IntoText; -#[cfg(not(target_arch = "wasm32"))] -use rascii_art::{render_to, RenderOptions}; - -#[cfg(not(target_arch = "wasm32"))] -use ratatui::text::Text; -#[cfg(target_arch = "wasm32")] -use ratzilla::ratatui::text::Text; - #[derive(Debug, PartialEq, Eq)] enum AppPage { Home(HomeModel), @@ -20,13 +10,9 @@ enum AppPage { #[derive(Debug, PartialEq, Eq)] pub struct App { pub exit: bool, - background_widget: Box>, page: AppPage, previous_height: u16, disable_rain: bool, - pub disable_background: bool, - background_number: usize, - pub background_paths: Vec, } impl Components for App { @@ -36,12 +22,8 @@ impl Components for App { Self { exit: false, page: AppPage::Home(home), - background_widget: Box::new(Text::default()), previous_height: 0, disable_rain: false, - disable_background: false, - background_paths: vec![], - background_number: 0, } } @@ -66,32 +48,6 @@ impl Components for App { return None; } - if msg == Message::Home(HomeMessage::Background) { - match h.background_state { - BackgroundMode::Cycle => { - self.background_number += 1; - self.previous_height = 0; - - if self.background_number + 1 == self.background_paths.len() { - h.key_helper_state = BackgroundMode::Disable - } - - if self.background_number >= self.background_paths.len() { - self.disable_background = true; - self.background_number = 0; - h.background_state = BackgroundMode::Disable; - h.key_helper_state = BackgroundMode::Cycle; - } - } - BackgroundMode::Disable => { - h.background_state = BackgroundMode::Cycle; - self.disable_background = false; - } - } - - return None; - } - if msg == Message::Home(HomeMessage::Up) || msg == Message::Home(HomeMessage::Down) { let response = h.update(msg.clone()); @@ -126,11 +82,6 @@ impl Components for App { } fn view(&mut self, frame: &mut Frame, elapsed: Duration) { - #[cfg(not(target_arch = "wasm32"))] - if !self.disable_background { - self.background(frame); - } - if !self.disable_rain { rain::view(frame, elapsed); } @@ -141,34 +92,3 @@ impl Components for App { } } } - -#[cfg(not(target_arch = "wasm32"))] -impl App { - fn background(&mut self, frame: &mut Frame) { - let actual_height = frame.area().height; - if self.previous_height != actual_height { - self.write_background(actual_height.into()); - self.previous_height = actual_height; - } - - frame.render_widget((*self.background_widget).clone(), frame.area()); - } - - fn write_background(&mut self, height: u32) { - // needed because otherwise the render_to function take a while to overwrite the previous string - let mut buffer = String::new(); - - if !self.background_paths.is_empty() { - render_to( - self.background_paths[self.background_number].clone(), - &mut buffer, - &RenderOptions::new().height(height).colored(true), - ) - .unwrap(); - } else { - buffer = String::from("No asset directory") - } - - self.background_widget = Box::new(buffer.into_text().unwrap().centered()); - } -} diff --git a/kanash-components/src/home.rs b/kanash-components/src/home.rs index cb7c38c..92cf9c0 100644 --- a/kanash-components/src/home.rs +++ b/kanash-components/src/home.rs @@ -26,7 +26,6 @@ pub enum BackgroundMode { pub struct HomeModel { page_list: Vec, state: ListState, - pub background_state: BackgroundMode, pub key_helper_state: BackgroundMode, } @@ -39,7 +38,6 @@ pub enum HomeMessage { Down, RainFx, - Background, } impl Components for HomeModel { @@ -54,7 +52,6 @@ impl Components for HomeModel { "Learn Both".into(), ], state: init_state, - background_state: BackgroundMode::Cycle, key_helper_state: BackgroundMode::Cycle, } } @@ -78,7 +75,6 @@ impl Components for HomeModel { KeyCode::Char('j') | KeyCode::Down => Some(Message::Home(HomeMessage::Down)), KeyCode::Char('k') | KeyCode::Up => Some(Message::Home(HomeMessage::Up)), KeyCode::Char('x') => Some(Message::Home(HomeMessage::RainFx)), - KeyCode::Char('b') => Some(Message::Home(HomeMessage::Background)), _ => None, } } diff --git a/kanash-components/src/lib.rs b/kanash-components/src/lib.rs index 1f18603..3ce3aee 100644 --- a/kanash-components/src/lib.rs +++ b/kanash-components/src/lib.rs @@ -37,7 +37,7 @@ pub use ratzilla::{event::KeyCode, web_sys::console}; use std::time::Duration; -use home::{BackgroundMode, HomeMessage, Mode}; +use home::{HomeMessage, Mode}; use kana::KanaMessage; pub struct ColorPalette; diff --git a/kanash-ratzilla/Cargo.toml b/kanash-ratzilla/Cargo.toml index d4365bb..c98ec55 100644 --- a/kanash-ratzilla/Cargo.toml +++ b/kanash-ratzilla/Cargo.toml @@ -13,7 +13,6 @@ kanash-components = { path = "../kanash-components/" } ratzilla = "0.3.0" tachyonfx = { version = "0.23.0", default-features = false, features = ["wasm"] } tui-big-text = "0.8.1" -wasm-bindgen = "0.2.105" web-time = "1.1.0" [dev-dependencies] diff --git a/kanash/Cargo.toml b/kanash/Cargo.toml index 243a74a..d64c41e 100644 --- a/kanash/Cargo.toml +++ b/kanash/Cargo.toml @@ -11,12 +11,8 @@ keywords = ["ratatui", "learning", "japanese", "TUI"] [dependencies] kanash-components = { path = "../kanash-components/", version = "0.1.6" } ratatui = "0.30.0" -wana_kana = "4.0.0" tachyonfx = "0.23.0" tui-big-text = "0.8.1" -ansi-to-tui = "8.0.1" -rascii_art = "0.4.5" -clap = { version = "4.5.56", features = ["derive"] } [dev-dependencies] crossterm = "0.29.0" diff --git a/kanash/src/main.rs b/kanash/src/main.rs index cc0e14a..e8f9d72 100644 --- a/kanash/src/main.rs +++ b/kanash/src/main.rs @@ -11,18 +11,7 @@ use std::time::{Duration, Instant}; use tachyonfx::{fx, EffectRenderer, Interpolation}; use tui_big_text::{BigText, PixelSize}; -use clap::Parser; - -#[derive(Parser, Debug)] -struct Args { - /// Path to the assets directory - #[arg(short, long)] - path: Option, -} - fn main() { - let arg = Args::parse(); - let mut terminal = ratatui::init(); let mut fade_effect = fx::dissolve((20000, Interpolation::QuadOut)); @@ -60,7 +49,6 @@ fn main() { .areas(bottom); frame.render_widget(p, area); - // crate::components::helper::image::view(frame, "./assets/rezo.png".to_string(), img_area); frame.render_widget(credit, img_area); if start_time.elapsed() > Duration::from_secs(1) { frame.render_effect(&mut fade_effect, area, tachyonfx::Duration::from_millis(33)); @@ -69,13 +57,6 @@ fn main() { } let mut app = App::new(); - if let Some(path) = arg.path { - let assets = std::fs::read_dir(path) - .unwrap() - .map(|entry| entry.unwrap().path().to_str().unwrap().to_string()) - .collect::>(); - app.background_paths = assets; - } // Main app rendering while !app.exit {