diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bcf1837e9b..883fea7af5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -153,7 +153,7 @@ jobs: - name: Install native dependencies if: runner.os == 'Linux' - run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev + run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libfontconfig1-dev - name: Restore cache uses: Swatinem/rust-cache@v2 @@ -246,7 +246,7 @@ jobs: - name: Install native dependencies if: runner.os == 'Linux' - run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev + run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libfontconfig1-dev # Adapted from https://github.com/bevyengine/bevy/blob/b446374392adc70aceb92621b080d1a6cf7a7392/.github/workflows/validation-jobs.yml#L74-L79 - name: Install xvfb, llvmpipe and lavapipe @@ -380,7 +380,7 @@ jobs: - name: Install native dependencies if: runner.os == 'Linux' - run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev + run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libfontconfig1-dev - name: Restore cache uses: Swatinem/rust-cache@v2 @@ -445,6 +445,10 @@ jobs: with: save-if: ${{ github.event_name != 'merge_group' }} + - name: Install native dependencies + if: runner.os == 'Linux' + run: sudo apt-get update; sudo apt-get install --no-install-recommends libfontconfig1-dev + # We test documentation using nightly to match docs.rs. - name: Run cargo doc run: cargo doc --workspace --locked --profile ci --all-features --no-deps --document-private-items -Zunstable-options -Zrustdoc-scrape-examples diff --git a/Cargo.lock b/Cargo.lock index eea55d345d..3213549fe0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -127,9 +127,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" dependencies = [ "memchr", ] @@ -429,18 +429,6 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" -[[package]] -name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - -[[package]] -name = "base64" -version = "0.21.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" - [[package]] name = "base64" version = "0.22.1" @@ -566,9 +554,9 @@ checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" [[package]] name = "bytes" -version = "1.10.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" +checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3" [[package]] name = "calloop" @@ -584,23 +572,48 @@ dependencies = [ "thiserror 1.0.69", ] +[[package]] +name = "calloop" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb9f6e1368bd4621d2c86baa7e37de77a938adf5221e5dd3d6133340101b309e" +dependencies = [ + "bitflags 2.10.0", + "polling", + "rustix 1.1.2", + "slab", + "tracing", +] + [[package]] name = "calloop-wayland-source" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95a66a987056935f7efce4ab5668920b5d0dac4a7c99991a67395f13702ddd20" dependencies = [ - "calloop", + "calloop 0.13.0", "rustix 0.38.44", "wayland-backend", "wayland-client", ] +[[package]] +name = "calloop-wayland-source" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "138efcf0940a02ebf0cc8d1eff41a1682a46b431630f4c52450d6265876021fa" +dependencies = [ + "calloop 0.14.3", + "rustix 1.1.2", + "wayland-backend", + "wayland-client", +] + [[package]] name = "cc" -version = "1.2.43" +version = "1.2.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "739eb0f94557554b3ca9a86d2d37bebd49c5e6d0c1d2bda35ba5bdac830befc2" +checksum = "cd405d82c84ff7f35739f175f67d8b9fb7687a0e84ccdc78bd3568839827cf07" dependencies = [ "find-msvc-tools", "jobserver", @@ -854,9 +867,9 @@ checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" [[package]] name = "crypto-common" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" dependencies = [ "generic-array", "typenum", @@ -956,15 +969,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" -[[package]] -name = "encoding_rs" -version = "0.8.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" -dependencies = [ - "cfg-if", -] - [[package]] name = "endi" version = "1.1.0" @@ -1075,9 +1079,9 @@ dependencies = [ [[package]] name = "find-msvc-tools" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52051878f80a721bb68ebfbc930e07b65ba72f2da88968ea5c06fd6ca3d3a127" +checksum = "3a3076410a55c90011c298b04d0cfa770b00fa04e1e3c97d3f6c9de105a03844" [[package]] name = "flate2" @@ -1095,12 +1099,6 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b09cf3155332e944990140d967ff5eceb70df778b34f77d8075db46e4704e6d8" -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - [[package]] name = "foldhash" version = "0.1.5" @@ -1115,21 +1113,21 @@ checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" [[package]] name = "font-types" -version = "0.10.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "511e2c18a516c666d27867d2f9821f76e7d591f762e9fc41dd6cc5c90fe54b0b" +checksum = "39a654f404bbcbd48ea58c617c2993ee91d1cb63727a37bf2323a4edeed1b8c5" dependencies = [ "bytemuck", ] [[package]] name = "fontique" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff3336bc0b87fe42305047263fa60d2eabd650d29cbe62fdeb2a66c7a0a595f9" +checksum = "30bbc252c93499b6d3635d692f892a637db0dbb130ce9b32bf20b28e0dcc470b" dependencies = [ "bytemuck", - "hashbrown 0.15.5", + "hashbrown 0.16.1", "icu_locale_core", "linebender_resource_handle", "memmap2", @@ -1288,9 +1286,9 @@ dependencies = [ [[package]] name = "generic-array" -version = "0.14.9" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bb6743198531e02858aeaea5398fcc883e71851fcbcb5a2f773e2fb6cb1edf2" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", @@ -1351,7 +1349,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c06f627b1a58ca3d42b45d6104bf1e1a03799df472df00988b6ba21accc10580" dependencies = [ "gloo-utils", - "http 1.3.1", + "http", "js-sys", "serde", "serde_json", @@ -1468,25 +1466,6 @@ dependencies = [ "svg_fmt", ] -[[package]] -name = "h2" -version = "0.3.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0beca50380b1fc32983fc1cb4587bfa4bb9e78fc259aad4a0032d2080309222d" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http 0.2.12", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", -] - [[package]] name = "half" version = "2.7.1" @@ -1518,16 +1497,14 @@ version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" dependencies = [ - "allocator-api2", - "equivalent", "foldhash 0.1.5", ] [[package]] name = "hashbrown" -version = "0.16.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" dependencies = [ "allocator-api2", "equivalent", @@ -1563,37 +1540,14 @@ dependencies = [ [[package]] name = "http" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http" -version = "1.3.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" +checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a" dependencies = [ "bytes", - "fnv", "itoa", ] -[[package]] -name = "http-body" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" -dependencies = [ - "bytes", - "http 0.2.12", - "pin-project-lite", -] - [[package]] name = "http-body" version = "1.0.1" @@ -1601,7 +1555,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", - "http 1.3.1", + "http", ] [[package]] @@ -1612,8 +1566,8 @@ checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" dependencies = [ "bytes", "futures-core", - "http 1.3.1", - "http-body 1.0.1", + "http", + "http-body", "pin-project-lite", ] @@ -1623,48 +1577,18 @@ version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" -[[package]] -name = "httpdate" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" - -[[package]] -name = "hyper" -version = "0.14.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2", - "http 0.2.12", - "http-body 0.4.6", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "socket2 0.5.10", - "tokio", - "tower-service", - "tracing", - "want", -] - [[package]] name = "hyper" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3aa54a13a0dfe7fbe3a59e0c76093041720fdc77b110cc0fc260fafb4dc51e" +checksum = "2ab2d4f250c3d7b1c9fcdff1cece94ea4e2dfbec68614f7b87cb205f24ca9d11" dependencies = [ "atomic-waker", "bytes", "futures-channel", "futures-core", - "http 1.3.1", - "http-body 1.0.1", + "http", + "http-body", "httparse", "itoa", "pin-project-lite", @@ -1674,56 +1598,42 @@ dependencies = [ "want", ] -[[package]] -name = "hyper-rustls" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" -dependencies = [ - "futures-util", - "http 0.2.12", - "hyper 0.14.32", - "rustls 0.21.12", - "tokio", - "tokio-rustls 0.24.1", -] - [[package]] name = "hyper-rustls" version = "0.27.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" dependencies = [ - "http 1.3.1", - "hyper 1.7.0", + "http", + "hyper", "hyper-util", - "rustls 0.23.34", + "rustls", "rustls-pki-types", "tokio", - "tokio-rustls 0.26.4", + "tokio-rustls", "tower-service", - "webpki-roots 1.0.3", + "webpki-roots", ] [[package]] name = "hyper-util" -version = "0.1.17" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c6995591a8f1380fcb4ba966a252a4b29188d51d2b89e3a252f5305be65aea8" +checksum = "52e9a2a24dc5c6821e71a7030e1e14b7b632acac55c40e9d2e082c621261bb56" dependencies = [ - "base64 0.22.1", + "base64", "bytes", "futures-channel", "futures-core", "futures-util", - "http 1.3.1", - "http-body 1.0.1", - "hyper 1.7.0", + "http", + "http-body", + "hyper", "ipnet", "libc", "percent-encoding", "pin-project-lite", - "socket2 0.6.1", + "socket2", "tokio", "tower-service", "tracing", @@ -1755,9 +1665,9 @@ dependencies = [ [[package]] name = "icu_collections" -version = "2.0.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "200072f5d0e3614556f94a9930d5dc3e0662a652823904c3a75dc3b0af7fee47" +checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43" dependencies = [ "displaydoc", "potential_utf", @@ -1768,12 +1678,13 @@ dependencies = [ [[package]] name = "icu_locale_core" -version = "2.0.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cde2700ccaed3872079a65fb1a78f6c0a36c91570f28755dda67bc8f7d9f00a" +checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6" dependencies = [ "displaydoc", "litemap", + "serde", "tinystr", "writeable", "zerovec", @@ -1781,11 +1692,10 @@ dependencies = [ [[package]] name = "icu_normalizer" -version = "2.0.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436880e8e18df4d7bbc06d58432329d6458cc84531f7ac5f024e93deadb37979" +checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599" dependencies = [ - "displaydoc", "icu_collections", "icu_normalizer_data", "icu_properties", @@ -1796,42 +1706,38 @@ dependencies = [ [[package]] name = "icu_normalizer_data" -version = "2.0.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00210d6893afc98edb752b664b8890f0ef174c8adbb8d0be9710fa66fbbf72d3" +checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" [[package]] name = "icu_properties" -version = "2.0.1" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "016c619c1eeb94efb86809b015c58f479963de65bdb6253345c1a1276f22e32b" +checksum = "e93fcd3157766c0c8da2f8cff6ce651a31f0810eaa1c51ec363ef790bbb5fb99" dependencies = [ - "displaydoc", "icu_collections", "icu_locale_core", "icu_properties_data", "icu_provider", - "potential_utf", "zerotrie", "zerovec", ] [[package]] name = "icu_properties_data" -version = "2.0.1" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "298459143998310acd25ffe6810ed544932242d3f07083eee1084d83a71bd632" +checksum = "02845b3647bb045f1100ecd6480ff52f34c35f82d9880e029d329c21d1054899" [[package]] name = "icu_provider" -version = "2.0.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03c80da27b5f4187909049ee2d72f276f0d9f99a42c306bd0131ecfe04d8e5af" +checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614" dependencies = [ "displaydoc", "icu_locale_core", - "stable_deref_trait", - "tinystr", "writeable", "yoke", "zerofrom", @@ -1862,9 +1768,9 @@ dependencies = [ [[package]] name = "image" -version = "0.25.8" +version = "0.25.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "529feb3e6769d234375c4cf1ee2ce713682b8e76538cb13f9fc23e1400a591e7" +checksum = "e6506c6c10786659413faa717ceebcb8f70731c0a60cbae39795fdf114519c1a" dependencies = [ "bytemuck", "byteorder-lite", @@ -1877,19 +1783,19 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.12.0" +version = "2.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6717a8d2a5a929a1a2eb43a12812498ed141a0bcfb7e8f7844fbdbe4303bba9f" +checksum = "0ad4bb2b565bca0645f4d68c5c9af97fba094e9791da685bf83cb5f3ce74acf2" dependencies = [ "equivalent", - "hashbrown 0.16.0", + "hashbrown 0.16.1", ] [[package]] name = "insta" -version = "1.43.2" +version = "1.44.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46fdb647ebde000f43b5b53f773c30cf9b0cb4300453208713fa38b2c70935a0" +checksum = "e8732d3774162a0851e3f2b150eb98f31a9885dd75985099421d393385a01dfd" dependencies = [ "console", "once_cell", @@ -1904,9 +1810,9 @@ checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" [[package]] name = "iri-string" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbc5ebe9c3a1a7a5127f920a418f7585e9e758e911d0466ed004f393b0e380b2" +checksum = "4f867b9d1d896b67beb18518eda36fdb77a32ea590de864f1325b294a6d14397" dependencies = [ "memchr", "serde", @@ -1958,9 +1864,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.81" +version = "0.3.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec48937a97411dcb524a265206ccd4c90bb711fca92b2792c407f268825b9305" +checksum = "b011eec8cc36da2aab2d5cff675ec18454fad408585853910a202391cf9f8e65" dependencies = [ "once_cell", "wasm-bindgen", @@ -2018,18 +1924,18 @@ checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976" [[package]] name = "libdeflate-sys" -version = "1.24.0" +version = "1.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "805824325366c44599dfeb62850fe3c7d7b3e3d75f9ab46785bc7dba3676815c" +checksum = "23bd6304ebf75390d8a99b88bdf2a266f62647838140cb64af8e6702f6e3fddc" dependencies = [ "cc", ] [[package]] name = "libdeflater" -version = "1.24.0" +version = "1.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b270bcc7e9d6dce967a504a55b1b0444f966aa9184e8605b531bc0492abb30bb" +checksum = "d5d4880e6d634d3d029d65fa016038e788cc728a17b782684726fb34ee140caf" dependencies = [ "libdeflate-sys", ] @@ -2081,9 +1987,9 @@ checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" [[package]] name = "litemap" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" +checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" [[package]] name = "litrs" @@ -2235,9 +2141,9 @@ dependencies = [ [[package]] name = "megalodon" -version = "1.0.3" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "573c2e534bb55f5ef3517dcc1465974465512cbca7bc8670a3df0b8370b99482" +checksum = "9a6924be8c067f84990da4d8a4a47c7de3e810789dbd9af742c5fcc729a209ff" dependencies = [ "async-trait", "chrono", @@ -2247,7 +2153,7 @@ dependencies = [ "oauth2", "rand 0.8.5", "regex", - "reqwest 0.12.24", + "reqwest", "serde", "serde_json", "sha1", @@ -2474,16 +2380,16 @@ dependencies = [ [[package]] name = "oauth2" -version = "4.4.2" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c38841cdd844847e3e7c8d29cef9dcfed8877f8f56f9071f77843ecf3baf937f" +checksum = "51e219e79014df21a225b1860a479e2dcd7cbd9130f4defd4bd0e191ea31d67d" dependencies = [ - "base64 0.13.1", + "base64", "chrono", "getrandom 0.2.16", - "http 0.2.12", + "http", "rand 0.8.5", - "reqwest 0.11.27", + "reqwest", "serde", "serde_json", "serde_path_to_error", @@ -2756,9 +2662,9 @@ checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" [[package]] name = "orbclient" -version = "0.3.48" +version = "0.3.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba0b26cec2e24f08ed8bb31519a9333140a6599b867dac464bb150bdb796fd43" +checksum = "247ad146e19b9437f8604c21f8652423595cf710ad108af40e77d3ae6e96b827" dependencies = [ "libredox", ] @@ -2836,14 +2742,14 @@ dependencies = [ [[package]] name = "parley" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26746861bb76dbc9bcd5ed1b0b55d2fedf291100961251702a031ab2abd2ce52" +checksum = "ada5338c3a9794af7342e6f765b6e78740db37378aced034d7bf72c96b94ed94" dependencies = [ "accesskit", "fontique", "harfrust", - "hashbrown 0.15.5", + "hashbrown 0.16.1", "linebender_resource_handle", "skrifa", "swash", @@ -2931,7 +2837,7 @@ dependencies = [ "html5gum", "image", "megalodon", - "reqwest 0.12.24", + "reqwest", "serde", "serde_json", "tracing", @@ -3001,9 +2907,9 @@ dependencies = [ [[package]] name = "potential_utf" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84df19adbe5b5a0782edcab45899906947ab039ccf4573713735ee7de1e6b08a" +checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" dependencies = [ "zerovec", ] @@ -3107,8 +3013,8 @@ dependencies = [ "quinn-proto", "quinn-udp", "rustc-hash 2.1.1", - "rustls 0.23.34", - "socket2 0.6.1", + "rustls", + "socket2", "thiserror 2.0.17", "tokio", "tracing", @@ -3127,7 +3033,7 @@ dependencies = [ "rand 0.9.2", "ring", "rustc-hash 2.1.1", - "rustls 0.23.34", + "rustls", "rustls-pki-types", "slab", "thiserror 2.0.17", @@ -3145,16 +3051,16 @@ dependencies = [ "cfg_aliases", "libc", "once_cell", - "socket2 0.6.1", + "socket2", "tracing", "windows-sys 0.60.2", ] [[package]] name = "quote" -version = "1.0.41" +version = "1.0.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce25767e7b499d1b604768e7cde645d14cc8584231ea6b295e9c9eb22c02e1d1" +checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f" dependencies = [ "proc-macro2", ] @@ -3317,62 +3223,21 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19b30a45b0cd0bcca8037f3d0dc3421eaf95327a17cad11964fb8179b4fc4832" -[[package]] -name = "reqwest" -version = "0.11.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" -dependencies = [ - "base64 0.21.7", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "h2", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.32", - "hyper-rustls 0.24.2", - "ipnet", - "js-sys", - "log", - "mime", - "once_cell", - "percent-encoding", - "pin-project-lite", - "rustls 0.21.12", - "rustls-pemfile", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper 0.1.2", - "system-configuration", - "tokio", - "tokio-rustls 0.24.1", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "webpki-roots 0.25.4", - "winreg", -] - [[package]] name = "reqwest" version = "0.12.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d0946410b9f7b082a427e4ef5c8ff541a88b357bc6c637c40db3a68ac70a36f" dependencies = [ - "base64 0.22.1", + "base64", "bytes", "futures-core", "futures-util", - "http 1.3.1", - "http-body 1.0.1", + "http", + "http-body", "http-body-util", - "hyper 1.7.0", - "hyper-rustls 0.27.7", + "hyper", + "hyper-rustls", "hyper-util", "js-sys", "log", @@ -3380,14 +3245,14 @@ dependencies = [ "percent-encoding", "pin-project-lite", "quinn", - "rustls 0.23.34", + "rustls", "rustls-pki-types", "serde", "serde_json", "serde_urlencoded", - "sync_wrapper 1.0.2", + "sync_wrapper", "tokio", - "tokio-rustls 0.26.4", + "tokio-rustls", "tokio-util", "tower", "tower-http", @@ -3397,7 +3262,7 @@ dependencies = [ "wasm-bindgen-futures", "wasm-streams", "web-sys", - "webpki-roots 1.0.3", + "webpki-roots", ] [[package]] @@ -3425,9 +3290,12 @@ dependencies = [ [[package]] name = "roxmltree" -version = "0.20.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c20b6793b5c2fa6553b250154b78d6d0db37e72700ae35fad9387a46f487c97" +checksum = "f1964b10c76125c36f8afe190065a4bf9a87bf324842c05701330bba9f1cacbb" +dependencies = [ + "memchr", +] [[package]] name = "rustc-hash" @@ -3469,26 +3337,14 @@ dependencies = [ [[package]] name = "rustls" -version = "0.21.12" +version = "0.23.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" -dependencies = [ - "log", - "ring", - "rustls-webpki 0.101.7", - "sct", -] - -[[package]] -name = "rustls" -version = "0.23.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a9586e9ee2b4f8fab52a0048ca7334d7024eef48e2cb9407e3497bb7cab7fa7" +checksum = "533f54bc6a7d4f647e46ad909549eda97bf5afc1585190ef692b4286b198bd8f" dependencies = [ "once_cell", "ring", "rustls-pki-types", - "rustls-webpki 0.103.7", + "rustls-webpki", "subtle", "zeroize", ] @@ -3505,15 +3361,6 @@ dependencies = [ "security-framework", ] -[[package]] -name = "rustls-pemfile" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" -dependencies = [ - "base64 0.21.7", -] - [[package]] name = "rustls-pki-types" version = "1.13.0" @@ -3526,19 +3373,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.101.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "rustls-webpki" -version = "0.103.7" +version = "0.103.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e10b3f4191e8a80e6b43eebabfac91e5dcecebb27a71f04e820c47ec41d314bf" +checksum = "2ffdfa2f5286e2247234e03f680868ac2815974dc39e00ea15adc445d0aafe52" dependencies = [ "ring", "rustls-pki-types", @@ -3587,16 +3424,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" -[[package]] -name = "sct" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "sctk-adwaita" version = "0.10.1" @@ -3606,7 +3433,7 @@ dependencies = [ "ab_glyph", "log", "memmap2", - "smithay-client-toolkit", + "smithay-client-toolkit 0.19.2", "tiny-skia", ] @@ -3749,9 +3576,9 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "signal-hook-registry" -version = "1.4.6" +version = "1.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2a4719bff48cee6b39d12c020eeb490953ad2443b7055bd0b21fca26bd8c28b" +checksum = "7664a098b8e616bdfcc2dc0e9ac44eb231eedf41db4e9fe95d8d32ec728dedad" dependencies = [ "libc", ] @@ -3806,8 +3633,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3457dea1f0eb631b4034d61d4d8c32074caa6cd1ab2d59f2327bd8461e2c0016" dependencies = [ "bitflags 2.10.0", - "calloop", - "calloop-wayland-source", + "calloop 0.13.0", + "calloop-wayland-source 0.3.0", "cursor-icon", "libc", "log", @@ -3825,33 +3652,50 @@ dependencies = [ ] [[package]] -name = "smithay-clipboard" -version = "0.7.2" +name = "smithay-client-toolkit" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc8216eec463674a0e90f29e0ae41a4db573ec5b56b1c6c1c71615d249b6d846" +checksum = "0512da38f5e2b31201a93524adb8d3136276fa4fe4aafab4e1f727a82b534cc0" dependencies = [ + "bitflags 2.10.0", + "calloop 0.14.3", + "calloop-wayland-source 0.4.1", + "cursor-icon", "libc", - "smithay-client-toolkit", + "log", + "memmap2", + "rustix 1.1.2", + "thiserror 2.0.17", "wayland-backend", + "wayland-client", + "wayland-csd-frame", + "wayland-cursor", + "wayland-protocols", + "wayland-protocols-experimental", + "wayland-protocols-misc", + "wayland-protocols-wlr", + "wayland-scanner", + "xkeysym", ] [[package]] -name = "smol_str" -version = "0.2.2" +name = "smithay-clipboard" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd538fb6910ac1099850255cf94a94df6551fbdd602454387d0adb2d1ca6dead" +checksum = "71704c03f739f7745053bde45fa203a46c58d25bc5c4efba1d9a60e9dba81226" dependencies = [ - "serde", + "libc", + "smithay-client-toolkit 0.20.0", + "wayland-backend", ] [[package]] -name = "socket2" -version = "0.5.10" +name = "smol_str" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" +checksum = "dd538fb6910ac1099850255cf94a94df6551fbdd602454387d0adb2d1ca6dead" dependencies = [ - "libc", - "windows-sys 0.52.0", + "serde", ] [[package]] @@ -3948,21 +3792,15 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.108" +version = "2.0.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da58917d35242480a05c2897064da0a80589a2a0476c9a3f2fdc83b53502e917" +checksum = "390cc9a294ab71bdb1aa2e99d13be9c753cd2d7bd6560c77118597410c4d2e87" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] -[[package]] -name = "sync_wrapper" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" - [[package]] name = "sync_wrapper" version = "1.0.2" @@ -3983,27 +3821,6 @@ dependencies = [ "syn", ] -[[package]] -name = "system-configuration" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" -dependencies = [ - "bitflags 1.3.2", - "core-foundation 0.9.4", - "system-configuration-sys", -] - -[[package]] -name = "system-configuration-sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" -dependencies = [ - "core-foundation-sys", - "libc", -] - [[package]] name = "tap" version = "1.0.1" @@ -4141,11 +3958,12 @@ dependencies = [ [[package]] name = "tinystr" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d4f6d1145dcb577acf783d4e601bc1d76a13337bb54e6233add580b07344c8b" +checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" dependencies = [ "displaydoc", + "serde_core", "zerovec", ] @@ -4190,7 +4008,7 @@ dependencies = [ "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2 0.6.1", + "socket2", "tokio-macros", "windows-sys 0.61.2", ] @@ -4206,23 +4024,13 @@ dependencies = [ "syn", ] -[[package]] -name = "tokio-rustls" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" -dependencies = [ - "rustls 0.21.12", - "tokio", -] - [[package]] name = "tokio-rustls" version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" dependencies = [ - "rustls 0.23.34", + "rustls", "tokio", ] @@ -4245,19 +4053,19 @@ checksum = "489a59b6730eda1b0171fcfda8b121f4bee2b35cba8645ca35c5f7ba3eb736c1" dependencies = [ "futures-util", "log", - "rustls 0.23.34", + "rustls", "rustls-native-certs", "rustls-pki-types", "tokio", - "tokio-rustls 0.26.4", + "tokio-rustls", "tungstenite", ] [[package]] name = "tokio-util" -version = "0.7.16" +version = "0.7.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14307c986784f72ef81c89db7d9e28d6ac26d16213b109ea501696195e6e3ce5" +checksum = "2efa149fe76073d6e8fd97ef4f4eca7b67f599660115591483572e406e165594" dependencies = [ "bytes", "futures-core", @@ -4305,7 +4113,7 @@ dependencies = [ "futures-core", "futures-util", "pin-project-lite", - "sync_wrapper 1.0.2", + "sync_wrapper", "tokio", "tower-layer", "tower-service", @@ -4313,15 +4121,15 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.6.6" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2" +checksum = "9cf146f99d442e8e68e585f5d798ccd3cad9a7835b917e09728880a862706456" dependencies = [ "bitflags 2.10.0", "bytes", "futures-util", - "http 1.3.1", - "http-body 1.0.1", + "http", + "http-body", "iri-string", "pin-project-lite", "tower", @@ -4347,6 +4155,7 @@ version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" dependencies = [ + "log", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -4441,9 +4250,9 @@ dependencies = [ [[package]] name = "tracy-client" -version = "0.18.2" +version = "0.18.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef54005d3d760186fd662dad4b7bb27ecd5531cdef54d1573ebd3f20a9205ed7" +checksum = "91d722a05fe49b31fef971c4732a7d4aa6a18283d9ba46abddab35f484872947" dependencies = [ "loom", "once_cell", @@ -4452,9 +4261,9 @@ dependencies = [ [[package]] name = "tracy-client-sys" -version = "0.26.1" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "319c70195101a93f56db4c74733e272d720768e13471f400c78406a326b172b0" +checksum = "2fb391ac70462b3097a755618fbf9c8f95ecc1eb379a414f7b46f202ed10db1f" dependencies = [ "cc", "windows-targets 0.52.6", @@ -4464,7 +4273,7 @@ dependencies = [ name = "tree_arena" version = "0.2.0" dependencies = [ - "hashbrown 0.16.0", + "hashbrown 0.16.1", ] [[package]] @@ -4487,11 +4296,11 @@ checksum = "eadc29d668c91fcc564941132e17b28a7ceb2f3ebf0b9dae3e03fd7a6748eb0d" dependencies = [ "bytes", "data-encoding", - "http 1.3.1", + "http", "httparse", "log", "rand 0.9.2", - "rustls 0.23.34", + "rustls", "rustls-pki-types", "sha1", "thiserror 2.0.17", @@ -4546,9 +4355,9 @@ checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" [[package]] name = "unicode-ident" -version = "1.0.20" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "462eeb75aeb73aea900253ce739c8e18a67423fadf006037cd3ff27e82748a06" +checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" [[package]] name = "unicode-segmentation" @@ -4704,9 +4513,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.104" +version = "0.2.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1da10c01ae9f1ae40cbfac0bac3b1e724b320abfcf52229f80b547c0d250e2d" +checksum = "da95793dfc411fbbd93f5be7715b0578ec61fe87cb1a42b12eb625caa5c5ea60" dependencies = [ "cfg-if", "once_cell", @@ -4715,25 +4524,11 @@ dependencies = [ "wasm-bindgen-shared", ] -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.104" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "671c9a5a66f49d8a47345ab942e2cb93c7d1d0339065d4f8139c486121b43b19" -dependencies = [ - "bumpalo", - "log", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", -] - [[package]] name = "wasm-bindgen-futures" -version = "0.4.54" +version = "0.4.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e038d41e478cc73bae0ff9b36c60cff1c98b8f38f8d7e8061e79ee63608ac5c" +checksum = "551f88106c6d5e7ccc7cd9a16f312dd3b5d36ea8b4954304657d5dfba115d4a0" dependencies = [ "cfg-if", "js-sys", @@ -4744,9 +4539,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.104" +version = "0.2.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ca60477e4c59f5f2986c50191cd972e3a50d8a95603bc9434501cf156a9a119" +checksum = "04264334509e04a7bf8690f2384ef5265f05143a4bff3889ab7a3269adab59c2" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4754,22 +4549,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.104" +version = "0.2.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f07d2f20d4da7b26400c9f4a0511e6e0345b040694e8a75bd41d578fa4421d7" +checksum = "420bc339d9f322e562942d52e115d57e950d12d88983a14c79b86859ee6c7ebc" dependencies = [ + "bumpalo", "proc-macro2", "quote", "syn", - "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.104" +version = "0.2.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bad67dc8b2a1a6e5448428adec4c3e84c43e561d8c9ee8a9e5aabeb193ec41d1" +checksum = "76f218a38c84bcb33c25ec7059b07847d465ce0e0a76b995e134a45adcb6af76" dependencies = [ "unicode-ident", ] @@ -4847,6 +4642,32 @@ dependencies = [ "wayland-scanner", ] +[[package]] +name = "wayland-protocols-experimental" +version = "20250721.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40a1f863128dcaaec790d7b4b396cc9b9a7a079e878e18c47e6c2d2c5a8dcbb1" +dependencies = [ + "bitflags 2.10.0", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols-misc" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dfe33d551eb8bffd03ff067a8b44bb963919157841a99957151299a6307d19c" +dependencies = [ + "bitflags 2.10.0", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", +] + [[package]] name = "wayland-protocols-plasma" version = "0.3.9" @@ -4898,9 +4719,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.81" +version = "0.3.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9367c417a924a74cae129e6a2ae3b47fabb1f8995595ab474029da749a8be120" +checksum = "3a1f95c0d03a47f4ae1f7a64643a6bb97465d9b740f0fa8f90ea33915c99a9a1" dependencies = [ "js-sys", "wasm-bindgen", @@ -4918,15 +4739,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.25.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" - -[[package]] -name = "webpki-roots" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32b130c0d2d49f8b6889abc456e795e82525204f27c42cf767cf0d7734e089b8" +checksum = "b2878ef029c47c6e8cf779119f20fcf52bde7ad42a731b2a304bc221df17571e" dependencies = [ "rustls-pki-types", ] @@ -5335,15 +5150,6 @@ dependencies = [ "windows-targets 0.42.2", ] -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", -] - [[package]] name = "windows-sys" version = "0.52.0" @@ -5395,21 +5201,6 @@ dependencies = [ "windows_x86_64_msvc 0.42.2", ] -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", -] - [[package]] name = "windows-targets" version = "0.52.6" @@ -5458,12 +5249,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" @@ -5482,12 +5267,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - [[package]] name = "windows_aarch64_msvc" version = "0.52.6" @@ -5506,12 +5285,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - [[package]] name = "windows_i686_gnu" version = "0.52.6" @@ -5542,12 +5315,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - [[package]] name = "windows_i686_msvc" version = "0.52.6" @@ -5566,12 +5333,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - [[package]] name = "windows_x86_64_gnu" version = "0.52.6" @@ -5590,12 +5351,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" @@ -5614,12 +5369,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - [[package]] name = "windows_x86_64_msvc" version = "0.52.6" @@ -5644,7 +5393,7 @@ dependencies = [ "bitflags 2.10.0", "block2", "bytemuck", - "calloop", + "calloop 0.13.0", "cfg_aliases", "concurrent-queue", "core-foundation 0.9.4", @@ -5666,7 +5415,7 @@ dependencies = [ "redox_syscall 0.4.1", "rustix 0.38.44", "sctk-adwaita", - "smithay-client-toolkit", + "smithay-client-toolkit 0.19.2", "smol_str", "tracing", "unicode-segmentation", @@ -5693,16 +5442,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "winreg" -version = "0.50.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - [[package]] name = "wit-bindgen" version = "0.46.0" @@ -5711,9 +5450,9 @@ checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" [[package]] name = "writeable" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb" +checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" [[package]] name = "wyz" @@ -5781,7 +5520,7 @@ dependencies = [ "masonry", "masonry_winit", "profiling", - "reqwest 0.12.24", + "reqwest", "time", "tokio", "tracing", @@ -5795,7 +5534,7 @@ name = "xilem_core" version = "0.4.0" dependencies = [ "anymore", - "hashbrown 0.16.0", + "hashbrown 0.16.1", "kurbo", "tracing", ] @@ -5857,11 +5596,10 @@ dependencies = [ [[package]] name = "yoke" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f41bb01b8226ef4bfd589436a297c53d118f65921786300e427be8d487695cc" +checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954" dependencies = [ - "serde", "stable_deref_trait", "yoke-derive", "zerofrom", @@ -5869,9 +5607,9 @@ dependencies = [ [[package]] name = "yoke-derive" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" +checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" dependencies = [ "proc-macro2", "quote", @@ -5985,18 +5723,18 @@ checksum = "6df3dc4292935e51816d896edcd52aa30bc297907c26167fec31e2b0c6a32524" [[package]] name = "zerocopy" -version = "0.8.27" +version = "0.8.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0894878a5fa3edfd6da3f88c4805f4c8558e2b996227a3d864f47fe11e38282c" +checksum = "4ea879c944afe8a2b25fef16bb4ba234f47c694565e97383b36f3a878219065c" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.27" +version = "0.8.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d2b8d9c68ad2b9e4340d7832716a4d21a22a1154777ad56ea55c51a9cf3831" +checksum = "cf955aa904d6040f70dc8e9384444cb1030aed272ba3cb09bbc4ab9e7c1f34f5" dependencies = [ "proc-macro2", "quote", @@ -6032,9 +5770,9 @@ checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" [[package]] name = "zerotrie" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36f0bbd478583f79edad978b407914f61b2972f5af6fa089686016be8f9af595" +checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851" dependencies = [ "displaydoc", "yoke", @@ -6043,10 +5781,11 @@ dependencies = [ [[package]] name = "zerovec" -version = "0.11.4" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7aa2bd55086f1ab526693ecbe444205da57e25f4489879da80635a46d90e73b" +checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" dependencies = [ + "serde", "yoke", "zerofrom", "zerovec-derive", @@ -6054,9 +5793,9 @@ dependencies = [ [[package]] name = "zerovec-derive" -version = "0.11.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" +checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" dependencies = [ "proc-macro2", "quote", @@ -6065,15 +5804,15 @@ dependencies = [ [[package]] name = "zune-core" -version = "0.4.12" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f423a2c17029964870cfaabb1f13dfab7d092a62a29a89264f4d36990ca414a" +checksum = "111f7d9820f05fd715df3144e254d6fc02ee4088b0644c0ffd0efc9e6d9d2773" [[package]] name = "zune-jpeg" -version = "0.4.21" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29ce2c8a9384ad323cf564b67da86e21d3cfdff87908bc1223ed5c99bc792713" +checksum = "dc6fb7703e32e9a07fb3f757360338b3a567a5054f21b5f52a666752e333d58e" dependencies = [ "zune-core", ] diff --git a/Cargo.toml b/Cargo.toml index 50fb07ee86..8634ba7eaa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -50,7 +50,7 @@ tree_arena = { version = "0.2.0", path = "tree_arena" } anymore = "1.0.0" vello = { version = "0.6.0", default-features = false, features = ["wgpu"] } kurbo = "0.12.0" -parley = { version = "0.6.0", features = ["accesskit"] } +parley = { version = "0.7.0", features = ["accesskit"] } # TODO: Use no_std correctly in Xilem Web. peniko = "0.5.0" winit = "0.30.12" diff --git a/README.md b/README.md index eea4ed0e6a..841ee4f2d8 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,21 @@ Xilem and Masonry are built on top of: +## Getting started + +After cloning this repository, you can try running the examples, such as the `to_do_mvc` example shown above: + +```sh +cargo run --example to_do_mvc +``` + +To add Xilem as a dependency to your project, run + +```sh +cargo add xilem +``` + + ## Prerequisites ### Linux and BSD diff --git a/masonry/README.md b/masonry/README.md index cec9feb389..ff0fe7bba7 100644 --- a/masonry/README.md +++ b/masonry/README.md @@ -22,20 +22,26 @@ Full documentation at https://github.com/orium/cargo-rdme --> -[vello]: https://crates.io/crates/vello -[vello::wgpu]: https://crates.io/crates/wgpu -[parley]: https://crates.io/crates/parley [accesskit]: https://crates.io/crates/accesskit +[parley]: https://crates.io/crates/parley [tracing]: https://crates.io/crates/tracing +[vello::wgpu]: https://crates.io/crates/wgpu +[vello]: https://crates.io/crates/vello + + +[masonry_core]: https://crates.io/crates/masonry_core +[masonry_testing]: https://crates.io/crates/masonry_testing +[masonry_winit]: https://crates.io/crates/masonry_winit [to-do-screenshot]: ./screenshots/example_to_do_list_initial.png + Masonry is a foundational framework for building GUI libraries in Rust. -The developers of Masonry are developing [Xilem], a reactive UI library built on top of Masonry. +The developers of Masonry are developing [Xilem][], a reactive UI library built on top of Masonry. Masonry's API is geared towards creating GUI libraries; if you are creating an application, we recommend also considering Xilem. Masonry gives you a platform-independent manager, which owns and maintains a widget tree. @@ -54,7 +60,7 @@ Masonry is built on top of: Masonry can be used with any windowing library which allows the window content to be rendered using `wgpu`. There are currently two backends for using Masonry to create operating system windows: -- [masonry_winit] for most platforms. +- [Masonry Winit][masonry_winit] for most platforms. - `masonry_android_view` for Android. This can currently be found in the [Android View repository](https://github.com/rust-mobile/android-view), and is not yet generally usable. @@ -62,7 +68,7 @@ There are currently two backends for using Masonry to create operating system wi ## Example -The to-do-list example looks like this, using `masonry_winit` as the backend: +The to-do-list example looks like this, using Masonry Winit as the backend: ```rust use masonry::core::{ErasedAction, NewWidget, Properties, Widget, WidgetId, WidgetTag}; @@ -176,11 +182,11 @@ Running this will open a window that looks like this: The following crate [feature flags](https://doc.rust-lang.org/cargo/reference/features.html#dependency-features) are available: -- `default`: Enables the default features of [`masonry_core`][masonry_core], [`masonry_testing`][masonry_testing] - (if enabled via the `testing` feature) and [`vello`]. +- `default`: Enables the default features of [Masonry Core][masonry_core], [Masonry Testing][masonry_testing] + (if enabled via the `testing` feature), and [Vello][vello]. - `tracy`: Enables creating output for the [Tracy](https://github.com/wolfpld/tracy) profiler using [`tracing-tracy`][tracing_tracy]. This can be used by installing Tracy and connecting to a Masonry with this feature enabled. -- `testing`: Re-exports the test harness from [`masonry_testing`][masonry_testing]. +- `testing`: Re-exports the test harness from [Masonry Testing][masonry_testing]. ## Debugging features @@ -192,14 +198,12 @@ Masonry apps currently ship with several debugging features built in: If you want to use your own subscriber, simply set it before starting masonry - in this case masonry will not set a subscriber. -[masonry_core]: https://crates.io/crates/masonry_core -[masonry_testing]: https://crates.io/crates/masonry_testing [masonry_winit]: https://crates.io/crates/masonry_winit [Xilem]: https://github.com/linebender/xilem/tree/main/xilem [tracing_tracy]: https://crates.io/crates/tracing-tracy - + ## Minimum supported Rust Version (MSRV) diff --git a/masonry/screenshots/checkbox_focus_focused.png b/masonry/screenshots/checkbox_focus_focused.png index 8ba293292f..dca77d7dd2 100644 Binary files a/masonry/screenshots/checkbox_focus_focused.png and b/masonry/screenshots/checkbox_focus_focused.png differ diff --git a/masonry/screenshots/passthrough_initial_label_A.png b/masonry/screenshots/passthrough_initial_label_A.png new file mode 100644 index 0000000000..afbe412e7b Binary files /dev/null and b/masonry/screenshots/passthrough_initial_label_A.png differ diff --git a/masonry/screenshots/passthrough_replaced_label_B.png b/masonry/screenshots/passthrough_replaced_label_B.png new file mode 100644 index 0000000000..0bf6db7417 Binary files /dev/null and b/masonry/screenshots/passthrough_replaced_label_B.png differ diff --git a/masonry/screenshots/prose_alignment_flex.png b/masonry/screenshots/prose_alignment_flex.png index bf2db125ee..0f826e7ecd 100644 Binary files a/masonry/screenshots/prose_alignment_flex.png and b/masonry/screenshots/prose_alignment_flex.png differ diff --git a/masonry/screenshots/simple_canvas.png b/masonry/screenshots/simple_canvas.png new file mode 100644 index 0000000000..8e23c23fe3 Binary files /dev/null and b/masonry/screenshots/simple_canvas.png differ diff --git a/masonry/src/doc/implementing_container_widget.md b/masonry/src/doc/implementing_container_widget.md index 1a5298e4a3..4284dffc5b 100644 --- a/masonry/src/doc/implementing_container_widget.md +++ b/masonry/src/doc/implementing_container_widget.md @@ -20,6 +20,10 @@ Our widget was overall pretty simple, the tutorial skipped over a few methods wi However, in some cases you want to write a widget which "contains" other widgets. You want these child widgets to receive events and be painted as well, as part of the widget hierarchy. +Note: If you only need a simple pass-through container that hosts exactly one child and you want to be able to dynamically swap that child at runtime, consider using [`Passthrough`](crate::widgets::Passthrough). +It forwards layout/paint/accessibility to its content and exposes helpers to replace or edit the hosted child. +For richer behavior (custom layout, chrome, etc.), continue with a dedicated container as described below. + To do so, you need to implement a container widget. A container widget is still a type which implements the [`Widget`] trait. It stores handles for its children using a type called [`WidgetPod`], and its `Widget` trait implementation is more complex. diff --git a/masonry/src/lib.rs b/masonry/src/lib.rs index aea361b34b..3794fd9869 100644 --- a/masonry/src/lib.rs +++ b/masonry/src/lib.rs @@ -6,7 +6,7 @@ //! Masonry is a foundational framework for building GUI libraries in Rust. //! -//! The developers of Masonry are developing [Xilem], a reactive UI library built on top of Masonry. +//! The developers of Masonry are developing [Xilem][], a reactive UI library built on top of Masonry. //! Masonry's API is geared towards creating GUI libraries; if you are creating an application, we recommend also considering Xilem. //! //! Masonry gives you a platform-independent manager, which owns and maintains a widget tree. @@ -25,7 +25,7 @@ //! Masonry can be used with any windowing library which allows the window content to be rendered using `wgpu`. //! There are currently two backends for using Masonry to create operating system windows: //! -//! - [masonry_winit] for most platforms. +//! - [Masonry Winit][masonry_winit] for most platforms. //! - `masonry_android_view` for Android. This can currently be found in the [Android View repository](https://github.com/rust-mobile/android-view), //! and is not yet generally usable. //! @@ -33,7 +33,7 @@ //! //! # Example //! -//! The to-do-list example looks like this, using `masonry_winit` as the backend: +//! The to-do-list example looks like this, using Masonry Winit as the backend: //! //! ```rust //! use masonry::core::{ErasedAction, NewWidget, Properties, Widget, WidgetId, WidgetTag}; @@ -149,11 +149,11 @@ //! //! The following crate [feature flags](https://doc.rust-lang.org/cargo/reference/features.html#dependency-features) are available: //! -//! - `default`: Enables the default features of [`masonry_core`][masonry_core], [`masonry_testing`][masonry_testing] -//! (if enabled via the `testing` feature) and [`vello`]. +//! - `default`: Enables the default features of [Masonry Core][masonry_core], [Masonry Testing][masonry_testing] +//! (if enabled via the `testing` feature), and [Vello][vello]. //! - `tracy`: Enables creating output for the [Tracy](https://github.com/wolfpld/tracy) profiler using [`tracing-tracy`][tracing_tracy]. //! This can be used by installing Tracy and connecting to a Masonry with this feature enabled. -//! - `testing`: Re-exports the test harness from [`masonry_testing`][masonry_testing]. +//! - `testing`: Re-exports the test harness from [Masonry Testing][masonry_testing]. //! //! # Debugging features //! @@ -165,15 +165,12 @@ //! //! If you want to use your own subscriber, simply set it before starting masonry - in this case masonry will not set a subscriber. //! -//! [masonry_core]: https://crates.io/crates/masonry_core -//! [masonry_testing]: https://crates.io/crates/masonry_testing //! [masonry_winit]: https://crates.io/crates/masonry_winit //! [Xilem]: https://github.com/linebender/xilem/tree/main/xilem //! [tracing_tracy]: https://crates.io/crates/tracing-tracy -//! #![cfg_attr( not(docsrs), - doc = "**Warning: This documentation is meant to be read on docs.rs. Screenshots may fail to load otherwise.**\n\n" + doc = "\n**Warning: This documentation is meant to be read on docs.rs. Screenshots may fail to load otherwise.**\n\n" )] // Screenshot generated in the unit test for the `to_do_list` example. #![doc = util::include_screenshot_reference!("to-do-screenshot", "example_to_do_list_initial.png")] diff --git a/masonry/src/properties/border_color.rs b/masonry/src/properties/border_color.rs index a26d915691..dca7e33d24 100644 --- a/masonry/src/properties/border_color.rs +++ b/masonry/src/properties/border_color.rs @@ -13,6 +13,20 @@ pub struct BorderColor { pub color: AlphaColor, } +/// The color of a widget's border when hovered by a pointer. +#[derive(Clone, Copy, Debug, PartialEq)] +pub struct HoveredBorderColor(pub BorderColor); + +/// The color of a widget's border when focused. +#[derive(Clone, Copy, Debug, PartialEq)] +pub struct FocusedBorderColor(pub BorderColor); + +// --- + +// TODO - The default border color in CSS is `currentcolor`, +// the color text is displayed in. +// Do we want to implement that? + impl Property for BorderColor { fn static_default() -> &'static Self { static DEFAULT: BorderColor = BorderColor { @@ -22,16 +36,34 @@ impl Property for BorderColor { } } +impl Default for BorderColor { + fn default() -> Self { + *Self::static_default() + } +} + impl BorderColor { /// Create new `BorderColor` with given value. pub const fn new(color: AlphaColor) -> Self { Self { color } } + + /// Helper function to be called in [`Widget::property_changed`](crate::core::Widget::property_changed). + pub fn prop_changed(ctx: &mut UpdateCtx<'_>, property_type: TypeId) { + if property_type != TypeId::of::() { + return; + } + ctx.request_paint_only(); + } } -/// The color of a widget's border when hovered by a pointer. -#[derive(Clone, Copy, Debug, PartialEq)] -pub struct HoveredBorderColor(pub BorderColor); +// --- + +impl Default for HoveredBorderColor { + fn default() -> Self { + *Self::static_default() + } +} impl Property for HoveredBorderColor { fn static_default() -> &'static Self { @@ -42,19 +74,7 @@ impl Property for HoveredBorderColor { } } -// --- - -// TODO - The default border color in CSS is `currentcolor`, -// the color text is displayed in. -// Do we want to implement that? - -impl Default for BorderColor { - fn default() -> Self { - *Self::static_default() - } -} - -impl BorderColor { +impl HoveredBorderColor { /// Helper function to be called in [`Widget::property_changed`](crate::core::Widget::property_changed). pub fn prop_changed(ctx: &mut UpdateCtx<'_>, property_type: TypeId) { if property_type != TypeId::of::() { @@ -66,13 +86,22 @@ impl BorderColor { // --- -impl Default for HoveredBorderColor { +impl Default for FocusedBorderColor { fn default() -> Self { *Self::static_default() } } -impl HoveredBorderColor { +impl Property for FocusedBorderColor { + fn static_default() -> &'static Self { + static DEFAULT: FocusedBorderColor = FocusedBorderColor(BorderColor { + color: AlphaColor::TRANSPARENT, + }); + &DEFAULT + } +} + +impl FocusedBorderColor { /// Helper function to be called in [`Widget::property_changed`](crate::core::Widget::property_changed). pub fn prop_changed(ctx: &mut UpdateCtx<'_>, property_type: TypeId) { if property_type != TypeId::of::() { diff --git a/masonry/src/properties/mod.rs b/masonry/src/properties/mod.rs index 56b7022262..a5260aa5e0 100644 --- a/masonry/src/properties/mod.rs +++ b/masonry/src/properties/mod.rs @@ -23,7 +23,7 @@ mod slider; pub mod types; pub use background::{ActiveBackground, Background, DisabledBackground}; -pub use border_color::{BorderColor, HoveredBorderColor}; +pub use border_color::{BorderColor, FocusedBorderColor, HoveredBorderColor}; pub use border_width::BorderWidth; pub use box_shadow::BoxShadow; pub use checkmark::{CheckmarkColor, CheckmarkStrokeWidth, DisabledCheckmarkColor}; diff --git a/masonry/src/theme.rs b/masonry/src/theme.rs index 338961d884..c268ce4ad0 100644 --- a/masonry/src/theme.rs +++ b/masonry/src/theme.rs @@ -13,8 +13,8 @@ use crate::properties::types::Length; use crate::properties::{ ActiveBackground, Background, BarColor, BorderColor, BorderWidth, CaretColor, CheckmarkColor, CheckmarkStrokeWidth, ContentColor, CornerRadius, DisabledBackground, DisabledCheckmarkColor, - DisabledContentColor, HoveredBorderColor, Padding, PlaceholderColor, SelectionColor, - UnfocusedSelectionColor, + DisabledContentColor, FocusedBorderColor, HoveredBorderColor, Padding, PlaceholderColor, + SelectionColor, UnfocusedSelectionColor, }; use crate::widgets::{Button, Checkbox, Label, ProgressBar, Spinner, TextArea, TextInput}; @@ -38,6 +38,7 @@ pub const TEXT_COLOR: Color = Color::from_rgb8(0xf2, 0xf2, 0xf2); pub const DISABLED_TEXT_COLOR: Color = Color::from_rgb8(0xa0, 0xa0, 0x9a); pub const PLACEHOLDER_COLOR: Color = Color::from_rgba8(0xFF, 0xFF, 0xFF, 0x8F); pub const TEXT_BACKGROUND_COLOR: Color = Color::from_rgb8(0x16, 0x16, 0x16); +pub const FOCUS_COLOR: Color = Color::from_rgb8(0xff, 0xff, 0xff); // TODO: The following constants are not being used in properties pub const TEXT_SIZE_NORMAL: f32 = 15.0; @@ -45,7 +46,6 @@ pub const BASIC_WIDGET_HEIGHT: f64 = 18.0; pub const BORDERED_WIDGET_HEIGHT: f64 = 24.0; pub const SCROLLBAR_COLOR: Color = Color::from_rgb8(0xff, 0xff, 0xff); pub const SCROLLBAR_BORDER_COLOR: Color = Color::from_rgb8(0x77, 0x77, 0x77); -pub const FOCUS_COLOR: Color = Color::from_rgb8(0xff, 0xff, 0xff); pub const SCROLLBAR_WIDTH: f64 = 8.; pub const SCROLLBAR_PAD: f64 = 2.; pub const SCROLLBAR_MIN_SIZE: f64 = 45.; @@ -70,6 +70,7 @@ pub fn default_property_set() -> DefaultProperties { properties.insert::(DisabledBackground(Background::Color(Color::BLACK))); properties.insert::(BorderColor { color: ZYNC_700 }); properties.insert::(HoveredBorderColor(BorderColor { color: ZYNC_500 })); + properties.insert::(FocusedBorderColor(BorderColor { color: FOCUS_COLOR })); // Checkbox properties.insert::(CornerRadius { radius: 4. }); @@ -82,6 +83,7 @@ pub fn default_property_set() -> DefaultProperties { properties.insert::(DisabledBackground(Background::Color(Color::BLACK))); properties.insert::(BorderColor { color: ZYNC_700 }); properties.insert::(HoveredBorderColor(BorderColor { color: ZYNC_500 })); + properties.insert::(FocusedBorderColor(BorderColor { color: FOCUS_COLOR })); properties.insert::(CheckmarkStrokeWidth { width: 2.0 }); properties.insert::(CheckmarkColor { color: TEXT_COLOR }); @@ -96,6 +98,7 @@ pub fn default_property_set() -> DefaultProperties { width: BORDER_WIDTH, }); properties.insert::(BorderColor { color: ZYNC_600 }); + properties.insert::(FocusedBorderColor(BorderColor { color: FOCUS_COLOR })); properties.insert::(PlaceholderColor::new(PLACEHOLDER_COLOR)); properties.insert::(CaretColor { color: TEXT_COLOR }); properties.insert::(SelectionColor { diff --git a/masonry/src/widgets/align.rs b/masonry/src/widgets/align.rs index 9f08b61d19..731cb37547 100644 --- a/masonry/src/widgets/align.rs +++ b/masonry/src/widgets/align.rs @@ -9,6 +9,7 @@ // its computed size. See https://github.com/linebender/xilem/issues/378 use accesskit::{Node, Role}; +use masonry_core::core::WidgetMut; use tracing::{Span, trace_span}; use vello::Scene; use vello::kurbo::{Rect, Size}; @@ -84,6 +85,22 @@ impl Align { } } +// --- MARK: WIDGETMUT +impl Align { + /// Replace the child widget with a new one. + pub fn set_child(this: &mut WidgetMut<'_, Self>, child: NewWidget) { + this.ctx.remove_child(std::mem::replace( + &mut this.widget.child, + child.erased().to_pod(), + )); + } + + /// Get mutable reference to the child widget. + pub fn child_mut<'t>(this: &'t mut WidgetMut<'_, Self>) -> WidgetMut<'t, dyn Widget> { + this.ctx.get_mut(&mut this.widget.child) + } +} + // --- MARK: IMPL WIDGET impl Widget for Align { type Action = NoAction; diff --git a/masonry/src/widgets/button.rs b/masonry/src/widgets/button.rs index 52c9f2bc75..1abf4bd82f 100644 --- a/masonry/src/widgets/button.rs +++ b/masonry/src/widgets/button.rs @@ -11,7 +11,6 @@ use masonry_core::core::HasProperty; use tracing::{Span, trace, trace_span}; use vello::Scene; use vello::kurbo::{Affine, Size}; -use vello::peniko::Color; use crate::core::keyboard::{Key, NamedKey}; use crate::core::pointer::PointerButton; @@ -22,7 +21,7 @@ use crate::core::{ }; use crate::properties::{ ActiveBackground, Background, BorderColor, BorderWidth, BoxShadow, CornerRadius, - DisabledBackground, HoveredBorderColor, Padding, + DisabledBackground, FocusedBorderColor, HoveredBorderColor, Padding, }; use crate::theme; use crate::util::{fill, include_screenshot, stroke}; @@ -76,7 +75,15 @@ impl Button { // --- MARK: WIDGETMUT impl Button { - /// Get a mutable reference to the label. + /// Replace the child widget with a new one. + pub fn set_child(this: &mut WidgetMut<'_, Self>, child: NewWidget) { + this.ctx.remove_child(std::mem::replace( + &mut this.widget.child, + child.erased().to_pod(), + )); + } + + /// Get a mutable reference to the child. pub fn child_mut<'t>(this: &'t mut WidgetMut<'_, Self>) -> WidgetMut<'t, dyn Widget> { this.ctx.get_mut(&mut this.widget.child) } @@ -94,6 +101,7 @@ pub struct ButtonPress { impl HasProperty for Button {} impl HasProperty for Button {} impl HasProperty for Button {} +impl HasProperty for Button {} impl HasProperty for Button {} impl HasProperty for Button {} impl HasProperty for Button {} @@ -182,6 +190,7 @@ impl Widget for Button { DisabledBackground::prop_changed(ctx, property_type); ActiveBackground::prop_changed(ctx, property_type); Background::prop_changed(ctx, property_type); + FocusedBorderColor::prop_changed(ctx, property_type); HoveredBorderColor::prop_changed(ctx, property_type); BorderColor::prop_changed(ctx, property_type); BorderWidth::prop_changed(ctx, property_type); @@ -235,6 +244,7 @@ impl Widget for Button { } fn paint(&mut self, ctx: &mut PaintCtx<'_>, props: &PropertiesRef<'_>, scene: &mut Scene) { + let is_focused = ctx.is_focus_target(); let is_pressed = ctx.is_active(); let is_hovered = ctx.is_hovered(); let size = ctx.size(); @@ -253,19 +263,14 @@ impl Widget for Button { let bg_rect = border_width.bg_rect(size, border_radius); let border_rect = border_width.border_rect(size, border_radius); - let mut border_color = if is_hovered { + let border_color = if is_focused { + &props.get::().0 + } else if is_hovered { &props.get::().0 } else { props.get::() }; - // FIXME - Handle this properly - if ctx.is_focus_target() { - border_color = &BorderColor { - color: Color::WHITE, - }; - } - let brush = bg.get_peniko_brush_for_rect(bg_rect.rect()); fill(scene, &bg_rect, &brush); stroke(scene, &border_rect, border_color.color, border_width.width); diff --git a/masonry/src/widgets/canvas.rs b/masonry/src/widgets/canvas.rs new file mode 100644 index 0000000000..522e3c74b8 --- /dev/null +++ b/masonry/src/widgets/canvas.rs @@ -0,0 +1,216 @@ +// Copyright 2025 the Xilem Authors and the Druid Authors +// SPDX-License-Identifier: Apache-2.0 + +#![warn(missing_docs)] + +//! A canvas widget. + +use std::sync::Arc; + +use accesskit::{Node, Role}; +use masonry_core::core::{ChildrenIds, NoAction}; +use tracing::{Span, trace_span}; +use vello::Scene; +use vello::kurbo::Size; + +use crate::core::{ + AccessCtx, AccessEvent, BoxConstraints, EventCtx, LayoutCtx, PaintCtx, PointerEvent, + PropertiesMut, PropertiesRef, RegisterCtx, TextEvent, Update, UpdateCtx, Widget, WidgetId, + WidgetMut, +}; + +/// A widget allowing custom drawing. +pub struct Canvas { + draw: Arc, + alt_text: Option, +} + +// --- MARK: BUILDERS --- +impl Canvas { + /// Create a new canvas with the given draw function. + pub fn new(draw: impl Fn(&mut Scene, Size) + Send + Sync + 'static) -> Self { + Self::from_arc(Arc::new(draw)) + } + + /// Create a new canvas from a function already contained in an [`Arc`]. + pub fn from_arc(draw: Arc) -> Self { + Self { + draw, + alt_text: None, + } + } + + /// Set the text that will be used to communicate the meaning of the canvas to + /// those using screen readers. + /// + /// Users are encouraged to set alt text for the canvas. + /// If possible, the alt-text should succinctly describe what the canvas represents. + /// + /// If the canvas is decorative or too hard to describe through text, users should set alt text to `""`. + pub fn with_alt_text(mut self, alt_text: impl Into) -> Self { + self.alt_text = Some(alt_text.into()); + self + } +} + +// --- MARK: WIDGETMUT --- +impl Canvas { + /// Update the draw function + pub fn set_painter( + this: &mut WidgetMut<'_, Self>, + draw: impl Fn(&mut Scene, Size) + Send + Sync + 'static, + ) { + Self::set_painter_arc(this, Arc::new(draw)); + } + + /// Update the draw function + pub fn set_painter_arc( + this: &mut WidgetMut<'_, Self>, + draw: Arc, + ) { + this.widget.draw = draw; + this.ctx.request_render(); + } + + /// Set the alternative text for this widget + pub fn set_alt_text(mut this: WidgetMut<'_, Self>, alt_text: String) { + this.widget.alt_text = Some(alt_text); + this.ctx.request_accessibility_update(); + } + + /// Remove the existing alternative text on this widget. + pub fn remove_alt_text(mut this: WidgetMut<'_, Self>) { + this.widget.alt_text = None; + this.ctx.request_accessibility_update(); + } +} + +// --- MARK: IMPL WIDGET --- +impl Widget for Canvas { + type Action = NoAction; + + fn on_pointer_event( + &mut self, + _ctx: &mut EventCtx<'_>, + _props: &mut PropertiesMut<'_>, + _event: &PointerEvent, + ) { + } + + fn accepts_pointer_interaction(&self) -> bool { + true + } + + fn on_text_event( + &mut self, + _ctx: &mut EventCtx<'_>, + _props: &mut PropertiesMut<'_>, + _event: &TextEvent, + ) { + } + + fn on_access_event( + &mut self, + _ctx: &mut EventCtx<'_>, + _props: &mut PropertiesMut<'_>, + _event: &AccessEvent, + ) { + } + + fn register_children(&mut self, _ctx: &mut RegisterCtx<'_>) {} + + fn update( + &mut self, + _ctx: &mut UpdateCtx<'_>, + _props: &mut PropertiesMut<'_>, + _event: &Update, + ) { + } + + fn layout( + &mut self, + _ctx: &mut LayoutCtx<'_>, + _props: &mut PropertiesMut<'_>, + bc: &BoxConstraints, + ) -> Size { + // use as much space as possible - caller can size it as necessary + bc.max() + } + + fn paint(&mut self, ctx: &mut PaintCtx<'_>, _props: &PropertiesRef<'_>, scene: &mut Scene) { + (self.draw)(scene, ctx.size()); + } + + fn accessibility_role(&self) -> Role { + Role::Canvas + } + + fn accessibility( + &mut self, + _ctx: &mut AccessCtx<'_>, + _props: &PropertiesRef<'_>, + node: &mut Node, + ) { + if let Some(text) = &self.alt_text { + node.set_description(text.clone()); + } + } + + fn children_ids(&self) -> ChildrenIds { + ChildrenIds::new() + } + + fn make_trace_span(&self, widget_id: WidgetId) -> Span { + trace_span!("Canvas", id = widget_id.trace()) + } + + fn get_debug_text(&self) -> Option { + self.alt_text.clone() + } +} + +// --- MARK: TESTS --- +#[cfg(test)] +mod tests { + use masonry_core::core::{DefaultProperties, Properties}; + use masonry_testing::assert_render_snapshot; + use vello::kurbo::{Affine, BezPath, Stroke}; + use vello::peniko::{Color, Fill}; + + use super::*; + use crate::testing::TestHarness; + + #[test] + fn simple_canvas() { + let canvas = Canvas::new(|scene, size| { + let scale = Affine::scale_non_uniform(size.width, size.height); + let mut path = BezPath::new(); + path.move_to((0.1, 0.1)); + path.line_to((0.9, 0.9)); + path.line_to((0.9, 0.1)); + path.close_path(); + path = scale * path; + scene.fill( + Fill::NonZero, + Affine::IDENTITY, + Color::from_rgb8(100, 240, 150), + None, + &path, + ); + scene.stroke( + &Stroke::new(4.), + Affine::IDENTITY, + Color::from_rgb8(200, 140, 50), + None, + &path, + ); + }); + + let mut harness = TestHarness::create( + DefaultProperties::default(), + canvas.with_props(Properties::default()), + ); + + assert_render_snapshot!(harness, "simple_canvas"); + } +} diff --git a/masonry/src/widgets/checkbox.rs b/masonry/src/widgets/checkbox.rs index c91f6becff..280739cd94 100644 --- a/masonry/src/widgets/checkbox.rs +++ b/masonry/src/widgets/checkbox.rs @@ -20,7 +20,8 @@ use crate::core::{ }; use crate::properties::{ ActiveBackground, Background, BorderColor, BorderWidth, CheckmarkColor, CheckmarkStrokeWidth, - CornerRadius, DisabledBackground, DisabledCheckmarkColor, HoveredBorderColor, Padding, + CornerRadius, DisabledBackground, DisabledCheckmarkColor, FocusedBorderColor, + HoveredBorderColor, Padding, }; use crate::theme; use crate::util::{fill, include_screenshot, stroke}; @@ -43,6 +44,7 @@ pub struct Checkbox { label: WidgetPod