diff --git a/Cargo.lock b/Cargo.lock index ceb5179..e4f0067 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,12 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "Inflector" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" + [[package]] name = "ab_glyph" version = "0.2.13" @@ -9,7 +15,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61caed9aec6daeee1ea38ccf5fb225e4f96c1eeead1b4a5c267324a63cf02326" dependencies = [ "ab_glyph_rasterizer", - "owned_ttf_parser 0.14.0", + "owned_ttf_parser", ] [[package]] @@ -32,9 +38,20 @@ checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234" [[package]] name = "ahash" -version = "0.4.7" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "739f4a8db6605981345c5654f3a85b056ce52f37a39d34da03f25bf2151ea16e" +checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +dependencies = [ + "getrandom", + "once_cell", + "version_check", +] + +[[package]] +name = "aliasable" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "250f629c0161ad8107cf89319e990051fae62832fd343083bea452d93e2205fd" [[package]] name = "alsa" @@ -45,7 +62,7 @@ dependencies = [ "alsa-sys", "bitflags", "libc", - "nix 0.20.2", + "nix 0.20.0", ] [[package]] @@ -58,19 +75,6 @@ dependencies = [ "pkg-config", ] -[[package]] -name = "andrew" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c4afb09dd642feec8408e33f92f3ffc4052946f6b20f32fb99c1f58cd4fa7cf" -dependencies = [ - "bitflags", - "rusttype", - "walkdir", - "xdg", - "xml-rs", -] - [[package]] name = "anyhow" version = "1.0.52" @@ -99,12 +103,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "269d0f5e68353a7cab87f81e7c736adc008d279a36ebc6a05dfe01193a89f0c9" [[package]] -name = "ash" -version = "0.31.0" +name = "arrayvec" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c69a8137596e84c22d57f3da1b5de1d4230b1742a710091c85f4d7ce50f00f38" +checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" + +[[package]] +name = "ash" +version = "0.34.0+1.2.203" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0f780da53d0063880d45554306489f09dd8d1bda47688b4a57bc579119356df" dependencies = [ - "libloading 0.6.7", + "libloading", ] [[package]] @@ -159,7 +169,7 @@ dependencies = [ "slab", "socket2", "waker-fn", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -196,7 +206,7 @@ dependencies = [ "libc", "once_cell", "signal-hook", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -229,6 +239,12 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" +[[package]] +name = "base64" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" + [[package]] name = "bindgen" version = "0.56.0" @@ -265,9 +281,9 @@ checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" [[package]] name = "bitflags" -version = "1.2.1" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "block" @@ -297,9 +313,9 @@ checksum = "ad807f2fc2bf185eeb98ff3a901bd46dc5ad58163d0fa4577ba0d25674d71708" [[package]] name = "bumpalo" -version = "3.8.0" +version = "3.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f1e260c3a9040a7c19a12468758f4c16f31a81a1fe087482be9570ec864bb6c" +checksum = "a4a45a46ab1f2412e53d3a0ade76ffad2025804294569aae387231a0cd6e0899" [[package]] name = "bytemuck" @@ -351,12 +367,12 @@ dependencies = [ [[package]] name = "calloop" -version = "0.6.5" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b036167e76041694579972c28cf4877b4f92da222560ddb49008937b6a6727c" +checksum = "bf2eec61efe56aa1e813f5126959296933cf0700030e4314786c48779a66ab82" dependencies = [ "log", - "nix 0.18.0", + "nix 0.22.0", ] [[package]] @@ -412,24 +428,24 @@ checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" [[package]] name = "clang-sys" -version = "1.0.1" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa785e9017cb8e8c8045e3f096b7d1ebc4d7337cceccdca8d678a27f788ac133" +checksum = "fa66045b9cb23c2e9c1520732030608b02ee07e5cfaa5a521ec15ded7fa24c90" dependencies = [ "glob", "libc", - "libloading 0.6.7", + "libloading", ] [[package]] name = "clipboard-win" -version = "4.2.2" +version = "4.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3db8340083d28acb43451166543b98c838299b7e0863621be53a338adceea0ed" +checksum = "1951fb8aa063a2ee18b4b4d217e4aa2ec9cc4f2430482983f607fa10cd36d7aa" dependencies = [ "error-code", "str-buf", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -464,9 +480,9 @@ dependencies = [ [[package]] name = "cmake" -version = "0.1.46" +version = "0.1.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7b858541263efe664aead4a5209a4ae5c5d2811167d4ed4ee0944503f8d2089" +checksum = "e8ad8cef104ac57b68b89df3208164d228503abbdce70f6880ffa3d970e7443a" dependencies = [ "cc", ] @@ -502,6 +518,16 @@ dependencies = [ "objc", ] +[[package]] +name = "codespan-reporting" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" +dependencies = [ + "termcolor", + "unicode-width", +] + [[package]] name = "color_quant" version = "1.1.0" @@ -510,9 +536,9 @@ checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" [[package]] name = "combine" -version = "4.6.2" +version = "4.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2b2f5d0ee456f3928812dfc8c6d9a1d592b98678f6d56db9b0cd2b7bc6c8db5" +checksum = "50b727aacc797f9fc28e355d21f34709ac4fc9adecfe470ad07b8f4464f53062" dependencies = [ "bytes", "memchr", @@ -662,13 +688,13 @@ dependencies = [ "mach", "ndk 0.3.0", "ndk-glue 0.3.0", - "nix 0.20.2", + "nix 0.20.0", "oboe", "parking_lot", "stdweb", "thiserror", "web-sys", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -682,9 +708,9 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ed27e177f16d65f0f0c22a213e17c696ace5dd64b14258b52f9417ccb52db4" +checksum = "e54ea8bc3fb1ee042f5aace6e3c6e025d3874866da222930f70ce62aceba0bfa" dependencies = [ "cfg-if 1.0.0", "crossbeam-utils", @@ -703,9 +729,9 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.5" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec02e091aa634e2c3ada4a392989e7c3116673ef0ac5b72232439094d73b7fd" +checksum = "97242a70df9b89a65d0b6df3c4bf5b9ce03c5b7309019777fbde37e7537f8762" dependencies = [ "cfg-if 1.0.0", "crossbeam-utils", @@ -716,9 +742,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d82cfc11ce7f2c3faef78d8a684447b40d503d9681acebed6cb728d45940c4db" +checksum = "cfcae03edb34f947e64acdb1c33ec169824e20657e9ecb61cef6c8c74dcb8120" dependencies = [ "cfg-if 1.0.0", "lazy_static", @@ -732,13 +758,13 @@ checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" [[package]] name = "d3d12" -version = "0.3.2" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0a60cceb22c7c53035f8980524fdc7f17cf49681a3c154e6757d30afbec6ec4" +checksum = "2daefd788d1e96e0a9d66dee4b828b883509bc3ea9ce30665f04c3246372690c" dependencies = [ "bitflags", - "libloading 0.6.7", - "winapi 0.3.9", + "libloading", + "winapi", ] [[package]] @@ -747,8 +773,18 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d706e75d87e35569db781a9b5e2416cff1236a47ed380831f959382ccd5f858" dependencies = [ - "darling_core", - "darling_macro", + "darling_core 0.10.2", + "darling_macro 0.10.2", +] + +[[package]] +name = "darling" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0d720b8683f8dd83c65155f0530560cba68cd2bf395f6513a483caee57ff7f4" +dependencies = [ + "darling_core 0.13.1", + "darling_macro 0.13.1", ] [[package]] @@ -761,7 +797,21 @@ dependencies = [ "ident_case", "proc-macro2", "quote", - "strsim", + "strsim 0.9.3", + "syn", +] + +[[package]] +name = "darling_core" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a340f241d2ceed1deb47ae36c4144b2707ec7dd0b649f894cb39bb595986324" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim 0.10.0", "syn", ] @@ -771,7 +821,18 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9b5a2f4ac4969822c62224815d069952656cadc7084fdca9751e6d959189b72" dependencies = [ - "darling_core", + "darling_core 0.10.2", + "quote", + "syn", +] + +[[package]] +name = "darling_macro" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72c41b3b7352feb3211a0d743dc5700a4e3b60f51bd2b368892d1e0f9a95f44b" +dependencies = [ + "darling_core 0.13.1", "quote", "syn", ] @@ -794,6 +855,7 @@ dependencies = [ "exoquant", "iced", "iced_futures", + "iced_lazy", "iced_native", "image", "rfd", @@ -801,26 +863,6 @@ dependencies = [ "symphonia", ] -[[package]] -name = "derivative" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "dirs" -version = "3.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30baa043103c9d0c2a57cf537cc2f35623889dc0d405e6c3cccfadbc81c71309" -dependencies = [ - "dirs-sys", -] - [[package]] name = "dirs-next" version = "2.0.0" @@ -831,17 +873,6 @@ dependencies = [ "dirs-sys-next", ] -[[package]] -name = "dirs-sys" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03d86534ed367a67548dc68113a0f5db55432fdfbb6e6f9d77704397d95d5780" -dependencies = [ - "libc", - "redox_users", - "winapi 0.3.9", -] - [[package]] name = "dirs-sys-next" version = "0.1.2" @@ -850,7 +881,7 @@ checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" dependencies = [ "libc", "redox_users", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -859,22 +890,13 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" -[[package]] -name = "dlib" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b11f15d1e3268f140f68d390637d5e76d849782d971ae7063e0da69fe9709a76" -dependencies = [ - "libloading 0.6.7", -] - [[package]] name = "dlib" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac1b7517328c04c2aa68422fc60a41b92208182142ed04a25879c26c8f878794" dependencies = [ - "libloading 0.7.2", + "libloading", ] [[package]] @@ -907,7 +929,7 @@ checksum = "439a1c2ba5611ad3ed731280541d36d2e9c4ac5e7fb818a27b604bdc5a6aa65b" dependencies = [ "lazy_static", "libc", - "winapi 0.3.9", + "winapi", "wio", ] @@ -976,18 +998,21 @@ dependencies = [ "instant", ] -[[package]] -name = "fixedbitset" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37ab347416e802de484e4d03c7316c48f1ecb56574dfd4a46a80f173ce1de04d" - [[package]] name = "float-ord" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7bad48618fdb549078c333a7a8528acb57af271d0433bdecd523eb620628364e" +[[package]] +name = "float_next_after" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fc612c5837986b7104a87a0df74a5460931f1c5274be12f8d0f40aa2f30d632" +dependencies = [ + "num-traits", +] + [[package]] name = "fnv" version = "1.0.7" @@ -1016,7 +1041,7 @@ dependencies = [ "pathfinder_simd", "servo-fontconfig", "walkdir", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1065,22 +1090,6 @@ dependencies = [ "pkg-config", ] -[[package]] -name = "fuchsia-zircon" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" -dependencies = [ - "bitflags", - "fuchsia-zircon-sys", -] - -[[package]] -name = "fuchsia-zircon-sys" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" - [[package]] name = "futures" version = "0.3.19" @@ -1227,172 +1236,25 @@ dependencies = [ [[package]] name = "gethostname" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e692e296bfac1d2533ef168d0b60ff5897b8b70a4009276834014dd8924cc028" +checksum = "4addc164932852d066774c405dbbdb7914742d2b39e39e1a7ca949c856d054d1" dependencies = [ "libc", - "winapi 0.3.9", + "winapi", ] [[package]] name = "getrandom" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753" +checksum = "418d37c8b1d42553c93648be529cb70f920d3baf8ef469b74b9638df426e0b4c" dependencies = [ "cfg-if 1.0.0", "libc", "wasi", ] -[[package]] -name = "gfx-auxil" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7b33ecf067f2117668d91c9b0f2e5f223ebd1ffec314caa2f3de27bb580186d" -dependencies = [ - "fxhash", - "gfx-hal", - "spirv_cross", -] - -[[package]] -name = "gfx-backend-dx11" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f851d03c2e8f117e3702bf41201a4fafa447d5cb1276d5375870ae7573d069dd" -dependencies = [ - "arrayvec 0.5.2", - "bitflags", - "gfx-auxil", - "gfx-hal", - "libloading 0.6.7", - "log", - "parking_lot", - "range-alloc", - "raw-window-handle 0.3.4", - "smallvec", - "spirv_cross", - "thunderdome", - "winapi 0.3.9", - "wio", -] - -[[package]] -name = "gfx-backend-dx12" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5032d716a2a5f4dafb4675a794c5dc32081af8fbc7303c93ad93ff5413c6559f" -dependencies = [ - "arrayvec 0.5.2", - "bit-set", - "bitflags", - "d3d12", - "gfx-auxil", - "gfx-hal", - "log", - "parking_lot", - "range-alloc", - "raw-window-handle 0.3.4", - "smallvec", - "spirv_cross", - "thunderdome", - "winapi 0.3.9", -] - -[[package]] -name = "gfx-backend-empty" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f07ef26a65954cfdd7b4c587f485100d1bb3b0bd6a51b02d817d6c87cca7a91" -dependencies = [ - "gfx-hal", - "log", - "raw-window-handle 0.3.4", -] - -[[package]] -name = "gfx-backend-gl" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6717c50ab601efe4a669bfb44db615e3888695ac8263222aeaa702642b9fbc2" -dependencies = [ - "arrayvec 0.5.2", - "bitflags", - "gfx-auxil", - "gfx-hal", - "glow", - "js-sys", - "khronos-egl", - "libloading 0.6.7", - "log", - "naga", - "parking_lot", - "raw-window-handle 0.3.4", - "spirv_cross", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "gfx-backend-metal" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dc54b456ece69ef49f8893269ebf24ac70969ed34ba2719c3f3abcc8fbff14e" -dependencies = [ - "arrayvec 0.5.2", - "bitflags", - "block", - "cocoa-foundation", - "copyless", - "foreign-types", - "gfx-auxil", - "gfx-hal", - "log", - "metal", - "naga", - "objc", - "parking_lot", - "range-alloc", - "raw-window-handle 0.3.4", - "spirv_cross", - "storage-map", -] - -[[package]] -name = "gfx-backend-vulkan" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dabe88b1a5c91e0f969b441cc57e70364858066e4ba937deeb62065654ef9bd9" -dependencies = [ - "arrayvec 0.5.2", - "ash", - "byteorder", - "core-graphics-types", - "gfx-hal", - "inplace_it", - "log", - "naga", - "objc", - "parking_lot", - "raw-window-handle 0.3.4", - "smallvec", - "winapi 0.3.9", -] - -[[package]] -name = "gfx-hal" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1d9cc8d3b573dda62d0baca4f02e0209786e22c562caff001d77c389008781d" -dependencies = [ - "bitflags", - "naga", - "raw-window-handle 0.3.4", - "thiserror", -] - [[package]] name = "gif" version = "0.11.3" @@ -1413,7 +1275,7 @@ dependencies = [ "gobject-sys", "libc", "system-deps", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1443,9 +1305,9 @@ checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" [[package]] name = "glow" -version = "0.7.2" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "072136d2c3783f3a92f131acb227bc806d3886278e2a4dc1e9990ec89ef9e70b" +checksum = "d8bd5877156a19b8ac83a29b2306fe20537429d318f3ff0a1a2119f8d9c61919" dependencies = [ "js-sys", "slotmap", @@ -1505,13 +1367,12 @@ dependencies = [ [[package]] name = "gpu-alloc" -version = "0.3.2" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "739e1e53f1e4b5093342e753bcb868e53d28e0c69da9c9ce9632455bfa37ba30" +checksum = "0e64cbb8d36508d3e19da95e56e196a84f674fc190881f2cc010000798838aa6" dependencies = [ "bitflags", "gpu-alloc-types", - "tracing", ] [[package]] @@ -1525,14 +1386,13 @@ dependencies = [ [[package]] name = "gpu-descriptor" -version = "0.1.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8a70f1e87a3840ed6a3e99e02c2b861e4dbdf26f0d07e38f42ea5aff46cfce2" +checksum = "a538f217be4d405ff4719a283ca68323cc2384003eca5baaa87501e821c81dda" dependencies = [ "bitflags", "gpu-descriptor-types", - "hashbrown 0.9.1", - "tracing", + "hashbrown 0.11.2", ] [[package]] @@ -1577,15 +1437,15 @@ name = "hashbrown" version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" -dependencies = [ - "ahash", -] [[package]] name = "hashbrown" version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +dependencies = [ + "ahash", +] [[package]] name = "heck" @@ -1605,11 +1465,16 @@ dependencies = [ "libc", ] +[[package]] +name = "hexf-parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df" + [[package]] name = "iced" version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05279cf5a83b960a1a01cff455fede8a33df720f3ff4fc9d33be79fcea9d2466" +source = "git+https://github.com/iced-rs/iced.git#b7bc169120d3447ead238e974007027a5152d341" dependencies = [ "iced_core", "iced_futures", @@ -1622,14 +1487,15 @@ dependencies = [ [[package]] name = "iced_core" version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fafe4a5eeee85876f3bad347338456e0f3e7fcdc2381a5ce6c3ba2a60dd769bf" +source = "git+https://github.com/iced-rs/iced.git#b7bc169120d3447ead238e974007027a5152d341" +dependencies = [ + "bitflags", +] [[package]] name = "iced_futures" version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a89fdde2cb9c5807d23f40230297122e480428c660ad7d0373e625cd0725afa1" +source = "git+https://github.com/iced-rs/iced.git#b7bc169120d3447ead238e974007027a5152d341" dependencies = [ "futures", "log", @@ -1640,8 +1506,7 @@ dependencies = [ [[package]] name = "iced_graphics" version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7e977de2685d4c0671e6d4b6cab5edab432295507552a746cdb759c0a8dc1f5" +source = "git+https://github.com/iced-rs/iced.git#b7bc169120d3447ead238e974007027a5152d341" dependencies = [ "bytemuck", "font-kit", @@ -1649,18 +1514,27 @@ dependencies = [ "iced_native", "iced_style", "lyon", - "raw-window-handle 0.3.4", + "raw-window-handle 0.4.2", "thiserror", ] +[[package]] +name = "iced_lazy" +version = "0.1.0" +source = "git+https://github.com/iced-rs/iced.git#b7bc169120d3447ead238e974007027a5152d341" +dependencies = [ + "iced_native", + "ouroboros", +] + [[package]] name = "iced_native" version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35030736d160e88b79edddee7ab664a2f3ac6b4046608e298b4c853030e3cc06" +source = "git+https://github.com/iced-rs/iced.git#b7bc169120d3447ead238e974007027a5152d341" dependencies = [ "iced_core", "iced_futures", + "iced_style", "num-traits", "twox-hash", "unicode-segmentation", @@ -1669,8 +1543,7 @@ dependencies = [ [[package]] name = "iced_style" version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca93066a80759bfb31f2900d45ca4cf7500b88611607da5e380143badfcd7837" +source = "git+https://github.com/iced-rs/iced.git#b7bc169120d3447ead238e974007027a5152d341" dependencies = [ "iced_core", ] @@ -1678,9 +1551,9 @@ dependencies = [ [[package]] name = "iced_web" version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c57300b109735abcee7aed27101eb1b29016ba07ec50b6944530982231397ad" +source = "git+https://github.com/iced-rs/iced.git#b7bc169120d3447ead238e974007027a5152d341" dependencies = [ + "base64", "dodrio", "iced_core", "iced_futures", @@ -1695,9 +1568,9 @@ dependencies = [ [[package]] name = "iced_wgpu" version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82aca9978311350fab02132bc0f5c66cd89d3165e16eae22d42ab0acec529ae9" +source = "git+https://github.com/iced-rs/iced.git#b7bc169120d3447ead238e974007027a5152d341" dependencies = [ + "bitflags", "bytemuck", "futures", "glyph_brush", @@ -1705,8 +1578,9 @@ dependencies = [ "iced_graphics", "iced_native", "image", + "kamadak-exif", "log", - "raw-window-handle 0.3.4", + "raw-window-handle 0.4.2", "wgpu", "wgpu_glyph", ] @@ -1714,15 +1588,14 @@ dependencies = [ [[package]] name = "iced_winit" version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6bd9fc4bb0e18949a905e3fe36aa4f7e85375ab3c4a83610cf7f08b5ed106f2" +source = "git+https://github.com/iced-rs/iced.git#b7bc169120d3447ead238e974007027a5152d341" dependencies = [ "iced_futures", "iced_graphics", "iced_native", "log", "thiserror", - "winapi 0.3.9", + "winapi", "window_clipboard", "winit", ] @@ -1765,12 +1638,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.7.0" +version = "1.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc633605454125dec4b66843673f01c7df2b89479b32e0ed634e43a91cff62a5" +checksum = "824845a0bf897a9042383849b02c1bc219c2383772efcd5c6f9766fa4b81aef3" dependencies = [ "autocfg", - "hashbrown 0.11.2", + "hashbrown 0.9.1", ] [[package]] @@ -1786,15 +1659,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ "cfg-if 1.0.0", -] - -[[package]] -name = "iovec" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" -dependencies = [ - "libc", + "js-sys", + "wasm-bindgen", + "web-sys", ] [[package]] @@ -1846,31 +1713,30 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.46" +version = "0.3.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf3d7383929f7c9c7c2d0fa596f325832df98c3704f2c60553080f7127a58175" +checksum = "7cc9ffccd38c451a86bf13657df244e9c3f37493cce8e5e21e940963777acc84" dependencies = [ "wasm-bindgen", ] [[package]] -name = "kernel32-sys" -version = "0.2.2" +name = "kamadak-exif" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" +checksum = "70494964492bf8e491eb3951c5d70c9627eb7100ede6cc56d748b9a3f302cfb6" dependencies = [ - "winapi 0.2.8", - "winapi-build", + "mutate_once", ] [[package]] name = "khronos-egl" -version = "3.0.2" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b19cc4a81304db2a0ad69740e83cdc3a9364e3f9bd6d88a87288a4c2deec927b" +checksum = "8c2352bd1d0bceb871cb9d40f24360c8133c11d7486b68b5381c1dd1a32015e3" dependencies = [ "libc", - "libloading 0.6.7", + "libloading", ] [[package]] @@ -1893,22 +1759,12 @@ checksum = "1b03d17f364a3a042d5e5d46b053bbbf82c92c9430c592dd4c064dc6ee997125" [[package]] name = "libloading" -version = "0.6.7" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "351a32417a12d5f7e82c368a66781e307834dae04c6ce0cd4456d52989229883" +checksum = "efbc0f03f9a775e9f6aed295c6a1ba2253c5757a9e03d55c6caa46a681abcddd" dependencies = [ "cfg-if 1.0.0", - "winapi 0.3.9", -] - -[[package]] -name = "libloading" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afe203d669ec979b7128619bae5a63b7b42e9203c1b29146079ee05e2f604b52" -dependencies = [ - "cfg-if 1.0.0", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1943,9 +1799,9 @@ checksum = "b3bd0dd2cd90571056fdb71f6275fada10131182f84899f4b2a916e565d81d86" [[package]] name = "lyon" -version = "0.16.2" +version = "0.17.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d083e12e9e22298eec27751ec4a0975abac5873a3b0dcdbbecc608d333f0e9" +checksum = "cf0510ed5e3e2fb80f3db2061ef5ca92d87bfda1a624bb1eacf3bd50226e4cbb" dependencies = [ "lyon_algorithms", "lyon_tessellation", @@ -1953,9 +1809,9 @@ dependencies = [ [[package]] name = "lyon_algorithms" -version = "0.16.0" +version = "0.17.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11033936a5e9d7bf35b7ba71a19f8b6bc838f3206304175dc5b3524ca16672a8" +checksum = "8037f716541ba0d84d3de05c0069f8068baf73990d55980558b84d944c8a244a" dependencies = [ "lyon_path", "sid", @@ -1963,9 +1819,9 @@ dependencies = [ [[package]] name = "lyon_geom" -version = "0.16.2" +version = "0.17.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce4e12203c428a58200b8cf1c0a3aad1cda907008ea11310bb3729593e5f933" +checksum = "ce99ce77c22bfd8f39a95b9c749dffbfc3e2491ea30c874764c801a8b1485489" dependencies = [ "arrayvec 0.5.2", "euclid", @@ -1974,22 +1830,21 @@ dependencies = [ [[package]] name = "lyon_path" -version = "0.16.2" +version = "0.17.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "243c71fff16677ecde2d38794a0253a8f0417cebaacc6390677c30733831d8cb" +checksum = "5b0a59fdf767ca0d887aa61d1b48d4bbf6a124c1a45503593f7d38ab945bfbc0" dependencies = [ "lyon_geom", ] [[package]] name = "lyon_tessellation" -version = "0.16.2" +version = "0.17.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ecf3d769bec66396957d7c5cb91f998c4182e53fdc96cc435b6ebcd46a63cd9" +checksum = "7230e08dd0638048e46f387f255dbe7a7344a3e6705beab53242b5af25635760" dependencies = [ - "arrayvec 0.5.2", + "float_next_after", "lyon_path", - "sid", ] [[package]] @@ -2022,15 +1877,6 @@ version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" -[[package]] -name = "memmap2" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b70ca2a6103ac8b665dc150b142ef0e4e89df640c9e6cf295d189c3caebe5a" -dependencies = [ - "libc", -] - [[package]] name = "memmap2" version = "0.3.1" @@ -2051,13 +1897,13 @@ dependencies = [ [[package]] name = "metal" -version = "0.21.0" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4598d719460ade24c7d91f335daf055bf2a7eec030728ce751814c50cdd6a26c" +checksum = "e0514f491f4cc03632ab399ee01e2c1c1b12d3e1cf2d667c1ff5f87d6dcd2084" dependencies = [ "bitflags", "block", - "cocoa-foundation", + "core-graphics-types", "foreign-types", "log", "objc", @@ -2090,72 +1936,47 @@ dependencies = [ [[package]] name = "mio" -version = "0.6.23" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4afd66f5b91bf2a3bc13fad0e21caedac168ca4c707504e75585648ae80e4cc4" +checksum = "ba272f85fa0b41fc91872be579b3bbe0f56b792aa361a380eb669469f68dafb2" dependencies = [ - "cfg-if 0.1.10", - "fuchsia-zircon", - "fuchsia-zircon-sys", - "iovec", - "kernel32-sys", "libc", "log", "miow", - "net2", - "slab", - "winapi 0.2.8", -] - -[[package]] -name = "mio-extras" -version = "2.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19" -dependencies = [ - "lazycell", - "log", - "mio", - "slab", + "ntapi", + "winapi", ] [[package]] name = "miow" -version = "0.2.2" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebd808424166322d4a38da87083bfddd3ac4c131334ed55856112eb06d46944d" +checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" dependencies = [ - "kernel32-sys", - "net2", - "winapi 0.2.8", - "ws2_32-sys", + "winapi", ] +[[package]] +name = "mutate_once" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16cf681a23b4d0a43fc35024c176437f9dcd818db34e0f42ab456a0ee5ad497b" + [[package]] name = "naga" -version = "0.3.2" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05089b2acdf0e6a962cdbf5e328402345a27f59fcde1a59fe97a73e8149d416f" +checksum = "1dfa3912b150e6bfb38a7e94d3f53b950a456a905bb8858590af02006e2e78be" dependencies = [ "bit-set", "bitflags", - "fxhash", + "codespan-reporting", + "hexf-parse", + "indexmap", "log", "num-traits", - "petgraph", - "spirv_headers", - "thiserror", -] - -[[package]] -name = "ndk" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5eb167c1febed0a496639034d0c76b3b74263636045db5489eee52143c246e73" -dependencies = [ - "jni-sys", - "ndk-sys", - "num_enum 0.4.3", + "rustc-hash", + "spirv", "thiserror", ] @@ -2166,36 +1987,35 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8794322172319b972f528bf90c6b467be0079f1fa82780ffb431088e741a73ab" dependencies = [ "jni-sys", - "ndk-sys", - "num_enum 0.5.6", + "ndk-sys 0.2.2", + "num_enum", "thiserror", ] [[package]] name = "ndk" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d64d6af06fde0e527b1ba5c7b79a6cc89cfc46325b0b2887dffe8f70197e0c3c" +checksum = "96d868f654c72e75f8687572699cdabe755f03effbb62542768e995d5b8d699d" dependencies = [ "bitflags", "jni-sys", - "ndk-sys", - "num_enum 0.5.6", + "ndk-sys 0.2.2", + "num_enum", "thiserror", ] [[package]] -name = "ndk-glue" -version = "0.2.1" +name = "ndk" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdf399b8b7a39c6fb153c4ec32c72fd5fe789df24a647f229c239aa7adb15241" +checksum = "2032c77e030ddee34a6787a64166008da93f6a352b629261d0fee232b8742dd4" dependencies = [ - "lazy_static", - "libc", - "log", - "ndk 0.2.1", - "ndk-macro", - "ndk-sys", + "bitflags", + "jni-sys", + "ndk-sys 0.3.0", + "num_enum", + "thiserror", ] [[package]] @@ -2208,22 +2028,36 @@ dependencies = [ "libc", "log", "ndk 0.3.0", - "ndk-macro", - "ndk-sys", + "ndk-macro 0.2.0", + "ndk-sys 0.2.2", ] [[package]] name = "ndk-glue" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3e9e94628f24e7a3cb5b96a2dc5683acd9230bf11991c2a1677b87695138420" +checksum = "fc291b8de2095cba8dab7cf381bf582ff4c17a09acf854c32e46545b08085d28" dependencies = [ "lazy_static", "libc", "log", - "ndk 0.4.0", - "ndk-macro", - "ndk-sys", + "ndk 0.5.0", + "ndk-macro 0.3.0", + "ndk-sys 0.2.2", +] + +[[package]] +name = "ndk-glue" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04c0d14b0858eb9962a5dac30b809b19f19da7e4547d64af2b0bb051d2e55d79" +dependencies = [ + "lazy_static", + "libc", + "log", + "ndk 0.6.0", + "ndk-macro 0.3.0", + "ndk-sys 0.3.0", ] [[package]] @@ -2232,13 +2066,26 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05d1c6307dc424d0f65b9b06e94f88248e6305726b14729fd67a5e47b2dc481d" dependencies = [ - "darling", + "darling 0.10.2", "proc-macro-crate 0.1.5", "proc-macro2", "quote", "syn", ] +[[package]] +name = "ndk-macro" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0df7ac00c4672f9d5aece54ee3347520b7e20f158656c7db2e6de01902eb7a6c" +dependencies = [ + "darling 0.13.1", + "proc-macro-crate 1.1.0", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "ndk-sys" version = "0.2.2" @@ -2246,46 +2093,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1bcdd74c20ad5d95aacd60ef9ba40fdf77f767051040541df557b7a9b2a2121" [[package]] -name = "net2" -version = "0.2.37" +name = "ndk-sys" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "391630d12b68002ae1e25e8f974306474966550ad82dac6886fb8910c19568ae" +checksum = "6e5a6ae77c8ee183dcbbba6150e2e6b9f3f4196a7666c02a715a95692ec1fa97" dependencies = [ - "cfg-if 0.1.10", - "libc", - "winapi 0.3.9", + "jni-sys", ] [[package]] name = "nix" -version = "0.18.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83450fe6a6142ddd95fb064b746083fc4ef1705fe81f64a64e1d4b39f54a1055" -dependencies = [ - "bitflags", - "cc", - "cfg-if 0.1.10", - "libc", -] - -[[package]] -name = "nix" -version = "0.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5e06129fb611568ef4e868c14b326274959aa70ff7776e9d55323531c374945" +checksum = "fa9b4819da1bc61c0ea48b63b7bc8604064dd43013e7cc325df098d49cd7c18a" dependencies = [ "bitflags", "cc", "cfg-if 1.0.0", "libc", - "memoffset", ] [[package]] name = "nix" -version = "0.22.2" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3bb9a13fa32bc5aeb64150cd3f32d6cf4c748f8f8a417cce5d2eb976a8370ba" +checksum = "cf1e25ee6b412c2a1e3fcb6a4499a5c1bfe7f43e014bdce9a6b6666e5aa2d187" dependencies = [ "bitflags", "cc", @@ -2315,6 +2147,15 @@ dependencies = [ "version_check", ] +[[package]] +name = "ntapi" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" +dependencies = [ + "winapi", +] + [[package]] name = "num-derive" version = "0.3.3" @@ -2377,35 +2218,13 @@ dependencies = [ "libc", ] -[[package]] -name = "num_enum" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca565a7df06f3d4b485494f25ba05da1435950f4dc263440eda7a6fa9b8e36e4" -dependencies = [ - "derivative", - "num_enum_derive 0.4.3", -] - [[package]] name = "num_enum" version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "720d3ea1055e4e4574c0c0b0f8c3fd4f24c4cdaf465948206dea090b57b526ad" dependencies = [ - "num_enum_derive 0.5.6", -] - -[[package]] -name = "num_enum_derive" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffa5a33ddddfee04c0283a7653987d634e880347e96b5b2ed64de07efb59db9d" -dependencies = [ - "proc-macro-crate 0.1.5", - "proc-macro2", - "quote", - "syn", + "num_enum_derive", ] [[package]] @@ -2461,13 +2280,13 @@ dependencies = [ [[package]] name = "oboe" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e15e22bc67e047fe342a32ecba55f555e3be6166b04dd157cd0f803dfa9f48e1" +checksum = "2463c8f2e19b4e0d0710a21f8e4011501ff28db1c95d7a5482a553b2100502d2" dependencies = [ "jni", - "ndk 0.4.0", - "ndk-glue 0.4.0", + "ndk 0.6.0", + "ndk-glue 0.6.0", "num-derive", "num-traits", "oboe-sys", @@ -2475,9 +2294,9 @@ dependencies = [ [[package]] name = "oboe-sys" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "338142ae5ab0aaedc8275aa8f67f460e43ae0fca76a695a742d56da0a269eadc" +checksum = "3370abb7372ed744232c12954d920d1a40f1c4686de9e79e800021ef492294bd" dependencies = [ "cc", ] @@ -2490,20 +2309,35 @@ checksum = "da32515d9f6e6e489d7bc9d84c71b060db7247dc035bbe44eac88cf87486d8d5" [[package]] name = "ordered-float" -version = "2.8.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97c9d06878b3a851e8026ef94bf7fef9ba93062cd412601da4d9cf369b1cc62d" +checksum = "7940cf2ca942593318d07fcf2596cdca60a85c9e7fab408a5e21a4f9dcd40d87" dependencies = [ "num-traits", ] [[package]] -name = "owned_ttf_parser" -version = "0.6.0" +name = "ouroboros" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f923fb806c46266c02ab4a5b239735c144bdeda724a50ed058e5226f594cde3" +checksum = "f357ef82d1b4db66fbed0b8d542cbd3c22d0bf5b393b3c257b9ba4568e70c9c3" dependencies = [ - "ttf-parser 0.6.2", + "aliasable", + "ouroboros_macro", + "stable_deref_trait", +] + +[[package]] +name = "ouroboros_macro" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44a0b52c2cbaef7dffa5fec1a43274afe8bd2a644fa9fc50a9ef4ff0269b1257" +dependencies = [ + "Inflector", + "proc-macro-error", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -2512,7 +2346,7 @@ version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ef05f2882a8b3e7acc10c153ade2631f7bfc8ce00d2bf3fb8f4e9d2ae6ea5c3" dependencies = [ - "ttf-parser 0.14.0", + "ttf-parser", ] [[package]] @@ -2555,7 +2389,7 @@ dependencies = [ "libc", "redox_syscall", "smallvec", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -2598,21 +2432,11 @@ dependencies = [ "ucd-trie", ] -[[package]] -name = "petgraph" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "467d164a6de56270bd7c4d070df81d07beace25012d5103ced4e9ff08d6afdb7" -dependencies = [ - "fixedbitset", - "indexmap", -] - [[package]] name = "pin-project-lite" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d31d11c69a6b52a174b42bdc0c30e5e11670f90788b2c471c31c1d17d449443" +checksum = "e280fbe77cc62c91527259e9442153f4688736748d24660126286329742b4c6c" [[package]] name = "pin-utils" @@ -2648,7 +2472,7 @@ dependencies = [ "libc", "log", "wepoll-ffi", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -2676,6 +2500,30 @@ dependencies = [ "toml", ] +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + [[package]] name = "proc-macro2" version = "1.0.36" @@ -2685,6 +2533,12 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "profiling" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9145ac0af1d93c638c98c40cf7d25665f427b2a44ad0a99b1dccf3e2f25bb987" + [[package]] name = "quote" version = "1.0.14" @@ -2818,6 +2672,12 @@ version = "0.6.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" +[[package]] +name = "renderdoc-sys" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1382d1f0a252c4bf97dc20d979a2fdd05b024acd7c2ed0f7595d7817666a157" + [[package]] name = "rfd" version = "0.6.3" @@ -2864,16 +2724,6 @@ dependencies = [ "semver", ] -[[package]] -name = "rusttype" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc7c727aded0be18c5b80c1640eae0ac8e396abf6fa8477d96cb37d18ee5ec59" -dependencies = [ - "ab_glyph_rasterizer", - "owned_ttf_parser 0.6.0", -] - [[package]] name = "same-file" version = "1.0.6" @@ -2921,9 +2771,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.132" +version = "1.0.133" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b9875c23cf305cd1fd7eb77234cbb705f21ea6a72c637a5c6db5fe4b8e7f008" +checksum = "97565067517b60e2d1ea8b268e59ce036de907ac523ad83a0475da04e818989a" [[package]] name = "servo-fontconfig" @@ -2988,34 +2838,18 @@ checksum = "9def91fd1e018fe007022791f865d0ccc9b3a0d5001e01aabb8b40e46000afb5" [[package]] name = "slotmap" -version = "0.4.3" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bf34684c5767b87de9119790e92e9a1d60056be2ceeaf16a8e6ef13082aeab1" +checksum = "e1e08e261d0e8f5c43123b7adf3e4ca1690d655377ac93a03b2c9d3e98de1342" +dependencies = [ + "version_check", +] [[package]] name = "smallvec" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ecab6c735a6bb4139c0caafd0cc3635748bbb3acf4550e8138122099251f309" - -[[package]] -name = "smithay-client-toolkit" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4750c76fd5d3ac95fa3ed80fe667d6a3d8590a960e5b575b98eea93339a80b80" -dependencies = [ - "andrew", - "bitflags", - "calloop", - "dlib 0.4.2", - "lazy_static", - "log", - "memmap2 0.1.0", - "nix 0.18.0", - "wayland-client 0.28.6", - "wayland-cursor 0.28.6", - "wayland-protocols 0.28.6", -] +checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83" [[package]] name = "smithay-client-toolkit" @@ -3024,15 +2858,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1325f292209cee78d5035530932422a30aa4c8fda1a16593ac083c1de211e68a" dependencies = [ "bitflags", - "dlib 0.5.0", + "calloop", + "dlib", "lazy_static", "log", - "memmap2 0.3.1", - "nix 0.22.2", + "memmap2", + "nix 0.22.0", "pkg-config", - "wayland-client 0.29.1", - "wayland-cursor 0.29.1", - "wayland-protocols 0.29.1", + "wayland-client", + "wayland-cursor", + "wayland-protocols", ] [[package]] @@ -3041,8 +2876,8 @@ version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "610b551bd25378bfd2b8e7a0fcbd83d427e8f2f6a40c47ae0f70688e9949dd55" dependencies = [ - "smithay-client-toolkit 0.15.3", - "wayland-client 0.29.1", + "smithay-client-toolkit", + "wayland-client", ] [[package]] @@ -3070,30 +2905,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5dc90fe6c7be1a323296982db1836d1ea9e47b6839496dde9a541bc496df3516" dependencies = [ "libc", - "winapi 0.3.9", + "winapi", ] [[package]] -name = "spirv_cross" -version = "0.23.1" +name = "spirv" +version = "0.2.0+1.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60647fadbf83c4a72f0d7ea67a7ca3a81835cf442b8deae5c134c3e0055b2e14" -dependencies = [ - "cc", - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "spirv_headers" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f5b132530b1ac069df335577e3581765995cba5a13995cdbbdbc8fb057c532c" +checksum = "246bfa38fe3db3f1dfc8ca5a2cdeb7348c78be2112740cc0ec8ef18b6d94f830" dependencies = [ "bitflags", "num-traits", ] +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "static_assertions" version = "1.1.0" @@ -3106,15 +2936,6 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef5430c8e36b713e13b48a9f709cc21e046723fe44ce34587b73a830203b533e" -[[package]] -name = "storage-map" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418bb14643aa55a7841d5303f72cf512cfb323b8cc221d51580500a1ca75206c" -dependencies = [ - "lock_api", -] - [[package]] name = "str-buf" version = "1.0.5" @@ -3127,6 +2948,12 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c" +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + [[package]] name = "strum" version = "0.21.0" @@ -3287,9 +3114,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.65" +version = "1.0.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3a1d708c221c5a612956ef9f75b37e454e88d1f7b899fbd3a18d4252012d663" +checksum = "a684ac3dcd8913827e18cd09a68384ee66c1de24157e3c556c9ab16d85695fb7" dependencies = [ "proc-macro2", "quote", @@ -3314,6 +3141,15 @@ dependencies = [ "version-compare", ] +[[package]] +name = "termcolor" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4" +dependencies = [ + "winapi-util", +] + [[package]] name = "thiserror" version = "1.0.30" @@ -3334,12 +3170,6 @@ dependencies = [ "syn", ] -[[package]] -name = "thunderdome" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7572415bd688d401c52f6e36f4c8e805b9ae1622619303b9fa835d531db0acae" - [[package]] name = "tiff" version = "0.6.1" @@ -3375,44 +3205,6 @@ dependencies = [ "serde", ] -[[package]] -name = "tracing" -version = "0.1.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "375a639232caf30edfc78e8d89b2d4c375515393e7af7e16f01cd96917fb2105" -dependencies = [ - "cfg-if 1.0.0", - "pin-project-lite", - "tracing-attributes", - "tracing-core", -] - -[[package]] -name = "tracing-attributes" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f480b8f81512e825f337ad51e94c1eb5d3bbdf2b363dcd01e2b19a9ffe3f8e" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "tracing-core" -version = "0.1.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f4ed65637b8390770814083d20756f87bfa2c21bf2f110babdc5438351746e4" -dependencies = [ - "lazy_static", -] - -[[package]] -name = "ttf-parser" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e5d7cd7ab3e47dda6e56542f4bbf3824c15234958c6e1bd6aaa347e93499fdc" - [[package]] name = "ttf-parser" version = "0.14.0" @@ -3457,6 +3249,12 @@ version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8895849a949e7845e06bd6dc1aa51731a103c42707010a5b591c0038fb73385b" +[[package]] +name = "unicode-width" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" + [[package]] name = "unicode-xid" version = "0.2.2" @@ -3500,7 +3298,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" dependencies = [ "same-file", - "winapi 0.3.9", + "winapi", "winapi-util", ] @@ -3512,9 +3310,9 @@ checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" [[package]] name = "wasm-bindgen" -version = "0.2.69" +version = "0.2.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cd364751395ca0f68cafb17666eee36b63077fb5ecd972bbcd74c90c4bf736e" +checksum = "632f73e236b219150ea279196e54e610f5dbafa5d61786303d4da54f84e47fce" dependencies = [ "cfg-if 1.0.0", "wasm-bindgen-macro", @@ -3522,11 +3320,11 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.69" +version = "0.2.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1114f89ab1f4106e5b55e688b828c0ab0ea593a1ea7c094b141b14cbaaec2d62" +checksum = "a317bf8f9fba2476b4b2c85ef4c4af8ff39c3c7f0cdfeed4f82c34a880aa837b" dependencies = [ - "bumpalo 3.8.0", + "bumpalo 3.9.1", "lazy_static", "log", "proc-macro2", @@ -3537,9 +3335,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.19" +version = "0.4.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fe9756085a84584ee9457a002b7cdfe0bfff169f45d2591d8be1345a6780e35" +checksum = "8e8d7523cb1f2a4c96c1317ca690031b714a51cc14e05f712446691f413f5d39" dependencies = [ "cfg-if 1.0.0", "js-sys", @@ -3549,9 +3347,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.69" +version = "0.2.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6ac8995ead1f084a8dea1e65f194d0973800c7f571f6edd70adf06ecf77084" +checksum = "d56146e7c495528bf6587663bea13a8eb588d39b36b679d83972e1a2dbbdacf9" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3559,9 +3357,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.69" +version = "0.2.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5a48c72f299d80557c7c62e37e7225369ecc0c963964059509fbafe917c7549" +checksum = "7803e0eea25835f8abdc585cd3021b3deb11543c6fe226dcd30b228857c5c5ab" dependencies = [ "proc-macro2", "quote", @@ -3572,128 +3370,66 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.69" +version = "0.2.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e7811dd7f9398f14cc76efd356f98f03aa30419dea46aa810d71e819fc97158" +checksum = "0237232789cf037d5480773fe568aac745bfe2afbc11a863e97901780a6b47cc" [[package]] name = "wayland-client" -version = "0.28.6" +version = "0.29.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3ab332350e502f159382201394a78e3cc12d0f04db863429260164ea40e0355" +checksum = "91223460e73257f697d9e23d401279123d36039a3f7a449e983f123292d4458f" dependencies = [ "bitflags", "downcast-rs", "libc", - "nix 0.20.2", + "nix 0.22.0", "scoped-tls", - "wayland-commons 0.28.6", - "wayland-scanner 0.28.6", - "wayland-sys 0.28.6", -] - -[[package]] -name = "wayland-client" -version = "0.29.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9108ec1c37f4774d0c2937ba1a6c23d1786b2152c4a13bd9fdb20e42d16e8841" -dependencies = [ - "bitflags", - "downcast-rs", - "libc", - "nix 0.22.2", - "scoped-tls", - "wayland-commons 0.29.1", - "wayland-scanner 0.29.1", - "wayland-sys 0.29.1", + "wayland-commons", + "wayland-scanner", + "wayland-sys", ] [[package]] name = "wayland-commons" -version = "0.28.6" +version = "0.29.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21817947c7011bbd0a27e11b17b337bfd022e8544b071a2641232047966fbda" +checksum = "94f6e5e340d7c13490eca867898c4cec5af56c27a5ffe5c80c6fc4708e22d33e" dependencies = [ - "nix 0.20.2", + "nix 0.22.0", "once_cell", "smallvec", - "wayland-sys 0.28.6", -] - -[[package]] -name = "wayland-commons" -version = "0.29.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "265ef51b3b3e5c9ef098f10425c39624663f459c3821dcaacc4748be975f1beb" -dependencies = [ - "nix 0.22.2", - "once_cell", - "smallvec", - "wayland-sys 0.29.1", + "wayland-sys", ] [[package]] name = "wayland-cursor" -version = "0.28.6" +version = "0.29.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be610084edd1586d45e7bdd275fe345c7c1873598caa464c4fb835dee70fa65a" +checksum = "c52758f13d5e7861fc83d942d3d99bf270c83269575e52ac29e5b73cb956a6bd" dependencies = [ - "nix 0.20.2", - "wayland-client 0.28.6", - "xcursor", -] - -[[package]] -name = "wayland-cursor" -version = "0.29.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c19bb6628daf4097e58b7911481e8371e13318d5a60894779901bd3267407a7" -dependencies = [ - "nix 0.22.2", - "wayland-client 0.29.1", + "nix 0.22.0", + "wayland-client", "xcursor", ] [[package]] name = "wayland-protocols" -version = "0.28.6" +version = "0.29.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "286620ea4d803bacf61fa087a4242ee316693099ee5a140796aaba02b29f861f" +checksum = "60147ae23303402e41fe034f74fb2c35ad0780ee88a1c40ac09a3be1e7465741" dependencies = [ "bitflags", - "wayland-client 0.28.6", - "wayland-commons 0.28.6", - "wayland-scanner 0.28.6", -] - -[[package]] -name = "wayland-protocols" -version = "0.29.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b3b6f1dc0193072ef4eadcb144da30d58c1f2895516c063804d213310703c8e" -dependencies = [ - "bitflags", - "wayland-client 0.29.1", - "wayland-commons 0.29.1", - "wayland-scanner 0.29.1", + "wayland-client", + "wayland-commons", + "wayland-scanner", ] [[package]] name = "wayland-scanner" -version = "0.28.6" +version = "0.29.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce923eb2deb61de332d1f356ec7b6bf37094dc5573952e1c8936db03b54c03f1" -dependencies = [ - "proc-macro2", - "quote", - "xml-rs", -] - -[[package]] -name = "wayland-scanner" -version = "0.29.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaaf2bc85e7b9143159af96bd23d954a5abe391c4376db712320643280fdc6f4" +checksum = "39a1ed3143f7a143187156a2ab52742e89dac33245ba505c17224df48939f9e0" dependencies = [ "proc-macro2", "quote", @@ -3702,31 +3438,20 @@ dependencies = [ [[package]] name = "wayland-sys" -version = "0.28.6" +version = "0.29.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d841fca9aed7febf9bed2e9796c49bf58d4152ceda8ac949ebe00868d8f0feb8" +checksum = "d9341df79a8975679188e37dab3889bfa57c44ac2cb6da166f519a81cbe452d4" dependencies = [ - "dlib 0.5.0", - "lazy_static", - "pkg-config", -] - -[[package]] -name = "wayland-sys" -version = "0.29.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba9e06acb775b3007f8d3094438306979e572d1d3b844d7a71557a84b055d959" -dependencies = [ - "dlib 0.5.0", + "dlib", "lazy_static", "pkg-config", ] [[package]] name = "web-sys" -version = "0.3.46" +version = "0.3.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "222b1ef9334f92a21d3fb53dc3fd80f30836959a90f9274a626d7e06315ba3c3" +checksum = "38eb105f1c59d9eaa6b5cdc92b859d85b926e82cb2e0945cd0c9259faa6fe9fb" dependencies = [ "js-sys", "wasm-bindgen", @@ -3749,68 +3474,100 @@ dependencies = [ [[package]] name = "wgpu" -version = "0.7.1" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79a0a0a63fac9492cfaf6e7e4bdf9729c128f1e94124b9e4cbc4004b8cb6d1d8" +checksum = "b97cd781ff044d6d697b632a2e212032c2e957d1afaa21dbf58069cbb8f78567" dependencies = [ - "arrayvec 0.5.2", + "arrayvec 0.7.2", "js-sys", + "log", "naga", "parking_lot", - "raw-window-handle 0.3.4", + "raw-window-handle 0.4.2", "smallvec", - "syn", - "tracing", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", "wgpu-core", + "wgpu-hal", "wgpu-types", ] [[package]] name = "wgpu-core" -version = "0.7.1" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c89fa2cc5d72236461ac09c5be967012663e29cb62f1a972654cbf35e49dffa8" +checksum = "c4688c000eb841ca55f7b35db659b78d6e1cd77d7caf8fb929f4e181f754047d" dependencies = [ - "arrayvec 0.5.2", + "arrayvec 0.7.2", "bitflags", "cfg_aliases", + "codespan-reporting", "copyless", "fxhash", - "gfx-backend-dx11", - "gfx-backend-dx12", - "gfx-backend-empty", - "gfx-backend-gl", - "gfx-backend-metal", - "gfx-backend-vulkan", - "gfx-hal", - "gpu-alloc", - "gpu-descriptor", + "log", "naga", "parking_lot", - "raw-window-handle 0.3.4", + "profiling", + "raw-window-handle 0.4.2", "smallvec", "thiserror", - "tracing", + "wgpu-hal", "wgpu-types", ] [[package]] -name = "wgpu-types" -version = "0.7.0" +name = "wgpu-hal" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72fa9ba80626278fd87351555c363378d08122d7601e58319be3d6fa85a87747" +checksum = "92e33cb9c380dd1166f316dfc511ad9646f72cf2deb47e90bd714db3617a6998" +dependencies = [ + "arrayvec 0.7.2", + "ash", + "bit-set", + "bitflags", + "block", + "core-graphics-types", + "d3d12", + "foreign-types", + "fxhash", + "glow", + "gpu-alloc", + "gpu-descriptor", + "inplace_it", + "js-sys", + "khronos-egl", + "libloading", + "log", + "metal", + "naga", + "objc", + "parking_lot", + "profiling", + "range-alloc", + "raw-window-handle 0.4.2", + "renderdoc-sys", + "thiserror", + "wasm-bindgen", + "web-sys", + "wgpu-types", + "winapi", +] + +[[package]] +name = "wgpu-types" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "549533d9e1cdd4b4cda7718d33ff500fc4c34b5467b71d76b547ae0324f3b2a2" dependencies = [ "bitflags", ] [[package]] name = "wgpu_glyph" -version = "0.11.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "354c1f79e09923724a6006a6953c3946522b84f7a9ec202b7e8001f274fd4bd5" +checksum = "8134edb15ae465caf308125646c9e98bdef7398cdefc69227ac77a5eb795e7fe" dependencies = [ "bytemuck", "glyph_brush", @@ -3818,12 +3575,6 @@ dependencies = [ "wgpu", ] -[[package]] -name = "winapi" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" - [[package]] name = "winapi" version = "0.3.9" @@ -3834,12 +3585,6 @@ dependencies = [ "winapi-x86_64-pc-windows-gnu", ] -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" - [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" @@ -3852,7 +3597,7 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] @@ -3861,7 +3606,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44c17110f57155602a80dca10be03852116403c9ff3cd25b079d666f2aa3df6e" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] @@ -3928,9 +3673,8 @@ checksum = "11d95421d9ed3672c280884da53201a5c46b7b2765ca6faf34b0d71cf34a3561" [[package]] name = "winit" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da4eda6fce0eb84bd0a33e3c8794eb902e1033d0a1d5a31bc4f19b1b4bbff597" +version = "0.26.0" +source = "git+https://github.com/iced-rs/winit?rev=02a12380960cec2f351c09a33d6a7cc2789d96a6#02a12380960cec2f351c09a33d6a7cc2789d96a6" dependencies = [ "bitflags", "cocoa", @@ -3943,17 +3687,19 @@ dependencies = [ "libc", "log", "mio", - "mio-extras", - "ndk 0.2.1", - "ndk-glue 0.2.1", - "ndk-sys", + "ndk 0.5.0", + "ndk-glue 0.5.0", + "ndk-sys 0.2.2", "objc", "parking_lot", "percent-encoding", - "raw-window-handle 0.3.4", - "smithay-client-toolkit 0.12.3", - "wayland-client 0.28.6", - "winapi 0.3.9", + "raw-window-handle 0.4.2", + "smithay-client-toolkit", + "wasm-bindgen", + "wayland-client", + "wayland-protocols", + "web-sys", + "winapi", "x11-dl", ] @@ -3963,17 +3709,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d129932f4644ac2396cb456385cbf9e63b5b30c6e8dc4820bdca4eb082037a5" dependencies = [ - "winapi 0.3.9", -] - -[[package]] -name = "ws2_32-sys" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" -dependencies = [ - "winapi 0.2.8", - "winapi-build", + "winapi", ] [[package]] @@ -3994,8 +3730,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ffb080b3f2f616242a4eb8e7d325035312127901025b0052bc3154a282d0f19" dependencies = [ "gethostname", - "nix 0.20.2", - "winapi 0.3.9", + "nix 0.20.0", + "winapi", "winapi-wsapoll", ] @@ -4008,15 +3744,6 @@ dependencies = [ "nom 7.1.0", ] -[[package]] -name = "xdg" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a23fe958c70412687039c86f578938b4a0bb50ec788e96bce4d6ab00ddd5803" -dependencies = [ - "dirs", -] - [[package]] name = "xi-unicode" version = "0.3.0" diff --git a/Cargo.toml b/Cargo.toml index 04801a8..b64768a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ exoquant = "0.2.0" image = "0.23.14" # Display windows & graphics -iced_native = "0.4.0" +#iced_native = "0.4.0" # Native file dialogs rfd = "0.6.3" @@ -31,12 +31,20 @@ version = "0.3.0" [dependencies.iced] # Display windows & graphics features = ["canvas", "image"] -version = "0.3.0" +git = "https://github.com/iced-rs/iced.git" + +[dependencies.iced_native] +# Native-display only GUI features +git = "https://github.com/iced-rs/iced.git" + +[dependencies.iced_lazy] +# Responsive widget design +git = "https://github.com/iced-rs/iced.git" [dependencies.iced_futures] # Display windows & graphics features = ["smol"] -version = "0.3.0" +git = "https://github.com/iced-rs/iced.git" [dependencies.rodio] # Playing audio diff --git a/src/app.rs b/src/app.rs index 35f1a6b..1207361 100644 --- a/src/app.rs +++ b/src/app.rs @@ -1,13 +1,10 @@ -use crate::lyrics::LyricEvent; +use crate::editor::view_editor; +use crate::file_select::view_fileselector; +use crate::model::Model; use crate::controls::ControlsEvent; -use crate::load_song::load_song; -use crate::editor::Editor; -use crate::file_select::FileSelector; -use rfd::AsyncFileDialog; use std::path::PathBuf; use core::time::Duration; use iced::Subscription; -use iced::Clipboard; use iced::Command; use iced::Application; use iced::Element; @@ -17,12 +14,9 @@ use iced_native::subscription; use iced_native::keyboard; use iced_native::window; use iced_native::event::Event; +use crate::model::editing::LyricEvent; -pub struct DelyriumApp { - lyrics_component: Option, - file_selector: FileSelector, - size: (u32, u32), -} +pub struct DelyriumApp(Model); #[derive(Clone, Debug)] pub enum Message { @@ -31,10 +25,10 @@ pub enum Message { kind: LyricEvent, }, PasteSent, + PasteRead(String), Tick, PromptForFile, FileOpened(PathBuf), - Resized(u32, u32), ControlsEvent(ControlsEvent), Null, } @@ -46,11 +40,7 @@ impl Application for DelyriumApp { fn new(_: Self::Flags) -> (Self, Command) { ( - DelyriumApp { - lyrics_component: None, - file_selector: FileSelector::default(), - size: (0, 0), - }, + DelyriumApp(Model::DEFAULT), Command::none(), ) } @@ -59,75 +49,18 @@ impl Application for DelyriumApp { String::from("Delyrium") } - fn update(&mut self, message: Message, clipboard: &mut Clipboard) -> Command{ - let mut command = None; - match message { - Message::LyricEvent { line_no, kind } => { - if let Some(lyrics) = self.lyrics_component.as_mut() { - lyrics.handle_lyric_event(line_no, kind); - } - }, - Message::PasteSent => { - if let Some(lyrics) = self.lyrics_component.as_mut() { - #[allow(clippy::or_fun_call)] // This is a const - let clip_text = clipboard.read().unwrap_or(String::new()); - let clip_pasted_len = clip_text.chars() - .filter(|c| *c != '\r' && *c != '\n') - .count(); - let line = lyrics.current_line_mut().1; - line.value.truncate(line.value.len() - clip_pasted_len); - lyrics.insert_text(clip_text); - } - }, - Message::Tick => { - if self.lyrics_component.is_none() { - self.file_selector.tick(); - } - }, - Message::FileOpened(path) => { - println!("File opened! {}", path.display()); - let song = load_song(&path).unwrap().format; - let (editor, cmd) = Editor::new(song, self.size); - self.lyrics_component = Some(editor); - command = Some(cmd); - }, - Message::PromptForFile => { - let task = async { - let handle = AsyncFileDialog::new() - .add_filter("Song Files", &["mp3", "flac", "ogg", "opus", "wav", "mkv"]) - .set_title("Select a song") - .pick_file() - .await; - if let Some(h) = handle { - Message::FileOpened(h.path().to_owned()) - } else { - Message::Null - } - }; - command = Some(task.into()); - }, - Message::Resized(w, h) => { - self.size = (w, h); - if let Some(lyrics) = self.lyrics_component.as_mut() { - lyrics.notify_resized(w, h); - } - }, - Message::ControlsEvent(e) => { - if let Some(lyrics) = self.lyrics_component.as_mut() { - lyrics.handle_controls_event(e); - } - }, - Message::Null => { }, - } - - command.unwrap_or_else(Command::none) + fn update(&mut self, message: Message) -> Command{ + self.0.update(message) } fn view(&mut self) -> Element { - if let Some(lyrics) = self.lyrics_component.as_mut() { - lyrics.view() - } else { - self.file_selector.view() + match &mut self.0 { + Model::Editing(editing) => { + view_editor(editing) + }, + Model::FilePicker { tick } => { + view_fileselector(*tick) + } } } @@ -138,8 +71,8 @@ impl Application for DelyriumApp { match (key_code, modifiers) { ( keyboard::KeyCode::V, - keyboard::Modifiers { control, .. } - ) if control => { + modifiers + ) if modifiers.control() => { Some(Message::PasteSent) } _ => { None } @@ -148,15 +81,12 @@ impl Application for DelyriumApp { Event::Window(window::Event::FileDropped(path)) => { Some(Message::FileOpened(path)) }, - Event::Window(window::Event::Resized{width,height}) => { - Some(Message::Resized(width,height)) - }, _ => { None } } }); - let is_animating = if let Some(editor) = &self.lyrics_component { - editor.is_animating() + let is_animating = if let Model::Editing(e) = &self.0 { + e.is_animating() } else { true }; diff --git a/src/controls.rs b/src/controls.rs index 1233e9e..6cdf791 100644 --- a/src/controls.rs +++ b/src/controls.rs @@ -26,7 +26,7 @@ pub enum ControlsEvent { DurationDiscovered(Duration), } -enum ErrorState { +pub enum ErrorState { Error(PlayerError), NoError { player: Player, @@ -36,9 +36,7 @@ enum ErrorState { use ErrorState::*; -pub struct Controls { - error_state: ErrorState, -} +pub struct Controls(pub ErrorState); impl Controls { pub fn new(song: Box) -> (Self, Command) { @@ -50,17 +48,16 @@ impl Controls { |d| Message::ControlsEvent(ControlsEvent::DurationDiscovered(d)), ); - (Controls { - error_state: NoError { + ( + Controls(NoError { has_device: player.has_output_device(), player, - } - }, duration_cmd) + }), + duration_cmd + ) }, Err(e) => { - (Controls { - error_state: Error(e) - }, Command::none()) + (Controls(Error(e)), Command::none()) } } } @@ -72,7 +69,7 @@ impl Controls { } pub fn handle_event(&mut self, event: ControlsEvent) { - if let NoError { player, has_device } = &mut self.error_state { + if let NoError { player, has_device } = &mut self.0 { let result = match event { ControlsEvent::SeekPosition(pos) => player.seek_percentage(pos), ControlsEvent::TogglePlay => player.toggle_play(), @@ -88,14 +85,14 @@ impl Controls { *has_device = now_has_device; }, Err(e) => { - self.error_state = Error(e); + self.0 = Error(e); }, }; } } pub fn is_playing(&self) -> bool { - if let NoError { player, has_device: true } = &self.error_state { + if let NoError { player, has_device: true } = &self.0 { player.is_playing() } else { false @@ -107,7 +104,7 @@ impl Controls { /// If there was an error, this will be `None`. In all other cases, this will return /// `Some`. pub fn position(&self) -> Option { - if let NoError { player, .. } = &self.error_state { + if let NoError { player, .. } = &self.0 { Some(player.position()) } else { None @@ -119,7 +116,7 @@ impl Program for (&Controls, Theme) { fn draw(&self, bounds: Rectangle, _cursor: Cursor) -> Vec { let mut frame = Frame::new(bounds.size()); - match &self.0.error_state { + match &self.0.0 { NoError { player, has_device: true } => { let mut background = self.1.text_color; background.a = 0.2; diff --git a/src/editor.rs b/src/editor.rs index cb6bed0..1133d1a 100644 --- a/src/editor.rs +++ b/src/editor.rs @@ -1,136 +1,135 @@ -use crate::lyrics::LyricEvent; -use iced::Command; -use iced::Image; -use iced::image::Handle; -use image::DynamicImage; -use crate::controls::ControlsEvent; +use crate::model::editing::Lyric; +use iced::Text; +use crate::model::editing::LyricEvent; +use iced::widget::text_input::TextInput; +use iced::Alignment; +use iced::widget::scrollable::{self, Scrollable}; +use iced::Space; +use iced::Canvas; +use crate::styles::{Theme, FONT_VG5000}; use crate::controls::Controls; -use crate::lyrics::Lyric; -use crate::lyrics::Lyrics; +use crate::model::Editing; +use iced::Image; use crate::app::Message; use iced::Element; -use crate::styles::Theme; use iced::Container; use iced::Row; -use crate::palette::Palette; -use crate::load_song::extract_cover; use iced::Length; -use image::imageops::FilterType; -use symphonia::core::formats::FormatReader; +pub fn view_editor(editing: &mut Editing) -> Element { + let row = if let Some(margin_bg) = &editing.cached_resized_bg { -use image::GenericImageView; -pub struct Editor { - lyrics: Lyrics, - theme: Theme, - controls: Controls, - bg_img: DynamicImage, - cached_resized_bg: Option, - dimensions: (u32, u32), + let (img1, img2) = ( + Image::new(margin_bg.clone()) + .width(Length::FillPortion(1)) + .height(Length::Fill), + Image::new(margin_bg.clone()) + .width(Length::FillPortion(1)) + .height(Length::Fill), + ); + + Row::new() + .push(img1) + .push(view_progress(&editing.controls, editing.theme)) + .push(view_lyrics(&mut editing.lyrics, &mut editing.scroll_state, editing.theme)) + .push(img2) + } else { + Row::new() + .push(view_progress(&editing.controls, editing.theme)) + .push(view_lyrics(&mut editing.lyrics, &mut editing.scroll_state, editing.theme)) + }; + + Container::new(row) + .style(editing.theme) + .height(Length::Fill) + .into() } -impl Editor { - pub fn new(mut song: Box, size: (u32, u32)) -> (Self, Command) { - let cover = extract_cover(song.as_mut()); +pub fn view_lyrics<'a>(lyrics: &'a mut [Lyric], scroll_state: &'a mut scrollable::State, theme: Theme) -> Element<'a, Message> { + let is_sole_line = lyrics.len() == 1; + let spacers = ( + Space::new(Length::Fill, Length::Units(30)), + Space::new(Length::Fill, Length::Units(30)), + ); - let theme = cover.as_ref() - .map(|cover| { - Theme::from_palette( - Palette::generate(cover) - ) - }).unwrap_or_else(Theme::default); + let scroller = lyrics.iter_mut() + .enumerate() + .map(|(i, l)| view_lyric(l, is_sole_line, i, theme)) + .fold(Scrollable::new(scroll_state).push(spacers.0), |s, l| s.push(l)) + .push(spacers.1) + .width(Length::Fill) + .align_items(Alignment::Center); - let cover = cover.expect("TODO"); - - #[cfg(not(debug_assertions))] - let cover = cover.blur((cover.width() / 100) as f32); - - let bg_img = DynamicImage::ImageBgra8(cover.into_bgra8()); - - let (controls, cmd) = Controls::new(song); - - let mut editor = Self { - lyrics: Lyrics::new(), - dimensions: size, - cached_resized_bg: None, - controls, theme, bg_img, - }; - - editor.notify_resized(size.0, size.1); - - (editor, cmd) - } - - // TODO: work on untangling this mess - pub fn handle_controls_event(&mut self, event: ControlsEvent) { - self.controls.handle_event(event) - } - pub fn insert_text(&mut self, text: String) { - self.lyrics.insert_text(text); - } - pub fn handle_lyric_event(&mut self, line_no: usize, kind: LyricEvent) { - self.lyrics.handle_event(line_no, kind, || self.controls.position()) - } - pub fn current_line_mut(&mut self) -> (usize, &mut Lyric) { - self.lyrics.current_line_mut() - } - - pub fn is_animating(&self) -> bool { - self.controls.is_playing() - } - - fn calculate_margin_width(&self) -> u32 { - let (w, _h) = self.dimensions; - let body_size = (w / 5).max(550); - - w.saturating_sub(body_size) / 2 - } - - pub fn notify_resized(&mut self, w: u32, h: u32) { - self.dimensions = (w, h); - - let (_w, h) = self.dimensions; - let margin_w = self.calculate_margin_width(); - - self.cached_resized_bg = if margin_w != 0 { - let resized_bg = self.bg_img.resize_to_fill(margin_w, h, FilterType::Nearest); - - Some(Handle::from_pixels( - resized_bg.width(), - resized_bg.height(), - resized_bg.into_bgra8().into_raw() - )) - } else { None }; - } - - pub fn view(&mut self) -> Element { - - let row = if let Some(margin_bg) = &self.cached_resized_bg { - let (w, _h) = self.dimensions; - - let (img1, img2) = ( - Image::new(margin_bg.clone()) - .width(Length::Units(w as u16)) - .height(Length::Fill), - Image::new(margin_bg.clone()) - .width(Length::Units(w as u16)) - .height(Length::Fill), - ); - - Row::new() - .push(img1) - .push(self.controls.view_progress(self.theme)) - .push(self.lyrics.view(self.theme)) - .push(img2) - } else { - Row::new() - .push(self.controls.view_progress(self.theme)) - .push(self.lyrics.view(self.theme)) - }; - - Container::new(row) - .style(self.theme) - .height(Length::Fill) - .into() - } + Container::new(scroller) + .height(Length::Fill) + .width(Length::Units(400)) + .center_y() + .into() +} + +pub fn view_lyric(lyric: &mut Lyric, show_placeholder: bool, line_no: usize, theme: Theme) -> Row { + + const SMALL_SIZE: u16 = 20; + const LARGE_SIZE: u16 = 25; + const TIMESTAMP_W: u16 = 67; + const LINE_HEIGHT: u16 = 26; + const TOTAL_W: u16 = 400; + + let is_focused = lyric.is_selected(); + + let placeholder = if show_placeholder { + "Paste some lyrics to get started" + } else if is_focused { + "..." + } else { "" }; + + let size = if is_focused { LARGE_SIZE } else { SMALL_SIZE }; + + let timestamp_input = TextInput::new( + &mut lyric.timestamp_state, + "", + &lyric.timestamp_raw, + move|new_value| LyricEvent::TimestampChanged(new_value).into_msg(line_no), + ) + .style(theme) + .size(SMALL_SIZE) + .width(Length::Units(TIMESTAMP_W)) + .on_submit(LyricEvent::LineAdvanced.into_msg(line_no)) + .font(FONT_VG5000) + .into(); + + let text_input = TextInput::new( + &mut lyric.main_state, + placeholder, + &lyric.value, + move|new_value| LyricEvent::LyricChanged(new_value).into_msg(line_no), + ) + .style(theme.active_lyric(is_focused)) + .size(size) + .width(Length::Fill) + .on_submit(LyricEvent::LineAdvanced.into_msg(line_no)) + .font(FONT_VG5000) + .into(); + + let l_bracket = Text::new("[") + .size(SMALL_SIZE) + .color(theme.reduced_text_color()) + .font(FONT_VG5000) + .into(); + let r_bracket = Text::new("] ") + .size(SMALL_SIZE) + .color(theme.reduced_text_color()) + .font(FONT_VG5000) + .into(); + + Row::with_children(vec![l_bracket, timestamp_input, r_bracket, text_input]) + .width(Length::Units(TOTAL_W)) + .height(Length::Units(LINE_HEIGHT)) + .align_items(Alignment::Center) +} + +pub fn view_progress(controls: &Controls, theme: Theme) -> Canvas { + Canvas::new((&*controls, theme)) + .width(Length::Units(50)) + .height(Length::Fill) } diff --git a/src/file_select.rs b/src/file_select.rs index 7907d73..7b03b56 100644 --- a/src/file_select.rs +++ b/src/file_select.rs @@ -15,8 +15,7 @@ use iced::mouse; use iced::Color; use iced::Rectangle; use iced::Length; -use iced::HorizontalAlignment; -use iced::VerticalAlignment; +use iced::alignment::{Vertical, Horizontal}; use iced::widget::canvas::{self, Canvas}; /* RYGCBM @@ -45,26 +44,16 @@ const FONT_MR_PIXEL: Font = Font::External { bytes: include_bytes!("../fonts/mister-pixel/mister-pixel.otf"), }; -#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] -pub struct FileSelector { - tick: usize, +pub fn view_fileselector(tick: usize) -> Element<'static, Message> { + Canvas::new(tick) + .width(Length::Fill) + .height(Length::Fill) + .into() } -impl FileSelector { - pub fn tick(&mut self) { - self.tick = (self.tick + 1) % MAX_TICKS; - } - - pub fn view(&mut self) -> Element { - Canvas::new(self) - .width(Length::Fill) - .height(Length::Fill) - .into() - } -} - -impl Program for FileSelector { +impl Program for usize { fn draw(&self, bounds: Rectangle, _cursor: Cursor) -> Vec { + let tick = self; let offset_per_index = MAX_TICKS / COLORS.len(); const TEXT_RECT_W: f32 = 350.; @@ -93,7 +82,7 @@ impl Program for FileSelector { .enumerate() .map(|(index, color)| { let size = - ((self.tick + offset_per_index * index) % MAX_TICKS) as f32 / + ((tick + offset_per_index * index) % MAX_TICKS) as f32 / MAX_TICKS as f32; let top_left = interpolate(text_rect.0, Point::ORIGIN, size); @@ -114,8 +103,8 @@ impl Program for FileSelector { frame.fill_text( Text { content: String::from("select a song to start"), - horizontal_alignment: HorizontalAlignment::Center, - vertical_alignment: VerticalAlignment::Center, + horizontal_alignment: Horizontal::Center, + vertical_alignment: Vertical::Center, size: 32., color: Color::WHITE, font: FONT_MR_PIXEL, diff --git a/src/main.rs b/src/main.rs index 84675d1..2e8a930 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,13 +3,13 @@ use iced::settings::Settings; mod palette; mod app; -mod lyrics; mod styles; mod file_select; mod load_song; mod editor; mod player; mod controls; +mod model; fn main() { app::DelyriumApp::run(Settings::default()).unwrap(); diff --git a/src/lyrics.rs b/src/model/editing.rs similarity index 55% rename from src/lyrics.rs rename to src/model/editing.rs index f1d3fc5..9a89918 100644 --- a/src/lyrics.rs +++ b/src/model/editing.rs @@ -1,19 +1,44 @@ -use iced::Space; -use iced_native::text_input::Value; +use image::GenericImageView; use core::ops::RangeInclusive; -use core::time::Duration; -use iced::Row; -use iced::Text; -use iced::Container; -use iced::Length; -use iced::Element; -use crate::styles::{Theme, FONT_VG5000}; -use crate::app::Message; - -use iced::widget::text_input::{self, TextInput}; -use iced::widget::scrollable::{self, Scrollable}; -use iced::Align; +use iced_native::widget::text_input::Value; use iced_native::widget::text_input::cursor::State; +use iced::image::Handle; +use crate::palette::Palette; +use crate::load_song::extract_cover; +use iced::Command; +use crate::app::Message; +use std::time::Duration; +use crate::styles::Theme; +use crate::controls::Controls; +use image::DynamicImage; +use symphonia::core::formats::FormatReader; + +use iced::widget::text_input; +use iced::widget::scrollable; +use iced::clipboard; +use iced_lazy::responsive; + +pub struct Editing { + pub lyrics: Vec, + pub bg_img: Option, + pub controls: Controls, + pub theme: Theme, + + /* UI state */ + pub cached_resized_bg: Option, + pub scroll_state: scrollable::State, + pub image_responsiveness_state: (responsive::State, responsive::State), +} + +pub struct Lyric { + pub value: String, + pub timestamp: Duration, + pub timestamp_raw: String, + + /* UI state */ + pub main_state: text_input::State, + pub timestamp_state: text_input::State, +} #[derive(Debug, Clone, PartialEq, Eq)] pub enum LyricEvent { @@ -23,7 +48,7 @@ pub enum LyricEvent { } impl LyricEvent { - fn into_msg(self, line_no: usize) -> Message { + pub fn into_msg(self, line_no: usize) -> Message { Message::LyricEvent { kind: self, line_no, @@ -31,20 +56,128 @@ impl LyricEvent { } } -pub struct Lyrics { - lines: Vec, - scroll_state: scrollable::State, -} +impl Editing { + pub fn new(mut song: Box) -> (Self, Command) { + let cover = extract_cover(song.as_mut()); -impl Lyrics { - pub fn new() -> Lyrics { - let mut lyric = Lyric::new(); - lyric.select(); + let theme = cover.as_ref() + .map(|cover| { + Theme::from_palette( + Palette::generate(cover) + ) + }).unwrap_or_else(Theme::default); - Self { - lines: vec![lyric], - scroll_state: scrollable::State::new(), + let cover = cover.map(|cover| { + #[cfg(not(debug_assertions))] + let cover = cover.blur((cover.width() / 100) as f32); + + DynamicImage::ImageBgra8(cover.into_bgra8()) + }); + + let cached_resized_bg = cover.as_ref().map(|cover| Handle::from_pixels( + cover.width(), + cover.height(), + cover.to_bgra8().into_raw(), + )); + + let (controls, cmd) = Controls::new(song); + + let mut lyrics = Vec::with_capacity(70); + lyrics.push(Lyric::new()); + + let editor = Self { + scroll_state: scrollable::State::default(), + image_responsiveness_state: Default::default(), + bg_img: cover, + controls, theme, cached_resized_bg, lyrics, + }; + + (editor, cmd) + } + + pub fn update(&mut self, message: Message) -> Command { + let mut command = None; + match message { + Message::LyricEvent { line_no, kind: LyricEvent::LyricChanged(newval) } => { + self.lyrics[line_no].value = newval + }, + Message::LyricEvent { line_no, kind: LyricEvent::TimestampChanged(newval) } => { + self.lyrics[line_no].timestamp_update(newval) + }, + Message::LyricEvent { line_no, kind: LyricEvent::LineAdvanced } => { + self.advance_line(line_no, self.controls.position()) + }, + Message::PasteSent => { + command = Some(clipboard::read(|clip| + if let Some(clip) = clip { + Message::PasteRead(clip) + } else { + Message::Null + } + )); + }, + Message::PasteRead(clip_text) => { + let clip_pasted_len = clip_text.chars() + .filter(|c| *c != '\r' && *c != '\n') + .count(); + if let Some(line) = self.current_line_mut() { + line.value.truncate(line.value.len() - clip_pasted_len); + self.insert_text(clip_text); + } + }, + Message::ControlsEvent(e) => { + self.controls.handle_event(e) + }, + Message::Null | + Message::PromptForFile | + Message::FileOpened(..) | + Message::Tick => { }, } + + command.unwrap_or_else(Command::none) + } + + pub fn advance_line(&mut self, current_line: usize, timestamp: Option) { + let new_line = current_line + 1; + + let line = if new_line == self.lyrics.len() { + self.insert_line(new_line, None) + } else { + self.lyrics.get_mut(new_line) + .expect("Unexpected .advance_line with index beyond # of lines") + }; + + line.select(); + + let previous_line = self.lyrics.get_mut(current_line).unwrap(); + previous_line.deselect(); + if let Some(timestamp) = timestamp { + previous_line.set_timestamp(timestamp); + } + } + + pub fn insert_line(&mut self, index: usize, content: Option) -> &mut Lyric { + self.lyrics.insert(index, match content { + Some(content) => Lyric::new_with_value(content), + None => Lyric::new(), + }); + self.lyrics.get_mut(index).unwrap() + } + + pub fn current_line(&self) -> Option { + self.lyrics + .iter() + .position(Lyric::is_selected) + } + + pub fn current_line_mut(&mut self) -> Option<&mut Lyric> { + self.lyrics + .iter_mut() + .find(|l| l.is_selected()) + } + + pub fn is_animating(&self) -> bool { + self.controls.is_playing() } pub fn insert_text(&mut self, text: String) { @@ -53,107 +186,24 @@ impl Lyrics { .split('\n') .map(str::trim); - let (line_no, current_line) = self.current_line_mut(); + if let Some(line_no) = self.current_line() { + let current_line = self.lyrics.get_mut(line_no).unwrap(); - current_line.deselect(); - current_line.value.push_str(pieces.next().unwrap()); + current_line.deselect(); + current_line.value.push_str(pieces.next().unwrap()); - let pieces = pieces - .collect::>() - .into_iter() - .map(str::to_owned) - .map(Lyric::new_with_value); - let n_pieces = pieces.size_hint().0; + let pieces = pieces + .collect::>() + .into_iter() + .map(str::to_owned) + .map(Lyric::new_with_value); + let n_pieces = pieces.size_hint().0; - self.lines.splice((line_no + 1)..(line_no + 1), pieces); + self.lyrics.splice((line_no + 1)..(line_no + 1), pieces); - self.lines[line_no + n_pieces].select(); - } - - pub fn handle_event(&mut self, line_no: usize, kind: LyricEvent, timestamp: impl Fn() -> Option) { - match kind { - LyricEvent::LyricChanged(newval) => { - self.update_line(newval, line_no) - }, - LyricEvent::TimestampChanged(newval) => { - self.lines[line_no].timestamp_update(newval) - }, - LyricEvent::LineAdvanced => { - self.advance_line(line_no, timestamp()) - }, + self.lyrics[line_no + n_pieces].select(); } } - - pub fn update_line(&mut self, new_content: String, line_no: usize) { - self.lines[line_no].value = new_content; - } - - pub fn advance_line(&mut self, current_line: usize, timestamp: Option) { - let new_line = current_line + 1; - - let line = if new_line == self.lines.len() { - self.insert_line(new_line, None) - } else { - self.lines.get_mut(new_line) - .expect("Unexpected .advance_line with index beyond # of lines") - }; - - line.select(); - - let previous_line = self.lines.get_mut(current_line).unwrap(); - previous_line.deselect(); - if let Some(timestamp) = timestamp { - previous_line.set_timestamp(timestamp); - } - } - - pub fn insert_line(&mut self, index: usize, content: Option) -> &mut Lyric { - self.lines.insert(index, match content { - Some(content) => Lyric::new_with_value(content), - None => Lyric::new(), - }); - self.lines.get_mut(index).unwrap() - } - - pub fn current_line_mut(&mut self) -> (usize, &mut Lyric) { - self.lines - .iter_mut() - .enumerate() - .find(|(_, l)| l.is_selected()) - .expect("no line currently selected") - } - - pub fn view(&mut self, theme: Theme) -> Element { - let is_sole_line = self.lines.len() == 1; - let spacers = ( - Space::new(Length::Fill, Length::Units(30)), - Space::new(Length::Fill, Length::Units(30)), - ); - - let scroller = self.lines.iter_mut() - .enumerate() - .map(|(i, l)| l.view(is_sole_line, i, theme)) - .fold(Scrollable::new(&mut self.scroll_state).push(spacers.0), |s, l| s.push(l)) - .push(spacers.1) - .width(Length::Fill) - .align_items(Align::Center); - - Container::new(scroller) - .height(Length::Fill) - .width(Length::Fill) - .center_y() - .into() - } -} - - -#[derive(Clone, Debug)] -pub struct Lyric { - main_state: text_input::State, - timestamp_state: text_input::State, - pub value: String, - pub timestamp: Duration, - timestamp_raw: String, } impl Lyric { @@ -171,66 +221,8 @@ impl Lyric { } } - pub fn view(&mut self, show_placeholder: bool, line_no: usize, theme: Theme) -> Element { - - const SMALL_SIZE: u16 = 20; - const LARGE_SIZE: u16 = 25; - const TIMESTAMP_W: u16 = 67; - const LINE_HEIGHT: u16 = 26; - const TOTAL_W: u16 = 400; - - let is_focused = self.is_selected(); - - let placeholder = if show_placeholder { - "Paste some lyrics to get started" - } else if is_focused { - "..." - } else { "" }; - - let size = if is_focused { LARGE_SIZE } else { SMALL_SIZE }; - - let timestamp_input = TextInput::new( - &mut self.timestamp_state, - "", - &self.timestamp_raw, - move|new_value| LyricEvent::TimestampChanged(new_value).into_msg(line_no), - ) - .style(theme) - .size(SMALL_SIZE) - .width(Length::Units(TIMESTAMP_W)) - .on_submit(LyricEvent::LineAdvanced.into_msg(line_no)) - .font(FONT_VG5000) - .into(); - - let text_input = TextInput::new( - &mut self.main_state, - placeholder, - &self.value, - move|new_value| LyricEvent::LyricChanged(new_value).into_msg(line_no), - ) - .style(theme.active_lyric(is_focused)) - .size(size) - .width(Length::Fill) - .on_submit(LyricEvent::LineAdvanced.into_msg(line_no)) - .font(FONT_VG5000) - .into(); - - let l_bracket = Text::new("[") - .size(SMALL_SIZE) - .color(theme.reduced_text_color()) - .font(FONT_VG5000) - .into(); - let r_bracket = Text::new("] ") - .size(SMALL_SIZE) - .color(theme.reduced_text_color()) - .font(FONT_VG5000) - .into(); - - Row::with_children(vec![l_bracket, timestamp_input, r_bracket, text_input]) - .width(Length::Units(TOTAL_W)) - .height(Length::Units(LINE_HEIGHT)) - .align_items(Align::Center) - .into() + pub fn is_selected(&self) -> bool { + self.main_state.is_focused() || self.timestamp_state.is_focused() } pub fn select(&mut self) { @@ -238,10 +230,6 @@ impl Lyric { self.main_state.move_cursor_to_end(); } - pub fn is_selected(&self) -> bool { - self.main_state.is_focused() || self.timestamp_state.is_focused() - } - pub fn deselect(&mut self) { self.main_state.unfocus(); self.timestamp_state.unfocus(); diff --git a/src/model/mod.rs b/src/model/mod.rs new file mode 100644 index 0000000..d8c9a1e --- /dev/null +++ b/src/model/mod.rs @@ -0,0 +1,61 @@ +pub mod editing; + +use rfd::FileHandle; +use rfd::AsyncFileDialog; +use crate::load_song::load_song; +use iced::Command; +use crate::app::Message; + +pub use editing::Editing; + +// We allow a large enum variant here because this is only used in one place, so it's okay +// to reserve the extra stack space for when FilePicker becomes Editing +#[allow(clippy::large_enum_variant)] +pub enum Model { + FilePicker { tick: usize }, + Editing(Editing), +} + +const MAX_TICKS: usize = 900; + +impl Model { + pub const DEFAULT: Self = Model::FilePicker { tick: 0 }; + + pub fn update(&mut self, message: Message) -> Command { + match self { + Self::FilePicker { tick } => { + match message { + Message::Tick => { + *tick = (*tick + 1) % MAX_TICKS; + Command::none() + }, + Message::FileOpened(path) => { + println!("File opened! {}", path.display()); + let song = load_song(&path).unwrap().format; + let (editing, cmd) = Editing::new(song); + *self = Self::Editing(editing); + cmd + }, + Message::PromptForFile => { + let show_dialog = AsyncFileDialog::new() + .add_filter("Song Files", &["mp3", "flac", "ogg", "opus", "wav", "mkv"]) + .set_title("Select a song") + .pick_file(); + + let to_message = |handle: Option| if let Some(h) = handle { + Message::FileOpened(h.path().to_owned()) + } else { + Message::Null + }; + + Command::perform(show_dialog, to_message) + }, + _ => { Command::none() } + } + }, + Self::Editing(model) => { + model.update(message) + }, + } + } +}