diff --git a/.github/workflows/release-tagged.yml b/.github/workflows/release-tagged.yml index ecc1b6b..5dd0c11 100644 --- a/.github/workflows/release-tagged.yml +++ b/.github/workflows/release-tagged.yml @@ -24,7 +24,7 @@ jobs: run: trunk build --release - name: Post Setup | Upload dist - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: path: ./dist/ @@ -36,7 +36,7 @@ jobs: uses: actions/checkout@v4 - name: Setup | Download dist - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 - name: Setup | Place dist run: mv ./artifact/ ./dist/ @@ -102,7 +102,7 @@ jobs: uses: actions/checkout@v4 - name: Setup | Download dist - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 - name: Setup | Place dist run: mv ./artifact/ ./dist/ diff --git a/Cargo.lock b/Cargo.lock index 8d27d89..dce6b68 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -132,18 +132,18 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "form_urlencoded" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ "percent-encoding", ] [[package]] name = "futures" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" dependencies = [ "futures-channel", "futures-core", @@ -155,9 +155,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ "futures-core", "futures-sink", @@ -165,44 +165,44 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] name = "futures-io" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] name = "futures-macro" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] name = "futures-sink" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" [[package]] name = "futures-task" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-util" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ "futures-channel", "futures-core", @@ -218,9 +218,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.10" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" +checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" dependencies = [ "cfg-if", "js-sys", @@ -231,9 +231,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.0" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" [[package]] name = "gloo" @@ -264,13 +264,13 @@ dependencies = [ "gloo-dialogs 0.2.0", "gloo-events 0.2.0", "gloo-file 0.3.0", - "gloo-history 0.2.1", + "gloo-history 0.2.2", "gloo-net 0.4.0", "gloo-render 0.2.0", "gloo-storage 0.3.0", "gloo-timers 0.3.0", "gloo-utils 0.2.0", - "gloo-worker 0.4.1", + "gloo-worker 0.4.0", ] [[package]] @@ -382,15 +382,15 @@ dependencies = [ [[package]] name = "gloo-history" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4022e82f5f9e03cb1251b13c0a967e0600e97aa179c617f6519bac40640160" +checksum = "903f432be5ba34427eac5e16048ef65604a82061fe93789f2212afc73d8617d6" dependencies = [ "getrandom", "gloo-events 0.2.0", "gloo-utils 0.2.0", "serde", - "serde-wasm-bindgen 0.6.1", + "serde-wasm-bindgen 0.6.3", "serde_urlencoded", "thiserror", "wasm-bindgen", @@ -556,9 +556,9 @@ dependencies = [ [[package]] name = "gloo-worker" -version = "0.4.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2cbd4c35cc3a2b1fb792318acc06bd514193f6d058173da5cdbcdabe6514303" +checksum = "76495d3dd87de51da268fa3a593da118ab43eb7f8809e17eb38d3319b424e400" dependencies = [ "bincode", "futures", @@ -582,14 +582,14 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] name = "hashbrown" -version = "0.14.2" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" [[package]] name = "hermit-abi" @@ -599,18 +599,18 @@ checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" [[package]] name = "hex_color" -version = "2.0.0" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff917051cbc87800de93ddcf39b59c9f2a0a4d809411a341c0ac422771219808" +checksum = "d37f101bf4c633f7ca2e4b5e136050314503dd198e78e325ea602c327c484ef0" dependencies = [ "rand", ] [[package]] name = "http" -version = "0.2.9" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" +checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" dependencies = [ "bytes", "fnv", @@ -619,9 +619,9 @@ dependencies = [ [[package]] name = "idna" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -629,18 +629,29 @@ dependencies = [ [[package]] name = "implicit-clone" -version = "0.4.1" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af3d77000817fd9e7db159e8d52ed9b5941a2cdbfbdc8ca646e59887ae2b2dd1" +checksum = "fc06a255cbf402a52ae399c05a518c68c569c916ea11423620111df576b9b9bb" dependencies = [ + "implicit-clone-derive", "indexmap", ] +[[package]] +name = "implicit-clone-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9311685eb9a34808bbb0608ad2fcab9ae216266beca5848613e95553ac914e3b" +dependencies = [ + "quote", + "syn 2.0.48", +] + [[package]] name = "indexmap" -version = "2.0.2" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8adf3ddd720272c6ea8bf59463c04e0f93d0bbf7c5439b691bca2987e0270897" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" dependencies = [ "equivalent", "hashbrown", @@ -669,24 +680,24 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "js-sys" -version = "0.3.65" +version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54c0c35952f67de54bb584e9fd912b3023117cbafc0a77d8f3dee1fb5f572fe8" +checksum = "9a1d36f1235bc969acba30b7f5990b864423a6068a10f7c90ae8f0112e3a59d1" dependencies = [ "wasm-bindgen", ] [[package]] name = "libc" -version = "0.2.149" +version = "0.2.152" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" +checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7" [[package]] name = "litrs" @@ -705,9 +716,9 @@ checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "memchr" -version = "2.6.4" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" +checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" [[package]] name = "minimal-lexical" @@ -746,24 +757,24 @@ dependencies = [ [[package]] name = "object" -version = "0.32.1" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "percent-encoding" -version = "2.3.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pin-project" @@ -782,7 +793,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] @@ -816,12 +827,12 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "prettyplease" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" +checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5" dependencies = [ "proc-macro2", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] @@ -860,9 +871,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.69" +version = "1.0.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" +checksum = "95fc56cda0b5c3325f5fbbd7ff9fda9e02bb00bb3dac51252d2f1bfa1cb8cc8c" dependencies = [ "unicode-ident", ] @@ -886,9 +897,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.33" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ "proc-macro2", ] @@ -943,9 +954,9 @@ checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "ryu" -version = "1.0.15" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" +checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" [[package]] name = "scoped-tls" @@ -955,9 +966,9 @@ checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" [[package]] name = "serde" -version = "1.0.192" +version = "1.0.195" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bca2a08484b285dcb282d0f67b26cadc0df8b19f8c12502c13d966bf9482f001" +checksum = "63261df402c67811e9ac6def069e4786148c4563f4b50fd4bf30aa370d626b02" dependencies = [ "serde_derive", ] @@ -975,9 +986,9 @@ dependencies = [ [[package]] name = "serde-wasm-bindgen" -version = "0.6.1" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ba92964781421b6cef36bf0d7da26d201e96d84e1b10e7ae6ed416e516906d" +checksum = "b9b713f70513ae1f8d92665bbbbda5c295c2cf1da5542881ae5eefe20c9af132" dependencies = [ "js-sys", "serde", @@ -986,20 +997,20 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.192" +version = "1.0.195" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6c7207fbec9faa48073f3e3074cbe553af6ea512d7c21ba46e434e70ea9fbc1" +checksum = "46fe8f8603d81ba86327b23a2e9cdf49e1255fb94a4c5f297f6ee0547178ea2c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] name = "serde_json" -version = "1.0.107" +version = "1.0.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" +checksum = "176e46fa42316f18edd598015a5166857fc835ec732f5215eac6b7bdbf0a84f4" dependencies = [ "itoa", "ryu", @@ -1072,7 +1083,7 @@ dependencies = [ "proc-macro2", "quote", "stylist-core", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] @@ -1087,9 +1098,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.38" +version = "2.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" +checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" dependencies = [ "proc-macro2", "quote", @@ -1122,28 +1133,28 @@ version = "0.3.0" source = "git+https://github.com/simbleau/themer#136f597ad4a8e6a5aa93851958e0167c0d728735" dependencies = [ "quote", - "syn 2.0.38", + "syn 2.0.48", "themer-core", ] [[package]] name = "thiserror" -version = "1.0.50" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" +checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.50" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" +checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] @@ -1163,9 +1174,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.33.0" +version = "1.35.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f38200e3ef7995e5ef13baec2f432a6da0aa9ac495b2c0e8f3b7eec2c92d653" +checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104" dependencies = [ "backtrace", "pin-project-lite", @@ -1218,7 +1229,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] @@ -1232,9 +1243,9 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.13" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" +checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416" [[package]] name = "unicode-ident" @@ -1253,9 +1264,9 @@ dependencies = [ [[package]] name = "url" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ "form_urlencoded", "idna", @@ -1282,9 +1293,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.88" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7daec296f25a1bae309c0cd5c29c4b260e510e6d813c286b19eaadf409d40fce" +checksum = "b1223296a201415c7fad14792dbefaace9bd52b62d33453ade1c5b5f07555406" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -1292,24 +1303,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.88" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e397f4664c0e4e428e8313a469aaa58310d302159845980fd23b0f22a847f217" +checksum = "fcdc935b63408d58a32f8cc9738a0bffd8f05cc7c002086c6ef20b7312ad9dcd" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.38" +version = "0.4.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9afec9963e3d0994cac82455b2b3502b81a7f40f9a0d32181f7528d9f4b43e02" +checksum = "bde2032aeb86bdfaecc8b261eef3cba735cc426c1f3a3416d1e0791be95fc461" dependencies = [ "cfg-if", "js-sys", @@ -1319,9 +1330,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.88" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5961017b3b08ad5f3fe39f1e79877f8ee7c23c5e5fd5eb80de95abc41f1f16b2" +checksum = "3e4c238561b2d428924c49815533a8b9121c664599558a5d9ec51f8a1740a999" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1329,28 +1340,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.88" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5353b8dab669f5e10f5bd76df26a9360c748f054f862ff5f3f8aae0c7fb3907" +checksum = "bae1abb6806dc1ad9e560ed242107c0f6c84335f1749dd4e8ddb012ebd5e25a7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.88" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d046c5d029ba91a1ed14da14dca44b68bf2f124cfbaf741c54151fdb3e0750b" +checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b" [[package]] name = "wasm-bindgen-test" -version = "0.3.38" +version = "0.3.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6433b7c56db97397842c46b67e11873eda263170afeb3a2dc74a7cb370fee0d" +checksum = "139bd73305d50e1c1c4333210c0db43d989395b64a237bd35c10ef3832a7f70c" dependencies = [ "console_error_panic_hook", "js-sys", @@ -1362,20 +1373,20 @@ dependencies = [ [[package]] name = "wasm-bindgen-test-macro" -version = "0.3.38" +version = "0.3.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "493fcbab756bb764fa37e6bee8cec2dd709eb4273d06d0c282a5e74275ded735" +checksum = "70072aebfe5da66d2716002c729a14e4aec4da0e23cc2ea66323dac541c93928" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] name = "web-sys" -version = "0.3.65" +version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5db499c5f66323272151db0e666cd34f78617522fb0c1604d31a27c50c206a85" +checksum = "58cd2333b6e0be7a39605f0e255892fd7418a682d8da8fe042fe25128794d2ed" dependencies = [ "js-sys", "wasm-bindgen", @@ -1405,9 +1416,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.5.17" +version = "0.5.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3b801d0e0a6726477cc207f60162da452f3a95adb368399bef20a946e06f65c" +checksum = "b7cf47b659b318dccbd69cc4797a39ae128f533dce7902a1096044d1967b9c16" dependencies = [ "memchr", ] @@ -1449,7 +1460,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] @@ -1479,5 +1490,5 @@ checksum = "42bfd190a07ca8cfde7cd4c52b3ac463803dc07323db8c34daa697e86365978c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] diff --git a/Cargo.toml b/Cargo.toml index 4cccea8..eeb92c7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,7 +20,7 @@ yew = { version = "0.21", features = ["csr"] } yew-router = "0.18" stylist = { version = "0.13", features = ["yew_integration"] } themer = { git = "https://github.com/simbleau/themer", version = "0.3" } -hex_color = "2.0" +hex_color = "3" url = "2.4" wasm-bindgen = "0.2" gloo-utils = "0.2" diff --git a/README.md b/README.md index 82cee88..3cbb808 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Spencer C. Imbleau's Website -A repository containing the source code for my website. +The source code for my website. **To view the website, [click here](https://spencer.imbleau.com).** @@ -12,7 +12,7 @@ A repository containing the source code for my website. - Code is tested using [GitHub Actions](https://github.com/simbleau/website/actions/workflows/ci.yml) Deployment is automated by [GitHub Actions](https://github.com/simbleau/website/actions). -- Pushes to `main` trigger a new [`latest`](https://github.com/simbleau/website/releases/tag/latest) release and deploay to AWS. +- Pushes to `main` trigger a new [`latest`](https://github.com/simbleau/website/releases/tag/latest) release and deploy to AWS S3 + Cloudfront. ## 🔧 Development diff --git a/src/components/email_button.rs b/src/components/email_button.rs index 497fef9..d147d5f 100644 --- a/src/components/email_button.rs +++ b/src/components/email_button.rs @@ -1,7 +1,6 @@ use crate::{ components::{Icon, IconMask}, style::themes::ThemeChoice, - util::lighten, }; use stylist::yew::{styled_component, use_media_query}; use themer::yew::use_theme; @@ -37,13 +36,13 @@ pub fn EmailButton(props: &EmailButtonProps) -> Html { border-radius: ${BORDER_RADIUS}; width: ${WIDTH}; height: ${HEIGHT}; - background-color: ${theme.color}; - color: ${theme.background_color}; + background-color: ${theme.color.display_rgb()}; + color: ${theme.background_color.display_rgb()}; cursor: pointer; border: 0; &:hover { - background-color: ${lighten(&theme.color, 1.2)}; + background-color: ${ theme.color.scale(1.5).display_rgb() }; } }; @@ -72,8 +71,8 @@ pub fn EmailButton(props: &EmailButtonProps) -> Html { width: 200px; display: none; position: absolute; - background-color: ${theme.color}; - color: ${theme.background_color}; + background-color: ${theme.color.display_rgb()}; + color: ${theme.background_color.display_rgb()}; padding: 10px; border-radius: 5px; left: 120px; @@ -89,8 +88,8 @@ pub fn EmailButton(props: &EmailButtonProps) -> Html { let email_input_css = css! { font-family: inherit; font-size: 18px; - background-color: ${theme.background_color}; - color: ${theme.color}; + background-color: ${theme.background_color.display_rgb()}; + color: ${theme.color.display_rgb()}; border-radius: ${BORDER_RADIUS}; width: ${WIDTH}; height: ${HEIGHT}; @@ -98,7 +97,7 @@ pub fn EmailButton(props: &EmailButtonProps) -> Html { display: flex; border: ${BORDER_WIDTH}; border-style: solid; - border-color: ${theme.color}; + border-color: ${theme.color.display_rgb()}; vertical-align: baseline; text-align: center; }; diff --git a/src/components/icons/icon.rs b/src/components/icons/icon.rs index 4cd61ca..b81d215 100644 --- a/src/components/icons/icon.rs +++ b/src/components/icons/icon.rs @@ -1,11 +1,8 @@ -use crate::style::themes::ThemeChoice; - use super::IconMask; -use gloo_utils::window; +use crate::style::themes::ThemeChoice; use hex_color::HexColor; use stylist::css; use themer::yew::use_theme; -use web_sys::HtmlElement; use yew::prelude::*; #[derive(Properties, PartialEq)] @@ -26,44 +23,16 @@ pub struct Props { pub fn icon(props: &Props) -> Html { let theme = use_theme::(); - let height = use_state(|| "1em".to_string()); - let width = use_state(|| "1em".to_string()); - let icon_ref = use_node_ref(); - { - let mask = props.mask; - let height = height.clone(); - let width = width.clone(); - let icon_ref = icon_ref.clone(); - use_effect_with(icon_ref, move |icon_ref| { - if let Some(element) = icon_ref.cast::() { - let computed_height = window() - .get_computed_style(&element) - .unwrap() - .unwrap() - .get_property_value("font-size") - .unwrap(); - let computed_width = format!( - "calc({} * {})", - computed_height, - IconMask::aspect_ratio(mask) - ); - height.set(computed_height); - width.set(computed_width); - } - - move || {} - }); - } - let icon_style = css! { - width: ${*width}; - height: ${*height}; + height: 0.8rem; + width: ${ + format!("calc(0.8rem * {})", IconMask::aspect_ratio(props.mask)) + }; display: inline-block; text-align: center; vertical-align: middle; text-decoration: none; }; - let mask_style = css! { r#" -webkit-mask:url("${mask}"); @@ -71,20 +40,19 @@ pub fn icon(props: &Props) -> Html { transition: background 0s; "#, mask = props.mask, - bg = props.fill.unwrap_or(theme.color) + bg = props.fill.unwrap_or(theme.color).display_rgba() }; let mask_hover_style = props.hover_fill.map(|fill| { css! { &:hover { - background: ${fill}; + background: ${fill.display_rgba()}; } } }); html! { Html { pub const BORDER_WIDTH: &str = "3px"; pub const BORDER_RADIUS: &str = "10px"; - let bg_color = format!("{:#}", theme.color.with_a(u8::MAX / 15)); + let bg_color = + format!("{:#}", theme.color.with_a(u8::MAX / 15).display_rgba()); let ctr_css = css! { background-color: ${bg_color}; border-width: ${BORDER_WIDTH}; border-style: solid; - border-color: ${theme.color}; + border-color: ${theme.color.display_rgb()}; border-radius: ${BORDER_RADIUS}; overflow: hidden; diff --git a/src/components/links/external_link.rs b/src/components/links/external_link.rs index de0980e..88854ee 100644 --- a/src/components/links/external_link.rs +++ b/src/components/links/external_link.rs @@ -27,10 +27,10 @@ pub fn view(props: &ExternalLinkProps) -> Html { display: inline-block; } & *[data-aui-id="linkicon"] { - background-color: ${theme.link}; + background-color: ${theme.link.display_rgb()}; } &:hover *[data-aui-id="linkicon"] { - background-color: ${theme.link_hover}; + background-color: ${theme.link_hover.display_rgb()}; } }; diff --git a/src/components/links/internal_link.rs b/src/components/links/internal_link.rs index 8865290..80f486d 100644 --- a/src/components/links/internal_link.rs +++ b/src/components/links/internal_link.rs @@ -33,10 +33,10 @@ where display: inline-block; } & *[data-aui-id="linkicon"] { - background-color: ${theme.link}; + background-color: ${theme.link.display_rgb()}; } &:hover *[data-aui-id="linkicon"] { - background-color: ${theme.link_hover}; + background-color: ${theme.link_hover.display_rgb()}; } }; diff --git a/src/components/nav_link.rs b/src/components/nav_link.rs index d734196..b59453f 100644 --- a/src/components/nav_link.rs +++ b/src/components/nav_link.rs @@ -29,11 +29,11 @@ pub fn NavLink(props: &Props) -> Html { width: 0%; transition: width 0.2s ease-out, background-color 0.5s; - background-color: ${theme.link}; + background-color: ${theme.link.display_rgb()}; } &:hover > a > span > #underline { width: 100%; - background-color: ${theme.link_hover}; + background-color: ${theme.link_hover.display_rgb()}; } }; diff --git a/src/components/pfp.rs b/src/components/pfp.rs index 38fdb0f..4ea96a0 100644 --- a/src/components/pfp.rs +++ b/src/components/pfp.rs @@ -25,7 +25,7 @@ pub fn ProfilePicture(props: &ProfilePictureProps) -> Html { /* Outline */ border-width: ${BORDER_WIDTH}; border-style: solid; - border-color: ${theme.color}; + border-color: ${theme.color.display_rgb()}; }; html! { diff --git a/src/components/spinner.rs b/src/components/spinner.rs index 4c232db..2cc0c45 100644 --- a/src/components/spinner.rs +++ b/src/components/spinner.rs @@ -43,7 +43,7 @@ pub fn spinner() -> Html { stroke: ${stroke}; } "#, - stroke = theme.color + stroke = theme.color.display_rgb() }; let view_box = { diff --git a/src/components/tap_target.rs b/src/components/tap_target.rs index d1c7fc0..8335bc4 100644 --- a/src/components/tap_target.rs +++ b/src/components/tap_target.rs @@ -1,16 +1,12 @@ use crate::{ components::{Icon, IconMask}, style::themes::ThemeChoice, - util::lighten, }; use hex_color::HexColor; -use stylist::css; +use stylist::{css, yew::use_media_query}; use themer::yew::use_theme; use yew::prelude::*; -const SIZE: &str = "64px"; -const FG_SIZE: &str = "32px"; - #[derive(Properties, PartialEq)] pub struct Props { pub mask: IconMask, @@ -28,6 +24,13 @@ pub struct Props { pub fn view(props: &Props) -> Html { let theme = use_theme::(); + let is_mobile = use_media_query("(max-width: 992px)"); + let (size, fg_size) = if is_mobile { + ("48px", "24px") + } else { + ("64px", "32px") + }; + // Coloring let bg = match props.background { Some(c) => c, @@ -37,13 +40,8 @@ pub fn view(props: &Props) -> Html { Some(c) => c, None => theme.color, }; - let bg_hov = lighten(&bg, 0.8); - let fg_hov = lighten(&fg, 1.2); - - let fg = format!("{fg:#}"); - let bg = format!("{bg:#}"); - let fg_hov = format!("{fg_hov:#}"); - let bg_hov = format!("{bg_hov:#}"); + let bg_hov = bg.scale(0.8).display_rgba(); + let fg_hov = fg.scale(1.2).display_rgba(); let style = css! { display: inline-block; @@ -54,11 +52,11 @@ pub fn view(props: &Props) -> Html { justify-content: center; cursor:pointer; - width: ${SIZE}; - height: ${SIZE}; + width: ${size}; + height: ${size}; transition: background-color 0.5s; - background-color: ${bg}; + background-color: ${bg.display_rgba()}; &:hover { background-color: ${bg_hov}; @@ -66,15 +64,15 @@ pub fn view(props: &Props) -> Html { & > i { transition: width 0.25s, height 0.25s; - background: ${fg}; - width: ${format!("calc({} * {})", FG_SIZE, IconMask::aspect_ratio(props.mask))}; - height: ${FG_SIZE}; + background: ${fg.display_rgba()}; + width: ${format!("calc({} * {})", fg_size, IconMask::aspect_ratio(props.mask))}; + height: ${fg_size}; } &:hover > i { background: ${fg_hov}; - width: ${format!("calc({} * {})", FG_SIZE, IconMask::aspect_ratio(props.mask) * 1.25)}; - height: ${format!("calc({} * {})", FG_SIZE, 1.25)}; + width: ${format!("calc({} * {})", fg_size, IconMask::aspect_ratio(props.mask) * 1.25)}; + height: ${format!("calc({} * {})", fg_size, 1.25)}; } }; diff --git a/src/main.rs b/src/main.rs index 6fdfa3f..f11fe9a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -5,7 +5,6 @@ mod navigation; mod pages; mod router; mod style; -mod util; use crate::{ header::Header, diff --git a/src/style/global.rs b/src/style/global.rs index 67b952a..c941fbc 100644 --- a/src/style/global.rs +++ b/src/style/global.rs @@ -10,7 +10,7 @@ pub fn use_global_css() -> (StyleSource, StyleSource) { let is_mobile = use_media_query("(max-width: 992px)"); let is_tablet = use_media_query("(max-width: 1200px)"); - // FIXME: https://github.com/futursolo/stylist-rs/issues/147 + // FIXME: after https://github.com/futursolo/stylist-rs/issues/147 let buggy_css = css! { r#" a:hover { @@ -18,7 +18,7 @@ pub fn use_global_css() -> (StyleSource, StyleSource) { text-decoration: underline; } "#, - link_hover = theme.link_hover + link_hover = theme.link_hover.display_rgb() }; let global_css = css! { @@ -44,8 +44,8 @@ pub fn use_global_css() -> (StyleSource, StyleSource) { /* Theme Application */ transition-property: background-color, font-size, width, height; transition-duration: 250ms; - background-color: ${theme.background_color}; - color: ${theme.color}; + background-color: ${theme.background_color.display_rgb()}; + color: ${theme.color.display_rgb()}; /* Headers */ h1, @@ -59,7 +59,7 @@ pub fn use_global_css() -> (StyleSource, StyleSource) { /* Links */ a { - color: ${theme.link}; + color: ${theme.link.display_rgb()}; text-decoration:none; } diff --git a/src/style/themes/dark_theme.rs b/src/style/themes/dark_theme.rs index 8cf61f5..50bca14 100644 --- a/src/style/themes/dark_theme.rs +++ b/src/style/themes/dark_theme.rs @@ -1,4 +1,4 @@ -use crate::{style::themes::ThemeSpec, util::lighten}; +use crate::style::themes::ThemeSpec; use hex_color::HexColor; use once_cell::sync::Lazy; @@ -6,7 +6,7 @@ pub static DARK_THEME: Lazy = Lazy::new(|| ThemeSpec { color: HexColor::from_u24(0xcccccc), background_color: HexColor::from_u24(0x222222), link: HexColor::from_u24(0x3399FF), - link_hover: { lighten(&HexColor::from_u24(0x3399FF), 1.2) }, + link_hover: HexColor::from_u24(0x3399FF).scale(1.2), body_font: "Barlow", mono_font: "Barlow", fsm: "1.2rem", diff --git a/src/util.rs b/src/util.rs deleted file mode 100644 index 5f7df92..0000000 --- a/src/util.rs +++ /dev/null @@ -1,16 +0,0 @@ -use hex_color::HexColor; - -pub fn lighten(c: &HexColor, l: f32) -> HexColor { - let (r, g, b, a) = c.split(); - let (r, g, b) = ( - (r as f32 * l).min(u8::MAX as f32) as u8, - (g as f32 * l).min(u8::MAX as f32) as u8, - (b as f32 * l).min(u8::MAX as f32) as u8, - ); - HexColor::from_u32( - (0xff & r as u32) << 24 - | (0xff & g as u32) << 16 - | (0xff & b as u32) << 8 - | a as u32, - ) -}