diff --git a/.github/workflows/ios-ipa.yml b/.github/workflows/ios-ipa.yml index 84e4ebb7a31..ad4b4523068 100644 --- a/.github/workflows/ios-ipa.yml +++ b/.github/workflows/ios-ipa.yml @@ -44,6 +44,8 @@ on: - "assets/logo.png" - "Cargo.toml" - "Cargo.lock" + - "LICENSE" + - "NOTICE" - ".cargo/config.toml" - "rust-toolchain.toml" - "package.json" diff --git a/Cargo.lock b/Cargo.lock index 3c6fc11bd30..368484fde28 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1330,13 +1330,13 @@ dependencies = [ [[package]] name = "brotli" -version = "9.0.0" +version = "9.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8b851b75c23ca7873623d612fe49bd1989aeb03d08fb9432187eb253d3d4c6b" +checksum = "9071f285ed78f04f37d675abaaef5de7689e2f30a216c8dc6795465d81910a13" dependencies = [ "alloc-no-stdlib 3.0.0", "alloc-stdlib 0.3.0", - "brotli-decompressor 6.0.1", + "brotli-decompressor 6.4.0", ] [[package]] @@ -1351,18 +1351,9 @@ dependencies = [ [[package]] name = "brotli-decompressor" -version = "5.0.3" +version = "6.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a32acac15fe1967bc3986b2a6347dffc965602354ea6f450ad07e8bfd253583" -dependencies = [ - "alloc-no-stdlib 2.0.4", -] - -[[package]] -name = "brotli-decompressor" -version = "6.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "941cd9bd4ddab83cb46fa5a2d428f1c857b24ac78cb876cf7beb710840934bd7" +checksum = "664148598c930650998ef56df301329ffe7b4cdb02d49b2a3fca3bcaf2185bcb" dependencies = [ "alloc-no-stdlib 3.0.0", "alloc-stdlib 0.3.0", @@ -1989,7 +1980,7 @@ version = "0.4.46" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cae36683101b2899f48bd31f8db9839437356188e3b1ff23096e73dab09ba8fe" dependencies = [ - "brotli 9.0.0", + "brotli 9.1.3", "compression-core", "flate2", "memchr", @@ -9702,6 +9693,7 @@ dependencies = [ "nsh-engine", "nsh-platform-apple", "nsh-platform-ios", + "nsh-system-controls", "nsh-testing", "objc2 0.6.5", "objc2-av-foundation", @@ -10582,6 +10574,7 @@ dependencies = [ "nsh-core", "nsh-engine", "nsh-js", + "nsh-system-controls", "nsh-testing", "objc2 0.6.5", "objc2-app-kit 0.3.2", @@ -11635,7 +11628,6 @@ name = "nsh-core" version = "0.7.2" dependencies = [ "cap-std", - "chrono", "crc32fast", "flate2", "futures-util", @@ -11751,6 +11743,23 @@ dependencies = [ "thiserror 2.0.21", ] +[[package]] +name = "nsh-platform-android" +version = "0.7.2" +dependencies = [ + "jni 0.21.1", + "libc", + "log", + "ndk-context", + "nsh-base", + "nsh-core", + "nsh-engine", + "rustc-hash 2.1.3", + "serde_json", + "tokio", + "ttf-parser", +] + [[package]] name = "nsh-platform-apple" version = "0.7.2" @@ -11889,6 +11898,25 @@ dependencies = [ "windows-numerics", ] +[[package]] +name = "nsh-system-controls" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a90969b2a893074011f9087e0d141594c9230fad45b0cb96fa61f1437260b4d" +dependencies = [ + "block2 0.6.2", + "chrono", + "log", + "nsh-core", + "nsh-platform-android", + "nsh-platform-ios", + "objc2 0.6.5", + "objc2-core-foundation", + "objc2-foundation 0.3.2", + "objc2-ui-kit", + "serde_json", +] + [[package]] name = "nsh-terminal" version = "0.7.2" @@ -14866,7 +14894,7 @@ dependencies = [ "aes-gcm 0.11.1", "aes-kw 0.3.1", "base64-simd", - "brotli 9.0.0", + "brotli 9.1.3", "cbc 0.2.1", "chacha20poly1305", "const-oid 0.10.2", @@ -21350,11 +21378,11 @@ dependencies = [ [[package]] name = "wuff" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "200a7b806377b65f1ff9a985874332f15357c87e5dd7855f35f06dade95b8b3d" +checksum = "f6a992b57b3d1ee972b2e3fd9225e44793104d49818836dd812d5459187712dd" dependencies = [ - "brotli-decompressor 5.0.3", + "brotli-decompressor 6.4.0", "bytes", "flate2", ] diff --git a/Cargo.toml b/Cargo.toml index c1e1d9f1d14..f396a0757ff 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -112,6 +112,7 @@ nsh-terminal = { path = "third-party/nsh/crates/nsh-terminal" } nsh-updater = { path = "third-party/nsh/crates/nsh-updater" } nsh-platform-linux = { path = "third-party/nsh/crates/nsh-platform-linux", default-features = false, features = ["js", "svg", "updater", "websocket", "zlib", "crypto", "editor", "emoji-picker", "highlight", "math", "plot", "rich-editor", "term"] } nsh-core = { path = "third-party/nsh/crates/nsh-core" } +nsh-system-controls = "0.1.0" nsh-engine = { path = "third-party/nsh/crates/nsh-engine" } nsh-js = { path = "third-party/nsh/crates/nsh-js" } nsh-platform-tui = { path = "third-party/nsh/crates/nsh-platform-tui" } @@ -332,6 +333,10 @@ opt-level = 3 opt-level = 3 [patch.crates-io] +# Native Shell extension modules must share the host's vendored NSH types. +nsh-core = { path = "third-party/nsh/crates/nsh-core" } +nsh-platform-ios = { path = "third-party/nsh/crates/nsh-platform-ios" } +nsh-platform-android = { path = "third-party/nsh/crates/nsh-platform-android" } zbus = { git = "https://github.com/maka-agent/cua", rev = "2778d8c1f0bfb99f3c8d9399650ede1bc8ad22d5" } nom = { git = "https://github.com/maka-agent/cua", rev = "2778d8c1f0bfb99f3c8d9399650ede1bc8ad22d5" } reqwest = { path = "third-party/reqwest" } diff --git a/LICENSE b/LICENSE index 98718bd23f5..c1e6a096131 100644 --- a/LICENSE +++ b/LICENSE @@ -340,16 +340,24 @@ third-party/nsh contains NSH initially imported from https://github.com/M4n5ter/nsh at revision de176695240d550f2b303643b8019146c7989e7f and synchronized with https://github.com/longbridge/nsh through revision -a901baa2e2d82a17066abb589b542b0a90890e0a. +bdba103fd31a22a188bebd6b19df54a99204bb0a. Copyright 2026 Longbridge . Original license texts, the complete source inventory and local integration changes are recorded in third-party/nsh/{LICENSE-APACHE,upstream.json,SOURCE.md}. The snapshot preserves the separate licenses for its bundled icy_sixel sources, LLRT type definitions, browser polyfills, KaTeX fonts, sound fixtures, and example and test fonts. +The vendored NsMetry JavaScript SDK from +https://github.com/huacnlee/nsmetry at revision 35f6d75 retains its MIT +license in third-party/nsh/website/src/lib/nsmetry/LICENSE. The IBM Plex Sans test font in products/maka/workbench/tests/fonts retains its SIL Open Font License in the adjacent OFL.txt. +Maka for iOS also includes Longbridge's nsh-system-controls 0.1.0 +(Apache License 2.0) from https://crates.io/crates/nsh-system-controls/0.1.0. +The published archive contains LICENSE-APACHE and records upstream revision +a1c8d5f1807f2ab0c60ccf3e59bb8598e9a6ff97 in .cargo_vcs_info.json. + async-io timer source (adapted, Apache License 2.0 OR MIT) third-party/async-io contains async-io 2.6.0 from diff --git a/NOTICE b/NOTICE index fa6ef9a3c4e..f3e8b36b851 100644 --- a/NOTICE +++ b/NOTICE @@ -23,5 +23,8 @@ Includes icons derived from Feather, Copyright (c) 2013-present Cole Bemis. NSH Canvas renderer and icon data generator Copyright 2026 Longbridge . +nsh-system-controls (Maka for iOS) +Copyright 2026 Longbridge . + Pierre file icons Copyright (c) 2026 The Pierre Computer Company diff --git a/deny.toml b/deny.toml index a492e49bf22..b2343a076ba 100644 --- a/deny.toml +++ b/deny.toml @@ -17,6 +17,7 @@ [graph] targets = [ + "aarch64-apple-ios", "aarch64-apple-darwin", "x86_64-apple-darwin", "aarch64-unknown-linux-gnu", diff --git a/products/maka/cli/DEPENDENCIES.rust.tsv b/products/maka/cli/DEPENDENCIES.rust.tsv index 2bfab578ec0..981c3f80033 100644 --- a/products/maka/cli/DEPENDENCIES.rust.tsv +++ b/products/maka/cli/DEPENDENCIES.rust.tsv @@ -114,10 +114,9 @@ blocking@1.7.0 X X borrow-or-share@0.2.4 X boxed_error@0.2.3 X brotli-decompressor@4.0.3 X X -brotli-decompressor@5.0.3 X X -brotli-decompressor@6.0.1 X X +brotli-decompressor@6.4.0 X X brotli@6.0.0 X X -brotli@9.0.0 X X +brotli@9.1.3 X X bstr@1.13.1 X X bumpalo@3.20.3 X X by_address@1.2.1 X X @@ -648,6 +647,8 @@ keccak@0.1.6 X X keccak@0.2.2 X X keyring-core@1.0.1 X X keyring@4.2.0 X X +kqueue-sys@1.1.2 X +kqueue@1.2.1 X kurbo@0.13.1 X X lazy_static@1.5.1 X X lazy-regex-proc_macros@3.6.2 X @@ -710,6 +711,7 @@ maka-i18n-build@0.3.0 X maka-i18n@0.3.0 X maka-interactions-api@0.3.0 X maka-interactions-native@0.3.0 X +maka-ios-shell@0.3.0 X maka-js-runtime@0.3.0 X maka-mcp@0.3.0 X maka-model@0.3.0 X @@ -724,6 +726,7 @@ maka-product-native@0.3.0 X maka-provider-protocol@0.3.0 X maka-providers@0.3.0 X maka-python-runtime@0.3.0 X +maka-remote-client@0.3.0 X maka-remote-pairing@0.3.0 X maka-remote-transport@0.3.0 X maka-sandbox@0.3.0 X @@ -830,10 +833,12 @@ nsh-js@0.7.2 X nsh-macros@0.7.2 X nsh-package@0.7.2 X nsh-platform-apple@0.7.2 X +nsh-platform-ios@0.7.2 X nsh-platform-linux@0.7.2 X nsh-platform-macos@0.7.2 X nsh-platform-tui@0.7.2 X nsh-platform-windows@0.7.2 X +nsh-system-controls@0.1.0 X nsh-terminal@0.7.2 X nsh-updater@0.7.2 X ntapi@0.4.3 X X @@ -855,12 +860,15 @@ num@0.4.3 X X objc-sys@0.3.5 X objc2-app-kit@0.2.2 X objc2-app-kit@0.3.2 X X X +objc2-authentication-services@0.3.2 X X X +objc2-av-foundation@0.3.2 X X X objc2-cf-network@0.3.2 X X X objc2-cloud-kit@0.3.2 X X X objc2-core-data@0.3.2 X X X objc2-core-foundation@0.3.2 X X X objc2-core-graphics@0.3.2 X X X objc2-core-image@0.3.2 X X X +objc2-core-location@0.3.2 X X X objc2-core-services@0.3.2 X X X objc2-core-text@0.3.2 X X X objc2-core-video@0.3.2 X X X @@ -875,6 +883,8 @@ objc2-quartz-core@0.3.2 X X X objc2-screen-capture-kit@0.3.2 X X X objc2-security@0.3.2 X X X objc2-system-configuration@0.3.2 X X X +objc2-ui-kit@0.3.2 X X X +objc2-user-notifications@0.3.2 X X X objc2@0.5.3 X objc2@0.6.5 X object@0.36.7 X X @@ -1543,7 +1553,7 @@ wl-clipboard-rs@0.9.4 X X wmi@0.18.4 X X wnaf@0.14.1 X X writeable@0.6.4 X -wuff@0.2.9 X +wuff@0.2.10 X wyz@0.5.1 X x11@2.21.0 X x11rb-protocol@0.13.2 X X diff --git a/products/maka/cli/THIRD_PARTY_NOTICES.txt b/products/maka/cli/THIRD_PARTY_NOTICES.txt index 93710610cfc..40c0a051317 100644 --- a/products/maka/cli/THIRD_PARTY_NOTICES.txt +++ b/products/maka/cli/THIRD_PARTY_NOTICES.txt @@ -3085,18 +3085,16 @@ alloc-no-stdlib@3.0.0 (BSD-3-Clause); authors declared by package: Daniel Reiter alloc-stdlib@0.2.4 (BSD-3-Clause); authors declared by package: Daniel Reiter Horn alloc-stdlib@0.3.0 (BSD-3-Clause); authors declared by package: Daniel Reiter Horn brotli-decompressor@4.0.3 (BSD-3-Clause/MIT); authors declared by package: Daniel Reiter Horn , The Brotli Authors -brotli-decompressor@5.0.3 (BSD-3-Clause/MIT); authors declared by package: Daniel Reiter Horn , The Brotli Authors -brotli-decompressor@6.0.1 (BSD-3-Clause/MIT); authors declared by package: Daniel Reiter Horn , The Brotli Authors +brotli-decompressor@6.4.0 (BSD-3-Clause/MIT); authors declared by package: Daniel Reiter Horn , The Brotli Authors brotli@6.0.0 (BSD-3-Clause OR MIT); authors declared by package: Daniel Reiter Horn , The Brotli Authors -brotli@9.0.0 (BSD-3-Clause AND MIT); authors declared by package: Daniel Reiter Horn , The Brotli Authors +brotli@9.1.3 (BSD-3-Clause AND MIT); authors declared by package: Daniel Reiter Horn , The Brotli Authors https://crates.io/api/v1/crates/alloc-no-stdlib/2.0.4/download :: LICENSE https://crates.io/api/v1/crates/alloc-no-stdlib/3.0.0/download :: LICENSE https://crates.io/api/v1/crates/brotli-decompressor/4.0.3/download :: LICENSE -https://crates.io/api/v1/crates/brotli-decompressor/5.0.3/download :: LICENSE -https://crates.io/api/v1/crates/brotli-decompressor/6.0.1/download :: LICENSE +https://crates.io/api/v1/crates/brotli-decompressor/6.4.0/download :: LICENSE https://crates.io/api/v1/crates/brotli/6.0.0/download :: LICENSE -https://crates.io/api/v1/crates/brotli/9.0.0/download :: LICENSE.BSD-3-Clause +https://crates.io/api/v1/crates/brotli/9.1.3/download :: LICENSE.BSD-3-Clause https://raw.githubusercontent.com/dropbox/rust-alloc-no-stdlib/0a81fd6928ea3b33c8cd484aa4575d50ffb98012/LICENSE https://raw.githubusercontent.com/dropbox/rust-alloc-no-stdlib/ae42d22078b98549e987d2f03d12df7b984fde47/LICENSE @@ -10076,9 +10074,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================================================ -brotli@9.0.0 (BSD-3-Clause AND MIT); authors declared by package: Daniel Reiter Horn , The Brotli Authors +brotli@9.1.3 (BSD-3-Clause AND MIT); authors declared by package: Daniel Reiter Horn , The Brotli Authors -https://crates.io/api/v1/crates/brotli/9.0.0/download :: LICENSE.MIT +https://crates.io/api/v1/crates/brotli/9.1.3/download :: LICENSE.MIT Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. @@ -31801,7 +31799,9 @@ nsh-platform-windows@0.7.2 (Apache-2.0) nsh-updater@0.7.2 (Apache-2.0) https://raw.githubusercontent.com/longbridge/nsh/3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359/LICENSE-APACHE +https://raw.githubusercontent.com/longbridge/nsh/6556aa6b89a02cc867fa518f9153526ba5bf7eac/LICENSE-APACHE https://raw.githubusercontent.com/longbridge/nsh/708105de3c4e94eac4c7c49e2e931b0c3af55124/LICENSE-APACHE +https://raw.githubusercontent.com/longbridge/nsh/a30a1df275f5043c8cc357bca3c1f605a592b4ad/LICENSE-APACHE https://raw.githubusercontent.com/longbridge/nsh/d01cd3cce6645391c65a379d6230c2d2e651d55f/LICENSE-APACHE Copyright 2026 Longbridge @@ -54387,9 +54387,9 @@ DEALINGS IN THE SOFTWARE. ================================================================================ -wuff@0.2.9 (MIT); authors declared by package: Nico Burns +wuff@0.2.10 (MIT); authors declared by package: Nico Burns -https://raw.githubusercontent.com/nicoburns/wuff/78e67f52713c0a2c36bd083fea18ba029565c9ec/LICENSE +https://raw.githubusercontent.com/nicoburns/wuff/0bb77cb3448100b8f560abf796014c8b85d75e23/LICENSE Copyright (c) 2013-2017 by the WOFF2 Authors. Copyright (c) 2025 by Nico Burns. diff --git a/products/maka/cli/notices.json b/products/maka/cli/notices.json index dafb20664f6..2aef8ec2ee4 100644 --- a/products/maka/cli/notices.json +++ b/products/maka/cli/notices.json @@ -122,10 +122,9 @@ "cargo:borrow-or-share@0.2.4 registry+https://github.com/rust-lang/crates.io-index": "ba8be2f1a61b15f0845a844413264a001d04d0bd1fae3c585b3e90b5754a7aac", "cargo:boxed_error@0.2.3 registry+https://github.com/rust-lang/crates.io-index": "ac45eea866b3373c4904b4ec4cbb8fe0a15029bfd492c7f8ad74232bd78f03d5", "cargo:brotli-decompressor@4.0.3 registry+https://github.com/rust-lang/crates.io-index": "aa0da669c80e70712a82cd2153693fa9b99e2e79ca2b0215b68e7b1f11ea5b0e", - "cargo:brotli-decompressor@5.0.3 registry+https://github.com/rust-lang/crates.io-index": "e98e63e2dde1505eb53536c28040a5a41cda6957a15edc86708cc3bfb5ed0cb0", - "cargo:brotli-decompressor@6.0.1 registry+https://github.com/rust-lang/crates.io-index": "24c8292ee12f138f0dcf4859365ba8eae1c8b10bb6b05547fd00c5a724f17531", + "cargo:brotli-decompressor@6.4.0 registry+https://github.com/rust-lang/crates.io-index": "bd83f6861e5e03afc5b81860c5380d12e02a2eda052d99fec79ae34dd6fe9ac8", "cargo:brotli@6.0.0 registry+https://github.com/rust-lang/crates.io-index": "e684f3a3331abe2d0e10fd7613710ed847d62348bc6df77393827e341e0c5561", - "cargo:brotli@9.0.0 registry+https://github.com/rust-lang/crates.io-index": "441cd06070bcc2bb839c3da60eaeaa5dc24cbd5d4f454f6ad6bedec4333c465e", + "cargo:brotli@9.1.3 registry+https://github.com/rust-lang/crates.io-index": "64f2d286353ed7fa29da4d125f8d1d24a1e2addbd80ab880d04732b7e3c0981c", "cargo:bs58@0.5.1 registry+https://github.com/rust-lang/crates.io-index": "6c6b23700153306315b9b5a0359741a6da3a224fa40e8ba620f7fbaa1c09db81", "cargo:bstr@1.13.1 registry+https://github.com/rust-lang/crates.io-index": "d9d5805cbf027b8950eba777d7e7564b7f5300b77395ec0b98c0d796de178adb", "cargo:bumpalo@3.20.3 registry+https://github.com/rust-lang/crates.io-index": "5289ad35e9a34023d727c2a35e919825483819192d2011cd94233b5c4d779471", @@ -784,7 +783,7 @@ "cargo:notify@9.0.0 registry+https://github.com/rust-lang/crates.io-index": "bbd7385d18062b75dff2f602c8b2dbec4049a7f6d543193d9a3becfd621d0fd7", "cargo:nsh-base@0.7.2 https://github.com/longbridge/nsh#708105de3c4e94eac4c7c49e2e931b0c3af55124 (adapted; third-party/nsh/crates/nsh-base)": "50a4e27ab4bd5aa29f620743a0f00987aeb71ffa041c7afe0a35c86d120a0985", "cargo:nsh-bundler@0.7.2 https://github.com/longbridge/nsh#d01cd3cce6645391c65a379d6230c2d2e651d55f (adapted; third-party/nsh/crates/nsh-bundler)": "6f6393acac436d00b0f380a7f8553c3233f87488664bfc6346f03fbd0cc09deb", - "cargo:nsh-core@0.7.2 https://github.com/longbridge/nsh#d01cd3cce6645391c65a379d6230c2d2e651d55f (adapted; third-party/nsh/crates/nsh-core)": "340d2528f03ce2d891d5cb6d94cbde3007e27d0207b53af10c41544959303132", + "cargo:nsh-core@0.7.2 https://github.com/longbridge/nsh#a30a1df275f5043c8cc357bca3c1f605a592b4ad (adapted; third-party/nsh/crates/nsh-core)": "e153b9fb7beecdca987e49aa4a0e30e46ef408c8811491837f23eb280d315302", "cargo:nsh-engine@0.7.2 https://github.com/longbridge/nsh#708105de3c4e94eac4c7c49e2e931b0c3af55124 (adapted; third-party/nsh/crates/nsh-engine)": "58f9d6e39ec6957ab2915c2b4d8b2c2578f5a377caaf8d53d846decf74d17e5f", "cargo:nsh-i18n@0.7.2 https://github.com/longbridge/nsh#3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359 (adapted; third-party/nsh/crates/nsh-i18n)": "76982fa8cb6951945418674aa67bb7451db9de0fef8754e3a835718dad114396", "cargo:nsh-js@0.7.2 https://github.com/longbridge/nsh#708105de3c4e94eac4c7c49e2e931b0c3af55124 (adapted; third-party/nsh/crates/nsh-js)": "95e3cf64154641325c791accba5e03bde4fb03f092c52f0a80f64973f1c5c121", @@ -792,7 +791,7 @@ "cargo:nsh-package@0.7.2 https://github.com/longbridge/nsh#3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359 (adapted; third-party/nsh/crates/nsh-package)": "9cfa68b79426c72d163e6e8ce0ecfa86df848a6000a5d694c82903c42df9df41", "cargo:nsh-platform-apple@0.7.2 https://github.com/longbridge/nsh#708105de3c4e94eac4c7c49e2e931b0c3af55124 (adapted; third-party/nsh/crates/nsh-platform-apple)": "5ed3139cf0cae44551d007029e4e92ea18184ce82d4046643f37b4c4c5d0d536", "cargo:nsh-platform-linux@0.7.2 https://github.com/longbridge/nsh#708105de3c4e94eac4c7c49e2e931b0c3af55124 (adapted; third-party/nsh/crates/nsh-platform-linux)": "cae02cc37f542513a2ca1a7da4a0bc6bfc62a00a25a7418fa112be7288d0de40", - "cargo:nsh-platform-macos@0.7.2 https://github.com/longbridge/nsh#708105de3c4e94eac4c7c49e2e931b0c3af55124 (adapted; third-party/nsh/crates/nsh-platform-macos)": "cc1246523f2b14e0bd6eedb45e8ac09efaf93f07c8397b05e8b5592ecd38524f", + "cargo:nsh-platform-macos@0.7.2 https://github.com/longbridge/nsh#6556aa6b89a02cc867fa518f9153526ba5bf7eac (adapted; third-party/nsh/crates/nsh-platform-macos)": "0f37912d4c1eed2c70494ecc137dc52edcb33580db0046b099ccc4d54602379d", "cargo:nsh-platform-tui@0.7.2 https://github.com/longbridge/nsh#d01cd3cce6645391c65a379d6230c2d2e651d55f (adapted; third-party/nsh/crates/nsh-platform-tui)": "d6db8df5cf338323fde2cde93618146543f9f38842ce5676a46c9e31998f8457", "cargo:nsh-platform-windows@0.7.2 https://github.com/longbridge/nsh#708105de3c4e94eac4c7c49e2e931b0c3af55124 (adapted; third-party/nsh/crates/nsh-platform-windows)": "ba41d9b85d73e2a768021a6bb9ae3224e40b16d213af151fd39bc87192faf76b", "cargo:nsh-updater@0.7.2 https://github.com/longbridge/nsh#d01cd3cce6645391c65a379d6230c2d2e651d55f (adapted; third-party/nsh/crates/nsh-updater)": "526ea8a85017e80d9fbfcfabdc531c7810dee40c7b53e146d7c8174a4a61cc39", @@ -1527,7 +1526,7 @@ "cargo:wmi@0.18.4 registry+https://github.com/rust-lang/crates.io-index": "a863d0059eee8f27106a9f604d94f15cb7184c7800baf2826bbcde685e8ae4d8", "cargo:wnaf@0.14.1 registry+https://github.com/rust-lang/crates.io-index": "6a49b5e8f70963e3fe1563f1162641a3c811d6236ada79f2f892dd57acdf3679", "cargo:writeable@0.6.4 registry+https://github.com/rust-lang/crates.io-index": "894cf312a2b546fdcaa3b4e378f1bf403872b13970e07fe1e8acf724f4681aa6", - "cargo:wuff@0.2.9 registry+https://github.com/rust-lang/crates.io-index": "090bed4a825dbb2526383eb73ca114670705ed17621f79da99d838ee05378210", + "cargo:wuff@0.2.10 registry+https://github.com/rust-lang/crates.io-index": "182cbf7fbdd9e6373ed50f6cb65d2c1fbbe8e2001e4b3da56b27ba0508835ffd", "cargo:wyz@0.5.1 registry+https://github.com/rust-lang/crates.io-index": "b806df6f895702defb93e926baf131b31330a8ba529c6f9545ece80077940243", "cargo:x11@2.21.0 registry+https://github.com/rust-lang/crates.io-index": "396f63dc8d161046996f0b7d5b2a2cfb610b40a787efea133238f8ad94a5997e", "cargo:x11rb-protocol@0.13.2 registry+https://github.com/rust-lang/crates.io-index": "d047f1e6373fdf0a133423a4522bf8eb80d96d9773b315f59b5b2fd0274baab5", @@ -1597,5 +1596,5 @@ "npm:preact@11.0.0-beta.0 https://registry.npmjs.org/preact/-/preact-11.0.0-beta.0.tgz sha512-IcODoASASYwJ9kxz7+MJeiJhvLriwSb4y4mHIyxdgaRZp6kPUud7xytrk/6GZw8U3y6EFJaRb5wi9SrEK+8+lg==": "da4f7ecf86f57891c776c0bef60deac13ff94c989832f12b1b5df88826fdf5eb", "npm:zod@4.6.7 https://registry.npmjs.org/zod/-/zod-4.6.7.tgz sha512-g8W2D2kU6a8untc053fX1uVBKzM7yqAxW/3zwk83+6RyF2+SKOuV+c0wBDhUwzV1PaGapmZH+rmcUzPf+3CGwg==": "8d405b2be44c8f37150acc9a7b5f1cf6103ddc26b043e56d34625b1c45d3a2ff" }, - "sha256": "42e9668c86f2243fad18626cf8df4984a094eb85d40012bc32af8547cb4a48f1" + "sha256": "84f2374faeb50b9d81f7dac4e8b88993b4c1586bbe8894dbbd9892840e80c5a6" } diff --git a/products/maka/ios-shell/Cargo.toml b/products/maka/ios-shell/Cargo.toml index be603976d9b..84eb1c45113 100644 --- a/products/maka/ios-shell/Cargo.toml +++ b/products/maka/ios-shell/Cargo.toml @@ -34,6 +34,7 @@ maka-remote-client.workspace = true nsh-base.workspace = true nsh-core.workspace = true nsh-engine = { workspace = true, features = ["js-core"] } +nsh-system-controls.workspace = true serde = { workspace = true, features = ["rc"] } serde_json.workspace = true tokio = { workspace = true, features = ["rt-multi-thread", "sync", "time"] } @@ -42,6 +43,7 @@ tokio-util.workspace = true [build-dependencies] maka-ui-build.workspace = true +nsh-system-controls.workspace = true [target.'cfg(target_os = "ios")'.dependencies] block2 = "0.6.2" diff --git a/products/maka/ios-shell/app/screens/chats/ChatListScreen.tsx b/products/maka/ios-shell/app/screens/chats/ChatListScreen.tsx index ad1cad210e3..6f298a654c7 100644 --- a/products/maka/ios-shell/app/screens/chats/ChatListScreen.tsx +++ b/products/maka/ios-shell/app/screens/chats/ChatListScreen.tsx @@ -17,8 +17,19 @@ * under the License. */ -import { cleanup, computed, effect, safeAreaInsets, Scroll, signal, Text, View, token } from 'nsh'; -import { SegmentedControl, isAvailable } from 'nsh/mobile'; +import { + cleanup, + computed, + effect, + platform, + safeAreaInsets, + Scroll, + signal, + Text, + View, + token, +} from 'nsh'; +import { SegmentedControl } from 'nsh-system-controls'; import { ThinkingMark, ShimmerText } from '../../ui/ThinkingMark'; import { AlertDialog, ContextMenu, Input, NavPage, Sheet } from 'nsh/base'; import { hasAgentEndpoint } from '../../bridge'; @@ -656,7 +667,7 @@ export function ChatListScreen(props: { onOpenSession: (item: ScopedSession) => void }) { }} > Bundle { } fn ui_sets() -> Vec { - vec![nsh_base::registry()] + vec![nsh_base::registry(), nsh_system_controls::registry()] } pub fn engine_config(host: HostChannel, runtime: tokio::runtime::Handle) -> EngineConfig { @@ -83,7 +83,10 @@ pub fn run() { bridge.queue_pairing_uri(uri); } nsh_platform_ios::set_ui_sets(ui_sets()); - nsh_platform_ios::set_components(scanner::register); + nsh_platform_ios::set_components(|components| { + scanner::register(components); + nsh_system_controls::__nsh_native_components_ios(components); + }); run_app( AppSource::Bundle(ios_bundle()), AppOptions { diff --git a/products/maka/ios-shell/tests/ios_shell_behaviors.rs b/products/maka/ios-shell/tests/ios_shell_behaviors.rs index 3916911133c..ddf9dcb047a 100644 --- a/products/maka/ios-shell/tests/ios_shell_behaviors.rs +++ b/products/maka/ios-shell/tests/ios_shell_behaviors.rs @@ -311,7 +311,8 @@ async fn signed_invite_is_confirmed_on_the_live_connection_and_revocation_is_vis let (_, sas) = second.sas().await; app.wait_for(&format!("text:{sas}")).unwrap(); app.press("label:Confirm & Connect").unwrap(); - app.wait_for("text:Second test Host").unwrap(); + app.wait_for_gone("text:Confirm Computer", Duration::from_secs(5)) + .unwrap(); app.press("label:Settings").unwrap(); app.wait_for("label:Computer: Travel Mac").unwrap(); @@ -7431,6 +7432,67 @@ fn side_host_state(revision: u64, generation: Option) -> Value { "connections":{"root":connection}}) } +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn ios_system_segments_filter_the_chat_list() { + use nsh_core::{EventKind, EventPayload, MountItem}; + + let channel = HostChannel::new(); + channel.handle("ios.bootstrap", |call| { + call.resolve(side_host_state(1, Some(7))) + }); + channel.handle("ios.hostQuery", |mut call| { + let data = call.take_data(); + let value = match data["method"].as_str().unwrap() { + "list" if data["input"]["filter"] == "needs_you" => { + json!({"sessions":[],"revision":"pending","needsYouCount":0}) + } + "list" => json!({"sessions":[ + {"id":"agent","kind":"agent","title":"Main Chat","revision":1,"activity":"idle"}, + {"id":"room","kind":"room","title":"Room Chat","revision":1,"activity":"idle"} + ],"revision":"chats","needsYouCount":0}), + "botOutbox" => json!({"isBot":false}), + "history" => json!({"kind":"room","page":{"items":[],"through":0}}), + method => panic!("unexpected query: {method}"), + }; + call.resolve(json!({"value":value})); + }); + channel.handle("ios.subscribe", |mut call| { + let data = call.take_data(); + call.resolve(json!({ + "rootId":"root","generation":7,"subscriptionId":data["subscriptionId"], + })); + }); + let mut config = engine_config(channel, tokio::runtime::Handle::current()); + config.viewport = Size::new(px(390.), px(844.)); + config.environment.os = Os::Ios; + config.environment.reduce_motion = true; + let mut app = Headless::start(config).unwrap(); + let (segments, mut mounted) = mpsc::unbounded_channel(); + app.observe(move |_, batch| { + for item in &batch.items { + if let MountItem::Component { id, name } = item + && name.as_ref() == nsh_system_controls::SEGMENTED_CONTROL_COMPONENT + { + segments.send(*id).unwrap(); + } + } + }); + app.wait_for("label:Conversation: Main Chat").unwrap(); + app.wait_for("label:Conversation: Room Chat").unwrap(); + let id = mounted.try_recv().expect("iOS system segments are mounted"); + app.engine().control().dispatch_event( + id, + EventKind::NativeEvent, + EventPayload::Native { + name: "change".into(), + data: json!(2), + }, + ); + app.wait_for_gone("label:Conversation: Main Chat", Duration::from_secs(3)) + .unwrap(); + app.wait_for("label:Conversation: Room Chat").unwrap(); +} + fn side_chat_fixture(default_model: bool, missing_main: bool) -> SideChatFixture { side_chat_fixture_on(default_model, missing_main, Os::MacOs, 1) } diff --git a/products/maka/ios-shell/tests/ios_shell_language.rs b/products/maka/ios-shell/tests/ios_shell_language.rs index abeb8aeefc1..5be28172447 100644 --- a/products/maka/ios-shell/tests/ios_shell_language.rs +++ b/products/maka/ios-shell/tests/ios_shell_language.rs @@ -21,7 +21,7 @@ use maka_ios_shell::engine_config; use nsh_core::{ - MountItem, Size, + EventKind, EventPayload, MountItem, Size, platform::{Environment, Languages, LocaleSettings, Os}, prelude::px, }; @@ -377,11 +377,12 @@ async fn chinese_settings_localize_connection_and_dynamic_model_controls() { let dir = tempfile::tempdir().unwrap(); let mut app = start_on(dir.path(), channel, "zh-Hans-CN", Os::Ios); - // Headless does not open UIKit menus; inspect the items sent to the native menu. + // Headless sees the props sent to UIKit and can return the native event. let (menu_tx, menus) = std::sync::mpsc::channel(); + let (switch_tx, switches) = std::sync::mpsc::channel(); app.observe(move |_, batch| { for item in &batch.items { - if let MountItem::ComponentProps { props, .. } = item { + if let MountItem::ComponentProps { id, props } = item { for (name, value) in props { if name.as_ref() == "items" && let Some(items) = value.as_ref().and_then(|value| value.as_array()) @@ -389,6 +390,11 @@ async fn chinese_settings_localize_connection_and_dynamic_model_controls() { { menu_tx.send(items.clone()).unwrap(); } + if name.as_ref() == "accessibilityLabel" + && value.as_ref().and_then(|value| value.as_str()) == Some("Fixture Agent") + { + switch_tx.send(*id).unwrap(); + } } } } @@ -426,7 +432,21 @@ async fn chinese_settings_localize_connection_and_dynamic_model_controls() { ); app.answer_dialogs_myself(); - app.press("role:switch[Fixture Agent]").unwrap(); + let id = switches.try_iter().last().expect("native agent switch"); + app.engine().control().dispatch_event( + id, + EventKind::NativeEvent, + EventPayload::Native { + name: "change".into(), + data: json!(true), + }, + ); + app.wait_until( + "native switch confirmation", + Duration::from_secs(5), + |screen| !screen.dialogs().is_empty(), + ) + .unwrap(); let dialog = app.pending_dialog().unwrap(); assert_eq!(dialog.title.as_deref(), Some("确认权限并启用")); assert!(dialog.buttons.iter().any(|button| button.text == "启用")); diff --git a/products/maka/workbench/Cargo.toml b/products/maka/workbench/Cargo.toml index 8cbbc86c179..d51f1ffbe65 100644 --- a/products/maka/workbench/Cargo.toml +++ b/products/maka/workbench/Cargo.toml @@ -76,6 +76,7 @@ cc = "1" maka-ui-build.workspace = true [dev-dependencies] +nsh-system-controls.workspace = true nsh-testing = { path = "../../../third-party/nsh/crates/nsh-testing", default-features = false } nsh-bundler = { workspace = true, features = ["bundle"] } # The ui_types example writes the specs' TypeScript, which only this feature keeps. diff --git a/products/maka/workbench/examples/ui_types.rs b/products/maka/workbench/examples/ui_types.rs index cab75b7f998..16ad7ffe14d 100644 --- a/products/maka/workbench/examples/ui_types.rs +++ b/products/maka/workbench/examples/ui_types.rs @@ -108,6 +108,7 @@ fn main() -> Result<(), Box> { .sets() .into_iter() .map(Into::into) + .chain(std::iter::once(nsh_system_controls::registry().into())) .chain(std::iter::once( maka_workbench::bindings::ui_set_description(), )) @@ -119,6 +120,11 @@ fn main() -> Result<(), Box> { "nsh/tokens.d.ts".to_owned(), nsh_bundler::tokens_declaration(&tokens), )); + // Both shells type their message catalogs independently of nsh/i18n. + definitions.push(( + "nsh/translations.d.ts".to_owned(), + nsh_bundler::translations_declaration(&Default::default()), + )); let types = output.join(".nsh/types"); for (name, contents) in definitions { @@ -128,7 +134,7 @@ fn main() -> Result<(), Box> { &output.join(".nsh/tsconfig.json"), nsh_bundler::TSCONFIG_BASE.as_bytes(), )?; - // Keep the base config's generated globals, assets and tokens in `files`. + // Keep NSH's generated declarations in `files`. let config = serde_json::json!({ "extends": "./.nsh/tsconfig.json", "compilerOptions": { diff --git a/scripts/asf-license-headers.mjs b/scripts/asf-license-headers.mjs index 3538da311c2..ecc8d78ed6d 100644 --- a/scripts/asf-license-headers.mjs +++ b/scripts/asf-license-headers.mjs @@ -227,6 +227,7 @@ export const exclusionRules = [ 'platform/computer-use/THIRD_PARTY_NOTICES', 'products/maka/cli/THIRD_PARTY_NOTICES.txt', 'products/maka/workbench/tests/fonts/OFL.txt', + 'third-party/nsh/website/src/lib/nsmetry/LICENSE', )(path) || path.startsWith('scripts/rust/licenses/'), }, { diff --git a/scripts/ci/run.mjs b/scripts/ci/run.mjs index 6806fcc69ad..368599ba0f4 100644 --- a/scripts/ci/run.mjs +++ b/scripts/ci/run.mjs @@ -783,6 +783,10 @@ export function executor( '--test', 'third-party/nsh/crates/nsh-platform-web/web/nsh.test.mjs', 'third-party/nsh/crates/nsh-platform-web/web/browser/dom.test.mjs', + 'third-party/nsh/crates/nsh-platform-web/web/mouse.test.mjs', + 'third-party/nsh/crates/nsh-platform-web/web/mouse-browser.test.mjs', + 'third-party/nsh/crates/nsh-platform-web/web/local-time.test.mjs', + 'third-party/nsh/crates/nsh-platform-web/web/touch-browser.test.mjs', ]); }); } else if (!['native', 'native-build'].includes(id)) { diff --git a/scripts/rust/dependencies.mjs b/scripts/rust/dependencies.mjs index 123d5d722fa..d98ab2ea871 100644 --- a/scripts/rust/dependencies.mjs +++ b/scripts/rust/dependencies.mjs @@ -35,7 +35,7 @@ const cargo = ['deny', '--locked', '--config', 'deny.toml']; execFileSync('cargo-deny', [...cargo, 'check', 'licenses'], { cwd: root, stdio: 'inherit' }); const crates = new Map(); const licenses = new Set(); -for (const crate of ['cli', 'desktop-shell']) { +for (const crate of ['cli', 'desktop-shell', 'ios-shell']) { const listing = execFileSync( 'cargo-deny', [ diff --git a/scripts/rust/dependencies.test.mjs b/scripts/rust/dependencies.test.mjs index 9af1c50f443..a8756f926ad 100644 --- a/scripts/rust/dependencies.test.mjs +++ b/scripts/rust/dependencies.test.mjs @@ -25,7 +25,7 @@ import { join } from 'node:path'; import test from 'node:test'; import { pathToFileURL } from 'node:url'; -const inventory = 'crate\tApache-2.0\tMIT\na@1\tX\t\nb@1\t\tX\nc@1\t\tX\n'; +const inventory = 'crate\tApache-2.0\tMIT\na@1\tX\t\nb@1\t\tX\nc@1\t\tX\nd@1\tX\t\n'; async function fixture(t, existing = inventory) { const root = await realpath(await mkdtemp(join(tmpdir(), 'maka-dependencies-'))); @@ -64,6 +64,7 @@ childProcess.execFileSync = (command, args) => { const inventories = { 'products/maka/cli/Cargo.toml': 'crate\\tMIT\\nb@1\\tX\\nc@1\\tX\\n', 'products/maka/desktop-shell/Cargo.toml': 'crate\\tApache-2.0\\tMIT\\na@1\\tX\\t\\nb@1\\t\\tX\\n', + 'products/maka/ios-shell/Cargo.toml': 'crate\\tApache-2.0\\nd@1\\tX\\n', }; assert.ok(Object.hasOwn(inventories, values['manifest-path']), 'unexpected product manifest'); inventory = inventories[values['manifest-path']]; @@ -86,7 +87,7 @@ syncBuiltinESMExports(); }; } -test('native inventory generation merges both products and passes the resulting check', async (t) => { +test('native inventory generation merges shipped products and passes the resulting check', async (t) => { const repo = await fixture(t, 'stale inventory\n'); for (const mode of ['generate', 'check']) { const result = await repo.run(mode); diff --git a/scripts/rust/package-ios.mjs b/scripts/rust/package-ios.mjs index e33d90bd441..a8c6b621dd1 100644 --- a/scripts/rust/package-ios.mjs +++ b/scripts/rust/package-ios.mjs @@ -30,6 +30,7 @@ import { cargoBuild } from './cargo.mjs'; const root = fileURLToPath(new URL('../..', import.meta.url)); const executable = 'maka-ios-shell'; +const legalResources = ['LICENSE', 'NOTICE']; const ipaName = 'Maka-ios-arm64.ipa'; const minimumOS = '15.0'; const localizedUsageDescriptions = { @@ -267,7 +268,7 @@ async function signApp(app, signing, bundleId, staging) { export function validateIpa(path) { const entries = new Set(command('unzip', ['-Z1', path]).trimEnd().split('\n')); - for (const file of ['Info.plist', executable]) { + for (const file of ['Info.plist', executable, ...legalResources]) { const entry = `Payload/Maka.app/${file}`; if (!entries.has(entry)) throw new Error(`IPA missing ${entry}`); } @@ -466,6 +467,7 @@ async function stageApp(app, binary, settings) { await mkdir(app, { recursive: true }); await copyFile(binary, join(app, executable)); await chmod(join(app, executable), 0o755); + for (const file of legalResources) await copyFile(join(root, file), join(app, file)); await writeFile(join(app, 'Info.plist'), plist(appInfo(settings))); await stageLocalizations(app); for (const [name, png] of appIcons(await readFile(join(root, 'assets/logo.png')))) diff --git a/scripts/rust/package-ios.test.mjs b/scripts/rust/package-ios.test.mjs index 33c7d82c532..06299d056c6 100644 --- a/scripts/rust/package-ios.test.mjs +++ b/scripts/rust/package-ios.test.mjs @@ -248,6 +248,10 @@ test('ditto stages a standard Payload archive and a portable SHA-256 file', { await assert.rejects(archiveIpa(payload, ipa), /IPA missing Payload\/Maka.app\/Info.plist/); await rm(ipa); await writeFile(join(app, 'Info.plist'), ''); + await assert.rejects(archiveIpa(payload, ipa), /IPA missing Payload\/Maka.app\/LICENSE/); + await rm(ipa); + await writeFile(join(app, 'LICENSE'), 'license fixture'); + await writeFile(join(app, 'NOTICE'), 'notice fixture'); await archiveIpa(payload, ipa); validateIpa(ipa); const entries = execFileSync('unzip', ['-Z1', ipa], { encoding: 'utf8' }).trim().split('\n'); @@ -255,6 +259,8 @@ test('ditto stages a standard Payload archive and a portable SHA-256 file', { 'Payload/', 'Payload/Maka.app/', 'Payload/Maka.app/Info.plist', + 'Payload/Maka.app/LICENSE', + 'Payload/Maka.app/NOTICE', 'Payload/Maka.app/maka-ios-shell', ]); const digest = createHash('sha256') diff --git a/third-party/nsh/.github/actions/cargo/action.yml b/third-party/nsh/.github/actions/cargo/action.yml index 829b25e71ef..3a2a0b54733 100644 --- a/third-party/nsh/.github/actions/cargo/action.yml +++ b/third-party/nsh/.github/actions/cargo/action.yml @@ -76,6 +76,12 @@ runs: echo "$version" case "$version" in *huacnlee/cargo*) ;; *) echo "::error::cargo is not huacnlee/cargo"; exit 1 ;; esac rustc=$(rustc -vV | sha256sum 2>/dev/null || rustc -vV | shasum -a 256) + # The fork keeps both shared-deps and workspace builds under Cargo home. + if [[ "${{ runner.environment }}" == self-hosted ]]; then + cargo_home="${CARGO_HOME:-$HOME/.cargo}/nsh-ci/${rustc:0:12}" + if [[ "$RUNNER_OS" == Windows ]]; then cargo_home=$(cygpath -aw "$cargo_home"); fi + echo "CARGO_HOME=$cargo_home" >> "$GITHUB_ENV" + fi echo "prefix=cargo-v1-${{ runner.os }}-${{ runner.arch }}-${{ inputs.cache }}-${rustc:0:12}-" >> "$GITHUB_OUTPUT" # The registry's index and the fork's builds of the dependencies diff --git a/third-party/nsh/.github/ci/ios-build-versions.py b/third-party/nsh/.github/ci/ios-build-versions.py index cfb4d75fd58..ee7d0b02ef9 100644 --- a/third-party/nsh/.github/ci/ios-build-versions.py +++ b/third-party/nsh/.github/ci/ios-build-versions.py @@ -33,15 +33,18 @@ def check(root, min_sdk, devices): if not versions: print(f"::error::{binary}: missing LC_BUILD_VERSION") failed = True + # Mac Catalyst links against the macOS SDK, which before Xcode 26 is + # numbered 3 below the iOS SDK (Xcode 16.4: iOS 18.5, macOS 15.5). + sdk_min = min_sdk - 3 if platform == "6" and min_sdk < 26 else min_sdk for actual_platform, minimum, sdk in versions: print(f"{runtime}: platform={actual_platform} minos={minimum} sdk={sdk}") if ( actual_platform != platform or minimum not in ("15.0", "15.0.0") - or int(sdk.split(".")[0]) < min_sdk + or int(sdk.split(".")[0]) < sdk_min ): print( - f"::error::{binary}: expected platform {platform}, minos 15.0, SDK >= {min_sdk}" + f"::error::{binary}: expected platform {platform}, minos 15.0, SDK >= {sdk_min}" ) failed = True return int(failed) diff --git a/third-party/nsh/.github/workflows/release.yml b/third-party/nsh/.github/workflows/release.yml index 780200d0fbf..885a5a9b8b7 100644 --- a/third-party/nsh/.github/workflows/release.yml +++ b/third-party/nsh/.github/workflows/release.yml @@ -38,7 +38,9 @@ name: Release # `nsh-android-symbols.tar.gz`, `nsh-ios-macos-.tar.gz`, # `nsh-gpui-.tar.gz`, `nsh-tui-.tar.gz`) the other # runtimes, which an installed nsh downloads from its own release -# (`nsh component`). The embedding SDKs are `nsh-embed-ios.zip` and +# (`nsh component`). x86_64 Windows' archive also holds the release +# runner's link kit, and its linker is the component +# `nsh-windows-linker.tar.gz`. The embedding SDKs are `nsh-embed-ios.zip` and # `nsh-embed-android.zip`. Publishing the draft runs `packages.yml` (Homebrew). on: @@ -125,7 +127,10 @@ jobs: needs: plan if: needs.plan.outputs.build == 'true' strategy: - fail-fast: false + # A release or a nightly needs every platform: the first build that + # fails cancels the rest instead of leaving them to run for an hour + # for nothing. Re-running the failed jobs re-runs the cancelled ones. + fail-fast: true matrix: # The CLI, the desktop runtime and the GPUI and terminal hosts are # built for the runner's processor, so each architecture has a runner @@ -160,8 +165,12 @@ jobs: shared: true - name: linux-arm64 os: ubuntu-24.04-arm + # x86_64 Windows builds the release runner for + # x86_64-pc-windows-gnullvm, with its link kit (#1644): `nsh + # package` links it again with only the parts an app imports. - name: windows-x86_64 os: windows-latest + gnullvm: true - name: windows-arm64 os: windows-11-arm runs-on: ${{ matrix.os }} @@ -244,10 +253,35 @@ jobs: test -f "$ANDROID_HOME/platforms/android-35/android.jar" ls "$ANDROID_HOME/ndk" || true + # rust-toolchain.toml lists Apple silicon's iOS targets; an Intel Mac + # builds the simulator and Mac Catalyst runtimes for x86_64. - name: Setup Rust uses: dtolnay/rust-toolchain@stable with: - targets: wasm32-unknown-unknown + targets: wasm32-unknown-unknown${{ matrix.name == 'macos-x86_64' && ',x86_64-apple-ios,x86_64-apple-ios-macabi' || '' }}${{ matrix.gnullvm && ',x86_64-pc-windows-gnullvm' || '' }} + + # The gnullvm runner's C code (QuickJS, zstd, ring) and its link need a + # mingw toolchain; bindgen's libclang rejects the gnullvm triple, so it + # is given mingw's. `cargo xtask dist` builds the runner for gnullvm + # when `CC_x86_64_pc_windows_gnullvm` is set. + - name: Set up llvm-mingw + if: matrix.gnullvm + env: + LLVM_MINGW_VERSION: "20261117" + run: | + name="llvm-mingw-$LLVM_MINGW_VERSION-ucrt-x86_64" + curl -sSfL -o "$RUNNER_TEMP/llvm-mingw.zip" \ + "https://github.com/mstorsjo/llvm-mingw/releases/download/$LLVM_MINGW_VERSION/$name.zip" + unzip -q "$RUNNER_TEMP/llvm-mingw.zip" -d "$RUNNER_TEMP" + m="$(cygpath -m "$RUNNER_TEMP/$name")" + echo "$m/bin" >> "$GITHUB_PATH" + { + echo "CARGO_TARGET_X86_64_PC_WINDOWS_GNULLVM_LINKER=x86_64-w64-mingw32-clang" + echo "CC_x86_64_pc_windows_gnullvm=x86_64-w64-mingw32-clang" + echo "CXX_x86_64_pc_windows_gnullvm=x86_64-w64-mingw32-clang++" + echo "AR_x86_64_pc_windows_gnullvm=llvm-ar" + echo "BINDGEN_EXTRA_CLANG_ARGS_x86_64_pc_windows_gnullvm=--target=x86_64-w64-mingw32 -isystem $m/include" + } >> "$GITHUB_ENV" # The web runtime's C code (zstd) needs upstream LLVM: Apple's clang # does not target wasm32. Check the C tools before building runtimes. diff --git a/third-party/nsh/.github/workflows/rust-app.yml b/third-party/nsh/.github/workflows/rust-app.yml index 8a7bc4783eb..e60ef9003ff 100644 --- a/third-party/nsh/.github/workflows/rust-app.yml +++ b/third-party/nsh/.github/workflows/rust-app.yml @@ -130,7 +130,7 @@ jobs: with: cache: rust-app - name: Clippy - run: cargo clippy -p gallery-native -p nsh-extra --all-targets --features nsh-extra/camera,nsh-extra/location,nsh-extra/photos,nsh-extra/push,nsh-extra/speech --locked -- -D warnings + run: cargo clippy -p gallery-native -p nsh-extra --all-targets --features nsh-extra/camera,nsh-extra/location,nsh-extra/photos,nsh-extra/push,nsh-extra/share,nsh-extra/speech --locked -- -D warnings # Without the optional features: no naga, wgpu, syntect, RaTeX, ropey, # imara-diff; no `zlib` or `crypto` module. - name: Check macOS without optional features @@ -143,7 +143,7 @@ jobs: # gallery's features, so nothing is built twice. nsh-extra's with # every module on: off the phones, their APIs and backends. - name: Test the crate - run: cargo test -p gallery-native -p nsh-extra --features nsh-extra/camera,nsh-extra/location,nsh-extra/photos,nsh-extra/push,nsh-extra/speech ${{ runner.os == 'macOS' && '-p nsh-platform-apple' || '' }} --locked + run: cargo test -p gallery-native -p nsh-extra --features nsh-extra/camera,nsh-extra/location,nsh-extra/photos,nsh-extra/push,nsh-extra/share,nsh-extra/speech ${{ runner.os == 'macOS' && '-p nsh-platform-apple' || '' }} --locked - name: Check the native dependency graph run: | cargo tree -p gallery-native --locked -e normal > "$RUNNER_TEMP/rust-app-dependencies.txt" @@ -185,10 +185,11 @@ jobs: uses: ./.github/actions/cargo with: cache: rust-app-web - # nsh-extra's web code (the browser's Web Speech API), which no other - # job compiles: the native jobs build it empty. + # nsh-extra's web code (the browser's geolocation, Web Share and Web + # Speech APIs), which no other job compiles: the native jobs build it + # empty. - name: Clippy nsh-extra for the web - run: cargo clippy -p nsh-extra --target wasm32-unknown-unknown --features nsh-extra/location,nsh-extra/speech --locked -- -D warnings + run: cargo clippy -p nsh-extra --target wasm32-unknown-unknown --features nsh-extra/location,nsh-extra/share,nsh-extra/speech --locked -- -D warnings - name: Build the command line run: cargo build -p nsh-cli --locked - name: Publish the Rust gallery for the web diff --git a/third-party/nsh/.github/workflows/website.yml b/third-party/nsh/.github/workflows/website.yml index 1653eae7d22..bec6739800f 100644 --- a/third-party/nsh/.github/workflows/website.yml +++ b/third-party/nsh/.github/workflows/website.yml @@ -130,6 +130,12 @@ jobs: - name: Test the player's dialogs, input and host channel run: node --test crates/nsh-platform-web/web/nsh.test.mjs + - name: Test the player's mouse events + run: node --test crates/nsh-platform-web/web/mouse.test.mjs + + - name: Test the player's local time + run: node --test crates/nsh-platform-web/web/local-time.test.mjs + - name: Test viewport dialogs across iframe boundaries run: node --test crates/nsh-platform-web/web/viewport-browser.test.mjs @@ -139,6 +145,9 @@ jobs: - name: Test touch drags handed from zoomable views in a browser run: node --test crates/nsh-platform-web/web/touch-browser.test.mjs + - name: Test mouse coordinates through transforms in a browser + run: node --test crates/nsh-platform-web/web/mouse-browser.test.mjs + - name: Test files dragged into a browser run: node --test crates/nsh-platform-web/web/file-drop-browser.test.mjs diff --git a/third-party/nsh/.github/workflows/windows.yml b/third-party/nsh/.github/workflows/windows.yml index 25daeb5dd12..aee6989c9de 100644 --- a/third-party/nsh/.github/workflows/windows.yml +++ b/third-party/nsh/.github/workflows/windows.yml @@ -187,3 +187,80 @@ jobs: run "examples/gallery/tests/$file.test.tsx" done run examples/gallery/tests/environment.test.tsx --filter appearance + + # The release runner on x86_64-pc-windows-gnullvm (#1644): linked again by + # `nsh package` from its link kit with only the parts an app imports, with + # rust-lld and the mingw-w64 runtime alone (no Visual Studio). Builds it, + # runs `nsh/base`'s tests there, and packages the counter from the kit. + gnullvm: + needs: changed + if: ${{ !cancelled() && needs.changed.outputs.run != 'false' && (github.event_name != 'pull_request' || (github.event.action != 'closed' && !github.event.pull_request.draft)) }} + environment: + name: ci-debounce + deployment: false + runs-on: windows-latest + env: + LIBCLANG_PATH: C:\Program Files\LLVM\bin + RUST_MIN_STACK: "268435456" + LLVM_MINGW_VERSION: "20261117" + LLVM_MINGW: llvm-mingw-20261117-ucrt-x86_64 + steps: + - uses: actions/checkout@v6 + + - name: Setup Rust + uses: dtolnay/rust-toolchain@stable + with: + targets: x86_64-pc-windows-gnullvm + + - name: Cargo + uses: ./.github/actions/cargo + with: + cache: windows-gnullvm + + - name: Use the toolchain compiler directly + shell: pwsh + run: | + $rustc = rustup which rustc + if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } + "RUSTC=$rustc" >> $env:GITHUB_ENV + + # The C code (QuickJS, zstd, ring) and the runner's link need a mingw + # toolchain; bindgen's libclang rejects the gnullvm triple, so it is + # given mingw's. + - name: Set up llvm-mingw + shell: bash + run: | + curl -sSfL -o "$RUNNER_TEMP/llvm-mingw.zip" \ + "https://github.com/mstorsjo/llvm-mingw/releases/download/$LLVM_MINGW_VERSION/$LLVM_MINGW.zip" + unzip -q "$RUNNER_TEMP/llvm-mingw.zip" -d "$RUNNER_TEMP" + m="$(cygpath -m "$RUNNER_TEMP/$LLVM_MINGW")" + echo "$m/bin" >> "$GITHUB_PATH" + { + echo "CARGO_TARGET_X86_64_PC_WINDOWS_GNULLVM_LINKER=x86_64-w64-mingw32-clang" + echo "CC_x86_64_pc_windows_gnullvm=x86_64-w64-mingw32-clang" + echo "CXX_x86_64_pc_windows_gnullvm=x86_64-w64-mingw32-clang++" + echo "AR_x86_64_pc_windows_gnullvm=llvm-ar" + echo "BINDGEN_EXTRA_CLANG_ARGS_x86_64_pc_windows_gnullvm=--target=x86_64-w64-mingw32 -isystem $m/include" + } >> "$GITHUB_ENV" + + - name: Test nsh/base + run: cargo test -p nsh-base --target x86_64-pc-windows-gnullvm + + - name: Package the counter from the runner's link kit + shell: bash + env: + CARGO_PROFILE_RELEASE_LTO: "off" + CARGO_PROFILE_RELEASE_CODEGEN_UNITS: "16" + run: | + cargo rustc --release -p nsh-windows-app --bin nsh-windows-app \ + --target x86_64-pc-windows-gnullvm -- -C save-temps --print link-args > "$RUNNER_TEMP/linkargs.txt" + rt="$RUNNER_TEMP/runtime/windows" + mkdir -p "$rt" + cp target/x86_64-pc-windows-gnullvm/release/nsh-windows-app.exe "$rt/" + node crates/nsh-windows-app/script/link-kit.js "$RUNNER_TEMP/linkargs.txt" "$rt/nsh-windows-app.link" + cargo build -p nsh-cli + NSH_RUNTIME="$RUNNER_TEMP/runtime" ./target/debug/nsh package examples/counter --target windows -o "$RUNNER_TEMP/out" -v + full=$(stat -c %s "$rt/nsh-windows-app.exe") + app=$(stat -c %s "$RUNNER_TEMP"/out/*/*.exe) + echo "runner $full bytes, the counter's $app bytes" + (( app < full * 9 / 10 )) diff --git a/third-party/nsh/AGENTS.md b/third-party/nsh/AGENTS.md index f3fc77a471d..b2544489d7e 100644 --- a/third-party/nsh/AGENTS.md +++ b/third-party/nsh/AGENTS.md @@ -90,13 +90,13 @@ Platform crates can compile as **empty crates on the wrong target**. Check chang platform code on its real target, using [commands](docs/dev/commands.md): ```sh -cargo clippy -p nsh-platform-ios -p nsh-ios-host -p nsh-ios-app -p nsh-extra --target aarch64-apple-ios-macabi --features nsh-platform-ios/embed,nsh-platform-ios/dev,nsh-extra/camera,nsh-extra/photos,nsh-extra/location,nsh-extra/push,nsh-extra/speech +cargo clippy -p nsh-platform-ios -p nsh-ios-host -p nsh-ios-app -p nsh-extra --target aarch64-apple-ios-macabi --features nsh-platform-ios/embed,nsh-platform-ios/dev,nsh-extra/camera,nsh-extra/photos,nsh-extra/location,nsh-extra/push,nsh-extra/share,nsh-extra/speech cargo xtask clippy-android cargo clippy -p nsh-platform-linux -p nsh-linux-host -p nsh-linux-app --all-targets -cargo clippy -p nsh-platform-macos -p nsh-macos-host -p nsh-macos-app -p nsh-extra --all-targets --features nsh-platform-macos/dev,nsh-extra/location,nsh-extra/speech +cargo clippy -p nsh-platform-macos -p nsh-macos-host -p nsh-macos-app -p nsh-extra --all-targets --features nsh-platform-macos/dev,nsh-extra/location,nsh-extra/share,nsh-extra/speech cargo clippy -p nsh-platform-windows -p nsh-windows-host -p nsh-windows-app -p nsh-extra --all-targets --features nsh-extra/speech cargo clippy -p nsh-platform-web --target wasm32-unknown-unknown --features compiler -cargo clippy -p nsh-extra --target wasm32-unknown-unknown --features nsh-extra/location,nsh-extra/speech +cargo clippy -p nsh-extra --target wasm32-unknown-unknown --features nsh-extra/location,nsh-extra/share,nsh-extra/speech cargo clippy --manifest-path crates/gpui/Cargo.toml --all-targets --features nsh-platform-gpui/dev cargo test --manifest-path crates/gpui/Cargo.toml cargo +nightly fmt --manifest-path crates/gpui/Cargo.toml --all diff --git a/third-party/nsh/CONTRIBUTING.md b/third-party/nsh/CONTRIBUTING.md index 6fbc5c122e3..3a1509cd0b5 100644 --- a/third-party/nsh/CONTRIBUTING.md +++ b/third-party/nsh/CONTRIBUTING.md @@ -70,10 +70,6 @@ A new feature, one NSH does not have in any form, is accepted only when all of t When a proposal fails these points but the feature is still worth sharing, the answer is an nshm, not a smaller version in NSH; reviewers point there instead of reviewing the code. -Not accepted, unless a complete design meets every point above: wrappers of individual platform APIs for specific -scenarios (WebView cookies, downloads, page capture, developer tools and similar controls), features only some -platforms can support, and options that serve one app. - Before writing a new feature, open an issue that answers these points and wait for a maintainer to agree. A pull request that adds a feature without that agreement may be closed without a review of its code, however well it is written. @@ -81,6 +77,37 @@ written. Reviewers, people and AI agents alike, judge scope first: a pull request that adds public API or a dependency is checked against this section before its implementation is reviewed. +### What NSH does not accept + +A quick test: NSH helps apps draw, lay out, animate, take input and get delivered. If a feature is about what an +app does for its users (signs them in, takes payments, speaks text, tracks uploads), it belongs in the app or in an +nshm, however many apps would use it. + +These are not accepted in NSH. Most of them make a good nshm: + +- **App and business features.** Sign-in flows and OAuth 2, accounts, payments, analytics, clients for push or + cloud services, text-to-speech, upload progress and similar. A popular protocol or service is still an app + feature: OAuth 2 is everywhere, and it is still an nshm, not part of a UI framework. +- **Linking a third-party framework or SDK into NSH**, above all one that exists on a single platform (a + macOS-only framework, for example). NSH would carry its size, licence and release schedule for every app. Call it + from the app's Rust crate or wrap it in an nshm. System frameworks such as UIKit and AppKit are not third-party. +- **Wrappers of individual platform APIs for specific scenarios**: WebView cookies, downloads, page capture, + developer tools and similar controls. +- **Features only some platforms can support**, and options that serve one app. +- **Behavior that departs from the platforms.** Base behavior (keys, focus, selection, scrolling, text editing) + follows what macOS, Windows and the browser commonly do. A change NSH would invent, or one that alters this + behavior on a single platform, is not accepted, even as an option. For example, Up on the first line of a + multi-line input does what a native text field does there; NSH does not give it a meaning of its own. +- **A second, system-styled version of a shared control**, or a React Native compatibility wrapper or alias. See + [Component design standards](#component-design-standards) and [NSH and React Native](#nsh-and-react-native). + +App features and third-party frameworks stay out of NSH, whatever the design. For the platform API wrappers and +partial-platform features, only a complete design that meets all four points of the new-feature list above changes +the answer; a popular request alone does not. A feature NSH already has is not precedent for adding a similar one. + +Reviewers answer these proposals by pointing to an nshm or the app's Rust crate and closing the issue or pull +request, without reviewing the code. + ## Component design standards Native Shell provides native views, rendering, animation and interaction. Its goal is not to reproduce the default diff --git a/third-party/nsh/Cargo.lock b/third-party/nsh/Cargo.lock index c9636067e20..48f24061882 100644 --- a/third-party/nsh/Cargo.lock +++ b/third-party/nsh/Cargo.lock @@ -61,12 +61,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "alloc-no-stdlib" -version = "2.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" - [[package]] name = "alloc-no-stdlib" version = "3.0.0" @@ -79,7 +73,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b5c1865780388bfa186411ab5f247819487fc4864c6e9c3106611fa347586e1" dependencies = [ - "alloc-no-stdlib 3.0.0", + "alloc-no-stdlib", ] [[package]] @@ -516,31 +510,22 @@ dependencies = [ [[package]] name = "brotli" -version = "9.0.0" +version = "9.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8b851b75c23ca7873623d612fe49bd1989aeb03d08fb9432187eb253d3d4c6b" +checksum = "9071f285ed78f04f37d675abaaef5de7689e2f30a216c8dc6795465d81910a13" dependencies = [ - "alloc-no-stdlib 3.0.0", + "alloc-no-stdlib", "alloc-stdlib", - "brotli-decompressor 6.0.1", -] - -[[package]] -name = "brotli-decompressor" -version = "5.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a32acac15fe1967bc3986b2a6347dffc965602354ea6f450ad07e8bfd253583" -dependencies = [ - "alloc-no-stdlib 2.0.4", + "brotli-decompressor", ] [[package]] name = "brotli-decompressor" -version = "6.0.1" +version = "6.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "941cd9bd4ddab83cb46fa5a2d428f1c857b24ac78cb876cf7beb710840934bd7" +checksum = "664148598c930650998ef56df301329ffe7b4cdb02d49b2a3fca3bcaf2185bcb" dependencies = [ - "alloc-no-stdlib 3.0.0", + "alloc-no-stdlib", "alloc-stdlib", ] @@ -3796,6 +3781,7 @@ dependencies = [ "crossbeam-channel", "dunce", "flate2", + "ignore", "image", "libc", "log", @@ -3835,7 +3821,6 @@ name = "nsh-core" version = "0.7.2" dependencies = [ "cap-std", - "chrono", "crc32fast", "flate2", "futures-util", @@ -3939,6 +3924,7 @@ dependencies = [ "nsh-platform-android", "nsh-platform-apple", "nsh-platform-ios", + "nsh-platform-macos", "nsh-testing", "objc2", "objc2-core-foundation", @@ -3947,6 +3933,7 @@ dependencies = [ "objc2-ui-kit", "serde_json", "tokio", + "url", "wasm-bindgen", "web-sys", "windows", @@ -4378,6 +4365,7 @@ version = "0.7.2" dependencies = [ "log", "nsh-base", + "nsh-core", "nsh-engine", "nsh-platform-windows", "serde_json", @@ -9294,11 +9282,11 @@ checksum = "3ad82d2a33cdc9674dc7465672f271e096168fcdbe0f799d9e6db8c5892679dc" [[package]] name = "wuff" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "200a7b806377b65f1ff9a985874332f15357c87e5dd7855f35f06dade95b8b3d" +checksum = "f6a992b57b3d1ee972b2e3fd9225e44793104d49818836dd812d5459187712dd" dependencies = [ - "brotli-decompressor 5.0.3", + "brotli-decompressor", "bytes", "flate2", ] diff --git a/third-party/nsh/Cargo.toml b/third-party/nsh/Cargo.toml index f7381d39cc1..7fce640dcfe 100644 --- a/third-party/nsh/Cargo.toml +++ b/third-party/nsh/Cargo.toml @@ -62,6 +62,8 @@ thiserror = "2" clap = { version = "4.6", features = ["derive"] } crossbeam-channel = "0.5" notify = "8.2" +# What Git ignores, which `nsh test` does not look for tests in. +ignore = "0.4.34" log = "0.4" ordered-float = { version = "5", default-features = false } env_logger = "0.11" @@ -94,7 +96,7 @@ ratex-types = "0.1.15" ratex-font = "0.1.15" # WOFF and WOFF2 fonts, decompressed to the TrueType / OpenType data the # text engines register (`nsh-core`'s `text::font_data`). -wuff = "0.2.9" +wuff = "0.2.10" oxc_sourcemap = "9" serde = { version = "1", features = ["derive"] } serde_json = "1" @@ -357,15 +359,9 @@ objc2-ui-kit = { version = "0.3.2", default-features = false, features = [ "UIMenu", "UIMenuElement", "UIPreviewParameters", - "UISegmentedControl", - "UISwitch", - "UIDatePicker", "UISheetPresentationController", "UISplitViewController", "UIAlertController", - "UIActivity", - "UIActivityItemProvider", - "UIActivityViewController", "UIPopoverPresentationController", "UIPopoverSupport", "UIAccessibilityCustomAction", diff --git a/third-party/nsh/SOURCE.md b/third-party/nsh/SOURCE.md index 4176ac64cfb..0427ab77794 100644 --- a/third-party/nsh/SOURCE.md +++ b/third-party/nsh/SOURCE.md @@ -20,7 +20,7 @@ # Native Shell (NSH) This directory contains NSH from [`longbridge/nsh`](https://github.com/longbridge/nsh), -synchronized through revision `a901baa2e2d82a17066abb589b542b0a90890e0a`. +synchronized through revision `bdba103fd31a22a188bebd6b19df54a99204bb0a`. The original import came from `M4n5ter/nsh`, branch `tui/terminal-backend`, at `de176695240d550f2b303643b8019146c7989e7f`. @@ -52,10 +52,22 @@ bound rows. Keyed changes use NSH's `ListDiff` and sibling placement logic. AppKit uses the upstream keyboard monitor for both raw keys and scoped shortcuts. Windows uses the upstream selection lifecycle when text changes. +Virtual-list scope replacement, pointer-focus override eligibility and GPU +surface collapse/static shader redraw use upstream #3516, #3532 and #3533. +The List items memo also drives empty, separator and viewability checks for +indexed sources. NSH's optional `Share` module now lives in `nsh-extra`; +Maka does not register it. + Asset builds use upstream app roots, package-relative paths and default unresolved-import errors; built-in plugin builds declare the Maka repository as their shared root. Callers migrate with upstream rather than keeping aliases or older implementations. +The iOS shell links the official [`nsh-system-controls` 0.1.0](https://crates.io/crates/nsh-system-controls/0.1.0) +extension for UIKit segmented controls and switches. The crates.io release is +from revision `a1c8d5f1807f2ab0c60ccf3e59bb8598e9a6ff97`. Its Cargo dependencies +use the same vendored NSH types as the host; the UI compiler and runtime register +the extension's own module. + Installed plugin modules are immutable compiled artifacts. A compiler contract change requires rebuilding and repinning external UI packages; invalidating a build cache alone cannot update installed modules. Built-in packages are rebuilt @@ -72,11 +84,14 @@ terminal surfaces. Desktop window operations take explicit `WindowRef` values. Direct2D offscreen terminal surfaces and the TUI image store. GPUI and its embed example remain retired. - **Embedding and packages:** `EmbeddedHost` binds the main `AppView` window to - `ROOT_ID`; configured host loading, lazy plugin chunks, + `ROOT_ID` and already mounts plain JS roots inline (#3528). Configured host loading, lazy plugin chunks, `import.meta.assetBase` resource namespaces, main-thread lifecycle hooks and terminal inspection are required by Maka's shells and plugin composition. - **Source-aware reading:** TextView preserves canonical source identity, byte offsets and reading anchors through Markdown rendering and repair. + List geometry replays pending instant scrolls without projecting animated + targets; end-follow tolerates platform rounding without quantizing reading + anchors or native overscroll. Markdown without source mapping uses the upstream incremental parser, including chunked reads for long documents with eligible plugins. RichEditor exposes leased geometry for the composer and terminal surfaces. @@ -92,6 +107,10 @@ terminal surfaces. Desktop window operations take explicit `WindowRef` values. - **Native lifecycle:** terminal surfaces keep host ownership of windows and event loops while honoring menu labels, quit requests and system session termination. Stopping an engine revokes its input and frame receipts. +- **Shader submission and retirement (upstream #3534):** Metal uploads and + surface copies share the submission queue with surface and readback draws. + Apple and Windows surface pools keep frames that finish during collection + when they are newer than the selected frame. - **iOS keyboard geometry:** `nsh-platform-ios` ignores floating or undocked keyboard frames that leave the bottom edge clear when the docked guide covers only the safe area. Animated updates start from the notification's end @@ -105,10 +124,10 @@ terminal surfaces. Desktop window operations take explicit `WindowRef` values. ## Maintenance and verification -Local test adjustments: `mouse.test.mjs` expects pointer metadata -(`pointerType`, pressure and tilt). AppKit's `menu_labels`, `menu_lifetime` -and `text_view_selection` find layer-backed text through accessibility (#2997); -selection drags use accessibility frames converted to window coordinates. +The Web mouse fixtures use upstream's pointer metadata assertions (#3566). +AppKit's local `menu_labels`, `menu_lifetime` and `text_view_selection` tests +find layer-backed text through accessibility (#2997); selection drags use +accessibility frames converted to window coordinates. Compare retained changes against each recorded upstream baseline. Remove local patches when upstream supplies the same behavior; migrate all product, plugin, diff --git a/third-party/nsh/crates/nsh-base/src/calendar.rs b/third-party/nsh/crates/nsh-base/src/calendar.rs index 88060227fdf..efde85cc799 100644 --- a/third-party/nsh/crates/nsh-base/src/calendar.rs +++ b/third-party/nsh/crates/nsh-base/src/calendar.rs @@ -6,7 +6,10 @@ //! a day selects it (`CalendarState::select_date`): with `range` the //! first press starts a range and the second ends it (an earlier day //! starts it again). `onChange({ value })` reports a complete value only -//! (`CalendarEvent::Selected`); a half range shows until it completes. +//! (`CalendarEvent::Selected`); a half range shows until it completes, +//! and `onChangeStart({ value })` reports it (`[start, null]`), so the +//! app can show its start elsewhere and wait for the end. An app that +//! sets `value` to it owns it: a value it sets next replaces it. //! - **Views**: the days of `numberOfMonths` months side by side, the //! twelve months of the shown year (`monthToggle`) or a page of twenty //! years of `yearRange` (`yearToggle`); picking a month or a year goes @@ -654,11 +657,19 @@ pub struct CalendarProps { /// The events of a [`Calendar`]. #[derive(Debug, Clone, PartialEq, Event)] +#[non_exhaustive] pub enum CalendarEvent { /// The user picked a complete value (`gpui-base`'s `Selected`): a day, /// or a range's end. A `value` the app passes is never reported. #[args(value)] Change(Date), + /// The user started a range (`[start, null]`): the first press, or a + /// press that starts it again. It shows half picked until a press ends + /// it, which `onChange` reports. An app that sets `value` to it owns + /// it: a value the app sets next (the one before, on a Cancel) + /// replaces it. + #[args(value)] + ChangeStart(Date), } /// Which view the calendar shows (`gpui-base`'s `CalendarView`). @@ -943,17 +954,16 @@ impl Grid { }); } - /// The user picked `day`: the new value, reported to `changed` once - /// complete (`CalendarState::activate_date`). + /// The user picked `day`: the new value, reported to `changed` + /// whether complete (`CalendarState::activate_date`) or a range's + /// start. fn pick(self, day: NaiveDate, changed: &dyn Fn(Date)) { if untracked(|| self.disabled(day)) { return; } let next = self.shown.get_untracked().picked(day); self.show(next); - if next.is_complete() { - changed(next); - } + changed(next); } /// The days are on screen: their month is shown. @@ -1117,8 +1127,9 @@ impl Grid { } } -/// Makes a calendar: the header and the body of `grid`, reporting complete -/// values to `changed`. +/// Makes a calendar: the header and the body of `grid`, reporting each +/// pick to `changed`: a complete value, or a range's start +/// ([`Date::is_complete`] tells them apart). pub(crate) fn calendar_view(grid: Grid, changed: Rc) -> Vec { let config = grid.config; grid.bind_keys(changed.clone()); @@ -1983,7 +1994,8 @@ fn day(grid: Grid, cell: Cell, changed: Rc) -> AnyElement { /// `numberOfMonths` months; the toggles show the months of the year or a /// page of years to pick from. The value is `value` and `onChange` (or the /// calendar's own, from `defaultValue`): one date, or with `range` a start -/// and an end; `disabledMatcher` says which dates cannot be picked. The +/// and an end (`onChangeStart` reports the start while the end is still to +/// pick); `disabledMatcher` says which dates cannot be picked. The /// arrows, Home, End and Page Up / Down move among the days, Return and /// Space pick. It looks like nothing: the app styles the parts or draws the /// items (`renderItem`). @@ -2022,7 +2034,13 @@ pub fn Calendar(props: CalendarProps, cx: Scope) -> impl IntoElem render_item: props.render_item, }; let grid = Grid::new(config, value); - let changed: Rc = Rc::new(move |date| { + let changed: Rc = Rc::new(move |date: Date| { + // A half range is the grid's until it completes: the own value + // stays the last complete one. + if !date.is_complete() { + cx.emit(CalendarEvent::ChangeStart(date)); + return; + } if matches!(props.value.get_untracked(), CalendarValue::Uncontrolled) { own.set(date); } diff --git a/third-party/nsh/crates/nsh-base/src/combobox.rs b/third-party/nsh/crates/nsh-base/src/combobox.rs index 3f67fd0b5fb..9cc290113e3 100644 --- a/third-party/nsh/crates/nsh-base/src/combobox.rs +++ b/third-party/nsh/crates/nsh-base/src/combobox.rs @@ -336,8 +336,6 @@ pub fn Combobox(props: ComboboxProps, cx: Scope) -> impl IntoElem let width = signal(None::); let focused = signal(false); let opening = stored(Opening::Press); - // Why it closed last: a press outside leaves the focus where it went. - let closed_by = stored(None::); let change: Rc = Rc::new(move |next, reason| { if next && props.disabled.get_untracked() { return; @@ -345,10 +343,8 @@ pub fn Combobox(props: ComboboxProps, cx: Scope) -> impl IntoElem if open.get_untracked() == next { return; } - if !next { - closed_by.replace(Some(reason)); - } - open.request(next, || { + // The reason a close keeps says where the keyboard goes (`back`). + open.request_for(next, reason, || { cx.emit(ComboboxEvent::OpenChange(next, reason)); }); }); @@ -506,9 +502,8 @@ pub fn Combobox(props: ComboboxProps, cx: Scope) -> impl IntoElem // Back to the input, unless a press outside, Tab or the app's // `onChange` took the keyboard somewhere else. back: Rc::new(move |popup| { - let by = closed_by.replace(None); if !matches!( - by, + open.take_closed_by(), Some(OpenChangeReason::PressOutside | OpenChangeReason::Focus) ) { field.focus_back(popup); @@ -630,7 +625,7 @@ pub fn Combobox(props: ComboboxProps, cx: Scope) -> impl IntoElem }) // A press on the input opens and closes the list in every idiom, // as `gpui-component`'s trigger does (after the focus it gave, - // which the platforms report first). + // which every platform reports first). .on_press(move || { if focus_opened.replace(false) || props.disabled.get_untracked() { return; diff --git a/third-party/nsh/crates/nsh-base/src/data_table/view.rs b/third-party/nsh/crates/nsh-base/src/data_table/view.rs index dfa65e8160f..c92569a2b90 100644 --- a/third-party/nsh/crates/nsh-base/src/data_table/view.rs +++ b/third-party/nsh/crates/nsh-base/src/data_table/view.rs @@ -1248,6 +1248,7 @@ fn body_row( let (press_dt, menu_dt, class_dt) = (dt.clone(), dt.clone(), dt.clone()); let el = parts_with( view() + .role(AccessibilityRole::Row) .absolute() .left_0() .style_when(move || row.get().is_none(), |s| s.hidden()) @@ -1687,8 +1688,7 @@ fn corner(dt: Dt) -> impl IntoElement { } fn header_region(dt: Dt, which: Region, w: Windows, custom: bool) -> impl IntoElement { - let (left_dt, width_dt, x_dt, titles_dt, groups_dt) = - (dt.clone(), dt.clone(), dt.clone(), dt.clone(), dt.clone()); + let (left_dt, width_dt, x_dt, row_dt) = (dt.clone(), dt.clone(), dt.clone(), dt.clone()); let shown = { let dt = dt.clone(); move || match which { @@ -1704,13 +1704,16 @@ fn header_region(dt: Dt, which: Region, w: Windows, custom: bool) -> impl IntoEl group_cells(&dt, which, &window, w.col_origin.get()) }) }; + let levels = { + let dt = dt.clone(); + computed(move || (0..dt.header_levels()).collect::>()) + }; when(shown, move || { - let (left_dt, width_dt, x_dt, titles_dt, groups_dt) = ( + let (left_dt, width_dt, x_dt, row_dt) = ( left_dt.clone(), width_dt.clone(), x_dt.clone(), - titles_dt.clone(), - groups_dt.clone(), + row_dt.clone(), ); let list = match which { Region::Fixed => w.fixed_cols, @@ -1738,40 +1741,98 @@ fn header_region(dt: Dt, which: Region, w: Windows, custom: bool) -> impl IntoEl _ => Length::from(px(0.0)), }) .child(each( - groups, - |g: &GroupCell| (g.level, g.from), - move |group, _| { - group_cell(groups_dt.clone(), group.get_untracked(), which, w) - }, - )) - .child(each( - list, - |def: &usize| *def, - move |def, _| { - title(titles_dt.clone(), def.get_untracked(), which, w, custom) + levels, + |row: &usize| *row, + move |row, _| { + header_row( + row_dt.clone(), + row.get_untracked(), + which, + w, + custom, + groups, + list, + ) }, )), ) }) } +/// One row of the header: a level of group labels or the titles' row, with +/// the row role, so a column header has a row to belong to. +fn header_row( + dt: Dt, + index: usize, + which: Region, + w: Windows, + custom: bool, + groups: Memo>, + list: Memo>, +) -> impl IntoElement { + let (top_dt, height_dt, width_dt, groups_dt, titles_dt) = + (dt.clone(), dt.clone(), dt.clone(), dt.clone(), dt.clone()); + let rows = { + let dt = dt.clone(); + computed(move || { + let levels = dt.header_levels(); + // Lowest level first: it is the one above the titles. + let Some(level) = levels.checked_sub(2 + index) else { + return Vec::new(); + }; + groups + .get() + .into_iter() + .filter(|group| group.level == level) + .collect() + }) + }; + let titles = { + let dt = dt.clone(); + computed(move || index + 1 == dt.header_levels()) + }; + view() + .role(AccessibilityRole::Row) + .absolute() + .left_0() + .w(move || { + let width = match which { + Region::Scroll => w.span.get(), + Region::Fixed => width_dt.geo().fixed, + Region::End => width_dt.geo().end, + Region::Lead => 0.0, + }; + Length::from(px(width)) + }) + .top(move || { + let h = top_dt.row_height_for_header(); + Length::from(px(h * index as f32)) + }) + .h(move || Length::from(px(height_dt.row_height_for_header()))) + .child(each( + rows, + |group: &GroupCell| (group.level, group.from), + move |group, _| group_cell(groups_dt.clone(), group.get_untracked(), which, w), + )) + .child(when(titles, move || { + let titles_dt = titles_dt.clone(); + each( + list, + |def: &usize| *def, + move |def, _| title(titles_dt.clone(), def.get_untracked(), which, w, custom), + ) + })) +} + /// A label over columns. fn group_cell(dt: Dt, group: GroupCell, which: Region, w: Windows) -> impl IntoElement { let props = dt.props; - let (left_dt, width_dt, top_dt) = (dt.clone(), dt.clone(), dt.clone()); + let (left_dt, width_dt) = (dt.clone(), dt.clone()); part( view() .absolute() - .top(move || { - let levels = top_dt.header_levels(); - let h = top_dt.geo().header / levels as f32; - // Lowest level first: it is the one above the titles. - Length::from(px(h * (levels - 2 - group.level.min(levels - 2)) as f32)) - }) - .h(move || { - let g = dt.geo(); - Length::from(px(g.header / dt.header_levels() as f32)) - }) + .top_0() + .h(relative(1.0)) .left(move || { left_dt.layout_rev.get(); let st = left_dt.st.borrow(); @@ -1861,7 +1922,7 @@ fn title(dt: Dt, def: usize, which: Region, w: Windows, custom: bool) -> impl In } list }; - let (left_dt, width_dt, top_dt, hgt_dt) = (dt.clone(), dt.clone(), dt.clone(), dt.clone()); + let (left_dt, width_dt) = (dt.clone(), dt.clone()); let (press_dt, claim_dt, grant_dt, move_dt, up_dt, end_dt) = ( dt.clone(), dt.clone(), @@ -1882,12 +1943,8 @@ fn title(dt: Dt, def: usize, which: Region, w: Windows, custom: bool) -> impl In ..AccessibilityState::default() }) .absolute() - .top(move || { - let levels = top_dt.header_levels(); - let h = top_dt.geo().header / levels as f32; - Length::from(px(h * (levels - 1) as f32)) - }) - .h(move || Length::from(px(hgt_dt.row_height_for_header()))) + .top_0() + .h(relative(1.0)) .left(move || { left_dt.layout_rev.get(); let st = left_dt.st.borrow(); diff --git a/third-party/nsh/crates/nsh-base/src/date_picker.rs b/third-party/nsh/crates/nsh-base/src/date_picker.rs index d43cedd71b4..6515d7afb91 100644 --- a/third-party/nsh/crates/nsh-base/src/date_picker.rs +++ b/third-party/nsh/crates/nsh-base/src/date_picker.rs @@ -6,18 +6,24 @@ //! - **The popup** is `Select`'s (`popup::dropdown`): at the trigger on //! the desktops, a sheet at the bottom on touch screens; a press outside, //! the backdrop, Escape and back close it, the trigger and Return open -//! and close it. It holds the presets (`presets`, a column of buttons), -//! the calendar (`calendar.rs`'s grid, every prop of `Calendar`'s passed -//! on) and, with `timePrecision` for a single date, a time field -//! (`time_field.rs`) under it. +//! and close it. It holds the app's `header`, the presets (`presets`, a +//! column of buttons, each its label and an optional description under +//! it), the calendar (`calendar.rs`'s grid, every prop of `Calendar`'s +//! passed on) and, with `timePrecision` for a single date, a time field +//! (`time_field.rs`) under it, then the app's `footer`. //! - **Picking** (`DatePickerState::select_date`): a complete date (a day, -//! a range's end) is the value and closes the popup; with `timePrecision` -//! the popup stays open for the time on the desktops, every change is -//! reported, and a press on the selected day again closes it, while on -//! touch screens (the sheet) a tap on a day picks it at its time and -//! closes the sheet, as without a time. A preset is the value and -//! closes it. The clear button (`cleanable`) and Delete / Backspace on -//! the trigger clear it. +//! a range's end) is the value and closes the popup; a range's start +//! keeps it open for the end, reported by `onChangeStart` as +//! `Calendar`'s (a start the app does not set as `value` goes when the +//! popup closes); with `timePrecision` the popup stays open for the time +//! on the desktops, every change is reported, and a press on the +//! selected day again closes it, while on touch screens (the sheet) a +//! tap on a day picks it at its time and closes the sheet, as without a +//! time. A preset is the value and closes it. Each close is asked +//! through `onOpenChange` with its reason (`select` for a pick), so an +//! app that controls `open` keeps the popup open on a pick and closes it +//! from its `footer`'s Apply. The clear button (`cleanable`) and +//! Delete / Backspace on the trigger clear it. //! - **The value** is `value` and `onChange({ value })`: ISO dates, as //! HTML's `` (`"2026-10-28"`, `[start, end]`), or with //! `timePrecision` dates and times as `datetime-local`'s @@ -288,6 +294,11 @@ pub struct DateRangePreset { pub label: SharedString, /// What it sets: a date, a range or dates and times (kept as given). pub value: DateTime, + /// A second line under the label (the dates it stands for, "Sep 1 – + /// Sep 30"), a part of its own (`presetDescriptionClass`), which + /// screen readers read after the label. + #[prop(skip_none)] + pub description: Option, } impl DateRangePreset { @@ -296,6 +307,7 @@ impl DateRangePreset { Self { label: label.into(), value: date.into(), + description: None, } } @@ -304,6 +316,7 @@ impl DateRangePreset { Self { label: label.into(), value: (start, end).into(), + description: None, } } @@ -312,8 +325,15 @@ impl DateRangePreset { Self { label: label.into(), value: value.into(), + description: None, } } + + /// A second line under the label, which screen readers read after it. + pub fn description(mut self, description: impl Into) -> Self { + self.description = Some(description.into()); + self + } } /// The props of [`DatePicker`]. @@ -432,6 +452,12 @@ pub struct DatePickerProps { /// too, which its label inherits. #[prop(default)] pub preset_style: Prop, + /// The classes of each preset's description, its second line. + pub preset_description_class: Prop>, + /// The inline style of each preset's description, over its classes + /// and the text styles it inherits from the preset. + #[prop(default)] + pub preset_description_style: Prop, /// The classes of the calendar. pub calendar_class: Prop>, /// The inline style of the calendar, over its classes. @@ -514,16 +540,33 @@ pub struct DatePickerProps { /// What opens the popup when pressed: the app's element (showing the /// value, a placeholder, an icon), which the popup is placed against. pub trigger: Prop>, + /// What the popup (or sheet) shows above the presets and the calendar + /// (`gpui-component`'s `Command::header`): typed start and end fields, + /// a title. The app's element, styled by its own classes + /// (`headerClass` stays the calendar's header, as `Calendar`'s). Its + /// keyboard stops come before the calendar's. + pub header: Prop>, + /// What the popup (or sheet) shows below the presets, the calendar and + /// the time (`gpui-component`'s `Combobox::footer`): Cancel and Apply. + /// Its keyboard stops come after the calendar's. + pub footer: Prop>, } /// The events of a [`DatePicker`]. #[derive(Debug, Clone, PartialEq, Event)] +#[non_exhaustive] pub enum DatePickerEvent { /// The user changed the value (a day, a range's end, a preset, the /// time, the clear button). With `timePrecision`, every edit while the /// popup is open. #[args(value)] Change(PickedDate), + /// The user started a range in the popup (`[start, null]`, as + /// `Calendar`'s `onChangeStart`): the popup stays open for its end, + /// reported by `onChange`. A start the app does not set as `value` + /// goes when the popup closes. + #[args(value)] + ChangeStart(PickedDate), /// The popup opened or closed, with why: set `open` to follow it. #[args(open, reason)] OpenChange(bool, OpenChangeReason), @@ -553,9 +596,14 @@ fn display_format(precision: Option, cycle: HourCycle) -> String /// the desktops the popup stays open after a day is picked (the selected /// day again closes it), while on touch screens a tap on a day closes it. /// `presets` add buttons that set the value, `cleanable` a button that -/// clears it. The value is `value` and `onChange` (or the -/// picker's own, from `defaultValue`). Every prop of `Calendar` passes on -/// to its calendar. It looks like nothing: the app styles every part. +/// clears it; `header` and `footer` are the app's content above and +/// below them in the popup. An app that controls `open` keeps it open on a +/// pick (`onOpenChange` with the reason `select`) and closes it from its +/// `footer` (Cancel / Apply, a pending value committed on Apply). The +/// value is `value` and `onChange` (or the picker's own, from +/// `defaultValue`); `onChangeStart` reports a range's start while its end +/// is still to pick. Every prop of `Calendar` passes on to its calendar. +/// It looks like nothing: the app styles every part. /// /// In a terminal the trigger shows a `Select`'s marks over the end of its /// band: `▾` on the Cell before its last and, while there is a date to clear, `×` three @@ -598,7 +646,6 @@ pub fn DatePicker(props: DatePickerProps, cx: Scope) -> impl In crate::popup::note_focus_origin(move || open.get(), anchor); let width = signal(None::); let focused = signal(false); - let closed_by = stored(None::); let change: Rc = Rc::new(move |next, reason| { if next && props.disabled.get_untracked() { return; @@ -606,10 +653,12 @@ pub fn DatePicker(props: DatePickerProps, cx: Scope) -> impl In if open.get_untracked() == next { return; } - if !next { - closed_by.replace(Some(reason)); - } - open.request(next, || cx.emit(DatePickerEvent::OpenChange(next, reason))); + // The reason a close keeps says where the keyboard goes (`back`): + // none once the app kept it open, so its own close later (its + // `footer`'s Apply) gives the focus back. + open.request_for(next, reason, || { + cx.emit(DatePickerEvent::OpenChange(next, reason)) + }); }); let report = move |next: DateTime| { if matches!(props.value.get_untracked(), DatePickerValue::Uncontrolled) { @@ -693,7 +742,7 @@ pub fn DatePicker(props: DatePickerProps, cx: Scope) -> impl In // Back to the trigger, unless a press outside or the app's // `onChange` took the keyboard somewhere else. back: Rc::new(move |popup| { - if closed_by.replace(None) != Some(OpenChangeReason::PressOutside) { + if open.take_closed_by() != Some(OpenChangeReason::PressOutside) { anchor.focus_back(popup); } }), @@ -755,6 +804,14 @@ pub fn DatePicker(props: DatePickerProps, cx: Scope) -> impl In let picked: Rc = { let change = change.clone(); Rc::new(move |d: Date| { + // A range's start: the popup stays for its end. + if !d.is_complete() { + cx.emit(DatePickerEvent::ChangeStart(PickedDate { + value: with_times(d), + time_precision: props.time_precision.get_untracked(), + })); + return; + } // On the desktops the popup stays for the time and a // press on the selected day again confirms it // (`gpui-component`'s double click). A touch screen @@ -786,9 +843,13 @@ pub fn DatePicker(props: DatePickerProps, cx: Scope) -> impl In .map(|p| { let change = change.clone(); let label = p.label.clone(); + let description = p.description.clone(); view() .role(AccessibilityRole::Button) .label(label.clone()) + .when_some(description.clone(), |v, d| { + v.accessibility_description(d) + }) // Not a stop of Tab (`gpui-component`'s // `tab_stop(false)`). .focusable(false) @@ -805,6 +866,15 @@ pub fn DatePicker(props: DatePickerProps, cx: Scope) -> impl In change(false, OpenChangeReason::Select); }) .child(text(label)) + .when_some(description, |v, d| { + v.child( + text(d) + .app_class(props.preset_description_class) + .inline_style(move || { + props.preset_description_style.get() + }), + ) + }) .into_element() }) .collect::>(); @@ -849,13 +919,17 @@ pub fn DatePicker(props: DatePickerProps, cx: Scope) -> impl In .app_class(props.calendar_class) .inline_style(props.calendar_style) .children(calendar::calendar_view(grid, picked)); + // The app's header and footer around the content, so the + // keyboard's stops go header, calendar, footer. vec![ + props.header.place(|h| h), view() .app_class(props.content_class) .inline_style(props.content_style) .child(presets) .child(view().child(calendar).child(time)) .into_element(), + props.footer.place(|f| f), ] }) }; diff --git a/third-party/nsh/crates/nsh-base/src/dock/compact.rs b/third-party/nsh/crates/nsh-base/src/dock/compact.rs index 918b94aa612..ad3b060becb 100644 --- a/third-party/nsh/crates/nsh-base/src/dock/compact.rs +++ b/third-party/nsh/crates/nsh-base/src/dock/compact.rs @@ -109,6 +109,7 @@ pub(crate) fn compact_view(a: AreaCx) -> AnyElement { .element_ref(&refs.bar) .app_class(a.props.tab_bar_class) .inline_style(a.props.tab_bar_style) + .child(super::tab_group::prefix(a, current)) .child(super::tab_group::tab_strip(each( move || tabs.get(), |panel: &PanelId| panel.clone(), diff --git a/third-party/nsh/crates/nsh-base/src/dock/dock_area.rs b/third-party/nsh/crates/nsh-base/src/dock/dock_area.rs index 444e07476ce..34c8b3827a2 100644 --- a/third-party/nsh/crates/nsh-base/src/dock/dock_area.rs +++ b/third-party/nsh/crates/nsh-base/src/dock/dock_area.rs @@ -116,8 +116,8 @@ pub struct DockPanel { pub id: PanelId, } -/// A tab, as `renderTab`, `renderDragPreview` and `renderToolbar` render -/// it. +/// A tab, as `renderTab`, `renderDragPreview`, `renderToolbar` and +/// `renderTabBarPrefix` render it. #[derive(Clone, Debug, Default, PartialEq, JsObject)] #[non_exhaustive] pub struct DockTab { @@ -146,6 +146,9 @@ pub struct DockDropIndicator { #[prop(skip_none)] pub side: Option, /// The slot in the group's tab bar it goes to, when dropped on the bar. + /// A drag over a tab bar shows the area's insertion line rather than + /// the indicator, so `renderDropIndicator` is not called for one and + /// this is kept for compatibility. #[prop(skip_none)] pub index: Option, } @@ -278,8 +281,13 @@ pub struct DockAreaProps { /// The toolbar at the end of a tab group's tab bar, given its displayed /// tab: that panel's actions (as a GPUI dock panel's toolbar buttons). pub render_toolbar: Prop>>, + /// What a tab group's tab bar starts with, before its tabs, given its + /// displayed tab: room or controls that stay put while the tabs scroll + /// (`TabBar::prefix` in GPUI Kit). + pub render_tab_bar_prefix: Prop>>, /// What shows where a drag would land, placed over the part of the - /// group it would take. + /// group it would take. Not called for a tab bar's slot: there the area + /// draws an insertion line between the tabs instead. pub render_drop_indicator: Prop>>, /// A dock's own chrome (a title strip, a collapse button), before its /// layout. @@ -586,6 +594,7 @@ pub(crate) fn area_view(a: AreaCx) -> View { .otherwise(move || regular_view(a)), ) .child(super::tab_group::drop_indicator(a)) + .child(super::tab_group::drop_line(a)) .child(drag_preview(a)) } @@ -610,6 +619,10 @@ pub(crate) struct DropAt { pub(crate) index: Option, /// The group's content frame, in the root view's coordinates. pub(crate) content: Bounds, + /// Over a tab bar (`index` some): the insertion line at the slot, in + /// the root view's coordinates, drawn instead of the drop indicator + /// (`tab_group.rs` `slot_line`). + pub(crate) line: Option>, } /// The views of a tab group a drag measures: its tab bar, its tabs and @@ -669,9 +682,9 @@ pub(crate) struct AreaCx { /// The area's size. size: Signal>, dock_drag: Signal>, - /// Bumped each time the drop indicator's overlay is first laid out (a - /// commit after it opened): the key of the drag preview's row, which - /// mounts the preview again, above the indicator. + /// Bumped each time the drop indicator's or the insertion line's + /// overlay is first laid out (a commit after it opened): the key of the + /// drag preview's row, which mounts the preview again, above them. pub(crate) indicator_shown: Signal, /// The last edit of a controlled area, until the app passes a layout. pending: Stored>, diff --git a/third-party/nsh/crates/nsh-base/src/dock/tab_group.rs b/third-party/nsh/crates/nsh-base/src/dock/tab_group.rs index f917a8f0eb2..27bdbcfd2c3 100644 --- a/third-party/nsh/crates/nsh-base/src/dock/tab_group.rs +++ b/third-party/nsh/crates/nsh-base/src/dock/tab_group.rs @@ -28,7 +28,9 @@ //! (`split_placement_at`), except back onto its own group when that would //! change nothing. The drop indicator part, an overlay above the area, //! covers what the panel would take in the group the target names -//! ([`super::DropPlaceholderBounds::for_placement`]). The release applies +//! ([`super::DropPlaceholderBounds::for_placement`]); over a tab bar an +//! insertion line between the tabs shows the slot instead ([`drop_line`]). +//! The release applies //! one move ([`AreaCx::drop_at`]); a gesture the system takes away drops //! nothing. @@ -39,8 +41,8 @@ use std::{ use nsh_core::{ AccessibilityState, RevealOptions, ScrollAlignment, - element::{LayoutAnimation, LayoutCurve, LayoutTransition}, - geometry::{Bounds, Point, Points}, + element::{LayoutAnimation, LayoutCurve, LayoutTransition, Renderer}, + geometry::{Bounds, Point, Points, Size}, prelude::*, }; @@ -88,12 +90,27 @@ pub(crate) fn tab_value(a: AreaCx, panel: &PanelId) -> Option { /// The toolbar at the end of the tab bar of `group`: what `renderToolbar` /// draws for its displayed tab, nothing without the prop or a shown panel. pub(crate) fn toolbar(a: AreaCx, group: Memo>) -> AnyElement { + bar_part(a, group, |a| a.props.render_toolbar.get()) +} + +/// The content at the start of the tab bar of `group`, before its tabs: +/// what `renderTabBarPrefix` draws for its displayed tab, nothing without +/// the prop or a shown panel. +pub(crate) fn prefix(a: AreaCx, group: Memo>) -> AnyElement { + bar_part(a, group, |a| a.props.render_tab_bar_prefix.get()) +} + +fn bar_part( + a: AreaCx, + group: Memo>, + renderer: impl Fn(AreaCx) -> Option> + 'static, +) -> AnyElement { let value = computed(move || { let shown = group.with(|g| g.as_ref().and_then(|g| shown_of(a, g)))?; tab_value(a, &shown) }); dynamic(move || { - let render = a.props.render_toolbar.get()?; + let render = renderer(a)?; let value = value.get()?; Some(render.render(value.panel.to_string(), value)) }) @@ -148,6 +165,7 @@ pub(crate) fn tab_group(a: AreaCx, node: NodeId) -> AnyElement { .element_ref(&refs.bar) .app_class(a.props.tab_bar_class) .inline_style(a.props.tab_bar_style) + .child(prefix(a, group)) .child(tab_strip(each( move || tabs.get(), |panel: &PanelId| panel.clone(), @@ -230,14 +248,16 @@ fn animate_indicator(fade: bool) { /// faint as the terminal's bands go. const DROP_WASH: f32 = 0.12; -/// The drop indicator: while a drag would land on a group, over the part -/// of its content frame the panel would take (all of it to merge, a half -/// to split). It is an overlay in the root view, under the drag preview +/// The drop indicator: while a drag would land on a group's content +/// frame, over the part of it the panel would take (all of it to merge, a +/// half to split). It is an overlay in the root view, under the drag preview /// (mounted again after it, `dock_area.rs` `drag_preview`), placed with /// the frame the drag measured, so it is drawn above everything in the /// area: the handles' lines, which lie over the edges of the groups beside /// them, never cover its edges, and no frame clips it. It moves from place to -/// place, across groups too. The compact presentation has none. +/// place, across groups too. The compact presentation has none, and a drag +/// over a tab bar shows the insertion line ([`drop_line`]) instead: it is +/// not drawn, nor `renderDropIndicator` called, for a tab bar's slot. /// /// In a terminal it is the region's outline, one Cell in the accent (the /// hue of the focus ring) around it, over a faint band of the accent: a @@ -250,7 +270,11 @@ pub(crate) fn drop_indicator(a: AreaCx) -> AnyElement { if a.compact.get() { return None; } - a.drag.with(|drag| drag.as_ref().and_then(|d| d.target)) + a.drag.with(|drag| { + drag.as_ref() + .and_then(|d| d.target) + .filter(|t| t.line.is_none()) + }) }); when( move || target.with(Option::is_some), @@ -264,36 +288,7 @@ pub(crate) fn drop_indicator(a: AreaCx) -> AnyElement { } }) }; - // The first place is where it appears; a later one, where it - // moves to. - let shown = Cell::new(None); - effect(move || { - let now = place(); - let before = shown.replace(now); - if before != now && !terminal { - animate_indicator(before.is_none()); - } - }); - // Once its overlay is shown (laid out, so opened in a commit - // before): the drag preview is mounted again, in a later commit, - // above it. - let opened = Cell::new(false); - overlay() - .on_layout(move |_: &Bounds| { - if !opened.replace(true) { - a.indicator_shown.update(|n| *n = n.wrapping_add(1)); - } - }) - .pointer_events(PointerEvents::None) - .focusable(false) - .style_with(move |s| match place() { - Some(p) => s - .left(p.origin.x) - .top(p.origin.y) - .w(p.size.width) - .h(p.size.height), - None => s, - }) + indicator_overlay(a, place) .map(|v| match terminal { true => v .border(px(1.0)) @@ -324,6 +319,84 @@ pub(crate) fn drop_indicator(a: AreaCx) -> AnyElement { .into_element() } +/// How thick the insertion line is: two points (one Cell in a terminal, +/// `resolve_bar`). +const LINE_THICKNESS: Points = px(2.0); + +/// The insertion line: while a drag would land on a slot of a tab bar +/// (the compact strip's too), a thin line across the bar at the boundary +/// between the tabs before and after the slot ([`slot_line`]), as the +/// editors draw it; the content frame is not tinted then. An overlay as the +/// drop indicator is, with its ordering under the drag preview and its +/// motion, in the theme's focus-ring color (the accent in a terminal, +/// where it jumps from Cell to Cell). +pub(crate) fn drop_line(a: AreaCx) -> AnyElement { + let terminal = crate::terminal::is_terminal(); + let line = computed(move || { + a.drag + .with(|drag| drag.as_ref().and_then(|d| d.target).and_then(|t| t.line)) + }); + when( + move || line.with(Option::is_some), + move || { + indicator_overlay(a, move || line.get()).map(|v| match terminal { + // A terminal draws no fills: the line is a Cell's border + // in the accent, `│` across a row of tabs (`─` down a + // column of them). + true => match line.with(|l| l.is_some_and(|l| l.size.width > l.size.height)) { + true => v.border_t(px(1.0)), + false => v.border_l(px(1.0)), + } + .border_color(crate::terminal::ACCENT), + false => v + .bg(move || crate::theme::theme().ring) + .rounded(LINE_THICKNESS * 0.5), + }) + }, + ) + .into_element() +} + +/// The overlay of the drop indicator or the insertion line, at `place`: +/// it takes no touches, eases from place to place (fading in as it +/// appears) outside a terminal, and once laid out bumps +/// [`AreaCx::indicator_shown`], so the drag preview is mounted again above +/// it. +fn indicator_overlay( + a: AreaCx, + place: impl Fn() -> Option> + Copy + 'static, +) -> Overlay { + let terminal = crate::terminal::is_terminal(); + // The first place is where it appears; a later one, where it moves to. + let shown = Cell::new(None); + effect(move || { + let now = place(); + let before = shown.replace(now); + if before != now && !terminal { + animate_indicator(before.is_none()); + } + }); + // Once its overlay is shown (laid out, so opened in a commit before): + // the drag preview is mounted again, in a later commit, above it. + let opened = Cell::new(false); + overlay() + .on_layout(move |_: &Bounds| { + if !opened.replace(true) { + a.indicator_shown.update(|n| *n = n.wrapping_add(1)); + } + }) + .pointer_events(PointerEvents::None) + .focusable(false) + .style_with(move |s| match place() { + Some(p) => s + .left(p.origin.x) + .top(p.origin.y) + .w(p.size.width) + .h(p.size.height), + None => s, + }) +} + /// The tab of panel `panel` (in group `source`; `None`: the compact /// strip): the app's `renderTab` inside, the tab role and its selected /// state, the tab panel `content` as what it controls, a press that @@ -440,22 +513,86 @@ fn page_bounds(m: nsh_core::Measurement) -> Bounds { } } +/// Whether tab bar `bar` lists its tabs top to bottom: it is taller than +/// wide. +fn is_vertical(bar: Bounds) -> bool { + bar.size.height > bar.size.width +} + /// The slot among `tabs` (left to right, or top to bottom when `bar` is -/// taller than wide) that `at` is past, `panel` left out. -fn slot_at( +/// taller than wide) that `at` is past, `panel` left out, and the others +/// in that order. +fn slot_at<'t>( bar: Bounds, - tabs: &[(PanelId, Bounds)], + tabs: &'t [(PanelId, Bounds)], panel: &PanelId, at: Point, -) -> (usize, Vec) { - let across = bar.size.height > bar.size.width; +) -> (usize, Vec<&'t (PanelId, Bounds)>) { + let across = is_vertical(bar); let mut others: Vec<&(PanelId, Bounds)> = tabs.iter().filter(|(p, _)| p != panel).collect(); let key = |b: &Bounds| if across { b.center().y } else { b.center().x }; crate::sort::sort_by(&mut others, |x, y| key(&x.1).0.total_cmp(&key(&y.1).0)); let pointer = if across { at.y } else { at.x }; let index = others.iter().filter(|(_, b)| key(b) < pointer).count(); - (index, others.into_iter().map(|(p, _)| p.clone()).collect()) + (index, others) +} + +/// The insertion line at slot `index` of tab bar `bar` whose tabs (the +/// dragged one left out) are `others`, in the order [`slot_at`] gives: +/// `thickness` across, the bar's height (its width for a vertical bar) +/// long, centered on the boundary between the tab before the slot and the +/// one after it (the first tab's start for the first slot, the last one's +/// end for the last; the bar's start with no tabs), kept inside the bar. +fn slot_line( + bar: Bounds, + others: &[Bounds], + index: usize, + thickness: Points, +) -> Bounds { + let vertical = is_vertical(bar); + // A frame's start and end along the bar. + let span = |b: &Bounds| match vertical { + true => (b.origin.y, b.origin.y + b.size.height), + false => (b.origin.x, b.origin.x + b.size.width), + }; + let (bar_start, bar_end) = span(&bar); + let before = index + .checked_sub(1) + .and_then(|i| others.get(i)) + .map(|b| span(b).1); + let after = others.get(index).map(|b| span(b).0); + let boundary = match (before, after) { + (Some(end), Some(start)) => (end + start) * 0.5, + (Some(end), None) => end, + (None, Some(start)) => start, + (None, None) => bar_start, + }; + let along = (boundary - thickness * 0.5) + .max(bar_start) + .min(bar_end - thickness); + match vertical { + true => Bounds { + origin: Point { + x: bar.origin.x, + y: along, + }, + size: Size { + width: bar.size.width, + height: thickness, + }, + }, + false => Bounds { + origin: Point { + x: along, + y: bar.origin.y, + }, + size: Size { + width: thickness, + height: bar.size.height, + }, + }, + } } impl AreaCx { @@ -616,6 +753,7 @@ impl AreaCx { side, index: None, content, + line: None, }) }) } @@ -626,6 +764,16 @@ impl AreaCx { fn resolve_bar(self, drag: &TabDrag, zone: &Zone, at: Point) -> Option { let bar = zone.bar?; let (index, others) = slot_at(bar, &zone.tabs, &drag.panel, at); + // One Cell in a terminal: a Cell is wider and taller than a point, + // and a thinner line covers no Cell at all. + let thickness = match (crate::terminal::is_terminal(), is_vertical(bar)) { + (true, true) => crate::terminal::cell_height(), + (true, false) => crate::terminal::cell_width(), + (false, _) => LINE_THICKNESS, + }; + let frames: Vec> = others.iter().map(|(_, b)| *b).collect(); + let line = Some(slot_line(bar, &frames, index, thickness)); + let others: Vec = others.into_iter().map(|(p, _)| p.clone()).collect(); match zone.group { Some(group) => { if !self.droppable() { @@ -636,6 +784,7 @@ impl AreaCx { side: None, index: Some(index), content: zone.content.unwrap_or(bar), + line, }) } None => { @@ -653,9 +802,101 @@ impl AreaCx { side: None, index: Some(at), content: bar, + line, }) }) } } } } + +#[cfg(test)] +mod tests { + use nsh_core::geometry::{point, size}; + + use super::*; + + fn frame(x: f32, y: f32, w: f32, h: f32) -> Bounds { + Bounds { + origin: point(px(x), px(y)), + size: size(px(w), px(h)), + } + } + + /// A bar at (100, 50), 400 × 24, with tabs a, b and c 80 wide from its + /// start, 4 apart. + fn bar_of_three() -> (Bounds, Vec<(PanelId, Bounds)>) { + let bar = frame(100.0, 50.0, 400.0, 24.0); + let tabs = ["a", "b", "c"] + .iter() + .enumerate() + .map(|(i, p)| { + ( + PanelId::from(*p), + frame(100.0 + 84.0 * i as f32, 50.0, 80.0, 24.0), + ) + }) + .collect(); + (bar, tabs) + } + + /// The line where dragging `panel` over the bar of three at `x` lands. + fn line_at(panel: &'static str, x: f32) -> (usize, Bounds) { + let (bar, tabs) = bar_of_three(); + let (index, others) = slot_at(bar, &tabs, &panel.into(), point(px(x), px(60.0))); + let frames: Vec<_> = others.iter().map(|(_, b)| *b).collect(); + (index, slot_line(bar, &frames, index, px(2.0))) + } + + #[test] + fn the_first_slot_s_line_is_at_the_first_tab_s_start() { + // c dragged before a: the bar's start, kept inside it. + assert_eq!(line_at("c", 110.0), (0, frame(100.0, 50.0, 2.0, 24.0))); + // a dragged before b (where it was): b's start, centered on it. + assert_eq!(line_at("a", 150.0), (0, frame(183.0, 50.0, 2.0, 24.0))); + } + + #[test] + fn a_middle_slot_s_line_is_centered_between_its_tabs() { + // c dragged between a (ending at 180) and b (starting at 184). + assert_eq!(line_at("c", 190.0), (1, frame(181.0, 50.0, 2.0, 24.0))); + } + + #[test] + fn the_last_slot_s_line_is_at_the_last_tab_s_end() { + // a dragged past c, which ends at 348. + assert_eq!(line_at("a", 450.0), (2, frame(347.0, 50.0, 2.0, 24.0))); + } + + #[test] + fn a_bar_with_no_other_tab_has_its_line_at_its_start() { + let bar = frame(0.0, 0.0, 300.0, 24.0); + assert_eq!(slot_line(bar, &[], 0, px(2.0)), frame(0.0, 0.0, 2.0, 24.0)); + } + + #[test] + fn a_vertical_bar_s_line_is_horizontal() { + // A bar 30 wide and 300 tall, tabs 30 × 40 down it, 10 apart. + let bar = frame(10.0, 100.0, 30.0, 300.0); + let tabs: Vec<(PanelId, Bounds)> = ["a", "b", "c"] + .iter() + .enumerate() + .map(|(i, p)| { + ( + PanelId::from(*p), + frame(10.0, 100.0 + 50.0 * i as f32, 30.0, 40.0), + ) + }) + .collect(); + let line = |y: f32| { + let (index, others) = slot_at(bar, &tabs, &"a".into(), point(px(25.0), px(y))); + let frames: Vec<_> = others.iter().map(|(_, b)| *b).collect(); + (index, slot_line(bar, &frames, index, px(2.0))) + }; + // Before b (starting at 150), between b (ending at 190) and c + // (starting at 200), after c (ending at 240). + assert_eq!(line(120.0), (0, frame(10.0, 149.0, 30.0, 2.0))); + assert_eq!(line(180.0), (1, frame(10.0, 194.0, 30.0, 2.0))); + assert_eq!(line(300.0), (2, frame(10.0, 239.0, 30.0, 2.0))); + } +} diff --git a/third-party/nsh/crates/nsh-base/src/lib.rs b/third-party/nsh/crates/nsh-base/src/lib.rs index 2a89b29780b..c6196c7c03e 100644 --- a/third-party/nsh/crates/nsh-base/src/lib.rs +++ b/third-party/nsh/crates/nsh-base/src/lib.rs @@ -202,7 +202,7 @@ pub use crate::{ }, otp_input::{ OtpInput, OtpInputApi, OtpInputCompleteEvent, OtpInputElement, OtpInputEvent, - OtpInputProps, otp_input, + OtpInputProps, OtpInputValidationType, otp_input, }, pagination::{ Pagination, PaginationElement, PaginationEvent, PaginationItem, PaginationItemKind, @@ -233,7 +233,10 @@ pub use crate::{ SelectValue, select, }, sheet::{Sheet, SheetDetent, SheetElement, SheetEvent, SheetProps, sheet}, - slider::{Slider, SliderElement, SliderEvent, SliderProps, SliderScale, SliderValue, slider}, + slider::{ + Slider, SliderElement, SliderEvent, SliderProps, SliderScale, SliderThumbContext, + SliderValue, slider, + }, split_view::{ ColumnVisibility, SplitView, SplitViewElement, SplitViewEvent, SplitViewProps, split_view, }, diff --git a/third-party/nsh/crates/nsh-base/src/listbox.rs b/third-party/nsh/crates/nsh-base/src/listbox.rs index de341ee1681..282b30ea351 100644 --- a/third-party/nsh/crates/nsh-base/src/listbox.rs +++ b/third-party/nsh/crates/nsh-base/src/listbox.rs @@ -32,8 +32,9 @@ //! pointer's highlight, which moves only when the pointer did (a row //! scrolled under a still pointer does not take it from the keyboard). //! The query is the search field's, or the app's when it sets one -//! ([`Query`], `Combobox`'s `query`); each opening starts from its -//! default, and a new query highlights its first enabled match. +//! ([`Query`], `Select`'s and `Combobox`'s `query`); each opening starts +//! from its default, a new query highlights its first enabled match, and +//! only a list with a search field filters by it. //! - **[`present`]**: on the desktops a popup anchored to the trigger //! (`placement`, `align`, `offset`, `margin`), at least as wide as the //! trigger and never taller than the room on its side; on touch screens @@ -413,16 +414,6 @@ pub(crate) struct Query { pub(crate) default: Prop>, } -impl Query { - /// The search field's alone, starting empty (`Select`'s). - pub(crate) fn own() -> Self { - Self { - controlled: Prop::new(None), - default: Prop::new(None), - } - } -} - /// The row of a list's highlighted item, while it is rendered: the active /// descendant of the field that keeps the keyboard focus (a select's /// trigger, a combo box's input, a search field), which names it so @@ -535,7 +526,12 @@ impl Listbox { let narrow = stored(None::); let shown = computed(move || { let index = index.get().0; - let query = query_of(query, own_query).to_lowercase(); + // Without a search field nothing filters: neither what the + // field held nor the app's query (as `Command`'s). + let query = match searchable.get() { + true => query_of(query, own_query).to_lowercase(), + false => String::new(), + }; items.with(|items| { narrow.with(|last| { let among = last @@ -601,8 +597,8 @@ impl Listbox { }); }); // The search field went away (searchable turned off, the list - // open or not): what it held filters nothing any more, so every - // item shows again. + // open or not): what it held is dropped, so the field starts empty + // when it comes back. effect(move || { if !lb.searchable.get() { untracked(|| { @@ -612,12 +608,17 @@ impl Listbox { }); } }); - // The app's query changed while the list is open (it followed the - // field, or set its own): as a typed one, the first match. + // The app's query changed while the list is open with its search + // field (it followed the field, or set its own): as a typed one, + // the first match. let last = stored(None::); effect(move || { let now = query.controlled.get(); - if last.replace(now.clone()) == now || now.is_none() || !lb.open.get() { + if last.replace(now.clone()) == now + || now.is_none() + || !lb.open.get() + || !lb.searchable.get_untracked() + { return; } untracked(|| lb.highlight_first()); diff --git a/third-party/nsh/crates/nsh-base/src/menu.rs b/third-party/nsh/crates/nsh-base/src/menu.rs index 069d705338e..8ed03e2a276 100644 --- a/third-party/nsh/crates/nsh-base/src/menu.rs +++ b/third-party/nsh/crates/nsh-base/src/menu.rs @@ -1649,14 +1649,6 @@ fn surface( ) -> AnyElement { let Asked { keyed, why } = asked; let sheet = at.is_none(); - // Why it last closed: a press outside put the focus where it pressed. - let closed_by = stored(None::); - let change: Rc = Rc::new(move |next, reason| { - if !next { - closed_by.replace(Some(reason)); - } - change(next, reason); - }); let path = signal(Vec::::new()); let open_sub = signal(None::); let close = { @@ -1770,7 +1762,7 @@ fn surface( presence.focus_back_on_close( move || open.get(), move || { - if closed_by.get() != Some(OpenChangeReason::PressOutside) { + if open.take_closed_by() != Some(OpenChangeReason::PressOutside) { anchor.focus_back(presence.popup()); } }, @@ -1796,13 +1788,15 @@ fn surface( presence.mounted() } }, + // A reason the focus's return did not read (the focus was not in + // the popup as it closed) goes as it opens or is gone. move || { - closed_by.replace(None); + open.take_closed_by(); opened(MenuEvent::Open); }, move || { closed(MenuEvent::Close); - closed_by.replace(None); + open.take_closed_by(); }, ); } @@ -2084,7 +2078,10 @@ pub fn Menu(props: MenuProps, cx: Scope) -> impl IntoElement { keyed.replace(None); } why.stamp(reason); - open.request(next, || cx.emit(MenuEvent::OpenChange(next, reason))); + // The reason a close keeps says where the keyboard goes (`surface`). + open.request_for(next, reason, || { + cx.emit(MenuEvent::OpenChange(next, reason)) + }); }); let anchor = element_ref(); let parts = Surface { @@ -2335,7 +2332,8 @@ pub fn ContextMenu(props: ContextMenuProps, cx: Scope) -> imp return; } why.stamp(reason); - open.request(next, || { + // The reason a close keeps says where the keyboard goes (`surface`). + open.request_for(next, reason, || { cx.emit(ContextMenuEvents::OpenChange(next, reason)) }); }); diff --git a/third-party/nsh/crates/nsh-base/src/otp_input.rs b/third-party/nsh/crates/nsh-base/src/otp_input.rs index 86100796ead..445bd8372c3 100644 --- a/third-party/nsh/crates/nsh-base/src/otp_input.rs +++ b/third-party/nsh/crates/nsh-base/src/otp_input.rs @@ -1,5 +1,7 @@ -//! `OtpInput`: a fixed-length numeric one-time code (an SMS code, an -//! authenticator's), entered into cells, with no look of its own. +//! `OtpInput`: a fixed-length one-time code (an SMS code, an +//! authenticator's, digits by default, or letters and digits with +//! `validationType="alphanumeric"`), entered into cells, with no look of +//! its own. //! //! `gpui-base`'s `OtpState` keeps the code and edits it from key presses //! (`otp_input.rs`); its styled counterpart draws the cells. Here one native @@ -12,10 +14,11 @@ //! at its end are removed from the code (Backspace removes the last //! digit), the digits it gained are added at the end while the code is //! shorter than `length` (full-width digits as ASCII ones, anything else -//! dropped), and text bringing `length` digits or more at once (a paste, -//! an autofilled code) replaces the code with its first `length`. The -//! caret stays at the end, as in `gpui-base`, so nothing is edited in the -//! middle. +//! dropped; with `Alphanumeric`, ASCII letters too, full-width ones +//! mapped, upper-cased), and text bringing `length` digits or more at +//! once (a paste, an autofilled code) replaces the code with its first +//! `length`. The caret stays at the end, as in `gpui-base`, so nothing +//! is edited in the middle. //! - **Edits build on the code as the user typed it**: a controlled //! `value` comes back a JS turn after `onChange`, maybe after the next //! key; the changes the input reported coming back are not set again, a @@ -54,11 +57,30 @@ const BLINK_PAUSE: Duration = Duration::from_millis(300); /// fields show. const MASK: &str = "\u{2022}"; +/// Which characters an [`OtpInput`] takes (`validationType`, as Radix's +/// `OneTimePasswordField`), and the software keyboard it shows. +#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, PropEnum)] +pub enum OtpInputValidationType { + /// Digits only, on the number pad (`inputmode="numeric"`). + #[default] + Numeric, + /// ASCII letters and digits, on the full keyboard + /// (`inputmode="text"`). Letters are upper-cased: the cells show, and + /// `onChange` reports, `AB12CD34` for `ab12cd34`, so the app compares + /// codes without case. + Alphanumeric, +} + /// The props of [`OtpInput`]. #[derive(Debug, Clone, PartialEq, Props)] pub struct OtpInputProps { /// How many digits the code has: one cell each. pub length: Prop, + /// Which characters the code takes: digits (the default) or ASCII + /// letters and digits, letters upper-cased; full-width ones (an East + /// Asian input method's) are taken as ASCII, anything else is dropped. + #[prop(default)] + pub validation_type: Prop, /// The code (controlled): the app owns it and sets it in `onChange`. /// Shown as it is, unfiltered (as `gpui-base`'s `set_value`). Without /// it the input keeps its own code. @@ -316,6 +338,7 @@ pub fn OtpInput(props: OtpInputProps, cx: Scope) -> impl IntoElem deleted, inserted, props.length.get_untracked() as usize, + props.validation_type.get_untracked(), ); if next != shown { typed.replace(next.clone()); @@ -442,10 +465,17 @@ pub fn OtpInput(props: OtpInputProps, cx: Scope) -> impl IntoElem .text_color(AdaptiveColor::TRANSPARENT) .selection_color(transparent_black()) .caret(false) - .keyboard_type(KeyboardType::Number) + .keyboard_type(move || match props.validation_type.get() { + OtpInputValidationType::Numeric => KeyboardType::Number, + OtpInputValidationType::Alphanumeric => KeyboardType::Default, + }) .auto_fill(AutoFill::OneTimeCode) .auto_correct(false) - .auto_capitalize(AutoCapitalize::None) + // The keyboard's capitals match the cells' upper case. + .auto_capitalize(move || match props.validation_type.get() { + OtpInputValidationType::Numeric => AutoCapitalize::None, + OtpInputValidationType::Alphanumeric => AutoCapitalize::Characters, + }) .masked(props.masked) .disabled(props.disabled) .optional_label(props.accessibility_label) @@ -594,6 +624,24 @@ pub(crate) fn digit(c: char) -> Option { char::from_digit(n, 10) } +/// `c` as a character of an alphanumeric code: an ASCII letter (upper-cased) +/// or digit, a full-width one (`A`, `a`, `1`) as the ASCII one. +pub(crate) fn alphanumeric(c: char) -> Option { + let c = match c { + '\u{FF01}'..='\u{FF5E}' => char::from_u32(c as u32 - 0xFEE0)?, + c => c, + }; + c.is_ascii_alphanumeric().then(|| c.to_ascii_uppercase()) +} + +/// `c` as a character of a code of `validation`, or none if it takes none. +fn code_char(c: char, validation: OtpInputValidationType) -> Option { + match validation { + OtpInputValidationType::Numeric => digit(c), + OtpInputValidationType::Alphanumeric => alphanumeric(c), + } +} + /// What the field lost at its end (characters) and what it gained, from /// `before` to `after`. pub(crate) fn diff<'a>(before: &str, after: &'a str) -> (usize, &'a str) { @@ -608,11 +656,20 @@ pub(crate) fn diff<'a>(before: &str, after: &'a str) -> (usize, &'a str) { } /// The code after an edit of `shown` that removed `deleted` characters at -/// its end and inserted `inserted`: its digits appended while the code is -/// shorter than `length`, or, `length` of them at once, the code replaced -/// by the first `length`. -fn edit(shown: &str, deleted: usize, inserted: &str, length: usize) -> String { - let digits: Vec = inserted.chars().filter_map(digit).collect(); +/// its end and inserted `inserted`: the characters of it `validation` +/// takes appended while the code is shorter than `length`, or, `length` of +/// them at once, the code replaced by the first `length`. +fn edit( + shown: &str, + deleted: usize, + inserted: &str, + length: usize, + validation: OtpInputValidationType, +) -> String { + let digits: Vec = inserted + .chars() + .filter_map(|c| code_char(c, validation)) + .collect(); if length > 0 && digits.len() >= length { return digits[..length].iter().collect(); } @@ -634,7 +691,46 @@ pub(crate) fn utf16_len(text: &str) -> u32 { #[cfg(test)] mod tests { - use super::{diff, digit, echoed, edit, group_count}; + use super::{OtpInputValidationType, alphanumeric, diff, digit, echoed, group_count}; + + fn edit(shown: &str, deleted: usize, inserted: &str, length: usize) -> String { + super::edit( + shown, + deleted, + inserted, + length, + OtpInputValidationType::Numeric, + ) + } + + fn edit_alphanumeric(shown: &str, deleted: usize, inserted: &str, length: usize) -> String { + super::edit( + shown, + deleted, + inserted, + length, + OtpInputValidationType::Alphanumeric, + ) + } + + #[test] + fn alphanumeric_codes_take_ascii_letters_and_digits_upper_cased() { + assert_eq!(alphanumeric('a'), Some('A')); + assert_eq!(alphanumeric('Z'), Some('Z')); + assert_eq!(alphanumeric('7'), Some('7')); + assert_eq!(alphanumeric('a'), Some('A')); + assert_eq!(alphanumeric('B'), Some('B')); + assert_eq!(alphanumeric('3'), Some('3')); + assert_eq!(alphanumeric('-'), None); + assert_eq!(alphanumeric('-'), None); + assert_eq!(alphanumeric('é'), None); + assert_eq!(alphanumeric('中'), None); + assert_eq!(edit_alphanumeric("AB", 0, "c", 8), "ABC"); + assert_eq!(edit_alphanumeric("AB", 1, "", 8), "A"); + assert_eq!(edit_alphanumeric("", 0, "ab12-cd34", 8), "AB12CD34"); + // Numeric codes still drop letters. + assert_eq!(edit("", 0, "ab12", 8), "12"); + } #[test] fn a_reported_code_coming_back_late_is_an_echo() { diff --git a/third-party/nsh/crates/nsh-base/src/popover.rs b/third-party/nsh/crates/nsh-base/src/popover.rs index e08545379ac..3ab9fc26133 100644 --- a/third-party/nsh/crates/nsh-base/src/popover.rs +++ b/third-party/nsh/crates/nsh-base/src/popover.rs @@ -113,13 +113,12 @@ pub enum PopoverEvent { #[component] pub fn Popover(props: PopoverProps, cx: Scope) -> impl IntoElement { let open = OpenState::new(props.open, props.default_open); - // Why it last closed: a press outside put the focus where it pressed. - let closed_by = stored(None::); + // The reason a close keeps says where the keyboard goes: a press + // outside put the focus where it pressed. let change = move |next: bool, reason: OpenChangeReason| { - if !next { - closed_by.replace(Some(reason)); - } - open.request(next, || cx.emit(PopoverEvent::OpenChange(next, reason))); + open.request_for(next, reason, || { + cx.emit(PopoverEvent::OpenChange(next, reason)) + }); }; // A press outside or Escape: an attempt, which closes it when allowed // (none while it goes). @@ -155,7 +154,7 @@ pub fn Popover(props: PopoverProps, cx: Scope) -> impl IntoElement presence.focus_back_on_close( move || open.get(), move || { - if closed_by.get() != Some(OpenChangeReason::PressOutside) { + if open.take_closed_by() != Some(OpenChangeReason::PressOutside) { anchor.focus_back(presence.popup()); } }, @@ -163,13 +162,15 @@ pub fn Popover(props: PopoverProps, cx: Scope) -> impl IntoElement } lifecycle( move || presence.mounted(), + // A reason the focus's return did not read (the focus was not in + // the popup as it closed) goes as it opens or is gone. move || { - closed_by.replace(None); + open.take_closed_by(); cx.emit(PopoverEvent::Open); }, move || { cx.emit(PopoverEvent::Close); - closed_by.replace(None); + open.take_closed_by(); }, ); // In a toolbar, the trigger is one of its items. diff --git a/third-party/nsh/crates/nsh-base/src/popup.rs b/third-party/nsh/crates/nsh-base/src/popup.rs index 3176f04325c..d15630e8a37 100644 --- a/third-party/nsh/crates/nsh-base/src/popup.rs +++ b/third-party/nsh/crates/nsh-base/src/popup.rs @@ -69,6 +69,10 @@ pub(crate) struct OpenState { /// that (a secondary click on an open context menu's trigger closes /// it and opens it again, both reported). asked: Stored>, + /// Why the user last asked it to close ([`Self::request_for`]), until + /// the popup reads it as it goes ([`Self::take_closed_by`]) or the app + /// that controls it keeps it open. + closed_by: Stored>, /// The popup's own owner, which lets go of `asked`: a request comes /// from what it shows (Escape, an item chosen), which the answer /// closing it takes away before the answer reaches the popup. @@ -81,6 +85,7 @@ impl OpenState { controlled: open, own: signal(default_open.get_untracked()), asked: stored(None), + closed_by: stored(None), owner: Owner::current(), } } @@ -117,14 +122,36 @@ impl OpenState { self.own.set(open); } else { self.asked.replace(Some(open)); - let asked = self.asked; self.owner.run(|| { after_answer(move || { - asked.replace(None); + self.asked.replace(None); + // The app kept it open (a press outside it asks to + // confirm first): the reason goes with the refusal, or + // the app's own close later would read it. + if !open && self.get_untracked() { + self.closed_by.replace(None); + } }) }); } } + + /// [`Self::request`] for `reason`, which a close keeps until the popup + /// reads it as it goes ([`Self::take_closed_by`]): where the keyboard + /// focus goes then depends on what closed it (a press outside put it + /// where it pressed). + pub(crate) fn request_for(self, open: bool, reason: OpenChangeReason, report: impl FnOnce()) { + if !open { + self.closed_by.replace(Some(reason)); + } + self.request(open, report); + } + + /// Why the user asked it to close, read once as it goes: none when the + /// app closed it, or when the app kept it open after the user asked. + pub(crate) fn take_closed_by(self) -> Option { + self.closed_by.replace(None) + } } /// A popup's lifecycle, the same for every one (as `Dialog`'s): `open` once diff --git a/third-party/nsh/crates/nsh-base/src/rich_editor/extensions/code_block.rs b/third-party/nsh/crates/nsh-base/src/rich_editor/extensions/code_block.rs index 998fafea43e..15a8c88497b 100644 --- a/third-party/nsh/crates/nsh-base/src/rich_editor/extensions/code_block.rs +++ b/third-party/nsh/crates/nsh-base/src/rich_editor/extensions/code_block.rs @@ -5,10 +5,10 @@ //! Shift-Tab indent when enabled. Ported from //! `@tiptap/extension-code-block`. -use serde_json::Value; - use std::sync::Arc; +use serde_json::Value; + use super::helpers::{Step, chain, clear_nodes, insert_default_block}; use crate::rich_editor::{ commands::{BoxCommand, Dispatch, command, exit_code, tiptap}, @@ -19,12 +19,55 @@ use crate::rich_editor::{ /// The key of [`code_block_highlight_plugin`]. pub const CODE_BLOCK_HIGHLIGHT: &str = "codeBlockHighlight"; -struct CodeBlockHighlight; +/// The options of the `codeBlockHighlight` extension +/// (`kit::code_block_highlight_with`): the language a code block that +/// names none is colored as. It is the view's, never written to the +/// document. A block's own `language` comes first, then +/// `detect_language`, then `default_language`; with neither, such a block +/// stays plain. +#[derive(Clone, Default)] +#[non_exhaustive] +pub struct CodeBlockHighlightOptions { + /// The language of a block that names none and that `detect_language` + /// gives none for (Tiptap's `defaultLanguage`; default none). + pub default_language: Option, + /// Names the language of a block that names none, from its code, as + /// Tiptap's `CodeBlockLowlight` guesses one with `highlightAuto` (the + /// app's own guess). Called on the engine thread while the block is + /// drawn, once each time such a block's code changes; `None` falls + /// back to `default_language`. Default none. + // Spelled out rather than behind a public alias: the options are the + // extension's only public surface. + #[allow(clippy::type_complexity)] + pub detect_language: Option Option + Send + Sync>>, +} + +impl std::fmt::Debug for CodeBlockHighlightOptions { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct("CodeBlockHighlightOptions") + .field("default_language", &self.default_language) + .field("detect_language", &self.detect_language.is_some()) + .finish() + } +} + +struct CodeBlockHighlight { + options: CodeBlockHighlightOptions, +} impl PluginSpec for CodeBlockHighlight { fn key(&self) -> PluginKey { PluginKey::new(CODE_BLOCK_HIGHLIGHT) } + + // The options, where the view reads them. + fn init_state( + &self, + _: &crate::rich_editor::state::EditorStateConfig, + _: &EditorState, + ) -> Option { + Some(Arc::new(self.options.clone())) + } } /// The plugin of the `codeBlockHighlight` extension: a view whose state @@ -32,7 +75,19 @@ impl PluginSpec for CodeBlockHighlight { /// colors fenced code (feature `highlight`; without it code stays plain). /// It changes nothing in the document: the colors are the view's. pub fn code_block_highlight_plugin() -> Plugin { - Arc::new(CodeBlockHighlight) + code_block_highlight_plugin_with(CodeBlockHighlightOptions::default()) +} + +// The plugin, with the language of blocks that name none. +pub(crate) fn code_block_highlight_plugin_with(options: CodeBlockHighlightOptions) -> Plugin { + Arc::new(CodeBlockHighlight { options }) +} + +// The options of `state`'s `codeBlockHighlight` plugin, if it has one. +pub(crate) fn code_block_highlight_options( + state: &EditorState, +) -> Option> { + PluginKey::new(CODE_BLOCK_HIGHLIGHT).get_state::(state) } /// Whether `state` has [`code_block_highlight_plugin`]. diff --git a/third-party/nsh/crates/nsh-base/src/rich_editor/extensions/kit.rs b/third-party/nsh/crates/nsh-base/src/rich_editor/extensions/kit.rs index 327aca339e7..cae041d7fa9 100644 --- a/third-party/nsh/crates/nsh-base/src/rich_editor/extensions/kit.rs +++ b/third-party/nsh/crates/nsh-base/src/rich_editor/extensions/kit.rs @@ -19,8 +19,8 @@ use serde_json::{Value, json}; use super::{ clear_document::clear_document, code_block::{ - CODE_BLOCK_HIGHLIGHT, CodeBlockOptions, code_block_highlight_plugin, code_block_keymap, - fence_language, + CODE_BLOCK_HIGHLIGHT, CodeBlockHighlightOptions, CodeBlockOptions, + code_block_highlight_plugin_with, code_block_keymap, fence_language, }, core_keymap::core_keymap as core_bindings, extension::{Extension, GlobalAttributes}, @@ -660,9 +660,31 @@ fn set_horizontal_rule(state: &EditorState, dispatch: Dispatch<'_>, ty: &NodeTyp /// `codeBlock` rather than in its place): code blocks colored by their /// `language` with the highlighting `TextView`'s code blocks have, its /// syntaxes and palette. Part of [`starter_kit`]; `{ codeBlockHighlight: -/// false }` leaves code plain. Needs feature `highlight`. +/// false }` leaves code plain. Needs feature `highlight`. Its option +/// `defaultLanguage` (Tiptap's) colors the blocks that name no language; +/// without it they stay plain. pub fn code_block_highlight() -> Extension { - Extension::new(CODE_BLOCK_HIGHLIGHT).add_plugins(|_| vec![code_block_highlight_plugin()]) + code_block_highlight_with(CodeBlockHighlightOptions::default()) +} + +/// [`code_block_highlight`] with the language of blocks that name none: +/// `options.detect_language` (the app's guess from the code) and then +/// `options.default_language` (the extension's `defaultLanguage`, which +/// `configure` can still set). The language is the view's; the document +/// keeps none. +pub fn code_block_highlight_with(options: CodeBlockHighlightOptions) -> Extension { + Extension::new(CODE_BLOCK_HIGHLIGHT) + .with_options(json!({ "defaultLanguage": options.default_language })) + .add_plugins(move |cx| { + let mut options = options.clone(); + options.default_language = cx + .options + .get("defaultLanguage") + .and_then(Value::as_str) + .filter(|l| !l.is_empty()) + .map(str::to_owned); + vec![code_block_highlight_plugin_with(options)] + }) } /// `codeBlock` with Tiptap's options (`exitOnTripleEnter`, @@ -1096,8 +1118,10 @@ pub fn list_keymap() -> Extension { /// `table` (prosemirror-tables' table, as Tiptap's `Table`) with the /// options `HTMLAttributes` (written on ``), `resizable` (true), -/// `cellMinWidth` (25), `lastColumnResizable` (true) and -/// `allowTableNodeSelection` (false): Tab and Shift-Tab between cells +/// `cellMinWidth` (25), `lastColumnResizable` (true), +/// `allowTableNodeSelection` (false) and `fullWidth` (false: true makes the +/// table at least as wide as the editor's text, its columns without a width +/// sharing the room, else its last column taking it): Tab and Shift-Tab between cells /// (Tab in the last cell adds a row), Backspace and Delete deleting the /// table when all its cells are selected, and the plugins repairing tables /// and editing in them (`tables::fix_tables_plugin`, @@ -1111,6 +1135,7 @@ pub fn table() -> Extension { "cellMinWidth": 25, "lastColumnResizable": true, "allowTableNodeSelection": false, + "fullWidth": false, })) .add_keyboard_shortcuts(|_| table_keys()) .add_plugins(|cx| { diff --git a/third-party/nsh/crates/nsh-base/src/rich_editor/js/extension_api.rs b/third-party/nsh/crates/nsh-base/src/rich_editor/js/extension_api.rs index 5e4c0a4ba49..33e486881bf 100644 --- a/third-party/nsh/crates/nsh-base/src/rich_editor/js/extension_api.rs +++ b/third-party/nsh/crates/nsh-base/src/rich_editor/js/extension_api.rs @@ -773,7 +773,7 @@ extension_classes! { TaskList => "taskList", "Task lists (`taskList`): `Mod-Shift-9`; `toggleTaskList`."; TaskItem => "taskItem", "Tasks (`taskItem`), checked or not: `[ ] ` / `[x] `; the option `nested` allows `Tab`."; CodeBlock => "codeBlock", "Code blocks (`codeBlock`): fences, `Mod-Alt-c`, leaving on a third Enter; `setCodeBlock`, `toggleCodeBlock`."; - CodeBlockHighlight => "codeBlockHighlight", "Colors code blocks by their `language`, as `TextView` colors fenced code: the same syntaxes and palette, highlighted off the engine thread (on the web from the page's syntaxes, fetched once). Part of `StarterKit`; `StarterKit.configure({ codeBlockHighlight: false })` leaves code plain. Needs the platform's feature `highlight`."; + CodeBlockHighlight => "codeBlockHighlight", "Colors code blocks by their `language`, as `TextView` colors fenced code: the same syntaxes and palette, highlighted off the engine thread (on the web from the page's syntaxes, fetched once). Its option `defaultLanguage` (Tiptap's; none by default) colors the blocks that name no language, without writing it into the document; without it they stay plain. Part of `StarterKit`; `StarterKit.configure({ codeBlockHighlight: false })` leaves code plain. Needs the platform's feature `highlight`."; HardBreak => "hardBreak", "Line breaks (`hardBreak`): `Mod-Enter`, `Shift-Enter`; `setHardBreak`."; HorizontalRule => "horizontalRule", "Horizontal rules (`horizontalRule`): `---`; `setHorizontalRule`."; RichImage => "image", "Images (`image`, Tiptap's `Image`): `![alt](src)`; `setImage`."; @@ -793,7 +793,7 @@ extension_classes! { Typography => "typography", "Typographic replacements as you type (`--` to an em dash, quotes, arrows, ...), each turned off with `false` or replaced with a string."; ListKeymap => "listKeymap", "Tiptap's list keymap: Backspace and Delete at list items' edges join and lift them."; TableKit => "tableKit", "Tiptap's TableKit: tables (`table`), their rows (`tableRow`), header cells (`tableHeader`) and cells (`tableCell`). `TableKit.configure({ table: { resizable: false } })` configures one, `{ tableHeader: false }` leaves one out. Not part of `StarterKit`."; - RichTable => "table", "Tables (`table`, Tiptap's `Table`; options `HTMLAttributes`, `resizable`, `cellMinWidth`, `lastColumnResizable`, `allowTableNodeSelection`): Tab and Shift-Tab between cells (Tab in the last cell adds a row), arrows and Shift-arrows across cells, cell selections; `insertTable`, `addColumnBefore`, `addColumnAfter`, `deleteColumn`, `addRowBefore`, `addRowAfter`, `deleteRow`, `deleteTable`, `mergeCells`, `splitCell`, `mergeOrSplit`, `toggleHeaderColumn`, `toggleHeaderRow`, `toggleHeaderCell`, `setCellAttribute`, `goToNextCell`, `goToPreviousCell`, `fixTables`, `setCellSelection`, `moveTableRow`, `moveTableColumn`, `setColumnWidth`, `setRowHeight`."; + RichTable => "table", "Tables (`table`, Tiptap's `Table`; options `HTMLAttributes`, `resizable`, `cellMinWidth`, `lastColumnResizable`, `allowTableNodeSelection`, `fullWidth`: the table is at least as wide as the editor's text, its columns without a width sharing the room, else its last column taking it): Tab and Shift-Tab between cells (Tab in the last cell adds a row), arrows and Shift-arrows across cells, cell selections; `insertTable`, `addColumnBefore`, `addColumnAfter`, `deleteColumn`, `addRowBefore`, `addRowAfter`, `deleteRow`, `deleteTable`, `mergeCells`, `splitCell`, `mergeOrSplit`, `toggleHeaderColumn`, `toggleHeaderRow`, `toggleHeaderCell`, `setCellAttribute`, `goToNextCell`, `goToPreviousCell`, `fixTables`, `setCellSelection`, `moveTableRow`, `moveTableColumn`, `setColumnWidth`, `setRowHeight`."; RichTableRow => "tableRow", "Table rows (`tableRow`, Tiptap's `TableRow`), with a `height`."; RichTableHeader => "tableHeader", "Table header cells (`tableHeader`, Tiptap's `TableHeader`), with `colspan`, `rowspan` and `colwidth`."; RichTableCell => "tableCell", "Table cells (`tableCell`, Tiptap's `TableCell`), with `colspan`, `rowspan` and `colwidth`."; diff --git a/third-party/nsh/crates/nsh-base/src/rich_editor/tables/nodes.rs b/third-party/nsh/crates/nsh-base/src/rich_editor/tables/nodes.rs index 031394db005..644e71c1729 100644 --- a/third-party/nsh/crates/nsh-base/src/rich_editor/tables/nodes.rs +++ b/third-party/nsh/crates/nsh-base/src/rich_editor/tables/nodes.rs @@ -31,7 +31,8 @@ fn extra(role: TableRole) -> Attrs { /// The table's options its spec reads (the `table` extension's): `HTMLAttributes` /// written on `
`, `cellMinWidth` (25) for the `min-width` of columns /// without a width, and what the view reads from the spec's `extra`: -/// `resizable` (true), `lastColumnResizable` (true) and `cellMinWidth`. +/// `resizable` (true), `lastColumnResizable` (true), `fullWidth` (false) +/// and `cellMinWidth`. pub fn table(options: &Value) -> (String, NodeSpec) { let cell_min_width = options .get("cellMinWidth") @@ -46,7 +47,11 @@ pub fn table(options: &Value) -> (String, NodeSpec) { // The editor's view lays it out as a grid. extra.insert("render".into(), Value::from("table")); extra.insert("cellMinWidth".into(), Value::from(cell_min_width)); - for (key, default) in [("resizable", true), ("lastColumnResizable", true)] { + for (key, default) in [ + ("resizable", true), + ("lastColumnResizable", true), + ("fullWidth", false), + ] { let value = options.get(key).and_then(Value::as_bool).unwrap_or(default); extra.insert(key.into(), Value::Bool(value)); } diff --git a/third-party/nsh/crates/nsh-base/src/rich_editor/view/controller.rs b/third-party/nsh/crates/nsh-base/src/rich_editor/view/controller.rs index 2df51a6569f..81d7c95ef82 100644 --- a/third-party/nsh/crates/nsh-base/src/rich_editor/view/controller.rs +++ b/third-party/nsh/crates/nsh-base/src/rich_editor/view/controller.rs @@ -22,7 +22,7 @@ use unicode_segmentation::UnicodeSegmentation; use super::{ RichEditorChange, RichEditorEvent, RichEditorFile, RichEditorPastedFiles, RichEditorProps, - RichEditorSelection, + RichEditorSelection, RichEditorUnreadFile, geometry::{DOC, Geometry, Hit, slot_id}, geometry_handle::{LocalGeometry, register_geometry, retire_geometry}, keys::{self, Move, Unit}, @@ -1912,7 +1912,8 @@ impl Rv { /// A paste: files go to the app (`onPasteFiles`), text and HTML into /// the document. pub(crate) fn paste_event(&self, p: &nsh_core::PasteEvent) { - if self.editable() && (!p.files.is_empty() || !p.uris.is_empty()) { + if self.editable() && (!p.files.is_empty() || !p.too_large.is_empty() || !p.uris.is_empty()) + { let files = p .files .iter() @@ -1925,6 +1926,15 @@ impl Rv { self.cx .emit(RichEditorEvent::PasteFiles(RichEditorPastedFiles { files, + too_large: p + .too_large + .iter() + .map(|file| RichEditorUnreadFile { + name: file.name.clone(), + mime: file.mime.clone(), + size: file.len, + }) + .collect(), uris: p.uris.clone(), })); return; diff --git a/third-party/nsh/crates/nsh-base/src/rich_editor/view/mod.rs b/third-party/nsh/crates/nsh-base/src/rich_editor/view/mod.rs index 6b9abc923f5..a77ba6d8b97 100644 --- a/third-party/nsh/crates/nsh-base/src/rich_editor/view/mod.rs +++ b/third-party/nsh/crates/nsh-base/src/rich_editor/view/mod.rs @@ -77,6 +77,11 @@ pub struct RichEditorProps { /// ReadonlyInput. #[prop(default)] pub readonly_sink: Prop, + /// The largest pasted file read, in bytes. Larger files reach + /// `onPasteFiles` in `tooLarge` with only their name, MIME type and size. + /// By default files of any size are read, as for an `Input`. + #[prop(default = u64::MAX)] + pub paste_max_size: Prop, /// Shown in an empty textblock while the document has no content /// (Tiptap's placeholder extension): the one the selection is in, at /// the document's top level, while the document can be edited (`showOnlyCurrent`, `includeChildren`, @@ -167,6 +172,18 @@ pub struct RichEditorFile { pub data: Vec, } +/// A pasted file whose bytes exceed the editor's `pasteMaxSize`. +#[derive(Debug, Clone, Default, PartialEq, JsObject)] +#[non_exhaustive] +pub struct RichEditorUnreadFile { + /// Its name. + pub name: String, + /// Its MIME type. + pub mime: String, + /// Its size in bytes. + pub size: u64, +} + /// Files pasted into a `RichEditor`, which the app inserts as it likes (an /// image node, a link to a saved copy): the editor inserts nothing for them, /// as Tiptap's file handler leaves them to its `onPaste`. @@ -175,6 +192,8 @@ pub struct RichEditorFile { pub struct RichEditorPastedFiles { /// Files with their bytes, in the platform's order. pub files: Vec, + /// Files over the paste size limit, without their bytes. + pub too_large: Vec, /// `file:` URLs of local files copied in a file manager. pub uris: Vec, } diff --git a/third-party/nsh/crates/nsh-base/src/rich_editor/view/parts.rs b/third-party/nsh/crates/nsh-base/src/rich_editor/view/parts.rs index 6cda6eee511..7c8dd0fc8c9 100644 --- a/third-party/nsh/crates/nsh-base/src/rich_editor/view/parts.rs +++ b/third-party/nsh/crates/nsh-base/src/rich_editor/view/parts.rs @@ -56,6 +56,12 @@ pub struct RichEditorClasses { /// classes follow the item. #[prop(skip_none)] pub task_checkbox: Option, + /// The mark in a done task item's checkbox: a `✓` centered in it, at + /// 12 points, bold, in the theme's `foreground` (`text-primary` on an + /// outlined box, `text-primary-foreground` on a filled one). Drawn only + /// when the app gives this part classes or a style. + #[prop(skip_none)] + pub task_checkmark: Option, /// A block the selection is in while the editor has the focus (after /// its node's classes), as `focusMode` picks them. #[prop(skip_none)] @@ -140,6 +146,10 @@ pub struct RichEditorStyles { /// A task item's checkbox. #[prop(skip_none)] pub task_checkbox: Option, + /// The mark in a done task item's checkbox (drawn only when this part + /// or its classes are given). + #[prop(skip_none)] + pub task_checkmark: Option, /// A block the selection is in, while focused. #[prop(skip_none)] pub focused_node: Option, @@ -226,6 +236,7 @@ pub(crate) enum Part { GapCursor, DropCursor, TaskCheckbox, + TaskCheckmark, FocusedNode, SelectedCell, TableGrip, @@ -250,6 +261,7 @@ impl RichEditorClasses { Part::GapCursor => self.gap_cursor.as_ref(), Part::DropCursor => self.drop_cursor.as_ref(), Part::TaskCheckbox => self.task_checkbox.as_ref(), + Part::TaskCheckmark => self.task_checkmark.as_ref(), Part::FocusedNode => self.focused_node.as_ref(), Part::SelectedCell => self.selected_cell.as_ref(), Part::TableGrip => self.table_grip.as_ref(), @@ -276,6 +288,7 @@ impl RichEditorStyles { Part::GapCursor => &self.gap_cursor, Part::DropCursor => &self.drop_cursor, Part::TaskCheckbox => &self.task_checkbox, + Part::TaskCheckmark => &self.task_checkmark, Part::FocusedNode => &self.focused_node, Part::SelectedCell => &self.selected_cell, Part::TableGrip => &self.table_grip, diff --git a/third-party/nsh/crates/nsh-base/src/rich_editor/view/render.rs b/third-party/nsh/crates/nsh-base/src/rich_editor/view/render.rs index 6990bb9291f..18945b36459 100644 --- a/third-party/nsh/crates/nsh-base/src/rich_editor/view/render.rs +++ b/third-party/nsh/crates/nsh-base/src/rich_editor/view/render.rs @@ -831,8 +831,11 @@ fn image_box(width: Option, height: Option, natural: Option<(f32, f32) } /// A task item's checkbox, before the item's content: unstyled -/// (`taskCheckbox` part); a press sets the item's `checked` (an -/// `AttrStep`), disabled while the document cannot be edited. +/// (`taskCheckbox` part); an app that styles the `taskCheckmark` part gets +/// a `✓` in it while the item is done, as a text view's task marker has +/// (without that part, nothing is drawn, as before it was added); a press sets +/// the item's `checked` (an `AttrStep`), disabled while the document cannot +/// be edited. fn task_checkbox(rv: Rv, item: ReadSignal) -> impl IntoElement { let props = rv.props; let checked = move || { @@ -844,6 +847,7 @@ fn task_checkbox(rv: Rv, item: ReadSignal) -> impl IntoElement { .unwrap_or(false) }; let press_rv = rv.clone(); + let mark_rv = rv.clone(); // The part is the checkbox's box; the checkbox fills it. The box // follows the item's state, so the app's `checked:` classes show it. view() @@ -863,7 +867,32 @@ fn task_checkbox(rv: Rv, item: ReadSignal) -> impl IntoElement { press_rv.set_checked(pos, *next); } }) - .size_full(), + .size_full() + .items_center() + .justify_center() + .indicator(when( + move || { + checked() + && (props + .classes + .with(|c| c.part(Part::TaskCheckmark).is_some()) + || props.styles.with(|s| s.part(Part::TaskCheckmark).is_some())) + }, + move || { + part( + text("\u{2713}") + // The checkbox says its state; the glyph is no + // name of it. + .accessibility_elements_hidden(true) + .text_size(px(12.0)) + .line_height(px(14.0)) + .font_weight(FontWeight::BOLD) + .text_color(move || theme().foreground), + &mark_rv, + Part::TaskCheckmark, + ) + }, + )), ) } @@ -1334,6 +1363,7 @@ fn text_block(rv: Rv, item: ReadSignal, owner: u64) -> impl IntoEleme // thread, and the code being highlighted there. let highlighted: Signal> = signal(None); let pending: Rc>> = Rc::default(); + let detected: Detected = Rc::default(); let content = computed(move || { inline_rv.deco_rev.get(); let it = item.get(); @@ -1358,7 +1388,7 @@ fn text_block(rv: Rv, item: ReadSignal, owner: u64) -> impl IntoEleme start, &decorations, head.zip(composition.as_deref()), - &code_tokens(&inline_rv, &it.node, highlighted, &pending), + &code_tokens(&inline_rv, &it.node, highlighted, &pending, &detected), |n| inline_rv.leaf_text(n), ); if let Some(geo) = inline_rv.geo.borrow_mut().texts.get_mut(&id) { @@ -1404,28 +1434,65 @@ fn text_block(rv: Rv, item: ReadSignal, owner: u64) -> impl IntoEleme .child(text) } +/// A code block's code when it last named no language, and the language +/// the app's `detect_language` gave for it. +type Detected = Rc)>>>; + /// The tokens coloring code block `node`'s text, as offsets in its /// content, when the editor highlights code blocks (`codeBlockHighlight`) -/// and the block names a language: those that cost little now (as -/// `TextView`'s code blocks), the rest set in `highlighted` from off the -/// engine thread. +/// and the block has a language (its own, else the extension's +/// `detect_language` or `default_language`): those that cost little now +/// (as `TextView`'s code blocks), the rest set in `highlighted` from off +/// the engine thread. fn code_tokens( rv: &Rv, node: &Node, highlighted: Signal>, pending: &Rc>>, + detected: &Detected, ) -> Vec<(usize, usize, Token)> { - use crate::rich_editor::extensions::code_block::highlights_code_blocks; + use crate::rich_editor::extensions::code_block::{ + code_block_highlight_options, highlights_code_blocks, + }; if !node.ty().spec().code || !node.content().iter().all(Node::is_text) || !highlights_code_blocks(&rv.st.borrow()) { return Vec::new(); } - let Some(language) = node.attrs().get("language").and_then(Value::as_str) else { - return Vec::new(); - }; let code = node.text_content(); + let own = node + .attrs() + .get("language") + .and_then(Value::as_str) + .filter(|l| !l.is_empty()); + let fallback; + let language = match own { + Some(language) => language, + None => { + let Some(options) = code_block_highlight_options(&rv.st.borrow()) else { + return Vec::new(); + }; + // The app's guess is asked once per change of the code, not + // each time the block is drawn again. + let guess = options.detect_language.as_ref().and_then(|detect| { + let mut last = detected.borrow_mut(); + match &*last { + Some((done, guess)) if *done == code => guess.clone(), + _ => { + let guess = detect(&code).filter(|l| !l.is_empty()); + *last = Some((code.clone(), guess.clone())); + guess + } + } + }); + fallback = guess.or_else(|| options.default_language.clone()); + match fallback.as_deref() { + Some(language) => language, + None => return Vec::new(), + } + } + }; let tokens = match crate::text_view::highlight::tokens_now(language, &code) { None => return Vec::new(), Some(Ok(tokens)) => tokens, @@ -2127,6 +2194,7 @@ fn sink(rv: Rv) -> impl IntoElement { .auto_correct(false) .auto_capitalize(AutoCapitalize::None) .paste_behavior(PasteBehavior::Report) + .paste_max_size(props.paste_max_size) .value(move || value.get()) .label(move || props.accessibility_label.get().unwrap_or_default()) // The keyboard is the sink's, so the editor's accessory is too; diff --git a/third-party/nsh/crates/nsh-base/src/rich_editor/view/table.rs b/third-party/nsh/crates/nsh-base/src/rich_editor/view/table.rs index cd5d4e5b468..64864e7a949 100644 --- a/third-party/nsh/crates/nsh-base/src/rich_editor/view/table.rs +++ b/third-party/nsh/crates/nsh-base/src/rich_editor/view/table.rs @@ -1,7 +1,10 @@ //! Tables in the view: a table node is a grid whose items are its cells //! (rows have no view: the walk of the tree flattens them), each placed at //! its slots of the table's map, the columns as wide as their `colwidth` -//! (else sized by their content, at least `cellMinWidth`), the rows at least +//! (else sized by their content, at least `cellMinWidth`; with `fullWidth` +//! the table is at least as wide as the editor's text and those columns share +//! what the sized ones leave, or the last column takes it when every column +//! has a width), the rows at least //! their `height`. Over the content box: the handles resizing columns and //! rows on their right and bottom borders, the current cell's column and //! row grips (on the table's top and left borders), which select and drag @@ -151,22 +154,62 @@ fn track_px(value: Points) -> String { format!("{}px", (value.0 * 10.0).round() / 10.0) } +/// Whether the table fills the width it is given (`fullWidth`). +fn full_width(table: &Node) -> bool { + table + .ty() + .spec() + .extra + .get("fullWidth") + .and_then(Value::as_bool) + .unwrap_or(false) +} + +/// Whether column `col` of `table`, `drawn` wide, takes the room the +/// others leave in a `fullWidth` table: the last column, every other one +/// sized, and either without a width or drawn wider than its width. A drag +/// narrowing it shows nothing. As wide as its width (the table overflows), +/// it does not, and narrowing it narrows the table. +fn stretched(table: &Node, col: usize, drawn: Points) -> bool { + let (min, _, _) = options(table); + let widths = column_widths(table); + full_width(table) + && col + 1 == widths.len() + && widths[..col].iter().all(Option::is_some) + && widths[col].is_none_or(|w| drawn - w.max(min) > px(0.5)) +} + /// Saved or dragged widths take precedence. Other columns fit their content -/// up to a readable line length. +/// up to a readable line length, or, in a `fullWidth` table, share the room +/// left: the grid is as wide as the scroll view and an `auto` maximum +/// stretches into its free space (`fit-content` does not), while the +/// `min-content` minimum keeps a column that cannot wrap whole, overflowing +/// the grid so the table scrolls. A `fullWidth` table whose every column +/// has a width gives the room left to its last column, its width the +/// least it takes: the table never gets narrower than the editor's text. pub(crate) fn column_tracks(table: &Node, preview: Option<(usize, Points)>) -> String { let (min, _, _) = options(table); - column_widths(table) + let full = full_width(table); + let widths: Vec> = column_widths(table) .into_iter() .enumerate() - .map(|(i, width)| { - let width = match preview { - Some((col, w)) if col == i => Some(w), - _ => width, - }; - match width { - Some(w) => track_px(w.max(min)), - None => "fit-content(20rem)".to_owned(), + .map(|(i, width)| match preview { + Some((col, w)) if col == i => Some(w), + _ => width, + }) + .collect(); + let all_sized = widths.iter().all(Option::is_some); + let last = widths.len().saturating_sub(1); + widths + .into_iter() + .enumerate() + .map(|(i, width)| match width { + Some(w) if full && all_sized && i == last => { + format!("minmax({},auto)", track_px(w.max(min))) } + Some(w) => track_px(w.max(min)), + None if full => "minmax(min-content,auto)".to_owned(), + None => "fit-content(20rem)".to_owned(), }) .collect::>() .join(" ") @@ -231,6 +274,7 @@ pub(crate) fn grid(wrapper: View, rv: &Rv, item: ReadSignal) -> View wrapper .grid() .self_start() + .style_when(move || full_width(&item.get().node), |s| s.w(relative(1.0))) .grid_template_columns(move || { SharedString::from(column_tracks(&item.get().node, preview.get())) }) @@ -802,15 +846,20 @@ impl Rv { }); } } - if !t.resizable || !is_desktop() || !contains(&t.bounds, at) { + if !t.resizable || !is_desktop() { continue; } + // The bands `resize_handles` draws: across the table, centered on + // each border, so the last column's and row's reach past its edge. + let b = t.bounds; let near = |edge: Points, v: Points| (edge - v).0.abs() <= HANDLE; + let in_height = at.y >= b.top() && at.y < b.bottom(); + let in_width = at.x >= b.left() && at.x < b.right(); for (c, (left, right)) in t.cols.iter().enumerate() { if c + 1 == t.cols.len() && !t.last_column_resizable { continue; } - if near(*right, at.x) { + if in_height && near(*right, at.x) { return Some(TableDrag::ColWidth { table: t.pos, col: c, @@ -821,7 +870,7 @@ impl Rv { } } for (r, (top, bottom)) in t.rows.iter().enumerate() { - if near(*bottom, at.y) { + if in_width && near(*bottom, at.y) { return Some(TableDrag::RowHeight { table: t.pos, row: r, @@ -1012,6 +1061,14 @@ impl Rv { } } + /// Whether column `col` of the table at `table`, `drawn` wide, is + /// stretched into a `fullWidth` table's room ([`stretched`]). + fn stretched(&self, table: usize, col: usize, drawn: Points) -> bool { + let doc = self.session.state().doc().clone(); + doc.node_at(table) + .is_some_and(|t| stretched(&t, col, drawn)) + } + /// A table gesture ended: the width, height or move it previewed, as /// one change. pub(crate) fn table_release(&self) { @@ -1037,7 +1094,9 @@ impl Rv { table, col, start, .. }, Some(TablePreview::ColWidth { width, .. }), - ) if width != start => Some(set_column_width(Some(table), col, Some(width))), + ) if width != start && !(width < start && self.stretched(table, col, start)) => { + Some(set_column_width(Some(table), col, Some(width))) + } ( TableDrag::RowHeight { table, row, start, .. @@ -1203,6 +1262,16 @@ fn layout_of(tree: &Tree, geo: &Geometry, table_id: u64, table_node: &Node) -> O tops[rect.top] = Some(o.y); bottoms[rect.bottom - 1] = Some(o.y + f.size.height); } + // Columns past a `fullWidth` grid's box (wider than the editor) are + // still the table's: its bounds reach the last cell's right edge. + let right = rights + .iter() + .flatten() + .fold(bounds.origin.x + bounds.size.width, |a, &r| a.max(r)); + let bounds = Bounds::new( + bounds.origin, + Size::new(right - bounds.origin.x, bounds.size.height), + ); let cols = edges( &lefts, &rights, @@ -1270,6 +1339,7 @@ fn edges( mod tests { use super::*; use crate::rich_editor::{ + extensions::{ExtensionManager, kit}, model::{Attrs, Fragment}, tables::test_util::{cell_pos, doc, p, schema, table, td, tds, tr}, }; @@ -1307,6 +1377,69 @@ mod tests { ); } + #[test] + fn a_full_width_tables_last_sized_column_takes_the_room_left() { + let manager = ExtensionManager::with_core(vec![ + kit::starter_kit(), + kit::table_kit().configure(serde_json::json!({ "table": { "fullWidth": true } })), + ]) + .unwrap(); + let s = manager.schema().clone(); + let cell = |text: &str, width: Option| { + let attrs = width.map(|w| { + let mut a = Attrs::new(); + a.insert("colwidth".into(), serde_json::json!([w])); + a + }); + let para = s + .node( + "paragraph", + None, + Fragment::from(vec![s.text(text, vec![])]), + vec![], + ) + .unwrap(); + s.node("tableCell", attrs, Fragment::from(vec![para]), vec![]) + .unwrap() + }; + let table_of = |cells: Vec| { + let row = s + .node("tableRow", None, Fragment::from(cells), vec![]) + .unwrap(); + s.node("table", None, Fragment::from(vec![row]), vec![]) + .unwrap() + }; + let mixed = table_of(vec![cell("a", Some(120)), cell("b", None)]); + assert_eq!( + column_tracks(&mixed, None), + "120px minmax(min-content,auto)" + ); + // Resizing the last column without a width: the room still goes to it. + assert_eq!( + column_tracks(&mixed, Some((1, px(90.0)))), + "120px minmax(90px,auto)" + ); + let all = table_of(vec![cell("a", Some(120)), cell("b", Some(80))]); + assert_eq!(column_tracks(&all, None), "120px minmax(80px,auto)"); + // Drawn wider than its width, or without one, the last column takes + // the room left: narrowing it shows nothing, a drag saves nothing. + assert!(stretched(&all, 1, px(200.0)) && stretched(&mixed, 1, px(200.0))); + // As wide as its width (the table overflows), narrowing it shows. + assert!(!stretched(&all, 1, px(80.0))); + assert!(!stretched(&all, 0, px(200.0))); + let first_unsized = table_of(vec![cell("a", None), cell("b", Some(80))]); + assert!(!stretched(&first_unsized, 1, px(200.0))); + assert!(!stretched( + &table(vec![tr(vec![td("a"), td("b")])]), + 1, + px(200.0) + )); + assert_eq!( + column_tracks(&all, Some((0, px(150.0)))), + "150px minmax(80px,auto)" + ); + } + #[test] fn cells_are_placed_at_their_slots() { let d = doc(vec![table(vec![ diff --git a/third-party/nsh/crates/nsh-base/src/select.rs b/third-party/nsh/crates/nsh-base/src/select.rs index d147b91854a..8ba291ba56d 100644 --- a/third-party/nsh/crates/nsh-base/src/select.rs +++ b/third-party/nsh/crates/nsh-base/src/select.rs @@ -23,6 +23,11 @@ //! Space) highlights the first enabled item, Up the last, and a press //! nothing until a key or the pointer moves it. The highlighted item is //! revealed. +//! - **The search** (`searchable`) is the field's own query, each opening +//! starting from `defaultQuery` (else empty), or the app's when it sets +//! `query`; `onQueryChange({ query })` reports what the user typed in +//! the field, as `Combobox`'s does, so the app can mark the match in its +//! rows or clear the query itself. //! - **While open** the keys move the highlight (`Listbox::bind_keys`), //! Return chooses it, and Escape, the back button, a press outside or on //! the backdrop close it (`onCancel`, then `onOpenChange(false, …)`). @@ -243,6 +248,12 @@ pub struct SelectProps { /// `testID` names the select's own view). #[prop(rename = "searchTestID")] pub search_test_id: Prop>, + /// The query (controlled), with `searchable`: what the user typed in + /// the search field, which filters the items. The app owns it and sets + /// the one `onQueryChange` reports. Without it the field keeps its own. + pub query: Prop>, + /// The query each opening starts with, while `query` is not set. + pub default_query: Prop>, /// A clear button while an item is chosen (`gpui-component`'s /// `cleanable`): a press clears the value, reported by /// `onChange(null)`, and leaves the list closed. @@ -363,12 +374,17 @@ pub struct SelectProps { /// The events of a [`Select`]. #[derive(Debug, Clone, PartialEq, Event)] +#[non_exhaustive] pub enum SelectEvent { /// The user chose another item (a press, Return or Space, typeahead on /// the trigger): its value; `null` when the clear button cleared it. /// Set `value` to follow it. #[args(value)] Change(Option), + /// The user typed in the search field: the query. Set `query` to + /// follow it. + #[args(query)] + QueryChange(SharedString), /// The list opened or closed (by the trigger or its keys, a choice, a /// press outside or on the backdrop, Escape or back), with why: set /// `open` to follow it. @@ -449,7 +465,8 @@ enum Opening { /// `searchable` a field above the items filters them, with `cleanable` a /// button after the trigger clears the value. The value is `value` and /// `onChange` (or the select's own, from `defaultValue`), the open state -/// `open` and `onOpenChange` (or its own). It looks like +/// `open` and `onOpenChange` (or its own), the search's query `query` and +/// `onQueryChange` (or the field's own, from `defaultQuery`). It looks like /// nothing: the app styles the trigger, the popup (`popupClass`), the list /// (`listClass`), the rows (`itemClass`, with `focus:` for the highlighted /// row and `selected:` for the chosen one) and the headers (`groupClass`), @@ -474,7 +491,14 @@ pub fn Select(props: SelectProps, cx: Scope) -> impl IntoElement { let open = OpenState::new(props.open, props.default_open); let value = ValueState::new(props.value, props.default_value); let current = computed(move || value.get()); - let lb = Listbox::new(props.items, props.searchable, Query::own()); + let lb = Listbox::new( + props.items, + props.searchable, + Query { + controlled: props.query, + default: props.default_query, + }, + ); // The app's element in the slot (or the view around what a Rust parent // fills it with): the combobox, what takes the keyboard, and what the // list is placed against. @@ -486,8 +510,6 @@ pub fn Select(props: SelectProps, cx: Scope) -> impl IntoElement { let width = signal(None::); let focused = signal(false); let opening = stored(Opening::Press); - // Why it closed last: a press outside leaves the focus where it went. - let closed_by = stored(None::); let change: Rc = Rc::new(move |next, reason| { if next && props.disabled.get_untracked() { return; @@ -495,14 +517,14 @@ pub fn Select(props: SelectProps, cx: Scope) -> impl IntoElement { if open.get_untracked() == next { return; } - if !next { - closed_by.replace(Some(reason)); - } // Reported before the state follows: `onOpen` / `onClose` come // after it (as `Menu`'s order says: `onCancel`, `onOpenChange`, // then the lifecycle), in this same turn while the popup has no - // looks for its states. - open.request(next, || cx.emit(SelectEvent::OpenChange(next, reason))); + // looks for its states. The reason a close keeps says where the + // keyboard goes (`back`). + open.request_for(next, reason, || { + cx.emit(SelectEvent::OpenChange(next, reason)) + }); }); // The value of item `item`, if it can be chosen. let choosable = move |item: usize| { @@ -631,8 +653,9 @@ pub fn Select(props: SelectProps, cx: Scope) -> impl IntoElement { open: Rc::new(move || open.get()), selected: Rc::new(move |v| current.with(|c| c.as_ref() == Some(v))), choose, - // Its query is the search field's own. - query_changed: Rc::new(|_| {}), + query_changed: Rc::new(move |query: &str| { + cx.emit(SelectEvent::QueryChange(query.to_owned().into())); + }), dismiss, shown: Rc::new(move |shown| { if shown { @@ -644,9 +667,8 @@ pub fn Select(props: SelectProps, cx: Scope) -> impl IntoElement { // The keyboard goes back to the trigger, unless a press outside, // Tab or the app's `onChange` took it somewhere else. back: Rc::new(move |popup| { - let by = closed_by.replace(None); if !matches!( - by, + open.take_closed_by(), Some(OpenChangeReason::PressOutside | OpenChangeReason::Focus) ) { anchor.focus_back(popup); diff --git a/third-party/nsh/crates/nsh-base/src/slider.rs b/third-party/nsh/crates/nsh-base/src/slider.rs index dc6f11b9aca..8819bcb24b1 100644 --- a/third-party/nsh/crates/nsh-base/src/slider.rs +++ b/third-party/nsh/crates/nsh-base/src/slider.rs @@ -3,7 +3,7 @@ use nsh_core::{ AccessibilityActionDef, AccessibilityValue, - element::{JsHost, JsIn, JsOwned, JsValue, PropError, Style, TsTypes, layout_rtl}, + element::{JsHost, JsIn, JsOwned, JsValue, PropError, Renderer, Style, TsTypes, layout_rtl}, geometry::{Along, Axis}, prelude::*, }; @@ -155,6 +155,16 @@ impl From for numeric::Scale { } } +/// What a slider's `renderThumb` is told about the thumb it draws in: +/// which thumb it is, never its state (the thumb's classes follow that). +#[derive(Debug, Clone, Default, PartialEq, JsObject)] +#[non_exhaustive] +pub struct SliderThumbContext { + /// It is a range's start thumb; a range's end thumb and a single + /// value's only thumb are not (`gpui-base`'s `SliderThumb::start`). + pub start: bool, +} + /// The props of [`Slider`]. #[derive(Debug, Clone, PartialEq, Props)] pub struct SliderProps { @@ -221,13 +231,28 @@ pub struct SliderProps { pub range_style: Prop +
+ `); + const html = execFileSync(chromium, ['--headless', '--no-sandbox', '--disable-dev-shm-usage', + '--disable-gpu', '--no-first-run', '--no-default-browser-check', '--virtual-time-budget=5000', + '--user-data-dir=' + join(dir, 'profile'), '--dump-dom', pathToFileURL(join(dir, 'index.html')).href], + { encoding: 'utf8', stdio: ['ignore', 'pipe', 'pipe'], timeout: 60000, maxBuffer: 1024 * 1024 }); + assert.equal(html.match(/data-result="([^"]*)"/)?.[1], 'passed'); + } finally { await rm(dir, { recursive: true, force: true }); } +}); + +test('a tap on selectable text keeps the focus its press gave a field', { skip: !chromium }, async () => { + const dir = await mkdtemp(join(tmpdir(), 'nsh-touch-browser-')); + try { + const source = await readFile(new URL('./nsh.js', import.meta.url), 'utf8'); + const module = 'data:text/javascript;base64,' + Buffer.from(source + '\nexport { Player };').toString('base64'); + await writeFile(join(dir, 'index.html'), ` +
+ `); + const html = execFileSync(chromium, ['--headless', '--no-sandbox', '--disable-dev-shm-usage', + '--disable-gpu', '--no-first-run', '--no-default-browser-check', '--virtual-time-budget=5000', + '--user-data-dir=' + join(dir, 'profile'), '--dump-dom', pathToFileURL(join(dir, 'index.html')).href], + { encoding: 'utf8', stdio: ['ignore', 'pipe', 'pipe'], timeout: 60000, maxBuffer: 1024 * 1024 }); + assert.equal(html.match(/data-result="([^"]*)"/)?.[1], 'passed'); + } finally { await rm(dir, { recursive: true, force: true }); } +}); diff --git a/third-party/nsh/crates/nsh-platform-windows/src/app.rs b/third-party/nsh/crates/nsh-platform-windows/src/app.rs index b6924219861..ab26043f200 100644 --- a/third-party/nsh/crates/nsh-platform-windows/src/app.rs +++ b/third-party/nsh/crates/nsh-platform-windows/src/app.rs @@ -388,6 +388,14 @@ impl AppView { if !crate::window_state::top_level(hwnd) { return; } + // The content size the window has before the attributes apply (the + // size it was made at, else what the user left it at): a frame the + // attributes change (a hidden title bar, no frame, the system's + // again) keeps the outer size and moves the caption's strip into or + // out of the client area, which this size undoes. A minimized + // window has no client area to keep. + let usable = |s: &Size| s.width.0 >= 1.0 && s.height.0 >= 1.0; + let made = content_size(hwnd).filter(usable); crate::shell::apply(&self.surface, hwnd, &launch.attributes); let mode = match kept { Some(placement) => { @@ -395,24 +403,23 @@ impl AppView { placement.mode } None => { - let content = launch - .default_size - .filter(|s| s.width.0 >= 1.0 && s.height.0 >= 1.0); + let content = launch.default_size.filter(usable).or(made); match (launch.default_position, launch.display) { (Some(WindowPosition::At(at)), display) => { - let content = content.or_else(|| content_size(hwnd)); if let Some(content) = content { crate::window_state::open_at(hwnd, content, Some(at), None, display); } } // The main window has no parent: centered on its display. (Some(_), display) | (None, display @ Some(_)) => { - if let Some(content) = content.or_else(|| content_size(hwnd)) { + if let Some(content) = content { crate::window_state::open_at(hwnd, content, None, None, display); } } (None, None) => { - if let Some(content) = content { + if let Some(content) = content + && content_size(hwnd) != Some(content) + { crate::window_state::size_content(hwnd, content); } } @@ -1087,6 +1094,35 @@ mod tests { let _ = unsafe { DestroyWindow(hwnd) }; } + /// A window made at a content size keeps it when the app's options + /// hide its title bar (a development host's `--window-size`, the + /// gallery's `titleBar.style: "hidden"`): the caption's strip is not + /// added to the content. + #[test] + fn hiding_the_title_bar_keeps_the_content_size() { + // Larger than the system's smallest window, which would grow it. + let view = AppView::make( + None, + AppOptions { + size: (480, 320), + skip_taskbar: true, + ..Default::default() + }, + true, + ) + .unwrap(); + let hwnd = view.hwnd(); + let made = content_size(hwnd).expect("a client area"); + let mut title_bar = nsh_core::desktop::TitleBarOptions::default(); + title_bar.style = nsh_core::desktop::TitleBarStyle::Hidden; + let mut launch = MainWindowOptions::default(); + launch.attributes.title_bar = Some(title_bar); + view.place_main_window(&launch, None); + assert_eq!(content_size(hwnd), Some(made)); + // SAFETY: the test's own window. + let _ = unsafe { DestroyWindow(hwnd) }; + } + /// A window with its title bar hidden over a backdrop goes without /// DWM's non-client rendering while zoomed, whose own caption buttons /// would show beside the drawn ones, and has it again once restored. diff --git a/third-party/nsh/crates/nsh-platform-windows/src/app_window.rs b/third-party/nsh/crates/nsh-platform-windows/src/app_window.rs index 6adf24de026..cc33938532e 100644 --- a/third-party/nsh/crates/nsh-platform-windows/src/app_window.rs +++ b/third-party/nsh/crates/nsh-platform-windows/src/app_window.rs @@ -100,6 +100,8 @@ pub(crate) struct AppWindow { /// Its client area in pixels, and its scale. pixels: Cell<(u32, u32)>, scale: Cell, + /// The proposed client size whose frame was presented during `WM_SIZING`. + prepared_size: Cell>, /// A `WM_PAINT` is asked for. invalid: Cell, repaint_after_frame: Cell, @@ -154,8 +156,9 @@ pub(crate) fn hwnds(surface: &Surface) -> Vec { surface.windows.borrow().iter().map(|w| w.hwnd).collect() } -/// The app window with the keyboard focus, for test steps that act on the -/// focused window (the host is not one). +/// The app window with the keyboard focus (the host is not one): what test +/// steps act on, and what owns a module's system UI +/// ([`crate::presenting_window`]). pub(crate) fn focused_hwnd(surface: &Surface) -> Option { surface .windows @@ -357,7 +360,10 @@ pub(crate) fn command( /// Shows dialog root `view` in a new window. fn open(surface: &Rc, view: &NshView, open: &OpenWindow) { let id = view.id(); - if is_window(surface, id) { + // Do not create an HWND if the dialog root was already detached earlier + // in the batch (for example when `` opens and closes in + // the same commit). + if is_window(surface, id) || view.parent_view().is_none() { return; } let options = &open.options; @@ -374,8 +380,10 @@ fn open(surface: &Rc, view: &NshView, open: &OpenWindow) { attrs }; let owner = open.parent.and_then(|parent| window_hwnd(surface, parent)); - let composed = - resolved.transparent || resolved.backdrop != Backdrop::None || resolved.click_through; + let composed = resolved.transparent + || resolved.backdrop != Backdrop::None + || resolved.click_through + || resolved.box_none; let hwnd = match crate::window::create_app_window( surface, id, @@ -412,6 +420,7 @@ fn open(surface: &Rc, view: &NshView, open: &OpenWindow) { target_scale: Cell::new(0.0), pixels: Cell::new((0, 0)), scale: Cell::new(1.0), + prepared_size: Cell::new(None), invalid: Cell::new(false), repaint_after_frame: Cell::new(false), damage: Default::default(), @@ -641,19 +650,30 @@ fn fill_background(surface: &Surface, id: NodeId, hwnd: HWND) { /// The window's client area was resized or moved to another scale: the /// root view takes its size, which the core lays the root out at. fn resized(surface: &Rc, window: &AppWindow) { + resize_to(surface, window, client_pixels(window.hwnd)); +} + +fn client_pixels(hwnd: HWND) -> (u32, u32) { + let mut rect = RECT::default(); + // SAFETY: plain call with a local out value. + let _ = unsafe { GetClientRect(hwnd, &mut rect) }; + rect_pixels(rect) +} + +fn rect_pixels(rect: RECT) -> (u32, u32) { + ( + (rect.right - rect.left).max(0) as u32, + (rect.bottom - rect.top).max(0) as u32, + ) +} + +fn resize_to(surface: &Rc, window: &AppWindow, pixels: (u32, u32)) { // Made at the system's default size (`CW_USEDEFAULT`, most of the // screen), which its styles report before it is placed: the app would // lay itself out for a window nobody sees. if !window.positioned.get() { return; } - let mut rect = RECT::default(); - // SAFETY: plain call with a local out value. - let _ = unsafe { GetClientRect(window.hwnd, &mut rect) }; - let pixels = ( - (rect.right - rect.left).max(0) as u32, - (rect.bottom - rect.top).max(0) as u32, - ); let scale = crate::window::dpi(window.hwnd) as f32 / 96.0; window.pixels.set(pixels); window.scale.set(scale); @@ -683,6 +703,37 @@ fn resized(surface: &Rc, window: &AppWindow) { invalidate(window); } +/// Prepare the newly exposed pixels before the window bounds grow. +pub(crate) fn prepare_resize(surface: &Rc, id: NodeId, rect: RECT) { + let Some(window) = get(surface, id) else { + return; + }; + if !window.opened.get() { + return; + } + let hwnd = window.hwnd; + // SAFETY: querying the mode of a live window. + if unsafe { IsZoomed(hwnd) }.as_bool() || crate::window::is_full_screen(hwnd) { + return; + } + // A normal frameless window's proposed outer rectangle is its client area. + let pixels = rect_pixels(rect); + let current = window.pixels.get(); + if pixels == current || pixels.0 < current.0 || pixels.1 < current.1 { + return; + } + window.prepared_size.set(None); + resize_to(surface, &window, pixels); + paint(surface, &window); + let swap = window.swap.borrow(); + if swap + .as_ref() + .is_some_and(|chain| chain.size == pixels && chain.shows_a_frame()) + { + window.prepared_size.set(Some(pixels)); + } +} + /// Draws `window` (`WM_PAINT`, and at once when resized). fn paint(surface: &Rc, window: &AppWindow) { window.invalid.set(false); @@ -929,14 +980,32 @@ pub(crate) fn handle( Some(Some(LRESULT(0))) } WM_ERASEBKGND => Some(Some(LRESULT(1))), + WM_EXITSIZEMOVE => { + if let Some(window) = &window { + window.prepared_size.set(None); + // Windows can end a drag without applying its last proposal. + let pixels = client_pixels(hwnd); + if window.pixels.get() != pixels { + resize_to(surface, window, pixels); + paint(surface, window); + } + } + None + } WM_SIZE => { // The frame's material follows the zoom state. crate::shell::zoom_changed(hwnd); if let Some(window) = &window { + let pixels = client_pixels(hwnd); + if window.prepared_size.take() == Some(pixels) + && window.scale.get() == crate::window::dpi(hwnd) as f32 / 96.0 + { + return Some(Some(LRESULT(0))); + } // What DWM shows past the last frame meanwhile, as the main // window's. fill_background(surface, id, hwnd); - resized(surface, window); + resize_to(surface, window, pixels); // Drawn now, so that it never shows stretched or stale // pixels while it is resized. paint(surface, window); @@ -964,6 +1033,7 @@ pub(crate) fn handle( if let Some(window) = &window { resized(surface, window); } + crate::chrome::dpi_changed(surface, hwnd); Some(Some(LRESULT(0))) } crate::window::WM_NSH_SHOW => { @@ -997,8 +1067,22 @@ pub(crate) fn handle( crate::chrome::show_popup(surface, hwnd); Some(Some(LRESULT(0))) } - // The main window's: its menu bar, lifecycle and engine. - WM_NCPAINT | 0x0091 | 0x0092 | WM_COMMAND | WM_DESTROY => Some(None), + // Its menu bar (the application menu's): drawn dark with the app, + // its items acting on this window. + WM_NCPAINT => { + // SAFETY: default handling, then the dark menu bar's line. + let r = unsafe { DefWindowProcW(hwnd, msg, wparam, lparam) }; + crate::chrome::paint_menu_bar_line(surface, hwnd); + Some(Some(r)) + } + // `WM_UAHDRAWMENU`, `WM_UAHDRAWMENUITEM`. + 0x0091 | 0x0092 => Some(crate::chrome::draw_menu_bar(surface, hwnd, msg, lparam)), + WM_COMMAND if (wparam.0 >> 16) & 0xFFFF == 0 && lparam.0 == 0 => { + crate::chrome::menu_command(surface, hwnd, (wparam.0 & 0xFFFF) as u16); + Some(Some(LRESULT(0))) + } + // The system's handling (its bar goes in `crate::window`'s). + WM_COMMAND | WM_DESTROY => Some(None), m if m >= WM_APP => Some(None), _ => None, } @@ -1078,6 +1162,7 @@ fn destroy(surface: &Surface, window: &AppWindow) { window.composed.borrow_mut().clear(); window.swap.borrow_mut().take(); crate::file_drop::window_closing(surface, window.hwnd); + crate::box_none::forget(window.hwnd); // SAFETY: plain calls on a window of this thread, if it is still there // (the system destroys owned windows with their owner). unsafe { @@ -1134,6 +1219,7 @@ mod tests { target_scale: Cell::new(0.0), pixels: Cell::new((0, 0)), scale: Cell::new(1.0), + prepared_size: Cell::new(None), invalid: Cell::new(false), repaint_after_frame: Cell::new(false), damage: Default::default(), @@ -1228,6 +1314,7 @@ mod tests { target_scale: Cell::new(0.0), pixels: Cell::new((0, 0)), scale: Cell::new(1.0), + prepared_size: Cell::new(None), invalid: Cell::new(false), repaint_after_frame: Cell::new(false), damage: Default::default(), @@ -1444,6 +1531,7 @@ mod tests { target_scale: Cell::new(0.0), pixels: Cell::new((0, 0)), scale: Cell::new(1.0), + prepared_size: Cell::new(None), invalid: Cell::new(false), repaint_after_frame: Cell::new(false), damage: Default::default(), @@ -1498,6 +1586,7 @@ mod tests { target_scale: Cell::new(0.0), pixels: Cell::new((0, 0)), scale: Cell::new(1.0), + prepared_size: Cell::new(None), invalid: Cell::new(false), repaint_after_frame: Cell::new(false), damage: Default::default(), @@ -1576,4 +1665,305 @@ mod tests { } let _ = std::fs::remove_file(path); } + + fn open_test_window(surface: &Rc, id: NodeId, parent: Option) -> HWND { + use nsh_core::{ + Command, MountItem, + desktop::{WindowKind, WindowOptions}, + }; + let mut opts = OpenWindow::default(); + opts.options = WindowOptions::new(format!("window-{id}")); + opts.options.kind = if parent.is_some() { + WindowKind::Dialog + } else { + WindowKind::Normal + }; + opts.options.attributes = WindowAttributes::for_kind(opts.options.kind); + opts.options.modal = parent.is_some(); + opts.parent = parent; + let mut m = surface.mounter.borrow_mut(); + for item in [ + MountItem::Create { + id, + kind: ViewKind::Modal, + }, + MountItem::Insert { + parent: ROOT_ID, + child: id, + before: None, + }, + MountItem::Command { + id, + command: Command::Desktop(Box::new(DesktopCommand::OpenWindow(Box::new(opts)))), + }, + ] { + m.apply(surface, &item); + } + m.end_batch(surface); + hwnd_of(surface, id).unwrap() + } + + #[test] + fn removed_window_root_does_not_open_an_orphan_window() { + use nsh_core::{ + Command, MountItem, ViewKind, + desktop::{DesktopCommand, OpenWindow, WindowAttributes, WindowKind, WindowOptions}, + }; + + let app = crate::app::AppView::new(None, Default::default()).unwrap(); + let surface = app.surface(); + let _main_hwnd = open_test_window(surface, 2, None); + let _editor_hwnd = open_test_window(surface, 3, None); + + let make_open = || { + let mut open_cmd = OpenWindow::default(); + open_cmd.options = WindowOptions::new("viewer"); + open_cmd.options.attributes = WindowAttributes::for_kind(WindowKind::Normal); + open_cmd + }; + + // 1. Same-batch transient open + remove while unrelated windows remain live. + { + let mut mounter = surface.mounter.borrow_mut(); + for item in [ + MountItem::Create { + id: 7, + kind: ViewKind::Modal, + }, + MountItem::Insert { + parent: ROOT_ID, + child: 7, + before: None, + }, + MountItem::Remove { id: 7 }, + MountItem::Command { + id: 7, + command: Command::Desktop(Box::new(DesktopCommand::OpenWindow(Box::new( + make_open(), + )))), + }, + ] { + mounter.apply(surface, &item); + } + mounter.end_batch(surface); + } + let after_transient = ids(surface); + + // 2. Normal open followed by Remove in the next batch destroys the HWND + // cleanly while leaving the unrelated live windows intact. + { + let mut mounter = surface.mounter.borrow_mut(); + for item in [ + MountItem::Create { + id: 8, + kind: ViewKind::Modal, + }, + MountItem::Insert { + parent: ROOT_ID, + child: 8, + before: None, + }, + MountItem::Command { + id: 8, + command: Command::Desktop(Box::new(DesktopCommand::OpenWindow(Box::new( + make_open(), + )))), + }, + ] { + mounter.apply(surface, &item); + } + mounter.end_batch(surface); + } + let opened_hwnd = hwnd_of(surface, 8); + if let Some(hwnd) = opened_hwnd { + let mut mounter = surface.mounter.borrow_mut(); + mounter.apply(surface, &MountItem::Remove { id: 8 }); + mounter.end_batch(surface); + // SAFETY: query of the test window just destroyed. + let still_live = unsafe { IsWindow(Some(hwnd)).as_bool() }; + assert!(!still_live, "Remove must destroy the opened HWND"); + } else { + panic!("expected id 8 to open a window before Remove"); + } + let after_close = ids(surface); + + close_all(surface); + // SAFETY: the test app host window. + let _ = unsafe { DestroyWindow(app.hwnd()) }; + assert_eq!( + after_transient, + vec![2, 3], + "removed dialog root must not open an orphan AppWindow" + ); + assert_eq!( + after_close, + vec![2, 3], + "closing viewer must preserve the two unrelated live windows" + ); + } + + /// The application menu of `surface`: a File menu whose one item is + /// Close, with Ctrl+W. + fn set_file_menu(surface: &Rc) { + use nsh_core::{ + desktop::{Key, MenuAction, MenuItem, MenuRole, Shortcut}, + keymap::When, + }; + let close = MenuItem::Action(MenuAction { + id: 0, + label: String::new(), + shortcut: Some(Shortcut { + ctrl: true, + ..Shortcut::key(Key::Char('w')) + }), + enabled: true, + checked: None, + role: Some(MenuRole::Close), + when: When::Auto, + icon: None, + symbol: None, + destructive: false, + }); + let file = MenuItem::Submenu { + label: "File".into(), + enabled: true, + items: vec![close], + icon: None, + symbol: None, + inline: false, + }; + crate::chrome::command(surface, &DesktopCommand::SetMenu(Some(vec![file].into()))); + } + + /// The menu bar `hwnd` shows (null for none). + fn menu_bar(hwnd: HWND) -> HMENU { + // SAFETY: a plain query. + unsafe { GetMenu(hwnd) } + } + + /// Whether a `WM_CLOSE` waits in `hwnd`'s queue (taken out of it). + fn close_posted(hwnd: HWND) -> bool { + let mut msg = MSG::default(); + // SAFETY: a query of this thread's queue with a local out value. + unsafe { PeekMessageW(&mut msg, Some(hwnd), WM_CLOSE, WM_CLOSE, PM_REMOVE) }.as_bool() + } + + /// The application menu is the menu bar of every normal window of the + /// app's own (#3613), not only of the hidden host: windows that open + /// later get it, each a menu of its own, dialogs none, and a window whose + /// title bar is the app's none while it is. + #[test] + fn the_application_menu_is_the_bar_of_every_normal_window() { + use nsh_core::MountItem; + let app = crate::app::AppView::new(None, Default::default()).unwrap(); + let surface = app.surface(); + let first = open_test_window(surface, 2, None); + let dialog = open_test_window(surface, 3, Some(2)); + let content = client_pixels(first); + set_file_menu(surface); + assert!(!menu_bar(first).is_invalid(), "a normal window shows it"); + assert!(menu_bar(dialog).is_invalid(), "a dialog shows none"); + assert_eq!( + client_pixels(first), + content, + "a window not shown yet keeps the content size it opens with" + ); + + // Opened after the menu was set. + let second = open_test_window(surface, 4, None); + assert!(!menu_bar(second).is_invalid(), "a window opening shows it"); + assert_ne!(menu_bar(first), menu_bar(second), "each its own menu"); + + // A title bar of the app's own has no menu bar; the system's again + // shows it. + let titled = |style| { + let mut title_bar = TitleBarOptions::default(); + title_bar.style = style; + let mut diff = WindowAttributes::default(); + diff.title_bar = Some(title_bar); + crate::shell::apply(surface, first, &diff); + }; + titled(TitleBarStyle::Hidden); + assert!(menu_bar(first).is_invalid(), "hidden title bar"); + titled(TitleBarStyle::Default); + assert!(!menu_bar(first).is_invalid(), "system title bar"); + + // A window that goes takes its bar with it. + { + let mut m = surface.mounter.borrow_mut(); + m.apply(surface, &MountItem::Remove { id: 4 }); + m.end_batch(surface); + } + // SAFETY: a plain query of the test's window just destroyed. + assert!(!unsafe { IsWindow(Some(second)) }.as_bool()); + assert!(!crate::chrome::bar_windows(surface).contains(&second)); + assert!(!menu_bar(first).is_invalid(), "the others keep theirs"); + + // No menu: no bar anywhere. + crate::chrome::command(surface, &DesktopCommand::SetMenu(None)); + assert!(menu_bar(first).is_invalid()); + assert!(crate::chrome::bar_windows(surface).is_empty()); + + close_all(surface); + // SAFETY: the test app host window. + let _ = unsafe { DestroyWindow(app.hwnd()) }; + } + + /// A role of the application menu acts on the window it was chosen in + /// (#3613): its bar's Close closes that window, its shortcut the window + /// the key was pressed in, never the hidden host. + #[test] + fn a_menu_role_acts_on_the_window_it_is_chosen_in() { + use crate::input::Modifiers; + let app = crate::app::AppView::new(None, Default::default()).unwrap(); + let surface = app.surface(); + let host = app.hwnd(); + let first = open_test_window(surface, 2, None); + let second = open_test_window(surface, 3, None); + set_file_menu(surface); + for hwnd in [host, first, second] { + close_posted(hwnd); + } + + // File > Close in the second window's bar (its first command). + // SAFETY: sent to the test's own window, on its thread. + unsafe { SendMessageW(second, WM_COMMAND, Some(WPARAM(1)), Some(LPARAM(0))) }; + assert!(close_posted(second), "the window whose bar it is closes"); + assert!(!close_posted(first)); + assert!(!close_posted(host), "not the hidden host"); + assert_eq!( + crate::window::shell(second).unwrap().close_command.take(), + Some(crate::shell::SysClose::Menu), + "the app hears a close press from the menu" + ); + + // Ctrl+W pressed in the first window. + { + let _root = enter(surface, 2).unwrap(); + let ctrl_w = KeyEvent { + vk: 0x57, + down: true, + repeat: false, + modifiers: Modifiers { + ctrl: true, + ..Default::default() + }, + scan: 0, + extended: false, + sys: false, + translated: false, + }; + assert!(crate::chrome::shortcut(surface, &ctrl_w)); + } + assert!( + close_posted(first), + "the window the key was pressed in closes" + ); + assert!(!close_posted(second)); + assert!(!close_posted(host), "not the hidden host"); + + close_all(surface); + // SAFETY: the test app host window. + let _ = unsafe { DestroyWindow(app.hwnd()) }; + } } diff --git a/third-party/nsh/crates/nsh-platform-windows/src/box_none.rs b/third-party/nsh/crates/nsh-platform-windows/src/box_none.rs new file mode 100644 index 00000000000..a6a35ed0738 --- /dev/null +++ b/third-party/nsh/crates/nsh-platform-windows/src/box_none.rs @@ -0,0 +1,223 @@ +//! Windows whose `pointerEvents` is `"box-none"`: each takes the pointer +//! only where it is over a view in its root that takes it (the input's own +//! picking, the root aside), and lets it through to what is below +//! elsewhere. +//! +//! The window is layered while it is `"box-none"` and passes the pointer +//! (`WS_EX_TRANSPARENT`) or not for where the cursor is, again after each +//! batch moved its views and as it shows; the cursor is followed only while +//! one of these windows shows. + +use std::{ + cell::{Cell, RefCell}, + rc::{Rc, Weak}, +}; + +use nsh_core::{NodeId, ROOT_ID}; +use windows::Win32::{ + Foundation::{HWND, POINT}, + Graphics::Gdi::ScreenToClient, + UI::{ + Input::KeyboardAndMouse::{ + GetAsyncKeyState, VK_LBUTTON, VK_MBUTTON, VK_RBUTTON, VK_XBUTTON1, VK_XBUTTON2, + }, + WindowsAndMessaging::{ + GWL_EXSTYLE, GetCursorPos, GetWindowLongPtrW, IsIconic, IsWindowVisible, KillTimer, + SetTimer, SetWindowLongPtrW, WS_EX_TRANSPARENT, + }, + }, +}; + +use crate::surface::Surface; + +/// How often the cursor is looked at while a `"box-none"` window shows (a +/// frame at 60 Hz). +const FOLLOW_MS: u32 = 16; + +/// A `"box-none"` window: its surface and its root's id. +struct Entry { + hwnd: isize, + surface: Weak, + id: NodeId, + /// Where the cursor was in it (pixels) and the [`LAYOUT`] when it last + /// decided: the same again, the decision stands. + decided: Cell>, +} + +thread_local! { + static WINDOWS: RefCell> = const { RefCell::new(Vec::new()) }; + /// The timer following the cursor while one of them shows. + static TIMER: Cell = const { Cell::new(0) }; + /// A count that moves as the windows' views or the windows change. + static LAYOUT: Cell = const { Cell::new(0) }; +} + +fn layout_changed() { + LAYOUT.set(LAYOUT.get().wrapping_add(1)); +} + +/// Window `id` of `surface` (`hwnd`) is `"box-none"` (`on`) or no longer +/// is. Its styles are the shell's ([`crate::shell::styles`]): layered +/// while it is, passing the pointer as this module decides. +pub(crate) fn set(surface: &Rc, id: NodeId, hwnd: HWND, on: bool) { + forget(hwnd); + if !on { + return; + } + WINDOWS.with_borrow_mut(|w| { + w.push(Entry { + hwnd: hwnd.0 as isize, + surface: Rc::downgrade(surface), + id, + decided: Cell::new(None), + }) + }); + shown_or_hidden(hwnd); +} + +/// `hwnd` closes, or is no longer `"box-none"`. +pub(crate) fn forget(hwnd: HWND) { + let key = hwnd.0 as isize; + WINDOWS.with_borrow_mut(|w| w.retain(|e| e.hwnd != key)); + follow_cursor(); +} + +/// `hwnd` moved, showed, hid, was minimized or restored +/// (`WM_WINDOWPOSCHANGED`): the cursor is followed while one of the +/// windows shows, and one that shows takes the pointer for where it is now. +pub(crate) fn shown_or_hidden(hwnd: HWND) { + let key = hwnd.0 as isize; + if !WINDOWS.with_borrow(|w| w.iter().any(|e| e.hwnd == key)) { + return; + } + layout_changed(); + follow_cursor(); + if showing(hwnd) { + follow(Some(key)); + } +} + +/// A batch moved `surface`'s views: its `"box-none"` windows follow their +/// new layout under the cursor where it rests. +pub(crate) fn batch_applied(surface: &Surface) { + if WINDOWS.with_borrow(Vec::is_empty) { + return; + } + layout_changed(); + let windows: Vec = WINDOWS.with_borrow(|w| { + w.iter() + .filter(|e| std::ptr::eq(e.surface.as_ptr(), surface)) + .map(|e| e.hwnd) + .collect() + }); + for hwnd in windows { + follow(Some(hwnd)); + } +} + +fn showing(hwnd: HWND) -> bool { + // SAFETY: plain queries; false for a window that is gone. + unsafe { IsWindowVisible(hwnd).as_bool() && !IsIconic(hwnd).as_bool() } +} + +/// Starts the timer while a `"box-none"` window shows, stops it otherwise. +fn follow_cursor() { + let any = WINDOWS.with_borrow(|w| w.iter().any(|e| showing(HWND(e.hwnd as _)))); + let timer = TIMER.get(); + if any && timer == 0 { + // SAFETY: a thread timer (no window) with a callback of the right + // signature; this thread's message loop dispatches it. + let id = unsafe { SetTimer(None, 0, FOLLOW_MS, Some(tick)) }; + TIMER.set(id); + } else if !any && timer != 0 { + // SAFETY: a thread timer this thread made. + let _ = unsafe { KillTimer(None, timer) }; + TIMER.set(0); + } +} + +unsafe extern "system" fn tick(_: HWND, _: u32, _: usize, _: u32) { + follow(None); + follow_cursor(); +} + +/// Whether a mouse button is held: the press stays with the window it went +/// to. +fn button_held() -> bool { + [VK_LBUTTON, VK_RBUTTON, VK_MBUTTON, VK_XBUTTON1, VK_XBUTTON2] + .into_iter() + // SAFETY: a plain query of the keys' state. + .any(|vk| unsafe { GetAsyncKeyState(vk.0 as i32) } < 0) +} + +/// Every `"box-none"` window that shows (only `only`, given one) passes the +/// pointer unless the cursor is over one of its views. +fn follow(only: Option) { + if button_held() { + return; + } + let mut cursor = POINT::default(); + // SAFETY: an out value. + if unsafe { GetCursorPos(&mut cursor) }.is_err() { + return; + } + let layout = LAYOUT.get(); + let entries: Vec<(isize, Weak, NodeId)> = WINDOWS.with_borrow(|w| { + w.iter() + .filter(|e| only.is_none_or(|o| o == e.hwnd)) + .map(|e| (e.hwnd, e.surface.clone(), e.id)) + .collect() + }); + for (key, surface, id) in entries { + let hwnd = HWND(key as _); + if !showing(hwnd) { + continue; + } + let Some(surface) = surface.upgrade() else { + continue; + }; + let (root, scale) = if id == ROOT_ID { + (Some(surface.root.clone()), surface.scale()) + } else { + ( + crate::app_window::root_view(&surface, id), + crate::window::dpi(hwnd) as f32 / 96.0, + ) + }; + let Some(root) = root else { continue }; + let mut p = cursor; + // SAFETY: a window of this thread; an in-out point. + if !unsafe { ScreenToClient(hwnd, &mut p) }.as_bool() { + continue; + } + // The cursor where it was in the window, the window laid out as it + // was: the decision stands (the timer finds this most of the time). + let now = Some((p.x, p.y, layout)); + if WINDOWS.with_borrow(|w| { + w.iter() + .find(|e| e.hwnd == key) + .is_some_and(|e| e.decided.replace(now) == now) + }) { + continue; + } + let takes = crate::input::takes_pointer(&root, p.x as f32 / scale, p.y as f32 / scale); + set_passing(hwnd, !takes); + } +} + +/// `WS_EX_TRANSPARENT` on (layered) `hwnd`: presses go to the windows +/// below, of any process. +fn set_passing(hwnd: HWND, passing: bool) { + // SAFETY: plain reads and writes of a window of this thread's styles. + unsafe { + let ex = GetWindowLongPtrW(hwnd, GWL_EXSTYLE) as u32; + let next = if passing { + ex | WS_EX_TRANSPARENT.0 + } else { + ex & !WS_EX_TRANSPARENT.0 + }; + if next != ex { + SetWindowLongPtrW(hwnd, GWL_EXSTYLE, next as isize); + } + } +} diff --git a/third-party/nsh/crates/nsh-platform-windows/src/chrome.rs b/third-party/nsh/crates/nsh-platform-windows/src/chrome.rs index d77514f8d79..6468a997982 100644 --- a/third-party/nsh/crates/nsh-platform-windows/src/chrome.rs +++ b/third-party/nsh/crates/nsh-platform-windows/src/chrome.rs @@ -18,9 +18,13 @@ //! system's drag rectangle, it becomes the system's move of the window; //! released before that, it reaches the app as a click, so overlays see //! a press outside them and close. -//! - **Menus** are Win32 menus: the menu bar (`SetMenu`, not shown while -//! the title bar is hidden) and `TrackPopupMenuEx` for context menus, -//! both themed dark with the app (uxtheme's `SetPreferredAppMode` for the +//! - **Menus** are Win32 menus: the application menu is the menu bar +//! (`SetMenu`) of the surface's own window and of every normal window of +//! the app's own, each with a menu of its own, not shown while the +//! window's title bar is hidden or it is in full screen; the roles of an +//! item act on the window it was chosen in (its bar, its context menu, a +//! shortcut pressed in it). Bars and context menus (`TrackPopupMenuEx`) +//! are themed dark with the app (uxtheme's `SetPreferredAppMode` for the //! menus, the `WM_UAHDRAWMENU*` messages for the bar, which has no dark //! theme of its own). Their shortcuts are matched here before the keys //! reach the app; the editing roles act on the focused text field by @@ -47,7 +51,7 @@ use nsh_core::{ Color, EventKind, EventPayload, ImageSource, PayloadValue, ROOT_ID, desktop::{ DesktopCommand, Key, MenuAction, MenuItem, MenuLabels, MenuRole, Shortcut, WindowEvent, - WindowRequest, menu_icon, + WindowKind, WindowRequest, menu_icon, }, geometry::{Edges, Points}, }; @@ -129,6 +133,17 @@ struct Entry { role: Option, } +/// The application menu as the menu bar of one window. Each window has a +/// menu of its own: a window destroys the menu it shows as it goes, and its +/// icons are drawn for its DPI. +struct Bar { + hwnd: HWND, + menu: HMENU, + /// What its items do, by command id - 1. + entries: Vec, + icons: MenuIcons, +} + /// A context menu: its items and where it shows. pub(crate) struct Popup { items: Arc<[MenuItem]>, @@ -159,12 +174,9 @@ pub(crate) struct Chrome { pub(crate) labels: RefCell, /// The application menu. menu: RefCell>>, - /// The menu bar shown (`HMENU`, 0 for none). - bar: Cell, - /// What the menu bar's items do, by command id - 1. - entries: RefCell>, - /// The icons of the menu bar. - bar_icons: RefCell, + /// The menu bars shown: one per window that shows the application menu + /// ([`shows_bar`]). + bars: RefCell>, /// The context menu to show once the batch is applied. popup: RefCell>, /// The last context-menu request, consumed by the app's next popup. @@ -371,9 +383,7 @@ pub(crate) fn frame_changed(surface: &Surface, hwnd: HWND) { SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE, ) }; - if crate::window::app_window_root(hwnd).is_none() { - show_menu_bar(surface); - } + update_bar(surface, hwnd); update_area(surface, hwnd); crate::window::invalidate(hwnd); surface.invalidate(); @@ -443,13 +453,10 @@ pub(crate) fn command(surface: &Rc, command: &DesktopCommand) { } // The Win32 menu bar always shows. DesktopCommand::SetMenuBar(_) => {} - // The edit menus read them as they open, a top-level window's menu - // bar now. + // The edit menus read them as they open, the menu bars now. DesktopCommand::SetMenuLabels(labels) => { c.labels.replace((**labels).clone()); - if top_level(hwnd) { - show_menu_bar(surface); - } + show_menu_bar(surface); } DesktopCommand::PopupMenu { items, at } => { let hwnd = surface.hwnd(); @@ -648,9 +655,7 @@ fn toggle_maximize(hwnd: HWND) { /// Window `hwnd` entered or left full screen: the menu bar and the title /// bar's area follow (neither shows in full screen). pub(crate) fn full_screen_changed(surface: &Surface, hwnd: HWND) { - if crate::window::app_window_root(hwnd).is_none() { - show_menu_bar(surface); - } + update_bar(surface, hwnd); update_area(surface, hwnd); crate::window::invalidate(hwnd); surface.invalidate(); @@ -1792,9 +1797,7 @@ pub(crate) fn nc_activate( if !custom_caption(hwnd) { // SAFETY: default handling, then the dark menu bar's line. let r = unsafe { DefWindowProcW(hwnd, WM_NCACTIVATE, wparam, lparam) }; - if crate::window::app_window_root(hwnd).is_none() { - paint_menu_bar_line(surface, hwnd); - } + paint_menu_bar_line(surface, hwnd); return Some(r); } // SAFETY: default handling, told not to repaint the frame. @@ -2177,15 +2180,16 @@ fn icon_bitmap( } } -/// Loads the icons of `pending`, setting each on its item as it arrives (at -/// once when in memory, as [`show_popup`]'s are) and keeping its bitmap in -/// `bitmaps`. A load never outlives its menu: its owner gives it up first. +/// Loads the icons of `pending` at window `hwnd`'s DPI, setting each on its +/// item as it arrives (at once when in memory, as [`show_popup`]'s are) and +/// keeping its bitmap in `bitmaps`. A load never outlives its menu: its +/// owner gives it up first. fn load_icons( surface: &Surface, + hwnd: HWND, pending: Vec, bitmaps: &Rc>, ) -> Vec { - let hwnd = surface.hwnd(); let (side, scale) = icon_size(hwnd); let dark = crate::system::dark(surface); pending @@ -2306,20 +2310,60 @@ fn append( } } -/// Shows the application menu as the window's menu bar, unless the title -/// bar is hidden or the window is in full screen. +/// Whether window `hwnd` shows the application menu as its menu bar: the +/// surface's own top-level window and the app's normal windows (not its +/// dialogs, panels, popups or overlays), unless the title bar is the app's +/// or the window is in full screen. +fn shows_bar(surface: &Surface, hwnd: HWND) -> bool { + let eligible = if hwnd == surface.hwnd() { + top_level(hwnd) + } else { + crate::window::app_window_root(hwnd).is_some() + && crate::window::shell(hwnd).is_some_and(|s| s.kind.get() == WindowKind::Normal) + }; + eligible && !custom_caption(hwnd) && !crate::window::is_full_screen(hwnd) +} + +/// Shows the application menu as the menu bar of every window that shows +/// it ([`shows_bar`]). fn show_menu_bar(surface: &Surface) { - let hwnd = surface.hwnd(); + let mut windows = crate::app_window::hwnds(surface); + let host = surface.hwnd(); + if !host.is_invalid() { + windows.insert(0, host); + } + for hwnd in windows { + update_bar(surface, hwnd); + } +} + +/// Gives window `hwnd` the application menu as its menu bar, made anew, or +/// takes its bar away when it shows none ([`shows_bar`]). +fn update_bar(surface: &Surface, hwnd: HWND) { let c = &surface.chrome; - let menu = c.menu.borrow().clone(); - let shown = menu.filter(|_| !custom_caption(hwnd) && !crate::window::is_full_screen(hwnd)); + let shown = c.menu.borrow().clone().filter(|_| shows_bar(surface, hwnd)); + // Taken out before the window hears of the change: the messages that + // `SetMenu` and `DrawMenuBar` send read the bars. + let mut old = take_bar(surface, hwnd); + if old.is_none() && shown.is_none() { + return; + } + // The old bar's loads end now: they set items of a menu about to go. + if let Some(old) = &mut old { + old.icons.loads.clear(); + } + // Windows keeps the outer size of a window whose bar comes or goes: a + // window of the app's own that does not show yet keeps the content size + // it opens with instead. + // SAFETY: a plain query. + let keep = (crate::window::app_window_root(hwnd).is_some() + && !unsafe { IsWindowVisible(hwnd) }.as_bool()) + .then(|| client_rect(hwnd)); let mut entries = Vec::new(); let mut icons = Vec::new(); - // The old bar's loads end now: they set items of a menu about to go. - c.bar_icons.borrow_mut().loads.clear(); // SAFETY: menus made, set and destroyed on this thread; the old bar is // destroyed once the window no longer shows it, then its bitmaps freed. - unsafe { + let bar = unsafe { let bar = match &shown { Some(items) => CreateMenu().ok().inspect(|bar| { let labels = c.labels.borrow(); @@ -2329,54 +2373,92 @@ fn show_menu_bar(surface: &Surface) { }; theme_menus(crate::system::dark(surface)); let _ = SetMenu(hwnd, bar); - let old = c.bar.replace(bar.map_or(0, |b| b.0 as isize)); - if old != 0 { - let _ = DestroyMenu(HMENU(old as *mut _)); + if let Some(old) = &old { + let _ = DestroyMenu(old.menu); } let _ = DrawMenuBar(hwnd); + bar + }; + drop(old); + if let Some(menu) = bar { + let bitmaps = Rc::default(); + let loads = load_icons(surface, hwnd, icons, &bitmaps); + c.bars.borrow_mut().push(Bar { + hwnd, + menu, + entries, + icons: MenuIcons { + loads, + _bitmaps: bitmaps, + }, + }); + } + if let Some(rect) = keep { + let now = client_rect(hwnd); + if now.bottom - now.top != rect.bottom - rect.top { + crate::window::fit_content(hwnd, (rect.right - rect.left, rect.bottom - rect.top)); + } } - let bitmaps = Rc::default(); - let loads = load_icons(surface, icons, &bitmaps); - *c.bar_icons.borrow_mut() = MenuIcons { - loads, - _bitmaps: bitmaps, +} + +/// Takes window `hwnd`'s bar out of the surface's. +fn take_bar(surface: &Surface, hwnd: HWND) -> Option { + let mut bars = surface.chrome.bars.borrow_mut(); + let i = bars.iter().position(|b| b.hwnd == hwnd)?; + Some(bars.remove(i)) +} + +/// Window `hwnd` is being destroyed (`WM_DESTROY`): its menu bar goes +/// with it, destroyed here, not by the system, so that no bar is left +/// naming a menu that is gone. +pub(crate) fn window_destroyed(surface: &Surface, hwnd: HWND) { + let Some(mut bar) = take_bar(surface, hwnd) else { + return; }; - // The bar's entries; the shortcuts are matched on the whole menu. - *c.entries.borrow_mut() = entries; + bar.icons.loads.clear(); + // SAFETY: the window, still alive while it handles `WM_DESTROY`, lets go + // of the menu, which this thread made. + unsafe { + let _ = SetMenu(hwnd, None); + let _ = DestroyMenu(bar.menu); + } } -/// `WM_COMMAND` from the menu bar. -pub(crate) fn menu_command(surface: &Rc, command: u16) { +/// `WM_COMMAND` from the menu bar of window `hwnd`: its role acts on that +/// window. +pub(crate) fn menu_command(surface: &Rc, hwnd: HWND, command: u16) { let entry = surface .chrome - .entries + .bars .borrow() - .get((command as usize).wrapping_sub(1)) - .copied(); + .iter() + .find(|b| b.hwnd == hwnd) + .and_then(|b| b.entries.get((command as usize).wrapping_sub(1)).copied()); if let Some(entry) = entry { - choose(surface, entry.id, entry.role, None); + choose(surface, hwnd, entry.id, entry.role, None); } } -/// An item was chosen: the platform carries out its role, the app hears -/// about the rest. -fn choose(surface: &Rc, id: u32, role: Option, area: Option<&NshView>) { - let hwnd = surface.hwnd(); +/// An item was chosen in window `hwnd` (its menu bar, a context menu it +/// showed, a shortcut pressed in it): the platform carries out its role on +/// that window, the app hears about the rest. +fn choose( + surface: &Rc, + hwnd: HWND, + id: u32, + role: Option, + area: Option<&NshView>, +) { + let host = surface.hwnd(); match role { // An embedding app's window is its own to close or keep. - Some(MenuRole::Quit) if top_level(hwnd) => { + Some(MenuRole::Quit) if top_level(host) => { if !ask_quit(surface) { quit(surface); } } - Some(MenuRole::Quit | MenuRole::Close) => { - // As the window menu's Close: the app hears a close press. - if let Some(shell) = crate::window::shell(hwnd) { - shell.close_command.set(Some(crate::shell::SysClose::Menu)); - } - // SAFETY: posting to a live window. - let _ = unsafe { PostMessageW(Some(hwnd), WM_CLOSE, WPARAM(0), LPARAM(0)) }; - } + Some(MenuRole::Quit) => close_by_menu(host), + Some(MenuRole::Close) => close_by_menu(hwnd), Some(MenuRole::Minimize | MenuRole::Hide) => { // SAFETY: a plain call. let _ = unsafe { ShowWindow(hwnd, SW_MINIMIZE) }; @@ -2387,7 +2469,9 @@ fn choose(surface: &Rc, id: u32, role: Option, area: Option<& Some(role) if area.is_some_and(|area| crate::selectable_view::menu_role(surface, area, role)) => {} Some(role) if role.edits_text() => { - // The focused field's own keys. + // The focused field's own keys, in the window's own tree. + let _root = crate::window::app_window_root(hwnd) + .and_then(|id| crate::app_window::enter(surface, id)); let (vk, shift) = match role { MenuRole::Undo => (0x5A, false), MenuRole::Redo => (0x59, false), @@ -2425,6 +2509,16 @@ fn choose(surface: &Rc, id: u32, role: Option, area: Option<& } } +/// Closes window `hwnd` as the window menu's Close does: the app hears a +/// close press. +fn close_by_menu(hwnd: HWND) { + if let Some(shell) = crate::window::shell(hwnd) { + shell.close_command.set(Some(crate::shell::SysClose::Menu)); + } + // SAFETY: posting to a window by handle; a window gone ignores it. + let _ = unsafe { PostMessageW(Some(hwnd), WM_CLOSE, WPARAM(0), LPARAM(0)) }; +} + /// `WM_NSH_MENU`: shows the context menu asked for. pub(crate) fn show_popup(surface: &Rc, hwnd: HWND) { let Some(Popup { @@ -2454,7 +2548,7 @@ pub(crate) fn show_popup(surface: &Rc, hwnd: HWND) { ); // What loaded in time is in memory, on the items now; what did not // goes on them while the menu is open. - let loads = load_icons(surface, icons, &bitmaps); + let loads = load_icons(surface, hwnd, icons, &bitmaps); surface.chrome.popup_icons.borrow_mut().clear(); let mut p = POINT::default(); match at { @@ -2500,13 +2594,13 @@ pub(crate) fn show_popup(surface: &Rc, hwnd: HWND) { { surface.chrome.tracked_popup.borrow_mut().take(); if let Some((id, role)) = surface.chrome.test_choice.take() { - choose(surface, id, role, area.as_ref()); + choose(surface, hwnd, id, role, area.as_ref()); } } if let Some(entry) = entries.get(chosen.wrapping_sub(1)).copied() { match actions.get((entry.id as usize).wrapping_sub(1)) { Some(action) => action(surface), - None => choose(surface, entry.id, entry.role, area.as_ref()), + None => choose(surface, hwnd, entry.id, entry.role, area.as_ref()), } } // The app's `Menu.popup` promise settles. @@ -2561,7 +2655,8 @@ pub(crate) fn shortcut_key(vk: u16) -> Option { } /// A key pressed: the application menu's item with that shortcut is -/// chosen (true), before the app gets the key. +/// chosen (true), before the app gets the key; its role acts on the window +/// the key was pressed in. pub(crate) fn shortcut(surface: &Rc, event: &KeyEvent) -> bool { let Some(key) = shortcut_key(event.vk) else { return false; @@ -2586,7 +2681,8 @@ pub(crate) fn shortcut(surface: &Rc, event: &KeyEvent) -> bool { }; match found { Some((id, role)) => { - choose(surface, id, role, None); + let hwnd = crate::app_window::hwnd_showing(surface, &surface.input_root()); + choose(surface, hwnd, id, role, None); true } None => false, @@ -2605,6 +2701,12 @@ const BAR_HOT: u32 = 0x0041_4141; const BAR_TEXT: u32 = 0x00ff_ffff; const BAR_TEXT_DISABLED: u32 = 0x0080_8080; +/// Whether window `hwnd` shows a menu bar. +fn has_menu_bar(hwnd: HWND) -> bool { + // SAFETY: a plain query. + !unsafe { GetMenu(hwnd) }.is_invalid() +} + /// The menu bar's rectangle in the window's coordinates. fn menu_bar_rect(hwnd: HWND) -> Option { let mut info = MENUBARINFO { @@ -2634,7 +2736,7 @@ pub(crate) fn draw_menu_bar( msg: u32, lparam: LPARAM, ) -> Option { - if !crate::system::dark(surface) || surface.chrome.bar.get() == 0 { + if !crate::system::dark(surface) || !has_menu_bar(hwnd) { return None; } match msg { @@ -2698,7 +2800,7 @@ pub(crate) fn draw_menu_bar( /// Paints over the light line the system draws under the menu bar (after /// `WM_NCPAINT` and `WM_NCACTIVATE`), in the dark theme. pub(crate) fn paint_menu_bar_line(surface: &Surface, hwnd: HWND) { - if !crate::system::dark(surface) || surface.chrome.bar.get() == 0 { + if !crate::system::dark(surface) || !has_menu_bar(hwnd) { return; } let Some(bar) = menu_bar_rect(hwnd) else { @@ -2722,32 +2824,45 @@ pub(crate) fn paint_menu_bar_line(surface: &Surface, hwnd: HWND) { } } -/// Makes the menu bar again if it has icons: they are drawn for one DPI and -/// theme. -fn refresh_icons(surface: &Surface) { - let has_icons = surface.chrome.menu.borrow().as_ref().is_some_and(|menu| { +/// Whether the application menu has icons: they are drawn for one DPI and +/// theme, and the bars showing them are made again when those change. +fn menu_has_icons(surface: &Surface) -> bool { + surface.chrome.menu.borrow().as_ref().is_some_and(|menu| { let mut any = false; MenuItem::each_icon(menu, &mut |_| any = true); any - }); - if has_icons && surface.chrome.bar.get() != 0 { - show_menu_bar(surface); - } + }) +} + +/// The windows showing a menu bar. +pub(crate) fn bar_windows(surface: &Surface) -> Vec { + surface + .chrome + .bars + .borrow() + .iter() + .map(|b| b.hwnd) + .collect() } -/// The window moved to a screen of another DPI: the bar's icons follow. -pub(crate) fn dpi_changed(surface: &Surface) { - refresh_icons(surface); +/// Window `hwnd` moved to a screen of another DPI: its bar's icons follow. +pub(crate) fn dpi_changed(surface: &Surface, hwnd: HWND) { + if menu_has_icons(surface) && bar_windows(surface).contains(&hwnd) { + update_bar(surface, hwnd); + } } -/// The appearance changed: menus and the bar follow it. +/// The appearance changed: menus and the bars follow it. pub(crate) fn appearance_changed(surface: &Surface) { theme_menus(crate::system::dark(surface)); - refresh_icons(surface); - let hwnd = surface.hwnd(); - if surface.chrome.bar.get() != 0 && !hwnd.is_invalid() { - // SAFETY: a plain call. - let _ = unsafe { DrawMenuBar(hwnd) }; + let icons = menu_has_icons(surface); + for hwnd in bar_windows(surface) { + if icons { + update_bar(surface, hwnd); + } else { + // SAFETY: a plain call on a window showing a bar. + let _ = unsafe { DrawMenuBar(hwnd) }; + } } surface.invalidate(); } @@ -2918,6 +3033,16 @@ mod tests { (area, text) } + /// A menu bar of the surface's window whose one item is `entry`. + fn bar_of(surface: &Surface, entry: Entry) { + surface.chrome.bars.borrow_mut().push(Bar { + hwnd: surface.hwnd(), + menu: HMENU::default(), + entries: vec![entry], + icons: MenuIcons::default(), + }); + } + fn selection(text: &NshView) -> Option<(u32, u32)> { text.state().text.as_ref().unwrap().area_range.get() } @@ -2938,13 +3063,25 @@ mod tests { let (_, text) = selectable_text(&surface); assert!(crate::input::show_context_menu(&surface, &text)); let popup = surface.chrome.app_popup(Arc::from([]), None); - choose(&surface, 0, Some(MenuRole::SelectAll), popup.area.as_ref()); + choose( + &surface, + surface.hwnd(), + 0, + Some(MenuRole::SelectAll), + popup.area.as_ref(), + ); assert_eq!(selection(&text), Some((0, 13))); crate::selectable_view::clear(); // The request was consumed even if the popup was cancelled. let popup = surface.chrome.app_popup(Arc::from([]), None); - choose(&surface, 0, Some(MenuRole::SelectAll), popup.area.as_ref()); + choose( + &surface, + surface.hwnd(), + 0, + Some(MenuRole::SelectAll), + popup.area.as_ref(), + ); assert_eq!(selection(&text), None); } @@ -2952,12 +3089,15 @@ mod tests { fn an_unopened_context_menu_cannot_take_over_bar_roles() { let surface = Surface::new(Environment::default()); let (_, text) = selectable_text(&surface); - surface.chrome.entries.borrow_mut().push(Entry { - id: 0, - role: Some(MenuRole::SelectAll), - }); + bar_of( + &surface, + Entry { + id: 0, + role: Some(MenuRole::SelectAll), + }, + ); assert!(crate::input::show_context_menu(&surface, &text)); - menu_command(&surface, 1); + menu_command(&surface, surface.hwnd(), 1); assert_eq!(selection(&text), None); } @@ -2984,7 +3124,13 @@ mod tests { }, ); let popup = surface.chrome.app_popup(Arc::from([]), None); - choose(&surface, 0, Some(MenuRole::SelectAll), popup.area.as_ref()); + choose( + &surface, + surface.hwnd(), + 0, + Some(MenuRole::SelectAll), + popup.area.as_ref(), + ); assert_eq!( selection(&text), if vk == 0x10 { Some((0, 13)) } else { None } @@ -3003,7 +3149,13 @@ mod tests { button.insert_before(&surface.root, None); assert!(crate::access::activate(&surface, &button)); let popup = surface.chrome.app_popup(Arc::from([]), None); - choose(&surface, 0, Some(MenuRole::SelectAll), popup.area.as_ref()); + choose( + &surface, + surface.hwnd(), + 0, + Some(MenuRole::SelectAll), + popup.area.as_ref(), + ); assert_eq!(selection(&text), None); } @@ -3012,14 +3164,16 @@ mod tests { let surface = Surface::new(Environment::default()); let (_, text) = selectable_text(&surface); assert!(crate::input::show_context_menu(&surface, &text)); - surface - .chrome - .entries - .borrow_mut() - .push(Entry { id: 7, role: None }); - menu_command(&surface, 1); + bar_of(&surface, Entry { id: 7, role: None }); + menu_command(&surface, surface.hwnd(), 1); let popup = surface.chrome.app_popup(Arc::from([]), None); - choose(&surface, 0, Some(MenuRole::SelectAll), popup.area.as_ref()); + choose( + &surface, + surface.hwnd(), + 0, + Some(MenuRole::SelectAll), + popup.area.as_ref(), + ); assert_eq!(selection(&text), None); } @@ -3030,7 +3184,13 @@ mod tests { assert!(crate::input::show_context_menu(&first, &text)); let second = Surface::new(Environment::default()); let popup = second.chrome.app_popup(Arc::from([]), None); - choose(&second, 0, Some(MenuRole::SelectAll), popup.area.as_ref()); + choose( + &second, + second.hwnd(), + 0, + Some(MenuRole::SelectAll), + popup.area.as_ref(), + ); assert_eq!(selection(&text), None); } diff --git a/third-party/nsh/crates/nsh-platform-windows/src/dev.rs b/third-party/nsh/crates/nsh-platform-windows/src/dev.rs index 2938a0a685c..a9d5f293cea 100644 --- a/third-party/nsh/crates/nsh-platform-windows/src/dev.rs +++ b/third-party/nsh/crates/nsh-platform-windows/src/dev.rs @@ -211,17 +211,17 @@ pub(crate) fn start(view: &Rc, url: String) { } })); - let host = HostInfo { - device: device_name(std::env::var("COMPUTERNAME").ok().as_deref()), - platform: HostPlatform::Windows, - bytecode_version: BYTECODE_VERSION.to_owned(), - ui_sets: crate::app::ui_sets() - .iter() - .flat_map(nsh_core::element::Registry::sets) - .filter_map(|set| set.specifier().map(str::to_owned)) - .collect(), - tests: true, - }; + let mut host = HostInfo::new(HostPlatform::Windows); + host.device = device_name(std::env::var("COMPUTERNAME").ok().as_deref()); + host.bytecode_version = BYTECODE_VERSION.to_owned(); + host.ui_sets = crate::app::ui_sets() + .iter() + .flat_map(nsh_core::element::Registry::sets) + .filter_map(|set| set.specifier().map(str::to_owned)) + .collect(); + host.tests = true; + // It keeps no model in a development session (`nsh test --attach`). + host.attach = false; // A test session (`nsh test --target windows`): the surface keeps the // model the agent's steps see, from the first bundle on (posted // messages keep their order, so it comes before the bundle). @@ -343,6 +343,7 @@ fn handle(ui: &Rc>, event: DevEvent) { DevEvent::Disconnected => show_status(ui, Status::Reconnecting), // The client's thread hands them to the test agent. DevEvent::Testing + | DevEvent::Attachable | DevEvent::Step { .. } | DevEvent::TestSetup { .. } | DevEvent::Fetch { .. } => {} @@ -385,6 +386,7 @@ fn handle(ui: &Rc>, event: DevEvent) { source_map, capabilities, app_id, + url_schemes, limits, window, application, @@ -419,6 +421,7 @@ fn handle(ui: &Rc>, event: DevEvent) { .with_main_window(window.as_deref()) .with_application(application.as_deref()); bundle = match bundle + .with_url_schemes(url_schemes) .with_app_id(app_id.as_deref()) .with_capabilities_json(capabilities.as_deref()) { @@ -484,6 +487,8 @@ fn handle(ui: &Rc>, event: DevEvent) { hide_error(ui); } } + // Events added later for other hosts (`DevEvent` is non-exhaustive). + _ => {} } } diff --git a/third-party/nsh/crates/nsh-platform-windows/src/input.rs b/third-party/nsh/crates/nsh-platform-windows/src/input.rs index b757a154db7..28e20c1fbac 100644 --- a/third-party/nsh/crates/nsh-platform-windows/src/input.rs +++ b/third-party/nsh/crates/nsh-platform-windows/src/input.rs @@ -951,6 +951,7 @@ pub(crate) fn batch_applied(surface: &Rc) { if surface.input.cursor_changed.take() { crate::window::refresh_cursor(surface); } + crate::keyboard::release_hidden_focus(surface); } /// `SetJsResponder` / `ClearJsResponder`. Runs while the mounter applies a @@ -1851,7 +1852,7 @@ fn collect_stops(view: &NshView, out: &mut Vec) { return false; } if view.kind() == ViewKind::Input { - focusable(&view.state()) + crate::keyboard::has_area(view) && focusable(&view.state()) } else { crate::keyboard::is_stop(view) } @@ -1882,6 +1883,13 @@ pub(crate) fn file_drop_target(surface: &Surface, x: f32, y: f32) -> Option bool { + pick(root, x, y, true).is_some_and(|hit| hit.item.is_some() || hit.view.id() != root.id()) +} + /// The innermost view at `(x, y)` (root coordinates); hosted items are /// looked at only with `items`. fn pick(root: &NshView, x: f32, y: f32, items: bool) -> Option { @@ -4079,6 +4087,39 @@ mod tests { assert_eq!(at(&root, 25.0, 25.0), Some(ROOT_ID)); } + #[test] + fn a_box_none_window_takes_the_pointer_over_its_views_only() { + let root = root(); + // A panel at the top of a window larger than it. + let panel = view(&root, 2, ViewKind::View, rect(100.0, 0.0, 200.0, 80.0)); + view(&panel, 4, ViewKind::View, rect(10.0, 10.0, 40.0, 40.0)); + assert!(takes_pointer(&root, 120.0, 20.0)); + assert!(takes_pointer(&root, 250.0, 60.0)); + // Below and beside it: the root's own, so nothing. + assert!(!takes_pointer(&root, 200.0, 200.0)); + assert!(!takes_pointer(&root, 20.0, 20.0)); + // A view filling the root takes it, as in a `box-none` view, unless + // it is `box-none` itself. + let fill = view(&root, 6, ViewKind::View, rect(0.0, 0.0, 400.0, 400.0)); + assert!(takes_pointer(&root, 200.0, 200.0)); + fill.state_mut().props.pointer_events = PointerEvents::BoxNone; + assert!(!takes_pointer(&root, 200.0, 200.0)); + // Views the pointer cannot reach take nothing. + let hidden = view(&fill, 8, ViewKind::View, rect(0.0, 300.0, 100.0, 100.0)); + hidden.state_mut().style.hidden = true; + let none = view(&fill, 10, ViewKind::View, rect(200.0, 300.0, 100.0, 100.0)); + none.state_mut().props.pointer_events = PointerEvents::None; + assert!(!takes_pointer(&root, 50.0, 350.0)); + assert!(!takes_pointer(&root, 250.0, 350.0)); + // The panel's hit slop reaches past its frame. + panel.state_mut().props.hit_slop = EdgeInsets { + bottom: Points(10.0), + ..Default::default() + }; + assert!(takes_pointer(&root, 200.0, 85.0)); + assert!(!takes_pointer(&root, 200.0, 95.0)); + } + #[test] fn hit_slop_extends_the_view() { let root = root(); diff --git a/third-party/nsh/crates/nsh-platform-windows/src/keyboard.rs b/third-party/nsh/crates/nsh-platform-windows/src/keyboard.rs index 0149d7514ac..2f35eb3f983 100644 --- a/third-party/nsh/crates/nsh-platform-windows/src/keyboard.rs +++ b/third-party/nsh/crates/nsh-platform-windows/src/keyboard.rs @@ -81,9 +81,9 @@ pub(crate) fn reset(surface: &Surface) { surface.keyboard.focus.borrow_mut().clear(); } -/// Whether Tab stops at `view`: it takes presses or is `focusable`, and -/// the pointer could reach it. A text field is a stop of its own -/// ([`crate::text_input`]) and not one of these. +/// Whether Tab stops at `view`: it takes presses or is `focusable`, it has +/// an area and the pointer could reach it. A text field is a stop of its +/// own ([`crate::text_input`]) and not one of these. pub(crate) fn is_stop(view: &NshView) -> bool { { let state = view.state(); @@ -95,7 +95,56 @@ pub(crate) fn is_stop(view: &NshView) -> bool { return false; } } - targetable(view) + has_area(view) && targetable(view) +} + +/// Whether `view` has an area. `display: none` lays out each view it holds +/// at no size and hides none of them, so without this Tab would stop at +/// them and a focused one that hides would keep taking keys (as on macOS, +/// `seen_by_keys`). +pub(crate) fn has_area(view: &NshView) -> bool { + let size = view.state().frame.size; + size.width.0 > 0.0 && size.height.0 > 0.0 +} + +/// Whether the keyboard may act on `view`: it has an area and neither it +/// nor a view around it is `visibility: hidden` (macOS's `seen_by_keys`). +pub(crate) fn seen(view: &NshView) -> bool { + if !has_area(view) { + return false; + } + let mut current = Some(view.clone()); + while let Some(view) = current { + if view.state().style.hidden { + return false; + } + current = view.parent_view(); + } + true +} + +/// A batch is applied: the keyboard focus leaves a custom view, or a text +/// field, that the batch hid (`display: none` around it lays it out at no +/// size, or `visibility: hidden`), and its blur is reported, as on macOS +/// (`release_hidden_focus`). Neither hides a window, so the keys would +/// still act on what the user cannot see. +pub(crate) fn release_hidden_focus(surface: &Surface) { + if let Some(field) = crate::text_input::focused(surface) + && !seen(&field) + { + crate::text_input::blur(&field); + } + let hidden: Vec = surface + .keyboard + .focus + .borrow() + .iter() + .filter(|(_, view)| view.attached() && !seen(view)) + .map(|(window, _)| *window) + .collect(); + for window in hidden { + clear(surface, window); + } } /// Whether the pointer may reach `view` (it and its ancestors are shown, @@ -917,7 +966,11 @@ pub(crate) fn activate(surface: &std::rc::Rc, event: &KeyEvent) -> bool let Some(view) = focused_control(surface) else { return false; }; - surface.event(view.id(), EventKind::Press, EventPayload::None); + // A held key presses once: its auto-repeats stay the control's without + // pressing it again, as on macOS and Linux. + if !event.repeat { + surface.event(view.id(), EventKind::Press, EventPayload::None); + } true } @@ -1397,8 +1450,23 @@ mod tests { }], ); assert!(focused_control(&surface).is_some()); + surface.record_events(); assert!(activate(&surface, &key(0x0D)), "Return"); assert!(activate(&surface, &key(0x20)), "Space"); + assert_eq!( + surface.take_events(), + vec![ + (view.id(), EventKind::Press, EventPayload::None), + (view.id(), EventKind::Press, EventPayload::None), + ] + ); + // Auto-repeats stay consumed by the control without pressing it again. + for vk in [0x0D, 0x20] { + let mut held = key(vk); + held.repeat = true; + assert!(activate(&surface, &held), "a repeat stays the control's"); + } + assert!(surface.take_events().is_empty(), "repeats press nothing"); assert!(!activate(&surface, &key(0x41)), "another key"); let mut ctrl = key(0x0D); ctrl.modifiers.ctrl = true; @@ -1678,6 +1746,49 @@ mod tests { ); } + /// A stop `display: none` holds (laid out at no size) is passed by Tab, + /// and a focused stop that hides so gives up the focus once the batch + /// that hid it is applied, as on macOS. + #[test] + fn tab_passes_a_stop_at_no_size_and_a_hidden_focus_is_given_up() { + let surface = surface(); + let gone = focusable(&surface, 2); + let shown = focusable(&surface, 4); + let empty = rect(0.0, 0.0, 0.0, 0.0); + apply( + &surface, + &[MountItem::Frame { + id: 2, + frame: empty, + }], + ); + assert!(!is_stop(&gone)); + assert!(crate::input::tab(&surface, &key(0x09))); + assert_eq!(focused_in(&surface, ROOT_ID).as_ref(), Some(&shown)); + // The focused stop hides: the batch's end takes the focus from it. + apply( + &surface, + &[MountItem::Frame { + id: 4, + frame: empty, + }], + ); + release_hidden_focus(&surface); + assert!(surface.keyboard.focus.borrow().is_empty()); + // `visibility: hidden` around a focused stop does too. + apply( + &surface, + &[MountItem::Frame { + id: 4, + frame: rect(0.0, 0.0, 100.0, 40.0), + }], + ); + assert!(focus_control(&surface, &shown)); + surface.root.state_mut().style.hidden = true; + release_hidden_focus(&surface); + assert!(surface.keyboard.focus.borrow().is_empty()); + } + #[test] fn focus_and_tab_walk_the_focus_stops() { let surface = surface(); diff --git a/third-party/nsh/crates/nsh-platform-windows/src/lib.rs b/third-party/nsh/crates/nsh-platform-windows/src/lib.rs index 95bc4afab0d..837b987fd3b 100644 --- a/third-party/nsh/crates/nsh-platform-windows/src/lib.rs +++ b/third-party/nsh/crates/nsh-platform-windows/src/lib.rs @@ -31,6 +31,7 @@ mod app_window; #[cfg_attr(not(feature = "media"), path = "audio_off.rs")] mod audio; mod backdrop; +mod box_none; mod canvas; mod chrome; mod compose; @@ -55,6 +56,7 @@ mod navigation; mod notifications; mod picker; mod presence; +mod presenting; mod render; mod richedit; mod scroll; @@ -99,5 +101,6 @@ pub use crate::{ ComponentContext, ComponentFactory, Components, NativeComponent, Pointer, PointerKind, Wheel, }, + presenting::{ElementBounds, element_bounds, presenting_window}, text::DWriteTextEngine, }; diff --git a/third-party/nsh/crates/nsh-platform-windows/src/mount.rs b/third-party/nsh/crates/nsh-platform-windows/src/mount.rs index a1170f3b269..01d9eb76964 100644 --- a/third-party/nsh/crates/nsh-platform-windows/src/mount.rs +++ b/third-party/nsh/crates/nsh-platform-windows/src/mount.rs @@ -517,6 +517,11 @@ impl Mounter { crate::selectable_view::clear_in(view); } } + Command::SelectAll => { + if let Some(view) = view { + crate::selectable_view::select_in(surface, view); + } + } Command::InsertText(text) => { if let Some(view) = view { crate::text_input::insert_text(view, text); diff --git a/third-party/nsh/crates/nsh-platform-windows/src/native.rs b/third-party/nsh/crates/nsh-platform-windows/src/native.rs index 5e46d6d7ca7..105d4dfbe12 100644 --- a/third-party/nsh/crates/nsh-platform-windows/src/native.rs +++ b/third-party/nsh/crates/nsh-platform-windows/src/native.rs @@ -576,6 +576,30 @@ pub(crate) fn deleted(surface: &Rc, view: &NshView) { drop(host); } +/// The surface's color scheme changed (`crate::system::environment_applied`): +/// every live web view updates its profile's preferred color scheme. +pub(crate) fn appearance_changed(surface: &Surface) { + #[cfg(feature = "webview")] + { + let Ok(hosts) = surface.native.hosts.try_borrow() else { + return; + }; + let webs: Vec<_> = hosts + .values() + .filter_map(|host| match host { + Host::Web(w) => Some(w.clone()), + _ => None, + }) + .collect(); + drop(hosts); + for web in webs { + web.apply_color_scheme(); + } + } + #[cfg(not(feature = "webview"))] + let _ = surface; +} + /// The view's frame changed: its item fills it again. pub(crate) fn resized(view: &NshView) { let mut s = view.state_mut(); diff --git a/third-party/nsh/crates/nsh-platform-windows/src/native/web.rs b/third-party/nsh/crates/nsh-platform-windows/src/native/web.rs index 58d5154d04a..959c41ce8b6 100644 --- a/third-party/nsh/crates/nsh-platform-windows/src/native/web.rs +++ b/third-party/nsh/crates/nsh-platform-windows/src/native/web.rs @@ -53,6 +53,10 @@ //! still may, as a `UIScrollView` with scrolling disabled. //! - `desktop={{ allowsBackForwardNavigationGestures }}`: WebView2's swipe navigation //! (`IsSwipeNavigationEnabled`, touch swipes). +//! - Color scheme: pages follow the surface's color scheme (`prefers-color-scheme`, +//! `Sec-CH-Prefers-Color-Scheme`, scrollbars and menus) via +//! `ICoreWebView2Profile::SetPreferredColorScheme` (`ICoreWebView2_13`; older +//! runtimes keep following the system). //! //! # Downloads //! @@ -127,8 +131,10 @@ use webview2_com::{ COREWEBVIEW2_PERMISSION_KIND, COREWEBVIEW2_PERMISSION_KIND_CAMERA, COREWEBVIEW2_PERMISSION_KIND_MICROPHONE, COREWEBVIEW2_PERMISSION_STATE_ALLOW, COREWEBVIEW2_PERMISSION_STATE_DENY, COREWEBVIEW2_POINTER_EVENT_KIND, - COREWEBVIEW2_WEB_ERROR_STATUS, COREWEBVIEW2_WEB_RESOURCE_CONTEXT_DOCUMENT, ICoreWebView2, - ICoreWebView2_2, ICoreWebView2_4, ICoreWebView2CompositionController, + COREWEBVIEW2_PREFERRED_COLOR_SCHEME, COREWEBVIEW2_PREFERRED_COLOR_SCHEME_DARK, + COREWEBVIEW2_PREFERRED_COLOR_SCHEME_LIGHT, COREWEBVIEW2_WEB_ERROR_STATUS, + COREWEBVIEW2_WEB_RESOURCE_CONTEXT_DOCUMENT, ICoreWebView2, ICoreWebView2_2, + ICoreWebView2_4, ICoreWebView2_13, ICoreWebView2CompositionController, ICoreWebView2Controller, ICoreWebView2Controller2, ICoreWebView2Controller3, ICoreWebView2Deferral, ICoreWebView2DownloadOperation, ICoreWebView2DownloadStartingEventArgs, ICoreWebView2Environment, @@ -853,6 +859,7 @@ impl WebItem { *self.controller.borrow_mut() = Some(controller); *self.webview.borrow_mut() = Some(webview); self.paint_background(); + self.apply_color_scheme(); self.bounds.set(None); self.place(); let props = self.props.borrow().clone(); @@ -1596,11 +1603,15 @@ impl WebItem { return false; }; let access = surface.native.access.borrow().clone(); - let origin = self + let (origin, hosts) = self .props .borrow() .as_ref() - .and_then(|p| p.allow_origin.clone()); + .map(|p| (p.allow_origin.clone(), p.allow_navigation.clone())) + .unwrap_or_default(); + if hosts.as_ref().is_some_and(|h| !h.allows(url)) { + return false; + } access.is_none_or(|a: Arc| a.allows_webview_with(url, origin.as_ref())) } @@ -1926,6 +1937,30 @@ impl WebItem { } } + /// Keeps WebView2's `prefers-color-scheme` (and `Sec-CH-Prefers-Color-Scheme`, + /// scrollbars and menus) in step with the surface's color scheme (`ICoreWebView2_13`; + /// older runtimes keep following the system). + pub(crate) fn apply_color_scheme(&self) { + if self.closed.get() || self.closing.get() { + return; + } + let Some(surface) = self.surface.upgrade() else { + return; + }; + let Some(webview) = self.webview.borrow().clone() else { + return; + }; + let scheme = preferred_color_scheme(crate::system::dark(&surface)); + if let Ok(v13) = webview.cast::() { + // SAFETY: WebView2 calls on the live core, on its thread. + unsafe { + if let Ok(profile) = v13.Profile() { + let _ = profile.SetPreferredColorScheme(scheme); + } + } + } + } + /// Gives the controller the bounds, visibility and scale of where the /// last frame put the page. fn place(&self) { @@ -3057,6 +3092,15 @@ fn interrupt_message(reason: i32) -> String { message.to_owned() } +/// Maps the surface's resolved color scheme to WebView2's profile color scheme. +fn preferred_color_scheme(dark: bool) -> COREWEBVIEW2_PREFERRED_COLOR_SCHEME { + if dark { + COREWEBVIEW2_PREFERRED_COLOR_SCHEME_DARK + } else { + COREWEBVIEW2_PREFERRED_COLOR_SCHEME_LIGHT + } +} + #[cfg(test)] mod tests { use super::*; @@ -3298,4 +3342,16 @@ mod tests { assert!(take_terminal(&terminal)); assert!(!take_terminal(&terminal)); } + + #[test] + fn maps_surface_color_scheme_to_webview2_preferred_color_scheme() { + assert_eq!( + preferred_color_scheme(true), + COREWEBVIEW2_PREFERRED_COLOR_SCHEME_DARK + ); + assert_eq!( + preferred_color_scheme(false), + COREWEBVIEW2_PREFERRED_COLOR_SCHEME_LIGHT + ); + } } diff --git a/third-party/nsh/crates/nsh-platform-windows/src/navigation.rs b/third-party/nsh/crates/nsh-platform-windows/src/navigation.rs index a39cefe721c..ebe91ea1e58 100644 --- a/third-party/nsh/crates/nsh-platform-windows/src/navigation.rs +++ b/third-party/nsh/crates/nsh-platform-windows/src/navigation.rs @@ -1189,8 +1189,11 @@ impl Nav { set_shift(&view, (0.0, 0.0)); set_fade(&view, 1.0); let mut restored = false; + // A field hidden meanwhile (`display: none` around it) is not given + // the focus back, as a custom view that is no stop is not. if let Some(field) = restore && field.attached() + && crate::keyboard::seen(&field) && crate::text_input::focused(surface).is_none() && is_ancestor(&self.focus_scope(surface), &field) { @@ -1689,6 +1692,7 @@ pub(crate) fn release(surface: &Rc, view: &NshView) { set_fade(view, 1.0); if let Some(field) = restore && field.attached() + && crate::keyboard::seen(&field) && crate::text_input::focused(surface).is_none() { crate::text_input::focus(&field); diff --git a/third-party/nsh/crates/nsh-platform-windows/src/presenting.rs b/third-party/nsh/crates/nsh-platform-windows/src/presenting.rs new file mode 100644 index 00000000000..b62b0fdd878 --- /dev/null +++ b/third-party/nsh/crates/nsh-platform-windows/src/presenting.rs @@ -0,0 +1,257 @@ +//! What a module's main-thread function shows system UI from: the surface +//! that ran it. Modules outside NSH (nshm) run Win32 code with +//! `run_on_main_thread`; while such a function runs, its surface is +//! current here, so a menu or a dialog a module shows is owned by that +//! surface's window ([`presenting_window`]) and points at the element it +//! belongs to ([`element_bounds`]), as the system UI NSH shows itself does. +//! +//! NSH draws its elements into its windows: they are no windows of their +//! own, so an element is given as the window it shows in and its bounds +//! there, where Apple's backends give its view. + +use std::{ + cell::RefCell, + rc::{Rc, Weak}, +}; + +use nsh_core::{Bounds, NodeId, Points, Size, geometry::point}; +use windows::Win32::{ + Foundation::HWND, + UI::WindowsAndMessaging::{GA_ROOT, GetAncestor, IsWindowVisible}, +}; + +use crate::surface::Surface; + +thread_local! { + /// The surface whose main-thread function runs now. + static CURRENT: RefCell>> = const { RefCell::new(None) }; +} + +/// Runs `f` with `surface` as the current one. +pub(crate) fn run_for(surface: Weak, f: impl FnOnce()) { + let previous = CURRENT.with_borrow_mut(|current| current.replace(surface)); + f(); + CURRENT.with_borrow_mut(|current| *current = previous); +} + +/// Where an element shows ([`element_bounds`]). +#[derive(Debug, Clone, Copy, PartialEq)] +#[non_exhaustive] +pub struct ElementBounds { + /// The window the element shows in: the surface's (a child of the + /// embedding app's window when the surface is embedded) or a window of + /// the app's own (`Window.open`). Its client area holds [`Self::bounds`]; + /// `ClientToScreen` on it gives screen coordinates. + pub window: HWND, + /// The element's bounds in the window's client area, from its top-left + /// corner: its layout box as it is drawn (moved by scrolling and its + /// transforms; the box around it when rotated). + pub bounds: Bounds, + /// Pixels per point in the window: `bounds` times it is in client + /// pixels, what Win32 takes. + pub scale_factor: f32, +} + +/// Where element `node` (its `ref`'s node, `NodeRef` in a module's +/// arguments) of the surface whose function a module runs on the main +/// thread (`run_on_main_thread`) shows, in whatever window of the surface +/// it is (the surface's, a modal over it, a window of the app's own); +/// [`ROOT_ID`](nsh_core::ROOT_ID) is the surface's root. For system UI that +/// belongs to an element: where a menu opens (`TrackPopupMenuEx`'s point +/// and excluded rectangle), what a flyout points at. Read it while the +/// function runs: a later layout moves the element. +/// +/// NSH draws its elements itself: they are no windows a module could take. +/// This is for anchoring and presenting system UI only: a module never +/// changes, re-parents, restyles or removes a window NSH owns, nor draws +/// into it. +/// +/// `None` outside such a function, when no view of the surface carries +/// `node` (not rendered, or removed since), or when its view is in no +/// window's tree (a screen not shown). +pub fn element_bounds(node: NodeId) -> Option { + let surface = current()?; + let view = surface.view(node)?; + let (width, height) = { + let state = view.try_state()?; + (state.frame.size.width.0, state.frame.size.height.0) + }; + let (x, y, w, h) = view.to_root()?.bounds(0.0, 0.0, width, height)?; + let window = crate::app_window::hwnd_showing(&surface, &view); + if window.is_invalid() { + return None; + } + // A window of the app's own has the scale of the display it is on, + // which can differ from the surface's. + let scale_factor = if window == surface.hwnd() { + surface.scale() + } else { + crate::window::dpi(window) as f32 / 96.0 + }; + Some(ElementBounds { + window, + bounds: Bounds::new(point(Points(x), Points(y)), Size::new(Points(w), Points(h))), + scale_factor, + }) +} + +/// The top-level window to own system UI that no element anchors (a +/// dialog's owner, a menu's window), from a function a module runs on the +/// main thread (`run_on_main_thread`): the surface's visible window the +/// user is in (the one with the focus, else the window the surface is in, +/// else another window of the app's own). `None` outside such a function +/// and when the surface shows in no visible window, where Windows would +/// show the UI ownerless. +/// +/// For owning and presenting system UI only: a module never changes, +/// re-parents, restyles or destroys a window NSH owns. +pub fn presenting_window() -> Option { + let surface = current()?; + let visible = |hwnd: &HWND| { + // SAFETY: a plain query; a stale handle is not visible. + !hwnd.is_invalid() && unsafe { IsWindowVisible(*hwnd) }.as_bool() + }; + if let Some(focused) = crate::app_window::focused_hwnd(&surface).filter(visible) { + return Some(focused); + } + let own = surface.hwnd(); + if !own.is_invalid() { + // SAFETY: a plain query on a window of this thread. + let top = unsafe { GetAncestor(own, GA_ROOT) }; + let top = if top.is_invalid() { own } else { top }; + if visible(&top) { + return Some(top); + } + } + crate::app_window::hwnds(&surface).into_iter().find(visible) +} + +/// The surface whose main-thread function runs now, while it lives. +fn current() -> Option> { + CURRENT.with_borrow(|current| current.as_ref()?.upgrade()) +} + +#[cfg(test)] +mod tests { + use std::{ + sync::Mutex, + time::{Duration, Instant}, + }; + + use nsh_core::{ROOT_ID, prelude::*}; + use nsh_engine::{EngineConfig, Environment}; + use windows::Win32::UI::WindowsAndMessaging::{ + DestroyWindow, DispatchMessageW, MSG, PM_REMOVE, PeekMessageW, SW_SHOWNOACTIVATE, + ShowWindow, TranslateMessage, + }; + + use super::*; + + /// What the main-thread function found. + #[derive(Debug, Clone, PartialEq)] + struct Seen { + /// The anchor's bounds, and whether its window is the surface's. + anchor: Option<(Bounds, bool)>, + /// The root's bounds. + root: Option>, + /// Whether the presenting window is the test's window. + presenting_is_window: bool, + /// Whether a node no view carries was found. + stray: bool, + } + + static SEEN: Mutex> = Mutex::new(None); + + /// A node no view carries. + const STRAY: NodeId = u32::MAX - 1; + + /// The test's window, as an integer: the main-thread function compares + /// it with what it finds. + static WINDOW: std::sync::atomic::AtomicIsize = std::sync::atomic::AtomicIsize::new(0); + + #[component] + fn Anchored() -> impl IntoElement { + let anchor = element_ref(); + spawn(async move { + // Laid out and mounted: two frames on. + next_frame().await; + next_frame().await; + let node = anchor.node().expect("the anchor is rendered"); + let _ = run_on_main_thread(move || { + let window = HWND(WINDOW.load(std::sync::atomic::Ordering::Acquire) as *mut _); + let anchor = element_bounds(node).map(|e| (e.bounds, e.window == window)); + let root = element_bounds(ROOT_ID).map(|e| e.bounds); + *SEEN.lock().unwrap() = Some(Seen { + anchor, + root, + presenting_is_window: presenting_window() == Some(window), + stray: element_bounds(STRAY).is_some(), + }); + }) + .await; + }); + view().size_full().child( + view() + .mt(px(30.0)) + .ml(px(20.0)) + .w(px(120.0)) + .h(px(40.0)) + .element_ref(&anchor), + ) + } + + fn pump() { + let mut msg = MSG::default(); + // SAFETY: dispatching messages taken from this thread's queue. + unsafe { + while PeekMessageW(&mut msg, None, 0, 0, PM_REMOVE).as_bool() { + let _ = TranslateMessage(&msg); + DispatchMessageW(&msg); + } + } + } + + /// A module's main-thread function finds where its element shows (in + /// the surface's window, at its layout box) and the root's bounds, the + /// surface's top-level window to present from, nothing for a node no + /// view carries, and nothing outside such a function. + #[test] + fn a_main_thread_function_finds_its_surfaces_elements() { + *SEEN.lock().unwrap() = None; + assert!(element_bounds(ROOT_ID).is_none()); + assert!(presenting_window().is_none()); + let surface = Surface::new(Environment::default()); + let hwnd = + crate::window::create(&surface, "NSH presenting", (320, 240), None, false).unwrap(); + WINDOW.store(hwnd.0 as isize, std::sync::atomic::Ordering::Release); + // Shown without taking the focus: the window to present from. + // SAFETY: the test's own window. + let _ = unsafe { ShowWindow(hwnd, SW_SHOWNOACTIVATE) }; + pump(); + surface.start(EngineConfig::new(nsh_engine::App::Rust( + nsh_core::element::Root::new::(|| ()), + ))); + let end = Instant::now() + Duration::from_secs(5); + let seen = loop { + if let Some(seen) = SEEN.lock().unwrap().clone() { + break seen; + } + assert!(Instant::now() < end, "the main-thread function never ran"); + pump(); + std::thread::sleep(Duration::from_millis(5)); + }; + surface.stop(); + // SAFETY: the test's own window. + let _ = unsafe { DestroyWindow(hwnd) }; + assert!(element_bounds(ROOT_ID).is_none()); + let at = + |x, y, w, h| Bounds::new(point(Points(x), Points(y)), Size::new(Points(w), Points(h))); + assert_eq!(seen.anchor, Some((at(20.0, 30.0, 120.0, 40.0), true))); + assert_eq!( + seen.root.map(|r| r.origin), + Some(point(Points(0.0), Points(0.0))) + ); + assert!(seen.presenting_is_window); + assert!(!seen.stray); + } +} diff --git a/third-party/nsh/crates/nsh-platform-windows/src/render.rs b/third-party/nsh/crates/nsh-platform-windows/src/render.rs index 02c63596239..2364227a30b 100644 --- a/third-party/nsh/crates/nsh-platform-windows/src/render.rs +++ b/third-party/nsh/crates/nsh-platform-windows/src/render.rs @@ -1927,13 +1927,8 @@ pub(crate) fn window_frame(surface: &Rc, frame: WindowFrame<'_>) -> boo return false; }; let resized = chain.size != (size.0.max(1), size.1.max(1)); - if let Err(err) = chain.resize(&gfx, size) { - log::error!("cannot resize a window's swap chain: {err}"); - *swap = None; - return false; - } - // As the main window's ([`frame`]): resized, it draws once its frame in - // flight is shown; otherwise it waits until its swap chain has room. + // Wait for the previous frame before replacing its buffers. If the + // compositor is busy, the old buffers stay available while we defer. let ready = if resized { chain.wait_ready() } else { @@ -1942,6 +1937,11 @@ pub(crate) fn window_frame(surface: &Rc, frame: WindowFrame<'_>) -> boo if !ready { return true; } + if let Err(err) = chain.resize(&gfx, size) { + log::error!("cannot resize a window's swap chain: {err}"); + *swap = None; + return false; + } if (target_scale.replace(scale) - scale).abs() > f32::EPSILON { chain.drop_target(); } @@ -1957,7 +1957,7 @@ pub(crate) fn window_frame(surface: &Rc, frame: WindowFrame<'_>) -> boo let backdrops = base.is_some_and(Composition::has_backdrops); let changed = damage .take() - .filter(|_| composition.is_none() && !backdrops) + .filter(|_| !resized && composition.is_none() && !backdrops) .map(|rects| merged(pixel_rects(&rects, scale, size))); if changed.as_ref().is_some_and(Vec::is_empty) && chain.shows_a_frame() { return false; diff --git a/third-party/nsh/crates/nsh-platform-windows/src/selectable_view.rs b/third-party/nsh/crates/nsh-platform-windows/src/selectable_view.rs index 84560e20b06..4714f2a50af 100644 --- a/third-party/nsh/crates/nsh-platform-windows/src/selectable_view.rs +++ b/third-party/nsh/crates/nsh-platform-windows/src/selectable_view.rs @@ -470,6 +470,14 @@ fn send(surface: &Surface, id: NodeId, selected: Selected) { surface.event(id, EventKind::SelectionChange, EventPayload::Map(fields)); } +/// `ref.selectAll()` on `view` (`Command::SelectAll`): selects every text +/// of the selectable view `view` is or is inside, as Ctrl+A does. +pub(crate) fn select_in(surface: &Surface, view: &NshView) { + if let Some(area) = area_of(view) { + select_all(surface.key(), &area); + } +} + /// `ref.clearSelection()` on `view` (`Command::ClearSelection`): ends the /// current area's selection when the area is `view`, inside it or around /// it. diff --git a/third-party/nsh/crates/nsh-platform-windows/src/shell.rs b/third-party/nsh/crates/nsh-platform-windows/src/shell.rs index 5e03080f7f9..c34129f5037 100644 --- a/third-party/nsh/crates/nsh-platform-windows/src/shell.rs +++ b/third-party/nsh/crates/nsh-platform-windows/src/shell.rs @@ -65,6 +65,8 @@ pub(crate) struct Attrs { pub(crate) taskbar: bool, /// `pointerEvents: "none"`. pub(crate) click_through: bool, + /// `pointerEvents: "box-none"` ([`crate::box_none`]). + pub(crate) box_none: bool, pub(crate) transparent: bool, pub(crate) backdrop: Backdrop, pub(crate) shadow: bool, @@ -93,6 +95,7 @@ impl Default for Attrs { level: WindowLevel::Normal, taskbar: true, click_through: false, + box_none: false, transparent: false, backdrop: Backdrop::None, shadow: true, @@ -145,6 +148,7 @@ impl Attrs { ); if let Some(pointer) = diff.pointer_events { self.click_through = pointer == WindowPointerEvents::None; + self.box_none = pointer == WindowPointerEvents::BoxNone; } } @@ -240,6 +244,10 @@ pub(crate) fn styles(kind: WindowKind, attrs: &Attrs, owned: bool) -> (u32, u32) // Clicks go to the windows below, of any process: only a layered // window's `WS_EX_TRANSPARENT` passes them on. ex |= WS_EX_LAYERED.0 | WS_EX_TRANSPARENT.0; + } else if attrs.box_none { + // Layered, so that `WS_EX_TRANSPARENT` passes presses on where it + // has no views ([`crate::box_none`] sets it). + ex |= WS_EX_LAYERED.0; } if attrs.taskbar && (owned || ex & WS_EX_TOOLWINDOW.0 != 0) { // In the taskbar although owned, or a tool window. @@ -660,6 +668,12 @@ pub(crate) fn sync(surface: &Surface, hwnd: HWND, before: Option, after: || b.maximizable != after.maximizable }); restyle(hwnd, shell, &after); + if changed(&|b| b.box_none != after.box_none) + && let Some(id) = crate::window::root_id(hwnd) + && let Some(surface) = crate::window::surface_of(hwnd) + { + crate::box_none::set(&surface, id, hwnd, after.box_none); + } if frame { crate::chrome::frame_changed(surface, hwnd); } @@ -714,11 +728,15 @@ fn restyle(hwnd: HWND, shell: &Shell, attrs: &Attrs) { // SAFETY: plain queries and calls on a live window of this thread. unsafe { let owned = GetWindow(hwnd, GW_OWNER).is_ok_and(|o| !o.is_invalid()); - let next = styles(shell.kind.get(), attrs, owned); + let mut next = styles(shell.kind.get(), attrs, owned); let current = ( GetWindowLongPtrW(hwnd, GWL_STYLE) as u32, GetWindowLongPtrW(hwnd, GWL_EXSTYLE) as u32, ); + if attrs.box_none { + // Where the cursor is decides it ([`crate::box_none`]). + next.1 |= current.1 & WS_EX_TRANSPARENT.0; + } let (mut style, ex) = restyled(current, next); if crate::window::is_full_screen(hwnd) { crate::window::set_windowed_style(hwnd, (style & STYLE_MASK) as isize); @@ -1166,6 +1184,26 @@ mod tests { assert_ne!(ex & WS_EX_APPWINDOW.0, 0); } + #[test] + fn a_box_none_window_is_layered_and_passes_where_the_cursor_says() { + let mut attrs = Attrs::of_kind(WindowKind::Popup); + let mut diff = WindowAttributes::default(); + diff.pointer_events = Some(WindowPointerEvents::BoxNone); + attrs.merge(&diff); + assert!(attrs.box_none && !attrs.click_through); + let (_, ex) = styles(WindowKind::Popup, &attrs, false); + // Layered, and passing presses on only when the cursor is over no + // view of its (`box_none`), not by its styles. + assert_ne!(ex & WS_EX_LAYERED.0, 0); + assert_eq!(ex & WS_EX_TRANSPARENT.0, 0); + // `auto` again: neither. + diff.pointer_events = Some(WindowPointerEvents::Auto); + attrs.merge(&diff); + assert!(!attrs.box_none); + let (_, ex) = styles(WindowKind::Popup, &attrs, false); + assert_eq!(ex & (WS_EX_LAYERED.0 | WS_EX_TRANSPARENT.0), 0); + } + #[test] fn restyling_keeps_the_windows_own_bits() { let current = ( @@ -1353,6 +1391,7 @@ mod tests { assert!(before.close_on_blur); assert!(!shell.attrs().close_on_blur); assert!(shell.attrs().click_through); + assert!(!shell.attrs().box_none); assert!(shell.attrs().custom_caption(), "a popup has no frame"); assert_eq!(caption_buttons(&shell.attrs()), vec![HTCLOSE]); assert_eq!( diff --git a/third-party/nsh/crates/nsh-platform-windows/src/surface.rs b/third-party/nsh/crates/nsh-platform-windows/src/surface.rs index bd46a684b85..314c63a81d6 100644 --- a/third-party/nsh/crates/nsh-platform-windows/src/surface.rs +++ b/third-party/nsh/crates/nsh-platform-windows/src/surface.rs @@ -1124,7 +1124,9 @@ impl Surface { self.events_handled.set(events); crate::text_input::engine_caught_up(self); } - Message::Run(task) => task.run(), + // A module's main-thread function: this surface is current + // while it runs (`crate::element_bounds`, `crate::presenting_window`). + Message::Run(task) => crate::presenting::run_for(Rc::downgrade(self), || task.run()), } false } @@ -1174,6 +1176,7 @@ impl Surface { } crate::access::batch_applied(self); crate::input::batch_applied(self); + crate::box_none::batch_applied(self); for command in notifications { crate::notifications::command(self, command); } diff --git a/third-party/nsh/crates/nsh-platform-windows/src/system.rs b/third-party/nsh/crates/nsh-platform-windows/src/system.rs index 95468eb5153..adb8294d76e 100644 --- a/third-party/nsh/crates/nsh-platform-windows/src/system.rs +++ b/third-party/nsh/crates/nsh-platform-windows/src/system.rs @@ -261,6 +261,8 @@ pub(crate) fn environment_applied(surface: &Surface) { crate::app_window::appearance_changed(surface); // Menus follow the scheme; the caption buttons are drawn again. crate::chrome::appearance_changed(surface); + // Web views follow the scheme (`prefers-color-scheme`). + crate::native::appearance_changed(surface); } /// `MountItem::Appearance`: the app forces light or dark (or follows the diff --git a/third-party/nsh/crates/nsh-platform-windows/src/text.rs b/third-party/nsh/crates/nsh-platform-windows/src/text.rs index d8d1b925ea1..b6ff1ac81c4 100644 --- a/third-party/nsh/crates/nsh-platform-windows/src/text.rs +++ b/third-party/nsh/crates/nsh-platform-windows/src/text.rs @@ -1078,8 +1078,12 @@ pub struct Prepared { /// The attachments' inline objects, in order. placeholders: Vec, spans: Vec, - /// The line box of text without spans. + /// The line box empty text falls back to: the root font's natural box, + /// or its strut box with a fixed `lineHeight`. base: (f32, f32), + /// The root paragraph's fixed strut box (`lineHeight`; `None`: none), + /// the minimum of every line. + strut: Option<(f32, f32)>, /// The attachments, in order. attachments: Vec, no_wrap: bool, @@ -1310,10 +1314,7 @@ impl DWriteTextEngine { /// The paragraph format of `t`. fn format(&self, t: &AttributedText, rtl: bool) -> Option { - let base = t - .spans - .first() - .map_or_else(ResolvedTextStyle::default, |s| s.style); + let base = t.paragraph_strut_or_first(); let face = self.face(&base); let custom = if face.custom { self.custom() } else { None }; let locale_name = t @@ -1498,8 +1499,7 @@ impl DWriteTextEngine { /// `start` to `end` (UTF-16): those of the spans in it (spans that only /// hold attachments there aside) and of its attachments. fn line_box(p: &Prepared, start: u32, end: u32) -> (f32, f32) { - let mut ascent = f32::NEG_INFINITY; - let mut descent = f32::NEG_INFINITY; + let (mut ascent, mut descent) = p.strut.unwrap_or((f32::NEG_INFINITY, f32::NEG_INFINITY)); let placeholders = |a: u32, b: u32| { p.attachments .iter() @@ -1514,7 +1514,9 @@ impl DWriteTextEngine { .partition_point(|s| s.end < start) .min(p.spans.len().saturating_sub(1)), ) { - (ascent, descent) = s.extents(); + let (up, down) = s.extents(); + ascent = ascent.max(up); + descent = descent.max(down); } } else { let first = p.spans.partition_point(|s| s.end <= start); @@ -1886,20 +1888,19 @@ impl TextEngine for DWriteTextEngine { } }) .collect(); - let base_style = t - .spans - .first() - .map_or_else(ResolvedTextStyle::default, |s| s.style); - let base = spans.first().map_or_else( - || { - let m = self.face(&base_style).metrics; - ( - m.ascent * base_style.font_size.0, - m.descent * base_style.font_size.0, - ) - }, - SpanBox::extents, - ); + let root_strut = t.paragraph_strut_or_first(); + let base = { + let m = self.face(&root_strut).metrics; + let size = root_strut.font_size.0; + let (ascent, descent) = (m.ascent * size, m.descent * size); + if root_strut.line_height.0 > 0.0 { + let half = (root_strut.line_height.0 - ascent - descent) / 2.0; + (ascent + half, descent + half) + } else { + (ascent, descent) + } + }; + let strut = (root_strut.line_height.0 > 0.0).then_some(base); let placeholders: Vec = t .attachments .iter() @@ -1933,6 +1934,7 @@ impl TextEngine for DWriteTextEngine { placeholders, spans, base, + strut, attachments: t .attachments .iter() @@ -1967,7 +1969,7 @@ impl TextEngine for DWriteTextEngine { cut, attributed: (cut || ellipsis && paragraphs).then(|| Box::new(t.clone())), lines: RefCell::default(), - base_size: base_style.font_size.0, + base_size: root_strut.font_size.0, ellipsis_width, } } @@ -4072,6 +4074,52 @@ mod tests { assert!(top + 15.0 < up, "{top} {up}"); } + /// The paragraph's fixed line height is its root strut's, not the line + /// height of a smaller inline span that happens to start the text. + #[test] + fn the_paragraph_line_height_is_the_root_struts() { + let root = ResolvedTextStyle { + font_size: px(14.0), + line_height: px(22.75), + ..Default::default() + }; + let small = ResolvedTextStyle { + font_size: px(12.6), + line_height: px(20.475), + ..Default::default() + }; + let make = |first_small| { + let mut t = if first_small { + text(&[("`code`", small), (" 中文正文", root)]) + } else { + text(&[("中文正文 ", root), ("`code`", small)]) + }; + t.paragraph_strut = Some(root); + t + }; + let engine = engine(); + let measure = |first_small| { + let t = make(first_small); + let prepared = engine.prepare(&t); + let size = engine.measure(&prepared, Some(px(300.0))); + let baseline = engine + .first_baseline(&prepared, px(300.0)) + .expect("a first line"); + (size.height.0, baseline.0) + }; + let small_first = measure(true); + let plain_first = measure(false); + assert!( + (small_first.0 - plain_first.0).abs() < 0.01, + "height: small first {small_first:?}, plain first {plain_first:?}" + ); + assert!( + (small_first.1 - plain_first.1).abs() < 0.01, + "baseline: small first {small_first:?}, plain first {plain_first:?}" + ); + assert!((plain_first.0 - 23.0).abs() < 0.01, "{plain_first:?}"); + } + /// A text's first baseline (what `align-items: baseline` lines it up /// by) is where its first line is drawn, wrapped or not, and grows /// with the font. diff --git a/third-party/nsh/crates/nsh-platform-windows/src/window.rs b/third-party/nsh/crates/nsh-platform-windows/src/window.rs index 23e4084d05c..5b8807f99e8 100644 --- a/third-party/nsh/crates/nsh-platform-windows/src/window.rs +++ b/third-party/nsh/crates/nsh-platform-windows/src/window.rs @@ -1336,6 +1336,10 @@ fn handle( return Some(DefWindowProcW(hwnd, original, wparam, lparam)); } } + // The window's menu bar goes with it, whichever window it is. + if msg == WM_DESTROY { + crate::chrome::window_destroyed(surface, hwnd); + } // What the app's window API asks of a top-level window: its limits, // policies and state. if (data.top_level || data.window.is_some()) @@ -1415,7 +1419,7 @@ fn handle( // `WM_UAHDRAWMENU`, `WM_UAHDRAWMENUITEM`: the menu bar. 0x0091 | 0x0092 => return crate::chrome::draw_menu_bar(surface, hwnd, msg, lparam), WM_COMMAND if (wparam.0 >> 16) & 0xFFFF == 0 && lparam.0 == 0 => { - crate::chrome::menu_command(surface, (wparam.0 & 0xFFFF) as u16); + crate::chrome::menu_command(surface, hwnd, (wparam.0 & 0xFFFF) as u16); return Some(LRESULT(0)); } WM_NSH_PAINT => { @@ -1471,7 +1475,7 @@ fn handle( }; } sync_size(surface, hwnd); - crate::chrome::dpi_changed(surface); + crate::chrome::dpi_changed(surface, hwnd); crate::tray::refresh(hwnd); crate::window_state::displays_changed(surface); } @@ -1701,6 +1705,7 @@ fn handle( WM_WINDOWPOSCHANGED if data.top_level => { crate::window_state::report_main(surface); crate::system::lifecycle_changed(surface); + crate::box_none::shown_or_hidden(hwnd); } // An embedded surface's: its root window's ([`observe_root`]). WM_NSH_ROOT => crate::system::lifecycle_changed(surface), @@ -1728,6 +1733,7 @@ fn handle( } WM_DESTROY => { surface.activation_changed(false); + crate::box_none::forget(hwnd); crate::window_close::destroyed(surface); crate::tray::destroyed(hwnd); crate::global_shortcut::destroyed(hwnd); @@ -1781,27 +1787,34 @@ fn window_api( } WM_SIZING => { let attrs = shell.attrs(); - let ratio = attrs.aspect_ratio?; // SAFETY: `lparam` is the drag's RECT, which the handler may change. let rect = unsafe { &mut *(lparam.0 as *mut RECT) }; - let scale = dpi(hwnd) as f32 / 96.0; - let (l, t, r, b) = frame_extents(hwnd); - let extra = (l + r, t + b); - let limits = crate::shell::track_sizes(&attrs, scale, extra); - let (left, top, right, bottom) = crate::shell::aspect_sizing( - (rect.left, rect.top, rect.right, rect.bottom), - wparam.0 as u32, - ratio, - extra, - limits, - ); - *rect = RECT { - left, - top, - right, - bottom, - }; - Some(Some(LRESULT(1))) + let result = attrs.aspect_ratio.map(|ratio| { + let scale = dpi(hwnd) as f32 / 96.0; + let (l, t, r, b) = frame_extents(hwnd); + let extra = (l + r, t + b); + let limits = crate::shell::track_sizes(&attrs, scale, extra); + let (left, top, right, bottom) = crate::shell::aspect_sizing( + (rect.left, rect.top, rect.right, rect.bottom), + wparam.0 as u32, + ratio, + extra, + limits, + ); + *rect = RECT { + left, + top, + right, + bottom, + }; + Some(LRESULT(1)) + }); + if attrs.frameless() + && let Some(id) = data.window + { + crate::app_window::prepare_resize(surface, id, *rect); + } + result } WM_SYSCOMMAND => { let command = (wparam.0 & 0xFFF0) as u32; @@ -1864,6 +1877,7 @@ fn window_api( // Shown, hidden, minimized or restored: the app's state // follows its own windows (the host never shows). crate::system::lifecycle_changed(surface); + crate::box_none::shown_or_hidden(hwnd); } None } @@ -2480,6 +2494,13 @@ impl Drop for Ticker { } } +/// The root node of the window `hwnd` is: one of the app's own, or the +/// surface's own top-level window (`ROOT_ID`); none for an embedded one. +pub(crate) fn root_id(hwnd: HWND) -> Option { + let data = data(hwnd)?; + data.window.or(data.top_level.then_some(ROOT_ID)) +} + /// The surface window `hwnd` (its own or one of the app's own) is of /// (other modules' window procedures, tests, the test agent). #[allow(dead_code)] diff --git a/third-party/nsh/crates/nsh-testing/Cargo.toml b/third-party/nsh/crates/nsh-testing/Cargo.toml index 5df18cedce1..d8e35bfa2a9 100644 --- a/third-party/nsh/crates/nsh-testing/Cargo.toml +++ b/third-party/nsh/crates/nsh-testing/Cargo.toml @@ -24,8 +24,9 @@ live = ["dep:ureq"] agent = ["dep:nsh-dev", "dep:serde", "dep:serde_json", "dep:base64"] # `nsh test`'s side: the `nsh/test` module, test files on an engine of their # own (`run_file`) and apps' headless runners (`runner`): QuickJS, which also -# runs the web page's host module (`page_host`). -js = ["live", "nsh-engine/js", "dep:nsh-dev", "dep:base64", "dep:dunce", "dep:rquickjs", "dep:serde", "dep:serde_json", "dep:tokio"] +# runs the web page's host module (`page_host`). With the global `WebSocket`, +# which test files and apps use whether or not they import `websocket`. +js = ["live", "nsh-engine/js", "nsh-engine/websocket", "dep:nsh-dev", "dep:base64", "dep:dunce", "dep:rquickjs", "dep:serde", "dep:serde_json", "dep:tokio"] # Building entries in this process (`compile_tsx`, `tsx`, `compiler`): nsh's # bundler. Off in apps' headless runners, which `nsh` builds the entries for. bundle = ["js", "dep:nsh-bundler", "dep:nsh-js"] diff --git a/third-party/nsh/crates/nsh-testing/src/agent.rs b/third-party/nsh/crates/nsh-testing/src/agent.rs index 4e22ec39b69..0dd6dcef9cf 100644 --- a/third-party/nsh/crates/nsh-testing/src/agent.rs +++ b/third-party/nsh/crates/nsh-testing/src/agent.rs @@ -15,6 +15,11 @@ //! app's own waiting to show for 100 ms, 2 s at most. [`Native`]'s calls //! come from that thread; implementations do their work on the main thread //! and return when it is done. +//! +//! `nsh test --attach` takes the same steps on the app of a development +//! session that runs already (`nsh run`, `nsh dev`): a host that takes them +//! keeps its model in every such session ([`Tester::with_attach`]), so the +//! steps find the views the app shows however long it ran. use std::{ sync::{Arc, Condvar, Mutex, MutexGuard}, @@ -153,10 +158,15 @@ struct State { batches: u64, /// When the last one was. last: Option, - /// What the app threw since the last step looked. + /// What the app threw since the last step looked: the latest + /// [`KEPT_ERRORS`], as a development session's app may run long + /// without a step looking. errors: Vec, } +/// How many of the app's errors a [`Model`] keeps for the next step. +const KEPT_ERRORS: usize = 64; + impl Model { /// Takes in a batch the host applied (on its main thread, after /// applying it). @@ -183,7 +193,12 @@ impl Model { /// The app threw `message` (an exception that escaped a callback, a /// bundle that did not load): the step taken meanwhile fails with it. pub fn error(&self, message: impl Into) { - self.lock().errors.push(message.into()); + let mut state = self.lock(); + if state.errors.len() == KEPT_ERRORS { + state.errors.remove(0); + } + state.errors.push(message.into()); + drop(state); self.changed.notify_all(); } @@ -333,10 +348,19 @@ impl Model { /// The engine [`Model::set_up_engine`] set up started: the test moves /// its clock through it. pub fn engine_started(&self, engine: nsh_engine::EngineControl) { - // Steps reach every view of a page, below its fold too, as the - // headless driver's do. - engine.set_content_culling(false); + // The views of the app it replaced are gone: an app reloaded in a + // development session starts on a fresh screen, in the same window. + { + let mut state = self.lock(); + if state.batches > 0 { + state.screen = state.screen.restarted(); + } + } if let Some(setup) = &mut *self.setup.lock().unwrap_or_else(|e| e.into_inner()) { + // A test's steps reach every view of a page, below its fold + // too, as the headless driver's do; an attached session leaves + // the app as it runs. + engine.set_content_culling(false); setup.engine = Some(engine); } } @@ -1489,6 +1513,11 @@ impl Worker { } } +/// What attaches a [`Model`] to the host's surface and makes the platform's +/// [`Native`] ([`Tester`]). +#[cfg(not(target_arch = "wasm32"))] +type KeepModel = dyn Fn(std::sync::Arc) -> Box + Send + Sync; + #[cfg(not(target_arch = "wasm32"))] /// A dev host's test session: when the server says it runs one /// ([`nsh_dev::DevEvent::Testing`]), it makes the app's [`Model`] and the @@ -1496,7 +1525,10 @@ impl Worker { /// before the first bundle comes) and takes the steps that follow on a /// [`Worker`], answering each through the dev client. pub struct Tester { - start: Box) -> Box + Send + Sync>, + start: Box, + /// What attaches the model to the surface in a development session + /// `nsh test --attach` may drive ([`Tester::with_attach`]). + attach: Option>, /// Shared with the closures that answer: the dev client's thread makes /// them, maybe before the thread that started it sets the client. client: Arc>>, @@ -1513,6 +1545,27 @@ impl Tester { ) -> std::sync::Arc { std::sync::Arc::new(Tester { start: Box::new(start), + attach: None, + client: Arc::default(), + worker: Mutex::new(None), + model: Mutex::new(None), + }) + } + + /// A host's tester that takes the steps of `nsh test --attach` in a + /// development session too ([`nsh_dev::DevEvent::Attachable`]): there + /// `attach` (on the dev client's thread) attaches the model to the + /// surface before the first bundle comes, as `start` does in a test + /// session, but leaves the app as it runs: no test drives it, so the + /// user's own input and the platform's settings stay as they are. The + /// host says it takes them ([`nsh_dev::HostInfo::attach`]). + pub fn with_attach( + start: impl Fn(std::sync::Arc) -> Box + Send + Sync + 'static, + attach: impl Fn(std::sync::Arc) -> Box + Send + Sync + 'static, + ) -> std::sync::Arc { + std::sync::Arc::new(Tester { + start: Box::new(start), + attach: Some(Box::new(attach)), client: Arc::default(), worker: Mutex::new(None), model: Mutex::new(None), @@ -1530,7 +1583,11 @@ impl Tester { /// back the others. pub fn event(&self, event: nsh_dev::DevEvent) -> Option { match event { - nsh_dev::DevEvent::Testing => self.start(), + nsh_dev::DevEvent::Testing => self.start(&*self.start), + nsh_dev::DevEvent::Attachable => match &self.attach { + Some(attach) => self.start(&**attach), + None => log::warn!("the dev server offers attached steps this host does not take"), + }, nsh_dev::DevEvent::Step { id, step } => self.take(id, step), nsh_dev::DevEvent::TestSetup { storage, @@ -1570,14 +1627,16 @@ impl Tester { self.model.lock().unwrap_or_else(|e| e.into_inner()).clone() } - fn start(&self) { + /// Makes the app's model and the worker taking its steps, once: + /// `start` attaches the model to the surface. + fn start(&self, start: &KeepModel) { let mut worker = self.worker.lock().unwrap_or_else(|e| e.into_inner()); if worker.is_some() { return; } let model = std::sync::Arc::new(Model::default()); *self.model.lock().unwrap_or_else(|e| e.into_inner()) = Some(model.clone()); - let native = (self.start)(model.clone()); + let native = start(model.clone()); let client = self.client.clone(); let started = Worker::spawn(Agent::new(model, native), move |id, outcome| { if let Some(client) = client.wait().upgrade() { @@ -1881,7 +1940,7 @@ impl Agent { serde_json::to_value(self.scene.view_style(&selector)?).map_err(|e| e.to_string()) } TestStep::Layout { selector } => { - serde_json::to_value(self.scene.layout(&selector)?).map_err(|e| e.to_string()) + serde_json::to_value(self.layout(&selector)?).map_err(|e| e.to_string()) } TestStep::Accessibility { selector } => { serde_json::to_value(self.scene.accessibility(selector.as_deref())?) @@ -2104,6 +2163,41 @@ impl Agent { self.find_at(selector, what, target, None) } + /// Where the view `selector` names is ([`Scene::layout`]), placed + /// where the platform shows it when it is inside a scroll view. The + /// scene knows only the scrolls the core asked for; one the native + /// scroll view made itself (a wheel, a finger, [`Native::scroll`], the + /// content kept in place as rows above it go) moves the view on screen + /// alone, so its place and whether its scroll views cut it come from + /// the platform's views. + fn layout(&self, selector: &str) -> Result, String> { + let Some(mut layout) = self.scene.layout(selector)? else { + return Ok(None); + }; + let Pick::One(id) = self.scene.pick(selector, PickTarget::View)? else { + return Ok(Some(layout)); + }; + let scrollers = self.scene.scroll_ancestors(id)?; + if scrollers.is_empty() { + return Ok(Some(layout)); + } + let Some(bounds) = self.native.bounds(id) else { + return Ok(Some(layout)); + }; + let bounds = Bounds::new( + bounds.origin, + Size::new(Points(layout.width), Points(layout.height)), + ); + layout.x = bounds.origin.x.0; + layout.y = bounds.origin.y.0; + layout.clipped = scrollers.iter().any(|&(scroller, _)| { + self.native + .bounds(scroller) + .is_some_and(|b| b.intersect(&bounds) != bounds) + }); + Ok(Some(layout)) + } + /// [`Agent::find`] for a press at `position` in the view `selector` /// names (its top left corner), else where a tap lands. fn find_at( @@ -3316,6 +3410,43 @@ mod tests { ); } + #[test] + fn layout_places_a_view_where_its_natively_scrolled_scroll_view_shows_it() { + use nsh_core::{MountItem, ViewProps}; + // The scroll view was scrolled down 200 points natively (a wheel, a + // finger): the scene still has it at its top. + let layout = |target: f32| { + let model = page_model(); + let props = ViewProps { + test_id: Some("row".into()), + ..ViewProps::default() + }; + let frame = Bounds::new(point(px(0.0), px(target)), size(px(320.0), px(40.0))); + model.apply(&MountBatch { + items: vec![ + MountItem::ViewProps { + id: 4, + props: Box::new(props), + }, + MountItem::Frame { id: 4, frame }, + ], + }); + let page = Page { + offset: Mutex::new(200.0), + target, + ..Page::default() + }; + let agent = Agent::new(model, Box::new(page)); + let layout = agent.layout("id:row").unwrap().unwrap(); + (layout.y, layout.clipped) + }; + // 600 points down its content, it shows 400 points down the window, + // inside the scroll view. + assert_eq!(layout(600.0), (400.0, false)); + // Scrolled past, it is cut. + assert_eq!(layout(100.0), (-100.0, true)); + } + #[test] fn a_view_left_under_a_header_fails_the_step_instead_of_pressing_the_header() { let ok = StepOutcome::Done { @@ -4516,12 +4647,12 @@ mod tests { let (tests, (set_up, is_set_up)) = (tester.clone(), std::sync::mpsc::channel()); let client = DevClient::start( format!("ws://{}{WS_PATH}", server.local_addr()), - HostInfo { - device: "tester".into(), - platform: HostPlatform::MacOs, - bytecode_version: "bc".into(), - ui_sets: Vec::new(), - tests: true, + { + let mut host = HostInfo::new(HostPlatform::MacOs); + host.device = "tester".into(); + host.bytecode_version = "bc".into(); + host.tests = true; + host }, move |event| { let setup = matches!(event, DevEvent::TestSetup { .. }); diff --git a/third-party/nsh/crates/nsh-testing/src/driver.rs b/third-party/nsh/crates/nsh-testing/src/driver.rs index ee5ed28955b..c6764f5185a 100644 --- a/third-party/nsh/crates/nsh-testing/src/driver.rs +++ b/third-party/nsh/crates/nsh-testing/src/driver.rs @@ -136,16 +136,6 @@ pub(crate) trait Driver: Send { let _ = url; Err(headless_only("failOpenUrls")) } - /// The platform shows a share sheet, and the user answers every share - /// with `outcome` (`onShare`). - fn on_share(&mut self, outcome: nsh_core::share::ShareOutcome) -> Result<(), String> { - let _ = outcome; - Err(headless_only("onShare")) - } - /// What the app shared, in order (`shares()`). - fn shares(&mut self) -> Result, String> { - Err(headless_only("`shares()`")) - } fn run_for(&mut self, time: Duration) -> Result<(), String>; fn fast_forward(&mut self, time: Duration) -> Result<(), String>; fn set_system_time(&mut self, at: std::time::SystemTime) -> Result<(), String>; @@ -363,13 +353,6 @@ impl Driver for Headless { fn fail_open_urls(&mut self, url: &str) -> Result<(), String> { Headless::fail_open_urls(self, url) } - fn on_share(&mut self, outcome: nsh_core::share::ShareOutcome) -> Result<(), String> { - Headless::on_share(self, outcome) - } - fn shares(&mut self) -> Result, String> { - self.catch_up(); - Ok(self.screen().shares().to_vec()) - } fn open_with_url(&mut self, url: &str) -> Result<(), String> { Headless::open_with_url(self, url) } diff --git a/third-party/nsh/crates/nsh-testing/src/failure.rs b/third-party/nsh/crates/nsh-testing/src/failure.rs index cd49bd83966..0ca33ba06ee 100644 --- a/third-party/nsh/crates/nsh-testing/src/failure.rs +++ b/third-party/nsh/crates/nsh-testing/src/failure.rs @@ -81,6 +81,16 @@ pub(crate) fn unsupported(entry: &str, option: &str, target: &str, why: &str) -> format!("open({entry:?}): `{option}` is unsupported on --target {target}: {why}") } +/// `open(entry)` was given `option`, which sets an app up, under `nsh test +/// --attach`, which drives a running app as it is. +#[cfg(feature = "js")] +pub(crate) fn unsupported_attached(entry: &str, option: &str) -> String { + format!( + "open({entry:?}): `{option}` is unsupported with --attach: it sets an app up, and the app \ + of a running development session is driven as it is; open it without options" + ) +} + /// What a test app's sockets and WebSockets fail with (`net.connect`, /// `WebSocket.connect`; the global `WebSocket` fires `error` and `close`) /// while its test keeps it off the network: `open`'s `network` other than @@ -266,7 +276,9 @@ pub(crate) fn code_of(message: &str) -> Option<&'static str> { Some(TIMED_OUT) } else if message.starts_with(NOTHING_TO_GO_BACK_FROM) { Some(NO_BACK) - } else if message.starts_with("open(") && message.contains("` is unsupported on --target ") + } else if message.starts_with("open(") + && (message.contains("` is unsupported on --target ") + || message.contains("` is unsupported with --attach: ")) || quoted && message.contains("` is unsupported here: ") { Some(UNSUPPORTED) diff --git a/third-party/nsh/crates/nsh-testing/src/headless/mod.rs b/third-party/nsh/crates/nsh-testing/src/headless/mod.rs index 547e0cf45b0..486b7206939 100644 --- a/third-party/nsh/crates/nsh-testing/src/headless/mod.rs +++ b/third-party/nsh/crates/nsh-testing/src/headless/mod.rs @@ -379,13 +379,6 @@ pub struct Headless { picks: Picks, /// The color the user picks on the screen ([`Headless::on_screen_color`]). screen_color: Option, - /// How the user answers the share sheet ([`Headless::on_share`]); - /// `None`: never (a sheet the platform never answers, in this crate's - /// tests). - share: Option, - /// How the user ends the web sign-in sessions - /// ([`Headless::on_auth_session`]); `None`: never. - auth_session: Option, /// The paths the user picks in the open dialog /// ([`Headless::on_pick_paths`]). picked_paths: Vec, @@ -634,8 +627,6 @@ impl Headless { dialogs: Dialogs::Default, picks: Picks::Default, screen_color: None, - share: Some(nsh_core::share::ShareOutcome::dismissed()), - auth_session: Some(nsh_core::auth_session::AuthSessionOutcome::Cancelled), picked_paths: Vec::new(), save_path: None, failing_images: Vec::new(), @@ -1015,50 +1006,6 @@ impl Headless { self.set_environment("onScreenColor", |env| env.screen_color = true) } - /// The platform shows a share sheet - /// ([`nsh_core::platform::Environment::share`]), and the user answers - /// every share the app shows (`Share.show`, [`nsh_core::element::share`]) - /// with `outcome`: shared (to a target, if it names one) or dismissed. - /// What the app shares is recorded ([`Screen::shares`]). Then waits - /// until the app is quiet. - pub fn on_share(&mut self, outcome: nsh_core::share::ShareOutcome) -> Result<(), String> { - let what = format!("onShare({})", outcome.action.as_str()); - self.share = Some(outcome); - self.set_environment(&what, |env| env.share = true) - } - - /// The platform shows web sign-in sessions in the app - /// ([`nsh_core::platform::Environment::auth_session`], as iOS does), and - /// the user ends every session the app opens - /// ([`nsh_core::element::open_auth_session`]) with `outcome`: a callback - /// URL or a cancellation. What the app opens is recorded - /// ([`Screen::auth_sessions`]). Then waits until the app is quiet. - /// - /// Without it, as on desktops, a session opens the page as `open_url` - /// does ([`Screen::opened_urls`]) and ends with a link of its callback - /// scheme ([`Headless::open_with_url`]); on the web, or with - /// [`field@nsh_core::platform::Environment::scheme_links`] `Some(false)`, - /// where no such link comes, it fails at once. - pub fn on_auth_session( - &mut self, - outcome: nsh_core::auth_session::AuthSessionOutcome, - ) -> Result<(), String> { - let what = format!("onAuthSession({outcome:?})"); - self.auth_session = Some(outcome); - self.set_environment(&what, |env| env.auth_session = true) - } - - /// The platform shows web sign-in sessions in the app, as - /// [`Headless::on_auth_session`] does, but the user ends none of them: - /// each stays open until the app closes it - /// ([`nsh_core::element::close_auth_session`]) or opens another - /// ([`Screen::auth_session_showing`]). Then waits until the app is - /// quiet. - pub fn keep_auth_sessions_open(&mut self) -> Result<(), String> { - self.auth_session = None; - self.set_environment("keepAuthSessionsOpen", |env| env.auth_session = true) - } - /// The platform has file dialogs, a file manager and a trash /// ([`nsh_core::platform::Environment::file_requests`]), and the user /// picks `paths` whenever the app shows the open dialog (`pick_paths`; @@ -1240,6 +1187,10 @@ impl Headless { id, command: Command::ClearSelection, } => self.clear_selection_in(*id), + MountItem::Command { + id, + command: Command::SelectAll, + } => self.select_all_in(*id), MountItem::Command { id: ROOT_ID, command: Command::SetAppUrl(url), @@ -1360,17 +1311,6 @@ impl Headless { } control.dispatch_event(ROOT_ID, EventKind::ScreenColor, EventPayload::Map(fields)); } - for id in self.screen.take_share_answers() { - if let Some(outcome) = &self.share { - control.dispatch_event(ROOT_ID, EventKind::Share, outcome.payload(id)); - } - } - for id in self.screen.take_auth_session_answers() { - if let Some(outcome) = &self.auth_session { - control.dispatch_event(ROOT_ID, EventKind::AuthSession, outcome.payload(id)); - self.screen.auth_session_ended(id); - } - } for (id, request) in self.screen.take_file_answers() { use nsh_core::file_dialog::FileRequest; let paths = match request { @@ -3676,244 +3616,6 @@ mod tests { ); } - /// Shares a link and shows how the share ended. - #[component] - fn Sharing() -> impl IntoElement { - let result = signal(String::from("nothing")); - let share_link = move |_: &()| { - let shared = share( - nsh_core::share::ShareRequest::new() - .title("Docs") - .url("https://example.com/docs"), - ); - spawn(async move { - result.set(match shared.await { - Ok(outcome) => match outcome.target { - Some(target) => format!("{} {target}", outcome.action.as_str()), - None => outcome.action.as_str().to_owned(), - }, - Err(error) => error.code.unwrap_or_default(), - }) - }); - }; - view() - .child(text(move || result.get())) - .child(text("Share").on_press(share_link)) - } - - #[test] - fn a_test_answers_the_share_sheet() { - let mut app = - Headless::start(EngineConfig::new(crate::windowed_root::())).unwrap(); - app.first_render().unwrap(); - // No share sheet until the test gives the platform one. - app.press("Share").unwrap(); - app.wait_for("text:ERR_FEATURE_UNAVAILABLE_ON_PLATFORM") - .unwrap(); - assert!(app.screen().shares().is_empty()); - - app.on_share(nsh_core::share::ShareOutcome::shared(Some("mail".into()))) - .unwrap(); - app.press("Share").unwrap(); - app.wait_for("text:shared mail").unwrap(); - app.on_share(nsh_core::share::ShareOutcome::dismissed()) - .unwrap(); - app.press("Share").unwrap(); - app.wait_for("text:dismissed").unwrap(); - let shares = app.screen().shares(); - assert_eq!(shares.len(), 2); - assert_eq!(shares[0].url.as_deref(), Some("https://example.com/docs")); - assert_eq!(shares[0].title.as_deref(), Some("Docs")); - assert_eq!(shares[0].anchor, None); - } - - #[test] - fn a_share_never_answered_does_not_hold_the_next_back() { - let mut app = - Headless::start(EngineConfig::new(crate::windowed_root::())).unwrap(); - app.first_render().unwrap(); - app.on_share(nsh_core::share::ShareOutcome::shared(None)) - .unwrap(); - // The platform loses the first sheet's answer. - app.share = None; - app.press("Share").unwrap(); - app.wait_for("text:nothing").unwrap(); - assert_eq!(app.screen().shares().len(), 1); - // The next share still reaches the platform, and the first ends as - // dismissed. - app.press("Share").unwrap(); - app.wait_for("text:dismissed").unwrap(); - assert_eq!(app.screen().shares().len(), 2); - app.share = Some(nsh_core::share::ShareOutcome::shared(Some("mail".into()))); - app.press("Share").unwrap(); - app.wait_for("text:shared mail").unwrap(); - assert_eq!(app.screen().shares().len(), 3); - } - - /// Opens a sign-in session ending with a `demo:` callback (closes it) - /// and shows how it ended; the links the app hears otherwise show - /// after it. - #[component] - fn SigningIn() -> impl IntoElement { - let result = signal(String::from("nothing")); - spawn(async move { - loop { - let link = next_url_scheme_open().await; - result.set(format!("link {link}")); - } - }); - let sign_in = move |_: &()| { - let session = open_auth_session( - nsh_core::auth_session::AuthSessionRequest::new( - "https://example.com/authorize", - "demo", - ) - .ephemeral(true), - ); - spawn(async move { - use nsh_core::auth_session::AuthSessionOutcome; - result.set(match session.await { - Ok(AuthSessionOutcome::Completed(url)) => format!("signed in {url}"), - Ok(_) => "cancelled".into(), - Err(error) => error.code.unwrap_or(error.message), - }) - }); - }; - view() - .child(text(move || result.get())) - .child(text("Sign in").on_press(sign_in)) - .child(text("Close").on_press(|_: &()| close_auth_session())) - } - - #[test] - fn a_test_ends_the_in_app_sign_in_session() { - use nsh_core::auth_session::AuthSessionOutcome; - let mut app = Headless::start(EngineConfig::new(Root::of::())).unwrap(); - app.first_render().unwrap(); - app.on_auth_session(AuthSessionOutcome::Completed("demo://done?code=7".into())) - .unwrap(); - app.press("Sign in").unwrap(); - app.wait_for("text:signed in demo://done?code=7").unwrap(); - app.on_auth_session(AuthSessionOutcome::Cancelled).unwrap(); - app.press("Sign in").unwrap(); - app.wait_for("text:cancelled").unwrap(); - let sessions = app.screen().auth_sessions(); - assert_eq!(sessions.len(), 2); - assert_eq!(sessions[0].url, "https://example.com/authorize"); - assert_eq!(sessions[0].callback_scheme, "demo"); - assert!(sessions[0].ephemeral); - // The page opened in the app, not in the browser. - assert!(app.screen().opened_urls().is_empty()); - } - - #[test] - fn without_an_in_app_session_the_callback_link_ends_it() { - let root = || Root::of::().url_schemes(["demo"]); - let mut app = Headless::start(EngineConfig::new(root())).unwrap(); - app.first_render().unwrap(); - app.press("Sign in").unwrap(); - assert_eq!( - app.screen().opened_urls(), - ["https://example.com/authorize"] - ); - app.wait_for("text:nothing").unwrap(); - // The callback is the session's answer, not a link the app hears. - app.open_with_url("demo://done?code=8").unwrap(); - app.wait_for("text:signed in demo://done?code=8").unwrap(); - app.open_with_url("demo://later").unwrap(); - app.wait_for("text:link demo://later").unwrap(); - // A second session replaces one never answered. - app.press("Sign in").unwrap(); - app.press("Sign in").unwrap(); - app.wait_for("text:cancelled").unwrap(); - // A browser that does not open fails it. - app.fail_open_urls("https://example.com/authorize").unwrap(); - app.press("Sign in").unwrap(); - app.wait_for("text:openAuthSession: the browser did not open the sign-in page") - .unwrap(); - - // Nothing brings a callback of a scheme the app does not claim back. - let mut app = Headless::start(EngineConfig::new(Root::of::())).unwrap(); - app.first_render().unwrap(); - app.press("Sign in").unwrap(); - app.wait_for("text:ERR_FEATURE_UNAVAILABLE_ON_PLATFORM") - .unwrap(); - assert!(app.screen().opened_urls().is_empty()); - } - - #[test] - fn where_no_link_of_the_apps_schemes_comes_the_session_fails_at_once() { - let start = |os: Os, scheme_links: Option| { - let mut config = EngineConfig::new(Root::of::().url_schemes(["demo"])); - config.environment.os = os; - config.environment.scheme_links = scheme_links; - let mut app = Headless::start(config).unwrap(); - app.first_render().unwrap(); - app - }; - // The app claims `demo`: only the missing links can refuse it. - let refused = "text:ERR_FEATURE_UNAVAILABLE_ON_PLATFORM"; - // The web hears only its page's address: the claimed scheme's link - // never comes, so the session fails instead of waiting forever. - let mut app = start(Os::Web, None); - app.press("Sign in").unwrap(); - app.wait_for(refused).unwrap(); - assert!(app.screen().opened_urls().is_empty()); - // The same where the platform says it hears none, whatever the OS - // (the GPUI and terminal backends). - let mut app = start(Os::Ios, Some(false)); - app.press("Sign in").unwrap(); - app.wait_for(refused).unwrap(); - assert!(app.screen().opened_urls().is_empty()); - // A platform that says it hears them waits for the callback. - let mut app = start(Os::Web, Some(true)); - app.press("Sign in").unwrap(); - assert_eq!( - app.screen().opened_urls(), - ["https://example.com/authorize"] - ); - app.open_with_url("demo://done?code=9").unwrap(); - app.wait_for("text:signed in demo://done?code=9").unwrap(); - // A session the platform shows itself needs no link. - let mut app = start(Os::Web, None); - app.on_auth_session(nsh_core::auth_session::AuthSessionOutcome::Completed( - "demo://done?code=10".into(), - )) - .unwrap(); - app.press("Sign in").unwrap(); - app.wait_for("text:signed in demo://done?code=10").unwrap(); - } - - #[test] - fn the_app_closes_its_sign_in_session() { - let mut app = Headless::start(EngineConfig::new(Root::of::())).unwrap(); - app.first_render().unwrap(); - // With no session waiting, closing does nothing. - app.press("Close").unwrap(); - app.wait_for("text:nothing").unwrap(); - app.keep_auth_sessions_open().unwrap(); - app.press("Sign in").unwrap(); - assert_eq!(app.screen().auth_sessions().len(), 1); - assert!(app.screen().auth_session_showing()); - app.wait_for("text:nothing").unwrap(); - // Closed: answered as cancelled, and off the screen. - app.press("Close").unwrap(); - app.wait_for("text:cancelled").unwrap(); - assert!(!app.screen().auth_session_showing()); - - // In the system browser, the session ends as cancelled too; the - // callback link that comes later is an ordinary link. - let root = || Root::of::().url_schemes(["demo"]); - let mut app = Headless::start(EngineConfig::new(root())).unwrap(); - app.first_render().unwrap(); - app.press("Sign in").unwrap(); - app.press("Close").unwrap(); - app.wait_for("text:cancelled").unwrap(); - app.open_with_url("demo://done?code=9").unwrap(); - app.wait_for("text:link demo://done?code=9").unwrap(); - assert!(app.screen().auth_sessions().is_empty()); - } - #[test] fn steps_press_what_a_text_is_in_and_wait_for_what_it_shows() { let mut app = Headless::start(EngineConfig::new(crate::windowed_root::())).unwrap(); diff --git a/third-party/nsh/crates/nsh-testing/src/headless/selection.rs b/third-party/nsh/crates/nsh-testing/src/headless/selection.rs index 065ab09a35f..63205aff6b9 100644 --- a/third-party/nsh/crates/nsh-testing/src/headless/selection.rs +++ b/third-party/nsh/crates/nsh-testing/src/headless/selection.rs @@ -303,6 +303,29 @@ impl Headless { } } + /// `ref.selectAll()` on view `id`: selects every text of the + /// selectable view `id` is or is inside, as the backends' Select All. + pub(super) fn select_all_in(&mut self, id: NodeId) { + let Some(area) = self.screen.selection_area(id) else { + return; + }; + if self.selection.as_ref().map(|s| s.area) != Some(area) { + self.clear_selection(); + } + let texts = self.area_texts(area); + let selection = self.selection.get_or_insert_with(|| AreaSelection { + area, + model: SelectionModel::new(), + dragging: false, + over_press: false, + reported: Selected::default(), + kept: KeptRows::default(), + }); + selection.model.texts_changed(&texts); + selection.model.select_all(&texts); + self.report_area_selection(&texts); + } + /// Clears the selection; its view hears it if it heard of one. fn clear_selection(&mut self) { let Some(mut selection) = self.selection.take() else { diff --git a/third-party/nsh/crates/nsh-testing/src/module.rs b/third-party/nsh/crates/nsh-testing/src/module.rs index a3d5bd53fb1..db360c7cd99 100644 --- a/third-party/nsh/crates/nsh-testing/src/module.rs +++ b/third-party/nsh/crates/nsh-testing/src/module.rs @@ -1052,51 +1052,6 @@ impl From<&nsh_core::picker::Pick> for PickRequest { } } -/// How the user answers the share sheet (`app.onShare`). -#[derive(Debug, Default, Clone, Copy, PartialEq, Eq, PropEnum)] -pub enum ShareAnswerAction { - /// The user shares. - Shared, - /// The user closes the sheet without sharing. - #[default] - Dismissed, -} - -/// How the user answers every share sheet (`app.onShare`). -#[derive(Debug, Clone, Default, PartialEq, JsObject)] -#[prop(exact)] -pub struct ShareAnswer { - /// `"shared"` or `"dismissed"`. - pub action: ShareAnswerAction, - /// The target chosen when shared (`"com.apple.UIKit.activity.Mail"`); - /// none: the platform names none. - pub target: Option, -} - -/// What the app shared (`Share.show`), as a test reads it. -#[derive(Debug, Clone, PartialEq, JsObject)] -pub struct SharedContent { - /// The title; `null` when none was given. - pub title: Option, - /// The text; `null` when none was given. - pub text: Option, - /// The link; `null` when none was given. - pub url: Option, - /// The files' real paths. - pub files: Vec, -} - -impl From<&nsh_core::share::ShareSheet> for SharedContent { - fn from(sheet: &nsh_core::share::ShareSheet) -> Self { - SharedContent { - title: sheet.title.clone(), - text: sheet.text.clone(), - url: sheet.url.clone(), - files: sheet.files.clone(), - } - } -} - /// What the app asked of the speaker (`Sound`, `AudioPlayer`), as a test /// reads it. #[derive(Debug, Clone, PartialEq, JsObject)] @@ -2769,26 +2724,6 @@ impl App { step(&this, move |app| app.fail_open_urls(&url)).await } - /// The platform shows a share sheet from now on (`Share.available()` - /// resolves `true`), and the user answers every one the app shows - /// (`Share.show`) as `answer` says: shared, to its `target` if it names - /// one, or dismissed. What the app shares is listed by `shares`. Then - /// waits until the app is quiet. Headless only: a real platform shows - /// its own sheet. - pub async fn on_share(this: Instance, answer: ShareAnswer) -> Result<(), JsError> { - let outcome = match answer.action { - ShareAnswerAction::Shared => nsh_core::share::ShareOutcome::shared(answer.target), - ShareAnswerAction::Dismissed => nsh_core::share::ShareOutcome::dismissed(), - }; - step(&this, move |app| app.on_share(outcome)).await - } - - /// What the app shared (`Share.show`), in order: recorded, never - /// shared, and answered as `onShare` says. Headless only. - pub fn shares(&self) -> Result, JsError> { - self.with(|app| Ok(app.shares()?.iter().map(SharedContent::from).collect())) - } - /// Moves the app to `state`, as the system does when the user leaves it /// (`"background"`), switches to another app or window (`"inactive"`) /// and comes back (`"active"`); `lifecycle()` follows. Headless only. diff --git a/third-party/nsh/crates/nsh-testing/src/run.rs b/third-party/nsh/crates/nsh-testing/src/run.rs index 1f55b8525cc..6d95bfa69e4 100644 --- a/third-party/nsh/crates/nsh-testing/src/run.rs +++ b/third-party/nsh/crates/nsh-testing/src/run.rs @@ -131,6 +131,10 @@ pub struct HostTarget { /// window, a browser's page); false where the app fills a device's /// screen. pub sized: bool, + /// The apps are a development session's that runs already (`nsh test + /// --attach`): `open` drives that app as it is, so it refuses every + /// option that sets an app up, and closing it leaves it running. + pub attached: bool, } /// How [`StartHost`] starts an app. @@ -967,6 +971,30 @@ fn check_launch(entry: &str, launch: &Launch, target: Option<&HostTarget>) -> Re let Some(target) = target else { return Ok(()); }; + if target.attached { + let given = [ + ("storage", !launch.storage.0.is_empty()), + ("network", !matches!(launch.network, NetworkSetup::None)), + ("width", launch.width.is_some()), + ("height", launch.height.is_some()), + ("safeArea", launch.safe_area.is_some()), + ("clipboard", launch.clipboard.is_some()), + ("colorScheme", launch.color_scheme.is_some()), + ("locale", launch.locale.is_some()), + ( + "localeSettings", + launch.locale_settings != crate::module::LocaleSettingsOptions::default(), + ), + ("reducedMotion", launch.reduced_motion.is_some()), + ("platform", launch.platform.is_some()), + ("clock", launch.clock.is_some()), + ("host.params", !launch.host.params().is_empty()), + ]; + if let Some((option, _)) = given.iter().find(|(_, set)| *set) { + return Err(crate::failure::unsupported_attached(entry, option)); + } + return Ok(()); + } if !target.sized { let given = [("width", launch.width), ("height", launch.height)]; if let Some((option, _)) = given.iter().find(|(_, v)| v.is_some()) { @@ -1349,9 +1377,31 @@ mod tests { name: name.into(), platform, sized, + attached: false, } } + #[test] + fn an_attached_open_takes_the_app_as_it_runs() { + let attached = HostTarget { + attached: true, + ..target("gpui", Platform::Macos, true) + }; + let check = |launch: &Launch| check_launch("./App.tsx", launch, Some(&attached)); + assert_eq!(check(&launch()), Ok(())); + let mut sized = launch(); + sized.width = Some(Points(800.0)); + let error = check(&sized).unwrap_err(); + assert!( + error.starts_with("open(\"./App.tsx\"): `width` is unsupported with --attach"), + "{error}" + ); + assert_eq!(code_of(&error), Some(UNSUPPORTED)); + let mut stored = launch(); + stored.storage.0.insert("theme".into(), "dark".into()); + assert!(check(&stored).unwrap_err().contains("`storage`")); + } + #[test] fn open_rejects_the_options_a_target_cannot_honor() { let ios = target("ios", Platform::Ios, false); diff --git a/third-party/nsh/crates/nsh-testing/src/screen.rs b/third-party/nsh/crates/nsh-testing/src/screen.rs index 578152b3f7f..1424f110c41 100644 --- a/third-party/nsh/crates/nsh-testing/src/screen.rs +++ b/third-party/nsh/crates/nsh-testing/src/screen.rs @@ -200,17 +200,6 @@ pub struct Screen { url_opens: Vec<(u32, String)>, /// The screen colors asked for (`pick_screen_color`), to answer. screen_colors: Vec, - /// What the app shared (`Share.show`), in order. - shares: Vec, - /// The shares to answer. - share_answers: Vec, - /// The web sign-in sessions the app opened in the app, in order. - auth_sessions: Vec, - /// The sign-in sessions to answer. - auth_session_answers: Vec, - /// The sign-in session showing: not answered, closed by the app nor - /// replaced yet. - auth_session_showing: Option, /// The requests on local paths that reached the platform /// (`pick_paths`, `open_path`, ...), in order. file_requests: Vec, @@ -980,18 +969,6 @@ impl Screen { self.url_opens.push((*id, url.clone())); } Command::PickScreenColor { id } => self.screen_colors.push(*id), - // Recorded, never shared: a test's machine has no share sheet. - Command::Share { id, sheet } => { - self.shares.push((**sheet).clone()); - self.share_answers.push(*id); - } - // Recorded, never shown: a test's machine signs in nowhere. - Command::AuthSession { id, page } => { - self.auth_sessions.push((**page).clone()); - self.auth_session_answers.push(*id); - self.auth_session_showing = Some(*id); - } - Command::CloseAuthSession(id) => self.auth_session_ended(*id), // Recorded, never carried out: a test's machine opens, shows // and trashes nothing. Command::FileRequest { id, request } => { @@ -1630,6 +1607,17 @@ impl Screen { children } + /// A screen for the app that replaces this one's (a reload), in the + /// same window: its viewport and system bar, none of its views. + #[cfg(feature = "agent")] + pub(crate) fn restarted(&self) -> Screen { + Screen { + viewport: self.viewport, + system_bar: self.system_bar, + ..Screen::default() + } + } + /// The window is `size` (what lies outside it is not on screen). pub(crate) fn set_viewport(&mut self, size: Size) { self.viewport = Some(size); @@ -2113,48 +2101,6 @@ impl Screen { std::mem::take(&mut self.file_answers) } - /// What the app shared (`Share.show`, [`nsh_core::element::share`]), - /// in order: what reached the platform, past the content's checks and - /// the `share` capability (only once the environment has - /// [`nsh_core::platform::Environment::share`]). - pub fn shares(&self) -> &[nsh_core::share::ShareSheet] { - &self.shares - } - - /// The web sign-in sessions the app opened in the app - /// ([`nsh_core::element::open_auth_session`]), in order: those that - /// reached the platform, past the request's checks (only once the - /// environment has [`nsh_core::platform::Environment::auth_session`]; - /// elsewhere the page is in [`Screen::opened_urls`]). - pub fn auth_sessions(&self) -> &[nsh_core::auth_session::AuthSessionPage] { - &self.auth_sessions - } - - /// Whether a sign-in session the app opened in the app still shows: - /// the user has not ended it (as - /// [`crate::Headless::keep_auth_sessions_open`] leaves it), and the app - /// has not closed it ([`nsh_core::element::close_auth_session`]). - pub fn auth_session_showing(&self) -> bool { - self.auth_session_showing.is_some() - } - - /// Sign-in session `id` is no longer showing. - pub(crate) fn auth_session_ended(&mut self, id: u32) { - if self.auth_session_showing == Some(id) { - self.auth_session_showing = None; - } - } - - /// The sign-in sessions to answer since the last call. - pub(crate) fn take_auth_session_answers(&mut self) -> Vec { - std::mem::take(&mut self.auth_session_answers) - } - - /// The share requests to answer since the last call. - pub(crate) fn take_share_answers(&mut self) -> Vec { - std::mem::take(&mut self.share_answers) - } - /// The screen color requests to answer since the last call. pub(crate) fn take_screen_colors(&mut self) -> Vec { std::mem::take(&mut self.screen_colors) diff --git a/third-party/nsh/crates/nsh-testing/tests/testing/main.rs b/third-party/nsh/crates/nsh-testing/tests/testing/main.rs index 128376440b5..18ee2a43fc4 100644 --- a/third-party/nsh/crates/nsh-testing/tests/testing/main.rs +++ b/third-party/nsh/crates/nsh-testing/tests/testing/main.rs @@ -482,7 +482,7 @@ fn a_mouse_drag_selects_in_a_selectable_view() { let results = run_file(&run, &dir.join("App.test.tsx"), &mut |_| {}).unwrap(); let failed: Vec<_> = results.iter().filter(|r| r.failure.is_some()).collect(); assert!(failed.is_empty(), "{failed:#?}"); - assert_eq!(results.len(), 7); + assert_eq!(results.len(), 9); } #[test] diff --git a/third-party/nsh/crates/nsh-testing/tests/testing/text-selection/App.test.tsx b/third-party/nsh/crates/nsh-testing/tests/testing/text-selection/App.test.tsx index 73e6f534172..24256a8d5d8 100644 --- a/third-party/nsh/crates/nsh-testing/tests/testing/text-selection/App.test.tsx +++ b/third-party/nsh/crates/nsh-testing/tests/testing/text-selection/App.test.tsx @@ -42,6 +42,20 @@ test("clearSelection clears a selectable view's selection", async () => { expect(app.shows('Selected: ""')).toBe(true); }); +test("selectAll selects every text of a selectable view", async () => { + const app = await open("./App.tsx", { platform: "macos" }); + await app.press("id:select-all"); + await app.waitFor('Selected: "Alpha beta\\nGamma delta"'); +}); + +test("selectAll on a view inside a selectable view selects all of it, once", async () => { + const app = await open("./App.tsx", { platform: "ios" }); + await app.press("id:select-all-inside"); + await app.waitFor('Selected: "Alpha beta\\nGamma delta"'); + await app.press("id:select-all-inside"); + expect(app.shows("Changes: 1")).toBe(true); +}); + test("a finger drag on a phone selects nothing", async () => { const app = await open("./App.tsx", { platform: "ios" }); await app.drag("id:first", { x: 0, y: 17 }); diff --git a/third-party/nsh/crates/nsh-testing/tests/testing/text-selection/App.tsx b/third-party/nsh/crates/nsh-testing/tests/testing/text-selection/App.tsx index 4fff95d48dd..7cc30e7aa87 100644 --- a/third-party/nsh/crates/nsh-testing/tests/testing/text-selection/App.tsx +++ b/third-party/nsh/crates/nsh-testing/tests/testing/text-selection/App.tsx @@ -5,6 +5,7 @@ import { TextView } from "nsh/base"; // text outside them. function App() { let article!: ViewRef; + let second!: ViewRef; const selected = signal(""); const changes = signal(0); const heard = ({ text }: { text: string }) => { @@ -15,7 +16,7 @@ function App() { Alpha beta - Gamma delta + Gamma delta @@ -36,6 +37,12 @@ function App() { article.clearSelection()}> Clear + article.selectAll()}> + Select all + + second.selectAll()}> + Select all from inside + {`Selected: ${JSON.stringify(selected())}`} {`Changes: ${changes()}`} diff --git a/third-party/nsh/crates/nsh-windows-app/Cargo.toml b/third-party/nsh/crates/nsh-windows-app/Cargo.toml index dd63c46a10f..6d4acb19d41 100644 --- a/third-party/nsh/crates/nsh-windows-app/Cargo.toml +++ b/third-party/nsh/crates/nsh-windows-app/Cargo.toml @@ -47,6 +47,7 @@ log.workspace = true [target.'cfg(windows)'.dependencies] nsh-base.workspace = true +nsh-core.workspace = true nsh-platform-windows.workspace = true # Over-the-air packages of the app's code (`nsh_engine::updates`). nsh-engine.workspace = true diff --git a/third-party/nsh/crates/nsh-windows-app/build.rs b/third-party/nsh/crates/nsh-windows-app/build.rs new file mode 100644 index 00000000000..9f0c3963037 --- /dev/null +++ b/third-party/nsh/crates/nsh-windows-app/build.rs @@ -0,0 +1,49 @@ +//! Resolves the gates of `nsh/base`'s parts (`src/main.rs`) to the parts: +//! the runner built here has every part its features have. `nsh package` +//! links the same objects again, pointing the gates of the parts an app +//! does not import at `nsh_part_none` instead (#1644). + +/// The parts with a gate, and the feature each needs (`None`: always built). +const PARTS: &[(&str, Option<&str>)] = &[ + ("menu", None), + ("overlays", None), + ("select", None), + ("command", None), + ("combobox", None), + ("toast", None), + ("pickers", None), + ("color_picker", None), + ("emoji_picker", Some("EMOJI_PICKER")), + ("carousel", None), + ("tree", None), + ("fields", None), + ("text_view", None), + ("editor", Some("EDITOR")), + ("diff", Some("EDITOR")), + ("rich_editor", Some("RICH_EDITOR")), + ("data_table", None), + ("table", None), + ("dock", None), + ("resizable", None), + ("plot", Some("PLOT")), + ("term", Some("TERM")), +]; + +fn main() { + println!("cargo:rerun-if-changed=build.rs"); + if std::env::var("CARGO_CFG_WINDOWS").is_err() { + return; + } + let msvc = std::env::var("CARGO_CFG_TARGET_ENV").as_deref() == Ok("msvc"); + for (part, feature) in PARTS { + if feature.is_some_and(|f| std::env::var_os(format!("CARGO_FEATURE_{f}")).is_none()) { + continue; + } + let alias = format!("nsh_part_{part}=nsh_have_{part}"); + if msvc { + println!("cargo:rustc-link-arg-bins=/ALTERNATENAME:{alias}"); + } else { + println!("cargo:rustc-link-arg-bins=-Wl,-Xlink=-alternatename:{alias}"); + } + } +} diff --git a/third-party/nsh/crates/nsh-windows-app/script/link-kit.js b/third-party/nsh/crates/nsh-windows-app/script/link-kit.js new file mode 100644 index 00000000000..036662fc480 --- /dev/null +++ b/third-party/nsh/crates/nsh-windows-app/script/link-kit.js @@ -0,0 +1,65 @@ +// Makes the link kit of the gnullvm release runner (#1644): the objects and +// libraries its link reads, rustc's metadata taken out of each rlib, and +// `link.rsp`, the `ld.lld` arguments with `${KIT}` for the kit's directory, +// so that `nsh package` links the runner again with `rust-lld -flavor gnu` +// alone (crates/nsh-cli/src/windows_link.rs). +// +// cargo rustc --release -p nsh-windows-app --bin nsh-windows-app \ +// --target x86_64-pc-windows-gnullvm -- -C save-temps --print link-args > linkargs.txt +// node link-kit.js linkargs.txt +// +// clang (llvm-mingw) and llvm-ar must be on PATH: clang prints the `ld.lld` +// command it would run (`-###`), with the mingw runtime it adds. +const fs = require('fs'), path = require('path'), { spawnSync } = require('child_process'); +const [cmdFile, kit] = process.argv.slice(2); +const quoted = line => [...line.matchAll(/"((?:[^"\\]|\\.)*)"/g)].map(m => m[1].replace(/\\\\/g, '\\').replace(/\\"/g, '"')); + +const line = fs.readFileSync(cmdFile, 'utf8').split('\n').find(l => l.includes('clang')); +const [clang, ...clangArgs] = quoted(line); +// Through a response file: the command line is too long for Windows. +fs.mkdirSync(kit, { recursive: true }); +const rsp = path.join(kit, 'clang.rsp'); +fs.writeFileSync(rsp, clangArgs.map(a => `"${a.replace(/\\/g, '/')}"`).join('\n')); +const hash = spawnSync(clang, ['-###', '@' + rsp], { encoding: 'utf8', maxBuffer: 1 << 28 }); +const lldLine = hash.stderr.split('\n').find(l => /ld\.lld/.test(l)); +if (!lldLine) { console.error(hash.stderr); process.exit(1); } +const args = quoted(lldLine).slice(1); + +fs.rmSync(kit, { recursive: true, force: true }); +const lib = path.join(kit, 'lib'); +fs.mkdirSync(lib, { recursive: true }); +const names = new Set(); +let size = 0; +const take = src => { + let name = path.win32.basename(src).replace(/\.rlib$/, '.a'); + for (let n = 1; names.has(name.toLowerCase()); n++) name = name.replace(/^(.*?)(-\d+)?(\.[^.]+)$/, `$1-${n}$3`); + names.add(name.toLowerCase()); + const out = path.join(lib, name); + fs.copyFileSync(src, out); + if (src.endsWith('.rlib')) { + const r = spawnSync('llvm-ar', ['d', out, 'lib.rmeta'], { encoding: 'utf8' }); + if (r.status) { console.error(src, r.stderr); process.exit(1); } + } + size += fs.statSync(out).size; + return '${KIT}/lib/' + name; +}; + +const dirs = []; +const out = []; +for (let i = 0; i < args.length; i++) { + const a = args[i]; + if (a === '-o') { i++; continue; } + if (a.startsWith('-L')) { dirs.push(a.slice(2)); continue; } + if (a.startsWith('-l')) { + // A library found through -L: the kit has its own copy. + const want = a.startsWith('-l:') ? [a.slice(3)] : [`lib${a.slice(2)}.a`, `lib${a.slice(2)}.dll.a`, `${a.slice(2)}.lib`]; + const found = dirs.flatMap(d => want.map(w => path.join(d, w))).find(f => fs.existsSync(f)); + if (!found) { console.error('not found:', a); process.exit(1); } + out.push(take(found)); + continue; + } + if (/\.(o|a|rlib|lib)$/i.test(a) && !a.startsWith('-') && fs.existsSync(a)) { out.push(take(a)); continue; } + out.push(a); +} +fs.writeFileSync(path.join(kit, 'link.rsp'), out.map(a => `"${a.replace(/\\/g, '/')}"`).join('\n') + '\n'); +console.log(`${names.size} files, ${(size / 1048576).toFixed(1)} MB in ${kit}`); diff --git a/third-party/nsh/crates/nsh-windows-app/src/main.rs b/third-party/nsh/crates/nsh-windows-app/src/main.rs index ff38e6eadf7..a514989df8d 100644 --- a/third-party/nsh/crates/nsh-windows-app/src/main.rs +++ b/third-party/nsh/crates/nsh-windows-app/src/main.rs @@ -1,4 +1,11 @@ //! The release runner with `nsh/base` (all of `nsh/base`). +//! +//! On Windows each part of `nsh/base` but the core is reached only through +//! its gate, an external `nsh_part_` the linker resolves (#1644): +//! this build points every gate at the part ([`build.rs`](../build.rs)), +//! and `nsh package` links the same objects again with the gates of the +//! parts an app does not import pointed at [`nsh_part_none`]. The linker +//! then drops those parts' code, as if the runner were compiled without them. // A windowed program: no console opens with it. #![windows_subsystem = "windows"] @@ -6,6 +13,71 @@ fn main() -> std::process::ExitCode { // Runs any app's JS: every part of `nsh/base` it may import. #[cfg(windows)] - nsh_platform_windows::set_ui_sets(vec![nsh_base::registry()]); + nsh_platform_windows::set_ui_sets(vec![parts::registry()]); nsh_windows_app::main() } + +#[cfg(windows)] +mod parts { + use nsh_core::element::Registry; + + /// The gate of a part the link leaves out. + #[unsafe(no_mangle)] + fn nsh_part_none(_: &mut Registry) {} + + macro_rules! gates { + ($($(#[$cfg:meta])* $name:ident => $gate:ident / $have:ident,)*) => { + unsafe extern "Rust" { + $($(#[$cfg])* fn $gate(registry: &mut Registry);)* + } + + $( + /// The part itself, which its gate resolves to when it is linked. + $(#[$cfg])* + #[unsafe(no_mangle)] + fn $have(registry: &mut Registry) { + nsh_base::parts::$name(registry); + } + )* + + /// `nsh/base` with the parts this link has. + pub(crate) fn registry() -> Registry { + let parts: &[nsh_base::parts::Part] = &[ + nsh_base::parts::core, + $( + $(#[$cfg])* + // SAFETY: the linker resolves the gate to the part's + // `nsh_have_*` or to `nsh_part_none`, both of this type. + |r: &mut Registry| unsafe { $gate(r) }, + )* + ]; + nsh_base::registry_of(parts.iter().copied()) + } + }; + } + + gates!( + menu => nsh_part_menu / nsh_have_menu, + overlays => nsh_part_overlays / nsh_have_overlays, + select => nsh_part_select / nsh_have_select, + command => nsh_part_command / nsh_have_command, + combobox => nsh_part_combobox / nsh_have_combobox, + toast => nsh_part_toast / nsh_have_toast, + pickers => nsh_part_pickers / nsh_have_pickers, + color_picker => nsh_part_color_picker / nsh_have_color_picker, + #[cfg(feature = "emoji-picker")] emoji_picker => nsh_part_emoji_picker / nsh_have_emoji_picker, + carousel => nsh_part_carousel / nsh_have_carousel, + tree => nsh_part_tree / nsh_have_tree, + fields => nsh_part_fields / nsh_have_fields, + text_view => nsh_part_text_view / nsh_have_text_view, + #[cfg(feature = "editor")] editor => nsh_part_editor / nsh_have_editor, + #[cfg(feature = "editor")] diff => nsh_part_diff / nsh_have_diff, + #[cfg(feature = "rich-editor")] rich_editor => nsh_part_rich_editor / nsh_have_rich_editor, + data_table => nsh_part_data_table / nsh_have_data_table, + table => nsh_part_table / nsh_have_table, + dock => nsh_part_dock / nsh_have_dock, + resizable => nsh_part_resizable / nsh_have_resizable, + #[cfg(feature = "plot")] plot => nsh_part_plot / nsh_have_plot, + #[cfg(feature = "term")] term => nsh_part_term / nsh_have_term, + ); +} diff --git a/third-party/nsh/crates/xtask/src/android.rs b/third-party/nsh/crates/xtask/src/android.rs index b212f25d7e8..9306b1b40b1 100644 --- a/third-party/nsh/crates/xtask/src/android.rs +++ b/third-party/nsh/crates/xtask/src/android.rs @@ -322,7 +322,7 @@ pub(crate) fn clippy() -> anyhow::Result<()> { "-p", "nsh-extra", "--features", - "nsh-extra/camera,nsh-extra/speech", + "nsh-extra/camera,nsh-extra/share,nsh-extra/speech", "--target", "aarch64-linux-android", "--all-targets", @@ -541,6 +541,11 @@ pub(crate) fn make_aar(built: &Path, abis: &[String], dev: bool, aar: &Path) -> r#" + + + diff --git a/third-party/nsh/crates/xtask/src/dist.rs b/third-party/nsh/crates/xtask/src/dist.rs index b5efd88bbe7..f6204cf7ba3 100644 --- a/third-party/nsh/crates/xtask/src/dist.rs +++ b/third-party/nsh/crates/xtask/src/dist.rs @@ -8,6 +8,7 @@ //! dist/nsh/runtime/macos/{nsh-macos-host,nsh-macos-app} development host, packaged app runner //! dist/nsh/runtime/linux/{nsh-linux-host,nsh-linux-app} development host, packaged app runner //! dist/nsh/runtime/windows/{nsh-windows-host,nsh-windows-app}.exe development host, packaged app runner +//! dist/nsh/runtime/windows/nsh-windows-app.link/ the runner's link kit (x86_64), bin/ld.lld.exe its linker //! dist/nsh/runtime/gpui/nsh-gpui-host[.exe] development host (GPUI; apps embed it, never package it) //! dist/nsh/runtime/tui/nsh-tui-host[.exe] development host (the terminal, `nsh run --target tui`) //! dist/nsh/runtime/android/{release,dev}/ classes.dex, lib//libnsh.so (stripped), @@ -144,16 +145,16 @@ pub(crate) fn dist() -> anyhow::Result<()> { } } if cfg!(windows) { - for (package, what) in [ - ("nsh-windows-host", "the development host for Windows"), - ("nsh-windows-app", "the release runner for Windows"), - ] { - cargo(&["build", "--release", "-p", package], what)?; - copy_executable( - &release.join("release").join(exe(package)), - &out.join("runtime/windows").join(exe(package)), - )?; - } + let package = "nsh-windows-host"; + cargo( + &["build", "--release", "-p", package], + "the development host for Windows", + )?; + copy_executable( + &release.join("release").join(exe(package)), + &out.join("runtime/windows").join(exe(package)), + )?; + windows_runner(&root, &release, &out.join("runtime/windows"))?; } // GPUI is the backend for embedding in GPUI apps: its development @@ -499,6 +500,107 @@ pub(crate) fn cargo(args: &[&str], what: &str) -> anyhow::Result<()> { ) } +/// The target of the Windows release runner on x86_64, linked by +/// `nsh package` again from its link kit (#1644). +const WINDOWS_GNULLVM: &str = "x86_64-pc-windows-gnullvm"; + +/// The Windows release runner, into `runtime`. On x86_64 with a gnullvm C +/// toolchain (llvm-mingw, `CC_x86_64_pc_windows_gnullvm`) it is built for +/// gnullvm with its link kit `nsh-windows-app.link/` (objects and libraries +/// without rustc's metadata, `link.rsp`) and the linker in the kit's +/// `bin/ld.lld.exe` (the toolchain's `rust-lld`, the `windows-linker` +/// component). Without one, and on arm64, it is built as before, for this +/// machine and without a kit: `nsh package` then uses it as it is. +fn windows_runner(root: &Path, release: &Path, runtime: &Path) -> anyhow::Result<()> { + let package = "nsh-windows-app"; + let what = "the release runner for Windows"; + let gnullvm = cfg!(target_arch = "x86_64"); + if !gnullvm || env::var_os("CC_x86_64_pc_windows_gnullvm").is_none() { + if gnullvm { + term::warn( + "no gnullvm C toolchain (llvm-mingw, CC_x86_64_pc_windows_gnullvm): the Windows \ + runner is built without its link kit, and packaged apps keep every part", + ); + } + cargo(&["build", "--release", "-p", package], what)?; + return copy_executable( + &release.join("release").join(exe(package)), + &runtime.join(exe(package)), + ); + } + let built = release.join(WINDOWS_GNULLVM).join("release"); + let runner = built.join(exe(package)); + let link_args = built.join("nsh-windows-app.link-args.txt"); + // Cargo runs rustc again, which prints the link's arguments, only when + // the runner is not there. + remove(&runner)?; + remove(&link_args)?; + // Without LTO: the kit's objects stay per crate, and the link drops the + // sections of a part an app does not import. `--config` wins over the + // release workflow's `CARGO_PROFILE_RELEASE_*`. + let print = format!("link-args={}", link_args.display()); + cargo( + &[ + "rustc", + "--release", + "-p", + package, + "--bin", + package, + "--target", + WINDOWS_GNULLVM, + "--config", + "profile.release.lto=false", + "--config", + "profile.release.codegen-units=16", + "--", + "-C", + "save-temps", + "--print", + &print, + ], + what, + )?; + copy_executable(&runner, &runtime.join(exe(package)))?; + + let kit = runtime.join("nsh-windows-app.link"); + let step = term::Step::start("making the Windows runner's link kit"); + term::run( + Command::new("node") + .arg(root.join("crates/nsh-windows-app/script/link-kit.js")) + .arg(&link_args) + .arg(&kit), + )?; + copy(&rust_lld()?, &kit.join("bin/ld.lld.exe"))?; + step.done("made the Windows runner's link kit"); + Ok(()) +} + +/// The `rust-lld` of the toolchain that builds the distribution. +fn rust_lld() -> anyhow::Result { + let rustc = |arg: &str| -> anyhow::Result { + let output = Command::new(env::var_os("RUSTC").unwrap_or_else(|| "rustc".into())) + .arg(arg) + .output() + .context("run rustc")?; + anyhow::ensure!(output.status.success(), "rustc {arg} failed"); + Ok(String::from_utf8_lossy(&output.stdout).into_owned()) + }; + let sysroot = rustc("--print=sysroot")?; + let version = rustc("-vV")?; + let host = version + .lines() + .find_map(|line| line.strip_prefix("host: ")) + .context("rustc -vV names no host")?; + let lld = Path::new(sysroot.trim()) + .join("lib/rustlib") + .join(host.trim()) + .join("bin") + .join(exe("rust-lld")); + anyhow::ensure!(lld.is_file(), "no rust-lld at {}", lld.display()); + Ok(lld) +} + /// The file of executable `name` built for this machine (`nsh.exe` on /// Windows). fn exe(name: &str) -> String { diff --git a/third-party/nsh/docs/dev/animation.md b/third-party/nsh/docs/dev/animation.md index 0f36241b768..d625dbb48fe 100644 --- a/third-party/nsh/docs/dev/animation.md +++ b/third-party/nsh/docs/dev/animation.md @@ -183,7 +183,8 @@ highest rate; `None` as soon as one runs uncapped; a composite asks for the highest of its steps while it runs), `transition::Live::frame_rate` a view's keyframes while they run alone. Platforms that can lower their frame rate honor it while nothing else wants frames (macOS: `macos.md` "Frames"; iOS: the graph's display link and Core - Animation's keyframes); the others run at the screen's rate. + Animation's keyframes; Android: `Native.tick` skips intermediate `Choreographer` frames without touching views); + the others run at the screen's rate. ## Pointer-driven motion follows the pointer diff --git a/third-party/nsh/docs/dev/api-naming.md b/third-party/nsh/docs/dev/api-naming.md index a97aa3f7cbe..b1362a45be4 100644 --- a/third-party/nsh/docs/dev/api-naming.md +++ b/third-party/nsh/docs/dev/api-naming.md @@ -403,6 +403,7 @@ them yet (`compatibility.md`). The frozen RN-shaped modules keep their names. A | `OS` (type) | unchanged | | `platform.os`'s type | | Apple's `NSUserActivity` (`becomeCurrent`, `NSUserActivityTypes`); no counterpart in Electron, Tauri, Flutter or React Native | nsh.json `"handoff": true`; Swift `NshAppView.handoff`, C `nsh_app_set_handoff`, Rust `SurfaceOptions::handoff` (iOS) and `AppOptions::handoff` (macOS) | Where names come from | 2026-11-16 (#1203): the address `UrlScheme.setUrl` sets goes to the system. Apple's user-facing word, one plain word: not `userActivity` (the mechanism) or `continuity` (the umbrella of several features); a top-level key of a platform's integration, as `singleInstance` | | Expo's `WebBrowser.openAuthSessionAsync(url, redirectUrl)`, Apple's `ASWebAuthenticationSession`, Flutter's `flutter_web_auth` | Rust `open_auth_session(AuthSessionRequest::new(url, callback_scheme).ephemeral(bool))` → `AuthSessionOutcome::Completed(url) \| Cancelled`; `close_auth_session()` | Where names come from | 2026-11-17: Expo's verb and Apple's noun; a request object so options can join. 2026-11-18: `close_auth_session()` takes no handle, since one session runs at a time; the session ends as `Cancelled`. iOS's sheet, Android's Custom Tab, elsewhere the browser and a link of a claimed scheme (none on the web or the GPUI and terminal backends: fails at once); cancelling is an outcome, not an error. Rust only for now | +| ASWebAuthenticationSession's `callbackURLScheme` | Rust `next_url_scheme_open_for(scheme)` → `Answer`, beside `next_url_scheme_open()` | Where names come from | 2026-11-27: a module that waits for one link (a sign-in session's callback) names the scheme it waits on, as Apple's session does; while it waits, the links of that scheme are its alone and the app's own listeners keep hearing the rest. `_for` qualifies the wait, as `_with` adds options. It claims the whole scheme: waiting for `https` takes all of the app's `https` links meanwhile (Universal Links, App Links), so a callback uses a scheme of the app's own; matching by host or path would be a separate function. Every `next_url_scheme_open()` waiting hears a link, as TS's `open` listeners and `next_frame()` do; a task that called it listens while it lives, its next call first getting the links since its last (16 at most), so it is awaited in a loop or in a task that ends when it stops listening. Rust only for now: native modules wait for callbacks | | **`nsh`: accessibility** | | | | | `AccessibilityInfo.isScreenReaderEnabled()`, `isReduceMotionEnabled()`, `addEventListener` | (dropped) | Listening | `screenReaderEnabled()`, `reduceMotion()` | | `AccessibilityInfo.announceForAccessibility(message)` | `announce(message)` | Environment | A function of the module | @@ -497,7 +498,7 @@ and `Input`'s React Native names follow the rules as well. | `placeholderTextColor` | style key `placeholderColor`, class `placeholder:text-*` | *guides* `value` vs `presentation`; CSS `::placeholder` | | | `selectionColor` (Input, Text) | style key `selectionColor` (the highlight), class `selection:text-*` | CSS `::selection` | | | `cursorColor` (Input) | style key `caretColor`, class `caret-*` | CSS `caret-color` | | -| Switch `trackColor` (on) (`nsh/mobile`'s system switch) | style key `accentColor`, class `accent-*` | CSS `accent-color` | A color of a part is a style key. Set on the control (not inherited); the system's segmented control and tab bar could read it later | +| Switch `trackColor` (on) (a native component's system switch) | style key `accentColor`, class `accent-*` | CSS `accent-color` | A color of a part is a style key. Set on the control (not inherited); a native component gets it as its `accentColor` prop | | `editable` | `readonly` (`editable={false}` = `readonly`) | *guides* "readonly"; `gpui-component` `Input::readonly` | `disabled` (no focus, `disabled:` classes) stays separate | | `onChangeText(text)` | `onChange({ value })` (was `onChange(text)` until 2026-10-27) | `InputEvent::Change`; `on_change` observes (*guides*) | | | `onSubmitEditing` | `onSubmit` | `InputEvent::PressEnter` (not followed) | The return key, whatever `returnKeyType` shows: on a phone it says Done / Search / Go, not Enter; HTML's `submit` | @@ -541,6 +542,9 @@ and `Input`'s React Native names follow the rules as well. | `Role::Link`, `a11y_disabled`, no `url` for accessibility clients | the link role, `disabled` in the state; no URL | `link.rs` (`assert_eq!(enabled.url(), None)`) | As `gpui-base`: the URL stays data | | (new, an NSH addition) | `current` (a boolean: ARIA's `aria-current="page"`) | the core's `accessibilityState.current` (above) | A navigation's or a breadcrumb's link to the page shown, which screen readers say; `gpui-base`'s `Link` has no state for it, and the app cannot set the accessibility state of a component's root (decided by the user, 2026-10-28) | | Tiptap's `Link` extension (`RichEditor`'s class, was `Link`) | `RichLink` (its extension name stays `"link"`) | `RichImage`, `RichTable`, `RichTextStyle` (`rich-editor.md`) | `Link` is `gpui-base`'s component; the editor's class takes the `Rich` prefix its others take where a name is taken (decided by the user, 2026-10-28) | +| Tiptap's `CodeBlockLowlight` `defaultLanguage` (a string; without it `lowlight.highlightAuto` guesses from the code) | `CodeBlockHighlight`'s `defaultLanguage` / Rust `default_language`, and Rust-only `CodeBlockHighlightOptions::detect_language` (`Option Option + Send + Sync>>`, `kit::code_block_highlight_with`) | `@tiptap/extension-code-block-lowlight`; `LinkOptions::is_allowed_uri`, `CharacterCountOptions::text_counter` | `defaultLanguage` keeps Tiptap's name and meaning. `detect_language` is the app's own guess where lowlight's `highlightAuto` would run, named for that detection; it comes before `default_language`. Like the other function options of built-in extensions it is Rust only: a built-in extension's TSX options are data, and drawing an edited block must not call JS | +| (new, an NSH addition) TextView's `taskMarker` / `taskMarkerChecked` (a box filled with a `✓`); `Checkbox`'s `indicator` | `RichEditor`'s `taskCheckmark` part (classes, styles): the `✓` in a done task item's checkbox, drawn only when the app gives the part | `text_view/parts.rs`; `checkbox.rs` | `taskCheckbox` already names the box, which the `Checkbox` and its indicator fill, so `…Indicator` would read as the box again; the part is named for what it draws, the check mark in it | +| (new, an NSH addition) Tiptap's tables take their width from the app's CSS (`width: 100%`) | the `table` extension's `fullWidth` (default `false`) | `@tiptap/extension-table` `TableOptions`; `cellMinWidth`, `lastColumnResizable` | The view lays a table out as a grid whose automatic tracks fit their content, so a width class on the table cannot stretch them: the option says what the grid does. Named as `cellMinWidth` names its property (`full` + `Width`) | | `Link::tab_index`, `tab_stop` | (left out) | | The keyboard focus follows the view tree, as `Button`'s does | | a link inside text (`gpui-base`'s `Link` is a `div`) | an inline box of the paragraph (`verticalAlign`, `align-text-bottom`) | `text.md` "Inline attachments" | Every view inside a `` is one: it keeps its states, focus and role, and stays on one line. A link that wraps with the paragraph's lines is a nested `` span (`TextView`'s links), which is no stop of the keyboard focus | | HTML's `` on the web | (left out) | | The web renders a `Link` as `role="link"` on its element; a real `` (a middle click, "Copy link address") needs the web runtime making an anchor from the view's `href` (the host prop `Href`, `ViewProps::href`, which the link sets while enabled and a terminal draws as an OSC 8 hyperlink) whose default navigation it cancels | @@ -586,7 +590,7 @@ and `Input`'s React Native names follow the rules as well. | `Tab`'s own layout (`flex`, `items_center`, `justify_center`, a line height of 1) | (none) | `Button` (no layout of its own) | The layout is the app's `class` and `style`, as `Button`'s; centering is `items-center justify-center` | | `TabBar`'s indicator (`gpui-component`'s `TabBar::render_indicator`: the `Underline`, `Pill` and `Segmented` variants' sliding element, `spring_move`) | `Tabs`' `indicatorClass` / `indicatorStyle` | `tab_bar.rs` (`render_indicator`, `TabIndicatorBounds`); `Progress`'s and `Checkbox`'s `indicatorClass` / `indicatorStyle` | `gpui-base` has none: the styled layer's indicator becomes a part of `Tabs`, named after it, its look the app's and its variants the app's classes (an underline: `bottom-0 h-[2px]`; a pill or a segment: `inset-y-1` and a fill). It is there only while the app styles it. The core places it on the selected tab (`View::follow`) where `gpui-component` measures every tab in each render; it travels with `spring_move`'s spring, natively | | **DockArea** (`nsh/base`) | | | | -| `Panel::toolbar_buttons` (`gpui-component` dock: the displayed panel's buttons at the end of its tab panel's tab bar) | `renderToolbar: (tab: DockTab) => JSX.Element`; Rust `.render_toolbar(..)` | `dock/panel.rs` (`toolbar_buttons`), `dock/tab_panel.rs`; `renderTab`, `renderDock` | As in GPUI the toolbar belongs to the displayed panel, not to the group: a render prop given that panel's `DockTab`, so no group type and no further bar slots | +| `Panel::toolbar_buttons` (`gpui-component` dock: the displayed panel's buttons at the end of its tab panel's tab bar) | `renderToolbar: (tab: DockTab) => JSX.Element`; Rust `.render_toolbar(..)` | `dock/panel.rs` (`toolbar_buttons`), `dock/tab_panel.rs`; `renderTab`, `renderDock` | As in GPUI the toolbar belongs to the displayed panel, not to the group: a render prop given that panel's `DockTab`, so no group type; the only other bar slot is `renderTabBarPrefix` (GPUI Kit `TabBar::prefix`) at the bar's start, for room or controls that should not scroll with the tabs | | **Toggle** (`nsh/base`) | | | | | `Toggle::pressed(bool)`, `on_change(bool, &ClickEvent, ..)` | `pressed`, `onChange({ pressed: boolean })` | `toggle.rs`; `Switch`'s `checked` / `onChange({ checked })` | The value convention; the next value is the opposite of `pressed`, whatever the app passes back | | `ToggleStyles::pressed`, `disabled` | `pressedStyle`, `aria-pressed:`; `disabledStyle`, `disabled:` | `toggle.rs` `ToggleStyles`; the core's `pressedStyle` (#609) | State styles, as `CheckboxStyles::checked` → `checkedStyle`; `pressed` is ARIA's `aria-pressed`, `active:` the press in progress | @@ -670,6 +674,7 @@ and `Input`'s React Native names follow the rules as well. | A thumb drag puts the thumb under the pointer | the thumb moves by the pointer's offset | `slider.rs:869-883` | No jump of up to half a thumb when it is grabbed off its center | | Two thumbs at one value: the dragged one is held by the other (`set_start` / `set_end`) | a drag that starts on them moves the one that can go the pointer's way, and keeps it (it stops at the other) | `slider.rs:106-120`, `:375-379` | They never stick together | | `gpui-component`'s thumb ring (a spring on hover and press) | `hover:`, `active:` (while dragged), `focus:` on `thumbClass`; `group-*` from the track | `gpui-component` `slider.rs:14-82` | The look and its motion are the app's (`transition-*`, `motion-reduce:`); `gpui-base` has none | +| `SliderThumb`'s children (`impl ParentElement`), and the styled layer's own `on_hover` / mouse-down listeners on the thumb for its ring's state | `renderThumb(thumb: SliderThumbContext)` (`{ start }`, `gpui-base`'s `SliderThumb::start`), content over the thumb's box taking no pointer, hidden from screen readers (the thumb tells its value); each thumb a `group` (`group-hover:`, `group-active:`, `group-data-dragging:`, `group-focus-visible:` inside), `data-dragging:` on the thumb a pointer's drag moves (a press on the track included, from the press to the release) | `gpui-base` `slider.rs:1037` (`SliderThumb`), `:1062` (`start`), `:1072` (`impl ParentElement for SliderThumb`); `gpui-component` `slider.rs:28-44` (`ThumbInteraction`), `:263-280` (its listeners); Base UI's `Slider.Root` / `Slider.Thumb` `data-dragging` | Parts take no children in NSH, so the content is a renderer's, as `Calendar`'s `renderItem`: told what the thumb is, never its state, which its classes follow natively (no JS per hover, press or move; a value bubble moves with the thumb in the pointer's frame, and a range's shows over the thumb the keyboard is on). Not as `Resizable`'s `renderHandle`, whose context carries the handle's state and draws it again on each change: a thumb's state changes on every press, and a JS turn there would put the bubble a frame behind the pointer. Each thumb is always a `group` (`Calendar`'s items are one when `itemClass` says so), as the slider's track and `Scrollbar`'s and `ResizeHandle`'s parts are: the nearest `group` around the content is its thumb, while `thumbClass`'s `group-*:` still follow the track. `data-dragging` is Base UI's name with a narrower scope: Base UI sets it on the root and on every part while any thumb is dragged (the moving thumb is its `activeIndex`); here only the thumb the drag moves has it, so a range's bubble follows that thumb alone. `active:` is the thumb's own press, and a press on the track drags a thumb it never pressed | | `gpui-component` `Slider::reverse()` | (left out) | `gpui-component` `slider.rs:141` | A look of the styled layer: the app's `rangeClass` | | (no right-to-left layout in GPUI: `min` always at the left) | a horizontal slider in a right-to-left layout has its `min` at the right: the thumbs and the range are placed from it, a drag to the left raises the value, Left raises and Right lowers it; a vertical slider keeps its keys (Right / Up raise) | WAI-ARIA APG slider; UIKit's and Android's sliders mirror in right-to-left languages | An addition: the track follows the reading direction, as the platforms' own sliders do, and the keys follow the track. The direction is the surface's, read as it changes | | **Scrollbar** (`nsh/base`) | | | | @@ -720,6 +725,7 @@ and `Input`'s React Native names follow the rules as well. | The cells, drawn by the app (`gpui-component`'s `OtpInput`: a cell per digit, `groups(n)` (default 2), the focus ring on the cell at `min(len, length - 1)`, the caret in it while empty, an asterisk icon per filled cell while masked) | parts the input renders: `cellClass` / `cellStyle` (`focus:` on that cell while focused, through `Interactive::project_focused`), `groups` (default 1) with `groupClass` / `groupStyle`, `caretClass` / `caretStyle`; a filled cell shows its digit, `•` while masked | `component/src/input/otp_input.rs:43`, `:48`, `:81-156` | The cells must follow the field's code and focus, so the input renders them as `Switch` renders its track. One group by default: two is `gpui-component`'s look. The bullet is what the platforms' secure fields show | | A filled cell (`gpui-component` styles every cell alike: its `OtpInput` has no filled state; `gpui-base` leaves the cells to the app, which reads `OtpState::value`) | `data-filled:` on each cell that holds a digit, masked or not (`group-data-filled:` inside a `group` cell), through `Interactive::project_data` | `component/src/input/otp_input.rs:100-156`; `base/src/otp_input.rs:68` | A state screen readers do not hear (the field reads them the code), so a `data-*` attribute as the calendar's `data-range-start` and `data-today`, not an `aria-*:` state. input-otp's slots hand their render function `char`, `hasFakeCaret` and `isActive`, and shadcn/ui's `InputOTPSlot` draws the active one with `data-active` (here `focus:`) and a slot's character; its filled slot is `char !== null`, named `data-filled` here (a boolean, as Tailwind's `data-:` reads it). The cells are the input's parts, so an attribute lets the app style a filled cell without drawing it again on each key | | `BlinkCursor` (shown at focus, 500 ms on and off, held 300 ms after an edit) | the caret part blinks the same; steady with reduced motion | `input/base/blink_cursor.rs:4-5`, `:39-122` | | +| `OtpInput::on_key_down` takes digits only (`to_digit_char`); `gpui-component` has no other mode | `validationType`: `"numeric"` (the default) or `"alphanumeric"` (ASCII letters and digits, full-width ones mapped, letters upper-cased; the full keyboard, capitals on) | `base/src/otp_input.rs:95` | Radix's `OneTimePasswordField` `validationType` (`"numeric"`, `"alpha"`, `"alphanumeric"`, `"none"`): its name and the two values sign-in codes need. An enum, not `alphanumeric: true`, so another set can follow. Upper case as the cells show it, so the code the app gets is one form whatever the keyboard's case | | `OtpInput::disabled` | `disabled` | `otp_input.rs:181` | The field takes no focus; `disabled:` on the input and its parts | | A press on a cell focuses (`gpui-component`'s `on_mouse_down`) | the field lies over the cells: a press anywhere on the input focuses it | `component/src/input/otp_input.rs:129-132` | | | `OtpInput::focus_ring`, `Sizable` | (none) | `component/src/input/otp_input.rs:58-73` | `gpui-component`'s look: `focus:` classes on the cells, and their size, are the app's | @@ -865,6 +871,7 @@ and `Input`'s React Native names follow the rules as well. | `Select::value`, `on_change` | `value: string \| null`, `defaultValue`, `onChange(value: string \| null)` | "Value state" above | Left out, the select keeps its own value; `null` is nothing chosen, controlled (`SelectValue::Controlled(None)` in Rust: the props tell `undefined` from `null`). `onChange` reports a change only: choosing the chosen item closes the list without it (`gpui-component` confirms the same value again; `on_change` observes changes, *guides*) | | `Select::open`, `on_open_change` | `open`, `defaultOpen`, `onOpenChange(open, reason)`, `onOpen`, `onClose`, `onCancel` | `Menu`'s (popups, below) | The keys that open it from the trigger (Down, Up, Return, Space) are presses of the trigger: reason `"triggerPress"`; a choice is `"select"` | | `SearchableList::searchable`, its search input's placeholder | `searchable`, `searchPlaceholder`; `searchClass` / `searchStyle` | `gpui-component` `Select::searchable`, `search_placeholder` | | +| (the search input's text, the list's own) | `query` (controlled) + `onQueryChange({ query })`, `defaultQuery` | `Combobox`'s `query` (below) | `Combobox`'s names and timing: what the user types is reported, a new opening's start is not; the query filters only with `searchable` (`Command`'s) | | (the search input's name: `gpui-component`'s `Input` falls back to its placeholder, `input/input.rs:736-749`) | `searchAccessibilityLabel` (none by default) | `clearButtonAccessibilityLabel`; `Slider`'s `startAccessibilityLabel` | A placeholder is a hint shown while the field is empty, not its name (WAI-ARIA), so the app names the field in its own words; a part's label is the part's name + `AccessibilityLabel` | | (none: GPUI's tests find elements by their own handles) | `searchTestID` (none by default) | `testID`; `Combobox`'s `inputTestID` | UI tests find the search field, made by the select inside its popup, by the app's id; a part's id is the part's name + `TestID`, as its label is the part's name + `AccessibilityLabel` | | `Select::cleanable` (a clear button in place of the chevron while a value is chosen; `clean` sets none and emits `Confirm(None)`; `tab_stop(false)`) | `cleanable`; the part `clearButtonClass` / `clearButtonStyle`, the slot `clearButton`, `clearButtonAccessibilityLabel`; `onChange(null)` | `gpui-component` `select.rs:542`, `:472-476`, `:611-619`; `input/clear_button.rs` | The button is a sibling after the trigger, which is the app's element: inside it, a press would also open the list. Its label is the app's (`gpui-component`'s is `t!("Input.Clear")`; NSH has no built-in strings), as `handleAccessibilityLabel` is `ResizablePanel`'s | @@ -918,7 +925,8 @@ and `Input`'s React Native names follow the rules as well. | `Calendar` (`gpui-base`'s element over a `CalendarState` entity the app holds) | `Calendar`, its state the component's | `gpui-base` `calendar.rs:561-572`, `:169-183` | The app holds the value (below), not an entity | | `Date::Single`, `Date::Range` | `value: CalendarValue` (an ISO date, `[start, end]`, `null`) | `calendar.rs:14` | ISO dates as HTML's ``; `Date` in Rust | | `CalendarState::set_date`, `date` | `value` (controlled), `defaultValue` | `calendar.rs:217`, `:269`; "Value state" above | | -| `CalendarEvent::Selected(Date)` (a day, or a range's end) | `onChange({ value })` | `calendar.rs:165-166`, `:261` | Named by the value-state convention; a complete value only, as `Selected`; a half range shows and is not reported | +| `CalendarEvent::Selected(Date)` (a day, or a range's end) | `onChange({ value })` | `calendar.rs:165-166`, `:261` | Named by the value-state convention; a complete value only, as `Selected`; a half range shows, and `onChangeStart` (next row) reports it | +| (none: `CalendarEvent::Selected` comes once the value is complete; the app reads a half range from its `CalendarState::date`) | `onChangeStart({ value })`, `[start, null]`, on each press that starts a range (Rust `CalendarEvent::ChangeStart`) | `calendar.rs:167-169`, `:239-268`; "Begin and end" above | NSH apps hold no state entity to read the half range from, so the calendar reports it. Picking a range takes two presses: the first starts the change (`Start`, as `Slider`'s `onChangeEnd` ends one), so `onChange` keeps its meaning, a complete value. The payload is the value as it stands, which a controlled `value` accepts: an app that sets `value` to it owns the start, and replaces it by setting another value, so no reset method is needed. React Aria's range calendar likewise keeps the start (`anchorDate`) apart from the value | | `select_date`'s range rules (a press starts, the next ends, an earlier day restarts) | `range` | `calendar.rs:237` | `gpui-base` makes a range of the state's initial `Date::Range`; a prop says it | | `number_of_months`, `first_day_of_week(Weekday)` | `numberOfMonths`, `firstDayOfWeek: number` (`0` Sunday to `6`) | `calendar.rs:588`, `:592`; `gpui-component` `time/calendar.rs:58`, `:63` | The number of JS's `Date#getDay` | | `Matcher` (`DayOfWeek`, `Interval`, `Range`, `Custom`), `disabled_matcher` | `disabledMatcher: DateMatcher` (`number[]`, `{ before, after }`, `{ from, to }`, `(date: string) => boolean`) | `calendar.rs:92-115`, `:199` | `Matcher::Custom` from JS is the app's function, asked once per shown day in the next JS turn and not again for a day it answered (`Matcher::Js`), as `Plot`'s format functions | @@ -944,22 +952,19 @@ and `Input`'s React Native names follow the rules as well. | `DatePicker` (`gpui-base`'s root: `open`, `disabled`, `on_open_change`, `Confirm` / `Cancel`; `gpui-component`'s `DatePicker` over a `DatePickerState`) | `DatePicker` with a `trigger` slot, on `Select`'s popup (`popup::dropdown`) | `gpui-base` `date_picker.rs:21-51`; `gpui-component` `time/date_picker.rs:542-600`, `:153-191` | `open` / `defaultOpen` / `onOpenChange`, `onOpen`, `onClose`, `onCancel` and the popup's parts as `Select`'s; Return on the trigger is `Confirm` | | `DateTime` (`Single`, `Range` of `NaiveDateTime`), `set_date`, `set_date_time`, `date`, `date_time` | `value: DatePickerValue` (controlled), `defaultValue` | `time/date_picker.rs:52`, `:308-329`; "Value state" above | JS has HTML's forms: ISO dates (``), with `timePrecision` dates and times (`datetime-local`, `"2026-10-28T09:30"`); `DateTime` in Rust | | `DatePickerEvent::Change(DateTime)` (every edit while a time keeps the popup open) | `onChange({ value })` | `time/date_picker.rs:40-43` | `PickedDate` in Rust: the value and the precision it crosses to JS at | +| (none: the popup's `CalendarState` holds a half range) | `onChangeStart({ value })` (Rust `DatePickerEvent::ChangeStart`) | `time/date_picker.rs:40-43` | The popup's calendar is the picker's, so the picker passes `Calendar`'s event on, its value a `PickedDate` as `onChange`'s; the popup stays open for the end | | `DatePickerState::range` | `range` | `time/date_picker.rs:191` | | | `date_format` (also the trigger's text) | `dateFormat`: what screen readers hear as the value | `time/date_picker.rs:256`, `:534` | The trigger is the app's, which formats its own text | | `time_precision`, `hour_cycle`, `default_time` | `timePrecision`, `hourCycle`, `defaultTime` | `time/date_picker.rs:269-286` | | | `DatePickerState::select_date` with a time precision: the popup stays open for the time, the selected day again closes it ("picking a date and closing is a double-click") | the same on the desktops; on touch screens (the sheet, `popup::dropdown`'s presentation per device) a tap on a day picks it at its time (the current one, else `defaultTime`) and closes the sheet, which opens again for the time | `time/date_picker.rs:403-418` | A deliberate touch deviation: the double click has no touch equivalent, and on phones picking took a tap and a second tap on the same day to close (reported on a phone) | | `cleanable` | `cleanable`, slot `clearButton`, `clearButtonClass` / `clearButtonStyle`, `clearButtonAccessibilityLabel` | `time/date_picker.rs:623` | As `Select`'s; Delete / Backspace on the closed trigger clear too | | `DateRangePreset` (`single`, `range`, `date_time`), `presets` | `presets: DateRangePreset[]` (`{ label, value }`), parts `presetsClass` / `presetsStyle`, `presetClass` / `presetStyle`, `contentClass` / `contentStyle` | `time/date_picker.rs:113-144`, `:629` | A preset's value is kept as given | +| (none: a preset is its label) | `DateRangePreset.description?: string` (Rust `.description(..)`), part `presetDescriptionClass` / `presetDescriptionStyle` | `AlertDialog`'s `description`; the element's `accessibilityDescription` | An addition: a second line under the label (the dates a preset stands for), set as the button's `accessibilityDescription`, so screen readers read it after the label. `description`, NSH's word for the text under a title; the part follows `presetClass` | | `number_of_months`, `first_day_of_week`, `disabled_matcher`, `set_year_range` | `numberOfMonths`, `firstDayOfWeek`, `disabledMatcher`, `yearRange` | `time/date_picker.rs:296-352`, `:635` | Passed on to the calendar, with every other `Calendar` prop (its parts, `renderItem`, Previous / Next labels) and `calendarClass` / `calendarStyle` | | The time row's "Time" label (`t!("DatePicker.time")`) | slot `timeLabel`, parts `timeClass` / `timeStyle`, `timeFieldClass` / `timeFieldStyle`, `timeAccessibilityLabel`, the segments' parts and `renderSegment` | `time/date_picker.rs:663` | No built-in strings: the label is the app's words | | `placeholder` (`t!("DatePicker.placeholder")`), `appearance`, `Sizable::with_size`, the calendar icon (`IconName::Calendar`) | the app's `trigger` | `time/date_picker.rs:617`, `:641`, `:556`, `:779` | The trigger is the app's element: its text, look, size and icon | -| **DateTimePicker** (`nsh/mobile`) | | | | -| (none: `gpui-kit` draws its pickers) | `DateTimePicker`: the system's picker, iOS's `UIDatePicker` (compact) and Android's date and time dialogs | `@react-native-community/datetimepicker`'s `DateTimePicker`; UIKit `UIDatePicker` | React Native's name for the system's picker; not `DatePicker`, which is `nsh/base`'s drawn one | -| `UIDatePicker.datePickerMode` (`.date`, `.time`, `.dateAndTime`), React Native's `mode` (`"date"`, `"time"`, `"datetime"`) | `mode: DateTimePickerMode` (`"date"`, `"time"`, `"dateTime"`) | `UIDatePickerMode` | Camel case, as every NSH string union | -| `UIDatePicker.date`, `minimumDate`, `maximumDate`; React Native's `value: Date`, `minimumDate`, `maximumDate` | `value`, `min`, `max`: ISO strings in the mode's form (`DateTimePickerValue` in Rust) | HTML's ``, `"time"`, `"datetime-local"` | As `nsh/base`'s `DatePicker`'s values: wall-clock times with no zone, so HTML's names for the bounds | -| `minuteInterval` | `minuteInterval` | UIKit, React Native | | -| `UIDatePicker.accessibilityLabel`, Android's `contentDescription` | `accessibilityLabel` | React Native | As every element's; the picker shows only its value | -| `UIControlEventValueChanged`, React Native's `onChange(event, date)` | `onChange({ value })` | "Value state" above | | +| (none: `gpui-component`'s popup holds only the presets, the calendar and the time) | slots `header` and `footer`, the popup's (or sheet's) first and last children | `gpui-component` `Command::header` / `footer`, `Combobox::footer`; NSH `Command`'s `header` / `footer`, `Combobox`'s `footer`; shadcn/ui `DialogHeader` / `DialogFooter`, `SheetHeader` / `SheetFooter` | NSH addition for pickers that commit on Apply (typed start and end fields above, Cancel / Apply below) without rebuilding the popup; the slots' elements are the app's, styled by their own classes, so they take no part of their own. `headerClass` stays the calendar's header (`Calendar`'s part, passed on since v0.4.0): a released name is not moved, and the slot needs no class | +| `DatePickerState::select_date` closing the popup on a complete date (no option) | no prop: a pick asks to close with `onOpenChange({ open: false, reason: "select" })`, after `onChange`; an app that controls `open` and does not follow it keeps the popup open | shadcn/ui's date picker (a controlled `Popover` the app closes in the calendar's `onSelect`); `gpui-component`'s `DatePicker` has no such option | Not added: the controlled `open` and its reasons already let the app keep the popup open for Apply, so a `closeOnSelect` flag would be a second way to say it. The selected day pressed again (with a time, on the desktops) asks with `"select"` too | | **Editor's decorations** (`nsh/base`) | | | | | `GutterDecoration`, `GutterDecorationCollection`, `EditorState::create_gutter_decorations_collection` | `EditorDecoration.gutter: EditorGutterMark { placement?, class?, style? }` | `input/editor/decorations.rs` (#3704); Monaco `IModelDecorationOptions` | Not followed: a mark of the decorations the app already passes, as Monaco puts both on one decoration, so a range has one place and the editor one list. "Mark": it is a part of a decoration, not one. A collection's `set` / `append` / `clear` / `dispose` are the prop's new value | | An empty range as a line boundary (`GutterDecoration` keeps empty ranges) | `placement: "lines" \| "before"` (default `lines`: an empty range covers its line) | `input/editor/decorations.rs` | Not followed: on one decoration an empty range already means its line (`lineClass`, breakpoints); the boundary is asked for, never inferred from the range | diff --git a/third-party/nsh/docs/dev/canvas.md b/third-party/nsh/docs/dev/canvas.md index 56249a62f21..a956c95d1cf 100644 --- a/third-party/nsh/docs/dev/canvas.md +++ b/third-party/nsh/docs/dev/canvas.md @@ -101,7 +101,10 @@ On Linux, a canvas out of sight (outside a clipping ancestor or the window) is n drawn until it comes into sight: its animations ask for no frames. Android, the web runtime and the GPUI backend (which rasterizes the drawing, text outlines included, with tiny-skia into a pixmap in device pixels: `nsh-platform-gpui` `canvas.rs`) still redraw the whole canvas. Numbers: -`docs/dev/performance.md`. +`docs/dev/performance.md`. The web runtime redraws a canvas once per display frame (`web/nsh.js` `drawSoon`): the +batches between two frames (pointer moves, a stream of updates, each a task of its own) only mark it, and +`requestAnimationFrame` replays the last drawing before the paint. A change made in a frame (an animated value the +engine's `nsh_frame` steps) draws in that frame, and a shader's picture (`paintHost`) draws the pending ones first. Windows also omits a `source-over` paint whose current values cannot change a pixel before it builds the geometry, lays the text out or looks the bitmap up: zero `globalAlpha` (the shadow's alpha is multiplied by it, so it hides diff --git a/third-party/nsh/docs/dev/commands.md b/third-party/nsh/docs/dev/commands.md index 9275307b0c7..a552a9c2bef 100644 --- a/third-party/nsh/docs/dev/commands.md +++ b/third-party/nsh/docs/dev/commands.md @@ -65,15 +65,15 @@ cargo test --release -p nsh-engine --test engine bench_gallery_scroll -- --ignor cargo test --release -p nsh-core bench_ -- --ignored --nocapture # row / cell relayout benchmarks cargo +nightly fmt --all # .rustfmt.toml uses nightly options cargo clippy --workspace --all-targets -cargo clippy -p nsh-platform-ios -p nsh-ios-host -p nsh-ios-app -p nsh-extra --target aarch64-apple-ios-macabi --features nsh-platform-ios/embed,nsh-platform-ios/dev,nsh-extra/camera,nsh-extra/photos,nsh-extra/push,nsh-extra/speech +cargo clippy -p nsh-platform-ios -p nsh-ios-host -p nsh-ios-app -p nsh-extra --target aarch64-apple-ios-macabi --features nsh-platform-ios/embed,nsh-platform-ios/dev,nsh-extra/camera,nsh-extra/photos,nsh-extra/location,nsh-extra/push,nsh-extra/share,nsh-extra/speech cargo xtask ios-embed [--dynamic] [--x86-64-simulator] [--no-catalyst] [--no-dev] # NativeShell(Dev).xcframework into dist/nsh/embed/ios cargo xtask web # nsh.wasm + player + website demos into website/public/play cargo xtask compat # tests/compat's apps, and the API every recorded release froze (nsh-compat) cargo xtask compat record # record this checkout as a release in nsh-compat (at release time) cargo clippy -p nsh-platform-web --target wasm32-unknown-unknown --features compiler # the web backend (empty off WebAssembly) -cargo clippy -p nsh-extra --target wasm32-unknown-unknown --features nsh-extra/speech # nsh-extra's web code (empty off WebAssembly) +cargo clippy -p nsh-extra --target wasm32-unknown-unknown --features nsh-extra/location,nsh-extra/share,nsh-extra/speech # nsh-extra's web code (empty off WebAssembly) cargo clippy -p nsh-platform-linux -p nsh-linux-host -p nsh-linux-app --all-targets # the Linux backend (on Linux; empty elsewhere) -cargo clippy -p nsh-platform-macos -p nsh-macos-host -p nsh-macos-app -p nsh-extra --all-targets --features nsh-platform-macos/dev,nsh-extra/speech # the macOS backend (on macOS) +cargo clippy -p nsh-platform-macos -p nsh-macos-host -p nsh-macos-app -p nsh-extra --all-targets --features nsh-platform-macos/dev,nsh-extra/location,nsh-extra/share,nsh-extra/speech # the macOS backend (on macOS) cargo clippy -p nsh-platform-windows -p nsh-windows-host -p nsh-windows-app -p nsh-extra --all-targets --features nsh-extra/speech # the Windows backend (on Windows; empty elsewhere) cargo test -p nsh-platform-windows -p nsh-windows-host -p nsh-windows-app # its tests (on Windows; they open no window) (cd crates/gpui && cargo clippy --all-targets --features nsh-platform-gpui/dev) # the GPUI backend, its own workspace (empty off the desktops) diff --git a/third-party/nsh/docs/dev/components.md b/third-party/nsh/docs/dev/components.md index 88f44fd1486..95006af5282 100644 --- a/third-party/nsh/docs/dev/components.md +++ b/third-party/nsh/docs/dev/components.md @@ -354,7 +354,7 @@ reasons: `reactive-components.md`. | `announce(message)`, `setAccessibilityFocus(ref)` (`nsh`'s accessibility API) | `announce_for_accessibility(msg)`, `note.set_accessibility_focus()` (an `ElementRef`) | | `safeAreaInsets()` | `cx.insets()`: the insets where the component is (the nearest screen's or modal's, else the surface's safe area) | | a signal or store at module level | `global::()`: a `Signal` of the surface, made with `Default` (shared by its components and modules) | - | `context(default)` / `` / `Ctx()` | `provide_context(value)` in the body; `use_context::()` below it (through the app's elements too: a component JS made among another's JS children is under where that one places them); provide a signal to change what readers see | + | `context(default)` / `` / `Ctx()` | `provide_context(value)` in the body; `use_context::()` below it (through the app's elements too: a component passed as another's children or slot content, from JS or a Rust view, reads the context where that one places it); provide a signal to change what readers see | | `createAnimatedValue`, `Animated.spring`, `interpolate` | `animated_value(0.0)` (`Copy`, kept by the current owner); `.bind_translate_y(&v)` / `.bind_opacity(..)` / `.bind_background(..)` / `.bind_border_color(..)` / `.bind_color(..)` / `.bind_scale(..)` / `.bind_rotate(..)`, `.pan_values(..)` (drags move it natively), `.pinch_value(&scale)` / `.rotation_value(&angle)` (TS `pinch={{ scale }}`, `rotation={{ angle }}`), `scroll().scroll_value(&v)`, canvas arguments (`Painter::new().fill_rect(0.0, 0.0, &v, 4.0)`); `v.spring(to, Spring::default())` / `.timing(to, ms, easing)` / `.timing_with(to, Timing { delay_ms, .. })` / `.decay(..)` / `.decay_within(.., (min, max), bounce)` return an `AnimationEnd` to await; `v.value()` (`getValue()`; after `v.stop()`, the `{ value }` of `stop()`'s promise) an `Answer`; `v.set_offset(..)` / `.flatten_offset()` / `.extract_offset()`; `element::sample_easing` / `sample_spring` / `sample_decay` (`Easing.sample`, `Animated.sampleSpring` / `sampleDecay`) the curves, to draw them; `v.interpolate(..)`, `.interpolate_with(.., Interpolation { extrapolate_left, extrapolate_right, easing })`, `.add(..)`, `.diff_clamp(..)` derive nodes | | `Animated.sequence / parallel / stagger / delay / loop`, `.start(cb)` / `.stop()` / `.reset()` | `Animation::sequence([Animation::timing(&v, to, Timing::new(ms, easing)), Animation::delay(ms), Animation::spring(..)])`, `::parallel(..)` (`.stop_together(false)`), `::stagger(ms, ..)`, `.looped(iterations)` (`.reset_before_iteration(false)`); `a.start()` returns an `AnimationEnd`, `a.stop()`, `a.reset()` | | `keymap.bind("mod+k", f, { scope, when, repeat, passThrough, forFocus, overFocused })`, `keymap.label("mod+k")` (`nsh`'s `keymap`) | `on_key("mod+k", \|keystroke\| ..)` / `on_key_with(k, KeyOptions { scope, when, repeat, pass_through, for_focus, over_focused }, f)`, bound while the current owner lives and only in the window bound in (`current_window`, or, for a component JS places in a `Window`, the window its view is in: a binding fires only for keys pressed in that window, `KeyBinding::window`; JS bindings made inside a `` are that window's, and app-root ones are app-wide, as `KeyScope` says); `key_label("mod+k")` (`⌘K`, `Ctrl+K`). The core joins the views' bindings to JS's in the root's one table (a view's after JS's: it wins on the same keystroke; bindings `OverFocused::Always` (`overFocused: true`), JS's or a view's, come after both, so the app takes a key a focused component binds, and the overlay's Escape stays last) and runs a view's handler itself when the root's `KeyCommand` reports it; their ids start at 2^31, above JS's (`element/keys.rs`) | @@ -658,7 +658,7 @@ accessibility states the components report (listbox, tree and tab rows their sel | `Checkbox` | `[✓]` (the `✓` in the accent), `[ ]` (muted) or `[–]` (the dash in the accent) and a space in place of the indicator, then the children in a view of their own beside it (a column: a choice card's title over its description) | | `Radio` | `[●]` (the dot in the accent) or `[ ]` (muted), a checkbox's width, and a space before the children, in a row (an app's own dot among its children is the app's to leave out) | | `Switch` | a checkbox's mark and a space in place of the track and thumb: on `[✓]`, off `[ ]`, as terminal apps show an on / off setting (a knob on a track would read as a slider); the role stays a switch for screen readers | -| `Slider` | one row of `─` as wide as the slider, `━` from `min` to the value (a range: between its thumbs) in the accent, the rest muted, a `●` view per thumb on its value's Cell (focus, keys, drags and screen readers as elsewhere); vertical: a column of `│` / `┃` | +| `Slider` | one row of `─` as wide as the slider, `━` from `min` to the value (a range: between its thumbs) in the accent, the rest muted, a `●` view per thumb on its value's Cell (focus, keys, drags and screen readers as elsewhere; no `renderThumb` content); vertical: a column of `│` / `┃` | | `Progress` | one row as wide as the bar: full Cells `█`, the partial Cell by eighths `▏▎▍▌▋▊▉`, then `░`, the filled Cells in the accent; indeterminate: a four-Cell segment moving one Cell every 120 ms (only while indeterminate; reduced motion: `░` only) | | `ColorSlider` | one row of Cells over the slider's width, each filled with the channel's color at that point of the track (role `Image`, hidden from screen readers: the terminal paints it as the color itself, quantized at 256 colors, no fill where it paints none) the thumb a `│` on the Cell of the value (`terminal::COLOR_THUMB`), no line along the track; the slider is the focusable adjustable control, keys as elsewhere, a press or a drag on a Cell picks its value (`color_picker/tui.rs`) | | `ColorArea` | a grid of such Cells filling the area, as many as its width and its whole rows hold (at most 240 by 64): the hue at each column's saturation and each row's brightness, the picked Cell `◆`; keys, presses and drags as elsewhere | @@ -836,9 +836,11 @@ root become nodes the core creates itself. Apps without components pay one check element: at the view's first mount, before the host's native view is sent, the core gives the host the root's kind (`Core::retag`: a text, a screen, a modal, a list), so the root's props and children apply to it; a root that is a region goes in the host view. Besides the component's own props, JS sets a view's props on the host -(`nsh_core::element::HOST_PROPS`, declared as `ComponentHostProps`): classes, styles, `testID`, `tooltip`, +(`nsh_core::element::HOST_PROPS`, declared as `ComponentHostProps`): classes, styles, `testID`, its +accessibility, `tooltip`, `onLayout`, the desktop file drops (`onFileDragEnter`, `onFileDragLeave`, `onFileDrop`), the mouse over it -(`onMouseEnter`, `onMouseMove`, `onMouseLeave`, `onMouseUp`) and `onContextMenu`, so a component is a drop +(`onMouseEnter`, `onMouseMove`, `onMouseLeave`, `onMouseUp`), `onContextMenu` and the actions assistive +technologies perform (`onAccessibilityAction`), so a component is a drop destination, and hears the mouse, only where the app listens. A component's own prop or event of one of these names takes its place (`ComponentSpec::host_props`: JS sets the rest on the host, in QuickJS and in the browser, and its declaration omits it from `ComponentHostProps`): `DataTable`'s and `Editor`'s `onContextMenu` report a row and column @@ -870,10 +872,11 @@ forgotten. A view JS made (`` in TSX) is made when its host is first in the root's tree, so it is under the view that placed it: it adopts the owner of the nearest component above it (where that one places its JS children, else its own owner), and `use_context` and failures reach that far (`owner_above`, `adopt`). Until then it waits -(`components.waiting`). A component a Rust view passes as a nested component's content (`tabs().child(tab())`), -directly or inside plain views of that content (`tabs().child(view().child(tab()))`), joins that host as JS -children do (`Instance::joined`) and waits the same way, so it reads the context of the view that places it, not -only its maker's. +(`components.waiting`). A component a Rust view passes as a nested component's content, its children (`tabs().child(tab())`) or a slot's +fill (`submenu().trigger(label())`), directly or inside plain views of that content +(`tabs().child(view().child(tab()))`), joins that host as JS children and JS slot content do (`Instance::joined`) +and waits the same way, so it reads the context of the view that places it, not only its maker's. Only the context +moves: its lifetime stays the run that made it. JS allocates even node ids (from 2), the core odd ones (from 3), so both id spaces stay dense and never collide. JS never sees the made nodes; their events are the component's (below). @@ -905,7 +908,11 @@ what changed. ## Children, slots and rows -- JS inserts a component's children into the host; the core places them where the view's `Children` is, before the +- A value prop named `children`, such as `children: Prop`, receives the JSX child as a typed value. + The compiler supplies it as `props.children`, and the JS face reads it in the ordinary prop effect, including + when a signal read by its getter changes. The generated TypeScript declaration for `Prop` is + `children: string`. Read `props.children.get()` in a Rust binding or computation to track the value. +- For a `Children` slot, JS inserts a component's children into the host; the core places them where the view's `Children` is, before the node that follows it (or keeps them out of the tree while the view has none: a `Children` in a region that is not shown). The core sets the `Prop` when JS adds the first child or removes the last, so `props.children.get().is_empty()` in a binding follows it. With `children_each`, the children are an `Each` keyed by the child's node over a signal of the host's JS @@ -1249,11 +1256,8 @@ desktop OS a press shows the same items with `popup_menu`; on the web the conten `ContextMenuComponent.java`) shows the system's menu from `MenuButton`'s item data, and `menu.rs` reports it with the drawn menu's events. Android has no context menu a held finger opens by itself, so `menu.rs` keeps the drawn menu's hold there and asks the component with `open` (and `at`, the held point); elsewhere, and without items, the menu is -the drawn one. `nsh/mobile`'s `SegmentedControl` is the same kind of native -component, `nsh/segmented-control` (`system_segmented_control.rs`), built as `TabBar` is; so is its `Switch`, -`nsh/switch` (`system_switch.rs` on iOS, `SwitchComponent.java` on Android), and its `DateTimePicker`, -`nsh/date-time-picker` (iOS `system_date_time_picker.rs`, Android `DateTimePickerComponent.java`): values cross to the -platforms as their fields, never as strings to parse, and come back the same way. +the drawn one. System-styled form controls (a segmented control, a switch, a date and time picker) are not native +components of NSH's: they live in an nshm (`nsh-system-controls`), which registers its own native components. `HoverCard` (`hover_card.rs`) is `gpui-base`'s `HoverCard` on `Popover`'s overlay and presence. On the desktops the pointer is followed by Rust listeners, `onMouseEnter` / `onMouseLeave` on the `trigger` slot (the app's element) and on @@ -1310,7 +1314,10 @@ with every prop of `Calendar` passed on (`calendar::Config`); opening it on the days (`Grid::focus_days`). A complete date is the value and closes it with `"select"`; with a time the popup stays open on the desktops, each edit reported, until the selected day is pressed again (`gpui-component`'s double click), while in a sheet (touch screens, the `sheet` the content is made for) a tap on a day picks it at its time and closes, -as a single date does: a touch has no double click (`api-naming.md`). The trigger's keys are bound while it has the +as a single date does: a touch has no double click (`api-naming.md`). Each pick is reported before its `"select"`, +so an app that controls `open` and does not follow a `"select"` keeps the popup open and closes it itself (a pending +value committed from its `footer`). The app's `header` and `footer` slots are the popup's first and last children, +around the content, so their Tab stops come before and after the calendar's. The trigger's keys are bound while it has the focus: Return opens and closes (`gpui-base`'s `Confirm`), Delete and Backspace clear while it is closed. The value crosses to JS in the HTML inputs' forms (`date`, `datetime-local`), at the precision of `timePrecision` (`PickedDate`). diff --git a/third-party/nsh/docs/dev/dock.md b/third-party/nsh/docs/dev/dock.md index 1bc68372993..dc5b7d02d90 100644 --- a/third-party/nsh/docs/dev/dock.md +++ b/third-party/nsh/docs/dev/dock.md @@ -82,7 +82,7 @@ is an entity the dock holds, and reconciliation against the `NodeId` cache keeps tab groups are rendered by the area for each `NodeId` and the panels by the app for each `PanelId`, and both survive every edit that keeps them. -The other parts the app draws are render props as well (`renderTab`, `renderDragPreview` and `renderToolbar` (the toolbar at the end of a group's tab bar, for its displayed tab) with a `DockTab`, +The other parts the app draws are render props as well (`renderTab`, `renderDragPreview` and `renderToolbar` (the toolbar at the end of a group's tab bar, for its displayed tab), `renderTabBarPrefix` (what the bar starts with, before the tabs) with a `DockTab`, `renderDropIndicator` with a `DockDropIndicator`, `renderDock` with a `DockInfo`, `renderEmpty`), and every part takes `Class` / `Style` (group, tab bar, tab, content, drop indicator, handle, handle thumb, dock, and compact's drawer, sheet and backdrop). The drop indicator moves natively: when its target changes the area asks for a @@ -108,8 +108,13 @@ The grant starts the drag: every group's tab bar, tabs and content frame are mea view's coordinates in one task, answered with the next commit. Each move resolves the target from those bounds: over a tab bar, the slot between the tabs the pointer is past (counted without the dragged tab); over a content frame, its middle merges and its outer 35% on each side splits (`split_placement_at`), except back onto its own group when that would change -nothing. The drop indicator part covers what the panel would take in the target group -(`DropPlaceholderBounds::for_placement`): it is one overlay in the root view, under the drag preview (overlays stack +nothing. Over a content frame the drop indicator part covers what the panel would take in the target group +(`DropPlaceholderBounds::for_placement`); over a tab bar (the compact strip's too) the target carries an insertion +line instead (`DropAt::line`, `tab_group.rs` `slot_line`: 2 points across, the bar's height, centered on the boundary +between the measured tabs around the slot, kept inside the bar; horizontal on a vertical bar), drawn by `drop_line` in +the theme's `ring` color (in a terminal, which draws no fills, one Cell across with a border in `terminal::ACCENT`: +`│` across a row of tabs, `─` down a column), and neither the indicator nor +`renderDropIndicator` is drawn for it. Each is one overlay in the root view, under the drag preview (overlays stack in the order they open, and the indicator opens once the drag has a target, so the preview is mounted again after it, a row keyed by `AreaCx::indicator_shown`: a region run again keeps its node and its place), placed with the content frame the drag measured, so it draws above the handles, whose lines lie over the edges of the groups beside them, and no frame clips it, and the release applies one move (`PaneTree::move_panel` within a tree, diff --git a/third-party/nsh/docs/dev/elements.md b/third-party/nsh/docs/dev/elements.md index 092f4b11f27..06b591bcd25 100644 --- a/third-party/nsh/docs/dev/elements.md +++ b/third-party/nsh/docs/dev/elements.md @@ -278,7 +278,7 @@ misses the deadline is not waited for again until it catches up (`docs/dev/macos it; an app's other bindings of those keys (a dialog's Return for its main action) give way to the control the user moved the focus to, on every platform (`Keymap::find_at`, `input::presses_focused_control`). A binding that takes them over a pointer's focus (`KeyOptions::over_focused`'s `OverFocused::Pointer`, TS's `overFocused: "pointer"`: a media player's Space) - fires instead, before the focus' own, while a pointer gave the focus: the core notes it as the focus is reported + fires instead, before the focus' own, when it is eligible in the current window and a pointer gave the focus: the core notes it as the focus is reported (the input modality then, or a popup a press opened giving it back, `Core::pointer_focus_back`) and mounts the keymap again as it changes, carrying it (`Keymap::pointer_focus`), only while a binding asks; the platforms ask `Keymap::find_with` or, matching the bindings themselves (GTK), `Keymap::gives_way`. Return and Space press @@ -362,8 +362,12 @@ misses the deadline is not waited for again until it catches up (`docs/dev/macos coordinates of touches' `pageX` / `pageY`, so `e.pageX - m.pagePosition.x` is a touch's position in the measured view whatever view the finger went down on (`locationX` is relative to that one). The core answers it from its layout (`Command::Measure`, `Core::measure`: the frames it mounted, summed up the tree), never by asking the platform: the - scroll views and lists around subtract their content offsets (as the platforms last reported them, `set_scroll_offset`) - and apply their zoom scales; transforms, native animations included, are not applied, nor is the mirroring of + scroll views and lists around subtract the content offset shown with the batch (`Core::content_offset`). That is the + platform's latest report; for a list, or the scroll view around a `viewport="parent"` list, it also counts the instant + scrolls the core sends or queues with the batch — keeping rows in place as rows above them measure, following the end + through a resize, or scrolling that surrounding view — while an animated scroll counts as the platform reports its + progress, not at its destination before it gets there. Both apply their zoom scales; + transforms, native animations included, are not applied, nor is the mirroring of right-to-left horizontal lists (scaleX −1). The answer settles the promise from the core's events (`JsEvent::Reply`), like a module call's (`nsh-js` `components.rs`). There is no `measureInWindow`: the root view is the window for a full-screen surface, and an embedding app knows where it put the surface. @@ -503,9 +507,7 @@ misses the deadline is not waited for again until it catches up (`docs/dev/macos send one, as its props change. The state words iOS and Android supply (checked, expanded, current, invalid...) are in the language of the app's text, as NSH's menus on the desktops are (`i18n::text_locale`): the core sends `Command::TextLocale` on the root of those surfaces when it changes, and the words of mounted views follow it the - next time a screen reader reads them. Android's `DateTimePicker` shows its value in that language too (the user's 12- - or 24-hour clock kept), formatted again when it changes, and its date and time dialogs their own words (buttons, - month and day names, the date dialog's header) from the next dialog opened. + next time a screen reader reads them. The `increment` / `decrement` actions make an element adjustable whatever its role: iOS adds the adjustable trait to the traits of its role (`native_view.rs` `traits`), so VoiceOver's swipe up / down performs them (an `image`, `Plot`'s role, stays an image), Android offers scroll forward / backward, Windows @@ -644,6 +646,11 @@ misses the deadline is not waited for again until it catches up (`docs/dev/macos `KeyboardMotion::aligned`), and runs the scroll view's inset and scroll in one animation of that curve; Android takes the IME's `WindowInsetsAnimation` (interpolator, duration, start; API 30+) and fast-forwards its animators to it (`Mounter.keyboardAligned`), the scroll to the input included. +- **Presses on inputs**: an input's field keeps its own clicks and taps (the caret, a selection, the focus, its edit + menu), on its text or on its padding; only an `Input` that listens to presses hears them, after the focus the press + gives the field, and no view around it does, on every platform. A drag or a touch held on the field is the field's, + not a press. An input that listens is still read as its text field, not as a button around it, and is no stop of + Tab of its own. - **Controlled inputs**: each native edit carries an edit count; a `value` from JS is applied only if it is based on the latest edit, so a slow JS round trip can never overwrite newer typing (React Native's eventCount). While an input method composes, a `value` is held natively and applied when the composition ends, if no edit came diff --git a/third-party/nsh/docs/dev/embedding.md b/third-party/nsh/docs/dev/embedding.md index 69562c00a31..6f77b45e8fd 100644 --- a/third-party/nsh/docs/dev/embedding.md +++ b/third-party/nsh/docs/dev/embedding.md @@ -47,7 +47,8 @@ reads with the app's id (`nsh_engine::Bundle::url_schemes`; a Rust app's `Root::url_schemes`), never from the app's code. The platform reports every URL the system opens the app with as the root's `UrlScheme` event; the core drops the links of other schemes and keeps the rest until the app listens (`UrlScheme.on("open")`, - `next_url_scheme_open()`). Links are untrusted input: the app checks what they ask for, and nothing navigates on its own. + `next_url_scheme_open()`; a native module waiting for a link of one scheme, `next_url_scheme_open_for(scheme)`, + takes those alone while it waits). Links are untrusted input: the app checks what they ask for, and nothing navigates on its own. A signed package embedded in another app claims no schemes: the embedding app owns them. - Handoff: `nsh.json` `"handoff": true` makes `nsh package` declare `.url` in `NSUserActivityTypes` on macOS and iOS; the release runners turn it on when their bundle declares it (`nsh_platform_apple::handoff::declared`), and an @@ -87,6 +88,8 @@ initial default; explicit main-window attributes and later window updates take precedence. Standard hosts leave that option false but can request transparency through their window configuration. A view's `behindWindow` material does not enable window transparency. An `AppView` never changes its host's window. + An embedded macOS `AppView` (not `run_app`'s) mounts a plain JS root (`mount(App)`, no ``) in itself, + as it does a Rust app, rather than in an implicit `main` window (#3514); the app's ``s still open windows. GPUI and GPUI Kit apps use `nsh_platform_gpui::AppView`, a GPUI view (`gpui.md`): set `AppOptions::inline_root` to `true`, create the view with `cx.new(|cx| AppView::new(options, window, cx))` inside a window, load the plain JS root with `view.read(cx).load(App::Js(bundle))`, then put the entity in any element tree (in a GPUI Kit window, as @@ -445,7 +448,9 @@ NSH draws (`src/layers.rs`). from the next load. A new kind of cache is one more `CachePolicy` field, never another option per platform. - **Development.** With feature `dev`, `view.update(cx, |view, cx| view.connect_dev_server(url, cx))` loads the app from a `nsh dev` server and reloads it on every change, as `connectDevServer` on iOS and Android: the server's - assets, logs forwarded to the developer's terminal, the status line and the error overlay over the view, the reload + assets, logs forwarded to the developer's terminal (through the `DevLogger` of `dev::init_logging`, or, in an app + with a `log` logger of its own, through `dev::forward` called from that logger; `init_logging` warns when another + logger is installed), the status line and the error overlay over the view, the reload key. The embedding app's `on_error` keeps hearing the app's errors next to the overlay; connecting again replaces the session. `dev` keeps the optional parts the app's build chose ([features.md](features.md)), so an app importing a part its release leaves out fails here as it would there. `crates/gpui/nsh-platform-gpui/examples/embed.rs` takes a dev server's URL. diff --git a/third-party/nsh/docs/dev/gpui.md b/third-party/nsh/docs/dev/gpui.md index f61d5255e5c..a6843568a83 100644 --- a/third-party/nsh/docs/dev/gpui.md +++ b/third-party/nsh/docs/dev/gpui.md @@ -315,7 +315,7 @@ layout when tokens are cleared, reinstalled or switched between light and dark. | Clipboard | `system.rs` | GPUI's (`write_to_clipboard` / `read_from_clipboard`): text, `ClipboardEntry::Image` (a format other than PNG, JPEG, GIF, BMP or WebP, such as TIFF, is made PNG on a worker thread) and `ExternalPaths` (files). GPUI reads one kind per item, preferring files, then text, then images, so an item with text and an image (a browser's copied image with its address) gives the text | | File drops | `file_drop.rs` | GPUI makes a drag from another application an internal drag of `ExternalPaths` that only its own elements hear, and the surface's hitbox blocks the mouse for those behind it: while a drag is active the `AppView` lays a layer over the surface whose drag moves and drop pick the destination (the closest `onFileDrop` listener under the pointer, within its modal: `input::file_drop_target`) and deliver absolute paths as `file:` URLs on entry as well as drop; moving between destinations leaves one and enters the next, and leaving the window, dropping, removal or disablement clear it. The first report after a drag enters is the platform's next move (the layer comes with the drag's frame) | | Networking | `nsh_engine::net` | ureq, the stack Windows and Linux use | -| Dev | `dev.rs` | `AppView::connect_dev_server` (also what `AppSource::DevServer` runs): the dev client on its own thread (reconnecting with a backoff); its events, runtime errors and the reload key drained by a foreground task of the view, which ends when the view connects again; the status line and the error overlay are GPUI elements over the surface; the surface reports errors to the overlay and to the embedding app's `on_error` alike | +| Dev | `dev.rs` | `AppView::connect_dev_server` (also what `AppSource::DevServer` runs): the dev client on its own thread (reconnecting with a backoff); its events, runtime errors and the reload key drained by a foreground task of the view, which ends when the view connects again; the status line and the error overlay are GPUI elements over the surface; the surface reports errors to the overlay and to the embedding app's `on_error` alike; logs reach the dev server through `DevLogger` (`init_logging`) or `dev::forward`, which an embedding app's own logger calls (both send to the latest connection) | ## Frame statistics: `--fps` @@ -483,7 +483,10 @@ parent's input), `panel` to a floating one, `popup` and `overlay` to a pop-up on has calls for go through GPUI; the others go to the native window under it (`window/native.rs`: AppKit's window on macOS, the Win32 window on Windows; levels, workspaces, showing and hiding, moving, ownership and the like). The close, Escape and blur policies are answered on the main thread; states, close presses and title bar areas are -reported per window, moves and resizes once they settle. A hidden title bar gets the main window's drawn controls +reported per window, moves and resizes once they settle. `pointerEvents: "box-none"` asks the input's picking +(`input::takes_pointer`, the root aside) where the window takes the pointer, or for its rectangles +(`input::pointer_rects`) where the system takes an input shape; `window/box_none.rs` lets the pointer through +elsewhere on each desktop. A host's window an embedded surface draws in is left as it is. A hidden title bar gets the main window's drawn controls on Windows and Linux. Views with `windowDrag`, `windowControl` and `windowResize` act as the title bar, the system's buttons and the frame's edges. diff --git a/third-party/nsh/docs/dev/js-modules.md b/third-party/nsh/docs/dev/js-modules.md index 56d500b6ace..c6715216ee5 100644 --- a/third-party/nsh/docs/dev/js-modules.md +++ b/third-party/nsh/docs/dev/js-modules.md @@ -36,14 +36,14 @@ import, and their declarations and types go into `nsh`'s own file. Apps import a | Module | Exports | Implemented in (`crates/nsh-js/src`) | |---|---|---| -| `nsh` | `signal`, `computed`, `effect`, `batch`, `untracked`, `cleanup`, `context`, `split`, `mount`, `ErrorBoundary` (`dom.rs`: a memo of the children or the fallback, `native-pipeline.md`), `resource` (`resource.rs`: a callable object over four signals, its loads kept by `nsh_core::resource::Runs`); `View`, `Text`, `Scroll` (host elements as components: `dom::host_component`); `View`'s `selectable` (texts that select together); padding and margin take `env()` (safe area, keyboard: `styles.md` "Environment variables"); `Keyboard.dismiss()` (a Rust module of `nsh-core`, `element/keyboard.rs`), `safeArea()`, `safeAreaInsets()`, `keyboardFrame()` (the environment's accessors, `env.rs`, re-exported by the same registry); `List` (`list.rs`), `Canvas`, `Path2D`, `CanvasRenderingContext2D`, `CanvasGradient` (`canvas.rs`), `Image`: the image element's component, with `Image.getSize`, `Image.prefetch` (promises the core resolves from the root's `ImageInfo` event, rejecting a URL `network` does not grant with `ERR_ACCESS_DENIED` in the call; the `nsh` registry's functions, `components.rs`), `WebView`, `Video` (`platform_modules.rs`); the refs (`ViewRef`, `InputRef`, `ScrollRef`, `ListRef`, `WebViewRef`, `VideoRef`, `NativeComponentRef`: `declarations::REFS`), `Accessor`, `Signal`, `Context`, `Component`, the types of styles, element props, events and `JSX`; The app's theme: `token(name)`, `setTheme(theme)` (`env.rs`; `components.md` "The theme"); Animation: `createAnimatedValue`, `AnimatedValue`, `AnimatedNode`, `Animated`, `Easing`, `LayoutAnimation` (`animated.rs`); The environment: `windowSize()`, `colorScheme()`, `fontScale()`, `pixelRatio()`, `locale()` (accessors), `setColorScheme`, `fpsEnabled()` (an accessor `env.rs` writes when the engine gets a performance monitor or loses it, `EngineControl::set_perf_monitor`) and `setFpsEnabled(enabled)` (Rust, `runtime/fps.rs`: the root's `Command::PerfMonitor`, which each platform's monitor follows; `NSH_FPS=1`, `nsh_engine::perf::enabled_by_env`, turns it on at launch), `platform` (a constant: `os`, `version`, `idiom`, `desktop`, `catalyst`, `select`; `desktop`, the `desktop` idiom and `select`'s `desktop` are `Environment::desktop()`, `elements.md` "Platform modules"); `openUrl(url)` (Rust, `nsh_core::runtime`'s `device.rs`: a promise of `{ opened }`, whether the URL opened outside the app, `nsh_core::open_url`; it rejects with a `TypeError` for a URL it never opens and with `ERR_ACCESS_DENIED` for a scheme `openUrl` does not grant; `sandbox.md`, `embedding.md` "The host channel") (`env.rs` + its registry); Accessibility: `screenReaderEnabled()`, `reduceMotion()` (accessors), `announce(message)`, `setAccessibilityFocus(node)` (`env.rs` + its registry (`nsh_core::runtime`)); Gestures: `PanResponder` (`touch.rs`); The clipboard: `Clipboard.writeText(text)`, `Clipboard.write({ text, html })` (a `ClipboardItem`, a plain object of its formats as GPUI's and the DOM's item holds its representations: the same content as plain text and as the platform's HTML type, one `Command::SetClipboardItem` carrying the item, every format in one clipboard write, so a format added to the item travels in the same command; a platform without an HTML type (GPUI, terminals) writes the text, the HTML being an enrichment of the same content, while `writeImage` rejects where the platform has no images, an image having no text to fall back to; the web writes within the user's gesture through the page's `copy` event, as ProseMirror copies, then the async Clipboard API), `Clipboard.readText()` / `hasText()`, `writeImage(src)`, `readImage()` / `hasImage()`, `readFiles()` (promises the core resolves from the root's `Clipboard` event; the `has*` reads do not read the content, so iOS shows no paste notice). `readImage`'s `url` is, by contract, a URL that `Image` shows and `fetch` reads, nothing more (its scheme may change, to a native-backed URL); today images cross as base64 `data:` URIs (an image source and a `fetch` URL, so bytes stay native until JS asks for them), files as `file:` URLs one per line; the backends build both with `nsh_core::platform::clipboard`. An image over `MAX_IMAGE_BYTES` (48 MiB encoded) is left out of the answer, which carries its size (`tooLarge`; the core also measures a `data:` URI a backend encoded itself, the web's): `readImage` rejects with `ERR_NSH_QUOTA_EXCEEDED` (`ClipboardRead::CheckedImage`), the Rust API's `clipboard_image` answers `None`. A text read the person refuses (iOS's paste prompt answered with Don't Allow Paste, or pasting from other apps denied in Settings: `UIPasteboard.string` is `nil` while `hasStrings` is `true`) is answered `denied` (the `Clipboard` event's `denied: true`): `readText` rejects with `ERR_ACCESS_DENIED` (`permission` `"clipboard"`, `ClipboardRead::CheckedText`), the Rust API's `clipboard_string` answers `""`. UIPasteboard, ClipboardManager (text only), NSPasteboard, GDK, Win32, `navigator.clipboard`; on Android (`System::os`, checked in the call) `writeImage` and `readImage` reject with `ERR_FEATURE_UNAVAILABLE_ON_PLATFORM` and `hasImage` resolves `false` without asking the platform; the `clipboard` capability, checked in each call first: without it every function rejects with `ERR_ACCESS_DENIED` (its registry (`nsh_core::runtime`)); The photo picker: `Picker.pickImages({ multiple, limit, maxDimension, quality, format })`: the system's picker for photos, resolving with `PickedImage`s (`{ file: File, size }`; `[]` when cancelled). A Rust `#[module]` over `nsh_core::picker`: the core sends the root `Command::PickImages` with a checked `PickRequest` (or asks the embedder's `PickerBackend`, `Core::set_picker` / `EngineConfig::picker`), the platform answers with the root's `Pick` event, whose `EventPayload::Picked` carries the files' bytes, and the result becomes `File`s natively (`JsHost::new_file`: a `Blob` over the same `ImageData`, no copy and no base64). The `picker` capability, checked in the call (a pick it does not grant rejects with `ERR_ACCESS_DENIED`; options out of range reject with a `RangeError`) (its registry (`nsh_core::runtime`)); The share sheet: `Share.available()`, `Share.show({ title, text, url, files, anchor })` → `{ action: "shared" | "dismissed", target }`: a Rust `#[module]` (`runtime/share.rs`) over `nsh_core::share`: the core checks the content and the `share` capability (each file against `fs.read` in the call), sends the root `Command::Share` and the platform answers with the root's `Share` event; iOS, Android, macOS and the web (`navigator.share`) show one, elsewhere (`Environment::share` off) `show` rejects with `ERR_FEATURE_UNAVAILABLE_ON_PLATFORM`; Links: `UrlScheme.on("open", listener)` → `() => void` (`{ url }`: a link of a scheme the app claims, `nsh.json` `schemes`; `UrlScheme.url()` / `setUrl(url)`, the app's address, which the core keeps and Rust reads with `app_url()` / `set_app_url()`, on the web the page's (`web.md` "Addresses"); `setUrl(url, { history: "push" })` (`HistoryBehavior`, Rust's `set_app_url_with`, the root's `Command::PushAppUrl`, which iOS and macOS take as `SetAppUrl`); `UrlScheme.on("change", listener)` (`{ url, reason }`: a move of the address the app did not make, the web's back and forward and a typed `#fragment`, Rust's `next_app_url_change()`, its own task in the module, posting only to the listeners there are); a Rust `#[module]` over `nsh_core::url_scheme` (`runtime/url_schemes.rs`) on `next_url_scheme_open()`: the core checks the root's `UrlScheme` events against the schemes the runner gave it and keeps up to 16 until a listener takes them; no capability; `embedding.md`) (its registry (`nsh_core::runtime`)); Sound (`docs/dev/audio-design.md`): `Sound` (`#[class]` without `new`: `Sound.available()`, `Sound.load(src)` → a promise of a `Sound` decoded into memory, `play({ volume, rate })`, `stop()`, `duration`) and `AudioPlayer` (`new AudioPlayer(src, { volume, rate, loop })`, `play()` → a promise settled when it plays, `preload` / `pause` / `seek`, `volume` / `rate` / `loop` / `currentTime` / `duration` / `state`, `on("load" | "progress" | "buffer" | "end" | "error", listener)` → `() => void`): Rust `#[class]`es (`runtime/audio.rs`) over `nsh_core::element::audio` (`load_sound`, `audio_player`: a sound's bytes read through the image loader, one decode per source per engine, the limits of `nsh_core::audio` kept on the engine thread) and the core's `AudioAction`s, which open each sound and player with an `AudioSink` and send the root `Command::Audio` (`AudioCommand`) or the embedder's `AudioBackend` (`Core::set_audio` / `EngineConfig::audio`); the platform answers with the root's `Audio` event (`EventPayload::Audio`, `AudioEvent`). macOS and iOS play with AVFoundation (`nsh-platform-apple` `audio.rs`, which both backends use; one `Speaker` per surface), Windows with XAudio2 and Media Foundation (`nsh-platform-windows` `audio.rs`), Android with `SoundPool` and `MediaPlayer` (`Audio.java`), Linux with `gtk::MediaFile` (`nsh-platform-linux` `audio.rs`), the web with the Web Audio API (`nsh.js`; the core sends `AudioCommand::LoadUrl` there and the browser fetches); elsewhere (`Environment::audio` off: GPUI) sounds and players fail with `unavailable`. The `audio` capability, checked in `load` and the constructor (denied, `ERR_ACCESS_DENIED`; a volume or rate out of range a `RangeError`) and again by the core; Storage: `Storage.getItem` / `setItem` / `removeItem` / `keys` / `clear` (async functions of the core; the entries live in memory in `nsh_core::storage`, loaded once from the platform's `StorageBackend` (`EngineConfig::storage`: `nsh_engine::FileStorage::open` in the app's data directory, `EngineConfig::data_dir` or else `/` (the id travels with the app: `app.json`, the dev server, packages, `Root::app_id`), one per file in the process so a reload reads unflushed writes; a damaged file is set aside as `storage.json.corrupt`, an unreadable one leaves the changes in memory, never replacing it; `localStorage` under `nsh::` on the web) and every change handed to it; 5 MB quota, `setItem` past it rejecting with `ERR_NSH_QUOTA_EXCEEDED`, as it does with a value the backend refuses (`StorageBackend::write` failing: the web's `localStorage`), which is not kept; the web's backend also hands in other tabs' changes (`nsh_core::storage::changed_elsewhere`); `Storage.on("change", listener)` → `() => void` (Rust `Storage::on_change`) hears those and the changes other engines sharing the entries made, never its own engine's; no capability: the app's own data, kept where the host says) (its registry (`nsh_core::runtime`)); The host channel: `host.call(name, args, { timeout })` (the Rust functions Rust code calls too (`element::host_call_with`, `runtime/host.rs`): the core checks a call and keeps it, and the engine hands it to the embedding app's channel where it is configured, else to the platform's host (the root's `Command::HostCall`, answered by the root's `Host` event); it never throws, and rejects with `nsh_core::host_channel`'s errors, checked in this order: a `TypeError` when the name is not valid (`access::valid_host_name`), `ERR_ACCESS_DENIED` (`permission` `"host"`, `resource` the name) when it is not granted, `ERR_FEATURE_UNAVAILABLE_ON_PLATFORM` where nothing hosts the app; then `ERR_NSH_HOST_ERROR` with the host's message when the host fails, and `ETIMEDOUT` past the timeout (30 s unless `timeout` says, 0 none); a timeout too large for the clock waits without limit, a negative or non-finite one rejects with a `RangeError`), `host.available()` (the platform environment or configured native SDK channel), `host.on(event, listener)` → `() => void` (JS listeners of the root's `Host` events of `{ type: "event", event, payload }`, which Rust's `on_host_event` listeners hear too, the core keeping the replies; a listener that throws leaves the next ones called, the first error thrown after them; events need no capability; a listener added while a component renders, or at a module's top level under hot module replacement, stops with it) (`platform_modules.rs`, `host_channel.rs` + its registry (`nsh_core::runtime`); SDK channel adds `params` and `post`); Keyboard shortcuts: `keymap.bind(keystroke, handler, { scope, when, repeat, passThrough, forFocus, overFocused })` / `keymap.bind({ keystroke: handler })`: keyboard shortcuts; `scope` defaults to the window the binding is made in, or app-wide at the app root. Keystrokes are parsed and checked in Rust (`nsh_core::keymap`: syntax, `mod`, reserved keystrokes, which ones text inputs keep); the whole table goes to the platform as the root's `Prop::Keymap` → `MountItem::Keymap`, which matches keys on the spot and reports the root's `KeyCommand` event (the binding's id). Bindings made under an owner go with it; a module's top-level ones are undone when hot module replacement runs it again (`hot::undo_on_rerun`) (`keymap.rs`); What the embedding app registers: `nativeComponent(name, { props, events })`: a component for a native component the embedding app registered; `nativeModule(specifier)`: the exports of a UI set the embedding app gave its engines (`EngineConfig::ui_sets`), as one object made by the loader's code (`modules::host_module`, the same values an import of the set gets) and kept per specifier; only the host's sets, never nsh's own modules or the runtime's registries (`platform_modules.rs`, `modules.rs`) | `reactive.rs`, `dom.rs`, `modules.rs`, `env.rs`, `animated.rs`, `touch.rs`, `keymap.rs`, `platform_modules.rs`, `host_channel.rs` + its registry (`nsh_core::runtime`) | +| `nsh` | `signal`, `computed`, `effect`, `batch`, `untracked`, `cleanup`, `context`, `split`, `mount`, `ErrorBoundary` (`dom.rs`: a memo of the children or the fallback, `native-pipeline.md`), `resource` (`resource.rs`: a callable object over four signals, its loads kept by `nsh_core::resource::Runs`); `View`, `Text`, `Scroll` (host elements as components: `dom::host_component`); `View`'s `selectable` (texts that select together); padding and margin take `env()` (safe area, keyboard: `styles.md` "Environment variables"); `Keyboard.dismiss()` (a Rust module of `nsh-core`, `element/keyboard.rs`), `safeArea()`, `safeAreaInsets()`, `keyboardFrame()` (the environment's accessors, `env.rs`, re-exported by the same registry); `List` (`list.rs`), `Canvas`, `Path2D`, `CanvasRenderingContext2D`, `CanvasGradient` (`canvas.rs`), `Image`: the image element's component, with `Image.getSize`, `Image.prefetch` (promises the core resolves from the root's `ImageInfo` event, rejecting a URL `network` does not grant with `ERR_ACCESS_DENIED` in the call; the `nsh` registry's functions, `components.rs`), `WebView`, `Video` (`platform_modules.rs`); the refs (`ViewRef`, `InputRef`, `ScrollRef`, `ListRef`, `WebViewRef`, `VideoRef`, `NativeComponentRef`: `declarations::REFS`), `Accessor`, `Signal`, `Context`, `Component`, the types of styles, element props, events and `JSX`; The app's theme: `token(name)`, `setTheme(theme)` (`env.rs`; `components.md` "The theme"); Animation: `createAnimatedValue`, `AnimatedValue`, `AnimatedNode`, `Animated`, `Easing`, `LayoutAnimation` (`animated.rs`); The environment: `windowSize()`, `colorScheme()`, `fontScale()`, `pixelRatio()`, `locale()` (accessors), `setColorScheme`, `fpsEnabled()` (an accessor `env.rs` writes when the engine gets a performance monitor or loses it, `EngineControl::set_perf_monitor`) and `setFpsEnabled(enabled)` (Rust, `runtime/fps.rs`: the root's `Command::PerfMonitor`, which each platform's monitor follows; `NSH_FPS=1`, `nsh_engine::perf::enabled_by_env`, turns it on at launch), `platform` (a constant: `os`, `version`, `idiom`, `desktop`, `catalyst`, `select`; `desktop`, the `desktop` idiom and `select`'s `desktop` are `Environment::desktop()`, `elements.md` "Platform modules"); `openUrl(url)` (Rust, `nsh_core::runtime`'s `device.rs`: a promise of `{ opened }`, whether the URL opened outside the app, `nsh_core::open_url`; it rejects with a `TypeError` for a URL it never opens and with `ERR_ACCESS_DENIED` for a scheme `openUrl` does not grant; `sandbox.md`, `embedding.md` "The host channel") (`env.rs` + its registry); Accessibility: `screenReaderEnabled()`, `reduceMotion()` (accessors), `announce(message)`, `setAccessibilityFocus(node)` (`env.rs` + its registry (`nsh_core::runtime`)); Gestures: `PanResponder` (`touch.rs`); The clipboard: `Clipboard.writeText(text)`, `Clipboard.write({ text, html })` (a `ClipboardItem`, a plain object of its formats as GPUI's and the DOM's item holds its representations: the same content as plain text and as the platform's HTML type, one `Command::SetClipboardItem` carrying the item, every format in one clipboard write, so a format added to the item travels in the same command; a platform without an HTML type (GPUI, terminals) writes the text, the HTML being an enrichment of the same content, while `writeImage` rejects where the platform has no images, an image having no text to fall back to; the web writes within the user's gesture through the page's `copy` event, as ProseMirror copies, then the async Clipboard API), `Clipboard.readText()` / `hasText()`, `writeImage(src)`, `readImage()` / `hasImage()`, `readFiles()` (promises the core resolves from the root's `Clipboard` event; the `has*` reads do not read the content, so iOS shows no paste notice). `readImage`'s `url` is, by contract, a URL that `Image` shows and `fetch` reads, nothing more (its scheme may change, to a native-backed URL); today images cross as base64 `data:` URIs (an image source and a `fetch` URL, so bytes stay native until JS asks for them), files as `file:` URLs one per line; the backends build both with `nsh_core::platform::clipboard`. An image over `MAX_IMAGE_BYTES` (48 MiB encoded) is left out of the answer, which carries its size (`tooLarge`; the core also measures a `data:` URI a backend encoded itself, the web's): `readImage` rejects with `ERR_NSH_QUOTA_EXCEEDED` (`ClipboardRead::CheckedImage`), the Rust API's `clipboard_image` answers `None`. A text read the person refuses (iOS's paste prompt answered with Don't Allow Paste, or pasting from other apps denied in Settings: `UIPasteboard.string` is `nil` while `hasStrings` is `true`) is answered `denied` (the `Clipboard` event's `denied: true`): `readText` rejects with `ERR_ACCESS_DENIED` (`permission` `"clipboard"`, `ClipboardRead::CheckedText`), the Rust API's `clipboard_string` answers `""`. UIPasteboard, ClipboardManager (text only), NSPasteboard, GDK, Win32, `navigator.clipboard`; on Android (`System::os`, checked in the call) `writeImage` and `readImage` reject with `ERR_FEATURE_UNAVAILABLE_ON_PLATFORM` and `hasImage` resolves `false` without asking the platform; the `clipboard` capability, checked in each call first: without it every function rejects with `ERR_ACCESS_DENIED` (its registry (`nsh_core::runtime`)); The photo picker: `Picker.pickImages({ multiple, limit, maxDimension, quality, format })`: the system's picker for photos, resolving with `PickedImage`s (`{ file: File, size }`; `[]` when cancelled). A Rust `#[module]` over `nsh_core::picker`: the core sends the root `Command::PickImages` with a checked `PickRequest` (or asks the embedder's `PickerBackend`, `Core::set_picker` / `EngineConfig::picker`), the platform answers with the root's `Pick` event, whose `EventPayload::Picked` carries the files' bytes, and the result becomes `File`s natively (`JsHost::new_file`: a `Blob` over the same `ImageData`, no copy and no base64). The `picker` capability, checked in the call (a pick it does not grant rejects with `ERR_ACCESS_DENIED`; options out of range reject with a `RangeError`) (its registry (`nsh_core::runtime`)); Links: `UrlScheme.on("open", listener)` → `() => void` (`{ url }`: a link of a scheme the app claims, `nsh.json` `schemes`; `UrlScheme.url()` / `setUrl(url)`, the app's address, which the core keeps and Rust reads with `app_url()` / `set_app_url()`, on the web the page's (`web.md` "Addresses"); `setUrl(url, { history: "push" })` (`HistoryBehavior`, Rust's `set_app_url_with`, the root's `Command::PushAppUrl`, which iOS and macOS take as `SetAppUrl`); `UrlScheme.on("change", listener)` (`{ url, reason }`: a move of the address the app did not make, the web's back and forward and a typed `#fragment`, Rust's `next_app_url_change()`, its own task in the module, posting only to the listeners there are); a Rust `#[module]` over `nsh_core::url_scheme` (`runtime/url_schemes.rs`) on `next_url_scheme_open()`: the core checks the root's `UrlScheme` events against the schemes the runner gave it and keeps up to 16 until a listener takes them, every waiting call hearing each link, except those a native module's `next_url_scheme_open_for(scheme)` waits for, which go to it alone; no capability; `embedding.md`) (its registry (`nsh_core::runtime`)); Sound (`docs/dev/audio-design.md`): `Sound` (`#[class]` without `new`: `Sound.available()`, `Sound.load(src)` → a promise of a `Sound` decoded into memory, `play({ volume, rate })`, `stop()`, `duration`) and `AudioPlayer` (`new AudioPlayer(src, { volume, rate, loop })`, `play()` → a promise settled when it plays, `preload` / `pause` / `seek`, `volume` / `rate` / `loop` / `currentTime` / `duration` / `state`, `on("load" | "progress" | "buffer" | "end" | "error", listener)` → `() => void`): Rust `#[class]`es (`runtime/audio.rs`) over `nsh_core::element::audio` (`load_sound`, `audio_player`: a sound's bytes read through the image loader, one decode per source per engine, the limits of `nsh_core::audio` kept on the engine thread) and the core's `AudioAction`s, which open each sound and player with an `AudioSink` and send the root `Command::Audio` (`AudioCommand`) or the embedder's `AudioBackend` (`Core::set_audio` / `EngineConfig::audio`); the platform answers with the root's `Audio` event (`EventPayload::Audio`, `AudioEvent`). macOS and iOS play with AVFoundation (`nsh-platform-apple` `audio.rs`, which both backends use; one `Speaker` per surface), Windows with XAudio2 and Media Foundation (`nsh-platform-windows` `audio.rs`), Android with `SoundPool` and `MediaPlayer` (`Audio.java`), Linux with `gtk::MediaFile` (`nsh-platform-linux` `audio.rs`), the web with the Web Audio API (`nsh.js`; the core sends `AudioCommand::LoadUrl` there and the browser fetches); elsewhere (`Environment::audio` off: GPUI) sounds and players fail with `unavailable`. The `audio` capability, checked in `load` and the constructor (denied, `ERR_ACCESS_DENIED`; a volume or rate out of range a `RangeError`) and again by the core; Storage: `Storage.getItem` / `setItem` / `removeItem` / `keys` / `clear` (async functions of the core; the entries live in memory in `nsh_core::storage`, loaded once from the platform's `StorageBackend` (`EngineConfig::storage`: `nsh_engine::FileStorage::open` in the app's data directory, `EngineConfig::data_dir` or else `/` (the id travels with the app: `app.json`, the dev server, packages, `Root::app_id`), one per file in the process so a reload reads unflushed writes; a damaged file is set aside as `storage.json.corrupt`, an unreadable one leaves the changes in memory, never replacing it; `localStorage` under `nsh::` on the web) and every change handed to it; 5 MB quota, `setItem` past it rejecting with `ERR_NSH_QUOTA_EXCEEDED`, as it does with a value the backend refuses (`StorageBackend::write` failing: the web's `localStorage`), which is not kept; the web's backend also hands in other tabs' changes (`nsh_core::storage::changed_elsewhere`); `Storage.on("change", listener)` → `() => void` (Rust `Storage::on_change`) hears those and the changes other engines sharing the entries made, never its own engine's; no capability: the app's own data, kept where the host says) (its registry (`nsh_core::runtime`)); The host channel: `host.call(name, args, { timeout })` (the Rust functions Rust code calls too (`element::host_call_with`, `runtime/host.rs`): the core checks a call and keeps it, and the engine hands it to the embedding app's channel where it is configured, else to the platform's host (the root's `Command::HostCall`, answered by the root's `Host` event); it never throws, and rejects with `nsh_core::host_channel`'s errors, checked in this order: a `TypeError` when the name is not valid (`access::valid_host_name`), `ERR_ACCESS_DENIED` (`permission` `"host"`, `resource` the name) when it is not granted, `ERR_FEATURE_UNAVAILABLE_ON_PLATFORM` where nothing hosts the app; then `ERR_NSH_HOST_ERROR` with the host's message when the host fails, and `ETIMEDOUT` past the timeout (30 s unless `timeout` says, 0 none); a timeout too large for the clock waits without limit, a negative or non-finite one rejects with a `RangeError`), `host.available()` (the platform environment or configured native SDK channel), `host.on(event, listener)` → `() => void` (JS listeners of the root's `Host` events of `{ type: "event", event, payload }`, which Rust's `on_host_event` listeners hear too, the core keeping the replies; a listener that throws leaves the next ones called, the first error thrown after them; events need no capability; a listener added while a component renders, or at a module's top level under hot module replacement, stops with it) (`platform_modules.rs`, `host_channel.rs` + its registry (`nsh_core::runtime`); SDK channel adds `params` and `post`); Keyboard shortcuts: `keymap.bind(keystroke, handler, { scope, when, repeat, passThrough, forFocus, overFocused })` / `keymap.bind({ keystroke: handler })`: keyboard shortcuts; `scope` defaults to the window the binding is made in, or app-wide at the app root. Keystrokes are parsed and checked in Rust (`nsh_core::keymap`: syntax, `mod`, reserved keystrokes, which ones text inputs keep); the whole table goes to the platform as the root's `Prop::Keymap` → `MountItem::Keymap`, which matches keys on the spot and reports the root's `KeyCommand` event (the binding's id). Bindings made under an owner go with it; a module's top-level ones are undone when hot module replacement runs it again (`hot::undo_on_rerun`) (`keymap.rs`); What the embedding app registers: `nativeComponent(name, { props, events })`: a component for a native component the embedding app registered; `nativeModule(specifier)`: the exports of a UI set the embedding app gave its engines (`EngineConfig::ui_sets`), as one object made by the loader's code (`modules::host_module`, the same values an import of the set gets) and kept per specifier; only the host's sets, never nsh's own modules or the runtime's registries (`platform_modules.rs`, `modules.rs`) | `reactive.rs`, `dom.rs`, `modules.rs`, `env.rs`, `animated.rs`, `touch.rs`, `keymap.rs`, `platform_modules.rs`, `host_channel.rs` + its registry (`nsh_core::runtime`) | | `nsh:rt` | what compiled JSX calls (`element`, `insert`, `spread`, `cond`, `each`, `list`, `font`, ...); apps never import it | `dom.rs`, `list.rs` | -| `nsh/i18n` | `t`, `setLocale`, `availableLocales`, `addTranslations`: the app's translations, rust-i18n's `locales/` files the bundler reads (`nsh-i18n`) and hands over first in a virtual module calling `nsh:rt`'s `i18n(json)`, plus any merged at run time with `addTranslations`, with the number and date data of the languages `nsh.json`'s `locales` lists (else those of the translations; English is built in, `nsh-i18n`'s `data/en.json`); `t` reads the language (the first preferred one the app has, else `locale()`) so texts follow `setLocale` and `addTranslations`, an app override the engine applies over the platform's environment (`State::app_locale`). Rust: `nsh_core::i18n` (`t!`, `set_locale`, `available_locales`, `add_translations`, `Translations::extend`, `Root::translations`); the core gets the translations too (`ModuleCx::set_translations`, `ModuleCx::add_translations`) for its components | `i18n.rs`, `web/format/` | +| `nsh/i18n` | `t`, `setLocale`, `availableLocales`, `addTranslations`, `Translations`, `TranslationLocales`, `TranslationKey`, `LocaleTag`: the app's translations, rust-i18n's `locales/` files the bundler reads (`nsh-i18n`) and hands over first in a virtual module calling `nsh:rt`'s `i18n(json)` (with `.nsh/types/nsh/translations.d.ts` generated from `locales/` by `nsh_bundler::translations_declaration` in `init::write_types_of`, falling back to `string` when `locales/` is absent), plus any merged at run time with `addTranslations`, with the number and date data of the languages `nsh.json`'s `locales` lists (else those of the translations; English is built in, `nsh-i18n`'s `data/en.json`); `t` reads the language (the first preferred one the app has, else `locale()`) so texts follow `setLocale` and `addTranslations`, an app override the engine applies over the platform's environment (`State::app_locale`). Rust: `nsh_core::i18n` (`t!`, `set_locale`, `available_locales`, `add_translations`, `Translations::extend`, `Root::translations`); the core gets the translations too (`ModuleCx::set_translations`, `ModuleCx::add_translations`) for its components | `i18n.rs`, `web/format/` | | (globals) | `If`, `Each` (control flow; their tags compile to `cond` / `each`) | `dom.rs` | -| `nsh/mobile` | What iOS and Android have: `isAvailable` (`true` on iOS and Android), `InputAccessoryView` (iOS; nothing on Android), `BackHandler` (`on("press" \| "progress", …)` native: it returns the function that removes the listener, which goes with the owner it was added under, as `keymap.bind`'s bindings do; `exitApp` Rust; Android; nothing on iOS), `TabBar` (a Rust component of the runtime, `nsh_core::mobile`; its root is the native component `nsh/tab-bar` (`nsh_core::platform::TAB_BAR_COMPONENT`), which the iOS (`UITabBar`, `system_tab_bar.rs`) and Android (Material 3's navigation bar, `TabBarComponent.java`) backends register themselves; `items` (`{ title, icon }`), `selectedIndex`, `onChange({ index })`; a hidden view elsewhere), `DateTimePicker` (`nsh_core::mobile` as well, the native component `nsh/date-time-picker`: iOS `UIDatePicker`, Android the system's date and time dialogs; `mode`, `value`, `min`, `max`, `minuteInterval`, `disabled`, `accessibilityLabel`, `onChange({ value })`; a hidden view elsewhere), `AppSettings` (`open`, `available`; Rust, `nsh_core::runtime`'s `app_settings.rs` over `nsh_core::mobile`'s `open_app_settings`: a root command to the platforms whose `Environment::app_settings` is set, iOS and Android; needs `application`). The engine gives the core the runtime registries' components with the UI sets' (`Registry::merged`) | `platform_modules.rs` + its registry | +| `nsh/mobile` | What iOS and Android have: `isAvailable` (`true` on iOS and Android), `InputAccessoryView` (iOS; nothing on Android), `BackHandler` (`on("press" \| "progress", …)` native: it returns the function that removes the listener, which goes with the owner it was added under, as `keymap.bind`'s bindings do; `exitApp` Rust; Android; nothing on iOS), `TabBar` (a Rust component of the runtime, `nsh_core::mobile`; its root is the native component `nsh/tab-bar` (`nsh_core::platform::TAB_BAR_COMPONENT`), which the iOS (`UITabBar`, `system_tab_bar.rs`) and Android (Material 3's navigation bar, `TabBarComponent.java`) backends register themselves; `items` (`{ title, icon }`), `selectedIndex`, `onChange({ index })`; a hidden view elsewhere), `AppSettings` (`open`, `available`; Rust, `nsh_core::runtime`'s `app_settings.rs` over `nsh_core::mobile`'s `open_app_settings`: a root command to the platforms whose `Environment::app_settings` is set, iOS and Android; needs `application`). The engine gives the core the runtime registries' components with the UI sets' (`Registry::merged`) | `platform_modules.rs` + its registry | | `nsh/web` | The page around an app on the web: `Head` (the document's title, description, canonical URL, language, ``s and JSON-LD while it is mounted; the later mounted wins for what it sets). The browser runtime serves it from `nsh-platform-web`'s `web/browser/page.js`, which writes the page's real `` (`docs/dev/web.md` "Search engines"); on the native hosts `Head` renders nothing | `web_page.rs` | | `nsh/desktop` | `isAvailable`; windows: `Window` (the `` scene, a window the platform shows its content in, with `Window.open` and `Window.get`), the `WindowRef` handles of the windows the app declares (`currentWindow()`, `Window.get`, `windows()`) (`set(partial)` of the attributes, requests such as `setMode`, `setBounds`, `setPlacement`, `focus`, `close`, and `on(event, l)`), `currentWindow()` (the window a component renders in, through context; never the focused window), `windows()`, `focusedWindow()`, `windowState()` and `titleBar()` (the current window's), `displays()`. Every window renders from the app's one engine. The attributes, options and kinds are `nsh_core::desktop`'s types: the core resolves kinds' defaults, keeps one attribute record per window and sends the platform what changed as `Command::Desktop` on the window's root node (the app host's is the root), which mobile platforms ignore; the platform reports each window's state and close presses back, and holds the close policies natively. The `windows` capability is checked in Rust. `Menu.setApplicationMenu` / `Menu.setMenuBar` / `Menu.popup` (decoded natively into `nsh_core::desktop::MenuItem`s, the items' functions kept by id, called on the root's `onMenu`), `Tray`, `GlobalShortcut`, `Application.quit`. Rust components have the same in `nsh_core::element::desktop` (`window()`, `current_window()`, `WindowRef`; menus' handlers kept by the core, ids from 2^31: `element/menus.rs`) | `desktop.rs`, `window.rs` + its registry | -| `nsh/base` | The unstyled foundation of an app's UI. Navigation: `NavStack`, `NavPage`, `createNavStack`, `Dialog` (natives of `nsh-js`, `Registry::native_values`); columns of stacks: `SplitView` (Rust; a `UISplitViewController` on iOS, a dock area's columns elsewhere, `columnVisibility` controlled; `dock.md` "SplitView"). Text input: `Input` (a host element made by `nsh-js`, `env::ELEMENTS`, `Registry::native_values`; its props' types `InputProps` and `IOSInputProps` declared beside it). Alerts: `AlertDialog.show({ title, description, actions, presentation })` (a promise of `{ action }`: the chosen action's `id`, required on every action, or `null` when closed without one; `presentation: "actionSheet"` is a list dialog on Android), the platform's own. A press target: `Button` (Rust; no look of its own). A link: `Link` (Rust; the link role, a Tab stop that Return and Space press; `href` is data: a press reports it with `onOpen`, then `openWith="system"` (the default) opens a URL of another app or site through `nsh_core::element::open_url` (the embedding app first, the `openUrl` capability) while `"app"` leaves it to the handler; `current` is `aria-current="page"`; inside a `` an inline box, as every view there). A preview of what a trigger points at: `HoverCard` (Rust; on the core's overlays, as `Popover`; on the desktops it follows the pointer only, opening after `openDelay` with the pointer resting on the trigger and closing `closeDelay` after the pointer left the trigger and the card, both followed by Rust listeners and one native timer, so a hover runs no JS; on touch screens a press on the trigger opens and closes it; `open` / `onOpenChange({ open, reason })`). A checked / unchecked / indeterminate control: `Checkbox` (Rust; its indicator is a part the app styles and fills with its mark, the `indicator` slot, `checked:` / `indeterminate:` / `disabled:` following the checkbox through `Interactive::project_checked` / `project_indeterminate`). A set of options the user picks one of: `Radio` in a `RadioGroup` (Rust; the group holds no value, each radio its `checked`, the app's indicator its children with `group-checked:` classes). An on / off control: `Switch` (Rust; its track and thumb are parts the app styles, `checked:` / `disabled:` following the switch through `Interactive::project_checked`, `active:` while it is held through `Interactive::project_group_active`). The tabs of a tab list: `Tab` in `Tabs` (Rust; the list holds no value, each tab its `selected` and `onPress`, the app shows the selected section's content; its indicator a part the app styles with `indicatorClass` / `indicatorStyle`, placed on the selected tab by the core, `View::follow`, and springing to the next natively). A button that is on or off: `Toggle`, alone or in a `ToggleGroup` (Rust; a button with `accessibilityState.pressed`, `pressedStyle` / `aria-pressed:`, the app's content its children with `group-aria-pressed:` classes; the group a toolbar that holds no value, one stop of the keyboard focus whose arrows only move the focus, and `disabled` for all its toggles; one pressed or several is the app's; inside a `Toolbar` a group of it). A bar of controls: `Toolbar` with `ToolbarGroup` and `ToolbarSeparator` (Rust; one stop of the keyboard focus over the `Button`s, `Toggle`s and `Link`s inside it, at the item last left, its `axis`'s arrows, Home and End moving the focus without pressing, `disabled` for all its items; a group with its `accessibilityLabel`, a separator outside the focus order; the look the app's). Menus: `Menu`, `ContextMenu`, `MenuItem`, `MenuSeparator`, `Submenu` (Rust, `menu.rs`; a popup on the desktops, a sheet on touch screens; a `MenuItem` with `checked` is checkable, `menuitemcheckbox` or with its `role` `menuitemradio`, the value the app's, `onSelect` the press, `checked:` / `checkedStyle` on the item and its indicator part (`indicatorClass` / `indicatorStyle` around the `indicator` slot), `closeOnSelect` whether a choice closes the menu). One value from a list of items: `Select` (Rust; `items` as data, the value the app's, `value` and `onChange`, or its own from `defaultValue`; a popup at the trigger on the desktops and a sheet on touch screens; the keyboard, typeahead, search and sections in `listbox.rs`; the highlighted row `focus:` through `Interactive::project_focused`, the chosen one `selected:`). One value or several from the same list: `Combobox` (Rust; `value` an array, `multiple` toggling and staying open, `onConfirm` on close, the app's `query` with `onQueryChange`, a `footer` slot). Dates and times: `Calendar` (Rust; an ISO date or `[start, end]` with `range`, `onChange` for a complete value only, `numberOfMonths`, `firstDayOfWeek`, `disabledMatcher` (`DateMatcher`: days of the week, `{ before, after }`, `{ from, to }`, or a function asked once per shown day in the next JS turn), `yearRange`, month and year views, the days one Tab stop, `renderItem` with `CalendarEntry`, what an item is, its states its classes: `selected:` every day of a range, a day's `data-range-start` / `-end` / `-middle`, `data-range-preview-start` / `-end` / `-middle` while a range's end is chosen, `data-today`, `data-outside`), `TimeField` (Rust; `"HH:MM"` / `"HH:MM:SS"`, `precision`, `hourCycle`, segments over one native text field, `renderSegment` with `TimeFieldSegmentEntry`, what a segment shows, its states its classes), `DatePicker` (Rust; `Select`'s popup around a calendar, `presets` (`DateRangePreset`) and with `timePrecision` a time field, its value `DatePickerValue` in the HTML inputs' forms (`date`, `datetime-local`), every `Calendar` prop passed on, the `trigger`, `timeLabel` and `clearButton` slots). A region that expands and collapses: `Collapsible` (Rust; its children always, its `content` slot after them while `open`, kept while collapsed; with `reveal` a clip around it springs between zero and its height, a layout animation; the trigger and its `expanded` state are the app's). Stacked sections that expand and collapse: `Accordion` with `AccordionItem`, `AccordionHeader`, `AccordionTrigger` and `AccordionPanel` (Rust; the open items' values are the app's `value`, reported with `onChange` by a trigger's press, one at a time or several with `multiple`; the item hands its trigger and panel whether it is open through context; the root a group, the header a heading with `level`, the trigger a button with its `expanded` state and `aria-expanded:` styles, the panel a region hidden while closed, revealed as `Collapsible`'s with `reveal`, kept with `keepMounted`). How far a task is: `Progress` (Rust; the progress bar role with the range 0 to 100 and its value, `Accessible::accessibility_value`, none while `indeterminate`; its track and indicator are parts the app styles, the indicator `value` percent of the track's width). A value or a range picked along a track: `Slider` (Rust; `value` a number or `[start, end]`, controlled or from `defaultValue`, snapped to `step` from `min`, on a `linear` or `logarithmic` `scale`, along a horizontal or vertical `axis`; `onChange` per new value, `onChangeEnd` once per change; each thumb an adjustable element with its value, Tab stop, WAI-ARIA's slider keys and the screen readers' increment / decrement; its track, indicator, range and thumbs are parts the app styles). A number typed or stepped: `NumberInput` (Rust; `value` a number or `null`, controlled or from `defaultValue`; its field, `nsh/base`'s `Input`, takes a number or the text on the way to one, other keyboards' digits read as ASCII, and reports the number it reads as with `onChange`; steps of `step` from its buttons, Up / Down and Page Up / Page Down while it edits, and the screen readers' increment / decrement keep the decimals and stop at `min` / `max`, to which leaving the field or Enter holds a typed value; the field a spin button with its value; the field, the buttons and their column are parts the app styles, the buttons' content its slots). One-time codes: `OtpInput` (Rust; one native field, transparent over the cells, owns the keyboard, paste, the number pad and the system's code autofill, and is the one text field screen readers get, `Accessible::accessibility_elements_hidden` on the cells; digits only up to `length`; the cell that takes the next digit `focus:` through `Interactive::project_focused`, with the app's blinking caret, the cells that hold a digit `data-filled:` through `Interactive::project_data`). A command palette: `Command` (Rust; `items` as data (`CommandItem`: `id`, `label`, `keywords`, `group`, `shortcut`, `disabled`, `checked`), indexed once and filtered natively per query by label and keywords, in a virtualized list with a header per section and a separator between them; the query the app's (`query`, `onQueryChange`) or its own from `defaultQuery`, `filterable={false}` and `loading` for a search the app answers; the keys bound while its search field has the focus (Up / Down past disabled items and around, Page Up / Down, Return chooses, Escape clears the query and then reports `onCancel`), the highlighted row projected `focus:`, `onSelect({ id })` and `onHighlightChange({ highlighted })`; `renderItem` gets a `CommandEntry` with the shortcut as shown here (`shortcutLabel`), never a state; ref `CommandRef`: `focus()`, `highlight(id)`, `matchedCount(): Promise`). Items that hold items: `Tree` (Rust; `items` as data (`TreeItem`: `id`, `label`, `children`, `disabled`), flattened natively and virtualized, so a collapsed item's children are never made; `expanded` (ids) and `selected` (an id) the app's, with `onExpandedChange` / `onSelectedChange`, or its own from `defaultExpanded` / `defaultSelected`, and `onExpand` / `onCollapse`; one stop of the keyboard focus whose arrows move the selection (Right / Left expand, collapse, enter and leave), Home / End, Return / Space, typeahead; each row a `treeitem` with its level, its states its classes (`selected:`, `aria-expanded:`, `focus:`), `renderItem` given a `TreeEntry` with its `depth`; the ref's `focus()` and `revealItem(id)`). Pages: `Pagination` (Rust; a navigation landmark of Previous, the pages `pagination_items` shows around `page`, ellipses, the app's children and Next, the current page `selected` and `current: page`; `visiblePages` + 2 places made once, each a page and an ellipsis view of which it shows one, so a page change makes no view). Documents: `TextView` (Rust; Markdown, HTML or blocks, `docs/dev/text-view.md`). Code: `Editor` (Rust; a code editor, its text controlled, `docs/dev/editor.md`), `DiffView` (Rust; the changes between two texts or of a patch, `docs/dev/diff.md`). The status bar: `statusBar` of `NavPage` and `Dialog` (a host prop of screens and modals; `StatusBar`, `StatusBarForeground` declared with the navigation) over `nsh.json`'s `"statusBar"` | `nsh_base::registry()` (`crates/nsh-base`); `navigation.rs` | +| `nsh/base` | The unstyled foundation of an app's UI. Navigation: `NavStack`, `NavPage`, `createNavStack`, `Dialog` (natives of `nsh-js`, `Registry::native_values`); columns of stacks: `SplitView` (Rust; a `UISplitViewController` on iOS, a dock area's columns elsewhere, `columnVisibility` controlled; `dock.md` "SplitView"). Text input: `Input` (a host element made by `nsh-js`, `env::ELEMENTS`, `Registry::native_values`; its props' types `InputProps` and `IOSInputProps` declared beside it). Alerts: `AlertDialog.show({ title, description, actions, presentation })` (a promise of `{ action }`: the chosen action's `id`, required on every action, or `null` when closed without one; `presentation: "actionSheet"` is a list dialog on Android), the platform's own. A press target: `Button` (Rust; no look of its own). A link: `Link` (Rust; the link role, a Tab stop that Return and Space press; `href` is data: a press reports it with `onOpen`, then `openWith="system"` (the default) opens a URL of another app or site through `nsh_core::element::open_url` (the embedding app first, the `openUrl` capability) while `"app"` leaves it to the handler; `current` is `aria-current="page"`; inside a `` an inline box, as every view there). A preview of what a trigger points at: `HoverCard` (Rust; on the core's overlays, as `Popover`; on the desktops it follows the pointer only, opening after `openDelay` with the pointer resting on the trigger and closing `closeDelay` after the pointer left the trigger and the card, both followed by Rust listeners and one native timer, so a hover runs no JS; on touch screens a press on the trigger opens and closes it; `open` / `onOpenChange({ open, reason })`). A checked / unchecked / indeterminate control: `Checkbox` (Rust; its indicator is a part the app styles and fills with its mark, the `indicator` slot, `checked:` / `indeterminate:` / `disabled:` following the checkbox through `Interactive::project_checked` / `project_indeterminate`). A set of options the user picks one of: `Radio` in a `RadioGroup` (Rust; the group holds no value, each radio its `checked`, the app's indicator its children with `group-checked:` classes). An on / off control: `Switch` (Rust; its track and thumb are parts the app styles, `checked:` / `disabled:` following the switch through `Interactive::project_checked`, `active:` while it is held through `Interactive::project_group_active`). The tabs of a tab list: `Tab` in `Tabs` (Rust; the list holds no value, each tab its `selected` and `onPress`, the app shows the selected section's content; its indicator a part the app styles with `indicatorClass` / `indicatorStyle`, placed on the selected tab by the core, `View::follow`, and springing to the next natively). A button that is on or off: `Toggle`, alone or in a `ToggleGroup` (Rust; a button with `accessibilityState.pressed`, `pressedStyle` / `aria-pressed:`, the app's content its children with `group-aria-pressed:` classes; the group a toolbar that holds no value, one stop of the keyboard focus whose arrows only move the focus, and `disabled` for all its toggles; one pressed or several is the app's; inside a `Toolbar` a group of it). A bar of controls: `Toolbar` with `ToolbarGroup` and `ToolbarSeparator` (Rust; one stop of the keyboard focus over the `Button`s, `Toggle`s and `Link`s inside it, at the item last left, its `axis`'s arrows, Home and End moving the focus without pressing, `disabled` for all its items; a group with its `accessibilityLabel`, a separator outside the focus order; the look the app's). Menus: `Menu`, `ContextMenu`, `MenuItem`, `MenuSeparator`, `Submenu` (Rust, `menu.rs`; a popup on the desktops, a sheet on touch screens; a `MenuItem` with `checked` is checkable, `menuitemcheckbox` or with its `role` `menuitemradio`, the value the app's, `onSelect` the press, `checked:` / `checkedStyle` on the item and its indicator part (`indicatorClass` / `indicatorStyle` around the `indicator` slot), `closeOnSelect` whether a choice closes the menu). One value from a list of items: `Select` (Rust; `items` as data, the value the app's, `value` and `onChange`, or its own from `defaultValue`; a popup at the trigger on the desktops and a sheet on touch screens; the keyboard, typeahead, search and sections in `listbox.rs`; the highlighted row `focus:` through `Interactive::project_focused`, the chosen one `selected:`). One value or several from the same list: `Combobox` (Rust; `value` an array, `multiple` toggling and staying open, `onConfirm` on close, the app's `query` with `onQueryChange`, a `footer` slot). Dates and times: `Calendar` (Rust; an ISO date or `[start, end]` with `range`, `onChange` for a complete value only, `numberOfMonths`, `firstDayOfWeek`, `disabledMatcher` (`DateMatcher`: days of the week, `{ before, after }`, `{ from, to }`, or a function asked once per shown day in the next JS turn), `yearRange`, month and year views, the days one Tab stop, `renderItem` with `CalendarEntry`, what an item is, its states its classes: `selected:` every day of a range, a day's `data-range-start` / `-end` / `-middle`, `data-range-preview-start` / `-end` / `-middle` while a range's end is chosen, `data-today`, `data-outside`), `TimeField` (Rust; `"HH:MM"` / `"HH:MM:SS"`, `precision`, `hourCycle`, segments over one native text field, `renderSegment` with `TimeFieldSegmentEntry`, what a segment shows, its states its classes), `DatePicker` (Rust; `Select`'s popup around a calendar, `presets` (`DateRangePreset`) and with `timePrecision` a time field, its value `DatePickerValue` in the HTML inputs' forms (`date`, `datetime-local`), every `Calendar` prop passed on, the `trigger`, `timeLabel`, `clearButton`, `header` and `footer` slots around its content, an app that controls `open` keeping it open on a `"select"`). A region that expands and collapses: `Collapsible` (Rust; its children always, its `content` slot after them while `open`, kept while collapsed; with `reveal` a clip around it springs between zero and its height, a layout animation; the trigger and its `expanded` state are the app's). Stacked sections that expand and collapse: `Accordion` with `AccordionItem`, `AccordionHeader`, `AccordionTrigger` and `AccordionPanel` (Rust; the open items' values are the app's `value`, reported with `onChange` by a trigger's press, one at a time or several with `multiple`; the item hands its trigger and panel whether it is open through context; the root a group, the header a heading with `level`, the trigger a button with its `expanded` state and `aria-expanded:` styles, the panel a region hidden while closed, revealed as `Collapsible`'s with `reveal`, kept with `keepMounted`). How far a task is: `Progress` (Rust; the progress bar role with the range 0 to 100 and its value, `Accessible::accessibility_value`, none while `indeterminate`; its track and indicator are parts the app styles, the indicator `value` percent of the track's width). A value or a range picked along a track: `Slider` (Rust; `value` a number or `[start, end]`, controlled or from `defaultValue`, snapped to `step` from `min`, on a `linear` or `logarithmic` `scale`, along a horizontal or vertical `axis`; `onChange` per new value, `onChangeEnd` once per change; each thumb an adjustable element with its value, Tab stop, WAI-ARIA's slider keys and the screen readers' increment / decrement; its track, indicator, range and thumbs are parts the app styles). A number typed or stepped: `NumberInput` (Rust; `value` a number or `null`, controlled or from `defaultValue`; its field, `nsh/base`'s `Input`, takes a number or the text on the way to one, other keyboards' digits read as ASCII, and reports the number it reads as with `onChange`; steps of `step` from its buttons, Up / Down and Page Up / Page Down while it edits, and the screen readers' increment / decrement keep the decimals and stop at `min` / `max`, to which leaving the field or Enter holds a typed value; the field a spin button with its value; the field, the buttons and their column are parts the app styles, the buttons' content its slots). One-time codes: `OtpInput` (Rust; one native field, transparent over the cells, owns the keyboard, paste, the number pad and the system's code autofill, and is the one text field screen readers get, `Accessible::accessibility_elements_hidden` on the cells; digits only up to `length`; the cell that takes the next digit `focus:` through `Interactive::project_focused`, with the app's blinking caret, the cells that hold a digit `data-filled:` through `Interactive::project_data`). A command palette: `Command` (Rust; `items` as data (`CommandItem`: `id`, `label`, `keywords`, `group`, `shortcut`, `disabled`, `checked`), indexed once and filtered natively per query by label and keywords, in a virtualized list with a header per section and a separator between them; the query the app's (`query`, `onQueryChange`) or its own from `defaultQuery`, `filterable={false}` and `loading` for a search the app answers; the keys bound while its search field has the focus (Up / Down past disabled items and around, Page Up / Down, Return chooses, Escape clears the query and then reports `onCancel`), the highlighted row projected `focus:`, `onSelect({ id })` and `onHighlightChange({ highlighted })`; `renderItem` gets a `CommandEntry` with the shortcut as shown here (`shortcutLabel`), never a state; ref `CommandRef`: `focus()`, `highlight(id)`, `matchedCount(): Promise`). Items that hold items: `Tree` (Rust; `items` as data (`TreeItem`: `id`, `label`, `children`, `disabled`), flattened natively and virtualized, so a collapsed item's children are never made; `expanded` (ids) and `selected` (an id) the app's, with `onExpandedChange` / `onSelectedChange`, or its own from `defaultExpanded` / `defaultSelected`, and `onExpand` / `onCollapse`; one stop of the keyboard focus whose arrows move the selection (Right / Left expand, collapse, enter and leave), Home / End, Return / Space, typeahead; each row a `treeitem` with its level, its states its classes (`selected:`, `aria-expanded:`, `focus:`), `renderItem` given a `TreeEntry` with its `depth`; the ref's `focus()` and `revealItem(id)`). Pages: `Pagination` (Rust; a navigation landmark of Previous, the pages `pagination_items` shows around `page`, ellipses, the app's children and Next, the current page `selected` and `current: page`; `visiblePages` + 2 places made once, each a page and an ellipsis view of which it shows one, so a page change makes no view). Documents: `TextView` (Rust; Markdown, HTML or blocks, `docs/dev/text-view.md`). Code: `Editor` (Rust; a code editor, its text controlled, `docs/dev/editor.md`), `DiffView` (Rust; the changes between two texts or of a patch, `docs/dev/diff.md`). The status bar: `statusBar` of `NavPage` and `Dialog` (a host prop of screens and modals; `StatusBar`, `StatusBarForeground` declared with the navigation) over `nsh.json`'s `"statusBar"` | `nsh_base::registry()` (`crates/nsh-base`); `navigation.rs` | | `nsh/base/plot` | The parts charts are built from, as `gpui-base`'s `plot`, with no look of their own: `Plot` (Rust; the rows of data `data: T[]`, generic over `T` so `x` / `y` are checked keys of it or functions of a row (`RowAccessor`), the `point` / `linear` / `band` scales of its axes, its size as their range, `onHoverChange({ index })` for the row nearest the pointer, the hover's parts `crossLineClass` / `dotClass` / `tooltipContent` (placed by `tooltipPlacement` / `tooltipOffset`, kept inside the plot on the animator) and `motion` (appear, enter, exit, pointer, and update: radii and linear domains, the marks drawn through an animated transform, `plot/tween.rs`) on the platform's animator, `interactive`, the keyboard moving the same hover while it has the focus (`plot/keys.rs`), one element for screen readers with `accessibilityValue` and increment / decrement) and its marks `Line`, `Area`, `Bar`, `Grid` (Rust; a canvas each, drawn natively from the rows, painting with the paint properties `fill` / `stroke` / `strokeWidth` / `strokeDasharray` they inherit, `currentColor` where none is set: `Painter::*_from_view`, `canvas.md`; `Line`'s `dot` part; a mark's own `data` / `x` and `hoverDot` part; `Area`'s and `Bar`'s `background` part, a CSS gradient inside its shapes: `Painter::fill_background_from_view`; `Bar`'s stacks and side-by-side groups, its growth with the appear and its fading away from the hover's row as animated canvas numbers, its `label` part read with `RowText`), the radial marks `Pie` (a canvas per slice, the `slice` part, its classes `sliceClass` a string or a function of the slice's row; the plot's hover finds the slice under the pointer through the marks' hit tests, the slice lifting and the others fading on the animator; its `label` part read with `RowText`, a text outside the ring per slice, and the `labelLine` part, a leader line canvas per slice, both following their slice's motion and lift as animated numbers) `Arc` (one sector between two angles) and `RadialLine` (a series round the center, a radar: its `radius` a value of the linear y scale placed between `innerRadius` and `outerRadius`, its `angle` or the rows evenly round the turn; `closed`, its area and `background` part, its `dot` and `hoverDot` parts; the plot's hover finds the row nearest the pointer by angle through the same hit tests; its points numbers the animator moves as it appears and updates), with `RadialGrid` (rings at values of the y scale and spokes at the rows' angles), the `Sankey` (flows between the plot's rows: d3-sankey's layout ported from `gpui-base`, `plot/sankey/layout.rs`, run again only for new links, options or size; `links` read natively as `Rows`; a canvas per node and per ribbon, the `node`, `link` and `linkBackground` parts, their classes `RowClass` / `SankeyLinkClass`; the hovered node through the plot's hit tests, the other links fading on the animator; the `nodeLabel` part, views placed beside the nodes; `motion.update` as animated canvas numbers between two layouts), and `PlotAxis` (Rust; views along an edge, the ticks of the scale it carries: d3's nice values or rows, `ticks` / `tickValues`, their texts d3's default or the app's `format(value, index)`, `TickFormat`, called in the next JS turn; each label centered on its tick and kept within the plot's ends by the layout's automatic margins, past the edge or inside it; its `label`, `tick` and `line` parts), and `PlotLabel` (Rust; texts at values of the scales, `texts: PlotText[]` read natively as `JsObject`s, placed by the layout and moved with the domains on the animator), and `PlotAppearScope` (Rust; a context its plots remember the appears that finished in, by their `appearGeneration` (`number \| string`, `AppearKey`), so a list's rows made again show whole at once; a new `id` forgets, `plot/appear.rs`) | `nsh_base::plot::registry()`, a submodule of `nsh/base` (`crates/nsh-base/src/plot`) | | an app's UI set (`app/native`) | The Rust components, modules and classes of the app's crate (`#[native_module("app/native")]`) | the registry (`components.rs`, `classes.rs`) | @@ -123,15 +123,19 @@ and the renames decided so far). - Something only mobile platforms have (iOS, Android or both): `nsh/mobile`; only the desktops: `nsh/desktop`; or a prop in `ios={{…}}` / `android={{…}}` / `desktop={{…}}`. - A system feature only some apps use, which would add permissions, store declarations or size to every app (the - camera, the photo library, push notifications, speech recognition): a module of `nsh-extra` (`crates/nsh-extra`, an nshm apps install with `nsh add + camera, the photo library, push notifications, the share sheet, speech recognition): a module of `nsh-extra` (`crates/nsh-extra`, an nshm apps install with `nsh add nsh-extra --features `), one Cargo feature per module, its TS namespace the name in PascalCase, what the packaged app needs declared under the feature in `[package.metadata.nsh]`. It is built on the platform crates' - public extension points (iOS: `presenting_controller`, `prepare_image`, the application delegate's callbacks - `on_application_event`, and `nsh-platform-apple`'s `set_foreign_handler` for the notifications NSH did not show; - Android: `activity`, `permissions`, - `picker::prepare_image`, `with_env`, and `proxy` for a Java listener or callback implemented in Rust), the same + public extension points (iOS: `presenting_controller`, `native_view`, `prepare_image`, the application delegate's + callbacks `on_application_event`, and `nsh-platform-apple`'s `set_foreign_handler` for the notifications NSH did not + show; macOS: `presenting_view`, `native_view`; Android: `activity` (with `content_uri`), `permissions`, + `picker::prepare_image`, `with_env`, `presenting_activity`, `native_view`, `proxy` for a Java listener or callback + and `receiver` for a broadcast, both implemented in Rust; Windows: `presenting_window`, `element_bounds` (NSH draws + its elements, so an element is its window and bounds there); Linux: `presenting_window`, `native_view`; every + platform: `System::readable_file` for a file the app hands over), the same ones any third-party nshm uses; NSH's runtime gets only such - generic hooks, never the feature itself. A module whose state or system calls are the process's checks the calling + generic hooks, never the feature itself. The native views and windows they give are for anchoring and presenting + system UI only: a module never changes, re-parents, restyles or removes a view NSH owns. A module whose state or system calls are the process's checks the calling VM's capability in each function of its JS face (`sys: System`, as `Push` checks `notifications`, `Photos` `picker` and `Speech` `speech`), and its Rust API checks the engine's (`nsh_core::element::access()`): the Cargo feature says what the app links, not which of its VMs may use it. A module that would reach a device in tests diff --git a/third-party/nsh/docs/dev/linux.md b/third-party/nsh/docs/dev/linux.md index d5375d9631e..570b53423c7 100644 --- a/third-party/nsh/docs/dev/linux.md +++ b/third-party/nsh/docs/dev/linux.md @@ -111,7 +111,7 @@ works and its runner only needs GTK. | Environment | `system.rs` | Color scheme: the app's appearance (`nsh.json` `"appearance"`, `setColorScheme`) when it forces one, else the XDG settings portal's (`org.freedesktop.appearance color-scheme`, live); hosted GTK widgets, dialogs and the root's background follow it, and a packaged app's window opens in it (`nsh/app.json`). The locale (`Intl`) from `LC_ALL` / `LC_TIME` / `LC_NUMERIC` / `LC_MESSAGES` / `LANG`, else GLib's language names. The preferred languages (`localeSettings()`'s `languages`): GLib's language names, most preferred first (`LANGUAGE`, else `LC_ALL` / `LC_MESSAGES` / `LANG`, with their fallbacks). The regional preferences (`localeSettings()`'s `hourCycle` and the like): the regions of the POSIX locales (`LC_TIME`'s times and weeks, `LC_MEASUREMENT`'s units; `LocaleSettings::parse`), with GNOME's `clock-format` (`org.gnome.desktop.interface`, where the schema is installed; live) over the hour cycle. Font scale from `gtk-xft-dpi`, reduce motion from `gtk-enable-animations`, the surface's (fractional) scale, GTK's text direction, AT-SPI's `ScreenReaderEnabled`; `platform.os` `"linux"`, idiom `desktop`, OS version the kernel's major.minor; safe area and keyboard height 0. The app's state (`lifecycle()`) from GDK's toplevel states, followed on the map and unmap of the root and of the app's own windows and on their toplevels' `state`: `background` while neither the surface's window nor one of the app's own windows is shown (the host's window never shows under the desktop window model; a window unmapped, `MINIMIZED`, or `SUSPENDED`: on another workspace or covered, where the compositor reports it), `active` while one of the app's windows is `FOCUSED`, `inactive` otherwise; in a standalone app (`run_app`), `background` too once the session may end, and the app stops as on quitting when it ends (`session.rs`: the session manager's `query-end` and the application's `shutdown`, and `SIGTERM`, handled on the main loop, which quits the app; the waits are bounded). The time zone (`localeSettings()`'s `timeZone`): the zone `TZ` names when it names one (`GMT`, `Europe/Berlin`; a POSIX rule such as `JST-9` names none: `TimeZone::posix`), which the process's local times follow, else `timedated`'s (`org.freedesktop.timedate1` `Timezone` on the system bus, live from its property changes), else the zone `/etc/localtime` links to, else `/etc/timezone`. The wake count (`wakeCount()`): one more when `logind` reports the end of a sleep (`org.freedesktop.login1.Manager`'s `PrepareForSleep` with `false` on the system bus). | | Opening URLs | `system.rs`, `app.rs` | `GtkUriLauncher`: the desktop portal in a sandbox, else the handler GIO finds in the `applications` directories under `XDG_DATA_DIRS`. A standalone app (`run_app`) whose launcher passed no `XDG_DATA_DIRS`, or an empty one, gets what a desktop session sets before GTK starts: the XDG Base Directory specification's default (`/usr/local/share:/usr/share`) with the Flatpak and Snap export directories that exist, so the handlers those install are found; a value the launcher passed stays as it is | | Window chrome (`nsh/desktop`) | `chrome.rs` | Title from the `title` attribute; the hidden title bar hides the window's header (the owner's `titlebar` or GTK's own `default-decoration` header bar), so GTK's client-side decorations keep their shadows and resize edges without the window being mapped again; a window the window manager decorates (X11, Wayland compositors that prefer server-side decorations, such as Hyprland) gets an empty, hidden `set_titlebar` box instead, which GTK can only apply by mapping the window again (it warns that the window is realized), with `gtk::WindowControls` for both ends over the app in the `AppView`'s overlay (the desktop's `gtk-decoration-layout`), their measured widths and the header's height (46 pt at least) reported as the environment's `title_bar` (0 in full screen). A primary drag on a `windowDrag` view moves the window (`gdk::Toplevel::begin_move`); a click reaches the app only if its original view remains under the pointer and draggable. Replacing the app cancels the pending press. A double press follows `gtk-titlebar-double-click`, a secondary press opens the window menu. The application menu is a `gio::Menu` (separators split sections; checkable items are stateful actions) with its actions in a group on the window (`nsh.item-N`), shown in a `gtk::PopoverMenuBar` above the app (`AppView::widget` is a box holding it and the overlay) unless the title bar is hidden or in full screen; its shortcuts are a capture-phase `gtk::ShortcutController` on the window, which GTK runs before the keymap's (each gives way to a `keymap` binding of the same keystroke that fires: `keymap::claims`; the editing roles' stay the text field's, and run as the focused field's `clipboard.*` / `selection.select-all` / `text.undo` / `text.redo` actions). Context menus are `gtk::PopoverMenu`s parented to the root, which presents its popovers on every allocation (else they keep the size of their first frame and scroll); they are made `NESTED` (`from_model_full`), so a submenu opens beside its item on hover as a menu of its own rather than sliding in as a page that needs a click. Every `popover.menu` (context menus and the menu bar's) is styled by a second application-priority style sheet made from the app's design tokens (`menu_style.rs`: `popover`, `popover-foreground`, `accent`, `accent-foreground`, `muted-foreground`, `border`, the default theme's where the app has none; light values everywhere, dark ones under `.nsh-dark`, which the root and the menu bar's slot carry), reloaded on `Command::Tokens`: gpui-base's popover and menu look (8 px corners, 4 px padding, 28 px rows of 6 px corners, 13 px text), with the submenu arrow, check and radio drawn by the sheet (box sides turned 45°, a round box) instead of the icon theme's. **A menu item's `icon` does not show**: `chrome.rs` sets the `gio::MenuItem`'s `icon` attribute (a lazy `GIcon`: bytes, a file or a URL, so nothing loads), but `GtkModelButton::update_visibility` shows its image only with `iconic` or without text (`has_icon && (iconic || !has_text)`, the same in GTK 4.14 and `main`), which is GTK's convention for menus; showing one would take `custom` children (`gtk::PopoverMenu::add_child`) for such items, with the look, focus and accelerators a model button gives for free | -| Windows (`nsh/desktop`) | `window.rs` | Every window renders from the app's one engine: a window of the app's own (``, `Window.open`) is a dialog root shown in a `gtk::Window` of its own, which shows once its first frame is mounted; the dialogs and popups opened in it show in it, with focus, Tab, Escape and the mouse's back button scoped to that window, the app's shortcuts work in it as in every other window, and its views reach the screen reader under it. Kinds arrive as resolved attributes: dialogs and panels are transient for their parent (`modal` makes the parent modal), popups and overlays undecorated, overlays let the pointer through with an empty input region. Attributes map to GTK where it has an API (title, frame, minimum size, resizable, deletable, a header bar whose decoration layout leaves out the buttons not allowed, hidden title bars with `gtk::WindowControls` over the app, transparency and the shadow as CSS classes); the policies (`closeOnPress`, `closeOnEscape`, `closeOnBlur`) are answered on the main thread; state is reported per window (the host surface's in the app-root environment, a resize once it settles) and the displays are GDK's monitors. `windowDrag`, `windowControl` and `windowResize` views are hit-tested in `input.rs`. Progress and attention go to the app's launcher entry where a dock listens. GTK 4 places windows itself and has no levels, taskbar or workspace hints, largest size or aspect ratio: those attributes and requests are left as they are, and a window's bounds start at the origin. nsh.json `window` supplies launch defaults for the first app window; with `restoreBounds` it opens at the size and in the mode the engine kept. `defaultVisible` is parsed but has no effect: the app host is never presented. A development host presents the app's windows as they open; an error still reports through the app (`dev.rs`). The legacy `MainWindow` state on the hidden host remains for app-root environment reads and is 待平台验证. | +| Windows (`nsh/desktop`) | `window.rs` | Every window renders from the app's one engine: a window of the app's own (``, `Window.open`) is a dialog root shown in a `gtk::Window` of its own, which shows once its first frame is mounted; the dialogs and popups opened in it show in it, with focus, Tab, Escape and the mouse's back button scoped to that window, the app's shortcuts work in it as in every other window, and its views reach the screen reader under it. Kinds arrive as resolved attributes: dialogs and panels are transient for their parent (`modal` makes the parent modal), popups and overlays undecorated, overlays let the pointer through with an empty input region, and a `pointerEvents: "box-none"` window with an input region of the rectangles where its views take the pointer (`input::pointer_rects`, kept next to the picking it follows; `window::pass_pointer`, given once GTK has laid the window out); a host's window the app is embedded in is left as it is. Attributes map to GTK where it has an API (title, frame, minimum size, resizable, deletable, a header bar whose decoration layout leaves out the buttons not allowed, hidden title bars with `gtk::WindowControls` over the app, transparency and the shadow as CSS classes); the policies (`closeOnPress`, `closeOnEscape`, `closeOnBlur`) are answered on the main thread; state is reported per window (the host surface's in the app-root environment, a resize once it settles) and the displays are GDK's monitors. `windowDrag`, `windowControl` and `windowResize` views are hit-tested in `input.rs`. Progress and attention go to the app's launcher entry where a dock listens. GTK 4 places windows itself and has no levels, taskbar or workspace hints, largest size or aspect ratio: those attributes and requests are left as they are, and a window's bounds start at the origin. nsh.json `window` supplies launch defaults for the first app window; with `restoreBounds` it opens at the size and in the mode the engine kept. `defaultVisible` is parsed but has no effect: the app host is never presented. A development host presents the app's windows as they open; an error still reports through the app (`dev.rs`). The legacy `MainWindow` state on the hidden host remains for app-root environment reads and is 待平台验证. | | App links and files (nsh.json `schemes`, `fileTypes`) | `links.rs`, `desktop_file.rs` | The app's desktop entry, `$XDG_DATA_HOME/applications/.desktop`, checked as the app starts. NSH writes its own (marked as NSH's) where there is none and keeps it current; an entry an installer wrote for this executable keeps every line but gets the MIME types and URL field code it lacks; an entry for another executable is left alone (the copies share the application id, so links still reach the running one). Changes are written whole to a temporary file renamed into place. A scheme becomes the app's by default only where no application handles it yet. The merge is a pure function with unit tests | | Login item (`Application.launchAtLogin()`, `setLaunchAtLogin`) | `login_item.rs`, `desktop_file.rs` | An XDG autostart entry, `$XDG_CONFIG_HOME/autostart/.desktop` (`glib::user_config_dir`), written whole to a temporary file renamed into place, its `Exec` quoted and escaped as the Desktop Entry specification says (a space or tab at either end of a value as `\s` or `\t`, since readers trim a line's ASCII white space); `Exec`'s program and `TryExec` name this executable, the one the app started from (`nsh_core::restart::program_path`, taken as the backend is made at the app's start: after an update or a package manager replaced the app, the path it starts from, where the process' own reads `(deleted)`), so an entry where either names another (or is missing) reads as disabled and stays on disabling. The entry is the setting: `Hidden=true` or `X-GNOME-Autostart-enabled=false` (what the desktops' settings write) read as disabled, a key given twice as its last (GLib's rule), and enabling writes the entry on again; an entry that is not UTF-8 reads lossily, so enabling replaces it. In a Flatpak (`/.flatpak-info`) or Snap sandbox (the executable below `$SNAP`, which programs a snap starts inherit) the status is `unavailable`. `AppView::load` gives the engine the backend only in `run_app`'s own view (not one embedded beside it) with `AppOptions::login_item`, which `nsh-linux-app` sets unless `NSH_APP_DIR` | | Clipboard | `system.rs` | The display's `GdkClipboard`; reads are asynchronous (another app's text), `hasText` only looks at the formats on offer | diff --git a/third-party/nsh/docs/dev/macos.md b/third-party/nsh/docs/dev/macos.md index 323eba7f7f7..5db51f06616 100644 --- a/third-party/nsh/docs/dev/macos.md +++ b/third-party/nsh/docs/dev/macos.md @@ -71,6 +71,9 @@ Primary pointer events over hosted AppKit views (`NSTextField`, `NSTextView`, monitor (`input::install`) before AppKit's responder/modal tracking consumes them, keeping `:active`, pointer modality, momentum cancellation and `PressOutside` overlay dismissal consistent with ordinary `NshView` targets. +A press on an input's editor or its pad is the `Input`'s when it listens, after +the focus AppKit gives the editor, and no view around it hears it +(`tests/native/input_press.rs`, `NSH_INPUT_PRESS_CHECK_ONLY=1`). `InputState::track_press` wraps an input editor's `mouseDown:` (AppKit's modal tracking of the press) and applies `selectTextOnFocus` once tracking ends: a plain click that focused the input selects its text, while a drag, a double click or a @@ -208,6 +211,30 @@ before each redirect and cancels one the grant does not allow, reporting it to t the system reduces motion, and a view's `wheelLineHeight` replaces AppKit's 10-point line. Precise scrolls outside a gesture never glide. Anything else that moves the view (a drag, an animated scroll, a spring back) first shows where the events got to (`settle`). +- **Trackpads stretch content past the edges as `NSScrollView` does** (`scroll.rs`, `gesture_move`): a twentieth of + the fingers' travel past the edge, AppKit's `_NSElasticDeltaForReboundDelta` on macOS 26 (tabulated, and measured + with an `NSScrollView` logging its events: 300 points of the fingers' deltas past the top showed 15, 719 showed 37; + WebKit's rubber band adds up the same deltas, which `scrollingDeltaY` and the public + `kCGScrollWheelEventPointDeltaAxis1` carry). A move back towards the content takes the stretch back one to one, and + fingers that touch stretched content go on from where it shows (`unstretched`). A view that pulls to refresh is less + stiff past its top short of its threshold, as AppKit's refresh controller: the fingers' moves divided by + `0.1 + 0.9 p^4` of the share `p` of the threshold shown, which takes 5.6 times the threshold to reach it + (`stretch_for`). +- **Content springs back from past the edges as in `NSScrollView`** (`scroll.rs`, `Phase::Bounce`), on AppKit's + spring, `_NSElasticDeltaForTimeDelta` (tabulated on macOS 26, the function WebKit's rubber band calls): content `x0` + past the edge moving at `v` is `(x0 + 0.31 v t) e^(-t / 80 ms)` past it `t` later. Let go past an edge, the content + springs back from where it shows at the fingers' speed as they lift (none after a pause: the velocity tracker's; at + rest it falls as `e^(-t / 80 ms)`), with `onScrollEnd` at the end. The system's momentum running into an edge of a + view that bounces carries the content past it from the frame that shows it at the edge, leaving it at the momentum's + speed, and springs back; the momentum's remaining events go unused, as WebKit's rubber band on macOS ignores them, + and `onMomentumEnd` and `onScrollEnd` come when the content is back. Measured against `NSScrollView` with a trackpad + on a 120 Hz display, run into the top at 12.8 points per ms it went 114 points past (about 9 points for each point + per ms), out in about 70 ms, back to a tenth of that by about 390 ms (at any speed) and within a point by about 600 + ms. The speed is the events' move over their time about two events back (`event_speed`): the interval `Resampled` + smooths still holds a gesture's two events a frame as the momentum begins (5 to 7 ms rather than 8.3) and one + event's time wanders around the frames (6 and 10 ms apart at 120 Hz), so one event's move over either measured a + flick near an edge, whose momentum runs into it in its first events, up to 1.7 times as fast. A view with + `bounces: false` stops at the edge and ends with the system's momentum. - **One hop per commit.** The engine runs on its own thread; its sink queues each commit and wakes the main queue once (`DispatchQueue::main`), and the main thread applies every queued batch in order (`surface.rs`, `mount.rs`). While native animations or the platform's own (a scroll glide, a zoom) run, batches are spread over frames so a @@ -241,12 +268,14 @@ before each redirect and cancels one the grant does not allow, reporting it to t not typeset twice; when that read is the main thread's, it holds the text's lock for the time of one layout. Texts with attachments are made at once on the engine. - **Texts are painted off the main thread** (`text/raster.rs`): a content layer's delegate draws during Core - Animation's commit, so a page of new texts would spend its first frame there. The engine thread paints the texts of - a batch whose views get a frame in it into IOSurfaces at the window's backing scale (`text::prerender`, in the sink, + Animation's commit, so a page of new texts would spend its first frame there. The engine thread paints each + batch's new or re-laid-out texts at the views' known sizes (remembered across batches in the sink, so recycled cells + whose frames did not change still pre-render) into IOSurfaces at the window's backing scale (`text::prerender`, spread over a few threads) before the batch leaves; the main thread sets a surface as the content layer's - `contents` when the text first draws (`text::show_raster`). Whatever a raster cannot know draws in the commit as - before: a layer of another size or density, a selection, an animated or transitioning color, and every later - redraw. A text out of sight when its batch is applied drops its raster. + `contents` when the text draws (`text::show_raster`), while same-layout updates at the same size keep the partial + recolor path. Whatever a raster cannot know draws in the commit as before: a layer of another size or density, a + selection, an animated or transitioning color, and every later redraw. A text out of sight when its batch is + applied drops its raster. - **Frames**: native animations, JS frame requests, scroll glides and transitions run on one display link per surface (`NSView::displayLinkWithTarget_selector`) while something animates, which drives every window of the surface, the app's own (`Window.open`) too. AppKit fires a view's link only while some of the view's window shows on a screen @@ -323,7 +352,7 @@ before each redirect and cancels one the grant does not allow, reporting it to t | Decoration | `decor.rs`, `visual.rs` | The view's layer for one radius (circular or continuous), shape layers for differing radii and borders whose sides differ or are dashed / dotted; box and inset shadows, gradients, outlines, filters (iOS's `visual.rs`), `mixBlendMode` as the layer's compositing filter; a backdrop as a subview: an `NSVisualEffectView` with `macos={{ backdrop }}`'s material, blending and state or the blur's popover material, or glass with `glassTintColor`, with the background moved to a fill layer above it; `apply` caches what it set, so per-frame calls are cheap; a layer has one mask, so when the view's own layer carries the corner shape for differing radii, `clipPath` and `maskImage` mask that shape instead of the layer, and corners and effect apply together (`tests/native/mask_corners.rs`) | | Images | `image.rs`, `blur.rs` | Loaded through the core's shared loader and decoded images (`docs/dev/images.md` "Loading and memory"): ImageIO thumbnails at the view's size bucket, in the process's image budget, downloaded with `NSURLSession` (the core loader's transport hook, so the system's proxies, authentication and ATS apply), leased by the views showing them; blur and color filters baked into variants in the same budget; `asset:/`, http(s), `file:`, `data:`; tint as a colored layer masked by the image; animated GIF / APNG / WebP as a keyframe animation of `contents` | | Canvas | `canvas.rs` | The recorded drawing replayed with Core Graphics (iOS); drawings that clear or composite go into a transparency layer, so they only touch the canvas's own pixels | -| Scroll views | `scroll.rs` | Offsets of their own (the rubber band, deceleration, snap durations, the indicator's geometry and reveal distances are `nsh_core::scroll`'s, the other desktops'), shown by the container's bounds origin when it contains inputs, otherwise by its layer's `sublayerTransform` and committed to its bounds origin at rest; trackpad scrolls follow the system's phases and momentum (rubber banding while the fingers are down, past an edge the innermost view along the gesture whose content overflows or that pulls to refresh, or for a vertical gesture the outermost vertical view when none overflows, a spring back after; a mouse press anywhere stops the momentum), notched wheels move 10 points per line (or the view's `wheelLineHeight`; gliding on a `smoothWheel` view) and stay on their view for 200 ms; mouse drags never scroll (they are the app's: pans, responders, text selection); snapping and paging glide from where the fingers lift; sticky cells; the indicator and refresh spinner in an overlay view that lets the mouse through (the root still lets the mouse drag the indicator as a scroll bar, and the indicator shows and is kept as on Linux); the keyboard scrolls as on Linux; a field that gets the focus is scrolled into view; zoomable views (`maximumZoomScale` above `minimumZoomScale`) scroll both ways, zoom with trackpad pinches and Control + wheel around the pointer and with `zoomTo` (eased, as the web's), center content smaller than the viewport (`centerContent`) and show no indicator | +| Scroll views | `scroll.rs` | Offsets of their own (deceleration, snap durations, the indicator's geometry and reveal distances are `nsh_core::scroll`'s, the other desktops'), shown by the container's bounds origin when it contains inputs, otherwise by its layer's `sublayerTransform` and committed to its bounds origin at rest; trackpad scrolls follow the system's phases and momentum (rubber banding while the fingers are down, as stiff as `NSScrollView`'s, past an edge the innermost view along the gesture whose content overflows or that pulls to refresh, or for a vertical gesture the outermost vertical view when none overflows, a spring back after, `NSScrollView`'s; momentum that runs into an edge of a view that bounces goes past it and springs back the same way; a mouse press anywhere stops the momentum), notched wheels move 10 points per line (or the view's `wheelLineHeight`; gliding on a `smoothWheel` view) and stay on their view for 200 ms; mouse drags never scroll (they are the app's: pans, responders, text selection); snapping and paging glide from where the fingers lift; sticky cells; the indicator and refresh spinner in an overlay view that lets the mouse through (the root still lets the mouse drag the indicator as a scroll bar, and the indicator shows and is kept as on Linux); the keyboard scrolls as on Linux; a field that gets the focus is scrolled into view; zoomable views (`maximumZoomScale` above `minimumZoomScale`) scroll both ways, zoom with trackpad pinches and Control + wheel around the pointer and with `zoomTo` (eased, as the web's), center content smaller than the viewport (`centerContent`) and show no indicator | | Input | `input.rs`, `nsh_core::input` | The root's `hitTest:` takes every mouse event inside it, and NSH picks the view itself (transforms inverted, `overflow`, `pointerEvents`, hit slop, hidden screens, views animating out); a hosted view gets the event from AppKit only where NSH's picking lands on it, even below `pointerEvents: none` overlays (`native_at`): AppKit's own picking would give a web view the clicks on what NSH draws over it (a menu outside its parent's frame, transformed views) and on web views that are hidden, animating out or under `pointerEvents: none`. Touches for the responder system, `panActivation` gates, presses, long presses, pressed and hovered states, `onMouseEnter` / `onMouseLeave` / `onMouseMove`, cursors (`NSCursor`), native pans, trackpad pinch and rotation (Control + wheel pinches), the mouse's back button goes back; the decisions over plain data (a press's events, `panActivation` gates, hover changes, hit areas, wheel latching) are `nsh_core::input`'s, shared with the other desktop backends | | Keyboard | `keyboard.rs`, `keymap.rs`, `input.rs` | One local monitor per surface (`addLocalMonitorForEventsMatchingMask:`) sees `KeyDown`, `KeyUp` and `FlagsChanged` before AppKit dispatches them: the app's keymap match first, then the focused custom view's raw event and its mounted capture rules, then the menus and the responder's defaults (see "Keyboard"); interest and capture follow the logical keyboard ancestry (`ViewProps::key_parent` for a portaled `Overlay`), not the native insert parent; the first responder's `keyDown:` / `keyUp:` / `flagsChanged:` report raw events too when AppKit or a host hands a key to a view directly (the same event is not reported twice); a left press focuses the innermost `focusable={true}` view | | Text inputs | `text_input.rs` | `NSTextField` / `NSSecureTextField`, multiline `NSTextView` in an `NSScrollView` (it bounces only while its text overflows), hosted at the content box in a view that fills the input (`InputPad`: a click on the padding, or beside a field's line, goes to the editor at the nearest point; hidden while the input or its content box has no area, as in a `display: none` subtree, since it does not clip), borderless (the view draws the decoration); edit counts drop stale JS values; offsets are `NSString`'s UTF-16; a click outside a field that edits leaves the focus in it (the root refuses first responder during a mouse press), `blur()` and Escape hand it over; return does what `submitBehavior` says (see "Keyboard") | @@ -341,7 +370,7 @@ before each redirect and cancels one the grant does not allow, reporting it to t | Environment | `system.rs` | Color scheme: the app's appearance when it forces one, else the root's effective appearance (the root's appearance is set to the app's, so hosted controls follow); locale and RTL from `NSLocale`, reduce motion and VoiceOver from `NSWorkspace` (live), the backing scale factor (again when the window moves to another screen: `pixelRatio()`), the OS version; whether the app is in use (`lifecycle()`: `background` while none of it shows, hidden or `NSApplication.occlusionState` without `visible` (its windows minimized or covered), `active` while it is the active app, else `inactive`; live, from `NSApplication`'s activation, hiding and occlusion notifications, the embedding app's for an embedded surface); the preferred languages (`localeSettings()`'s `languages`: `NSLocale.preferredLanguages`, read again with the other settings); the regional preferences (`localeSettings()`'s `hourCycle` and the like: the hours of `NSDateFormatter`'s `j` format, `NSCalendar.firstWeekday`, `NSLocale`'s measurement system and the `AppleTemperatureUnit` default, over `LocaleSettings::parse` of the locale's identifier; read again with the other settings); the time zone (`localeSettings()`'s `timeZone`: `NSTimeZone.systemTimeZone`'s name, live from `NSSystemTimeZoneDidChangeNotification`, Foundation's cached zone reset first); `platform.os` `"macos"`, idiom `desktop`, font scale 1, safe area and keyboard height 0; the wake count (`wakeCount()`: one more on every `NSWorkspaceDidWakeNotification`); the network (`network()`: the path monitor `nsh_platform_apple::network` shares with iOS, live) | | Window chrome (`nsh/desktop`) | `chrome.rs` | The `title` attribute; a hidden title bar is `FullSizeContentView` with a transparent, untitled title bar (the traffic lights stay), its area (native frame geometry, including `contentLayoutRect` for a toolbar, and the zoom button's right edge + 8) reported as the environment's `title_bar`, 0 in full screen; a left press on a `windowDrag` view (or the hidden title bar's strip no view claims) waits for AppKit's own `mouseDragged:`, and the first past the slop goes to `performWindowDragWithEvent:`, so the window server moves the window in step with the pointer, with edge tiling, as GPUI's `start_window_move` does (never from a tracking loop: `pitfalls.md`); a release within the slop is a click, which reaches the app (including ancestor press handlers) only if its original view remains under the pointer and draggable; the next press or replacing the app cancels the pending press; a double click does what `AppleActionOnDoubleClick` says (zoom by default); `setBounds` merges the fields given with the window's frame and calls `setFrame:display:animate:` (`x`/`y` are the top left corner, down from the primary screen's top as on the other platforms: `appkit_frame` flips `y` at the height of `NSScreen.screens[0]`, whose bottom is the origin of Cocoa's screen coordinates on every display arrangement, and a `height` without a `y` keeps the top edge), the `level` attribute maps to an `NSWindowLevel` (`desktopIcon` is `kCGDesktopIconWindowLevel`, and it also makes the window stationary on every space, out of Mission Control and Cmd+`); `focus()` deminiaturizes, activates the app (`activateIgnoringOtherApps:`, as other toolkits' focus calls do: `activate()` only asks since macOS 14 and is turned down after a click on the app's tray icon; `show()` and a new window ask: `pitfalls.md`) and makes the window key; the application menu replaces the main menu (its first submenu is the app menu; the replaced one comes back with `null`, when the app stops (`AppView::stop`, or another app loading in its view) or when its view goes, but only while the app's own bar is the one shown: another view's `null` leaves it, and with several views the original comes back as the last bar shown comes down; `Chrome::remove_menu`), context menus are `popUpMenuPositioningItem:atLocation:inView:` from the main queue (they track the mouse in a loop of their own; one the app opens without a place opens where the root's last pointer event was (a move, or a press or release of any button: a right click's menu opens at that click), else at the cursor: the test agent's input leaves the cursor where it is); a menu item's `icon` (`MenuAction::icon`, `MenuItem::Submenu`'s, but not the bar's titles) goes through the images' pipeline (`image::load_menu_icon`, off the main thread, at the largest scale of the screens, since a menu opens on any of them) and arrives as `NSMenuItem.setImage` of an `NSImage` of up to 16pt, with `preferredImageVisibility` `.visible` (from macOS 27 AppKit hides items' images otherwise: `pitfalls.md`); an SVG is a template (`setTemplate`), which AppKit paints in the text's color (dark mode, selection, disabled), and a bitmap keeps its colors; a load is given up with its menu, a failed one warns and leaves the item as it is; role items send AppKit's standard actions down the responder chain and are not reported, the others target an `NshMenuTarget` that reports their tag; AppKit validates the items (roles are enabled and titled by the responder chain: `Undo Typing`, `Exit Full Screen`), a disabled item's action is one nothing answers; the menu bar has one tray item (`tray.rs`): the app that sets a tray takes it from the app that had it, and only the app that has it removes it, with its own removal or when it stops; with an app's bar height NSH attaches no toolbar (from macOS 26 a toolbar enlarges the window's corners: `pitfalls.md`) and centers the traffic lights itself (`TrafficLights`, per window, the main one and the app's own): the title bar's container (the close button's superview's superview) as tall as the bar at the window's top, the three buttons moved down to its middle with AppKit's `x` (or to the app's `controlsOffset` using saved AppKit spacing), placed again synchronously on `NSWindowDidResizeNotification` (after AppKit's `_updateButtonPositions` returns and before display, keeping every live-resize frame aligned) and coalesced onto the next main-queue turn from `NSViewFrameDidChangeNotification`s on the container, title bar view and buttons (since `_NSThemeWidget`'s `setFrameOrigin:ignoreRentry:` ignores re-entrant moves of the notifying button during layout: `pitfalls.md`), and given back their frames with the system's bar, in another window or when the window goes; nothing is placed in full screen; `titleBar().height` is the app's height; a host's existing toolbar stays untouched and reports its obscured height, the title bar view's around the traffic lights and the toolbar (`contentLayoutRect` lags the frame during a resize: `pitfalls.md`), refreshed after deferred layout | | Window state (`nsh/desktop`'s `WindowRef.state()`, `displays`, `setPlacement`) | `window_state.rs` | The window's move, resize, (de)miniaturize, full screen and screen notifications read its state again into the environment, which the engine holds back until a move stops; the displays are `NSScreen.screens`, in NSH's screen coordinates (the primary screen's top left, `y` down), sent before the app starts and again when the screens change, each with an id that stays from one launch to the next and its notch as a cutout (`NSScreen`'s auxiliary top areas and safe area); `setPlacement` restores the frame, then zooms or enters full screen; `hide()` (and a main window kept alive on close) takes a full screen window out of full screen first and orders it out once it is back on its desktop, so its space goes with it; AppKit ignores `toggleFullScreen:` while full screen animates, so a hide, `setMode` or `setPlacement` asked for then waits for the animation's end, and the last mode or placement asked for applies then (`FullScreenHide`) | -| Windows (`nsh/desktop`'s ``, `Window.open`, `WindowRef`) | `window.rs` | Every window renders from the surface's one engine. A window of the app's own is a dialog root the core sends `OpenWindow` for: it leaves the main window's modals and becomes the content of a window of its own, its size the root's, its input routed to the surface with that root as the one events are picked in, shown once its first frame is in (focused, when the app called `focus()` meanwhile: `Window.open(..).focus()`). Kinds pick the class: `normal` and `dialog` are `NshWindow`s (a dialog is a child window of its parent; a modal one holds its parent's input), `panel` an `NSPanel` with the small title bar, `popup` and `overlay` borderless panels (an overlay ignores the mouse); a panel whose `activate` attribute is false (the default of `panel` and `overlay`, not of `popup`) is non-activating (`NonactivatingPanel`) and never activates the app. `SetAttributes` maps each attribute onto the window (style mask, content size limits and aspect ratio, level, collection behavior, `NSVisualEffectView` backdrops, sharing type, document edited, represented URL, tabbing), the same code for the main window; requests are intents (`setMode` zooms or enters full screen, `requestAttention` asks the app's Dock icon). Each window reports its state (moves and resizes once they settle) and its hidden title bar's area on its root; `SetContentSize` (`sizeToContent`) sizes the content area, keeping the top left corner. Popups the core places in a window's root, and dialogs presented in a window (`ModalConfig.window`), show in that window (those of its first render, presented in the batch that opens it before it is a window, move to it when it opens): their sizing, focus, Escape and back follow the window the key is in, and so do the app's shortcuts, sheets (alerts, open and save panels) and context menus. The close, Escape and blur policies are held natively and answered on the main thread; the app hears of them afterwards (the main window's close press waits briefly for the app's turn). `windowControl` views act as the window's buttons (and read as them to VoiceOver), `windowResize` views resize the window by their edge. AppKit's Dock lists apps, not windows: `taskbar` is the Window menu and Cmd+`, `progress` the app's Dock tile (the last window that set one), and `requestAttention` bounces the app's icon | +| Windows (`nsh/desktop`'s ``, `Window.open`, `WindowRef`) | `window.rs` | Every window renders from the surface's one engine. A window of the app's own is a dialog root the core sends `OpenWindow` for: it leaves the main window's modals and becomes the content of a window of its own, its size the root's, its input routed to the surface with that root as the one events are picked in, shown once its first frame is in (focused, when the app called `focus()` meanwhile: `Window.open(..).focus()`). Kinds pick the class: `normal` and `dialog` are `NshWindow`s (a dialog is a child window of its parent; a modal one holds its parent's input), `panel` an `NSPanel` with the small title bar, `popup` and `overlay` borderless panels (an overlay ignores the mouse; a `pointerEvents: "box-none"` window takes it only over its views, as the input's picking finds them with the root aside: `box_none.rs`; a host's window the app is embedded in is left as it is); a panel whose `activate` attribute is false (the default of `panel` and `overlay`, not of `popup`) is non-activating (`NonactivatingPanel`) and never activates the app. `SetAttributes` maps each attribute onto the window (style mask, content size limits and aspect ratio, level, collection behavior, `NSVisualEffectView` backdrops, sharing type, document edited, represented URL, tabbing), the same code for the main window; requests are intents (`setMode` zooms or enters full screen, `requestAttention` asks the app's Dock icon). Each window reports its state (moves and resizes once they settle) and its hidden title bar's area on its root; `SetContentSize` (`sizeToContent`) sizes the content area, keeping the top left corner. Popups the core places in a window's root, and dialogs presented in a window (`ModalConfig.window`), show in that window (those of its first render, presented in the batch that opens it before it is a window, move to it when it opens): their sizing, focus, Escape and back follow the window the key is in, and so do the app's shortcuts, sheets (alerts, open and save panels) and context menus. The close, Escape and blur policies are held natively and answered on the main thread; the app hears of them afterwards (the main window's close press waits briefly for the app's turn). `windowControl` views act as the window's buttons (and read as them to VoiceOver), `windowResize` views resize the window by their edge. AppKit's Dock lists apps, not windows: `taskbar` is the Window menu and Cmd+`, `progress` the app's Dock tile (the last window that set one), and `requestAttention` bounces the app's icon | | Clipboard | `system.rs` | `NSPasteboard` | | Networking | `net.rs` | `NSURLSession` (the iOS backend's) | diff --git a/third-party/nsh/docs/dev/native-pipeline.md b/third-party/nsh/docs/dev/native-pipeline.md index ad72e5e9167..9d1817486f5 100644 --- a/third-party/nsh/docs/dev/native-pipeline.md +++ b/third-party/nsh/docs/dev/native-pipeline.md @@ -111,7 +111,9 @@ module: argument to `setup` is the default as a JSON string, or `null` to leave the status bar alone. Before any other import, the entry imports `virtual:nsh-app`, whose `setup(null, null, null, null, app)` hands over what `appInfo()` reports (`nsh.json`'s id, name, version and build, the package's `--version` and `--build`, and whether the build is - a development one), so a module reads it at its top level; a runtime that predates the fifth argument ignores it. A font import + a development one), so a module reads it at its top level; a runtime that predates the fifth argument ignores it. A + bundle run from a verified package reports its header's id, name, version and build instead: the engine hands them + to the VM before evaluation, and the header wins over what the bundle carries. A font import (`import Inter from "./Inter.ttf"`) compiles to `nsh:rt`'s `font(uri, family)`: its family, registered by the host before the first frame. diff --git a/third-party/nsh/docs/dev/performance.md b/third-party/nsh/docs/dev/performance.md index f40d88a369b..7a9fd4c5033 100644 --- a/third-party/nsh/docs/dev/performance.md +++ b/third-party/nsh/docs/dev/performance.md @@ -4,6 +4,22 @@ Performance is the project's first priority; the rules are in `AGENTS.md`. Chang after `nsh test --trace` timings and item counts (`nsh trace` before it, in the records below). Current baselines (Apple Silicon except where noted): +Queued computations run without an ancestor list (`reactive.rs`, 2026-11-28, Linux x86_64, Ryzen 9 7950X, release, +against `25b304afe`): every computation run from the queue (`run_top`) allocated a list holding itself before looking +for stale owners to run first, which it almost never finds. The list now holds only those owners and the computation +runs after them, so it no longer allocates for each effect a write reruns. `bench_reactive_updates` +(`reactive/tests.rs`), the median of ten alternating runs of each version pinned to one idle core, ns per write: + +| Effects reading the signal | Before | After | +|---:|---:|---:| +| 1 | 39 | 36 | +| 32 | 979 | 888 | +| 1,024 | 30,776 | 28,034 | + +`stale_owners_run_before_a_child_queued_first` keeps the order owners run in. The counter control (eight presses of +`+1`, ten alternating debug runs) keeps 9 commits, 148 ops, 128 mount items and 30 nodes; its summed commit times stay +within their run-to-run spread (median 2,055 / 2,143 µs). + Resolved class styles cached and style records shared (`core/classes.rs`, `core/mod.rs`, `core/layout_tree.rs`, `core/components.rs`, `tailwind/mod.rs`, `tailwind/utilities.rs`, 2026-11-25, macOS arm64, Apple M5, release against `main` at `b729299a0`): every restyle unconditionally cloned `Style` (~900 B) for TUI resting fills, zero-initialized @@ -33,6 +49,24 @@ headless `PositionalClasses`, three alternating rounds): The debug `examples/counter/App.tsx --trace` control keeps 56 ops, 50 mount items, and 15 nodes with every mount item identical (`Node` record stays at 600 B). +List row offsets rebuilt without a copy of the rows (`core/list.rs`, `fenwick.rs`, 2026-11-28, Linux x86_64, Ryzen 9 +7950X, release, against `25b304afe`): `rebuild_offsets` collected every row's size into a `Vec` and then built the +Fenwick tree in a second one, and an empty list still allocated the tree's leading zero. The row sizes now go straight +into `Fenwick::from_sizes`, which builds the empty tree (`Fenwick::default()`, what `ListState::new` starts with) for +no rows. `bench_list_rebuild_offsets` (`core/list.rs`, measured and estimated heights, both gaps and a partial last row +checked against every prefix), the median of ten alternating runs of each version pinned to one idle core, ns per +rebuild: + +| Rows × columns | Before | After | +|---|---:|---:| +| 0 × 1 | 6 | 2 | +| 8 × 1 / 8 × 3 | 29 / 37 | 19 / 27 | +| 1,024 × 1 / 1,024 × 3 | 2,413 / 3,526 | 1,806 / 2,912 | +| 65,536 × 1 / 65,536 × 3 | 153,120 / 223,930 | 115,542 / 186,131 | + +`examples/bench/RowsTs.tsx --trace` (open, scroll 3,000 pt down and back, ten alternating debug runs) keeps 1,344 ops, +1,453 mount items and 222 nodes; its first commit stays within its run-to-run spread (median 3,370 / 3,382 µs). + Sibling position classes looked at once per parent (`core/classes.rs`, 2026-11-23, macOS arm64, release, the change on `cc19b8b38` against `main` at `2c17143e7`): every child inserted or removed ran `positions_changed` over all of its siblings at once (cloning the list and counting them), so mounting N rows with `odd:` or `last:` classes looked at diff --git a/third-party/nsh/docs/dev/pitfalls.md b/third-party/nsh/docs/dev/pitfalls.md index a65b55fa92c..2ce0b5ef2ec 100644 --- a/third-party/nsh/docs/dev/pitfalls.md +++ b/third-party/nsh/docs/dev/pitfalls.md @@ -481,6 +481,9 @@ Things that were found the hard way. Read the section of the area you change bef little faster, but on the gallery's index they kept the GPU cache ~50 MB over its 125 MB budget on a Pixel 10 Pro, where the corners' squares bring it under (performance). A box too small for a middle between its corners' squares takes one layer; a software canvas still clips by path. + So does a box with a child drawn through a layer of its own (a `filter`, a blend mode: `Effects.layered`): hwui + filters a layer again for every clip it is drawn under, and the seven pieces made the gallery's Aurora card (four + blurred, drifting gradients) blur 28 times a frame, 75–85 % janky frames on a Pixel 10 Pro; 13–20 % in one layer. - **Android, backdrop blur**: `Backdrop` records what lies behind the view into a `RenderNode` before every frame, and hwui draws that whole node into a layer and blurs it every frame. The node is recorded at the size where the blur's deviation is 4 px (Skia's GPU blur scales its input down to that before blurring anyway) and stretched @@ -489,13 +492,26 @@ Things that were found the hard way. Read the section of the area you change bef (`getGlobalVisibleRect`) records nothing. Four glass views of about the screen's size, without shadows, slid at 34 ms a frame on an emulator, 12 ms after. Every blurred view still records and blurs its backdrop again on every frame, also when nothing behind it changed: a drawer sliding over blurred panes makes each of them blur - again (31 ms a frame on the emulator, 17 ms with the panes not blurred). + again (31 ms a frame on the emulator, 17 ms with the panes not blurred). A blurred view's display list holds its + backdrop node, so a backdrop that records it holds everything behind it a second time, and hwui's `prepareTree` + walks a node once for every display list that draws it: the five stacked layers of a progressive blur (the + gallery's Styles page) walked the window 31 times a frame, 37 ms of a Pixel 10 Pro's RenderThread while scrolling + and 808 ms in the first frame. A view that draws nothing but its blurred backdrop (`Backdrop.onlyBlurs`) is left + out of the backdrops behind it, which then blur what lies behind the whole stack: about 3 ms a frame. - **Android, hidden views lose their display lists**: HWUI drops the display list of a RenderNode no longer drawn, and `setVisibility` tells every view under the one that changes, whose background `Drawable.setVisible` calls `invalidateSelf`. A whole screen hidden and shown again therefore records all of its views again (22–36 ms for the gallery's index on a Pixel 10 Pro). `StackBox` keeps drawing the screen a pop reveals at alpha 0 while it is `INVISIBLE` (which still keeps it out of touches, accessibility and focus), and `Decor.setVisible` does not invalidate (#519). +- **Android, animations out of sight**: HWUI draws the window again for any view whose properties change, seen or + not. Native loops keep running on cards scrolled away (the gallery's Animations page: the hero's orbits, Aurora's + drifting lights), and a still screen above them drew 120 frames a second on a Pixel 10 Pro (~4.5 ms of + RenderThread and 2 ms of UI thread each). `Mounter.outputs` holds the animated look (alpha, transform, colors) of a + view whose parent is not in sight (`isShown` and `getGlobalVisibleRect`; the parent, as a view moved out by its own + transform would never move back) and sets the latest values once it is, on the next animation tick or before + the next frame draws (a scroll, a pop). The graph still steps, so ends and promises keep their time; the same + screen draws no frame. - **Android, focusing a view that is not shown**: `requestFocus` fails on a view that is not shown, and a page's `focus()` (from a timer of the render, say) can arrive in the batch that pushes it, the engine merging a wake-up's commits into one batch, whose commands run before `finishNavigation` places the page (a transition shader also diff --git a/third-party/nsh/docs/dev/platforms.md b/third-party/nsh/docs/dev/platforms.md index ade58031608..8bbb6583392 100644 --- a/third-party/nsh/docs/dev/platforms.md +++ b/third-party/nsh/docs/dev/platforms.md @@ -120,8 +120,7 @@ mounts the native component `TAB_BAR_COMPONENT` the platform registers; off: `Ta false), and `Environment::clipboard_images` (`None` by default: as NSH's own backends on the OS, none on Android; `Some` from a platform built outside NSH) is images on the clipboard (off: `Clipboard`'s image calls reject with `ERR_FEATURE_UNAVAILABLE_ON_PLATFORM` before reaching the platform), and `Environment::scheme_links` (`None` by default: as NSH's native backends on the OS, none on the web; the GPUI and -terminal backends say `Some(false)`) is links of the app's schemes reaching it (off: `open_auth_session` fails at once -unless the platform shows sign-in sessions itself). The Mini Program platform turns the first two off; as it hands the +terminal backends say `Some(false)`) is links of the app's schemes reaching it (off: the app hears none). The Mini Program platform turns the first two off; as it hands the app no links of its schemes, it should say `Some(false)` for the third. The other services follow the same pattern (`screen_color`, `file_requests`, `notifications`, `audio`: what the platform answers). diff --git a/third-party/nsh/docs/dev/reactive-components.md b/third-party/nsh/docs/dev/reactive-components.md index c7ef6c24e30..a066e9ccd47 100644 --- a/third-party/nsh/docs/dev/reactive-components.md +++ b/third-party/nsh/docs/dev/reactive-components.md @@ -22,7 +22,7 @@ when it was written; NSH now ships capabilities and no styled components, and th platform's services, applied in order right after the call); an `async fn` takes none and uses the free functions. - **Views JS made adopt the owner above them.** A component JS creates among another's JS children is made once its host is in the tree, under the owner of where the component above places its children, so context and failures - reach it. + reach it. A Rust view's content for a nested component (children or a slot's fill) waits and adopts the same way. - **The first frame costs more.** "The first render costs about the same" did not hold: 200 Buttons take ~40% more core time to mount (1.04ms against 0.75ms; JS is unchanged), the bindings' computations and the props' signals that make every later update cost only what it changes (`docs/dev/performance.md`). A binding's first diff --git a/third-party/nsh/docs/dev/repository-map.md b/third-party/nsh/docs/dev/repository-map.md index 6df088439a2..683470a8c57 100644 --- a/third-party/nsh/docs/dev/repository-map.md +++ b/third-party/nsh/docs/dev/repository-map.md @@ -72,7 +72,8 @@ crates/ per module (`camera`: `Camera`, photos from the system's camera on iOS and Android; `location`: `Location`, the device's position on macOS, iOS and the web; `photos`: `Photos`, the recent photos of the user's library on iOS; `push`: `Push`, - remote notifications on iOS and, through a push service's binding, Android; `speech`: + remote notifications on iOS and, through a push service's binding, Android; `share`: `Share`, + the system's share sheet on iOS, Android, macOS and the web; `speech`: `Speech`, speech recognized as the user talks on macOS, iOS, Android, Windows and the web), its code in `src//` on the platform crates' extension points, what the packaged app needs under `[package.metadata.nsh.features.]` (merged into packages by `nsh-cli`'s `module_meta.rs`) diff --git a/third-party/nsh/docs/dev/rich-editor.md b/third-party/nsh/docs/dev/rich-editor.md index 5af5b2ddbc7..a6e09341fbb 100644 --- a/third-party/nsh/docs/dev/rich-editor.md +++ b/third-party/nsh/docs/dev/rich-editor.md @@ -143,7 +143,9 @@ part (`classes.nodes` / `styles.nodes` by type name, then `type[attr=value]`), n is `"bullet"` or `"ordered"` (the starter's lists) carry a marker the view draws in the `listMarker` part, absolutely placed in the indent before the item (`•`, `◦`, `▪` by bulleted depth, or the number from the list's `extra.listMarkerStart` attribute, `order` by default), as TextView places its markers; it is not in the document and -takes no positions; a textblock is one text whose spans are its texts with +takes no positions; a task item (`extra.render = "task"`) is a row of a `Checkbox` filling the `taskCheckbox` part's +box, whose indicator holds a `✓` in the `taskCheckmark` part while `checked` and the app gives that part classes or a +style (without it nothing is drawn, as before the part existed), and its content; a textblock is one text whose spans are its texts with their marks' parts (`classes.marks`), split at inline decorations (their `class`); inline leaves are their one-unit `leafText` (a line break), attachments (their node view), their `renderText` as a span of their part (a mention's `@name`, still one position: a press inside it lands on its nearer side), else a box of their part; widget decorations are @@ -275,7 +277,12 @@ children do. The app places them in the content box's points, which `nodeRect(po Tables (`view/table.rs`): the tree walk flattens a table (a node whose spec's `extra.tableRole` is `"table"`): its cells, row after row, are the table's children; rows have no view. The table's block is a grid (`grid()`): a column per column of its `TableMap`. The grid measures the rendered cells, including inline node views, with -`fit-content(20rem)` for each automatic track. A saved `colwidth` or live resize sets a track to that width, at least +`fit-content(20rem)` for each automatic track (`minmax(min-content,auto)` with `fullWidth`: the grid is as wide as the +scroll view, so the free space stretches those tracks, long text wraps, and a column that cannot wrap overflows the +grid and scrolls; when every column has a width, the last one's track is `minmax(,auto)`, so the table never +shrinks below the editor's text after the last resize; a drag narrowing that column while it is drawn wider than its +width, which would show nothing, saves nothing, while narrowing it in a table wider than the editor is saved). The +table's hit bounds reach its last cell, so the handles of columns past the editor's edge still resize. A saved `colwidth` or live resize sets a track to that width, at least `cellMinWidth`. Each row fits its content and is at least its saved `height`. The horizontal scroll view gives the grid room to measure its contents and scrolls when it is wider than the editor. Each cell is placed at its map slots (`col-start` / `col-end` / `row-start` / `row-end`, so spans and rowspans need no row views) and takes its node part as other blocks do. The @@ -288,7 +295,8 @@ beside it may be nearer), and a press on a cell's or table's own padding places cell. Up and Down on a cell's first or last visual line go to the cell above or below at the goal x (with no such cell, the keymaps' `arrow` leaves the table); Tab and Shift-Tab are the `table` extension's keys. Over the content, `controls` draws the tables' handles while the document can be edited: on desktops a 6-point band on each column's -right border and each row's bottom border (`resizable`; the last column's when `lastColumnResizable`), the column- or +right border and each row's bottom border (`resizable`; the last column's when `lastColumnResizable`; a press anywhere +on a band resizes, including the half of the last column's or row's band past the table's edge), the column- or row-resize cursor, its line (`tableResizeHandle`, the theme's `primary`) on hover and while dragged; a drag previews the new size in the grid's tracks and commits `setColumnWidth` / `setRowHeight` once on release (at least `cellMinWidth`, rows 16 points). The current cell gets a column grip on the table's top border and a row grip @@ -381,7 +389,8 @@ JS describes. (`core_extensions`: `keymap`, the core keymap and `clearDocument`). - **The built-in extensions** (`extensions/kit.rs`): `document` (`doc`), `paragraph`, `text`, `heading` (`levels`), `blockquote`, `bullet_list`, `ordered_list`, `list_item`, `task_list`, `task_item` (`nested`), `code_block` - (Tiptap's code block options), `hard_break` (`keepMarks`), `horizontal_rule`, `image`, the marks `bold`, `italic`, + (Tiptap's code block options), `code_block_highlight` (`defaultLanguage`; `code_block_highlight_with` adds the + Rust-only `detect_language` guess for blocks naming no language, the view's only), `hard_break` (`keepMarks`), `horizontal_rule`, `image`, the marks `bold`, `italic`, `strike`, `code`, `underline`, `link`, `highlight`, `subscript`, `superscript`, `text_style`, and `text_align` (`types`, `alignments`, `defaultAlignment`: a global attribute), `history` (`depth`, `newGroupDelay`), `trailing_node` (`node`, `notAfter`), `typography` (each replacement `false` or a string), `list_keymap`; each with @@ -498,7 +507,7 @@ A port of prosemirror-tables with Tiptap's table extensions on top. Nothing in i is its spec's `extra.tableRole` (`"table"`, `"row"`, `"cell"`, `"header_cell"`, `TableRole`), and `table_node_types(schema)` finds the four (cached by name in the schema; a cached `NodeType` would hold its schema). `tables::nodes` gives Tiptap's specs: `table` (`tableRow+`, isolating, `extra.render = "table"` plus the options the -view reads: `cellMinWidth`, `resizable`, `lastColumnResizable`), `tableRow` (`height`), `tableCell` / `tableHeader` +view reads: `cellMinWidth`, `resizable`, `lastColumnResizable`, `fullWidth`), `tableRow` (`height`), `tableCell` / `tableHeader` (`block+`, isolating, `colspan`, `rowspan`, `colwidth`: one width per spanned column, 0 for none). HTML is Tiptap's (`
…`, `data-colwidth`). @@ -537,7 +546,7 @@ view reads: `cellMinWidth`, `resizable`, `lastColumnResizable`), `tableRow` (`he `setRowHeight({row, height, table})`; `table` is the position before a table, the selection's by default. The Rust API takes `Points`; JSON takes numbers, `null` for none. Tiptap's Tab is `go_to_next_cell_or_add_row`. - The kit (`extensions/kit.rs`): `table` (options `HTMLAttributes`, `resizable`, `cellMinWidth`, - `lastColumnResizable`, `allowTableNodeSelection`; Tab, Shift-Tab, Backspace / Delete deleting a fully selected + `lastColumnResizable`, `allowTableNodeSelection`, `fullWidth`; Tab, Shift-Tab, Backspace / Delete deleting a fully selected table; `fix_tables_plugin` and `table_editing`), `tableRow`, `tableCell`, `tableHeader`, and `table_kit()` (`tableKit`), outside `starter_kit`. In JS: `TableKit`, `RichTable`, `RichTableRow`, `RichTableHeader`, `RichTableCell` (`nsh/base`'s `Table*` names are the `Table` component's) and the command helpers of diff --git a/third-party/nsh/docs/dev/sandbox.md b/third-party/nsh/docs/dev/sandbox.md index ec3233ca70b..c79c43f879d 100644 --- a/third-party/nsh/docs/dev/sandbox.md +++ b/third-party/nsh/docs/dev/sandbox.md @@ -65,8 +65,9 @@ trusted: every limit and check is enforced in Rust, never in JS. writing the system clipboard; the copy menu of selectable text is the user's own act and needs none), `picker` (`nsh`'s `Picker`: showing the system's picker, whose picked files reach the app; denied, a pick rejects. Also `nsh-extra`'s `Photos`, checked in each call of its JS face but `access` (`photos/mod.rs` `granted`): its photos - reach the app as picked ones do, and the user's permission is the whole app's), `share` (`nsh`'s `Share`: - showing the system's share sheet; denied, `Share.show` rejects; each shared file also needs `fs.read`), `speech` + reach the app as picked ones do, and the user's permission is the whole app's), `share` (`nsh-extra`'s `Share`: + showing the system's share sheet; checked in its JS face's `show` and in its Rust `share` against the engine's + access; denied, `Share.show` rejects; each shared file also needs `fs.read`), `speech` (`nsh-extra`'s `Speech`: the microphone and the system's speech recognizer, whose transcript reaches the app; checked in its JS face's `start` (`speech/mod.rs` `granted`) and in its Rust `recognize` against the engine's access; denied, `Speech.start` throws and a Rust session ends with `not-allowed`), `audio` (`nsh`'s `Sound` and `AudioPlayer`: making sound; denied, `Sound.load` rejects and @@ -102,7 +103,7 @@ trusted: every limit and check is enforced in Rust, never in JS. - Enforced in Rust: `fetch` in the engine (`access.rs`; refused requests never reach the network, and redirects are followed by the engine with `follow_redirects` off for the platform, so every hop is checked — hops are issued on the engine thread when a hop's head arrives; a streamed request body is not sent again, so a 307 / 308 then fails; a hop to another origin, `nsh_core::access::is_same_origin`, drops `Authorization`, `Cookie` and `Proxy-Authorization` from it and every later hop, as Fetch drops `Authorization`); remote images, placeholders, canvas images, `Image.getSize` / `prefetch`, video sources, web view - sources and inline HTML's base URLs, trusted web view input (`Command::SendInput`), the status bar, the clipboard, the picker, the share sheet, the application menu and window opening (`Command::Desktop` but `PopupMenu`, `OpenWindow` and + sources and inline HTML's base URLs, trusted web view input (`Command::SendInput`), the status bar, the clipboard, the picker, the application menu and window opening (`Command::Desktop` but `PopupMenu`, `OpenWindow` and the app's own windows' commands), sounds and players (`AudioAction::Open`) and host calls in the core (`Core::check_prop`, the commit's commands and actions; each refusal is logged once, target `js`, saying which key to add); top-level web view navigations on the platforms (`WKNavigationDelegate decidePolicyForNavigationAction` / `WebViewClient.shouldOverrideUrlLoading` → `Native.allowsWebview`). diff --git a/third-party/nsh/docs/dev/shaders.md b/third-party/nsh/docs/dev/shaders.md index cc710ba8d01..7ec9c21eb0c 100644 --- a/third-party/nsh/docs/dev/shaders.md +++ b/third-party/nsh/docs/dev/shaders.md @@ -189,7 +189,7 @@ is. Views out of sight stop rendering until they show again. | Linux (GTK 4) | each view's tick callback | a `GdkMemoryTexture` appended in the view's snapshot, after the background, under text, images and children | `reveal` on the frame clock's layout, for views outside a clipping ancestor or the window | | macOS (AppKit) | one frame callback of the surface's display link while frames change with time, pictures are due or anything else wants frames; a view that only changed renders after the batch and shows its frame when the GPU says it is done (`Renderer::when_done`), without the display link; at the view's device pixels per point (`view::backing_scale_of`) | an IOSurface (`show_on_surfaces`), the contents of a sublayer under the children (`decor.rs` shapes it); a `CGImage` without Metal | `shown`, from `Mounter::revisit` (rows scrolled away, screens under another) | | iOS | a `CADisplayLink` of its own, at the screen's scale | an IOSurface (`show_on_surfaces`), the contents of a sublayer under the children; a `CGImage` without Metal | `sight::shown` on each tick (the macOS geometry, `nsh_platform_apple::sight`, read from UIKit's views): views outside any window, hidden, or clipped away by an ancestor (rows scrolled out of their list) skip their frames; a scroll and `revisit` wake the link for what fell due | -| Android | the UI-thread animator's `Choreographer`, kept ticking by `UiAnimation::outputs` while a view wants a frame | a bitmap of `Box.java`, filled by `NshView.shaderFrame` | — | +| Android | the UI-thread animator's `Choreographer`, kept ticking by `UiAnimation::outputs` while a view wants a frame | a bitmap of `Box.java`, filled by `NshView.shaderFrame` | `NshView.shadersInSight` once a tick for the views with a frame due: views not shown (a page under another, a hidden box) or clipped away by an ancestor (scrolled out of a scroll view) skip their frames, and the ticks go on until they show | | Windows | the surface's frame ticker (`Surface::on_frame`), at the window's scale | a Direct2D bitmap drawn under the children: a texture shared with the renderer's device (`show_on_surfaces`), else the pixels read back (made again after a device loss) | `reveal`: hidden, concealed or detached views | | GPUI | a frame client of its surface | a GPUI image (BGRA, straight, the view's opacity multiplied in, as canvases' pixmaps), whose replaced image leaves GPUI's atlases | views not drawn in the last frame | | Web | `requestAnimationFrame` | a `` under the children (an effect's and a running transition's over them) | `IntersectionObserver` | @@ -493,6 +493,9 @@ dialog's `transitionShader`) take their pictures from the DOM. `shader.rs` also the process about as often as keeping it running at the screen's rate. A view that only changed (`ShaderView::animates` false, no pictures) renders after the batch and is collected when the GPU tells, so the display link stays paused. +- **Copying a read-back frame byte by byte.** `Frame::tight` once collected the rows' bytes one at a time into a + growing `Vec`: on a Pixel 10 Pro the gallery's Shader page spent about 40 % of its UI thread there (and in the + reallocations), every frame of every view. It copies whole rows into one allocation. - **A CGImage per frame on macOS and iOS.** Read back, a frame became a `CGImage` in sRGB; Core Animation converted each one to the display's colour space (Display P3) on the main thread at commit (`CA::Render::copy_image`, vImage), and with the copy out of the read-back buffer a window-sized animated shader took 70 % of a core at 120 Hz. macOS and iOS diff --git a/third-party/nsh/docs/dev/styles.md b/third-party/nsh/docs/dev/styles.md index b7c31d50e6f..218c36cf0d8 100644 --- a/third-party/nsh/docs/dev/styles.md +++ b/third-party/nsh/docs/dev/styles.md @@ -241,8 +241,8 @@ nothing (they inherit already). - **Accent** (`accentColor`, Tailwind's `accent-*`): CSS's `accent-color`, the color a system control shows its state in. The core passes a native component's own `accentColor` to it as its `accentColor` prop (`Core::sync_accent`), and - the control prefers it over the theme color it is otherwise given. Set on the control, not inherited. `nsh/mobile`'s - `Switch` reads it (its track when on); the system's segmented control and tab bar could later. + the control prefers it over the theme color it is otherwise given. Set on the control, not inherited. NSH's own + views do not read it: it is for the native components of apps and nshm, such as a system switch's track when on. - **Text style inheritance** (CSS-like): a view's text properties (color, font, size, alignment, ...) pass to the texts and inputs inside it, so `class="text-white"` on a button styles its label. So do its `whitespace-*` / `text-wrap` / `text-nowrap` / `text-pretty` (and `truncate`'s no wrapping; typed `.whitespace_nowrap()` / `.whitespace_normal()` / `.text_pretty()`, which have no diff --git a/third-party/nsh/docs/dev/text-view.md b/third-party/nsh/docs/dev/text-view.md index a630b0c3790..7e4f9c4bc55 100644 --- a/third-party/nsh/docs/dev/text-view.md +++ b/third-party/nsh/docs/dev/text-view.md @@ -159,7 +159,9 @@ regexes on the web (`regex-fancy`; no C there) and Oniguruma's on the native run compile about 20 times faster and match 3 to 4 times faster; syntect takes it when both are on), and two-face's syntaxes (bat's set: syntect's own plus TypeScript / TSX, TOML, Dockerfile, ...). A block's language is found by extension or name, case-insensitive (`ts`, `tsx`, `rs`, `py`, `sh`, `yml`, `md`, `Rust`, ...) plus the other names fences use (`jsx`, `shell`, `golang`, -`c++`, `csharp`, `jsonc`, ...); no language, `text` or one syntect does not know leaves the block plain. +`c++`, `csharp`, `jsonc`, ...), mostly highlight.js's; a whole info string that names none (`ts title="a.ts"`, +`rust,ignore`, as a `RichEditor` block's `language` can hold) is read by its first word. No language, `text` or one +syntect does not know leaves the block plain. Colors: Allsum's reading palette (its `--hl-*` tokens, light and dark). TextMate scopes map to its kinds of token in code (`token()`), not through syntect themes: one parse gives one range list whose colors are `AdaptiveColor`s, so both diff --git a/third-party/nsh/docs/dev/text.md b/third-party/nsh/docs/dev/text.md index 29508508d16..26a1d8c20b8 100644 --- a/third-party/nsh/docs/dev/text.md +++ b/third-party/nsh/docs/dev/text.md @@ -112,7 +112,8 @@ own selection takes the clicks). Positions are (text index, UTF-16 offset), never inside a surrogate pair. A point outside every text is hit-tested in reading order: when it sits below a text in a closer, horizontally disjoint column than any text whose row contains it, it stays in that column (clamping to - the vertically nearer text above or below in the column); otherwise the horizontally nearest text on its row, above + the vertically nearer text above or below in the column, but never a text below the end of the point's row, as + the next row of a table whose wrapped cell makes this one taller); otherwise the horizontally nearest text on its row, above every text the first text's start, and between rows or below a column the vertically nearer edge in the point's column (falling back to document order when no column has width). Words are runs of letters, digits and `_`, runs of spaces, or single other characters (each CJK ideograph, kana, emoji or punctuation mark); a triple click selects @@ -226,7 +227,12 @@ baseline, so a line grows where an attachment reaches past the font, as Android's `ImageSpan` grows it. With a fixed `lineHeight` a line holding an attachment is at least as tall as its text's lines (the font with the line height spread around it, CSS's strut) and grows only where the attachment reaches past that box, on every engine: the - line height is never a cap that cuts an attachment to the line. CSS's + line height is never a cap that cuts an attachment to the line. The strut is the root ``'s, carried on + `AttributedText` as the hidden `paragraph_strut` `ResolvedTextStyle` (only its font size, weight, family, italic, + font variant and resolved line height count): a smaller nested span never lowers the paragraph or moves its baseline. + The core always sets it; a directly constructed text without one keeps the engines' historic first-span fallback + (`AttributedText::paragraph_strut_or_first`). Windows, Linux and GPUI put that box into every custom line; + CoreText uses it for the paragraph height and returns smaller-span-only lines to the strut baseline. CSS's `top` / `bottom` (the line box's) and `sub` / `super` / lengths are not offered: the engines size placeholders before lines exist. The headless engine's natural font is 1.2 em (ascent 1.2 em, descent 0, x height 0.5 em), with explicit `lineHeight` spread around that ascent by half-leading. After the final layout the core places its native view, a child of the text view (Android's `TextBox` is a ViewGroup for this), on the placeholder (`TextEngine::attachments`); attachments cut off by the line limit or diff --git a/third-party/nsh/docs/dev/tooling.md b/third-party/nsh/docs/dev/tooling.md index 829106b9f9f..813fa44dc8f 100644 --- a/third-party/nsh/docs/dev/tooling.md +++ b/third-party/nsh/docs/dev/tooling.md @@ -127,7 +127,10 @@ to that file. `C-h e` opens its log/error panel; closing it gives every row back - Without `--port`, `nsh run` and `nsh dev` take the port their app (its entry) had last, else the first free one from 8790; `nsh dev --server-only` takes 8790, which embedding apps keep in their code. By default `nsh run` and `nsh dev` bind to loopback, and `--target ios`, `android` or `web` and `nsh dev --server-only` bind to every address for other - machines (`dev::Listen`, `run::Target::uses_network`). `nsh dev --host ` overrides the bind address (for example + machines (`dev::Listen`, `run::Target::uses_network`, decided in `main.rs`'s `dev_listen`). A port is free when the + server could listen on it at that address: a loopback server's port is probed on loopback, since listening on every + address, even for a probe, makes Windows Defender Firewall ask to let each new `nsh` executable on the network + (`dev_port::port_is_free`). `nsh dev --host ` overrides the bind address (for example `nsh dev --server-only --host 127.0.0.1` for loopback only); with `--target android`, only `127.0.0.1` and `0.0.0.0` are accepted because `adb reverse` forwards the device's `127.0.0.1` to host `127.0.0.1`, and `run_android` passes `DevSession::loopback_url()`. @@ -139,6 +142,11 @@ to that file. `C-h e` opens its log/error panel; closing it gives every row back are cleared by the next owner. All cooperating commands use the same cache directory. A listener outside this mechanism (including an older CLI) given by `--port` produces a bind error naming the port; `--port 0` asks the OS for a free port. The control files stay local to the machine. +- `nsh test --attach` drives the hosts of a running session (`test_attach.rs`, "Attached sessions" under `nsh + test`). Each session makes a random token (`dev_port::AttachFile`, `ring`'s `SystemRandom`), keeps it in its port's + `.attach` file in `dev-sessions/` (mode `0600` on Unix; the user's cache directory elsewhere) while it runs, and gives + it to the server (`DevServer::set_attach_token`). The file goes when the session ends, unless a later session on the + port wrote its own. - Imported source directories and theme files outside the entry directory are watched too, using the last successful bundle's dependencies. The gallery and website demos share `examples/nsh-gallery-ui`; saving one of its components or its theme rebuilds the app as saving a file inside the app does. @@ -467,12 +475,11 @@ Headless runs play the platform's part NSH's protocol defines, and refuse what o (`Headless::on_pick`, `app.onPick`; given as they are, nothing scaled), else cancelled (no files); `nsh/test`'s `App` answers them after each step and its dialogs (`answer_picks_myself`), and `app.picks()` lists what was asked; a real platform shows its own picker, which the driver does not answer; -- shares (`Command::Share`) are answered as `onShare` says (`Headless::on_share`, `app.onShare`, which also turns - `Environment::share` on), and `app.shares()` lists what was shared; - native modules' fakes (`nsh_core::fake::Fake`, which a set registers with `Registry::fake` under a name) are installed before each app launches, in place of the device they reach; a test calls one by name with `Headless::call_fake` (`app.fake(name, method, args?)`, a JSON answer). `nsh/test` knows no module's fake: their - names, methods and answers are the module's (`nsh-extra`'s `"nsh-extra/speech"` is documented with `Speech`). + names, methods and answers are the module's (`nsh-extra`'s `"nsh-extra/speech"` is documented with `Speech`, + `"nsh-extra/share"` with `Share`). A fake may stand in process-wide, so `Headless` takes a turn for its fakes: apps with other fakes never overlap in one process, while apps started with the same fakes (clones of one registry, as one test file's apps) run together; fake names are unique across an app's sets (`Registry::merged`); @@ -588,8 +595,8 @@ Only the engine of a test file serves it: an app's bundle cannot import it (the bounded to `nsh_testing::SCREEN_TEXT_LIMIT` characters (around the first difference when two values are shown) so a long value cannot flood the message. -`crates/nsh-cli/src/test.rs` finds the test files (a directory's, outside hidden directories, `node_modules` and -`target`), prints a line per test (a failure with its message, its frames in the test file and the texts on screen, +`crates/nsh-cli/src/test.rs` finds the test files (a directory's, outside hidden directories, `node_modules`, +`target` and what Git ignores, through the `ignore` crate), prints a line per test (a failure with its message, its frames in the test file and the texts on screen, bounded to `nsh_testing::SCREEN_TEXT_LIMIT` characters of rendered output with the rest counted; `-v` shows the terminal's all, the JUnit report is always cut), writes a JUnit XML report with `--junit` (`Tally::junit`) and fails when any test failed. Given a directory of an @@ -676,6 +683,37 @@ makes their window point the agent's), so the tests run the same on any display. `DevServer::step` sends a `ServerMessage::Step` with an id to the test host that connected last and blocks for the `ClientMessage::StepDone` with that id; a host that leaves fails its waiting steps. +**Attached sessions (`nsh test --attach`).** A developer's `nsh run` window can get into a state a fresh test run +never reaches (a long session, many hot updates), and an agent cannot see that window. `--attach` takes the same steps +there. `test_attach.rs` finds the session: the port `--attach=` gives, else the `dev-sessions/*.attach` files +whose server answers (the app's `.app` decides between several). It connects to `ATTACH_PATH` (`/attach`) with +`nsh_dev::Attachment` and sends `AttachRequest::Hello` with the token. The server answers `AttachReply::Hosts`: every +connected host, with whether it takes steps. Each `AttachRequest::Step` names a host and waits for its +`AttachReply::StepDone`. The server runs it through `take_step`, as `DevServer::step` does for a test session. The +CLI picks the host `--device` names (exact name, then platform as `--target` names it, then part of the name), else +the steps-taking host that connected last. The test runs as under `--target` (`StartHost` returns an `AttachedHost` +whose `Quit` does nothing, so closing the app leaves it running). `HostTarget::attached` makes `open` refuse every +option that sets an app up (`failure::unsupported_attached`, `ERR_NSH_TEST_UNSUPPORTED`). Given a directory or an +entry, `--attach` takes the steps of standard input with `open(entry)` and no 1.2 s wait (`steps_file`). Flags that +set an app up (`--target`, `--trace`, `--fps`, `--display`, `--foreground`, `--browser`, `--web-host`) are refused. + +The security boundary is this machine's user. `/attach` sits behind `addresses_only` (an IP or `localhost` `Host`). +`attach_upgrade` takes only loopback peers (`ConnectInfo`, `into_make_service_with_connect_info`) and no `Origin`, +so no web page connects, the server's own included. `serve_attach` compares the token in constant time and refuses +a session without one (`DevServer::test_session` sessions, servers given none). It refuses `TestStep::Quit` as well. +A host takes attached steps when its hello says `attach` (`HostInfo::attach`) and the server's hello says `attach` +(a token is set and it is no test session); the client then emits `DevEvent::Attachable`. `Tester::with_attach` +starts the model and the agent's worker on it, through the host's `attach` closure: it attaches the model to the +surface as a test does, but changes nothing of how the app runs. On macOS `Surface::testing` is a flag of its own, +set only by a test session: it decides the lifecycle, reduced motion and the filter of the user's input. In a +development session the engine keeps its content culling (`Model::engine_started` turns it off only under a test's +setup). So the steps see the views the app made, and a row far down a long list is found after a `scroll`. A model +in a development session sees reloads: `Model::engine_started` gives a restarted engine a fresh `Screen` that keeps +the viewport and system bar (`Screen::restarted`). It keeps the latest 64 errors for the next step (`KEPT_ERRORS`), +since no step may look for hours. The macOS (AppKit) and GPUI hosts take attached steps. The others say +`attach: false` and are listed as taking none; the web page's hello has no `attach`. The cost is the model's: each +batch applied to a `Screen` once more on the main thread, in development hosts only. + The host's side is `nsh_testing::agent` (feature `agent`: no QuickJS, no network; the dev hosts link it). Its `Model` keeps the headless driver's `Screen`, fed every batch the surface applied and every error the app reported, so selectors resolve the same everywhere; the `Agent` takes each step on a thread of its own: it resolves the @@ -1163,7 +1201,9 @@ this CLI does not know are reported and left out, so the format can grow. The CLI finds prebuilt runtimes next to itself (`bin/../runtime`, the distribution layout) or, in a checkout, in `target//` (Linux's, macOS's, Windows' and GPUI's, built for this machine, in `target/`, Windows' `nsh-windows-host.exe` / `nsh-windows-app.exe`; the distribution has GPUI's in `runtime/gpui/` on each OS) and `target/android/[-dev]` with the CLI's own profile (`NSH_RUNTIME` overrides). In a checkout (`/target//nsh` next to -`crates/nsh-ios-host`), the CLI builds what it needs with cargo first (`cargo build -p nsh-ios-host --target ...`, +`crates/nsh-ios-host`, found from the path it was run as, each link on the way or the resolved path, so a linked +`target/` and a source install's links count; a build outside its checkout says it uses released crates and runtimes), +the CLI builds what it needs with cargo first (`cargo build -p nsh-ios-host --target ...`, `cargo xtask android --dev`), so `nsh run` never uses a missing or stale host; on a Mac without Xcode's Metal Toolchain it builds GPUI's hosts with `nsh-platform-gpui/runtime-shaders` (`gpui.md`). GPUI builds run in `crates/gpui`, their own workspace, and the CLI resolves their output through `cargo metadata`'s diff --git a/third-party/nsh/docs/dev/web.md b/third-party/nsh/docs/dev/web.md index 0b85c90e0fa..21059387345 100644 --- a/third-party/nsh/docs/dev/web.md +++ b/third-party/nsh/docs/dev/web.md @@ -781,6 +781,11 @@ browsers' touches into what phones report: way to scroll, the mouse has the wheel, the keyboard and the scroll bar. Its drags go to pans, the responder system and selectable text (`pointerDown` only takes touches and pens in zoomable views, which pan themselves; a press elsewhere has its `mousedown` prevented, so it selects no page text). +- **Presses on fields**: a field takes its own presses (the caret, a selection, the focus are the browser's), and so + does its input's padding around it, which gives the field the focus (`mouseDown`); only an `Input` that listens to + presses hears them, after the focus the press gives, and no view around it does, as on Linux and Windows + (`pointerDown`, `pressOut`). A tap's press waits for that focus only while the browser's mouse events of the tap + last (`awaitFieldFocus`). - **Scroll bars** in the desktop idiom are nsh's own, as on the desktop backends (`showBar`): the browser's are hidden (they would take 6 px from content the core laid out for the whole view), and a 4 px thumb in a sticky, zero-size `.nsh-bar` at the view's top left (it stays put as the content scrolls, in step with the compositor) shows while @@ -827,8 +832,10 @@ browsers' touches into what phones report: `defaultPrevented`. - **Focus**: the stops `ViewProps::focus_stop` decides are focusable (`tabindex=0`; `updateFocusable`): pressables (role `button` unless they have one) unless `focusable={false}`, and `focusable={true}` views whether or not they take - presses (Return and Space press only pressables), never disabled or hidden ones (a focused one that stops being a - stop is blurred), nor ones with no area (`seenByKeys`): the core lays out each view of a `display: none` subtree at no + presses (Return and Space press only pressables), but no `Input`'s view, pressable or `focusable` (nor is a pressable + one a `button`): its field is its one stop, as on the desktops; never disabled or hidden ones (a focused one that + stops being a stop is blurred), nor ones with no area (`seenByKeys`): the core lays out each view of a + `display: none` subtree at no size, which hides nothing in a browser, so such a view is no stop (`tabindex=-1` where the browser would stop at it without one: a link's ``, a `web={{ element }}` button), nor is an input's field there (`fieldStop`: `tabindex=-1` while its view or its content box has no area), as on macOS (`NshView::seen_by_keys`). A view that is diff --git a/third-party/nsh/docs/dev/window-model.md b/third-party/nsh/docs/dev/window-model.md index fa347911b9e..714b04ffb0d 100644 --- a/third-party/nsh/docs/dev/window-model.md +++ b/third-party/nsh/docs/dev/window-model.md @@ -18,12 +18,13 @@ lifecycles. Not delivered in this version (recorded, not hidden): **per-window menu bars** on Windows and Linux (`` / -`WindowRef.setMenuBar(items)`) are not implemented; `Menu.setApplicationMenu` -belongs to the hidden app host and is not shown on the platforms' own bars, -so an app that needs a visible menu bar uses its own controls and shortcuts. -**Menu roles** (Close, Minimize, Zoom) on Windows and Linux still act on the -host's window rather than the focused window; macOS's responder chain acts on -the key window. **GPUI** is not migrated: its host and Linux window behavior +`WindowRef.setMenuBar(items)`) are not implemented. On Windows, +`Menu.setApplicationMenu` is the menu bar of every normal app window, and its +window roles (Close, Minimize, Zoom) act on the window whose bar, context menu +or shortcut chose them (#3613). On Linux it belongs to the hidden app host and +is not shown, so an app that needs a visible menu bar there uses its own +controls and shortcuts, and its menu roles still act on the host's window; +macOS's responder chain acts on the key window. **GPUI** is not migrated: its host and Linux window behavior follow the old model. **`windowSize()`/`pixelRatio()`** report the host surface and the host display, not the calling window's, except on Windows, Linux and macOS, where they follow the app's primary window (the first of @@ -113,10 +114,12 @@ the main-centric lifecycle, menus and keys. 4. Each window has its own keyboard scope. App-level shortcuts are explicit. 5. Windows and Linux can give any window its own menu bar; macOS keeps the global application menu and a Window menu generated from the registry. - (Per-window menu bars are not implemented in this delivery.) + (Per-window menu bars are not implemented in this delivery; Windows shows + the application menu on every normal window.) 6. Window roles, menu accelerators and focus resolve to the focused or owning - window, never to a hidden "main" window. (Windows and Linux roles still - target the host in this delivery; macOS follows the key window.) + window, never to a hidden "main" window. (Linux roles still target the + host in this delivery; macOS follows the key window, Windows the window + the item was chosen in.) 7. Every app declares its windows explicitly with ``; NSH does not create or wrap an implicit window. Migrating an existing app is a major-version change. @@ -341,7 +344,7 @@ open windows if it wants session restoration. - A per-window menu bar is not a macOS convention; `` renders nothing there and apps use the application menu. -### Windows and Linux (design target; not implemented in this delivery) +### Windows and Linux (design target; Windows shows the application menu) - Every window can have its own menu bar. Declarative form: @@ -364,6 +367,11 @@ open windows if it wants session restoration. the focused text field in that window. - The existing `Menu.setMenuBar(mode)` ("shown" / "autoHide") remains the visibility mode; the per-window items API gets a distinct name. +- Delivered on Windows: the application menu is the native menu bar of every + normal window (dialogs, panels, popups and overlays have none; a hidden + title bar or full screen removes it), and its window roles act on the + window whose bar or context menu chose them, a shortcut's on the window + with the input. `` and a per-window items API are not implemented. ## Keyboard @@ -572,7 +580,8 @@ migrations are documented by the app; this page records only the NSH contract. - Windows native tests: the crate's unit tests ran on Windows in this delivery. The message-only dispatcher, N HWNDs, taskbar entries, Alt+F4, last-window policy, session end and second instance still need a real-host - Windows run; per-window menu bars are not implemented. + Windows run; per-window menu bars are not implemented (the application + menu shows on every normal window, #3613). - Linux native tests: 待平台验证. GtkApplication with N windows, focus and last-window policy need a Linux run; per-window menu bars are not implemented. diff --git a/third-party/nsh/docs/dev/windows.md b/third-party/nsh/docs/dev/windows.md index 18385aeaf4a..8008374b427 100644 --- a/third-party/nsh/docs/dev/windows.md +++ b/third-party/nsh/docs/dev/windows.md @@ -133,7 +133,8 @@ server client, log forwarding, the error overlay: `dev.rs`). The host turns on ` is presented, and a stretched last frame would move everything by part of a pixel on each step of a resize. The last frame stays where it is, and DWM shows the window's redirection surface past it, which `WM_SIZE` fills with the window's background before it waits for the layout (`window::fill`; DWM never shows a window swap chain's own - background color). + background color). Growing a normal frameless app window by its edge prepares and presents a frame for the + proposed client size in `WM_SIZING`. `WM_SIZE` reuses it when the actual size and DPI match. - **Text is typeset on the engine thread** with DirectWrite's shared, free-threaded factory; the final layout is plain data (glyph runs recorded through a text renderer of NSH's own), which the main thread only draws and hit-tests (`text.rs`). @@ -193,7 +194,7 @@ server client, log forwarding, the error overlay: `dev.rs`). The host turns on ` | Text inputs | `text_input.rs`, `richedit.rs` | Windows' own text box: a windowless RichEdit (msftedit.dll's `ITextServices2` on our `ITextHost2`, no child window) per field, drawn with `TxDrawD2D` into the view's Direct2D target at the content box; the view draws the decoration. Editing, word moves, undo, selection, spell checking (`IMF_SPELLCHECKING` while `autoCorrect` is on, never on masked fields), password masking and IME through TSF (`SES_USECTF`; `TXTBIT_ADVANCEDINPUT` aborts msftedit) are the system's (RichEdit's client rectangle is the content box in window pixels, followed as the field is drawn, and a size change is an extent change too, since RichEdit wraps its lines again only for that; a multiline field's lines are exactly the core's line pitch apart, the font's natural one when no line height is set, and a single-line field's line is exactly DirectWrite's line height, the one its client rectangle is centered by (RichEdit's own is taller for some fonts, which put the value and caret below the placeholder); a field in a window of the app's own maps its points to the screen and takes the IME context through that window, so the candidates sit at its caret); `EN_CHANGE` / `EN_SELCHANGE` (including during composition via `IMF_IMEALWAYSSENDNOTIFY`) / composition notifications become `onChangeText`, selection and `onCompositionChange` events; the host draws RichEdit's caret itself on the blink timer; formatting shortcuts and Tab are not forwarded; paste goes through `onPaste` and `EM_REPLACESEL`; offsets converted between UTF-16 and UTF-8; return does what `submitBehavior` says (see "Keyboard"); a right click opens the edit menu (`chrome::popup_actions`), labelled in the language the app shows (`nsh/i18n`), as the role items with no label of the app's menus are; the core sends `DesktopCommand::SetMenuLabels` when that language changes | | Keyboard focus and hardware keys | `input.rs`, `keyboard.rs`, `window.rs` | A focusable custom view (one that takes presses, or `focusable`) takes the keyboard focus with Tab / Shift+Tab among the window's stops, a click, `ref.focus()` or UI Automation; while it has it, `WM_KEYDOWN` / `WM_KEYUP` become `KeyDown` / `KeyUp` events (the current layout's logical key, the scan code's DOM `code`, repeats from the message) that the engine bubbles within the window. Mounted `capture_keys` rules take a key before the menu's shortcuts and the native defaults, removing the `WM_CHAR` it would have typed; the app's keymap, window shortcuts and dialogs keep their precedence, and text fields, web views and native component windows own their o… | Navigation | `navigation.rs` | The decisions shared with the other desktops (`nsh_core::navigation`: the screens a stack shows and the user popped, transitions' timing, easing and offsets, what going back acts on); pages are child views, only the top one (and the one below during a transition) drawn; NSH draws no header: a page's `header` (the app's view) is a child of the page that the core places at its top, as wide as the page, with the content below it and kept above it (the system header's items of iOS and Android stay hidden); each page has an opaque backdrop in the window's color under the app's content; leaving pages and dialogs slide out as images recorded into command lists; Escape (unless a text field has the focus: Escape leaves the field), Alt+Left, the Browser Back key and the mouse's back button send `onBackPress` to the top page when the app listens and pop natively unless its `popOnBack` is false (a stack inside the newest dialog first, else that dialog gets the close attempt, `"cancel"`, and closes when `closeOnEscape`; without a dialog, the app's back listeners hear it before the stacks, and `Command::Back` goes on when none takes it) | -| Dialogs (`Dialog`) | `navigation.rs` | Children of the root above the app's views, at the size of the surface, sliding up or fading in: transparent layers with no look of their own, showing only the app's popup and backdrop (`presentation` is ignored); Tab stays inside the newest dialog, and the field that had the focus when a dialog opened leaves it and gets it back when the dialog closes | +| Dialogs (`Dialog`) | `navigation.rs` | Children of the root above the app's views, at the size of the surface, sliding up or fading in: transparent layers with no look of their own, showing only the app's popup and backdrop (`presentation` is ignored); Tab stays inside the newest dialog, and the field that had the focus when a dialog opened leaves it and gets it back when the dialog closes, unless it was hidden meanwhile (`keyboard::seen`) | | Alerts (`AlertDialog`) | `system.rs` | Drawn in the surface as items the root hosts, in Windows 11's content dialog style (a rounded card, the default button in the system's accent color), not `MessageBox` / `TaskDialog`: they stay with an embedded surface and never run a modal loop of their own. No text field yet: an alert's `input` is left out and its answer has no `value`. | | Video | `native/video.rs` | Media Foundation's media engine in frame-server mode on the thread's Direct3D 11 device (a DXGI device manager); each frame is copied into a texture Direct2D draws, so a video clips, transforms and is covered like any view; `controls` draws NSH's own control bar (play / pause, scrubber, time) | | Web views | `native/web.rs`, `compose.rs` | WebView2 composition controllers (`webview2-com`, the loader linked statically: apps ship no `WebView2Loader.dll`) drawing into a visual of the window's composition, between the layers of what NSH draws before and after them, so NSH content covers them; the visual is transformed like the view (affine), clipped to its clipping ancestors (axis-aligned bounds) and its own rounded corners, faded with its and its ancestors' opacity, and out of the tree while the view is not drawn (hidden, concealed screens); a deleted view's page stays while a removal animation keeps the view on screen. Input is NSH's: hit testing gives a point over the page to it only when no NSH content covers it there (`Hosted::raw`), and mouse buttons, moves and wheels go through `SendMouseInput`, touch and pen contacts through `SendPointerInput` (synthesized ones as the mouse); the page's cursor comes from `CursorChanged`; a click gives the page the keyboard focus (`MoveFocus`, WebView2 then takes keys and the IME itself, NSH's fields blur), a click on NSH content or Tab out of the page (`MoveFocusRequested`) gives it back. Rasterized at the window's scale (`RasterizationScale`, monitor changes not followed by WebView2 itself); bounds are the view's window pixels (pop-ups and IME candidates are placed from them). `baseUrl` navigates to the base URL and answers that document's request with the HTML (`WebResourceRequested`); `scrollable={false}` gives the wheel to the scroll views around and keeps the page's viewport from scrolling (`overflow: hidden` on its root, scripts still scroll); `desktop={{ allowsBackForwardNavigationGestures }}` is `IsSwipeNavigationEnabled` (touchscreen swipes). One environment per thread and profile folder (`%LOCALAPPDATA%\\WebView2`), the controller made from the first props (InPrivate for `incognito`); a placeholder without the WebView2 Runtime | @@ -201,8 +202,8 @@ server client, log forwarding, the error overlay: `dev.rs`). The host turns on ` | Accessibility | `access.rs`, `access/uia.rs` | UI Automation: a server-side provider tree answered on `WM_GETOBJECT`, one provider per exposed view (holding only the surface key and node id); control types from `role` / text / press handlers / labelled images; `testID` as the automation id; Invoke, Toggle, ExpandCollapse, SelectionItem, RangeValue, Value and Scroll patterns; `ShowContextMenu` (`IRawElementProviderSimple2`) raises `onContextMenu` with no pointer (`input::show_context_menu`); `accessible={true}` groups its content as on iOS and Android; children in tree order, a scroll view's and a page list's (`ViewProps::screen_order`) as they are on screen (`nsh_core::scroll::reading_order`), as Tab; `accessibilityElementsHidden`, `visibility: hidden` (as in a browser) and screens below the top of a stack hide a subtree; property, structure and live-region notification events only while a client listens | | Environment | `system.rs` | Re-read on `WM_SETTINGCHANGE` (and theme / DWM color changes). Color scheme: the app's appearance (`nsh.json` `"appearance"`, `setColorScheme`) when it forces one, else `AppsUseLightTheme`, live; the title bar (DWM's immersive dark mode) and the root's background follow it. The locale (`Intl`) from `GetUserDefaultLocaleName` (not `LANG` / `LC_*`); the preferred languages (`localeSettings()`'s `languages`) from `GetUserPreferredUILanguages` (the display languages, most preferred first); the regional preferences (`localeSettings()`'s `hourCycle` and the like) from the regional format's `LOCALE_STIMEFORMAT` (its hour letter), `LOCALE_IFIRSTDAYOFWEEK` and `LOCALE_IMEASURE` (`GetLocaleInfoEx` with the user's changes); font scale from `TextScaleFactor` (Settings > Accessibility > Text size); reduce motion from `SPI_GETCLIENTAREAANIMATION`; right to left from the UI language's reading direction; the screen reader from `SPI_GETSCREENREADER`; the pixel ratio the window's DPI over 96; `platform.os` `"windows"`, idiom `desktop`, OS version `RtlGetVersion`'s major.minor (10.0 on Windows 11 too); the accent palette for dialogs; safe area and keyboard height 0. The app's state (`lifecycle()`), followed on `WM_ACTIVATEAPP` and the window's `WM_WINDOWPOSCHANGED`, an embedded surface's from its root window, subclassed (`SetWindowSubclass`, only on the root window's own thread: a surface whose root is another thread's follows its own window's messages; the root is the one the surface had when it was made, kept while it lives) to pass them on to the surface's window (`WM_NSH_ROOT` for the moves; `window.rs` `observe_root`): `background` while the window (an embedded surface's root window) is minimized or hidden, `active` while the app is the active one (`WM_ACTIVATEAPP`'s flag, sent per thread; before the first, the foreground window being the process's), `inactive` otherwise; `background` too while the user cannot see the window: the session locked or without a display (`WM_WTSSESSION_CHANGE`), the display off (`GUID_CONSOLE_DISPLAY_STATE`), the window on another virtual desktop (cloaked by the shell, re-read on the cloaking WinEvents), all from the system's notifications, which each surface's window registers for (`presence.rs`; a test's app ignores the session and the display, as on macOS); and from `WM_QUERYENDSESSION` (signing out, shutting down, the Restart Manager), whose answer waits a bounded time for the engine to run the app's handlers; `WM_ENDSESSION` ending the session stops the engine as quitting does, so quit listeners run and storage is written before it is answered (`session.rs`; an embedded surface hears its root window's). The time zone (`localeSettings()`'s `timeZone`): the setting's zone (`GetDynamicTimeZoneInformation`'s key name) by its IANA name from the ICU Windows ships (`ucal_getTimeZoneIDForWindowsID`, loaded at run time; `UTC` without it), re-read on `WM_TIMECHANGE`. The wake count (`wakeCount()`): one more on `WM_POWERBROADCAST` with `PBT_APMRESUMEAUTOMATIC`, which top-level windows get (an embedded surface's root window passes it on; the app's other windows do not count it again). | | The app's icon | `window.rs`, `notifications.rs` | The window class's icon is the executable's resource 1 (`nsh package` on Windows embeds it); without one, `AppOptions::icon` (an `.ico`: the runner's `nsh\icon.ico`, the development host's `--icon`, which the CLI makes from `nsh.json` `"icon"` in `.nsh/windows/`) is the window's `WM_SETICON` big and small icons at its DPI, so the title bar, the taskbar and Alt+Tab show the app's; the same file is the toasts' `IconUri` | -| Window chrome (`nsh/desktop`) | `chrome.rs` | The title (`SetWindowTextW`); the hidden title bar: `WM_NCCALCSIZE` gives the client area the window's whole height (the side and bottom resize borders stay non-client; a maximized window's top is moved in by the frame it hangs off the monitor by, another one's by Windows 11's visible top border, which would cover the app's top row), `WM_NCHITTEST` answers the top resize border, the caption buttons (`HTMINBUTTON` / `HTMAXBUTTON` / `HTCLOSE`, so Windows 11 shows snap layouts) and `windowDrag` views (`HTCAPTION`, with the system title bar too: the system moves, maximizes and opens the window menu; a primary press on an app's `windowDrag` view is held with the mouse captured, moved by the pointer's offset from the press when not maximized and handed to `SC_MOVE | HTCAPTION` once it leaves the drag rectangle (`SM_CXDRAG` / `SM_CYDRAG`), or delivered to the app as a click on release, pressed where it went down, if the view it went down on is still there and draggable, so overlays close; losing the capture or replacing the app drops it; a double click keeps the system's action); the caption buttons drawn over the app after the tree (46 points wide, as tall as the app's bar: `titleBar`'s `height`, 32 by default; Windows 11's glyphs and hover colors, dimmed while inactive), their non-client clicks handled here, never by `DefWindowProc` (which would draw Windows 95's); `WM_NCACTIVATE` with `lparam` -1 so the old caption is not painted over the app; full screen is `window::toggle_full_screen` (F11's), which tells the chrome to hide the menu bar and zero the title bar's area; quitting (`Application.quit()`, the `quit` role) posts `WM_CLOSE` as closing does, then ends the message loop; `Application.restart()` quits so in the standalone app (`app::request_restart`, nothing in an embedded view) and, when the UI thread's run has ended, starts the executable again with `NSH_RESTART_AFTER` naming this process, whose `run_app` waits for it to exit (at most 10 seconds) before it opens its window (`nsh_core::restart`; a development host, feature `dev`, only quits: `nsh run` ends with it). Menus are Win32 menus: the menu bar (`SetMenu`, removed while the title bar is hidden or in full screen; `&` escaped, the shortcut after a tab), context menus with `TrackPopupMenuEx` (posted as `WM_NSH_MENU`: its modal loop must not run while a batch is applied); dark with the app through uxtheme's `SetPreferredAppMode` / `FlushMenuThemes` (ordinals 135 / 136) and, for the bar, `WM_UAHDRAWMENU` / `WM_UAHDRAWMENUITEM` plus the line under it after `WM_NCPAINT`; shortcuts matched on key downs before the app's key handling (`input::key`) but after `nsh`'s bindings, the editing roles excepted (they send the field its own Ctrl+key). A menu item's `icon` (not the bar's titles) is `SetMenuItemInfoW`'s `hbmpItem`: a 32-bit premultiplied ARGB DIB section (bottom-up) of `SM_CXSMICON` at the window's DPI, made from the images' pipeline (`image::load_menu_icon`, off the main thread) and centered on its square (`desktop::menu_icon::canvas`) so labels line up, freed after its menu (`IconBitmaps`). Win32 has no template bitmaps: an SVG is painted in the menu text's color when it is made (`COLOR_MENUTEXT` / `COLOR_GRAYTEXT`, or the dark theme's), a disabled bitmap dimmed, and the menu bar's made again when the appearance or the DPI changes. Windows does not repaint a popup it is tracking, so a context menu waits for its icons, at most `ICON_WAIT` (100 ms), with the message loop running, before it opens; a failed icon warns and leaves the item as it is | -| Windows of the app's own (``, `Window.open`) | `app_window.rs`, `shell.rs`, `window_state.rs`, `window_close.rs` | A dialog root the runtime opens a window for becomes the root of a top-level window of its own, drawn by `render::window_frame` and sized by `set_root_size`; its input goes through the surface's input in its root (`Surface::input_root`). Each window, the host included, has a `Shell` (`shell.rs`): its kind's window styles and the attributes applied natively. The close, Escape and blur policies, state and title bar reports, and the main window's close are covered under "Windows" below | +| Window chrome (`nsh/desktop`) | `chrome.rs` | The title (`SetWindowTextW`); the hidden title bar: `WM_NCCALCSIZE` gives the client area the window's whole height (the side and bottom resize borders stay non-client; a maximized window's top is moved in by the frame it hangs off the monitor by, another one's by Windows 11's visible top border, which would cover the app's top row; Windows keeps the outer size of a window whose frame changes, so placing the main window, `AppView::place_main_window`, gives it back the content size it had before the attributes hid or showed its title bar), `WM_NCHITTEST` answers the top resize border, the caption buttons (`HTMINBUTTON` / `HTMAXBUTTON` / `HTCLOSE`, so Windows 11 shows snap layouts) and `windowDrag` views (`HTCAPTION`, with the system title bar too: the system moves, maximizes and opens the window menu; a primary press on an app's `windowDrag` view is held with the mouse captured, moved by the pointer's offset from the press when not maximized and handed to `SC_MOVE | HTCAPTION` once it leaves the drag rectangle (`SM_CXDRAG` / `SM_CYDRAG`), or delivered to the app as a click on release, pressed where it went down, if the view it went down on is still there and draggable, so overlays close; losing the capture or replacing the app drops it; a double click keeps the system's action); the caption buttons drawn over the app after the tree (46 points wide, as tall as the app's bar: `titleBar`'s `height`, 32 by default; Windows 11's glyphs and hover colors, dimmed while inactive), their non-client clicks handled here, never by `DefWindowProc` (which would draw Windows 95's); `WM_NCACTIVATE` with `lparam` -1 so the old caption is not painted over the app; full screen is `window::toggle_full_screen` (F11's), which tells the chrome to hide the menu bar and zero the title bar's area; quitting (`Application.quit()`, the `quit` role) posts `WM_CLOSE` as closing does, then ends the message loop; `Application.restart()` quits so in the standalone app (`app::request_restart`, nothing in an embedded view) and, when the UI thread's run has ended, starts the executable again with `NSH_RESTART_AFTER` naming this process, whose `run_app` waits for it to exit (at most 10 seconds) before it opens its window (`nsh_core::restart`; a development host, feature `dev`, only quits: `nsh run` ends with it). Menus are Win32 menus: the application menu is the menu bar (`SetMenu`) of the surface's window and of every normal window of the app's own, each with a menu of its own (a window destroys its menu with it), removed while that window's title bar is hidden or it is in full screen (`&` escaped, the shortcut after a tab); a role acts on the window it was chosen in: the one whose bar sent `WM_COMMAND`, whose context menu showed it, or that had the input for its shortcut, context menus with `TrackPopupMenuEx` (posted as `WM_NSH_MENU`: its modal loop must not run while a batch is applied); dark with the app through uxtheme's `SetPreferredAppMode` / `FlushMenuThemes` (ordinals 135 / 136) and, for the bar, `WM_UAHDRAWMENU` / `WM_UAHDRAWMENUITEM` plus the line under it after `WM_NCPAINT`; shortcuts matched on key downs before the app's key handling (`input::key`) but after `nsh`'s bindings, the editing roles excepted (they send the field its own Ctrl+key). A menu item's `icon` (not the bar's titles) is `SetMenuItemInfoW`'s `hbmpItem`: a 32-bit premultiplied ARGB DIB section (bottom-up) of `SM_CXSMICON` at the window's DPI, made from the images' pipeline (`image::load_menu_icon`, off the main thread) and centered on its square (`desktop::menu_icon::canvas`) so labels line up, freed after its menu (`IconBitmaps`). Win32 has no template bitmaps: an SVG is painted in the menu text's color when it is made (`COLOR_MENUTEXT` / `COLOR_GRAYTEXT`, or the dark theme's), a disabled bitmap dimmed, and the menu bar's made again when the appearance or the DPI changes. Windows does not repaint a popup it is tracking, so a context menu waits for its icons, at most `ICON_WAIT` (100 ms), with the message loop running, before it opens; a failed icon warns and leaves the item as it is | +| Windows of the app's own (``, `Window.open`) | `app_window.rs`, `shell.rs`, `window_state.rs`, `window_close.rs` | A dialog root the runtime opens a window for becomes the root of a top-level window of its own, drawn by `render::window_frame` and sized by `set_root_size`; its input goes through the surface's input in its root (`Surface::input_root`). Each window, the host included, has a `Shell` (`shell.rs`): its kind's window styles and the attributes applied natively. A `pointerEvents: "box-none"` window lets the pointer through where the input's picking finds none of its views under the cursor (`box_none.rs`, `input::takes_pointer`). The close, Escape and blur policies, state and title bar reports, and the main window's close are covered under "Windows" below | | Login item (`Application.launchAtLogin()`, `setLaunchAtLogin`) | `login_item.rs` | A value of `HKCU\Software\Microsoft\Windows\CurrentVersion\Run` named by the app id (an empty id is `EINVAL`), holding the quoted path of the executable the app started from (`nsh_core::restart::program_path`, taken as the backend is made at the app's start; at most 260 characters, the `Run` key's limit: `ENAMETOOLONG` beyond; a path that is not Unicode, an unpaired UTF-16 surrogate in it, is `EINVAL`, and a value that is not reads as naming no executable); written only when the app asks for a change that differs, since a program the key started should not write to it while it runs. A value naming another executable reads as disabled and stays on disabling (paths compared as Windows compares them: case, separators and a verbatim `\\?\` or `\\?\UNC\` prefix aside). Settings and Task Manager turn an app off in `...\Explorer\StartupApproved\Run` (a binary value of the same name, its first byte odd), read as `requiresApproval` and never written (its format is not documented: a mark missing or of a form not known reads as approved). `AppView::load` gives the engine the backend only in `run_app`'s own view (not one embedded beside it) with `AppOptions::login_item`, which `nsh-windows-app` sets unless `NSH_APP_DIR`; the installer's `[Code]` removes the value on uninstall when its program (read as `names` reads it, the value taken as written or with its environment variables expanded, since Inno Setup does not give its type) is that installation's executable (`nsh-cli` `windows.rs`) | | Clipboard | `system.rs` | The Win32 clipboard (`CF_UNICODETEXT`); reads are synchronous, so `Clipboard.readText` is answered at once | | Networking | `nsh_engine::net` | ureq (rustls, webpki roots), one thread per request, streaming both ways; only connecting and the response head have deadlines | @@ -243,7 +244,8 @@ when the pixel scale changes. field or a focusable custom view (`keyboard::is_stop`) — (a scroll view's content as it is on screen, `nsh_core::scroll::reading_order`: a list's recycled cells are not in their rows' order) within `navigation::focus_scope` (the newest dialog of the window the input is in, else the surface); a field's text is - selected as in Windows' dialogs, a custom view reports its focus and scrolls into view. + selected as in Windows' dialogs, a custom view reports its focus and scrolls into view. A stop has an area: what a + `display: none` view holds is laid out at no size and passed by (`keyboard::has_area`). A handled Alt combination swallows its `WM_SYSCHAR` (Alt+Return makes one, which `DefWindowProc` would beep at) and the Alt release (which would open the window menu). Shortcuts read virtual keys, which follow the key's US letter @@ -312,7 +314,9 @@ ancestors within the same window: when it closes if that view is still attached, enabled and shown in a window no modal covers. - The raw path is only for a focused custom view: a text field (`Input`, the system's RichEdit and IME) and a hosted web view or native component own their keys and text, and a capture on their ancestors does not intercept them. A - view that is removed, concealed or disabled loses the focus (a `Blur`) without a synthetic key release; a real + view that is removed, concealed or disabled loses the focus (a `Blur`) without a synthetic key release, and so does + a custom view or a text field that a batch hid (`display: none` lays it out at no size, or `visibility: hidden` + around it), when the batch is applied (`keyboard::release_hidden_focus`, as macOS's); a real release the window gets is reported on whichever view has the focus then. `ToUnicodeEx` supplies the logical key from the current layout (never a US guess), always with its keyboard-state-not-changed flag (0x4), so a dead key read for an event (also an AltGr-layer one) is never stored and the layout's pending composition is left @@ -449,9 +453,9 @@ waitable object and one frame in flight (two buffers), and a window draws only w (`SwapChain::ready`, a non-blocking poll). Otherwise `render::frame` returns before drawing, the damage and the invalid flag stay, and a thread pool wait on the object posts `WM_NSH_PAINT` to the window when a frame is free (posted, not `InvalidateRect`: a posted message comes before the `WM_PAINT`s that wait for the thread's other -messages). A resized window draws in its `WM_SIZE` once it holds the token (`SwapChain::wait_ready`): it waits for its -frame in flight to be shown, at most 50 ms, so a drag runs at the display's rate with one frame in flight and the -window keeps up with the pointer. This is the one place a window's present holds its thread up, for a vblank at most: +messages). A resized window takes the token (`SwapChain::wait_ready`) before it draws in `WM_SIZE` or prepares a +growth frame in `WM_SIZING`. It waits up to 50 ms for the frame in flight, keeping the queue to one frame during +a drag. This is the one place a window's present holds its thread up, for a vblank at most: an embedding app that resizes an `NshView`, or an app resizing a window again and again, has its UI thread paced to that window's display meanwhile. A window DWM does not show (hidden, minimized, cloaked) only polls, and a resized window without the token waits for `WM_NSH_PAINT` as any other. @@ -515,7 +519,7 @@ measured and are not used: they bring back that latency (48 ms) for the same fra - **No desktop equivalent**: the status bar, input accessory views, `keyboardShouldPersistTaps` (there is no software keyboard); the safe area and the keyboard height are 0. - **Window chrome**: the menu bar is not shown while the title bar is hidden (its shortcuts work; apps open its menus - with `Menu.popup`); an embedded surface (a child window) only shows context menus, its host owns the window. The + with `Menu.popup`), nor on dialogs, panels, popups and overlays; an embedded surface (a child window) only shows context menus, its host owns the window. The dark menu bar relies on uxtheme's undocumented messages and ordinals (as Windows' own apps and Notepad++ do). - **Precision touchpads**: Windows sends its own inertia as more wheel deltas, so a glide cannot be stopped by touching the pad. diff --git a/third-party/nsh/examples/extra/App.tsx b/third-party/nsh/examples/extra/App.tsx index 8166443c025..045668f09d2 100644 --- a/third-party/nsh/examples/extra/App.tsx +++ b/third-party/nsh/examples/extra/App.tsx @@ -1,17 +1,24 @@ // The modules of `nsh-extra`, the official modules an app installs with -// `nsh add` (`nsh.json` `"dependencies"`), one feature each. Dictation with -// `Speech`: the button starts a session (and stops the one listening); the -// transcript shows as it grows, then how the session ended. -import { mount, signal, Text, View } from "nsh"; +// `nsh add` (`nsh.json` `"dependencies"`), one feature each. +// +// Dictation with `Speech`: the button starts a session (and stops the one +// listening); the transcript shows as it grows, then how the session ended. +// +// The system's share sheet with `Share`: a link, a file of the app's data +// directory and a line of text, each pointing the sheet at its button (an +// iPad's popover, macOS' menu); how the share ended shows below. +import fs from "fs/promises"; +import process from "process"; +import { mount, signal, Text, View, type ViewRef } from "nsh"; import { Window } from "nsh/desktop"; -import { Speech, type SpeechSession } from "nsh-extra"; +import { Share, type ShareResult, Speech, type SpeechSession } from "nsh-extra"; function Dictation() { const state = signal("idle"); const transcript = signal(""); let session: SpeechSession | undefined; return ( - + {`state: ${state()}`} {`transcript: ${transcript()}`} {Dictation}); +const TRIP = { + title: "Weekend in Kyoto", + text: "Our plan for the weekend: temples in the morning, the market at noon.", + url: "https://example.com/trips/kyoto", +}; + +function Sharing() { + const available = signal("checking"); + void Share.available().then((yes) => available.set(yes ? "yes" : "no")); + const shared = signal("none"); + // How the share ended, or the code of why there was none. + const report = async (share: () => Promise) => { + try { + const { action, target } = await share(); + shared.set(target ? `${action} ${target}` : action); + } catch (e) { + const error = e as Error & { code?: string }; + shared.set(error.code ?? error.message); + } + }; + let link: ViewRef | undefined; + let file: ViewRef | undefined; + let line: ViewRef | undefined; + return ( + + {`share sheet: ${available()}`} + {`shared: ${shared()}`} + void report(() => Share.show({ ...TRIP, anchor: link }))} + > + Share link + + + void report(async () => { + if (!process.dataDir) throw new Error("this host gives the app no data directory"); + const path = `${process.dataDir}/kyoto-itinerary.txt`; + await fs.writeFile(path, `${TRIP.title}\n\nSaturday: Fushimi Inari\nSunday: Arashiyama\n`); + return Share.show({ title: TRIP.title, files: [path], anchor: file }); + }) + } + > + Share file + + void report(() => Share.show({ text: TRIP.text, anchor: line }))} + > + Share text + + + ); +} + +function Main() { + return ( + + + + + ); +} + +mount(() => {Main}); diff --git a/third-party/nsh/examples/extra/README.md b/third-party/nsh/examples/extra/README.md index 5de2fdcb394..709e1a09f7f 100644 --- a/third-party/nsh/examples/extra/README.md +++ b/third-party/nsh/examples/extra/README.md @@ -5,11 +5,12 @@ carrying them. `nsh.json` lists the crate in `"dependencies"` by path, with the `App.tsx` imports them from `nsh-extra`: ```tsx -import { Speech } from "nsh-extra"; +import { Share, Speech } from "nsh-extra"; ``` | Feature | What the example shows | Tests | |---|---|---| +| `share` | The system's share sheet: a link, a file of the app's data directory and a line of text, each pointing the sheet at its button (`App.tsx`) | `tests/share.test.tsx`, with the module's fake share sheet answering for the user (`app.fake("nsh-extra/share", "answer", [{ action, target }])`) | | `speech` | Dictation: a session with interim transcripts, stopped or aborted (`App.tsx`) | `tests/speech.test.tsx`, with the module's fake recognizer speaking for the user (`app.fake("nsh-extra/speech", "hear", [text])`) | ```sh diff --git a/third-party/nsh/examples/extra/nsh.json b/third-party/nsh/examples/extra/nsh.json index 06daf9baeb7..33a70a9792f 100644 --- a/third-party/nsh/examples/extra/nsh.json +++ b/third-party/nsh/examples/extra/nsh.json @@ -2,9 +2,16 @@ "name": "Extra", "id": "com.longbridge.nsh.extra", "dependencies": { - "nsh-extra": { "path": "../../crates/nsh-extra", "features": ["speech"] } + "nsh-extra": { "path": "../../crates/nsh-extra", "features": ["share", "speech"] } }, "capabilities": { - "speech": true + "speech": true, + "windows": true, + "application": true, + "share": true, + "fs": { + "read": ["${dataDir}"], + "write": ["${dataDir}"] + } } } diff --git a/third-party/nsh/examples/extra/nsh.lock b/third-party/nsh/examples/extra/nsh.lock index 8f7dc185b0e..2dd5a7da273 100644 --- a/third-party/nsh/examples/extra/nsh.lock +++ b/third-party/nsh/examples/extra/nsh.lock @@ -3,7 +3,7 @@ "packages": [ { "name": "nsh-extra", - "version": "0.6.0", + "version": "0.7.2", "path": "../../crates/nsh-extra", "module": "nsh-extra" } diff --git a/third-party/nsh/examples/extra/tests/share.test.tsx b/third-party/nsh/examples/extra/tests/share.test.tsx new file mode 100644 index 00000000000..96fd92ce9ec --- /dev/null +++ b/third-party/nsh/examples/extra/tests/share.test.tsx @@ -0,0 +1,55 @@ +// The system's share sheet with `nsh-extra`'s `Share`: the module's fake +// (`"nsh-extra/share"`) shows no sheet until the test answers +// (`app.fake(SHARE, "answer", [{ action, target }])`), then answers every +// share so and lists what the app shared (`app.fake(SHARE, "shares")`). +import { beforeEach, expect, open, test } from "nsh/test"; +import type { App } from "nsh/test"; + +const SHARE = "nsh-extra/share"; + +let app: App; + +beforeEach(async () => { + app = await open("../App.tsx"); +}); + +test("without a share sheet the share is unavailable, never shared", async () => { + await app.waitFor("text:share sheet: no"); + await app.press("label:Share link"); + await app.waitFor("text:shared: ERR_FEATURE_UNAVAILABLE_ON_PLATFORM"); + expect(await app.fake(SHARE, "shares")).toEqual([]); +}); + +test("the user shares the link to a target, or closes the sheet", async () => { + await app.fake(SHARE, "answer", [{ action: "shared", target: "com.apple.UIKit.activity.Mail" }]); + await app.press("label:Share link"); + await app.waitFor("text:shared: shared com.apple.UIKit.activity.Mail"); + await app.fake(SHARE, "answer", [{ action: "dismissed" }]); + await app.press("label:Share text"); + await app.waitFor("text:shared: dismissed"); + expect(await app.fake(SHARE, "shares")).toEqual([ + { + title: "Weekend in Kyoto", + text: "Our plan for the weekend: temples in the morning, the market at noon.", + url: "https://example.com/trips/kyoto", + files: [], + // Each button anchors its share at itself. + anchored: true, + }, + { + title: null, + text: "Our plan for the weekend: temples in the morning, the market at noon.", + url: null, + files: [], + anchored: true, + }, + ]); +}); + +test("a share left open is dismissed by the next", async () => { + await app.fake(SHARE, "hold"); + await app.press("label:Share link"); + await app.press("label:Share text"); + await app.waitFor("text:shared: dismissed"); + expect(await app.fake(SHARE, "shares")).toHaveLength(2); +}); diff --git a/third-party/nsh/examples/gallery/demos/Controls.tsx b/third-party/nsh/examples/gallery/demos/Controls.tsx index 650b7d76841..e839a25a963 100644 --- a/third-party/nsh/examples/gallery/demos/Controls.tsx +++ b/third-party/nsh/examples/gallery/demos/Controls.tsx @@ -1,11 +1,9 @@ import { type AnimatedValue, cleanup, computed, createAnimatedValue, createMotion, effect, type JSX, LayoutAnimation, Scroll, signal, Text, token, View } from "nsh"; import { Button as BaseButton, Checkbox, Collapsible, Combobox, type DateMatcher, DatePicker, type DateRangePreset, NumberInput, OtpInput, type OtpInputRef, Progress, Radio, RadioGroup, Select, Slider, Switch, Tab, Tabs } from "nsh/base"; import { reduceMotion } from "nsh"; -import { isAvailable as mobile, Switch as SystemSwitch } from "nsh/mobile"; import { keymap, platform, windowSize } from "nsh"; -import { DateTimePicker, isAvailable } from "nsh/mobile"; import { Icon, type IconName } from "../icons"; -import { alpha, backdrop, Badge, plural, Button, CalendarItem, Kbd, calendarLook, Chevron, Caption, Card, chart, checkboxLook, DateTrigger, CheckboxMark, density, type CheckboxMarkKind, ChoiceLight, choiceTileLook, choiceWell, clearButtonLook, colors, comboboxLook, ComboToggle, controlSize, DemoPage, finish, focusRing, follow, hovered, IconTile, insetSurface, labelColumn, ListboxEmpty, ListboxHeader, listboxPopup, listboxPopupStarting, listboxSearch, listRow, MARK_WEIGHT, mono, motion, numberInputClasses, numberInputSteps, numberInputText, optionClass, OptionRow, otpCellLook, otpCells, Picker, plainRow, RadioRing, radius, RowDivider, RowLabel, Segmented, sliderFill, solidTint, sliderLook, switchLook, TAB_ICON_ROOM, tabsLook, TabTitle, terminal, TERMINAL_COLUMN, TERMINAL_GAP, TERMINAL_ROW, timeFieldClass, TimeSegment, tints, type Tone, toneColor, toneTint, underlineTabsLook, DisclosureChevron, disclosureTriggerLook, progressLook, progressSweep, LastEvent } from "../ui"; +import { alpha, backdrop, Badge, plural, Button, CalendarItem, Kbd, calendarLook, Chevron, Caption, Card, chart, checkboxLook, DateTrigger, CheckboxMark, density, type CheckboxMarkKind, ChoiceLight, choiceTileLook, choiceWell, clearButtonLook, colors, comboboxLook, ComboToggle, controlSize, DemoPage, finish, focusRing, follow, hovered, IconTile, insetSurface, labelColumn, ListboxEmpty, ListboxHeader, listboxPopup, listboxPopupStarting, listboxSearch, listRow, MARK_WEIGHT, mono, motion, numberInputClasses, numberInputSteps, numberInputText, optionClass, OptionRow, otpCellLook, otpCells, Picker, plainRow, RadioRing, radius, RowDivider, RowLabel, Segmented, sliderBubbleClass, sliderBubbleText, sliderFill, solidTint, sliderLook, switchLook, TAB_ICON_ROOM, tabsLook, TabTitle, terminal, TERMINAL_COLUMN, TERMINAL_GAP, TERMINAL_ROW, timeFieldClass, TimeSegment, tints, type Tone, toneColor, toneTint, underlineTabsLook, DisclosureChevron, disclosureTriggerLook, progressLook, progressSweep, LastEvent } from "../ui"; import { play as sound } from "../../nsh-gallery-ui/sound"; // `nsh/base`'s controls own presses, keys, the disabled state and what @@ -677,57 +675,6 @@ export function Controls(props: { show: Control; firsts?: Control[] }) { ); } - /** - * `nsh/mobile`'s `Switch`, the system's own: a `UISwitch` on iOS and - * Material 3's switch on Android, on in the theme's `primary`, beside the - * row's label. The desktops and the web have no such control: the - * gallery's drawn switch stands in there. - */ - function SystemSettings() { - const wifi = signal(true); - const ask = signal(true); - const bluetooth = signal(false); - function Row(props: { label: string; detail: string; on: boolean; set: (on: boolean) => void; disabled?: boolean; first?: boolean }) { - const flip = (on: boolean) => { - props.set(on); - last.set(`${props.label}: ${on ? "on" : "off"}`); - }; - if (!mobile) { - const look = switchLook(() => props.on, size.switch); - return ( - flip(checked)} - {...listRow({ first: props.first, disabled: () => props.disabled, style: { flexDirection: "row-reverse" } })} - trackClass={look.trackClass} - trackStyle={look.trackStyle} - thumbStyle={look.thumbStyle} - > - - - - ); - } - return ( - - - flip(checked)} /> - - ); - } - return ( - - - wifi.set(on)} /> - ask.set(on)} /> - bluetooth.set(on)} /> - -
- - ); - } - function Quick() { const on = signal(["Sounds", "Night Shift"]); const has = (name: string) => on().includes(name); @@ -1920,10 +1867,12 @@ export function Controls(props: { show: Control; firsts?: Control[] }) { // The presets from today: the coming weekend, the next week and month. const today = new Date(); const saturday = addDays(today, (6 - today.getDay() + 7) % 7); + // Each with the dates it stands for under its label. + const span = (label: string, start: Date, end: Date): DateRangePreset => ({ label, value: [iso(start), iso(end)], description: `${monthDay(iso(start))} – ${monthDay(iso(end))}` }); const trips: DateRangePreset[] = [ - { label: "Weekend", value: [iso(saturday), iso(addDays(saturday, 1))] }, - { label: "Next 7 days", value: [iso(today), iso(addDays(today, 6))] }, - { label: "Next 30 days", value: [iso(today), iso(addDays(today, 29))] }, + span("Weekend", saturday, addDays(saturday, 1)), + span("Next 7 days", today, addDays(today, 6)), + span("Next 30 days", today, addDays(today, 29)), ]; const tripTitle = () => { const r = trip(); @@ -1983,6 +1932,7 @@ export function Controls(props: { show: Control; firsts?: Control[] }) { contentStyle={content} presetsStyle={calendarLook.presets} presetStyle={calendarLook.preset} + presetDescriptionStyle={calendarLook.presetDescription} presetClass={calendarLook.presetClass} calendarStyle={calendar} headerStyle={header} @@ -2172,70 +2122,6 @@ export function Controls(props: { show: Control; firsts?: Control[] }) { ); } - /** - * A reminder set with the system's own picker (`nsh/mobile`'s - * `DateTimePicker`, on phones): its first day and time, the time it - * repeats at and the day it ends, each in the system's look; the summary - * follows them. - */ - function Reminder() { - const today = new Date(); - const starts = signal(`${iso(addDays(today, 1))}T08:00`); - const at = signal("09:30"); - const until = signal(iso(addDays(today, 30))); - const t = settleOn(() => `${starts()} ${at()} ${until()}`); - const days = () => daysBetween(starts().slice(0, 10), until()) + 1; - return ( - 0 ? `${days()} days` : "Ends before it starts"} tone={days() > 0 ? "neutral" : "warn"} />}> - - - - { - starts.set(value); - last.set(`Starts: ${value}`); - }} - /> - - - - { - at.set(value); - last.set(`Every day at: ${value}`); - }} - /> - - - - { - until.set(value); - last.set(`Until: ${value}`); - }} - /> - - - - ); - } - function Deadline() { const today = new Date(); const due = signal(iso(addDays(today, 2))); @@ -2837,7 +2723,8 @@ export function Controls(props: { show: Control; firsts?: Control[] }) { - {/* How many listings each price has: the bars in the range light up as the thumbs move. + {/* How many listings each price has: the bars in the range light up as the thumbs move, and the + thumb under the pointer, dragged or focused shows its price in a bubble over the bars. A terminal's two rows would draw them as blank Cells: the count in the label says it. */} @@ -2868,6 +2755,11 @@ export function Controls(props: { show: Control; firsts?: Control[] }) { onChange={({ value }) => price.set(value as [number, number])} onChangeEnd={({ value }) => last.set(`Price: ${(value as [number, number]).join(" to ")}`)} rangeStyle={sliderFill(price()[0] / 500, price()[1] / 500)} + renderThumb={({ start }) => ( + + {`$${price()[start ? 0 : 1]}`} + + )} {...sliderLook()} /> @@ -3569,6 +3461,42 @@ export function Controls(props: { show: Control; firsts?: Control[] }) { ); } + function EmailCode() { + const CODE = "AB12CD34"; + const code = signal(""); + const verdict = signal(""); + const tone = (): Tone | undefined => (verdict() === "Verified" ? "up" : verdict() ? "danger" : undefined); + // Eight cells fit a phone's width a size down from the six-digit ones. + const eightCells = pointer ? "w-8 h-10 text-base" : "w-9 h-11 text-lg"; + return ( + + + { + code.set(next); + verdict.set(""); + last.set(`Email code: ${next || "empty"}`); + }} + onComplete={({ value }) => { + verdict.set(value === CODE ? "Verified" : "That code is not right"); + last.set(`Email code complete: ${value}`); + }} + accessibilityLabel="Email code, 8 letters and digits" + class={codeClass} + groupClass={groupClass} + {...otpCellLook({ cells: eightCells, tone: () => tone() })} + /> + + + + + ); + } + function Last() { return ( @@ -3578,19 +3506,18 @@ export function Controls(props: { show: Control; firsts?: Control[] }) { } const cards: Record JSX.Element)[]> = { - Switch: [Settings, SystemSettings, Quick], + Switch: [Settings, Quick], Checkbox: [Filter, Checklist, Consent, Channels, BoxStates], Radio: [Plans, Delivery, Reading], Tabs: [Sections, Project], Select: [Choices, Downloads, Shipping, Issue], Combobox: [Tags, People, Labels, Commands], - // The system's picker is on phones only: elsewhere the drawn ones stand alone. - DatePicker: [Dates, ...(isAvailable ? [Reminder] : []), Booking, Deadline, Slots], + DatePicker: [Dates, Booking, Deadline, Slots], Collapsible: [Disclosure, Faq], Progress: [Transfers, Uploads, Steps, Meters], Slider: [Levels, Equalizer], NumberInput: [Quantities, Cart, Units], - OtpInput: [Verify, SignIn, Pin], + OtpInput: [Verify, SignIn, Pin, EmailCode], }; // `firsts`: the first card of each named control on one page, above one last event (the TUI host's acceptance tests). const shown = props.firsts ? props.firsts.map((control) => cards[control][0]) : cards[props.show]; diff --git a/third-party/nsh/examples/gallery/demos/Menus.tsx b/third-party/nsh/examples/gallery/demos/Menus.tsx index 48899742cfa..5d24c16d322 100644 --- a/third-party/nsh/examples/gallery/demos/Menus.tsx +++ b/third-party/nsh/examples/gallery/demos/Menus.tsx @@ -1,6 +1,5 @@ import { type JSX, LayoutAnimation, reduceMotion, Scroll, signal, Text, token, View } from "nsh"; import { ContextMenu, Menu, MenuButton, MenuItem, MenuSeparator, type OpenChangeReason, Submenu, Toolbar } from "nsh/base"; -import { SegmentedControl } from "nsh/mobile"; import { platform } from "nsh"; import { keymap } from "nsh"; import { Icon, type IconName, LucideIcon, type LucideIconName } from "../icons"; @@ -496,8 +495,8 @@ export function Menus() { * The system's own controls: `MenuButton` shows UIKit's menu from the * gallery's chip on iOS (the platform's context menu on the desktops), * a `ContextMenu` given `items` lifts its note into UIKit's context menu - * on iOS (the gallery's drawn menu elsewhere), and `SegmentedControl` is - * a `UISegmentedControl` on iOS, the gallery's drawn segments elsewhere. + * on iOS (the gallery's drawn menu elsewhere), and the gallery's segments + * pick the layout the menu sorts. */ function SystemMenu() { const sort = signal<"Name" | "Date" | "Size">("Date"); @@ -514,7 +513,7 @@ export function Menus() { const ios = platform.os === "ios"; const menuOff = !ios && !platform.desktop; return ( - + choose("delete")} /> - ({ value: String(i), label: l }))} value={String(layout())} onChange={(v) => layout.set(Number(v))} />}> - ({ title }))} selectedIndex={layout()} onChange={({ index }) => layout.set(index)} /> - + ({ value: String(i), label: l }))} value={String(layout())} onChange={(v) => layout.set(Number(v))} /> ); diff --git a/third-party/nsh/examples/gallery/demos/System.tsx b/third-party/nsh/examples/gallery/demos/System.tsx index c43a4f6efd6..9ea0934b062 100644 --- a/third-party/nsh/examples/gallery/demos/System.tsx +++ b/third-party/nsh/examples/gallery/demos/System.tsx @@ -1,6 +1,4 @@ -import { cleanup, resource, Share, type ShareResult, signal, Text, View, type ViewRef } from "nsh"; -import fs from "fs/promises"; -import process from "process"; +import { cleanup, resource, signal, Text, View } from "nsh"; import { createAnimatedValue, Easing } from "nsh"; import { colorScheme, fontScale, horizontalSizeClass, verticalSizeClass, windowSize } from "nsh"; import { AlertDialog, type AlertDialogAction, Dialog, type StatusBarForeground } from "nsh/base"; @@ -249,106 +247,6 @@ function Dialogs() { ); } -/** A share's target as people know it: Apple's activity types end in its name. */ -function targetName(target: string): string { - const apple = "com.apple.UIKit.activity."; - return target.startsWith(apple) ? target.slice(apple.length) : target; -} - -const TRIP = { - title: "Weekend in Kyoto", - text: "Our plan for the weekend: temples in the morning, the market at noon.", - url: "https://example.com/trips/kyoto", -}; - -function ShareSheet() { - const available = signal(null); - void Share.available().then((yes) => available.set(yes)); - const answer = signal<{ text: string; tone: Tone } | null>(null); - const pop = createAnimatedValue(1); - const show = (text: string, tone: Tone) => { - answer.set({ text, tone }); - pop.set(0.85); - pop.spring(1, { stiffness: 380, damping: 18 }); - }; - // How the share ended, or why there was none: never "shared" for a share - // the platform could not show. - const report = async (share: () => Promise, unavailable = "No share sheet here") => { - try { - const { action, target } = await share(); - if (action === "shared") show(target ? `Shared to ${targetName(target)}` : "Shared", "up"); - else show("Dismissed", "neutral"); - } catch (e) { - const error = e as Error & { code?: string }; - if (error.code === "ERR_FEATURE_UNAVAILABLE_ON_PLATFORM") show(unavailable, "warn"); - else show(error.message, "danger"); - } - }; - // The rows the sheet points at on an iPad and on macOS. - let link: ViewRef | undefined; - let note: ViewRef | undefined; - let quote: ViewRef | undefined; - return ( - - - - } - flush - > - - - void report(() => Share.show({ ...TRIP, anchor: link }))} - /> - - - - void report(async () => { - if (!process.dataDir) throw new Error("This host gives the app no data directory"); - const path = `${process.dataDir}/kyoto-itinerary.txt`; - await fs.writeFile(path, `${TRIP.title}\n\nSaturday: Fushimi Inari, Nishiki Market\nSunday: Arashiyama\n`); - return Share.show({ title: TRIP.title, files: [path], anchor: note }); - }, "Files are not shared here") - } - /> - - - void report(() => Share.show({ text: TRIP.text, anchor: quote }))} - /> - - - - Result - None yet}> - - - - - - - ); -} - function FramesAndTimers() { const fps = signal(0); const running = signal(false); @@ -567,6 +465,6 @@ function Network() { } export function System() { - const sections = [Environment, StatusBarCard, Dialogs, ShareSheet, FramesAndTimers, Shortcuts, ContextMenu, Network]; + const sections = [Environment, StatusBarCard, Dialogs, FramesAndTimers, Shortcuts, ContextMenu, Network]; return ; } diff --git a/third-party/nsh/examples/gallery/nsh.json b/third-party/nsh/examples/gallery/nsh.json index 5c69cd6976a..95bb4fff9cf 100644 --- a/third-party/nsh/examples/gallery/nsh.json +++ b/third-party/nsh/examples/gallery/nsh.json @@ -64,7 +64,6 @@ ] }, "picker": true, - "share": true, "notifications": true, "audio": true, "windows": { diff --git a/third-party/nsh/examples/gallery/tests/controls.test.tsx b/third-party/nsh/examples/gallery/tests/controls.test.tsx index dde0c77e95d..46e97875ccd 100644 --- a/third-party/nsh/examples/gallery/tests/controls.test.tsx +++ b/third-party/nsh/examples/gallery/tests/controls.test.tsx @@ -47,24 +47,6 @@ test("a switch turns a setting on and off, and one that needs it is disabled whi await app.waitFor("Images load at a lower quality"); }); -test("on a phone the system's switch card leaves its switches to the system, not the gallery's drawn ones", async () => { - await show("Switch", "The system's switch"); - expect(app.shows("Wi-Fi on · Bluetooth off")).toBe(true); - expect(app.shows("Ask to join networks")).toBe(true); - // The switches are the platform's native views, which headless runs do not - // draw: none of the gallery's drawn switches stand in. - expect(app.count("role:switch[/^Wi-Fi/]")).toBe(0); -}); - -test("off the phones the system's switch card falls back to the gallery's drawn switches", async () => { - const desk = await open("../App.tsx", { platform: "macos", width: 1200, height: 1700, clock: {} }); - await desk.press("role:button[Switch]"); - await desk.waitFor("The system's switch"); - await desk.press("role:switch[/^Wi-Fi/]"); - await desk.waitFor("Wi-Fi off · Bluetooth off"); - expect(desk.enabled("Ask to join networks")).toBe(false); -}); - test("a quick setting is a tile with a switch, and Focus silences the sounds", async () => { await show("Switch", "Quick settings"); expect(app.enabled("Sounds")).toBe(true); @@ -411,6 +393,18 @@ test("a sign-in code is sent, counts down to a resend, shakes off a wrong code a expect(app.enabled(code)).toBe(false); }); +test("an email code takes letters and digits, shown in capitals", async () => { + await show("OtpInput", "The code is AB12CD34"); + const code = "label:Email code, 8 letters and digits"; + await app.type(code, "ab1-2"); + await app.waitFor("Email code: AB12"); + expect(app.texts()).toContain("A"); + expect(app.texts()).not.toContain("a"); + await app.paste(code, { text: "ab12 cd34" }); + await app.waitFor("Email code complete: AB12CD34"); + expect(app.texts()).toContain("Verified"); +}); + test("a PIN is entered twice, masked: a mismatch starts over, a match sets it", async () => { await show("OtpInput", "Choose a 4-digit PIN"); const pin = "label:PIN, 4 digits"; diff --git a/third-party/nsh/examples/gallery/tests/date-picker.test.tsx b/third-party/nsh/examples/gallery/tests/date-picker.test.tsx index 37ec5a6707c..1bf9e32d8ce 100644 --- a/third-party/nsh/examples/gallery/tests/date-picker.test.tsx +++ b/third-party/nsh/examples/gallery/tests/date-picker.test.tsx @@ -1,8 +1,7 @@ // The DatePicker demo: a due date on weekdays with a clear button, a // trip's range with presets, and a meeting's day and time; a booking's stay // priced by the night, a deadline with quick presets and a locked start, and -// a weekday's time slots; on phones, a reminder set with the system's -// picker (`nsh/mobile`'s `DateTimePicker`). On a phone +// a weekday's time slots. On a phone // (headless runs are touch screens) the calendar is a sheet; on a desktop // a popup. The app's clock starts on Wednesday 2026-10-28, so today and // the presets are known; days are named by their ISO dates. @@ -127,19 +126,3 @@ describe("on a phone", () => { expect(app.enabled("role:button[Pick a time]")).toBe(false); }); }); - -test("on a phone a reminder is set with the system's picker, which desktops leave out", async () => { - const phone = await open("../App.tsx", { clock: { time: new Date(2026, 9, 28, 12) } }); - await phone.press("role:button[DatePicker]"); - await phone.waitFor("Reminder"); - // Each row's picker is the system's, a native component headless runs do - // not size or draw; the rows and the summary are the app's. - expect(phone.shows("Starts")).toBe(true); - expect(phone.shows("Every day at")).toBe(true); - expect(phone.shows("Until")).toBe(true); - expect(phone.shows("30 days")).toBe(true); - const desk = await open("../App.tsx", { platform: "macos", width: 1200, height: 1700, clock: { time: new Date(2026, 9, 28, 12) } }); - await desk.press("role:button[DatePicker]"); - await desk.waitFor("Deadline"); - expect(desk.shows("Reminder")).toBe(false); -}); diff --git a/third-party/nsh/examples/gallery/tests/fixtures/hidden-focus.tsx b/third-party/nsh/examples/gallery/tests/fixtures/hidden-focus.tsx index af63c14476b..502ea959131 100644 --- a/third-party/nsh/examples/gallery/tests/fixtures/hidden-focus.tsx +++ b/third-party/nsh/examples/gallery/tests/fixtures/hidden-focus.tsx @@ -1,6 +1,7 @@ // Links, controls and inputs kept mounted in hidden views, one `display: none` // from the start and one hidden after it showed, before a control that -// shows and tabs that X hides. `hidden-focus.test.tsx` runs it. +// shows, tabs that X hides and a field that Ctrl+H hides. +// `hidden-focus.test.tsx` runs it. import { keymap, mount, platform, signal, Text, View } from "nsh"; import { Input, Link, Tab, Tabs } from "nsh/base"; @@ -10,7 +11,9 @@ function App() { const choice = signal("One"); const shown = signal(true); const away = signal(false); + const fieldAway = signal(false); keymap.bind("x", () => away.set(true)); + keymap.bind("ctrl+h", () => fieldAway.set(true)); // Laid out once, then hidden: its views had frames before. setTimeout(() => shown.set(false), 100); const box = { width: 120, height: 32, justifyContent: "center", backgroundColor: "#e5e5e5" } as const; @@ -23,6 +26,8 @@ function App() { note(`${name} focused`)} + onBlur={() => note(`${name} blurred`)} + onChange={({ value }) => note(`${name} = ${value}`)} style={{ width: 120, height: 32, borderWidth: 1, borderColor: "#d4d4d4" }} /> ); @@ -63,9 +68,11 @@ function App() { {tab("Two")} + {field("Away field")} {`Log: ${log().join(", ")}`} {shown() ? "Panel shown" : "Panel hidden"} {away() ? "Tabs hidden" : "Tabs shown"} + {fieldAway() ? "Field hidden" : "Field shown"} {`Platform: ${platform.os}`} ); diff --git a/third-party/nsh/examples/gallery/tests/fixtures/windows.tsx b/third-party/nsh/examples/gallery/tests/fixtures/windows.tsx index 061b20c1afd..1d622c1cff5 100644 --- a/third-party/nsh/examples/gallery/tests/fixtures/windows.tsx +++ b/third-party/nsh/examples/gallery/tests/fixtures/windows.tsx @@ -175,6 +175,8 @@ function Main() { notes()?.close()} /> + notes()?.hide()} /> + notes()?.focus()} /> notes()?.setBounds({ size: { width: 360, height: 240 } })} /> notes()?.set({ sizeToContent: true })} /> notes()?.setMode("maximized")} /> diff --git a/third-party/nsh/examples/gallery/tests/hidden-focus.test.tsx b/third-party/nsh/examples/gallery/tests/hidden-focus.test.tsx index fa84588bebf..49f9a7f6b60 100644 --- a/third-party/nsh/examples/gallery/tests/hidden-focus.test.tsx +++ b/third-party/nsh/examples/gallery/tests/hidden-focus.test.tsx @@ -2,7 +2,8 @@ // after they showed: Tab passes by its links, controls and inputs, and a // focused control that hides gives the focus up, so no key acts on it. A // browser (`--target web`) lays each such view out at no size and would -// otherwise stop at it; headless, only shown views are stops. +// otherwise stop at it, as Windows (`--target windows`) would; headless, +// only shown views are stops. import { expect, open, test } from "nsh/test"; test("Tab passes by what hidden views hold", async () => { @@ -17,9 +18,9 @@ test("Tab passes by what hidden views hold", async () => { test("a focused control that hides gives up the focus", async () => { const app = await open("./fixtures/hidden-focus.tsx", { platform: "macos", width: 400, height: 300 }); await app.waitFor("Panel hidden"); - // The web's: the headless driver keeps the key focus on a view that - // hides (macOS gives it up too: #1832). - if (!app.shows("Platform: web")) return; + // The web's and Windows': the headless driver keeps the key focus on a + // view that hides (macOS gives it up too: #1832). + if (!app.shows("Platform: web") && !app.shows("Platform: windows")) return; // The control, then the selected tab. await app.keyboard.press("tab"); await app.keyboard.press("tab"); @@ -32,3 +33,19 @@ test("a focused control that hides gives up the focus", async () => { await app.wait(300); expect(app.texts()).toContain("Log: Shown focused"); }); + +test("a focused field that hides gives up the focus", async () => { + const app = await open("./fixtures/hidden-focus.tsx", { platform: "macos", width: 400, height: 300 }); + await app.waitFor("Panel hidden"); + // As above: headless, a hidden field keeps the focus. + if (!app.shows("Platform: web") && !app.shows("Platform: windows")) return; + await app.type("text:Away field", "ab"); + await app.keyboard.press("ctrl+h"); + await app.waitFor("Field hidden"); + // A key now reaches no field: "c" is typed nowhere. + await app.keyboard.press("c"); + await app.wait(300); + expect(app.texts()).toContain( + "Log: Away field focused, Away field = a, Away field = ab, Away field blurred", + ); +}); diff --git a/third-party/nsh/examples/gallery/tests/menus.test.tsx b/third-party/nsh/examples/gallery/tests/menus.test.tsx index f7554df23d3..9c664db3624 100644 --- a/third-party/nsh/examples/gallery/tests/menus.test.tsx +++ b/third-party/nsh/examples/gallery/tests/menus.test.tsx @@ -130,22 +130,19 @@ test("a command that takes a while shows a toast that becomes its result", async await app.waitFor("Up to date"); }); -test("on iOS the system's menu card leaves the segments to UIKit, not the gallery's drawn ones", async () => { +test("the system's menu card picks its layout with the gallery's segments", async () => { await app.waitFor("The system's menu"); await app.waitFor("id:system-menu"); expect(app.shows("Sorted by Date")).toBe(true); expect(app.shows("List · sorted by Date")).toBe(true); - // The segments are a UISegmentedControl, which headless runs (no UIKit to - // size it) do not draw: none of the gallery's drawn segments stand in. - expect(app.shows("Grid")).toBe(false); - expect(app.shows("Columns")).toBe(false); + await app.press("Grid"); + await app.waitFor("Grid · sorted by Date"); }); -test("off iOS the system's menu card falls back to the gallery's drawn segments", async () => { +test("off iOS the system's menu card keeps the same segments", async () => { const desk = await open("../App.tsx", { platform: "macos", width: 1200, height: 1700, clock: {} }); await desk.press("role:button[Menu]"); await desk.waitFor("The system's menu"); - expect(desk.shows("id:system-segments")).toBe(false); await desk.press("Grid"); await desk.waitFor("Grid · sorted by Date"); }); diff --git a/third-party/nsh/examples/gallery/tests/photos.test.tsx b/third-party/nsh/examples/gallery/tests/photos.test.tsx index 2aa45d88964..59847f0a678 100644 --- a/third-party/nsh/examples/gallery/tests/photos.test.tsx +++ b/third-party/nsh/examples/gallery/tests/photos.test.tsx @@ -7,7 +7,7 @@ test("scrolling the list shows the rows further down", async () => { await app.waitFor("Ridge 0001"); // The rows are buttons, found inside the list. expect(app.count("id:photos >> role:button")).toBeGreaterThan(5); - expect(app.shows("Dunes 0030")).toBe(false); - await app.scroll("id:photos", 2400); - await app.waitFor("Dunes 0030"); + expect(app.shows("Dunes 0057")).toBe(false); + await app.scroll("id:photos", 4000); + await app.waitFor("Dunes 0057"); }); diff --git a/third-party/nsh/examples/gallery/tests/share.test.tsx b/third-party/nsh/examples/gallery/tests/share.test.tsx deleted file mode 100644 index 12e8a3af77f..00000000000 --- a/third-party/nsh/examples/gallery/tests/share.test.tsx +++ /dev/null @@ -1,41 +0,0 @@ -// The System page's share sheet: `Share.show` hands the content to the -// system, which the test answers (`app.onShare`); without a share sheet the -// card says so, and never that it shared. -import { expect, open, test } from "nsh/test"; - -test("a platform without a share sheet is reported, not shared", async () => { - const app = await open("../App.tsx", { clock: {} }); - await app.press("role:button[System]"); - await app.waitFor("Not on this platform"); - await app.press("label:A link"); - await app.waitFor("No share sheet here"); - expect(app.shares()).toEqual([]); -}); - -test("a link is shared with its title, text and URL", async () => { - const app = await open("../App.tsx", { clock: {} }); - await app.onShare({ action: "shared", target: "com.apple.UIKit.activity.Mail" }); - await app.press("role:button[System]"); - await app.waitFor("Available"); - await app.press("label:A link"); - await app.waitFor("Shared to Mail"); - expect(app.shares()).toEqual([ - { - title: "Weekend in Kyoto", - text: "Our plan for the weekend: temples in the morning, the market at noon.", - url: "https://example.com/trips/kyoto", - files: [], - }, - ]); -}); - -test("closing the sheet shows it was dismissed", async () => { - const app = await open("../App.tsx", { clock: {} }); - await app.onShare({ action: "dismissed" }); - await app.press("role:button[System]"); - await app.press("label:Only text"); - await app.waitFor("Dismissed"); - expect(app.shares().map((s) => s.text)).toEqual([ - "Our plan for the weekend: temples in the morning, the market at noon.", - ]); -}); diff --git a/third-party/nsh/examples/gallery/tests/window-state.test.tsx b/third-party/nsh/examples/gallery/tests/window-state.test.tsx index f73e86c24a3..c2236a5033a 100644 --- a/third-party/nsh/examples/gallery/tests/window-state.test.tsx +++ b/third-party/nsh/examples/gallery/tests/window-state.test.tsx @@ -28,6 +28,16 @@ test("state() reports a window, and its requests change it", async () => { await app.waitFor("text:/^Notes: mode=normal minimized=false visible=true /"); }); +test("focus shows a hidden window", async () => { + const app = await open(FIXTURE, OPTIONS); + await app.press("Open notes"); + await app.waitFor("text:/^Notes: .*visible=true /"); + await app.press("Hide notes"); + await app.waitFor("text:/^Notes: .*visible=false /"); + await app.press("Focus notes"); + await app.waitFor("text:/^Notes: .*visible=true focused=true /"); +}); + test("a window opens at the defaultPosition the app gives it", async () => { const app = await open(FIXTURE, OPTIONS); await app.press("Open notes"); diff --git a/third-party/nsh/examples/nsh-gallery-ui/demo.ts b/third-party/nsh/examples/nsh-gallery-ui/demo.ts index 92c840394da..c4437a37e62 100644 --- a/third-party/nsh/examples/nsh-gallery-ui/demo.ts +++ b/third-party/nsh/examples/nsh-gallery-ui/demo.ts @@ -282,5 +282,5 @@ export function Segmented(props: { label?: string; op } export { dataTableClasses, dataTableFitPadding } from "./data-table"; -export { sliderFill, sliderLook, sliderValueClass, sliderValueStyle, type SliderLookOptions } from "./slider"; +export { sliderBubbleClass, sliderBubbleText, sliderFill, sliderLook, sliderValueClass, sliderValueStyle, type SliderLookOptions } from "./slider"; export { avatarHue, avatarIdentity, avatarPortrait, AVATAR_BROKEN } from "./avatar"; diff --git a/third-party/nsh/examples/nsh-gallery-ui/look/listbox.tsx b/third-party/nsh/examples/nsh-gallery-ui/look/listbox.tsx index c3450ae7fe9..c1929fdd5d2 100644 --- a/third-party/nsh/examples/nsh-gallery-ui/look/listbox.tsx +++ b/third-party/nsh/examples/nsh-gallery-ui/look/listbox.tsx @@ -613,7 +613,8 @@ export function TimeSegment(props: { label: string }) { * at 70%, `group` for what they draw), `segmentClass` the time's segments * (filled while they have the keys), the popup's layout (`content`: the * presets beside the calendar with a pointer, above it on a phone), the - * presets' column of ghost buttons or chips, the header's gap over the + * presets' column of ghost buttons or chips (`presetDescription` a + * preset's second line, smaller and muted), the header's gap over the * weekdays (shadcn's `gap-4`), the calendar's padding (with the popup's, * shadcn's `p-3`), the time's row under a hairline, its well * (`timeFieldClass`, the number inputs'), the time's `:` in the muted @@ -638,10 +639,14 @@ export const calendarLook = { : { flexDirection: "row", flexWrap: "wrap", gap: 6 }; }, get preset() { - if (terminal) return { height: 28, paddingHorizontal: 8, borderRadius: radius.control, justifyContent: "center" as const, fontSize: 13, color: colors.text }; + // At least a line's height, growing with a description's second line: a preset without one stays as tall. + if (terminal) return { minHeight: 28, paddingHorizontal: 8, borderRadius: radius.control, justifyContent: "center" as const, fontSize: 13, color: colors.text }; return pointer - ? { height: 28, paddingHorizontal: 10, borderRadius: radius.control, justifyContent: "center" as const, fontSize: 13, color: colors.text } - : { height: 34, paddingHorizontal: 12, borderRadius: 17, borderWidth: 1, borderColor: colors.border, justifyContent: "center" as const, fontSize: 14, color: colors.text }; + ? { minHeight: 28, paddingVertical: 4, paddingHorizontal: 10, borderRadius: radius.control, justifyContent: "center" as const, fontSize: 13, color: colors.text } + : { minHeight: 34, paddingVertical: 6, paddingHorizontal: 12, borderRadius: 17, borderWidth: 1, borderColor: colors.border, justifyContent: "center" as const, fontSize: 14, color: colors.text }; + }, + get presetDescription() { + return terminal ? { color: colors.faint } : { fontSize: 12, color: colors.muted, fontVariant: ["tabular-nums" as const] }; }, presetClass: terminal ? "enabled:hover:bg-accent active:opacity-70" : `transition-colors duration-100 motion-reduce:transition-none enabled:hover:${quietFill} enabled:active:${pressedFill}`, header: { marginBottom: terminal ? 4 : pointer ? 12 : 8 }, @@ -691,6 +696,9 @@ export function datePickerLook(o?: DatePickerLookOptions) { get presetStyle() { return calendarLook.preset; }, + get presetDescriptionStyle() { + return calendarLook.presetDescription; + }, presetClass: calendarLook.presetClass, calendarStyle: calendarLook.calendar, headerStyle: calendarLook.header, diff --git a/third-party/nsh/examples/nsh-gallery-ui/look/workspace.tsx b/third-party/nsh/examples/nsh-gallery-ui/look/workspace.tsx index c0b794269f9..318c77fbd55 100644 --- a/third-party/nsh/examples/nsh-gallery-ui/look/workspace.tsx +++ b/third-party/nsh/examples/nsh-gallery-ui/look/workspace.tsx @@ -110,6 +110,8 @@ export const richEditorClasses = { // A box that answers the pointer: its edge and fill step up on hover (a checked one softens), and it sinks while pressed. taskCheckbox: "size-4 mr-2 mt-1 rounded border border-border cursor-pointer transition duration-150 ease-out hover:border-foreground/40 hover:bg-foreground/5 active:scale-90 checked:bg-primary checked:border-primary checked:hover:bg-primary/80", + // The check mark on the filled box. + taskCheckmark: "text-primary-foreground", nodes: { paragraph: "leading-relaxed", "heading[level=1]": "text-3xl font-bold tracking-tight", diff --git a/third-party/nsh/examples/nsh-gallery-ui/slider.ts b/third-party/nsh/examples/nsh-gallery-ui/slider.ts index 0a7a042ed06..1a47ccf0706 100644 --- a/third-party/nsh/examples/nsh-gallery-ui/slider.ts +++ b/third-party/nsh/examples/nsh-gallery-ui/slider.ts @@ -77,3 +77,29 @@ export function sliderFill(_from: number, _to: number, vertical = false): ViewSt borderColor: finish.fill.borderColor, }; } + +/** + * A thumb's value bubble (the content of `renderThumb`: ``): a + * tooltip's popover surface centered 6 points above its thumb (a 14-point + * thumb with a pointer, 20 on a touch screen, as `sliderLook`). It shows + * while the pointer is over its thumb, while a drag moves the thumb (a press + * on the track too) and with the keyboard's focus on it, fading in as it + * rises 2 points (the fade alone with reduced motion). The slider moves it + * with the thumb and switches its states natively: nothing is drawn again. + */ +export function sliderBubbleClass(): string { + const lift = (platform.desktop ? 14 : 20) + 6; + const shown = (variant: string) => `${variant}:opacity-100 ${variant}:translate-y-0`; + return [ + `absolute bottom-[${lift}px] left-1/2 -translate-x-1/2 translate-y-0.5 opacity-0`, + "rounded-md border border-border bg-popover px-1.5 py-0.5 shadow-sm", + "transition duration-150 motion-reduce:transition-opacity", + shown("group-hover"), + shown("group-data-dragging"), + shown("group-focus-visible"), + ].join(" "); +} + +/** A value bubble's text (`class`): one line of 11-point figures in the popover's foreground. */ +export const sliderBubbleText = "whitespace-nowrap text-[11px] leading-4 tabular-nums text-popover-foreground"; diff --git a/third-party/nsh/examples/rust-exports/App.test.tsx b/third-party/nsh/examples/rust-exports/App.test.tsx index 19a1e57e7fe..3e1590c61bc 100644 --- a/third-party/nsh/examples/rust-exports/App.test.tsx +++ b/third-party/nsh/examples/rust-exports/App.test.tsx @@ -22,3 +22,12 @@ test("the class keeps its state in Rust", async () => { await app.waitFor("Accrued: $116.15"); expect(app.texts()).toContain("Savings: $116.15"); }); + +test("a Rust component reads string children and their updates", async () => { + const app = await open("./TextChild.tsx"); + expect(app.shows("**Literal**")).toBe(true); + expect(app.shows("**First**")).toBe(true); + await app.press("Update child"); + await app.waitFor("**Second**"); + expect(app.shows("**First**")).toBe(false); +}); diff --git a/third-party/nsh/examples/rust-exports/README.md b/third-party/nsh/examples/rust-exports/README.md index e361405e523..accf1a035a8 100644 --- a/third-party/nsh/examples/rust-exports/README.md +++ b/third-party/nsh/examples/rust-exports/README.md @@ -34,3 +34,13 @@ reads. How each kind of export runs, crosses and is typed: [Building with Rust](../../website/docs/rust.md) and, for NSH's developers, `docs/dev/rust-classes.md` (classes, module functions, callbacks) and `docs/dev/components.md` (components). `examples/gallery-rs` is a whole app written in Rust. + +### String children + +A Rust component can read a JSX string child by declaring a regular value prop +named `children` with type `Prop`. The generated TSX API accepts +`literal` or `{source()}`. Read the +prop within a reactive computation or binding to follow updates. For arbitrary +renderable child nodes, use the `Children` slot type. + +See `native/src/lib.rs` and `TextChild.tsx` for a runnable example. diff --git a/third-party/nsh/examples/rust-exports/TextChild.tsx b/third-party/nsh/examples/rust-exports/TextChild.tsx new file mode 100644 index 00000000000..c8480dcab3b --- /dev/null +++ b/third-party/nsh/examples/rust-exports/TextChild.tsx @@ -0,0 +1,19 @@ +import { mount, signal, Text, View } from "nsh"; +import { Button } from "nsh/base"; +import { Window } from "nsh/desktop"; +import { TextChild } from "rust-exports/native"; + +function App() { + const source = signal("**First**"); + return ( + + **Literal** + {source()} + + + ); +} + +mount(() => {App}); diff --git a/third-party/nsh/examples/rust-exports/native/src/lib.rs b/third-party/nsh/examples/rust-exports/native/src/lib.rs index ef3c6e6985e..042fe72abad 100644 --- a/third-party/nsh/examples/rust-exports/native/src/lib.rs +++ b/third-party/nsh/examples/rust-exports/native/src/lib.rs @@ -26,11 +26,25 @@ pub use crate::{ ledger::Ledger, }; +/// Renders a string passed as the JSX children. +#[derive(Debug, Clone, PartialEq, Props)] +pub struct TextChildProps { + /// The text supplied between the JSX tags. + pub children: Prop, +} + +/// Render the supplied text, following changes to the JSX child. +#[component] +pub fn TextChild(props: TextChildProps) -> impl IntoElement { + text(move || props.children.get()) +} + /// The crate's UI set: what `App.tsx` imports from `rust-exports/native`. #[native_module("rust-exports/native")] fn native(registry: &mut Registry) { registry .register::() + .register::() .module::() .class::(); } diff --git a/third-party/nsh/skills/nsh/references/mixed.md b/third-party/nsh/skills/nsh/references/mixed.md index b3c4276e6f0..4a449de27a3 100644 --- a/third-party/nsh/skills/nsh/references/mixed.md +++ b/third-party/nsh/skills/nsh/references/mixed.md @@ -182,6 +182,11 @@ TSX gets `value: number`, `max?: number`, `step?: number`, `label?: string | nul - A prop of the wrong type at run time is a warning, not a throw: the prop keeps its value and the rest render. - A Rust component's own state stays private. TSX passes props and hears events; to call into it, add `#[methods]` ref methods (`docs/dev/components.md`). +For a component that reads the string between its JSX tags, declare `pub children: Prop`. TSX gets +`children: string`, and `**bold**` supplies the original string, including the asterisks. +`{source()}` supplies the current value of a signal. Read `props.children.get()` in a +reactive binding or computation to follow changes. Use `Prop` to place JSX nodes, as `Gauge` does. + Two more prop kinds have no example in `rust-exports`: - `Prop>>` is `(value: T) => JSX.Element`, content the app draws. Rust calls `r.render(key, value)`, which returns a view it can style and place. Content is kept per key while the value stays equal. `TextView` uses it. diff --git a/third-party/nsh/skills/nsh/references/tooling.md b/third-party/nsh/skills/nsh/references/tooling.md index 18105d1475b..eed2a5a331c 100644 --- a/third-party/nsh/skills/nsh/references/tooling.md +++ b/third-party/nsh/skills/nsh/references/tooling.md @@ -110,6 +110,19 @@ echo 'await app.press("Add")' | nsh test App.tsx --trace --target ios # the sa `perf commit: 10 ops, 151µs (list js 2µs), 8 mount items, 27 nodes` is one commit. Use `--trace` to see which native views a change creates or updates: a press that recreates a list means a binding is wrong. In Rust, set `EngineConfig::trace = true` and call `app.observe(..)`. `--limits` (TSX) runs the app under an embedding host's limits: `--limits memory=128MB,call=500ms`. +## Driving the window the developer has open + +A bug that only shows in the developer's `nsh run` / `nsh dev` window (after many hot updates, say) does not show in a +fresh `nsh test` run. `nsh test --attach` takes the same steps and queries in that running window instead, on the +macOS and GPUI hosts, from this machine only: + +```sh +echo 'console.log(app.texts()); await app.press("Save"); await app.screenshot("now.png")' | nsh test --attach +nsh test --attach=8790 --device gpui # a session's port; one of its hosts +``` + +`open` takes no options there, and the app keeps running after ([testing guide](https://nsh.dev/docs/testing-and-trace.md#driving-a-running-session)). + ## Platforms and prerequisites Each desktop packages only on itself. Phones are reached from a computer. diff --git a/third-party/nsh/tests/compat/cases/base/App.tsx b/third-party/nsh/tests/compat/cases/base/App.tsx index d0a47c4d7e5..af6503dc3ab 100644 --- a/third-party/nsh/tests/compat/cases/base/App.tsx +++ b/third-party/nsh/tests/compat/cases/base/App.tsx @@ -28,6 +28,7 @@ import BaseSplitView from "./base-split-view"; import BaseEditor from "./base-editor"; import BaseEditorFonts from "./base-editor-fonts"; import BaseHoverCard from "./base-hover-card"; +import BaseHostAccessibility from "./base-host-accessibility"; import BaseLink from "./base-link"; import BaseNavPage from "./base-nav-page"; import BaseNavHeaderItems from "./base-nav-header-items"; @@ -55,9 +56,12 @@ import BaseRichEditorReadonlyInput from "./base-rich-editor-readonly-input"; import BaseRichEditorNodeView from "./base-rich-editor-node-view"; import BaseRichEditorSession from "./base-rich-editor-session"; import BaseRichEditorTables from "./base-rich-editor-tables"; +import BaseRichEditorTaskCheckmark from "./base-rich-editor-task-checkmark"; +import BaseRichEditorTableFullWidth from "./base-rich-editor-table-full-width"; import BaseRichEditorView from "./base-rich-editor-view"; import BaseSafeAreaKeyboard from "./base-safe-area-keyboard"; import BaseCombobox from "./base-combobox"; +import BaseCalendar from "./base-calendar"; import BaseCommand from "./base-command"; import BaseDatePicker from "./base-date-picker"; import BaseEmojiPicker from "./base-emoji-picker"; @@ -101,6 +105,7 @@ const cases: Record JSX.Element> = { "base-editor": BaseEditor, "base-editor-fonts": BaseEditorFonts, "base-hover-card": BaseHoverCard, + "base-host-accessibility": BaseHostAccessibility, "base-link": BaseLink, "base-nav-page": BaseNavPage, "base-nav-header-items": BaseNavHeaderItems, @@ -130,6 +135,8 @@ const cases: Record JSX.Element> = { "base-rich-editor-session": BaseRichEditorSession, "base-rich-editor-view": BaseRichEditorView, "base-rich-editor-tables": BaseRichEditorTables, + "base-rich-editor-task-checkmark": BaseRichEditorTaskCheckmark, + "base-rich-editor-table-full-width": BaseRichEditorTableFullWidth, "base-tabs": BaseTabs, "base-tabs-orientation": BaseTabsOrientation, "base-toggle": BaseToggle, @@ -144,6 +151,7 @@ const cases: Record JSX.Element> = { "base-progress": BaseProgress, "base-terminal": BaseTerminal, "base-combobox": BaseCombobox, + "base-calendar": BaseCalendar, "base-command": BaseCommand, "base-date-picker": BaseDatePicker, "base-emoji-picker": BaseEmojiPicker, diff --git a/third-party/nsh/tests/compat/cases/base/base-calendar.tsx b/third-party/nsh/tests/compat/cases/base/base-calendar.tsx new file mode 100644 index 00000000000..e0736502593 --- /dev/null +++ b/third-party/nsh/tests/compat/cases/base/base-calendar.tsx @@ -0,0 +1,39 @@ +// A case of the API's test suite (docs/dev/compatibility.md): `Calendar` +// of `nsh/base` picking a range the app owns, as a range picker that +// commits on Apply does: the first press is reported by +// `onChangeStart({ value })` (`[start, null]`), which the app keeps as its +// value and shows outside the grid; the second by `onChange({ value })`, +// the complete range; the app's Cancel sets the range before back, which +// replaces the start. The dates are fixed, so nothing depends on today. +// Its script checks each. +import { Text, View, signal } from "nsh"; +import { Calendar, type CalendarValue } from "nsh/base"; + +function App() { + const applied: CalendarValue = ["2026-10-05", "2026-10-07"]; + const draft = signal(applied); + const heard = signal("Heard: none"); + return ( + + {`Draft: ${JSON.stringify(draft())}`} + {heard()} + draft.set(applied)}> + Cancel + + { + draft.set(value); + heard.set(`Heard: start ${JSON.stringify(value)}`); + }} + onChange={({ value }) => { + draft.set(value); + heard.set(`Heard: change ${JSON.stringify(value)}`); + }} + /> + + ); +} + +export default App; diff --git a/third-party/nsh/tests/compat/cases/base/base-date-picker.tsx b/third-party/nsh/tests/compat/cases/base/base-date-picker.tsx index 79b96306f47..42734a31ad6 100644 --- a/third-party/nsh/tests/compat/cases/base/base-date-picker.tsx +++ b/third-party/nsh/tests/compat/cases/base/base-date-picker.tsx @@ -4,14 +4,18 @@ // screen readers hear as the value (`dateFormat`), the app's items // (`renderItem`, given what an item is, never its state; `itemStyle`), // weekends that take no press (`disabledMatcher`), the week's first day, -// Previous and Next; a range of the picker's own (`defaultValue`) over -// two months with a preset, its days styled by their `data-range-*:` and +// Previous and Next; a range of the picker's own (`defaultValue`) over two +// months with a preset and its description (a second line in a look of its +// own, read after the label), its days styled by their `data-range-*:` and // `data-outside:` classes and their content by `group-data-*:`, a half -// range's preview up to the day under the mouse by `data-range-preview-*:`; and -// a date and time whose sheet a tap on a day closes and which opens -// again for the time (`timePrecision`, `hourCycle`, the time's label and -// segments). The -// dates are fixed, so nothing depends on today. Its script checks each. +// range's start reported (`onChangeStart({ value })`) and its preview up to +// the day under the mouse by `data-range-preview-*:`; and a date and time +// whose sheet a tap on a day closes and which opens again for the time +// (`timePrecision`, `hourCycle`, the time's label and segments); and a range +// that commits on Apply: picks stay pending in a sheet the app keeps open +// (`open`, a `select` in `onOpenChange` not followed), with the app's +// `header` and a `footer` whose Apply commits and closes it. The dates are +// fixed, so nothing depends on today. Its script checks each. import { Text, View, signal } from "nsh"; import { type CalendarEntry, DatePicker, type DatePickerValue } from "nsh/base"; @@ -39,6 +43,9 @@ function App() { const opened = signal("Open: none"); const trip = signal("Trip: none"); const meet = signal("Meet: none"); + const stay = signal(["2026-10-05", "2026-10-07"]); + const stayOpen = signal(false); + const stayed = signal("Stay: none"); return ( {`Due: ${due()}`} @@ -67,11 +74,13 @@ function App() { range defaultValue={["2026-10-05", "2026-10-07"]} onChange={({ value }) => trip.set(`Trip: ${JSON.stringify(value)}`)} + onChangeStart={({ value }) => trip.set(`Trip: start ${JSON.stringify(value)}`)} accessibilityLabel="Trip" numberOfMonths={2} - presets={[{ label: "Week", value: ["2026-10-19", "2026-10-25"] }]} + presets={[{ label: "Week", value: ["2026-10-19", "2026-10-25"], description: "Oct 19-25" }]} presetsStyle={{ backgroundColor: "#0000ff" }} presetStyle={{ backgroundColor: "#00ff00" }} + presetDescriptionStyle={{ color: "#ff0000" }} itemClass="group data-range-start:bg-[#ff0000] data-range-middle:bg-[#00ff00] data-range-end:bg-[#0000ff] data-range-preview-start:bg-[#ff00ff] data-range-preview-middle:bg-[#ffff00] data-range-preview-end:bg-[#00ffff] data-outside:opacity-50" renderItem={(item) => } trigger={TripTrigger} @@ -89,6 +98,32 @@ function App() { renderItem={(item) => } trigger={MeetTrigger} /> + stay.set(value)} + open={stayOpen()} + onOpenChange={({ open, reason }) => { + if (reason !== "select") stayOpen.set(open); + }} + accessibilityLabel="Stay" + renderItem={(item) => } + header={StayHeader} + footer={ + { + stayed.set(`Stay: ${JSON.stringify(stay())}`); + stayOpen.set(false); + }} + > + StayApply + + } + trigger={StayTrigger} + /> + {stayed()} ); } diff --git a/third-party/nsh/tests/compat/cases/base/base-host-accessibility.tsx b/third-party/nsh/tests/compat/cases/base/base-host-accessibility.tsx new file mode 100644 index 00000000000..04842570409 --- /dev/null +++ b/third-party/nsh/tests/compat/cases/base/base-host-accessibility.tsx @@ -0,0 +1,56 @@ +// A case of the API's test suite (docs/dev/compatibility.md): a component's +// host takes a view's accessibility props, as it takes its classes and mouse +// events: `accessibilityDescription`, `accessibilityLevel`, +// `accessible`, `role`, `accessibilityLabel`, `accessibilityHint`, +// `accessibilityState`, `accessibilityValue`, `accessibilityElementsHidden`, +// `importantForAccessibility`, `accessibilityLiveRegion`, +// `accessibilityActions`, `accessibilityActiveDescendant`, +// `accessibilityControls`, `accessibilityDescribedBy` and the actions an +// assistive technology performs (`onAccessibilityAction`), on the views of +// `nsh/base`'s components that do not declare them. Its script checks each. +import { Text, View, signal, type ViewRef } from "nsh"; +import { Button, Collapsible } from "nsh/base"; + +function App() { + const error = signal(); + const list = signal(); + return ( + + + {}} + > + Details + + + Hidden details + + + Hidden elements + + + Enter a name + + + List + + + ); +} + +export default App; diff --git a/third-party/nsh/tests/compat/cases/base/base-rich-editor-kit.tsx b/third-party/nsh/tests/compat/cases/base/base-rich-editor-kit.tsx index 04519a0e70f..1464b237af8 100644 --- a/third-party/nsh/tests/compat/cases/base/base-rich-editor-kit.tsx +++ b/third-party/nsh/tests/compat/cases/base/base-rich-editor-kit.tsx @@ -182,6 +182,17 @@ function App() { .map((extension) => extension.configure().name) .join(","), ); + step("Language", () => { + // The language of code blocks naming none (Tiptap's `defaultLanguage`). + type Options = { defaultLanguage: string | null }; + const plain = CodeBlockHighlight.configure().options as Options; + const rust = CodeBlockHighlight.configure({ defaultLanguage: "rust" }).options as Options; + const editor = createRichEditor({ + extensions: [StarterKit.configure({ codeBlockHighlight: { defaultLanguage: "rust" } })], + content: "x", + }); + return `${plain.defaultLanguage} ${rust.defaultLanguage} ${editor.isEditable}`; + }); lines.set(out); }; diff --git a/third-party/nsh/tests/compat/cases/base/base-rich-editor-table-full-width.tsx b/third-party/nsh/tests/compat/cases/base/base-rich-editor-table-full-width.tsx new file mode 100644 index 00000000000..4366d80a730 --- /dev/null +++ b/third-party/nsh/tests/compat/cases/base/base-rich-editor-table-full-width.tsx @@ -0,0 +1,47 @@ +// A case of the API's test suite (docs/dev/compatibility.md): the `table` +// extension's `fullWidth` option in `nsh/base`. Three read-only editors of +// the same width: tables as they are by default (columns fit their +// content), with `fullWidth` (columns without a width share the editor's +// text) and with `fullWidth` and every column sized (the last column takes +// the room left). Its script checks where the cells are laid out. +import { View } from "nsh"; +import { RichEditor, StarterKit, TableKit, createRichEditor } from "nsh/base"; + +const cell = (text: string, width?: number) => ({ + type: "tableCell", + attrs: width ? { colwidth: [width] } : {}, + content: [{ type: "paragraph", content: [{ type: "text", text }] }], +}); + +const tableDoc = (cells: ReturnType[]) => ({ + type: "doc", + content: [{ type: "table", content: [{ type: "tableRow", content: cells }] }], +}); + +const full = TableKit.configure({ table: { fullWidth: true } }); + +function App() { + const byDefault = createRichEditor({ + extensions: [StarterKit, TableKit], + content: tableDoc([cell("DefaultA"), cell("DefaultB")]), + }); + const shared = createRichEditor({ + extensions: [StarterKit, full], + content: tableDoc([cell("SharedA"), cell("SharedB")]), + }); + const sized = createRichEditor({ + extensions: [StarterKit, full], + content: tableDoc([cell("SizedA", 80), cell("SizedB", 80)]), + }); + const editor = { width: 300, height: 60, flexShrink: 0 }; + + return ( + + + + + + ); +} + +export default App; diff --git a/third-party/nsh/tests/compat/cases/base/base-rich-editor-task-checkmark.tsx b/third-party/nsh/tests/compat/cases/base/base-rich-editor-task-checkmark.tsx new file mode 100644 index 00000000000..0a5d9a234d8 --- /dev/null +++ b/third-party/nsh/tests/compat/cases/base/base-rich-editor-task-checkmark.tsx @@ -0,0 +1,35 @@ +// A case of the API's test suite (docs/dev/compatibility.md): the +// `RichEditor` view's `taskCheckmark` part in `nsh/base`. A done task +// item's checkbox holds no mark until the app gives the part classes or a +// style; with either, a `✓` in the part's color, gone once the item is open. +import { Text, View, signal } from "nsh"; +import { RichEditor, StarterKit, createRichEditor } from "nsh/base"; + +const MODES = ["none", "classes", "styles"] as const; + +function App() { + const editor = createRichEditor({ + extensions: [StarterKit], + content: "- [x] TaskDone\n- [ ] TaskOpen\n", + format: "markdown", + }); + const mode = signal<(typeof MODES)[number]>("none"); + return ( + + mode.set(MODES[(MODES.indexOf(mode()) + 1) % MODES.length])}> + {`CheckmarkMode ${mode()}`} + + + + ); +} + +export default App; diff --git a/third-party/nsh/tests/compat/cases/base/base-select.tsx b/third-party/nsh/tests/compat/cases/base/base-select.tsx index c83f9251f0e..29217f24f67 100644 --- a/third-party/nsh/tests/compat/cases/base/base-select.tsx +++ b/third-party/nsh/tests/compat/cases/base/base-select.tsx @@ -11,9 +11,11 @@ // lifecycle (`onOpen`, `onClose`) and Escape, back or the backdrop heard // (`onCancel`), the clear button of a select's own value // (`cleanable`, `onChange(null)`), and the search field's name for screen -// readers (`searchAccessibilityLabel`) and its test id (`searchTestID`), and -// the states the app gives its trigger element kept beside the select's. -// Its script checks each. +// readers (`searchAccessibilityLabel`) and its test id (`searchTestID`), the +// search's query the app owns (`query`, `onQueryChange`: its rows mark the +// match) or the field's own from `defaultQuery`, and the states the app +// gives its trigger element kept beside the select's. Its script checks +// each. import { Text, View, signal } from "nsh"; import { Select } from "nsh/base"; @@ -27,6 +29,14 @@ const FOOD = [ const titleOf = (value: string | null) => FOOD.find((f) => f.value === value)?.title ?? "none"; +// The title with the query's first match between underscores. +const mark = (title: string, query: string) => { + const at = query ? title.toLowerCase().indexOf(query.toLowerCase()) : -1; + if (at < 0) return title; + const end = at + query.length; + return `${title.slice(0, at)}_${title.slice(at, end)}_${title.slice(end)}`; +}; + function App() { const value = signal(null); const open = signal(false); @@ -38,6 +48,7 @@ function App() { const asked = signal("Asked: none"); const found = signal("Find: none"); const cleared = signal("Own: none"); + const searched = signal(""); return ( {changed()} @@ -47,6 +58,7 @@ function App() { {asked()} {found()} {cleared()} + {`Query: ${searched() || "none"}`} searched.set(next)} + onClose={() => searched.set("")} + searchAccessibilityLabel="AskField" + accessibilityLabel="Ask" + renderItem={(item) => {mark(item.title, searched())}} + trigger={AskTrigger} + /> + price.set(value as [number, number])} + renderThumb={({ start }) => ( + + )} {...parts} /> {`Price ${price()[0]}-${price()[1]}`} diff --git a/third-party/nsh/tests/compat/cases/base/script.txt b/third-party/nsh/tests/compat/cases/base/script.txt index 54fb79a2d53..fafc4af297c 100644 --- a/third-party/nsh/tests/compat/cases/base/script.txt +++ b/third-party/nsh/tests/compat/cases/base/script.txt @@ -2632,14 +2632,16 @@ style label:2026-10-06 backgroundColor #00ff00ff style label:2026-10-07 backgroundColor #0000ffff style text:D10.6 color #00ff00ff style label:2026-09-27 opacity 0.5 -# The first press starts a range, shown but not reported until the -# second ends it; then the popup closes. Half a range is its start, -# selected, with no range marked. +# The first press starts a range: no value until the second ends it, +# its start reported by `onChangeStart` (`[start, null]`), the popup +# open for the end. Half a range is its start, selected, with no range +# marked. tap label:2026-10-12 prop label:2026-10-12 accessibilityState selected=true nostyle label:2026-10-12 backgroundColor nostyle label:2026-10-06 backgroundColor -expect Trip: none +expect Trip: start ["2026-10-12",null] +expect M11 # The mouse moving over a later day previews the range a press there # makes: the days from the start to it styled by the item's # `data-range-preview-start:`, `data-range-preview-middle:` and @@ -2650,7 +2652,7 @@ style label:2026-10-13 backgroundColor #ffff00ff style label:2026-10-14 backgroundColor #00ffffff prop label:2026-10-13 accessibilityState {} nostyle label:2026-10-15 backgroundColor -expect Trip: none +expect Trip: start ["2026-10-12",null] tap label:2026-10-14 expect Trip: ["2026-10-12","2026-10-14"] absent M11 @@ -2662,6 +2664,11 @@ expect Week prop label:Week role button style label:Week backgroundColor #00ff00ff style parent:label:Week backgroundColor #0000ffff +# Its description: a second line in the look of its own part, which +# screen readers read after the label. +expect Oct 19-25 +prop label:Week accessibilityDescription Oct 19-25 +style text:"Oct 19-25" color #ff0000ff tap label:Week expect Trip: ["2026-10-19","2026-10-25"] absent Week @@ -2672,6 +2679,8 @@ covers [props] DatePicker.itemClass covers [props] DatePicker.presets covers [props] DatePicker.presetsStyle covers [props] DatePicker.presetStyle +covers [props] DatePicker.presetDescriptionStyle +covers [events] DatePicker.onChangeStart # A date and time (`timePrecision`) on a 12-hour clock (`hourCycle`): # heard with the time; the popup holds the app's label of the time and # the field's segments (`renderSegment`, `segmentStyle`). @@ -2708,6 +2717,57 @@ covers [props] DatePicker.timeLabel covers [props] DatePicker.timeAccessibilityLabel covers [props] DatePicker.renderSegment covers [props] DatePicker.segmentStyle +# Kept open on a `select` (`open`): the sheet holds the app's header above the +# calendar and its footer below; a range's two days are reported and +# shown selected, the sheet still open, until the app's Apply in the +# footer commits the pending value and closes it (`open`). +tap id:stay +expect StayHeader +expect StayApply +tap label:2026-10-12 +tap label:2026-10-14 +prop label:2026-10-13 accessibilityState selected=true +expect StayHeader +expect Stay: none +tap id:stayApply +expect Stay: ["2026-10-12","2026-10-14"] +absent StayHeader +prop label:Stay accessibilityValue text=2026/10/12 - 2026/10/14 +covers [props] DatePicker.header +covers [props] DatePicker.footer +covers [props] DatePicker.open + +# base-calendar +tap id:case-base-calendar +# The app's range, every day of it selected for screen readers. +expect Draft: ["2026-10-05","2026-10-07"] +prop label:2026-10-06 accessibilityState selected=true +# The first press starts a range: no value yet, its start reported by +# `onChangeStart` (`[start, null]`), which the app keeps as its value and +# shows outside the grid; the range before is no longer selected. +tap label:2026-10-12 +expect Heard: start ["2026-10-12",null] +expect Draft: ["2026-10-12",null] +prop label:2026-10-12 accessibilityState selected=true +prop label:2026-10-06 accessibilityState {} +# The app's Cancel sets the range before back, which replaces the start: +# the next press starts a range again rather than ending that one. +tap id:cancel +expect Draft: ["2026-10-05","2026-10-07"] +prop label:2026-10-06 accessibilityState selected=true +prop label:2026-10-12 accessibilityState {} +tap label:2026-10-20 +expect Heard: start ["2026-10-20",null] +# The second press ends it: `onChange` reports the complete range. +tap label:2026-10-22 +expect Heard: change ["2026-10-20","2026-10-22"] +expect Draft: ["2026-10-20","2026-10-22"] +prop label:2026-10-21 accessibilityState selected=true +covers [nsh/base] Calendar +covers [props] Calendar.range +covers [props] value +covers [events] Calendar.onChangeStart +covers [events] onChange # base-select tap id:case-base-select @@ -2891,6 +2951,38 @@ covers [props] Select.searchTestID covers [props] Select.searchClass covers [props] Select.searchStyle covers [props] Select.empty +# The app's query (`query`, `onQueryChange`): typing in the search field is +# reported, the app's query filters, and the app's rows mark the match from +# it; the app clears it once the list is gone (`onClose`). +tap id:ask +expect Apple +type label:AskField rr +expect Query: rr +expect Che_rr_y +expect Ca_rr_ot +absent Apple +event label:Cherry onCancel +absent Che_rr_y +expect Query: none +tap id:ask +expect Apple +expect Cherry +tap below:parent:scroll:label:Apple +absent Apple +covers [props] Select.query +covers [events] Select.onQueryChange +# The field's own query starts each opening from `defaultQuery`. +tap id:preset +expect Carrot +absent Apple +event label:Carrot onCancel +absent Carrot +tap id:preset +expect Carrot +absent Apple +event label:Carrot onCancel +absent Carrot +covers [props] Select.defaultQuery # base-color-picker tap id:case-base-color-picker @@ -3062,16 +3154,40 @@ prop label:Volume accessibilityValue min=0 max=100 now=60 text=60 frame label:Volume 120 2 10 10 # A range: a thumb each, the start's value up to the end, the end's from # the start. A press on the track moves the nearer thumb there (at 75%, -# past the middle of the two at 40%: the end's). +# past the middle of the two at 40%: the end's), which is dragging from +# the press to the release: the content `renderThumb` draws in it shows +# `group-data-dragging:`, the start's not (see below). expect Price 200-600 prop label:"Min price" accessibilityValue min=0 max=600 now=200 text=200 prop label:"Max price" accessibilityValue min=200 max=1000 now=600 text=600 frame label:"Min price" 40 2 10 10 frame label:"Max price" 120 2 10 10 +nostyle id:max-bubble backgroundColor touch start parent:parent:label:"Max price" 150 10 +style id:max-bubble backgroundColor #ff0000ff +nostyle id:min-bubble backgroundColor touch end +nostyle id:max-bubble backgroundColor expect Price 200-750 prop label:"Min price" accessibilityValue min=0 max=750 now=200 text=200 +# Content in each thumb (`renderThumb`, told which it is), in its corner: +# it follows its own thumb's states through `group-*:` classes. A press +# on a thumb marks it dragging (`group-data-dragging:`) before it moves, +# the other not; the release ends it. The pointer over a thumb is its +# `group-hover:`. +frame id:max-bubble 0 0 4 4 +nostyle id:max-bubble backgroundColor +touch start label:"Max price" 5 5 +style id:max-bubble backgroundColor #ff0000ff +nostyle id:min-bubble backgroundColor +touch end +nostyle id:max-bubble backgroundColor +expect Price 200-750 +state label:"Min price" hovered +style id:min-bubble backgroundColor #00ff00ff +nostyle id:max-bubble backgroundColor +state label:"Min price" none +nostyle id:min-bubble backgroundColor # Its own value, on a logarithmic scale along a vertical axis: a screen # reader's increment steps it by 1. prop label:Zoom accessibilityValue min=1 max=1000 now=10 text=10 @@ -3113,6 +3229,7 @@ covers [props] Slider.rangeClass covers [props] Slider.rangeStyle covers [props] Slider.thumbClass covers [props] Slider.thumbStyle +covers [props] Slider.renderThumb covers [events] onChange covers [events] Slider.onChangeEnd @@ -4676,6 +4793,19 @@ covers [nsh/base] moveTableColumn covers [nsh/base] setColumnWidth covers [nsh/base] setRowHeight +# base-rich-editor-table-full-width +tap id:case-base-rich-editor-table-full-width +# By default the columns fit their content: the table is narrower than the editor. +frame parent:parent:parent:text:DefaultA 1 1 79 26 +frame parent:parent:parent:text:DefaultB 80 1 79 26 +# fullWidth: the columns without a width share the editor's 300 points. +frame parent:parent:parent:text:SharedA 1 1 150 26 +frame parent:parent:parent:text:SharedB 151 1 149 26 +# fullWidth, every column sized: the first keeps its 80, the last takes the room left. +frame parent:parent:parent:text:SizedA 1 1 80 26 +frame parent:parent:parent:text:SizedB 81 1 219 26 +covers [nsh/base] TableKit + # base-rich-editor-extensions tap id:case-base-rich-editor-extensions tap text:RunExtensions @@ -4719,6 +4849,7 @@ expect Editable: false expect Both: threw expect Duplicate: threw expect Classes: starterKit,doc,paragraph,heading,blockquote,bulletList,orderedList,listItem,taskList,taskItem,codeBlock,codeBlockHighlight,hardBreak,horizontalRule,image,bold,italic,strike,code,underline,link,highlight,subscript,superscript,textStyle,textAlign,history,trailingNode,typography,listKeymap +expect Language: null rust true covers [nsh/base] Blockquote covers [nsh/base] Bold covers [nsh/base] BulletList @@ -4866,6 +4997,36 @@ expect CellD expect AutoTwo frame id:rich-auto 20 329 370 34 frame id:rich-capped 20 367 370 40 +# base-rich-editor-task-checkmark +tap id:case-base-rich-editor-task-checkmark +# Without the part a done item's box holds no mark, as before it was added. +expect CheckmarkMode none +expect TaskDone +expect TaskOpen +absent ✓ +# Its classes draw the mark in their color. +tap text:CheckmarkMode none +expect CheckmarkMode classes +expect ✓ +style text:✓ color #ff0000ff +# A style alone draws it too. +tap text:CheckmarkMode classes +expect CheckmarkMode styles +expect ✓ +style text:✓ color #0000ffff +# Taking the part away again empties the done item's box. +tap text:CheckmarkMode styles +expect CheckmarkMode none +expect TaskDone +absent ✓ +# Unchecked, the item's box is empty again. +tap text:CheckmarkMode none +expect CheckmarkMode classes +expect ✓ +tap text:✓ +absent ✓ +covers [props] RichEditor.classes +covers [props] RichEditor.styles # base-transition-shader tap id:case-base-transition-shader # Pages and a dialog with a `transitionShader` come and go as without one: @@ -5004,3 +5165,38 @@ absent No files expect Pinned files covers [props] Tree.header covers [props] Tree.empty + +# base-host-accessibility +# A component's host takes a view's accessibility props, as a view does. +tap id:case-base-host-accessibility +prop id:button accessibilityDescription Deletes the draft +prop id:details accessible true +prop id:details role region +prop id:details accessibilityLabel Details +prop id:details accessibilityHint Shows the details +prop id:details accessibilityState expanded=true +prop id:details accessibilityValue text=three +prop id:details accessibilityElementsHidden false +prop id:details accessibilityLiveRegion polite +prop id:details accessibilityActions activate +# The error line's text describes the details while it is there. +prop id:details accessibilityDescription Enter a name +listens id:details onAccessibilityAction +# "no-hide-descendants": not an element, and its subtree hidden. +prop id:hidden accessible false +prop id:hidden accessibilityElementsHidden true +# `accessibilityElementsHidden`: the host's subtree hidden. +prop id:hidden-elements accessibilityElementsHidden true +covers [props] accessibilityDescription +covers [props] accessible +covers [props] role +covers [props] accessibilityLabel +covers [props] accessibilityHint +covers [props] accessibilityState +covers [props] accessibilityValue +covers [props] accessibilityElementsHidden +covers [props] accessibilityLiveRegion +covers [props] accessibilityActions +covers [props] accessibilityDescribedBy +covers [props] importantForAccessibility +covers [events] onAccessibilityAction diff --git a/third-party/nsh/tests/compat/cases/core/App.tsx b/third-party/nsh/tests/compat/cases/core/App.tsx index 9e0262018db..15ba5972315 100644 --- a/third-party/nsh/tests/compat/cases/core/App.tsx +++ b/third-party/nsh/tests/compat/cases/core/App.tsx @@ -20,6 +20,7 @@ import CoreOverlay from "./core-overlay"; import CorePrimitives from "./core-primitives"; import CoreReactive from "./core-reactive"; import CoreClearSelection from "./core-clear-selection"; +import CoreSelectAll from "./core-select-all"; import CoreRef from "./core-ref"; import CoreResource from "./core-resource"; import CoreReveal from "./core-reveal"; @@ -52,6 +53,7 @@ const cases: Record JSX.Element> = { "core-primitives": CorePrimitives, "core-reactive": CoreReactive, "core-clear-selection": CoreClearSelection, + "core-select-all": CoreSelectAll, "core-ref": CoreRef, "core-resource": CoreResource, "core-reveal": CoreReveal, diff --git a/third-party/nsh/tests/compat/cases/core/core-select-all.tsx b/third-party/nsh/tests/compat/cases/core/core-select-all.tsx new file mode 100644 index 00000000000..8bcbdda7257 --- /dev/null +++ b/third-party/nsh/tests/compat/cases/core/core-select-all.tsx @@ -0,0 +1,26 @@ +import { Text, View, signal } from "nsh"; +import type { ViewRef } from "nsh"; + +function App() { + let article: ViewRef | undefined; + const selected = signal("no"); + return ( + + (article = node)} selectable> + Selectable article + + Selected all: {selected()} + { + article?.selectAll(); + selected.set("yes"); + }} + > + Select all + + + ); +} + +export default App; diff --git a/third-party/nsh/tests/compat/cases/core/script.txt b/third-party/nsh/tests/compat/cases/core/script.txt index 60558d49d97..0f375ff144f 100644 --- a/third-party/nsh/tests/compat/cases/core/script.txt +++ b/third-party/nsh/tests/compat/cases/core/script.txt @@ -188,11 +188,12 @@ frame id:inner2 8 8 374 20 expect Plum absent No plums expect Nothing here -# A viewport of overscan below the visible rows (100 pt): bound after the -# first frame, never further. +# A viewport of overscan below the visible rows (100 pt), and the one the +# list's start leaves empty above them: bound after the first frame, never +# further. expect Long 0 -expect Long 4 -absent Long 6 +expect Long 7 +absent Long 8 drawing id:sep-0 fillStyle #ff0000ff drawing id:sep-1 fillStyle #ff0000ff tap id:reload @@ -290,6 +291,12 @@ expect Cleared: no # Clearing a selectable view with nothing selected is no error. tap id:clear expect Cleared: yes +# core-select-all +tap id:case-core-select-all +expect Selected all: no +# Selecting all of a selectable view is no error. +tap id:select-all +expect Selected all: yes # core-ref tap id:case-core-ref # The signal and the function got their node when the views were made. diff --git a/third-party/nsh/tests/compat/cases/desktop/script.txt b/third-party/nsh/tests/compat/cases/desktop/script.txt index 40668fa744d..e7ad8748841 100644 --- a/third-party/nsh/tests/compat/cases/desktop/script.txt +++ b/third-party/nsh/tests/compat/cases/desktop/script.txt @@ -65,6 +65,9 @@ absent Document tap id:case-window-access tap id:overlay expect Result: overlay ERR_ACCESS_DENIED windows hud +tap id:box-none +expect Result: box-none ERR_ACCESS_DENIED windows palette +absent Palette tap id:many expect Result: fourth ERR_ACCESS_DENIED windows d expect a diff --git a/third-party/nsh/tests/compat/cases/desktop/window-access.tsx b/third-party/nsh/tests/compat/cases/desktop/window-access.tsx index 6c631f0506b..1ae4b00d140 100644 --- a/third-party/nsh/tests/compat/cases/desktop/window-access.tsx +++ b/third-party/nsh/tests/compat/cases/desktop/window-access.tsx @@ -1,7 +1,9 @@ // A case of the API's test suite (docs/dev/compatibility.md): the `windows` // capability, checked natively. This app grants four kinds and four open // windows at once, its first window included: an overlay (a kind it does not -// grant, and never granted unless declared) and a window beyond the fourth +// grant, and never granted unless declared), a window of a granted kind that +// lets the pointer through where it has no views (`pointerEvents: +// "box-none"`, the same grant as an overlay's) and a window beyond the fourth // reject with `ERR_ACCESS_DENIED` (`permission: "windows"`, `resource`: the // window's id); `currentWindow()` outside a component (a handler) throws a // `TypeError`, while `titleBar()` and `windowState()` safely fall back to the @@ -33,6 +35,19 @@ function App() { > Overlay + { + try { + Window.open(() => Palette, { id: "palette", kind: "popup", transparent: true, pointerEvents: "box-none" }); + result.set("box-none opened"); + } catch (e) { + result.set(`box-none ${describe(e)}`); + } + }} + > + Box none + { diff --git a/third-party/nsh/tests/compat/cases/modules/App.tsx b/third-party/nsh/tests/compat/cases/modules/App.tsx index 36d3c9abed5..3e7ea8e50d7 100644 --- a/third-party/nsh/tests/compat/cases/modules/App.tsx +++ b/third-party/nsh/tests/compat/cases/modules/App.tsx @@ -25,7 +25,6 @@ import ModIos from "./mod-ios"; import ModKeymap from "./mod-keymap"; import ModMobile from "./mod-mobile"; import ModPicker from "./mod-picker"; -import ModShare from "./mod-share"; import ModNotifications from "./mod-notifications"; import ModStorage from "./mod-storage"; import ModWeb from "./mod-web"; @@ -53,7 +52,6 @@ const cases: Record JSX.Element> = { "mod-keymap": ModKeymap, "mod-mobile": ModMobile, "mod-picker": ModPicker, - "mod-share": ModShare, "mod-notifications": ModNotifications, "mod-storage": ModStorage, "mod-web": ModWeb, diff --git a/third-party/nsh/tests/compat/cases/modules/mod-mobile.tsx b/third-party/nsh/tests/compat/cases/modules/mod-mobile.tsx index e681931ca69..c980e3f535b 100644 --- a/third-party/nsh/tests/compat/cases/modules/mod-mobile.tsx +++ b/third-party/nsh/tests/compat/cases/modules/mod-mobile.tsx @@ -4,25 +4,14 @@ // (`selectedIndex`), which the app sets, and `onChange`, which the // platform reports with the index of the tab the user chose. The bar takes // the frame the app's style gives it, as a native view does; its script -// checks the frame and the app's side of the selection. `SegmentedControl`, -// the system's segmented control on iOS: its segments (`items`, each -// `{ title, icon, disabled }`), the selected one (`selectedIndex`), which -// the app sets, `disabled`, and `onChange` with the index the user chose. -// `Switch`, the system's switch on iOS and Android: `checked`, which the -// app sets, `disabled`, `accessibilityLabel`, `onChange` with the value the -// user asked for, and the `accentColor` style it is on in. -// `DateTimePicker`, the system's date and time picker -// on iOS and Android: what it picks (`mode`), its value and bounds (`value`, -// `min`, `max`: ISO strings in the mode's form), `minuteInterval`, -// `disabled`, `accessibilityLabel`, and `onChange({ value })` with the -// user's pick. +// checks the frame and the app's side of the selection, and the +// `accentColor` style, which a native component gets as its `accentColor` +// prop. import { Text, View, signal } from "nsh"; -import { DateTimePicker, SegmentedControl, Switch, TabBar, isAvailable } from "nsh/mobile"; +import { TabBar, isAvailable } from "nsh/mobile"; function App() { const selected = signal(0); - const wifi = signal(true); - const when = signal("2026-11-17T09:30"); const items = signal([ { title: "Records", icon: "list.bullet" }, { title: "Stats", icon: "chart.bar", badge: "3" }, @@ -35,41 +24,12 @@ function App() { items.set([{ title: "Records", icon: "list.bullet" }, { title: "Statistics", icon: "chart.bar", badge: "" }])}> Rename - selected.set(index)} - style={{ marginHorizontal: 16, height: 32 }} - /> - {`Wi-Fi: ${wifi()}`} - wifi.set(checked)} - style={{ accentColor: "#34c759" }} - /> - - {`When: ${when()}`} - when.set(value)} - style={{ marginHorizontal: 16 }} - /> selected.set(index)} - style={{ position: "absolute", left: 0, right: 0, bottom: 0, height: 60 }} + style={{ position: "absolute", left: 0, right: 0, bottom: 0, height: 60, accentColor: "#34c759" }} /> ); diff --git a/third-party/nsh/tests/compat/cases/modules/mod-share.tsx b/third-party/nsh/tests/compat/cases/modules/mod-share.tsx deleted file mode 100644 index 5a901aae12e..00000000000 --- a/third-party/nsh/tests/compat/cases/modules/mod-share.tsx +++ /dev/null @@ -1,63 +0,0 @@ -// A case of the API's test suite (docs/dev/compatibility.md): `nsh`'s -// `Share` on the headless runtime, which has no share sheet: `available()` -// resolves false and `show` rejects with ERR_FEATURE_UNAVAILABLE_ON_PLATFORM, -// never resolving as shared. `show` returns a promise that never throws: -// content with nothing to share (empty text is none) rejects with a -// `TypeError`, a `file:` URL too, more than 100 files and a URL past 16 KiB -// with a `RangeError`, and a file no -// `capabilities.fs.read` grant covers with ERR_ACCESS_DENIED. Its script -// checks each. -import { Share, Text, View, type ShareResult, type ViewRef, signal } from "nsh"; - -function App() { - const available = signal("unknown"); - const shown = signal("not shown"); - const empty = signal("none"); - const local = signal("none"); - const many = signal("none"); - const file = signal("none"); - const blank = signal("none"); - const long = signal("none"); - let button: ViewRef | undefined; - Share.available().then((yes: boolean) => available.set(`${yes}`)); - const outcome = (promise: Promise, into: typeof shown) => { - into.set(typeof promise.then === "function" ? "pending" : "not a promise"); - promise.then( - (result) => into.set(`resolved ${result.action} ${result.target}`), - (e: Error & { code?: string }) => into.set(`rejected ${e.code ?? e.name}`), - ); - }; - return ( - - {`Available: ${available()}`} - {`Shown: ${shown()}`} - {`Empty: ${empty()}`} - {`Local URL: ${local()}`} - {`Many: ${many()}`} - {`File: ${file()}`} - {`Blank: ${blank()}`} - {`Long URL: ${long()}`} - { - try { - outcome(Share.show({ title: "Docs", text: "Read this", url: "https://example.com/docs", anchor: button }), shown); - outcome(Share.show({ title: "Only a title" }), empty); - outcome(Share.show({ url: "file:///etc/hosts" }), local); - outcome(Share.show({ files: Array.from({ length: 101 }, (_, i) => `/tmp/${i}.txt`) }), many); - outcome(Share.show({ files: ["/tmp/report.pdf"] }), file); - outcome(Share.show({ title: "Notes", text: "" }), blank); - outcome(Share.show({ url: `https://example.com/${"a".repeat(17000)}` }), long); - } catch (e) { - shown.set(`threw ${(e as Error).name}`); - } - }} - > - Share - - - ); -} - -export default App; diff --git a/third-party/nsh/tests/compat/cases/modules/script.txt b/third-party/nsh/tests/compat/cases/modules/script.txt index 6118e8f4e36..9d3ef5a6be7 100644 --- a/third-party/nsh/tests/compat/cases/modules/script.txt +++ b/third-party/nsh/tests/compat/cases/modules/script.txt @@ -108,21 +108,6 @@ expect Files refused: rejected RangeError expect Size refused: rejected RangeError expect Files: pending covers [nsh] Picker -# mod-share -tap id:case-mod-share -# no share sheet there: available() resolves false and show rejects as -# unavailable, never as shared; content it refuses rejects first, by kind. -expect Available: false -expect Shown: not shown -tap id:share -expect Shown: rejected ERR_FEATURE_UNAVAILABLE_ON_PLATFORM -expect Empty: rejected TypeError -expect Local URL: rejected TypeError -expect Many: rejected RangeError -expect File: rejected ERR_ACCESS_DENIED -expect Blank: rejected TypeError -expect Long URL: rejected RangeError -covers [nsh] Share # mod-app-settings tap id:case-mod-app-settings # no settings page of the app's own there: AppSettings.available() resolves @@ -325,18 +310,11 @@ tap id:tab-next expect Tab: 1 tap id:tab-rename frame id:tab-bar 0 784 390 60 +# A native component's accent, from its style. +style id:tab-bar accentColor #34c759ff covers [nsh/mobile] isAvailable covers [nsh/mobile] TabBar -covers [nsh/mobile] SegmentedControl -# The system's switch shows the app's value, in its style's accent. -expect Wi-Fi: true -style id:wifi accentColor #34c759ff -covers [nsh/mobile] Switch covers [styles] accentColor - -# The system's date and time picker shows the app's value. -expect When: 2026-11-17T09:30 -covers [nsh/mobile] DateTimePicker # mod-haptics tap id:case-mod-haptics # every call goes through; a name Haptics does not know throws. diff --git a/third-party/nsh/upstream.json b/third-party/nsh/upstream.json index 032680914a7..c9d016d8583 100644 --- a/third-party/nsh/upstream.json +++ b/third-party/nsh/upstream.json @@ -8,8 +8,8 @@ ".gitattributes": "5b726713760ec940939be03f63615784b502236264bec522ca05317571fe2ab4", ".github/FUNDING.yml": "d5f0aa8b254233fc42163f7c5018ce28a03c5e24710df6b0287fbc7d4de1b5bf", ".github/ISSUE_TEMPLATE/01_bug.md": "d1012ddc3cd3684fc6c5f6292ed98a4f61ce67f4bde22c7877b506330ea06520", - ".github/actions/cargo/action.yml": "17669e4ee0340c92803ff056adf0c3eb81207a778a27d90341ef190cc8d0c863", - ".github/ci/ios-build-versions.py": "e975ae3bcbfa5bcf09a85cc46cd943fbac5dcea339159ca9513c5f40fd44ccf4", + ".github/actions/cargo/action.yml": "bb308260699c41078e004158f5f6d91f888b284567d054efd30d24e36078b4f0", + ".github/ci/ios-build-versions.py": "f68473e3a15a5509813fdfef3731791d6689906118e82e39cecb7281f214772d", ".github/ci/paths.py": "1debf0fbcd8bbfc98fd9c09580b83e22bb21101b013aea5302a02ba403b3d963", ".github/packages/homebrew.py": "96dbcfd62c5230f7da3363fdfd23cdf5a71d18838140e023f40a99b4b54fb0e7", ".github/packages/nsh.json": "7e795bf692a2156560a3bd0a557deff75615032c3a75e9fd49858554ee5a3fa9", @@ -24,76 +24,77 @@ ".github/workflows/gpui.yml": "8269d5e674c2f521e774e89adb14fecf38f3d6099631a82fd6e1f150edcbdcf8", ".github/workflows/linux.yml": "5a5f4cc260fe203fc89f11140312f6bf10dedf06a3cd3f072fbcda68b5e841f5", ".github/workflows/macos.yml": "6cbeadbcf1f09a6cfa70c0f49cfd12b529115f59a2c0dfd9da3a0263cc399ebd", - ".github/workflows/package.yml": "a1746c21268876b5a6779d37ec580c023f77131277325511065cb948b9639633", + ".github/workflows/package.yml": "360427cfab4720502f5f6b7b8cceb52b73ac60a8b5ac014547fe01dac384e148", ".github/workflows/packages.yml": "5fae77b7cebb2b6d0fb24cb5291fbdbec188332ac654b1cd4af7882ba307beee", ".github/workflows/release-crate.yml": "b91d1243854789bee7ec1755d5b523b5f56781fe85eee8d66b903f82c6318162", - ".github/workflows/release.yml": "c09322bfd44dbc013bf9d5b94689ff62876a8d06b1c9adb60ef08b953d2fe579", - ".github/workflows/rust-app.yml": "45872ad6527c48d2b2716cb5e9b72c0d9fc6434e95f2b9cda91dd3556f081bf4", + ".github/workflows/release.yml": "ab804b073a2e9b266f4efabf6a6ea58804db469d1312f2e6bacf499803666cef", + ".github/workflows/rust-app.yml": "37db15a3807577713e324606bbea9a2bdddeb36cbe597297c87f7089a4ea42e5", ".github/workflows/tui.yml": "d63a8f3c5f4f06034809029fe129443be2bcb715e59708e146a3f0163ab545dc", - ".github/workflows/website.yml": "84f7df04c8563fe243b8934c26f856ee19b42b011512903617ea63fba32807dc", - ".github/workflows/windows.yml": "093e1e811f4fadc081605e05fa4201da795f7d96fb17637aba8cf834cb4b0160", + ".github/workflows/website.yml": "8a7b38d41d9c20e62e294a6b28b56cae80b559b4ffa9f71f1d98db8c0279dd63", + ".github/workflows/windows.yml": "1ab22b78f3e7a0aeae2afbb4f790bf59e567886df899a3d6b188bb7f88e0ac5e", ".gitignore": "09f8ab58f988ed6ac0047bb8d497cdb6a3cc8af3af02a676f6e39a31addec242", ".rustfmt.toml": "3e2351e140d029ca8104ed001ae088b8041aaf2e5d9606d5ede1807a986740da", - "AGENTS.md": "41419a38532be6b7050fa1f011af41d993bc53bd25f2f7348d0ac0d47cd130e5", + "AGENTS.md": "28b0c7536171676cc3d8487837a60992c4a6770cb9c267895a1f40b0d77fed2d", "CLAUDE.md": "336cc4fbf19beaada7ccf9986414fa91851a8d7a07dfb3ccbe800a69eed0ab49", "CONTEXT.md": "adf6539238a8ba73b259d3b2e9675d86bcb01fc55dda0bc30eda376c38f27fe4", - "CONTRIBUTING.md": "93d0792014ac922da4df1383462b4b13dd898acd36d250da7c593daed2adfc27", - "Cargo.lock": "63bf77efd52f28007f0d2e419c78ce180965da6769c979d94f4c5a9b9c18d0fd", - "Cargo.toml": "4e9d00bc752bb21edeb3de1397e5966d9d16542f923cf84eddc6625918f1a409", + "CONTRIBUTING.md": "aa5f89b05428b20c1c30b77bfc801f9e7baeefe1fe22f442108dab82d71f8041", + "Cargo.lock": "cb02e9407ea211f6cbed4779d23fb76d8ddec66329d7dbfaa59bf698a77fabe8", + "Cargo.toml": "d275b8e204b0c24c776ec9be0df32785bca993682bc62ed9470aded8e9d770fe", "LICENSE-APACHE": "ec75427ad955e3c740f22e7dc3f6db6fc5b2cc1d9135c2af91cece8dd47a2d38", "README.md": "8845cedddb5e11912b6809e611d5f03b1e35104f64a5e24539e99a106c5e030a", "crates/gpui/.cargo/config.toml": "5a1d7d3574a4c7ca0d894a26b0fd71d0fb2f42c85552af2c1539060148f2a1bc", - "crates/gpui/Cargo.lock": "d0adad86e15a353d47afaebbcdd216b819dee11add0f426f6e1568ac125b5f15", - "crates/gpui/Cargo.toml": "111bc502cfa05aeb47a4e3de6a01d0cc7f35729e6ed719c76a27aff9770a602a", + "crates/gpui/Cargo.lock": "316363c86ec7c242cb22b835bbc0ab628f71ee206157319eadcb731712c03933", + "crates/gpui/Cargo.toml": "aa93ba69528cc940d9df8c9530b9da8f4d5583bf373a9d57adc3c62dced319aa", "crates/gpui/nsh-gpui-host/Cargo.toml": "cd2f612df8a19ad9d30097e25fdc701fd60e05a36e56f916e5272a66b83f48e0", "crates/gpui/nsh-gpui-host/src/lib.rs": "5367a30898f23eee919b0c64d7bf721626c68965d8d33ae9a1f440141f061523", "crates/gpui/nsh-gpui-host/src/main.rs": "1b64d24a064494b588fdb926788eb609a91aabc4543fc4a30b30b6b2d616b391", - "crates/gpui/nsh-platform-gpui/Cargo.toml": "dd2f73b141cb13e546ece6a480648396b1999a4b0c074e87f78697659a4c525b", - "crates/gpui/nsh-platform-gpui/examples/embed.rs": "6931e470b2015ba59eebc08c9ba77213b975123f77280dc523a063a7d9dda38e", + "crates/gpui/nsh-platform-gpui/Cargo.toml": "591c308e65c094ef79e2bb112635074b5e5fc0c90166453a6f622033089020a0", + "crates/gpui/nsh-platform-gpui/examples/embed.rs": "febc4bc10d49dc2585d4873b2282169a77693966a548fe94582e8b53c0ea44b1", "crates/gpui/nsh-platform-gpui/src/access.rs": "a40b747011066abfc8bb2d414b52bc29e937a1d6e4eeb58f1500b1cd64250c6f", "crates/gpui/nsh-platform-gpui/src/agent.rs": "d3113226a400b7d07f32d5c4c572147ecb7cf180aa9bd2ecbf208009ad7dba23", "crates/gpui/nsh-platform-gpui/src/animation.rs": "6720d73826f95b95f5bdf9dcc29173a43c88d779d42011455248ecd2f743c0a5", - "crates/gpui/nsh-platform-gpui/src/app.rs": "771812e0dadbfe7df8bb67cdd0e844a5726c8b069befec8c48890d8976ec2867", - "crates/gpui/nsh-platform-gpui/src/canvas.rs": "5d91093378d1bad3dcc140630d04146ed3f9a4480dd057d8a77fd36027a082d2", + "crates/gpui/nsh-platform-gpui/src/app.rs": "814720baacc9bb086c46af89689986e4b20406329c2a0a18c39e1e49f53ae88f", + "crates/gpui/nsh-platform-gpui/src/canvas.rs": "a85e804d62672cd87e50bf226105140f9c44fc35cbd372e4bebeb4fd93ce84d7", "crates/gpui/nsh-platform-gpui/src/canvas/offscreen.rs": "565e272d3dabfb7b44be8f1b2b67649a380236f89ff57f2f487c0b61669aae79", - "crates/gpui/nsh-platform-gpui/src/chrome.rs": "f817c755a8d829f946d247324e2726d429de6b24ec037351b94fcb2b7aee26cd", + "crates/gpui/nsh-platform-gpui/src/chrome.rs": "fac6b98082eb43af9c95a333ed029be696dbaa4db7e66c0b1533fca2064b91f6", "crates/gpui/nsh-platform-gpui/src/chrome/menus.rs": "aba2c4dcab08eb85f147cc80864166a508987c140992460a34e261a0180ec861", "crates/gpui/nsh-platform-gpui/src/decor.rs": "9b77fbd54112d8fecd14c356d74d4723fd1d9c83275b1d5a60bc50c5793ec05d", "crates/gpui/nsh-platform-gpui/src/decor/gradient.rs": "23e83534d3487eaea5be8865d3b5079c36b0dcad0a17281aa2be9fdf25d693b4", "crates/gpui/nsh-platform-gpui/src/decor/shape.rs": "4bec3060c95d020c634739f3b40c99d21af91168201ad4fc2ccb1037a6995748", - "crates/gpui/nsh-platform-gpui/src/dev.rs": "06999063b945e2fcfa362063c9d8af6969b94136b577009818b99d7c299e163f", + "crates/gpui/nsh-platform-gpui/src/dev.rs": "faf559fcd9c885437190e5294ca85b7935f636bdbdd1373f0ebffc6ce1fd667f", "crates/gpui/nsh-platform-gpui/src/events.rs": "f840f095869932d9e590b14b4cb8a3c868e2870186f8daa971678173b1776f87", - "crates/gpui/nsh-platform-gpui/src/file_drop.rs": "fce40f26115a04fb50807ea6a3b6f2a0bcf278f5231c0539090843ea4b7b92e4", + "crates/gpui/nsh-platform-gpui/src/file_drop.rs": "e58b20ede5d268d20ec04d10dbd7da4b263b2d0d49b81aa07a164e0145e28843", "crates/gpui/nsh-platform-gpui/src/geom.rs": "b7e7506fd30ce592611eec0901eda1c6cdc69fdb5ecab3df623ab4546f4ffeb4", "crates/gpui/nsh-platform-gpui/src/image.rs": "f047d19d6c7f01512eb277111fcb349a196582fea5063361549b174a1c16861c", "crates/gpui/nsh-platform-gpui/src/image/turn.rs": "17583a999175699ffaa4fef147d1a870112a914c19061585b1e7d0de94aa9cca", - "crates/gpui/nsh-platform-gpui/src/input.rs": "66d7c54f519c54bc2a3a14ed8ca9485f221fee232a84d2b598f0850393e58449", + "crates/gpui/nsh-platform-gpui/src/input.rs": "6c239fd1dd6e5856122e8a3933ff0bde786bfe80525c3b2c42f6f8a3d47d8aa7", "crates/gpui/nsh-platform-gpui/src/key_focus.rs": "1b0cfa0784b4657d8fa5835365c1ef9dcc2c4cf2f94f053068bf9bcc8225d017", "crates/gpui/nsh-platform-gpui/src/keymap.rs": "a6492e838afb33a4f427a445fdb89351d77fbf245ab4dbf057aadb454d444b3c", "crates/gpui/nsh-platform-gpui/src/keys.rs": "e5eb46d0810a3e11f6b799f6693ffe65397bd96badc168f17af3ed4d7c1d0305", "crates/gpui/nsh-platform-gpui/src/lib.rs": "481cc4ad9f4730d7e9e8c83f1a2d6c5e92786d2d0e4519aa56395105873777d6", - "crates/gpui/nsh-platform-gpui/src/mount.rs": "274e5b2c9ae331df1aad17cab0a8465a90a33951ad1dadfb3586c00fefcbdc2a", + "crates/gpui/nsh-platform-gpui/src/mount.rs": "d37105e9529694281b215305cbc8a97974dc6218e514967dea02c7f35eefd29f", "crates/gpui/nsh-platform-gpui/src/native.rs": "7c2b70856430cc6525f51a099eea54eb3ab8e7aa71e455d9b3ce11297cc1b3ec", "crates/gpui/nsh-platform-gpui/src/native/video.rs": "7d83517425dacdc1d05d369663fce2254751b22568e2cb16fdd0c2322930f879", - "crates/gpui/nsh-platform-gpui/src/native/web.rs": "fe7b1b74856455aad3dcabd06d77b97d8bd826ecb7a55acfebf6c4d1a48a2908", + "crates/gpui/nsh-platform-gpui/src/native/web.rs": "205fecea27e7bf6c590c95732e7c8ac41e1bd5c69108229466ef766ce50069f8", "crates/gpui/nsh-platform-gpui/src/navigation.rs": "5c46efc8b5d949199c87ee41a6ec91131dd771cc53334ae7abd74a5f903e161b", - "crates/gpui/nsh-platform-gpui/src/render.rs": "69fe09889c76da7ec712cfe216e0361567ba2aa6bb8ffd9166fc52c616ccbe2e", + "crates/gpui/nsh-platform-gpui/src/render.rs": "7e249e8acba1c1ee9ef19015f57c9c6119919d45d287133e1147d06c6b64dbaf", "crates/gpui/nsh-platform-gpui/src/rt.rs": "c942e98681f6c74acbc36440b8e98fb1e124863aff2417687d1172b05ff14ac2", "crates/gpui/nsh-platform-gpui/src/scroll.rs": "b0b0597d38fb4be8b1f23ef5b697d593e0233cba3c07f45efef4d7ccf06ed7cd", - "crates/gpui/nsh-platform-gpui/src/selectable_view.rs": "287cf2aaa637891b8954b8825c81e6a54614cc467743a7ab63f45d27dee6d2f2", + "crates/gpui/nsh-platform-gpui/src/selectable_view.rs": "a4794c4f4da72a818f539fc468e0459fe16f87c35cf00b521ac3a60c5f245dcd", "crates/gpui/nsh-platform-gpui/src/shader.rs": "978f53a2a6df02f2a0f1aad63d64f29bd8d49f360b006040fd035c13f6f7531a", "crates/gpui/nsh-platform-gpui/src/stats.rs": "a66a9ac8464f7ab9dfeca8fbf17d56396fbe0955a4113ba9e732821d7952931f", - "crates/gpui/nsh-platform-gpui/src/surface.rs": "1a46b564eb843287816f0d98110ede5e1c35d2b7efdb9c20fdea57c76ae5fa40", + "crates/gpui/nsh-platform-gpui/src/surface.rs": "779dff4be4da5606b3c062b8bdf2f6e788592c6daca9a601aa55f5a70e60edf0", "crates/gpui/nsh-platform-gpui/src/synth.rs": "c26f674c5a604bb01ee66e9ad208eae3c1d737c663cb26a7dba0dcafec9b0fc9", "crates/gpui/nsh-platform-gpui/src/system.rs": "884dcb82e3fd2bc67b9bc34fe0a9470c4b2685ec8c02acfa07f5a32071ccdbfe", - "crates/gpui/nsh-platform-gpui/src/tests.rs": "d47afab1c33c61c10a9a5584b32a7516154260a0a475d4f7cd307c795bd38e8f", - "crates/gpui/nsh-platform-gpui/src/text.rs": "5945651b4fad32fcb8a1d462216c221b62b389e7411555123af2c8a63e6a927b", - "crates/gpui/nsh-platform-gpui/src/text_input.rs": "d289d6e14acb897e4cde6f027f843e8947c93d8542f80fa0c5756b569110893e", + "crates/gpui/nsh-platform-gpui/src/tests.rs": "e4ec5f356b47b4e5a6686f71a087e53367b4d56ad787c529eb923a5be9966d8d", + "crates/gpui/nsh-platform-gpui/src/text.rs": "b87e99c396dcbd4dd305b474e0e2a93eab87ecec7afcae0ab4ea3eec8b849349", + "crates/gpui/nsh-platform-gpui/src/text_input.rs": "1964bc6a5dcef0c9f905597f1b150cadf6fb2a260239bc7fe3c0cbb778b0ff42", "crates/gpui/nsh-platform-gpui/src/text_input/layout.rs": "52c64fec26104655c00ea95e3ce0a526da0c056ba9ab80cb7d961540cd1bb07a", "crates/gpui/nsh-platform-gpui/src/transition.rs": "cc484a107495eafc64e999d8a6ff933cd5923b867a95058cb6d98626b37423cf", "crates/gpui/nsh-platform-gpui/src/view.rs": "a7b050a6898981423d5d85db40c6d000c63d662bbf94f717c5d4f6837a0c4bfb", - "crates/gpui/nsh-platform-gpui/src/window.rs": "b39915f570c3382d33e457fb06e7bac5ebed3f9db6496ec42b0baffc9d2fbe36", - "crates/gpui/nsh-platform-gpui/src/window/native.rs": "2a121072f0e408abc4ca6c81618c25ffdfeb62464aeddd9535ffd9fc388125ca", + "crates/gpui/nsh-platform-gpui/src/window.rs": "01c7d7e8c836c96844aa8f9167dffebf3fa3a66c52b641012bbdc21c0ce7cd41", + "crates/gpui/nsh-platform-gpui/src/window/box_none.rs": "5242f211faea7dc418175db362c9f48a8cb1bb0a6e04bc3ad911b190a7a7ebc6", + "crates/gpui/nsh-platform-gpui/src/window/native.rs": "20eb7c76cd0cc18e71caf6c1f5f75e450fce6cfa6782d3bd41a4ceac85193baf", "crates/gpui/nsh-platform-gpui/src/window/screen.rs": "f742bccdec718f7c2e5497527ecd344f737a8924831723f47917339ec772cb7e", "crates/gpui/nsh-platform-gpui/tests/render/main.rs": "6cf6a9fdb77f08bb379c97246802303f5111837771cc08dee3a977db3a96408e", "crates/nsh-base/Cargo.toml": "447868f67277a24c11a226249258e7a199450e7a0eba87a4e0ab39a1aca29375", @@ -104,14 +105,14 @@ "crates/nsh-base/src/autoscroll.rs": "6157360b7048fc2124e880cbd3c5eca2d56378145dbe7dcdf3ae670c6c21a3be", "crates/nsh-base/src/avatar.rs": "be88926b280177f528ad1c324e9010952ac1df7fea9256327d14125ee29f54b3", "crates/nsh-base/src/button.rs": "0156805016409ba78e7a35369920552e1944a9caa62acbddb99dd870d0fe43d6", - "crates/nsh-base/src/calendar.rs": "1f3f8083b60b3b314a790925ff52986e98b4b9796f2f56b02063203fd406a6c3", + "crates/nsh-base/src/calendar.rs": "656bf708a5eb9afddc2fddb9ae5d65a56a3a4f6f33436c92136fe6b6401df8e9", "crates/nsh-base/src/carousel.rs": "6af03cc28d88c0949ce8611c5c3dbccd00187cb9323c4048ecf037ad6410a78e", "crates/nsh-base/src/checkbox.rs": "985a7d75c479d76428b0582b53445e7b6a4fa17b33d63d110b1b20721ffa58a8", "crates/nsh-base/src/collapsible.rs": "c5d7679d1de820b2ff83c304acf4bdd9dec95fa3c7d72efa1d14c1cf3f7733ab", "crates/nsh-base/src/color_picker/mod.rs": "ce7953a59f00a046670ef5685c1cc726e3715e63349923a288bbb4bd27caa03d", "crates/nsh-base/src/color_picker/model.rs": "33bb459aad2658a1b1543e369a99c870d27fd3d53dba761cc93dd077e5e4b877", "crates/nsh-base/src/color_picker/tui.rs": "327583d5264c62d4fef9621a7d3ef4de1804385d76e2603757302cac229737d9", - "crates/nsh-base/src/combobox.rs": "4f9d9b697a4636d850be0ab2b227f8581514340593efb2aa85cf073b02881ae2", + "crates/nsh-base/src/combobox.rs": "8e8148a53afc1d54e5bb7c5c1d71f0185da4e9624869c20a646753602d8568a0", "crates/nsh-base/src/command.rs": "8f4fcdd7570762a0026b98d14ec190abcbb7e7ad76745d5b7d3619e133ba5f29", "crates/nsh-base/src/data_table/axis.rs": "b3fa541a1f81c582fe889f6ca83220021db400b993e6613ccd8d219a7323a247", "crates/nsh-base/src/data_table/columns.rs": "cd172e02c374270805e70b3016c579f968fba4a7db74c1b90d34166c2006518f", @@ -120,8 +121,8 @@ "crates/nsh-base/src/data_table/mod.rs": "ebf85b771fae658028c00f49879c19db6d8a4c4325ee87c68d1b04441661d388", "crates/nsh-base/src/data_table/parts.rs": "95c53a20ae540aae7a6948c7f944cfe9226714101843f60c8dd036db031be99e", "crates/nsh-base/src/data_table/selection.rs": "fad44d1d73a6085aa205ce07c99c5fd8b7a5bd2ecf54f7fcaf7321240772858f", - "crates/nsh-base/src/data_table/view.rs": "18aa1757e9d1bcf3de32084034d59993dc67d537547d6f75cbaf8f1602023aea", - "crates/nsh-base/src/date_picker.rs": "b40d4329f5e38d0270dbf3e1d76561261d04f037007a811f13bf5f59ba5fce70", + "crates/nsh-base/src/data_table/view.rs": "4c04f1ed96169310df3cac7ddd2b6ba55e170f24d9f83de798e352c2545f753b", + "crates/nsh-base/src/date_picker.rs": "731449a1c7498c52bd6eef0588f86d7c929c98559bb23f0e4bf411102d30952b", "crates/nsh-base/src/default-theme.json": "8792c42d1057a7472b07062609061216ab3ea0b7137b853fb88858f78701320a", "crates/nsh-base/src/diff/controller.rs": "5de205c06e605920c864982fbfd59013c307113b17d5efde38a1b95a6076d567", "crates/nsh-base/src/diff/files.rs": "423e56955853a518efe9123202ec5d172047600bec28682a1565a630e6a29dc4", @@ -134,8 +135,8 @@ "crates/nsh-base/src/diff/review.rs": "e7ccfdfa168f13539fbf6703d26b4c3aa711abf7f8bd98a4adf5835b53418af4", "crates/nsh-base/src/diff/view.rs": "e94754bc2e86bca79f3394cedfde467b65250679a27155924366cf798897a929", "crates/nsh-base/src/dock/area.rs": "93b20762c9f3f9fce24924a639603f70a252ecc44f0588a7d0cc25fa8c74a31e", - "crates/nsh-base/src/dock/compact.rs": "33d46de7b2e06aed309a472c5bdfd46e5195a92310ac3a2c9ec3c0d74efb60cf", - "crates/nsh-base/src/dock/dock_area.rs": "98d95ae06fdd5feea6950d4832b18b95ca44fc7a0de06d838cece2191a7fa3ea", + "crates/nsh-base/src/dock/compact.rs": "d11f6697133dbf71a5f319eb055076ddbf4a367de44fe1475a5c548defcce621", + "crates/nsh-base/src/dock/dock_area.rs": "3599dad95bf565d1a80f838c830c0bcf3c214cda9ead34c4bd164831c2adb8bd", "crates/nsh-base/src/dock/dock_placement.rs": "7f4d1446913c0bd4c8c1370776f8b6105f43f5c7160e80f586eda2db71984333", "crates/nsh-base/src/dock/drag.rs": "cb71e56d9c38fe703bc59f67ff6b2f2514f9ea6076a225e19e6f0caf7d7ca0b2", "crates/nsh-base/src/dock/fixtures/bare_tab_panel_root.json": "3e6a100a3870a5b2aeac1d14eb312432515cc9ae529253bf9be13e8c48179e04", @@ -153,7 +154,7 @@ "crates/nsh-base/src/dock/mod.rs": "b905abe9e81f0644941374582df10cd55b8bd88b0664dd815505cf618a976a00", "crates/nsh-base/src/dock/state.rs": "cacd1b94610069f5e7fab6868b75c3cb86861ed60fc5bbf4e49e4bf038b19ade", "crates/nsh-base/src/dock/state_convert.rs": "3fd3d0fb3a7f8e66478aaa82a38fedca60f41ea31a67cd1fd32e06ec84e787ac", - "crates/nsh-base/src/dock/tab_group.rs": "3bba5f82f9848b7a3d1847e7be058fbe2f814a3b37d355278189015c72996d06", + "crates/nsh-base/src/dock/tab_group.rs": "61a1f1273b559c3cd3806336edd805d850eef8f6077668ff739c7c4d5f7e3b8d", "crates/nsh-base/src/dock/value.rs": "424be4a73ffa43d578d474af6a13e9975b0b1583052c49c6b7a5dba3ef5d6009", "crates/nsh-base/src/dock/value/tests.rs": "d3077460e7855989e43c490df83dce0b830701f6ae13ece403dfd1d900443112", "crates/nsh-base/src/editor/app_highlight.rs": "052cd12983da940c2721c4d8566ee9614e628f64a0d1f5deace6e6807d91368d", @@ -194,17 +195,17 @@ "crates/nsh-base/src/emoji_picker/mod.rs": "7a64bb35d46a1dfcc21cdd85e2e3b42f28dc982e429f8effdbe53dfc85a6f372", "crates/nsh-base/src/hover_card.rs": "8415d09b59cb946d41f700c969a77fc12d3e1ada8f0ee5fcadeb4c4723427f62", "crates/nsh-base/src/keys.rs": "15e4d03c9dd036c36751e92eb8645abe322ec8c7c67ee52dbab6c29d8c17d57b", - "crates/nsh-base/src/lib.rs": "edd263f01e0953a58d8c3a77ea8b8bf5bd136890c0c8441efb7911c0cc73b6cb", + "crates/nsh-base/src/lib.rs": "2acf3e2c4d32409cb90f00dedbfa0f70f26a69a6c923d251f5d5189577a7684f", "crates/nsh-base/src/link.rs": "66014364bf132cb265a4af398a19054ac1309a3bf534f3ce038655003c54e8db", "crates/nsh-base/src/link_hint.rs": "f1ddd0448199d7ae9d9841701cf548877d8a47767c393a4fcf1cdd0607b21d34", - "crates/nsh-base/src/listbox.rs": "b80efe7c21068279088433dba051cbeef19da23694f7b741a4a7e181117e6cae", + "crates/nsh-base/src/listbox.rs": "d6e48ca3af1d7c4fbdef515a525864b2642f691c728cb61818cbd75d459e4ef4", "crates/nsh-base/src/mdast_tree.rs": "f17a941e38560ea25d3661f0b031e95d2205360d37979c6c9ce4f88bb9b9f737", - "crates/nsh-base/src/menu.rs": "5ffced259822922d9adc146321be56d6b6d61b7cdb266cfc5506c481d25c53ba", + "crates/nsh-base/src/menu.rs": "2fd5c63779a0337e74ccde59fc190d583f4023111213bc67d1857843e57e9077", "crates/nsh-base/src/menu_button.rs": "610142d44e6ef70fa03b76730d4a954335bb13ad713f2bc8b0c0667d35e21e8e", "crates/nsh-base/src/navigation.rs": "253b9eeec62210eb944f78328fe51dfe0860a3e4c660986a69e831d2ccd72e9b", "crates/nsh-base/src/number_input.rs": "18c4dc66a4f87d3d579d25122a177a2b027fd288192029e71dc3bc7dbc869b42", "crates/nsh-base/src/numeric.rs": "d8560ee6513cb4241d3d26dbe9a45102e2fc50f96a6b7ff178e54ae87d39e636", - "crates/nsh-base/src/otp_input.rs": "2a77f53c06d6556d06c1a8d25157c01dae0d5a809e42a96f5cd8900d3ae8e4b9", + "crates/nsh-base/src/otp_input.rs": "174e9d5d801ae986c991c7179023a73ff51760b5a6f59b7063fc501956101702", "crates/nsh-base/src/pagination.rs": "2003897f58dea6cc16ea1eec353a34eb9ca52c3d7f95557075bf0318d2e8b958", "crates/nsh-base/src/plot/appear.rs": "0a404849c8beed59767ceb209df936b7f3081512a695964f89f8ff803dc6a201", "crates/nsh-base/src/plot/area.rs": "414ee2bfba6f7ea90a8435261bd294542714ecba6a6e1562712d729168633e77", @@ -233,8 +234,8 @@ "crates/nsh-base/src/plot/treemap/mod.rs": "a98f4dbbe3cbc2ae9806be77d32392834872262b753b696605b74730f754c626", "crates/nsh-base/src/plot/treemap/pose.rs": "8c7841a1e3d63dcda361a4167259832609828ff6cb16d05d4283079e96dd1cad", "crates/nsh-base/src/plot/tween.rs": "e1fede84aa96b277f2227e65bb753907218d7275fa8ae0bfa50b7945910cfcce", - "crates/nsh-base/src/popover.rs": "f11b62863603bf668b5dc12a8c10aaeb5ca4f516211c35688dbbb2bddb6288a8", - "crates/nsh-base/src/popup.rs": "52977ce8343b2b5fd79ea2ea71ff6731f064da61e10aa13c257d5b106fda1e87", + "crates/nsh-base/src/popover.rs": "e67b396ec774f09575e4f90cb64499f41b22ebfe34d3440a0051fb1c8d40f0ec", + "crates/nsh-base/src/popup.rs": "103bb8680f40a02c4e88b55b73b6505c664e994827a89728a3faa3fd4d95463b", "crates/nsh-base/src/progress.rs": "a5eeb90cbaf44c3cee9c9e91b8a4da24e8ddc855ecae9471656c5984b57980f2", "crates/nsh-base/src/radio.rs": "94710ebbf3918b083c8f2c129bece4c26104206d389780ac1dace743c42ce711", "crates/nsh-base/src/resizable/mod.rs": "3aa5f2e3772a9aad010ac2f80f3ab5a3338f438d0b7ce80644d44938ba54e6d8", @@ -249,14 +250,14 @@ "crates/nsh-base/src/rich_editor/commands/tiptap.rs": "c0cc448fc998e92a9d61a7b11e9d4fdcee732d457d2b0ad129535693116121e6", "crates/nsh-base/src/rich_editor/extensions/character_count.rs": "d5b701094aed56a09a585a956c903f178ace715616cf6e6b7906c042efacd3a2", "crates/nsh-base/src/rich_editor/extensions/clear_document.rs": "74b9014fe38e165e900d835a87fee73693f4261de6993fdfa80e36e96e724012", - "crates/nsh-base/src/rich_editor/extensions/code_block.rs": "dc7b9ad8a8a7e9d6f353eb7bca78c28e91b6aee4980fb0c09fdb64771b13e547", + "crates/nsh-base/src/rich_editor/extensions/code_block.rs": "56982021bc1e7b72551208298c8dc40052c7ed2f7e1170b61190751001ce3dba", "crates/nsh-base/src/rich_editor/extensions/core_keymap.rs": "2a223b8ea193d8cc10ed77df52a42c5a018699f4bf67354c3748e8b3f8953888", "crates/nsh-base/src/rich_editor/extensions/extension.rs": "427b64fe0514f29eeeeec4937b8dcb50f09152185883ab68f27f04338c4d20cc", "crates/nsh-base/src/rich_editor/extensions/helpers.rs": "15ac08ac72a62f2a683e0846d23430383c02e77651c476fec2fa55e6915498e6", "crates/nsh-base/src/rich_editor/extensions/history.rs": "41bfc6656f4afe273d0e2b5b796da9a2aaa360e072dcba055992047f2c62be53", "crates/nsh-base/src/rich_editor/extensions/input_rules.rs": "b502d5032ab420a34bff4baa0fe5375af902d792dc81f8ea6efbff1a5bc39166", "crates/nsh-base/src/rich_editor/extensions/keymap.rs": "d2a55163828cc04620e13b0f9a24892f3c964705869b0070adfd10dc53e2925c", - "crates/nsh-base/src/rich_editor/extensions/kit.rs": "c21833c522150d8259d253c79c272b46c7df56e28d7368b0b5f64ab533181312", + "crates/nsh-base/src/rich_editor/extensions/kit.rs": "603441170201d9271e41fff56105f0c04384458c05dd1e83d5dbc430104a878f", "crates/nsh-base/src/rich_editor/extensions/link.rs": "0ae8a3b06b56ff68b0952ccbe235643a9f523d0e2f579a723ca6a43f4df3a608", "crates/nsh-base/src/rich_editor/extensions/list_keymap.rs": "1014f53b35828ad8af87d8867ce0e1798b150598875c662405ea7dc8d20e3828", "crates/nsh-base/src/rich_editor/extensions/list_scenarios.rs": "95ed8867e93022c08f38a7c2c30810091abb8f62c64733ef2ec9998923c4735e", @@ -276,7 +277,7 @@ "crates/nsh-base/src/rich_editor/formats/mod.rs": "e7c35f2dc182bc8fa094651f23d0b6774d3db75070bb703a9f35eaed484e52d6", "crates/nsh-base/src/rich_editor/formats/text.rs": "20b28ebc19eacdb7a7c10b586d383001a28aca8ad894effe55bbff98315bb7f6", "crates/nsh-base/src/rich_editor/js/commands.rs": "92453eeddf21ee3efeaaec734cf608b04b7a54683c33ab8d0115de0251ba1685", - "crates/nsh-base/src/rich_editor/js/extension_api.rs": "bc327105aea8d26670426c47268628331ea71c4007813459e0201ab04ecc902d", + "crates/nsh-base/src/rich_editor/js/extension_api.rs": "bf391dfeac7cbf18e3b9eb7b91738f2e4987e57f02be30d0e463ca67bc503cb7", "crates/nsh-base/src/rich_editor/js/extensions.rs": "78cc462a7ee174cbda3186100e26868ec4b21562ba784aff8e3a63733089dadd", "crates/nsh-base/src/rich_editor/js/json.rs": "2d32a7cb7ca12df04059c0c3c67aaa70c043fab9f680a09eeb4c2a9a26ca7662", "crates/nsh-base/src/rich_editor/js/mod.rs": "5647464c556ca9b4897a38c298935ea2af04947ebc6e40034c36722981c30661", @@ -307,7 +308,7 @@ "crates/nsh-base/src/rich_editor/tables/fix.rs": "2bd17eb5f95d2799aba430d39008b13be85094bad2bd4903dbd15ca98e6b4009", "crates/nsh-base/src/rich_editor/tables/map.rs": "9eca73110a2adc0eab5e5ee534135568bf05b9110946a2626026a5e35754b7dc", "crates/nsh-base/src/rich_editor/tables/mod.rs": "84539523cd513d91a8402fb5d93b4ea38b1ba887c525310d0104bbe26e01c5a3", - "crates/nsh-base/src/rich_editor/tables/nodes.rs": "66fb218e97dd98827f866470a94c7a1ce640e754b8ad81fc3b765c9287c4a516", + "crates/nsh-base/src/rich_editor/tables/nodes.rs": "0b42c0a25419bdf43a716531aa11a4d0686221f86a1160fc5ce2daa44917d630", "crates/nsh-base/src/rich_editor/tables/util.rs": "eed6baf2d116699c44703e0c840f90530bf0aeedc32c83896ad886a62340d7e7", "crates/nsh-base/src/rich_editor/transform/attr_step.rs": "0e488610f873a0488232ca80f678de1393f07d003de05c9a6eb59d2108564531", "crates/nsh-base/src/rich_editor/transform/map.rs": "61ed3f37c87a13fe25417d0af77f39584043acf64d5bc1950784bd2ad0bfa054", @@ -318,39 +319,39 @@ "crates/nsh-base/src/rich_editor/transform/step.rs": "41039ad30f581b0b02f5cb78782950324268af147baefe53e40f7467876aa651", "crates/nsh-base/src/rich_editor/transform/structure.rs": "58069f0ef750399a3afbf3cbc1cba108e57ccdcb41505dc5d2330c09e7cf1e08", "crates/nsh-base/src/rich_editor/transform/transform.rs": "ed9b53bd4dcd1f775c89893c39c9a0e2ab3ffd264e69c1649bc76b4be6ff2159", - "crates/nsh-base/src/rich_editor/view/controller.rs": "6157a9f516e5f5af46ba794c095d0489ed6571f2941d906b972edffc6b4060a1", + "crates/nsh-base/src/rich_editor/view/controller.rs": "f896b7461c392aca0e819dc33148dc8ca68867bf7819eb812279d44f8255b4ab", "crates/nsh-base/src/rich_editor/view/geometry.rs": "8485b908c2a584bd6fc8609893b6d85df49269156fd7ae39af1ffdaff7a85fb4", "crates/nsh-base/src/rich_editor/view/keys.rs": "4e07091fe0cbd5cb1d845b13337c8a8f06603905ca3434d04411ed4d23b92dea", - "crates/nsh-base/src/rich_editor/view/mod.rs": "21718ad442a573299d02e6fc078b28676bc005696bff62c61cf5ba70a413924f", + "crates/nsh-base/src/rich_editor/view/mod.rs": "ce72494e692af2fc89c644d8e145cc38c0f002ed7d29737f2ae0955b16d3a1c2", "crates/nsh-base/src/rich_editor/view/node_view.rs": "e5bdbb7bcbf0cb640032386e803d0a2fc48af61857136e09d6cb1c4d46ad21f5", - "crates/nsh-base/src/rich_editor/view/parts.rs": "626d056905a2165062fb1b3549d692023c260a0f47b7eeb90a07c9c05a755e79", - "crates/nsh-base/src/rich_editor/view/render.rs": "b5400196ec6fbd743b829facb5d5f9f80fbbf06048572a53fed9752784db9b67", + "crates/nsh-base/src/rich_editor/view/parts.rs": "71b20874335d02391905812e27e92b05704c7ee5b5544e410f765b86f2f3add8", + "crates/nsh-base/src/rich_editor/view/render.rs": "084e822bb1aeea3bfa57c5393119f4721fbb77a6c6c864b22b1b0dd4623b1b4b", "crates/nsh-base/src/rich_editor/view/session.rs": "ba9b55cf2b3f2b4bb6c01763293a64fa7cca0399d7746d468d9002ee76fd11d2", - "crates/nsh-base/src/rich_editor/view/table.rs": "2031911bf3f917c77f2dea3e3c653e5ac2bc7a6a6e4a7c47e3830181dd6a09aa", + "crates/nsh-base/src/rich_editor/view/table.rs": "0448e01b9f270c5c6a177b0b8b5f4ad786100a4c239f0df8f622748257b1a451", "crates/nsh-base/src/rich_editor/view/touch.rs": "3d2fb3518168ad7ab1e57da8a1d985fad979ab808a6626650bf2c4c247ea8059", "crates/nsh-base/src/roving.rs": "0f2690fcd10690156fe63358a4183bcc7f389578629d376c4a971ffba1a1dc6e", "crates/nsh-base/src/scrollbar.rs": "7dd0dfd306df1e446e89a961130d3408914812ae3bd8f86ed6847ab035fdca05", - "crates/nsh-base/src/select.rs": "c26b9195b5f510a082743ad6b4d0801c29d6a9e8571243aed0e77cbc1f31ba92", + "crates/nsh-base/src/select.rs": "aa7b9c2d2e39ef3209d217edcce3203ce2f5bf7668a1ba0ac89bccf22c0fb4b8", "crates/nsh-base/src/sheet.rs": "0455e7b3ddda25dd98b5266bcab211ac6047957bfa029b79adefa14e432c0470", "crates/nsh-base/src/sink_text.rs": "5442bb4898e60b0f0ad433b81dd563c950187f8a30f906c4d8ca27a14ad622f4", - "crates/nsh-base/src/slider.rs": "f75a48d9812c97d67673297f17f526905f401dc55172d294911cb77de1d24855", + "crates/nsh-base/src/slider.rs": "18c30a480e8c969cf978a635360784e5b4e88569d378f77918c8d18781fb7924", "crates/nsh-base/src/sort.rs": "423e5984ca94bfa04b66e7b724f55f0a7d9495aa38e04ffcb872000dc698738f", "crates/nsh-base/src/split_view.rs": "cd31d4b91dad1ea086fb377363fb6b34acaf3f9f0c58293fd476f38db33e7889", "crates/nsh-base/src/status_line.rs": "a95336175a92d70b5ef7acbcdce60af70b43506ec2418f9a77bc339953b2ba97", "crates/nsh-base/src/switch.rs": "2acdffb48cfe141161ace55fc554bcd966b3908e8a93934a9d96df1c3755cf9f", - "crates/nsh-base/src/syntax.rs": "932ed26d7adfbd22e9288751d5323b585f1b2cc8e4f31617c5c8f873dc01db0c", + "crates/nsh-base/src/syntax.rs": "a9b20cfc022227f733a0d3d0927a1963e616dbf7c85eb48b5b051eb318b10cbe", "crates/nsh-base/src/table.rs": "9680cb5afed8a59f7c6da62e15102ef1af4bf6328ac17952d3c1407adf77b8a0", - "crates/nsh-base/src/tabs.rs": "85e8f7e923e3c16dbe6cfe1eab6b88aac461c04adf4cc2547f753ba95d7274f7", + "crates/nsh-base/src/tabs.rs": "913839b3362cd55e931d35c3b3fee90c7f24a413b7391a482855484edc306916", "crates/nsh-base/src/term/emulator.rs": "878b7f5441283a5d8445bb3f6d5d9fcb816a0fc53bf5e766837b000bc90189e3", "crates/nsh-base/src/term/keys.rs": "b5402c016a741a977918081cac0fe02780613f93e037d24c7824627e5e2f6fe5", - "crates/nsh-base/src/term/mod.rs": "00d68f8d3ab9f7c1652ed92e95d9f5a4603e250b8d6ff22a24b4bc19cb7655f4", + "crates/nsh-base/src/term/mod.rs": "eceadd5ef5221369d2fe1b568c9e291b1c7cb8a731c20afc6917c56dd224bb66", "crates/nsh-base/src/term/vt.rs": "287d00310c43064b49d7c070aa5558755e45878df231d411a3d8c52f836b9fa4", "crates/nsh-base/src/terminal.rs": "d508849039cc3870ec6f2942dfe82052d40888894bd76b5bb6b25d7771668f4e", "crates/nsh-base/src/text_view/common.rs": "48af8c8dc65388f50f3bf4a9a9c46497f484d8021f33685e8480b5805f099d28", "crates/nsh-base/src/text_view/document.rs": "9f9167216c2c14faff904980d4917df50444d7f262542ff9a3d445f53cab6160", "crates/nsh-base/src/text_view/extension.rs": "d1ec2589c62684cfea65b472f154dc148cf8798baa0c27b3d8f0a1eb94493355", "crates/nsh-base/src/text_view/formula.rs": "804ee08706b18d8644bc3d694a2a0b7c99cc7f93fc75674c848b90c3280e5d40", - "crates/nsh-base/src/text_view/highlight.rs": "71d03e868859c84360a50d62adee39e63708945f63a3feee5f22899e61ef0c5a", + "crates/nsh-base/src/text_view/highlight.rs": "76561501f2af2c5fb1575cf4bdf76c75c8581cb45be422708b3e7a8c2a2e6882", "crates/nsh-base/src/text_view/html/mod.rs": "b469e320c6e8bf370d30be157a9f7dcd21b5c7b83d4d9b1031eb26f5df833787", "crates/nsh-base/src/text_view/html/tests.rs": "633baf3e7edf52cdb8394ca44aa6273feb25b8d4d02caf4343e50791829fddd6", "crates/nsh-base/src/text_view/markdown/autolink.rs": "35afe507e579926bd0219fa4fe11b721e9e1cf660a725cac41870f366d741c66", @@ -358,10 +359,10 @@ "crates/nsh-base/src/text_view/markdown/container.rs": "9eff9e468da502c8b7fe7beb5d513e7f56b4c1faaf275c71a98f42a1759c0854", "crates/nsh-base/src/text_view/markdown/incremental.rs": "7f8c3c42c647fd94b775a17bf143d7d73aef94fd923f6ea5f2e0a3acaabda69e", "crates/nsh-base/src/text_view/markdown/latex.rs": "c21e8c3287e515c70798aa4cd281568e916717f4b26cb29a3a4b122c61e11364", - "crates/nsh-base/src/text_view/markdown/mod.rs": "ca1cb7a58ea31d603d3ab2f35acac484b0ed105dfca90afc561498a1fe7ee070", + "crates/nsh-base/src/text_view/markdown/mod.rs": "4a6abc258cc4b3008903df8fca753c11c55ab60b9ebabbeb3b2d6ff63d075d4a", "crates/nsh-base/src/text_view/markdown/offsets.rs": "4e317bbcdbb5c39afb9cad38e2190695089229d541cc93fe10e562fcd034512f", "crates/nsh-base/src/text_view/markdown/streaming.rs": "1d4da98ec4935128e435d81436e764124a354c6880117bde0fc25b681d16d9b9", - "crates/nsh-base/src/text_view/markdown/tests.rs": "740768e78b9b52f0cca7d47704c4d10354261da2bb34cfe29f3679afc2934ee6", + "crates/nsh-base/src/text_view/markdown/tests.rs": "27be141012fb6b419925bbbc818da7d835af4a09016631a25ce7a4dab8d7d949", "crates/nsh-base/src/text_view/math.rs": "29a3b27b3db43a6fb8e990ee6c086e0070793c148d837c30f084db47f0c34474", "crates/nsh-base/src/text_view/mod.rs": "a047724da9a3bfbaaeddf5c4358ef832eacc848312bc6b7e982f7c29d9c2e1e8", "crates/nsh-base/src/text_view/parts.rs": "3603c7b53679bf182526b77386414b6312d7edeb7948d2229a368529edff44e1", @@ -386,25 +387,25 @@ "crates/nsh-base/tests/base/alert_dialog.rs": "6e796bafbf9e05160885126f2f99d7ea1b940c32f2b830e032c97a5d4c5733c5", "crates/nsh-base/tests/base/avatar.rs": "4bc1e7538258b427ec17df7aa585a7b1b206e7e2e11edbd0ade8c091c9e2cfb4", "crates/nsh-base/tests/base/button.rs": "b1a1d7b0686a4c98ae9e829c2740cfce162dacf0664ff252211df921cfffd98f", - "crates/nsh-base/tests/base/calendar.rs": "e9cdc06d8d5e39de01fc93ea76d66823dfd07079d359da6b88ba1e7e69e11703", + "crates/nsh-base/tests/base/calendar.rs": "7f0430665b526adc13fd4e08074635ec9b19296e628dcdcb8b42bbb898b6b2f5", "crates/nsh-base/tests/base/carousel.rs": "221cfa54ac073f0b423805acb3a7d5fad6e23880254d0052677389a15261980e", "crates/nsh-base/tests/base/checkbox.rs": "60861b2da1574dcb7279afdf1b4b7fe5cb08d7c8217edf50dde97143cac6fe74", "crates/nsh-base/tests/base/collapsible.rs": "328a0840b407893c2aa08bc098a87d565ff52c4af51b9215e33f3365dfa7ea8f", "crates/nsh-base/tests/base/color_picker.rs": "b93cbca28e764ef76a40be988e2ff8b20c60c5b7ec4a8b3313598f384044bfe0", - "crates/nsh-base/tests/base/combobox.rs": "69b4870b42464326d024ba91029ddca15d30649286b5fdac8775e3b24bbb06a0", + "crates/nsh-base/tests/base/combobox.rs": "7c27d41f5096ff441520d14b7d0357569c2ed1f7221afc0ff8b4c2846e8b48fd", "crates/nsh-base/tests/base/command.rs": "15c5ed3b1d52ec65d41da2f17a56479bb3c440b039fded08b26879c2397d92a5", - "crates/nsh-base/tests/base/data_table.rs": "4eb3b004b3589556e94c85165e333b6ff6a3d971989af6c78d4971988af152ca", - "crates/nsh-base/tests/base/date_picker.rs": "72a9dc1d38d662f58b5048405f2538d5b84a232e652f0f5c9f35871b5716ba99", + "crates/nsh-base/tests/base/data_table.rs": "0243401cec82b2eb524a1569d011d987f6647734e32d135b19a50258e009ba62", + "crates/nsh-base/tests/base/date_picker.rs": "20b01eb6d1f3b0b64e9c42d3825d558a23745afa2b13b0e852d8e35afb094eaa", "crates/nsh-base/tests/base/dialog.rs": "f0768f3bc44d553941f0f0af54f6bc41dede7b2532172d4e76118de55cb967b2", "crates/nsh-base/tests/base/diff.rs": "43176a8425c2409941f68e931702314a6b3a0b4f5067a5422e0892fbb6b45fd2", - "crates/nsh-base/tests/base/dock.rs": "a6913ec303e22d921342d8b576dc9e754e1b08280a1261f465b9060fbd0f2849", + "crates/nsh-base/tests/base/dock.rs": "0b89e76a7613794eadf291e32e17238a3cf8b25673c3d1c01aa60ce6e335bc54", "crates/nsh-base/tests/base/dropdown_presence.rs": "d6a83943db5edac574b5f71af7c85176e0a3f7d4a9ca4537deabb94b720fa478", "crates/nsh-base/tests/base/editor.rs": "6068c0983915d1bc2f825f3139b60fd8d87cffe52f66345a6a58b198930aa4b1", "crates/nsh-base/tests/base/editor_completion.rs": "15f994bdf864b5a55238e8c28909cc5a163eb491a44f4e85e919075e38c0e181", "crates/nsh-base/tests/base/editor_definition.rs": "616d62fcdb94d812176c3f0a7f9993e8d207d8a48883bd07aa74b609040f9944", "crates/nsh-base/tests/base/editor_diagnostics.rs": "97132ce7115a88037d49684aefdb16d7f36ee21c0c1c7376e508168bf070c933", "crates/nsh-base/tests/base/editor_languages.rs": "06150cf9aca48593ffa4f471139548e4307a2cbf226f3e650d8f8ea6cdada2ed", - "crates/nsh-base/tests/base/emoji_picker.rs": "adca705ac2727bdc7637ccdf7bdeafed4a16b698726c04ca06845cc74f7b6c76", + "crates/nsh-base/tests/base/emoji_picker.rs": "9db945a54d4ecd5038d2eabc26b9609a50d148f912a8a0eaab73c5e51ebf763b", "crates/nsh-base/tests/base/focus_within.rs": "c0cb751a3a495bcfc3a33b99b2380ae7378bac3e0a459502d876d337f1c03210", "crates/nsh-base/tests/base/hover_card.rs": "1db94d1d35de9cb521d9078b2e77607fadf3a1d8923650a42945dbe67f0142ad", "crates/nsh-base/tests/base/link.rs": "2a4f589c7b54b241d79f97b19d96d16b1b5cdb9e529e215f6465e78f155f43ae", @@ -415,42 +416,42 @@ "crates/nsh-base/tests/base/menu_room.rs": "578d873bc5ca1cc64c80a71e907d5635b69e7041ad18ce67c612daa033f488fa", "crates/nsh-base/tests/base/menu_typeahead.rs": "d8bce7e6af657189da088b8d08a07f85927422b33406bb0eb56b258a701dcd23", "crates/nsh-base/tests/base/number_input.rs": "b1a5e05fb5d233ca5d008db7a4296d090a3f8c43db7e216946fd8376ccb28d3a", - "crates/nsh-base/tests/base/otp_input.rs": "d8f755d2c5501908e906feb62b56b361ae459822ab285915809eec9e522be047", + "crates/nsh-base/tests/base/otp_input.rs": "8125403f44ceba9448de49448a947c4d6528e27b641e12eb6c4a686f1936957e", "crates/nsh-base/tests/base/pagination.rs": "2044d9d3e24de5660fa3bf667c34fd7e3908b781dd58cbce2168ced3b6143749", "crates/nsh-base/tests/base/plot.rs": "43115e14bfd89edf39bfbb3c5a5c89e6b507a8b05d603f6b9e1d89ba511ab179", - "crates/nsh-base/tests/base/popups.rs": "4ef9650c7c51b3afc93e6064fc7a80fdbbd7d4a357d884ce50c59c608baa39c2", + "crates/nsh-base/tests/base/popups.rs": "bfe093cf6002698986b6e815389ea504bd8b7808d2630b91454ff55a863c1083", "crates/nsh-base/tests/base/radio.rs": "c1abc5160c7eb94bc2b8486b1e9071afd71dbca24928276d69537f680d1845bf", "crates/nsh-base/tests/base/resizable.rs": "fe71e983186bfefd2585daf4e68a77fb84d1223371bc8a6d2b08fd48271f4a57", - "crates/nsh-base/tests/base/rich_editor/code_highlight.rs": "e98466d08fa37cd929c0d5e41d873deff039310935c5ee174a6a09ab8f75bd88", + "crates/nsh-base/tests/base/rich_editor/code_highlight.rs": "6f309c15068e52dddca5742c9a26460128db7c15167feebb732b3a3048d6b64b", "crates/nsh-base/tests/base/rich_editor/commands.rs": "0128831e9dc30a9ebd336791dad12a2dc6e15f69fa55b261faeffc35bc2ed84d", "crates/nsh-base/tests/base/rich_editor/composition.rs": "32a9cf2ac84a1250e4cd90f456d8479cc958cbd303b0f8df22eabce31035190f", "crates/nsh-base/tests/base/rich_editor/content_size.rs": "c1d023abebfc4e3ab85067d29052f4ba74429f9e516525a0886dfed74c02a094", "crates/nsh-base/tests/base/rich_editor/extensions.rs": "2b9c47ced15a727e5bc14a0bdb480f58d41589bdf04a5c9049d0fdeac1abd2b0", "crates/nsh-base/tests/base/rich_editor/layout_hits.rs": "5121ec10ef93fd407a33d525bb1ec7fc5625b9f857f4c59d59ffc8afb3685cfa", - "crates/nsh-base/tests/base/rich_editor/marks_clipboard_history.rs": "96981fe0ef59f7a455339a3010ce7a220b515c1bd6ce117ab27f2c0d43a96255", + "crates/nsh-base/tests/base/rich_editor/marks_clipboard_history.rs": "cf979f9a335faeecb33a867f88e7af7396bb6fef07e3e243b07401d9579238d6", "crates/nsh-base/tests/base/rich_editor/mod.rs": "7c8713e1860f3b0e742e322d89e8863cdedb89854cd4b6ab10ab5992d2df38d8", "crates/nsh-base/tests/base/rich_editor/node_view_presses.rs": "eede6256d4db31c4128a4e26df061120e14fde7ca5e2040b50a517df0cafa451", "crates/nsh-base/tests/base/rich_editor/selection.rs": "1e8b8a8b3436d6ada6bd1f08e6dde3ed3d86477dc331c561bcca63231e5f103e", "crates/nsh-base/tests/base/rich_editor/sizing.rs": "7277858ab0d650882094db3b05653a7f3e2ed3a8594593f19807ce95a3842bfd", "crates/nsh-base/tests/base/rich_editor/structure.rs": "8d18eea9f24ce905a15096eca61c76e2f487e198ab42ed29055f8874e0a4f164", - "crates/nsh-base/tests/base/rich_editor/tables.rs": "ad375e73f7975544f2382f4b08a55c4db7106b418742fdb6d23708924df6d2e8", + "crates/nsh-base/tests/base/rich_editor/tables.rs": "75c209fe3f46f81203369b24dfde2a47bc481447583c244cd704efda20d61ae6", "crates/nsh-base/tests/base/rich_editor/tiptap.rs": "c1e94021372878e523db9f6a326819445a117f10e8af8247cdca6a39d426987a", "crates/nsh-base/tests/base/rich_editor/touch.rs": "370788cd9a71b55e32f93d1a69ba702c1909e5881ef962895b83b493433114fc", "crates/nsh-base/tests/base/rich_editor/typing.rs": "160ef0a3debfc1dadd3ca5feb058ecf1360b9280c68535d89d7808e7f9b5b90e", - "crates/nsh-base/tests/base/rich_editor/view_features.rs": "3ecc5399a2870a1e38596653ecb8af01851c3d07ca430990e5cd2e7ffccfc9cd", + "crates/nsh-base/tests/base/rich_editor/view_features.rs": "8429e684bbd54cb758f20dccbcc9d3fadf9ca820b306d3211ecda74a95aab90a", "crates/nsh-base/tests/base/rust_root.rs": "18024a2c88125df8461522a5681bab2a149a62081b211dfbeee836cdb4e23162", "crates/nsh-base/tests/base/scrollbar.rs": "5cb96b169ea27b16e6351cdeb94a74e1d4daabec48a2d900ab5862e95ed3f16f", - "crates/nsh-base/tests/base/select.rs": "b0e9017ff0927b0051b25aab94c56ba8defbf04f57f96a3c35f45b2f495d0486", + "crates/nsh-base/tests/base/select.rs": "9c0a7e48a5a5fe6c72bb6626d3661e3720ddedbf0d6d40f90d70d430eac8b331", "crates/nsh-base/tests/base/sheet.rs": "50c1ed5932c08366ab5a3a9ee943ac36ddafbb74319441d45740a74eeb1a8c94", - "crates/nsh-base/tests/base/slider.rs": "9c20162fccbfdd0cb795b915bc0f5343cf4aa1287f8abe66a6974402e3c859b6", + "crates/nsh-base/tests/base/slider.rs": "ea7fadd0e144c037adc76a33186acd0bbec438665ce7f44be60bbd4df9db5883", "crates/nsh-base/tests/base/split_view.rs": "ef3e514f95ed4b019d0f7e84797fd7d732bad7c8c74f91bae120d39c63b8cad3", "crates/nsh-base/tests/base/submenu.rs": "e1e1e1eecfc9971110451a961ea3e49d0a930530e9aff3d851c982e71798b20a", "crates/nsh-base/tests/base/switch.rs": "ae5585be2e25b690d59a118859ad77a065ea04771db8046a37874ef4e0079ba9", - "crates/nsh-base/tests/base/tabs.rs": "69c5fe7abf2f32c2cd4afae1517eaa6705b12f58cdef6a015f49e2650a374d1c", + "crates/nsh-base/tests/base/tabs.rs": "e5ad3e910e1770e65ff6179f0724eb2b6c5adf97b5c64386ced71be4eae47f61", "crates/nsh-base/tests/base/term.rs": "404752af855923435fbf0f67c3829e172a98c0e9489af219484e2e285be804f6", "crates/nsh-base/tests/base/term_cells.rs": "acaca962594065187a1070e0001b81d5806efb96e391f271cc6b4c6f86df93eb", - "crates/nsh-base/tests/base/term_input.rs": "871fcfdfd36d5c1add4727c8acc63898f0b902b684ca6149438ee6883415752f", - "crates/nsh-base/tests/base/terminal.rs": "bf1e753efb58923bd71a5a01cd1eb164455d6479aca0888a40383c6320e7d6db", + "crates/nsh-base/tests/base/term_input.rs": "7103890c259b3e9651229a1030bca7a819382d9f05d6d5f34dd78b8c09266ab4", + "crates/nsh-base/tests/base/terminal.rs": "c4d1ea68450962d84d2b93b3c213aff78622cf7f2ac84baf45ba35b492de9d21", "crates/nsh-base/tests/base/text_view.rs": "0f75e8b43f169d8442e77f71c57c3217f43b51d1fb0bae9d53ef9963419c8109", "crates/nsh-base/tests/base/time_field.rs": "30ebcdfd1d49a02ef9f957903415a9612da242a367f8e942edb4b4b8108e8c65", "crates/nsh-base/tests/base/toast.rs": "38cf6e34f06fefeb134c3510823d935011b4b287a3d2a425c6f5c5a6c692f3db", @@ -461,12 +462,12 @@ "crates/nsh-bundler/examples/browser-bootstrap.js": "c29a82268195f44e7ed142b4be5f0a7101b5ae3fae3001821fbeb716bf152eaa", "crates/nsh-bundler/examples/browser_bootstrap.rs": "d413a3383be4a09da960000395ef0b11d2cb3fa8a4f1c50b98d0208af62bf216", "crates/nsh-bundler/src/app_dir.rs": "c1252b5aa090b4c3fe1637eab6ca0ddc5499df6228b364ed7c0bbb3552eb889d", - "crates/nsh-bundler/src/bundle.rs": "0059222a557d9e55fe379e099f4f246d96b9c04b454e653ef9910472e6396890", + "crates/nsh-bundler/src/bundle.rs": "d16b96555bddb76414b8e0f870427e2af3d909baae3953d35f53c08427eaaba3", "crates/nsh-bundler/src/classes.rs": "b6fc4affe5ca9ee0dc38b0b00579375dd2c6d6684424e4b6aa08371ab965fb40", "crates/nsh-bundler/src/compile.rs": "b597053d63ed44cd736d8739660bc138a4055caf22a6a59a61042769713c2f38", "crates/nsh-bundler/src/hot.rs": "c3655c9dc2c1c561831bf33d0a7915bfa596063ac130cca4b79e37a021d76c10", "crates/nsh-bundler/src/jsx.rs": "bbb1f7e945411bd26248c2249879d8d16decaccfb412d9dc116ff3b0bee1d85d", - "crates/nsh-bundler/src/lib.rs": "92d7904c1d668715569ea65705f8a05a150d1a2ebc9aa41c315fa89a4a90b0d7", + "crates/nsh-bundler/src/lib.rs": "90092b4b96e4ca20dbc081b0b514daaf58a3b53809ba6db9825d44388c5a2e84", "crates/nsh-bundler/src/link.rs": "744a5cc5ffa3c4d572255c6b627313df44f9a274374fa027ba04bfeacc50975a", "crates/nsh-bundler/src/minify.rs": "09bb43220c92c72daf59f73b7a1fc3c950c40fd32bf872ad93967ed7cf745af3", "crates/nsh-bundler/src/natives.rs": "7b74783d396ed9ea4de99462433976b925391c5a2a47b8ea5ba1f9e481380317", @@ -475,48 +476,49 @@ "crates/nsh-bundler/src/props.rs": "b7b2122af74037f63ae74e2c4f5092d5ae5138aa78cd81abc03d9c8d7f7fa337", "crates/nsh-bundler/src/split.rs": "dd958b4d93476155b5cb557389e53673b89c1c9c525d74c8126367a95529024b", "crates/nsh-bundler/src/standard_tests.rs": "990ca943dbffbc47bf123415e9ea5b0384e7dbb71125ec4f993bb5cf78cc5b99", - "crates/nsh-bundler/src/types.rs": "4f460c91cdaf13f26032383aa34df05fa56f0ca5d22682351a5e5102f67129b3", - "crates/nsh-cli/Cargo.toml": "3c8df0384051d0263c25450aaa00e70f1fcab1d4df98799abfa6955ef36a3e8e", + "crates/nsh-bundler/src/types.rs": "c089a92f73f997d25733a5eb0bbd29eaa0a584a8848ee6c9a45df1992f6ccbf1", + "crates/nsh-cli/Cargo.toml": "f69eee2a9dfa047bccd63c344eef5e42c3337f54dc5809d0bea92095fd184923", "crates/nsh-cli/build.rs": "ea4c92711a19b4c314913ab061a0757e4775c0f518fa467f6ebe37f14b1b0444", - "crates/nsh-cli/src/android.rs": "e234f73bee110f6e6e65b3968cd48cc11ba4a3a929219ca81db56a404a569f11", + "crates/nsh-cli/src/android.rs": "7fc2f9957b019801d3417083b613a24cb746ca9e155ce2c5a29094ab31530709", "crates/nsh-cli/src/android/class_file.rs": "0d9f5faae6d69b5181f9bcff96869af3516dd5fd70115d7bd2b300810fb3d469", "crates/nsh-cli/src/android/libraries.rs": "77a944b148922475a80684354d2c24792336ea9fabc7136ca2f86b514c0c849e", - "crates/nsh-cli/src/android/library_manifest.rs": "a6222b14b8a0455c061c740681648c95d0635717bbb83f97c66cf74b582ea2d0", + "crates/nsh-cli/src/android/library_manifest.rs": "ae7bfec7bc3bd0d65bed8f969220604b1e8707fd5dec6062bcb3c04481efd8ec", "crates/nsh-cli/src/android/library_resources.rs": "ad5c9e0db4fc4fbbb9eb2532ae454405f02506071822232a2ee5134f2bf07c64", "crates/nsh-cli/src/app_extensions.rs": "ff53642c76ad2d3b0d840d20337a2516ad7d6c079d407fe59f261596995e3d02", "crates/nsh-cli/src/apple.rs": "218f2e190b48bab8343b57ca1708542d6c1f79fadced3e699f06aa953e45f124", "crates/nsh-cli/src/bindgen.rs": "79c13c61b113eacd3d8f2caaada4e6605acc7f4dab9ce376f41ee9205d345b2e", "crates/nsh-cli/src/bindgen/wasm-bindgen-0.2.129.js": "5823060057ea5de1326121c1132d558d8f96d1fa8c23fb1270a132b07ac9af06", - "crates/nsh-cli/src/build.rs": "fe5afc60b292a091ad9a62f3ffb0cf2583718386ece2e8c9cb2cd65d4ae1d296", + "crates/nsh-cli/src/build.rs": "54088213ff25ba6a39305799024a1695fb1dafececeb709a2e649ab90b6e826f", "crates/nsh-cli/src/cdp.rs": "8d7de67761feb029406065481bddec97fdbe10f3332a93eaf23cd4767f4d136c", - "crates/nsh-cli/src/check.rs": "a5edb770fd3bc18bc3d99c4237f3bc0656e2931dea0fcb08efaea0b6e8c0ab4a", - "crates/nsh-cli/src/component.rs": "782eb693f82e266939b71e68a6464a8517d441bbdc7b9e06b7416c3130431f5b", - "crates/nsh-cli/src/dev.rs": "b971712e6e1c98da8955d703d144e5f0017e83c79572c2be7677c87a524162f1", - "crates/nsh-cli/src/dev_port.rs": "b5e9cc6d4c59fc7cd95ee839c6bd7ba36d9647c8c576a16ce132acb21520a12e", + "crates/nsh-cli/src/check.rs": "6d3491ed1780a54835137255a064e36543688a784a48f9a2adae07c219455135", + "crates/nsh-cli/src/component.rs": "41622617b55115b794b5b39fb77d1454d86cbe1e4f338becb65748be204ec50a", + "crates/nsh-cli/src/dev.rs": "4065b4003f55236e60cac2fa1ff8f6a0ad73553d0f325dad3b33b803d4847691", + "crates/nsh-cli/src/dev_port.rs": "e26be43ba3ee45e885b87fa4500fccdd25b03b41cbf284223f36c6b751846ae6", "crates/nsh-cli/src/entry.rs": "02ddc64addf64587ff39f6918092886da5e7494d3ffb46f8aec68ad61c6ad16a", - "crates/nsh-cli/src/init.rs": "a8200824560776754c6d642e9e95ac14ee28168f72318ebd1569cb0d89dba9b7", - "crates/nsh-cli/src/linux_store.rs": "cf24751df15934f1c8e77c799bf6bc8d9424d343d5cf6e41b446ee17873bce9a", + "crates/nsh-cli/src/init.rs": "6c033baae480e9d7f9b24ad9fecfafb1c925f5dccae396e9693e71f0c0f68587", + "crates/nsh-cli/src/linux_pkg.rs": "763dfbf0cd5e4fde1805787be355ba8a5af16ed0af0227a8f5a8d020df63dfb0", + "crates/nsh-cli/src/linux_store.rs": "c69242064659c5e880dbf36b31260f4fbd3907273519ccf4919d841af559113c", "crates/nsh-cli/src/logger.rs": "ba3c001dd0bbbbd9d68200f19299ea1002ebab8e14842eba1b5cc6c69ada10f0", - "crates/nsh-cli/src/main.rs": "1af9ed7991d21f76daac875c90f3d0dc7d687909d3d633fdfd33728ce96b2a36", + "crates/nsh-cli/src/main.rs": "07d9e4eb725f170bc099128fd489e24eb1be434638737daac0732dfdf9a1aeac", "crates/nsh-cli/src/module_meta.rs": "2228fe34ed6b077c35d40058f202d18cf5fa3d9e41ee67038f14cd4ee6854df7", "crates/nsh-cli/src/msix.rs": "5cad295893a368243c77eb1a68e74aab819a1053f4b52e3574fee1a0321365d2", - "crates/nsh-cli/src/native_features.rs": "6ad4c2f4dfefa9600fc5bc47c8414d74c3131ebf9d3148782f19e2be0583bc48", + "crates/nsh-cli/src/native_features.rs": "59c643f273430e4516678192e78cfa2ab737272cf560a9c698bf4185a1ea2c36", "crates/nsh-cli/src/nsh_lock.rs": "2cd12a33481cfaef0b21c3cb6c6c36dfae7d12588d02978ae7118cc58d2dbf84", "crates/nsh-cli/src/nshm/cargo_toml.rs": "aa5d5ae2a53bb963f77175fba62ed7c2648c8e51adb58a3ef668de7af43eabf9", "crates/nsh-cli/src/nshm/dep.rs": "6cfdea9fa32e59ff704024694e34e89181c368aafc88b841406a1adba05f50f2", - "crates/nsh-cli/src/nshm/fetch.rs": "3b88472cbcb94d4e025ca08307f67eb9fc6dd8e951187f4fe90168536e9e1778", + "crates/nsh-cli/src/nshm/fetch.rs": "28106a0b9b6870e6806d00bf35198b1292965e469e987e4bd36f3944a0bb82c7", "crates/nsh-cli/src/nshm/manifest.rs": "63e1f9959d5b66d71e456133df202165189b58b09d2c63b4ceb1d5fb85819eaa", "crates/nsh-cli/src/nshm/mod.rs": "eab15be74e6ccfaf4fc902a32f4c0e811be9fc8cb1f7e76d71d2e745fe634271", - "crates/nsh-cli/src/nshm/resolve.rs": "ea91aaf52f0f81f947c356d62fb5ffee27bbd2c171aa604086c357eb6903578b", - "crates/nsh-cli/src/package.rs": "b6cea78f3145274adc4d15ed6623a82217876bb4fc6197db189819e41f9071ac", + "crates/nsh-cli/src/nshm/resolve.rs": "4a2319e3c48ed325e069ce07b2708038a6cc79fc304324ec0cfa4a2b6d76ef6a", + "crates/nsh-cli/src/package.rs": "a09d8316a9ec572abcb655c463876cbd8fc386f7a6c76e86e4d073409796a3f2", "crates/nsh-cli/src/platforms.rs": "3c8412263998ffca58954b185abcba287964815258999d1c4f42dc70721385d8", "crates/nsh-cli/src/play.rs": "63ca06e8a3811f2cfe3f4d980a0ece432a6e9249b3bd61bb42435da26a3c0b0b", "crates/nsh-cli/src/provisioning.rs": "e23d56adafeb4a6d419ff012127c6a84760603c6f62ad90b5dbe24dabdae9f83", "crates/nsh-cli/src/publish_ios.rs": "d1e78bde7176abaaf307d11428346b816b0c9dea1fd6b1b82da493782b6e3ea0", "crates/nsh-cli/src/publish_windows.rs": "58b9056a371709085b527cecd42d74f9b3114acf7e2cf7b91906d38b326419e5", "crates/nsh-cli/src/run.rs": "de23161e4e99d80d41ebc663b6de0d5fa8339a286258157fe8ed086cb46026c1", - "crates/nsh-cli/src/runtime.rs": "5a4ae8a3035830b0cdfd14fb06ddf34b881169570d96e6d6b4c263152b8201db", - "crates/nsh-cli/src/rust_app.rs": "e6a5aedcbd218a6d3262b57ae10a7821e8a5ba59fa89b5fe63126083b1461acf", + "crates/nsh-cli/src/runtime.rs": "161a61dd01396ed2dc155d94c36b2b521888ca8ba7ac7406e0c9b7eb6484c5d1", + "crates/nsh-cli/src/rust_app.rs": "15296f3d67deec2da5b82139137b148b63f95e6bb3ab6f086d2c19a0ea18249b", "crates/nsh-cli/src/self_update.rs": "ff41a4a975c457cd29068265bf82c6edbc8fe203ac558ed08e17b98ae89d936a", "crates/nsh-cli/src/sign.rs": "bcddaba0b703b6f8a25af05921b579a7d0b1fe13725269d305f4bb26a039b7ec", "crates/nsh-cli/src/store.rs": "4819ee940e1259ffe552eb1251c2eb60f8f08b53e19fa30179f7d8132a57d499", @@ -533,13 +535,14 @@ "crates/nsh-cli/src/templates/tsconfig/3.json": "832b63d1c87c6381f7d49d7f55394ce4ed2503d3cf0d0124b81a88ec9621a330", "crates/nsh-cli/src/templates/tsconfig/4.json": "d7972c656ce45ce90df97fd5370c26c660c5fe8fca5355cf24822498039685ee", "crates/nsh-cli/src/templates/tsconfig/5.json": "5d6ee953f0366848a5cbe9fe9d0a6b31637d14e8dfb20761e7730c9228753b1a", - "crates/nsh-cli/src/test.rs": "40ba2f26e267b17e0f58c35e62fcfc2a5770119a40ec4b54b2c1011b22fe1367", + "crates/nsh-cli/src/test.rs": "1196fa4ef0b6954ded0257ac862760827e2e1331df2717b05f02a79c40f23f6f", "crates/nsh-cli/src/test_android.rs": "bc1236c28e2c181776f5f460034924cf3455c15b7b06768f7b4504194fcd2459", - "crates/nsh-cli/src/test_host.rs": "7d08eec6c6bdb175ee4d3aeb760a9e0b13075c6277b0b89e1adecaa86fde0dbd", + "crates/nsh-cli/src/test_attach.rs": "885ac99f5a46fa36bf2a4a7cc06f6deb0169a895c639ad37a107bb47f0ac1bd6", + "crates/nsh-cli/src/test_host.rs": "307818212d26593c79a04503a485c3592d287371e4463612899bbbe7612da765", "crates/nsh-cli/src/test_ios.rs": "fba8f3b9ba396895ead1fef866cb39731a1f6a331282cbaf51a993e6606e8bb0", "crates/nsh-cli/src/test_web.rs": "e1c2623fdd55edf61bca2c628f4a8d7cde7bd3f13bd3e504322f9f12375f78ae", - "crates/nsh-cli/src/ui.rs": "5533f3d26b1ae409cc8a714cc3fa63597c31ec687a6f461694a7a681b74dda0f", - "crates/nsh-cli/src/updater.rs": "43a75cf8a0cae2e5700fa0abdb8bb07b9a4341dd827c8cad479511b39d3a53e6", + "crates/nsh-cli/src/ui.rs": "2c54ab9054dbd70b1307d9e8dfa6b8b47eaa2e3363971f24ccff8b8fc95f8a38", + "crates/nsh-cli/src/updater.rs": "67d5f8ccd12b07217380a204987ab368f792c7e47420efb818f501f083619341", "crates/nsh-cli/src/web.rs": "f2702768f1d5f0033e3bedc7bdd0d088412e5e6b23bacaa78c01a21d8b42da6c", "crates/nsh-cli/src/web/compress.rs": "153887194c5498322709b4f920f83c6b5fe724f3e354e3e721cd00a0f4f92876", "crates/nsh-cli/src/web/dev.html": "50d2549c6a66c5836990d5c5b14f7e51834cf00a2a10f5cc340b2f4c391ad2b0", @@ -550,15 +553,16 @@ "crates/nsh-cli/src/web/prune/split.rs": "27855618d0b29e71ee98b0fa5095f118a43fce72dfb0f38fc37bc3da2960e6d5", "crates/nsh-cli/src/web/split.rs": "aa851657416d6424a19a2cf765c231c8878efeaf75fe533cf773b9a15f6c8cb7", "crates/nsh-cli/src/web/start.js": "c9af035717730f9c879aa49eadf6f075953f61c8d090694fffd3d01794c7749e", - "crates/nsh-cli/src/windows.rs": "f87526d5410f376bbe788f431dd4f7ae25ac32bb46c68e4003b48bc4daa4a4f2", - "crates/nsh-cli/tests/cli/check.rs": "135adf8dae53f38d196e5f59dd9ad11cb9e3ac8759b340058cdb38b07503fda5", + "crates/nsh-cli/src/windows.rs": "efdebfe5cfada6950bf1d23d55fb3dca29cf273b863207a0a84260f8f012eb62", + "crates/nsh-cli/src/windows_link.rs": "2f7845f98c8d945759ce46bb2ac36f24e089cf9393e26abb875ec0e054b8487a", + "crates/nsh-cli/tests/cli/check.rs": "67f492be1f953e5212c92de0890b4c4963e66b38fcfcff9a81d0de8166f6b614", "crates/nsh-cli/tests/cli/main.rs": "6f53d9c277055b78e50da98abeb3f3ba8b1e3febf9a847d306faf46d50db196f", - "crates/nsh-cli/tests/cli/runtime.rs": "3030c615d9ba3927285ee10d89dbe64f4e0ac826539f6e1346a739e1ea87e4db", + "crates/nsh-cli/tests/cli/runtime.rs": "a59734dbc4fdaac6e1676fdb4eec71ed5fb6b066735a31e9badfc5177e18cc19", "crates/nsh-cli/tests/cli/tui.rs": "659d380f760897be5db42d3959e5e18fe168618d2d5d64035b6a6bac0191f78c", "crates/nsh-cli/tests/fixtures/play-test-key.pem": "7c4bce9757e2506680d8effba6453b4aefd325c99c7a78cdee234d20e782a7bc", - "crates/nsh-core/Cargo.toml": "4dceb9c53541876dee896bb5c3da8ecc68fdb6722d9f9d11020c53aa22fc45c6", - "crates/nsh-core/src/access.rs": "e2bb6a961986ada52a3077c04e87761b74a7d98e299d8252a4d084258d195b0e", - "crates/nsh-core/src/animation/animator.rs": "e19f7072a84c99e29d992733014ac566f92fdceaa86f60e1dadceecaff4e7337", + "crates/nsh-core/Cargo.toml": "f94d150f02d272ca15e89557e9733d983a982dd459bdf9f725cd72bac64f1cff", + "crates/nsh-core/src/access.rs": "ed63755c5f57310cdb199177a7e6e2f056d2c36afb5428b0c17ebd37e1df8743", + "crates/nsh-core/src/animation/animator.rs": "68ade99c8459ce765c931f1de4c46c0c80cdca932c6ba63ee72fbf55800c3976", "crates/nsh-core/src/animation/driver.rs": "bcc732a25cecc0c52b886e1370c48715751f70c2219261d410546294d3fcd569", "crates/nsh-core/src/animation/graph.rs": "ddbf9a39a09c55323d22c139f28e4ffd849d47def8cd51db9a5400a1e0ae7c9b", "crates/nsh-core/src/animation/mod.rs": "2902ff7117b45709a1ab830d8787c12b14b63e7bcd838748cc05ea4fcc77858d", @@ -566,42 +570,41 @@ "crates/nsh-core/src/animation/ops.rs": "3c0309a19b5a26bde50da6ce7e3166d6953001dede6d380d891cfca8cddcdee9", "crates/nsh-core/src/animation/reach.rs": "29fb678bd79fed26229ef5f6a5b0863b1f0f5bc8c72f39c40b28a12e02b1484d", "crates/nsh-core/src/audio.rs": "a84d414152c40701ed1aeb529ed5ace3cf37b9c7b0c8560d916ea65c62e71ef8", - "crates/nsh-core/src/auth_session.rs": "4cf1305f1b6466d591f57f982bff9783f28000759ed91ea77e63fabebe6cc9c5", "crates/nsh-core/src/byte_size.rs": "9cbaa27c69a16eadbc40b898a0ed683362a7c1c1bce39b7f2fabf8b26e46db43", "crates/nsh-core/src/canvas.rs": "d60e9d7dd34f39e8c24c4a001917a8db1cfb27c4859ae2502f90c1db3edc3610", - "crates/nsh-core/src/canvas/damage.rs": "7cf62127a5057eefbb4a462bbded8483f3b92f9ab2eba40cc32113dafb8eecd3", + "crates/nsh-core/src/canvas/damage.rs": "5ed79093dcb26c02bef2e831269addcc55ee66f19ec85d3d0450cf1b0d8822f2", "crates/nsh-core/src/canvas/hit.rs": "2e3528e7f911e5d4ab735b19e8f79a54a037748598edc88dd9309195106b8e36", "crates/nsh-core/src/canvas/render.rs": "17b5130a52cfe2f4c2de0f190657eda799c3c24aa9c95e924114f092eda4173c", "crates/nsh-core/src/clipboard.rs": "3b97407347df79e7c170a0a5e7b1bb934c778c9d46b2f63cf5cfe5ff5bed151c", "crates/nsh-core/src/color.rs": "93afe9bf38e8f7b12108fedc4863f8e1bee3a55ae7d0c75e788b79b02fb72a93", "crates/nsh-core/src/core/canvas_render.rs": "0e54b8fd19e2aa4f049f165879902053fe7aa1009b00b9c36f456aa327d697d5", - "crates/nsh-core/src/core/classes.rs": "ffa30e931a0efb3acaf8144357958234c466b85e8a4d40dc6eefe5b78413fd8e", - "crates/nsh-core/src/core/components.rs": "3d73e728a63527a9f56c43995dd2074aaca7fba48eb60369a05ee5f5c1083348", + "crates/nsh-core/src/core/classes.rs": "d14f0931cb52d5487fd9e372e2d16bfe77cc47e95b2616f0e0b72c518bbc9cf9", + "crates/nsh-core/src/core/components.rs": "0c87e0c2e6121e99acd0904fe9bba327d186e9dbe7f9ac69ab30c900c85f463e", "crates/nsh-core/src/core/cull.rs": "351903637a4fe1b6da5bbe7bd3457c5297d5ef7fe628b9dfda3acc30b1dde166", - "crates/nsh-core/src/core/follow.rs": "aff36a2595b9ba846ee6bbe57d89d45a52085b73f43efd56ecf922bd95dda002", + "crates/nsh-core/src/core/follow.rs": "9bb70a8264bb6b6169727531e7a4656338a4b8c537acefb3a06a8de32ed955b5", "crates/nsh-core/src/core/layout_scope.rs": "3254f48efa9168620cfe33af821396a225244d4241da51124fb5655be8b6f755", "crates/nsh-core/src/core/layout_tree.rs": "c5f3c9e0f1c4633302fd8ab024c0f0df86679ceb800f086b1f9e3940d206e12e", - "crates/nsh-core/src/core/list.rs": "b244dcc35d1ef83ebebd194f9ad71aeeb9c73be83e29bc304159dc268d85a918", + "crates/nsh-core/src/core/list.rs": "e54f7e0fd12a68505de5812e135a3d51bb3d3d79ae4046349ee1590819dca9d8", "crates/nsh-core/src/core/list_motion.rs": "97bfa026cb2b53f2afc08f31ae4c097719a7675569a5a177bb6556687ba58b6e", - "crates/nsh-core/src/core/measure.rs": "21b36d241b4fb5c7f0ac6dd8ef66eff2d39fb8f80cf81ce8a3414ce49c092c83", - "crates/nsh-core/src/core/mod.rs": "a3600bef69ace12e32f0cab5c8c39b019bbedb18736ef034ccb21c59b847f92e", + "crates/nsh-core/src/core/measure.rs": "09e0b6c01186955e1c64f561f2f81ef591a8dbeade0ea2ae6c2df993fee150fc", + "crates/nsh-core/src/core/mod.rs": "6e2474ee9b43c3fb950f11d117b669444271fa739431103e2ecd515b540ede40", "crates/nsh-core/src/core/overlay.rs": "f89c5fefeea7c66dbbb5c2fa97cac33665941e779315a88f3c6c75c68c4bed61", "crates/nsh-core/src/core/pace.rs": "32467e25763e38ee7dce9ffe748b26fafc9321fe330315569d5c37098ff33acb", - "crates/nsh-core/src/core/parent_viewport.rs": "cc1cb600e8acf62090b3cf892270bd8fd7912edcc0631497022449f8237bca2c", + "crates/nsh-core/src/core/parent_viewport.rs": "b6ccb50ec8185a9ab2f23ad57483d22f88d5186ee23ae2364916e65207ecfe39", "crates/nsh-core/src/core/reading.rs": "3bb3d25dc8b97f35eb73dcbaf2d6f1b5dff8cdbdd012a8edcef7fab6661f3d9f", "crates/nsh-core/src/core/reconciliation_tests.rs": "eb2713644e1f7ce77899e01f2e4068801733fac59ae81095b66ef0d187d16b52", "crates/nsh-core/src/core/relations.rs": "4a85764efe30a80dec87d79fa14e6cadaff5a2b6486bcd6f7a3580ce49833123", "crates/nsh-core/src/core/renders.rs": "4b72ed9cffb2738b69fbaf1441ca0b2fb692c2b36bf7210cba17b14a65e17637", "crates/nsh-core/src/core/resize_anchor.rs": "ae0eef82d2329e17e003d936e20c7c045f46f75100bdd39bc6281409313f622f", "crates/nsh-core/src/core/scrollbars.rs": "d5dc67c6d501007cb461d87e0f13a63efe019d2985b5037e2634d73893c1d519", - "crates/nsh-core/src/core/selection_ends.rs": "108f3286b5a10f87511e5c816a0f5b45e510758d40cb12d6599e62daad01b342", + "crates/nsh-core/src/core/selection_ends.rs": "0efb217b8be9447ef08de562ebc77e6c8e88a93f76bda15a26e4eef5f92bf356", "crates/nsh-core/src/core/services.rs": "16d2ccc10b9652577c6484dd933e1d9d11452233933744166b7d5bfa74dc277e", "crates/nsh-core/src/core/slots.rs": "f908d95aee49147488e1ea62c017ba7750d0f952de55c496c879283af8fcf27a", "crates/nsh-core/src/core/sticky.rs": "44113b58ee5dd61f4c23de200b03f155e8115cc9cb84e100fff5732bc123360f", "crates/nsh-core/src/core/terminal_layout.rs": "2f61af0880f743cf219dd01705c16ac4b466360070cb6c83175c8937f10db86f", - "crates/nsh-core/src/core/tests.rs": "471cfd1c8cab8a4d69befed58d566dcb828cd08c19dff441d1db645ff61d6bc4", + "crates/nsh-core/src/core/tests.rs": "aef531aef863c878a026de925e80e8d6e9a1574a71e8ed9a0f6102424c4d1292", "crates/nsh-core/src/core/touch.rs": "c468d27aca9d8dbe8a2087482de4c376775a08464d840f33364ee67898d3f498", - "crates/nsh-core/src/core/views.rs": "c398e116c5437f19c2c3a1884745fc234b3f6eaa8a7819076d4b0b61ac268df8", + "crates/nsh-core/src/core/views.rs": "79e6b28b56832a4cf0d4d726d4f7c2112e8df3ba2ba5b7aa82cb9468dbdcf0a9", "crates/nsh-core/src/core/watch.rs": "c30408a4d29a58ee7b172894dad40747a408a906c0671c1dbee52ad4a5a5310c", "crates/nsh-core/src/core/web_evaluation.rs": "a1a0db177aa46c853918081692efac325576c371cbd81d090bb7289e496698f6", "crates/nsh-core/src/css.rs": "edde9174e91105a1775275e6b6519ad7c2f0e928392a2c6961524a01c2399af1", @@ -611,10 +614,10 @@ "crates/nsh-core/src/desktop/login_item.rs": "ea8dbe0d99d08171d3c833192c8cf817ea6d85402ace051ef0629b2ebd0cfa6f", "crates/nsh-core/src/desktop/menu.json": "4eacd7713343435f79fcc61ab91d9c099a50e0dc3fd6a2554dfaacb62dfccbb4", "crates/nsh-core/src/desktop/menu_icon.rs": "4acc3a977567d704f4b6dcc952138f7b1acbcd4712ebbb2c2ef00d39fc8ce4e7", - "crates/nsh-core/src/desktop/window.rs": "2a3d258238ab66392df8b05b51681e7d0fb531eef6e45bae62dc1ebbcaba93ba", + "crates/nsh-core/src/desktop/window.rs": "17b100f8fb28760ab75c6ea2e724192e4fa2b7f29331db7a045c0fb38f3d8ffd", "crates/nsh-core/src/desktop/window_state.rs": "898223eb88cc886216ec919b8031bb13607e5d7e8d3527b91c86a65de53fd273", "crates/nsh-core/src/effects.rs": "78a089a2b7c845ddbde367547c8795dbffd273f36490e199c1cb016f043ed54c", - "crates/nsh-core/src/element/ambient.rs": "d39272c413b87a2ce31d8bf78bf6de38a45f2ec525d247c65eb5036a53e7e11c", + "crates/nsh-core/src/element/ambient.rs": "8512cd4c616699a9e318bb67d3c470676ef91028d3546ab40e0f2d556899934d", "crates/nsh-core/src/element/animated.rs": "e5253fb0fca929302eed7908e313863a9d53748fb60747a7bda6a53d4bfb7b8c", "crates/nsh-core/src/element/asset.rs": "92ac4db7ba46c8300a2ffb2e09fd03752fa50eb3ee17d1b11efacf7753841d09", "crates/nsh-core/src/element/audio.rs": "f170c940dd81a3efa4f2e2930ad88c77bcd51cdd6e80f3fcf828c40ea90b6bfb", @@ -623,16 +626,16 @@ "crates/nsh-core/src/element/call.rs": "887cce1e4e6db3b88ccfcf50124d0b36852f2483181f5578048248cf6c5fca61", "crates/nsh-core/src/element/callback.rs": "5b44b667cc5a69e3307b440a9b3f8bf49576166a2669d3ab3e69df5bb7bc9a45", "crates/nsh-core/src/element/class.rs": "ffd5a96b6d841bee2629cc2252b5564e500bdb01254eec2a34cf8680c2c1d0c5", - "crates/nsh-core/src/element/component.rs": "1bd75cb05a0b3a7b8df70794d65608e6352aa7bc1bc6199ce4b927af07aae663", + "crates/nsh-core/src/element/component.rs": "383ed45ffa09706f64240645475f8948393ed2349653398e1fefcd0ffcbe0815", "crates/nsh-core/src/element/description.rs": "de0bcf21c4a3344c5e637adc45887a953cd460c1edc8dcacd21e075de9f39451", - "crates/nsh-core/src/element/desktop.rs": "4ee1beaa4a87f1bffc199f2192c1389fccf7f609bc3641c1cfd56a162a7adc2d", - "crates/nsh-core/src/element/element_ref.rs": "fc7f308f0a428cd076836b49fb49208345d12fc87f9841be530eeb9a6251f942", + "crates/nsh-core/src/element/desktop.rs": "b1edcdff8400ff99cda38820137f77e68108daa43488cacc08374b29f2b3492c", + "crates/nsh-core/src/element/element_ref.rs": "846329375633da63001d862320a37058688a45c012d05d8aa5ad9660bc5218d3", "crates/nsh-core/src/element/engine_context.rs": "fc9f4487a2ec47939119d2c6f5c75dc081ede1feb0422be8127b19fcb129fa1a", - "crates/nsh-core/src/element/env.rs": "5068dcf8573c43fd63c96d7094155678e6b48769e302a4b14a9a84fe1420ff0e", + "crates/nsh-core/src/element/env.rs": "aca71295166b73ab7b8cd01984857202250bc9d5b7d84d720d509d5d5160bbfc", "crates/nsh-core/src/element/events.rs": "8d85e5f38a37f2a52110a2010742018fcfc2b6d70e716bb5a77941b11b76c822", "crates/nsh-core/src/element/flow.rs": "db9adf85bff6d9497ef824928feca5f231c0b8ecd616998fc1dca83a57faea52", "crates/nsh-core/src/element/header.rs": "d5011e48932c12e3e5938c5a516510edadd2703a24d8151588b524554cb33f63", - "crates/nsh-core/src/element/host.rs": "74ad70d600a1bac9814c22553ccefd7203a51fcc505e8c25f1d038e4565208eb", + "crates/nsh-core/src/element/host.rs": "6b99d3b04a88cc2b3eeb18d97a20f653e7eed6c7d46ce0f582c721aaa8eab3c8", "crates/nsh-core/src/element/host_events.rs": "2499d05f9cf8c901e5e8d5d5d24c7d9abc95a923a067618a1c41d6a30ab4fba8", "crates/nsh-core/src/element/js.rs": "250a268dcc4141e26d821562fd8c42b4525948960f771655832454726983119e", "crates/nsh-core/src/element/json_host.rs": "4af422f1e188325c102fbdfb14de370f274567b79552c28c5541c4d113630744", @@ -652,17 +655,17 @@ "crates/nsh-core/src/element/responder.rs": "e8ff6799c6c970308e97bd1f254da9e80a4af4c31798650fc3ebc76b8669b680", "crates/nsh-core/src/element/rows.rs": "cfb1d8546d71b142a5693791f3c917e70dbb782f2f79b330378f7faf4f00047d", "crates/nsh-core/src/element/scrollable.rs": "c387411dbc00ffbe739255eef1eee592d5228dc2826be1ae075f62730356a7b9", - "crates/nsh-core/src/element/services.rs": "cb72d51206a3295c0ab273d9133c0153d4ac7f80781dd4cc772c425292b7d51f", + "crates/nsh-core/src/element/services.rs": "e08664074699fe2136aa35d1e1a92a82d046b0e71124a7c746eb6fab71a82ee3", "crates/nsh-core/src/element/status_bar.rs": "2fff306388c47bfee440e1042f9143251fe0b210cd57a370e5e8a8247c537acc", - "crates/nsh-core/src/element/style.rs": "26e1007cf8d4a98f863839c6f3d822949c1b15ae8544d6f47aaa5e33af6f0da1", - "crates/nsh-core/src/element/system.rs": "ebe5a80af0c43c3c79376bee5d1096f65090335a57c89d0a0d179aedf7225541", - "crates/nsh-core/src/element/task.rs": "d416aed9d599d30575a52fa876c00e8646c2da46db25f73859e621897c55b9ae", + "crates/nsh-core/src/element/style.rs": "df13fdacb3fea0f550d27985b44eaf59c360522898eae7893f2abf8597b60c0a", + "crates/nsh-core/src/element/system.rs": "737f9ecfbec18074a0b9b338ef4ac49934de4ca526b101b910a13e6bc1c18252", + "crates/nsh-core/src/element/task.rs": "440f96b91260d355e25776dd3deecfad79dfa2889b90de50b45eac8367061e59", "crates/nsh-core/src/element/tokens.rs": "5f34f7542bf8a3b1cd67a9023fcf9df75b7a23c1c30b3f760afad3f1debabefc", "crates/nsh-core/src/element/value.rs": "6298d8d34fe5701e831ff231c4782167483b3f76f2154d76148ad5d5497161ac", "crates/nsh-core/src/element/virtual_list.rs": "7b447efd3983a51bb49fd4644b10ed494b434ed00cfb194258340118a6a6bc80", "crates/nsh-core/src/element/watch.rs": "4f3f95684521dd710e1ccd11591cef7ef8b83348b56534965ca05d5e3175ee69", "crates/nsh-core/src/fake.rs": "4eadb748786cb1f0ac5965b3484171904635138d9d6e3aae73251190d7f5b3a0", - "crates/nsh-core/src/fenwick.rs": "fef2ace47e1ec929e78e35a9da5bb63f1e5b691f039ad8a89569360d15c1a3ac", + "crates/nsh-core/src/fenwick.rs": "c283997d85f98af7e4b35289c7c75ac8069d816a03fa84b7922f466c36a5c1fb", "crates/nsh-core/src/file_dialog.rs": "45ebe4bb2698960c80930a8fdc47b11776a07d30a881a63f6efedb7078601f86", "crates/nsh-core/src/file_type.rs": "127a862ed9d4249a0a800d93f9e7160810dd9d28d157390764be0c56a82770a6", "crates/nsh-core/src/filesystem.rs": "b6211b899a5601b7d989e540775a611ea4650875aa4a0440029bba737dee145a", @@ -690,7 +693,7 @@ "crates/nsh-core/src/input.rs": "10672c8c92271d7e391b2f6ff49d975919465d5acc3c0a0762d2309ba624b448", "crates/nsh-core/src/js/animation.rs": "00489c14bebf850370eb7eccc245c6354949d7ebe4c22a896e6f437ff81ad0d9", "crates/nsh-core/src/js/canvas.rs": "63488deeb569838887d61a8b16075b6a5361c0cf01c57cddf657a2d93be75ca5", - "crates/nsh-core/src/js/host.rs": "03368c3dbbd5de7457d562a2438535010d19d9de052efaf3bf35b7bad0eb2de4", + "crates/nsh-core/src/js/host.rs": "f564259423a4f449de4f6bc5fcffbbade39ef14fb07ce29b13740b18a33dd3a4", "crates/nsh-core/src/js/host_values.rs": "ef7bacd4e901a084b76335f8f063bc516fd8baefa6a82c61d289cbb2a388b543", "crates/nsh-core/src/js/limits.rs": "44bafb43b6fc14a6899f7f7219fb8d7505485179bc0ec470f76d9266d9b35fb3", "crates/nsh-core/src/js/mod.rs": "fd9d07961786688dbf65526c9e0874a1415d1d5e2c7655546d48efa3041dd80c", @@ -698,27 +701,27 @@ "crates/nsh-core/src/js/protocol.rs": "3ee30a192ff6e435bf2dd269702dbd084a0fdf8b296ce5454552feae55ef7a6c", "crates/nsh-core/src/js/style.rs": "85ba10f88ec1dba7208eca5f1f3c5743e72553dae8d2da9f85f83bd22b500a2a", "crates/nsh-core/src/keyboard.rs": "196af6dc386de25f5f2331ad9588f2047d3369b3475fb9bc94c34993ae990543", - "crates/nsh-core/src/keymap.rs": "0e7fe61a2caf5c0bdb22924b2fa591a72809aabeb9681bbe225d1ee68160ad86", - "crates/nsh-core/src/lib.rs": "0b2279b2ac7557745a7a9c845c57c36169579692bd58a208ce5e5609d4ec671e", + "crates/nsh-core/src/keymap.rs": "d6bbe46c5bbe330f2affc7144cf871ee8a73e0ff68a68e1065e2a675a02ede38", + "crates/nsh-core/src/lib.rs": "69db48e05378a424365d531db57466dacd748d55683fe26290fd64e4b71d9d21", "crates/nsh-core/src/list_diff.rs": "f000373ddf751b2a76b43f52dc2a46f25009338e15b1cef4c4d735a10b1509f8", "crates/nsh-core/src/log_file.rs": "d7f70dd5a1ffe2e1e016ebf96f4c668bd5e1abc297b7467040085f9aeb692910", "crates/nsh-core/src/main_thread.rs": "4bfe39ea4977b8a5e3941bd7901b0c4410906a18b54ea42f7cd73f5be8b167c7", - "crates/nsh-core/src/mobile.rs": "5883426f4a87fa1193c0ccbf32e4cf5adfe0fb60b2095a5a82673260aa28c0b8", - "crates/nsh-core/src/mount.rs": "17a4c277ddf154206d1e53d04ebe0ff56d324087a0375fe21d68e244e26ccbc6", + "crates/nsh-core/src/mobile.rs": "63cd33738ce449af5b8bd9ec896e847d86b6b83e9ba713fbe59f3fe45a9f4343", + "crates/nsh-core/src/mount.rs": "a3dfceb6196aee8cf3eb3aa271cac555702a82570a7eeecf3fa0039f34820648", "crates/nsh-core/src/navigation.rs": "34b5ff9704677968185490df673cf001cdf61780a8b72ed5a2a026490829acac", "crates/nsh-core/src/notifications.rs": "4340d35c0508915d0ba48b7dae0ada16179bb22fd8579a2365326b67300daffb", "crates/nsh-core/src/open_url.rs": "abda567eb3d5fef62d8ef75dc7c3454270505da30bffc1acd3a633d5b395d79d", - "crates/nsh-core/src/ops.rs": "d9219598177cffb647ddab6512d0cba42f1f294a295f7b0774fca8831fe767c0", + "crates/nsh-core/src/ops.rs": "8cb88143fc0b68ae6188611fff91adcedce9a313a008608588125176e11220d7", "crates/nsh-core/src/overlay.rs": "0063ebe493bb2f1b20b1ee5088cc75263a00aecfdb48f658fceada0d7fd1e7c6", "crates/nsh-core/src/picker.rs": "a4695592ebd3650812757e5d49aee48f3c212268e8c324c0fef36f0f6fe52238", - "crates/nsh-core/src/platform.rs": "1612c7173e405a354d187aee249862ac172bc8f73a9324c85ac97a3590b34c6c", + "crates/nsh-core/src/platform.rs": "c66c2a68cd7495aee1dbf389c7a4ff3a486cfed4222c3e397c38c6e286bd6175", "crates/nsh-core/src/platform/clipboard.rs": "42fd227277760fe1df388bd7c2ae63febc79a43f115da161f4854d9f87e2c9f3", "crates/nsh-core/src/platform/web_evaluation.js": "53fd91e63a9e3537343e00814a9582dfa44dd76e5b2d7259299d32419fbfcd4d", "crates/nsh-core/src/platform/web_evaluation.rs": "b4c9ec345a30d35ce0713d2e1cec0a6bbc89559fe4939d9d1e1643f4194b2d9e", - "crates/nsh-core/src/prelude.rs": "7f8e494664ac3d0861b39719aa9a5195eb606c47f630fa0522c4f83538e84687", + "crates/nsh-core/src/prelude.rs": "39b5d49ce2b223fbc02feafe7b76078b1de44a148d493bc4ff10d6ac8cca7597", "crates/nsh-core/src/props.rs": "ff3651d3957a6af39fd74679ba304161bfb70e5127dca116ad701eaae00c90cf", - "crates/nsh-core/src/reactive.rs": "140bed6e2255ac2724587029e5a07a03df532bda7d63170000d99905363216c8", - "crates/nsh-core/src/reactive/tests.rs": "ffbee5a80b98cd59acbb2c4b577a45c954e0ef07eee25c7a7753bddd9ee6cabd", + "crates/nsh-core/src/reactive.rs": "59f5793e9e78693c46e141b8132cdb1c6e5be0d2343a8633ae977fa786615102", + "crates/nsh-core/src/reactive/tests.rs": "670ff7856139e8ad60f0238c6f1bd22f4fe7a9a19983bc200dc7442046392ba1", "crates/nsh-core/src/resource.rs": "ddcb0736e76fcfc5c14d5e1fa365e3ceef821d4a0a14fd3925147b6a38db402f", "crates/nsh-core/src/restart.rs": "97b94abda605829b4f1580cb9e438d6e332cec0c2ece70b15a21841095724f0a", "crates/nsh-core/src/runtime/accessibility.rs": "975e7f00ed54a49c8089b4114e1b611d598ebe6313fc811e678a0537c633093f", @@ -730,34 +733,32 @@ "crates/nsh-core/src/runtime/device.rs": "b4a28774b97f826243abdd46c324fbe754d111b7cece9a53cfdc70bc85a91858", "crates/nsh-core/src/runtime/fonts.rs": "a90b593077a61ba65af507fdf578ff4cdfb3f6897b380adf1f8f1fd94714a087", "crates/nsh-core/src/runtime/fps.rs": "1e5039107851507e68ad0636236c0498e662a51bb71611eb24b51ebfa6e0e381", - "crates/nsh-core/src/runtime/fs.rs": "68171f2ded1c932a0d3eda1457ade5abd8eaafff08d403bc3aaaedaf3ac27a37", + "crates/nsh-core/src/runtime/fs.rs": "44d1b0cb32de7c68d59cf02e0f1563145f1059306b7515f8536bc88dc74901e4", "crates/nsh-core/src/runtime/haptics.rs": "564534a1b0ffdf0163cf6d8d27e39e3d83c7fabddc24b0c39ed6d1d705b8f7f6", "crates/nsh-core/src/runtime/host.rs": "03dfa8f14a7b5f64da31047572b566d6f0efb9b19f863a4bdaf1b1e5cf337863", "crates/nsh-core/src/runtime/image.rs": "0fa1b45a8c295134e1e66a0d1e6238135f56c1964aa0fdc483c890da7db3fce6", - "crates/nsh-core/src/runtime/mod.rs": "c2c3e6bfd6ca978cc538a5d846e07f2e4c508adc6babfa52de23d514df22bae8", + "crates/nsh-core/src/runtime/mod.rs": "fde38091ff9be40329ef3135eb6af7b366ab5c3f321a9e24c5b466ed43e6be7d", "crates/nsh-core/src/runtime/net.rs": "9fdfa05c9d5b5e7ce76d28b6c13d8f7b05a81cdb950398ba26a3b07ea2f281b1", "crates/nsh-core/src/runtime/notifications.rs": "c4d2e1813a60bc5f2d6eeeafc11bb031c605251c887a745571b90caa9291011a", "crates/nsh-core/src/runtime/os.rs": "ceec866df8c64334373ba715e4a64816b1be1245bcd1e2454c7b67c60f2dc30f", "crates/nsh-core/src/runtime/picker.rs": "8b18ba13feede132ee33a859d8baa3b72987d7059388cd2bc1d5238ac39f7bfc", "crates/nsh-core/src/runtime/process.rs": "f14ae9880ab1ef634b6d2af5d0315237d8a7455090ae06bf5afb912a5dde3877", - "crates/nsh-core/src/runtime/share.rs": "a8d57f346aa6258a96261d5b87ed4e7fee18bc35ceb28112b4aa5d7b06e3b74c", "crates/nsh-core/src/runtime/storage.rs": "2895713fcf2bb99c5fb7d48f30ab800bdc032cb8e9207f96f5a79450e6ea08de", - "crates/nsh-core/src/runtime/updater.rs": "e420b850e2422e16a3edc463e02ff655136237d83764e6c8b0ba5f768b074818", + "crates/nsh-core/src/runtime/updater.rs": "0ba2c883253214c5cbb54a0511f647546691388a78bb25ba408e70767203902f", "crates/nsh-core/src/runtime/updater/prompt.rs": "153c321333ce4281f81356322d461149ea8e33f66ae5ab9450d7c01402a024f7", - "crates/nsh-core/src/runtime/url_scheme.rs": "07290f70bd7cff7135f624b4ec6aeb9c80619259a60f503a0d513dbfa9413c63", + "crates/nsh-core/src/runtime/url_scheme.rs": "50a1e44fac9bf5d98d5996193bccedef25b06f04d0036fc828fb7b4730351935", "crates/nsh-core/src/runtime/websocket.rs": "e80b44d5ad58f777504cff9f960af31b3e864592da5269d2539460b136d2d164", "crates/nsh-core/src/runtime/websocket/native.rs": "2f177b206386a8f067e092cbe0b463bcf83932a84b051e0bb1e39b8f1f339c3e", "crates/nsh-core/src/runtime/webview.rs": "5f8b10e9a10d4ad36e6f743848c5513ca7a5da31147397fed8ebce1d592cf6de", "crates/nsh-core/src/runtime_data.rs": "6972c36cc09299c492d99a48ea97932712a1a5de72d1efdabaa6914f27eec7ae", "crates/nsh-core/src/scroll.rs": "e44e6816999b8fe5d08dcf25513eeb309399a5f1b242cbe1b41cdc07a1f02e28", "crates/nsh-core/src/scroll/wheel_glide.rs": "38b08e6c2eb76b2380ca576b2d73f1afffc7dbdc15b256915a70fa15b52c9450", - "crates/nsh-core/src/selection.rs": "68886a2bff0f0b5cb29d9e6a972ee3720fcfe81dd2df16f8078039cf9fb6dfe1", + "crates/nsh-core/src/selection.rs": "661c3bf8f731635944f7cee4b961c1dbe5ec7906d13773c526daeff02ec13ac6", "crates/nsh-core/src/shader.rs": "842419ea92a949bbbf7f46d71065c975797b0ba6895c5a290a0c2ee6b895ee5b", "crates/nsh-core/src/shape.rs": "83ae1d63179f16796ac750ecae9fb38dde64cac64820db915d47659e8c7f362b", - "crates/nsh-core/src/share.rs": "79032e3560fa2313a9e893d4d9318052e20cf560b6ef620e25f2a01f0abe3591", "crates/nsh-core/src/single_instance.rs": "380bdccc9ca3d2cdc5b65bc3e5e44d7ff7e3572abd9125fb29d061ee54a8266b", "crates/nsh-core/src/storage.rs": "00d5977fbcd94768a11d2f563efa7ec767350be4cd8ee4708057de69249a9067", - "crates/nsh-core/src/style.rs": "72c08c922701a65f266a1159258a2473af526492c33da867347e1309a9ff9772", + "crates/nsh-core/src/style.rs": "fe440ff3d9d0cda2cce2b6f3933e82dccdb82b055fa62f1c75b47a142c75ffc7", "crates/nsh-core/src/svg/drawing.rs": "4098af399cc96e1a981b4d402cacce5663a5d3839494299154e04368a9c2766d", "crates/nsh-core/src/svg/drawings.rs": "13a7691025b558fea468e5a5db7b25ca0e7406c3b1b1b86809bc981726405773", "crates/nsh-core/src/svg/layers.rs": "7fc31399d856d03be598a449f774b2f7f991506229b69d6d916a09d52add0492", @@ -774,50 +775,51 @@ "crates/nsh-core/src/tailwind/tests.rs": "b48d74a9e1fb29dcf9fd4b47c825a3cd790424e0d0eb7c8916dba21db6dcea56", "crates/nsh-core/src/tailwind/theme.rs": "4c789437020f2df3b211c079a9b97b86eed33e18a8f2eff38a8d2506b59a33df", "crates/nsh-core/src/tailwind/utilities.rs": "b0f92c6a20de19cd5fb1a4bb70db025850cfefb6a7d94587869190275d2008bb", - "crates/nsh-core/src/text.rs": "759f2d3ccd39dde720c34f3397a42a37a0f89f07b45d15181aa31709178e0a14", + "crates/nsh-core/src/text.rs": "6f987b2208b91029006b6ac7c0072bbd97677d3547e1e33e830262af82224026", "crates/nsh-core/src/text_edit.rs": "929bd7f4a710833d0f286c5523740bbf3ba7fe5254e2d3fb9190d6f951a634a9", "crates/nsh-core/src/text_source.rs": "d32bc6e9f66f085b7ae838a0f1dc9275be9fde648ae34af98de1e061813ba5a6", "crates/nsh-core/src/time.rs": "f6942879ab021cf1846715f0fe56d279119d177cb393f9dd20c8617ca3f4ef25", "crates/nsh-core/src/transform.rs": "3ed6f38bf08fb0ccd17db22e810888f497cedff5695c5b4a6d0bafa0a9882f63", "crates/nsh-core/src/transition.rs": "549ac20aca31d73173840d52b770bda41eb6aef56f209b5a7689fc4f1cd549bc", - "crates/nsh-core/src/url_scheme.rs": "c197d6a6a84629c902b4b9f9d09e4fa2b29b55d2f017c2928c5cfe9412d8de6a", + "crates/nsh-core/src/url_scheme.rs": "56732d3c12fed1ffd47276f36c829b3bcea2a955caffc2515eb255830759b6ed", "crates/nsh-core/src/web_resource.rs": "b4eaaf4aedf5838b2071728d1bda51f0682dd8cc1e5b8c787f2a35a722e63d78", "crates/nsh-core/src/websocket.rs": "a0b33809b289dc2199593bf0187c98ffaa7acf496d07bd0fa748cee98e3d04c4", "crates/nsh-core/src/webview.rs": "7e23511ce016186a70ddcfdf34b33680d7b09cc52b6e4e52b34b9672807e6b38", "crates/nsh-core/src/webview/downloads.rs": "102c7d3734664db079904ac6f6f5c1fcdc17ab0039ec75bdcb9a223b4834ac69", "crates/nsh-core/src/webview/downloads/coordinator.rs": "db350b8e642147097a86586becf6f6c116fa41dfa129d035879f7134dd139c62", "crates/nsh-core/src/webview/downloads/shutdown.rs": "752f4c31f3af2a273ad1139e50d356b89d24d7fad12412330c245db4bf7509a8", - "crates/nsh-core/tests/attachment_compat.rs": "6f3ad9423d54035eceedfa8ad138efc3ce9f1692b651e7fcd7574dd61f57a9b8", + "crates/nsh-core/tests/attachment_compat.rs": "f3ca054da151e7295934fad3010d0f6b5d98ae8b9e199b4c5d02c476e7c623f6", "crates/nsh-core/unitless.txt": "0816550a0054542a0646827f28d89f3f9c1014308b2a383c743c339c777e01a8", "crates/nsh-core/untyped.txt": "2dbe1d080c08c33debbf4d4c27ae0a08996efa87dd072494b7d0ce712109d2d1", "crates/nsh-dev/Cargo.toml": "4fb0b3729fee8c3d8cbcb6c58e1310050b1c6e6eff4ee065dcbc95e65febddc1", - "crates/nsh-dev/src/client.rs": "16d937c6ba11c52f00ca62e4a29b292706bfa80af5135ef61f2c76a930699eea", - "crates/nsh-dev/src/lib.rs": "5ab70265d0446186802b942c849ac83cd0bb7cfeb2ca3f69d163dd56bbac3fff", - "crates/nsh-dev/src/protocol.rs": "9608bd4598165c47926dc0ee12b1fb14af623aa38ef98634894f88a5196734df", - "crates/nsh-dev/src/server.rs": "e471ebef1f39f5b986846e186c1ca4127b67611fcd13a19e0361baf46db42655", + "crates/nsh-dev/src/attach.rs": "74d9a9b5d7d30cf316523c5ad9b231e4a0ceba51b489c8f3e91229aa0c0cc4ca", + "crates/nsh-dev/src/client.rs": "b442270f013370ab1053c479fd05760922162e7ea21e0e4153f5992971c774ac", + "crates/nsh-dev/src/lib.rs": "dd43cd8eae7aaff6c6f1295b70f1eea8353268d66d1ca12b15c12c78a0c04713", + "crates/nsh-dev/src/protocol.rs": "d7ee1fc1b63ab0a5e18d93415e202944ead630cfb452a2c0b975fc5f0c731286", + "crates/nsh-dev/src/server.rs": "122f8b7499da18cff9e0d3a16a83bb957f83ae566a2376f69bbee7765fbb8e8a", "crates/nsh-dev/src/site.rs": "dc8d0bcaec09befae932d6ea02bdbe097b8599b8da951329ae74f1c665e245be", "crates/nsh-dev/src/tests/protocol_drag.rs": "c37c1e3d853b13354efe366e6e5ba29155c620ce722bede50915fda9610e66af", - "crates/nsh-dev/tests/roundtrip.rs": "3692c8e1190ff6e0ecec26b443c2820becdf5cf6e737954fa465fa1ab488ea54", + "crates/nsh-dev/tests/roundtrip.rs": "38d67eb9b0c1632e6478632712947348e4ae7da994e7fdc6355101ce8aa74451", "crates/nsh-engine/Cargo.toml": "8d98a6a7624f10c821fc782a88cf5769fcfd3dc1db1d87174ada0e398e00f655", "crates/nsh-engine/src/access.rs": "90a8b0cc1228d14ccd824ca0237e643e27269e19f1f9e70269dd8cb237555557", "crates/nsh-engine/src/app_directory.rs": "bf99d20949b392e5b919f8185a6e234308d53ae7db02c29b0d18ce678b74986f", "crates/nsh-engine/src/browser.rs": "d887d405ed6ac51a1a49e1c81ef0b06989ae87556b586a0b90e37180fa5c107b", "crates/nsh-engine/src/cache.rs": "f18f8a5658d02c55a8aa528302292ac39ee3192d372615a65f87fc300c3b4148", "crates/nsh-engine/src/error.rs": "54bce4d455c05a1c37b3e0ce8e46271492369855482283ffae3851605b44bc51", - "crates/nsh-engine/src/frames.rs": "c766abf969953b2a965ee4082df35d1d18cceb096bb45ef15b7c65b19683ad8a", - "crates/nsh-engine/src/gpu.rs": "c66b0a011cb7cf743ae7fd5e5da8cf4284925b7f63ceebf63633ee60ba8246e7", + "crates/nsh-engine/src/frames.rs": "85121b2daa269c199d110134cdbb68b267d9e128d7faa1bc5ef1b3af39747795", + "crates/nsh-engine/src/gpu.rs": "990718b1d28ccd07f96b75fe2b494aae955a768fc63c152f444f3f76dc608c7c", "crates/nsh-engine/src/gpu_off.rs": "42395ae31ee85e5de65606dba2d837a916cb19f8f64a88ace3ab31acc2124deb", "crates/nsh-engine/src/host_channel.rs": "b936b35fa859e202023820519cf7c760aae534645264809a318e8a6f97a47952", - "crates/nsh-engine/src/lib.rs": "76b1acbe415e925f542e53f18726727f4230dee1cec9b564f7c19e2f3a4d3006", + "crates/nsh-engine/src/lib.rs": "00b72d385213f5c991e35ed3a7400dc0ddfd51f34fecec8a6bf9568025f5ac80", "crates/nsh-engine/src/local_storage.rs": "bf75d06d4d917a14b6d4f08abb10d385c68ed4ab50b6c70c4851cbc72ad3f631", "crates/nsh-engine/src/logging.rs": "5b12d14db31b4be422a80b1a18425fd1bdfc92fe46b2d9a93cdb2497eafe2818", "crates/nsh-engine/src/net.rs": "60eb5dabd47e621a48157e2804eb75883afc3848dbe224bbde738f593879c3d1", - "crates/nsh-engine/src/perf.rs": "8bf23535abb4ca940c0d776d944aa81b2590f66f681216e939ae0a986b03f136", - "crates/nsh-engine/src/script.rs": "552ff7fdc447fff2b98662823e8a7e20be56d42e095accd33b08b7855e6c0842", - "crates/nsh-engine/src/shader.rs": "e069ea7836cb7c4fb8609ef7c59cdbf631c0ef5a324bec95d2ec0a210130a6fd", - "crates/nsh-engine/src/shader_frame.rs": "33961653ec914e9d1d80f84b26db1718d3fb1f21ec39efab79c11a250704831b", + "crates/nsh-engine/src/perf.rs": "8f5f966b2c138e7f46f0b7e35d6bc6b1326786f4c605f3e7da995709a8465b27", + "crates/nsh-engine/src/script.rs": "f78bf17fb605b7624bb309afc3893f31585dbdea812502d3f54adce65af107f0", + "crates/nsh-engine/src/shader.rs": "e8b28951f2eaa3cb9385b10cbfb6166196f202ca6f61e248a8db6282df4b2715", + "crates/nsh-engine/src/shader_frame.rs": "307ce8db37139ae5e7b3b871011559f74b4a02af02b47bbfa91e1243305dd3b0", "crates/nsh-engine/src/shader_off.rs": "430aa83f8516d890fd8c115033cd744982b9b73ca40a81339e7712015dca9aec", - "crates/nsh-engine/src/shader_surfaces.rs": "6fb202778782b2c536d9b9636ba16c464b6d709e6edf5f801fb89170b10f225c", + "crates/nsh-engine/src/shader_surfaces.rs": "42884cc392cc3eb5962cf41ac617feb9f8d61a63ee75a83c494379719a155e73", "crates/nsh-engine/src/shader_surfaces_windows.rs": "c4269f287da89489ff2ff046f413cc44ccc47bb6a84dc1369ed6761f7a8304c2", "crates/nsh-engine/src/storage.rs": "5ef9a862f7f688a4faa970bef97f2f2030ab336174c2538e787aa3be9e928e8f", "crates/nsh-engine/src/symbolicate.rs": "974a80ff547e60e682ce2691e83346f02123c549b5f92899e84dc41b29fdd094", @@ -828,7 +830,7 @@ "crates/nsh-engine/tests/engine/clock.rs": "15f02fd04d3853e33e3d0af9402861c04437200edb200b6a644e8c98bd0237de", "crates/nsh-engine/tests/engine/compiled.rs": "aa865e55f04f307254bf6f965aecddda3dd1b805f96d01c84e8c39e24669c598", "crates/nsh-engine/tests/engine/component_bench.rs": "aed84d1662d1a1b02015b899bad219ec5c5754b2f910a7960125dddf9dba9bee", - "crates/nsh-engine/tests/engine/components.rs": "bb110e23d086aa39e6c8570a44c1956f6ff730acacadb6b7b03da3ba40b586fa", + "crates/nsh-engine/tests/engine/components.rs": "72a283d448a1a86d9496baf9a7fdd1fc28bc2fcf29c0ba656719fea48d01e1b1", "crates/nsh-engine/tests/engine/counter.rs": "0fa1717513dab9cc8b566c6fad47413801748e2ddc7bb4d6b2b31e816f677196", "crates/nsh-engine/tests/engine/errors.rs": "18b0f21513956860868030ebaac70399a258786643d7a95b6ccb16cb9a01493d", "crates/nsh-engine/tests/engine/external_wake.rs": "ea030d8c7893ca8814e5ed2f3f38952f6bfcf31a6316f6043f3357e843634b8f", @@ -848,7 +850,7 @@ "crates/nsh-engine/tests/engine/keyboard.rs": "9c89b61d724296a831345064809d469881751d6bb11f2a695e5572566e21cc64", "crates/nsh-engine/tests/engine/keymap.rs": "59eff762a41f53045c390d83f8166e9992ebe9491454e873585e4533aa7dc9bf", "crates/nsh-engine/tests/engine/lazy_each.rs": "3b5955fff38cda91efede9938ba14f7c01171055790f9d8cfaa3c006c2f28a8d", - "crates/nsh-engine/tests/engine/list.rs": "d7a8cc1e8946432c273151eb7dfa0b10f4e2efd3b94d033f18fe89078a539d23", + "crates/nsh-engine/tests/engine/list.rs": "4043824a52bc4acac142a48b8560e0aa8920a720b8d87966c7e92d8f10810e08", "crates/nsh-engine/tests/engine/list_bench.rs": "fa7a3bd21436612b8324deb6ce571d77f133f7d01228558632e62a5101a6d2dd", "crates/nsh-engine/tests/engine/login_item.rs": "a211b92526afb48c90c3e6e4c3a325c10c09cfd3239ff8c644c6b17a7a7c4690", "crates/nsh-engine/tests/engine/logs.rs": "22201bd9432b8e3801064aba2a5b77d3a64f4a4b148133af5a39e2e26a33c0e2", @@ -857,7 +859,7 @@ "crates/nsh-engine/tests/engine/net.rs": "d928cd313363070610312ed5c801ef38247780e0abdf65993892925dacb42924", "crates/nsh-engine/tests/engine/notifications.rs": "a4da258aa620a82cd602dfafb107c2c3f11d3cf1458c5d57cb881b07580bff9b", "crates/nsh-engine/tests/engine/open_url.rs": "4a36eff7d6dd494ef24a831e88688cf09d40f2123b8b9b0bb6028e11a9236ff4", - "crates/nsh-engine/tests/engine/package.rs": "2eade0ea5acb56097b218da2ae2ba6a9cecea013acec0e70e271ec890ee14cd0", + "crates/nsh-engine/tests/engine/package.rs": "27051900a542109e3c58f4f2ced3a89a5c79bd4e2265e8706ea983f065a29af1", "crates/nsh-engine/tests/engine/parity.rs": "c29794ae6838f9e67ea28c33051400e992be9538d90ed84ceb3a9432c684b588", "crates/nsh-engine/tests/engine/platform.rs": "38025c1a8e1dfff82bbcada3151030305ed594e2f41405295be846c02c64aff2", "crates/nsh-engine/tests/engine/process.rs": "5d5780060cf9cde84dd2ab92bcfb9f56c5e3789514fb091cb7d0b122a08411ea", @@ -887,12 +889,12 @@ "crates/nsh-engine/tests/engine/websocket.rs": "69665038a0476beafb42b0ab41c15cb89d920e66c745210d55173e401e043013", "crates/nsh-engine/unitless.txt": "82795664da97c872cdc28570698d0c7073562f276afd8ca51137211f9952fe05", "crates/nsh-engine/untyped.txt": "0e94c66fb47844aa29a7b5deab131001f3ab89ea46e79c1d75679bf618788c10", - "crates/nsh-extra/Cargo.toml": "0165197c261be90e558e212e3faf0f6dd904c66ba8d00370d1a37937593be8c9", + "crates/nsh-extra/Cargo.toml": "f2d35095d8224133f90bf7da3952ce48cce6364bf625ef320b27c03a5981c6c4", "crates/nsh-extra/src/camera/android.rs": "41ca4f48a1904e8e21cafcaa09f41189fff7d1e32e8bfbbc8268eae6dc192bdd", "crates/nsh-extra/src/camera/ios.rs": "f71869876c078186cc7432e7fc49b6f4d1ae3f78c4d1412c83a80b370bfa5a34", "crates/nsh-extra/src/camera/mod.rs": "7bcf405ec2d6ef78ca0ea55b13d371369c4d6df72d5001bb27050068c58afb2d", "crates/nsh-extra/src/camera/tests.rs": "92dfdf22b8f5e5120ac51794955f12793f38affa4aee3f20e4ec39a94304d582", - "crates/nsh-extra/src/lib.rs": "c152b126891c1c5a580017f69cefda2e4698d899cba504ae9ff6de2dcdd20774", + "crates/nsh-extra/src/lib.rs": "be54d03463d24d03a9e5da6fb7545fbcbfcdae3b512c9cdbd67691f028da6213", "crates/nsh-extra/src/location/apple.rs": "c7dafa214001268f0d59e60c9f77a1a36cbb1e3b7bb0451f72c563dfefe15a67", "crates/nsh-extra/src/location/mod.rs": "5b8da42d1c5f4d23a838661e9ae8379952f071865de808571ba9db3ba7bd2f7d", "crates/nsh-extra/src/location/tests.rs": "6ccaad43c5baa0acc5e35bbdc540dcfb1d3c78055cb1bd3674de45709db9411d", @@ -906,6 +908,14 @@ "crates/nsh-extra/src/push/ios.rs": "e2ba3e7e50e7c36f72c8a3465e5bd252f41924b444949e2d1e3320d73bd34061", "crates/nsh-extra/src/push/mod.rs": "8733086cf2490afa5d16c48289750115e2157e52e5e0ea01eacccbef8394d8c5", "crates/nsh-extra/src/push/tests.rs": "aae5d53caf4bd941b300695f82a9ddccef54c7e77a769c84cb7622a2fa61449d", + "crates/nsh-extra/src/share/android.rs": "9b93a6d6a3e97a1ed1e84f97bdda75b8b2f70ec6185c8b9d2ec06241187f3d4e", + "crates/nsh-extra/src/share/fake.rs": "424b7d47423e3f3a007aa5f3a5d254c104ad980ff81a6e2e3176cf14fa46138f", + "crates/nsh-extra/src/share/ios.rs": "8ba6ce8735ca0b564a67ceb78741979534c5aace8a0f171cdc20c917c83f17e4", + "crates/nsh-extra/src/share/js.rs": "eb8b61a7a8df5a2ef6989f71847db16c19bdfa3dfac2444f3e6edf2631fbad56", + "crates/nsh-extra/src/share/macos.rs": "73a6716e5aa13418edf1ea3fe832e8a188142719e6b2da1154e5e8d24b0e1fb8", + "crates/nsh-extra/src/share/mod.rs": "62c0e914f21ea11fe6107ff28a4e90e9aad8775b36b0ae2ad7b1e58b0b87c7be", + "crates/nsh-extra/src/share/tests.rs": "ca9a2573f2a3741d810bfb6b823587d334b4d87cdbd361ebf2f35b2086d607f2", + "crates/nsh-extra/src/share/web.rs": "1b4224b4521d0d12e0ebfbb6dde8bf8d265d9a07fef499caf1330f393140046c", "crates/nsh-extra/src/speech/android.rs": "9ad37cd856b362a66b7468fa05fb27f91e0099d95e80538dfdb8250375fcf80d", "crates/nsh-extra/src/speech/apple.rs": "02b874ed18bea48ade3939604434a02dfe8fa8987d1f09d87c605904c3df05ea", "crates/nsh-extra/src/speech/fake.rs": "c23c308e4ca308c6d2be3443df7308d3aae23da2b115dcebc759de4a7eb902e9", @@ -913,7 +923,8 @@ "crates/nsh-extra/src/speech/tests.rs": "6bbd01237b7b7f9a97c5b4f9f8d37d38122eae72893069ecf4786a8e6a60fb51", "crates/nsh-extra/src/speech/web.rs": "f4577673827cc3d0d0850396ebac34af9670c399224fec98ebd9b37d8db21455", "crates/nsh-extra/src/speech/winrt.rs": "e92980f54a274e25b2e244abc462cdde6890868d8fda11e7f40196805d1c9bc2", - "crates/nsh-extra/tests/extra/main.rs": "50dd7f4d1ab2512a3d5380aefd28922f3f771dbcdb0c6bcf8818d438fb429e82", + "crates/nsh-extra/tests/extra/main.rs": "a058c1e18b71d8e384fad60bda46efb227f0cec825f13624757b61e27132b536", + "crates/nsh-extra/tests/extra/share.rs": "9a1494a013793ff75c814d804c53a46a8e25b6c5e8ab5f995f6b413e9a660090", "crates/nsh-extra/tests/extra/speech.rs": "35f63a054bc54bf435a34a29df7f2f6276610f9e9ff6dd9c6b79b4b9aae3ecba", "crates/nsh-gpu/Cargo.toml": "e59210b3a59600a632bb01a757973632cec4284229a7d9e0692cc979d606e145", "crates/nsh-gpu/src/lib.rs": "a5f3f89834d1928a8feab2f4e3f6f7eade7bf1f75e6c550d241d8e35bbc0bd58", @@ -957,28 +968,28 @@ "crates/nsh-js/src/clock.rs": "06c083117a5eaa2d2deddcb41e52ab9e1a9f48efa72d6e9a0f27135bd237b161", "crates/nsh-js/src/components.rs": "1f367b2e49bd543ba8f2c1c4b7c8c979fb5542384c0864a55acc6bee03e1a574", "crates/nsh-js/src/console.rs": "2bb26f43b5326680cbaf9ab1fcc58fa0ab049c349feff6dafd39c99d4240f6a3", - "crates/nsh-js/src/declarations.rs": "3afd35bb9acd3ac44f5d1d38f18f4ba3f737371f72aaca405c88275f71979aad", - "crates/nsh-js/src/desktop.rs": "8b1148568a56ec29626dc24093ce91c2dbad060dfb694575bc95080bb4e0148b", - "crates/nsh-js/src/dom.rs": "dd12874bb3ba60bac7e1089d8e69cc295ec6263bc242d955d2069e4ad9847603", - "crates/nsh-js/src/env.rs": "d7a94c3dc29eb38ae1295699192775cbf23ff6ec6eb9d4323b72f030895b5cd9", + "crates/nsh-js/src/declarations.rs": "1415bb7349aecce743359f4d2caa1c07145826b288d7f3aef4d9fbac2d73b300", + "crates/nsh-js/src/desktop.rs": "f6df0aa95da0b9468430e70af5b8596531c63a2e83fbb0ce4fff1a12aa9a2ad3", + "crates/nsh-js/src/dom.rs": "fd33db8c947d28509181f660f9f345a827329b8b7e50e5575f5e3461ea3cca96", + "crates/nsh-js/src/env.rs": "b3f778f1583efa0a98d594be4e5c64e0285e166c9492cc57d995cfda35b6e0b4", "crates/nsh-js/src/error.rs": "01a5f911656faa39aa30dbcd71789ce30c35b3e740c5f3ec5125c87b85282bd5", - "crates/nsh-js/src/host.rs": "f6886fce435432bc951eb6d4b02f49b2336cb9d10c8e887587254ad3d0dece2a", + "crates/nsh-js/src/host.rs": "246c60075d8f2445cb2da8b5419c4ac26cf5bce8c04cc262e34231f925c3c5f6", "crates/nsh-js/src/host_channel.rs": "1a2c9050ce5d3dfa24b0803654dff41c78ad32193e4305323b1e9702609d29f1", "crates/nsh-js/src/hot.rs": "e532219786cc033abff54597e3444c29137c140d1b94cf46e55544e282ec1a1f", - "crates/nsh-js/src/i18n.rs": "3bc73128c6aa2a3c04e8847dca9dcc49ad080c49d4b64a6bea007743066fc635", + "crates/nsh-js/src/i18n.rs": "bface8075a6f881d8af2c04ead5c89504d738475c941abec5b5d8039e27b2cde", "crates/nsh-js/src/input_action.rs": "eb70b0792eff82ccda139f63700656167ac04753872fca2aa63485673d9ab047", "crates/nsh-js/src/keymap.rs": "7501928222da4630a39b47ed7855cd660751b2394e8357dfbd1ef9e031f79c63", "crates/nsh-js/src/lib.rs": "4bb94d25acf768000c6a39ca1e035458e3c86f65966f76aae7ff342305c58e69", - "crates/nsh-js/src/list.rs": "9991fb1a5de4073df402e3f868cb46e2427a3c43afa704374aa0354d754b2b0d", - "crates/nsh-js/src/modules.rs": "6ef224e56456d2208c566364d37e3da184f540b5d5db3b6727e57bb872603faa", + "crates/nsh-js/src/list.rs": "23ecd9fdea241066b365c78bff0a936992e7bd6728ad3206789d72e9e8ec1f12", + "crates/nsh-js/src/modules.rs": "6984c21e5d9c4ed513919ea168425833bb739cc6022e5131983beeaf4632f049", "crates/nsh-js/src/navigation.rs": "0795acf0029524f6568666cdc85394b8bd167e73d567e17ce21fd7d632c98f5b", "crates/nsh-js/src/net.rs": "1d4d2e0870f30f0d85162856b593dc8cf10e0b02cda99693994270af48a47e2a", "crates/nsh-js/src/platform_modules.rs": "86e98e37c924fbf670d37874ad9ca51ce4816c6a0fad7a54823b3c422c9b38c2", - "crates/nsh-js/src/protocol.rs": "e301d73b4cad0a3e042807fec21ebec367983a847e213791772b8befe4a522c3", + "crates/nsh-js/src/protocol.rs": "216831de40e978e0fdc2687b437703ee4051a915e55638c1c0faefb9942e735c", "crates/nsh-js/src/reactive.rs": "b56827c4f5457ec428ffb31d59fcca4f2d2fb2b6c61319fb0a999ce736cc5531", "crates/nsh-js/src/rejections.rs": "7873bcd5daa9b755951b0ded491e72ba9c9a82f77526dfc41df829a998fda7da", "crates/nsh-js/src/resource.rs": "52df34d4de5a6b4ab99653f8245a53efcbc7c0e5fda033befd80be16817bf137", - "crates/nsh-js/src/sandbox.rs": "136e91be03ba771d36a9391706b99dcb09a5d5fed6f582f8d4f8503e0cb8982f", + "crates/nsh-js/src/sandbox.rs": "74edc6aef7a8b6789cbabf3bfd96b9bd9790037ccf1a554e2c7ed1813644916b", "crates/nsh-js/src/standard/bounds.rs": "fb86d8d019ba718a47712679387813e3da25a4767aa489b1f167d32aae1dba32", "crates/nsh-js/src/standard/console.rs": "028e5b41914d9ffc478291c9b2410044033532d16b7437f4ac6461b199927ef8", "crates/nsh-js/src/standard/declarations.rs": "35923ae3a353872a6c6762b2d71884bd5983d74579a1c16fa35325cf96302c63", @@ -1074,29 +1085,27 @@ "crates/nsh-package/tests/trust.rs": "51852c73fe77e9859ace5ee612d2abbe9d0d47ef720084e11cf5526273bd76c6", "crates/nsh-platform-android/Cargo.toml": "fe101e3ac86121975ef182d3dd0543e638d0f7ff81e86021fcf7b6d021b023d8", "crates/nsh-platform-android/build.rs": "0a4329aeb34f85d71ecf149c3b7f6e68c01d9e58186ac73b9bc5f989c3f767d1", - "crates/nsh-platform-android/java/com/longbridge/nsh/A11y.java": "3ead968e674624ae6c3f1a62516980f1d2a7ee283bc68cd44e07882b0918c98e", + "crates/nsh-platform-android/java/com/longbridge/nsh/A11y.java": "4c159d29442c7af8c2001605c815f4988ca18d02287b7b119b3c169aaa5dee04", "crates/nsh-platform-android/java/com/longbridge/nsh/A11yChanges.java": "7ad1562cdf54b5e55669e5dd784da4097abdcaa03582f597ca2b8340f7e9a241", - "crates/nsh-platform-android/java/com/longbridge/nsh/Activities.java": "76d34dcb40121f27e3987c3d6e6947f3bb82f81f49c4c6459135fdfdabbe5da8", + "crates/nsh-platform-android/java/com/longbridge/nsh/Activities.java": "60043f4f70ccff504f4d74c3253e85c76e5a1e7fd818089c91066170575a138c", "crates/nsh-platform-android/java/com/longbridge/nsh/AppActivity.java": "f119d7d691eb7e6e73495e8ab841cb7cb94100973591945fed4e4fa8538ba2c2", "crates/nsh-platform-android/java/com/longbridge/nsh/ArrowEntry.java": "9960f6a7d64c3d09766b89d6d55b2fb8b551d19080d33a9acb78fd8b6744a209", "crates/nsh-platform-android/java/com/longbridge/nsh/Audio.java": "6820a8791d44804f009d7dd2d7bc258e73032cdf4939a6a037f0d6a5414eafec", - "crates/nsh-platform-android/java/com/longbridge/nsh/AuthSession.java": "95d29b0706e22472aa5bae2ad0b7ada11f343a81dd3fa1d840681135b446e808", "crates/nsh-platform-android/java/com/longbridge/nsh/BackCallbacks.java": "aea37492e5bb3067e90e4090a283812609871c506dd13bf86cbab760ec329c46", "crates/nsh-platform-android/java/com/longbridge/nsh/BackRelease.java": "b44fe1524e58f8ecd660108733c7d93cff26ed9419edd480c74e83e866341e9b", - "crates/nsh-platform-android/java/com/longbridge/nsh/Backdrop.java": "0c4b3c8f53a07311a2fac29b84912c45b7b10b44d256608bf45b0503d29474d9", + "crates/nsh-platform-android/java/com/longbridge/nsh/Backdrop.java": "743873bdf66ce71565bb2239e27a970d1e99270bfa64bbcf381a40c964210ca3", "crates/nsh-platform-android/java/com/longbridge/nsh/Blur.java": "15df052732317b00c8f873e53a041a2e079296f9fb8842e00af77958ae6c7d5b", "crates/nsh-platform-android/java/com/longbridge/nsh/BottomBarVisibility.java": "25fb44ee5f537e61fc9a4935fea8abcfaa87fcca122b25776f3680f3191b0b6e", - "crates/nsh-platform-android/java/com/longbridge/nsh/Box.java": "11cce99b856769f0fdbca7aab6a6a079531e50f486591dc501aab714f9175cb6", + "crates/nsh-platform-android/java/com/longbridge/nsh/Box.java": "13320a1bccad71ba98b83db3ee317d173b1913dfc9b129a8ced23dcd4ed0e940", "crates/nsh-platform-android/java/com/longbridge/nsh/CanvasBox.java": "b4805a0947b5705325eafc0cf05ceea1da40c410804df92f999a2a61b2f3a3cc", "crates/nsh-platform-android/java/com/longbridge/nsh/CanvasPainter.java": "f76ed8b5020741a3f250ade624adec89a4a267450e9bf10e312b1bc62fd20953", "crates/nsh-platform-android/java/com/longbridge/nsh/CanvasRender.java": "8c97095d244b84273513321a155809be313002469161529a6d42f4a8e4b86a0b", "crates/nsh-platform-android/java/com/longbridge/nsh/ClipboardReads.java": "ec76d512e039f57da7cb0e68e3b88757d946f7958644dd5ad483b046c0c96657", "crates/nsh-platform-android/java/com/longbridge/nsh/ComponentBox.java": "eaa0cdd1d3ed6771c8bee0a863d101c25ec20169fb524dab3de235cd45e48f03", "crates/nsh-platform-android/java/com/longbridge/nsh/ContextMenuComponent.java": "201ea9ba45604cd6b3216d8b23682cca0a56d63e2a514487310fe898b5f767aa", - "crates/nsh-platform-android/java/com/longbridge/nsh/DateTimePickerComponent.java": "0884b3649859255482e28329bf46f9fc01a3e7fb0c9b0a6c4cf20710e4ed1c71", - "crates/nsh-platform-android/java/com/longbridge/nsh/Decor.java": "ef1c5ae5f3c0df30062f7d50458f41983bac1a84c3da32aa41298a73a1e73b81", + "crates/nsh-platform-android/java/com/longbridge/nsh/Decor.java": "e0eb650d595f7fc67e7a77a69e4adcef295697c85c672f3101fc56ae47047e00", "crates/nsh-platform-android/java/com/longbridge/nsh/DevActivity.java": "a6883ab0b3f72840dc021a311677149620bc23f05056c962e9f591ee3d53adcb", - "crates/nsh-platform-android/java/com/longbridge/nsh/Effects.java": "865494db2ceafe944d5e09ebbe120258dd2136ff7479844cca69fbf1c7f09bfb", + "crates/nsh-platform-android/java/com/longbridge/nsh/Effects.java": "c99cc7370eed97a6e863ba1db11bb2f10261d19f97c40e86a5ad3198e18300a7", "crates/nsh-platform-android/java/com/longbridge/nsh/FileDrops.java": "35c77502c08635aaf22de8c5c37a32dcbd249bda059b4a5bee361d0892918cc5", "crates/nsh-platform-android/java/com/longbridge/nsh/FileRoots.java": "aa1efadae72612b3375dd815e2af579ca86acb14d716bab90c756f6aa50af3f9", "crates/nsh-platform-android/java/com/longbridge/nsh/FilesProvider.java": "8d7ec27d70e0bfd9a40c27b95631b0396707e4bb78773ef3947137121cc8a405", @@ -1104,7 +1113,7 @@ "crates/nsh-platform-android/java/com/longbridge/nsh/ForeignIntents.java": "01849e84a84c4a85c67274ad777ae923220b06ae0fe2b61cd899728bf169f60c", "crates/nsh-platform-android/java/com/longbridge/nsh/ImageBox.java": "970a4d5f1e34505d965d1a78933c7697f3686f7dd79741cfbf53e60c86815909", "crates/nsh-platform-android/java/com/longbridge/nsh/Images.java": "7b7dd9e6762ba9e41b6b5925eb84fb13152602823bad6c95b37609d19e16a83d", - "crates/nsh-platform-android/java/com/longbridge/nsh/InputBox.java": "ceb04b1909b0fac0df504c051e4a8cddb916bb41cebbadd2bfef1c0f56e7df6c", + "crates/nsh-platform-android/java/com/longbridge/nsh/InputBox.java": "8b59e0740980d0ead2090fe500f15907bb6a7fa6eec1dddd732679ce6155e970", "crates/nsh-platform-android/java/com/longbridge/nsh/InputContent.java": "e00bb36ff0222f7b92606a6cada5ba69353e52d5638b8f4d939cc8e5435c5a5c", "crates/nsh-platform-android/java/com/longbridge/nsh/Json.java": "80d814fa3a0357463394fb0d84d98ec02687abd42b2d3521037db2e1ad20db27", "crates/nsh-platform-android/java/com/longbridge/nsh/KeyAncestry.java": "e43c1dff29186762dc97ac93d5ab43050766e5011fdf74a39e7f0acddc7eaf41", @@ -1114,9 +1123,10 @@ "crates/nsh-platform-android/java/com/longbridge/nsh/MenuButtonComponent.java": "9a54a3fb0cf9a7fda3427c934d5f7a1cbfaaa7bc180a3205b8ae1bcab23149de", "crates/nsh-platform-android/java/com/longbridge/nsh/MenuOutsideTouch.java": "65afae0e5c5d03324e631f57ae08d2246e13aeaaa55adcddc1f46edd44bc49cb", "crates/nsh-platform-android/java/com/longbridge/nsh/ModalHost.java": "5bb84d2c8580d70a5a7d2df156ecc985162adb3f236f2914d8a41fef4e28a8a3", - "crates/nsh-platform-android/java/com/longbridge/nsh/Mounter.java": "be909493da494124ff9d2bcbafd953a2825adab1db67c5647902efb392c0c56a", - "crates/nsh-platform-android/java/com/longbridge/nsh/Native.java": "5668324f7b601a9fa775d2025673879bc9ae5d348816a3f870dd8a86e8f4aed0", + "crates/nsh-platform-android/java/com/longbridge/nsh/Mounter.java": "0778a35055578e7b8deaa743d0d868bee4f68c6a45c1473ee031b46dbc9ac9af", + "crates/nsh-platform-android/java/com/longbridge/nsh/Native.java": "2aac6cb310e0dfc1e208ee9edd8399fd0e242008c3947bb8c59cd08dfb015708", "crates/nsh-platform-android/java/com/longbridge/nsh/NativeProxy.java": "610afc978398b8b9a8a7491463275a79fcfd0c135d11971531bf91dce6363427", + "crates/nsh-platform-android/java/com/longbridge/nsh/NativeReceiver.java": "8a2e05d81d61226818b4aaeeae1a0a2e6e25225b944ae9190a86161b2e4095f8", "crates/nsh-platform-android/java/com/longbridge/nsh/NavTransition.java": "25c57e73c4acb0bfe88a9d490255049d97a4650efcc3b42859576ef7bca003e8", "crates/nsh-platform-android/java/com/longbridge/nsh/Net.java": "891adea10cb4f8cf0020ed3854eac241572b00b32506e129987715db2a183149", "crates/nsh-platform-android/java/com/longbridge/nsh/NetworkState.java": "1fea35cc1ce4a2be899818d6eb118299b096f9e155f3458604163c5244c3c602", @@ -1130,57 +1140,58 @@ "crates/nsh-platform-android/java/com/longbridge/nsh/NshScrollHandle.java": "24a94bcf71bdf02a679712b4378a0d58e889c92a277678df2db679e69a41f506", "crates/nsh-platform-android/java/com/longbridge/nsh/NshScrollListener.java": "282c28ba653b998da3c830903d1e80d744012a968fd5bc9f3200b3a5ff48cb4a", "crates/nsh-platform-android/java/com/longbridge/nsh/NshTrust.java": "9a9027f5eab16e5f54641c72914b319c53e0de2f2502a1baaf3eec941f2ea527", - "crates/nsh-platform-android/java/com/longbridge/nsh/NshView.java": "9cece4a6f3afe953deea3644ae429c14eae35f86c9b651b72df0a59f47ecf4e1", + "crates/nsh-platform-android/java/com/longbridge/nsh/NshView.java": "54a75d388664e8cb99aced38704505ab7e8dfc5d30ab1c4e7dd2b478dab6c499", "crates/nsh-platform-android/java/com/longbridge/nsh/PendingFocus.java": "579f140475e001912e80a53db2e294b0fef85ca7d6acd74cf2190ff9196443f0", "crates/nsh-platform-android/java/com/longbridge/nsh/Permissions.java": "785961fa2d3b62e5f0a5c842213bc45599a2e9a4e57de6500d8aacfe38179ba8", "crates/nsh-platform-android/java/com/longbridge/nsh/PickedPaths.java": "47e7c996f500b69aaa2113a16efcfdc2ef61f10e6b7167d7e02e1cbccd03c780", "crates/nsh-platform-android/java/com/longbridge/nsh/Picker.java": "1c08a3a1cca9f55eea8e3ac1cdfcc13475fe39c8e5e1e2cd60a49f83cdd29e14", "crates/nsh-platform-android/java/com/longbridge/nsh/Pictures.java": "97451108b14876a7b0d2f3445e0c44fbc08447d8a610ae999d3f0748b970df5f", - "crates/nsh-platform-android/java/com/longbridge/nsh/Pressable.java": "f06d84ec137354c72115be9c9257453f20999fcfc821361c11e21585cdd6a2de", + "crates/nsh-platform-android/java/com/longbridge/nsh/Pressable.java": "7a858d73b6b841c8895d0fa606d85bed7e99f8d80229e450fa6dbe45c58221ec", "crates/nsh-platform-android/java/com/longbridge/nsh/RustComponent.java": "4a9113d6609d809bf86d10867af40be6840bf901e151fac313b288111d1857f7", - "crates/nsh-platform-android/java/com/longbridge/nsh/ScrollBox.java": "216481655d31cc6dde30bd9c8a9399fe7ab2f2151164bfc9612fb0afe928c871", - "crates/nsh-platform-android/java/com/longbridge/nsh/SelectableView.java": "ed66e06dfff0c6858b036fe78bb2cae05df9d9174dd614ace650f55673fbe302", + "crates/nsh-platform-android/java/com/longbridge/nsh/ScrollBox.java": "9eed5a58ef4ff005149e92b8b3a0ba0f4e3334b5b0f0305f88f43992cbaede9e", + "crates/nsh-platform-android/java/com/longbridge/nsh/SelectableView.java": "4035af6638eedc617d138f5903e4807dc421684438580618c3e82ff147117812", "crates/nsh-platform-android/java/com/longbridge/nsh/SelectionHandle.java": "d15d57ffd32d04f644e94ab783e51a9cb0aa7f23c78f135798c2fc2102d84f19", - "crates/nsh-platform-android/java/com/longbridge/nsh/Share.java": "9bddbc517580e55c0bc4bcc7030c437f013d560cc9050c47665d6ae918e418c2", "crates/nsh-platform-android/java/com/longbridge/nsh/ShareReceiver.java": "61c82e31e5d7a731d9eca649195620eff544e53790b220e38c41e6bea4ca1188", "crates/nsh-platform-android/java/com/longbridge/nsh/StackBox.java": "48ff9973f07c42122dfc3d5b7d69008ca60380bb04515b1bd5e95f8101a16b2e", - "crates/nsh-platform-android/java/com/longbridge/nsh/SwitchComponent.java": "8f057b03156e20cf948c5a812a6e2f9406342708a78add27ef9a424189b69756", "crates/nsh-platform-android/java/com/longbridge/nsh/SystemMenus.java": "0b57c08807e6b42ac674bc6d9c0dc9f4f70bde3ffd7ab93b70db04adbc919cf6", "crates/nsh-platform-android/java/com/longbridge/nsh/SystemUi.java": "02b00ea085ce24f630e36a660c16fa563515cae057435e0fcdaf934cb195eb45", "crates/nsh-platform-android/java/com/longbridge/nsh/TabBarComponent.java": "4f9e719271202e230cd2783f63595c48f445ac3386521032f28dab82cc756b0f", "crates/nsh-platform-android/java/com/longbridge/nsh/TabOrder.java": "f7426b177d6ae8d64d518f43cb3a6fcab0b06e941795d42b533fa1df03489c78", "crates/nsh-platform-android/java/com/longbridge/nsh/TestAgent.java": "9f2d09569910dc6c8d453090e9e5df70dde74c3f57890a7c18b09db40c781569", - "crates/nsh-platform-android/java/com/longbridge/nsh/TextBox.java": "494e46ff1d13045566bdbb30158c297f875ebe59295f0f355ad31c29e9986a47", - "crates/nsh-platform-android/java/com/longbridge/nsh/TextLayouts.java": "d6bacb953e9115c13185c7e72ead54d6260585cc3b96a609cb7dd389e2a49563", + "crates/nsh-platform-android/java/com/longbridge/nsh/TextBox.java": "1cfed70c1ef3df14105a8d42c7ea5d68293ef8637a2e33810996bccae6896628", + "crates/nsh-platform-android/java/com/longbridge/nsh/TextLayouts.java": "cfe4f2f52ced925a1e74df173758d7ec7bff737b427ea693b18babdf665e0bfd", "crates/nsh-platform-android/java/com/longbridge/nsh/TouchTracker.java": "ec8485fb4b97a780dd8b8ff53fa2d3098ee796bd4514fae832d9b333c44da995", "crates/nsh-platform-android/java/com/longbridge/nsh/VideoBox.java": "0630e9c802b117ba66aa0873f65e2d98b6c8abb2474217ccce66e1e32e3efda4", - "crates/nsh-platform-android/java/com/longbridge/nsh/WebBox.java": "f492bdeb3927cc446a059d4a537af69a4a0ab33dd1f7549e286ce97abf797460", + "crates/nsh-platform-android/java/com/longbridge/nsh/WebBox.java": "22f6e05b98e37bd1d27de946eac316115fea4810f9903d47c6b150832f5ce960", "crates/nsh-platform-android/java/com/longbridge/nsh/WidgetBox.java": "f26ec563cbb0ddbc79fe62a6702044e232d698fc8a5610c909a0101db5cbdbe1", "crates/nsh-platform-android/java/org/rustls/platformverifier/CertificateVerifier.java": "1559fa5301c273944b2925674405fd99f45d1930ffcb3017d2dc5e4035b17376", - "crates/nsh-platform-android/src/activity.rs": "a5674b9d3f9a6099c62ac55d9f12a5f587f9ef4e483922f4ff9b3d1aefadf435", + "crates/nsh-platform-android/src/activity.rs": "8643084e105e9ba809e852c3b44c3acd5453fe0785818f6f0fed927fde864eff", "crates/nsh-platform-android/src/agent.rs": "5e1f831e08d3e66e20a790fd48b59699478074f510bafc5b922b34965e5d88e2", - "crates/nsh-platform-android/src/animation.rs": "6e80eca7a7f1ea9f98594ffaf8425e9122a89c0040157f4e56cff6c65e8c794c", + "crates/nsh-platform-android/src/animation.rs": "70ee9afda876ef373f423b3bd6ce31c4dce485ebf69a1d0dba5a5b5eb648e15f", "crates/nsh-platform-android/src/component.rs": "f50eb0039ba3883835d56234d9308a358fdfc4a30a24dd7f1df97ae66a373d09", "crates/nsh-platform-android/src/context.rs": "7c8b33664c50b85e56e68bff0fc68fe2aa1a5631a741576572bfbe27503e3433", - "crates/nsh-platform-android/src/dev.rs": "0654f2116fcbc66ebd1619cd589ee7e623fe2cb1cc97b41fceb2d656f7bdb9b9", - "crates/nsh-platform-android/src/encode.rs": "8c3f6af6a5d2f413fa8e97b9e26799059565d2bce064382fe9244b1fc477ee1a", - "crates/nsh-platform-android/src/host.rs": "3b7248ee7b56a3ac7dc1865422c3d24f150fdb8d6e663cab6ba798e9912758db", - "crates/nsh-platform-android/src/java.rs": "d5bd9539c92ee04232cd86527c8a65eda1ee3bcc7b09e8880a18d50e2934e770", + "crates/nsh-platform-android/src/dev.rs": "0c7e5518266cd2f4675bb6aa5a013ae20b37939cd8ab90c981346151dc3e328d", + "crates/nsh-platform-android/src/encode.rs": "4c82ad26f15c690c5284acc3c3d0a50e1f9d351c3befb29b772c38c03a3e370e", + "crates/nsh-platform-android/src/host.rs": "0bf5fa6afeea66ebda11cd055cc6d9a494d2e091dd61436d6fca095c7267a4fa", + "crates/nsh-platform-android/src/java.rs": "d85753122977a68f946cadd25164059d2a7f04e5a5eb3b188842d19b4ab1f342", "crates/nsh-platform-android/src/keymap.rs": "bb8ea2fa7fc4bc435212776f8376e7e2e6498dd883d6fac0f52666f53a3a6862", - "crates/nsh-platform-android/src/lib.rs": "4aa46a1b9029c4abc08fce5e632c589425b7f41de0a499ae6f83d50fb6bdadb0", + "crates/nsh-platform-android/src/lib.rs": "cd882513c3992b7c9ea414b0ac06629221c27c3b0a2371f372aa79ba9c0e0c88", "crates/nsh-platform-android/src/logger.rs": "7fe95c849533e54aa753757090b5747c1131e0523f2f5b24f260fb77bd0aa2f8", "crates/nsh-platform-android/src/net.rs": "b834ad44a9ada3575f9ead03d856961da25a6c2f199649c4db9b8bbc3e129d4e", "crates/nsh-platform-android/src/notifications.rs": "a71b7af08447a6b08f1ac28c40cf634612484c428a5ee0865bf9243a164218b1", "crates/nsh-platform-android/src/package.rs": "2c1a12296efe539ae6221a89c48084512b304f40abca04091520916e0bc283fe", "crates/nsh-platform-android/src/permissions.rs": "91468751b92c3772e8a2cc094335f2bb8de21307d40e2a368e91dc7983403d9b", "crates/nsh-platform-android/src/picker.rs": "c16ad6ec7031aae4d031c7ea4a956a07f2d1443e6e89795df76042e6841873a5", + "crates/nsh-platform-android/src/presenting.rs": "a11a874855ae1f3532d7e536211c7c14bb0a43ea7ed8a0db002d27c8426ea6a7", "crates/nsh-platform-android/src/proxy.rs": "b27b928c4cc97e75a992914a28c7bc7507aeb3f84856411c9280dbaa07dc3e45", + "crates/nsh-platform-android/src/receiver.rs": "ad48a463b28d6a48ee047480b9260655d3e365805b1d9aeceead5154aa69833d", "crates/nsh-platform-android/src/selectable_view.rs": "c0c3fdf2c326ec3bebd9b6f19cf6630e97480ec86ff7c837485ed08ee2ecf3f6", - "crates/nsh-platform-android/src/shader.rs": "dbb78e09c8e2b5c38a552e1c3a4f8c57974dcd26370f754a38188218ef1c70ea", + "crates/nsh-platform-android/src/shader.rs": "b5e1569001e33f4e6832a0bfc5010bb7f841ac0e200efb356e5259fac64d34da", "crates/nsh-platform-android/src/svg.rs": "72b340449f499586ea54382159c7ea951bf6a96bf6a1ea0b15011e899e6e4f24", "crates/nsh-platform-android/src/text.rs": "ba4b83e0131756187fec31607c2dfa94cc017c87216e04d1eed00e6132720b78", "crates/nsh-platform-android/tests/App.tsx": "e157aacfa9dc03cb090f34d135fc82e990ee7a06764b129f72e0579977a1d9f8", "crates/nsh-platform-android/tests/HidesBottomBar.tsx": "f1cb35e6a6ce23200e8bc8c4f2c751a2b37b21c3945f12211b37180c82205f7b", + "crates/nsh-platform-android/tests/InputPress.tsx": "69aa3881f6bb7a4ed7a8ba53b0cda063190277a7bb04128995f66f09ac9557b4", "crates/nsh-platform-android/tests/ScrollToLate.tsx": "ffc76cf09006024e583112c8c39557faa43b70200130abd330469a84a363357f", "crates/nsh-platform-android/tests/SystemMenus.tsx": "ee26ea7706470ef7f75e588052605a72cca59f3610813e4ed312a0c0604af735", "crates/nsh-platform-android/tests/TabBarHidden.tsx": "dcdefd0d6ac1eede2f0278e117b3b10dce289edce748c398e3f5584c26da8fd1", @@ -1192,10 +1203,12 @@ "crates/nsh-platform-android/tests/hides-bottom-bar.test.tsx": "54cb769dbcd2a6cf1fd1239cbce4c3929d5f8bbfe3c7b41ebc3dd9d0b1fcabd8", "crates/nsh-platform-android/tests/hover-routing/AndroidManifest.xml": "ea831c72f9c8e04d3c6741573c45b6af6d71338bf507e7175034fdbfa2314446", "crates/nsh-platform-android/tests/hover-routing/run.py": "54e550e18c3f9bbc0e9340ccbabe4649c53a80534ff82ea368eafec62f3d8af6", + "crates/nsh-platform-android/tests/input-press.test.tsx": "7734dbee3485008bab1c29225b0bce55e81f29939da6793687173d4505e13202", "crates/nsh-platform-android/tests/java/com/longbridge/nsh/A11yChangesTest.java": "ee4a51e17462d8ee856051c6031e8a9c29514a95624caf7829c70e0904c47def", "crates/nsh-platform-android/tests/java/com/longbridge/nsh/ActivityRecreateRegression.java": "5fc1e67914bf571785319ed4c69ee904749032b54a8d6c65e94176168b9a5002", "crates/nsh-platform-android/tests/java/com/longbridge/nsh/ArrowEntryTest.java": "1c7b936c250daf89aaab85b1dae406f071eede2d4438e4da31269ff6435cd0f9", "crates/nsh-platform-android/tests/java/com/longbridge/nsh/BackReleaseTest.java": "b7c7702a6edb0d8f594c7642f665654341c9bb854ff04b10884e8fdf83da5f7d", + "crates/nsh-platform-android/tests/java/com/longbridge/nsh/BorderCornersTest.java": "638d0df9ef104686d2958fe2db8f1ae0b32e1b49dfbe914e39c7276d6474cea1", "crates/nsh-platform-android/tests/java/com/longbridge/nsh/BottomBarVisibilityTest.java": "c2d17c9c6a602560edd1d45bd3af4bd13aacae81e186dfda6e113f64c7747579", "crates/nsh-platform-android/tests/java/com/longbridge/nsh/EmbeddedFocusRegression.java": "32e55cc948c45bfd0b491a463954c6995be34c66857f1d203dc59a004bf8f28a", "crates/nsh-platform-android/tests/java/com/longbridge/nsh/FileRootsTest.java": "ed9a5f9d4580f7c2bad2c589f6b686d26aeea89c8fefceb7c426a10f7de6d516", @@ -1208,6 +1221,7 @@ "crates/nsh-platform-android/tests/java/com/longbridge/nsh/MovieDrawableSharing.java": "0da1c7ce56036404dc2bda78405b7a99b0d86f04e0c9ae90bd080671aa25b7ca", "crates/nsh-platform-android/tests/java/com/longbridge/nsh/PendingFocusTest.java": "91191179d51cea7fab7d96735627cd479b017d5555894633143f66edbaa0ee45", "crates/nsh-platform-android/tests/java/com/longbridge/nsh/PickedPathsTest.java": "92b87cff2db714b8ab25ad5e0b3e15e4b66817b1fd8c0c1ab89d7dd55458b7ea", + "crates/nsh-platform-android/tests/java/com/longbridge/nsh/SelectionGeometryTest.java": "9fcd8806d5b751f83db770eef60e873b5112a6b45f2bfb720c3e7be3083dae6b", "crates/nsh-platform-android/tests/java/com/longbridge/nsh/TabOrderTest.java": "88339ae2997f9957facac533ae3ccc01a35a77e3eb72f3ed2220b36816512a51", "crates/nsh-platform-android/tests/java/com/longbridge/nsh/WebBackdropRegression.java": "0c3af7fae54e774e1ed89107ff6584a07ebc04ccd91aae7295eef874c20865e5", "crates/nsh-platform-android/tests/keyboard-dismiss.test.tsx": "741445b4e6d14e871ed6cc9692f213a0407c558cbe2e9fcf7fd9262b4a52565b", @@ -1242,14 +1256,13 @@ "crates/nsh-platform-ios/src/animation.rs": "424a7276de98ec1e16aacc28ae8b96c2e9c519052059515d54158fce0fdf4187", "crates/nsh-platform-ios/src/app.rs": "fd22d38d73526aced03989a85dc556645870ba33e292d0413077077cab09b9c2", "crates/nsh-platform-ios/src/application.rs": "b3469880cd3bc43b36b6d1bac70f065187b7c3fab7faec46a9c5d4ebe3acf353", - "crates/nsh-platform-ios/src/auth_session.rs": "94124db0d57d7c0134e001790f5792e56df8c19747dc294bcebc8e51f39dcb75", "crates/nsh-platform-ios/src/blur.rs": "04af7f839f5e5a9d7005638c836b748c2364c804e45174a22d8c8a1e3d7945d1", "crates/nsh-platform-ios/src/bottom_bar.rs": "e1cadb77089951d46bbcd39be553906d2e6025601b133c919fd6a51601d9cddf", "crates/nsh-platform-ios/src/canvas.rs": "f166a2b7f28483398f2984f3edbe095a3a640c1a8c7684adf0eea83e78d90109", "crates/nsh-platform-ios/src/canvas/offscreen.rs": "eb5b75b8e6b34eb38580212634b7d0677e6523b11fab88f9ee5fed45df0816e4", - "crates/nsh-platform-ios/src/component.rs": "308ed8e70a1231e8811b346cb339841155c3c5233291f1a0062abcd19db28837", + "crates/nsh-platform-ios/src/component.rs": "bcae85cddd7cc231cb9c87e99a89db84b13aadcb06aad950c752ef0e416920a0", "crates/nsh-platform-ios/src/decor.rs": "8ac1ecdc05c8e52c419b72a5cc4ec60984f1fa4d4a3750d4977346f0743af4df", - "crates/nsh-platform-ios/src/dev.rs": "e0f74e761e6ef48cbc292bb2432d8752abb00ece5ab279d28d13c9a7a4d54ae7", + "crates/nsh-platform-ios/src/dev.rs": "aff00014ae909bb4fdd19538e77faa1ca3ce2dce58842915b72342a763b97ce7", "crates/nsh-platform-ios/src/embed.rs": "d9073bea9891c02a5d1063db021a2bfb2befb6e887ded40221c4d1fb3a0c9d67", "crates/nsh-platform-ios/src/file_drop.rs": "a12a2d1d07bf8a6f2c273c51b02100e5f83e46f091ed6bbbff4aa6b81c8d4cef", "crates/nsh-platform-ios/src/fps.rs": "2baffb2d540aaa954c3b81f4d0654a484064d2fc2e226ef99853382821183a9e", @@ -1260,41 +1273,37 @@ "crates/nsh-platform-ios/src/interaction.rs": "86872918e3d1b5c6b9045640e6acbce58fcc2163ee5645fc02362adc4bc46ce4", "crates/nsh-platform-ios/src/keyboard.rs": "2f8b2d1ed0a5d12fed7b7cff87ee31bf3dcf5d51f1a3737cfd445d69b565f256", "crates/nsh-platform-ios/src/keymap.rs": "3abe675a2ca0ff0b85fa5c77ca22c8254aec7c2e46c1f992c4d5b06691acafbb", - "crates/nsh-platform-ios/src/lib.rs": "72a953b71f726238e8fef326f72ba09938de893be3dbe2fd389d2c49480ade4b", - "crates/nsh-platform-ios/src/mount.rs": "f54ca97b0d353cdc35f09869563dc657cf148dd7b50635639f93a05508018e6f", + "crates/nsh-platform-ios/src/lib.rs": "c45810dbb660188e8bbff1409158bf6d8839bb6b44deea9e7cd40acfbc53968d", + "crates/nsh-platform-ios/src/mount.rs": "c831dfaf21ab17b52060571ee1863f3fcc5a603db5d3840426712b28d31c0cb5", "crates/nsh-platform-ios/src/native_view.rs": "424f5ce78145605e64b7fd512b64adcf689d248ea9c61e31c2c5124c87bf990b", "crates/nsh-platform-ios/src/navigation.rs": "60bb77388e047635c8f419a9260bbd3baff69a6d71785888cc3aab4c3f975fd7", "crates/nsh-platform-ios/src/net.rs": "d62696f45f60ec286d5f5473f6fde4e1f27c4427898ebb75fa7b89bf8483867f", "crates/nsh-platform-ios/src/picker.rs": "d9d6271bf1ef0d938f8978a0623685a68bc8780c27b2f0f5d8ab19439db611d8", - "crates/nsh-platform-ios/src/presenting.rs": "c6e8511feb71a64f1cbddadd2c4c504a4725e2ef49ac9eaf74361a684305313d", - "crates/nsh-platform-ios/src/press.rs": "11ae7d513257e8bb82e451f2d6400b3df27ff62ce6124cb2bb7f117e699203e8", + "crates/nsh-platform-ios/src/presenting.rs": "1cb6ccdc0798c3f9463e3c3520221880a5b2871a88517ed301b201c3cebdd22c", + "crates/nsh-platform-ios/src/press.rs": "684c02d780608e3dd70a79a665f9dd29f07f6db28f7971ee0db736066b8fb358", "crates/nsh-platform-ios/src/scroll_edge.rs": "49b7d2dd72e99583b2ea8a453836355d84d43d0d35171816bb7e1461c32ce94f", "crates/nsh-platform-ios/src/scroll_watch.rs": "261f047f3d80ebdd893b4c268f1ca7f922f39cfe541051efa5abdfa1be589862", - "crates/nsh-platform-ios/src/selectable_view.rs": "a85bfca14c68a97010859d46b00012f8f86fb7102fc0a6cdc29920a761f2a54c", - "crates/nsh-platform-ios/src/shader.rs": "b714dd1633cdee5d30939768fbada63d342535342b6c075fb2117988cd40bb43", - "crates/nsh-platform-ios/src/share.rs": "6ae3e1bae13cb49c1076cf62b85c4071312b8a738996dea5a07fb7c72d082cce", + "crates/nsh-platform-ios/src/selectable_view.rs": "843002b5ab837682dcec28a56a36ef80f7f9ab46fb8acd3d1aaf157a3299f283", + "crates/nsh-platform-ios/src/shader.rs": "bf97e2809b58b14daebd0a0df82f1433685d1b4f9549f3071761b6809e3eb7ea", "crates/nsh-platform-ios/src/sight.rs": "635fe0a81b16a8b5c166bfe276903afa51aee73ea1187bc51f32ebe492c408db", "crates/nsh-platform-ios/src/split.rs": "6b83cc3b21000bc2aea9622f364d116d4d8c90040fdc39b17cb5e41d52b62a6c", "crates/nsh-platform-ios/src/state_words.rs": "44da338b510a8e9d6b19bcd6ef512ab9d289e489c5f3136f191670311743e11c", - "crates/nsh-platform-ios/src/surface.rs": "200b9124ea41d5fb37fecbc87cdaae06fe62efef8cc83d22eb8005ff3ca53839", + "crates/nsh-platform-ios/src/surface.rs": "3a8311131ef2cdc513fd632f90093071aae8e405e82fcf3a5eebdf7da560b91a", "crates/nsh-platform-ios/src/synth.rs": "19a61fde1c3bea9ea23b350c0b1bd625101b96fb3108aad088817072589959cf", "crates/nsh-platform-ios/src/system.rs": "a18587c91b3395502f4447074f31b9ad6033dab394060dc53bda334167f166fd", "crates/nsh-platform-ios/src/system_context_menu.rs": "bf3005beffabd96298d2302f9a3eb5457c38ad5f3d607eb017c70c1157e58b38", - "crates/nsh-platform-ios/src/system_date_time_picker.rs": "3e016f210955019d5007821ee8e589307333b8cec046d7dcef8b0089df01aacf", "crates/nsh-platform-ios/src/system_menu_button.rs": "ac63934c54061904b8e187b86f2b974fbca171c16ab2820343a8ebd65d3fa695", - "crates/nsh-platform-ios/src/system_segmented_control.rs": "b15ca1e5c6f6c79f8089282349b4d9b6acaad1be78e1154bcbaf81d81c7219e0", - "crates/nsh-platform-ios/src/system_switch.rs": "99be689c4ef0b791c54f983f64a976df9e17c9dc892d2ecf9378c0161deff4e6", "crates/nsh-platform-ios/src/system_tab_bar.rs": "4ec3bdc6571980384a30623ea827ec8251efd01a40d1fea1b5d9a97c9676ec4d", - "crates/nsh-platform-ios/src/target.rs": "22ef2786e4422288e11067d909548dfabb2ae3dbbc67410305c2f7b68cfd00fe", - "crates/nsh-platform-ios/src/text.rs": "bbf714ea07085118241dbc668cb01b2d47355f84702c55a4bf2eab670dd7a265", + "crates/nsh-platform-ios/src/target.rs": "e70de9b0dad263e1f43747bee88bd7ade3f0afa976f526bc7d299728bf4eece0", + "crates/nsh-platform-ios/src/text.rs": "95fcc2015b3c5dd8781f8cdca54107d512507c4451f016a1f36000fde8fc8400", "crates/nsh-platform-ios/src/text_access.rs": "d188c5f9b53e419b30c9d5bc907bfe60b9075138b472a3c6ed0794c0a9698ada", "crates/nsh-platform-ios/src/text_selection.rs": "b74a53aece8b9d3f77cdffce2a8ff82d2247a31fc7fbfaa4a488aacf668eceb2", "crates/nsh-platform-ios/src/text_view.rs": "d4c7ada12687c0221f92df1e87fabc98f6d1230007d8b07cb4eff20c7cbcee92", "crates/nsh-platform-ios/src/touch.rs": "890521dda944b7baa1eb9c1f9b7bec0cc1667c1394707e150f8b9c713fc480e7", "crates/nsh-platform-ios/src/video.rs": "3baf54925cd71605aa1ba258b2813e8eddbcaf1f7ff554d30bb85cc5b4c45cbe", - "crates/nsh-platform-ios/src/view.rs": "40127fd38a869822bbce635b390da5ac11fcc86cdefc350cc699fdd7a6e945e0", + "crates/nsh-platform-ios/src/view.rs": "14aa6a4d0f06b76ced62603ed8a25822e297c2645e24af2b8ca4972dc50fed85", "crates/nsh-platform-ios/src/visual.rs": "64852e18419e0eba08ab0533e73c311bed39150ae89c34f862dc783106dfeff5", - "crates/nsh-platform-ios/src/web.rs": "710a7c17579b4dffd43b0b8bcd01193e07df778970a1ab519835050b870920f2", + "crates/nsh-platform-ios/src/web.rs": "f0e6a5dd0a9c9c2961610b7664924824ca343ad98cabde488154ea803b25626c", "crates/nsh-platform-ios/src/zoom.rs": "274010fd16832c2c93bde502c2c1d6ad308d59e594cdf859d28d87b5ec6ab865", "crates/nsh-platform-ios/swift/NativeShell.swift": "d0a105c3d4a8f5cc58632087d13fcd4192ec8be97a9881857312d506037157bf", "crates/nsh-platform-ios/tests/dialog-reopen/App.tsx": "9a53472a573ce17fec062ca0ec7911e194291e3bb8ed2b33ab4b56dc066c5f69", @@ -1318,6 +1327,8 @@ "crates/nsh-platform-ios/tests/keyboard/FocusRow.tsx": "3b618a92c3539878deacc570e9de6034052e9de7e4d0cdb6003225cf49a96772", "crates/nsh-platform-ios/tests/keyboard/FocusTransfer.test.tsx": "ad0d3cb7a7b25f3244a270d99ac5c37697eb3a006315f2d7ed4c53369930849c", "crates/nsh-platform-ios/tests/keyboard/FocusTransfer.tsx": "b7525fd5059d9a10b03c9e8880c1a6ea6c900e66c3ca1bd6c2567477be62020d", + "crates/nsh-platform-ios/tests/keyboard/InputPress.test.tsx": "5119a79c0b43685be3e13fd78584dec51d291fae34a8bf1153fbc009ebb0898a", + "crates/nsh-platform-ios/tests/keyboard/InputPress.tsx": "8c044473a28c7118a7a1042dc4aaf28f757f5318038de97648aa5486d9ca32a5", "crates/nsh-platform-ios/tests/keyboard/Keyboard.test.tsx": "7613db122b8510706235044386f1b2ef61d6ab9778b6611310ea550f1f5d4fce", "crates/nsh-platform-ios/tests/keyboard/LiftedPanel.test.tsx": "d64caafd104e01ab5b174d8c6f16fd100fa7ab58635edc1112c5ddf665fccd4f", "crates/nsh-platform-ios/tests/keyboard/LiftedPanel.tsx": "4c585027e8b023c8e2083909cab4d75a6af0d4a6fa3705436135ba3fe824420c", @@ -1374,10 +1385,10 @@ "crates/nsh-platform-ios/tests/system_items/nsh.json": "5b13ef93f3568c734cfad15d06f58d8f191836eeb0fc84b32a1b57ed600d2309", "crates/nsh-platform-ios/tests/system_items/tsconfig.json": "9cc30d6cb1f4394c49a8aaf0e4e0126a9a137ff98e2e102ba38a8cd405689dea", "crates/nsh-platform-linux/Cargo.toml": "374b4b5b49e1badcead92930f8dab4ee39dde4a140fa8c97ee3f8306198cfd0c", - "crates/nsh-platform-linux/src/access.rs": "3d18b4bd014904d2597a41dfd8001cd19e8215812c98d43c4e458df9152c668a", + "crates/nsh-platform-linux/src/access.rs": "9e2e4f86ecc7d0fcae710d30b7ec6e430c5cccbb5357400ac7eab1eb76e23fac", "crates/nsh-platform-linux/src/agent.rs": "000c1c45252cb53fcc9446d4ca5a06b9f4b8198051875f242e113c75be2da0ad", "crates/nsh-platform-linux/src/animation.rs": "191c6ec3f85353ce65c231e642cda7df24c5877a4d4cdff050bdba9446c0dd15", - "crates/nsh-platform-linux/src/app.rs": "741d9c33d8768fec6c7e932b00b9a8cd45f8e49da2cda4dbc0fb5448db50abd1", + "crates/nsh-platform-linux/src/app.rs": "d66fc3f59c444c37b634631e253b03d88ceab0ae41146324289697c22802a765", "crates/nsh-platform-linux/src/atspi_test.py": "73f9dbc2427463d20bfec93ff79d553997d8acbba8367a4ff4aeb2b55e5be348", "crates/nsh-platform-linux/src/audio.rs": "5cb7e990acf40b058ac458fe445eda4b26afc27421453db19049d80a65940877", "crates/nsh-platform-linux/src/canvas.rs": "32557fa9f6c81c8ee231516942f12227e623d6434bf96669a9df13ca1876460b", @@ -1386,7 +1397,7 @@ "crates/nsh-platform-linux/src/decor.rs": "5d696768010177bc1f512494b4628c363933a59ff8768bf25582278a02e70834", "crates/nsh-platform-linux/src/decor/bench.rs": "0fced383cc783ee32c0815394d6d0630d033b971991b5b937eb07296f382cefe", "crates/nsh-platform-linux/src/desktop_file.rs": "3e5b911648cd98378c7a15aabce715ee78d9af39f3c216e5f9176e16fec75311", - "crates/nsh-platform-linux/src/dev.rs": "21596b0b07a2eb13e436a00bff4b1ba8a917cb536b3956df71bb8f223dadd86a", + "crates/nsh-platform-linux/src/dev.rs": "9662975a695582be928191b7f10c3a9f696b20e8b87e2ec287f8a067ec65c104", "crates/nsh-platform-linux/src/file_drop.rs": "11cbfebd52648592dee9476a5656464b5356ccd773313118f1c3140a03e21269", "crates/nsh-platform-linux/src/file_requests.rs": "47931733d8a36ad76b4b356f9e178f9474f64363af00b05cb1264ea623ec0bf8", "crates/nsh-platform-linux/src/fps.rs": "1daa10144d35512a272711498f5e9a186fb94808e1a15cf43135ce88bc02a60a", @@ -1395,51 +1406,53 @@ "crates/nsh-platform-linux/src/gst.rs": "2b1ad97c29a6cddb8781045017a04b150a64ab709d2701ccecf9e19f87d046a5", "crates/nsh-platform-linux/src/gtk_test.rs": "35f844ecea4a1fd9c60f608adf6549fceccce6e43d4c007c64c957ad891a03e9", "crates/nsh-platform-linux/src/image.rs": "ea4c37d546621db8328dd0cef8fdd0565d28789d5a1a21fcc0221720a12ebc5a", - "crates/nsh-platform-linux/src/input.rs": "ee0a6a8a4a1ae65911583a6de05c97b28f12939805d8976ba1fde534f9345ed4", + "crates/nsh-platform-linux/src/input.rs": "d124f219b77939be5bf4daeeded03cd54ac7b79f6bc3fe424f1008f10d8bfbf7", "crates/nsh-platform-linux/src/key_focus.rs": "896185d5068cbebfb595001922c0f1ccf580648e0ad47ab159c1028eb84d6db5", "crates/nsh-platform-linux/src/keyboard.rs": "fac3b3b28c50338984a44cdeca55bcd097039c1104dd0ebdc81ef1b9405bf558", - "crates/nsh-platform-linux/src/keymap.rs": "e585d46e0c6bda31713656b973f9578d010ee0aa32a269b50b24ecbb85ea0028", - "crates/nsh-platform-linux/src/lib.rs": "535dc0d90074c44883f6063d577955b31bf4390d40c5c9cfabd94efdd1071eae", + "crates/nsh-platform-linux/src/keymap.rs": "00cc8eb74872d1ec9e77031e6509df15ff6f9c923ee33fdd03a8819b3456fb77", + "crates/nsh-platform-linux/src/lib.rs": "b0bdc846fa910a08c2a9fb0a6ab88340b4bed8e7559ba24ca917e24786652430", "crates/nsh-platform-linux/src/links.rs": "24323306388bf30ad0a47f14406bef593d0aa9353d8f8561153be0da3fa9d58a", "crates/nsh-platform-linux/src/login_item.rs": "b6efbc9106ee80ce2b8ffb0f1cebded571fa18f91a91f4eaf965c39402ceff75", "crates/nsh-platform-linux/src/menu_style.rs": "7aa3937ed34e738c3c95c024cdd307fdcd51919e6d62e3a39c30261bf2a5766b", - "crates/nsh-platform-linux/src/mount.rs": "d69bbe662b06d35b90ea7dc3dafae376c3c6188021e2d50998c1fbb1a5ef4130", + "crates/nsh-platform-linux/src/mount.rs": "75dfa3b713b0de08a105693527f6a1964df14e592991c99db04737632f192d89", "crates/nsh-platform-linux/src/native.rs": "fd2ab654f4c8c8e7df3d72a954e4a9cf3ca3540f2376c5565d4bf669c1a482a9", - "crates/nsh-platform-linux/src/native/web.rs": "b278b00683c6c9bea73040ae49f470d808fe254ec1ce8a50b21870be10d60b2c", + "crates/nsh-platform-linux/src/native/web.rs": "ab182b6741d0dcf73f9339dcbee070b5f25801d6cf022fa0423911a5d20e2282", "crates/nsh-platform-linux/src/native/web_scheme.rs": "d592eeff155ce34e72e26d1317dd95dc3bf1a7cc2cf47ded5a01afc5215a9063", "crates/nsh-platform-linux/src/navigation.rs": "dc2cf9f132c76e5efc5b5b6e173b5a519fad00cf83940d6258b777211532f1ea", "crates/nsh-platform-linux/src/notifications.rs": "bdae6d6f4df0ec9e17363ec6bb443018d06f7b756706af5905367d0f45f061f9", + "crates/nsh-platform-linux/src/presenting.rs": "ff77d8aa03553618081c60334801a30104263c88222b0edd8b8f77f828713e51", "crates/nsh-platform-linux/src/scroll.rs": "5e77b3462a0391294190597f93e202a8deb335d4fda679df8d624079c5264f3f", - "crates/nsh-platform-linux/src/selectable_view.rs": "7ac57810f1d756d1598831dc97d250ca7b55120d24284f7d0bb75fa591d05208", + "crates/nsh-platform-linux/src/selectable_view.rs": "089344b75a349cc8edb17ba777df3a6e38857d9cc7e6128962014928ed34eeb3", "crates/nsh-platform-linux/src/session.rs": "fd2b5b9d73de31d7909c5a294ff109d2b19b893d94ae98da7a1524db5207d72d", "crates/nsh-platform-linux/src/shader.rs": "c516b87826fc04d4a3282b822150397bc41cf32a954530f4f35b343833f1ca82", "crates/nsh-platform-linux/src/sound.rs": "46224cb7451310104463e07d42f8a2e033ae58deb5a0ebe6af82d70cdd887dc5", "crates/nsh-platform-linux/src/sound_off.rs": "85b6d0d4cf69b5fdeaef525f8767d14b90cb585d159cff3cb1ec3593c805784f", - "crates/nsh-platform-linux/src/surface.rs": "63aaa0055813b783800189dc54ad83cf5c84802a8c1d5b8ac606aa4f67bb03ba", + "crates/nsh-platform-linux/src/surface.rs": "9c7018926cf31b97fe5bad3efe6b0015a2f4da328f6c072e5e9c51a200cb0dee", "crates/nsh-platform-linux/src/synth.rs": "d42201160741e41b50188390700ce6811687ee4ac72d69ab39a933b8c61db8d5", "crates/nsh-platform-linux/src/system.rs": "a6311730aceab585027910c96638efc87768480d12116bbec8ceff03de6c5b5a", - "crates/nsh-platform-linux/src/text.rs": "ad6d51f03aeddb7ffcfe36fe4b762e716f81b1cf58c95fc3291655b8a9842307", + "crates/nsh-platform-linux/src/text.rs": "831aef403d75afba318f13f0f129755d0675d846a2edac70c8dfe890ab3e2c0d", "crates/nsh-platform-linux/src/text_input.rs": "dcd8f114fc6bb4b2f7edb2c3766ee56f2fbecebf695fc0a76e3195f87ea63ddf", "crates/nsh-platform-linux/src/transition.rs": "e6a7909b8f6bd923386a57520985aeb32b8963cf39c8360db5b98c5a60f4602f", "crates/nsh-platform-linux/src/tray.rs": "0d6141bf2c0a9bc41465ba42787212809f0f5237db07af5a6192bec382b57365", - "crates/nsh-platform-linux/src/view.rs": "6c4e87ef5830999a581968848e908ac4dd9cd849a09031114946a617969c52ca", - "crates/nsh-platform-linux/src/window.rs": "2c14e5cddf2df51f70dee332923671014b0a9327fafd942b3bf75dae29192f47", + "crates/nsh-platform-linux/src/view.rs": "832c5a08db1e56f7449ad69c563b8ae6f28b0128ea86060f3d4158f7418f667d", + "crates/nsh-platform-linux/src/window.rs": "0dec3384dc3f9743a39e11beafb01c9860ba284e9bd1f549f689b336c5bb3096", "crates/nsh-platform-linux/src/xtest.rs": "09dd1f32b86789ce09f97c0f24f8998d941645bcd0e44ac150689547058ba6ce", - "crates/nsh-platform-macos/Cargo.toml": "08d9728514716b4b6a4a4ba3cfd9e601e29155164fd6cdc8e4b05b1f7a81e782", - "crates/nsh-platform-macos/src/access.rs": "66e414b50d8b28c2106703f42a249909b27f7284806d5cc51cc4a4144f3e286c", + "crates/nsh-platform-macos/Cargo.toml": "0ceeecbf651187d8e7c655f5598e7db9a5ce1e8f5ea3c255933c605ea1a54207", + "crates/nsh-platform-macos/src/access.rs": "4755c742e1a10b1be920f4fd3157663b46b8a4592e3bef4e3b65f14eda68c2bd", "crates/nsh-platform-macos/src/access/scroll_bar.rs": "bcd4ca5f03c9290532a4f081850a1ca8be1beb58f0288658275b044e13a6f49d", "crates/nsh-platform-macos/src/access/table.rs": "7130c2a54aca21a79ff178dd4d3226b6848797bf7c2804dea662ac1f6b9ed58b", "crates/nsh-platform-macos/src/access/text_spans.rs": "4f5b6d45a144b5b897d6ae9dabccc00269fb2493b1e822cb9162ca6b8c0db098", "crates/nsh-platform-macos/src/agent.rs": "80fd446d1563467ef5637784efe6e8c59c26b05457111b144e2bff9cdc10eedc", "crates/nsh-platform-macos/src/animation.rs": "67ff0e3a04d7e97ad79c7d47e96e2dc79340d5261724d52fd95fc87c7a066311", - "crates/nsh-platform-macos/src/app.rs": "1d0540e4ee92ed5a7a2cc36c13cd442b46a3bdedc87edf6fdf876e2f62bba2e9", + "crates/nsh-platform-macos/src/app.rs": "ecb0689b7b9f609c566f4d71f367b0621fc60260531a0c273d68a10145128bfe", "crates/nsh-platform-macos/src/blur.rs": "04af7f839f5e5a9d7005638c836b748c2364c804e45174a22d8c8a1e3d7945d1", + "crates/nsh-platform-macos/src/box_none.rs": "9e1c1ce4aa0a3055a5981f78b8a8ec2e3cbdaae94ce551fa5f008d47698d0f9b", "crates/nsh-platform-macos/src/canvas.rs": "db3309ff14215d25a0524de79a766821d99ac0d840e4e9da4b64f5e1e56d4846", "crates/nsh-platform-macos/src/canvas/lines.rs": "802180cc2a2c86c000cd734231d2f2c1d24ed6becc9c67d3a1c9aa0c22acf1eb", "crates/nsh-platform-macos/src/canvas/offscreen.rs": "56a81d039da2b279827082f21c1d81a83c05370bab6f1a7a4b8df2dbe8248101", "crates/nsh-platform-macos/src/chrome.rs": "5866387476ffe519c133a2420011d72aab66fb0e7a0806f15b7d6503a263e4af", - "crates/nsh-platform-macos/src/decor.rs": "edd1051b04245c3c7cebd3d49550cdf1d71f49375d3f597fc67c57befd796b16", - "crates/nsh-platform-macos/src/dev.rs": "9e11acd0491704f63bc398d60f8a5f75208b68b8fbeae9465398b5c9f40ac751", + "crates/nsh-platform-macos/src/decor.rs": "51b579162e8ba1b08619d8be05864d555b1c771c70ec24d86e969119ed6c9d24", + "crates/nsh-platform-macos/src/dev.rs": "9cb8009c52eb19a3312b78ee07e8bc0d46cc1c9fec87809c5937898e7aebe62f", "crates/nsh-platform-macos/src/file_drop.rs": "cbc09fcc47f6fbc8a34f92d33ccf702a296894fee87014f3febb581fff63ba8f", "crates/nsh-platform-macos/src/file_requests.rs": "5b751de1b859532084ebdb8ff57dd4ff810789126de07989de4f3864701ed270", "crates/nsh-platform-macos/src/fps.rs": "ac992c125210884856fd1e790ef8a18e69d5011f4c056b6320b79d6da6ca5939", @@ -1447,35 +1460,35 @@ "crates/nsh-platform-macos/src/gpu.rs": "46e103515db651c57316c351d7345dbc812f513c28d5d0e0489aaf2d8c59d599", "crates/nsh-platform-macos/src/gpu_view.rs": "f6b33a191534cd1a8dbfbcc1575ab51265933f546c684ab61c3089aefa825720", "crates/nsh-platform-macos/src/image.rs": "9b7afa130ac6068867753c5e1b53f849f24d6960a61809f6776f2224fad12df3", - "crates/nsh-platform-macos/src/input.rs": "f88c7b76c1170250b5448fea511e3cc7201a3238597a888d1b16cd3870a70011", + "crates/nsh-platform-macos/src/input.rs": "f5f008d0504586155fd8209ef4db4b22ac361610199fb3fe9e68ee562892968a", "crates/nsh-platform-macos/src/keyboard.rs": "6fcfe342b8631e58c1a127565996b7c79cf54613aa573a3e3d40e73874228e4c", "crates/nsh-platform-macos/src/keymap.rs": "b1c1ab114b26998ae7085de6ad1230a46dc8a1650ff3c6f62fb588cf9262fe6a", - "crates/nsh-platform-macos/src/lib.rs": "febc7aa8fbb73c50558c4cb50c39748c76c967514aeb4655ad8a35989aad8e96", + "crates/nsh-platform-macos/src/lib.rs": "c8de1e691e04bb97f12c7ac2188ffe95a284c05a3611dc1684b4a8754d64e2d0", "crates/nsh-platform-macos/src/login_item.rs": "2b7f2bf857fd6bca2016db541a1b9aa724b23e9039d166ea51b1325493c4b832", - "crates/nsh-platform-macos/src/mount.rs": "4e29bc4e01839039d033290a345e06b11e7400f65ac52d2fb54660065a5fed37", - "crates/nsh-platform-macos/src/native.rs": "ca3c22d59aaf72f8704c75ba70876c18bbec4ecc88342eb55ee33342f6e42532", + "crates/nsh-platform-macos/src/mount.rs": "9c30ed379384724a37446831b96bbb93feffe02ccb1bab9c2f2d5c05f1224ba5", + "crates/nsh-platform-macos/src/native.rs": "2358a49dd3bacf57b0bb104e128179155365b2ca86c0b685fd07e40f54db54bb", "crates/nsh-platform-macos/src/navigation.rs": "92e211003140cc99f73de16006c00a6b03859119e00009f83bbacda02e32330f", "crates/nsh-platform-macos/src/net.rs": "512b7358fbd4b3f319d41e50ce33935a424e7d889c6e188ab8cb6ddb473cb3e9", "crates/nsh-platform-macos/src/panels.rs": "6fe67378c1ababdc82bf6693d4b05e85d1f8356a4fcb98002796fc5869b5c3a0", "crates/nsh-platform-macos/src/picker.rs": "08fb69a9771655277e0f8e471b90eccc184a50626fdd472d25fa8fbbd86b5174", + "crates/nsh-platform-macos/src/presenting.rs": "be09c8c457808da72615143c1c592c5dec9be09f26c2d9a84cc0942b94eeb8c7", "crates/nsh-platform-macos/src/screen_color.rs": "2e27815ed77d3b4de5c15a2f6c7b1c9a8649dff2218daa95505a38994b5a6f6c", - "crates/nsh-platform-macos/src/scroll.rs": "c1f22c570fb0008f4c7fb8220d98cf3e288d6f1ccbe2805413d845371ee449dc", - "crates/nsh-platform-macos/src/selectable_view.rs": "597ec24ad035bf64940ccec2e7cfcc4a1ad36256c9d89697edb5ebf05811f1b3", - "crates/nsh-platform-macos/src/shader.rs": "6775fcfb1101d77cc13ef6f5ed4313c8f5b52acc980d8a3c6f9710de6ed8b654", - "crates/nsh-platform-macos/src/share.rs": "be43f3e6735b57763b88dc6aa7c9ad6f5ed92a5f048fbff6876c95fc8e4c9178", + "crates/nsh-platform-macos/src/scroll.rs": "f2b0def84ee230fbc233c0d2dffdfbc99f8e24c1919789702b3849f6ca794dc6", + "crates/nsh-platform-macos/src/selectable_view.rs": "29b8cd0d540e66428217bfc32c6bded4a2f0f7d324ad9368040ff04bd5940125", + "crates/nsh-platform-macos/src/shader.rs": "ee280298202dbe9a89ce51aaa0899af5c754b5abd3227a6b9dced2f9a1967cd5", "crates/nsh-platform-macos/src/sight.rs": "06ce3ec22606e6ad0ebacea14701c0f1ce1bbd3c3f6b274744ab964eb9ead5e9", - "crates/nsh-platform-macos/src/surface.rs": "d586d7c8ca9f903b65c653bc724c2d676501c919122fb6084af0c6b435ecccd9", + "crates/nsh-platform-macos/src/surface.rs": "d0b48ff67d8035631442afc75a9d5c0608b53cefc1eeec773a0b487b0afd94ab", "crates/nsh-platform-macos/src/synth.rs": "4598f0d571a9a24aae8a9a147530a85ba7168834ffe62d7a8cd40bd02033d9a1", - "crates/nsh-platform-macos/src/system.rs": "50110a4da18924d5f43e68a274802f11d797a056966db1c33dc8535ce49e1a1f", - "crates/nsh-platform-macos/src/text.rs": "5afbb179f2fd10bf9086476c6c6326ecd9c3d213a8ac5d8a4930118c79dbdfcb", - "crates/nsh-platform-macos/src/text/raster.rs": "3710c1980c89e9d2f888681f8ab9f6f5e0fe39501c8bd63c2e9d040b3e2c0f39", - "crates/nsh-platform-macos/src/text_input.rs": "692b5dda433f19979009f0e9acd576ac3b96f9c28ac89345e36997d65b4048a3", + "crates/nsh-platform-macos/src/system.rs": "9314532c0cda7efc120d1c86c0bc723b71b97a84c313084361bcc36bf322ed76", + "crates/nsh-platform-macos/src/text.rs": "0dd0947260c4154459e4aa8e1d1da8d37ad4589a99c904228001060d64b8925e", + "crates/nsh-platform-macos/src/text/raster.rs": "27478a8935b97c07922edbcb2d4fe2e48889e0e5faca03ff38ca2d08690ab3a2", + "crates/nsh-platform-macos/src/text_input.rs": "5cc58bc093dd4777689765aee1ced3d0c9376113d1bf3a19d45bbb71f2463772", "crates/nsh-platform-macos/src/transition.rs": "a03ae3fbb0d438174de5c0cf088bd41c757d8ee9b8120e949cb42db52557a013", "crates/nsh-platform-macos/src/tray.rs": "871aca06e825b4d60b676df81cd9ca8dabb1b4156012146088a01b8b241ae330", - "crates/nsh-platform-macos/src/view.rs": "5da31334943f464c30453f5c17abf9625dd668d0cb9af60b503baf0fb0fcdbaf", - "crates/nsh-platform-macos/src/visual.rs": "8bf13b1b3fb321de5575a9d30b1e6fe1f3bc3943912be383454605f58bc89e3c", - "crates/nsh-platform-macos/src/window.rs": "256bd8858b89f679cc373374e624a391155b5c8bf43a90f438e53905b6f27f13", - "crates/nsh-platform-macos/src/window_state.rs": "9a89fbcb74684ca52f18e82c691b313959d2e4b27b793eb895e6ff928ecd070f", + "crates/nsh-platform-macos/src/view.rs": "efad3c297a8c67062ce6b41bd3572734684cfcf7afeb921a0cb9bca603b77df9", + "crates/nsh-platform-macos/src/visual.rs": "36df2e99a12f28501b26ebb019bc5aacf20ea666a21417d4635e13789ae44ab8", + "crates/nsh-platform-macos/src/window.rs": "cfda13cd4f8e51d0d27c5f93e3629ab4612292124c81240dc2778b258283018a", + "crates/nsh-platform-macos/src/window_state.rs": "2a9b29e533d929389421a52ae13a06ac46b015bbcf84d3d491b4b5d8dcb88dbf", "crates/nsh-platform-macos/tests/accessibility.rs": "ace30ae5a1617c3000cd8d94bcd002f6a9c5fd27e60ad865f3e50fc7e964d504", "crates/nsh-platform-macos/tests/accessibility/input_confirm.rs": "0b2d77f567eb10e2063d30f005d54fdf8b3ece6ba00b22f9efd143093058ab45", "crates/nsh-platform-macos/tests/accessibility/table.rs": "b0e1e54c0d7b1d1dbfd3752b565d37d7de5656e0ab1751545cc76e458b698e98", @@ -1536,34 +1549,40 @@ "crates/nsh-platform-macos/tests/native/input_focus.rs": "2280b830ebf6a257b15224761790d54ddf5b3687881531276725f61a509c6026", "crates/nsh-platform-macos/tests/native/input_hidden.rs": "d2f9cb97053e208fbaec70913332a9351fffb896a24e4a76363c14705d377d78", "crates/nsh-platform-macos/tests/native/input_line_height.rs": "14d58eba2a48196f61b8598b1b812d46d472d6b2f6b60c51ba40c5e37bed70b9", + "crates/nsh-platform-macos/tests/native/input_press.rs": "54000f8edcc284f28d029f08d506269e8ac5c7a0bcf9537c60c43db49d350deb", "crates/nsh-platform-macos/tests/native/input_restyle.rs": "03ba847eff59a256361b356e4ee9f9ee5d1bfd9384654084109272bf0af79aa4", "crates/nsh-platform-macos/tests/native/input_tab_stops.rs": "db4cf6da59ccd23ced0db3498ac36d8a7bcea38b5a99048607327c668b327dcb", "crates/nsh-platform-macos/tests/native/input_wheel_chain.rs": "84a014e80b2e34e9a57f318881ed9bc4f034edf7873c93ff079f5daad25d8d36", "crates/nsh-platform-macos/tests/native/keyboard.rs": "ab14a8b63adb68dfc1b2f5de020256d6ba680b64342ad8fe83963412f9da9d8a", "crates/nsh-platform-macos/tests/native/keymap_ime.rs": "e3ef3d5ca4fb03762f6590171010c8956e6ab073dc414f95009237a05ecdfa99", - "crates/nsh-platform-macos/tests/native/main.rs": "4cdb075a038c765d1ce7b4aca026186ec51a0ea60f52bbbdaa745b27ab9b5a16", + "crates/nsh-platform-macos/tests/native/layout_animation_bench.rs": "12abd7a6542a916ea3b25b9985b0cb0927cd7476383a66e6d171f5de12229492", + "crates/nsh-platform-macos/tests/native/main.rs": "d4c825dc145f6c97914bc3bddcb438b0d8f8760d9f0443739974e333fc930c42", "crates/nsh-platform-macos/tests/native/mask_corners.rs": "8ffaf2af6ec31432ba6fb3c427d8b843a7fbea6c636bd26788366bb5f9ce62aa", "crates/nsh-platform-macos/tests/native/menu_labels.rs": "ee2d8d58527fdf165fa4fa28c8485f883860a02779dc78f14d58b95d161165a7", "crates/nsh-platform-macos/tests/native/menu_lifetime.rs": "88a92d12549d366fff50e801e6ab682dc9382da5145cc83fbb4421d5c7cf4601", "crates/nsh-platform-macos/tests/native/modal_fade.rs": "8654d7a6e218c2ae40e43179190b6e9520d21f9319619a942fa7922bc1d52527", "crates/nsh-platform-macos/tests/native/modal_focus.rs": "5591dcb23f6734dbe002f55975c8aa5725dd4f81af40959aaeb6cfbde33d087a", + "crates/nsh-platform-macos/tests/native/momentum_bounce.rs": "49132ff94b94ea550b2a0408ffcc1943c72575c35b4bba55e524409ce9ef0057", "crates/nsh-platform-macos/tests/native/mount.rs": "4f4fa20319f78622d878e6180c977f97852ef6360f2c2dfe59d6053ca45d1a42", + "crates/nsh-platform-macos/tests/native/multi_view.rs": "4b03cabd4aa3401e34a084d302ccd7f5c4cc7a44b6c7c29398d034fe22a59a60", "crates/nsh-platform-macos/tests/native/navigation_unmount.rs": "9ca9c90300e2a0f6abed1b3eee58b0f327b6da81cca44116661a9bafcaa047ab", "crates/nsh-platform-macos/tests/native/nested_bounce.rs": "5a154c9b7040ad9ae329198abdfd2aa0ad58976614ab777b8e2e3855dd8ec23a", "crates/nsh-platform-macos/tests/native/nested_run_loop.rs": "539ad496fdead572f6e9e75be7f502e4f2abd24a79c0622e39faea00879c2856", + "crates/nsh-platform-macos/tests/native/presenting.rs": "cd512ef25ef756ea45da4d0e4fb7ef3b939afbe73975957a552f0cad3de96b75", "crates/nsh-platform-macos/tests/native/press_momentum.rs": "72c94d28e2f1e0d8cc6fdf63c95afbae4477f95f9ee12604b8607b8f0875ea06", "crates/nsh-platform-macos/tests/native/quit_requests.rs": "c61186281bee6e0b58c8092eb7e47da21507e5764266addc440d46e550e61ccc", "crates/nsh-platform-macos/tests/native/refresh_dismiss.rs": "834a0c79777e1b8da3b23f60ff92834c79b12bfdb7b53aa49f052004c38835cf", "crates/nsh-platform-macos/tests/native/removed_focus.rs": "8ca8e84a5eaf93a92cf5aeb3aabcd6cf31fac1226f2c950a6c3b32bdd736f09f", "crates/nsh-platform-macos/tests/native/scaled_input.rs": "3384393f01840de9edc9343626921d9acab9e064f7b6475670b5c45a98aba642", - "crates/nsh-platform-macos/tests/native/scroll_indicator_layout.rs": "7f25473dfb1b5851d0ea0116faa844697daa5b0298d6e8852260fbd8a9acdc45", + "crates/nsh-platform-macos/tests/native/scroll_indicator_layout.rs": "d5806f54b192b4185c170cd9b1749cdbc0dc24305020387f7ebd79711f1df052", "crates/nsh-platform-macos/tests/native/selection_autoscroll.rs": "4c64f36204e0a905715d67f8be4d7880cbc9f122808c5c4aaf2d34cfff4a84d7", "crates/nsh-platform-macos/tests/native/selection_keys.rs": "e4f393f323098b46b9154541e723a21ee9dfeb932bbba7f4da1024c61410a330", - "crates/nsh-platform-macos/tests/native/shader_content.rs": "f7eb6c46ce14a3665a5abb8d6c788619e2ad0cc1240358ec2328139c5ebf5287", + "crates/nsh-platform-macos/tests/native/shader_content.rs": "d295da834d949c8fc43990ca69b2469773d0e4a1746d575621796bf3b418875d", "crates/nsh-platform-macos/tests/native/tap_feedback.rs": "2024ca07028211716c8c41e908b5db23902a27f402cf3a3605163449f3cbc2e7", "crates/nsh-platform-macos/tests/native/text_view_selection.rs": "ba17d9c3e94ad6761b073326a34f55908f45fd8c63c1638ab4170dc9675bac20", "crates/nsh-platform-macos/tests/native/title_bar.rs": "cfe263b42d9a5c69c5cdf81f8c323bd2c082654a64554e206dd998f83c301b39", "crates/nsh-platform-macos/tests/native/tray_owner.rs": "7f6351c5dfe7b872017d39fe60a3fdee0d6e0d767416580d943d965deac829e2", + "crates/nsh-platform-macos/tests/native/unbound_animation.rs": "886b86af68a4e688e4d1505fae3149d02612a135652c17c244e552b806705a71", "crates/nsh-platform-macos/tests/native/web_file_input.rs": "7d53d3e9f946670222121b4011eeac858b0d0cd31f7e26d7816dd1d59489890f", "crates/nsh-platform-macos/tests/native/web_load_wait.rs": "45e1fb25540179f15897bee03ed5096dd387c755f1fb5094a5d203d6a84faa10", "crates/nsh-platform-macos/tests/native/window_alert.rs": "0c1f9e5f3c33ac52c64ba5cabaf09258c4d869cf2a9010af76284ed0e83db9eb", @@ -1571,14 +1590,15 @@ "crates/nsh-platform-macos/tests/native/window_frames.rs": "769aa0c38aad4ba8d6b020385fece217fbd5310a938e928dbb61fc14eb8d8f34", "crates/nsh-platform-macos/tests/native/window_hover.rs": "09936802da616d213abbd80017d98efd81d429d8aa8f952c9a6b2806730ccb04", "crates/nsh-platform-macos/tests/native/window_layout.rs": "41d23d90638304bda80d889d9ddddf958cd91d3f0824c535750f71f9e35ad198", + "crates/nsh-platform-macos/tests/native/window_mode_layout.rs": "8e70e527b9a2faeb45e51f51c0727948f38e188a28b4a746debcbc9ba14cacd6", "crates/nsh-platform-macos/tests/native/window_press.rs": "fa366760979ce92c80d24119cd0d9427b13a9d238d96788ef5f6e034f800eee7", "crates/nsh-platform-macos/tests/native/zoom.rs": "f1dece90ee0f872a1bc371a2952cc646df31cd35be98fe559d63a8b61c53a750", "crates/nsh-platform-tui/Cargo.toml": "f4c044ccf7a7ae58a5891e0d66b7305103a702845ca543f9fb132461a8049f01", "crates/nsh-platform-tui/src/agent.rs": "eb0564ce97600542b42af8750e7965d53115e8a18e1712d1b9a652aaf11ec775", - "crates/nsh-platform-tui/src/app.rs": "b4339272f804b37fd08cbe734e34610a650579b5ee72199c4a2de814528a5ae9", + "crates/nsh-platform-tui/src/app.rs": "d48a89505f914516cedc77ce6c900b533c818580528a4623f0fa34ea14f67181", "crates/nsh-platform-tui/src/canvas.rs": "29b2f451c3d226df835378dc92ee373f4c4bbcba89154a63a29e61231fdea07d", "crates/nsh-platform-tui/src/canvas/path.rs": "1a043dcca5bbcac9a4d83384c6a7333880fc6fabe3a6002c308780f448070f11", - "crates/nsh-platform-tui/src/dev.rs": "caabe32dc24d3e051813054016aae98b609650c8dad8cc8efff29fde18c4af0d", + "crates/nsh-platform-tui/src/dev.rs": "b079b9dca6ab1fb2d40b88b48364e2814e6d1effb85d54084650256214174c7c", "crates/nsh-platform-tui/src/dialog.rs": "26858e517b204fcc09e7b1c92edb07419c2b37830e16f8de71e67bcf3b95f867", "crates/nsh-platform-tui/src/geometry.rs": "880aa4336b1ae0c63a3dba73baa383690a58a0804296cb30bac6f498744863e0", "crates/nsh-platform-tui/src/gradient.rs": "59ecb879eb56fa9a6e590826e2ae015a666d4481903434581546a9e7d559b2b6", @@ -1590,7 +1610,7 @@ "crates/nsh-platform-tui/src/lib.rs": "b85819cf5490879865b8f315086ec991491dcc4232c267ec9a4975020fdd9cd0", "crates/nsh-platform-tui/src/link.rs": "6f4074f70cceb3e1225872a86e17d7e4f94fde0dc9cb253f7316c2fcbf490491", "crates/nsh-platform-tui/src/menu.rs": "9132b0624bf1081a08520eca30668be3b038fe58d39fe91034a512149d9ce17e", - "crates/nsh-platform-tui/src/mount.rs": "de7f3deefc6b3c35eb8ac55dd9ab7ee9035dc4fb3f94b5f1f6d9b751c9e98b82", + "crates/nsh-platform-tui/src/mount.rs": "7bf836f8fdc47df144d7ada419cffb14a417ae1806bfcdf5319cebe46d029f60", "crates/nsh-platform-tui/src/native.rs": "1715fdc6e501fdbed12c1586c636df89879843a7f60250908af389c78e03f5ca", "crates/nsh-platform-tui/src/navigation.rs": "701ee4008f31f733bd1c61623ed668b49f67de804bffafd2e03f43cd1fc42371", "crates/nsh-platform-tui/src/palette.rs": "a4a31bd3854a4084cf8c5a17fcd852f0d3f2b32ad7c9ba7144e18cd48f0a6fb8", @@ -1601,7 +1621,7 @@ "crates/nsh-platform-tui/src/run.rs": "37932b79d1927ee045deab6c21750cefc119dc6ab7fa37384b57292c7ea01bd8", "crates/nsh-platform-tui/src/scrollbar.rs": "d6daf2252721f921f0939d6ca1449ca0a5110b01f0f711adf96a43f8ca0b6626", "crates/nsh-platform-tui/src/search.rs": "12e06e0964148c3f9eef63257564d27a1c572ab2590fe84ab1ed29582457c0be", - "crates/nsh-platform-tui/src/selection.rs": "717252b6ee0823463dcbd22517e1b6c4ae43806c2eedf77e92df34da2dc0472d", + "crates/nsh-platform-tui/src/selection.rs": "d029c89bbf5f91a8872d8a59ba322fd37d0633ff8a14ef900fef35cd3a6516d0", "crates/nsh-platform-tui/src/surface.rs": "2690936d596a05a29365670e454a2a7a907fd160d8f621a3ef600bba768a51b6", "crates/nsh-platform-tui/src/text.rs": "3ee73b923612082f3981ed64baa0f05bd279f1f0e5bcc6f48099639b77a9652d", "crates/nsh-platform-tui/src/text_input.rs": "f1fb6349d12e0c1dd6173c23a79ac0bdde10dcbdaa6ffad91e75b4147db42c51", @@ -1614,7 +1634,7 @@ "crates/nsh-platform-tui/tests/tui/data_table.rs": "927e167ce192400e6ccc80ef258dd0a161308462f8e5c10989b9d9831658e064", "crates/nsh-platform-tui/tests/tui/degraded.rs": "9811024e7146fdece9cb9e699bfa031c3e51d5fedd1a6acc0d437fd87626cf8d", "crates/nsh-platform-tui/tests/tui/diff_view.rs": "8d24aeeb177cf31db7237b940d4d42c21d7725467a986a5fcf9fa046ec0e2a43", - "crates/nsh-platform-tui/tests/tui/dock.rs": "380693342dde4397c9d4a786191c9840959306f76374e60d72e19309068501d8", + "crates/nsh-platform-tui/tests/tui/dock.rs": "262f2f9b9699c24b61aec9b99a6a7deb8e35702e7ef385056c3310cfa8036987", "crates/nsh-platform-tui/tests/tui/editor.rs": "0c36787ab646ce5daa6c5ddd16edfe61f8a38cc50537bcd8a733e1e012f84ec4", "crates/nsh-platform-tui/tests/tui/focus_navigation.rs": "15849aacf4429a8234f6a61f6ba116eb17d4b72c047ed651c8d2204458e9fd68", "crates/nsh-platform-tui/tests/tui/geometry.rs": "9d7a3499092b4597f5a9badfa1ca2d039437353c6d06c3ea8ff4dacaed4a6809", @@ -1651,7 +1671,7 @@ "crates/nsh-platform-web/src/browser/keymap.rs": "21886b09c3202009328eda5044432a1d1f3f4c74a62b6d16c8a6508d219c593c", "crates/nsh-platform-web/src/browser/mod.rs": "2cf7c4a3bd2ade1936e036a937df1cc8604004e9f6546d00e08bac7df5c344fe", "crates/nsh-platform-web/src/browser/modules.rs": "66e5cc8606ba60a6da50b43c1d44ad3d8805b55f912ba28c57ca9e51572832a3", - "crates/nsh-platform-web/src/browser/protocol.rs": "e579da031caae4cc68f030553724400a742054603107b8e988bf70d4cf2da79e", + "crates/nsh-platform-web/src/browser/protocol.rs": "1edd2243c90106fd221d3f841e4ef5a8b0789d2020e77922f53efa02e4813862", "crates/nsh-platform-web/src/browser/reactive.rs": "d53e0a3a276227c8c5568c74700a6bd2827898a7656ebf042957df572d2ff3cf", "crates/nsh-platform-web/src/browser/resource.rs": "85f1d54445d957dd63d0a54ddcbb711869d4e63b367fec3b287173a108141139", "crates/nsh-platform-web/src/browser/rows.rs": "afcdb9e2c5bd1dd612b9679dd5e94a50ca636e1326b3f98a13e3bbe8f1968df4", @@ -1659,12 +1679,12 @@ "crates/nsh-platform-web/src/browser/timers.rs": "b7da40f90fc56bc5454d38be0ec93db944b6fd01701d537f47a85d4183899a00", "crates/nsh-platform-web/src/browser/values.rs": "ac126ed6c9bdfcd317f6696ed16c398777a37fd3b96aebf721a60eba13484cef", "crates/nsh-platform-web/src/canvas.rs": "b48b52cae12a186260e4076748f8b3f1072b8eace9d8f809c7d7aa62c780a77c", - "crates/nsh-platform-web/src/encode.rs": "99309d875bead15e6b1ea89ddd75ab65b2940e74bc0edc619248f8a995e60061", + "crates/nsh-platform-web/src/encode.rs": "00041383e3bf4229c881fef7b97400e1c3892972468f53b02d1101ce093dcd8e", "crates/nsh-platform-web/src/encode/input.rs": "f8bc2a29185b3b71bcd60188e5538c0c541e34ed744e3c53837b12d76c587f36", "crates/nsh-platform-web/src/event.rs": "5413994163cbdd03d0c87fccf57ec730dfb7d7c6dfc76a42f5f0aa4e0b7dffdf", "crates/nsh-platform-web/src/ffi.rs": "133951e4f3cfdf424ab8fe48a27e30c027b38110a0a2b2f54ddb9827b782b3b2", "crates/nsh-platform-web/src/filesystem.rs": "5dc61372627090ada69d1f4391bd3ae413a7a0479fa566e5b6d5b58b7a872bc5", - "crates/nsh-platform-web/src/lib.rs": "4903aa46ae6b7578a8961e2b6268faf99838e9fd33a21749296ada45b284a043", + "crates/nsh-platform-web/src/lib.rs": "0289a30ec1df3ef4789f2fb6ae9758af6ec6b589e8080a0442458e8d44da3db5", "crates/nsh-platform-web/src/net.rs": "b2c6cbfea1318defbc6d09dccb27033ea0937903b6ef1491fb69a8b32dfc2e71", "crates/nsh-platform-web/src/shader.rs": "62bed431bb1f253e86ef1014da227f8aa49d6630fc6d03029f9b4bfba53e29f6", "crates/nsh-platform-web/src/storage.rs": "0bc45c3a3b6bece1690159e3e788b947d33ff027335500d3a96f5b3b30209f91", @@ -1698,12 +1718,12 @@ "crates/nsh-platform-web/web/browser/address.js": "0c23f521e0002d4082d81c84c85d27af20eaadd27b5d6c873e18ee042f038965", "crates/nsh-platform-web/web/browser/address.test.mjs": "eee98b0cd666433cd87d6ef4b1eb5af95f45058d671f2236988264dfe73e785d", "crates/nsh-platform-web/web/browser/animation.js": "686ac037a6a524fc3b38619a19ea76ee7c91437483a0e04985927d95057aca85", - "crates/nsh-platform-web/web/browser/bootstrap.js": "2172597057a8bd5887f1dc06d0b4654d9fd87e49389a68bc6231d308fed30f88", + "crates/nsh-platform-web/web/browser/bootstrap.js": "e27c9309d0f2ad5ee00a2682dd31ec3bbe4859fc5d66272b406d3f3f56878cf7", "crates/nsh-platform-web/web/browser/browser-check.py": "b0aeb94cf5e666f3ab5fcd8876bd40f27a347f72324bf1bb3d4b200e0bd6c6ca", "crates/nsh-platform-web/web/browser/buffer.js": "1fd19073655b60e681e1d0d795b457206d961cff81e436d37b7897a762847245", "crates/nsh-platform-web/web/browser/canvas.js": "f5c73ecd249aeeea3c4b4ba2acf8bf185fd43d27ee94c3beea8bbfdfa06159e8", "crates/nsh-platform-web/web/browser/components.js": "6ac7434f2cb2b80373d82ee2a1170a290d5934ae2b92f4b3cbbdaee5e220b499", - "crates/nsh-platform-web/web/browser/dom.js": "0b8806a21b220b175ef4b509295798c2f5f706e7e8f7ace00a323de2696c5a15", + "crates/nsh-platform-web/web/browser/dom.js": "f7650bbca230063ed3fdc15a5631b3f7a1c7f2b23aa5d6ef581c929623b74be1", "crates/nsh-platform-web/web/browser/dom.test.mjs": "9d6a1a0fe8d435fd6a4c02922f87347d906fd53c5454fbbedd028ae0d8649c3f", "crates/nsh-platform-web/web/browser/environment.js": "d163dc7a02d41b04fee2f7374989edba0eeea36960ccfdbeebc450b35d2fb984", "crates/nsh-platform-web/web/browser/environment.test.mjs": "571ce7ca201dc78ff66d8002c34dbac734cbe76e6c1eec16abd996fdb4d261fc", @@ -1717,7 +1737,7 @@ "crates/nsh-platform-web/web/browser/i18n.test.mjs": "ec3dbc05261c9bbefbeb1e7568d520e6f54ef2d79162f9c241da23d934aea53b", "crates/nsh-platform-web/web/browser/keymap.js": "1cde6163e9df31ca302d2d8dd810e22fbdb3ef6e8cefc1287a8f6653237072a1", "crates/nsh-platform-web/web/browser/keymap.test.mjs": "45f0a686d6becb998a24fd72906d3d1af4196f1ba2fdaad3fc675e84716cb097", - "crates/nsh-platform-web/web/browser/list.js": "3d990fbacc04199c8cf213d7299d2a2a92a8b5d8d9315a7b74546a75ae85b0d4", + "crates/nsh-platform-web/web/browser/list.js": "9178d808b41e2d3abdede04ce862e5b4ab0260459fa63a03cf1fa74abd958ca5", "crates/nsh-platform-web/web/browser/loader.js": "5db9fed951593fb7fb83ee0895c8e2f40b99b3793b2a4f421e2f02f7929e5309", "crates/nsh-platform-web/web/browser/loader.test.mjs": "23504a306ffc425d3db9e5954d8608714e9c343a03285a6b83911ca2639e40a8", "crates/nsh-platform-web/web/browser/modules.js": "8ad95ea1219b885ba8c45c8b8065e7fbf6583d13cf3b8e922549de9d52a240d7", @@ -1729,7 +1749,7 @@ "crates/nsh-platform-web/web/browser/page.test.mjs": "a93f2bc512a4986a2b90120ff290a7d5f8a626a301a8db8b512c9c38930fb861", "crates/nsh-platform-web/web/browser/path.js": "d0982f6e4cc96b5b431de752a400b5af2645c3f696ecfaac7ba6f162f0c5016c", "crates/nsh-platform-web/web/browser/reactive.js": "d15615d93081bd45561ef8282c3fa4ffa22b94954f6ddba73aa54721a9b61e78", - "crates/nsh-platform-web/web/browser/reactive.test.mjs": "413b0f0170a86e0da933d4507dd697aa24520b9ef5730287a4955d5ee88d7476", + "crates/nsh-platform-web/web/browser/reactive.test.mjs": "47c1085bca67b37e8a9e2965ae608820bc7373a601e6bf0fa636f60bbfd5d0b0", "crates/nsh-platform-web/web/browser/realm.js": "298581583dc0489ff58559912a23068fcc79c1bb21672f0f29925549686987c0", "crates/nsh-platform-web/web/browser/resource.js": "47deaa0d1c93741932dba765b6d9218653376044ee1625cb081b1a7c0cc502ae", "crates/nsh-platform-web/web/browser/runtime.js": "cc46b56cffdf34253e4bc201487cba0fafd524970e8db5c95de525b311c3518d", @@ -1745,15 +1765,15 @@ "crates/nsh-platform-web/web/index.html": "a24854fb7e532855b9547f0aa1b94de409da6902604e9fa75640b9982afdb940", "crates/nsh-platform-web/web/local-time.test.mjs": "56b6cf30f1e0db942850e986fadbdec4e1c259ad46af58bbbebf6ddfa92c9adf", "crates/nsh-platform-web/web/mouse-browser.test.mjs": "a7fd637ded0753a220a06fcc57fe0922ff18dc87199887d518aec0e99809d556", - "crates/nsh-platform-web/web/mouse.test.mjs": "d40e2c72284145e20ad7890e22212839b4fa93421ccf6f09c14cacd4e1ec8ba0", - "crates/nsh-platform-web/web/nsh.js": "f1db73d6b8665d329689de08c154d576cf68e09ad53fdcadfd43ef11cf428168", - "crates/nsh-platform-web/web/nsh.test.mjs": "9a133bf61416b6a0fc08fae59c55b66cf613f1a080639d387fd3b4e1d77acf7d", + "crates/nsh-platform-web/web/mouse.test.mjs": "31ec9a9fbea053a343451756f592b26b8bfa9a710573ea1581c113a98f837ccd", + "crates/nsh-platform-web/web/nsh.js": "255b64033fc188aaf21d37b752e0a5005c44498727b882b44e63f818e46a2f3f", + "crates/nsh-platform-web/web/nsh.test.mjs": "b7f333302bfc234483aa714aca3708ddc423e9a1156b59104a63e2a373672523", "crates/nsh-platform-web/web/realm-browser.test.mjs": "941a1d76ca16d28e7f567329302f5cd8b07eef0e4e18644ab6f0e89e3b7ad263", "crates/nsh-platform-web/web/scroll-browser.test.mjs": "b1c49b9f72b4252a47b6adef6962db4ed4080e416d3d7a91e5524711c986f8eb", "crates/nsh-platform-web/web/scroll.test.mjs": "3ecda7de413a544cc507f1dc769bf69082236b647621a5195c108dae458b8a82", "crates/nsh-platform-web/web/svg-browser.test.mjs": "2275e939bc98e893bfe8f52118296c68d585f579a54e125d9ce3479122971450", "crates/nsh-platform-web/web/text-browser.test.mjs": "6639166fce97e9b0296c4d60832dde4e50cbf93b0fd37af48df38476287fb94f", - "crates/nsh-platform-web/web/touch-browser.test.mjs": "43ef47ab25878ab0887392453e8c1247fc8ac3b255a91148f9f330c9693ea260", + "crates/nsh-platform-web/web/touch-browser.test.mjs": "4d8756a98f8f3899592a05fbb661fb2d6a7146b82b154e95178e590f2a270c58", "crates/nsh-platform-web/web/viewport-browser.test.mjs": "d510c4468dadfdec932b73a5a3963b152a9a9ef34330bf2bdde862d2ece7247c", "crates/nsh-platform-windows/Cargo.toml": "0431b2f2cb7ff72de7566d035bf40ac679a69fbb11b3af9459b84d8f6608bcbf", "crates/nsh-platform-windows/examples/transparent.rs": "08a6fc3132f9d06f4568efe0b5e7f13ea3c7056228719237bff5df35b51acdcf", @@ -1761,20 +1781,21 @@ "crates/nsh-platform-windows/src/access/uia.rs": "74c6ea2146ca3d7bd0445c370eb7be212fed65d3350cd139c38a52dbb1a00826", "crates/nsh-platform-windows/src/agent.rs": "072b1c1ef7b0d6ff3713cf4caaee7d747cfa0efdabdb77def01086ffd837b997", "crates/nsh-platform-windows/src/animation.rs": "e71681f805dadd1440074892d0135342e4ab626cecd4f9a03af3d1d2daeaed38", - "crates/nsh-platform-windows/src/app.rs": "5655b18a689304796b888f4cfe867cff9c98b5713489a5a975f89e1fa5708e01", - "crates/nsh-platform-windows/src/app_window.rs": "83a574ed7e764033c49ea669e0414f6243c553ea67afbdd382faddad10c86af2", + "crates/nsh-platform-windows/src/app.rs": "3e0c7a19645199d204c82c82babef5f8d6dbb3157f943f3a2c6adca5599c49f7", + "crates/nsh-platform-windows/src/app_window.rs": "642504a78fb054c20ab1364fd6f8682ac43b395bc962c2e0c76f8fb804d0dffb", "crates/nsh-platform-windows/src/audio.rs": "25278e49f85894fff2c32b5f9ca07fe7e45e1bffeca3b5c3e8e59e36027247e2", "crates/nsh-platform-windows/src/audio_off.rs": "00c660d5c452f4a4e7430c60b121bfe70996fcbbf58a2ee55c167ffb27adade9", "crates/nsh-platform-windows/src/backdrop.rs": "8a9519ac070196dc59ed6161f1f432db83d69d6d1f431974463addf9a067faf4", + "crates/nsh-platform-windows/src/box_none.rs": "22add6ede0aceab2f5374e6888e5b4d6fe71660d588dbb6a952bd06726ab1d89", "crates/nsh-platform-windows/src/canvas.rs": "d3f4bb073384bc204640589f7820a91e6bb02d1d9aae41699bd2d0e7ccadcf43", "crates/nsh-platform-windows/src/canvas/offscreen.rs": "99c91911d3df32d6fc36d46e1a838706dff270599ac7d7e3cfc76ad9f2dd9c21", - "crates/nsh-platform-windows/src/chrome.rs": "2bc72e603276f1a275cd3700793f66ce6e843b335a2278a3a8d0417b7a28efd3", + "crates/nsh-platform-windows/src/chrome.rs": "aa62f6af008a399fdafdfec322585cb7be4ad6738f7165ee734581fe31dd503b", "crates/nsh-platform-windows/src/compose.rs": "8552746773eece8eed16930997b2ac70d6ca75306492a97043177ffea54463a1", "crates/nsh-platform-windows/src/decor.rs": "74890888d8f0e35efc80e99f97aa5b035647db3d769d3c1819787a11ee177251", "crates/nsh-platform-windows/src/decor/cache.rs": "fd00f182e311a687aef7c336845b5e40e816a7b4e4dbc31e3d0c2d1d549d0320", "crates/nsh-platform-windows/src/decor/gradient.rs": "2bd889749dc2f08738e3bf98456cb4c6179e57ec4bf95ff256b286dc409f221a", "crates/nsh-platform-windows/src/decor/layer.rs": "72c6e812b6e2786c7aaff32de54372f072fa73ab25c63a0455f5555af2374848", - "crates/nsh-platform-windows/src/dev.rs": "d4957018a029ed7467304ad7926e711eb72ce1d43e499ad5118b696967fcd663", + "crates/nsh-platform-windows/src/dev.rs": "ae6db6cbaa4ac4dcfa4d1a28d5ef10efe77e9450470868a8621b0690728e1796", "crates/nsh-platform-windows/src/file_drop.rs": "9218adae1439c84ae83442577271b191f379572ded81a800f17ae882e877b920", "crates/nsh-platform-windows/src/file_requests.rs": "19383c0d577a14824effc7fd0739813956dd0370ef6f1431462e9c11dbdf76f8", "crates/nsh-platform-windows/src/fps.rs": "021fea2218a352b973b8d8a91ae9167a395a2694be0ef5a0826ebf304c240a98", @@ -1782,68 +1803,69 @@ "crates/nsh-platform-windows/src/gfx.rs": "9fe6d2824ea2a9e3bc2d7d56d3430f8aedeeb31efcf7713154ca4b7da917e98f", "crates/nsh-platform-windows/src/global_shortcut.rs": "566da4fdeaa613edba1c06fb189b043d7699587ffadec12e20337650df4bf21b", "crates/nsh-platform-windows/src/image.rs": "c6c92437c943c3d42b2a72e6ae217c3556796663a65d8f15a3be7d670fcfcd00", - "crates/nsh-platform-windows/src/input.rs": "0f3ea56d8744eeec038d1a004459639fa82840f36ddbd27bb4b54741220d3e45", - "crates/nsh-platform-windows/src/keyboard.rs": "15e94486669ea10a86fb369c55f44524b3e3e2c0352a01efff8976f71b5fc209", + "crates/nsh-platform-windows/src/input.rs": "0f1668250eb645702410bdf1458dea36564367df0bb3dcfaffef56cdddd6852b", + "crates/nsh-platform-windows/src/keyboard.rs": "d93053497b0ba712bbbc2b742057c851736fb1dc4ceb220d0abdaa2d4024fc0c", "crates/nsh-platform-windows/src/keymap.rs": "814e99eb3b73dd90a83c8f74eafa3665863276b7f0a552258dba7255ce4e40de", - "crates/nsh-platform-windows/src/lib.rs": "34696cb1e0eb2b521919c8dcdae9d551a531380e5ced7f4e49845ac32e797ac5", + "crates/nsh-platform-windows/src/lib.rs": "32304d88767d4a0ef75c58b769a5f5475cbf514e9bffae3949d0a8f1424ecfdb", "crates/nsh-platform-windows/src/linking.rs": "e1e1bff8c123fea7535ccfe6caf98cf6927e1d4ec7e7666c386b4f9bc96c6b59", "crates/nsh-platform-windows/src/login_item.rs": "85cb52db8e4997b3df5bf7d1a5bf829149fc2015804e61cb39b036109c951aed", - "crates/nsh-platform-windows/src/mount.rs": "20c9e4319680203f4355b17118b4ca0f4413b4e5439832c8c72ea3c5a59da857", - "crates/nsh-platform-windows/src/native.rs": "1df4acad709b00b4a310a3634fe388b5bd00c66f22a99fa249a35c2e15cc7c59", + "crates/nsh-platform-windows/src/mount.rs": "22bcd77800f84029bc35bf57beaa93a583f97ee0ad9cfd9b08675bfb24737c89", + "crates/nsh-platform-windows/src/native.rs": "3e80eab132eb0cb3c514a69c8f0320313aae63a859f6072b16ce1f6e47e3d8b4", "crates/nsh-platform-windows/src/native/video.rs": "e519b3dfc1b7e32e0de71665dc1e94b57e20b8edc91c311cbc546913a393528b", - "crates/nsh-platform-windows/src/native/web.rs": "e1d3109b94b93350e40902e2ce960643daeba07ea8894f98819a3fc9b841e176", - "crates/nsh-platform-windows/src/navigation.rs": "ac642453759e794537beca17a2407a2d24de283bbb2c2b6d10dcb459e829aa32", + "crates/nsh-platform-windows/src/native/web.rs": "cc4d293815049d00c014eace7e958776656fa98598086e0429fea3bf33e3d931", + "crates/nsh-platform-windows/src/navigation.rs": "22464d3f731c90319627b6ef6e9f068435a57ac5efa77c75d4a5c2a7ddf19ded", "crates/nsh-platform-windows/src/notifications.rs": "3f29f715748266a513553aa26b63fc5015a45a111f0ec98ea2ef179c51e67061", "crates/nsh-platform-windows/src/picker.rs": "bac2a270bde8bb7a5d51ecbb00f948d4fb10f8d58a1b97995d435807a67188d0", "crates/nsh-platform-windows/src/presence.rs": "daf0d04532dc7b2dce53d9948af389e2910d970ea9648ac7e1fa1b129c709949", - "crates/nsh-platform-windows/src/render.rs": "cf1f7c7df2d05eaa2e52c4b8417cf235c9faf5d59f9f9bb74f77b5d3cb16e166", + "crates/nsh-platform-windows/src/presenting.rs": "9df2a8dc18034290381d33d8e8c420441feccc3d598926caa69a2539ba36a934", + "crates/nsh-platform-windows/src/render.rs": "768dc4019cb9057f4a2f99e459cf76a8f7592b98f74f5080902564bb86f9d3db", "crates/nsh-platform-windows/src/render/tests/capture.rs": "0cc6145fd2008c070203e5a7c0272c2893267c21efd29d7a8c10e36517468992", "crates/nsh-platform-windows/src/richedit.rs": "2a3a5250498fdb75c8e1dbaa1b14d999e96713a9f25e988453feac49545a0ef9", "crates/nsh-platform-windows/src/scroll.rs": "1173dcc5336b533095660ac9983fad94c5eaab04d1a89fd89f08ffdb6c9dfad5", - "crates/nsh-platform-windows/src/selectable_view.rs": "fd11b9cfe7493309d2f6e1526bedc79a0b579133f52041dab78ee07ab5b95043", + "crates/nsh-platform-windows/src/selectable_view.rs": "eb91e2fc1722969e9c8a8a3d60e0c2aeb7f72d70c98b1b0f00a7f4097b54f82f", "crates/nsh-platform-windows/src/session.rs": "9105ba67fa329f7d48567ffcbe28ae61a3630ebcbc37cdd49f11e6919e95acfa", "crates/nsh-platform-windows/src/shader.rs": "34aeaa3425fca80c775fbb4330bccb91ebba5727afec12b723e06bb9f6b1e514", - "crates/nsh-platform-windows/src/shell.rs": "5485a07dbc8b9f6ad1d8f1bbcbf01aaa9abae9deb2945b0dbd812a033b29c9be", - "crates/nsh-platform-windows/src/surface.rs": "11f1a6e6dceb88fd3170c6cd1bc339b0c1741dd6af916ab1a83cf7e8f277aa55", + "crates/nsh-platform-windows/src/shell.rs": "b4a4ec2964a4d69f474abadbc720783c1d83901cb82162f28f2c00ca4f62c5c0", + "crates/nsh-platform-windows/src/surface.rs": "93ea91228d1df01831e089df94ede9d7e49fc4d74751bb96f3fcf09730ad933e", "crates/nsh-platform-windows/src/synth.rs": "06e744495206586fdf06c2f1ee0e37ab34387721bfd856571eb54b492c8bf7cd", - "crates/nsh-platform-windows/src/system.rs": "e3ea6b8788c69fa54551d79597093d2f946cbce461588f061ba7c12f6a4094ab", - "crates/nsh-platform-windows/src/text.rs": "08f69ca277dc5198fffe79eeaf0477308da4b9c04a55124abe35974cf7e2c1cb", + "crates/nsh-platform-windows/src/system.rs": "1a557b02916f5301051b81b746d79c243c272f4e999778f39e9c2ec27518db8d", + "crates/nsh-platform-windows/src/text.rs": "ff377dbfa76db71ab092cc9b164906d83f677c27b8d82d9351270ecaaa5bfe60", "crates/nsh-platform-windows/src/text_input.rs": "62bd013559097b342f109f1fe529b1a3d083430b05cbc72aa75d28ac15883b2b", "crates/nsh-platform-windows/src/transition.rs": "78deec8ff9ec50e90fb73267af3ab4e82aef63c5e49d22a85b01ea05bb570843", "crates/nsh-platform-windows/src/tray.rs": "75947640e5b7dbd6c26280c5479effc45f863b98db0c30067de38122281f5d79", "crates/nsh-platform-windows/src/view.rs": "dbbbe24a11b7dd4c3ba557baef1e1e223068e8db6e3be3f3234971562f90c316", - "crates/nsh-platform-windows/src/window.rs": "8e3b608d461291503b39108f57845518785874eb4485bf8e7a73585bf4024198", + "crates/nsh-platform-windows/src/window.rs": "4f91608658046d4df27ebbc12a86395d9891fc8602b017ba76743e99c915abf5", "crates/nsh-platform-windows/src/window_close.rs": "f823eda5e95ab0ead9cbd60e5cd8a4789380e4386835b1330b7a671bed1a2106", "crates/nsh-platform-windows/src/window_state.rs": "e35a4f18f8e923e44ac66311496c75a2a5b57f7a294f54dc0efea014fd4a29f3", "crates/nsh-platform-windows/src/window_state/screens.rs": "23e046ddbf28a988cb42fd9094f1ad16e9362e87e6b101e87319199f1b7941cc", - "crates/nsh-testing/Cargo.toml": "a0da53a59cb9bc21e81bd76438dd18ec28a2a45eb525a2f76a1cd3715a79928b", - "crates/nsh-testing/src/agent.rs": "b750809a5ff88e9076d7a19a2345e9f466622923b8ff096121fbfc325932e946", + "crates/nsh-testing/Cargo.toml": "16c66d6a3ac597bf5811d83ca36925cb2906419fddbe6654d99897bc4b67c502", + "crates/nsh-testing/src/agent.rs": "858fbfd3ff04498651d0655c1def94c0368c4fc61d3da1ac2698a3c2311561d6", "crates/nsh-testing/src/agent/forward.rs": "8cd051f12b73ddeda6bcaf23e4820467e2ac783edb91f8475ebdb80f166bf607", "crates/nsh-testing/src/drag.rs": "3412a9a1e287c47afced42a4d35755f52a4a57aa16b2b91119bea19835c2c8d0", - "crates/nsh-testing/src/driver.rs": "2ee9631ca32ed9aa0504e05ae7761bddf4e77d1d8b349932af4108e933240aa4", - "crates/nsh-testing/src/failure.rs": "534af4b2af767862df43116c19f7cb8d90b5f59c8e5cc5a73e64daa13a31f175", + "crates/nsh-testing/src/driver.rs": "8e3124f92e48c38c3f1d085a139885a8fb1dc2bd5e2a7ad98db013bd77217059", + "crates/nsh-testing/src/failure.rs": "226bfe0d8b9c2793614556574ad7cb3630c18d774229cf2a0682f75d00ef634f", "crates/nsh-testing/src/headless/animation.rs": "7545a10ee15e78e2cdfc97c87c37a501fa2668ae77296c5586d0f44e68d648ab", "crates/nsh-testing/src/headless/audio.rs": "599c740a9474fb3d6f119af6c91570e87c3fb84957559b10e3db1abaf00d0b90", "crates/nsh-testing/src/headless/browser.rs": "208238a93fbb6bbcf39cfe80f1a9ce519135f9e860e4ee32e732ea6f54150b72", "crates/nsh-testing/src/headless/keyboard.rs": "ec529307af43956aaba246fc51d946ca95229248eb6cf2d39a355f212388ae28", "crates/nsh-testing/src/headless/live.rs": "7f1b8708a2193df1bfe15ba9b01c4f73669508f5877eb8a9a5808597d6cb4faa", "crates/nsh-testing/src/headless/menus.rs": "106f4b84fb4fb2e0d2349bc89a8ae080bfa2ec79c7ccaf4375e8f441fe197103", - "crates/nsh-testing/src/headless/mod.rs": "d3de5c121da5849f69e71ad281f7782ac3ee64547fe2e74fc705fcb64b83636d", + "crates/nsh-testing/src/headless/mod.rs": "a0d39cd68ae0499a8c9d84433f66f5f9847dd814dd2e27b51453633116ab510b", "crates/nsh-testing/src/headless/net.rs": "3fb8de802d65660244e1015c22894fff4e5c3632ce86aefbdb34da86c45ca59b", "crates/nsh-testing/src/headless/net_fetch_tests.rs": "798c72ea94333a2ce720d313a95b7e5612cf73c1830c9c8aed4ea5550e52f6e9", "crates/nsh-testing/src/headless/pointer.rs": "a0f37c420ca75d8ac5007e106f8f3408d3da06eb8283ec80b3478a966f0e3763", "crates/nsh-testing/src/headless/pointer/press.rs": "ca2e524cd241e568a0c6ac9fc0a270bee666c781a3a2258b6bb04fd4200cd1f5", - "crates/nsh-testing/src/headless/selection.rs": "a874bbe3f6e4639ce64d8f1c51a5783e438f5d02d8ee5d08070ac5d5a207be22", + "crates/nsh-testing/src/headless/selection.rs": "9c9a9b67c0e73d1c81fb2fe15972b07d9e31c2395071261b6fea1d31901df4d7", "crates/nsh-testing/src/headless/stub.rs": "28a59d6ef92826b5e7da63df14afee2ea89ab4ab8413f91901b95c2c8150e964", "crates/nsh-testing/src/headless/windows.rs": "da880340f71d9ecba0031f8472e4d449bcbee0f1a5ab70c25def02ae714fdf9a", "crates/nsh-testing/src/lib.rs": "dbbed19a6621a93402aaac065607927c3a205698fe7de723b363386c0907273f", "crates/nsh-testing/src/menu.rs": "6f794b2c4c05b97ca366ce74c79f1b3c24f86226640008730c1f8c74853b4782", - "crates/nsh-testing/src/module.rs": "c2c0fde6fc3717da5c13d59071301b52d0f7fd2e6bcd6e6ebe70e6e63192275e", + "crates/nsh-testing/src/module.rs": "620af0f987b949d93de22a5a191e64ed44379bde628047529d6ef2fd3fe7284e", "crates/nsh-testing/src/page_host.rs": "108f729701413546f1efc3585c0cd22ccef10e7fbcf2b9be44f357ff3b034b47", "crates/nsh-testing/src/root.rs": "3410556273e02b993232bf03bb71269f6238c85f97de591c578ac60bc9cadef0", - "crates/nsh-testing/src/run.rs": "c1728432aaa7f05c15f449b537791510fdac0b3af325fce883aba0f79cb2887d", + "crates/nsh-testing/src/run.rs": "627095337fe9f048d6358470c33b38c3531ce67ac7eb933ac6bb224ebc9f396d", "crates/nsh-testing/src/runner.rs": "d9fdc3a159507972729ddca30135a5697dcb8e5a4b4c5b765574532e76201fc3", - "crates/nsh-testing/src/screen.rs": "601623adca44c2547343e74d0aaa354a369a25569668cbcce9569ef5339f1979", + "crates/nsh-testing/src/screen.rs": "678bd8c85b6aec0d2deaf7cd4fcb78ea47751b04f9c3a7357f83876b5df0245e", "crates/nsh-testing/src/selector.rs": "de9ab22cea92833d413f25515a46e19d9df0beb03dfa96d6a74831e589ea0e7e", "crates/nsh-testing/src/storage.rs": "01a51beead4a5a1752e803f60018d65805622cbbc47163b1cc3af409eac5ca64", "crates/nsh-testing/src/tests/drag_agent.rs": "41819bb774c7e1ada1e78c70c7b3806601e9cc24ca103a62c444c64c3173156b", @@ -1928,7 +1950,7 @@ "crates/nsh-testing/tests/testing/lifecycle/App.tsx": "dbcd952d8a18fb62b26c7d4fcce77c3eb8d22854cb621c4fb819aadef0583974", "crates/nsh-testing/tests/testing/loops/App.test.tsx": "58c831dd56eda6ff6709c221edc23076a893d7719e82ebf6f0db62b4ec303e2a", "crates/nsh-testing/tests/testing/loops/App.tsx": "3222d00c5af394e0f26589e884143b872ca1a8065753167defac939cdb29f3a1", - "crates/nsh-testing/tests/testing/main.rs": "79540a3889e801924f5102a18eb39493bd443b09d97e30cbbf53727b1846de98", + "crates/nsh-testing/tests/testing/main.rs": "2823ee820cb37c2968b333948e568e38d33548ab985161683ce90657e822c638", "crates/nsh-testing/tests/testing/menus/App.test.tsx": "36cf9ccce5487e6196014f9a156161beacf7a11a5a6dc2c5c4ed2bac2ebd1b50", "crates/nsh-testing/tests/testing/menus/App.tsx": "c5d9281a8778314c4f50f11ac5943b16458fba74e9d36714c6feb00ad9c7ed25", "crates/nsh-testing/tests/testing/network/App.test.tsx": "cd767086351aeeef48c5b4df6a736cda3f4d572bdb1378bd4aff57e7f8e7f2bd", @@ -1966,8 +1988,8 @@ "crates/nsh-testing/tests/testing/suites/Suites.test.ts": "0f9acdc4ab916e946b73477f1d5358f4973710cf03b2f4c532b45575457340dd", "crates/nsh-testing/tests/testing/tab-bar-hit/App.test.tsx": "c1c9ab2e3216b3517ccaa8b1f649d51aa825fb953e9fc2518cb2c121584ddc26", "crates/nsh-testing/tests/testing/tab-bar-hit/App.tsx": "0bc70c5dd590fbf3fdb51d7f49e473ac4e06b02b77aed4fbc72227f19d95316e", - "crates/nsh-testing/tests/testing/text-selection/App.test.tsx": "60c851e8606d39edd051749159ae4940d3a94cca223c9edcc8c9a438eabbf94f", - "crates/nsh-testing/tests/testing/text-selection/App.tsx": "e63f7ec0be44fc0ce5384e233dc9b607e167677b4385b8fb4cb108049a6009d5", + "crates/nsh-testing/tests/testing/text-selection/App.test.tsx": "6a6855c80b8e3ab2a9761ee63faf6f0dd59410f2ee28539d9021f21c666b2775", + "crates/nsh-testing/tests/testing/text-selection/App.tsx": "9199c57d71671ab5377fb3bd3ff489f067d9a948db06679367047626039469d6", "crates/nsh-testing/tests/testing/todo/App.test.tsx": "ff53ef5e9318dee3b496d70a3b2ba424524a02351776dcdac0a23bd9bf330160", "crates/nsh-testing/tests/testing/todo/App.tsx": "a4d0cfa3e3a44554642c4872b20e33246840acb01eb8cd55912a80c03864d957", "crates/nsh-testing/tests/testing/todo/Broken.test.ts": "9e895c0417f95a438f5a8c2f1b21a1f631acf4ebc98e1d556894357256e12e53", @@ -2018,17 +2040,19 @@ "crates/nsh-updater/src/delta.rs": "b10058ddab3e0f359b50ff4de1e14045d194c7beda38399210f0286f296f91c4", "crates/nsh-updater/src/install.rs": "ce1eac35073c3eadb35bdc6782a5605bf325b576a8a026f3cd1fe57d9f5d2c32", "crates/nsh-updater/src/lib.rs": "b8ec77b6996d1eb731d1904c4832f9746bd3dc5151d1e5dab664a286facbe620", - "crates/nsh-windows-app/Cargo.toml": "634eba25653551393311582ac30126c25bfd7cfa16d9e2bf5d17acf92554009a", + "crates/nsh-windows-app/Cargo.toml": "040d88ef33cabfefd9f6a5b97c8ee7f101f275b279752cb2923c32c13fcd7fb8", + "crates/nsh-windows-app/build.rs": "a54459ffbf32e2db10231f10a61dad3ab1ed0bf2009da30a95d0b8bee6740b51", + "crates/nsh-windows-app/script/link-kit.js": "39cdb0c0f99a7e9a6df697fea451ba323ddf4dbec0e85555266debdd6572dac3", "crates/nsh-windows-app/src/lib.rs": "88ef645e0b356a4fe29d82cac0ca9d798b0747ed67b5ae499a19ed89906332ca", - "crates/nsh-windows-app/src/main.rs": "03d8aa2c05da66325508bf3991ccb1396e7461ae5d05bdf6ed5762debf8a92bc", + "crates/nsh-windows-app/src/main.rs": "9b50e847fd55740a38aaf90a5928ba869bcc0e922b31d6000629a64b05ab3541", "crates/nsh-windows-host/Cargo.toml": "6422aa11ee4d7b0524108cf9e9e4e7f0a292af5d1c4c80c0e951b30f06722bd7", "crates/nsh-windows-host/src/lib.rs": "61f8e52ea9f44c262270628e10951438f62043a501b7afcff2e3aafbfa8bebc7", "crates/nsh-windows-host/src/main.rs": "d7f79b7e06161e21ddf1041121afef6497c87d3bf41c8d625efff1cdd6122ba9", "crates/xtask/Cargo.toml": "60db67b07272df9a918ad87fa02161c6df1cc3f97e7eae100db7d020794f056b", - "crates/xtask/src/android.rs": "8905bdeebd89c191dc800d7d3e724ba3a6a7cc9d081b789be07eb02b0df1b427", + "crates/xtask/src/android.rs": "8248275fcad6e2ef150adb92b0811248537320d68cb0e9f8e959f763a425f0c2", "crates/xtask/src/cargo.rs": "ad7bb9d7bddd4770083221794107e0e8dda5e00b98ba8218299cb7b93d9090a5", "crates/xtask/src/compat.rs": "b16ea57f1bf28154a36f0e597a5f6c558be356367c79f210a23976436070e888", - "crates/xtask/src/dist.rs": "411f33b2fc1f38c427afc35197ef82451edc5f055a7d3184af1acd1954d3ba1d", + "crates/xtask/src/dist.rs": "a8efebb8bcdbd895a84291f9a3258e47127a6f6f0e7be368047490d71731a92b", "crates/xtask/src/emoji.rs": "cb25e325076baae9ccc4022808b6bbc402e70a2fec8df1f26d90836707b2ffd4", "crates/xtask/src/ios.rs": "5343c250feb010350f7a5374b90a94003dbe86df1d38f95a7551300be5d94cde", "crates/xtask/src/main.rs": "ebd2b5b929dcf6c18b330fd9f72ebd9d571063d912f7bf9ff9ec9fa462995465", @@ -2039,54 +2063,54 @@ "docs/benchmarks/linux-memory-2026-11-05.json": "5a5eb4f547e00f4a1f424588a4106a32f9655403d422cf6ce166d9a1bf68ea4d", "docs/benchmarks/linux-memory-baseline-2026-11-05.json": "6e95a16dec8978d41bb181f191c0d6a4bbc615a1ad48c05b8fb8e46c180a34e8", "docs/dev/README.md": "1cf7a2b820ea5404fe90406390aad46b1687102a8a3b018e8dcf28e451815dd7", - "docs/dev/animation.md": "e5de3f2ff32fdbb527b4ebe36b009bf99e7df853a409047e5fc03c52840c9fc4", - "docs/dev/api-naming.md": "3bf1e630eefaccd48e8d8a078397d8b965a1733dd7e97ef42a4eeee44dd47a28", + "docs/dev/animation.md": "9d0b3991e723cca82d581b13df0a710bf7f62ea5a57c4c6d0cc2b87bf5d0f82c", + "docs/dev/api-naming.md": "567b1c6898dd7b66b5e0487472ef347a5a3dcfb3b41395215b7af3baaa6340d6", "docs/dev/architecture.md": "8f88c420402beb0c2d3629ae033116a5014d2fc330c0580c4f0624caf82ec6f9", "docs/dev/audio-design.md": "956f590339beb7a9e0b47d3c1d3bf2911cd7fa0a6cba43e205f0a002eaf64cc8", "docs/dev/browser-js-size.md": "b737a9d5ee1d0631955ba16f20ce819452b9f7f71bbd61b6f78a019b2c2caeee", - "docs/dev/canvas.md": "470e40332cf1809617f07e24355c8069c020907c36efe505985a47092d75626f", - "docs/dev/commands.md": "bb226dc966e56d572106855987d6151c7d7fe21c9321fb96d8c061e51e978c9f", + "docs/dev/canvas.md": "9e0c98c808c8ad726a0e8b0942b307c5f2ccd0a5c0c0f6912b76ec3583feaa26", + "docs/dev/commands.md": "22c398bd5c875c6792180584c69d251027596ffd8c7176a56186f7ae1834a13c", "docs/dev/compatibility.md": "36d9160cec99f88eae267bfb3b131f4bea6e91787be50336a2bc78cc0e9c26e3", - "docs/dev/components.md": "d33a87bae9ae816630eef9e250242aa2cff871da17d88d38620d10e5d49989ba", + "docs/dev/components.md": "22623cbbf44f9300ab58caede29ab22f3572b378b04b6b5aa238bed3d923437a", "docs/dev/data-table.md": "d925c0718c4b6dc8ce769bc45f3ffa7b8f06bc315dcb9e87a87acb7b7ce68f08", "docs/dev/diff.md": "51428d62fe86cc9255f726c547c8af2d24757936c1e030a3cb690d17a680e387", - "docs/dev/dock.md": "cdb66a7a8b4f6f97b937c8829f16b28ee3ebed40e80b774b4467835b34314c33", + "docs/dev/dock.md": "87b297f7ccf4615d1b645f5ffa8b786ba0d6cf3444d0c49e73254c122d99e73a", "docs/dev/editor.md": "76fbb54126b4c103fce4f1d995cfea4279c05cd9de09f2fbc7a76968f082f36d", - "docs/dev/elements.md": "0a3c468719ab47b1e03d0b44afe14f6d762e7eda3c1016f84bc1913e33b459c1", - "docs/dev/embedding.md": "142dc8c52ea3bd149929dfb3a28b6d8dc4f07ed388547abb13d62a31af992350", + "docs/dev/elements.md": "36be01c3fe0b6e44e89959600a24fd6e5376e08f0917fd920cc5c9570490be38", + "docs/dev/embedding.md": "7695681116edd7b72cd1ecbdd955ccdeda6ef056e29003b0db9327fec8d55223", "docs/dev/engineering.md": "432def83d7d6a8ec661083a5462e60c6ddea40ee4f349fe2f5a64b3cd332d0e1", "docs/dev/features.md": "79a51dbbf88abfafcd789346f6f5c76aae918ca64e8b5aebde4c246fd919522c", "docs/dev/file-drop.md": "cc427fd8ca5fdea82ef4bfcfda44784b8b680263e6a5c97fb74c803766929a49", "docs/dev/geometry.md": "1f38bbc6be67efae645352fe652eaff2f86d9c0f8171092f32082b2413c4e325", "docs/dev/gpu-views.md": "9e8c4fb25df3b6d2d724f45e55d97dc5c6a22d71de46145ddeab87cd0f85ee4d", - "docs/dev/gpui.md": "d772e0526e63c8d17429db77231b72fcaf3c90b7df09fe3b0d319947c7707bfa", + "docs/dev/gpui.md": "b6b26d6be8b131f59293634c584600774204c2058d565d9363d7beca63dad1f3", "docs/dev/image-loading-design.md": "4c3c4f1a3f2faf5ec369e8eea841b79534141f55a473758405fe724b01e8a568", "docs/dev/images.md": "afa15a6cd8aa157940b0285d87fe659a75c6da00ffc914d8e6aa45b20f086db8", - "docs/dev/js-modules.md": "8e0e5a09b43f95681066f06a825c362d8ad4c6efa872a1139e68c5965cc6f4ac", - "docs/dev/linux.md": "cd39d6cc165be74d5a71d64f75b6189abe60a44ea6e331f6a15c6ff4077bcd70", - "docs/dev/macos.md": "d40155a8cac413847a859a399f90359a99b7952763238656d47de6a8df08aace", - "docs/dev/native-pipeline.md": "55ca68f42b3ec661eadd70b31774822ea022a17bd48ffcb6a9b2573b81cdf6b5", - "docs/dev/performance.md": "327efb4fb9575600cbc8c4f125b84e5408891fcabdd3847c70fd71615f587967", - "docs/dev/pitfalls.md": "13f0e54dbd2959b95241ea02924f2d33ca8a398db9b7f273482e36ee9297cc0a", - "docs/dev/platforms.md": "d55d27928a7f24b4ff97c99d3ac3c1a2b843682bff68d460b71994cfaed5db22", - "docs/dev/reactive-components.md": "006e8cf768830ca1fb1f18044a68738281e760fbe3111f62827fd99dee6c1a52", - "docs/dev/repository-map.md": "eaa6febcbe97ea7c30b31f104509d5a3c57890fa6653c8ef22accfe13481f45e", - "docs/dev/rich-editor.md": "2175eff200e06b598f14dbd7ea5fbb2c39ada0ad641a96cb9fa6f2b4d7079d5b", + "docs/dev/js-modules.md": "04694975874a04d05776e98cfd8cc56b5fea028f32eed451160fbe7f89c7cc10", + "docs/dev/linux.md": "a26070c25d787b810f7372c6da6b4b14da5b0c3fe6290a3a7a397bda2820f8e1", + "docs/dev/macos.md": "daf7f9c50459ed27ff5aa1e74623c0013f6cd97bae575436419b7c3bc8aaa8b2", + "docs/dev/native-pipeline.md": "64ae4f7ef8615464b18ac33d50fd0c6155ffc9eaecd93e528f0031919a35962e", + "docs/dev/performance.md": "d28e642070604c49945b87c87895132742072d4dba3e1e0dba69534eca84dcad", + "docs/dev/pitfalls.md": "4a3115a06452e2aaef46c1e5d1ad29e06af40aa0c5090d1c532beb071ca4f9ec", + "docs/dev/platforms.md": "bae01537c28cd6f48105befb76002be3d8043cd0eb5dfa95877ef6d90b43a405", + "docs/dev/reactive-components.md": "2d478807ccd34eaf62e3fe208b3a6f9b1c7941f4f98dc5e5bd8fdb9841a7df06", + "docs/dev/repository-map.md": "c9ed45afe266cbfaa7779a3d50469170dc99431bec4af9e3020db360a72685a5", + "docs/dev/rich-editor.md": "beebc4ac9fdc5e8fd3e118e7f00bb3b5814aec81e93fa1089e62e156ef9832b7", "docs/dev/rust-classes.md": "de772775cda6cb322b1ecfb4c5220cd92b364cde9801932bf95cb9d5f7f64e35", "docs/dev/rust-modules.md": "47f3a91eabf6007b3cd0c93f8ce9464a9ea744e0d369b944fdede3cf3f12cbe5", - "docs/dev/sandbox.md": "971844d033ee82be893b2c731c0aeda21ca2cc968eabffdfaf83d876a4116cc1", + "docs/dev/sandbox.md": "c08f85cda03ab2bd32f1b03aa83cfa63f553b6c476d0290b33d122521d1569c1", "docs/dev/scrolling-and-lists.md": "ea2903940400fa4774141debdb550a02f07a64290a98aed57d57dd324eaca909", - "docs/dev/shaders.md": "cfca4c06b7ff2ffc5d1fd0dafdd5fc722ff4ecd179aca81b3baec395ffc37580", + "docs/dev/shaders.md": "49491ca234edecb6bde7163f4bf1653250c8129e7988da22e5e97a7560e3ed49", "docs/dev/signed-packages.md": "2a662c6927e6e2fcf380de6b15b1956c1d724fa4f4aa17c503c8e9d5b891a93e", - "docs/dev/styles.md": "b51abe343bb624f16625467ba9c93b5508f8ffb814b111ad10dc4d8255b63afd", - "docs/dev/text-view.md": "2998f611f68cb69b9ef3583b3833d43676283152aa1fbc90901285cc69f305ef", - "docs/dev/text.md": "c4b5bccf8400c820847066d7bf54d8863b439887445595965ea1a1c430df9f57", - "docs/dev/tooling.md": "4940532e2176fa0fd3560f914c8d9f2021dd089eb8adf7c0607bf293d03fdff9", + "docs/dev/styles.md": "463023fdf1cbe467cdda16ccf4fa1e6abd3f328c3d190446d3f1c36961782cc5", + "docs/dev/text-view.md": "6aec51f2ef413ba3118092f3d8f7099d216cdd8527e978bd190cb261e36e447b", + "docs/dev/text.md": "bc6b15958a848054213ab0f56d139b8be8fc74edcb337b8c3b934b5372392a30", + "docs/dev/tooling.md": "b0f87164793236e017bf1d09be134786274cf2c50696ea49e56464946eed1aaa", "docs/dev/tui.md": "1b36e524f353218d6bc1cbae081ba7a0e57b1c0acc45bb4b2de6d6484d19429d", "docs/dev/updater.md": "7ee96f1ae7bed9e0587e6b1b91b7c8575eab87edeade1abba7c7eaafe12e9dd5", - "docs/dev/web.md": "b0322708ffaa4be10bd7fa54f971058a87c2168ca85fb43620871b0b0b216499", - "docs/dev/window-model.md": "1a356266d8914824fff8e0a0395550c31d3a0ce988e34cb789c72acc5cafdb34", - "docs/dev/windows.md": "43debfe539397c2d497f2f55c2207ee3154cbf458a57dbf6f9e13c1a7bbdc74b", + "docs/dev/web.md": "62571e1aa909328a0bb6dc9cf3b29575d7cc4d314d3b49e4b4bea355afae9087", + "docs/dev/window-model.md": "0d0adf94936f1a8eb1230fcf4134011dcf67575abd85402d5439a3377aa1e15b", + "docs/dev/windows.md": "28b1c3225cc8bf4a5967e3daeabe8cebeace63069063cb8ed5ad5cf2293103cf", "docs/dev/workflow.md": "938114380f109ec6333faf26005807c1b198303b8e507cbdeefb99459d5115d7", "docs/dev/writing-docs.md": "1dc26c34cd7cd6d1c7df666cdbff8a6f76f21b6075bf1bf17706f81785fa895a", "examples/bench/GridTs.tsx": "c1ad7f6edf93a285f5f13719a384586251aa65566fe38f3b093af4b2caf218d6", @@ -2123,7 +2147,7 @@ "examples/embed-android/README.md": "7494ff2c14385ce264a437c99423b9a66dc1f2eb9c726451b1974fdcce1bec3f", "examples/embed-android/src/com/longbridge/nsh/embeddemo/MainActivity.java": "27f76bcd1b9478b89ad17129e6435a1b8525c4a36135d30287900418dcdc2c99", "examples/embed-gpui/.cargo/config.toml": "b6f90679563664c70622f32e0736e8e40b211948180594f372b175d90b9b1a1b", - "examples/embed-gpui/Cargo.lock": "709b338164bd7c0c15c8baabcc6ff93e19022efbbd731f5b69a9602438027302", + "examples/embed-gpui/Cargo.lock": "58b7aabc5deeae82abf931a47e9e46777cc22edde17f9060c21c30c88b80e170", "examples/embed-gpui/Cargo.toml": "1512770d4d3d4271f65084012b54c416cbb4150e2faa230e0dcdd7b92a970f46", "examples/embed-gpui/README.md": "64f38172a247c1a52b0cec65cd0752b348865de221f008a0b26a2250ffb09100", "examples/embed-gpui/app/App.tsx": "3df465fcf74f88771237d06a63352911e29ac42402b8b23f9bca4996bd8e5cba", @@ -2146,10 +2170,11 @@ "examples/embedded/App.tsx": "19334c771e9d4c36eb5cab55073897e2e863037ac58cc37adc13dc3e5632dbe9", "examples/embedded/nsh.json": "446aa8ef5786096210b18a450f445850dd6078028bcd7fa19d7c7b5aa4d06775", "examples/embedded/tsconfig.json": "9cc30d6cb1f4394c49a8aaf0e4e0126a9a137ff98e2e102ba38a8cd405689dea", - "examples/extra/App.tsx": "e590dc1becdabcaf1e4836c13c4c5c99ae74127dcd0444dca6fe0e904ee7e8b7", - "examples/extra/README.md": "15540acd8a12026a28319e683e56cd311f078fedac67bc00a736e892bfdb3556", - "examples/extra/nsh.json": "13bac4c4a450582166d5cc8a55f9a50222aeb059081b039be98ead3f7298cc9e", - "examples/extra/nsh.lock": "433e7e91b9db9e206c26f1227f922577502c189e806fa3544e144fab86544b12", + "examples/extra/App.tsx": "652becf6a7521bd4e736d5683cac3ecab0d61d58fd5c50d498dd587002cb34d4", + "examples/extra/README.md": "7e8592fee98fd7582056b948abfad7eda539f8e1bde684f7a273261d853b7725", + "examples/extra/nsh.json": "86859670046cc21c00b5a3cacbce3204e5450ecde596280c748d38ae0462d993", + "examples/extra/nsh.lock": "870b3cee25235a90f0045e1734b35fa97f7d2d4eb4e3c1f7bdafcc9a98124f8e", + "examples/extra/tests/share.test.tsx": "3487d86b54cb142fb7e78a91cfd9e842de4100b0b23a3ea005e0f97bd095f1fc", "examples/extra/tests/speech.test.tsx": "aa37e9354ad46485b9f266af13e55657b2bf03d4c745197388be8b0e72c58e78", "examples/extra/tsconfig.json": "9cc30d6cb1f4394c49a8aaf0e4e0126a9a137ff98e2e102ba38a8cd405689dea", "examples/gallery-rs/App.test.tsx": "7aaa088af8ed0749b5dda6bb90e7c8746db0735d0706b7475ff0b38e1d8bc27e", @@ -2250,7 +2275,7 @@ "examples/gallery/demos/ColorPickerDemo.tsx": "1edf12c588687dfa95a11980704fe55a4db00964b7043321154b9eecebb6a48d", "examples/gallery/demos/CommandDemo.tsx": "a0388d3e123b080d7bc65c37395240134f4aea86f01c37eeba8c82b4c22aec83", "examples/gallery/demos/Components.tsx": "2af9e174b2d481197ed4fbb91e03fcfe400a5c8c6d211e9524c1b7529245b30e", - "examples/gallery/demos/Controls.tsx": "6629109240d3cae4aed95f95f0f4182c30700d1f22151cbc4f32883d42be072a", + "examples/gallery/demos/Controls.tsx": "f4e0603d3efdb83262c335cc052dac3d53665f8e3532316feda36be1c7b0d813", "examples/gallery/demos/DataTableDemo.tsx": "67afab9231beb7ec493f09d000c8408abc7f36e19780f7bcbd7636e99567cd7b", "examples/gallery/demos/DiffDemo.tsx": "560d7fd2ee0bdd41d37e9882735748ee33a17017553e77363900c51898d3ab9f", "examples/gallery/demos/Dock.tsx": "2db020320b906ede5249759147b452aa04e5e5ee946972d4e727f1611ded2e25", @@ -2265,7 +2290,7 @@ "examples/gallery/demos/LinkDemo.tsx": "ac2222ca831546b43c4fdda1bdd24f1fa5e6f959dfb5213e5bb15aa259ef9c84", "examples/gallery/demos/Lists.tsx": "6456f88a25cbc35170041e2eccf8d9ead9f50fe0794b58b14c0d877bfecb7f78", "examples/gallery/demos/Media.tsx": "2df96a09a2e7e5b90077aef4ff19408244bcd2156413cf80e32150006db5e593", - "examples/gallery/demos/Menus.tsx": "689aec0193dc1c2448d34834623732432f52ac1bce2063c3246bc8cdd539a94a", + "examples/gallery/demos/Menus.tsx": "12b437c23b641e8faf6c791e5cb2df0c6ef11b6a122dc87463a101c9e24d604d", "examples/gallery/demos/Navigation.tsx": "1c159fcfbcee4e3b69a4333f1dd191a10ab71c142816061da56ab87535e229ca", "examples/gallery/demos/NodeViewDemo.tsx": "2669a54cde28213841680d15c2633035bff14a25a366e784104f696fc9d91165", "examples/gallery/demos/NotificationsDemo.tsx": "888601a366f351957c9407068b40dcbd3205952205b218d1a9046f83e47b4d56", @@ -2291,7 +2316,7 @@ "examples/gallery/demos/Stocks.tsx": "4a835b43ddc3ec97db194a062c717796010f7cb6e93341cd47e0c5ba6d9ffbd2", "examples/gallery/demos/Storage.tsx": "9ef79b1c40c8a7b736a12751177785a4b7b4bcb5790652766cc1a6ea9c60ce10", "examples/gallery/demos/Styles.tsx": "64504cce4c7c2a884a6c6de329b86fd3063853d100a6707432264a72a923abe6", - "examples/gallery/demos/System.tsx": "5429026ea128bf8f1f56995320a2a5b1a097199518a2c7af0de412a39ded02a3", + "examples/gallery/demos/System.tsx": "87df5ba9f079707eef80320fa18131abc45bf46dc6a29a1e7d8c04f1f6787329", "examples/gallery/demos/Tailwind.tsx": "f59e1ef5614eaa94c3e75aef47f29cdf1a85615e7718fd8f9ed7ed2c360c2272", "examples/gallery/demos/TerminalDemo.tsx": "c43161b10f5f4b4ef410d449307eb98df69301a6d063ef1242a187e969e880da", "examples/gallery/demos/TextDemo.tsx": "f98db7f10a4fa2e4894f732f76248fae89aebe33df39c042355501d6e702e102", @@ -2329,7 +2354,7 @@ "examples/gallery/lucide.ts": "3b9439544050472f0652fa3232b707c832fff8afb22520bf844cb7c49296f07d", "examples/gallery/mark.svg": "859c25a72be7f14a8f4139f512066e08eea73c549a40240874fcb9ec15065bb1", "examples/gallery/nav.ts": "52c1b2d9e5ac1a4e9103a47d53e599a7ca708858a6385b6b02ea50539a9213fc", - "examples/gallery/nsh.json": "4f10a2b36c609420e78036cf42850a0203742ed493336310e9cb983dee0f9e6f", + "examples/gallery/nsh.json": "31d24c30597649f0cbead8bb1f8c91873d2c57530779d9b6b24c58a7d2b5819a", "examples/gallery/scripts/lucide.py": "db36783f047e11663258e0bd81a6acc3895bc91bb0722f74034c96d16b1f6ddb", "examples/gallery/scripts/sounds.mjs": "37119ea9bb5f806b645997f9af53b523236b0bb8ca88b91f2e3d7dca7327978b", "examples/gallery/sounds/LICENSE": "c0d53cbcf3b4e9cfa23c0ce575a1568d34f763eaf74917fb525a61d5624752ca", @@ -2363,7 +2388,7 @@ "examples/gallery/tests/context-menu-press.test.tsx": "876c95c959c284f957eef5136beb691580d0e340141665c8d44ae0e83be0d506", "examples/gallery/tests/context-menu-reopen.test.tsx": "af7864690eb0360789ced9cee1b1bf383befdc2c02a717799b8150f9c62975dc", "examples/gallery/tests/context-menu.test.tsx": "9d751fe63d747eb830ac1d7adf5e425fe9d19f9116c0728cae7e27641c711fbd", - "examples/gallery/tests/controls.test.tsx": "7c423f68fcf6ddd0f50efada3ce2c5eb5dca3f6124202b99773c4d3ce3abc931", + "examples/gallery/tests/controls.test.tsx": "b6656976e08a456760f9ac05e3d8f540778f92dfdd5484c5468d0562bad6f253", "examples/gallery/tests/copy-selection-windows.test.tsx": "bb4f33293165fd449aa1e3b62d8c53d35ac4f28eb856b29e9d8dff1991da2e39", "examples/gallery/tests/copy-selection.test.tsx": "8db5fa24a4a81fa4ce441e88c2c9c8c3367cdebc0571ab62a2768737ce836069", "examples/gallery/tests/data-table-cells.test.tsx": "ba305dd3c97c44be15de21d7e1fa24f0ac9f5a9273f8e10c533ca4e0d67a93b7", @@ -2372,7 +2397,7 @@ "examples/gallery/tests/data-table-fit-grow.test.tsx": "e35e99c82e25e55fbb03ab2b3108a1c5a2b8794cd43457707c27468e6281c02b", "examples/gallery/tests/data-table-interactions.test.tsx": "f24c99100268413e0b35f5c4696633eece5a8d7e5f0ab1919348b08e1b8e7451", "examples/gallery/tests/data-table.test.tsx": "c593a52f7b67aa96f99d0b1f5261af75406ba7f72e091ec3d9b505c0cb87be92", - "examples/gallery/tests/date-picker.test.tsx": "f39402c561a3fcfbb56b69fb28c05b7a2fccb3f56733031278ebdb3ba2ec49dd", + "examples/gallery/tests/date-picker.test.tsx": "8e939612a4f0b5f484c49faa7662b71249fef403f36c59e0873445693fb1b33a", "examples/gallery/tests/device.test.tsx": "ba815add1d5bba1b08f547194402f0eb989306d9c2a12b963c9b8b0ad5e66ac5", "examples/gallery/tests/dialog-swap.test.tsx": "8ab46d0e1fe71237d1511146a9c0bf65765c93248c7419568674fe387b052f22", "examples/gallery/tests/diff.test.tsx": "579021c22bf2bb134a7904e3f58c547ae7c24c2a3785adc9748546f51f904b3a", @@ -2398,7 +2423,7 @@ "examples/gallery/tests/fixtures/flag.png": "9d0f5b97591776503e613b5af88ea88bf6d60bd512f67f1972b56419dde9d997", "examples/gallery/tests/fixtures/focus-visible.tsx": "86add6ad941a6c1c847a419a4514810c5132d015d83fd7c8dff00bf2c1d989c6", "examples/gallery/tests/fixtures/fps-mode.tsx": "842857d96c45ce771bd2b16f0636323ad83493f30879f70730feb7cd96c4cd6a", - "examples/gallery/tests/fixtures/hidden-focus.tsx": "1a20868359e87ef547fc90212b6f0e574faf0507e9e07a8e7a80f3ee8ce590bd", + "examples/gallery/tests/fixtures/hidden-focus.tsx": "d25e45e0388aeaffcec0df3a5c131fcf47a8c86b4e43e897cf5b3cc8784af231", "examples/gallery/tests/fixtures/input-caret-grow.tsx": "62d17de7544b0abaa3b5985f1e0c643c19e4bd824a4c04b1d92c17ab60168e82", "examples/gallery/tests/fixtures/input-compose.tsx": "4784076f18e8aa14d5fd629db9ed73a817b325aef2b69844e00da1ce6d4c3d0e", "examples/gallery/tests/fixtures/input-composer.tsx": "4e9db0c9eb3a57d903ba5f6bebfc91a99f12dc7b56322f9b916348e75f0929da", @@ -2448,7 +2473,7 @@ "examples/gallery/tests/fixtures/text-bounds.tsx": "d69c21372dcd678c1955998142b89e05f7836b5195bbdee57fcd4694ca6cf4f0", "examples/gallery/tests/fixtures/window-focus.tsx": "91e7ba6c52324a1d6dfee7ef216e5b144af43264efd994cf55e8d8e6289278f8", "examples/gallery/tests/fixtures/window-size.tsx": "dffc941f0b0fdced7c86af8bb958c937d3c0403aab680533078fa3678737b4d1", - "examples/gallery/tests/fixtures/windows.tsx": "d16abdfb3f30ee2191117d290ca231815791e3e9c38a47ee2b597900e4e4638e", + "examples/gallery/tests/fixtures/windows.tsx": "0a71f18a63368ea429231a6b90c33d9421a863d5f1cc0a6d9efb24c5c6964480", "examples/gallery/tests/fixtures/zoom-in-pager.tsx": "b895a6b052cad3b3134ab3e3ec08df2a9b34d77584d7635d794fda768199825c", "examples/gallery/tests/fixtures/zoom-scroll.tsx": "da4c43f3540c66a1815269ae94af1ffe90d079fa72db8ca69069825c14f38d1e", "examples/gallery/tests/focus-visible.test.tsx": "7e9cf51b6e2004cac432b1865ef9da875bb52662e1e913c1ebd0101aba3f7b81", @@ -2456,7 +2481,7 @@ "examples/gallery/tests/fps-mode.test.tsx": "34a7e856b491268b6897aca04fa430bf53d13dcbdc43b9c2ee6e11c145af9da0", "examples/gallery/tests/gallery-ui.test.tsx": "a701d9a7e74a914a345c9f31ed6ac75b4c546420636e03701f0be15bc7de2ac5", "examples/gallery/tests/gestures.test.tsx": "adf7fcf2afe5029f2441eaf048251a1d33530467df91747f170968fbdc6f3a08", - "examples/gallery/tests/hidden-focus.test.tsx": "dc96f120a34fbb54dbc1e301645078a0e9513702e54ec41c221d360551f7b102", + "examples/gallery/tests/hidden-focus.test.tsx": "c3c55788a1d7196197c4ba8668359ff638e5ed076be5097747e32174c4dafa4e", "examples/gallery/tests/hover-card.test.tsx": "0fb365b6071d1959436dc5348234d391d8f18ebef1c62bab89989d6b5e96f010", "examples/gallery/tests/hover.test.tsx": "b6913bb0d322aac7eb9a23f176e0e9ea7ba4566faa8d2c3a5e19fbb3f5588c7e", "examples/gallery/tests/input-caret-grow.test.tsx": "27730621a1458c29edb6545f4b6109f13ab8748cbc42d56ade8e5f09c3fc7407", @@ -2478,7 +2503,7 @@ "examples/gallery/tests/mask-transition.test.tsx": "acf267ea59573ccdb0e158fd67f4d9351f3b379f10fd1325bcc123af269f971a", "examples/gallery/tests/mention.test.tsx": "838ce0750fe358ed9b7d8026c50f1a9f8abcc94f9f5587ad9579ecc6fc80dc36", "examples/gallery/tests/menu-room.test.tsx": "7c3163609e76a872131e8610376852c5397825067933dc6cb8f2dccae16c251f", - "examples/gallery/tests/menus.test.tsx": "fc696bbb7390534ba61a7251291a0d9a444d06e4a10b4a04ebb9f2235e9919df", + "examples/gallery/tests/menus.test.tsx": "124f403d0248cc2b908d560a03b99691d7709fd5c0d697d3867a103c198af3b2", "examples/gallery/tests/navigation.test.tsx": "496f9fd065084c55d92af4be780b01f5c1763ceebb4d647ab7d669ef7499ec68", "examples/gallery/tests/network.test.tsx": "6fcb73dd754489d393991687126527c01e8baeffa95690ad65581b3550e5dafc", "examples/gallery/tests/overlays.test.tsx": "1d0beb474b8b7dc03bba337b492e463f229d2a5c601b45a1fca8d5838d5a62a5", @@ -2488,7 +2513,7 @@ "examples/gallery/tests/pan-over-scroll.test.tsx": "df9f4c41c117717f449227de0d2cfa957b95a8c88eeab983267f83ee2035e27a", "examples/gallery/tests/panels.test.tsx": "ed83f672dce25cf4d6c8f2255d6cdd4f7fe90cba4bcc78475036e7123e2b9f10", "examples/gallery/tests/perf-stats.test.tsx": "57b4f04026ce716d12a5bf3193a1554daecba3ae7fbee3e90706ccb4ca236289", - "examples/gallery/tests/photos.test.tsx": "7d8823e844d517c85439f28bccc909c242f5ae4bfaeaaa9c422025c6f81805ef", + "examples/gallery/tests/photos.test.tsx": "b921dcbbf3e8ea34c26cbffaa14764080553857c136ba1018b97e62eb924a7f7", "examples/gallery/tests/picker.test.tsx": "6824bb7d3d16f573e1df9d3d1a00f9038afe17c9514907c52e9b23466ba7f774", "examples/gallery/tests/popover-focus.test.tsx": "7c7c6aaf29c27eb62e20d84722cd6e847c308c7265b3fd87882ad31b9a240ae7", "examples/gallery/tests/press.test.tsx": "264fdac63a1fd6df10d865b5f3eee809664dd2e77f3f05497bfe7865d7d0fa13", @@ -2510,7 +2535,6 @@ "examples/gallery/tests/selection-formula.test.tsx": "4be22efdd12bbda05c7371e13a0fe4ff03451a65b3c7314b3d9e3a0bd9c1c672", "examples/gallery/tests/settings-menu.test.tsx": "aea1d47d86dea3b61b2abeb139830c6b51206cb34a771fb4aceda7375cc2b1da", "examples/gallery/tests/shaders.test.tsx": "08c23b16125f0964179c737b824e986820c153f345df79b1e14f39e28a67e810", - "examples/gallery/tests/share.test.tsx": "a46679565cca63b7a1b73948fcb673d0d021b0e7f8e29b7719edf344cdbb74f8", "examples/gallery/tests/sheet-alert.test.tsx": "88dc0429af24460ab0e6306e4cc9a18c46e0a0019573af24c7d4fbfe64155727", "examples/gallery/tests/sheet-keyboard-tall.test.tsx": "7243e68f378d3673a8a5d173e47d38177ce80876b7b28736ef4018bebd378a92", "examples/gallery/tests/sheet-keyboard.test.tsx": "5aff08c66a92e1e177edd85e31eea87159030557a5293dbd56c1e987911fe972", @@ -2535,7 +2559,7 @@ "examples/gallery/tests/updater.test.tsx": "58bce8ce77d5e42fa339bf74f731ec520055136548ef3db4b0c2921815fd4968", "examples/gallery/tests/window-focus.test.tsx": "89a2a1f2c8c65a1310b385f1956d80be3fab9bc2a9cdd380543c088581676736", "examples/gallery/tests/window-size.test.tsx": "6e5c19b31a323d493fcc3caa8caabaf951db546b95dad063822859e3b531a65a", - "examples/gallery/tests/window-state.test.tsx": "80a5d9a08fac36b888414bd760af5b8b5fe61add7c8562313d3f05a10690bac3", + "examples/gallery/tests/window-state.test.tsx": "cbc23adda50317862842512077f98df37cff7b6dfae06f68d7921f0fe84d2dfb", "examples/gallery/tests/windows.test.tsx": "7a7d069bde524f17ce4589d48437b67f23d618e6e5abf02f9dc69ee183126ef3", "examples/gallery/tests/zoom-in-pager.test.tsx": "db9d5b44613c09985cb2df5fab11264df934b2202947daa60c5d492dccc6674b", "examples/gallery/tests/zoom-scroll.test.tsx": "0bceeb27e39402569f949b75f507fff8e04abbe3cafb2647105f46396b8fe21f", @@ -2576,7 +2600,7 @@ "examples/nsh-gallery-ui/command.tsx": "c2931c1103e9bd3650cf1a573778375086ba9f9be1900e7e885590fba2381ae8", "examples/nsh-gallery-ui/css.js": "28f0671ecd5b15395d8835410440e036eff00ac64dfcb31e8b0c73977243940d", "examples/nsh-gallery-ui/data-table.ts": "d5bf1d5b1e53087eb3ef954f979b607a2f96a55ff5915b9bbea460911199673e", - "examples/nsh-gallery-ui/demo.ts": "55f7bdcfb0e0a044779822a0e2255dc9227a3465552cea466624b24aa3a0fa5f", + "examples/nsh-gallery-ui/demo.ts": "abb0f9589ef0afb900d6ede10444af00f6bbb56070d23c589b142ce722186c58", "examples/nsh-gallery-ui/emoji.tsx": "ff28f3eded39ac6cbbbe6e653de89e6b62e370838813790eb3491440031dd0fb", "examples/nsh-gallery-ui/finishes.json": "92ebba8846f48b6076181fccc37c5dde12f5764442c0f6c2c997e093f6770193", "examples/nsh-gallery-ui/icons.tsx": "cbf0ef9fe4bb24f8b1bcbd2b2a9599d316e9d5e1385f5f1a8b453b3d64e3c413", @@ -2586,7 +2610,7 @@ "examples/nsh-gallery-ui/look/color.tsx": "4d3d7335b3e2fe08ac77f36922cfe31dd915f27d80979a5d6ef8099ca0f794d8", "examples/nsh-gallery-ui/look/disclosure.tsx": "7f4eaec94c53ccdb6aae875c3a9c62c58c1acc59836ea00a0d5f212a31befdcf", "examples/nsh-gallery-ui/look/field.tsx": "c67e87cd42dd21258434be980765e6cde01c3a7e58a9704989b27e330ecfd39e", - "examples/nsh-gallery-ui/look/listbox.tsx": "981edef7d7717341771891097ff73ec10c0404a872dbb4fa89d5587dab43e2c2", + "examples/nsh-gallery-ui/look/listbox.tsx": "ca22ad6b722982bd28fa5496554e9433613aded0a96d7c4f4c9f6b8d8704d344", "examples/nsh-gallery-ui/look/menu.tsx": "30168cc313c5180618c117454a936aa7b15d0e54eb79f8501635d743bfd3f566", "examples/nsh-gallery-ui/look/meter.ts": "28f3b914b584fa908e43f1b7744a30dc1049315c41c701fd31d6de5698e943f1", "examples/nsh-gallery-ui/look/nav.tsx": "5ac994147f686144f7ae3aaf7cae41e859864b55e563fa4bb577ab27d11947cf", @@ -2598,14 +2622,14 @@ "examples/nsh-gallery-ui/look/switch.ts": "98138b17f45734e7806e1ce74f9620e9489212981a76818e585e0a5285611179", "examples/nsh-gallery-ui/look/tabs.tsx": "3f891b864d5a4f27078547f1f8751255c863fdedddc274bae9c7be1b8351fe9f", "examples/nsh-gallery-ui/look/tool.ts": "8e2e720885c63e1162b3a164c9949654729116ec7242185730d4f3604b8bd189", - "examples/nsh-gallery-ui/look/workspace.tsx": "636ba033ba048cc44e74f6d87a8d2988fdc615a8efea2b4f85205bca38d18115", + "examples/nsh-gallery-ui/look/workspace.tsx": "b28255c974203817a53f60d4f5720588feac4ac86b77d80783428f04d6bd155e", "examples/nsh-gallery-ui/package.json": "d34672b3536a70fdf7ae4fbdb6141170a84d158278065b56696714012aa91518", "examples/nsh-gallery-ui/palette.ts": "498d8b0bac2d702b7fb7a30c708b572475916b0af7dbad1bf9a9d6446456cf57", "examples/nsh-gallery-ui/photos.ts": "3c30fe4fdc01b754edfc0798b0bf3cc4536a6ac10a449d3403f45b66a54d3c99", "examples/nsh-gallery-ui/popup.tsx": "ef5dc6dee19b5523a04b76cee53529371e32e5576f4ccb20b46fd134d621c2d8", "examples/nsh-gallery-ui/scrollbar-theme.ts": "8ac5f6aac9b7c793e2b12ca03e6c77838859f9721f4475b8ed9fb3b821c0fdc8", "examples/nsh-gallery-ui/segmented.tsx": "c6e6b7090d016df62468330ccee91330b51735c9e12cb6f2f3c1b5b53bf1a392", - "examples/nsh-gallery-ui/slider.ts": "0c393e415e5e1c3c36d953d4d226781b3c8282157d3bc8f756b2eb5c63cef441", + "examples/nsh-gallery-ui/slider.ts": "afe8d4cf6a198c94c5c92bbdb7eca3c5527e0d85cbef3db3786f30790341b87b", "examples/nsh-gallery-ui/sound.ts": "1fd9eaa7b9fd4d1d8e86c88cdf176a1272182f5376aac6a8be4f88479026e504", "examples/nsh-gallery-ui/tests/App.tsx": "636370e094da390eced430d2294e742f0838a631f2c5d999ad9ee385a9ed3e6e", "examples/nsh-gallery-ui/tests/nsh.json": "3b8cfa951ae851f9095b085d00b2b78ad76e291177d0583d1ba9ff4b7c360d46", @@ -2625,15 +2649,16 @@ "examples/post-editor/nsh.json": "e46f20b0444c7eb64bc8533963f5bfe2ec8ac7e777289f06ad9bbb15e710580f", "examples/post-editor/theme.json": "cd65c01c3572029ab55bce48d1b2811c51b8c2ff41a9df973b76b34abc45fe5b", "examples/post-editor/tsconfig.json": "9cc30d6cb1f4394c49a8aaf0e4e0126a9a137ff98e2e102ba38a8cd405689dea", - "examples/rust-exports/App.test.tsx": "98df2fa881eb3b6d1c383c0b6f77d6753d178e93df556111258dbdfc66db7cec", + "examples/rust-exports/App.test.tsx": "bca3c31de9631c6130bbbafe3c26be046e83b16805d8e6d7eae9a0d27c5b8546", "examples/rust-exports/App.tsx": "5c3905641665dcd44ff764590be3390e5dbcadec6d21d8ae0a52b38d1a8336f8", - "examples/rust-exports/README.md": "0f361082b7393ce0b425ff6401ae0dd665fbde12a8fb7b247aa889690ebf4e09", + "examples/rust-exports/README.md": "3a54ac5bc3c3ef6bf261c48ae8f8ee4ec9b7b0612e023807a5c7a7c05874c18c", + "examples/rust-exports/TextChild.tsx": "d54e993702e38e814366e543a2cbd5a3ddc9554cf066bed338b7e532994b1c6c", "examples/rust-exports/modules.test.tsx": "1f255eb7bc7e10735b3ecd9d9d1605fd5a55338017ed5629c1ee3c1c9efbafc1", "examples/rust-exports/native/Cargo.toml": "b1128ba49fe707f142faf5661f1559cd66fbf57e892c7a1a08807adc6a383a84", "examples/rust-exports/native/src/account.rs": "c3a327a3aa5bbc93d3f35fdb7bc2fa98d1cb24502b9f6ac07e69ee11978a0a11", "examples/rust-exports/native/src/gauge.rs": "cb760be901f9a9aa080c16d005bad9c8c2cdab39405b85eca4d804595dac67e7", "examples/rust-exports/native/src/ledger.rs": "5d4b118ecbbb05cbb2693a93bee4919436c19f3097adb91c3c3d3076c84155ef", - "examples/rust-exports/native/src/lib.rs": "cce959bdd0123a461aa51e8ee2f42a133306a0ad25d5e34a2786ef3ebacb758f", + "examples/rust-exports/native/src/lib.rs": "a38b27ec99591f1f5e40b765fa98147522393a7b0e4e928106b2718b79d6a2ac", "examples/rust-exports/native/src/meter.rs": "cfc72895b80daa57e396aa0b29ad9d5d94ad3b572ec64fb0842ba6793f4262cc", "examples/rust-exports/native/tests/rust_exports/common.rs": "3895ebeafab7358eed6666ade204e261fc130165aabbc14b2c89cdc8ba4f9f4a", "examples/rust-exports/native/tests/rust_exports/declarations.rs": "f53d1e1d6ccb07e13310d7e0387c48f639b78685c4d6900308352840e6b39849", @@ -2674,12 +2699,12 @@ "skills/nsh-design-guides/references/design-guides.md": "66859dd98dbc208c6e29cb885366f4f1785fd718e087b7dd20871e0207796204", "skills/nsh/SKILL.md": "1fa25a2c7d33a6f6446daa24fa08208423d5e9e155234f083a27f4887bef4c52", "skills/nsh/references/coding-guides.md": "23264c242034bf92782ce54cdce43eccc161d0a86836117669e22509c2cfcff5", - "skills/nsh/references/mixed.md": "b6fc03e6a80d3bf6fabe8436037ac9086bc44b87558325926e74a0634aa6a77d", + "skills/nsh/references/mixed.md": "a4b9aa89088e262df85f0f4879daadea9af30ef44812693fa7599268936f9a31", "skills/nsh/references/rust-recipe.md": "fde6a8e0a0e3cb54f260edee3cea9b77890530418677886128c5a94e10b29903", "skills/nsh/references/rust-testing.md": "b599b396474258e833971ebb5246ade2823cb33eceb03671bc616539d2ffb2df", "skills/nsh/references/rust-ui.md": "fa27a2fb43476db9ef9395a863634476f94a80d2fc1e2601637b16c1ff39f8e9", "skills/nsh/references/rust.md": "094ea2f74e8bd76013a148f63dbada000eb45fac77618514df6d6e43281cc91a", - "skills/nsh/references/tooling.md": "7a5c9a36f75881417c37bce7dcb69bf7f7d2ddbcc1d490a286d13bad35c3e504", + "skills/nsh/references/tooling.md": "4fa6c7a96b2b5d3a579727b1aea30f6dc8b7c9568c3c6dbd97bb10f2347c3c92", "skills/nsh/references/tsx-recipe.md": "550383c9d3839a6d77003e8689f81c536f284b55db1256a4e0f064c1769ad0e8", "skills/nsh/references/tsx.md": "b092ba446cb5da45690d00a5d28d1fdd7b4696494cc37033294815927a7c3589", "tests/compat/cases/android/App.tsx": "0a6103c2fdb77443c4d841e61ee08aef8c95d2aaa8c1fa213c12e819cf2d4d74", @@ -2690,11 +2715,12 @@ "tests/compat/cases/android/props-platform-android.tsx": "673ad7ff955f51a56dba48d12d0a8430582129907f2cd531f1681bb806072667", "tests/compat/cases/android/props-view-android.tsx": "a14407c8d93dd26d709c420f0a58a820697943af1d0c4c9a5516b5516a45a557", "tests/compat/cases/android/script.txt": "f2d90e6878b1443f3122f2ffa73dfe16b7612cfaa07a0916f31d694cdec50701", - "tests/compat/cases/base/App.tsx": "930c288732cb748619d931f9ba7bfe26fb006b728d2250c4a2502c6f095b0932", + "tests/compat/cases/base/App.tsx": "2eb0c1fffd774d24cb7954e9700de32bc8eb3ffe43a1acf07c73bf57fa54a154", "tests/compat/cases/base/base-accordion.tsx": "f8d6323a79edb1e62aee7891f3e0421fb0f02ffb8d0b1a54ba759d22667e00d6", "tests/compat/cases/base/base-alert-dialog.tsx": "9ad12e6c4133ae6fdebc5bad10351fadb5cbd7afb349a876b414c50d37601da1", "tests/compat/cases/base/base-avatar.tsx": "4091673b216c5737b8a322b754f80a956fc3e80e0531f6b276231bc22d711c1f", "tests/compat/cases/base/base-button.tsx": "1ce3fa8bcd248a56c1df7be66e64ccbdcb792988a61395b2b78f2f148fef8430", + "tests/compat/cases/base/base-calendar.tsx": "88902b0eeda17d6fcba8e774232f469d403d3f64c98d5c0fc4e7ac8f67c26b8f", "tests/compat/cases/base/base-carousel.tsx": "453dfd7b96a7ac41029ef60e416d7165c99653d5b3cbfb792c0754735694c268", "tests/compat/cases/base/base-checkbox.tsx": "09896bf72d332879c17f4d2623ec20113c59ecd7dcc364cfb1afe7acf0518ba8", "tests/compat/cases/base/base-collapsible-reveal.tsx": "d4c83cc64c8d23da4439559e94320d24acf2a39f7e2d6afcc9454d615f417c30", @@ -2705,7 +2731,7 @@ "tests/compat/cases/base/base-data-table-activate.tsx": "aff80eb9ce97ba9c9a1dcc6b090b195b06fa5199c9b03090ee557c97b7c9c045", "tests/compat/cases/base/base-data-table-fit-grow.tsx": "b1d9f30b3f820833bafbd5a9f2ae9f2a9744ddf0e1b1c097ad8f48f25c421fff", "tests/compat/cases/base/base-data-table.tsx": "705d528115e7462164b7cd9e0b26ab8e8cf1603c15c1a32ec86d89e9d52cbd48", - "tests/compat/cases/base/base-date-picker.tsx": "197012784a95a1361da616fe091bf1c77752a4f30f36178bd8242704d56a152b", + "tests/compat/cases/base/base-date-picker.tsx": "1b89ea74e374986435bc4f969db76cf5ce326aa7ede9973944e6549cde17bcc3", "tests/compat/cases/base/base-dialog-backdrop.tsx": "ce092f6e72057f62eda135ff8633fea9a9881c0f8380167d548b3d43200e3290", "tests/compat/cases/base/base-dialog.tsx": "e163ce9d6052a012c0b280f0413a4d15e61243ebed3f0ae2bd07fe62a61f4a5b", "tests/compat/cases/base/base-diff.tsx": "941337d8c177aba726b3d272a8498836a59096b4d37cc01af9a12cd71390a0bc", @@ -2716,6 +2742,7 @@ "tests/compat/cases/base/base-editor-fonts.tsx": "6e62f5b5220cb25951e1531a40aa04d4dc46c04a0aa7be66ecfe72fe4193af6f", "tests/compat/cases/base/base-editor.tsx": "c4e97431b28dd7b1b305e806919e2441bc5a7099b8d64ee07b20f26c7c16077d", "tests/compat/cases/base/base-emoji-picker.tsx": "9ea6d8df47b95fcc432824fb8c26c070e3bc2d02e8b96c733f21401c49f28e53", + "tests/compat/cases/base/base-host-accessibility.tsx": "82bed73a3137e6f43ffbae4e27545031aca8058aa6f38d26ad715f2a1b4cfcdf", "tests/compat/cases/base/base-hover-card.tsx": "2cca9ff291e8c23b59705e0fb0e33da9968c48f1040fd058a701d696bc92abcc", "tests/compat/cases/base/base-link.tsx": "091d55f593beca28da095a0254fc7aff656d4d93ffd694c6a30537869fb86a3a", "tests/compat/cases/base/base-menu-button.tsx": "2b650c5a0f86890bdc52da511603b10f799cc31ef8b00f5520af18099b0bf909", @@ -2736,19 +2763,21 @@ "tests/compat/cases/base/base-rich-editor-composition.tsx": "869f92e8988b87a07eb7cc74cb8666420f682e93ca60e2e6d48e4f3fdf285d35", "tests/compat/cases/base/base-rich-editor-content-size.tsx": "8605a5b9f6707f3644f784aef8777d22367db2aee81301aec2c135e342a710f5", "tests/compat/cases/base/base-rich-editor-extensions.tsx": "3b6aa4ac6c6138fe5f5dd98e0ba8c048a701c3d21aad604fd2a2eb32a97933cb", - "tests/compat/cases/base/base-rich-editor-kit.tsx": "73f89bb5b7a4070066f5384ac7a9c5467ed96b00a16789249a5972fd1a3a2f57", + "tests/compat/cases/base/base-rich-editor-kit.tsx": "a9e34bc376392963fc0543e9a1be5648ef5b80323cd3da1d641397b9eac993c1", "tests/compat/cases/base/base-rich-editor-node-view.tsx": "ae886983638e9d58002120dc821aa5d0ba2f91342e1ca9f79a80ea4e2e74ad0b", "tests/compat/cases/base/base-rich-editor-paste-hooks.tsx": "2db0a5e203d33384e0d6e085c4b18de7ec1890546f27771aa8cfdc80fde775cb", "tests/compat/cases/base/base-rich-editor-readonly-input.tsx": "c04cbc4bd9bca6b9c1eb4945e9c58a23d4ba6fec889b27d739dd1b5e64ccd4cf", "tests/compat/cases/base/base-rich-editor-session.tsx": "c9e7e744fdfb69d87b934f1821bc92ad245fb74b1a092bcdd773fd48d106386d", + "tests/compat/cases/base/base-rich-editor-table-full-width.tsx": "4259bdbda3b98368680d1be23dde364e1ebd96cff8bfb4272b8a80fdb12e11d0", "tests/compat/cases/base/base-rich-editor-tables.tsx": "a2a352a4022bea1b7731a63a512aa073dd46f04f412ee6c759e4f14455928473", + "tests/compat/cases/base/base-rich-editor-task-checkmark.tsx": "33af08ce02cb623fcbc2abb2a58611ce82044324ea1f92dd087757f1b6248e6f", "tests/compat/cases/base/base-rich-editor-view.tsx": "30f4c4f8ba2b6a5b713eb000d959d076b9d11f0b6b182c660bda3ba670c7f9f0", "tests/compat/cases/base/base-safe-area-keyboard.tsx": "e3ce2bc61bc927ad66bce152e45cfc0ca55301bd0b9f30781b172e9970378759", "tests/compat/cases/base/base-scrollbar.tsx": "69d4b1cbc0ffffbe743606078f6d95e025f36683ed4bcfe8c3c0764841579a33", - "tests/compat/cases/base/base-select.tsx": "25b011819c7b69f6fd8fbb7c2e494edbf1a4f6007de9256073a4267a59564cde", + "tests/compat/cases/base/base-select.tsx": "28317521be3b197625c960a87ca378482ffd7407f505cb8db0c996c01ddc3f44", "tests/compat/cases/base/base-selectable-view.tsx": "83f61931959e87f525c80dff9ead80e34ec0e3470832943ecc35fc83dceda106", "tests/compat/cases/base/base-set-theme.tsx": "072d5a8a28fabb8e6fc93c8658cbbc366607d9eb2f42269f179e48c864b9dd40", - "tests/compat/cases/base/base-slider.tsx": "b414b832757da00807d7578342a986e0980dfcb4350838ad4e78bc09df99f48a", + "tests/compat/cases/base/base-slider.tsx": "e5cdce82d39a1ada0280438743793e03c50b2bb728278e3400bf792f2924c843", "tests/compat/cases/base/base-split-view.tsx": "714fbd94e008017b64b02d7b120b22c615eb12465e2aa3afc22704698cf4783c", "tests/compat/cases/base/base-status-bar.tsx": "bbdf1ccd78c9a014eb872936d973eda83431741291254012eaaf14c723aeb93c", "tests/compat/cases/base/base-switch.tsx": "955e11bbafabd377fe4b83070ea823ef678ef7e22c006de3b970568539ec0ee7", @@ -2767,7 +2796,7 @@ "tests/compat/cases/base/base-tree-slots.tsx": "5099a9c77cbe846bc36cd44adc628f5c93771790cf3ed7cd5feb90d5e1634296", "tests/compat/cases/base/base-tree.tsx": "2ce5df732dee4c20ec5bc3132815b95cf294bb8df4b4591d68f04b6bd0130201", "tests/compat/cases/base/nsh.json": "0c4eb41750bfb2b44d3f667b2fc94eafe1ba6d79ce737df951ad845bd20315e2", - "tests/compat/cases/base/script.txt": "a4c425bf59138b89fd76faeefed9239cbff70cfbf81a923d272e2f35875f33ae", + "tests/compat/cases/base/script.txt": "109523900e89aa31d2245e077f0960b1cb40070d17599c87d5badf6d8d95e12d", "tests/compat/cases/browser/App.tsx": "a3eb018169424255fe1f72abfb043055341a9aa25cb544036167dc3c7e0cfad3", "tests/compat/cases/browser/base-accessibility-hints.tsx": "0aec52c1f5f566dcc7e2cf6744f6a709fd5a7d300696b0a8df5279bf65a4ffc8", "tests/compat/cases/browser/base-dropdown-looks.tsx": "31be80beb0833b49f59d78fb77180601da47dadccd86578f6b99ee2b5f54640e", @@ -2784,7 +2813,7 @@ "tests/compat/cases/browser/props-view-web-element.tsx": "92e40f53cccf2f1739bc3d84dd50cba3b612811a766c6178a2e84786160b92f6", "tests/compat/cases/browser/runtime-identities.tsx": "114ec24d6062594c86339e1ef1c93039e9fa6268d7bff538bab643cc704a23c7", "tests/compat/cases/browser/script.txt": "12a64a43bf8db91a12e8f4673fd09b9326c4614da0d763774b14642ff88cb7dd", - "tests/compat/cases/core/App.tsx": "ea665d0425c6d0bfca2d355fdc4c04086692601c336c3624bafbb53018889ae6", + "tests/compat/cases/core/App.tsx": "70717e8e304a03e0eaf16f5c31070f2f2d0083784720f877e4145c2d48f607b1", "tests/compat/cases/core/asset-imports.tsx": "56cb9c3e670fd78fb9d4f492c7a8f68336ec07cfffe3cf07aff71bc1ddb15f7d", "tests/compat/cases/core/context.tsx": "947ae5df45a18b85bb511787c65323a7dffd00e980615afb580b006e8a659066", "tests/compat/cases/core/core-animated.tsx": "7f08a3b7200c71d5af465374654669396bc4b8d10186fc8b6cd3774b046c8e33", @@ -2806,13 +2835,14 @@ "tests/compat/cases/core/core-ref.tsx": "1e7785a4a66f7e892efb5dd784de0a12a90d6aed625b251e16adcde29932c1fe", "tests/compat/cases/core/core-resource.tsx": "cc3d33c1321a04615b7fef7ac0d759fa5d76e7a3f5aae671c5ebff050a2769b5", "tests/compat/cases/core/core-reveal.tsx": "e21dc1502b9cbced65031a043eace7ad9a09b5d917cb041e76da0ea04aa6581b", + "tests/compat/cases/core/core-select-all.tsx": "05f1700e50e87939a11f3be791a1225f14efbb2339a20d3f751e5c168d728db1", "tests/compat/cases/core/core-shader-effects.tsx": "c14807e24c5f290084a0fd570e6c43727a81197e85de8f6c97be20d1ce66facf", "tests/compat/cases/core/core-shader.tsx": "3cf53530dd6f3faa7ede7caa76591c0a93fdf073e5d85509a4271d2061f19b1f", "tests/compat/cases/core/data/model.bin": "98ad61a25e3683b6adf2474b01bbe1c27de6aad2ce3a80ff4140fe473c14e691", "tests/compat/cases/core/media/intro.mp4": "a332108f2604e23c0cb31b38d5c6e22454e37a942b66fa7a7cfeec2b08b5020c", "tests/compat/cases/core/module-url.tsx": "8bf4a7a606496d4d5f321a8f722892de01e845d56bec5f42d9767ab3c516bb1d", "tests/compat/cases/core/nsh.json": "c4354909c4780abb723666fe31c2c82d50cbe3839f62c169dc0ec2f145d8a728", - "tests/compat/cases/core/script.txt": "da2f2d0007b9d59188ad86eb675def1eecce737cc0871f44536483a22ba80510", + "tests/compat/cases/core/script.txt": "c521e79769023870d1583d29c8f72282303b2a723a04902492c54cddb598dbc5", "tests/compat/cases/core/shaders-available.tsx": "3b0d9bfc88c7d560ef9b2ea3cc0ddc5d6e1ea5f61502ebdc7003280c49906a9b", "tests/compat/cases/core/steps.tsx": "4ccb977e817a138f09ba98ebfa5ca519f72959d3dc1b130058270f20eac8ad88", "tests/compat/cases/core/web-available.tsx": "63a8e1fcbd37412db76031e90d8f054a864ec3d54e733d094b9919327ddc4c70", @@ -2823,10 +2853,10 @@ "tests/compat/cases/desktop/launch-at-login.tsx": "24272cb0268da27b0c94c836a17eb5475e94df49bb1e6b84a972275c32e41e69", "tests/compat/cases/desktop/link-hover.tsx": "daff8e06a082d720ff32a9c7f2c43ad692c47035c406ae0b1b19692a0683940b", "tests/compat/cases/desktop/nsh.json": "d6cc3373e8c053bb14feb13fa55595ad13fc28784cc91ace84820ae5f35f893f", - "tests/compat/cases/desktop/script.txt": "b0cb34b77f389c6ff2217ca3693263b3f3f1a81c7a3f522d379965123699ddd3", + "tests/compat/cases/desktop/script.txt": "1465f99242c51c6600abd02f1003d3a452c31a150aadd9c9b2ff0013fcf4ce4a", "tests/compat/cases/desktop/scrollbar-hover.tsx": "cf95efb2accd1d34916ddb185eb7d8205b56074d66a5a58b61c38ef55667b18c", "tests/compat/cases/desktop/tray-click.tsx": "48774022a879624208fd1bd988cd563d25fae921af6af1c3055dc1171418d98e", - "tests/compat/cases/desktop/window-access.tsx": "126ee94772283bec3fe4e48b00ab6580d2e8fb85ab58aa985c6003cb1615bfb1", + "tests/compat/cases/desktop/window-access.tsx": "42288d1ea5789058d26d339bf5feea676499cb02cfa0684407b5c86a94b7f698", "tests/compat/cases/desktop/window-element.tsx": "1d92cc10862d8285dd9e780ab36afecd8c0df3756914ffd3a04aa917c298d90e", "tests/compat/cases/desktop/window-open.tsx": "b363294ea4ced3847a0ed2ee41e23aa90106f763e9ba82d0ed2d60c7b41ff2b2", "tests/compat/cases/desktop/window-props.tsx": "e919d1c5d11987457e8a0ab474dc691dadb6676d4ae0361d401f84b782f2bc42", @@ -2879,7 +2909,7 @@ "tests/compat/cases/macos/nsh.json": "798675cf5aeb929c46e8555242b97b32033548736d6b74986991d9a2a4565cbf", "tests/compat/cases/macos/script.txt": "d4820a75195bd539d324bde1ce54fab4d416770027c6e4cf1fac141ff775f5a3", "tests/compat/cases/macos/web-send-input.tsx": "e6a0b41e372c5b232f2bcabe09bf32136e0dc242eb850d8a6eca90a067e887d3", - "tests/compat/cases/modules/App.tsx": "f56c78121cc920b93f9edbca2c6c53c74dac081528a41b28b6b4e2718df612aa", + "tests/compat/cases/modules/App.tsx": "5bc44c4a1ac8d91156278d8448d4b377396863a4767f652be2ead7f97f52e591", "tests/compat/cases/modules/locales/app.yml": "8903190b30d73691c15818a89af18ef21eedbceafa4950b90b34d0b0f5757929", "tests/compat/cases/modules/mod-accessibility.tsx": "066141d65149262f285ed2dc60de96dc280b0f9b80d17bfd02bae51fbdfda266", "tests/compat/cases/modules/mod-android.tsx": "ffb8cd306e2fdef20e972971d19710765e661b934bdc5ae3b4d200fedf5983e5", @@ -2897,18 +2927,17 @@ "tests/compat/cases/modules/mod-i18n.tsx": "29dc139282510108585ceff1a677a24783aad4045024f290188f5e927c739891", "tests/compat/cases/modules/mod-ios.tsx": "19ca5a52606eed935701564f8936cd364c8b41c95b5edf8c4f10693f7669e3de", "tests/compat/cases/modules/mod-keymap.tsx": "1c49fec637ffe1a92485f4165a2f2c552da7d25746e9655910d2cc2bb019b42e", - "tests/compat/cases/modules/mod-mobile.tsx": "6bfc75a2fbeebe56a856289c5d421064faeb3ead56b741cfacb00c0d34770904", + "tests/compat/cases/modules/mod-mobile.tsx": "231605f7de6873723669350a0d45315b65709c4d1beb372b568e68a165050435", "tests/compat/cases/modules/mod-notifications.tsx": "81f4405ec50c1647bc9477f53d22f684c81134dc7d5b6fcc02e70bb3f151be4f", "tests/compat/cases/modules/mod-perf-stats.tsx": "1000c68b229f2f09f92dec15ce6da507d1c27a57bc07b22722bca48ed797b2b6", "tests/compat/cases/modules/mod-picker.tsx": "9e6b4b1b34d220acf04e865f452e070bf9f5940126058dc77c25da467632f186", - "tests/compat/cases/modules/mod-share.tsx": "7b494c4f0fd408bf129bb2f7bcc9ccba1c6bab27c7874b1f2a8b1f9b3ad2ceea", "tests/compat/cases/modules/mod-standard-access.tsx": "8525ea02365ce14822c9deb4e51844c5f43dd172b154cd0b93e467bc725bcd4c", "tests/compat/cases/modules/mod-storage.tsx": "b7ee05eef77cc29e132082cb03ded9c0941437cc56d42ef7e42a8f2d541cb410", "tests/compat/cases/modules/mod-updater.tsx": "3702abc9e36927ff540c27aa67d5b89e566b2c0712fa61d707f5db9d58bec11b", "tests/compat/cases/modules/mod-url-scheme.tsx": "ffa251120c091518d5658b06cf330a0c2d3f65f136a4dc88962dd217a62a1d23", "tests/compat/cases/modules/mod-web.tsx": "9cd49e749629bbe01c39f37d63013d1e436e84b577f1ad8309d7c5d76dad50a0", "tests/compat/cases/modules/nsh.json": "275ffe5ad13c23d4d55022ee678d27d89ab4d18df457f7cac2b6a3ceeace8201", - "tests/compat/cases/modules/script.txt": "9aba48982284a8f3f801dd2711a8590fdf606dfbf7e2153d4ee3b8dae5d054c7", + "tests/compat/cases/modules/script.txt": "acadaec360d03367ba9f39dcc143aa923012e26b2e34f821186d08d5c12178a3", "tests/compat/cases/modules/sounds/click.wav": "c726d333dd159a31423f3480dbb1c5c4a9dfcd30efe1f7e12ade390dc92e8908", "tests/compat/cases/paint/App.tsx": "254bb6d67cd4b3c89fdd986b2c6fad1c04233cef65bbfca4a65bd4e3262b7917", "tests/compat/cases/paint/nsh.json": "56f891ce05e7aefa7949e3445a603cb477313be037897c75acb12f136c1a85a8", @@ -3018,7 +3047,7 @@ "website/demos/el-command.tsx": "7ec10ee151f7f590866ae17f40fdbf34f4dcdbf9e2a91a000709013a1c496389", "website/demos/el-control-flow.tsx": "1b221902b5daeaf02d45495a64a890684c2d9a787a41fbc180352a497ff74a4d", "website/demos/el-data-table.tsx": "56ee1e45c75fe949990013b368788b1e2b39dd3a56171958300288490f35316a", - "website/demos/el-date-picker.tsx": "5f8a1795f850db7eb5b61bde42e1bb9598391408270dfc914a22b1d33fe695ca", + "website/demos/el-date-picker.tsx": "96dbb4a13f35499de88287d06d07c9238242dbd7329e6c2e16edf7fd06cff318", "website/demos/el-dialog.tsx": "55e73024096ca2bb1faaccaa64e020ea6d2e722cbf2a5dbeb7939dbbf5d42556", "website/demos/el-diff-view.tsx": "d17f921305236030652a19eba91a9472e4e9ec21851c1c46f1678fc27a2981e0", "website/demos/el-dock.tsx": "d03d8ebfc63bbac27df5cde271f180c677fcaf55375b14014b2be070041ccb3d", @@ -3053,7 +3082,7 @@ "website/demos/el-select.tsx": "66302fc68f683b90ab53f1d10367e1c05e1c3b34f843691b0729451f6ec6a15f", "website/demos/el-shader.tsx": "1858879596db2db7afbbe6dfdcecd590c336d834696bd5cb91f6db86a549d09a", "website/demos/el-sheet.tsx": "c5d44bc3b801b4505cabbab660b25e666dc9fdf383f723c3cb4353fffd7319b3", - "website/demos/el-slider.tsx": "bb96fdded36c01b5c3c5ccc3493e95b7fb96a1431f0b3ef1cbfae43397f5ddd6", + "website/demos/el-slider.tsx": "f2461ba7425526968fa178173b721e73d89d1dd35ecf91e73c29de52490e8c2a", "website/demos/el-split-view.tsx": "729e08f0a8cb961b39bc625d2f9b46dd19c49b48eccd212e3dad3f20b37ee00d", "website/demos/el-switch.tsx": "a217c223617abea07041182e3680e7bb4c6173cf59515004c6c856cebb17084f", "website/demos/el-table.tsx": "25ede43775911f5fed094a7d3246ec39b511599ef7b5c0741937d0b8bba80990", @@ -3088,72 +3117,72 @@ "website/demos/mod-canvas.tsx": "07682ab85724a60deec18f54ea31a8e2f5ff8e457c5ab17e7182ede6d434a381", "website/demos/mod-storage.tsx": "cdb8a61d70c2ce4f8422d273d7666b4a5acf788053379f14bd95d36663f6c497", "website/demos/nsh.json": "850efcf429fec8b3429fa34ee41a4958dd4d5f45aff9f13fc7dcbcdec06eecc5", - "website/demos/palette.ts": "f708b37ecb6f4d7b4cbc831fc62600780f97b22af5ed09b069741c372de3e17e", + "website/demos/palette.ts": "b9f08a75edf8227aecc44d589b08ffbdba0a6ad25f9eb1f74454e2341e0f8f29", "website/demos/text-view.tsx": "ba62bfb249f03d5cfd002ed830001769015c4c1f202e7079b24ca41d3d25e954", "website/demos/tsconfig.json": "9cc30d6cb1f4394c49a8aaf0e4e0126a9a137ff98e2e102ba38a8cd405689dea", "website/demos/ui-navigation.tsx": "d74267fd72b1939d9b1d1c16a0eb7662119400976466c6e38ee2509c9cf96b4a", "website/docs/accessibility.md": "40916b3dfd919a5ec71283d0ea3dfd4ac9df2013962e180aed1e7eecc490a5a8", - "website/docs/android.md": "8ca4ab9659736dba7b2fae84871d68a02e12ed9db4cb711922b2bab37c322ec4", - "website/docs/animation.md": "1bccb5ca54511381ceb9058167136a35dac47f51b63c6961227e857157a23d26", + "website/docs/android.md": "b58b8e9a9825767a0f2e4a6d3705bc2cc167e528917b8eb7ceea061ab1324a0b", + "website/docs/animation.md": "0ad4e6dc1e9926afadeaf83bb35162b02005984a72f199a9480608f51b6a8061", "website/docs/app-updates.md": "0701192d27aa9ae26c92e378b0e3559004a6e4f2f0cdb7bbd5761329a7e9a0b7", "website/docs/architecture.md": "03fd3f0b9b408f5b58f8fc73575994e1279999113c4e2b51bf2105e1ff088788", "website/docs/canvas.md": "39bd7a71fba42894b7d4b89cf759241625b472706323b90bcd402c7beeb25278", - "website/docs/cli.md": "95018e1c93edf1d903339f94decbafe3170380dbd0a848bf2c9b40cffa6247c1", + "website/docs/cli.md": "34d1c885df7a8820bbe7136b697b4b70a1934c00fc8a7993eef0ce59b761b5fa", "website/docs/coding-guides.md": "23264c242034bf92782ce54cdce43eccc161d0a86836117669e22509c2cfcff5", "website/docs/comparison.md": "6889ae7cefbb02e9f61a058be29bbea9948be571151de24acff811889efe301d", "website/docs/compatibility.md": "431c24b579dd57baeb7957c7dea8c56a0a4d1252e5fae26c6e67d1c76bab0f0d", "website/docs/design-guides.md": "66859dd98dbc208c6e29cb885366f4f1785fd718e087b7dd20871e0207796204", "website/docs/dev-server-and-debugging.md": "d1047ae26fbd5cd44586aa5d50b330dd0c235d5b47adfa26b256b9ab86695021", - "website/docs/device-and-environment.md": "ee406a9e4aac60461bbca02fc7d924a1bd5befa1ee84b4f634cfde178e1614f7", + "website/docs/device-and-environment.md": "c174b439283ef0974d9439365d321f12e4240559de600b35c85e42023c1569f1", "website/docs/embedding.md": "eb738612f00144a442ab03df44d91c8be26d3d4c6943fb729b20282da2a58a07", "website/docs/fonts.md": "d52c29668bc30d8613dc8034ee42481d45fae8f51d371302024a01d3b0cc4480", "website/docs/forms-and-keyboard.md": "8ad752daf9b96e599889d46a196cfd8d1bcdd513b4f899c0f0b34c18f603c77c", "website/docs/getting-started.md": "f5c3a99ba21473fb941f05c2b0d9334a391ea3ac2a5c824934072def73d77812", "website/docs/goals.md": "e4f190dc54d297fdb16b2712933a48d3c5a0d7c73ec1395e3ac9b282e77768ce", - "website/docs/gpui.md": "31180cebb2ce20ada625ca2b3ac3c87ec8147534a1bfde34cc8770c1fb216a97", - "website/docs/i18n.md": "38a01007776cceeef2589026f215ecba8d1ef4fca027f9bcadf8188a97b7d7f7", + "website/docs/gpui.md": "64d81d52441a448b4c2bcfdc9101734e45cba8593f5d13a1d4cf9b8543f81961", + "website/docs/i18n.md": "c10b37a3f0d81f586625519b49ba1d235083dcf02848aaf6d40892815fb81c10", "website/docs/images-and-assets.md": "5649722a61d3a902c02757f2e971a0032adbf5d85f576bd3d1a4a0a3a5cc4697", "website/docs/index.md": "0b225ddc508c32b113496080d2ccca99c4a3bc00d1b1f88d03a6c94c228e1468", - "website/docs/installation.md": "840e9101c8d99e376539e099750e4d5d7a321956575a0a30a5c46009bf84ffa5", - "website/docs/ios.md": "5c3a542d1114d6295b752f2184ea85630acaad90d8e0605a4b08ac4229b63828", + "website/docs/installation.md": "43d7b440538045c354aec8a44636a77f9b69ee150cfbbea7c5dcf1f779d39077", + "website/docs/ios.md": "db39156903063b87f6cb8cf02f5d760dea6586663107c7230503ccf09c0462e0", "website/docs/jsx-and-components.md": "1fc97bb5f754739f6c3fc3864485cf798289aa53acb583dfa46671590c2ffabe", "website/docs/layout.md": "e7ee66f8e2cebb3459b5bd128ce7dfdcbef933d379d623863827b50a257b2b96", - "website/docs/linux.md": "b85416d8ad35ef3312a451b509d7087eb62ffe8eed7945fb835d1e079f3193ec", + "website/docs/linux.md": "e76f2428373d568bf9096c2f20a19dbb3dd59f260b8b04516819450d30abea26", "website/docs/lists.md": "53437393f11fa318cab4591665d46365a02975dedd1c34c36d44f62c4c9b0ce5", - "website/docs/macos.md": "7551fa87fb82e610389d398ab52a789ab984845e296485d520b5d1b3cf3297c5", + "website/docs/macos.md": "8aadd5530155cef945b487affcb01fce501ce897e51e16e94ab36e313d19013d", "website/docs/native-components.md": "8c1d15b4a7e47686e47befd9828daee0ccee6c8cce6d746fce80f5b02eb0aa69", "website/docs/navigation.md": "e461ba30444ec19037b1b92e8c1b342f80558cc9e5b5c1fea6171dcfb7fde98e", "website/docs/networking.md": "ae387b2056c75eb12dc9abe7b9b5685326f7e7ffd3838cd47498d7e99bebfb27", - "website/docs/nshm.md": "8477e3aca83fc256256e602e6e221bbf968264eacfc4ef103fc613d33e58d509", + "website/docs/nshm.md": "2aad9f9ec5636bfbe3a0f0758e10125cb5b565fc8c5c5b8a0e12859725e21580", "website/docs/ota-updates.md": "051723651e31939490c6dc9d4a774381027487cf1fb04cd92175a6df180c1b44", - "website/docs/packaging.md": "fc8ab0d823df1055aab50b1c4cc343c94d575892c1a61c8afcb1cda4aebc98d8", + "website/docs/packaging.md": "7c689eef73e5cb1d7364a14985fb3d2fe62ed46efca2a772c491d90e752acc3d", "website/docs/performance-report.md": "afd19fe16877770d7751a2e9dab607f27d35db771ea891d1708064d8db845c34", "website/docs/performance.md": "694e244bd114687774e60a1b0876168b9489fe5404edb24f7e93592af434892f", - "website/docs/platform-extensions.md": "773bb9512cc40f5ae6e838eac1a51d9768d93a8007c7a681e5cc341750d0eccc", + "website/docs/platform-extensions.md": "f1767fe3cee9e9f42c313f60d3511dadde7ac384d5d983dda990a3fc9a7f7a11", "website/docs/platform-specific.md": "109fdb73b550240ee588d28e8698eac9e99f1deb54e641588df5eea211eea092", "website/docs/platforms.md": "30d0c75c2eec9c66fee6c943ad30a3506d5996ae05e6929bfedf5a432fd5ba7d", "website/docs/project-structure.md": "0803faa6a2dcfdfcf50ebc4db6e45cc6e176cb518989752c69a883616735a70f", "website/docs/publish.md": "829a430579c922a9d98812ecbe58674cc808b664e8f5be9ed3d2c2ee3303e870", - "website/docs/reactivity.md": "2c844636358de888f11e202a43d9f7a03e3a8f8e01c7b6b627af2d279b3705d1", - "website/docs/rust.md": "d61cce187cc47974043b92b96b2f4615bf360a05f6ae6381dcd0571d81475679", - "website/docs/sandbox-and-capabilities.md": "407f44c738d82f67aa7d3be94146f55e775fc1643a4e112b76e9b5f0b18d9805", - "website/docs/scrolling.md": "9b270f5f068c57c739ea1414d23fc66fe243dc5d471e235b71574e6f8b2dc2b1", + "website/docs/reactivity.md": "4b06d3d71ff9366bea7ab5cf80229c3d79d5bbde74fe7557356f689f4f44a343", + "website/docs/rust.md": "716f1867af3044c51086b0d4cae78a91e01fd1611a92eb4d8503c1a45da91f85", + "website/docs/sandbox-and-capabilities.md": "1d5beb02a7d8d5ffd33afc02a3660ff49a2659b90bf2e1d24d780c65a77ac168", + "website/docs/scrolling.md": "1b54accd552cdcff3e931402df67a16c226b8531812a8dee4986f8b198e159ef", "website/docs/signed-packages.md": "c0f6373cdf35c0bce196a8b44fcc42d0588df2d1aed068581c1e62a8753c6af6", "website/docs/styling.md": "c4af08eb3ec49931aa2282e3069430df39ed3319eeaca2196e62199f16fb8b84", "website/docs/tailwind.md": "5f8067e1be140c01fce5278eb0e0b8d0507f5311671cf0bfe386115c25498b7a", - "website/docs/testing-and-trace.md": "435898ea0c04df8ed437208e47ccf74ac407c08700b7485d7b85419ec075f247", + "website/docs/testing-and-trace.md": "bdcd87f5caa89d5b23387a0893a5a40e03261191b081c8eafcf1fe2a7b2e94f6", "website/docs/text.md": "b637c4b98b6e1335daed30739a8e1db10e53c67b1c5ce6aa31879dd0d47ab447", - "website/docs/touch-and-gestures.md": "614cd721bdfd5a81b2e365957fd831284df184beb4f02a0055a9139bb495911a", + "website/docs/touch-and-gestures.md": "58043960f851b372544fb6d7222ce24806e899df09f110f3b919ccf19406af00", "website/docs/tui.md": "f64840d7783b649e0372b4914c09bb453e70350d3b07f19c053bf69c52d3ce0e", - "website/docs/web-view-and-video.md": "e2ada0bf5d47b6a2ae56df6aaac3453fd71ccb28e7a12bbc43dcdd045b6aec0d", + "website/docs/web-view-and-video.md": "84f6eba8bf465b6367f18dc94d48b79e48879d6495e0b1b897b13b08ddbaa16a", "website/docs/web.md": "89ae4b994e049d42fd1341f80177a359605ebc08b563a29b7fa8ea2d82029b82", - "website/docs/windows.md": "1d5d71fdf8c4f9eae87dc85128e7ea9cfc67c0ca7ec506d1fa5ac346d599b140", + "website/docs/windows.md": "13874b6b8e1d6e8008b9cd715e40caa682b1fc5273d69a9767021a8d3cecc63b", "website/elements/accordion.md": "287f03c205073572b726b47d73d28d8a3e74aa4ea946e3525519ccfbb38f7016", "website/elements/alert-dialog.md": "710d07934d676fa178c8d8e59a167f975ace4169448f73218357399054496e7f", "website/elements/avatar.md": "7261bd47e20ea368ba12173362159f9529fd592c8381accac7939edf28e0405c", "website/elements/button.md": "b5b2f95188dd588104e801d8da5900d17c6b9f2e8ae524c24a89b8018f2947ef", - "website/elements/calendar.md": "87f4938c5ce3f53913b28f1ebbee65d4e04d281ee1dd87f51d7b3a87e72a5bd9", - "website/elements/canvas.md": "767a979c21e9227ba42fcd587bea4b53574f748b14c8719f78f239683af686e7", + "website/elements/calendar.md": "ddef51eb1749d4a37e7ad15899a79d37040edd6fae4a016fa4756e0e4a0e5e20", + "website/elements/canvas.md": "a9127a1ed2a419ece86022bf17906a8f9ad6799e5ccede94cf71dcfbf0ab12ce", "website/elements/carousel.md": "bae8eb9585e780dec5dc82b4f8e3eb3e5ee89655cf7ffb7b4d8be204e8e5d6d5", "website/elements/checkbox.md": "4dc04ebaeb66e6358bdd6bd48eb5a940f2795033427e653746c8e3767717bf95", "website/elements/collapsible.md": "917d9122a6cd65d72f6e37714f08f37ab474fdeff978d35add3cefc7191fdaf4", @@ -3161,24 +3190,24 @@ "website/elements/combobox.md": "c54bc0fe5dd6e8e34fa6fdbab6328332c81f072221a3a6d96e536ad8317e479a", "website/elements/command.md": "bbae4530783977bd92576e9ebc04d5349f768a8a47f51e66d52190ebbc6c34a4", "website/elements/control-flow.md": "0adabb6de26d8e5989c74fd7a30700ba89fe00582da0c337578cda60f3cea23c", - "website/elements/data-table.md": "81c3b0fcbd6d204ded5d57b3d534c96c1e6b1c3c103ff11c09c4f08027c47eb9", - "website/elements/date-picker.md": "12070f2d7be0c4f08d1f6764c97ccbef1e367b3ddc039a3f005851839b492665", + "website/elements/data-table.md": "11c4543303586534485b54d10b0573cbea60ab226c2e4d50944ef725962aaf44", + "website/elements/date-picker.md": "847113c2ebf4a8728b554e76feebfee65b9cea2c3ebf830bca4368f5cef87ec6", "website/elements/dialog.md": "614fa47263cd825d48c1816283d4c46bc63e24881d1d69a2160a977e55e2b776", "website/elements/diff-view.md": "7bd7ac57280553fd2f0e517ff01eb2921d1819e017284bbd10243f593a7c0389", - "website/elements/dock.md": "f4cdea66c2f85f628579663feac599798daf6d02723c3e6b65b11a1796f72fa3", + "website/elements/dock.md": "69818ece349df9c562ecb0150573a43193cbbf946a4ab038e720f1911df76d8f", "website/elements/editor.md": "2f69892277714b789da6f7dbb885c9ba81f71172c6c777f8f93b285f3951a011", "website/elements/emoji-picker.md": "6f50364bd2837753e4740c01ac1a98510d2e54ba9be3d20add7f578aee1440b0", "website/elements/hover-card.md": "9d968325a14f2f675214a11b33df269e684b6e8d45b6ab2139a50a3305603211", "website/elements/image.md": "18798c628f17a32d657b7738a36598dc02723edeed954d20b3206c73992b1f5f", "website/elements/index.md": "dfbb52b138006a988dae8059fcd8147cd62bcdafa3240d807417bfab39903a81", - "website/elements/input.md": "3eeac3fe03238c6b16656366cd51b623edc08280f6dec7731f6d4d409d249aa1", + "website/elements/input.md": "83b0244eb6d036b1cb109cbda04f111ece31bd9415856f2edd493a55f58ed68b", "website/elements/keyboard.md": "1a5728908863894295fbeeea0d05f9e67c896939eb31f051ad1cc1cebc64b193", "website/elements/link.md": "b0aa3ced46e85d1dc79d460ac6e2c2155b4c0335f2c2171fb592d99dbaeb3b4d", "website/elements/list.md": "3b614d67b10a9b5e2647be5fc8337595880edd7fb790a8281b64676e926f3142", "website/elements/menu.md": "24c9891b61fc1d72ab3b3bc9f46a2b23e39973e524bff1d5143e9175660b0fc9", "website/elements/nav-stack.md": "7e24323b060ed0dfad44db08137c5219acf67ddbfa4b2d2a7f1dd74565ba21c0", "website/elements/number-input.md": "ce65d585cabc94b89f479610fee9668f78db3d4c2a1045ee4524bac7f5a6f0d1", - "website/elements/otp-input.md": "edb1b0d67313c92ebdb3bfddf702a1f5bedf73d664cb1e24d94e2ffde7d2e6da", + "website/elements/otp-input.md": "281fa4f745d35919ad41880fc1aea97bd1e1b31986036bbebb2f5c8c598c24c5", "website/elements/overlay.md": "2af7ff09b0fabdb195b078bcc731de62e2a0400a8cb0c0faba15146a20793a7c", "website/elements/pagination.md": "a8842d0dadbaf7f3ab8cd5bcfdfe46e7a8da3d9ce841ab63599c9c03347d8247", "website/elements/plot.md": "a86c29fb7811c9b515693e79bb33c23257a0b0903ba612500e0655b35f43c52d", @@ -3186,20 +3215,20 @@ "website/elements/progress.md": "a40a0741ce07cad22d863b41fb1823c54704bd9062b09ab76abba8ad1a3c6c52", "website/elements/radio.md": "83b82dbc157adfe48d20c1375d829ad44a449493521f76d99402065d49e2e25c", "website/elements/resizable.md": "520680e6757c5e3fc88b1cd8e0efb2875e430fcc7e183f7303d82106d65dbf1a", - "website/elements/rich-editor.md": "9540a3311d03c38d046f6e17ab090b9eea54a3a10d15fff8697173ad3a5451fe", + "website/elements/rich-editor.md": "3de3ef28f86c1f54748cc524abd89486046be4f325946ca8ca0e1056351e675a", "website/elements/safe-area.md": "8c80f3cd71b56391de75d54eb4ecae5b52d3fd5f98848a17e4240a386ee3ba08", "website/elements/scroll.md": "3983b77b2263bce539b512ba5253ddbab41067b8f065029bf860595b2e984514", "website/elements/scrollbar.md": "382aaebe6c1bf6c5c66d2d313178d8154bfdb64b0a795ca5788346593494a3e9", - "website/elements/select.md": "58db92ef2333d7479cbabfa796ab79858dd7b8b97bd6aca0d9cff1fd4f368819", + "website/elements/select.md": "08a2cb1a59d2ef9ca1bf5f325e44438e21d954d8ea6de8d1e3209cdff5d90fc4", "website/elements/shader.md": "a49da6a083042ba2cae367e352b70bc573e2783dac8dc1a232da467828b077a1", "website/elements/sheet.md": "325b0a57d9edbd5d887cf12c29720a7eec9d99eaca48ed06de7a8fbd9c3982b6", - "website/elements/slider.md": "7c92e6eaec4970608f1fad686a1f9ddcf435f638d8bbd07e7bbec8383a3910cf", + "website/elements/slider.md": "e3e11e52e846cb9e3593e9a9f5d2523e29eb2d44efa4ea87533775bda10b70e5", "website/elements/split-view.md": "ce762a669723a05661c24e8f659eee5156d99923e3336facbd6127fcb39f5b64", "website/elements/switch.md": "63207bc80b20f3c94db63dad15fb2df7e4ef7c60a07bc5fc8b1f5e01b352e2bc", "website/elements/table.md": "9c1ef08e18d3eb22265dee15cc69cd6c9244172cf2bbf5daa1ce1782dae07238", "website/elements/tabs.md": "5983f5fc51b279016b7b30deef292bd8d63ffba90019b6f91b640650fb537b9e", "website/elements/terminal.md": "449e6d60e2bd1385fc4e647b1557b05466b426265ee183d012b7cd8d3e2d93b0", - "website/elements/text-selection.md": "509337012a0be855baf1e9022a237aeb1b06bbf7ae34cfa64221a42d4ed61555", + "website/elements/text-selection.md": "0bb20edff15385232e07526fa6ad0bb96feeff70219bee8cf56e43b96b7e63bf", "website/elements/text-view.md": "e82e973adfa2ba3f1f12d5f8fa7614b8f604b62418aaa146dbd642bd4007d86a", "website/elements/text.md": "0969087171f8c196012f65700cdb7012d00799def19df50e9cb65628e96db4f8", "website/elements/time-field.md": "d311f7a658235a2beaf715256a394c38ed2c78e5d92758a69b8f200f0285eba1", @@ -3211,22 +3240,22 @@ "website/elements/tree.md": "6a5bb6c01f34ad21db116241bc1f7fa74aa5f396369828ef4c9bbb074269f2b2", "website/elements/video.md": "edf463198b49dac69c993fca7437b5d5be8482baf22c834eb98e7bc9369548aa", "website/elements/view.md": "78a8152cee873409a5caee2e6e80b44c4ea0a833ecc7ae7467f586e577743327", - "website/elements/web-view.md": "0a89bbd84683ec5b8e3533e2b483480ec2ec5e8f6ab4d3b100dee2d47f244788", + "website/elements/web-view.md": "9b657b47394e65ae6253899c59c4c28b92ed6454ed224bed76b86f57971125f2", "website/modules/globals.md": "1130cc433563271b9968f293dcce598e9f12fcba9dc08fff3c9b121432adaba1", "website/modules/index.md": "156579f133e422f0f8a4e4b3b8e41eb36db6f5cf84d9615c86c0153db853a9c7", - "website/modules/nsh-base.md": "61144c74fec5b966aea556fc797ff5929729051e09230c60e09651e83df93aa4", + "website/modules/nsh-base.md": "22635eee9b1ce261acae35d1e1cc6613ab2b77ff8767359441539358bdcd3043", "website/modules/nsh-canvas.md": "a52ed01b2e38229cb61b774bab1171bc2e8fe2172f2cab451916683e54250375", - "website/modules/nsh-desktop.md": "1fc5052b538cc2e8cff07f5b36b3933712db332523993b2c9c5e516ff7ddc24c", - "website/modules/nsh-i18n.md": "a38553d326b155e515336d4e44416b37714b4fe4625377cf15f2e29b860ff9ef", + "website/modules/nsh-desktop.md": "42da5f4010cfafc66254ee8896cc0cce51ae585c43893e11e711dd2c4bd3def1", + "website/modules/nsh-i18n.md": "0e5b5d4feefdc91297611b416278933b6e0aa145fe74c41e566ff6a98826506b", "website/modules/nsh-image.md": "dfaae9ef8d13f17450f0f1ae3e9e53df96f7e87121bde5fde78b2d165963eae8", "website/modules/nsh-list.md": "845f226e99b5ed9214c506accb609f27ceacaacd5e764e5d0e52b9382e0b67a9", - "website/modules/nsh-mobile.md": "12f7f75d2925d6c82d462a2c6650c05ec7e50d7eeb0db7bbb8a06968ac1879f9", - "website/modules/nsh-updater.md": "45822001172e4f8c508c4ed7db8409e4aa64562749cbe2280e860b63505f65c7", + "website/modules/nsh-mobile.md": "049d933cac2d7af81e396158134d6a19040a27101894ea0b8713d760bf7a2471", + "website/modules/nsh-updater.md": "28e46764a82e3aff9fba0345f54be1666d90084125c4683acc5e6058b7620bcd", "website/modules/nsh-video.md": "2110b38a4a63256ce7e6f72dc89c3e8bf9beb17dec9205544ab1f9258b600527", "website/modules/nsh-web.md": "cf3408e16bed26fc9634ca76de009191433a1370dbe1697e8d0d4b4cb6e52b45", "website/modules/nsh-webview.md": "938fc495e61448afcafac88d2c19e3fbec4058986a7286fa36768500928c5b9f", - "website/modules/nsh.md": "ff4c6ca70b45e1086d00ceb952ffd55567f46edd233720be42bfa8fd77f37ef6", - "website/modules/standard-modules.md": "335fff5dd9dc432da612b4e8df928071624a7b24d7a12af584b7e5f054db8e8e", + "website/modules/nsh.md": "fb5f28c97aa9a11e5dc097d359ae432d0d5466d298ff220ec9b17c37c3d2aec6", + "website/modules/standard-modules.md": "05879a500989eee3dbc3347b4d9a67e42cf5ff18b8dc0ccea9c70fee6cb40cfc", "website/modules/style-reference.md": "f81e39d9fb99c69b1f82d1d0d90a0cc97dac1a7db34d81a32940cbbd5bc4d828", "website/modules/tailwind-reference.md": "f2c8583e0a4eccb70a4c09563f78cc8c8fc1424a1156c6d18eababfce344ad85", "website/package.json": "30de4d3152bb1a67d30c1c264eb06c638b4deef1c2db287129561894c03c760e", @@ -3276,6 +3305,7 @@ "website/public/sounds/tap.wav": "9973cb16d63b954d085140a0b645b753a550c2fb290857bcf917ef481ecca666", "website/scripts/play.js": "e28474ec94685aebf3e2c7cd1781fe8c3ed73fd97d82eae96caa91c6544745fd", "website/scripts/versions.js": "9cf55645128927fdcb2b0e77ed334c49ed5d43a508f898bf2eb3c9c1521c4025", + "website/src/components/Analytics.astro": "7efd701b7fd21c312dc196873dbeeb0cf0ee4aa6ca69f8bfff8ca183881bece8", "website/src/components/Apps.astro": "05da55bdad66feed44d63b807b1d7e0dee5896299fb3c4c1368bacd67c248a56", "website/src/components/Brand.astro": "e2cb4b7cc888047e0c7177c0a9f94735b4bf70a395bf4d7e8e0198e348ff30f6", "website/src/components/DemoFrame.astro": "5412a67d352efb242a83b1c021a40c9bebf888be77d8ea79a85a46d741e52fba", @@ -3310,8 +3340,9 @@ "website/src/dark.theme.json": "f0f26ad7977362478ee03c2722890d89550a0bb03853b85f9b33378ae0766e4b", "website/src/home/en.json": "f2f95b087c6ae423a093500c1701b6967faf3c1b138383b49007b2208ede0c79", "website/src/home/zh-CN.json": "fd2f145f6e02302f37d57f98c77db87c77319158d92d3464411f5eb036fb23eb", - "website/src/layouts/BaseLayout.astro": "004afbebcbf60036f0fbf5f1f4697528487c41db299fd0a4dd8f24292aa709dc", + "website/src/layouts/BaseLayout.astro": "b43767b143453fa82767d31f9e4c87adbd5f238181b3b65fe64bec899040d552", "website/src/layouts/DocsLayout.astro": "ea6a1ebe86305e9963fe23388323a269d74948efe030c0e8714809bf2279f37e", + "website/src/lib/analytics.ts": "ddfad8b018a5b3b4cd7ccb12d512b3899c91fca91b96547fa11fb73f208b62db", "website/src/lib/code-tabs-client.ts": "be88168ecb22b65e6ef21959c6a659a1354dc98e39769ea973d13d9a4e94dda6", "website/src/lib/demo-client.ts": "9c15a155a5fe342c4181725601136c86df875c07d149874bd7787439cddcb0ea", "website/src/lib/demo.js": "c89d3ce224838f1addcd68767117de77c0c2ad26b6efd82839a6cedb02cd2329", @@ -3323,6 +3354,8 @@ "website/src/lib/locales.ts": "dbe4ca86a2a2e65c8efa11b5623a5b86046a9005d3ad1864e4c162694af15d7e", "website/src/lib/markdown-endpoint.ts": "1d551af7145b0c1148b4ead6d13d772115e64504e5bb5ac070d2890cdc796488", "website/src/lib/markdown.js": "1da143867f85b361dc8b46753a8bc98062055b48ab4ef550b2036be4989f0f50", + "website/src/lib/nsmetry/core.ts": "c90afe74f9d00b88fd54d4eea696da694ecc3448ce9ea29e52d016991d962847", + "website/src/lib/nsmetry/index.ts": "da4c42222a1f95981186d63b6f1b13b8ca62a9b50a63eb291db81636e28f2ec3", "website/src/lib/play-dev.js": "8336166fa10909c2fa5ae434a5584359336ccfecf8a6b9faf7676ff0b789991a", "website/src/lib/playground-client.ts": "e6e5b8271371ba062e28918ee76c49d18cc7f96662e77af552399d960100e3c1", "website/src/lib/rehype-heading-anchors.js": "0c322cfdb0ff1b56f9757829650c82eec089a9ed846a909cf733cb043d5e3ef3", @@ -3394,66 +3427,66 @@ "website/tests/storage.test.ts": "d9eecb1cb335bcfb94f80925433df7875e3de12f75dab3b52fd4d31a6dce34a9", "website/tsconfig.json": "7b292fd267352f901284513544cd818de4a8a8fe15880f662b3a0900b2a93c99", "website/zh-CN/docs/accessibility.md": "98a4001229d2e396180c25dba44ae0e493a02094e00671f20bb183227efec936", - "website/zh-CN/docs/android.md": "c0264e3868326170bfe18374bf7b546ab8ab8f951d795a08b776b80ecaaf43ce", - "website/zh-CN/docs/animation.md": "10a39fb06d616c396033a7659e7a1cf6c36e676ee1ed061d06f8659b36346729", + "website/zh-CN/docs/android.md": "a27b81e074d54ce791bea4d8ea52e10fb073ab7dfe1b0e622955506f1dafe0f4", + "website/zh-CN/docs/animation.md": "0a337d35a79e5bd6485d6e57375b557c0e7f032e6070a7af5a457d11c0166403", "website/zh-CN/docs/app-updates.md": "916d149c242da007d72102001cace9447648e9907a8baa5d9a21eae22ddf8eb6", "website/zh-CN/docs/architecture.md": "30c3fb780f7bd9750b095b9a851e2b201e859e5c198d24cfa301542f76f1cfad", "website/zh-CN/docs/canvas.md": "cbe4245696026766eabbc0c2c5c7e4b09b2db9f0133fea5fdd3217680ac22835", - "website/zh-CN/docs/cli.md": "ca7e11bb6e6c955bf5bb04bed0e0d82d6a634fca7ce118bc109b0760d94a3025", + "website/zh-CN/docs/cli.md": "c9e755eae571d88af69c110ab2e51046f9f723f85ce15fcd445f570f4e0309ac", "website/zh-CN/docs/coding-guides.md": "c3510941f9ec5a110d5552c9dd7d9e4cd86382cbc6a3cf83e554a1b5451f45bb", "website/zh-CN/docs/comparison.md": "4dddca528afa7ef4d7d73ecd8d450db9c4506bc1d50cdce76a5429cf605417dd", "website/zh-CN/docs/compatibility.md": "4857cd153b77a731dfb1efa0ea51edfd56294eadfb489c8e6e6f64d0133acfa5", "website/zh-CN/docs/design-guides.md": "e7075467b4606f740004b4851756ab2752f78fd1eedc35e48db3823331c53701", "website/zh-CN/docs/dev-server-and-debugging.md": "7640fd761989205ba7298e3fdf80d293d61412b54e3ff6522c9e29824dde9be8", - "website/zh-CN/docs/device-and-environment.md": "0b62d3e4674e767051b7b80f23c7d3acf86cc6110ea367fe66fe34abbfde25dd", + "website/zh-CN/docs/device-and-environment.md": "3746437fc6c9cd7feb404417e608b003512dcc4dd27752f345fd0c9842e1b31f", "website/zh-CN/docs/embedding.md": "69b7adf720caa11cf9c7414966be433cf333f9be3bbd20d06061a5124648c038", "website/zh-CN/docs/fonts.md": "147c8f436069671e854d8c0244e2c440879ab8946e31b0ad3556ced75daea1f7", "website/zh-CN/docs/forms-and-keyboard.md": "9257d9f9387eefb1ad1267438ad2f41af7961c8b0f41ebacd8fbe2e8ca776937", "website/zh-CN/docs/getting-started.md": "7ab9cf8d3f8a813303edb3da72214f28e4490bd29005abf842f2fd60bcc308b6", "website/zh-CN/docs/goals.md": "b6cd1ecb539ac95a073e373d2b5fb6c63fbe079377b8fc5725b0e720ad916e14", - "website/zh-CN/docs/gpui.md": "9166581f84f739633f6d91f190ffede5496ff32b89e92a5a43f9e632c39c27b4", - "website/zh-CN/docs/i18n.md": "876363ed101df8df6a510164078e44b91c9e043f79e41ed2751d9a49e366049b", + "website/zh-CN/docs/gpui.md": "427d6a6142b1d88c64e83acdcdca4f4fc5f190ff29dcacefb1fae30a1829a45b", + "website/zh-CN/docs/i18n.md": "41465d33f3d4da919c87fe9965ba3904b80afa97143078ab761a2ce4351bd854", "website/zh-CN/docs/images-and-assets.md": "334eeb1817ecc669090a36109e11e17584472dd82b76f6eaf0249ada03e6e010", "website/zh-CN/docs/index.md": "af55ad8a24a36fc6c7153890d3508489684f7f035a12af5dd4c92d2cfb9f89c9", - "website/zh-CN/docs/installation.md": "eb1f381b6322fa7f393e2d5b57e8a80ef359409b90ef6ec895d244d8ab4d54fa", - "website/zh-CN/docs/ios.md": "440a2b6422438dc8cdaa04a608b11f4763a9dceae5e61720ffdaafaa6d1679a5", + "website/zh-CN/docs/installation.md": "34ee301b636d298479e9754c8fe7f630ab4c0d9dc2ca9c18217d6b0ce6d63935", + "website/zh-CN/docs/ios.md": "cf222f62465c9c2dce0b290ea68e393c816951fc2350fa16d3ccb40389cfdbfa", "website/zh-CN/docs/jsx-and-components.md": "acde3af399dd9ac2c349dedaccd2954dbf229d2d0ddbad78854a092e2c3436a5", "website/zh-CN/docs/layout.md": "294ed9febfb9a265deac2044060951b7cd28d2c763750fc708b44b2a6898ef3e", - "website/zh-CN/docs/linux.md": "f8b0464fc5dd9c90642afbacd6efda42f80505ed6de9100ec2a2ab3a9571a4ae", + "website/zh-CN/docs/linux.md": "4dac02e8749a7fe5f0e71238bd07088941f5335232b873584f31364b2305b550", "website/zh-CN/docs/lists.md": "acfe0c9c2b9038c5b21e1b652b898a309b9c02df0437993155efc44923497c87", - "website/zh-CN/docs/macos.md": "e7d08cd3bf82575279b4bc59f82c0cbb7e3eb3bb9872fe919f2ed4efdf075107", + "website/zh-CN/docs/macos.md": "1328fa8593cea8f558ec7ac73a1ef9d0de518a909b218d46efe0e2e2c01d45a1", "website/zh-CN/docs/native-components.md": "332021e5daea29be9e488029b1f0f2e8f17de49a4c19adff1069a4a3d6141894", "website/zh-CN/docs/navigation.md": "35b6663f55b8816ad644d6ca8e4fb91275cc68f91e7bdbd9a9a62540118496d6", "website/zh-CN/docs/networking.md": "c0e188d2e9ae22bccf2e0c733c33a955e3587216b73bccef0760b05d5add582c", - "website/zh-CN/docs/nshm.md": "9ad0777413d9a9da2da5ad58747abdc8be3f5373f2f3c98d2fbaecb000d2055e", + "website/zh-CN/docs/nshm.md": "96723848d1f43203170c745b279ca08b6d65b8f72ee4702eebcda7d9b8c09f80", "website/zh-CN/docs/ota-updates.md": "8f718d9ebf0c1c9b1ef65ab943fe5160b3bd4c7c18602821476626d4604312cd", - "website/zh-CN/docs/packaging.md": "f8af8033811b0c62535c03bf378b08fce9e2f58943ee4c667977f42c5df1c3b2", + "website/zh-CN/docs/packaging.md": "455df7154f7df02fc555d8b669ee01972b6ec31f0664be2d77b658ee292c848f", "website/zh-CN/docs/performance-report.md": "9bd371ede563659265e453619996c9b43442465606f3c6f781407a04a15d1d55", "website/zh-CN/docs/performance.md": "6a732d3feb049246b9028b21afe1f99745bf38f1ed6892e549dc5a53b0907fe4", - "website/zh-CN/docs/platform-extensions.md": "6d6a62f7542c10f13fce1f7c7e4b6c7d3fc3c5be45e7ff6395f29071cd8befbd", + "website/zh-CN/docs/platform-extensions.md": "b8286a6ebfb8474b02edc164be1a7f534062d3d2a35294bd5327fc6c9bf6a829", "website/zh-CN/docs/platform-specific.md": "8893467dd855d01946d8b85f3c6f4b4a7af2f6eac06054b816f80566005f4ea3", "website/zh-CN/docs/platforms.md": "8e59df7812c37c9dd2b1aa961ff58eb8a074890eaec56cef929ad2d09ccbfd40", "website/zh-CN/docs/project-structure.md": "16014c201016237d7e0fdc4b2649b34c84ca01d9c0ff10fe9988f6bac9f1dbf1", "website/zh-CN/docs/publish.md": "b268f10b906a746be5edd7b6a55832a677f0e77ecfe81ddfbd3802e0a9728d1f", - "website/zh-CN/docs/reactivity.md": "c98d7bfa0547d7d4295f9773a18ae9f003626ef1015ded3ea85543143eccb65f", - "website/zh-CN/docs/rust.md": "ff28e2871c09b8e002edfe2e4c6dd4e102c6de75f157cb7fab209407037afb99", - "website/zh-CN/docs/sandbox-and-capabilities.md": "8edb37efd69bb3aa117248d72eca3b14be7a900c01033a8e820442208d95a9e0", + "website/zh-CN/docs/reactivity.md": "d54b4b1c8f298d5d9d32a07cec8e957e5b10a49d50142c15b9186fb5cedfc771", + "website/zh-CN/docs/rust.md": "216014d9aef4ab498d47085b62c63130bbb0c9d2797b9bf8939506d2c1e8fc2f", + "website/zh-CN/docs/sandbox-and-capabilities.md": "f8f91ad0d2b4d586fda7bb53071e88b766294a9fdc3e0d1da93db087bfd039bd", "website/zh-CN/docs/scrolling.md": "72924753af9633b078a4978b304470f15390fd538137db9d715964d15cfa9b44", "website/zh-CN/docs/signed-packages.md": "3d1b8e56bc7709957d3b186c5142ede862e53e8b322d0ed84213a431701a0d26", "website/zh-CN/docs/styling.md": "6b63afaa71a29d01c20ece5ca12e723a486929b47c21f5852ba2ddb7deee97d4", "website/zh-CN/docs/tailwind.md": "6899cc9d7bf8652d44b053cb6aaafc80bc3545f45c4d6e3a15f4da1598f7973a", - "website/zh-CN/docs/testing-and-trace.md": "181d4e64d3f664161ec2609a4bb591862bd1e80eabbf4adf0e5efe532bdf8e36", + "website/zh-CN/docs/testing-and-trace.md": "de86f06a63fcb5f88ebd6b63eb622b76b1d20217a7b357d610b9f030bd9ebb35", "website/zh-CN/docs/text.md": "a320d71a490ad6bc90292c24448f0aea0f441cd0d3fab2c8de7e58fb4b5e045a", - "website/zh-CN/docs/touch-and-gestures.md": "b40ee6490c2032f1a6cb047d67b6569a9b197b818a6e94393f573ebb693c9b8b", + "website/zh-CN/docs/touch-and-gestures.md": "0fbb5dcb8b9b894e9a0d475b54b8226d4988b9b2c72aaf162fb1538fc80f10a9", "website/zh-CN/docs/tui.md": "3d1626964b4bdd8b8fd245ba89089919bdbeec3ace3e91a3de55a16896dbddf2", - "website/zh-CN/docs/web-view-and-video.md": "f9a16eaf6d912ce2033f049af23ee23d58ca8861f8f23326fde993654f03edfb", + "website/zh-CN/docs/web-view-and-video.md": "6bc7c135500bb799c25c622fe880689df0fd5d7accfa2df9d8484cc94a07cc42", "website/zh-CN/docs/web.md": "3798896cdb36bee595231453a919ef613b44363d3e7ecdcc1b110954b178177c", - "website/zh-CN/docs/windows.md": "f400819560af7604644fd46539380e0faff4aa3bb2572246c326b6f16396d079", + "website/zh-CN/docs/windows.md": "888ad1dec48f212cff08c2a0284fd30d776d9298d9273e614d043ca486314490", "website/zh-CN/elements/accordion.md": "4f8fa017d087112bdce12a49bb5eb52edf7be4f68385249dfdc177bb730fade9", "website/zh-CN/elements/alert-dialog.md": "751ec7c944ffa32320e7349b931a285a285d6a96beef5377019612a5f7aff4a5", "website/zh-CN/elements/avatar.md": "4a43fd372625792420c44bf3b44014b23c45885ac1723b4b2c19271fdfce05b7", "website/zh-CN/elements/button.md": "3b2c3ba27a5d9ba33cf5f4185653e9c4f94d7b81549eb3d94e3a2e71133efafe", - "website/zh-CN/elements/calendar.md": "1957e3f3b025b2d42a4a5ee2f1f6fb3d6ae344ed6951c570ea25c2657c52348f", + "website/zh-CN/elements/calendar.md": "cb2eb8566671dd5485dce940ece29413b7e9bce2dce692945faf72e1ab5df65c", "website/zh-CN/elements/canvas.md": "6329de68d8a7d4bf1327dd34cf9c1ef5153711cb48f9b9290f874cfa27671443", "website/zh-CN/elements/carousel.md": "c2a0bad04cbff96d36b5e2686a3b1f9e098cceda8a4b7e3f94e24e870bf7f121", "website/zh-CN/elements/checkbox.md": "0ec8f91abad0939872f648905459705d334b71cfa8f1b4baf3c70ca6507caaf1", @@ -3462,24 +3495,24 @@ "website/zh-CN/elements/combobox.md": "43a9d78e1510152eceeb832a60df9b6f1443f2e34fc2b26aac1f9fcfccf7a9d7", "website/zh-CN/elements/command.md": "bc8acd7bff19b8803b543d7b7103be193698732a0731a2b1ea371654a37a7b99", "website/zh-CN/elements/control-flow.md": "00e06d5c9a777b767f7e494a65a12e2f3a900de463cc9f4fea8d94cbef72c092", - "website/zh-CN/elements/data-table.md": "404c1e92528561d0445df3016f40e0b53a2b8cd271284e71c4eb41acb590d506", - "website/zh-CN/elements/date-picker.md": "993a196115bde389bc60efc19dff76123e5aff6a9dc529b866296f9024fcbfe3", + "website/zh-CN/elements/data-table.md": "f26348ff35909dd4bac34ef37d460b9d780ed4641995fa3a9599ba8744d0a9ea", + "website/zh-CN/elements/date-picker.md": "dfa014e35237d5a5aaa2b0eaa6cb4c579fe210d7a1f8af4149d7ddc360bc7721", "website/zh-CN/elements/dialog.md": "21a1f8017a5f63b11e771d26d10b782257d7e929484ede73fae115e2d6bcdd04", "website/zh-CN/elements/diff-view.md": "5ebbdfb9e15e9e1644af942601f50d2c236dc45f6b2504cbd53cc5751a09fa87", - "website/zh-CN/elements/dock.md": "1cb7548525bf3aab7fd7b1b584a47c7aacc5b788729a6dea2d54b9b0641abf14", + "website/zh-CN/elements/dock.md": "2f7768abd616d2ec1fbb80462cd422777b80430e3b6b82c4055956d961c78840", "website/zh-CN/elements/editor.md": "a46ef9103150b78e2c96c6520307a097e6cea3ae440577c6a49396ddccf38fea", "website/zh-CN/elements/emoji-picker.md": "013b796215bc2be9984f5521984452ab27cbaad96d23e9859d1df78ee20bd571", "website/zh-CN/elements/hover-card.md": "b043b606045d5eea5f3528839c9b4b670923ac2a1be8da8f0610065c6e42e0da", "website/zh-CN/elements/image.md": "a22a868469ed11d89503a976b51f3487473f5b4b071235a7c7e34da731686245", "website/zh-CN/elements/index.md": "871c12f6e2e2c434e2e60e8fa57a78e8cd2a69710f6991ca94f747cb84310677", - "website/zh-CN/elements/input.md": "5bdc3a06df554650572b7a531de79662580a0d16b0435932a872f8f72f96056d", + "website/zh-CN/elements/input.md": "a57fa3d894650dc649b7474d407111ac9f5dbd37ecc529ca0bcfaa3258e1bf55", "website/zh-CN/elements/keyboard.md": "cd0fd87d8e398651b2af2cd93db705a8790f22e41c353114c94569513f843dbb", "website/zh-CN/elements/link.md": "003dd82f0393d7ebcfd074298d631033a20c663ef227a03c8bfb169801ff58a5", "website/zh-CN/elements/list.md": "ebbd01a0ede7d2af1bc45dcbfda1445e7386eeb1caa093318be9864f81c2cbc6", "website/zh-CN/elements/menu.md": "10ed4774d25b1511002d86321d53e9602219a1ed0563caaf3f20a13a2c9dbc81", "website/zh-CN/elements/nav-stack.md": "9e2def1cf7918394a9a287695e205608904c1fe6261b74676c4ba5286264bd28", "website/zh-CN/elements/number-input.md": "67c2e49e0cc88d6485ac7e28664dcfa1705e2f7f3d9dedb241aaf672f2bfabe1", - "website/zh-CN/elements/otp-input.md": "5c3106d17a3c51c7ebf92110a29a40ce62614bb98623851916706e6fc2bbc37b", + "website/zh-CN/elements/otp-input.md": "c8160cfdebb4470fba536906238c14bba7f31d862e49e237f79f0b6436c8d73c", "website/zh-CN/elements/overlay.md": "1bb9c73e608526670bd610a4d299f4a39dc2e7cdfab3bf4da1fa9f19f01cee57", "website/zh-CN/elements/pagination.md": "4d3979e5d446944449a5091b4e6cfc73b0ca019aeeb3793aa58f428e12f77624", "website/zh-CN/elements/plot.md": "df0d174be69a31019bd109449086818b8d5ee9e2e7668d2d657ad1fa716ca6b4", @@ -3487,20 +3520,20 @@ "website/zh-CN/elements/progress.md": "d51aa5ee8bc02e2c244b7baecf007243787d8329a82528bf15d08792860b00f8", "website/zh-CN/elements/radio.md": "c5bf8a2aef40fe892afb25c3e3b9b02c5b96ad3d888e7926c0ca38ab4340dcad", "website/zh-CN/elements/resizable.md": "365370853866334de5252bc4dafa8118293ac5eb0008c28eb3b2d9269556fc6a", - "website/zh-CN/elements/rich-editor.md": "44508f1f23f4ee5b37a56f7bbd1af2efa1d1bf19fb9dc1ed4759cede2955a9d7", + "website/zh-CN/elements/rich-editor.md": "34776897a747bc109b40e9cf7372f3f49c8e39cc0ed5f83fa99d747bb740074a", "website/zh-CN/elements/safe-area.md": "21acce2cffe7fe212d968190ad01f99bbdf766e3a9bd03646c4aabdfbc86d80c", "website/zh-CN/elements/scroll.md": "c4f2e82a91709077e2ceb7571b0131634ba96e094bb561ce1b76353049c2def4", "website/zh-CN/elements/scrollbar.md": "5d45ebb597c9a33808c1084a051fc2b9e0ff906fcf3e3dde0702057029ed7bde", - "website/zh-CN/elements/select.md": "2df308818b5781275ae702d5869d417fdc6e409a58aa045172372336e717625a", + "website/zh-CN/elements/select.md": "5ddf8a0f4c536473c60ff8a2caa8927f459bfbef17995641a133b5d5f5a34066", "website/zh-CN/elements/shader.md": "fda66a6d27cddd1d4c8cf54666a1ec2affa8f77410a25bd61a4e5a0f2f6dc915", "website/zh-CN/elements/sheet.md": "0fb5f46d4b62ea08938ac6876f45e8d2eae2fcdc56e0417551c810bef1b5654c", - "website/zh-CN/elements/slider.md": "5ad1c17eb38492cc56bd12c6461bbbcedda668b5309d442a30505d35403dcfe7", + "website/zh-CN/elements/slider.md": "5983c074015f804a1bad4c3cd1cb2b44c038407c542122469a14b00fcd516943", "website/zh-CN/elements/split-view.md": "bf9334117f5fcb77baf65bb3d719b54f05317d8ebfe526adab5dcce6fee732d0", "website/zh-CN/elements/switch.md": "c58477171fc87fae3c5f51764b71cb5849a75a9a0d815c84d2abda792aa84636", "website/zh-CN/elements/table.md": "14cb482757e978d2068f44070b7f962c67c7e35fb9d2edf7ec916edce046326a", "website/zh-CN/elements/tabs.md": "2c17e2f44c181c27bfdb67d29a34efc0ffb0eb9bdfa551b64c39baf1835d98b4", "website/zh-CN/elements/terminal.md": "415dff4b605dd8e51791ad9b5bfdda06da595769cc4cbe14d605ec38937dc925", - "website/zh-CN/elements/text-selection.md": "d79ab62e03f8ae2fd553a875deeae7f3c82fdef0751242c84c8af46421f67390", + "website/zh-CN/elements/text-selection.md": "6206036abce6e145bf112221305c99ab49e4c312807c3e50276ce55c3e53a071", "website/zh-CN/elements/text-view.md": "47a61ad7a9031c78431e72122278269d8261ce408f1826fea32558ee1e3bbd13", "website/zh-CN/elements/text.md": "1b05b7e9aefda9191ba17e1ee8ae12187dc244c198dbb812c6913519a4779014", "website/zh-CN/elements/time-field.md": "d051a8aab4ffbff63e7a288cca21b49ba1a1ed5cece0c9a931e0de838ba77f77", @@ -3512,27 +3545,27 @@ "website/zh-CN/elements/tree.md": "d51f89b684dcd00362e9fe20b71eacd920f7997433a5534c09d131b7e9897dca", "website/zh-CN/elements/video.md": "480f3342bdf2b4709ad8b261b8a02936f37276b2c1494d60f9b98c4ddc56a8a7", "website/zh-CN/elements/view.md": "b66a8139a934dbce35fd589edec83eb186ec1ff5cac221881660dd021590b2fd", - "website/zh-CN/elements/web-view.md": "bfc6ea8883cb89dc00a57159397837f1f80921839663c404f6ad53b51936f441", + "website/zh-CN/elements/web-view.md": "cd31af5bdbae11bbd179e1fd7d57d934c019bcc7f61689e3a65671b4226c5db0", "website/zh-CN/modules/globals.md": "771b33e34c99482082c74ab0691b68cdf4d5b088757c7a65361fb343a5487e5e", "website/zh-CN/modules/index.md": "0bc8ce822694e912291519b4c97b400df457c0f1e71bc9736cb627b63e35799e", - "website/zh-CN/modules/nsh-base.md": "022d76f946132007232000f4f01ff978d38a6ea0c8898b0073c08654e2a657ed", + "website/zh-CN/modules/nsh-base.md": "57c5cc12852efeb159a92ba0a9d3ba6f9cbb88b95a1f279473be5748d33e8054", "website/zh-CN/modules/nsh-canvas.md": "ea761d62d617ed55dbaaec143451c6d903ca34db92089767bffb78148f9c09eb", - "website/zh-CN/modules/nsh-desktop.md": "deb7f0eca731c8edb84d5f8c994dbc6016f56ad0ac542b0d3fae9bb07331703f", - "website/zh-CN/modules/nsh-i18n.md": "29f89c93de67419a886479625af26a043f296771a8116a0370b1e33d24a147e0", + "website/zh-CN/modules/nsh-desktop.md": "b1b038044c5ab9a1c93dfd7d923fb49c804d11adbbcb79c594069a9b07119463", + "website/zh-CN/modules/nsh-i18n.md": "22ded8c35d7716540b76bc69be2d005459dbe3553bb31fdd79818b9db5a68ef6", "website/zh-CN/modules/nsh-image.md": "ba4590f012e0a1ad0718831a64c03bca8d556e134a799745d66fb760fd974156", "website/zh-CN/modules/nsh-list.md": "f832baa575ce686a2b23ef1d9b7800cc6e768e420a7e7014a561fb75a9c9e65e", - "website/zh-CN/modules/nsh-mobile.md": "0e99d2536dcb518ae4f6012a5e7b3eec6da67d83251b81c7cbd1ada15b667473", - "website/zh-CN/modules/nsh-updater.md": "25800fd71cf6dd4db4a99e79fac8f344381617891de102f122bc4a9ff009c605", + "website/zh-CN/modules/nsh-mobile.md": "e1276bd592ac3741e813e37a080a77d903da5ea1468f5e67f878c4629a833b92", + "website/zh-CN/modules/nsh-updater.md": "6b9149b18505e8e7b49fca490885e66b71a6ca429563c5bc8d8fdb3247d7a66d", "website/zh-CN/modules/nsh-video.md": "720542216daf1df3687f8fb759ad78085240aa4a821aadeb9acd2bf0e0d316d8", "website/zh-CN/modules/nsh-web.md": "afcf16fb115496b6fe9ae249ea749b638f2f7a182b3724ca6e9021bae3a5c2f6", "website/zh-CN/modules/nsh-webview.md": "d6a0ec10f3cf8ebc23103bc27ce04f4198e9fd3ca1d58a65448a5fcc81ab4a9a", - "website/zh-CN/modules/nsh.md": "169b381e90d32510347ba5919f31d03eb93428ccaa7de0b0238415da7b07dc2b", - "website/zh-CN/modules/standard-modules.md": "483464b46d5d2b9595cd2c2eb70473f4b71267c1af9ed168e2e97edc1d2d4981", + "website/zh-CN/modules/nsh.md": "ef14bf5492d1742c10b7e644af0fb0bb98a70e628d665eb67eebc7c94966cacb", + "website/zh-CN/modules/standard-modules.md": "a83715f77613070e2d5740200c5714c6809756e66c2748b8ae9dca943e1b49d5", "website/zh-CN/modules/style-reference.md": "764b45df7c47e65d9d28de89b76aaf9be5abb939e8e9140850bcb0a6bf98d9bb", "website/zh-CN/modules/tailwind-reference.md": "c2262a71a9243e14387dba01f820d9f232ce72859ec743f4206e504e3e18b084" }, "upstream_repository": "https://github.com/longbridge/nsh", - "upstream_revision": "a901baa2e2d82a17066abb589b542b0a90890e0a", + "upstream_revision": "bdba103fd31a22a188bebd6b19df54a99204bb0a", "file_sources": { ".cargo/config.toml": { "repository": "https://github.com/longbridge/nsh", @@ -3552,11 +3585,11 @@ }, ".github/actions/cargo/action.yml": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, ".github/ci/ios-build-versions.py": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, ".github/ci/paths.py": { "repository": "https://github.com/longbridge/nsh", @@ -3616,17 +3649,20 @@ }, ".github/workflows/package.yml": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "bdba103fd31a22a188bebd6b19df54a99204bb0a" }, ".github/workflows/packages.yml": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", ".github/workflows/release-crate.yml": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, - ".github/workflows/release.yml": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + ".github/workflows/release.yml": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, ".github/workflows/rust-app.yml": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, ".github/workflows/tui.yml": { "repository": "https://github.com/longbridge/nsh", @@ -3634,11 +3670,11 @@ }, ".github/workflows/website.yml": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, ".github/workflows/windows.yml": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, ".gitignore": { "repository": "https://github.com/longbridge/nsh", @@ -3650,7 +3686,7 @@ }, "AGENTS.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "CLAUDE.md": { "repository": "https://github.com/longbridge/nsh", @@ -3662,10 +3698,16 @@ }, "CONTRIBUTING.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" + }, + "Cargo.lock": { + "repository": "https://github.com/longbridge/nsh", + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" + }, + "Cargo.toml": { + "repository": "https://github.com/longbridge/nsh", + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, - "Cargo.lock": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", - "Cargo.toml": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", "LICENSE-APACHE": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -3678,8 +3720,14 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, - "crates/gpui/Cargo.lock": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", - "crates/gpui/Cargo.toml": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "crates/gpui/Cargo.lock": { + "repository": "https://github.com/longbridge/nsh", + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" + }, + "crates/gpui/Cargo.toml": { + "repository": "https://github.com/longbridge/nsh", + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" + }, "crates/gpui/nsh-gpui-host/Cargo.toml": { "repository": "https://github.com/longbridge/nsh", "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" @@ -3694,11 +3742,11 @@ }, "crates/gpui/nsh-platform-gpui/Cargo.toml": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "crates/gpui/nsh-platform-gpui/examples/embed.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "crates/gpui/nsh-platform-gpui/src/access.rs": { "repository": "https://github.com/longbridge/nsh", @@ -3714,11 +3762,11 @@ }, "crates/gpui/nsh-platform-gpui/src/app.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "crates/gpui/nsh-platform-gpui/src/canvas.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "bdba103fd31a22a188bebd6b19df54a99204bb0a" }, "crates/gpui/nsh-platform-gpui/src/canvas/offscreen.rs": { "repository": "https://github.com/longbridge/nsh", @@ -3726,7 +3774,7 @@ }, "crates/gpui/nsh-platform-gpui/src/chrome.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "crates/gpui/nsh-platform-gpui/src/chrome/menus.rs": { "repository": "https://github.com/longbridge/nsh", @@ -3746,7 +3794,7 @@ }, "crates/gpui/nsh-platform-gpui/src/dev.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "crates/gpui/nsh-platform-gpui/src/events.rs": { "repository": "https://github.com/longbridge/nsh", @@ -3754,7 +3802,7 @@ }, "crates/gpui/nsh-platform-gpui/src/file_drop.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/gpui/nsh-platform-gpui/src/geom.rs": { "repository": "https://github.com/longbridge/nsh", @@ -3770,7 +3818,7 @@ }, "crates/gpui/nsh-platform-gpui/src/input.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/gpui/nsh-platform-gpui/src/key_focus.rs": { "repository": "https://github.com/longbridge/nsh", @@ -3790,7 +3838,7 @@ }, "crates/gpui/nsh-platform-gpui/src/mount.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/gpui/nsh-platform-gpui/src/native.rs": { "repository": "https://github.com/longbridge/nsh", @@ -3799,7 +3847,7 @@ "crates/gpui/nsh-platform-gpui/src/native/video.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", "crates/gpui/nsh-platform-gpui/src/native/web.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/gpui/nsh-platform-gpui/src/navigation.rs": { "repository": "https://github.com/longbridge/nsh", @@ -3807,14 +3855,17 @@ }, "crates/gpui/nsh-platform-gpui/src/render.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/gpui/nsh-platform-gpui/src/rt.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, "crates/gpui/nsh-platform-gpui/src/scroll.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", - "crates/gpui/nsh-platform-gpui/src/selectable_view.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "crates/gpui/nsh-platform-gpui/src/selectable_view.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" + }, "crates/gpui/nsh-platform-gpui/src/shader.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -3825,7 +3876,7 @@ }, "crates/gpui/nsh-platform-gpui/src/surface.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/gpui/nsh-platform-gpui/src/synth.rs": { "repository": "https://github.com/longbridge/nsh", @@ -3837,13 +3888,16 @@ }, "crates/gpui/nsh-platform-gpui/src/tests.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "crates/gpui/nsh-platform-gpui/src/text.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "bdba103fd31a22a188bebd6b19df54a99204bb0a" + }, + "crates/gpui/nsh-platform-gpui/src/text_input.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "bdba103fd31a22a188bebd6b19df54a99204bb0a" }, - "crates/gpui/nsh-platform-gpui/src/text_input.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", "crates/gpui/nsh-platform-gpui/src/text_input/layout.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -3858,11 +3912,15 @@ }, "crates/gpui/nsh-platform-gpui/src/window.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" + }, + "crates/gpui/nsh-platform-gpui/src/window/box_none.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/gpui/nsh-platform-gpui/src/window/native.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/gpui/nsh-platform-gpui/src/window/screen.rs": { "repository": "https://github.com/longbridge/nsh", @@ -3906,7 +3964,7 @@ }, "crates/nsh-base/src/calendar.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-base/src/carousel.rs": { "repository": "https://github.com/longbridge/nsh", @@ -3934,7 +3992,7 @@ }, "crates/nsh-base/src/combobox.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "crates/nsh-base/src/command.rs": { "repository": "https://github.com/longbridge/nsh", @@ -3970,11 +4028,11 @@ }, "crates/nsh-base/src/data_table/view.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "crates/nsh-base/src/date_picker.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "crates/nsh-base/src/default-theme.json": { "repository": "https://github.com/longbridge/nsh", @@ -4026,11 +4084,11 @@ }, "crates/nsh-base/src/dock/compact.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-base/src/dock/dock_area.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-base/src/dock/dock_placement.rs": { "repository": "https://github.com/longbridge/nsh", @@ -4102,7 +4160,7 @@ }, "crates/nsh-base/src/dock/tab_group.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-base/src/dock/value.rs": { "repository": "https://github.com/longbridge/nsh", @@ -4266,7 +4324,7 @@ }, "crates/nsh-base/src/lib.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-base/src/link.rs": { "repository": "https://github.com/longbridge/nsh", @@ -4278,7 +4336,7 @@ }, "crates/nsh-base/src/listbox.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-base/src/mdast_tree.rs": { "repository": "https://github.com/longbridge/nsh", @@ -4286,7 +4344,7 @@ }, "crates/nsh-base/src/menu.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "crates/nsh-base/src/menu_button.rs": { "repository": "https://github.com/longbridge/nsh", @@ -4306,7 +4364,7 @@ }, "crates/nsh-base/src/otp_input.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-base/src/pagination.rs": { "repository": "https://github.com/longbridge/nsh", @@ -4422,11 +4480,11 @@ }, "crates/nsh-base/src/popover.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "crates/nsh-base/src/popup.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "crates/nsh-base/src/progress.rs": { "repository": "https://github.com/longbridge/nsh", @@ -4484,7 +4542,10 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, - "crates/nsh-base/src/rich_editor/extensions/code_block.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "crates/nsh-base/src/rich_editor/extensions/code_block.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" + }, "crates/nsh-base/src/rich_editor/extensions/core_keymap.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" @@ -4509,7 +4570,10 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, - "crates/nsh-base/src/rich_editor/extensions/kit.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "crates/nsh-base/src/rich_editor/extensions/kit.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" + }, "crates/nsh-base/src/rich_editor/extensions/link.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" @@ -4586,7 +4650,10 @@ "repository": "https://github.com/longbridge/nsh", "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" }, - "crates/nsh-base/src/rich_editor/js/extension_api.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "crates/nsh-base/src/rich_editor/js/extension_api.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" + }, "crates/nsh-base/src/rich_editor/js/extensions.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -4709,7 +4776,7 @@ }, "crates/nsh-base/src/rich_editor/tables/nodes.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, "crates/nsh-base/src/rich_editor/tables/util.rs": { "repository": "https://github.com/longbridge/nsh", @@ -4753,7 +4820,7 @@ }, "crates/nsh-base/src/rich_editor/view/controller.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, "crates/nsh-base/src/rich_editor/view/geometry.rs": { "repository": "https://github.com/longbridge/nsh", @@ -4763,21 +4830,30 @@ "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" }, - "crates/nsh-base/src/rich_editor/view/mod.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "crates/nsh-base/src/rich_editor/view/mod.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" + }, "crates/nsh-base/src/rich_editor/view/node_view.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, "crates/nsh-base/src/rich_editor/view/parts.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" + }, + "crates/nsh-base/src/rich_editor/view/render.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, - "crates/nsh-base/src/rich_editor/view/render.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", "crates/nsh-base/src/rich_editor/view/session.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" }, - "crates/nsh-base/src/rich_editor/view/table.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "crates/nsh-base/src/rich_editor/view/table.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" + }, "crates/nsh-base/src/rich_editor/view/touch.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -4792,7 +4868,7 @@ }, "crates/nsh-base/src/select.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "crates/nsh-base/src/sheet.rs": { "repository": "https://github.com/longbridge/nsh", @@ -4804,7 +4880,7 @@ }, "crates/nsh-base/src/slider.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-base/src/sort.rs": { "repository": "https://github.com/longbridge/nsh", @@ -4824,7 +4900,7 @@ }, "crates/nsh-base/src/syntax.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/nsh-base/src/table.rs": { "repository": "https://github.com/longbridge/nsh", @@ -4832,7 +4908,7 @@ }, "crates/nsh-base/src/tabs.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/nsh-base/src/term/emulator.rs": { "repository": "https://github.com/longbridge/nsh", @@ -4844,7 +4920,7 @@ }, "crates/nsh-base/src/term/mod.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, "crates/nsh-base/src/term/vt.rs": { "repository": "https://github.com/longbridge/nsh", @@ -4867,7 +4943,10 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, - "crates/nsh-base/src/text_view/highlight.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "crates/nsh-base/src/text_view/highlight.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" + }, "crates/nsh-base/src/text_view/html/mod.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" @@ -4893,7 +4972,10 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, - "crates/nsh-base/src/text_view/markdown/mod.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "crates/nsh-base/src/text_view/markdown/mod.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "bdba103fd31a22a188bebd6b19df54a99204bb0a" + }, "crates/nsh-base/src/text_view/markdown/offsets.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -4904,7 +4986,7 @@ }, "crates/nsh-base/src/text_view/markdown/tests.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "bdba103fd31a22a188bebd6b19df54a99204bb0a" }, "crates/nsh-base/src/text_view/math.rs": { "repository": "https://github.com/longbridge/nsh", @@ -5001,7 +5083,7 @@ }, "crates/nsh-base/tests/base/calendar.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-base/tests/base/carousel.rs": { "repository": "https://github.com/longbridge/nsh", @@ -5021,7 +5103,7 @@ }, "crates/nsh-base/tests/base/combobox.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "crates/nsh-base/tests/base/command.rs": { "repository": "https://github.com/longbridge/nsh", @@ -5029,11 +5111,11 @@ }, "crates/nsh-base/tests/base/data_table.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "crates/nsh-base/tests/base/date_picker.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "crates/nsh-base/tests/base/dialog.rs": { "repository": "https://github.com/longbridge/nsh", @@ -5045,7 +5127,7 @@ }, "crates/nsh-base/tests/base/dock.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-base/tests/base/dropdown_presence.rs": { "repository": "https://github.com/longbridge/nsh", @@ -5073,7 +5155,7 @@ }, "crates/nsh-base/tests/base/emoji_picker.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-base/tests/base/focus_within.rs": { "repository": "https://github.com/longbridge/nsh", @@ -5117,7 +5199,7 @@ }, "crates/nsh-base/tests/base/otp_input.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-base/tests/base/pagination.rs": { "repository": "https://github.com/longbridge/nsh", @@ -5129,7 +5211,7 @@ }, "crates/nsh-base/tests/base/popups.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "crates/nsh-base/tests/base/radio.rs": { "repository": "https://github.com/longbridge/nsh", @@ -5139,7 +5221,10 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, - "crates/nsh-base/tests/base/rich_editor/code_highlight.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "crates/nsh-base/tests/base/rich_editor/code_highlight.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" + }, "crates/nsh-base/tests/base/rich_editor/commands.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -5162,7 +5247,7 @@ }, "crates/nsh-base/tests/base/rich_editor/marks_clipboard_history.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, "crates/nsh-base/tests/base/rich_editor/mod.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", "crates/nsh-base/tests/base/rich_editor/node_view_presses.rs": { @@ -5181,7 +5266,10 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, - "crates/nsh-base/tests/base/rich_editor/tables.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "crates/nsh-base/tests/base/rich_editor/tables.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" + }, "crates/nsh-base/tests/base/rich_editor/tiptap.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" @@ -5196,7 +5284,7 @@ }, "crates/nsh-base/tests/base/rich_editor/view_features.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, "crates/nsh-base/tests/base/rust_root.rs": { "repository": "https://github.com/longbridge/nsh", @@ -5208,7 +5296,7 @@ }, "crates/nsh-base/tests/base/select.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "crates/nsh-base/tests/base/sheet.rs": { "repository": "https://github.com/longbridge/nsh", @@ -5216,7 +5304,7 @@ }, "crates/nsh-base/tests/base/slider.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-base/tests/base/split_view.rs": { "repository": "https://github.com/longbridge/nsh", @@ -5232,7 +5320,7 @@ }, "crates/nsh-base/tests/base/tabs.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/nsh-base/tests/base/term.rs": { "repository": "https://github.com/longbridge/nsh", @@ -5244,11 +5332,11 @@ }, "crates/nsh-base/tests/base/term_input.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, "crates/nsh-base/tests/base/terminal.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "crates/nsh-base/tests/base/text_view.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", "crates/nsh-base/tests/base/time_field.rs": { @@ -5287,7 +5375,10 @@ "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" }, - "crates/nsh-bundler/src/bundle.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "crates/nsh-bundler/src/bundle.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, "crates/nsh-bundler/src/classes.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -5306,7 +5397,7 @@ }, "crates/nsh-bundler/src/lib.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-bundler/src/link.rs": { "repository": "https://github.com/longbridge/nsh", @@ -5342,11 +5433,11 @@ }, "crates/nsh-bundler/src/types.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-cli/Cargo.toml": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, "crates/nsh-cli/build.rs": { "repository": "https://github.com/longbridge/nsh", @@ -5354,7 +5445,7 @@ }, "crates/nsh-cli/src/android.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "bdba103fd31a22a188bebd6b19df54a99204bb0a" }, "crates/nsh-cli/src/android/class_file.rs": { "repository": "https://github.com/longbridge/nsh", @@ -5366,7 +5457,7 @@ }, "crates/nsh-cli/src/android/library_manifest.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-cli/src/android/library_resources.rs": { "repository": "https://github.com/longbridge/nsh", @@ -5390,7 +5481,7 @@ }, "crates/nsh-cli/src/build.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-cli/src/cdp.rs": { "repository": "https://github.com/longbridge/nsh", @@ -5398,19 +5489,19 @@ }, "crates/nsh-cli/src/check.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-cli/src/component.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-cli/src/dev.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-cli/src/dev_port.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-cli/src/entry.rs": { "repository": "https://github.com/longbridge/nsh", @@ -5418,17 +5509,24 @@ }, "crates/nsh-cli/src/init.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" + }, + "crates/nsh-cli/src/linux_pkg.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "bdba103fd31a22a188bebd6b19df54a99204bb0a" }, "crates/nsh-cli/src/linux_store.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "bdba103fd31a22a188bebd6b19df54a99204bb0a" }, "crates/nsh-cli/src/logger.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, - "crates/nsh-cli/src/main.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "crates/nsh-cli/src/main.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "bdba103fd31a22a188bebd6b19df54a99204bb0a" + }, "crates/nsh-cli/src/module_meta.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -5439,7 +5537,7 @@ }, "crates/nsh-cli/src/native_features.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/nsh-cli/src/nsh_lock.rs": { "repository": "https://github.com/longbridge/nsh", @@ -5455,7 +5553,7 @@ }, "crates/nsh-cli/src/nshm/fetch.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/nsh-cli/src/nshm/manifest.rs": { "repository": "https://github.com/longbridge/nsh", @@ -5467,11 +5565,11 @@ }, "crates/nsh-cli/src/nshm/resolve.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/nsh-cli/src/package.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "bdba103fd31a22a188bebd6b19df54a99204bb0a" }, "crates/nsh-cli/src/platforms.rs": { "repository": "https://github.com/longbridge/nsh", @@ -5496,9 +5594,12 @@ "crates/nsh-cli/src/run.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", "crates/nsh-cli/src/runtime.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, + "crates/nsh-cli/src/rust_app.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, - "crates/nsh-cli/src/rust_app.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", "crates/nsh-cli/src/self_update.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" @@ -5565,15 +5666,19 @@ }, "crates/nsh-cli/src/test.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, "crates/nsh-cli/src/test_android.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, + "crates/nsh-cli/src/test_attach.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, "crates/nsh-cli/src/test_host.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-cli/src/test_ios.rs": { "repository": "https://github.com/longbridge/nsh", @@ -5585,11 +5690,11 @@ }, "crates/nsh-cli/src/ui.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/nsh-cli/src/updater.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "crates/nsh-cli/src/web.rs": { "repository": "https://github.com/longbridge/nsh", @@ -5633,11 +5738,15 @@ }, "crates/nsh-cli/src/windows.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, + "crates/nsh-cli/src/windows_link.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-cli/tests/cli/check.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-cli/tests/cli/main.rs": { "repository": "https://github.com/longbridge/nsh", @@ -5645,7 +5754,7 @@ }, "crates/nsh-cli/tests/cli/runtime.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-cli/tests/cli/tui.rs": { "repository": "https://github.com/longbridge/nsh", @@ -5657,15 +5766,15 @@ }, "crates/nsh-core/Cargo.toml": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/nsh-core/src/access.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-core/src/animation/animator.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-core/src/animation/driver.rs": { "repository": "https://github.com/longbridge/nsh", @@ -5695,10 +5804,6 @@ "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" }, - "crates/nsh-core/src/auth_session.rs": { - "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" - }, "crates/nsh-core/src/byte_size.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -5709,7 +5814,7 @@ }, "crates/nsh-core/src/canvas/damage.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/nsh-core/src/canvas/hit.rs": { "repository": "https://github.com/longbridge/nsh", @@ -5733,16 +5838,19 @@ }, "crates/nsh-core/src/core/classes.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, + "crates/nsh-core/src/core/components.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, - "crates/nsh-core/src/core/components.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", "crates/nsh-core/src/core/cull.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" }, "crates/nsh-core/src/core/follow.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, "crates/nsh-core/src/core/layout_scope.rs": { "repository": "https://github.com/longbridge/nsh", @@ -5751,14 +5859,20 @@ "crates/nsh-core/src/core/layout_tree.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", "crates/nsh-core/src/core/list.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, "crates/nsh-core/src/core/list_motion.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, - "crates/nsh-core/src/core/measure.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", - "crates/nsh-core/src/core/mod.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "crates/nsh-core/src/core/measure.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" + }, + "crates/nsh-core/src/core/mod.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" + }, "crates/nsh-core/src/core/overlay.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" @@ -5769,7 +5883,7 @@ }, "crates/nsh-core/src/core/parent_viewport.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, "crates/nsh-core/src/core/reading.rs": { "repository": "https://github.com/M4n5ter/nsh", @@ -5795,7 +5909,10 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, - "crates/nsh-core/src/core/selection_ends.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "crates/nsh-core/src/core/selection_ends.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" + }, "crates/nsh-core/src/core/services.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -5812,14 +5929,17 @@ "repository": "https://github.com/longbridge/nsh", "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" }, - "crates/nsh-core/src/core/tests.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "crates/nsh-core/src/core/tests.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" + }, "crates/nsh-core/src/core/touch.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, "crates/nsh-core/src/core/views.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, "crates/nsh-core/src/core/watch.rs": { "repository": "https://github.com/longbridge/nsh", @@ -5859,7 +5979,7 @@ }, "crates/nsh-core/src/desktop/window.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/nsh-core/src/desktop/window_state.rs": { "repository": "https://github.com/longbridge/nsh", @@ -5871,7 +5991,7 @@ }, "crates/nsh-core/src/element/ambient.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "crates/nsh-core/src/element/animated.rs": { "repository": "https://github.com/longbridge/nsh", @@ -5904,7 +6024,7 @@ }, "crates/nsh-core/src/element/component.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/nsh-core/src/element/description.rs": { "repository": "https://github.com/longbridge/nsh", @@ -5912,11 +6032,11 @@ }, "crates/nsh-core/src/element/desktop.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, "crates/nsh-core/src/element/element_ref.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/nsh-core/src/element/engine_context.rs": { "repository": "https://github.com/longbridge/nsh", @@ -5924,7 +6044,7 @@ }, "crates/nsh-core/src/element/env.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-core/src/element/events.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", "crates/nsh-core/src/element/flow.rs": { @@ -5935,7 +6055,10 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, - "crates/nsh-core/src/element/host.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "crates/nsh-core/src/element/host.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" + }, "crates/nsh-core/src/element/host_events.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -6011,7 +6134,7 @@ }, "crates/nsh-core/src/element/services.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-core/src/element/status_bar.rs": { "repository": "https://github.com/longbridge/nsh", @@ -6019,15 +6142,15 @@ }, "crates/nsh-core/src/element/style.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/nsh-core/src/element/system.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-core/src/element/task.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "crates/nsh-core/src/element/tokens.rs": { "repository": "https://github.com/longbridge/nsh", @@ -6051,7 +6174,7 @@ }, "crates/nsh-core/src/fenwick.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "crates/nsh-core/src/file_dialog.rs": { "repository": "https://github.com/longbridge/nsh", @@ -6161,7 +6284,10 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, - "crates/nsh-core/src/js/host.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "crates/nsh-core/src/js/host.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, "crates/nsh-core/src/js/host_values.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" @@ -6189,11 +6315,11 @@ }, "crates/nsh-core/src/keymap.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-core/src/lib.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-core/src/list_diff.rs": { "repository": "https://github.com/longbridge/nsh", @@ -6209,9 +6335,12 @@ }, "crates/nsh-core/src/mobile.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" + }, + "crates/nsh-core/src/mount.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, - "crates/nsh-core/src/mount.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", "crates/nsh-core/src/navigation.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -6224,7 +6353,10 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, - "crates/nsh-core/src/ops.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "crates/nsh-core/src/ops.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, "crates/nsh-core/src/overlay.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -6235,7 +6367,7 @@ }, "crates/nsh-core/src/platform.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-core/src/platform/clipboard.rs": { "repository": "https://github.com/longbridge/nsh", @@ -6249,18 +6381,21 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, - "crates/nsh-core/src/prelude.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "crates/nsh-core/src/prelude.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" + }, "crates/nsh-core/src/props.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" }, "crates/nsh-core/src/reactive.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "crates/nsh-core/src/reactive/tests.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "crates/nsh-core/src/resource.rs": { "repository": "https://github.com/longbridge/nsh", @@ -6308,7 +6443,7 @@ }, "crates/nsh-core/src/runtime/fs.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-core/src/runtime/haptics.rs": { "repository": "https://github.com/longbridge/nsh", @@ -6324,7 +6459,7 @@ }, "crates/nsh-core/src/runtime/mod.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-core/src/runtime/net.rs": { "repository": "https://github.com/longbridge/nsh", @@ -6346,17 +6481,13 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, - "crates/nsh-core/src/runtime/share.rs": { - "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" - }, "crates/nsh-core/src/runtime/storage.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, "crates/nsh-core/src/runtime/updater.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/nsh-core/src/runtime/updater/prompt.rs": { "repository": "https://github.com/longbridge/nsh", @@ -6364,7 +6495,7 @@ }, "crates/nsh-core/src/runtime/url_scheme.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "crates/nsh-core/src/runtime/websocket.rs": { "repository": "https://github.com/longbridge/nsh", @@ -6387,7 +6518,10 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, - "crates/nsh-core/src/selection.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "crates/nsh-core/src/selection.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" + }, "crates/nsh-core/src/shader.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" @@ -6396,10 +6530,6 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, - "crates/nsh-core/src/share.rs": { - "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" - }, "crates/nsh-core/src/single_instance.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -6410,7 +6540,7 @@ }, "crates/nsh-core/src/style.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/nsh-core/src/svg/drawing.rs": { "repository": "https://github.com/longbridge/nsh", @@ -6478,7 +6608,7 @@ }, "crates/nsh-core/src/text.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "crates/nsh-core/src/text_edit.rs": { "repository": "https://github.com/longbridge/nsh", @@ -6502,7 +6632,7 @@ }, "crates/nsh-core/src/url_scheme.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "crates/nsh-core/src/web_resource.rs": { "repository": "https://github.com/longbridge/nsh", @@ -6530,7 +6660,7 @@ }, "crates/nsh-core/tests/attachment_compat.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "crates/nsh-core/unitless.txt": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", "crates/nsh-core/untyped.txt": { @@ -6541,21 +6671,25 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, + "crates/nsh-dev/src/attach.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, "crates/nsh-dev/src/client.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-dev/src/lib.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-dev/src/protocol.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-dev/src/server.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-dev/src/site.rs": { "repository": "https://github.com/longbridge/nsh", @@ -6567,7 +6701,7 @@ }, "crates/nsh-dev/tests/roundtrip.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-engine/Cargo.toml": { "repository": "https://github.com/longbridge/nsh", @@ -6592,11 +6726,11 @@ }, "crates/nsh-engine/src/frames.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-engine/src/gpu.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-engine/src/gpu_off.rs": { "repository": "https://github.com/longbridge/nsh", @@ -6606,7 +6740,10 @@ "repository": "https://github.com/longbridge/nsh", "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" }, - "crates/nsh-engine/src/lib.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "crates/nsh-engine/src/lib.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, "crates/nsh-engine/src/local_storage.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -6619,15 +6756,21 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, - "crates/nsh-engine/src/perf.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", - "crates/nsh-engine/src/script.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "crates/nsh-engine/src/perf.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" + }, + "crates/nsh-engine/src/script.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" + }, "crates/nsh-engine/src/shader.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-engine/src/shader_frame.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/nsh-engine/src/shader_off.rs": { "repository": "https://github.com/longbridge/nsh", @@ -6635,7 +6778,7 @@ }, "crates/nsh-engine/src/shader_surfaces.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/nsh-engine/src/shader_surfaces_windows.rs": { "repository": "https://github.com/longbridge/nsh", @@ -6679,7 +6822,7 @@ }, "crates/nsh-engine/tests/engine/components.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-engine/tests/engine/counter.rs": { "repository": "https://github.com/longbridge/nsh", @@ -6756,7 +6899,7 @@ }, "crates/nsh-engine/tests/engine/list.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-engine/tests/engine/list_bench.rs": { "repository": "https://github.com/longbridge/nsh", @@ -6789,7 +6932,7 @@ }, "crates/nsh-engine/tests/engine/package.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, "crates/nsh-engine/tests/engine/parity.rs": { "repository": "https://github.com/longbridge/nsh", @@ -6909,7 +7052,7 @@ }, "crates/nsh-extra/Cargo.toml": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-extra/src/camera/android.rs": { "repository": "https://github.com/longbridge/nsh", @@ -6929,7 +7072,7 @@ }, "crates/nsh-extra/src/lib.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-extra/src/location/apple.rs": { "repository": "https://github.com/longbridge/nsh", @@ -6983,6 +7126,38 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, + "crates/nsh-extra/src/share/android.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, + "crates/nsh-extra/src/share/fake.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, + "crates/nsh-extra/src/share/ios.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, + "crates/nsh-extra/src/share/js.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, + "crates/nsh-extra/src/share/macos.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, + "crates/nsh-extra/src/share/mod.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, + "crates/nsh-extra/src/share/tests.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" + }, + "crates/nsh-extra/src/share/web.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, "crates/nsh-extra/src/speech/android.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" @@ -7013,7 +7188,11 @@ }, "crates/nsh-extra/tests/extra/main.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, + "crates/nsh-extra/tests/extra/share.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-extra/tests/extra/speech.rs": { "repository": "https://github.com/longbridge/nsh", @@ -7189,25 +7368,28 @@ }, "crates/nsh-js/src/declarations.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/nsh-js/src/desktop.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, "crates/nsh-js/src/dom.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/nsh-js/src/env.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, "crates/nsh-js/src/error.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, - "crates/nsh-js/src/host.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "crates/nsh-js/src/host.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" + }, "crates/nsh-js/src/host_channel.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -7218,7 +7400,7 @@ }, "crates/nsh-js/src/i18n.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/nsh-js/src/input_action.rs": { "repository": "https://github.com/M4n5ter/nsh", @@ -7232,10 +7414,13 @@ "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" }, - "crates/nsh-js/src/list.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "crates/nsh-js/src/list.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, "crates/nsh-js/src/modules.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/nsh-js/src/navigation.rs": { "repository": "https://github.com/longbridge/nsh", @@ -7251,7 +7436,7 @@ }, "crates/nsh-js/src/protocol.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/nsh-js/src/reactive.rs": { "repository": "https://github.com/longbridge/nsh", @@ -7267,7 +7452,7 @@ }, "crates/nsh-js/src/sandbox.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-js/src/standard/bounds.rs": { "repository": "https://github.com/longbridge/nsh", @@ -7651,7 +7836,7 @@ }, "crates/nsh-platform-android/java/com/longbridge/nsh/A11y.java": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "crates/nsh-platform-android/java/com/longbridge/nsh/A11yChanges.java": { "repository": "https://github.com/longbridge/nsh", @@ -7659,7 +7844,7 @@ }, "crates/nsh-platform-android/java/com/longbridge/nsh/Activities.java": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-platform-android/java/com/longbridge/nsh/AppActivity.java": { "repository": "https://github.com/longbridge/nsh", @@ -7673,10 +7858,6 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, - "crates/nsh-platform-android/java/com/longbridge/nsh/AuthSession.java": { - "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" - }, "crates/nsh-platform-android/java/com/longbridge/nsh/BackCallbacks.java": { "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" @@ -7687,7 +7868,7 @@ }, "crates/nsh-platform-android/java/com/longbridge/nsh/Backdrop.java": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/nsh-platform-android/java/com/longbridge/nsh/Blur.java": { "repository": "https://github.com/longbridge/nsh", @@ -7699,7 +7880,7 @@ }, "crates/nsh-platform-android/java/com/longbridge/nsh/Box.java": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-platform-android/java/com/longbridge/nsh/CanvasBox.java": { "repository": "https://github.com/longbridge/nsh", @@ -7725,13 +7906,9 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, - "crates/nsh-platform-android/java/com/longbridge/nsh/DateTimePickerComponent.java": { - "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" - }, "crates/nsh-platform-android/java/com/longbridge/nsh/Decor.java": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, "crates/nsh-platform-android/java/com/longbridge/nsh/DevActivity.java": { "repository": "https://github.com/longbridge/nsh", @@ -7739,7 +7916,7 @@ }, "crates/nsh-platform-android/java/com/longbridge/nsh/Effects.java": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/nsh-platform-android/java/com/longbridge/nsh/FileDrops.java": { "repository": "https://github.com/longbridge/nsh", @@ -7771,7 +7948,7 @@ }, "crates/nsh-platform-android/java/com/longbridge/nsh/InputBox.java": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "crates/nsh-platform-android/java/com/longbridge/nsh/InputContent.java": { "repository": "https://github.com/longbridge/nsh", @@ -7809,15 +7986,22 @@ "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" }, - "crates/nsh-platform-android/java/com/longbridge/nsh/Mounter.java": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "crates/nsh-platform-android/java/com/longbridge/nsh/Mounter.java": { + "repository": "https://github.com/longbridge/nsh", + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" + }, "crates/nsh-platform-android/java/com/longbridge/nsh/Native.java": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-platform-android/java/com/longbridge/nsh/NativeProxy.java": { "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" }, + "crates/nsh-platform-android/java/com/longbridge/nsh/NativeReceiver.java": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, "crates/nsh-platform-android/java/com/longbridge/nsh/NavTransition.java": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -7872,7 +8056,7 @@ }, "crates/nsh-platform-android/java/com/longbridge/nsh/NshView.java": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-platform-android/java/com/longbridge/nsh/PendingFocus.java": { "repository": "https://github.com/longbridge/nsh", @@ -7896,7 +8080,7 @@ }, "crates/nsh-platform-android/java/com/longbridge/nsh/Pressable.java": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "crates/nsh-platform-android/java/com/longbridge/nsh/RustComponent.java": { "repository": "https://github.com/longbridge/nsh", @@ -7904,14 +8088,13 @@ }, "crates/nsh-platform-android/java/com/longbridge/nsh/ScrollBox.java": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, - "crates/nsh-platform-android/java/com/longbridge/nsh/SelectableView.java": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", - "crates/nsh-platform-android/java/com/longbridge/nsh/SelectionHandle.java": { + "crates/nsh-platform-android/java/com/longbridge/nsh/SelectableView.java": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, - "crates/nsh-platform-android/java/com/longbridge/nsh/Share.java": { + "crates/nsh-platform-android/java/com/longbridge/nsh/SelectionHandle.java": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, @@ -7923,10 +8106,6 @@ "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" }, - "crates/nsh-platform-android/java/com/longbridge/nsh/SwitchComponent.java": { - "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" - }, "crates/nsh-platform-android/java/com/longbridge/nsh/SystemMenus.java": { "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" @@ -7949,11 +8128,11 @@ }, "crates/nsh-platform-android/java/com/longbridge/nsh/TextBox.java": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, "crates/nsh-platform-android/java/com/longbridge/nsh/TextLayouts.java": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, "crates/nsh-platform-android/java/com/longbridge/nsh/TouchTracker.java": { "repository": "https://github.com/longbridge/nsh", @@ -7962,7 +8141,7 @@ "crates/nsh-platform-android/java/com/longbridge/nsh/VideoBox.java": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", "crates/nsh-platform-android/java/com/longbridge/nsh/WebBox.java": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/nsh-platform-android/java/com/longbridge/nsh/WidgetBox.java": { "repository": "https://github.com/longbridge/nsh", @@ -7974,7 +8153,7 @@ }, "crates/nsh-platform-android/src/activity.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-platform-android/src/agent.rs": { "repository": "https://github.com/longbridge/nsh", @@ -7982,7 +8161,7 @@ }, "crates/nsh-platform-android/src/animation.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, "crates/nsh-platform-android/src/component.rs": { "repository": "https://github.com/longbridge/nsh", @@ -7994,13 +8173,19 @@ }, "crates/nsh-platform-android/src/dev.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, + "crates/nsh-platform-android/src/encode.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, + "crates/nsh-platform-android/src/host.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, - "crates/nsh-platform-android/src/encode.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", - "crates/nsh-platform-android/src/host.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", "crates/nsh-platform-android/src/java.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-platform-android/src/keymap.rs": { "repository": "https://github.com/longbridge/nsh", @@ -8008,7 +8193,7 @@ }, "crates/nsh-platform-android/src/lib.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-platform-android/src/logger.rs": { "repository": "https://github.com/longbridge/nsh", @@ -8034,14 +8219,22 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, + "crates/nsh-platform-android/src/presenting.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, "crates/nsh-platform-android/src/proxy.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" }, + "crates/nsh-platform-android/src/receiver.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, "crates/nsh-platform-android/src/selectable_view.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", "crates/nsh-platform-android/src/shader.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/nsh-platform-android/src/svg.rs": { "repository": "https://github.com/longbridge/nsh", @@ -8059,6 +8252,10 @@ "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" }, + "crates/nsh-platform-android/tests/InputPress.tsx": { + "repository": "https://github.com/longbridge/nsh", + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" + }, "crates/nsh-platform-android/tests/ScrollToLate.tsx": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -8103,6 +8300,10 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, + "crates/nsh-platform-android/tests/input-press.test.tsx": { + "repository": "https://github.com/longbridge/nsh", + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" + }, "crates/nsh-platform-android/tests/java/com/longbridge/nsh/A11yChangesTest.java": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -8119,6 +8320,10 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, + "crates/nsh-platform-android/tests/java/com/longbridge/nsh/BorderCornersTest.java": { + "repository": "https://github.com/longbridge/nsh", + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" + }, "crates/nsh-platform-android/tests/java/com/longbridge/nsh/BottomBarVisibilityTest.java": { "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" @@ -8167,6 +8372,10 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, + "crates/nsh-platform-android/tests/java/com/longbridge/nsh/SelectionGeometryTest.java": { + "repository": "https://github.com/longbridge/nsh", + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" + }, "crates/nsh-platform-android/tests/java/com/longbridge/nsh/TabOrderTest.java": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -8294,10 +8503,6 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, - "crates/nsh-platform-ios/src/auth_session.rs": { - "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" - }, "crates/nsh-platform-ios/src/blur.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -8316,7 +8521,7 @@ }, "crates/nsh-platform-ios/src/component.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/nsh-platform-ios/src/decor.rs": { "repository": "https://github.com/longbridge/nsh", @@ -8324,7 +8529,7 @@ }, "crates/nsh-platform-ios/src/dev.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-platform-ios/src/embed.rs": { "repository": "https://github.com/longbridge/nsh", @@ -8362,9 +8567,12 @@ }, "crates/nsh-platform-ios/src/lib.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, + "crates/nsh-platform-ios/src/mount.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, - "crates/nsh-platform-ios/src/mount.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", "crates/nsh-platform-ios/src/native_view.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" @@ -8383,11 +8591,11 @@ }, "crates/nsh-platform-ios/src/presenting.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-platform-ios/src/press.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "crates/nsh-platform-ios/src/scroll_edge.rs": { "repository": "https://github.com/longbridge/nsh", @@ -8397,14 +8605,13 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, - "crates/nsh-platform-ios/src/selectable_view.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", - "crates/nsh-platform-ios/src/shader.rs": { + "crates/nsh-platform-ios/src/selectable_view.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, - "crates/nsh-platform-ios/src/share.rs": { + "crates/nsh-platform-ios/src/shader.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-platform-ios/src/sight.rs": { "repository": "https://github.com/longbridge/nsh", @@ -8418,7 +8625,10 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, - "crates/nsh-platform-ios/src/surface.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "crates/nsh-platform-ios/src/surface.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" + }, "crates/nsh-platform-ios/src/synth.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" @@ -8428,31 +8638,22 @@ "repository": "https://github.com/longbridge/nsh", "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" }, - "crates/nsh-platform-ios/src/system_date_time_picker.rs": { - "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" - }, "crates/nsh-platform-ios/src/system_menu_button.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" }, - "crates/nsh-platform-ios/src/system_segmented_control.rs": { - "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" - }, - "crates/nsh-platform-ios/src/system_switch.rs": { - "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" - }, "crates/nsh-platform-ios/src/system_tab_bar.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, "crates/nsh-platform-ios/src/target.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" + }, + "crates/nsh-platform-ios/src/text.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, - "crates/nsh-platform-ios/src/text.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", "crates/nsh-platform-ios/src/text_access.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -8469,7 +8670,7 @@ "crates/nsh-platform-ios/src/video.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", "crates/nsh-platform-ios/src/view.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, "crates/nsh-platform-ios/src/visual.rs": { "repository": "https://github.com/longbridge/nsh", @@ -8477,7 +8678,7 @@ }, "crates/nsh-platform-ios/src/web.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/nsh-platform-ios/src/zoom.rs": { "repository": "https://github.com/longbridge/nsh", @@ -8571,6 +8772,14 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, + "crates/nsh-platform-ios/tests/keyboard/InputPress.test.tsx": { + "repository": "https://github.com/longbridge/nsh", + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" + }, + "crates/nsh-platform-ios/tests/keyboard/InputPress.tsx": { + "repository": "https://github.com/longbridge/nsh", + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" + }, "crates/nsh-platform-ios/tests/keyboard/Keyboard.test.tsx": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -8797,7 +9006,7 @@ }, "crates/nsh-platform-linux/src/access.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-platform-linux/src/agent.rs": { "repository": "https://github.com/longbridge/nsh", @@ -8809,7 +9018,7 @@ }, "crates/nsh-platform-linux/src/app.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/nsh-platform-linux/src/atspi_test.py": { "repository": "https://github.com/longbridge/nsh", @@ -8842,7 +9051,7 @@ }, "crates/nsh-platform-linux/src/dev.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-platform-linux/src/file_drop.rs": { "repository": "https://github.com/longbridge/nsh", @@ -8875,7 +9084,7 @@ }, "crates/nsh-platform-linux/src/input.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/nsh-platform-linux/src/key_focus.rs": { "repository": "https://github.com/longbridge/nsh", @@ -8887,11 +9096,11 @@ }, "crates/nsh-platform-linux/src/keymap.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-platform-linux/src/lib.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-platform-linux/src/links.rs": { "repository": "https://github.com/longbridge/nsh", @@ -8904,12 +9113,12 @@ "crates/nsh-platform-linux/src/menu_style.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", "crates/nsh-platform-linux/src/mount.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/nsh-platform-linux/src/native.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", "crates/nsh-platform-linux/src/native/web.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/nsh-platform-linux/src/native/web_scheme.rs": { "repository": "https://github.com/longbridge/nsh", @@ -8923,8 +9132,15 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, + "crates/nsh-platform-linux/src/presenting.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, "crates/nsh-platform-linux/src/scroll.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", - "crates/nsh-platform-linux/src/selectable_view.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "crates/nsh-platform-linux/src/selectable_view.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" + }, "crates/nsh-platform-linux/src/session.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -8943,7 +9159,7 @@ }, "crates/nsh-platform-linux/src/surface.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-platform-linux/src/synth.rs": { "repository": "https://github.com/longbridge/nsh", @@ -8952,7 +9168,7 @@ "crates/nsh-platform-linux/src/system.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", "crates/nsh-platform-linux/src/text.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "crates/nsh-platform-linux/src/text_input.rs": { "repository": "https://github.com/longbridge/nsh", @@ -8968,20 +9184,23 @@ }, "crates/nsh-platform-linux/src/view.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" + }, + "crates/nsh-platform-linux/src/window.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, - "crates/nsh-platform-linux/src/window.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", "crates/nsh-platform-linux/src/xtest.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, "crates/nsh-platform-macos/Cargo.toml": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, "crates/nsh-platform-macos/src/access.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "crates/nsh-platform-macos/src/access/scroll_bar.rs": { "repository": "https://github.com/longbridge/nsh", @@ -9005,12 +9224,16 @@ }, "crates/nsh-platform-macos/src/app.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "bdba103fd31a22a188bebd6b19df54a99204bb0a" }, "crates/nsh-platform-macos/src/blur.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, + "crates/nsh-platform-macos/src/box_none.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" + }, "crates/nsh-platform-macos/src/canvas.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" @@ -9029,11 +9252,11 @@ }, "crates/nsh-platform-macos/src/decor.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/nsh-platform-macos/src/dev.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-platform-macos/src/file_drop.rs": { "repository": "https://github.com/longbridge/nsh", @@ -9059,7 +9282,7 @@ }, "crates/nsh-platform-macos/src/input.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, "crates/nsh-platform-macos/src/keyboard.rs": { "repository": "https://github.com/longbridge/nsh", @@ -9071,7 +9294,7 @@ }, "crates/nsh-platform-macos/src/lib.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-platform-macos/src/login_item.rs": { "repository": "https://github.com/longbridge/nsh", @@ -9079,9 +9302,12 @@ }, "crates/nsh-platform-macos/src/mount.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" + }, + "crates/nsh-platform-macos/src/native.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, - "crates/nsh-platform-macos/src/native.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", "crates/nsh-platform-macos/src/navigation.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" @@ -9098,39 +9324,54 @@ "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" }, + "crates/nsh-platform-macos/src/presenting.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, "crates/nsh-platform-macos/src/screen_color.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, - "crates/nsh-platform-macos/src/scroll.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", - "crates/nsh-platform-macos/src/selectable_view.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", - "crates/nsh-platform-macos/src/shader.rs": { + "crates/nsh-platform-macos/src/scroll.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, - "crates/nsh-platform-macos/src/share.rs": { + "crates/nsh-platform-macos/src/selectable_view.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" + }, + "crates/nsh-platform-macos/src/shader.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-platform-macos/src/sight.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" }, - "crates/nsh-platform-macos/src/surface.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "crates/nsh-platform-macos/src/surface.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" + }, "crates/nsh-platform-macos/src/synth.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, "crates/nsh-platform-macos/src/system.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, + "crates/nsh-platform-macos/src/text.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, - "crates/nsh-platform-macos/src/text.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", "crates/nsh-platform-macos/src/text/raster.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, + "crates/nsh-platform-macos/src/text_input.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, - "crates/nsh-platform-macos/src/text_input.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", "crates/nsh-platform-macos/src/transition.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -9141,19 +9382,19 @@ }, "crates/nsh-platform-macos/src/view.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, "crates/nsh-platform-macos/src/visual.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/nsh-platform-macos/src/window.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "bdba103fd31a22a188bebd6b19df54a99204bb0a" }, "crates/nsh-platform-macos/src/window_state.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "bdba103fd31a22a188bebd6b19df54a99204bb0a" }, "crates/nsh-platform-macos/tests/accessibility.rs": { "repository": "https://github.com/longbridge/nsh", @@ -9389,6 +9630,10 @@ "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, "crates/nsh-platform-macos/tests/native/input_line_height.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "crates/nsh-platform-macos/tests/native/input_press.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" + }, "crates/nsh-platform-macos/tests/native/input_restyle.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" @@ -9409,7 +9654,14 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, - "crates/nsh-platform-macos/tests/native/main.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "crates/nsh-platform-macos/tests/native/layout_animation_bench.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" + }, + "crates/nsh-platform-macos/tests/native/main.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" + }, "crates/nsh-platform-macos/tests/native/mask_corners.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" @@ -9430,10 +9682,18 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, + "crates/nsh-platform-macos/tests/native/momentum_bounce.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, "crates/nsh-platform-macos/tests/native/mount.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" }, + "crates/nsh-platform-macos/tests/native/multi_view.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, "crates/nsh-platform-macos/tests/native/navigation_unmount.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -9446,6 +9706,10 @@ "repository": "https://github.com/longbridge/nsh", "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" }, + "crates/nsh-platform-macos/tests/native/presenting.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, "crates/nsh-platform-macos/tests/native/press_momentum.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -9465,7 +9729,7 @@ }, "crates/nsh-platform-macos/tests/native/scroll_indicator_layout.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, "crates/nsh-platform-macos/tests/native/selection_autoscroll.rs": { "repository": "https://github.com/longbridge/nsh", @@ -9477,7 +9741,7 @@ }, "crates/nsh-platform-macos/tests/native/shader_content.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-platform-macos/tests/native/tap_feedback.rs": { "repository": "https://github.com/longbridge/nsh", @@ -9495,6 +9759,10 @@ "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" }, + "crates/nsh-platform-macos/tests/native/unbound_animation.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, "crates/nsh-platform-macos/tests/native/web_file_input.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", "crates/nsh-platform-macos/tests/native/web_load_wait.rs": { "repository": "https://github.com/longbridge/nsh", @@ -9520,6 +9788,10 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, + "crates/nsh-platform-macos/tests/native/window_mode_layout.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, "crates/nsh-platform-macos/tests/native/window_press.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -9536,7 +9808,10 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, - "crates/nsh-platform-tui/src/app.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "crates/nsh-platform-tui/src/app.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" + }, "crates/nsh-platform-tui/src/canvas.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" @@ -9547,7 +9822,7 @@ }, "crates/nsh-platform-tui/src/dev.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-platform-tui/src/dialog.rs": { "repository": "https://github.com/longbridge/nsh", @@ -9595,7 +9870,7 @@ }, "crates/nsh-platform-tui/src/mount.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/nsh-platform-tui/src/native.rs": { "repository": "https://github.com/longbridge/nsh", @@ -9637,7 +9912,10 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, - "crates/nsh-platform-tui/src/selection.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "crates/nsh-platform-tui/src/selection.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" + }, "crates/nsh-platform-tui/src/surface.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -9688,7 +9966,7 @@ }, "crates/nsh-platform-tui/tests/tui/dock.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-platform-tui/tests/tui/editor.rs": { "repository": "https://github.com/longbridge/nsh", @@ -9836,7 +10114,7 @@ }, "crates/nsh-platform-web/src/browser/protocol.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/nsh-platform-web/src/browser/reactive.rs": { "repository": "https://github.com/longbridge/nsh", @@ -9866,7 +10144,10 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, - "crates/nsh-platform-web/src/encode.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "crates/nsh-platform-web/src/encode.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, "crates/nsh-platform-web/src/encode/input.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -9883,7 +10164,10 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, - "crates/nsh-platform-web/src/lib.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "crates/nsh-platform-web/src/lib.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, "crates/nsh-platform-web/src/net.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -10015,7 +10299,7 @@ }, "crates/nsh-platform-web/web/browser/bootstrap.js": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-platform-web/web/browser/browser-check.py": { "repository": "https://github.com/longbridge/nsh", @@ -10035,7 +10319,7 @@ }, "crates/nsh-platform-web/web/browser/dom.js": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/nsh-platform-web/web/browser/dom.test.mjs": { "repository": "https://github.com/longbridge/nsh", @@ -10091,7 +10375,7 @@ }, "crates/nsh-platform-web/web/browser/list.js": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-platform-web/web/browser/loader.js": { "repository": "https://github.com/longbridge/nsh", @@ -10139,7 +10423,7 @@ }, "crates/nsh-platform-web/web/browser/reactive.test.mjs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-platform-web/web/browser/realm.js": { "repository": "https://github.com/longbridge/nsh", @@ -10203,10 +10487,16 @@ }, "crates/nsh-platform-web/web/mouse.test.mjs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" + }, + "crates/nsh-platform-web/web/nsh.js": { + "repository": "https://github.com/longbridge/nsh", + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" + }, + "crates/nsh-platform-web/web/nsh.test.mjs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, - "crates/nsh-platform-web/web/nsh.js": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", - "crates/nsh-platform-web/web/nsh.test.mjs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", "crates/nsh-platform-web/web/realm-browser.test.mjs": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -10223,7 +10513,7 @@ "crates/nsh-platform-web/web/text-browser.test.mjs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", "crates/nsh-platform-web/web/touch-browser.test.mjs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, "crates/nsh-platform-web/web/viewport-browser.test.mjs": { "repository": "https://github.com/longbridge/nsh", @@ -10247,14 +10537,20 @@ }, "crates/nsh-platform-windows/src/agent.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + }, + "crates/nsh-platform-windows/src/animation.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + }, + "crates/nsh-platform-windows/src/app.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, - "crates/nsh-platform-windows/src/animation.rs": { + "crates/nsh-platform-windows/src/app_window.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, - "crates/nsh-platform-windows/src/app.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", - "crates/nsh-platform-windows/src/app_window.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", "crates/nsh-platform-windows/src/audio.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -10267,6 +10563,10 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, + "crates/nsh-platform-windows/src/box_none.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" + }, "crates/nsh-platform-windows/src/canvas.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" @@ -10275,7 +10575,10 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, - "crates/nsh-platform-windows/src/chrome.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "crates/nsh-platform-windows/src/chrome.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" + }, "crates/nsh-platform-windows/src/compose.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -10298,7 +10601,7 @@ }, "crates/nsh-platform-windows/src/dev.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-platform-windows/src/file_drop.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", "crates/nsh-platform-windows/src/file_requests.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", @@ -10321,11 +10624,11 @@ }, "crates/nsh-platform-windows/src/input.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/nsh-platform-windows/src/keyboard.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-platform-windows/src/keymap.rs": { "repository": "https://github.com/longbridge/nsh", @@ -10333,7 +10636,7 @@ }, "crates/nsh-platform-windows/src/lib.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-platform-windows/src/linking.rs": { "repository": "https://github.com/longbridge/nsh", @@ -10345,20 +10648,20 @@ }, "crates/nsh-platform-windows/src/mount.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/nsh-platform-windows/src/native.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-platform-windows/src/native/video.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", "crates/nsh-platform-windows/src/native/web.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-platform-windows/src/navigation.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/nsh-platform-windows/src/notifications.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", "crates/nsh-platform-windows/src/picker.rs": { @@ -10369,14 +10672,24 @@ "repository": "https://github.com/longbridge/nsh", "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" }, - "crates/nsh-platform-windows/src/render.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "crates/nsh-platform-windows/src/presenting.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, + "crates/nsh-platform-windows/src/render.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, "crates/nsh-platform-windows/src/render/tests/capture.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" }, "crates/nsh-platform-windows/src/richedit.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", "crates/nsh-platform-windows/src/scroll.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", - "crates/nsh-platform-windows/src/selectable_view.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "crates/nsh-platform-windows/src/selectable_view.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" + }, "crates/nsh-platform-windows/src/session.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -10387,15 +10700,24 @@ }, "crates/nsh-platform-windows/src/shell.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" + }, + "crates/nsh-platform-windows/src/surface.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, - "crates/nsh-platform-windows/src/surface.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", "crates/nsh-platform-windows/src/synth.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" }, - "crates/nsh-platform-windows/src/system.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", - "crates/nsh-platform-windows/src/text.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "crates/nsh-platform-windows/src/system.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, + "crates/nsh-platform-windows/src/text.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" + }, "crates/nsh-platform-windows/src/text_input.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", "crates/nsh-platform-windows/src/transition.rs": { "repository": "https://github.com/longbridge/nsh", @@ -10409,7 +10731,10 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, - "crates/nsh-platform-windows/src/window.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "crates/nsh-platform-windows/src/window.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" + }, "crates/nsh-platform-windows/src/window_close.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -10424,11 +10749,11 @@ }, "crates/nsh-testing/Cargo.toml": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "crates/nsh-testing/src/agent.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-testing/src/agent/forward.rs": { "repository": "https://github.com/longbridge/nsh", @@ -10440,11 +10765,11 @@ }, "crates/nsh-testing/src/driver.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-testing/src/failure.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-testing/src/headless/animation.rs": { "repository": "https://github.com/longbridge/nsh", @@ -10470,7 +10795,10 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, - "crates/nsh-testing/src/headless/mod.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "crates/nsh-testing/src/headless/mod.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, "crates/nsh-testing/src/headless/net.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -10487,7 +10815,10 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, - "crates/nsh-testing/src/headless/selection.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "crates/nsh-testing/src/headless/selection.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" + }, "crates/nsh-testing/src/headless/stub.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -10506,7 +10837,7 @@ }, "crates/nsh-testing/src/module.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-testing/src/page_host.rs": { "repository": "https://github.com/longbridge/nsh", @@ -10518,13 +10849,16 @@ }, "crates/nsh-testing/src/run.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-testing/src/runner.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, - "crates/nsh-testing/src/screen.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "crates/nsh-testing/src/screen.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, "crates/nsh-testing/src/selector.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -10861,7 +11195,10 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, - "crates/nsh-testing/tests/testing/main.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "crates/nsh-testing/tests/testing/main.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" + }, "crates/nsh-testing/tests/testing/menus/App.test.tsx": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -11000,11 +11337,11 @@ }, "crates/nsh-testing/tests/testing/text-selection/App.test.tsx": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/nsh-testing/tests/testing/text-selection/App.tsx": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/nsh-testing/tests/testing/todo/App.test.tsx": { "repository": "https://github.com/longbridge/nsh", @@ -11208,7 +11545,15 @@ }, "crates/nsh-windows-app/Cargo.toml": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" + }, + "crates/nsh-windows-app/build.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" + }, + "crates/nsh-windows-app/script/link-kit.js": { + "repository": "https://github.com/longbridge/nsh", + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/nsh-windows-app/src/lib.rs": { "repository": "https://github.com/longbridge/nsh", @@ -11216,7 +11561,7 @@ }, "crates/nsh-windows-app/src/main.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/nsh-windows-host/Cargo.toml": { "repository": "https://github.com/longbridge/nsh", @@ -11236,7 +11581,7 @@ }, "crates/xtask/src/android.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/xtask/src/cargo.rs": { "repository": "https://github.com/longbridge/nsh", @@ -11248,7 +11593,7 @@ }, "crates/xtask/src/dist.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/xtask/src/emoji.rs": { "repository": "https://github.com/longbridge/nsh", @@ -11292,9 +11637,12 @@ }, "docs/dev/animation.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" + }, + "docs/dev/api-naming.md": { + "repository": "https://github.com/longbridge/nsh", + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, - "docs/dev/api-naming.md": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", "docs/dev/architecture.md": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -11309,11 +11657,11 @@ }, "docs/dev/canvas.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "docs/dev/commands.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "docs/dev/compatibility.md": { "repository": "https://github.com/longbridge/nsh", @@ -11321,7 +11669,7 @@ }, "docs/dev/components.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, "docs/dev/data-table.md": { "repository": "https://github.com/longbridge/nsh", @@ -11333,7 +11681,7 @@ }, "docs/dev/dock.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "docs/dev/editor.md": { "repository": "https://github.com/longbridge/nsh", @@ -11341,11 +11689,11 @@ }, "docs/dev/elements.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, "docs/dev/embedding.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "docs/dev/engineering.md": { "repository": "https://github.com/longbridge/nsh", @@ -11369,7 +11717,7 @@ }, "docs/dev/gpui.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "docs/dev/image-loading-design.md": { "repository": "https://github.com/longbridge/nsh", @@ -11381,32 +11729,44 @@ }, "docs/dev/js-modules.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "docs/dev/linux.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" + }, + "docs/dev/macos.md": { + "repository": "https://github.com/longbridge/nsh", + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, - "docs/dev/macos.md": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", "docs/dev/native-pipeline.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" + }, + "docs/dev/performance.md": { + "repository": "https://github.com/longbridge/nsh", + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" + }, + "docs/dev/pitfalls.md": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, - "docs/dev/performance.md": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", - "docs/dev/pitfalls.md": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", "docs/dev/platforms.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "docs/dev/reactive-components.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, "docs/dev/repository-map.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, + "docs/dev/rich-editor.md": { + "repository": "https://github.com/longbridge/nsh", + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, - "docs/dev/rich-editor.md": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", "docs/dev/rust-classes.md": { "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" @@ -11417,7 +11777,7 @@ }, "docs/dev/sandbox.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "docs/dev/scrolling-and-lists.md": { "repository": "https://github.com/longbridge/nsh", @@ -11425,7 +11785,7 @@ }, "docs/dev/shaders.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "docs/dev/signed-packages.md": { "repository": "https://github.com/longbridge/nsh", @@ -11433,13 +11793,19 @@ }, "docs/dev/styles.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" + }, + "docs/dev/text-view.md": { + "repository": "https://github.com/longbridge/nsh", + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" + }, + "docs/dev/text.md": { + "repository": "https://github.com/longbridge/nsh", + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, - "docs/dev/text-view.md": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", - "docs/dev/text.md": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", "docs/dev/tooling.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, "docs/dev/tui.md": { "repository": "https://github.com/longbridge/nsh", @@ -11449,12 +11815,18 @@ "repository": "https://github.com/longbridge/nsh", "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" }, - "docs/dev/web.md": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "docs/dev/web.md": { + "repository": "https://github.com/longbridge/nsh", + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" + }, "docs/dev/window-model.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" + }, + "docs/dev/windows.md": { + "repository": "https://github.com/longbridge/nsh", + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, - "docs/dev/windows.md": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", "docs/dev/workflow.md": { "repository": "https://github.com/longbridge/nsh", "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" @@ -11599,7 +11971,10 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, - "examples/embed-gpui/Cargo.lock": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "examples/embed-gpui/Cargo.lock": { + "repository": "https://github.com/longbridge/nsh", + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" + }, "examples/embed-gpui/Cargo.toml": { "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" @@ -11690,19 +12065,23 @@ }, "examples/extra/App.tsx": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "examples/extra/README.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "examples/extra/nsh.json": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "examples/extra/nsh.lock": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, + "examples/extra/tests/share.test.tsx": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "examples/extra/tests/speech.test.tsx": { "repository": "https://github.com/longbridge/nsh", @@ -12106,7 +12485,7 @@ }, "examples/gallery/demos/Controls.tsx": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "examples/gallery/demos/DataTableDemo.tsx": { "repository": "https://github.com/longbridge/nsh", @@ -12166,7 +12545,7 @@ }, "examples/gallery/demos/Menus.tsx": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "examples/gallery/demos/Navigation.tsx": { "repository": "https://github.com/longbridge/nsh", @@ -12270,7 +12649,7 @@ }, "examples/gallery/demos/System.tsx": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "examples/gallery/demos/Tailwind.tsx": { "repository": "https://github.com/longbridge/nsh", @@ -12422,7 +12801,7 @@ }, "examples/gallery/nsh.json": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "examples/gallery/scripts/lucide.py": { "repository": "https://github.com/longbridge/nsh", @@ -12555,7 +12934,7 @@ }, "examples/gallery/tests/controls.test.tsx": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "examples/gallery/tests/copy-selection-windows.test.tsx": { "repository": "https://github.com/longbridge/nsh", @@ -12591,7 +12970,7 @@ }, "examples/gallery/tests/date-picker.test.tsx": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "examples/gallery/tests/device.test.tsx": { "repository": "https://github.com/longbridge/nsh", @@ -12695,7 +13074,7 @@ }, "examples/gallery/tests/fixtures/hidden-focus.tsx": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "examples/gallery/tests/fixtures/input-caret-grow.tsx": { "repository": "https://github.com/longbridge/nsh", @@ -12892,7 +13271,7 @@ }, "examples/gallery/tests/fixtures/windows.tsx": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "examples/gallery/tests/fixtures/zoom-in-pager.tsx": { "repository": "https://github.com/longbridge/nsh", @@ -12924,7 +13303,7 @@ }, "examples/gallery/tests/hidden-focus.test.tsx": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "examples/gallery/tests/hover-card.test.tsx": { "repository": "https://github.com/longbridge/nsh", @@ -13009,7 +13388,7 @@ }, "examples/gallery/tests/menus.test.tsx": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "examples/gallery/tests/navigation.test.tsx": { "repository": "https://github.com/longbridge/nsh", @@ -13049,7 +13428,7 @@ }, "examples/gallery/tests/photos.test.tsx": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "examples/gallery/tests/picker.test.tsx": { "repository": "https://github.com/longbridge/nsh", @@ -13135,10 +13514,6 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, - "examples/gallery/tests/share.test.tsx": { - "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" - }, "examples/gallery/tests/sheet-alert.test.tsx": { "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" @@ -13237,7 +13612,7 @@ }, "examples/gallery/tests/window-state.test.tsx": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "examples/gallery/tests/windows.test.tsx": { "repository": "https://github.com/longbridge/nsh", @@ -13401,7 +13776,7 @@ }, "examples/nsh-gallery-ui/demo.ts": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "examples/nsh-gallery-ui/emoji.tsx": { "repository": "https://github.com/longbridge/nsh", @@ -13441,7 +13816,7 @@ }, "examples/nsh-gallery-ui/look/listbox.tsx": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "examples/nsh-gallery-ui/look/menu.tsx": { "repository": "https://github.com/longbridge/nsh", @@ -13489,7 +13864,7 @@ }, "examples/nsh-gallery-ui/look/workspace.tsx": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, "examples/nsh-gallery-ui/package.json": { "repository": "https://github.com/longbridge/nsh", @@ -13517,7 +13892,7 @@ }, "examples/nsh-gallery-ui/slider.ts": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "examples/nsh-gallery-ui/sound.ts": { "repository": "https://github.com/longbridge/nsh", @@ -13597,7 +13972,7 @@ }, "examples/rust-exports/App.test.tsx": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "examples/rust-exports/App.tsx": { "repository": "https://github.com/longbridge/nsh", @@ -13605,7 +13980,11 @@ }, "examples/rust-exports/README.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, + "examples/rust-exports/TextChild.tsx": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "examples/rust-exports/modules.test.tsx": { "repository": "https://github.com/longbridge/nsh", @@ -13629,7 +14008,7 @@ }, "examples/rust-exports/native/src/lib.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "examples/rust-exports/native/src/meter.rs": { "repository": "https://github.com/longbridge/nsh", @@ -13793,7 +14172,7 @@ }, "skills/nsh/references/mixed.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "skills/nsh/references/rust-recipe.md": { "repository": "https://github.com/longbridge/nsh", @@ -13811,7 +14190,10 @@ "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" }, - "skills/nsh/references/tooling.md": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "skills/nsh/references/tooling.md": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, "skills/nsh/references/tsx-recipe.md": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -13854,7 +14236,7 @@ }, "tests/compat/cases/base/App.tsx": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, "tests/compat/cases/base/base-accordion.tsx": { "repository": "https://github.com/longbridge/nsh", @@ -13872,6 +14254,10 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, + "tests/compat/cases/base/base-calendar.tsx": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, "tests/compat/cases/base/base-carousel.tsx": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -13914,7 +14300,7 @@ }, "tests/compat/cases/base/base-date-picker.tsx": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "tests/compat/cases/base/base-dialog-backdrop.tsx": { "repository": "https://github.com/longbridge/nsh", @@ -13956,6 +14342,10 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, + "tests/compat/cases/base/base-host-accessibility.tsx": { + "repository": "https://github.com/longbridge/nsh", + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" + }, "tests/compat/cases/base/base-hover-card.tsx": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -14036,7 +14426,10 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, - "tests/compat/cases/base/base-rich-editor-kit.tsx": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "tests/compat/cases/base/base-rich-editor-kit.tsx": { + "repository": "https://github.com/longbridge/nsh", + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" + }, "tests/compat/cases/base/base-rich-editor-node-view.tsx": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -14053,10 +14446,18 @@ "repository": "https://github.com/longbridge/nsh", "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" }, + "tests/compat/cases/base/base-rich-editor-table-full-width.tsx": { + "repository": "https://github.com/longbridge/nsh", + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" + }, "tests/compat/cases/base/base-rich-editor-tables.tsx": { "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" }, + "tests/compat/cases/base/base-rich-editor-task-checkmark.tsx": { + "repository": "https://github.com/longbridge/nsh", + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" + }, "tests/compat/cases/base/base-rich-editor-view.tsx": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -14071,7 +14472,7 @@ }, "tests/compat/cases/base/base-select.tsx": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "tests/compat/cases/base/base-selectable-view.tsx": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", "tests/compat/cases/base/base-set-theme.tsx": { @@ -14080,7 +14481,7 @@ }, "tests/compat/cases/base/base-slider.tsx": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "tests/compat/cases/base/base-split-view.tsx": { "repository": "https://github.com/longbridge/nsh", @@ -14154,7 +14555,10 @@ "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" }, - "tests/compat/cases/base/script.txt": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "tests/compat/cases/base/script.txt": { + "repository": "https://github.com/longbridge/nsh", + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" + }, "tests/compat/cases/browser/App.tsx": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -14221,7 +14625,7 @@ }, "tests/compat/cases/core/App.tsx": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "tests/compat/cases/core/asset-imports.tsx": { "repository": "https://github.com/longbridge/nsh", @@ -14307,6 +14711,10 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, + "tests/compat/cases/core/core-select-all.tsx": { + "repository": "https://github.com/longbridge/nsh", + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" + }, "tests/compat/cases/core/core-shader-effects.tsx": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -14333,7 +14741,7 @@ }, "tests/compat/cases/core/script.txt": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "tests/compat/cases/core/shaders-available.tsx": { "repository": "https://github.com/longbridge/nsh", @@ -14377,7 +14785,7 @@ }, "tests/compat/cases/desktop/script.txt": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "tests/compat/cases/desktop/scrollbar-hover.tsx": { "repository": "https://github.com/longbridge/nsh", @@ -14389,7 +14797,7 @@ }, "tests/compat/cases/desktop/window-access.tsx": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "tests/compat/cases/desktop/window-element.tsx": { "repository": "https://github.com/longbridge/nsh", @@ -14601,7 +15009,7 @@ }, "tests/compat/cases/modules/App.tsx": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "tests/compat/cases/modules/locales/app.yml": { "repository": "https://github.com/longbridge/nsh", @@ -14673,7 +15081,7 @@ }, "tests/compat/cases/modules/mod-mobile.tsx": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "tests/compat/cases/modules/mod-notifications.tsx": { "repository": "https://github.com/longbridge/nsh", @@ -14687,10 +15095,6 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, - "tests/compat/cases/modules/mod-share.tsx": { - "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" - }, "tests/compat/cases/modules/mod-standard-access.tsx": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -14717,7 +15121,7 @@ }, "tests/compat/cases/modules/script.txt": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "tests/compat/cases/modules/sounds/click.wav": { "repository": "https://github.com/longbridge/nsh", @@ -15154,7 +15558,7 @@ }, "website/demos/el-date-picker.tsx": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "website/demos/el-dialog.tsx": { "repository": "https://github.com/longbridge/nsh", @@ -15294,7 +15698,7 @@ }, "website/demos/el-slider.tsx": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "website/demos/el-split-view.tsx": { "repository": "https://github.com/longbridge/nsh", @@ -15434,7 +15838,7 @@ }, "website/demos/palette.ts": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "website/demos/text-view.tsx": { "repository": "https://github.com/longbridge/nsh", @@ -15454,11 +15858,11 @@ }, "website/docs/android.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "website/docs/animation.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, "website/docs/app-updates.md": { "repository": "https://github.com/longbridge/nsh", @@ -15472,7 +15876,10 @@ "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" }, - "website/docs/cli.md": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "website/docs/cli.md": { + "repository": "https://github.com/longbridge/nsh", + "revision": "bdba103fd31a22a188bebd6b19df54a99204bb0a" + }, "website/docs/coding-guides.md": { "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" @@ -15495,7 +15902,7 @@ }, "website/docs/device-and-environment.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, "website/docs/embedding.md": { "repository": "https://github.com/longbridge/nsh", @@ -15519,11 +15926,11 @@ }, "website/docs/gpui.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "website/docs/i18n.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "website/docs/images-and-assets.md": { "repository": "https://github.com/longbridge/nsh", @@ -15535,11 +15942,11 @@ }, "website/docs/installation.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "website/docs/ios.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "website/docs/jsx-and-components.md": { "repository": "https://github.com/longbridge/nsh", @@ -15551,13 +15958,16 @@ }, "website/docs/linux.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "website/docs/lists.md": { "repository": "https://github.com/longbridge/nsh", "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" }, - "website/docs/macos.md": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "website/docs/macos.md": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, "website/docs/native-components.md": { "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" @@ -15572,7 +15982,7 @@ }, "website/docs/nshm.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "website/docs/ota-updates.md": { "repository": "https://github.com/longbridge/nsh", @@ -15580,7 +15990,7 @@ }, "website/docs/packaging.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "bdba103fd31a22a188bebd6b19df54a99204bb0a" }, "website/docs/performance-report.md": { "repository": "https://github.com/longbridge/nsh", @@ -15592,7 +16002,7 @@ }, "website/docs/platform-extensions.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "website/docs/platform-specific.md": { "repository": "https://github.com/longbridge/nsh", @@ -15609,19 +16019,19 @@ }, "website/docs/reactivity.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, "website/docs/rust.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "website/docs/sandbox-and-capabilities.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "website/docs/scrolling.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, "website/docs/signed-packages.md": { "repository": "https://github.com/longbridge/nsh", @@ -15637,7 +16047,7 @@ }, "website/docs/testing-and-trace.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, "website/docs/text.md": { "repository": "https://github.com/longbridge/nsh", @@ -15645,18 +16055,24 @@ }, "website/docs/touch-and-gestures.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, "website/docs/tui.md": { "repository": "https://github.com/longbridge/nsh", "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" }, - "website/docs/web-view-and-video.md": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "website/docs/web-view-and-video.md": { + "repository": "https://github.com/longbridge/nsh", + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" + }, "website/docs/web.md": { "repository": "https://github.com/longbridge/nsh", "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" }, - "website/docs/windows.md": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "website/docs/windows.md": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, "website/elements/accordion.md": { "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" @@ -15675,11 +16091,11 @@ }, "website/elements/calendar.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "website/elements/canvas.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "website/elements/carousel.md": { "repository": "https://github.com/longbridge/nsh", @@ -15711,11 +16127,11 @@ }, "website/elements/data-table.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "website/elements/date-picker.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "website/elements/dialog.md": { "repository": "https://github.com/longbridge/nsh", @@ -15727,7 +16143,7 @@ }, "website/elements/dock.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "website/elements/editor.md": { "repository": "https://github.com/longbridge/nsh", @@ -15751,7 +16167,7 @@ }, "website/elements/input.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "website/elements/keyboard.md": { "repository": "https://github.com/longbridge/nsh", @@ -15776,7 +16192,7 @@ }, "website/elements/otp-input.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "website/elements/overlay.md": { "repository": "https://github.com/longbridge/nsh", @@ -15806,7 +16222,10 @@ "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" }, - "website/elements/rich-editor.md": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "website/elements/rich-editor.md": { + "repository": "https://github.com/longbridge/nsh", + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" + }, "website/elements/safe-area.md": { "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" @@ -15821,7 +16240,7 @@ }, "website/elements/select.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "website/elements/shader.md": { "repository": "https://github.com/longbridge/nsh", @@ -15833,7 +16252,7 @@ }, "website/elements/slider.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "website/elements/split-view.md": { "repository": "https://github.com/longbridge/nsh", @@ -15855,7 +16274,10 @@ "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" }, - "website/elements/text-selection.md": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "website/elements/text-selection.md": { + "repository": "https://github.com/longbridge/nsh", + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" + }, "website/elements/text-view.md": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", "website/elements/text.md": { "repository": "https://github.com/longbridge/nsh", @@ -15896,7 +16318,7 @@ }, "website/elements/web-view.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "website/modules/globals.md": { "repository": "https://github.com/longbridge/nsh", @@ -15908,7 +16330,7 @@ }, "website/modules/nsh-base.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "website/modules/nsh-canvas.md": { "repository": "https://github.com/longbridge/nsh", @@ -15916,11 +16338,11 @@ }, "website/modules/nsh-desktop.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, "website/modules/nsh-i18n.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "website/modules/nsh-image.md": { "repository": "https://github.com/longbridge/nsh", @@ -15932,11 +16354,11 @@ }, "website/modules/nsh-mobile.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "website/modules/nsh-updater.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "website/modules/nsh-video.md": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", "website/modules/nsh-web.md": { @@ -15949,11 +16371,11 @@ }, "website/modules/nsh.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, "website/modules/standard-modules.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "website/modules/style-reference.md": { "repository": "https://github.com/longbridge/nsh", @@ -16151,6 +16573,10 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, + "website/src/components/Analytics.astro": { + "repository": "https://github.com/longbridge/nsh", + "revision": "c4e4e7ae3d2dbb4f3a79eeba393a00493e645dd6" + }, "website/src/components/Apps.astro": { "repository": "https://github.com/longbridge/nsh", "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" @@ -16289,12 +16715,16 @@ }, "website/src/layouts/BaseLayout.astro": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "c4e4e7ae3d2dbb4f3a79eeba393a00493e645dd6" }, "website/src/layouts/DocsLayout.astro": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, + "website/src/lib/analytics.ts": { + "repository": "https://github.com/longbridge/nsh", + "revision": "c4e4e7ae3d2dbb4f3a79eeba393a00493e645dd6" + }, "website/src/lib/code-tabs-client.ts": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -16339,6 +16769,14 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, + "website/src/lib/nsmetry/core.ts": { + "repository": "https://github.com/longbridge/nsh", + "revision": "c4e4e7ae3d2dbb4f3a79eeba393a00493e645dd6" + }, + "website/src/lib/nsmetry/index.ts": { + "repository": "https://github.com/longbridge/nsh", + "revision": "c4e4e7ae3d2dbb4f3a79eeba393a00493e645dd6" + }, "website/src/lib/play-dev.js": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -16625,11 +17063,11 @@ }, "website/zh-CN/docs/android.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "website/zh-CN/docs/animation.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, "website/zh-CN/docs/app-updates.md": { "repository": "https://github.com/longbridge/nsh", @@ -16643,7 +17081,10 @@ "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" }, - "website/zh-CN/docs/cli.md": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "website/zh-CN/docs/cli.md": { + "repository": "https://github.com/longbridge/nsh", + "revision": "bdba103fd31a22a188bebd6b19df54a99204bb0a" + }, "website/zh-CN/docs/coding-guides.md": { "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" @@ -16666,7 +17107,7 @@ }, "website/zh-CN/docs/device-and-environment.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, "website/zh-CN/docs/embedding.md": { "repository": "https://github.com/longbridge/nsh", @@ -16690,11 +17131,11 @@ }, "website/zh-CN/docs/gpui.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "website/zh-CN/docs/i18n.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "website/zh-CN/docs/images-and-assets.md": { "repository": "https://github.com/longbridge/nsh", @@ -16706,11 +17147,11 @@ }, "website/zh-CN/docs/installation.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "website/zh-CN/docs/ios.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "website/zh-CN/docs/jsx-and-components.md": { "repository": "https://github.com/longbridge/nsh", @@ -16722,13 +17163,16 @@ }, "website/zh-CN/docs/linux.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "website/zh-CN/docs/lists.md": { "repository": "https://github.com/longbridge/nsh", "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" }, - "website/zh-CN/docs/macos.md": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "website/zh-CN/docs/macos.md": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, "website/zh-CN/docs/native-components.md": { "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" @@ -16743,7 +17187,7 @@ }, "website/zh-CN/docs/nshm.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "website/zh-CN/docs/ota-updates.md": { "repository": "https://github.com/longbridge/nsh", @@ -16751,7 +17195,7 @@ }, "website/zh-CN/docs/packaging.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "bdba103fd31a22a188bebd6b19df54a99204bb0a" }, "website/zh-CN/docs/performance-report.md": { "repository": "https://github.com/longbridge/nsh", @@ -16763,7 +17207,7 @@ }, "website/zh-CN/docs/platform-extensions.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "website/zh-CN/docs/platform-specific.md": { "repository": "https://github.com/longbridge/nsh", @@ -16780,15 +17224,15 @@ }, "website/zh-CN/docs/reactivity.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, "website/zh-CN/docs/rust.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "website/zh-CN/docs/sandbox-and-capabilities.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "website/zh-CN/docs/scrolling.md": { "repository": "https://github.com/longbridge/nsh", @@ -16808,7 +17252,7 @@ }, "website/zh-CN/docs/testing-and-trace.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, "website/zh-CN/docs/text.md": { "repository": "https://github.com/longbridge/nsh", @@ -16816,18 +17260,24 @@ }, "website/zh-CN/docs/touch-and-gestures.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, "website/zh-CN/docs/tui.md": { "repository": "https://github.com/longbridge/nsh", "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" }, - "website/zh-CN/docs/web-view-and-video.md": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "website/zh-CN/docs/web-view-and-video.md": { + "repository": "https://github.com/longbridge/nsh", + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" + }, "website/zh-CN/docs/web.md": { "repository": "https://github.com/longbridge/nsh", "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" }, - "website/zh-CN/docs/windows.md": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "website/zh-CN/docs/windows.md": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, "website/zh-CN/elements/accordion.md": { "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" @@ -16846,7 +17296,7 @@ }, "website/zh-CN/elements/calendar.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "website/zh-CN/elements/canvas.md": { "repository": "https://github.com/longbridge/nsh", @@ -16882,11 +17332,11 @@ }, "website/zh-CN/elements/data-table.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "website/zh-CN/elements/date-picker.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "website/zh-CN/elements/dialog.md": { "repository": "https://github.com/longbridge/nsh", @@ -16898,7 +17348,7 @@ }, "website/zh-CN/elements/dock.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "website/zh-CN/elements/editor.md": { "repository": "https://github.com/longbridge/nsh", @@ -16922,7 +17372,7 @@ }, "website/zh-CN/elements/input.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "website/zh-CN/elements/keyboard.md": { "repository": "https://github.com/longbridge/nsh", @@ -16947,7 +17397,7 @@ }, "website/zh-CN/elements/otp-input.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "website/zh-CN/elements/overlay.md": { "repository": "https://github.com/longbridge/nsh", @@ -16977,7 +17427,10 @@ "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" }, - "website/zh-CN/elements/rich-editor.md": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "website/zh-CN/elements/rich-editor.md": { + "repository": "https://github.com/longbridge/nsh", + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" + }, "website/zh-CN/elements/safe-area.md": { "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" @@ -16992,7 +17445,7 @@ }, "website/zh-CN/elements/select.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "website/zh-CN/elements/shader.md": { "repository": "https://github.com/longbridge/nsh", @@ -17004,7 +17457,7 @@ }, "website/zh-CN/elements/slider.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "website/zh-CN/elements/split-view.md": { "repository": "https://github.com/longbridge/nsh", @@ -17026,7 +17479,10 @@ "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" }, - "website/zh-CN/elements/text-selection.md": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "website/zh-CN/elements/text-selection.md": { + "repository": "https://github.com/longbridge/nsh", + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" + }, "website/zh-CN/elements/text-view.md": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", "website/zh-CN/elements/text.md": { "repository": "https://github.com/longbridge/nsh", @@ -17067,7 +17523,7 @@ }, "website/zh-CN/elements/web-view.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "website/zh-CN/modules/globals.md": { "repository": "https://github.com/longbridge/nsh", @@ -17079,7 +17535,7 @@ }, "website/zh-CN/modules/nsh-base.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "website/zh-CN/modules/nsh-canvas.md": { "repository": "https://github.com/longbridge/nsh", @@ -17087,11 +17543,11 @@ }, "website/zh-CN/modules/nsh-desktop.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, "website/zh-CN/modules/nsh-i18n.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "website/zh-CN/modules/nsh-image.md": { "repository": "https://github.com/longbridge/nsh", @@ -17103,11 +17559,11 @@ }, "website/zh-CN/modules/nsh-mobile.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "website/zh-CN/modules/nsh-updater.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "website/zh-CN/modules/nsh-video.md": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", "website/zh-CN/modules/nsh-web.md": { @@ -17120,11 +17576,11 @@ }, "website/zh-CN/modules/nsh.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "6556aa6b89a02cc867fa518f9153526ba5bf7eac" }, "website/zh-CN/modules/standard-modules.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "website/zh-CN/modules/style-reference.md": { "repository": "https://github.com/longbridge/nsh", diff --git a/third-party/nsh/website/demos/el-date-picker.tsx b/third-party/nsh/website/demos/el-date-picker.tsx index 913ae79ff75..ab07956e8f5 100644 --- a/third-party/nsh/website/demos/el-date-picker.tsx +++ b/third-party/nsh/website/demos/el-date-picker.tsx @@ -64,9 +64,11 @@ function App() { { label: "Tomorrow", value: iso(addDays(today, 1)) }, { label: "Next Monday", value: iso(monday) }, ]; + // Each with the dates it stands for under its label. + const span = (label: string, start: Date, end: Date): DateRangePreset => ({ label, value: [iso(start), iso(end)], description: `${monthDay(iso(start))} – ${monthDay(iso(end))}` }); const stays: DateRangePreset[] = [ - { label: "This week", value: [iso(today), iso(addDays(today, (7 - today.getDay()) % 7))] }, - { label: "Next 7 nights", value: [iso(today), iso(addDays(today, 7))] }, + span("This week", today, addDays(today, (7 - today.getDay()) % 7)), + span("Next 7 nights", today, addDays(today, 7)), ]; const stayTitle = () => { const r = stay(); diff --git a/third-party/nsh/website/demos/el-slider.tsx b/third-party/nsh/website/demos/el-slider.tsx index ae609963dba..23715f70ec3 100644 --- a/third-party/nsh/website/demos/el-slider.tsx +++ b/third-party/nsh/website/demos/el-slider.tsx @@ -1,6 +1,6 @@ import { type JSX, mount, signal, Text, View } from "nsh"; import { Slider, type SliderValue } from "nsh/base"; -import { desktop, Log, Panel, sliderFill, sliderLook, sliderValueClass, sliderValueStyle, Split, ui, controlSize, plainRow, RowLabel, sectionSurface } from "./palette"; +import { desktop, Log, Panel, sliderBubbleClass, sliderBubbleText, sliderFill, sliderLook, sliderValueClass, sliderValueStyle, Split, ui, controlSize, plainRow, RowLabel, sectionSurface } from "./palette"; // The look is the shared layer's `sliderLook` and `sliderFill` (BJORK UI's // slider in the palette's tones): an 8-point rail, a fill that deepens at its @@ -8,7 +8,8 @@ import { desktop, Log, Panel, sliderFill, sliderLook, sliderValueClass, sliderVa // brightens under the pointer and while dragged, the keyboard's focus ring // around the thumb, and 35% when disabled. The spread holds only what never // changes; the fill follows the value as a prop of its own. The demo shows a slider with its value column, a -// bare one, a range, a disabled one and vertical bands, each named above it. +// bare one, a range whose thumbs carry a value bubble (`renderThumb`: shown under the pointer, while dragged and with +// the keyboard's focus), a disabled one and vertical bands, each named above it. const show = (v: SliderValue) => (typeof v === "number" ? `${v}` : `${v[0]}–${v[1]}`); const clock = (seconds: number) => `${Math.floor(seconds / 60)}:${String(Math.round(seconds) % 60).padStart(2, "0")}`; const LENGTH = 225; @@ -91,6 +92,11 @@ function App() { startAccessibilityLabel="Minimum price" accessibilityLabel="Maximum price" rangeStyle={sliderFill(price()[0] / 1000, price()[1] / 1000)} + renderThumb={({ start }) => ( + + {`$${price()[start ? 0 : 1]}`} + + )} {...sliderLook()} /> diff --git a/third-party/nsh/website/demos/palette.ts b/third-party/nsh/website/demos/palette.ts index b2fb5423512..02fcdeb1673 100644 --- a/third-party/nsh/website/demos/palette.ts +++ b/third-party/nsh/website/demos/palette.ts @@ -1,5 +1,5 @@ // Documentation demos use the repository's internal shared example UI. -export { ui, tint, hoverFill, focusRing, desktop, wide, size, button, buttonText, buttonGlyph, buttonLabel, buttonLook, buttonSizes, iconButtonGlyph, iconButtonLook, toggleGlyph, toggleLabel, toggleLook, toggleSizes, toolbarRule, toolbarTrack, controlSize, density, insetSurface, listRow, plainRow, RowDivider, RowLabel, sectionSurface, CheckboxMark, checkboxLook, choiceTileLook, RadioRing, segmentedLook, TabTitle, tabsLook, underlineTabsLook, field, fieldLook, fieldSize, fieldText, inputLook, numberInputClasses, numberInputSteps, numberInputText, NumberStep, otpCellLook, otpCells, timeFieldClass, calendarLook, CalendarItem, Chevron, clearButtonLook, ComboToggle, comboboxLook, datePickerLook, DateTrigger, ListboxEmpty, listboxFooter, ListboxHeader, listboxPopup, listboxPopupStarting, listboxProps, listboxSearch, OptionRow, optionClass, Picker, pickerLook, TimeSegment, switchHitSlop, switchLook, type SwitchLook, type SwitchSize, type ButtonKind, type ButtonLookOptions, type ButtonOptions, type ButtonSize, type IconButtonLookOptions, type ToggleLookOptions, type ToggleSize, type ToolbarTrackOptions, type FieldOptions, menuHighlight, menuItemGlyph, menuItemLabel, menuItemLook, menuItemNote, menuItemSize, menuPressed, menuSeparator, menuPopup, MenuLabel, SubmenuBack, SubmenuRow, type MenuItemLookOptions, type MenuPopupOptions, backdrop, dialogCard, dialogText, dialogTitle, popoverLook, sheetGrabber, sheetPanel, toastActionLabel, toastActionLook, toastCloseLook, toastLook, toastText, toastTitle, tooltipLook, tooltipNote, tooltipText, type PopoverLookOptions, type SheetSide, pressSink, Stage, Inspector, Split, Panel, Log, Segmented, dataTableClasses, dataTableFitPadding, sliderFill, sliderLook, sliderValueClass, sliderValueStyle, type SliderLookOptions } from "../../examples/nsh-gallery-ui/demo"; +export { ui, tint, hoverFill, focusRing, desktop, wide, size, button, buttonText, buttonGlyph, buttonLabel, buttonLook, buttonSizes, iconButtonGlyph, iconButtonLook, toggleGlyph, toggleLabel, toggleLook, toggleSizes, toolbarRule, toolbarTrack, controlSize, density, insetSurface, listRow, plainRow, RowDivider, RowLabel, sectionSurface, CheckboxMark, checkboxLook, choiceTileLook, RadioRing, segmentedLook, TabTitle, tabsLook, underlineTabsLook, field, fieldLook, fieldSize, fieldText, inputLook, numberInputClasses, numberInputSteps, numberInputText, NumberStep, otpCellLook, otpCells, timeFieldClass, calendarLook, CalendarItem, Chevron, clearButtonLook, ComboToggle, comboboxLook, datePickerLook, DateTrigger, ListboxEmpty, listboxFooter, ListboxHeader, listboxPopup, listboxPopupStarting, listboxProps, listboxSearch, OptionRow, optionClass, Picker, pickerLook, TimeSegment, switchHitSlop, switchLook, type SwitchLook, type SwitchSize, type ButtonKind, type ButtonLookOptions, type ButtonOptions, type ButtonSize, type IconButtonLookOptions, type ToggleLookOptions, type ToggleSize, type ToolbarTrackOptions, type FieldOptions, menuHighlight, menuItemGlyph, menuItemLabel, menuItemLook, menuItemNote, menuItemSize, menuPressed, menuSeparator, menuPopup, MenuLabel, SubmenuBack, SubmenuRow, type MenuItemLookOptions, type MenuPopupOptions, backdrop, dialogCard, dialogText, dialogTitle, popoverLook, sheetGrabber, sheetPanel, toastActionLabel, toastActionLook, toastCloseLook, toastLook, toastText, toastTitle, tooltipLook, tooltipNote, tooltipText, type PopoverLookOptions, type SheetSide, pressSink, Stage, Inspector, Split, Panel, Log, Segmented, dataTableClasses, dataTableFitPadding, sliderBubbleClass, sliderBubbleText, sliderFill, sliderLook, sliderValueClass, sliderValueStyle, type SliderLookOptions } from "../../examples/nsh-gallery-ui/demo"; export { CheckMark, Icon, type IconName } from "../../examples/nsh-gallery-ui/icons"; export { TreeRow, treeIndent, treeItemClass } from "../../examples/nsh-gallery-ui/tree"; export { CommandEmpty, CommandHeading, CommandKeys, CommandRow, commandClasses, Kbd } from "../../examples/nsh-gallery-ui/command"; diff --git a/third-party/nsh/website/docs/android.md b/third-party/nsh/website/docs/android.md index 97365438078..1c2ea6c694a 100644 --- a/third-party/nsh/website/docs/android.md +++ b/third-party/nsh/website/docs/android.md @@ -106,7 +106,9 @@ cargo xtask android-embed # writes dist/nsh/embed/android/{nsh,nsh-dev}.aar The AAR holds the Java runtime and `libnsh.so` for `arm64-v8a`, `armeabi-v7a` and `x86_64`, with their symbols: the app's Gradle build strips them when it packages the app and keeps the symbols for its crash reports. It declares the -`INTERNET` and `ACCESS_NETWORK_STATE` permissions and needs **API 26** (Android 8) or newer. It carries its R8 rules (`proguard.txt`), which a +`INTERNET` and `ACCESS_NETWORK_STATE` permissions, and the signature permission +`${applicationId}.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION` (androidx's name, so the two merge) that keeps the receivers +registered at run time to the app before Android 13, and needs **API 26** (Android 8) or newer. It carries its R8 rules (`proguard.txt`), which a minified build applies on its own: the native library finds the runtime's classes by name, so `com.longbridge.nsh` stays as it is. @@ -412,11 +414,23 @@ result code and the intent the other app returned), across configuration changes whether an installed app answers the intent. Android 11+ shows an app only the apps its manifest queries: a crate declares its queries in its `Cargo.toml` ([What the packaged app needs](./nshm.md#what-the-packaged-app-needs)). `output_file(env, name)` makes a new file in the app's cache with a `content://` URI the other app writes through the -app's file provider (`MediaStore.EXTRA_OUTPUT`), and `picker::prepare_image(path, name, &request)` prepares an image +app's file provider (`MediaStore.EXTRA_OUTPUT`); `content_uri(env, path)` is the `content://` URI and MIME type another +app reads an existing file of the app's own storage through (`EXTRA_STREAM` of a share or an "open with" intent), +`None` for a file outside it. `picker::prepare_image(path, name, &request)` prepares an image file as `Picker.pickImages` does. `with_env(f)` runs `f` with the thread's JNI environment (code of the app and its nshm; other crates reach the VM through `ndk-context` above) and returns its result, or the JNI error (a Java exception is logged and cleared). A request made while the app is in the background fails with `ActivityError::NoActivity`. `nsh-extra`'s camera (`crates/nsh-extra/src/camera/android.rs`) uses all of them. +## Presenting from Rust + +Rust code that shows system UI (a popup menu, a dialog, a share sheet) shows it from the surface whose code asked. In +a UI-thread task (`run_on_main_thread`), `nsh::presenting_activity(env)` is the activity that surface's view is in, to +show UI over when no element anchors it (`None` when the view is in no activity that can show anything), and +`nsh::native_view(env, node)` is the `View` of an element of that surface (the node of its `ref`, a `NodeRef` argument +of a module function; `ROOT_ID` for the surface's root view), in the surface or one of its modals: the anchor of a +popup that belongs to the element. Both give a global reference, `None` outside such a task, or the JNI error. Take +them while the task runs. They are for anchoring and presenting system UI only: a module never changes, re-parents, restyles or removes a view NSH owns. + ## Java listeners in Rust An Android API that calls back through an interface (a `Runnable` posted to the UI thread, a framework's @@ -430,6 +444,18 @@ listens to `SpeechRecognizer` this way. Only interfaces can be implemented so: a (`java.lang.Boolean` for `boolean`): returning `None` there, or a call after the `Proxy` is dropped, throws a `NullPointerException` in Java. +## Broadcasts in Rust + +An Android API that answers with a broadcast (the app a chooser's `IntentSender` reports the user chose, a +`PendingIntent` an alarm or a notification sends back, a finished download) is heard by +`receiver::register(env, action, handler)`: a receiver of that action, registered on the application, whose +broadcasts reach `handler` (the broadcast `Intent`) on the UI thread, so the crate ships no `BroadcastReceiver` +subclass. It is not exported: it hears the app's own broadcasts (aim the `PendingIntent`'s intent at the app's +package) and the system's, never other apps'. On Android 12 and below that takes a signature permission, which the +runtime's manifest declares, so a broadcast another system app sends as itself (`DOWNLOAD_COMPLETE`, from the download +provider) may not arrive there. Keep the `Receiver` it returns while the broadcast may come; dropping it unregisters +it. + ## Notifications from other code [`Notifications`](../modules/nsh.md#notifications) reports presses of the notifications the app showed. Notifications diff --git a/third-party/nsh/website/docs/animation.md b/third-party/nsh/website/docs/animation.md index 4b617ea2ef7..8a21f68e1c5 100644 --- a/third-party/nsh/website/docs/animation.md +++ b/third-party/nsh/website/docs/animation.md @@ -959,7 +959,7 @@ opacity.timing_with(1.0, Timing::new(600.0, Easing::Linear).frame_rate(30.0)); glow.keyframes([Keyframe::new(0.4), Keyframe::new(1.0), Keyframe::new(0.4)], KeyframeTiming::new(1600.0).infinite().frame_rate(24.0)); ``` -The screen runs at the highest rate anything on it needs: an animation without `frameRate`, a transition, a scroll, a gesture or a `requestAnimationFrame` loop brings it back to the full rate while it runs, and a composite runs at the highest rate of its steps. The animation's timing is the same at any rate: it ends when it would at the full rate. macOS and iOS lower the screen's rate for these requests; the other platforms run every animation at the screen's rate. +The screen runs at the highest rate anything on it needs: an animation without `frameRate`, a transition, a scroll, a gesture or a `requestAnimationFrame` loop brings it back to the full rate while it runs, and a composite runs at the highest rate of its steps. The animation's timing is the same at any rate: it ends when it would at the full rate. macOS and iOS lower the screen's rate for these requests, and Android skips intermediate animation frames so views only redraw at the requested rate; the other platforms run every animation at the screen's rate. ## Reduced motion diff --git a/third-party/nsh/website/docs/cli.md b/third-party/nsh/website/docs/cli.md index 99055d7fa33..80a8fab1e3e 100644 --- a/third-party/nsh/website/docs/cli.md +++ b/third-party/nsh/website/docs/cli.md @@ -135,10 +135,10 @@ Use `nsh dev --server-only` with an app that embeds the development SDK (`Native ## nsh test ```sh -nsh test [PATH] [--filter ] [--release] [--trace] [--fps] [--junit ] [--jobs ] [--target ] [--browser ] [--web-host ] [--device ] [--display ] [--foreground] +nsh test [PATH] [--filter ] [--release] [--trace] [--fps] [--junit ] [--jobs ] [--target ] [--browser ] [--web-host ] [--device ] [--display ] [--foreground] [--attach[=]] ``` -Runs the app's tests headless ([Testing](./testing-and-trace.md)): the test files (`*.test.tsx`, `*.test.ts`, importing `nsh/test`) in `PATH`, a directory (default: the current one; hidden directories, `node_modules` and `target` are skipped), or the test file `PATH`. Given a directory of an app with Rust crates of its own (`nsh.json` `"rust"`: a Rust app or a TSX app with a crate), it first runs `cargo test` for each crate in the directory, in the crate's own directory, and shows and counts each Rust test with the TypeScript tests, under the file of its test target (`src/lib.rs › tests::adds`); a Rust app with only Rust tests is tested this way too. Each test file runs on an engine of its own and each app its tests open on another, fresh one. It prints a line per test, and for a failure what was thrown, where in the test file and the texts on screen; any failure makes it exit with a non-zero code. Given the app's entry (`nsh test App.tsx`; a Rust app's: `nsh test nsh.json`), it opens the app on the network, lets it run for 1.2 s and takes the steps standard input gives (`await app.press("Add")`, with `app` the app). A TSX app runs in the CLI's own process; an app with Rust crates of its own runs in a headless runner built with them, which the CLI builds the entries for. Headless runs behave as iOS unless a test opens the app as Android (`open`'s `platform`): `platform.os` is `"ios"`, and `ios:` classes and `ios={{…}}` props apply. +Runs the app's tests headless ([Testing](./testing-and-trace.md)): the test files (`*.test.tsx`, `*.test.ts`, importing `nsh/test`) in `PATH`, a directory (default: the current one; hidden directories, `node_modules`, `target` and what Git ignores are skipped, unless `PATH` is that directory), or the test file `PATH`. Given a directory of an app with Rust crates of its own (`nsh.json` `"rust"`: a Rust app or a TSX app with a crate), it first runs `cargo test` for each crate in the directory, in the crate's own directory, and shows and counts each Rust test with the TypeScript tests, under the file of its test target (`src/lib.rs › tests::adds`); a Rust app with only Rust tests is tested this way too. Each test file runs on an engine of its own and each app its tests open on another, fresh one. It prints a line per test, and for a failure what was thrown, where in the test file and the texts on screen; any failure makes it exit with a non-zero code. Given the app's entry (`nsh test App.tsx`; a Rust app's: `nsh test nsh.json`), it opens the app on the network, lets it run for 1.2 s and takes the steps standard input gives (`await app.press("Add")`, with `app` the app). A TSX app runs in the CLI's own process; an app with Rust crates of its own runs in a headless runner built with them, which the CLI builds the entries for. Headless runs behave as iOS unless a test opens the app as Android (`open`'s `platform`): `platform.os` is `"ios"`, and `ios:` classes and `ios={{…}}` props apply. ```text ✓ App.test.tsx › counts taps (321ms) @@ -155,9 +155,10 @@ Runs the app's tests headless ([Testing](./testing-and-trace.md)): the test file | `-j, --jobs ` | How many test files run at once, each on its own engine (default: the number of cores). Results still show file by file, in order. Headless runs only: with `--target` or `--trace` files run one at a time. | | `--target ` | Runs the apps the tests open on this platform's development host instead of headless (`macos`, `linux`, `windows`, `gpui`, `tui`, `web`, `ios` and `android`; `tui` runs them in an in-memory terminal, `web` in a headless Chrome, Edge or Chromium): the steps act with the platform's own input ([Testing](./testing-and-trace.md#on-a-real-platform)), and `open` checks its options against the platform, rejecting one it cannot honor (`ERR_NSH_TEST_UNSUPPORTED`: `width` and `height` on iOS and Android, a `platform` of another kind of device). The crates' Rust tests run on this machine, in runs without `--target`. | | `--browser ` | The Chrome, Edge or Chromium executable `--target web` runs the apps in (default: the one installed on this machine). | -| `--device ` | With `--target ios`: the simulator the apps run in, by name (`"iPhone 16 Pro"`) or UDID. Default: a booted one, else the newest iPhone, which is booted. With `--target android`: the device or emulator, by its serial (as `adb devices` lists it). Default: the one `ANDROID_SERIAL` names, else the first one. | +| `--device ` | With `--target ios`: the simulator the apps run in, by name (`"iPhone 16 Pro"`) or UDID. Default: a booted one, else the newest iPhone, which is booted. With `--target android`: the device or emulator, by its serial (as `adb devices` lists it). Default: the one `ANDROID_SERIAL` names, else the first one. With `--attach`: the session's host that takes the steps, by its name as the session's terminal shows it or by its platform as `--target` names it (`gpui`). Default: the one that connected last. | | `--display ` | With `--target macos` or `gpui`: the display the apps' windows open on, centered: `1` is the primary display (on macOS the one with the menu bar), `2` the next, and so on; a number with no display opens them on the main one. By default they open on a secondary display (the first besides the primary one, not a mirror of it), so a test run keeps to a screen of its own, and on the primary one when it is the only one. The tests run the same on every display. | | `--foreground` | With `--target macos`, `windows`, `gpui` or `linux`: the apps become the active app, as they do for a user. By default they run in the background: their windows show, the keyboard stays with the app you type in, and the tests' clicks, keys and shortcuts go to the windows directly. On a Linux desktop the background keys are typed into the widgets, as on Wayland; a test of Tab, the arrow keys or an input method runs with `--foreground` there. On a display nobody types on (Xvfb), Linux apps run as in the foreground either way. A test that depends on the app being active (`lifecycle()` follows whether the app is active) or a measurement such as `examples/gallery/tools/perf.py` (which passes it) should run with it. | +| `--attach[=]` | Drives the app of a running `nsh run` or `nsh dev` session in its window, as it is, instead of opening one: the session on `PORT`, else the one running on this machine (this app's, when several run). Takes the steps of standard input, or a test file whose `open` attaches to the app; the app keeps running after. From this machine only ([Driving a running session](./testing-and-trace.md#driving-a-running-session)). | | `--web-host ` | The web page's host module the apps opened headless get (default: `nsh.json` `web.host`; it exports `createHost(player)`): it answers their [`host`](../modules/nsh.md#host) calls and its `player.hostEvent` reaches `host.on` ([Testing](./testing-and-trace.md#the-pages-host)). Headless runs only; `--target web` runs `nsh.json`'s `web.host`. | ## nsh check @@ -225,7 +226,7 @@ Builds an installable app in release mode. A Rust app (`nsh.json` `"root"`) is p | `--keystore ` | Android: release keystore. Default: the debug key in `~/.android/debug.keystore` (created if missing). | | `--key-alias ` | Android: key alias in the keystore. | | `--keystore-password ` | Android: keystore password. Also read from `NSH_KEYSTORE_PASSWORD`. | -| `--format ` | Android: `apk` (default) or `aab`, an Android App Bundle for Google Play, signed with `jarsigner`. Linux: `appimage` or `flatpak`, besides the directory and archive ([Packaging](./packaging.md#appimage-and-flatpak)). Not with `--run`. | +| `--format ` | Android: `apk` (default) or `aab`, an Android App Bundle for Google Play, signed with `jarsigner`. Linux: `appimage`, `flatpak`, `deb` or `rpm`, besides the directory and archive ([Packaging](./packaging.md#linux)). Not with `--run`. | | `--abi ` | Android: the ABIs of the APK (`arm64-v8a`, `armeabi-v7a`, `x86_64`), repeated or separated by commas. Default: `arm64-v8a` and `armeabi-v7a`, plus the device's with `--run`. | | `--arch ` | macOS: the processors the app runs on, `arm64` (Apple silicon), `x86_64` (Intel) or `universal` (both, in one executable). Default: this Mac's. A runner for another processor needs its Rust target (`rustup target add x86_64-apple-darwin`). | | `--run` | Install and launch the app afterwards: in the simulator (`ios-simulator`) or on the connected Android device; `macos`, `linux` and `windows` launch it; `web` serves the site on this machine at the address it prints. | @@ -304,7 +305,7 @@ nsh remove ... ## nsh component -Adds, removes or lists the runtimes installed next to an installed `nsh`: those of the platforms other than the one it runs on (`android`, `android-symbols`, `ios`, `web`, `gpui`, `tui`). A command that needs one adds it itself the first time ([Installation](./installation.md#components)). +Adds, removes or lists the runtimes installed next to an installed `nsh`: those of the platforms other than the one it runs on (`android`, `android-symbols`, `ios`, `web`, `gpui`, `tui`), and on Windows the linker `nsh package` uses (`windows-linker`). A command that needs one adds it itself the first time ([Installation](./installation.md#components)). ```sh nsh component list diff --git a/third-party/nsh/website/docs/device-and-environment.md b/third-party/nsh/website/docs/device-and-environment.md index 5b9882e94f6..ed8b718e1bf 100644 --- a/third-party/nsh/website/docs/device-and-environment.md +++ b/third-party/nsh/website/docs/device-and-environment.md @@ -601,7 +601,8 @@ if let Some(dir) = data_dir() { `app_info()` in Rust, `appInfo()` from `nsh` in TSX ([`appInfo`](../modules/nsh.md#appinfo)), is the app as it was built: its id, name, version and build number, and whether it is a development build. A package reports what `nsh package` names and versions it as, `--id`, `--name`, `--version` and `--build` included, with version `1.0.0` and -build `1` where nothing gives them; other builds report `nsh.json`'s, `None` where it leaves them out. `nsh run`, +build `1` where nothing gives them. In TSX, a signed package reports its header's, the release the device verified, +even when its bundle was built with others; other builds report `nsh.json`'s, `None` where it leaves them out. `nsh run`, `nsh dev` and `nsh test` make development builds of a Rust app; `nsh package` does not. `app_info()` is `None` in a TSX app, where JS's `appInfo()` reports it. diff --git a/third-party/nsh/website/docs/gpui.md b/third-party/nsh/website/docs/gpui.md index 18b5611624a..d461d1a6061 100644 --- a/third-party/nsh/website/docs/gpui.md +++ b/third-party/nsh/website/docs/gpui.md @@ -173,7 +173,11 @@ the view owns its host window (`AppView::own_window`), regardless of whether you `run_app` open a transparent window, so what the app leaves unpainted shows what is behind the window (desktop widgets, overlays). False by default. - `AppView::connect_dev_server(url, cx)` (feature `dev`) loads the app from `nsh dev` and reloads it as you edit, - with the error overlay over the view; `AppView::on_error` keeps hearing the app's errors. + with the error overlay over the view; `AppView::on_error` keeps hearing the app's errors. The app's logs + (`console.*`, uncaught exceptions, runtime warnings) reach the `nsh dev` terminal through the `log` crate: your + app has a logger of its own, so call `nsh_platform_gpui::dev::forward(record)` from its `log` and let `Info` + through (its `enabled` and `log::set_max_level`), or `console.log` never reaches it. Warnings and errors your app + logs under its own target show in that terminal too. - `AppView::on_app_error(|error| …)` hears the app's errors: `error.kind` (the app failed to load, an uncaught exception, the VM stopped), `error.is_fatal()` when no JS of the app runs again, `error.message`, `error.stack` and `error.package` (the id and build of the signed package it came from). `AppView::on_error` gets the same diff --git a/third-party/nsh/website/docs/i18n.md b/third-party/nsh/website/docs/i18n.md index 395dac49884..ea00f2ad946 100644 --- a/third-party/nsh/website/docs/i18n.md +++ b/third-party/nsh/website/docs/i18n.md @@ -110,6 +110,12 @@ t!("hello", locale = "ja"); Translations are ready before any of the app's modules runs, so `t` works at the top level of a module too (its result is then computed once). +- **Type safety**: when `locales/` exists, `nsh` generates `.nsh/types/nsh/translations.d.ts` so `nsh check` and editors + catch unknown keys and missing or misspelled `%{name}` parameters; `nsh check` also warns when a locale is missing keys + (taking regional subtag fallbacks into account) or uses mismatched `%{name}` placeholders. Apps without `locales/` keep the permissive + `string` signature unchanged. When `locales/` exists, passing a plain `string` variable as the key requires typing it + (as `TranslationKey` or a template-literal union like `` `status.${kind}` ``) or asserting it (`key as TranslationKey`). + ## The language the app shows By default the app's text shows in the user's language: the first of the user's preferred languages diff --git a/third-party/nsh/website/docs/installation.md b/third-party/nsh/website/docs/installation.md index 1b8a29ef022..f5a256d8f45 100644 --- a/third-party/nsh/website/docs/installation.md +++ b/third-party/nsh/website/docs/installation.md @@ -85,6 +85,7 @@ nsh component remove gpui | `web` | The web runtimes (`--target web`) | Every platform | | `gpui` | The [GPUI](./gpui.md) development host (`--target gpui`) | Every platform, built for it | | `tui` | The terminal development host (`--target tui`) | Every platform, built for it | +| `windows-linker` | The linker that gives a TSX app's executable only the parts of `nsh/base` it imports (`nsh package --target windows`) | Windows x86_64 | A component always comes from the same build as the CLI. `nsh update` adds the installed components again from the release it updates to. A nightly build's components are replaced every night, so a nightly `nsh` from an earlier night asks you to run `nsh update` first. @@ -200,6 +201,8 @@ git clone https://github.com/longbridge/nsh.git && cd nsh cargo build -p nsh-cli ``` +A CLI built into a target directory outside the checkout (`CARGO_TARGET_DIR`) uses NSH's released crates and runtimes, and says so. + The commands for the iOS and Android runtimes and the release runners are in the repository's [AGENTS.md](https://github.com/longbridge/nsh/blob/main/AGENTS.md#commands). ## Platform tools diff --git a/third-party/nsh/website/docs/ios.md b/third-party/nsh/website/docs/ios.md index 9f3e181da3d..0325ce1cd7e 100644 --- a/third-party/nsh/website/docs/ios.md +++ b/third-party/nsh/website/docs/ios.md @@ -464,9 +464,12 @@ app.onOpenURL = { url in Rust code that shows a system view controller (the camera, a share sheet) presents it over the surface whose code asked. In a main-thread task (`run_on_main_thread`), `nsh_platform_ios::presenting_controller(mtm)` is the top view -controller of that surface's window, else of the app's key window. `prepare_image(bytes, name, &request)` prepares -image bytes as `Picker.pickImages` does: upright, scaled and encoded as the request says. `nsh-extra`'s camera -(`crates/nsh-extra/src/camera/ios.rs`) uses both. +controller of that surface's window, else of the app's key window. `native_view(mtm, node)` is the `UIView` of an +element of that surface (the node of its `ref`, a `NodeRef` argument of a module function; `ROOT_ID` for the +surface's root view), in the surface or one of its modals: the source view of a popover that belongs to the element, +as a share sheet points at its button on an iPad. Take both while the task runs. They are for anchoring and presenting system UI only: a module never changes, re-parents, restyles or removes a view NSH owns. `prepare_image(bytes, name, &request)` +prepares image bytes as `Picker.pickImages` does: upright, scaled and encoded as the request says. `nsh-extra`'s +camera (`crates/nsh-extra/src/camera/ios.rs`) uses `presenting_controller` and `prepare_image`. ## Limits diff --git a/third-party/nsh/website/docs/linux.md b/third-party/nsh/website/docs/linux.md index b05447bd1ec..8997f914a12 100644 --- a/third-party/nsh/website/docs/linux.md +++ b/third-party/nsh/website/docs/linux.md @@ -199,6 +199,17 @@ Native components are registered with `AppView::register_component`; see [Native (`my_app::registry()`, which `#[native_module]` makes), so the TSX a view loads imports your Rust components and modules too. +## Presenting from Rust + +Rust code that shows system UI (a popover, a dialog, a file chooser) shows it from the surface whose code asked. In a +main-thread task (`run_on_main_thread`), `nsh_platform_linux::presenting_window()` is the window to make a dialog +transient for: the surface's visible window the user is in; `None` when the surface shows in no visible window. +`native_view(node)` is the GTK widget of an element of that surface (the node of its `ref`, a `NodeRef` argument of a +module function; `ROOT_ID` for the surface's root widget), in whatever window of the surface it is: the parent of a +popover that belongs to the element (unparent the popover once it closes, as NSH's own menus do). Take both while the +task runs. They are for anchoring and presenting system UI only: a module never changes, re-parents, restyles or +removes a widget NSH owns. + ## What differs on Linux The environment is a desktop's: the safe area and the keyboard height are 0, `idiom()` is the desktop diff --git a/third-party/nsh/website/docs/macos.md b/third-party/nsh/website/docs/macos.md index 4c68afe6e59..c9014505efa 100644 --- a/third-party/nsh/website/docs/macos.md +++ b/third-party/nsh/website/docs/macos.md @@ -100,7 +100,7 @@ the panel however the app is opened. Add this key through `nsh.json`'s `macos.in | `FPS` | Frames shown over the last second: display refreshes in which the app changed (an idle app reads low; that is not slowness). `max` is what the main thread could keep up with, then the display's rate (120 Hz on ProMotion screens). | | `TICK` | The gaps between display refreshes as they arrived (mean, p95) and `gap`, the p95 gap between shown frames: one refresh (8.3 ms at 120 Hz) when nothing is late. | | `MAIN` | Main-thread time per frame (applying the engine's changes, drawing text and canvases, animations, input), its 95th percentile, and `drop`: the share of frames that took longer than one refresh. | -| `JS` / `CORE` | Per commit: your code (handlers, timers, list rows) and NSH's core (layout, text, diffing); commits per second, native view changes per commit. | +| `JS` / `CORE` | Per commit, over the commits of the last 5 seconds: your code (handlers, timers, list rows) and NSH's core (layout, text, diffing); commits per second, native view changes per commit. | | `HOP` | How long changes wait between the engine thread and the main thread; how busy the engine thread is. | | `CPU` / `GPU` / `MEM` | The process: CPU (100% is one core), its GPU share, its memory footprint (Activity Monitor's figure). | @@ -313,6 +313,16 @@ Native components are registered with `AppView::register_component`; see engine serves: NSH's (`nsh_base::registry()`) and your crates' (`my_app::registry()`, which `#[native_module]` makes), so the TSX a view loads imports your Rust components and modules too. +## Presenting from Rust + +Rust code that shows system UI (a share menu, a popover, a sheet) shows it from the surface whose code asked. In a +main-thread task (`run_on_main_thread`), `nsh_platform_macos::presenting_view(mtm)` is the view to show it from when +no element anchors it: the content of the surface's visible window the user is in, or the surface's own view when it +is embedded; `None` when the surface shows in no visible window. `native_view(mtm, node)` is the `NSView` of an +element of that surface (the node of its `ref`, a `NodeRef` argument of a module function; `ROOT_ID` for the +surface's root view), in whatever window of the surface it is: the view a menu that belongs to the element opens +from. NSH's views are flipped. Take both while the task runs. They are for anchoring and presenting system UI only: a module never changes, re-parents, restyles or removes a view NSH owns. + ## Notifications from other code Remote notifications, and those other native code schedules, never reach `Notifications`' `press`: they go to the @@ -327,7 +337,7 @@ The environment is a desktop's: the safe area and the keyboard height are 0, `id (`platform.idiom` is `"desktop"`), `os_version()` (`platform.version`) is the macOS version, and dark mode follows the system's appearance live. See [Device and environment](./device-and-environment.md). -Input is a desktop's: the mouse, the trackpad (scrolling with momentum, pinch and rotation) and the keyboard. +Input is a desktop's: the mouse, the trackpad (scrolling with momentum, stretching past the edges and springing back as in AppKit's scroll views, pinch and rotation) and the keyboard. Trackpad tap-to-click briefly shows the app’s `active:` feedback even when the press and release arrive together; press callbacks run at release. Reduced motion keeps immediate visual release. A zoomable scroll view zooms with a trackpad pinch or Control + wheel around the pointer, and scrolls both ways while zoomed. diff --git a/third-party/nsh/website/docs/nshm.md b/third-party/nsh/website/docs/nshm.md index 4c32f09213f..900e5ad6c7a 100644 --- a/third-party/nsh/website/docs/nshm.md +++ b/third-party/nsh/website/docs/nshm.md @@ -180,6 +180,7 @@ crate, imported from `nsh-extra` in TSX and called as `nsh_extra::` in R | `location` | `Location` | Reads the device's position once the user allows it, on macOS, iOS and the web | | `photos` | `Photos` | Reads the user's recent photos on iOS, once the user allows it | | `push` | `Push` | Receives remote notifications from any push service on iOS, and on Android through the service's binding | +| `share` | `Share` | Hands text, a link or local files to the system's share sheet on iOS, Android, macOS and the web | | `speech` | `Speech` | Turns what the user says into text as they speak, on macOS, iOS, Android, Windows and the web | ```tsx @@ -417,6 +418,160 @@ implements `PushProvider` (it registers the device with its service), sets it wi posted opens the app with the payload as the intent's extras, and reaches `press` with them as its `payload` (Android does not say which notification it was, so it has no `id` or `threadId`). +### Share + +`Share` hands text, a link or local files to the system's share sheet, where the user sends them on: to another app, a +message, a mail, AirDrop or a saved file. iOS shows `UIActivityViewController`, Android the chooser of +`Intent.ACTION_SEND`, macOS the share menu (`NSSharingServicePicker`) and a browser `navigator.share`. + +```sh +nsh add nsh-extra --features share +``` + +```ts +const Share: { + available(): Promise; + show(content: ShareContent): Promise; +}; + +interface ShareContent { + title?: string; // the subject (a mail's subject line) and the sheet's title where it has one + text?: string; + url?: string; // a link: http(s), mailto, an app's own scheme + files?: string[]; // local files by absolute path, or `${dataDir}/…` (up to 100) + anchor?: ViewRef; // the view the sheet points at where it is a popover (iPad, macOS) +} + +interface ShareResult { + action: "shared" | "dismissed"; + target: string | null; // what the user shared with, as the platform names it +} +``` + +A trip planner shares a trip from its share button: + +```tsx +import { Text, View, type ViewRef } from "nsh"; +import { Share } from "nsh-extra"; + +function ShareButton(props: { trip: string }) { + let button: ViewRef | undefined; + const share = async () => { + try { + const { action } = await Share.show({ + title: "Weekend in Kyoto", + url: `https://example.com/trips/${props.trip}`, + anchor: button, + }); + if (action === "shared") console.log("shared"); + } catch (e) { + console.warn("cannot share", e); + } + }; + return ( + + Share + + ); +} +``` + +- `show` resolves with what the user did: `"shared"` with the `target` the user shared with (an activity type on + iOS, an app's package on Android, a service's title on macOS, `null` where the platform does not say), or + `"dismissed"` when the user closed the sheet. A dismissal is the user's answer, not a failure. `"shared"` says as + much as the platform knows: on iOS the target finished sharing (a cancelled mail is `"dismissed"`); on macOS the + service reported that it finished, or it reported nothing and the user came back to the window the menu opened + from (after copying or adding to a list, and also with a mail draft still open), while a service that reports a + cancel, or reports nothing while the user stays away for ten minutes, is `"dismissed"`; on Android the user chose + an app, and Android tells nothing of what the app does next; on the web `navigator.share` resolved. +- `show` rejects with a `TypeError` for content with none of `text`, `url` and `files` (empty text counts as none), + or a URL that does not parse, runs code (`javascript:`) or names a local file (`file:`; share it as `files`); a + `RangeError` for more than 100 files, text or a title past 1 MiB, or a URL past 16 KiB; `ERR_ACCESS_DENIED` for a + file `capabilities.fs.read` does not grant, `ENOENT` for one that does not exist, `EISDIR` for a folder; and + `ERR_FEATURE_UNAVAILABLE_ON_PLATFORM` where there is no share sheet, or for content the platform does not share (a + file outside an Android app's own storage, files in a browser, a browser that does not allow sharing here or still + shows an earlier share's sheet). +- A `show` while a sheet is open resolves the earlier promise `"dismissed"` at once. On iOS and macOS the new sheet + takes the earlier one's place; on Android and the web the earlier sheet stays until the user closes it, and a + browser refuses the new share while it is open. +- On an iPad and on macOS the sheet is a popover: give `anchor` the view that opened it (the share button, in a page, + a header, a dialog or another window); without one it shows at the middle of the window. +- `available()` resolves `true` on iOS, Android, macOS (AppKit windows) and in browsers with `navigator.share` whose + page allows `web-share`, when the app's capabilities grant it; `false` on Windows, Linux, in GPUI windows, in + terminal apps and in headless runs until the test answers, where `show` rejects with + `ERR_FEATURE_UNAVAILABLE_ON_PLATFORM`, so the app can offer another way (copying the link, say). +- An app that declares `"capabilities"` grants `Share` with [`"share": true`](./sandbox-and-capabilities.md#share), + and each shared file must also be readable by `fs.read`. Without the grant `available()` resolves `false` and + `show` rejects with an `Error` whose `code` is `"ERR_ACCESS_DENIED"`, `permission` `"share"`. + +| Platform | Share sheet | Files | +|---|---|---| +| iOS | `UIActivityViewController`; a popover on an iPad | Any file the app reads | +| Android | The chooser of `ACTION_SEND` (`ACTION_SEND_MULTIPLE` for several files) | Files in the app's own storage (`process.dataDir`, the cache), as `content:` URIs | +| macOS | The share menu, `NSSharingServicePicker` | Any file the app reads | +| Web | `navigator.share`, where the browser has it and the page allows `web-share` | Text and links | + +The feature needs no declaration. On iOS the sheet offers saving an image to Photos when the app says why it adds to +the photo library: `NSPhotoLibraryAddUsageDescription` in `ios.infoPlist` +([Info.plist keys](./packaging.md#infoplist-keys-and-entitlements)). + +Rust code uses `nsh_extra::share`: `show(ShareRequest).await` resolves with a `ShareOutcome` (`action`, a +`ShareAction`, and `target`) or a `ShareError` (`code`, `message`), and `available().await` tells whether a +sheet shows here. + +| TS | Rust | +|---|---| +| `await Share.available()` | `available().await -> bool` | +| `await Share.show(content)` | `show(request).await -> Result` | +| `title`, `text`, `url`, `files` | `ShareRequest::new().title(..).text(..).url(..).file(..)` | +| `anchor` | `.anchor(&element_ref)` | +| `result.action`, `.target` | `outcome.action` (`ShareAction`), `outcome.target` | +| `error.code` | `error.code` | + +```rust +use nsh_core::prelude::*; +use nsh_extra::share::{self, ShareAction, ShareRequest}; + +fn share_button(trip: &'static str) -> impl IntoElement { + let button = element_ref(); + view() + .element_ref(&button) + .role(AccessibilityRole::Button) + .accessibility_label("Share") + .on_press(move || { + let request = ShareRequest::new() + .title("Weekend in Kyoto") + .url(format!("https://example.com/trips/{trip}")) + .anchor(&button); + spawn(async move { + match share::show(request).await { + Ok(outcome) if outcome.action == ShareAction::Shared => log::info!("shared"), + Ok(_) => {} + Err(error) => log::warn!("cannot share: {error}"), + } + }); + }) + .child(text("Share")) +} +``` + +In `nsh test` (and `nsh_testing::Headless`), shares reach the module's fake share sheet, named `"nsh-extra/share"`. +Until the test answers there is no sheet: `available()` resolves `false` and `show` rejects with +`ERR_FEATURE_UNAVAILABLE_ON_PLATFORM`. The test answers for the user with [`app.fake`](./testing-and-trace.md) +(`Headless::call_fake` in Rust): + +| Method | `args` | What it does, and its answer | +|---|---|---| +| `answer` | `[{ action, target }]` | The run has a share sheet from now on, and the user answers every share with it: `"shared"` (to `target`, if given) or `"dismissed"`. Resolves with `null`. | +| `hold` | `[]` | The run has a share sheet from now on, and the user leaves each one open: the next share answers it `"dismissed"`. Resolves with `null`. | +| `shares` | `[]` | Resolves with what the app shared, in order: `[{ title, text, url, files, anchored }]` (`null` for what was not given, `files` their real paths, `anchored` whether the sheet points at the share's `anchor`). | + +```tsx +await app.fake("nsh-extra/share", "answer", [{ action: "shared", target: "com.apple.UIKit.activity.Mail" }]); +await app.press("label:Share"); +expect(await app.fake("nsh-extra/share", "shares")).toHaveLength(1); +``` + ### Speech `Speech` turns what the user says into text (dictation): the app starts a session, the system listens to the @@ -731,6 +886,29 @@ by the app as above, in `ios.infoPlistStrings` (`macos.infoPlistStrings`). Develop it beside an app with `nsh add --path ../my-gauge`, which reads the directory as it is. Publish it as any crate (`cargo publish`), with the keyword `nshm` so that it can be found on [crates.io](https://crates.io/keywords/nshm), or push it to Git and tag its versions. +### System UI and files from Rust + +A module that shows system UI (a picker, a share sheet, a menu) or hands a file to the system works through the +same public hooks NSH's own modules use, so it behaves as they do: + +| Need | Hook | +|---|---| +| A file path the app passes, checked as `fs/promises` reads it | `sys.readable_file(path)` (a `sys: System` argument): the real path within `capabilities.fs.read` or a file the user pasted or dropped, else `ERR_ACCESS_DENIED`, `ENOENT`, `EISDIR` for a folder, or `ERR_FEATURE_UNAVAILABLE_ON_PLATFORM` on the web | +| What to present over (iOS) | `nsh_platform_ios::presenting_controller(mtm)` in a `run_on_main_thread` task ([iOS](./ios.md#presenting-from-rust)) | +| What to show from (macOS) | `nsh_platform_macos::presenting_view(mtm)` in a `run_on_main_thread` task ([macOS](./macos.md#presenting-from-rust)) | +| What to show over (Android) | `nsh::presenting_activity(env)` in a `run_on_main_thread` task ([Android](./android.md#presenting-from-rust)) | +| The window that owns it (Windows, Linux) | `presenting_window()` of `nsh_platform_windows` (an `HWND`) or `nsh_platform_linux` (a `gtk::Window`) in a `run_on_main_thread` task ([Windows](./windows.md#presenting-from-rust), [Linux](./linux.md#presenting-from-rust)) | +| The view of an element, for a popover or a menu that belongs to it | `native_view` with the node of the element's `ref` (a `NodeRef` argument): `native_view(mtm, node)` of `nsh_platform_ios` or `nsh_platform_macos`, `nsh::native_view(env, node)` on Android, `nsh_platform_linux::native_view(node)`; on Windows, where NSH draws its elements, `nsh_platform_windows::element_bounds(node)`: the element's window and its bounds there | +| Another app, started for a result (Android) | `nsh::activity::start_for_result` ([Android](./android.md#activities-from-rust)) | +| A file of the app's storage another app reads (Android) | `nsh::activity::content_uri(env, path)` | +| A Java listener or callback (Android) | `nsh::proxy::implement` ([Android](./android.md#java-listeners-in-rust)) | +| A broadcast an API answers with (Android) | `nsh::receiver::register(env, action, handler)` ([Android](./android.md#broadcasts-in-rust)) | + +Check the path first, then hand it on: a file the app may not read never reaches the other app. Native views and +windows are for anchoring and presenting system UI only: a module never changes, re-parents, restyles or removes a +view NSH owns. Under an embedding backend without these hooks (GPUI) the views and windows are `None`, so a module +falls back or reports the UI unavailable. + ### Wrapping a native SDK An nshm that wraps an Apple SDK calls it from Rust under `#[cfg(target_os = "ios")]` or `#[cfg(target_os = "macos")]`. System frameworks used through the `objc2` crates need nothing more. A vendor's prebuilt library (an `.xcframework` or `.a`) is linked from the nshm's own `build.rs`: Cargo passes the `rustc-link-lib` and `rustc-link-search` of every dependency to the app's executable, so the app lists nothing and NSH has no per-platform SDK settings. diff --git a/third-party/nsh/website/docs/packaging.md b/third-party/nsh/website/docs/packaging.md index 4948429b21e..f4847d27ccc 100644 --- a/third-party/nsh/website/docs/packaging.md +++ b/third-party/nsh/website/docs/packaging.md @@ -258,7 +258,9 @@ Development builds (`nsh run --target android`) always allow plain HTTP: they lo The manifest declares the permissions NSH's own features need: `INTERNET`, `ACCESS_NETWORK_STATE` for [`network()`](./device-and-environment.md#the-network), `POST_NOTIFICATIONS` for -[notifications](./sandbox-and-capabilities.md#notifications), `RECORD_AUDIO` and `CAMERA` for a web view's `media`. `android.permissions` adds +[notifications](./sandbox-and-capabilities.md#notifications), `RECORD_AUDIO` and `CAMERA` for a web view's `media`, +and the signature permission `.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION` (androidx's name) that keeps the +receivers registered at run time to the app before Android 13. `android.permissions` adds others, for code of the app or an extension that calls Android itself: a bare name is one of Android's (`android.permission.`), a dotted one is written as it is. @@ -623,14 +625,37 @@ Requirements: [appimagetool](https://github.com/AppImage/appimagetool/releases) runtime and SDK. AppImage bundles NSH but not GTK 4 or WebKitGTK; when an AppImage starts without a window, the system lacks them, and the Flatpak brings them. Releasing on Flathub: [Publishing](./publish.md#publish-to-flathub). +### Debian and RPM packages + +```sh +nsh package --target linux --format deb +nsh package --target linux --format rpm +``` + +Writes `.nsh/out/__.deb` (Debian, Ubuntu) or `.nsh/out/--1..rpm` (Fedora, +openSUSE), besides the directory and archive, with no other tool installed. `` is the app's name in lower case; +a pre-release version (`1.2.0-beta.1`) becomes `1.2.0~beta.1`, which both package managers sort before `1.2.0`. The +package installs the app in `/usr/lib/`, links its executable from `/usr/bin`, and installs the desktop entry, the +256×256 icon and AppStream metainfo under `/usr/share`. It depends on GTK 4 and WebKitGTK 6.0 (`libgtk-4-1`, +`libwebkitgtk-6.0-4`; `gtk4`, `webkitgtk6.0`), which the package manager installs with it: + +```sh +sudo apt install ./counter_1.0.0_amd64.deb +sudo dnf install ./counter-1.0.0-1.x86_64.rpm +``` + +The description, homepage, license and maintainer come from the `store` section, like the metainfo's. The packages are +not signed: sign the `.rpm` with `rpm --addsign` and publish both from a signed repository when users add your +repository rather than download the file. + ### Distribute `nsh package --target linux` writes the app as a directory and a `.tar.gz` of it, with a desktop entry and the icon. You upload the archive to your site or a GitHub Release, and users unpack it and install the desktop entry; [App Updates](./app-updates.md) keeps installed copies up to date. -`--format appimage` and `--format flatpak` also write an AppImage and a Flatpak ([above](#appimage-and-flatpak)); -`nsh package` does not write `.deb` or `.rpm` packages yet. Releasing on Flathub is +`--format appimage` and `--format flatpak` also write an AppImage and a Flatpak ([above](#appimage-and-flatpak)), +`--format deb` and `--format rpm` a Debian and an RPM package ([above](#debian-and-rpm-packages)). Releasing on Flathub is [Publishing](./publish.md#publish-to-flathub). #### Before the first release diff --git a/third-party/nsh/website/docs/platform-extensions.md b/third-party/nsh/website/docs/platform-extensions.md index 62a641d4939..ac4ed55dd6b 100644 --- a/third-party/nsh/website/docs/platform-extensions.md +++ b/third-party/nsh/website/docs/platform-extensions.md @@ -69,7 +69,7 @@ let config = EngineConfig { let mut engine = LocalEngine::start(config, text_engine, sink).expect("the app starts"); ``` -The environment also says what the platform provides. `tab_bar` (on by default) is the system's tab bar of `nsh/mobile`'s `TabBar` on iOS and Android; a platform with none turns it off, and the app shows its tabs with `nsh/base`'s `Tabs`. `clipboard_images` is images on the clipboard: by default yes, as every NSH backend does, `Some` for what the platform does; without them, `Clipboard.readImage` and `writeImage` reject with `ERR_FEATURE_UNAVAILABLE_ON_PLATFORM` and `hasImage` is false. `scheme_links` is links of the app's schemes (`nsh.json` `schemes`) reaching it: by default as NSH's native backends on `os` (none on the web), `Some(false)` for a platform that hands the app none; without them, `open_auth_session` fails at once with `ERR_FEATURE_UNAVAILABLE_ON_PLATFORM` instead of waiting for a callback that cannot come. A Mini Program has none of the three. +The environment also says what the platform provides. `tab_bar` (on by default) is the system's tab bar of `nsh/mobile`'s `TabBar` on iOS and Android; a platform with none turns it off, and the app shows its tabs with `nsh/base`'s `Tabs`. `clipboard_images` is images on the clipboard: by default yes, as every NSH backend does, `Some` for what the platform does; without them, `Clipboard.readImage` and `writeImage` reject with `ERR_FEATURE_UNAVAILABLE_ON_PLATFORM` and `hasImage` is false. `scheme_links` is links of the app's schemes (`nsh.json` `schemes`) reaching it: by default as NSH's native backends on `os` (none on the web), `Some(false)` for a platform that hands the app none. A Mini Program has none of the three. `LocalEngine::pump()` runs what is due and returns when it is due again: the platform calls it at that time and after each input. Depend on `nsh-engine` with `default-features = false` for apps written in Rust: the engine then builds for `wasm32-unknown-unknown` too. diff --git a/third-party/nsh/website/docs/reactivity.md b/third-party/nsh/website/docs/reactivity.md index c340aa32287..9c0a734cc67 100644 --- a/third-party/nsh/website/docs/reactivity.md +++ b/third-party/nsh/website/docs/reactivity.md @@ -453,6 +453,8 @@ fn swatch() -> impl IntoElement { } ``` +Content you pass to a component, its children or what fills one of its slots, reads the context where that component places it, in TSX and in Rust alike: a menu's items and a submenu's trigger see what the menu provides, as well as what is provided around the menu. + Read a context in a component body (or in code that runs while components are being created), not in an event handler or a timer, where there is no component to look it up from. Rust components also take the app's theme this way: `theme()` from `nsh_base` ([Theme](./rust.md#theme)). ## Error boundaries diff --git a/third-party/nsh/website/docs/rust.md b/third-party/nsh/website/docs/rust.md index 406c1fb091e..074a86a5b4f 100644 --- a/third-party/nsh/website/docs/rust.md +++ b/third-party/nsh/website/docs/rust.md @@ -239,48 +239,13 @@ fn open_notes() { ## Signing in on the web -`open_auth_session` opens a provider's sign-in page (an OAuth authorization URL) and -answers with the callback URL it redirects to: iOS shows it in an -`ASWebAuthenticationSession` sheet (`.ephemeral(true)` keeps it apart from the user's -Safari data), Android in a Custom Tab, the macOS, Windows and Linux backends in the -system browser. Outside iOS the callback comes back as a link of a scheme the app -claims (`nsh.json` `schemes`); the session takes it, so `next_url_scheme_open` never -hears it. The answer is `Completed(url)` or `Cancelled` (the user closed the page or -came back to the app without signing in). A session with nothing to bring its -callback back fails at once with `ERR_FEATURE_UNAVAILABLE_ON_PLATFORM`: one whose -scheme the app does not claim, and every one on the web and the GPUI and terminal -backends, where no link of the app's schemes reaches the app. The page's URL needs -the `openUrl` capability, as `open_url` does. - -When the app learns the user signed in some other way while the page still shows (a -device code approved on a page that never redirects back), `close_auth_session()` -closes it: the session answers `Cancelled`, and iOS and Android take the page away and -bring the app back. A page in a desktop browser stays open. With no session waiting, -it does nothing. +Sign-in sessions (an OAuth 2 authorization page that redirects back to the app) moved out of NSH core into the [nsh-oauth2](https://github.com/longbridge/nsh-oauth2) nshm. It works from Rust and TSX: iOS shows `ASWebAuthenticationSession`, Android a Custom Tab, the desktops the system browser. -```rust -use nsh_core::{ - auth_session::{AuthSessionOutcome, AuthSessionRequest}, - prelude::*, -}; - -fn sign_in(authorize_url: String) { - let session = open_auth_session(AuthSessionRequest::new(authorize_url, "myapp")); - spawn(async move { - match session.await { - Ok(AuthSessionOutcome::Completed(callback)) => log::info!("signed in: {callback}"), - Ok(_) => {} // Cancelled. - Err(error) => log::warn!("no sign-in page: {error}"), - } - }); -} +```sh +nsh add github:longbridge/nsh-oauth2 ``` -In tests, `Headless::on_auth_session` gives the platform an in-app session and ends -each one with the outcome given, and `keep_auth_sessions_open` leaves each one open -until the app closes it (`screen().auth_session_showing()`); without either the page -is in `opened_urls()` and `open_with_url` delivers the callback (not in a test run as -the web, where the session fails at once). +`nsh_core::element::open_auth_session` and `close_auth_session` were removed from core. Use `nsh_oauth2::open_auth_session` and `nsh_oauth2::close_auth_session`, which take the same `AuthSessionRequest` and answer with the same outcome and error types. ## Extending a Rust app with TSX @@ -448,8 +413,8 @@ updates, Rust edits rebuild and restart the app. The CLI bundles and compiles th exports from its description; the development hosts and `nsh test`'s headless runner are built with your crate and QuickJS. -`examples/rust-exports` in the repository is the reference for exporting: a small TSX app whose crate exports one -component (props required, defaulted and optional, an event, children), one module (a function of each kind) and +`examples/rust-exports` in the repository is the reference for exporting: a small TSX app whose crate exports +components (required, defaulted and optional props, an event, and node or string children), one module (a function of each kind) and one class (a constructor, methods, a getter and a setter, a static, an `async` member, another instance as an argument, a callback Rust posts to, `dispose()` and `using`), each with a short doc comment, and tests, in Rust and in TypeScript (`App.test.tsx`), that press through the app and check what each one shows. @@ -458,6 +423,15 @@ in TypeScript (`App.test.tsx`), that press through the app and check what each o --target web` (or `ios`, `android`, …) runs its root, `nsh test examples/gallery-rs` runs its tests headless, and `cargo run -p gallery-native` starts it on the desktop backend. +### Reading string children + +Declare `pub children: Prop` in a Rust component's `#[derive(Props)]` struct to receive the string +between its JSX tags. The generated TypeScript props include `children: string`. For example, both +`**bold**` and `{source()}` pass a string to Rust. The string keeps +characters such as the Markdown asterisks. Read `props.children.get()` in a reactive binding or computation to +follow changes when `source` is a signal. To place the caller's JSX nodes in the component's view, use a +`Prop` slot. + ### Render functions and the app's classes A component draws content of the app's for values it has (a row of its data, a code block of a document) with a diff --git a/third-party/nsh/website/docs/sandbox-and-capabilities.md b/third-party/nsh/website/docs/sandbox-and-capabilities.md index e2ee1feebcf..cd142cb8a92 100644 --- a/third-party/nsh/website/docs/sandbox-and-capabilities.md +++ b/third-party/nsh/website/docs/sandbox-and-capabilities.md @@ -277,7 +277,7 @@ capability is what decides which code reaches them. ### `share` -`"share": true` lets the app show the system's share sheet ([`Share`](../modules/nsh.md#share)): the user chooses +`"share": true` lets the app show the system's share sheet (`nsh-extra`'s [`Share`](./nshm.md#share)): the user chooses where the content goes. A shared file must also be readable under `fs.read`. ### `speech` @@ -309,7 +309,8 @@ shortcuts, `Application.quit()`, `Application.setQuitMode()`, `Application.resta ([`AppSettings.open()`](../modules/nsh-mobile.md#appsettings) of `nsh/mobile`; for an embedded view, the embedding app's page). Without it they do nothing, `Application.launchAtLogin()` and `AppSettings.available()` resolve `false`, and `setLaunchAtLogin` and `AppSettings.open()` reject with `ERR_ACCESS_DENIED` (`permission` `"application"`). Context menus (`Menu.popup`) show in the app's own view, and windows the app opens are -granted by [`windows`](#windows), so neither needs it. +granted by [`windows`](#windows), so neither needs it. nsh.json's [`window`](./project-structure.md) launch settings are +the host's, applied before the app runs, so they need neither. ### `homeDir` @@ -335,7 +336,7 @@ for every kind but overlays, or an object that narrows it: | `kinds` | `string[]` | The kinds it may open: `"normal"`, `"dialog"`, `"panel"`, `"popup"`, `"overlay"`. Missing: every kind but `"overlay"`. | | `levels` | `string[]` | The levels its windows may float at: `"normal"`, `"floating"`, `"aboveDock"`, `"desktopIcon"`. Missing: every level. | | `max` | `number` | How many windows of its own may be open at once, the first window included. Missing: any number. | -| `overlay` | `boolean` | Overlays and click-through windows (`pointerEvents: "none"`). Never granted unless declared, also for an app without `"capabilities"`. | +| `overlay` | `boolean` | Overlays and click-through windows (`pointerEvents: "none"` or `"box-none"`). Never granted unless declared, also for an app without `"capabilities"`. | `overlay` is separate because a transparent, click-through window above every other can pass for the system's own UI. Every window needs the grant, the first one included: no window is privileged. diff --git a/third-party/nsh/website/docs/scrolling.md b/third-party/nsh/website/docs/scrolling.md index 2f3ee307030..9c8251cb760 100644 --- a/third-party/nsh/website/docs/scrolling.md +++ b/third-party/nsh/website/docs/scrolling.md @@ -97,7 +97,7 @@ scroll().horizontal().scrollbar(false).child( Right to left (see [Device and environment](./device-and-environment.md#right-to-left)), a horizontal scroll view starts at its right end and keeps its distance from it. -Fingers drag scroll views. On the desktop (macOS, Windows, Linux) and in the browser, the mouse scrolls as in desktop apps: with its wheel (Shift + wheel scrolls horizontally), the touchpad, the keyboard and the scroll indicator, which shows while the mouse moves over the view and drags as a scroll bar; mouse drags go to the app's pans, responders and text selection. Touchscreens on desktops drag scroll views as fingers do. `scrollbar={false}` hides the indicator on either axis: a mouse without a horizontal wheel moves a horizontal view with Shift + wheel, with the wheel where nothing around it scrolls vertically, and with the keyboard. +Fingers drag scroll views. On the desktop (macOS, Windows, Linux) and in the browser, the mouse scrolls as in desktop apps: with its wheel (Shift + wheel scrolls horizontally), the touchpad, the keyboard and the scroll indicator, which shows while the mouse moves over the view (on macOS only where the system's scrollers are the legacy ones: with overlay scrollers, which a trackpad or *Show scroll bars: When scrolling* gives, it shows while the view scrolls, as in AppKit) and drags as a scroll bar; mouse drags go to the app's pans, responders and text selection. Touchscreens on desktops drag scroll views as fingers do. `scrollbar={false}` hides the indicator on either axis: a mouse without a horizontal wheel moves a horizontal view with Shift + wheel, with the wheel where nothing around it scrolls vertically, and with the keyboard. ### Behavior props diff --git a/third-party/nsh/website/docs/testing-and-trace.md b/third-party/nsh/website/docs/testing-and-trace.md index e8aa1547bf5..99fc15e7bcd 100644 --- a/third-party/nsh/website/docs/testing-and-trace.md +++ b/third-party/nsh/website/docs/testing-and-trace.md @@ -95,7 +95,7 @@ A test file is a `*.test.tsx` or `*.test.ts` file next to your code. It imports does: ```sh -nsh test # every test file of the app in the current directory +nsh test # every test file of the app in the current directory, except in what Git ignores nsh test App.test.tsx # one file nsh test --filter "adds" # the tests whose name contains "adds" ``` @@ -458,9 +458,7 @@ one: a selector matching several fails the step, and the error says how to narro | `app.dialogs()` | The dialogs the app showed, in order. | | `app.onPick(handler)` | Answers the picks the app asks for from now on (`Picker.pickImages`, `Picker.pickFiles`): `handler` gets what the pick asks (`kind`: `"images"` or `"files"`, `multiple`, `limit`, `maxDimension`, `quality`, `format`, `filters`, `maxSize`) and returns the files the user picks (`{ name, type?, data: Uint8Array }`, given to the app as they are; one larger than `maxSize` reaches the app unread, `status` `"tooLarge"`), or `null` to cancel. Without a handler, picks are cancelled. Headless runs. | | `app.picks()` | The picks the app asked for, in order. | -| `app.onShare({ action, target })` | Gives the run a share sheet and answers the shares the app shows from now on (`Share.show`): `action` `"shared"` (to `target`) or `"dismissed"`. Headless runs. | -| `app.shares()` | What the app shared, in order (`{ title, text, url, files }`). | -| `await app.fake(name, method, args?)` | Calls the fake a native module gives headless runs in place of a device, by its name, with `args` (an array), and resolves with its JSON answer once the app is quiet. The module documents its fake's methods: `nsh-extra`'s speech recognizer is `"nsh-extra/speech"` ([`Speech`](./nshm.md#speech): `app.fake("nsh-extra/speech", "hear", ["hello"])` speaks for the user). Headless runs. | +| `await app.fake(name, method, args?)` | Calls the fake a native module gives headless runs in place of a device, by its name, with `args` (an array), and resolves with its JSON answer once the app is quiet. The module documents its fake's methods: `nsh-extra`'s speech recognizer is `"nsh-extra/speech"` ([`Speech`](./nshm.md#speech): `app.fake("nsh-extra/speech", "hear", ["hello"])` speaks for the user), its share sheet `"nsh-extra/share"` ([`Share`](./nshm.md#share): `app.fake("nsh-extra/share", "answer", [{ action: "shared" }])` answers for the user). Headless runs. | | `app.audio()` | What the app asked of the speaker (`Sound`, `AudioPlayer`), in order: `command` (`"load"`, `"play"`, `"stop"`, `"unload"`, `"open"`, `"preload"`, `"resume"`, `"pause"`, `"seek"`, `"set"`, `"close"`), `src`, and `volume`, `rate`, `position` where they apply. Headless runs. | | `app.endAudio()` | The players playing reach their end (`end`; those that loop start again). Headless runs. | | `app.clipboard()` | The text on the clipboard now, `null` when it holds none. | @@ -564,11 +562,10 @@ that only a real platform can do: so what it does not declare is refused. - **URLs are recorded**: what the app opens is reported opened unless the test fails it (`app.failOpenUrls`), and `app.openedUrls()` lists it. - **Picks are answered**: with the test's files (`onPick`), else cancelled, so `Picker.pickImages` and `Picker.pickFiles` resolve `[]`. -- **Shares are the test's**: a run has a share sheet once `onShare` gives it one, which answers each share as it says; - before that `Share.available()` resolves `false`. - **Native modules run on their fakes**: a module that reaches a device gives headless runs a fake in its place, which the test drives (`app.fake`). With `nsh-extra`'s `speech`, `Speech.available()` resolves `true`, a session starts - at once and hears what the fake's `hear` says. Rust tests that launch `Headless` apps whose modules give fakes take + at once and hears what the fake's `hear` says. With its `share`, a run has a share sheet once the fake's `answer` + gives it one, which answers each share as it says; before that `Share.available()` resolves `false`. Rust tests that launch `Headless` apps whose modules give fakes take turns in one process, as a fake stands in process-wide; apps started with clones of one registry run together. - **Sound plays to a fake speaker**: sounds decode as WAV (their length from the header; other bytes fail with `decode`), players play a minute of their source at once and end at `endAudio()`. - **Modals show at once**: `onShow` comes when one is presented. @@ -736,6 +733,49 @@ echo 'await app.press("text:+1"); expect(app.texts()).toContain("1");' | nsh tes The 1.2 s let the engine's idle garbage collection run before the first step, so an app that lets go of what it still uses shows it: its handlers stop working. +### Driving a running session + +`nsh test --attach` drives the app you already have open with `nsh run` or `nsh dev`, in its window, as it is. Use it +when a problem only shows in that window, for example after a long session with many hot updates. A fresh `nsh test` +instance starts from scratch and would not show it. + +Run it in the app's directory, with the steps on standard input: + +```sh +nsh run --target gpui # in one terminal: the window you work in +echo 'console.log(app.texts()); await app.press("text:+1"); await app.screenshot("now.png")' | nsh test --attach +``` + +The steps and queries are the ones of [On a real platform](#on-a-real-platform): `press`, `type`, `scroll`, `hover`, +`waitFor`, `texts()`, `shows()`, `layout()`, `accessibility()`, `screenshot(path)` and the others. They act on the +running app with the platform's own input. `app` is that app, at once: nothing waits 1.2 s first. + +- `--attach` takes the session running on this machine. When several run, it takes the one of this directory's app. + `--attach=` names the session's port (the port `nsh run` prints). +- A session can have several hosts connected, such as a GPUI window and a browser. The steps go to the host that + connected last. `--device ` picks another one, by its name as the session's terminal shows it, or by its + platform as `--target` names it (`--device gpui`). `nsh test --attach` prints the host it took and the others. +- A test file works too: `nsh test tests/repro.test.tsx --attach`. Its `open("./App.tsx")` attaches to the running app. + `open` takes no options there, because they would set a new app up: `storage`, `network`, `width`, `colorScheme` and + the others reject with `ERR_NSH_TEST_UNSUPPORTED`. +- The app keeps running when the steps end, and closing it in a test does not quit it. Its requests go to the + network as usual, so `app.requests()` is empty. +- The steps see the views the app has made. A long list makes its rows as they come near the screen, so a row far + down is found after a `scroll`. +- `--target`, `--trace`, `--fps`, `--display` and `--foreground` set up an app a test opens, and don't go with + `--attach`. + +The macOS and GPUI development hosts take attached steps. The other hosts (Windows, Linux, iOS, Android, the +terminal and the browser) say that they take none. + +Only this machine can drive a session. The dev server takes attached steps on loopback only, refuses any web page +(even its own), and asks for a token that the session writes to a file only your user can read. Other machines on +the network, other users of this machine and pages open in a browser cannot drive your app. + +Attaching is for development only. Only the hosts of `nsh run` and `nsh dev` connect to a dev server and keep the +model the steps need; a packaged app (`nsh package`) and an app in its release build have neither, and nothing can +attach to them. + The examples have tests to start from: `examples/gallery-rs` for a Rust app (`cargo test`, one module per demo, and `App.test.tsx`), `examples/rust-exports` for an app with a Rust crate, `examples/counter` and `examples/gallery/tests` (storage, inputs, a long list, stubbed requests, dark mode, a manual clock) for TSX apps. diff --git a/third-party/nsh/website/docs/touch-and-gestures.md b/third-party/nsh/website/docs/touch-and-gestures.md index 641ffb8facc..6c696a402fb 100644 --- a/third-party/nsh/website/docs/touch-and-gestures.md +++ b/third-party/nsh/website/docs/touch-and-gestures.md @@ -432,7 +432,7 @@ view() .on_responder_move(move |e: &ResponderEvent| seek(e.page.x - origin.get())) ``` -It resolves once the changes made so far are laid out: in Rust to a `Measurement` (`frame`, the frame in the parent as the layout handler reports it, and `page`, the top left corner), in TSX to `{ bounds, pagePosition }`. The corner is in the surface, or in the dialog the view is in, the same coordinates as touches' page positions. The offsets of the scroll views and lists around it are taken into account; transforms (animations included) are not. It resolves to `None` / `null` for a view that is not on screen. +It resolves once the changes made so far are laid out: in Rust to a `Measurement` (`frame`, the frame in the parent as the layout handler reports it, and `page`, the top left corner), in TSX to `{ bounds, pagePosition }`. The corner is in the surface, or in the dialog the view is in, the same coordinates as touches' page positions. The offsets of the scroll views and lists around it are taken into account as the content shows with that layout: for a list, or the scroll view around a `viewport="parent"` list, an instant scroll sent with the same update counts at once, while an animated one counts as the platform reports its progress. Transforms (animations included) are not taken into account. It resolves to `None` / `null` for a view that is not on screen. ## The responder system diff --git a/third-party/nsh/website/docs/web-view-and-video.md b/third-party/nsh/website/docs/web-view-and-video.md index c667c7c69c8..d1aca5cf477 100644 --- a/third-party/nsh/website/docs/web-view-and-video.md +++ b/third-party/nsh/website/docs/web-view-and-video.md @@ -84,6 +84,7 @@ In Rust each prop is a builder method in snake case (`injected_java_script`, `ja | `html` | `string` | | Inline HTML, shown instead of `src`. | | `baseUrl` | `string` | | What `html`'s relative URLs resolve against. It needs the same grant as a page there (`webview.hosts`); without it the HTML loads with no base URL and `onError` reports `ERR_ACCESS_DENIED`. | | `allowOrigin` | `string` | | One more origin this web view may show and navigate to besides `webview.hosts`, for an origin known only while the app runs (a server the user named): `scheme://host[:port]`, `http` or `https`, matched exactly (same scheme, host and port; never a subdomain). Needs `"runtimeOrigin": true` in [`capabilities.webview`](../docs/sandbox-and-capabilities.md#webview); another value is refused with a message. Set in the same render as `src`, it applies to it; changed later, from the next navigation. Other web views and the windows a page opens do not have it. | +| `allowNavigation` | `string[]` | | Narrows the hosts this web view may show and navigate to, with the same host patterns as `webview.hosts` (`*`, `*.example.com`, a host name). A page outside them is refused before its request is made and reported to `onError` with `code` `ERR_ACCESS_DENIED` and its `url`. It never widens the app's grant, an empty list refuses every web page, and a pattern that does not read is refused with a message. Other schemes (`about:blank`, the app's files and URL schemes) keep the app's own rules. | | `injectedJavaScript` | `string` | | Runs after each page loads. | | `injectedJavaScriptBeforeContentLoaded` | `string` | | Runs before each page's own scripts. | | `javaScriptEnabled` | `boolean` | `true` | Pages run scripts. | diff --git a/third-party/nsh/website/docs/windows.md b/third-party/nsh/website/docs/windows.md index b25b24add4d..1fddc8e9c08 100644 --- a/third-party/nsh/website/docs/windows.md +++ b/third-party/nsh/website/docs/windows.md @@ -99,6 +99,11 @@ without any extra tools; packaging on another system keeps the default icon. The the taskbar. `--run` launches the app after packaging it. The executable is not signed: sign it with your own certificate (`signtool`) to distribute it. +A TSX app's executable has only the parts of `nsh/base` the app imports. On x86_64, `nsh package` links nsh's release +runner again from its prebuilt objects (`runtime\windows\nsh-windows-app.link\`) and leaves out the other parts. This +needs neither Rust nor Visual Studio: the linker is the `windows-linker` [component](./installation.md#components), +which the first package downloads. If the link fails, the app gets the prebuilt runner, with every part. + ## Embedding in a Win32 app The `nsh-platform-windows` crate (from the NSH repository) gives a Rust Win32 app `AppView`: one NSH engine in a child @@ -176,6 +181,17 @@ Native components are registered with `AppView::register_component`; see engine serves: NSH's (`nsh_base::registry()`) and your crates' (`my_app::registry()`, which `#[native_module]` makes), so the TSX a view loads imports your Rust components and modules too. +## Presenting from Rust + +Rust code that shows system UI (a menu, a dialog, a share flyout) shows it from the surface whose code asked. In a +main-thread task (`run_on_main_thread`), `nsh_platform_windows::presenting_window()` is the top-level window to own +UI that no element anchors: the surface's visible window the user is in; `None` when the surface shows in no visible +window. NSH draws its elements itself, so an element has no window of its own: `element_bounds(node)` gives the window +an element of that surface shows in (the node of its `ref`, a `NodeRef` argument of a module function; `ROOT_ID` for +the surface's root), its bounds in that window's client area in points, and the window's scale factor, for a menu +that opens at the element. Read both while the task runs. They are for anchoring and presenting system UI only: a +module never changes, re-parents, restyles or destroys a window NSH owns, nor draws into it. + ## What differs on Windows The environment is a desktop's: the safe area and the keyboard height are 0, `idiom()` is the desktop diff --git a/third-party/nsh/website/elements/calendar.md b/third-party/nsh/website/elements/calendar.md index 20469b1fe54..6870827a642 100644 --- a/third-party/nsh/website/elements/calendar.md +++ b/third-party/nsh/website/elements/calendar.md @@ -120,7 +120,47 @@ The value is an ISO date, `"2026-10-28"`, as an HTML ``'s; wi - Without `range`, a press on a day picks it. - With `range`, the first press starts the range and the second ends it, the days between them in the range (each `selected`, its ends included, see [Items](#items)). A second press on an earlier day starts the range over from it, - as does a press once the range is complete. A half range shows until it is complete and only then is reported. + as does a press once the range is complete. A half range shows until it is complete, and `onChange` reports the + range only then. + +With `range`, `onChangeStart({ value })` reports each range the user starts, as `[start, null]`. Use it when the range +also shows outside the grid: start and end fields above it, a summary line, or an Apply button that waits for the end. +`onChange` still reports complete ranges only. + +To keep the start in your own state, set `value` to it. The calendar shows the value you set, so the next value you set +replaces the start: a Cancel that puts back the applied range drops the half range, and the next press starts a new +one. + +```tsx +import { signal, Text, View } from "nsh"; +import { Button, Calendar, type CalendarValue } from "nsh/base"; + +function TripDates() { + const applied = signal(["2026-10-05", "2026-10-07"]); + const draft = signal(applied()); + const ends = () => { + const value = draft(); + return Array.isArray(value) ? value : [null, null]; + }; + return ( + + {`${ends()[0] ?? "Start"} – ${ends()[1] ?? "End"}`} + draft.set(value)} + onChange={({ value }) => draft.set(value)} + /> + + + + ); +} +``` The calendar opens on the month of the value (a range's start), else today's. @@ -246,6 +286,7 @@ language. | Event | Rust | Description | |---|---|---| | `onChange` | `.on_change(\|value\| ..)` | The user picked a complete value: `{ value }`, a day or a range. Set `value` to follow it. A `value` the app passes is never reported. | +| `onChangeStart` | `.on_change_start(\|value\| ..)` | With `range`, the user started a range: `{ value }`, `[start, null]`. `onChange` reports it once the second press ends it. Set `value` to it to keep the start as your own ([Value](#value)). | ## Parts diff --git a/third-party/nsh/website/elements/canvas.md b/third-party/nsh/website/elements/canvas.md index 5da0d1bcfd6..1c032aef806 100644 --- a/third-party/nsh/website/elements/canvas.md +++ b/third-party/nsh/website/elements/canvas.md @@ -159,6 +159,29 @@ canvas( .size(px(80.0)) ``` +In Rust, `quadratic_curve_to` and `bezier_curve_to` accept ordinary `Point` values for fixed control +points and endpoints. Use a `Point` to animate either coordinate. Here `height` moves the control +point vertically while both ends stay fixed. + +```rust +use nsh_core::element::CanvasArg; + +let height = animated_value(0.0); +height.timing(60.0, 1000.0, Easing::Linear); + +canvas( + Painter::new() + .begin_path() + .move_to(0.0, 0.0) + .quadratic_curve_to( + point(px(40.0).into(), CanvasArg::from(&height)), + point(px(80.0), px(0.0)), + ) + .stroke(), +) +.size(px(80.0)) +``` + ## The context `CanvasRenderingContext2D` is a subset of the browser's, and `Painter` has the same operations as methods in snake case @@ -171,7 +194,8 @@ paths (`moveTo`, `lineTo`, `arc`, `arcTo`, `ellipse`, `rect`, `roundRect`, Bézi charts and animated graphics. Coordinates are in points with the origin at the top left. `measureText` is synchronous and returns `width`. Rust's -`Painter` answers hit tests too (`is_point_in_path`, `is_point_in_stroke`). +`Painter` answers hit tests too (`is_point_in_path`, `is_point_in_stroke`). In both Rust and TSX, these synchronous +queries use zero for animated coordinates. The context draws vector operations and images: pixel access (`getImageData` / `putImageData`), `filter` and SVG images are outside it. diff --git a/third-party/nsh/website/elements/data-table.md b/third-party/nsh/website/elements/data-table.md index e8ac8783281..7c885edd3de 100644 --- a/third-party/nsh/website/elements/data-table.md +++ b/third-party/nsh/website/elements/data-table.md @@ -200,8 +200,8 @@ cell under the pointer (its `row` and `column`), a row's number (`row` only) or press, the cell a menu was asked for has the `cellActive` part, or its row the `rowActive` part where cells do not select. -Screen readers get a grid (named by `accessibilityLabel`) of column headers and cells, the selected ones said to be -selected. +Screen readers get a grid (named by `accessibilityLabel`) whose header and body rows hold their group labels, +column headers and cells, the selected ones said to be selected. ### Dragging a range of cells diff --git a/third-party/nsh/website/elements/date-picker.md b/third-party/nsh/website/elements/date-picker.md index 61c8651dc03..46b646b91e4 100644 --- a/third-party/nsh/website/elements/date-picker.md +++ b/third-party/nsh/website/elements/date-picker.md @@ -132,12 +132,16 @@ change with `onChange({ value })`; the app sets `value` to follow it. Left out, - A single date: a press on a day sets the value and closes the popup. - With `range`, the first press starts the range and the second ends it, as a [calendar's](./calendar.md#value); the - complete range sets the value and closes the popup. + complete range sets the value and closes the popup. `onChangeStart({ value })` reports the start, `[start, null]`, + while the popup stays open for the end. A start that you don't set as `value` is dropped when the popup closes; one + that you set stays, so the popup opens on it again and the next press ends the range, as in a [calendar that keeps its + start](./calendar.md#value). - With `timePrecision` (a single date only), a time field shows under the calendar and every edit of the time is reported. On the desktops, picking a day keeps the popup open for the time and reports the date with its time; a press on the selected day again closes the popup. On phones and tablets, a tap on a day picks it at its time and - closes the sheet, as a single date does; the sheet opens again for the time. A day picked before any time gets - `defaultTime` (default `00:00`). `hourCycle` is how the field counts the hours, as + closes the sheet, as a single date does; the sheet opens again for the time. An app that keeps the sheet open on a + pick (see [Apply and Cancel](#apply-and-cancel)) has the time set in the same sheet. A day picked before any time + gets `defaultTime` (default `00:00`). `hourCycle` is how the field counts the hours, as [TimeField](./time-field.md)'s, the user's included. `cleanable` adds a clear button while there is a value: a press clears it (`onChange({ value: null })`). It comes @@ -147,9 +151,99 @@ after the trigger, not inside it, so a press on it never opens the popup; the ap ## Presets `presets` are buttons beside the calendar that set the value: "Today", "Last 7 days", "Tomorrow at 9". Each is -`{ label, value }`, `value` a date, a range or dates and times, kept as given; a press sets it and closes the popup. -`contentClass` lays out the presets' column and the calendar with the time (a row, `flex-row`); `presetsClass` styles -the column, `presetClass` each button. +`{ label, value, description }`, `value` a date, a range or dates and times, kept as given; a press sets it and closes +the popup. `description` is an optional second line under the label, such as the dates a preset stands for ("Last +month" over "Sep 1 – Sep 30"). `contentClass` lays out the presets' column and the calendar with the time (a row, +`flex-row`); `presetsClass` styles the column, `presetClass` each button, and `presetDescriptionClass` each +description, which takes the button's text styles until its own class changes them (a smaller, muted line). The +button stacks the two lines in a column; a `presetClass` with `flex` makes it a row, so add `flex-col` with it +(`flex flex-col gap-0.5`). + +```tsx +Pick a range} +/> +``` + +## Apply and Cancel + +Many pickers commit on Apply: the user picks, adjusts, and only Apply sets the value, while Cancel leaves it as it +was. `header` and `footer` are the app's content in the popup (the sheet on touch screens), above the presets +and the calendar and below them and the time: typed start and end fields, a title, Cancel and Apply. Their keyboard +stops come before the calendar's and after it. + +A complete pick (a day, a range's end, a preset) is reported with `onChange`, then asks to close the popup with +`onOpenChange({ open: false, reason: "select" })`. With `open` controlled, the app keeps the popup open by not +following a `"select"`: it holds the pick as a pending value and commits it from its `footer`, closing the popup +through `open`. Escape, a press outside and the backdrop still ask to close it, with `onCancel`. + +`value` is then the pending value: the calendar, the clear button and what screen readers hear on the trigger follow +it, while the trigger's content shows the applied one. The clear button and Delete on the trigger clear the value while +the popup is closed, with no Apply to press, so `onChange` commits a change made while it is closed at once. + +A range's first press is reported with `onChangeStart({ value })`, `[start, null]`, and asks for no close: keep it as +the pending value, so the calendar keeps showing the start and Apply has no complete range to commit yet. Enable Apply +only while the pending value is complete, as below. + +```tsx +function Stay() { + const stay = signal(null); + const pending = signal(null); + const open = signal(false); + const complete = () => { + const value = pending(); + return Array.isArray(value) && value[0] !== null && value[1] !== null; + }; + const discard = () => { + pending.set(stay()); + open.set(false); + }; + return ( + { + pending.set(value); + // The clear button and Delete act while it is closed. + if (!open()) stay.set(value); + }} + onChangeStart={({ value }) => pending.set(value)} + open={open()} + onOpenChange={({ open: next, reason }) => { + // A pick stays pending until Apply. + if (reason === "select") return; + next ? open.set(true) : discard(); + }} + header={Stay} + footer={ + + + + + } + trigger={} + /> + ); +} +``` ## The calendar @@ -193,7 +287,7 @@ appears and goes at once; the sheet of touch screens slides in and out on its ow | `disabled` | `.disabled(..)` | `boolean` | `false` | It stays closed and takes no presses or keyboard focus. | | `accessibilityLabel` | `.accessibility_label(..)` | `string` | none | What screen readers call it. | | `dateFormat` | `.date_format(..)` | `string` | `"%Y/%m/%d"` and the time | How screen readers hear the value, in `chrono`'s format. | -| `timePrecision` | `.time_precision(..)` | `"minute" \| "second"` | none | Edit the time of day too, down to this. | +| `timePrecision` | `.time_precision(..)` | `"minute" \| "second"` | none | Edit the time of day too, down to this; on touch screens a tap on a day closes the sheet. | | `hourCycle` | `.hour_cycle(..)` | `"h23" \| "h12"` | `"h23"` | How the time field counts the hours. | | `defaultTime` | `.default_time(..)` | `string` | `"00:00"` | The time a date gets before the user sets one. | | `cleanable` | `.cleanable(..)` | `boolean` | `false` | A clear button while there is a value. | @@ -208,6 +302,7 @@ appears and goes at once; the sheet of touch screens slides in and out on its ow | `contentClass`, `contentStyle` | `.content_class(..)`, `.content_style(..)` | `string`, `StyleProp` | none | The popup's content: the presets beside the calendar and the time. | | `presetsClass`, `presetsStyle` | `.presets_class(..)`, `.presets_style(..)` | `string`, `StyleProp` | none | The presets' column. | | `presetClass`, `presetStyle` | `.preset_class(..)`, `.preset_style(..)` | `string`, `StyleProp` | none | Each preset's button. | +| `presetDescriptionClass`, `presetDescriptionStyle` | `.preset_description_class(..)`, `.preset_description_style(..)` | `string`, `StyleProp` | none | Each preset's description, its second line. | | `calendarClass`, `calendarStyle` | `.calendar_class(..)`, `.calendar_style(..)` | `string`, `StyleProp` | none | The calendar. | | `headerClass` … `itemStyle` | as `Calendar`'s | as `Calendar`'s | none | The calendar's header, body, months, rows and items. | | `renderItem` | `.render_item(..)` | `(item: CalendarEntry) => JSX.Element` | none | Each item of the calendar, drawn by the app from what it is; its states are the items' classes, as `Calendar`'s. | @@ -220,6 +315,8 @@ appears and goes at once; the sheet of touch screens slides in and out on its ow | `clearButton` | `.clear_button(..)` | `JSX.Element` | none | The content of the clear button. | | `clearButtonAccessibilityLabel` | `.clear_button_accessibility_label(..)` | `string` | none | What screen readers call the clear button. | | `trigger` | `.trigger(..)` | `JSX.Element` | none | What opens the popup when pressed; the popup is placed against it. | +| `header` | `.header(..)` | `JSX.Element` | none | What the popup shows above the presets and the calendar (`headerClass` styles the calendar's header, not this). | +| `footer` | `.footer(..)` | `JSX.Element` | none | What the popup shows below the presets, the calendar and the time: Cancel, Apply. | | `class`, `style` | style methods | `string`, `StyleProp` | none | The view around the trigger. | ## Events @@ -227,6 +324,7 @@ appears and goes at once; the sheet of touch screens slides in and out on its ow | Event | Rust | Description | |---|---|---| | `onChange` | `.on_change(\|value\| ..)` | The value changed (a day, a range's end, a preset, the time, the clear button): `{ value }`. Set `value` to follow it. | +| `onChangeStart` | `.on_change_start(\|value\| ..)` | With `range`, the user started a range in the popup: `{ value }`, `[start, null]`. The popup stays open for the end, which `onChange` reports. | | `onOpenChange` | `.on_open_change(\|e\| ..)` | The popup opened or closed, with why (`{ open, reason }`). Set `open` to follow it. | | `onOpen`, `onClose` | `.on_open(..)`, `.on_close(..)` | The popup is shown, or gone. | | `onCancel` | `.on_cancel(..)` | The user closed the popup without a choice (Escape or back, a press outside or on the backdrop). | @@ -239,11 +337,14 @@ appears and goes at once; the sheet of touch screens slides in and out on its ow | The clear button | the picker's view, after the trigger (`cleanable`, while there is a value) | `clearButtonClass`, `clearButtonStyle`; its content `clearButton` | | The popup or sheet | over everything, at the trigger (desktops) or at the bottom (touch screens) | `popupClass`, `popupStyle` | | The backdrop | behind the sheet (touch screens) | `backdropClass`, `backdropStyle` | +| The popup's header | the popup, first (`header`) | the app's own element | | The content | the popup | `contentClass`, `contentStyle` | | The presets | the content, first (`presets`) | `presetsClass`, `presetsStyle`; each `presetClass`, `presetStyle` | +| A preset's description | its button, under the label (`description`) | `presetDescriptionClass`, `presetDescriptionStyle` | | The calendar | the content | `calendarClass`, `calendarStyle`, and [Calendar](./calendar.md#parts)'s parts | | The time's row | under the calendar (`timePrecision`) | `timeClass`, `timeStyle`; its label `timeLabel` | | The time field | the time's row | `timeFieldClass`, `timeFieldStyle`, and [TimeField](./time-field.md#parts)'s parts | +| The popup's footer | the popup, last (`footer`) | the app's own element | ## Keyboard @@ -254,7 +355,8 @@ appears and goes at once; the sheet of touch screens slides in and out on its ow | Escape | Closes the popup without a choice. | In the popup, the calendar's keys move between days and pick one (see [Keyboard](./calendar.md#keyboard)) and the -time field's edit the time (see [Keyboard](./time-field.md#keyboard)). +time field's edit the time (see [Keyboard](./time-field.md#keyboard)). Tab goes through `header`'s controls, the +calendar, the time and `footer`'s controls, in that order. ## Accessibility @@ -262,7 +364,8 @@ time field's edit the time (see [Keyboard](./time-field.md#keyboard)). writes it (by default `2026/10/28`, with the time at `timePrecision`), and it says whether the popup is expanded. `disabled` dims it. - The calendar's days are buttons named by their ISO dates (see [Accessibility](./calendar.md#accessibility)); the - presets are buttons named by their labels; the time field is named by `timeAccessibilityLabel`. + presets are buttons named by their labels, which screen readers follow with their descriptions; the time field is + named by `timeAccessibilityLabel`. - The clear button is a button named by `clearButtonAccessibilityLabel`. See [Accessibility](../docs/accessibility.md) for labels, roles and announcements in general. diff --git a/third-party/nsh/website/elements/dock.md b/third-party/nsh/website/elements/dock.md index 8eb4a896a2f..5dba05418e0 100644 --- a/third-party/nsh/website/elements/dock.md +++ b/third-party/nsh/website/elements/dock.md @@ -174,6 +174,10 @@ actions and the ref's `toggleZoom(tab.group)` acts on its group. It is a child o view, so it keeps its place while the tabs scroll and the bar's own layout places it (`ml-auto` on what it returns pushes it to the end of a `flex-row` bar). In the compact presentation the one tab bar ends with the shown tab's. +`renderTabBarPrefix` is its counterpart at the start of the bar, before the tabs' scroll view, with the same +`DockTab`: room or controls that stay put while the tabs scroll, such as space for window controls over the +top-left group only (`tabBarStyle` would give every group that space). + ```tsx renderToolbar={(tab) => ( @@ -220,10 +224,12 @@ A tab dragged over a group shows where it would land, and the drop puts it there | The middle of a group's content | Joins that group | | An edge of a group's content (its outer 35% on each side) | Splits that group: a new group of its own on that side | -While a drag hovers, the area shows the drop indicator over the part of the group the panel would take (all of its +While a drag hovers a group's content, the area shows the drop indicator over the part of the group the panel would take (all of its content to join, half of it to split): a part the app styles (`dropIndicatorClass`), with content of its own if the app renders some (`renderDropIndicator`, told the -`group`, the `side` it splits off or the tab bar `index`). It moves to each new place natively, easing there and fading in on another group as the last one fades out (at once when the user asks for less motion). What follows the pointer or finger is the app's too +`group` and the `side` it splits off). While a drag runs along a tab bar (the compact strip's too), the area draws an +insertion line instead, between the tabs where the panel would land: a 2-point line as tall as the bar (across a +vertical bar), in the theme's `ring` color, and the content is not tinted. It moves to each new place natively, easing there and fading in on another group as the last one fades out (at once when the user asks for less motion). What follows the pointer or finger is the app's too (`renderDragPreview`). A drop is one change of the layout, reported once; a drop that would change nothing changes nothing. A locked area, a zoomed one, and a group's last panel when nothing sits beside the group drag nothing. @@ -362,7 +368,8 @@ rest of the area. | `renderPanel` | `.render_panel(\|panel\| ..)` | `(panel: DockPanel) => JSX.Element` | none | A panel's content, by its key (`panel.id`). | | `renderTab` | `.render_tab(\|tab\| ..)` | `(tab: DockTab) => JSX.Element` | the key | What a tab shows. | | `renderToolbar` | `.render_toolbar(\|tab\| ..)` | `(tab: DockTab) => JSX.Element` | none | The toolbar at the end of a group's tab bar, for its displayed tab: that panel's actions (a new tab, a zoom button). | -| `renderDropIndicator` | `.render_drop_indicator(\|drop\| ..)` | `(drop: DockDropIndicator) => JSX.Element` | none | What is inside the drop indicator: `group`, `side`, `index`. | +| `renderTabBarPrefix` | `.render_tab_bar_prefix(\|tab\| ..)` | `(tab: DockTab) => JSX.Element` | none | What a group's tab bar starts with, before its tabs, for its displayed tab. | +| `renderDropIndicator` | `.render_drop_indicator(\|drop\| ..)` | `(drop: DockDropIndicator) => JSX.Element` | none | What is inside the drop indicator over a group's content: `group`, `side` (not called over a tab bar, which shows the insertion line). | | `renderDock` | `.render_dock(\|dock\| ..)` | `(dock: DockInfo) => JSX.Element` | none | A dock's own chrome, before its layout: `placement`, `open` (shown in the current presentation), `size`, `collapsible`. | | `renderEmpty` | `.render_empty(\|placement\| ..)` | `(placement: DockPlacement) => JSX.Element` | none | What an empty center shows. | | `renderDragPreview` | `.render_drag_preview(\|tab\| ..)` | `(tab: DockTab) => JSX.Element` | none | What follows the pointer or finger while a tab is dragged. | @@ -400,12 +407,13 @@ rest of the area. | A tab group | a region | `groupClass`, `groupStyle` | | | A tab bar | a group | `tabBarClass`, `tabBarStyle` | | | A tab | a tab bar | `tabClass`, `tabStyle`; `renderTab` | `selected:`, `active:`, `hover:` | +| Tab bar prefix | the start of a tab bar | `renderTabBarPrefix` | | | Toolbar | the end of a tab bar | `renderToolbar` | | | A group's content | a group | `contentClass`, `contentStyle`; `renderPanel` | | | A handle's indicator | between a split's groups, at a dock's edge | `handleClass`, `handleStyle` | `group-hover:`, `group-active:` | | A handle's thumb | centered on a handle's line | `handleThumbClass`, `handleThumbStyle` | `group-hover:`, `group-active:` (pressed until the drag ends) | | A dock | an edge | `dockClass`, `dockStyle`; `renderDock` | | -| The drop indicator | over a group during a drag | `dropIndicatorClass`, `dropIndicatorStyle`; `renderDropIndicator` | | +| The drop indicator | over a group's content during a drag (a tab bar shows an insertion line) | `dropIndicatorClass`, `dropIndicatorStyle`; `renderDropIndicator` | | | The drag preview | under the pointer or finger | `renderDragPreview` | | | The empty center | the center | `renderEmpty` | | | A drawer, the sheet, the backdrop | over the center, compact | `drawerClass`, `sheetClass`, `backdropClass` (and their styles) | | diff --git a/third-party/nsh/website/elements/input.md b/third-party/nsh/website/elements/input.md index 010dbbceccd..3190a16ad2a 100644 --- a/third-party/nsh/website/elements/input.md +++ b/third-party/nsh/website/elements/input.md @@ -159,6 +159,7 @@ input().auto_fill(AutoFill::OneTimeCode).keyboard_type(KeyboardType::Number) | `onChange` | `.on_change(\|text: &str\| ..)` | `{ value }` | The user changed the text: `value` is the text now. | | `onSubmit` | `.on_submit(\|text: &str\| ..)` | `{ text }` | The return key was pressed in an input that submits (single line, or `submitBehavior` `"submit"` / `"blurAndSubmit"`). | | `onFocus` / `onBlur` | `.on_focus` / `.on_blur` | none | The input gained / lost focus. | +| `onPress` | `.on_press` | `PressEvent` (none in Rust) | A click or a tap on the input (its text or the padding around it), after the focus it gives: a list that opens and closes on a press on its input. The views around the input hear no press from it. | | `onSelectionChange` | `.on_selection_change(\|s: &Selection\| ..)` | `{ start, end }` | The caret or selection moved (UTF-16 units). | | `onPaste` | `.on_paste(\|e: &PasteEvent\| ..)` | `{ text, html, files, tooLarge, uris }` | The user pasted: the text, its formatting as HTML (Linux, web), images (a screenshot) as `File`s, files larger than `pasteMaxSize` by name, type and size (`tooLarge`), local files' `file:` URLs. Before the `onChange` of the text it inserts ([forms and keyboard](../docs/forms-and-keyboard.md#pasting-images-and-files)). | | `onCaretMove` | `.on_caret_move(\|e: &CaretEvent\| ..)` | `{ bounds, pageBounds }` | The caret moved, with the selection or as the text scrolled or wrapped: `bounds` is where it is in the input, `pageBounds` in the window, an `Overlay`'s `anchor` ([forms and keyboard](../docs/forms-and-keyboard.md#the-caret)). | diff --git a/third-party/nsh/website/elements/otp-input.md b/third-party/nsh/website/elements/otp-input.md index 31f74cf26eb..69bf917ff48 100644 --- a/third-party/nsh/website/elements/otp-input.md +++ b/third-party/nsh/website/elements/otp-input.md @@ -1,6 +1,6 @@ --- title: OtpInput -description: "The OtpInput component: a fixed-length numeric one-time code typed, pasted or autofilled into one native field, shown in cells, groups and a caret the app styles." +description: "The OtpInput component: a fixed-length one-time code (digits, or letters and digits) typed, pasted or autofilled into one native field, shown in cells, groups and a caret the app styles." group: base demo: el-otp-input --- @@ -97,6 +97,7 @@ What the user does is read from the field, with the caret always at its end: | Types a full-width digit (`0`–`9`, an East Asian input method's) | The ASCII digit is added. | | Types anything else | Nothing changes; the field drops it. | | Presses Backspace | The last digit is removed. | +| With `validationType="alphanumeric"`: types a letter, in either case | It is added upper-cased (`a` as `A`), as a digit is; full-width letters (`a`, `B`) as ASCII ones. | | Pastes, or the system autofills a code | Its digits are added the same way; text with `length` digits or more (`123-456`, a message's code) replaces the code with its first `length` digits. | `onChange` reports each change with the new code, and `onComplete` follows it when the change filled the last cell, @@ -107,6 +108,7 @@ so the app verifies the code there. | Prop | Rust | Type | Default | Description | |---|---|---|---|---| | `length` | `.length(..)` | `number` | required | How many digits the code has: one cell each. | +| `validationType` | `.validation_type(..)` | `"numeric" \| "alphanumeric"` | `"numeric"` | Which characters the code takes. `"numeric"`: digits, on the number pad. `"alphanumeric"`: ASCII letters and digits, on the full keyboard; letters are upper-cased, so the cells show and `onChange` reports `AB12CD34` for `ab12cd34`, and the app compares codes without case. | | `value` | `.value(..)` | `string` | none | The code, controlled by the app (shown as it is). Without it the input keeps its own. | | `defaultValue` | `.default_value(..)` | `string` | none | The code at first, while `value` is not set. | | `masked` | `.masked(..)` | `boolean` | `false` | Filled cells show a bullet instead of their digit, and the field is a secure one: screen readers do not read the code, and the system keeps it out of its suggestions. | @@ -171,3 +173,5 @@ See [Accessibility](../docs/accessibility.md) for labels, roles and announcement the number keyboard comes up. - macOS, Windows, Linux and the web: typing and paste go to the field (in the browser, with `inputmode="numeric"` for a phone's number keyboard), and the I-beam pointer shows over the cells. +- With `validationType="alphanumeric"` the full keyboard comes up instead of the number pad (`inputmode="text"` in + the browser), with capitals on where the platform offers it (`autoCapitalize="characters"`). diff --git a/third-party/nsh/website/elements/rich-editor.md b/third-party/nsh/website/elements/rich-editor.md index 4ec7d4c4a20..ec6b4384933 100644 --- a/third-party/nsh/website/elements/rich-editor.md +++ b/third-party/nsh/website/elements/rich-editor.md @@ -74,12 +74,17 @@ reading view that turns to editing when someone starts typing. Text the app inse ## Styling The editor draws the document with the app's look: `classes` and `styles` style its parts (`root`, `content`, `caret`, -`selection`, `placeholder`, `composition`, `selectedNode`, `listMarker`, the touch selection's handles +`selection`, `placeholder`, `composition`, `selectedNode`, `listMarker`, a task item's `taskCheckbox` and the +`taskCheckmark` in it, the touch selection's handles `selectionHandle`, `selectionHandleStart`, `selectionHandleEnd`, and for tables `selectedCell`, `tableGrip`, `tableResizeHandle`, `tableDropIndicator`), its nodes by type (`nodes: { heading: "text-2xl font-bold", "heading[level=2]": "text-xl" }`) and its marks (`marks: { bold: "font-bold" }`). The items of lists whose node spec sets `extra.listMarker` to `"bullet"` or `"ordered"` (the starter schema's lists) show a marker in the `listMarker` part: `•`, `◦`, `▪` by depth, or numbers from the list's `start`, placed before the item, in the list's indent (`pl-6` on the list, as a browser indents `ul`). +A task item's checkbox is a box of the app's (`taskCheckbox`, whose `checked:` classes follow the item). Give the +`taskCheckmark` part classes or a style and the box shows a `✓` while the item is done (12 points, bold, +`foreground` by default: `text-primary` on an outlined box, `text-primary-foreground` on a filled one); without it the +box draws nothing of its own. ```tsx attach(files)} + onPasteFiles={({ paste }) => attach(paste.files)} onFileDrop={({ uris, mimeTypes }) => attachFiles(uris, mimeTypes)} /> ``` @@ -345,8 +352,30 @@ colors fenced code, with the same syntaxes and palette: that is `CodeBlockHighli code plain. Typing in a long block does not wait for the colors: they are worked out off the engine thread and arrive a moment later. On the web the syntaxes come from the page once, the first time a block needs them, shared with `TextView`; they are not in the first download. Without the platform's feature `highlight` code stays plain. +A block's `language` takes the names highlight.js and lowlight use (`objectivec`, `plist`, `shellsession`, ...), and a +whole fence info string is read by its first word (`ts title="a.ts"`, `rust,ignore`), so documents from other editors +keep their colors. + +A block that names no language stays plain, unless the extension names one for it. `defaultLanguage` (Tiptap's +option) gives every such block a language: `CodeBlockHighlight.configure({ defaultLanguage: "rust" })`, or +`StarterKit.configure({ codeBlockHighlight: { defaultLanguage: "rust" } })`. The language only colors the block: the +document keeps no language, so collaborators and saved content see no change. In Rust it is `kit::code_block_highlight()`, part of `kit::starter_kit()` and of `starter::plugins`. +`kit::code_block_highlight_with(options)` also takes `CodeBlockHighlightOptions`: `default_language`, and +`detect_language` (an `Arc Option + Send + Sync>`), the app's own guess of a block's language +from its code, as Tiptap's `CodeBlockLowlight` guesses one when no `defaultLanguage` is set. A block's own `language` comes first, then `detect_language`, then +`default_language`; when none gives one, the block stays plain. `detect_language` is asked once each time an unlabelled +block's code changes, on the engine thread, so keep it quick. It is Rust only: functions in a built-in extension's TSX +options would run JS while typing. + +```rust +let mut options = CodeBlockHighlightOptions::default(); +options.detect_language = Some(Arc::new(|code: &str| { + code.trim_start().starts_with("fn ").then(|| "rust".to_owned()) +})); +let highlight = kit::code_block_highlight_with(options); +``` Each extension adds Tiptap's commands, which `command(name, args)` runs: `toggleBold`, `setItalic`, `unsetStrike`, `toggleHeading({ level })`, `setParagraph`, `toggleBlockquote`, `toggleBulletList`, @@ -649,7 +678,7 @@ editor.run(addRowAfter()); ``` The table takes the options `resizable` (true), `cellMinWidth` (25), `lastColumnResizable` (true), -`allowTableNodeSelection` (false) and `HTMLAttributes`; `TableKit.configure({ tableHeader: false })` leaves one +`allowTableNodeSelection` (false), `fullWidth` (false) and `HTMLAttributes`; `TableKit.configure({ tableHeader: false })` leaves one extension out. Cells hold blocks and have `colspan`, `rowspan` and `colwidth` (a width in points per column they span); rows have a `height`. @@ -660,7 +689,9 @@ the selected cells, and delete the table when all its cells are selected. Columns fit the text and components in their cells. Long paragraphs wrap, and a table wider than the editor scrolls horizontally inside the document. A saved or dragged column width takes precedence. Each column is at -least `cellMinWidth` wide and each row is at least its saved `height`. Its look starts from the theme: a +least `cellMinWidth` wide and each row is at least its saved `height`. With `fullWidth: true` the table is at least +as wide as the editor's text: the columns without a saved width share the room the others leave, and once every +column has a width the last one takes that room, its saved width the least it gets. Its look starts from the theme: a 1-point `border` grid, header cells on `muted`, padded cells, and each selected cell under the `selectedCell` part in the selection color. `classes.nodes` (`table`, `tableCell`, `tableHeader`) and the parts restyle all of it. Up and Down on a cell's first or last line go to the cell above or below. diff --git a/third-party/nsh/website/elements/select.md b/third-party/nsh/website/elements/select.md index fd2958a6191..04b2174a0eb 100644 --- a/third-party/nsh/website/elements/select.md +++ b/third-party/nsh/website/elements/select.md @@ -235,7 +235,45 @@ keyboard, and Return chooses it. `empty` is what the list shows while nothing ma ``` On the desktops the search field takes the keyboard as the list opens; on touch screens the keyboard comes up when -the field is pressed. Each opening starts with an empty search. +the field is pressed. + +The query is the field's own, starting each opening from `defaultQuery` (else empty), or the app's with `query`: +`onQueryChange({ query })` reports what is typed in the field, and the app sets `query` to follow it. A query the app +owns stays from one opening to the next until the app changes it, and the rows `renderItem` draws can mark the match. +This select clears its query once the list is gone (`onClose`), so the list leaves with the rows it showed; clear it +there rather than in `onOpen`, where the query changes after the list opened and, as a typed one would, moves the +highlight to its first match: + +```tsx +const query = signal(""); +// The title around the query's first match: before, the match, after. +const split = (title: string, q: string) => { + const at = q ? title.toLowerCase().indexOf(q.toLowerCase()) : -1; + if (at < 0) return [title, "", ""]; + return [title.slice(0, at), title.slice(at, at + q.length), title.slice(at + q.length)]; +}; + +` 的相同;在 `range` 时为 `[start, end]`;在 `timePrecision` 时为日期和时间 `"2026-10-28T09:30"`(精确到秒时为 `"2026-10-28T09:30:15"`),与 `` 的相同;`null` 表示没有。有 `value` 时,值由应用持有:选择器显示它,并用 `onChange({ value })` 报告每次变化;应用把 `value` 设为报告的值以跟随它。省略 `value` 时,选择器自己保存值,初始为 `defaultValue`。 - 单个日期:按下某一天会设置值并关闭弹出层。 -- 在 `range` 时,第一次按压开始范围,第二次结束范围,与[日历的](./calendar.md#value)相同;完整的范围设置值并关闭弹出层。 -- 在 `timePrecision` 时(仅限单个日期),日历下方显示一个时间输入框,时间的每次编辑都会报告。在桌面上,选中某一天时弹出层保持打开以便设置时间,并报告带时间的日期;再次按下已选中的日期会关闭弹出层。在手机和平板上,点一下某天就以它的时间选中这一天并关闭底部面板,与单个日期相同;再次打开面板即可设置时间。在设置任何时间之前选中的日期使用 `defaultTime`(默认 `00:00`)。`hourCycle` 是时间输入框的小时计法,与 [TimeField](./time-field.md) 的相同,包括用户的。 +- 在 `range` 时,第一次按压开始范围,第二次结束范围,与[日历的](./calendar.md#value)相同;完整的范围设置值并关闭弹出层。`onChangeStart({ value })` 报告开始日,值为 `[start, null]`,弹出层保持打开,等待选择结束日。没有设为 `value` 的开始日会在弹出层关闭时丢掉;设为 `value` 的开始日会保留,再次打开弹出层时仍显示它,下一次按压就结束范围,与[持有开始日的日历](./calendar.md#value)相同。 +- 在 `timePrecision` 时(仅限单个日期),日历下方显示一个时间输入框,时间的每次编辑都会报告。在桌面上,选中某一天时弹出层保持打开以便设置时间,并报告带时间的日期;再次按下已选中的日期会关闭弹出层。在手机和平板上,点一下某天就以它的时间选中这一天并关闭底部面板,与单个日期相同;再次打开面板即可设置时间。应用在选择后让面板保持打开时(见[应用与取消](#apply-and-cancel)),时间就在同一面板中设置。在设置任何时间之前选中的日期使用 `defaultTime`(默认 `00:00`)。`hourCycle` 是时间输入框的小时计法,与 [TimeField](./time-field.md) 的相同,包括用户的。 `cleanable` 会在有值时加一个清除按钮:按下它会清除值(`onChange({ value: null })`)。这个按钮在触发元素之后,不在它里面,所以按它不会打开弹出层;由应用摆放并填充内容(`clearButton`),和[选择框的清除按钮](./select.md#value)一样。 @@ -125,7 +125,85 @@ fn trip_dates() -> impl IntoElement { ## 预设 -`presets` 是日历旁边设置值的按钮:"今天"、"最近 7 天"、"明天 9 点"。每个是 `{ label, value }`,`value` 为一个日期、一个范围或日期时间,按原样保存;按下它会设置值并关闭弹出层。`contentClass` 排列预设列与日历和时间(一行,`flex-row`);`presetsClass` 为这一列设置样式,`presetClass` 为每个按钮设置样式。 +`presets` 是日历旁边设置值的按钮:"今天"、"最近 7 天"、"明天 9 点"。每个是 `{ label, value, description }`,`value` 为一个日期、一个范围或日期时间,按原样保存;按下它会设置值并关闭弹出层。`description` 是标签下方可选的第二行,例如预设代表的日期("上个月"下方的"9月1日 – 9月30日")。`contentClass` 排列预设列与日历和时间(一行,`flex-row`);`presetsClass` 为这一列设置样式,`presetClass` 为每个按钮设置样式,`presetDescriptionClass` 为每个说明设置样式:说明继承按钮的文字样式,由它自己的类来改变(更小、更淡的一行)。按钮把这两行排成一列;`presetClass` 带 `flex` 时会排成一行,所以要同时加上 `flex-col`(`flex flex-col gap-0.5`)。 + +```tsx +选择范围} +/> +``` + + + +## 应用与取消 + +很多选择器在按下"应用"时才提交:用户选好、调整,只有"应用"会设置值,"取消"则保持原值不变。`header` 和 `footer` 是应用放在弹出层(触屏设备上是底部面板)里的内容,分别在预设和日历的上方、在它们和时间的下方:可输入的开始和结束日期、标题、"取消"和"应用"按钮。它们的键盘焦点停靠点分别在日历的之前和之后。 + +一次完整的选择(一天、范围的结束日、一个预设)先由 `onChange` 报告,再通过 `onOpenChange({ open: false, reason: "select" })` 请求关闭弹出层。`open` 受控时,应用不跟随 `"select"` 就能让弹出层保持打开:把选择保存为待定值,在自己的 `footer` 中提交,同时通过 `open` 关闭弹出层。Escape、在外面按压和背景层仍会请求关闭它,并触发 `onCancel`。 + +这时 `value` 就是待定值:日历、清除按钮以及屏幕阅读器在触发元素上听到的值都跟随它,而触发元素的内容显示已应用的值。清除按钮和触发元素上的 Delete 在弹出层关闭时清除值,此时没有"应用"可按,所以弹出层关闭时发生的变化要在 `onChange` 中立即提交。 + +范围的第一次按压由 `onChangeStart({ value })` 报告,值为 `[start, null]`,不会请求关闭:把它保存为待定值,日历就继续显示开始日,"应用"也还没有完整的范围可提交。只在待定值完整时启用"应用",如下所示。 + +```tsx +function Stay() { + const stay = signal(null); + const pending = signal(null); + const open = signal(false); + const complete = () => { + const value = pending(); + return Array.isArray(value) && value[0] !== null && value[1] !== null; + }; + const discard = () => { + pending.set(stay()); + open.set(false); + }; + return ( + { + pending.set(value); + // The clear button and Delete act while it is closed. + if (!open()) stay.set(value); + }} + onChangeStart={({ value }) => pending.set(value)} + open={open()} + onOpenChange={({ open: next, reason }) => { + // A pick stays pending until Apply. + if (reason === "select") return; + next ? open.set(true) : discard(); + }} + header={Stay} + footer={ + + + + + } + trigger={} + /> + ); +} +``` @@ -163,7 +241,7 @@ fn trip_dates() -> impl IntoElement { | `disabled` | `.disabled(..)` | `boolean` | `false` | 保持关闭,不接受按压和键盘焦点。 | | `accessibilityLabel` | `.accessibility_label(..)` | `string` | 无 | 屏幕阅读器对它的称呼。 | | `dateFormat` | `.date_format(..)` | `string` | `"%Y/%m/%d"` 加时间 | 屏幕阅读器听到的值的格式,采用 `chrono` 的格式。 | -| `timePrecision` | `.time_precision(..)` | `"minute" \| "second"` | 无 | 同时编辑一天中的时间,精确到此单位。 | +| `timePrecision` | `.time_precision(..)` | `"minute" \| "second"` | 无 | 同时编辑一天中的时间,精确到此单位;在触屏设备上点一下某天会关闭底部面板。 | | `hourCycle` | `.hour_cycle(..)` | `"h23" \| "h12"` | `"h23"` | 时间输入框的小时计法。 | | `defaultTime` | `.default_time(..)` | `string` | `"00:00"` | 用户设置时间之前日期使用的时间。 | | `cleanable` | `.cleanable(..)` | `boolean` | `false` | 有值时显示清除按钮。 | @@ -178,6 +256,7 @@ fn trip_dates() -> impl IntoElement { | `contentClass`、`contentStyle` | `.content_class(..)`、`.content_style(..)` | `string`、`StyleProp` | 无 | 弹出层的内容:预设在日历和时间旁边。 | | `presetsClass`、`presetsStyle` | `.presets_class(..)`、`.presets_style(..)` | `string`、`StyleProp` | 无 | 预设列。 | | `presetClass`、`presetStyle` | `.preset_class(..)`、`.preset_style(..)` | `string`、`StyleProp` | 无 | 每个预设按钮。 | +| `presetDescriptionClass`、`presetDescriptionStyle` | `.preset_description_class(..)`、`.preset_description_style(..)` | `string`、`StyleProp` | 无 | 每个预设的说明,即第二行。 | | `calendarClass`、`calendarStyle` | `.calendar_class(..)`、`.calendar_style(..)` | `string`、`StyleProp` | 无 | 日历。 | | `headerClass` … `itemStyle` | 同 `Calendar` | 同 `Calendar` | 无 | 日历的头部、主体、各月、各行和各条目。 | | `renderItem` | `.render_item(..)` | `(item: CalendarEntry) => JSX.Element` | 无 | 由应用根据条目本身绘制的日历条目;状态是条目的类,与 `Calendar` 的相同。 | @@ -190,6 +269,8 @@ fn trip_dates() -> impl IntoElement { | `clearButton` | `.clear_button(..)` | `JSX.Element` | 无 | 清除按钮的内容。 | | `clearButtonAccessibilityLabel` | `.clear_button_accessibility_label(..)` | `string` | 无 | 屏幕阅读器对清除按钮的称呼。 | | `trigger` | `.trigger(..)` | `JSX.Element` | 无 | 按下时打开弹出层的元素;弹出层相对它放置。 | +| `header` | `.header(..)` | `JSX.Element` | 无 | 弹出层在预设和日历上方显示的内容(`headerClass` 是日历头部的样式,不作用于它)。 | +| `footer` | `.footer(..)` | `JSX.Element` | 无 | 弹出层在预设、日历和时间下方显示的内容:"取消"、"应用"。 | | `class`、`style` | 样式方法 | `string`、`StyleProp` | 无 | 包住触发元素的视图。 | @@ -199,6 +280,7 @@ fn trip_dates() -> impl IntoElement { | 事件 | Rust | 说明 | |---|---|---| | `onChange` | `.on_change(\|value\| ..)` | 值变化了(一天、范围的结束日、一个预设、时间、清除按钮):`{ value }`。设置 `value` 以跟随它。 | +| `onChangeStart` | `.on_change_start(\|value\| ..)` | 在 `range` 时,用户在弹出层中开始了一个范围:`{ value }`,即 `[start, null]`。弹出层保持打开等待结束日,结束日由 `onChange` 报告。 | | `onOpenChange` | `.on_open_change(\|e\| ..)` | 弹出层打开或关闭了,以及原因(`{ open, reason }`)。设置 `open` 以跟随它。 | | `onOpen`、`onClose` | `.on_open(..)`、`.on_close(..)` | 弹出层已显示,或已消失。 | | `onCancel` | `.on_cancel(..)` | 用户没有做出选择就关闭了弹出层(Escape 或返回、在外面或背景层上按压)。 | @@ -213,11 +295,14 @@ fn trip_dates() -> impl IntoElement { | 清除按钮 | 选择器的视图,触发元素之后(`cleanable`,有值时) | `clearButtonClass`、`clearButtonStyle`;内容 `clearButton` | | 弹出层或 sheet | 在一切之上,位于触发元素处(桌面平台)或底部(触屏设备) | `popupClass`、`popupStyle` | | 背景层 | sheet 后面(触屏设备) | `backdropClass`、`backdropStyle` | +| 弹出层头部 | 弹出层中的第一个(`header`) | 应用自己的元素 | | 内容 | 弹出层中 | `contentClass`、`contentStyle` | | 预设 | 内容中的第一个(`presets`) | `presetsClass`、`presetsStyle`;每个 `presetClass`、`presetStyle` | +| 预设的说明 | 预设按钮中,标签下方(`description`) | `presetDescriptionClass`、`presetDescriptionStyle` | | 日历 | 内容中 | `calendarClass`、`calendarStyle`,以及 [Calendar](./calendar.md#parts) 的部件 | | 时间行 | 日历下方(`timePrecision`) | `timeClass`、`timeStyle`;标签 `timeLabel` | | 时间输入框 | 时间行中 | `timeFieldClass`、`timeFieldStyle`,以及 [TimeField](./time-field.md#parts) 的部件 | +| 弹出层底部 | 弹出层中的最后一个(`footer`) | 应用自己的元素 | @@ -229,14 +314,14 @@ fn trip_dates() -> impl IntoElement { | Delete、Backspace(在触发元素上) | 弹出层关闭时清除值。 | | Escape | 不做选择就关闭弹出层。 | -在弹出层中,日历的按键在日期间移动并选中一天(见[键盘](./calendar.md#keyboard)),时间输入框的按键编辑时间(见[键盘](./time-field.md#keyboard))。 +在弹出层中,日历的按键在日期间移动并选中一天(见[键盘](./calendar.md#keyboard)),时间输入框的按键编辑时间(见[键盘](./time-field.md#keyboard))。Tab 依次经过 `header` 的控件、日历、时间和 `footer` 的控件。 ## 无障碍 - 触发元素对屏幕阅读器来说是一个组合框(combobox):它的标签是 `accessibilityLabel`,值是按 `dateFormat` 写出的日期(默认 `2026/10/28`,在 `timePrecision` 时带时间),并说明弹出层是否展开。`disabled` 时它显示为不可用。 -- 日历的日期是按钮,以其 ISO 日期命名(见[无障碍](./calendar.md#accessibility));预设是按钮,以其标签命名;时间输入框的名称来自 `timeAccessibilityLabel`。 +- 日历的日期是按钮,以其 ISO 日期命名(见[无障碍](./calendar.md#accessibility));预设是按钮,以其标签命名,屏幕阅读器在标签之后读出它的说明;时间输入框的名称来自 `timeAccessibilityLabel`。 - 清除按钮是一个按钮,名称来自 `clearButtonAccessibilityLabel`。 关于标签、角色和播报的一般说明,见[无障碍](../docs/accessibility.md)。 diff --git a/third-party/nsh/website/zh-CN/elements/dock.md b/third-party/nsh/website/zh-CN/elements/dock.md index 72498b00561..bdb298c0f56 100644 --- a/third-party/nsh/website/zh-CN/elements/dock.md +++ b/third-party/nsh/website/zh-CN/elements/dock.md @@ -146,6 +146,8 @@ fn workspace() -> impl IntoElement { `renderToolbar` 为组当前显示的标签页绘制标签栏末尾的工具栏:这个面板自己的操作,例如新建标签页或放大按钮,对应 GPUI dock 面板的 toolbar buttons。它拿到的是和 `renderTab` 相同的 `DockTab`(`panel`、`group`、`index`、`zoomed` 等),所以不同面板可以显示不同的操作,ref 的 `toggleZoom(tab.group)` 作用于它所在的组。它是标签栏里位于标签页滚动视图之后的子元素,标签页滚动时它保持原位,由标签栏自己的布局摆放(在 `flex-row` 的标签栏里,给返回的元素加 `ml-auto` 可以把它推到末尾)。在紧凑方式中,唯一的标签栏以当前显示的标签页的工具栏结尾。 +`renderTabBarPrefix` 对应标签栏开头,位于标签页滚动视图之前,拿到同样的 `DockTab`:放标签页滚动时保持原位的留白或控件,例如只给左上角的组给窗口按钮留位(`tabBarStyle` 会给所有组都留)。 + ```tsx renderToolbar={(tab) => ( @@ -194,7 +196,7 @@ let area!: DockAreaRef; | 组内容的中间 | 加入那个组 | | 组内容的边缘(每侧外沿 35%) | 分开那个组:在那一侧新建一个只有它的组 | -拖动悬停时,区域在面板将占据的那部分组上显示放置指示(加入时是全部内容,分开时是一半):这是由应用设置样式的部件(`dropIndicatorClass`),应用也可以绘制其中的内容(`renderDropIndicator`,它会得到 `group`、要分出的 `side` 或标签栏的 `index`)。放置指示以原生方式移到每个新位置:缓动过去,换到另一个组时淡入,上一个组的淡出(用户要求减少动态效果时直接到位)。跟随指针或手指的内容也属于应用(`renderDragPreview`)。一次放下是布局的一次改动,只报告一次;不会带来变化的放下什么也不改变。 +拖动悬停在组的内容上时,区域在面板将占据的那部分组上显示放置指示(加入时是全部内容,分开时是一半):这是由应用设置样式的部件(`dropIndicatorClass`),应用也可以绘制其中的内容(`renderDropIndicator`,它会得到 `group` 和要分出的 `side`)。沿标签栏拖动时(紧凑布局的标签条也一样),区域改为在面板将落入的两个标签之间画一条插入线:2 点宽、与标签栏等高(竖向标签栏中为横线),颜色取主题的 `ring`,内容区不着色。放置指示以原生方式移到每个新位置:缓动过去,换到另一个组时淡入,上一个组的淡出(用户要求减少动态效果时直接到位)。跟随指针或手指的内容也属于应用(`renderDragPreview`)。一次放下是布局的一次改动,只报告一次;不会带来变化的放下什么也不改变。 锁定的区域、放大的区域,以及旁边没有其他内容的组里的最后一个面板,都不能拖动。 @@ -306,7 +308,8 @@ const terminalOpen = signal(true); | `renderPanel` | `.render_panel(\|panel\| ..)` | `(panel: DockPanel) => JSX.Element` | 无 | 面板的内容,按它的键(`panel.id`)。 | | `renderTab` | `.render_tab(\|tab\| ..)` | `(tab: DockTab) => JSX.Element` | 面板的键 | 标签页显示的内容。 | | `renderToolbar` | `.render_toolbar(\|tab\| ..)` | `(tab: DockTab) => JSX.Element` | 无 | 标签栏末尾的工具栏,对应组当前显示的标签页:这个面板自己的操作(新建标签页、放大按钮)。 | -| `renderDropIndicator` | `.render_drop_indicator(\|drop\| ..)` | `(drop: DockDropIndicator) => JSX.Element` | 无 | 放置指示里的内容:`group`、`side`、`index`。 | +| `renderTabBarPrefix` | `.render_tab_bar_prefix(\|tab\| ..)` | `(tab: DockTab) => JSX.Element` | 无 | 标签栏开头、标签页之前的内容,对应组当前显示的标签页。 | +| `renderDropIndicator` | `.render_drop_indicator(\|drop\| ..)` | `(drop: DockDropIndicator) => JSX.Element` | 无 | 组内容上方放置指示里的内容:`group`、`side`(标签栏上显示插入线,不调用它)。 | | `renderDock` | `.render_dock(\|dock\| ..)` | `(dock: DockInfo) => JSX.Element` | 无 | 停靠区自己的装饰,位于它的布局之前:`placement`、`open`(在当前呈现方式中是否显示)、`size`、`collapsible`。 | | `renderEmpty` | `.render_empty(\|placement\| ..)` | `(placement: DockPlacement) => JSX.Element` | 无 | 中心区域为空时显示的内容。 | | `renderDragPreview` | `.render_drag_preview(\|tab\| ..)` | `(tab: DockTab) => JSX.Element` | 无 | 拖动标签页时跟随指针或手指的内容。 | @@ -348,12 +351,13 @@ const terminalOpen = signal(true); | 标签组 | 区域里 | `groupClass`、`groupStyle` | | | 标签栏 | 组里 | `tabBarClass`、`tabBarStyle` | | | 标签页 | 标签栏里 | `tabClass`、`tabStyle`;`renderTab` | `selected:`、`active:`、`hover:` | +| 标签栏前缀 | 标签栏开头 | `renderTabBarPrefix` | | | 工具栏 | 标签栏末尾 | `renderToolbar` | | | 组的内容 | 组里 | `contentClass`、`contentStyle`;`renderPanel` | | | 手柄的指示器 | 分栏的组之间、停靠区的边缘 | `handleClass`、`handleStyle` | `group-hover:`、`group-active:` | | 手柄的握把 | 居中在手柄的线上 | `handleThumbClass`、`handleThumbStyle` | `group-hover:`、`group-active:`(直到拖动结束都保持按下) | | 停靠区 | 边缘 | `dockClass`、`dockStyle`;`renderDock` | | -| 放置指示 | 拖动时位于组上方 | `dropIndicatorClass`、`dropIndicatorStyle`;`renderDropIndicator` | | +| 放置指示 | 拖动时位于组的内容上方(标签栏上为插入线) | `dropIndicatorClass`、`dropIndicatorStyle`;`renderDropIndicator` | | | 拖动预览 | 指针或手指下方 | `renderDragPreview` | | | 空的中心区域 | 中心区域 | `renderEmpty` | | | 抽屉、底部面板、背景层 | 中心区域之上,紧凑方式 | `drawerClass`、`sheetClass`、`backdropClass`(及对应的样式) | | diff --git a/third-party/nsh/website/zh-CN/elements/input.md b/third-party/nsh/website/zh-CN/elements/input.md index 65310229c2c..a80f886b276 100644 --- a/third-party/nsh/website/zh-CN/elements/input.md +++ b/third-party/nsh/website/zh-CN/elements/input.md @@ -150,6 +150,7 @@ input().auto_fill(AutoFill::OneTimeCode).keyboard_type(KeyboardType::Number) | `onChange` | `.on_change(\|text: &str\| ..)` | `{ value }` | 用户修改了文本:`value` 是现在的文本。 | | `onSubmit` | `.on_submit(\|text: &str\| ..)` | `{ text }` | 在会提交的输入框中按下了回车键(单行,或 `submitBehavior` 为 `"submit"` / `"blurAndSubmit"`)。 | | `onFocus` / `onBlur` | `.on_focus` / `.on_blur` | 无 | 输入框获得 / 失去焦点。 | +| `onPress` | `.on_press` | `PressEvent`(Rust 中无) | 点击或轻点输入框(它的文字或文字周围的内边距),在这次按下带来的焦点之后报告:例如按下输入框时打开、再按下时关闭的列表。输入框外层的视图不会因此收到按下。 | | `onSelectionChange` | `.on_selection_change(\|s: &Selection\| ..)` | `{ start, end }` | 光标或选区移动(UTF-16 单位)。 | | `onPaste` | `.on_paste(\|e: &PasteEvent\| ..)` | `{ text, html, files, tooLarge, uris }` | 用户粘贴了内容:文本、带格式的 HTML(Linux、Web)、作为 `File` 的图片(如截图)、超过 `pasteMaxSize` 的文件的名称、类型和大小(`tooLarge`)、本地文件的 `file:` URL。在它插入的文本的 `onChange` 之前([表单与键盘](../docs/forms-and-keyboard.md#粘贴图片和文件))。 | | `onCaretMove` | `.on_caret_move(\|e: &CaretEvent\| ..)` | `{ bounds, pageBounds }` | 光标随选区移动,或因文本滚动、重新换行而移动:`bounds` 是它在输入框中的位置,`pageBounds` 是它在窗口中的位置,可作为 `Overlay` 的 `anchor`([表单与键盘](../docs/forms-and-keyboard.md#光标位置))。 | diff --git a/third-party/nsh/website/zh-CN/elements/otp-input.md b/third-party/nsh/website/zh-CN/elements/otp-input.md index 5320b0b3fad..a2ae3565f59 100644 --- a/third-party/nsh/website/zh-CN/elements/otp-input.md +++ b/third-party/nsh/website/zh-CN/elements/otp-input.md @@ -87,6 +87,7 @@ fn verification(verify: impl Fn(&str) + 'static) -> impl IntoElement { | 输入全角数字(`0`–`9`,东亚输入法输入的) | 加入对应的 ASCII 数字。 | | 输入其他字符 | 不变;输入框丢弃它。 | | 按退格键 | 删除最后一位。 | +| `validationType="alphanumeric"` 时输入字母(大小写均可) | 和数字一样加入,转成大写(`a` 记为 `A`);全角字母(`a`、`B`)记为 ASCII 字母。 | | 粘贴,或系统自动填充验证码 | 其中的数字同样加入;含有 `length` 位或更多数字的文本(`123-456`、短信里的验证码)用它的前 `length` 位替换验证码。 | `onChange` 报告每次变化及新的验证码;变化填满最后一个格子时,紧接着是 `onComplete`,应用在这里校验验证码。 @@ -96,6 +97,7 @@ fn verification(verify: impl Fn(&str) + 'static) -> impl IntoElement { | Prop | Rust | 类型 | 默认值 | 说明 | |---|---|---|---|---| | `length` | `.length(..)` | `number` | 必填 | 验证码的位数:每位一个格子。 | +| `validationType` | `.validation_type(..)` | `"numeric" \| "alphanumeric"` | `"numeric"` | 验证码接受哪些字符。`"numeric"`:数字,弹出数字键盘。`"alphanumeric"`:ASCII 字母和数字,弹出完整键盘;字母转成大写,输入 `ab12cd34` 时格子显示、`onChange` 报告的都是 `AB12CD34`,应用比较验证码时不区分大小写。 | | `value` | `.value(..)` | `string` | 无 | 由应用控制的验证码(原样显示)。不传时输入框自己保存。 | | `defaultValue` | `.default_value(..)` | `string` | 无 | 未设置 `value` 时的初始验证码。 | | `masked` | `.masked(..)` | `boolean` | `false` | 已填的格子显示圆点而不是数字,输入框是安全输入框:屏幕阅读器不读出验证码,系统也不会把它放进建议里。 | @@ -148,3 +150,4 @@ fn verification(verify: impl Fn(&str) + 'static) -> impl IntoElement { - iOS:输入框是验证码输入框(`textContentType` 为 `oneTimeCode`),QuickType 栏会提供来自“信息”或“邮件”的验证码;弹出数字键盘。`masked` 的输入框失去焦点后再次输入时会从头开始,与 iOS 的安全输入框一样。 - Android:`autofillHints` 为 `smsOTPCode`,键盘和自动填充服务可以提供短信里的验证码;弹出数字键盘。 - macOS、Windows、Linux 和网页:输入和粘贴进入输入框(在浏览器中带 `inputmode="numeric"`,手机上弹出数字键盘),格子上显示 I 形指针。 +- `validationType="alphanumeric"` 时弹出完整键盘而不是数字键盘(浏览器中为 `inputmode="text"`),平台支持时默认大写(`autoCapitalize="characters"`)。 diff --git a/third-party/nsh/website/zh-CN/elements/rich-editor.md b/third-party/nsh/website/zh-CN/elements/rich-editor.md index 0c1dd3c5e32..221c6c92db7 100644 --- a/third-party/nsh/website/zh-CN/elements/rich-editor.md +++ b/third-party/nsh/website/zh-CN/elements/rich-editor.md @@ -54,7 +54,7 @@ mount(() => ( ## 样式 -编辑器以应用的外观绘制文档:`classes` 和 `styles` 设置它的各个部件(`root`、`content`、`caret`、`selection`、`placeholder`、`composition`、`selectedNode`、`listMarker`、触摸选区的手柄 `selectionHandle`、`selectionHandleStart`、`selectionHandleEnd`,以及表格的 `selectedCell`、`tableGrip`、`tableResizeHandle`、`tableDropIndicator`),按类型设置节点(`nodes: { heading: "text-2xl font-bold", "heading[level=2]": "text-xl" }`),以及设置标记(`marks: { bold: "font-bold" }`)。节点规格把 `extra.listMarker` 设为 `"bullet"` 或 `"ordered"` 的列表(starter schema 的列表)中,每一项都在 `listMarker` 部件中显示标记:按层级显示 `•`、`◦`、`▪`,或从列表的 `start` 开始编号,放在列表项之前、列表的缩进中(如浏览器缩进 `ul`,在列表上设置 `pl-6`)。 +编辑器以应用的外观绘制文档:`classes` 和 `styles` 设置它的各个部件(`root`、`content`、`caret`、`selection`、`placeholder`、`composition`、`selectedNode`、`listMarker`、任务项的 `taskCheckbox` 及其中的 `taskCheckmark`、触摸选区的手柄 `selectionHandle`、`selectionHandleStart`、`selectionHandleEnd`,以及表格的 `selectedCell`、`tableGrip`、`tableResizeHandle`、`tableDropIndicator`),按类型设置节点(`nodes: { heading: "text-2xl font-bold", "heading[level=2]": "text-xl" }`),以及设置标记(`marks: { bold: "font-bold" }`)。节点规格把 `extra.listMarker` 设为 `"bullet"` 或 `"ordered"` 的列表(starter schema 的列表)中,每一项都在 `listMarker` 部件中显示标记:按层级显示 `•`、`◦`、`▪`,或从列表的 `start` 开始编号,放在列表项之前、列表的缩进中(如浏览器缩进 `ul`,在列表上设置 `pl-6`)。任务项的勾选框是应用自己的方框(`taskCheckbox`,其 `checked:` 类跟随任务项)。给 `taskCheckmark` 部件设置类或样式后,任务完成时方框中显示 `✓`(12 点、粗体,默认 `foreground` 颜色;描边方框上用 `text-primary`,实心方框上用 `text-primary-foreground`);不设置时方框本身不绘制任何内容。 ```tsx attach(files)} + onPasteFiles={({ paste }) => attach(paste.files)} onFileDrop={({ uris, mimeTypes }) => attachFiles(uris, mimeTypes)} /> ``` @@ -246,9 +246,19 @@ editor.run(command("toggleBold")); `StarterKit` 包含 `Document`、`Paragraph`、文本节点、`Heading`、`Blockquote`、`BulletList`、`OrderedList`、`ListItem`、`TaskList`、`TaskItem`、`CodeBlock`、`CodeBlockHighlight`、`HardBreak`、`HorizontalRule`、`RichImage`(Tiptap 的 `Image`)、`Bold`、`Italic`、`Strike`、`Code`、`Underline`、`RichLink`(Tiptap 的 `Link`)、`Highlight`、`Subscript`、`Superscript`、`RichTextStyle`(Tiptap 的 `TextStyle`)、`TextAlign`、`History`、`TrailingNode`、`Typography` 和 `ListKeymap`。以某个扩展命名的选项设为 `false` 即不包含它,设为对象则配置它(`heading: { levels }`、`history: { depth }`、`textAlign: { types }`、`codeBlock: { enableTabIndentation }`)。每个类的 `configure(options)` 与 `extend({...})` 生成 `RichExtension`,它有 `name`、`type`、`priority` 和 `options`。每个编辑器还带有核心键位(Enter、Backspace、Delete、全选)。 -写明语言的代码块(` ```rust `、`toggleCodeBlock({ language: "rust" })`)会按 `TextView` 给围栏代码着色的方式着色,语法库和配色都相同:这由 `CodeBlockHighlight` 负责,相当于 Tiptap 的 `CodeBlockLowlight`,只是不用传入高亮器。`StarterKit.configure({ codeBlockHighlight: false })` 让代码不着色。在长代码块里打字不用等着色:颜色在引擎线程之外算出,稍后显示。Web 上语法库在第一次需要时从页面下载一次,与 `TextView` 共用,不在首屏下载里。没有开启平台的 feature `highlight` 时,代码不着色。 +写明语言的代码块(` ```rust `、`toggleCodeBlock({ language: "rust" })`)会按 `TextView` 给围栏代码着色的方式着色,语法库和配色都相同:这由 `CodeBlockHighlight` 负责,相当于 Tiptap 的 `CodeBlockLowlight`,只是不用传入高亮器。`StarterKit.configure({ codeBlockHighlight: false })` 让代码不着色。在长代码块里打字不用等着色:颜色在引擎线程之外算出,稍后显示。Web 上语法库在第一次需要时从页面下载一次,与 `TextView` 共用,不在首屏下载里。没有开启平台的 feature `highlight` 时,代码不着色。代码块的 `language` 认得 highlight.js 和 lowlight 用的语言名(`objectivec`、`plist`、`shellsession` 等),整段围栏信息按第一个词取语言(`ts title="a.ts"`、`rust,ignore`),从其他编辑器迁移来的文档也能保持着色。 -Rust 里是 `kit::code_block_highlight()`,包含在 `kit::starter_kit()` 和 `starter::plugins` 里。 +没写语言的代码块不着色,除非扩展替它指定一种语言。`defaultLanguage`(Tiptap 的同名选项)给所有这样的代码块指定语言:`CodeBlockHighlight.configure({ defaultLanguage: "rust" })`,或 `StarterKit.configure({ codeBlockHighlight: { defaultLanguage: "rust" } })`。这个语言只用于着色,不写进文档,协作者和保存的内容都看不到变化。 + +Rust 里是 `kit::code_block_highlight()`,包含在 `kit::starter_kit()` 和 `starter::plugins` 里。`kit::code_block_highlight_with(options)` 还接受 `CodeBlockHighlightOptions`:`default_language`,以及 `detect_language`(`Arc Option + Send + Sync>`),即应用自己按代码内容猜代码块的语言,相当于 Tiptap 的 `CodeBlockLowlight` 在没设 `defaultLanguage` 时做的自动识别。优先级依次是代码块自己的 `language`、`detect_language`、`default_language`;都没有给出语言时,代码块不着色。没写语言的代码块每次代码变化时调用一次 `detect_language`,在引擎线程上执行,所以要保持很快。它只在 Rust 里提供:内置扩展的 TSX 选项里如果放函数,打字时就要执行 JS。 + +```rust +let mut options = CodeBlockHighlightOptions::default(); +options.detect_language = Some(Arc::new(|code: &str| { + code.trim_start().starts_with("fn ").then(|| "rust".to_owned()) +})); +let highlight = kit::code_block_highlight_with(options); +``` 每个扩展都加入 Tiptap 的命令,由 `command(name, args)` 运行:`toggleBold`、`setItalic`、`unsetStrike`、`toggleHeading({ level })`、`setParagraph`、`toggleBlockquote`、`toggleBulletList`、`toggleOrderedList`、`toggleTaskList`、`toggleCodeBlock({ language })`、`setHardBreak`、`setHorizontalRule`、`setImage({ src })`、`toggleHighlight({ color })`、`setTextAlign("center")`、`unsetTextAlign`,以及下文的链接、字数统计与建议命令。图片的 `src` 与 `Image` 接受的相同(URL、文件路径或 `file:` URL、`data:` URI);不设 `width` 和 `height` 时按原始尺寸显示,只设其一时按该边和图片的宽高比显示。 @@ -475,11 +485,11 @@ editor.run(insertTable({ rows: 3, cols: 3, withHeaderRow: true })); editor.run(addRowAfter()); ``` -表格接受选项 `resizable`(true)、`cellMinWidth`(25)、`lastColumnResizable`(true)、`allowTableNodeSelection`(false)和 `HTMLAttributes`;`TableKit.configure({ tableHeader: false })` 不包含其中一个扩展。单元格包含块,带有 `colspan`、`rowspan` 和 `colwidth`(其跨越的每一列的宽度,以点为单位);行带有 `height`。 +表格接受选项 `resizable`(true)、`cellMinWidth`(25)、`lastColumnResizable`(true)、`allowTableNodeSelection`(false)、`fullWidth`(false)和 `HTMLAttributes`;`TableKit.configure({ tableHeader: false })` 不包含其中一个扩展。单元格包含块,带有 `colspan`、`rowspan` 和 `colwidth`(其跨越的每一列的宽度,以点为单位);行带有 `height`。 Tab 与 Shift-Tab 在单元格之间移动,在最后一个单元格按 Tab 会添加一行。在单元格边缘按方向键会进入相邻单元格;Shift 加方向键,或跨单元格拖动,会选中一个矩形区域的单元格(类型为 `"cell"` 的选区,其 `anchor` 与 `head` 是首尾单元格之前的位置)。Backspace 与 Delete 清空选中的单元格,选中全部单元格时删除整个表格。 -列宽随单元格中的文字和组件调整。长段落会换行,表格超出编辑器宽度时可以在表格内左右滚动。拖动或保存的列宽优先,每列至少为 `cellMinWidth` 宽,每行至少为保存的 `height` 高。默认外观来自主题:1 点 `border` 网格线,表头单元格使用 `muted` 背景,单元格带内边距,选中的单元格覆盖一层 `selectedCell` 部件,使用选区颜色。`classes.nodes`(`table`、`tableCell`、`tableHeader`)和这些部件可以重新设置全部外观。在单元格的第一行或最后一行按上下方向键,会进入上方或下方的单元格。 +列宽随单元格中的文字和组件调整。长段落会换行,表格超出编辑器宽度时可以在表格内左右滚动。拖动或保存的列宽优先,每列至少为 `cellMinWidth` 宽,每行至少为保存的 `height` 高。设置 `fullWidth: true` 时,表格至少与编辑器正文同宽:没有保存列宽的列平分其余列剩下的宽度;所有列都有列宽后,剩下的宽度归最后一列,它保存的列宽是它的最小宽度。默认外观来自主题:1 点 `border` 网格线,表头单元格使用 `muted` 背景,单元格带内边距,选中的单元格覆盖一层 `selectedCell` 部件,使用选区颜色。`classes.nodes`(`table`、`tableCell`、`tableHeader`)和这些部件可以重新设置全部外观。在单元格的第一行或最后一行按上下方向键,会进入上方或下方的单元格。 文档可编辑时: diff --git a/third-party/nsh/website/zh-CN/elements/select.md b/third-party/nsh/website/zh-CN/elements/select.md index b0e6594112d..05b9591dcf5 100644 --- a/third-party/nsh/website/zh-CN/elements/select.md +++ b/third-party/nsh/website/zh-CN/elements/select.md @@ -212,7 +212,40 @@ fn fruit_select() -> impl IntoElement { /> ``` -在桌面平台上,列表打开时搜索框就获得键盘焦点;在触摸屏上,按下搜索框时键盘才弹出。每次打开时搜索都从空白开始。 +在桌面平台上,列表打开时搜索框就获得键盘焦点;在触摸屏上,按下搜索框时键盘才弹出。 + +搜索词默认属于搜索框自己,每次打开从 `defaultQuery`(没有则为空)开始;有 `query` 时由应用持有:`onQueryChange({ query })` 报告在搜索框中输入的内容,应用把 `query` 设为它以跟随。应用持有的搜索词在多次打开之间保持不变,直到应用修改它;`renderItem` 绘制的行可以标出匹配的部分。下面的选择框在列表消失后(`onClose`)清空搜索词,这样列表离开时仍显示原来的行;应在这里清空,而不是在 `onOpen` 中:那时列表已经打开,搜索词的变化会像输入的一样,把高亮移到第一个匹配项: + +```tsx +const query = signal(""); +// 标题按搜索词的第一个匹配分成三段:之前、匹配、之后。 +const split = (title: string, q: string) => { + const at = q ? title.toLowerCase().indexOf(q.toLowerCase()) : -1; + if (at < 0) return [title, "", ""]; + return [title.slice(0, at), title.slice(at, at + q.length), title.slice(at + q.length)]; +}; + +