From dae6576e9920055af276cfcf82d91450e6bfa7ba Mon Sep 17 00:00:00 2001 From: me2seeks Date: Fri, 27 Nov 2026 22:27:45 +0800 Subject: [PATCH 1/7] feat(ios): add steer and queued messages dock Generated-by: Maka --- Cargo.lock | 10 + Cargo.toml | 2 + DESIGN.md | 16 + platform/operation-id/Cargo.toml | 27 + platform/operation-id/src/lib.rs | 31 + platform/remote-client/src/client.rs | 70 +- platform/remote-client/src/lib.rs | 4 +- plugins/agent/native/Cargo.toml | 1 + .../agent/native/src/owner/driver/tests.rs | 74 + plugins/agent/native/src/owner/rooms.rs | 4 +- plugins/agent/native/src/owner/send.rs | 63 +- plugins/agent/native/src/owner/steering.rs | 68 +- products/maka/cli/DEPENDENCIES.rust.tsv | 1 + products/maka/ios-shell/Cargo.toml | 1 + products/maka/ios-shell/app/App.tsx | 3 +- products/maka/ios-shell/app/bridge.ts | 54 +- .../app/screens/chats/ChatQuotes.tsx | 21 +- .../app/screens/chats/ChatScreen.tsx | 316 ++-- .../app/screens/chats/ComposerPendingDock.tsx | 488 ++++++ products/maka/ios-shell/app/state/chat.ts | 926 +++++++++-- products/maka/ios-shell/app/theme/tokens.ts | 16 + products/maka/ios-shell/app/ui/Glass.tsx | 33 + products/maka/ios-shell/app/ui/index.ts | 1 + products/maka/ios-shell/locales/de.json | 27 + products/maka/ios-shell/locales/en.json | 27 + products/maka/ios-shell/locales/es.json | 27 + products/maka/ios-shell/locales/fr.json | 27 + products/maka/ios-shell/locales/it.json | 27 + products/maka/ios-shell/locales/ja.json | 27 + products/maka/ios-shell/locales/ko.json | 27 + products/maka/ios-shell/locales/pt-BR.json | 27 + products/maka/ios-shell/locales/ru.json | 27 + products/maka/ios-shell/locales/zh-CN.json | 27 + products/maka/ios-shell/locales/zh-HK.json | 6 + products/maka/ios-shell/locales/zh-TW.json | 27 + products/maka/ios-shell/src/bridge.rs | 303 +++- .../ios-shell/tests/ios_shell_behaviors.rs | 1351 ++++++++++++++++- 37 files changed, 3684 insertions(+), 503 deletions(-) create mode 100644 platform/operation-id/Cargo.toml create mode 100644 platform/operation-id/src/lib.rs create mode 100644 products/maka/ios-shell/app/screens/chats/ComposerPendingDock.tsx create mode 100644 products/maka/ios-shell/app/ui/Glass.tsx diff --git a/Cargo.lock b/Cargo.lock index be7f06f6ed6..3c6fc11bd30 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8953,6 +8953,7 @@ dependencies = [ "maka-mock-ai", "maka-model", "maka-network", + "maka-operation-id", "maka-packages", "maka-plugin-core", "maka-presentation", @@ -9688,6 +9689,7 @@ dependencies = [ "maka-agent-facts", "maka-event-log", "maka-host-runtime", + "maka-operation-id", "maka-packages", "maka-remote-client", "maka-remote-pairing", @@ -9880,6 +9882,14 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "maka-operation-id" +version = "0.3.0" +dependencies = [ + "hex", + "sha2 0.11.2", +] + [[package]] name = "maka-packages" version = "0.3.0" diff --git a/Cargo.toml b/Cargo.toml index 885afd4518c..c1e1d9f1d14 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -70,6 +70,7 @@ members = [ "plugins/agent/providers", "platform/host-runtime", "platform/remote-client", + "platform/operation-id", "platform/remote-pairing", "platform/remote-transport", "platform/host-js", @@ -184,6 +185,7 @@ maka-process = { path = "platform/process" } maka-providers = { path = "plugins/agent/providers" } maka-host-runtime = { path = "platform/host-runtime" } maka-remote-client = { path = "platform/remote-client" } +maka-operation-id = { path = "platform/operation-id" } maka-remote-pairing = { path = "platform/remote-pairing" } maka-remote-transport = { path = "platform/remote-transport" } maka-host-js = { path = "platform/host-js" } diff --git a/DESIGN.md b/DESIGN.md index 539e6f97cde..1bfad942f0d 100644 --- a/DESIGN.md +++ b/DESIGN.md @@ -119,3 +119,19 @@ Approvals stay in a fixed one-row layout, with short press feedback and the outc Computer settings use native pushes for editors, menus for workspace scope, and native alerts for destructive changes and project MCP consent. Lists refresh in place on return; saving and download status stay inline. System transitions honor Reduce Motion; no custom animation is needed for form or catalog updates. Side questions push a chat with the same composer and quote tray. The first accepted fork replaces the draft with its real conversation; back and edge swipe keep the main transcript mounted. The system owns selection menus, context menus and the side-question sheet. Quote and link chips, anchor counts and submission feedback update in place. + +### iOS chat: composer delivery dock + +The inline dock sits above the composer: a brief delivery status for steer, a +recoverable card on failure, and a single disclosure for the longer-lived queue. + +| Change | Motion | Reduced motion | +| --- | --- | --- | +| Send and dock action press/hover | Existing opacity feedback (fast); distinct 44pt targets, no hover-only actions | Immediate opacity | +| Sending → steering; queue count or preview changes | No movement for Host updates; keep the row's position | Same | +| Steer status arrives or lands | Fast opacity enter/exit; no delayed removal from the transcript handoff | Immediate | +| Queue disclosure, inline edit and review | Disclosure uses normal layout animation; editing and review reveal in place | Immediate | +| Failure card / optimistic user bubble | Immediate feedback; no scripted scroll for queue actions | Same | +| Send and Send to Main Chat context menus | Native presentation/dismissal | System setting | +| Selection or drag release | None added | — | +| In-flight RPC and waiting for next step | Pulsing mark for RPC; static mark while waiting | Static mark | diff --git a/platform/operation-id/Cargo.toml b/platform/operation-id/Cargo.toml new file mode 100644 index 00000000000..dd46785c262 --- /dev/null +++ b/platform/operation-id/Cargo.toml @@ -0,0 +1,27 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +[package] +name = "maka-operation-id" +version.workspace = true +edition.workspace = true +license.workspace = true +publish.workspace = true + +[dependencies] +hex.workspace = true +sha2.workspace = true diff --git a/platform/operation-id/src/lib.rs b/platform/operation-id/src/lib.rs new file mode 100644 index 00000000000..0648231cd8a --- /dev/null +++ b/platform/operation-id/src/lib.rs @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +/// Derive the durable Room post ID from the compact JSON encoding of the +/// admitted operation reference. The Host sends those same bytes in Prepared. +pub fn room_post(session: &str, encoded_reference: &[u8]) -> Option { + use sha2::{Digest, Sha256}; + + let (namespace, local) = session.rsplit_once('_')?; + if local.len() != 32 || !local.bytes().all(|c| c.is_ascii_hexdigit()) { + return None; + } + let digest = hex::encode(Sha256::digest(encoded_reference)); + Some(format!("m_{namespace}_{}", &digest[..32])) +} diff --git a/platform/remote-client/src/client.rs b/platform/remote-client/src/client.rs index 72daa415ea1..4f874b42498 100644 --- a/platform/remote-client/src/client.rs +++ b/platform/remote-client/src/client.rs @@ -25,7 +25,7 @@ use bytes::Bytes; use futures_util::{Sink, Stream}; use maka_remote_pairing::HostPlatform; use serde::{Deserialize, Serialize, de::DeserializeOwned}; -use serde_json::{Value, json}; +use serde_json::{Value, json, value::RawValue}; use std::{ collections::BTreeMap, io, @@ -217,9 +217,7 @@ enum WireControl { enum WireReply { Ready, Subscribed, - Prepared { - reference: Value, - }, + Prepared, Item { value: Value, }, @@ -724,12 +722,34 @@ impl RemoteCallHandle { attachments: Attachments, on_progress: impl FnMut(Value) -> F, ) -> Result { + self.prepare_mutation(endpoint, method, input, attachments) + .await? + .confirm(on_progress) + .await + } + + /// A prepared mutation has not executed. Dropping it without confirming + /// closes the call channel without submitting the write. + pub async fn prepare_mutation<'a>( + &self, + endpoint: &'a str, + method: &'a str, + input: Value, + attachments: Attachments, + ) -> Result, RemoteClientError> { let mut reader = self .open_call_channel(endpoint, method, input, &attachments) .await?; drop(attachments); - let reference = match read_frame::<_, WireReply>(&mut reader).await? { - WireReply::Prepared { reference } => reference, + let reply: Box = read_frame(&mut reader).await?; + let reference = match serde_json::from_str(reply.get())? { + WireReply::Prepared => { + #[derive(Deserialize)] + struct Prepared { + reference: Box, + } + serde_json::from_str::(reply.get())?.reference + } WireReply::Aborted { reason } | WireReply::BindingRetired { reason } => { return Err(RemoteClientError::HostRejected(reason)); } @@ -745,7 +765,12 @@ impl RemoteCallHandle { } }; - confirm_mutation(&mut reader, endpoint, method, reference, on_progress).await + Ok(PreparedMutation { + reader, + endpoint, + method, + reference, + }) } /// Open a demand-driven streaming subscription on an admitted Host endpoint @@ -764,7 +789,7 @@ impl RemoteCallHandle { WireReply::Aborted { reason } | WireReply::BindingRetired { reason } => { return Err(RemoteClientError::HostRejected(reason)); } - WireReply::Finished { .. } | WireReply::Prepared { .. } => { + WireReply::Finished { .. } | WireReply::Prepared => { return Err(RemoteClientError::Protocol(format!( "endpoint method '{endpoint}.{method}' is not a subscription" ))); @@ -781,6 +806,35 @@ impl RemoteCallHandle { } } +pub struct PreparedMutation<'a> { + reader: BufReader, + endpoint: &'a str, + method: &'a str, + reference: Box, +} + +impl PreparedMutation<'_> { + /// Exact compact JSON emitted by the Host, including field order. + pub fn reference(&self) -> &RawValue { + &self.reference + } + + pub async fn confirm>( + mut self, + on_progress: impl FnMut(Value) -> F, + ) -> Result { + let reference = serde_json::from_str(self.reference.get())?; + confirm_mutation( + &mut self.reader, + self.endpoint, + self.method, + reference, + on_progress, + ) + .await + } +} + async fn confirm_mutation>( reader: &mut BufReader, endpoint: &str, diff --git a/platform/remote-client/src/lib.rs b/platform/remote-client/src/lib.rs index 9e6c4b462f4..7a86b455665 100644 --- a/platform/remote-client/src/lib.rs +++ b/platform/remote-client/src/lib.rs @@ -25,8 +25,8 @@ mod pairing; mod store; pub use client::{ - Attachments, ReadResource, RemoteCallHandle, RemoteClientError, RemoteDeploymentRef, - RemoteHostConnection, RemoteSubscription, + Attachments, PreparedMutation, ReadResource, RemoteCallHandle, RemoteClientError, + RemoteDeploymentRef, RemoteHostConnection, RemoteSubscription, }; pub use pairing::{PendingPairing, RedeemedPairing, RelayAuthorization}; pub use store::{HostProfile, SavedHosts}; diff --git a/plugins/agent/native/Cargo.toml b/plugins/agent/native/Cargo.toml index e70855e1384..da4acd69880 100644 --- a/plugins/agent/native/Cargo.toml +++ b/plugins/agent/native/Cargo.toml @@ -37,6 +37,7 @@ hex.workspace = true maka-goal.workspace = true maka-session-recap.workspace = true maka-agent-facts.workspace = true +maka-operation-id.workspace = true maka-agent-ports.workspace = true maka-external-agent.workspace = true maka-tool-catalog.workspace = true diff --git a/plugins/agent/native/src/owner/driver/tests.rs b/plugins/agent/native/src/owner/driver/tests.rs index 9272dca7478..063d2c81c08 100644 --- a/plugins/agent/native/src/owner/driver/tests.rs +++ b/plugins/agent/native/src/owner/driver/tests.rs @@ -5862,6 +5862,80 @@ mod model_recovery { result.expect("steered completion test timed out").unwrap(); } + #[tokio::test(flavor = "multi_thread", worker_threads = 2)] + async fn native_steer_keeps_the_in_flight_model_on_unbound_and_reconfigured_sessions() { + let mut rig = Rig::new().unwrap(); + let mut server = MockAiBuilder::new().interactive(3).start().await.unwrap(); + let result = tokio::time::timeout(Duration::from_secs(30), async { + let base = rig.directory.path().to_path_buf(); + let boot = bootstrap(&base, server.base_url(), false).await?; + attach(&mut rig, &boot).await?; + let client = rig.client.as_ref().unwrap(); + let mut backends = Vec::new(); + for slug in ["running", "next-turn"] { + let catalog = call(client, "settings", "connections", json!({"kind":"start"})).await?; + let connection = call(client, "settings", "create", json!({ + "expectedCatalogRevision": catalog["revision"], + "connection": { + "slug": slug, "name": slug, + "provider": {"packageId":"maka.providers","entryId":"maka.providers","scope":"profile","name":"ollama"}, + "configuration": {"baseUrl": boot.base_url}, "enabled": true, "enabledModelIds": ["llama3.2"], + "modelOverrides": {"llama3.2": {"codeMode": false, "apiProtocol": "openai-chat-completions"}} + } + })).await?; + backends.push(json!({"kind":"model","connectionId":connection["connection"]["connectionId"],"modelId":"llama3.2"})); + } + let created = call(client, "agent", "create", json!({ + "title":"Unbound", "automaticTitle":false, "labels":[], "tools":[], + "workspace":{"kind":"directory","path":rig.directory.path().join("workspace")} + })).await?; + let session = created["session"]["id"].as_str().ok_or("missing session")?; + let first = call(client, "agent", "send", json!({ + "sessionId":session, "message":"Start on the default model.", "backend":backends[0], "delivery":"steer" + })).await?; + let step = server.next_turn().await.ok_or("missing initial model request")?; + let observed = call(client, "agent", "observe", json!({"sessionId":session})).await?; + assert!(observed["session"]["backend"].is_null()); + assert_eq!(observed["run"]["backend"], "model"); + let run: RunId = serde_json::from_value(observed["run"]["runId"].clone())?; + let steer = |text| json!({ + "sessionId":session, "message":text, "backend":null, "delivery":"steer", "expectedRunId":run + }); + let unbound = call(client, "agent", "send", steer("Steer while unbound.")).await?; + assert_eq!(unbound["kind"], "queued"); + + let selected = call(client, "agent", "selectBackend", json!({ + "sessionId":session, "backend":backends[1] + })).await?; + assert_eq!(selected["session"]["backend"]["connectionId"], backends[1]["connectionId"]); + let switched = call(client, "agent", "send", steer("Steer after switching next-turn model.")).await?; + assert_eq!(switched["kind"], "queued"); + + let owner = rig.captured.lock().unwrap().clone().unwrap(); + let queue = owner.durable.queue().read(session.into()).await?; + let active = owner.durable.frontier(run).await?; + for sent in [unbound, switched] { + let id = sent["messageId"].as_str().ok_or("missing steer ID")?; + let entry = queue.entries.iter().find(|entry| entry.request.message_id == id) + .ok_or("message is not pending steering")?; + assert!(matches!(entry.placement, maka_agent_state::queue::Placement::Steering { run: target, .. } if target == run)); + assert_eq!(entry.request.spec.backend, active.spec.backend); + } + step.reply_text_with_usage("Continuing.", Usage::new(10, 5)); + let next = server.next_turn().await.ok_or("missing steered model request")?; + let request = next.body().to_string(); + assert!(request.contains("Steer while unbound."), "{request}"); + assert!(request.contains("Steer after switching next-turn model."), "{request}"); + next.reply_text_with_usage("Done.", Usage::new(10, 5)); + completed_message(client, session, &first["messageId"]).await?; + Ok::<_, Box>(()) + }).await; + server.shutdown().await; + let cleanup = rig.finish().await; + assert!(cleanup.is_empty(), "{cleanup:?}"); + result.expect("native steering test timed out").unwrap(); + } + #[tokio::test] async fn session_read_tail_claims_completion_notice() { use maka_plugin_core::contract::ServiceTarget; diff --git a/plugins/agent/native/src/owner/rooms.rs b/plugins/agent/native/src/owner/rooms.rs index f7c93b51a55..a621e9b8a0f 100644 --- a/plugins/agent/native/src/owner/rooms.rs +++ b/plugins/agent/native/src/owner/rooms.rs @@ -462,7 +462,9 @@ impl Owner { } let writer = self.message_writer(scope)?; let room = RoomStore::new(writer.clone(), self.run_owner()); - let message_id = format!("m_{}", self.operation_id(operation)); + let reference = serde_json::to_vec(operation).expect("admitted operation reference"); + let message_id = maka_operation_id::room_post(&input.session_id, &reference) + .ok_or("agent_session_unavailable")?; let caller_agent = scope.identity.agent(); let author = caller_agent.map_or(RoomAuthor::Human, |execution| RoomAuthor::Session { execution: execution.clone(), diff --git a/plugins/agent/native/src/owner/send.rs b/plugins/agent/native/src/owner/send.rs index b45dcd9167a..c00b200d9de 100644 --- a/plugins/agent/native/src/owner/send.rs +++ b/plugins/agent/native/src/owner/send.rs @@ -19,7 +19,7 @@ use super::*; use crate::executor::ActiveDelivery; -use maka_agent_facts::durable::{BackendSpec, ExecutionIdentity, UnixMillis}; +use maka_agent_facts::durable::{BackendSpec, UnixMillis}; use maka_agent_state::queue::{ Followup, Placement as QueuePlacement, PreparedEnqueue, QueueCommand, QueueEdit, }; @@ -535,10 +535,36 @@ impl Owner { } else { latest.filter(|view| view.terminal.is_none()) }; - let active_delivery = match (&active, delivery, handoff) { + let active_delivery = match (&active, delivery, &handoff) { (Some(view), SendDelivery::Steer, None) => self.active_delivery(view).await?, _ => ActiveDelivery::Queue, }; + // A later Run captures its own memory projection. Steering cannot change + // the active Run's projection, even when it falls back to a followup. + let queued_eligibility = if origin.is_none() + && matches!( + parent.identity, + maka_capabilities::call::Identity::Native + | maka_capabilities::call::Identity::Remote { .. } + ) { + maka_agent_facts::memory::MemoryAdmission::Disabled + } else { + maka_agent_facts::memory::MemoryAdmission::Excluded + }; + if let (Some(view), ActiveDelivery::Steer) = (&active, &active_delivery) { + return self + .steer_message( + unprepared, + origin, + key, + view, + queued_eligibility, + operation, + parent, + completion_request, + ) + .await; + } let mut backend = backend; let followup = active.as_ref().map(|view| { if handoff.is_some() || matches!(active_delivery, ActiveDelivery::InterruptResume) { @@ -565,12 +591,6 @@ impl Owner { } else { PinCapture::NewRun }; - let user_message = origin.is_none() - && matches!( - parent.identity, - maka_capabilities::call::Identity::Native - | maka_capabilities::call::Identity::Remote { .. } - ); let mut basis = match self .capture_current_run(&id, backend, operation.fingerprint.clone(), pins, parent) .await @@ -588,33 +608,6 @@ impl Owner { } Err(error) => return Err(error.into()), }; - // A queued spec records the submitter's eligibility. Mutable session - // settings and the projection are selected when it starts a Run. - let queued_eligibility = if user_message { - maka_agent_facts::memory::MemoryAdmission::Disabled - } else { - maka_agent_facts::memory::MemoryAdmission::Excluded - }; - if let (Some(view), ActiveDelivery::Steer) = (&active, active_delivery) { - basis.memory_admission = queued_eligibility; - let execution = ExecutionIdentity { - session_id: id.clone(), - turn_id: view.spec.turn_id.clone(), - run_id: view.run, - }; - return self - .steer_message( - unprepared, - origin, - key, - &execution, - &basis, - operation, - parent, - completion_request, - ) - .await; - } // Check known fixed inputs for immediate feedback. The queue carries only // eligibility; the scheduler freezes the projection for the actual Run. self.check_pinned_model(&id, &basis)?; diff --git a/plugins/agent/native/src/owner/steering.rs b/plugins/agent/native/src/owner/steering.rs index 5c712ed76ab..4e8b49375bf 100644 --- a/plugins/agent/native/src/owner/steering.rs +++ b/plugins/agent/native/src/owner/steering.rs @@ -20,8 +20,11 @@ use super::send::{PreparedAgentSend, PreparedSend}; use super::*; use crate::executor::ActiveDelivery; -use maka_agent_facts::durable::{BackendSpec, ExecutionIdentity, UnixMillis}; -use maka_agent_state::{Head, queue as durable_queue}; +use maka_agent_facts::{ + durable::{BackendSpec, UnixMillis}, + memory::MemoryAdmission, +}; +use maka_agent_state::{Head, fold::RunView, queue as durable_queue}; impl Owner { pub(super) async fn active_delivery( @@ -60,20 +63,15 @@ impl Owner { unprepared: MessageInput, origin: Option, key: &str, - execution: &ExecutionIdentity, - basis: &CapturedRun, + target: &RunView, + memory_admission: MemoryAdmission, operation: &maka_plugin_core::operation::RecoveryRef, parent: &maka_capabilities::call::Scope, completion_request: Option, ) -> Result { - let session = execution.session_id.as_str(); - let target = self - .durable - .frontier(execution.run_id) - .await - .map_err(|error| error.to_string())?; - if target.spec.session_id != session - || target.spec.owner != self.run_owner() + let session = target.spec.session_id.as_str(); + self.require_execution_spec(&target.spec).await?; + if target.spec.owner != self.run_owner() || !parent .sandbox_floor() .contains(&target.spec.permission_ceiling.sandbox) @@ -85,8 +83,48 @@ impl Owner { { return Err("agent_steering_isolation_unavailable".into()); } - let mut basis = basis.clone(); + let current = self.mutable_session(session).await?; + if current.archived { + return Err("agent_session_configuration_changed".into()); + } + if current.configuration.workspace.path != target.spec.workspace + || workspace::validate( + &self.workspace_roots, + ¤t.configuration.workspace, + &self.managed_worktrees, + ) + .await + .is_err() + { + return Ok(PreparedSend::Returned(SendResult::Rejected { + session_id: session.into(), + reason: SendRejection::WorkspaceUnavailable, + skills: None, + })); + } + let live_basis = self + .runs + .state() + .await + .controls + .get(session) + .filter(|control| control.execution.run_id == target.run) + .map(|control| Arc::clone(&control.basis)); + let mut basis = match live_basis { + Some(basis) => (*basis).clone(), + None => { + self.restored_data(target) + .await + .map_err(|error| public_error(error.cause))? + .0 + } + }; basis.fingerprint = operation.fingerprint.clone(); + basis.background = None; + basis.background_kind = BackgroundKind::Interactive; + basis.background_sandbox_ceiling = None; + basis.memory = None; + basis.memory_admission = memory_admission; let (message, required_tools) = match self .prepare_skills( unprepared.clone(), @@ -140,7 +178,7 @@ impl Owner { .await?; let command_id = self.control_id(operation, &format!("{key}:steer_message")); let at = UnixMillis(now().try_into().expect("Unix milliseconds")); - let Some(view) = self.session_run(session, execution.run_id).await? else { + let Some(view) = self.session_run(session, target.run).await? else { return Err("agent_execution_unavailable".into()); }; if view.stopped || view.terminal.is_some() { @@ -163,7 +201,7 @@ impl Owner { edit: durable_queue::QueueEdit::Enqueue { request: Box::new(request.clone()), placement: durable_queue::Placement::Steering { - run: execution.run_id, + run: target.run, expected_head: Head::from(&view), }, }, diff --git a/products/maka/cli/DEPENDENCIES.rust.tsv b/products/maka/cli/DEPENDENCIES.rust.tsv index d8930a73e28..2bfab578ec0 100644 --- a/products/maka/cli/DEPENDENCIES.rust.tsv +++ b/products/maka/cli/DEPENDENCIES.rust.tsv @@ -714,6 +714,7 @@ maka-js-runtime@0.3.0 X maka-mcp@0.3.0 X maka-model@0.3.0 X maka-network@0.3.0 X +maka-operation-id@0.3.0 X maka-packages@0.3.0 X maka-plugin-core@0.3.0 X maka-presentation@0.3.0 X diff --git a/products/maka/ios-shell/Cargo.toml b/products/maka/ios-shell/Cargo.toml index a04a31f3bd4..be603976d9b 100644 --- a/products/maka/ios-shell/Cargo.toml +++ b/products/maka/ios-shell/Cargo.toml @@ -29,6 +29,7 @@ path = "src/main.rs" [dependencies] log = "0.4.34" +maka-operation-id.workspace = true maka-remote-client.workspace = true nsh-base.workspace = true nsh-core.workspace = true diff --git a/products/maka/ios-shell/app/App.tsx b/products/maka/ios-shell/app/App.tsx index df8fca17675..6fc3c990328 100644 --- a/products/maka/ios-shell/app/App.tsx +++ b/products/maka/ios-shell/app/App.tsx @@ -325,8 +325,7 @@ function MainTabShell() { void sendDraft( rootId, session.id, - false, - async () => observed.session.backend ?? observed.rememberedBackend ?? null, + observed.session.backend ?? observed.rememberedBackend ?? null, ); if (chatsNav.routes().at(-1) === route) chatsNav.replace( diff --git a/products/maka/ios-shell/app/bridge.ts b/products/maka/ios-shell/app/bridge.ts index 26d4d387f7a..23ea0e4b464 100644 --- a/products/maka/ios-shell/app/bridge.ts +++ b/products/maka/ios-shell/app/bridge.ts @@ -140,8 +140,12 @@ export type { AgentForkResult, AgentInteractionResult, AgentMetadataResult, + AgentQueueAction, + AgentQueueEntry, + AgentQueueMessageResult, AgentQueueMutationResult, AgentSendResult, + AgentRun, HistoryOrder, HistoryPosition, HistoryRowAddress, @@ -294,22 +298,37 @@ function progressKey(rootId: string, generation: number, progressId: string) { } host.on('ios.mutationProgress', (data) => { - const progress = data as unknown as MutationProgress & { deliveryId: number; sequence: number }; + const progress = data as unknown as MutationProgress & { + deliveryId: number; + sequence: number; + requiresObserver?: boolean; + }; + let observed = false; try { - if (connection(progress.rootId)?.generation === progress.generation) { - progressListeners.get( - progressKey(progress.rootId, progress.generation, progress.progressId), - )?.(progress); + const listener = + connection(progress.rootId)?.generation === progress.generation + ? progressListeners.get( + progressKey(progress.rootId, progress.generation, progress.progressId), + ) + : undefined; + if (listener) { + listener(progress); + observed = true; } } finally { - // Return credit even if the event belongs to a Host or call that has since ended. - host.post('ios.ackMutationProgress', { - deliveryId: progress.deliveryId, - sequence: progress.sequence, - }); + // Regular progress returns credit even for ended calls. Prepared posts + // must not confirm if the UI timed out and dropped the identity listener. + if (!progress.requiresObserver || observed) { + host.post('ios.ackMutationProgress', { + deliveryId: progress.deliveryId, + sequence: progress.sequence, + }); + } } }); +export class MutationNotSubmitted extends Error {} + export async function hostMutate( endpoint: string, method: string, @@ -319,12 +338,14 @@ export async function hostMutate( generation, secret, progressId, + prepareRoomPost, onProgress, }: { rootId?: string; generation?: number; secret?: string; progressId?: string; + prepareRoomPost?: boolean; onProgress?: ProgressListener; } = {}, ): Promise { @@ -333,13 +354,14 @@ export async function hostMutate( (rootId !== undefined && target?.generation === undefined) || (generation !== undefined && target?.generation !== generation) ) - throw new Error(tr('Computer is offline')); + throw new MutationNotSubmitted(tr('Computer is offline')); let key: string | undefined; if (onProgress) { - if (!target) throw new Error(tr('Computer is offline')); + if (!target) throw new MutationNotSubmitted(tr('Computer is offline')); progressId ??= 'mutation:' + String(++nextProgressId); key = progressKey(target.rootId, target.generation, progressId); - if (progressListeners.has(key)) throw new Error('mutation progress ID is already in use'); + if (progressListeners.has(key)) + throw new MutationNotSubmitted('mutation progress ID is already in use'); progressListeners.set(key, onProgress); } try { @@ -354,9 +376,11 @@ export async function hostMutate( input, secret, progressId: onProgress ? progressId : undefined, + prepareRoomPost, }, - onProgress ? { timeout: 0 } : undefined, - )) as { value: T }; + onProgress || (endpoint === 'agent' && method === 'send') ? { timeout: 0 } : undefined, + )) as { value: T } | { notSubmitted: string }; + if ('notSubmitted' in res) throw new MutationNotSubmitted(res.notSubmitted); return res.value; } finally { if (key !== undefined) progressListeners.delete(key); diff --git a/products/maka/ios-shell/app/screens/chats/ChatQuotes.tsx b/products/maka/ios-shell/app/screens/chats/ChatQuotes.tsx index 8d45f6e39d7..888f591b9f9 100644 --- a/products/maka/ios-shell/app/screens/chats/ChatQuotes.tsx +++ b/products/maka/ios-shell/app/screens/chats/ChatQuotes.tsx @@ -30,6 +30,7 @@ import { type HistoryRow, } from '../../state/chat'; import { showToast } from '../../state/hostPool'; +import { QueueSendMenu } from './ComposerPendingDock'; import { hapticSelection } from '../../state/preferences'; import { type } from '../../theme/tokens'; import { ActionButton, Icon } from '../../ui'; @@ -294,7 +295,7 @@ export function DraftQuoteStrip(props: { onClearQuotes: () => void; onRemoveQuote: (id: number) => void; onRemoveLink: (id: string) => void; - mainActions?: { ask: () => void; send: () => void; canSend: boolean }; + mainActions?: { ask: () => void; send: () => void; queue?: () => void; canSend: boolean }; }) { const chips = computed(() => [...props.quotes, ...props.links]); return ( @@ -425,13 +426,19 @@ export function DraftQuoteStrip(props: { {(actions) => ( - actions().send()} + trigger={ + actions().send()} + /> + } /> + + {props.children} + + + ); +} + function RoomTranscriptItem(props: { message: AgentRoomMessage }) { const isHuman = () => props.message.author.kind === 'human'; return ( @@ -570,7 +583,7 @@ export function ChatScreen( }; const atBottom = signal(true); - const queueSheetOpen = signal(false); + const queueExpanded = signal(false); const followLatest = signal(true); let transcriptRef: ListRef | undefined; let pagingDrag: number | undefined; @@ -599,6 +612,7 @@ export function ChatScreen( : turns(), ); const isRunning = () => ctrl.observation()?.run != null; + const canQueue = () => !sideDraft && isRunning() && ctrl.hasDraftContent(); const hostOnline = () => isHostConnected(rootId); const connectionProgress = () => hostConnectionProgress(rootId); const draft = () => getDraft(rootId, sessionId); @@ -610,14 +624,39 @@ export function ChatScreen( const quoteLimitReached = () => quotes().length >= quoteLimit; const canSend = () => sideDraft ? sideDraft.canSend() : ctrl.hasDraftContent() && !ctrl.sending(); - const send = () => { + const send = (delivery: SendDelivery = 'steer') => { if (sideDraft) void sideDraft.submit(); else - void ctrl.sendMessage().then((sent) => { + void ctrl.sendMessage(delivery).then((sent) => { if (sent && props.active()) scrollToBottom(false); }); }; + const sendButton = () => ( + send()} + class="active:opacity-70" + style={{ + width: 44, + height: 44, + borderRadius: 22, + backgroundColor: canSend() ? token('primary') : token('surface-muted'), + alignItems: 'center', + justifyContent: 'center', + }} + > + + + ); + const generation = computed(() => activeHostInfo(rootId)?.generation); const canAskSide = computed( () => @@ -1092,26 +1131,14 @@ export function ChatScreen( } > - - - - row.key}> - {(row) => ( - - )} - - - + + + row.key}> + {(row) => ( + + )} + + ); @@ -1142,13 +1169,13 @@ export function ChatScreen( ...(canAskSide() ? [{ label: tr('All Side Questions'), onSelect: showAllSides }] : []), - ...(ctrl.queue().entries.length > 0 + ...(ctrl.queuedMessages().length > 0 ? [ { label: tr('Queued Messages ({count})', { - count: ctrl.queue().entries.length, + count: ctrl.queuedMessages().length, }), - onSelect: () => queueSheetOpen.set(true), + onSelect: () => queueExpanded.set(true), }, ] : []), @@ -1342,6 +1369,30 @@ export function ChatScreen( } footer={ + send.id}> + {(send) => ( + + ({ + ...reference, + truncated: false, + }))} + /> + + + {send().draft.input.text} + + + link.id}> + {(link) => ( + + {link().title} + + )} + + + )} + {/* Live Streaming Preview */} @@ -1437,56 +1488,15 @@ export function ChatScreen( - {/* Queued Messages Compact Pill */} - 0}> - - { - hapticSelection(); - queueSheetOpen.set(true); - }} - class="active:opacity-75" - style={{ - minHeight: 36, - paddingHorizontal: 12, - borderRadius: 10, - borderCurve: 'continuous', - backgroundColor: token('grouped-bg'), - flexDirection: 'row', - alignItems: 'center', - justifyContent: 'space-between', - gap: 8, - }} - > - - - - {tr('{count, plural, one {# message queued} other {# messages queued}}', { - count: ctrl.queue().entries.length, - })} - - - - - + + inputRef?.focus()} + /> {/* Bottom Composer or Offline Notice */} @@ -1516,7 +1526,12 @@ export function ChatScreen( onRemoveLink={(id) => removeDraftLink(rootId, sessionId, id)} mainActions={ canAskFromTray() - ? { ask: () => askSide(traySource), send, canSend: canSend() } + ? { + ask: () => askSide(traySource), + send, + canSend: canSend(), + queue: canQueue() ? () => send('queue') : undefined, + } : undefined } /> @@ -1598,7 +1613,7 @@ export function ChatScreen( sideDraft ? tr('Your question') : isRunning() - ? tr('Queue a follow-up message…') + ? tr('Steer or message Maka…') : tr('Message Maka…') } disabled={sideDraft?.busy()} @@ -1634,28 +1649,11 @@ export function ChatScreen( - send('queue') : undefined} disabled={!canSend()} - onPress={send} - class="active:opacity-70" - style={{ - width: 40, - height: 40, - borderRadius: 20, - backgroundColor: canSend() ? token('primary') : token('surface-muted'), - alignItems: 'center', - justifyContent: 'center', - }} - > - - + /> @@ -1778,102 +1776,6 @@ export function ChatScreen( onOpen={sideDraft ? undefined : openSide} /> - - {/* Queued Messages Sheet */} - { - if (!open) queueSheetOpen.set(false); - }} - backdropStyle={{ backgroundColor: token('scrim') }} - popupStyle={{ - backgroundColor: token('grouped-bg'), - borderTopLeftRadius: 20, - borderTopRightRadius: 20, - borderCurve: 'continuous', - paddingTop: 4, - }} - grabberStyle={{ - width: 36, - height: 5, - borderRadius: 3, - alignSelf: 'center', - backgroundColor: token('tertiary-foreground'), - marginTop: 6, - marginBottom: 4, - }} - > - - - {tr('Queued Messages')} - - queueSheetOpen.set(false)} - style={{ minHeight: 36, paddingHorizontal: 8, justifyContent: 'center' }} - > - {tr('Done')} - - - - - entry.messageId}> - {(entry, index) => ( - void ctrl.cancelQueuedMessage(entry().messageId)} - style={{ - minHeight: 32, - paddingHorizontal: 10, - borderRadius: 8, - backgroundColor: token('destructive-tint'), - justifyContent: 'center', - }} - > - - {tr('Remove')} - - - ) : undefined - } - divider={index() < ctrl.queue().entries.length - 1} - /> - )} - - - - ); diff --git a/products/maka/ios-shell/app/screens/chats/ComposerPendingDock.tsx b/products/maka/ios-shell/app/screens/chats/ComposerPendingDock.tsx new file mode 100644 index 00000000000..0fe7aaec23c --- /dev/null +++ b/products/maka/ios-shell/app/screens/chats/ComposerPendingDock.tsx @@ -0,0 +1,488 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { + Clipboard, + createMotion, + effect, + LayoutAnimation, + reduceMotion, + Scroll, + signal, + Text, + token, + View, + type JSX, +} from 'nsh'; +import { Button, ContextMenu, Input } from 'nsh/base'; +import { tr } from '../../locale'; +import { + sendPreview, + trimHostWhitespace, + type createConversationController, +} from '../../state/chat'; +import { showToast } from '../../state/hostPool'; +import { hapticSelection } from '../../state/preferences'; +import { motion, spacing, type } from '../../theme/tokens'; +import { glassSurfaceStyle, Icon } from '../../ui'; + +type Controller = ReturnType; +type QueuedMessage = NonNullable>>; +type Editing = { messageId: string; base: QueuedMessage; text: string; latest?: QueuedMessage }; + +const actions = { flexDirection: 'row', flexWrap: 'wrap', gap: 4 } as const; +const preview = { ...type.footnote, numberOfLines: 1, textOverflow: 'ellipsis' } as const; + +function DockAction(props: { + label: string; + onPress: () => void; + accessibilityLabel?: string; + disabled?: boolean; + destructive?: boolean; +}) { + return ( + + ); +} + +export function QueueSendMenu(props: { + trigger: JSX.Element; + onQueue?: () => void; + disabled: boolean; +}) { + return ( + + { + if (!props.disabled) props.onQueue?.(); + }} + /> + + ); +} + +function SteeringPill(props: { text: string; sending?: boolean; queued?: boolean }) { + const fade = reduceMotion() + ? undefined + : createMotion({ enter: 'fadeIn', duration: motion.fast }); + return ( + + + + + {props.sending + ? tr('Sending…') + : props.queued + ? tr('Waiting for queue…') + : tr('Steer · Waiting for next step')} + + {props.text} + + + ); +} + +export function ComposerPendingDock(props: { + ctrl: Controller; + expanded: boolean; + onExpandedChange: (expanded: boolean) => void; + running: boolean; + generation?: number; + focusComposer: () => void; +}) { + const ctrl = props.ctrl; + const editing = signal(null); + const composing = signal(false); + const editorNotice = () => { + const edit = editing(); + return ( + ctrl.queueError() ?? + (edit && stale(edit) ? tr('The queue changed. Your edit is kept.') : null) + ); + }; + const rowPresent = (id: string) => ctrl.queuedMessages().some((row) => row.messageId === id); + const sameVersion = (message: QueuedMessage) => + message.generation === props.generation && message.revision === ctrl.queue()?.revision; + const stale = (edit: Editing) => !sameVersion(edit.base) || !rowPresent(edit.messageId); + const startEdit = async (messageId: string) => { + const base = await ctrl.readQueuedMessage(messageId); + if (base) editing.set({ messageId, base, text: base.message }); + }; + const reviewLatest = async () => { + const edit = editing(); + if (!edit) return; + const latest = await ctrl.readQueuedMessage(edit.messageId); + if (latest) editing.update((draft) => draft && { ...draft, latest }); + }; + const acceptLatest = () => { + const edit = editing(); + if (!edit?.latest || !sameVersion(edit.latest)) return; + editing.set({ ...edit, base: edit.latest, latest: undefined }); + ctrl.clearQueueError(); + }; + const closeEditor = () => { + composing.set(false); + editing.set(null); + ctrl.clearQueueError(); + }; + const save = async () => { + const edit = editing(); + if (!edit || composing() || stale(edit)) return; + if (await ctrl.updateQueuedMessage(edit.messageId, edit.base.revision, edit.text)) + closeEditor(); + }; + const copyEdit = async () => { + const edit = editing(); + if (!edit) return; + try { + await Clipboard.writeText(edit.text); + showToast(tr('Copied')); + } catch (cause) { + console.warn('Could not copy queued message edit', cause); + showToast(tr('Could not copy the edit.')); + } + }; + const toggle = () => { + hapticSelection(); + if (!reduceMotion()) + LayoutAnimation.configureNext(LayoutAnimation.create(motion.normal, 'easeInEaseOut')); + if (props.expanded) composing.set(false); + props.onExpandedChange(!props.expanded); + }; + let pillCount = 0; + effect(() => { + const next = + ctrl.steeringMessages().length + + ctrl.pendingSends().filter((send) => !('detail' in send)).length; + if (next < pillCount && !reduceMotion()) + LayoutAnimation.configureNext( + LayoutAnimation.create(motion.fast, 'easeInEaseOut', 'opacity'), + ); + pillCount = next; + }); + + return ( + + + + + send.id}> + {(send) => { + const failure = () => { + const item = send(); + return 'detail' in item ? item : null; + }; + return ( + + } + > + {(failed) => ( + + + + + + {sendPreview(send().draft)} + + + {failed().detail} + + + + + { + if (ctrl.editPendingSend(send().id)) props.focusComposer(); + }} + /> + + void ctrl.retryPendingSend(send().id)} + /> + + ctrl.dismissPendingSend(send().id)} + /> + + + )} + + ); + }} + + entry.messageId}> + {(entry) => } + + + + + + + + + + {tr('{count} queued', { count: ctrl.queuedMessages().length })} + + + {props.expanded ? '' : ctrl.queuedMessages()[0]?.preview} + + + + + + + + + + {(detail) => ( + + {detail()} + + )} + + entry.messageId}> + {(entry) => ( + + + {entry().preview || tr('Queued turn')} + + + void ctrl.promoteQueuedMessage(entry().messageId)} + /> + void startEdit(entry().messageId)} + /> + void ctrl.cancelQueuedMessage(entry().messageId)} + /> + + + )} + + } + > + {(edit) => ( + + composing.set(active)} + onChange={({ value }) => + editing.update((current) => current && { ...current, text: value }) + } + style={{ + ...type.body, + minHeight: 44, + maxHeight: 88, + padding: 8, + color: token('foreground'), + backgroundColor: token('surface'), + borderRadius: spacing.controlRadius, + }} + /> + + + {tr('Current queued message')} + + + {edit().latest?.message} + + + + void save()} + /> + } + > + + void reviewLatest()} + /> + + } + > + + + + void copyEdit()} /> + + + + )} + + + + + + + + + + + ); +} diff --git a/products/maka/ios-shell/app/state/chat.ts b/products/maka/ios-shell/app/state/chat.ts index 90df21af9e7..bd97108146e 100644 --- a/products/maka/ios-shell/app/state/chat.ts +++ b/products/maka/ios-shell/app/state/chat.ts @@ -22,6 +22,7 @@ import { batch, cleanup, computed, effect, signal, untracked } from 'nsh'; import { hostMutate, hostQuery, + MutationNotSubmitted, watchHost, type AgentBackendPreference, type AgentDeliveryPage, @@ -33,7 +34,11 @@ import { type AgentInteractionSummary, type AgentModelChoice, type AgentMetadataResult, + type AgentQueueAction, + type AgentQueueEntry, + type AgentQueueMessageResult, type AgentQueueMutationResult, + type AgentRun, type AgentObservation, type AgentQueue, type AgentRoomMessage, @@ -566,89 +571,198 @@ export async function fetchGitWorkspaceDiff( ); } -// Snapshot and consume only the submitted draft, whether this is the first side question or a normal send. -export async function sendDraft( +export type SendDelivery = 'steer' | 'queue'; + +type DraftContent = Pick; +type SendTarget = { + backend: AgentBackendPreference | null; + expectedRunId: AgentRun['runId'] | null; +}; + +function sendText(snapshot: DraftContent) { + return [trimHostWhitespace(snapshot.input.text), ...snapshot.links.map(sessionInvocation)] + .filter(Boolean) + .join(' '); +} + +function consumeDraft(rootId: string, sessionId: string, snapshot: DraftContent) { + const sentQuoteIds = new Set(snapshot.quotes.map((quote) => quote.id)); + updateDraft(rootId, sessionId, (draft) => ({ + ...draft, + input: draft.input === snapshot.input ? emptyDraft.input : draft.input, + quotes: draft.quotes.filter((quote) => !sentQuoteIds.has(quote.id)), + links: draft.links.filter((link) => !snapshot.links.includes(link)), + })); +} + +async function sendBackend( + rootId: string, + connection: NonNullable>, + backend: AgentBackendPreference | null, +) { + let selected = backend; + if (!selected && connection.endpoints.includes('settings')) { + const choice = await readDefaultModel(settingsRpc(rootId)); + selected = choice ? modelBackend(choice) : null; + } + if (!selected) throw new Error(tr('Select model')); + return selected; +} + +function deliverDraft( rootId: string, sessionId: string, + generation: number, room: boolean, - selectedBackend: (generation: number) => Promise, - current = () => true, - onError?: (message: string) => void, + draft: DraftContent, + target: SendTarget, + delivery: SendDelivery, + onRoomPostPrepared?: (messageId: string) => void, +) { + return hostMutate( + 'agent', + 'send', + { + mentions: [], + replyTo: null, + onComplete: null, + ...(!room && { quotes: draft.quotes.map((quote) => quote.reference) }), + delivery, + ...target, + attachments: [], + sessionId, + message: sendText(draft), + }, + { + rootId, + generation, + ...(onRoomPostPrepared && { + prepareRoomPost: true, + onProgress: ({ value }) => { + const event = value as { kind: string; messageId?: string } | null; + if (event?.kind === 'room_post_prepared' && typeof event.messageId === 'string') + onRoomPostPrepared(event.messageId); + }, + }), + }, + ); +} + +function sendRejection(result: Extract) { + switch (result.kind === 'rejected' ? result.reason : result.kind) { + case 'turn_stopped': + return stoppedSend(); + case 'workspace_unavailable': + return tr('Not sent. Choose a workspace, then retry.'); + case 'model_unavailable': + return tr('The selected model is unavailable. Try again or choose another model.'); + case 'original_operation_unsettled': + return tr( + 'Message was not sent because the previous run is unsettled. Your message is kept.', + ); + case 'skills_unavailable': + return tr('The requested skill is unavailable. Edit the message or try again.'); + case 'not_your_worker': + return tr('Could not send the message.'); + } +} + +const stoppedSend = () => tr('Stopped before delivery. Your message is kept.'); + +const unconfirmedSend = () => + tr( + 'Could not confirm whether the message was sent. Check the conversation or queue before retrying.', + ); + +// The fork receipt owns the first side-question send before its chat is mounted. +export async function sendDraft( + rootId: string, + sessionId: string, + backend: AgentBackendPreference | null, + delivery: SendDelivery = 'steer', ): Promise { const snapshot = getDraft(rootId, sessionId); - const quotes = room ? undefined : snapshot.quotes; - const links = room ? [] : snapshot.links; - const text = [trimHostWhitespace(snapshot.input.text), ...links.map(sessionInvocation)] - .filter(Boolean) - .join(' '); - if (snapshot.sending || (!text && !quotes?.length)) return false; + if (snapshot.sending || (!sendText(snapshot) && !snapshot.quotes.length)) return false; updateDraft(rootId, sessionId, (draft) => ({ ...draft, sending: true })); const fail = (message: string) => { hapticNotification('error'); - if (current()) onError?.(message); showToast(message); return false; }; try { const connection = activeHostInfo(rootId); if (!connection) return fail(tr('Computer is offline')); - const { generation } = connection; - let backend = room ? null : await selectedBackend(generation); - if (backend === false || !current()) return false; - if (!room && !backend && connection.endpoints.includes('settings')) { - const choice = await readDefaultModel(settingsRpc(rootId)); - backend = choice ? modelBackend(choice) : null; - } - if (!current()) return false; - if (activeHostInfo(rootId)?.generation !== generation) return fail(tr('Computer is offline')); - if (!room && !backend) return fail(tr('Select model')); - let res: AgentSendResult; + const selected = await sendBackend(rootId, connection, backend); + if (activeHostInfo(rootId)?.generation !== connection.generation) + return fail(tr('Computer is offline')); + let result: AgentSendResult; try { - res = await hostMutate( - 'agent', - 'send', - { - mentions: [], - replyTo: null, - onComplete: null, - ...(quotes && { quotes: quotes.map((quote) => quote.reference) }), - delivery: 'queue', - expectedRunId: null, - attachments: [], - backend, - sessionId, - message: text, - }, - { rootId, generation }, + result = await deliverDraft( + rootId, + sessionId, + connection.generation, + false, + snapshot, + { backend: selected, expectedRunId: null }, + delivery, ); } catch (cause) { console.warn('Could not confirm send result', cause); return fail( - tr( - 'Could not confirm whether the message was sent. Check the conversation or queue before retrying.', - ), + cause instanceof MutationNotSubmitted + ? tr('Could not send the message.') + : unconfirmedSend(), ); } - if (res.kind === 'rejected' || res.kind === 'not_your_worker') { - console.warn('Host declined send', res.kind === 'rejected' ? res.reason : res.kind); + if (result.kind === 'rejected' || result.kind === 'not_your_worker') return fail(tr('Could not send the message.')); - } - const sentQuoteIds = new Set(quotes?.map((quote) => quote.id)); - updateDraft(rootId, sessionId, (draft) => ({ - ...draft, - input: draft.input === snapshot.input ? emptyDraft.input : draft.input, - quotes: draft.quotes.filter((quote) => !sentQuoteIds.has(quote.id)), - links: draft.links.filter((link) => !links.includes(link)), - })); + consumeDraft(rootId, sessionId, snapshot); + hapticSelection(); + void refreshHostSessions(rootId, hostById(rootId)?.hostName ?? rootId); + return true; } catch (cause) { console.warn('Could not send message', cause); - return fail(tr('Could not send the message.')); + return fail(cause instanceof Error ? cause.message : tr('Could not send the message.')); } finally { updateDraft(rootId, sessionId, (draft) => ({ ...draft, sending: false })); } - hapticSelection(); - void refreshHostSessions(rootId, hostById(rootId)?.hostName ?? rootId); - return true; +} + +type ComposerSend = { + id: number; + generation: number; + historyThrough: number; + draft: DraftContent; + delivery: SendDelivery; +} & ( + | { state: 'sending'; startsRun: boolean; messageId?: string } + | { state: 'queued'; startsRun: boolean; messageId: string; revision: number } + | { state: 'started'; messageId: string } + | { state: 'failed' | 'unknown'; detail: string; messageId?: string } +); + +type QueueSnapshot = { generation: number; value: AgentQueue }; +type SteeringObservation = { entry: AgentQueueEntry; historyThrough: number; withheldBy?: number }; +type DeliveryCheck = { generation: number } & ( + | { kind: 'pending' | 'checked'; revision: number } + | { kind: 'interrupted'; snapshot: QueueSnapshot } + | { kind: 'delivered'; historyThrough: number } +); + +const sentMessageId = (send: ComposerSend) => ('messageId' in send ? send.messageId : undefined); + +const emptySends: readonly ComposerSend[] = []; +// Like drafts, undelivered messages survive leaving and reopening this chat. +const sendsByChat = signal>({}); +let nextSendId = 0; + +export function sendPreview(draft: DraftContent) { + return ( + trimHostWhitespace(draft.input.text) || + draft.quotes[0]?.reference.text || + draft.links[0]?.title || + '' + ); } let watchSeq = 0; @@ -689,7 +803,155 @@ export function createConversationController( return pending?.generation === activeHostInfo(rootId)?.generation ? pending : null; }; const error = signal(null); - const queue = signal({ revision: 0, entries: [] }); + const queueSnapshot = signal(null); + const queue = () => { + const snapshot = queueSnapshot(); + return snapshot && snapshot.generation === activeHostInfo(rootId)?.generation + ? snapshot.value + : undefined; + }; + const visibleQueue = computed( + () => + queue()?.entries.filter( + (entry) => entry.kind !== 'in_flight' && entry.origin?.kind !== 'session_completion', + ) ?? [], + ); + const queuedMessages = computed(() => + visibleQueue().filter((entry) => entry.kind === 'followup' || entry.kind === 'held'), + ); + const key = conversationKey(rootId, sessionId); + const observedSteering = signal>(new Map()); + const deliveryChecks = new Map(); + const composerSends = computed(() => sendsByChat()[key] ?? emptySends); + const updateSends = (update: (sends: readonly ComposerSend[]) => readonly ComposerSend[]) => { + sendsByChat.update((all) => { + const current = all[key] ?? emptySends; + const next = update(current); + if (next === current) return all; + const updated = { ...all }; + if (next.length) updated[key] = next; + else delete updated[key]; + return updated; + }); + }; + + const transcriptMessageIds = computed( + () => + new Set( + isRoom() + ? (roomMessages() ?? []).map((row) => row.id) + : (chunks() ?? []).flatMap((chunk) => + chunk.role === 'user' && chunk.messageId != null ? [chunk.messageId] : [], + ), + ), + ); + // Until the RPC supplies a message ID, hold back newly projected rows, + // not rows with matching text: repeated prompts are different messages. + const unacknowledgedIdle = computed(() => + composerSends().find( + (send) => + send.state === 'sending' && + send.startsRun && + send.generation === activeHostInfo(rootId)?.generation, + ), + ); + const visibleChunks = computed(() => { + const rows = chunks() ?? []; + const send = unacknowledgedIdle(); + return send + ? rows.filter( + ({ position }) => position?.kind !== 'live' || position.sequence <= send.historyThrough, + ) + : rows; + }); + // Never hide a Room post. The bridge supplies our exact ID before confirming + // the mutation; handoff can then use identity even before the final receipt. + const visibleRoomMessages = computed(() => roomMessages() ?? []); + const unacknowledgedSteer = computed(() => + composerSends().find( + (send) => send.state === 'sending' && send.delivery === 'steer' && !send.startsRun, + ), + ); + const handedOff = computed(() => { + const sends = composerSends(); + if (!sends.some(sentMessageId)) return emptySends; + const revision = queue()?.revision ?? -1; + const generation = activeHostInfo(rootId)?.generation; + const queuedIds = new Set(queuedMessages().map((entry) => entry.messageId)); + const delivered = transcriptMessageIds(); + return sends.filter((send) => { + const id = sentMessageId(send); + return ( + id !== undefined && + (delivered.has(id) || + (send.state === 'queued' && + queuedIds.has(id) && + (send.generation !== generation || revision >= send.revision))) + ); + }); + }); + effect(() => { + const settled = handedOff(); + if (!settled.length) return; + const ids = new Set(settled.map((send) => send.id)); + updateSends((sends) => sends.filter((send) => !ids.has(send.id))); + }); + + const projectsInTranscript = (send: ComposerSend) => { + if (send.state === 'sending') return send.startsRun; + if (send.state !== 'started' && !(send.state === 'queued' && send.startsRun)) return false; + // A paginated tail can have advanced past an accepted send while this + // chat was closed. Keep it in the dock while checking that delivery. + const head = chunks()?.[0]?.position; + return ( + earlierHistory()?.kind !== 'agent' || + head?.kind !== 'live' || + head.sequence <= send.historyThrough + ); + }; + const remainingSends = computed(() => { + const hidden = new Set(handedOff()); + return composerSends().filter((send) => !hidden.has(send)); + }); + const optimisticSends = computed(() => remainingSends().filter(projectsInTranscript)); + const pendingSends = computed(() => + remainingSends().filter((send) => !projectsInTranscript(send)), + ); + const isWithheld = (steering: SteeringObservation) => + steering.withheldBy !== undefined && steering.withheldBy === unacknowledgedSteer()?.id; + const steeringMessages = computed(() => { + const steering = observedSteering(); + if (!steering.size) return []; + const delivered = transcriptMessageIds(); + const localIds = new Set(composerSends().map(sentMessageId)); + return [...steering.values()] + .filter( + (item) => + !isWithheld(item) && + !localIds.has(item.entry.messageId) && + !delivered.has(item.entry.messageId), + ) + .map(({ entry }) => entry); + }); + const forgetSteering = (ids: ReadonlySet) => + observedSteering.update((previous) => { + if (![...ids].some((id) => previous.has(id))) return previous; + const next = new Map(previous); + for (const id of ids) next.delete(id); + return next; + }); + const retireDelivered = (ids: ReadonlySet) => { + if (!ids.size) return; + batch(() => { + forgetSteering(ids); + updateSends((sends) => + sends.filter((send) => { + const id = sentMessageId(send); + return id === undefined || !ids.has(id); + }), + ); + }); + }; const pendingInteractions = signal([]); const models = signal([]); const busyInteractionIds = signal>({}); @@ -821,6 +1083,18 @@ export function createConversationController( const refreshTail = async () => { const generation = activeHostInfo(rootId)?.generation; const current = () => !disposed && activeHostInfo(rootId)?.generation === generation; + // Only a read dispatched after delivery was confirmed can use a + // truncated window as evidence that the message is now outside it. + const confirmedPosts = new Set(); + const confirmedSteers = new Map(); + if (isRoom()) { + for (const send of composerSends()) + if (send.state === 'started') confirmedPosts.add(send.messageId); + } else { + for (const [id, check] of deliveryChecks) + if (check.kind === 'delivered' && check.generation === generation) + confirmedSteers.set(id, check.historyThrough); + } try { const page = await queryHistory({ kind: 'tail' }, null); if (!current()) return; @@ -843,7 +1117,9 @@ export function createConversationController( roomMessages.set(tail); earlierHistory.set(before == null ? null : { kind: 'room', cursor: before }); } + if (generation !== undefined) historyFence.set({ generation, through }); lastThrough = Math.max(lastThrough ?? 0, through); + if (before != null) retireDelivered(confirmedPosts); }); } else { const existing = chunks() ?? []; @@ -908,6 +1184,12 @@ export function createConversationController( } } if (through !== null) lastThrough = Math.max(lastThrough ?? 0, through); + const head = chunks()?.[0]?.position; + if (before != null && head?.kind === 'live') { + const pagedOut = new Set(); + for (const [id, fence] of confirmedSteers) if (head.sequence > fence) pagedOut.add(id); + retireDelivered(pagedOut); + } }); } const handoff = !historyDirty && accumulator.completeHandoffIfPending(); @@ -1006,16 +1288,194 @@ export function createConversationController( subId, 'watch', { sessionId, after: lastThrough ?? 0 }, - applyWatchItem, + (page) => applyWatchItem(page, gen), (cause) => console.warn('Could not watch conversation', cause), ); }; + const isCurrent = (generation: number) => + !disposed && activeHostInfo(rootId)?.generation === generation; + + const applyQueue = (value: AgentQueue, generation: number) => { + if (!isCurrent(generation) || !(value.revision >= (queue()?.revision ?? -1))) return; + batch(() => { + queueSnapshot.set({ generation, value }); + observedSteering.update((previous) => { + const delivered = previous.size ? transcriptMessageIds() : null; + const next = new Map(previous); + if (delivered) for (const id of next.keys()) if (delivered.has(id)) next.delete(id); + for (const entry of value.entries) { + if (entry.kind === 'steering' && entry.origin?.kind !== 'session_completion') { + if (!transcriptMessageIds().has(entry.messageId)) { + // Keep the existing remote pills; only new contenders wait for + // a local receipt to tell us which one belongs to our send. + const existing = next.get(entry.messageId); + next.set(entry.messageId, { + entry, + historyThrough: existing?.historyThrough ?? historyFence()?.through ?? 0, + withheldBy: existing ? existing.withheldBy : unacknowledgedSteer()?.id, + }); + } + } else if (entry.kind !== 'in_flight') { + next.delete(entry.messageId); + } + } + return next; + }); + }); + }; + + const queryQueue = () => + hostQuery('agent', 'queue', { sessionId }, undefined, rootId); + const loadQueue = async (generation: number) => applyQueue(await queryQueue(), generation); + const refreshQueue = async (generation = activeHostInfo(rootId)?.generation) => { + if (isRoom() || generation === undefined || !isCurrent(generation)) return; + try { + await loadQueue(generation); + } catch (cause) { + console.warn('Could not read the message queue', cause); + if (isCurrent(generation)) showToast(tr('Could not load the message queue.')); + } + }; + + const queueMessage = (messageId: string, expectedRevision: number) => + hostQuery( + 'agent', + 'queueMessage', + { sessionId, messageId, expectedRevision }, + undefined, + rootId, + ); + + const recoverDelivery = (messageId: string, cancelled: boolean) => { + const send = composerSends().find((item) => sentMessageId(item) === messageId); + if (!send) { + if (cancelled) forgetSteering(new Set([messageId])); + return; + } + const { id, generation, historyThrough, draft, delivery } = send; + const problem: ComposerSend = { + id, + generation, + historyThrough, + draft, + delivery, + messageId, + state: cancelled ? 'failed' : 'unknown', + detail: cancelled ? stoppedSend() : unconfirmedSend(), + }; + batch(() => { + forgetSteering(new Set([messageId])); + updateSends((sends) => sends.map((item) => (item === send ? problem : item))); + }); + }; + + const checkFinished = signal(0); + effect(() => { + const snapshot = queueSnapshot(); + if (!snapshot || !isCurrent(snapshot.generation) || isRoom()) return; + const { generation, value } = snapshot; + const local = remainingSends(); + const steering = observedSteering(); + checkFinished(); + if (!local.length && !steering.size && !deliveryChecks.size) return; + + const delivered = transcriptMessageIds(); + const present = new Set(value.entries.map((entry) => entry.messageId)); + const missing = new Set(); + const landedSteering = new Set(); + for (const [id, entry] of steering) { + if (delivered.has(id)) landedSteering.add(id); + else if (!present.has(id) && !isWithheld(entry)) missing.add(id); + } + if (landedSteering.size) forgetSteering(landedSteering); + for (const send of local) { + const id = sentMessageId(send); + if (id === undefined || send.state === 'failed' || present.has(id)) continue; + if ( + send.state === 'queued' && + send.generation === generation && + value.revision < send.revision + ) + continue; + missing.add(id); + } + for (const [id, check] of deliveryChecks) { + if (!missing.has(id) && check.kind !== 'pending') deliveryChecks.delete(id); + } + for (const id of missing) { + const previous = deliveryChecks.get(id); + if ( + previous?.generation === generation && + (previous.kind === 'pending' || + previous.kind === 'delivered' || + (previous.kind === 'checked' && previous.revision === value.revision) || + (previous.kind === 'interrupted' && previous.snapshot === snapshot)) + ) + continue; + + const check: DeliveryCheck = { generation, kind: 'pending', revision: value.revision }; + deliveryChecks.set(id, check); + const interruptCheck = () => { + if (!isCurrent(generation)) return; + // A new snapshot can retry even at this revision; don't spin on this one. + if (queueSnapshot() !== snapshot) { + deliveryChecks.delete(id); + return; + } + deliveryChecks.set(id, { generation, kind: 'interrupted', snapshot }); + recoverDelivery(id, false); + }; + void (async () => { + try { + const result = await queueMessage(id, check.revision); + if (!isCurrent(generation)) return; + if (result.kind === 'revision_conflict') { + if ((queue()?.revision ?? -1) < result.actual) { + const refreshed = await queryQueue(); + // A refresh that did not reach the reported revision must not + // publish another copy of the very snapshot that conflicted. + if (refreshed.revision >= result.actual) applyQueue(refreshed, generation); + } + interruptCheck(); + return; + } + if (result.kind !== 'missing') return; + if (result.reason === 'delivered') { + const send = composerSends().find((item) => sentMessageId(item) === id); + deliveryChecks.set(id, { + generation, + kind: 'delivered', + historyThrough: send?.historyThrough ?? steering.get(id)?.historyThrough ?? 0, + }); + void loadHistory(); + } else if (result.reason === 'cancelled' || queue()?.revision === check.revision) { + recoverDelivery(id, result.reason === 'cancelled'); + } + } catch (cause) { + if (!isCurrent(generation)) return; + console.warn('Could not verify message delivery', cause); + interruptCheck(); + } finally { + if (deliveryChecks.get(id) === check) + deliveryChecks.set(id, { generation, kind: 'checked', revision: value.revision }); + if (isCurrent(generation)) checkFinished.update((n) => n + 1); + } + })(); + } + }); + const refreshAll = async () => { error.set(null); loading.set(true); try { - await Promise.all([loadObserve(), loadHistory(), loadInteractions(), loadModels()]); + await Promise.all([ + loadObserve(), + loadHistory(), + loadInteractions(), + loadModels(), + refreshQueue(), + ]); } finally { if (!disposed) loading.set(false); } @@ -1096,33 +1556,198 @@ export function createConversationController( (!isRoom() && (draft().quotes.length || draft().links.length)), ); - const sendMessage = async () => { + const submit = async (snapshot: DraftContent, delivery: SendDelivery, retryId?: number) => { + const room = isRoom(); + const content = room ? { input: snapshot.input, quotes: [], links: [] } : snapshot; + if (sending() || (!sendText(content) && !content.quotes.length)) return false; error.set(null); - const sent = await sendDraft( - rootId, - sessionId, - isRoom(), - async (generation) => { - if (isRoom()) return null; + const failPreflight = (message: string) => { + hapticNotification('error'); + if (!disposed && retryId === undefined) error.set(message); + showToast(message); + return false; + }; + + const connection = activeHostInfo(rootId); + if (!connection) return failPreflight(tr('Computer is offline')); + const { generation } = connection; + updateDraft(rootId, sessionId, (draft) => ({ ...draft, sending: true })); + try { + if (!room && (retryId !== undefined || !observation())) { + await loadObserve(retryId !== undefined); + if (!isCurrent(generation)) return failPreflight(tr('Computer is offline')); + if (error() || !observation()) return failPreflight(error() ?? tr('Select model')); + } + const run = observation()?.run; + const expectedRunId = room ? null : (run?.runId ?? null); + const startsRun = run == null; + const send = { + id: retryId ?? ++nextSendId, + generation, + draft: content, + delivery, + historyThrough: historyFence()?.through ?? observation()?.through ?? 0, + }; + const keep = (attempt: ComposerSend) => { + if (retryId !== undefined && !failedSend(retryId)) return false; + batch(() => { + if (retryId === undefined) { + updateSends((sends) => [...sends, attempt]); + consumeDraft(rootId, sessionId, content); + } else + updateSends((sends) => sends.map((item) => (item.id === send.id ? attempt : item))); + }); + return true; + }; + const runChanged = () => !room && run?.runId !== observation()?.run?.runId; + const rejectChangedRun = () => { + const detail = observation()?.run + ? tr('The active turn changed. Your message is kept.') + : stoppedSend(); + if (keep({ ...send, state: 'failed', detail })) hapticNotification('error'); + return false; + }; + + let backend: AgentBackendPreference | null = null; + if (!room && !(delivery === 'steer' && run?.backend === 'model')) { const pending = selectingModel(); - if (pending && !(await pending.done)) return false; - if (!observation() && activeHostInfo(rootId)?.generation === generation) - await loadObserve(false); - if (disposed) return null; - if (activeHostInfo(rootId)?.generation !== generation) - throw new Error(tr('Computer is offline')); - if (!observation()) throw new Error(error() ?? tr('Select model')); - return selectedBackend(); - }, - () => !disposed, - (message) => error.set(message), + const selected = !pending || (await pending.done); + if (!isCurrent(generation)) return failPreflight(tr('Computer is offline')); + if (runChanged()) return rejectChangedRun(); + if (!selected) return false; + try { + backend = await sendBackend(rootId, connection, selectedBackend()); + } catch (cause) { + if (isCurrent(generation) && runChanged()) return rejectChangedRun(); + throw cause; + } + } + if (!isCurrent(generation)) return failPreflight(tr('Computer is offline')); + if (runChanged()) return rejectChangedRun(); + if (!keep({ ...send, state: 'sending', startsRun })) return false; + const settle = (next: ComposerSend) => + updateSends((sends) => + sends.map((item) => + item.id === send.id && item.state === 'sending' && item.generation === generation + ? next + : item, + ), + ); + let result: AgentSendResult; + let preparedRoomPost: string | undefined; + try { + result = await deliverDraft( + rootId, + sessionId, + generation, + room, + content, + { + backend, + expectedRunId, + }, + delivery, + room + ? (messageId) => { + preparedRoomPost = messageId; + settle({ ...send, state: 'sending', startsRun, messageId }); + } + : undefined, + ); + } catch (cause) { + console.warn('Could not confirm send result', cause); + if (cause instanceof MutationNotSubmitted) { + settle({ ...send, state: 'failed', detail: tr('Could not send the message.') }); + hapticNotification('error'); + } else { + settle({ + ...send, + state: 'unknown', + detail: unconfirmedSend(), + messageId: preparedRoomPost, + }); + hapticNotification('warning'); + } + return false; + } + if (result.kind === 'rejected' || result.kind === 'not_your_worker') { + settle({ ...send, state: 'failed', detail: sendRejection(result) }); + hapticNotification('error'); + return false; + } + const { messageId } = result; + settle( + result.kind === 'queued' + ? { ...send, state: 'queued', messageId, startsRun, revision: result.revision } + : { ...send, state: 'started', messageId }, + ); + hapticSelection(); + if (isCurrent(generation)) { + void loadObserve(); + void loadHistory(); + if (result.kind === 'queued') void refreshQueue(generation); + void refreshHostSessions(rootId, hostById(rootId)?.hostName ?? rootId); + } + return true; + } catch (cause) { + console.warn('Could not prepare message', cause); + return failPreflight( + cause instanceof Error ? cause.message : tr('Could not send the message.'), + ); + } finally { + updateDraft(rootId, sessionId, (draft) => ({ ...draft, sending: false })); + } + }; + + const sendMessage = (delivery: SendDelivery = 'steer') => submit(draft(), delivery); + const failedSend = (id: number) => + composerSends().find( + (send) => send.id === id && (send.state === 'failed' || send.state === 'unknown'), ); - if (sent && !disposed) { - void Promise.all([loadObserve(), loadHistory()]).catch((cause) => { - if (!disposed) error.set(cause instanceof Error ? cause.message : String(cause)); - }); + const dismissPendingSend = (id: number) => { + const send = failedSend(id); + if (!send) return; + batch(() => { + const messageId = sentMessageId(send); + if (messageId !== undefined) forgetSteering(new Set([messageId])); + updateSends((sends) => sends.filter((send) => send.id !== id)); + }); + }; + const editPendingSend = (id: number) => { + const send = failedSend(id); + if (!send || sending()) return false; + const current = draft(); + const quotes = [...current.quotes]; + for (const quote of send.draft.quotes) { + if ( + !quotes.some( + (item) => + item.sourceKey === quote.sourceKey && item.reference.text === quote.reference.text, + ) + ) + quotes.push(quote); + } + if (quotes.length > quoteLimit) { + showToast(tr('Quote limit reached ({count})', { count: quoteLimit })); + return false; } - return sent; + const links = [ + ...current.links, + ...send.draft.links.filter((link) => !current.links.some((item) => item.id === link.id)), + ]; + const text = + current.input.text === send.draft.input.text + ? current.input.text + : [current.input.text, send.draft.input.text].filter(Boolean).join('\n\n'); + batch(() => { + updateDraft(rootId, sessionId, (draft) => ({ ...draft, input: { text }, quotes, links })); + dismissPendingSend(id); + }); + return true; + }; + const retryPendingSend = (id: number) => { + const send = failedSend(id); + if (send?.state === 'failed') return submit(send.draft, send.delivery, id); }; const stopRun = async () => { @@ -1179,28 +1804,111 @@ export function createConversationController( return done; }; - const cancelQueuedMessage = async (messageId: string) => { - const q = queue(); + const queueOperation = signal<{ generation: number; through?: number } | null>(null); + const queueNotice = signal<{ generation: number; detail: string } | null>(null); + const queueError = () => { + const notice = queueNotice(); + return notice && isCurrent(notice.generation) ? notice.detail : null; + }; + const clearQueueError = () => queueNotice.set(null); + const queueBusy = () => { + const pending = queueOperation(); + return ( + !!pending && + isCurrent(pending.generation) && + (pending.through === undefined || (queue()?.revision ?? -1) < pending.through) + ); + }; + const queueChanged = () => + tr('The queue changed. Review the current message before trying again.'); + const queueMissing = () => tr('This message is no longer queued.'); + const reportQueueError = (generation: number, detail: string) => { + if (isCurrent(generation)) queueNotice.set({ generation, detail }); + }; + const changeQueue = async ( + edit: Exclude, + expectedRevision = queue()?.revision, + ) => { + const generation = activeHostInfo(rootId)?.generation; + if (disposed || generation === undefined || expectedRevision === undefined || queueBusy()) + return false; + const operation = { generation }; + queueOperation.set(operation); + clearQueueError(); + let committed: number | undefined; try { + if (expectedRevision !== queue()?.revision) { + reportQueueError(generation, queueChanged()); + return false; + } const result = await hostMutate( 'agent', 'editQueue', - { - sessionId, - expectedRevision: q.revision, - edit: { kind: 'retract', messageId }, - }, - { rootId }, + { sessionId, expectedRevision, edit }, + { rootId, generation }, + ); + if (!isCurrent(generation)) return false; + if (result.kind === 'committed') { + committed = result.revision; + hapticSelection(); + return true; + } + reportQueueError( + generation, + result.kind === 'revision_conflict' + ? queueChanged() + : result.reason === 'execution_changed' + ? tr('This turn cannot accept this message right now. It remains queued.') + : result.reason === 'not_running' + ? tr('No turn is running. This message remains queued.') + : result.reason === 'missing' || result.reason === 'in_flight' + ? queueMissing() + : tr('Could not update the message queue.'), ); - queue.set(await hostQuery('agent', 'queue', { sessionId }, undefined, rootId)); - if (result.kind !== 'committed') - throw new Error(tr('Could not update the message queue.'), { - cause: result.kind === 'rejected' ? result.reason : result.kind, - }); - hapticSelection(); } catch (cause) { - showToast(cause instanceof Error ? cause.message : String(cause)); + console.warn('Could not update the message queue', cause); + reportQueueError(generation, tr('Could not update the message queue.')); + } finally { + if (queueOperation() === operation) { + if (committed !== undefined) { + // The receipt fences controls, but only a watch or query can replace the queue. + queueOperation.set({ generation, through: committed }); + if (queueBusy()) void refreshQueue(generation); + } else { + await refreshQueue(generation); + if (queueOperation() === operation) queueOperation.set(null); + } + } + } + return false; + }; + + const readQueuedMessage = async (messageId: string) => { + const generation = activeHostInfo(rootId)?.generation; + const expectedRevision = queue()?.revision; + if (disposed || generation === undefined || expectedRevision === undefined || queueBusy()) + return null; + const operation = { generation }; + queueOperation.set(operation); + clearQueueError(); + try { + const result = await queueMessage(messageId, expectedRevision); + if (!isCurrent(generation)) return null; + if ( + result.kind === 'ready' && + result.revision === queue()?.revision && + queuedMessages().some((item) => item.messageId === messageId) + ) + return { ...result, generation }; + reportQueueError(generation, result.kind === 'missing' ? queueMissing() : queueChanged()); + await refreshQueue(generation); + } catch (cause) { + console.warn('Could not read queued message', cause); + reportQueueError(generation, tr('Could not read the queued message.')); + } finally { + if (queueOperation() === operation) queueOperation.set(null); } + return null; }; const respondInteraction = async (requestId: string, answer: Record) => { @@ -1240,13 +1948,13 @@ export function createConversationController( } }; - const applyWatchItem = (page: AgentDeliveryPage) => { + const applyWatchItem = (page: AgentDeliveryPage, generation: number) => { if (page.kind === 'preview') { livePreview.set(accumulator.applyPreviewPage(page.page)); return; } if (page.kind === 'queue') { - queue.set(page.queue); + applyQueue(page.queue, generation); return; } if (page.kind === 'interactions') { @@ -1325,8 +2033,8 @@ export function createConversationController( observation, selectedBackend, selectingModel, - chunks: computed(() => chunks() ?? []), - roomMessages: computed(() => roomMessages() ?? []), + chunks: visibleChunks, + roomMessages: visibleRoomMessages, historyLoaded: () => chunks() !== null || roomMessages() !== null, isRoom, hasMoreBefore: () => earlierHistory() !== null, @@ -1337,6 +2045,16 @@ export function createConversationController( hasDraftContent, error, queue, + queuedMessages, + steeringMessages, + optimisticSends, + pendingSends, + editPendingSend, + retryPendingSend, + dismissPendingSend, + queueBusy, + queueError, + clearQueueError, pendingInteractions, models, busyInteractionIds, @@ -1348,7 +2066,11 @@ export function createConversationController( sendMessage, stopRun, selectModel, - cancelQueuedMessage, + readQueuedMessage, + promoteQueuedMessage: (messageId: string) => changeQueue({ kind: 'promote', messageId }), + updateQueuedMessage: (messageId: string, revision: number, message: string) => + changeQueue({ kind: 'update', messageId, message }, revision), + cancelQueuedMessage: (messageId: string) => changeQueue({ kind: 'retract', messageId }), respondInteraction, }; } diff --git a/products/maka/ios-shell/app/theme/tokens.ts b/products/maka/ios-shell/app/theme/tokens.ts index bbabbf98cd4..8966e96c448 100644 --- a/products/maka/ios-shell/app/theme/tokens.ts +++ b/products/maka/ios-shell/app/theme/tokens.ts @@ -28,6 +28,9 @@ const light = { surface: '#FFFFFF', card: '#FFFFFF', 'surface-elevated': '#FFFFFF', + 'glass-bg': 'rgba(255, 255, 255, 0.68)', + 'glass-border': 'rgba(0, 0, 0, 0.08)', + 'glass-shadow': 'rgba(0, 0, 0, 0.09)', 'surface-muted': '#E5E5EA', muted: '#E5E5EA', 'row-pressed': 'rgba(60, 60, 67, 0.08)', @@ -36,6 +39,11 @@ const light = { foreground: '#000000', 'muted-foreground': 'rgba(60, 60, 67, 0.68)', 'tertiary-foreground': 'rgba(60, 60, 67, 0.36)', + 'glass-foreground': '#171719', + 'glass-muted': '#4F4F57', + 'glass-accent': '#0059B8', + 'glass-action-bg': '#E0ECFA', + 'glass-action-pressed-bg': '#C9DCF3', primary: '#007AFF', 'primary-foreground': '#FFFFFF', 'primary-tint': 'rgba(0, 122, 255, 0.12)', @@ -83,6 +91,9 @@ export function installTheme() { surface: '#1C1C1E', card: '#1C1C1E', 'surface-elevated': '#2C2C2E', + 'glass-bg': 'rgba(36, 36, 38, 0.66)', + 'glass-border': 'rgba(255, 255, 255, 0.12)', + 'glass-shadow': 'rgba(0, 0, 0, 0.42)', 'surface-muted': '#2C2C2E', muted: '#2C2C2E', 'row-pressed': 'rgba(255, 255, 255, 0.09)', @@ -91,6 +102,11 @@ export function installTheme() { foreground: '#FFFFFF', 'muted-foreground': 'rgba(235, 235, 245, 0.65)', 'tertiary-foreground': 'rgba(235, 235, 245, 0.36)', + 'glass-foreground': '#FAFAFC', + 'glass-muted': '#C8C8D0', + 'glass-accent': '#8DC8FF', + 'glass-action-bg': '#273B51', + 'glass-action-pressed-bg': '#354C65', primary: '#0A84FF', 'primary-foreground': '#FFFFFF', 'primary-tint': 'rgba(10, 132, 255, 0.18)', diff --git a/products/maka/ios-shell/app/ui/Glass.tsx b/products/maka/ios-shell/app/ui/Glass.tsx new file mode 100644 index 00000000000..bd773480088 --- /dev/null +++ b/products/maka/ios-shell/app/ui/Glass.tsx @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { token } from 'nsh'; +import { spacing } from '../theme/tokens'; + +export function glassSurfaceStyle(radius: number) { + return { + backgroundColor: token('glass-bg'), + borderColor: token('glass-border'), + borderRadius: radius, + borderCurve: 'continuous' as const, + borderWidth: spacing.hairline, + backdropFilter: 'blur(20px)', + glassEffect: 'regular' as const, + }; +} diff --git a/products/maka/ios-shell/app/ui/index.ts b/products/maka/ios-shell/app/ui/index.ts index 72f9b70b6b0..94995e57e5e 100644 --- a/products/maka/ios-shell/app/ui/index.ts +++ b/products/maka/ios-shell/app/ui/index.ts @@ -21,6 +21,7 @@ export { ActionButton, type ButtonVariant } from './ActionButton'; export { ApprovalCard } from './ApprovalCard'; export { BannerNotice, type NoticeTone } from './BannerNotice'; export { EmptyState } from './EmptyState'; +export { glassSurfaceStyle } from './Glass'; export { Icon, IconBadge, type IconName } from './Icon'; export { GroupDivider, GroupFooter, GroupHeader, GroupRow, InsetGroup } from './InsetGroup'; export { ScopePills, type ScopePillItem } from './ScopePills'; diff --git a/products/maka/ios-shell/locales/de.json b/products/maka/ios-shell/locales/de.json index 0a58109b88d..5984258c5e3 100644 --- a/products/maka/ios-shell/locales/de.json +++ b/products/maka/ios-shell/locales/de.json @@ -12,6 +12,7 @@ "Add MCP server": "MCP-Server hinzufügen", "Add connection": "Verbindung hinzufügen", "Add subagent": "Subagent hinzufügen", + "Add to queue": "Zur Warteschlange", "Add to quotes": "Zu Zitaten hinzufügen", "Additional permissions requested": "Zusätzliche Berechtigungen angefordert", "Advanced options": "Erweiterte Optionen", @@ -119,16 +120,20 @@ "Copy": "Kopieren", "Copy a pairing link from Maka Settings on your computer, then paste it here.": "Kopiere einen Kopplungslink aus den Maka-Einstellungen auf deinem Computer und füge ihn hier ein.", "Copy code": "Code kopieren", + "Copy edit": "Bearbeitung kopieren", "Copy reply": "Antwort kopieren", "Could not change the model.": "Modell konnte nicht gewechselt werden.", "Could not confirm whether the message was sent. Check the conversation or queue before retrying.": "Es ist unklar, ob die Nachricht gesendet wurde. Prüfe vor einem erneuten Versuch den Chatverlauf oder die Warteschlange.", + "Could not copy the edit.": "Die Bearbeitung konnte nicht kopiert werden.", "Could not create the side question. Try again.": "Die Nebenfrage konnte nicht erstellt werden. Versuch es erneut.", "Could not install the plugin.": "Plugin konnte nicht installiert werden.", "Could not load conversation history.": "Unterhaltungsverlauf konnte nicht geladen werden.", "Could not load models.": "Modelle konnten nicht geladen werden.", "Could not load side questions": "Nebenfragen konnten nicht geladen werden", + "Could not load the message queue.": "Die Nachrichtenwarteschlange konnte nicht geladen werden.", "Could not open the conversation.": "Unterhaltung konnte nicht geöffnet werden.", "Could not read or update settings.": "Einstellungen konnten nicht gelesen oder aktualisiert werden.", + "Could not read the queued message.": "Die Nachricht in der Warteschlange konnte nicht gelesen werden.", "Could not read the skill source.": "Die Quelle der Fähigkeit konnte nicht gelesen werden.", "Could not remove the MCP server.": "MCP-Server konnte nicht entfernt werden.", "Could not save the MCP server.": "MCP-Server konnte nicht gespeichert werden.", @@ -143,6 +148,7 @@ "Create Room": "Raum erstellen", "Create Room on {name}": "Raum auf {name} erstellen", "Creating…": "Wird erstellt…", + "Current queued message": "Aktuelle Warteschlangennachricht", "Custom endpoint": "Benutzerdefinierter Endpunkt", "Custom relay or WebSocket": "Benutzerdefiniertes Relay oder WebSocket", "Dark": "Dunkel", @@ -181,6 +187,8 @@ "Dismiss": "Schließen", "Dismiss keyboard": "Tastatur ausblenden", "Done": "Fertig", + "Edit": "Bearbeiten", + "Edit queued message": "Warteschlangennachricht bearbeiten", "Enable": "Aktivieren", "Enable proxy": "Proxy aktivieren", "Enable the parent plugin first.": "Aktivieren Sie zuerst das übergeordnete Plugin.", @@ -234,6 +242,7 @@ "Invalid API key": "Ungültiger API-Schlüssel", "Invalid stored language preference.": "Die gespeicherte Spracheinstellung ist ungültig.", "JSON body": "JSON-Body", + "Keep my edit": "Meine Bearbeitung behalten", "Language": "Sprache", "Latest": "Aktuell", "Leave blank for automatic title": "Für automatischen Titel leer lassen", @@ -251,6 +260,7 @@ "Message Maka…": "Nachricht an Maka…", "Message composer": "Nachrichteneingabe", "Message predictions": "Nachrichtenvorhersagen", + "Message was not sent because the previous run is unsettled. Your message is kept.": "Die Nachricht wurde nicht gesendet, da der vorherige Lauf noch nicht abgeschlossen ist. Ihre Nachricht bleibt erhalten.", "Minimal": "Minimal", "Model": "Modell", "Models": "Modelle", @@ -279,9 +289,11 @@ "No project MCP consent is pending.": "Keine Projekt-MCP-Freigabe ausstehend.", "No side questions yet": "Noch keine Nebenfragen", "No skills": "Keine Fähigkeiten", + "No turn is running. This message remains queued.": "Es läuft kein Durchgang. Diese Nachricht bleibt in der Warteschlange.", "No uncommitted changes": "Keine offenen Änderungen", "No workspace path configured for this chat.": "Für diesen Chat ist kein Arbeitsbereichspfad festgelegt.", "None": "Keine", + "Not sent. Choose a workspace, then retry.": "Nicht gesendet. Wähle einen Arbeitsbereich aus und versuche es erneut.", "Now": "Jetzt", "Off": "Aus", "Offline": "Offline", @@ -381,6 +393,7 @@ "Results array path": "Pfad zum Ergebnis-Array", "Retry": "Erneut versuchen", "Retry now": "Jetzt erneut versuchen", + "Review latest": "Aktuelle Version prüfen", "Review on Desktop": "Auf dem Desktop prüfen", "Review project MCP consent": "Projekt-MCP-Freigabe prüfen", "Room": "Raum", @@ -414,6 +427,7 @@ "Select model": "Modell wählen", "Send message": "Nachricht senden", "Send to Main Chat": "Im Hauptchat senden", + "Sending…": "Wird gesendet…", "Server-side compaction": "Serverseitige Komprimierung", "Service": "Dienst", "Settings": "Einstellungen", @@ -433,7 +447,11 @@ "Start Chat on {name}": "Chat auf {name} starten", "Start a conversation on any connected computer and it will appear here automatically.": "Starte eine Unterhaltung auf einem verbundenen Computer, damit sie automatisch hier erscheint.", "Status": "Status", + "Steer now": "Jetzt lenken", + "Steer or message Maka…": "Lauf lenken oder Maka schreiben …", + "Steer · Waiting for next step": "Lenken · Wartet auf nächsten Schritt", "Stop Run": "Lauf stoppen", + "Stopped before delivery. Your message is kept.": "Vor Zustellung gestoppt. Ihre Nachricht bleibt erhalten.", "Subagents": "Subagenten", "Submit Answer": "Antwort senden", "System": "System", @@ -444,12 +462,17 @@ "Target computer": "Zielcomputer", "Team ID": "Team-ID", "Test connection": "Verbindung testen", + "The active turn changed. Your message is kept.": "Der aktive Lauf hat sich geändert. Deine Nachricht bleibt erhalten.", "The deployment document is invalid.": "Das Bereitstellungsdokument ist ungültig.", "The main conversation is no longer available.": "Die Hauptunterhaltung ist nicht mehr verfügbar.", "The plugin bundle could not be downloaded.": "Das Plugin-Paket konnte nicht heruntergeladen werden.", "The plugin bundle is invalid.": "Das Plugin-Paket ist ungültig.", "The proxy address or username changed. Enter the password again or turn off proxy authentication.": "Proxy-Adresse oder Benutzername wurde geändert. Gib das Passwort erneut ein oder deaktiviere die Proxy-Authentifizierung.", + "The queue changed. Review the current message before trying again.": "Die Warteschlange hat sich geändert. Prüfe die aktuelle Nachricht, bevor du es erneut versuchst.", + "The queue changed. Your edit is kept.": "Die Warteschlange hat sich geändert. Deine Bearbeitung bleibt erhalten.", + "The requested skill is unavailable. Edit the message or try again.": "Der angeforderte Skill ist nicht verfügbar. Bearbeite die Nachricht oder versuche es erneut.", "The selected deployment source is invalid.": "Die ausgewählte Bereitstellungsquelle ist ungültig.", + "The selected model is unavailable. Try again or choose another model.": "Das ausgewählte Modell ist nicht verfügbar. Versuchen Sie es erneut oder wählen Sie ein anderes Modell.", "The selected package is unavailable.": "Das ausgewählte Paket ist nicht verfügbar.", "The selected plugin instance is unavailable.": "Die ausgewählte Plugin-Instanz ist nicht verfügbar.", "These servers run outside the conversation sandbox and can run commands as your user or contact remote services. Full-access sessions can call their tools without further confirmation.": "Diese Server laufen außerhalb der Unterhaltungs-Sandbox und können Befehle als Ihr Benutzer ausführen oder entfernte Dienste kontaktieren. Sitzungen mit Vollzugriff können ihre Werkzeuge ohne weitere Bestätigung aufrufen.", @@ -465,9 +488,11 @@ "This iPhone": "Dieses iPhone", "This iPhone Peer ID": "Peer-ID dieses iPhones", "This iPhone will disconnect from this computer and forget its pairing credentials. You can pair it again anytime.": "Dieses iPhone wird von diesem Computer getrennt und vergisst die Kopplungsdaten. Du kannst ihn jederzeit erneut koppeln.", + "This message is no longer queued.": "Diese Nachricht ist nicht mehr in der Warteschlange.", "This run": "Dieser Lauf", "This server stores literal environment variables or HTTP headers. Edit it on Desktop.": "Dieser Server speichert Umgebungsvariablen oder HTTP-Header im Klartext. Bearbeite ihn am Desktop.", "This session": "Diese Sitzung", + "This turn cannot accept this message right now. It remains queued.": "Dieser Durchgang kann diese Nachricht derzeit nicht annehmen. Sie bleibt in der Warteschlange.", "Thought process": "Gedankengang", "Thought process · {count, plural, one {# tool} other {# tools}}": "Gedankengang · {count, plural, one {# Tool} other {# Tools}}", "Title (optional)": "Titel (optional)", @@ -499,6 +524,7 @@ "View All Side Questions": "Alle Nebenfragen ansehen", "Waiting for current turn": "Wartet auf aktuellen Durchlauf", "Waiting for provider sign-in…": "Warte auf Anmeldung beim Anbieter…", + "Waiting for queue…": "Warte auf die Warteschlange …", "Waiting for your response": "Wartet auf deine Antwort", "Web Search": "Websuche", "WebSocket": "WebSocket", @@ -519,6 +545,7 @@ "{access} · {scope}: {path}": "{access} · {scope}: {path}", "{count, plural, one {# message queued} other {# messages queued}}": "{count, plural, one {# Nachricht in Warteschlange} other {# Nachrichten in Warteschlange}}", "{count, plural, one {# quote} other {# quotes}}": "{count, plural, one {# Zitat} other {# Zitate}}", + "{count} queued": "{count} in der Warteschlange", "{count}d": "{count} T.", "{count}h": "{count} Std.", "{count}m": "{count} Min.", diff --git a/products/maka/ios-shell/locales/en.json b/products/maka/ios-shell/locales/en.json index 68310c935ea..c0ab1b909c0 100644 --- a/products/maka/ios-shell/locales/en.json +++ b/products/maka/ios-shell/locales/en.json @@ -12,6 +12,7 @@ "Add MCP server": "Add MCP server", "Add connection": "Add connection", "Add subagent": "Add subagent", + "Add to queue": "Add to queue", "Add to quotes": "Add to quotes", "Additional permissions requested": "Additional permissions requested", "Advanced options": "Advanced options", @@ -119,16 +120,20 @@ "Copy": "Copy", "Copy a pairing link from Maka Settings on your computer, then paste it here.": "Copy a pairing link from Maka Settings on your computer, then paste it here.", "Copy code": "Copy code", + "Copy edit": "Copy edit", "Copy reply": "Copy reply", "Could not change the model.": "Could not change the model.", "Could not confirm whether the message was sent. Check the conversation or queue before retrying.": "Could not confirm whether the message was sent. Check the conversation or queue before retrying.", + "Could not copy the edit.": "Could not copy the edit.", "Could not create the side question. Try again.": "Could not create the side question. Try again.", "Could not install the plugin.": "Could not install the plugin.", "Could not load conversation history.": "Could not load conversation history.", "Could not load models.": "Could not load models.", "Could not load side questions": "Could not load side questions", + "Could not load the message queue.": "Could not load the message queue.", "Could not open the conversation.": "Could not open the conversation.", "Could not read or update settings.": "Could not read or update settings.", + "Could not read the queued message.": "Could not read the queued message.", "Could not read the skill source.": "Could not read the skill source.", "Could not remove the MCP server.": "Could not remove the MCP server.", "Could not save the MCP server.": "Could not save the MCP server.", @@ -143,6 +148,7 @@ "Create Room": "Create Room", "Create Room on {name}": "Create Room on {name}", "Creating…": "Creating…", + "Current queued message": "Current queued message", "Custom endpoint": "Custom endpoint", "Custom relay or WebSocket": "Custom relay or WebSocket", "Dark": "Dark", @@ -181,6 +187,8 @@ "Dismiss": "Dismiss", "Dismiss keyboard": "Dismiss keyboard", "Done": "Done", + "Edit": "Edit", + "Edit queued message": "Edit queued message", "Enable": "Enable", "Enable proxy": "Enable proxy", "Enable the parent plugin first.": "Enable the parent plugin first.", @@ -234,6 +242,7 @@ "Invalid API key": "Invalid API key", "Invalid stored language preference.": "Invalid stored language preference.", "JSON body": "JSON body", + "Keep my edit": "Keep my edit", "Language": "Language", "Latest": "Latest", "Leave blank for automatic title": "Leave blank for automatic title", @@ -251,6 +260,7 @@ "Message Maka…": "Message Maka…", "Message composer": "Message composer", "Message predictions": "Message predictions", + "Message was not sent because the previous run is unsettled. Your message is kept.": "Message was not sent because the previous run is unsettled. Your message is kept.", "Minimal": "Minimal", "Model": "Model", "Models": "Models", @@ -279,9 +289,11 @@ "No project MCP consent is pending.": "No project MCP consent is pending.", "No side questions yet": "No side questions yet", "No skills": "No skills", + "No turn is running. This message remains queued.": "No turn is running. This message remains queued.", "No uncommitted changes": "No uncommitted changes", "No workspace path configured for this chat.": "No workspace path configured for this chat.", "None": "None", + "Not sent. Choose a workspace, then retry.": "Not sent. Choose a workspace, then retry.", "Now": "Now", "Off": "Off", "Offline": "Offline", @@ -381,6 +393,7 @@ "Results array path": "Results array path", "Retry": "Retry", "Retry now": "Retry now", + "Review latest": "Review latest", "Review on Desktop": "Review on Desktop", "Review project MCP consent": "Review project MCP consent", "Room": "Room", @@ -414,6 +427,7 @@ "Select model": "Select model", "Send message": "Send message", "Send to Main Chat": "Send to Main Chat", + "Sending…": "Sending…", "Server-side compaction": "Server-side compaction", "Service": "Service", "Settings": "Settings", @@ -433,7 +447,11 @@ "Start Chat on {name}": "Start Chat on {name}", "Start a conversation on any connected computer and it will appear here automatically.": "Start a conversation on any connected computer and it will appear here automatically.", "Status": "Status", + "Steer now": "Steer now", + "Steer or message Maka…": "Steer or message Maka…", + "Steer · Waiting for next step": "Steer · Waiting for next step", "Stop Run": "Stop Run", + "Stopped before delivery. Your message is kept.": "Stopped before delivery. Your message is kept.", "Subagents": "Subagents", "Submit Answer": "Submit Answer", "System": "System", @@ -444,12 +462,17 @@ "Target computer": "Target computer", "Team ID": "Team ID", "Test connection": "Test connection", + "The active turn changed. Your message is kept.": "The active turn changed. Your message is kept.", "The deployment document is invalid.": "The deployment document is invalid.", "The main conversation is no longer available.": "The main conversation is no longer available.", "The plugin bundle could not be downloaded.": "The plugin bundle could not be downloaded.", "The plugin bundle is invalid.": "The plugin bundle is invalid.", "The proxy address or username changed. Enter the password again or turn off proxy authentication.": "The proxy address or username changed. Enter the password again or turn off proxy authentication.", + "The queue changed. Review the current message before trying again.": "The queue changed. Review the current message before trying again.", + "The queue changed. Your edit is kept.": "The queue changed. Your edit is kept.", + "The requested skill is unavailable. Edit the message or try again.": "The requested skill is unavailable. Edit the message or try again.", "The selected deployment source is invalid.": "The selected deployment source is invalid.", + "The selected model is unavailable. Try again or choose another model.": "The selected model is unavailable. Try again or choose another model.", "The selected package is unavailable.": "The selected package is unavailable.", "The selected plugin instance is unavailable.": "The selected plugin instance is unavailable.", "These servers run outside the conversation sandbox and can run commands as your user or contact remote services. Full-access sessions can call their tools without further confirmation.": "These servers run outside the conversation sandbox and can run commands as your user or contact remote services. Full-access sessions can call their tools without further confirmation.", @@ -465,9 +488,11 @@ "This iPhone": "This iPhone", "This iPhone Peer ID": "This iPhone Peer ID", "This iPhone will disconnect from this computer and forget its pairing credentials. You can pair it again anytime.": "This iPhone will disconnect from this computer and forget its pairing credentials. You can pair it again anytime.", + "This message is no longer queued.": "This message is no longer queued.", "This run": "This run", "This server stores literal environment variables or HTTP headers. Edit it on Desktop.": "This server stores literal environment variables or HTTP headers. Edit it on Desktop.", "This session": "This session", + "This turn cannot accept this message right now. It remains queued.": "This turn cannot accept this message right now. It remains queued.", "Thought process": "Thought process", "Thought process · {count, plural, one {# tool} other {# tools}}": "Thought process · {count, plural, one {# tool} other {# tools}}", "Title (optional)": "Title (optional)", @@ -499,6 +524,7 @@ "View All Side Questions": "View All Side Questions", "Waiting for current turn": "Waiting for current turn", "Waiting for provider sign-in…": "Waiting for provider sign-in…", + "Waiting for queue…": "Waiting for queue…", "Waiting for your response": "Waiting for your response", "Web Search": "Web Search", "WebSocket": "WebSocket", @@ -519,6 +545,7 @@ "{access} · {scope}: {path}": "{access} · {scope}: {path}", "{count, plural, one {# message queued} other {# messages queued}}": "{count, plural, one {# message queued} other {# messages queued}}", "{count, plural, one {# quote} other {# quotes}}": "{count, plural, one {# quote} other {# quotes}}", + "{count} queued": "{count} queued", "{count}d": "{count}d", "{count}h": "{count}h", "{count}m": "{count}m", diff --git a/products/maka/ios-shell/locales/es.json b/products/maka/ios-shell/locales/es.json index fab84484f3c..5e7a7decdf6 100644 --- a/products/maka/ios-shell/locales/es.json +++ b/products/maka/ios-shell/locales/es.json @@ -12,6 +12,7 @@ "Add MCP server": "Añadir servidor MCP", "Add connection": "Añadir conexión", "Add subagent": "Añadir subagente", + "Add to queue": "Añadir a la cola", "Add to quotes": "Añadir a las citas", "Additional permissions requested": "Permisos adicionales solicitados", "Advanced options": "Opciones avanzadas", @@ -119,16 +120,20 @@ "Copy": "Copiar", "Copy a pairing link from Maka Settings on your computer, then paste it here.": "Copia un enlace de emparejamiento desde los Ajustes de Maka en tu ordenador y pégalo aquí.", "Copy code": "Copiar código", + "Copy edit": "Copiar edición", "Copy reply": "Copiar respuesta", "Could not change the model.": "No se pudo cambiar el modelo.", "Could not confirm whether the message was sent. Check the conversation or queue before retrying.": "No se pudo confirmar si se envió el mensaje. Revisa la conversación o la cola antes de volver a intentarlo.", + "Could not copy the edit.": "No se pudo copiar la edición.", "Could not create the side question. Try again.": "No se pudo crear la pregunta aparte. Inténtalo de nuevo.", "Could not install the plugin.": "No se pudo instalar el complemento.", "Could not load conversation history.": "No se pudo cargar el historial de la conversación.", "Could not load models.": "No se pudieron cargar los modelos.", "Could not load side questions": "No se pudieron cargar las preguntas aparte", + "Could not load the message queue.": "No se pudo cargar la cola de mensajes.", "Could not open the conversation.": "No se pudo abrir la conversación.", "Could not read or update settings.": "No se pudo leer o actualizar la configuración.", + "Could not read the queued message.": "No se pudo leer el mensaje en cola.", "Could not read the skill source.": "No se pudo leer el origen de la habilidad.", "Could not remove the MCP server.": "No se pudo eliminar el servidor MCP.", "Could not save the MCP server.": "No se pudo guardar el servidor MCP.", @@ -143,6 +148,7 @@ "Create Room": "Crear sala", "Create Room on {name}": "Crear sala en {name}", "Creating…": "Creando…", + "Current queued message": "Mensaje actual en cola", "Custom endpoint": "Punto de conexión personalizado", "Custom relay or WebSocket": "Relay personalizado o WebSocket", "Dark": "Oscuro", @@ -181,6 +187,8 @@ "Dismiss": "Descartar", "Dismiss keyboard": "Ocultar teclado", "Done": "OK", + "Edit": "Editar", + "Edit queued message": "Editar mensaje en cola", "Enable": "Activar", "Enable proxy": "Activar proxy", "Enable the parent plugin first.": "Activa primero el plugin principal.", @@ -234,6 +242,7 @@ "Invalid API key": "Clave API no válida", "Invalid stored language preference.": "La preferencia de idioma guardada no es válida.", "JSON body": "Cuerpo JSON", + "Keep my edit": "Conservar mi edición", "Language": "Idioma", "Latest": "Último", "Leave blank for automatic title": "Déjalo vacío para título automático", @@ -251,6 +260,7 @@ "Message Maka…": "Escribe a Maka…", "Message composer": "Campo de mensaje", "Message predictions": "Predicciones de mensajes", + "Message was not sent because the previous run is unsettled. Your message is kept.": "El mensaje no se envió porque la ejecución anterior aún no ha finalizado. Se conserva tu mensaje.", "Minimal": "Mínimo", "Model": "Modelo", "Models": "Modelos", @@ -279,9 +289,11 @@ "No project MCP consent is pending.": "No hay autorizaciones MCP del proyecto pendientes.", "No side questions yet": "Todavía no hay preguntas aparte", "No skills": "No hay habilidades", + "No turn is running. This message remains queued.": "No hay ningún turno en ejecución. Este mensaje permanece en cola.", "No uncommitted changes": "No hay cambios sin confirmar", "No workspace path configured for this chat.": "Este chat no tiene una ruta de espacio de trabajo.", "None": "Ninguno", + "Not sent. Choose a workspace, then retry.": "No enviado. Elige un espacio de trabajo e inténtalo de nuevo.", "Now": "Ahora", "Off": "Desactivado", "Offline": "Sin conexión", @@ -381,6 +393,7 @@ "Results array path": "Ruta del arreglo de resultados", "Retry": "Reintentar", "Retry now": "Reintentar ahora", + "Review latest": "Revisar versión actual", "Review on Desktop": "Revisar en el escritorio", "Review project MCP consent": "Revisar autorización MCP del proyecto", "Room": "Sala", @@ -414,6 +427,7 @@ "Select model": "Seleccionar modelo", "Send message": "Enviar mensaje", "Send to Main Chat": "Enviar al chat principal", + "Sending…": "Enviando…", "Server-side compaction": "Compactación en el servidor", "Service": "Servicio", "Settings": "Configuración", @@ -433,7 +447,11 @@ "Start Chat on {name}": "Iniciar chat en {name}", "Start a conversation on any connected computer and it will appear here automatically.": "Inicia una conversación en cualquier ordenador conectado y aparecerá aquí automáticamente.", "Status": "Estado", + "Steer now": "Guiar ahora", + "Steer or message Maka…": "Guía la ejecución o escribe a Maka…", + "Steer · Waiting for next step": "Guía · Esperando el siguiente paso", "Stop Run": "Detener ejecución", + "Stopped before delivery. Your message is kept.": "Detenido antes de entregarse. Se conserva tu mensaje.", "Subagents": "Subagentes", "Submit Answer": "Enviar respuesta", "System": "Sistema", @@ -444,12 +462,17 @@ "Target computer": "Ordenador destino", "Team ID": "ID del equipo", "Test connection": "Probar conexión", + "The active turn changed. Your message is kept.": "El turno activo cambió. Se conserva tu mensaje.", "The deployment document is invalid.": "El documento de despliegue no es válido.", "The main conversation is no longer available.": "La conversación principal ya no está disponible.", "The plugin bundle could not be downloaded.": "No se pudo descargar el paquete del plugin.", "The plugin bundle is invalid.": "El paquete del plugin no es válido.", "The proxy address or username changed. Enter the password again or turn off proxy authentication.": "Cambió la dirección o el nombre de usuario del proxy. Vuelve a introducir la contraseña o desactiva la autenticación del proxy.", + "The queue changed. Review the current message before trying again.": "La cola cambió. Revisa el mensaje actual antes de volver a intentarlo.", + "The queue changed. Your edit is kept.": "La cola cambió. Se conserva tu edición.", + "The requested skill is unavailable. Edit the message or try again.": "La habilidad solicitada no está disponible. Edita el mensaje o vuelve a intentarlo.", "The selected deployment source is invalid.": "La fuente de despliegue seleccionada no es válida.", + "The selected model is unavailable. Try again or choose another model.": "El modelo seleccionado no está disponible. Inténtalo de nuevo o elige otro modelo.", "The selected package is unavailable.": "El paquete seleccionado no está disponible.", "The selected plugin instance is unavailable.": "La instancia de plugin seleccionada no está disponible.", "These servers run outside the conversation sandbox and can run commands as your user or contact remote services. Full-access sessions can call their tools without further confirmation.": "Estos servidores se ejecutan fuera del entorno aislado de la conversación y pueden ejecutar comandos como tu usuario o conectarse a servicios remotos. Las sesiones con acceso completo pueden llamar a sus herramientas sin más confirmación.", @@ -465,9 +488,11 @@ "This iPhone": "Este iPhone", "This iPhone Peer ID": "Peer ID de este iPhone", "This iPhone will disconnect from this computer and forget its pairing credentials. You can pair it again anytime.": "Este iPhone se desconectará del ordenador y olvidará sus credenciales. Puedes volver a emparejarlo en cualquier momento.", + "This message is no longer queued.": "Este mensaje ya no está en cola.", "This run": "Esta ejecución", "This server stores literal environment variables or HTTP headers. Edit it on Desktop.": "Este servidor guarda variables de entorno o cabeceras HTTP en texto sin formato. Edítalo en el escritorio.", "This session": "Esta sesión", + "This turn cannot accept this message right now. It remains queued.": "Este turno no puede aceptar este mensaje ahora mismo. Permanece en cola.", "Thought process": "Proceso de pensamiento", "Thought process · {count, plural, one {# tool} other {# tools}}": "Proceso de pensamiento · {count, plural, one {# herramienta} other {# herramientas}}", "Title (optional)": "Título (opcional)", @@ -499,6 +524,7 @@ "View All Side Questions": "Ver todas las preguntas aparte", "Waiting for current turn": "Esperando al turno actual", "Waiting for provider sign-in…": "Esperando el inicio de sesión en el proveedor…", + "Waiting for queue…": "Añadiendo a la cola…", "Waiting for your response": "Esperando tu respuesta", "Web Search": "Búsqueda web", "WebSocket": "WebSocket", @@ -519,6 +545,7 @@ "{access} · {scope}: {path}": "{access} · {scope}: {path}", "{count, plural, one {# message queued} other {# messages queued}}": "{count, plural, one {# mensaje en cola} other {# mensajes en cola}}", "{count, plural, one {# quote} other {# quotes}}": "{count, plural, one {# cita} other {# citas}}", + "{count} queued": "En cola: {count}", "{count}d": "{count} d", "{count}h": "{count} h", "{count}m": "{count} min", diff --git a/products/maka/ios-shell/locales/fr.json b/products/maka/ios-shell/locales/fr.json index 7bca7471d30..686491abfbd 100644 --- a/products/maka/ios-shell/locales/fr.json +++ b/products/maka/ios-shell/locales/fr.json @@ -12,6 +12,7 @@ "Add MCP server": "Ajouter un serveur MCP", "Add connection": "Ajouter une connexion", "Add subagent": "Ajouter un sous-agent", + "Add to queue": "Ajouter à la file", "Add to quotes": "Ajouter aux citations", "Additional permissions requested": "Autorisations supplémentaires demandées", "Advanced options": "Options avancées", @@ -119,16 +120,20 @@ "Copy": "Copier", "Copy a pairing link from Maka Settings on your computer, then paste it here.": "Copiez un lien d’appairage depuis les Réglages de Maka sur votre ordinateur, puis collez-le ici.", "Copy code": "Copier le code", + "Copy edit": "Copier la modification", "Copy reply": "Copier la réponse", "Could not change the model.": "Impossible de changer de modèle.", "Could not confirm whether the message was sent. Check the conversation or queue before retrying.": "Impossible de confirmer si le message a été envoyé. Vérifiez la conversation ou la file d’attente avant de réessayer.", + "Could not copy the edit.": "Impossible de copier la modification.", "Could not create the side question. Try again.": "Impossible de créer la question à part. Réessayez.", "Could not install the plugin.": "Impossible d’installer le module.", "Could not load conversation history.": "Impossible de charger l’historique de la conversation.", "Could not load models.": "Impossible de charger les modèles.", "Could not load side questions": "Impossible de charger les questions à part", + "Could not load the message queue.": "Impossible de charger la file de messages.", "Could not open the conversation.": "Impossible d’ouvrir la conversation.", "Could not read or update settings.": "Impossible de lire ou de mettre à jour les paramètres.", + "Could not read the queued message.": "Impossible de lire le message en file d’attente.", "Could not read the skill source.": "Impossible de lire la source de la compétence.", "Could not remove the MCP server.": "Impossible de retirer le serveur MCP.", "Could not save the MCP server.": "Impossible d’enregistrer le serveur MCP.", @@ -143,6 +148,7 @@ "Create Room": "Créer le salon", "Create Room on {name}": "Créer un salon sur {name}", "Creating…": "Création…", + "Current queued message": "Message actuel en file", "Custom endpoint": "Point de terminaison personnalisé", "Custom relay or WebSocket": "Relais personnalisé ou WebSocket", "Dark": "Sombre", @@ -181,6 +187,8 @@ "Dismiss": "Fermer", "Dismiss keyboard": "Masquer le clavier", "Done": "OK", + "Edit": "Modifier", + "Edit queued message": "Modifier le message en file", "Enable": "Activer", "Enable proxy": "Activer le proxy", "Enable the parent plugin first.": "Activez d’abord le plugin parent.", @@ -234,6 +242,7 @@ "Invalid API key": "Clé API non valide", "Invalid stored language preference.": "La préférence de langue enregistrée n’est pas valide.", "JSON body": "Corps JSON", + "Keep my edit": "Conserver ma modification", "Language": "Langue", "Latest": "Dernier", "Leave blank for automatic title": "Laisser vide pour un titre automatique", @@ -251,6 +260,7 @@ "Message Maka…": "Écrire à Maka…", "Message composer": "Zone de saisie", "Message predictions": "Prédictions de messages", + "Message was not sent because the previous run is unsettled. Your message is kept.": "Le message n’a pas été envoyé car l’exécution précédente n’est pas terminée. Votre message est conservé.", "Minimal": "Minimal", "Model": "Modèle", "Models": "Modèles", @@ -279,9 +289,11 @@ "No project MCP consent is pending.": "Aucun consentement MCP du projet en attente.", "No side questions yet": "Pas encore de questions à part", "No skills": "Aucune compétence", + "No turn is running. This message remains queued.": "Aucun tour n’est en cours. Ce message reste en file.", "No uncommitted changes": "Aucune modification non validée", "No workspace path configured for this chat.": "Aucun dossier d’espace de travail configuré.", "None": "Aucun", + "Not sent. Choose a workspace, then retry.": "Non envoyé. Choisissez un espace de travail, puis réessayez.", "Now": "À l’instant", "Off": "Désactivé", "Offline": "Hors ligne", @@ -381,6 +393,7 @@ "Results array path": "Chemin du tableau de résultats", "Retry": "Réessayer", "Retry now": "Réessayer maintenant", + "Review latest": "Voir la version actuelle", "Review on Desktop": "Vérifier sur le bureau", "Review project MCP consent": "Vérifier le consentement MCP du projet", "Room": "Salon", @@ -414,6 +427,7 @@ "Select model": "Choisir le modèle", "Send message": "Envoyer le message", "Send to Main Chat": "Envoyer dans la conversation principale", + "Sending…": "Envoi…", "Server-side compaction": "Compactage côté serveur", "Service": "Service", "Settings": "Réglages", @@ -433,7 +447,11 @@ "Start Chat on {name}": "Démarrer une discussion sur {name}", "Start a conversation on any connected computer and it will appear here automatically.": "Lancez une conversation sur un ordinateur connecté pour qu’elle apparaisse automatiquement ici.", "Status": "État", + "Steer now": "Orienter maintenant", + "Steer or message Maka…": "Orientez l’exécution ou écrivez à Maka…", + "Steer · Waiting for next step": "Orientation · En attente de la prochaine étape", "Stop Run": "Arrêter", + "Stopped before delivery. Your message is kept.": "Arrêté avant l’envoi. Votre message est conservé.", "Subagents": "Sous-agents", "Submit Answer": "Envoyer la réponse", "System": "Système", @@ -444,12 +462,17 @@ "Target computer": "Ordinateur cible", "Team ID": "Identifiant d’équipe", "Test connection": "Tester la connexion", + "The active turn changed. Your message is kept.": "Le tour actif a changé. Votre message est conservé.", "The deployment document is invalid.": "Le document de déploiement est invalide.", "The main conversation is no longer available.": "La conversation principale n’est plus disponible.", "The plugin bundle could not be downloaded.": "Impossible de télécharger le paquet du plugin.", "The plugin bundle is invalid.": "Le paquet du plugin est invalide.", "The proxy address or username changed. Enter the password again or turn off proxy authentication.": "L’adresse ou le nom d’utilisateur du proxy a changé. Saisissez à nouveau le mot de passe ou désactivez l’authentification du proxy.", + "The queue changed. Review the current message before trying again.": "La file a changé. Vérifiez le message actuel avant de réessayer.", + "The queue changed. Your edit is kept.": "La file a changé. Votre modification est conservée.", + "The requested skill is unavailable. Edit the message or try again.": "La compétence demandée est indisponible. Modifiez le message ou réessayez.", "The selected deployment source is invalid.": "La source de déploiement sélectionnée est invalide.", + "The selected model is unavailable. Try again or choose another model.": "Le modèle sélectionné est indisponible. Réessayez ou choisissez un autre modèle.", "The selected package is unavailable.": "Le paquet sélectionné est indisponible.", "The selected plugin instance is unavailable.": "L’instance de plugin sélectionnée est indisponible.", "These servers run outside the conversation sandbox and can run commands as your user or contact remote services. Full-access sessions can call their tools without further confirmation.": "Ces serveurs s’exécutent hors du bac à sable de la conversation et peuvent lancer des commandes en tant que votre utilisateur ou contacter des services distants. Les sessions en accès complet peuvent appeler leurs outils sans autre confirmation.", @@ -465,9 +488,11 @@ "This iPhone": "Cet iPhone", "This iPhone Peer ID": "Peer ID de cet iPhone", "This iPhone will disconnect from this computer and forget its pairing credentials. You can pair it again anytime.": "Cet iPhone se déconnectera de cet ordinateur et effacera ses identifiants d’appairage. Vous pourrez le réappairer à tout moment.", + "This message is no longer queued.": "Ce message n’est plus en file.", "This run": "Cette exécution", "This server stores literal environment variables or HTTP headers. Edit it on Desktop.": "Ce serveur stocke des variables d’environnement ou des en-têtes HTTP en clair. Modifiez-le sur le bureau.", "This session": "Cette session", + "This turn cannot accept this message right now. It remains queued.": "Ce tour ne peut pas accepter ce message pour le moment. Il reste en file.", "Thought process": "Raisonnement", "Thought process · {count, plural, one {# tool} other {# tools}}": "Raisonnement · {count, plural, one {# outil} other {# outils}}", "Title (optional)": "Titre (facultatif)", @@ -499,6 +524,7 @@ "View All Side Questions": "Voir toutes les questions à part", "Waiting for current turn": "En attente de la fin du tour", "Waiting for provider sign-in…": "En attente de la connexion au fournisseur…", + "Waiting for queue…": "Ajout à la file…", "Waiting for your response": "En attente de réponse", "Web Search": "Recherche web", "WebSocket": "WebSocket", @@ -519,6 +545,7 @@ "{access} · {scope}: {path}": "{access} · {scope} : {path}", "{count, plural, one {# message queued} other {# messages queued}}": "{count, plural, one {# message en file} other {# messages en file}}", "{count, plural, one {# quote} other {# quotes}}": "{count, plural, one {# citation} other {# citations}}", + "{count} queued": "En file : {count}", "{count}d": "{count} j", "{count}h": "{count} h", "{count}m": "{count} min", diff --git a/products/maka/ios-shell/locales/it.json b/products/maka/ios-shell/locales/it.json index be167530dd2..f01db615a3e 100644 --- a/products/maka/ios-shell/locales/it.json +++ b/products/maka/ios-shell/locales/it.json @@ -12,6 +12,7 @@ "Add MCP server": "Aggiungi server MCP", "Add connection": "Aggiungi connessione", "Add subagent": "Aggiungi subagente", + "Add to queue": "Aggiungi alla coda", "Add to quotes": "Aggiungi alle citazioni", "Additional permissions requested": "Permessi aggiuntivi richiesti", "Advanced options": "Opzioni avanzate", @@ -119,16 +120,20 @@ "Copy": "Copia", "Copy a pairing link from Maka Settings on your computer, then paste it here.": "Copia un link di abbinamento dalle Impostazioni di Maka sul computer e incollalo qui.", "Copy code": "Copia codice", + "Copy edit": "Copia modifica", "Copy reply": "Copia risposta", "Could not change the model.": "Impossibile cambiare il modello.", "Could not confirm whether the message was sent. Check the conversation or queue before retrying.": "Non è stato possibile confermare l’invio del messaggio. Controlla la conversazione o la coda prima di riprovare.", + "Could not copy the edit.": "Impossibile copiare la modifica.", "Could not create the side question. Try again.": "Impossibile creare la domanda a parte. Riprova.", "Could not install the plugin.": "Impossibile installare il plugin.", "Could not load conversation history.": "Impossibile caricare la cronologia della conversazione.", "Could not load models.": "Impossibile caricare i modelli.", "Could not load side questions": "Impossibile caricare le domande a parte", + "Could not load the message queue.": "Impossibile caricare la coda dei messaggi.", "Could not open the conversation.": "Impossibile aprire la conversazione.", "Could not read or update settings.": "Impossibile leggere o aggiornare le impostazioni.", + "Could not read the queued message.": "Impossibile leggere il messaggio in coda.", "Could not read the skill source.": "Impossibile leggere la fonte della competenza.", "Could not remove the MCP server.": "Impossibile rimuovere il server MCP.", "Could not save the MCP server.": "Impossibile salvare il server MCP.", @@ -143,6 +148,7 @@ "Create Room": "Crea stanza", "Create Room on {name}": "Crea stanza su {name}", "Creating…": "Creazione…", + "Current queued message": "Messaggio attuale in coda", "Custom endpoint": "Endpoint personalizzato", "Custom relay or WebSocket": "Relay personalizzato o WebSocket", "Dark": "Scuro", @@ -181,6 +187,8 @@ "Dismiss": "Chiudi", "Dismiss keyboard": "Chiudi tastiera", "Done": "Fine", + "Edit": "Modifica", + "Edit queued message": "Modifica messaggio in coda", "Enable": "Attiva", "Enable proxy": "Attiva proxy", "Enable the parent plugin first.": "Abilita prima il plugin padre.", @@ -234,6 +242,7 @@ "Invalid API key": "Chiave API non valida", "Invalid stored language preference.": "La preferenza di lingua salvata non è valida.", "JSON body": "Corpo JSON", + "Keep my edit": "Mantieni la mia modifica", "Language": "Lingua", "Latest": "Più recente", "Leave blank for automatic title": "Lascia vuoto per il titolo automatico", @@ -251,6 +260,7 @@ "Message Maka…": "Scrivi a Maka…", "Message composer": "Campo messaggio", "Message predictions": "Previsioni messaggi", + "Message was not sent because the previous run is unsettled. Your message is kept.": "Messaggio non inviato perché l’esecuzione precedente non è stata conclusa. Il messaggio è stato conservato.", "Minimal": "Minimo", "Model": "Modello", "Models": "Modelli", @@ -279,9 +289,11 @@ "No project MCP consent is pending.": "Nessun consenso MCP del progetto in sospeso.", "No side questions yet": "Non ci sono ancora domande a parte", "No skills": "Nessuna competenza", + "No turn is running. This message remains queued.": "Nessun turno in esecuzione. Questo messaggio resta in coda.", "No uncommitted changes": "Nessuna modifica non salvata", "No workspace path configured for this chat.": "Nessun percorso dell’area di lavoro configurato per questa chat.", "None": "Nessuno", + "Not sent. Choose a workspace, then retry.": "Non inviato. Scegli uno spazio di lavoro, quindi riprova.", "Now": "Ora", "Off": "Disattivo", "Offline": "Non in linea", @@ -381,6 +393,7 @@ "Results array path": "Percorso array risultati", "Retry": "Riprova", "Retry now": "Riprova ora", + "Review latest": "Controlla la versione attuale", "Review on Desktop": "Verifica su desktop", "Review project MCP consent": "Esamina il consenso MCP del progetto", "Room": "Stanza", @@ -414,6 +427,7 @@ "Select model": "Seleziona modello", "Send message": "Invia messaggio", "Send to Main Chat": "Invia nella chat principale", + "Sending…": "Invio in corso…", "Server-side compaction": "Compattazione lato server", "Service": "Servizio", "Settings": "Impostazioni", @@ -433,7 +447,11 @@ "Start Chat on {name}": "Avvia chat su {name}", "Start a conversation on any connected computer and it will appear here automatically.": "Avvia una conversazione su un computer connesso e apparirà qui automaticamente.", "Status": "Stato", + "Steer now": "Guida ora", + "Steer or message Maka…": "Guida l’esecuzione o scrivi a Maka…", + "Steer · Waiting for next step": "Guida · In attesa del prossimo passaggio", "Stop Run": "Interrompi", + "Stopped before delivery. Your message is kept.": "Interrotto prima del recapito. Il messaggio è stato conservato.", "Subagents": "Subagenti", "Submit Answer": "Invia risposta", "System": "Sistema", @@ -444,12 +462,17 @@ "Target computer": "Computer di destinazione", "Team ID": "ID team", "Test connection": "Prova connessione", + "The active turn changed. Your message is kept.": "Il turno attivo è cambiato. Il tuo messaggio è stato conservato.", "The deployment document is invalid.": "Il documento di distribuzione non è valido.", "The main conversation is no longer available.": "La conversazione principale non è più disponibile.", "The plugin bundle could not be downloaded.": "Impossibile scaricare il pacchetto del plugin.", "The plugin bundle is invalid.": "Il pacchetto del plugin non è valido.", "The proxy address or username changed. Enter the password again or turn off proxy authentication.": "L’indirizzo o il nome utente del proxy è cambiato. Reinserisci la password o disattiva l’autenticazione del proxy.", + "The queue changed. Review the current message before trying again.": "La coda è cambiata. Controlla il messaggio attuale prima di riprovare.", + "The queue changed. Your edit is kept.": "La coda è cambiata. La modifica è stata conservata.", + "The requested skill is unavailable. Edit the message or try again.": "La skill richiesta non è disponibile. Modifica il messaggio o riprova.", "The selected deployment source is invalid.": "La sorgente di distribuzione selezionata non è valida.", + "The selected model is unavailable. Try again or choose another model.": "Il modello selezionato non è disponibile. Riprova o scegli un altro modello.", "The selected package is unavailable.": "Il pacchetto selezionato non è disponibile.", "The selected plugin instance is unavailable.": "L’istanza plugin selezionata non è disponibile.", "These servers run outside the conversation sandbox and can run commands as your user or contact remote services. Full-access sessions can call their tools without further confirmation.": "Questi server vengono eseguiti fuori dalla sandbox della conversazione e possono eseguire comandi come il tuo utente o contattare servizi remoti. Le sessioni con accesso completo possono chiamarne gli strumenti senza ulteriori conferme.", @@ -465,9 +488,11 @@ "This iPhone": "Questo iPhone", "This iPhone Peer ID": "Peer ID di questo iPhone", "This iPhone will disconnect from this computer and forget its pairing credentials. You can pair it again anytime.": "Questo iPhone si disconnetterà dal computer e dimenticherà le credenziali di abbinamento. Potrai riabbinarlo in qualsiasi momento.", + "This message is no longer queued.": "Questo messaggio non è più in coda.", "This run": "Questa esecuzione", "This server stores literal environment variables or HTTP headers. Edit it on Desktop.": "Questo server memorizza variabili d’ambiente o intestazioni HTTP in chiaro. Modificalo su desktop.", "This session": "Questa sessione", + "This turn cannot accept this message right now. It remains queued.": "Questo turno non può accettare il messaggio ora. Rimane in coda.", "Thought process": "Ragionamento", "Thought process · {count, plural, one {# tool} other {# tools}}": "Ragionamento · {count, plural, one {# strumento} other {# strumenti}}", "Title (optional)": "Titolo (facoltativo)", @@ -499,6 +524,7 @@ "View All Side Questions": "Mostra tutte le domande a parte", "Waiting for current turn": "In attesa del turno corrente", "Waiting for provider sign-in…": "In attesa dell’accesso al provider…", + "Waiting for queue…": "Aggiunta alla coda…", "Waiting for your response": "In attesa della tua risposta", "Web Search": "Ricerca web", "WebSocket": "WebSocket", @@ -519,6 +545,7 @@ "{access} · {scope}: {path}": "{access} · {scope}: {path}", "{count, plural, one {# message queued} other {# messages queued}}": "{count, plural, one {# messaggio in coda} other {# messaggi in coda}}", "{count, plural, one {# quote} other {# quotes}}": "{count, plural, one {# citazione} other {# citazioni}}", + "{count} queued": "In coda: {count}", "{count}d": "{count} gg", "{count}h": "{count} h", "{count}m": "{count} min", diff --git a/products/maka/ios-shell/locales/ja.json b/products/maka/ios-shell/locales/ja.json index 7b34f445cc1..908d5158550 100644 --- a/products/maka/ios-shell/locales/ja.json +++ b/products/maka/ios-shell/locales/ja.json @@ -12,6 +12,7 @@ "Add MCP server": "MCP サーバーを追加", "Add connection": "接続を追加", "Add subagent": "サブエージェントを追加", + "Add to queue": "キューに追加", "Add to quotes": "引用に追加", "Additional permissions requested": "追加の権限が要求されています", "Advanced options": "詳細オプション", @@ -119,16 +120,20 @@ "Copy": "コピー", "Copy a pairing link from Maka Settings on your computer, then paste it here.": "コンピュータ上の Maka 設定からペアリングリンクをコピーして貼り付けてください。", "Copy code": "コードをコピー", + "Copy edit": "編集内容をコピー", "Copy reply": "返信をコピー", "Could not change the model.": "モデルを変更できませんでした。", "Could not confirm whether the message was sent. Check the conversation or queue before retrying.": "メッセージが送信されたか確認できませんでした。再試行する前に、会話履歴かキューを確認してください。", + "Could not copy the edit.": "編集内容をコピーできませんでした。", "Could not create the side question. Try again.": "サイド質問を作成できませんでした。もう一度お試しください。", "Could not install the plugin.": "プラグインをインストールできませんでした。", "Could not load conversation history.": "会話履歴を読み込めませんでした。", "Could not load models.": "モデルを読み込めませんでした。", "Could not load side questions": "サイド質問を読み込めませんでした", + "Could not load the message queue.": "メッセージのキューを読み込めませんでした。", "Could not open the conversation.": "会話を開けませんでした。", "Could not read or update settings.": "設定を読み取りまたは更新できませんでした。", + "Could not read the queued message.": "キュー内のメッセージを読み込めませんでした。", "Could not read the skill source.": "スキルの取得元を読み取れませんでした。", "Could not remove the MCP server.": "MCP サーバーを削除できませんでした。", "Could not save the MCP server.": "MCP サーバーを保存できませんでした。", @@ -143,6 +148,7 @@ "Create Room": "ルームを作成", "Create Room on {name}": "{name} でルームを作成", "Creating…": "作成中…", + "Current queued message": "現在のキュー内メッセージ", "Custom endpoint": "カスタムエンドポイント", "Custom relay or WebSocket": "カスタムリレーまたは WebSocket", "Dark": "ダーク", @@ -181,6 +187,8 @@ "Dismiss": "閉じる", "Dismiss keyboard": "キーボードを閉じる", "Done": "完了", + "Edit": "編集", + "Edit queued message": "キュー内メッセージを編集", "Enable": "有効にする", "Enable proxy": "プロキシを有効にする", "Enable the parent plugin first.": "先に親プラグインを有効にしてください。", @@ -234,6 +242,7 @@ "Invalid API key": "API キーが無効です", "Invalid stored language preference.": "保存されている言語設定が無効です。", "JSON body": "JSON ボディ", + "Keep my edit": "編集内容を保持", "Language": "言語", "Latest": "最新", "Leave blank for automatic title": "空欄の場合は自動でタイトルを設定", @@ -251,6 +260,7 @@ "Message Maka…": "Maka にメッセージ…", "Message composer": "メッセージ入力欄", "Message predictions": "メッセージ予測", + "Message was not sent because the previous run is unsettled. Your message is kept.": "前回の実行が未完了のため、メッセージを送信できませんでした。メッセージは保持されています。", "Minimal": "最小", "Model": "モデル", "Models": "モデル", @@ -279,9 +289,11 @@ "No project MCP consent is pending.": "保留中のプロジェクト MCP 承認はありません。", "No side questions yet": "サイド質問はまだありません", "No skills": "スキルがありません", + "No turn is running. This message remains queued.": "実行中のターンはありません。このメッセージはキューに留まります。", "No uncommitted changes": "未コミットの変更はありません", "No workspace path configured for this chat.": "このチャットにワークスペースが設定されていません。", "None": "なし", + "Not sent. Choose a workspace, then retry.": "送信されませんでした。ワークスペースを選択してから再試行してください。", "Now": "今", "Off": "オフ", "Offline": "オフライン", @@ -381,6 +393,7 @@ "Results array path": "結果配列のパス", "Retry": "再試行", "Retry now": "今すぐ再試行", + "Review latest": "最新版を確認", "Review on Desktop": "デスクトップで確認", "Review project MCP consent": "プロジェクト MCP の承認を確認", "Room": "ルーム", @@ -414,6 +427,7 @@ "Select model": "モデルを選択", "Send message": "メッセージを送信", "Send to Main Chat": "元の会話に送信", + "Sending…": "送信中…", "Server-side compaction": "サーバー側で圧縮", "Service": "サービス", "Settings": "設定", @@ -433,7 +447,11 @@ "Start Chat on {name}": "{name} でチャットを開始", "Start a conversation on any connected computer and it will appear here automatically.": "接続中のコンピュータで会話を開始すると、ここに自動で表示されます。", "Status": "ステータス", + "Steer now": "今すぐ指示を送る", + "Steer or message Maka…": "途中で指示を出すか Maka にメッセージを送信…", + "Steer · Waiting for next step": "途中の指示 · 次のステップを待機中", "Stop Run": "実行を停止", + "Stopped before delivery. Your message is kept.": "配信前に停止しました。メッセージは保持されています。", "Subagents": "サブエージェント", "Submit Answer": "回答を送信", "System": "システム", @@ -444,12 +462,17 @@ "Target computer": "対象コンピュータ", "Team ID": "チーム ID", "Test connection": "接続をテスト", + "The active turn changed. Your message is kept.": "実行中のターンが変わりました。メッセージは保持されています。", "The deployment document is invalid.": "デプロイドキュメントが無効です。", "The main conversation is no longer available.": "元の会話を開けなくなりました。", "The plugin bundle could not be downloaded.": "プラグインバンドルをダウンロードできませんでした。", "The plugin bundle is invalid.": "プラグインバンドルが無効です。", "The proxy address or username changed. Enter the password again or turn off proxy authentication.": "プロキシのアドレスまたはユーザー名が変更されました。パスワードを再入力するか、プロキシ認証を無効にしてください。", + "The queue changed. Review the current message before trying again.": "キューが変更されました。現在のメッセージを確認してからやり直してください。", + "The queue changed. Your edit is kept.": "キューが変更されました。編集内容は保持されています。", + "The requested skill is unavailable. Edit the message or try again.": "指定したスキルは利用できません。メッセージを編集するか、もう一度お試しください。", "The selected deployment source is invalid.": "選択されたデプロイソースが無効です。", + "The selected model is unavailable. Try again or choose another model.": "選択したモデルは利用できません。再試行するか別のモデルを選択してください。", "The selected package is unavailable.": "選択したパッケージは利用できません。", "The selected plugin instance is unavailable.": "選択したプラグインインスタンスは利用できません。", "These servers run outside the conversation sandbox and can run commands as your user or contact remote services. Full-access sessions can call their tools without further confirmation.": "これらのサーバーは会話のサンドボックス外で実行され、あなたのユーザー権限でコマンドを実行したりリモートサービスへ通信したりできます。フルアクセスセッションでは追加の確認なしにツールを呼び出せます。", @@ -465,9 +488,11 @@ "This iPhone": "この iPhone", "This iPhone Peer ID": "この iPhone の Peer ID", "This iPhone will disconnect from this computer and forget its pairing credentials. You can pair it again anytime.": "この iPhone はコンピュータから切断され、ペアリング情報を削除します。いつでも再ペアリングできます。", + "This message is no longer queued.": "このメッセージはキューから外れました。", "This run": "この実行", "This server stores literal environment variables or HTTP headers. Edit it on Desktop.": "このサーバーには環境変数や HTTP ヘッダーの値が直接保存されています。デスクトップで編集してください。", "This session": "このセッション", + "This turn cannot accept this message right now. It remains queued.": "このターンは現在このメッセージを受け付けられません。キューに留まります。", "Thought process": "思考プロセス", "Thought process · {count, plural, one {# tool} other {# tools}}": "思考プロセス · {count, plural, other {# 個のツール}}", "Title (optional)": "タイトル(任意)", @@ -499,6 +524,7 @@ "View All Side Questions": "すべてのサイド質問を表示", "Waiting for current turn": "現在のターン完了待ち", "Waiting for provider sign-in…": "プロバイダへのログインを待っています…", + "Waiting for queue…": "キューに追加中…", "Waiting for your response": "応答待ち", "Web Search": "Web 検索", "WebSocket": "WebSocket", @@ -519,6 +545,7 @@ "{access} · {scope}: {path}": "{access} · {scope}:{path}", "{count, plural, one {# message queued} other {# messages queued}}": "{count, plural, other {# 件のメッセージが待機中}}", "{count, plural, one {# quote} other {# quotes}}": "{count, plural, other {引用 # 件}}", + "{count} queued": "{count} 件待機中", "{count}d": "{count}日前", "{count}h": "{count}時間前", "{count}m": "{count}分前", diff --git a/products/maka/ios-shell/locales/ko.json b/products/maka/ios-shell/locales/ko.json index ac0a356b0f7..15d82f7a533 100644 --- a/products/maka/ios-shell/locales/ko.json +++ b/products/maka/ios-shell/locales/ko.json @@ -12,6 +12,7 @@ "Add MCP server": "MCP 서버 추가", "Add connection": "연결 추가", "Add subagent": "서브에이전트 추가", + "Add to queue": "대기열에 추가", "Add to quotes": "인용에 추가", "Additional permissions requested": "추가 권한 요청됨", "Advanced options": "고급 옵션", @@ -119,16 +120,20 @@ "Copy": "복사", "Copy a pairing link from Maka Settings on your computer, then paste it here.": "컴퓨터의 Maka 설정에서 페어링 링크를 복사해 여기에 붙여넣으세요.", "Copy code": "코드 복사", + "Copy edit": "편집 내용 복사", "Copy reply": "응답 복사", "Could not change the model.": "모델을 변경할 수 없습니다.", "Could not confirm whether the message was sent. Check the conversation or queue before retrying.": "메시지가 전송되었는지 확인하지 못했습니다. 다시 시도하기 전에 대화 기록이나 대기열을 확인하세요.", + "Could not copy the edit.": "수정 내용을 복사하지 못했습니다.", "Could not create the side question. Try again.": "곁질문을 만들지 못했습니다. 다시 시도하세요.", "Could not install the plugin.": "플러그인을 설치하지 못했습니다.", "Could not load conversation history.": "대화 기록을 불러올 수 없습니다.", "Could not load models.": "모델을 불러올 수 없습니다.", "Could not load side questions": "곁질문을 불러오지 못했습니다", + "Could not load the message queue.": "메시지 대기열을 불러오지 못했습니다.", "Could not open the conversation.": "대화를 열 수 없습니다.", "Could not read or update settings.": "설정을 읽거나 업데이트할 수 없습니다.", + "Could not read the queued message.": "대기 중인 메시지를 읽지 못했습니다.", "Could not read the skill source.": "스킬 소스를 읽지 못했습니다.", "Could not remove the MCP server.": "MCP 서버를 삭제하지 못했습니다.", "Could not save the MCP server.": "MCP 서버를 저장하지 못했습니다.", @@ -143,6 +148,7 @@ "Create Room": "룸 만들기", "Create Room on {name}": "{name}에서 룸 만들기", "Creating…": "만드는 중…", + "Current queued message": "현재 대기열 메시지", "Custom endpoint": "사용자 지정 엔드포인트", "Custom relay or WebSocket": "사용자 지정 릴레이 또는 WebSocket", "Dark": "다크", @@ -181,6 +187,8 @@ "Dismiss": "닫기", "Dismiss keyboard": "키보드 닫기", "Done": "완료", + "Edit": "편집", + "Edit queued message": "대기열 메시지 편집", "Enable": "활성화", "Enable proxy": "프록시 사용", "Enable the parent plugin first.": "상위 플러그인을 먼저 활성화하세요.", @@ -234,6 +242,7 @@ "Invalid API key": "잘못된 API 키", "Invalid stored language preference.": "저장된 언어 설정이 올바르지 않습니다.", "JSON body": "JSON 본문", + "Keep my edit": "내 편집 유지", "Language": "언어", "Latest": "최신", "Leave blank for automatic title": "비워 두면 제목이 자동 생성됩니다", @@ -251,6 +260,7 @@ "Message Maka…": "Maka에게 메시지 보내기…", "Message composer": "메시지 입력창", "Message predictions": "메시지 예측", + "Message was not sent because the previous run is unsettled. Your message is kept.": "이전 실행이 아직 완료되지 않아 메시지가 전송되지 않았습니다. 메시지는 유지됩니다.", "Minimal": "최소", "Model": "모델", "Models": "모델", @@ -279,9 +289,11 @@ "No project MCP consent is pending.": "대기 중인 프로젝트 MCP 동의가 없습니다.", "No side questions yet": "아직 곁질문이 없습니다", "No skills": "스킬 없음", + "No turn is running. This message remains queued.": "실행 중인 턴이 없습니다. 이 메시지는 대기열에 남아 있습니다.", "No uncommitted changes": "커밋되지 않은 변경 사항 없음", "No workspace path configured for this chat.": "이 대화에 설정된 워크스페이스 경로가 없습니다.", "None": "없음", + "Not sent. Choose a workspace, then retry.": "전송되지 않았습니다. 작업 공간을 선택한 후 다시 시도하세요.", "Now": "방금", "Off": "꺼짐", "Offline": "오프라인", @@ -381,6 +393,7 @@ "Results array path": "결과 배열 경로", "Retry": "다시 시도", "Retry now": "지금 다시 시도", + "Review latest": "최신 버전 확인", "Review on Desktop": "데스크톱에서 검토", "Review project MCP consent": "프로젝트 MCP 동의 검토", "Room": "룸", @@ -414,6 +427,7 @@ "Select model": "모델 선택", "Send message": "메시지 보내기", "Send to Main Chat": "원래 대화로 보내기", + "Sending…": "전송 중…", "Server-side compaction": "서버 측 압축", "Service": "서비스", "Settings": "설정", @@ -433,7 +447,11 @@ "Start Chat on {name}": "{name}에서 채팅 시작", "Start a conversation on any connected computer and it will appear here automatically.": "연결된 컴퓨터에서 대화를 시작하면 여기에 자동으로 표시됩니다.", "Status": "상태", + "Steer now": "지금 개입", + "Steer or message Maka…": "실행에 개입하거나 Maka에 메시지 보내기…", + "Steer · Waiting for next step": "실행 개입 · 다음 단계 대기 중", "Stop Run": "실행 중지", + "Stopped before delivery. Your message is kept.": "전달되기 전에 중지되었습니다. 메시지는 유지됩니다.", "Subagents": "서브에이전트", "Submit Answer": "답변 제출", "System": "시스템", @@ -444,12 +462,17 @@ "Target computer": "대상 컴퓨터", "Team ID": "팀 ID", "Test connection": "연결 테스트", + "The active turn changed. Your message is kept.": "진행 중인 턴이 바뀌었습니다. 메시지는 유지됩니다.", "The deployment document is invalid.": "배포 문서가 올바르지 않습니다.", "The main conversation is no longer available.": "원래 대화에 더 이상 접근할 수 없습니다.", "The plugin bundle could not be downloaded.": "플러그인 번들을 다운로드할 수 없습니다.", "The plugin bundle is invalid.": "플러그인 번들이 올바르지 않습니다.", "The proxy address or username changed. Enter the password again or turn off proxy authentication.": "프록시 주소 또는 사용자 이름이 변경되었습니다. 비밀번호를 다시 입력하거나 프록시 인증을 끄세요.", + "The queue changed. Review the current message before trying again.": "대기열이 변경되었습니다. 현재 메시지를 확인한 후 다시 시도하세요.", + "The queue changed. Your edit is kept.": "대기열이 변경되었습니다. 수정 내용은 유지됩니다.", + "The requested skill is unavailable. Edit the message or try again.": "요청한 스킬을 사용할 수 없습니다. 메시지를 수정하거나 다시 시도하세요.", "The selected deployment source is invalid.": "선택한 배포 소스가 올바르지 않습니다.", + "The selected model is unavailable. Try again or choose another model.": "선택한 모델을 사용할 수 없습니다. 다시 시도하거나 다른 모델을 선택하세요.", "The selected package is unavailable.": "선택한 패키지를 사용할 수 없습니다.", "The selected plugin instance is unavailable.": "선택한 플러그인 인스턴스를 사용할 수 없습니다.", "These servers run outside the conversation sandbox and can run commands as your user or contact remote services. Full-access sessions can call their tools without further confirmation.": "이 서버들은 대화 샌드박스 외부에서 실행되며 사용자 권한으로 명령을 실행하거나 원격 서비스에 연결할 수 있습니다. 전체 접근 세션에서는 추가 확인 없이 해당 도구를 호출할 수 있습니다.", @@ -465,9 +488,11 @@ "This iPhone": "이 iPhone", "This iPhone Peer ID": "이 iPhone Peer ID", "This iPhone will disconnect from this computer and forget its pairing credentials. You can pair it again anytime.": "이 iPhone은 해당 컴퓨터와 연결을 끊고 페어링 정보를 삭제합니다. 언제든 다시 페어링할 수 있습니다.", + "This message is no longer queued.": "이 메시지는 더 이상 대기열에 없습니다.", "This run": "이번 실행", "This server stores literal environment variables or HTTP headers. Edit it on Desktop.": "이 서버는 환경 변수 또는 HTTP 헤더 값을 그대로 저장합니다. 데스크톱에서 편집하세요.", "This session": "이 세션", + "This turn cannot accept this message right now. It remains queued.": "현재 이 턴에서 메시지를 받을 수 없어 대기열에 유지됩니다.", "Thought process": "사고 과정", "Thought process · {count, plural, one {# tool} other {# tools}}": "사고 과정 · {count, plural, other {도구 #개}}", "Title (optional)": "제목(선택)", @@ -499,6 +524,7 @@ "View All Side Questions": "곁질문 모두 보기", "Waiting for current turn": "현재 턴 완료 대기 중", "Waiting for provider sign-in…": "제공업체 로그인을 기다리는 중…", + "Waiting for queue…": "대기열에 추가 중…", "Waiting for your response": "응답 대기 중", "Web Search": "웹 검색", "WebSocket": "WebSocket", @@ -519,6 +545,7 @@ "{access} · {scope}: {path}": "{access} · {scope}: {path}", "{count, plural, one {# message queued} other {# messages queued}}": "{count, plural, other {메시지 #개 대기 중}}", "{count, plural, one {# quote} other {# quotes}}": "{count, plural, other {인용 #개}}", + "{count} queued": "{count}개 대기 중", "{count}d": "{count}일 전", "{count}h": "{count}시간 전", "{count}m": "{count}분 전", diff --git a/products/maka/ios-shell/locales/pt-BR.json b/products/maka/ios-shell/locales/pt-BR.json index 3e905398cfe..5dc2d22767f 100644 --- a/products/maka/ios-shell/locales/pt-BR.json +++ b/products/maka/ios-shell/locales/pt-BR.json @@ -12,6 +12,7 @@ "Add MCP server": "Adicionar servidor MCP", "Add connection": "Adicionar conexão", "Add subagent": "Adicionar subagente", + "Add to queue": "Adicionar à fila", "Add to quotes": "Adicionar às citações", "Additional permissions requested": "Permissões adicionais solicitadas", "Advanced options": "Opções avançadas", @@ -119,16 +120,20 @@ "Copy": "Copiar", "Copy a pairing link from Maka Settings on your computer, then paste it here.": "Copie um link de pareamento nos Ajustes do Maka no seu computador e cole aqui.", "Copy code": "Copiar código", + "Copy edit": "Copiar edição", "Copy reply": "Copiar resposta", "Could not change the model.": "Não foi possível alterar o modelo.", "Could not confirm whether the message was sent. Check the conversation or queue before retrying.": "Não foi possível confirmar se a mensagem foi enviada. Confira a conversa ou a fila antes de tentar novamente.", + "Could not copy the edit.": "Não foi possível copiar a edição.", "Could not create the side question. Try again.": "Não foi possível criar a pergunta paralela. Tente novamente.", "Could not install the plugin.": "Não foi possível instalar o plugin.", "Could not load conversation history.": "Não foi possível carregar o histórico da conversa.", "Could not load models.": "Não foi possível carregar os modelos.", "Could not load side questions": "Não foi possível carregar as perguntas paralelas", + "Could not load the message queue.": "Não foi possível carregar a fila de mensagens.", "Could not open the conversation.": "Não foi possível abrir a conversa.", "Could not read or update settings.": "Não foi possível ler ou atualizar as configurações.", + "Could not read the queued message.": "Não foi possível ler a mensagem na fila.", "Could not read the skill source.": "Não foi possível ler a origem da habilidade.", "Could not remove the MCP server.": "Não foi possível remover o servidor MCP.", "Could not save the MCP server.": "Não foi possível salvar o servidor MCP.", @@ -143,6 +148,7 @@ "Create Room": "Criar sala", "Create Room on {name}": "Criar sala em {name}", "Creating…": "Criando…", + "Current queued message": "Mensagem atual na fila", "Custom endpoint": "Endpoint personalizado", "Custom relay or WebSocket": "Relay personalizado ou WebSocket", "Dark": "Escuro", @@ -181,6 +187,8 @@ "Dismiss": "Dispensar", "Dismiss keyboard": "Ocultar teclado", "Done": "OK", + "Edit": "Editar", + "Edit queued message": "Editar mensagem na fila", "Enable": "Ativar", "Enable proxy": "Ativar proxy", "Enable the parent plugin first.": "Ative o plugin pai primeiro.", @@ -234,6 +242,7 @@ "Invalid API key": "Chave de API inválida", "Invalid stored language preference.": "A preferência de idioma salva é inválida.", "JSON body": "Corpo JSON", + "Keep my edit": "Manter minha edição", "Language": "Idioma", "Latest": "Mais recente", "Leave blank for automatic title": "Deixe em branco para título automático", @@ -251,6 +260,7 @@ "Message Maka…": "Mensagem para Maka…", "Message composer": "Campo de mensagem", "Message predictions": "Previsões de mensagem", + "Message was not sent because the previous run is unsettled. Your message is kept.": "A mensagem não foi enviada porque a execução anterior não foi finalizada. Sua mensagem foi mantida.", "Minimal": "Mínimo", "Model": "Modelo", "Models": "Modelos", @@ -279,9 +289,11 @@ "No project MCP consent is pending.": "Nenhum consentimento MCP do projeto pendente.", "No side questions yet": "Ainda não há perguntas paralelas", "No skills": "Nenhuma habilidade", + "No turn is running. This message remains queued.": "Nenhum turno em execução. Esta mensagem permanece na fila.", "No uncommitted changes": "Nenhuma alteração pendente", "No workspace path configured for this chat.": "Nenhum caminho do espaço de trabalho configurado para esta conversa.", "None": "Nenhum", + "Not sent. Choose a workspace, then retry.": "Não enviado. Escolha um espaço de trabalho e tente novamente.", "Now": "Agora", "Off": "Desativado", "Offline": "Off-line", @@ -381,6 +393,7 @@ "Results array path": "Caminho do array de resultados", "Retry": "Tentar novamente", "Retry now": "Tentar novamente agora", + "Review latest": "Conferir versão atual", "Review on Desktop": "Revisar no desktop", "Review project MCP consent": "Revisar consentimento MCP do projeto", "Room": "Sala", @@ -414,6 +427,7 @@ "Select model": "Selecionar modelo", "Send message": "Enviar mensagem", "Send to Main Chat": "Enviar na conversa principal", + "Sending…": "Enviando…", "Server-side compaction": "Compactação no servidor", "Service": "Serviço", "Settings": "Configurações", @@ -433,7 +447,11 @@ "Start Chat on {name}": "Iniciar conversa em {name}", "Start a conversation on any connected computer and it will appear here automatically.": "Inicie uma conversa em qualquer computador conectado e ela aparecerá aqui automaticamente.", "Status": "Status", + "Steer now": "Orientar agora", + "Steer or message Maka…": "Oriente a execução ou escreva para Maka…", + "Steer · Waiting for next step": "Orientação · Aguardando a próxima etapa", "Stop Run": "Parar execução", + "Stopped before delivery. Your message is kept.": "Parado antes da entrega. Sua mensagem foi mantida.", "Subagents": "Subagentes", "Submit Answer": "Enviar resposta", "System": "Sistema", @@ -444,12 +462,17 @@ "Target computer": "Computador alvo", "Team ID": "ID da equipe", "Test connection": "Testar conexão", + "The active turn changed. Your message is kept.": "O turno ativo mudou. Sua mensagem foi mantida.", "The deployment document is invalid.": "O documento de implantação é inválido.", "The main conversation is no longer available.": "A conversa principal não está mais disponível.", "The plugin bundle could not be downloaded.": "Não foi possível baixar o pacote do plugin.", "The plugin bundle is invalid.": "O pacote do plugin é inválido.", "The proxy address or username changed. Enter the password again or turn off proxy authentication.": "O endereço ou o nome de usuário do proxy mudou. Digite a senha novamente ou desative a autenticação do proxy.", + "The queue changed. Review the current message before trying again.": "A fila mudou. Confira a mensagem atual antes de tentar novamente.", + "The queue changed. Your edit is kept.": "A fila mudou. Sua edição foi mantida.", + "The requested skill is unavailable. Edit the message or try again.": "A habilidade solicitada não está disponível. Edite a mensagem ou tente novamente.", "The selected deployment source is invalid.": "A origem de implantação selecionada é inválida.", + "The selected model is unavailable. Try again or choose another model.": "O modelo selecionado está indisponível. Tente novamente ou escolha outro modelo.", "The selected package is unavailable.": "O pacote selecionado está indisponível.", "The selected plugin instance is unavailable.": "A instância de plugin selecionada está indisponível.", "These servers run outside the conversation sandbox and can run commands as your user or contact remote services. Full-access sessions can call their tools without further confirmation.": "Estes servidores são executados fora da sandbox da conversa e podem executar comandos como seu usuário ou acessar serviços remotos. Sessões com acesso total podem chamar suas ferramentas sem confirmação adicional.", @@ -465,9 +488,11 @@ "This iPhone": "Este iPhone", "This iPhone Peer ID": "Peer ID deste iPhone", "This iPhone will disconnect from this computer and forget its pairing credentials. You can pair it again anytime.": "Este iPhone será desconectado deste computador e esquecerá as credenciais de pareamento. Você pode parear novamente quando quiser.", + "This message is no longer queued.": "Esta mensagem não está mais na fila.", "This run": "Esta execução", "This server stores literal environment variables or HTTP headers. Edit it on Desktop.": "Este servidor armazena valores de variáveis de ambiente ou cabeçalhos HTTP em texto simples. Edite-o no desktop.", "This session": "Esta sessão", + "This turn cannot accept this message right now. It remains queued.": "Este turno não pode aceitar esta mensagem agora. Ela permanece na fila.", "Thought process": "Raciocínio", "Thought process · {count, plural, one {# tool} other {# tools}}": "Raciocínio · {count, plural, one {# ferramenta} other {# ferramentas}}", "Title (optional)": "Título (opcional)", @@ -499,6 +524,7 @@ "View All Side Questions": "Ver todas as perguntas paralelas", "Waiting for current turn": "Aguardando turno atual", "Waiting for provider sign-in…": "Aguardando login no provedor…", + "Waiting for queue…": "Adicionando à fila…", "Waiting for your response": "Aguardando sua resposta", "Web Search": "Busca web", "WebSocket": "WebSocket", @@ -519,6 +545,7 @@ "{access} · {scope}: {path}": "{access} · {scope}: {path}", "{count, plural, one {# message queued} other {# messages queued}}": "{count, plural, one {# mensagem na fila} other {# mensagens na fila}}", "{count, plural, one {# quote} other {# quotes}}": "{count, plural, one {# citação} other {# citações}}", + "{count} queued": "Na fila: {count}", "{count}d": "{count} d", "{count}h": "{count} h", "{count}m": "{count} min", diff --git a/products/maka/ios-shell/locales/ru.json b/products/maka/ios-shell/locales/ru.json index bfe3c71de83..b5c3179153e 100644 --- a/products/maka/ios-shell/locales/ru.json +++ b/products/maka/ios-shell/locales/ru.json @@ -12,6 +12,7 @@ "Add MCP server": "Добавить сервер MCP", "Add connection": "Добавить подключение", "Add subagent": "Добавить субагента", + "Add to queue": "Добавить в очередь", "Add to quotes": "Добавить к цитатам", "Additional permissions requested": "Запрошены дополнительные разрешения", "Advanced options": "Дополнительные параметры", @@ -119,16 +120,20 @@ "Copy": "Копировать", "Copy a pairing link from Maka Settings on your computer, then paste it here.": "Скопируйте ссылку сопряжения в настройках Maka на компьютере и вставьте её сюда.", "Copy code": "Копировать код", + "Copy edit": "Копировать правку", "Copy reply": "Копировать ответ", "Could not change the model.": "Не удалось сменить модель.", "Could not confirm whether the message was sent. Check the conversation or queue before retrying.": "Не удалось подтвердить, что сообщение отправлено. Перед повторной попыткой проверьте историю чата или очередь.", + "Could not copy the edit.": "Не удалось скопировать правку.", "Could not create the side question. Try again.": "Не удалось создать отдельный чат для вопроса. Попробуйте ещё раз.", "Could not install the plugin.": "Не удалось установить плагин.", "Could not load conversation history.": "Не удалось загрузить историю диалога.", "Could not load models.": "Не удалось загрузить модели.", "Could not load side questions": "Не удалось загрузить вопросы в отдельных чатах", + "Could not load the message queue.": "Не удалось загрузить очередь сообщений.", "Could not open the conversation.": "Не удалось открыть диалог.", "Could not read or update settings.": "Не удалось прочитать или обновить настройки.", + "Could not read the queued message.": "Не удалось прочитать сообщение из очереди.", "Could not read the skill source.": "Не удалось прочитать источник навыка.", "Could not remove the MCP server.": "Не удалось удалить сервер MCP.", "Could not save the MCP server.": "Не удалось сохранить сервер MCP.", @@ -143,6 +148,7 @@ "Create Room": "Создать комнату", "Create Room on {name}": "Создать комнату на {name}", "Creating…": "Создание…", + "Current queued message": "Текущее сообщение в очереди", "Custom endpoint": "Собственный эндпоинт", "Custom relay or WebSocket": "Свой ретранслятор или WebSocket", "Dark": "Тёмная", @@ -181,6 +187,8 @@ "Dismiss": "Закрыть", "Dismiss keyboard": "Скрыть клавиатуру", "Done": "Готово", + "Edit": "Редактировать", + "Edit queued message": "Редактировать сообщение в очереди", "Enable": "Включить", "Enable proxy": "Включить прокси", "Enable the parent plugin first.": "Сначала включите родительский плагин.", @@ -234,6 +242,7 @@ "Invalid API key": "Недействительный ключ API", "Invalid stored language preference.": "Сохранённая настройка языка недействительна.", "JSON body": "Тело JSON", + "Keep my edit": "Оставить мою правку", "Language": "Язык", "Latest": "Вниз", "Leave blank for automatic title": "Оставьте пустым для автоназвания", @@ -251,6 +260,7 @@ "Message Maka…": "Сообщение для Maka…", "Message composer": "Поле ввода сообщения", "Message predictions": "Подсказки сообщений", + "Message was not sent because the previous run is unsettled. Your message is kept.": "Сообщение не отправлено, так как предыдущий запуск не завершён. Сообщение сохранено.", "Minimal": "Минимальный", "Model": "Модель", "Models": "Модели", @@ -279,9 +289,11 @@ "No project MCP consent is pending.": "Нет ожидающих подтверждений MCP для проекта.", "No side questions yet": "Вопросов в отдельных чатах пока нет", "No skills": "Нет навыков", + "No turn is running. This message remains queued.": "Ни один ход не выполняется. Это сообщение остаётся в очереди.", "No uncommitted changes": "Нет незафиксированных изменений", "No workspace path configured for this chat.": "Для этого чата не задан путь к проекту.", "None": "Нет", + "Not sent. Choose a workspace, then retry.": "Не отправлено. Выберите рабочую область и повторите попытку.", "Now": "Сейчас", "Off": "Выкл.", "Offline": "Не в сети", @@ -381,6 +393,7 @@ "Results array path": "Путь к массиву результатов", "Retry": "Повторить", "Retry now": "Повторить сейчас", + "Review latest": "Проверить текущую версию", "Review on Desktop": "Проверить на компьютере", "Review project MCP consent": "Проверить разрешение MCP проекта", "Room": "Комната", @@ -414,6 +427,7 @@ "Select model": "Выбрать модель", "Send message": "Отправить сообщение", "Send to Main Chat": "Отправить в основной чат", + "Sending…": "Отправка…", "Server-side compaction": "Сжатие на сервере", "Service": "Сервис", "Settings": "Настройки", @@ -433,7 +447,11 @@ "Start Chat on {name}": "Начать чат на {name}", "Start a conversation on any connected computer and it will appear here automatically.": "Начните диалог на любом подключённом компьютере, и он автоматически появится здесь.", "Status": "Статус", + "Steer now": "Направить сейчас", + "Steer or message Maka…": "Направить выполнение или написать Maka…", + "Steer · Waiting for next step": "Указание · Ожидание следующего шага", "Stop Run": "Остановить", + "Stopped before delivery. Your message is kept.": "Остановлено до доставки. Сообщение сохранено.", "Subagents": "Субагенты", "Submit Answer": "Отправить ответ", "System": "Системная", @@ -444,12 +462,17 @@ "Target computer": "Целевой компьютер", "Team ID": "ID команды", "Test connection": "Проверить подключение", + "The active turn changed. Your message is kept.": "Активный ход изменился. Ваше сообщение сохранено.", "The deployment document is invalid.": "Документ развёртывания некорректен.", "The main conversation is no longer available.": "Основной чат больше недоступен.", "The plugin bundle could not be downloaded.": "Не удалось скачать пакет плагина.", "The plugin bundle is invalid.": "Некорректный пакет плагина.", "The proxy address or username changed. Enter the password again or turn off proxy authentication.": "Адрес прокси или имя пользователя изменилось. Введите пароль ещё раз или отключите аутентификацию прокси.", + "The queue changed. Review the current message before trying again.": "Очередь изменилась. Проверьте текущее сообщение перед повторной попыткой.", + "The queue changed. Your edit is kept.": "Очередь изменилась. Ваша правка сохранена.", + "The requested skill is unavailable. Edit the message or try again.": "Запрошенный навык недоступен. Измените сообщение или повторите попытку.", "The selected deployment source is invalid.": "Выбранный источник развёртывания некорректен.", + "The selected model is unavailable. Try again or choose another model.": "Выбранная модель недоступна. Повторите попытку или выберите другую модель.", "The selected package is unavailable.": "Выбранный пакет недоступен.", "The selected plugin instance is unavailable.": "Выбранный экземпляр плагина недоступен.", "These servers run outside the conversation sandbox and can run commands as your user or contact remote services. Full-access sessions can call their tools without further confirmation.": "Эти серверы работают вне песочницы диалога и могут выполнять команды от вашего имени или обращаться к внешним службам. Сессии с полным доступом могут вызывать их инструменты без дополнительного подтверждения.", @@ -465,9 +488,11 @@ "This iPhone": "Этот iPhone", "This iPhone Peer ID": "Peer ID этого iPhone", "This iPhone will disconnect from this computer and forget its pairing credentials. You can pair it again anytime.": "Этот iPhone отключится от компьютера и удалит данные сопряжения. Вы сможете подключить его снова в любое время.", + "This message is no longer queued.": "Это сообщение больше не в очереди.", "This run": "Этот запуск", "This server stores literal environment variables or HTTP headers. Edit it on Desktop.": "Этот сервер хранит значения переменных окружения или HTTP-заголовков открытым текстом. Измените настройки на компьютере.", "This session": "Эта сессия", + "This turn cannot accept this message right now. It remains queued.": "Этот ход сейчас не может принять сообщение. Оно остаётся в очереди.", "Thought process": "Ход мыслей", "Thought process · {count, plural, one {# tool} other {# tools}}": "Ход мыслей · инструментов: {count, plural, one {#} other {#}}", "Title (optional)": "Название (необязательно)", @@ -499,6 +524,7 @@ "View All Side Questions": "Посмотреть все вопросы в отдельных чатах", "Waiting for current turn": "Ожидание текущего шага", "Waiting for provider sign-in…": "Ожидание входа у провайдера…", + "Waiting for queue…": "Добавление в очередь…", "Waiting for your response": "Ожидает вашего ответа", "Web Search": "Поиск в сети", "WebSocket": "WebSocket", @@ -519,6 +545,7 @@ "{access} · {scope}: {path}": "{access} · {scope}: {path}", "{count, plural, one {# message queued} other {# messages queued}}": "В очереди сообщений: {count, plural, one {#} other {#}}", "{count, plural, one {# quote} other {# quotes}}": "{count, plural, one {# цитата} few {# цитаты} many {# цитат} other {# цитаты}}", + "{count} queued": "В очереди: {count}", "{count}d": "{count} дн.", "{count}h": "{count} ч", "{count}m": "{count} мин", diff --git a/products/maka/ios-shell/locales/zh-CN.json b/products/maka/ios-shell/locales/zh-CN.json index 548026fcf7b..29ea49b763c 100644 --- a/products/maka/ios-shell/locales/zh-CN.json +++ b/products/maka/ios-shell/locales/zh-CN.json @@ -12,6 +12,7 @@ "Add MCP server": "添加 MCP 服务器", "Add connection": "添加连接", "Add subagent": "添加子 Agent", + "Add to queue": "加入队列", "Add to quotes": "加入引用", "Additional permissions requested": "请求额外权限", "Advanced options": "高级选项", @@ -119,16 +120,20 @@ "Copy": "复制", "Copy a pairing link from Maka Settings on your computer, then paste it here.": "在电脑端 Maka 设置中复制配对链接,然后粘贴到此处。", "Copy code": "复制设备码", + "Copy edit": "复制编辑内容", "Copy reply": "复制回复", "Could not change the model.": "无法切换模型。", "Could not confirm whether the message was sent. Check the conversation or queue before retrying.": "无法确认消息是否已发送,重试前请先查看会话记录或队列。", + "Could not copy the edit.": "无法复制编辑内容。", "Could not create the side question. Try again.": "无法创建旁问,请重试。", "Could not install the plugin.": "无法安装插件。", "Could not load conversation history.": "无法加载会话历史。", "Could not load models.": "无法加载模型。", "Could not load side questions": "无法加载旁问", + "Could not load the message queue.": "无法加载消息队列。", "Could not open the conversation.": "无法打开会话。", "Could not read or update settings.": "无法读取或更新设置。", + "Could not read the queued message.": "无法读取队列中的消息。", "Could not read the skill source.": "无法读取技能来源。", "Could not remove the MCP server.": "无法移除 MCP 服务器。", "Could not save the MCP server.": "无法保存 MCP 服务器。", @@ -143,6 +148,7 @@ "Create Room": "创建协作室", "Create Room on {name}": "在 {name} 创建协作房间", "Creating…": "正在创建…", + "Current queued message": "当前队列消息", "Custom endpoint": "自定义端点", "Custom relay or WebSocket": "自定义中继或 WebSocket", "Dark": "深色", @@ -181,6 +187,8 @@ "Dismiss": "关闭", "Dismiss keyboard": "收起键盘", "Done": "完成", + "Edit": "编辑", + "Edit queued message": "编辑队列消息", "Enable": "启用", "Enable proxy": "启用代理", "Enable the parent plugin first.": "请先启用上级插件。", @@ -234,6 +242,7 @@ "Invalid API key": "API 密钥无效", "Invalid stored language preference.": "保存的语言设置无效。", "JSON body": "JSON 请求体", + "Keep my edit": "保留我的编辑", "Language": "语言", "Latest": "最新", "Leave blank for automatic title": "留空将自动生成标题", @@ -251,6 +260,7 @@ "Message Maka…": "给 Maka 发消息…", "Message composer": "消息输入框", "Message predictions": "消息预测", + "Message was not sent because the previous run is unsettled. Your message is kept.": "上一轮还有操作未结束,消息发送失败。消息已保留。", "Minimal": "极低", "Model": "模型", "Models": "模型", @@ -279,9 +289,11 @@ "No project MCP consent is pending.": "没有待确认的项目 MCP 授权。", "No side questions yet": "还没有旁问", "No skills": "没有技能", + "No turn is running. This message remains queued.": "当前没有正在运行的轮次,消息仍在队列中。", "No uncommitted changes": "暂无未提交改动", "No workspace path configured for this chat.": "此对话未绑定工作区路径。", "None": "无", + "Not sent. Choose a workspace, then retry.": "未发送。请先选择工作区,然后重试。", "Now": "刚刚", "Off": "关闭", "Offline": "离线", @@ -381,6 +393,7 @@ "Results array path": "结果数组路径", "Retry": "重试", "Retry now": "立即重试", + "Review latest": "查看最新版本", "Review on Desktop": "请在桌面端审核", "Review project MCP consent": "审核项目 MCP 授权", "Room": "协作室", @@ -414,6 +427,7 @@ "Select model": "选择模型", "Send message": "发送消息", "Send to Main Chat": "发送到主会话", + "Sending…": "正在发送…", "Server-side compaction": "服务端压缩", "Service": "服务授权", "Settings": "设置", @@ -433,7 +447,11 @@ "Start Chat on {name}": "在 {name} 创建对话", "Start a conversation on any connected computer and it will appear here automatically.": "在任意已连接电脑上发起对话后,都会自动同步到这里。", "Status": "状态", + "Steer now": "立即引导", + "Steer or message Maka…": "引导当前运行或给 Maka 发消息…", + "Steer · Waiting for next step": "引导 · 等待下一步", "Stop Run": "停止运行", + "Stopped before delivery. Your message is kept.": "送达前已停止,消息已保留。", "Subagents": "子 Agent", "Submit Answer": "提交回答", "System": "跟随系统", @@ -444,12 +462,17 @@ "Target computer": "目标电脑", "Team ID": "团队 ID", "Test connection": "测试连接", + "The active turn changed. Your message is kept.": "当前回合已变更。您的消息已保留。", "The deployment document is invalid.": "部署文档无效。", "The main conversation is no longer available.": "主会话已不可用。", "The plugin bundle could not be downloaded.": "无法下载插件包。", "The plugin bundle is invalid.": "插件包无效。", "The proxy address or username changed. Enter the password again or turn off proxy authentication.": "代理地址或用户名已更改。请重新输入密码,或关闭代理认证。", + "The queue changed. Review the current message before trying again.": "队列已更改。请查看当前消息后重试。", + "The queue changed. Your edit is kept.": "队列已更改。编辑内容已保留。", + "The requested skill is unavailable. Edit the message or try again.": "请求的技能不可用。请编辑消息或重试。", "The selected deployment source is invalid.": "所选的部署来源无效。", + "The selected model is unavailable. Try again or choose another model.": "所选模型暂不可用,请重试或选择其他模型。", "The selected package is unavailable.": "所选的软件包不可用。", "The selected plugin instance is unavailable.": "所选的插件实例不可用。", "These servers run outside the conversation sandbox and can run commands as your user or contact remote services. Full-access sessions can call their tools without further confirmation.": "这些服务器在会话沙箱外运行,可以用你的身份执行命令或访问远程服务。完全访问会话调用其工具时无需再次确认。", @@ -465,9 +488,11 @@ "This iPhone": "本机 iPhone", "This iPhone Peer ID": "本机 iPhone Peer ID", "This iPhone will disconnect from this computer and forget its pairing credentials. You can pair it again anytime.": "此 iPhone 将断开与该电脑的连接并清除配对凭据,之后可随时重新配对。", + "This message is no longer queued.": "此消息已离开队列。", "This run": "本次运行", "This server stores literal environment variables or HTTP headers. Edit it on Desktop.": "此服务器存有明文环境变量或 HTTP 请求头。请在桌面端编辑。", "This session": "本次对话", + "This turn cannot accept this message right now. It remains queued.": "本轮暂时无法接收此消息,消息仍在队列中。", "Thought process": "思考过程", "Thought process · {count, plural, one {# tool} other {# tools}}": "思考过程 · {count, plural, other {# 项工具}}", "Title (optional)": "标题(可选)", @@ -499,6 +524,7 @@ "View All Side Questions": "查看所有旁问", "Waiting for current turn": "等待当前轮次完成", "Waiting for provider sign-in…": "正在等待服务商授权…", + "Waiting for queue…": "正在加入队列…", "Waiting for your response": "等待你确认", "Web Search": "联网搜索", "WebSocket": "WebSocket", @@ -519,6 +545,7 @@ "{access} · {scope}: {path}": "{access} · {scope}:{path}", "{count, plural, one {# message queued} other {# messages queued}}": "{count, plural, other {# 条消息排队中}}", "{count, plural, one {# quote} other {# quotes}}": "{count, plural, other {# 条引用}}", + "{count} queued": "{count} 条排队中", "{count}d": "{count}天前", "{count}h": "{count}小时前", "{count}m": "{count}分钟前", diff --git a/products/maka/ios-shell/locales/zh-HK.json b/products/maka/ios-shell/locales/zh-HK.json index cec5d43a9dc..907c75a4eae 100644 --- a/products/maka/ios-shell/locales/zh-HK.json +++ b/products/maka/ios-shell/locales/zh-HK.json @@ -1,5 +1,6 @@ { "Access key ID": "存取密鑰 ID", + "Add to queue": "加入隊列", "Application risk is unknown. Review its identity before allowing access.": "應用程式風險未知。請核對其身份後再允許存取。", "Arguments": "參數", "Authentication": "身份驗證", @@ -23,10 +24,12 @@ "Could not save the proxy password.": "無法儲存代理密碼。", "Could not update the message queue.": "無法更新訊息隊列。", "Could not sync chats": "無法同步對話", + "Current queued message": "目前隊列訊息", "Default sandbox mode": "預設沙盒模式", "Device name is too long.": "裝置名稱太長。", "Direct connection discovery · Port {port}": "直接連接偵測 · 端口 {port}", "Disconnect": "中斷連接", + "Edit queued message": "編輯隊列訊息", "Enable proxy": "啟用代理", "Enable the parent plugin first.": "請先啟用上層插件。", "Enable web search": "啟用網絡搜尋", @@ -40,6 +43,7 @@ "Network: no access": "網絡:無存取權限", "Network: no destinations": "網絡:未指定目標", "No approvals or questions are waiting.": "沒有待處理的審批或提問。", + "No turn is running. This message remains queued.": "目前沒有正在執行的輪次,訊息仍在隊列中。", "Optional token": "選填令牌", "Paired Computers": "已配對電腦", "Paste pairing link or connect manually": "貼上配對連結或手動連接", @@ -73,6 +77,8 @@ "This computer is connected, and Agent conversations are not enabled on it.": "這部電腦已連接,但尚未啟用 Agent 對話功能。", "This iPhone": "這部 iPhone", "This iPhone Peer ID": "這部 iPhone Peer ID", + "This message is no longer queued.": "此訊息已離開隊列。", + "This turn cannot accept this message right now. It remains queued.": "本輪暫時無法接收此訊息,訊息仍在隊列中。", "Unavailable": "不可用", "User action required": "需要用戶操作", "Username": "用戶名稱", diff --git a/products/maka/ios-shell/locales/zh-TW.json b/products/maka/ios-shell/locales/zh-TW.json index 95e8fe53fa8..5c2219c524e 100644 --- a/products/maka/ios-shell/locales/zh-TW.json +++ b/products/maka/ios-shell/locales/zh-TW.json @@ -12,6 +12,7 @@ "Add MCP server": "新增 MCP 伺服器", "Add connection": "新增連線", "Add subagent": "新增子 Agent", + "Add to queue": "加入佇列", "Add to quotes": "加入引用", "Additional permissions requested": "請求額外權限", "Advanced options": "進階選項", @@ -119,16 +120,20 @@ "Copy": "複製", "Copy a pairing link from Maka Settings on your computer, then paste it here.": "在電腦端 Maka 設定中複製配對連結,再貼到此處。", "Copy code": "複製裝置碼", + "Copy edit": "複製編輯內容", "Copy reply": "複製回覆", "Could not change the model.": "無法切換模型。", "Could not confirm whether the message was sent. Check the conversation or queue before retrying.": "無法確認訊息是否已傳送,重試前請先查看對話記錄或佇列。", + "Could not copy the edit.": "無法複製編輯內容。", "Could not create the side question. Try again.": "無法建立旁問,請再試一次。", "Could not install the plugin.": "無法安裝外掛程式。", "Could not load conversation history.": "無法載入對話記錄。", "Could not load models.": "無法載入模型。", "Could not load side questions": "無法載入旁問", + "Could not load the message queue.": "無法載入訊息佇列。", "Could not open the conversation.": "無法開啟對話。", "Could not read or update settings.": "無法讀取或更新設定。", + "Could not read the queued message.": "無法讀取佇列中的訊息。", "Could not read the skill source.": "無法讀取技能來源。", "Could not remove the MCP server.": "無法移除 MCP 伺服器。", "Could not save the MCP server.": "無法儲存 MCP 伺服器。", @@ -143,6 +148,7 @@ "Create Room": "建立協作室", "Create Room on {name}": "在 {name} 建立協作房間", "Creating…": "正在建立…", + "Current queued message": "目前佇列訊息", "Custom endpoint": "自訂端點", "Custom relay or WebSocket": "自訂中繼或 WebSocket", "Dark": "深色", @@ -181,6 +187,8 @@ "Dismiss": "關閉", "Dismiss keyboard": "收起鍵盤", "Done": "完成", + "Edit": "編輯", + "Edit queued message": "編輯佇列訊息", "Enable": "啟用", "Enable proxy": "啟用 Proxy", "Enable the parent plugin first.": "請先啟用上層外掛。", @@ -234,6 +242,7 @@ "Invalid API key": "API 金鑰無效", "Invalid stored language preference.": "儲存的語言設定無效。", "JSON body": "JSON 請求本文", + "Keep my edit": "保留我的編輯", "Language": "語言", "Latest": "最新", "Leave blank for automatic title": "留空將自動產生標題", @@ -251,6 +260,7 @@ "Message Maka…": "傳送訊息給 Maka…", "Message composer": "訊息輸入欄", "Message predictions": "訊息預測", + "Message was not sent because the previous run is unsettled. Your message is kept.": "上一輪還有操作未結束,訊息傳送失敗。訊息已保留。", "Minimal": "極低", "Model": "模型", "Models": "模型", @@ -279,9 +289,11 @@ "No project MCP consent is pending.": "沒有待確認的專案 MCP 授權。", "No side questions yet": "還沒有旁問", "No skills": "沒有技能", + "No turn is running. This message remains queued.": "目前沒有正在執行的輪次,訊息仍在佇列中。", "No uncommitted changes": "尚無未提交的變更", "No workspace path configured for this chat.": "此對話未設定工作區路徑。", "None": "無", + "Not sent. Choose a workspace, then retry.": "未傳送。請先選擇工作區,然後重試。", "Now": "剛剛", "Off": "關閉", "Offline": "離線", @@ -381,6 +393,7 @@ "Results array path": "結果陣列路徑", "Retry": "重試", "Retry now": "立即重試", + "Review latest": "查看最新版本", "Review on Desktop": "請在桌面端審核", "Review project MCP consent": "審核專案 MCP 授權", "Room": "協作室", @@ -414,6 +427,7 @@ "Select model": "選擇模型", "Send message": "傳送訊息", "Send to Main Chat": "送至主對話", + "Sending…": "正在傳送…", "Server-side compaction": "伺服器端壓縮", "Service": "服務授權", "Settings": "設定", @@ -433,7 +447,11 @@ "Start Chat on {name}": "在 {name} 開始對話", "Start a conversation on any connected computer and it will appear here automatically.": "在任何已連線電腦上開始對話後,都會自動出現在這裡。", "Status": "狀態", + "Steer now": "立即引導", + "Steer or message Maka…": "引導目前執行或傳訊息給 Maka⋯", + "Steer · Waiting for next step": "引導 · 等待下一步", "Stop Run": "停止執行", + "Stopped before delivery. Your message is kept.": "送達前已停止,訊息已保留。", "Subagents": "子 Agent", "Submit Answer": "送出回答", "System": "跟隨系統", @@ -444,12 +462,17 @@ "Target computer": "目標電腦", "Team ID": "團隊 ID", "Test connection": "測試連線", + "The active turn changed. Your message is kept.": "目前回合已變更。你的訊息已保留。", "The deployment document is invalid.": "部署文件無效。", "The main conversation is no longer available.": "主對話已無法存取。", "The plugin bundle could not be downloaded.": "無法下載外掛套件。", "The plugin bundle is invalid.": "外掛套件無效。", "The proxy address or username changed. Enter the password again or turn off proxy authentication.": "代理位址或使用者名稱已變更。請重新輸入密碼,或關閉代理驗證。", + "The queue changed. Review the current message before trying again.": "佇列已變更。請查看目前訊息後再試。", + "The queue changed. Your edit is kept.": "佇列已變更。編輯內容已保留。", + "The requested skill is unavailable. Edit the message or try again.": "要求的技能無法使用。請編輯訊息或重試。", "The selected deployment source is invalid.": "所選的部署來源無效。", + "The selected model is unavailable. Try again or choose another model.": "所選模型暫不可用,請重試或選擇其他模型。", "The selected package is unavailable.": "所選的套件無法使用。", "The selected plugin instance is unavailable.": "所選的外掛執行個體無法使用。", "These servers run outside the conversation sandbox and can run commands as your user or contact remote services. Full-access sessions can call their tools without further confirmation.": "這些伺服器在對話沙箱外執行,可以用你的身分執行命令或連線遠端服務。完整存取對話呼叫其工具時無需再次確認。", @@ -465,9 +488,11 @@ "This iPhone": "這台 iPhone", "This iPhone Peer ID": "這台 iPhone Peer ID", "This iPhone will disconnect from this computer and forget its pairing credentials. You can pair it again anytime.": "這台 iPhone 將中斷與此電腦的連線並忘記配對憑證,日後可隨時重新配對。", + "This message is no longer queued.": "此訊息已離開佇列。", "This run": "本次執行", "This server stores literal environment variables or HTTP headers. Edit it on Desktop.": "此伺服器存有明文環境變數或 HTTP 標頭。請在桌面端編輯。", "This session": "本次對話", + "This turn cannot accept this message right now. It remains queued.": "本輪暫時無法接收此訊息,訊息仍在佇列中。", "Thought process": "思考過程", "Thought process · {count, plural, one {# tool} other {# tools}}": "思考過程 · {count, plural, other {# 項工具}}", "Title (optional)": "標題(選填)", @@ -499,6 +524,7 @@ "View All Side Questions": "查看所有旁問", "Waiting for current turn": "等待目前輪次完成", "Waiting for provider sign-in…": "正在等待服務商授權…", + "Waiting for queue…": "正在加入佇列⋯", "Waiting for your response": "等待你的回覆", "Web Search": "網路搜尋", "WebSocket": "WebSocket", @@ -519,6 +545,7 @@ "{access} · {scope}: {path}": "{access} · {scope}:{path}", "{count, plural, one {# message queued} other {# messages queued}}": "{count, plural, other {# 則訊息排隊中}}", "{count, plural, one {# quote} other {# quotes}}": "{count, plural, other {# 則引用}}", + "{count} queued": "{count} 則排隊中", "{count}d": "{count} 天前", "{count}h": "{count} 小時前", "{count}m": "{count} 分鐘前", diff --git a/products/maka/ios-shell/src/bridge.rs b/products/maka/ios-shell/src/bridge.rs index 1893d5291d1..0bb247d9652 100644 --- a/products/maka/ios-shell/src/bridge.rs +++ b/products/maka/ios-shell/src/bridge.rs @@ -43,6 +43,7 @@ use tokio_util::sync::CancellationToken; const PAIR_SCHEME: &str = "maka://pair/v1?payload="; const PROGRESS_WINDOW: u64 = 8; +const SEND_TIMEOUT: Duration = Duration::from_secs(30); const PROGRESS_ACK_STALL_TIMEOUT: Duration = Duration::from_secs(30); pub const ALLOWED_HOST_CALLS: &[&str] = &[ "ios.bootstrap", @@ -142,6 +143,7 @@ struct Rpc { input: Value, subscription_id: Option, progress_id: Option, + prepare_room_post: Option, } #[derive(Deserialize)] @@ -306,6 +308,7 @@ struct Bridge { snapshot_revision: Arc, shutdown: CancellationToken, progress_ack_stall_timeout: Duration, + send_timeout: Duration, runtime: Handle, } @@ -319,9 +322,16 @@ struct MutationProgress<'a> { } impl MutationProgress<'_> { - async fn emit(&self, bridge: &Bridge, root: &str, generation: u64, value: Value) { + async fn emit( + &self, + bridge: &Bridge, + root: &str, + generation: u64, + value: Value, + requires_observer: bool, + ) -> Option { if self.stalled.load(Ordering::Relaxed) { - return; + return None; } let mut ack = self.ack.clone(); let mut event = json!({ @@ -329,10 +339,13 @@ impl MutationProgress<'_> { "deliveryId": self.delivery_id, }); event["value"] = value; + if requires_observer { + event["requiresObserver"] = true.into(); + } loop { let mut state = bridge.state.lock().await; if self.retired.is_cancelled() || state.current(root, generation).is_none() { - return; + return None; } let window = state .mutation_progress @@ -347,18 +360,19 @@ impl MutationProgress<'_> { .expect("valid progress event name") { window.sent = sequence; + return Some(sequence); } - return; + return None; } drop(state); // A dead or stalled consumer must not hold up the terminal receipt. tokio::select! { biased; - _ = self.retired.cancelled() => return, - _ = self.sender.closed() => return, + _ = self.retired.cancelled() => return None, + _ = self.sender.closed() => return None, changed = ack.changed() => { if changed.is_err() { - return; + return None; } } _ = tokio::time::sleep(bridge.progress_ack_stall_timeout) => { @@ -367,7 +381,7 @@ impl MutationProgress<'_> { "iOS mutation progress ACK stalled for Host {root}, delivery {}; continuing without progress", self.delivery_id, ); - return; + return None; } } } @@ -380,19 +394,21 @@ impl HostBridge { support_dir: PathBuf, runtime: Handle, ) -> Result { - Self::attach_with_progress_stall_timeout( + Self::attach_with_timeouts( channel, support_dir, runtime, PROGRESS_ACK_STALL_TIMEOUT, + SEND_TIMEOUT, ) } - fn attach_with_progress_stall_timeout( + fn attach_with_timeouts( channel: HostChannel, support_dir: PathBuf, runtime: Handle, progress_ack_stall_timeout: Duration, + send_timeout: Duration, ) -> Result { let identity = crate::identity::load(&support_dir)?; let profile_path = support_dir.join("hosts.json"); @@ -417,6 +433,7 @@ impl HostBridge { snapshot_revision: Arc::new(AtomicU64::new(0)), shutdown: CancellationToken::new(), progress_ack_stall_timeout, + send_timeout, }; for &name in ALLOWED_HOST_CALLS { let bridge = bridge.clone(); @@ -444,7 +461,14 @@ impl HostBridge { Err(err) => call.reply(Err(err)), } } else if name == "ios.hostMutate" { - let result = bridge.mutate(data, Some(&call)).await; + let send = data["endpoint"] == "agent" && data["method"] == "send"; + let result = match bridge.mutate(data, Some(&call)).await { + Ok(value) => Ok(value), + Err(MutationFailure::NotSubmitted(detail)) if send => { + Ok(json!({"notSubmitted": detail})) + } + Err(MutationFailure::NotSubmitted(detail) | MutationFailure::Unconfirmed(detail)) => Err(detail), + }; call.reply(result); } else { call.reply(bridge.dispatch(name, data).await); @@ -482,6 +506,18 @@ impl Drop for HostBridge { } } +#[derive(Debug)] +enum MutationFailure { + NotSubmitted(String), + Unconfirmed(String), +} + +impl From for MutationFailure { + fn from(cause: String) -> Self { + Self::NotSubmitted(cause) + } +} + impl Bridge { fn emit(&self, event: &str, data: Value) { self.channel @@ -687,17 +723,40 @@ impl Bridge { } } - async fn mutate(&self, mut data: Value, caller: Option<&HostCall>) -> Result { + async fn mutate( + &self, + mut data: Value, + caller: Option<&HostCall>, + ) -> Result { // Do not feed a credential to serde's diagnostics or the Host's JSON input. let secret = match data.as_object_mut().and_then(|data| data.remove("secret")) { Some(Value::String(secret)) => Some(secret), None | Some(Value::Null) => None, - Some(_) => return Err("secret must be UTF-8 text".into()), + Some(_) => return Err("secret must be UTF-8 text".to_owned().into()), }; let rpc: Rpc = decode(data)?; + let send = rpc.endpoint == "agent" && rpc.method == "send"; + let deadline = send.then(|| tokio::time::Instant::now() + self.send_timeout); + let room_session = if rpc.prepare_room_post == Some(true) { + if !send { + return Err("Room post preparation requires agent.send" + .to_owned() + .into()); + } + Some( + rpc.input["sessionId"] + .as_str() + .ok_or_else(|| "Room session is required".to_owned())? + .to_owned(), + ) + } else { + None + }; let attachments = credential_attachments(&rpc, secret)?; if rpc.root_id.is_some() && rpc.generation.is_none() { - return Err("root-scoped mutations require a connection generation".into()); + return Err("root-scoped mutations require a connection generation" + .to_owned() + .into()); } let (root, id, calls, receipt_scope, progress) = { let mut state = self.state.lock().await; @@ -733,23 +792,78 @@ impl Bridge { }); (root, id, calls, receipt_scope, progress) }; - let result = calls - .mutate_with_progress( - &rpc.endpoint, - &rpc.method, - rpc.input, - attachments, - |value| { - let progress = progress.as_ref(); - let root = root.as_str(); - async move { - if let Some(progress) = progress { - progress.emit(self, root, id, value).await; - } - } - }, - ) - .await; + let prepare = async { + let prepared = calls + .prepare_mutation(&rpc.endpoint, &rpc.method, rpc.input, attachments) + .await + .map_err(error)?; + if let Some(session) = room_session { + let unavailable = + || "Room post identity could not be delivered before confirmation".to_owned(); + let progress = progress.as_ref().ok_or_else(unavailable)?; + let message_id = maka_operation_id::room_post( + session.as_str(), + prepared.reference().get().as_bytes(), + ) + .ok_or_else(|| "Invalid Room session ID".to_owned())?; + let sequence = progress + .emit( + self, + &root, + id, + json!({ + "kind":"room_post_prepared", "messageId":message_id, + }), + true, + ) + .await + .ok_or_else(unavailable)?; + // Watches are independent streams. Wait for the UI to install + // the identity before submitting the write. + let mut ack = progress.ack.clone(); + tokio::select! { + biased; + _ = progress.retired.cancelled() => return Err(unavailable()), + _ = progress.sender.closed() => return Err(unavailable()), + seen = ack.wait_for(|value| *value >= sequence) => seen.map(drop).map_err(|_| unavailable())?, + _ = tokio::time::sleep(self.progress_ack_stall_timeout) => return Err(unavailable()), + } + } + Ok::<_, String>(prepared) + }; + let result = async { + let prepared = match deadline { + Some(deadline) => tokio::time::timeout_at(deadline, prepare) + .await + .map_err(|_| "Timed out preparing the Host message".to_owned())??, + None => prepare.await?, + }; + let on_progress = async |value| { + if let Some(progress) = &progress { + progress.emit(self, &root, id, value, false).await; + } + }; + // Keep the operation reference on a confirm timeout so recovery can + // still query the original receipt. Only the first phase is retryable. + let result = if let Some(deadline) = deadline { + let reference = serde_json::from_str(prepared.reference().get()).map_err(error)?; + tokio::time::timeout_at(deadline, prepared.confirm(on_progress)) + .await + .unwrap_or_else(|cause| { + Err(RemoteClientError::MutationUncertain { + reference, + cause: Box::new(RemoteClientError::Io(std::io::Error::new( + std::io::ErrorKind::TimedOut, + cause, + ))), + }) + }) + } else { + prepared.confirm(on_progress).await + }; + Ok::<_, String>(result) + } + .await; if let Some(progress) = progress { self.state .lock() @@ -757,6 +871,7 @@ impl Bridge { .mutation_progress .remove(&progress.delivery_id); } + let result = result?; if let Err(RemoteClientError::MutationUncertain { reference, .. }) = &result && let Some(scope) = receipt_scope { @@ -770,9 +885,9 @@ impl Bridge { "remote Host mutation cleanup failed (operation {})", reference["operation"] ); - result.map_err(error)? + result.map_err(|cause| MutationFailure::Unconfirmed(error(cause)))? } - result => result.map_err(error)?, + result => result.map_err(|cause| MutationFailure::Unconfirmed(error(cause)))?, }; Ok(json!({"value": value})) } @@ -1701,7 +1816,12 @@ mod tests { .await .unwrap_err() } else if call == "ios.hostMutate" { - bridge.mutate(args, None).await.unwrap_err() + let Err(MutationFailure::NotSubmitted(detail)) = + bridge.mutate(args, None).await + else { + panic!("invalid mutation must not be submitted"); + }; + detail } else { bridge.dispatch(call, args).await.unwrap_err() }; @@ -1723,7 +1843,8 @@ mod tests { ) .await .unwrap_err(); - assert!(error.contains("must be a JSON object"), "{error}"); + assert!(matches!(error, MutationFailure::NotSubmitted(detail) + if detail.contains("must be a JSON object"))); } } @@ -1852,9 +1973,9 @@ mod tests { query.unwrap_err(), "remote Host anchor no longer matches UI" ); - assert_eq!( - mutation.unwrap_err(), - "remote Host anchor no longer matches UI" + assert!( + matches!(mutation, Err(MutationFailure::NotSubmitted(reason)) + if reason == "remote Host anchor no longer matches UI") ); assert!( matches!(attached.bridge.open_subscription(stale, HostSender::default()).await, @@ -1867,7 +1988,7 @@ mod tests { async fn send_frame( ws: &mut tokio_tungstenite::WebSocketStream, - value: Value, + value: impl serde::Serialize, ) { let bytes = serde_json::to_vec(&value).unwrap(); let mut frame = u32::try_from(bytes.len()).unwrap().to_be_bytes().to_vec(); @@ -1971,7 +2092,8 @@ mod tests { #[tokio::test(flavor = "multi_thread", worker_threads = 2)] async fn progress_backpressure_is_lossless_and_isolated_to_the_call() { - let (_dir, host, app, mut events) = progress_fixture(PROGRESS_ACK_STALL_TIMEOUT); + let (_dir, host, app, mut events) = + progress_fixture(PROGRESS_ACK_STALL_TIMEOUT, SEND_TIMEOUT); let bridge = &host.bridge; let a = TcpListener::bind("127.0.0.1:0").await.unwrap(); let b = TcpListener::bind("127.0.0.1:0").await.unwrap(); @@ -2036,7 +2158,8 @@ mod tests { #[tokio::test(flavor = "multi_thread", worker_threads = 2)] async fn retiring_the_host_wakes_unacked_progress_without_masking_the_error() { - let (_dir, host, app, mut events) = progress_fixture(PROGRESS_ACK_STALL_TIMEOUT); + let (_dir, host, app, mut events) = + progress_fixture(PROGRESS_ACK_STALL_TIMEOUT, SEND_TIMEOUT); let bridge = &host.bridge; let listener = TcpListener::bind("127.0.0.1:0").await.unwrap(); tokio::time::timeout(Duration::from_secs(5), async { @@ -2078,7 +2201,8 @@ mod tests { #[tokio::test(flavor = "multi_thread", worker_threads = 2)] async fn detaching_the_app_or_dropping_the_bridge_wakes_unacked_progress() { for detach_app in [true, false] { - let (_dir, host, app, mut events) = progress_fixture(PROGRESS_ACK_STALL_TIMEOUT); + let (_dir, host, app, mut events) = + progress_fixture(PROGRESS_ACK_STALL_TIMEOUT, SEND_TIMEOUT); let bridge = host.bridge.clone(); let listener = TcpListener::bind("127.0.0.1:0").await.unwrap(); tokio::time::timeout(Duration::from_secs(5), async { @@ -2106,7 +2230,7 @@ mod tests { #[tokio::test(flavor = "multi_thread", worker_threads = 2)] async fn stalled_progress_leaves_the_terminal_host_error_visible() { let stall_timeout = Duration::from_millis(50); - let (_dir, host, _app, mut events) = progress_fixture(stall_timeout); + let (_dir, host, _app, mut events) = progress_fixture(stall_timeout, SEND_TIMEOUT); let bridge = &host.bridge; let listener = TcpListener::bind("127.0.0.1:0").await.unwrap(); tokio::time::timeout(Duration::from_secs(5), async { @@ -2151,8 +2275,98 @@ mod tests { .expect("stalled progress blocked the terminal Host error"); } + #[tokio::test(flavor = "multi_thread", worker_threads = 2)] + async fn room_post_identity_reaches_the_ui_before_confirming_the_mutation() { + let (_dir, host, _app, mut events) = + progress_fixture(PROGRESS_ACK_STALL_TIMEOUT, SEND_TIMEOUT); + let bridge = &host.bridge; + let listener = TcpListener::bind("127.0.0.1:0").await.unwrap(); + tokio::time::timeout(Duration::from_secs(5), async { + let (generation, session, _anchor) = progress_host(bridge, &listener, "root").await; + let namespace = format!("ma_{}", "b".repeat(64)); + bridge.channel.send("test.mutate", json!({ + "rootId":"root","generation":generation,"endpoint":"agent","method":"send", + "progressId":"shared","prepareRoomPost":true, + "input":{"sessionId":format!("{namespace}_{}", "0".repeat(32)),"message":"hello"}, + })).unwrap(); + let (method, mut call) = open_rpc(&listener, session).await; + assert_eq!(method, "send"); + let reference = json!({ + "source":{"stateDomain":"a".repeat(64),"deployment":"00000000-0000-4000-8000-000000000001","revision":1}, + "namespace":["00000000-0000-4000-8000-000000000002"], + "export":"agent","method":"send","operation":"00000000-0000-4000-8000-000000000003", + "fingerprint":"c".repeat(64), + "contract":{"name":"agent","version":1,"transport":"remote","digest":"d".repeat(64)}, + "recovery":"journal_v1", + }); + let prepared = maka_host_runtime::application::transport::Reply::Prepared { + reference: serde_json::from_value(reference.clone()).unwrap(), + }; + send_frame(&mut call, prepared).await; + + let event = events.recv().await.unwrap(); + assert_eq!(event["requiresObserver"], true); + assert_progress(&event, "root", generation, json!({ + "kind":"room_post_prepared", + "messageId":format!("m_{namespace}_d890eb52ae2e14fd98c6e212a7a0f214"), + })); + assert!(tokio::time::timeout(Duration::from_millis(50), call.next()).await.is_err(), + "the Host could commit before the UI installed the message ID"); + ack_progress(bridge, &event, event["sequence"].as_u64().unwrap()); + assert_eq!(read_frame(&mut call).await["kind"], "confirm"); + finish_mutation(&mut call, reference).await; + assert_eq!(events.recv().await.unwrap(), json!({"rootId":"root","reply":{"value":"done"}})); + }).await.unwrap(); + } + + #[tokio::test(flavor = "multi_thread", worker_threads = 2)] + async fn send_timeout_only_reports_not_submitted_before_confirm() { + let (_dir, host, _app, mut events) = + progress_fixture(Duration::from_millis(60), Duration::from_millis(500)); + let bridge = &host.bridge; + let listener = TcpListener::bind("127.0.0.1:0").await.unwrap(); + tokio::time::timeout(Duration::from_secs(5), async { + let (generation, session, _anchor) = progress_host(bridge, &listener, "root").await; + for room in [false, true] { + let start_send = || bridge.channel.send("test.mutate", json!({ + "rootId":"root","generation":generation,"endpoint":"agent","method":"send", + "progressId":"shared","prepareRoomPost":room, + "input":{"sessionId":format!("ma_test_{}", "0".repeat(32)),"message":"Keep this"}, + })).unwrap(); + + start_send(); + let (_, mut call) = open_rpc(&listener, session).await; + let reference = json!({"operation":Uuid::new_v4()}); + if room { + send_frame(&mut call, json!({"kind":"prepared","reference":reference})).await; + assert_eq!(events.recv().await.unwrap()["value"]["kind"], "room_post_prepared"); + // The UI never ACKs this Prepared event. + } + let reply = events.recv().await.unwrap(); + assert!(reply["reply"]["notSubmitted"].is_string(), "{reply}"); + assert!(matches!(call.next().await, None | Some(Err(_))), "pre-confirm timeout sent a frame"); + assert!(bridge.state.lock().await.mutation_progress.is_empty()); + + start_send(); + let (_, mut call) = open_rpc(&listener, session).await; + let reference = json!({"operation":Uuid::new_v4()}); + send_frame(&mut call, json!({"kind":"prepared","reference":reference})).await; + if room { + let event = events.recv().await.unwrap(); + ack_progress(bridge, &event, event["sequence"].as_u64().unwrap()); + } + assert_eq!(read_frame(&mut call).await["kind"], "confirm"); + // No terminal receipt: the Host might already have committed. + let reply = events.recv().await.unwrap(); + assert!(reply["error"].as_str().unwrap().contains("not acknowledged"), "{reply}"); + assert!(bridge.state.lock().await.mutation_progress.is_empty()); + } + }).await.unwrap(); + } + fn progress_fixture( stall_timeout: Duration, + send_timeout: Duration, ) -> ( tempfile::TempDir, HostBridge, @@ -2161,11 +2375,12 @@ mod tests { ) { let dir = tempfile::tempdir().unwrap(); let channel = HostChannel::new(); - let host = HostBridge::attach_with_progress_stall_timeout( + let host = HostBridge::attach_with_timeouts( channel.clone(), dir.path().into(), Handle::current(), stall_timeout, + send_timeout, ) .unwrap(); let bundle = nsh_engine::Bundle::source( diff --git a/products/maka/ios-shell/tests/ios_shell_behaviors.rs b/products/maka/ios-shell/tests/ios_shell_behaviors.rs index 8d84ecc4805..a46a8216c5a 100644 --- a/products/maka/ios-shell/tests/ios_shell_behaviors.rs +++ b/products/maka/ios-shell/tests/ios_shell_behaviors.rs @@ -1282,6 +1282,7 @@ async fn multi_host_tab_shell_isolates_scopes_and_routes_inbox_approval_by_root( "activity": if is_approved { "idle" } else { "waiting" } }] }), + ("root-a" | "root-b", "queue") => json!({"revision":0,"entries":[]}), ("root-a", "pendingInteractions") => json!({ "revision": 1, "entries": [] }), ("root-b", "pendingInteractions") => json!({ "revision": 1, @@ -1514,6 +1515,7 @@ async fn first_load_waits_for_catalogs_and_history_without_hiding_cached_chats() } "observe" => json!({"session":observed,"through":0,"run":null}), "models" => json!({"kind":"ready","choices":[]}), + "queue" => json!({"revision":0,"entries":[]}), "pendingInteractions" => json!({"revision":0,"entries":[]}), _ => json!({}), }; @@ -2104,6 +2106,7 @@ async fn catalog_pagination_keeps_chats_and_pending_on_the_current_snapshot() { return; } "botOutbox" => json!({"isBot":true,"through":2,"readThrough":0,"preview":"New bot preview"}), + "queue" => json!({"revision":0,"entries":[]}), "pendingInteractions" => { let entry = |id| json!({"requestId":id,"kind":"service_approval","toolUseId":"tu"}); let entries = if input["sessionId"] == "s-32" { @@ -2776,7 +2779,7 @@ async fn a_catalog_barely_taller_than_the_viewport_pages_without_dragging() { } #[tokio::test(flavor = "multi_thread", worker_threads = 2)] -async fn chat_streaming_collapsible_tools_inline_approval_and_queue_never_steers() { +async fn chat_streaming_collapsible_tools_and_inline_approval() { use std::sync::atomic::{AtomicBool, AtomicU64, Ordering}; let channel = HostChannel::new(); @@ -2821,7 +2824,6 @@ async fn chat_streaming_collapsible_tools_inline_approval_and_queue_never_steers "run": { "backend": "model", "runId": "run-1", "turnId": "t1", "state": "running" }, "parts": [], "toolSeeds": [] }), - "queue" => json!({"revision":3,"entries":[{"messageId":"q1","kind":"followup","preview":"Authoritative queue entry"}]}), "history" => json!({ "kind": "ready", "through": 5, "before": null, "after": null, "chunks": [ @@ -2833,6 +2835,7 @@ async fn chat_streaming_collapsible_tools_inline_approval_and_queue_never_steers }), "models" => json!({ "kind": "ready", "choices": [{ "selection": { "kind": "model", "modelId": "claude-sonnet", "thinkingLevel": "high" }, "label": "Claude Sonnet · High", "sourceName": "anthropic", "thinkingLevels": ["high"], "defaultThinkingLevel": "high" }] }), "pendingInteractions" if resolved => json!({"revision":2,"entries":[]}), + "queue" => json!({"revision":0,"entries":[]}), "pendingInteractions" => json!({ "revision": 1, "entries": [{ "requestId": "perm-1", "kind": "permissions", "toolUseId": "tu2" }] }), "interaction" => json!({ "requestId": "perm-1", "outcome": null, @@ -2864,19 +2867,7 @@ async fn chat_streaming_collapsible_tools_inline_approval_and_queue_never_steers let (send_tx, mut send_rx) = mpsc::unbounded_channel(); channel.handle("ios.hostMutate", move |mut call| { let data = call.take_data(); - let value = if data["method"] == "editQueue" { - json!(QueueMutationResult::RevisionConflict { - expected: 2, - actual: 3 - }) - } else if data["method"] == "send" { - json!(maka_agent_api::contract::SendResult::Queued { - session_id: "chat-1".into(), - message_id: "queued".into(), - revision: 4, - completion: None, - }) - } else if data["method"] == "respond" { + let value = if data["method"] == "respond" { settled.store(true, Ordering::SeqCst); json!({"kind":"recorded","record":{"outcome": InteractionOutcome::ServiceApprovalDecision { decision: Decision::Deny, committed_at: 1 } @@ -2913,14 +2904,10 @@ async fn chat_streaming_collapsible_tools_inline_approval_and_queue_never_steers app.wait_for("text:/Test OAuth|Verify OAuth/").unwrap(); app.wait_for("text:Run integration test suite").unwrap(); - // Stream live Markdown preview + queued turn over watch subscription. + // Stream live Markdown preview over watch subscription. let (watch_handle, open_watch) = fixture_recv(&mut watch_rx).await; let watch_sub_id = &watch_handle["subscriptionId"]; let generation = &watch_handle["generation"]; - app.send_host_event("ios.subscriptionItem", json!({ - "subscriptionId":watch_sub_id,"rootId":"root-a","generation":1, - "item":{"kind":"queue","queue":{"revision":2,"entries":[{"messageId":"stale","kind":"followup","preview":"Stale queued message"}]}} - })).unwrap(); app.send_host_event("ios.subscriptionItem", json!({ "subscriptionId": watch_sub_id, "rootId": "root-a", @@ -2937,38 +2924,6 @@ async fn chat_streaming_collapsible_tools_inline_approval_and_queue_never_steers // Simulate JS receiving the first item before the subscribe promise runs. open_watch.resolve(watch_handle.clone()); app.wait_for("text:Streaming live verification...").unwrap(); - assert!(!app.screen().matches("text:1 message queued").unwrap()); - - app.send_host_event("ios.subscriptionItem", json!({ - "subscriptionId": watch_sub_id, - "rootId": "root-a", - "generation": generation, - "item": { - "kind": "queue", - "queue": { "revision": 2, "entries": [{ "messageId": "q1", "kind": "followup", "preview": "Add changelog entry" }] } - } - })).unwrap(); - app.wait_for("text:1 message queued").unwrap(); - app.press("text:1 message queued").unwrap(); - app.press("label:Remove queued message").unwrap(); - let retract = send_rx.recv().await.unwrap(); - assert_eq!(retract["method"], "editQueue"); - let retract: QueueMutation = serde_json::from_value(retract["input"].clone()).unwrap(); - assert_eq!(retract.expected_revision, 2); - assert!(matches!(retract.edit, QueueAction::Retract { message_id } if message_id == "q1")); - app.wait_for("text:Authoritative queue entry").unwrap(); - app.press("label:Done").unwrap(); - - // Sending while running MUST use delivery = "queue" (never "steer"). - app.type_text("label:Message composer", "Follow up after tests") - .unwrap(); - app.press("label:Queue message").unwrap(); - let sent = send_rx.recv().await.unwrap(); - assert_eq!(sent["rootId"], "root-a"); - assert_eq!(sent["method"], "send"); - assert_eq!(sent["input"]["delivery"], "queue"); - assert_eq!(sent["input"]["message"], "Follow up after tests"); - app.press("label:Deny").unwrap(); let answered = fixture_recv(&mut send_rx).await; assert_eq!(answered["method"], "respond"); @@ -2980,6 +2935,1250 @@ async fn chat_streaming_collapsible_tools_inline_approval_and_queue_never_steers held_refresh.resolve(json!({"value":{"revision":"2","needsYouCount":0,"before":null,"after":null,"sessions":[]}})); } +struct ComposerDockFixture { + app: Headless, + run: Arc>, + queue: Arc>, + history: Arc>>, + calls: mpsc::UnboundedReceiver<(Value, HostCall)>, + watches: mpsc::UnboundedReceiver, + watch: Value, + history_reads: mpsc::UnboundedReceiver<()>, + hold_queue: Arc, + hold_history: Arc, +} + +const DOCK_RUN_ID: &str = "a91a2b3c-0000-4000-8000-000000000001"; + +fn dock_host(generation: u64) -> Value { + let host = json!({"rootId":"root","hostName":"Host","generation":generation,"endpoints":["agent","settings"]}); + json!({"revision":generation,"hosts":[host],"active":host, + "connections":{"root":{"status":"connected","connection":host}}}) +} + +impl ComposerDockFixture { + async fn start(run: Value, backend: Value, queue: Value) -> Self { + Self::start_with_anchor(run, backend, queue, false).await + } + + async fn start_with_anchor(run: Value, backend: Value, queue: Value, anchor: bool) -> Self { + Self::start_chat(run, backend, queue, anchor, false).await + } + + async fn start_room() -> Self { + Self::start_chat(Value::Null, Value::Null, empty_queue(), false, true).await + } + + async fn start_chat( + run: Value, + backend: Value, + queue: Value, + anchor: bool, + room: bool, + ) -> Self { + let channel = HostChannel::new(); + channel.handle("ios.bootstrap", |call| call.resolve(dock_host(1))); + let run = Arc::new(std::sync::Mutex::new(run)); + let queue = Arc::new(std::sync::Mutex::new(queue)); + let mut answer = quote_history_row(1, "assistant", "An earlier answer"); + answer["finalOutput"] = json!(anchor); + let mut side = side_session("saved", "Saved side question", &backend); + side["branch"]["sessionId"] = json!("chat"); + side["branch"]["position"]["position"] = answer["position"].clone(); + let side_on_watch = side.clone(); + let history = Arc::new(std::sync::Mutex::new(if room { + vec![] + } else { + vec![answer] + })); + let hold_queue = Arc::new(std::sync::atomic::AtomicBool::new(false)); + let hold_queue_read = hold_queue.clone(); + let hold_history = Arc::new(std::sync::atomic::AtomicBool::new(false)); + let hold_tail = hold_history.clone(); + let (run_q, queue_q, history_q) = (run.clone(), queue.clone(), history.clone()); + let (tx, calls) = mpsc::unbounded_channel(); + let query_tx = tx.clone(); + let (history_tx, mut history_reads) = mpsc::unbounded_channel(); + channel.handle("ios.hostQuery", move |mut call| { + let data = call.take_data(); + let session = json!({"id":"chat","kind":if room { "room" } else { "agent" },"title":"Dock Chat","revision":1, + "workspace":{"path":"/work"},"backend":backend,"updatedAt":1,"activity":"working"}); + let value = match data["method"].as_str().unwrap() { + "list" if data["input"]["scope"]["kind"] == "side_questions" => + json!({"revision":"side","sessions":if anchor { vec![side.clone()] } else { vec![] },"needsYouCount":0}), + "list" => json!({"revision":"list","sessions":[session],"needsYouCount":0}), + "observe" if data["input"]["sessionId"] == "saved" => + json!({"session":side,"through":1,"run":null}), + "observe" => json!({"session":session,"through":1,"run":*run_q.lock().unwrap()}), + "history" if hold_tail.swap(false, std::sync::atomic::Ordering::SeqCst) => { + query_tx.send((data, call)).unwrap(); + return; + } + "history" if room => { + let rows = history_q.lock().unwrap(); + let through = rows.last().and_then(|row| row["sequence"].as_u64()).unwrap_or(0); + call.resolve(json!({"value":{"kind":"room","page":{"items":*rows,"through":through, + "before":null,"after":null}}})); + history_tx.send(()).unwrap(); + return; + } + "history" => { + let rows = history_q.lock().unwrap(); + let through = rows.last().unwrap()["position"]["sequence"].clone(); + let before = (rows[0]["position"]["sequence"].as_u64().unwrap() > 1) + .then(|| history_cursor(&rows[0])); + let page = json!({"kind":"ready","through":through, + "chunks":*rows,"before":before,"after":null}); + call.resolve(json!({"value":page})); + history_tx.send(()).unwrap(); + return; + } + "queue" if hold_queue_read.swap(false, std::sync::atomic::Ordering::SeqCst) => { + query_tx.send((data, call)).unwrap(); + return; + } + "queue" => queue_q.lock().unwrap().clone(), + "pendingInteractions" => json!({"revision":1,"entries":[]}), + "models" => json!({"kind":"ready","choices":[]}), + "botOutbox" => json!({"isBot":false}), + "connections" => json!({"kind":"ready","revision":1,"connections":[],"next":null, + "defaultTarget":{"connectionId":"test","modelId":"model"}}), + "queueMessage" | "resolveModel" => { + query_tx.send((data, call)).unwrap(); + return; + } + method => panic!("unexpected query {method}"), + }; + call.resolve(json!({"value":value})); + }); + channel.handle("ios.ackMutationProgress", |call| call.resolve(Value::Null)); + channel.handle("ios.hostMutate", move |mut call| { + let data = call.take_data(); + tx.send((data, call)).unwrap(); + }); + let (watch_tx, mut watches) = mpsc::unbounded_channel(); + let (side_tx, mut side_watch) = mpsc::unbounded_channel(); + channel.handle("ios.subscribe", move |mut call| { + let data = call.take_data(); + let handle = json!({"subscriptionId":data["subscriptionId"],"rootId":"root", + "generation":data["generation"].as_u64().unwrap()+10}); + call.resolve(handle.clone()); + if data["method"] == "watch" { + watch_tx.send(handle).unwrap(); + } else if anchor && data["input"]["scope"]["kind"] == "side_questions" { + side_tx.send((handle, side_on_watch.clone())).unwrap(); + } + }); + channel.handle("ios.unsubscribe", |call| { + call.resolve(json!({"cancelled":true})) + }); + let mut config = engine_config(channel, tokio::runtime::Handle::current()); + config.viewport = Size::new(px(390.), px(844.)); + config.environment = Environment { + os: Os::Ios, + reduce_motion: true, + ..Environment::default() + }; + let mut app = Headless::start(config).unwrap(); + app.wait_for("label:Conversation: Dock Chat").unwrap(); + app.press("label:Conversation: Dock Chat").unwrap(); + if !room { + app.wait_for("text:An earlier answer").unwrap(); + } + let watch = fixture_recv(&mut watches).await; + if anchor { + let (handle, side) = fixture_recv(&mut side_watch).await; + app.send_host_event( + "ios.subscriptionItem", + json!({ + "subscriptionId":handle["subscriptionId"],"rootId":"root", + "generation":handle["generation"], + "item":{"revision":"side","sessions":[side],"needsYouCount":0} + }), + ) + .unwrap(); + } + while history_reads.try_recv().is_ok() {} + Self { + app, + run, + queue, + history, + calls, + watches, + watch, + history_reads, + hold_queue, + hold_history, + } + } + + async fn prepare_room_post(&mut self, message_id: &str) -> HostCall { + let (data, call) = fixture_recv(&mut self.calls).await; + assert_eq!(data["method"], "send"); + assert_eq!(data["input"]["delivery"], "steer"); + assert_eq!(data["prepareRoomPost"], true); + assert!(call.sender().send("ios.mutationProgress", json!({ + "rootId":"root","generation":1,"progressId":data["progressId"], + "deliveryId":1,"sequence":1,"requiresObserver":true,"value":{"kind":"room_post_prepared","messageId":message_id} + })).unwrap()); + assert!(self.app.settle()); + call + } + + fn deliver(&mut self, item: Value) { + self.app + .send_host_event( + "ios.subscriptionItem", + json!({ + "subscriptionId":self.watch["subscriptionId"],"rootId":"root", + "generation":self.watch["generation"],"item":item, + }), + ) + .unwrap(); + } + + fn queue_item(&mut self, queue: Value) { + self.deliver(json!({"kind":"queue","queue":queue})); + } + + fn transcript_changed(&mut self, through: u64, kind: &str) { + self.deliver(json!({"kind":"events","through":through,"events":[ + {"runId":DOCK_RUN_ID,"fact":{"kind":kind}} + ]})); + } + + async fn call(&mut self, method: &str) -> (Value, HostCall) { + let (data, call) = fixture_recv(&mut self.calls).await; + assert_eq!(data["method"], method); + (data["input"].clone(), call) + } +} + +fn dock_model() -> Value { + json!({"kind":"model","connectionId":"test","modelId":"model"}) +} + +fn dock_run() -> Value { + json!({"backend":"model","runId":DOCK_RUN_ID,"turnId":"t1","state":"running"}) +} + +fn empty_queue() -> Value { + json!({"revision":0,"entries":[]}) +} + +fn queued_result(message_id: &str, revision: u64) -> Value { + json!({"value": SendResult::Queued { + session_id:"chat".into(), message_id:message_id.into(), revision, completion:None, + }}) +} + +fn missing_queued(reason: &str) -> Value { + json!({"value":{"kind":"missing","reason":reason}}) +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn chat_native_steer_uses_the_current_run_and_waits_across_queue_drain() { + let mut fx = ComposerDockFixture::start(dock_run(), dock_model(), empty_queue()).await; + fx.app + .type_text("label:Message composer", "Change course") + .unwrap(); + fx.app.press("label:Send message").unwrap(); + let (input, reply) = fx.call("send").await; + let input: Send = serde_json::from_value(input).unwrap(); + assert!(matches!( + input.delivery, + Some(maka_agent_api::contract::SendDelivery::Steer) + )); + assert_eq!( + input.expected_run_id, + Some(serde_json::from_value(json!(DOCK_RUN_ID)).unwrap()) + ); + assert!(input.backend.is_none()); + fx.app.wait_for("text:Sending…").unwrap(); + fx.app.wait_for("text:Change course").unwrap(); + assert_eq!( + fx.app + .screen() + .input_text("label:Message composer") + .unwrap(), + Some("") + ); + + let waiting = "text:Steer · Waiting for next step"; + fx.queue_item(json!({"revision":1,"entries":[ + {"messageId":"m2","kind":"steering","preview":"Change course"}, + {"messageId":"remote","kind":"steering","preview":"Steer from another device"} + ]})); + assert!(fx.app.settle()); + assert_eq!(fx.app.screen().count("text:Change course").unwrap(), 1); + assert!(!fx.app.screen().matches(waiting).unwrap()); + reply.resolve(queued_result("m2", 1)); + fx.app.wait_for("text:Steer from another device").unwrap(); + assert_eq!(fx.app.screen().count("text:Change course").unwrap(), 1); + assert!(!fx.app.screen().matches("text:1 queued").unwrap()); + fx.queue_item(json!({"revision":2,"entries":[]})); + let mut probing = Vec::new(); + for _ in 0..2 { + let (input, reply) = fx.call("queueMessage").await; + assert_eq!(input["expectedRevision"], 2); + probing.push((input["messageId"].as_str().unwrap().to_owned(), reply)); + } + assert!(fx.app.settle()); + assert_eq!(fx.app.screen().count(waiting).unwrap(), 2); + + let mut remote = quote_history_row(3, "user", "Steer from another device"); + remote["messageId"] = json!("remote"); + fx.history + .lock() + .unwrap() + .extend([quote_history_row(2, "user", "Change course"), remote]); + fx.transcript_changed(3, "transcript_changed"); + fx.app + .wait_for_gone(waiting, Duration::from_secs(2)) + .unwrap(); + fx.app + .wait_for("id:chat-transcript >> text:Change course") + .unwrap(); + fx.app + .wait_for("id:chat-transcript >> text:Steer from another device") + .unwrap(); + assert_eq!(fx.app.screen().count("text:Change course").unwrap(), 1); + for (id, reply) in probing { + assert!(id == "m2" || id == "remote"); + reply.resolve(missing_queued("delivered")); + } +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn chat_executor_steer_that_falls_back_to_queue_hands_off_to_its_entry() { + let mut run = dock_run(); + run["backend"] = json!("executor"); + let backend = json!({"kind":"executor","selection":{"executor":"codex"}}); + let mut fx = ComposerDockFixture::start(run, backend.clone(), empty_queue()).await; + fx.app + .type_text("label:Message composer", "Executor follow-up") + .unwrap(); + fx.app.press("label:Send message").unwrap(); + let (input, reply) = fx.call("send").await; + assert_eq!(input["delivery"], "steer"); + assert_eq!(input["expectedRunId"], DOCK_RUN_ID); + assert_eq!(input["backend"], backend); + reply.resolve(queued_result("executor-followup", 1)); + let waiting = "text:Steer · Waiting for next step"; + fx.app.wait_for(waiting).unwrap(); + fx.queue_item(json!({"revision":1,"entries":[ + {"messageId":"executor-followup","kind":"followup","preview":"Executor follow-up"} + ]})); + fx.app.wait_for("text:1 queued").unwrap(); + fx.app + .wait_for_gone(waiting, Duration::from_secs(2)) + .unwrap(); + assert_eq!(fx.app.screen().count("text:Executor follow-up").unwrap(), 1); +} + +fn assert_dock_touch_target(app: &Headless, selector: &str) { + let size = app.screen().layout(selector).unwrap().unwrap().bounds.size; + assert!( + size.width >= px(44.) && size.height >= px(44.), + "{selector}: {size:?}" + ); +} + +fn watch_add_to_queue(app: &mut Headless) -> impl FnOnce(&mut Headless) + use<> { + use nsh_core::{EventKind, EventPayload, MountItem}; + let (menu_tx, mut menus) = mpsc::unbounded_channel(); + app.observe(move |_, batch| { + for item in &batch.items { + if let MountItem::ComponentProps { id, props } = item + && let Some(action) = props.iter().find_map(|(name, value)| { + if name.as_ref() != "items" { + return None; + } + value + .as_ref()? + .as_array()? + .iter() + .find(|item| item["label"] == "Add to queue") + }) + { + menu_tx.send((*id, action["id"].clone())).unwrap(); + } + } + }); + move |app| { + // Headless has no UIKit presentation. Deliver the item that was installed + // on the native long-press menu through UIKit's selection event. + let (menu, action) = menus.try_recv().unwrap(); + app.engine().control().dispatch_event( + menu, + EventKind::NativeEvent, + EventPayload::Native { + name: "select".into(), + data: action, + }, + ); + assert!(app.settle()); + } +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn chat_explicit_queue_can_promote_review_edit_and_retract() { + let mut fx = ComposerDockFixture::start(dock_run(), dock_model(), empty_queue()).await; + let choose_queue = watch_add_to_queue(&mut fx.app); + fx.app + .type_text("label:Message composer", "Handle it later") + .unwrap(); + assert_dock_touch_target(&fx.app, "label:Send message"); + fx.app.long_press("label:Send message").unwrap(); + assert!( + fx.calls.try_recv().is_err(), + "long press also sent the message" + ); + choose_queue(&mut fx.app); + let (input, reply) = fx.call("send").await; + assert_eq!(input["delivery"], "queue"); + assert_eq!(input["expectedRunId"], DOCK_RUN_ID); + assert_eq!(input["backend"], dock_model()); + let queue = json!({"revision":1,"entries":[ + {"messageId":"running","kind":"in_flight","preview":"Running already"}, + {"messageId":"system","kind":"followup","preview":"Completion","origin":{"kind":"session_completion"}}, + {"messageId":"q1","kind":"followup","preview":"Handle it later"}, + {"messageId":"q2","kind":"held","preview":"Other work"} + ]}); + // The watch can beat the receipt, and the post-send query can lag both. + fx.queue_item(queue.clone()); + fx.app.wait_for("text:2 queued").unwrap(); + reply.resolve(queued_result("q1", 1)); + fx.app + .wait_for_gone("text:Sending…", Duration::from_secs(2)) + .unwrap(); + assert_eq!(fx.app.screen().count("text:Handle it later").unwrap(), 1); + assert!(!fx.app.screen().matches("label:Steer now").unwrap()); + + fx.app.press("label:Queued Messages (2)").unwrap(); + assert!(!fx.app.screen().matches("text:Running already").unwrap()); + assert!(!fx.app.screen().matches("text:Completion").unwrap()); + for label in ["Steer now", "Edit queued message", "Remove queued message"] { + assert_dock_touch_target(&fx.app, &format!("label:{label} >> nth=0")); + } + fx.app.press("label:Steer now >> nth=0").unwrap(); + let (input, reply) = fx.call("editQueue").await; + let promote: QueueMutation = serde_json::from_value(input).unwrap(); + assert_eq!(promote.expected_revision, 1); + assert!(matches!(promote.edit, QueueAction::Promote {message_id} if message_id == "q1")); + let snapshot = |revision, text| { + json!({"revision":revision,"entries":[ + {"messageId":"q2","kind":"held","preview":text} + ]}) + }; + *fx.queue.lock().unwrap() = snapshot(2, "Other work"); + reply.resolve(json!({"value": QueueMutationResult::Committed {revision:2}})); + fx.app.wait_for("text:1 queued").unwrap(); + + fx.app.press("label:Edit queued message").unwrap(); + let (read, reply) = fx.call("queueMessage").await; + assert_eq!( + read, + json!({"sessionId":"chat","messageId":"q2","expectedRevision":2}) + ); + let ready = |revision, message| { + json!({"value":{"kind":"ready","revision":revision, + "message":message,"hasAttachments":false,"quotes":[]}}) + }; + reply.resolve(ready(2, "Other work")); + let editor = "id:queue-message-editor"; + fx.app.wait_for(editor).unwrap(); + fx.app.type_text(editor, " plus tests").unwrap(); + let edited = fx + .app + .screen() + .input_text(editor) + .unwrap() + .unwrap() + .to_owned(); + assert!(edited.contains("plus tests")); + fx.app.compose(editor, "未提交").unwrap(); + assert!(!fx.app.screen().enabled("label:Save").unwrap()); + assert!(fx.app.press("label:Save").is_err()); + assert!( + fx.calls.try_recv().is_err(), + "an IME composition committed a partial edit" + ); + fx.app.compose(editor, "").unwrap(); + fx.app.press("label:Save").unwrap(); + let (update, reply) = fx.call("editQueue").await; + assert_eq!( + update, + json!({"sessionId":"chat","expectedRevision":2, + "edit":{"kind":"update","messageId":"q2","message":edited}}) + ); + + *fx.queue.lock().unwrap() = snapshot(3, "Changed elsewhere"); + reply.resolve(json!({"value": QueueMutationResult::RevisionConflict {expected:2,actual:3}})); + fx.app + .wait_for("text:The queue changed. Review the current message before trying again.") + .unwrap(); + fx.app.wait_for("label:Review latest").unwrap(); + assert_eq!( + fx.app.screen().input_text(editor).unwrap(), + Some(edited.as_str()) + ); + assert!(fx.app.screen().matches("label:Copy edit").unwrap()); + fx.app.press("label:Review latest").unwrap(); + let (read, reply) = fx.call("queueMessage").await; + assert_eq!(read["expectedRevision"], 3); + reply.resolve(ready(3, "Changed elsewhere")); + fx.app.wait_for("text:Changed elsewhere").unwrap(); + fx.app.press("label:Keep my edit").unwrap(); + fx.app.press("label:Save").unwrap(); + let (update, reply) = fx.call("editQueue").await; + assert_eq!(update["expectedRevision"], 3); + assert_eq!(update["edit"]["message"], edited); + *fx.queue.lock().unwrap() = snapshot(4, &edited); + reply.resolve(json!({"value": QueueMutationResult::Committed {revision:4}})); + fx.app.wait_for("label:Remove queued message").unwrap(); + + fx.app.press("label:Remove queued message").unwrap(); + let (retract, reply) = fx.call("editQueue").await; + assert_eq!( + retract, + json!({"sessionId":"chat","expectedRevision":4, + "edit":{"kind":"retract","messageId":"q2"}}) + ); + *fx.queue.lock().unwrap() = json!({"revision":5,"entries":[]}); + reply.resolve(json!({"value": QueueMutationResult::Committed {revision:5}})); + fx.app + .wait_for_gone("text:1 queued", Duration::from_secs(2)) + .unwrap(); +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn chat_stopped_send_can_restore_retry_or_dismiss_without_losing_the_next_draft() { + let mut fx = ComposerDockFixture::start(dock_run(), dock_model(), empty_queue()).await; + fx.app.press("role:button[Quote]").unwrap(); + fx.app + .type_text("label:Message composer", "First draft") + .unwrap(); + fx.app.press("label:Send message").unwrap(); + let (input, reply) = fx.call("send").await; + assert_eq!(input["quotes"][0]["text"], "An earlier answer"); + fx.app + .type_text("label:Message composer", "Next draft") + .unwrap(); + fx.app.press("role:button[Quote]").unwrap(); + let stopped = + || json!({"value":{"kind":"rejected","sessionId":"chat","reason":"turn_stopped"}}); + let kept = "text:Stopped before delivery. Your message is kept."; + reply.resolve(stopped()); + fx.app.wait_for(kept).unwrap(); + fx.app.press("label:Edit").unwrap(); + fx.app.wait_for_gone(kept, Duration::from_secs(2)).unwrap(); + assert_eq!( + fx.app + .screen() + .input_text("label:Message composer") + .unwrap(), + Some("Next draft\n\nFirst draft") + ); + fx.app.wait_for("text:1 quote").unwrap(); + + fx.app.press("label:Send message").unwrap(); + let (input, reply) = fx.call("send").await; + assert_eq!(input["quotes"].as_array().unwrap().len(), 1); + reply.resolve(stopped()); + fx.app.wait_for(kept).unwrap(); + *fx.run.lock().unwrap() = Value::Null; + // No run-ended watch item has arrived yet; Retry must resolve the current turn. + fx.app.press("label:Retry").unwrap(); + let (retry, reply) = fx.call("send").await; + assert_eq!(retry["message"], input["message"]); + assert_eq!(retry["quotes"], input["quotes"]); + assert!(retry["expectedRunId"].is_null()); + assert_eq!(retry["backend"], dock_model()); + + reply.reject("Host disconnected before the send reply"); + let unknown = "text:Could not confirm whether the message was sent. Check the conversation or queue before retrying."; + fx.app.wait_for(unknown).unwrap(); + assert!(!fx.app.screen().matches("label:Retry").unwrap()); + fx.app.press("label:Dismiss").unwrap(); + fx.app + .wait_for_gone(unknown, Duration::from_secs(2)) + .unwrap(); + assert!(fx.calls.try_recv().is_err()); +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn chat_queue_fetches_on_connection_and_ignores_older_watch_revisions() { + let queue = |revision, text| { + json!({"revision":revision,"entries":[ + {"messageId":"q","kind":"followup","preview":text} + ]}) + }; + let mut fx = + ComposerDockFixture::start(Value::Null, dock_model(), queue(10, "Initial queue")).await; + fx.app.wait_for("text:Initial queue").unwrap(); + fx.queue_item(queue(12, "Latest queue")); + fx.app.wait_for("text:Latest queue").unwrap(); + fx.queue_item(queue(11, "Stale queue")); + assert!(fx.app.settle()); + assert!(!fx.app.screen().matches("text:Stale queue").unwrap()); + assert!(fx.app.screen().matches("text:Latest queue").unwrap()); + + *fx.queue.lock().unwrap() = queue(2, "New connection queue"); + fx.app + .send_host_event("ios.hostState", dock_host(2)) + .unwrap(); + fx.app.wait_for("text:New connection queue").unwrap(); + fx.queue_item(queue(13, "Old connection queue")); + fx.watch = fixture_recv(&mut fx.watches).await; + fx.queue_item(queue(1, "Stale queue")); + assert!(fx.app.settle()); + assert!( + fx.app + .screen() + .matches("text:New connection queue") + .unwrap() + ); + assert!( + !fx.app + .screen() + .matches("text:Old connection queue") + .unwrap() + ); +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn chat_idle_projection_counts_identical_prompts_once_each_when_history_beats_the_receipt() { + let mut fx = ComposerDockFixture::start(Value::Null, dock_model(), empty_queue()).await; + fx.history + .lock() + .unwrap() + .insert(0, quote_history_row(0, "user", "Repeat prompt")); + fx.transcript_changed(1, "transcript_changed"); + let message = "id:chat-transcript >> text:Repeat prompt"; + fx.app.wait_for(message).unwrap(); + let _ = fixture_recv(&mut fx.history_reads).await; + + fx.app + .type_text("label:Message composer", "Repeat prompt") + .unwrap(); + fx.app.press("label:Send message").unwrap(); + let (input, reply) = fx.call("send").await; + assert_eq!(input["delivery"], "steer"); + assert!(input["expectedRunId"].is_null()); + assert_eq!(fx.app.screen().count(message).unwrap(), 2); + + let mut next = quote_history_row(2, "user", "Repeat prompt"); + next["turnId"] = json!("t2"); + let mut answer = quote_history_row(3, "assistant", "Durable reply"); + answer["turnId"] = json!("t2"); + fx.history.lock().unwrap().extend([next, answer]); + fx.transcript_changed(3, "transcript_changed"); + fixture_recv(&mut fx.history_reads).await; + assert!(fx.app.settle()); + assert_eq!( + fx.app.screen().count(message).unwrap(), + 2, + "history beat the receipt; exactly one optimistic prompt should be visible" + ); + + reply.resolve(queued_result("m2", 1)); + fx.app.wait_for("text:Durable reply").unwrap(); + assert_eq!( + fx.app.screen().count(message).unwrap(), + 2, + "the two distinct prompts must not collapse by text" + ); + assert!( + !fx.app + .screen() + .matches("text:Steer · Waiting for next step") + .unwrap() + ); +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn stopped_steer_recovers_the_snapshot_after_the_queue_revision_changes() { + let mut fx = + ComposerDockFixture::start_with_anchor(dock_run(), dock_model(), empty_queue(), true).await; + fx.app + .wait_for("label:Side questions (1) · Waiting for your response") + .unwrap(); + fx.app + .press("label:Side questions (1) · Waiting for your response") + .unwrap(); + fx.app.wait_for("text:Side Question · Dock Chat").unwrap(); + fx.app.press("label:Bring to Main Draft").unwrap(); + fx.app + .wait_for("label:Remove conversation link: Saved side question") + .unwrap(); + + fx.app.press("role:button[Quote] >> nth=0").unwrap(); + fx.app + .type_text("label:Message composer", "Don't lose this") + .unwrap(); + fx.app.press("label:Send to Main Chat").unwrap(); + let (original, receipt) = fx.call("send").await; + assert_eq!(original["quotes"][0]["text"], "An earlier answer"); + assert_eq!( + original["message"], + "Don't lose this [@Saved side question](maka://session/saved)" + ); + receipt.resolve(queued_result("steering", 1)); + fx.queue_item(json!({"revision":1,"entries":[ + {"messageId":"steering","kind":"steering","preview":"Don't lose this"} + ]})); + let waiting = "text:Steer · Waiting for next step"; + fx.app.wait_for(waiting).unwrap(); + + fx.app.press("label:Stop Run").unwrap(); + let (stop, reply) = fx.call("stop").await; + assert_eq!(stop["runId"], DOCK_RUN_ID); + *fx.run.lock().unwrap() = Value::Null; + reply.resolve(json!({"value":{"kind":"stopped"}})); + fx.queue_item(json!({"revision":2,"entries":[]})); + fx.transcript_changed(2, "ended"); + let (probe, reply) = fx.call("queueMessage").await; + assert_eq!( + probe, + json!({"sessionId":"chat","messageId":"steering","expectedRevision":2}) + ); + *fx.queue.lock().unwrap() = json!({"revision":3,"entries":[]}); + reply.resolve(json!({"value":QueueMutationResult::RevisionConflict {expected:2,actual:3}})); + let (probe, reply) = fx.call("queueMessage").await; + assert_eq!(probe["expectedRevision"], 3); + reply.resolve(missing_queued("cancelled")); + + let kept = "text:Stopped before delivery. Your message is kept."; + fx.app.wait_for(kept).unwrap(); + assert!(!fx.app.screen().matches(waiting).unwrap()); + for label in ["Edit", "Retry", "Dismiss"] { + assert_dock_touch_target(&fx.app, &format!("label:{label}")); + } + fx.app.press("label:Retry").unwrap(); + let (retry, reply) = fx.call("send").await; + assert_eq!(retry["message"], original["message"]); + assert_eq!(retry["quotes"], original["quotes"]); + assert!(retry["expectedRunId"].is_null()); + reply.resolve( + json!({"value":{"kind":"rejected","sessionId":"chat","reason":"model_unavailable"}}), + ); + fx.app + .wait_for("text:The selected model is unavailable. Try again or choose another model.") + .unwrap(); + + fx.app.press("label:Edit").unwrap(); + fx.app + .wait_for("label:Remove quote: An earlier answer") + .unwrap(); + fx.app + .wait_for("label:Remove conversation link: Saved side question") + .unwrap(); + assert_eq!( + fx.app + .screen() + .input_text("label:Message composer") + .unwrap(), + Some("Don't lose this") + ); +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn send_does_not_retarget_when_the_run_ends_during_backend_preflight() { + let mut run = dock_run(); + run["backend"] = json!("executor"); + let mut fx = ComposerDockFixture::start(run, Value::Null, empty_queue()).await; + fx.app + .type_text("label:Message composer", "Only for this turn") + .unwrap(); + fx.app.press("label:Send message").unwrap(); + let (_, default_model) = fx.call("resolveModel").await; + *fx.run.lock().unwrap() = Value::Null; + fx.transcript_changed(2, "ended"); + fx.app + .wait_for_gone("label:Stop Run", Duration::from_secs(2)) + .unwrap(); + default_model.resolve(json!({"value":{"kind":"ready","choice":{"selection":{"connectionId":"test","modelId":"model"}}}})); + + fx.app + .wait_for("text:Stopped before delivery. Your message is kept.") + .unwrap(); + assert!( + fx.calls.try_recv().is_err(), + "send silently started a new turn" + ); + fx.app.press("label:Edit").unwrap(); + assert_eq!( + fx.app + .screen() + .input_text("label:Message composer") + .unwrap(), + Some("Only for this turn") + ); +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn reopened_chat_checks_delivery_when_accepted_sends_are_outside_the_history_page() { + for run in [Value::Null, dock_run()] { + let idle = run.is_null(); + let mut fx = ComposerDockFixture::start(run, dock_model(), empty_queue()).await; + fx.app + .type_text("label:Message composer", "Old submission") + .unwrap(); + fx.app.press("label:Send message").unwrap(); + let (_, receipt) = fx.call("send").await; + receipt.resolve(queued_result("m2", 1)); + fx.app + .wait_until("send acknowledged", Duration::from_secs(2), |screen| { + if idle { + screen + .matches("id:chat-transcript >> text:Old submission") + .unwrap() + } else { + screen + .matches("text:Steer · Waiting for next step") + .unwrap() + } + }) + .unwrap(); + fx.app.press("label:Chats").unwrap(); + + *fx.history.lock().unwrap() = vec![quote_history_row(12, "assistant", "Newer tail")]; + *fx.queue.lock().unwrap() = json!({"revision":2,"entries":[]}); + *fx.run.lock().unwrap() = Value::Null; + fx.app.press("label:Conversation: Dock Chat").unwrap(); + fx.app.wait_for("text:Newer tail").unwrap(); + assert!( + !fx.app + .screen() + .matches("id:chat-transcript >> text:Old submission") + .unwrap() + ); + let (probe, reply) = fx.call("queueMessage").await; + assert_eq!(probe["messageId"], "m2"); + assert_eq!(probe["expectedRevision"], 2); + reply.resolve(missing_queued("delivered")); + fx.app + .wait_for_gone("text:Old submission", Duration::from_secs(2)) + .unwrap(); + } +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn chat_can_queue_from_the_side_question_quote_tray() { + let mut fx = + ComposerDockFixture::start_with_anchor(dock_run(), dock_model(), empty_queue(), true).await; + let choose_queue = watch_add_to_queue(&mut fx.app); + fx.app.press("role:button[Quote] >> nth=0").unwrap(); + fx.app.wait_for("label:Ask Side Question").unwrap(); + fx.app.wait_for("label:Send to Main Chat").unwrap(); + assert!(!fx.app.screen().matches("label:Send message").unwrap()); + fx.app.long_press("label:Send to Main Chat").unwrap(); + assert!(fx.calls.try_recv().is_err()); + choose_queue(&mut fx.app); + let (input, reply) = fx.call("send").await; + assert_eq!(input["delivery"], "queue"); + assert_eq!(input["expectedRunId"], DOCK_RUN_ID); + assert_eq!(input["quotes"][0]["text"], "An earlier answer"); + reply.resolve(queued_result("quote", 1)); +} + +const DOCK_WAITING: &str = "text:Steer · Waiting for next step"; +const DOCK_UNCONFIRMED: &str = "text:Could not confirm whether the message was sent. Check the conversation or queue before retrying."; + +async fn accept_dock_steer(fx: &mut ComposerDockFixture) { + fx.app + .type_text("label:Message composer", "Keep these words") + .unwrap(); + fx.app.press("label:Send message").unwrap(); + let (_, reply) = fx.call("send").await; + reply.resolve(queued_result("m2", 1)); + fx.queue_item(json!({"revision":1,"entries":[ + {"messageId":"m2","kind":"steering","preview":"Keep these words"} + ]})); + fx.app.wait_for(DOCK_WAITING).unwrap(); +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn stopped_steer_with_interrupted_verification_is_recoverable_and_can_be_rechecked() { + let mut fx = ComposerDockFixture::start(dock_run(), dock_model(), empty_queue()).await; + fx.app.press("role:button[Quote] >> nth=0").unwrap(); + accept_dock_steer(&mut fx).await; + fx.app.press("label:Stop Run").unwrap(); + let (_, stop) = fx.call("stop").await; + *fx.run.lock().unwrap() = Value::Null; + stop.resolve(json!({"value":{"kind":"stopped"}})); + let drained = json!({"revision":2,"entries":[]}); + fx.queue_item(drained.clone()); + fx.transcript_changed(2, "ended"); + fx.app + .wait_for_gone("label:Stop Run", Duration::from_secs(2)) + .unwrap(); + let (probe, reply) = fx.call("queueMessage").await; + assert_eq!(probe["expectedRevision"], 2); + reply.reject("Host queueMessage timed out"); + + fx.app.wait_for(DOCK_UNCONFIRMED).unwrap(); + assert!(!fx.app.screen().matches(DOCK_WAITING).unwrap()); + assert!(!fx.app.screen().matches("label:Retry").unwrap()); + assert!( + fx.calls.try_recv().is_err(), + "verification must not retry without a fresh snapshot" + ); + fx.queue_item(drained); + let (rechecked, reply) = fx.call("queueMessage").await; + assert_eq!(rechecked, probe); + reply.resolve(missing_queued("unknown")); + fx.app.press("label:Edit").unwrap(); + fx.app + .wait_for("label:Remove quote: An earlier answer") + .unwrap(); + assert_eq!( + fx.app + .screen() + .input_text("label:Message composer") + .unwrap(), + Some("Keep these words") + ); +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn unconfirmed_local_steer_replaces_its_watch_pill_and_dismisses_both() { + let mut fx = ComposerDockFixture::start(dock_run(), dock_model(), empty_queue()).await; + accept_dock_steer(&mut fx).await; + fx.queue_item(json!({"revision":2,"entries":[]})); + let (probe, reply) = fx.call("queueMessage").await; + assert_eq!(probe["messageId"], "m2"); + reply.resolve(missing_queued("unknown")); + + fx.app.wait_for(DOCK_UNCONFIRMED).unwrap(); + assert_eq!(fx.app.screen().count("text:Keep these words").unwrap(), 1); + assert!(!fx.app.screen().matches(DOCK_WAITING).unwrap()); + fx.app.press("label:Dismiss").unwrap(); + fx.app + .wait_for_gone(DOCK_UNCONFIRMED, Duration::from_secs(2)) + .unwrap(); + assert_eq!(fx.app.screen().count("text:Keep these words").unwrap(), 0); + assert!(!fx.app.screen().matches(DOCK_WAITING).unwrap()); +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn remote_steer_delivery_holds_the_pill_until_the_transcript_can_replace_it() { + let mut fx = ComposerDockFixture::start(dock_run(), dock_model(), empty_queue()).await; + fx.queue_item(json!({"revision":1,"entries":[ + {"messageId":"m2","kind":"steering","preview":"A remote steer"} + ]})); + fx.app.wait_for("text:A remote steer").unwrap(); + fx.queue_item(json!({"revision":2,"entries":[]})); + let (probe, reply) = fx.call("queueMessage").await; + assert_eq!(probe["messageId"], "m2"); + fx.hold_history + .store(true, std::sync::atomic::Ordering::SeqCst); + reply.resolve(missing_queued("delivered")); + let (tail, refresh) = fx.call("history").await; + assert_eq!(tail["position"]["kind"], "tail"); + assert!(fx.app.settle()); + assert_eq!(fx.app.screen().count(DOCK_WAITING).unwrap(), 1); + assert_eq!(fx.app.screen().count("text:A remote steer").unwrap(), 1); + + refresh.resolve(history_page( + 1, + fx.history.lock().unwrap().clone(), + Value::Null, + )); + assert!(fx.app.settle()); + assert_eq!( + fx.app.screen().count(DOCK_WAITING).unwrap(), + 1, + "an unchanged tail is not a handoff" + ); + fx.history + .lock() + .unwrap() + .push(quote_history_row(2, "user", "A remote steer")); + fx.transcript_changed(2, "transcript_changed"); + fx.app + .wait_for("id:chat-transcript >> text:A remote steer") + .unwrap(); + assert_eq!(fx.app.screen().count("text:A remote steer").unwrap(), 1); + assert!(!fx.app.screen().matches(DOCK_WAITING).unwrap()); +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn reopened_chat_keeps_pending_idle_projection_until_the_original_receipt() { + let mut fx = ComposerDockFixture::start(Value::Null, dock_model(), empty_queue()).await; + fx.app + .type_text("label:Message composer", "Pending submission") + .unwrap(); + fx.app.press("label:Send message").unwrap(); + let (_, receipt) = fx.call("send").await; + let prompt = "id:chat-transcript >> text:Pending submission"; + fx.app.wait_for(prompt).unwrap(); + fx.app.press("label:Chats").unwrap(); + fx.app.press("label:Conversation: Dock Chat").unwrap(); + fx.app.wait_for("text:An earlier answer").unwrap(); + fx.app.wait_for(prompt).unwrap(); + fx.watch = fixture_recv(&mut fx.watches).await; + + fx.history + .lock() + .unwrap() + .push(quote_history_row(2, "user", "Pending submission")); + fx.transcript_changed(2, "transcript_changed"); + // The fixture has now served both the reopened tail and the new watch tail. + for _ in 0..2 { + fixture_recv(&mut fx.history_reads).await; + } + assert!(fx.app.settle()); + assert_eq!(fx.app.screen().count(prompt).unwrap(), 1); + + receipt.resolve(queued_result("m2", 1)); + fx.app.wait_for(prompt).unwrap(); + assert!(fx.app.settle()); + assert_eq!(fx.app.screen().count(prompt).unwrap(), 1); +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn room_shows_another_post_while_our_post_is_awaiting_receipt_and_history() { + let mut fx = ComposerDockFixture::start_room().await; + fx.app + .type_text("label:Message composer", "My Room post") + .unwrap(); + fx.app.press("label:Send message").unwrap(); + let receipt = fx.prepare_room_post("mine").await; + let mine = "text:My Room post"; + let other = "text:Another participant posted"; + fx.app.wait_for(mine).unwrap(); + fx.history + .lock() + .unwrap() + .push(room_post(1, "other", "Another participant posted")); + fx.deliver(json!({"kind":"room","through":1,"revision":1})); + fx.app.wait_for(other).unwrap(); + assert_eq!(fx.app.screen().count(mine).unwrap(), 1); + + receipt.resolve(json!({"value":SendResult::Posted{ + session_id:"chat".into(),message_id:"mine".into(),deliveries:vec![], + }})); + for _ in 0..2 { + fixture_recv(&mut fx.history_reads).await; + } + assert!(fx.app.settle()); + assert!(fx.app.screen().matches(other).unwrap()); + assert_eq!( + fx.app.screen().count(mine).unwrap(), + 1, + "an empty Room's first foreign post is not our handoff" + ); + + fx.history + .lock() + .unwrap() + .push(room_post(2, "mine", "My Room post")); + fx.deliver(json!({"kind":"room","through":2,"revision":2})); + fixture_recv(&mut fx.history_reads).await; + assert!(fx.app.settle()); + assert!(fx.app.screen().matches(other).unwrap()); + assert_eq!(fx.app.screen().count(mine).unwrap(), 1); +} + +fn room_post(sequence: u64, id: &str, text: &str) -> Value { + json!({"id":id,"sequence":sequence,"at":1, + "author":{"kind":"human"},"content":{"text":text,"attachments":[]},"mentions":[],"deliveries":[]}) +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn room_hands_off_by_prepared_id_when_mixed_history_beats_the_receipt() { + let mut fx = ComposerDockFixture::start_room().await; + fx.app + .type_text("label:Message composer", "Same words") + .unwrap(); + fx.app.press("label:Send message").unwrap(); + let receipt = fx.prepare_room_post("mine").await; + let shared_text = "text:Same words"; + let other = "text:Another participant posted"; + assert_eq!(fx.app.screen().count(shared_text).unwrap(), 1); + + fx.history.lock().unwrap().extend([ + room_post(1, "other", "Another participant posted"), + room_post(2, "same-text-other", "Same words"), + room_post(3, "mine", "Same words"), + ]); + fx.deliver(json!({"kind":"room","through":3,"revision":3})); + fx.app.wait_for(other).unwrap(); + assert_eq!(fx.app.screen().count(other).unwrap(), 1); + assert_eq!( + fx.app.screen().count(shared_text).unwrap(), + 2, + "equal text from different posts must survive; only our optimistic copy should go" + ); + + receipt.resolve(json!({"value":SendResult::Posted{ + session_id:"chat".into(),message_id:"mine".into(),deliveries:vec![], + }})); + for _ in 0..2 { + fixture_recv(&mut fx.history_reads).await; + } + assert!(fx.app.settle()); + assert_eq!(fx.app.screen().count(other).unwrap(), 1); + assert_eq!(fx.app.screen().count(shared_text).unwrap(), 2); +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn explicit_queue_does_not_withhold_remote_steering_while_waiting_for_receipt() { + let mut fx = ComposerDockFixture::start(dock_run(), dock_model(), empty_queue()).await; + let choose_queue = watch_add_to_queue(&mut fx.app); + fx.app + .type_text("label:Message composer", "Handle it later") + .unwrap(); + choose_queue(&mut fx.app); + let (input, receipt) = fx.call("send").await; + assert_eq!(input["delivery"], "queue"); + fx.queue_item(json!({"revision":1,"entries":[ + {"messageId":"mine","kind":"followup","preview":"Handle it later"}, + {"messageId":"remote","kind":"steering","preview":"Steer from another device"} + ]})); + fx.app.wait_for("text:1 queued").unwrap(); + assert_eq!( + fx.app + .screen() + .count("text:Steer from another device") + .unwrap(), + 1 + ); + receipt.resolve(queued_result("mine", 1)); +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn stopped_steer_recovers_when_the_conflicting_revision_cannot_be_loaded() { + use std::sync::atomic::Ordering::SeqCst; + let mut fx = ComposerDockFixture::start(dock_run(), dock_model(), empty_queue()).await; + accept_dock_steer(&mut fx).await; + fx.app.press("label:Stop Run").unwrap(); + let (_, stop) = fx.call("stop").await; + *fx.run.lock().unwrap() = Value::Null; + stop.resolve(json!({"value":{"kind":"stopped"}})); + fx.app + .wait_for_gone("label:Stop Run", Duration::from_secs(2)) + .unwrap(); + + let drained = json!({"revision":2,"entries":[]}); + let conflict = json!({"value":{"kind":"revision_conflict","expected":2,"actual":3}}); + fx.queue_item(drained.clone()); + let (probe, reply) = fx.call("queueMessage").await; + assert_eq!(probe["expectedRevision"], 2); + fx.hold_queue.store(true, SeqCst); + reply.resolve(conflict.clone()); + fx.call("queue") + .await + .1 + .reject("Host queue query timed out"); + + fx.app.wait_for(DOCK_UNCONFIRMED).unwrap(); + assert!(fx.app.screen().matches("label:Edit").unwrap()); + assert!(fx.app.screen().matches("label:Dismiss").unwrap()); + assert!(!fx.app.screen().matches("label:Retry").unwrap()); + assert!(!fx.app.screen().matches(DOCK_WAITING).unwrap()); + + fx.queue_item(drained.clone()); + let (rechecked, reply) = fx.call("queueMessage").await; + assert_eq!(rechecked, probe); + fx.hold_queue.store(true, SeqCst); + reply.resolve(conflict); + fx.call("queue").await.1.resolve(json!({"value":drained})); + assert!(fx.app.settle()); + assert!( + fx.calls.try_recv().is_err(), + "a stale refresh must not start a retry loop" + ); + + fx.queue_item(drained); + let (rechecked, reply) = fx.call("queueMessage").await; + assert_eq!(rechecked, probe); + reply.resolve(missing_queued("unknown")); + fx.app.press("label:Edit").unwrap(); + assert_eq!( + fx.app + .screen() + .input_text("label:Message composer") + .unwrap(), + Some("Keep these words") + ); +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn a_new_watch_revision_survives_the_old_conflict_refresh_failing() { + let mut fx = ComposerDockFixture::start(dock_run(), dock_model(), empty_queue()).await; + accept_dock_steer(&mut fx).await; + fx.app.press("label:Stop Run").unwrap(); + let (_, stop) = fx.call("stop").await; + *fx.run.lock().unwrap() = Value::Null; + stop.resolve(json!({"value":{"kind":"stopped"}})); + fx.app + .wait_for_gone("label:Stop Run", Duration::from_secs(2)) + .unwrap(); + + fx.queue_item(json!({"revision":2,"entries":[]})); + let (probe, reply) = fx.call("queueMessage").await; + assert_eq!(probe["expectedRevision"], 2); + fx.hold_queue + .store(true, std::sync::atomic::Ordering::SeqCst); + reply.resolve(json!({"value":{"kind":"revision_conflict","expected":2,"actual":3}})); + let (_, refresh) = fx.call("queue").await; + fx.queue_item(json!({"revision":3,"entries":[]})); + assert!(fx.app.settle()); + refresh.reject("Old queue query timed out"); + + let (probe, reply) = fx.call("queueMessage").await; + assert_eq!(probe["expectedRevision"], 3); + assert_eq!(probe["messageId"], "m2"); + reply.resolve(missing_queued("cancelled")); + fx.app.wait_for("label:Retry").unwrap(); + assert!(!fx.app.screen().matches(DOCK_UNCONFIRMED).unwrap()); +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn retry_requires_proof_the_send_was_not_submitted() { + for room in [false, true] { + let mut fx = if room { + ComposerDockFixture::start_room().await + } else { + ComposerDockFixture::start(Value::Null, dock_model(), empty_queue()).await + }; + fx.app + .type_text("label:Message composer", "Keep the draft") + .unwrap(); + fx.app.press("label:Send message").unwrap(); + let (input, reply) = fx.call("send").await; + reply.resolve(json!({"notSubmitted":"Timed out preparing the Host message"})); + fx.app.wait_for("label:Retry").unwrap(); + assert!(!fx.app.screen().matches(DOCK_UNCONFIRMED).unwrap()); + + fx.app.press("label:Retry").unwrap(); + let reply = if room { + fx.prepare_room_post("mine").await + } else { + let (retry, reply) = fx.call("send").await; + assert_eq!(retry, input); + reply + }; + reply.reject("Host mutation result was not acknowledged: timed out"); + fx.app.wait_for(DOCK_UNCONFIRMED).unwrap(); + assert!(fx.app.screen().matches("label:Edit").unwrap()); + assert!(fx.app.screen().matches("label:Dismiss").unwrap()); + assert!(!fx.app.screen().matches("label:Retry").unwrap()); + fx.app.press("label:Edit").unwrap(); + assert_eq!( + fx.app + .screen() + .input_text("label:Message composer") + .unwrap(), + Some("Keep the draft") + ); + } +} + fn workspace_host_state(revision: u64, name: &str) -> Value { let connection = json!({ "rootId": "root-a", "hostName": name, "epoch": "ea", "session": "sa", @@ -3027,6 +4226,7 @@ async fn diff_and_file_quotes_join_the_composer_without_changing_text() { "observe" => json!({ "session": session_q, "lastCompletedTurnId": null, "compacting": null, "through": 1, "run": null, "parts": [], "toolSeeds": [] }), "history" => json!({ "kind": "ready", "through": 1, "before": null, "after": null, "chunks": [] }), "models" => json!({ "kind": "ready", "choices": [] }), + "queue" => json!({"revision":0,"entries":[]}), "pendingInteractions" => json!({ "revision": 1, "entries": [] }), "listFiles" => { files_tx.send(data["input"].clone()).unwrap(); @@ -3177,6 +4377,7 @@ fn quote_chat_fixture_with_work( json!({"kind":"ready","chunks":rows,"through":17,"before":before,"after":null}) } "models" => json!({"kind":"ready","choices":[]}), + "queue" => json!({"revision":0,"entries":[]}), "pendingInteractions" => json!({"entries":[]}), "botOutbox" => json!({"isBot":false}), method => panic!("unexpected query: {method}"), @@ -3374,6 +4575,7 @@ impl ProjectionFixture { "observe" => json!({"session":session,"through":11,"run":null}), "botOutbox" => json!({"isBot":false}), "models" => json!({"kind":"ready","choices":[]}), + "queue" => json!({"revision":0,"entries":[]}), "pendingInteractions" => json!({"entries":[]}), "history" => { let input = data["input"].clone(); @@ -3618,6 +4820,7 @@ async fn expanded_user_headed_work_follows_new_steps_and_ignores_an_old_generati "observe" => json!({"session":session,"through":20+phase,"run":{"turnId":"t1","runId":"work","state":"running"}}), "models" => json!({"kind":"ready","choices":[]}), "botOutbox" => json!({"isBot":false}), + "queue" => json!({"revision":0,"entries":[]}), "pendingInteractions" => json!({"entries":[]}), "history" if data["input"]["view"] == "steps" => { steps_tx.send((data["input"].clone(), call)).unwrap(); @@ -3746,7 +4949,7 @@ async fn expanded_user_headed_work_follows_new_steps_and_ignores_an_old_generati app.scroll("id:chat-transcript", px(-1200.)).unwrap(); app.type_text("label:Message composer", "Follow up") .unwrap(); - app.press("label:Queue message").unwrap(); + app.press("label:Send message").unwrap(); let answer = "text:Working answer 5"; app.wait_until( "sending returned to the latest answer", @@ -3817,6 +5020,7 @@ async fn chat_scroll_completes_previous_turn_and_keeps_the_visible_text_anchored "gitWorkspaceDiff" => json!({"patch":"","truncated":false}), "models" => json!({"kind":"ready","choices":[]}), "botOutbox" => json!({"isBot":false}), + "queue" => json!({"revision":0,"entries":[]}), "pendingInteractions" => json!({"entries":[]}), "history" => { let input = data["input"].clone(); @@ -4200,6 +5404,7 @@ fn side_chat_fixture_with_history( }}), "pendingInteractions" if input["sessionId"] == "saved" => json!({"entries":[{"requestId":"side-request","kind":"service_approval","toolUseId":"tool"}]}), + "queue" => json!({"revision":0,"entries":[]}), "pendingInteractions" => json!({"entries":[]}), "interaction" if input["sessionId"] == "saved" => json!({ "requestId":"side-request","outcome":null,"request":{ @@ -5323,10 +6528,9 @@ async fn chat_quote_draft_sends_ordered_excerpts_without_text_and_renders_histor session_id:"chat".into(), reason:maka_agent_api::contract::SendRejection::ModelUnavailable, skills:None, }})); - app.wait_for("text:Could not send the message.").unwrap(); - app.wait_for("text:2 quotes").unwrap(); - - app.press("label:Send message").unwrap(); + app.wait_for("text:The selected model is unavailable. Try again or choose another model.") + .unwrap(); + app.press("label:Retry").unwrap(); let (retry, call) = sends.try_recv().unwrap(); assert_eq!(retry.quotes, send.quotes); call.resolve(json!({"value":SendResult::Queued { @@ -5461,8 +6665,8 @@ async fn chat_quote_limit_disables_the_seventeenth_quote() { (1..=16).map(|n| format!("Excerpt {n}")).collect::>() ); - // Edits during a pending send belong to the next draft. - app.press("label:Clear all quotes").unwrap(); + // Dispatch consumes the submitted quotes; new quotes belong to the next draft. + assert!(!app.screen().matches("label:Clear all quotes").unwrap()); app.press("role:button[Quote] >> nth=16").unwrap(); app.press("role:button[Quote] >> nth=0").unwrap(); call.resolve(json!({"value":SendResult::Queued { @@ -5498,10 +6702,10 @@ async fn chat_quote_in_flight_survives_reopening_and_consumes_only_the_sent_quot app.type_text("label:Message composer", "Next draft") .unwrap(); app.press("role:button[Quote] >> nth=1").unwrap(); - app.wait_for("text:2 quotes").unwrap(); + app.wait_for("text:1 quote").unwrap(); app.press("label:Chats").unwrap(); app.press("label:Conversation: Quotes Chat").unwrap(); - app.wait_for("text:2 quotes").unwrap(); + app.wait_for("text:1 quote").unwrap(); assert!(!app.screen().enabled("label:Send message").unwrap()); assert!(app.press("label:Send message").is_err()); assert!( @@ -5515,7 +6719,12 @@ async fn chat_quote_in_flight_survives_reopening_and_consumes_only_the_sent_quot }}) }; receipt.resolve(queued("first", 2)); - app.wait_for("text:1 quote").unwrap(); + app.wait_until( + "send ready for the next draft", + Duration::from_secs(2), + |screen| screen.enabled("label:Send message").unwrap(), + ) + .unwrap(); app.wait_for("text:Next draft").unwrap(); assert!(!app.shows("label:Remove quote: First excerpt")); app.press("label:Send message").unwrap(); @@ -5546,8 +6755,12 @@ async fn chat_can_send_the_next_draft_before_history_refresh_returns() { receipt.resolve(json!({"value":SendResult::Queued { session_id:"chat".into(), message_id:"first".into(), revision:2, completion:None, }})); - app.wait_for_gone("label:Remove quote: First excerpt", Duration::from_secs(2)) - .unwrap(); + app.wait_until( + "send ready for the next draft", + Duration::from_secs(2), + |screen| screen.enabled("label:Send message").unwrap(), + ) + .unwrap(); let (history, page) = tokio::time::timeout(Duration::from_secs(2), refreshes.recv()) .await .unwrap() @@ -5674,6 +6887,7 @@ async fn inbox_review_detail_reflects_remote_desktop_resolution_and_disables_dup "revision": 1, "updatedAt": 1700000002000u64, "archived": false, "pinned": false, "hasUnread": false, "activity": "waiting" }] }), + "queue" => json!({"revision":0,"entries":[]}), "pendingInteractions" => json!({ "revision": 1, "entries": [{ "requestId": "req-1", "kind": "service_approval", "toolUseId": "tu-1" }] }), "interaction" => json!({ "requestId": "req-1", @@ -6073,6 +7287,7 @@ async fn host_settings_edit_presets_plugins_mcp_and_skills() { let value = match (data["endpoint"].as_str().unwrap(),data["method"].as_str().unwrap()) { ("agent", "list") => json!({"sessions":[{"id":"project-session","title":"Workspace session","kind":"agent", "workspace":{"path":"/work","name":"Fixture workspace"},"updatedAt":1700000000000u64,"activity":"idle"}]}), + ("agent", "queue") => json!({"revision":0,"entries":[]}), ("agent", "pendingInteractions") => json!({"revision":0,"entries":[]}), ("agent", "botOutbox") => json!({"isBot":false,"through":0,"readThrough":0}), ("agent", "projects") => json!({"kind":"projects","next":null,"projects":[ @@ -6584,6 +7799,7 @@ async fn approval_actions_match_the_scope_shown_and_fail_closed_for_future_grant "list" => json!({"revision":"1","needsYouCount":1,"sessions":[{"id":"s","title":"Review report","kind":"agent", "workspace":{"path":"/fixture","name":"Fixture"},"updatedAt":1700000000000u64,"activity":"waiting"}]}), "botOutbox" => json!({"isBot":false,"through":0,"readThrough":0}), + "queue" => json!({"revision":0,"entries":[]}), "pendingInteractions" => json!({"entries": if settled_q.load(std::sync::atomic::Ordering::SeqCst) {json!([])} else { json!([{"requestId":"request","kind":request["kind"],"toolUseId":request["toolUseId"]}]) }}), @@ -6745,6 +7961,7 @@ async fn room_watch_keeps_the_boundary_and_ignores_pagination_from_an_old_connec "botOutbox" => json!({"isBot":false}), "models" => json!({"kind":"ready","choices":[{"label":"Stale model", "selection":{"kind":"model","connectionId":"conn","modelId":"stale-model"}}]}), + "queue" => json!({"revision":0,"entries":[]}), "pendingInteractions" => json!({"entries":[]}), "history" => { if data["input"]["position"]["kind"] == "before_message" { @@ -6923,6 +8140,7 @@ async fn agent_history_merges_overlapping_byte_ranges_and_coalesces_tail_refresh "observe" => json!({"session":session,"through":2,"run":null}), "botOutbox" => json!({"isBot":false}), "models" => json!({"kind":"ready","choices":[]}), + "queue" => json!({"revision":0,"entries":[]}), "pendingInteractions" => json!({"entries":[]}), "history" if data["input"]["position"]["kind"] == "before" => older.clone(), "history" if tail_requests.fetch_add(1, std::sync::atomic::Ordering::SeqCst) == 0 => initial.clone(), @@ -6983,7 +8201,7 @@ async fn agent_history_merges_overlapping_byte_ranges_and_coalesces_tail_refresh message_id: "queued".into(), kind: QueueKind::Followup, preview: "Queued".into(), origin: None, }] }} })).unwrap(); - app.wait_for("text:1 message queued").unwrap(); + app.wait_for("text:1 queued").unwrap(); let first = tail_rx.try_recv().unwrap(); assert!( tail_rx.try_recv().is_err(), @@ -7060,6 +8278,7 @@ async fn default_model_is_sent_on_create_and_recovers_unbound_conversations() { {"label":"Other Kimi model","selection":{"kind":"model","connectionId":"other","modelId":"other-model"}}, {"label":"Standalone model","selection":{"kind":"model","connectionId":"solo","modelId":"standalone"}} ],"next":null}), + ("agent", "queue") => json!({"revision":0,"entries":[]}), ("agent", "pendingInteractions") => json!({"entries":[]}), ("agent", "observe") => { let (row, saved) = match input["sessionId"].as_str() { @@ -7292,6 +8511,7 @@ async fn reconnect_waits_for_current_backend_and_send_preserves_the_next_draft() Some("history") => { json!({"kind":"ready","chunks":[],"through":1,"before":null,"after":null}) } + Some("queue") => json!({"revision":0,"entries":[]}), Some("pendingInteractions") => json!({"entries":[]}), Some("botOutbox") => json!({"isBot":false}), Some("models") => json!({"kind":"ready","choices":[ @@ -7838,6 +9058,7 @@ async fn model_menus_work_without_permission_to_read_connections() { Some("list") => json!({"sessions":[row]}), Some("observe") => json!({"session":row,"through":0,"run":null}), Some("history") => json!({"kind":"ready","chunks":[],"through":0,"before":null}), + Some("queue") => json!({"revision":0,"entries":[]}), Some("pendingInteractions") => json!({"entries":[]}), Some("botOutbox") => json!({"isBot":false}), Some("projects") => json!({"kind":"projects","projects":[],"next":null}), From 40e0043d5fb00bcf60e4ee5392857d8c6c835c2f Mon Sep 17 00:00:00 2001 From: me2seeks Date: Fri, 27 Nov 2026 22:22:48 +0800 Subject: [PATCH 2/7] feat(ios): float Liquid Glass chat chrome over the transcript Keep the native navigation title, float the context and composer, and let the transcript follow the measured composer and keyboard clearance without changing delivery. Generated-by: Maka --- DESIGN.md | 19 +- .../app/screens/chats/ChatQuotes.tsx | 77 +- .../app/screens/chats/ChatScreen.tsx | 781 +++++++---- .../app/screens/chats/ComposerPendingDock.tsx | 106 +- products/maka/ios-shell/app/theme/tokens.ts | 6 + .../maka/ios-shell/app/ui/ActionButton.tsx | 26 +- .../ios-shell/app/ui/ConnectionProgress.tsx | 51 +- .../maka/ios-shell/app/ui/ScreenHeader.tsx | 12 +- products/maka/ios-shell/locales/de.json | 6 +- products/maka/ios-shell/locales/en.json | 6 +- products/maka/ios-shell/locales/es.json | 6 +- products/maka/ios-shell/locales/fr.json | 6 +- products/maka/ios-shell/locales/it.json | 6 +- products/maka/ios-shell/locales/ja.json | 6 +- products/maka/ios-shell/locales/ko.json | 6 +- products/maka/ios-shell/locales/pt-BR.json | 6 +- products/maka/ios-shell/locales/ru.json | 6 +- products/maka/ios-shell/locales/zh-CN.json | 6 +- products/maka/ios-shell/locales/zh-HK.json | 3 +- products/maka/ios-shell/locales/zh-TW.json | 6 +- .../ios-shell/tests/ios_shell_behaviors.rs | 1207 ++++++++++++++++- third-party/nsh/SOURCE.md | 10 + .../crates/nsh-core/src/core/list_motion.rs | 8 +- .../nsh/crates/nsh-core/src/core/mod.rs | 13 +- .../nsh/crates/nsh-core/src/core/tests.rs | 126 ++ .../nsh/crates/nsh-platform-ios/Cargo.toml | 2 +- .../crates/nsh-platform-ios/src/surface.rs | 341 ++++- 27 files changed, 2433 insertions(+), 421 deletions(-) diff --git a/DESIGN.md b/DESIGN.md index 1bfad942f0d..14623d32598 100644 --- a/DESIGN.md +++ b/DESIGN.md @@ -113,6 +113,9 @@ Inspect UI changes in the native desktop renderer across both light and dark the | Chats, transcript and Pending connection status | Inline text shimmer during dials and online backoff, solid under Reduce Motion; static offline state while waiting for a network. No transition or placeholder over cached chats. | | Conversation and Bot work | Desktop five-stroke mark (4 s) and native text shimmer; static mark and solid text under Reduce Motion | | Approval actions | Approval press at 0.96 scale with a short opacity transition; no scale under Reduce Motion | +| Chat glass chrome | UIKit owns bar, menu and keyboard motion. The context pill does not intercept scroll gestures. Composer, quote and sheet controls change fill without dimming their foregrounds. Jump to Latest scrolls, or jumps under Reduce Motion. | +| Composer and transcript | Composer height, quotes, queue and live content reflow without a second animation. The composer and retained transcript rows follow NSH's keyboard transition when pinned to the tail. Keep the reading position otherwise. | +| Short chat viewport | Context hides; quotes, pending sends, queue and Latest stay reachable in the composer menu. Both sheets scroll above the keyboard and stay within the horizontal safe area. The quote sheet works offline. | Approvals stay in a fixed one-row layout, with short press feedback and the outcome replacing the card’s action row. Pending uses the system segmented control (pill fallback off iOS); settings disclosures use the existing grouped rows and native confirmation dialogs. @@ -122,12 +125,22 @@ Side questions push a chat with the same composer and quote tray. The first acce ### iOS chat: composer delivery dock -The inline dock sits above the composer: a brief delivery status for steer, a -recoverable card on failure, and a single disclosure for the longer-lived queue. +The dock sits inside the measured floating composer: a brief delivery status for +steer, a recoverable card on failure, and a single disclosure for the queue. +On short viewports it opens in a sheet from the composer menu, with one scroll +region for the whole dock. Showing the keyboard keeps an active queue edit in +its current presentation unless the window itself rotates to a short viewport. +Dock cards stay opaque so transcript media cannot lower action contrast. The +composer's Send sits inside the glass field; the compact actions menu and +keyboard toolbar use the same material without pulling focus from the draft. | Change | Motion | Reduced motion | | --- | --- | --- | -| Send and dock action press/hover | Existing opacity feedback (fast); distinct 44pt targets, no hover-only actions | Immediate opacity | +| Send and dock action press/hover | Opaque fill changes; distinct 44pt targets, no hover-only actions. | Immediate feedback | +| Keyboard toolbar press; model and compact menus | Translucent press tint for toolbar buttons; native menu presentation. | Immediate tint; system menu motion | +| Draft wraps | The field grows above Send; the button holds its bottom inset. | Same | +| Reconnecting over the composer glass | Pulse the letters, not the surface behind them. | Static status text | +| Clear or remove a draft quote | The quote strip updates in place; a light tint matches other glass controls on press. | Same | | Sending → steering; queue count or preview changes | No movement for Host updates; keep the row's position | Same | | Steer status arrives or lands | Fast opacity enter/exit; no delayed removal from the transcript handoff | Immediate | | Queue disclosure, inline edit and review | Disclosure uses normal layout animation; editing and review reveal in place | Immediate | diff --git a/products/maka/ios-shell/app/screens/chats/ChatQuotes.tsx b/products/maka/ios-shell/app/screens/chats/ChatQuotes.tsx index 888f591b9f9..1f31f6b21a0 100644 --- a/products/maka/ios-shell/app/screens/chats/ChatQuotes.tsx +++ b/products/maka/ios-shell/app/screens/chats/ChatQuotes.tsx @@ -32,8 +32,8 @@ import { import { showToast } from '../../state/hostPool'; import { QueueSendMenu } from './ComposerPendingDock'; import { hapticSelection } from '../../state/preferences'; -import { type } from '../../theme/tokens'; -import { ActionButton, Icon } from '../../ui'; +import { spacing, type } from '../../theme/tokens'; +import { glassSurfaceStyle, ActionButton, Icon } from '../../ui'; function isQuotable(row: HistoryRow) { return !row.first.sourceCitation && Boolean(trimHostWhitespace(row.text)); @@ -299,10 +299,13 @@ export function DraftQuoteStrip(props: { }) { const chips = computed(() => [...props.quotes, ...props.links]); return ( - + - - + + {props.quotes.length >= quoteLimit ? tr('Quote limit reached ({count})', { count: quoteLimit }) : tr('{count, plural, one {# quote} other {# quotes}}', { @@ -313,22 +316,32 @@ export function DraftQuoteStrip(props: { accessibilityLabel={tr('Clear all quotes')} disabled={props.disabled} onPress={props.onClearQuotes} - class="active:opacity-60 disabled:opacity-45" - style={{ minHeight: 44, minWidth: 44, justifyContent: 'center', alignItems: 'center' }} + hitSlop={{ top: 5, bottom: 5 }} + class="disabled:opacity-45" + activeStyle={{ backgroundColor: token('glass-pressed-bg') }} + style={{ + borderRadius: 17, + minHeight: 34, + minWidth: 44, + paddingHorizontal: 8, + justifyContent: 'center', + alignItems: 'center', + }} > - - {tr('Clear all quotes')} + + {tr('Clear')} - + entry.id}> {(entry) => { const quote = () => { @@ -343,12 +356,14 @@ export function DraftQuoteStrip(props: { - + {(reference) => ( - + {reference().text} @@ -407,15 +427,18 @@ export function DraftQuoteStrip(props: { if ('reference' in item) props.onRemoveQuote(item.id); else props.onRemoveLink(item.id); }} - class="active:opacity-60 disabled:opacity-45" + hitSlop={5} + class="disabled:opacity-45" + activeStyle={{ backgroundColor: token('glass-pressed-bg') }} style={{ - width: 44, - height: 44, + borderRadius: 17, + width: 34, + height: 34, alignItems: 'center', justifyContent: 'center', }} > - + ); @@ -432,7 +455,7 @@ export function DraftQuoteStrip(props: { trigger={ actions().ask()} diff --git a/products/maka/ios-shell/app/screens/chats/ChatScreen.tsx b/products/maka/ios-shell/app/screens/chats/ChatScreen.tsx index 243ea135ced..6afa23221a6 100644 --- a/products/maka/ios-shell/app/screens/chats/ChatScreen.tsx +++ b/products/maka/ios-shell/app/screens/chats/ChatScreen.tsx @@ -20,20 +20,24 @@ import { computed, effect, + keyboardFrame, List, openUrl, + reduceMotion, safeAreaInsets, + Scroll, signal, Text, View, token, + windowSize, type Accessor, type JSX, type InputRef, type ListRef, } from 'nsh'; -import { Button, Input, MenuButton, NavPage, TextView, type MenuButtonItem } from 'nsh/base'; -import { InputAccessoryView, isAvailable } from 'nsh/mobile'; +import { Button, Input, MenuButton, NavPage, Sheet, TextView, type MenuButtonItem } from 'nsh/base'; +import { InputAccessoryView } from 'nsh/mobile'; import { approvalControls, approvalDetail, @@ -98,11 +102,24 @@ import { type SideDraftRequest, } from '../../state/sideQuestions'; import { spacing, type } from '../../theme/tokens'; -import { ActionButton, ApprovalCard, BannerNotice, Icon, ScreenHeader, StatusDot } from '../../ui'; +import { + ActionButton, + ApprovalCard, + BannerNotice, + glassSurfaceStyle, + Icon, + ScreenHeader, + StatusDot, +} from '../../ui'; import { DraftQuoteStrip, HistoryQuotes, MessageBody, ReplyActions } from './ChatQuotes'; import { SideQuestionList } from './ChatSideQuestions'; -import { ComposerPendingDock, QueueSendMenu } from './ComposerPendingDock'; +import { + ComposerPendingDock, + QueueSendMenu, + pendingDockLimits, + type QueueEdit, +} from './ComposerPendingDock'; interface ToolSummaryItem { id: string; @@ -559,7 +576,6 @@ export function ChatScreen( } ), ) { - const insets = safeAreaInsets(); const rootId = props.item.rootId; const sessionId = props.item.session.id; const pending = props.pendingSide; @@ -584,6 +600,11 @@ export function ChatScreen( const atBottom = signal(true); const queueExpanded = signal(false); + const pendingSheetOpen = signal(false); + const openQueue = () => { + queueExpanded.set(true); + pendingSheetOpen.set(true); + }; const followLatest = signal(true); let transcriptRef: ListRef | undefined; let pagingDrag: number | undefined; @@ -636,21 +657,22 @@ export function ChatScreen( send()} - class="active:opacity-70" + activeStyle={{ backgroundColor: token('glass-primary-pressed-bg') }} style={{ - width: 44, - height: 44, - borderRadius: 22, - backgroundColor: canSend() ? token('primary') : token('surface-muted'), + width: 36, + height: 36, + borderRadius: 18, + backgroundColor: canSend() ? token('glass-accent') : token('surface-muted'), alignItems: 'center', justifyContent: 'center', }} > @@ -1142,6 +1164,9 @@ export function ChatScreen( ); + const canBringBack = () => !!props.mainChat && side(); + const bringBackLabel = () => tr('Bring to Main Draft'); + return ( void bringBack(), + }, + ] + : []), { key: 'more', symbol: 'ellipsis.circle', @@ -1175,7 +1212,7 @@ export function ChatScreen( label: tr('Queued Messages ({count})', { count: ctrl.queuedMessages().length, }), - onSelect: () => queueExpanded.set(true), + onSelect: openQueue, }, ] : []), @@ -1189,6 +1226,7 @@ export function ChatScreen( }} header={ + + + } > - - {/* The native nav bar fits its own title between the actual UIKit items. */} - + + ); + + function ChatContent() { + // The page scope includes a transparent UIKit bar, but not the in-flow fallback header. + const insets = safeAreaInsets(); + const composerLayout = signal<{ compact: boolean; height: number } | undefined>(undefined); + const contextHeight = signal(26); + const contextGap = 6; + const transcriptGap = 16; + const keyboardHeight = () => keyboardFrame().height; + // The keyboard frame already covers the home indicator; the page's safe area doesn't change. + const bottomInset = () => keyboardHeight() || insets().bottom; + + const pageHeight = signal(windowSize().height); + const left = () => Math.max(spacing.pageX, insets().left); + const right = () => Math.max(spacing.pageX, insets().right); + const hasReferences = () => !ctrl.isRoom() && !!(quotes().length || links().length); + const queueEditor = signal(null); + const queueCount = () => ctrl.queuedMessages().length; + const hasQueueDock = () => !!(queueCount() || queueEditor() || ctrl.queueError()); + const hasDeliveryDock = () => !!(ctrl.pendingSends().length || ctrl.steeringMessages().length); + const hasPendingDock = () => !sideDraft && (hasQueueDock() || hasDeliveryDock()); + const pendingDockLabel = () => + queueCount() ? tr('Queued Messages ({count})', { count: queueCount() }) : tr('Pending'); + const showLatest = () => !atBottom() && hasLivePreview(); + const jumpToLatest = () => scrollToBottom(!reduceMotion()); + const quoteSheetOpen = signal(false); + + // Leave room for the input at full height, context and at least two lines of transcript. + // On short pages the secondary controls move into a menu, not on top of the reader. + const compact = computed( + () => + pageHeight() - insets().top - bottomInset() < + 228 + + (hasReferences() ? (canAskFromTray() ? 152 : 104) : 0) + + // Reserve the expanded dock too, so opening it cannot change the mode. + (hasQueueDock() && !sideDraft ? pendingDockLimits.queue : 0) + + (hasDeliveryDock() && !sideDraft ? pendingDockLimits.delivery : 0) + + (hasLivePreview() ? 44 : 0), + ); + const inlineDock = () => !pendingSheetOpen() && (!compact() || !!queueEditor()); + effect(() => { + // A keyboard-only resize must not reparent the focused editor. + // An actual rotation to a short page may move it to the sheet. + if (queueEditor() && pageHeight() < 400) pendingSheetOpen.set(true); + }); + const bottomGap = () => (compact() ? 6 : 8); + const composerMinHeight = 48; + const composerHeight = () => { + const measured = composerLayout(); + if (measured?.compact === compact()) return measured.height; + return compact() ? composerMinHeight + bottomGap() : 92; + }; + // List keeps a gap even before its empty footer slot. Reuse that space on short pages. + const tailGap = () => + compact() && !hasLivePreview() && !inlineInteractions().length ? 4 - transcriptGap : 8; + const compactItems = (): MenuButtonItem[] => [ + ...(hasReferences() ? [{ id: 'quotes', label: tr('Quote'), icon: 'quote.bubble' }] : []), + ...(hasPendingDock() && !inlineDock() + ? [{ id: 'pending', label: pendingDockLabel(), icon: 'tray' }] + : []), + ...(showLatest() + ? [{ id: 'latest', label: tr('Scroll to latest'), icon: 'arrow.down' }] + : []), + ]; + const quoteStrip = () => ( + + sideDraft ? sideDraft.quotes.set([]) : clearDraftQuotes(rootId, sessionId) + } + onRemoveQuote={(id) => + sideDraft + ? sideDraft.quotes.update((items) => items.filter((item) => item.id !== id)) + : removeDraftQuote(rootId, sessionId, id) + } + onRemoveLink={(id) => removeDraftLink(rootId, sessionId, id)} + mainActions={ + hostOnline() && canAskFromTray() + ? { + ask: () => { + quoteSheetOpen.set(false); + askSide(traySource); + }, + send: () => { + quoteSheetOpen.set(false); + send(); + }, + canSend: canSend(), + queue: canQueue() + ? () => { + quoteSheetOpen.set(false); + send('queue'); + } + : undefined, + } + : undefined + } + /> + ); + + const pendingDock = (inSheet: boolean) => ( + { + pendingSheetOpen.set(false); + inputRef?.focus(); + }} + /> + ); + + function ComposerSheet(props: { + title: string; + scrollId: string; + onClose: () => void; + editing?: boolean; + children: JSX.Element; + }) { + return ( + { + if (!open) props.onClose(); + }} + popupStyle={{ backgroundColor: token('grouped-bg'), - flexDirection: 'row', - justifyContent: isAvailable ? 'center' : 'flex-start', - alignItems: 'center', - gap: 6, + paddingTop: 8, + paddingBottom: 8, + paddingLeft: left(), + paddingRight: right(), + // Sheet clears the keyboard inset for its children. Bound the + // scrolling viewport using the owning page's keyboard frame. + bottom: keyboardHeight() || undefined, + maxHeight: Math.max(0, windowSize().height - insets().top - bottomInset()), }} > - - + + + + + - {subtitleLine()} - - - - - - void bringBack()} - /> - - + {props.children} + + + ); + } + return ( + pageHeight.set(bounds.size.height)} + style={{ flex: 1, backgroundColor: token('canvas') }} + > (transcriptRef = ref)} testID="chat-transcript" @@ -1312,10 +1500,12 @@ export function ChatScreen( pagingDrag = undefined; }} contentStyle={{ - paddingHorizontal: spacing.pageX, - paddingTop: 12, - paddingBottom: 24, - gap: 16, + paddingLeft: left(), + paddingRight: right(), + // Keep the start gutter stable when the pill hides so reading position doesn't move. + paddingTop: insets().top + contextHeight() + contextGap * 2, + paddingBottom: composerHeight() + bottomInset() + tailGap(), + gap: transcriptGap, }} empty={ - {/* Subtle Floating Jump-to-Latest Pill when user scrolled up */} - - - - scrollToBottom(true)} - class="active:opacity-75" + + + contextHeight.set(Math.ceil(bounds.size.height))} + style={{ + ...glassSurfaceStyle(spacing.pillRadius), + maxWidth: '100%', + paddingHorizontal: 10, + paddingVertical: 3, + flexDirection: 'row', + alignItems: 'center', + gap: 6, + pointerEvents: 'none', + }} + > + + - - - {tr('Latest')} - - + {subtitleLine()} + - - - - - inputRef?.focus()} - /> + - {/* Bottom Composer or Offline Notice */} + composerLayout.set({ compact: compact(), height: Math.ceil(bounds.size.height) }) + } style={{ - paddingHorizontal: spacing.pageX, - paddingTop: 8, - paddingBottom: Math.max(insets().bottom, 12) + 4, - backgroundColor: token('canvas'), - borderTopWidth: spacing.hairline, - borderTopColor: token('separator'), + position: 'absolute', + left: 0, + right: 0, + bottom: 0, + marginBottom: keyboardHeight() > 0 ? 'env(keyboard-inset-height)' : insets().bottom, + paddingLeft: left(), + paddingRight: right(), + paddingBottom: bottomGap(), + pointerEvents: 'box-none', }} > - - - sideDraft ? sideDraft.quotes.set([]) : clearDraftQuotes(rootId, sessionId) - } - onRemoveQuote={(id) => - sideDraft - ? sideDraft.quotes.update((items) => items.filter((item) => item.id !== id)) - : removeDraftQuote(rootId, sessionId, id) - } - onRemoveLink={(id) => removeDraftLink(rootId, sessionId, id)} - mainActions={ - canAskFromTray() - ? { - ask: () => askSide(traySource), - send, - canSend: canSend(), - queue: canQueue() ? () => send('queue') : undefined, - } - : undefined - } - /> - - - - - - {tr('{name} is offline', { name: hostName() })} - - - void connectSavedHost(rootId)} - /> - - } - > - {(progress) => ( - - - - )} - - } - > + - + + + + {pendingDock(false)} + {quoteStrip()} + + + { + if (id === 'latest') jumpToLatest(); + else if (id === 'quotes') quoteSheetOpen.set(true); + else if (id === 'pending') openQueue(); + }} + activeStyle={{ backgroundColor: token('glass-pressed-bg') }} style={{ - flex: 1, - minHeight: 42, - maxHeight: 132, - paddingHorizontal: 14, - paddingVertical: 6, - borderRadius: 21, - borderCurve: 'continuous', - backgroundColor: sideDraft ? token('inline-card') : token('surface'), - borderWidth: sideDraft ? 1 : 0, - borderColor: token('border'), + ...glassSurfaceStyle(22), + width: 44, + height: 44, + alignItems: 'center', justifyContent: 'center', }} > - (inputRef = r)} - multiline - accessibilityLabel={tr('Message composer')} - value={composerText()} - placeholder={ - sideDraft - ? tr('Your question') - : isRunning() - ? tr('Steer or message Maka…') - : tr('Message Maka…') + + + + + + + + {tr('{name} is offline', { name: hostName() })} + + + void connectSavedHost(rootId)} + /> + } - disabled={sideDraft?.busy()} - ios={sideDraft ? undefined : { inputAccessoryViewID: accessoryId }} - onChange={({ value }) => editComposer(value)} - style={{ - ...type.body, - color: token('foreground'), - placeholderColor: token('muted-foreground'), - backgroundColor: 'transparent', - maxHeight: 116, - }} - /> - - - + > + {(progress) => ( + + + + )} + + } + > + void ctrl.stopRun()} - class="active:opacity-70" + testID="chat-composer-input" + accessible={false} + onPress={!sideDraft?.busy() ? () => inputRef?.focus() : undefined} style={{ - width: 40, - height: 40, - borderRadius: 20, - backgroundColor: token('destructive-tint'), - alignItems: 'center', - justifyContent: 'center', + ...glassSurfaceStyle(24), + ...(sideDraft && { borderColor: token('primary'), borderWidth: 1 }), + flex: 1, + minWidth: 0, + minHeight: composerMinHeight, + maxHeight: compact() ? composerMinHeight : 132, + paddingLeft: 16, + paddingRight: 6, + paddingVertical: 5, + flexDirection: 'row', + alignItems: 'flex-end', + gap: 5, }} > - + (inputRef = r)} + multiline + accessibilityLabel={tr('Message composer')} + value={composerText()} + placeholder={ + sideDraft + ? tr('Your question') + : isRunning() && !compact() + ? tr('Steer or message…') + : tr('Message…') + } + disabled={sideDraft?.busy()} + ios={sideDraft ? undefined : { inputAccessoryViewID: accessoryId }} + onChange={({ value }) => editComposer(value)} + style={{ + ...type.body, + color: token('glass-foreground'), + placeholderColor: token('glass-muted'), + backgroundColor: 'transparent', + flex: 1, + minWidth: 0, + alignSelf: 'center', + maxHeight: compact() ? 30 : 116, + }} + /> + + send('queue') : undefined} + disabled={!canSend()} + /> + - - - send('queue') : undefined} - disabled={!canSend()} - /> - - - + + void ctrl.stopRun()} + activeStyle={{ backgroundColor: token('glass-action-bg') }} + style={{ + width: 44, + height: 44, + borderRadius: 22, + backgroundColor: token('surface-elevated'), + alignItems: 'center', + justifyContent: 'center', + }} + > + + + + + + - {/* iOS Keyboard InputAccessoryView: Model pill + Quote Diff + Hide Keyboard */} - + @@ -1684,61 +1925,70 @@ export function ChatScreen( else={} > handleSelectModel(id)} + // The native menu button covers its host, not the inset glass. + style={{ flexShrink: 1, paddingVertical: 4 }} > - + {currentModelLabel()} - + - + { inputRef?.blur(); openFiles(); }} + activeStyle={{ backgroundColor: token('glass-pressed-bg') }} style={{ - minHeight: 32, + ...glassSurfaceStyle(18), + minWidth: 44, + minHeight: 36, paddingHorizontal: 10, - borderRadius: 16, - backgroundColor: token('grouped-bg'), flexDirection: 'row', alignItems: 'center', gap: 5, }} > - - + + {tr('Changes')} @@ -1746,16 +1996,18 @@ export function ChatScreen( inputRef?.blur()} + activeStyle={{ backgroundColor: token('glass-pressed-bg') }} style={{ - width: 34, - height: 32, - borderRadius: 16, + ...glassSurfaceStyle(18), + width: 36, + height: 36, alignItems: 'center', justifyContent: 'center', }} > - + @@ -1776,7 +2028,28 @@ export function ChatScreen( onOpen={sideDraft ? undefined : openSide} /> + + + quoteSheetOpen.set(false)} + > + {quoteStrip()} + + + + + pendingSheetOpen.set(false)} + > + {pendingDock(true)} + + - - ); + ); + } } diff --git a/products/maka/ios-shell/app/screens/chats/ComposerPendingDock.tsx b/products/maka/ios-shell/app/screens/chats/ComposerPendingDock.tsx index 0fe7aaec23c..401fc99e4ba 100644 --- a/products/maka/ios-shell/app/screens/chats/ComposerPendingDock.tsx +++ b/products/maka/ios-shell/app/screens/chats/ComposerPendingDock.tsx @@ -29,6 +29,7 @@ import { token, View, type JSX, + type ViewStyle, } from 'nsh'; import { Button, ContextMenu, Input } from 'nsh/base'; import { tr } from '../../locale'; @@ -40,14 +41,27 @@ import { import { showToast } from '../../state/hostPool'; import { hapticSelection } from '../../state/preferences'; import { motion, spacing, type } from '../../theme/tokens'; -import { glassSurfaceStyle, Icon } from '../../ui'; +import { Icon } from '../../ui'; type Controller = ReturnType; type QueuedMessage = NonNullable>>; -type Editing = { messageId: string; base: QueuedMessage; text: string; latest?: QueuedMessage }; +export type QueueEdit = { + messageId: string; + base: QueuedMessage; + text: string; + latest?: QueuedMessage; +}; +export const pendingDockLimits = { delivery: 152, queue: 220 } as const; const actions = { flexDirection: 'row', flexWrap: 'wrap', gap: 4 } as const; const preview = { ...type.footnote, numberOfLines: 1, textOverflow: 'ellipsis' } as const; +const dockSurface = () => ({ + backgroundColor: token('surface-elevated'), + borderColor: token('glass-border'), + borderWidth: spacing.hairline, + borderRadius: 18, + borderCurve: 'continuous' as const, +}); function DockAction(props: { label: string; @@ -61,10 +75,12 @@ function DockAction(props: { accessibilityLabel={props.accessibilityLabel ?? props.label} disabled={props.disabled} onPress={props.onPress} - class="active:opacity-60 disabled:opacity-40" + class="disabled:opacity-40" + activeStyle={{ backgroundColor: token('glass-action-bg') }} style={{ minHeight: 44, minWidth: 44, + borderRadius: spacing.controlRadius, paddingHorizontal: 8, justifyContent: 'center', alignItems: 'center', @@ -73,7 +89,7 @@ function DockAction(props: { {props.label} @@ -109,7 +125,7 @@ function SteeringPill(props: { text: string; sending?: boolean; queued?: boolean return ( + {props.children} + + } + > + {props.children} + + ); +} + export function ComposerPendingDock(props: { ctrl: Controller; + editor: ReturnType>; + inSheet: boolean; expanded: boolean; onExpandedChange: (expanded: boolean) => void; running: boolean; @@ -154,7 +198,7 @@ export function ComposerPendingDock(props: { focusComposer: () => void; }) { const ctrl = props.ctrl; - const editing = signal(null); + const editing = props.editor; const composing = signal(false); const editorNotice = () => { const edit = editing(); @@ -166,7 +210,7 @@ export function ComposerPendingDock(props: { const rowPresent = (id: string) => ctrl.queuedMessages().some((row) => row.messageId === id); const sameVersion = (message: QueuedMessage) => message.generation === props.generation && message.revision === ctrl.queue()?.revision; - const stale = (edit: Editing) => !sameVersion(edit.base) || !rowPresent(edit.messageId); + const stale = (edit: QueueEdit) => !sameVersion(edit.base) || !rowPresent(edit.messageId); const startEdit = async (messageId: string) => { const base = await ctrl.readQueuedMessage(messageId); if (base) editing.set({ messageId, base, text: base.message }); @@ -234,12 +278,15 @@ export function ComposerPendingDock(props: { ctrl.queueError() } > - + - send.id}> {(send) => { @@ -261,7 +308,7 @@ export function ComposerPendingDock(props: { {(failed) => ( @@ -312,11 +361,17 @@ export function ComposerPendingDock(props: { entry.messageId}> {(entry) => } - + - + - + {tr('{count} queued', { count: ctrl.queuedMessages().length })} @@ -342,20 +397,24 @@ export function ComposerPendingDock(props: { {props.expanded ? '' : ctrl.queuedMessages()[0]?.preview} - + - {(detail) => ( {detail()} @@ -405,6 +464,7 @@ export function ComposerPendingDock(props: { - + diff --git a/products/maka/ios-shell/app/theme/tokens.ts b/products/maka/ios-shell/app/theme/tokens.ts index 8966e96c448..558078a1d98 100644 --- a/products/maka/ios-shell/app/theme/tokens.ts +++ b/products/maka/ios-shell/app/theme/tokens.ts @@ -29,6 +29,7 @@ const light = { card: '#FFFFFF', 'surface-elevated': '#FFFFFF', 'glass-bg': 'rgba(255, 255, 255, 0.68)', + 'glass-pressed-bg': 'rgba(221, 221, 229, 0.82)', 'glass-border': 'rgba(0, 0, 0, 0.08)', 'glass-shadow': 'rgba(0, 0, 0, 0.09)', 'surface-muted': '#E5E5EA', @@ -42,6 +43,8 @@ const light = { 'glass-foreground': '#171719', 'glass-muted': '#4F4F57', 'glass-accent': '#0059B8', + 'glass-primary-pressed-bg': '#004B9C', + 'glass-destructive': '#9C3040', 'glass-action-bg': '#E0ECFA', 'glass-action-pressed-bg': '#C9DCF3', primary: '#007AFF', @@ -92,6 +95,7 @@ export function installTheme() { card: '#1C1C1E', 'surface-elevated': '#2C2C2E', 'glass-bg': 'rgba(36, 36, 38, 0.66)', + 'glass-pressed-bg': 'rgba(54, 54, 59, 0.86)', 'glass-border': 'rgba(255, 255, 255, 0.12)', 'glass-shadow': 'rgba(0, 0, 0, 0.42)', 'surface-muted': '#2C2C2E', @@ -105,6 +109,8 @@ export function installTheme() { 'glass-foreground': '#FAFAFC', 'glass-muted': '#C8C8D0', 'glass-accent': '#8DC8FF', + 'glass-primary-pressed-bg': '#70B3F4', + 'glass-destructive': '#E99A9B', 'glass-action-bg': '#273B51', 'glass-action-pressed-bg': '#354C65', primary: '#0A84FF', diff --git a/products/maka/ios-shell/app/ui/ActionButton.tsx b/products/maka/ios-shell/app/ui/ActionButton.tsx index 85cfecc25ea..3cc28f4fcd4 100644 --- a/products/maka/ios-shell/app/ui/ActionButton.tsx +++ b/products/maka/ios-shell/app/ui/ActionButton.tsx @@ -22,7 +22,14 @@ import { Button } from 'nsh/base'; import { spacing, type } from '../theme/tokens'; import { Icon, type IconName } from './Icon'; -export type ButtonVariant = 'primary' | 'secondary' | 'quiet' | 'destructive' | 'destructiveFilled'; +export type ButtonVariant = + | 'primary' + | 'secondary' + | 'glassSecondary' + | 'glassQuiet' + | 'quiet' + | 'destructive' + | 'destructiveFilled'; export function ActionButton(props: { title: string; @@ -37,6 +44,7 @@ export function ActionButton(props: { }) { const variant = () => props.variant ?? 'primary'; const compact = () => !!props.compact; + const glass = () => variant() === 'glassSecondary' || variant() === 'glassQuiet'; const backgroundColor = () => { switch (variant()) { @@ -44,6 +52,10 @@ export function ActionButton(props: { return token('primary'); case 'secondary': return token('primary-tint'); + case 'glassSecondary': + return token('glass-action-bg'); + case 'glassQuiet': + return token('surface-elevated'); case 'destructive': return token('destructive-tint'); case 'destructiveFilled': @@ -61,6 +73,9 @@ export function ActionButton(props: { case 'secondary': case 'quiet': return token('primary'); + case 'glassSecondary': + case 'glassQuiet': + return token('glass-accent'); case 'destructive': return token('destructive'); } @@ -72,7 +87,12 @@ export function ActionButton(props: { accessibilityLabel={props.accessibilityLabel ?? props.title} disabled={props.disabled} onPress={props.onPress} - class="active:opacity-70 transition-opacity duration-150 disabled:opacity-45" + class={ + glass() + ? 'disabled:opacity-45' + : 'active:opacity-70 transition-opacity duration-150 disabled:opacity-45' + } + activeStyle={glass() ? { backgroundColor: token('glass-action-pressed-bg') } : undefined} style={{ minHeight: props.minHeight ?? (compact() ? 40 : spacing.buttonMinHeight), paddingHorizontal: compact() ? 14 : 18, @@ -92,7 +112,7 @@ export function ActionButton(props: { (props.kind === 'reconnecting' ? tr('Reconnecting…') : tr('Connecting…')); return ( - + + } + > + + + ); +} + +function GlassConnectionProgress(props: { text: string }) { + const opacity = createAnimatedValue(1); + effect(() => { + if (reduceMotion()) return; + void opacity.keyframes([1, 0.84, 1], { + duration: motion.skeletonPulse, + easing: 'easeInOut', + iterations: 'infinite', + }); + cleanup(() => opacity.stop()); + }); + return ( + + {props.text} + ); } diff --git a/products/maka/ios-shell/app/ui/ScreenHeader.tsx b/products/maka/ios-shell/app/ui/ScreenHeader.tsx index c1e6fd2e491..13f85113807 100644 --- a/products/maka/ios-shell/app/ui/ScreenHeader.tsx +++ b/products/maka/ios-shell/app/ui/ScreenHeader.tsx @@ -17,7 +17,7 @@ * under the License. */ -import { Text, View, token, type JSX } from 'nsh'; +import { safeAreaInsets, Text, View, token, type JSX } from 'nsh'; import { tr } from '../locale'; import { spacing, type } from '../theme/tokens'; import { Icon } from './Icon'; @@ -33,14 +33,17 @@ export function ScreenHeader(props: { onBack?: () => void; trailing?: JSX.Element; large?: boolean; + compact?: boolean; }) { + const insets = safeAreaInsets(); return ( diff --git a/products/maka/ios-shell/locales/de.json b/products/maka/ios-shell/locales/de.json index 5984258c5e3..4aee1bd9e33 100644 --- a/products/maka/ios-shell/locales/de.json +++ b/products/maka/ios-shell/locales/de.json @@ -71,6 +71,7 @@ "Chats": "Chats", "Check connection": "Verbindung prüfen", "Checking pairing invite…": "Kopplungseinladung wird geprüft…", + "Clear": "Leeren", "Clear all quotes": "Alle Zitate entfernen", "Clear search": "Suche leeren", "Client instance": "Client-Instanz", @@ -80,6 +81,7 @@ "Command": "Befehl", "Compaction prompt": "Komprimierungs-Prompt", "Compaction threshold": "Komprimierungsschwelle", + "Composer actions": "Aktionen für die Nachrichteneingabe", "Composition": "Komposition", "Computer": "Computer", "Computer Settings": "Computereinstellungen", @@ -257,10 +259,10 @@ "Max output tokens": "Maximale Ausgabetokens", "Maximum": "Maximal", "Medium": "Mittel", - "Message Maka…": "Nachricht an Maka…", "Message composer": "Nachrichteneingabe", "Message predictions": "Nachrichtenvorhersagen", "Message was not sent because the previous run is unsettled. Your message is kept.": "Die Nachricht wurde nicht gesendet, da der vorherige Lauf noch nicht abgeschlossen ist. Ihre Nachricht bleibt erhalten.", + "Message…": "Nachricht…", "Minimal": "Minimal", "Model": "Modell", "Models": "Modelle", @@ -448,7 +450,7 @@ "Start a conversation on any connected computer and it will appear here automatically.": "Starte eine Unterhaltung auf einem verbundenen Computer, damit sie automatisch hier erscheint.", "Status": "Status", "Steer now": "Jetzt lenken", - "Steer or message Maka…": "Lauf lenken oder Maka schreiben …", + "Steer or message…": "Lenken / schreiben…", "Steer · Waiting for next step": "Lenken · Wartet auf nächsten Schritt", "Stop Run": "Lauf stoppen", "Stopped before delivery. Your message is kept.": "Vor Zustellung gestoppt. Ihre Nachricht bleibt erhalten.", diff --git a/products/maka/ios-shell/locales/en.json b/products/maka/ios-shell/locales/en.json index c0ab1b909c0..d49c9ca38bf 100644 --- a/products/maka/ios-shell/locales/en.json +++ b/products/maka/ios-shell/locales/en.json @@ -71,6 +71,7 @@ "Chats": "Chats", "Check connection": "Check connection", "Checking pairing invite…": "Checking pairing invite…", + "Clear": "Clear", "Clear all quotes": "Clear all quotes", "Clear search": "Clear search", "Client instance": "Client instance", @@ -80,6 +81,7 @@ "Command": "Command", "Compaction prompt": "Compaction prompt", "Compaction threshold": "Compaction threshold", + "Composer actions": "Composer actions", "Composition": "Composition", "Computer": "Computer", "Computer Settings": "Computer Settings", @@ -257,10 +259,10 @@ "Max output tokens": "Max output tokens", "Maximum": "Maximum", "Medium": "Medium", - "Message Maka…": "Message Maka…", "Message composer": "Message composer", "Message predictions": "Message predictions", "Message was not sent because the previous run is unsettled. Your message is kept.": "Message was not sent because the previous run is unsettled. Your message is kept.", + "Message…": "Message…", "Minimal": "Minimal", "Model": "Model", "Models": "Models", @@ -448,7 +450,7 @@ "Start a conversation on any connected computer and it will appear here automatically.": "Start a conversation on any connected computer and it will appear here automatically.", "Status": "Status", "Steer now": "Steer now", - "Steer or message Maka…": "Steer or message Maka…", + "Steer or message…": "Steer or message…", "Steer · Waiting for next step": "Steer · Waiting for next step", "Stop Run": "Stop Run", "Stopped before delivery. Your message is kept.": "Stopped before delivery. Your message is kept.", diff --git a/products/maka/ios-shell/locales/es.json b/products/maka/ios-shell/locales/es.json index 5e7a7decdf6..5a37264bc6c 100644 --- a/products/maka/ios-shell/locales/es.json +++ b/products/maka/ios-shell/locales/es.json @@ -71,6 +71,7 @@ "Chats": "Conversaciones", "Check connection": "Comprobar conexión", "Checking pairing invite…": "Comprobando invitación…", + "Clear": "Borrar", "Clear all quotes": "Quitar todas las citas", "Clear search": "Limpiar búsqueda", "Client instance": "Instancia de cliente", @@ -80,6 +81,7 @@ "Command": "Comando", "Compaction prompt": "Prompt de compactación", "Compaction threshold": "Umbral de compactación", + "Composer actions": "Acciones de redacción", "Composition": "Composición", "Computer": "Ordenador", "Computer Settings": "Ajustes del ordenador", @@ -257,10 +259,10 @@ "Max output tokens": "Máximo de tokens de salida", "Maximum": "Máximo", "Medium": "Mediano", - "Message Maka…": "Escribe a Maka…", "Message composer": "Campo de mensaje", "Message predictions": "Predicciones de mensajes", "Message was not sent because the previous run is unsettled. Your message is kept.": "El mensaje no se envió porque la ejecución anterior aún no ha finalizado. Se conserva tu mensaje.", + "Message…": "Mensaje…", "Minimal": "Mínimo", "Model": "Modelo", "Models": "Modelos", @@ -448,7 +450,7 @@ "Start a conversation on any connected computer and it will appear here automatically.": "Inicia una conversación en cualquier ordenador conectado y aparecerá aquí automáticamente.", "Status": "Estado", "Steer now": "Guiar ahora", - "Steer or message Maka…": "Guía la ejecución o escribe a Maka…", + "Steer or message…": "Guía o escribe…", "Steer · Waiting for next step": "Guía · Esperando el siguiente paso", "Stop Run": "Detener ejecución", "Stopped before delivery. Your message is kept.": "Detenido antes de entregarse. Se conserva tu mensaje.", diff --git a/products/maka/ios-shell/locales/fr.json b/products/maka/ios-shell/locales/fr.json index 686491abfbd..088d2e2a1c7 100644 --- a/products/maka/ios-shell/locales/fr.json +++ b/products/maka/ios-shell/locales/fr.json @@ -71,6 +71,7 @@ "Chats": "Discussions", "Check connection": "Vérifier la connexion", "Checking pairing invite…": "Vérification de l’invitation…", + "Clear": "Effacer", "Clear all quotes": "Effacer toutes les citations", "Clear search": "Effacer la recherche", "Client instance": "Instance client", @@ -80,6 +81,7 @@ "Command": "Commande", "Compaction prompt": "Prompt de compactage", "Compaction threshold": "Seuil de compactage", + "Composer actions": "Actions de rédaction", "Composition": "Composition", "Computer": "Ordinateur", "Computer Settings": "Réglages de l’ordinateur", @@ -257,10 +259,10 @@ "Max output tokens": "Nombre maximal de jetons de sortie", "Maximum": "Maximal", "Medium": "Moyen", - "Message Maka…": "Écrire à Maka…", "Message composer": "Zone de saisie", "Message predictions": "Prédictions de messages", "Message was not sent because the previous run is unsettled. Your message is kept.": "Le message n’a pas été envoyé car l’exécution précédente n’est pas terminée. Votre message est conservé.", + "Message…": "Message…", "Minimal": "Minimal", "Model": "Modèle", "Models": "Modèles", @@ -448,7 +450,7 @@ "Start a conversation on any connected computer and it will appear here automatically.": "Lancez une conversation sur un ordinateur connecté pour qu’elle apparaisse automatiquement ici.", "Status": "État", "Steer now": "Orienter maintenant", - "Steer or message Maka…": "Orientez l’exécution ou écrivez à Maka…", + "Steer or message…": "Orientez ou écrivez…", "Steer · Waiting for next step": "Orientation · En attente de la prochaine étape", "Stop Run": "Arrêter", "Stopped before delivery. Your message is kept.": "Arrêté avant l’envoi. Votre message est conservé.", diff --git a/products/maka/ios-shell/locales/it.json b/products/maka/ios-shell/locales/it.json index f01db615a3e..71df0e57f81 100644 --- a/products/maka/ios-shell/locales/it.json +++ b/products/maka/ios-shell/locales/it.json @@ -71,6 +71,7 @@ "Chats": "Chat", "Check connection": "Verifica connessione", "Checking pairing invite…": "Verifica dell’invito in corso…", + "Clear": "Svuota", "Clear all quotes": "Rimuovi tutte le citazioni", "Clear search": "Cancella ricerca", "Client instance": "Istanza client", @@ -80,6 +81,7 @@ "Command": "Comando", "Compaction prompt": "Prompt di compattazione", "Compaction threshold": "Soglia di compattazione", + "Composer actions": "Azioni di composizione", "Composition": "Composizione", "Computer": "Computer", "Computer Settings": "Impostazioni computer", @@ -257,10 +259,10 @@ "Max output tokens": "Token di output massimi", "Maximum": "Massimo", "Medium": "Medio", - "Message Maka…": "Scrivi a Maka…", "Message composer": "Campo messaggio", "Message predictions": "Previsioni messaggi", "Message was not sent because the previous run is unsettled. Your message is kept.": "Messaggio non inviato perché l’esecuzione precedente non è stata conclusa. Il messaggio è stato conservato.", + "Message…": "Messaggio…", "Minimal": "Minimo", "Model": "Modello", "Models": "Modelli", @@ -448,7 +450,7 @@ "Start a conversation on any connected computer and it will appear here automatically.": "Avvia una conversazione su un computer connesso e apparirà qui automaticamente.", "Status": "Stato", "Steer now": "Guida ora", - "Steer or message Maka…": "Guida l’esecuzione o scrivi a Maka…", + "Steer or message…": "Guida o scrivi…", "Steer · Waiting for next step": "Guida · In attesa del prossimo passaggio", "Stop Run": "Interrompi", "Stopped before delivery. Your message is kept.": "Interrotto prima del recapito. Il messaggio è stato conservato.", diff --git a/products/maka/ios-shell/locales/ja.json b/products/maka/ios-shell/locales/ja.json index 908d5158550..ceb0e2b9848 100644 --- a/products/maka/ios-shell/locales/ja.json +++ b/products/maka/ios-shell/locales/ja.json @@ -71,6 +71,7 @@ "Chats": "チャット", "Check connection": "接続を確認", "Checking pairing invite…": "ペアリング招待を確認中…", + "Clear": "クリア", "Clear all quotes": "引用をすべて削除", "Clear search": "検索をクリア", "Client instance": "クライアントインスタンス", @@ -80,6 +81,7 @@ "Command": "コマンド", "Compaction prompt": "圧縮プロンプト", "Compaction threshold": "圧縮のしきい値", + "Composer actions": "メッセージ作成の操作", "Composition": "コンポジション", "Computer": "コンピュータ", "Computer Settings": "コンピュータ設定", @@ -257,10 +259,10 @@ "Max output tokens": "最大出力トークン数", "Maximum": "最大", "Medium": "中", - "Message Maka…": "Maka にメッセージ…", "Message composer": "メッセージ入力欄", "Message predictions": "メッセージ予測", "Message was not sent because the previous run is unsettled. Your message is kept.": "前回の実行が未完了のため、メッセージを送信できませんでした。メッセージは保持されています。", + "Message…": "メッセージ…", "Minimal": "最小", "Model": "モデル", "Models": "モデル", @@ -448,7 +450,7 @@ "Start a conversation on any connected computer and it will appear here automatically.": "接続中のコンピュータで会話を開始すると、ここに自動で表示されます。", "Status": "ステータス", "Steer now": "今すぐ指示を送る", - "Steer or message Maka…": "途中で指示を出すか Maka にメッセージを送信…", + "Steer or message…": "指示・メッセージ…", "Steer · Waiting for next step": "途中の指示 · 次のステップを待機中", "Stop Run": "実行を停止", "Stopped before delivery. Your message is kept.": "配信前に停止しました。メッセージは保持されています。", diff --git a/products/maka/ios-shell/locales/ko.json b/products/maka/ios-shell/locales/ko.json index 15d82f7a533..35edb64ca96 100644 --- a/products/maka/ios-shell/locales/ko.json +++ b/products/maka/ios-shell/locales/ko.json @@ -71,6 +71,7 @@ "Chats": "대화", "Check connection": "연결 확인", "Checking pairing invite…": "페어링 초대 확인 중…", + "Clear": "지우기", "Clear all quotes": "인용 모두 지우기", "Clear search": "검색 지우기", "Client instance": "클라이언트 인스턴스", @@ -80,6 +81,7 @@ "Command": "명령", "Compaction prompt": "압축 프롬프트", "Compaction threshold": "압축 임계값", + "Composer actions": "메시지 작성 메뉴", "Composition": "구성", "Computer": "컴퓨터", "Computer Settings": "컴퓨터 설정", @@ -257,10 +259,10 @@ "Max output tokens": "최대 출력 토큰", "Maximum": "최대", "Medium": "중간", - "Message Maka…": "Maka에게 메시지 보내기…", "Message composer": "메시지 입력창", "Message predictions": "메시지 예측", "Message was not sent because the previous run is unsettled. Your message is kept.": "이전 실행이 아직 완료되지 않아 메시지가 전송되지 않았습니다. 메시지는 유지됩니다.", + "Message…": "메시지…", "Minimal": "최소", "Model": "모델", "Models": "모델", @@ -448,7 +450,7 @@ "Start a conversation on any connected computer and it will appear here automatically.": "연결된 컴퓨터에서 대화를 시작하면 여기에 자동으로 표시됩니다.", "Status": "상태", "Steer now": "지금 개입", - "Steer or message Maka…": "실행에 개입하거나 Maka에 메시지 보내기…", + "Steer or message…": "개입하거나 메시지…", "Steer · Waiting for next step": "실행 개입 · 다음 단계 대기 중", "Stop Run": "실행 중지", "Stopped before delivery. Your message is kept.": "전달되기 전에 중지되었습니다. 메시지는 유지됩니다.", diff --git a/products/maka/ios-shell/locales/pt-BR.json b/products/maka/ios-shell/locales/pt-BR.json index 5dc2d22767f..3720af6435e 100644 --- a/products/maka/ios-shell/locales/pt-BR.json +++ b/products/maka/ios-shell/locales/pt-BR.json @@ -71,6 +71,7 @@ "Chats": "Conversas", "Check connection": "Verificar conexão", "Checking pairing invite…": "Verificando convite de pareamento…", + "Clear": "Limpar", "Clear all quotes": "Remover todas as citações", "Clear search": "Limpar busca", "Client instance": "Instância do cliente", @@ -80,6 +81,7 @@ "Command": "Comando", "Compaction prompt": "Prompt de compactação", "Compaction threshold": "Limite para compactação", + "Composer actions": "Ações de composição", "Composition": "Composição", "Computer": "Computador", "Computer Settings": "Ajustes do computador", @@ -257,10 +259,10 @@ "Max output tokens": "Máximo de tokens de saída", "Maximum": "Máximo", "Medium": "Médio", - "Message Maka…": "Mensagem para Maka…", "Message composer": "Campo de mensagem", "Message predictions": "Previsões de mensagem", "Message was not sent because the previous run is unsettled. Your message is kept.": "A mensagem não foi enviada porque a execução anterior não foi finalizada. Sua mensagem foi mantida.", + "Message…": "Mensagem…", "Minimal": "Mínimo", "Model": "Modelo", "Models": "Modelos", @@ -448,7 +450,7 @@ "Start a conversation on any connected computer and it will appear here automatically.": "Inicie uma conversa em qualquer computador conectado e ela aparecerá aqui automaticamente.", "Status": "Status", "Steer now": "Orientar agora", - "Steer or message Maka…": "Oriente a execução ou escreva para Maka…", + "Steer or message…": "Oriente ou escreva…", "Steer · Waiting for next step": "Orientação · Aguardando a próxima etapa", "Stop Run": "Parar execução", "Stopped before delivery. Your message is kept.": "Parado antes da entrega. Sua mensagem foi mantida.", diff --git a/products/maka/ios-shell/locales/ru.json b/products/maka/ios-shell/locales/ru.json index b5c3179153e..812a0bee084 100644 --- a/products/maka/ios-shell/locales/ru.json +++ b/products/maka/ios-shell/locales/ru.json @@ -71,6 +71,7 @@ "Chats": "Чаты", "Check connection": "Проверить подключение", "Checking pairing invite…": "Проверка приглашения…", + "Clear": "Очистить", "Clear all quotes": "Удалить все цитаты", "Clear search": "Очистить поиск", "Client instance": "Экземпляр клиента", @@ -80,6 +81,7 @@ "Command": "Команда", "Compaction prompt": "Промпт сжатия", "Compaction threshold": "Порог сжатия", + "Composer actions": "Действия при написании сообщения", "Composition": "Композиция", "Computer": "Компьютер", "Computer Settings": "Настройки компьютера", @@ -257,10 +259,10 @@ "Max output tokens": "Максимум токенов на выходе", "Maximum": "Максимальный", "Medium": "Средний", - "Message Maka…": "Сообщение для Maka…", "Message composer": "Поле ввода сообщения", "Message predictions": "Подсказки сообщений", "Message was not sent because the previous run is unsettled. Your message is kept.": "Сообщение не отправлено, так как предыдущий запуск не завершён. Сообщение сохранено.", + "Message…": "Сообщение…", "Minimal": "Минимальный", "Model": "Модель", "Models": "Модели", @@ -448,7 +450,7 @@ "Start a conversation on any connected computer and it will appear here automatically.": "Начните диалог на любом подключённом компьютере, и он автоматически появится здесь.", "Status": "Статус", "Steer now": "Направить сейчас", - "Steer or message Maka…": "Направить выполнение или написать Maka…", + "Steer or message…": "Команда или текст…", "Steer · Waiting for next step": "Указание · Ожидание следующего шага", "Stop Run": "Остановить", "Stopped before delivery. Your message is kept.": "Остановлено до доставки. Сообщение сохранено.", diff --git a/products/maka/ios-shell/locales/zh-CN.json b/products/maka/ios-shell/locales/zh-CN.json index 29ea49b763c..a97c6fde78f 100644 --- a/products/maka/ios-shell/locales/zh-CN.json +++ b/products/maka/ios-shell/locales/zh-CN.json @@ -71,6 +71,7 @@ "Chats": "对话", "Check connection": "检查连接", "Checking pairing invite…": "正在校验配对邀请…", + "Clear": "清除", "Clear all quotes": "清除全部引用", "Clear search": "清除搜索", "Client instance": "客户端实例", @@ -80,6 +81,7 @@ "Command": "命令", "Compaction prompt": "压缩提示词", "Compaction threshold": "压缩阈值", + "Composer actions": "编辑栏操作", "Composition": "组合", "Computer": "电脑", "Computer Settings": "电脑设置", @@ -257,10 +259,10 @@ "Max output tokens": "最大输出 Token 数", "Maximum": "最高", "Medium": "中", - "Message Maka…": "给 Maka 发消息…", "Message composer": "消息输入框", "Message predictions": "消息预测", "Message was not sent because the previous run is unsettled. Your message is kept.": "上一轮还有操作未结束,消息发送失败。消息已保留。", + "Message…": "发消息…", "Minimal": "极低", "Model": "模型", "Models": "模型", @@ -448,7 +450,7 @@ "Start a conversation on any connected computer and it will appear here automatically.": "在任意已连接电脑上发起对话后,都会自动同步到这里。", "Status": "状态", "Steer now": "立即引导", - "Steer or message Maka…": "引导当前运行或给 Maka 发消息…", + "Steer or message…": "引导或发消息…", "Steer · Waiting for next step": "引导 · 等待下一步", "Stop Run": "停止运行", "Stopped before delivery. Your message is kept.": "送达前已停止,消息已保留。", diff --git a/products/maka/ios-shell/locales/zh-HK.json b/products/maka/ios-shell/locales/zh-HK.json index 907c75a4eae..c6f7ab45273 100644 --- a/products/maka/ios-shell/locales/zh-HK.json +++ b/products/maka/ios-shell/locales/zh-HK.json @@ -7,6 +7,7 @@ "Bearer token": "Bearer 令牌", "Bypass list": "代理例外清單", "Check connection": "檢查連接", + "Composer actions": "編輯欄操作", "Computer name is too long.": "電腦名稱太長。", "Confirm & Connect": "確認並連接", "Connect another computer": "連接另一部電腦", @@ -22,8 +23,8 @@ "Connection timed out": "連接超時", "Could not confirm whether the message was sent. Check the conversation or queue before retrying.": "無法確認訊息是否已傳送,重試前請先查看對話記錄或隊列。", "Could not save the proxy password.": "無法儲存代理密碼。", - "Could not update the message queue.": "無法更新訊息隊列。", "Could not sync chats": "無法同步對話", + "Could not update the message queue.": "無法更新訊息隊列。", "Current queued message": "目前隊列訊息", "Default sandbox mode": "預設沙盒模式", "Device name is too long.": "裝置名稱太長。", diff --git a/products/maka/ios-shell/locales/zh-TW.json b/products/maka/ios-shell/locales/zh-TW.json index 5c2219c524e..ff56b5b9995 100644 --- a/products/maka/ios-shell/locales/zh-TW.json +++ b/products/maka/ios-shell/locales/zh-TW.json @@ -71,6 +71,7 @@ "Chats": "對話", "Check connection": "檢查連線", "Checking pairing invite…": "正在驗證配對邀請…", + "Clear": "清除", "Clear all quotes": "清除所有引用", "Clear search": "清除搜尋", "Client instance": "用戶端執行個體", @@ -80,6 +81,7 @@ "Command": "命令", "Compaction prompt": "壓縮提示詞", "Compaction threshold": "壓縮門檻", + "Composer actions": "編輯列操作", "Composition": "組合", "Computer": "電腦", "Computer Settings": "電腦設定", @@ -257,10 +259,10 @@ "Max output tokens": "最大輸出 Token 數", "Maximum": "最高", "Medium": "中", - "Message Maka…": "傳送訊息給 Maka…", "Message composer": "訊息輸入欄", "Message predictions": "訊息預測", "Message was not sent because the previous run is unsettled. Your message is kept.": "上一輪還有操作未結束,訊息傳送失敗。訊息已保留。", + "Message…": "傳送訊息…", "Minimal": "極低", "Model": "模型", "Models": "模型", @@ -448,7 +450,7 @@ "Start a conversation on any connected computer and it will appear here automatically.": "在任何已連線電腦上開始對話後,都會自動出現在這裡。", "Status": "狀態", "Steer now": "立即引導", - "Steer or message Maka…": "引導目前執行或傳訊息給 Maka⋯", + "Steer or message…": "引導或傳送訊息…", "Steer · Waiting for next step": "引導 · 等待下一步", "Stop Run": "停止執行", "Stopped before delivery. Your message is kept.": "送達前已停止,訊息已保留。", diff --git a/products/maka/ios-shell/tests/ios_shell_behaviors.rs b/products/maka/ios-shell/tests/ios_shell_behaviors.rs index a46a8216c5a..26ae73e8da5 100644 --- a/products/maka/ios-shell/tests/ios_shell_behaviors.rs +++ b/products/maka/ios-shell/tests/ios_shell_behaviors.rs @@ -2924,6 +2924,37 @@ async fn chat_streaming_collapsible_tools_and_inline_approval() { // Simulate JS receiving the first item before the subscribe promise runs. open_watch.resolve(watch_handle.clone()); app.wait_for("text:Streaming live verification...").unwrap(); + + // With the keyboard up, the approval at the tail still clears the + // measured composer and can be tapped. + app.set_environment("software keyboard shown", |env| { + env.keyboard_height = px(330.) + }) + .unwrap(); + app.wheel("id:chat-context", nsh_core::Point::new(px(0.), px(-450.))) + .unwrap(); + let jump = app + .screen() + .layout("label:Scroll to latest") + .unwrap() + .unwrap() + .bounds; + let transcript = app + .screen() + .layout("id:chat-transcript") + .unwrap() + .unwrap() + .bounds; + assert_eq!(jump.size.width, jump.size.height); + assert!((jump.center().x - transcript.center().x).0.abs() <= 1.); + app.press("label:Scroll to latest").unwrap(); + let approval = app.screen().layout("label:Deny").unwrap().unwrap(); + let composer = app.screen().layout("id:chat-composer").unwrap().unwrap(); + assert!( + !approval.clipped + && approval.bounds.origin.y + approval.bounds.size.height <= composer.bounds.origin.y + ); + assert!(!app.screen().matches("label:Scroll to latest").unwrap()); app.press("label:Deny").unwrap(); let answered = fixture_recv(&mut send_rx).await; assert_eq!(answered["method"], "respond"); @@ -3180,6 +3211,22 @@ fn missing_queued(reason: &str) -> Value { #[tokio::test(flavor = "multi_thread", worker_threads = 2)] async fn chat_native_steer_uses_the_current_run_and_waits_across_queue_drain() { let mut fx = ComposerDockFixture::start(dock_run(), dock_model(), empty_queue()).await; + fx.app.wait_for("id:chat-context").unwrap(); // Non-compact at the fixture's 390pt width. + let capsule = "id:chat-composer-input"; + let input = "label:Message composer"; + let bounds = |selector| fx.app.screen().layout(selector).unwrap().unwrap().bounds; + let (pill, field) = (bounds(capsule), bounds(input)); + let padding = (field.origin.y - pill.origin.y) / 2.; + assert!(padding > px(0.)); + fx.app + .press_at( + capsule, + nsh_core::Point::new(field.center().x - pill.origin.x, padding), + ) + .unwrap(); + fx.app.press_key("c").unwrap(); + assert_eq!(fx.app.screen().input_text(input).unwrap(), Some("c")); + fx.app.press_key("Backspace").unwrap(); fx.app .type_text("label:Message composer", "Change course") .unwrap(); @@ -3278,38 +3325,58 @@ async fn chat_executor_steer_that_falls_back_to_queue_hands_off_to_its_entry() { } fn assert_dock_touch_target(app: &Headless, selector: &str) { - let size = app.screen().layout(selector).unwrap().unwrap().bounds.size; + let size = app + .screen() + .layout(selector) + .unwrap() + .unwrap_or_else(|| panic!("missing touch target: {selector}")) + .bounds + .size; assert!( size.width >= px(44.) && size.height >= px(44.), "{selector}: {size:?}" ); } -fn watch_add_to_queue(app: &mut Headless) -> impl FnOnce(&mut Headless) + use<> { +fn watch_native_menu_items( + app: &mut Headless, + mut observe: F, +) -> impl FnMut(&mut Headless, &str) + use +where + F: FnMut(&nsh_core::MountItem) + std::marker::Send + 'static, +{ use nsh_core::{EventKind, EventPayload, MountItem}; let (menu_tx, mut menus) = mpsc::unbounded_channel(); app.observe(move |_, batch| { for item in &batch.items { + observe(item); if let MountItem::ComponentProps { id, props } = item - && let Some(action) = props.iter().find_map(|(name, value)| { - if name.as_ref() != "items" { - return None; - } - value - .as_ref()? - .as_array()? - .iter() - .find(|item| item["label"] == "Add to queue") + && let Some(items) = props.iter().find_map(|(name, value)| { + (name.as_ref() == "items") + .then_some(value.as_ref())? + .and_then(Value::as_array) }) { - menu_tx.send((*id, action["id"].clone())).unwrap(); + for item in items { + if let Some(label) = item["label"].as_str() { + menu_tx + .send((label.to_owned(), (*id, item["id"].clone()))) + .unwrap(); + } + } } } }); - move |app| { - // Headless has no UIKit presentation. Deliver the item that was installed - // on the native long-press menu through UIKit's selection event. - let (menu, action) = menus.try_recv().unwrap(); + let mut items = BTreeMap::new(); + move |app, label| { + // Headless has no UIKit presentation. Deliver the installed item + // through the same selection event UIKit dispatches. + while let Ok((label, action)) = menus.try_recv() { + items.insert(label, action); + } + let (menu, action) = items + .remove(label) + .unwrap_or_else(|| panic!("missing native menu item: {label}")); app.engine().control().dispatch_event( menu, EventKind::NativeEvent, @@ -3325,17 +3392,16 @@ fn watch_add_to_queue(app: &mut Headless) -> impl FnOnce(&mut Headless) + use<> #[tokio::test(flavor = "multi_thread", worker_threads = 2)] async fn chat_explicit_queue_can_promote_review_edit_and_retract() { let mut fx = ComposerDockFixture::start(dock_run(), dock_model(), empty_queue()).await; - let choose_queue = watch_add_to_queue(&mut fx.app); + let mut choose_menu_item = watch_native_menu_items(&mut fx.app, |_| {}); fx.app .type_text("label:Message composer", "Handle it later") .unwrap(); - assert_dock_touch_target(&fx.app, "label:Send message"); fx.app.long_press("label:Send message").unwrap(); assert!( fx.calls.try_recv().is_err(), "long press also sent the message" ); - choose_queue(&mut fx.app); + choose_menu_item(&mut fx.app, "Add to queue"); let (input, reply) = fx.call("send").await; assert_eq!(input["delivery"], "queue"); assert_eq!(input["expectedRunId"], DOCK_RUN_ID); @@ -3453,6 +3519,394 @@ async fn chat_explicit_queue_can_promote_review_edit_and_retract() { .unwrap(); } +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn floating_dock_moves_tail_clearance_and_latest_with_its_measured_height() { + use nsh_core::{ + Filter, GlassEffect, MountItem, + canvas::{CanvasOp, Paint}, + platform::ColorScheme, + }; + + let mut fx = ComposerDockFixture::start(dock_run(), dock_model(), empty_queue()).await; + let styles = Arc::new(std::sync::Mutex::new(BTreeMap::new())); + let strokes = Arc::new(std::sync::Mutex::new(BTreeMap::new())); + let (mounted_styles, mounted_strokes) = (styles.clone(), strokes.clone()); + fx.app.observe(move |_, batch| { + for item in &batch.items { + match item { + MountItem::ViewStyle { id, style } => { + let blur = style.effects.as_ref().is_some_and(|effects| { + effects.backdrop_filters.iter().any( + |filter| matches!(filter, Filter::Blur(radius) if *radius > px(0.)), + ) + }); + mounted_styles + .lock() + .unwrap() + .insert(*id, (style.glass_effect, blur)); + } + MountItem::Canvas { id, drawing } => { + if let Some(color) = drawing.ops.iter().find_map(|op| match op { + CanvasOp::StrokeStyle(Paint::Color(color)) => Some(*color), + _ => None, + }) { + mounted_strokes.lock().unwrap().insert(*id, color); + } + } + _ => {} + } + } + }); + fx.history.lock().unwrap().extend((2..=18).map(|n| { + let mut row = quote_history_row(n, "user", &format!("Earlier dock message {n}")); + row["turnId"] = json!(format!("dock-turn-{n}")); + row + })); + fx.transcript_changed(18, "transcript_changed"); + let tail = "id:chat-transcript >> text:Earlier dock message 18"; + fx.app.wait_for(tail).unwrap(); + + let bounds = |app: &Headless, selector| app.screen().layout(selector).unwrap().unwrap().bounds; + let composer = |app: &Headless| bounds(app, "id:chat-composer"); + let gap = |app: &Headless| { + let row = bounds(app, tail); + composer(app).origin.y - row.origin.y - row.size.height + }; + let original_gap = gap(&fx.app); + assert!(original_gap >= px(0.)); + let empty = composer(&fx.app); + fx.queue_item(json!({"revision":1,"entries":[ + {"messageId":"steer","kind":"steering","preview":"Change direction"}, + {"messageId":"later","kind":"followup","preview":"Work to revisit"} + ]})); + fx.app + .wait_for("text:Steer · Waiting for next step") + .unwrap(); + fx.app.wait_for("label:Queued Messages (1)").unwrap(); + assert!(composer(&fx.app).origin.y < empty.origin.y); + assert_eq!(gap(&fx.app), original_gap); + + let latest = "label:Scroll to latest"; + let collapsed = composer(&fx.app); + fx.app.scroll("id:chat-transcript", px(-350.)).unwrap(); + let scrolled = composer(&fx.app); + let previous_arrow = bounds(&fx.app, latest); + fx.app.press("label:Queued Messages (1)").unwrap(); + let expanded = composer(&fx.app); + let arrow = bounds(&fx.app, latest); + let dock = bounds(&fx.app, "id:composer-pending-dock"); + assert!(expanded.size.height > scrolled.size.height); + assert_eq!( + previous_arrow.origin.y - arrow.origin.y, + expanded.size.height - scrolled.size.height + ); + assert!(arrow.origin.y + arrow.size.height <= dock.origin.y); + assert!( + (arrow.center().x - bounds(&fx.app, "id:chat-transcript").center().x) + .0 + .abs() + <= 1. + ); + for label in ["Steer now", "Edit queued message", "Remove queued message"] { + assert_dock_touch_target(&fx.app, &format!("label:{label}")); + } + assert_eq!(arrow.size, Size::new(px(40.), px(40.))); + let id = fx.app.screen().id(latest).unwrap(); + let canvas = fx + .app + .screen() + .layout_nodes() + .into_iter() + .find(|node| node.parent == id && node.kind == nsh_core::ViewKind::Canvas) + .unwrap() + .id; + let control = fx.app.engine().control(); + use nsh_core::tailwind::state::PRESSED; + for scheme in [ColorScheme::Light, ColorScheme::Dark] { + fx.app + .set_environment("appearance", |env| env.color_scheme = scheme) + .unwrap(); + let mut fills = [0; 2]; + for (fill, state) in fills.iter_mut().zip([0, PRESSED]) { + control.set_states(id, state); + assert!(fx.app.settle()); + assert_eq!(styles.lock().unwrap()[&id], (GlassEffect::Regular, true)); + let style = fx.app.screen().view_style(latest).unwrap().unwrap(); + assert_eq!(style.effective_opacity, 1.); + *fill = style.background_color.unwrap(); + let (r, g, b, a) = nsh_core::Color(*fill).to_f64(); + if state == 0 { + assert!(a > 0. && a < 1., "resting fill must reveal the glass"); + } + let (fr, fg, fb, fa) = strokes.lock().unwrap()[&canvas].to_f64(); + assert_eq!(fa, 1.); + let fg = relative_luminance([fr, fg, fb]); + // UIKit paints the tint over the material. Bound its contrast + // even when the material underneath is pure black or white. + for backdrop in [0., 1.] { + let bg = relative_luminance([r, g, b].map(|c| c * a + backdrop * (1. - a))); + let ratio = (fg.max(bg) + 0.05) / (fg.min(bg) + 0.05); + assert!( + ratio >= 4.5, + "{scheme:?}, state={state}, backdrop={backdrop}: {ratio:.2}:1" + ); + } + } + assert_ne!(fills[0], fills[1], "no pressed feedback"); + control.set_states(id, 0); + assert!(fx.app.settle()); + } + fx.app.press(latest).unwrap(); + assert_eq!(gap(&fx.app), original_gap); + fx.app.press("label:Queued Messages (1)").unwrap(); + assert_eq!(composer(&fx.app), collapsed); + assert_eq!(gap(&fx.app), original_gap); +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn inline_queue_editor_keeps_its_focus_and_saves_above_the_portrait_keyboard() { + let queue = json!({"revision":1,"entries":[ + {"messageId":"later","kind":"followup","preview":"Work to revisit"} + ]}); + let mut fx = ComposerDockFixture::start(dock_run(), dock_model(), queue.clone()).await; + fx.app.set_viewport(Size::new(px(390.), px(780.))).unwrap(); + fx.app.press("label:Queued Messages (1)").unwrap(); + open_queue_editor(&mut fx).await; + + let editor = "id:queue-message-editor"; + let id = fx.app.screen().id(editor).unwrap(); + fx.app.type_text(editor, " first").unwrap(); + let text = fx + .app + .screen() + .input_text(editor) + .unwrap() + .unwrap() + .to_owned(); + fx.app + .set_environment("portrait keyboard", |env| env.keyboard_height = px(336.)) + .unwrap(); + assert_eq!(fx.app.screen().id(editor).unwrap(), id); + assert_eq!( + fx.app.screen().input_text(editor).unwrap(), + Some(text.as_str()) + ); + fx.app.press_key("x").unwrap(); + let changed = fx + .app + .screen() + .input_text(editor) + .unwrap() + .unwrap() + .to_owned(); + assert_ne!( + text, changed, + "the same queue editor must still receive keystrokes" + ); + for selector in [editor, "label:Save", "label:Cancel"] { + assert_keyboard_target(&fx.app, selector, 0., 390., 444.); + } + fx.app.press("label:Save").unwrap(); + confirm_queue_edit(&mut fx, queue, &changed).await; +} + +async fn open_queue_editor(fx: &mut ComposerDockFixture) { + fx.app + .press_at( + "label:Edit queued message", + nsh_core::Point::new(px(22.), px(22.)), + ) + .unwrap(); + let (input, reply) = fx.call("queueMessage").await; + assert_eq!(input["messageId"], "later"); + reply.resolve( + json!({"value":{"kind":"ready","revision":1,"message":"Work to revisit", + "hasAttachments":false,"quotes":[]}}), + ); + fx.app.wait_for("id:queue-message-editor").unwrap(); +} + +async fn confirm_queue_edit(fx: &mut ComposerDockFixture, mut queue: Value, edited: &str) { + let (input, reply) = fx.call("editQueue").await; + assert_eq!( + input, + json!({"sessionId":"chat","expectedRevision":1, + "edit":{"kind":"update","messageId":"later","message":edited}}) + ); + queue["revision"] = json!(2); + queue["entries"] + .as_array_mut() + .unwrap() + .iter_mut() + .find(|entry| entry["messageId"] == "later") + .unwrap()["preview"] = json!(edited); + *fx.queue.lock().unwrap() = queue; + reply.resolve(json!({"value":QueueMutationResult::Committed { revision: 2 }})); + fx.app + .wait_for_gone("id:queue-message-editor", Duration::from_secs(2)) + .unwrap(); +} + +fn assert_keyboard_target( + app: &Headless, + selector: &str, + left: f32, + right: f32, + keyboard_top: f32, +) { + let layout = app.screen().layout(selector).unwrap().unwrap(); + let b = layout.bounds; + assert!( + !layout.clipped + && b.origin.y >= px(0.) + && b.origin.y + b.size.height <= px(keyboard_top) + && b.origin.x >= px(left) + && b.origin.x + b.size.width <= px(right), + "{selector}: {layout:?}, safe x={left}..{right}, keyboard top={keyboard_top}" + ); +} + +fn reveal_sheet_target(app: &mut Headless, scroll: &str, selector: &str) { + let bounds = |app: &Headless, s| app.screen().layout(s).unwrap().unwrap().bounds; + let port = bounds(app, scroll); + let target = bounds(app, selector); + let overflow = target.origin.y + target.size.height - (port.origin.y + port.size.height); + if overflow > px(0.) { + app.scroll(scroll, overflow + px(1.)).unwrap(); + } else if target.origin.y < port.origin.y { + app.scroll(scroll, target.origin.y - port.origin.y - px(1.)) + .unwrap(); + } + assert_keyboard_target(app, selector, 47., 797., 150.); +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn compact_keyboard_keeps_pending_dock_and_quotes_out_of_the_composer_row() { + let queue = json!({"revision":1,"entries":[ + {"messageId":"steer","kind":"steering","preview":"Change direction"}, + {"messageId":"later","kind":"followup","preview":"Work to revisit"} + ]}); + let mut fx = + ComposerDockFixture::start_with_anchor(dock_run(), dock_model(), queue.clone(), true).await; + let input = "label:Message composer"; + let composer_input = fx.app.screen().id(input).unwrap(); + let (blur_tx, mut blurs) = mpsc::unbounded_channel(); + let mut choose_menu_item = watch_native_menu_items(&mut fx.app, move |item| { + if let nsh_core::MountItem::Command { + id, + command: nsh_core::Command::Blur, + } = item + && *id == composer_input + { + blur_tx.send(()).unwrap(); + } + }); + fx.app + .type_text("label:Message composer", "A message to recover") + .unwrap(); + fx.app.press("label:Send message").unwrap(); + let (_, rejected) = fx.call("send").await; + rejected + .resolve(json!({"value":{"kind":"rejected","sessionId":"chat","reason":"turn_stopped"}})); + fx.app.wait_for("label:Retry").unwrap(); + fx.app.press("role:button[Quote]").unwrap(); + fx.app.set_viewport(Size::new(px(844.), px(390.))).unwrap(); + fx.app + .set_environment("landscape keyboard and safe area", |env| { + env.keyboard_height = px(240.); + env.safe_area.left = px(47.); + env.safe_area.right = px(47.); + }) + .unwrap(); + let bounds = |app: &Headless, selector| app.screen().layout(selector).unwrap().unwrap().bounds; + let composer = bounds(&fx.app, "id:chat-composer"); + let header = bounds(&fx.app, "label:Chats"); + assert_eq!(composer.origin.y + composer.size.height, px(150.)); + assert!(composer.origin.y - header.origin.y - header.size.height >= px(44.)); + for selector in [ + "id:chat-composer-actions", + "id:chat-composer-input", + "label:Stop Run", + "label:Send message", + ] { + if selector != "label:Send message" { + assert_dock_touch_target(&fx.app, selector); + } + let button = bounds(&fx.app, selector); + assert!(button.origin.x >= px(47.) && button.origin.x + button.size.width <= px(797.)); + assert!( + button.origin.y >= composer.origin.y + && button.origin.y + button.size.height <= px(150.) + ); + } + assert!(!fx.app.screen().matches("id:composer-pending-dock").unwrap()); + while blurs.try_recv().is_ok() {} + fx.app.type_text(input, "Steer").unwrap(); + choose_menu_item(&mut fx.app, "Queued Messages (1)"); + assert!( + blurs.try_recv().is_err(), + "opening Pending blurred the composer" + ); + fx.app + .wait_for("text:Steer · Waiting for next step") + .unwrap(); + assert_keyboard_target(&fx.app, "label:Done", 47., 797., 150.); + let pending = "id:chat-pending-sheet-scroll"; + reveal_sheet_target(&mut fx.app, pending, "label:Edit"); + reveal_sheet_target(&mut fx.app, pending, "label:Edit queued message"); + open_queue_editor(&mut fx).await; + let editor = "id:queue-message-editor"; + reveal_sheet_target(&mut fx.app, pending, editor); + fx.app.type_text(editor, " in landscape").unwrap(); + let edited = fx + .app + .screen() + .input_text(editor) + .unwrap() + .unwrap() + .to_owned(); + reveal_sheet_target(&mut fx.app, pending, "label:Save"); + assert_dock_touch_target(&fx.app, "label:Save"); + fx.app.press("label:Save").unwrap(); + confirm_queue_edit(&mut fx, queue, &edited).await; + fx.app.press("label:Done").unwrap(); + fx.app.type_text(input, " with").unwrap(); + choose_menu_item(&mut fx.app, "Quote"); + assert!( + blurs.try_recv().is_err(), + "opening Quote blurred the composer" + ); + fx.app + .wait_for("label:Remove quote: An earlier answer") + .unwrap(); + assert_keyboard_target(&fx.app, "label:Done", 47., 797., 150.); + reveal_sheet_target( + &mut fx.app, + "id:chat-quote-sheet-scroll", + "label:Remove quote: An earlier answer", + ); + fx.app + .press("label:Remove quote: An earlier answer") + .unwrap(); + fx.app + .wait_for_gone( + "label:Remove quote: An earlier answer", + Duration::from_secs(2), + ) + .unwrap(); + fx.app.press("label:Done").unwrap(); + fx.app.press("role:button[Quote]").unwrap(); + assert_eq!(bounds(&fx.app, "id:chat-composer"), composer); + + fx.app.type_text(input, " this quote").unwrap(); + fx.app.press("label:Send message").unwrap(); + let (input, reply) = fx.call("send").await; + assert_eq!(input["delivery"], "steer"); + assert_eq!(input["message"], "Steer with this quote"); + assert_eq!(input["quotes"][0]["text"], "An earlier answer"); + reply.resolve(queued_result("compact-steer", 3)); +} + #[tokio::test(flavor = "multi_thread", worker_threads = 2)] async fn chat_stopped_send_can_restore_retry_or_dismiss_without_losing_the_next_draft() { let mut fx = ComposerDockFixture::start(dock_run(), dock_model(), empty_queue()).await; @@ -3769,14 +4223,14 @@ async fn reopened_chat_checks_delivery_when_accepted_sends_are_outside_the_histo async fn chat_can_queue_from_the_side_question_quote_tray() { let mut fx = ComposerDockFixture::start_with_anchor(dock_run(), dock_model(), empty_queue(), true).await; - let choose_queue = watch_add_to_queue(&mut fx.app); + let mut choose_menu_item = watch_native_menu_items(&mut fx.app, |_| {}); fx.app.press("role:button[Quote] >> nth=0").unwrap(); fx.app.wait_for("label:Ask Side Question").unwrap(); fx.app.wait_for("label:Send to Main Chat").unwrap(); assert!(!fx.app.screen().matches("label:Send message").unwrap()); fx.app.long_press("label:Send to Main Chat").unwrap(); assert!(fx.calls.try_recv().is_err()); - choose_queue(&mut fx.app); + choose_menu_item(&mut fx.app, "Add to queue"); let (input, reply) = fx.call("send").await; assert_eq!(input["delivery"], "queue"); assert_eq!(input["expectedRunId"], DOCK_RUN_ID); @@ -4028,11 +4482,11 @@ async fn room_hands_off_by_prepared_id_when_mixed_history_beats_the_receipt() { #[tokio::test(flavor = "multi_thread", worker_threads = 2)] async fn explicit_queue_does_not_withhold_remote_steering_while_waiting_for_receipt() { let mut fx = ComposerDockFixture::start(dock_run(), dock_model(), empty_queue()).await; - let choose_queue = watch_add_to_queue(&mut fx.app); + let mut choose_menu_item = watch_native_menu_items(&mut fx.app, |_| {}); fx.app .type_text("label:Message composer", "Handle it later") .unwrap(); - choose_queue(&mut fx.app); + choose_menu_item(&mut fx.app, "Add to queue"); let (input, receipt) = fx.call("send").await; assert_eq!(input["delivery"], "queue"); fx.queue_item(json!({"revision":1,"entries":[ @@ -4315,7 +4769,7 @@ fn quote_chat_fixture( older_chunks: Vec, hold_first_refresh: Option>, ) -> (Headless, mpsc::UnboundedReceiver<(Send, HostCall)>) { - quote_chat_fixture_with_work(chunks, older_chunks, hold_first_refresh, None) + quote_chat_fixture_with_work(chunks, older_chunks, hold_first_refresh, None, Os::MacOs) } fn quote_chat_fixture_with_work( @@ -4323,6 +4777,7 @@ fn quote_chat_fixture_with_work( older_chunks: Vec, hold_first_refresh: Option>, work: Option<(Vec, Vec)>, + os: Os, ) -> (Headless, mpsc::UnboundedReceiver<(Send, HostCall)>) { use std::sync::atomic::{AtomicUsize, Ordering}; @@ -4376,6 +4831,9 @@ fn quote_chat_fixture_with_work( }; json!({"kind":"ready","chunks":rows,"through":17,"before":before,"after":null}) } + "models" if os == Os::Ios => json!({"kind":"ready","choices":[ + {"label":"Example model","selection":{"kind":"model","connectionId":"conn","modelId":"model"}} + ]}), "models" => json!({"kind":"ready","choices":[]}), "queue" => json!({"revision":0,"entries":[]}), "pendingInteractions" => json!({"entries":[]}), @@ -4412,7 +4870,7 @@ fn quote_chat_fixture_with_work( let mut config = engine_config(channel, tokio::runtime::Handle::current()); config.viewport = Size::new(px(390.), px(844.)); config.environment = Environment { - os: Os::MacOs, + os, reduce_motion: true, ..Environment::default() }; @@ -4421,6 +4879,280 @@ fn quote_chat_fixture_with_work( (app, send_rx) } +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn chat_glass_keeps_the_transcript_full_bleed_and_clear_of_composer_growth() { + use nsh_core::Point; + + let mut rows: Vec<_> = (1..=14) + .map(|n| { + let text = format!("Earlier message {n}: {}", "More context. ".repeat(10)); + let mut row = quote_history_row(n, "user", &text); + row["turnId"] = json!(format!("turn-{n}")); + row + }) + .collect(); + rows.push(quote_history_row(15, "assistant", "Latest response")); + let (mut app, _) = quote_chat_fixture(rows, vec![], None); + app.set_environment("home indicator", |env| env.safe_area.bottom = px(34.)) + .unwrap(); + app.press("label:Conversation: Quotes Chat").unwrap(); + app.wait_for("text:Latest response").unwrap(); + let bounds = |app: &Headless, selector| app.screen().layout(selector).unwrap().unwrap().bounds; + let bottom = |b: nsh_core::Bounds| b.origin.y + b.size.height; + let list = bounds(&app, "id:chat-transcript"); + let context = bounds(&app, "id:chat-context"); + let composer = bounds(&app, "id:chat-composer"); + assert!((context.center().x - list.center().x).0.abs() <= 1.); + assert!(context.size.width < list.size.width); + assert!(context.origin.y >= bottom(bounds(&app, "label:Chats"))); + assert_eq!(bottom(list) - bottom(composer), px(34.)); + assert!(composer.origin.y < bottom(list)); + + let show_keyboard = |app: &mut Headless| { + app.set_environment("software keyboard shown", |env| { + env.keyboard_height = px(350.); + env.keyboard_duration = 250.; + }) + .unwrap(); + }; + let hide_keyboard = |app: &mut Headless| { + app.set_environment("software keyboard hidden", |env| { + env.keyboard_height = px(0.) + }) + .unwrap(); + }; + + let latest = "id:chat-transcript >> text:Latest response"; + let opening = "id:chat-transcript >> text:/^Earlier message 1:/"; + let inset = |app: &Headless| bottom(list) - bottom(bounds(app, "id:chat-composer")); + let tail_gap = + |app: &Headless| bounds(app, "id:chat-composer").origin.y - bottom(bounds(app, latest)); + + for reduce_motion in [false, true] { + app.set_environment("motion preference", |env| env.reduce_motion = reduce_motion) + .unwrap(); + + // Wheel over the floating pill. Opening or hiding the keyboard must not + // move the row the reader is looking at while away from the tail. + app.wheel("id:chat-context", Point::new(px(0.), px(-2400.))) + .unwrap(); + let first = bounds(&app, opening); + assert!(first.origin.y >= bottom(context)); + show_keyboard(&mut app); + assert_eq!(inset(&app), px(350.)); + assert_eq!(bounds(&app, opening), first); + hide_keyboard(&mut app); + assert_eq!(inset(&app), px(34.)); + assert_eq!(bounds(&app, opening), first); + + app.wheel("id:chat-context", Point::new(px(0.), px(2400.))) + .unwrap(); + app.wait_for(latest).unwrap(); + let closed_tail = bounds(&app, latest); + let gap = tail_gap(&app); + assert!(gap > px(0.)); + show_keyboard(&mut app); + assert_eq!(bounds(&app, "id:chat-transcript"), list); + assert_eq!(inset(&app), px(350.)); + assert_eq!(tail_gap(&app), gap); + hide_keyboard(&mut app); + assert_eq!(inset(&app), px(34.)); + assert_eq!(bounds(&app, latest), closed_tail); + assert_eq!(tail_gap(&app), gap); + } + + show_keyboard(&mut app); + let keyboard_composer = bounds(&app, "id:chat-composer"); + let gap = tail_gap(&app); + app.press("role:button[Quote]").unwrap(); + app.wait_for("label:Remove quote: Latest response").unwrap(); + let with_quote = bounds(&app, "id:chat-composer"); + assert_eq!(bottom(with_quote), bottom(keyboard_composer)); + assert!(with_quote.size.height > keyboard_composer.size.height); + assert!( + gap > px(0.) && tail_gap(&app) == gap, + "the tail must follow the growing composer" + ); + + app.press("label:Remove quote: Latest response").unwrap(); + assert_eq!( + bounds(&app, "id:chat-composer").size.height, + keyboard_composer.size.height + ); + hide_keyboard(&mut app); + assert_eq!(bottom(bounds(&app, "id:chat-composer")), bottom(composer)); + assert_eq!(tail_gap(&app), gap); + app.press("label:Chats").unwrap(); + app.wait_for("label:Conversation: Quotes Chat").unwrap(); +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn landscape_keyboard_leaves_the_composer_and_transcript_usable_with_quotes() { + let mut rows: Vec<_> = (1..=12) + .map(|n| { + let mut row = quote_history_row(n, "user", &format!("Landscape message {n}")); + row["turnId"] = json!(format!("turn-{n}")); + row + }) + .collect(); + rows.push(quote_history_row(13, "assistant", "Landscape reply")); + let (mut app, _) = quote_chat_fixture(rows, vec![], None); + let (tx, mut passthrough) = mpsc::unbounded_channel(); + app.observe(move |_, batch| { + for item in &batch.items { + if let nsh_core::MountItem::ViewProps { id, props } = item + && props.accessibility.accessible == Some(false) + { + tx.send(*id).unwrap(); + } + } + }); + app.press("label:Conversation: Quotes Chat").unwrap(); + app.wait_for("text:Landscape reply").unwrap(); + app.press("role:button[Quote]").unwrap(); + app.wait_for("label:Remove quote: Landscape reply").unwrap(); + app.set_viewport(Size::new(px(844.), px(390.))).unwrap(); + app.set_environment("landscape safe area", |env| { + env.safe_area.left = px(47.); + env.safe_area.right = px(47.); + }) + .unwrap(); + app.set_environment("landscape keyboard shown", |env| { + env.keyboard_height = px(240.) + }) + .unwrap(); + + let bounds = |app: &Headless, selector| app.screen().layout(selector).unwrap().unwrap().bounds; + let bottom = |b: nsh_core::Bounds| b.origin.y + b.size.height; + let right = |b: nsh_core::Bounds| b.origin.x + b.size.width; + let header_bottom = bottom(bounds(&app, "label:Chats")); + let keyboard_top = px(390. - 240.); + let composer = bounds(&app, "id:chat-composer"); + let input = bounds(&app, "label:Message composer"); + let actions = bounds(&app, "label:Composer actions"); + let send = bounds(&app, "label:Send message"); + + assert_eq!(bottom(composer), keyboard_top); + assert!(composer.origin.y - header_bottom >= px(44.)); + assert!(input.origin.y >= composer.origin.y && bottom(input) < keyboard_top); + assert!(actions.origin.x >= px(47.) && right(send) <= px(844. - 47.)); + assert!(!app.screen().matches("id:chat-context").unwrap()); + assert!(!app.screen().matches("label:Clear all quotes").unwrap()); + + // At the tail, the reply action is fully between the header and composer. + let copy = bounds(&app, "role:button[Copy reply]"); + assert!( + copy.origin.y >= header_bottom && bottom(copy) <= composer.origin.y, + "copy at {copy:?}; readable band {header_bottom:?}..{:?}", + composer.origin.y, + ); + assert!(copy.origin.x >= px(47.) && right(copy) <= px(844. - 47.)); + app.press("role:button[Copy reply]").unwrap(); + assert_eq!(app.screen().clipboard(), Some("Landscape reply")); + + // Scroll just enough to read the reply itself, with both chrome surfaces in place. + app.scroll("id:chat-transcript", px(-45.)).unwrap(); + let reply = bounds(&app, "id:chat-transcript >> text:Landscape reply"); + assert!( + reply.origin.y >= header_bottom && bottom(reply) <= composer.origin.y, + "reply at {reply:?}; readable band {header_bottom:?}..{:?}", + composer.origin.y, + ); + assert!(reply.origin.x >= px(47.) && right(reply) <= px(844. - 47.)); + + let capsule_id = app.screen().id("id:chat-composer-input").unwrap(); + assert!( + std::iter::from_fn(|| passthrough.try_recv().ok()).any(|id| id == capsule_id), + "the pressable wrapper must not become a single VoiceOver element" + ); + let capsule_a11y = app + .screen() + .accessibility(Some("id:chat-composer-input")) + .unwrap() + .unwrap(); + for label in ["Message composer", "Send message"] { + assert!( + capsule_a11y + .children + .iter() + .any(|child| child.label.as_deref() == Some(label)) + ); + } + + let capsule = bounds(&app, "id:chat-composer-input"); + assert!(capsule.size.height >= px(44.) && capsule.size.width >= px(44.)); + let at = nsh_core::Point::new(px(6.), px(4.)); + assert!(capsule.origin.x + at.x < input.origin.x); + assert!(capsule.origin.y + at.y < input.origin.y); + app.press_at("id:chat-composer-input", at).unwrap(); + app.press_key("a").unwrap(); + assert_eq!( + app.screen().input_text("label:Message composer").unwrap(), + Some("a") + ); + app.press("label:Composer actions").unwrap(); + app.choose_menu_item("Quote").unwrap(); + app.wait_for("label:Clear all quotes").unwrap(); + app.press("label:Clear all quotes").unwrap(); + assert!( + !app.screen() + .matches("label:Remove quote: Landscape reply") + .unwrap() + ); + app.press("label:Done").unwrap(); +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn compact_chats_can_clear_local_quotes_after_the_host_goes_offline() { + let mut answer = quote_history_row(2, "assistant", "Saved reply"); + answer["finalOutput"] = json!(true); + let (mut app, _) = quote_chat_fixture( + vec![quote_history_row(1, "user", "What happened?"), answer], + vec![], + None, + ); + app.press("label:Conversation: Quotes Chat").unwrap(); + app.wait_for("text:Saved reply").unwrap(); + app.press("role:button[Quote]").unwrap(); + app.wait_for("label:Remove quote: Saved reply").unwrap(); + app.wait_for("label:Ask Side Question").unwrap(); + app.set_viewport(Size::new(px(812.), px(375.))).unwrap(); + app.set_environment("landscape safe area", |env| { + env.safe_area.left = px(47.); + env.safe_area.right = px(47.); + env.safe_area.bottom = px(21.); + }) + .unwrap(); + app.wait_for("label:Composer actions").unwrap(); + app.send_host_event( + "ios.hostState", + json!({ + "revision":2,"hosts":[{"rootId":"root","hostName":"Host","endpoints":["agent"]}], + "connections":{"root":{"status":"offline","autoReconnect":false}} + }), + ) + .unwrap(); + app.wait_for("text:Host is offline").unwrap(); + let bounds = |selector| app.screen().layout(selector).unwrap().unwrap().bounds; + let back = bounds("label:Chats"); + let files = bounds("label:Files & Changes"); + let reconnect = bounds("label:Reconnect"); + assert!(back.origin.x >= px(47.)); + assert!(files.origin.x + files.size.width <= px(812. - 47.)); + assert!(reconnect.size.height >= px(44.) && reconnect.size.width >= px(44.)); + + app.press("label:Composer actions").unwrap(); + app.choose_menu_item("Quote").unwrap(); + app.wait_for("label:Remove quote: Saved reply").unwrap(); + assert!(!app.screen().matches("label:Ask Side Question").unwrap()); + assert!(!app.screen().matches("label:Send to Main Chat").unwrap()); + app.press("label:Clear all quotes").unwrap(); + app.wait_for_gone("label:Remove quote: Saved reply", Duration::from_secs(2)) + .unwrap(); + app.press("label:Done").unwrap(); + assert!(!app.screen().matches("label:Composer actions").unwrap()); +} + // Headless does not present UIKit's text edit menu. Read the action the // selectable view mounted and report its ID through the same event as UIKit. fn watch_quote_menus( @@ -5326,6 +6058,18 @@ fn side_chat_fixture_with_history( let (observe_tx, side_observations) = mpsc::unbounded_channel(); let main_revision = AtomicU64::new(40); let (_, late) = side_history_rows(); + let mut saved_history: Vec<_> = (20..=45) + .map(|n| { + let mut row = quote_history_row(n, "user", &format!("Saved side question message {n}")); + row["turnId"] = json!(format!("saved-{n}")); + row + }) + .collect(); + saved_history.push(quote_history_row( + 46, + "assistant", + "Saved side question tail", + )); channel.handle("ios.hostQuery", move |mut call| { let data = call.take_data(); assert_eq!(data["rootId"], "root"); @@ -5387,8 +6131,11 @@ fn side_chat_fixture_with_history( }],"through":1,"before":null,"after":null} }), "history" => { - let chunks = if input["sessionId"] == "main" { main_history.clone() } - else { vec![late.clone()] }; + let chunks = match input["sessionId"].as_str().unwrap() { + "main" => main_history.as_slice(), + "saved" => saved_history.as_slice(), + _ => std::slice::from_ref(&late), + }; json!({"kind":"ready","chunks":chunks,"through":99,"before":null,"after":null}) } "models" if os == Os::Ios => json!({"kind":"ready","choices":[ @@ -5592,6 +6339,364 @@ async fn side_chat_cancel_and_unicode_whitespace_do_not_mutate() { assert!(fx.mutations.try_recv().is_err()); } +fn relative_luminance(rgb: [f64; 3]) -> f64 { + rgb.into_iter() + .zip([0.2126, 0.7152, 0.0722]) + .map(|(c, w)| { + w * if c <= 0.04045 { + c / 12.92 + } else { + ((c + 0.055) / 1.055).powf(2.4) + } + }) + .sum() +} + +fn color_over(color: nsh_core::Color, backdrop: [f64; 3]) -> [f64; 3] { + let (r, g, b, a) = color.to_f64(); + std::array::from_fn(|index| [r, g, b][index] * a + backdrop[index] * (1. - a)) +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn composer_and_keyboard_toolbar_keep_glass_and_touch_targets() { + use nsh_core::{ + Color, Filter, GlassEffect, MountItem, NodeId, ViewKind, + canvas::{CanvasOp, Paint}, + platform::ColorScheme, + tailwind::state::PRESSED, + }; + + let (mut app, _) = quote_chat_fixture_with_work( + vec![quote_history_row(1, "assistant", "Previous answer")], + vec![], + None, + None, + Os::Ios, + ); + let (tx, mut changes) = mpsc::unbounded_channel(); + app.observe(move |_, batch| { + for item in &batch.items { + match item { + MountItem::ViewProps { id, props } => { + tx.send((*id, Some(props.hit_slop), None, None)).unwrap(); + } + MountItem::ViewStyle { id, style } => { + tx.send((*id, None, Some(style.clone()), None)).unwrap(); + } + MountItem::Canvas { id, drawing } => { + if let Some(ink) = drawing.ops.iter().find_map(|op| match op { + CanvasOp::StrokeStyle(Paint::Color(color)) => Some(*color), + _ => None, + }) { + tx.send((*id, None, None, Some(ink))).unwrap(); + } + } + _ => {} + } + } + }); + app.press("label:Conversation: Quotes Chat").unwrap(); + app.wait_for("id:chat-keyboard-model-glass").unwrap(); + let capsule = "id:chat-composer-input"; + let input = "label:Message composer"; + let send = "label:Send message"; + let bounds = |app: &Headless, selector| app.screen().layout(selector).unwrap().unwrap().bounds; + let bottom = |b: nsh_core::Bounds| b.origin.y + b.size.height; + let right = |b: nsh_core::Bounds| b.origin.x + b.size.width; + let send_inset = |app: &Headless| { + let (capsule, input, send) = (bounds(app, capsule), bounds(app, input), bounds(app, send)); + assert!(right(input) <= send.origin.x && right(send) < right(capsule)); + assert!(send.origin.y > capsule.origin.y && bottom(send) < bottom(capsule)); + (right(capsule) - right(send), bottom(capsule) - bottom(send)) + }; + assert!(!app.screen().enabled(send).unwrap()); + let empty = bounds(&app, capsule); + app.type_text(input, "One line").unwrap(); + let single = bounds(&app, capsule); + assert_eq!(empty.size.height, single.size.height); + let inset = send_inset(&app); + assert!( + (bounds(&app, input).center().y - bounds(&app, send).center().y) + .0 + .abs() + <= 1. + ); + app.type_text(input, "\nSecond line\nThird line").unwrap(); + assert!(bounds(&app, capsule).size.height > single.size.height); + assert_eq!(send_inset(&app), inset); + assert!( + (bottom(bounds(&app, input)) - bottom(bounds(&app, send))) + .0 + .abs() + <= 1. + ); + + let controls = [ + ("id:chat-keyboard-model-glass", false), + ("label:Quote diff", true), + ("label:Dismiss keyboard", true), + ]; + let node_id = |app: &Headless, selector| app.screen().id(selector).unwrap(); + let nodes = app.screen().layout_nodes(); + let parent = |id| nodes.iter().find(|node| node.id == id).unwrap().parent; + assert_eq!(parent(node_id(&app, send)), node_id(&app, capsule)); + assert_dock_touch_target(&app, "id:chat-keyboard-model"); + for (selector, _) in controls { + let mut id = node_id(&app, selector); + while let Some(node) = nodes.iter().find(|node| node.id == id) { + if node.kind == ViewKind::InputAccessory { + break; + } + id = node.parent; + } + assert!( + nodes + .iter() + .any(|n| n.id == id && n.kind == ViewKind::InputAccessory) + ); + } + + let mut slop = BTreeMap::new(); + let mut styles = BTreeMap::new(); + let mut ink = BTreeMap::new(); + let mut sync = + |slop: &mut BTreeMap<_, _>, styles: &mut BTreeMap<_, _>, ink: &mut BTreeMap<_, _>| { + while let Ok((id, hit_slop, style, color)) = changes.try_recv() { + if let Some(hit_slop) = hit_slop { + slop.insert(id, hit_slop); + } + if let Some(style) = style { + styles.insert(id, style); + } + if let Some(color) = color { + ink.insert(id, color); + } + } + }; + let assert_hit_target = |selector, app: &Headless, slop: &BTreeMap<_, nsh_core::EdgeInsets>| { + let b = bounds(&app, selector); + let pad = slop[&node_id(&app, selector)]; + assert!( + b.size.width + pad.left + pad.right >= px(44.) + && b.size.height + pad.top + pad.bottom >= px(44.), + "{selector}: {b:?} + {pad:?}" + ); + }; + sync(&mut slop, &mut styles, &mut ink); + for selector in [send, "label:Quote diff", "label:Dismiss keyboard"] { + assert_hit_target(selector, &app, &slop); + } + + let assert_glass = |style: &nsh_core::ViewStyle| { + assert_eq!(style.glass_effect, GlassEffect::Regular); + assert!( + style + .effects + .as_ref() + .is_some_and(|fx| { matches!(fx.backdrop_filters.as_slice(), [Filter::Blur(_)]) }) + ); + }; + let control = app.engine().control(); + for scheme in [ColorScheme::Light, ColorScheme::Dark] { + app.set_environment("appearance", |env| env.color_scheme = scheme) + .unwrap(); + for (selector, changes_fill) in controls { + let id: NodeId = node_id(&app, selector); + let mut fills = [Color::default(); 2]; + for (fill, state) in fills.iter_mut().zip([0, PRESSED]) { + control.set_states(id, state); + assert!(app.settle()); + sync(&mut slop, &mut styles, &mut ink); + assert_glass(&styles[&node_id(&app, capsule)]); + let style = &styles[&id]; + assert_glass(style); + *fill = style.background_color; + let (_, _, _, a) = fill.to_f64(); + assert!(a > 0. && a < 1., "{selector} has an opaque fill"); + for child in nodes.iter().filter(|node| node.parent == id) { + let fg = match child.kind { + ViewKind::Canvas => ink[&child.id], + ViewKind::Text => button_text_color(&app, id), + _ => continue, + }; + let (fr, fg, fb, fa) = fg.to_f64(); + assert_eq!(fa, 1.); + let fg = relative_luminance([fr, fg, fb]); + for backdrop in [0., 1.] { + let bg = relative_luminance(color_over(*fill, [backdrop; 3])); + let contrast = (fg.max(bg) + 0.05) / (fg.min(bg) + 0.05); + assert!(contrast >= 4.5, "{selector} {scheme:?}: {contrast:.2}:1"); + } + } + } + if changes_fill { + assert_ne!(fills[0], fills[1], "{selector} has no pressed feedback"); + } + control.set_states(id, 0); + assert!(app.settle()); + } + } + + app.press("role:button[Quote]").unwrap(); + app.wait_for("label:Remove quote: Previous answer").unwrap(); + sync(&mut slop, &mut styles, &mut ink); + assert_hit_target("label:Remove quote: Previous answer", &app, &slop); + assert_hit_target("label:Clear all quotes", &app, &slop); +} + +fn assert_chat_button_contrast( + app: &mut Headless, + selector: &str, + glass_parent: Option<&str>, + foreground: impl Fn(&Headless, nsh_core::NodeId) -> nsh_core::Color, +) { + let id = app.screen().id(selector).unwrap(); + let control = app.engine().control(); + let luminance = |color: nsh_core::Color| { + let (r, g, b, a) = color.to_f64(); + assert_eq!(a, 1.0, "{selector}: transparent color {color:?}"); + relative_luminance([r, g, b]) + }; + let mut fills = [None; 2]; + for (fill, state) in fills + .iter_mut() + .zip([0, nsh_core::tailwind::state::PRESSED]) + { + control.set_states(id, state); + assert!(app.settle()); + let style = app.screen().view_style(selector).unwrap().unwrap(); + assert_eq!(style.effective_opacity, 1.0, "{selector}, state={state}"); + *fill = style.background_color; + let button = nsh_core::Color(fill.unwrap_or(0)); + let fg = luminance(foreground(app, id)); + let tray = glass_parent.map(|parent| { + nsh_core::Color( + app.screen() + .view_style(parent) + .unwrap() + .unwrap() + .background_color + .unwrap(), + ) + }); + for backdrop in [0., 1.] { + let bg = match tray { + Some(tray) => { + relative_luminance(color_over(button, color_over(tray, [backdrop; 3]))) + } + None => luminance(button), + }; + let contrast = (bg.max(fg) + 0.05) / (bg.min(fg) + 0.05); + assert!( + contrast >= 4.5, + "{selector}, state={state}: {contrast:.2}:1" + ); + } + } + if glass_parent.is_some() { + assert_eq!(fills[0], None, "{selector} paints a box at rest"); + } + assert_ne!(fills[0], fills[1], "{selector} has no pressed feedback"); + control.set_states(id, 0); + assert!(app.settle()); +} + +fn button_text_color(app: &Headless, id: nsh_core::NodeId) -> nsh_core::Color { + app.screen() + .layout_nodes() + .iter() + .find_map(|node| { + (node.parent == id) + .then_some(node.text.as_ref())? + .map(|text| text.text.spans[0].style.color) + }) + .expect("button text") +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn quote_actions_and_sheet_done_keep_contrast_when_pressed() { + use nsh_core::platform::ColorScheme; + + let mut fx = side_chat_fixture(false, false); + let mut quote = watch_quote_menus(&mut fx.app); + fx.open_main(); + assert!(quote( + &mut fx.app, + "text:Later durable answer", + Some("Later durable answer") + )); + + for scheme in [ColorScheme::Light, ColorScheme::Dark] { + fx.app + .set_environment("appearance", |env| env.color_scheme = scheme) + .unwrap(); + for selector in ["label:Ask Side Question", "label:Send to Main Chat"] { + assert_chat_button_contrast(&mut fx.app, selector, None, button_text_color); + } + assert_chat_button_contrast( + &mut fx.app, + "label:Clear all quotes", + Some("id:chat-draft-quotes"), + button_text_color, + ); + } + + fx.app.set_viewport(Size::new(px(844.), px(390.))).unwrap(); + fx.app + .set_environment("landscape keyboard", |env| env.keyboard_height = px(240.)) + .unwrap(); + fx.app.press("label:Composer actions").unwrap(); + fx.app.choose_menu_item("Quote").unwrap(); + for scheme in [ColorScheme::Light, ColorScheme::Dark] { + fx.app + .set_environment("appearance", |env| env.color_scheme = scheme) + .unwrap(); + assert_chat_button_contrast(&mut fx.app, "label:Done", None, button_text_color); + } +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn normal_send_has_readable_icon_in_both_press_states() { + use nsh_core::{ + MountItem, + canvas::{CanvasOp, Paint}, + platform::ColorScheme, + }; + + let mut fx = ComposerDockFixture::start(dock_run(), dock_model(), empty_queue()).await; + let strokes = Arc::new(std::sync::Mutex::new(BTreeMap::new())); + let mounted = strokes.clone(); + fx.app.observe(move |_, batch| { + for item in &batch.items { + if let MountItem::Canvas { id, drawing } = item + && let Some(color) = drawing.ops.iter().find_map(|op| match op { + CanvasOp::StrokeStyle(Paint::Color(color)) => Some(*color), + _ => None, + }) + { + mounted.lock().unwrap().insert(*id, color); + } + } + }); + fx.app + .type_text("label:Message composer", "Ready to send") + .unwrap(); + for scheme in [ColorScheme::Light, ColorScheme::Dark] { + fx.app + .set_environment("appearance", |env| env.color_scheme = scheme) + .unwrap(); + assert_chat_button_contrast(&mut fx.app, "label:Send message", None, |app, id| { + let canvas = app + .screen() + .layout_nodes() + .into_iter() + .find(|node| node.parent == id && node.kind == nsh_core::ViewKind::Canvas) + .unwrap(); + strokes.lock().unwrap()[&canvas.id] + }); + } +} + #[tokio::test(flavor = "multi_thread", worker_threads = 2)] async fn side_chat_fork_conflict_then_failed_first_send_retries_in_the_new_chat() { let mut fx = side_chat_fixture(true, false); @@ -5767,6 +6872,14 @@ async fn side_chat_rediscovers_anchors_pages_and_brings_a_link_back() { .press("label:Side questions (1) · Waiting for your response") .unwrap(); fx.app.wait_for("text:Side Question · Main Chat").unwrap(); + fx.app.wait_for("text:Saved side question tail").unwrap(); + assert!( + fx.app + .screen() + .layout("text:Saved side question message 20") + .unwrap() + .is_none_or(|view| view.clipped) + ); fx.app.press("label:Bring to Main Draft").unwrap(); assert_eq!( fx.app @@ -6494,7 +7607,10 @@ async fn chat_quote_draft_sends_ordered_excerpts_without_text_and_renders_histor }; let first = chip("label:Remove quote: Swift ready"); let second = chip("label:Remove quote: Keep café intact."); - assert_eq!(first.size.height, px(44.)); + assert!( + first.size.height < px(44.), + "the visual chip has a slimmer outline" + ); assert_eq!(second.size.height, first.size.height); assert_eq!(second.origin.y, first.origin.y); assert!(second.origin.x.0 >= (first.origin.x + first.size.width).0); @@ -6541,6 +7657,40 @@ async fn chat_quote_draft_sends_ordered_excerpts_without_text_and_renders_histor assert!(app.press("label:Send message").is_err()); } +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn draft_quote_chips_and_scroll_grow_with_dynamic_type() { + let excerpt = "A draft quote"; + let (mut app, _) = quote_chat_fixture( + vec![quote_history_row(1, "assistant", excerpt)], + vec![], + None, + ); + app.press("label:Conversation: Quotes Chat").unwrap(); + app.press("role:button[Quote]").unwrap(); + let scroll = "id:chat-draft-quote-scroll"; + let remove = "label:Remove quote: A draft quote"; + app.wait_for(remove).unwrap(); + let layout = |app: &Headless, selector| app.screen().layout(selector).unwrap().unwrap(); + let normal = layout(&app, scroll).bounds.size.height; + app.set_environment("Dynamic Type at 200%", |env| env.font_scale = 2.0) + .unwrap(); + + let nodes = app.screen().layout_nodes(); + let button = app.screen().id(remove).unwrap(); + let chip = nodes.iter().find(|node| node.id == button).unwrap().parent; + let chip = nodes.iter().find(|node| node.id == chip).unwrap().bounds; + let viewport = layout(&app, scroll).bounds; + let author = layout(&app, "id:chat-draft-quote-scroll >> text:Maka"); + let excerpt = layout(&app, "id:chat-draft-quote-scroll >> text:A draft quote"); + let bottom = |b: nsh_core::Bounds| b.origin.y + b.size.height; + assert!(viewport.size.height > normal && !author.clipped && !excerpt.clipped); + assert!(viewport.origin.y <= chip.origin.y && bottom(chip) <= bottom(viewport)); + assert!(chip.origin.y <= author.bounds.origin.y && bottom(excerpt.bounds) <= bottom(chip)); + assert!(bottom(author.bounds) <= excerpt.bounds.origin.y); + app.press(remove).unwrap(); + app.wait_for_gone(scroll, Duration::from_secs(2)).unwrap(); +} + #[tokio::test(flavor = "multi_thread", worker_threads = 2)] async fn folded_turn_copies_and_quotes_all_prose_even_before_expansion() { let prompt = quote_history_row(1, "user", "Summarize the work"); @@ -6563,6 +7713,7 @@ async fn folded_turn_copies_and_quotes_all_prose_even_before_expansion() { vec![], None, Some((vec![prompt, first, group, last], vec![tool])), + Os::MacOs, ); app.press("label:Conversation: Quotes Chat").unwrap(); app.wait_for("text:Second answer").unwrap(); diff --git a/third-party/nsh/SOURCE.md b/third-party/nsh/SOURCE.md index 2c5605edd7c..4176ac64cfb 100644 --- a/third-party/nsh/SOURCE.md +++ b/third-party/nsh/SOURCE.md @@ -92,6 +92,16 @@ 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. +- **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 + frame and reconcile visible occlusion with the docked guide once UIKit + finishes the change. UIKit can omit a late input accessory from the frame + after modal dismissal. Instantaneous docked frames still use the guide, + and a completion cannot undo a hide. An idle surface resize also reconciles + against the docked guide when UIKit sends no new keyboard notification. + A docked keyboard remains visible to the platform even if the resized + surface temporarily has zero overlap. ## Maintenance and verification diff --git a/third-party/nsh/crates/nsh-core/src/core/list_motion.rs b/third-party/nsh/crates/nsh-core/src/core/list_motion.rs index 37643254008..27199be30d8 100644 --- a/third-party/nsh/crates/nsh-core/src/core/list_motion.rs +++ b/third-party/nsh/crates/nsh-core/src/core/list_motion.rs @@ -28,7 +28,7 @@ use rustc_hash::{FxHashMap, FxHashSet}; use super::{Core, Key, NO_KEY}; use crate::{ - LayoutAnimation, MountItem, NodeId, + LayoutAnimation, LayoutCurve, MountItem, NodeId, geometry::{Bounds, Points}, text::TextEngine, }; @@ -52,6 +52,12 @@ impl ListMotion { pub(super) fn active(&self) -> bool { self.layout.is_some() } + + pub(super) fn follows_keyboard(&self) -> bool { + self.layout + .and_then(|animation| animation.update) + .is_some_and(|transition| transition.curve == LayoutCurve::Keyboard) + } } /// A list's cells placed in this round ([`Core::move_list_cells`]). diff --git a/third-party/nsh/crates/nsh-core/src/core/mod.rs b/third-party/nsh/crates/nsh-core/src/core/mod.rs index 8a44fae14d3..8e9116701e0 100644 --- a/third-party/nsh/crates/nsh-core/src/core/mod.rs +++ b/third-party/nsh/crates/nsh-core/src/core/mod.rs @@ -11860,6 +11860,7 @@ impl Core { let horizontal = list.horizontal; let scroll = node.scroll.as_ref().expect("list scroll"); let zoom = scroll.zoom; + let old_height = scroll.content.map(|size| size.height.0); let inset = scroll.behavior.content_inset; let (leading, trailing) = if horizontal { (inset.left.0, inset.right.0) @@ -11947,6 +11948,7 @@ impl Core { } _ => (0.0, 0.0), }; + let keyboard_motion = !horizontal && self.list_motion.follows_keyboard(); let list = self.nodes[key as usize].list.as_mut().expect("list"); // Not on the first layout: there is nothing to clamp yet. let grew = outer.is_none() && list.viewport > 0.0 && main > list.viewport; @@ -11958,11 +11960,18 @@ impl Core { // about where the user is. let spliced = list.take_splice_anchor(); anchor += spliced; + let kept = anchor; if outer.is_none() { - let maximum = (list.content_len() * zoom - main + trailing).max(-leading); + let extent = list.content_len(); + let maximum = (extent * zoom - main + trailing).max(-leading); + let before = list.offset; list.predict_clamp(maximum); + if keyboard_motion && old_height.is_some_and(|height| extent < height) { + // Make the predicted clamp explicit before the content shrinks. + // List motion then offsets the retained rows before the scroll. + anchor += list.offset - before; + } } - let kept = anchor; // A row growing under its own layout animation (a reveal) moves // the end while its frames slide: a scroll to the new end would // land at once, ahead of them, so the list keeps its place. diff --git a/third-party/nsh/crates/nsh-core/src/core/tests.rs b/third-party/nsh/crates/nsh-core/src/core/tests.rs index 90a7f582664..7337e1b9aad 100644 --- a/third-party/nsh/crates/nsh-core/src/core/tests.rs +++ b/third-party/nsh/crates/nsh-core/src/core/tests.rs @@ -43088,6 +43088,132 @@ fn env_with_keyboard(height: f32, duration: f32) -> crate::element::Environment } } +#[test] +fn list_motion_keeps_the_last_row_above_the_composer_through_keyboard_motion() { + const COMPOSER: NodeId = 1000; + const VIEWPORT: f32 = 480.0; + const COMPOSER_HEIGHT: f32 = 44.0; + const GAP: f32 = 8.0; + + let (mut c, last) = list_following_its_end(false); + let frame = |c: &Core, id| c.nodes[c.key(id).unwrap() as usize].frame; + let cover = |c: &mut Core, keyboard: f32, duration| { + let inset = if keyboard > 0.0 { keyboard } else { 34.0 }; + c.begin_mount_turn(); + let mut environment = env_with_keyboard(keyboard, duration); + environment.reduce_motion = duration == 0.0; + c.set_environment(environment); + apply( + c, + vec![ + Op::SetProp { + id: 2, + prop: Prop::ListContent(crate::ListContentStyle { + padding: EdgeInsets { + bottom: px(inset + COMPOSER_HEIGHT + GAP), + ..Default::default() + }, + ..Default::default() + }), + }, + style_op( + COMPOSER, + &[ + ("position", StyleValue::Str("absolute")), + ("bottom", StyleValue::Number(0.0)), + ("height", StyleValue::Number(COMPOSER_HEIGHT)), + ( + "marginBottom", + if keyboard > 0.0 { + StyleValue::Str("env(keyboard-inset-height)") + } else { + StyleValue::Number(inset) + }, + ), + ], + ), + ], + ); + c.commit().unwrap() + }; + apply( + &mut c, + vec![ + Op::Create { + id: COMPOSER, + tag: Tag::View, + }, + style_op(2, &[("height", StyleValue::Number(VIEWPORT))]), + Op::Insert { + parent: ROOT_ID, + child: COMPOSER, + before: None, + }, + ], + ); + let mut platform = ScrollingPlatform::default(); + platform.apply(&cover(&mut c, 0.0, 0.0), 2, VIEWPORT); + platform.y = platform.content - VIEWPORT; + c.set_scroll_offset(2, point(px(0.0), px(platform.y)), u32::MAX); + c.commit(); + + for (keyboard, duration) in [(350.0, 250.0), (0.0, 250.0), (350.0, 0.0), (0.0, 0.0)] { + // Replay the platform's move: scroll offsets and the size clamp + // apply immediately; only the keyboard-animated frames interpolate. + let row_bottom = frame(&c, last).origin.y.0 + frame(&c, last).size.height.0; + let composer_top = frame(&c, COMPOSER).origin.y.0; + let (mut row_from, mut row_to) = (row_bottom, row_bottom); + let (mut composer_from, mut composer_to) = (composer_top, composer_top); + let batch = cover(&mut c, keyboard, duration); + let mut animated = false; + for item in batch.items { + match item { + MountItem::LayoutAnimation(a) => { + animated = a + .update + .is_some_and(|t| t.curve == crate::LayoutCurve::Keyboard) + } + MountItem::Frame { id, frame } if id == last => { + row_to = frame.origin.y.0 + frame.size.height.0; + if !animated { + row_from = row_to; + } + } + MountItem::Frame { + id: COMPOSER, + frame, + } => { + composer_to = frame.origin.y.0; + if !animated { + composer_from = composer_to; + } + } + MountItem::ScrollBy { id: 2, dx, dy } => { + assert_eq!(dx, Points::ZERO); + platform.y += dy.0; + } + MountItem::ScrollContent { id: 2, size } => platform.content = size.height.0, + _ => {} + } + platform.y = platform + .y + .clamp(0.0, (platform.content - VIEWPORT).max(0.0)); + } + assert_eq!(composer_from != composer_to, duration > 0.0); + for progress in [0.0, 0.24, 0.5, 1.0] { + let row = row_from + (row_to - row_from) * progress - platform.y; + let composer = composer_from + (composer_to - composer_from) * progress; + assert!( + (composer - row - GAP).abs() < 0.01, + "keyboard {keyboard}, animation {duration} ms, progress {progress}: gap = {}", + composer - row, + ); + } + c.set_scroll_offset(2, point(px(0.0), px(platform.y)), u32::MAX); + c.commit(); + } +} + #[test] fn keyboard_inset_height_pads_and_animates_with_the_keyboard() { let mut c = core(); diff --git a/third-party/nsh/crates/nsh-platform-ios/Cargo.toml b/third-party/nsh/crates/nsh-platform-ios/Cargo.toml index 89c92d2e9f2..425647ebd51 100644 --- a/third-party/nsh/crates/nsh-platform-ios/Cargo.toml +++ b/third-party/nsh/crates/nsh-platform-ios/Cargo.toml @@ -82,7 +82,7 @@ objc2-io-surface.workspace = true block2.workspace = true objc2-foundation.workspace = true objc2-quartz-core.workspace = true -objc2-ui-kit.workspace = true +objc2-ui-kit = { workspace = true, features = ["UIKeyboardLayoutGuide", "UITrackingLayoutGuide"] } objc2-authentication-services.workspace = true rustc-hash.workspace = true libc.workspace = true diff --git a/third-party/nsh/crates/nsh-platform-ios/src/surface.rs b/third-party/nsh/crates/nsh-platform-ios/src/surface.rs index a7b90248110..fc0d8656f18 100644 --- a/third-party/nsh/crates/nsh-platform-ios/src/surface.rs +++ b/third-party/nsh/crates/nsh-platform-ios/src/surface.rs @@ -33,11 +33,12 @@ use objc2_ui_kit::{ UIApplicationWillEnterForegroundNotification, UIApplicationWillResignActiveNotification, UIDevice, UIFocusAnimationCoordinator, UIFocusUpdateContext, UIFont, UIFontTextStyleBody, UIKeyboardAnimationCurveUserInfoKey, UIKeyboardAnimationDurationUserInfoKey, - UIKeyboardFrameEndUserInfoKey, UIKeyboardWillChangeFrameNotification, - UIKeyboardWillHideNotification, UIPress, UIPressesEvent, UIResponder, UISceneActivationState, - UISceneDidActivateNotification, UISceneDidEnterBackgroundNotification, - UISceneWillDeactivateNotification, UISceneWillEnterForegroundNotification, UITraitCollection, - UITraitEnvironment, UIUserInterfaceIdiom, UIUserInterfaceStyle, UIView, UIViewLayoutRegion, + UIKeyboardDidChangeFrameNotification, UIKeyboardFrameEndUserInfoKey, + UIKeyboardWillChangeFrameNotification, UIKeyboardWillHideNotification, UIPress, UIPressesEvent, + UIResponder, UISceneActivationState, UISceneDidActivateNotification, + UISceneDidEnterBackgroundNotification, UISceneWillDeactivateNotification, + UISceneWillEnterForegroundNotification, UITraitCollection, UITraitEnvironment, + UIUserInterfaceIdiom, UIUserInterfaceStyle, UIView, UIViewLayoutRegion, UIViewLayoutRegionAdaptivityAxis, UIWindowScene, }; @@ -150,6 +151,30 @@ struct Running { mounter: SharedMounter, } +#[derive(Clone, Copy, Debug, PartialEq)] +enum Keyboard { + Hidden, + Transitioning { inset: f32, until: f64 }, + // A docked keyboard can remain shown outside the surface's bounds. + Shown(f32), +} + +impl Keyboard { + fn inset(self) -> f32 { + match self { + Self::Hidden => 0.0, + Self::Transitioning { inset, .. } | Self::Shown(inset) => inset, + } + } + + fn settle(self, guide_inset: impl FnOnce() -> f32) -> Self { + match self { + Self::Hidden => Self::Hidden, + Self::Transitioning { .. } | Self::Shown(_) => Self::Shown(guide_inset()), + } + } +} + pub(crate) struct RootViewIvars { /// The app, waiting for the first non-empty layout. pending: RefCell>, @@ -159,8 +184,8 @@ pub(crate) struct RootViewIvars { on_error: SharedErrorHandler, /// A development update could not be applied in place. on_hot_failed: SharedHandler, - /// Keyboard height over the view and its animation duration. - keyboard: Cell<(f32, f32)>, + /// Keyboard state and its published animation duration in milliseconds. + keyboard: Cell<(Keyboard, f32)>, /// Whether the app is in use where the surface shows, as the /// notifications of its window's scene said last (the application's /// while it has none: [`RootView::observe_lifecycle`]). @@ -221,9 +246,17 @@ define_class!( } self.ivars().size.set(size); let viewport = Size::new(Points(size.width as f32), Points(size.height as f32)); - if let Some(running) = self.ivars().running.borrow().as_ref() { - running.engine.control().resize(viewport); - self.publish_environment(); + let control = self + .ivars() + .running + .borrow() + .as_ref() + .map(|r| r.engine.control()); + if let Some(control) = control { + control.resize(viewport); + if !self.reconcile_keyboard(false) { + self.publish_environment(); + } return; } let pending = self.ivars().pending.borrow_mut().take(); @@ -404,7 +437,7 @@ impl RootView { options, on_error: Arc::new(MainThreadBound::new(RefCell::new(None), mtm)), on_hot_failed: Arc::new(MainThreadBound::new(RefCell::new(None), mtm)), - keyboard: Cell::new((0.0, 250.0)), + keyboard: Cell::new((Keyboard::Hidden, 250.0)), lifecycle: Cell::new(lifecycle(mtm)), environment: Cell::new(None), host: Cell::default(), @@ -548,7 +581,7 @@ impl RootView { /// What JS sees through `windowSize()`, `safeArea()`, `keyboard()`... fn environment(&self) -> Environment { let size = self.bounds().size; - let (keyboard_height, keyboard_duration) = self.ivars().keyboard.get(); + let (keyboard, keyboard_duration) = self.ivars().keyboard.get(); // SAFETY: plain getters. let (style, body, scale, horizontal, vertical) = unsafe { let traits = self.traitCollection(); @@ -577,7 +610,7 @@ impl RootView { reserved_regions: self.reserved_regions(), // UIKit draws no title bar an app could hide. title_bar: Edges::default(), - keyboard_height: Points(keyboard_height), + keyboard_height: Points(keyboard.inset()), keyboard_duration, color_scheme: if style == UIUserInterfaceStyle::Dark { ColorScheme::Dark @@ -833,6 +866,8 @@ impl RootView { /// Tracks the software keyboard: JS sees its height, and the mounter /// keeps the focused input clear of it. fn observe_keyboard(this: &Retained) { + // Start tracking the docked keyboard before the first frame notification. + let _ = this.keyboardLayoutGuide(); let center = NSNotificationCenter::defaultCenter(); let weak = Weak::from_retained(this); let block = RcBlock::new(move |note: NonNull| { @@ -846,6 +881,7 @@ impl RootView { [ UIKeyboardWillChangeFrameNotification, UIKeyboardWillHideNotification, + UIKeyboardDidChangeFrameNotification, ] }; let mut observers = this.ivars().observers.borrow_mut(); @@ -888,52 +924,123 @@ impl RootView { } fn keyboard_changed(&self, note: &NSNotification) { - // The keyboard starts to move now, in the transaction posting this. + let name = note.name(); + // SAFETY: immutable UIKit constants. + let (completed, hiding) = unsafe { + ( + name.isEqualToString(UIKeyboardDidChangeFrameNotification), + name.isEqualToString(UIKeyboardWillHideNotification), + ) + }; + if completed && self.ivars().keyboard.get().0 == Keyboard::Hidden { + return; + } + let start = objc2_quartz_core::CACurrentMediaTime(); - let Some(info) = note.userInfo() else { return }; + let info = note.userInfo(); + let get = |key| info.as_ref().and_then(|info| info.objectForKey(key)); // SAFETY: UIKit documents these user info keys and their value types // (NSValue of a CGRect in screen coordinates, NSNumber of seconds, // NSNumber of a UIViewAnimationCurve). let (frame, duration, curve) = unsafe { - let frame = info - .objectForKey(UIKeyboardFrameEndUserInfoKey) + let frame = get(UIKeyboardFrameEndUserInfoKey) .and_then(|v| v.downcast::().ok()) .map(|v| v.CGRectValue()); - let duration = info - .objectForKey(UIKeyboardAnimationDurationUserInfoKey) + let duration = get(UIKeyboardAnimationDurationUserInfoKey) .and_then(|v| v.downcast::().ok()) .map_or(0.25, |n| n.doubleValue()); - let curve = info - .objectForKey(UIKeyboardAnimationCurveUserInfoKey) + let curve = get(UIKeyboardAnimationCurveUserInfoKey) .and_then(|v| v.downcast::().ok()) .map_or(7, |n| n.integerValue()); (frame, duration, curve) }; - let hiding = note.name().isEqualToString( - // SAFETY: an immutable UIKit constant. - unsafe { UIKeyboardWillHideNotification }, - ); - let height = match (frame, self.window().and_then(|w| w.windowScene())) { - (Some(frame), Some(scene)) if !hiding => { - let space = scene.screen().coordinateSpace(); + let target = if hiding { + None + } else { + frame.and_then(|frame| { + let window = self.window()?; + let space = window.windowScene()?.screen().coordinateSpace(); // SAFETY: `convertRect:fromCoordinateSpace:` of UICoordinateSpace. let frame: CGRect = unsafe { msg_send![self, convertRect: frame, fromCoordinateSpace: &*space] }; - let bounds = self.bounds(); - let overlaps = - frame.origin.x < bounds.size.width && frame.origin.x + frame.size.width > 0.0; - if overlaps { - (bounds.size.height - frame.origin.y).clamp(0.0, bounds.size.height) - } else { - 0.0 - } + keyboard_inset( + self.convertRect_fromView(window.bounds(), Some(&window)), + self.bounds(), + frame, + duration, + self.keyboardLayoutGuide().layoutFrame(), + self.safeAreaInsets().bottom, + ) + }) + }; + if completed { + if frame.is_none() || target.is_some() { + self.layoutIfNeeded(); + self.reconcile_keyboard(true); + } else { + self.publish_keyboard( + Keyboard::Hidden, + crate::mount::KeyboardMotion { + curve: 0, + duration: 0.0, + start, + }, + ); } - _ => 0.0, + return; + } + + let keyboard = match target { + None => Keyboard::Hidden, + Some(inset) if duration == 0.0 => Keyboard::Shown(inset), + Some(inset) => Keyboard::Transitioning { + inset, + until: start + duration, + }, }; + self.publish_keyboard( + keyboard, + crate::mount::KeyboardMotion { + curve, + duration, + start, + }, + ); + } + + fn reconcile_keyboard(&self, completed: bool) -> bool { + let (keyboard, duration) = self.ivars().keyboard.get(); + let now = objc2_quartz_core::CACurrentMediaTime(); + if !completed && matches!(keyboard, Keyboard::Transitioning { until, .. } if now < until) { + return false; + } + let settled = keyboard.settle(|| { + docked_guide_inset( + self.bounds(), + self.keyboardLayoutGuide().layoutFrame(), + self.safeAreaInsets().bottom, + ) + }); + if settled.inset() == keyboard.inset() { + self.ivars().keyboard.set((settled, duration)); + return false; + } + self.publish_keyboard( + settled, + crate::mount::KeyboardMotion { + curve: 0, + duration: 0.0, + start: now, + }, + ); + true + } + + fn publish_keyboard(&self, keyboard: Keyboard, motion: crate::mount::KeyboardMotion) { // UIKit gives seconds; the environment holds milliseconds. self.ivars() .keyboard - .set((height as f32, (duration * 1000.0) as f32)); + .set((keyboard, (motion.duration * 1000.0) as f32)); self.publish_environment(); let Some(mounter) = self .ivars() @@ -944,14 +1051,9 @@ impl RootView { else { return; }; - let height = height as f32; - let motion = crate::mount::KeyboardMotion { - curve, - duration, - start, - }; // Focusing an input while a batch is applied can post this // synchronously: then run it on the next main-queue turn. + let height = keyboard.inset(); let busy = match mounter.get(self.mtm()).try_borrow_mut() { Ok(mut m) => { if let Some(m) = m.as_mut() { @@ -1538,3 +1640,154 @@ pub(crate) fn os_version(mtm: MainThreadMarker) -> (u16, u16) { (parts.next().unwrap_or(0), parts.next().unwrap_or(0)) }) } + +fn keyboard_inset( + window: CGRect, + bounds: CGRect, + frame: CGRect, + duration: f64, + guide: CGRect, + safe_bottom: f64, +) -> Option { + // Judge visibility in the window, not in a potentially smaller surface. + let window_end = window.max(); + let frame_end = frame.max(); + if frame.origin.x >= window_end.x + || frame_end.x <= window.origin.x + || frame.origin.y >= window_end.y + || frame_end.y <= window.origin.y + || (frame_end.y < window_end.y && guide.size.height <= safe_bottom) + { + return None; + } + + let height = bottom_overlap(bounds, frame); + // After a modal dismisses, a zero-duration frame can omit the accessory + // still covered by the docked guide. Animated frames describe the target. + if height > 0.0 && duration == 0.0 { + Some(height.max(docked_guide_inset(bounds, guide, safe_bottom))) + } else { + Some(height) + } +} + +fn docked_guide_inset(bounds: CGRect, guide: CGRect, safe_bottom: f64) -> f32 { + if guide.size.height > safe_bottom { + bottom_overlap(bounds, guide) + } else { + 0.0 + } +} + +fn bottom_overlap(bounds: CGRect, frame: CGRect) -> f32 { + let bounds_end = bounds.max(); + if frame.origin.x < bounds_end.x && frame.max().x > bounds.origin.x { + // UIKit can keep the old guide height when the surface shrinks. + (bounds_end.y - frame.origin.y).clamp(0.0, bounds.size.height) as f32 + } else { + 0.0 + } +} + +#[cfg(test)] +mod tests { + use super::*; + use objc2_core_foundation::CGPoint; + + fn rect(x: f64, y: f64, width: f64, height: f64) -> CGRect { + CGRect::new(CGPoint::new(x, y), CGSize::new(width, height)) + } + + #[test] + fn keyboard_away_from_the_bottom_does_not_inset_the_surface() { + let ipad = rect(0.0, 0.0, 820.0, 1180.0); + let safe_area = rect(0.0, 1160.0, 820.0, 20.0); + let floating = rect(242.0, 682.5, 334.0, 334.0); + let undocked = rect(0.0, 682.5, 820.0, 334.0); + assert_eq!( + keyboard_inset(ipad, ipad, floating, 0.0, safe_area, 20.0), + None + ); + assert_eq!( + keyboard_inset(ipad, ipad, undocked, 0.25, safe_area, 20.0), + None + ); + assert_eq!( + Keyboard::Shown(497.5) + .settle(|| docked_guide_inset(ipad, safe_area, 20.0)) + .inset(), + 0.0 + ); + } + + #[test] + fn docked_keyboard_keeps_the_end_frame_and_restores_the_accessory_on_dismiss() { + let iphone = rect(0.0, 0.0, 874.0, 402.0); + let keys = rect(0.0, 178.0, 874.0, 224.0); + let inset_keys = rect(0.0, 178.0, 874.0, 204.0); + let safe_area = rect(0.0, 382.0, 874.0, 20.0); + let full = rect(0.0, 130.0, 874.0, 272.0); + let target = + |frame, duration, guide| keyboard_inset(iphone, iphone, frame, duration, guide, 20.0); + assert_eq!(target(keys, 0.25, safe_area), Some(224.0)); + assert_eq!(target(keys, 0.25, full), Some(224.0)); + assert_eq!(target(keys, 0.0, full), Some(272.0)); + assert_eq!(target(inset_keys, 0.0, full), Some(272.0)); + assert_eq!(target(keys, 0.0, safe_area), Some(224.0)); + assert_eq!(target(rect(874.0, 178.0, 874.0, 224.0), 0.0, full), None); + } + + #[test] + fn keyboard_completion_reconciles_with_the_docked_guide() { + let iphone = rect(0.0, 0.0, 874.0, 402.0); + let full = rect(0.0, 130.0, 874.0, 272.0); + let keys = rect(0.0, 178.0, 874.0, 224.0); + let settle = + |keyboard: Keyboard, guide| keyboard.settle(|| docked_guide_inset(iphone, guide, 20.0)); + let transition = Keyboard::Transitioning { + inset: 224.0, + until: 0.25, + }; + assert_eq!(settle(transition, full), Keyboard::Shown(272.0)); + assert_eq!(settle(transition, keys), Keyboard::Shown(224.0)); + assert_eq!(settle(Keyboard::Shown(272.0), keys).inset(), 224.0); + } + + #[test] + fn resizing_the_surface_reconciles_an_open_docked_keyboard() { + let iphone = rect(0.0, 0.0, 874.0, 402.0); + let guide = rect(0.0, 130.0, 874.0, 272.0); + let resize = |keyboard: Keyboard, bounds| { + keyboard.settle(|| docked_guide_inset(bounds, guide, 20.0)) + }; + let shown = + Keyboard::Shown(keyboard_inset(iphone, iphone, guide, 0.0, guide, 20.0).unwrap()); + let short = rect(0.0, 0.0, 874.0, 115.0); + let disjoint = resize(shown, short); + assert_eq!(disjoint.inset(), 0.0); + assert_eq!(resize(disjoint, iphone).inset(), 272.0); + assert_eq!( + keyboard_inset(iphone, short, guide, 0.0, guide, 20.0), + Some(0.0) + ); + + assert_eq!(resize(shown, rect(0.0, 0.0, 874.0, 342.0)).inset(), 212.0); + assert_eq!(resize(shown, rect(874.0, 0.0, 874.0, 342.0)).inset(), 0.0); + assert_eq!(resize(shown, rect(0.0, 160.0, 874.0, 160.0)).inset(), 160.0); + } + + #[test] + fn hidden_keyboard_stays_hidden_on_resize_and_late_completion() { + let iphone = rect(0.0, 0.0, 874.0, 402.0); + let stale_guide = rect(0.0, 130.0, 874.0, 272.0); + let hidden_frame = rect(0.0, 402.0, 874.0, 224.0); + assert_eq!( + keyboard_inset(iphone, iphone, hidden_frame, 0.25, stale_guide, 20.0), + None + ); + let resize = Keyboard::Hidden.settle(|| docked_guide_inset(iphone, stale_guide, 20.0)); + let late_completion = resize.settle(|| docked_guide_inset(iphone, stale_guide, 20.0)); + assert_eq!(resize.inset(), 0.0); + assert_eq!(late_completion, Keyboard::Hidden); + } +} From d9258d02f3677df31cc530f6a8acae5739c86f5c Mon Sep 17 00:00:00 2001 From: me2seeks Date: Sat, 28 Nov 2026 02:25:39 +0800 Subject: [PATCH 3/7] feat(ios): unify chat actions and add conversation details Generated-by: Maka --- DESIGN.md | 15 +- products/maka/ios-shell/app/bridge.ts | 8 +- products/maka/ios-shell/app/locale.ts | 8 +- .../app/screens/chats/ChatDetails.tsx | 108 + .../app/screens/chats/ChatQuotes.tsx | 39 +- .../app/screens/chats/ChatScreen.tsx | 897 ++++++--- .../app/screens/chats/ComposerPendingDock.tsx | 22 +- .../app/screens/chats/ThinkingSlider.tsx | 133 ++ products/maka/ios-shell/app/state/chat.ts | 475 ++++- products/maka/ios-shell/app/theme/tokens.ts | 6 + products/maka/ios-shell/app/ui/Icon.tsx | 11 +- products/maka/ios-shell/app/ui/InsetGroup.tsx | 38 +- products/maka/ios-shell/locales/de.json | 33 +- products/maka/ios-shell/locales/en.json | 33 +- products/maka/ios-shell/locales/es.json | 33 +- products/maka/ios-shell/locales/fr.json | 33 +- products/maka/ios-shell/locales/it.json | 33 +- products/maka/ios-shell/locales/ja.json | 33 +- products/maka/ios-shell/locales/ko.json | 33 +- products/maka/ios-shell/locales/pt-BR.json | 33 +- products/maka/ios-shell/locales/ru.json | 33 +- products/maka/ios-shell/locales/zh-CN.json | 33 +- products/maka/ios-shell/locales/zh-HK.json | 3 +- products/maka/ios-shell/locales/zh-TW.json | 33 +- products/maka/ios-shell/src/bridge.rs | 106 +- .../ios-shell/tests/ios_shell_behaviors.rs | 1750 ++++++++++++++--- 26 files changed, 3366 insertions(+), 616 deletions(-) create mode 100644 products/maka/ios-shell/app/screens/chats/ChatDetails.tsx create mode 100644 products/maka/ios-shell/app/screens/chats/ThinkingSlider.tsx diff --git a/DESIGN.md b/DESIGN.md index 14623d32598..5777a5f430d 100644 --- a/DESIGN.md +++ b/DESIGN.md @@ -113,9 +113,9 @@ Inspect UI changes in the native desktop renderer across both light and dark the | Chats, transcript and Pending connection status | Inline text shimmer during dials and online backoff, solid under Reduce Motion; static offline state while waiting for a network. No transition or placeholder over cached chats. | | Conversation and Bot work | Desktop five-stroke mark (4 s) and native text shimmer; static mark and solid text under Reduce Motion | | Approval actions | Approval press at 0.96 scale with a short opacity transition; no scale under Reduce Motion | -| Chat glass chrome | UIKit owns bar, menu and keyboard motion. The context pill does not intercept scroll gestures. Composer, quote and sheet controls change fill without dimming their foregrounds. Jump to Latest scrolls, or jumps under Reduce Motion. | +| Chat glass chrome | UIKit owns bar, menu and keyboard motion. The context pill does not intercept scroll gestures. The trailing bar items and More menu are native UIKit items. Composer, quote and sheet controls change fill without dimming their foregrounds. Jump to Latest scrolls, or jumps under Reduce Motion. | | Composer and transcript | Composer height, quotes, queue and live content reflow without a second animation. The composer and retained transcript rows follow NSH's keyboard transition when pinned to the tail. Keep the reading position otherwise. | -| Short chat viewport | Context hides; quotes, pending sends, queue and Latest stay reachable in the composer menu. Both sheets scroll above the keyboard and stay within the horizontal safe area. The quote sheet works offline. | +| Short chat viewport | Context hides; quotes, pending sends, queue and Latest stay reachable in the composer menu. Sheets scroll above the keyboard and stay within the horizontal safe area. The quote sheet works offline. | Approvals stay in a fixed one-row layout, with short press feedback and the outcome replacing the card’s action row. Pending uses the system segmented control (pill fallback off iOS); settings disclosures use the existing grouped rows and native confirmation dialogs. @@ -145,6 +145,15 @@ keyboard toolbar use the same material without pulling focus from the draft. | Steer status arrives or lands | Fast opacity enter/exit; no delayed removal from the transcript handoff | Immediate | | Queue disclosure, inline edit and review | Disclosure uses normal layout animation; editing and review reveal in place | Immediate | | Failure card / optimistic user bubble | Immediate feedback; no scripted scroll for queue actions | Same | -| Send and Send to Main Chat context menus | Native presentation/dismissal | System setting | +| Composer context menu and More | Native presentation/dismissal | System setting | | Selection or drag release | None added | — | | In-flight RPC and waiting for next step | Pulsing mark for RPC; static mark while waiting | Static mark | + +### iOS chat: reply controls and usage + +| Change | Motion | Reduced motion | +| --- | --- | --- | +| Send, Stop and Continue | Opaque press tint and an in-place glyph swap in the 36pt control inside the input pill (44pt touch target). A held press never changes its command. | Same | +| Model and More | UIKit presents the menu. Telemetry refreshes do not replace menu actions. The model checkmark stays on the confirmed selection until save completes. | System setting | +| Thinking capsule | Opens above the measured composer, without moving the draft or transcript. The thumb and tick follow each step immediately, including Default; failure restores the confirmed step. Changing model or connection ends the drag. Compact layout dismisses the capsule. | Same | +| Usage & Details | Opens only from More, at one visible sheet height. Usage and speed update in place. | System setting | diff --git a/products/maka/ios-shell/app/bridge.ts b/products/maka/ios-shell/app/bridge.ts index 23ea0e4b464..34b051cd6b1 100644 --- a/products/maka/ios-shell/app/bridge.ts +++ b/products/maka/ios-shell/app/bridge.ts @@ -159,6 +159,9 @@ export type { AgentHistoryPage, AgentRoomMessage, AgentDeliveryPage, + AgentExecution, + AgentSessionMetrics, + ThinkingLevel, AgentQueue, AgentPreviewPage, AgentInteractionSummary, @@ -364,6 +367,9 @@ export async function hostMutate( throw new MutationNotSubmitted('mutation progress ID is already in use'); progressListeners.set(key, onProgress); } + // Let Rust report which phase failed instead of timing out above it. + const chatMutation = + endpoint === 'agent' && (method === 'send' || method === 'continueRun' || method === 'stop'); try { const res = (await host.call( 'ios.hostMutate', @@ -378,7 +384,7 @@ export async function hostMutate( progressId: onProgress ? progressId : undefined, prepareRoomPost, }, - onProgress || (endpoint === 'agent' && method === 'send') ? { timeout: 0 } : undefined, + onProgress || chatMutation ? { timeout: 0 } : undefined, )) as { value: T } | { notSubmitted: string }; if ('notSubmitted' in res) throw new MutationNotSubmitted(res.notSubmitted); return res.value; diff --git a/products/maka/ios-shell/app/locale.ts b/products/maka/ios-shell/app/locale.ts index 80d82630557..505336009e6 100644 --- a/products/maka/ios-shell/app/locale.ts +++ b/products/maka/ios-shell/app/locale.ts @@ -82,8 +82,12 @@ const THINKING_LEVEL_KEYS = { ultra: 'Ultra', } satisfies Record; -export function thinkingLevelLabel(level: ThinkingLevel): string { - return Object.hasOwn(THINKING_LEVEL_KEYS, level) ? tr(THINKING_LEVEL_KEYS[level]) : level; +export function isThinkingLevel(level: string): level is ThinkingLevel { + return Object.hasOwn(THINKING_LEVEL_KEYS, level); +} + +export function thinkingLevelLabel(level: string): string { + return isThinkingLevel(level) ? tr(THINKING_LEVEL_KEYS[level]) : level; } function reportStorageError(cause: unknown) { diff --git a/products/maka/ios-shell/app/screens/chats/ChatDetails.tsx b/products/maka/ios-shell/app/screens/chats/ChatDetails.tsx new file mode 100644 index 00000000000..627167471e9 --- /dev/null +++ b/products/maka/ios-shell/app/screens/chats/ChatDetails.tsx @@ -0,0 +1,108 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { computed, View } from 'nsh'; +import type { AgentSessionMetrics } from '../../bridge'; +import { currentLocale, tr } from '../../locale'; +import { GroupRow, InsetGroup } from '../../ui'; + +function contextRatio(metrics: AgentSessionMetrics) { + const { contextTokens, contextWindow } = metrics; + return contextTokens != null && contextWindow != null && contextWindow > 0 + ? contextTokens / contextWindow + : null; +} + +function percent(ratio: number) { + const format = new Intl.NumberFormat(currentLocale(), { style: 'percent' }); + return ratio > 0 && ratio < 0.01 ? '<' + format.format(0.01) : format.format(ratio); +} + +function contextReading(metrics: AgentSessionMetrics) { + const { contextTokens, contextWindow, approximate } = metrics; + const format = new Intl.NumberFormat(currentLocale()); + const approx = approximate ? '≈' : ''; + const ratio = contextRatio(metrics); + return [ + contextTokens == null ? null : approx + format.format(contextTokens), + contextWindow != null && contextWindow > 0 ? format.format(contextWindow) : null, + ratio == null ? null : approx + percent(ratio), + ] as const; +} + +export function ChatDetails(props: { metrics: AgentSessionMetrics | null; cached: boolean }) { + const context = computed(() => { + const metrics = props.metrics; + if (!metrics) return tr('No usage data yet'); + const [used, window, ratio] = contextReading(metrics); + if (used !== null && window !== null) { + const tokens = tr('{used} / {window} tokens', { used, window }); + return ratio === null ? tokens : tokens + ' · ' + ratio; + } + if (used !== null) return tr('{used} tokens used', { used }); + if (window !== null) return tr('{window} token window', { window }); + return tr('No usage data yet'); + }); + const speed = () => { + const tps = props.metrics?.outputTokensPerSecond; + return tps == null + ? tr('Not measured') + : tr('{rate} tok/s', { + rate: new Intl.NumberFormat(currentLocale(), { + minimumFractionDigits: 1, + maximumFractionDigits: 1, + }).format(tps), + }); + }; + const source = () => { + const metrics = props.metrics; + if (!metrics) return undefined; + return metrics.connectionId ? metrics.modelId + ' · ' + metrics.connectionId : metrics.modelId; + }; + return ( + + + + + + + + + + + + ); +} diff --git a/products/maka/ios-shell/app/screens/chats/ChatQuotes.tsx b/products/maka/ios-shell/app/screens/chats/ChatQuotes.tsx index 1f31f6b21a0..b0dc86bc8f3 100644 --- a/products/maka/ios-shell/app/screens/chats/ChatQuotes.tsx +++ b/products/maka/ios-shell/app/screens/chats/ChatQuotes.tsx @@ -30,7 +30,6 @@ import { type HistoryRow, } from '../../state/chat'; import { showToast } from '../../state/hostPool'; -import { QueueSendMenu } from './ComposerPendingDock'; import { hapticSelection } from '../../state/preferences'; import { spacing, type } from '../../theme/tokens'; import { glassSurfaceStyle, ActionButton, Icon } from '../../ui'; @@ -295,7 +294,7 @@ export function DraftQuoteStrip(props: { onClearQuotes: () => void; onRemoveQuote: (id: number) => void; onRemoveLink: (id: string) => void; - mainActions?: { ask: () => void; send: () => void; queue?: () => void; canSend: boolean }; + onAskSide?: () => void; }) { const chips = computed(() => [...props.quotes, ...props.links]); return ( @@ -446,32 +445,16 @@ export function DraftQuoteStrip(props: { - - {(actions) => ( - - actions().send()} - /> - } - /> - actions().ask()} - /> - - )} + + + props.onAskSide?.()} + /> + ); diff --git a/products/maka/ios-shell/app/screens/chats/ChatScreen.tsx b/products/maka/ios-shell/app/screens/chats/ChatScreen.tsx index 6afa23221a6..eed711df043 100644 --- a/products/maka/ios-shell/app/screens/chats/ChatScreen.tsx +++ b/products/maka/ios-shell/app/screens/chats/ChatScreen.tsx @@ -20,9 +20,11 @@ import { computed, effect, + fontScale, keyboardFrame, List, openUrl, + platform, reduceMotion, safeAreaInsets, Scroll, @@ -36,7 +38,16 @@ import { type InputRef, type ListRef, } from 'nsh'; -import { Button, Input, MenuButton, NavPage, Sheet, TextView, type MenuButtonItem } from 'nsh/base'; +import { + Button, + ContextMenu, + Input, + MenuButton, + NavPage, + Sheet, + TextView, + type MenuButtonItem, +} from 'nsh/base'; import { InputAccessoryView } from 'nsh/mobile'; import { approvalControls, @@ -58,17 +69,17 @@ import { ConnectionProgress } from '../../ui/ConnectionProgress'; import { TranscriptSkeleton } from '../../ui/Skeleton'; import { ThinkingMark, ShimmerText } from '../../ui/ThinkingMark'; import { QuestionForm } from '../../ui/QuestionForm'; -import { currentLocale, formatCount, tr } from '../../locale'; +import { currentLocale, formatCount, isThinkingLevel, thinkingLevelLabel, tr } from '../../locale'; import { appendDraftQuote, appendSideLink, assembleHistoryRows, backendKey, + displayModelKey, clearDraftQuotes, conversationKey, draftQuote, createConversationController, - displayModelKey, getDraft, historyAddressKey, historyQuote, @@ -112,14 +123,11 @@ import { StatusDot, } from '../../ui'; +import { ChatDetails } from './ChatDetails'; +import { ThinkingSlider } from './ThinkingSlider'; import { DraftQuoteStrip, HistoryQuotes, MessageBody, ReplyActions } from './ChatQuotes'; import { SideQuestionList } from './ChatSideQuestions'; -import { - ComposerPendingDock, - QueueSendMenu, - pendingDockLimits, - type QueueEdit, -} from './ComposerPendingDock'; +import { ComposerPendingDock, pendingDockLimits, type QueueEdit } from './ComposerPendingDock'; interface ToolSummaryItem { id: string; @@ -632,8 +640,7 @@ export function ChatScreen( ? ctrl.roomMessages().map((message) => ({ kind: 'room' as const, key: message.id, message })) : turns(), ); - const isRunning = () => ctrl.observation()?.run != null; - const canQueue = () => !sideDraft && isRunning() && ctrl.hasDraftContent(); + const isRunning = () => ctrl.runTarget() !== null; const hostOnline = () => isHostConnected(rootId); const connectionProgress = () => hostConnectionProgress(rootId); const draft = () => getDraft(rootId, sessionId); @@ -643,41 +650,48 @@ export function ChatScreen( const editComposer = (text: string) => sideDraft ? sideDraft.text.set(text) : setDraft(rootId, sessionId, text); const quoteLimitReached = () => quotes().length >= quoteLimit; - const canSend = () => - sideDraft ? sideDraft.canSend() : ctrl.hasDraftContent() && !ctrl.sending(); - const send = (delivery: SendDelivery = 'steer') => { + const composing = signal(false); + const hasContent = () => ctrl.hasDraftEdits() || composing(); + const send = ( + delivery: SendDelivery, + target?: NonNullable>, + ) => { + if (!props.active() || composing()) return; if (sideDraft) void sideDraft.submit(); else - void ctrl.sendMessage(delivery).then((sent) => { + void ctrl.sendMessage(delivery, target).then((sent) => { if (sent && props.active()) scrollToBottom(false); }); }; - const sendButton = () => ( - send()} - activeStyle={{ backgroundColor: token('glass-primary-pressed-bg') }} - style={{ - width: 36, - height: 36, - borderRadius: 18, - backgroundColor: canSend() ? token('glass-accent') : token('surface-muted'), - alignItems: 'center', - justifyContent: 'center', - }} - > - - - ); + const runActions = () => { + const target = ctrl.runTarget(); + if (sideDraft || !target || ctrl.runControlBusy()) return null; + // Native menus can outlive the binding that opened them. Fence the item ID + // itself, so selecting A's item can never resolve to B's handler. + const id = JSON.stringify(target); + return { + target, + queue: { + id: 'queue:' + id, + label: tr('Add to queue'), + icon: 'text.append', + disabled: !ctrl.hasDraftContent() || ctrl.sending() || composing(), + }, + stop: { + id: 'stop:' + id, + label: tr('Stop current reply'), + icon: 'stop.fill', + destructive: true, + }, + }; + }; + const selectRunAction = (id: string) => { + const actions = runActions(); + if (!actions) return; + if (id === actions.stop.id) void ctrl.stopRun(actions.target); + if (id === actions.queue.id && !actions.queue.disabled) send('queue', actions.target); + }; const generation = computed(() => activeHostInfo(rootId)?.generation); const canAskSide = computed( @@ -831,34 +845,169 @@ export function ChatScreen( return isRunning() || Boolean(p.body.trim() || p.thinking.trim() || p.tools.length > 0); }; + const availableHeight = signal(windowSize().height); + const hasReferences = () => !ctrl.isRoom() && !!(quotes().length || links().length); + const queueEditor = signal(null); + const hasQueueDock = () => !!(ctrl.queuedMessages().length || queueEditor() || ctrl.queueError()); + const hasDeliveryDock = () => !!(ctrl.pendingSends().length || ctrl.steeringMessages().length); + // Leave room for the input at full height, context and at least two lines of transcript. + // On short pages the secondary controls move into a menu, not on top of the reader. + const compact = computed( + () => + availableHeight() < + 228 + + (hasReferences() ? (canAskFromTray() ? 148 : 104) : 0) + + // Reserve the expanded dock too, so opening it cannot change the mode. + (hasQueueDock() && !sideDraft ? pendingDockLimits.queue : 0) + + (hasDeliveryDock() && !sideDraft ? pendingDockLimits.delivery : 0) + + (hasLivePreview() ? 44 : 0), + ); + + const backend = ctrl.selectedBackend; + const selectedModelKey = () => { + const selected = backend(); + return selected && displayModelKey(selected); + }; + const selectedModel = computed(() => { + const key = selectedModelKey(); + return ctrl + .models() + .find( + ({ selection, aliases }) => + displayModelKey(selection) === key || + aliases?.some((alias) => displayModelKey(alias) === key), + ); + }); + const modelLocked = () => + !hostOnline() || !!ctrl.selectingModel() || ctrl.sending() || ctrl.continueRequestBusy(); const currentModelLabel = () => { - const chosen = ctrl.selectedBackend(); - if (!chosen) return tr('Default'); - const key = displayModelKey(chosen); + const selected = backend(); return ( - ctrl.models().find((model) => displayModelKey(model.selection) === key)?.label ?? - (chosen.kind === 'model' ? chosen.modelId : chosen.selection.executor) + selectedModel()?.label ?? + (selected?.kind === 'model' + ? selected.modelId + : (selected?.selection.settings.model ?? selected?.selection.executor ?? tr('Default'))) ); }; + const modelMenuItems = (): MenuButtonItem[] => + ctrl.models().map((model) => ({ + id: backendKey(model.selection), + label: model.label, + checked: model === selectedModel(), + singleSelection: true, + })); + const handleSelectModel = async (id: string) => { + if (!props.active() || ctrl.isRoom() || modelLocked()) return; + const match = ctrl.models().find((model) => backendKey(model.selection) === id); + if (match && match !== selectedModel()) { + closeThinking(); + if (await ctrl.selectModel(match.selection)) hapticSelection(); + } + }; - const modelMenuItems = (): MenuButtonItem[] => { - const chosen = ctrl.selectedBackend(); - const selectedKey = chosen ? displayModelKey(chosen) : null; - return ctrl.models().map((model) => { - const id = backendKey(model.selection); - return { - id, - label: model.label, - checked: displayModelKey(model.selection) === selectedKey, - singleSelection: true, - }; - }); + const levels = computed(() => { + if (sideDraft || ctrl.isRoom() || !backend()) return []; + const supported = selectedModel()?.thinkingLevels ?? []; + return backend()?.kind === 'model' ? supported.filter(isThinkingLevel) : supported; + }); + const confirmedThinking = () => { + const selected = backend(); + const choice = selectedModel(); + if (!selected || !choice) return null; + const alias = choice.aliases?.find( + (candidate) => displayModelKey(candidate) === selectedModelKey(), + ); + return ( + (selected.kind === 'model' + ? selected.thinkingLevel + : (selected.selection.settings.thinkingLevel ?? + (alias?.kind === 'executor' ? alias.selection.settings.thinkingLevel : null))) ?? null + ); + }; + const thinkingOpen = signal(false); + const thinkingStops = computed(() => [null, ...levels()]); + // A retained slider must not carry a drag across a different target or stop list. + const thinkingContext = computed(() => { + const selected = backend(); + const connection = generation(); + return selected && connection != null + ? JSON.stringify([backendKey(selected), connection, thinkingStops()]) + : null; + }); + type ThinkingPreview = { level: string | null; context: string; saving: boolean }; + const preview = signal(null); + const thinkingLevel = () => { + const value = preview(); + return value && value.context === thinkingContext() ? value.level : confirmedThinking(); + }; + const canPickThinking = () => thinkingStops().length > 1; + const thinkingAvailable = () => canPickThinking() && !compact(); + const closeThinking = () => { + thinkingOpen.set(false); + if (!preview()?.saving) preview.set(null); + }; + const openThinking = () => { + if (props.active() && thinkingAvailable() && !modelLocked()) thinkingOpen.set(true); + }; + effect(() => { + if (!props.active() || !thinkingAvailable() || !hostOnline()) closeThinking(); + const value = preview(); + if (value && !value.saving && value.context !== thinkingContext()) preview.set(null); + }); + const canEditThinking = (context: string) => + props.active() && + thinkingOpen() && + thinkingAvailable() && + !modelLocked() && + context === thinkingContext(); + const previewThinking = (context: string, level: string | null) => { + if (!canEditThinking(context) || level === thinkingLevel()) return; + preview.set({ level, context, saving: false }); + hapticSelection(); + }; + const commitThinking = async (context: string, level: string | null) => { + if (!canEditThinking(context)) return; + if (level === confirmedThinking()) { + preview.set(null); + return; + } + const selected = backend()!; + const canonical = selectedModel()!.selection; + previewThinking(context, level); + const pending: ThinkingPreview = { level, context, saving: true }; + preview.set(pending); + try { + if (selected.kind === 'model' && (level === null || isThinkingLevel(level))) { + const { thinkingLevel: _, ...model } = selected; + await ctrl.selectModel(level === null ? model : { ...model, thinkingLevel: level }); + } else if (canonical.kind === 'executor') { + const { + executor, + settings: { thinkingLevel: _, ...settings }, + } = canonical.selection; + await ctrl.selectModel({ + kind: 'executor', + selection: { + executor, + settings: { ...settings, ...(level !== null && { thinkingLevel: level }) }, + }, + }); + } + } finally { + if (preview() === pending) preview.set(null); + } }; - const handleSelectModel = (id: string) => { - const match = ctrl.models().find((model) => backendKey(model.selection) === id); - if (match) void ctrl.selectModel(match.selection); + const detailsOpen = signal(false); + const openDetails = () => { + if (!props.active() || ctrl.isRoom()) return; + closeThinking(); + detailsOpen.set(true); + void ctrl.refreshDetails(); }; + effect(() => { + if (!props.active()) detailsOpen.set(false); + }); const scrollToBottom = (animated = true) => { followLatest.set(true); @@ -1167,6 +1316,135 @@ export function ChatScreen( const canBringBack = () => !!props.mainChat && side(); const bringBackLabel = () => tr('Bring to Main Draft'); + // NSH assigns new UIKit action IDs when this binding is replaced. + const navigationMenu = computed( + (): MenuButtonItem[] => { + const count = ctrl.queuedMessages().length; + const actions = runActions(); + return [ + { id: 'files', label: tr('Files & Changes'), icon: 'folder' }, + ...(canAskSide() + ? [{ id: 'sides', label: tr('All Side Questions'), icon: 'bubble.left.and.bubble.right' }] + : []), + ...(count + ? [{ id: 'pending', label: tr('Queued Messages ({count})', { count }), icon: 'tray' }] + : []), + ...(actions && !actions.queue.disabled ? [actions.queue] : []), + ...(thinkingAvailable() && keyboardFrame().height === 0 + ? [ + { + id: 'thinking', + label: tr('Thinking level'), + icon: 'slider.horizontal.3', + disabled: modelLocked(), + }, + ] + : []), + ...(!ctrl.isRoom() + ? [{ id: 'usage', label: tr('Usage & Details'), icon: 'chart.bar' }] + : []), + { id: 'refresh', label: tr('Refresh'), icon: 'arrow.clockwise' }, + ...(actions ? [actions.stop] : []), + ]; + }, + { equals: (left, right) => JSON.stringify(left) === JSON.stringify(right) }, + ); + const selectNavigationAction = (id: string) => { + if (!props.active()) return; + switch (id) { + case 'files': + return openFiles(); + case 'sides': + return showAllSides(); + case 'pending': + return openQueue(); + case 'thinking': + return openThinking(); + case 'usage': + return openDetails(); + case 'refresh': + return void ctrl.refreshAll(); + default: + selectRunAction(id); + } + }; + // NavPage reapplies platform props by object identity, even when only the title was read again. + const nativeHeader = computed(() => ({ + headerRightItems: sideDraft + ? [] + : [ + { key: 'files', symbol: 'folder', label: tr('Files & Changes'), onPress: openFiles }, + ...(canBringBack() + ? [ + { + key: 'bring-main', + symbol: 'link', + label: bringBackLabel(), + onPress: () => void bringBack(), + }, + ] + : []), + { + key: 'more', + symbol: 'ellipsis.circle', + label: tr('More'), + menu: navigationMenu().map(({ id, label, icon, disabled, destructive }) => ({ + label, + symbol: icon ?? undefined, + disabled: Boolean(disabled), + destructive, + onSelect: () => selectNavigationAction(id), + })), + }, + ], + })); + const headerActions = () => ( + + + + + + selectNavigationAction(id)} + > + + + + + + ); + return ( void bringBack(), - }, - ] - : []), - { - key: 'more', - symbol: 'ellipsis.circle', - label: tr('More'), - menu: [ - { label: tr('Files & Changes'), onSelect: openFiles }, - ...(canAskSide() - ? [{ label: tr('All Side Questions'), onSelect: showAllSides }] - : []), - ...(ctrl.queuedMessages().length > 0 - ? [ - { - label: tr('Queued Messages ({count})', { - count: ctrl.queuedMessages().length, - }), - onSelect: openQueue, - }, - ] - : []), - ...(isRunning() - ? [{ label: tr('Stop Run'), onSelect: () => void ctrl.stopRun() }] - : []), - { label: tr('Refresh'), onSelect: () => void ctrl.refreshAll() }, - ], - }, - ], - }} + ios={nativeHeader()} header={ - - - - - - - - - - - - - - - ) - } + trailing={sideDraft ? undefined : headerActions()} /> } > @@ -1307,13 +1482,10 @@ export function ChatScreen( const bottomInset = () => keyboardHeight() || insets().bottom; const pageHeight = signal(windowSize().height); + effect(() => availableHeight.set(pageHeight() - insets().top - bottomInset())); const left = () => Math.max(spacing.pageX, insets().left); const right = () => Math.max(spacing.pageX, insets().right); - const hasReferences = () => !ctrl.isRoom() && !!(quotes().length || links().length); - const queueEditor = signal(null); const queueCount = () => ctrl.queuedMessages().length; - const hasQueueDock = () => !!(queueCount() || queueEditor() || ctrl.queueError()); - const hasDeliveryDock = () => !!(ctrl.pendingSends().length || ctrl.steeringMessages().length); const hasPendingDock = () => !sideDraft && (hasQueueDock() || hasDeliveryDock()); const pendingDockLabel = () => queueCount() ? tr('Queued Messages ({count})', { count: queueCount() }) : tr('Pending'); @@ -1321,18 +1493,7 @@ export function ChatScreen( const jumpToLatest = () => scrollToBottom(!reduceMotion()); const quoteSheetOpen = signal(false); - // Leave room for the input at full height, context and at least two lines of transcript. - // On short pages the secondary controls move into a menu, not on top of the reader. - const compact = computed( - () => - pageHeight() - insets().top - bottomInset() < - 228 + - (hasReferences() ? (canAskFromTray() ? 152 : 104) : 0) + - // Reserve the expanded dock too, so opening it cannot change the mode. - (hasQueueDock() && !sideDraft ? pendingDockLimits.queue : 0) + - (hasDeliveryDock() && !sideDraft ? pendingDockLimits.delivery : 0) + - (hasLivePreview() ? 44 : 0), - ); + const iconOnlyAccessory = () => fontScale() >= 2 || windowSize().width - left() - right() < 320; const inlineDock = () => !pendingSheetOpen() && (!compact() || !!queueEditor()); effect(() => { // A keyboard-only resize must not reparent the focused editor. @@ -1372,30 +1533,167 @@ export function ChatScreen( : removeDraftQuote(rootId, sessionId, id) } onRemoveLink={(id) => removeDraftLink(rootId, sessionId, id)} - mainActions={ + onAskSide={ hostOnline() && canAskFromTray() - ? { - ask: () => { - quoteSheetOpen.set(false); - askSide(traySource); - }, - send: () => { - quoteSheetOpen.set(false); - send(); - }, - canSend: canSend(), - queue: canQueue() - ? () => { - quoteSheetOpen.set(false); - send('queue'); - } - : undefined, + ? () => { + quoteSheetOpen.set(false); + askSide(traySource); } : undefined } /> ); + const primaryAction = () => { + const run = ctrl.runTarget(); + const stopping = ctrl.stoppingTarget(); + if (stopping) return { kind: 'stopping', run } as const; + if (ctrl.continueRequestBusy()) return { kind: 'continuing' } as const; + if (sideDraft) return { kind: 'send', enabled: sideDraft.canSend() && !composing() } as const; + if (!ctrl.sending() && !hasContent()) { + if (run) return { kind: 'stop', run } as const; + const resume = ctrl.continuationReady(); + if (resume) return { kind: 'resume', resume } as const; + } + return { + kind: 'send', + run, + enabled: ctrl.hasDraftContent() && !ctrl.sending() && !composing(), + } as const; + }; + const actionKey = computed(() => { + const action = primaryAction(); + const identity = + action.kind === 'resume' + ? [action.resume.key, action.resume.highWater] + : 'run' in action + ? action.run?.runId + : null; + return JSON.stringify([ + generation(), + props.active(), + action.kind, + identity, + action.kind === 'send' && action.enabled, + ]); + }); + let revision = 0; + let pressedAt: number | undefined; + effect(() => { + actionKey(); + revision++; + }); + const pressPrimary = () => { + const pressed = pressedAt; + pressedAt = undefined; + if ((pressed !== undefined && pressed !== revision) || !props.active() || !hostOnline()) + return; + const action = primaryAction(); + switch (action.kind) { + case 'send': + if (action.enabled) send('steer', action.run ?? undefined); + break; + case 'stop': + void ctrl.stopRun(action.run); + break; + case 'resume': + void ctrl.continueRun(action.resume, () => !composing()); + break; + } + }; + const glyph = () => { + switch (primaryAction().kind) { + case 'stop': + case 'stopping': + return 'stop'; + case 'resume': + return 'play'; + case 'continuing': + return hasContent() ? 'send' : 'play'; + default: + return 'send'; + } + }; + const actionLabel = () => { + switch (primaryAction().kind) { + case 'stop': + return tr('Stop current reply'); + case 'stopping': + return ctrl.stoppingTarget()?.phase === 'unknown' + ? tr('Stop not confirmed. Refresh to check the reply.') + : tr('Stopping reply…'); + case 'resume': + return tr('Continue reply'); + case 'continuing': + return tr('Continuing reply…'); + default: + return tr('Send message'); + } + }; + const disabled = () => { + const action = primaryAction(); + return ( + action.kind === 'stopping' || + action.kind === 'continuing' || + (action.kind === 'send' && !action.enabled) + ); + }; + const canAskInMenu = () => !sideDraft && canAskFromTray() && primaryAction().kind === 'send'; + const composerMenu = (): MenuButtonItem[] => { + if (primaryAction().kind !== 'send' || disabled()) return []; + const actions = runActions(); + return [ + ...(actions && !actions.queue.disabled ? [actions.queue] : []), + ...(canAskInMenu() + ? [{ id: 'ask-side', label: tr('Ask Side Question'), icon: 'arrow.turn.down.right' }] + : []), + ...(actions + ? [{ id: 'stop-section', label: '', inline: true, items: [actions.stop] }] + : []), + ]; + }; + const primaryButton = () => ( + { + pressedAt = revision; + }} + onPress={pressPrimary} + activeStyle={{ + backgroundColor: token( + glyph() === 'stop' ? 'glass-action-bg' : 'glass-primary-pressed-bg', + ), + }} + style={{ + width: 36, + height: 36, + borderRadius: 18, + alignItems: 'center', + justifyContent: 'center', + flexShrink: 0, + backgroundColor: token( + disabled() ? 'surface-muted' : glyph() === 'stop' ? 'surface-elevated' : 'glass-accent', + ), + }} + > + + + ); + const pendingDock = (inSheet: boolean) => ( void; editing?: boolean; + details?: boolean; children: JSX.Element; }) { return ( - - + + + + + {props.title} + + @@ -1863,7 +2191,9 @@ export function ChatScreen( } disabled={sideDraft?.busy()} ios={sideDraft ? undefined : { inputAccessoryViewID: accessoryId }} + onBlur={closeThinking} onChange={({ value }) => editComposer(value)} + onCompositionChange={({ composing: active }) => composing.set(active)} style={{ ...type.body, color: token('glass-foreground'), @@ -1875,33 +2205,18 @@ export function ChatScreen( maxHeight: compact() ? 30 : 116, }} /> - - send('queue') : undefined} - disabled={!canSend()} + 0} else={primaryButton()}> + { + if (id === 'ask-side' && props.active() && canAskInMenu()) + askSide(traySource); + else selectRunAction(id); + }} /> - - - void ctrl.stopRun()} - activeStyle={{ backgroundColor: token('glass-action-bg') }} - style={{ - width: 44, - height: 44, - borderRadius: 22, - backgroundColor: token('surface-elevated'), - alignItems: 'center', - justifyContent: 'center', - }} - > - - - @@ -1927,12 +2242,12 @@ export function ChatScreen( handleSelectModel(id)} // The native menu button covers its host, not the inset glass. - style={{ flexShrink: 1, paddingVertical: 4 }} + style={{ minWidth: 72, flexShrink: 1, paddingVertical: 4 }} > + + (thinkingOpen() ? closeThinking() : openThinking())} + hitSlop={{ top: 4, bottom: 4 }} + activeStyle={{ backgroundColor: token('glass-pressed-bg') }} + style={{ + ...glassSurfaceStyle(18), + minWidth: 44, + maxWidth: 120, + minHeight: 36, + paddingHorizontal: 10, + flexShrink: 0, + flexDirection: 'row', + alignItems: 'center', + justifyContent: 'center', + gap: 5, + }} + > + + + + {thinkingLevel() ? thinkingLevelLabel(thinkingLevel()!) : tr('Default')} + + + + + - - {tr('Changes')} - + + + {tr('Changes')} + + inputRef?.blur()} + onPress={() => { + closeThinking(); + inputRef?.blur(); + }} activeStyle={{ backgroundColor: token('glass-pressed-bg') }} style={{ ...glassSurfaceStyle(18), @@ -2029,6 +2395,69 @@ export function ChatScreen( /> + + + + 0 ? 'env(keyboard-inset-height)' : insets().bottom, + alignItems: 'center', + pointerEvents: 'box-none', + }} + > + context} + > + {(context) => ( + = 560} + onChange={(level) => previewThinking(context(), level)} + onCommit={(level) => commitThinking(context(), level)} + onClose={closeThinking} + /> + )} + + + + + + + detailsOpen.set(false)} + > + + + + void; - disabled: boolean; -}) { - return ( - - { - if (!props.disabled) props.onQueue?.(); - }} - /> - - ); -} - function SteeringPill(props: { text: string; sending?: boolean; queued?: boolean }) { const fade = reduceMotion() ? undefined diff --git a/products/maka/ios-shell/app/screens/chats/ThinkingSlider.tsx b/products/maka/ios-shell/app/screens/chats/ThinkingSlider.tsx new file mode 100644 index 00000000000..71157268402 --- /dev/null +++ b/products/maka/ios-shell/app/screens/chats/ThinkingSlider.tsx @@ -0,0 +1,133 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { keymap, Scroll, Text, View, token } from 'nsh'; +import { Slider } from 'nsh/base'; +import { thinkingLevelLabel, tr } from '../../locale'; +import { spacing, type } from '../../theme/tokens'; +import { glassSurfaceStyle } from '../../ui'; + +export function ThinkingSlider(props: { + stops: readonly (string | null)[]; + value: string | null; + disabled: boolean; + maxHeight: number; + horizontal: boolean; + onChange: (level: string | null) => void; + onCommit: (level: string | null) => void; + onClose: () => void; +}) { + keymap.bind('escape', props.onClose, { when: 'always' }); + const label = (level: string | null) => + level === null ? tr('Default') : thinkingLevelLabel(level); + return ( + + + { + if (typeof value === 'number') props.onChange(props.stops[value]!); + }} + onChangeEnd={({ value }) => { + if (typeof value === 'number') props.onCommit(props.stops[value]!); + }} + /> + + level ?? ''}> + {(level) => ( + props.onCommit(level())} + activeStyle={{ backgroundColor: token('glass-action-pressed-bg') }} + style={{ + flexGrow: 1, + minWidth: spacing.rowMinHeight, + minHeight: spacing.rowMinHeight, + alignItems: 'center', + justifyContent: 'center', + borderRadius: 16, + paddingHorizontal: 5, + backgroundColor: + props.value === level() ? token('glass-action-bg') : 'transparent', + }} + > + + {label(level())} + + + )} + + + + + ); +} diff --git a/products/maka/ios-shell/app/state/chat.ts b/products/maka/ios-shell/app/state/chat.ts index bd97108146e..6cc9c2477f3 100644 --- a/products/maka/ios-shell/app/state/chat.ts +++ b/products/maka/ios-shell/app/state/chat.ts @@ -40,6 +40,8 @@ import { type AgentQueueMutationResult, type AgentRun, type AgentObservation, + type AgentExecution, + type ServiceMethods, type AgentQueue, type AgentRoomMessage, type AgentSession, @@ -63,7 +65,33 @@ import { readDefaultModel, } from './settings/models'; import { settingsRpc } from './settings/rpc'; -import { tr } from '../locale'; +import { tr, type MessageKey } from '../locale'; + +type AgentOutput = ServiceMethods['agent'][M]['output']; +type RunTarget = { + rootId: string; + generation: number; + sessionId: string; + runId: AgentRun['runId']; +}; + +const continuationRejected: Record< + Extract, { kind: 'rejected' }>['reason'], + MessageKey +> = { + closed: 'Maka is shutting down. Try again after it restarts.', + archived: 'Restore this conversation to continue it.', + busy: 'Wait for the current reply and queue to finish.', + source_missing: 'There is no stopped reply to continue.', + source_changed: 'The conversation changed. Send a new message instead.', + source_not_terminal: 'Wait for this reply to finish before continuing.', + already_continued: 'This reply has already been continued.', + workspace_changed: 'The workspace changed. Send a new message instead.', + safety_check_failed: 'This reply can’t be continued safely. Send a new message instead.', +}; + +const isStoppedExecution = ({ state }: AgentExecution) => + state.kind === 'failed' || state.kind === 'cancelled'; export const backendKey = (backend: AgentBackendPreference) => JSON.stringify( @@ -80,13 +108,19 @@ export const backendKey = (backend: AgentBackendPreference) => backend.selection.executor, backend.selection.settings?.runtime ?? null, backend.selection.settings?.model ?? null, + backend.selection.settings?.thinkingLevel ?? null, ], ); export const displayModelKey = (backend: AgentBackendPreference) => backend.kind === 'model' ? JSON.stringify(['model', backend.connectionId, backend.modelId]) - : backendKey(backend); + : JSON.stringify([ + 'executor', + backend.selection.executor, + backend.selection.settings.runtime ?? null, + backend.selection.settings.model ?? null, + ]); export function compareHistoryRows( a: Pick, @@ -785,6 +819,7 @@ export function createConversationController( const current = observation(); return current?.session.backend ?? current?.rememberedBackend ?? null; }; + const lastObservation = () => observed()?.value ?? null; const chunks = signal(null); const roomMessages = signal(null); const isRoom = signal(initialSession.kind === 'room'); @@ -961,6 +996,13 @@ export function createConversationController( let disposed = false; let lastThrough: number | null = null; + const knownTip = signal<{ generation: number; through: number }>(); + const advanceTip = (generation: number, through: number) => { + const tip = untracked(knownTip); + if (tip?.generation !== generation || through > tip.through) { + knownTip.set({ generation, through }); + } + }; const historyFence = signal(); let pageEpoch = 0; effect(() => { @@ -1238,39 +1280,73 @@ export function createConversationController( } }; - let observeFlight: { generation: number; dirty: boolean; promise: Promise } | undefined; + let observeFlight: + | { generation: number; dirty: boolean; promise: Promise } + | undefined; const loadObserve = (fresh = true) => { const generation = activeHostInfo(rootId)?.generation; - if (generation === undefined || disposed) return Promise.resolve(); + if (generation === undefined || disposed) return Promise.resolve(null); if (observeFlight?.generation === generation) { if (fresh) observeFlight.dirty = true; return observeFlight.promise; } - const flight = { generation, dirty: true, promise: Promise.resolve() }; + const flight = { + generation, + dirty: true, + promise: Promise.resolve(null), + }; flight.promise = (async () => { try { - while (flight.dirty && !disposed && activeHostInfo(rootId)?.generation === generation) { + while (flight.dirty && isCurrent(generation)) { flight.dirty = false; - const obs = await hostQuery( - 'agent', - 'observe', - { sessionId }, - undefined, - rootId, - ); - if (disposed || activeHostInfo(rootId)?.generation !== generation) return; + let obs: AgentObservation; + try { + obs = await hostQuery( + 'agent', + 'observe', + { sessionId }, + undefined, + rootId, + ); + if (obs.session.id !== sessionId) + throw new Error('Host observed a different conversation'); + } catch (cause) { + if (!isCurrent(generation)) return null; + error.set(cause instanceof Error ? cause.message : String(cause)); + // Only an already queued read can follow this failure. + if (flight.dirty) continue; + return null; + } + if (!isCurrent(generation)) return null; const current = observation(); - if (current && obs.session.revision < current.session.revision) continue; - observed.set({ generation, value: obs }); - if (obs.session?.kind === 'room') isRoom.set(true); - if (typeof obs.through === 'number') { - lastThrough = Math.max(lastThrough ?? 0, obs.through); + if ( + current && + (obs.session.revision < current.session.revision || obs.through < current.through) + ) { + // A committed backend may have advanced the summary while this read + // was in flight. Watch events queued behind it still need a read. + if (flight.dirty) continue; + return null; } + batch(() => { + observed.set({ generation, value: obs }); + const request = pendingContinuation(); + const observedRunId = obs.run?.runId ?? obs.latestRunId; + if ( + request?.ownsComposer && + observedRunId != null && + observedRunId !== request.source.runId + ) { + continuationRequest.set({ ...request, ownsComposer: false }); + } + if (obs.session.kind === 'room') isRoom.set(true); + if (typeof obs.through === 'number') { + lastThrough = Math.max(lastThrough ?? 0, obs.through); + advanceTip(generation, obs.through); + } + }); } - } catch (cause) { - if (!disposed && activeHostInfo(rootId)?.generation === generation) { - error.set(cause instanceof Error ? cause.message : String(cause)); - } + return isCurrent(generation) ? observation() : null; } finally { if (observeFlight === flight) observeFlight = undefined; } @@ -1279,6 +1355,25 @@ export function createConversationController( return flight.promise; }; + const syncIdleTail = (snapshot: AgentObservation) => { + const fence = historyFence(); + if ( + snapshot === observation() && + !snapshot.run && + !isRoom() && + fence?.generation === activeHostInfo(rootId)?.generation && + fence?.through != null && + fence.through < snapshot.through + ) { + void loadHistory(); + } + }; + + const refreshDetails = async () => { + const snapshot = await loadObserve(false); + if (snapshot && !disposed) syncIdleTail(snapshot); + }; + const startWatch = (gen: number) => { stopWatch(); const subId = 'watch:' + rootId + ':' + sessionId + ':' + String(++watchSeq); @@ -1297,7 +1392,8 @@ export function createConversationController( !disposed && activeHostInfo(rootId)?.generation === generation; const applyQueue = (value: AgentQueue, generation: number) => { - if (!isCurrent(generation) || !(value.revision >= (queue()?.revision ?? -1))) return; + if (isRoom() || !isCurrent(generation) || !(value.revision >= (queue()?.revision ?? -1))) + return; batch(() => { queueSnapshot.set({ generation, value }); observedSteering.update((previous) => { @@ -1468,14 +1564,17 @@ export function createConversationController( const refreshAll = async () => { error.set(null); loading.set(true); + const stop = stoppingTarget(); try { - await Promise.all([ + const [snapshot] = await Promise.all([ loadObserve(), loadHistory(), loadInteractions(), loadModels(), refreshQueue(), ]); + if (snapshot && stop?.phase === 'unknown' && stopRequest() === stop) stopRequest.set(null); + return snapshot; } finally { if (!disposed) loading.set(false); } @@ -1550,13 +1649,12 @@ export function createConversationController( const draft = () => getDraft(rootId, sessionId); const sending = () => draft().sending; - const hasDraftContent = () => - Boolean( - trimHostWhitespace(draft().input.text) || - (!isRoom() && (draft().quotes.length || draft().links.length)), - ); + const hasDraftReferences = () => !isRoom() && !!(draft().quotes.length || draft().links.length); + const hasDraftEdits = () => draft().input.text.length > 0 || hasDraftReferences(); + const hasDraftContent = () => !!trimHostWhitespace(draft().input.text) || hasDraftReferences(); const submit = async (snapshot: DraftContent, delivery: SendDelivery, retryId?: number) => { + if (runControlBusy()) return false; const room = isRoom(); const content = room ? { input: snapshot.input, quotes: [], links: [] } : snapshot; if (sending() || (!sendText(content) && !content.quotes.length)) return false; @@ -1699,7 +1797,10 @@ export function createConversationController( } }; - const sendMessage = (delivery: SendDelivery = 'steer') => submit(draft(), delivery); + const sendMessage = (delivery: SendDelivery = 'steer', target?: RunTarget) => { + if (!active() || (target && !sameRun(target))) return Promise.resolve(false); + return submit(draft(), delivery); + }; const failedSend = (id: number) => composerSends().find( (send) => send.id === id && (send.state === 'failed' || send.state === 'unknown'), @@ -1750,24 +1851,247 @@ export function createConversationController( if (send?.state === 'failed') return submit(send.draft, send.delivery, id); }; - const stopRun = async () => { + const runTarget = computed(() => { + const generation = activeHostInfo(rootId)?.generation; const run = observation()?.run; - if (!run) return; + return !isRoom() && run && generation !== undefined + ? { rootId, generation, sessionId, runId: run.runId } + : null; + }); + const sameRun = (target: RunTarget) => + target.rootId === rootId && + target.sessionId === sessionId && + isCurrent(target.generation) && + runTarget()?.runId === target.runId; + const stopRequest = signal<{ target: RunTarget; phase: 'pending' | 'unknown' } | null>(null); + const stoppingTarget = () => { + const request = stopRequest(); + return request && sameRun(request.target) ? request : null; + }; + const stopRun = async (target: RunTarget) => { + if (!active() || !sameRun(target) || runControlBusy()) return; + const request = { target, phase: 'pending' } as const; + stopRequest.set(request); try { - await hostMutate('agent', 'stop', { sessionId, runId: run.runId }, { rootId }); - hapticNotification('warning'); + const result = await hostMutate>( + 'agent', + 'stop', + { sessionId, runId: target.runId }, + { rootId, generation: target.generation }, + ); + if (!isCurrent(target.generation)) return; + if (result.requested && active() && sameRun(target)) hapticNotification('warning'); await loadObserve(); + if (!result.requested && stopRequest() === request) stopRequest.set(null); } catch (cause) { - showToast(cause instanceof Error ? cause.message : String(cause)); + if (stopRequest() !== request || !sameRun(target)) return; + if (cause instanceof MutationNotSubmitted) { + stopRequest.set(null); + if (active()) showToast(tr('Could not stop the reply. Try again.')); + } else { + stopRequest.set({ target, phase: 'unknown' }); + if (active()) showToast(tr('Stop not confirmed. Refresh to check the reply.')); + void loadObserve(); + } + } + }; + + const watchObserveTip = signal<{ generation: number; through: number }>(); + const continuationCandidate = () => { + const generation = activeHostInfo(rootId)?.generation; + const obs = observation(); + const fence = historyFence(); + const tip = knownTip(); + const requiredObservation = watchObserveTip(); + const backend = selectedBackend(); + const rawQueue = queue(); + if ( + !enabled || + !active() || + isRoom() || + generation === undefined || + !obs || + obs.session.archived || + obs.run || + (requiredObservation?.generation === generation && + obs.through < requiredObservation.through) || + fence?.generation !== generation || + fence.through === null || + (tip?.generation === generation && fence.through < tip.through) || + !rawQueue || + rawQueue.entries.some(({ kind }) => kind !== 'held') || + selectingModel() || + sending() || + backend?.kind !== 'model' + ) + return null; + const runId = + obs.latestRunId ?? + chunks()?.findLast((row) => row.position.kind === 'live' && row.runId != null)?.runId; + if (!runId) return null; + return { + generation, + runId, + backend, + key: JSON.stringify([ + generation, + runId, + fence.through, + obs.through, + obs.session.workspace, + backendKey(backend), + ]), + }; + }; + const continuationKey = computed(() => continuationCandidate()?.key ?? null); + type ResumeSource = NonNullable> & { highWater: number }; + const verifiedContinuation = signal(null); + const continuationRequest = signal<{ source: ResumeSource; ownsComposer: boolean } | null>(null); + // An ambiguous receipt must not turn into a retry of the same durable source. + const settledContinuation = signal | null>(null); + const pendingContinuation = () => { + const request = continuationRequest(); + return request && isCurrent(request.source.generation) ? request : null; + }; + // Receipt deduplication lasts until settlement; composer ownership does not + // come back after a successor has been observed. + const continueRequestBusy = () => pendingContinuation()?.ownsComposer === true; + const runControlBusy = () => !!stoppingTarget() || continueRequestBusy(); + const availableContinuation = () => { + const source = verifiedContinuation(); + const settled = settledContinuation(); + return source && + source.key === continuationKey() && + !(settled?.runId === source.runId && settled.highWater === source.highWater) + ? source + : null; + }; + const continuationReady = () => (pendingContinuation() ? null : availableContinuation()); + const readExecution = (runId: ResumeSource['runId']) => + hostQuery>( + 'agent', + 'execution', + { sessionId, runId }, + undefined, + rootId, + ); + const matchesSource = (execution: AgentExecution, runId: ResumeSource['runId']) => + execution.sessionId === sessionId && execution.runId === runId && isStoppedExecution(execution); + const modelSupportsContinuation = async (backend: ResumeSource['backend']) => { + const model = await hostQuery>( + 'agent', + 'model', + { backend }, + undefined, + rootId, + ); + return ( + model.kind === 'ready' && + (backend.serviceTier == null || + model.choice.serviceTiers?.some(({ id }) => id === backend.serviceTier)) && + (backend.thinkingLevel == null || model.choice.thinkingLevels.includes(backend.thinkingLevel)) + ); + }; + const continueRun = async (source: ResumeSource, composerEmpty: () => boolean) => { + const eligible = () => + isCurrent(source.generation) && + availableContinuation() === source && + !hasDraftEdits() && + !sending() && + composerEmpty(); + if (!eligible() || pendingContinuation() || stoppingTarget()) return; + continuationRequest.set({ source, ownsComposer: true }); + const current = () => continueRequestBusy() && eligible(); + let submitted = false; + try { + const fresh = await loadObserve(); + if (!fresh) return; + if (!current()) { + if (isCurrent(source.generation)) syncIdleTail(fresh); + return; + } + const supported = await modelSupportsContinuation(source.backend); + if (!current()) return; + if (!supported) { + verifiedContinuation.set(null); + showToast(tr('The selected model is unavailable. Try again or choose another model.')); + return; + } + const result = await readExecution(source.runId); + if (!current()) return; + if ( + result.kind !== 'found' || + !matchesSource(result.execution, source.runId) || + result.execution.highWater !== source.highWater + ) { + verifiedContinuation.set(null); + showToast(tr('The conversation changed. Send a new message instead.')); + return; + } + const { connectionId, modelId, serviceTier, thinkingLevel } = source.backend; + submitted = true; + const receipt = await hostMutate>( + 'agent', + 'continueRun', + { + sessionId, + sourceRunId: source.runId, + sourceHighWater: source.highWater, + model: { connectionId, modelId, ...(serviceTier != null && { serviceTier }) }, + thinkingLevel: thinkingLevel ?? null, + }, + { rootId, generation: source.generation }, + ); + if (receipt.kind === 'started') { + if (receipt.execution.sessionId !== sessionId || receipt.execution.runId === source.runId) + throw new Error('Host returned an unexpected continuation'); + if (!disposed) settledContinuation.set(source); + } + if (!isCurrent(source.generation)) return; + if (receipt.kind === 'rejected') { + if (verifiedContinuation()?.runId === source.runId) verifiedContinuation.set(null); + showToast(tr(continuationRejected[receipt.reason])); + hapticNotification('error'); + } else hapticSelection(); + void loadHistory(); + void refreshQueue(source.generation); + await loadObserve(); + } catch (cause) { + const unknown = submitted && !(cause instanceof MutationNotSubmitted); + if (unknown && !disposed) settledContinuation.set(source); + if (isCurrent(source.generation)) { + console.warn('Could not confirm continuation', cause); + showToast( + unknown + ? tr('Continue not confirmed. Refresh to check the reply.') + : tr('Could not continue the reply. Try again.'), + ); + if (unknown) { + hapticNotification('warning'); + void loadHistory(); + void refreshQueue(source.generation); + await loadObserve(); + } else hapticNotification('error'); + } + } finally { + if (continuationRequest()?.source === source) continuationRequest.set(null); } }; const selectModel = (backend: AgentBackendPreference) => { const generation = activeHostInfo(rootId)?.generation; - if (disposed || isRoom() || generation === undefined || selectingModel() || sending()) return; + if ( + disposed || + isRoom() || + generation === undefined || + selectingModel() || + sending() || + continueRequestBusy() + ) + return; const alreadySelected = () => { const chosen = selectedBackend(); - return chosen !== null && displayModelKey(chosen) === displayModelKey(backend); + return chosen !== null && backendKey(chosen) === backendKey(backend); }; if (alreadySelected()) return; const done = (async () => { @@ -1787,9 +2111,12 @@ export function createConversationController( throw new Error(tr('Could not change the model.'), { cause: result.kind }); const current = observation()!; if (result.session.revision >= current.session.revision) { - observed.set({ generation, value: { ...current, session: result.session } }); + observed.set({ + generation, + value: { ...current, session: result.session, metrics: null }, + }); + void loadObserve(); } - hapticSelection(); return true; } catch (cause) { if (!disposed && activeHostInfo(rootId)?.generation === generation) { @@ -1968,11 +2295,16 @@ export function createConversationController( return; } if (page.kind === 'events') { - if (typeof page.through === 'number') lastThrough = Math.max(lastThrough ?? 0, page.through); + if (typeof page.through === 'number') { + lastThrough = Math.max(lastThrough ?? 0, page.through); + advanceTip(generation, page.through); + } let needsHistory = false; let needsObserve = false; + let needsCatalog = false; for (const ev of page.events ?? []) { const fact = ev.fact; + if (fact.kind === 'step_ended') needsObserve = true; if (fact.kind === 'delta') { livePreview.set(accumulator.applyDelta(ev.runId, fact.text)); } else if ( @@ -1990,15 +2322,20 @@ export function createConversationController( needsHistory = true; } else if (['opened', 'executor_started'].includes(fact.kind)) { needsObserve = true; + needsCatalog = true; } else if (fact.kind === 'ended') { needsHistory = true; needsObserve = true; + needsCatalog = true; livePreview.set(accumulator.beginHandoff()); } } if (needsHistory) void loadHistory(); - if (needsObserve) { + if (needsObserve || (!observation()?.run && needsHistory)) { + watchObserveTip.set({ generation, through: page.through }); void loadObserve(); + } + if (needsCatalog) { const hostName = hostById(rootId)?.hostName ?? rootId; void refreshHostSessions(rootId, hostName); } @@ -2024,6 +2361,51 @@ export function createConversationController( }); }); + effect(() => { + const key = continuationKey(); + const refreshing = loading(); + untracked(() => { + verifiedContinuation.set(null); + const candidate = continuationCandidate(); + if (!key || refreshing || !candidate) return; + let live = true; + cleanup(() => { + live = false; + }); + const current = () => live && isCurrent(candidate.generation) && continuationKey() === key; + void (async () => { + try { + const result = await readExecution(candidate.runId); + if ( + !current() || + result.kind !== 'found' || + !matchesSource(result.execution, candidate.runId) + ) + return; + const availability = await hostQuery>( + 'agent', + 'continuationAvailability', + { sessionId, runId: candidate.runId }, + undefined, + rootId, + ); + if ( + !current() || + availability.kind !== 'ready' || + !matchesSource(availability.source, candidate.runId) || + availability.source.highWater !== result.execution.highWater + ) + return; + const supported = await modelSupportsContinuation(candidate.backend); + if (current() && supported) + verifiedContinuation.set({ ...candidate, highWater: result.execution.highWater }); + } catch (cause) { + if (current()) console.warn('Could not check whether the reply can continue', cause); + } + })(); + }); + }); + cleanup(() => { disposed = true; stopWatch(); @@ -2031,6 +2413,8 @@ export function createConversationController( return { observation, + lastObservation, + refreshDetails, selectedBackend, selectingModel, chunks: visibleChunks, @@ -2043,6 +2427,7 @@ export function createConversationController( earlierFailed, sending, hasDraftContent, + hasDraftEdits, error, queue, queuedMessages, @@ -2064,7 +2449,13 @@ export function createConversationController( historyFence, readHistoryDetail, sendMessage, + runTarget, + stoppingTarget, stopRun, + continuationReady, + continueRequestBusy, + runControlBusy, + continueRun, selectModel, readQueuedMessage, promoteQueuedMessage: (messageId: string) => changeQueue({ kind: 'promote', messageId }), diff --git a/products/maka/ios-shell/app/theme/tokens.ts b/products/maka/ios-shell/app/theme/tokens.ts index 558078a1d98..df9f9f13367 100644 --- a/products/maka/ios-shell/app/theme/tokens.ts +++ b/products/maka/ios-shell/app/theme/tokens.ts @@ -31,6 +31,8 @@ const light = { 'glass-bg': 'rgba(255, 255, 255, 0.68)', 'glass-pressed-bg': 'rgba(221, 221, 229, 0.82)', 'glass-border': 'rgba(0, 0, 0, 0.08)', + 'glass-slider-track': 'rgba(48, 48, 63, 0.50)', + 'glass-slider-thumb': 'rgba(0, 89, 184, 0.92)', 'glass-shadow': 'rgba(0, 0, 0, 0.09)', 'surface-muted': '#E5E5EA', muted: '#E5E5EA', @@ -54,6 +56,7 @@ const light = { success: '#34C759', 'success-tint': 'rgba(52, 199, 89, 0.13)', warning: '#FF9500', + 'warning-ink': '#8A5100', 'warning-tint': 'rgba(255, 149, 0, 0.13)', destructive: '#FF3B30', 'destructive-tint': 'rgba(255, 59, 48, 0.12)', @@ -97,6 +100,8 @@ export function installTheme() { 'glass-bg': 'rgba(36, 36, 38, 0.66)', 'glass-pressed-bg': 'rgba(54, 54, 59, 0.86)', 'glass-border': 'rgba(255, 255, 255, 0.12)', + 'glass-slider-track': 'rgba(223, 223, 236, 0.45)', + 'glass-slider-thumb': 'rgba(141, 200, 255, 0.92)', 'glass-shadow': 'rgba(0, 0, 0, 0.42)', 'surface-muted': '#2C2C2E', muted: '#2C2C2E', @@ -120,6 +125,7 @@ export function installTheme() { success: '#30D158', 'success-tint': 'rgba(48, 209, 88, 0.18)', warning: '#FF9F0A', + 'warning-ink': '#FFB647', 'warning-tint': 'rgba(255, 159, 10, 0.18)', destructive: '#FF453A', 'destructive-tint': 'rgba(255, 69, 58, 0.16)', diff --git a/products/maka/ios-shell/app/ui/Icon.tsx b/products/maka/ios-shell/app/ui/Icon.tsx index 9842ed6551e..27a400708ea 100644 --- a/products/maka/ios-shell/app/ui/Icon.tsx +++ b/products/maka/ios-shell/app/ui/Icon.tsx @@ -20,7 +20,7 @@ import { Canvas, Path2D, Text, View, platform, token, type CanvasRenderingContext2D } from 'nsh'; type Shape = - | { tag: 'path'; d: string } + | { tag: 'path' | 'filledPath'; d: string } | { tag: 'circle'; cx: number; cy: number; r: number } | { tag: 'rect'; x: number; y: number; width: number; height: number; rx?: number } | { tag: 'line'; x1: number; y1: number; x2: number; y2: number }; @@ -192,7 +192,8 @@ const glyphs = { { tag: 'line', x1: 12, y1: 18, x2: 12, y2: 6 }, { tag: 'path', d: 'm7 11 5-5 5 5' }, ], - stop: [{ tag: 'rect', x: 6.5, y: 6.5, width: 11, height: 11, rx: 2 }], + stop: [{ tag: 'filledPath', d: 'M4 4h16v16H4z' }], + play: [{ tag: 'filledPath', d: 'M6 3 21 12 6 21z' }], folder: [ { tag: 'path', @@ -243,7 +244,7 @@ export type IconName = keyof typeof glyphs; const pathCache = new Map(); for (const shapes of Object.values(glyphs)) { for (const s of shapes) { - if (s.tag === 'path' && !pathCache.has(s.d)) { + if ((s.tag === 'path' || s.tag === 'filledPath') && !pathCache.has(s.d)) { pathCache.set(s.d, new Path2D(s.d)); } } @@ -251,6 +252,9 @@ for (const shapes of Object.values(glyphs)) { function drawShape(cx: CanvasRenderingContext2D, shape: Shape) { switch (shape.tag) { + case 'filledPath': + cx.fill(pathCache.get(shape.d)!); + return; case 'path': cx.stroke(pathCache.get(shape.d)!); return; @@ -294,6 +298,7 @@ export function Icon(props: { draw={(cx) => { const scale = size() / 24; cx.scale(scale, scale); + cx.fillStyle = props.color; cx.strokeStyle = props.color; cx.lineWidth = props.strokeWidth ?? 1.9; cx.lineCap = 'round'; diff --git a/products/maka/ios-shell/app/ui/InsetGroup.tsx b/products/maka/ios-shell/app/ui/InsetGroup.tsx index dce4c67dfe7..9a070eabbc4 100644 --- a/products/maka/ios-shell/app/ui/InsetGroup.tsx +++ b/products/maka/ios-shell/app/ui/InsetGroup.tsx @@ -21,7 +21,7 @@ import { Text, View, token, type JSX } from 'nsh'; import { spacing, type } from '../theme/tokens'; import { Icon } from './Icon'; -export function GroupHeader(props: { title: string; trailing?: JSX.Element }) { +export function GroupHeader(props: { title: string; trailing?: JSX.Element; variant?: 'glass' }) { return ( {props.title} @@ -46,7 +46,7 @@ export function GroupHeader(props: { title: string; trailing?: JSX.Element }) { ); } -export function GroupFooter(props: { text: string }) { +export function GroupFooter(props: { text: string; variant?: 'glass' }) { return ( {props.text} @@ -87,12 +87,17 @@ export function InsetGroup(props: { headerTrailing?: JSX.Element; footer?: string; elevated?: boolean; + variant?: 'glass'; children?: JSX.Element; }) { return ( - + - + ); @@ -119,6 +124,8 @@ export function GroupRow(props: { value?: string; trailing?: JSX.Element; chevron?: boolean; + selected?: boolean; + variant?: 'glass'; tone?: 'default' | 'primary' | 'destructive'; disabled?: boolean; divider?: boolean; @@ -134,6 +141,12 @@ export function GroupRow(props: { return token('foreground'); }; + const accessoryColor = () => + token(props.variant === 'glass' ? 'glass-muted' : 'muted-foreground'); + const value = () => { + const text = [props.value, props.subtitle].filter(Boolean).join(' · '); + return text ? { text } : undefined; + }; const hasLeading = () => props.leading !== undefined; const inset = () => props.dividerInset ?? (hasLeading() ? 56 : 16); @@ -170,7 +183,7 @@ export function GroupRow(props: { @@ -213,6 +226,8 @@ export function GroupRow(props: { {rowContent} diff --git a/products/maka/ios-shell/locales/de.json b/products/maka/ios-shell/locales/de.json index 4aee1bd9e33..b433c9d03d1 100644 --- a/products/maka/ios-shell/locales/de.json +++ b/products/maka/ios-shell/locales/de.json @@ -113,9 +113,14 @@ "Connection is unavailable": "Verbindung nicht verfügbar", "Connection timed out": "Zeitüberschreitung bei der Verbindung", "Connections": "Verbindungen", + "Context": "Kontext", + "Context from the last request. Newer content isn’t included.": "Kontext der letzten Anfrage. Neuere Inhalte sind nicht enthalten.", "Context window": "Kontextfenster", + "Continue not confirmed. Refresh to check the reply.": "Fortsetzung nicht bestätigt. Aktualisiere, um die Antwort zu prüfen.", "Continue only if this code matches the one displayed on your computer.": "Fahre nur fort, wenn dieser Code mit dem auf deinem Computer angezeigten übereinstimmt.", + "Continue reply": "Antwort fortsetzen", "Continue your work from any computer": "Arbeite von jedem Computer aus weiter", + "Continuing reply…": "Antwort wird fortgesetzt…", "Conversation title": "Titel der Unterhaltung", "Conversation: {title}": "Unterhaltung: {title}", "Copied": "Kopiert", @@ -126,6 +131,7 @@ "Copy reply": "Antwort kopieren", "Could not change the model.": "Modell konnte nicht gewechselt werden.", "Could not confirm whether the message was sent. Check the conversation or queue before retrying.": "Es ist unklar, ob die Nachricht gesendet wurde. Prüfe vor einem erneuten Versuch den Chatverlauf oder die Warteschlange.", + "Could not continue the reply. Try again.": "Die Antwort konnte nicht fortgesetzt werden. Versuch es erneut.", "Could not copy the edit.": "Die Bearbeitung konnte nicht kopiert werden.", "Could not create the side question. Try again.": "Die Nebenfrage konnte nicht erstellt werden. Versuch es erneut.", "Could not install the plugin.": "Plugin konnte nicht installiert werden.", @@ -143,6 +149,7 @@ "Could not save the proxy password.": "Proxy-Passwort konnte nicht gespeichert werden.", "Could not save the search API key.": "Such-API-Schlüssel konnte nicht gespeichert werden.", "Could not send the message.": "Nachricht konnte nicht gesendet werden.", + "Could not stop the reply. Try again.": "Die Antwort konnte nicht gestoppt werden. Versuch es erneut.", "Could not sync Pending": "Ausstehende Anfragen konnten nicht synchronisiert werden", "Could not sync chats": "Chats konnten nicht synchronisiert werden", "Could not update the conversation.": "Unterhaltung konnte nicht aktualisiert werden.", @@ -246,6 +253,8 @@ "JSON body": "JSON-Body", "Keep my edit": "Meine Bearbeitung behalten", "Language": "Sprache", + "Last request": "Letzte Anfrage", + "Last synced": "Zuletzt synchronisiert", "Latest": "Aktuell", "Leave blank for automatic title": "Für automatischen Titel leer lassen", "Light": "Hell", @@ -256,6 +265,7 @@ "Loading…": "Wird geladen…", "Low": "Niedrig", "MCP": "MCP", + "Maka is shutting down. Try again after it restarts.": "Maka wird beendet. Versuch es nach dem Neustart erneut.", "Max output tokens": "Maximale Ausgabetokens", "Maximum": "Maximal", "Medium": "Mittel", @@ -293,8 +303,10 @@ "No skills": "Keine Fähigkeiten", "No turn is running. This message remains queued.": "Es läuft kein Durchgang. Diese Nachricht bleibt in der Warteschlange.", "No uncommitted changes": "Keine offenen Änderungen", + "No usage data yet": "Noch keine Nutzungsdaten", "No workspace path configured for this chat.": "Für diesen Chat ist kein Arbeitsbereichspfad festgelegt.", "None": "Keine", + "Not measured": "Nicht gemessen", "Not sent. Choose a workspace, then retry.": "Nicht gesendet. Wähle einen Arbeitsbereich aus und versuche es erneut.", "Now": "Jetzt", "Off": "Aus", @@ -304,6 +316,7 @@ "Open Settings": "Einstellungen öffnen", "Open sign-in page": "Anmeldeseite öffnen", "Optional token": "Optionales Token", + "Output speed": "Ausgabegeschwindigkeit", "Package entry": "Paketeinstieg", "Package settings": "Paketeinstellungen", "Pair with Link": "Per Link koppeln", @@ -387,6 +400,7 @@ "Request details": "Anfragedetails", "Request is unavailable": "Anfrage ist nicht verfügbar", "Required token": "Erforderliches Token", + "Restore this conversation to continue it.": "Stelle dieses Gespräch wieder her, um es fortzusetzen.", "Result URL path": "Pfad zur Ergebnis-URL", "Result limit location": "Position des Ergebnislimits", "Result limit parameter (optional)": "Parameter für Ergebnislimit (optional)", @@ -428,7 +442,6 @@ "Secret access key": "Geheimer Zugriffsschlüssel", "Select model": "Modell wählen", "Send message": "Nachricht senden", - "Send to Main Chat": "Im Hauptchat senden", "Sending…": "Wird gesendet…", "Server-side compaction": "Serverseitige Komprimierung", "Service": "Dienst", @@ -452,8 +465,10 @@ "Steer now": "Jetzt lenken", "Steer or message…": "Lenken / schreiben…", "Steer · Waiting for next step": "Lenken · Wartet auf nächsten Schritt", - "Stop Run": "Lauf stoppen", + "Stop current reply": "Aktuelle Antwort stoppen", + "Stop not confirmed. Refresh to check the reply.": "Stopp nicht bestätigt. Aktualisiere, um die Antwort zu prüfen.", "Stopped before delivery. Your message is kept.": "Vor Zustellung gestoppt. Ihre Nachricht bleibt erhalten.", + "Stopping reply…": "Antwort wird gestoppt…", "Subagents": "Subagenten", "Submit Answer": "Antwort senden", "System": "System", @@ -465,6 +480,7 @@ "Team ID": "Team-ID", "Test connection": "Verbindung testen", "The active turn changed. Your message is kept.": "Der aktive Lauf hat sich geändert. Deine Nachricht bleibt erhalten.", + "The conversation changed. Send a new message instead.": "Das Gespräch hat sich geändert. Sende stattdessen eine neue Nachricht.", "The deployment document is invalid.": "Das Bereitstellungsdokument ist ungültig.", "The main conversation is no longer available.": "Die Hauptunterhaltung ist nicht mehr verfügbar.", "The plugin bundle could not be downloaded.": "Das Plugin-Paket konnte nicht heruntergeladen werden.", @@ -477,7 +493,10 @@ "The selected model is unavailable. Try again or choose another model.": "Das ausgewählte Modell ist nicht verfügbar. Versuchen Sie es erneut oder wählen Sie ein anderes Modell.", "The selected package is unavailable.": "Das ausgewählte Paket ist nicht verfügbar.", "The selected plugin instance is unavailable.": "Die ausgewählte Plugin-Instanz ist nicht verfügbar.", + "The workspace changed. Send a new message instead.": "Der Arbeitsbereich hat sich geändert. Sende stattdessen eine neue Nachricht.", + "There is no stopped reply to continue.": "Es gibt keine gestoppte Antwort zum Fortsetzen.", "These servers run outside the conversation sandbox and can run commands as your user or contact remote services. Full-access sessions can call their tools without further confirmation.": "Diese Server laufen außerhalb der Unterhaltungs-Sandbox und können Befehle als Ihr Benutzer ausführen oder entfernte Dienste kontaktieren. Sitzungen mit Vollzugriff können ihre Werkzeuge ohne weitere Bestätigung aufrufen.", + "Thinking level": "Denktiefe", "Thinking · {count, plural, one {# tool running} other {# tools running}}…": "Denkt nach · {count, plural, one {# Tool aktiv} other {# Tools aktiv}}…", "Thinking…": "Denkt nach…", "This QR code is not a Maka pairing link.": "Dieser QR-Code ist kein Maka-Kopplungslink.", @@ -491,6 +510,8 @@ "This iPhone Peer ID": "Peer-ID dieses iPhones", "This iPhone will disconnect from this computer and forget its pairing credentials. You can pair it again anytime.": "Dieses iPhone wird von diesem Computer getrennt und vergisst die Kopplungsdaten. Du kannst ihn jederzeit erneut koppeln.", "This message is no longer queued.": "Diese Nachricht ist nicht mehr in der Warteschlange.", + "This reply can’t be continued safely. Send a new message instead.": "Diese Antwort lässt sich nicht sicher fortsetzen. Sende stattdessen eine neue Nachricht.", + "This reply has already been continued.": "Diese Antwort wurde schon fortgesetzt.", "This run": "Dieser Lauf", "This server stores literal environment variables or HTTP headers. Edit it on Desktop.": "Dieser Server speichert Umgebungsvariablen oder HTTP-Header im Klartext. Bearbeite ihn am Desktop.", "This session": "Diese Sitzung", @@ -514,6 +535,8 @@ "Unavailable": "Nicht verfügbar", "Unpin": "Lösen", "Update": "Aktualisieren", + "Usage": "Nutzung", + "Usage & Details": "Nutzung & Details", "Usage credential": "Zugangsdaten für Nutzungsdaten", "Use Host default": "Host-Standard verwenden", "Use a URL without credentials.": "Verwende eine URL ohne Zugangsdaten.", @@ -524,6 +547,8 @@ "Verification code": "Bestätigungscode", "Verification code copied": "Bestätigungscode kopiert", "View All Side Questions": "Alle Nebenfragen ansehen", + "Wait for the current reply and queue to finish.": "Warte, bis die aktuelle Antwort und die Warteschlange abgearbeitet sind.", + "Wait for this reply to finish before continuing.": "Warte, bis diese Antwort abgeschlossen ist.", "Waiting for current turn": "Wartet auf aktuellen Durchlauf", "Waiting for provider sign-in…": "Warte auf Anmeldung beim Anbieter…", "Waiting for queue…": "Warte auf die Warteschlange …", @@ -555,6 +580,10 @@ "{name} Bot": "{name}-Bot", "{name} is offline": "{name} ist offline", "{name} · Online": "{name} · Erreichbar", + "{rate} tok/s": "{rate} Token/s", "{title} · Waiting for your response": "{title} · Wartet auf deine Antwort", + "{used} / {window} tokens": "{used} / {window} Token", + "{used} tokens used": "Belegt: {used} Token", + "{window} token window": "Kontextfenster: {window} Token", "“{title}” on {computer} will be permanently deleted.": "„{title}“ auf {computer} wird dauerhaft gelöscht." } diff --git a/products/maka/ios-shell/locales/en.json b/products/maka/ios-shell/locales/en.json index d49c9ca38bf..2e628589180 100644 --- a/products/maka/ios-shell/locales/en.json +++ b/products/maka/ios-shell/locales/en.json @@ -113,9 +113,14 @@ "Connection is unavailable": "Connection is unavailable", "Connection timed out": "Connection timed out", "Connections": "Connections", + "Context": "Context", + "Context from the last request. Newer content isn’t included.": "Context from the last request. Newer content isn’t included.", "Context window": "Context window", + "Continue not confirmed. Refresh to check the reply.": "Continue not confirmed. Refresh to check the reply.", "Continue only if this code matches the one displayed on your computer.": "Continue only if this code matches the one displayed on your computer.", + "Continue reply": "Continue reply", "Continue your work from any computer": "Continue your work from any computer", + "Continuing reply…": "Continuing reply…", "Conversation title": "Conversation title", "Conversation: {title}": "Conversation: {title}", "Copied": "Copied", @@ -126,6 +131,7 @@ "Copy reply": "Copy reply", "Could not change the model.": "Could not change the model.", "Could not confirm whether the message was sent. Check the conversation or queue before retrying.": "Could not confirm whether the message was sent. Check the conversation or queue before retrying.", + "Could not continue the reply. Try again.": "Could not continue the reply. Try again.", "Could not copy the edit.": "Could not copy the edit.", "Could not create the side question. Try again.": "Could not create the side question. Try again.", "Could not install the plugin.": "Could not install the plugin.", @@ -143,6 +149,7 @@ "Could not save the proxy password.": "Could not save the proxy password.", "Could not save the search API key.": "Could not save the search API key.", "Could not send the message.": "Could not send the message.", + "Could not stop the reply. Try again.": "Could not stop the reply. Try again.", "Could not sync Pending": "Could not sync Pending", "Could not sync chats": "Could not sync chats", "Could not update the conversation.": "Could not update the conversation.", @@ -246,6 +253,8 @@ "JSON body": "JSON body", "Keep my edit": "Keep my edit", "Language": "Language", + "Last request": "Last request", + "Last synced": "Last synced", "Latest": "Latest", "Leave blank for automatic title": "Leave blank for automatic title", "Light": "Light", @@ -256,6 +265,7 @@ "Loading…": "Loading…", "Low": "Low", "MCP": "MCP", + "Maka is shutting down. Try again after it restarts.": "Maka is shutting down. Try again after it restarts.", "Max output tokens": "Max output tokens", "Maximum": "Maximum", "Medium": "Medium", @@ -293,8 +303,10 @@ "No skills": "No skills", "No turn is running. This message remains queued.": "No turn is running. This message remains queued.", "No uncommitted changes": "No uncommitted changes", + "No usage data yet": "No usage data yet", "No workspace path configured for this chat.": "No workspace path configured for this chat.", "None": "None", + "Not measured": "Not measured", "Not sent. Choose a workspace, then retry.": "Not sent. Choose a workspace, then retry.", "Now": "Now", "Off": "Off", @@ -304,6 +316,7 @@ "Open Settings": "Open Settings", "Open sign-in page": "Open sign-in page", "Optional token": "Optional token", + "Output speed": "Output speed", "Package entry": "Package entry", "Package settings": "Package settings", "Pair with Link": "Pair with Link", @@ -387,6 +400,7 @@ "Request details": "Request details", "Request is unavailable": "Request is unavailable", "Required token": "Required token", + "Restore this conversation to continue it.": "Restore this conversation to continue it.", "Result URL path": "Result URL path", "Result limit location": "Result limit location", "Result limit parameter (optional)": "Result limit parameter (optional)", @@ -428,7 +442,6 @@ "Secret access key": "Secret access key", "Select model": "Select model", "Send message": "Send message", - "Send to Main Chat": "Send to Main Chat", "Sending…": "Sending…", "Server-side compaction": "Server-side compaction", "Service": "Service", @@ -452,8 +465,10 @@ "Steer now": "Steer now", "Steer or message…": "Steer or message…", "Steer · Waiting for next step": "Steer · Waiting for next step", - "Stop Run": "Stop Run", + "Stop current reply": "Stop current reply", + "Stop not confirmed. Refresh to check the reply.": "Stop not confirmed. Refresh to check the reply.", "Stopped before delivery. Your message is kept.": "Stopped before delivery. Your message is kept.", + "Stopping reply…": "Stopping reply…", "Subagents": "Subagents", "Submit Answer": "Submit Answer", "System": "System", @@ -465,6 +480,7 @@ "Team ID": "Team ID", "Test connection": "Test connection", "The active turn changed. Your message is kept.": "The active turn changed. Your message is kept.", + "The conversation changed. Send a new message instead.": "The conversation changed. Send a new message instead.", "The deployment document is invalid.": "The deployment document is invalid.", "The main conversation is no longer available.": "The main conversation is no longer available.", "The plugin bundle could not be downloaded.": "The plugin bundle could not be downloaded.", @@ -477,7 +493,10 @@ "The selected model is unavailable. Try again or choose another model.": "The selected model is unavailable. Try again or choose another model.", "The selected package is unavailable.": "The selected package is unavailable.", "The selected plugin instance is unavailable.": "The selected plugin instance is unavailable.", + "The workspace changed. Send a new message instead.": "The workspace changed. Send a new message instead.", + "There is no stopped reply to continue.": "There is no stopped reply to continue.", "These servers run outside the conversation sandbox and can run commands as your user or contact remote services. Full-access sessions can call their tools without further confirmation.": "These servers run outside the conversation sandbox and can run commands as your user or contact remote services. Full-access sessions can call their tools without further confirmation.", + "Thinking level": "Thinking level", "Thinking · {count, plural, one {# tool running} other {# tools running}}…": "Thinking · {count, plural, one {# tool running} other {# tools running}}…", "Thinking…": "Thinking…", "This QR code is not a Maka pairing link.": "This QR code is not a Maka pairing link.", @@ -491,6 +510,8 @@ "This iPhone Peer ID": "This iPhone Peer ID", "This iPhone will disconnect from this computer and forget its pairing credentials. You can pair it again anytime.": "This iPhone will disconnect from this computer and forget its pairing credentials. You can pair it again anytime.", "This message is no longer queued.": "This message is no longer queued.", + "This reply can’t be continued safely. Send a new message instead.": "This reply can’t be continued safely. Send a new message instead.", + "This reply has already been continued.": "This reply has already been continued.", "This run": "This run", "This server stores literal environment variables or HTTP headers. Edit it on Desktop.": "This server stores literal environment variables or HTTP headers. Edit it on Desktop.", "This session": "This session", @@ -514,6 +535,8 @@ "Unavailable": "Unavailable", "Unpin": "Unpin", "Update": "Update", + "Usage": "Usage", + "Usage & Details": "Usage & Details", "Usage credential": "Usage credential", "Use Host default": "Use Host default", "Use a URL without credentials.": "Use a URL without credentials.", @@ -524,6 +547,8 @@ "Verification code": "Verification code", "Verification code copied": "Verification code copied", "View All Side Questions": "View All Side Questions", + "Wait for the current reply and queue to finish.": "Wait for the current reply and queue to finish.", + "Wait for this reply to finish before continuing.": "Wait for this reply to finish before continuing.", "Waiting for current turn": "Waiting for current turn", "Waiting for provider sign-in…": "Waiting for provider sign-in…", "Waiting for queue…": "Waiting for queue…", @@ -555,6 +580,10 @@ "{name} Bot": "{name} Bot", "{name} is offline": "{name} is offline", "{name} · Online": "{name} · Online", + "{rate} tok/s": "{rate} tok/s", "{title} · Waiting for your response": "{title} · Waiting for your response", + "{used} / {window} tokens": "{used} / {window} tokens", + "{used} tokens used": "{used} tokens used", + "{window} token window": "{window} token window", "“{title}” on {computer} will be permanently deleted.": "“{title}” on {computer} will be permanently deleted." } diff --git a/products/maka/ios-shell/locales/es.json b/products/maka/ios-shell/locales/es.json index 5a37264bc6c..dc6d98b523f 100644 --- a/products/maka/ios-shell/locales/es.json +++ b/products/maka/ios-shell/locales/es.json @@ -113,9 +113,14 @@ "Connection is unavailable": "Conexión no disponible", "Connection timed out": "Se agotó el tiempo de conexión", "Connections": "Conexiones", + "Context": "Contexto", + "Context from the last request. Newer content isn’t included.": "Contexto de la última solicitud. No incluye el contenido más reciente.", "Context window": "Ventana de contexto", + "Continue not confirmed. Refresh to check the reply.": "No se confirmó la reanudación. Actualiza para comprobar la respuesta.", "Continue only if this code matches the one displayed on your computer.": "Continúa solo si este código coincide con el mostrado en tu ordenador.", + "Continue reply": "Continuar respuesta", "Continue your work from any computer": "Continúa tu trabajo desde cualquier ordenador", + "Continuing reply…": "Continuando la respuesta…", "Conversation title": "Título de la conversación", "Conversation: {title}": "Conversación: {title}", "Copied": "Copiado", @@ -126,6 +131,7 @@ "Copy reply": "Copiar respuesta", "Could not change the model.": "No se pudo cambiar el modelo.", "Could not confirm whether the message was sent. Check the conversation or queue before retrying.": "No se pudo confirmar si se envió el mensaje. Revisa la conversación o la cola antes de volver a intentarlo.", + "Could not continue the reply. Try again.": "No se pudo continuar la respuesta. Inténtalo de nuevo.", "Could not copy the edit.": "No se pudo copiar la edición.", "Could not create the side question. Try again.": "No se pudo crear la pregunta aparte. Inténtalo de nuevo.", "Could not install the plugin.": "No se pudo instalar el complemento.", @@ -143,6 +149,7 @@ "Could not save the proxy password.": "No se pudo guardar la contraseña del proxy.", "Could not save the search API key.": "No se pudo guardar la clave API de búsqueda.", "Could not send the message.": "No se pudo enviar el mensaje.", + "Could not stop the reply. Try again.": "No se pudo detener la respuesta. Inténtalo de nuevo.", "Could not sync Pending": "No se pudieron sincronizar las solicitudes pendientes", "Could not sync chats": "No se pudieron sincronizar los chats", "Could not update the conversation.": "No se pudo actualizar la conversación.", @@ -246,6 +253,8 @@ "JSON body": "Cuerpo JSON", "Keep my edit": "Conservar mi edición", "Language": "Idioma", + "Last request": "Última solicitud", + "Last synced": "Última sincronización", "Latest": "Último", "Leave blank for automatic title": "Déjalo vacío para título automático", "Light": "Claro", @@ -256,6 +265,7 @@ "Loading…": "Cargando…", "Low": "Bajo", "MCP": "MCP", + "Maka is shutting down. Try again after it restarts.": "Maka se está cerrando. Vuelve a intentarlo cuando se reinicie.", "Max output tokens": "Máximo de tokens de salida", "Maximum": "Máximo", "Medium": "Mediano", @@ -293,8 +303,10 @@ "No skills": "No hay habilidades", "No turn is running. This message remains queued.": "No hay ningún turno en ejecución. Este mensaje permanece en cola.", "No uncommitted changes": "No hay cambios sin confirmar", + "No usage data yet": "Aún no hay datos de uso", "No workspace path configured for this chat.": "Este chat no tiene una ruta de espacio de trabajo.", "None": "Ninguno", + "Not measured": "Sin medición", "Not sent. Choose a workspace, then retry.": "No enviado. Elige un espacio de trabajo e inténtalo de nuevo.", "Now": "Ahora", "Off": "Desactivado", @@ -304,6 +316,7 @@ "Open Settings": "Abrir Ajustes", "Open sign-in page": "Abrir página de inicio de sesión", "Optional token": "Token opcional", + "Output speed": "Velocidad de salida", "Package entry": "Entrada del paquete", "Package settings": "Ajustes del paquete", "Pair with Link": "Emparejar con enlace", @@ -387,6 +400,7 @@ "Request details": "Detalles de la solicitud", "Request is unavailable": "La solicitud no está disponible", "Required token": "Token obligatorio", + "Restore this conversation to continue it.": "Restaura esta conversación para continuar.", "Result URL path": "Ruta de URL de resultado", "Result limit location": "Ubicación del límite de resultados", "Result limit parameter (optional)": "Parámetro de límite de resultados (opcional)", @@ -428,7 +442,6 @@ "Secret access key": "Clave de acceso secreta", "Select model": "Seleccionar modelo", "Send message": "Enviar mensaje", - "Send to Main Chat": "Enviar al chat principal", "Sending…": "Enviando…", "Server-side compaction": "Compactación en el servidor", "Service": "Servicio", @@ -452,8 +465,10 @@ "Steer now": "Guiar ahora", "Steer or message…": "Guía o escribe…", "Steer · Waiting for next step": "Guía · Esperando el siguiente paso", - "Stop Run": "Detener ejecución", + "Stop current reply": "Detener respuesta en curso", + "Stop not confirmed. Refresh to check the reply.": "No se confirmó la detención. Actualiza para comprobar la respuesta.", "Stopped before delivery. Your message is kept.": "Detenido antes de entregarse. Se conserva tu mensaje.", + "Stopping reply…": "Deteniendo la respuesta…", "Subagents": "Subagentes", "Submit Answer": "Enviar respuesta", "System": "Sistema", @@ -465,6 +480,7 @@ "Team ID": "ID del equipo", "Test connection": "Probar conexión", "The active turn changed. Your message is kept.": "El turno activo cambió. Se conserva tu mensaje.", + "The conversation changed. Send a new message instead.": "La conversación cambió. Envía un mensaje nuevo.", "The deployment document is invalid.": "El documento de despliegue no es válido.", "The main conversation is no longer available.": "La conversación principal ya no está disponible.", "The plugin bundle could not be downloaded.": "No se pudo descargar el paquete del plugin.", @@ -477,7 +493,10 @@ "The selected model is unavailable. Try again or choose another model.": "El modelo seleccionado no está disponible. Inténtalo de nuevo o elige otro modelo.", "The selected package is unavailable.": "El paquete seleccionado no está disponible.", "The selected plugin instance is unavailable.": "La instancia de plugin seleccionada no está disponible.", + "The workspace changed. Send a new message instead.": "El espacio de trabajo cambió. Envía un mensaje nuevo.", + "There is no stopped reply to continue.": "No hay ninguna respuesta detenida que continuar.", "These servers run outside the conversation sandbox and can run commands as your user or contact remote services. Full-access sessions can call their tools without further confirmation.": "Estos servidores se ejecutan fuera del entorno aislado de la conversación y pueden ejecutar comandos como tu usuario o conectarse a servicios remotos. Las sesiones con acceso completo pueden llamar a sus herramientas sin más confirmación.", + "Thinking level": "Nivel de razonamiento", "Thinking · {count, plural, one {# tool running} other {# tools running}}…": "Pensando · {count, plural, one {# herramienta en curso} other {# herramientas en curso}}…", "Thinking…": "Pensando…", "This QR code is not a Maka pairing link.": "Este código QR no es un enlace de emparejamiento de Maka.", @@ -491,6 +510,8 @@ "This iPhone Peer ID": "Peer ID de este iPhone", "This iPhone will disconnect from this computer and forget its pairing credentials. You can pair it again anytime.": "Este iPhone se desconectará del ordenador y olvidará sus credenciales. Puedes volver a emparejarlo en cualquier momento.", "This message is no longer queued.": "Este mensaje ya no está en cola.", + "This reply can’t be continued safely. Send a new message instead.": "No se puede continuar esta respuesta de forma segura. Envía un mensaje nuevo.", + "This reply has already been continued.": "Esta respuesta ya se reanudó.", "This run": "Esta ejecución", "This server stores literal environment variables or HTTP headers. Edit it on Desktop.": "Este servidor guarda variables de entorno o cabeceras HTTP en texto sin formato. Edítalo en el escritorio.", "This session": "Esta sesión", @@ -514,6 +535,8 @@ "Unavailable": "No disponible", "Unpin": "Desfijar", "Update": "Actualizar", + "Usage": "Uso", + "Usage & Details": "Uso y detalles", "Usage credential": "Credencial de uso", "Use Host default": "Usar predeterminado del Host", "Use a URL without credentials.": "Usa una URL sin credenciales.", @@ -524,6 +547,8 @@ "Verification code": "Código de verificación", "Verification code copied": "Código de verificación copiado", "View All Side Questions": "Ver todas las preguntas aparte", + "Wait for the current reply and queue to finish.": "Espera a que terminen la respuesta en curso y la cola.", + "Wait for this reply to finish before continuing.": "Espera a que termine esta respuesta para continuar.", "Waiting for current turn": "Esperando al turno actual", "Waiting for provider sign-in…": "Esperando el inicio de sesión en el proveedor…", "Waiting for queue…": "Añadiendo a la cola…", @@ -555,6 +580,10 @@ "{name} Bot": "Bot de {name}", "{name} is offline": "{name} sin conexión", "{name} · Online": "{name} · En línea", + "{rate} tok/s": "{rate} tok/s", "{title} · Waiting for your response": "{title} · Esperando tu respuesta", + "{used} / {window} tokens": "{used} / {window} tokens", + "{used} tokens used": "Tokens usados: {used}", + "{window} token window": "Ventana de {window} tokens", "“{title}” on {computer} will be permanently deleted.": "“{title}” en {computer} se eliminará permanentemente." } diff --git a/products/maka/ios-shell/locales/fr.json b/products/maka/ios-shell/locales/fr.json index 088d2e2a1c7..4b4b1a989f6 100644 --- a/products/maka/ios-shell/locales/fr.json +++ b/products/maka/ios-shell/locales/fr.json @@ -113,9 +113,14 @@ "Connection is unavailable": "Connexion indisponible", "Connection timed out": "Délai de connexion dépassé", "Connections": "Connexions", + "Context": "Contexte", + "Context from the last request. Newer content isn’t included.": "Contexte de la dernière requête. Les ajouts récents ne sont pas inclus.", "Context window": "Fenêtre de contexte", + "Continue not confirmed. Refresh to check the reply.": "Reprise non confirmée. Actualisez pour vérifier la réponse.", "Continue only if this code matches the one displayed on your computer.": "Continuez uniquement si ce code correspond à celui affiché sur votre ordinateur.", + "Continue reply": "Reprendre la réponse", "Continue your work from any computer": "Poursuivez votre travail depuis n’importe quel ordinateur", + "Continuing reply…": "Reprise de la réponse…", "Conversation title": "Titre de la conversation", "Conversation: {title}": "Conversation : {title}", "Copied": "Copié", @@ -126,6 +131,7 @@ "Copy reply": "Copier la réponse", "Could not change the model.": "Impossible de changer de modèle.", "Could not confirm whether the message was sent. Check the conversation or queue before retrying.": "Impossible de confirmer si le message a été envoyé. Vérifiez la conversation ou la file d’attente avant de réessayer.", + "Could not continue the reply. Try again.": "Impossible de reprendre la réponse. Réessayez.", "Could not copy the edit.": "Impossible de copier la modification.", "Could not create the side question. Try again.": "Impossible de créer la question à part. Réessayez.", "Could not install the plugin.": "Impossible d’installer le module.", @@ -143,6 +149,7 @@ "Could not save the proxy password.": "Impossible d’enregistrer le mot de passe du proxy.", "Could not save the search API key.": "Impossible d’enregistrer la clé API de recherche.", "Could not send the message.": "Impossible d’envoyer le message.", + "Could not stop the reply. Try again.": "Impossible d’arrêter la réponse. Réessayez.", "Could not sync Pending": "Impossible de synchroniser les demandes en attente", "Could not sync chats": "Impossible de synchroniser les conversations", "Could not update the conversation.": "Impossible de mettre à jour la conversation.", @@ -246,6 +253,8 @@ "JSON body": "Corps JSON", "Keep my edit": "Conserver ma modification", "Language": "Langue", + "Last request": "Dernière requête", + "Last synced": "Dernière synchronisation", "Latest": "Dernier", "Leave blank for automatic title": "Laisser vide pour un titre automatique", "Light": "Clair", @@ -256,6 +265,7 @@ "Loading…": "Chargement…", "Low": "Faible", "MCP": "MCP", + "Maka is shutting down. Try again after it restarts.": "Maka s’arrête. Réessayez après son redémarrage.", "Max output tokens": "Nombre maximal de jetons de sortie", "Maximum": "Maximal", "Medium": "Moyen", @@ -293,8 +303,10 @@ "No skills": "Aucune compétence", "No turn is running. This message remains queued.": "Aucun tour n’est en cours. Ce message reste en file.", "No uncommitted changes": "Aucune modification non validée", + "No usage data yet": "Aucune donnée d’utilisation pour le moment", "No workspace path configured for this chat.": "Aucun dossier d’espace de travail configuré.", "None": "Aucun", + "Not measured": "Non mesurée", "Not sent. Choose a workspace, then retry.": "Non envoyé. Choisissez un espace de travail, puis réessayez.", "Now": "À l’instant", "Off": "Désactivé", @@ -304,6 +316,7 @@ "Open Settings": "Ouvrir Réglages", "Open sign-in page": "Ouvrir la page de connexion", "Optional token": "Jeton facultatif", + "Output speed": "Vitesse de sortie", "Package entry": "Point d’entrée du paquet", "Package settings": "Réglages du paquet", "Pair with Link": "Appairer avec un lien", @@ -387,6 +400,7 @@ "Request details": "Détails de la demande", "Request is unavailable": "La requête est indisponible", "Required token": "Jeton requis", + "Restore this conversation to continue it.": "Restaurez cette conversation pour la reprendre.", "Result URL path": "Chemin d’URL de résultat", "Result limit location": "Emplacement de la limite de résultats", "Result limit parameter (optional)": "Paramètre de limite de résultats (facultatif)", @@ -428,7 +442,6 @@ "Secret access key": "Clé d’accès secrète", "Select model": "Choisir le modèle", "Send message": "Envoyer le message", - "Send to Main Chat": "Envoyer dans la conversation principale", "Sending…": "Envoi…", "Server-side compaction": "Compactage côté serveur", "Service": "Service", @@ -452,8 +465,10 @@ "Steer now": "Orienter maintenant", "Steer or message…": "Orientez ou écrivez…", "Steer · Waiting for next step": "Orientation · En attente de la prochaine étape", - "Stop Run": "Arrêter", + "Stop current reply": "Arrêter la réponse en cours", + "Stop not confirmed. Refresh to check the reply.": "Arrêt non confirmé. Actualisez pour vérifier la réponse.", "Stopped before delivery. Your message is kept.": "Arrêté avant l’envoi. Votre message est conservé.", + "Stopping reply…": "Arrêt de la réponse…", "Subagents": "Sous-agents", "Submit Answer": "Envoyer la réponse", "System": "Système", @@ -465,6 +480,7 @@ "Team ID": "Identifiant d’équipe", "Test connection": "Tester la connexion", "The active turn changed. Your message is kept.": "Le tour actif a changé. Votre message est conservé.", + "The conversation changed. Send a new message instead.": "La conversation a changé. Envoyez plutôt un nouveau message.", "The deployment document is invalid.": "Le document de déploiement est invalide.", "The main conversation is no longer available.": "La conversation principale n’est plus disponible.", "The plugin bundle could not be downloaded.": "Impossible de télécharger le paquet du plugin.", @@ -477,7 +493,10 @@ "The selected model is unavailable. Try again or choose another model.": "Le modèle sélectionné est indisponible. Réessayez ou choisissez un autre modèle.", "The selected package is unavailable.": "Le paquet sélectionné est indisponible.", "The selected plugin instance is unavailable.": "L’instance de plugin sélectionnée est indisponible.", + "The workspace changed. Send a new message instead.": "L’espace de travail a changé. Envoyez plutôt un nouveau message.", + "There is no stopped reply to continue.": "Aucune réponse interrompue à reprendre.", "These servers run outside the conversation sandbox and can run commands as your user or contact remote services. Full-access sessions can call their tools without further confirmation.": "Ces serveurs s’exécutent hors du bac à sable de la conversation et peuvent lancer des commandes en tant que votre utilisateur ou contacter des services distants. Les sessions en accès complet peuvent appeler leurs outils sans autre confirmation.", + "Thinking level": "Niveau de raisonnement", "Thinking · {count, plural, one {# tool running} other {# tools running}}…": "Réflexion · {count, plural, one {# outil en cours} other {# outils en cours}}…", "Thinking…": "Réflexion…", "This QR code is not a Maka pairing link.": "Ce QR code n’est pas un lien d’appairage Maka.", @@ -491,6 +510,8 @@ "This iPhone Peer ID": "Peer ID de cet iPhone", "This iPhone will disconnect from this computer and forget its pairing credentials. You can pair it again anytime.": "Cet iPhone se déconnectera de cet ordinateur et effacera ses identifiants d’appairage. Vous pourrez le réappairer à tout moment.", "This message is no longer queued.": "Ce message n’est plus en file.", + "This reply can’t be continued safely. Send a new message instead.": "Cette réponse ne peut pas être reprise sans risque. Envoyez plutôt un nouveau message.", + "This reply has already been continued.": "Cette réponse a déjà été reprise.", "This run": "Cette exécution", "This server stores literal environment variables or HTTP headers. Edit it on Desktop.": "Ce serveur stocke des variables d’environnement ou des en-têtes HTTP en clair. Modifiez-le sur le bureau.", "This session": "Cette session", @@ -514,6 +535,8 @@ "Unavailable": "Indisponible", "Unpin": "Désépingler", "Update": "Mettre à jour", + "Usage": "Utilisation", + "Usage & Details": "Utilisation et détails", "Usage credential": "Identifiants de suivi d’utilisation", "Use Host default": "Utiliser la valeur par défaut du Host", "Use a URL without credentials.": "Utilisez une URL sans identifiants.", @@ -524,6 +547,8 @@ "Verification code": "Code de vérification", "Verification code copied": "Code de vérification copié", "View All Side Questions": "Voir toutes les questions à part", + "Wait for the current reply and queue to finish.": "Attendez la fin de la réponse en cours et de la file d’attente.", + "Wait for this reply to finish before continuing.": "Attendez la fin de cette réponse avant de continuer.", "Waiting for current turn": "En attente de la fin du tour", "Waiting for provider sign-in…": "En attente de la connexion au fournisseur…", "Waiting for queue…": "Ajout à la file…", @@ -555,6 +580,10 @@ "{name} Bot": "Bot de {name}", "{name} is offline": "{name} est hors ligne", "{name} · Online": "{name} · En ligne", + "{rate} tok/s": "{rate} jetons/s", "{title} · Waiting for your response": "{title} · En attente de votre réponse", + "{used} / {window} tokens": "{used} / {window} jetons", + "{used} tokens used": "Jetons utilisés : {used}", + "{window} token window": "Fenêtre de {window} jetons", "“{title}” on {computer} will be permanently deleted.": "« {title} » sur {computer} sera supprimé définitivement." } diff --git a/products/maka/ios-shell/locales/it.json b/products/maka/ios-shell/locales/it.json index 71df0e57f81..740dab67d36 100644 --- a/products/maka/ios-shell/locales/it.json +++ b/products/maka/ios-shell/locales/it.json @@ -113,9 +113,14 @@ "Connection is unavailable": "Connessione non disponibile", "Connection timed out": "Connessione scaduta", "Connections": "Connessioni", + "Context": "Contesto", + "Context from the last request. Newer content isn’t included.": "Contesto dell’ultima richiesta. I contenuti più recenti non sono inclusi.", "Context window": "Finestra di contesto", + "Continue not confirmed. Refresh to check the reply.": "Ripresa non confermata. Aggiorna per controllare la risposta.", "Continue only if this code matches the one displayed on your computer.": "Continua solo se questo codice corrisponde a quello mostrato sul computer.", + "Continue reply": "Riprendi la risposta", "Continue your work from any computer": "Continua il tuo lavoro da qualsiasi computer", + "Continuing reply…": "Ripresa della risposta…", "Conversation title": "Titolo conversazione", "Conversation: {title}": "Conversazione: {title}", "Copied": "Copiato", @@ -126,6 +131,7 @@ "Copy reply": "Copia risposta", "Could not change the model.": "Impossibile cambiare il modello.", "Could not confirm whether the message was sent. Check the conversation or queue before retrying.": "Non è stato possibile confermare l’invio del messaggio. Controlla la conversazione o la coda prima di riprovare.", + "Could not continue the reply. Try again.": "Impossibile riprendere la risposta. Riprova.", "Could not copy the edit.": "Impossibile copiare la modifica.", "Could not create the side question. Try again.": "Impossibile creare la domanda a parte. Riprova.", "Could not install the plugin.": "Impossibile installare il plugin.", @@ -143,6 +149,7 @@ "Could not save the proxy password.": "Impossibile salvare la password del proxy.", "Could not save the search API key.": "Impossibile salvare la chiave API di ricerca.", "Could not send the message.": "Impossibile inviare il messaggio.", + "Could not stop the reply. Try again.": "Impossibile interrompere la risposta. Riprova.", "Could not sync Pending": "Impossibile sincronizzare le richieste in sospeso", "Could not sync chats": "Impossibile sincronizzare le chat", "Could not update the conversation.": "Impossibile aggiornare la conversazione.", @@ -246,6 +253,8 @@ "JSON body": "Corpo JSON", "Keep my edit": "Mantieni la mia modifica", "Language": "Lingua", + "Last request": "Ultima richiesta", + "Last synced": "Ultima sincronizzazione", "Latest": "Più recente", "Leave blank for automatic title": "Lascia vuoto per il titolo automatico", "Light": "Chiaro", @@ -256,6 +265,7 @@ "Loading…": "Caricamento…", "Low": "Basso", "MCP": "MCP", + "Maka is shutting down. Try again after it restarts.": "Maka si sta chiudendo. Riprova dopo il riavvio.", "Max output tokens": "Token di output massimi", "Maximum": "Massimo", "Medium": "Medio", @@ -293,8 +303,10 @@ "No skills": "Nessuna competenza", "No turn is running. This message remains queued.": "Nessun turno in esecuzione. Questo messaggio resta in coda.", "No uncommitted changes": "Nessuna modifica non salvata", + "No usage data yet": "Ancora nessun dato di utilizzo", "No workspace path configured for this chat.": "Nessun percorso dell’area di lavoro configurato per questa chat.", "None": "Nessuno", + "Not measured": "Non misurata", "Not sent. Choose a workspace, then retry.": "Non inviato. Scegli uno spazio di lavoro, quindi riprova.", "Now": "Ora", "Off": "Disattivo", @@ -304,6 +316,7 @@ "Open Settings": "Apri Impostazioni", "Open sign-in page": "Apri pagina di accesso", "Optional token": "Token facoltativo", + "Output speed": "Velocità di output", "Package entry": "Voce del pacchetto", "Package settings": "Impostazioni del pacchetto", "Pair with Link": "Abbina con link", @@ -387,6 +400,7 @@ "Request details": "Dettagli richiesta", "Request is unavailable": "La richiesta non è disponibile", "Required token": "Token obbligatorio", + "Restore this conversation to continue it.": "Ripristina la conversazione per continuare.", "Result URL path": "Percorso URL risultato", "Result limit location": "Posizione limite risultati", "Result limit parameter (optional)": "Parametro limite risultati (facoltativo)", @@ -428,7 +442,6 @@ "Secret access key": "Chiave di accesso segreta", "Select model": "Seleziona modello", "Send message": "Invia messaggio", - "Send to Main Chat": "Invia nella chat principale", "Sending…": "Invio in corso…", "Server-side compaction": "Compattazione lato server", "Service": "Servizio", @@ -452,8 +465,10 @@ "Steer now": "Guida ora", "Steer or message…": "Guida o scrivi…", "Steer · Waiting for next step": "Guida · In attesa del prossimo passaggio", - "Stop Run": "Interrompi", + "Stop current reply": "Interrompi la risposta in corso", + "Stop not confirmed. Refresh to check the reply.": "Interruzione non confermata. Aggiorna per controllare la risposta.", "Stopped before delivery. Your message is kept.": "Interrotto prima del recapito. Il messaggio è stato conservato.", + "Stopping reply…": "Interruzione della risposta…", "Subagents": "Subagenti", "Submit Answer": "Invia risposta", "System": "Sistema", @@ -465,6 +480,7 @@ "Team ID": "ID team", "Test connection": "Prova connessione", "The active turn changed. Your message is kept.": "Il turno attivo è cambiato. Il tuo messaggio è stato conservato.", + "The conversation changed. Send a new message instead.": "La conversazione è cambiata. Invia un nuovo messaggio.", "The deployment document is invalid.": "Il documento di distribuzione non è valido.", "The main conversation is no longer available.": "La conversazione principale non è più disponibile.", "The plugin bundle could not be downloaded.": "Impossibile scaricare il pacchetto del plugin.", @@ -477,7 +493,10 @@ "The selected model is unavailable. Try again or choose another model.": "Il modello selezionato non è disponibile. Riprova o scegli un altro modello.", "The selected package is unavailable.": "Il pacchetto selezionato non è disponibile.", "The selected plugin instance is unavailable.": "L’istanza plugin selezionata non è disponibile.", + "The workspace changed. Send a new message instead.": "L’area di lavoro è cambiata. Invia un nuovo messaggio.", + "There is no stopped reply to continue.": "Non ci sono risposte interrotte da riprendere.", "These servers run outside the conversation sandbox and can run commands as your user or contact remote services. Full-access sessions can call their tools without further confirmation.": "Questi server vengono eseguiti fuori dalla sandbox della conversazione e possono eseguire comandi come il tuo utente o contattare servizi remoti. Le sessioni con accesso completo possono chiamarne gli strumenti senza ulteriori conferme.", + "Thinking level": "Livello di ragionamento", "Thinking · {count, plural, one {# tool running} other {# tools running}}…": "Ragionamento · {count, plural, one {# strumento in esecuzione} other {# strumenti in esecuzione}}…", "Thinking…": "Ragionamento…", "This QR code is not a Maka pairing link.": "Questo codice QR non è un link di abbinamento Maka.", @@ -491,6 +510,8 @@ "This iPhone Peer ID": "Peer ID di questo iPhone", "This iPhone will disconnect from this computer and forget its pairing credentials. You can pair it again anytime.": "Questo iPhone si disconnetterà dal computer e dimenticherà le credenziali di abbinamento. Potrai riabbinarlo in qualsiasi momento.", "This message is no longer queued.": "Questo messaggio non è più in coda.", + "This reply can’t be continued safely. Send a new message instead.": "Non è possibile riprendere questa risposta in sicurezza. Invia un nuovo messaggio.", + "This reply has already been continued.": "Questa risposta è già stata ripresa.", "This run": "Questa esecuzione", "This server stores literal environment variables or HTTP headers. Edit it on Desktop.": "Questo server memorizza variabili d’ambiente o intestazioni HTTP in chiaro. Modificalo su desktop.", "This session": "Questa sessione", @@ -514,6 +535,8 @@ "Unavailable": "Non disponibile", "Unpin": "Rimuovi fissaggio", "Update": "Aggiorna", + "Usage": "Utilizzo", + "Usage & Details": "Utilizzo e dettagli", "Usage credential": "Credenziale per l’utilizzo", "Use Host default": "Usa predefinito Host", "Use a URL without credentials.": "Usa un URL senza credenziali.", @@ -524,6 +547,8 @@ "Verification code": "Codice di verifica", "Verification code copied": "Codice di verifica copiato", "View All Side Questions": "Mostra tutte le domande a parte", + "Wait for the current reply and queue to finish.": "Attendi che la risposta in corso e la coda siano completate.", + "Wait for this reply to finish before continuing.": "Attendi che la risposta finisca prima di continuare.", "Waiting for current turn": "In attesa del turno corrente", "Waiting for provider sign-in…": "In attesa dell’accesso al provider…", "Waiting for queue…": "Aggiunta alla coda…", @@ -555,6 +580,10 @@ "{name} Bot": "Bot di {name}", "{name} is offline": "{name} è offline", "{name} · Online": "{name} · In linea", + "{rate} tok/s": "{rate} token/s", "{title} · Waiting for your response": "{title} · In attesa della tua risposta", + "{used} / {window} tokens": "{used} / {window} token", + "{used} tokens used": "Token utilizzati: {used}", + "{window} token window": "Finestra di {window} token", "“{title}” on {computer} will be permanently deleted.": "“{title}” su {computer} verrà eliminata definitivamente." } diff --git a/products/maka/ios-shell/locales/ja.json b/products/maka/ios-shell/locales/ja.json index ceb0e2b9848..8deea1a4c5e 100644 --- a/products/maka/ios-shell/locales/ja.json +++ b/products/maka/ios-shell/locales/ja.json @@ -113,9 +113,14 @@ "Connection is unavailable": "接続を利用できません", "Connection timed out": "接続がタイムアウトしました", "Connections": "接続", + "Context": "コンテキスト", + "Context from the last request. Newer content isn’t included.": "前回のコンテキストです。その後に追加された内容は含みません。", "Context window": "コンテキストウィンドウ", + "Continue not confirmed. Refresh to check the reply.": "再開を確認できませんでした。更新して応答を確認してください。", "Continue only if this code matches the one displayed on your computer.": "コンピュータに表示されているコードと一致することを確認してから続行してください。", + "Continue reply": "応答を続ける", "Continue your work from any computer": "どのコンピュータの作業もここから続ける", + "Continuing reply…": "応答を再開中…", "Conversation title": "会話のタイトル", "Conversation: {title}": "会話:{title}", "Copied": "コピーしました", @@ -126,6 +131,7 @@ "Copy reply": "返信をコピー", "Could not change the model.": "モデルを変更できませんでした。", "Could not confirm whether the message was sent. Check the conversation or queue before retrying.": "メッセージが送信されたか確認できませんでした。再試行する前に、会話履歴かキューを確認してください。", + "Could not continue the reply. Try again.": "応答を再開できませんでした。もう一度お試しください。", "Could not copy the edit.": "編集内容をコピーできませんでした。", "Could not create the side question. Try again.": "サイド質問を作成できませんでした。もう一度お試しください。", "Could not install the plugin.": "プラグインをインストールできませんでした。", @@ -143,6 +149,7 @@ "Could not save the proxy password.": "プロキシのパスワードを保存できませんでした。", "Could not save the search API key.": "検索 API キーを保存できませんでした。", "Could not send the message.": "メッセージを送信できませんでした。", + "Could not stop the reply. Try again.": "応答を停止できませんでした。もう一度お試しください。", "Could not sync Pending": "保留中のリクエストを同期できませんでした", "Could not sync chats": "チャットを同期できませんでした", "Could not update the conversation.": "会話を更新できませんでした。", @@ -246,6 +253,8 @@ "JSON body": "JSON ボディ", "Keep my edit": "編集内容を保持", "Language": "言語", + "Last request": "前回のリクエスト", + "Last synced": "前回の同期", "Latest": "最新", "Leave blank for automatic title": "空欄の場合は自動でタイトルを設定", "Light": "ライト", @@ -256,6 +265,7 @@ "Loading…": "読み込み中…", "Low": "低", "MCP": "MCP", + "Maka is shutting down. Try again after it restarts.": "Maka は終了処理中です。再起動後にお試しください。", "Max output tokens": "最大出力トークン数", "Maximum": "最大", "Medium": "中", @@ -293,8 +303,10 @@ "No skills": "スキルがありません", "No turn is running. This message remains queued.": "実行中のターンはありません。このメッセージはキューに留まります。", "No uncommitted changes": "未コミットの変更はありません", + "No usage data yet": "使用データはまだありません", "No workspace path configured for this chat.": "このチャットにワークスペースが設定されていません。", "None": "なし", + "Not measured": "未計測", "Not sent. Choose a workspace, then retry.": "送信されませんでした。ワークスペースを選択してから再試行してください。", "Now": "今", "Off": "オフ", @@ -304,6 +316,7 @@ "Open Settings": "設定を開く", "Open sign-in page": "サインインページを開く", "Optional token": "任意トークン", + "Output speed": "出力速度", "Package entry": "パッケージのエントリー", "Package settings": "パッケージ設定", "Pair with Link": "リンクでペアリング", @@ -387,6 +400,7 @@ "Request details": "リクエスト詳細", "Request is unavailable": "リクエストを利用できません", "Required token": "必須トークン", + "Restore this conversation to continue it.": "この会話を復元すると、続けられます。", "Result URL path": "結果 URL のパス", "Result limit location": "取得件数パラメータの位置", "Result limit parameter (optional)": "取得件数パラメータ(任意)", @@ -428,7 +442,6 @@ "Secret access key": "シークレットアクセスキー", "Select model": "モデルを選択", "Send message": "メッセージを送信", - "Send to Main Chat": "元の会話に送信", "Sending…": "送信中…", "Server-side compaction": "サーバー側で圧縮", "Service": "サービス", @@ -452,8 +465,10 @@ "Steer now": "今すぐ指示を送る", "Steer or message…": "指示・メッセージ…", "Steer · Waiting for next step": "途中の指示 · 次のステップを待機中", - "Stop Run": "実行を停止", + "Stop current reply": "現在の応答を停止", + "Stop not confirmed. Refresh to check the reply.": "停止を確認できませんでした。更新して応答を確認してください。", "Stopped before delivery. Your message is kept.": "配信前に停止しました。メッセージは保持されています。", + "Stopping reply…": "応答を停止中…", "Subagents": "サブエージェント", "Submit Answer": "回答を送信", "System": "システム", @@ -465,6 +480,7 @@ "Team ID": "チーム ID", "Test connection": "接続をテスト", "The active turn changed. Your message is kept.": "実行中のターンが変わりました。メッセージは保持されています。", + "The conversation changed. Send a new message instead.": "会話が変わりました。新しいメッセージを送信してください。", "The deployment document is invalid.": "デプロイドキュメントが無効です。", "The main conversation is no longer available.": "元の会話を開けなくなりました。", "The plugin bundle could not be downloaded.": "プラグインバンドルをダウンロードできませんでした。", @@ -477,7 +493,10 @@ "The selected model is unavailable. Try again or choose another model.": "選択したモデルは利用できません。再試行するか別のモデルを選択してください。", "The selected package is unavailable.": "選択したパッケージは利用できません。", "The selected plugin instance is unavailable.": "選択したプラグインインスタンスは利用できません。", + "The workspace changed. Send a new message instead.": "ワークスペースが変わりました。新しいメッセージを送信してください。", + "There is no stopped reply to continue.": "再開できる停止済みの応答がありません。", "These servers run outside the conversation sandbox and can run commands as your user or contact remote services. Full-access sessions can call their tools without further confirmation.": "これらのサーバーは会話のサンドボックス外で実行され、あなたのユーザー権限でコマンドを実行したりリモートサービスへ通信したりできます。フルアクセスセッションでは追加の確認なしにツールを呼び出せます。", + "Thinking level": "思考レベル", "Thinking · {count, plural, one {# tool running} other {# tools running}}…": "思考中 · {count, plural, other {# 個のツールを実行中}}…", "Thinking…": "思考中…", "This QR code is not a Maka pairing link.": "この QR コードは Maka のペアリングリンクではありません。", @@ -491,6 +510,8 @@ "This iPhone Peer ID": "この iPhone の Peer ID", "This iPhone will disconnect from this computer and forget its pairing credentials. You can pair it again anytime.": "この iPhone はコンピュータから切断され、ペアリング情報を削除します。いつでも再ペアリングできます。", "This message is no longer queued.": "このメッセージはキューから外れました。", + "This reply can’t be continued safely. Send a new message instead.": "この応答は安全に再開できません。新しいメッセージを送信してください。", + "This reply has already been continued.": "この応答はすでに再開されています。", "This run": "この実行", "This server stores literal environment variables or HTTP headers. Edit it on Desktop.": "このサーバーには環境変数や HTTP ヘッダーの値が直接保存されています。デスクトップで編集してください。", "This session": "このセッション", @@ -514,6 +535,8 @@ "Unavailable": "利用不可", "Unpin": "ピン留め解除", "Update": "更新", + "Usage": "使用状況", + "Usage & Details": "使用状況と詳細", "Usage credential": "使用量の認証情報", "Use Host default": "ホストのデフォルトを使用", "Use a URL without credentials.": "認証情報を含まない URL を使ってください。", @@ -524,6 +547,8 @@ "Verification code": "確認コード", "Verification code copied": "確認コードをコピーしました", "View All Side Questions": "すべてのサイド質問を表示", + "Wait for the current reply and queue to finish.": "現在の応答とキューの処理が終わるまでお待ちください。", + "Wait for this reply to finish before continuing.": "この応答が終わるまでお待ちください。", "Waiting for current turn": "現在のターン完了待ち", "Waiting for provider sign-in…": "プロバイダへのログインを待っています…", "Waiting for queue…": "キューに追加中…", @@ -555,6 +580,10 @@ "{name} Bot": "{name} の Bot", "{name} is offline": "{name} はオフラインです", "{name} · Online": "{name} · オンライン", + "{rate} tok/s": "{rate} トークン/秒", "{title} · Waiting for your response": "{title} · あなたの返信待ち", + "{used} / {window} tokens": "{used} / {window} トークン", + "{used} tokens used": "使用済み:{used} トークン", + "{window} token window": "コンテキスト上限:{window} トークン", "“{title}” on {computer} will be permanently deleted.": "{computer} 上の「{title}」を完全に削除します。" } diff --git a/products/maka/ios-shell/locales/ko.json b/products/maka/ios-shell/locales/ko.json index 35edb64ca96..33cb05a377b 100644 --- a/products/maka/ios-shell/locales/ko.json +++ b/products/maka/ios-shell/locales/ko.json @@ -113,9 +113,14 @@ "Connection is unavailable": "연결을 사용할 수 없음", "Connection timed out": "연결 시간 초과", "Connections": "연결", + "Context": "컨텍스트", + "Context from the last request. Newer content isn’t included.": "지난 요청의 컨텍스트예요. 이후에 추가된 내용은 포함되지 않아요.", "Context window": "컨텍스트 창", + "Continue not confirmed. Refresh to check the reply.": "계속 여부를 확인하지 못했어요. 새로고침해 답변을 확인하세요.", "Continue only if this code matches the one displayed on your computer.": "컴퓨터 화면에 표시된 코드와 일치하는지 확인한 후 계속하세요.", + "Continue reply": "답변 계속하기", "Continue your work from any computer": "어떤 컴퓨터의 작업이든 이어서 하세요", + "Continuing reply…": "답변을 이어가는 중…", "Conversation title": "대화 제목", "Conversation: {title}": "대화: {title}", "Copied": "복사됨", @@ -126,6 +131,7 @@ "Copy reply": "응답 복사", "Could not change the model.": "모델을 변경할 수 없습니다.", "Could not confirm whether the message was sent. Check the conversation or queue before retrying.": "메시지가 전송되었는지 확인하지 못했습니다. 다시 시도하기 전에 대화 기록이나 대기열을 확인하세요.", + "Could not continue the reply. Try again.": "답변을 이어가지 못했어요. 다시 시도해 주세요.", "Could not copy the edit.": "수정 내용을 복사하지 못했습니다.", "Could not create the side question. Try again.": "곁질문을 만들지 못했습니다. 다시 시도하세요.", "Could not install the plugin.": "플러그인을 설치하지 못했습니다.", @@ -143,6 +149,7 @@ "Could not save the proxy password.": "프록시 비밀번호를 저장하지 못했습니다.", "Could not save the search API key.": "검색 API 키를 저장하지 못했습니다.", "Could not send the message.": "메시지를 보낼 수 없습니다.", + "Could not stop the reply. Try again.": "답변을 중지하지 못했어요. 다시 시도해 주세요.", "Could not sync Pending": "대기 중인 요청을 동기화하지 못했습니다", "Could not sync chats": "채팅을 동기화할 수 없습니다", "Could not update the conversation.": "대화를 업데이트할 수 없습니다.", @@ -246,6 +253,8 @@ "JSON body": "JSON 본문", "Keep my edit": "내 편집 유지", "Language": "언어", + "Last request": "지난 요청", + "Last synced": "마지막 동기화", "Latest": "최신", "Leave blank for automatic title": "비워 두면 제목이 자동 생성됩니다", "Light": "라이트", @@ -256,6 +265,7 @@ "Loading…": "불러오는 중…", "Low": "낮음", "MCP": "MCP", + "Maka is shutting down. Try again after it restarts.": "Maka가 종료 중이에요. 다시 시작한 후 시도해 주세요.", "Max output tokens": "최대 출력 토큰", "Maximum": "최대", "Medium": "중간", @@ -293,8 +303,10 @@ "No skills": "스킬 없음", "No turn is running. This message remains queued.": "실행 중인 턴이 없습니다. 이 메시지는 대기열에 남아 있습니다.", "No uncommitted changes": "커밋되지 않은 변경 사항 없음", + "No usage data yet": "아직 사용량 데이터가 없어요", "No workspace path configured for this chat.": "이 대화에 설정된 워크스페이스 경로가 없습니다.", "None": "없음", + "Not measured": "측정값 없음", "Not sent. Choose a workspace, then retry.": "전송되지 않았습니다. 작업 공간을 선택한 후 다시 시도하세요.", "Now": "방금", "Off": "꺼짐", @@ -304,6 +316,7 @@ "Open Settings": "설정 열기", "Open sign-in page": "로그인 페이지 열기", "Optional token": "선택 토큰", + "Output speed": "출력 속도", "Package entry": "패키지 항목", "Package settings": "패키지 설정", "Pair with Link": "링크로 페어링", @@ -387,6 +400,7 @@ "Request details": "요청 세부 정보", "Request is unavailable": "요청을 사용할 수 없음", "Required token": "필수 토큰", + "Restore this conversation to continue it.": "이 대화를 복원하면 계속할 수 있어요.", "Result URL path": "결과 URL 경로", "Result limit location": "결과 제한 위치", "Result limit parameter (optional)": "결과 제한 매개변수 (선택 사항)", @@ -428,7 +442,6 @@ "Secret access key": "시크릿 액세스 키", "Select model": "모델 선택", "Send message": "메시지 보내기", - "Send to Main Chat": "원래 대화로 보내기", "Sending…": "전송 중…", "Server-side compaction": "서버 측 압축", "Service": "서비스", @@ -452,8 +465,10 @@ "Steer now": "지금 개입", "Steer or message…": "개입하거나 메시지…", "Steer · Waiting for next step": "실행 개입 · 다음 단계 대기 중", - "Stop Run": "실행 중지", + "Stop current reply": "현재 답변 중지", + "Stop not confirmed. Refresh to check the reply.": "중지 여부를 확인하지 못했어요. 새로고침해 답변을 확인하세요.", "Stopped before delivery. Your message is kept.": "전달되기 전에 중지되었습니다. 메시지는 유지됩니다.", + "Stopping reply…": "답변 중지 중…", "Subagents": "서브에이전트", "Submit Answer": "답변 제출", "System": "시스템", @@ -465,6 +480,7 @@ "Team ID": "팀 ID", "Test connection": "연결 테스트", "The active turn changed. Your message is kept.": "진행 중인 턴이 바뀌었습니다. 메시지는 유지됩니다.", + "The conversation changed. Send a new message instead.": "대화가 변경됐어요. 새 메시지를 보내 주세요.", "The deployment document is invalid.": "배포 문서가 올바르지 않습니다.", "The main conversation is no longer available.": "원래 대화에 더 이상 접근할 수 없습니다.", "The plugin bundle could not be downloaded.": "플러그인 번들을 다운로드할 수 없습니다.", @@ -477,7 +493,10 @@ "The selected model is unavailable. Try again or choose another model.": "선택한 모델을 사용할 수 없습니다. 다시 시도하거나 다른 모델을 선택하세요.", "The selected package is unavailable.": "선택한 패키지를 사용할 수 없습니다.", "The selected plugin instance is unavailable.": "선택한 플러그인 인스턴스를 사용할 수 없습니다.", + "The workspace changed. Send a new message instead.": "작업 공간이 변경됐어요. 새 메시지를 보내 주세요.", + "There is no stopped reply to continue.": "이어갈 수 있는 중지된 답변이 없어요.", "These servers run outside the conversation sandbox and can run commands as your user or contact remote services. Full-access sessions can call their tools without further confirmation.": "이 서버들은 대화 샌드박스 외부에서 실행되며 사용자 권한으로 명령을 실행하거나 원격 서비스에 연결할 수 있습니다. 전체 접근 세션에서는 추가 확인 없이 해당 도구를 호출할 수 있습니다.", + "Thinking level": "사고 수준", "Thinking · {count, plural, one {# tool running} other {# tools running}}…": "생각 중 · {count, plural, other {도구 #개 실행 중}}…", "Thinking…": "생각 중…", "This QR code is not a Maka pairing link.": "이 QR 코드는 Maka 페어링 링크가 아닙니다.", @@ -491,6 +510,8 @@ "This iPhone Peer ID": "이 iPhone Peer ID", "This iPhone will disconnect from this computer and forget its pairing credentials. You can pair it again anytime.": "이 iPhone은 해당 컴퓨터와 연결을 끊고 페어링 정보를 삭제합니다. 언제든 다시 페어링할 수 있습니다.", "This message is no longer queued.": "이 메시지는 더 이상 대기열에 없습니다.", + "This reply can’t be continued safely. Send a new message instead.": "이 답변을 안전하게 이어갈 수 없어요. 새 메시지를 보내 주세요.", + "This reply has already been continued.": "이미 이어진 답변이에요.", "This run": "이번 실행", "This server stores literal environment variables or HTTP headers. Edit it on Desktop.": "이 서버는 환경 변수 또는 HTTP 헤더 값을 그대로 저장합니다. 데스크톱에서 편집하세요.", "This session": "이 세션", @@ -514,6 +535,8 @@ "Unavailable": "사용 불가", "Unpin": "고정 해제", "Update": "업데이트", + "Usage": "사용량", + "Usage & Details": "사용량 및 세부 정보", "Usage credential": "사용량 인증 정보", "Use Host default": "Host 기본값 사용", "Use a URL without credentials.": "인증 정보가 없는 URL을 사용하세요.", @@ -524,6 +547,8 @@ "Verification code": "확인 코드", "Verification code copied": "확인 코드가 복사됨", "View All Side Questions": "곁질문 모두 보기", + "Wait for the current reply and queue to finish.": "현재 답변과 대기열 처리가 끝날 때까지 기다려 주세요.", + "Wait for this reply to finish before continuing.": "이 답변이 끝난 후 계속해 주세요.", "Waiting for current turn": "현재 턴 완료 대기 중", "Waiting for provider sign-in…": "제공업체 로그인을 기다리는 중…", "Waiting for queue…": "대기열에 추가 중…", @@ -555,6 +580,10 @@ "{name} Bot": "{name} 봇", "{name} is offline": "{name} 오프라인", "{name} · Online": "{name} · 온라인", + "{rate} tok/s": "{rate} 토큰/초", "{title} · Waiting for your response": "{title} · 응답 대기 중", + "{used} / {window} tokens": "{used} / {window} 토큰", + "{used} tokens used": "{used} 토큰 사용", + "{window} token window": "컨텍스트 길이: {window} 토큰", "“{title}” on {computer} will be permanently deleted.": "{computer}의 “{title}”이(가) 영구적으로 삭제됩니다." } diff --git a/products/maka/ios-shell/locales/pt-BR.json b/products/maka/ios-shell/locales/pt-BR.json index 3720af6435e..ff56528d17b 100644 --- a/products/maka/ios-shell/locales/pt-BR.json +++ b/products/maka/ios-shell/locales/pt-BR.json @@ -113,9 +113,14 @@ "Connection is unavailable": "Conexão indisponível", "Connection timed out": "Tempo limite de conexão excedido", "Connections": "Conexões", + "Context": "Contexto", + "Context from the last request. Newer content isn’t included.": "Contexto da última solicitação. Não inclui o conteúdo mais recente.", "Context window": "Janela de contexto", + "Continue not confirmed. Refresh to check the reply.": "Não foi possível confirmar a retomada. Atualize para verificar a resposta.", "Continue only if this code matches the one displayed on your computer.": "Continue somente se este código corresponder ao exibido no seu computador.", + "Continue reply": "Continuar resposta", "Continue your work from any computer": "Continue seu trabalho de qualquer computador", + "Continuing reply…": "Continuando a resposta…", "Conversation title": "Título da conversa", "Conversation: {title}": "Conversa: {title}", "Copied": "Copiado", @@ -126,6 +131,7 @@ "Copy reply": "Copiar resposta", "Could not change the model.": "Não foi possível alterar o modelo.", "Could not confirm whether the message was sent. Check the conversation or queue before retrying.": "Não foi possível confirmar se a mensagem foi enviada. Confira a conversa ou a fila antes de tentar novamente.", + "Could not continue the reply. Try again.": "Não foi possível continuar a resposta. Tente novamente.", "Could not copy the edit.": "Não foi possível copiar a edição.", "Could not create the side question. Try again.": "Não foi possível criar a pergunta paralela. Tente novamente.", "Could not install the plugin.": "Não foi possível instalar o plugin.", @@ -143,6 +149,7 @@ "Could not save the proxy password.": "Não foi possível salvar a senha do proxy.", "Could not save the search API key.": "Não foi possível salvar a chave de API de busca.", "Could not send the message.": "Não foi possível enviar a mensagem.", + "Could not stop the reply. Try again.": "Não foi possível parar a resposta. Tente novamente.", "Could not sync Pending": "Não foi possível sincronizar as solicitações pendentes", "Could not sync chats": "Não foi possível sincronizar as conversas", "Could not update the conversation.": "Não foi possível atualizar a conversa.", @@ -246,6 +253,8 @@ "JSON body": "Corpo JSON", "Keep my edit": "Manter minha edição", "Language": "Idioma", + "Last request": "Última solicitação", + "Last synced": "Última sincronização", "Latest": "Mais recente", "Leave blank for automatic title": "Deixe em branco para título automático", "Light": "Claro", @@ -256,6 +265,7 @@ "Loading…": "Carregando…", "Low": "Baixo", "MCP": "MCP", + "Maka is shutting down. Try again after it restarts.": "O Maka está encerrando. Tente novamente após reiniciá-lo.", "Max output tokens": "Máximo de tokens de saída", "Maximum": "Máximo", "Medium": "Médio", @@ -293,8 +303,10 @@ "No skills": "Nenhuma habilidade", "No turn is running. This message remains queued.": "Nenhum turno em execução. Esta mensagem permanece na fila.", "No uncommitted changes": "Nenhuma alteração pendente", + "No usage data yet": "Ainda não há dados de uso", "No workspace path configured for this chat.": "Nenhum caminho do espaço de trabalho configurado para esta conversa.", "None": "Nenhum", + "Not measured": "Não medida", "Not sent. Choose a workspace, then retry.": "Não enviado. Escolha um espaço de trabalho e tente novamente.", "Now": "Agora", "Off": "Desativado", @@ -304,6 +316,7 @@ "Open Settings": "Abrir Ajustes", "Open sign-in page": "Abrir página de login", "Optional token": "Token opcional", + "Output speed": "Velocidade de saída", "Package entry": "Entrada do pacote", "Package settings": "Configurações do pacote", "Pair with Link": "Parear com link", @@ -387,6 +400,7 @@ "Request details": "Detalhes da solicitação", "Request is unavailable": "A solicitação está indisponível", "Required token": "Token obrigatório", + "Restore this conversation to continue it.": "Restaure a conversa para continuar.", "Result URL path": "Caminho da URL do resultado", "Result limit location": "Local do limite de resultados", "Result limit parameter (optional)": "Parâmetro de limite de resultados (opcional)", @@ -428,7 +442,6 @@ "Secret access key": "Chave de acesso secreta", "Select model": "Selecionar modelo", "Send message": "Enviar mensagem", - "Send to Main Chat": "Enviar na conversa principal", "Sending…": "Enviando…", "Server-side compaction": "Compactação no servidor", "Service": "Serviço", @@ -452,8 +465,10 @@ "Steer now": "Orientar agora", "Steer or message…": "Oriente ou escreva…", "Steer · Waiting for next step": "Orientação · Aguardando a próxima etapa", - "Stop Run": "Parar execução", + "Stop current reply": "Parar a resposta atual", + "Stop not confirmed. Refresh to check the reply.": "Não foi possível confirmar a parada. Atualize para verificar a resposta.", "Stopped before delivery. Your message is kept.": "Parado antes da entrega. Sua mensagem foi mantida.", + "Stopping reply…": "Parando a resposta…", "Subagents": "Subagentes", "Submit Answer": "Enviar resposta", "System": "Sistema", @@ -465,6 +480,7 @@ "Team ID": "ID da equipe", "Test connection": "Testar conexão", "The active turn changed. Your message is kept.": "O turno ativo mudou. Sua mensagem foi mantida.", + "The conversation changed. Send a new message instead.": "A conversa mudou. Envie uma nova mensagem.", "The deployment document is invalid.": "O documento de implantação é inválido.", "The main conversation is no longer available.": "A conversa principal não está mais disponível.", "The plugin bundle could not be downloaded.": "Não foi possível baixar o pacote do plugin.", @@ -477,7 +493,10 @@ "The selected model is unavailable. Try again or choose another model.": "O modelo selecionado está indisponível. Tente novamente ou escolha outro modelo.", "The selected package is unavailable.": "O pacote selecionado está indisponível.", "The selected plugin instance is unavailable.": "A instância de plugin selecionada está indisponível.", + "The workspace changed. Send a new message instead.": "O espaço de trabalho mudou. Envie uma nova mensagem.", + "There is no stopped reply to continue.": "Não há resposta interrompida para continuar.", "These servers run outside the conversation sandbox and can run commands as your user or contact remote services. Full-access sessions can call their tools without further confirmation.": "Estes servidores são executados fora da sandbox da conversa e podem executar comandos como seu usuário ou acessar serviços remotos. Sessões com acesso total podem chamar suas ferramentas sem confirmação adicional.", + "Thinking level": "Nível de raciocínio", "Thinking · {count, plural, one {# tool running} other {# tools running}}…": "Pensando · {count, plural, one {# ferramenta em uso} other {# ferramentas em uso}}…", "Thinking…": "Pensando…", "This QR code is not a Maka pairing link.": "Este código QR não é um link de pareamento do Maka.", @@ -491,6 +510,8 @@ "This iPhone Peer ID": "Peer ID deste iPhone", "This iPhone will disconnect from this computer and forget its pairing credentials. You can pair it again anytime.": "Este iPhone será desconectado deste computador e esquecerá as credenciais de pareamento. Você pode parear novamente quando quiser.", "This message is no longer queued.": "Esta mensagem não está mais na fila.", + "This reply can’t be continued safely. Send a new message instead.": "Não é possível retomar esta resposta com segurança. Envie uma nova mensagem.", + "This reply has already been continued.": "Esta resposta já foi retomada.", "This run": "Esta execução", "This server stores literal environment variables or HTTP headers. Edit it on Desktop.": "Este servidor armazena valores de variáveis de ambiente ou cabeçalhos HTTP em texto simples. Edite-o no desktop.", "This session": "Esta sessão", @@ -514,6 +535,8 @@ "Unavailable": "Indisponível", "Unpin": "Desafixar", "Update": "Atualizar", + "Usage": "Uso", + "Usage & Details": "Uso e detalhes", "Usage credential": "Credencial de uso", "Use Host default": "Usar padrão do Host", "Use a URL without credentials.": "Use um URL sem credenciais.", @@ -524,6 +547,8 @@ "Verification code": "Código de verificação", "Verification code copied": "Código de verificação copiado", "View All Side Questions": "Ver todas as perguntas paralelas", + "Wait for the current reply and queue to finish.": "Aguarde a resposta atual e a fila terminarem.", + "Wait for this reply to finish before continuing.": "Aguarde esta resposta terminar para continuar.", "Waiting for current turn": "Aguardando turno atual", "Waiting for provider sign-in…": "Aguardando login no provedor…", "Waiting for queue…": "Adicionando à fila…", @@ -555,6 +580,10 @@ "{name} Bot": "Bot de {name}", "{name} is offline": "{name} está offline", "{name} · Online": "{name} · On-line", + "{rate} tok/s": "{rate} tok/s", "{title} · Waiting for your response": "{title} · Aguardando sua resposta", + "{used} / {window} tokens": "{used} / {window} tokens", + "{used} tokens used": "Tokens usados: {used}", + "{window} token window": "Janela de {window} tokens", "“{title}” on {computer} will be permanently deleted.": "“{title}” em {computer} será excluída permanentemente." } diff --git a/products/maka/ios-shell/locales/ru.json b/products/maka/ios-shell/locales/ru.json index 812a0bee084..459e4671fce 100644 --- a/products/maka/ios-shell/locales/ru.json +++ b/products/maka/ios-shell/locales/ru.json @@ -113,9 +113,14 @@ "Connection is unavailable": "Подключение недоступно", "Connection timed out": "Время ожидания подключения истекло", "Connections": "Подключения", + "Context": "Контекст", + "Context from the last request. Newer content isn’t included.": "Контекст последнего запроса. Более новые данные не учтены.", "Context window": "Контекстное окно", + "Continue not confirmed. Refresh to check the reply.": "Возобновление не подтверждено. Обновите беседу, чтобы проверить ответ.", "Continue only if this code matches the one displayed on your computer.": "Продолжайте, только если этот код совпадает с кодом на экране компьютера.", + "Continue reply": "Продолжить ответ", "Continue your work from any computer": "Продолжайте работу с любого компьютера", + "Continuing reply…": "Возобновление ответа…", "Conversation title": "Название диалога", "Conversation: {title}": "Диалог: {title}", "Copied": "Скопировано", @@ -126,6 +131,7 @@ "Copy reply": "Копировать ответ", "Could not change the model.": "Не удалось сменить модель.", "Could not confirm whether the message was sent. Check the conversation or queue before retrying.": "Не удалось подтвердить, что сообщение отправлено. Перед повторной попыткой проверьте историю чата или очередь.", + "Could not continue the reply. Try again.": "Не удалось продолжить ответ. Попробуйте ещё раз.", "Could not copy the edit.": "Не удалось скопировать правку.", "Could not create the side question. Try again.": "Не удалось создать отдельный чат для вопроса. Попробуйте ещё раз.", "Could not install the plugin.": "Не удалось установить плагин.", @@ -143,6 +149,7 @@ "Could not save the proxy password.": "Не удалось сохранить пароль прокси.", "Could not save the search API key.": "Не удалось сохранить ключ API поиска.", "Could not send the message.": "Не удалось отправить сообщение.", + "Could not stop the reply. Try again.": "Не удалось остановить ответ. Попробуйте ещё раз.", "Could not sync Pending": "Не удалось синхронизировать ожидающие запросы", "Could not sync chats": "Не удалось синхронизировать чаты", "Could not update the conversation.": "Не удалось обновить диалог.", @@ -246,6 +253,8 @@ "JSON body": "Тело JSON", "Keep my edit": "Оставить мою правку", "Language": "Язык", + "Last request": "Последний запрос", + "Last synced": "Последняя синхронизация", "Latest": "Вниз", "Leave blank for automatic title": "Оставьте пустым для автоназвания", "Light": "Светлая", @@ -256,6 +265,7 @@ "Loading…": "Загрузка…", "Low": "Низкий", "MCP": "MCP", + "Maka is shutting down. Try again after it restarts.": "Maka завершает работу. Попробуйте снова после перезапуска.", "Max output tokens": "Максимум токенов на выходе", "Maximum": "Максимальный", "Medium": "Средний", @@ -293,8 +303,10 @@ "No skills": "Нет навыков", "No turn is running. This message remains queued.": "Ни один ход не выполняется. Это сообщение остаётся в очереди.", "No uncommitted changes": "Нет незафиксированных изменений", + "No usage data yet": "Данных об использовании пока нет", "No workspace path configured for this chat.": "Для этого чата не задан путь к проекту.", "None": "Нет", + "Not measured": "Нет замера", "Not sent. Choose a workspace, then retry.": "Не отправлено. Выберите рабочую область и повторите попытку.", "Now": "Сейчас", "Off": "Выкл.", @@ -304,6 +316,7 @@ "Open Settings": "Открыть Настройки", "Open sign-in page": "Открыть страницу входа", "Optional token": "Необязательный токен", + "Output speed": "Скорость вывода", "Package entry": "Точка входа пакета", "Package settings": "Настройки пакета", "Pair with Link": "Сопряжение по ссылке", @@ -387,6 +400,7 @@ "Request details": "Подробности запроса", "Request is unavailable": "Запрос недоступен", "Required token": "Обязательный токен", + "Restore this conversation to continue it.": "Восстановите беседу, чтобы продолжить её.", "Result URL path": "Путь к URL результата", "Result limit location": "Расположение лимита результатов", "Result limit parameter (optional)": "Параметр лимита результатов (необязательно)", @@ -428,7 +442,6 @@ "Secret access key": "Секретный ключ доступа", "Select model": "Выбрать модель", "Send message": "Отправить сообщение", - "Send to Main Chat": "Отправить в основной чат", "Sending…": "Отправка…", "Server-side compaction": "Сжатие на сервере", "Service": "Сервис", @@ -452,8 +465,10 @@ "Steer now": "Направить сейчас", "Steer or message…": "Команда или текст…", "Steer · Waiting for next step": "Указание · Ожидание следующего шага", - "Stop Run": "Остановить", + "Stop current reply": "Остановить текущий ответ", + "Stop not confirmed. Refresh to check the reply.": "Остановка не подтверждена. Обновите беседу, чтобы проверить ответ.", "Stopped before delivery. Your message is kept.": "Остановлено до доставки. Сообщение сохранено.", + "Stopping reply…": "Остановка ответа…", "Subagents": "Субагенты", "Submit Answer": "Отправить ответ", "System": "Системная", @@ -465,6 +480,7 @@ "Team ID": "ID команды", "Test connection": "Проверить подключение", "The active turn changed. Your message is kept.": "Активный ход изменился. Ваше сообщение сохранено.", + "The conversation changed. Send a new message instead.": "Беседа изменилась. Отправьте новое сообщение.", "The deployment document is invalid.": "Документ развёртывания некорректен.", "The main conversation is no longer available.": "Основной чат больше недоступен.", "The plugin bundle could not be downloaded.": "Не удалось скачать пакет плагина.", @@ -477,7 +493,10 @@ "The selected model is unavailable. Try again or choose another model.": "Выбранная модель недоступна. Повторите попытку или выберите другую модель.", "The selected package is unavailable.": "Выбранный пакет недоступен.", "The selected plugin instance is unavailable.": "Выбранный экземпляр плагина недоступен.", + "The workspace changed. Send a new message instead.": "Рабочая область изменилась. Отправьте новое сообщение.", + "There is no stopped reply to continue.": "Нет остановленного ответа, который можно продолжить.", "These servers run outside the conversation sandbox and can run commands as your user or contact remote services. Full-access sessions can call their tools without further confirmation.": "Эти серверы работают вне песочницы диалога и могут выполнять команды от вашего имени или обращаться к внешним службам. Сессии с полным доступом могут вызывать их инструменты без дополнительного подтверждения.", + "Thinking level": "Уровень рассуждения", "Thinking · {count, plural, one {# tool running} other {# tools running}}…": "Размышление · {count, plural, one {# инструмент работает} few {# инструмента работают} many {# инструментов работают} other {# инструмента работают}}…", "Thinking…": "Размышление…", "This QR code is not a Maka pairing link.": "Этот QR-код не является ссылкой сопряжения Maka.", @@ -491,6 +510,8 @@ "This iPhone Peer ID": "Peer ID этого iPhone", "This iPhone will disconnect from this computer and forget its pairing credentials. You can pair it again anytime.": "Этот iPhone отключится от компьютера и удалит данные сопряжения. Вы сможете подключить его снова в любое время.", "This message is no longer queued.": "Это сообщение больше не в очереди.", + "This reply can’t be continued safely. Send a new message instead.": "Этот ответ нельзя безопасно продолжить. Отправьте новое сообщение.", + "This reply has already been continued.": "Этот ответ уже возобновлён.", "This run": "Этот запуск", "This server stores literal environment variables or HTTP headers. Edit it on Desktop.": "Этот сервер хранит значения переменных окружения или HTTP-заголовков открытым текстом. Измените настройки на компьютере.", "This session": "Эта сессия", @@ -514,6 +535,8 @@ "Unavailable": "Недоступно", "Unpin": "Открепить", "Update": "Обновить", + "Usage": "Использование", + "Usage & Details": "Использование и детали", "Usage credential": "Данные доступа к статистике", "Use Host default": "По умолчанию хоста", "Use a URL without credentials.": "Используйте URL без учётных данных.", @@ -524,6 +547,8 @@ "Verification code": "Код подтверждения", "Verification code copied": "Код подтверждения скопирован", "View All Side Questions": "Посмотреть все вопросы в отдельных чатах", + "Wait for the current reply and queue to finish.": "Дождитесь завершения текущего ответа и обработки очереди.", + "Wait for this reply to finish before continuing.": "Дождитесь завершения этого ответа.", "Waiting for current turn": "Ожидание текущего шага", "Waiting for provider sign-in…": "Ожидание входа у провайдера…", "Waiting for queue…": "Добавление в очередь…", @@ -555,6 +580,10 @@ "{name} Bot": "Бот на {name}", "{name} is offline": "{name} не в сети", "{name} · Online": "{name} · В сети", + "{rate} tok/s": "{rate} токенов/с", "{title} · Waiting for your response": "{title} · Ожидает вашего ответа", + "{used} / {window} tokens": "{used} / {window} токенов", + "{used} tokens used": "Использовано токенов: {used}", + "{window} token window": "Окно контекста: {window} токенов", "“{title}” on {computer} will be permanently deleted.": "«{title}» на {computer} будет удалён безвозвратно." } diff --git a/products/maka/ios-shell/locales/zh-CN.json b/products/maka/ios-shell/locales/zh-CN.json index a97c6fde78f..071b46cb096 100644 --- a/products/maka/ios-shell/locales/zh-CN.json +++ b/products/maka/ios-shell/locales/zh-CN.json @@ -113,9 +113,14 @@ "Connection is unavailable": "连接不可用", "Connection timed out": "连接超时", "Connections": "连接", + "Context": "上下文", + "Context from the last request. Newer content isn’t included.": "上次请求的上下文 · 之后新增的内容未计入", "Context window": "上下文窗口", + "Continue not confirmed. Refresh to check the reply.": "未确认是否继续。刷新后查看回复状态。", "Continue only if this code matches the one displayed on your computer.": "请确认此验证码与电脑屏幕上显示的一致后再继续配对。", + "Continue reply": "继续回复", "Continue your work from any computer": "继续你电脑上的工作", + "Continuing reply…": "正在继续回复…", "Conversation title": "对话标题", "Conversation: {title}": "会话:{title}", "Copied": "已复制", @@ -126,6 +131,7 @@ "Copy reply": "复制回复", "Could not change the model.": "无法切换模型。", "Could not confirm whether the message was sent. Check the conversation or queue before retrying.": "无法确认消息是否已发送,重试前请先查看会话记录或队列。", + "Could not continue the reply. Try again.": "没能继续回复,请重试。", "Could not copy the edit.": "无法复制编辑内容。", "Could not create the side question. Try again.": "无法创建旁问,请重试。", "Could not install the plugin.": "无法安装插件。", @@ -143,6 +149,7 @@ "Could not save the proxy password.": "无法保存代理密码。", "Could not save the search API key.": "无法保存搜索 API 密钥。", "Could not send the message.": "无法发送消息。", + "Could not stop the reply. Try again.": "没能停止回复,请重试。", "Could not sync Pending": "无法同步待处理请求", "Could not sync chats": "无法同步聊天", "Could not update the conversation.": "无法更新会话。", @@ -246,6 +253,8 @@ "JSON body": "JSON 请求体", "Keep my edit": "保留我的编辑", "Language": "语言", + "Last request": "上次请求", + "Last synced": "上次同步", "Latest": "最新", "Leave blank for automatic title": "留空将自动生成标题", "Light": "浅色", @@ -256,6 +265,7 @@ "Loading…": "正在加载…", "Low": "低", "MCP": "MCP", + "Maka is shutting down. Try again after it restarts.": "Maka 正在关闭,重启后再试。", "Max output tokens": "最大输出 Token 数", "Maximum": "最高", "Medium": "中", @@ -293,8 +303,10 @@ "No skills": "没有技能", "No turn is running. This message remains queued.": "当前没有正在运行的轮次,消息仍在队列中。", "No uncommitted changes": "暂无未提交改动", + "No usage data yet": "暂无用量数据", "No workspace path configured for this chat.": "此对话未绑定工作区路径。", "None": "无", + "Not measured": "未测出", "Not sent. Choose a workspace, then retry.": "未发送。请先选择工作区,然后重试。", "Now": "刚刚", "Off": "关闭", @@ -304,6 +316,7 @@ "Open Settings": "前往系统设置", "Open sign-in page": "打开登录页", "Optional token": "可选令牌", + "Output speed": "输出速度", "Package entry": "软件包入口", "Package settings": "软件包设置", "Pair with Link": "通过链接配对", @@ -387,6 +400,7 @@ "Request details": "请求详情", "Request is unavailable": "请求不可用", "Required token": "必填令牌", + "Restore this conversation to continue it.": "恢复此会话后才能继续。", "Result URL path": "结果 URL 路径", "Result limit location": "结果数量参数位置", "Result limit parameter (optional)": "结果数量参数(选填)", @@ -428,7 +442,6 @@ "Secret access key": "秘密访问密钥", "Select model": "选择模型", "Send message": "发送消息", - "Send to Main Chat": "发送到主会话", "Sending…": "正在发送…", "Server-side compaction": "服务端压缩", "Service": "服务授权", @@ -452,8 +465,10 @@ "Steer now": "立即引导", "Steer or message…": "引导或发消息…", "Steer · Waiting for next step": "引导 · 等待下一步", - "Stop Run": "停止运行", + "Stop current reply": "停止当前回复", + "Stop not confirmed. Refresh to check the reply.": "停止状态未确认。刷新后查看回复状态。", "Stopped before delivery. Your message is kept.": "送达前已停止,消息已保留。", + "Stopping reply…": "正在停止回复…", "Subagents": "子 Agent", "Submit Answer": "提交回答", "System": "跟随系统", @@ -465,6 +480,7 @@ "Team ID": "团队 ID", "Test connection": "测试连接", "The active turn changed. Your message is kept.": "当前回合已变更。您的消息已保留。", + "The conversation changed. Send a new message instead.": "会话已变化,请发一条新消息。", "The deployment document is invalid.": "部署文档无效。", "The main conversation is no longer available.": "主会话已不可用。", "The plugin bundle could not be downloaded.": "无法下载插件包。", @@ -477,7 +493,10 @@ "The selected model is unavailable. Try again or choose another model.": "所选模型暂不可用,请重试或选择其他模型。", "The selected package is unavailable.": "所选的软件包不可用。", "The selected plugin instance is unavailable.": "所选的插件实例不可用。", + "The workspace changed. Send a new message instead.": "工作区已变化,请发一条新消息。", + "There is no stopped reply to continue.": "没有可继续的回复。", "These servers run outside the conversation sandbox and can run commands as your user or contact remote services. Full-access sessions can call their tools without further confirmation.": "这些服务器在会话沙箱外运行,可以用你的身份执行命令或访问远程服务。完全访问会话调用其工具时无需再次确认。", + "Thinking level": "思考档位", "Thinking · {count, plural, one {# tool running} other {# tools running}}…": "思考中 · {count, plural, other {# 项工具运行中}}…", "Thinking…": "思考中…", "This QR code is not a Maka pairing link.": "此二维码不是有效的 Maka 配对链接。", @@ -491,6 +510,8 @@ "This iPhone Peer ID": "本机 iPhone Peer ID", "This iPhone will disconnect from this computer and forget its pairing credentials. You can pair it again anytime.": "此 iPhone 将断开与该电脑的连接并清除配对凭据,之后可随时重新配对。", "This message is no longer queued.": "此消息已离开队列。", + "This reply can’t be continued safely. Send a new message instead.": "无法安全地继续这条回复,请发一条新消息。", + "This reply has already been continued.": "这条回复已经继续了。", "This run": "本次运行", "This server stores literal environment variables or HTTP headers. Edit it on Desktop.": "此服务器存有明文环境变量或 HTTP 请求头。请在桌面端编辑。", "This session": "本次对话", @@ -514,6 +535,8 @@ "Unavailable": "不可用", "Unpin": "取消置顶", "Update": "更新", + "Usage": "用量", + "Usage & Details": "用量与详情", "Usage credential": "用量凭据", "Use Host default": "使用 Host 默认值", "Use a URL without credentials.": "请使用不含凭据的 URL。", @@ -524,6 +547,8 @@ "Verification code": "安全验证码", "Verification code copied": "已复制安全验证码", "View All Side Questions": "查看所有旁问", + "Wait for the current reply and queue to finish.": "等当前回复和排队消息处理完再继续。", + "Wait for this reply to finish before continuing.": "等这条回复结束再继续。", "Waiting for current turn": "等待当前轮次完成", "Waiting for provider sign-in…": "正在等待服务商授权…", "Waiting for queue…": "正在加入队列…", @@ -555,6 +580,10 @@ "{name} Bot": "{name} 的 Bot", "{name} is offline": "{name} 已离线", "{name} · Online": "{name} · 在线", + "{rate} tok/s": "{rate} tok/s", "{title} · Waiting for your response": "{title} · 等待你的回复", + "{used} / {window} tokens": "{used} / {window} tokens", + "{used} tokens used": "已用 {used} tokens", + "{window} token window": "上下文窗口:{window} tokens", "“{title}” on {computer} will be permanently deleted.": "将永久删除 {computer} 上的「{title}」。" } diff --git a/products/maka/ios-shell/locales/zh-HK.json b/products/maka/ios-shell/locales/zh-HK.json index c6f7ab45273..b9280b2339b 100644 --- a/products/maka/ios-shell/locales/zh-HK.json +++ b/products/maka/ios-shell/locales/zh-HK.json @@ -68,8 +68,8 @@ "Saved Host relay Bearer token": "已儲存的 Host 中繼 Bearer 令牌", "Scan a QR code to pair with your Maka Host.": "掃描 QR Code,將這部裝置與你的 Maka 主機配對。", "Secret access key": "私密存取密鑰", - "Send to Main Chat": "傳送至主對話", "Source unavailable": "來源不可用", + "Stop current reply": "停止當前回覆", "The plugin bundle could not be downloaded.": "無法下載插件軟件包。", "The plugin bundle is invalid.": "插件軟件包無效。", "The selected package is unavailable.": "所選的軟件包無法使用。", @@ -81,6 +81,7 @@ "This message is no longer queued.": "此訊息已離開隊列。", "This turn cannot accept this message right now. It remains queued.": "本輪暫時無法接收此訊息,訊息仍在隊列中。", "Unavailable": "不可用", + "Usage & Details": "用量與詳細資料", "User action required": "需要用戶操作", "Username": "用戶名稱", "Web Search": "網絡搜尋", diff --git a/products/maka/ios-shell/locales/zh-TW.json b/products/maka/ios-shell/locales/zh-TW.json index ff56b5b9995..f0adb37d6a4 100644 --- a/products/maka/ios-shell/locales/zh-TW.json +++ b/products/maka/ios-shell/locales/zh-TW.json @@ -113,9 +113,14 @@ "Connection is unavailable": "連線無法使用", "Connection timed out": "連線逾時", "Connections": "連線", + "Context": "上下文", + "Context from the last request. Newer content isn’t included.": "上次請求的上下文 · 未計入後續新增的內容", "Context window": "上下文視窗", + "Continue not confirmed. Refresh to check the reply.": "尚未確認是否繼續。請重新整理以查看回覆狀態。", "Continue only if this code matches the one displayed on your computer.": "請確認此驗證碼與電腦螢幕上顯示的一致後再繼續配對。", + "Continue reply": "繼續回覆", "Continue your work from any computer": "接續你電腦上的工作", + "Continuing reply…": "正在繼續回覆…", "Conversation title": "對話標題", "Conversation: {title}": "對話:{title}", "Copied": "已複製", @@ -126,6 +131,7 @@ "Copy reply": "複製回覆", "Could not change the model.": "無法切換模型。", "Could not confirm whether the message was sent. Check the conversation or queue before retrying.": "無法確認訊息是否已傳送,重試前請先查看對話記錄或佇列。", + "Could not continue the reply. Try again.": "無法繼續回覆,請再試一次。", "Could not copy the edit.": "無法複製編輯內容。", "Could not create the side question. Try again.": "無法建立旁問,請再試一次。", "Could not install the plugin.": "無法安裝外掛程式。", @@ -143,6 +149,7 @@ "Could not save the proxy password.": "無法儲存 Proxy 密碼。", "Could not save the search API key.": "無法儲存搜尋 API 金鑰。", "Could not send the message.": "無法傳送訊息。", + "Could not stop the reply. Try again.": "無法停止回覆,請再試一次。", "Could not sync Pending": "無法同步待處理請求", "Could not sync chats": "無法同步聊天", "Could not update the conversation.": "無法更新對話。", @@ -246,6 +253,8 @@ "JSON body": "JSON 請求本文", "Keep my edit": "保留我的編輯", "Language": "語言", + "Last request": "上次請求", + "Last synced": "上次同步", "Latest": "最新", "Leave blank for automatic title": "留空將自動產生標題", "Light": "淺色", @@ -256,6 +265,7 @@ "Loading…": "載入中…", "Low": "低", "MCP": "MCP", + "Maka is shutting down. Try again after it restarts.": "Maka 正在關閉,請在重新啟動後再試。", "Max output tokens": "最大輸出 Token 數", "Maximum": "最高", "Medium": "中", @@ -293,8 +303,10 @@ "No skills": "沒有技能", "No turn is running. This message remains queued.": "目前沒有正在執行的輪次,訊息仍在佇列中。", "No uncommitted changes": "尚無未提交的變更", + "No usage data yet": "暫無用量資料", "No workspace path configured for this chat.": "此對話未設定工作區路徑。", "None": "無", + "Not measured": "未測得", "Not sent. Choose a workspace, then retry.": "未傳送。請先選擇工作區,然後重試。", "Now": "剛剛", "Off": "關閉", @@ -304,6 +316,7 @@ "Open Settings": "開啟系統設定", "Open sign-in page": "開啟登入頁面", "Optional token": "選填權杖", + "Output speed": "輸出速度", "Package entry": "套件入口", "Package settings": "套件設定", "Pair with Link": "使用連結配對", @@ -387,6 +400,7 @@ "Request details": "請求詳情", "Request is unavailable": "請求無法使用", "Required token": "必填權杖", + "Restore this conversation to continue it.": "還原此對話後即可繼續。", "Result URL path": "結果 URL 路徑", "Result limit location": "結果數量參數位置", "Result limit parameter (optional)": "結果數量參數(選填)", @@ -428,7 +442,6 @@ "Secret access key": "私密存取金鑰", "Select model": "選擇模型", "Send message": "傳送訊息", - "Send to Main Chat": "送至主對話", "Sending…": "正在傳送…", "Server-side compaction": "伺服器端壓縮", "Service": "服務授權", @@ -452,8 +465,10 @@ "Steer now": "立即引導", "Steer or message…": "引導或傳送訊息…", "Steer · Waiting for next step": "引導 · 等待下一步", - "Stop Run": "停止執行", + "Stop current reply": "停止目前的回覆", + "Stop not confirmed. Refresh to check the reply.": "尚未確認是否停止。請重新整理以查看回覆狀態。", "Stopped before delivery. Your message is kept.": "送達前已停止,訊息已保留。", + "Stopping reply…": "正在停止回覆…", "Subagents": "子 Agent", "Submit Answer": "送出回答", "System": "跟隨系統", @@ -465,6 +480,7 @@ "Team ID": "團隊 ID", "Test connection": "測試連線", "The active turn changed. Your message is kept.": "目前回合已變更。你的訊息已保留。", + "The conversation changed. Send a new message instead.": "對話已有變動,請傳送新訊息。", "The deployment document is invalid.": "部署文件無效。", "The main conversation is no longer available.": "主對話已無法存取。", "The plugin bundle could not be downloaded.": "無法下載外掛套件。", @@ -477,7 +493,10 @@ "The selected model is unavailable. Try again or choose another model.": "所選模型暫不可用,請重試或選擇其他模型。", "The selected package is unavailable.": "所選的套件無法使用。", "The selected plugin instance is unavailable.": "所選的外掛執行個體無法使用。", + "The workspace changed. Send a new message instead.": "工作區已有變動,請傳送新訊息。", + "There is no stopped reply to continue.": "沒有可繼續的回覆。", "These servers run outside the conversation sandbox and can run commands as your user or contact remote services. Full-access sessions can call their tools without further confirmation.": "這些伺服器在對話沙箱外執行,可以用你的身分執行命令或連線遠端服務。完整存取對話呼叫其工具時無需再次確認。", + "Thinking level": "思考等級", "Thinking · {count, plural, one {# tool running} other {# tools running}}…": "思考中 · {count, plural, other {# 項工具執行中}}…", "Thinking…": "思考中…", "This QR code is not a Maka pairing link.": "此 QR Code 不是有效的 Maka 配對連結。", @@ -491,6 +510,8 @@ "This iPhone Peer ID": "這台 iPhone Peer ID", "This iPhone will disconnect from this computer and forget its pairing credentials. You can pair it again anytime.": "這台 iPhone 將中斷與此電腦的連線並忘記配對憑證,日後可隨時重新配對。", "This message is no longer queued.": "此訊息已離開佇列。", + "This reply can’t be continued safely. Send a new message instead.": "無法安全地繼續這則回覆,請傳送新訊息。", + "This reply has already been continued.": "這則回覆已經繼續。", "This run": "本次執行", "This server stores literal environment variables or HTTP headers. Edit it on Desktop.": "此伺服器存有明文環境變數或 HTTP 標頭。請在桌面端編輯。", "This session": "本次對話", @@ -514,6 +535,8 @@ "Unavailable": "無法使用", "Unpin": "取消置頂", "Update": "更新", + "Usage": "用量", + "Usage & Details": "用量與詳情", "Usage credential": "用量憑證", "Use Host default": "使用 Host 預設值", "Use a URL without credentials.": "請使用不含憑證的 URL。", @@ -524,6 +547,8 @@ "Verification code": "驗證碼", "Verification code copied": "已複製驗證碼", "View All Side Questions": "查看所有旁問", + "Wait for the current reply and queue to finish.": "請等目前的回覆與佇列處理完畢再繼續。", + "Wait for this reply to finish before continuing.": "請等這則回覆結束再繼續。", "Waiting for current turn": "等待目前輪次完成", "Waiting for provider sign-in…": "正在等待服務商授權…", "Waiting for queue…": "正在加入佇列⋯", @@ -555,6 +580,10 @@ "{name} Bot": "{name} 的 Bot", "{name} is offline": "{name} 已離線", "{name} · Online": "{name} · 在線", + "{rate} tok/s": "{rate} tok/s", "{title} · Waiting for your response": "{title} · 等待你的回覆", + "{used} / {window} tokens": "{used} / {window} tokens", + "{used} tokens used": "已用 {used} tokens", + "{window} token window": "上下文視窗:{window} tokens", "“{title}” on {computer} will be permanently deleted.": "將永久刪除 {computer} 上的「{title}」。" } diff --git a/products/maka/ios-shell/src/bridge.rs b/products/maka/ios-shell/src/bridge.rs index 0bb247d9652..e35f0f17279 100644 --- a/products/maka/ios-shell/src/bridge.rs +++ b/products/maka/ios-shell/src/bridge.rs @@ -43,7 +43,7 @@ use tokio_util::sync::CancellationToken; const PAIR_SCHEME: &str = "maka://pair/v1?payload="; const PROGRESS_WINDOW: u64 = 8; -const SEND_TIMEOUT: Duration = Duration::from_secs(30); +const CHAT_MUTATION_TIMEOUT: Duration = Duration::from_secs(30); const PROGRESS_ACK_STALL_TIMEOUT: Duration = Duration::from_secs(30); pub const ALLOWED_HOST_CALLS: &[&str] = &[ "ios.bootstrap", @@ -308,7 +308,7 @@ struct Bridge { snapshot_revision: Arc, shutdown: CancellationToken, progress_ack_stall_timeout: Duration, - send_timeout: Duration, + chat_mutation_timeout: Duration, runtime: Handle, } @@ -399,7 +399,7 @@ impl HostBridge { support_dir, runtime, PROGRESS_ACK_STALL_TIMEOUT, - SEND_TIMEOUT, + CHAT_MUTATION_TIMEOUT, ) } @@ -408,7 +408,7 @@ impl HostBridge { support_dir: PathBuf, runtime: Handle, progress_ack_stall_timeout: Duration, - send_timeout: Duration, + chat_mutation_timeout: Duration, ) -> Result { let identity = crate::identity::load(&support_dir)?; let profile_path = support_dir.join("hosts.json"); @@ -433,7 +433,7 @@ impl HostBridge { snapshot_revision: Arc::new(AtomicU64::new(0)), shutdown: CancellationToken::new(), progress_ack_stall_timeout, - send_timeout, + chat_mutation_timeout, }; for &name in ALLOWED_HOST_CALLS { let bridge = bridge.clone(); @@ -461,10 +461,13 @@ impl HostBridge { Err(err) => call.reply(Err(err)), } } else if name == "ios.hostMutate" { - let send = data["endpoint"] == "agent" && data["method"] == "send"; + let chat_mutation = data["endpoint"] + .as_str() + .zip(data["method"].as_str()) + .is_some_and(|(endpoint, method)| is_chat_mutation(endpoint, method)); let result = match bridge.mutate(data, Some(&call)).await { Ok(value) => Ok(value), - Err(MutationFailure::NotSubmitted(detail)) if send => { + Err(MutationFailure::NotSubmitted(detail)) if chat_mutation => { Ok(json!({"notSubmitted": detail})) } Err(MutationFailure::NotSubmitted(detail) | MutationFailure::Unconfirmed(detail)) => Err(detail), @@ -506,6 +509,10 @@ impl Drop for HostBridge { } } +fn is_chat_mutation(endpoint: &str, method: &str) -> bool { + endpoint == "agent" && matches!(method, "send" | "continueRun" | "stop") +} + #[derive(Debug)] enum MutationFailure { NotSubmitted(String), @@ -735,10 +742,10 @@ impl Bridge { Some(_) => return Err("secret must be UTF-8 text".to_owned().into()), }; let rpc: Rpc = decode(data)?; - let send = rpc.endpoint == "agent" && rpc.method == "send"; - let deadline = send.then(|| tokio::time::Instant::now() + self.send_timeout); + let deadline = is_chat_mutation(&rpc.endpoint, &rpc.method) + .then(|| tokio::time::Instant::now() + self.chat_mutation_timeout); let room_session = if rpc.prepare_room_post == Some(true) { - if !send { + if rpc.endpoint != "agent" || rpc.method != "send" { return Err("Room post preparation requires agent.send" .to_owned() .into()); @@ -835,7 +842,7 @@ impl Bridge { let prepared = match deadline { Some(deadline) => tokio::time::timeout_at(deadline, prepare) .await - .map_err(|_| "Timed out preparing the Host message".to_owned())??, + .map_err(|_| "Timed out preparing the Host mutation".to_owned())??, None => prepare.await?, }; let on_progress = async |value| { @@ -2093,7 +2100,7 @@ mod tests { #[tokio::test(flavor = "multi_thread", worker_threads = 2)] async fn progress_backpressure_is_lossless_and_isolated_to_the_call() { let (_dir, host, app, mut events) = - progress_fixture(PROGRESS_ACK_STALL_TIMEOUT, SEND_TIMEOUT); + progress_fixture(PROGRESS_ACK_STALL_TIMEOUT, CHAT_MUTATION_TIMEOUT); let bridge = &host.bridge; let a = TcpListener::bind("127.0.0.1:0").await.unwrap(); let b = TcpListener::bind("127.0.0.1:0").await.unwrap(); @@ -2159,7 +2166,7 @@ mod tests { #[tokio::test(flavor = "multi_thread", worker_threads = 2)] async fn retiring_the_host_wakes_unacked_progress_without_masking_the_error() { let (_dir, host, app, mut events) = - progress_fixture(PROGRESS_ACK_STALL_TIMEOUT, SEND_TIMEOUT); + progress_fixture(PROGRESS_ACK_STALL_TIMEOUT, CHAT_MUTATION_TIMEOUT); let bridge = &host.bridge; let listener = TcpListener::bind("127.0.0.1:0").await.unwrap(); tokio::time::timeout(Duration::from_secs(5), async { @@ -2202,7 +2209,7 @@ mod tests { async fn detaching_the_app_or_dropping_the_bridge_wakes_unacked_progress() { for detach_app in [true, false] { let (_dir, host, app, mut events) = - progress_fixture(PROGRESS_ACK_STALL_TIMEOUT, SEND_TIMEOUT); + progress_fixture(PROGRESS_ACK_STALL_TIMEOUT, CHAT_MUTATION_TIMEOUT); let bridge = host.bridge.clone(); let listener = TcpListener::bind("127.0.0.1:0").await.unwrap(); tokio::time::timeout(Duration::from_secs(5), async { @@ -2230,7 +2237,7 @@ mod tests { #[tokio::test(flavor = "multi_thread", worker_threads = 2)] async fn stalled_progress_leaves_the_terminal_host_error_visible() { let stall_timeout = Duration::from_millis(50); - let (_dir, host, _app, mut events) = progress_fixture(stall_timeout, SEND_TIMEOUT); + let (_dir, host, _app, mut events) = progress_fixture(stall_timeout, CHAT_MUTATION_TIMEOUT); let bridge = &host.bridge; let listener = TcpListener::bind("127.0.0.1:0").await.unwrap(); tokio::time::timeout(Duration::from_secs(5), async { @@ -2278,7 +2285,7 @@ mod tests { #[tokio::test(flavor = "multi_thread", worker_threads = 2)] async fn room_post_identity_reaches_the_ui_before_confirming_the_mutation() { let (_dir, host, _app, mut events) = - progress_fixture(PROGRESS_ACK_STALL_TIMEOUT, SEND_TIMEOUT); + progress_fixture(PROGRESS_ACK_STALL_TIMEOUT, CHAT_MUTATION_TIMEOUT); let bridge = &host.bridge; let listener = TcpListener::bind("127.0.0.1:0").await.unwrap(); tokio::time::timeout(Duration::from_secs(5), async { @@ -2364,9 +2371,72 @@ mod tests { }).await.unwrap(); } + #[tokio::test(flavor = "multi_thread", worker_threads = 2)] + async fn chat_controls_can_retry_after_prepare_failure() { + let (_dir, host, _app, mut events) = + progress_fixture(PROGRESS_ACK_STALL_TIMEOUT, CHAT_MUTATION_TIMEOUT); + let bridge = &host.bridge; + let listener = TcpListener::bind("127.0.0.1:0").await.unwrap(); + tokio::time::timeout(Duration::from_secs(5), async { + let (generation, session, _anchor) = progress_host(bridge, &listener, "root").await; + for method in ["continueRun", "stop"] { + let data = json!({"rootId":"root","generation":generation,"endpoint":"agent", + "method":method,"input":{"sessionId":"chat","runId":"run","sourceRunId":"run"}}); + bridge.channel.send("test.mutate", data.clone()).unwrap(); + let (actual, mut call) = open_rpc(&listener, session).await; + assert_eq!(actual, method); + send_frame(&mut call, json!({"kind":"aborted","reason":"prepare refused"})).await; + + let reply = events.recv().await.unwrap(); + assert!(reply["reply"]["notSubmitted"].as_str().unwrap().contains("prepare refused"), "{reply}"); + assert!(matches!(call.next().await, None | Some(Err(_)))); + + bridge.channel.send("test.mutate", data).unwrap(); + let (actual, mut retry) = open_rpc(&listener, session).await; + assert_eq!(actual, method); + let reference = prepare_mutation(&mut retry).await; + finish_mutation(&mut retry, reference).await; + assert_eq!(events.recv().await.unwrap(), json!({"rootId":"root","reply":{"value":"done"}})); + } + }).await.unwrap(); + } + + #[tokio::test(flavor = "multi_thread", worker_threads = 2)] + async fn chat_controls_losing_the_connection_after_confirm_have_no_retryable_receipt() { + let (_dir, host, _app, mut events) = + progress_fixture(PROGRESS_ACK_STALL_TIMEOUT, CHAT_MUTATION_TIMEOUT); + let bridge = &host.bridge; + let listener = TcpListener::bind("127.0.0.1:0").await.unwrap(); + tokio::time::timeout(Duration::from_secs(5), async { + let (generation, session, _anchor) = progress_host(bridge, &listener, "root").await; + for method in ["continueRun", "stop"] { + bridge.channel.send("test.mutate", json!({ + "rootId":"root","generation":generation,"endpoint":"agent","method":method, + "input":{"sessionId":"chat","runId":"run","sourceRunId":"run"}, + })).unwrap(); + let (actual, mut call) = open_rpc(&listener, session).await; + assert_eq!(actual, method); + let _reference = prepare_mutation(&mut call).await; + drop(call); + + let reply = events.recv().await.unwrap(); + assert!( + reply["error"] + .as_str() + .unwrap() + .contains("not acknowledged"), + "{reply}" + ); + assert!(reply.get("reply").is_none(), "{reply}"); + } + }) + .await + .unwrap(); + } + fn progress_fixture( stall_timeout: Duration, - send_timeout: Duration, + chat_mutation_timeout: Duration, ) -> ( tempfile::TempDir, HostBridge, @@ -2380,7 +2450,7 @@ mod tests { dir.path().into(), Handle::current(), stall_timeout, - send_timeout, + chat_mutation_timeout, ) .unwrap(); let bundle = nsh_engine::Bundle::source( diff --git a/products/maka/ios-shell/tests/ios_shell_behaviors.rs b/products/maka/ios-shell/tests/ios_shell_behaviors.rs index 26ae73e8da5..90640d043fa 100644 --- a/products/maka/ios-shell/tests/ios_shell_behaviors.rs +++ b/products/maka/ios-shell/tests/ios_shell_behaviors.rs @@ -2966,9 +2966,22 @@ async fn chat_streaming_collapsible_tools_and_inline_approval() { held_refresh.resolve(json!({"value":{"revision":"2","needsYouCount":0,"before":null,"after":null,"sessions":[]}})); } +fn select_header_item(app: &mut Headless, id: u32) { + app.engine().control().dispatch_event( + nsh_core::ROOT_ID, + nsh_core::EventKind::Menu, + nsh_core::EventPayload::Map(vec![("id", nsh_core::PayloadValue::Number(f64::from(id)))]), + ); + assert!(app.settle()); +} + struct ComposerDockFixture { app: Headless, + header: Arc>>, + menus: mpsc::UnboundedReceiver<(String, (nsh_core::NodeId, Value))>, run: Arc>, + observation: Arc>, + observes: Arc, queue: Arc>, history: Arc>>, calls: mpsc::UnboundedReceiver<(Value, HostCall)>, @@ -2977,6 +2990,7 @@ struct ComposerDockFixture { history_reads: mpsc::UnboundedReceiver<()>, hold_queue: Arc, hold_history: Arc, + hold_observe: Arc, } const DOCK_RUN_ID: &str = "a91a2b3c-0000-4000-8000-000000000001"; @@ -3010,6 +3024,9 @@ impl ComposerDockFixture { let channel = HostChannel::new(); channel.handle("ios.bootstrap", |call| call.resolve(dock_host(1))); let run = Arc::new(std::sync::Mutex::new(run)); + let observation = Arc::new(std::sync::Mutex::new(json!({}))); + let observes = Arc::new(std::sync::atomic::AtomicUsize::new(0)); + let (observation_q, observes_q) = (observation.clone(), observes.clone()); let queue = Arc::new(std::sync::Mutex::new(queue)); let mut answer = quote_history_row(1, "assistant", "An earlier answer"); answer["finalOutput"] = json!(anchor); @@ -3026,6 +3043,8 @@ impl ComposerDockFixture { let hold_queue_read = hold_queue.clone(); let hold_history = Arc::new(std::sync::atomic::AtomicBool::new(false)); let hold_tail = hold_history.clone(); + let hold_observe = Arc::new(std::sync::atomic::AtomicBool::new(false)); + let hold_observation = hold_observe.clone(); let (run_q, queue_q, history_q) = (run.clone(), queue.clone(), history.clone()); let (tx, calls) = mpsc::unbounded_channel(); let query_tx = tx.clone(); @@ -3040,7 +3059,18 @@ impl ComposerDockFixture { "list" => json!({"revision":"list","sessions":[session],"needsYouCount":0}), "observe" if data["input"]["sessionId"] == "saved" => json!({"session":side,"through":1,"run":null}), - "observe" => json!({"session":session,"through":1,"run":*run_q.lock().unwrap()}), + "observe" => { + observes_q.fetch_add(1, std::sync::atomic::Ordering::SeqCst); + if hold_observation.swap(false, std::sync::atomic::Ordering::SeqCst) { + query_tx.send((data, call)).unwrap(); + return; + } + let mut obs = json!({"session":session,"through":1,"run":*run_q.lock().unwrap()}); + for (key, value) in observation_q.lock().unwrap().as_object().unwrap() { + obs[key] = value.clone(); + } + obs + }, "history" if hold_tail.swap(false, std::sync::atomic::Ordering::SeqCst) => { query_tx.send((data, call)).unwrap(); return; @@ -3070,11 +3100,27 @@ impl ComposerDockFixture { } "queue" => queue_q.lock().unwrap().clone(), "pendingInteractions" => json!({"revision":1,"entries":[]}), - "models" => json!({"kind":"ready","choices":[]}), + "models" => json!({"kind":"ready","choices":[ + {"label":"Dock model","selection":dock_model(),"sourceName":"Test", + "thinkingLevels":["off","minimal","high"],"defaultThinkingLevel":"high"}, + {"label":"Alternate thinker","selection":{"kind":"model","connectionId":"test","modelId":"alternate"}, + "sourceName":"Test","thinkingLevels":["low","high"]}, + {"label":"High-only model","selection":{"kind":"model","connectionId":"test","modelId":"high-only"}, + "sourceName":"Test","thinkingLevels":["high"]}, + {"label":"Other model","selection":{"kind":"model","connectionId":"other","modelId":"other"},"sourceName":"Other", + "thinkingLevels":[]}, + {"label":"Executor","selection":{"kind":"executor","selection":{"executor":"codex","settings":{"runtime":"cli","model":"external"}}},"sourceName":"Codex", + "thinkingLevels":[]}, + {"label":"Opus","sourceName":"Codex","selection":{"kind":"executor", + "selection":{"executor":"codex","settings":{"runtime":"cli","model":"opus"}}}, + "aliases":[{"kind":"executor","selection":{"executor":"codex", + "settings":{"runtime":"cli","model":"opus-high","thinkingLevel":"high"}}}], + "thinkingLevels":["low","high"]} + ]}), "botOutbox" => json!({"isBot":false}), "connections" => json!({"kind":"ready","revision":1,"connections":[],"next":null, "defaultTarget":{"connectionId":"test","modelId":"model"}}), - "queueMessage" | "resolveModel" => { + "queueMessage" | "resolveModel" | "execution" | "continuationAvailability" | "model" => { query_tx.send((data, call)).unwrap(); return; } @@ -3111,6 +3157,15 @@ impl ComposerDockFixture { ..Environment::default() }; let mut app = Headless::start(config).unwrap(); + let header = Arc::new(std::sync::Mutex::new(None)); + let mounted = header.clone(); + let menus = native_menu_items(&mut app, move |item| { + if let nsh_core::MountItem::ScreenConfig { config, .. } = item + && config.title.as_deref() == Some("Dock Chat") + { + *mounted.lock().unwrap() = Some((**config).clone()); + } + }); app.wait_for("label:Conversation: Dock Chat").unwrap(); app.press("label:Conversation: Dock Chat").unwrap(); if !room { @@ -3132,7 +3187,11 @@ impl ComposerDockFixture { while history_reads.try_recv().is_ok() {} Self { app, + header, + menus, run, + observation, + observes, queue, history, calls, @@ -3141,9 +3200,54 @@ impl ComposerDockFixture { history_reads, hold_queue, hold_history, + hold_observe, } } + fn navigation_action(&self, label: &str) -> Option { + let config = self.header.lock().unwrap(); + let more = config + .as_ref()? + .right_items + .iter() + .find(|item| item.key.as_deref() == Some("more"))?; + more.menu.as_ref()?.iter().find_map(|item| match item { + nsh_core::desktop::MenuItem::Action(action) if action.label == label => { + Some(action.clone()) + } + _ => None, + }) + } + + fn navigation_item(&self, label: &str) -> Option { + self.navigation_action(label) + .filter(|action| action.enabled) + .map(|action| action.id) + } + + fn confirm_backend(&self, reply: HostCall, revision: u64, backend: Value) { + let session = json!({"id":"chat","title":"Dock Chat","kind":"agent","revision":revision, + "backend":backend,"workspace":{"path":"/work"}}); + self.observation.lock().unwrap()["session"] = session.clone(); + reply.resolve(json!({"value":{"kind":"committed","session":session}})); + } + + fn choose_navigation(&mut self, label: &str) { + let id = self + .navigation_item(label) + .unwrap_or_else(|| panic!("missing UIKit menu item: {label}")); + select_header_item(&mut self.app, id); + } + + fn choose_model(&mut self, label: &str) { + self.app.wait_for("id:chat-keyboard-model").unwrap(); + let item = std::iter::from_fn(|| self.menus.try_recv().ok()) + .filter_map(|(title, action)| (title == label).then_some(action)) + .last() + .unwrap_or_else(|| panic!("missing model: {label}")); + select_native_item(&mut self.app, item); + } + async fn prepare_room_post(&mut self, message_id: &str) -> HostCall { let (data, call) = fixture_recv(&mut self.calls).await; assert_eq!(data["method"], "send"); @@ -3172,40 +3276,1259 @@ impl ComposerDockFixture { fn queue_item(&mut self, queue: Value) { self.deliver(json!({"kind":"queue","queue":queue})); } - - fn transcript_changed(&mut self, through: u64, kind: &str) { - self.deliver(json!({"kind":"events","through":through,"events":[ - {"runId":DOCK_RUN_ID,"fact":{"kind":kind}} - ]})); + + fn transcript_changed(&mut self, through: u64, kind: &str) { + self.deliver(json!({"kind":"events","through":through,"events":[ + {"runId":DOCK_RUN_ID,"fact":{"kind":kind}} + ]})); + } + + async fn call(&mut self, method: &str) -> (Value, HostCall) { + let (data, call) = fixture_recv(&mut self.calls).await; + assert_eq!(data["method"], method); + (data["input"].clone(), call) + } +} + +fn dock_model() -> Value { + json!({"kind":"model","connectionId":"test","modelId":"model"}) +} + +fn dock_run() -> Value { + json!({"backend":"model","runId":DOCK_RUN_ID,"turnId":"t1","state":"running"}) +} + +fn empty_queue() -> Value { + json!({"revision":0,"entries":[]}) +} + +fn queued_result(message_id: &str, revision: u64) -> Value { + json!({"value": SendResult::Queued { + session_id:"chat".into(), message_id:message_id.into(), revision, completion:None, + }}) +} + +fn missing_queued(reason: &str) -> Value { + json!({"value":{"kind":"missing","reason":reason}}) +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn stop_waits_for_the_observed_run_and_never_retargets_a_held_press() { + use nsh_core::{EventKind, EventPayload}; + + let mut run = dock_run(); + run["state"] = json!("waiting_for_user"); + let mut fx = ComposerDockFixture::start(run, dock_model(), empty_queue()).await; + let primary = "id:chat-primary-action"; + assert_embedded_primary(&fx.app, "label:Stop current reply"); + fx.app.press("label:Stop current reply").unwrap(); + let (stop, reply) = fx.call("stop").await; + assert_eq!(stop, json!({"sessionId":"chat","runId":DOCK_RUN_ID})); + reply.resolve(json!({"value":{"requested":true}})); + fx.app.wait_for("label:Stopping reply…").unwrap(); + assert!(!fx.app.screen().enabled(primary).unwrap()); + + let mut next = dock_run(); + next["runId"] = json!("next-run"); + next["state"] = json!("admitted"); + *fx.run.lock().unwrap() = next.clone(); + fx.transcript_changed(2, "opened"); + fx.app.wait_for("label:Stop current reply").unwrap(); + + let id = fx.app.screen().id(primary).unwrap(); + let control = fx.app.engine().control(); + control.dispatch_event( + id, + EventKind::PressDown, + EventPayload::Press(Default::default()), + ); + assert!(fx.app.settle()); + next["runId"] = json!("later-run"); + *fx.run.lock().unwrap() = next; + fx.transcript_changed(3, "opened"); + assert!(fx.app.settle()); + control.dispatch_event( + id, + EventKind::Press, + EventPayload::Press(Default::default()), + ); + assert!(fx.app.settle()); + assert!( + fx.calls.try_recv().is_err(), + "a press begun on the replaced run must be cancelled" + ); + + fx.app.press(primary).unwrap(); + let (stop, reply) = fx.call("stop").await; + assert_eq!(stop["runId"], "later-run"); + reply.resolve(json!({"value":{"requested":false}})); + fx.app.wait_for("label:Stop current reply").unwrap(); + + fx.app.press(primary).unwrap(); + let (_, reply) = fx.call("stop").await; + reply.reject("Stop receipt lost"); + fx.app + .wait_for("label:Stop not confirmed. Refresh to check the reply.") + .unwrap(); + assert!(!fx.app.screen().enabled(primary).unwrap()); + assert!(fx.calls.try_recv().is_err()); +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn navigation_menu_cannot_stop_a_replacement_run_but_can_queue_for_it() { + let mut fx = ComposerDockFixture::start(dock_run(), dock_model(), empty_queue()).await; + fx.app + .type_text("label:Message composer", "A draft for later") + .unwrap(); + let captured_stop = fx.navigation_item("Stop current reply").unwrap(); + + let mut run = dock_run(); + run["runId"] = json!("replacement-run"); + *fx.run.lock().unwrap() = run; + fx.transcript_changed(2, "opened"); + assert!(fx.app.settle()); + select_header_item(&mut fx.app, captured_stop); + assert!( + fx.calls.try_recv().is_err(), + "stale Stop must not retarget the replacement" + ); + + fx.choose_navigation("Add to queue"); + let (send, reply) = fx.call("send").await; + assert_eq!(send["expectedRunId"], "replacement-run"); + assert_eq!(send["delivery"], "queue"); + assert_eq!(send["message"], "A draft for later"); + reply.resolve(queued_result("nav-queued", 1)); +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn menu_stop_keeps_the_quoted_draft_for_sending_after_the_run_ends() { + let mut fx = + ComposerDockFixture::start_with_anchor(dock_run(), dock_model(), empty_queue(), true).await; + let mut choose = watch_native_menu_items(&mut fx.app, |_| {}); + fx.app.press("role:button[Quote] >> nth=0").unwrap(); + fx.app + .type_text("label:Message composer", "Keep this\nand this") + .unwrap(); + fx.app.wait_for("label:Ask Side Question").unwrap(); + fx.app.long_press("label:Send message").unwrap(); + choose(&mut fx.app, "Stop current reply"); + let (stop, reply) = fx.call("stop").await; + assert_eq!(stop["runId"], DOCK_RUN_ID); + reply.resolve(json!({"value":{"requested":true}})); + assert!(fx.app.settle()); + assert_eq!( + fx.app + .screen() + .input_text("label:Message composer") + .unwrap(), + Some("Keep this\nand this") + ); + fx.app + .wait_for("label:Remove quote: An earlier answer") + .unwrap(); + assert!(!fx.app.screen().enabled("id:chat-primary-action").unwrap()); + + *fx.run.lock().unwrap() = Value::Null; + fx.transcript_changed(2, "ended"); + fx.app.wait_for("label:Send message").unwrap(); + fx.app.press("label:Send message").unwrap(); + let (send, reply) = fx.call("send").await; + assert!(send["expectedRunId"].is_null()); + assert_eq!(send["message"], "Keep this\nand this"); + assert_eq!(send["quotes"][0]["text"], "An earlier answer"); + reply.resolve(queued_result("quote", 1)); +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn thinking_slider_previews_steps_then_commits_and_rolls_back_a_rejected_tick() { + use nsh_core::geometry::Point; + + let mut backend = dock_model(); + backend["serviceTier"] = json!("fast"); + backend["thinkingLevel"] = json!("high"); + let mut fx = ComposerDockFixture::start(Value::Null, backend, empty_queue()).await; + let pill = "id:chat-thinking-accessory"; + let slider = "id:chat-thinking-slider"; + fx.app + .wait_for("id:chat-thinking-accessory >> text:High") + .unwrap(); + fx.choose_navigation("Thinking level"); + fx.app.wait_for(slider).unwrap(); + assert!(!fx.app.screen().matches("id:chat-details-scroll").unwrap()); + fx.app.press("label:Minimal").unwrap(); + let (change, reply) = fx.call("selectBackend").await; + assert_eq!( + change["backend"], + json!({"kind":"model","connectionId":"test","modelId":"model", + "serviceTier":"fast","thinkingLevel":"minimal"}) + ); + fx.app + .wait_for("id:chat-thinking-accessory >> text:Minimal") + .unwrap(); + assert!(!fx.navigation_action("Thinking level").unwrap().enabled); + reply.resolve(json!({"value":{"kind":"rejected","reason":"tools_unavailable"}})); + fx.app.wait_for("text:Could not change the model.").unwrap(); + fx.app + .wait_for("id:chat-thinking-accessory >> text:High") + .unwrap(); + + let thumb = "label:Thinking level · High"; + let width = fx + .app + .screen() + .layout(slider) + .unwrap() + .unwrap() + .bounds + .size + .width; + fx.app + .drag_and_hold(thumb, Point::new(-width / 4., px(0.)), Default::default()) + .unwrap(); + fx.app + .wait_for("id:chat-thinking-accessory >> text:Minimal") + .unwrap(); + assert!( + fx.calls.try_recv().is_err(), + "drag must not save before release" + ); + fx.app.drop_held().unwrap(); + let (change, reply) = fx.call("selectBackend").await; + assert_eq!(change["backend"]["thinkingLevel"], "minimal"); + assert_eq!(change["backend"]["serviceTier"], "fast"); + let session = json!({"id":"chat","title":"Dock Chat","kind":"agent","revision":2, + "backend":change["backend"],"workspace":{"path":"/work"}}); + fx.observation.lock().unwrap()["session"] = session.clone(); + reply.resolve(json!({"value":{"kind":"committed","session":session}})); + fx.app.wait_for("label:Thinking level · Minimal").unwrap(); + fx.app.press(pill).unwrap(); + assert!(!fx.app.screen().matches(slider).unwrap()); + + fx.app.press(pill).unwrap(); + fx.app.press("id:chat-thinking-backdrop").unwrap(); + assert!(!fx.app.screen().matches(slider).unwrap()); + fx.app.type_text("label:Message composer", "draft").unwrap(); + fx.app.press(pill).unwrap(); + fx.app.press("label:Dismiss keyboard").unwrap(); + assert!(!fx.app.screen().matches(slider).unwrap()); +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn thinking_drag_is_cancelled_when_observe_switches_models_mid_gesture() { + let mut backend = dock_model(); + backend["thinkingLevel"] = json!("high"); + let mut fx = ComposerDockFixture::start(Value::Null, backend, empty_queue()).await; + let slider = "id:chat-thinking-slider"; + fx.choose_navigation("Thinking level"); + let width = fx + .app + .screen() + .layout(slider) + .unwrap() + .unwrap() + .bounds + .size + .width; + fx.app + .drag_and_hold( + "label:Thinking level · High", + nsh_core::Point::new(-width / 4., px(0.)), + Default::default(), + ) + .unwrap(); + fx.app.wait_for("label:Thinking level · Minimal").unwrap(); + let replacement = json!({"id":"chat","title":"Dock Chat","kind":"agent","revision":2, + "workspace":{"path":"/work"},"backend":{"kind":"model","connectionId":"test","modelId":"alternate"}}); + *fx.observation.lock().unwrap() = json!({"session":replacement,"through":2}); + fx.transcript_changed(2, "step_ended"); + fx.app + .wait_for("id:chat-keyboard-model >> text:Alternate thinker") + .unwrap(); + fx.app.wait_for("label:Thinking level · Default").unwrap(); + fx.app.drop_held().unwrap(); + assert!( + fx.calls.try_recv().is_err(), + "old drag committed on a replacement model" + ); + fx.app.press("label:Low").unwrap(); + let (change, reply) = fx.call("selectBackend").await; + assert_eq!(change["backend"]["modelId"], "alternate"); + assert_eq!(change["backend"]["thinkingLevel"], "low"); + fx.confirm_backend(reply, 3, change["backend"].clone()); +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn thinking_slider_can_return_to_the_host_default() { + let mut backend = dock_model(); + backend["serviceTier"] = json!("fast"); + let mut fx = ComposerDockFixture::start(Value::Null, backend.clone(), empty_queue()).await; + fx.choose_navigation("Thinking level"); + let thumb = "label:Thinking level · Default"; + fx.app.wait_for(thumb).unwrap(); + let x = |app: &Headless, label| app.screen().layout(label).unwrap().unwrap().bounds.origin.x; + let first_stop = x(&fx.app, thumb); + + fx.app.press("label:High").unwrap(); + let (change, reply) = fx.call("selectBackend").await; + assert_eq!(change["backend"]["thinkingLevel"], "high"); + fx.confirm_backend(reply, 2, change["backend"].clone()); + fx.app.wait_for("label:Thinking level · High").unwrap(); + assert!(x(&fx.app, "label:Thinking level · High") > first_stop); + + fx.app + .wait_until("thinking save finished", Duration::from_secs(2), |screen| { + screen.enabled("label:Default").unwrap_or(false) + }) + .unwrap(); + fx.app.press("label:Default").unwrap(); + let (change, reply) = fx.call("selectBackend").await; + assert_eq!(change["backend"], backend); + fx.confirm_backend(reply, 3, change["backend"].clone()); + fx.app + .wait_until("default saved", Duration::from_secs(2), |screen| { + screen.enabled("label:Default").unwrap_or(false) + }) + .unwrap(); + fx.app.wait_for(thumb).unwrap(); + assert_eq!(x(&fx.app, thumb), first_stop); +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn single_explicit_thinking_level_still_offers_host_default() { + let default = json!({"kind":"model","connectionId":"test","modelId":"high-only"}); + let mut selected = default.clone(); + selected["thinkingLevel"] = json!("high"); + let mut fx = ComposerDockFixture::start(Value::Null, selected, empty_queue()).await; + fx.app.wait_for("id:chat-thinking-accessory").unwrap(); + fx.choose_navigation("Thinking level"); + fx.app.wait_for("label:Thinking level · High").unwrap(); + + fx.app.press("label:Default").unwrap(); + let (change, reply) = fx.call("selectBackend").await; + assert_eq!(change["backend"], default); + fx.confirm_backend(reply, 2, default); + fx.app.wait_for("label:Thinking level · Default").unwrap(); +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn compact_chat_hides_native_thinking_item_even_with_keyboard_closed() { + let queue = json!({"revision":1,"entries":[ + {"messageId":"waiting","kind":"followup","preview":"Next question"} + ]}); + let mut fx = ComposerDockFixture::start(Value::Null, dock_model(), queue).await; + fx.app.wait_for("id:chat-thinking-accessory").unwrap(); + assert!(fx.navigation_item("Thinking level").is_some()); + + fx.app.set_viewport(Size::new(px(844.), px(390.))).unwrap(); + fx.app + .set_environment("landscape, keyboard closed", |env| { + env.safe_area.left = px(47.); + env.safe_area.right = px(47.); + env.safe_area.bottom = px(21.); + env.keyboard_height = px(0.); + }) + .unwrap(); + fx.app.wait_for("id:chat-composer-actions").unwrap(); + assert!(fx.navigation_action("Thinking level").is_none()); + assert!(fx.navigation_item("Usage & Details").is_some()); +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn accessory_model_menu_remains_reachable_at_300_percent_dynamic_type() { + let mut fx = ComposerDockFixture::start(Value::Null, dock_model(), empty_queue()).await; + fx.app.set_viewport(Size::new(px(375.), px(812.))).unwrap(); + fx.app + .set_environment("300% Dynamic Type", |env| { + env.font_scale = 3.0; + env.keyboard_height = px(280.); + }) + .unwrap(); + let model = "id:chat-keyboard-model"; + let layout = fx.app.screen().layout(model).unwrap().unwrap(); + assert!( + layout.bounds.size.width >= px(72.) && !layout.clipped, + "{layout:?}" + ); + assert!(fx.app.screen().enabled(model).unwrap()); + // UIKit owns the press and menu presentation; deliver its selection event. + fx.choose_model("Other model"); + let (change, reply) = fx.call("selectBackend").await; + assert_eq!(change["backend"]["modelId"], "other"); + fx.confirm_backend(reply, 2, change["backend"].clone()); + fx.app + .wait_for("id:chat-keyboard-model >> text:Other model") + .unwrap(); +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn details_distinguish_current_and_cached_usage_and_refresh_once_per_step_page() { + use std::sync::atomic::Ordering; + + let executor = json!({"kind":"executor","selection":{"executor":"codex","settings":{"runtime":"cli","model":"external"}}}); + let mut fx = ComposerDockFixture::start(dock_run(), executor, empty_queue()).await; + assert!(!fx.app.screen().matches("id:chat-details-scroll").unwrap()); + fx.choose_navigation("Usage & Details"); + fx.app.wait_for("text:No usage data yet").unwrap(); + let mut metrics = json!({"modelId":"measured-model","connectionId":"other-connection", + "approximate":false,"contextLastKnown":false}); + let cases = [ + ( + json!(89_599), + json!(128_000), + json!(31.4), + false, + false, + "89,599 / 128,000 tokens · 70%", + "31.4 tok/s", + ), + ( + json!(96_000), + json!(128_000), + json!(31.4), + false, + false, + "96,000 / 128,000 tokens · 75%", + "31.4 tok/s", + ), + ( + json!(115_200), + json!(128_000), + json!(0), + true, + false, + "≈115,200 / 128,000 tokens · ≈90%", + "0.0 tok/s", + ), + ( + json!(160_000), + json!(128_000), + Value::Null, + false, + true, + "160,000 / 128,000 tokens · 125%", + "Not measured", + ), + ( + json!(0), + json!(128_000), + Value::Null, + false, + false, + "0 / 128,000 tokens · 0%", + "Not measured", + ), + ( + json!(1), + json!(128_000), + Value::Null, + true, + false, + "≈1 / 128,000 tokens · ≈<1%", + "Not measured", + ), + ( + json!(123), + Value::Null, + Value::Null, + true, + false, + "≈123 tokens used", + "Not measured", + ), + ( + Value::Null, + json!(128_000), + Value::Null, + false, + false, + "128,000 token window", + "Not measured", + ), + ( + json!(123), + json!(0), + Value::Null, + false, + false, + "123 tokens used", + "Not measured", + ), + ]; + for (index, (used, window, speed, approximate, last, usage, rate)) in + cases.into_iter().enumerate() + { + let through = index + 2; + metrics["contextTokens"] = used; + metrics["contextWindow"] = window; + metrics["outputTokensPerSecond"] = speed; + metrics["approximate"] = json!(approximate); + metrics["contextLastKnown"] = json!(last); + *fx.observation.lock().unwrap() = json!({"through":through,"metrics":metrics}); + let before = fx.observes.load(Ordering::SeqCst); + fx.deliver(json!({"kind":"events","through":through,"events":[ + {"runId":DOCK_RUN_ID,"fact":{"kind":"step_ended"}}, + {"runId":DOCK_RUN_ID,"fact":{"kind":"step_ended"}} + ]})); + fx.app.wait_for(&format!("text:{usage}")).unwrap(); + fx.app.wait_for(&format!("text:{rate}")).unwrap(); + assert_eq!(fx.observes.load(Ordering::SeqCst), before + 1); + assert_eq!( + fx.app + .shows("Context from the last request. Newer content isn’t included."), + last + ); + } + fx.app + .wait_for("text:measured-model · other-connection") + .unwrap(); + fx.app + .send_host_event("ios.hostState", side_host_state(9, None)) + .unwrap(); + fx.app + .wait_for("text:measured-model · other-connection · Last synced") + .unwrap(); +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn native_header_and_keyboard_model_keep_usage_and_settings_separate() { + use nsh_core::HeaderItemContent; + let mut fx = ComposerDockFixture::start(Value::Null, dock_model(), empty_queue()).await; + { + let config = fx.header.lock().unwrap(); + let config = config.as_ref().unwrap(); + assert!(config.right.is_none(), "custom iOS headerRight is mounted"); + let symbols: Vec<_> = config + .right_items + .iter() + .map(|item| &item.content) + .collect(); + assert_eq!( + symbols, + [ + &HeaderItemContent::Symbol("folder".into()), + &HeaderItemContent::Symbol("ellipsis.circle".into()), + ] + ); + } + let slider = "id:chat-thinking-slider"; + let backdrop = "id:chat-thinking-backdrop"; + fx.choose_navigation("Thinking level"); + fx.app.wait_for(slider).unwrap(); + fx.app.wait_for(backdrop).unwrap(); + fx.app.set_viewport(Size::new(px(844.), px(390.))).unwrap(); + fx.app + .set_environment("landscape keyboard", |env| { + env.safe_area.left = px(47.); + env.safe_area.right = px(47.); + env.safe_area.bottom = px(21.); + env.keyboard_height = px(240.); + }) + .unwrap(); + assert!(!fx.app.screen().matches(slider).unwrap()); + assert!(!fx.app.screen().matches(backdrop).unwrap()); + assert!( + !fx.app + .screen() + .enabled("id:chat-thinking-accessory") + .unwrap() + ); + assert!(!fx.app.screen().matches("id:chat-details-scroll").unwrap()); + fx.choose_model("Other model"); + let (change, reply) = fx.call("selectBackend").await; + assert_eq!(change["backend"]["modelId"], "other"); + let session = json!({"id":"chat","title":"Dock Chat","kind":"agent","revision":2, + "backend":change["backend"],"workspace":{"path":"/work"}}); + fx.observation.lock().unwrap()["session"] = session.clone(); + reply.resolve(json!({"value":{"kind":"committed","session":session}})); + fx.app + .wait_for("id:chat-keyboard-model >> text:Other model") + .unwrap(); + assert!( + !fx.app + .screen() + .matches("id:chat-thinking-accessory") + .unwrap() + ); + assert!(fx.navigation_item("Thinking level").is_none()); + assert!(!fx.app.screen().matches("id:chat-details-scroll").unwrap()); + + fx.choose_navigation("Usage & Details"); + fx.app.wait_for("id:chat-details-scroll").unwrap(); + assert!( + !fx.app + .screen() + .matches("id:chat-details-scroll >> label:Model") + .unwrap() + ); + assert!( + !fx.app + .screen() + .matches("id:chat-details-scroll >> label:Thinking level") + .unwrap() + ); + assert_keyboard_target(&fx.app, "label:Done", 47., 797., 150.); + fx.app.press("label:Done").unwrap(); + + let room = ComposerDockFixture::start_room().await; + assert!( + !room + .app + .screen() + .matches("id:chat-thinking-accessory") + .unwrap() + ); + assert!(room.navigation_item("Thinking level").is_none()); + assert!(room.navigation_item("Usage & Details").is_none()); +} + +const CONTINUE_ACTION: &str = "label:Continue reply"; + +fn stopped_source(state: &str) -> Value { + json!({"sessionId":"chat","runId":DOCK_RUN_ID,"turnId":"t1","highWater":7,"state":{"kind":state}}) +} + +async fn stopped_conversation( + queue: Value, + backend: Value, + tail_fallback: bool, +) -> ComposerDockFixture { + let mut fx = ComposerDockFixture::start(dock_run(), backend, queue).await; + let mut last = quote_history_row(2, "assistant", "Interrupted answer"); + last["runId"] = json!(DOCK_RUN_ID); + fx.history.lock().unwrap().push(last); + *fx.run.lock().unwrap() = Value::Null; + *fx.observation.lock().unwrap() = json!({"through":2, + "latestRunId":(!tail_fallback).then_some(DOCK_RUN_ID)}); + fx.transcript_changed(2, "ended"); + fx +} + +async fn probe_continue_model(fx: &mut ComposerDockFixture, backend: &Value) -> HostCall { + let source = stopped_source("failed"); + let (read, result) = fx.call("execution").await; + assert_eq!(read, json!({"sessionId":"chat","runId":DOCK_RUN_ID})); + assert!(!fx.app.screen().matches(CONTINUE_ACTION).unwrap()); + result.resolve(json!({"value":{"kind":"found","execution":source}})); + let (read, result) = fx.call("continuationAvailability").await; + assert_eq!(read, json!({"sessionId":"chat","runId":DOCK_RUN_ID})); + result.resolve(json!({"value":{"kind":"ready","source":source}})); + let (read, result) = fx.call("model").await; + assert_eq!(&read["backend"], backend); + result +} + +fn continue_model(backend: &Value) -> Value { + json!({"value":{"kind":"ready","choice":{"selection":backend,"label":"Dock model","sourceName":"Test", + "serviceTiers":[{"id":"fast","name":"Fast"}],"thinkingLevels":["off","minimal","high"]}}}) +} + +async fn verify_continue(fx: &mut ComposerDockFixture, backend: &Value) { + probe_continue_model(fx, backend) + .await + .resolve(continue_model(backend)); + fx.app.wait_for(CONTINUE_ACTION).unwrap(); +} + +async fn tap_continue(fx: &mut ComposerDockFixture, backend: &Value) -> (Value, HostCall) { + fx.app.press(CONTINUE_ACTION).unwrap(); + let (read, result) = fx.call("model").await; + assert_eq!(&read["backend"], backend); + result.resolve(continue_model(backend)); + let (read, result) = fx.call("execution").await; + assert_eq!(read["runId"], DOCK_RUN_ID); + result.resolve(json!({"value":{"kind":"found","execution":stopped_source("failed")}})); + fx.call("continueRun").await +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn stop_failure_settles_while_a_side_chat_is_on_top() { + for submitted in [false, true] { + let mut fx = + ComposerDockFixture::start_with_anchor(dock_run(), dock_model(), empty_queue(), true) + .await; + fx.app.press("label:Stop current reply").unwrap(); + let (_, stop) = fx.call("stop").await; + fx.app.wait_for("label:Stopping reply…").unwrap(); + fx.app + .press("label:Side questions (1) · Waiting for your response") + .unwrap(); + fx.app.wait_for("text:Side Question · Dock Chat").unwrap(); + if submitted { + stop.reject("Connection failed after confirm"); + } else { + stop.resolve(json!({"notSubmitted":"Prepare refused"})); + } + assert!(fx.app.settle()); + fx.app.press("label:Back").unwrap(); + + if submitted { + fx.app + .wait_for("label:Stop not confirmed. Refresh to check the reply.") + .unwrap(); + assert!(fx.calls.try_recv().is_err()); + fx.choose_navigation("Refresh"); + } + fx.app.wait_for("label:Stop current reply").unwrap(); + fx.app.press("label:Stop current reply").unwrap(); + let (retry, stop) = fx.call("stop").await; + assert_eq!(retry["runId"], DOCK_RUN_ID); + stop.resolve(json!({"value":{"requested":false}})); + } +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn ended_queues_a_fresh_observe_even_if_step_snapshot_predates_backend_commit() { + use std::sync::atomic::Ordering::SeqCst; + + let mut fx = ComposerDockFixture::start(dock_run(), dock_model(), empty_queue()).await; + fx.hold_observe.store(true, SeqCst); + fx.transcript_changed(2, "step_ended"); + let (_, old_step) = fx.call("observe").await; + fx.choose_model("Other model"); + let (change, commit) = fx.call("selectBackend").await; + + let committed = json!({"id":"chat","kind":"agent","title":"Dock Chat","revision":2, + "workspace":{"path":"/work"},"backend":change["backend"]}); + commit.resolve(json!({"value":{"kind":"committed","session":committed}})); + fx.app + .wait_for("id:chat-keyboard-model >> text:Other model") + .unwrap(); + fx.app.wait_for("label:Stop current reply").unwrap(); + + *fx.run.lock().unwrap() = Value::Null; + *fx.observation.lock().unwrap() = json!({"session":committed,"through":3}); + fx.transcript_changed(3, "ended"); + let before = fx.observes.load(SeqCst); + old_step.resolve( + json!({"value":{"session":{"id":"chat","kind":"agent","revision":1, + "title":"Dock Chat","backend":dock_model()},"through":2,"run":dock_run()}}), + ); + fx.app.wait_for("label:Send message").unwrap(); + assert_eq!(fx.observes.load(SeqCst), before + 1); +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn observe_failure_keeps_the_queued_ended_read_but_does_not_retry_on_its_own() { + use std::sync::atomic::Ordering::SeqCst; + + let mut fx = ComposerDockFixture::start(dock_run(), dock_model(), empty_queue()).await; + fx.hold_observe.store(true, SeqCst); + fx.transcript_changed(2, "step_ended"); + let (_, read) = fx.call("observe").await; + let before = fx.observes.load(SeqCst); + read.reject("Unqueued observe failed"); + fx.app.wait_for("text:/Unqueued observe failed/").unwrap(); + assert!(fx.app.settle()); + assert_eq!(fx.observes.load(SeqCst), before); + assert!(fx.app.screen().enabled("label:Stop current reply").unwrap()); + + fx.hold_observe.store(true, SeqCst); + fx.transcript_changed(3, "step_ended"); + let (_, old) = fx.call("observe").await; + *fx.run.lock().unwrap() = Value::Null; + fx.observation.lock().unwrap()["through"] = json!(4); + fx.transcript_changed(4, "ended"); + let before = fx.observes.load(SeqCst); + old.reject("Earlier step observe failed"); + + fx.app.wait_for("label:Send message").unwrap(); + fx.app + .wait_for("text:/Earlier step observe failed/") + .unwrap(); + assert_eq!(fx.observes.load(SeqCst), before + 1); +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn whitespace_draft_disables_send_instead_of_stopping_or_continuing() { + let mut working = ComposerDockFixture::start(dock_run(), dock_model(), empty_queue()).await; + working + .app + .type_text("label:Message composer", "\n ") + .unwrap(); + assert!(!working.app.screen().enabled("label:Send message").unwrap()); + assert!(working.app.press("id:chat-primary-action").is_err()); + assert!(working.calls.try_recv().is_err()); + + let backend = dock_model(); + let mut stopped = stopped_conversation(empty_queue(), backend.clone(), false).await; + verify_continue(&mut stopped, &backend).await; + stopped + .app + .type_text("label:Message composer", "\n ") + .unwrap(); + assert!(!stopped.app.screen().enabled("label:Send message").unwrap()); + assert!(stopped.app.press("id:chat-primary-action").is_err()); + assert!(stopped.calls.try_recv().is_err()); + + stopped.app.clear("label:Message composer").unwrap(); + stopped.app.press(CONTINUE_ACTION).unwrap(); + let (_, model) = stopped.call("model").await; + stopped + .app + .type_text("label:Message composer", "\n ") + .unwrap(); + model.resolve(continue_model(&backend)); + stopped.app.wait_for("label:Send message").unwrap(); + assert!(!stopped.app.screen().enabled("label:Send message").unwrap()); + assert!(stopped.calls.try_recv().is_err()); +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn continuation_checks_explicit_tier_and_effort_both_times() { + let mut backend = dock_model(); + backend["serviceTier"] = json!("fast"); + backend["thinkingLevel"] = json!("high"); + for (field, unsupported) in [ + ("serviceTiers", json!([{"id":"slow","name":"Slow"}])), + ("thinkingLevels", json!(["minimal"])), + ] { + let mut fx = stopped_conversation(empty_queue(), backend.clone(), false).await; + let mut unsupported_model = continue_model(&backend); + unsupported_model["value"]["choice"][field] = unsupported; + probe_continue_model(&mut fx, &backend) + .await + .resolve(unsupported_model.clone()); + assert!(fx.app.settle()); + assert!(!fx.app.screen().matches(CONTINUE_ACTION).unwrap()); + assert!(!fx.app.screen().enabled("id:chat-primary-action").unwrap()); + + fx.app + .send_host_event("ios.hostState", dock_host(2)) + .unwrap(); + verify_continue(&mut fx, &backend).await; + fx.app.press(CONTINUE_ACTION).unwrap(); + let (_, model) = fx.call("model").await; + model.resolve(unsupported_model); + fx.app + .wait_for("text:The selected model is unavailable. Try again or choose another model.") + .unwrap(); + assert!(!fx.app.screen().enabled("id:chat-primary-action").unwrap()); + assert!(fx.calls.try_recv().is_err()); + } + + let mut fx = stopped_conversation(empty_queue(), backend.clone(), false).await; + verify_continue(&mut fx, &backend).await; + fx.app.press(CONTINUE_ACTION).unwrap(); + let (_, model) = fx.call("model").await; + model.resolve(json!({"value":{"kind":"unavailable","message":"Host diagnostic in English"}})); + fx.app + .wait_for("text:The selected model is unavailable. Try again or choose another model.") + .unwrap(); + assert!(!fx.app.shows("Host diagnostic in English")); + assert!(fx.calls.try_recv().is_err()); +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn continuation_successor_can_be_steered_and_queued_while_history_is_loading() { + use std::sync::atomic::Ordering::SeqCst; + + let backend = dock_model(); + let mut fx = stopped_conversation(empty_queue(), backend.clone(), false).await; + let mut choose = watch_native_menu_items(&mut fx.app, |_| {}); + verify_continue(&mut fx, &backend).await; + let (_, result) = tap_continue(&mut fx, &backend).await; + let mut run = dock_run(); + run["runId"] = json!("successor"); + *fx.run.lock().unwrap() = run; + fx.hold_history.store(true, SeqCst); + let mut execution = stopped_source("admitted"); + execution["runId"] = json!("successor"); + result.resolve(json!({"value":{"kind":"started","execution":execution}})); + let (_, history) = fx.call("history").await; + fx.app.wait_for("label:Stop current reply").unwrap(); + + fx.app + .type_text("label:Message composer", "Follow up") + .unwrap(); + assert!(fx.app.screen().enabled("label:Send message").unwrap()); + choose(&mut fx.app, "Add to queue"); + let (send, reply) = fx.call("send").await; + assert_eq!(send["delivery"], "queue"); + assert_eq!(send["expectedRunId"], "successor"); + reply.resolve(queued_result("follow-up", 1)); + history.resolve(history_page( + 2, + fx.history.lock().unwrap().clone(), + Value::Null, + )); +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn a_successor_finishing_before_its_continue_receipt_cannot_relock_the_composer() { + use std::sync::atomic::Ordering::SeqCst; + + let backend = dock_model(); + let mut fx = stopped_conversation(empty_queue(), backend.clone(), false).await; + verify_continue(&mut fx, &backend).await; + let (_, late_receipt) = tap_continue(&mut fx, &backend).await; + + let mut run = dock_run(); + run["runId"] = json!("successor"); + *fx.run.lock().unwrap() = run; + *fx.observation.lock().unwrap() = json!({"through":3}); + fx.deliver(json!({"kind":"events","through":3, + "events":[{"runId":"successor","fact":{"kind":"opened"}}]})); + fx.app.wait_for("label:Stop current reply").unwrap(); + let draft = "New draft while the old receipt is pending"; + fx.app.type_text("label:Message composer", draft).unwrap(); + assert!(fx.app.screen().enabled("label:Send message").unwrap()); + + *fx.run.lock().unwrap() = Value::Null; + fx.observation.lock().unwrap()["through"] = json!(4); + fx.hold_history.store(true, SeqCst); + fx.deliver(json!({"kind":"events","through":4, + "events":[{"runId":"successor","fact":{"kind":"ended"}}]})); + let (_, history) = fx.call("history").await; + // The successor projected no rows. Even if the old source is still + // offered by the eligibility reads, it cannot be submitted again. + history.resolve(history_page( + 4, + fx.history.lock().unwrap().clone(), + Value::Null, + )); + probe_continue_model(&mut fx, &backend) + .await + .resolve(continue_model(&backend)); + assert!(fx.app.settle()); + assert!(fx.app.screen().enabled("label:Send message").unwrap()); + assert_eq!( + fx.app + .screen() + .input_text("label:Message composer") + .unwrap(), + Some(draft) + ); + + fx.app.clear("label:Message composer").unwrap(); + assert!(!fx.app.screen().matches(CONTINUE_ACTION).unwrap()); + assert!(!fx.app.screen().enabled("id:chat-primary-action").unwrap()); + + fx.app.type_text("label:Message composer", draft).unwrap(); + fx.app.press("label:Send message").unwrap(); + let (send, reply) = fx.call("send").await; + assert_eq!(send["message"], draft); + assert!(send["expectedRunId"].is_null()); + let mut execution = stopped_source("completed"); + execution["runId"] = json!("successor"); + late_receipt.resolve(json!({"value":{"kind":"started","execution":execution}})); + reply.resolve(queued_result("new-draft", 1)); +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn legacy_executor_alias_shows_its_effort_and_edits_the_canonical_model() { + let backend = json!({"kind":"executor","selection":{ + "executor":"codex","settings":{"runtime":"cli","model":"opus-high"}}}); + let mut fx = ComposerDockFixture::start(Value::Null, backend, empty_queue()).await; + fx.app + .wait_for("id:chat-thinking-accessory >> text:High") + .unwrap(); + fx.choose_navigation("Thinking level"); + let high = fx + .app + .screen() + .accessibility(Some("label:High")) + .unwrap() + .unwrap(); + assert!(high.selected); + fx.app.press("label:Low").unwrap(); + let (change, commit) = fx.call("selectBackend").await; + assert_eq!( + change["backend"], + json!({"kind":"executor","selection":{ + "executor":"codex","settings":{"runtime":"cli","model":"opus","thinkingLevel":"low"}}}) + ); + let session = json!({"id":"chat","kind":"agent","title":"Dock Chat","workspace":{"path":"/work"}, + "revision":2,"backend":change["backend"]}); + fx.observation.lock().unwrap()["session"] = session.clone(); + commit.resolve(json!({"value":{"kind":"committed","session":session}})); + fx.app + .wait_for("id:chat-thinking-accessory >> text:Low") + .unwrap(); +} + +fn detail_metrics(last_known: bool) -> Value { + json!({"modelId":"model","connectionId":"test","contextTokens":95_000,"contextWindow":100_000, + "approximate":false,"contextLastKnown":last_known,"outputTokensPerSecond":31.4}) +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn open_native_usage_menu_action_survives_step_telemetry() { + let mut fx = ComposerDockFixture::start(dock_run(), dock_model(), empty_queue()).await; + fx.app.wait_for("label:Stop current reply").unwrap(); + fx.app.wait_for("id:chat-thinking-accessory").unwrap(); + assert!(fx.navigation_item("Thinking level").is_some()); + let usage = fx.navigation_item("Usage & Details").unwrap(); + *fx.observation.lock().unwrap() = json!({"through":2,"metrics":detail_metrics(false), + "session":{"id":"chat","title":"Dock Chat","kind":"agent","revision":1, + "backend":dock_model(),"workspace":{"path":"/work/step-two"}}}); + fx.transcript_changed(2, "step_ended"); + fx.app.wait_for("id:chat-context >> text:step-two").unwrap(); + assert_eq!(fx.navigation_item("Usage & Details"), Some(usage)); + select_header_item(&mut fx.app, usage); + fx.app + .wait_for("id:chat-details-scroll >> text:31.4 tok/s") + .unwrap(); + assert_eq!(fx.navigation_item("Usage & Details"), Some(usage)); +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn details_fit_or_scroll_on_short_iphone_and_captions_are_readable() { + use nsh_core::{Color, MountItem, TransformKind, animation::Animator, platform::ColorScheme}; + + let mut fx = ComposerDockFixture::start(Value::Null, dock_model(), empty_queue()).await; + *fx.observation.lock().unwrap() = json!({"through":1,"metrics":detail_metrics(true)}); + fx.app.set_viewport(Size::new(px(375.), px(667.))).unwrap(); + fx.app + .set_environment("short portrait", |env| { + env.keyboard_height = px(0.); + env.safe_area.top = px(20.); + env.safe_area.bottom = px(34.); + }) + .unwrap(); + // Layout frames omit detent transforms. Include what the native animator + // actually presents, or a medium sheet's offscreen rows look visible. + let presentation = Arc::new(std::sync::Mutex::new(( + Animator::default(), + BTreeMap::new(), + ))); + let mounted = presentation.clone(); + fx.app.observe(move |_, batch| { + let (animator, transforms) = &mut *mounted.lock().unwrap(); + for item in &batch.items { + animator.apply(item); + if let MountItem::ViewStyle { id, style } = item { + transforms.insert(*id, style.transform); + } + } + }); + fx.choose_navigation("Usage & Details"); + fx.app.wait_for("text:Last request").unwrap(); + let scroll = "id:chat-details-scroll"; + let source = "text:model · test"; + let layout = |app: &Headless, selector| app.screen().layout(selector).unwrap().unwrap(); + let sheet_offset = { + let (animator, transforms) = &mut *presentation.lock().unwrap(); + animator.tick(0.0); + animator.tick(5.0); + let nodes = fx.app.screen().layout_nodes(); + let mut ancestors = Vec::new(); + let mut id = fx.app.screen().id(scroll).unwrap(); + while let Some(node) = nodes.iter().find(|node| node.id == id) { + ancestors.push(id); + id = node.parent; + } + let mut offset = 0.0; + animator.write( + |id| ancestors.contains(&id).then_some(id), + |id, values, _| { + if let Some(transform) = transforms.get(&id) { + for (i, op) in transform.ops().iter().enumerate() { + if op.kind == TransformKind::TranslateY { + offset += values.transform[i].unwrap_or(op.value); + } + } + } + }, + ); + px(offset) + }; + let visible = |app: &Headless, selector| { + let row = layout(app, selector); + !row.hidden && !row.clipped && row.bounds.bottom() + sheet_offset <= px(633.) + }; + if !visible(&fx.app, source) { + fx.app.scroll(scroll, px(500.)).unwrap(); + } + for selector in ["text:Output speed", source] { + assert!( + visible(&fx.app, selector), + "{selector} is outside the visible sheet" + ); } - async fn call(&mut self, method: &str) -> (Value, HostCall) { - let (data, call) = fixture_recv(&mut self.calls).await; - assert_eq!(data["method"], method); - (data["input"].clone(), call) + for scheme in [ColorScheme::Light, ColorScheme::Dark] { + fx.app + .set_environment("appearance", |env| env.color_scheme = scheme) + .unwrap(); + let nodes = fx.app.screen().layout_nodes(); + for selector in ["text:Usage", source, "text:Usage & Details"] { + let id = fx.app.screen().id(selector).unwrap(); + let node = nodes.iter().find(|node| node.id == id).unwrap(); + let foreground = node.text.as_ref().unwrap().text.spans[0].style.color; + let mut parent = node.parent; + let background = loop { + let style = fx + .app + .screen() + .view_style(&format!("view:{parent}")) + .unwrap() + .unwrap(); + if let Some(fill) = style.background_color { + break Color(fill); + } + parent = nodes.iter().find(|node| node.id == parent).unwrap().parent; + }; + assert_readable_colors(selector, foreground, background); + } } } -fn dock_model() -> Value { - json!({"kind":"model","connectionId":"test","modelId":"model"}) -} +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn continue_uses_run_local_fence_and_cancels_a_press_during_ime_composition() { + use nsh_core::{EventKind, EventPayload}; + + let mut backend = dock_model(); + backend["serviceTier"] = json!("fast"); + backend["thinkingLevel"] = json!("high"); + let held = + json!({"revision":1,"entries":[{"kind":"held","messageId":"held","preview":"Held"}]}); + let mut fx = stopped_conversation(held, backend.clone(), true).await; + verify_continue(&mut fx, &backend).await; + assert_embedded_primary(&fx.app, CONTINUE_ACTION); + let id = fx.app.screen().id(CONTINUE_ACTION).unwrap(); + let control = fx.app.engine().control(); + control.dispatch_event( + id, + EventKind::PressDown, + EventPayload::Press(Default::default()), + ); + assert!(fx.app.settle()); + fx.app.compose("label:Message composer", "ni").unwrap(); + fx.app.wait_for("label:Send message").unwrap(); + control.dispatch_event( + id, + EventKind::Press, + EventPayload::Press(Default::default()), + ); + assert!(fx.app.settle()); + assert!(fx.calls.try_recv().is_err()); + fx.app.compose("label:Message composer", "").unwrap(); + fx.app.wait_for(CONTINUE_ACTION).unwrap(); -fn dock_run() -> Value { - json!({"backend":"model","runId":DOCK_RUN_ID,"turnId":"t1","state":"running"}) + let (request, result) = tap_continue(&mut fx, &backend).await; + assert_eq!( + request, + json!({"sessionId":"chat","sourceRunId":DOCK_RUN_ID,"sourceHighWater":7, + "model":{"connectionId":"test","modelId":"model","serviceTier":"fast"},"thinkingLevel":"high"}) + ); + assert!(!fx.app.screen().enabled("id:chat-primary-action").unwrap()); + let mut run = dock_run(); + run["runId"] = json!("continued-run"); + *fx.run.lock().unwrap() = run; + let mut execution = stopped_source("admitted"); + execution["runId"] = json!("continued-run"); + result.resolve(json!({"value":{"kind":"started","execution":execution}})); + fx.app.wait_for("label:Stop current reply").unwrap(); + assert!(!fx.app.screen().matches(CONTINUE_ACTION).unwrap()); + assert!( + !fx.app + .screen() + .matches("id:chat-transcript >> text:Continue reply") + .unwrap() + ); + assert!(fx.calls.try_recv().is_err()); } -fn empty_queue() -> Value { - json!({"revision":0,"entries":[]}) +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn continue_blocks_runnable_queue_and_only_retries_a_known_unsubmitted_intent() { + let backend = dock_model(); + let runnable = json!({"revision":1,"entries":[{"kind":"in_flight","messageId":"in-flight","preview":"Hidden"}]}); + let mut fx = stopped_conversation(runnable, backend.clone(), false).await; + fx.app.wait_for("text:Interrupted answer").unwrap(); + assert!(!fx.app.screen().matches(CONTINUE_ACTION).unwrap()); + assert!(fx.calls.try_recv().is_err()); + *fx.queue.lock().unwrap() = json!({"revision":2,"entries":[]}); + fx.queue_item(json!({"revision":2,"entries":[]})); + verify_continue(&mut fx, &backend).await; + let (request, result) = tap_continue(&mut fx, &backend).await; + assert_eq!(request["thinkingLevel"], Value::Null); + result.resolve(json!({"notSubmitted":"The mutation was not confirmed"})); + fx.app.wait_for(CONTINUE_ACTION).unwrap(); + let (_, result) = tap_continue(&mut fx, &backend).await; + fx.hold_observe + .store(true, std::sync::atomic::Ordering::SeqCst); + result.reject("The confirmation reply was lost"); + fx.app + .wait_for("text:Continue not confirmed. Refresh to check the reply.") + .unwrap(); + let (query, observed) = fx.call("observe").await; + assert_eq!(query, json!({"sessionId":"chat"})); + observed.resolve( + json!({"value":{"session":{"id":"chat","kind":"agent","revision":1, + "title":"Dock Chat","workspace":{"path":"/work"},"backend":backend},"through":2,"run":null, + "latestRunId":DOCK_RUN_ID}}), + ); + fx.app.wait_for("label:Send message").unwrap(); + assert!(!fx.app.screen().enabled("id:chat-primary-action").unwrap()); + assert!( + fx.calls.try_recv().is_err(), + "an unknown result must only trigger reads, never resend" + ); } -fn queued_result(message_id: &str, revision: u64) -> Value { - json!({"value": SendResult::Queued { - session_id:"chat".into(), message_id:message_id.into(), revision, completion:None, - }}) +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn continuation_rejection_is_explained_and_old_generation_eligibility_is_ignored() { + let backend = dock_model(); + let mut fx = stopped_conversation(empty_queue(), backend.clone(), false).await; + let (_, result) = fx.call("execution").await; + result.resolve(json!({"value":{"kind":"found","execution":stopped_source("completed")}})); + assert!(fx.app.settle()); + assert!(!fx.app.screen().matches(CONTINUE_ACTION).unwrap()); + assert!(fx.calls.try_recv().is_err()); + fx.app + .send_host_event("ios.hostState", dock_host(2)) + .unwrap(); + verify_continue(&mut fx, &backend).await; + let (_, result) = tap_continue(&mut fx, &backend).await; + result.resolve(json!({"value":{"kind":"rejected","reason":"workspace_changed"}})); + fx.app + .wait_for("text:The workspace changed. Send a new message instead.") + .unwrap(); + assert!(!fx.app.screen().matches(CONTINUE_ACTION).unwrap()); + + fx.app + .send_host_event("ios.hostState", dock_host(3)) + .unwrap(); + let (_, stale) = fx.call("execution").await; + let mut offline = side_host_state(4, None); + offline["connections"]["root"]["autoReconnect"] = json!(false); + fx.app.send_host_event("ios.hostState", offline).unwrap(); + fx.app.wait_for("text:Host is offline").unwrap(); + stale.resolve(json!({"value":{"kind":"found","execution":stopped_source("cancelled")}})); + assert!(fx.app.settle()); + assert!(fx.calls.try_recv().is_err()); } +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn continuation_rechecks_the_entire_observed_backend_before_submitting() { + let mut backend = dock_model(); + backend["serviceTier"] = json!("fast"); + let mut fx = stopped_conversation(empty_queue(), backend.clone(), false).await; + let (_, execution) = fx.call("execution").await; + let source = stopped_source("cancelled"); + execution.resolve(json!({"value":{"kind":"found","execution":source}})); + let (_, availability) = fx.call("continuationAvailability").await; + let mut stale = source.clone(); + stale["highWater"] = json!(6); + availability.resolve(json!({"value":{"kind":"ready","source":stale}})); + assert!(fx.app.settle()); + assert!(!fx.app.screen().matches(CONTINUE_ACTION).unwrap()); + assert!(fx.calls.try_recv().is_err()); -fn missing_queued(reason: &str) -> Value { - json!({"value":{"kind":"missing","reason":reason}}) + fx.app + .send_host_event("ios.hostState", dock_host(2)) + .unwrap(); + verify_continue(&mut fx, &backend).await; + backend["thinkingLevel"] = json!("minimal"); + fx.observation.lock().unwrap()["session"] = json!({ + "id":"chat","title":"Dock Chat","kind":"agent","revision":2, + "workspace":{"path":"/work"},"backend":backend + }); + fx.app.press(CONTINUE_ACTION).unwrap(); + // The first call after fresh observe must be a new eligibility read, + // not model resolution or a mutation using the previous preference. + verify_continue(&mut fx, &backend).await; + assert!(fx.calls.try_recv().is_err()); } #[tokio::test(flavor = "multi_thread", worker_threads = 2)] @@ -3301,7 +4624,7 @@ async fn chat_native_steer_uses_the_current_run_and_waits_across_queue_drain() { async fn chat_executor_steer_that_falls_back_to_queue_hands_off_to_its_entry() { let mut run = dock_run(); run["backend"] = json!("executor"); - let backend = json!({"kind":"executor","selection":{"executor":"codex"}}); + let backend = json!({"kind":"executor","selection":{"executor":"codex","settings":{}}}); let mut fx = ComposerDockFixture::start(run, backend.clone(), empty_queue()).await; fx.app .type_text("label:Message composer", "Executor follow-up") @@ -3324,6 +4647,24 @@ async fn chat_executor_steer_that_falls_back_to_queue_hands_off_to_its_entry() { assert_eq!(fx.app.screen().count("text:Executor follow-up").unwrap(), 1); } +fn assert_embedded_primary(app: &Headless, label: &str) { + let id = app.screen().id(label).unwrap(); + assert_eq!(id, app.screen().id("id:chat-primary-action").unwrap()); + let capsule = app.screen().id("id:chat-composer-input").unwrap(); + let nodes = app.screen().layout_nodes(); + let action = nodes.iter().find(|node| node.id == id).unwrap(); + let mut inner = action; + while inner.parent != capsule { + inner = nodes + .iter() + .find(|node| node.id == inner.parent) + .expect("action outside input pill"); + } + let pill = nodes.iter().find(|node| node.id == capsule).unwrap().bounds; + assert!(action.bounds.right() < pill.right() && action.bounds.bottom() < pill.bottom()); + assert_eq!(action.bounds.size, Size::new(px(36.), px(36.))); +} + fn assert_dock_touch_target(app: &Headless, selector: &str) { let size = app .screen() @@ -3338,15 +4679,12 @@ fn assert_dock_touch_target(app: &Headless, selector: &str) { ); } -fn watch_native_menu_items( +fn native_menu_items( app: &mut Headless, - mut observe: F, -) -> impl FnMut(&mut Headless, &str) + use -where - F: FnMut(&nsh_core::MountItem) + std::marker::Send + 'static, -{ - use nsh_core::{EventKind, EventPayload, MountItem}; - let (menu_tx, mut menus) = mpsc::unbounded_channel(); + mut observe: impl FnMut(&nsh_core::MountItem) + std::marker::Send + 'static, +) -> mpsc::UnboundedReceiver<(String, (nsh_core::NodeId, Value))> { + use nsh_core::MountItem; + let (menu_tx, menus) = mpsc::unbounded_channel(); app.observe(move |_, batch| { for item in &batch.items { observe(item); @@ -3357,7 +4695,14 @@ where .and_then(Value::as_array) }) { - for item in items { + let actions = items.iter().flat_map(|item| { + item["items"] + .as_array() + .filter(|items| !items.is_empty()) + .map(|items| items.as_slice()) + .unwrap_or_else(|| std::slice::from_ref(item)) + }); + for item in actions { if let Some(label) = item["label"].as_str() { menu_tx .send((label.to_owned(), (*id, item["id"].clone()))) @@ -3367,6 +4712,30 @@ where } } }); + menus +} + +fn select_native_item(app: &mut Headless, (menu, action): (nsh_core::NodeId, Value)) { + use nsh_core::{EventKind, EventPayload}; + app.engine().control().dispatch_event( + menu, + EventKind::NativeEvent, + EventPayload::Native { + name: "select".into(), + data: action, + }, + ); + assert!(app.settle()); +} + +fn watch_native_menu_items( + app: &mut Headless, + observe: F, +) -> impl FnMut(&mut Headless, &str) + use +where + F: FnMut(&nsh_core::MountItem) + std::marker::Send + 'static, +{ + let mut menus = native_menu_items(app, observe); let mut items = BTreeMap::new(); move |app, label| { // Headless has no UIKit presentation. Deliver the installed item @@ -3374,18 +4743,10 @@ where while let Ok((label, action)) = menus.try_recv() { items.insert(label, action); } - let (menu, action) = items + let item = items .remove(label) .unwrap_or_else(|| panic!("missing native menu item: {label}")); - app.engine().control().dispatch_event( - menu, - EventKind::NativeEvent, - EventPayload::Native { - name: "select".into(), - data: action, - }, - ); - assert!(app.settle()); + select_native_item(app, item); } } @@ -3826,7 +5187,6 @@ async fn compact_keyboard_keeps_pending_dock_and_quotes_out_of_the_composer_row( for selector in [ "id:chat-composer-actions", "id:chat-composer-input", - "label:Stop Run", "label:Send message", ] { if selector != "label:Send message" { @@ -4072,7 +5432,7 @@ async fn stopped_steer_recovers_the_snapshot_after_the_queue_revision_changes() fx.app .type_text("label:Message composer", "Don't lose this") .unwrap(); - fx.app.press("label:Send to Main Chat").unwrap(); + fx.app.press("label:Send message").unwrap(); let (original, receipt) = fx.call("send").await; assert_eq!(original["quotes"][0]["text"], "An earlier answer"); assert_eq!( @@ -4086,11 +5446,11 @@ async fn stopped_steer_recovers_the_snapshot_after_the_queue_revision_changes() let waiting = "text:Steer · Waiting for next step"; fx.app.wait_for(waiting).unwrap(); - fx.app.press("label:Stop Run").unwrap(); + fx.app.press("label:Stop current reply").unwrap(); let (stop, reply) = fx.call("stop").await; assert_eq!(stop["runId"], DOCK_RUN_ID); *fx.run.lock().unwrap() = Value::Null; - reply.resolve(json!({"value":{"kind":"stopped"}})); + reply.resolve(json!({"value":{"requested":true}})); fx.queue_item(json!({"revision":2,"entries":[]})); fx.transcript_changed(2, "ended"); let (probe, reply) = fx.call("queueMessage").await; @@ -4150,9 +5510,7 @@ async fn send_does_not_retarget_when_the_run_ends_during_backend_preflight() { let (_, default_model) = fx.call("resolveModel").await; *fx.run.lock().unwrap() = Value::Null; fx.transcript_changed(2, "ended"); - fx.app - .wait_for_gone("label:Stop Run", Duration::from_secs(2)) - .unwrap(); + assert!(fx.app.settle()); default_model.resolve(json!({"value":{"kind":"ready","choice":{"selection":{"connectionId":"test","modelId":"model"}}}})); fx.app @@ -4220,21 +5578,30 @@ async fn reopened_chat_checks_delivery_when_accepted_sends_are_outside_the_histo } #[tokio::test(flavor = "multi_thread", worker_threads = 2)] -async fn chat_can_queue_from_the_side_question_quote_tray() { +async fn quoted_multiline_draft_keeps_the_primary_send_and_its_menu() { let mut fx = ComposerDockFixture::start_with_anchor(dock_run(), dock_model(), empty_queue(), true).await; let mut choose_menu_item = watch_native_menu_items(&mut fx.app, |_| {}); fx.app.press("role:button[Quote] >> nth=0").unwrap(); fx.app.wait_for("label:Ask Side Question").unwrap(); - fx.app.wait_for("label:Send to Main Chat").unwrap(); - assert!(!fx.app.screen().matches("label:Send message").unwrap()); - fx.app.long_press("label:Send to Main Chat").unwrap(); + for width in [375., 390., 430.] { + fx.app.set_viewport(Size::new(px(width), px(844.))).unwrap(); + assert_embedded_primary(&fx.app, "label:Send message"); + } + fx.app + .type_text( + "label:Message composer", + "First line\nSecond line\nThird line", + ) + .unwrap(); + fx.app.long_press("label:Send message").unwrap(); assert!(fx.calls.try_recv().is_err()); choose_menu_item(&mut fx.app, "Add to queue"); let (input, reply) = fx.call("send").await; assert_eq!(input["delivery"], "queue"); assert_eq!(input["expectedRunId"], DOCK_RUN_ID); assert_eq!(input["quotes"][0]["text"], "An earlier answer"); + assert_eq!(input["message"], "First line\nSecond line\nThird line"); reply.resolve(queued_result("quote", 1)); } @@ -4259,15 +5626,15 @@ async fn stopped_steer_with_interrupted_verification_is_recoverable_and_can_be_r let mut fx = ComposerDockFixture::start(dock_run(), dock_model(), empty_queue()).await; fx.app.press("role:button[Quote] >> nth=0").unwrap(); accept_dock_steer(&mut fx).await; - fx.app.press("label:Stop Run").unwrap(); + fx.app.press("label:Stop current reply").unwrap(); let (_, stop) = fx.call("stop").await; *fx.run.lock().unwrap() = Value::Null; - stop.resolve(json!({"value":{"kind":"stopped"}})); + stop.resolve(json!({"value":{"requested":true}})); let drained = json!({"revision":2,"entries":[]}); fx.queue_item(drained.clone()); fx.transcript_changed(2, "ended"); fx.app - .wait_for_gone("label:Stop Run", Duration::from_secs(2)) + .wait_for_gone("label:Stop current reply", Duration::from_secs(2)) .unwrap(); let (probe, reply) = fx.call("queueMessage").await; assert_eq!(probe["expectedRevision"], 2); @@ -4509,12 +5876,12 @@ async fn stopped_steer_recovers_when_the_conflicting_revision_cannot_be_loaded() use std::sync::atomic::Ordering::SeqCst; let mut fx = ComposerDockFixture::start(dock_run(), dock_model(), empty_queue()).await; accept_dock_steer(&mut fx).await; - fx.app.press("label:Stop Run").unwrap(); + fx.app.press("label:Stop current reply").unwrap(); let (_, stop) = fx.call("stop").await; *fx.run.lock().unwrap() = Value::Null; - stop.resolve(json!({"value":{"kind":"stopped"}})); + stop.resolve(json!({"value":{"requested":true}})); fx.app - .wait_for_gone("label:Stop Run", Duration::from_secs(2)) + .wait_for_gone("label:Stop current reply", Duration::from_secs(2)) .unwrap(); let drained = json!({"revision":2,"entries":[]}); @@ -4565,12 +5932,12 @@ async fn stopped_steer_recovers_when_the_conflicting_revision_cannot_be_loaded() async fn a_new_watch_revision_survives_the_old_conflict_refresh_failing() { let mut fx = ComposerDockFixture::start(dock_run(), dock_model(), empty_queue()).await; accept_dock_steer(&mut fx).await; - fx.app.press("label:Stop Run").unwrap(); + fx.app.press("label:Stop current reply").unwrap(); let (_, stop) = fx.call("stop").await; *fx.run.lock().unwrap() = Value::Null; - stop.resolve(json!({"value":{"kind":"stopped"}})); + stop.resolve(json!({"value":{"requested":true}})); fx.app - .wait_for_gone("label:Stop Run", Duration::from_secs(2)) + .wait_for_gone("label:Stop current reply", Duration::from_secs(2)) .unwrap(); fx.queue_item(json!({"revision":2,"entries":[]})); @@ -4729,7 +6096,8 @@ async fn diff_and_file_quotes_join_the_composer_without_changing_text() { // Type an unsent draft before navigating to ProjectFiles -> DiffScreen. app.type_text("label:Message composer", "Please check this:") .unwrap(); - app.press("label:Files & Changes").unwrap(); + app.press("label:More").unwrap(); + app.choose_menu_item("Files & Changes").unwrap(); app.wait_for("text:Reading git workspace diff from Travel Mac.") .unwrap(); app.send_host_event("ios.hostState", workspace_host_state(3, "Office Mac")) @@ -4749,7 +6117,8 @@ async fn diff_and_file_quotes_join_the_composer_without_changing_text() { app.wait_for("text:/Please check this:/").unwrap(); app.wait_for("text:src/auth.rs:1234").unwrap(); app.wait_for("label:Remove quote: let ttl = 60;").unwrap(); - app.press("label:Files & Changes").unwrap(); + app.press("label:More").unwrap(); + app.choose_menu_item("Files & Changes").unwrap(); app.press("label:Files").unwrap(); app.wait_for("label:.github").unwrap(); app.press("label:.github").unwrap(); @@ -5782,6 +7151,7 @@ async fn chat_scroll_completes_previous_turn_and_keeps_the_visible_text_anchored ..Environment::default() }; let mut app = Headless::start(config).unwrap(); + let mut choose_menu = watch_native_menu_items(&mut app, |_| {}); app.wait_for("label:Conversation: Paged Chat").unwrap(); app.press("label:Conversation: Paged Chat").unwrap(); app.wait_for("text:Newest paragraph").unwrap(); @@ -5791,7 +7161,7 @@ async fn chat_scroll_completes_previous_turn_and_keeps_the_visible_text_anchored ); app.scroll("id:chat-transcript", px(-1600.)).unwrap(); let (abandoned_input, abandoned) = fixture_recv(&mut history_rx).await; - app.press("label:Files & Changes").unwrap(); + choose_menu(&mut app, "Files & Changes"); app.wait_for("text:No uncommitted changes").unwrap(); let mut older_fragment = visible.clone(); older_fragment["offset"] = json!(0); @@ -6291,7 +7661,7 @@ async fn side_chat_uses_transcript_order_and_keeps_the_main_draft() { .unwrap(); assert!(fx.mutations.try_recv().is_err()); - fx.app.press("label:Send to Main Chat").unwrap(); + fx.app.press("label:Send message").unwrap(); let (payload, receipt) = fx.mutation("send").await; let main: Send = serde_json::from_value(payload).unwrap(); assert_eq!(main.session_id, "main"); @@ -6544,6 +7914,22 @@ async fn composer_and_keyboard_toolbar_keep_glass_and_touch_targets() { assert_hit_target("label:Clear all quotes", &app, &slop); } +fn assert_readable_colors( + selector: &str, + foreground: nsh_core::Color, + background: nsh_core::Color, +) { + let luminance = |color: nsh_core::Color| { + let (r, g, b, a) = color.to_f64(); + assert_eq!(a, 1.0, "{selector}: transparent color {color:?}"); + relative_luminance([r, g, b]) + }; + let bg = luminance(background); + let fg = luminance(foreground); + let contrast = (bg.max(fg) + 0.05) / (bg.min(fg) + 0.05); + assert!(contrast >= 4.5, "{selector}: {contrast:.2}:1"); +} + fn assert_chat_button_contrast( app: &mut Headless, selector: &str, @@ -6630,9 +8016,12 @@ async fn quote_actions_and_sheet_done_keep_contrast_when_pressed() { fx.app .set_environment("appearance", |env| env.color_scheme = scheme) .unwrap(); - for selector in ["label:Ask Side Question", "label:Send to Main Chat"] { - assert_chat_button_contrast(&mut fx.app, selector, None, button_text_color); - } + assert_chat_button_contrast( + &mut fx.app, + "label:Ask Side Question", + None, + button_text_color, + ); assert_chat_button_contrast( &mut fx.app, "label:Clear all quotes", @@ -6997,7 +8386,7 @@ async fn side_chat_actions_are_absent_in_rooms_and_from_live_preview() { fx.app.press("label:Conversation: Room Chat").unwrap(); fx.app.wait_for("text:Room message").unwrap(); assert!(!fx.app.shows("label:Ask Side Question")); - assert!(!fx.app.shows("label:More")); + assert!(!fx.app.screen().matches("id:chat-details-scroll").unwrap()); fx.app.press("label:Chats").unwrap(); while fx.subscriptions.try_recv().is_ok() {} fx.open_main(); @@ -7455,51 +8844,15 @@ async fn side_chat_cannot_bring_a_link_to_a_removed_main_conversation() { } #[tokio::test(flavor = "multi_thread", worker_threads = 2)] -async fn side_chat_waits_for_the_parent_model_selection_to_commit() { - use nsh_core::{EventKind, EventPayload, MountItem}; - +async fn side_chat_uses_the_confirmed_parent_model_selection() { let mut fx = side_chat_fixture_on(false, false, Os::Ios, 1); - let (menu_tx, mut menus) = mpsc::unbounded_channel(); - fx.app.observe(move |_, batch| { - for item in &batch.items { - 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::as_array) - && let Some(model) = - items.iter().find(|item| item["label"] == "New side model") - { - menu_tx.send((*id, model["id"].clone())).unwrap(); - } - } - } - } - }); + let mut choose = watch_native_menu_items(&mut fx.app, |_| {}); fx.open_main(); - let (menu, model) = tokio::time::timeout(Duration::from_secs(2), menus.recv()) - .await - .unwrap() - .unwrap(); - fx.app.engine().control().dispatch_event( - menu, - EventKind::NativeEvent, - EventPayload::Native { - name: "select".into(), - data: model, - }, - ); - fx.app.settle(); // The model RPC is intentionally still pending. + fx.app.wait_for("id:chat-keyboard-model").unwrap(); + choose(&mut fx.app, "New side model"); let (selection, commit) = fx.mutation("selectBackend").await; - fx.app.press("label:Quote >> nth=0").unwrap(); - fx.app.press("label:Ask Side Question").unwrap(); - fx.app - .type_text("label:Message composer", "Use the just-selected model") - .unwrap(); - fx.app.press("label:Send message").unwrap(); - assert!( - fx.mutations.try_recv().is_err(), - "forked before the model selection committed" - ); + assert!(!fx.app.screen().enabled("id:chat-keyboard-model").unwrap()); + assert!(fx.mutations.try_recv().is_err()); let backend = selection["backend"].clone(); *fx.backend.lock().unwrap() = backend.clone(); @@ -7507,8 +8860,16 @@ async fn side_chat_waits_for_the_parent_model_selection_to_commit() { "id":"main","title":"Main Chat","kind":"agent","revision":42,"backend":backend, "branch":null,"workspace":{"path":"/work"} }}})); + fx.app.wait_for("text:New side model").unwrap(); + fx.app.press("label:Quote >> nth=0").unwrap(); + fx.app.press("label:Ask Side Question").unwrap(); + fx.app + .type_text("label:Message composer", "Use the just-selected model") + .unwrap(); + fx.app.press("label:Send message").unwrap(); let (input, fork) = fx.mutation("fork").await; - assert_eq!(input["expectedRevision"], 42); + // The fork re-observes after the model change. + assert_eq!(input["expectedRevision"], 43); fork.resolve(json!({"value":{"kind":"forked","session":side_session("new-side","Use the new model",&backend)}})); let (input, send) = fx.mutation("send").await; assert_eq!(input["backend"]["modelId"], "new-model"); @@ -9625,7 +10986,6 @@ async fn default_model_is_sent_on_create_and_recovers_unbound_conversations() { #[tokio::test(flavor = "multi_thread", worker_threads = 2)] async fn reconnect_waits_for_current_backend_and_send_preserves_the_next_draft() { use maka_agent_api::contract::{SelectBackend, Send, SendResult}; - use nsh_core::{EventKind, EventPayload, MountItem}; use std::sync::atomic::{AtomicBool, AtomicU64, Ordering}; let channel = HostChannel::new(); @@ -9740,110 +11100,27 @@ async fn reconnect_waits_for_current_backend_and_send_preserves_the_next_draft() }; let mut app = Headless::start(config).unwrap(); - // Headless hosts the iOS view tree, not UIKit's native menu. Read the - // displayed items and return the chosen ID through the native select event. - let (menu_tx, mut menus) = mpsc::unbounded_channel(); - let (header_tx, mut headers) = mpsc::unbounded_channel(); - app.observe(move |_, batch| { - for item in &batch.items { - if let MountItem::ScreenConfig { config, .. } = item - && config.title.as_deref() == Some("Chat") - { - header_tx.send(config.clone()).unwrap(); - } - 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::as_array) - && items - .iter() - .any(|item| item["label"] == "Shared model · Second connector") - { - menu_tx.send((*id, items.clone())).unwrap(); - } - } - } - } - }); + let mut choose = watch_native_menu_items(&mut app, |_| {}); app.wait_for("label:Conversation: Chat").unwrap(); app.set_viewport(Size::new(px(375.), px(812.))).unwrap(); app.press("label:Conversation: Chat").unwrap(); app.wait_for("text:work").unwrap(); - let header = headers.try_recv().unwrap(); - assert!( - header.title_view.is_none(), - "UIKit must fit the title to its actual buttons" - ); - assert!(header.back_visible); - assert_eq!(header.right_items.len(), 2); - app.wait_for("text:Shared model · First connector").unwrap(); - let (node, items) = std::iter::from_fn(|| menus.try_recv().ok()).last().unwrap(); - let checked: Vec<_> = items - .iter() - .filter(|item| item["checked"] == true) - .map(|item| &item["label"]) - .collect(); - assert_eq!(checked, [&json!("Shared model · First connector")]); - let selected = items.iter().find(|item| item["checked"] == true).unwrap(); - app.engine().control().dispatch_event( - node, - EventKind::NativeEvent, - EventPayload::Native { - name: "select".into(), - data: selected["id"].clone(), - }, - ); - assert!(app.settle()); + app.wait_for("id:chat-keyboard-model").unwrap(); + choose(&mut app, "Shared model · First connector"); assert!( mutations.try_recv().is_err(), - "reselecting must not overwrite tier or thinking level" + "reselecting must preserve tier and thinking" ); - let choose = - |app: &mut Headless, menus: &mut mpsc::UnboundedReceiver<(_, Vec)>, label| { - let (id, items) = std::iter::from_fn(|| menus.try_recv().ok()).last().unwrap(); - assert_eq!( - items - .iter() - .map(|item| item["label"].as_str().unwrap()) - .collect::>(), - [ - "Shared model · First connector", - "Shared model · Second connector", - "Unique model · Second connector", - "Solo model", - "Native agent" - ] - ); - let item = items.iter().find(|item| item["label"] == label).unwrap(); - if label == "Native agent" { - assert_eq!(item["checked"], true); - } - app.engine().control().dispatch_event( - id, - EventKind::NativeEvent, - EventPayload::Native { - name: "select".into(), - data: item["id"].clone(), - }, - ); - app.settle(); - }; *session.lock().unwrap() = row(2, model("first")); hold_observe.store(true, Ordering::SeqCst); generation.store(2, Ordering::SeqCst); app.send_host_event("ios.hostState", host_state(2, 2)) .unwrap(); let (observe, snapshot) = observations.try_recv().unwrap(); - app.wait_for("text:Default").unwrap(); - choose(&mut app, &mut menus, "Shared model · First connector"); - assert!(mutations.try_recv().is_err()); + app.wait_for("id:chat-keyboard-model >> text:Default") + .unwrap(); observe.resolve(json!({"value":snapshot})); - assert!(app.settle()); - assert!( - mutations.try_recv().is_err(), - "reselecting after observe must also be a no-op" - ); - + app.wait_for("text:Shared model · First connector").unwrap(); app.type_text("label:Message composer", "Prior configured model") .unwrap(); app.press("label:Send message").unwrap(); @@ -9856,7 +11133,7 @@ async fn reconnect_waits_for_current_backend_and_send_preserves_the_next_draft() session_id:"chat".into(), message_id:"prior".into(), revision:1, completion:None }})); assert!(app.settle()); - app.type_text("label:Message composer", "First draft") + app.type_text("label:Message composer", "Wait for the fresh snapshot") .unwrap(); *session.lock().unwrap() = row(3, model("first")); @@ -9865,19 +11142,28 @@ async fn reconnect_waits_for_current_backend_and_send_preserves_the_next_draft() app.send_host_event("ios.hostState", host_state(3, 3)) .unwrap(); let (observe, snapshot) = observations.try_recv().unwrap(); - hold_selection.store(true, Ordering::SeqCst); - choose(&mut app, &mut menus, "Shared model · Second connector"); - assert!( - mutations.try_recv().is_err(), - "selected before the current observation" - ); app.press("label:Send message").unwrap(); assert!( mutations.try_recv().is_err(), "sent before the current observation" ); observe.resolve(json!({"value":snapshot})); - app.settle(); + assert!(app.settle()); + let (refreshed_send, receipt) = mutations.try_recv().unwrap(); + assert_eq!(refreshed_send["generation"], 3); + assert_eq!(refreshed_send["input"]["backend"], model("first")); + assert_eq!( + refreshed_send["input"]["message"], + "Wait for the fresh snapshot" + ); + receipt.unwrap().resolve(queued_result("refreshed", 1)); + assert!(app.settle()); + app.type_text("label:Message composer", "First draft") + .unwrap(); + + hold_selection.store(true, Ordering::SeqCst); + choose(&mut app, "Shared model · Second connector"); + assert!(!app.screen().enabled("id:chat-keyboard-model").unwrap()); let (selection, commit) = mutations.try_recv().unwrap(); assert_eq!(selection["method"], "selectBackend"); assert_eq!(selection["generation"], 3); @@ -9888,7 +11174,9 @@ async fn reconnect_waits_for_current_backend_and_send_preserves_the_next_draft() commit .unwrap() .resolve(json!({"value":{"kind":"committed","session":*session.lock().unwrap()}})); - app.settle(); + app.wait_for("text:Shared model · Second connector") + .unwrap(); + app.press("label:Send message").unwrap(); let (call, receipt) = mutations.try_recv().unwrap(); let send: Send = serde_json::from_value(call["input"].clone()).unwrap(); assert_eq!(call["generation"], 3); @@ -9907,10 +11195,10 @@ async fn reconnect_waits_for_current_backend_and_send_preserves_the_next_draft() assert!(app.settle()); app.wait_for("text:Next draft").unwrap(); - choose(&mut app, &mut menus, "Shared model · First connector"); + choose(&mut app, "Shared model · First connector"); let (first, _) = mutations.try_recv().unwrap(); assert_eq!(first["input"]["backend"]["connectionId"], "first"); - choose(&mut app, &mut menus, "Shared model · Second connector"); + choose(&mut app, "Shared model · Second connector"); let (second, _) = mutations.try_recv().unwrap(); assert_eq!(second["method"], "selectBackend"); let select: SelectBackend = serde_json::from_value(second["input"].clone()).unwrap(); @@ -9920,6 +11208,8 @@ async fn reconnect_waits_for_current_backend_and_send_preserves_the_next_draft() app.wait_for("text:Shared model · Second connector") .unwrap(); + app.clear("label:Message composer").unwrap(); + // An ended watch event arriving while a stale running observe is in flight // must schedule a catch-up observe rather than sticking in the running state. let watch = std::iter::from_fn(|| watches.try_recv().ok()) @@ -9956,14 +11246,16 @@ async fn reconnect_waits_for_current_backend_and_send_preserves_the_next_draft() "run": { "backend": "model", "runId": "r1", "turnId": "t1", "state": "running" } } })); - app.wait_for("label:Stop Run").unwrap(); + app.wait_for("label:Stop current reply").unwrap(); let (catch_up_observe, idle_snapshot) = observations .try_recv() .expect("ended event during an in-flight observe must schedule a catch-up observe"); + let mut idle_snapshot = idle_snapshot; + idle_snapshot["through"] = json!(3); catch_up_observe.resolve(json!({ "value": idle_snapshot })); assert!(app.settle()); assert!( - !app.shows("label:Stop Run"), + !app.screen().matches("label:Stop current reply").unwrap(), "catch-up observe after ended must clear the running state" ); let executor = json!({"kind":"executor","selection":{"executor":"codex", @@ -9973,7 +11265,7 @@ async fn reconnect_waits_for_current_backend_and_send_preserves_the_next_draft() app.send_host_event("ios.hostState", host_state(4, 4)) .unwrap(); app.wait_for("text:Native agent").unwrap(); - choose(&mut app, &mut menus, "Native agent"); + choose(&mut app, "Native agent"); assert!( mutations.try_recv().is_err(), "reselecting the executor must not overwrite its settings" @@ -10282,17 +11574,11 @@ async fn model_menus_work_without_permission_to_read_connections() { }); app.wait_for("label:Conversation: Permission test").unwrap(); app.press("label:Conversation: Permission test").unwrap(); - app.wait_for("text:First model").unwrap(); - let (id, choice) = std::iter::from_fn(|| menus.try_recv().ok()).last().unwrap(); - app.engine().control().dispatch_event( - id, - EventKind::NativeEvent, - EventPayload::Native { - name: "select".into(), - data: choice, - }, - ); - app.wait_for("text:Second model").unwrap(); + app.wait_for("id:chat-keyboard-model").unwrap(); + let item = std::iter::from_fn(|| menus.try_recv().ok()).last().unwrap(); + select_native_item(&mut app, item); + app.wait_for("id:chat-keyboard-model >> text:Second model") + .unwrap(); assert_eq!(writes.try_recv().unwrap()["method"], "selectBackend"); app.type_text("label:Message composer", "Send with restricted settings") .unwrap(); From 264dbd4024e88a3a068612417e5dfa0825ceff77 Mon Sep 17 00:00:00 2001 From: me2seeks Date: Sat, 28 Nov 2026 02:16:59 +0800 Subject: [PATCH 4/7] feat(ios): support session goals in chat Generated-by: Maka --- DESIGN.md | 15 + products/maka/ios-shell/app/bridge.ts | 37 + products/maka/ios-shell/app/hostText.ts | 23 + .../app/screens/chats/ChatQuotes.tsx | 2 +- .../app/screens/chats/ChatScreen.tsx | 66 +- .../ios-shell/app/screens/chats/ChatSheet.tsx | 104 ++ .../app/screens/chats/ComposerPendingDock.tsx | 7 +- .../ios-shell/app/screens/chats/GoalSheet.tsx | 643 +++++++++++ products/maka/ios-shell/app/state/chat.ts | 43 +- products/maka/ios-shell/app/state/goal.ts | 338 ++++++ .../maka/ios-shell/app/state/sideQuestions.ts | 3 +- products/maka/ios-shell/app/theme/tokens.ts | 5 + .../maka/ios-shell/app/ui/ActionButton.tsx | 24 +- products/maka/ios-shell/locales/de.json | 61 + products/maka/ios-shell/locales/en.json | 61 + products/maka/ios-shell/locales/es.json | 61 + products/maka/ios-shell/locales/fr.json | 61 + products/maka/ios-shell/locales/it.json | 61 + products/maka/ios-shell/locales/ja.json | 61 + products/maka/ios-shell/locales/ko.json | 61 + products/maka/ios-shell/locales/pt-BR.json | 61 + products/maka/ios-shell/locales/ru.json | 61 + products/maka/ios-shell/locales/zh-CN.json | 61 + products/maka/ios-shell/locales/zh-HK.json | 6 + products/maka/ios-shell/locales/zh-TW.json | 61 + .../ios-shell/tests/ios_shell_behaviors.rs | 1005 ++++++++++++++++- .../ios-shell/tests/ios_shell_language.rs | 41 +- 27 files changed, 2976 insertions(+), 57 deletions(-) create mode 100644 products/maka/ios-shell/app/hostText.ts create mode 100644 products/maka/ios-shell/app/screens/chats/ChatSheet.tsx create mode 100644 products/maka/ios-shell/app/screens/chats/GoalSheet.tsx create mode 100644 products/maka/ios-shell/app/state/goal.ts diff --git a/DESIGN.md b/DESIGN.md index 5777a5f430d..f2aa150309e 100644 --- a/DESIGN.md +++ b/DESIGN.md @@ -157,3 +157,18 @@ keyboard toolbar use the same material without pulling focus from the draft. | Model and More | UIKit presents the menu. Telemetry refreshes do not replace menu actions. The model checkmark stays on the confirmed selection until save completes. | System setting | | Thinking capsule | Opens above the measured composer, without moving the draft or transcript. The thumb and tick follow each step immediately, including Default; failure restores the confirmed step. Changing model or connection ends the drag. Compact layout dismisses the capsule. | Same | | Usage & Details | Opens only from More, at one visible sheet height. Usage and speed update in place. | System setting | + +### iOS chat: Session Goal + +Inspect and manage the Goal from the navigation menu. The portrait context +pill may show its status, but never adds a row or takes a tap. The sheet keeps +the objective and next action ahead of meter details and secondary actions. +Its fields are separate from the chat draft, and the entire panel scrolls +above the keyboard. + +| Change | Motion | +| --- | --- | +| Menu, sheet, swipe and destructive confirmation | Shared bottom sheet and platform menu/alert motion; honor Reduce Motion. | +| Press and focus | Shared opaque button fill changes immediately, without dimming the text. No selection indicator. | +| Form → details / budget editor → details | Replace in place and return to the top of the same scroll; no second sheet or focus grab. | +| Saving, live status and meter updates | Keep controls in place while saving; update text without animating elapsed time or auto-scrolling. Confirm successful changes with a haptic. | diff --git a/products/maka/ios-shell/app/bridge.ts b/products/maka/ios-shell/app/bridge.ts index 34b051cd6b1..cc8bfa472ff 100644 --- a/products/maka/ios-shell/app/bridge.ts +++ b/products/maka/ios-shell/app/bridge.ts @@ -130,12 +130,22 @@ interface SubscriptionEndedPayload { import type { AgentModelChoice, + AgentGoalChange, + AgentGoalRead, + AgentGoalResult, + AgentGoalView, AgentBackendPreference, } from '../../../../packages/plugin-sdk/src/generated/runtime'; export type { AgentModelChoice, AgentBackendPreference }; export type { AgentProject, + AgentGoalApproval, + AgentGoalChange, + AgentGoalDetail, + AgentGoalView, + GoalControl, + GoalStatus, AgentFork, AgentForkResult, AgentInteractionResult, @@ -272,10 +282,12 @@ export async function hostQuery( input: Record = {}, targetAnchor = hostState?.active?.session, rootId?: string, + generation?: number, ): Promise { const res = (await host.call('ios.hostQuery', { anchorSession: rootId ? undefined : targetAnchor, rootId, + generation, endpoint, method, input, @@ -528,3 +540,28 @@ export function onHostPath( listener(event as unknown as Parameters[0]), ); } + +let goalWatchSeq = 0; + +export const goalHost = { + read: (rootId: string, generation: number, input: AgentGoalRead) => + hostQuery('agent', 'goal', { ...input }, undefined, rootId, generation), + watch: ( + rootId: string, + generation: number, + input: AgentGoalRead, + onItem: (view: AgentGoalView) => void, + onError: (cause: unknown) => void, + ) => + watchHost( + rootId, + generation, + 'goal:' + ++goalWatchSeq, + 'watchGoal', + { ...input }, + onItem, + onError, + ), + change: (rootId: string, generation: number, input: AgentGoalChange) => + hostMutate('agent', 'changeGoal', input, { rootId, generation }), +}; diff --git a/products/maka/ios-shell/app/hostText.ts b/products/maka/ios-shell/app/hostText.ts new file mode 100644 index 00000000000..0a86866bcbd --- /dev/null +++ b/products/maka/ios-shell/app/hostText.ts @@ -0,0 +1,23 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +// Rust str::trim uses Unicode White_Space, not JavaScript's trim set. +export function trimHostWhitespace(text: string): string { + return text.replace(/^\p{White_Space}+|\p{White_Space}+$/gu, ''); +} diff --git a/products/maka/ios-shell/app/screens/chats/ChatQuotes.tsx b/products/maka/ios-shell/app/screens/chats/ChatQuotes.tsx index b0dc86bc8f3..3dbf91b8bce 100644 --- a/products/maka/ios-shell/app/screens/chats/ChatQuotes.tsx +++ b/products/maka/ios-shell/app/screens/chats/ChatQuotes.tsx @@ -17,6 +17,7 @@ * under the License. */ +import { trimHostWhitespace } from '../../hostText'; import { Clipboard, computed, openUrl, Scroll, signal, Text, token, View, type ViewRef } from 'nsh'; import { Button, ContextMenu, TextView } from 'nsh/base'; import type { AgentHistoryChunk } from '../../bridge'; @@ -24,7 +25,6 @@ import { tr } from '../../locale'; import { isCompleteHistoryRow, quoteLimit, - trimHostWhitespace, type DraftLink, type DraftQuote, type HistoryRow, diff --git a/products/maka/ios-shell/app/screens/chats/ChatScreen.tsx b/products/maka/ios-shell/app/screens/chats/ChatScreen.tsx index eed711df043..c47bb2eb305 100644 --- a/products/maka/ios-shell/app/screens/chats/ChatScreen.tsx +++ b/products/maka/ios-shell/app/screens/chats/ChatScreen.tsx @@ -126,6 +126,8 @@ import { import { ChatDetails } from './ChatDetails'; import { ThinkingSlider } from './ThinkingSlider'; import { DraftQuoteStrip, HistoryQuotes, MessageBody, ReplyActions } from './ChatQuotes'; +import { ChatSheet } from './ChatSheet'; +import { ChatContextLabel, GoalContinuation, GoalSheet } from './GoalSheet'; import { SideQuestionList } from './ChatSideQuestions'; import { ComposerPendingDock, pendingDockLimits, type QueueEdit } from './ComposerPendingDock'; @@ -146,6 +148,7 @@ interface DisplayTurn { folded?: AgentHistoryChunk; groups: AgentHistoryChunk[]; quotes?: AgentHistoryChunk['quotes']; + goalObjective?: string; } interface RoomTranscriptRow { @@ -191,7 +194,9 @@ function groupHistoryTurns(chunks: readonly AgentHistoryChunk[]): DisplayTurn[] for (const row of assembleHistoryRows(chunks)) { const ch = row.first; if (ch.role === 'user' && !ch.work) { - if (row.text || ch.quotes?.length) { + const origin = row.first.origin; + const goal = origin?.kind === 'goal' ? origin : null; + if (goal || row.text || ch.quotes?.length) { turns.push({ kind: 'agent', key: row.key, @@ -200,8 +205,9 @@ function groupHistoryTurns(chunks: readonly AgentHistoryChunk[]): DisplayTurn[] thinking: '', tools: new Map(), groups: [], - bodies: row.text ? [row] : [], - quotes: ch.quotes, + bodies: !goal && row.text ? [row] : [], + quotes: goal ? undefined : ch.quotes, + goalObjective: goal?.objective, }); } continue; @@ -606,6 +612,7 @@ export function ChatScreen( return rows; }; + const goalOpen = signal(false); const atBottom = signal(true); const queueExpanded = signal(false); const pendingSheetOpen = signal(false); @@ -1323,6 +1330,15 @@ export function ChatScreen( const actions = runActions(); return [ { id: 'files', label: tr('Files & Changes'), icon: 'folder' }, + ...(ctrl.goal.showEntry() + ? [ + { + id: 'goal', + label: ctrl.goal.hasRecord() ? tr('Goal Details…') : tr('New Goal…'), + icon: 'scope', + }, + ] + : []), ...(canAskSide() ? [{ id: 'sides', label: tr('All Side Questions'), icon: 'bubble.left.and.bubble.right' }] : []), @@ -1362,8 +1378,16 @@ export function ChatScreen( return openThinking(); case 'usage': return openDetails(); + case 'goal': + if (ctrl.goal.showEntry()) { + hapticSelection(); + goalOpen.set(true); + } + return; case 'refresh': - return void ctrl.refreshAll(); + void ctrl.refreshAll(); + void ctrl.goal.refresh(); + return; default: selectRunAction(id); } @@ -1969,7 +1993,14 @@ export function ChatScreen( {(row) => ( } + else={ + } + > + + + } > @@ -2004,18 +2035,7 @@ export function ChatScreen( }} > - - {subtitleLine()} - + @@ -2458,25 +2478,29 @@ export function ChatScreen( + + goalOpen.set(false)} /> + + - quoteSheetOpen.set(false)} > {quoteStrip()} - + - pendingSheetOpen.set(false)} > {pendingDock(true)} - + ); diff --git a/products/maka/ios-shell/app/screens/chats/ChatSheet.tsx b/products/maka/ios-shell/app/screens/chats/ChatSheet.tsx new file mode 100644 index 00000000000..6267ddc668a --- /dev/null +++ b/products/maka/ios-shell/app/screens/chats/ChatSheet.tsx @@ -0,0 +1,104 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { + keyboardFrame, + safeArea, + Scroll, + token, + View, + windowSize, + type JSX, + type ScrollRef, +} from 'nsh'; +import { Sheet } from 'nsh/base'; +import { tr } from '../../locale'; +import { spacing } from '../../theme/tokens'; +import { ActionButton } from '../../ui'; + +export function ChatSheet(props: { + title: string; + scrollId: string; + onClose: () => void; + editing?: boolean; + ownHeader?: boolean; + detent?: { fraction: number }; + scrollRef?: (ref: ScrollRef) => void; + children: JSX.Element; +}) { + // A Sheet is laid out in the modal window, not in the owning page's insets. + const insets = safeArea; + const keyboardHeight = () => keyboardFrame().height; + const availableHeight = () => + Math.max( + 0, + windowSize().height - + insets().top - + (keyboardHeight() || (props.detent ? 0 : insets().bottom)), + ); + return ( + { + if (!open) props.onClose(); + }} + backdropStyle={props.detent ? { backgroundColor: token('scrim') } : undefined} + popupStyle={{ + backgroundColor: token('grouped-bg'), + paddingTop: 8, + paddingBottom: 8 + (props.detent && !keyboardHeight() ? insets().bottom : 0), + bottom: keyboardHeight() || undefined, + borderCurve: 'continuous', + borderTopLeftRadius: props.detent ? spacing.panelRadius : undefined, + borderTopRightRadius: props.detent ? spacing.panelRadius : undefined, + paddingLeft: Math.max(spacing.pageX, insets().left), + paddingRight: Math.max(spacing.pageX, insets().right), + maxHeight: availableHeight(), + }} + > + + + + + + + {props.children} + + + ); +} diff --git a/products/maka/ios-shell/app/screens/chats/ComposerPendingDock.tsx b/products/maka/ios-shell/app/screens/chats/ComposerPendingDock.tsx index 9cae2e04283..f0a4e8232fb 100644 --- a/products/maka/ios-shell/app/screens/chats/ComposerPendingDock.tsx +++ b/products/maka/ios-shell/app/screens/chats/ComposerPendingDock.tsx @@ -17,6 +17,7 @@ * under the License. */ +import { trimHostWhitespace } from '../../hostText'; import { Clipboard, createMotion, @@ -33,11 +34,7 @@ import { } from 'nsh'; import { Button, Input } from 'nsh/base'; import { tr } from '../../locale'; -import { - sendPreview, - trimHostWhitespace, - type createConversationController, -} from '../../state/chat'; +import { sendPreview, type createConversationController } from '../../state/chat'; import { showToast } from '../../state/hostPool'; import { hapticSelection } from '../../state/preferences'; import { motion, spacing, type } from '../../theme/tokens'; diff --git a/products/maka/ios-shell/app/screens/chats/GoalSheet.tsx b/products/maka/ios-shell/app/screens/chats/GoalSheet.tsx new file mode 100644 index 00000000000..21ec5275d42 --- /dev/null +++ b/products/maka/ios-shell/app/screens/chats/GoalSheet.tsx @@ -0,0 +1,643 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { + announce, + batch, + effect, + computed, + fontScale, + signal, + Text, + token, + View, + windowSize, + safeAreaInsets, + type ScrollRef, +} from 'nsh'; +import { AlertDialog, Input } from 'nsh/base'; +import type { AgentGoalDetail } from '../../bridge'; +import { trimHostWhitespace } from '../../hostText'; +import { currentLocale, formatCount, tr } from '../../locale'; +import { + canResumeWithBudget, + goalStatus, + parseGoalBudget, + terminalGoal, + type GoalController, +} from '../../state/goal'; +import { hapticSelection } from '../../state/preferences'; +import { spacing, type } from '../../theme/tokens'; +import { ActionButton } from '../../ui'; +import { ChatSheet } from './ChatSheet'; + +type Edit = + | { kind: 'create'; expected: AgentGoalDetail | null } + | { kind: 'budget' | 'resume'; expected: AgentGoalDetail }; + +const initialBudget = (edit: Edit | null) => + edit && edit.kind !== 'create' ? String(edit.expected.tokenBudget ?? '') : ''; + +export function GoalSheet(props: { goal: GoalController; onClose: () => void }) { + const goal = props.goal; + const edit = signal(null); + const submitting = signal(null); + const objective = signal(''); + const budget = signal(''); + const composing = signal(false); + const confirming = signal(false); + let scroll: ScrollRef | undefined; + const current = goal.current; + const form = computed( + () => edit() ?? (current() ? null : { kind: 'create', expected: null }), + ); + const creating = () => form()?.kind === 'create'; + const title = () => + creating() ? tr('New Goal') : form() ? tr('Token Budget') : tr('Goal Details'); + const finishingEdit = () => submitting() !== null && submitting() === edit(); + const busy = () => goal.busy() || finishingEdit() || confirming(); + const closeDisabled = () => confirming() || (goal.busy() && dirty()); + const disabled = () => !goal.writable() || busy(); + const dirty = () => + !!form() && (composing() || objective() !== '' || budget() !== initialBudget(form())); + const backToDetails = () => { + batch(() => { + composing.set(false); + objective.set(''); + budget.set(''); + edit.set(null); + }); + scroll?.scrollTo({ y: 0, animated: false }); + }; + const begin = (next: Edit) => { + hapticSelection(); + batch(() => { + goal.clearNotice(); + budget.set(initialBudget(next)); + edit.set(next); + }); + scroll?.scrollTo({ y: 0, animated: false }); + }; + const rejectEdit = async () => { + if (closeDisabled()) return; + if (dirty()) { + confirming.set(true); + try { + const { action } = await AlertDialog.show({ + title: tr('Discard goal edits?'), + actions: [ + { id: 'keep', label: tr('Keep Editing'), role: 'cancel' }, + { id: 'discard', label: tr('Discard Edits'), role: 'destructive' }, + ], + }); + if (action !== 'discard') return; + } finally { + confirming.set(false); + } + } + if (form() && current()) backToDetails(); + else props.onClose(); + }; + const cancelGoal = async () => { + const expected = current(); + if (!expected || disabled()) return; + confirming.set(true); + try { + const { action } = await AlertDialog.show({ + title: tr('Cancel this goal?'), + description: tr('The agent won’t start any more turns for this goal.'), + actions: [ + { id: 'keep', label: tr('Keep Goal'), role: 'cancel' }, + { id: 'cancel-goal', label: tr('Cancel Goal'), role: 'destructive' }, + ], + }); + if (action === 'cancel-goal') await goal.change({ action: 'cancel', expected }); + } finally { + confirming.set(false); + } + }; + + const parsed = () => parseGoalBudget(budget()); + const sameRecord = () => + form()?.expected?.id === current()?.id && form()?.expected?.revision === current()?.revision; + const valid = () => { + const editing = form(); + const value = parsed(); + return ( + editing && + value !== undefined && + sameRecord() && + (editing.kind !== 'create' || (!composing() && !!trimHostWhitespace(objective()))) && + (editing.kind !== 'resume' || canResumeWithBudget(current()!, value)) + ); + }; + const submit = async () => { + const editing = form(); + const tokenBudget = parsed(); + if (!editing || tokenBudget === undefined || !valid() || disabled()) return; + const command = + editing.kind === 'create' + ? { + action: 'create' as const, + expected: editing.expected, + objective: objective(), + tokenBudget, + } + : { + action: editing.kind === 'resume' ? ('resume' as const) : ('set_budget' as const), + expected: editing.expected, + tokenBudget, + }; + batch(() => { + edit.set(editing); + submitting.set(editing); + }); + try { + // The watch can settle the controller before this editor's readback finishes. + if ((await goal.change(command)) && edit() === editing) backToDetails(); + } finally { + if (submitting() === editing) submitting.set(null); + } + }; + + // Keep an in-progress create draft even if another device creates a Goal. + const pinEdit = () => { + if (!edit()) edit.set(form()); + }; + const editObjective = (value: string) => { + pinEdit(); + objective.set(value); + }; + const editBudget = (value: string) => { + pinEdit(); + budget.set(value); + }; + effect(() => { + const message = goal.notice(); + if (message) announce(message); + }); + const applyToCurrent = (action: 'complete' | 'dismiss' | 'pause' | 'resume') => { + const expected = current(); + if (expected && !disabled()) void goal.change({ action, expected }); + }; + const limited = () => current()?.status === 'budget_limited'; + const usageMissing = () => !!current()?.consumed.missing; + const done = () => current() !== null && terminalGoal(current()!); + const retryTime = () => { + const record = current(); + return record?.status === 'active' && record.retryAt && record.retryAt > Date.now() + ? new Date(record.retryAt).toLocaleString(currentLocale()) + : null; + }; + const firstNote = () => current()?.note || current()?.report?.note || ''; + const otherNote = () => { + const report = current()?.report?.note; + return report && report !== firstNote() ? report : ''; + }; + const remaining = () => { + const record = current()!; + if (record.tokenBudget == null) return tr('Unlimited'); + if (record.consumed.missing > 0) return tr('Unknown · Incomplete usage'); + return record.remainingTokens == null + ? tr('Unknown') + : tr('{count} tokens', { count: record.remainingTokens }); + }; + + return ( + (scroll = ref)} + ownHeader + detent={{ fraction: 0.9 }} + editing={dirty() || confirming()} + onClose={props.onClose} + > + + + + {title()} + + void rejectEdit()} + /> + + + + {tr('Last synced · Read-only')} + + + + + + + {tr('Goals are turned off on this computer.')} + + + {goal.notice()} + + + {tr('Updating goal…')} + + + + + { + if (active) pinEdit(); + composing.set(active); + }} + /> + + + + + {tr('Enter a positive whole number, or leave it blank for no limit.')} + + + + + {usageMissing() + ? tr('Usage is incomplete. To resume now, remove the limit.') + : tr('Set a limit above {count} tokens used, or leave it blank for no limit.', { + count: current()!.consumed.known, + })} + + + + + {tr( + 'The agent continues automatically in later turns. It checks the budget between turns, so the current turn may go over.', + )} + + + + {tr('The goal changed. Close the editor to review it.')} + + void submit()} + /> + + + + + + + {goalStatus(current()!.status)} + + + {current()!.objective} + + + {firstNote()} + + + {otherNote()} + + + {tr('Next attempt: {time}', { time: retryTime()! })} + + + + + + + {tr('Waiting for this turn to finish.')} + + begin({ kind: 'create', expected: current()! })} + /> + + + + {usageMissing() + ? tr('Usage is incomplete. To resume now, remove the limit.') + : tr( + 'Set a limit above {count} tokens used, or leave it blank for no limit.', + { count: current()!.consumed.known }, + )} + + begin({ kind: 'resume', expected: current()! })} + /> + } + > + + void goal.change({ + action: 'resume', + expected: current()!, + tokenBudget: null, + }) + } + /> + + + + + applyToCurrent(current()?.status === 'active' ? 'pause' : 'resume') + } + /> + + + + + + + + + + + + + + begin({ kind: 'budget', expected: current()! })} + /> + + + applyToCurrent('complete')} + /> + + + void cancelGoal()} + /> + + + applyToCurrent('dismiss')} + /> + + + + + + + + ); +} + +function GoalAction(props: { + id: string; + title: string; + disabled: boolean; + primary?: boolean; + destructive?: boolean; + onPress: () => void; +}) { + return ( + + ); +} + +function GoalField(props: { + label: string; + testID: string; + value: string; + readonly: boolean; + multiline?: boolean; + onChange: (text: string) => void; + onComposingChange?: (composing: boolean) => void; +}) { + return ( + + {props.label} + props.onChange(value)} + onCompositionChange={({ composing }) => props.onComposingChange?.(composing)} + style={{ + ...type.body, + minHeight: props.multiline ? spacing.rowMinHeight * 2 : spacing.rowMinHeight, + maxHeight: props.multiline ? spacing.rowMinHeight * 3 : undefined, + minWidth: spacing.rowMinHeight, + backgroundColor: token('surface'), + color: token('foreground'), + borderRadius: spacing.controlRadius, + paddingHorizontal: 12, + paddingVertical: 10, + }} + /> + + ); +} + +function GoalHint(props: { children?: string | null; alert?: boolean }) { + return ( + + {props.children} + + ); +} + +function GoalMetric(props: { label: string; value: string }) { + return ( + + {props.label} + + {props.value} + + + ); +} + +export function GoalContinuation(props: { objective: string }) { + const label = () => tr('Continuing goal: {objective}', { objective: props.objective }); + return ( + + {label()} + + ); +} + +export function ChatContextLabel(props: { subtitle: string; goal: AgentGoalDetail | null }) { + const insets = safeAreaInsets(); + const candidate = computed(() => { + const goal = props.goal; + return goal && !goal.dismissed ? props.subtitle + ' · ' + goalStatus(goal.status) : null; + }); + const width = () => + Math.max( + 0, + windowSize().width - + Math.max(spacing.pageX, insets().left) - + Math.max(spacing.pageX, insets().right) - + 33, // Pill padding, status dot and gap. + ); + const sample = computed(() => (candidate() ? JSON.stringify([candidate(), fontScale()]) : null)); + const measured = signal<{ key: string; width: number } | null>(null); + const fits = () => { + const size = measured(); + return size && size.key === sample() && Math.ceil(size.width) <= width(); + }; + return ( + <> + key}> + {(key) => ( + // Measure before wrapping or truncating; a clipped line can report + // the available width even when its full label does not fit. + { + if (key() === sample()) measured.set({ key: key(), width: bounds.size.width }); + }} + > + {candidate()} + + )} + + + {fits() ? candidate() : props.subtitle} + + + ); +} diff --git a/products/maka/ios-shell/app/state/chat.ts b/products/maka/ios-shell/app/state/chat.ts index 6cc9c2477f3..43a38182cba 100644 --- a/products/maka/ios-shell/app/state/chat.ts +++ b/products/maka/ios-shell/app/state/chat.ts @@ -18,6 +18,7 @@ */ import { approvalOutcome, approvalRejectionError } from '../approval'; +import { trimHostWhitespace } from '../hostText'; import { batch, cleanup, computed, effect, signal, untracked } from 'nsh'; import { hostMutate, @@ -54,6 +55,7 @@ import { } from '../bridge'; import { LivePreviewAccumulator, type LivePreviewSnapshot } from '../streaming'; import { activeHostInfo, hostById, showToast } from './hostPool'; +import { createGoalController } from './goal'; import { dismissInboxRequest, refreshHostInbox } from './inbox'; import { hapticNotification, hapticSelection } from './preferences'; import { listHostModels, refreshHostSessions } from './sessions'; @@ -449,11 +451,6 @@ function sessionInvocation({ id, title }: DraftLink): string { return `[@${label}](maka://session/${id})`; } -// Rust str::trim uses Unicode White_Space, not JavaScript's trim set. -export function trimHostWhitespace(text: string): string { - return text.replace(/^\p{White_Space}+|\p{White_Space}+$/gu, ''); -} - export function draftQuote( sourceKey: string, reference: QuoteRef, @@ -848,7 +845,10 @@ export function createConversationController( const visibleQueue = computed( () => queue()?.entries.filter( - (entry) => entry.kind !== 'in_flight' && entry.origin?.kind !== 'session_completion', + (entry) => + entry.kind !== 'in_flight' && + entry.origin?.kind !== 'session_completion' && + entry.origin?.kind !== 'goal', ) ?? [], ); const queuedMessages = computed(() => @@ -2411,7 +2411,38 @@ export function createConversationController( stopWatch(); }); + const goal = createGoalController({ + rootId, + sessionId, + active: () => enabled && !isRoom() && active(), + approval: async (connection) => { + const selection = selectingModel(); + if (selection && !(await selection.done)) return null; + if (!observation()) await loadObserve(false); + const observed = observation(); + if (!isCurrent(connection.generation) || !observed || observed.session.kind === 'room') + return null; + const { id, workspace, permissions, boundaryRevision, binding } = observed.session; + if (id !== sessionId || !workspace || !permissions || boundaryRevision == null || !binding) + return null; + const selectionAtApproval = selectedBackend(); + const backend = await sendBackend(rootId, connection, selectionAtApproval); + const selected = selectedBackend(); + if ( + !isCurrent(connection.generation) || + observation()?.session.revision !== observed.session.revision || + JSON.stringify(selected) !== JSON.stringify(selectionAtApproval) + ) + return null; + return { + target: { sessionId, workspace, permissions, boundaryRevision, binding }, + backend, + }; + }, + }); + return { + goal, observation, lastObservation, refreshDetails, diff --git a/products/maka/ios-shell/app/state/goal.ts b/products/maka/ios-shell/app/state/goal.ts new file mode 100644 index 00000000000..9cdbcd2f775 --- /dev/null +++ b/products/maka/ios-shell/app/state/goal.ts @@ -0,0 +1,338 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { batch, cleanup, computed, effect, lifecycle, signal } from 'nsh'; +import { + goalHost, + MutationNotSubmitted, + type ActiveHostInfo, + type AgentGoalApproval, + type AgentGoalChange, + type AgentGoalDetail, + type AgentGoalView, + type GoalControl, + type GoalStatus, +} from '../bridge'; +import { trimHostWhitespace } from '../hostText'; +import { tr, type MessageKey } from '../locale'; +import { activeHostInfo } from './hostPool'; +import { hapticNotification } from './preferences'; + +const statusKeys = { + armed: 'Goal Ready', + active: 'Goal in Progress', + paused: 'Goal Paused', + blocked: 'Goal Blocked', + budget_limited: 'Goal Budget Limited', + achieved: 'Goal Achieved', + cancelled: 'Goal Cancelled', +} satisfies Record; + +export const goalStatus = (status: GoalStatus) => tr(statusKeys[status]); +export const terminalGoal = (goal: AgentGoalDetail) => + goal.status === 'achieved' || goal.status === 'cancelled'; + +export function parseGoalBudget(raw: string): number | null | undefined { + const text = raw.trim(); + if (!text) return null; + const value = Number(text); + return /^[0-9]+$/.test(text) && Number.isSafeInteger(value) && value > 0 ? value : undefined; +} + +export function canResumeWithBudget(goal: AgentGoalDetail, budget: number | null) { + return budget === null || (goal.consumed.missing === 0 && budget > goal.consumed.known); +} + +type GoalCommand = + | { + action: 'create'; + expected: AgentGoalDetail | null; + objective: string; + tokenBudget: number | null; + } + | { + action: Exclude; + expected: AgentGoalDetail; + tokenBudget?: number | null; + } + | { action: 'set_budget'; expected: AgentGoalDetail; tokenBudget: number | null }; + +function allowed(command: GoalCommand, goal: AgentGoalDetail | null): boolean { + if (command.action === 'create') { + return ( + (!goal || (terminalGoal(goal) && !goal.pending)) && !!trimHostWhitespace(command.objective) + ); + } + if (!goal) return false; + switch (command.action) { + case 'pause': + return goal.status === 'active'; + case 'resume': + return goal.status === 'budget_limited' + ? command.tokenBudget !== undefined && canResumeWithBudget(goal, command.tokenBudget) + : goal.status === 'armed' || goal.status === 'paused' || goal.status === 'blocked'; + case 'complete': + return !terminalGoal(goal) && !goal.pending; + case 'cancel': + return !terminalGoal(goal); + case 'set_budget': + return !terminalGoal(goal) && goal.status !== 'budget_limited'; + case 'dismiss': + return terminalGoal(goal) && !goal.pending && !goal.dismissed; + } +} + +function goalRejection(reason: string) { + switch (reason) { + case 'goal_current_unfinished': + return tr('Finish or cancel the current goal first.'); + case 'goal_disabled': + return tr('Goals are turned off on this computer.'); + case 'goal_status_tool_unavailable': + return tr('Enable Goal tools for this chat to start or resume a goal.'); + case 'scheduler_authorization_changed': + case 'goal_authorization_changed': + return tr('Chat settings changed. Review them and try again.'); + default: + return tr('The computer rejected the goal change: {reason}', { reason }); + } +} + +const changed = () => tr('The goal changed. Review it and try again.'); + +export type GoalController = ReturnType; + +export function createGoalController(options: { + rootId: string; + sessionId: string; + active: () => boolean; + approval: (connection: ActiveHostInfo) => Promise; +}) { + const { rootId, sessionId } = options; + const input = { sessionId }; + const connection = () => activeHostInfo(rootId); + const generation = computed(() => { + const conn = connection(); + return options.active() && lifecycle() === 'active' && conn?.endpoints.includes('agent') + ? conn.generation + : undefined; + }); + const snapshot = signal<{ generation: number; view: AgentGoalView } | null>(null); + const watchState = signal<'waiting' | 'live' | 'ended'>('waiting'); + const restartWatch = signal(0); + const notice = signal(null); + const operation = signal<{ generation: number; through?: number } | null>(null); + const view = () => snapshot()?.view ?? null; + const current = () => view()?.current ?? null; + const synced = () => + watchState() === 'live' && + generation() !== undefined && + snapshot()?.generation === generation(); + const busy = () => { + const pending = operation(); + return ( + pending !== null && + (pending.through === undefined || + (snapshot()?.generation === pending.generation && + (current()?.revision ?? 0) < pending.through)) + ); + }; + const canReconnect = () => generation() !== undefined && watchState() === 'ended'; + const reconnectWatch = () => { + if (canReconnect()) restartWatch.update((n) => n + 1); + }; + const writable = () => synced() && view()?.enabled === true; + const hasRecord = computed(() => !!current()); + const showEntry = computed(() => hasRecord() || writable()); + let alive = true; + let watchEpoch = 0; + cleanup(() => { + alive = false; + }); + + function apply(gen: number, value: AgentGoalView) { + const prev = snapshot(); + if ( + prev?.generation === gen && + (value.current?.revision ?? 0) < (prev.view.current?.revision ?? 0) + ) + return false; + snapshot.set({ generation: gen, view: value }); + return true; + } + + effect(() => { + const gen = generation(); + restartWatch(); + const epoch = ++watchEpoch; + watchState.set('waiting'); + if (gen === undefined) return; + const valid = () => alive && epoch === watchEpoch && gen === generation(); + const stop = goalHost.watch( + rootId, + gen, + input, + (value) => { + if (!valid()) return; + batch(() => { + if (apply(gen, value)) watchState.set('live'); + }); + }, + (cause) => { + if (!valid()) return; + console.warn('Could not watch goal', cause); + watchState.set('ended'); + }, + ); + cleanup(stop); + }); + + async function refresh(gen: number) { + const epoch = watchEpoch; + const before = snapshot(); + try { + const value = await goalHost.read(rootId, gen, input); + if (!alive || gen !== generation() || epoch !== watchEpoch) return; + const latest = snapshot(); + // A query that raced a watch update cannot replace equally revised live usage. + if ( + latest !== before && + latest?.generation === gen && + (value.current?.revision ?? 0) <= (latest.view.current?.revision ?? 0) + ) + return; + apply(gen, value); + } catch (cause) { + console.warn('Could not read goal', cause); + if (alive && gen === generation() && epoch === watchEpoch && !notice()) + notice.set(tr('Could not refresh the goal.')); + } + } + + async function change(command: GoalCommand): Promise { + const conn = connection(); + if (!conn || !writable() || busy()) return false; + const { generation: gen } = conn; + const epoch = watchEpoch; + const canSubmit = () => { + const goal = current(); + return ( + alive && + watchEpoch === epoch && + generation() === gen && + writable() && + command.expected?.id === goal?.id && + command.expected?.revision === goal?.revision && + allowed(command, goal) + ); + }; + if (!canSubmit()) { + notice.set(changed()); + return false; + } + + const flight = { generation: gen }; + operation.set(flight); + notice.set(null); + let submitted = false; + try { + const needsApproval = + command.action === 'create' || (command.action === 'resume' && !command.expected.pending); + const approval = needsApproval ? await options.approval(conn) : null; + if (needsApproval && !approval) { + if (alive) + notice.set(tr('Could not verify this chat’s settings. Review them and try again.')); + return false; + } + if (!canSubmit()) { + if (alive) notice.set(changed()); + return false; + } + const request: AgentGoalChange = + command.action === 'create' + ? { + kind: 'create', + sessionId, + objective: trimHostWhitespace(command.objective), + tokenBudget: command.tokenBudget, + start: true, + approval: approval!, + } + : { + kind: 'control', + sessionId, + goalId: command.expected.id, + revision: command.expected.revision, + action: command.action, + ...(command.tokenBudget !== undefined + ? { budget: { tokenBudget: command.tokenBudget } } + : {}), + ...(approval ? { approval } : {}), + }; + submitted = true; + const result = await goalHost.change(rootId, gen, request); + if (!alive) return false; + if (result.kind === 'committed') { + hapticNotification('success'); + if (generation() === gen && (current()?.revision ?? 0) < result.revision) + operation.set({ generation: gen, through: result.revision }); + if (generation() === gen) await refresh(gen); + return true; + } + notice.set(result.kind === 'conflict' ? changed() : goalRejection(result.reason)); + hapticNotification('warning'); + if (generation() === gen) await refresh(gen); + return false; + } catch (cause) { + if (!alive) return false; + console.warn('Could not change goal', cause); + if (!submitted || cause instanceof MutationNotSubmitted) { + notice.set(cause instanceof Error ? cause.message : tr('Could not update the goal.')); + } else { + notice.set(tr('Could not confirm the goal change. Check its status before trying again.')); + if (generation() === gen) await refresh(gen); + } + hapticNotification('warning'); + return false; + } finally { + if (alive && operation() === flight) operation.set(null); + } + } + + return { + view, + current, + synced, + canReconnect, + reconnectWatch, + busy, + writable, + hasRecord, + showEntry, + notice, + change, + clearNotice: () => notice.set(null), + refresh: () => { + const gen = generation(); + if (gen === undefined) return; + if (canReconnect()) reconnectWatch(); + else if (showEntry()) return refresh(gen); + }, + }; +} diff --git a/products/maka/ios-shell/app/state/sideQuestions.ts b/products/maka/ios-shell/app/state/sideQuestions.ts index 39f682b1492..a6370ee9ce6 100644 --- a/products/maka/ios-shell/app/state/sideQuestions.ts +++ b/products/maka/ios-shell/app/state/sideQuestions.ts @@ -17,6 +17,7 @@ * under the License. */ +import { trimHostWhitespace } from '../hostText'; import { effect, signal, untracked } from 'nsh'; import { hostMutate, @@ -27,7 +28,7 @@ import { type AgentSession, } from '../bridge'; import { tr } from '../locale'; -import { compareHistoryRows, trimHostWhitespace, type DraftQuote, type SideAnchor } from './chat'; +import { compareHistoryRows, type DraftQuote, type SideAnchor } from './chat'; import { activeHostInfo } from './hostPool'; import type { ScopedSession, watchSideQuestions } from './sessions'; diff --git a/products/maka/ios-shell/app/theme/tokens.ts b/products/maka/ios-shell/app/theme/tokens.ts index df9f9f13367..17719b0715a 100644 --- a/products/maka/ios-shell/app/theme/tokens.ts +++ b/products/maka/ios-shell/app/theme/tokens.ts @@ -45,8 +45,10 @@ const light = { 'glass-foreground': '#171719', 'glass-muted': '#4F4F57', 'glass-accent': '#0059B8', + 'glass-primary-fg': '#FFFFFF', 'glass-primary-pressed-bg': '#004B9C', 'glass-destructive': '#9C3040', + 'glass-destructive-pressed-bg': '#F4DFE3', 'glass-action-bg': '#E0ECFA', 'glass-action-pressed-bg': '#C9DCF3', primary: '#007AFF', @@ -114,8 +116,10 @@ export function installTheme() { 'glass-foreground': '#FAFAFC', 'glass-muted': '#C8C8D0', 'glass-accent': '#8DC8FF', + 'glass-primary-fg': '#171719', 'glass-primary-pressed-bg': '#70B3F4', 'glass-destructive': '#E99A9B', + 'glass-destructive-pressed-bg': '#482B34', 'glass-action-bg': '#273B51', 'glass-action-pressed-bg': '#354C65', primary: '#0A84FF', @@ -154,6 +158,7 @@ export function installTheme() { export const spacing = { pageX: 16, sectionGap: 24, + panelRadius: 24, groupRadius: 12, controlRadius: 12, pillRadius: 999, diff --git a/products/maka/ios-shell/app/ui/ActionButton.tsx b/products/maka/ios-shell/app/ui/ActionButton.tsx index 3cc28f4fcd4..275c5a98d46 100644 --- a/products/maka/ios-shell/app/ui/ActionButton.tsx +++ b/products/maka/ios-shell/app/ui/ActionButton.tsx @@ -25,6 +25,8 @@ import { Icon, type IconName } from './Icon'; export type ButtonVariant = | 'primary' | 'secondary' + | 'glassPrimary' + | 'glassDestructive' | 'glassSecondary' | 'glassQuiet' | 'quiet' @@ -44,7 +46,15 @@ export function ActionButton(props: { }) { const variant = () => props.variant ?? 'primary'; const compact = () => !!props.compact; - const glass = () => variant() === 'glassSecondary' || variant() === 'glassQuiet'; + const glass = () => variant().startsWith('glass'); + const pressedColor = () => + token( + variant() === 'glassPrimary' + ? 'glass-primary-pressed-bg' + : variant() === 'glassDestructive' + ? 'glass-destructive-pressed-bg' + : 'glass-action-pressed-bg', + ); const backgroundColor = () => { switch (variant()) { @@ -52,8 +62,11 @@ export function ActionButton(props: { return token('primary'); case 'secondary': return token('primary-tint'); + case 'glassPrimary': + return token('glass-accent'); case 'glassSecondary': return token('glass-action-bg'); + case 'glassDestructive': case 'glassQuiet': return token('surface-elevated'); case 'destructive': @@ -73,6 +86,10 @@ export function ActionButton(props: { case 'secondary': case 'quiet': return token('primary'); + case 'glassPrimary': + return token('glass-primary-fg'); + case 'glassDestructive': + return token('glass-destructive'); case 'glassSecondary': case 'glassQuiet': return token('glass-accent'); @@ -92,9 +109,11 @@ export function ActionButton(props: { ? 'disabled:opacity-45' : 'active:opacity-70 transition-opacity duration-150 disabled:opacity-45' } - activeStyle={glass() ? { backgroundColor: token('glass-action-pressed-bg') } : undefined} + activeStyle={glass() ? { backgroundColor: pressedColor() } : undefined} style={{ minHeight: props.minHeight ?? (compact() ? 40 : spacing.buttonMinHeight), + minWidth: props.minHeight, + maxWidth: '100%', paddingHorizontal: compact() ? 14 : 18, paddingVertical: compact() ? 9 : 13, borderRadius: spacing.controlRadius, @@ -115,6 +134,7 @@ export function ActionButton(props: { fontWeight: variant() === 'quiet' || variant() === 'glassQuiet' ? '500' : '600', color: foregroundColor(), textAlign: 'center', + flexShrink: 1, }} > {props.title} diff --git a/products/maka/ios-shell/locales/de.json b/products/maka/ios-shell/locales/de.json index b433c9d03d1..5eb95118069 100644 --- a/products/maka/ios-shell/locales/de.json +++ b/products/maka/ios-shell/locales/de.json @@ -15,6 +15,7 @@ "Add to queue": "Zur Warteschlange", "Add to quotes": "Zu Zitaten hinzufügen", "Additional permissions requested": "Zusätzliche Berechtigungen angefordert", + "Adjust Budget & Resume": "Budget ändern und fortsetzen", "Advanced options": "Erweiterte Optionen", "Agent": "Agent", "All": "Alle", @@ -46,6 +47,7 @@ "Arguments": "Argumente", "Ask Side Question": "Nebenfrage stellen", "Assistant language": "Sprache des Assistenten", + "At least {count} tokens": "Mindestens {count} Token", "Authentication": "Authentifizierung", "Authentication field name": "Name des Authentifizierungsfelds", "Authentication location": "Position der Authentifizierung", @@ -65,9 +67,13 @@ "Camera could not start.": "Kamera konnte nicht gestartet werden.", "Camera unavailable on this device": "Kamera auf diesem Gerät nicht verfügbar", "Cancel": "Abbrechen", + "Cancel Editing": "Bearbeiten abbrechen", + "Cancel Goal": "Ziel abbrechen", + "Cancel this goal?": "Dieses Ziel abbrechen?", "Changes": "Änderungen", "Changes ({count})": "Änderungen ({count})", "Chat": "Chat", + "Chat settings changed. Review them and try again.": "Die Chat-Einstellungen wurden geändert. Prüfe sie und versuch es erneut.", "Chats": "Chats", "Check connection": "Verbindung prüfen", "Checking pairing invite…": "Kopplungseinladung wird geprüft…", @@ -120,6 +126,7 @@ "Continue only if this code matches the one displayed on your computer.": "Fahre nur fort, wenn dieser Code mit dem auf deinem Computer angezeigten übereinstimmt.", "Continue reply": "Antwort fortsetzen", "Continue your work from any computer": "Arbeite von jedem Computer aus weiter", + "Continuing goal: {objective}": "Ziel wird fortgesetzt: {objective}", "Continuing reply…": "Antwort wird fortgesetzt…", "Conversation title": "Titel der Unterhaltung", "Conversation: {title}": "Unterhaltung: {title}", @@ -130,6 +137,7 @@ "Copy edit": "Bearbeitung kopieren", "Copy reply": "Antwort kopieren", "Could not change the model.": "Modell konnte nicht gewechselt werden.", + "Could not confirm the goal change. Check its status before trying again.": "Die Änderung konnte nicht bestätigt werden. Prüfe den Zielstatus, bevor du es erneut versuchst.", "Could not confirm whether the message was sent. Check the conversation or queue before retrying.": "Es ist unklar, ob die Nachricht gesendet wurde. Prüfe vor einem erneuten Versuch den Chatverlauf oder die Warteschlange.", "Could not continue the reply. Try again.": "Die Antwort konnte nicht fortgesetzt werden. Versuch es erneut.", "Could not copy the edit.": "Die Bearbeitung konnte nicht kopiert werden.", @@ -143,6 +151,7 @@ "Could not read or update settings.": "Einstellungen konnten nicht gelesen oder aktualisiert werden.", "Could not read the queued message.": "Die Nachricht in der Warteschlange konnte nicht gelesen werden.", "Could not read the skill source.": "Die Quelle der Fähigkeit konnte nicht gelesen werden.", + "Could not refresh the goal.": "Das Ziel konnte nicht neu geladen werden.", "Could not remove the MCP server.": "MCP-Server konnte nicht entfernt werden.", "Could not save the MCP server.": "MCP-Server konnte nicht gespeichert werden.", "Could not save the credential.": "Anmeldedaten konnten nicht gespeichert werden.", @@ -153,7 +162,9 @@ "Could not sync Pending": "Ausstehende Anfragen konnten nicht synchronisiert werden", "Could not sync chats": "Chats konnten nicht synchronisiert werden", "Could not update the conversation.": "Unterhaltung konnte nicht aktualisiert werden.", + "Could not update the goal.": "Das Ziel konnte nicht geändert werden.", "Could not update the message queue.": "Nachrichtenwarteschlange konnte nicht aktualisiert werden.", + "Could not verify this chat’s settings. Review them and try again.": "Die Chat-Einstellungen konnten nicht überprüft werden. Prüfe sie und versuch es erneut.", "Create Room": "Raum erstellen", "Create Room on {name}": "Raum auf {name} erstellen", "Creating…": "Wird erstellt…", @@ -189,16 +200,22 @@ "Disabled": "Deaktiviert", "Disabled servers": "Deaktivierte Server", "Discard": "Verwerfen", + "Discard Edits": "Änderungen verwerfen", "Discard changes?": "Änderungen verwerfen?", + "Discard goal edits?": "Zieländerungen verwerfen?", "Disconnect": "Verbindung trennen", "Discover models": "Modelle suchen", "Discovering models…": "Modelle werden gesucht…", "Dismiss": "Schließen", + "Dismiss Goal Summary": "Zielübersicht ausblenden", "Dismiss keyboard": "Tastatur ausblenden", "Done": "Fertig", "Edit": "Bearbeiten", + "Edit Budget": "Budget ändern", "Edit queued message": "Warteschlangennachricht bearbeiten", + "Elapsed": "Verstrichen", "Enable": "Aktivieren", + "Enable Goal tools for this chat to start or resume a goal.": "Aktiviere die Zielwerkzeuge in diesem Chat, um ein Ziel zu starten oder fortzusetzen.", "Enable proxy": "Proxy aktivieren", "Enable the parent plugin first.": "Aktivieren Sie zuerst das übergeordnete Plugin.", "Enable web search": "Websuche aktivieren", @@ -208,6 +225,7 @@ "Enter a JSON object.": "Gib ein JSON-Objekt ein.", "Enter a connection name.": "Geben Sie einen Verbindungsnamen ein.", "Enter a name and select a model.": "Gib einen Namen ein und wähle ein Modell.", + "Enter a positive whole number, or leave it blank for no limit.": "Gib eine positive ganze Zahl ein oder lass das Feld frei, um kein Limit zu setzen.", "Enter a proxy host and a port from 1 to 65535.": "Gib einen Proxy-Host und einen Port zwischen 1 und 65535 ein.", "Enter a proxy password.": "Gib ein Proxy-Passwort ein.", "Enter a public HTTPS URL.": "Gib eine öffentliche HTTPS-URL ein.", @@ -221,6 +239,7 @@ "Files & Changes": "Dateien & Änderungen", "Filesystem: no additional access": "Dateisystem: kein zusätzlicher Zugriff", "Find skills": "Fähigkeiten suchen", + "Finish or cancel the current goal first.": "Schließe das aktuelle Ziel zuerst ab oder brich es ab.", "Flash": "Licht", "Flash On": "Licht an", "Folder is empty": "Ordner ist leer", @@ -229,6 +248,16 @@ "Full access": "Vollzugriff", "General": "Allgemein", "Global": "Global", + "Goal Achieved": "Ziel erreicht", + "Goal Blocked": "Ziel blockiert", + "Goal Budget Limited": "Zielbudget begrenzt", + "Goal Cancelled": "Ziel abgebrochen", + "Goal Details": "Zieldetails", + "Goal Details…": "Zieldetails …", + "Goal Paused": "Ziel pausiert", + "Goal Ready": "Ziel bereit", + "Goal in Progress": "Ziel läuft", + "Goals are turned off on this computer.": "Ziele sind auf diesem Computer deaktiviert.", "HTTP header": "HTTP-Header", "HTTP headers": "HTTP-Header", "HTTP method": "HTTP-Methode", @@ -251,10 +280,13 @@ "Invalid API key": "Ungültiger API-Schlüssel", "Invalid stored language preference.": "Die gespeicherte Spracheinstellung ist ungültig.", "JSON body": "JSON-Body", + "Keep Editing": "Weiter bearbeiten", + "Keep Goal": "Ziel behalten", "Keep my edit": "Meine Bearbeitung behalten", "Language": "Sprache", "Last request": "Letzte Anfrage", "Last synced": "Zuletzt synchronisiert", + "Last synced · Read-only": "Stand der letzten Synchronisierung · Nur lesen", "Latest": "Aktuell", "Leave blank for automatic title": "Für automatischen Titel leer lassen", "Light": "Hell", @@ -266,6 +298,7 @@ "Low": "Niedrig", "MCP": "MCP", "Maka is shutting down. Try again after it restarts.": "Maka wird beendet. Versuch es nach dem Neustart erneut.", + "Mark Complete": "Als erreicht markieren", "Max output tokens": "Maximale Ausgabetokens", "Maximum": "Maximal", "Medium": "Mittel", @@ -290,7 +323,10 @@ "Network: no access": "Netzwerk: kein Zugriff", "Network: no destinations": "Netzwerk: keine Ziele", "New Chat": "Neuer Chat", + "New Goal": "Neues Ziel", + "New Goal…": "Neues Ziel …", "New Room": "Neuer Raum", + "Next attempt: {time}": "Nächster Versuch: {time}", "No MCP servers": "Keine MCP-Server", "No approvals or questions are waiting across your connected computers.": "Auf deinen verbundenen Computern stehen keine Freigaben oder Fragen aus.", "No approvals or questions are waiting.": "Keine Freigaben oder Fragen stehen aus.", @@ -309,6 +345,7 @@ "Not measured": "Nicht gemessen", "Not sent. Choose a workspace, then retry.": "Nicht gesendet. Wähle einen Arbeitsbereich aus und versuche es erneut.", "Now": "Jetzt", + "Objective": "Zielsetzung", "Off": "Aus", "Offline": "Offline", "Open Conversation": "Unterhaltung öffnen", @@ -332,6 +369,7 @@ "Paste pairing link": "Kopplungslink einfügen", "Paste pairing link or connect manually": "Link einfügen oder manuell verbinden", "Paste relay token": "Relay-Token einfügen", + "Pause Goal": "Ziel pausieren", "Pending": "Ausstehend", "Permission": "Berechtigung", "Permission requests are disabled": "Berechtigungsanfragen sind deaktiviert", @@ -383,8 +421,10 @@ "Relay URL (optional)": "Relay-URL (optional)", "Relay · {latency} ms": "Über Relay · {latency} ms", "Relays": "Relay-Server", + "Remaining": "Verbleibend", "Remove": "Entfernen", "Remove Computer": "Computer entfernen", + "Remove Limit & Resume": "Limit entfernen und fortsetzen", "Remove connection": "Verbindung entfernen", "Remove conversation link: {title}": "Unterhaltungslink entfernen: {title}", "Remove queued message": "Aus Warteschlange entfernen", @@ -407,6 +447,7 @@ "Result snippet path (optional)": "Pfad zum Ergebnisausschnitt (optional)", "Result title path (optional)": "Pfad zum Ergebnistitel (optional)", "Results array path": "Pfad zum Ergebnis-Array", + "Resume Goal": "Ziel fortsetzen", "Retry": "Erneut versuchen", "Retry now": "Jetzt erneut versuchen", "Review latest": "Aktuelle Version prüfen", @@ -421,6 +462,7 @@ "Running {count, plural, one {# tool} other {# tools}}…": "{count, plural, one {# Tool läuft} other {# Tools laufen}}…", "Save": "Sichern", "Save API key": "API-Schlüssel speichern", + "Save Budget": "Budget speichern", "Save usage credential": "Zugangsdaten für Nutzungsdaten speichern", "Save your provider settings before changing its API key.": "Speichere zuerst die Anbietereinstellungen, bevor du den API-Schlüssel änderst.", "Saved Host relay Bearer token": "Gespeichertes Relay-Bearer-Token des Hosts", @@ -445,6 +487,7 @@ "Sending…": "Wird gesendet…", "Server-side compaction": "Serverseitige Komprimierung", "Service": "Dienst", + "Set a limit above {count} tokens used, or leave it blank for no limit.": "Setze das Limit über die verbrauchten {count} Token oder lass das Feld für kein Limit frei.", "Settings": "Einstellungen", "Shadowed": "Überlagert", "Show": "Anzeigen", @@ -460,6 +503,7 @@ "Source unavailable": "Quelle nicht verfügbar", "Start Chat": "Chat starten", "Start Chat on {name}": "Chat auf {name} starten", + "Start Goal": "Ziel starten", "Start a conversation on any connected computer and it will appear here automatically.": "Starte eine Unterhaltung auf einem verbundenen Computer, damit sie automatisch hier erscheint.", "Status": "Status", "Steer now": "Jetzt lenken", @@ -480,8 +524,13 @@ "Team ID": "Team-ID", "Test connection": "Verbindung testen", "The active turn changed. Your message is kept.": "Der aktive Lauf hat sich geändert. Deine Nachricht bleibt erhalten.", + "The agent continues automatically in later turns. It checks the budget between turns, so the current turn may go over.": "Der Agent arbeitet in weiteren Runden automatisch weiter. Er prüft das Budget zwischen den Runden; die laufende Runde kann es überschreiten.", + "The agent won’t start any more turns for this goal.": "Der Agent startet keine weiteren Runden für dieses Ziel.", + "The computer rejected the goal change: {reason}": "Der Computer hat die Zieländerung abgelehnt: {reason}", "The conversation changed. Send a new message instead.": "Das Gespräch hat sich geändert. Sende stattdessen eine neue Nachricht.", "The deployment document is invalid.": "Das Bereitstellungsdokument ist ungültig.", + "The goal changed. Close the editor to review it.": "Das Ziel wurde geändert. Schließe den Editor, um es zu prüfen.", + "The goal changed. Review it and try again.": "Das Ziel wurde geändert. Prüfe es und versuch es erneut.", "The main conversation is no longer available.": "Die Hauptunterhaltung ist nicht mehr verfügbar.", "The plugin bundle could not be downloaded.": "Das Plugin-Paket konnte nicht heruntergeladen werden.", "The plugin bundle is invalid.": "Das Plugin-Paket ist ungültig.", @@ -519,6 +568,8 @@ "Thought process": "Gedankengang", "Thought process · {count, plural, one {# tool} other {# tools}}": "Gedankengang · {count, plural, one {# Tool} other {# Tools}}", "Title (optional)": "Titel (optional)", + "Token Budget": "Token-Budget", + "Token Budget (Optional)": "Token-Budget (optional)", "Token limits": "Tokenlimits", "Token limits must be positive whole numbers.": "Tokenlimits müssen positive ganze Zahlen sein.", "Tool call": "Tool-Aufruf", @@ -529,18 +580,25 @@ "Try a different search term or switch the computer filter.": "Versuche einen anderen Suchbegriff oder wechsle den Computerfilter.", "Turn off flashlight": "Taschenlampe ausschalten", "Turn on flashlight": "Taschenlampe einschalten", + "Turns": "Runden", "URL parameters": "URL-Parameter", "URL query": "URL-Abfrage", "Ultra": "Extrem", "Unavailable": "Nicht verfügbar", + "Unknown": "Unbekannt", + "Unknown · Incomplete usage": "Unbekannt · Verbrauchsdaten unvollständig", + "Unlimited": "Unbegrenzt", "Unpin": "Lösen", "Update": "Aktualisieren", + "Updating goal…": "Ziel wird aktualisiert …", "Usage": "Nutzung", "Usage & Details": "Nutzung & Details", "Usage credential": "Zugangsdaten für Nutzungsdaten", + "Usage is incomplete. To resume now, remove the limit.": "Die Verbrauchsdaten sind unvollständig. Entferne das Limit, um jetzt fortzufahren.", "Use Host default": "Host-Standard verwenden", "Use a URL without credentials.": "Verwende eine URL ohne Zugangsdaten.", "Use an HTTP URL without credentials or query parameters. Use environment references or edit on Desktop.": "Verwende eine HTTP-URL ohne Zugangsdaten oder Abfrageparameter. Nutze Umgebungsreferenzen oder bearbeite die Einstellungen am Desktop.", + "Used": "Verbraucht", "Used {count, plural, one {# tool} other {# tools}}": "{count, plural, one {# Tool verwendet} other {# Tools verwendet}}", "User action required": "Benutzeraktion erforderlich", "Username": "Benutzername", @@ -552,6 +610,7 @@ "Waiting for current turn": "Wartet auf aktuellen Durchlauf", "Waiting for provider sign-in…": "Warte auf Anmeldung beim Anbieter…", "Waiting for queue…": "Warte auf die Warteschlange …", + "Waiting for this turn to finish.": "Warten auf das Ende der laufenden Runde.", "Waiting for your response": "Wartet auf deine Antwort", "Web Search": "Websuche", "WebSocket": "WebSocket", @@ -573,6 +632,8 @@ "{count, plural, one {# message queued} other {# messages queued}}": "{count, plural, one {# Nachricht in Warteschlange} other {# Nachrichten in Warteschlange}}", "{count, plural, one {# quote} other {# quotes}}": "{count, plural, one {# Zitat} other {# Zitate}}", "{count} queued": "{count} in der Warteschlange", + "{count} s": "{count} s", + "{count} tokens": "{count} Token", "{count}d": "{count} T.", "{count}h": "{count} Std.", "{count}m": "{count} Min.", diff --git a/products/maka/ios-shell/locales/en.json b/products/maka/ios-shell/locales/en.json index 2e628589180..c852c31ae52 100644 --- a/products/maka/ios-shell/locales/en.json +++ b/products/maka/ios-shell/locales/en.json @@ -15,6 +15,7 @@ "Add to queue": "Add to queue", "Add to quotes": "Add to quotes", "Additional permissions requested": "Additional permissions requested", + "Adjust Budget & Resume": "Adjust Budget & Resume", "Advanced options": "Advanced options", "Agent": "Agent", "All": "All", @@ -46,6 +47,7 @@ "Arguments": "Arguments", "Ask Side Question": "Ask Side Question", "Assistant language": "Assistant language", + "At least {count} tokens": "At least {count} tokens", "Authentication": "Authentication", "Authentication field name": "Authentication field name", "Authentication location": "Authentication location", @@ -65,9 +67,13 @@ "Camera could not start.": "Camera could not start.", "Camera unavailable on this device": "Camera unavailable on this device", "Cancel": "Cancel", + "Cancel Editing": "Cancel Editing", + "Cancel Goal": "Cancel Goal", + "Cancel this goal?": "Cancel this goal?", "Changes": "Changes", "Changes ({count})": "Changes ({count})", "Chat": "Chat", + "Chat settings changed. Review them and try again.": "Chat settings changed. Review them and try again.", "Chats": "Chats", "Check connection": "Check connection", "Checking pairing invite…": "Checking pairing invite…", @@ -120,6 +126,7 @@ "Continue only if this code matches the one displayed on your computer.": "Continue only if this code matches the one displayed on your computer.", "Continue reply": "Continue reply", "Continue your work from any computer": "Continue your work from any computer", + "Continuing goal: {objective}": "Continuing goal: {objective}", "Continuing reply…": "Continuing reply…", "Conversation title": "Conversation title", "Conversation: {title}": "Conversation: {title}", @@ -130,6 +137,7 @@ "Copy edit": "Copy edit", "Copy reply": "Copy reply", "Could not change the model.": "Could not change the model.", + "Could not confirm the goal change. Check its status before trying again.": "Could not confirm the goal change. Check its status before trying again.", "Could not confirm whether the message was sent. Check the conversation or queue before retrying.": "Could not confirm whether the message was sent. Check the conversation or queue before retrying.", "Could not continue the reply. Try again.": "Could not continue the reply. Try again.", "Could not copy the edit.": "Could not copy the edit.", @@ -143,6 +151,7 @@ "Could not read or update settings.": "Could not read or update settings.", "Could not read the queued message.": "Could not read the queued message.", "Could not read the skill source.": "Could not read the skill source.", + "Could not refresh the goal.": "Could not refresh the goal.", "Could not remove the MCP server.": "Could not remove the MCP server.", "Could not save the MCP server.": "Could not save the MCP server.", "Could not save the credential.": "Could not save the credential.", @@ -153,7 +162,9 @@ "Could not sync Pending": "Could not sync Pending", "Could not sync chats": "Could not sync chats", "Could not update the conversation.": "Could not update the conversation.", + "Could not update the goal.": "Could not update the goal.", "Could not update the message queue.": "Could not update the message queue.", + "Could not verify this chat’s settings. Review them and try again.": "Could not verify this chat’s settings. Review them and try again.", "Create Room": "Create Room", "Create Room on {name}": "Create Room on {name}", "Creating…": "Creating…", @@ -189,16 +200,22 @@ "Disabled": "Disabled", "Disabled servers": "Disabled servers", "Discard": "Discard", + "Discard Edits": "Discard Edits", "Discard changes?": "Discard changes?", + "Discard goal edits?": "Discard goal edits?", "Disconnect": "Disconnect", "Discover models": "Discover models", "Discovering models…": "Discovering models…", "Dismiss": "Dismiss", + "Dismiss Goal Summary": "Dismiss Goal Summary", "Dismiss keyboard": "Dismiss keyboard", "Done": "Done", "Edit": "Edit", + "Edit Budget": "Edit Budget", "Edit queued message": "Edit queued message", + "Elapsed": "Elapsed", "Enable": "Enable", + "Enable Goal tools for this chat to start or resume a goal.": "Enable Goal tools for this chat to start or resume a goal.", "Enable proxy": "Enable proxy", "Enable the parent plugin first.": "Enable the parent plugin first.", "Enable web search": "Enable web search", @@ -208,6 +225,7 @@ "Enter a JSON object.": "Enter a JSON object.", "Enter a connection name.": "Enter a connection name.", "Enter a name and select a model.": "Enter a name and select a model.", + "Enter a positive whole number, or leave it blank for no limit.": "Enter a positive whole number, or leave it blank for no limit.", "Enter a proxy host and a port from 1 to 65535.": "Enter a proxy host and a port from 1 to 65535.", "Enter a proxy password.": "Enter a proxy password.", "Enter a public HTTPS URL.": "Enter a public HTTPS URL.", @@ -221,6 +239,7 @@ "Files & Changes": "Files & Changes", "Filesystem: no additional access": "Filesystem: no additional access", "Find skills": "Find skills", + "Finish or cancel the current goal first.": "Finish or cancel the current goal first.", "Flash": "Flash", "Flash On": "Flash On", "Folder is empty": "Folder is empty", @@ -229,6 +248,16 @@ "Full access": "Full access", "General": "General", "Global": "Global", + "Goal Achieved": "Goal Achieved", + "Goal Blocked": "Goal Blocked", + "Goal Budget Limited": "Goal Budget Limited", + "Goal Cancelled": "Goal Cancelled", + "Goal Details": "Goal Details", + "Goal Details…": "Goal Details…", + "Goal Paused": "Goal Paused", + "Goal Ready": "Goal Ready", + "Goal in Progress": "Goal in Progress", + "Goals are turned off on this computer.": "Goals are turned off on this computer.", "HTTP header": "HTTP header", "HTTP headers": "HTTP headers", "HTTP method": "HTTP method", @@ -251,10 +280,13 @@ "Invalid API key": "Invalid API key", "Invalid stored language preference.": "Invalid stored language preference.", "JSON body": "JSON body", + "Keep Editing": "Keep Editing", + "Keep Goal": "Keep Goal", "Keep my edit": "Keep my edit", "Language": "Language", "Last request": "Last request", "Last synced": "Last synced", + "Last synced · Read-only": "Last synced · Read-only", "Latest": "Latest", "Leave blank for automatic title": "Leave blank for automatic title", "Light": "Light", @@ -266,6 +298,7 @@ "Low": "Low", "MCP": "MCP", "Maka is shutting down. Try again after it restarts.": "Maka is shutting down. Try again after it restarts.", + "Mark Complete": "Mark Complete", "Max output tokens": "Max output tokens", "Maximum": "Maximum", "Medium": "Medium", @@ -290,7 +323,10 @@ "Network: no access": "Network: no access", "Network: no destinations": "Network: no destinations", "New Chat": "New Chat", + "New Goal": "New Goal", + "New Goal…": "New Goal…", "New Room": "New Room", + "Next attempt: {time}": "Next attempt: {time}", "No MCP servers": "No MCP servers", "No approvals or questions are waiting across your connected computers.": "No approvals or questions are waiting across your connected computers.", "No approvals or questions are waiting.": "No approvals or questions are waiting.", @@ -309,6 +345,7 @@ "Not measured": "Not measured", "Not sent. Choose a workspace, then retry.": "Not sent. Choose a workspace, then retry.", "Now": "Now", + "Objective": "Objective", "Off": "Off", "Offline": "Offline", "Open Conversation": "Open Conversation", @@ -332,6 +369,7 @@ "Paste pairing link": "Paste pairing link", "Paste pairing link or connect manually": "Paste pairing link or connect manually", "Paste relay token": "Paste relay token", + "Pause Goal": "Pause Goal", "Pending": "Pending", "Permission": "Permission", "Permission requests are disabled": "Permission requests are disabled", @@ -383,8 +421,10 @@ "Relay URL (optional)": "Relay URL (optional)", "Relay · {latency} ms": "Relay · {latency} ms", "Relays": "Relays", + "Remaining": "Remaining", "Remove": "Remove", "Remove Computer": "Remove Computer", + "Remove Limit & Resume": "Remove Limit & Resume", "Remove connection": "Remove connection", "Remove conversation link: {title}": "Remove conversation link: {title}", "Remove queued message": "Remove queued message", @@ -407,6 +447,7 @@ "Result snippet path (optional)": "Result snippet path (optional)", "Result title path (optional)": "Result title path (optional)", "Results array path": "Results array path", + "Resume Goal": "Resume Goal", "Retry": "Retry", "Retry now": "Retry now", "Review latest": "Review latest", @@ -421,6 +462,7 @@ "Running {count, plural, one {# tool} other {# tools}}…": "Running {count, plural, one {# tool} other {# tools}}…", "Save": "Save", "Save API key": "Save API key", + "Save Budget": "Save Budget", "Save usage credential": "Save usage credential", "Save your provider settings before changing its API key.": "Save your provider settings before changing its API key.", "Saved Host relay Bearer token": "Saved Host relay Bearer token", @@ -445,6 +487,7 @@ "Sending…": "Sending…", "Server-side compaction": "Server-side compaction", "Service": "Service", + "Set a limit above {count} tokens used, or leave it blank for no limit.": "Set a limit above {count} tokens used, or leave it blank for no limit.", "Settings": "Settings", "Shadowed": "Shadowed", "Show": "Show", @@ -460,6 +503,7 @@ "Source unavailable": "Source unavailable", "Start Chat": "Start Chat", "Start Chat on {name}": "Start Chat on {name}", + "Start Goal": "Start Goal", "Start a conversation on any connected computer and it will appear here automatically.": "Start a conversation on any connected computer and it will appear here automatically.", "Status": "Status", "Steer now": "Steer now", @@ -480,8 +524,13 @@ "Team ID": "Team ID", "Test connection": "Test connection", "The active turn changed. Your message is kept.": "The active turn changed. Your message is kept.", + "The agent continues automatically in later turns. It checks the budget between turns, so the current turn may go over.": "The agent continues automatically in later turns. It checks the budget between turns, so the current turn may go over.", + "The agent won’t start any more turns for this goal.": "The agent won’t start any more turns for this goal.", + "The computer rejected the goal change: {reason}": "The computer rejected the goal change: {reason}", "The conversation changed. Send a new message instead.": "The conversation changed. Send a new message instead.", "The deployment document is invalid.": "The deployment document is invalid.", + "The goal changed. Close the editor to review it.": "The goal changed. Close the editor to review it.", + "The goal changed. Review it and try again.": "The goal changed. Review it and try again.", "The main conversation is no longer available.": "The main conversation is no longer available.", "The plugin bundle could not be downloaded.": "The plugin bundle could not be downloaded.", "The plugin bundle is invalid.": "The plugin bundle is invalid.", @@ -519,6 +568,8 @@ "Thought process": "Thought process", "Thought process · {count, plural, one {# tool} other {# tools}}": "Thought process · {count, plural, one {# tool} other {# tools}}", "Title (optional)": "Title (optional)", + "Token Budget": "Token Budget", + "Token Budget (Optional)": "Token Budget (Optional)", "Token limits": "Token limits", "Token limits must be positive whole numbers.": "Token limits must be positive whole numbers.", "Tool call": "Tool call", @@ -529,18 +580,25 @@ "Try a different search term or switch the computer filter.": "Try a different search term or switch the computer filter.", "Turn off flashlight": "Turn off flashlight", "Turn on flashlight": "Turn on flashlight", + "Turns": "Turns", "URL parameters": "URL parameters", "URL query": "URL query", "Ultra": "Ultra", "Unavailable": "Unavailable", + "Unknown": "Unknown", + "Unknown · Incomplete usage": "Unknown · Incomplete usage", + "Unlimited": "Unlimited", "Unpin": "Unpin", "Update": "Update", + "Updating goal…": "Updating goal…", "Usage": "Usage", "Usage & Details": "Usage & Details", "Usage credential": "Usage credential", + "Usage is incomplete. To resume now, remove the limit.": "Usage is incomplete. To resume now, remove the limit.", "Use Host default": "Use Host default", "Use a URL without credentials.": "Use a URL without credentials.", "Use an HTTP URL without credentials or query parameters. Use environment references or edit on Desktop.": "Use an HTTP URL without credentials or query parameters. Use environment references or edit on Desktop.", + "Used": "Used", "Used {count, plural, one {# tool} other {# tools}}": "Used {count, plural, one {# tool} other {# tools}}", "User action required": "User action required", "Username": "Username", @@ -552,6 +610,7 @@ "Waiting for current turn": "Waiting for current turn", "Waiting for provider sign-in…": "Waiting for provider sign-in…", "Waiting for queue…": "Waiting for queue…", + "Waiting for this turn to finish.": "Waiting for this turn to finish.", "Waiting for your response": "Waiting for your response", "Web Search": "Web Search", "WebSocket": "WebSocket", @@ -573,6 +632,8 @@ "{count, plural, one {# message queued} other {# messages queued}}": "{count, plural, one {# message queued} other {# messages queued}}", "{count, plural, one {# quote} other {# quotes}}": "{count, plural, one {# quote} other {# quotes}}", "{count} queued": "{count} queued", + "{count} s": "{count} s", + "{count} tokens": "{count} tokens", "{count}d": "{count}d", "{count}h": "{count}h", "{count}m": "{count}m", diff --git a/products/maka/ios-shell/locales/es.json b/products/maka/ios-shell/locales/es.json index dc6d98b523f..0862308ebfe 100644 --- a/products/maka/ios-shell/locales/es.json +++ b/products/maka/ios-shell/locales/es.json @@ -15,6 +15,7 @@ "Add to queue": "Añadir a la cola", "Add to quotes": "Añadir a las citas", "Additional permissions requested": "Permisos adicionales solicitados", + "Adjust Budget & Resume": "Ajustar el presupuesto y reanudar", "Advanced options": "Opciones avanzadas", "Agent": "Agente", "All": "Todo", @@ -46,6 +47,7 @@ "Arguments": "Argumentos", "Ask Side Question": "Preguntar aparte", "Assistant language": "Idioma del asistente", + "At least {count} tokens": "Al menos {count} tokens", "Authentication": "Autenticación", "Authentication field name": "Nombre del campo de autenticación", "Authentication location": "Ubicación de autenticación", @@ -65,9 +67,13 @@ "Camera could not start.": "No se pudo iniciar la cámara.", "Camera unavailable on this device": "Cámara no disponible en este dispositivo", "Cancel": "Cancelar", + "Cancel Editing": "Cancelar edición", + "Cancel Goal": "Cancelar objetivo", + "Cancel this goal?": "¿Cancelar este objetivo?", "Changes": "Cambios", "Changes ({count})": "Cambios ({count})", "Chat": "Conversación", + "Chat settings changed. Review them and try again.": "La configuración del chat cambió. Revísala e inténtalo de nuevo.", "Chats": "Conversaciones", "Check connection": "Comprobar conexión", "Checking pairing invite…": "Comprobando invitación…", @@ -120,6 +126,7 @@ "Continue only if this code matches the one displayed on your computer.": "Continúa solo si este código coincide con el mostrado en tu ordenador.", "Continue reply": "Continuar respuesta", "Continue your work from any computer": "Continúa tu trabajo desde cualquier ordenador", + "Continuing goal: {objective}": "Continuando el objetivo: {objective}", "Continuing reply…": "Continuando la respuesta…", "Conversation title": "Título de la conversación", "Conversation: {title}": "Conversación: {title}", @@ -130,6 +137,7 @@ "Copy edit": "Copiar edición", "Copy reply": "Copiar respuesta", "Could not change the model.": "No se pudo cambiar el modelo.", + "Could not confirm the goal change. Check its status before trying again.": "No se pudo confirmar el cambio. Revisa el estado del objetivo antes de volver a intentarlo.", "Could not confirm whether the message was sent. Check the conversation or queue before retrying.": "No se pudo confirmar si se envió el mensaje. Revisa la conversación o la cola antes de volver a intentarlo.", "Could not continue the reply. Try again.": "No se pudo continuar la respuesta. Inténtalo de nuevo.", "Could not copy the edit.": "No se pudo copiar la edición.", @@ -143,6 +151,7 @@ "Could not read or update settings.": "No se pudo leer o actualizar la configuración.", "Could not read the queued message.": "No se pudo leer el mensaje en cola.", "Could not read the skill source.": "No se pudo leer el origen de la habilidad.", + "Could not refresh the goal.": "No se pudo actualizar la información del objetivo.", "Could not remove the MCP server.": "No se pudo eliminar el servidor MCP.", "Could not save the MCP server.": "No se pudo guardar el servidor MCP.", "Could not save the credential.": "No se pudo guardar la credencial.", @@ -153,7 +162,9 @@ "Could not sync Pending": "No se pudieron sincronizar las solicitudes pendientes", "Could not sync chats": "No se pudieron sincronizar los chats", "Could not update the conversation.": "No se pudo actualizar la conversación.", + "Could not update the goal.": "No se pudo cambiar el objetivo.", "Could not update the message queue.": "No se pudo actualizar la cola de mensajes.", + "Could not verify this chat’s settings. Review them and try again.": "No se pudo verificar la configuración del chat. Revísala e inténtalo de nuevo.", "Create Room": "Crear sala", "Create Room on {name}": "Crear sala en {name}", "Creating…": "Creando…", @@ -189,16 +200,22 @@ "Disabled": "Desactivado", "Disabled servers": "Servidores desactivados", "Discard": "Descartar", + "Discard Edits": "Descartar cambios", "Discard changes?": "¿Descartar los cambios?", + "Discard goal edits?": "¿Descartar los cambios del objetivo?", "Disconnect": "Desconectar", "Discover models": "Buscar modelos", "Discovering models…": "Buscando modelos…", "Dismiss": "Descartar", + "Dismiss Goal Summary": "Ocultar resumen del objetivo", "Dismiss keyboard": "Ocultar teclado", "Done": "OK", "Edit": "Editar", + "Edit Budget": "Editar presupuesto", "Edit queued message": "Editar mensaje en cola", + "Elapsed": "Tiempo transcurrido", "Enable": "Activar", + "Enable Goal tools for this chat to start or resume a goal.": "Activa las herramientas de objetivos de este chat para iniciar o reanudar un objetivo.", "Enable proxy": "Activar proxy", "Enable the parent plugin first.": "Activa primero el plugin principal.", "Enable web search": "Activar búsqueda web", @@ -208,6 +225,7 @@ "Enter a JSON object.": "Introduce un objeto JSON.", "Enter a connection name.": "Introduce un nombre de conexión.", "Enter a name and select a model.": "Introduce un nombre y selecciona un modelo.", + "Enter a positive whole number, or leave it blank for no limit.": "Introduce un número entero positivo o deja el campo vacío para no poner límite.", "Enter a proxy host and a port from 1 to 65535.": "Introduce un servidor proxy y un puerto del 1 al 65535.", "Enter a proxy password.": "Introduce una contraseña para el proxy.", "Enter a public HTTPS URL.": "Introduce una URL HTTPS pública.", @@ -221,6 +239,7 @@ "Files & Changes": "Archivos y cambios", "Filesystem: no additional access": "Sistema de archivos: sin acceso adicional", "Find skills": "Buscar habilidades", + "Finish or cancel the current goal first.": "Primero completa o cancela el objetivo actual.", "Flash": "Linterna", "Flash On": "Linterna encendida", "Folder is empty": "La carpeta está vacía", @@ -229,6 +248,16 @@ "Full access": "Acceso completo", "General": "General", "Global": "Global", + "Goal Achieved": "Objetivo alcanzado", + "Goal Blocked": "Objetivo bloqueado", + "Goal Budget Limited": "Presupuesto del objetivo limitado", + "Goal Cancelled": "Objetivo cancelado", + "Goal Details": "Detalles del objetivo", + "Goal Details…": "Detalles del objetivo…", + "Goal Paused": "Objetivo en pausa", + "Goal Ready": "Objetivo listo", + "Goal in Progress": "Objetivo en curso", + "Goals are turned off on this computer.": "Los objetivos están desactivados en este equipo.", "HTTP header": "Encabezado HTTP", "HTTP headers": "Encabezados HTTP", "HTTP method": "Método HTTP", @@ -251,10 +280,13 @@ "Invalid API key": "Clave API no válida", "Invalid stored language preference.": "La preferencia de idioma guardada no es válida.", "JSON body": "Cuerpo JSON", + "Keep Editing": "Seguir editando", + "Keep Goal": "Conservar objetivo", "Keep my edit": "Conservar mi edición", "Language": "Idioma", "Last request": "Última solicitud", "Last synced": "Última sincronización", + "Last synced · Read-only": "Última sincronización · Solo lectura", "Latest": "Último", "Leave blank for automatic title": "Déjalo vacío para título automático", "Light": "Claro", @@ -266,6 +298,7 @@ "Low": "Bajo", "MCP": "MCP", "Maka is shutting down. Try again after it restarts.": "Maka se está cerrando. Vuelve a intentarlo cuando se reinicie.", + "Mark Complete": "Marcar como completado", "Max output tokens": "Máximo de tokens de salida", "Maximum": "Máximo", "Medium": "Mediano", @@ -290,7 +323,10 @@ "Network: no access": "Red: sin acceso", "Network: no destinations": "Red: sin destinos", "New Chat": "Nuevo chat", + "New Goal": "Nuevo objetivo", + "New Goal…": "Nuevo objetivo…", "New Room": "Nueva sala", + "Next attempt: {time}": "Próximo intento: {time}", "No MCP servers": "No hay servidores MCP", "No approvals or questions are waiting across your connected computers.": "No hay aprobaciones ni preguntas pendientes en tus ordenadores conectados.", "No approvals or questions are waiting.": "No hay aprobaciones ni preguntas pendientes.", @@ -309,6 +345,7 @@ "Not measured": "Sin medición", "Not sent. Choose a workspace, then retry.": "No enviado. Elige un espacio de trabajo e inténtalo de nuevo.", "Now": "Ahora", + "Objective": "Objetivo", "Off": "Desactivado", "Offline": "Sin conexión", "Open Conversation": "Abrir conversación", @@ -332,6 +369,7 @@ "Paste pairing link": "Pegar enlace de emparejamiento", "Paste pairing link or connect manually": "Pegar enlace o conectar manualmente", "Paste relay token": "Pegar token de relay", + "Pause Goal": "Pausar objetivo", "Pending": "Pendientes", "Permission": "Permiso", "Permission requests are disabled": "Las solicitudes de permiso están desactivadas", @@ -383,8 +421,10 @@ "Relay URL (optional)": "URL del relay (opcional)", "Relay · {latency} ms": "Vía relé · {latency} ms", "Relays": "Relés", + "Remaining": "Restante", "Remove": "Quitar", "Remove Computer": "Eliminar ordenador", + "Remove Limit & Resume": "Quitar el límite y reanudar", "Remove connection": "Eliminar conexión", "Remove conversation link: {title}": "Quitar el enlace a la conversación: {title}", "Remove queued message": "Quitar mensaje en cola", @@ -407,6 +447,7 @@ "Result snippet path (optional)": "Ruta del fragmento de resultado (opcional)", "Result title path (optional)": "Ruta del título de resultado (opcional)", "Results array path": "Ruta del arreglo de resultados", + "Resume Goal": "Reanudar objetivo", "Retry": "Reintentar", "Retry now": "Reintentar ahora", "Review latest": "Revisar versión actual", @@ -421,6 +462,7 @@ "Running {count, plural, one {# tool} other {# tools}}…": "Ejecutando {count, plural, one {# herramienta} other {# herramientas}}…", "Save": "Guardar", "Save API key": "Guardar clave API", + "Save Budget": "Guardar presupuesto", "Save usage credential": "Guardar credencial de uso", "Save your provider settings before changing its API key.": "Guarda los ajustes del proveedor antes de cambiar su clave API.", "Saved Host relay Bearer token": "Token Bearer guardado del retransmisor del Host", @@ -445,6 +487,7 @@ "Sending…": "Enviando…", "Server-side compaction": "Compactación en el servidor", "Service": "Servicio", + "Set a limit above {count} tokens used, or leave it blank for no limit.": "Fija un límite superior a los {count} tokens usados o deja el campo vacío para no poner límite.", "Settings": "Configuración", "Shadowed": "Reemplazado", "Show": "Mostrar", @@ -460,6 +503,7 @@ "Source unavailable": "Origen no disponible", "Start Chat": "Iniciar chat", "Start Chat on {name}": "Iniciar chat en {name}", + "Start Goal": "Iniciar objetivo", "Start a conversation on any connected computer and it will appear here automatically.": "Inicia una conversación en cualquier ordenador conectado y aparecerá aquí automáticamente.", "Status": "Estado", "Steer now": "Guiar ahora", @@ -480,8 +524,13 @@ "Team ID": "ID del equipo", "Test connection": "Probar conexión", "The active turn changed. Your message is kept.": "El turno activo cambió. Se conserva tu mensaje.", + "The agent continues automatically in later turns. It checks the budget between turns, so the current turn may go over.": "El agente continúa automáticamente en los siguientes turnos. Revisa el presupuesto entre turnos, así que el turno actual puede superarlo.", + "The agent won’t start any more turns for this goal.": "El agente no iniciará más turnos para este objetivo.", + "The computer rejected the goal change: {reason}": "El equipo rechazó el cambio del objetivo: {reason}", "The conversation changed. Send a new message instead.": "La conversación cambió. Envía un mensaje nuevo.", "The deployment document is invalid.": "El documento de despliegue no es válido.", + "The goal changed. Close the editor to review it.": "El objetivo cambió. Cierra el editor para revisarlo.", + "The goal changed. Review it and try again.": "El objetivo cambió. Revísalo e inténtalo de nuevo.", "The main conversation is no longer available.": "La conversación principal ya no está disponible.", "The plugin bundle could not be downloaded.": "No se pudo descargar el paquete del plugin.", "The plugin bundle is invalid.": "El paquete del plugin no es válido.", @@ -519,6 +568,8 @@ "Thought process": "Proceso de pensamiento", "Thought process · {count, plural, one {# tool} other {# tools}}": "Proceso de pensamiento · {count, plural, one {# herramienta} other {# herramientas}}", "Title (optional)": "Título (opcional)", + "Token Budget": "Presupuesto de tokens", + "Token Budget (Optional)": "Presupuesto de tokens (opcional)", "Token limits": "Límites de tokens", "Token limits must be positive whole numbers.": "Los límites de tokens deben ser números enteros positivos.", "Tool call": "Llamada a herramienta", @@ -529,18 +580,25 @@ "Try a different search term or switch the computer filter.": "Prueba con otro término de búsqueda o cambia el filtro de ordenador.", "Turn off flashlight": "Apagar linterna", "Turn on flashlight": "Encender linterna", + "Turns": "Turnos", "URL parameters": "Parámetros de URL", "URL query": "Consulta URL", "Ultra": "Ultra alto", "Unavailable": "No disponible", + "Unknown": "Desconocido", + "Unknown · Incomplete usage": "Desconocido · Uso incompleto", + "Unlimited": "Sin límite", "Unpin": "Desfijar", "Update": "Actualizar", + "Updating goal…": "Actualizando objetivo…", "Usage": "Uso", "Usage & Details": "Uso y detalles", "Usage credential": "Credencial de uso", + "Usage is incomplete. To resume now, remove the limit.": "Los datos de uso están incompletos. Quita el límite para reanudar ahora.", "Use Host default": "Usar predeterminado del Host", "Use a URL without credentials.": "Usa una URL sin credenciales.", "Use an HTTP URL without credentials or query parameters. Use environment references or edit on Desktop.": "Usa una URL HTTP sin credenciales ni parámetros de consulta. Usa referencias al entorno o edita en el escritorio.", + "Used": "Usado", "Used {count, plural, one {# tool} other {# tools}}": "{count, plural, one {# herramienta usada} other {# herramientas usadas}}", "User action required": "Acción del usuario requerida", "Username": "Nombre de usuario", @@ -552,6 +610,7 @@ "Waiting for current turn": "Esperando al turno actual", "Waiting for provider sign-in…": "Esperando el inicio de sesión en el proveedor…", "Waiting for queue…": "Añadiendo a la cola…", + "Waiting for this turn to finish.": "Esperando a que termine el turno actual.", "Waiting for your response": "Esperando tu respuesta", "Web Search": "Búsqueda web", "WebSocket": "WebSocket", @@ -573,6 +632,8 @@ "{count, plural, one {# message queued} other {# messages queued}}": "{count, plural, one {# mensaje en cola} other {# mensajes en cola}}", "{count, plural, one {# quote} other {# quotes}}": "{count, plural, one {# cita} other {# citas}}", "{count} queued": "En cola: {count}", + "{count} s": "{count} s", + "{count} tokens": "{count} tokens", "{count}d": "{count} d", "{count}h": "{count} h", "{count}m": "{count} min", diff --git a/products/maka/ios-shell/locales/fr.json b/products/maka/ios-shell/locales/fr.json index 4b4b1a989f6..63d5a55de63 100644 --- a/products/maka/ios-shell/locales/fr.json +++ b/products/maka/ios-shell/locales/fr.json @@ -15,6 +15,7 @@ "Add to queue": "Ajouter à la file", "Add to quotes": "Ajouter aux citations", "Additional permissions requested": "Autorisations supplémentaires demandées", + "Adjust Budget & Resume": "Modifier le budget et reprendre", "Advanced options": "Options avancées", "Agent": "Agent", "All": "Tout", @@ -46,6 +47,7 @@ "Arguments": "Arguments", "Ask Side Question": "Poser une question à part", "Assistant language": "Langue de l’assistant", + "At least {count} tokens": "Au moins {count} jetons", "Authentication": "Authentification", "Authentication field name": "Nom du champ d’authentification", "Authentication location": "Emplacement de l’authentification", @@ -65,9 +67,13 @@ "Camera could not start.": "Impossible de démarrer la caméra.", "Camera unavailable on this device": "Caméra indisponible sur cet appareil", "Cancel": "Annuler", + "Cancel Editing": "Annuler la modification", + "Cancel Goal": "Annuler l’objectif", + "Cancel this goal?": "Annuler cet objectif ?", "Changes": "Modifications", "Changes ({count})": "Modifications ({count})", "Chat": "Discussion", + "Chat settings changed. Review them and try again.": "Les réglages de la conversation ont changé. Vérifiez-les et réessayez.", "Chats": "Discussions", "Check connection": "Vérifier la connexion", "Checking pairing invite…": "Vérification de l’invitation…", @@ -120,6 +126,7 @@ "Continue only if this code matches the one displayed on your computer.": "Continuez uniquement si ce code correspond à celui affiché sur votre ordinateur.", "Continue reply": "Reprendre la réponse", "Continue your work from any computer": "Poursuivez votre travail depuis n’importe quel ordinateur", + "Continuing goal: {objective}": "Poursuite de l’objectif : {objective}", "Continuing reply…": "Reprise de la réponse…", "Conversation title": "Titre de la conversation", "Conversation: {title}": "Conversation : {title}", @@ -130,6 +137,7 @@ "Copy edit": "Copier la modification", "Copy reply": "Copier la réponse", "Could not change the model.": "Impossible de changer de modèle.", + "Could not confirm the goal change. Check its status before trying again.": "Impossible de confirmer la modification. Vérifiez l’état de l’objectif avant de réessayer.", "Could not confirm whether the message was sent. Check the conversation or queue before retrying.": "Impossible de confirmer si le message a été envoyé. Vérifiez la conversation ou la file d’attente avant de réessayer.", "Could not continue the reply. Try again.": "Impossible de reprendre la réponse. Réessayez.", "Could not copy the edit.": "Impossible de copier la modification.", @@ -143,6 +151,7 @@ "Could not read or update settings.": "Impossible de lire ou de mettre à jour les paramètres.", "Could not read the queued message.": "Impossible de lire le message en file d’attente.", "Could not read the skill source.": "Impossible de lire la source de la compétence.", + "Could not refresh the goal.": "Impossible d’actualiser l’objectif.", "Could not remove the MCP server.": "Impossible de retirer le serveur MCP.", "Could not save the MCP server.": "Impossible d’enregistrer le serveur MCP.", "Could not save the credential.": "Impossible d’enregistrer les identifiants.", @@ -153,7 +162,9 @@ "Could not sync Pending": "Impossible de synchroniser les demandes en attente", "Could not sync chats": "Impossible de synchroniser les conversations", "Could not update the conversation.": "Impossible de mettre à jour la conversation.", + "Could not update the goal.": "Impossible de modifier l’objectif.", "Could not update the message queue.": "Impossible de mettre à jour la file de messages.", + "Could not verify this chat’s settings. Review them and try again.": "Impossible de vérifier les réglages de la conversation. Vérifiez-les et réessayez.", "Create Room": "Créer le salon", "Create Room on {name}": "Créer un salon sur {name}", "Creating…": "Création…", @@ -189,16 +200,22 @@ "Disabled": "Désactivé", "Disabled servers": "Serveurs désactivés", "Discard": "Abandonner", + "Discard Edits": "Abandonner les modifications", "Discard changes?": "Ignorer les modifications ?", + "Discard goal edits?": "Abandonner les modifications de l’objectif ?", "Disconnect": "Se déconnecter", "Discover models": "Rechercher des modèles", "Discovering models…": "Recherche de modèles…", "Dismiss": "Fermer", + "Dismiss Goal Summary": "Masquer le résumé de l’objectif", "Dismiss keyboard": "Masquer le clavier", "Done": "OK", "Edit": "Modifier", + "Edit Budget": "Modifier le budget", "Edit queued message": "Modifier le message en file", + "Elapsed": "Temps écoulé", "Enable": "Activer", + "Enable Goal tools for this chat to start or resume a goal.": "Activez les outils d’objectif de cette conversation pour démarrer ou reprendre un objectif.", "Enable proxy": "Activer le proxy", "Enable the parent plugin first.": "Activez d’abord le plugin parent.", "Enable web search": "Activer la recherche web", @@ -208,6 +225,7 @@ "Enter a JSON object.": "Saisissez un objet JSON.", "Enter a connection name.": "Saisissez un nom de connexion.", "Enter a name and select a model.": "Saisissez un nom et choisissez un modèle.", + "Enter a positive whole number, or leave it blank for no limit.": "Saisissez un entier positif ou laissez le champ vide pour ne pas fixer de limite.", "Enter a proxy host and a port from 1 to 65535.": "Saisissez un hôte proxy et un port compris entre 1 et 65535.", "Enter a proxy password.": "Saisissez le mot de passe du proxy.", "Enter a public HTTPS URL.": "Saisissez une URL HTTPS publique.", @@ -221,6 +239,7 @@ "Files & Changes": "Fichiers et modifications", "Filesystem: no additional access": "Système de fichiers : aucun accès supplémentaire", "Find skills": "Rechercher des compétences", + "Finish or cancel the current goal first.": "Terminez ou annulez d’abord l’objectif en cours.", "Flash": "Torche", "Flash On": "Torche activée", "Folder is empty": "Le dossier est vide", @@ -229,6 +248,16 @@ "Full access": "Accès complet", "General": "Général", "Global": "Global", + "Goal Achieved": "Objectif atteint", + "Goal Blocked": "Objectif bloqué", + "Goal Budget Limited": "Objectif limité par le budget", + "Goal Cancelled": "Objectif annulé", + "Goal Details": "Détails de l’objectif", + "Goal Details…": "Détails de l’objectif…", + "Goal Paused": "Objectif en pause", + "Goal Ready": "Objectif prêt", + "Goal in Progress": "Objectif en cours", + "Goals are turned off on this computer.": "Les objectifs sont désactivés sur cet ordinateur.", "HTTP header": "En-tête HTTP", "HTTP headers": "En-têtes HTTP", "HTTP method": "Méthode HTTP", @@ -251,10 +280,13 @@ "Invalid API key": "Clé API non valide", "Invalid stored language preference.": "La préférence de langue enregistrée n’est pas valide.", "JSON body": "Corps JSON", + "Keep Editing": "Continuer la modification", + "Keep Goal": "Conserver l’objectif", "Keep my edit": "Conserver ma modification", "Language": "Langue", "Last request": "Dernière requête", "Last synced": "Dernière synchronisation", + "Last synced · Read-only": "Dernière synchronisation · Lecture seule", "Latest": "Dernier", "Leave blank for automatic title": "Laisser vide pour un titre automatique", "Light": "Clair", @@ -266,6 +298,7 @@ "Low": "Faible", "MCP": "MCP", "Maka is shutting down. Try again after it restarts.": "Maka s’arrête. Réessayez après son redémarrage.", + "Mark Complete": "Marquer comme atteint", "Max output tokens": "Nombre maximal de jetons de sortie", "Maximum": "Maximal", "Medium": "Moyen", @@ -290,7 +323,10 @@ "Network: no access": "Réseau : aucun accès", "Network: no destinations": "Réseau : aucune destination", "New Chat": "Nouvelle discussion", + "New Goal": "Nouvel objectif", + "New Goal…": "Nouvel objectif…", "New Room": "Nouveau salon", + "Next attempt: {time}": "Prochaine tentative : {time}", "No MCP servers": "Aucun serveur MCP", "No approvals or questions are waiting across your connected computers.": "Aucune validation ni question en attente sur vos ordinateurs connectés.", "No approvals or questions are waiting.": "Aucune approbation ni question en attente.", @@ -309,6 +345,7 @@ "Not measured": "Non mesurée", "Not sent. Choose a workspace, then retry.": "Non envoyé. Choisissez un espace de travail, puis réessayez.", "Now": "À l’instant", + "Objective": "Objectif", "Off": "Désactivé", "Offline": "Hors ligne", "Open Conversation": "Ouvrir la conversation", @@ -332,6 +369,7 @@ "Paste pairing link": "Coller le lien d’appairage", "Paste pairing link or connect manually": "Coller un lien ou connexion manuelle", "Paste relay token": "Coller le jeton relais", + "Pause Goal": "Mettre l’objectif en pause", "Pending": "En attente", "Permission": "Autorisation", "Permission requests are disabled": "Les demandes de permission sont désactivées", @@ -383,8 +421,10 @@ "Relay URL (optional)": "URL du relais (facultatif)", "Relay · {latency} ms": "Via un relais · {latency} ms", "Relays": "Relais", + "Remaining": "Restant", "Remove": "Retirer", "Remove Computer": "Supprimer l’ordinateur", + "Remove Limit & Resume": "Retirer la limite et reprendre", "Remove connection": "Supprimer la connexion", "Remove conversation link: {title}": "Retirer le lien vers la conversation : {title}", "Remove queued message": "Retirer de la file", @@ -407,6 +447,7 @@ "Result snippet path (optional)": "Chemin d’extrait de résultat (facultatif)", "Result title path (optional)": "Chemin de titre de résultat (facultatif)", "Results array path": "Chemin du tableau de résultats", + "Resume Goal": "Reprendre l’objectif", "Retry": "Réessayer", "Retry now": "Réessayer maintenant", "Review latest": "Voir la version actuelle", @@ -421,6 +462,7 @@ "Running {count, plural, one {# tool} other {# tools}}…": "Exécution de {count, plural, one {# outil} other {# outils}}…", "Save": "Enregistrer", "Save API key": "Enregistrer la clé API", + "Save Budget": "Enregistrer le budget", "Save usage credential": "Enregistrer les identifiants de suivi d’utilisation", "Save your provider settings before changing its API key.": "Enregistrez les réglages du fournisseur avant de changer sa clé API.", "Saved Host relay Bearer token": "Jeton Bearer du relais du Host enregistré", @@ -445,6 +487,7 @@ "Sending…": "Envoi…", "Server-side compaction": "Compactage côté serveur", "Service": "Service", + "Set a limit above {count} tokens used, or leave it blank for no limit.": "Fixez une limite supérieure aux {count} jetons utilisés ou laissez le champ vide.", "Settings": "Réglages", "Shadowed": "Masqué", "Show": "Afficher", @@ -460,6 +503,7 @@ "Source unavailable": "Source indisponible", "Start Chat": "Démarrer", "Start Chat on {name}": "Démarrer une discussion sur {name}", + "Start Goal": "Démarrer l’objectif", "Start a conversation on any connected computer and it will appear here automatically.": "Lancez une conversation sur un ordinateur connecté pour qu’elle apparaisse automatiquement ici.", "Status": "État", "Steer now": "Orienter maintenant", @@ -480,8 +524,13 @@ "Team ID": "Identifiant d’équipe", "Test connection": "Tester la connexion", "The active turn changed. Your message is kept.": "Le tour actif a changé. Votre message est conservé.", + "The agent continues automatically in later turns. It checks the budget between turns, so the current turn may go over.": "L’agent poursuit automatiquement aux tours suivants. Le budget est vérifié entre les tours : le tour en cours peut le dépasser.", + "The agent won’t start any more turns for this goal.": "L’agent ne lancera plus de tours pour cet objectif.", + "The computer rejected the goal change: {reason}": "L’ordinateur a refusé la modification de l’objectif : {reason}", "The conversation changed. Send a new message instead.": "La conversation a changé. Envoyez plutôt un nouveau message.", "The deployment document is invalid.": "Le document de déploiement est invalide.", + "The goal changed. Close the editor to review it.": "L’objectif a changé. Fermez l’éditeur pour le consulter.", + "The goal changed. Review it and try again.": "L’objectif a changé. Consultez-le et réessayez.", "The main conversation is no longer available.": "La conversation principale n’est plus disponible.", "The plugin bundle could not be downloaded.": "Impossible de télécharger le paquet du plugin.", "The plugin bundle is invalid.": "Le paquet du plugin est invalide.", @@ -519,6 +568,8 @@ "Thought process": "Raisonnement", "Thought process · {count, plural, one {# tool} other {# tools}}": "Raisonnement · {count, plural, one {# outil} other {# outils}}", "Title (optional)": "Titre (facultatif)", + "Token Budget": "Budget de jetons", + "Token Budget (Optional)": "Budget de jetons (facultatif)", "Token limits": "Limites de jetons", "Token limits must be positive whole numbers.": "Les limites de jetons doivent être des nombres entiers positifs.", "Tool call": "Appel d’outil", @@ -529,18 +580,25 @@ "Try a different search term or switch the computer filter.": "Essayez un autre terme de recherche ou changez le filtre d’ordinateur.", "Turn off flashlight": "Éteindre la torche", "Turn on flashlight": "Allumer la torche", + "Turns": "Tours", "URL parameters": "Paramètres d’URL", "URL query": "Requête d’URL", "Ultra": "Ultra", "Unavailable": "Indisponible", + "Unknown": "Inconnu", + "Unknown · Incomplete usage": "Inconnu · Utilisation incomplète", + "Unlimited": "Illimité", "Unpin": "Désépingler", "Update": "Mettre à jour", + "Updating goal…": "Mise à jour de l’objectif…", "Usage": "Utilisation", "Usage & Details": "Utilisation et détails", "Usage credential": "Identifiants de suivi d’utilisation", + "Usage is incomplete. To resume now, remove the limit.": "Les données d’utilisation sont incomplètes. Retirez la limite pour reprendre maintenant.", "Use Host default": "Utiliser la valeur par défaut du Host", "Use a URL without credentials.": "Utilisez une URL sans identifiants.", "Use an HTTP URL without credentials or query parameters. Use environment references or edit on Desktop.": "Utilisez une URL HTTP sans identifiants ni paramètres de requête. Utilisez des références à l’environnement ou modifiez sur le bureau.", + "Used": "Utilisé", "Used {count, plural, one {# tool} other {# tools}}": "{count, plural, one {# outil utilisé} other {# outils utilisés}}", "User action required": "Action utilisateur requise", "Username": "Nom d’utilisateur", @@ -552,6 +610,7 @@ "Waiting for current turn": "En attente de la fin du tour", "Waiting for provider sign-in…": "En attente de la connexion au fournisseur…", "Waiting for queue…": "Ajout à la file…", + "Waiting for this turn to finish.": "En attente de la fin du tour en cours.", "Waiting for your response": "En attente de réponse", "Web Search": "Recherche web", "WebSocket": "WebSocket", @@ -573,6 +632,8 @@ "{count, plural, one {# message queued} other {# messages queued}}": "{count, plural, one {# message en file} other {# messages en file}}", "{count, plural, one {# quote} other {# quotes}}": "{count, plural, one {# citation} other {# citations}}", "{count} queued": "En file : {count}", + "{count} s": "{count} s", + "{count} tokens": "{count} jetons", "{count}d": "{count} j", "{count}h": "{count} h", "{count}m": "{count} min", diff --git a/products/maka/ios-shell/locales/it.json b/products/maka/ios-shell/locales/it.json index 740dab67d36..d73024d9911 100644 --- a/products/maka/ios-shell/locales/it.json +++ b/products/maka/ios-shell/locales/it.json @@ -15,6 +15,7 @@ "Add to queue": "Aggiungi alla coda", "Add to quotes": "Aggiungi alle citazioni", "Additional permissions requested": "Permessi aggiuntivi richiesti", + "Adjust Budget & Resume": "Modifica budget e riprendi", "Advanced options": "Opzioni avanzate", "Agent": "Agente", "All": "Tutto", @@ -46,6 +47,7 @@ "Arguments": "Argomenti", "Ask Side Question": "Fai una domanda a parte", "Assistant language": "Lingua dell’assistente", + "At least {count} tokens": "Almeno {count} token", "Authentication": "Autenticazione", "Authentication field name": "Nome del campo di autenticazione", "Authentication location": "Posizione dell’autenticazione", @@ -65,9 +67,13 @@ "Camera could not start.": "Impossibile avviare la fotocamera.", "Camera unavailable on this device": "Fotocamera non disponibile su questo dispositivo", "Cancel": "Annulla", + "Cancel Editing": "Annulla modifica", + "Cancel Goal": "Annulla obiettivo", + "Cancel this goal?": "Annullare questo obiettivo?", "Changes": "Modifiche", "Changes ({count})": "Modifiche ({count})", "Chat": "Chat", + "Chat settings changed. Review them and try again.": "Le impostazioni della chat sono cambiate. Controllale e riprova.", "Chats": "Chat", "Check connection": "Verifica connessione", "Checking pairing invite…": "Verifica dell’invito in corso…", @@ -120,6 +126,7 @@ "Continue only if this code matches the one displayed on your computer.": "Continua solo se questo codice corrisponde a quello mostrato sul computer.", "Continue reply": "Riprendi la risposta", "Continue your work from any computer": "Continua il tuo lavoro da qualsiasi computer", + "Continuing goal: {objective}": "L’obiettivo continua: {objective}", "Continuing reply…": "Ripresa della risposta…", "Conversation title": "Titolo conversazione", "Conversation: {title}": "Conversazione: {title}", @@ -130,6 +137,7 @@ "Copy edit": "Copia modifica", "Copy reply": "Copia risposta", "Could not change the model.": "Impossibile cambiare il modello.", + "Could not confirm the goal change. Check its status before trying again.": "Impossibile confermare la modifica. Verifica lo stato dell’obiettivo prima di riprovare.", "Could not confirm whether the message was sent. Check the conversation or queue before retrying.": "Non è stato possibile confermare l’invio del messaggio. Controlla la conversazione o la coda prima di riprovare.", "Could not continue the reply. Try again.": "Impossibile riprendere la risposta. Riprova.", "Could not copy the edit.": "Impossibile copiare la modifica.", @@ -143,6 +151,7 @@ "Could not read or update settings.": "Impossibile leggere o aggiornare le impostazioni.", "Could not read the queued message.": "Impossibile leggere il messaggio in coda.", "Could not read the skill source.": "Impossibile leggere la fonte della competenza.", + "Could not refresh the goal.": "Impossibile ricaricare l’obiettivo.", "Could not remove the MCP server.": "Impossibile rimuovere il server MCP.", "Could not save the MCP server.": "Impossibile salvare il server MCP.", "Could not save the credential.": "Impossibile salvare la credenziale.", @@ -153,7 +162,9 @@ "Could not sync Pending": "Impossibile sincronizzare le richieste in sospeso", "Could not sync chats": "Impossibile sincronizzare le chat", "Could not update the conversation.": "Impossibile aggiornare la conversazione.", + "Could not update the goal.": "Impossibile aggiornare l’obiettivo.", "Could not update the message queue.": "Impossibile aggiornare la coda dei messaggi.", + "Could not verify this chat’s settings. Review them and try again.": "Impossibile verificare le impostazioni della chat. Controllale e riprova.", "Create Room": "Crea stanza", "Create Room on {name}": "Crea stanza su {name}", "Creating…": "Creazione…", @@ -189,16 +200,22 @@ "Disabled": "Disattivato", "Disabled servers": "Server disattivati", "Discard": "Scarta", + "Discard Edits": "Scarta modifiche", "Discard changes?": "Scartare le modifiche?", + "Discard goal edits?": "Scartare le modifiche all’obiettivo?", "Disconnect": "Disconnetti", "Discover models": "Cerca modelli", "Discovering models…": "Ricerca dei modelli…", "Dismiss": "Chiudi", + "Dismiss Goal Summary": "Nascondi riepilogo obiettivo", "Dismiss keyboard": "Chiudi tastiera", "Done": "Fine", "Edit": "Modifica", + "Edit Budget": "Modifica budget", "Edit queued message": "Modifica messaggio in coda", + "Elapsed": "Tempo trascorso", "Enable": "Attiva", + "Enable Goal tools for this chat to start or resume a goal.": "Attiva gli strumenti per gli obiettivi di questa chat per avviare o riprendere un obiettivo.", "Enable proxy": "Attiva proxy", "Enable the parent plugin first.": "Abilita prima il plugin padre.", "Enable web search": "Attiva ricerca sul web", @@ -208,6 +225,7 @@ "Enter a JSON object.": "Inserisci un oggetto JSON.", "Enter a connection name.": "Inserisci un nome di connessione.", "Enter a name and select a model.": "Inserisci un nome e seleziona un modello.", + "Enter a positive whole number, or leave it blank for no limit.": "Inserisci un numero intero positivo o lascia vuoto per non impostare un limite.", "Enter a proxy host and a port from 1 to 65535.": "Inserisci un host proxy e una porta da 1 a 65535.", "Enter a proxy password.": "Inserisci una password per il proxy.", "Enter a public HTTPS URL.": "Inserisci un URL HTTPS pubblico.", @@ -221,6 +239,7 @@ "Files & Changes": "File e modifiche", "Filesystem: no additional access": "Filesystem: nessun accesso aggiuntivo", "Find skills": "Cerca competenze", + "Finish or cancel the current goal first.": "Prima completa o annulla l’obiettivo attuale.", "Flash": "Torcia", "Flash On": "Torcia accesa", "Folder is empty": "La cartella è vuota", @@ -229,6 +248,16 @@ "Full access": "Accesso completo", "General": "Generali", "Global": "Globale", + "Goal Achieved": "Obiettivo raggiunto", + "Goal Blocked": "Obiettivo bloccato", + "Goal Budget Limited": "Obiettivo limitato dal budget", + "Goal Cancelled": "Obiettivo annullato", + "Goal Details": "Dettagli obiettivo", + "Goal Details…": "Dettagli obiettivo…", + "Goal Paused": "Obiettivo in pausa", + "Goal Ready": "Obiettivo pronto", + "Goal in Progress": "Obiettivo in corso", + "Goals are turned off on this computer.": "Gli obiettivi sono disattivati su questo computer.", "HTTP header": "Intestazione HTTP", "HTTP headers": "Intestazioni HTTP", "HTTP method": "Metodo HTTP", @@ -251,10 +280,13 @@ "Invalid API key": "Chiave API non valida", "Invalid stored language preference.": "La preferenza di lingua salvata non è valida.", "JSON body": "Corpo JSON", + "Keep Editing": "Continua a modificare", + "Keep Goal": "Mantieni obiettivo", "Keep my edit": "Mantieni la mia modifica", "Language": "Lingua", "Last request": "Ultima richiesta", "Last synced": "Ultima sincronizzazione", + "Last synced · Read-only": "Ultima sincronizzazione · Sola lettura", "Latest": "Più recente", "Leave blank for automatic title": "Lascia vuoto per il titolo automatico", "Light": "Chiaro", @@ -266,6 +298,7 @@ "Low": "Basso", "MCP": "MCP", "Maka is shutting down. Try again after it restarts.": "Maka si sta chiudendo. Riprova dopo il riavvio.", + "Mark Complete": "Segna come completato", "Max output tokens": "Token di output massimi", "Maximum": "Massimo", "Medium": "Medio", @@ -290,7 +323,10 @@ "Network: no access": "Rete: nessun accesso", "Network: no destinations": "Rete: nessuna destinazione", "New Chat": "Nuova chat", + "New Goal": "Nuovo obiettivo", + "New Goal…": "Nuovo obiettivo…", "New Room": "Nuova stanza", + "Next attempt: {time}": "Prossimo tentativo: {time}", "No MCP servers": "Nessun server MCP", "No approvals or questions are waiting across your connected computers.": "Nessuna approvazione o domanda in attesa sui computer connessi.", "No approvals or questions are waiting.": "Non ci sono approvazioni o domande in sospeso.", @@ -309,6 +345,7 @@ "Not measured": "Non misurata", "Not sent. Choose a workspace, then retry.": "Non inviato. Scegli uno spazio di lavoro, quindi riprova.", "Now": "Ora", + "Objective": "Obiettivo", "Off": "Disattivo", "Offline": "Non in linea", "Open Conversation": "Apri conversazione", @@ -332,6 +369,7 @@ "Paste pairing link": "Incolla link di abbinamento", "Paste pairing link or connect manually": "Incolla link o connetti manualmente", "Paste relay token": "Incolla token relay", + "Pause Goal": "Metti in pausa", "Pending": "In attesa", "Permission": "Permesso", "Permission requests are disabled": "Le richieste di autorizzazione sono disattivate", @@ -383,8 +421,10 @@ "Relay URL (optional)": "URL relay (facoltativo)", "Relay · {latency} ms": "Tramite relay · {latency} ms", "Relays": "Relay", + "Remaining": "Rimanenti", "Remove": "Rimuovi", "Remove Computer": "Rimuovi computer", + "Remove Limit & Resume": "Rimuovi limite e riprendi", "Remove connection": "Rimuovi connessione", "Remove conversation link: {title}": "Rimuovi il link alla conversazione: {title}", "Remove queued message": "Rimuovi dalla coda", @@ -407,6 +447,7 @@ "Result snippet path (optional)": "Percorso anteprima risultato (facoltativo)", "Result title path (optional)": "Percorso titolo risultato (facoltativo)", "Results array path": "Percorso array risultati", + "Resume Goal": "Riprendi obiettivo", "Retry": "Riprova", "Retry now": "Riprova ora", "Review latest": "Controlla la versione attuale", @@ -421,6 +462,7 @@ "Running {count, plural, one {# tool} other {# tools}}…": "Esecuzione di {count, plural, one {# strumento} other {# strumenti}}…", "Save": "Salva", "Save API key": "Salva chiave API", + "Save Budget": "Salva budget", "Save usage credential": "Salva credenziale per l’utilizzo", "Save your provider settings before changing its API key.": "Salva le impostazioni del provider prima di cambiarne la chiave API.", "Saved Host relay Bearer token": "Token Bearer del relay dell’Host salvato", @@ -445,6 +487,7 @@ "Sending…": "Invio in corso…", "Server-side compaction": "Compattazione lato server", "Service": "Servizio", + "Set a limit above {count} tokens used, or leave it blank for no limit.": "Imposta un limite superiore ai {count} token usati o lascia il campo vuoto per non fissare un limite.", "Settings": "Impostazioni", "Shadowed": "Sovrascritto", "Show": "Mostra", @@ -460,6 +503,7 @@ "Source unavailable": "Origine non disponibile", "Start Chat": "Avvia chat", "Start Chat on {name}": "Avvia chat su {name}", + "Start Goal": "Avvia obiettivo", "Start a conversation on any connected computer and it will appear here automatically.": "Avvia una conversazione su un computer connesso e apparirà qui automaticamente.", "Status": "Stato", "Steer now": "Guida ora", @@ -480,8 +524,13 @@ "Team ID": "ID team", "Test connection": "Prova connessione", "The active turn changed. Your message is kept.": "Il turno attivo è cambiato. Il tuo messaggio è stato conservato.", + "The agent continues automatically in later turns. It checks the budget between turns, so the current turn may go over.": "L’agente continua automaticamente nei turni successivi. Controlla il budget tra un turno e l’altro, quindi il turno in corso può superarlo.", + "The agent won’t start any more turns for this goal.": "L’agente non avvierà altri turni per questo obiettivo.", + "The computer rejected the goal change: {reason}": "Il computer ha rifiutato la modifica dell’obiettivo: {reason}", "The conversation changed. Send a new message instead.": "La conversazione è cambiata. Invia un nuovo messaggio.", "The deployment document is invalid.": "Il documento di distribuzione non è valido.", + "The goal changed. Close the editor to review it.": "L’obiettivo è cambiato. Chiudi l’editor per controllarlo.", + "The goal changed. Review it and try again.": "L’obiettivo è cambiato. Controllalo e riprova.", "The main conversation is no longer available.": "La conversazione principale non è più disponibile.", "The plugin bundle could not be downloaded.": "Impossibile scaricare il pacchetto del plugin.", "The plugin bundle is invalid.": "Il pacchetto del plugin non è valido.", @@ -519,6 +568,8 @@ "Thought process": "Ragionamento", "Thought process · {count, plural, one {# tool} other {# tools}}": "Ragionamento · {count, plural, one {# strumento} other {# strumenti}}", "Title (optional)": "Titolo (facoltativo)", + "Token Budget": "Budget di token", + "Token Budget (Optional)": "Budget di token (facoltativo)", "Token limits": "Limiti di token", "Token limits must be positive whole numbers.": "I limiti di token devono essere numeri interi positivi.", "Tool call": "Chiamata strumento", @@ -529,18 +580,25 @@ "Try a different search term or switch the computer filter.": "Prova un altro termine di ricerca o cambia il filtro del computer.", "Turn off flashlight": "Spegni torcia", "Turn on flashlight": "Accendi torcia", + "Turns": "Turni", "URL parameters": "Parametri URL", "URL query": "Query URL", "Ultra": "Estremo", "Unavailable": "Non disponibile", + "Unknown": "Sconosciuto", + "Unknown · Incomplete usage": "Sconosciuto · Utilizzo incompleto", + "Unlimited": "Illimitato", "Unpin": "Rimuovi fissaggio", "Update": "Aggiorna", + "Updating goal…": "Aggiornamento dell’obiettivo…", "Usage": "Utilizzo", "Usage & Details": "Utilizzo e dettagli", "Usage credential": "Credenziale per l’utilizzo", + "Usage is incomplete. To resume now, remove the limit.": "I dati sull’utilizzo sono incompleti. Rimuovi il limite per riprendere ora.", "Use Host default": "Usa predefinito Host", "Use a URL without credentials.": "Usa un URL senza credenziali.", "Use an HTTP URL without credentials or query parameters. Use environment references or edit on Desktop.": "Usa un URL HTTP senza credenziali o parametri di query. Usa riferimenti all’ambiente o modifica su desktop.", + "Used": "Utilizzati", "Used {count, plural, one {# tool} other {# tools}}": "{count, plural, one {# strumento usato} other {# strumenti usati}}", "User action required": "Azione utente richiesta", "Username": "Nome utente", @@ -552,6 +610,7 @@ "Waiting for current turn": "In attesa del turno corrente", "Waiting for provider sign-in…": "In attesa dell’accesso al provider…", "Waiting for queue…": "Aggiunta alla coda…", + "Waiting for this turn to finish.": "In attesa che termini il turno in corso.", "Waiting for your response": "In attesa della tua risposta", "Web Search": "Ricerca web", "WebSocket": "WebSocket", @@ -573,6 +632,8 @@ "{count, plural, one {# message queued} other {# messages queued}}": "{count, plural, one {# messaggio in coda} other {# messaggi in coda}}", "{count, plural, one {# quote} other {# quotes}}": "{count, plural, one {# citazione} other {# citazioni}}", "{count} queued": "In coda: {count}", + "{count} s": "{count} s", + "{count} tokens": "{count} token", "{count}d": "{count} gg", "{count}h": "{count} h", "{count}m": "{count} min", diff --git a/products/maka/ios-shell/locales/ja.json b/products/maka/ios-shell/locales/ja.json index 8deea1a4c5e..a7ec87ac173 100644 --- a/products/maka/ios-shell/locales/ja.json +++ b/products/maka/ios-shell/locales/ja.json @@ -15,6 +15,7 @@ "Add to queue": "キューに追加", "Add to quotes": "引用に追加", "Additional permissions requested": "追加の権限が要求されています", + "Adjust Budget & Resume": "予算を調整して再開", "Advanced options": "詳細オプション", "Agent": "エージェント", "All": "すべて", @@ -46,6 +47,7 @@ "Arguments": "引数", "Ask Side Question": "サイド質問", "Assistant language": "アシスタントの言語", + "At least {count} tokens": "少なくとも {count} トークン", "Authentication": "認証", "Authentication field name": "認証フィールド名", "Authentication location": "認証パラメータの位置", @@ -65,9 +67,13 @@ "Camera could not start.": "カメラを起動できませんでした。", "Camera unavailable on this device": "このデバイスではカメラを利用できません", "Cancel": "キャンセル", + "Cancel Editing": "編集をキャンセル", + "Cancel Goal": "目標を取り消す", + "Cancel this goal?": "この目標を取り消しますか?", "Changes": "変更", "Changes ({count})": "変更({count})", "Chat": "チャット", + "Chat settings changed. Review them and try again.": "チャットの設定が変更されました。確認してからやり直してください。", "Chats": "チャット", "Check connection": "接続を確認", "Checking pairing invite…": "ペアリング招待を確認中…", @@ -120,6 +126,7 @@ "Continue only if this code matches the one displayed on your computer.": "コンピュータに表示されているコードと一致することを確認してから続行してください。", "Continue reply": "応答を続ける", "Continue your work from any computer": "どのコンピュータの作業もここから続ける", + "Continuing goal: {objective}": "目標を続行:{objective}", "Continuing reply…": "応答を再開中…", "Conversation title": "会話のタイトル", "Conversation: {title}": "会話:{title}", @@ -130,6 +137,7 @@ "Copy edit": "編集内容をコピー", "Copy reply": "返信をコピー", "Could not change the model.": "モデルを変更できませんでした。", + "Could not confirm the goal change. Check its status before trying again.": "目標が変更されたか確認できませんでした。再試行する前に状態を確認してください。", "Could not confirm whether the message was sent. Check the conversation or queue before retrying.": "メッセージが送信されたか確認できませんでした。再試行する前に、会話履歴かキューを確認してください。", "Could not continue the reply. Try again.": "応答を再開できませんでした。もう一度お試しください。", "Could not copy the edit.": "編集内容をコピーできませんでした。", @@ -143,6 +151,7 @@ "Could not read or update settings.": "設定を読み取りまたは更新できませんでした。", "Could not read the queued message.": "キュー内のメッセージを読み込めませんでした。", "Could not read the skill source.": "スキルの取得元を読み取れませんでした。", + "Could not refresh the goal.": "目標を再読み込みできませんでした。", "Could not remove the MCP server.": "MCP サーバーを削除できませんでした。", "Could not save the MCP server.": "MCP サーバーを保存できませんでした。", "Could not save the credential.": "認証情報を保存できませんでした。", @@ -153,7 +162,9 @@ "Could not sync Pending": "保留中のリクエストを同期できませんでした", "Could not sync chats": "チャットを同期できませんでした", "Could not update the conversation.": "会話を更新できませんでした。", + "Could not update the goal.": "目標を更新できませんでした。", "Could not update the message queue.": "メッセージキューを更新できませんでした。", + "Could not verify this chat’s settings. Review them and try again.": "チャットの設定を確認できませんでした。設定を見直してやり直してください。", "Create Room": "ルームを作成", "Create Room on {name}": "{name} でルームを作成", "Creating…": "作成中…", @@ -189,16 +200,22 @@ "Disabled": "無効", "Disabled servers": "無効なサーバー", "Discard": "破棄", + "Discard Edits": "変更を破棄", "Discard changes?": "変更を破棄しますか?", + "Discard goal edits?": "目標への変更を破棄しますか?", "Disconnect": "接続を解除", "Discover models": "モデルを検索", "Discovering models…": "モデルを検索中…", "Dismiss": "閉じる", + "Dismiss Goal Summary": "目標の概要を非表示", "Dismiss keyboard": "キーボードを閉じる", "Done": "完了", "Edit": "編集", + "Edit Budget": "予算を変更", "Edit queued message": "キュー内メッセージを編集", + "Elapsed": "経過時間", "Enable": "有効にする", + "Enable Goal tools for this chat to start or resume a goal.": "目標を開始・再開するには、このチャットの目標ツールを有効にしてください。", "Enable proxy": "プロキシを有効にする", "Enable the parent plugin first.": "先に親プラグインを有効にしてください。", "Enable web search": "ウェブ検索を有効にする", @@ -208,6 +225,7 @@ "Enter a JSON object.": "JSON オブジェクトを入力してください。", "Enter a connection name.": "接続名を入力してください。", "Enter a name and select a model.": "名前を入力してモデルを選んでください。", + "Enter a positive whole number, or leave it blank for no limit.": "正の整数を入力してください。空欄の場合は上限なしになります。", "Enter a proxy host and a port from 1 to 65535.": "プロキシのホストと 1〜65535 のポート番号を入力してください。", "Enter a proxy password.": "プロキシのパスワードを入力してください。", "Enter a public HTTPS URL.": "公開 HTTPS URL を入力してください。", @@ -221,6 +239,7 @@ "Files & Changes": "ファイルと変更", "Filesystem: no additional access": "ファイルシステム:追加アクセスなし", "Find skills": "スキルを探す", + "Finish or cancel the current goal first.": "先に現在の目標を完了するか、取り消してください。", "Flash": "ライト", "Flash On": "ライトオン", "Folder is empty": "フォルダは空です", @@ -229,6 +248,16 @@ "Full access": "フルアクセス", "General": "一般", "Global": "グローバル", + "Goal Achieved": "目標を達成", + "Goal Blocked": "目標が進められません", + "Goal Budget Limited": "目標の予算制限", + "Goal Cancelled": "目標を取り消しました", + "Goal Details": "目標の詳細", + "Goal Details…": "目標の詳細…", + "Goal Paused": "目標を一時停止中", + "Goal Ready": "目標の準備完了", + "Goal in Progress": "目標を実行中", + "Goals are turned off on this computer.": "このコンピュータでは目標機能が無効になっています。", "HTTP header": "HTTP ヘッダー", "HTTP headers": "HTTP ヘッダー", "HTTP method": "HTTP メソッド", @@ -251,10 +280,13 @@ "Invalid API key": "API キーが無効です", "Invalid stored language preference.": "保存されている言語設定が無効です。", "JSON body": "JSON ボディ", + "Keep Editing": "編集を続ける", + "Keep Goal": "目標を残す", "Keep my edit": "編集内容を保持", "Language": "言語", "Last request": "前回のリクエスト", "Last synced": "前回の同期", + "Last synced · Read-only": "最終同期時点 · 読み取り専用", "Latest": "最新", "Leave blank for automatic title": "空欄の場合は自動でタイトルを設定", "Light": "ライト", @@ -266,6 +298,7 @@ "Low": "低", "MCP": "MCP", "Maka is shutting down. Try again after it restarts.": "Maka は終了処理中です。再起動後にお試しください。", + "Mark Complete": "完了にする", "Max output tokens": "最大出力トークン数", "Maximum": "最大", "Medium": "中", @@ -290,7 +323,10 @@ "Network: no access": "ネットワーク:アクセス不可", "Network: no destinations": "ネットワーク:接続先の指定なし", "New Chat": "新規チャット", + "New Goal": "新しい目標", + "New Goal…": "新しい目標…", "New Room": "新規ルーム", + "Next attempt: {time}": "次回の試行:{time}", "No MCP servers": "MCP サーバーがありません", "No approvals or questions are waiting across your connected computers.": "接続中のコンピュータに保留中の承認や質問はありません。", "No approvals or questions are waiting.": "保留中の承認や質問はありません。", @@ -309,6 +345,7 @@ "Not measured": "未計測", "Not sent. Choose a workspace, then retry.": "送信されませんでした。ワークスペースを選択してから再試行してください。", "Now": "今", + "Objective": "目標", "Off": "オフ", "Offline": "オフライン", "Open Conversation": "会話を開く", @@ -332,6 +369,7 @@ "Paste pairing link": "ペアリングリンクをペースト", "Paste pairing link or connect manually": "ペアリングリンクをペーストまたは手動接続", "Paste relay token": "リレートークンをペースト", + "Pause Goal": "目標を一時停止", "Pending": "保留中", "Permission": "権限", "Permission requests are disabled": "権限リクエストは無効です", @@ -383,8 +421,10 @@ "Relay URL (optional)": "リレー URL(任意)", "Relay · {latency} ms": "リレー経由 · {latency} ms", "Relays": "リレー", + "Remaining": "残り", "Remove": "削除", "Remove Computer": "コンピュータを削除", + "Remove Limit & Resume": "上限を解除して再開", "Remove connection": "接続を削除", "Remove conversation link: {title}": "会話リンクを削除:{title}", "Remove queued message": "キューから削除", @@ -407,6 +447,7 @@ "Result snippet path (optional)": "結果スニペットのパス(任意)", "Result title path (optional)": "結果タイトルのパス(任意)", "Results array path": "結果配列のパス", + "Resume Goal": "目標を再開", "Retry": "再試行", "Retry now": "今すぐ再試行", "Review latest": "最新版を確認", @@ -421,6 +462,7 @@ "Running {count, plural, one {# tool} other {# tools}}…": "{count, plural, other {# 個のツールを実行中}}…", "Save": "保存", "Save API key": "API キーを保存", + "Save Budget": "予算を保存", "Save usage credential": "使用量の認証情報を保存", "Save your provider settings before changing its API key.": "API キーを変更する前に、プロバイダの設定を保存してください。", "Saved Host relay Bearer token": "保存済みホストのリレー用 Bearer トークン", @@ -445,6 +487,7 @@ "Sending…": "送信中…", "Server-side compaction": "サーバー側で圧縮", "Service": "サービス", + "Set a limit above {count} tokens used, or leave it blank for no limit.": "使用済みの {count} トークンより大きい値を入力するか、空欄にして上限を外してください。", "Settings": "設定", "Shadowed": "上書き済み", "Show": "表示", @@ -460,6 +503,7 @@ "Source unavailable": "参照元を利用できません", "Start Chat": "チャットを開始", "Start Chat on {name}": "{name} でチャットを開始", + "Start Goal": "目標を開始", "Start a conversation on any connected computer and it will appear here automatically.": "接続中のコンピュータで会話を開始すると、ここに自動で表示されます。", "Status": "ステータス", "Steer now": "今すぐ指示を送る", @@ -480,8 +524,13 @@ "Team ID": "チーム ID", "Test connection": "接続をテスト", "The active turn changed. Your message is kept.": "実行中のターンが変わりました。メッセージは保持されています。", + "The agent continues automatically in later turns. It checks the budget between turns, so the current turn may go over.": "エージェントは次のターン以降も自動で続行します。予算はターンの合間に確認するため、現在のターンでは予算を超えることがあります。", + "The agent won’t start any more turns for this goal.": "この目標のための新しいターンは開始されません。", + "The computer rejected the goal change: {reason}": "コンピュータが目標の変更を拒否しました:{reason}", "The conversation changed. Send a new message instead.": "会話が変わりました。新しいメッセージを送信してください。", "The deployment document is invalid.": "デプロイドキュメントが無効です。", + "The goal changed. Close the editor to review it.": "目標が変更されました。編集画面を閉じて確認してください。", + "The goal changed. Review it and try again.": "目標が変更されました。確認してからやり直してください。", "The main conversation is no longer available.": "元の会話を開けなくなりました。", "The plugin bundle could not be downloaded.": "プラグインバンドルをダウンロードできませんでした。", "The plugin bundle is invalid.": "プラグインバンドルが無効です。", @@ -519,6 +568,8 @@ "Thought process": "思考プロセス", "Thought process · {count, plural, one {# tool} other {# tools}}": "思考プロセス · {count, plural, other {# 個のツール}}", "Title (optional)": "タイトル(任意)", + "Token Budget": "トークン予算", + "Token Budget (Optional)": "トークン予算(任意)", "Token limits": "トークン上限", "Token limits must be positive whole numbers.": "トークン上限には正の整数を指定してください。", "Tool call": "ツール呼び出し", @@ -529,18 +580,25 @@ "Try a different search term or switch the computer filter.": "別の検索語を試すか、コンピュータのフィルタを切り替えてください。", "Turn off flashlight": "ライトをオフ", "Turn on flashlight": "ライトをオン", + "Turns": "ターン数", "URL parameters": "URL パラメータ", "URL query": "URL クエリ", "Ultra": "超高", "Unavailable": "利用不可", + "Unknown": "不明", + "Unknown · Incomplete usage": "不明 · 使用量の一部が未集計", + "Unlimited": "上限なし", "Unpin": "ピン留め解除", "Update": "更新", + "Updating goal…": "目標を更新中…", "Usage": "使用状況", "Usage & Details": "使用状況と詳細", "Usage credential": "使用量の認証情報", + "Usage is incomplete. To resume now, remove the limit.": "使用量が一部不明です。今すぐ再開するには、上限を解除してください。", "Use Host default": "ホストのデフォルトを使用", "Use a URL without credentials.": "認証情報を含まない URL を使ってください。", "Use an HTTP URL without credentials or query parameters. Use environment references or edit on Desktop.": "認証情報やクエリパラメーターを含まない HTTP URL を使ってください。環境変数を参照するか、デスクトップで編集してください。", + "Used": "使用済み", "Used {count, plural, one {# tool} other {# tools}}": "{count, plural, other {# 個のツールを使用}}", "User action required": "ユーザーの操作が必要です", "Username": "ユーザー名", @@ -552,6 +610,7 @@ "Waiting for current turn": "現在のターン完了待ち", "Waiting for provider sign-in…": "プロバイダへのログインを待っています…", "Waiting for queue…": "キューに追加中…", + "Waiting for this turn to finish.": "現在のターンが終わるまでお待ちください。", "Waiting for your response": "応答待ち", "Web Search": "Web 検索", "WebSocket": "WebSocket", @@ -573,6 +632,8 @@ "{count, plural, one {# message queued} other {# messages queued}}": "{count, plural, other {# 件のメッセージが待機中}}", "{count, plural, one {# quote} other {# quotes}}": "{count, plural, other {引用 # 件}}", "{count} queued": "{count} 件待機中", + "{count} s": "{count} 秒", + "{count} tokens": "{count} トークン", "{count}d": "{count}日前", "{count}h": "{count}時間前", "{count}m": "{count}分前", diff --git a/products/maka/ios-shell/locales/ko.json b/products/maka/ios-shell/locales/ko.json index 33cb05a377b..33179ea5774 100644 --- a/products/maka/ios-shell/locales/ko.json +++ b/products/maka/ios-shell/locales/ko.json @@ -15,6 +15,7 @@ "Add to queue": "대기열에 추가", "Add to quotes": "인용에 추가", "Additional permissions requested": "추가 권한 요청됨", + "Adjust Budget & Resume": "예산 조정 후 재개", "Advanced options": "고급 옵션", "Agent": "에이전트", "All": "전체", @@ -46,6 +47,7 @@ "Arguments": "인수", "Ask Side Question": "곁질문하기", "Assistant language": "어시스턴트 언어", + "At least {count} tokens": "최소 {count}토큰", "Authentication": "인증", "Authentication field name": "인증 필드 이름", "Authentication location": "인증 위치", @@ -65,9 +67,13 @@ "Camera could not start.": "카메라를 시작할 수 없습니다.", "Camera unavailable on this device": "이 기기에서 카메라를 사용할 수 없음", "Cancel": "취소", + "Cancel Editing": "편집 취소", + "Cancel Goal": "목표 취소", + "Cancel this goal?": "이 목표를 취소할까요?", "Changes": "변경 사항", "Changes ({count})": "변경 사항 ({count})", "Chat": "채팅", + "Chat settings changed. Review them and try again.": "채팅 설정이 변경되었습니다. 확인한 뒤 다시 시도하세요.", "Chats": "대화", "Check connection": "연결 확인", "Checking pairing invite…": "페어링 초대 확인 중…", @@ -120,6 +126,7 @@ "Continue only if this code matches the one displayed on your computer.": "컴퓨터 화면에 표시된 코드와 일치하는지 확인한 후 계속하세요.", "Continue reply": "답변 계속하기", "Continue your work from any computer": "어떤 컴퓨터의 작업이든 이어서 하세요", + "Continuing goal: {objective}": "목표 계속 진행: {objective}", "Continuing reply…": "답변을 이어가는 중…", "Conversation title": "대화 제목", "Conversation: {title}": "대화: {title}", @@ -130,6 +137,7 @@ "Copy edit": "편집 내용 복사", "Copy reply": "응답 복사", "Could not change the model.": "모델을 변경할 수 없습니다.", + "Could not confirm the goal change. Check its status before trying again.": "목표가 변경되었는지 확인할 수 없습니다. 다시 시도하기 전에 상태를 확인하세요.", "Could not confirm whether the message was sent. Check the conversation or queue before retrying.": "메시지가 전송되었는지 확인하지 못했습니다. 다시 시도하기 전에 대화 기록이나 대기열을 확인하세요.", "Could not continue the reply. Try again.": "답변을 이어가지 못했어요. 다시 시도해 주세요.", "Could not copy the edit.": "수정 내용을 복사하지 못했습니다.", @@ -143,6 +151,7 @@ "Could not read or update settings.": "설정을 읽거나 업데이트할 수 없습니다.", "Could not read the queued message.": "대기 중인 메시지를 읽지 못했습니다.", "Could not read the skill source.": "스킬 소스를 읽지 못했습니다.", + "Could not refresh the goal.": "목표를 새로 고칠 수 없습니다.", "Could not remove the MCP server.": "MCP 서버를 삭제하지 못했습니다.", "Could not save the MCP server.": "MCP 서버를 저장하지 못했습니다.", "Could not save the credential.": "인증 정보를 저장하지 못했습니다.", @@ -153,7 +162,9 @@ "Could not sync Pending": "대기 중인 요청을 동기화하지 못했습니다", "Could not sync chats": "채팅을 동기화할 수 없습니다", "Could not update the conversation.": "대화를 업데이트할 수 없습니다.", + "Could not update the goal.": "목표를 업데이트할 수 없습니다.", "Could not update the message queue.": "메시지 대기열을 업데이트할 수 없습니다.", + "Could not verify this chat’s settings. Review them and try again.": "채팅 설정을 확인할 수 없습니다. 설정을 검토한 뒤 다시 시도하세요.", "Create Room": "룸 만들기", "Create Room on {name}": "{name}에서 룸 만들기", "Creating…": "만드는 중…", @@ -189,16 +200,22 @@ "Disabled": "비활성화됨", "Disabled servers": "비활성화된 서버", "Discard": "버리기", + "Discard Edits": "변경 사항 버리기", "Discard changes?": "변경 사항을 버릴까요?", + "Discard goal edits?": "목표에 대한 변경 사항을 버릴까요?", "Disconnect": "연결 해제", "Discover models": "모델 찾기", "Discovering models…": "모델을 찾는 중…", "Dismiss": "닫기", + "Dismiss Goal Summary": "목표 요약 숨기기", "Dismiss keyboard": "키보드 닫기", "Done": "완료", "Edit": "편집", + "Edit Budget": "예산 수정", "Edit queued message": "대기열 메시지 편집", + "Elapsed": "경과 시간", "Enable": "활성화", + "Enable Goal tools for this chat to start or resume a goal.": "목표를 시작하거나 재개하려면 이 채팅의 목표 도구를 켜세요.", "Enable proxy": "프록시 사용", "Enable the parent plugin first.": "상위 플러그인을 먼저 활성화하세요.", "Enable web search": "웹 검색 사용", @@ -208,6 +225,7 @@ "Enter a JSON object.": "JSON 객체를 입력하세요.", "Enter a connection name.": "연결 이름을 입력하세요.", "Enter a name and select a model.": "이름을 입력하고 모델을 선택하세요.", + "Enter a positive whole number, or leave it blank for no limit.": "양의 정수를 입력하세요. 제한을 두지 않으려면 비워 두세요.", "Enter a proxy host and a port from 1 to 65535.": "프록시 호스트와 1~65535 사이의 포트를 입력하세요.", "Enter a proxy password.": "프록시 비밀번호를 입력하세요.", "Enter a public HTTPS URL.": "공개 HTTPS URL을 입력하세요.", @@ -221,6 +239,7 @@ "Files & Changes": "파일 및 변경 사항", "Filesystem: no additional access": "파일 시스템: 추가 접근 권한 없음", "Find skills": "스킬 찾기", + "Finish or cancel the current goal first.": "먼저 현재 목표를 완료하거나 취소하세요.", "Flash": "플래시", "Flash On": "플래시 켜짐", "Folder is empty": "폴더가 비어 있습니다", @@ -229,6 +248,16 @@ "Full access": "전체 접근", "General": "일반", "Global": "전역", + "Goal Achieved": "목표 달성", + "Goal Blocked": "목표가 막힘", + "Goal Budget Limited": "목표 예산 제한", + "Goal Cancelled": "목표 취소됨", + "Goal Details": "목표 세부 정보", + "Goal Details…": "목표 세부 정보…", + "Goal Paused": "목표 일시 중지됨", + "Goal Ready": "목표 준비됨", + "Goal in Progress": "목표 진행 중", + "Goals are turned off on this computer.": "이 컴퓨터에서는 목표 기능이 꺼져 있습니다.", "HTTP header": "HTTP 헤더", "HTTP headers": "HTTP 헤더", "HTTP method": "HTTP 메서드", @@ -251,10 +280,13 @@ "Invalid API key": "잘못된 API 키", "Invalid stored language preference.": "저장된 언어 설정이 올바르지 않습니다.", "JSON body": "JSON 본문", + "Keep Editing": "계속 편집", + "Keep Goal": "목표 유지", "Keep my edit": "내 편집 유지", "Language": "언어", "Last request": "지난 요청", "Last synced": "마지막 동기화", + "Last synced · Read-only": "마지막 동기화 · 읽기 전용", "Latest": "최신", "Leave blank for automatic title": "비워 두면 제목이 자동 생성됩니다", "Light": "라이트", @@ -266,6 +298,7 @@ "Low": "낮음", "MCP": "MCP", "Maka is shutting down. Try again after it restarts.": "Maka가 종료 중이에요. 다시 시작한 후 시도해 주세요.", + "Mark Complete": "완료로 표시", "Max output tokens": "최대 출력 토큰", "Maximum": "최대", "Medium": "중간", @@ -290,7 +323,10 @@ "Network: no access": "네트워크: 접근 권한 없음", "Network: no destinations": "네트워크: 지정된 대상 없음", "New Chat": "새 대화", + "New Goal": "새 목표", + "New Goal…": "새 목표…", "New Room": "새 룸", + "Next attempt: {time}": "다음 시도: {time}", "No MCP servers": "MCP 서버 없음", "No approvals or questions are waiting across your connected computers.": "연결된 컴퓨터에 대기 중인 승인이나 질문이 없습니다.", "No approvals or questions are waiting.": "대기 중인 승인 요청이나 질문이 없습니다.", @@ -309,6 +345,7 @@ "Not measured": "측정값 없음", "Not sent. Choose a workspace, then retry.": "전송되지 않았습니다. 작업 공간을 선택한 후 다시 시도하세요.", "Now": "방금", + "Objective": "목표", "Off": "꺼짐", "Offline": "오프라인", "Open Conversation": "대화 열기", @@ -332,6 +369,7 @@ "Paste pairing link": "페어링 링크 붙여넣기", "Paste pairing link or connect manually": "페어링 링크 붙여넣기 또는 수동 연결", "Paste relay token": "릴레이 토큰 붙여넣기", + "Pause Goal": "목표 일시 중지", "Pending": "대기 중", "Permission": "권한", "Permission requests are disabled": "권한 요청이 비활성화되어 있습니다", @@ -383,8 +421,10 @@ "Relay URL (optional)": "릴레이 URL(선택)", "Relay · {latency} ms": "릴레이 경유 · {latency}ms", "Relays": "릴레이", + "Remaining": "남은 양", "Remove": "제거", "Remove Computer": "컴퓨터 제거", + "Remove Limit & Resume": "제한 해제 후 재개", "Remove connection": "연결 삭제", "Remove conversation link: {title}": "대화 링크 삭제: {title}", "Remove queued message": "대기 메시지 제거", @@ -407,6 +447,7 @@ "Result snippet path (optional)": "결과 스니펫 경로 (선택 사항)", "Result title path (optional)": "결과 제목 경로 (선택 사항)", "Results array path": "결과 배열 경로", + "Resume Goal": "목표 재개", "Retry": "다시 시도", "Retry now": "지금 다시 시도", "Review latest": "최신 버전 확인", @@ -421,6 +462,7 @@ "Running {count, plural, one {# tool} other {# tools}}…": "{count, plural, other {도구 #개 실행 중}}…", "Save": "저장", "Save API key": "API 키 저장", + "Save Budget": "예산 저장", "Save usage credential": "사용량 인증 정보 저장", "Save your provider settings before changing its API key.": "API 키를 변경하기 전에 제공업체 설정을 저장하세요.", "Saved Host relay Bearer token": "저장된 호스트 릴레이 Bearer 토큰", @@ -445,6 +487,7 @@ "Sending…": "전송 중…", "Server-side compaction": "서버 측 압축", "Service": "서비스", + "Set a limit above {count} tokens used, or leave it blank for no limit.": "사용한 {count}토큰보다 높게 설정하세요. 제한을 두지 않으려면 비워 두세요.", "Settings": "설정", "Shadowed": "가려짐", "Show": "보기", @@ -460,6 +503,7 @@ "Source unavailable": "소스를 사용할 수 없음", "Start Chat": "대화 시작", "Start Chat on {name}": "{name}에서 채팅 시작", + "Start Goal": "목표 시작", "Start a conversation on any connected computer and it will appear here automatically.": "연결된 컴퓨터에서 대화를 시작하면 여기에 자동으로 표시됩니다.", "Status": "상태", "Steer now": "지금 개입", @@ -480,8 +524,13 @@ "Team ID": "팀 ID", "Test connection": "연결 테스트", "The active turn changed. Your message is kept.": "진행 중인 턴이 바뀌었습니다. 메시지는 유지됩니다.", + "The agent continues automatically in later turns. It checks the budget between turns, so the current turn may go over.": "에이전트는 다음 턴부터 자동으로 계속 진행합니다. 예산은 턴 사이에 확인하므로 현재 턴에서 초과할 수 있습니다.", + "The agent won’t start any more turns for this goal.": "에이전트는 이 목표를 위해 새 턴을 시작하지 않습니다.", + "The computer rejected the goal change: {reason}": "컴퓨터가 목표 변경을 거부했습니다: {reason}", "The conversation changed. Send a new message instead.": "대화가 변경됐어요. 새 메시지를 보내 주세요.", "The deployment document is invalid.": "배포 문서가 올바르지 않습니다.", + "The goal changed. Close the editor to review it.": "목표가 변경되었습니다. 편집을 닫고 확인하세요.", + "The goal changed. Review it and try again.": "목표가 변경되었습니다. 확인한 뒤 다시 시도하세요.", "The main conversation is no longer available.": "원래 대화에 더 이상 접근할 수 없습니다.", "The plugin bundle could not be downloaded.": "플러그인 번들을 다운로드할 수 없습니다.", "The plugin bundle is invalid.": "플러그인 번들이 올바르지 않습니다.", @@ -519,6 +568,8 @@ "Thought process": "사고 과정", "Thought process · {count, plural, one {# tool} other {# tools}}": "사고 과정 · {count, plural, other {도구 #개}}", "Title (optional)": "제목(선택)", + "Token Budget": "토큰 예산", + "Token Budget (Optional)": "토큰 예산(선택)", "Token limits": "토큰 한도", "Token limits must be positive whole numbers.": "토큰 한도는 양의 정수여야 합니다.", "Tool call": "도구 호출", @@ -529,18 +580,25 @@ "Try a different search term or switch the computer filter.": "다른 검색어를 입력하거나 컴퓨터 필터를 변경해 보세요.", "Turn off flashlight": "손전등 끄기", "Turn on flashlight": "손전등 켜기", + "Turns": "턴 수", "URL parameters": "URL 매개변수", "URL query": "URL 쿼리", "Ultra": "초고강도", "Unavailable": "사용 불가", + "Unknown": "알 수 없음", + "Unknown · Incomplete usage": "알 수 없음 · 사용량 집계 불완전", + "Unlimited": "제한 없음", "Unpin": "고정 해제", "Update": "업데이트", + "Updating goal…": "목표 업데이트 중…", "Usage": "사용량", "Usage & Details": "사용량 및 세부 정보", "Usage credential": "사용량 인증 정보", + "Usage is incomplete. To resume now, remove the limit.": "사용량이 완전히 집계되지 않았습니다. 지금 재개하려면 제한을 해제하세요.", "Use Host default": "Host 기본값 사용", "Use a URL without credentials.": "인증 정보가 없는 URL을 사용하세요.", "Use an HTTP URL without credentials or query parameters. Use environment references or edit on Desktop.": "인증 정보나 쿼리 매개변수가 없는 HTTP URL을 사용하세요. 환경 변수를 참조하거나 데스크톱에서 편집하세요.", + "Used": "사용량", "Used {count, plural, one {# tool} other {# tools}}": "{count, plural, other {도구 #개 사용함}}", "User action required": "사용자 조치 필요", "Username": "사용자 이름", @@ -552,6 +610,7 @@ "Waiting for current turn": "현재 턴 완료 대기 중", "Waiting for provider sign-in…": "제공업체 로그인을 기다리는 중…", "Waiting for queue…": "대기열에 추가 중…", + "Waiting for this turn to finish.": "현재 턴이 끝나기를 기다리는 중입니다.", "Waiting for your response": "응답 대기 중", "Web Search": "웹 검색", "WebSocket": "WebSocket", @@ -573,6 +632,8 @@ "{count, plural, one {# message queued} other {# messages queued}}": "{count, plural, other {메시지 #개 대기 중}}", "{count, plural, one {# quote} other {# quotes}}": "{count, plural, other {인용 #개}}", "{count} queued": "{count}개 대기 중", + "{count} s": "{count}초", + "{count} tokens": "{count}토큰", "{count}d": "{count}일 전", "{count}h": "{count}시간 전", "{count}m": "{count}분 전", diff --git a/products/maka/ios-shell/locales/pt-BR.json b/products/maka/ios-shell/locales/pt-BR.json index ff56528d17b..5e52238e5b6 100644 --- a/products/maka/ios-shell/locales/pt-BR.json +++ b/products/maka/ios-shell/locales/pt-BR.json @@ -15,6 +15,7 @@ "Add to queue": "Adicionar à fila", "Add to quotes": "Adicionar às citações", "Additional permissions requested": "Permissões adicionais solicitadas", + "Adjust Budget & Resume": "Ajustar orçamento e retomar", "Advanced options": "Opções avançadas", "Agent": "Agente", "All": "Tudo", @@ -46,6 +47,7 @@ "Arguments": "Argumentos", "Ask Side Question": "Fazer uma pergunta paralela", "Assistant language": "Idioma do assistente", + "At least {count} tokens": "Pelo menos {count} tokens", "Authentication": "Autenticação", "Authentication field name": "Nome do campo de autenticação", "Authentication location": "Local da autenticação", @@ -65,9 +67,13 @@ "Camera could not start.": "Não foi possível iniciar a câmera.", "Camera unavailable on this device": "Câmera indisponível neste dispositivo", "Cancel": "Cancelar", + "Cancel Editing": "Cancelar edição", + "Cancel Goal": "Cancelar meta", + "Cancel this goal?": "Cancelar esta meta?", "Changes": "Alterações", "Changes ({count})": "Alterações ({count})", "Chat": "Conversa", + "Chat settings changed. Review them and try again.": "As configurações da conversa mudaram. Confira e tente novamente.", "Chats": "Conversas", "Check connection": "Verificar conexão", "Checking pairing invite…": "Verificando convite de pareamento…", @@ -120,6 +126,7 @@ "Continue only if this code matches the one displayed on your computer.": "Continue somente se este código corresponder ao exibido no seu computador.", "Continue reply": "Continuar resposta", "Continue your work from any computer": "Continue seu trabalho de qualquer computador", + "Continuing goal: {objective}": "Retomando a meta: {objective}", "Continuing reply…": "Continuando a resposta…", "Conversation title": "Título da conversa", "Conversation: {title}": "Conversa: {title}", @@ -130,6 +137,7 @@ "Copy edit": "Copiar edição", "Copy reply": "Copiar resposta", "Could not change the model.": "Não foi possível alterar o modelo.", + "Could not confirm the goal change. Check its status before trying again.": "Não foi possível confirmar a alteração. Consulte o status da meta antes de tentar novamente.", "Could not confirm whether the message was sent. Check the conversation or queue before retrying.": "Não foi possível confirmar se a mensagem foi enviada. Confira a conversa ou a fila antes de tentar novamente.", "Could not continue the reply. Try again.": "Não foi possível continuar a resposta. Tente novamente.", "Could not copy the edit.": "Não foi possível copiar a edição.", @@ -143,6 +151,7 @@ "Could not read or update settings.": "Não foi possível ler ou atualizar as configurações.", "Could not read the queued message.": "Não foi possível ler a mensagem na fila.", "Could not read the skill source.": "Não foi possível ler a origem da habilidade.", + "Could not refresh the goal.": "Não foi possível recarregar a meta.", "Could not remove the MCP server.": "Não foi possível remover o servidor MCP.", "Could not save the MCP server.": "Não foi possível salvar o servidor MCP.", "Could not save the credential.": "Não foi possível salvar a credencial.", @@ -153,7 +162,9 @@ "Could not sync Pending": "Não foi possível sincronizar as solicitações pendentes", "Could not sync chats": "Não foi possível sincronizar as conversas", "Could not update the conversation.": "Não foi possível atualizar a conversa.", + "Could not update the goal.": "Não foi possível alterar a meta.", "Could not update the message queue.": "Não foi possível atualizar a fila de mensagens.", + "Could not verify this chat’s settings. Review them and try again.": "Não foi possível verificar as configurações da conversa. Confira e tente novamente.", "Create Room": "Criar sala", "Create Room on {name}": "Criar sala em {name}", "Creating…": "Criando…", @@ -189,16 +200,22 @@ "Disabled": "Desativado", "Disabled servers": "Servidores desativados", "Discard": "Descartar", + "Discard Edits": "Descartar alterações", "Discard changes?": "Descartar alterações?", + "Discard goal edits?": "Descartar alterações na meta?", "Disconnect": "Desconectar", "Discover models": "Buscar modelos", "Discovering models…": "Buscando modelos…", "Dismiss": "Dispensar", + "Dismiss Goal Summary": "Ocultar resumo da meta", "Dismiss keyboard": "Ocultar teclado", "Done": "OK", "Edit": "Editar", + "Edit Budget": "Editar orçamento", "Edit queued message": "Editar mensagem na fila", + "Elapsed": "Tempo decorrido", "Enable": "Ativar", + "Enable Goal tools for this chat to start or resume a goal.": "Ative as ferramentas de meta nesta conversa para iniciar ou retomar uma meta.", "Enable proxy": "Ativar proxy", "Enable the parent plugin first.": "Ative o plugin pai primeiro.", "Enable web search": "Ativar busca na web", @@ -208,6 +225,7 @@ "Enter a JSON object.": "Insira um objeto JSON.", "Enter a connection name.": "Informe um nome de conexão.", "Enter a name and select a model.": "Informe um nome e selecione um modelo.", + "Enter a positive whole number, or leave it blank for no limit.": "Insira um número inteiro positivo ou deixe em branco para não definir limite.", "Enter a proxy host and a port from 1 to 65535.": "Informe o host do proxy e uma porta de 1 a 65535.", "Enter a proxy password.": "Informe a senha do proxy.", "Enter a public HTTPS URL.": "Informe um URL HTTPS público.", @@ -221,6 +239,7 @@ "Files & Changes": "Arquivos e alterações", "Filesystem: no additional access": "Sistema de arquivos: sem acesso adicional", "Find skills": "Buscar habilidades", + "Finish or cancel the current goal first.": "Conclua ou cancele a meta atual primeiro.", "Flash": "Lanterna", "Flash On": "Lanterna ligada", "Folder is empty": "A pasta está vazia", @@ -229,6 +248,16 @@ "Full access": "Acesso total", "General": "Geral", "Global": "Global", + "Goal Achieved": "Meta atingida", + "Goal Blocked": "Meta bloqueada", + "Goal Budget Limited": "Meta limitada pelo orçamento", + "Goal Cancelled": "Meta cancelada", + "Goal Details": "Detalhes da meta", + "Goal Details…": "Detalhes da meta…", + "Goal Paused": "Meta pausada", + "Goal Ready": "Meta pronta", + "Goal in Progress": "Meta em andamento", + "Goals are turned off on this computer.": "As metas estão desativadas neste computador.", "HTTP header": "Cabeçalho HTTP", "HTTP headers": "Cabeçalhos HTTP", "HTTP method": "Método HTTP", @@ -251,10 +280,13 @@ "Invalid API key": "Chave de API inválida", "Invalid stored language preference.": "A preferência de idioma salva é inválida.", "JSON body": "Corpo JSON", + "Keep Editing": "Continuar editando", + "Keep Goal": "Manter meta", "Keep my edit": "Manter minha edição", "Language": "Idioma", "Last request": "Última solicitação", "Last synced": "Última sincronização", + "Last synced · Read-only": "Última sincronização · Somente leitura", "Latest": "Mais recente", "Leave blank for automatic title": "Deixe em branco para título automático", "Light": "Claro", @@ -266,6 +298,7 @@ "Low": "Baixo", "MCP": "MCP", "Maka is shutting down. Try again after it restarts.": "O Maka está encerrando. Tente novamente após reiniciá-lo.", + "Mark Complete": "Marcar como concluída", "Max output tokens": "Máximo de tokens de saída", "Maximum": "Máximo", "Medium": "Médio", @@ -290,7 +323,10 @@ "Network: no access": "Rede: sem acesso", "Network: no destinations": "Rede: nenhum destino", "New Chat": "Nova conversa", + "New Goal": "Nova meta", + "New Goal…": "Nova meta…", "New Room": "Nova sala", + "Next attempt: {time}": "Próxima tentativa: {time}", "No MCP servers": "Nenhum servidor MCP", "No approvals or questions are waiting across your connected computers.": "Não há aprovações ou perguntas pendentes nos computadores conectados.", "No approvals or questions are waiting.": "Nenhuma aprovação ou pergunta pendente.", @@ -309,6 +345,7 @@ "Not measured": "Não medida", "Not sent. Choose a workspace, then retry.": "Não enviado. Escolha um espaço de trabalho e tente novamente.", "Now": "Agora", + "Objective": "Objetivo", "Off": "Desativado", "Offline": "Off-line", "Open Conversation": "Abrir conversa", @@ -332,6 +369,7 @@ "Paste pairing link": "Colar link de pareamento", "Paste pairing link or connect manually": "Colar link ou conectar manualmente", "Paste relay token": "Colar token de relay", + "Pause Goal": "Pausar meta", "Pending": "Pendentes", "Permission": "Permissão", "Permission requests are disabled": "Solicitações de permissão estão desativadas", @@ -383,8 +421,10 @@ "Relay URL (optional)": "URL do relay (opcional)", "Relay · {latency} ms": "Via retransmissor · {latency} ms", "Relays": "Retransmissores", + "Remaining": "Restantes", "Remove": "Remover", "Remove Computer": "Remover computador", + "Remove Limit & Resume": "Remover limite e retomar", "Remove connection": "Remover conexão", "Remove conversation link: {title}": "Remover link da conversa: {title}", "Remove queued message": "Remover da fila", @@ -407,6 +447,7 @@ "Result snippet path (optional)": "Caminho do trecho do resultado (opcional)", "Result title path (optional)": "Caminho do título do resultado (opcional)", "Results array path": "Caminho do array de resultados", + "Resume Goal": "Retomar meta", "Retry": "Tentar novamente", "Retry now": "Tentar novamente agora", "Review latest": "Conferir versão atual", @@ -421,6 +462,7 @@ "Running {count, plural, one {# tool} other {# tools}}…": "Executando {count, plural, one {# ferramenta} other {# ferramentas}}…", "Save": "Salvar", "Save API key": "Salvar chave de API", + "Save Budget": "Salvar orçamento", "Save usage credential": "Salvar credencial de uso", "Save your provider settings before changing its API key.": "Salve as configurações do provedor antes de alterar a chave de API.", "Saved Host relay Bearer token": "Token Bearer do retransmissor do Host salvo", @@ -445,6 +487,7 @@ "Sending…": "Enviando…", "Server-side compaction": "Compactação no servidor", "Service": "Serviço", + "Set a limit above {count} tokens used, or leave it blank for no limit.": "Defina um limite acima dos {count} tokens usados ou deixe em branco para não definir limite.", "Settings": "Configurações", "Shadowed": "Sobreposto", "Show": "Mostrar", @@ -460,6 +503,7 @@ "Source unavailable": "Origem indisponível", "Start Chat": "Iniciar conversa", "Start Chat on {name}": "Iniciar conversa em {name}", + "Start Goal": "Iniciar meta", "Start a conversation on any connected computer and it will appear here automatically.": "Inicie uma conversa em qualquer computador conectado e ela aparecerá aqui automaticamente.", "Status": "Status", "Steer now": "Orientar agora", @@ -480,8 +524,13 @@ "Team ID": "ID da equipe", "Test connection": "Testar conexão", "The active turn changed. Your message is kept.": "O turno ativo mudou. Sua mensagem foi mantida.", + "The agent continues automatically in later turns. It checks the budget between turns, so the current turn may go over.": "O agente continua automaticamente nos próximos turnos. Como o orçamento é verificado entre turnos, o turno atual pode ultrapassá-lo.", + "The agent won’t start any more turns for this goal.": "O agente não iniciará novos turnos para esta meta.", + "The computer rejected the goal change: {reason}": "O computador recusou a alteração da meta: {reason}", "The conversation changed. Send a new message instead.": "A conversa mudou. Envie uma nova mensagem.", "The deployment document is invalid.": "O documento de implantação é inválido.", + "The goal changed. Close the editor to review it.": "A meta mudou. Feche o editor para conferi-la.", + "The goal changed. Review it and try again.": "A meta mudou. Confira e tente novamente.", "The main conversation is no longer available.": "A conversa principal não está mais disponível.", "The plugin bundle could not be downloaded.": "Não foi possível baixar o pacote do plugin.", "The plugin bundle is invalid.": "O pacote do plugin é inválido.", @@ -519,6 +568,8 @@ "Thought process": "Raciocínio", "Thought process · {count, plural, one {# tool} other {# tools}}": "Raciocínio · {count, plural, one {# ferramenta} other {# ferramentas}}", "Title (optional)": "Título (opcional)", + "Token Budget": "Orçamento de tokens", + "Token Budget (Optional)": "Orçamento de tokens (opcional)", "Token limits": "Limites de tokens", "Token limits must be positive whole numbers.": "Os limites de tokens devem ser números inteiros positivos.", "Tool call": "Chamada de ferramenta", @@ -529,18 +580,25 @@ "Try a different search term or switch the computer filter.": "Tente outro termo de busca ou altere o filtro de computador.", "Turn off flashlight": "Desligar lanterna", "Turn on flashlight": "Ligar lanterna", + "Turns": "Turnos", "URL parameters": "Parâmetros de URL", "URL query": "Consulta de URL", "Ultra": "Ultra", "Unavailable": "Indisponível", + "Unknown": "Desconhecido", + "Unknown · Incomplete usage": "Desconhecido · Dados de uso incompletos", + "Unlimited": "Sem limite", "Unpin": "Desafixar", "Update": "Atualizar", + "Updating goal…": "Atualizando meta…", "Usage": "Uso", "Usage & Details": "Uso e detalhes", "Usage credential": "Credencial de uso", + "Usage is incomplete. To resume now, remove the limit.": "Os dados de uso estão incompletos. Remova o limite para retomar agora.", "Use Host default": "Usar padrão do Host", "Use a URL without credentials.": "Use um URL sem credenciais.", "Use an HTTP URL without credentials or query parameters. Use environment references or edit on Desktop.": "Use um URL HTTP sem credenciais nem parâmetros de consulta. Use referências ao ambiente ou edite no desktop.", + "Used": "Usados", "Used {count, plural, one {# tool} other {# tools}}": "{count, plural, one {# ferramenta usada} other {# ferramentas usadas}}", "User action required": "Ação do usuário necessária", "Username": "Nome de usuário", @@ -552,6 +610,7 @@ "Waiting for current turn": "Aguardando turno atual", "Waiting for provider sign-in…": "Aguardando login no provedor…", "Waiting for queue…": "Adicionando à fila…", + "Waiting for this turn to finish.": "Aguardando o fim do turno atual.", "Waiting for your response": "Aguardando sua resposta", "Web Search": "Busca web", "WebSocket": "WebSocket", @@ -573,6 +632,8 @@ "{count, plural, one {# message queued} other {# messages queued}}": "{count, plural, one {# mensagem na fila} other {# mensagens na fila}}", "{count, plural, one {# quote} other {# quotes}}": "{count, plural, one {# citação} other {# citações}}", "{count} queued": "Na fila: {count}", + "{count} s": "{count} s", + "{count} tokens": "{count} tokens", "{count}d": "{count} d", "{count}h": "{count} h", "{count}m": "{count} min", diff --git a/products/maka/ios-shell/locales/ru.json b/products/maka/ios-shell/locales/ru.json index 459e4671fce..b71a222ee7e 100644 --- a/products/maka/ios-shell/locales/ru.json +++ b/products/maka/ios-shell/locales/ru.json @@ -15,6 +15,7 @@ "Add to queue": "Добавить в очередь", "Add to quotes": "Добавить к цитатам", "Additional permissions requested": "Запрошены дополнительные разрешения", + "Adjust Budget & Resume": "Изменить бюджет и продолжить", "Advanced options": "Дополнительные параметры", "Agent": "Агент", "All": "Все", @@ -46,6 +47,7 @@ "Arguments": "Аргументы", "Ask Side Question": "Задать вопрос отдельно", "Assistant language": "Язык ассистента", + "At least {count} tokens": "Не менее {count} токенов", "Authentication": "Аутентификация", "Authentication field name": "Имя поля аутентификации", "Authentication location": "Расположение параметра аутентификации", @@ -65,9 +67,13 @@ "Camera could not start.": "Не удалось запустить камеру.", "Camera unavailable on this device": "Камера недоступна на этом устройстве", "Cancel": "Отмена", + "Cancel Editing": "Отменить правку", + "Cancel Goal": "Отменить цель", + "Cancel this goal?": "Отменить эту цель?", "Changes": "Изменения", "Changes ({count})": "Изменения ({count})", "Chat": "Чат", + "Chat settings changed. Review them and try again.": "Настройки чата изменились. Проверьте их и повторите попытку.", "Chats": "Чаты", "Check connection": "Проверить подключение", "Checking pairing invite…": "Проверка приглашения…", @@ -120,6 +126,7 @@ "Continue only if this code matches the one displayed on your computer.": "Продолжайте, только если этот код совпадает с кодом на экране компьютера.", "Continue reply": "Продолжить ответ", "Continue your work from any computer": "Продолжайте работу с любого компьютера", + "Continuing goal: {objective}": "Продолжение цели: {objective}", "Continuing reply…": "Возобновление ответа…", "Conversation title": "Название диалога", "Conversation: {title}": "Диалог: {title}", @@ -130,6 +137,7 @@ "Copy edit": "Копировать правку", "Copy reply": "Копировать ответ", "Could not change the model.": "Не удалось сменить модель.", + "Could not confirm the goal change. Check its status before trying again.": "Не удалось подтвердить изменение цели. Проверьте её состояние перед повторной попыткой.", "Could not confirm whether the message was sent. Check the conversation or queue before retrying.": "Не удалось подтвердить, что сообщение отправлено. Перед повторной попыткой проверьте историю чата или очередь.", "Could not continue the reply. Try again.": "Не удалось продолжить ответ. Попробуйте ещё раз.", "Could not copy the edit.": "Не удалось скопировать правку.", @@ -143,6 +151,7 @@ "Could not read or update settings.": "Не удалось прочитать или обновить настройки.", "Could not read the queued message.": "Не удалось прочитать сообщение из очереди.", "Could not read the skill source.": "Не удалось прочитать источник навыка.", + "Could not refresh the goal.": "Не удалось обновить сведения о цели.", "Could not remove the MCP server.": "Не удалось удалить сервер MCP.", "Could not save the MCP server.": "Не удалось сохранить сервер MCP.", "Could not save the credential.": "Не удалось сохранить учётные данные.", @@ -153,7 +162,9 @@ "Could not sync Pending": "Не удалось синхронизировать ожидающие запросы", "Could not sync chats": "Не удалось синхронизировать чаты", "Could not update the conversation.": "Не удалось обновить диалог.", + "Could not update the goal.": "Не удалось изменить цель.", "Could not update the message queue.": "Не удалось обновить очередь сообщений.", + "Could not verify this chat’s settings. Review them and try again.": "Не удалось проверить настройки чата. Проверьте их и повторите попытку.", "Create Room": "Создать комнату", "Create Room on {name}": "Создать комнату на {name}", "Creating…": "Создание…", @@ -189,16 +200,22 @@ "Disabled": "Отключено", "Disabled servers": "Отключённые серверы", "Discard": "Отменить", + "Discard Edits": "Отбросить изменения", "Discard changes?": "Отменить изменения?", + "Discard goal edits?": "Отбросить изменения цели?", "Disconnect": "Отключиться", "Discover models": "Найти модели", "Discovering models…": "Поиск моделей…", "Dismiss": "Закрыть", + "Dismiss Goal Summary": "Скрыть сводку цели", "Dismiss keyboard": "Скрыть клавиатуру", "Done": "Готово", "Edit": "Редактировать", + "Edit Budget": "Изменить бюджет", "Edit queued message": "Редактировать сообщение в очереди", + "Elapsed": "Прошло", "Enable": "Включить", + "Enable Goal tools for this chat to start or resume a goal.": "Чтобы запустить или возобновить цель, включите инструменты целей в этом чате.", "Enable proxy": "Включить прокси", "Enable the parent plugin first.": "Сначала включите родительский плагин.", "Enable web search": "Включить поиск в интернете", @@ -208,6 +225,7 @@ "Enter a JSON object.": "Введите объект JSON.", "Enter a connection name.": "Введите название подключения.", "Enter a name and select a model.": "Введите имя и выберите модель.", + "Enter a positive whole number, or leave it blank for no limit.": "Введите положительное целое число или оставьте поле пустым, чтобы не задавать лимит.", "Enter a proxy host and a port from 1 to 65535.": "Введите адрес прокси и порт от 1 до 65535.", "Enter a proxy password.": "Введите пароль прокси.", "Enter a public HTTPS URL.": "Введите общедоступный HTTPS-адрес.", @@ -221,6 +239,7 @@ "Files & Changes": "Файлы и изменения", "Filesystem: no additional access": "Файловая система: без дополнительных прав", "Find skills": "Найти навыки", + "Finish or cancel the current goal first.": "Сначала завершите или отмените текущую цель.", "Flash": "Фонарик", "Flash On": "Фонарик вкл.", "Folder is empty": "Папка пуста", @@ -229,6 +248,16 @@ "Full access": "Полный доступ", "General": "Основные", "Global": "Глобально", + "Goal Achieved": "Цель достигнута", + "Goal Blocked": "Цель заблокирована", + "Goal Budget Limited": "Цель ограничена бюджетом", + "Goal Cancelled": "Цель отменена", + "Goal Details": "Сведения о цели", + "Goal Details…": "Сведения о цели…", + "Goal Paused": "Цель приостановлена", + "Goal Ready": "Цель готова", + "Goal in Progress": "Цель в работе", + "Goals are turned off on this computer.": "На этом компьютере цели отключены.", "HTTP header": "HTTP-заголовок", "HTTP headers": "HTTP-заголовки", "HTTP method": "HTTP-метод", @@ -251,10 +280,13 @@ "Invalid API key": "Недействительный ключ API", "Invalid stored language preference.": "Сохранённая настройка языка недействительна.", "JSON body": "Тело JSON", + "Keep Editing": "Продолжить правку", + "Keep Goal": "Сохранить цель", "Keep my edit": "Оставить мою правку", "Language": "Язык", "Last request": "Последний запрос", "Last synced": "Последняя синхронизация", + "Last synced · Read-only": "При последней синхронизации · Только чтение", "Latest": "Вниз", "Leave blank for automatic title": "Оставьте пустым для автоназвания", "Light": "Светлая", @@ -266,6 +298,7 @@ "Low": "Низкий", "MCP": "MCP", "Maka is shutting down. Try again after it restarts.": "Maka завершает работу. Попробуйте снова после перезапуска.", + "Mark Complete": "Отметить как выполненную", "Max output tokens": "Максимум токенов на выходе", "Maximum": "Максимальный", "Medium": "Средний", @@ -290,7 +323,10 @@ "Network: no access": "Сеть: доступ запрещён", "Network: no destinations": "Сеть: адреса не указаны", "New Chat": "Новый чат", + "New Goal": "Новая цель", + "New Goal…": "Новая цель…", "New Room": "Новая комната", + "Next attempt: {time}": "Следующая попытка: {time}", "No MCP servers": "Нет серверов MCP", "No approvals or questions are waiting across your connected computers.": "На подключённых компьютерах нет ожидающих подтверждений или вопросов.", "No approvals or questions are waiting.": "Нет запросов на одобрение или вопросов.", @@ -309,6 +345,7 @@ "Not measured": "Нет замера", "Not sent. Choose a workspace, then retry.": "Не отправлено. Выберите рабочую область и повторите попытку.", "Now": "Сейчас", + "Objective": "Цель", "Off": "Выкл.", "Offline": "Не в сети", "Open Conversation": "Открыть диалог", @@ -332,6 +369,7 @@ "Paste pairing link": "Вставить ссылку сопряжения", "Paste pairing link or connect manually": "Вставить ссылку или подключить вручную", "Paste relay token": "Вставить токен ретранслятора", + "Pause Goal": "Приостановить цель", "Pending": "Ожидают", "Permission": "Разрешение", "Permission requests are disabled": "Запросы разрешений отключены", @@ -383,8 +421,10 @@ "Relay URL (optional)": "URL ретранслятора (необязательно)", "Relay · {latency} ms": "Через ретранслятор · {latency} мс", "Relays": "Ретрансляторы", + "Remaining": "Осталось", "Remove": "Удалить", "Remove Computer": "Удалить компьютер", + "Remove Limit & Resume": "Снять лимит и продолжить", "Remove connection": "Удалить подключение", "Remove conversation link: {title}": "Удалить ссылку на чат: {title}", "Remove queued message": "Убрать из очереди", @@ -407,6 +447,7 @@ "Result snippet path (optional)": "Путь к фрагменту результата (необязательно)", "Result title path (optional)": "Путь к заголовку результата (необязательно)", "Results array path": "Путь к массиву результатов", + "Resume Goal": "Возобновить цель", "Retry": "Повторить", "Retry now": "Повторить сейчас", "Review latest": "Проверить текущую версию", @@ -421,6 +462,7 @@ "Running {count, plural, one {# tool} other {# tools}}…": "Выполняется инструментов: {count, plural, one {#} other {#}}…", "Save": "Сохранить", "Save API key": "Сохранить ключ API", + "Save Budget": "Сохранить бюджет", "Save usage credential": "Сохранить данные доступа к статистике", "Save your provider settings before changing its API key.": "Сохраните настройки провайдера, прежде чем менять ключ API.", "Saved Host relay Bearer token": "Сохранённый токен Bearer для ретранслятора хоста", @@ -445,6 +487,7 @@ "Sending…": "Отправка…", "Server-side compaction": "Сжатие на сервере", "Service": "Сервис", + "Set a limit above {count} tokens used, or leave it blank for no limit.": "Задайте лимит выше {count} использованных токенов или оставьте поле пустым.", "Settings": "Настройки", "Shadowed": "Перекрыто", "Show": "Показать", @@ -460,6 +503,7 @@ "Source unavailable": "Источник недоступен", "Start Chat": "Начать чат", "Start Chat on {name}": "Начать чат на {name}", + "Start Goal": "Запустить цель", "Start a conversation on any connected computer and it will appear here automatically.": "Начните диалог на любом подключённом компьютере, и он автоматически появится здесь.", "Status": "Статус", "Steer now": "Направить сейчас", @@ -480,8 +524,13 @@ "Team ID": "ID команды", "Test connection": "Проверить подключение", "The active turn changed. Your message is kept.": "Активный ход изменился. Ваше сообщение сохранено.", + "The agent continues automatically in later turns. It checks the budget between turns, so the current turn may go over.": "Агент продолжит работу автоматически в следующих циклах. Бюджет проверяется между циклами, поэтому текущий цикл может его превысить.", + "The agent won’t start any more turns for this goal.": "Агент больше не будет запускать новые циклы для этой цели.", + "The computer rejected the goal change: {reason}": "Компьютер отклонил изменение цели: {reason}", "The conversation changed. Send a new message instead.": "Беседа изменилась. Отправьте новое сообщение.", "The deployment document is invalid.": "Документ развёртывания некорректен.", + "The goal changed. Close the editor to review it.": "Цель изменилась. Закройте редактор, чтобы просмотреть её.", + "The goal changed. Review it and try again.": "Цель изменилась. Проверьте её и повторите попытку.", "The main conversation is no longer available.": "Основной чат больше недоступен.", "The plugin bundle could not be downloaded.": "Не удалось скачать пакет плагина.", "The plugin bundle is invalid.": "Некорректный пакет плагина.", @@ -519,6 +568,8 @@ "Thought process": "Ход мыслей", "Thought process · {count, plural, one {# tool} other {# tools}}": "Ход мыслей · инструментов: {count, plural, one {#} other {#}}", "Title (optional)": "Название (необязательно)", + "Token Budget": "Бюджет токенов", + "Token Budget (Optional)": "Бюджет токенов (необязательно)", "Token limits": "Лимиты токенов", "Token limits must be positive whole numbers.": "Лимиты токенов должны быть положительными целыми числами.", "Tool call": "Вызов инструмента", @@ -529,18 +580,25 @@ "Try a different search term or switch the computer filter.": "Попробуйте другой поисковый запрос или смените фильтр компьютера.", "Turn off flashlight": "Выключить фонарик", "Turn on flashlight": "Включить фонарик", + "Turns": "Циклы", "URL parameters": "Параметры URL", "URL query": "Параметры запроса URL", "Ultra": "Предельный", "Unavailable": "Недоступно", + "Unknown": "Неизвестно", + "Unknown · Incomplete usage": "Неизвестно · Данные неполные", + "Unlimited": "Без лимита", "Unpin": "Открепить", "Update": "Обновить", + "Updating goal…": "Обновление цели…", "Usage": "Использование", "Usage & Details": "Использование и детали", "Usage credential": "Данные доступа к статистике", + "Usage is incomplete. To resume now, remove the limit.": "Данные об использовании неполные. Снимите лимит, чтобы продолжить сейчас.", "Use Host default": "По умолчанию хоста", "Use a URL without credentials.": "Используйте URL без учётных данных.", "Use an HTTP URL without credentials or query parameters. Use environment references or edit on Desktop.": "Используйте HTTP-адрес без учётных данных и параметров запроса. Сошлитесь на переменные окружения или измените настройки на компьютере.", + "Used": "Использовано", "Used {count, plural, one {# tool} other {# tools}}": "Использовано инструментов: {count, plural, one {#} other {#}}", "User action required": "Требуется действие пользователя", "Username": "Имя пользователя", @@ -552,6 +610,7 @@ "Waiting for current turn": "Ожидание текущего шага", "Waiting for provider sign-in…": "Ожидание входа у провайдера…", "Waiting for queue…": "Добавление в очередь…", + "Waiting for this turn to finish.": "Ожидание завершения текущего цикла.", "Waiting for your response": "Ожидает вашего ответа", "Web Search": "Поиск в сети", "WebSocket": "WebSocket", @@ -573,6 +632,8 @@ "{count, plural, one {# message queued} other {# messages queued}}": "В очереди сообщений: {count, plural, one {#} other {#}}", "{count, plural, one {# quote} other {# quotes}}": "{count, plural, one {# цитата} few {# цитаты} many {# цитат} other {# цитаты}}", "{count} queued": "В очереди: {count}", + "{count} s": "{count} с", + "{count} tokens": "Токены: {count}", "{count}d": "{count} дн.", "{count}h": "{count} ч", "{count}m": "{count} мин", diff --git a/products/maka/ios-shell/locales/zh-CN.json b/products/maka/ios-shell/locales/zh-CN.json index 071b46cb096..195e6469c2c 100644 --- a/products/maka/ios-shell/locales/zh-CN.json +++ b/products/maka/ios-shell/locales/zh-CN.json @@ -15,6 +15,7 @@ "Add to queue": "加入队列", "Add to quotes": "加入引用", "Additional permissions requested": "请求额外权限", + "Adjust Budget & Resume": "调整预算并恢复", "Advanced options": "高级选项", "Agent": "助手", "All": "全部", @@ -46,6 +47,7 @@ "Arguments": "参数", "Ask Side Question": "旁问", "Assistant language": "助手语言", + "At least {count} tokens": "至少 {count} 个 Token", "Authentication": "身份验证", "Authentication field name": "认证字段名", "Authentication location": "认证参数位置", @@ -65,9 +67,13 @@ "Camera could not start.": "相机无法启动。", "Camera unavailable on this device": "此设备无法使用相机", "Cancel": "取消", + "Cancel Editing": "取消编辑", + "Cancel Goal": "取消目标", + "Cancel this goal?": "取消这个目标?", "Changes": "改动", "Changes ({count})": "改动({count})", "Chat": "对话", + "Chat settings changed. Review them and try again.": "聊天设置已变更。请检查后重试。", "Chats": "对话", "Check connection": "检查连接", "Checking pairing invite…": "正在校验配对邀请…", @@ -120,6 +126,7 @@ "Continue only if this code matches the one displayed on your computer.": "请确认此验证码与电脑屏幕上显示的一致后再继续配对。", "Continue reply": "继续回复", "Continue your work from any computer": "继续你电脑上的工作", + "Continuing goal: {objective}": "继续目标:{objective}", "Continuing reply…": "正在继续回复…", "Conversation title": "对话标题", "Conversation: {title}": "会话:{title}", @@ -130,6 +137,7 @@ "Copy edit": "复制编辑内容", "Copy reply": "复制回复", "Could not change the model.": "无法切换模型。", + "Could not confirm the goal change. Check its status before trying again.": "无法确认目标是否已更新。请先查看状态,再决定是否重试。", "Could not confirm whether the message was sent. Check the conversation or queue before retrying.": "无法确认消息是否已发送,重试前请先查看会话记录或队列。", "Could not continue the reply. Try again.": "没能继续回复,请重试。", "Could not copy the edit.": "无法复制编辑内容。", @@ -143,6 +151,7 @@ "Could not read or update settings.": "无法读取或更新设置。", "Could not read the queued message.": "无法读取队列中的消息。", "Could not read the skill source.": "无法读取技能来源。", + "Could not refresh the goal.": "无法刷新目标。", "Could not remove the MCP server.": "无法移除 MCP 服务器。", "Could not save the MCP server.": "无法保存 MCP 服务器。", "Could not save the credential.": "无法保存凭据。", @@ -153,7 +162,9 @@ "Could not sync Pending": "无法同步待处理请求", "Could not sync chats": "无法同步聊天", "Could not update the conversation.": "无法更新会话。", + "Could not update the goal.": "无法更新目标。", "Could not update the message queue.": "无法更新消息队列。", + "Could not verify this chat’s settings. Review them and try again.": "无法确认此聊天的设置。请检查后重试。", "Create Room": "创建协作室", "Create Room on {name}": "在 {name} 创建协作房间", "Creating…": "正在创建…", @@ -189,16 +200,22 @@ "Disabled": "已停用", "Disabled servers": "已禁用的服务器", "Discard": "放弃", + "Discard Edits": "放弃编辑", "Discard changes?": "放弃更改?", + "Discard goal edits?": "放弃对目标的编辑?", "Disconnect": "断开连接", "Discover models": "查找模型", "Discovering models…": "正在查找模型…", "Dismiss": "关闭", + "Dismiss Goal Summary": "隐藏目标摘要", "Dismiss keyboard": "收起键盘", "Done": "完成", "Edit": "编辑", + "Edit Budget": "修改预算", "Edit queued message": "编辑队列消息", + "Elapsed": "已用时间", "Enable": "启用", + "Enable Goal tools for this chat to start or resume a goal.": "请先为此聊天启用目标工具,再开始或恢复目标。", "Enable proxy": "启用代理", "Enable the parent plugin first.": "请先启用上级插件。", "Enable web search": "启用联网搜索", @@ -208,6 +225,7 @@ "Enter a JSON object.": "请输入一个 JSON 对象。", "Enter a connection name.": "请输入连接名称。", "Enter a name and select a model.": "请输入名称并选择模型。", + "Enter a positive whole number, or leave it blank for no limit.": "请输入正整数,或留空表示不限。", "Enter a proxy host and a port from 1 to 65535.": "请输入代理主机和 1 到 65535 之间的端口。", "Enter a proxy password.": "请输入代理密码。", "Enter a public HTTPS URL.": "请输入公开的 HTTPS URL。", @@ -221,6 +239,7 @@ "Files & Changes": "文件与改动", "Filesystem: no additional access": "文件系统:无额外访问权限", "Find skills": "查找技能", + "Finish or cancel the current goal first.": "请先完成或取消当前目标。", "Flash": "手电筒", "Flash On": "手电筒已开", "Folder is empty": "文件夹为空", @@ -229,6 +248,16 @@ "Full access": "完全访问", "General": "通用", "Global": "全局", + "Goal Achieved": "目标已达成", + "Goal Blocked": "目标受阻", + "Goal Budget Limited": "目标预算受限", + "Goal Cancelled": "目标已取消", + "Goal Details": "目标详情", + "Goal Details…": "目标详情…", + "Goal Paused": "目标已暂停", + "Goal Ready": "目标就绪", + "Goal in Progress": "目标进行中", + "Goals are turned off on this computer.": "这台电脑未启用目标功能。", "HTTP header": "HTTP 请求头", "HTTP headers": "HTTP 请求头", "HTTP method": "HTTP 方法", @@ -251,10 +280,13 @@ "Invalid API key": "API 密钥无效", "Invalid stored language preference.": "保存的语言设置无效。", "JSON body": "JSON 请求体", + "Keep Editing": "继续编辑", + "Keep Goal": "保留目标", "Keep my edit": "保留我的编辑", "Language": "语言", "Last request": "上次请求", "Last synced": "上次同步", + "Last synced · Read-only": "上次同步 · 只读", "Latest": "最新", "Leave blank for automatic title": "留空将自动生成标题", "Light": "浅色", @@ -266,6 +298,7 @@ "Low": "低", "MCP": "MCP", "Maka is shutting down. Try again after it restarts.": "Maka 正在关闭,重启后再试。", + "Mark Complete": "标记完成", "Max output tokens": "最大输出 Token 数", "Maximum": "最高", "Medium": "中", @@ -290,7 +323,10 @@ "Network: no access": "网络:无访问权限", "Network: no destinations": "网络:未指定目标", "New Chat": "新建对话", + "New Goal": "新建目标", + "New Goal…": "新建目标…", "New Room": "新建协作室", + "Next attempt: {time}": "下次尝试:{time}", "No MCP servers": "没有 MCP 服务器", "No approvals or questions are waiting across your connected computers.": "当前已连接电脑没有等待你处理的审批或提问。", "No approvals or questions are waiting.": "没有待处理的审批或提问。", @@ -309,6 +345,7 @@ "Not measured": "未测出", "Not sent. Choose a workspace, then retry.": "未发送。请先选择工作区,然后重试。", "Now": "刚刚", + "Objective": "目标", "Off": "关闭", "Offline": "离线", "Open Conversation": "打开所在对话", @@ -332,6 +369,7 @@ "Paste pairing link": "粘贴配对链接", "Paste pairing link or connect manually": "粘贴配对链接或手动连接", "Paste relay token": "粘贴中继令牌", + "Pause Goal": "暂停目标", "Pending": "待处理", "Permission": "权限审批", "Permission requests are disabled": "权限请求已停用", @@ -383,8 +421,10 @@ "Relay URL (optional)": "中继地址(可选)", "Relay · {latency} ms": "中继 · {latency} 毫秒", "Relays": "中继", + "Remaining": "剩余", "Remove": "移除", "Remove Computer": "移除电脑", + "Remove Limit & Resume": "移除上限并恢复", "Remove connection": "移除连接", "Remove conversation link: {title}": "移除会话链接:{title}", "Remove queued message": "移除排队消息", @@ -407,6 +447,7 @@ "Result snippet path (optional)": "结果摘要路径(选填)", "Result title path (optional)": "结果标题路径(选填)", "Results array path": "结果数组路径", + "Resume Goal": "恢复目标", "Retry": "重试", "Retry now": "立即重试", "Review latest": "查看最新版本", @@ -421,6 +462,7 @@ "Running {count, plural, one {# tool} other {# tools}}…": "正在执行 {count, plural, other {# 项工具}}…", "Save": "保存", "Save API key": "保存 API 密钥", + "Save Budget": "保存预算", "Save usage credential": "保存用量凭据", "Save your provider settings before changing its API key.": "请先保存服务商设置,再更改 API 密钥。", "Saved Host relay Bearer token": "已保存的 Host 中继 Bearer 令牌", @@ -445,6 +487,7 @@ "Sending…": "正在发送…", "Server-side compaction": "服务端压缩", "Service": "服务授权", + "Set a limit above {count} tokens used, or leave it blank for no limit.": "新上限必须高于已用的 {count} 个 Token,或留空表示不限。", "Settings": "设置", "Shadowed": "已被覆盖", "Show": "展开", @@ -460,6 +503,7 @@ "Source unavailable": "来源不可用", "Start Chat": "开始对话", "Start Chat on {name}": "在 {name} 创建对话", + "Start Goal": "开始目标", "Start a conversation on any connected computer and it will appear here automatically.": "在任意已连接电脑上发起对话后,都会自动同步到这里。", "Status": "状态", "Steer now": "立即引导", @@ -480,8 +524,13 @@ "Team ID": "团队 ID", "Test connection": "测试连接", "The active turn changed. Your message is kept.": "当前回合已变更。您的消息已保留。", + "The agent continues automatically in later turns. It checks the budget between turns, so the current turn may go over.": "Agent 会在后续轮次自动继续执行。预算在轮次之间检查,当前轮可能超出。", + "The agent won’t start any more turns for this goal.": "Agent 不会再为这个目标开始新的轮次。", + "The computer rejected the goal change: {reason}": "电脑拒绝了目标变更:{reason}", "The conversation changed. Send a new message instead.": "会话已变化,请发一条新消息。", "The deployment document is invalid.": "部署文档无效。", + "The goal changed. Close the editor to review it.": "目标已变更。关闭编辑页后查看。", + "The goal changed. Review it and try again.": "目标已变更。请查看后重试。", "The main conversation is no longer available.": "主会话已不可用。", "The plugin bundle could not be downloaded.": "无法下载插件包。", "The plugin bundle is invalid.": "插件包无效。", @@ -519,6 +568,8 @@ "Thought process": "思考过程", "Thought process · {count, plural, one {# tool} other {# tools}}": "思考过程 · {count, plural, other {# 项工具}}", "Title (optional)": "标题(可选)", + "Token Budget": "Token 预算", + "Token Budget (Optional)": "Token 预算(可选)", "Token limits": "Token 上限", "Token limits must be positive whole numbers.": "Token 上限必须是正整数。", "Tool call": "工具调用", @@ -529,18 +580,25 @@ "Try a different search term or switch the computer filter.": "尝试换个关键词,或切换顶部的电脑筛选。", "Turn off flashlight": "关闭手电筒", "Turn on flashlight": "开启手电筒", + "Turns": "轮次", "URL parameters": "URL 参数", "URL query": "URL 查询参数", "Ultra": "超高", "Unavailable": "不可用", + "Unknown": "未知", + "Unknown · Incomplete usage": "未知 · 用量不完整", + "Unlimited": "不限", "Unpin": "取消置顶", "Update": "更新", + "Updating goal…": "正在更新目标…", "Usage": "用量", "Usage & Details": "用量与详情", "Usage credential": "用量凭据", + "Usage is incomplete. To resume now, remove the limit.": "用量不完整。要立即恢复,请移除上限。", "Use Host default": "使用 Host 默认值", "Use a URL without credentials.": "请使用不含凭据的 URL。", "Use an HTTP URL without credentials or query parameters. Use environment references or edit on Desktop.": "请使用不含凭据或查询参数的 HTTP URL。请引用环境变量,或在桌面端编辑。", + "Used": "已用", "Used {count, plural, one {# tool} other {# tools}}": "已调用 {count, plural, other {# 项工具}}", "User action required": "需要用户操作", "Username": "用户名", @@ -552,6 +610,7 @@ "Waiting for current turn": "等待当前轮次完成", "Waiting for provider sign-in…": "正在等待服务商授权…", "Waiting for queue…": "正在加入队列…", + "Waiting for this turn to finish.": "等待本轮结束。", "Waiting for your response": "等待你确认", "Web Search": "联网搜索", "WebSocket": "WebSocket", @@ -573,6 +632,8 @@ "{count, plural, one {# message queued} other {# messages queued}}": "{count, plural, other {# 条消息排队中}}", "{count, plural, one {# quote} other {# quotes}}": "{count, plural, other {# 条引用}}", "{count} queued": "{count} 条排队中", + "{count} s": "{count} 秒", + "{count} tokens": "{count} 个 Token", "{count}d": "{count}天前", "{count}h": "{count}小时前", "{count}m": "{count}分钟前", diff --git a/products/maka/ios-shell/locales/zh-HK.json b/products/maka/ios-shell/locales/zh-HK.json index b9280b2339b..a87b73e7b82 100644 --- a/products/maka/ios-shell/locales/zh-HK.json +++ b/products/maka/ios-shell/locales/zh-HK.json @@ -22,6 +22,7 @@ "Connection is unavailable": "無法連接", "Connection timed out": "連接超時", "Could not confirm whether the message was sent. Check the conversation or queue before retrying.": "無法確認訊息是否已傳送,重試前請先查看對話記錄或隊列。", + "Could not refresh the goal.": "無法重新載入目標。", "Could not save the proxy password.": "無法儲存代理密碼。", "Could not sync chats": "無法同步對話", "Could not update the message queue.": "無法更新訊息隊列。", @@ -36,7 +37,10 @@ "Enable web search": "啟用網絡搜尋", "Enter a proxy host and a port from 1 to 65535.": "請輸入代理主機及 1 至 65535 之間的連接埠。", "Enter a proxy password.": "請輸入代理密碼。", + "Goal Details": "目標詳情", + "Goal Details…": "目標詳情…", "Installed plugins": "已安裝插件", + "Mark Complete": "標記為完成", "Models & Connections": "模型與連接", "Network Proxy": "網絡代理", "Network: all destinations": "網絡:所有目標", @@ -80,10 +84,12 @@ "This iPhone Peer ID": "這部 iPhone Peer ID", "This message is no longer queued.": "此訊息已離開隊列。", "This turn cannot accept this message right now. It remains queued.": "本輪暫時無法接收此訊息,訊息仍在隊列中。", + "Token Budget (Optional)": "Token 預算(可選填)", "Unavailable": "不可用", "Usage & Details": "用量與詳細資料", "User action required": "需要用戶操作", "Username": "用戶名稱", + "Waiting for this turn to finish.": "等候本輪結束。", "Web Search": "網絡搜尋", "Without a discovery port, direct connections may be harder.": "未設定偵測端口,可能較難建立直接連接。" } diff --git a/products/maka/ios-shell/locales/zh-TW.json b/products/maka/ios-shell/locales/zh-TW.json index f0adb37d6a4..8ce0d477e54 100644 --- a/products/maka/ios-shell/locales/zh-TW.json +++ b/products/maka/ios-shell/locales/zh-TW.json @@ -15,6 +15,7 @@ "Add to queue": "加入佇列", "Add to quotes": "加入引用", "Additional permissions requested": "請求額外權限", + "Adjust Budget & Resume": "調整預算並繼續", "Advanced options": "進階選項", "Agent": "助理", "All": "全部", @@ -46,6 +47,7 @@ "Arguments": "引數", "Ask Side Question": "旁問", "Assistant language": "助理語言", + "At least {count} tokens": "至少 {count} 個 Token", "Authentication": "身分驗證", "Authentication field name": "驗證欄位名稱", "Authentication location": "驗證參數位置", @@ -65,9 +67,13 @@ "Camera could not start.": "無法啟動相機。", "Camera unavailable on this device": "此裝置無法使用相機", "Cancel": "取消", + "Cancel Editing": "取消編輯", + "Cancel Goal": "取消目標", + "Cancel this goal?": "要取消這個目標嗎?", "Changes": "變更", "Changes ({count})": "變更({count})", "Chat": "對話", + "Chat settings changed. Review them and try again.": "對話設定已變更。請檢查後再試。", "Chats": "對話", "Check connection": "檢查連線", "Checking pairing invite…": "正在驗證配對邀請…", @@ -120,6 +126,7 @@ "Continue only if this code matches the one displayed on your computer.": "請確認此驗證碼與電腦螢幕上顯示的一致後再繼續配對。", "Continue reply": "繼續回覆", "Continue your work from any computer": "接續你電腦上的工作", + "Continuing goal: {objective}": "繼續目標:{objective}", "Continuing reply…": "正在繼續回覆…", "Conversation title": "對話標題", "Conversation: {title}": "對話:{title}", @@ -130,6 +137,7 @@ "Copy edit": "複製編輯內容", "Copy reply": "複製回覆", "Could not change the model.": "無法切換模型。", + "Could not confirm the goal change. Check its status before trying again.": "無法確認目標是否已更新。請先查看狀態,再決定是否重試。", "Could not confirm whether the message was sent. Check the conversation or queue before retrying.": "無法確認訊息是否已傳送,重試前請先查看對話記錄或佇列。", "Could not continue the reply. Try again.": "無法繼續回覆,請再試一次。", "Could not copy the edit.": "無法複製編輯內容。", @@ -143,6 +151,7 @@ "Could not read or update settings.": "無法讀取或更新設定。", "Could not read the queued message.": "無法讀取佇列中的訊息。", "Could not read the skill source.": "無法讀取技能來源。", + "Could not refresh the goal.": "無法重新整理目標。", "Could not remove the MCP server.": "無法移除 MCP 伺服器。", "Could not save the MCP server.": "無法儲存 MCP 伺服器。", "Could not save the credential.": "無法儲存憑證。", @@ -153,7 +162,9 @@ "Could not sync Pending": "無法同步待處理請求", "Could not sync chats": "無法同步聊天", "Could not update the conversation.": "無法更新對話。", + "Could not update the goal.": "無法更新目標。", "Could not update the message queue.": "無法更新訊息佇列。", + "Could not verify this chat’s settings. Review them and try again.": "無法確認這個對話的設定。請檢查後再試。", "Create Room": "建立協作室", "Create Room on {name}": "在 {name} 建立協作房間", "Creating…": "正在建立…", @@ -189,16 +200,22 @@ "Disabled": "已停用", "Disabled servers": "已停用的伺服器", "Discard": "捨棄", + "Discard Edits": "捨棄編輯", "Discard changes?": "捨棄變更?", + "Discard goal edits?": "要捨棄對目標的編輯嗎?", "Disconnect": "中斷連線", "Discover models": "尋找模型", "Discovering models…": "正在尋找模型…", "Dismiss": "關閉", + "Dismiss Goal Summary": "隱藏目標摘要", "Dismiss keyboard": "收起鍵盤", "Done": "完成", "Edit": "編輯", + "Edit Budget": "修改預算", "Edit queued message": "編輯佇列訊息", + "Elapsed": "經過時間", "Enable": "啟用", + "Enable Goal tools for this chat to start or resume a goal.": "請先為這個對話啟用目標工具,再開始或繼續目標。", "Enable proxy": "啟用 Proxy", "Enable the parent plugin first.": "請先啟用上層外掛。", "Enable web search": "啟用網路搜尋", @@ -208,6 +225,7 @@ "Enter a JSON object.": "請輸入 JSON 物件。", "Enter a connection name.": "請輸入連線名稱。", "Enter a name and select a model.": "請輸入名稱並選擇模型。", + "Enter a positive whole number, or leave it blank for no limit.": "請輸入正整數,或留空表示不限。", "Enter a proxy host and a port from 1 to 65535.": "請輸入 Proxy 主機和 1 至 65535 之間的連接埠。", "Enter a proxy password.": "請輸入 Proxy 密碼。", "Enter a public HTTPS URL.": "請輸入公開的 HTTPS URL。", @@ -221,6 +239,7 @@ "Files & Changes": "檔案與變更", "Filesystem: no additional access": "檔案系統:無額外存取權限", "Find skills": "尋找技能", + "Finish or cancel the current goal first.": "請先完成或取消目前的目標。", "Flash": "手電筒", "Flash On": "手電筒已開", "Folder is empty": "資料夾為空", @@ -229,6 +248,16 @@ "Full access": "完整存取", "General": "一般", "Global": "全域", + "Goal Achieved": "目標已達成", + "Goal Blocked": "目標受阻", + "Goal Budget Limited": "目標預算受限", + "Goal Cancelled": "目標已取消", + "Goal Details": "目標詳細資料", + "Goal Details…": "目標詳細資料…", + "Goal Paused": "目標已暫停", + "Goal Ready": "目標就緒", + "Goal in Progress": "目標進行中", + "Goals are turned off on this computer.": "這部電腦未啟用目標功能。", "HTTP header": "HTTP 請求標頭", "HTTP headers": "HTTP 請求標頭", "HTTP method": "HTTP 方法", @@ -251,10 +280,13 @@ "Invalid API key": "API 金鑰無效", "Invalid stored language preference.": "儲存的語言設定無效。", "JSON body": "JSON 請求本文", + "Keep Editing": "繼續編輯", + "Keep Goal": "保留目標", "Keep my edit": "保留我的編輯", "Language": "語言", "Last request": "上次請求", "Last synced": "上次同步", + "Last synced · Read-only": "上次同步 · 唯讀", "Latest": "最新", "Leave blank for automatic title": "留空將自動產生標題", "Light": "淺色", @@ -266,6 +298,7 @@ "Low": "低", "MCP": "MCP", "Maka is shutting down. Try again after it restarts.": "Maka 正在關閉,請在重新啟動後再試。", + "Mark Complete": "標示為完成", "Max output tokens": "最大輸出 Token 數", "Maximum": "最高", "Medium": "中", @@ -290,7 +323,10 @@ "Network: no access": "網路:無存取權限", "Network: no destinations": "網路:未指定目標", "New Chat": "新對話", + "New Goal": "新增目標", + "New Goal…": "新增目標…", "New Room": "新協作室", + "Next attempt: {time}": "下次嘗試:{time}", "No MCP servers": "沒有 MCP 伺服器", "No approvals or questions are waiting across your connected computers.": "目前已連線電腦沒有等待你確認的審核或提問。", "No approvals or questions are waiting.": "沒有待處理的核准或提問。", @@ -309,6 +345,7 @@ "Not measured": "未測得", "Not sent. Choose a workspace, then retry.": "未傳送。請先選擇工作區,然後重試。", "Now": "剛剛", + "Objective": "目標", "Off": "關閉", "Offline": "離線", "Open Conversation": "開啟所在對話", @@ -332,6 +369,7 @@ "Paste pairing link": "貼上配對連結", "Paste pairing link or connect manually": "貼上配對連結或手動連線", "Paste relay token": "貼上中繼權杖", + "Pause Goal": "暫停目標", "Pending": "待處理", "Permission": "權限核准", "Permission requests are disabled": "權限請求已停用", @@ -383,8 +421,10 @@ "Relay URL (optional)": "中繼網址(選填)", "Relay · {latency} ms": "中繼 · {latency} 毫秒", "Relays": "中繼", + "Remaining": "剩餘", "Remove": "移除", "Remove Computer": "移除電腦", + "Remove Limit & Resume": "移除上限並繼續", "Remove connection": "移除連線", "Remove conversation link: {title}": "移除對話連結:{title}", "Remove queued message": "移除排隊訊息", @@ -407,6 +447,7 @@ "Result snippet path (optional)": "結果摘要路徑(選填)", "Result title path (optional)": "結果標題路徑(選填)", "Results array path": "結果陣列路徑", + "Resume Goal": "繼續目標", "Retry": "重試", "Retry now": "立即重試", "Review latest": "查看最新版本", @@ -421,6 +462,7 @@ "Running {count, plural, one {# tool} other {# tools}}…": "正在執行 {count, plural, other {# 項工具}}…", "Save": "儲存", "Save API key": "儲存 API 金鑰", + "Save Budget": "儲存預算", "Save usage credential": "儲存用量憑證", "Save your provider settings before changing its API key.": "請先儲存服務商設定,再變更 API 金鑰。", "Saved Host relay Bearer token": "已儲存的 Host 中繼 Bearer 權杖", @@ -445,6 +487,7 @@ "Sending…": "正在傳送…", "Server-side compaction": "伺服器端壓縮", "Service": "服務授權", + "Set a limit above {count} tokens used, or leave it blank for no limit.": "新上限必須高於已用的 {count} 個 Token,或留空表示不限。", "Settings": "設定", "Shadowed": "已被覆蓋", "Show": "顯示", @@ -460,6 +503,7 @@ "Source unavailable": "來源無法使用", "Start Chat": "開始對話", "Start Chat on {name}": "在 {name} 開始對話", + "Start Goal": "開始目標", "Start a conversation on any connected computer and it will appear here automatically.": "在任何已連線電腦上開始對話後,都會自動出現在這裡。", "Status": "狀態", "Steer now": "立即引導", @@ -480,8 +524,13 @@ "Team ID": "團隊 ID", "Test connection": "測試連線", "The active turn changed. Your message is kept.": "目前回合已變更。你的訊息已保留。", + "The agent continues automatically in later turns. It checks the budget between turns, so the current turn may go over.": "Agent 會在後續輪次自動繼續執行。預算在輪次之間檢查,目前這一輪可能超出。", + "The agent won’t start any more turns for this goal.": "Agent 不會再為這個目標開始新的輪次。", + "The computer rejected the goal change: {reason}": "電腦拒絕了目標變更:{reason}", "The conversation changed. Send a new message instead.": "對話已有變動,請傳送新訊息。", "The deployment document is invalid.": "部署文件無效。", + "The goal changed. Close the editor to review it.": "目標已變更。請關閉編輯頁面後查看。", + "The goal changed. Review it and try again.": "目標已變更。請查看後再試。", "The main conversation is no longer available.": "主對話已無法存取。", "The plugin bundle could not be downloaded.": "無法下載外掛套件。", "The plugin bundle is invalid.": "外掛套件無效。", @@ -519,6 +568,8 @@ "Thought process": "思考過程", "Thought process · {count, plural, one {# tool} other {# tools}}": "思考過程 · {count, plural, other {# 項工具}}", "Title (optional)": "標題(選填)", + "Token Budget": "Token 預算", + "Token Budget (Optional)": "Token 預算(選填)", "Token limits": "Token 上限", "Token limits must be positive whole numbers.": "Token 上限必須是正整數。", "Tool call": "工具呼叫", @@ -529,18 +580,25 @@ "Try a different search term or switch the computer filter.": "請嘗試其他關鍵字或切換電腦篩選條件。", "Turn off flashlight": "關閉手電筒", "Turn on flashlight": "開啟手電筒", + "Turns": "輪次", "URL parameters": "URL 參數", "URL query": "URL 查詢參數", "Ultra": "超高", "Unavailable": "無法使用", + "Unknown": "未知", + "Unknown · Incomplete usage": "未知 · 用量不完整", + "Unlimited": "不限", "Unpin": "取消置頂", "Update": "更新", + "Updating goal…": "正在更新目標…", "Usage": "用量", "Usage & Details": "用量與詳情", "Usage credential": "用量憑證", + "Usage is incomplete. To resume now, remove the limit.": "用量不完整。若要立即繼續,請移除上限。", "Use Host default": "使用 Host 預設值", "Use a URL without credentials.": "請使用不含憑證的 URL。", "Use an HTTP URL without credentials or query parameters. Use environment references or edit on Desktop.": "請使用不含憑證或查詢參數的 HTTP URL。請參照環境變數,或在桌面端編輯。", + "Used": "已用", "Used {count, plural, one {# tool} other {# tools}}": "已使用 {count, plural, other {# 項工具}}", "User action required": "需要使用者操作", "Username": "使用者名稱", @@ -552,6 +610,7 @@ "Waiting for current turn": "等待目前輪次完成", "Waiting for provider sign-in…": "正在等待服務商授權…", "Waiting for queue…": "正在加入佇列⋯", + "Waiting for this turn to finish.": "等待這一輪結束。", "Waiting for your response": "等待你的回覆", "Web Search": "網路搜尋", "WebSocket": "WebSocket", @@ -573,6 +632,8 @@ "{count, plural, one {# message queued} other {# messages queued}}": "{count, plural, other {# 則訊息排隊中}}", "{count, plural, one {# quote} other {# quotes}}": "{count, plural, other {# 則引用}}", "{count} queued": "{count} 則排隊中", + "{count} s": "{count} 秒", + "{count} tokens": "{count} 個 Token", "{count}d": "{count} 天前", "{count}h": "{count} 小時前", "{count}m": "{count} 分鐘前", diff --git a/products/maka/ios-shell/tests/ios_shell_behaviors.rs b/products/maka/ios-shell/tests/ios_shell_behaviors.rs index 90640d043fa..3916911133c 100644 --- a/products/maka/ios-shell/tests/ios_shell_behaviors.rs +++ b/products/maka/ios-shell/tests/ios_shell_behaviors.rs @@ -2966,6 +2966,20 @@ async fn chat_streaming_collapsible_tools_and_inline_approval() { held_refresh.resolve(json!({"value":{"revision":"2","needsYouCount":0,"before":null,"after":null,"sessions":[]}})); } +fn more_menu_action<'a>( + config: &'a nsh_core::ScreenConfig, + label: &str, +) -> Option<&'a nsh_core::desktop::MenuAction> { + let more = config + .right_items + .iter() + .find(|item| item.key.as_deref() == Some("more"))?; + more.menu.as_ref()?.iter().find_map(|item| match item { + nsh_core::desktop::MenuItem::Action(action) if action.label == label => Some(action), + _ => None, + }) +} + fn select_header_item(app: &mut Headless, id: u32) { app.engine().control().dispatch_event( nsh_core::ROOT_ID, @@ -2986,6 +3000,7 @@ struct ComposerDockFixture { history: Arc>>, calls: mpsc::UnboundedReceiver<(Value, HostCall)>, watches: mpsc::UnboundedReceiver, + goal_watches: mpsc::UnboundedReceiver, watch: Value, history_reads: mpsc::UnboundedReceiver<()>, hold_queue: Arc, @@ -3120,7 +3135,7 @@ impl ComposerDockFixture { "botOutbox" => json!({"isBot":false}), "connections" => json!({"kind":"ready","revision":1,"connections":[],"next":null, "defaultTarget":{"connectionId":"test","modelId":"model"}}), - "queueMessage" | "resolveModel" | "execution" | "continuationAvailability" | "model" => { + "queueMessage" | "resolveModel" | "execution" | "continuationAvailability" | "model" | "goal" => { query_tx.send((data, call)).unwrap(); return; } @@ -3134,6 +3149,7 @@ impl ComposerDockFixture { tx.send((data, call)).unwrap(); }); let (watch_tx, mut watches) = mpsc::unbounded_channel(); + let (goal_tx, goal_watches) = mpsc::unbounded_channel(); let (side_tx, mut side_watch) = mpsc::unbounded_channel(); channel.handle("ios.subscribe", move |mut call| { let data = call.take_data(); @@ -3142,6 +3158,8 @@ impl ComposerDockFixture { call.resolve(handle.clone()); if data["method"] == "watch" { watch_tx.send(handle).unwrap(); + } else if data["method"] == "watchGoal" { + goal_tx.send(handle).unwrap(); } else if anchor && data["input"]["scope"]["kind"] == "side_questions" { side_tx.send((handle, side_on_watch.clone())).unwrap(); } @@ -3196,6 +3214,7 @@ impl ComposerDockFixture { history, calls, watches, + goal_watches, watch, history_reads, hold_queue, @@ -3206,17 +3225,7 @@ impl ComposerDockFixture { fn navigation_action(&self, label: &str) -> Option { let config = self.header.lock().unwrap(); - let more = config - .as_ref()? - .right_items - .iter() - .find(|item| item.key.as_deref() == Some("more"))?; - more.menu.as_ref()?.iter().find_map(|item| match item { - nsh_core::desktop::MenuItem::Action(action) if action.label == label => { - Some(action.clone()) - } - _ => None, - }) + more_menu_action(config.as_ref()?, label).cloned() } fn navigation_item(&self, label: &str) -> Option { @@ -3661,6 +3670,52 @@ async fn accessory_model_menu_remains_reachable_at_300_percent_dynamic_type() { .unwrap(); } +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn native_goal_creation_uses_the_thinking_preference_saved_by_the_slider() { + let mut backend = dock_model(); + backend["serviceTier"] = json!("fast"); + backend["thinkingLevel"] = json!("high"); + let mut fx = ComposerDockFixture::start(Value::Null, backend, empty_queue()).await; + let mut frame = fixture_recv(&mut fx.goal_watches).await; + frame["item"] = goal_view(Value::Null); + fx.app + .send_host_event("ios.subscriptionItem", frame) + .unwrap(); + + fx.choose_navigation("Thinking level"); + fx.app.wait_for("id:chat-thinking-slider").unwrap(); + fx.app.press("label:Minimal").unwrap(); + let (input, receipt) = fx.call("selectBackend").await; + let confirmed = json!({"kind":"model","connectionId":"test","modelId":"model", + "serviceTier":"fast","thinkingLevel":"minimal"}); + assert_eq!(input["backend"], confirmed); + let session = json!({"id":"chat","kind":"agent","title":"Dock Chat","revision":2, + "workspace":{"path":"/work"},"backend":confirmed, + "permissions":{"access":"read_only","requestPermissions":true},"boundaryRevision":12, + "binding":{"id":"00000000-0000-4000-8000-000000000001","permissionEpoch":3}}); + *fx.observation.lock().unwrap() = json!({"session":session}); + receipt.resolve(json!({"value":{"kind":"committed","session":session}})); + fx.app.wait_for("label:Thinking level · Minimal").unwrap(); + fx.app.press("id:chat-thinking-backdrop").unwrap(); + + fx.choose_navigation("New Goal…"); + fx.app.wait_for("id:chat-goal-sheet-scroll").unwrap(); + enter_goal_text( + &mut fx.app, + "goal-objective", + "Check the selected thinking strength", + ); + fx.app.press("id:goal-save").unwrap(); + let (input, receipt) = fx.call("changeGoal").await; + assert_eq!(input["approval"]["backend"], confirmed); + assert_eq!(input["approval"]["target"]["sessionId"], "chat"); + receipt.resolve(json!({"value":{"kind":"committed","goalId":GOAL_ID,"revision":1}})); + let (input, read) = fx.call("goal").await; + assert_eq!(input["sessionId"], "chat"); + read.resolve(json!({"value":goal_view(goal_record("active",1))})); + fx.app.wait_for("text:Goal Details").unwrap(); +} + #[tokio::test(flavor = "multi_thread", worker_threads = 2)] async fn details_distinguish_current_and_cached_usage_and_refresh_once_per_step_page() { use std::sync::atomic::Ordering; @@ -4744,7 +4799,8 @@ where items.insert(label, action); } let item = items - .remove(label) + .get(label) + .cloned() .unwrap_or_else(|| panic!("missing native menu item: {label}")); select_native_item(app, item); } @@ -7319,7 +7375,10 @@ fn side_session(id: &str, title: &str, backend: &Value) -> Value { struct SideChatFixture { app: Headless, + header: Arc>>, mutations: mpsc::UnboundedReceiver<(Value, HostCall)>, + goal_reads: mpsc::UnboundedReceiver<(Value, HostCall)>, + goal_authority: Arc, subscriptions: mpsc::UnboundedReceiver, unsubscribed: mpsc::UnboundedReceiver, main_removed: Arc, @@ -7396,7 +7455,7 @@ fn side_chat_fixture_on( let mut user = quote_history_row(11, "user", "A user message"); user["order"] = json!({"path":[6, 1],"itemIndex":0}); main_history.extend([late, user, provisional]); - side_chat_fixture_with_history(default_model, missing_main, os, main_history) + side_chat_fixture_with_history(default_model, missing_main, os, main_history, "/work") } fn side_chat_fixture_with_history( @@ -7404,12 +7463,14 @@ fn side_chat_fixture_with_history( missing_main: bool, os: Os, main_history: Vec, + main_workspace: &str, ) -> SideChatFixture { use std::sync::{ Mutex, atomic::{AtomicBool, AtomicU64, Ordering}, }; + let main_workspace = main_workspace.to_owned(); let channel = HostChannel::new(); channel.handle("ios.bootstrap", |call| { call.resolve(side_host_state(1, Some(7))) @@ -7427,6 +7488,9 @@ fn side_chat_fixture_with_history( let hold = hold_side_observe.clone(); let (observe_tx, side_observations) = mpsc::unbounded_channel(); let main_revision = AtomicU64::new(40); + let (goal_read_tx, goal_reads) = mpsc::unbounded_channel(); + let goal_authority = Arc::new(AtomicBool::new(true)); + let with_authority = goal_authority.clone(); let (_, late) = side_history_rows(); let mut saved_history: Vec<_> = (20..=45) .map(|n| { @@ -7447,12 +7511,16 @@ fn side_chat_fixture_with_history( let backend = observed_backend.lock().unwrap().clone(); let missing_main = removed.load(Ordering::Relaxed); let main = json!({"id":"main","title":"Main Chat","kind":"agent","activity":"idle", - "branch":null,"parentSessionId":null,"workspace":{"path":"/work"},"revision":2, + "branch":null,"parentSessionId":null,"workspace":{"path":main_workspace},"revision":2, "backend":backend}); let room = json!({"id":"room","title":"Room Chat","kind":"room","activity":"idle", "branch":null,"parentSessionId":null,"workspace":{"path":"/work"},"revision":1}); let saved = side_session("saved", "Saved side question", &backend); let value = match data["method"].as_str().unwrap() { + "goal" => { + goal_read_tx.send((data, call)).unwrap(); + return; + } "list" if input["scope"]["kind"] == "side_questions" => { assert_eq!(input["scope"]["sessionId"], "main"); assert_eq!(input["position"], json!({"kind":"after","revision":"sides-7","cursor":"older"})); @@ -7492,6 +7560,14 @@ fn side_chat_fixture_with_history( "new-side" => side_session("new-side", "A side question", &backend), id => panic!("unexpected observe: {id}"), }; + let mut session = session; + if session["kind"] == "agent" && with_authority.load(Ordering::Relaxed) { + session["binding"] = json!({ + "id":"00000000-0000-4000-8000-000000000001","permissionEpoch":3 + }); + session["permissions"] = json!({"access":"read_only","requestPermissions":true}); + session["boundaryRevision"] = json!(12); + } json!({"session":session,"through":99,"run":null}) } "history" if input["sessionId"] == "room" => json!({ @@ -7566,10 +7642,26 @@ fn side_chat_fixture_with_history( ..Environment::default() }; let mut app = Headless::start(config).unwrap(); + let header = Arc::new(Mutex::new(None)); + if os == Os::Ios { + let mounted = header.clone(); + app.observe(move |_, batch| { + for item in &batch.items { + if let nsh_core::MountItem::ScreenConfig { config, .. } = item + && config.title.as_deref() == Some("Main Chat") + { + *mounted.lock().unwrap() = Some((**config).clone()); + } + } + }); + } app.wait_for("label:Conversation: Room Chat").unwrap(); SideChatFixture { app, + header, mutations, + goal_reads, + goal_authority, subscriptions, unsubscribed, main_removed, @@ -8715,7 +8807,7 @@ async fn side_chat_blank_reply_context_menu_has_no_quote_action() { let mut blank = quote_history_row(1, "assistant", " \u{2003} "); blank["finalOutput"] = json!(true); - let mut fx = side_chat_fixture_with_history(false, false, Os::Ios, vec![blank]); + let mut fx = side_chat_fixture_with_history(false, false, Os::Ios, vec![blank], "/work"); let (menu_tx, mut menus) = mpsc::unbounded_channel(); fx.app.observe(move |_, batch| { for item in &batch.items { @@ -11721,3 +11813,884 @@ async fn model_settings_reload_after_reconnect_and_refresh_the_host_default_summ app.wait_for("label:New generation preset").unwrap(); assert!(!app.shows("Old generation preset")); } + +const GOAL_ID: &str = "00000000-0000-4000-8000-000000000007"; + +fn goal_record(status: &str, revision: u64) -> Value { + json!({ + "id":GOAL_ID, "revision":revision, "objective":"Review database migrations", "status":status, + "iterations":3,"tokenBudget":2000,"consumed":{"known":1234,"missing":0}, + "remainingTokens":766,"elapsedSeconds":45,"createdAt":1,"retryAt":null, + "pending":false,"dismissed":false,"note":"Reviewed the schema.","report":null + }) +} + +fn goal_view(current: Value) -> Value { + json!({"enabled":true,"current":current}) +} + +impl SideChatFixture { + fn open_native_goal(&mut self, label: &str) { + let id = { + let config = self.header.lock().unwrap(); + config + .as_ref() + .and_then(|config| more_menu_action(config, label)) + .filter(|action| action.enabled) + .unwrap_or_else(|| panic!("missing UIKit Goal menu item: {label}")) + .id + }; + select_header_item(&mut self.app, id); + self.app.wait_for("id:chat-goal-sheet-scroll").unwrap(); + } + + fn goal_frame(&mut self, sub: &Value, item: Value) { + self.app + .send_host_event( + "ios.subscriptionItem", + json!({ + "subscriptionId":sub["subscriptionId"],"rootId":"root", + "generation":sub["generation"],"item":item + }), + ) + .unwrap(); + assert!(self.app.settle()); + } + + async fn expect_goal_unsubscribe(&mut self, sub: &Value) { + loop { + let handle = fixture_recv(&mut self.unsubscribed).await; + if handle["subscriptionId"] == sub["subscriptionId"] { + assert_eq!(handle["generation"], sub["generation"]); + return; + } + } + } + + async fn goal_read(&mut self, session: &str) -> HostCall { + let (data, call) = fixture_recv(&mut self.goal_reads).await; + assert_eq!(data["rootId"], "root"); + assert_eq!(data["input"], json!({"sessionId":session})); + call + } + + async fn goal_commit(&mut self, call: HostCall, record: Value) { + call.resolve(json!({"value":{"kind":"committed","goalId":record["id"],"revision":record["revision"]}})); + self.goal_read("main") + .await + .resolve(json!({"value":goal_view(record)})); + assert!(self.app.settle()); + } +} + +fn open_goal(app: &mut Headless, label: &str) { + app.press("label:More").unwrap(); + app.choose_menu_item(label).unwrap(); + app.wait_for("id:chat-goal-sheet-scroll").unwrap(); +} + +fn enter_goal_text(app: &mut Headless, id: &str, text: &str) { + let selector = format!("id:{id}"); + app.clear(&selector).unwrap(); + if !text.is_empty() { + app.type_text(&selector, text).unwrap(); + } +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn goal_capability_and_watches_follow_visible_agent_and_forked_side_chat() { + use nsh_core::platform::Lifecycle; + + let mut fx = side_chat_fixture(false, false); + let mut native_quote = watch_quote_menus(&mut fx.app); + fx.app.press("label:Conversation: Room Chat").unwrap(); + fx.app.wait_for("text:Room message").unwrap(); + assert!( + !std::iter::from_fn(|| fx.subscriptions.try_recv().ok()) + .any(|sub| sub["method"] == "watchGoal") + ); + fx.app.press("label:More").unwrap(); + assert!(fx.app.choose_menu_item("New Goal…").is_err()); + fx.app.close_menu().unwrap(); + fx.app.press("label:Chats").unwrap(); + + fx.open_main(); + fx.app.press("label:More").unwrap(); + assert!( + fx.app.choose_menu_item("New Goal…").is_err(), + "before the first frame" + ); + fx.app.close_menu().unwrap(); + let main = fx.subscription("watchGoal", None).await; + assert_eq!(main["input"], json!({"sessionId":"main"})); + fx.goal_frame(&main, json!({"enabled":false,"current":null})); + fx.app.press("label:More").unwrap(); + assert!( + fx.app.choose_menu_item("New Goal…").is_err(), + "Host disabled it" + ); + fx.app.close_menu().unwrap(); + fx.goal_frame( + &main, + json!({"enabled":false,"current":goal_record("paused",1)}), + ); + open_goal(&mut fx.app, "Goal Details…"); + fx.app + .wait_for("text:Goals are turned off on this computer.") + .unwrap(); + assert!(!fx.app.screen().matches("id:goal-toggle").unwrap()); + fx.app.press("id:goal-close").unwrap(); + assert!(fx.mutations.try_recv().is_err()); + + assert!(native_quote( + &mut fx.app, + "text:Later durable answer", + Some("Later durable answer") + )); + fx.app.press("label:Ask Side Question").unwrap(); + fx.app.wait_for("text:Side Question").unwrap(); + assert!(!fx.app.screen().matches("label:More").unwrap()); + fx.expect_goal_unsubscribe(&main).await; + assert!( + !std::iter::from_fn(|| fx.subscriptions.try_recv().ok()) + .any(|sub| sub["method"] == "watchGoal") + ); + + fx.app + .type_text("label:Message composer", "A separate question") + .unwrap(); + fx.app.press("label:Send message").unwrap(); + let (_, fork) = fx.mutation("fork").await; + let backend = json!({"kind":"model","connectionId":"selected","modelId":"selected-model","thinkingLevel":"high"}); + *fx.backend.lock().unwrap() = backend.clone(); + fork.resolve(json!({"value":{"kind":"forked","session":side_session("new-side","A separate question",&backend)}})); + let (input, send) = fx.mutation("send").await; + assert_eq!(input["sessionId"], "new-side"); + send.resolve( + json!({"value":{"kind":"rejected","sessionId":"new-side","reason":"turn_stopped"}}), + ); + + let child = fx.subscription("watchGoal", None).await; + assert_eq!(child["input"], json!({"sessionId":"new-side"})); + fx.goal_frame(&child, goal_view(Value::Null)); + open_goal(&mut fx.app, "New Goal…"); + enter_goal_text(&mut fx.app, "goal-objective", "Child objective"); + fx.app.press("id:goal-save").unwrap(); + let (create, receipt) = fx.mutation("changeGoal").await; + assert_eq!(create["sessionId"], "new-side"); + assert_eq!(create["approval"]["target"]["sessionId"], "new-side"); + assert_eq!(create["approval"]["backend"], backend); + receipt.resolve(json!({"value":{"kind":"committed","goalId":GOAL_ID,"revision":1}})); + fx.goal_read("new-side") + .await + .resolve(json!({"value":goal_view(goal_record("active",1))})); + fx.app.wait_for("text:Review database migrations").unwrap(); + + fx.app + .set_environment("background", |env| env.lifecycle = Lifecycle::Background) + .unwrap(); + fx.expect_goal_unsubscribe(&child).await; + fx.app.wait_for("text:Last synced · Read-only").unwrap(); + fx.app + .set_environment("foreground", |env| env.lifecycle = Lifecycle::Active) + .unwrap(); + let back = fx.subscription("watchGoal", None).await; + assert_eq!(back["input"], child["input"]); + assert_ne!(back["subscriptionId"], child["subscriptionId"]); + fx.goal_frame(&child, goal_view(goal_record("cancelled", 20))); + assert!(!fx.app.shows("text:Goal Cancelled")); + fx.goal_frame(&back, goal_view(goal_record("paused", 2))); + fx.app.wait_for("text:Goal Paused").unwrap(); +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn goal_create_validates_inputs_and_uses_observed_authority_without_touching_the_draft() { + use nsh_testing::DialogAnswer; + + let mut fx = side_chat_fixture(false, false); + *fx.backend.lock().unwrap() = json!({ + "kind":"model","connectionId":"chosen","modelId":"m","serviceTier":"priority","thinkingLevel":"high" + }); + fx.open_main(); + let sub = fx.subscription("watchGoal", None).await; + fx.goal_frame(&sub, goal_view(Value::Null)); + fx.app + .type_text("label:Message composer", "Keep this as a chat draft") + .unwrap(); + open_goal(&mut fx.app, "New Goal…"); + assert_eq!( + fx.app.screen().input_text("id:goal-objective").unwrap(), + Some("") + ); + enter_goal_text(&mut fx.app, "goal-objective", "\u{0085}\u{2003}"); + assert!(fx.app.press("id:goal-save").is_err()); + enter_goal_text( + &mut fx.app, + "goal-objective", + "\u{0085} Write the migration plan \u{2003}", + ); + for invalid in ["0", "-1", "1.5", "1e3", "9007199254740992", "+3", "0x10"] { + enter_goal_text(&mut fx.app, "goal-budget", invalid); + assert!(fx.app.press("id:goal-save").is_err(), "{invalid}"); + } + enter_goal_text(&mut fx.app, "goal-budget", ""); + fx.app.press_key("escape").unwrap(); + assert!( + fx.app.screen().matches("id:goal-objective").unwrap(), + "dirty edit stayed open" + ); + fx.app.answer_dialogs_myself(); + fx.app.press("id:goal-close").unwrap(); + assert_eq!( + fx.app.pending_dialog().unwrap().title.as_deref(), + Some("Discard goal edits?") + ); + fx.app + .answer_dialog(DialogAnswer::Press("Keep Editing".into())) + .unwrap(); + assert!(fx.mutations.try_recv().is_err()); + + fx.app.compose("id:goal-objective", "qianyi").unwrap(); + assert!( + fx.app.press("id:goal-save").is_err(), + "do not submit marked text" + ); + assert!(fx.mutations.try_recv().is_err()); + fx.app.compose("id:goal-objective", "").unwrap(); + fx.app.press("id:goal-save").unwrap(); + let (input, call) = fx.mutation("changeGoal").await; + assert_eq!( + input, + json!({ + "kind":"create","sessionId":"main","objective":"Write the migration plan","tokenBudget":null,"start":true, + "approval":{ + "target":{"sessionId":"main","workspace":{"path":"/work"}, + "permissions":{"access":"read_only","requestPermissions":true},"boundaryRevision":12, + "binding":{"id":"00000000-0000-4000-8000-000000000001","permissionEpoch":3}}, + "backend":*fx.backend.lock().unwrap() + } + }) + ); + assert!( + fx.app.press("id:goal-save").is_err(), + "in-flight mutation disables submission" + ); + let mut goal = goal_record("active", 1); + goal["objective"] = input["objective"].clone(); + fx.goal_commit(call, goal).await; + fx.app.wait_for("text:Write the migration plan").unwrap(); + assert!(!fx.app.screen().matches("id:goal-objective").unwrap()); + fx.app.press("id:goal-close").unwrap(); + assert_eq!( + fx.app + .screen() + .input_text("label:Message composer") + .unwrap(), + Some("Keep this as a chat draft") + ); + assert!( + fx.mutations.try_recv().is_err(), + "closing does not send a mutation" + ); +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn goal_cannot_create_from_list_metadata_without_observed_authority() { + let mut fx = side_chat_fixture(false, false); + fx.goal_authority + .store(false, std::sync::atomic::Ordering::Relaxed); + fx.open_main(); + let sub = fx.subscription("watchGoal", None).await; + fx.goal_frame(&sub, goal_view(Value::Null)); + open_goal(&mut fx.app, "New Goal…"); + enter_goal_text(&mut fx.app, "goal-objective", "A separate objective"); + fx.app.press("id:goal-save").unwrap(); + fx.app + .wait_for("text:Could not verify this chat’s settings. Review them and try again.") + .unwrap(); + assert_eq!( + fx.app.screen().input_text("id:goal-objective").unwrap(), + Some("A separate objective") + ); + assert!(fx.mutations.try_recv().is_err()); +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn goal_controls_use_host_revision_pending_and_budget_completeness() { + use nsh_testing::DialogAnswer; + let mut fx = side_chat_fixture(false, false); + fx.open_main(); + let sub = fx.subscription("watchGoal", None).await; + fx.goal_frame(&sub, goal_view(goal_record("armed", 1))); + fx.app.wait_for("text:work · Goal Ready").unwrap(); + open_goal(&mut fx.app, "Goal Details…"); + fx.app.press("id:goal-toggle").unwrap(); + let (input, call) = fx.mutation("changeGoal").await; + assert_eq!(input["action"], "resume"); + assert_eq!(input["revision"], 1); + assert_eq!(input["goalId"], GOAL_ID); + assert_eq!(input["approval"]["target"]["sessionId"], "main"); + let mut active = goal_record("active", 2); + active["pending"] = json!(true); + active["retryAt"] = json!(4_000_000_000_000u64); + fx.goal_commit(call, active).await; + fx.app.wait_for("text:/Next attempt:/").unwrap(); + assert!(!fx.app.screen().matches("id:goal-complete").unwrap()); + fx.app.press("id:goal-toggle").unwrap(); + let (input, call) = fx.mutation("changeGoal").await; + assert_eq!( + input, + json!({"kind":"control","sessionId":"main","goalId":GOAL_ID,"revision":2,"action":"pause"}) + ); + let mut paused = goal_record("paused", 3); + paused["pending"] = json!(true); + fx.goal_commit(call, paused).await; + fx.app.wait_for("text:Goal Paused").unwrap(); + fx.app.press("id:goal-toggle").unwrap(); + let (input, call) = fx.mutation("changeGoal").await; + assert_eq!(input["action"], "resume"); + assert!(input.get("approval").is_none()); + let mut blocked = goal_record("blocked", 4); + blocked["note"] = json!("A dependency is unavailable."); + fx.goal_commit(call, blocked.clone()).await; + fx.app + .wait_for("text:A dependency is unavailable.") + .unwrap(); + + fx.app.press("id:goal-edit-budget").unwrap(); + enter_goal_text(&mut fx.app, "goal-budget", "3500"); + fx.app.press("id:goal-save").unwrap(); + let (input, call) = fx.mutation("changeGoal").await; + assert_eq!(input["action"], "set_budget"); + assert_eq!(input["budget"], json!({"tokenBudget":3500})); + assert!(input.get("approval").is_none()); + blocked["revision"] = json!(5); + blocked["tokenBudget"] = json!(3500); + fx.goal_commit(call, blocked).await; + fx.app.wait_for("text:3,500 tokens").unwrap(); + + let mut limited = goal_record("budget_limited", 6); + limited["tokenBudget"] = json!(1234); + limited["remainingTokens"] = json!(0); + fx.goal_frame(&sub, goal_view(limited.clone())); + fx.app.wait_for("text:Goal Budget Limited").unwrap(); + assert!( + !fx.app.screen().matches("id:goal-toggle").unwrap(), + "no bare resume" + ); + fx.app.press("id:goal-adjust").unwrap(); + assert_eq!( + fx.app.screen().input_text("id:goal-budget").unwrap(), + Some("1234") + ); + assert!( + fx.app.press("id:goal-save").is_err(), + "the existing cap must not be removed implicitly" + ); + assert!(fx.mutations.try_recv().is_err()); + enter_goal_text(&mut fx.app, "goal-budget", "4321"); + fx.app.press("id:goal-save").unwrap(); + let (input, call) = fx.mutation("changeGoal").await; + assert_eq!(input["action"], "resume"); + assert_eq!(input["budget"], json!({"tokenBudget":4321})); + assert_eq!(input["revision"], 6); + limited["revision"] = json!(7); + limited["consumed"]["missing"] = json!(1); + limited["report"] = json!({"status":"progress","note":limited["note"]}); + fx.goal_commit(call, limited.clone()).await; + fx.app.wait_for("text:At least 1,234 tokens").unwrap(); + assert_eq!( + fx.app.screen().count("text:Reviewed the schema.").unwrap(), + 1 + ); + fx.app.wait_for("text:Unknown · Incomplete usage").unwrap(); + assert!(!fx.app.shows("text:0 tokens")); + assert!(!fx.app.screen().matches("id:goal-adjust").unwrap()); + + let mut older = goal_record("cancelled", 6); + older["objective"] = json!("Old goal"); + fx.goal_frame(&sub, goal_view(older)); + limited["consumed"]["known"] = json!(1235); + limited["elapsedSeconds"] = json!(51); + fx.goal_frame(&sub, goal_view(limited)); + fx.app.wait_for("text:At least 1,235 tokens").unwrap(); + fx.app.wait_for("text:51 s").unwrap(); + + fx.app.press("id:goal-remove-limit").unwrap(); + let (input, call) = fx.mutation("changeGoal").await; + assert_eq!(input["action"], "resume"); + assert_eq!(input["budget"], json!({"tokenBudget":null})); + assert_eq!(input["revision"], 7); + let mut active = goal_record("active", 8); + active["consumed"]["missing"] = json!(1); + active["tokenBudget"] = Value::Null; + fx.goal_commit(call, active).await; + assert_eq!(fx.app.screen().count("text:Unlimited").unwrap(), 2); + fx.app.answer_dialogs_myself(); + fx.app.press("id:goal-cancel").unwrap(); + fx.app + .answer_dialog(DialogAnswer::Press("Keep Goal".into())) + .unwrap(); + assert!(fx.mutations.try_recv().is_err()); + fx.app.press("id:goal-cancel").unwrap(); + fx.app + .answer_dialog(DialogAnswer::Press("Cancel Goal".into())) + .unwrap(); + let (input, call) = fx.mutation("changeGoal").await; + assert_eq!(input["action"], "cancel"); + let mut cancelled = goal_record("cancelled", 9); + cancelled["pending"] = json!(true); + fx.goal_commit(call, cancelled.clone()).await; + fx.app + .wait_for("text:Waiting for this turn to finish.") + .unwrap(); + assert!(fx.app.press("id:goal-new").is_err()); + assert!(!fx.app.screen().matches("id:goal-dismiss").unwrap()); + cancelled["pending"] = json!(false); + cancelled["revision"] = json!(10); + fx.goal_frame(&sub, goal_view(cancelled.clone())); + fx.app.press("id:goal-dismiss").unwrap(); + let (input, call) = fx.mutation("changeGoal").await; + assert_eq!(input["action"], "dismiss"); + cancelled["dismissed"] = json!(true); + cancelled["revision"] = json!(11); + fx.goal_commit(call, cancelled).await; + assert!(!fx.app.screen().matches("id:goal-dismiss").unwrap()); + fx.app.press("id:goal-close").unwrap(); + assert!(!fx.app.shows("text:work · Goal Cancelled")); + // A new Host record, not a local "hidden" bit, owns the summary. + let mut next = goal_record("paused", 12); + next["id"] = json!("00000000-0000-4000-8000-000000000008"); + fx.goal_frame(&sub, goal_view(next)); + fx.app.wait_for("text:work · Goal Paused").unwrap(); + open_goal(&mut fx.app, "Goal Details…"); + fx.app.press("id:goal-complete").unwrap(); + let (input, call) = fx.mutation("changeGoal").await; + assert_eq!(input["action"], "complete"); + let mut achieved = goal_record("achieved", 13); + achieved["id"] = input["goalId"].clone(); + fx.goal_commit(call, achieved).await; + fx.app.wait_for("text:Goal Achieved").unwrap(); + fx.app.press("id:goal-new").unwrap(); + fx.app.wait_for("id:goal-objective").unwrap(); + assert!(fx.mutations.try_recv().is_err()); +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn goal_conflict_rejections_and_disconnect_read_back_without_replaying_changes() { + let mut fx = side_chat_fixture(false, false); + use nsh_core::{Command, MountItem}; + let (announcement_tx, mut announcements) = mpsc::unbounded_channel(); + fx.app.observe(move |_, batch| { + for item in &batch.items { + if let MountItem::Command { + command: Command::Announce(message), + .. + } = item + { + announcement_tx.send(message.clone()).unwrap(); + } + } + }); + fx.open_main(); + let sub = fx.subscription("watchGoal", None).await; + let active = goal_record("active", 4); + fx.goal_frame(&sub, goal_view(active.clone())); + open_goal(&mut fx.app, "Goal Details…"); + fx.app.press("id:goal-toggle").unwrap(); + let (_, call) = fx.mutation("changeGoal").await; + call.resolve(json!({"value":{"kind":"conflict","actual":5}})); + let query = fx.goal_read("main").await; + fx.goal_frame(&sub, goal_view(goal_record("blocked", 5))); + query.resolve(json!({"value":goal_view(active)})); + fx.app + .wait_for("text:The goal changed. Review it and try again.") + .unwrap(); + fx.app.wait_for("text:Goal Blocked").unwrap(); + + assert_eq!( + fixture_recv(&mut announcements).await, + "The goal changed. Review it and try again." + ); + let mut usage_update = goal_record("blocked", 5); + usage_update["elapsedSeconds"] = json!(46); + fx.goal_frame(&sub, goal_view(usage_update)); + fx.app.wait_for("text:46 s").unwrap(); + assert!( + announcements.try_recv().is_err(), + "meter updates must not interrupt VoiceOver" + ); + + for (reason, message) in [ + ( + "goal_current_unfinished", + "Finish or cancel the current goal first.", + ), + ("goal_disabled", "Goals are turned off on this computer."), + ( + "goal_status_tool_unavailable", + "Enable Goal tools for this chat to start or resume a goal.", + ), + ( + "scheduler_authorization_changed", + "Chat settings changed. Review them and try again.", + ), + ( + "goal_authorization_changed", + "Chat settings changed. Review them and try again.", + ), + ( + "future_reason", + "The computer rejected the goal change: future_reason", + ), + ] { + fx.app.press("id:goal-toggle").unwrap(); + let (_, call) = fx.mutation("changeGoal").await; + call.resolve(json!({"value":{"kind":"rejected","reason":reason}})); + fx.goal_read("main") + .await + .resolve(json!({"value":goal_view(goal_record("blocked",5))})); + fx.app.wait_for(&format!("text:{message}")).unwrap(); + assert_eq!(fixture_recv(&mut announcements).await, message); + assert!(fx.app.settle()); + } + + fx.app.press("id:goal-toggle").unwrap(); + let (_, call) = fx.mutation("changeGoal").await; + fx.app + .send_host_event("ios.hostState", side_host_state(2, None)) + .unwrap(); + call.reject("Connection interrupted"); + fx.app.wait_for("text:Last synced · Read-only").unwrap(); + fx.app + .wait_for("text:Could not confirm the goal change. Check its status before trying again.") + .unwrap(); + assert!(fx.app.press("id:goal-toggle").is_err()); + fx.app + .send_host_event("ios.hostState", side_host_state(3, Some(8))) + .unwrap(); + assert!(fx.app.settle()); + let reconnected = fx.subscription("watchGoal", None).await; + fx.goal_frame(&sub, goal_view(goal_record("cancelled", 99))); + fx.goal_frame(&reconnected, goal_view(goal_record("active", 6))); + fx.app.wait_for("text:Goal in Progress").unwrap(); + assert!( + fx.mutations.try_recv().is_err(), + "never reissued the lost mutation" + ); +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn goal_sheet_fits_landscape_ime_and_transcript_omits_the_internal_prompt() { + use nsh_core::platform::ColorScheme; + + let mut continuation = quote_history_row(1, "user", "Internal continuation instructions"); + continuation["origin"] = + json!({"kind":"goal","goalId":GOAL_ID,"objective":"Review database migrations"}); + let (_, answer) = side_history_rows(); + let subtitle = "production-schema-migration-review-for-november-release"; + let mut fx = side_chat_fixture_with_history( + false, + false, + Os::Ios, + vec![continuation, answer], + &format!("/work/{subtitle}"), + ); + fx.app.set_viewport(Size::new(px(600.), px(844.))).unwrap(); + fx.open_main(); + fx.app + .wait_for("label:Continuing goal: Review database migrations") + .unwrap(); + assert!(!fx.app.shows("text:Internal continuation instructions")); + let sub = fx.subscription("watchGoal", None).await; + let mut compact = goal_record("paused", 1); + compact["objective"] = json!("A".repeat(150)); + fx.goal_frame(&sub, goal_view(compact)); + let context_label = |app: &Headless| { + let node = app + .screen() + .layout_nodes() + .into_iter() + .find(|node| node.test_id.as_deref() == Some("chat-context-label")) + .unwrap(); + (node.bounds, node.text.unwrap().text.text.to_string()) + }; + assert_eq!( + context_label(&fx.app).1, + format!("{subtitle} · Goal Paused") + ); + fx.app.set_viewport(Size::new(px(375.), px(812.))).unwrap(); + fx.app + .set_environment("larger type", |env| env.font_scale = 1.45) + .unwrap(); + let (label_bounds, label) = context_label(&fx.app); + assert_eq!(label, subtitle); + let pill = fx + .app + .screen() + .layout("id:chat-context") + .unwrap() + .unwrap() + .bounds; + assert!(pill.origin.x >= px(16.) && pill.origin.x + pill.size.width <= px(359.)); + assert!(label_bounds.origin.x + label_bounds.size.width <= pill.origin.x + pill.size.width); + fx.open_native_goal("Goal Details…"); + let sheet = "id:chat-goal-sheet-scroll"; + fx.app.wait_for(sheet).unwrap(); + for scheme in [ColorScheme::Light, ColorScheme::Dark] { + fx.app + .set_environment("Goal appearance", |env| env.color_scheme = scheme) + .unwrap(); + for selector in ["id:goal-close", "id:goal-toggle", "id:goal-cancel"] { + assert_dock_touch_target(&fx.app, selector); + assert_chat_button_contrast(&mut fx.app, selector, None, button_text_color); + } + } + fx.app.press("id:goal-close").unwrap(); + fx.app.set_viewport(Size::new(px(844.), px(390.))).unwrap(); + fx.app + .set_environment("landscape keyboard and safe area", |env| { + env.font_scale = 1.; + env.keyboard_height = px(240.); + env.safe_area.left = px(47.); + env.safe_area.right = px(47.); + env.safe_area.bottom = px(34.); + }) + .unwrap(); + let composer_before = fx + .app + .screen() + .layout("id:chat-composer") + .unwrap() + .unwrap() + .bounds; + assert_eq!( + composer_before.origin.y + composer_before.size.height, + px(150.) + ); + assert!(!fx.app.screen().matches("id:chat-context").unwrap()); + fx.goal_frame(&sub, goal_view(goal_record("active", 2))); + assert_eq!( + fx.app + .screen() + .layout("id:chat-composer") + .unwrap() + .unwrap() + .bounds, + composer_before + ); + fx.open_native_goal("Goal Details…"); + fx.app.wait_for(sheet).unwrap(); + reveal_sheet_target(&mut fx.app, sheet, "id:goal-toggle"); + reveal_sheet_target(&mut fx.app, sheet, "id:goal-edit-budget"); + fx.app.press("id:goal-edit-budget").unwrap(); + reveal_sheet_target(&mut fx.app, sheet, "id:goal-budget"); + assert_dock_touch_target(&fx.app, "id:goal-budget"); + enter_goal_text(&mut fx.app, "goal-budget", "3000"); + reveal_sheet_target(&mut fx.app, sheet, "id:goal-save"); + assert_dock_touch_target(&fx.app, "id:goal-save"); + assert!(fx.mutations.try_recv().is_err()); +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn goal_budget_limited_can_cancel_a_pending_turn_and_mark_a_settled_goal_complete() { + use nsh_testing::DialogAnswer; + + let mut fx = side_chat_fixture(false, false); + fx.open_main(); + let sub = fx.subscription("watchGoal", None).await; + let mut limited = goal_record("budget_limited", 1); + limited["pending"] = json!(true); + fx.goal_frame(&sub, goal_view(limited)); + open_goal(&mut fx.app, "Goal Details…"); + assert!(!fx.app.screen().matches("id:goal-complete").unwrap()); + fx.app.answer_dialogs_myself(); + fx.app.press("id:goal-cancel").unwrap(); + fx.app + .answer_dialog(DialogAnswer::Press("Cancel Goal".into())) + .unwrap(); + let (input, call) = fx.mutation("changeGoal").await; + assert_eq!(input["action"], "cancel"); + assert_eq!(input["revision"], 1); + fx.goal_commit(call, goal_record("cancelled", 2)).await; + fx.app.wait_for("text:Goal Cancelled").unwrap(); + + let mut next = goal_record("budget_limited", 3); + next["id"] = json!("00000000-0000-4000-8000-000000000008"); + fx.goal_frame(&sub, goal_view(next)); + fx.app.press("id:goal-complete").unwrap(); + let (input, call) = fx.mutation("changeGoal").await; + assert_eq!(input["action"], "complete"); + assert_eq!(input["revision"], 3); + let mut achieved = goal_record("achieved", 4); + achieved["id"] = input["goalId"].clone(); + fx.goal_commit(call, achieved).await; + fx.app.wait_for("text:Goal Achieved").unwrap(); +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn goal_continuations_do_not_appear_in_the_pending_dock_or_its_count() { + const INTERNAL: &str = "Continue using these internal Goal instructions"; + let mut fx = ComposerDockFixture::start(dock_run(), dock_model(), empty_queue()).await; + let goal = json!({ + "messageId":"goal-continuation","kind":"followup","preview":INTERNAL, + "origin":{"kind":"goal","goalId":GOAL_ID,"objective":"Review database migrations"} + }); + fx.queue_item(json!({"revision":1,"entries":[goal]})); + assert!(!fx.app.screen().matches("id:composer-pending-dock").unwrap()); + assert!(!fx.app.shows("text:1 queued")); + + fx.queue_item(json!({"revision":2,"entries":[goal, + {"messageId":"user-followup","kind":"followup","preview":"A user follow-up"} + ]})); + fx.app.press("label:Queued Messages (1)").unwrap(); + fx.app.wait_for("text:A user follow-up").unwrap(); + assert!(!fx.app.shows(&format!("text:{INTERNAL}"))); + assert_eq!( + fx.app.screen().count("label:Edit queued message").unwrap(), + 1 + ); + fx.app.press("label:Edit queued message").unwrap(); + let (input, reply) = fx.call("queueMessage").await; + assert_eq!(input["messageId"], "user-followup"); + reply.resolve(json!({"value":{"kind":"ready","revision":2, + "message":"A user follow-up","hasAttachments":false,"quotes":[]}})); + fx.app.wait_for("id:queue-message-editor").unwrap(); +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn goal_portrait_sheet_stays_below_the_notch_and_above_the_keyboard() { + let mut fx = side_chat_fixture_on(false, false, Os::Ios, 1); + fx.app.set_viewport(Size::new(px(375.), px(812.))).unwrap(); + fx.open_main(); + let sub = fx.subscription("watchGoal", None).await; + fx.goal_frame(&sub, goal_view(Value::Null)); + fx.open_native_goal("New Goal…"); + fx.app + .set_environment("portrait keyboard and safe area", |env| { + env.safe_area.top = px(47.); + env.safe_area.bottom = px(34.); + env.keyboard_height = px(320.); + }) + .unwrap(); + for selector in ["id:chat-goal-sheet-scroll", "id:goal-close"] { + assert_keyboard_target(&fx.app, selector, 16., 359., 492.); + let bounds = fx.app.screen().layout(selector).unwrap().unwrap().bounds; + assert!(bounds.origin.y >= px(47.), "{selector}: {bounds:?}"); + } +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn goal_late_readback_cannot_close_a_new_budget_editor() { + use nsh_testing::DialogAnswer; + let mut fx = side_chat_fixture(false, false); + fx.open_main(); + let sub = fx.subscription("watchGoal", None).await; + fx.goal_frame(&sub, goal_view(goal_record("paused", 1))); + open_goal(&mut fx.app, "Goal Details…"); + fx.app.press("id:goal-edit-budget").unwrap(); + enter_goal_text(&mut fx.app, "goal-budget", "3000"); + fx.app.press("id:goal-save").unwrap(); + let (_, call) = fx.mutation("changeGoal").await; + call.resolve(json!({"value":{"kind":"committed","goalId":GOAL_ID,"revision":2}})); + let readback = fx.goal_read("main").await; + let mut committed = goal_record("paused", 2); + committed["tokenBudget"] = json!(3000); + fx.goal_frame(&sub, goal_view(committed.clone())); + + fx.app.answer_dialogs_myself(); + fx.app.press("id:goal-close").unwrap(); + fx.app + .answer_dialog(DialogAnswer::Press("Discard Edits".into())) + .unwrap(); + fx.app.press("id:goal-edit-budget").unwrap(); + enter_goal_text(&mut fx.app, "goal-budget", "4050"); + + // A newer snapshot proves JS processed the held read, not just that the + // draft was still there before its promise settled. + committed["revision"] = json!(3); + readback.resolve(json!({"value":goal_view(committed)})); + fx.app + .wait_for("text:The goal changed. Close the editor to review it.") + .unwrap(); + assert_eq!( + fx.app.screen().input_text("id:goal-budget").unwrap(), + Some("4050") + ); + assert!(fx.mutations.try_recv().is_err()); +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn goal_watch_ack_keeps_the_submitted_budget_editor_read_only_until_readback() { + let mut fx = side_chat_fixture(false, false); + fx.open_main(); + let sub = fx.subscription("watchGoal", None).await; + fx.goal_frame(&sub, goal_view(goal_record("paused", 1))); + open_goal(&mut fx.app, "Goal Details…"); + fx.app.press("id:goal-edit-budget").unwrap(); + enter_goal_text(&mut fx.app, "goal-budget", "3000"); + fx.app.press("id:goal-save").unwrap(); + let (input, call) = fx.mutation("changeGoal").await; + assert_eq!(input["budget"], json!({"tokenBudget":3000})); + call.resolve(json!({"value":{"kind":"committed","goalId":GOAL_ID,"revision":2}})); + let readback = fx.goal_read("main").await; + let mut committed = goal_record("paused", 2); + committed["tokenBudget"] = json!(3000); + fx.goal_frame(&sub, goal_view(committed.clone())); + + // The editor has seen the watch frame, but its own save has not returned. + fx.app + .wait_for("text:The goal changed. Close the editor to review it.") + .unwrap(); + assert!(fx.app.type_text("id:goal-budget", "4050").is_err()); + assert_eq!( + fx.app.screen().input_text("id:goal-budget").unwrap(), + Some("3000") + ); + + readback.resolve(json!({"value":goal_view(committed)})); + fx.app.wait_for("text:3,000 tokens").unwrap(); + assert!(!fx.app.screen().matches("id:goal-budget").unwrap()); + fx.app.press("id:goal-edit-budget").unwrap(); + enter_goal_text(&mut fx.app, "goal-budget", "4050"); + assert_eq!( + fx.app.screen().input_text("id:goal-budget").unwrap(), + Some("4050") + ); + assert!(fx.mutations.try_recv().is_err()); +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn goal_sheet_can_reconnect_only_the_watch_without_losing_or_submitting_a_draft() { + let mut fx = side_chat_fixture(false, false); + fx.open_main(); + let sub = fx.subscription("watchGoal", None).await; + fx.goal_frame(&sub, goal_view(Value::Null)); + open_goal(&mut fx.app, "New Goal…"); + enter_goal_text(&mut fx.app, "goal-objective", "Check the migration plan"); + enter_goal_text(&mut fx.app, "goal-budget", "3400"); + fx.app + .send_host_event( + "ios.subscriptionEnded", + json!({ + "subscriptionId":sub["subscriptionId"],"rootId":"root", + "generation":sub["generation"],"error":"watch interrupted" + }), + ) + .unwrap(); + fx.app.wait_for("text:Last synced · Read-only").unwrap(); + assert!(fx.app.press("id:goal-save").is_err()); + fx.app.press("id:goal-reconnect").unwrap(); + let reconnected = fx.subscription("watchGoal", None).await; + assert_ne!(reconnected["subscriptionId"], sub["subscriptionId"]); + assert_eq!(reconnected["input"], sub["input"]); + fx.goal_frame(&reconnected, goal_view(Value::Null)); + assert!(fx.goal_reads.try_recv().is_err()); + assert!(fx.mutations.try_recv().is_err()); + fx.app.press("id:goal-save").unwrap(); + let (input, call) = fx.mutation("changeGoal").await; + assert_eq!(input["objective"], "Check the migration plan"); + assert_eq!(input["tokenBudget"], 3400); + fx.goal_commit(call, goal_record("active", 1)).await; + fx.app.wait_for("text:Goal Details").unwrap(); +} diff --git a/products/maka/ios-shell/tests/ios_shell_language.rs b/products/maka/ios-shell/tests/ios_shell_language.rs index 94855231c9e..abeb8aeefc1 100644 --- a/products/maka/ios-shell/tests/ios_shell_language.rs +++ b/products/maka/ios-shell/tests/ios_shell_language.rs @@ -161,6 +161,17 @@ async fn changing_language_updates_tabs_settings_inbox_recovery_and_pairing() { "before": null, "after": null }), + "observe" => json!({"session":session,"through":1,"run":null}), + "queue" => json!({"revision":0,"entries":[]}), + "models" => json!({"kind":"ready","choices":[]}), + "history" => json!({ + "kind":"ready","through":1,"before":null,"chunks":[{ + "field":"body","role":"user","text":"Internal Goal prompt","totalBytes":20,"offset":0, + "position":{"kind":"live","sequence":1,"fact":"00000000-0000-4000-8000-000000000001","itemIndex":0}, + "order":{"path":[1],"itemIndex":0},"messageId":"goal-turn", + "origin":{"kind":"goal","goalId":"goal","objective":"API の確認"} + }] + }), "pendingInteractions" => json!({ "revision": 1, "entries": [ @@ -210,11 +221,21 @@ async fn changing_language_updates_tabs_settings_inbox_recovery_and_pairing() { }); channel.handle("ios.subscribe", |mut call| { let data = call.take_data(); - call.reply(Ok(json!({ - "subscriptionId": data["subscriptionId"], - "rootId": "root", - "generation": 1 - }))); + let handle = json!({ + "subscriptionId":data["subscriptionId"],"rootId":"root","generation":1, + }); + let sender = call.sender(); + call.resolve(handle.clone()); + if data["method"] == "watchGoal" { + let mut frame = handle; + frame["item"] = json!({"enabled":true,"current":{ + "id":"goal","revision":1,"status":"blocked","objective":"API の確認", + "iterations":2,"consumed":{"known":1234,"missing":1},"tokenBudget":5000, + "remainingTokens":null,"elapsedSeconds":11,"pending":false,"dismissed":false, + "note":"作業環境を確認してください。" + }}); + sender.send("ios.subscriptionItem", frame).unwrap(); + } }); channel.handle("ios.unsubscribe", |call| { call.reply(Ok(json!({ "cancelled": true }))); @@ -285,6 +306,16 @@ async fn changing_language_updates_tabs_settings_inbox_recovery_and_pairing() { .unwrap(); app.wait_for("text:/結果.*取得しました/").unwrap(); + app.press("label:会話:Locale conversation").unwrap(); + app.wait_for("label:目標を続行:API の確認").unwrap(); + app.wait_for("text:work · 目標が進められません").unwrap(); + app.press("label:その他").unwrap(); + app.choose_menu_item("目標の詳細…").unwrap(); + app.wait_for("text:目標の詳細").unwrap(); + app.wait_for("text:少なくとも 1,234 トークン").unwrap(); + app.wait_for("text:不明 · 使用量の一部が未集計").unwrap(); + app.press("id:goal-close").unwrap(); + app.send_url_scheme("maka://pair/v1?payload=fixture"); app.wait_for("text:リンクでペアリング").unwrap(); } From b16d6f0d6fb7e3c75a6c8773137d61b95c22fc23 Mon Sep 17 00:00:00 2001 From: me2seeks Date: Fri, 27 Nov 2026 19:00:40 +0800 Subject: [PATCH 5/7] chore(nsh): sync upstream through 3b2fd5876 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refresh the vendored snapshot and file provenance, including the paragraph strut, native Input presses, and list offset rebuilds. Keep Maka’s indexed rows, text-source anchors, input ordering, CJK locale, terminal, embedding and lifecycle extensions and the unmerged #3534 shader submission and frame retirement tests. Link the crates.io system-controls nshm in iOS, audit the iOS dependency inventory, and run the upstream pointer and local-time fixtures in the Maka NSH suite. Generated-by: Maka --- .github/workflows/ios-ipa.yml | 2 + Cargo.lock | 68 +- Cargo.toml | 5 + LICENSE | 10 +- NOTICE | 3 + deny.toml | 1 + products/maka/cli/DEPENDENCIES.rust.tsv | 18 +- products/maka/cli/THIRD_PARTY_NOTICES.txt | 19 +- products/maka/cli/notices.json | 11 +- products/maka/ios-shell/Cargo.toml | 2 + .../app/screens/chats/ChatListScreen.tsx | 17 +- .../app/screens/chats/NewChatSheet.tsx | 6 +- .../app/screens/chats/ProjectFilesScreen.tsx | 6 +- .../app/screens/inbox/InboxScreen.tsx | 6 +- .../app/screens/settings/SettingsForm.tsx | 4 +- products/maka/ios-shell/build.rs | 3 +- products/maka/ios-shell/src/lib.rs | 7 +- .../ios-shell/tests/ios_shell_behaviors.rs | 64 +- .../ios-shell/tests/ios_shell_language.rs | 28 +- products/maka/workbench/Cargo.toml | 1 + products/maka/workbench/examples/ui_types.rs | 8 +- scripts/asf-license-headers.mjs | 1 + scripts/ci/run.mjs | 3 + scripts/rust/dependencies.mjs | 2 +- scripts/rust/dependencies.test.mjs | 5 +- scripts/rust/package-ios.mjs | 4 +- scripts/rust/package-ios.test.mjs | 6 + .../nsh/.github/actions/cargo/action.yml | 6 + .../nsh/.github/ci/ios-build-versions.py | 7 +- third-party/nsh/.github/workflows/release.yml | 40 +- .../nsh/.github/workflows/rust-app.yml | 11 +- third-party/nsh/.github/workflows/website.yml | 9 + third-party/nsh/.github/workflows/windows.yml | 77 + third-party/nsh/AGENTS.md | 6 +- third-party/nsh/CONTRIBUTING.md | 35 +- third-party/nsh/Cargo.lock | 41 +- third-party/nsh/Cargo.toml | 8 +- third-party/nsh/SOURCE.md | 28 +- .../nsh/crates/nsh-base/src/calendar.rs | 38 +- .../nsh/crates/nsh-base/src/combobox.rs | 13 +- .../crates/nsh-base/src/data_table/view.rs | 125 +- .../nsh/crates/nsh-base/src/date_picker.rs | 114 +- .../nsh/crates/nsh-base/src/dock/compact.rs | 1 + .../nsh/crates/nsh-base/src/dock/dock_area.rs | 25 +- .../nsh/crates/nsh-base/src/dock/tab_group.rs | 331 ++- third-party/nsh/crates/nsh-base/src/lib.rs | 7 +- .../nsh/crates/nsh-base/src/listbox.rs | 37 +- third-party/nsh/crates/nsh-base/src/menu.rs | 24 +- .../nsh/crates/nsh-base/src/otp_input.rs | 124 +- .../nsh/crates/nsh-base/src/popover.rs | 19 +- third-party/nsh/crates/nsh-base/src/popup.rs | 31 +- .../src/rich_editor/extensions/code_block.rs | 63 +- .../src/rich_editor/extensions/kit.rs | 30 +- .../src/rich_editor/js/extension_api.rs | 2 +- .../nsh-base/src/rich_editor/view/render.rs | 54 +- third-party/nsh/crates/nsh-base/src/select.rs | 48 +- third-party/nsh/crates/nsh-base/src/slider.rs | 81 +- third-party/nsh/crates/nsh-base/src/syntax.rs | 41 +- third-party/nsh/crates/nsh-base/src/tabs.rs | 7 + .../nsh-base/src/text_view/highlight.rs | 58 + .../crates/nsh-base/tests/base/calendar.rs | 157 +- .../crates/nsh-base/tests/base/combobox.rs | 59 +- .../crates/nsh-base/tests/base/data_table.rs | 77 +- .../crates/nsh-base/tests/base/date_picker.rs | 471 +++- .../nsh/crates/nsh-base/tests/base/dock.rs | 140 +- .../nsh-base/tests/base/emoji_picker.rs | 5 +- .../crates/nsh-base/tests/base/otp_input.rs | 90 +- .../nsh/crates/nsh-base/tests/base/popups.rs | 162 +- .../tests/base/rich_editor/code_highlight.rs | 169 +- .../nsh/crates/nsh-base/tests/base/select.rs | 165 +- .../nsh/crates/nsh-base/tests/base/slider.rs | 229 +- .../nsh/crates/nsh-base/tests/base/tabs.rs | 111 + .../crates/nsh-base/tests/base/terminal.rs | 13 +- .../nsh/crates/nsh-bundler/src/bundle.rs | 39 + third-party/nsh/crates/nsh-bundler/src/lib.rs | 5 +- .../nsh/crates/nsh-bundler/src/types.rs | 348 ++- third-party/nsh/crates/nsh-cli/Cargo.toml | 2 +- third-party/nsh/crates/nsh-cli/src/android.rs | 19 +- .../nsh-cli/src/android/library_manifest.rs | 68 +- third-party/nsh/crates/nsh-cli/src/build.rs | 5 + third-party/nsh/crates/nsh-cli/src/check.rs | 14 + .../nsh/crates/nsh-cli/src/component.rs | 7 + third-party/nsh/crates/nsh-cli/src/dev.rs | 20 + .../nsh/crates/nsh-cli/src/dev_port.rs | 152 +- third-party/nsh/crates/nsh-cli/src/init.rs | 48 + third-party/nsh/crates/nsh-cli/src/main.rs | 107 +- .../nsh/crates/nsh-cli/src/native_features.rs | 47 + .../nsh/crates/nsh-cli/src/nshm/fetch.rs | 255 +- .../nsh/crates/nsh-cli/src/nshm/resolve.rs | 120 + third-party/nsh/crates/nsh-cli/src/runtime.rs | 393 ++- .../nsh/crates/nsh-cli/src/rust_app.rs | 44 +- third-party/nsh/crates/nsh-cli/src/test.rs | 84 +- .../nsh/crates/nsh-cli/src/test_attach.rs | 250 ++ .../nsh/crates/nsh-cli/src/test_host.rs | 43 + third-party/nsh/crates/nsh-cli/src/ui.rs | 25 +- third-party/nsh/crates/nsh-cli/src/updater.rs | 11 +- third-party/nsh/crates/nsh-cli/src/windows.rs | 36 +- .../nsh/crates/nsh-cli/src/windows_link.rs | 188 ++ .../nsh/crates/nsh-cli/tests/cli/check.rs | 215 ++ .../nsh/crates/nsh-cli/tests/cli/runtime.rs | 125 +- third-party/nsh/crates/nsh-core/Cargo.toml | 2 - third-party/nsh/crates/nsh-core/src/access.rs | 123 +- .../crates/nsh-core/src/animation/animator.rs | 103 +- .../nsh/crates/nsh-core/src/auth_session.rs | 345 --- .../nsh/crates/nsh-core/src/canvas/damage.rs | 19 + .../nsh/crates/nsh-core/src/core/classes.rs | 16 +- .../crates/nsh-core/src/core/components.rs | 449 ++-- .../nsh/crates/nsh-core/src/core/list.rs | 158 +- .../nsh/crates/nsh-core/src/core/mod.rs | 82 +- .../nsh/crates/nsh-core/src/core/tests.rs | 945 ++++++- .../nsh/crates/nsh-core/src/desktop/window.rs | 37 +- .../crates/nsh-core/src/element/ambient.rs | 132 +- .../crates/nsh-core/src/element/component.rs | 19 +- .../nsh-core/src/element/element_ref.rs | 8 + .../nsh/crates/nsh-core/src/element/env.rs | 8 - .../nsh/crates/nsh-core/src/element/host.rs | 120 +- .../crates/nsh-core/src/element/services.rs | 12 - .../nsh/crates/nsh-core/src/element/style.rs | 6 +- .../nsh/crates/nsh-core/src/element/system.rs | 19 + .../nsh/crates/nsh-core/src/element/task.rs | 55 +- .../nsh/crates/nsh-core/src/fenwick.rs | 9 +- .../nsh/crates/nsh-core/src/js/host.rs | 2 - third-party/nsh/crates/nsh-core/src/keymap.rs | 107 +- third-party/nsh/crates/nsh-core/src/lib.rs | 2 - third-party/nsh/crates/nsh-core/src/mobile.rs | 559 +---- third-party/nsh/crates/nsh-core/src/mount.rs | 5 + third-party/nsh/crates/nsh-core/src/ops.rs | 55 +- .../nsh/crates/nsh-core/src/platform.rs | 39 +- .../nsh/crates/nsh-core/src/prelude.rs | 23 +- .../nsh/crates/nsh-core/src/reactive.rs | 8 +- .../nsh/crates/nsh-core/src/reactive/tests.rs | 95 + .../nsh/crates/nsh-core/src/runtime/fs.rs | 268 +- .../nsh/crates/nsh-core/src/runtime/mod.rs | 9 +- .../crates/nsh-core/src/runtime/updater.rs | 34 + .../crates/nsh-core/src/runtime/url_scheme.rs | 8 +- .../nsh/crates/nsh-core/src/selection.rs | 45 +- third-party/nsh/crates/nsh-core/src/share.rs | 481 ---- third-party/nsh/crates/nsh-core/src/style.rs | 7 +- third-party/nsh/crates/nsh-core/src/text.rs | 146 +- .../nsh/crates/nsh-core/src/url_scheme.rs | 6 +- .../nsh-core/tests/attachment_compat.rs | 1 + third-party/nsh/crates/nsh-dev/src/attach.rs | 139 ++ third-party/nsh/crates/nsh-dev/src/client.rs | 52 +- third-party/nsh/crates/nsh-dev/src/lib.rs | 10 +- .../nsh/crates/nsh-dev/src/protocol.rs | 139 ++ third-party/nsh/crates/nsh-dev/src/server.rs | 390 ++- .../nsh/crates/nsh-dev/tests/roundtrip.rs | 367 ++- .../nsh/crates/nsh-engine/src/frames.rs | 277 ++- third-party/nsh/crates/nsh-engine/src/gpu.rs | 208 +- third-party/nsh/crates/nsh-engine/src/lib.rs | 11 +- third-party/nsh/crates/nsh-engine/src/perf.rs | 109 +- .../nsh/crates/nsh-engine/src/shader.rs | 438 +++- .../nsh/crates/nsh-engine/src/shader_frame.rs | 43 +- .../crates/nsh-engine/src/shader_surfaces.rs | 94 +- .../nsh-engine/src/shader_surfaces_windows.rs | 8 +- .../nsh-engine/tests/engine/components.rs | 580 ++--- .../crates/nsh-engine/tests/engine/list.rs | 76 +- third-party/nsh/crates/nsh-extra/Cargo.toml | 23 +- third-party/nsh/crates/nsh-extra/src/lib.rs | 8 + .../nsh/crates/nsh-extra/src/share/android.rs | 397 +++ .../nsh/crates/nsh-extra/src/share/fake.rs | 145 ++ .../share.rs => nsh-extra/src/share/ios.rs} | 277 ++- .../share.rs => nsh-extra/src/share/js.rs} | 81 +- .../share.rs => nsh-extra/src/share/macos.rs} | 325 ++- .../nsh/crates/nsh-extra/src/share/mod.rs | 618 +++++ .../nsh/crates/nsh-extra/src/share/tests.rs | 213 ++ .../nsh/crates/nsh-extra/src/share/web.rs | 180 ++ .../nsh/crates/nsh-extra/tests/extra/main.rs | 2 + .../nsh/crates/nsh-extra/tests/extra/share.rs | 110 + .../nsh/crates/nsh-js/src/declarations.rs | 9 +- third-party/nsh/crates/nsh-js/src/dom.rs | 8 + third-party/nsh/crates/nsh-js/src/host.rs | 13 +- third-party/nsh/crates/nsh-js/src/i18n.rs | 31 +- third-party/nsh/crates/nsh-js/src/list.rs | 112 +- third-party/nsh/crates/nsh-js/src/modules.rs | 2 +- third-party/nsh/crates/nsh-js/src/protocol.rs | 1 + third-party/nsh/crates/nsh-js/src/sandbox.rs | 10 +- .../java/com/longbridge/nsh/A11y.java | 16 +- .../java/com/longbridge/nsh/Activities.java | 14 + .../java/com/longbridge/nsh/AuthSession.java | 145 -- .../java/com/longbridge/nsh/Backdrop.java | 21 + .../java/com/longbridge/nsh/Box.java | 65 +- .../nsh/DateTimePickerComponent.java | 437 ---- .../java/com/longbridge/nsh/Decor.java | 10 + .../java/com/longbridge/nsh/Effects.java | 11 + .../java/com/longbridge/nsh/InputBox.java | 42 +- .../java/com/longbridge/nsh/Mounter.java | 261 +- .../java/com/longbridge/nsh/Native.java | 21 +- .../com/longbridge/nsh/NativeReceiver.java | 82 + .../java/com/longbridge/nsh/NshView.java | 30 + .../java/com/longbridge/nsh/Pressable.java | 32 +- .../java/com/longbridge/nsh/ScrollBox.java | 76 +- .../com/longbridge/nsh/SelectableView.java | 11 + .../java/com/longbridge/nsh/Share.java | 235 -- .../com/longbridge/nsh/SwitchComponent.java | 337 --- .../java/com/longbridge/nsh/WebBox.java | 7 +- .../nsh-platform-android/src/activity.rs | 65 +- .../crates/nsh-platform-android/src/dev.rs | 27 +- .../crates/nsh-platform-android/src/encode.rs | 35 +- .../crates/nsh-platform-android/src/host.rs | 24 +- .../crates/nsh-platform-android/src/java.rs | 40 + .../crates/nsh-platform-android/src/lib.rs | 3 + .../nsh-platform-android/src/presenting.rs | 100 + .../nsh-platform-android/src/receiver.rs | 202 ++ .../crates/nsh-platform-android/src/shader.rs | 56 +- .../nsh-platform-android/tests/InputPress.tsx | 42 + .../tests/input-press.test.tsx | 51 + .../nsh-platform-ios/src/auth_session.rs | 184 -- .../crates/nsh-platform-ios/src/component.rs | 12 +- .../nsh/crates/nsh-platform-ios/src/dev.rs | 39 +- .../nsh/crates/nsh-platform-ios/src/lib.rs | 7 +- .../nsh/crates/nsh-platform-ios/src/mount.rs | 46 +- .../crates/nsh-platform-ios/src/presenting.rs | 49 +- .../nsh/crates/nsh-platform-ios/src/press.rs | 86 +- .../nsh-platform-ios/src/selectable_view.rs | 11 + .../nsh/crates/nsh-platform-ios/src/shader.rs | 15 +- .../crates/nsh-platform-ios/src/surface.rs | 12 +- .../src/system_date_time_picker.rs | 224 -- .../src/system_segmented_control.rs | 239 -- .../nsh-platform-ios/src/system_switch.rs | 144 -- .../nsh/crates/nsh-platform-ios/src/target.rs | 10 + .../nsh/crates/nsh-platform-ios/src/text.rs | 101 +- .../nsh/crates/nsh-platform-ios/src/web.rs | 17 +- .../tests/keyboard/InputPress.test.tsx | 39 + .../tests/keyboard/InputPress.tsx | 35 + .../crates/nsh-platform-linux/src/access.rs | 26 +- .../nsh/crates/nsh-platform-linux/src/app.rs | 13 +- .../nsh/crates/nsh-platform-linux/src/dev.rs | 27 +- .../crates/nsh-platform-linux/src/input.rs | 228 ++ .../crates/nsh-platform-linux/src/keymap.rs | 84 +- .../nsh/crates/nsh-platform-linux/src/lib.rs | 2 + .../crates/nsh-platform-linux/src/mount.rs | 5 + .../nsh-platform-linux/src/native/web.rs | 43 +- .../nsh-platform-linux/src/presenting.rs | 163 ++ .../nsh-platform-linux/src/selectable_view.rs | 22 + .../crates/nsh-platform-linux/src/surface.rs | 10 +- .../nsh/crates/nsh-platform-linux/src/text.rs | 348 ++- .../nsh/crates/nsh-platform-linux/src/view.rs | 23 +- .../crates/nsh-platform-linux/src/window.rs | 352 ++- .../crates/nsh-platform-macos/src/access.rs | 11 +- .../nsh/crates/nsh-platform-macos/src/app.rs | 36 +- .../crates/nsh-platform-macos/src/box_none.rs | 211 ++ .../crates/nsh-platform-macos/src/decor.rs | 14 +- .../nsh/crates/nsh-platform-macos/src/dev.rs | 47 +- .../crates/nsh-platform-macos/src/input.rs | 29 +- .../nsh/crates/nsh-platform-macos/src/lib.rs | 4 +- .../crates/nsh-platform-macos/src/mount.rs | 5 + .../crates/nsh-platform-macos/src/native.rs | 18 +- .../nsh-platform-macos/src/presenting.rs | 79 + .../crates/nsh-platform-macos/src/scroll.rs | 635 ++++- .../nsh-platform-macos/src/selectable_view.rs | 14 + .../crates/nsh-platform-macos/src/shader.rs | 32 +- .../crates/nsh-platform-macos/src/surface.rs | 46 +- .../crates/nsh-platform-macos/src/system.rs | 41 +- .../nsh/crates/nsh-platform-macos/src/text.rs | 188 +- .../nsh-platform-macos/src/text/raster.rs | 180 +- .../nsh-platform-macos/src/text_input.rs | 53 +- .../crates/nsh-platform-macos/src/visual.rs | 82 +- .../crates/nsh-platform-macos/src/window.rs | 159 +- .../nsh-platform-macos/src/window_state.rs | 179 +- .../tests/native/input_press.rs | 286 +++ .../tests/native/layout_animation_bench.rs | 328 +++ .../nsh-platform-macos/tests/native/main.rs | 38 +- .../tests/native/momentum_bounce.rs | 331 +++ .../tests/native/multi_view.rs | 215 ++ .../tests/native/presenting.rs | 143 ++ .../tests/native/shader_content.rs | 61 + .../tests/native/unbound_animation.rs | 172 ++ .../tests/native/window_mode_layout.rs | 175 ++ .../nsh/crates/nsh-platform-tui/src/app.rs | 4 + .../nsh/crates/nsh-platform-tui/src/dev.rs | 29 +- .../nsh/crates/nsh-platform-tui/src/mount.rs | 8 + .../crates/nsh-platform-tui/src/selection.rs | 27 + .../crates/nsh-platform-tui/tests/tui/dock.rs | 49 +- .../nsh-platform-web/src/browser/protocol.rs | 1 + .../nsh/crates/nsh-platform-web/src/encode.rs | 13 +- .../nsh/crates/nsh-platform-web/src/lib.rs | 4 +- .../nsh-platform-web/web/browser/bootstrap.js | 7 +- .../nsh-platform-web/web/browser/dom.js | 2 +- .../nsh-platform-web/web/browser/list.js | 6 +- .../web/browser/reactive.test.mjs | 39 + .../nsh-platform-web/web/mouse.test.mjs | 12 +- .../nsh/crates/nsh-platform-web/web/nsh.js | 225 +- .../crates/nsh-platform-web/web/nsh.test.mjs | 308 ++- .../web/touch-browser.test.mjs | 121 + .../crates/nsh-platform-windows/src/app.rs | 48 +- .../nsh-platform-windows/src/app_window.rs | 95 +- .../nsh-platform-windows/src/box_none.rs | 223 ++ .../crates/nsh-platform-windows/src/dev.rs | 27 +- .../crates/nsh-platform-windows/src/input.rs | 43 +- .../nsh-platform-windows/src/keyboard.rs | 121 +- .../crates/nsh-platform-windows/src/lib.rs | 3 + .../crates/nsh-platform-windows/src/mount.rs | 5 + .../crates/nsh-platform-windows/src/native.rs | 24 + .../nsh-platform-windows/src/native/web.rs | 64 +- .../nsh-platform-windows/src/navigation.rs | 4 + .../nsh-platform-windows/src/presenting.rs | 257 ++ .../crates/nsh-platform-windows/src/render.rs | 16 +- .../src/selectable_view.rs | 8 + .../crates/nsh-platform-windows/src/shell.rs | 41 +- .../nsh-platform-windows/src/surface.rs | 5 +- .../crates/nsh-platform-windows/src/system.rs | 2 + .../crates/nsh-platform-windows/src/text.rs | 94 +- .../crates/nsh-platform-windows/src/window.rs | 55 +- third-party/nsh/crates/nsh-testing/Cargo.toml | 5 +- .../nsh/crates/nsh-testing/src/agent.rs | 163 +- .../nsh/crates/nsh-testing/src/driver.rs | 17 - .../nsh/crates/nsh-testing/src/failure.rs | 14 +- .../crates/nsh-testing/src/headless/mod.rs | 306 +-- .../nsh-testing/src/headless/selection.rs | 23 + .../nsh/crates/nsh-testing/src/module.rs | 65 - third-party/nsh/crates/nsh-testing/src/run.rs | 50 + .../nsh/crates/nsh-testing/src/screen.rs | 76 +- .../crates/nsh-testing/tests/testing/main.rs | 2 +- .../tests/testing/text-selection/App.test.tsx | 14 + .../tests/testing/text-selection/App.tsx | 9 +- .../nsh/crates/nsh-windows-app/Cargo.toml | 1 + .../nsh/crates/nsh-windows-app/build.rs | 49 + .../crates/nsh-windows-app/script/link-kit.js | 65 + .../nsh/crates/nsh-windows-app/src/main.rs | 74 +- third-party/nsh/crates/xtask/src/android.rs | 7 +- third-party/nsh/crates/xtask/src/dist.rs | 122 +- third-party/nsh/docs/dev/api-naming.md | 23 +- third-party/nsh/docs/dev/canvas.md | 5 +- third-party/nsh/docs/dev/commands.md | 6 +- third-party/nsh/docs/dev/components.md | 26 +- third-party/nsh/docs/dev/dock.md | 11 +- third-party/nsh/docs/dev/elements.md | 11 +- third-party/nsh/docs/dev/embedding.md | 9 +- third-party/nsh/docs/dev/gpui.md | 7 +- third-party/nsh/docs/dev/js-modules.md | 24 +- third-party/nsh/docs/dev/linux.md | 2 +- third-party/nsh/docs/dev/macos.md | 43 +- third-party/nsh/docs/dev/performance.md | 34 + third-party/nsh/docs/dev/pitfalls.md | 18 +- third-party/nsh/docs/dev/platforms.md | 3 +- third-party/nsh/docs/dev/repository-map.md | 3 +- third-party/nsh/docs/dev/rich-editor.md | 3 +- third-party/nsh/docs/dev/sandbox.md | 7 +- third-party/nsh/docs/dev/shaders.md | 5 +- third-party/nsh/docs/dev/styles.md | 4 +- third-party/nsh/docs/dev/text-view.md | 4 +- third-party/nsh/docs/dev/text.md | 10 +- third-party/nsh/docs/dev/tooling.md | 50 +- third-party/nsh/docs/dev/web.md | 11 +- third-party/nsh/docs/dev/windows.md | 22 +- third-party/nsh/examples/extra/App.tsx | 92 +- third-party/nsh/examples/extra/README.md | 3 +- third-party/nsh/examples/extra/nsh.json | 11 +- third-party/nsh/examples/extra/nsh.lock | 2 +- .../nsh/examples/extra/tests/share.test.tsx | 55 + .../nsh/examples/gallery/demos/Controls.tsx | 179 +- .../nsh/examples/gallery/demos/Menus.tsx | 11 +- .../nsh/examples/gallery/demos/System.tsx | 106 +- third-party/nsh/examples/gallery/nsh.json | 1 - .../examples/gallery/tests/controls.test.tsx | 30 +- .../gallery/tests/date-picker.test.tsx | 19 +- .../gallery/tests/fixtures/hidden-focus.tsx | 9 +- .../gallery/tests/fixtures/windows.tsx | 2 + .../gallery/tests/hidden-focus.test.tsx | 25 +- .../nsh/examples/gallery/tests/menus.test.tsx | 11 +- .../examples/gallery/tests/photos.test.tsx | 6 +- .../nsh/examples/gallery/tests/share.test.tsx | 41 - .../gallery/tests/window-state.test.tsx | 10 + .../nsh/examples/nsh-gallery-ui/demo.ts | 2 +- .../examples/nsh-gallery-ui/look/listbox.tsx | 16 +- .../nsh/examples/nsh-gallery-ui/slider.ts | 26 + .../nsh/examples/rust-exports/App.test.tsx | 9 + .../nsh/examples/rust-exports/README.md | 10 + .../nsh/examples/rust-exports/TextChild.tsx | 19 + .../examples/rust-exports/native/src/lib.rs | 14 + .../nsh/skills/nsh/references/mixed.md | 5 + .../nsh/skills/nsh/references/tooling.md | 13 + .../nsh/tests/compat/cases/base/App.tsx | 4 + .../tests/compat/cases/base/base-calendar.tsx | 39 + .../compat/cases/base/base-date-picker.tsx | 51 +- .../cases/base/base-host-accessibility.tsx | 56 + .../cases/base/base-rich-editor-kit.tsx | 11 + .../tests/compat/cases/base/base-select.tsx | 37 +- .../tests/compat/cases/base/base-slider.tsx | 10 +- .../nsh/tests/compat/cases/base/script.txt | 165 +- .../nsh/tests/compat/cases/core/App.tsx | 2 + .../compat/cases/core/core-select-all.tsx | 26 + .../nsh/tests/compat/cases/core/script.txt | 15 +- .../nsh/tests/compat/cases/desktop/script.txt | 3 + .../compat/cases/desktop/window-access.tsx | 17 +- .../nsh/tests/compat/cases/modules/App.tsx | 2 - .../tests/compat/cases/modules/mod-mobile.tsx | 50 +- .../tests/compat/cases/modules/mod-share.tsx | 63 - .../nsh/tests/compat/cases/modules/script.txt | 26 +- third-party/nsh/upstream.json | 2173 ++++++++++------- .../nsh/website/demos/el-date-picker.tsx | 6 +- third-party/nsh/website/demos/el-slider.tsx | 10 +- third-party/nsh/website/demos/palette.ts | 2 +- third-party/nsh/website/docs/android.md | 30 +- third-party/nsh/website/docs/cli.md | 7 +- third-party/nsh/website/docs/gpui.md | 6 +- third-party/nsh/website/docs/i18n.md | 6 + third-party/nsh/website/docs/installation.md | 3 + third-party/nsh/website/docs/ios.md | 9 +- third-party/nsh/website/docs/linux.md | 11 + third-party/nsh/website/docs/macos.md | 14 +- third-party/nsh/website/docs/nshm.md | 178 ++ third-party/nsh/website/docs/packaging.md | 4 +- .../nsh/website/docs/platform-extensions.md | 2 +- third-party/nsh/website/docs/rust.md | 56 +- .../website/docs/sandbox-and-capabilities.md | 7 +- .../nsh/website/docs/testing-and-trace.md | 52 +- .../nsh/website/docs/web-view-and-video.md | 1 + third-party/nsh/website/docs/windows.md | 16 + third-party/nsh/website/elements/calendar.md | 43 +- third-party/nsh/website/elements/canvas.md | 26 +- .../nsh/website/elements/data-table.md | 4 +- .../nsh/website/elements/date-picker.md | 121 +- third-party/nsh/website/elements/dock.md | 16 +- third-party/nsh/website/elements/input.md | 1 + third-party/nsh/website/elements/otp-input.md | 6 +- .../nsh/website/elements/rich-editor.md | 28 +- third-party/nsh/website/elements/select.md | 43 +- third-party/nsh/website/elements/slider.md | 52 +- .../nsh/website/elements/text-selection.md | 21 + third-party/nsh/website/elements/web-view.md | 1 + third-party/nsh/website/modules/nsh-base.md | 14 +- .../nsh/website/modules/nsh-desktop.md | 25 +- third-party/nsh/website/modules/nsh-i18n.md | 24 +- third-party/nsh/website/modules/nsh-mobile.md | 195 +- .../nsh/website/modules/nsh-updater.md | 15 + third-party/nsh/website/modules/nsh.md | 196 +- .../nsh/website/modules/standard-modules.md | 2 +- .../website/src/components/Analytics.astro | 4 + .../nsh/website/src/layouts/BaseLayout.astro | 2 + third-party/nsh/website/src/lib/analytics.ts | 31 + .../nsh/website/src/lib/nsmetry/LICENSE | 21 + .../nsh/website/src/lib/nsmetry/core.ts | 567 +++++ .../nsh/website/src/lib/nsmetry/index.ts | 182 ++ third-party/nsh/website/zh-CN/docs/android.md | 23 +- third-party/nsh/website/zh-CN/docs/cli.md | 7 +- third-party/nsh/website/zh-CN/docs/gpui.md | 2 +- third-party/nsh/website/zh-CN/docs/i18n.md | 2 + .../nsh/website/zh-CN/docs/installation.md | 3 + third-party/nsh/website/zh-CN/docs/ios.md | 4 +- third-party/nsh/website/zh-CN/docs/linux.md | 8 + third-party/nsh/website/zh-CN/docs/macos.md | 10 +- third-party/nsh/website/zh-CN/docs/nshm.md | 144 ++ .../nsh/website/zh-CN/docs/packaging.md | 3 +- .../website/zh-CN/docs/platform-extensions.md | 2 +- third-party/nsh/website/zh-CN/docs/rust.md | 44 +- .../zh-CN/docs/sandbox-and-capabilities.md | 6 +- .../website/zh-CN/docs/testing-and-trace.md | 42 +- .../website/zh-CN/docs/web-view-and-video.md | 1 + third-party/nsh/website/zh-CN/docs/windows.md | 12 + .../nsh/website/zh-CN/elements/calendar.md | 38 +- .../nsh/website/zh-CN/elements/data-table.md | 2 +- .../nsh/website/zh-CN/elements/date-picker.md | 97 +- .../nsh/website/zh-CN/elements/dock.md | 10 +- .../nsh/website/zh-CN/elements/input.md | 1 + .../nsh/website/zh-CN/elements/otp-input.md | 3 + .../nsh/website/zh-CN/elements/rich-editor.md | 18 +- .../nsh/website/zh-CN/elements/select.md | 38 +- .../nsh/website/zh-CN/elements/slider.md | 44 +- .../website/zh-CN/elements/text-selection.md | 17 + .../nsh/website/zh-CN/elements/web-view.md | 1 + .../nsh/website/zh-CN/modules/nsh-base.md | 5 +- .../nsh/website/zh-CN/modules/nsh-desktop.md | 25 +- .../nsh/website/zh-CN/modules/nsh-i18n.md | 17 +- .../nsh/website/zh-CN/modules/nsh-mobile.md | 161 +- .../nsh/website/zh-CN/modules/nsh-updater.md | 12 + third-party/nsh/website/zh-CN/modules/nsh.md | 186 +- .../website/zh-CN/modules/standard-modules.md | 2 +- tools/ui-build/src/lib.rs | 50 +- 470 files changed, 25928 insertions(+), 9410 deletions(-) create mode 100644 third-party/nsh/crates/nsh-cli/src/test_attach.rs create mode 100644 third-party/nsh/crates/nsh-cli/src/windows_link.rs delete mode 100644 third-party/nsh/crates/nsh-core/src/auth_session.rs delete mode 100644 third-party/nsh/crates/nsh-core/src/share.rs create mode 100644 third-party/nsh/crates/nsh-dev/src/attach.rs create mode 100644 third-party/nsh/crates/nsh-extra/src/share/android.rs create mode 100644 third-party/nsh/crates/nsh-extra/src/share/fake.rs rename third-party/nsh/crates/{nsh-platform-ios/src/share.rs => nsh-extra/src/share/ios.rs} (69%) rename third-party/nsh/crates/{nsh-core/src/runtime/share.rs => nsh-extra/src/share/js.rs} (66%) rename third-party/nsh/crates/{nsh-platform-macos/src/share.rs => nsh-extra/src/share/macos.rs} (58%) create mode 100644 third-party/nsh/crates/nsh-extra/src/share/mod.rs create mode 100644 third-party/nsh/crates/nsh-extra/src/share/tests.rs create mode 100644 third-party/nsh/crates/nsh-extra/src/share/web.rs create mode 100644 third-party/nsh/crates/nsh-extra/tests/extra/share.rs delete mode 100644 third-party/nsh/crates/nsh-platform-android/java/com/longbridge/nsh/AuthSession.java delete mode 100644 third-party/nsh/crates/nsh-platform-android/java/com/longbridge/nsh/DateTimePickerComponent.java create mode 100644 third-party/nsh/crates/nsh-platform-android/java/com/longbridge/nsh/NativeReceiver.java delete mode 100644 third-party/nsh/crates/nsh-platform-android/java/com/longbridge/nsh/Share.java delete mode 100644 third-party/nsh/crates/nsh-platform-android/java/com/longbridge/nsh/SwitchComponent.java create mode 100644 third-party/nsh/crates/nsh-platform-android/src/presenting.rs create mode 100644 third-party/nsh/crates/nsh-platform-android/src/receiver.rs create mode 100644 third-party/nsh/crates/nsh-platform-android/tests/InputPress.tsx create mode 100644 third-party/nsh/crates/nsh-platform-android/tests/input-press.test.tsx delete mode 100644 third-party/nsh/crates/nsh-platform-ios/src/auth_session.rs delete mode 100644 third-party/nsh/crates/nsh-platform-ios/src/system_date_time_picker.rs delete mode 100644 third-party/nsh/crates/nsh-platform-ios/src/system_segmented_control.rs delete mode 100644 third-party/nsh/crates/nsh-platform-ios/src/system_switch.rs create mode 100644 third-party/nsh/crates/nsh-platform-ios/tests/keyboard/InputPress.test.tsx create mode 100644 third-party/nsh/crates/nsh-platform-ios/tests/keyboard/InputPress.tsx create mode 100644 third-party/nsh/crates/nsh-platform-linux/src/presenting.rs create mode 100644 third-party/nsh/crates/nsh-platform-macos/src/box_none.rs create mode 100644 third-party/nsh/crates/nsh-platform-macos/src/presenting.rs create mode 100644 third-party/nsh/crates/nsh-platform-macos/tests/native/input_press.rs create mode 100644 third-party/nsh/crates/nsh-platform-macos/tests/native/layout_animation_bench.rs create mode 100644 third-party/nsh/crates/nsh-platform-macos/tests/native/momentum_bounce.rs create mode 100644 third-party/nsh/crates/nsh-platform-macos/tests/native/multi_view.rs create mode 100644 third-party/nsh/crates/nsh-platform-macos/tests/native/presenting.rs create mode 100644 third-party/nsh/crates/nsh-platform-macos/tests/native/unbound_animation.rs create mode 100644 third-party/nsh/crates/nsh-platform-macos/tests/native/window_mode_layout.rs create mode 100644 third-party/nsh/crates/nsh-platform-windows/src/box_none.rs create mode 100644 third-party/nsh/crates/nsh-platform-windows/src/presenting.rs create mode 100644 third-party/nsh/crates/nsh-windows-app/build.rs create mode 100644 third-party/nsh/crates/nsh-windows-app/script/link-kit.js create mode 100644 third-party/nsh/examples/extra/tests/share.test.tsx delete mode 100644 third-party/nsh/examples/gallery/tests/share.test.tsx create mode 100644 third-party/nsh/examples/rust-exports/TextChild.tsx create mode 100644 third-party/nsh/tests/compat/cases/base/base-calendar.tsx create mode 100644 third-party/nsh/tests/compat/cases/base/base-host-accessibility.tsx create mode 100644 third-party/nsh/tests/compat/cases/core/core-select-all.tsx delete mode 100644 third-party/nsh/tests/compat/cases/modules/mod-share.tsx create mode 100644 third-party/nsh/website/src/components/Analytics.astro create mode 100644 third-party/nsh/website/src/lib/analytics.ts create mode 100644 third-party/nsh/website/src/lib/nsmetry/LICENSE create mode 100644 third-party/nsh/website/src/lib/nsmetry/core.ts create mode 100644 third-party/nsh/website/src/lib/nsmetry/index.ts 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 be7f06f6ed6..2ae0ac4b0e2 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", @@ -9700,6 +9691,7 @@ dependencies = [ "nsh-engine", "nsh-platform-apple", "nsh-platform-ios", + "nsh-system-controls", "nsh-testing", "objc2 0.6.5", "objc2-av-foundation", @@ -10572,6 +10564,7 @@ dependencies = [ "nsh-core", "nsh-engine", "nsh-js", + "nsh-system-controls", "nsh-testing", "objc2 0.6.5", "objc2-app-kit 0.3.2", @@ -11625,7 +11618,6 @@ name = "nsh-core" version = "0.7.2" dependencies = [ "cap-std", - "chrono", "crc32fast", "flate2", "futures-util", @@ -11741,6 +11733,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" @@ -11879,6 +11888,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" @@ -14856,7 +14884,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", @@ -21340,11 +21368,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 885afd4518c..c19710d52a6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -111,6 +111,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" } @@ -330,6 +331,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..d42bb34ed77 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. +3b2fd5876b5865b0f3fe6ff875a3514164fd3134. 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 d8930a73e28..0e2e8f5551c 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 @@ -723,6 +725,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 @@ -829,10 +832,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 @@ -854,12 +859,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 @@ -874,6 +882,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 @@ -1542,7 +1552,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..2d5e56f0cb1 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. @@ -31802,6 +31800,7 @@ nsh-updater@0.7.2 (Apache-2.0) https://raw.githubusercontent.com/longbridge/nsh/3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359/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 +54386,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..52c842a8964 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", @@ -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": "d308271b481933430a79b33057d46527bbdf88f205ac4f57722f66f314ba9be0" } diff --git a/products/maka/ios-shell/Cargo.toml b/products/maka/ios-shell/Cargo.toml index a04a31f3bd4..0feb144d1e8 100644 --- a/products/maka/ios-shell/Cargo.toml +++ b/products/maka/ios-shell/Cargo.toml @@ -33,6 +33,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"] } @@ -41,6 +42,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 8d84ecc4805..a8803b3e1ac 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(); @@ -4066,6 +4067,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 94855231c9e..7ae2c065e3e 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, }; @@ -346,11 +346,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()) @@ -358,6 +359,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(); + } } } } @@ -395,7 +401,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..3b2b23a3677 100644 --- a/scripts/ci/run.mjs +++ b/scripts/ci/run.mjs @@ -783,6 +783,9 @@ 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', ]); }); } 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..c8acec09d1f 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", + "brotli-decompressor", ] [[package]] name = "brotli-decompressor" -version = "5.0.3" +version = "6.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a32acac15fe1967bc3986b2a6347dffc965602354ea6f450ad07e8bfd253583" +checksum = "664148598c930650998ef56df301329ffe7b4cdb02d49b2a3fca3bcaf2185bcb" 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" -dependencies = [ - "alloc-no-stdlib 3.0.0", + "alloc-no-stdlib", "alloc-stdlib", ] @@ -3835,7 +3820,6 @@ name = "nsh-core" version = "0.7.2" dependencies = [ "cap-std", - "chrono", "crc32fast", "flate2", "futures-util", @@ -3939,6 +3923,7 @@ dependencies = [ "nsh-platform-android", "nsh-platform-apple", "nsh-platform-ios", + "nsh-platform-macos", "nsh-testing", "objc2", "objc2-core-foundation", @@ -3947,6 +3932,7 @@ dependencies = [ "objc2-ui-kit", "serde_json", "tokio", + "url", "wasm-bindgen", "web-sys", "windows", @@ -4378,6 +4364,7 @@ version = "0.7.2" dependencies = [ "log", "nsh-base", + "nsh-core", "nsh-engine", "nsh-platform-windows", "serde_json", @@ -9294,11 +9281,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..53ee7bfc418 100644 --- a/third-party/nsh/Cargo.toml +++ b/third-party/nsh/Cargo.toml @@ -94,7 +94,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 +357,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 2c5605edd7c..2141f92852c 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 `3b2fd5876b5865b0f3fe6ff875a3514164fd3134`. 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,7 +84,7 @@ 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, @@ -92,13 +104,17 @@ 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. ## 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..2f3134141c9 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`, 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..f87ab26d598 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`."; 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..e583362606d 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 @@ -1334,6 +1334,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 +1359,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 +1405,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, 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 }); } +}); 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..5094922630f 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 @@ -374,8 +377,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 +417,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 +647,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 +700,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 +977,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); @@ -1078,6 +1144,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 +1201,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 +1296,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 +1513,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 +1568,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(), 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/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..1a0c7a72fff 100644 --- a/third-party/nsh/crates/nsh-platform-windows/src/window.rs +++ b/third-party/nsh/crates/nsh-platform-windows/src/window.rs @@ -1701,6 +1701,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 +1729,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 +1783,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 +1873,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 +2490,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/api-naming.md b/third-party/nsh/docs/dev/api-naming.md index a97aa3f7cbe..960f8f21cbf 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,7 @@ 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 | | `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 +588,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 +672,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 +723,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 +869,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 +923,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 +950,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..fb64c013b18 100644 --- a/third-party/nsh/docs/dev/components.md +++ b/third-party/nsh/docs/dev/components.md @@ -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 @@ -905,7 +907,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 +1255,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 +1313,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..24d36aa9717 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 @@ -503,9 +503,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 +642,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/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/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..55904954622 100644 --- a/third-party/nsh/docs/dev/rich-editor.md +++ b/third-party/nsh/docs/dev/rich-editor.md @@ -381,7 +381,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 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..ce3e9681284 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`); @@ -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/windows.md b/third-party/nsh/docs/dev/windows.md index 18385aeaf4a..8fd5e01cac2 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 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. 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. 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/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..ae63ace23a0 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"; @@ -58,6 +59,7 @@ import BaseRichEditorTables from "./base-rich-editor-tables"; 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 +103,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, @@ -144,6 +147,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-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..4ab8392369e 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 @@ -4719,6 +4836,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 @@ -5004,3 +5122,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..957ee8d410b 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", @@ -27,73 +27,74 @@ ".github/workflows/package.yml": "a1746c21268876b5a6779d37ec580c023f77131277325511065cb948b9639633", ".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": "7ab974fd68cd358874953169afd0854b57dd43129c2a73f2661e3f52ba47a62c", + "Cargo.toml": "ad55ece6f8f33922f01d23b49520997615ee07696ad523cf0e7a90948f2461b0", "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/app.rs": "814720baacc9bb086c46af89689986e4b20406329c2a0a18c39e1e49f53ae88f", "crates/gpui/nsh-platform-gpui/src/canvas.rs": "5d91093378d1bad3dcc140630d04146ed3f9a4480dd057d8a77fd36027a082d2", "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": "9b04ee8fc5f6e814882342135d22e76632f1996d7e499c33ed3c83faae6c3f0f", + "crates/gpui/nsh-platform-gpui/src/text_input.rs": "88fa2d1635763458cd756d8e9cccb3b28fa0bc6ca25c866009b663a8c21e3f46", "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": "15a0fc2f9684118a325f231739af2c885db4858aea6c7c465fdf9729265a36b5", "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": "060cac021e26b6bf9777bdd4c1bdfbf0dd6dbb89bc3384edd009f1dd36f107ca", "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", @@ -324,23 +325,23 @@ "crates/nsh-base/src/rich_editor/view/mod.rs": "21718ad442a573299d02e6fc078b28676bc005696bff62c61cf5ba70a413924f", "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/render.rs": "d3f8526287f76115d0e95780cad2653db974382af9c96e1d6f870f9a1aed205d", "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/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", @@ -350,7 +351,7 @@ "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", @@ -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,13 +416,13 @@ "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", @@ -440,17 +441,17 @@ "crates/nsh-base/tests/base/rich_editor/view_features.rs": "3ecc5399a2870a1e38596653ecb8af01851c3d07ca430990e5cd2e7ffccfc9cd", "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/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,39 +476,39 @@ "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": "a93aa7ebeb98fe72d185452b83ad8b2d9429f6d0f97ae2907df1482039744498", "crates/nsh-cli/build.rs": "ea4c92711a19b4c314913ab061a0757e4775c0f518fa467f6ebe37f14b1b0444", - "crates/nsh-cli/src/android.rs": "e234f73bee110f6e6e65b3968cd48cc11ba4a3a929219ca81db56a404a569f11", + "crates/nsh-cli/src/android.rs": "b15f38489aca4a0536ab1b2e82d569e314a7269363981229aff40e586c233c7f", "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/init.rs": "6c033baae480e9d7f9b24ad9fecfafb1c925f5dccae396e9693e71f0c0f68587", "crates/nsh-cli/src/linux_store.rs": "cf24751df15934f1c8e77c799bf6bc8d9424d343d5cf6e41b446ee17873bce9a", "crates/nsh-cli/src/logger.rs": "ba3c001dd0bbbbd9d68200f19299ea1002ebab8e14842eba1b5cc6c69ada10f0", - "crates/nsh-cli/src/main.rs": "1af9ed7991d21f76daac875c90f3d0dc7d687909d3d633fdfd33728ce96b2a36", + "crates/nsh-cli/src/main.rs": "6f5780ceca9f536f0885d1d49bc17dc48882be2a43a05152a800c9043e2206be", "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/nshm/resolve.rs": "4a2319e3c48ed325e069ce07b2708038a6cc79fc304324ec0cfa4a2b6d76ef6a", "crates/nsh-cli/src/package.rs": "b6cea78f3145274adc4d15ed6623a82217876bb4fc6197db189819e41f9071ac", "crates/nsh-cli/src/platforms.rs": "3c8412263998ffca58954b185abcba287964815258999d1c4f42dc70721385d8", "crates/nsh-cli/src/play.rs": "63ca06e8a3811f2cfe3f4d980a0ece432a6e9249b3bd61bb42435da26a3c0b0b", @@ -515,8 +516,8 @@ "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": "93d8135ae6cc3159d2a1ef32c7f3a8921fd8d41228b7d781ebb047d2ac051a84", "crates/nsh-cli/src/self_update.rs": "ff41a4a975c457cd29068265bf82c6edbc8fe203ac558ed08e17b98ae89d936a", "crates/nsh-cli/src/sign.rs": "bcddaba0b703b6f8a25af05921b579a7d0b1fe13725269d305f4bb26a039b7ec", "crates/nsh-cli/src/store.rs": "4819ee940e1259ffe552eb1251c2eb60f8f08b53e19fa30179f7d8132a57d499", @@ -533,13 +534,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": "516a9c3e278523bff91a5a2622fbee1ccc40a01ff46fa91f816aba7b7e49bd02", "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 +552,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,25 +569,24 @@ "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": "4271f628671a15eec062478c2de65d6ee58bd2d41c59c6ef955248390e00824d", "crates/nsh-core/src/core/cull.rs": "351903637a4fe1b6da5bbe7bd3457c5297d5ef7fe628b9dfda3acc30b1dde166", "crates/nsh-core/src/core/follow.rs": "aff36a2595b9ba846ee6bbe57d89d45a52085b73f43efd56ecf922bd95dda002", "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": "12146b10c637efb2dd9b7816f561566501bf10186da5d518fd993423d4374884", "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/mod.rs": "fca583d439e6ad5a2091c15889302a8023d66454f32cd61baee93d268ae6e306", "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", @@ -599,9 +601,9 @@ "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": "d8881f5237db6374cbee6dcba1809f143caaf26d8d93048197f8d59be53b2a95", "crates/nsh-core/src/core/touch.rs": "c468d27aca9d8dbe8a2087482de4c376775a08464d840f33364ee67898d3f498", - "crates/nsh-core/src/core/views.rs": "c398e116c5437f19c2c3a1884745fc234b3f6eaa8a7819076d4b0b61ac268df8", + "crates/nsh-core/src/core/views.rs": "634b11d975e8db5870ff963de7db70ee908c6c1f8bfb81ebf0f3bde9c5a447e6", "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 +613,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 +625,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/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 +654,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 +692,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 +700,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 +732,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 +774,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/perf.rs": "8f5f966b2c138e7f46f0b7e35d6bc6b1326786f4c605f3e7da995709a8465b27", "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/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 +829,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 +849,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", @@ -887,12 +888,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 +907,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 +922,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 +967,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/declarations.rs": "1415bb7349aecce743359f4d2caa1c07145826b288d7f3aef4d9fbac2d73b300", "crates/nsh-js/src/desktop.rs": "8b1148568a56ec29626dc24093ce91c2dbad060dfb694575bc95080bb4e0148b", - "crates/nsh-js/src/dom.rs": "dd12874bb3ba60bac7e1089d8e69cc295ec6263bc242d955d2069e4ad9847603", + "crates/nsh-js/src/dom.rs": "fd33db8c947d28509181f660f9f345a827329b8b7e50e5575f5e3461ea3cca96", "crates/nsh-js/src/env.rs": "d7a94c3dc29eb38ae1295699192775cbf23ff6ec6eb9d4323b72f030895b5cd9", "crates/nsh-js/src/error.rs": "01a5f911656faa39aa30dbcd71789ce30c35b3e740c5f3ec5125c87b85282bd5", - "crates/nsh-js/src/host.rs": "f6886fce435432bc951eb6d4b02f49b2336cb9d10c8e887587254ad3d0dece2a", + "crates/nsh-js/src/host.rs": "3afa1fb286e2a74208e3af12f81e7ec05736a09fcb1b1ee80a5ebef31c869a7d", "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 +1084,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": "02fde7efffc6908637a299b0ee1f870bb54f1ac5e0e46e21432e5e74fd93e6de", "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 +1112,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 +1122,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,21 +1139,19 @@ "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": "c3f958811f5b7afa4d861003c859ff969575c7b9d8166652a636ef1a05bc1f71", "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", @@ -1154,33 +1161,36 @@ "crates/nsh-platform-android/java/com/longbridge/nsh/TextLayouts.java": "d6bacb953e9115c13185c7e72ead54d6260585cc3b96a609cb7dd389e2a49563", "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/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": "711446c5ab75b60328ec408b3ecb14e35e1c9ab8e0ef07b8cc606d1625659706", + "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,6 +1202,7 @@ "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", @@ -1242,14 +1253,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,33 +1270,29 @@ "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": "7f49f27db97c73afafea8235558835f05643b527eaff81ff77d0b918eee3dfb3", "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", @@ -1294,7 +1300,7 @@ "crates/nsh-platform-ios/src/video.rs": "3baf54925cd71605aa1ba258b2813e8eddbcaf1f7ff554d30bb85cc5b4c45cbe", "crates/nsh-platform-ios/src/view.rs": "40127fd38a869822bbce635b390da5ac11fcc86cdefc350cc699fdd7a6e945e0", "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 +1324,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 +1382,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 +1394,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 +1403,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/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": "69ff0525dd8a8690465077e1cff60af48105e95ef6d65f2bc366908a53697c65", "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 +1457,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": "30c8da1e3df14597c8602332207b79c1e5196f12ba879ffc33ca619243edcbd0", "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": "7781e0de1f3d600b0f7b22373371fc85295ce65657a0bc0cdc2d8bf96c4f5079", + "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": "608a70d3bf9c8e75827c5cfbe2c73b337aeefcff545b1329f87cc6b3bf25891f", + "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": "56ddacb5e25920fdc5f833f24ec4d9ce7de54ebb3a1ed357281a4879948df1c6", "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/visual.rs": "36df2e99a12f28501b26ebb019bc5aacf20ea666a21417d4635e13789ae44ab8", + "crates/nsh-platform-macos/src/window.rs": "59529e5fda80368c091463417594d72581745906d74f326cfae5217e586b2cb5", + "crates/nsh-platform-macos/src/window_state.rs": "4c21a21d2b289c6f395f0f7716860c2643b621265c320e34e9e1e6cad0554de6", "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,21 +1546,26 @@ "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", @@ -1559,11 +1574,12 @@ "crates/nsh-platform-macos/tests/native/scroll_indicator_layout.rs": "7f25473dfb1b5851d0ea0116faa844697daa5b0298d6e8852260fbd8a9acdc45", "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 +1587,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 +1607,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 +1618,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 +1631,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 +1668,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 +1676,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 +1715,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 +1734,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 +1746,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 +1762,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": "7223abc56acbd7b034253bdae3065afff64861c0e2c9f39fa57e468a26c534ab", + "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": "b24ad19bf4024b6ef60e843b44f7a71f84151c4ec60475aea8fbea9600169035", "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,11 +1778,12 @@ "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": "e449355f4e1b7a6f189f1d57b910e9c76c2a798c828a2b68dbb8f25d3e09e15c", "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", @@ -1774,7 +1792,7 @@ "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 +1800,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": "9cd49db6363fb26500af843424b1b0d81dc462d93c42a1c8f9a367151904f3df", "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 +1947,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 +1985,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 +2037,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", @@ -2040,53 +2061,53 @@ "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/api-naming.md": "7a99bcd92c716e86575b23b010053f8d6d2b0fe0b5358e8af2209f30262078c3", "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": "fb09ac519d7170c55266b25cf45ce35f1089b8b13af1f71f5a89252e39d975b8", "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": "ae848779031dbbe374fd513f6536e8d0f35b85f7c2da62c9aa2b5edb5379cc67", + "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/js-modules.md": "04694975874a04d05776e98cfd8cc56b5fea028f32eed451160fbe7f89c7cc10", + "docs/dev/linux.md": "a26070c25d787b810f7372c6da6b4b14da5b0c3fe6290a3a7a397bda2820f8e1", + "docs/dev/macos.md": "daf7f9c50459ed27ff5aa1e74623c0013f6cd97bae575436419b7c3bc8aaa8b2", "docs/dev/native-pipeline.md": "55ca68f42b3ec661eadd70b31774822ea022a17bd48ffcb6a9b2573b81cdf6b5", - "docs/dev/performance.md": "327efb4fb9575600cbc8c4f125b84e5408891fcabdd3847c70fd71615f587967", - "docs/dev/pitfalls.md": "13f0e54dbd2959b95241ea02924f2d33ca8a398db9b7f273482e36ee9297cc0a", - "docs/dev/platforms.md": "d55d27928a7f24b4ff97c99d3ac3c1a2b843682bff68d460b71994cfaed5db22", + "docs/dev/performance.md": "d28e642070604c49945b87c87895132742072d4dba3e1e0dba69534eca84dcad", + "docs/dev/pitfalls.md": "4a3115a06452e2aaef46c1e5d1ad29e06af40aa0c5090d1c532beb071ca4f9ec", + "docs/dev/platforms.md": "bae01537c28cd6f48105befb76002be3d8043cd0eb5dfa95877ef6d90b43a405", "docs/dev/reactive-components.md": "006e8cf768830ca1fb1f18044a68738281e760fbe3111f62827fd99dee6c1a52", - "docs/dev/repository-map.md": "eaa6febcbe97ea7c30b31f104509d5a3c57890fa6653c8ef22accfe13481f45e", - "docs/dev/rich-editor.md": "2175eff200e06b598f14dbd7ea5fbb2c39ada0ad641a96cb9fa6f2b4d7079d5b", + "docs/dev/repository-map.md": "c9ed45afe266cbfaa7779a3d50469170dc99431bec4af9e3020db360a72685a5", + "docs/dev/rich-editor.md": "10f41c5a906d637b81364a880ad517f61bf9ae536735310a105263d4f13047ef", "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": "c4a6d2b98bf52bec33cf786d16d1a76896bcc04b3c07cca3f57b5bbd0e80b4cf", "docs/dev/tui.md": "1b36e524f353218d6bc1cbae081ba7a0e57b1c0acc45bb4b2de6d6484d19429d", "docs/dev/updater.md": "7ee96f1ae7bed9e0587e6b1b91b7c8575eab87edeade1abba7c7eaafe12e9dd5", - "docs/dev/web.md": "b0322708ffaa4be10bd7fa54f971058a87c2168ca85fb43620871b0b0b216499", + "docs/dev/web.md": "62571e1aa909328a0bb6dc9cf3b29575d7cc4d314d3b49e4b4bea355afae9087", "docs/dev/window-model.md": "1a356266d8914824fff8e0a0395550c31d3a0ce988e34cb789c72acc5cafdb34", - "docs/dev/windows.md": "43debfe539397c2d497f2f55c2207ee3154cbf458a57dbf6f9e13c1a7bbdc74b", + "docs/dev/windows.md": "3d331aba5847217d8b2e1e570dcf36cac5d9fb23a0575aceb1537ba9c7ea26be", "docs/dev/workflow.md": "938114380f109ec6333faf26005807c1b198303b8e507cbdeefb99459d5115d7", "docs/dev/writing-docs.md": "1dc26c34cd7cd6d1c7df666cdbff8a6f76f21b6075bf1bf17706f81785fa895a", "examples/bench/GridTs.tsx": "c1ad7f6edf93a285f5f13719a384586251aa65566fe38f3b093af4b2caf218d6", @@ -2123,7 +2144,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 +2167,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 +2272,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 +2287,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 +2313,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 +2351,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 +2385,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 +2394,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 +2420,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 +2470,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 +2478,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 +2500,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 +2510,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 +2532,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 +2556,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 +2597,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 +2607,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", @@ -2605,7 +2626,7 @@ "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 +2646,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 +2696,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 +2712,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": "a955e1d5ec784801fff55808bae5881cd2a4a6b6972e318903e8fdd361c4a3f5", "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 +2728,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 +2739,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,7 +2760,7 @@ "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", @@ -2745,10 +2769,10 @@ "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 +2791,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": "74b74984a5463dbb5e71bc76640807a1620ea355eef793a25cbf890c7f34c80e", "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 +2808,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 +2830,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 +2848,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 +2904,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 +2922,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 +3042,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 +3077,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,17 +3112,17 @@ "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/android.md": "b58b8e9a9825767a0f2e4a6d3705bc2cc167e528917b8eb7ceea061ab1324a0b", "website/docs/animation.md": "1bccb5ca54511381ceb9058167136a35dac47f51b63c6961227e857157a23d26", "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": "155e371a2f1fe350a298709754e159e13d9801536db944a6d331179904eed20d", "website/docs/coding-guides.md": "23264c242034bf92782ce54cdce43eccc161d0a86836117669e22509c2cfcff5", "website/docs/comparison.md": "6889ae7cefbb02e9f61a058be29bbea9948be571151de24acff811889efe301d", "website/docs/compatibility.md": "431c24b579dd57baeb7957c7dea8c56a0a4d1252e5fae26c6e67d1c76bab0f0d", @@ -3110,50 +3134,50 @@ "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": "d6210813384adae3081b0e32a0055e458b61eff9a5954f4192981ef367db383e", "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/rust.md": "716f1867af3044c51086b0d4cae78a91e01fd1611a92eb4d8503c1a45da91f85", + "website/docs/sandbox-and-capabilities.md": "1d5beb02a7d8d5ffd33afc02a3660ff49a2659b90bf2e1d24d780c65a77ac168", "website/docs/scrolling.md": "9b270f5f068c57c739ea1414d23fc66fe243dc5d471e235b71574e6f8b2dc2b1", "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": "b4be88c8cc4b769c080db83e86769abda68503fed477177666616d1c4a9707d5", "website/docs/text.md": "b637c4b98b6e1335daed30739a8e1db10e53c67b1c5ce6aa31879dd0d47ab447", "website/docs/touch-and-gestures.md": "614cd721bdfd5a81b2e365957fd831284df184beb4f02a0055a9139bb495911a", "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 +3185,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 +3210,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": "d71d75f0461bf640c9be28441d68dde098df2c8e4583b8ec75d41d099899983f", "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 +3235,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": "2c93d32e051581043f17d304d800331154b7ca521f62ff45bf24449c6f29418c", + "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": "34d1576fc42ac6f270af7b5e8f289df7f0ecd67532232b06fabbe6e534fbd4f9", + "website/modules/standard-modules.md": "05879a500989eee3dbc3347b4d9a67e42cf5ff18b8dc0ccea9c70fee6cb40cfc", "website/modules/style-reference.md": "f81e39d9fb99c69b1f82d1d0d90a0cc97dac1a7db34d81a32940cbbd5bc4d828", "website/modules/tailwind-reference.md": "f2c8583e0a4eccb70a4c09563f78cc8c8fc1424a1156c6d18eababfce344ad85", "website/package.json": "30de4d3152bb1a67d30c1c264eb06c638b4deef1c2db287129561894c03c760e", @@ -3276,6 +3300,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 +3335,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 +3349,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,12 +3422,12 @@ "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/android.md": "a27b81e074d54ce791bea4d8ea52e10fb073ab7dfe1b0e622955506f1dafe0f4", "website/zh-CN/docs/animation.md": "10a39fb06d616c396033a7659e7a1cf6c36e676ee1ed061d06f8659b36346729", "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": "66282fce5ed6d5ddb04d75d1d825b66874161d13267206b80f07469efc9cdcc1", "website/zh-CN/docs/coding-guides.md": "c3510941f9ec5a110d5552c9dd7d9e4cd86382cbc6a3cf83e554a1b5451f45bb", "website/zh-CN/docs/comparison.md": "4dddca528afa7ef4d7d73ecd8d450db9c4506bc1d50cdce76a5429cf605417dd", "website/zh-CN/docs/compatibility.md": "4857cd153b77a731dfb1efa0ea51edfd56294eadfb489c8e6e6f64d0133acfa5", @@ -3411,49 +3439,49 @@ "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": "bba08b67b6cd81135bb28747ddc0d0bfb076e20e1258917157e927ace4c8fcb8", "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/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": "956f844bff42cd6d2ffa0b25b50b23c96a969f730abf85589990ed6712de7a39", "website/zh-CN/docs/text.md": "a320d71a490ad6bc90292c24448f0aea0f441cd0d3fab2c8de7e58fb4b5e045a", "website/zh-CN/docs/touch-and-gestures.md": "b40ee6490c2032f1a6cb047d67b6569a9b197b818a6e94393f573ebb693c9b8b", "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 +3490,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 +3515,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": "6fa3157f6cae6e2cc71ea7288d41cb380e6491e9825a4724a8417a0c09eedbe9", "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 +3540,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": "af3f46ec2ac89d46a25d97d1640037c680dbe0fcdc6f698be03e19c28432da8f", + "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": "9e89e63f921d87ca4584631e182a7b0b4059377baee3e0c826d24fc2509a1549", + "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": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134", "file_sources": { ".cargo/config.toml": { "repository": "https://github.com/longbridge/nsh", @@ -3552,11 +3580,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", @@ -3623,10 +3651,13 @@ "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 +3665,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 +3681,7 @@ }, "AGENTS.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "CLAUDE.md": { "repository": "https://github.com/longbridge/nsh", @@ -3662,10 +3693,16 @@ }, "CONTRIBUTING.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" + }, + "Cargo.lock": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, + "Cargo.toml": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, - "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 +3715,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 +3737,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,7 +3757,7 @@ }, "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", @@ -3726,7 +3769,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 +3789,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 +3797,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 +3813,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 +3833,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 +3842,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 +3850,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 +3871,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 +3883,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": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" + }, + "crates/gpui/nsh-platform-gpui/src/text_input.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, - "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 +3907,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 +3959,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 +3987,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 +4023,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 +4079,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 +4155,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 +4319,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 +4331,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 +4339,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 +4359,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 +4475,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 +4537,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 +4565,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": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" + }, "crates/nsh-base/src/rich_editor/extensions/link.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" @@ -4586,7 +4645,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": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" + }, "crates/nsh-base/src/rich_editor/js/extensions.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -4772,7 +4834,10 @@ "repository": "https://github.com/longbridge/nsh", "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" }, - "crates/nsh-base/src/rich_editor/view/render.rs": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "crates/nsh-base/src/rich_editor/view/render.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" + }, "crates/nsh-base/src/rich_editor/view/session.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" @@ -4792,7 +4857,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 +4869,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 +4889,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 +4897,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", @@ -4867,7 +4932,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" @@ -5001,7 +5069,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 +5089,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 +5097,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 +5113,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 +5141,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 +5185,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 +5197,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 +5207,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" @@ -5208,7 +5279,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 +5287,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 +5303,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", @@ -5248,7 +5319,7 @@ }, "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 +5358,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 +5380,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 +5416,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": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-cli/build.rs": { "repository": "https://github.com/longbridge/nsh", @@ -5354,7 +5428,7 @@ }, "crates/nsh-cli/src/android.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-cli/src/android/class_file.rs": { "repository": "https://github.com/longbridge/nsh", @@ -5366,7 +5440,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 +5464,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 +5472,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,7 +5492,7 @@ }, "crates/nsh-cli/src/init.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/nsh-cli/src/linux_store.rs": { "repository": "https://github.com/longbridge/nsh", @@ -5428,7 +5502,10 @@ "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": "b45522851121a4802aca9979928f0d08c337a427" + }, "crates/nsh-cli/src/module_meta.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -5439,7 +5516,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 +5532,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,7 +5544,7 @@ }, "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", @@ -5496,9 +5573,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": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, - "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 +5645,19 @@ }, "crates/nsh-cli/src/test.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "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 +5669,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 +5717,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 +5733,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 +5745,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 +5783,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 +5793,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,9 +5817,12 @@ }, "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": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, - "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" @@ -5751,14 +5838,17 @@ "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": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "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/mod.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" + }, "crates/nsh-core/src/core/overlay.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" @@ -5812,14 +5902,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": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" + }, "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": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-core/src/core/watch.rs": { "repository": "https://github.com/longbridge/nsh", @@ -5859,7 +5952,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 +5964,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 +5997,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", @@ -5916,7 +6009,7 @@ }, "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 +6017,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 +6028,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 +6107,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 +6115,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 +6147,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 +6257,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 +6288,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 +6308,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 +6326,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 +6340,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 +6354,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 +6416,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 +6432,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 +6454,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 +6468,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 +6491,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 +6503,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 +6513,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 +6581,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 +6605,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 +6633,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 +6644,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 +6674,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 +6699,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 +6713,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 +6729,18 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, - "crates/nsh-engine/src/perf.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": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", "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 +6748,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 +6792,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 +6869,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", @@ -6909,7 +7022,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 +7042,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 +7096,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 +7158,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,7 +7338,7 @@ }, "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", @@ -7197,7 +7346,7 @@ }, "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", @@ -7207,7 +7356,10 @@ "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": "b45522851121a4802aca9979928f0d08c337a427" + }, "crates/nsh-js/src/host_channel.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -7218,7 +7370,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 +7384,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 +7406,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 +7422,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 +7806,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 +7814,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 +7828,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 +7838,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 +7850,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 +7876,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": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/nsh-platform-android/java/com/longbridge/nsh/DevActivity.java": { "repository": "https://github.com/longbridge/nsh", @@ -7739,7 +7886,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 +7918,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 +7956,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 +8026,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 +8050,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 +8058,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": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, - "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 +8076,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" @@ -7962,7 +8111,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 +8123,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", @@ -7994,13 +8143,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": "b45522851121a4802aca9979928f0d08c337a427" }, - "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 +8163,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 +8189,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 +8222,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 +8270,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" @@ -8294,10 +8465,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 +8483,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 +8491,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 +8529,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 +8553,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 +8567,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 +8587,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": "b45522851121a4802aca9979928f0d08c337a427" + }, "crates/nsh-platform-ios/src/synth.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" @@ -8428,31 +8600,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" @@ -8477,7 +8640,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 +8734,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 +8968,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 +8980,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 +9013,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 +9046,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 +9058,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 +9075,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 +9094,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 +9121,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 +9130,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,9 +9146,12 @@ }, "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" @@ -8981,7 +9162,7 @@ }, "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 +9186,16 @@ }, "crates/nsh-platform-macos/src/app.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "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 +9214,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 +9244,7 @@ }, "crates/nsh-platform-macos/src/input.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "crates/nsh-platform-macos/src/keyboard.rs": { "repository": "https://github.com/longbridge/nsh", @@ -9071,7 +9256,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 +9264,12 @@ }, "crates/nsh-platform-macos/src/mount.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" + }, + "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 +9286,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": "b45522851121a4802aca9979928f0d08c337a427" }, - "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": "b45522851121a4802aca9979928f0d08c337a427" + }, "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" @@ -9145,15 +9348,15 @@ }, "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": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-platform-macos/src/window_state.rs": { "repository": "https://github.com/longbridge/nsh", - "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "crates/nsh-platform-macos/tests/accessibility.rs": { "repository": "https://github.com/longbridge/nsh", @@ -9389,6 +9592,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 +9616,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 +9644,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 +9668,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" @@ -9477,7 +9703,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 +9721,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 +9750,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 +9770,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 +9784,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 +9832,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 +9874,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 +9928,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 +10076,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 +10106,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 +10126,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 +10261,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 +10281,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 +10337,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 +10385,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 +10449,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": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" + }, + "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 +10475,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": "b45522851121a4802aca9979928f0d08c337a427" }, "crates/nsh-platform-web/web/viewport-browser.test.mjs": { "repository": "https://github.com/longbridge/nsh", @@ -10253,8 +10505,14 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, - "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/app.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, + "crates/nsh-platform-windows/src/app_window.rs": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, "crates/nsh-platform-windows/src/audio.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -10267,6 +10525,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" @@ -10298,7 +10560,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 +10583,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 +10595,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 +10607,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 +10631,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 +10659,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 +10690,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": "b45522851121a4802aca9979928f0d08c337a427" + }, "crates/nsh-platform-windows/src/window_close.rs": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -10424,11 +10708,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 +10724,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 +10754,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 +10774,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 +10796,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 +10808,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 +11154,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 +11296,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 +11504,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 +11520,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 +11540,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 +11552,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", @@ -11294,7 +11598,10 @@ "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" }, - "docs/dev/api-naming.md": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "docs/dev/api-naming.md": { + "repository": "https://github.com/longbridge/nsh", + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" + }, "docs/dev/architecture.md": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -11309,11 +11616,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 +11628,7 @@ }, "docs/dev/components.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "docs/dev/data-table.md": { "repository": "https://github.com/longbridge/nsh", @@ -11333,7 +11640,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 +11648,11 @@ }, "docs/dev/elements.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "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 +11676,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,22 +11688,31 @@ }, "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" }, - "docs/dev/performance.md": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", - "docs/dev/pitfalls.md": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "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/platforms.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "docs/dev/reactive-components.md": { "repository": "https://github.com/longbridge/nsh", @@ -11404,9 +11720,12 @@ }, "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": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, - "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 +11736,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 +11744,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 +11752,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": "b45522851121a4802aca9979928f0d08c337a427" }, "docs/dev/tui.md": { "repository": "https://github.com/longbridge/nsh", @@ -11449,12 +11774,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" }, - "docs/dev/windows.md": "https://github.com/longbridge/nsh@a901baa2e2d82a17066abb589b542b0a90890e0a", + "docs/dev/windows.md": { + "repository": "https://github.com/longbridge/nsh", + "revision": "b45522851121a4802aca9979928f0d08c337a427" + }, "docs/dev/workflow.md": { "repository": "https://github.com/longbridge/nsh", "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" @@ -11599,7 +11930,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 +12024,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 +12444,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 +12504,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 +12608,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 +12760,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 +12893,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 +12929,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 +13033,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 +13230,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 +13262,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 +13347,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 +13387,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 +13473,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 +13571,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 +13735,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 +13775,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", @@ -13517,7 +13851,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 +13931,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 +13939,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 +13967,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 +14131,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 +14149,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 +14195,7 @@ }, "tests/compat/cases/base/App.tsx": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "tests/compat/cases/base/base-accordion.tsx": { "repository": "https://github.com/longbridge/nsh", @@ -13872,6 +14213,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 +14259,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 +14301,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 +14385,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" @@ -14071,7 +14423,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 +14432,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 +14506,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": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" + }, "tests/compat/cases/browser/App.tsx": { "repository": "https://github.com/longbridge/nsh", "revision": "d01cd3cce6645391c65a379d6230c2d2e651d55f" @@ -14221,7 +14576,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 +14662,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 +14692,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 +14736,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 +14748,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 +14960,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 +15032,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 +15046,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 +15072,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 +15509,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 +15649,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 +15789,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,7 +15809,7 @@ }, "website/docs/android.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "website/docs/animation.md": { "repository": "https://github.com/longbridge/nsh", @@ -15472,7 +15827,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": "b45522851121a4802aca9979928f0d08c337a427" + }, "website/docs/coding-guides.md": { "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" @@ -15519,11 +15877,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 +15893,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 +15909,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 +15933,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 +15941,7 @@ }, "website/docs/packaging.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "website/docs/performance-report.md": { "repository": "https://github.com/longbridge/nsh", @@ -15592,7 +15953,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", @@ -15613,11 +15974,11 @@ }, "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", @@ -15637,7 +15998,7 @@ }, "website/docs/testing-and-trace.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "website/docs/text.md": { "repository": "https://github.com/longbridge/nsh", @@ -15651,12 +16012,18 @@ "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 +16042,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 +16078,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 +16094,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 +16118,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 +16143,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 +16173,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": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" + }, "website/elements/safe-area.md": { "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" @@ -15821,7 +16191,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 +16203,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 +16225,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 +16269,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 +16281,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 +16289,11 @@ }, "website/modules/nsh-desktop.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "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 +16305,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 +16322,11 @@ }, "website/modules/nsh.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "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 +16524,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 +16666,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 +16720,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,7 +17014,7 @@ }, "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", @@ -16643,7 +17032,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": "b45522851121a4802aca9979928f0d08c337a427" + }, "website/zh-CN/docs/coding-guides.md": { "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" @@ -16690,11 +17082,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 +17098,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 +17114,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 +17138,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 +17146,7 @@ }, "website/zh-CN/docs/packaging.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "website/zh-CN/docs/performance-report.md": { "repository": "https://github.com/longbridge/nsh", @@ -16763,7 +17158,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", @@ -16784,11 +17179,11 @@ }, "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 +17203,7 @@ }, "website/zh-CN/docs/testing-and-trace.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "b45522851121a4802aca9979928f0d08c337a427" }, "website/zh-CN/docs/text.md": { "repository": "https://github.com/longbridge/nsh", @@ -16822,12 +17217,18 @@ "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 +17247,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 +17283,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 +17299,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 +17323,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 +17348,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 +17378,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": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" + }, "website/zh-CN/elements/safe-area.md": { "repository": "https://github.com/longbridge/nsh", "revision": "3f8ecd8b3c55ad6274c6babbf7ee55c4cd4ae359" @@ -16992,7 +17396,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 +17408,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 +17430,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 +17474,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 +17486,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 +17494,11 @@ }, "website/zh-CN/modules/nsh-desktop.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "a30a1df275f5043c8cc357bca3c1f605a592b4ad" }, "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 +17510,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 +17527,11 @@ }, "website/zh-CN/modules/nsh.md": { "repository": "https://github.com/longbridge/nsh", - "revision": "708105de3c4e94eac4c7c49e2e931b0c3af55124" + "revision": "3b2fd5876b5865b0f3fe6ff875a3514164fd3134" }, "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/cli.md b/third-party/nsh/website/docs/cli.md index 99055d7fa33..4c4d5dcdf1d 100644 --- a/third-party/nsh/website/docs/cli.md +++ b/third-party/nsh/website/docs/cli.md @@ -135,7 +135,7 @@ 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. @@ -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 @@ -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/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..db2a6e40ba1 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. 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/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/testing-and-trace.md b/third-party/nsh/website/docs/testing-and-trace.md index e8aa1547bf5..92e598b1a64 100644 --- a/third-party/nsh/website/docs/testing-and-trace.md +++ b/third-party/nsh/website/docs/testing-and-trace.md @@ -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/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..398eddc4ec1 100644 --- a/third-party/nsh/website/elements/rich-editor.md +++ b/third-party/nsh/website/elements/rich-editor.md @@ -201,8 +201,8 @@ is copied with `transform_copied`. Files reach the app, which decides what they become (an image node, an attachment, a link to an uploaded copy); the editor inserts nothing for them and keeps its selection, where the app inserts what it makes of them. A paste of -images or of files copied in a file manager calls `onPasteFiles` with `{ files, uris }`: `files` the images with -their bytes, `uris` the copied files' `file:` URLs. On the desktops, files dragged from another application onto +images or of files copied in a file manager calls `onPasteFiles` with `{ paste: { files, uris } }`: `files` the images with +their bytes (`{ name, mime, data }`), `uris` the copied files' `file:` URLs. On the desktops, files dragged from another application onto the editor call its `onFileDrop` with `{ uris, mimeTypes }`, as a [view's file drops](./view.md#desktop-file-drops) do, and `onFileDragEnter` / `onFileDragLeave` follow the drag, for a hint such as "Release to attach". Without `onFileDrop` the editor leaves dropped files to the view around it that listens. @@ -214,7 +214,7 @@ the text goes in as a paste of it would (with its HTML when the drag has some, t ```tsx attach(files)} + onPasteFiles={({ paste }) => attach(paste.files)} onFileDrop={({ uris, mimeTypes }) => attachFiles(uris, mimeTypes)} /> ``` @@ -345,8 +345,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`, 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..fae0d6a5aef 100644 --- a/third-party/nsh/website/zh-CN/elements/rich-editor.md +++ b/third-party/nsh/website/zh-CN/elements/rich-editor.md @@ -145,14 +145,14 @@ Markdown),以及按 schema 的 `renderHTML` 写出的 HTML,邮件、文档 ### 粘贴和拖入的文件 -文件交给应用,由应用决定它们变成什么(图片节点、附件、指向上传副本的链接);编辑器不为它们插入任何内容,选区保持不变,应用在选区处插入自己生成的内容。粘贴图片或在文件管理器中复制的文件时调用 `onPasteFiles`,参数为 `{ files, uris }`:`files` 是带字节的图片,`uris` 是被复制文件的 `file:` URL。在桌面平台上,从其他应用拖到编辑器上的文件调用它的 `onFileDrop`,参数为 `{ uris, mimeTypes }`,与[视图的文件拖放](./view.md#桌面文件拖放)相同;`onFileDragEnter` / `onFileDragLeave` 跟随拖动,可用于显示「松开以添加附件」之类的提示。没有 `onFileDrop` 时,拖入的文件交给外层监听的视图。 +文件交给应用,由应用决定它们变成什么(图片节点、附件、指向上传副本的链接);编辑器不为它们插入任何内容,选区保持不变,应用在选区处插入自己生成的内容。粘贴图片或在文件管理器中复制的文件时调用 `onPasteFiles`,参数为 `{ paste: { files, uris } }`:`files` 是带字节的图片(`{ name, mime, data }`),`uris` 是被复制文件的 `file:` URL。在桌面平台上,从其他应用拖到编辑器上的文件调用它的 `onFileDrop`,参数为 `{ uris, mimeTypes }`,与[视图的文件拖放](./view.md#桌面文件拖放)相同;`onFileDragEnter` / `onFileDragLeave` 跟随拖动,可用于显示「松开以添加附件」之类的提示。没有 `onFileDrop` 时,拖入的文件交给外层监听的视图。 从其他应用或其他视图拖到编辑器上的文字插在松手的位置:光标移到那里,文字像粘贴一样插入(拖动带 HTML 时一并使用,经过 `transformPasted` 和 `handlePaste`),算一步撤销。目前 iOS 会派发文字拖放;桌面平台和 Android 上文字拖动仍由平台处理。 ```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` 时按原始尺寸显示,只设其一时按该边和图片的宽高比显示。 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)]; +}; + +` (`"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)]; +}; + +` (`"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)]; +}; + +