diff --git a/Cargo.lock b/Cargo.lock index cb10acc37..a4cccc8c1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -259,7 +259,7 @@ checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -281,7 +281,7 @@ dependencies = [ "argh_shared", "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -369,9 +369,9 @@ dependencies = [ [[package]] name = "async-compression" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd066d0b4ef8ecb03a55319dc13aa6910616d0f44008a045bb1835af830abff5" +checksum = "fec134f64e2bc57411226dfc4e52dec859ddfc7e711fc5e07b612584f000e4aa" dependencies = [ "brotli", "flate2", @@ -520,7 +520,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -586,7 +586,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -603,7 +603,7 @@ checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -877,7 +877,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -1140,7 +1140,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", "syn_derive", ] @@ -1300,10 +1300,10 @@ checksum = "9917a953205900b20fe9c77776e2a95607a177c25faefc776920d1aa1a079079" dependencies = [ "anyhow", "auth-git2", - "clap 4.5.9", + "clap 4.5.10", "console", "dialoguer", - "env_logger 0.11.3", + "env_logger 0.11.4", "fs-err", "git2", "gix-config", @@ -1507,9 +1507,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.9" +version = "4.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64acc1846d54c1fe936a78dc189c34e28d3f5afc348403f28ecf53660b9b8462" +checksum = "8f6b81fb3c84f5563d509c59b5a48d935f689e993afa90fe39047f05adef9142" dependencies = [ "clap_builder", "clap_derive", @@ -1517,9 +1517,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.9" +version = "4.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb8393d67ba2e7bfaf28a23458e4e2b543cc73a99595511eb207fdb8aede942" +checksum = "5ca6706fd5224857d9ac5eb9355f6683563cc0541c7cd9d014043b57cbec78ac" dependencies = [ "anstream", "anstyle", @@ -1536,7 +1536,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -1930,7 +1930,7 @@ dependencies = [ "anes", "cast", "ciborium", - "clap 4.5.9", + "clap 4.5.10", "criterion-plot 0.5.0", "futures", "is-terminal", @@ -2022,7 +2022,7 @@ dependencies = [ "crossterm_winapi", "futures-core", "libc", - "mio", + "mio 0.8.11", "parking_lot", "signal-hook", "signal-hook-mio", @@ -2101,7 +2101,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" dependencies = [ "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -2132,7 +2132,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "edb49164822f3ee45b17acd4a208cfc1251410cf0cad9a833234c9890774dd9f" dependencies = [ "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -2187,7 +2187,7 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -2204,7 +2204,7 @@ checksum = "4b2c1c1776b986979be68bb2285da855f8d8a35851a769fca8740df7c3d07877" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -2228,7 +2228,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.11.1", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -2239,7 +2239,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -2307,7 +2307,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -2383,7 +2383,7 @@ dependencies = [ "proc-macro2", "quote", "serde", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -2395,7 +2395,7 @@ dependencies = [ "pretty_assertions", "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -2415,7 +2415,7 @@ dependencies = [ "cargo_metadata", "cargo_toml", "chrono", - "clap 4.5.9", + "clap 4.5.10", "colored 2.1.0", "console", "console-subscriber", @@ -2429,7 +2429,7 @@ dependencies = [ "dioxus-html", "dioxus-rsx", "dirs", - "env_logger 0.11.3", + "env_logger 0.11.4", "fern", "flate2", "fs_extra", @@ -2453,11 +2453,11 @@ dependencies = [ "rayon", "reqwest 0.12.5", "rsx-rosetta", - "rustls 0.23.11", + "rustls 0.23.12", "serde", "serde_json", "subprocess", - "syn 2.0.71", + "syn 2.0.72", "tar", "tauri-bundler", "tempfile", @@ -2483,7 +2483,7 @@ version = "0.5.2" dependencies = [ "built", "cargo_toml", - "clap 4.5.9", + "clap 4.5.10", "dirs", "once_cell", "serde", @@ -2559,7 +2559,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.71", + "syn 2.0.72", "tokio", "trybuild", ] @@ -2651,7 +2651,7 @@ dependencies = [ "base64 0.22.1", "bytes", "ciborium", - "clap 4.5.9", + "clap 4.5.10", "dioxus", "dioxus-cli-config", "dioxus-desktop", @@ -2778,7 +2778,7 @@ dependencies = [ "convert_case 0.6.0", "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", "trybuild", ] @@ -2934,7 +2934,7 @@ dependencies = [ "proc-macro2", "quote", "slab", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -2949,7 +2949,7 @@ dependencies = [ "proc-macro2-diagnostics", "quote", "serde", - "syn 2.0.71", + "syn 2.0.72", "tracing", ] @@ -3071,7 +3071,7 @@ dependencies = [ "proc-macro2", "quote", "server_fn_macro", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -3148,7 +3148,7 @@ checksum = "f2b99bf03862d7f545ebc28ddd33a665b50865f4dfd84031a393823879bd4c54" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -3238,35 +3238,35 @@ checksum = "de0d48a183585823424a4ce1aa132d174a6a81bd540895822eb4c8373a8e49e8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] name = "enumset" -version = "1.1.3" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "226c0da7462c13fb57e5cc9e0dc8f0635e7d27f276a3a7fd30054647f669007d" +checksum = "d07a4b049558765cef5f0c1a273c3fc57084d768b44d2f98127aef4cceb17293" dependencies = [ "enumset_derive", ] [[package]] name = "enumset_derive" -version = "0.8.1" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08b6c6ab82d70f08844964ba10c7babb716de2ecaeab9be5717918a5177d3af" +checksum = "59c3b24c345d8c314966bdc1832f6c2635bfcce8e7cf363bd115987bba2ee242" dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] name = "env_filter" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a009aa4810eb158359dda09d0c87378e4bbb89b5a801f016885a4707ba24f7ea" +checksum = "c6dc8c8ff84895b051f07a0e65f975cf225131742531338752abfb324e4449ff" dependencies = [ "log", "regex", @@ -3287,9 +3287,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.11.3" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38b35839ba51819680ba087cd351788c9a3c476841207e0b8cee0b04722343b9" +checksum = "06676b12debf7bba6903559720abca942d3a66b8acb88815fd2c7c6537e9ade1" dependencies = [ "anstream", "anstyle", @@ -3390,7 +3390,7 @@ checksum = "ce8cd46a041ad005ab9c71263f9a0ff5b529eac0fe4cc9b4a20f4f0765d8cf4b" dependencies = [ "execute-command-tokens", "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -3549,7 +3549,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -3732,7 +3732,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -4029,16 +4029,16 @@ dependencies = [ [[package]] name = "gix-actor" -version = "0.31.4" +version = "0.31.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b8ee65074b2bbb91d9d97c15d172ea75043aefebf9869b5b329149dc76501c" +checksum = "a0e454357e34b833cc3a00b6efbbd3dd4d18b24b9fb0c023876ec2645e8aa3f2" dependencies = [ "bstr", "gix-date", "gix-utils", "itoa 1.0.11", "thiserror", - "winnow 0.6.14", + "winnow 0.6.15", ] [[package]] @@ -4059,14 +4059,14 @@ dependencies = [ "smallvec", "thiserror", "unicode-bom", - "winnow 0.6.14", + "winnow 0.6.15", ] [[package]] name = "gix-config-value" -version = "0.14.6" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbd06203b1a9b33a78c88252a625031b094d9e1b647260070c25b09910c0a804" +checksum = "b328997d74dd15dc71b2773b162cb4af9a25c424105e4876e6d0686ab41c383e" dependencies = [ "bitflags 2.6.0", "bstr", @@ -4114,9 +4114,9 @@ dependencies = [ [[package]] name = "gix-glob" -version = "0.16.3" +version = "0.16.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2a29ad0990cf02c48a7aac76ed0dbddeb5a0d070034b83675cc3bbf937eace4" +checksum = "fa7df15afa265cc8abe92813cd354d522f1ac06b29ec6dfa163ad320575cb447" dependencies = [ "bitflags 2.6.0", "bstr", @@ -4161,7 +4161,7 @@ dependencies = [ "itoa 1.0.11", "smallvec", "thiserror", - "winnow 0.6.14", + "winnow 0.6.15", ] [[package]] @@ -4196,14 +4196,14 @@ dependencies = [ "gix-validate", "memmap2", "thiserror", - "winnow 0.6.14", + "winnow 0.6.15", ] [[package]] name = "gix-sec" -version = "0.10.6" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fddc27984a643b20dd03e97790555804f98cf07404e0e552c0ad8133266a79a1" +checksum = "1547d26fa5693a7f34f05b4a3b59a90890972922172653bcb891ab3f09f436df" dependencies = [ "bitflags 2.6.0", "gix-path", @@ -4284,7 +4284,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -4595,7 +4595,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -5018,7 +5018,7 @@ dependencies = [ "hyper 1.4.1", "hyper-util", "log", - "rustls 0.23.11", + "rustls 0.23.12", "rustls-native-certs", "rustls-pki-types", "tokio", @@ -5169,12 +5169,12 @@ dependencies = [ [[package]] name = "image" -version = "0.25.1" +version = "0.25.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd54d660e773627692c524beaad361aca785a4f9f5730ce91f42aabe5bce3d11" +checksum = "99314c8a2152b8ddb211f924cdae532d8c5e4c8bb54728e12fff1b0cd5963a10" dependencies = [ "bytemuck", - "byteorder", + "byteorder-lite", "color_quant", "exr", "gif", @@ -5334,7 +5334,7 @@ checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -5507,9 +5507,9 @@ checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" [[package]] name = "jobserver" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" dependencies = [ "libc", ] @@ -5590,9 +5590,9 @@ dependencies = [ [[package]] name = "kstring" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec3066350882a1cd6d950d055997f379ac37fd39f81cd4d8ed186032eb3c5747" +checksum = "e703acfd696000db3f6d1238e23b3d1f889192e1e439969c44e8423bb7a5655e" dependencies = [ "serde", "static_assertions", @@ -5863,7 +5863,7 @@ checksum = "915f6d0a2963a27cd5205c1902f32ddfe3bc035816afd268cf88c0fc0f8d287e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -5952,7 +5952,7 @@ dependencies = [ [[package]] name = "manganis" version = "0.2.2" -source = "git+https://github.com/DioxusLabs/manganis#8a6d74dc19072e7a650854bd722c452da51955d6" +source = "git+https://github.com/DioxusLabs/manganis#d468272b47c981368d69c8512e6fb1770592f086" dependencies = [ "dioxus-core 0.5.6", "manganis-macro", @@ -5961,10 +5961,10 @@ dependencies = [ [[package]] name = "manganis-cli-support" version = "0.2.4" -source = "git+https://github.com/DioxusLabs/manganis#8a6d74dc19072e7a650854bd722c452da51955d6" +source = "git+https://github.com/DioxusLabs/manganis#d468272b47c981368d69c8512e6fb1770592f086" dependencies = [ "anyhow", - "image 0.25.1", + "image 0.25.2", "imagequant", "lightningcss", "manganis-common", @@ -5985,7 +5985,7 @@ dependencies = [ [[package]] name = "manganis-common" version = "0.2.4" -source = "git+https://github.com/DioxusLabs/manganis#8a6d74dc19072e7a650854bd722c452da51955d6" +source = "git+https://github.com/DioxusLabs/manganis#d468272b47c981368d69c8512e6fb1770592f086" dependencies = [ "anyhow", "base64 0.21.7", @@ -6001,13 +6001,13 @@ dependencies = [ [[package]] name = "manganis-macro" version = "0.2.2" -source = "git+https://github.com/DioxusLabs/manganis#8a6d74dc19072e7a650854bd722c452da51955d6" +source = "git+https://github.com/DioxusLabs/manganis#d468272b47c981368d69c8512e6fb1770592f086" dependencies = [ "manganis-common", "proc-macro2", "quote", "serde_json", - "syn 2.0.71", + "syn 2.0.72", "tracing-subscriber", ] @@ -6140,6 +6140,18 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "mio" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4569e456d394deccd22ce1c1913e6ea0e54519f577285001215d33557431afe4" +dependencies = [ + "hermit-abi 0.3.9", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.52.0", +] + [[package]] name = "mozjpeg" version = "0.10.9" @@ -6367,7 +6379,7 @@ dependencies = [ "kqueue", "libc", "log", - "mio", + "mio 0.8.11", "serde", "walkdir", "windows-sys 0.48.0", @@ -6424,7 +6436,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -6468,16 +6480,6 @@ dependencies = [ "libm", ] -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi 0.3.9", - "libc", -] - [[package]] name = "num_enum" version = "0.5.11" @@ -6617,7 +6619,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -6868,7 +6870,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -6996,7 +6998,7 @@ dependencies = [ "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -7043,7 +7045,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -7230,7 +7232,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22020dfcf177fcc7bf5deaf7440af371400c67c0de14c399938d8ed4fb4645d3" dependencies = [ "proc-macro2", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -7260,7 +7262,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" dependencies = [ "proc-macro2", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -7338,7 +7340,7 @@ checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", "version_check", ] @@ -7364,7 +7366,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8021cf59c8ec9c432cfc2526ac6b8aa508ecaf29cd415f271b8406c1b851c3fd" dependencies = [ "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -7387,7 +7389,7 @@ dependencies = [ "itertools 0.12.1", "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -7454,7 +7456,7 @@ dependencies = [ "quinn-proto", "quinn-udp", "rustc-hash", - "rustls 0.23.11", + "rustls 0.23.12", "thiserror", "tokio", "tracing", @@ -7470,7 +7472,7 @@ dependencies = [ "rand 0.8.5", "ring", "rustc-hash", - "rustls 0.23.11", + "rustls 0.23.12", "slab", "thiserror", "tinyvec", @@ -7479,14 +7481,13 @@ dependencies = [ [[package]] name = "quinn-udp" -version = "0.5.2" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9096629c45860fc7fb143e125eb826b5e721e10be3263160c7d60ca832cf8c46" +checksum = "8bffec3605b73c6f1754535084a85229fa8a30f86014e6c81aeec4abb68b0285" dependencies = [ "libc", "once_cell", "socket2 0.5.7", - "tracing", "windows-sys 0.52.0", ] @@ -7879,7 +7880,7 @@ dependencies = [ "percent-encoding", "pin-project-lite", "quinn", - "rustls 0.23.11", + "rustls 0.23.12", "rustls-pemfile 2.1.2", "rustls-pki-types", "serde", @@ -7958,7 +7959,7 @@ checksum = "a5a11a05ee1ce44058fa3d5961d05194fdbe3ad6b40f904af764d81b86450e6b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -8064,7 +8065,7 @@ dependencies = [ "pretty_assertions", "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -8145,15 +8146,15 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.11" +version = "0.23.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4828ea528154ae444e5a642dbb7d5623354030dc9822b83fd9bb79683c7399d0" +checksum = "c58f8c84392efc0a126acce10fa59ff7b3d2ac06ab451a33f2741989b806b044" dependencies = [ "log", "once_cell", "ring", "rustls-pki-types", - "rustls-webpki 0.102.5", + "rustls-webpki 0.102.6", "subtle", "zeroize", ] @@ -8208,9 +8209,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.102.5" +version = "0.102.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a6fccd794a42c2c105b513a2f62bc3fd8f3ba57a4593677ceb0bd035164d78" +checksum = "8e6b52d4fda176fd835fdc55a835d4a89b8499cad995885a21149d5ad62f852e" dependencies = [ "ring", "rustls-pki-types", @@ -8406,7 +8407,7 @@ checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -8459,7 +8460,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -8510,7 +8511,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -8558,7 +8559,7 @@ dependencies = [ "convert_case 0.6.0", "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", "xxhash-rust", ] @@ -8569,7 +8570,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00783df297ec85ea605779f2fef9cbec98981dffe2e01e1a9845c102ee1f1ae6" dependencies = [ "server_fn_macro", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -8595,9 +8596,9 @@ dependencies = [ [[package]] name = "sha1_smol" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" +checksum = "bbfa15b3dddfee50a0fff136974b3e1bde555604ba463834a7eb7deb6417705d" [[package]] name = "sha2" @@ -8642,7 +8643,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "29ad2e15f37ec9a6cc544097b78a1ec90001e9f71b81338ca39f430adaca99af" dependencies = [ "libc", - "mio", + "mio 0.8.11", "signal-hook", ] @@ -8747,7 +8748,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "edc90d3e8623d29a664cd8dba5078b600dd203444f00b9739f744e4c6e7aeaf2" dependencies = [ "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -9092,7 +9093,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d904e7009df136af5297832a3ace3370cd14ff1546a232f4f185036c2736fcac" dependencies = [ "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -9194,7 +9195,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -9245,9 +9246,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.71" +version = "2.0.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b146dcf730474b4bcd16c311627b31ede9ab149045db4d6088b3becaea046462" +checksum = "dc4b9b9bf2add8093d3f2c0204471e951b2285580335de42f9d2534f3ae7a8af" dependencies = [ "proc-macro2", "quote", @@ -9263,7 +9264,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -9542,7 +9543,7 @@ checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -9635,22 +9636,21 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.38.1" +version = "1.39.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb2caba9f80616f438e09748d5acda951967e1ea58508ef53d9c6402485a46df" +checksum = "d040ac2b29ab03b09d4129c2f5bbd012a3ac2f79d38ff506a4bf8dd34b0eac8a" dependencies = [ "backtrace", "bytes", "libc", - "mio", - "num_cpus", + "mio 1.0.1", "parking_lot", "pin-project-lite", "signal-hook-registry", "socket2 0.5.7", "tokio-macros", "tracing", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -9665,13 +9665,13 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" +checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -9700,7 +9700,7 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" dependencies = [ - "rustls 0.23.11", + "rustls 0.23.12", "rustls-pki-types", "tokio", ] @@ -9738,7 +9738,7 @@ dependencies = [ "futures-util", "log", "native-tls", - "rustls 0.23.11", + "rustls 0.23.12", "tokio", "tokio-native-tls", "tungstenite 0.23.0", @@ -9838,7 +9838,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.14", + "winnow 0.6.15", ] [[package]] @@ -9951,7 +9951,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -10219,7 +10219,7 @@ dependencies = [ "base64 0.22.1", "log", "once_cell", - "rustls 0.23.11", + "rustls 0.23.12", "rustls-pki-types", "url", "webpki-roots 0.26.3", @@ -10424,7 +10424,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", "wasm-bindgen-shared", ] @@ -10490,7 +10490,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -10533,7 +10533,7 @@ checksum = "b7f89739351a2e03cb94beb799d47fb2cac01759b40ec441f7de39b00cbf7ef0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -10765,7 +10765,7 @@ checksum = "ac1345798ecd8122468840bcdf1b95e5dc6d2206c5e4b0eafa078d061f59c9bc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -10887,7 +10887,7 @@ checksum = "942ac266be9249c84ca862f0a164a39533dc2f6f33dc98ec89c8da99b82ea0bd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -10898,7 +10898,7 @@ checksum = "9107ddc059d5b6fbfbffdfa7a7fe3e22a226def0b2608f72e9d552763d3e1ad7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -10909,7 +10909,7 @@ checksum = "da33557140a288fae4e1d5f8873aaf9eb6613a9cf82c3e070223ff177f598b60" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -10920,7 +10920,7 @@ checksum = "29bee4b38ea3cde66011baa44dba677c432a78593e202392d1e9070cf2a7fca7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -11157,9 +11157,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.6.14" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "374ec40a2d767a3c1b4972d9475ecd557356637be906f2cb3f7fe17a6eb5e22f" +checksum = "557404e450152cd6795bb558bca69e43c585055f4606e3bcae5894fc6dac9ba0" dependencies = [ "memchr", ] @@ -11301,9 +11301,9 @@ checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" [[package]] name = "zbus" -version = "4.3.1" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "851238c133804e0aa888edf4a0229481c753544ca12a60fd1c3230c8a500fe40" +checksum = "bb97012beadd29e654708a0fdb4c84bc046f537aecfde2c3ee0a9e4b4d48c725" dependencies = [ "async-broadcast", "async-executor", @@ -11339,14 +11339,14 @@ dependencies = [ [[package]] name = "zbus_macros" -version = "4.3.1" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d5a3f12c20bd473be3194af6b49d50d7bb804ef3192dc70eddedb26b85d9da7" +checksum = "267db9407081e90bbfa46d841d3cbc60f59c0351838c4bc65199ecd79ab1983e" dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", "zvariant_utils", ] @@ -11378,7 +11378,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", ] [[package]] @@ -11471,18 +11471,18 @@ dependencies = [ [[package]] name = "zune-jpeg" -version = "0.4.11" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec866b44a2a1fd6133d363f073ca1b179f438f99e7e5bfb1e33f7181facfe448" +checksum = "16099418600b4d8f028622f73ff6e3deaabdff330fb9a2a131dea781ee8b0768" dependencies = [ "zune-core", ] [[package]] name = "zvariant" -version = "4.1.2" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1724a2b330760dc7d2a8402d841119dc869ef120b139d29862d6980e9c75bfc9" +checksum = "2084290ab9a1c471c38fc524945837734fbf124487e105daec2bb57fd48c81fe" dependencies = [ "endi", "enumflags2", @@ -11494,24 +11494,24 @@ dependencies = [ [[package]] name = "zvariant_derive" -version = "4.1.2" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55025a7a518ad14518fb243559c058a2e5b848b015e31f1d90414f36e3317859" +checksum = "73e2ba546bda683a90652bac4a279bc146adad1386f25379cf73200d2002c449" dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", "zvariant_utils", ] [[package]] name = "zvariant_utils" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc242db087efc22bd9ade7aa7809e4ba828132edc312871584a6b4391bdf8786" +checksum = "c51bcff7cc3dbb5055396bcf774748c3dab426b4b8659046963523cee4808340" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.72", ] diff --git a/examples/all_events.rs b/examples/all_events.rs index 54577209c..2a04ee2bb 100644 --- a/examples/all_events.rs +++ b/examples/all_events.rs @@ -6,7 +6,7 @@ use dioxus::prelude::*; use std::{collections::VecDeque, fmt::Debug, rc::Rc}; -const STYLE: &str = asset!(file("./examples/assets/events.css")); +const STYLE: &str = asset!("./examples/assets/events.css"); fn main() { launch(app); @@ -26,7 +26,7 @@ fn app() -> Element { }; rsx! { - link { rel: "stylesheet", href: STYLE } + head::Link { rel: "stylesheet", href: STYLE } div { id: "container", // focusing is necessary to catch keyboard events div { id: "receiver", tabindex: 0, diff --git a/examples/assets/overlay.css b/examples/assets/overlay.css new file mode 100644 index 000000000..7c900f614 --- /dev/null +++ b/examples/assets/overlay.css @@ -0,0 +1,13 @@ +html, body { + height: 100px; + margin: 0; + overscroll-behavior-y: none; + overscroll-behavior-x: none; + overflow: hidden; +} +#main, #bodywrap { + height: 100%; + margin: 0; + overscroll-behavior-x: none; + overscroll-behavior-y: none; +} \ No newline at end of file diff --git a/examples/assets/read_size.css b/examples/assets/read_size.css new file mode 100644 index 000000000..16d93c97d --- /dev/null +++ b/examples/assets/read_size.css @@ -0,0 +1,9 @@ +html, body { + height: 100%; + width: 100%; + margin: 0; +} +#main { + height: 100%; + width: 100%; +} \ No newline at end of file diff --git a/examples/calculator.rs b/examples/calculator.rs index 65f9cd201..9bf2a0461 100644 --- a/examples/calculator.rs +++ b/examples/calculator.rs @@ -12,7 +12,7 @@ use dioxus::events::*; use dioxus::html::input_data::keyboard_types::Key; use dioxus::prelude::*; -const STYLE: &str = asset!(file("./examples/assets/calculator.css")); +const STYLE: &str = asset!("./examples/assets/calculator.css"); fn main() { LaunchBuilder::desktop() @@ -54,7 +54,7 @@ fn app() -> Element { }; rsx! { - link { rel: "stylesheet", href: STYLE } + head::Link { rel: "stylesheet", href: STYLE } div { id: "wrapper", div { class: "app", div { class: "calculator", tabindex: "0", onkeydown: handle_key_down_event, diff --git a/examples/calculator_mutable.rs b/examples/calculator_mutable.rs index fc755c1f9..2f933ebbe 100644 --- a/examples/calculator_mutable.rs +++ b/examples/calculator_mutable.rs @@ -25,13 +25,11 @@ fn main() { .launch(app); } -const STYLE: &str = include_str!("./assets/calculator.css"); - fn app() -> Element { let mut state = use_signal(Calculator::new); rsx! { - style { {STYLE} } + head::Link { rel: "stylesheet", href: asset!("./examples/assets/calculator.css") } div { id: "wrapper", div { class: "app", div { diff --git a/examples/clock.rs b/examples/clock.rs index 1da9239c1..048ceb56e 100644 --- a/examples/clock.rs +++ b/examples/clock.rs @@ -5,7 +5,7 @@ use dioxus::prelude::*; -const STYLE: &str = asset!(file("./examples/assets/clock.css")); +const STYLE: &str = asset!("./examples/assets/clock.css"); fn main() { launch_desktop(app); @@ -38,7 +38,7 @@ fn app() -> Element { ); rsx! { - link { rel: "stylesheet", href: STYLE } + head::Link { rel: "stylesheet", href: STYLE } div { id: "app", div { id: "title", "Carpe diem 🎉" } div { id: "clock-display", "{time}" } diff --git a/examples/control_focus.rs b/examples/control_focus.rs index 4f1a4845d..723318c3f 100644 --- a/examples/control_focus.rs +++ b/examples/control_focus.rs @@ -6,7 +6,7 @@ use dioxus::prelude::*; use std::rc::Rc; -const STYLE: &str = asset!(file("./examples/assets/roulette.css")); +const STYLE: &str = asset!("./examples/assets/roulette.css"); fn main() { launch_desktop(app); @@ -38,7 +38,7 @@ fn app() -> Element { }); rsx! { - link { rel: "stylesheet", href: STYLE } + head::Link { rel: "stylesheet", href: STYLE } h1 { "Input Roulette" } button { onclick: move |_| running.toggle(), "Toggle roulette" } div { id: "roulette-grid", diff --git a/examples/counters.rs b/examples/counters.rs index c785535d0..f2d8c4203 100644 --- a/examples/counters.rs +++ b/examples/counters.rs @@ -2,7 +2,7 @@ use dioxus::prelude::*; -const STYLE: &str = asset!(file("./examples/assets/counter.css")); +const STYLE: &str = asset!("./examples/assets/counter.css"); fn main() { launch(app); @@ -16,7 +16,7 @@ fn app() -> Element { let sum = use_memo(move || counters.read().iter().copied().sum::()); rsx! { - link { rel: "stylesheet", href: STYLE } + head::Link { rel: "stylesheet", href: STYLE } div { id: "controls", button { onclick: move |_| counters.write().push(0), "Add counter" } diff --git a/examples/crm.rs b/examples/crm.rs index ada8cc036..21f07466c 100644 --- a/examples/crm.rs +++ b/examples/crm.rs @@ -11,8 +11,6 @@ use dioxus::prelude::*; -const STYLE: &str = asset!(file("./examples/assets/crm.css")); - fn main() { LaunchBuilder::new() .with_cfg(desktop!({ @@ -22,13 +20,13 @@ fn main() { })) .launch(|| { rsx! { - link { + head::Link { rel: "stylesheet", - href: "https://unpkg.com/purecss@2.0.6/build/pure-min.css", + href: asset!("https://unpkg.com/purecss@2.0.6/build/pure-min.css"), integrity: "sha384-Uu6IeWbM+gzNVXJcM9XV3SohHtmWE+3VGi496jvgX1jyvDTXfdK+rfZc8C1Aehk5", crossorigin: "anonymous" } - link { rel: "stylesheet", href: STYLE } + head::Link { rel: "stylesheet", href: asset!("./examples/assets/crm.css") } h1 { "Dioxus CRM Example" } Router:: {} } diff --git a/examples/custom_assets.rs b/examples/custom_assets.rs index de2cb8648..6c927d21a 100644 --- a/examples/custom_assets.rs +++ b/examples/custom_assets.rs @@ -11,8 +11,7 @@ use dioxus::prelude::*; static ASSET_PATH: &str = "examples/assets/logo.png"; #[cfg(feature = "collect-assets")] -static ASSET_PATH: &str = - manganis::mg!(image("examples/assets/logo.png").format(ImageType::Avif)).path(); +static ASSET_PATH: &str = asset!("examples/assets/logo.png".format(ImageType::Avif)); fn main() { launch(app); diff --git a/examples/dynamic_asset.rs b/examples/dynamic_asset.rs index f8a4fb7ad..14a33c480 100644 --- a/examples/dynamic_asset.rs +++ b/examples/dynamic_asset.rs @@ -7,7 +7,7 @@ use dioxus::desktop::{use_asset_handler, wry::http::Response}; use dioxus::prelude::*; -const STYLE: &str = asset!(file("./examples/assets/custom_assets.css")); +const STYLE: &str = asset!("./examples/assets/custom_assets.css"); fn main() { launch_desktop(app); @@ -24,7 +24,7 @@ fn app() -> Element { }); rsx! { - link { rel: "stylesheet", href: STYLE } + head::Link { rel: "stylesheet", href: STYLE } h1 { "Dynamic Assets" } img { src: "/logos/logo.png" } } diff --git a/examples/file_explorer.rs b/examples/file_explorer.rs index b175ad011..1ac571d2e 100644 --- a/examples/file_explorer.rs +++ b/examples/file_explorer.rs @@ -14,25 +14,22 @@ fn main() { .launch(app) } -#[cfg(not(feature = "collect-assets"))] -const _STYLE: &str = include_str!("../examples/assets/fileexplorer.css"); - -#[cfg(feature = "collect-assets")] -const _STYLE: &str = manganis::mg!(file("./examples/assets/fileexplorer.css")); - fn app() -> Element { let mut files = use_signal(Files::new); rsx! { + head::Link { + rel: "stylesheet", + href: asset!("./examples/assets/fileexplorer.css") + } div { - link { href:"https://fonts.googleapis.com/icon?family=Material+Icons", rel:"stylesheet" } + head::Link { href: "https://fonts.googleapis.com/icon?family=Material+Icons", rel: "stylesheet" } header { i { class: "material-icons icon-menu", "menu" } h1 { "Files: " {files.read().current()} } span { } i { class: "material-icons", onclick: move |_| files.write().go_up(), "logout" } } - style { "{_STYLE}" } main { for (dir_id, path) in files.read().path_names.iter().enumerate() { { diff --git a/examples/file_upload.rs b/examples/file_upload.rs index ed597d486..3b73e61eb 100644 --- a/examples/file_upload.rs +++ b/examples/file_upload.rs @@ -8,7 +8,7 @@ use std::sync::Arc; use dioxus::prelude::*; use dioxus::{html::HasFileData, prelude::dioxus_elements::FileEngine}; -const STYLE: &str = asset!(file("./examples/assets/file_upload.css")); +const STYLE: &str = asset!("./examples/assets/file_upload.css"); fn main() { launch(app); @@ -43,7 +43,7 @@ fn app() -> Element { }; rsx! { - link { rel: "stylesheet", href: STYLE } + head::Link { rel: "stylesheet", href: STYLE } h1 { "File Upload Example" } p { "Drop a .txt, .rs, or .js file here to read it" } diff --git a/examples/flat_router.rs b/examples/flat_router.rs index 06a347876..79a9d2a3f 100644 --- a/examples/flat_router.rs +++ b/examples/flat_router.rs @@ -9,12 +9,12 @@ use dioxus::prelude::*; -const STYLE: &str = asset!(file("./examples/assets/flat_router.css")); +const STYLE: &str = asset!("./examples/assets/flat_router.css"); fn main() { launch(|| { rsx! { - link { rel: "stylesheet", href: STYLE } + head::Link { rel: "stylesheet", href: STYLE } Router:: {} } }) diff --git a/examples/global.rs b/examples/global.rs index bbfef347e..401668d74 100644 --- a/examples/global.rs +++ b/examples/global.rs @@ -7,7 +7,7 @@ use dioxus::prelude::*; -const STYLE: &str = asset!(file("./examples/assets/counter.css")); +const STYLE: &str = asset!("./examples/assets/counter.css"); static COUNT: GlobalSignal = Signal::global(|| 0); static DOUBLED_COUNT: GlobalMemo = Signal::global_memo(|| COUNT() * 2); @@ -18,7 +18,7 @@ fn main() { fn app() -> Element { rsx! { - link { rel: "stylesheet", href: STYLE } + head::Link { rel: "stylesheet", href: STYLE } Increment {} Decrement {} Reset {} diff --git a/examples/image_generator_openai.rs b/examples/image_generator_openai.rs index 9c0492273..474c46de9 100644 --- a/examples/image_generator_openai.rs +++ b/examples/image_generator_openai.rs @@ -36,7 +36,7 @@ fn app() -> Element { }); rsx! { - head { link { rel: "stylesheet", href: "https://unpkg.com/bulma@0.9.0/css/bulma.min.css" } } + head::Link { rel: "stylesheet", href: "https://unpkg.com/bulma@0.9.0/css/bulma.min.css" } div { class: "container", div { class: "columns", div { class: "column", diff --git a/examples/link.rs b/examples/link.rs index 06a65b796..620c645db 100644 --- a/examples/link.rs +++ b/examples/link.rs @@ -8,7 +8,7 @@ use dioxus::prelude::*; -const STYLE: &str = asset!(file("./examples/assets/links.css")); +const STYLE: &str = asset!("./examples/assets/links.css"); fn main() { launch(app); @@ -16,7 +16,7 @@ fn main() { fn app() -> Element { rsx! ( - link { rel: "stylesheet", href: STYLE } + head::Link { rel: "stylesheet", href: STYLE } Router:: {} ) } diff --git a/examples/overlay.rs b/examples/overlay.rs index 570c878e5..e4e2e8059 100644 --- a/examples/overlay.rs +++ b/examples/overlay.rs @@ -20,6 +20,10 @@ fn app() -> Element { _ = use_global_shortcut("cmd+g", move || show_overlay.toggle()); rsx! { + head::Link { + rel: "stylesheet", + href: asset!("./examples/assets/overlay.css"), + } if show_overlay() { div { width: "100%", @@ -41,28 +45,7 @@ fn app() -> Element { } fn make_config() -> dioxus::desktop::Config { - dioxus::desktop::Config::default() - .with_window(make_window()) - .with_custom_head( - r#" - -"# - .to_owned(), - ) + dioxus::desktop::Config::default().with_window(make_window()) } fn make_window() -> WindowBuilder { diff --git a/examples/read_size.rs b/examples/read_size.rs index 86a33b958..1965597cf 100644 --- a/examples/read_size.rs +++ b/examples/read_size.rs @@ -9,26 +9,7 @@ use std::rc::Rc; use dioxus::{html::geometry::euclid::Rect, prelude::*}; fn main() { - LaunchBuilder::desktop() - .with_cfg( - dioxus::desktop::Config::default().with_custom_head( - r#" - -"# - .to_owned(), - ), - ) - .launch(app); + launch(app); } fn app() -> Element { @@ -47,6 +28,7 @@ fn app() -> Element { }; rsx!( + head::Link { rel: "stylesheet", href: asset!("./examples/assets/read_size.css") } div { width: "50%", height: "50%", diff --git a/examples/reducer.rs b/examples/reducer.rs index d70340f59..7c434e585 100644 --- a/examples/reducer.rs +++ b/examples/reducer.rs @@ -7,7 +7,7 @@ use dioxus::prelude::*; -const STYLE: &str = asset!(file("./examples/assets/radio.css")); +const STYLE: &str = asset!("./examples/assets/radio.css"); fn main() { launch(app); @@ -17,7 +17,7 @@ fn app() -> Element { let mut state = use_signal(|| PlayerState { is_playing: false }); rsx!( - link { rel: "stylesheet", href: STYLE } + head::Link { rel: "stylesheet", href: STYLE } h1 {"Select an option"} // Add some cute animations if the radio is playing! diff --git a/examples/router.rs b/examples/router.rs index c9579208c..13197f57e 100644 --- a/examples/router.rs +++ b/examples/router.rs @@ -8,12 +8,12 @@ use dioxus::prelude::*; -const STYLE: &str = asset!(file("./examples/assets/router.css")); +const STYLE: &str = asset!("./examples/assets/router.css"); fn main() { launch(|| { rsx! { - link { rel: "stylesheet", href: STYLE } + head::Link { rel: "stylesheet", href: STYLE } Router:: {} } }); diff --git a/examples/tailwind/src/main.rs b/examples/tailwind/src/main.rs index 05c7a1021..70ce484c3 100644 --- a/examples/tailwind/src/main.rs +++ b/examples/tailwind/src/main.rs @@ -2,7 +2,7 @@ use dioxus::prelude::*; -const _STYLE: &str = manganis::mg!(file("public/tailwind.css")); +const _STYLE: &str = asset!("public/tailwind.css"); fn main() { launch(app); diff --git a/examples/todomvc.rs b/examples/todomvc.rs index c5471eb0d..470582773 100644 --- a/examples/todomvc.rs +++ b/examples/todomvc.rs @@ -3,7 +3,7 @@ use dioxus::prelude::*; use std::collections::HashMap; -const STYLE: &str = asset!(file("./examples/assets/todomvc.css")); +const STYLE: &str = asset!("./examples/assets/todomvc.css"); fn main() { launch(app); @@ -65,7 +65,7 @@ fn app() -> Element { }; rsx! { - link { rel: "stylesheet", href: STYLE } + head::Link { rel: "stylesheet", href: STYLE } section { class: "todoapp", TodoHeader { todos } section { class: "main", diff --git a/examples/weather_app.rs b/examples/weather_app.rs index 64854a1b6..395fd81f1 100644 --- a/examples/weather_app.rs +++ b/examples/weather_app.rs @@ -19,7 +19,7 @@ fn app() -> Element { let current_weather = use_resource(move || async move { get_weather(&country()).await }); rsx! { - link { rel: "stylesheet", href: "https://unpkg.com/tailwindcss@^2.0/dist/tailwind.min.css" } + head::Link { rel: "stylesheet", href: "https://unpkg.com/tailwindcss@^2.0/dist/tailwind.min.css" } div { class: "mx-auto p-4 bg-gray-100 h-screen flex justify-center", div { class: "flex items-center justify-center flex-row", div { class: "flex items-start justify-center flex-row", diff --git a/examples/window_event.rs b/examples/window_event.rs index 7de6dc01c..cb91d2a5b 100644 --- a/examples/window_event.rs +++ b/examples/window_event.rs @@ -26,7 +26,7 @@ fn main() { fn app() -> Element { rsx!( - link { href: "https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css", rel: "stylesheet" } + head::Link { href: "https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css", rel: "stylesheet" } Header {} div { class: "container mx-auto", div { class: "grid grid-cols-5", diff --git a/packages/desktop/Cargo.toml b/packages/desktop/Cargo.toml index 4d5821092..ca89a920c 100644 --- a/packages/desktop/Cargo.toml +++ b/packages/desktop/Cargo.toml @@ -118,94 +118,3 @@ harness = false name = "check_eval" path = "headless_tests/eval.rs" harness = false - -# Most of the examples live in the workspace. We include some here so that docs.rs can scrape our examples for better inline docs -[[example]] -name = "video_stream" -path = "../../examples/video_stream.rs" -doc-scrape-examples = true - -[[example]] -name = "suspense" -path = "../../examples/suspense.rs" -doc-scrape-examples = true - -[[example]] -name = "calculator_mutable" -path = "../../examples/calculator_mutable.rs" -doc-scrape-examples = true - -[[example]] -name = "custom_html" -path = "../../examples/custom_html.rs" -doc-scrape-examples = true - -[[example]] -name = "custom_menu" -path = "../../examples/custom_menu.rs" -doc-scrape-examples = true - -[[example]] -name = "errors" -path = "../../examples/errors.rs" -doc-scrape-examples = true - -[[example]] -name = "file_explorer" -path = "../../examples/file_explorer.rs" -doc-scrape-examples = true - -[[example]] -name = "future" -path = "../../examples/future.rs" -doc-scrape-examples = true - -[[example]] -name = "hydration" -path = "../../examples/hydration.rs" -doc-scrape-examples = true - -[[example]] -name = "multiwindow" -path = "../../examples/multiwindow.rs" -doc-scrape-examples = true - -[[example]] -name = "overlay" -path = "../../examples/overlay.rs" -doc-scrape-examples = true - -[[example]] -name = "popup" -path = "../../examples/popup.rs" -doc-scrape-examples = true - -[[example]] -name = "read_size" -path = "../../examples/read_size.rs" -doc-scrape-examples = true - -[[example]] -name = "shortcut" -path = "../../examples/shortcut.rs" -doc-scrape-examples = true - -[[example]] -name = "streams" -path = "../../examples/streams.rs" -doc-scrape-examples = true - -[[example]] -name = "window_event" -path = "../../examples/window_event.rs" -doc-scrape-examples = true - -[[example]] -name = "window_focus" -path = "../../examples/window_focus.rs" -doc-scrape-examples = true - -[[example]] -name = "window_zoom" -path = "../../examples/window_zoom.rs" -doc-scrape-examples = true diff --git a/packages/desktop/build.rs b/packages/desktop/build.rs index 6d90fe746..b08ad66cf 100644 --- a/packages/desktop/build.rs +++ b/packages/desktop/build.rs @@ -1,3 +1,5 @@ +use std::{io::Write as _, path::PathBuf}; + fn check_gnu() { // WARN about wry support on windows gnu targets. GNU windows targets don't work well in wry currently if std::env::var("CARGO_CFG_WINDOWS").is_ok() @@ -6,8 +8,126 @@ fn check_gnu() { { println!("cargo:warning=GNU windows targets have some limitations within Wry. Using the MSVC windows toolchain is recommended. If you would like to use continue using GNU, you can read https://github.com/wravery/webview2-rs#cross-compilation and disable this warning by adding the gnu feature to dioxus-desktop in your Cargo.toml") } + + // To prepare for a release, we add extra examples to desktop for doc scraping and copy assets from the workspace to make those examples compile + if option_env!("DIOXUS_RELEASE").is_some() { + // Append EXAMPLES_TOML to the cargo.toml + let cargo_toml = std::fs::OpenOptions::new() + .append(true) + .open("Cargo.toml") + .unwrap(); + let mut write = std::io::BufWriter::new(cargo_toml); + write.write_all(EXAMPLES_TOML.as_bytes()).unwrap(); + + // Copy the assets from the workspace to the examples directory + let crate_dir = PathBuf::from(std::env::var("CARGO_MANIFEST_DIR").unwrap()); + let workspace_dir = crate_dir.parent().unwrap().parent().unwrap(); + let workspace_assets_dir = workspace_dir.join("examples").join("assets"); + let desktop_assets_dir = PathBuf::from("examples").join("assets"); + std::fs::create_dir_all(&desktop_assets_dir).unwrap(); + // move all files from the workspace assets dir to the desktop assets dir + for entry in std::fs::read_dir(workspace_assets_dir).unwrap() { + let entry = entry.unwrap(); + let path = entry.path(); + if path.is_file() { + std::fs::copy(&path, desktop_assets_dir.join(path.file_name().unwrap())).unwrap(); + } + } + } } fn main() { check_gnu(); } + +const EXAMPLES_TOML: &str = r#" +# Most of the examples live in the workspace. We include some here so that docs.rs can scrape our examples for better inline docs +[[example]] +name = "video_stream" +path = "../../examples/video_stream.rs" +doc-scrape-examples = true + +[[example]] +name = "suspense" +path = "../../examples/suspense.rs" +doc-scrape-examples = true + +[[example]] +name = "calculator_mutable" +path = "../../examples/calculator_mutable.rs" +doc-scrape-examples = true + +[[example]] +name = "custom_html" +path = "../../examples/custom_html.rs" +doc-scrape-examples = true + +[[example]] +name = "custom_menu" +path = "../../examples/custom_menu.rs" +doc-scrape-examples = true + +[[example]] +name = "errors" +path = "../../examples/errors.rs" +doc-scrape-examples = true + +[[example]] +name = "file_explorer" +path = "../../examples/file_explorer.rs" +doc-scrape-examples = true + +[[example]] +name = "future" +path = "../../examples/future.rs" +doc-scrape-examples = true + +[[example]] +name = "hydration" +path = "../../examples/hydration.rs" +doc-scrape-examples = true + +[[example]] +name = "multiwindow" +path = "../../examples/multiwindow.rs" +doc-scrape-examples = true + +[[example]] +name = "overlay" +path = "../../examples/overlay.rs" +doc-scrape-examples = true + +[[example]] +name = "popup" +path = "../../examples/popup.rs" +doc-scrape-examples = true + +[[example]] +name = "read_size" +path = "../../examples/read_size.rs" +doc-scrape-examples = true + +[[example]] +name = "shortcut" +path = "../../examples/shortcut.rs" +doc-scrape-examples = true + +[[example]] +name = "streams" +path = "../../examples/streams.rs" +doc-scrape-examples = true + +[[example]] +name = "window_event" +path = "../../examples/window_event.rs" +doc-scrape-examples = true + +[[example]] +name = "window_focus" +path = "../../examples/window_focus.rs" +doc-scrape-examples = true + +[[example]] +name = "window_zoom" +path = "../../examples/window_zoom.rs" +doc-scrape-examples = true"#; diff --git a/packages/fullstack/examples/hackernews/assets/hackernews.css b/packages/fullstack/examples/hackernews/assets/hackernews.css new file mode 100644 index 000000000..cd01ad879 --- /dev/null +++ b/packages/fullstack/examples/hackernews/assets/hackernews.css @@ -0,0 +1,17 @@ +@keyframes spin { + 0% { + transform: rotate(0deg); + } + + 100% { + transform: rotate(360deg); + } +} +.spinner { + width: 10px; + height: 10px; + border: 4px solid #f3f3f3; + border-top: 4px solid #3498db; + border-radius: 50%; + animation: spin 2s linear infinite; +} \ No newline at end of file diff --git a/packages/fullstack/examples/hackernews/src/main.rs b/packages/fullstack/examples/hackernews/src/main.rs index 7abdc4aa6..62bf9d8f7 100644 --- a/packages/fullstack/examples/hackernews/src/main.rs +++ b/packages/fullstack/examples/hackernews/src/main.rs @@ -33,30 +33,10 @@ pub fn App() -> Element { } } -const STYLE: &str = r#"@keyframes spin { - 0% { - transform: rotate(0deg); - } - - 100% { - transform: rotate(360deg); - } -} -.spinner { - width: 10px; - height: 10px; - border: 4px solid #f3f3f3; - border-top: 4px solid #3498db; - border-radius: 50%; - animation: spin 2s linear infinite; -}"#; - #[component] fn Homepage(story: ReadOnlySignal) -> Element { rsx! { - style { - {STYLE} - } + head::Link { rel: "stylesheet", href: asset!("./assets/hackernews.css") } div { display: "flex", flex_direction: "row", width: "100%", div { width: "50%", diff --git a/packages/html/src/document/head.rs b/packages/html/src/document/head.rs index 52ad68a8f..5f518a03f 100644 --- a/packages/html/src/document/head.rs +++ b/packages/html/src/document/head.rs @@ -245,7 +245,7 @@ impl ScriptProps { /// rsx! { /// // You can use the Script component to render a script tag into the head of the page /// Script { -/// src: manganis::mg!(file("./assets/script.js")), +/// src: asset!("./assets/script.js"), /// } /// } /// } @@ -435,7 +435,7 @@ impl LinkProps { /// // You can use the meta component to render a meta tag into the head of the page /// // This meta tag will redirect the user to the dioxuslabs homepage in 10 seconds /// head::Link { -/// href: manganis::mg!(file("./assets/style.css")), +/// href: asset!("./assets/style.css"), /// rel: "stylesheet", /// } /// }