DeepSeek Harness Tauri 桌面版 | Only 8mb installer, zero environment setup, preset plugins, Windows / macOS / Linux.
feat(native): 合入移动端子工程并接入 Android / IOS 构建/发版流水线 (#875)
Mao Mra9b72677977b
diff --git a/.github/workflows/build-android-test.yml b/.github/workflows/build-android-test.ymlnew file mode 100644index 00000000..ea58be4e--- /dev/null+++ b/.github/workflows/build-android-test.yml@@ -0,0 +1,15 @@+name: Build Android Test++on:+ workflow_dispatch:++permissions:+ contents: read++concurrency:+ group: build-android-test-${{ github.ref }}+ cancel-in-progress: true++jobs:+ build-test-apk:+ uses: ./.github/workflows/build-android.ymldiff --git a/.github/workflows/build-android.yml b/.github/workflows/build-android.ymlnew file mode 100644index 00000000..302a181a--- /dev/null+++ b/.github/workflows/build-android.yml@@ -0,0 +1,211 @@+name: Android Native Build++# 常规构建产物:main 上的 native 变更与手动触发时产出正式签名的 APK。+# 只上传 Actions artifact,不碰任何 GitHub Release(随桌面端 release 发布见 release-native.yml,+# PR 校验构建见 build-android-test.yml)。+#+# 签名 secret(与 dsh-bridge-mobile 同名,需在本仓库 Settings → Secrets 配置):+# ANDROID_KEYSTORE_BASE64 keystore 的 Base64+# ANDROID_KEYSTORE_PASSWORD keystore 密码+# ANDROID_KEY_ALIAS 签名 key alias+# ANDROID_KEY_PASSWORD 签名 key 密码+# 四项全有 → 用正式 key 重新签名;四项全无 → 用 Android 开发证书并在日志/摘要中警告;+# 部分配置 → 直接失败(半成品签名不可发布)。+on:+ push:+ branches: [main]+ paths:+ - src-native/**+ - assets/native/**+ - app.json+ - app.config.js+ - metro.config.js+ - tsconfig.native.json+ - vitest.native.config.ts+ - package.json+ - pnpm-lock.yaml+ - pnpm-workspace.yaml+ - .github/workflows/build-android.yml+ workflow_dispatch:+ workflow_call:++permissions:+ contents: read++concurrency:+ group: ${{ github.workflow }}-${{ github.ref }}+ cancel-in-progress: true++jobs:+ build:+ name: Build Android APK+ runs-on: ubuntu-latest+ timeout-minutes: 60+ outputs:+ version: ${{ steps.meta.outputs.version }}+ signing: ${{ steps.signing.outputs.mode }}+ steps:+ - name: Checkout repository+ uses: actions/checkout@v7+ with:+ persist-credentials: false++ - name: Setup Node.js and pnpm+ uses: ./.github/actions/setup-node-pnpm++ - name: Install dependencies+ run: pnpm install --frozen-lockfile++ # 资产名里的版本号取自 app.json 的 expo.version;bumpp 目前只改 package.json /+ # Cargo.toml / tauri.conf.json,两者不一致时必须在发版前同步。+ - name: Read native version+ id: meta+ run: |+ set -euo pipefail+ version="$(node --input-type=commonjs -p "require('./app.json').expo.version")"+ pkg="$(node --input-type=commonjs -p "require('./package.json').version")"+ if [ "$version" != "$pkg" ]; then+ echo "::error::app.json expo.version ($version) != package.json version ($pkg); 请让 native 版本跟随桌面端版本"+ exit 1+ fi+ echo "version=$version" >> "$GITHUB_OUTPUT"+ echo "native version: $version"++ - name: Typecheck native sources+ run: pnpm run typecheck:native++ - name: Test native sources+ run: pnpm run test:native++ - name: Determine signing mode+ id: signing+ env:+ KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}+ KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}+ KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}+ KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }}+ run: |+ set -euo pipefail+ present=0+ for value in "$KEYSTORE_BASE64" "$KEYSTORE_PASSWORD" "$KEY_ALIAS" "$KEY_PASSWORD"; do+ if [[ -n "$value" ]]; then present=$((present + 1)); fi+ done+ if [[ "$present" -eq 0 ]]; then+ echo 'mode=debug' >> "$GITHUB_OUTPUT"+ echo '::warning::ANDROID_KEYSTORE_BASE64 / ANDROID_KEYSTORE_PASSWORD / ANDROID_KEY_ALIAS / ANDROID_KEY_PASSWORD 均未配置,APK 将使用 Android 开发证书。'+ elif [[ "$present" -eq 4 ]]; then+ echo 'mode=release' >> "$GITHUB_OUTPUT"+ else+ echo '::error::Android 签名 secret 必须四项全配或全不配;当前配置不完整。'+ exit 1+ fi++ - name: Setup JDK 17+ uses: actions/setup-java@v6+ with:+ distribution: temurin+ java-version: '17'++ - name: Setup Android SDK+ uses: android-actions/setup-android@v4+ with:+ cmdline-tools-version: '12266719'++ - name: Install Android build tools+ run: sdkmanager 'platforms;android-36' 'build-tools;36.0.0' 'ndk;27.1.12297006' 'cmake;3.22.1'++ - name: Generate Android project+ env:+ CI: '1'+ run: pnpm run prebuild:native++ - name: Build release APK+ env:+ CI: '1'+ working-directory: android+ run: |+ chmod +x gradlew+ ./gradlew :app:assembleRelease --no-daemon --stacktrace++ # 发布资产名固定为 Deepseek.Harness.Android_<expo.version>.apk;同时校验 16 KB+ # 页对齐、签名、APK 内的标准版本号,以及 app.config.js 注入的第三方声明。+ - name: Sign and verify APK+ env:+ VERSION: ${{ steps.meta.outputs.version }}+ SIGNING_MODE: ${{ steps.signing.outputs.mode }}+ KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}+ KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}+ KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}+ KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }}+ run: |+ set -euo pipefail+ tools="$ANDROID_HOME/build-tools/36.0.0"+ source='android/app/build/outputs/apk/release/app-release.apk'+ mkdir -p release+ destination="release/Deepseek.Harness.Android_${VERSION}.apk"+ "$tools/zipalign" -c -P 16 4 "$source"+ if [[ "$SIGNING_MODE" == 'release' ]]; then+ keystore="$RUNNER_TEMP/dsh-bridge-release.keystore"+ trap 'rm -f -- "$keystore"' EXIT+ umask 077+ printf '%s' "$KEYSTORE_BASE64" | base64 --decode > "$keystore"+ "$tools/apksigner" sign \+ --ks "$keystore" \+ --ks-key-alias "$KEY_ALIAS" \+ --ks-pass env:KEYSTORE_PASSWORD \+ --key-pass env:KEY_PASSWORD \+ --out "$destination" "$source"+ else+ cp "$source" "$destination"+ fi+ "$tools/apksigner" verify --verbose --print-certs "$destination"+ # 先落文件再读取:`aapt dump badging | head` 会让 aapt 收到 SIGPIPE,pipefail 下误报失败。+ "$tools/aapt" dump badging "$destination" > "$RUNNER_TEMP/badging.txt"+ head -n 5 "$RUNNER_TEMP/badging.txt"+ grep -q "versionName='${VERSION}'" "$RUNNER_TEMP/badging.txt" \+ || { echo "::error::APK versionName 与 app.json expo.version ${VERSION} 不一致"; exit 1; }+ if grep -q '^application-debuggable' "$RUNNER_TEMP/badging.txt"; then+ echo '::error::测试 APK 不得启用开发模式或依赖 Metro。'+ exit 1+ fi+ if ! unzip -p "$destination" assets/index.android.bundle > "$RUNNER_TEMP/index.android.bundle" || [[ ! -s "$RUNNER_TEMP/index.android.bundle" ]]; then+ echo '::error::APK 必须内置非空 JavaScript bundle,才能脱离 Metro 运行。'+ exit 1+ fi+ echo 'APK embeds a non-empty JavaScript bundle and is not debuggable.'+ APK_PATH="$destination" node --input-type=commonjs -e '+ const fs = require("node:fs");+ const { execFileSync } = require("node:child_process");+ const apk = process.env.APK_PATH;+ const config = JSON.parse(execFileSync("unzip", ["-p", apk, "assets/app.config"], { encoding: "utf8" }));+ const notice = fs.readFileSync("THIRD_PARTY_NOTICES.md", "utf8");+ if (config.extra?.thirdPartyNotices !== notice) throw new Error("APK is missing the complete third-party notices");+ console.log("APK embeds the complete third-party notices.");+ '+ cp THIRD_PARTY_NOTICES.md release/THIRD_PARTY_NOTICES.md+ (cd release && sha256sum ./*.apk ./THIRD_PARTY_NOTICES.md > SHA256SUMS.txt)+ find release -type f -print | sort++ - name: Upload APK artifact+ uses: actions/upload-artifact@v6+ with:+ name: android-apk-${{ steps.meta.outputs.version }}+ path: release/+ if-no-files-found: error+ retention-days: 14++ - name: Summarize build+ env:+ VERSION: ${{ steps.meta.outputs.version }}+ SIGNING_MODE: ${{ steps.signing.outputs.mode }}+ run: |+ {+ echo "### Android native build"+ echo+ echo "- asset: \`Deepseek.Harness.Android_${VERSION}.apk\`"+ echo "- signing: \`${SIGNING_MODE}\`"+ } >> "$GITHUB_STEP_SUMMARY"+ if [[ "$SIGNING_MODE" == 'debug' ]]; then+ echo '> [!WARNING]' >> "$GITHUB_STEP_SUMMARY"+ echo '> 该 APK 使用 Android 开发证书,仅供评估,不能用于生产分发。' >> "$GITHUB_STEP_SUMMARY"+ fidiff --git a/.github/workflows/ci-native.yml b/.github/workflows/ci-native.ymlnew file mode 100644index 00000000..53a600b5--- /dev/null+++ b/.github/workflows/ci-native.yml@@ -0,0 +1,35 @@+name: Native CI++on:+ push:+ branches: [main]+ pull_request:+ branches: [main, native]++permissions:+ contents: read++concurrency:+ group: ${{ github.workflow }}-${{ github.ref }}+ cancel-in-progress: true++jobs:+ native:+ name: Native typecheck and unit tests+ runs-on: ubuntu-latest+ timeout-minutes: 10+ steps:+ - name: Checkout repository+ uses: actions/checkout@v7++ - name: Setup Node.js and pnpm+ uses: ./.github/actions/setup-node-pnpm++ - name: Install dependencies+ run: pnpm install --frozen-lockfile++ - name: Type check native subproject+ run: pnpm run typecheck:native++ - name: Native unit test+ run: pnpm run test:nativediff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex 947a27e1..8879a556 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -4,7 +4,7 @@ on:push:branches: [main]pull_request:- branches: [main, feat/mobile-sidebar]+ branches: [main, native, feat/mobile-sidebar]permissions:contents: readdiff --git a/.github/workflows/release-native.yml b/.github/workflows/release-native.ymlnew file mode 100644index 00000000..8db32c9c--- /dev/null+++ b/.github/workflows/release-native.yml@@ -0,0 +1,326 @@+name: Release Android APK (Native)++# 桌面端发布完成后,用**同一个 release 提交**构建 Android APK,并把资产+# `Deepseek.Harness.Android_<expo.version>.apk` 上传到该 release。iOS 不发布。+#+# 触发方式与 release-bundle.yml 保持一致:release.yml 只由 tag push / release/* PR 合并 /+# 手动触发启动,没有任何分支触发路径,因此 workflow_run 不设 branches 过滤(设了反而会+# 漏掉 tag push 与 PR 合并两条正式发布路径),只保留 types: [completed],conclusion 与+# 「触发运行来自本仓库」两条判断放在 job 级。+#+# 签名 secret(与 dsh-bridge-mobile 同名,需在本仓库 Settings → Secrets 配置):+# ANDROID_KEYSTORE_BASE64 keystore 的 Base64+# ANDROID_KEYSTORE_PASSWORD keystore 密码+# ANDROID_KEY_ALIAS 签名 key alias+# ANDROID_KEY_PASSWORD 签名 key 密码+# 四项全有 → 正式 key 签名;四项全无 → 开发证书 + 警告(不改变 release 的 draft/prerelease+# 状态,那是 release.yml finalize 的职责);部分配置 → 直接失败。+on:+ workflow_run:+ workflows: ['Build & Release']+ types: [completed]+ workflow_dispatch:+ inputs:+ tag:+ description: 目标 release tag(例如 v0.21.0);必须从该 tag 的提交触发+ required: true+ type: string++permissions:+ contents: read++concurrency:+ group: release-native-${{ github.event.workflow_run.head_branch || github.ref }}+ cancel-in-progress: false++jobs:+ prepare:+ name: Prepare Android Release+ # workflow_run 会为 release.yml 的每一次结束触发(含失败/取消/整轮所有 job 被跳过);+ # 被跳过的 job 报告 success,所以还必须要求触发运行来自本仓库。+ if: >-+ github.event_name == 'workflow_dispatch' ||+ (github.event.workflow_run.conclusion == 'success' &&+ github.event.workflow_run.head_repository.full_name == github.repository)+ runs-on: ubuntu-latest+ outputs:+ should_build: ${{ steps.release.outputs.should_build }}+ tag: ${{ steps.release.outputs.tag }}+ source_ref: ${{ steps.release.outputs.source_ref }}+ steps:+ - name: Checkout triggering commit+ uses: actions/checkout@v7+ with:+ # 只用它推导 tag:真正的构建源是按 tag 推导出的发布提交(见下一步)。+ ref: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.head_sha || github.sha }}+ fetch-depth: 0+ persist-credentials: false++ - name: Resolve release tag+ id: release+ env:+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}+ GH_REPO: ${{ github.repository }}+ EVENT_NAME: ${{ github.event_name }}+ TRIGGER_EVENT: ${{ github.event.workflow_run.event }}+ RUN_HEAD_BRANCH: ${{ github.event.workflow_run.head_branch }}+ TAG_INPUT: ${{ inputs.tag }}+ run: |+ set -euo pipefail+ # 桌面端 release 的 tag 恒为 v<package.json version>(scripts/release-identity.mjs)。+ pkg_version="$(node --input-type=commonjs -p "require('./package.json').version")"+ manual=false+ if [ "$EVENT_NAME" = "workflow_dispatch" ]; then+ manual=true+ fi+ tag="$TAG_INPUT"++ emit() {+ echo "should_build=$1" >> "$GITHUB_OUTPUT"+ echo "tag=$tag" >> "$GITHUB_OUTPUT"+ echo "source_ref=$2" >> "$GITHUB_OUTPUT"+ }+ skip() {+ emit false ''+ echo "::warning::$1"+ exit 0+ }+ # 手动指定了 tag 说明用户有明确目标,静默跳过会让人以为构建成功。+ fail() {+ if [ "$manual" = true ]; then+ echo "::error::$1"+ exit 1+ fi+ skip "$1; skipping the Android APK build"+ }++ # release.yml 的手动触发是试跑:它发的是 test-<ref>-<run> 预发布,tag 不指向本次构建的提交。+ if [ "$TRIGGER_EVENT" = "workflow_dispatch" ]; then+ fail "the triggering Build & Release run is a manual test release, whose tag does not point at the commit it built"+ fi++ if [ -z "$tag" ] && [[ "$RUN_HEAD_BRANCH" == v* ]]; then+ tag="$RUN_HEAD_BRANCH"+ fi+ if [ -z "$tag" ]; then+ tag="v$pkg_version"+ fi++ gh release view "$tag" >/dev/null 2>&1 \+ || fail "release $tag does not exist"++ # 构建源必须是 tag 指向的提交:合并 release/* PR 时 tag 建在 merge commit 上,+ # 而 workflow_run 的 head_sha 只是 PR 分支的 head,两者不是同一个提交。+ tag_commit="$(git rev-parse --verify --quiet "${tag}^{commit}" || true)"+ if [ -z "$tag_commit" ]; then+ fail "cannot resolve tag $tag locally"+ fi+ if [ "$manual" = true ] && [ "$(git rev-parse HEAD)" != "$tag_commit" ]; then+ fail "tag $tag points at $tag_commit but this run is dispatched from $(git rev-parse HEAD); dispatch this workflow from the $tag ref"+ fi+ # 迁移 native 之前的 tag 没有 app.json / expo 配置,构建它只会产出错误的版本号。+ if ! git cat-file -e "${tag_commit}:app.json" 2>/dev/null; then+ fail "tag $tag points at $tag_commit, which predates the native Android pipeline"+ fi++ echo "android release target: $tag from $tag_commit"+ emit true "$tag_commit"++ build:+ name: Build Android APK+ needs: prepare+ if: >-+ needs.prepare.result == 'success' &&+ needs.prepare.outputs.should_build == 'true'+ runs-on: ubuntu-latest+ timeout-minutes: 60+ outputs:+ version: ${{ steps.meta.outputs.version }}+ signing: ${{ steps.signing.outputs.mode }}+ steps:+ - name: Checkout release commit+ uses: actions/checkout@v7+ with:+ ref: ${{ needs.prepare.outputs.source_ref }}+ fetch-depth: 0+ persist-credentials: false++ - name: Setup Node.js and pnpm+ uses: ./.github/actions/setup-node-pnpm++ - name: Install dependencies+ run: pnpm install --frozen-lockfile++ # 资产名里的版本号取自 release 提交的 app.json expo.version;桌面端 tag 由+ # package.json 决定,两者不一致就会发出与 release 版本不符的资产,必须失败。+ - name: Read native version+ id: meta+ run: |+ set -euo pipefail+ version="$(node --input-type=commonjs -p "require('./app.json').expo.version")"+ pkg="$(node --input-type=commonjs -p "require('./package.json').version")"+ if [ "$version" != "$pkg" ]; then+ echo "::error::app.json expo.version ($version) != package.json version ($pkg); 请让 native 版本跟随桌面端版本(bump 流程需同步 app.json)"+ exit 1+ fi+ echo "version=$version" >> "$GITHUB_OUTPUT"+ echo "native version: $version"++ - name: Typecheck native sources+ run: pnpm run typecheck:native++ - name: Test native sources+ run: pnpm run test:native++ - name: Determine signing mode+ id: signing+ env:+ KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}+ KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}+ KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}+ KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }}+ run: |+ set -euo pipefail+ present=0+ for value in "$KEYSTORE_BASE64" "$KEYSTORE_PASSWORD" "$KEY_ALIAS" "$KEY_PASSWORD"; do+ if [[ -n "$value" ]]; then present=$((present + 1)); fi+ done+ if [[ "$present" -eq 0 ]]; then+ echo 'mode=debug' >> "$GITHUB_OUTPUT"+ echo '::warning::ANDROID_KEYSTORE_BASE64 / ANDROID_KEYSTORE_PASSWORD / ANDROID_KEY_ALIAS / ANDROID_KEY_PASSWORD 均未配置,发布资产将使用 Android 开发证书。'+ elif [[ "$present" -eq 4 ]]; then+ echo 'mode=release' >> "$GITHUB_OUTPUT"+ else+ echo '::error::Android 签名 secret 必须四项全配或全不配;当前配置不完整。'+ exit 1+ fi++ - name: Setup JDK 17+ uses: actions/setup-java@v6+ with:+ distribution: temurin+ java-version: '17'++ - name: Setup Android SDK+ uses: android-actions/setup-android@v4+ with:+ cmdline-tools-version: '12266719'++ - name: Install Android build tools+ run: sdkmanager 'platforms;android-36' 'build-tools;36.0.0' 'ndk;27.1.12297006' 'cmake;3.22.1'++ - name: Generate Android project+ env:+ CI: '1'+ run: pnpm run prebuild:native++ - name: Build release APK+ env:+ CI: '1'+ working-directory: android+ run: |+ chmod +x gradlew+ ./gradlew :app:assembleRelease --no-daemon --stacktrace++ # 发布资产名固定为 Deepseek.Harness.Android_<expo.version>.apk;同时校验 16 KB+ # 页对齐、签名、APK 内的标准版本号,以及 app.config.js 注入的第三方声明。+ - name: Sign and verify APK+ env:+ VERSION: ${{ steps.meta.outputs.version }}+ SIGNING_MODE: ${{ steps.signing.outputs.mode }}+ KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}+ KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}+ KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}+ KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }}+ run: |+ set -euo pipefail+ tools="$ANDROID_HOME/build-tools/36.0.0"+ source='android/app/build/outputs/apk/release/app-release.apk'+ mkdir -p release+ destination="release/Deepseek.Harness.Android_${VERSION}.apk"+ "$tools/zipalign" -c -P 16 4 "$source"+ if [[ "$SIGNING_MODE" == 'release' ]]; then+ keystore="$RUNNER_TEMP/dsh-bridge-release.keystore"+ trap 'rm -f -- "$keystore"' EXIT+ umask 077+ printf '%s' "$KEYSTORE_BASE64" | base64 --decode > "$keystore"+ "$tools/apksigner" sign \+ --ks "$keystore" \+ --ks-key-alias "$KEY_ALIAS" \+ --ks-pass env:KEYSTORE_PASSWORD \+ --key-pass env:KEY_PASSWORD \+ --out "$destination" "$source"+ else+ cp "$source" "$destination"+ fi+ "$tools/apksigner" verify --verbose --print-certs "$destination"+ # 先落文件再读取:`aapt dump badging | head` 会让 aapt 收到 SIGPIPE,pipefail 下误报失败。+ "$tools/aapt" dump badging "$destination" > "$RUNNER_TEMP/badging.txt"+ head -n 5 "$RUNNER_TEMP/badging.txt"+ grep -q "versionName='${VERSION}'" "$RUNNER_TEMP/badging.txt" \+ || { echo "::error::APK versionName 与 app.json expo.version ${VERSION} 不一致"; exit 1; }+ APK_PATH="$destination" node --input-type=commonjs -e '+ const fs = require("node:fs");+ const { execFileSync } = require("node:child_process");+ const apk = process.env.APK_PATH;+ const config = JSON.parse(execFileSync("unzip", ["-p", apk, "assets/app.config"], { encoding: "utf8" }));+ const notice = fs.readFileSync("THIRD_PARTY_NOTICES.md", "utf8");+ if (config.extra?.thirdPartyNotices !== notice) throw new Error("APK is missing the complete third-party notices");+ console.log("APK embeds the complete third-party notices.");+ '+ cp THIRD_PARTY_NOTICES.md release/THIRD_PARTY_NOTICES.md+ (cd release && sha256sum ./*.apk ./THIRD_PARTY_NOTICES.md > SHA256SUMS.txt)+ find release -type f -print | sort++ - name: Upload APK artifact+ uses: actions/upload-artifact@v6+ with:+ name: android-apk-release+ path: release/+ if-no-files-found: error+ retention-days: 14++ publish:+ name: Publish APK Asset+ needs: [prepare, build]+ if: >-+ needs.prepare.result == 'success' &&+ needs.build.result == 'success' &&+ needs.prepare.outputs.should_build == 'true'+ runs-on: ubuntu-latest+ timeout-minutes: 15+ # 写权限只给真正上传资产的这一步。+ permissions:+ contents: write+ steps:+ - name: Download APK artifact+ uses: actions/download-artifact@v7+ with:+ name: android-apk-release+ path: release++ - name: Upload assets to release+ env:+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}+ # publish 未 checkout,gh 无法从 .git 推断仓库,需显式指定。+ GH_REPO: ${{ github.repository }}+ RELEASE_TAG: ${{ needs.prepare.outputs.tag }}+ VERSION: ${{ needs.build.outputs.version }}+ SIGNING_MODE: ${{ needs.build.outputs.signing }}+ run: |+ set -euo pipefail+ apk="release/Deepseek.Harness.Android_${VERSION}.apk"+ [ -f "$apk" ] || { echo "::error::$apk was not downloaded"; exit 1; }+ # 只上传,不新建/不改写 release:release.yml 的 finalize 是 Release 的单一 writer。+ gh release upload "$RELEASE_TAG" "$apk" release/SHA256SUMS.txt release/THIRD_PARTY_NOTICES.md --clobber+ {+ echo "### Android APK asset"+ echo+ echo "- asset: \`Deepseek.Harness.Android_${VERSION}.apk\`"+ echo "- signing: \`${SIGNING_MODE}\`"+ echo "- iOS: 未发布"+ } >> "$GITHUB_STEP_SUMMARY"+ if [[ "$SIGNING_MODE" == 'debug' ]]; then+ echo '> [!WARNING]' >> "$GITHUB_STEP_SUMMARY"+ echo '> 该 APK 使用 Android 开发证书,仅供评估,不能用于生产分发;配置四个 ANDROID_* 签名 secret 后重跑本 workflow 可覆盖为正式签名。' >> "$GITHUB_STEP_SUMMARY"+ fidiff --git a/.gitignore b/.gitignoreindex 8917b424..daaa4ba1 100644--- a/.gitignore+++ b/.gitignore@@ -33,4 +33,14 @@ test/e2e/.artifactssource/.gitmodules.tmp-alpha-inspect-.dsh.dev\ No newline at end of file+.dsh.dev++# expo / react-native(移动端)构建产物+.expo/+android/+ios/+expo-env.d.ts+*.apk+*.aab+*.jks+*.keystore\ No newline at end of filediff --git a/README.en.md b/README.en.mdindex 1d4864ce..2bd177b4 100644--- a/README.en.md+++ b/README.en.md@@ -114,6 +114,15 @@ brew install dsh-tauri/desktop/deepseek-harness- Leave empty to inherit system/environment settings. Saved changes apply to new requests; retry failed downloads afterward.- SOCKS5H resolves destination names through the proxy; loopback connections stay direct.+## Mobile support++The same repository also maintains the **DSH Mobile** mobile app (Expo / React Native): it discovers a DSH host on the local network and hosts the Harness web UI in a full-screen WebView. The source lives in `src-native/`.++- Android APKs are downloadable from the [Releases](https://github.com/dsh-tauri/deepseek-harness-desktop/releases) page as `Deepseek.Harness.Android_x.x.x.apk`, and the version follows the desktop app.+- **iOS is not published yet**: only the Android build and release pipeline exists.+- The mobile app is maintained **only while no official mobile service exists**, as a stopgap.+- Development commands (`pnpm dev:native`, `pnpm android`, `pnpm test:native`, `pnpm typecheck:native`, …) plus the discovery, connection, persistence and release conventions are documented in the [mobile specification](docs/specs/native.md).+## RuntimeWindows startup failures show a native dialog with the underlying error. For `STARTUP_LOW_INTEGRITY`:diff --git a/README.es.md b/README.es.mdindex 8f4edf4c..9949839b 100644--- a/README.es.md+++ b/README.es.md@@ -114,6 +114,15 @@ brew install dsh-tauri/desktop/deepseek-harness- Vacío hereda la configuración del sistema/entorno. Los cambios se aplican a nuevas peticiones; reintentá las descargas fallidas.- SOCKS5H resuelve los nombres por el proxy; las conexiones de loopback siguen directas.+## Soporte móvil++El mismo repositorio también mantiene la app móvil **DSH Mobile** (Expo / React Native): descubre un host DSH en la red local y muestra la interfaz web de Harness en un WebView a pantalla completa. El código está en `src-native/`.++- Los APK de Android se descargan desde la página de [Releases](https://github.com/dsh-tauri/deepseek-harness-desktop/releases) como `Deepseek.Harness.Android_x.x.x.apk`, y la versión sigue a la de escritorio.+- **iOS todavía no se publica**: solo existe el flujo de compilación y publicación de Android.+- La app móvil se mantiene **solo mientras no exista un servicio móvil oficial**, como solución transitoria.+- Los comandos de desarrollo (`pnpm dev:native`, `pnpm android`, `pnpm test:native`, `pnpm typecheck:native`, etc.) y las convenciones de descubrimiento, conexión, persistencia y publicación están en la [especificación móvil](docs/specs/native.md).+## RuntimeWindows muestra los errores de inicio en un diálogo nativo. Para `STARTUP_LOW_INTEGRITY`:diff --git a/README.md b/README.mdindex f4278955..18366ca3 100644--- a/README.md+++ b/README.md@@ -113,6 +113,15 @@ brew install dsh-tauri/desktop/deepseek-harness- 留空沿用系统/环境代理;保存后对新请求生效,可重试失败的下载。- SOCKS5H 通过代理解析目标域名;本机回环连接始终直连。+## 移动端支持++同一仓库内维护移动端 **DSH Mobile**(Expo / React Native):在局域网发现 DSH 主机,并以全屏 WebView 承载 Harness 网页,源码位于 `src-native/`。++- Android APK 可在 [Releases](https://github.com/dsh-tauri/deepseek-harness-desktop/releases) 页面下载,资产名形如 `Deepseek.Harness.Android_x.x.x.apk`,版本跟随桌面端。+- **iOS 尚未发布**,当前只有 Android 构建与发版流程。+- 该移动端**仅在官方未推出移动端服务期间维护**,属于过渡方案。+- 开发命令(`pnpm dev:native`、`pnpm android`、`pnpm test:native`、`pnpm typecheck:native` 等)与发现、连接、持久化、发版约定见[移动端规范](docs/specs/native.md)。+## 运行方式Windows 启动失败时会通过原生对话框显示具体错误。若出现 `STARTUP_LOW_INTEGRITY`:diff --git a/app.config.js b/app.config.jsnew file mode 100644index 00000000..ee73be10--- /dev/null+++ b/app.config.js@@ -0,0 +1,15 @@+import { readFileSync } from 'node:fs'+import { fileURLToPath } from 'node:url'++// 本仓库根 package.json 是 `"type": "module"`,动态配置必须以 ESM 导出。+const rootDir = fileURLToPath(new URL('.', import.meta.url))++export default function appConfig({ config }) {+ return {+ ...config,+ extra: {+ ...config.extra,+ thirdPartyNotices: readFileSync(`${rootDir}THIRD_PARTY_NOTICES.md`, 'utf8'),+ },+ }+}diff --git a/app.json b/app.jsonnew file mode 100644index 00000000..f127ef44--- /dev/null+++ b/app.json@@ -0,0 +1,101 @@+{+ "expo": {+ "name": "DSH Mobile",+ "slug": "dsh-bridge",+ "version": "0.23.1",+ "scheme": "dshbridge",+ "orientation": "portrait",+ "userInterfaceStyle": "automatic",+ "icon": "./assets/native/icon.png",+ "android": {+ "package": "com.dshtauri.dshbridge",+ "versionCode": 21005,+ "adaptiveIcon": {+ "foregroundImage": "./assets/native/adaptive-icon.png",+ "backgroundColor": "#ffffff"+ },+ "permissions": [+ "CAMERA",+ "POST_NOTIFICATIONS",+ "ACCESS_NETWORK_STATE",+ "ACCESS_WIFI_STATE"+ ]+ },+ "ios": {+ "bundleIdentifier": "com.dshtauri.dshbridge",+ "supportsTablet": true,+ "buildNumber": "1",+ "config": {+ "usesNonExemptEncryption": false+ },+ "infoPlist": {+ "NSLocalNetworkUsageDescription": "DSH Mobile 使用本地网络发现并连接您电脑上的 DSH 服务。",+ "UISupportedInterfaceOrientations~ipad": [+ "UIInterfaceOrientationPortrait",+ "UIInterfaceOrientationPortraitUpsideDown",+ "UIInterfaceOrientationLandscapeLeft",+ "UIInterfaceOrientationLandscapeRight"+ ]+ }+ },+ "experiments": {+ "typedRoutes": true,+ "reactCompiler": true+ },+ "plugins": [+ [+ "expo-router",+ {+ "root": "src-native/app"+ }+ ],+ "expo-font",+ [+ "expo-splash-screen",+ {+ "image": "./assets/native/splash-icon.png",+ "imageWidth": 128,+ "backgroundColor": "#ffffff",+ "dark": {+ "backgroundColor": "#151517"+ }+ }+ ],+ [+ "expo-camera",+ {+ "cameraPermission": "允许 DSH Mobile 使用相机扫描连接二维码。",+ "microphonePermission": false,+ "recordAudioAndroid": false+ }+ ],+ [+ "expo-notifications",+ {+ "icon": "./assets/native/notification-icon.png",+ "color": "#151517",+ "mode": "production"+ }+ ],+ [+ "expo-secure-store",+ {+ "faceIDPermission": false+ }+ ],+ [+ "expo-build-properties",+ {+ "android": {+ "usesCleartextTraffic": true,+ "buildArchs": ["arm64-v8a"],+ "enableMinifyInReleaseBuilds": true,+ "enableShrinkResourcesInReleaseBuilds": true,+ "enableBundleCompression": true,+ "useLegacyPackaging": true+ }+ }+ ]+ ]+ }+}diff --git a/assets/native/adaptive-icon.png b/assets/native/adaptive-icon.pngnew file mode 100644index 00000000..ff8e9b0aBinary files /dev/null and b/assets/native/adaptive-icon.png differdiff --git a/assets/native/icon.png b/assets/native/icon.pngnew file mode 100644index 00000000..8caef8a8Binary files /dev/null and b/assets/native/icon.png differdiff --git a/assets/native/notification-icon.png b/assets/native/notification-icon.pngnew file mode 100644index 00000000..3ca61021Binary files /dev/null and b/assets/native/notification-icon.png differdiff --git a/assets/native/splash-icon.png b/assets/native/splash-icon.pngnew file mode 100644index 00000000..5dd483c7Binary files /dev/null and b/assets/native/splash-icon.png differdiff --git a/bump.config.ts b/bump.config.tsindex 5ee8b69c..6f4890de 100644--- a/bump.config.ts+++ b/bump.config.ts@@ -7,5 +7,6 @@ export default defineConfig({'src-tauri/Cargo.toml','src-tauri/Cargo.lock','src-tauri/tauri.conf.json',+ 'app.json',],})diff --git a/docs/specs/native.md b/docs/specs/native.mdnew file mode 100644index 00000000..d9ccc76c--- /dev/null+++ b/docs/specs/native.md@@ -0,0 +1,198 @@+# DeepSeek Harness 移动端(DSH Mobile)规范++> **定位**:移动端是与桌面端同仓维护的 Expo / React Native 子工程,用于在局域网内发现 DSH 主机并以全屏 WebView 承载 Harness 网页。它不替代桌面端,只在**官方未推出移动端服务期间**维护。+> **根目录**:`src-native/` 为源码根;Expo / Metro / 类型 / 测试配置位于仓库根目录,与桌面端(`src/`、`src-tauri/`)共用同一 `package.json`。++---++## 1. 技术栈与常用命令 (Tech Stack & Commands)++* **运行时**:Expo SDK 57 / React Native 0.86.3 / React 19+* **路由**:`expo-router`(文件路由,根为 `src-native/app`)+* **UI**:HeroUI Native(`heroui-native`)+ Uniwind(Tailwind 语法,CSS 入口 `src-native/global.css`)+* **状态**:`valtio-define`(客户端状态)+ `@tanstack/react-query`(服务端状态,见 §5)+* **开发命令**:+```bash+pnpm install # 仓库根安装(移动端依赖使用 catalog:native)++pnpm dev:native # expo start --dev-client+pnpm android # expo run:android(需本地 Android SDK / JDK 17)+pnpm build:native # expo export --platform android --output-dir .temp/native-android-export+pnpm prebuild:native # expo prebuild --platform android --no-install+pnpm test:native # vitest run --config vitest.native.config.ts+pnpm typecheck:native # tsc --project tsconfig.native.json --noEmit+```++* 路径别名 `@/*` 指向 `src-native/*`,同时配置于 `tsconfig.native.json` 与 `vitest.native.config.ts`,并由 `metro.config.js` 自定义解析器兜底(见 §2)。+* `pnpm build:native` 只导出 Android JS / Hermes bundle(产物在 `.temp/native-android-export`),`pnpm prebuild:native` 只生成原生工程(`android/`),二者都**不**产出 APK。++---++## 2. 配置文件与路径映射 (Config & Path Mapping)++| 文件 | 作用 |+| --- | --- |+| `app.json` | Expo 静态配置:应用名 `DSH Mobile`、slug `dsh-bridge`、`expo.version`、Android 包名 `com.dshtauri.dshbridge`、`versionCode`、plugins、权限 |+| `app.config.js` | Expo 动态配置(ESM):把 `THIRD_PARTY_NOTICES.md` 全文注入 `extra.thirdPartyNotices` |+| `metro.config.js` | Metro 配置:`expo/metro-config.js` 全扩展名导入、`withUniwindConfig` 接入 CSS 入口、自定义 `resolver.resolveRequest` 钉住 `@/x`、`blockList` 屏蔽 `src-tauri` / `source` / `dist` 等大目录 |+| `src-native/entry.ts` | 移动端应用入口(只 `import 'expo-router/entry'`),由 `package.json` 的 `"main"` 指向 |+| `tsconfig.native.json` | 移动端类型检查工程,`extends: expo/tsconfig.base`,开启 `strict` 与 `noUncheckedIndexedAccess` |+| `vitest.native.config.ts` | 移动端测试工程,`include: ['src-native/**/*.test.{ts,tsx}']`,`environment: 'node'` |+| `assets/native/` | 图标、自适应图标、启动图与通知图标(`icon.png` / `adaptive-icon.png` / `splash-icon.png` / `notification-icon.png`) |++* **路由根不是默认的 `src/app`**,由 `app.json` 的 `plugins` 显式指定:+```json+["expo-router", { "root": "src-native/app" }]+```+* `package.json` 的 `"main"` 是 `./src-native/entry.ts`(**不是** `expo-router/entry`):pnpm 符号链接下 Expo 会把入口解析成 `node_modules/expo-router/entry` 这类工程内相对路径,Metro 解析不到;改用工程内真实文件,再由它按包名引入官方 entry。scheme 为 `dshbridge`。+* `metro.config.js` 必须写完整的 `expo/metro-config.js`:仓库根 `package.json` 是 `"type": "module"`,Node 的 ESM 解析不做扩展名补齐,而 `expo` 包没有 `exports` 字段。+* 工程根 `tsconfig.json` 是桌面端配置(`"@/*": ["src/*"]`),而 Expo CLI 的 tsconfig paths 解析器读的正是工程根 tsconfig ⇒ native 的 `@/x` 会被错误解析到 `src/x`(同名模块还会静默串味)。因此 `metro.config.js` 在用户解析器里先行短路,把 `@/x` 钉到 `src-native/x`,与 `tsconfig.native.json` 的 paths 一致。+* `app.json` 的 `expo.version` **跟随桌面端版本**,Android `versionCode` 与之同步递增(由 §8.4 的 bumpp 补丁写入)。+* `experiments` 开启 `typedRoutes` 与 `reactCompiler`,因此移动端同样**禁止**手写 `useCallback` / `useMemo`。++---++## 3. 目录结构 (Directory Layout)++```+src-native/+├── app/ # expo-router 路由:_layout.tsx / index.tsx / scan.tsx+├── apis/ # HTTP 访问层:getAuthStatus / getManifest+├── components/ # 品牌与装饰组件(鲸鱼、字标、状态点、脉冲动画等)+├── config/ # 常量、React Query client 与 query key+├── hooks/ # 原生能力封装(通知、应用状态、主机健康轮询)+├── i18n/ # i18next 实例、语言检测与静态语言资源+├── services/ # 主机探测(probe-bridge)与候选扫描(scan-candidates)+├── store/ # valtio-define 状态模块(modules/connection)+├── styles/ # 主题变量(variables.css)+├── test/ # 配置级测试+├── ui/ # 页面级视图与 WebView 容器+├── utils/ # 协议解析、候选生成、WebView 桥接、通知策略+├── entry.ts # 应用入口(见 §2)+├── env.d.ts # Expo / Uniwind 类型入口+└── global.css # Uniwind 样式入口+```++* 路由测试与生产路由分离:路由级测试放在 `src-native/ui/`,不写进 `src-native/app/`,避免 Expo Router 把测试文件当作路由。++### 3.1 i18n++* `i18next` + `react-i18next` + `expo-localization`;`src-native/i18n/index.ts` 导出与应用同寿的 `i18n` 实例,非 React 模块(store、通知处理器)直接 `i18n.t('connection.xxx')`。+* 语言资源静态打包进 bundle:`src-native/i18n/locales/zh-CN.json` 与 `en-US.json`,扁平 dot-notation key,并关闭 `keySeparator` / `nsSeparator`(与桌面端 `src/i18n` 约定一致);`initAsync: false` 保证模块作用域内 `i18n.t` 立即可用。+* `src-native/i18n/index.detector.ts` 是**同步**语言检测:`getLocales()[0].languageTag` 前缀 `zh` → `zh-CN`,否则 `en-US`。+* **不持久化语言、没有语言切换入口**:语言唯一来源是设备区域设置。+* 文案禁止硬编码在组件里,key 同步维护两个 locale 文件。++### 3.2 apis++* `src-native/apis/index.types.ts` 是宿主 HTTP 契约的类型 SSOT(`AuthStatus`、`BridgeManifest`、路径参数类型)。+* `src-native/apis/index.ts` 提供 `getAuthStatus` / `getManifest`:内部 `fetch` + 校验,非 2xx、响应体不合法或校验失败一律返回 `null`(含义是「这个 origin 不是 DSH Mobile 宿主」)。+* `src-native/utils/bridge-protocol.ts` 以 **type-only** 方式引用这些类型,避免协议工具与访问层耦合。++---++## 4. 启动与连接流程 (Startup & Connection)++* **首次进入**(无成功连接历史):只展示连接方式选择——「自动扫描局域网」「扫码连接」「最近连接」,**不**自动连接、**不**隐式扫描。+* **再次进入**(历史中有主机):只探测历史主机并自动连接可用项,检测期文案为「寻找可用连接」;全部不可用时停在连接方式选择,**不**退化为局域网扫描。+* **主动发现**由用户操作触发:点击「自动扫描局域网」,或断开连接后紧接的那轮扫描。+* 探测成功由可信 DSH 文档就绪消息确认,不以原生 `onLoad` 或 HTTP 200 判定。+* 超时与预算集中在 `src-native/config/constants.ts`:默认端口 `3088` / `3080`、并发 40、单次探测 600 ms、历史探测 3 s、整体扫描预算 20 s、前台健康检查间隔 15 s。+* 服务识别走上游公开的 `/__dsh_bridge__/auth-status`,旧响应缺少身份字段时再校验 `/manifest.webmanifest`;不把任意 HTML 200 当作 DSH 服务。+* 探测与扫描拆成两个模块:`src-native/services/probe-bridge.ts` 的 `probeBridge(address, signal, timeoutMs?)` 探测单个地址(超时、网络错误、非 2xx、响应体不合法一律返回 `null`),`src-native/services/scan-candidates.ts` 的 `scanCandidates(candidates, { signal, concurrency, timeoutMs, budgetMs, onFound })` 以有界并发遍历候选地址并受总预算约束(参数非法直接抛 `RangeError`)。+* 断开会清空当前连接并保留历史,紧接着的扫描跳过刚断开的精确 origin。++---++## 5. 持久化与凭据 (State & Credentials)++* **连接元数据**:valtio-define 持久化插件 + `@react-native-async-storage/async-storage`,存储键 `dsh-bridge/connections`,保存版本化快照(历史记录、引导标记等)。+* **访问令牌**:**只**存 `expo-secure-store`,按 origin 派生的键名逐条保存;AsyncStorage 中不出现令牌。+* 快照解析失败、令牌读写失败或存储不可用时,不静默丢弃:降级为空历史并给出「无法读取或保存连接记录」提示。+* 历史最多保留 20 条,抽屉只展示最近 5 条;未被保留的 origin 对应令牌会被删除。++### 5.1 状态分层++* **客户端状态**:`valtio-define` 单例 store,`src-native/store/modules/connection/index.ts` 只导出唯一实例 `connection`(**没有** `createConnectionStore()` 工厂)。+* **服务端状态**:`@tanstack/react-query`。`src-native/config/client.ts` 建 `queryClient`(`queries: { retry: false }`——局域网直连没有瞬时抖动的重试价值),并用 `focusManager.setEventListener` 把 RN `AppState` 接到查询焦点:退到后台即失焦,配合 `refetchIntervalInBackground: false` 暂停轮询,回前台立即重取活跃查询。`src-native/config/query-keys.ts` 注册 key(`hostsHealth: ['hosts_health']`,与桌面端 `src/config/query-keys.ts` 同为单元素 snake_case 数组)。+* `src-native/hooks/use-hosts-health.ts` 用 `useQuery({ queryKey: queryKeys.hostsHealth, enabled: hydrated, refetchInterval: HEALTH_INTERVAL_MS, refetchIntervalInBackground: false })` 轮询已保存主机;查询函数显式返回 `null`(React Query 对 `undefined` 结果告警),手动刷新按钮仍直接调用 `refreshHealth()`。+* `@reause/core` 只承担副作用 / DOM 类逻辑,例如 `src-native/ui/webview.tsx` 用 `useWhenever(documentReady && !state.loadError && appState === 'active', …)` 触发通知授权。++### 5.2 持久化实现++* 连接元数据由 `valtio-define/plugins/persist` 落盘:`src-native/store/modules/connection/index.ts` 内的 `connectionStorage` 适配 `@react-native-async-storage/async-storage`;store 上声明 `persist: { key: 'dsh-bridge/connections', storage: connectionStorage, paths: ['version', 'history', 'guidedHosts'] }`,文件末尾 `connection.use(persist({ hydrate: false }))` 关闭自动水合,改由 `restoreConnections()` 手动 `$persist.rehydrate()`(保证「令牌读完」才算恢复完成)。+* 磁盘载荷与迁移前**逐字节兼容**:`{ version: 1, history, guidedHosts }`。适配器在读写两侧都做归一化(版本校验、按 id 去重取最新、按历史上限截断),并做**负载去重**:`persistedPayload` 记录最近一次已知落盘内容,载荷不变就不写盘——插件会在**每次** state 变更后调用 `setItem`,瞬时 UI 状态(notice / drawerOpen / health)不应产生写盘。+* 令牌与快照解耦:`src-native/store/modules/connection/storage.ts` 的 `restoreConnections()` = `$persist.rehydrate()` → 逐条按 origin 派生键读 SecureStore → `markHydrated(tokens)`;`bindConnectionPersistence()` 只订阅 state 同步令牌(新增写、未被保留的删,串行队列 + 按 payload 去重)。++---++## 6. 网络与安全边界 (Network & Security)++* 局域网 HTTP 通过 `expo-build-properties` 的 `usesCleartextTraffic: true` 支持;HTTP 不提供传输保密性,仅用于可信局域网,公网优先 HTTPS。+* 自动发现基于当前 IPv4 推导 `/24` 网段,不保证跨网段、VPN、访客 Wi-Fi 隔离或非默认端口;此时改用桌面端 / Bridge 生成的二维码,或在 `EXTRA_SCAN_PORTS` 追加端口。+* 通知与 WebView 消息入口校验类型白名单、精确 scheme / host / port origin、原生事件 URL 与每个 WebView 的随机 nonce;外站顶层链接交由外部浏览器打开。+* 密码登录保留在 WebView 内由 cookie jar 管理,**不**通过 RN `fetch` 登录。+* 上游没有独立的远程推送端点:系统挂起、进程被杀或关闭 App 后**不保证**继续收到新任务通知。++---++## 7. 测试与类型检查 (Tests & Typecheck)++| 检查 | 命令 |+| --- | --- |+| 单元测试 | `pnpm test:native` |+| 类型检查 | `pnpm typecheck:native` |+| Android bundle 导出 | `pnpm build:native` |+| Android 原生工程生成 | `pnpm prebuild:native` |++* 移动端测试使用独立 Vitest 工程(`vitest.native.config.ts`),不进入桌面端的 `unit` / `plugin` / `desktop` project。+* store 是**进程级单例**,因此测试必须显式复位共享状态(顺序固定):`connection.$persist.meta.hydrated = false` → `connection.$persist.meta.mounted = false` → `connection.$patch(createConnectionState())` → `resetConnectionStorageCache()` → `vi.clearAllMocks()`。其中 `createConnectionState()` 供 `$patch` 复位,`resetConnectionStorageCache()` 只复位适配器的去重缓存(`keep:test`,生产不得调用)。+* 任何 import store 或 i18n 的用例都要 mock `expo-localization`(node 环境下真实 import 会崩在 `expo-modules-core`)与 `@react-native-async-storage/async-storage`;断言用 `i18n.t('key')` 而不是硬编码文案。+* 测试数量、变异测试、bundle 校验值与真机验收结论记录在迁移前的验证记录中,**不作为当前事实引用**;本轮迁移后的结果见源码与 CI。+* `expo export` / `expo prebuild` 成功**不等同于** APK 或真机验收。+* CNG(Continuous Native Generation)模式下 `android/`、`ios/`、`.expo/` 不入库。++---++## 8. Android 构建与发版 (Android Build & Release)++### 8.1 三个 workflow++| Workflow | `name` | 触发 | 职责 |+| --- | --- | --- | --- |+| `.github/workflows/release-native.yml` | `Release Android APK (Native)` | 桌面端 `Build & Release` 完成(`workflow_run`)+ 手动 `workflow_dispatch`(输入 `tag`) | prepare → build → publish:构建 release APK,并把资产上传到**已存在的**GitHub Release |+| `.github/workflows/build-android.yml` | `Android Native Build` | push `main`(按 `src-native/**`、`app.json`、`package.json` 等 paths 过滤)+ 手动 | 常规构建,只上传 Actions artifact `android-apk-${VERSION}`(retention 14),**不碰**Release |+| `.github/workflows/build-android-test.yml` | `Build Android Test` | 仅手动 `workflow_dispatch` | 复用 `build-android.yml`,产出内置 JS bundle、可脱离 Metro 运行的 release APK,artifact `android-apk-${VERSION}`(retention 14) |++* **发版只由桌面端 Release 驱动**:`release-native.yml` 只执行 `gh release upload --clobber`,**从不** create / edit Release——`release.yml` 的 finalize 是 Release 的单一 writer。该 workflow 只保留 `types: [completed]`,并在 job 级校验 `conclusion == 'success'` 与「触发运行来自本仓库」。+* `build-android-test.yml` **不跟随 CI 自动触发**(与 build-test.yml 同样只保留 `workflow_dispatch`),避免 Android SDK / NDK / Gradle 全量编译挤占 PR 队列;需要验证 native 可编译时手动触发即可。+* `build-android-test.yml` 不传签名 secret 给复用工作流,因此 release APK 使用开发证书;仍检查 16 KB 页对齐、签名、内置非空 JS bundle 与非 debuggable 标记,不依赖 Metro。++### 8.2 版本与资产名++* 三个 workflow 都从 `app.json` 的 `expo.version` 读取版本,并断言它等于 `package.json` 的 `version`,不一致直接 `::error::` 失败。+* 三个 workflow 的资产名均为 `Deepseek.Harness.Android_<version>.apk`。版本跟随桌面端(见 §8.4)。+* 发布资产同时包含 `SHA256SUMS.txt` 与 `THIRD_PARTY_NOTICES.md`;`app.config.js` 注入的声明会在签名校验步骤里与仓库内文件比对,缺全文即失败。+* **只有提交了 `app.json` 的 tag 才能发版**:prepare 用 `git cat-file -e "${tag_commit}:app.json"` 守卫,早于本次迁移、不含 `app.json` 的历史 tag(如 `v0.21.0`)会被正确跳过;手动指定 tag 时用 `::error::`,`workflow_run` 触发时用 `::warning::` 跳过。+* 手动触发要求 dispatch 的 ref 就是 tag 指向的提交;`release.yml` 的手动试跑(`test-<ref>-<run>` 预发布)不指向其构建提交,因此不会触发 Android 发版。++### 8.3 签名 secrets++* 需要 `ANDROID_KEYSTORE_BASE64`、`ANDROID_KEYSTORE_PASSWORD`、`ANDROID_KEY_ALIAS`、`ANDROID_KEY_PASSWORD`(与迁移前的移动端仓库同名)。+* **四项全有** → 用正式 key 重新签名;**四项全无** → 使用 Android 开发证书,并在日志与 Step Summary 里 `::warning::` 提示(不改变 Release 的 draft / prerelease 状态,那是 `release.yml` finalize 的职责);**部分配置** → `::error::` 并失败。+* 当前仓库**尚未**添加这四个 secret。++### 8.4 构建环境与其它约定++* 远端构建环境:JDK 17 + Android SDK(`android-36` / `build-tools 36.0.0` / NDK / CMake);`pnpm run prebuild:native` 生成原生工程后由 Gradle 编译,无需本地安装 SDK。+* `app.json` 被列入 `bump.config.ts` 的 `files`,由 `patches/bumpp.patch` 增补的 `app.json` 分支在 bump 流程中同步:写入 `expo.version`,并把 `expo.android.versionCode` 递增 1(Android 要求 versionCode 严格递增),因此 `app.json` 会和 `package.json` 一起进入 release commit,不需要 `execute` 脚本或 `all`。+* 本仓库根依赖由共享 catalog 固定,`react` / `react-dom` / `typescript` 与 Expo 57 期望版本不一致,`expo install --check` 在本机与 CI 上必然非零退出,因此**不**把它当门禁;原生兼容性以 `prebuild` + Gradle 编译为准。+* **iOS 尚未发布**,`bundleIdentifier` 已配置为 `com.dshtauri.dshbridge`,但无构建与发布流程。++---++## 9. 与桌面端的关系 (Relationship to Desktop)++* 移动端是**只读承载 + 连接管理**层:UI 主体仍是桌面端提供的 Harness 网页,移动端负责发现、鉴权、WebView 容器与原生通知。+* 桌面端与移动端各自独立构建:移动端改动不进入 `pnpm build` / `tauri build`,桌面端改动也不进入 `pnpm build:native`。+* 两者共享仓库根 `package.json` 与依赖 catalog(移动端依赖集中在 `catalog:native`),因此依赖升级需同时确认两端可构建。diff --git a/eas.json b/eas.jsonnew file mode 100644index 00000000..54cb79eb--- /dev/null+++ b/eas.json@@ -0,0 +1,22 @@+{+ "$schema": "https://expo.dev/eas-json/schema.json",+ "cli": {+ "version": ">= 16.18.0",+ "appVersionSource": "remote"+ },+ "build": {+ "development": {+ "developmentClient": true,+ "distribution": "internal"+ },+ "preview": {+ "distribution": "internal"+ },+ "production": {+ "autoIncrement": true+ }+ },+ "submit": {+ "production": {}+ }+}diff --git a/eslint.config.mjs b/eslint.config.mjsindex 5ea88c5c..e9f46069 100644--- a/eslint.config.mjs+++ b/eslint.config.mjs@@ -26,6 +26,9 @@ export default antfu({// 插件 Tailwind 产物:由 packages/dsh-tauri-ui/scripts/taiwindcss.ts 生成,转义后的选择器与体积// 都不适合本仓 lint 规约'packages/dsh-tauri-ui/src/client/styles/index.ts',+ // uniwind 产物:由 withUniwindConfig 的 dtsFile 生成(4 空格缩进 + 顶部「勿手改」声明),+ // 每次 metro 启动都会重写,手改会被覆盖,故不参与本仓 lint 规约+ 'src-native/uniwind-types.d.ts',],}, {// 插件包是库包而非应用壳:client 侧文件按 host/client 双面设计,diff --git a/metro.config.js b/metro.config.jsnew file mode 100644index 00000000..9a4a22b3--- /dev/null+++ b/metro.config.js@@ -0,0 +1,48 @@+import path from 'node:path'+import process from 'node:process'+import { fileURLToPath } from 'node:url'+// 根 package.json 是 `"type": "module"`,Node 的 ESM 解析不做扩展名补齐,+// 而 `expo` 包没有 `exports` 字段 ⇒ 必须写完整的 `expo/metro-config.js`(CJS 入口,命名导出经 interop 可用)。+import { getDefaultConfig } from 'expo/metro-config.js'+import { withUniwindConfig } from 'uniwind/metro'++// 本仓库根 package.json 是 `"type": "module"`,metro-config 会用 import() 加载本文件。+// 注意用 path.dirname(fileURLToPath(...)) 取目录:`new URL('.', …)` 转出来的路径带结尾分隔符,+// 某些库(uniwind/metro 等)对它做 path.dirname 会落到仓库的上一级。+const rootDir = path.dirname(fileURLToPath(import.meta.url))++const config = withUniwindConfig(getDefaultConfig(rootDir), {+ cssEntryFile: './src-native/global.css',+ dtsFile: './src-native/uniwind-types.d.ts',+})++const escapeRegExp = value => value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')++// 仓库根的 `tsconfig.json` 是桌面端的配置,其中 `"@/*": ["src/*"]`;而 Expo CLI 的 tsconfig paths+// 解析器(@expo/cli …/createTypescriptResolver.js)读的正是工程根的 tsconfig.json ⇒ native 代码里的+// `@/x` 会被错解析到桌面端 `src/x`(`@/config/client` 两侧同名时更会静默串味,`@/hooks/use-hosts-health`+// 则直接解析失败)。这里在用户解析器里先行短路,把 `@/x` 钉到 `src-native/x`(与 tsconfig.native.json 的+// paths 一致);用户解析器先于 Expo 内置解析器执行,未命中的模块仍按原链条继续解析。+const upstreamResolveRequest = config.resolver.resolveRequest+config.resolver.resolveRequest = (context, moduleName, platform) => {+ const resolveRequest = upstreamResolveRequest ?? context.resolveRequest+ if (moduleName === '@' || moduleName.startsWith('@/')) {+ return resolveRequest(context, path.join(rootDir, 'src-native', moduleName.slice(2)), platform)+ }+ return resolveRequest(context, moduleName, platform)+}++// 仓库根同时存在体积很大的非移动端目录(内核源码、worktree、构建产物);+// 只屏蔽工程根下的同名目录,避免误伤 node_modules 内的 dist。+const blockedRootDirs = ['.git', '.temp', '.tmp', '.worktrees', 'source', 'src-tauri', 'dist']+config.resolver.blockList = [+ ...[config.resolver.blockList].flat().filter(Boolean),+ ...blockedRootDirs.map(dir => new RegExp(`^${escapeRegExp(path.join(rootDir, dir))}[\\\\/]`)),+]++if (process.platform === 'win32') {+ // 本机 Windows 上并行 worker 太多会拖慢/耗尽内存;缓存目录沿用 Metro 默认(os.tmpdir)。+ config.maxWorkers = 2+}++export default configdiff --git a/package.json b/package.jsonindex 1db3fc79..a4bc7653 100644--- a/package.json+++ b/package.json@@ -5,6 +5,7 @@"private": true,"packageManager": "[email protected]","description": "Desktop application for DeepSeek Harness (dsh) — one-click local install and launch, no Node.js setup required.",+ "main": "./src-native/entry.ts","scripts": {"dev": "vite","dev:desktop": "pnpm dev:plugins & tauri dev",@@ -25,7 +26,16 @@"lint": "eslint","lint:fix": "eslint . --fix","typecheck": "tsc --project tsconfig.typecheck.json --noEmit",- "icons": "tauri icon public/deepseek-harness-desktop-tauri.svg --output src-tauri/icons && tauri icon public/deepseek-harness-desktop-tauri-nightly.svg --output src-tauri/icons/nightly --ios-color \"#000000\" && tsx scripts/rebuild-macos-icon.ts"+ "icons": "tauri icon public/deepseek-harness-desktop-tauri.svg --output src-tauri/icons && tauri icon public/deepseek-harness-desktop-tauri-nightly.svg --output src-tauri/icons/nightly --ios-color \"#000000\" && tsx scripts/rebuild-macos-icon.ts",+ "dev:native": "expo start --dev-client",+ "android": "expo run:android",+ "ios": "expo run:ios",+ "build:native": "expo export --platform android --output-dir .temp/native-android-export",+ "build:ios": "expo export --platform ios --output-dir .temp/native-ios-export",+ "prebuild:native": "expo prebuild --platform android --no-install",+ "prebuild:ios": "expo prebuild --platform ios --no-install",+ "test:native": "vitest run --config vitest.native.config.ts",+ "typecheck:native": "tsc --project tsconfig.native.json --noEmit"},"dependencies": {"@choochmeque/tauri-plugin-notifications-api": "catalog:",@@ -34,6 +44,7 @@"@heroui/react": "catalog:runtime","@heroui/styles": "catalog:runtime","@overlastic/react": "catalog:runtime",+ "@react-native-async-storage/async-storage": "catalog:native","@reause/core": "catalog:runtime","@tanstack/react-query": "catalog:runtime","@tauri-apps/api": "catalog:tauri",@@ -41,13 +52,44 @@"@tauri-apps/plugin-os": "catalog:","@tauri-apps/plugin-store": "catalog:","dsh-pet-component": "catalog:runtime",+ "expo": "catalog:native",+ "expo-blur": "catalog:native",+ "expo-build-properties": "catalog:native",+ "expo-camera": "catalog:native",+ "expo-constants": "catalog:native",+ "expo-crypto": "catalog:native",+ "expo-dev-client": "catalog:native",+ "expo-font": "catalog:native",+ "expo-linking": "catalog:native",+ "expo-localization": "catalog:native",+ "expo-network": "catalog:native",+ "expo-notifications": "catalog:native",+ "expo-router": "catalog:native",+ "expo-secure-store": "catalog:native",+ "expo-splash-screen": "catalog:native",+ "expo-status-bar": "catalog:native",+ "expo-system-ui": "catalog:native",+ "heroui-native": "catalog:native","i18next": "catalog:runtime","react": "catalog:runtime","react-dom": "catalog:runtime","react-i18next": "catalog:runtime","react-if-lite": "catalog:runtime",+ "react-native": "catalog:native",+ "react-native-drawer-layout": "catalog:native",+ "react-native-gesture-handler": "catalog:native",+ "react-native-lucide": "catalog:",+ "react-native-reanimated": "catalog:native",+ "react-native-safe-area-context": "catalog:native",+ "react-native-screens": "catalog:native",+ "react-native-svg": "catalog:native",+ "react-native-webview": "catalog:native",+ "react-native-worklets": "catalog:native","semver": "catalog:runtime",+ "tailwind-merge": "catalog:native","tailwind-variants": "catalog:runtime",+ "tw-animate-css": "catalog:native",+ "uniwind": "catalog:native","unstorage": "catalog:utils","valtio-define": "catalog:runtime"},@@ -102,6 +144,7 @@"@types/node": "catalog:types","@types/react": "catalog:types","@types/react-dom": "catalog:types",+ "@types/react-test-renderer": "catalog:types","@types/semver": "catalog:types","@types/ssh2": "catalog:types","@vitejs/plugin-react": "catalog:build",@@ -123,6 +166,7 @@"playwright": "catalog:testing","postcss": "catalog:build","publint": "catalog:cli",+ "react-test-renderer": "catalog:native","shiki": "catalog:testing","simple-icons": "catalog:testing","ssh2": "catalog:utils",diff --git a/packages/dsh-tauri-mobile-ui/src/client/index.test.ts b/packages/dsh-tauri-mobile-ui/src/client/index.test.tsindex 5d188d61..796c4c23 100644--- a/packages/dsh-tauri-mobile-ui/src/client/index.test.ts+++ b/packages/dsh-tauri-mobile-ui/src/client/index.test.ts@@ -3,6 +3,7 @@ import { afterEach, expect, it, vi } from 'vitest'import { apply, inject, name } from './index'import { locale } from './locales'import { installBridgeConfig, registerBridgeConfig } from './register/bridge'+import { registerMobileKeyboard } from './register/keyboard'import { registerMobilePreferences } from './register/preferences'import { registerMobileSettings } from './register/settings'import { registerMobileSidebar } from './register/sidebar'@@ -17,6 +18,7 @@ vi.mock('./register/bridge', () => ({}),registerBridgeConfig: vi.fn(),}))+vi.mock('./register/keyboard', () => ({ registerMobileKeyboard: vi.fn() }))vi.mock('./register/preferences', () => ({ registerMobilePreferences: vi.fn() }))vi.mock('./register/sidebar', () => ({ registerMobileSidebar: vi.fn() }))vi.mock('./register/settings', () => ({ registerMobileSettings: vi.fn() }))@@ -38,6 +40,7 @@ it('assembles mobile-only effects and yields bridge page tweaks early', () => {[registerBridgeConfig, 'dsh-tauri-mobile-ui: bridge'],[locale.registerLocale, 'dsh-tauri-mobile-ui: locale'],[registerStyles, 'dsh-tauri-mobile-ui: styles'],+ [registerMobileKeyboard, 'dsh-tauri-mobile-ui: keyboard'],[registerMobilePreferences, 'dsh-tauri-mobile-ui: preferences'],[registerMobileSidebar, 'dsh-tauri-mobile-ui: sidebar'],[registerMobileSettings, 'dsh-tauri-mobile-ui: settings'],diff --git a/packages/dsh-tauri-mobile-ui/src/client/index.ts b/packages/dsh-tauri-mobile-ui/src/client/index.tsindex fb28d71b..c5a0bf30 100644--- a/packages/dsh-tauri-mobile-ui/src/client/index.ts+++ b/packages/dsh-tauri-mobile-ui/src/client/index.ts@@ -3,6 +3,7 @@ import type { ClientContext } from 'dsh-tauri/client'import { PLUGIN_ID } from '../shared/constants'import { locale } from './locales'import { installBridgeConfig, registerBridgeConfig } from './register/bridge'+import { registerMobileKeyboard } from './register/keyboard'import { registerMobilePreferences } from './register/preferences'import { registerMobileSettings } from './register/settings'import { registerMobileSidebar } from './register/sidebar'@@ -16,6 +17,7 @@ export function apply(ctx: ClientContext): void {ctx.effect(registerBridgeConfig, `${PLUGIN_ID}: bridge`)ctx.effect(locale.registerLocale, `${PLUGIN_ID}: locale`)ctx.effect(registerStyles, `${PLUGIN_ID}: styles`)+ ctx.effect(registerMobileKeyboard, `${PLUGIN_ID}: keyboard`)ctx.effect(registerMobilePreferences, `${PLUGIN_ID}: preferences`)ctx.effect(registerMobileSidebar, `${PLUGIN_ID}: sidebar`)ctx.effect(registerMobileSettings, `${PLUGIN_ID}: settings`)diff --git a/packages/dsh-tauri-mobile-ui/src/client/register/keyboard.test.ts b/packages/dsh-tauri-mobile-ui/src/client/register/keyboard.test.tsnew file mode 100644index 00000000..5429df10--- /dev/null+++ b/packages/dsh-tauri-mobile-ui/src/client/register/keyboard.test.ts@@ -0,0 +1,98 @@+// @vitest-environment jsdom+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'+import { createLifecycleController } from '../../../../dsh-tauri/src/client/controller'+import { registerMobileKeyboard } from './keyboard'++const device = vi.hoisted(() => ({ mobile: true }))+vi.mock('dsh-tauri/client', () => ({+ detectMobileDevice: () => device.mobile,+ defineRegister: (setup: (...args: unknown[]) => void) => setup,+}))++let controller: ReturnType<typeof createLifecycleController>+let editor: HTMLElement+const labels: Record<string, string> = { 'input.send': '发送消息', 'input.send.queue': '排队发送', 'input.send.steer': '插话发送' }++function touch(type: string, x: number, y: number, target: Element = document.querySelector('[data-conversation-scroll]')!) {+ const event = new Event(type, { bubbles: true, cancelable: true })+ Object.defineProperty(event, 'touches', { value: [{ identifier: 1, clientX: x, clientY: y }] })+ target.dispatchEvent(event)+ return event+}++beforeEach(() => {+ device.mobile = true+ document.body.innerHTML = '<div data-conversation-scroll><p>Message</p><div data-composer-seat><textarea></textarea><button aria-label="发送消息"><svg></svg></button></div></div><input id="setting">'+ editor = document.querySelector('textarea')!+ editor.focus()+ controller = createLifecycleController()+ const register = registerMobileKeyboard as unknown as (controller: unknown, ctx: unknown) => void+ register(controller, { locale: { bind: () => (key: string) => labels[key] ?? key } })+})++afterEach(() => {+ controller.dispose()+ document.body.innerHTML = ''+ vi.restoreAllMocks()+})++describe('mobile composer keyboard dismissal', () => {+ it.each(['发送消息', '排队发送', '插话发送'])('blurs the editor after the %s click handler without preventing submission', (label) => {+ const button = document.querySelector('button')!+ button.setAttribute('aria-label', label)+ const submit = vi.fn(() => expect(document.activeElement).toBe(editor))+ button.addEventListener('click', submit)+ const event = new MouseEvent('click', { bubbles: true, cancelable: true })+ button.querySelector('svg')!.dispatchEvent(event)+ expect(submit).toHaveBeenCalledOnce()+ expect(document.activeElement).not.toBe(editor)+ expect(event.defaultPrevented).toBe(false)+ })++ it('leaves disabled sends, stop actions and desktop input focused', () => {+ const button = document.querySelector('button')!+ button.disabled = true+ button.querySelector('svg')!.dispatchEvent(new MouseEvent('click', { bubbles: true }))+ expect(document.activeElement).toBe(editor)+ button.disabled = false+ button.setAttribute('aria-label', '停止')+ button.click()+ expect(document.activeElement).toBe(editor)+ button.setAttribute('aria-label', '发送消息')+ device.mobile = false+ button.click()+ expect(document.activeElement).toBe(editor)+ })++ it('dismisses on a vertical transcript swipe without consuming native scroll', () => {+ touch('touchstart', 100, 100)+ touch('touchmove', 101, 106)+ expect(document.activeElement).toBe(editor)+ expect(touch('touchmove', 102, 130).defaultPrevented).toBe(false)+ expect(document.activeElement).not.toBe(editor)+ })++ it('preserves focus for taps, horizontal gestures, programmatic scrolling and composer gestures', () => {+ touch('touchstart', 100, 100)+ touch('touchmove', 130, 102)+ touch('touchend', 130, 102)+ document.querySelector('[data-conversation-scroll]')!.dispatchEvent(new Event('scroll'))+ touch('touchstart', 100, 100, editor)+ touch('touchmove', 100, 140, editor)+ expect(document.activeElement).toBe(editor)+ })++ it('does not dismiss unrelated settings inputs or retain listeners after unload', () => {+ const setting = document.querySelector<HTMLInputElement>('#setting')!+ setting.focus()+ touch('touchstart', 100, 100)+ touch('touchmove', 100, 130)+ expect(document.activeElement).toBe(setting)+ editor.focus()+ controller.dispose()+ document.querySelector<HTMLButtonElement>('button')!.click()+ touch('touchstart', 100, 100)+ touch('touchmove', 100, 130)+ expect(document.activeElement).toBe(editor)+ })+})diff --git a/packages/dsh-tauri-mobile-ui/src/client/register/keyboard.ts b/packages/dsh-tauri-mobile-ui/src/client/register/keyboard.tsnew file mode 100644index 00000000..59fa9eb0--- /dev/null+++ b/packages/dsh-tauri-mobile-ui/src/client/register/keyboard.ts@@ -0,0 +1,52 @@+import type { ClientContext } from 'dsh-tauri/client'+import { defineRegister, detectMobileDevice } from 'dsh-tauri/client'++const COMPOSER = '[data-composer-seat], [data-slot="conversation.composer.bar"]'+const SCROLL = '[data-conversation-scroll], [data-slot="conversation.view"]'++export const registerMobileKeyboard = defineRegister<ClientContext>((controller, ctx) => {+ const t = ctx.locale.bind('conversation')+ let touch: { id: number, x: number, y: number } | undefined++ function dismissKeyboard() {+ const editor = document.activeElement+ if (detectMobileDevice() && editor instanceof HTMLElement && editor.closest(COMPOSER)+ && editor.matches('textarea, input, [contenteditable="true"]')) {+ editor.blur()+ }+ }++ controller.listen('click', (event) => {+ if (!(event.target instanceof Element))+ return+ const button = event.target.closest<HTMLButtonElement>('button')+ if (!button || button.disabled || button.getAttribute('aria-disabled') === 'true' || !button.closest(COMPOSER))+ return+ if ([t('input.send'), t('input.send.queue'), t('input.send.steer')].includes(button.getAttribute('aria-label') ?? ''))+ dismissKeyboard()+ })+ controller.listen('touchstart', (event) => {+ touch = undefined+ if (!detectMobileDevice() || event.touches.length !== 1 || !(event.target instanceof Element) || event.target.closest(COMPOSER) || !event.target.closest(SCROLL))+ return+ const point = event.touches[0]!+ touch = { id: point.identifier, x: point.clientX, y: point.clientY }+ }, { passive: true })+ controller.listen('touchmove', (event) => {+ if (!touch || event.touches.length !== 1)+ return+ const point = event.touches[0]!+ if (point.identifier !== touch.id)+ return+ const dy = Math.abs(point.clientY - touch.y)+ if (dy > 10 && dy > Math.abs(point.clientX - touch.x)) {+ dismissKeyboard()+ touch = undefined+ }+ }, { passive: true })+ function resetTouch() {+ touch = undefined+ }+ controller.listen('touchend', resetTouch, { passive: true })+ controller.listen('touchcancel', resetTouch, { passive: true })+})diff --git a/packages/dsh-tauri-mobile-ui/src/client/register/sidebar.test.tsx b/packages/dsh-tauri-mobile-ui/src/client/register/sidebar.test.tsxindex e2f577fb..6d24bd5d 100644--- a/packages/dsh-tauri-mobile-ui/src/client/register/sidebar.test.tsx+++ b/packages/dsh-tauri-mobile-ui/src/client/register/sidebar.test.tsx@@ -103,11 +103,11 @@ function renderOverlay(overlay: HTMLElement): void {render(<Component />, { container: overlay })}-function touch(target: Element, type: string, x: number, y: number, time: number, count = 1, cancelable = true): Event {- const event = new Event(type, { bubbles: true, cancelable })+function touch(target: Element, type: string, x: number, y: number, time: number): Event {+ const event = new Event(type, { bubbles: true, cancelable: true })const point = { identifier: 1, clientX: x, clientY: y }Object.defineProperties(event, {- touches: { value: type === 'touchend' || type === 'touchcancel' ? [] : Array.from({ length: count }, (_, index) => ({ ...point, identifier: index + 1 })) },+ touches: { value: type === 'touchend' || type === 'touchcancel' ? [] : [point] },changedTouches: { value: [point] },timeStamp: { value: time },})@@ -115,14 +115,14 @@ function touch(target: Element, type: string, x: number, y: number, time: numberreturn event}-function pointer(target: Element, type: string, x: number, y: number, time: number, pointerType = 'mouse', buttons = type === 'pointerup' ? 0 : 1): Event {+function pointer(target: Element, type: string, x: number, y: number, time: number): Event {const event = new Event(type, { bubbles: true, cancelable: true })Object.defineProperties(event, {pointerId: { value: 7 },- pointerType: { value: pointerType },+ pointerType: { value: 'mouse' },isPrimary: { value: true },button: { value: 0 },- buttons: { value: buttons },+ buttons: { value: type === 'pointerup' ? 0 : 1 },clientX: { value: x },clientY: { value: y },timeStamp: { value: time },@@ -165,7 +165,6 @@ beforeEach(() => {cleanup()document.documentElement.removeAttribute('data-dsh-mobile-sidebar')document.documentElement.removeAttribute('data-dsh-mobile-sidebar-open')- document.documentElement.removeAttribute('data-dsh-mobile-sidebar-dragging')document.body.innerHTML = ''Object.defineProperty(window, 'innerWidth', { configurable: true, value: 390, writable: true })Object.defineProperty(window, 'matchMedia', {@@ -214,6 +213,21 @@ describe('registerMobileSidebar', () => {expect(toggle.querySelector('path')?.getAttribute('d')).toBe(sidebarPath)})+ it.each(['Open sidebar', 'New Session'])('resets retained keyboard focus before pointer activation of %s', (name) => {+ const { overlay } = setupFrame()+ register()+ renderOverlay(overlay)+ const icon = screen.getByRole('button', { name })+ icon.focus()+ expect(document.activeElement).toBe(icon)+ fireEvent.pointerDown(icon)+ expect(document.activeElement).toBe(document.body)+ icon.focus()+ fireEvent.keyDown(icon, { key: 'ArrowRight' })+ expect(document.activeElement).toBe(icon)+ expect(icon.getAttribute('tabindex')).toBe('0')+ })+it('keeps navigation in the moving center while only drawer/main content becomes inert', () => {const { sidebar, center, main, overlay } = setupFrame()sidebar.setAttribute('aria-hidden', 'false')@@ -238,7 +252,7 @@ describe('registerMobileSidebar', () => {expect(main.getAttribute('aria-hidden')).toBe('true')expect(main.inert).toBe(true)expect(center.inert).toBe(false)- expect(document.documentElement.style.getPropertyValue('--dsh-mobile-sidebar-offset')).toBe('319px')+ expect(document.documentElement.style.getPropertyValue('--dsh-mobile-sidebar-width')).toBe('319px')expect(document.documentElement.style.getPropertyValue('--dsh-mobile-sidebar-shadow')).toBe('')expect(mocks.invokeParent).toHaveBeenCalledWith({ type: 'dsh://sidebar:collapsed', collapsed: false })@@ -258,192 +272,31 @@ describe('registerMobileSidebar', () => {expect(mocks.sessionListeners.size).toBe(0)})- it('closes with a touch swipe on the real shell-overlay shade', () => {- const { overlay } = setupFrame()+ it.each(['touch', 'pointer'])('leaves %s swipes to content without opening or closing the sidebar', (source) => {+ const { sidebar, main, overlay } = setupFrame()+ const row = document.createElement('button')+ row.textContent = 'Existing session'+ const select = vi.fn()+ row.addEventListener('click', select)+ sidebar.append(row)register()renderOverlay(overlay)- fireEvent.click(screen.getByRole('button', { name: 'Open sidebar' }))- const shade = overlay.querySelector<HTMLElement>('[data-dsh-mobile-sidebar-shade]')!-- touch(shade, 'touchstart', 365, 220, 100)- const move = touch(shade, 'touchmove', 175, 222, 200)- expect(move.defaultPrevented).toBe(true)- expect(document.documentElement.style.getPropertyValue('--dsh-mobile-sidebar-offset')).toBe('129px')- expect(document.documentElement.hasAttribute('data-dsh-mobile-sidebar-dragging')).toBe(true)- touch(shade, 'touchend', 145, 222, 240)-+ const send = source === 'touch' ? touch : pointer+ send(main, source === 'touch' ? 'touchstart' : 'pointerdown', 100, 200, 100)+ expect(send(main, `${source}move`, 300, 202, 300).defaultPrevented).toBe(false)+ send(main, source === 'touch' ? 'touchend' : 'pointerup', 320, 202, 400)expect(document.documentElement.hasAttribute('data-dsh-mobile-sidebar-open')).toBe(false)- expect(document.documentElement.style.getPropertyValue('--dsh-mobile-sidebar-offset')).toBe('0px')- expect(mocks.invokeParent).toHaveBeenLastCalledWith({ type: 'dsh://sidebar:collapsed', collapsed: true })- })-- it('opens by swiping main content instead of requiring a screen-edge start', () => {- const { main, overlay } = setupFrame()- register()- renderOverlay(overlay)- const content = main.querySelector<HTMLElement>('[data-conversation-scroll]')!-- touch(content, 'touchstart', 140, 300, 100)- const move = touch(content, 'touchmove', 300, 302, 300)- expect(move.defaultPrevented).toBe(true)- expect(document.documentElement.style.getPropertyValue('--dsh-mobile-sidebar-offset')).toBe('160px')- touch(content, 'touchend', 320, 302, 400)-- expect(document.documentElement.hasAttribute('data-dsh-mobile-sidebar-open')).toBe(true)- expect(document.documentElement.style.getPropertyValue('--dsh-mobile-sidebar-offset')).toBe('319px')- })-- it.each(['shade', 'center', 'frame'])('suppresses a swipe compatibility click retargeted to the %s without swallowing unrelated controls', (surface) => {- const { main, center, overlay } = setupFrame()- register()- renderOverlay(overlay)- const content = main.querySelector<HTMLElement>('[data-conversation-scroll]')!- const shade = overlay.querySelector<HTMLElement>('[data-dsh-mobile-sidebar-shade]')!- const frame = overlay.parentElement!- const target = surface === 'shade' ? shade : surface === 'center' ? center : frame- const onRetarget = vi.fn()- target.addEventListener('click', onRetarget)- touch(content, 'touchstart', 140, 300, 100)- touch(content, 'touchmove', 300, 302, 300)- touch(content, 'touchend', 330, 302, 400)- expect(document.documentElement.hasAttribute('data-dsh-mobile-sidebar-open')).toBe(true)- fireEvent.click(target)- expect(onRetarget).not.toHaveBeenCalled()+ expect(document.documentElement.style.getPropertyValue('--dsh-mobile-sidebar-width')).toBe('319px')+ fireEvent.click(screen.getByRole('button', { name: 'Open sidebar' }))+ send(row, source === 'touch' ? 'touchstart' : 'pointerdown', 220, 200, 500)+ expect(send(row, `${source}move`, 20, 202, 700).defaultPrevented).toBe(false)+ send(row, source === 'touch' ? 'touchend' : 'pointerup', 20, 202, 800)expect(document.documentElement.hasAttribute('data-dsh-mobile-sidebar-open')).toBe(true)- fireEvent.click(shade)- expect(document.documentElement.hasAttribute('data-dsh-mobile-sidebar-open')).toBe(false)- touch(content, 'touchstart', 140, 300, 500)- touch(content, 'touchmove', 300, 302, 700)- touch(content, 'touchend', 330, 302, 800)- fireEvent.click(document.querySelector('[data-dsh-mobile-sidebar-toggle]')!)- expect(document.documentElement.hasAttribute('data-dsh-mobile-sidebar-open')).toBe(false)- })-- it('keeps vertical scrolls, editable targets, and other overlays outside the drawer gesture', () => {- const { main, overlay } = setupFrame()- register()- renderOverlay(overlay)- const input = document.createElement('textarea')- main.append(input)- const otherOverlay = document.createElement('div')- overlay.append(otherOverlay)- for (const target of [input, otherOverlay]) {- touch(target, 'touchstart', 10, 300, 100)- expect(touch(target, 'touchmove', 250, 302, 300).defaultPrevented).toBe(false)- touch(target, 'touchend', 250, 302, 400)- expect(document.documentElement.style.getPropertyValue('--dsh-mobile-sidebar-offset')).toBe('0px')- }- touch(main, 'touchstart', 10, 300, 100)- expect(touch(main, 'touchmove', 15, 380, 300).defaultPrevented).toBe(false)- touch(main, 'touchend', 15, 380, 400)- expect(document.documentElement.hasAttribute('data-dsh-mobile-sidebar-open')).toBe(false)- })-- it('supports mouse/pen pointers on mobile without double-processing touch pointer streams', () => {- const { main, overlay } = setupFrame()- register()- renderOverlay(overlay)- pointer(main, 'pointerdown', 100, 200, 100, 'touch')- expect(pointer(main, 'pointermove', 300, 200, 200, 'touch').defaultPrevented).toBe(false)- expect(document.documentElement.style.getPropertyValue('--dsh-mobile-sidebar-offset')).toBe('0px')- pointer(main, 'pointerdown', 100, 200, 100)- expect(pointer(main, 'pointermove', 300, 200, 200).defaultPrevented).toBe(true)- touch(main, 'touchstart', 10, 200, 200)- touch(main, 'touchmove', 20, 200, 220)- expect(document.documentElement.style.getPropertyValue('--dsh-mobile-sidebar-offset')).toBe('200px')- pointer(main, 'pointerup', 320, 200, 240)- const shade = overlay.querySelector<HTMLElement>('[data-dsh-mobile-sidebar-shade]')!- pointer(shade, 'pointerdown', 360, 200, 300, 'pen')- expect(pointer(shade, 'pointermove', 140, 200, 400, 'pen').defaultPrevented).toBe(true)- pointer(shade, 'pointerup', 120, 200, 450, 'pen')- expect(document.documentElement.hasAttribute('data-dsh-mobile-sidebar-open')).toBe(false)- })-- it.each(['release', 'lost', 'buttons', 'dispose'])('captures only a claimed mouse drag and releases it on %s', (reason) => {- const { main, overlay } = setupFrame()- const frame = overlay.parentElement!- const capture = vi.fn()- const release = vi.fn()- let captured = false- Object.defineProperties(frame, {- setPointerCapture: { value: (id: number) => {- captured = true- capture(id)- } },- hasPointerCapture: { value: () => captured },- releasePointerCapture: { value: (id: number) => {- captured = false- release(id)- } },- })- const { dispose } = register()- renderOverlay(overlay)- pointer(main, 'pointerdown', 100, 200, 100)- expect(capture).not.toHaveBeenCalled()- expect(pointer(main, 'pointermove', 105, 200, 130).defaultPrevented).toBe(false)- expect(capture).not.toHaveBeenCalled()- pointer(main, 'pointermove', 200, 200, 300)- expect(capture).toHaveBeenCalledWith(7)- expect(document.documentElement.hasAttribute('data-dsh-mobile-sidebar-dragging')).toBe(true)- if (reason === 'release') {- pointer(frame, 'pointerup', 200, 200, 500)- }- else if (reason === 'lost') {- captured = false- pointer(frame, 'lostpointercapture', 200, 200, 500)- }- else if (reason === 'buttons') {- expect(pointer(frame, 'pointermove', 300, 200, 500, 'mouse', 0).defaultPrevented).toBe(false)- }- else {- act(() => dispose())- }- expect(document.documentElement.hasAttribute('data-dsh-mobile-sidebar-dragging')).toBe(false)+ expect(document.documentElement.style.getPropertyValue('--dsh-mobile-sidebar-width')).toBe('319px')+ fireEvent.click(row)+ expect(select).toHaveBeenCalledTimes(1)+ fireEvent.click(overlay.querySelector('[data-dsh-mobile-sidebar-shade]')!)expect(document.documentElement.hasAttribute('data-dsh-mobile-sidebar-open')).toBe(false)- if (reason === 'dispose') {- expect(document.documentElement.style.getPropertyValue('--dsh-mobile-sidebar-offset')).toBe('')- }- else {- expect(document.documentElement.style.getPropertyValue('--dsh-mobile-sidebar-offset')).toBe('0px')- }- const released = release.mock.calls.length- if (reason === 'lost') {- expect(released).toBe(0)- }- else {- expect(released).toBe(1)- expect(release).toHaveBeenCalledWith(7)- }- if (reason !== 'dispose') {- pointer(main, 'pointerdown', 100, 200, 600)- pointer(main, 'pointermove', 300, 200, 900)- pointer(frame, 'pointerup', 300, 200, 1200)- expect(document.documentElement.hasAttribute('data-dsh-mobile-sidebar-open')).toBe(true)- }- })-- it.each(['content', 'main', 'frame'])('cancels a claimed touch gesture when its %s is detached at the same viewport width', async (part) => {- const { main, overlay } = setupFrame()- register()- renderOverlay(overlay)- const content = main.querySelector<HTMLElement>('[data-conversation-scroll]')!- touch(content, 'touchstart', 100, 200, 100)- touch(content, 'touchmove', 260, 200, 300)- expect(document.documentElement.hasAttribute('data-dsh-mobile-sidebar-dragging')).toBe(true)- const original = part === 'content' ? content : part === 'main' ? main : overlay.parentElement!- await act(async () => {- const replacement = original.cloneNode(true) as HTMLElement- if (part === 'frame')- replacement.querySelector('[data-dsh-mobile-navbar-host]')?.remove()- original.replaceWith(replacement)- })- expect(document.documentElement.hasAttribute('data-dsh-mobile-sidebar-dragging')).toBe(false)- expect(document.documentElement.style.getPropertyValue('--dsh-mobile-sidebar-offset')).toBe('0px')- const replacement = document.querySelector('[data-conversation-scroll]')!- touch(replacement, 'touchstart', 100, 200, 400)- touch(replacement, 'touchmove', 300, 200, 700)- touch(replacement, 'touchend', 300, 200, 1000)- expect(document.documentElement.hasAttribute('data-dsh-mobile-sidebar-open')).toBe(true)})it('never toggles core preferences to refresh mobile ownership across the desktop breakpoint', async () => {@@ -467,71 +320,6 @@ describe('registerMobileSidebar', () => {expect(narrowExpanded).toBe(false)})- it.each(['cancel', 'multitouch', 'noncancelable', 'resize'])('cancels an in-progress swipe on %s', (reason) => {- const { main, overlay } = setupFrame()- register()- renderOverlay(overlay)- touch(main, 'touchstart', 100, 200, 100)- touch(main, 'touchmove', 260, 200, 200)- expect(document.documentElement.hasAttribute('data-dsh-mobile-sidebar-dragging')).toBe(true)- if (reason === 'cancel')- touch(main, 'touchcancel', 300, 200, 300)- else if (reason === 'multitouch')- touch(main, 'touchmove', 300, 200, 300, 2)- else if (reason === 'noncancelable')- touch(main, 'touchmove', 300, 200, 300, 1, false)- else- fireEvent(window, new Event('resize'))- touch(main, 'touchend', 360, 200, 400)- expect(document.documentElement.hasAttribute('data-dsh-mobile-sidebar-dragging')).toBe(false)- expect(document.documentElement.hasAttribute('data-dsh-mobile-sidebar-open')).toBe(false)- expect(document.documentElement.style.getPropertyValue('--dsh-mobile-sidebar-offset')).toBe('0px')- })-- it('preserves horizontal scrollers, selected text, and navbar controls', () => {- const { main, overlay } = setupFrame()- register()- renderOverlay(overlay)- const code = document.createElement('pre')- code.style.overflowX = 'auto'- Object.defineProperties(code, { scrollWidth: { value: 500 }, clientWidth: { value: 100 } })- main.append(code)- const toggle = screen.getByRole('button', { name: 'Open sidebar' })- for (const target of [code, toggle]) {- touch(target, 'touchstart', 100, 200, 100)- expect(touch(target, 'touchmove', 300, 200, 200).defaultPrevented).toBe(false)- touch(target, 'touchend', 320, 200, 300)- }- const selection = window.getSelection()!- vi.spyOn(selection, 'isCollapsed', 'get').mockReturnValue(false)- touch(main, 'touchstart', 100, 200, 100)- expect(touch(main, 'touchmove', 300, 200, 200).defaultPrevented).toBe(false)- expect(document.documentElement.hasAttribute('data-dsh-mobile-sidebar-open')).toBe(false)- })-- it.each([140, 220])('suppresses the swipe-origin click after ending at x=%i and still allows unrelated controls', (endX) => {- const { sidebar, overlay } = setupFrame()- const row = document.createElement('button')- row.textContent = 'Existing session'- sidebar.append(row)- const onRow = vi.fn()- row.addEventListener('click', onRow)- register()- renderOverlay(overlay)- fireEvent.click(screen.getByRole('button', { name: 'Open sidebar' }))- touch(row, 'touchstart', 220, 200, 100)- touch(row, 'touchmove', 140, 200, 300)- touch(row, 'touchmove', endX, 200, 400)- touch(row, 'touchend', endX, 200, 600)- expect(document.documentElement.hasAttribute('data-dsh-mobile-sidebar-open')).toBe(true)- fireEvent.click(row)- expect(onRow).not.toHaveBeenCalled()- fireEvent.click(document.querySelector('[data-dsh-mobile-sidebar-toggle]')!)- expect(document.documentElement.hasAttribute('data-dsh-mobile-sidebar-open')).toBe(false)- fireEvent.click(row)- expect(onRow).toHaveBeenCalledTimes(1)- })-it('reconciles delayed/replaced frames and restores all owned DOM state on unload', async () => {const root = document.documentElementroot.style.setProperty('--dsh-mobile-sidebar-width', '7px')@@ -565,16 +353,62 @@ describe('registerMobileSidebar', () => {root.style.removeProperty('--dsh-mobile-sidebar-width')})- it('hands the layout back at the desktop breakpoint without leftover navigation or gesture', () => {+ it('restores navigation when the center is replaced while the overlay stays mounted', async () => {+ const { center, overlay } = setupFrame()+ register()+ renderOverlay(overlay)+ const replacement = document.createElement('div')+ replacement.className = 'replacement_centerCol'+ replacement.innerHTML = '<div data-slot="main"></div>'+ center.replaceWith(replacement)+ await waitFor(() => expect(replacement.querySelector('[data-dsh-mobile-navbar-title]')?.textContent).toBe('New Session'))+ expect(screen.getByRole('button', { name: 'Open sidebar' }).closest('[data-dsh-mobile-navbar-host]')?.parentElement).toBe(replacement)+ })++ it('restores navigation when its portal content is removed without replacing the center', async () => {+ const { center, overlay } = setupFrame()+ register()+ renderOverlay(overlay)+ const host = center.querySelector('[data-dsh-mobile-navbar-host]')!+ host.replaceChildren()+ await waitFor(() => expect(center.querySelector('[data-dsh-mobile-navbar-title]')?.textContent).toBe('New Session'))+ fireEvent.click(screen.getByRole('button', { name: 'Open sidebar' }))+ expect(document.documentElement.hasAttribute('data-dsh-mobile-sidebar-open')).toBe(true)+ })++ it('restores detached portal content before synchronous plugin unload', () => {+ const { center, overlay } = setupFrame()+ const { dispose } = register()+ renderOverlay(overlay)+ center.querySelector('[data-dsh-mobile-navbar-host]')!.replaceChildren()+ act(() => dispose())+ expect(() => cleanup()).not.toThrow()+ expect(document.querySelector('[data-dsh-mobile-navbar-host]')).toBeNull()+ })++ it('resumes navigation after returning from the desktop breakpoint', () => {+ const { center, overlay } = setupFrame()+ register()+ renderOverlay(overlay)+ window.innerWidth = 1200+ fireEvent(window, new Event('resize'))+ expect(screen.queryByRole('navigation')).toBeNull()+ window.innerWidth = 390+ fireEvent(window, new Event('resize'))+ expect(center.querySelector('[data-dsh-mobile-navbar-title]')?.textContent).toBe('New Session')+ fireEvent.click(screen.getByRole('button', { name: 'Open sidebar' }))+ expect(document.documentElement.hasAttribute('data-dsh-mobile-sidebar-open')).toBe(true)+ })++ it('hands the layout back at the desktop breakpoint without leftover navigation', () => {const { main, overlay } = setupFrame()const { dispose } = register()renderOverlay(overlay)- touch(main, 'touchstart', 100, 200, 100)- touch(main, 'touchmove', 260, 200, 200)+ fireEvent.click(screen.getByRole('button', { name: 'Open sidebar' }))window.innerWidth = 1200fireEvent(window, new Event('resize'))expect(document.documentElement.hasAttribute('data-dsh-mobile-sidebar')).toBe(false)- expect(document.documentElement.hasAttribute('data-dsh-mobile-sidebar-dragging')).toBe(false)+ expect(document.documentElement.hasAttribute('data-dsh-mobile-sidebar-open')).toBe(false)expect(document.querySelector('[data-dsh-mobile-navbar-host]')).toBeNull()expect(main.inert).toBe(false)dispose()diff --git a/packages/dsh-tauri-mobile-ui/src/client/register/sidebar.tsx b/packages/dsh-tauri-mobile-ui/src/client/register/sidebar.tsxindex 16c2799c..309b26eb 100644--- a/packages/dsh-tauri-mobile-ui/src/client/register/sidebar.tsx+++ b/packages/dsh-tauri-mobile-ui/src/client/register/sidebar.tsx@@ -1,6 +1,5 @@import type { ClientContext, ParentMessage } from 'dsh-tauri/client'import type { KeyboardEvent } from 'react'-import type { SidebarGesture, SidebarGesturePoint } from '../service/sidebar-gesture'import { CirclePlus, Icon, LayoutSideContentLeft } from 'dsh-tauri-ui/client'import {defineRegister,@@ -13,41 +12,23 @@ import { useSyncExternalStore } from 'react'import { createPortal } from 'react-dom'import { PLUGIN_ID } from '../../shared/constants'import { locale } from '../locales'-import { createSidebarGesture, finishSidebarGesture, moveSidebarGesture, SIDEBAR_CLICK_SUPPRESSION_MS } from '../service/sidebar-gesture'import { getMobileSessionId, getMobileSessionTitle } from '../service/sidebar-session'const SHELL_OVERLAY_SLOT = 'shell.overlay'const SIDEBAR_TOGGLE_COMMAND = 'dsh://sidebar:toggle'const SIDEBAR_COLLAPSED_EVENT = 'dsh://sidebar:collapsed'const SIDEBAR_BREAKPOINT = 1024-const SIDEBAR_PROPERTIES = [- '--dsh-mobile-sidebar-width',- '--dsh-mobile-sidebar-offset',-] as const+const SIDEBAR_WIDTH_PROPERTY = '--dsh-mobile-sidebar-width'const LAYOUT_SELECTOR = '[data-shell-overlay], [class$="_frame"], [class$="_sidebarCol"], [class$="_centerCol"], [data-slot="main"]'interface SidebarSnapshot {mobile: booleanopen: boolean- dragging: boolean- offset: numberwidth: numberstarting: booleanstartFailed: boolean}-interface ActiveGesture {- state: SidebarGesture- target: Element- frame: HTMLElement- source: 'touch' | 'pointer'-}--interface InlineProperty {- value: string- priority: string-}-function getSidebarWidth(): number {return Math.min(320, Math.max(1, Math.floor(window.innerWidth * 0.82)))}@@ -62,39 +43,6 @@ function canOwnMobileSidebar(): boolean {&& (frame === null || frame.hasAttribute('data-rightbar-collapsed'))}-function canStartGesture(target: EventTarget | null, frame: HTMLElement): target is Element {- if (!(target instanceof Element) || !frame.contains(target))- return false- if (target.closest('input,textarea,select,[contenteditable]') !== null)- return false- if (target.closest('[data-dsh-mobile-sidebar-toggle], [data-dsh-mobile-new-session]') !== null)- return false- if (target.closest('[data-shell-overlay]') !== null && target.closest('[data-dsh-mobile-sidebar-shade]') === null)- return false- if (window.getSelection()?.isCollapsed === false)- return false- let current: Element | null = target- while (current !== null && current !== frame) {- const style = getComputedStyle(current)- if ((style.overflowX === 'auto' || style.overflowX === 'scroll') && current.scrollWidth > current.clientWidth + 1)- return false- current = current.parentElement- }- return true-}--function eventTime(event: Event): number {- return event.timeStamp || performance.now()-}--function touchPoint(touch: Touch, event: TouchEvent): SidebarGesturePoint {- return { id: touch.identifier, x: touch.clientX, y: touch.clientY, time: eventTime(event) }-}--function pointerPoint(event: PointerEvent): SidebarGesturePoint {- return { id: event.pointerId, x: event.clientX, y: event.clientY, time: eventTime(event) }-}-function activateIcon(event: KeyboardEvent<SVGSVGElement>, activate: () => void): void {if (event.key !== 'Enter' && event.key !== ' ')return@@ -115,12 +63,11 @@ export const registerMobileSidebar = defineRegister<ClientContext>((controller,returnconst root = document.documentElement- const previousProperties = new Map<string, InlineProperty>(SIDEBAR_PROPERTIES.map(name => [name, {- value: root.style.getPropertyValue(name),- priority: root.style.getPropertyPriority(name),- }]))+ const previousWidth = root.style.getPropertyValue(SIDEBAR_WIDTH_PROPERTY)+ const previousWidthPriority = root.style.getPropertyPriority(SIDEBAR_WIDTH_PROPERTY)const navbarHost = document.createElement('div')navbarHost.setAttribute('data-dsh-mobile-navbar-host', '')+ let navbar: HTMLElement | null = nullconst listeners = new Set<() => void>()const notify = (): void => listeners.forEach(listener => listener())const subscribe = (listener: () => void): (() => void) => {@@ -130,8 +77,6 @@ export const registerMobileSidebar = defineRegister<ClientContext>((controller,let snapshot: SidebarSnapshot = {mobile: canOwnMobileSidebar(),open: false,- dragging: false,- offset: 0,width: getSidebarWidth(),starting: false,startFailed: false,@@ -141,24 +86,11 @@ export const registerMobileSidebar = defineRegister<ClientContext>((controller,const sessionSource = adapter.sessions.listconst getSessionSnapshot = (): unknown => sessionSource?.getSnapshot()let selectedSession = getMobileSessionId(getSessionSnapshot())- let gesture: ActiveGesture | null = null- let suppressClickUntil = 0- let suppressedClickTarget: Element | null = null- let suppressedClickFrame: HTMLElement | null = nullconst accessibility = new Map<HTMLElement, { ariaHidden: string | null, inert: boolean }>()let focusRestoreTarget: HTMLElement | SVGElement | null = nulllet focusedDrawer: { element: HTMLElement, tabIndex: string | null } | null = nulllet focusDrawerOnOpen = false- const clearGesture = (): void => {- const current = gesture- gesture = null- if (current?.source === 'pointer' && current.state.axis === 'x'- && typeof current.frame.hasPointerCapture === 'function'- && current.frame.hasPointerCapture(current.state.id)) {- current.frame.releasePointerCapture(current.state.id)- }- }const restoreFocusedDrawer = (): void => {if (focusedDrawer === null)return@@ -226,10 +158,10 @@ export const registerMobileSidebar = defineRegister<ClientContext>((controller,const reconcileFrame = (): void => {const previousHost = getNavbarHost()const frame = getFrame()- if (gesture !== null && (frame !== gesture.frame || !gesture.target.isConnected || !frame?.contains(gesture.target)))- resetGesture()const center = snapshot.mobile ? frame?.querySelector<HTMLElement>('[class$="_centerCol"]') : nullif (center) {+ if (navbar !== null && navbar.parentNode === null && !navbarHost.hasChildNodes())+ navbarHost.append(navbar)if (center.firstElementChild !== navbarHost)center.prepend(navbarHost)}@@ -240,31 +172,20 @@ export const registerMobileSidebar = defineRegister<ClientContext>((controller,if (previousHost !== getNavbarHost())notify()}- const restoreProperties = (): void => {- previousProperties.forEach((property, name) => {- if (property.value !== '')- root.style.setProperty(name, property.value, property.priority)- else- root.style.removeProperty(name)- })- }const syncDom = (): void => {root.toggleAttribute('data-dsh-mobile-sidebar', snapshot.mobile)root.toggleAttribute('data-dsh-mobile-sidebar-open', snapshot.mobile && snapshot.open)- root.toggleAttribute('data-dsh-mobile-sidebar-dragging', snapshot.mobile && snapshot.dragging)- if (snapshot.mobile) {- root.style.setProperty(SIDEBAR_PROPERTIES[0], `${snapshot.width}px`)- root.style.setProperty(SIDEBAR_PROPERTIES[1], `${snapshot.offset}px`)- }- else {- restoreProperties()- }+ if (snapshot.mobile)+ root.style.setProperty(SIDEBAR_WIDTH_PROPERTY, `${snapshot.width}px`)+ else if (previousWidth !== '')+ root.style.setProperty(SIDEBAR_WIDTH_PROPERTY, previousWidth, previousWidthPriority)+ else+ root.style.removeProperty(SIDEBAR_WIDTH_PROPERTY)reconcileFrame()}const publish = (next: SidebarSnapshot): void => {if (next.mobile === snapshot.mobile && next.open === snapshot.open- && next.dragging === snapshot.dragging && next.offset === snapshot.offset&& next.width === snapshot.width && next.starting === snapshot.starting&& next.startFailed === snapshot.startFailed) {@@ -274,12 +195,11 @@ export const registerMobileSidebar = defineRegister<ClientContext>((controller,syncDom()notify()}- const setOpen = (open: boolean, report = true): void => {+ const setOpen = (open: boolean): void => {if (!snapshot.mobile || controller.isDisposed())returnconst wasOpen = snapshot.open- const changed = open !== wasOpen || snapshot.dragging- clearGesture()+ const changed = open !== wasOpenif (open && !wasOpen) {focusDrawerOnOpen = trueconst active = document.activeElement@@ -288,41 +208,28 @@ export const registerMobileSidebar = defineRegister<ClientContext>((controller,? active: null}- publish({ ...snapshot, open, dragging: false, offset: open ? snapshot.width : 0 })+ publish({ ...snapshot, open })if (!open && wasOpen)restoreFocusTarget()- if (changed && report)+ if (changed)safeReportCollapsed(!open)}- // keep:function `reconcileFrame` 属于 publish → syncDom → reconcileFrame 环,声明式函数才能在环内前向引用。- function resetGesture(): void {- clearGesture()- publish({ ...snapshot, dragging: false, offset: snapshot.open ? snapshot.width : 0 })- }const syncMobile = (): void => {const mobile = canOwnMobileSidebar()const width = getSidebarWidth()const wasMobile = snapshot.mobileif (!mobile) {- clearGesture()- suppressedClickTarget = null- suppressedClickFrame = null- suppressClickUntil = 0- publish({ ...snapshot, mobile: false, open: false, dragging: false, offset: 0, width, startFailed: false })+ publish({ ...snapshot, mobile: false, open: false, width, startFailed: false })if (wasMobile) {restoreFocusTarget()controller.timeout(() => safeReportCollapsed(getFrame()?.hasAttribute('data-sidebar-collapsed') === true), 0)}return}- if (width !== snapshot.width)- clearGesture()publish({...snapshot,mobile: true,width,- dragging: gesture !== null && snapshot.dragging,- offset: gesture !== null && snapshot.dragging ? Math.min(width, snapshot.offset) : snapshot.open ? width : 0,})if (!wasMobile)safeReportCollapsed(!snapshot.open)@@ -368,119 +275,7 @@ export const registerMobileSidebar = defineRegister<ClientContext>((controller,if (event.key === 'Escape' && !event.defaultPrevented && snapshot.mobile && snapshot.open)setOpen(false)})- controller.listen('click', (event) => {- const target = event.target- if (performance.now() >= suppressClickUntil || suppressedClickTarget === null || !(target instanceof Element))- return- const frame = suppressedClickFrame- const retargeted = frame?.contains(target) && (target.closest('[data-dsh-mobile-sidebar-shade]') !== null- || target === frame || target === frame.querySelector('[class$="_centerCol"]'))- if (!suppressedClickTarget.contains(target) && !retargeted)- return- event.preventDefault()- event.stopImmediatePropagation()- suppressClickUntil = 0- suppressedClickTarget = null- suppressedClickFrame = null- }, { capture: true })-- const beginGesture = (point: SidebarGesturePoint, target: EventTarget | null, source: ActiveGesture['source']): void => {- const frame = getFrame()- if (!snapshot.mobile || gesture !== null || frame === null || !canStartGesture(target, frame))- return- suppressedClickTarget = null- suppressedClickFrame = null- suppressClickUntil = 0- gesture = { state: createSidebarGesture(point, snapshot.open, snapshot.width), target, frame, source }- }- const moveGesture = (point: SidebarGesturePoint, event: TouchEvent | PointerEvent, source: ActiveGesture['source']): void => {- if (gesture === null || gesture.source !== source || gesture.state.id !== point.id)- return- const result = moveSidebarGesture(gesture.state, point, snapshot.width, event.cancelable)- if (result.gesture === null) {- resetGesture()- return- }- const claimed = gesture.state.axis === null && result.gesture.axis === 'x'- gesture.state = result.gesture- if (result.offset === undefined)- return- if (claimed && source === 'pointer' && typeof gesture.frame.setPointerCapture === 'function')- gesture.frame.setPointerCapture(point.id)- event.preventDefault()- publish({ ...snapshot, dragging: true, offset: result.offset })- }- const endGesture = (point: SidebarGesturePoint | undefined, cancelled: boolean, source: ActiveGesture['source']): void => {- if (gesture === null || gesture.source !== source || (point !== undefined && gesture.state.id !== point.id))- return- const current = gesture- const result = cancelled ? null : finishSidebarGesture(current.state, point, snapshot.width)- clearGesture()- if (result === null) {- resetGesture()- return- }- setOpen(result.open)- suppressedClickTarget = result.suppressClick ? current.target : null- suppressedClickFrame = result.suppressClick ? current.frame : null- suppressClickUntil = result.suppressClick ? performance.now() + SIDEBAR_CLICK_SUPPRESSION_MS : 0- }- controller.listen('touchstart', (event) => {- if (event.touches.length !== 1) {- if (gesture?.source === 'touch')- resetGesture()- return- }- if (!event.defaultPrevented)- beginGesture(touchPoint(event.touches[0], event), event.target, 'touch')- }, { passive: true })- controller.listen('touchmove', (event) => {- if (gesture?.source !== 'touch')- return- if (event.touches.length !== 1) {- resetGesture()- return- }- const touch = [...event.touches].find(point => point.identifier === gesture?.state.id)- if (touch)- moveGesture(touchPoint(touch, event), event, 'touch')- }, { passive: false })- const endTouch = (event: TouchEvent, cancelled: boolean): void => {- const touch = [...event.changedTouches].find(point => point.identifier === gesture?.state.id)- if (touch || cancelled)- endGesture(touch ? touchPoint(touch, event) : undefined, cancelled, 'touch')- }- controller.listen('touchend', event => endTouch(event, false))- controller.listen('touchcancel', event => endTouch(event, true))- controller.listen('pointerdown', (event) => {- if (event.pointerType !== 'touch' && event.button === 0 && event.isPrimary !== false && !event.defaultPrevented)- beginGesture(pointerPoint(event), event.target, 'pointer')- })- controller.listen('pointermove', (event) => {- if (event.pointerType === 'touch')- return- if (gesture?.source === 'pointer' && event.buttons === 0) {- resetGesture()- return- }- moveGesture(pointerPoint(event), event, 'pointer')- }, { passive: false })- controller.listen('pointerup', (event) => {- if (event.pointerType !== 'touch')- endGesture(pointerPoint(event), false, 'pointer')- })- controller.listen('pointercancel', (event) => {- if (event.pointerType !== 'touch')- endGesture(pointerPoint(event), true, 'pointer')- })- controller.listen('lostpointercapture', (event) => {- if (gesture?.source === 'pointer' && gesture.state.id === event.pointerId)- resetGesture()- })- controller.listenWindow('blur', () => resetGesture())-const resize = (): void => {- resetGesture()syncMobile()reconcileFrame()}@@ -502,12 +297,10 @@ export const registerMobileSidebar = defineRegister<ClientContext>((controller,const layoutChanged = records.some((record) => {if (record.type === 'attributes')return record.target instanceof Element && record.target.matches(`${LAYOUT_SELECTOR}, [data-sidebar-collapsed], [data-dsh-mobile-sidebar]`)- if (record.target instanceof Element && record.target.matches('[class$="_frame"], [class$="_centerCol"]'))+ if (record.target === navbarHost || (record.target instanceof Element && record.target.matches('[class$="_frame"], [class$="_centerCol"]')))return trueif (focusedDrawer !== null && !focusedDrawer.element.isConnected)return true- if (gesture !== null && (!gesture.target.isConnected || !gesture.frame.isConnected))- return truereturn [...record.addedNodes, ...record.removedNodes].some(node => node instanceof Element&& (node.matches(LAYOUT_SELECTOR) || node.querySelector(LAYOUT_SELECTOR) !== null))})@@ -522,12 +315,10 @@ export const registerMobileSidebar = defineRegister<ClientContext>((controller,subtree: true,})controller.add(() => {+ if (navbar !== null && navbar.parentNode === null && !navbarHost.hasChildNodes())+ navbarHost.append(navbar)listeners.clear()- clearGesture()- suppressedClickTarget = null- suppressedClickFrame = null- suppressClickUntil = 0- snapshot = { ...snapshot, mobile: false, open: false, dragging: false, offset: 0 }+ snapshot = { ...snapshot, mobile: false, open: false }syncDom()restoreFocusTarget()safeReportCollapsed(getFrame()?.hasAttribute('data-sidebar-collapsed') === true)@@ -552,7 +343,7 @@ export const registerMobileSidebar = defineRegister<ClientContext>((controller,return (<>{host && createPortal(- <nav data-dsh-mobile-topbar aria-label={locale.text('navbar.label')}>+ <nav ref={(element) => { navbar = element }} data-dsh-mobile-topbar aria-label={locale.text('navbar.label')}><Iconas={LayoutSideContentLeft}size={12}@@ -560,6 +351,7 @@ export const registerMobileSidebar = defineRegister<ClientContext>((controller,role="button"tabIndex={0}focusable="true"+ onPointerDown={event => event.currentTarget.blur()}aria-label={locale.text(current.open ? 'toggle.close' : 'toggle.open')}aria-expanded={current.open}onClick={toggle}@@ -573,6 +365,7 @@ export const registerMobileSidebar = defineRegister<ClientContext>((controller,role="button"tabIndex={0}focusable="true"+ onPointerDown={event => event.currentTarget.blur()}aria-label={locale.text('session.new')}aria-disabled={current.starting}aria-busy={current.starting}@@ -583,7 +376,7 @@ export const registerMobileSidebar = defineRegister<ClientContext>((controller,</nav>,host,)}- <div data-dsh-mobile-sidebar-overlay data-dsh-mobile-sidebar-dragging={current.dragging || undefined}>+ <div data-dsh-mobile-sidebar-overlay><buttontype="button"data-dsh-mobile-sidebar-shadediff --git a/packages/dsh-tauri-mobile-ui/src/client/service/sidebar-gesture.test.ts b/packages/dsh-tauri-mobile-ui/src/client/service/sidebar-gesture.test.tsdeleted file mode 100644index 5308db3a..00000000--- a/packages/dsh-tauri-mobile-ui/src/client/service/sidebar-gesture.test.ts+++ /dev/null@@ -1,63 +0,0 @@-import { describe, expect, it } from 'vitest'-import { createSidebarGesture, finishSidebarGesture, moveSidebarGesture } from './sidebar-gesture'--const point = (x: number, y: number, time: number) => ({ id: 1, x, y, time })--describe('sidebar gesture state machine', () => {- it('locks horizontally only after enough movement and clamps the reveal width', () => {- const gesture = createSidebarGesture(point(100, 200, 100), false, 319)- expect(moveSidebarGesture(gesture, point(105, 202, 120), 319, true)).toEqual({ gesture })- const move = moveSidebarGesture(gesture, point(280, 202, 300), 319, true)- expect(move.offset).toBe(180)- expect(move.gesture?.axis).toBe('x')- expect(moveSidebarGesture(move.gesture!, point(500, 202, 400), 319, true).offset).toBe(319)- })-- it.each([- { open: false, end: point(90, 200, 200) },- { open: true, end: point(110, 200, 200) },- { open: false, end: point(105, 250, 200) },- ])('abandons wrong directions and vertical scrolling from %j', ({ open, end }) => {- expect(moveSidebarGesture(createSidebarGesture(point(100, 200, 100), open, 319), end, 319, true)).toEqual({ gesture: null })- })-- it('abandons noncancelable horizontal moves instead of committing release travel', () => {- const gesture = createSidebarGesture(point(100, 200, 100), false, 319)- expect(moveSidebarGesture(gesture, point(300, 200, 200), 319, false)).toEqual({ gesture: null })- expect(finishSidebarGesture(gesture, point(500, 200, 300), 319)).toBeNull()- })-- it('settles slow swipes by the revealed midpoint', () => {- const closed = createSidebarGesture(point(100, 200, 100), false, 319)- const short = moveSidebarGesture(closed, point(180, 200, 400), 319, true).gesture!- const long = moveSidebarGesture(closed, point(280, 200, 400), 319, true).gesture!- expect(finishSidebarGesture(short, point(180, 200, 700), 319)).toEqual({ open: false, suppressClick: true })- expect(finishSidebarGesture(long, point(280, 200, 700), 319)).toEqual({ open: true, suppressClick: true })- })-- it('uses release velocity for short flings but never for tiny accidental motion', () => {- const gesture = createSidebarGesture(point(100, 200, 100), false, 319)- const fling = moveSidebarGesture(gesture, point(140, 200, 140), 319, true).gesture!- const tiny = moveSidebarGesture(gesture, point(108, 200, 105), 319, true).gesture!- expect(finishSidebarGesture(fling, point(150, 200, 150), 319)).toEqual({ open: true, suppressClick: true })- expect(finishSidebarGesture(tiny, point(108, 200, 110), 319)).toEqual({ open: false, suppressClick: true })- })-- it('suppresses out-and-back claimed drags but leaves genuine taps alone', () => {- const tap = createSidebarGesture(point(220, 200, 100), true, 319)- expect(finishSidebarGesture(tap, point(220, 200, 200), 319)).toBeNull()- const claimed = moveSidebarGesture(tap, point(140, 200, 300), 319, true).gesture!- const returned = moveSidebarGesture(claimed, point(220, 200, 600), 319, true).gesture!- expect(finishSidebarGesture(returned, point(220, 200, 900), 319)).toEqual({ open: true, suppressClick: true })- })-- it('expires older samples for a direction change near release', () => {- let gesture = createSidebarGesture(point(350, 200, 100), true, 319)- for (const sample of [point(100, 200, 200), point(150, 200, 400), point(200, 200, 500)])- gesture = moveSidebarGesture(gesture, sample, 319, true).gesture!- expect(gesture.samples[0].time).toBe(200)- gesture = moveSidebarGesture(gesture, point(250, 200, 550), 319, true).gesture!- expect(gesture.samples[0].time).toBe(400)- expect(finishSidebarGesture(gesture, point(270, 200, 580), 319)?.open).toBe(true)- })-})diff --git a/packages/dsh-tauri-mobile-ui/src/client/service/sidebar-gesture.ts b/packages/dsh-tauri-mobile-ui/src/client/service/sidebar-gesture.tsdeleted file mode 100644index ec6913bf..00000000--- a/packages/dsh-tauri-mobile-ui/src/client/service/sidebar-gesture.ts+++ /dev/null@@ -1,84 +0,0 @@-const AXIS_LOCK_DISTANCE = 8-const SWIPE_DISTANCE = 18-const SWIPE_VELOCITY = 0.5--export const SIDEBAR_CLICK_SUPPRESSION_MS = 400--export interface SidebarGesturePoint {- id: number- x: number- y: number- time: number-}--export interface SidebarGesture {- id: number- startX: number- startY: number- base: number- open: boolean- axis: 'x' | null- samples: readonly SidebarGesturePoint[]-}--export interface SidebarGestureMove {- gesture: SidebarGesture | null- offset?: number-}--export function createSidebarGesture(point: SidebarGesturePoint, open: boolean, width: number): SidebarGesture {- return {- id: point.id,- startX: point.x,- startY: point.y,- base: open ? width : 0,- open,- axis: null,- samples: [point],- }-}--export function moveSidebarGesture(- gesture: SidebarGesture,- point: SidebarGesturePoint,- width: number,- cancelable: boolean,-): SidebarGestureMove {- const dx = point.x - gesture.startX- const dy = point.y - gesture.startY- if (gesture.axis === null) {- if (Math.max(Math.abs(dx), Math.abs(dy)) < AXIS_LOCK_DISTANCE)- return { gesture }- if (Math.abs(dy) >= Math.abs(dx) * 0.8 || (gesture.open ? dx > 0 : dx < 0))- return { gesture: null }- }- if (!cancelable)- return { gesture: null }- const samples = [...gesture.samples, point]- while (samples.length > 2 && samples[1].time < point.time - 120)- samples.shift()- return {- gesture: { ...gesture, axis: 'x', samples },- offset: Math.min(width, Math.max(0, gesture.base + dx)),- }-}--export function finishSidebarGesture(- gesture: SidebarGesture,- point: SidebarGesturePoint | undefined,- width: number,-): { open: boolean, suppressClick: boolean } | null {- if (gesture.axis !== 'x')- return null- const samples = point === undefined ? gesture.samples : [...gesture.samples, point]- const first = samples[0]- const last = samples[samples.length - 1]- const travel = last.x - gesture.startX- const velocity = (last.x - first.x) / Math.max(1, last.time - first.time)- const fling = Math.abs(velocity) >= SWIPE_VELOCITY && Math.abs(travel) >= SWIPE_DISTANCE- const position = Math.min(width, Math.max(0, gesture.base + travel))- return {- open: fling ? velocity > 0 : position >= width * 0.5,- suppressClick: true,- }-}diff --git a/packages/dsh-tauri-mobile-ui/src/client/styles/mobile.cssr.test.ts b/packages/dsh-tauri-mobile-ui/src/client/styles/mobile.cssr.test.tsindex 05cc6e9c..b3a90f28 100644--- a/packages/dsh-tauri-mobile-ui/src/client/styles/mobile.cssr.test.ts+++ b/packages/dsh-tauri-mobile-ui/src/client/styles/mobile.cssr.test.ts@@ -83,9 +83,8 @@ describe('mobile conversation layout', () => {'position': 'absolute','inset': '0','z-index': '1',- 'transform': 'translate3d(var(--dsh-mobile-sidebar-offset), 0, 0)',- '--dsh-mobile-sidebar-radius': 'clamp(0px, calc(var(--dsh-mobile-sidebar-offset) / 10), 24px)',- 'border-radius': 'var(--dsh-mobile-sidebar-radius) 0 0 var(--dsh-mobile-sidebar-radius)',+ 'transform': 'translate3d(0, 0, 0)',+ 'border-radius': '0','corner-shape': 'round','background-color': 'Canvas','background-image': 'linear-gradient(var(--dsw-alias-bg-base, Canvas), var(--dsw-alias-bg-base, Canvas))',@@ -95,7 +94,9 @@ describe('mobile conversation layout', () => {// 终端模式外观会在折叠标记下隐藏侧栏,抽屉接管时用更高特异度还原可见性。visibility: 'visible',})- expect(declarations('html[data-dsh-mobile-sidebar-open] [class$="_centerCol"], html[data-dsh-mobile-sidebar-dragging] [class$="_centerCol"]')).toMatchObject({+ expect(declarations('html[data-dsh-mobile-sidebar-open] [class$="_centerCol"]')).toMatchObject({+ 'transform': 'translate3d(var(--dsh-mobile-sidebar-width), 0, 0)',+ 'border-radius': '24px 0 0 24px','box-shadow': 'var(--dsw-shadow-lv3)',})expect(declarations('[data-dsh-mobile-sidebar-shade]').background).toBe('transparent')@@ -117,6 +118,55 @@ describe('mobile conversation layout', () => {}})+ it('removes tap focus boxes while keeping a visible keyboard focus ring', () => {+ for (const selector of ['[data-dsh-mobile-sidebar-toggle]', '[data-dsh-mobile-new-session]']) {+ expect(declarations(selector)).toMatchObject({+ 'outline': 'none',+ '-webkit-tap-highlight-color': 'transparent',+ })+ }+ expect(declarations('[data-dsh-mobile-sidebar-toggle]:focus-visible, [data-dsh-mobile-new-session]:focus-visible')).toMatchObject({+ 'outline': 'var(--dsw-focus-ring-width, 2px) solid var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary))',+ 'outline-offset': '4px',+ })+ })++ it('removes pointer focus boxes from mobile bottom buttons without hiding keyboard focus', () => {+ expect(declarations(':is([data-dsh-mobile-preferences], [data-shell-bottom]) button')).toMatchObject({+ '-webkit-tap-highlight-color': 'transparent',+ })+ expect(declarations(':is([data-dsh-mobile-preferences], [data-shell-bottom]) button:focus:not(:focus-visible)')).toMatchObject({+ 'outline': 'none',+ 'box-shadow': 'none',+ })+ expect(declarations(':is([data-dsh-mobile-preferences], [data-shell-bottom]) button:focus-visible')).toMatchObject({+ 'outline': 'var(--dsw-focus-ring-width, 2px) solid var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary))',+ 'outline-offset': '2px',+ })+ })++ it('keeps click transitions on the center and shade without drag-only overrides', () => {+ const css = root.toString()+ expect(css).not.toContain('data-dsh-mobile-sidebar-dragging')+ expect(declarations('html[data-dsh-mobile-sidebar] [class$="_centerCol"]').transition).toContain('transform 240ms cubic-bezier(.2, .8, .2, 1)')+ expect(declarations('[data-dsh-mobile-sidebar-shade]').transition).toContain('transform 240ms cubic-bezier(.2, .8, .2, 1)')+ const reducedMotion = root.nodes[0]+ expect(reducedMotion?.type).toBe('atrule')+ if (reducedMotion?.type !== 'atrule')+ throw new Error('Missing mobile media query')+ const rules = reducedMotion.nodes?.filter(node => node.type === 'atrule' && node.name === 'media' && node.params === '(prefers-reduced-motion: reduce)')+ expect(rules).toHaveLength(1)+ expect(rules?.[0]?.toString()).toContain('transition: none !important')+ })++ it('uses native safe-area ownership for the topbar and shade with browser inset fallbacks', () => {+ expect(declarations('[data-dsh-mobile-topbar]')).toMatchObject({+ height: 'calc(52px + var(--dsh-mobile-safe-area-inset-top, env(safe-area-inset-top, 0px)))',+ padding: 'calc(14px + var(--dsh-mobile-safe-area-inset-top, env(safe-area-inset-top, 0px))) 16px 14px',+ })+ expect(declarations('[data-dsh-mobile-sidebar-shade]').inset).toBe('calc(52px + var(--dsh-mobile-safe-area-inset-top, env(safe-area-inset-top, 0px))) 0 0')+ })+it('renders the mobile sidebar icon at 20px inside the touch media query', () => {expect(declarations('[data-dsh-mobile-sidebar-toggle]')).toMatchObject({ width: '20px', height: '20px' })const rules: unknown[] = []@@ -141,6 +191,18 @@ describe('mobile conversation layout', () => {expect(rules).toHaveLength(1)})+ it('hides the foreign blank-session dock fallback that lands on the topbar toggle', () => {+ expect(declarations('[data-dsh-dock-fallback]')).toMatchObject({ display: 'none !important' })+ const rules: unknown[] = []+ root.walkRules('[data-dsh-dock-fallback]', (rule) => {+ rules.push(rule)+ expect(rule.parent?.type).toBe('atrule')+ if (rule.parent?.type === 'atrule')+ expect(rule.parent.params).toBe('(hover: none) and (any-pointer: coarse) and (any-hover: none)')+ })+ expect(rules).toHaveLength(1)+ })+it('overrides conversation scroll bottom padding to zero inside the mobile media query', () => {const declarations: unknown[] = []root.walkRules('[data-slot="main"] [data-conversation-scroll]', (rule) => {diff --git a/packages/dsh-tauri-mobile-ui/src/client/styles/mobile.cssr.ts b/packages/dsh-tauri-mobile-ui/src/client/styles/mobile.cssr.tsindex a2849c48..018907e8 100644--- a/packages/dsh-tauri-mobile-ui/src/client/styles/mobile.cssr.ts+++ b/packages/dsh-tauri-mobile-ui/src/client/styles/mobile.cssr.ts@@ -16,6 +16,17 @@ export default c(`@media ${MOBILE_MEDIA_QUERIES.join(' and ')}`, [marginLeft: 'auto',flexShrink: '0',}),+ c(':is([data-dsh-mobile-preferences], [data-shell-bottom]) button', {+ WebkitTapHighlightColor: 'transparent',+ }),+ c(':is([data-dsh-mobile-preferences], [data-shell-bottom]) button:focus:not(:focus-visible)', {+ outline: 'none',+ boxShadow: 'none',+ }),+ c(':is([data-dsh-mobile-preferences], [data-shell-bottom]) button:focus-visible', {+ outline: 'var(--dsw-focus-ring-width, 2px) solid var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary))',+ outlineOffset: '2px',+ }),c('[data-slot="conversation.composer.bar"] [class$="_dock"]', {display: 'none !important',}),@@ -28,6 +39,13 @@ export default c(`@media ${MOBILE_MEDIA_QUERIES.join(' and ')}`, [c('[data-slot="conversation.header"] [class$="_header"]', {display: 'none !important',}),+ // 第三方插件(dsh-better-sidebar)的空白会话兜底入口 `[data-dsh-dock-fallback]` 是+ // `position: fixed` 的:它按宿主会话头里「右侧栏角落控件」的 rect 对齐,而手机版顶栏已经+ // 把那个会话头一并隐藏,锚点 rect 退化成 0×0 之后它会一路退到视口左上角(top/left 各 4px),+ // 正好压在本顶栏的抽屉开关上;它另一处兜底位是右上角,也压着新建会话按钮。手机上没有容身处。+ c('[data-dsh-dock-fallback]', {+ display: 'none !important',+ }),// 扩展面板内嵌的官方页头由 dsh-tauri-extension 自己排版(同一行左侧还有它叠放的闪光图标),// 这里叠加顶距会把标题压低、与图标错轴,因此只给主槽里独立成页的页头让位。c('[data-slot="main"] header[class*="_pageHead"]:not([data-dsh-extension-plugins] *)', {@@ -70,30 +88,28 @@ export default c(`@media ${MOBILE_MEDIA_QUERIES.join(' and ')}`, [visibility: 'visible',}),c('html[data-dsh-mobile-sidebar] [class$="_centerCol"]', {- 'position': 'absolute',- 'inset': '0',- 'zIndex': '1',- '--dsh-mobile-sidebar-radius': 'clamp(0px, calc(var(--dsh-mobile-sidebar-offset) / 10), 24px)',- 'colorScheme': 'light',- 'backgroundColor': 'Canvas',- 'backgroundImage': 'linear-gradient(var(--dsw-alias-bg-base, Canvas), var(--dsw-alias-bg-base, Canvas))',- 'overflow': 'hidden',- 'transform': 'translate3d(var(--dsh-mobile-sidebar-offset), 0, 0)',- 'borderRadius': 'var(--dsh-mobile-sidebar-radius) 0 0 var(--dsh-mobile-sidebar-radius)',- 'cornerShape': 'round',- 'boxShadow': 'none',- 'transition': 'transform 240ms cubic-bezier(.2, .8, .2, 1), border-radius 240ms ease, box-shadow 240ms ease',- 'willChange': 'transform',- }),- c('html[data-dsh-mobile-sidebar-open] [class$="_centerCol"], html[data-dsh-mobile-sidebar-dragging] [class$="_centerCol"]', {+ position: 'absolute',+ inset: '0',+ zIndex: '1',+ colorScheme: 'light',+ backgroundColor: 'Canvas',+ backgroundImage: 'linear-gradient(var(--dsw-alias-bg-base, Canvas), var(--dsw-alias-bg-base, Canvas))',+ overflow: 'hidden',+ transform: 'translate3d(0, 0, 0)',+ borderRadius: '0',+ cornerShape: 'round',+ boxShadow: 'none',+ transition: 'transform 240ms cubic-bezier(.2, .8, .2, 1), border-radius 240ms ease, box-shadow 240ms ease',+ willChange: 'transform',+ }),+ c('html[data-dsh-mobile-sidebar-open] [class$="_centerCol"]', {+ transform: 'translate3d(var(--dsh-mobile-sidebar-width), 0, 0)',+ borderRadius: '24px 0 0 24px',boxShadow: 'var(--dsw-shadow-lv3)',}),c('html[data-dsh-mobile-sidebar] body[data-ds-dark-theme] [class$="_centerCol"]', {colorScheme: 'dark',}),- c('html[data-dsh-mobile-sidebar-dragging] [class$="_centerCol"]', {- transition: 'none',- }),c('html[data-dsh-mobile-sidebar] [class$="_rightbarCol"]', {display: 'none !important',}),@@ -127,8 +143,8 @@ export default c(`@media ${MOBILE_MEDIA_QUERIES.join(' and ')}`, [gridTemplateColumns: '24px minmax(0, 1fr) 24px',alignItems: 'center',gap: '16px',- height: 'calc(52px + env(safe-area-inset-top))',- padding: 'calc(14px + env(safe-area-inset-top)) 16px 14px',+ height: 'calc(52px + var(--dsh-mobile-safe-area-inset-top, env(safe-area-inset-top, 0px)))',+ padding: 'calc(14px + var(--dsh-mobile-safe-area-inset-top, env(safe-area-inset-top, 0px))) 16px 14px',boxSizing: 'border-box',backgroundColor: 'Canvas',backgroundImage: 'linear-gradient(var(--dsw-alias-bg-base, Canvas), var(--dsw-alias-bg-base, Canvas))',@@ -145,6 +161,8 @@ export default c(`@media ${MOBILE_MEDIA_QUERIES.join(' and ')}`, [cursor: 'pointer',pointerEvents: 'auto',touchAction: 'manipulation',+ outline: 'none',+ WebkitTapHighlightColor: 'transparent',}),c('[data-dsh-mobile-new-session]', {display: 'block',@@ -158,6 +176,8 @@ export default c(`@media ${MOBILE_MEDIA_QUERIES.join(' and ')}`, [cursor: 'pointer',pointerEvents: 'auto',touchAction: 'manipulation',+ outline: 'none',+ WebkitTapHighlightColor: 'transparent',}),c('[data-dsh-mobile-sidebar-toggle]:focus-visible, [data-dsh-mobile-new-session]:focus-visible', {outline: 'var(--dsw-focus-ring-width, 2px) solid var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary))',@@ -188,7 +208,7 @@ export default c(`@media ${MOBILE_MEDIA_QUERIES.join(' and ')}`, [}),c('[data-dsh-mobile-sidebar-shade]', {position: 'absolute',- inset: 'calc(52px + env(safe-area-inset-top)) 0 0',+ inset: 'calc(52px + var(--dsh-mobile-safe-area-inset-top, env(safe-area-inset-top, 0px))) 0 0',zIndex: '2',display: 'block',width: '100%',@@ -198,19 +218,17 @@ export default c(`@media ${MOBILE_MEDIA_QUERIES.join(' and ')}`, [opacity: '0',visibility: 'hidden',pointerEvents: 'none',- transform: 'translate3d(var(--dsh-mobile-sidebar-offset), 0, 0)',+ transform: 'translate3d(0, 0, 0)',transition: 'transform 240ms cubic-bezier(.2, .8, .2, 1), opacity 180ms ease, visibility 0s linear 240ms',touchAction: 'pan-y pinch-zoom',}),- c('html[data-dsh-mobile-sidebar-open] [data-dsh-mobile-sidebar-shade], html[data-dsh-mobile-sidebar-dragging] [data-dsh-mobile-sidebar-shade]', {+ c('html[data-dsh-mobile-sidebar-open] [data-dsh-mobile-sidebar-shade]', {+ transform: 'translate3d(var(--dsh-mobile-sidebar-width), 0, 0)',opacity: '1',visibility: 'visible',pointerEvents: 'auto',transitionDelay: '0s',}),- c('html[data-dsh-mobile-sidebar-dragging] [data-dsh-mobile-sidebar-shade]', {- transition: 'none',- }),c('@media (prefers-reduced-motion: reduce)', [c('html[data-dsh-mobile-sidebar] [class$="_centerCol"], html[data-dsh-mobile-sidebar] [data-dsh-mobile-sidebar-shade]', {transition: 'none !important',diff --git a/packages/dsh-tauri-mobile-ui/src/client/styles/settings.cssr.test.ts b/packages/dsh-tauri-mobile-ui/src/client/styles/settings.cssr.test.tsindex 8e22ff71..10b32ef9 100644--- a/packages/dsh-tauri-mobile-ui/src/client/styles/settings.cssr.test.ts+++ b/packages/dsh-tauri-mobile-ui/src/client/styles/settings.cssr.test.ts@@ -75,7 +75,7 @@ describe('mobile settings layout contract', () => {'min-height': '0','border-radius': '0','box-shadow': 'none',- 'padding': 'env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px)',+ 'padding': 'var(--dsh-mobile-safe-area-inset-top, env(safe-area-inset-top, 0px)) var(--dsh-mobile-safe-area-inset-right, env(safe-area-inset-right, 0px)) var(--dsh-mobile-safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)) var(--dsh-mobile-safe-area-inset-left, env(safe-area-inset-left, 0px))','color-scheme': 'light','background-color': 'Canvas','background-image': 'linear-gradient(var(--dsw-alias-bg-layer-2, Canvas), var(--dsw-alias-bg-layer-2, Canvas))',@@ -84,6 +84,12 @@ describe('mobile settings layout contract', () => {expect(declarations(`body[data-ds-dark-theme] ${panel}`)).toEqual({ 'color-scheme': 'dark' })})+ it('honors native padded edges while retaining browser safe-area fallbacks', () => {+ expect(declarations(panel).padding).toBe('var(--dsh-mobile-safe-area-inset-top, env(safe-area-inset-top, 0px)) var(--dsh-mobile-safe-area-inset-right, env(safe-area-inset-right, 0px)) var(--dsh-mobile-safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)) var(--dsh-mobile-safe-area-inset-left, env(safe-area-inset-left, 0px))')+ expect(declarations(`${panel} [data-dsh-mobile-settings-close]`).top).toBe('calc(6px + var(--dsh-mobile-safe-area-inset-top, env(safe-area-inset-top, 0px)))')+ expect(declarations(`${panel} [data-dsh-mobile-settings-controls]`).top).toBe('var(--dsh-mobile-safe-area-inset-top, env(safe-area-inset-top, 0px))')+ })+it('gives the menu a full-height list with wrapping 52px touch targets', () => {expect(declarations(`${panel} [data-dsh-mobile-settings-nav]`)).toMatchObject({'display': 'flex',@@ -153,16 +159,16 @@ describe('mobile settings layout contract', () => {'position': 'absolute','height': '52px','grid-template-columns': '40px minmax(0, 1fr)',- 'left': 'calc(12px + env(safe-area-inset-left, 0px))',- 'right': 'calc(64px + env(safe-area-inset-right, 0px))',+ 'left': 'calc(12px + var(--dsh-mobile-safe-area-inset-left, env(safe-area-inset-left, 0px)))',+ 'right': 'calc(64px + var(--dsh-mobile-safe-area-inset-right, env(safe-area-inset-right, 0px)))',})})it('keeps the native close button reachable above both views with visible keyboard focus', () => {expect(declarations(`${panel} [data-dsh-mobile-settings-close]`)).toMatchObject({'position': 'absolute',- 'top': 'calc(6px + env(safe-area-inset-top, 0px))',- 'right': 'calc(12px + env(safe-area-inset-right, 0px))',+ 'top': 'calc(6px + var(--dsh-mobile-safe-area-inset-top, env(safe-area-inset-top, 0px)))',+ 'right': 'calc(12px + var(--dsh-mobile-safe-area-inset-right, env(safe-area-inset-right, 0px)))','display': 'flex','width': '40px','height': '40px',diff --git a/packages/dsh-tauri-mobile-ui/src/client/styles/settings.cssr.ts b/packages/dsh-tauri-mobile-ui/src/client/styles/settings.cssr.tsindex 937e4bd0..1feee59d 100644--- a/packages/dsh-tauri-mobile-ui/src/client/styles/settings.cssr.ts+++ b/packages/dsh-tauri-mobile-ui/src/client/styles/settings.cssr.ts@@ -31,7 +31,7 @@ export default c(`@media ${MOBILE_SETTINGS_MEDIA}`, [minWidth: '0',minHeight: '0',margin: '0',- padding: 'env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px)',+ padding: 'var(--dsh-mobile-safe-area-inset-top, env(safe-area-inset-top, 0px)) var(--dsh-mobile-safe-area-inset-right, env(safe-area-inset-right, 0px)) var(--dsh-mobile-safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)) var(--dsh-mobile-safe-area-inset-left, env(safe-area-inset-left, 0px))',gap: '0',border: '0',borderRadius: '0',@@ -143,8 +143,8 @@ export default c(`@media ${MOBILE_SETTINGS_MEDIA}`, [}),c(`${panel} [data-dsh-mobile-settings-close]`, {position: 'absolute',- top: 'calc(6px + env(safe-area-inset-top, 0px))',- right: 'calc(12px + env(safe-area-inset-right, 0px))',+ top: 'calc(6px + var(--dsh-mobile-safe-area-inset-top, env(safe-area-inset-top, 0px)))',+ right: 'calc(12px + var(--dsh-mobile-safe-area-inset-right, env(safe-area-inset-right, 0px)))',zIndex: '2',display: 'flex',alignItems: 'center',@@ -159,9 +159,9 @@ export default c(`@media ${MOBILE_SETTINGS_MEDIA}`, [}),c(`${panel} [data-dsh-mobile-settings-controls]`, {position: 'absolute',- top: 'env(safe-area-inset-top, 0px)',- left: 'calc(12px + env(safe-area-inset-left, 0px))',- right: 'calc(64px + env(safe-area-inset-right, 0px))',+ top: 'var(--dsh-mobile-safe-area-inset-top, env(safe-area-inset-top, 0px))',+ left: 'calc(12px + var(--dsh-mobile-safe-area-inset-left, env(safe-area-inset-left, 0px)))',+ right: 'calc(64px + var(--dsh-mobile-safe-area-inset-right, env(safe-area-inset-right, 0px)))',zIndex: '1',display: 'grid',gridTemplateColumns: '40px minmax(0, 1fr)',diff --git a/packages/dsh-tauri-ui/src/client/styles/index.ts b/packages/dsh-tauri-ui/src/client/styles/index.tsindex 95982126..c91b5f21 100644--- a/packages/dsh-tauri-ui/src/client/styles/index.ts+++ b/packages/dsh-tauri-ui/src/client/styles/index.ts@@ -1486,6 +1486,10 @@ const TAILWINDCSS_GENERATED = `--tw-shadow: var(--dsw-elevation-prominent);box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);}+ .ring {+ --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);+ }.outline {outline-style: var(--tw-outline-style);outline-width: 1px;diff --git a/patches/bumpp.patch b/patches/bumpp.patchindex c5b8dad0..f38de58e 100644--- a/patches/bumpp.patch+++ b/patches/bumpp.patch@@ -1,18 +1,19 @@diff --git a/dist/config-uYUPRhMz.mjs b/dist/config-uYUPRhMz.mjs-index 8faa393..0b3d58b 100644+index 8faa3939..abd3a653 100644--- a/dist/config-uYUPRhMz.mjs+++ b/dist/config-uYUPRhMz.mjs-@@ -6304,6 +6304,9 @@ async function updateFile(relPath, operation) {+@@ -6304,6 +6304,10 @@ async function updateFile(relPath, operation) {case "jsr.jsonc":case "deno.json":case "deno.jsonc": return updateManifestFile(relPath, operation);+ case "tauri.conf.json": return updateManifestFile(relPath, operation);+ case "cargo.toml": return updateCargoToml(relPath, operation);+ case "cargo.lock": return updateCargoLock(relPath, operation);++ case "app.json": return updateExpoAppConfig(relPath, operation);default: return updateTextFile(relPath, operation);}}-@@ -6320,7 +6323,9 @@ async function updateManifestFile(relPath, operation) {+@@ -6320,7 +6324,9 @@ async function updateManifestFile(relPath, operation) {const { newVersion } = operation.state;let modified = false;const file = await readJsoncFile(relPath, cwd);@@ -23,7 +24,7 @@ index 8faa393..0b3d58b 100644if (file.data.version == null) return modified;if (file.data.version !== newVersion) {file.modified.push([["version"], newVersion]);-@@ -6335,6 +6340,71 @@ async function updateManifestFile(relPath, operation) {+@@ -6335,6 +6341,94 @@ async function updateManifestFile(relPath, operation) {return modified;}/**@@ -91,6 +92,29 @@ index 8faa393..0b3d58b 100644+ }+ return modified;+}++/**++* Updates app.json: `expo.version` follows the desktop version and++* `expo.android.versionCode` is incremented by one (Android requires a strictly++* increasing versionCode; the historical rule is +1 per version change).++*++* @returns - `true` if the file was actually modified++*/++async function updateExpoAppConfig(relPath, operation) {++ const { cwd } = operation.options;++ const { newVersion } = operation.state;++ let modified = false;++ const file = await readJsoncFile(relPath, cwd);++ const expo = file.data?.expo;++ if (!expo || typeof expo !== "object" || Array.isArray(expo)) return modified;++ const versionCode = expo.android?.versionCode;++ if (typeof expo.version !== "string" || !Number.isInteger(versionCode) || versionCode < 1) return modified;++ if (expo.version === newVersion) return modified;++ file.modified.push([["expo", "version"], newVersion]);++ file.modified.push([["expo", "android", "versionCode"], versionCode + 1]);++ await writeJsoncFile(file);++ modified = true;++ return modified;++}+/*** Updates all occurrences of the version number in the specified text file.*diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 472750b3..529df9e1 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -68,6 +68,9 @@ catalogs:h3:specifier: 2.0.1version: 2.0.1+ react-native-lucide:+ specifier: npm:[email protected]+ version: 1.50.0valtio:specifier: ^2.3.2version: 2.3.2@@ -193,6 +196,103 @@ catalogs:eslint-plugin-react-refresh:specifier: ^0.5.4version: 0.5.4+ native:+ '@react-native-async-storage/async-storage':+ specifier: 2.2.0+ version: 2.2.0+ expo:+ specifier: ~57.0.26+ version: 57.0.26+ expo-blur:+ specifier: ~57.0.3+ version: 57.0.3+ expo-build-properties:+ specifier: ~57.0.22+ version: 57.0.22+ expo-camera:+ specifier: ~57.0.6+ version: 57.0.6+ expo-constants:+ specifier: ~57.0.20+ version: 57.0.20+ expo-crypto:+ specifier: ~57.0.3+ version: 57.0.3+ expo-dev-client:+ specifier: ~57.0.19+ version: 57.0.19+ expo-font:+ specifier: ~57.0.4+ version: 57.0.4+ expo-linking:+ specifier: ~57.0.11+ version: 57.0.11+ expo-localization:+ specifier: ~57.0.2+ version: 57.0.2+ expo-network:+ specifier: ~57.0.2+ version: 57.0.2+ expo-notifications:+ specifier: ~57.0.21+ version: 57.0.21+ expo-router:+ specifier: ~57.0.24+ version: 57.0.24+ expo-secure-store:+ specifier: ~57.0.4+ version: 57.0.4+ expo-splash-screen:+ specifier: ~57.0.9+ version: 57.0.9+ expo-status-bar:+ specifier: ~57.0.1+ version: 57.0.1+ expo-system-ui:+ specifier: ~57.0.4+ version: 57.0.4+ heroui-native:+ specifier: 1.0.10+ version: 1.0.10+ react-native:+ specifier: 0.86.3+ version: 0.86.3+ react-native-drawer-layout:+ specifier: 4.2.11+ version: 4.2.11+ react-native-gesture-handler:+ specifier: ~2.32.0+ version: 2.32.0+ react-native-reanimated:+ specifier: 4.5.1+ version: 4.5.1+ react-native-safe-area-context:+ specifier: ~5.7.0+ version: 5.7.0+ react-native-screens:+ specifier: ~4.26.0+ version: 4.26.2+ react-native-svg:+ specifier: 15.15.4+ version: 15.15.4+ react-native-webview:+ specifier: 13.16.1+ version: 13.16.1+ react-native-worklets:+ specifier: 0.10.1+ version: 0.10.1+ react-test-renderer:+ specifier: 19.2.8+ version: 19.2.8+ tailwind-merge:+ specifier: 3.7.0+ version: 3.7.0+ tw-animate-css:+ specifier: 1.4.0+ version: 1.4.0+ uniwind:+ specifier: 1.12.1+ version: 1.12.1release:bumpp:specifier: 12.2.1@@ -324,6 +424,9 @@ catalogs:'@types/react-dom':specifier: ^19.2.4version: 19.2.4+ '@types/react-test-renderer':+ specifier: ^19.3.0+ version: 19.3.0'@types/semver':specifier: ^7.8.0version: 7.8.0@@ -383,7 +486,7 @@ catalogs:patchedDependencies:'@tauri-apps/[email protected]': 6bbec7f8a8e969a867d222e8b2b542d2dbd639ffbaf2184a4df47f330b6ad431- bumpp: 362685edd02f1561e78b740e2b4c1ec2bd8e266eb2e26a64055ae305cac1c3ac+ bumpp: ea42dd1273f65a02e22aa9c25e39361c8dac2320ed2fbff9c58d2bd3f46a40a3importers:@@ -403,10 +506,13 @@ importers:version: 3.2.4(@react-aria/[email protected]([email protected]([email protected]))([email protected]))(@react-aria/[email protected]([email protected]([email protected]))([email protected]))(@react-aria/[email protected]([email protected]([email protected]))([email protected]))(@react-spectrum/[email protected]([email protected]([email protected]))([email protected]))(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]([email protected]))([email protected]))([email protected]([email protected]([email protected]))([email protected]))([email protected]([email protected]))([email protected])([email protected])'@heroui/styles':specifier: catalog:runtime- version: 3.2.4([email protected])([email protected])+ version: 3.2.4([email protected])([email protected])'@overlastic/react':specifier: catalog:runtime+ '@react-native-async-storage/async-storage':+ specifier: catalog:native+ version: 2.2.0([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))'@reause/core':specifier: catalog:runtimeversion: 0.1.7([email protected])@@ -428,6 +534,60 @@ importers:dsh-pet-component:specifier: catalog:runtime+ expo:+ specifier: catalog:native+ version: 57.0.26(@babel/[email protected])(@expo/[email protected])(@expo/[email protected])([email protected])([email protected]([email protected]))([email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])([email protected])+ expo-blur:+ specifier: catalog:native+ version: 57.0.3([email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])+ expo-build-properties:+ specifier: catalog:native+ version: 57.0.22([email protected])+ expo-camera:+ specifier: catalog:native+ version: 57.0.6(@types/[email protected])([email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])+ expo-constants:+ specifier: catalog:native+ version: 57.0.20([email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))+ expo-crypto:+ specifier: catalog:native+ version: 57.0.3([email protected])+ expo-dev-client:+ specifier: catalog:native+ version: 57.0.19([email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))+ expo-font:+ specifier: catalog:native+ version: 57.0.4([email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])+ expo-linking:+ specifier: catalog:native+ version: 57.0.11([email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])+ expo-localization:+ specifier: catalog:native+ version: 57.0.2([email protected])([email protected])+ expo-network:+ specifier: catalog:native+ version: 57.0.2([email protected])([email protected])+ expo-notifications:+ specifier: catalog:native+ version: 57.0.21([email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])([email protected])+ expo-router:+ specifier: catalog:native+ version: 57.0.24(d7b84b55689872de76f06bc38ecca4aa)+ expo-secure-store:+ specifier: catalog:native+ version: 57.0.4([email protected])+ expo-splash-screen:+ specifier: catalog:native+ version: 57.0.9([email protected])([email protected])+ expo-status-bar:+ specifier: catalog:native+ version: 57.0.1([email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])+ expo-system-ui:+ specifier: catalog:native+ version: 57.0.4([email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))+ heroui-native:+ specifier: catalog:native+ version: 1.0.10(d3013b269d8332046d015128c9192891)i18next:specifier: catalog:runtimeversion: 26.3.6([email protected])@@ -439,16 +599,55 @@ importers:version: 19.2.8([email protected])react-i18next:specifier: catalog:runtime- version: 17.0.11([email protected]([email protected]))([email protected]([email protected]))([email protected])([email protected])+ version: 17.0.11([email protected]([email protected]))([email protected]([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])([email protected])react-if-lite:specifier: catalog:runtimeversion: 0.1.0([email protected])+ react-native:+ specifier: catalog:native+ version: 0.86.3(@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])+ react-native-drawer-layout:+ specifier: catalog:native+ version: 4.2.11([email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])+ react-native-gesture-handler:+ specifier: catalog:native+ version: 2.32.0([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])+ react-native-lucide:+ specifier: 'catalog:'+ version: [email protected](@types/[email protected])([email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])+ react-native-reanimated:+ specifier: catalog:native+ version: 4.5.1([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])+ react-native-safe-area-context:+ specifier: catalog:native+ version: 5.7.0([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])+ react-native-screens:+ specifier: catalog:native+ version: 4.26.2([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])+ react-native-svg:+ specifier: catalog:native+ version: 15.15.4([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])+ react-native-webview:+ specifier: catalog:native+ version: 13.16.1([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])+ react-native-worklets:+ specifier: catalog:native+ version: 0.10.1(@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])semver:specifier: catalog:runtimeversion: 7.8.5+ tailwind-merge:+ specifier: catalog:native+ version: 3.7.0tailwind-variants:specifier: catalog:runtime- version: 3.3.1([email protected])([email protected])+ version: 3.3.1([email protected])([email protected])+ tw-animate-css:+ specifier: catalog:native+ version: 1.4.0+ uniwind:+ specifier: catalog:native+ version: 1.12.1(@expo/[email protected]([email protected])([email protected]))([email protected])([email protected])([email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])([email protected])unstorage:specifier: catalog:utilsversion: 1.17.5([email protected])@@ -587,7 +786,7 @@ importers:version: 4.1.11'@tailwindcss/vite':specifier: catalog:build- version: 4.1.11([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected]))+ version: 4.1.11([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))'@tauri-apps/cli':specifier: catalog:tauriversion: 2.11.4@@ -606,6 +805,9 @@ importers:'@types/react-dom':specifier: catalog:typesversion: 19.2.4(@types/[email protected])+ '@types/react-test-renderer':+ specifier: catalog:types+ version: 19.3.0'@types/semver':specifier: catalog:typesversion: 7.8.0@@ -614,7 +816,7 @@ importers:version: 1.15.6'@vitejs/plugin-react':specifier: catalog:build- version: 4.7.0([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected]))+ version: 4.7.0([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))'@vitest/coverage-v8':specifier: catalog:testingversion: 4.1.11([email protected])@@ -629,7 +831,7 @@ importers:version: 1.0.0bumpp:specifier: catalog:release- version: 12.2.1(patch_hash=362685edd02f1561e78b740e2b4c1ec2bd8e266eb2e26a64055ae305cac1c3ac)+ version: 12.2.1(patch_hash=ea42dd1273f65a02e22aa9c25e39361c8dac2320ed2fbff9c58d2bd3f46a40a3)changelogithub:specifier: catalog:releaseversion: 15.0.5@@ -669,6 +871,9 @@ importers:publint:specifier: catalog:cliversion: 0.3.24+ react-test-renderer:+ specifier: catalog:native+ version: 19.2.8([email protected])shiki:specifier: catalog:testingversion: 4.3.1@@ -689,10 +894,10 @@ importers:version: 5.8.3vite:specifier: catalog:build- version: 7.3.6(@types/[email protected])([email protected])([email protected])([email protected])([email protected])+ version: 7.3.6(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])vitest:specifier: catalog:testing- version: 4.1.11(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected]))+ version: 4.1.11(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))webdriverio:specifier: catalog:testingversion: 9.31.9@@ -744,7 +949,7 @@ importers:version: 0.1.0([email protected])tailwind-variants:specifier: catalog:runtime- version: 3.3.1([email protected])([email protected])+ version: 3.3.1([email protected])([email protected])tsdown:specifier: catalog:cliversion: 0.17.4(@emnapi/[email protected])(@emnapi/[email protected])([email protected])([email protected])([email protected])([email protected])@@ -975,7 +1180,7 @@ importers:version: 0.17.4(@emnapi/[email protected])(@emnapi/[email protected])([email protected])([email protected])([email protected])([email protected])vitest:specifier: catalog:testing- version: 4.1.11(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected]))+ version: 4.1.11(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))packages/dsh-tauri-notification:dependencies:@@ -1000,7 +1205,7 @@ importers:version: 0.17.4(@emnapi/[email protected])(@emnapi/[email protected])([email protected])([email protected])([email protected])([email protected])vitest:specifier: catalog:testing- version: 4.1.11(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected]))+ version: 4.1.11(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))packages/dsh-tauri-pet:dependencies:@@ -1101,7 +1306,7 @@ importers:version: 5.8.3vitest:specifier: catalog:testing- version: 4.1.11(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected]))+ version: 4.1.11(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))packages/dsh-tauri-rightclick:dependencies:@@ -1166,7 +1371,7 @@ importers:version: 0.17.4(@emnapi/[email protected])(@emnapi/[email protected])([email protected])([email protected])([email protected])([email protected])vitest:specifier: catalog:testing- version: 4.1.11(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected]))+ version: 4.1.11(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))packages/dsh-tauri-tsdown:devDependencies:@@ -1377,14 +1582,39 @@ packages:resolution: {integrity: sha512-gZbepsdh3WDtgZKWL+vTPh71LSBrm/Y4/QDZBVCcYfmeTEEuoOYwlSy+G1StfJg+/Zy550u/3TATbm7qDbbMtg==}engines: {node: '>=6.9.0'}+ '@babel/[email protected]':+ resolution: {integrity: sha512-OoK6239jHPuSQOoS0kfTVKn0b/rVTk0seKq4Gd2UMLtmOVLjDC0ki3e+c90Trqv2gMfvJFqkiljrr568+qddiw==}+ engines: {node: '>=6.9.0'}+'@babel/[email protected]':resolution: {integrity: sha512-wem6WaBj4NaVYVdNhLPPVacES6ZJ+KBBfSkTMD3YZxbP3rm3Di85tJU5ljaUNhaOynt+Aj0xruhYuzQBt8n71g==}engines: {node: '>=6.9.0'}+ '@babel/[email protected]':+ resolution: {integrity: sha512-IY3ZD9Tmooqr3TUhc3DUWxiuo8xx1DWLhd5M7hQ+ZWJamqM2BbalrBJb2MisSLoYorOj75U03qULCxQTY9r3hg==}+ engines: {node: '>=6.9.0'}+ peerDependencies:+ '@babel/core': ^7.0.0++ '@babel/[email protected]':+ resolution: {integrity: sha512-907Uymvqgg1dwUA+7IGwFAOSYzQOuzPXKNJ1yxzwPffzkYFg2q2eHi1fIOs6sXkG9NbIUMunnUlkYsfRFNvomg==}+ engines: {node: '>=6.9.0'}+ peerDependencies:+ '@babel/core': ^7.0.0++ '@babel/[email protected]':+ resolution: {integrity: sha512-47UwBLPpQi1NoWzLuHNjRoHlYXMwIJoBf7MFou6viC/sIHWYygpvr0B6IAyh5sBdA2nr2LPIRww8lfaUVQINBA==}+ peerDependencies:+ '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0+'@babel/[email protected]':resolution: {integrity: sha512-3nQVUAtvkKH9zahfWgw96Jc/uFOmjACE1kQz82E2lqWmHBgjzbNlsC22nuQTfahmWeQtTq5nQ/4Nnd2A1wj4zA==}engines: {node: '>=6.9.0'}+ '@babel/[email protected]':+ resolution: {integrity: sha512-j+7JYmk1JYDtACIGj0QJqqWZjoUpMoEikQGADMaHgCMCSDqd2+P32rfcibUNrGOMWrlzK1WJBdxrB3JJQZwWtg==}+ engines: {node: '>=6.9.0'}+'@babel/[email protected]':resolution: {integrity: sha512-ejHwrQQYcm9xnTivShn2IDOlIzInN34AXskvq9QicvCtEzq1Vzclu/tKF8Jq1Cg8JG2GL6/EmjgsCT7lXepE3g==}engines: {node: '>=6.9.0'}@@ -1395,10 +1625,30 @@ packages:peerDependencies:'@babel/core': ^7.0.0+ '@babel/[email protected]':+ resolution: {integrity: sha512-+kmGVjcT9RGYzoDwdwEqEvGgKe3BYq+O1iGzjFubaNgZHwYHP6lsF2Yghf4kEuv9BV7tYDZ913aBW9am6YKong==}+ engines: {node: '>=6.9.0'}+'@babel/[email protected]':resolution: {integrity: sha512-G7sHYigPY17oO5SYWnfD/0MTBwVR781S/JI643e/JhUYgVgWE/61SoW3NH9KWUKyKq5LVh3npif99Wkt6j86Jw==}engines: {node: '>=6.9.0'}+ '@babel/[email protected]':+ resolution: {integrity: sha512-16AMiW26DbXWBbr3B8wNozKM0ydMLB892vaOaJW/fPJdnT8vJk5sdkQcU/isqUxyCE0cEoa8wZOcbgDuC4b6Og==}+ engines: {node: '>=6.9.0'}+ peerDependencies:+ '@babel/core': ^7.0.0++ '@babel/[email protected]':+ resolution: {integrity: sha512-atfGXWSeCiF4DnKZIfmJfQRkSw9b9gNNXR1kqKjbhG4pGYCOnkp8OcTB8E3NXjBu8NpheSnOeNKz8KT7UNFTmQ==}+ engines: {node: '>=6.9.0'}+ peerDependencies:+ '@babel/core': ^7.0.0++ '@babel/[email protected]':+ resolution: {integrity: sha512-brcMGQaVzIeUb+6/bs1Av0f8YuNNjKY2JyvfRCsFuFsdKccEQ5Ges2y74D74NZ1Rz8lKJ9ksJkfqwQFJ/iNEyQ==}+ engines: {node: '>=6.9.0'}+'@babel/[email protected]':resolution: {integrity: sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==}engines: {node: '>=6.9.0'}@@ -1411,6 +1661,10 @@ packages:resolution: {integrity: sha512-N9ZErrD+yW5geCDtBqnOoxmR8+tNKiGuxKlDpuJxfsqpa2dFcexaziGAE/qoHLiDDreVNMupxGmSoNlyvsA3gw==}engines: {node: '>=6.9.0'}+ '@babel/[email protected]':+ resolution: {integrity: sha512-iES0Skag9ERIF68aXadpO6dbXa03mNWK3sEqJaMnLNs/eC3l0lkImdfoy6Y09/SfkpawdAB4RjQ7PVA7TcVGdw==}+ engines: {node: '>=6.9.0'}+'@babel/[email protected]':resolution: {integrity: sha512-1k2lAGRMfHTcwuNYcCNUmaUffmQv8KWMfh2iJUUeRlwlwH4FdNG7mfPI10NPfLHJFThE4Tyr4mv7kTNZOiPuBg==}engines: {node: '>=6.9.0'}@@ -1420,6 +1674,201 @@ packages:engines: {node: '>=6.0.0'}hasBin: true+ '@babel/[email protected]':+ resolution: {integrity: sha512-EtU0Hi3GvrTqD56xKmZvV/uCXK2ZbwVNPNLAquVItcAZpUhkXwWlo3Fmj0c2LxgSf2I8IDULeAepwNP1OefLXg==}+ engines: {node: '>=6.9.0'}+ peerDependencies:+ '@babel/core': ^7.0.0-0++ '@babel/[email protected]':+ resolution: {integrity: sha512-p+G5BNXDcy3bOXplhY4HybQ1GxH3i2Tppmdm/3epyRu2VgJJZuUlZ61MqRTg582Q7ZLBdP7fePYvsumSEkMxcQ==}+ engines: {node: '>=6.9.0'}+ peerDependencies:+ '@babel/core': ^7.0.0-0++ '@babel/[email protected]':+ resolution: {integrity: sha512-9MTTLbF39X6sqM92JPEsoI7++26hjZvzkxKZy64aMhWLH2mPkJ/Q3AV4QLmls3R14FpSpkOwQQfUh962JGQxxg==}+ engines: {node: '>=6.9.0'}+ peerDependencies:+ '@babel/core': ^7.0.0-0++ '@babel/[email protected]':+ resolution: {integrity: sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==}+ peerDependencies:+ '@babel/core': ^7.0.0-0++ '@babel/[email protected]':+ resolution: {integrity: sha512-foag0BB37ROhdeIX9O8G0jX7hw0UekJc04cHMrYLOnrErsnBKqJGHJ8eDRpoCFZBvEPPygmmtw4qyU97qa4oOw==}+ engines: {node: '>=6.9.0'}+ peerDependencies:+ '@babel/core': ^7.0.0-0++ '@babel/[email protected]':+ resolution: {integrity: sha512-ajMX6QPcyomotqwpzhkYGxcK2i/us0rs1Qo9QvUpa+Fca0FTmqrzKrctoIYLMxcOhGZldGT/BAVkRGTWBiR8gQ==}+ engines: {node: '>=6.9.0'}+ peerDependencies:+ '@babel/core': ^7.0.0-0++ '@babel/[email protected]':+ resolution: {integrity: sha512-TSu8+mHCoEaaCDEZ0I3+6mvTBYR4PCxQwf2z9/r5Tbztv6NaLR3B9thGTTxX2WGuGHJqRiAbKPeGTJ5XWXVg6A==}+ engines: {node: '>=6.9.0'}+ peerDependencies:+ '@babel/core': ^7.0.0-0++ '@babel/[email protected]':+ resolution: {integrity: sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==}+ peerDependencies:+ '@babel/core': ^7.0.0-0++ '@babel/[email protected]':+ resolution: {integrity: sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==}+ peerDependencies:+ '@babel/core': ^7.0.0-0++ '@babel/[email protected]':+ resolution: {integrity: sha512-ngr+82Sh0xMz25TPCZi+nC2iTzjfCdWS2ONXTp/PtSCHCgaCNBpdMqgvJ2ccdLlClVZ7sisIgB914j/JFe+RZA==}+ engines: {node: '>=6.9.0'}+ peerDependencies:+ '@babel/core': ^7.0.0-0++ '@babel/[email protected]':+ resolution: {integrity: sha512-N7zArUXWzAMzm+/N0uPBeVB3Fam5lMxtUwMmDK5f/IBBS7a7p1qeUoxd/6CckXoxUdgsntq1Dh8xNW06maZbDQ==}+ engines: {node: '>=6.9.0'}+ peerDependencies:+ '@babel/core': ^7.0.0-0++ '@babel/[email protected]':+ resolution: {integrity: sha512-d98gXZkgswvkyohMBABkhm3GeXhYj8psWfwQ2C7gtfrKGTykQa/iOIi+JJhwMjPlZ6Vm2XN+DCf3Es1EoG4ZLA==}+ engines: {node: '>=6.9.0'}+ peerDependencies:+ '@babel/core': ^7.0.0-0++ '@babel/[email protected]':+ resolution: {integrity: sha512-pcUb2SS+RMo9TWVBwKGI5ShtoG7R+zBsFmCKDa6fe8c+hPr3XJlZgoE5j6i8W7gDjhyvy+85vmYexanvXh3d1w==}+ engines: {node: '>=6.9.0'}+ peerDependencies:+ '@babel/core': ^7.0.0-0++ '@babel/[email protected]':+ resolution: {integrity: sha512-ONyr4+AZhKh8yKWInVxU9AXA9EbsyeLcL6V0dJy6M2/62vuvpGm29zzuymbTpdc451GEpDIdAyPLP3r+P61yKQ==}+ engines: {node: '>=6.9.0'}+ peerDependencies:+ '@babel/core': ^7.0.0-0++ '@babel/[email protected]':+ resolution: {integrity: sha512-GtcpjFvanPfzNQi3eTitsCqtRRmmqzpy/A+yhTR1HaZo1Ly3EA8ZXxlPyHdR8/IuRMYc3E4wdGBewB2QKQjAaA==}+ engines: {node: '>=6.9.0'}+ peerDependencies:+ '@babel/core': ^7.0.0-0++ '@babel/[email protected]':+ resolution: {integrity: sha512-kibJgmEdX2iMwsHY2tSZNDgj8PwIlCQz7FK9KuGKO8zsuoUwSEhoNnNVp/emKWrbY4HeO6kkXfdMqRKKKXBm2A==}+ engines: {node: '>=6.9.0'}+ peerDependencies:+ '@babel/core': ^7.12.0++ '@babel/[email protected]':+ resolution: {integrity: sha512-qV0OGGBVacduzQHE649JyCneOFI/maT+YKsO+K4Yi3xv2wTPNjM/W2o2gdzMwEAZz7fXNTHAe0NcSg30bIN69g==}+ engines: {node: '>=6.9.0'}+ peerDependencies:+ '@babel/core': ^7.0.0-0++ '@babel/[email protected]':+ resolution: {integrity: sha512-iPX8aD6H9zV5s7ZsqTdNocPN/MGQ5sSMnElKrktxjJRMnB2jN/1p2+R7GkfD6CAYoVFqy5A4XnSIUeGgJzIWpg==}+ engines: {node: '>=6.9.0'}+ peerDependencies:+ '@babel/core': ^7.0.0-0++ '@babel/[email protected]':+ resolution: {integrity: sha512-24B2nOy2TeJSMheqwPD4DDQOV/elLSIlKxjZt4i05H5AgdPdWR3n18HnNrcJ+j76WJd9gbwb9jPjNYUy6RautA==}+ engines: {node: '>=6.9.0'}+ peerDependencies:+ '@babel/core': ^7.0.0-0++ '@babel/[email protected]':+ resolution: {integrity: sha512-wRHeUjUjCZnMHmiO5bRgjFLcoEh7JyTdByOW11ahhwNa4V0bmeGEaIvt51yq0zQp2yWIpqfxXXPyUP6GFJZHOQ==}+ engines: {node: '>=6.9.0'}+ peerDependencies:+ '@babel/core': ^7.0.0-0++ '@babel/[email protected]':+ resolution: {integrity: sha512-zeSIHh0+E1Um1WJRXCFlHQYu2ieJNdivLLjlBEp+dIBu3S51n+SZZmIXjxnItw6pz56Cn+KvK68BIBVsxq2JiQ==}+ engines: {node: '>=6.9.0'}+ peerDependencies:+ '@babel/core': ^7.0.0-0++ '@babel/[email protected]':+ resolution: {integrity: sha512-A0H91hh6W8MFRkp5TqJmMr39jzGD1A1E1Ysiv2O06Sfbhkapm+XyIzxWCEh5kqwOZ1/8QZ0dY3SeQ7XBqfJd5Q==}+ engines: {node: '>=6.9.0'}+ peerDependencies:+ '@babel/core': ^7.0.0-0++ '@babel/[email protected]':+ resolution: {integrity: sha512-j0vCldybPC5b5dwCQOJ21uKtHzt7hxLygJTg9eF1ScfaikEDNfzn94XoW5Fi+seBR0nCyL23xaBFFkq7dTM8XQ==}+ engines: {node: '>=6.9.0'}+ peerDependencies:+ '@babel/core': ^7.0.0-0++ '@babel/[email protected]':+ resolution: {integrity: sha512-vuFoLwr4qnv2xbZ16SQd6uPcH5FNrLHhk/Jzo++0XJFcaDsr4gjJVg6j398oMHiC+83k/GiBzviwF5KBJkPUtQ==}+ engines: {node: '>=6.9.0'}+ peerDependencies:+ '@babel/core': ^7.0.0++ '@babel/[email protected]':+ resolution: {integrity: sha512-idmp1dFaekP9GbcMvG24Kvw2BfhFZjHnNJCkV4WuIY4PskJzwI3f1N5OdgYke38T7rftO6ERulFRn2cFeZwRkg==}+ engines: {node: '>=6.9.0'}+ peerDependencies:+ '@babel/core': ^7.0.0-0++ '@babel/[email protected]':+ resolution: {integrity: sha512-Ld98jn4c0smUywL57m7SgsHq3OpThOa6LqZJif3G6jYOovPleoFhVrBJ1WegRApSFB2wu4+RelAj9AC9G08Z4A==}+ engines: {node: '>=6.9.0'}+ peerDependencies:+ '@babel/core': ^7.0.0-0++ '@babel/[email protected]':+ resolution: {integrity: sha512-sLsyndxK2VwX6yNUOakMb7Sh553ZTe/vVM1XJ+9Z5aW1ytsc8xOIwmyk05NNjN60vkc5/KqoTH6hB4V41LJhng==}+ engines: {node: '>=6.9.0'}+ peerDependencies:+ '@babel/core': ^7.0.0-0++ '@babel/[email protected]':+ resolution: {integrity: sha512-6GM1dhvK3gNODkXcEcMCOLEDCLSoZ/sBbro2Ax8HURyasQ4NshagQixkRFdh5niI6E4gmA/jYI/4aT7rRos3ZQ==}+ engines: {node: '>=6.9.0'}+ peerDependencies:+ '@babel/core': ^7.0.0-0++ '@babel/[email protected]':+ resolution: {integrity: sha512-ZDOBqV/qLYJI0YElr8DcENEyARsFQeESqWXH6gZlghYXuPPjvweuDhP4VyEi4BlUBlLRFZVjxoZDMjxhLW766g==}+ engines: {node: '>=6.9.0'}+ peerDependencies:+ '@babel/core': ^7.0.0-0++ '@babel/[email protected]':+ resolution: {integrity: sha512-/6Rz4DK1ETDEM/bWHsPHcaEe7ZaT1EqSXjtSP/L0DijOYuaUhiRiOKcwpZ8P7zR4xXEHc2ITdiCgBm9Tpyv9ug==}+ engines: {node: '>=6.9.0'}+ peerDependencies:+ '@babel/core': ^7.0.0-0++ '@babel/[email protected]':+ resolution: {integrity: sha512-+BNo06dnrzdNNqCm1X6YUaVv0DKk8Q+JYcoZfOkLhYWNCXzlwTSRq8zGWayT1csjcpNXV9CQTBRRbmTLZac5cA==}+ engines: {node: '>=6.9.0'}+ peerDependencies:+ '@babel/core': ^7.0.0-0++ '@babel/[email protected]':+ resolution: {integrity: sha512-+1wdDMGNb4UPeY3Q4L5yLiYe6TXPXubs4NjrgRFw13hPRLJfEMw2Q5OXkee6/IfdqePIeW4Jjwe3aBh7SdKz4Q==}+ engines: {node: '>=6.9.0'}+ peerDependencies:+ '@babel/core': ^7.0.0-0++ '@babel/[email protected]':+ resolution: {integrity: sha512-Xfy3UVMF04+ypnFbkhvfqtmvwfe92qwQdbGZVonhE+6v35GzlofmOnA1szaZqzb9xYWr0nl1e5EMmzi0DNON1g==}+ engines: {node: '>=6.9.0'}+ peerDependencies:+ '@babel/core': ^7.0.0-0+'@babel/[email protected]':resolution: {integrity: sha512-TL0hMc9xzy86VD31nUiwzd5otRAcyEPcsegCxolO0PvcXuH1v0kECe/UIznYFihpkvU5wg/jk4v0TTEFfm53fw==}engines: {node: '>=6.9.0'}@@ -1432,6 +1881,60 @@ packages:peerDependencies:'@babel/core': ^7.0.0-0+ '@babel/[email protected]':+ resolution: {integrity: sha512-WsZulLVBUHXVj2cUcPVx6UE21TpalB6bHbSFErKT0Ib++ax24jjXe73FqlWvdylFOjiuPHYi6VCcgRad1ItN+A==}+ engines: {node: '>=6.9.0'}+ peerDependencies:+ '@babel/core': ^7.0.0-0++ '@babel/[email protected]':+ resolution: {integrity: sha512-H5E+HBgDpr6Q5t+Aj11tL7XkIui1jhbIoArVQnqjgXo5/3YxkN7ZEBcWF4RQlB0T4rrxJQbXS6kiFV6B7XTqUA==}+ engines: {node: '>=6.9.0'}+ peerDependencies:+ '@babel/core': ^7.0.0-0++ '@babel/[email protected]':+ resolution: {integrity: sha512-0UpIXPtdDtMXfnV2OJAVMLpj3H/92vmkA6lpSRakmycJvj3VUy6Xs1dM8tXRugupykr5WB+LpiVl0J8LMVg2mg==}+ engines: {node: '>=6.9.0'}+ peerDependencies:+ '@babel/core': ^7.0.0-0++ '@babel/[email protected]':+ resolution: {integrity: sha512-xmAscdE/AsqRW7vutbPNoUmu/nF5SrLKPs7aoJgEjo35lLKA/Bc0i2rMv/hr1+Y0o1bQCiVtith3u2vdgRL39Q==}+ engines: {node: '>=6.9.0'}+ peerDependencies:+ '@babel/core': ^7.0.0-0++ '@babel/[email protected]':+ resolution: {integrity: sha512-I+WYbGBAiCn7nA6xBrlgPH+MB7HWb4u8pv5S0Pv7OtwNvIFvCCb24YlttKEeUFVurfBCEaOTnuhlqsb7f0Z5Dg==}+ engines: {node: '>=6.9.0'}+ peerDependencies:+ '@babel/core': ^7.0.0-0++ '@babel/[email protected]':+ resolution: {integrity: sha512-NCSEJ4sLFU2gqAub45HYh4fus2yQ36rr6ei6vpU7NdoJqCpxvEG8E6eJpscGyXP3VHD2Ny+fSXr04k1hoUrFqA==}+ engines: {node: '>=6.9.0'}+ peerDependencies:+ '@babel/core': ^7.0.0-0++ '@babel/[email protected]':+ resolution: {integrity: sha512-FFwIwzU+7SCOuxxV4YtJql6T9981ZVTm+FHO5GhVsRqCTdy0WwrEZh3l42ARpXruJUDGOptdduHW6Zr7pNPLNg==}+ engines: {node: '>=6.9.0'}+ peerDependencies:+ '@babel/core': ^7.0.0-0++ '@babel/[email protected]':+ resolution: {integrity: sha512-7D/x/23/d/3VqZ0QA+LGbZMlGwZjztBygSWWWsfTPoQ1oQ6Q1P6Mr3d0kk42XabyUVw+fha3LqdRsFqeKqvCyA==}+ engines: {node: '>=6.9.0'}+ peerDependencies:+ '@babel/core': ^7.0.0-0++ '@babel/[email protected]':+ resolution: {integrity: sha512-/Foi8vKY2EVbed/1eZx0gJEEwHAIxogrySI7rULcRIvhZzbvoE/b5qG5Ghc0WKAFKOHA9SD1x7RsFlOYdutIiQ==}+ engines: {node: '>=6.9.0'}+ peerDependencies:+ '@babel/core': ^7.0.0-0+'@babel/[email protected]':resolution: {integrity: sha512-Nq8OhGWiZIZGV6hLHoyAKLLcJihP/xFeBMGJoUrxTX2psI8dCifzLhZISFb+VWS3wFMRDmCGw5R+dOySCqPLhw==}engines: {node: '>=6.9.0'}@@ -2222,6 +2725,10 @@ packages:oxlint:optional: true+ '@egjs/[email protected]':+ resolution: {integrity: sha512-XQsZgjm2EcVUiZQf11UBJQfmZeEmOW8DpI1gsFeln6w0ae0ii4dMQEQ0kjl6DspdWX1aGY1/loyXnP0JS06e/A==}+ engines: {node: '>=0.8.0'}+'@emnapi/[email protected]':resolution: {integrity: sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==}@@ -2520,67 +3027,255 @@ packages:resolution: {integrity: sha512-+CNAzxglkrpNf/kKywqQfk74QjtceuOE7Qm+AF8miRvPF/wmmK5+OJOgVh3AVTT3RP2mH3+FOaxlE5v72owk0A==}engines: {node: ^20.19.0 || ^22.13.0 || >=24}- '@formatjs/[email protected]':- resolution: {integrity: sha512-HJnTFeRM2kVFVr5gr5kH1XP6K0JcJtE7Lzvtr3FS/so5f1kpsqqqxy5JF+FRaO6H2qmcMfAUIox7AJteieRtVw==}-- '@formatjs/[email protected]':- resolution: {integrity: sha512-Yabmi9nSvyOMrlSeGGWDiH7rf3a7sIwplbvo/dlz9WCIjzIQAfy1RMf4S0X3yG724n5Ghu2GmEl5NJIV6O9sZQ==}-- '@formatjs/[email protected]':- resolution: {integrity: sha512-7kR78cRrPNB4fjGFZg3Rmj5aah8rQj9KPzuLsmcSn4ipLXQvC04keycTI1F7kJYDwIXtT2+7IDEto842CfZBtw==}-- '@formatjs/[email protected]':- resolution: {integrity: sha512-H13E9Xl+PxBd8D5/6TVUluSpxGNvFSlN/b3coUp0e0JpuWXXnQDiavIpY3NnvSp4xhEMoXyyBvVfdFX8jglOHQ==}-- '@formatjs/[email protected]':- resolution: {integrity: sha512-XOMO2Hupl0wdd172Y06h6kLpBz6Dv+J4okPLl4LPtzbr8f66WbIoy4ev98EBuZ6ZK4h5ydTN6XneT4QVpD7cdA==}+ '@expo-google-fonts/[email protected]':+ resolution: {integrity: sha512-aZztj44PyA/sj3TXSwwpLJwqMlTUJ49okbZJYURzEcuERxMQB0KbX7RrLBi8WJnuWz5HFOLlTRxORrJfNnUPNQ==}- '@genapi/[email protected]':- resolution: {integrity: sha512-8Ka8z7geQtWU8oRLCyjYvvyyJlz5hTGXt4z1ZKHaUHuWItshdf8fYY1G+axXYeLvWZRNbG471gbAOUbNZFN2VQ==}+ '@expo/[email protected]':+ resolution: {integrity: sha512-Jauk4chxmpVG5ElrMLTCwjFP20jbYU7PB4l3LYV8j+4e/3HU5jdl7qTQ4eVy1AaDUE9Ia2NCQ5A9kar2V1gaLg==}hasBin: true+ peerDependencies:+ expo: '*'+ expo-router: '*'+ react-native: '*'+ peerDependenciesMeta:+ expo-router:+ optional: true+ react-native:+ optional: true- '@genapi/[email protected]':- resolution: {integrity: sha512-1U9BkHF4I0CW4ditGSHzpQNCw9joTACyCrO67C9YpyGI5xAssIlRivH4eykKW9cBm7nKvPRGqHGmQLcCYyysTQ==}+ '@expo/[email protected]':+ resolution: {integrity: sha512-iNe0puxwBNEcuua9gmTGzq+SuMDa0iATai1FlFTMHJ/vUmKvN/V//drXoLJkVb5i5H3iE/n/qIJxyoBnXouD0w==}- '@genapi/[email protected]':- resolution: {integrity: sha512-k/wttAj1G0iuP9f2mZo8tWM6H5qOgoeloky+OtcsiHATny1TJd7RIE60bKLaznDz5rLo5I6WZrC6mWtFxFn8kg==}+ '@expo/[email protected]':+ resolution: {integrity: sha512-hHgfL1avkCdEvDSw7IwlKwRYYNgcxzbNNMIk6W6lTkJpY0MajinAfeJUS0J+wPCsjUfGbVqOJM+XhPaO5ulUxg==}- '@genapi/[email protected]':- resolution: {integrity: sha512-g8Ies+aU230xkGTDc088K3BPUxUzJe/Ocpk2pDJOFZ+5O5MrmCoCGptF6x2aEt0wNpYWv6EBBJleRPrVnYrzbw==}+ '@expo/[email protected]':+ resolution: {integrity: sha512-ewW08OonrcRIsRKIlFvvcmmafE5zemb1ocu3HkNwtVPyRtj2w42pZCAkMIROYpcVBaPnc3mDT9UZDzwXWC3i6g==}- '@genapi/[email protected]':- resolution: {integrity: sha512-Onc5EL9KAlje6mmi/CIP5K33P24IQ3JoTCddwfORVyrOpJJCoTZPC+0x7GF5AWVJpVNDnaoQD32mLdMzKpRanQ==}+ '@expo/[email protected]':+ resolution: {integrity: sha512-dmzlKraIFxa7wLwV6K7WzI8jp6QZpW6Mc5mGjLimJUFjzh4uQdYaT3m3plEutM5yxBoBEwqzks7l+I/ljCbxAQ==}- '@genapi/[email protected]':- resolution: {integrity: sha512-a/hoUVGW6ubmd84gYrcHexytsndS7DG5jrNlNRG8NaylSu3lrCSjBKF4SHzWiWglaDmfp6a+u5y6ZRgHI6EQtw==}+ '@expo/[email protected]':+ resolution: {integrity: sha512-qC4eaxmKMTmJC2ahwyui6ud8f3W60Ss7pMkpBq40Hu3zyiAaugPXnZ24145U7K36qO9UHdZUVxsCvIpz2RYYCA==}- '@gravity-ui/[email protected]':- resolution: {integrity: sha512-KWghsvXDq+5AapT3bh2a/p1Iv923PDFln/U51fqaK9AMOftiOlkWfJHSJEFSxpgvbCJ/MOHjCSbhCT7Jx9mJAg==}+ '@expo/[email protected]':+ resolution: {integrity: sha512-GyUf+wFNkbttaX0jR7MZa9bm77U0IrLg6d2AjpxdyoXw/w4abHoXG0oFufwLMgP9zLTd5+Ct4X/ffNUTnlzZgg==}peerDependencies:react: '*'+ react-native: '*'peerDependenciesMeta:react:optional: true+ react-native:+ optional: true- '@hairy/[email protected]':- resolution: {integrity: sha512-KF3rVUeYGdjjQ0VBYwhH7BplmUXE4kgq6UpMecYHxL2ujP230iC0nKjA+SiBv25ycpmdCyVRcsYZdRbn+lZ6Gg==}-- '@heroui/[email protected]':- resolution: {integrity: sha512-ZXCTyz1G7bgCdHVxRPy4vIRI/wdb0ZvzEUJGG7CAEp0zqQsKrTH1o9i3Ns8yM6EidtAyfMosULN29gFA3wegBA==}+ '@expo/[email protected]':+ resolution: {integrity: sha512-lAKsME4SAq+8sf56oN0DX5TBYyruupoRxbWbD2xf9RnKY8y6x8eb9LCE5pxSN0qyWdqnp+0wmyWzDkKboThKAw==}peerDependencies:- '@react-aria/i18n': ^3.13.1- '@react-aria/ssr': ^3.10.1- '@react-aria/utils': ^3.34.1- react: '>=19.0.0'- react-aria: ^3.51.0- react-aria-components: ^1.20.0- react-dom: '>=19.0.0'- tailwindcss: '>=4.0.0'+ expo: '*'+ react: '*'+ react-native: '*'- '@heroui/[email protected]':- resolution: {integrity: sha512-tjiT7VFUSjw7TA6ZjeT+D3oX62+D27l7dhPwW+emwPnkdkRoKALFJEPBsxpmEI/x18uNkKFIoTk85bICyOO8Vg==}- peerDependencies:- tailwindcss: '>=4.0.0'+ '@expo/[email protected]':+ resolution: {integrity: sha512-M1NXeZCA1mkMkYOyIe7PlyRX0/jqFtMoJgyblnlq/vpCRfmueFT7RnGSQG8uEFDF5WHOFGijAQ3fogPh3/n5Ng==}+ engines: {node: '>=20.12.0'}++ '@expo/[email protected]':+ resolution: {integrity: sha512-cpsLZE4rqkc1Y3eZTkxB98jrqY1YXgetmtxFt8q89jBRmk3quRuk1BZo+VcnCSObZardjg99r1k5xijEMONFGA==}++ '@expo/[email protected]':+ resolution: {integrity: sha512-h1x+w+JpNRu88a/5SMZRzJs9YDGR/f7R8ApCr7OdenhqmJ00hFxQMzvxajDLL+1P2Y2g/ND0xksusqvBqWSW5Q==}+ hasBin: true++ '@expo/[email protected]':+ resolution: {integrity: sha512-KPQBTpmpAfy/Vu9y4wPW808/qtZxjYmyJg8cm2QCPAupp+qEWA3b5zmk0ulOwQ9OgeHxuCPgUqWgkwHFo7UsrQ==}++ '@expo/[email protected]':+ resolution: {integrity: sha512-Bz/khd1gIJqDkje7t5ejD5e9jFbm4xEJzWSwRKadRo6gruepbw1xJ3Eb+e58OS8fY1ZNQYjzZbspnuph67sN0g==}++ '@expo/[email protected]':+ resolution: {integrity: sha512-zxHWj4MKKMAL29ZQSY/Fssx4Thluk40JmuGNaeS078wy/NhlFhnVi+rHHunulE3xJAJ0CM73m8VK2+GkF9eRwQ==}++ '@expo/[email protected]':+ resolution: {integrity: sha512-SEdE0pAQrr90bRh3MNR0ZuwoIBw390cYdFgbn7Vk0Mtm9EHaBfP7kYj+2hXnXZJgOEm3/JMtfoD3rV7rWA9FGg==}++ '@expo/[email protected]':+ resolution: {integrity: sha512-IxwS9s1L2muj8mj8AQSuiy7u8OFJdc02NRFo2me/Tj6DiaeG5SREqmpBE4rQpR2cadqSg5jl8Qab8Cjie616dg==}+ peerDependencies:+ '@expo/dom-webview': ^57.0.1+ expo: '*'+ react: '*'+ react-native: '*'++ '@expo/[email protected]':+ resolution: {integrity: sha512-S62Lrq35HZqBFD55423pmWb8PjaiR/W02zQC1uECBmw1vTN8WZaFz4TJ0i21EeJzwfebMb9MLxL8JZ102Z6VbA==}+ peerDependencies:+ expo: '*'+ peerDependenciesMeta:+ expo:+ optional: true++ '@expo/[email protected]':+ resolution: {integrity: sha512-1OXy+uPYY5uc7Tm4VBsd2NRn+3wHhqeqNuEO/Xo4kmYgv8FjYgUAc+bUXON9FpC2ikcLn4EVlGM9ce2exx9Mlg==}++ '@expo/[email protected]':+ resolution: {integrity: sha512-x43WgZoICpp37BhDV7vixe0bNxbVPPGaBLHYc98ZJ8MU+UC2dk39Y2XvkfYMRRbAUSIkCIJiwdERnptlPg0Ckw==}+ peerDependencies:+ '@expo/log-box': ^57.0.4+ expo: '*'+ react: '*'+ react-dom: '*'+ react-native: '*'+ peerDependenciesMeta:+ react-dom:+ optional: true++ '@expo/[email protected]':+ resolution: {integrity: sha512-Ld5AeYMCCDa8bLeWhfuLbZFFjlV3f6ORqyPz2glGh6RltIngMuLf9BTC2yvHFjkKuGxL5SynijmA8xmNNWn5iA==}++ '@expo/[email protected]':+ resolution: {integrity: sha512-Zn03EX6In7ts2lPUW2ESUSkEhEWQN1qqsiXjadtZMJOuZRkMiAg1ZQHuvz9DjByDWNJ2pBwAGyrts9lj9k389g==}+ engines: {node: '>=12'}++ '@expo/[email protected]':+ resolution: {integrity: sha512-y/K+CaYYpZpNGZhSX4HyLT/vyIunFjNfyoxNysPBCefeLKI/VCx6f9LNPzrxayr3rCYO5bl9O8H+HRQK265Nkg==}++ '@expo/[email protected]':+ resolution: {integrity: sha512-3gTReGIUm0oRaMClsAJYxBnVPCl6fVpsl8HS+DTVxDhW4GyVyxg9E/Znm3BvcHtUJ51RJJI14pC1wvrNilCRHw==}++ '@expo/[email protected]':+ resolution: {integrity: sha512-QA8oMZ7y70kjOzw+abhRl9uYC8Nu/abeUTHr0YVxb3pgIC14gc7w543bYtI+5gEDI3q55jKUViIauC76QvZN1w==}++ '@expo/[email protected]':+ resolution: {integrity: sha512-kTAXj9lDFEIPMsbAOGCGbjBbMF0oi7CqkYM79KOX0DDD9wSwXmlKL1z2h8OwsrBf7mbOo2DjlRvZu4BEjrIxGw==}+ peerDependencies:+ typescript: ^5.0.0 || ^5.0.0-0 || ^6.0.0 || ^7.0.0+ peerDependenciesMeta:+ typescript:+ optional: true++ '@expo/[email protected]':+ resolution: {integrity: sha512-0QxbqEkceb1WDeu5VqNdnTPVHlm3U183F7Y1t5LMohmGRAkHVL0PB4tCHBvEqKpLzOzHVObw3reGkJ1tX48h8Q==}+ peerDependencies:+ '@expo/metro-runtime': ^57.0.16+ expo: '*'+ expo-constants: ^57.0.19+ expo-font: ^57.0.4+ expo-router: '*'+ expo-server: ^57.0.3+ react: '*'+ react-dom: '*'+ react-server-dom-webpack: ~19.0.1 || ~19.1.2 || ~19.2.1+ peerDependenciesMeta:+ '@expo/metro-runtime':+ optional: true+ expo-router:+ optional: true+ react-dom:+ optional: true+ react-server-dom-webpack:+ optional: true++ '@expo/[email protected]':+ resolution: {integrity: sha512-fMu/jyN0l1Wzv7XkeWR4IYCx1M8ryui3FdBNGrWwbRgJ7EhxXxK8E2jxP2W3pbgUwUY0V3hG8+GyfCZwny+Lxw==}++ '@expo/[email protected]':+ resolution: {integrity: sha512-Doz2bfiPndXYFPMRwPyGa1k5QaKDVpY806UJj570epIiMzWaYyCtobasyfC++qfIXVb5Ocy7r3tP9d62hAQ7IQ==}++ '@expo/[email protected]':+ resolution: {integrity: sha512-eb9xxd/LbuEGSdua4NumCu/McVB9EM+F/JxB9pWgnERw4HQ9XyTNH1KapG6oqLWR8TuRK2LQfzJlmNi94CVobw==}+ engines: {node: '>=12'}++ '@expo/[email protected]':+ resolution: {integrity: sha512-HHQigo3rQWKMDzYDLkubN5WQOYXJJE2eNqIQC2axC2iO3mHdwnIR7FgZVvHWtBwAdzBgAP0ECp8KqS8TiMKvgw==}++ '@expo/[email protected]':+ resolution: {integrity: sha512-4s1ypGNxJhJv2r1fj3wZo4Aubao0zGnCajCuiaTp8pTNrT+1vR8KvyoFEwp+c7gpKm2D58nGCiGBXhEnmKHtDQ==}+ peerDependencies:+ '@babel/core': '*'+ expo: '*'+ react: '*'+ react-dom: '*'+ react-native: '*'+ react-native-worklets: '*'+ peerDependenciesMeta:+ '@babel/core':+ optional: true+ react-dom:+ optional: true+ react-native-worklets:+ optional: true++ '@expo/[email protected]':+ resolution: {integrity: sha512-j+JfTRdCk820J9dU0sA2SqshQIKFOMo7ED84w9MJFcebfbNQgsLztEY/SABDkGnjatrW4xGqnUhVRxSBVyCkXw==}+ peerDependencies:+ ws: ^8.0.0++ '@expo/[email protected]':+ resolution: {integrity: sha512-J3eL4n4h5QTwfD0SIz8OIk6/+sOL/hFZAMacgCM07UNlxBQfJipEpIC2AQxvGkbYeStByJ0TVhQAJo+DeNgaSQ==}+ hasBin: true++ '@formatjs/[email protected]':+ resolution: {integrity: sha512-HJnTFeRM2kVFVr5gr5kH1XP6K0JcJtE7Lzvtr3FS/so5f1kpsqqqxy5JF+FRaO6H2qmcMfAUIox7AJteieRtVw==}++ '@formatjs/[email protected]':+ resolution: {integrity: sha512-Yabmi9nSvyOMrlSeGGWDiH7rf3a7sIwplbvo/dlz9WCIjzIQAfy1RMf4S0X3yG724n5Ghu2GmEl5NJIV6O9sZQ==}++ '@formatjs/[email protected]':+ resolution: {integrity: sha512-7kR78cRrPNB4fjGFZg3Rmj5aah8rQj9KPzuLsmcSn4ipLXQvC04keycTI1F7kJYDwIXtT2+7IDEto842CfZBtw==}++ '@formatjs/[email protected]':+ resolution: {integrity: sha512-H13E9Xl+PxBd8D5/6TVUluSpxGNvFSlN/b3coUp0e0JpuWXXnQDiavIpY3NnvSp4xhEMoXyyBvVfdFX8jglOHQ==}++ '@formatjs/[email protected]':+ resolution: {integrity: sha512-XOMO2Hupl0wdd172Y06h6kLpBz6Dv+J4okPLl4LPtzbr8f66WbIoy4ev98EBuZ6ZK4h5ydTN6XneT4QVpD7cdA==}++ '@genapi/[email protected]':+ resolution: {integrity: sha512-8Ka8z7geQtWU8oRLCyjYvvyyJlz5hTGXt4z1ZKHaUHuWItshdf8fYY1G+axXYeLvWZRNbG471gbAOUbNZFN2VQ==}+ hasBin: true++ '@genapi/[email protected]':+ resolution: {integrity: sha512-1U9BkHF4I0CW4ditGSHzpQNCw9joTACyCrO67C9YpyGI5xAssIlRivH4eykKW9cBm7nKvPRGqHGmQLcCYyysTQ==}++ '@genapi/[email protected]':+ resolution: {integrity: sha512-k/wttAj1G0iuP9f2mZo8tWM6H5qOgoeloky+OtcsiHATny1TJd7RIE60bKLaznDz5rLo5I6WZrC6mWtFxFn8kg==}++ '@genapi/[email protected]':+ resolution: {integrity: sha512-g8Ies+aU230xkGTDc088K3BPUxUzJe/Ocpk2pDJOFZ+5O5MrmCoCGptF6x2aEt0wNpYWv6EBBJleRPrVnYrzbw==}++ '@genapi/[email protected]':+ resolution: {integrity: sha512-Onc5EL9KAlje6mmi/CIP5K33P24IQ3JoTCddwfORVyrOpJJCoTZPC+0x7GF5AWVJpVNDnaoQD32mLdMzKpRanQ==}++ '@genapi/[email protected]':+ resolution: {integrity: sha512-a/hoUVGW6ubmd84gYrcHexytsndS7DG5jrNlNRG8NaylSu3lrCSjBKF4SHzWiWglaDmfp6a+u5y6ZRgHI6EQtw==}++ '@gravity-ui/[email protected]':+ resolution: {integrity: sha512-KWghsvXDq+5AapT3bh2a/p1Iv923PDFln/U51fqaK9AMOftiOlkWfJHSJEFSxpgvbCJ/MOHjCSbhCT7Jx9mJAg==}+ peerDependencies:+ react: '*'+ peerDependenciesMeta:+ react:+ optional: true++ '@hairy/[email protected]':+ resolution: {integrity: sha512-KF3rVUeYGdjjQ0VBYwhH7BplmUXE4kgq6UpMecYHxL2ujP230iC0nKjA+SiBv25ycpmdCyVRcsYZdRbn+lZ6Gg==}++ '@heroui/[email protected]':+ resolution: {integrity: sha512-ZXCTyz1G7bgCdHVxRPy4vIRI/wdb0ZvzEUJGG7CAEp0zqQsKrTH1o9i3Ns8yM6EidtAyfMosULN29gFA3wegBA==}+ peerDependencies:+ '@react-aria/i18n': ^3.13.1+ '@react-aria/ssr': ^3.10.1+ '@react-aria/utils': ^3.34.1+ react: '>=19.0.0'+ react-aria: ^3.51.0+ react-aria-components: ^1.20.0+ react-dom: '>=19.0.0'+ tailwindcss: '>=4.0.0'++ '@heroui/[email protected]':+ resolution: {integrity: sha512-tjiT7VFUSjw7TA6ZjeT+D3oX62+D27l7dhPwW+emwPnkdkRoKALFJEPBsxpmEI/x18uNkKFIoTk85bICyOO8Vg==}+ peerDependencies:+ tailwindcss: '>=4.0.0''@humanfs/[email protected]':resolution: {integrity: sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==}@@ -2622,6 +3317,10 @@ packages:resolution: {integrity: sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==}engines: {node: '>=18.0.0'}+ '@isaacs/[email protected]':+ resolution: {integrity: sha512-RQgQ4uQ+pLbqXfOmieB91ejmLwvSgv9nLx6sT6sD83s7umBypgg+OIBOBbEUiJXrfpnp9j0mRhYYdzp9uqq3lA==}+ engines: {node: '>=12'}+'@jest/[email protected]':resolution: {integrity: sha512-OsqBjHXCn8cadasoAZBP6nWYvMsRhpMzGXTpxJ5aO04NlbdhIz+FVe3q49l0AwVhsz/cEmIpBes6gAFl1/dWQg==}engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0}@@ -2638,10 +3337,18 @@ packages:resolution: {integrity: sha512-HdNQYSdRTEBNrginaqzQtTjG0HRMfrra/z6Ok7uL3S87vSlarIVohEsJsSj5edu3MiHoHjAkvPROz5ZjoKai+w==}engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0}+ '@jest/[email protected]':+ resolution: {integrity: sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==}+ engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}+'@jest/[email protected]':resolution: {integrity: sha512-/hunigyNpc4RCjC0VaW3f5RCUZVM2+WQ65qP7z083Gmvac7or2LI50XVNOtE4YPgBpV0yxYiAgorAPGniCoJmg==}engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0}+ '@jest/[email protected]':+ resolution: {integrity: sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==}+ engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}+'@jest/[email protected]':resolution: {integrity: sha512-LvVYn83nnXPl+Rg98nvcFgjx6nRMTArhSn6RAX/w3ELn54S8A42TYZvsCMdGUqTM8S0wyXbtlQdU6Hi6dykj9g==}engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0}@@ -2656,6 +3363,9 @@ packages:resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==}engines: {node: '>=6.0.0'}+ '@jridgewell/[email protected]':+ resolution: {integrity: sha512-ZMp1V8ZFcPG5dIWnQLr3NSI1MiCU7UETdS/A0G8V/XWHvJv3ZsFqutJn1Y5RPmAPX6F3BiE397OqveU/9NCuIA==}+'@jridgewell/[email protected]':resolution: {integrity: sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==}@@ -2825,6 +3535,9 @@ packages:'@quansync/[email protected]':resolution: {integrity: sha512-4TJ3DFtlf1L5LDMaM6CanJ/0lckGNtJcMjQ1NAV6zDmA0tEHKZtxNKin8EgPaVX1YzljbxckyT2tJrpQKAtngQ==}+ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-rqWnm76nYT8HoNNqEjpgJ7Pw/DrBj5iBTrmEPo6HTX5+VJyBNOqTdv4g89G63HuR5g0AaENoAcH7Is5fF2kZ8Q==}+'@radix-ui/[email protected]':resolution: {integrity: sha512-0Qk603AHGV28BOBO34p7IgD5m+V5Sg/YovfayABkoDDBM5d3NCx0Mp4gGrjzLGes1jV5eNOE1r3itqOR33VC6Q==}peerDependencies:@@ -2838,6 +3551,19 @@ packages:'@types/react-dom':optional: true+ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-9W+B9NPF0NaaPh/1NJd3+KqsnlLqU9H7T2rvww+fp+T/evVXdNAyYcnfRQZFOjkR1ajQp3yORlqnI8soawLvNA==}+ peerDependencies:+ '@types/react': '*'+ '@types/react-dom': '*'+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ peerDependenciesMeta:+ '@types/react':+ optional: true+ '@types/react-dom':+ optional: true+'@radix-ui/[email protected]':resolution: {integrity: sha512-z4eqJvfiNnFMHIIvXP3CY57y2WJs5g2v3X0zm9mEJkrkNv4rDxu+sg9Jh8EkXyeqBkB7SOcboo9dMVqhyrACIg==}peerDependencies:@@ -2847,6 +3573,15 @@ packages:'@types/react':optional: true+ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-+48PbAAbq3didjJxa+OaWY2ZwgAKsNiRGyeHKszblZMQ+kcpd9pAaT11cMkGEie0vsOi3QdeTE6d5Fe3Gn61kA==}+ peerDependencies:+ '@types/react': '*'+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ peerDependenciesMeta:+ '@types/react':+ optional: true+'@radix-ui/[email protected]':resolution: {integrity: sha512-ieIFACdMpYfMEjF0rEf5KLvfVyIkOz6PDGyNnP+u+4xQ6jny3VCgA4OgXOwNx2aUkxn8zx9fiVcM8CfFYv9Lxw==}peerDependencies:@@ -2856,8 +3591,17 @@ packages:'@types/react':optional: true- '@radix-ui/[email protected]':- resolution: {integrity: sha512-9hQc4+GNVtJAIEPEqlYqW5RiYdrr8ea5XQ0ZOnD6fgru+83kqT15mq2OCcbe8KnjRZl5vF3ks69AKz3kh1jrhg==}+ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-RHCUGwKHDr0hDGg4X7ma4JG4/+12qxw8rkh5QKdDldlCvtja6nUx1Ef/8HVrJze81lEsgLQlqjzjGNHantgnQA==}+ peerDependencies:+ '@types/react': '*'+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ peerDependenciesMeta:+ '@types/react':+ optional: true++ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-Ksw4WeROkO4rC9k/onilX/Ao2Cr1ku1unMNH+XSCcP4jSXYu7HDsg9n4ojMjVb22XpYjAQ9qfrFlVbru1vXDUA==}peerDependencies:'@types/react': '*''@types/react-dom': '*'@@ -2869,8 +3613,8 @@ packages:'@types/react-dom':optional: true- '@radix-ui/[email protected]':- resolution: {integrity: sha512-Jl+bCv8HxKnlTLVrcDE8zTMJ09R9/ukw4qBs/oZClOfoQk/cOTbDn+NceXfV7j09YPVQUryJPHurafcSg6EVKA==}+ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-5pzg4FGQNpExhnhT2zlrP1wZFaYCd1K0nYWoFAdcYoYK868IEigqMX3B3f8yIoRlAhAeDWciLI6ZdCKHF9P4Vg==}peerDependencies:'@types/react': '*'react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc@@ -2878,17 +3622,21 @@ packages:'@types/react':optional: true- '@radix-ui/[email protected]':- resolution: {integrity: sha512-FkBMwD+qbGQeMu1cOHnuGB6x4yzPjho8ap5WtbEJ26umhgqVXbhekKUQO+hZEL1vU92a3wHwdp0HAcqAUF5iDg==}+ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-8g4pfOL9HoKKLWGiypT+dphVqjFfmcXO5GBnhsG6zI+lxAx/8feQpr+1LSN8Re3hiZ+XkLNS4O9ztK11/LzQ6w==}peerDependencies:'@types/react': '*'+ '@types/react-dom': '*'react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rcpeerDependenciesMeta:'@types/react':optional: true+ '@types/react-dom':+ optional: true- '@radix-ui/[email protected]':- resolution: {integrity: sha512-U+UORVEq+cTnRIaostJv9AGdV3G6Y+zbVd+12e18jQ5A3c0xL03IhnHuiU4UV69wolOQp5GfR58NW/EgdQhwOA==}+ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-RNOJjfZMTyBM6xYmV3IVGXkPjIhcBAuv48POevAXwrGJhkWZ9p1rFoIS1JFooPuT193AZmRsCPhpoVJxx6OPoQ==}peerDependencies:'@types/react': '*'react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc@@ -2896,54 +3644,322 @@ packages:'@types/react':optional: true- '@radix-ui/[email protected]':- resolution: {integrity: sha512-RbJRS4UWQFkzHTTwVymMTUv8EqYhOp8dOOviLj2ugtTiXRaRQS7GLGxZTLL1jWhMeoSCf5zmcZkqTl9IiYfXcQ==}+ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-wmRZ2WWLvmt6KHy2rNPOdPUjwq5xOHY02+m+udwJTn0aNIox/rkskAvJTyTLGhPK6KgrUjlJUJpgmx/+wFiFIQ==}peerDependencies:'@types/react': '*'+ '@types/react-dom': '*'react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rcpeerDependenciesMeta:'@types/react':optional: true+ '@types/react-dom':+ optional: true- '@react-aria/[email protected]':- resolution: {integrity: sha512-v/pZh1yBNeayQ5Kio0xRIX0gBf6uu+KjCRW4QSydTyRpmhvk6sMzHT9i9/vIMdaDHaYHBXlXF+Tp/mvS9CG4Zw==}+ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-TMQp2llA+RYn7JcjnrMnz7wN4pcVttPZnRZo52PLQsoLVKzNlVwUeHmfePgTgRluXFvlD3GD5g5MOVVTJCO0qA==}peerDependencies:- react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1- react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1+ '@types/react': '*'+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ peerDependenciesMeta:+ '@types/react':+ optional: true- '@react-aria/[email protected]':- resolution: {integrity: sha512-z56ZYcbfpNmMyiGLhyEjytpmEfoTlBaksk84q4kds3HvNkf7QWKj+DJVfVDrJX+c1LyuBsszLSX7yxJRiHsYKQ==}+ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-vKQLcWypUnwZVvfV7UkGahH2g6ySe8M8R+zYBwPrv5byZ9QAW6cQVvNKo7GgmD+p8aYb6D9JBuvy8/WhOno2wQ==}peerDependencies:- react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1- react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1+ '@types/react': '*'+ '@types/react-dom': '*'+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ peerDependenciesMeta:+ '@types/react':+ optional: true+ '@types/react-dom':+ optional: true- '@react-aria/[email protected]':- resolution: {integrity: sha512-jn038/ZYmu6DpfXJ6r2U9zFFppjbc9wnApPJSCxao2RZVEqep4YyoniHSy8qv6V21/xyS4IV7W9a+X2jOjSuag==}- engines: {node: '>= 12'}+ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-3wyzCQ6+ubRA+D4uv9m95JYLXxmOHp05qjrkjeA7uKHHtjpPggQzc6DAb0URl7j67oR0K2foO4ip27TiX037Bw==}peerDependencies:- react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1- react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1+ '@types/react': '*'+ '@types/react-dom': '*'+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ peerDependenciesMeta:+ '@types/react':+ optional: true+ '@types/react-dom':+ optional: true- '@react-aria/[email protected]':- resolution: {integrity: sha512-H6+rGZL+0f58bBNaUMfctEnT+NogqwAk+nHiB8sR3K+YlQ37GTuCijy2U/pPvQtFMS5mURrjZeBH5JNNXsx14A==}+ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-MucOnzh6hR5mid6VpkbglRAMYMjKLqRnGBbjXkzjK52fuQDd1qbkx78a5P40mkcnVXJdEVxm26E9OPAiUq7nBg==}peerDependencies:- react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1- react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1+ '@types/react': '*'+ '@types/react-dom': '*'+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ peerDependenciesMeta:+ '@types/react':+ optional: true+ '@types/react-dom':+ optional: true- '@react-spectrum/[email protected]':- resolution: {integrity: sha512-FbB+GaVufsN+obNJmUAe8XGZTeJjEWvEf/k/7nxDxoDCBdg/o6eEPONAZyID5Dj1f8BZKNym8VURxDZx7IIyuQ==}+ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-9hQc4+GNVtJAIEPEqlYqW5RiYdrr8ea5XQ0ZOnD6fgru+83kqT15mq2OCcbe8KnjRZl5vF3ks69AKz3kh1jrhg==}peerDependencies:- react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1- react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1+ '@types/react': '*'+ '@types/react-dom': '*'+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ peerDependenciesMeta:+ '@types/react':+ optional: true+ '@types/react-dom':+ optional: true- '@react-spectrum/[email protected]':- resolution: {integrity: sha512-TsoNdVdmlQ7L+75ILq5Yb3+wp/I1AtIeat0o+Y+ZBxP+TtWpwT1ZtCB5l3cplFVzHzOpZlzO0VaDrDP9ElGYDw==}+ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-V9jI6hDjT7l3jsCQD9bLNvDLM3tH/gdbOTp7Tefp3hbbgCGQoK7tUvrWiRlcoBHIZ809ElXwNQwVo0B98LuTXQ==}peerDependencies:- react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1- react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1+ '@types/react': '*'+ '@types/react-dom': '*'+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ peerDependenciesMeta:+ '@types/react':+ optional: true+ '@types/react-dom':+ optional: true- '@react-stately/[email protected]':- resolution: {integrity: sha512-v4YlLa/oRQpPa/M9Yq1e0Bl8Z7xzGZdNDAIbfIMZuiJtacaOKriPW+AOgjjT/Ab0fNX2YDbwIYvkiMOJBnTi5A==}+ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-Jl+bCv8HxKnlTLVrcDE8zTMJ09R9/ukw4qBs/oZClOfoQk/cOTbDn+NceXfV7j09YPVQUryJPHurafcSg6EVKA==}+ peerDependencies:+ '@types/react': '*'+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ peerDependenciesMeta:+ '@types/react':+ optional: true++ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-qx7oqnYbxnK9kYI9m317qmFmEgo6ywqWvbTogdj7cL9p3/yx4M48p7Rnw5z3H890cL/ow/EeWJsuTykeZVXP5Q==}+ peerDependencies:+ '@types/react': '*'+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ peerDependenciesMeta:+ '@types/react':+ optional: true++ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-UKxJlZid7FVtsk/WTxj4i4uSEgj2Au+KBbS7SQyTlzMhhn+86Cz3tISZdTa87bfEfcuvZezf2ZsxD4xuEKtkog==}+ peerDependencies:+ '@types/react': '*'+ '@types/react-dom': '*'+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ peerDependenciesMeta:+ '@types/react':+ optional: true+ '@types/react-dom':+ optional: true++ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-FkBMwD+qbGQeMu1cOHnuGB6x4yzPjho8ap5WtbEJ26umhgqVXbhekKUQO+hZEL1vU92a3wHwdp0HAcqAUF5iDg==}+ peerDependencies:+ '@types/react': '*'+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ peerDependenciesMeta:+ '@types/react':+ optional: true++ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-R6OUY2e2fA6Yn6s+VSx5KBV6Nx8LQEhu+cz7LCej18rQ1HLyg9PSC9jP/ZNx0o6FAIK9c0F1kHylzSxKsdlkrQ==}+ peerDependencies:+ '@types/react': '*'+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ peerDependenciesMeta:+ '@types/react':+ optional: true++ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-uEQJGT97ZA/TgP/Hydw47lHu+/vQj6z/0jA+WeTbK1o9Rx45GImjpD0tc3W5ad3D6XTSR6e1yEO0FvGq6WQfVQ==}+ peerDependencies:+ '@types/react': '*'+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ peerDependenciesMeta:+ '@types/react':+ optional: true++ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-7cshFL8HGS/7HEiHH+9kL9HBwp2sa9yX18Knwek6KYWmXwM7pegMgta2AXMQKI+rq3JnfSj9x8wYqFMTdG1Jgg==}+ peerDependencies:+ '@types/react': '*'+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ peerDependenciesMeta:+ '@types/react':+ optional: true++ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-U+UORVEq+cTnRIaostJv9AGdV3G6Y+zbVd+12e18jQ5A3c0xL03IhnHuiU4UV69wolOQp5GfR58NW/EgdQhwOA==}+ peerDependencies:+ '@types/react': '*'+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ peerDependenciesMeta:+ '@types/react':+ optional: true++ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-umO/aJ+82CpOnhDZUTbILCQf7kU/g0iv+oGs/Q8jw7IkhWBzaEP4sA268PhFAJTFetbwp3ICc6ktpI4TqtxcIw==}+ peerDependencies:+ '@types/react': '*'+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ peerDependenciesMeta:+ '@types/react':+ optional: true++ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-RbJRS4UWQFkzHTTwVymMTUv8EqYhOp8dOOviLj2ugtTiXRaRQS7GLGxZTLL1jWhMeoSCf5zmcZkqTl9IiYfXcQ==}+ peerDependencies:+ '@types/react': '*'+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ peerDependenciesMeta:+ '@types/react':+ optional: true++ '@radix-ui/[email protected]':+ resolution: {integrity: sha512-K20DkRkUwDnxEYMBPcg3Y6voLkEy5p5QQmszZgLngKKiC7dzBR/aEuK3w1qlx2JWDUNH6FluahYdgR3BP+QbYw==}+ peerDependencies:+ '@types/react': '*'+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc+ peerDependenciesMeta:+ '@types/react':+ optional: true++ '@react-aria/[email protected]':+ resolution: {integrity: sha512-v/pZh1yBNeayQ5Kio0xRIX0gBf6uu+KjCRW4QSydTyRpmhvk6sMzHT9i9/vIMdaDHaYHBXlXF+Tp/mvS9CG4Zw==}+ peerDependencies:+ react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1+ react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1++ '@react-aria/[email protected]':+ resolution: {integrity: sha512-z56ZYcbfpNmMyiGLhyEjytpmEfoTlBaksk84q4kds3HvNkf7QWKj+DJVfVDrJX+c1LyuBsszLSX7yxJRiHsYKQ==}+ peerDependencies:+ react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1+ react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1++ '@react-aria/[email protected]':+ resolution: {integrity: sha512-jn038/ZYmu6DpfXJ6r2U9zFFppjbc9wnApPJSCxao2RZVEqep4YyoniHSy8qv6V21/xyS4IV7W9a+X2jOjSuag==}+ engines: {node: '>= 12'}+ peerDependencies:+ react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1+ react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1++ '@react-aria/[email protected]':+ resolution: {integrity: sha512-H6+rGZL+0f58bBNaUMfctEnT+NogqwAk+nHiB8sR3K+YlQ37GTuCijy2U/pPvQtFMS5mURrjZeBH5JNNXsx14A==}+ peerDependencies:+ react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1+ react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1++ '@react-native-async-storage/[email protected]':+ resolution: {integrity: sha512-gvRvjR5JAaUZF8tv2Kcq/Gbt3JHwbKFYfmb445rhOj6NUMx3qPLixmDx5pZAyb9at1bYvJ4/eTUipU5aki45xw==}+ peerDependencies:+ react-native: ^0.0.0-0 || >=0.65 <1.0++ '@react-native-masked-view/[email protected]':+ resolution: {integrity: sha512-XwuQoW7/GEgWRMovOQtX3A4PrXhyaZm0lVUiY8qJDvdngjLms9Cpdck6SmGAUNqQwcj2EadHC1HwL0bEyoa/SQ==}+ peerDependencies:+ react: '>=16'+ react-native: '>=0.57'++ '@react-native/[email protected]':+ resolution: {integrity: sha512-TDhgCZA4wjJg84d5A9swiOQYPIWSKEEVdg9IwMFZDupQzW/F3QoLUrfAJOcalgqTDA9/buTB8awhE3Whwg6u9Q==}+ engines: {node: ^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0}++ '@react-native/[email protected]':+ resolution: {integrity: sha512-O6Xza4JBGPIU8J7YbKTyBoYL4thpy8jMW/oaLDWdAyOwYHKIjK47pAL5HUEbOe2bWz2PEKjbYRF2ApkJv1ottQ==}+ engines: {node: ^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0}++ '@react-native/[email protected]':+ resolution: {integrity: sha512-/eqs/Hy9RZRcjdcs4wj3Cqmxvtb3NM5g+Uuh1RIvsjynMO8PRsrVWWLWgBcZL/jYUo+ogXd2NFB0W8L5Bg89xw==}+ engines: {node: ^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0}+ peerDependencies:+ '@babel/core': '*'++ '@react-native/[email protected]':+ resolution: {integrity: sha512-Ux4jHi0fh+bdtVEcL0gaPLbY56V+SvFUDl/8sRAE1jdb4k+o7fT/4Nc29yz4X+qfjstkSqObQTMBGhdzxH9JvA==}+ engines: {node: ^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0}+ peerDependencies:+ '@babel/core': '*'++ '@react-native/[email protected]':+ resolution: {integrity: sha512-qSDL9LQc5mZSZPNczT95WU9YQuPzxBklgON9vLhhqfI0yWIwKInqFx88dQ/uiEXBtf0yossthaQIqA4Ml6bF6g==}+ engines: {node: ^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0}+ peerDependencies:+ '@react-native-community/cli': '*'+ '@react-native/metro-config': 0.86.3+ peerDependenciesMeta:+ '@react-native-community/cli':+ optional: true+ '@react-native/metro-config':+ optional: true++ '@react-native/[email protected]':+ resolution: {integrity: sha512-TQmeofQ0PcuylhhlleOeuzHYZfbrgm3gayXzowqUEzgRisTm1D40/J3ggqs7XkQi5HP5ZA3n8dHmKL9vIzPcsw==}+ engines: {node: ^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0}++ '@react-native/[email protected]':+ resolution: {integrity: sha512-O4ds+J7xZfxkbih9T+cAGegBdvKSPKYJm/lDgC9CpEjFMkmzWTpVLU3Qsv9sqZuo58z+sGhIcJfPsCFFWHpqbQ==}+ engines: {node: ^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0}++ '@react-native/[email protected]':+ resolution: {integrity: sha512-LiEPTqTg/63bYUnrPyHLfjTDCNhA/+CUqI1+DsA9tYyewtSbULd5awsva6SgE10I+2iMhgKXS3ymkhU/kSCrGA==}+ engines: {node: ^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0}++ '@react-native/[email protected]':+ resolution: {integrity: sha512-lxmx0GqLEWRIpZfpYFXlYVIs3ENQwaW6Vmp6oi29l2GoQJ1wZfFZRdMimDWlGEk8LKfHar3QH3iaPMkTcK9lEQ==}+ engines: {node: ^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0}++ '@react-native/[email protected]':+ resolution: {integrity: sha512-eYIJ0es967+tePBFQDnl/gidVFxLns3fnbiK6rxscQrGodvuUO6hwxpQnfNynJ8MjbbndImXihXjcnJdc7SzJg==}+ engines: {node: ^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0}++ '@react-native/[email protected]':+ resolution: {integrity: sha512-0nlwVkG0uT9o72nrGTKUz/IqDnCkM4zE0ihe4r+OJcxH93yBdDm58AXJ3EXZeSjv3osHEFXU7ceajdZiS34mTw==}+ engines: {node: ^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0}+ peerDependencies:+ '@babel/core': '*'++ '@react-native/[email protected]':+ resolution: {integrity: sha512-qdzDMepV2xdUhsO4XC7idnnbt8K6+Hd59AjeK9y4KS86fxSQq5oL0TAbqUuajDGR7beNQoYTuS6AowN/zP0oaQ==}+ engines: {node: ^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0}++ '@react-native/[email protected]':+ resolution: {integrity: sha512-Cv3CDkprb67GrzuaS9BGbBJC/6G4lIw3nyKOHRKTqTTum4bn37y5+R0Z04L8mcbQN85eEohNrRwb7IOM4j6uvg==}++ '@react-native/[email protected]':+ resolution: {integrity: sha512-1j44NEyNn05Ut40vHAmoSWbsIcybFkMAOBTwQt1PrESyfSS+qBoyU1LGIogNva0VIa0rQyEC5PzbA7R4/7Nhyw==}+ engines: {node: ^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0}+ peerDependencies:+ '@types/react': ^19.2.0+ react: '*'+ react-native: 0.86.3+ peerDependenciesMeta:+ '@types/react':+ optional: true++ '@react-spectrum/[email protected]':+ resolution: {integrity: sha512-FbB+GaVufsN+obNJmUAe8XGZTeJjEWvEf/k/7nxDxoDCBdg/o6eEPONAZyID5Dj1f8BZKNym8VURxDZx7IIyuQ==}+ peerDependencies:+ react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1+ react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1++ '@react-spectrum/[email protected]':+ resolution: {integrity: sha512-TsoNdVdmlQ7L+75ILq5Yb3+wp/I1AtIeat0o+Y+ZBxP+TtWpwT1ZtCB5l3cplFVzHzOpZlzO0VaDrDP9ElGYDw==}+ peerDependencies:+ react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1+ react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1++ '@react-stately/[email protected]':+ resolution: {integrity: sha512-v4YlLa/oRQpPa/M9Yq1e0Bl8Z7xzGZdNDAIbfIMZuiJtacaOKriPW+AOgjjT/Ab0fNX2YDbwIYvkiMOJBnTi5A==}peerDependencies:react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1@@ -3377,6 +4393,9 @@ packages:'@shikijs/[email protected]':resolution: {integrity: sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==}+ '@sinclair/[email protected]':+ resolution: {integrity: sha512-hhyNJ+nbR6ZR7pToHvllEFun9TL0sbL+tk/ON75lo+Xas054uez98qRbsuNt7MBCyZKK4+8Yli/OAGZhmfBZ/g==}+'@sinclair/[email protected]':resolution: {integrity: sha512-XiMQh7qqVlxZzcVD+kkGMNGMzcTrDMLWI7S4x7z1MkCkbDPrekpZXEUK0eZqZFMuHQg2a2DZOcDIh9o5v3Gonw==}@@ -3413,36 +4432,69 @@ packages:'@tailwindcss/[email protected]':resolution: {integrity: sha512-yzhzuGRmv5QyU9qLNg4GTlYI6STedBWRE7NjxP45CsFYYq9taI0zJXZBMqIC/c8fViNLhmrbpSFS57EoxUmD6Q==}+ '@tailwindcss/[email protected]':+ resolution: {integrity: sha512-/T8IKEsf9VTU6tLjgC7+sv2mOPtQxzE2jMw7u4Tt40Tx+QSZxpzh95/H6cMKoja9XuW7iMdLJYBB0o9G1CaAgg==}+'@tailwindcss/[email protected]':resolution: {integrity: sha512-3IfFuATVRUMZZprEIx9OGDjG3Ou3jG4xQzNTvjDoKmU9JdmoCohQJ83MYd0GPnQIu89YoJqvMM0G3uqLRFtetg==}engines: {node: '>= 10'}cpu: [arm64]os: [android]+ '@tailwindcss/[email protected]':+ resolution: {integrity: sha512-Y85A2gmPSkl5Ve5qR86GL4HT509cFqQh1aes9p3sSkyTPwt0Pppf3GkwGe4JPACcRYjgJIEhQgM6dBClnr0NYw==}+ engines: {node: '>= 20'}+ cpu: [arm64]+ os: [android]+'@tailwindcss/[email protected]':resolution: {integrity: sha512-ESgStEOEsyg8J5YcMb1xl8WFOXfeBmrhAwGsFxxB2CxY9evy63+AtpbDLAyRkJnxLy2WsD1qF13E97uQyP1lfQ==}engines: {node: '>= 10'}cpu: [arm64]os: [darwin]+ '@tailwindcss/[email protected]':+ resolution: {integrity: sha512-BiaWatpBcERQFDlOjRDpIVXuFK5PJez5SA4JMg6VYZdBYU+qKfV/vqjcIs+IYmtitf1xYQZTwXvU/8y4lfZUGw==}+ engines: {node: '>= 20'}+ cpu: [arm64]+ os: [darwin]+'@tailwindcss/[email protected]':resolution: {integrity: sha512-EgnK8kRchgmgzG6jE10UQNaH9Mwi2n+yw1jWmof9Vyg2lpKNX2ioe7CJdf9M5f8V9uaQxInenZkOxnTVL3fhAw==}engines: {node: '>= 10'}cpu: [x64]os: [darwin]+ '@tailwindcss/[email protected]':+ resolution: {integrity: sha512-fAeUqfV5ndhxRwai8cXGzdLvul9utWOmeTkv69unv4ZXixjn61Z+p9lCWdwOwA3TYboG3BwdVuN/RDjhBRl0mw==}+ engines: {node: '>= 20'}+ cpu: [x64]+ os: [darwin]+'@tailwindcss/[email protected]':resolution: {integrity: sha512-xdqKtbpHs7pQhIKmqVpxStnY1skuNh4CtbcyOHeX1YBE0hArj2romsFGb6yUmzkq/6M24nkxDqU8GYrKrz+UcA==}engines: {node: '>= 10'}cpu: [x64]os: [freebsd]+ '@tailwindcss/[email protected]':+ resolution: {integrity: sha512-iyf5bV6+wnAlflVeEy7R25dupxTNECZN5QMI0qNT6eT+EgaGdZcKhGkr5SdoaWiLJ3spLqIY9VCeSGrwmtg4kw==}+ engines: {node: '>= 20'}+ cpu: [x64]+ os: [freebsd]+'@tailwindcss/[email protected]':resolution: {integrity: sha512-ryHQK2eyDYYMwB5wZL46uoxz2zzDZsFBwfjssgB7pzytAeCCa6glsiJGjhTEddq/4OsIjsLNMAiMlHNYnkEEeg==}engines: {node: '>= 10'}cpu: [arm]os: [linux]+ '@tailwindcss/[email protected]':+ resolution: {integrity: sha512-aAYUprJAJQWWbRrPvtjdroZ56Md+JM8pMiopS6xGEwDfLhqj+2ver2p4nU4Mb3CRqcMmNBjo8KkUgcxhkzVQGQ==}+ engines: {node: '>= 20'}+ cpu: [arm]+ os: [linux]+'@tailwindcss/[email protected]':resolution: {integrity: sha512-mYwqheq4BXF83j/w75ewkPJmPZIqqP1nhoghS9D57CLjsh3Nfq0m4ftTotRYtGnZd3eCztgbSPJ9QhfC91gDZQ==}engines: {node: '>= 10'}@@ -3450,6 +4502,13 @@ packages:os: [linux]libc: [glibc]+ '@tailwindcss/[email protected]':+ resolution: {integrity: sha512-nDxldcEENOxZRzC2uu9jrutZdAAQtb+8WWDCSnWL1zvBk1+FN+x6MtDViPB5AJMfttVCUhehGWus3XBPgatM/w==}+ engines: {node: '>= 20'}+ cpu: [arm64]+ os: [linux]+ libc: [glibc]+'@tailwindcss/[email protected]':resolution: {integrity: sha512-m/NVRFNGlEHJrNVk3O6I9ggVuNjXHIPoD6bqay/pubtYC9QIdAMpS+cswZQPBLvVvEF6GtSNONbDkZrjWZXYNQ==}engines: {node: '>= 10'}@@ -3457,6 +4516,13 @@ packages:os: [linux]libc: [musl]+ '@tailwindcss/[email protected]':+ resolution: {integrity: sha512-Md44bD6veX/PC5iyF8cDVnw4HBIANZepRZZ7a8DQOvkfo5WUBwcp6iAuCUz23u+4SUkhJlD3eL7hNdW8ezd/kA==}+ engines: {node: '>= 20'}+ cpu: [arm64]+ os: [linux]+ libc: [musl]+'@tailwindcss/[email protected]':resolution: {integrity: sha512-YW6sblI7xukSD2TdbbaeQVDysIm/UPJtObHJHKxDEcW2exAtY47j52f8jZXkqE1krdnkhCMGqP3dbniu1Te2Fg==}engines: {node: '>= 10'}@@ -3464,6 +4530,13 @@ packages:os: [linux]libc: [glibc]+ '@tailwindcss/[email protected]':+ resolution: {integrity: sha512-tx7us1muwOKAKWao2v/GaafFeQboE6aj88vC6ziN2NCGcRm8gWUhwjzg+YdVB1e4boAtdtma4L43onunI6NS4w==}+ engines: {node: '>= 20'}+ cpu: [x64]+ os: [linux]+ libc: [glibc]+'@tailwindcss/[email protected]':resolution: {integrity: sha512-e3C/RRhGunWYNC3aSF7exsQkdXzQ/M+aYuZHKnw4U7KQwTJotnWsGOIVih0s2qQzmEzOFIJ3+xt7iq67K/p56Q==}engines: {node: '>= 10'}@@ -3471,6 +4544,13 @@ packages:os: [linux]libc: [musl]+ '@tailwindcss/[email protected]':+ resolution: {integrity: sha512-SJxX60smvHgasZoBy11dX6YRjXJFovwWBoedhbQPOBzgFWBHGB+TVPWB9BxzR7TTxU8FQZAI2AyiNCMzFm8Img==}+ engines: {node: '>= 20'}+ cpu: [x64]+ os: [linux]+ libc: [musl]+'@tailwindcss/[email protected]':resolution: {integrity: sha512-Xo1+/GU0JEN/C/dvcammKHzeM6NqKovG+6921MR6oadee5XPBaKOumrJCXvopJ/Qb5TH7LX/UAywbqrP4lax0g==}engines: {node: '>=14.0.0'}@@ -3483,22 +4563,50 @@ packages:- '@emnapi/wasi-threads'- tslib+ '@tailwindcss/[email protected]':+ resolution: {integrity: sha512-jx1+rPhY/5Ympkktd656HBWEBLxP7dH06losBLjjf5vgCODXvi9KhtftWcMIwTFIDqBr7cRnQkdLnAG+IOlGvQ==}+ engines: {node: '>=14.0.0'}+ cpu: [wasm32]+ bundledDependencies:+ - '@napi-rs/wasm-runtime'+ - '@emnapi/core'+ - '@emnapi/runtime'+ - '@tybys/wasm-util'+ - '@emnapi/wasi-threads'+ - tslib+'@tailwindcss/[email protected]':resolution: {integrity: sha512-UgKYx5PwEKrac3GPNPf6HVMNhUIGuUh4wlDFR2jYYdkX6pL/rn73zTq/4pzUm8fOjAn5L8zDeHp9iXmUGOXZ+w==}engines: {node: '>= 10'}cpu: [arm64]os: [win32]+ '@tailwindcss/[email protected]':+ resolution: {integrity: sha512-3rc292Ca2ceK6Ulcc/bAVnTs/3nDtoPhyEKlgPv+yQJQi/JS/AMJlqzxvlDacL1nekbrcf6bTqp/jV4qgnPxNQ==}+ engines: {node: '>= 20'}+ cpu: [arm64]+ os: [win32]+'@tailwindcss/[email protected]':resolution: {integrity: sha512-YfHoggn1j0LK7wR82TOucWc5LDCguHnoS879idHekmmiR7g9HUtMw9MI0NHatS28u/Xlkfi9w5RJWgz2Dl+5Qg==}engines: {node: '>= 10'}cpu: [x64]os: [win32]+ '@tailwindcss/[email protected]':+ resolution: {integrity: sha512-yJ0pwIVc/nYeGoV02WtsN8KYyLQv7kyI2wDnkezyJlGGjkd4QLwDGAwl47YpPJeuI0M0ObaXGSPjvWDPeTPggw==}+ engines: {node: '>= 20'}+ cpu: [x64]+ os: [win32]+'@tailwindcss/[email protected]':resolution: {integrity: sha512-Q69XzrtAhuyfHo+5/HMgr1lAiPP/G40OMFAnws7xcFEYqcypZmdW8eGXaOUIeOl1dzPJBPENXgbjsOyhg2nkrg==}engines: {node: '>= 10'}+ '@tailwindcss/[email protected]':+ resolution: {integrity: sha512-krXjAikiaFSPaK/FkAQT5UTx3VormQaiZ5hBFlJZ9UFQGB/rwg1MZIhHAG9smMQRTdyJxP6Qt5MwMtdyU5FWrA==}+ engines: {node: '>= 20'}+'@tailwindcss/[email protected]':resolution: {integrity: sha512-q/EAIIpF6WpLhKEuQSEVMZNMIY8KhWoAemZ9eylNAih9jxMGAYPPWBn3I9QL/2jZ+e7OEz/tZkX5HwbBR4HohA==}@@ -3652,12 +4760,18 @@ packages:'@types/[email protected]':resolution: {integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==}+ '@types/[email protected]':+ resolution: {integrity: sha512-uN+9i8bFT5CUcZfyIEYDrSueACEyKGbUs5kC/72DGlZZoinh84sJfVV0i8UOJD1asdzkvLPBRrKs41kZ8MdEXg==}+'@types/[email protected]':resolution: {integrity: sha512-xJBAbDifo5hpffDBuHl0Y8ywswbiAp/Wi7Y/GtAgSlZyIABppyurxVueOPE8LUQOxdlgi6Zqce7uoEpqNTeiUw==}'@types/[email protected]':resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==}+ '@types/[email protected]':+ resolution: {integrity: sha512-ynRvcq6wvqexJ9brDMS4BnBLzmr0e14d6ZJTEShTBWKymQiHwlAyGu0ZPEFI2Fh1U53F7tN9ufClWM5KvqkKOw==}+'@types/[email protected]':resolution: {integrity: sha512-rp/ezSWaD1m44dPKICGhiskI13nVr7qTloFwDa/IYkhhf5nzwP+zIQcIJh3WIFSBOy/H1PzB40jPjMDksN4F+g==}@@ -3705,6 +4819,9 @@ packages:peerDependencies:'@types/react': ^19.2.0+ '@types/[email protected]':+ resolution: {integrity: sha512-TX4p2D4Z2oigM3SXU7+QyLSUnSR0vR1S1Pfxm/qFL9nHQ3jclgi6ioGoWQmlIr1DeKRVmPJrmNlhgM0JlWlLUg==}+'@types/[email protected]':resolution: {integrity: sha512-AnzbBERsrLKtk2XSfTbYRLjQPdy116Sty4q+T+Bp3IC4l6jNBvreVPAHmpq9qhXQM7CXZPjLVmGMw9sy+hxQ3w==}@@ -3947,6 +5064,14 @@ packages:resolution: {integrity: sha512-k0Py9L7PxRq8d8/6+B5l4078c12/7lbDzqUVrrhH7VJDV0/EM0qVTtP1LVttLYZEPazdAn0kLSFBCLiiJmfM7Q==}engines: {node: '>=18.20.0'}+ '@xmldom/[email protected]':+ resolution: {integrity: sha512-/5NV/vDALVFDXgLmfsy9TRCBlKwO2LNBFzpzvb9iIj+jR+eSc6DLYYvVOdivT/jm7MtU6TebYuRmzEOI7w40UA==}+ engines: {node: '>=10.0.0'}++ '@xmldom/[email protected]':+ resolution: {integrity: sha512-5AXjrcMClTryPe9LgZrygpB1lj7s0S9E0+W+AHaVKAVyHanafK86iPSvG5xHVSp/jC+VH1UXu0TAEmY279xH7A==}+ engines: {node: '>=14.6'}+'@zip.js/[email protected]':resolution: {integrity: sha512-hYAuHAaWjt0axbofaDL5XUlmrQPsBDcK3f45ApZuh6N+8UGVk26GoGdtGDvcvzahsHytTQ6DtBVXwG9IcCMjjQ==}engines: {bun: '>=0.7.0', deno: '>=1.0.0', node: '>=18.0.0'}@@ -3955,6 +5080,14 @@ packages:resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==}engines: {node: '>=6.5'}+ resolution: {integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==}+ engines: {node: '>= 0.6'}++ resolution: {integrity: sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==}+ engines: {node: '>= 0.6'}+resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==}peerDependencies:@@ -3969,15 +5102,31 @@ packages:resolution: {integrity: sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==}engines: {node: '>= 14'}+ resolution: {integrity: sha512-d8OWDVdZMgjhLUT9ZPgSv/BdFFF9pVuscC0JdUSz3bjwE15gcp6u/o0/JooM2yyAWC49KThFhXlgTXRa9B7yng==}+ engines: {node: '>=18.18'}+ hasBin: true+resolution: {integrity: sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==}resolution: {integrity: sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==}+ resolution: {integrity: sha512-hCv9AqTQ8ycjpSd3upOJd7vFwW1JaoYQ7tpham03GJ1ca8/65rqn0RpaWpItOAd6ylW9wAw6luXYPJIyPFVOww==}+resolution: {integrity: sha512-vcZjxvvVoxTeR5XBNJB38oTu/7eDCZlwdz32N1eNgpyPF7j/Z7Idf+CUwQOkKKpJ7RJyjxgLHCM7vdIK0iCNMQ==}+ resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==}+ engines: {node: '>=8'}++ resolution: {integrity: sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==}+ engines: {node: '>=6'}+resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==}engines: {node: '>=8'}@@ -3986,6 +5135,10 @@ packages:resolution: {integrity: sha512-WpDfL7NO6j7tH88IDBNVdUJxDh9nmCteAVW9dsep846XdwF4naCBK+/tGLX3KJgcpgMRXCFlTM2hKGoK9FsdrQ==}engines: {node: '>=12'}+ resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==}+ engines: {node: '>=4'}+resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==}engines: {node: '>=8'}@@ -4018,6 +5171,9 @@ packages:resolution: {integrity: sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig==}engines: {node: '>=14'}+ resolution: {integrity: sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==}+resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==}@@ -4035,6 +5191,9 @@ packages:resolution: {integrity: sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==}engines: {node: '>= 0.4'}+ resolution: {integrity: sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==}+resolution: {integrity: sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==}@@ -4064,18 +5223,66 @@ packages:react-native-b4a:optional: true+ resolution: {integrity: sha512-aTyf30K/rqAsNwN76zYrdtx8obu0E4KoUME29B1xj+B3WxgvWkp943vYQ+z8Mv3lw9xHXMHpvSPOBxzAkIa94w==}+ peerDependencies:+ '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0++ resolution: {integrity: sha512-U+GNwMdSFgzVmfhNm8GJUX88AadB3uo9KpJqS3FaqNIPKgySuvMb+bHPsOmmuWyIcuqZj/pzt1RUIUZns4y2+A==}+ peerDependencies:+ '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0++ resolution: {integrity: sha512-M762rNHfSF1EV3SLtnCJXFoQbbIIz0OyRwnCmV0KPC7qosSfCO0QLTSuJX3ayAebubhE6oYBAYPrBA5ljowaZg==}+ peerDependencies:+ '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0+resolution: {integrity: sha512-Ixm8tFfoKKIPYdCCKYTsqv+Fd4IJ0DQqMyEimo+pxUOMUR9cVPlwTrFt9Avu+3cb6Zp3mAzl+t1MrG2fxxKsxw==}- resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==}+ resolution: {integrity: sha512-e4fG8NbyRvk5GwU/7G2U9WxzPYtpC4IQN28AyRDzKE0kvywgohq8vT2x0/xBfg8a0RfSkXLlHAtUAGlSy3VhAw==}- resolution: {integrity: sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==}- engines: {node: 18 || 20 || >=22}+ resolution: {integrity: sha512-LhD0xdoedDw7ansQgXbB2DADLZIK/LRXuWNBPuVzMc5S2WK5GyT89tCM+cQzxFGO0mGyLK6D5TrVOJJzAoDy8Q==}- resolution: {integrity: sha512-AIPKioV7/Y/8KfZ3AAhjPJxLLbY49S64Ym5DakZlUg75qQiTgUq9hEJoEwa4eUezPUlXRy/i5NpsKvo9jgKmoA==}+ resolution: {integrity: sha512-ycduwJbvdvIMmVvlAZqGggS+pm5Eu4Bk9pcV9Sm2Z4PJNRVsKkv0g7vHj+LeuC1gHTeF67sJXFOq61IlqCa2hA==}++ resolution: {integrity: sha512-g4aaCrDDOsWjbm0PUUeVnkcVd6AKJsVc/MbnPhEotEpkeJQP6b8nzewohQi7+QS8UyPehOhGWn0nOwjvWpmMvQ==}++ resolution: {integrity: sha512-OOl3lqNQ4IagJfsNgtxuna0wpTWt1BswdyktGTOJ5EJCgdQUk/B2vaj/jsl03+kMyuIvpxKioVtbTzxh3mdvvQ==}+ peerDependencies:+ '@babel/runtime': ^7.20.0+ expo: '*'+ expo-widgets: ^57.0.21+ react-refresh: '>=0.14.0 <1.0.0'+ peerDependenciesMeta:+ '@babel/runtime':+ optional: true+ expo:+ optional: true+ expo-widgets:+ optional: true++ resolution: {integrity: sha512-NQGA7LcfCpSzIbGRbkgjgdWkjy7HI+Th5VLxTJfW5EeaAf3fnS+xWQaQOCYiny+q6QSvxqoSO04vCx+4u++EJw==}++ resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==}++ resolution: {integrity: sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==}+ engines: {node: 18 || 20 || >=22}++ resolution: {integrity: sha512-/4QOrrNrCRmDSBWiiP4aC72dnkuXUEdcFRidHgbPRXUpy82XcCMvJssI6fEs6JT42LS7DvBVZO70qasJbYKyrA==}++ resolution: {integrity: sha512-AIPKioV7/Y/8KfZ3AAhjPJxLLbY49S64Ym5DakZlUg75qQiTgUq9hEJoEwa4eUezPUlXRy/i5NpsKvo9jgKmoA==}peerDependencies:bare-abort-controller: '*'peerDependenciesMeta:@@ -4126,6 +5333,10 @@ packages:resolution: {integrity: sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==}+ resolution: {integrity: sha512-QxD8cf2eVqJOOz63z6JIN9BzvVs/dlySa5HGSBH5xtR8dPteIRQnBxxKqkNTiT6jbDTF6jAfrd4oMcND9RGbQg==}+ engines: {node: '>=0.6'}+resolution: {integrity: sha512-Ko0uX15oIUS7wJ3Rb30Fs6SkVbLmPBAKdlm7q9+ak9bbIeFf0MwuBsQV6z7+X768/cHsfg+WlysDWJcmthjsjQ==}@@ -4142,6 +5353,17 @@ packages:resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==}+ resolution: {integrity: sha512-sXaHZicyEEmY86WyueLTQesbeoH/mquvarJaQNbjuOQO+7gbFcDEWqKmcWA4cOTLzFlfgvkiVxolk1k5bBIpmg==}++ resolution: {integrity: sha512-PyJxiNtA5T2PlLIeBot4lbp7rj4OadzjnMZD/G5zuBNt8ei/yCU7+wW0h2bag9vr8c+/WuRWmSxbqAl9hL1rBA==}+ engines: {node: '>= 5.10.0'}++ resolution: {integrity: sha512-apC2+fspHGI3mMKj+dGevkGo/tCqVB8jMb6i+OX+E29p0Iposz07fABkRIfVUPNd5A5VbuOz1bZbnmkKLYF+wQ==}+ engines: {node: '>= 5.10.0'}+resolution: {integrity: sha512-uZbew1NqdmPDTMJ8ah1y+b+9QEJrfkXFk3RcTQw3X0jW/xRUvFKsg1CfQdSYGdTbXZWExtU3J3ccxtnfw1Fi0g==}@@ -4158,6 +5380,9 @@ packages:engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}hasBin: true+ resolution: {integrity: sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==}+resolution: {integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==}@@ -4165,6 +5390,9 @@ packages:resolution: {integrity: sha512-Db1SbgBS/fg/392AblrMJk97KggmvYhr4pB5ZIMTWtaivCPMWLkmb7m21cJvpvgK+J3nsU2CmmixNBZx4vFj/w==}engines: {node: '>=8.0.0'}+ resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==}+resolution: {integrity: sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==}@@ -4217,6 +5445,10 @@ packages:resolution: {integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==}engines: {node: '>=6'}+ resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==}+ engines: {node: '>=10'}+resolution: {integrity: sha512-xxWVywk6a6Arlk+hymeycyn/VgqEfLDxupvhH/xiY5SJ/18kmi9o6MiO320DCUzypORHLtvh0I4i04tUhCNHNQ==}@@ -4227,6 +5459,10 @@ packages:resolution: {integrity: sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==}engines: {node: '>=18'}+ resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==}+ engines: {node: '>=4'}+resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==}engines: {node: '>=10'}@@ -4279,6 +5515,21 @@ packages:resolution: {integrity: sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==}engines: {node: '>=18'}+ resolution: {integrity: sha512-zdLEwNo3aUVzIhKhTtXfxhdvZhUghrnmkvcAq2NoDd+LeOHKf03H5jwZ8T/STsAlzyALkBVK552iaG1fGf1xVQ==}+ engines: {node: '>=12.13.0'}+ hasBin: true++ resolution: {integrity: sha512-p03azHlGjtyRvFEee3cyvtsRYdniSkwjkzmM/KmVnqT5d7QkkwpJBhis/zCLMYdQMVJ5tt140TBNqqrZPaWeFA==}++ resolution: {integrity: sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==}++ resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==}+ engines: {node: '>=8'}+resolution: {integrity: sha512-77PSwercCZU2Fc4sX94eF8k8Pxte6JAwL4/ICZLFjJLqegs7kCuAsqqj/70NQF6TvDpgFjkubQB2FW2ZZddvQg==}engines: {node: '>=8'}@@ -4289,6 +5540,14 @@ packages:resolution: {integrity: sha512-+6vJA3L98yv+IdfKGZHBNiGW5KHn22e/JwID0Strsz8h4S/csAu/OuICwxrg44k5MRiZHWIo8XXuJgQTriRP4w==}+ resolution: {integrity: sha512-8lgKz8LmCRYZZQDpRyT2m5rKJ08TnU4tR9FFFW2rxpxR1FzWi4PQ/NfyODchAatHaUgnSPVcx/R5w6NuTBzFiw==}+ engines: {node: '>=4'}++ resolution: {integrity: sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==}+ engines: {node: '>=6'}+resolution: {integrity: sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==}@@ -4307,19 +5566,43 @@ packages:resolution: {integrity: sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==}engines: {node: '>=6'}+ resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==}+resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==}engines: {node: '>=7.0.0'}+ resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==}+resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==}+ resolution: {integrity: sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==}++ resolution: {integrity: sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==}+ engines: {node: '>=12.5.0'}+resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==}resolution: {integrity: sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==}+ resolution: {integrity: sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==}+ engines: {node: '>=18'}++ resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==}++ resolution: {integrity: sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==}+ engines: {node: '>= 10'}+resolution: {integrity: sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==}engines: {node: '>= 12'}@@ -4357,6 +5640,10 @@ packages:resolution: {integrity: sha512-ysOGlgTFbN2/Y6Cg3Iye8YKulHw+R2fNXHrgSmXISQdMnomY6eNDprVdW9R5xBguEqI954+S6709UyiO7B+6OQ==}+ resolution: {integrity: sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==}+ engines: {node: '>= 0.10.0'}+resolution: {integrity: sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==}engines: {node: ^14.18.0 || >=16.10.0}@@ -4426,6 +5713,10 @@ packages:resolution: {integrity: sha512-C2AugXIpRGQTxaCW0N7n5jD/p5irUmCrwl03TrnMFBHDbdq44CFWR2zO7rK9xPN4Eo3pUxC4vQzQgbIpzrD1PQ==}+ resolution: {integrity: sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==}+ engines: {node: '>=8.0.0'}+resolution: {integrity: sha512-FUV3xaJ63buRLgHrLQVlVgQnQdR4yqdLGaDu7g8CQcWjInDfM9plBTPI9FRfpahju1UBSaMckeb2/46ApS/V1Q==}@@ -4448,6 +5739,10 @@ packages:resolution: {integrity: sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==}+ resolution: {integrity: sha512-1+BhOB8ahCn4O0cep0Sh2l9KCOfOdY+BXJnKMHFFzDEouSr/el18QwXEMRlOj9UY5nCeA8UN3a/82rUWRBeyBw==}+ engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}+resolution: {integrity: sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw==}engines: {node: '>= 14'}@@ -4467,6 +5762,14 @@ packages:supports-color:optional: true+ resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==}+ peerDependencies:+ supports-color: '*'+ peerDependenciesMeta:+ supports-color:+ optional: true+resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==}engines: {node: '>=6.0'}@@ -4490,6 +5793,10 @@ packages:resolution: {integrity: sha512-GtpQYB283KrPp6nRw50q3U9/VfOutZOe103qlN7BPP6Ad27xYnOIWv4lPzo8HCAL+mMZofJ9KEy30fq6MfaK6Q==}+ resolution: {integrity: sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==}+ engines: {node: '>=0.10'}+resolution: {integrity: sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==}engines: {node: '>=6'}@@ -4501,6 +5808,10 @@ packages:resolution: {integrity: sha512-uqbvqLUMrc6p0MO+WBRtTxY55hmyh94WRwI5a++PZe54X+bfVh59FSN7uWCBCW1CCVjzjnrwzfI8zidE2obMMw==}engines: {node: '>=16.9.0'}+ resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==}+ engines: {node: '>=0.10.0'}+resolution: {integrity: sha512-x1VCxdX4t+8wVfd1so/9w+vQ4vx7lKd2Qp5tDRutErwmR85OgmfX7RlLRMWafRMY7hbEiXIbudNrjOAPa/hL8Q==}engines: {node: '>=18'}@@ -4523,6 +5834,10 @@ packages:resolution: {integrity: sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==}engines: {node: '>= 14'}+ resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==}+ engines: {node: '>= 0.8'}+resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==}engines: {node: '>=6'}@@ -4542,6 +5857,9 @@ packages:resolution: {integrity: sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==}engines: {node: '>=8'}+ resolution: {integrity: sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==}+resolution: {integrity: sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==}@@ -4560,6 +5878,9 @@ packages:resolution: {integrity: sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA==}+ resolution: {integrity: sha512-Ndrrf6BMPalkQPd/zubL+4YghH2J9NspapQ09uDXwYbvOPkP0oaqf5CkcwJ0b50kS2O3ul6yVu+jz+RY62Cejg==}+resolution: {integrity: sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==}@@ -4632,6 +5953,9 @@ packages:engines: {node: '>=20.0.0'}hasBin: true+ resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==}+resolution: {integrity: sha512-bNglH7lPH5l+yHOes7Zr4VqxhOy4BQ9ZBUX4VdoFgxMpzJk7W1ZoO3Vgd9Pxa9PyjQ76sfm2aKH/nzEcCNRlew==}@@ -4645,6 +5969,14 @@ packages:resolution: {integrity: sha512-YGRs8knHhKHVShLkFET/rWAU8kmHbOV5LwN938RHI0pljAJ1Gf6SzXsSmRaEzcXTtOOmVqJ5+WtQPL5uigY50Q==}engines: {node: '>=14'}+ resolution: {integrity: sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==}+ engines: {node: '>= 0.8'}++ resolution: {integrity: sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==}+ engines: {node: '>= 0.8'}+resolution: {integrity: sha512-5gvq20T6vfpekVtqrYQsSCFZ1wEg5+wW0/QaZMWkFr6BqD3NfKs0rLCx4rrVlSWJeZb5NBJgVLswK/w2MWU+Gw==}@@ -4667,6 +5999,13 @@ packages:resolution: {integrity: sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==}engines: {node: '>=0.12'}+ resolution: {integrity: sha512-Sk5V6wVazPhq5MhpO+AUxJn5x7XSXGl1R93Vn7i+zS15KDVxQijejNCrz8340/2bgLBjR9GtEG8ZVKONDjcqGQ==}++ resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==}+ engines: {node: '>= 0.4'}+resolution: {integrity: sha512-poHGpORABojJJucnV9KbOavETW8lBVnphkW77ER5/BQ5Fz7oXSoCNek7IH3vR5nRjdsEz926ibFYX8KtLQmdyw==}@@ -4679,6 +6018,13 @@ packages:resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==}engines: {node: '>=6'}+ resolution: {integrity: sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==}++ resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==}+ engines: {node: '>=0.8.0'}+resolution: {integrity: sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==}engines: {node: '>=8'}@@ -4952,6 +6298,10 @@ packages:resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==}engines: {node: '>=0.10.0'}+ resolution: {integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==}+ engines: {node: '>= 0.6'}+resolution: {integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==}engines: {node: '>=6'}@@ -4979,6 +6329,254 @@ packages:resolution: {integrity: sha512-m8YrYgvKe9+9gEnWEuKz+qCGfHqkrff7PPfyDnOFkjsfYRKqiYyOxDFMFieCGAuhtk/VNm63tvNgKZVzVy+Hvg==}engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0}+ resolution: {integrity: sha512-t/CxeLio0NjY9/cOak1tQp62/hAUjzJxmhR4rVUR7K5bb9YoEtfl1ZekTn+Iuh+dYOMYzF0l72ODMSmY3CR1NA==}+ peerDependencies:+ expo: '*'++ resolution: {integrity: sha512-zDIQkUr0NM2S7YRj98Zohf/OBuM1q0o4ctxLz1C1oe4/33lHNLjp+2v3qUtBWVwn0zKka8UGADmS8M+83Wi6pw==}+ peerDependencies:+ expo: '*'+ react: '*'+ react-native: '*'++ resolution: {integrity: sha512-uyBeJwxIuXzWXXNrnRub5pcF8VzQsiOz0VBTWDpMG2UztmaFyfAz6pI/GCwRtWpHhiOpLoJj79WLdg1GMB+9cg==}+ peerDependencies:+ expo: '*'+ react: '*'+ react-native: '*'++ resolution: {integrity: sha512-A5oRf2I02XDRu2NnqKo7Au5kUu244unvyoRMUsB+xvg/BOlsR+G/oyDFGkjbda1cJbeKm9eqposIXbA2ri5UrQ==}+ peerDependencies:+ expo: '*'++ resolution: {integrity: sha512-eswB77bOzQ2OEvll/hV5VnzywaICFnYF21HIwcyokebFcSTSMfGQk8+VW06DRec9JnWuRExs0QXlfxyMPjS6KQ==}+ peerDependencies:+ expo: '*'+ react: '*'+ react-native: '*'+ react-native-web: '*'+ peerDependenciesMeta:+ react-native-web:+ optional: true++ resolution: {integrity: sha512-WycPVvBgbluSa6yAh6DKnX646ZHrae0gV2ZLum5fioNkR+DiWyulq1+UfS++Jc6yfAh/l55NOirv6mt5cnQhSw==}+ peerDependencies:+ expo: '*'+ react-native: '*'++ resolution: {integrity: sha512-SAWqEfF37nc8ot7bXsVmu9AFYwQdC2kGvH/eNAHiR3bmlcf1Vv8wu9AnGKT+a90r3T8YfwMpZP4QAYlo4vCn9w==}+ peerDependencies:+ expo: '*'++ resolution: {integrity: sha512-7giMK6BLL685GECHem2UAQvS473ImZLi5l+Q5tq+XSyv6I9UNVPs0p07mKwgBzq8z7DR3d4nTl702ziFxTjO3Q==}+ peerDependencies:+ expo: '*'++ resolution: {integrity: sha512-F6oAHaDn9j3L/gyMGE+OalriX6PHZWnZLxpN5jc6crTrp8f6hSwGhmsHpAvdOzijfMjyi3R2UkcISFsCIIQYFA==}+ peerDependencies:+ expo: '*'+ react-native: '*'++ resolution: {integrity: sha512-F47VdzOHYc19FhI/jBgctpO8a5UskTIxG6a1E5t3W5gF8VImuvBQffdXXfLHhsuCl7dS3v3U0R45cleeVXO1Zg==}+ peerDependencies:+ expo: '*'++ resolution: {integrity: sha512-H7m9ENtVYz4FpJktQj+z/njIN1t7kOEaKCv8Qgv2SdAlyFTW8s2EnufxPoSlg2zUTanaauJ6wrR6XESHwW7kpw==}+ peerDependencies:+ expo: '*'+ react-native: '*'++ resolution: {integrity: sha512-1vkZRadOsIputFDBcclqBa1pO3iXOO6iIsdqJipQWw4V5TSnWgmRTuOF7ro8IzrVue+PHbum++KCG3Tawem4cg==}+ peerDependencies:+ expo: '*'+ react-native: '*'++ resolution: {integrity: sha512-7WOMC2oA6xCfOm8bbofqWn2bIqyWFm7YLEnpc/gA1MJH0Ll0TfT/3+CqRkoW2eNRWMS8sxrz5WukUmSvmNquHA==}+ peerDependencies:+ expo: '*'+ react: '*'+ react-native: '*'++ resolution: {integrity: sha512-/AG2Kljbqfgxu+GchI2YFIbxiF9cPsIpCy4iNDzlRiZk9rvR6BwRfB6gfQVu3V2ExaoGf2h5IsEnqVI5MYNBAg==}+ peerDependencies:+ expo: '*'+ react: '*'+ react-native: '*'++ resolution: {integrity: sha512-9kYZECLKE3pYZQs+kt3+ggY83Lfryog9/UEo3HJKGcHUZeKKtlFBIPFjI4LzREubsvjP7AsvG0FdEX9EquIoAQ==}++ resolution: {integrity: sha512-GqgH746wtJImmsbyHmCQoi7cOslKuWQBbJHXr53S35Bpf5UvxCAztvnitUEd7D0QvFN2rvkOhylbZpgZZfBLlQ==}+ peerDependencies:+ expo: '*'+ react: '*'++ resolution: {integrity: sha512-bfTyiPb8szacs8XkGowXt5ssH/vbF26vFG8WUWQar8CcRpQcIzXY980ZkP7pK7Pcdy5MattwFdujrWOxwv5s3Q==}+ peerDependencies:+ react: '*'+ react-native: '*'++ resolution: {integrity: sha512-sIKYH3Ivddoge568WY6j+Kp2MAAZzWWqEnY2bokLkJFwX366tGL1mEnoY2WUi/qHatFFPop2yqDdurzbhnnimQ==}+ peerDependencies:+ expo: '*'+ react: '*'++ resolution: {integrity: sha512-pPIIcKR73OShwlWMg8H90WRzKUd2krDdKlKAwuQV1FtUwE7H3hQEFw0ePFQY9yFoGMF/77ryYwNKfI5umMcCog==}+ peerDependencies:+ expo: '*'++ resolution: {integrity: sha512-Hj5NjZRlfccazhKab+wK19leRVUr1Y/PUERaRvegIbUSkq4GVxKq6lU9QHlKQyC16MdD/VS4iwsiLivB4o7lvQ==}+ hasBin: true++ resolution: {integrity: sha512-vEL3aeih32yuD7sQHB3Y3LKXRT8mMgoVQWFIcHtX811Bl0StnNZUG2vT5je4fe+OWYVfkjb6gNqfMc04moREgA==}+ peerDependencies:+ react: '*'+ react-native: '*'+ react-native-worklets: ^0.7.4 || ^0.8.0 || ^0.9.0 || ^0.10.0+ peerDependenciesMeta:+ react-native-worklets:+ optional: true++ resolution: {integrity: sha512-ssnwz3ZuIgCbZj5A3J6NlhQrXZojg+BjkeWrOWqVJhyMHlV/A/cRT7s986chKku97BFt6ucmDu6/BCzrV45Wcw==}+ peerDependencies:+ react-native: '*'++ resolution: {integrity: sha512-BfK1kdftZcM6o9o1FAG7/y0l6vWX0n8td0M5lwkvaMeRXZ9LkRwOi9CQXwvsMTQGQiPwtQXgwiAze13cqjt75g==}+ peerDependencies:+ expo: '*'+ react: '*'++ resolution: {integrity: sha512-CWBW6DxqRJ2MaYZW5+/WfEWwIwbiVk5UAPqx0kE676B4R1+PlAXARk/kuNeQBcVrcDNV6i9ihE9B0db8Cd2RXQ==}+ peerDependencies:+ expo: '*'+ react: '*'+ react-native: '*'++ resolution: {integrity: sha512-XpqE4Oh4yrmc+sVfsDQPLErBlus//85ulLRghVZltYcdvFm9yNzErmaKrXuBVMUL6D3tnpDtkIgxESG9hYBd7w==}+ peerDependencies:+ '@expo/log-box': ^57.0.4+ '@expo/metro-runtime': ^57.0.16+ '@testing-library/react-native': '>= 13.2.0'+ expo: '*'+ expo-constants: ^57.0.20+ expo-linking: ^57.0.11+ react: '*'+ react-dom: '*'+ react-native: '*'+ react-native-gesture-handler: '*'+ react-native-reanimated: '*'+ react-native-safe-area-context: '>= 5.4.0'+ react-native-screens: ^4.26.0+ react-native-web: '*'+ react-server-dom-webpack: ~19.0.4 || ~19.1.5 || ~19.2.4+ peerDependenciesMeta:+ '@testing-library/react-native':+ optional: true+ react-dom:+ optional: true+ react-native-gesture-handler:+ optional: true+ react-native-reanimated:+ optional: true+ react-native-web:+ optional: true+ react-server-dom-webpack:+ optional: true++ resolution: {integrity: sha512-7zBA1RThURTXdP4w65kBzZNbcSsfArqVd+p+ETAnPRWXO8J296Qd0YaCVyRpJ0HSwlCnGdvOnqO+NgSreHsOhA==}+ peerDependencies:+ expo: '*'++ resolution: {integrity: sha512-aK+LdKzauHSGmsOStZtyxdzv0zWssCkxTw3m4QuOhfDSJsZaMRTd9O41d8ixU/QfELTbaJ0oRNcF7JFV/7O9YQ==}+ engines: {node: '>=20.16.0'}++ resolution: {integrity: sha512-7cKDn7uBwg0RkcmY015/5j9st4msWJ4zQiPmQdVZoppW3cFSbv05n7xhM6CjUU466Tx4VRTqDF21HuIHkmnEtA==}+ peerDependencies:+ expo: '*'++ resolution: {integrity: sha512-Xwaq1gAoVRWx5dPG5VhT5RSbnI9OilhZnO5qoPBnUaBAa5VzRzfdS8q0/bsPt0jR2DKLtGuP0bQ6efMJ4RIMDg==}+ peerDependencies:+ expo: '*'+ react: '*'+ react-native: '*'++ resolution: {integrity: sha512-uuK5yHLVR7kExUCrO/ItBvp/kp1maQ9Nkb6KvNy5ZUQnN0NMKwuhJ4GvbfS9N3ACmvCjTT4gKvg4yH5UuKIYNA==}+ peerDependencies:+ expo: '*'+ expo-font: '*'+ react: '*'+ react-native: '*'++ resolution: {integrity: sha512-z//rxQJzhTNA1PcKrUtWmrd21jAS3nEDu1b0n8B/7LTTR933OcsZYP1HnbaZifuo2ZH/h7nce2Ow61WZ1Ig2bg==}+ peerDependencies:+ expo: '*'+ react-native: '*'+ react-native-web: '*'+ peerDependenciesMeta:+ react-native-web:+ optional: true++ resolution: {integrity: sha512-x3SA5toiHZEkW+5oeNdUM1Rvt6M3ExegQsSwS3Z1+S9gn9utGYTGBkb8MBQivhjIZiRlQYDIhauxA8kySQEWtQ==}+ peerDependencies:+ expo: '*'++ resolution: {integrity: sha512-U1rsFwcuZNnU61Z/YLnnVC/ZqP0wpxh/rCKUMff3ot/rhLpxFY1zxEqu4vyaexyvBAB1mwpl9lA/ltcHBoQGyg==}+ hasBin: true+ peerDependencies:+ '@expo/dom-webview': '*'+ '@expo/metro-runtime': '*'+ react: '*'+ react-dom: '*'+ react-native: '*'+ react-native-web: '*'+ react-native-webview: '*'+ peerDependenciesMeta:+ '@expo/dom-webview':+ optional: true+ '@expo/metro-runtime':+ optional: true+ react-dom:+ optional: true+ react-native-web:+ optional: true+ react-native-webview:+ optional: true++ resolution: {integrity: sha512-ZgEeZXj30q+I0EN+CbSSpIyPaJ5HVQD18Z1m+u1FXbAeT94mr1zw50q4q6jiiC447Nl/YTcIYSAftiGqetwXCA==}+resolution: {integrity: sha512-9U/jZUgjnSGyntRr6y5Muu1MJcwFl6kPu7k8qLF0IMNfLqvw0NZ4nnVDq0RVoZ0RvCyumib4Ez3KYrVfilrw+g==}@@ -5017,6 +6615,14 @@ packages:resolution: {integrity: sha512-WtySTkS4OKev5JtpHXnib4Gxiurzh5NCGvWrFaZ34m6JehfTUhKZvn9njTfw48t6JumVQOmrKqpmGcdwxnhqBQ==}+ resolution: {integrity: sha512-XHYLKk9J4BupDxi9bSEhkfss0m+Vr9ChTrjhf9l2iw3jB5C7BnY4GVPoMcqbrTutsKJso6yj2nAB6BI/F2oZaA==}+ engines: {node: '>=20'}+ hasBin: true++ resolution: {integrity: sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==}+resolution: {integrity: sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==}@@ -5029,6 +6635,9 @@ packages:picomatch:optional: true+ resolution: {integrity: sha512-m6I8ALe4L4XpdETy7MJZWs6L1IVMbjs99bwbpIKphxX+0CTns4IKDWJY0LWfr4YsFjfg+z1TjzTMU8lKl8rG0w==}+resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==}engines: {node: '>=16.0.0'}@@ -5037,6 +6646,14 @@ packages:resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==}engines: {node: '>=8'}+ resolution: {integrity: sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ==}+ engines: {node: '>=0.10.0'}++ resolution: {integrity: sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==}+ engines: {node: '>= 0.8'}+resolution: {integrity: sha512-afd4O7zpqHeRyg4PfDQsXmlDe2PfdHtJt6Akt8jOWaApLOZk5JXs6VMR29lz03pRe9mpykrRCYIYxaJYcfpncQ==}engines: {node: '>=18'}@@ -5056,6 +6673,12 @@ packages:resolution: {integrity: sha512-5+ybhBZANEJxaH3X5evAFatUxLfEHSr7n6kYJ+1Qd0mUqr4eu9gIf6GDbWHf8RJijHrjjO8G+la14SlL2SeS1Q==}+ resolution: {integrity: sha512-3PYnM29RFXwvAN6Pc/scUfkI7RwhQ/xqyLUyPNlXUp9S40zI8nup9tUSrTLSVnWGBN38FNiGWbwZOB6uR4OGdw==}++ resolution: {integrity: sha512-6FPvD/IVyT4ZlNe7Wcn5Fb/4ChigpucKYSvD6a+0iMoLn2inpo711eyIcKjmDtE5XNcgAkSH9uN/nfAeZzHEfg==}+resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==}engines: {node: '>=14'}@@ -5064,6 +6687,10 @@ packages:resolution: {integrity: sha512-wzsgA6WOq+09wrU1tsJ09udeR/YZRaeArL9e1wPbFg3GG2yDnC2ldKpxs4xunpFF9DgqCqOIra3bc1HWrJ37Ww==}engines: {node: '>=0.4.x'}+ resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==}+ engines: {node: '>= 0.6'}+resolution: {integrity: sha512-EQsFzMUJkCKGr1ePqlYADkIUmHW1s3ZXr5Yqy6wbGrfUCphpl2maM/kyOIRA2HpP3AaFQTZXD4ldjek+nccddA==}engines: {node: '>=14.14'}@@ -5077,6 +6704,9 @@ packages:engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}os: [darwin]+ resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==}+resolution: {integrity: sha512-939eZS4gJ3htTHAldmyyuzlrD58P03fHG49v2JfFXbV6OhvZKRC9j2yAtdHw/zrp2zXHuv05zMIy40F0ge7spA==}engines: {node: '>=18'}@@ -5094,6 +6724,10 @@ packages:resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==}engines: {node: 6.* || 8.* || >= 10.*}+ resolution: {integrity: sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q==}+ engines: {node: '>=6'}+resolution: {integrity: sha512-afP4W205ONCuMoPBqcR6PSXnzX35KTcJygfJfcp+QY+uwm3p20p1YczWXhlICIzGMCxYBQcySEcOgsJcrkyobg==}engines: {node: '>=16'}@@ -5109,6 +6743,10 @@ packages:resolution: {integrity: sha512-b1O07XYq8eRuVzBNgJLstU6FYc1tS6wnMtF1I1D9lE8LxZSOGZ7LhxN54yPP6mGw5f2CkXY2BQUL9Fx41qvcIg==}engines: {node: '>= 14'}+ resolution: {integrity: sha512-VilgtJj/ALgGY77fiLam5iD336eSWi96Q15JSAG1zi8NRBysm3LXKdGnHb4m5cuyxvOLQQKWpBZAT6ni4FI2iQ==}+ engines: {node: '>=6'}+resolution: {integrity: sha512-r1ekGw/Bgpi3HLV3h1MRBIlSAdHoIMklpaQ3OQLFcRw9PwAj2rqigvIbg+dBUI51OxVI2jsEtDywDBjSiuf7Ug==}hasBin: true@@ -5133,6 +6771,10 @@ packages:deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting [email protected]hasBin: true+ resolution: {integrity: sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==}+ engines: {node: 18 || 20 || >=22}+resolution: {integrity: sha512-7ACyT3wmyp3I61S4fG682L0VA2RGD9otkqGJIwNUMF1SWUombIIk+af1unuDYgMm082aHYwD+mzJvv9Iu8dsgg==}engines: {node: '>=18'}@@ -5166,22 +6808,81 @@ packages:ocache:optional: true+ resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==}+ engines: {node: '>=4'}+resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==}engines: {node: '>=8'}+ resolution: {integrity: sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==}+ engines: {node: '>= 0.4'}+resolution: {integrity: sha512-OguPdidb+fbHQSU4Q4ZiLKnzWo8Wwsf5bZfbvu7//a9oTYoqD/fWpe96NuHkoS9h0ccGOTe0C4NGXdtS0iObOw==}resolution: {integrity: sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw==}+ resolution: {integrity: sha512-qG1PXzTEtriF6oQLZF3vyHhSMxOdW5h2TqqLri0rdpstPustd2fSvRZQMVAPdlhgFwBfYnj3OUZtiO6LjYsEFw==}++ resolution: {integrity: sha512-xVx5Opwy8Oo1I5yGpVRhCvWL/iV3M+ylksSKVNlxxD90cpDpR/AR1jLYqK8HWihm065a6UI3HeyAmYzwS8NOOg==}++ resolution: {integrity: sha512-A1+8zn5oss2CFP7pKsOaxorQG6FNIz1WU1VDqruLPPZl3LVgeE2C5xfFg8Ow6/Ow4mSslLLtYP1J3n38eKyW9w==}++ resolution: {integrity: sha512-guv1nQ6IJ7S83NRFPWc3SA7IBZrdNC9kapwOq6uXvF4wP+sDCgjzQbKPCoyYmoyZRzztF/n/c36l/rccCZSiCw==}++ resolution: {integrity: sha512-9JLjeHxBx8T4CAsydZR49PNZUaix+WpQJwu9p2010lu+7Kwl6D/7wYFFJxoz+aXkaaClp9Zfg6W6/zVlSJORaA==}++ resolution: {integrity: sha512-GdpwMmH5x6IpC1cijvcvYnlPB60Mh6kTSF/NFdYV/j56gYdi+0RIakYs+eqOV+bbO0SW7mgVVGSsTJxyPQfo3w==}++ resolution: {integrity: sha512-GApNk4zLHi2UWoWZZkx7LNCOSzLSc5lB55pZ/PhK7ycFeg7u5LcF88p/WbpIi1XUDtE0MpHE3uRR3u3KB7TjSQ==}++ resolution: {integrity: sha512-Cj5YAl0jN2nuy8Ac3lxGUPvYQsI7a9l63EYs9vXzatbyQVeWTl01fqsYC0+at9/KSWzH941o4Ujq6h3SrK3RXw==}+ peerDependencies:+ '@gorhom/bottom-sheet': ^5.2.9+ expo-blur: '>=14.0.0'+ react: '>=19.0.0'+ react-native: '>=0.81.0'+ react-native-gesture-handler: ^2.28.0+ react-native-reanimated: ^4.1.1+ react-native-safe-area-context: ^5.6.0+ react-native-screens: '>=4'+ react-native-svg: ^15.12.1+ react-native-worklets: '>=0.5.1'+ tailwind-merge: ^3.4.0+ tailwind-variants: ^3.2.2+ peerDependenciesMeta:+ '@gorhom/bottom-sheet':+ optional: true+ expo-blur:+ optional: true+ react-native-screens:+ optional: true++ resolution: {integrity: sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==}+resolution: {integrity: sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==}resolution: {integrity: sha512-U9LYDy1CwhMCnprUfeAZWZGByVbhd54hwepegYTK7Pi5NvqEj63ifz5z+xukznehT7i6NIZRu89Ay1AZmRsLEQ==}+ resolution: {integrity: sha512-puUZAUKT5m8Zzvs72XWy3HtvVbTWljRE66cP60bxJzAqf2DgICo7lYTY2IHUmLnNpjYvw5bvmoHvPc0QO2a62w==}+ engines: {node: ^16.14.0 || >=18.0.0}+resolution: {integrity: sha512-Y22oTqIU4uuPgEemfz7NDJz6OeKf12Lsu+QC+s3BVpda64lTiMYCyGwg5ki4vFxkMwQdeZDl2adZoqUgdFuTgQ==}engines: {node: '>=18'}@@ -5204,6 +6905,10 @@ packages:resolution: {integrity: sha512-VTZkM9GWRAtEpveh7MSF6SjjrpNVNNVJfFup7xTY3UpFtm67foy9HDVXneLtFVt4pMz5kZtgNcvCniNFb1hlEQ==}+ resolution: {integrity: sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==}+ engines: {node: '>= 0.8'}+resolution: {integrity: sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==}engines: {node: '>= 14'}@@ -5275,6 +6980,9 @@ packages:resolution: {integrity: sha512-m3Ofv/X/tV8Y3tHXLohcuVuhWKo7BBq62cqY15etqmLxg2DZ34AGGgQDeR+SCta2+zICb1NX83af0GJmbQ1++g==}+ resolution: {integrity: sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==}+resolution: {integrity: sha512-7H/2gFSIitxc0hG3nOI1glS8QLo/EHBFFLk8vEUjXY/xu0AdL8jZ9U1IzO2PUm0d2D/ofQcAifb0g6OBkt8U7w==}engines: {node: '>= 12'}@@ -5282,6 +6990,9 @@ packages:resolution: {integrity: sha512-feOM6FaSr6rEABp/eDfVseKyTMDt+KGpeB35SkVn9Tyn0CqvVsY3EwI0v5i8nMHyJnzCIQf7nsy3p41TPkJZhg==}+ resolution: {integrity: sha512-m6UrgzFVUYawGBh1dUsWR5M2Clqic9RVXC/9f8ceNlv2IcO9j9J/z8UoCLPqtsPBFNzEpfR3xftohbfqDx8EQA==}+resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==}engines: {node: '>=8'}@@ -5290,6 +7001,15 @@ packages:resolution: {integrity: sha512-f4RqJKBUe5rQkJ2eJEJBXSticB3hGbN9j0yxxMQFqIW89Jp9WYFtzfTcRlstDKVUTRzSOTLKRfO9vIztenwtxA==}engines: {node: '>=18.20'}+ resolution: {integrity: sha512-J/vG0zBCbIKOQFfufSwyXdMrsohyJIUNkrnmo6WZGzoM7tr/lsbfW5b2BvisL6zsyMzK9UxV9L6c7AoFbyXHOA==}+ engines: {node: '>= 0.4'}++ resolution: {integrity: sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==}+ engines: {node: '>=8'}+ hasBin: true+resolution: {integrity: sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==}engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}@@ -5320,6 +7040,10 @@ packages:resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==}engines: {node: '>=0.12.0'}+ resolution: {integrity: sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==}+ engines: {node: '>=8'}+resolution: {integrity: sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==}engines: {node: '>=12'}@@ -5331,6 +7055,10 @@ packages:resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==}engines: {node: '>=8'}+ resolution: {integrity: sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==}+ engines: {node: '>=8'}+resolution: {integrity: sha512-e6rvdUCiQCAuumZslxRJWR/Doq4VpPR82kqclvcS0efgt430SlGIk05vdCN58+VrzgtIcfNODjozVielycD4Sw==}engines: {node: '>=16'}@@ -5364,7 +7092,11 @@ packages:resolution: {integrity: sha512-e3cNNMpv8Kh20MjjphTXs+3Vz7DQyLM1nft7KJhnh46atFhjVJRa+0Hq0beywuwsACtMQUBihQkFl8zxb7gt1Q==}engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0}+ resolution: {integrity: sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==}+ engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}+resolution: {integrity: sha512-aroZVqwOz/wC2y6pC+obgFWKV9viaQWQTTSB6W5H55+egtUczIfXR/rxExTv92xD/ADYwpqaYfVWx1aqwKg7FA==}engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0}@@ -5380,10 +7112,25 @@ packages:resolution: {integrity: sha512-Mg0WK7A6xRHLSA1udJ8y9f3lM0uUhFTBnLKzwPmqB9AylvpleJ6BLemR8K9dK27DY+cesDryoA7yLZCAHsPG1A==}engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0}+ resolution: {integrity: sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==}+ engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}+resolution: {integrity: sha512-yKuxmNy2rSbTXw+3SIPanJo+nV4/BS1p26v44IYBFMsswSQySfMMcPHErnOncda7i9HEz0q605rIhSTBVgrZTg==}engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0}+ resolution: {integrity: sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==}+ engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}++ resolution: {integrity: sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==}+ engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}++ resolution: {integrity: sha512-dZ6Ra7u1G8c4Letq/B5EzAxj4tLFHL+cGtdpR+PVm4yzPDj+lCk+AbivWt1eOM+ikzkowtyV7qSqX6qr3t71Ww==}+resolution: {integrity: sha512-/imKNG4EbWNrVjoNC/1H5/9GFy+tqjGBHCaSsN+P2RnPqjsLmv6UD3Ej+Kj8nBWaRAwyk7kK5ZUc+OEatnTR3A==}hasBin: true@@ -5402,6 +7149,9 @@ packages:resolution: {integrity: sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==}hasBin: true+ resolution: {integrity: sha512-0wM3YBWtYePOjfyXQH5MWQ8H7sdk5EXSwZvmSLKk2RboVQ2Bu239jycHDz5J/8Blf3K0Qnoy2b6xD+z10MFB+Q==}+resolution: {integrity: sha512-uQu/fXVqVaMg6gM8/E5G5+eygVcZ1NV0Z51CvqhNa2bDWxvHMl484ETr6vph4oPyC+KUcbP/w2W2pewfCiR9aQ==}engines: {node: '>=20.0.0'}@@ -5465,13 +7215,25 @@ packages:resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==}+ resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==}+ engines: {node: '>=6'}+resolution: {integrity: sha512-2ZSpGOZclbgJ6wnyWaPJFeYVD+oJ6A7fbcFImBmk7bOQ4Bk39/Yy7cALCnswjT5W/nnz39b2czkQkG/XRKPqWw==}+ resolution: {integrity: sha512-ONPnazC96VKDntab9j9JKwIWhZ4ZUceB4A9Epu4Ssg0hYFmtHZSeQ+n15nIwTFmcBUKtExOer8WTJ4GF9MO64A==}+ hasBin: true+resolution: {integrity: sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw==}engines: {node: '>= 0.6.3'}+ resolution: {integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==}+ engines: {node: '>=6'}+resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==}engines: {node: '>= 0.8.0'}@@ -5479,30 +7241,63 @@ packages:resolution: {integrity: sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==}+ resolution: {integrity: sha512-gPWxznF6TKmUHrOQjlVo2UbaL2EJ71mb2CCeRs/2qBpi4L/g4LUVc9+3lKQ6DTUZwJswfM7ainGrLO1+fOqa2g==}++ resolution: {integrity: sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==}+ engines: {node: '>= 12.0.0'}+ cpu: [arm64]+ os: [android]+resolution: {integrity: sha512-c8JK7hyE65X1MHMN+Viq9n11RRC7hgin3HhYKhrMyaXflk5GVplZ60IxyoVtzILeKr+xAJwg6zK6sjTBJ0FKYQ==}engines: {node: '>= 12.0.0'}cpu: [arm64]os: [darwin]+ resolution: {integrity: sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==}+ engines: {node: '>= 12.0.0'}+ cpu: [arm64]+ os: [darwin]+resolution: {integrity: sha512-k1EvjakfumAQoTfcXUcHQZhSpLlkAuEkdMBsI/ivWw9hL+7FtilQc0Cy3hrx0AAQrVtQAbMI7YjCgYgvn37PzA==}engines: {node: '>= 12.0.0'}cpu: [x64]os: [darwin]+ resolution: {integrity: sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==}+ engines: {node: '>= 12.0.0'}+ cpu: [x64]+ os: [darwin]+resolution: {integrity: sha512-kmW6UGCGg2PcyUE59K5r0kWfKPAVy4SltVeut+umLCFoJ53RdCUWxcRDzO1eTaxf/7Q2H7LTquFHPL5R+Gjyig==}engines: {node: '>= 12.0.0'}cpu: [x64]os: [freebsd]+ resolution: {integrity: sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==}+ engines: {node: '>= 12.0.0'}+ cpu: [x64]+ os: [freebsd]+resolution: {integrity: sha512-MjxUShl1v8pit+6D/zSPq9S9dQ2NPFSQwGvxBCYaBYLPlCWuPh9/t1MRS8iUaR8i+a6w7aps+B4N0S1TYP/R+Q==}engines: {node: '>= 12.0.0'}cpu: [arm]os: [linux]+ resolution: {integrity: sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==}+ engines: {node: '>= 12.0.0'}+ cpu: [arm]+ os: [linux]+resolution: {integrity: sha512-gB72maP8rmrKsnKYy8XUuXi/4OctJiuQjcuqWNlJQ6jZiWqtPvqFziskH3hnajfvKB27ynbVCucKSm2rkQp4Bw==}engines: {node: '>= 12.0.0'}@@ -5510,6 +7305,13 @@ packages:os: [linux]libc: [glibc]+ resolution: {integrity: sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==}+ engines: {node: '>= 12.0.0'}+ cpu: [arm64]+ os: [linux]+ libc: [glibc]+resolution: {integrity: sha512-jmUQVx4331m6LIX+0wUhBbmMX7TCfjF5FoOH6SD1CttzuYlGNVpA7QnrmLxrsub43ClTINfGSYyHe2HWeLl5CQ==}engines: {node: '>= 12.0.0'}@@ -5517,6 +7319,13 @@ packages:os: [linux]libc: [musl]+ resolution: {integrity: sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==}+ engines: {node: '>= 12.0.0'}+ cpu: [arm64]+ os: [linux]+ libc: [musl]+resolution: {integrity: sha512-piWx3z4wN8J8z3+O5kO74+yr6ze/dKmPnI7vLqfSqI8bccaTGY5xiSGVIJBDd5K5BHlvVLpUB3S2YCfelyJ1bw==}engines: {node: '>= 12.0.0'}@@ -5524,6 +7333,13 @@ packages:os: [linux]libc: [glibc]+ resolution: {integrity: sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==}+ engines: {node: '>= 12.0.0'}+ cpu: [x64]+ os: [linux]+ libc: [glibc]+resolution: {integrity: sha512-rRomAK7eIkL+tHY0YPxbc5Dra2gXlI63HL+v1Pdi1a3sC+tJTcFrHX+E86sulgAXeI7rSzDYhPSeHHjqFhqfeQ==}engines: {node: '>= 12.0.0'}@@ -5531,22 +7347,45 @@ packages:os: [linux]libc: [musl]+ resolution: {integrity: sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==}+ engines: {node: '>= 12.0.0'}+ cpu: [x64]+ os: [linux]+ libc: [musl]+resolution: {integrity: sha512-mSL4rqPi4iXq5YVqzSsJgMVFENoa4nGTT/GjO2c0Yl9OuQfPsIfncvLrEW6RbbB24WtZ3xP/2CCmI3tNkNV4oA==}engines: {node: '>= 12.0.0'}cpu: [arm64]os: [win32]+ resolution: {integrity: sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==}+ engines: {node: '>= 12.0.0'}+ cpu: [arm64]+ os: [win32]+resolution: {integrity: sha512-PVqXh48wh4T53F/1CCu8PIPCxLzWyCnn/9T5W1Jpmdy5h9Cwd+0YQS6/LwhHXSafuc61/xg9Lv5OrCby6a++jg==}engines: {node: '>= 12.0.0'}cpu: [x64]os: [win32]+ resolution: {integrity: sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==}+ engines: {node: '>= 12.0.0'}+ cpu: [x64]+ os: [win32]+resolution: {integrity: sha512-xi6IyHML+c9+Q3W0S4fCQJOym42pyurFiJUHEcEyHS0CeKzia4yZDEsLlqOFykxOdHpNy0NmvVO31vcSqAxJCg==}engines: {node: '>= 12.0.0'}+ resolution: {integrity: sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==}+ engines: {node: '>= 12.0.0'}+resolution: {integrity: sha512-++gUqRDEvcnN6Zhqrr+y/CkVEHhlrR96vZn3nZZPYzMcBUyBtTKzB9NadClFIsIVSsu+3i9tfk/erqy9kAmt7Q==}engines: {node: '>=14'}@@ -5568,12 +7407,22 @@ packages:resolution: {integrity: sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==}+ resolution: {integrity: sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==}++ resolution: {integrity: sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ==}+resolution: {integrity: sha512-C7IOaBBK/0gMORRBd8OETNx3kmOkgIWIPvyDpZSCTwUrpYmgZwJkjZeOD8ww4xbOUOs4/attY+pciKvadNfFbg==}resolution: {integrity: sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==}+ resolution: {integrity: sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==}+ engines: {node: '>=4'}+resolution: {integrity: sha512-WpG9CcFAOjz/FtNht+QJeGpvVl/cdR6P0z6OcXSkr8wFJOsV2GRj2j10JLfjuA4aYkcKCNIEqRGCyTife9R8/g==}@@ -5605,6 +7454,17 @@ packages:resolution: {integrity: sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==}engines: {node: '>=12'}+ resolution: {integrity: sha512-uMtIW3I6jfHbUp2FnUwxbDJc7XFJDz2g5YVcw6T/De8Sp9f21vTO7HlJNhxpBynDYlqLyWHaXeR0dBSiw6TqOw==}+ peerDependencies:+ '@types/react': '*'+ react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0+ react-native: '*'+ react-native-svg: ^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0+ peerDependenciesMeta:+ '@types/react':+ optional: true+resolution: {integrity: sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==}hasBin: true@@ -5623,6 +7483,9 @@ packages:resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==}engines: {node: '>=10'}+ resolution: {integrity: sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==}+resolution: {integrity: sha512-wiYz4+JrLyb/DqW2hkFJxP7Vd7JuTDm77fvbM8VfEQdmSMqcImWeeRbHwZjBjIFki/VaMK2BhFi7oUUZeM5bqw==}@@ -5631,6 +7494,9 @@ packages:engines: {node: '>= 20'}hasBin: true+ resolution: {integrity: sha512-ocnPZQLNpvbedwTy9kNrQEsknEfgvcLMvOtz3sFeWApDq1MXH1TqkCIx58xlpESsfwQOnuBO9beyQuNGzVvuhQ==}+resolution: {integrity: sha512-Tmd1Vg/m3Xz43afeNxDIhWRtFZgM2VLyaf4vSTYwudTyeuTneoL3qtWMA5jeLyz/O1vDJmmV4QuScFCA2tBPwg==}@@ -5673,9 +7539,138 @@ packages:resolution: {integrity: sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg==}+ resolution: {integrity: sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==}+resolution: {integrity: sha512-pVxQFCcaYUEAH853+v7yoI/qzhxXSq1bTb9obMYGYAN1c3Hen+XDCEvr296XhstrwlSTNgOR7mCSD4JPjbJe5A==}+ resolution: {integrity: sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q==}++ resolution: {integrity: sha512-2Sug1+knBjkaMsMgf1ctR1Ujx+Ayku4EdJN4Z+C2+JzoeF7A3OZ9KM2GY0CpQS51NR61LTurMJrRKPhSs3ZRTQ==}+ engines: {node: '>=10'}++ resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==}++ resolution: {integrity: sha512-2WbHILKMiJUzfdjmGOQOqU1bWi9//gqiclc/tkk/AIsrrVw3efhZ1uhkOwMTxUEPOzqoo091H0olLmVZH5FHGQ==}+ engines: {node: ^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0}++ resolution: {integrity: sha512-B1ozl6KxFHbQjXZ2U8WiTPWXylqiD3V4EXyV5r0fqETOrqIrJlBvbVTD82UxIN+B3Vpe4l8G1tb15ocd2RyOQA==}+ engines: {node: ^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0}++ resolution: {integrity: sha512-3dPB2TnvGjjf0/9O7AXVQURKXuQNauTZE7WpTGTlR017Gh/B5y0m/2wcqxfveUguHSpu89KhVxCAlr2k/H7uhQ==}+ engines: {node: ^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0}++ resolution: {integrity: sha512-6tyXt1BZ/3U183XV48oif7Nm65TE+pTo0Vs31u4FxMgqiYQR/SiSr3RoXn3pmy4pd280ZmLmct0x3jZpu0pV4A==}+ engines: {node: ^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0}++ resolution: {integrity: sha512-WHS0n2OxQqtwEjSeQFPePNrMvEFhmQcUQM9cRJMHByWoi/GMWFBEWOf7hVkAM/0KRutAXNbDlSu/cZB6CyxgQQ==}+ engines: {node: ^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0}++ resolution: {integrity: sha512-KBJVpb02oKNO+jlWQ1Aax7cd11YP0MClDaMgx6C4MhyZ9g95J/dC1Bo6sCzXaU9L9h/w5cQfT5zDkGW5sOj99A==}+ engines: {node: ^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0}++ resolution: {integrity: sha512-zie+uN6oohscowi2S7ByU+wUw6CrT4ZxW9uAbONOObSxx86RGmnIAmjXHLkfmcdYoY7jzOPEbqcI6oeVmqyBQA==}+ engines: {node: ^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0}++ resolution: {integrity: sha512-cD2mLEofcuV26kxSV4hfV1Pbuh6igdUhYQriO8ZVeJ7HyZfq4/wqHV0gSR7fEO8NUp9odr60/Kzm5YakmghWwQ==}+ engines: {node: ^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0}++ resolution: {integrity: sha512-xwm605hCi5Y6eJTTb8ZWo6pkUcoBEIyiQOfkZh5GwtDwUrP9SNhTQZhzJHrBCwwxlf3Ptl/pxWJgQ1rsNYMnrA==}+ engines: {node: ^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0}++ resolution: {integrity: sha512-ZqYskM8+f3PFMosBDJd8DLqRvT1ltRGhWL/ZfTpBvf4SoadO30VVrdhAoHFVGz3G1CJpWa3fgZH7nnnX/ybllA==}+ engines: {node: ^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0}++ resolution: {integrity: sha512-mlm/JL8toSbSc2akpKIGmzvrVRSCgZ5vkbycI34oMLoOnLGuLyC8WTyVJ6P0hZG/usDaGwZSl/s9BCRriqjGJA==}+ engines: {node: ^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0}++ resolution: {integrity: sha512-ov9VywWBsHPt54Zc7/DxWvqjTwxuZvhfeyHg8ZAMGKtf2PcH1wS3EnoBH7In53Rspk/eXVWAO5+avxunPn081w==}+ engines: {node: ^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0}++ resolution: {integrity: sha512-BJoFwCEDsYnagPqarayInv2+diCDNDdLlaof/p6s9w4gh+gc9HXYM+pDvsKGKKUumpZswNF3Z/ftTMqKl/5IBg==}+ engines: {node: ^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0}++ resolution: {integrity: sha512-SqhB/Kxrw0XfyW0k8mEscqX/CQopm6Fp3EpdSIPzvKfGgQp9bTMahg9PAdVsXUmIWwErbmFw1VqB+VFBOKksUw==}+ engines: {node: ^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0}++ resolution: {integrity: sha512-VSSnepg1k6LyCwtb6eirWdAWlpKwBG8Rdtsr1mU38rMelFyWgh3/QuMSiZIZAIjwg/fsa8GhW5/FO54CAUPCEA==}+ engines: {node: ^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0}++ resolution: {integrity: sha512-PplpGc/OCLxgKeLNsLQO/VHsYDIvkcGGr3zNT7UanHCGRqhxKv245o+naV8cRI4/pcLqyc+9j+J0AJbT3Kp5Sg==}+ engines: {node: ^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0}++ resolution: {integrity: sha512-U1m2+d1Pr+JO2/iVXBB2OfXXityz7tqwIorxfrT15IEgaHvpJBq/OHiqnOWPKJbUl3JcxjcdviZZOKk85oK4Qg==}+ engines: {node: ^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0}++ resolution: {integrity: sha512-47EYO/DOai0PA3GoAyDpyXOgHNMwbl/Z9dQlQineDLHkpD42xOwMrIx1crT0+n6F+aGoEyxZmeFwfMzaIqVqKQ==}+ engines: {node: ^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0}++ resolution: {integrity: sha512-2BtV5L9uPc49F13Gn5wiP6bX/EncqzqTIk2VL/0F/96Vo0YEOjluT/qktQjFODfqGFsucwnh5mPEAl/2jVEfeg==}+ engines: {node: ^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0}++ resolution: {integrity: sha512-4p/EplRbgNxhdqA6kAj1AmIq9qqYXYSAjgxuZ73rYA+p037xDDrxK8CyDKNfbn1k6aMuVt8LV0fpt7NHUTKiZw==}+ engines: {node: ^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0}++ resolution: {integrity: sha512-rQ40zYDAkaWBN9yvjUuAD0ZpzBMZSoKyGYXnb5JrfbKjun7fTvfoLHL3KXFYenBTYZkQtlp4cKSCv/1utxFyOw==}+ engines: {node: ^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0}+ hasBin: true++ resolution: {integrity: sha512-wJFyyF5ysbVyoYVWGL6GwVMiNnGllwDU2gF096376fl0fc8IFUlADSyNlswj31K9og2sOilXe/FdyWFPczPUYg==}+ engines: {node: ^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0}+ hasBin: true++ resolution: {integrity: sha512-+InaSVGaOyt0DyRo4Y/zIdPI6CZwnbNho5LAL23tgmuGwv7fyfkF7kKfPjZcfxXBcoYdTLLFnCfCH/dHSiCqNg==}+ engines: {node: ^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0}++ resolution: {integrity: sha512-pROPMFaj25Y9+3LlLqpBRz/7B/2YPnfEQz/z3juYxkh3FGQ+3c/Qh4E+khPSTdwTw0M6LitLYHMqaHMbQmuBJw==}+ engines: {node: ^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0}++ resolution: {integrity: sha512-ui1Z8x4s5RL36gMmKLaMMO7O9NNDHNdthEZSCDQHAau3JcAsTaFOK6I+2q4I/kW5u8hSEjJk9L45TXSVJw6g1A==}+ engines: {node: ^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0}++ resolution: {integrity: sha512-xLTVrOENaHR9DiuhnHS+zcle0rKsCy2CpXSIx7xD+zhJs+qVRNUyV7Z1zIt/0P/d0cSGVx846R+dIjHEudhcww==}+ engines: {node: ^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0}++ resolution: {integrity: sha512-r1liLkyFZMVSEMNjU1CJU5pRzs3NdkxHqXS60O25c0rCIqAR+cGk7rPydw/g0WAIKVXojIBIF45yYBPagJGcgw==}+ engines: {node: ^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0}+ hasBin: true++ resolution: {integrity: sha512-ty/tx/imE5Ph2gvPU788Ckim6RAC2tyZxLz2hWRgC9U7/fGKV7qY/slADy0qHPEw9cpUgc4BfmV3oUsYwm7oeg==}+ engines: {node: ^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0}+ hasBin: true+resolution: {integrity: sha512-RDBrHEMSxVFLg6xvnXmb1Ayr2WzLAWjeSATAoxwKYJV94TeNavgoIdA0a9ytzDSVzBy2YKFK+emCPOEibLeCrg==}@@ -5766,14 +7761,35 @@ packages:resolution: {integrity: sha512-zpe98Q6kvavpCr1NPVSCMebCKfD7CA2NqZ+rykeNhONIJBpc1tFKt9hucLGwha3jNTNI8lHpctWJWoimVF4PfA==}+ resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==}+ engines: {node: '>=8.6'}++ resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==}+ engines: {node: '>= 0.6'}+resolution: {integrity: sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==}engines: {node: '>= 0.6'}+ resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==}+ engines: {node: '>= 0.6'}+resolution: {integrity: sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==}engines: {node: '>=18'}+ resolution: {integrity: sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==}+ engines: {node: '>=4'}+ hasBin: true++ resolution: {integrity: sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==}+ engines: {node: '>=4'}+resolution: {integrity: sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==}engines: {node: 18 || 20 || >=22}@@ -5834,6 +7850,9 @@ packages:resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==}+ resolution: {integrity: sha512-6GwVw5eLi9sThdtlS4PKwC7yRLaf45pYhIEzKBHdKxi+YOXGKFX8acIniH+Uh/+k9mS2lQOupTccjoe5r0/1IQ==}+resolution: {integrity: sha512-GlGk3HIvitbvs+LT3g6XUP1kpirKNvmDFwF/bmo6XNWSb/eYEs/O4bfgIEIXCZ+lIOTS5xNwDvSGMw6FJdAhtA==}@@ -5849,6 +7868,10 @@ packages:resolution: {integrity: sha512-kKHJhxwpR/Okycz4HhQKKlhWe4ASEfPgkSWNmKFHd7+ezuQlxkA5cM3+XkBPvm1gmHen3w53qsYAv+8GwRrBlg==}engines: {node: '>=18'}+ resolution: {integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==}+ engines: {node: '>= 0.6'}+resolution: {integrity: sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w==}engines: {node: '>= 0.6'}@@ -5919,6 +7942,13 @@ packages:resolution: {integrity: sha512-g9yhqoedzIUm0nTnTqAQvueMPVOuIY16bqgAJJC8XOOubYFNwz6IER9qs0Gq2Xd0+CecCKFjtdDTMA4u4xG06Q==}+ resolution: {integrity: sha512-LarFH0+6VfriEhqMMcLX2F7SwSXeWwnEAJEsYm5QKWchiVYVvJyV9v7UDvUv+w5HO23ZpQTXDv/GxdDdMyOuoQ==}+ engines: {node: '>= 6.13.0'}++ resolution: {integrity: sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==}+resolution: {integrity: sha512-KQyt/wLjG3TAc7DOUhpqWzgd4ERxR80JOlTK5VE5R1S12IaPVN5qkj4klBce9HPG1Njuup4Sb5bljaT34lIyjw==}@@ -5930,9 +7960,16 @@ packages:resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==}engines: {node: '>=0.10.0'}+ resolution: {integrity: sha512-sHGJy8sOC1YraBywpzQlIKBE4pBbGbiF95U6Auspzyem956E0+FtDtsx1ZxlOJkQCZ1AFXAY/yuvtFYrOxF+Bw==}+ engines: {node: ^16.14.0 || >=18.0.0}+resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==}+ resolution: {integrity: sha512-2vPPEi+Z7WqML2jZYddDIfy5Dqb0r2fze2zTxNNknZaFpVHU3mFB3R+DWeJWGVx0ecvttSGlJTI+WG+8Z4cDWw==}+resolution: {integrity: sha512-IlVB7OS7qrOsVYlpnFIkETjMwT9jwvmocJmmM+GZU/PAB3uGi9Ezd7vcWhWBUnSc0ya4ppmQITOyP1ez9gg8cg==}@@ -5946,6 +7983,14 @@ packages:engines: {node: '>=18'}hasBin: true+ resolution: {integrity: sha512-aH9RkoZc7w/90HBamFxTw8ZLFr05wXS+iOnvmrgo53Ep8Pyrm5FieQSaPIVROkfFVQISeD/zo92fes26TOwe+A==}+ engines: {node: ^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0}++ resolution: {integrity: sha512-+s+6zjd0X68hfAcn92NsEPXnSYOF3O7exw/Fj4UfRTB+UL+Tdjdkzu5/4WquXlzqgvNm8FWuuW6/0Yd8S2rYxw==}+ engines: {node: ^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0}+resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==}engines: {node: '>=0.10.0'}@@ -5970,6 +8015,14 @@ packages:resolution: {integrity: sha512-65S/5gk9YSsaRjcyf7Nfa6h/d3E8/1gslpXfI4W7Dxn/oap8IKRuNT5VXkLQ1YFKIEg4apRY4Pj6aiwFzrDdmw==}+ resolution: {integrity: sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==}+ engines: {node: '>= 0.8'}++ resolution: {integrity: sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==}+ engines: {node: '>= 0.8'}+resolution: {integrity: sha512-737ZY3yNnXy37FHkQxPzt4UZ2UWPWiCZWLvFZ4fu5cueciegX0zGPnrlY6bwRg4FdQOe9YU8MkmJwGhoMybl8A==}engines: {node: '>= 0.8'}@@ -5977,6 +8030,10 @@ packages:resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==}+ resolution: {integrity: sha512-oyyPpiMaKARvvcgip+JV+7zci5L8D1W9RZIz2l1o08AM3pfspitVWnPt3mzHcBPp12oYMTy0pqrFs/C+m3EwsQ==}+ engines: {node: '>=4'}+resolution: {integrity: sha512-6HVa5oIrgMC6aA6WF6XyyqbhRPJrKR02L20+2+zpDtO5QAzGHAUGw5TKQvwi5vctNnRHkJYmjAhRVQF2EKdTQw==}@@ -5987,6 +8044,10 @@ packages:resolution: {integrity: sha512-YgBpdJHPyQ2UE5x+hlSXcnejzAvD0b22U2OuAP+8OnlJT+PjWPxtgmGqKKc+RgTM63U9gN0YzrYc71R2WT/hTA==}engines: {node: '>=18'}+ resolution: {integrity: sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==}+ engines: {node: '>=8'}+resolution: {integrity: sha512-+ZOP3z4WTTSxtIOxgrlARp7tpAvf+7V0qZINj8htfREg24UaBwnoFnw8Ku3cMMChzzVN2WSNhsoiHupZIvmYmQ==}@@ -5994,6 +8055,10 @@ packages:resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==}engines: {node: '>= 0.8.0'}+ resolution: {integrity: sha512-eNwHudNbO1folBP3JsZ19v9azXWtQZjICdr3Q0TDPIaeBQ3mXLrh54wM+er0+hSp+dWKf+Z8KM58CYzEyIYxYg==}+ engines: {node: '>=6'}+resolution: {integrity: sha512-FY91FiDBj7ls5MsFS9jN3tjz2o0/zsdSsymlakySaBwVJZorHhkWyICLZMKxlu1R9vYo+sd3z1jwb4J8x7bNDw==}@@ -6057,6 +8122,10 @@ packages:resolution: {integrity: sha512-TXfryirbmq34y8QBwgqCVLi+8oA3oWx2eAnSn62ITyEhEYaWRlVZ2DvMM9eZbMs/RfxPu/PK/aBLyGj4IrqMHw==}engines: {node: '>=18'}+ resolution: {integrity: sha512-Nt/a5SfCLiTnQAjx3fHlqp8hRgTL3z7kTQZzvIMS9uCAepnCyjpdEc6M/sz69WqMBdaDBw9sF1F1UaHROYzGkQ==}+ engines: {node: '>=10'}+resolution: {integrity: sha512-HlsyYdMBnbPQ9Jr/VgJ1YF4scnldvJpJxCVx6KgqPL4dxppsWrJHCIIxQXMJrqGnsRkNPATbeMJ8Yxu7JMsYcA==}@@ -6069,6 +8138,10 @@ packages:resolution: {integrity: sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==}+ resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==}+ engines: {node: '>= 0.8'}+resolution: {integrity: sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==}@@ -6080,10 +8153,17 @@ packages:resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==}engines: {node: '>=8'}+ resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==}+resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==}engines: {node: '>=16 || 14 >=14.18'}+ resolution: {integrity: sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==}+ engines: {node: 18 || 20 || >=22}+resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==}@@ -6126,10 +8206,18 @@ packages:engines: {node: '>=20'}hasBin: true+ resolution: {integrity: sha512-ZIfcLJC+7E7FBFnDxm9MPmt7D+DidyQ26lewieO75AdhA2ayMtsJSES0iWzqJQbcVRSrTufQoy0DR94xHue0oA==}+ engines: {node: '>=10.4.0'}+resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==}engines: {node: '>=4'}+ resolution: {integrity: sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w==}+ engines: {node: '>=4.0.0'}+resolution: {integrity: sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw==}engines: {node: '>=10.13.0'}@@ -6158,6 +8246,10 @@ packages:resolution: {integrity: sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==}engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0}+ resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==}+ engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}+resolution: {integrity: sha512-byhRAPguVKMQIj4kjJwJ5lAskVhfuiSdiYl/aLTWpgkGEmic2jYhJh1yE9ih8Ox44Xg9ccCT11/S6QrzSJuNrg==}engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0}@@ -6166,6 +8258,10 @@ packages:resolution: {integrity: sha512-HzMy3Geq23nVALD/M2LliU+F+M+gVNsvkQWWqeBZ8HDiCgzo6YPJ/Omrmtq24EFrIsk0a3EkQGEd7bDOo+IhGA==}engines: {node: '>=18'}+ resolution: {integrity: sha512-g8+OnU/L2v+wyiVK+D5fA34J7EH8jZ8DDlvwhRCMxmMj7UCBvxiO1mGeN+36JXIKF4zevU4kRBd8lVgG9vLelA==}+ engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0}+resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==}@@ -6177,6 +8273,13 @@ packages:resolution: {integrity: sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==}engines: {node: '>=0.4.0'}+ resolution: {integrity: sha512-rZPNPKTOYVNEEKFaq1HqTgOwZD+4/YHS5ukLzQCypkj+OkYx7iv0mA91lJlpPPZ8vMau3IIGj5Qlwrx+8iiSmg==}++ resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==}+ engines: {node: '>= 6'}+resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==}@@ -6219,6 +8322,10 @@ packages:resolution: {integrity: sha512-lT5yCqEBgfoMYpf3F2xQRK7zEr1rhIIZuceDK6+xRkJQ4NMbHTwXqk4NkwDwQMNqXgG9r9fyHnzwNVs6zV5KRw==}+ resolution: {integrity: sha512-hh2WYhq4fi8+b+/2Kg9CEge4fDPvHS534aOOvOZeQ3+Vf2mCFsaFBYj0i+iXcAq6I9Vzp5fjMFBlONvayDC1qg==}+ engines: {node: '>=6'}+resolution: {integrity: sha512-Y3NoRtprEEZQD8RfxMCfS0ZTqc4e+i18OrXEXAvpM6TfC/3y+0L5rNbZiSnbBBEkDfFzbpd8o+cE8q3/anjMGA==}engines: {node: '>=22'}@@ -6226,6 +8333,10 @@ packages:resolution: {integrity: sha512-b484I/7b8rDEdSDKckSSBA8knMpcdsXudlE/LNL639wFoHKwLbEkQFZHWEYwDC0wa0FKUcCY+GAF73Z7wxNVFA==}+ resolution: {integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==}+ engines: {node: '>= 0.6'}+resolution: {integrity: sha512-btXCnMmRIBINM2LDZoEmOogIZU7Qe7zn4BpomSKZ/ykbLObuBdvG+mFq11DL6fjH1DRwHhrlgtYWG96bJiC7Cg==}@@ -6244,11 +8355,23 @@ packages:react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1+ resolution: {integrity: sha512-ePrwPfxAnB+7hgnEr8vpKxL9cmnp7F322t8oqcPshbIQQhDKgFDW4tjhF2wjVbdXF9O/nyuy3sQWd9JGpiLPvA==}+resolution: {integrity: sha512-rVprimfGBG3DR+Tq0IQG2DT5PxKth1WIGDmj5yPmlzr4YBe7uyE+Du4oVqTDXZSHGGGXRtTJEGSSePyQCMBglQ==}peerDependencies:react: ^19.2.8+ resolution: {integrity: sha512-nsO+KSNgo1SbJqJEYRE9ERzo7YtYbou/OqjSQKxV7jcKox7+usiUVZOAC+XnDOABXggQTno0Y1CpVnuWEc1boQ==}++ resolution: {integrity: sha512-r4F0Sec0BLxWicc7HEyo2x3/2icUTrRmDjaaRyzzn+7aDyFZliszMDOgLVwSnQnYENOlL1o569Ze2HZefk8clA==}+ engines: {node: '>=10'}+ peerDependencies:+ react: '>=17.0.0'+resolution: {integrity: sha512-cDtkXgxjuFTWUH6V+aQn1Ve5vDiUztCNPWW5GtSHDccsgRXO1nE6QFWCEmc1KAutrb3OUv87wFShJL5RhUwPXg==}peerDependencies:@@ -6282,15 +8405,127 @@ packages:resolution: {integrity: sha512-UpMYezM4v5/18F28aC66AEsjXIgE02kyEMH6yLdgLXu/UTfa1Ntwck/nNLrbqJsEXW7gPb0coNO9FQse9WTovA==}+ resolution: {integrity: sha512-Aua+LAZJ6L3v7ESHsNtxN2sO+hFQKsSz3EDKOLIpWni6PdQEJGFT0Mc2UnEsvFdfV743aHfODTAaHxsJ2D0uFw==}+ peerDependencies:+ react: '>= 18.2.0'+ react-native: '*'+ react-native-gesture-handler: '>= 2.0.0'+ react-native-reanimated: '>= 2.0.0'++ resolution: {integrity: sha512-uYIMOKlKENORq2SABE+jIjbPU+h5I/sQKcq2v16zRq848nwEp1fWRVwML4QWqijc8UcXJC25o54S8GQd4Mf2OA==}+ peerDependencies:+ react: '*'+ react-native: '*'++ resolution: {integrity: sha512-NIXU/iT5+ORyCc7p0z2nnlkouYKX425vuU1OEm6bMMtWWR9yvb+Xg5AZmImTKoF9abxCPqrKC3rOZsKzUYgYZA==}+ peerDependencies:+ react: '*'+ react-native: '*'++ resolution: {integrity: sha512-RnMvtDuR+68ig864gAvZCOdZehqhC5rFmMo0kn+ARfgVSTvFeF6IFLBVgMPUu0KwihaapEyW24WRi6nEyy1kSA==}+ peerDependencies:+ react: '*'+ react-native: 0.83 - 0.86+ react-native-worklets: 0.10.x++ resolution: {integrity: sha512-/9/MtQz8ODphjsLdZ+GZAIcC/RtoqW9EeShf7Uvnfgm/pzYrJ75y3PV/J1wuAV1T5Dye5ygq4EAW20RoBq0ABQ==}+ peerDependencies:+ react: '*'+ react-native: '*'++ resolution: {integrity: sha512-2XnWsZToKj76trGtEZzx5ELD/qOICFEprEeUntImmitQFVUkea27fiWdUSITArI356Y1qynpXZINW+Unbhky/A==}+ peerDependencies:+ react: '*'+ react-native: '*'++ resolution: {integrity: sha512-boT/vIRgj6zZKBpfTPJJiYWMbZE9duBMOwPK6kCSTgxsS947IFMOq9OgIFkpWZTB7t229H24pDRkh3W9ZK/J1A==}+ peerDependencies:+ react: '*'+ react-native: '*'++ resolution: {integrity: sha512-If0eHhoEdOYDcHsX+xBFwHMbWBGK1BvGDQDQdVkwtSIXiq1uiqjkpWVP2uQ1as94J0CzvFE9PUNDuhiX0Z6ubw==}+ peerDependencies:+ react: '*'+ react-native: '*'++ resolution: {integrity: sha512-62mRM19bDpfpdI8HLkEErcdOsrAPDtE9lA/sw+5lLRpzBHNhxaoj9QyY2KjXqUmirelxkX4zuPGTC3VdA0feJA==}+ peerDependencies:+ '@babel/core': '*'+ '@react-native/metro-config': '*'+ react: '*'+ react-native: 0.83 - 0.86++ resolution: {integrity: sha512-JR5s3bM9ezud+Mw24GlNXNfthqPIKwrQgPPJcam+L97t2sKjjEavhCzBn+fyqZZRcM5+XlhYxpTxVkK7e1n38Q==}+ engines: {node: ^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0}+ hasBin: true+ peerDependencies:+ '@react-native/jest-preset': 0.86.3+ '@types/react': ^19.1.1+ react: ^19.2.3+ peerDependenciesMeta:+ '@react-native/jest-preset':+ optional: true+ '@types/react':+ optional: true++ resolution: {integrity: sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA==}+ engines: {node: '>=0.10.0'}+resolution: {integrity: sha512-z6F7K9bV85EfseRCp2bzrpyQ0Gkw1uLoCel9XBVWPg/TjRj94SkJzUTGfOa4bs7iJvBWtQG0Wq7wnI0syw3EBQ==}engines: {node: '>=0.10.0'}+ resolution: {integrity: sha512-9r+yi9+mgU33AKcj6IbT9oRCO78WriSj6t/cF8DWBZJ9aOGPOTEDvdUDz1FwKim7QXWwmHqtdHnRJfhAxEG46Q==}+ engines: {node: '>=10'}+ peerDependencies:+ '@types/react': '*'+ react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0+ peerDependenciesMeta:+ '@types/react':+ optional: true++ resolution: {integrity: sha512-Iqb9NjCCTt6Hf+vOdNIZGdTiH1QSqr27H/Ek9sv/a97gfueI/5h1s3yRi1nngzMUaOOToin5dI1dXKdXiF+u0Q==}+ engines: {node: '>=10'}+ peerDependencies:+ '@types/react': '*'+ react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc+ peerDependenciesMeta:+ '@types/react':+ optional: true+resolution: {integrity: sha512-13iNq2KzBrRAzxRc+n53hgROfIistiYY/sPtIhCw1qUB7/kmo+X1xEU2uiS5zcCIrc55AUPwoHqOIIpKWSwB9A==}peerDependencies:react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1+ resolution: {integrity: sha512-b6jSvxvVnyptAiLjbkWLE/lOnR4lfTtDAl+eUC7RZy+QQWc6wRzIV2CE6xBuMmDxc2qIihtDCZD5NPOFl7fRBQ==}+ engines: {node: '>=10'}+ peerDependencies:+ '@types/react': '*'+ react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc+ peerDependenciesMeta:+ '@types/react':+ optional: true++ resolution: {integrity: sha512-GHKPaDRaNYU24PHTLG8Bx8VMY9t+qNfxQbt/Yjp7aMWBkKU6766SR0n6TnYu7P5I1MfEuAMUadqiyDHyI4Yy9Q==}+ peerDependencies:+ react: ^19.2.8+resolution: {integrity: sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==}peerDependencies:@@ -6323,6 +8558,16 @@ packages:resolution: {integrity: sha512-J8rn6v4DBb2nnFqkqwy6/NnTYMcgLA+sLr0iIO41qpv0n+ngb7ksag2tMRl0inb1bbO/esUwzW1vbJi7K0sI0g==}engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0}+ resolution: {integrity: sha512-9ns8odR8e9q3otKeHj3DE80jZYKg6zVeZKE+zQmRKXFoVUcuiTGeO6iusDhPRoIQQPVPRvH+SfBhrTud4eczuw==}+ engines: {node: '>=4'}++ resolution: {integrity: sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==}++ resolution: {integrity: sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==}+resolution: {integrity: sha512-0YCaSCq2VRIebiaUviZNs0cBz1kg5kVS2UKUfNIx8YVs1cN3AV7NTctO5FOKBA+UT2BPJIWZauYHPqJODG50cg==}@@ -6336,6 +8581,13 @@ packages:resolution: {integrity: sha512-sZuz1dYW/ZsfG17WSAG7eS85r5a0dDsvg+7BiiYR5o6lKCAtUrEwdmRmaGF6rwVj3LcmAeYkOWKEPlbPzN3Y3A==}engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0}+ resolution: {integrity: sha512-zkmVH92DlzjSFc4xKGZp/2BXIFrDIdBQBC8gUXKCsMgKYb1bkCkxfSuoW1werDjaTEMTbULkHtKFHe1L+Abnaw==}+ engines: {node: '>=4'}++ resolution: {integrity: sha512-RvwtGe3d7LvWiDQXeQw8p5asZUmfU1G/l6WbUXeHta7Y2PEIvBTwH6E2EfmYUK8pxcxEdEmaomqyp0vZZ7C+3Q==}+resolution: {integrity: sha512-NgRBy2Nx/bE+9F27nVHnqcN5HjyLmecqsqx2PJHu3/IEtADD4WuxuXIVExD5PoSDFVrl78dOonfcOe5O+5nbzQ==}hasBin: true@@ -6355,16 +8607,32 @@ packages:resolution: {integrity: sha512-yE7KUfFvaBFzGPs5H3Ops1RevfUEsDc5Iz65rOwWg4lE8HJSYtle77uul3+573457oHvBKuHYDl/xqUkKpEEdw==}engines: {node: '>=18'}+ resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==}+ engines: {node: '>=8'}+resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==}+ resolution: {integrity: sha512-nR23LHAvaI6aHtMg6RWoaHpdR4D881Nydkzi2CixINyg9T00KgaJdJI6Vwty+Ps8WLxZHuxsS0BseWjxSA4C+w==}+resolution: {integrity: sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A==}engines: {node: '>=10'}+ resolution: {integrity: sha512-TyeJ1zif53BPfHootBGwPRYT1RUt6oGWsaQr8UyZW/eAm9bKoijtvruSDEmZHm92CwS9nj7/fWttqPCgzep8CA==}+ engines: {node: '>= 0.4'}+ hasBin: true+resolution: {integrity: sha512-G10EBz+zAAy3zUd/CDoBbXRL6ia9kOo3xRHrMDsHljI0GDkhYlyjwoCx5+3eCC4swi1uCoZQhskuJkj7Gp57Bw==}+ resolution: {integrity: sha512-6IzJLuGi4+R14vwagDHX+JrXmPVtPpn4mffDJ1UdR7/Edm87fl6yi8mMBIVvFtJaNTUvjughmW4hwLhRG7gC1Q==}+ engines: {node: '>=4'}+resolution: {integrity: sha512-I1XxrZSQ+oErkRR4jYbAyEEu2I0avBvvMM5JN+6EBprOGRCs63ENqZ3vjavq8fBw2+62G5LF5XelKwuJpcvcxw==}engines: {node: '>=10'}@@ -6413,6 +8681,9 @@ packages:resolution: {integrity: sha512-guoltQEx+9aMf2gDZ0s62EcV8lsXR+0w8915TC3ITdn2YueuNjdAYh/levpU9nFaoChh9RUS5ZdQMrKfVEN9tw==}+ resolution: {integrity: sha512-PGMBq03+TTG/p/cRB7HCLKJ1MgDIi07+QU1faSjiYRfmY5UsAttV9Hs08jDAHVwcOwmVLcSJkpwyfXszVjWfIQ==}+resolution: {integrity: sha512-DPe5pVFaAsinSaV6QjQ6gdiedWDcRCbUuiQfQa2wmWV7+xC9bGulGI8+TdRmoFkAPaBXk8CrAbnlY2ISniJ47Q==}engines: {node: '>=18'}@@ -6438,7 +8709,16 @@ packages:resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==}+ resolution: {integrity: sha512-4lyHX0ZU0AZKwjgZ1InxZAa3PNpyEb8rOQ+Zss1ReYmhNzW0Q+h1zE5nvniXN0HaAWZaZE1zgVNEirb0R7LmNg==}+ engines: {node: '>=18.18'}+ hasBin: true++ resolution: {integrity: sha512-42tBVwLWnaQvW5zc4HbZrTuWccECCZfBi92FDuwtqxasH+JbPB3/FOKb1m222K42R4WxuxzzMsTswfzgtSu64Q==}+ engines: {node: '>=11.0.0'}+resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==}engines: {node: '>=v12.22.7'}@@ -6464,16 +8744,41 @@ packages:engines: {node: '>=10'}hasBin: true+ resolution: {integrity: sha512-VMbMxbDeehAxpOtWJXlcUS5E8iXh6QmN+BkRX1GARS3wRaXEEgzCcB10gTQazO42tpNIya8xIyNx8fll1OFPrg==}+ engines: {node: '>= 0.8.0'}+resolution: {integrity: sha512-ZYkZLAvKTKQXWuh5XpBw7CdbSzagarX39WyZ2H07CDLC5/KfsRGlIXV8d4+tfqX1M7916mRqR1QfNHSij+c9Pw==}engines: {node: '>=18'}+ resolution: {integrity: sha512-ghgmKt5o4Tly5yEG/UJp8qTd0AN7Xalw4XBtDEKP655B699qMEtra1WlXeE6WIvdEG481JvRxULKsInq/iNysw==}+ engines: {node: '>=0.10.0'}++ resolution: {integrity: sha512-x0RTqQel6g5SY7Lg6ZreMmsOzncHFU7nhnRWkKgWuMTu5NN0DR5oruckMqRvacAN9d5w6ARnRBXl9xhDCgfMeA==}+ engines: {node: '>= 0.8.0'}++ resolution: {integrity: sha512-qepMx2JxAa5jjfzxG79yPPq+8BuFToHd1hm7kI+Z4zAq1ftQiP7HcxMhDDItrbtwVeLg/cY2JnKnrcFkmiswNA==}+resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==}resolution: {integrity: sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==}+ resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==}++ resolution: {integrity: sha512-TPbeg0b7ylrswdGCji8FRGFAKuqbpQlLbL8SOle3j1iHSs5Ob5mhvMAxWN2UItOjgALAB5Zp3fmMfj8mbWvXKw==}+ engines: {node: '>=10'}++ resolution: {integrity: sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==}+resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==}engines: {node: '>=8'}@@ -6482,6 +8787,10 @@ packages:resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==}engines: {node: '>=8'}+ resolution: {integrity: sha512-JdxDPD0DBTyu08pq0kPC0xSNet/qsU07qT6IsX1AS8oO2ICNRY4ldNa8OAI6PuwAH8tG3lxEhbqmyp4Dw4036g==}+ engines: {node: '>= 0.4'}+resolution: {integrity: sha512-oR+qDVi2OjX1tmDpyv+3KviX01KzO6Af+0NNnKnsp9491UEGz2YpxTuJboS/6VhYpTdqzmuJBuiTlrAWWJAssw==}engines: {node: '>=20'}@@ -6489,6 +8798,9 @@ packages:resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==}+ resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==}+resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==}engines: {node: '>=14'}@@ -6497,6 +8809,12 @@ packages:resolution: {integrity: sha512-dDEqvQrmxL7ZnqQtGHGjCNW6CfiwzAif+83Hol9JXAnAB6wh2zsZD7Sc1kWT0O/RRAKt7xfG8W6UZhYBPD+GAA==}engines: {node: '>=0.12.18'}+ resolution: {integrity: sha512-iMSw5i0XseMnrhtIzRb7XpQEXepa9xhWxGUojHBL43SIpQuDQkh3Wpy67ZbDzZVr6EKxvwVChnVpdl8hEVLDiw==}++ resolution: {integrity: sha512-nAu1WFPQSMNr2Zn9PGSZK9AGn4t/y97lEm+MXTtUDwfP0ksAIX4nO+6ruD9Jwut4C49SB1Ws+fbXsm/yScWOHw==}+resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==}@@ -6504,6 +8822,10 @@ packages:resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==}engines: {node: '>=8'}+ resolution: {integrity: sha512-vZ7rfeehZui7wQs438JXBckYLkIIdfHOXsaVEUMyS5fHo1483l1bMdo0EDSWYclY0yZKFOipDy4KHuKs6ssvdg==}+ engines: {node: '>=8.0.0'}+resolution: {integrity: sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==}engines: {node: '>= 6.0.0', npm: '>= 3.0.0'}@@ -6524,6 +8846,13 @@ packages:resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==}engines: {node: '>=0.10.0'}+ resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==}++ resolution: {integrity: sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==}+ engines: {node: '>=0.10.0'}+resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==}engines: {node: '>=0.10.0'}@@ -6543,6 +8872,10 @@ packages:resolution: {integrity: sha512-CWLcCCH7VLu13TgOH+r8p1O/Znwhqv/dbb6lqWy67G+pT1kHmeD/+V36AVb/vq8QMIQwVShJ6Ssl5FPh0fuSdw==}+ resolution: {integrity: sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw==}+ engines: {node: '>=6'}+resolution: {integrity: sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==}engines: {node: '>= 10.x'}@@ -6563,15 +8896,41 @@ packages:resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==}+ resolution: {integrity: sha512-oeVtt7eWQS+Na6F//S4kJ2K2VbRlS9D43mAlMyVpVWovy9o+jfgH8O9agzANzaiLjclA0oYzUXEM4PurhSUChw==}++ resolution: {integrity: sha512-WjlahMgHmCJpqzU8bIBy4qtsZdU9lRlcZE3Lvyej6t4tuOuv1vk57OW3MBrj6hXBFx/nNoC9MPMTcr5YA7NQbg==}+ engines: {node: '>=6'}++ resolution: {integrity: sha512-YAmzwAiiQVocZxO/VGPFiQHcu5pKiz09QIGC0MK6aRMoa3E0QkoTQgcqJr7ZZ3OMiNhu4DkaGElFI5htjOIDbw==}++ resolution: {integrity: sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==}+ engines: {node: '>= 0.6'}++ resolution: {integrity: sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==}+ engines: {node: '>= 0.8'}+resolution: {integrity: sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==}resolution: {integrity: sha512-oCUKSupKTHX53EyjDtuZQ64pjLJ6yYCtpmEw0goYxtjG9KpbRe8KAsl2tBUGU9DyMcJ0RwJ8GqJAFzMXcXW1Rw==}+ resolution: {integrity: sha512-uyQK/mx5QjHun80FLJTfaWE7JtwfRMKBLkMne6udYOmvH0CawotVa7TfgYHzAnpphn4+TweIx1QKMnRIbipmUg==}+ engines: {node: '>= 0.10.0'}+resolution: {integrity: sha512-zEzXb0s5Cds7tqMH6rhZ05lcJydCWiQPEwiNngVqzsxCc962vLY4Uw+mW7od8kDH258k2Uz/JrOkdIAAhSh9VA==}+ resolution: {integrity: sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ==}+ engines: {node: '>=4'}+resolution: {integrity: sha512-xSJq+BS52SaFFAVxuStmx6n5aYZU571uYUnUrPXkPFCfdHyZMMlbP2v2Wx5sNBnAVzq/2+0+mcBLBa3Xa5ubYw==}@@ -6592,6 +8951,10 @@ packages:resolution: {integrity: sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg==}+ resolution: {integrity: sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==}+ engines: {node: '>=6'}+resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==}engines: {node: '>=8'}@@ -6607,14 +8970,33 @@ packages:resolution: {integrity: sha512-JXpm4DZLQqcioH+wooEc3jCFRlwu/pJvemuuNUv37gOWTVzdYgw1khGWPYulMxdkK7rlsi0pIc5gDFTw+pF8+A==}+ resolution: {integrity: sha512-0MP/Cxx5SzeeZ10p/bZI0S6MpgD+yxAhi1BOQ34jgnMXsCq3j1t6tQnZu+KdlL7dvJTLT3g9xN8tl10TqgFMcg==}+resolution: {integrity: sha512-WHkws2ZflZe41zj6AolvvmaTrWds/VuyeYr9iPVv/oQeaIoVxMKaushfFWpOGDT+GuBrM/sVqF8KUCYQlSSTdQ==}engines: {node: '>=18'}+ resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==}+ engines: {node: '>=4'}+resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==}engines: {node: '>=8'}+ resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==}+ engines: {node: '>=10'}++ resolution: {integrity: sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA==}+ engines: {node: '>=8'}++ resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==}+ engines: {node: '>= 0.4'}+resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==}@@ -6622,9 +9004,16 @@ packages:resolution: {integrity: sha512-eNRKgb3z66Yp3D2CixVujOUvXLFUTij/zVnV8KRyvFdQwpz7I5DS8UfRkTeLzb64u+dkzDSdelE24izu+zSSUg==}engines: {node: ^14.18.0 || >=16.0.0}+ resolution: {integrity: sha512-yEFYrVhod+hdNyx7g5Bnkkb0G6si8HJurOoOEgC8B/O0uXLHlaey/65KRv6cuWBNhBgHKAROVpc7QyYqE5gFng==}+ engines: {node: '>=20'}+resolution: {integrity: sha512-uSaO4gnW+b3Y2aWoWfFpX62vn2sR3skfhbjsEnaBI81WD1wBLlHZe5sWf0AqjksNdYTbGBEd0UasQMT3SNV15g==}+ resolution: {integrity: sha512-XPPUyAc+cvspz3lHTcR/QgPfW2A0lv/xQNIjX3HGhLR+Nq2lHaLq5MtTesHn8GUr3W3DguT2KT5x3NVgRtYwmA==}+resolution: {integrity: sha512-4pAvwUtM4HKBiRZftncAbpn6V9Hhwoa5Fl7O2u5zbp7Z5Cvu+/o/6+176WY3WCEES209543quG8zFIcXCsc5Jw==}engines: {node: '>=16.9.x', pnpm: '>=7.x'}@@ -6640,6 +9029,9 @@ packages:resolution: {integrity: sha512-2E9TBm6MDD/xKYe+dvJZAmg3yxIEDNRc0jwlNyDg/4Fil2QcSLjFKGVff0lAf1jjeaArlG/M75Ey/EYr/OJtBA==}+ resolution: {integrity: sha512-gOhV3P7ufE62QDGg1zVaTgCR+EtPv92k2nIhVcVKcLmxT1sUBsQGhnZj175j+MqRt4zLF7ic+sCYjfhxMxj7YQ==}+resolution: {integrity: sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A==}engines: {node: '>=6'}@@ -6662,9 +9054,21 @@ packages:resolution: {integrity: sha512-eYE6iEI62Ni1H8oIa7KlDU6uQBtqr4Eajni3wX7rpfXD8ysFx8z0+dri+KWEPWpBsxXfxu58x/0jvTVT1ekOSg==}+ resolution: {integrity: sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==}+ engines: {node: '>=8'}++ resolution: {integrity: sha512-bWnjSNscmuI+GJze6ZupnHP8G/cTcsJF+bXCeQknk2SHQsgbNJnLrqiH9jZ2W4STPVXH2mDKKRX3iwPhc9Cn/Q==}+ engines: {node: '>=10'}+ hasBin: true+resolution: {integrity: sha512-vlLytXkeP4xvEq2otHeJfSQIRyWxo/oZGEbXrtEEF9Hnmrdly59sUbzZ/QgyWuLYHctCHxFF4tRQZNQ9k60ExQ==}+ resolution: {integrity: sha512-fcwX4mndzpLQKBS1DVYhGAcYaYt7vsHNIvQV+WXMvnow5cgjPphq5CaayLaGsjRdSCKZFNGt7/GYAuXaNOiYCA==}+resolution: {integrity: sha512-75voc/9G4rDIJleOo4jPvN4/YC4GRZrY8yy1uU4lwrB3XEQbWve8zXoO5No4eFrGcTAMYyoY67p8jRQdtA1HbA==}engines: {node: '>=12'}@@ -6694,6 +9098,9 @@ packages:resolution: {integrity: sha512-WMi/OQ2axVTf/ykqCQgXiIct+mSQDFdH2fkwhPwgEwvJ1kSzZRiinb0zF2Xb8u4+OqPChmyI6MEu4EezNJz+FQ==}hasBin: true+ resolution: {integrity: sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==}+resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==}engines: {node: '>=8.0'}@@ -6702,10 +9109,17 @@ packages:resolution: {integrity: sha512-41wJyvKep3yT2tyPqX/4blcfybknGB4D+oETKLs7Q76UiPqRpUJK3hr1nxelyYO0PHKVzJwlu0aCeEAsGI6rpw==}engines: {node: '>=20'}+ resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==}+ engines: {node: '>=0.6'}+resolution: {integrity: sha512-A5F0cM6+mDleacLIEUkmfpkBbnHJFV1d2rprHU2MXNk7mlxHq2zGojA+SRvQD1RoMo9gqjZPWEaKG4v1BQ48lw==}engines: {node: ^20.19.0 || ^22.13.0 || >=24}+ resolution: {integrity: sha512-FWAPzCIHZHnrE/5/w9MPk0kK25hSQSH2IKhYh9PyjS3SG/+IEMvlwIHbhz+oF7xl54I+ueZlVnMjyzdSwLmAwA==}+resolution: {integrity: sha512-FVDYdxtnj0G6Qm/DhNPSb8Ju59ULcup3tuJxkFb5K8Bv2pUXILbf0xZWU8PX8Ov19OXljbUyveOFwRMwkXzO+A==}engines: {node: '>=16'}@@ -6778,6 +9192,14 @@ packages:resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==}engines: {node: '>= 0.8.0'}+ resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==}+ engines: {node: '>=10'}++ resolution: {integrity: sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg==}+ engines: {node: '>=8'}+resolution: {integrity: sha512-OduNjVJsFbifKb57UqZ2EMP1i4u64Xwow3NYXUtBbD4vIwJdQd4+xl8YDou1dlm4DVrtwT/7Ky8z8WyCULVfxw==}engines: {node: '>=16'}@@ -6786,6 +9208,10 @@ packages:resolution: {integrity: sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==}engines: {node: '>=16'}+ resolution: {integrity: sha512-NoSdpq/WEiAg5sjmBkmV/hfxv6HJH4NqPNrqjtSO5CwRmpsDfaf4begxW34KdJykH/l1yHtwBWQkCRdoXO8mPA==}+ engines: {node: '>=20'}+resolution: {integrity: sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==}engines: {node: '>=14.17'}@@ -6821,6 +9247,22 @@ packages:resolution: {integrity: sha512-/y4/bH9YNU5hi9NIrpOuvGXFcxrj3CMrV+/AYpowAYTpHn8gX/XPFjNy766FPoYY0miQhdW977JFWKGNhBdwyQ==}engines: {node: '>=22.19.0'}+ resolution: {integrity: sha512-dA8WbNeb2a6oQzAQ55YlT5vQAWGV9WXOsi3SskE3bcCdM0P4SDd+24zS/OCacdRq5BkdsRj9q3Pg6YyQoxIGqg==}+ engines: {node: '>=4'}++ resolution: {integrity: sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==}+ engines: {node: '>=4'}++ resolution: {integrity: sha512-JQ84qTuMg4nVkx8ga4A16a1epI9H6uTXAknqxkGF/aFfRLw1xC/Bp24HNLaZhHSkWd3+84t8iXnp1J0kYcZHhg==}+ engines: {node: '>=4'}++ resolution: {integrity: sha512-hpbDzxUY9BFwX+UeBnxv3Sh1q7HFxj48DTmXchNgRa46lO8uj3/1iEn3MiNUYTg1g9ctIqXCCERn8gYZhHC5lQ==}+ engines: {node: '>=4'}+resolution: {integrity: sha512-LsiILbtBETkDz8I9p1dQ0uyRUWuaQzd/cuEeS1hoRSyW5E5XGmTzlwY1OrNzzakGowI9Dr/I8HVaw4hTtnxy8g==}@@ -6843,6 +9285,27 @@ packages:resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==}engines: {node: '>= 10.0.0'}+ resolution: {integrity: sha512-u0OVMVqefGchOpsPIwIYvcF2Jl9JtVVaXBb+wfqAYoyLrhN27Ll50aQ7aFT81k73JSq+He6dNlcbTl2Qb9cTMw==}+ hasBin: true+ peerDependencies:+ '@expo/metro-config': '*'+ metro: '*'+ metro-cache: '*'+ metro-transform-worker: '*'+ react: '>=19.0.0'+ react-native: '>=0.81.0'+ tailwindcss: '>=4'+ peerDependenciesMeta:+ '@expo/metro-config':+ optional: true+ metro-transform-worker:+ optional: true++ resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==}+ engines: {node: '>= 0.8'}+resolution: {integrity: sha512-h9FxYVpztY/wwq+bauLOh6Y3CWu2IVeRLq5lxzneBiIU9Tn86OGp9xiQrGhnYspAmg5dzdY0Cc8+Y70kuTARCg==}engines: {node: '>=20.19.0'}@@ -6927,6 +9390,31 @@ packages:resolution: {integrity: sha512-IGjKp/o0NL3Bso1PymYURCJxMPNAf/ILOpendP9f5B6e1rTJgdgiOvgfoT8VxCAdY+Wisb9uhGaJJf3yZ2V9nw==}+ resolution: {integrity: sha512-jQL3lRnocaFtu3V00JToYz/4QkNWswxijDaCVNZRiRTO3HQDLsdu1ZtmIUvV4yPp+rvWm5j0y0TG/S61cuijTg==}+ engines: {node: '>=10'}+ peerDependencies:+ '@types/react': '*'+ react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc+ peerDependenciesMeta:+ '@types/react':+ optional: true++ resolution: {integrity: sha512-FvRG9i1HSo0wagmX63Vrm8SnlUU3LMM3WyZkQ76RnslpBrX694AdG4A0zQBx2B3ZifFA0yv/BaEHGBnEax5rZg==}+ peerDependencies:+ react: '>=16.8'++ resolution: {integrity: sha512-Fedw0aZvkhynoPYlA5WXrMCAMm+nSWdZt6lzJQ7Ok8S6Q+VsHmHpRWndVRJ8Be0ZbkfPc5LRYH+5XrzXcEeLRQ==}+ engines: {node: '>=10'}+ peerDependencies:+ '@types/react': '*'+ react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc+ peerDependenciesMeta:+ '@types/react':+ optional: true+resolution: {integrity: sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==}peerDependencies:@@ -6944,6 +9432,19 @@ packages:resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==}+ resolution: {integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==}+ engines: {node: '>= 0.4.0'}++ resolution: {integrity: sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg==}+ deprecated: uuid@10 and below is no longer supported. For ESM codebases, update to uuid@latest. For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028).+ hasBin: true++ resolution: {integrity: sha512-OljLrQ9SQdOUqTaQxqL5dEfZWrXExyyWsozYlAWFawPVNuD83igl7uJD2RTkNMbniIYgt8l81eCJGIdQF7avLQ==}+ engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0}+resolution: {integrity: sha512-6pcyIDqXWcWWl51GWoVTwkGszFsBDFLd7DPwKx9SSzIMhzolgG0U1tlkl2YWJAdEIOOMb05wzhyMkRIKDnh4Vg==}peerDependencies:@@ -6976,6 +9477,12 @@ packages:resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==}engines: {node: '>= 0.8'}+ resolution: {integrity: sha512-ZFkClGpWyI2WUQjdLJ/BaGuV6AVQiJ3uELGk3OYtP+B6yCO7Cmn9vPFXVJkRaGkOJu3m8bQMgtyzNHixULceQA==}+ peerDependencies:+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0.0 || ^19.0.0-rc+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0.0 || ^19.0.0-rc+resolution: {integrity: sha512-zj/ob3UsvJGN0whEAKFp53REA5X66hvffVqoCtVQAakJKnKlH+/PcOfMoFwIG/o4rElqLv/ycAFlx8ZlXUorCg==}engines: {node: '>=18.12.0'}@@ -7071,6 +9578,9 @@ packages:jsdom:optional: true+ resolution: {integrity: sha512-gQpnTgkubC6hQgdIcRdYGDSDc+SaujOdyesZQMv6JlfQee/9Mp0Qhnys6WxDWvQnL5WZdT7o2Ul187aSt0Rq+w==}+resolution: {integrity: sha512-Gk6gRDj0n/fkRa3C3l0bBheoBckUq/Rs0F/TvMWIS6nzzx67amAViMe9CkNgsP2tXyQONvGiHQESHwFtZ3aYDA==}engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}@@ -7086,6 +9596,12 @@ packages:engines: {node: '>=10'}hasBin: true+ resolution: {integrity: sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==}++ resolution: {integrity: sha512-VkQZJbO8zVImzYFteBXvBOZEl1qL175WH8VmZcxF2fZAoudNhNDvHi+doCaAEdU2l2vtcIwa2zn0QK5+I1HQ3Q==}+resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==}@@ -7114,10 +9630,16 @@ packages:engines: {node: '>=18'}deprecated: Use @exodus/bytes instead for a more spec-conformant and faster implementation+ resolution: {integrity: sha512-EqhiFU6daOA8kpjOWTL0olhVOF3i7OrFzSYiGsEMB8GcXS+RrzauAERX65xMeNWVqxA6HXH2m69Z9LaKKdisfg==}+resolution: {integrity: sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==}engines: {node: '>=18'}+ resolution: {integrity: sha512-XPEm0XFQWNVG292lII1PrRRJl3sItrs7CettZ4ncYxuDVpLyy+NwlGyut2hXI0JswcJUxeCH+CyOJK0ZzAXD6A==}+resolution: {integrity: sha512-De72GdQZzNTUBBChsXueQUnPKDkg/5A5zp7pFDuQAj5UFoENpiACU0wlCvzpAGnTkj++ihpKwKyYewn/XNUbKw==}engines: {node: '>=18'}@@ -7159,6 +9681,18 @@ packages:resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==}+ resolution: {integrity: sha512-rsKI6xDBFVf4r/x8XyChGK04QR/XHroxs/jUcoWvtEZM8TPU/X/uIY9B1CsSzYws9ZJb/6bbBu7dPhFW00CAoA==}+ engines: {node: '>=8.3.0'}+ peerDependencies:+ bufferutil: ^4.0.1+ utf-8-validate: ^5.0.2+ peerDependenciesMeta:+ bufferutil:+ optional: true+ utf-8-validate:+ optional: true+resolution: {integrity: sha512-201TZ/kPWxoPr/OKWjquZR1SWKXcvxdH+e1xrx89b3YbmzLMFCLfnaG1HFIgWzJOEWZ7MvpK++odZufgYR50Rw==}engines: {node: '>=10.0.0'}@@ -7175,10 +9709,26 @@ packages:resolution: {integrity: sha512-h3Fbisa2nKGPxCpm89Hk33lBLsnaGBvctQopaBSOW/uIs6FTe1ATyAnKFJrzVs9vpGdsTe73WF3V4lIsk4Gacw==}engines: {node: '>=18'}+ resolution: {integrity: sha512-kCz5k7J7XbJtjABOvkc5lJmkiDh8VhjVCGNiqdKCscmVpdVUpEAyXv1xmCLkQJ5dsHqx3IPO4XW+NTDhU/fatA==}+ engines: {node: '>=10.0.0'}+resolution: {integrity: sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==}engines: {node: '>=18'}+ resolution: {integrity: sha512-eLTh0kA8uHceqesPqSE+VvO1CDDJWMwlQfB6LuN6T8w6MaDJ8Txm8P7s5cHD0miF0V+GGTZrDQfxPZQVsur33w==}+ engines: {node: '>=4.0.0'}++ resolution: {integrity: sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==}+ engines: {node: '>=4.0'}++ resolution: {integrity: sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg==}+ engines: {node: '>=8.0'}+resolution: {integrity: sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==}@@ -7235,6 +9785,9 @@ packages:resolution: {integrity: sha512-zK7YHHz4ZXpW89AHXUPbQVGKI7uvkd3hzusTdotCg1UxyaVtg0zFJSTfW/Dq5f7OBBVnq6cZIaC8Ti4hb6dtCA==}engines: {node: '>= 14'}+ resolution: {integrity: sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==}+resolution: {integrity: sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ==}@@ -7256,6 +9809,11 @@ packages:resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==}+ resolution: {integrity: sha512-3lC9BJk4fR5ZJxcGjb0hVnDFOW7KpLXHIebiBmVd4FDRQZVeObztoTKxRUPxlWwSgxrMRONK0u50hBD1aTYEKg==}+ peerDependencies:+ '@types/emscripten': '>=1.39.6'+snapshots:@@ -7386,66 +9944,436 @@ snapshots:transitivePeerDependencies:- supports-color- '@babel/[email protected]':+ '@babel/[email protected]':+ dependencies:+ '@babel/parser': 7.29.8+ '@babel/types': 7.29.8+ '@jridgewell/gen-mapping': 0.3.13+ '@jridgewell/trace-mapping': 0.3.31+ jsesc: 3.1.0++ '@babel/[email protected]':+ dependencies:+ '@babel/types': 7.29.8++ '@babel/[email protected]':+ dependencies:+ '@babel/compat-data': 7.29.7+ '@babel/helper-validator-option': 7.29.7+ browserslist: 4.28.8+ lru-cache: 5.1.1+ semver: 6.3.1++ '@babel/[email protected](@babel/[email protected])':+ dependencies:+ '@babel/core': 7.29.7+ '@babel/helper-annotate-as-pure': 7.29.7+ '@babel/helper-member-expression-to-functions': 7.29.7+ '@babel/helper-optimise-call-expression': 7.29.7+ '@babel/helper-replace-supers': 7.29.7(@babel/[email protected])+ '@babel/helper-skip-transparent-expression-wrappers': 7.29.7+ '@babel/traverse': 7.29.8+ semver: 6.3.1+ transitivePeerDependencies:+ - supports-color++ '@babel/[email protected](@babel/[email protected])':+ dependencies:+ '@babel/core': 7.29.7+ '@babel/helper-annotate-as-pure': 7.29.7+ regexpu-core: 6.5.2+ semver: 6.3.1++ '@babel/[email protected](@babel/[email protected])':+ dependencies:+ '@babel/core': 7.29.7+ '@babel/helper-compilation-targets': 7.29.7+ '@babel/helper-plugin-utils': 7.29.7+ debug: 4.4.3+ lodash.debounce: 4.0.8+ resolve: 1.22.12+ transitivePeerDependencies:+ - supports-color++ '@babel/[email protected]': {}++ '@babel/[email protected]':+ dependencies:+ '@babel/traverse': 7.29.8+ '@babel/types': 7.29.8+ transitivePeerDependencies:+ - supports-color++ '@babel/[email protected]':+ dependencies:+ '@babel/traverse': 7.29.8+ '@babel/types': 7.29.8+ transitivePeerDependencies:+ - supports-color++ '@babel/[email protected](@babel/[email protected])':+ dependencies:+ '@babel/core': 7.29.7+ '@babel/helper-module-imports': 7.29.7+ '@babel/helper-validator-identifier': 7.29.7+ '@babel/traverse': 7.29.8+ transitivePeerDependencies:+ - supports-color++ '@babel/[email protected]':+ dependencies:+ '@babel/types': 7.29.8++ '@babel/[email protected]': {}++ '@babel/[email protected](@babel/[email protected])':+ dependencies:+ '@babel/core': 7.29.7+ '@babel/helper-annotate-as-pure': 7.29.7+ '@babel/helper-wrap-function': 7.29.7+ '@babel/traverse': 7.29.8+ transitivePeerDependencies:+ - supports-color++ '@babel/[email protected](@babel/[email protected])':+ dependencies:+ '@babel/core': 7.29.7+ '@babel/helper-member-expression-to-functions': 7.29.7+ '@babel/helper-optimise-call-expression': 7.29.7+ '@babel/traverse': 7.29.8+ transitivePeerDependencies:+ - supports-color++ '@babel/[email protected]':+ dependencies:+ '@babel/traverse': 7.29.8+ '@babel/types': 7.29.8+ transitivePeerDependencies:+ - supports-color++ '@babel/[email protected]': {}++ '@babel/[email protected]': {}++ '@babel/[email protected]': {}++ '@babel/[email protected]':+ dependencies:+ '@babel/template': 7.29.7+ '@babel/traverse': 7.29.8+ '@babel/types': 7.29.8+ transitivePeerDependencies:+ - supports-color++ '@babel/[email protected]':+ dependencies:+ '@babel/template': 7.29.7+ '@babel/types': 7.29.8++ '@babel/[email protected]':+ dependencies:+ '@babel/types': 7.29.8++ '@babel/[email protected](@babel/[email protected])':+ dependencies:+ '@babel/core': 7.29.7+ '@babel/helper-create-class-features-plugin': 7.29.7(@babel/[email protected])+ '@babel/helper-plugin-utils': 7.29.7+ '@babel/plugin-syntax-decorators': 7.29.7(@babel/[email protected])+ transitivePeerDependencies:+ - supports-color++ '@babel/[email protected](@babel/[email protected])':+ dependencies:+ '@babel/core': 7.29.7+ '@babel/helper-plugin-utils': 7.29.7++ '@babel/[email protected](@babel/[email protected])':+ dependencies:+ '@babel/core': 7.29.7+ '@babel/helper-plugin-utils': 7.29.7++ '@babel/[email protected](@babel/[email protected])':+ dependencies:+ '@babel/core': 7.29.7+ '@babel/helper-plugin-utils': 7.29.7++ '@babel/[email protected](@babel/[email protected])':+ dependencies:+ '@babel/core': 7.29.7+ '@babel/helper-plugin-utils': 7.29.7++ '@babel/[email protected](@babel/[email protected])':+ dependencies:+ '@babel/core': 7.29.7+ '@babel/helper-plugin-utils': 7.29.7++ '@babel/[email protected](@babel/[email protected])':+ dependencies:+ '@babel/core': 7.29.7+ '@babel/helper-plugin-utils': 7.29.7++ '@babel/[email protected](@babel/[email protected])':+ dependencies:+ '@babel/core': 7.29.7+ '@babel/helper-plugin-utils': 7.29.7++ '@babel/[email protected](@babel/[email protected])':+ dependencies:+ '@babel/core': 7.29.7+ '@babel/helper-plugin-utils': 7.29.7++ '@babel/[email protected](@babel/[email protected])':+ dependencies:+ '@babel/core': 7.29.7+ '@babel/helper-plugin-utils': 7.29.7++ '@babel/[email protected](@babel/[email protected])':+ dependencies:+ '@babel/core': 7.29.7+ '@babel/helper-plugin-utils': 7.29.7++ '@babel/[email protected](@babel/[email protected])':+ dependencies:+ '@babel/core': 7.29.7+ '@babel/helper-plugin-utils': 7.29.7+ '@babel/helper-remap-async-to-generator': 7.29.7(@babel/[email protected])+ '@babel/traverse': 7.29.8+ transitivePeerDependencies:+ - supports-color++ '@babel/[email protected](@babel/[email protected])':+ dependencies:+ '@babel/core': 7.29.7+ '@babel/helper-module-imports': 7.29.7+ '@babel/helper-plugin-utils': 7.29.7+ '@babel/helper-remap-async-to-generator': 7.29.7(@babel/[email protected])+ transitivePeerDependencies:+ - supports-color++ '@babel/[email protected](@babel/[email protected])':+ dependencies:+ '@babel/core': 7.29.7+ '@babel/helper-plugin-utils': 7.29.7++ '@babel/[email protected](@babel/[email protected])':+ dependencies:+ '@babel/core': 7.29.7+ '@babel/helper-create-class-features-plugin': 7.29.7(@babel/[email protected])+ '@babel/helper-plugin-utils': 7.29.7+ transitivePeerDependencies:+ - supports-color++ '@babel/[email protected](@babel/[email protected])':+ dependencies:+ '@babel/core': 7.29.7+ '@babel/helper-create-class-features-plugin': 7.29.7(@babel/[email protected])+ '@babel/helper-plugin-utils': 7.29.7+ transitivePeerDependencies:+ - supports-color++ '@babel/[email protected](@babel/[email protected])':+ dependencies:+ '@babel/core': 7.29.7+ '@babel/helper-annotate-as-pure': 7.29.7+ '@babel/helper-compilation-targets': 7.29.7+ '@babel/helper-globals': 7.29.7+ '@babel/helper-plugin-utils': 7.29.7+ '@babel/helper-replace-supers': 7.29.7(@babel/[email protected])+ '@babel/traverse': 7.29.8+ transitivePeerDependencies:+ - supports-color++ '@babel/[email protected](@babel/[email protected])':+ dependencies:+ '@babel/core': 7.29.7+ '@babel/helper-plugin-utils': 7.29.7+ '@babel/traverse': 7.29.8+ transitivePeerDependencies:+ - supports-color++ '@babel/[email protected](@babel/[email protected])':+ dependencies:+ '@babel/core': 7.29.7+ '@babel/helper-plugin-utils': 7.29.7++ '@babel/[email protected](@babel/[email protected])':+ dependencies:+ '@babel/core': 7.29.7+ '@babel/helper-plugin-utils': 7.29.7+ '@babel/plugin-syntax-flow': 7.29.7(@babel/[email protected])++ '@babel/[email protected](@babel/[email protected])':+ dependencies:+ '@babel/core': 7.29.7+ '@babel/helper-plugin-utils': 7.29.7+ '@babel/helper-skip-transparent-expression-wrappers': 7.29.7+ transitivePeerDependencies:+ - supports-color++ '@babel/[email protected](@babel/[email protected])':+ dependencies:+ '@babel/core': 7.29.7+ '@babel/helper-plugin-utils': 7.29.7++ '@babel/[email protected](@babel/[email protected])':+ dependencies:+ '@babel/core': 7.29.7+ '@babel/helper-module-transforms': 7.29.7(@babel/[email protected])+ '@babel/helper-plugin-utils': 7.29.7+ transitivePeerDependencies:+ - supports-color++ '@babel/[email protected](@babel/[email protected])':+ dependencies:+ '@babel/core': 7.29.7+ '@babel/helper-create-regexp-features-plugin': 7.29.7(@babel/[email protected])+ '@babel/helper-plugin-utils': 7.29.7++ '@babel/[email protected](@babel/[email protected])':+ dependencies:+ '@babel/core': 7.29.7+ '@babel/helper-plugin-utils': 7.29.7++ '@babel/[email protected](@babel/[email protected])':+ dependencies:+ '@babel/core': 7.29.7+ '@babel/helper-compilation-targets': 7.29.7+ '@babel/helper-plugin-utils': 7.29.7+ '@babel/plugin-transform-destructuring': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-parameters': 7.29.7(@babel/[email protected])+ '@babel/traverse': 7.29.8+ transitivePeerDependencies:+ - supports-color++ '@babel/[email protected](@babel/[email protected])':+ dependencies:+ '@babel/core': 7.29.7+ '@babel/helper-plugin-utils': 7.29.7++ '@babel/[email protected](@babel/[email protected])':+ dependencies:+ '@babel/core': 7.29.7+ '@babel/helper-plugin-utils': 7.29.7+ '@babel/helper-skip-transparent-expression-wrappers': 7.29.7+ transitivePeerDependencies:+ - supports-color++ '@babel/[email protected](@babel/[email protected])':+ dependencies:+ '@babel/core': 7.29.7+ '@babel/helper-plugin-utils': 7.29.7++ '@babel/[email protected](@babel/[email protected])':+ dependencies:+ '@babel/core': 7.29.7+ '@babel/helper-create-class-features-plugin': 7.29.7(@babel/[email protected])+ '@babel/helper-plugin-utils': 7.29.7+ transitivePeerDependencies:+ - supports-color++ '@babel/[email protected](@babel/[email protected])':+ dependencies:+ '@babel/core': 7.29.7+ '@babel/helper-annotate-as-pure': 7.29.7+ '@babel/helper-create-class-features-plugin': 7.29.7(@babel/[email protected])+ '@babel/helper-plugin-utils': 7.29.7+ transitivePeerDependencies:+ - supports-color++ '@babel/[email protected](@babel/[email protected])':+ dependencies:+ '@babel/core': 7.29.7+ '@babel/helper-plugin-utils': 7.29.7++ '@babel/[email protected](@babel/[email protected])':+ dependencies:+ '@babel/core': 7.29.7+ '@babel/plugin-transform-react-jsx': 7.29.7(@babel/[email protected])+ transitivePeerDependencies:+ - supports-color++ '@babel/[email protected](@babel/[email protected])':dependencies:- '@babel/parser': 7.29.8- '@babel/types': 7.29.8- '@jridgewell/gen-mapping': 0.3.13- '@jridgewell/trace-mapping': 0.3.31- jsesc: 3.1.0+ '@babel/core': 7.29.7+ '@babel/helper-plugin-utils': 7.29.7- '@babel/[email protected]':+ '@babel/[email protected](@babel/[email protected])':dependencies:- '@babel/compat-data': 7.29.7- '@babel/helper-validator-option': 7.29.7- browserslist: 4.28.8- lru-cache: 5.1.1- semver: 6.3.1-- '@babel/[email protected]': {}+ '@babel/core': 7.29.7+ '@babel/helper-plugin-utils': 7.29.7- '@babel/[email protected]':+ '@babel/[email protected](@babel/[email protected])':dependencies:- '@babel/traverse': 7.29.8+ '@babel/core': 7.29.7+ '@babel/helper-annotate-as-pure': 7.29.7+ '@babel/helper-module-imports': 7.29.7+ '@babel/helper-plugin-utils': 7.29.7+ '@babel/plugin-syntax-jsx': 7.29.7(@babel/[email protected])'@babel/types': 7.29.8transitivePeerDependencies:- supports-color- '@babel/[email protected](@babel/[email protected])':+ '@babel/[email protected](@babel/[email protected])':+ dependencies:+ '@babel/core': 7.29.7+ '@babel/helper-annotate-as-pure': 7.29.7+ '@babel/helper-plugin-utils': 7.29.7++ '@babel/[email protected](@babel/[email protected])':+ dependencies:+ '@babel/core': 7.29.7+ '@babel/helper-plugin-utils': 7.29.7++ '@babel/[email protected](@babel/[email protected])':dependencies:'@babel/core': 7.29.7'@babel/helper-module-imports': 7.29.7- '@babel/helper-validator-identifier': 7.29.7- '@babel/traverse': 7.29.8+ '@babel/helper-plugin-utils': 7.29.7+ babel-plugin-polyfill-corejs2: 0.4.17(@babel/[email protected])+ babel-plugin-polyfill-corejs3: 0.13.0(@babel/[email protected])+ babel-plugin-polyfill-regenerator: 0.6.8(@babel/[email protected])+ semver: 6.3.1transitivePeerDependencies:- supports-color- '@babel/[email protected]': {}-- '@babel/[email protected]': {}-- '@babel/[email protected]': {}-- '@babel/[email protected]': {}+ '@babel/[email protected](@babel/[email protected])':+ dependencies:+ '@babel/core': 7.29.7+ '@babel/helper-plugin-utils': 7.29.7- '@babel/[email protected]':+ '@babel/[email protected](@babel/[email protected])':dependencies:- '@babel/template': 7.29.7- '@babel/types': 7.29.8+ '@babel/core': 7.29.7+ '@babel/helper-plugin-utils': 7.29.7- '@babel/[email protected]':+ '@babel/[email protected](@babel/[email protected])':dependencies:- '@babel/types': 7.29.8+ '@babel/core': 7.29.7+ '@babel/helper-annotate-as-pure': 7.29.7+ '@babel/helper-create-class-features-plugin': 7.29.7(@babel/[email protected])+ '@babel/helper-plugin-utils': 7.29.7+ '@babel/helper-skip-transparent-expression-wrappers': 7.29.7+ '@babel/plugin-syntax-typescript': 7.29.7(@babel/[email protected])+ transitivePeerDependencies:+ - supports-color- '@babel/[email protected](@babel/[email protected])':+ '@babel/[email protected](@babel/[email protected])':dependencies:'@babel/core': 7.29.7+ '@babel/helper-create-regexp-features-plugin': 7.29.7(@babel/[email protected])'@babel/helper-plugin-utils': 7.29.7- '@babel/[email protected](@babel/[email protected])':+ '@babel/[email protected](@babel/[email protected])':dependencies:'@babel/core': 7.29.7'@babel/helper-plugin-utils': 7.29.7+ '@babel/helper-validator-option': 7.29.7+ '@babel/plugin-syntax-jsx': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-modules-commonjs': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-typescript': 7.29.9(@babel/[email protected])+ transitivePeerDependencies:+ - supports-color'@babel/[email protected]': {}@@ -8264,6 +11192,10 @@ snapshots:optionalDependencies:eslint: 10.8.1([email protected])+ '@egjs/[email protected]':+ dependencies:+ '@types/hammerjs': 2.0.46+'@emnapi/[email protected]':dependencies:'@emnapi/wasi-threads': 1.2.1@@ -8423,134 +11355,516 @@ snapshots:transitivePeerDependencies:- supports-color+ dependencies:+ '@typescript-eslint/scope-manager': 8.67.0+ '@typescript-eslint/types': 8.67.0+ eslint: 10.8.1([email protected])+ ts-pattern: 5.9.0+ typescript: 5.8.3+ transitivePeerDependencies:+ - supports-color++ dependencies:+ eslint: 10.8.1([email protected])+ eslint-plugin-react-naming-convention: 5.18.6([email protected]([email protected]))([email protected])+ typescript: 5.8.3+ transitivePeerDependencies:+ - supports-color++ dependencies:+ eslint: 10.8.1([email protected])+ typescript: 5.8.3+ transitivePeerDependencies:+ - supports-color++ dependencies:+ '@typescript-eslint/types': 8.67.0+ eslint: 10.8.1([email protected])+ ts-pattern: 5.9.0+ typescript: 5.8.3+ transitivePeerDependencies:+ - supports-color++ dependencies:+ eslint: 10.8.1([email protected])+ ts-pattern: 5.9.0+ typescript: 5.8.3+ zod: 4.4.3+ transitivePeerDependencies:+ - supports-color++ dependencies:+ '@typescript-eslint/scope-manager': 8.67.0+ '@typescript-eslint/types': 8.67.0+ eslint: 10.8.1([email protected])+ ts-pattern: 5.9.0+ typescript: 5.8.3+ transitivePeerDependencies:+ - supports-color++ dependencies:+ '@eslint/core': 1.2.1+ optionalDependencies:+ eslint: 10.8.1([email protected])++ '@eslint/[email protected]':+ dependencies:+ '@eslint/object-schema': 3.0.5+ debug: 4.4.3+ minimatch: 10.2.6+ transitivePeerDependencies:+ - supports-color++ '@eslint/[email protected]':+ dependencies:+ '@eslint/core': 1.2.1++ '@eslint/[email protected]':+ dependencies:+ '@eslint/core': 1.2.1++ '@eslint/[email protected]':+ dependencies:+ '@types/json-schema': 7.0.15++ '@eslint/[email protected]':+ dependencies:+ mdn-data: 2.29.0+ source-map-js: 1.2.1++ '@eslint/[email protected]':+ dependencies:+ '@eslint/core': 1.2.1+ '@eslint/plugin-kit': 0.7.2+ github-slugger: 2.0.0+ mdast-util-from-markdown: 2.0.3+ mdast-util-frontmatter: 2.0.1+ mdast-util-gfm: 3.1.0+ mdast-util-math: 3.0.0+ micromark-extension-frontmatter: 2.0.0+ micromark-extension-gfm: 3.0.0+ micromark-extension-math: 3.1.0+ micromark-util-normalize-identifier: 2.0.1+ transitivePeerDependencies:+ - supports-color++ '@eslint/[email protected]': {}++ '@eslint/[email protected]':+ dependencies:+ '@eslint/core': 1.2.1+ levn: 0.4.1++ '@expo-google-fonts/[email protected]': {}++ '@expo/[email protected](@expo/[email protected])(@expo/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])([email protected])':+ dependencies:+ '@expo/code-signing-certificates': 0.0.6+ '@expo/config': 57.0.9([email protected])+ '@expo/config-plugins': 57.0.9([email protected])+ '@expo/devcert': 1.2.1+ '@expo/env': 2.4.3+ '@expo/image-utils': 0.11.5([email protected])+ '@expo/inline-modules': 0.1.7([email protected])+ '@expo/json-file': 11.0.1+ '@expo/log-box': 57.0.4(@expo/[email protected])([email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])+ '@expo/metro': 56.0.2+ '@expo/metro-config': 57.0.12([email protected])([email protected])+ '@expo/metro-file-map': 57.0.3+ '@expo/osascript': 2.7.1+ '@expo/package-manager': 1.13.1+ '@expo/plist': 0.8.1+ '@expo/prebuild-config': 57.0.16([email protected])+ '@expo/require-utils': 57.0.5([email protected])+ '@expo/router-server': 57.0.11(@expo/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]([email protected]))([email protected])+ '@expo/schema-utils': 57.0.2+ '@expo/spawn-async': 1.8.0+ '@expo/ws-tunnel': 2.0.0([email protected])+ '@expo/xcpretty': 4.4.5+ '@react-native/dev-middleware': 0.86.3+ accepts: 1.3.8+ agent-cli-detector: 0.1.7+ arg: 5.0.2+ bplist-creator: 0.1.0+ bplist-parser: 0.3.2+ chalk: 4.1.2+ ci-info: 3.9.0+ compression: 1.8.2+ connect: 3.7.0+ debug: 4.4.3+ dnssd-advertise: 1.1.6+ expo: 57.0.26(@babel/[email protected])(@expo/[email protected])(@expo/[email protected])([email protected])([email protected]([email protected]))([email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])([email protected])+ expo-server: 57.0.3+ fetch-nodeshim: 0.4.10+ getenv: 2.0.0+ glob: 13.0.6+ lan-network: 0.2.1+ multitars: 1.0.2+ node-forge: 1.4.0+ npm-package-arg: 11.0.3+ ora: 3.4.0+ picomatch: 4.0.5+ pretty-format: 29.7.0+ progress: 2.0.3+ prompts: 2.4.2+ resolve-from: 5.0.0+ sandbox-cli-detector: 0.2.0+ semver: 7.8.5+ send: 0.19.2+ slugify: 1.6.9+ stacktrace-parser: 0.1.11+ structured-headers: 0.4.1+ terminal-link: 2.1.1+ toqr: 0.1.1+ wrap-ansi: 7.0.0+ ws: 8.21.3+ zod: 3.25.76+ optionalDependencies:+ expo-router: 57.0.24(d7b84b55689872de76f06bc38ecca4aa)+ react-native: 0.86.3(@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])+ transitivePeerDependencies:+ - '@expo/dom-webview'+ - '@expo/metro-runtime'+ - bufferutil+ - expo-constants+ - expo-font+ - react+ - react-dom+ - react-server-dom-webpack+ - supports-color+ - typescript+ - utf-8-validate++ '@expo/[email protected]':+ dependencies:+ node-forge: 1.4.0++ '@expo/[email protected]([email protected])':+ dependencies:+ '@expo/config-types': 57.0.2+ '@expo/json-file': 11.0.1+ '@expo/plist': 0.8.1+ '@expo/require-utils': 57.0.5([email protected])+ '@expo/sdk-runtime-versions': 1.0.0+ chalk: 4.1.2+ debug: 4.4.3+ getenv: 2.0.0+ glob: 13.0.6+ semver: 7.8.5+ slugify: 1.6.9+ xcode: 3.0.1+ xml2js: 0.6.0+ transitivePeerDependencies:+ - supports-color+ - typescript++ '@expo/[email protected]': {}++ '@expo/[email protected]([email protected])':+ dependencies:+ '@expo/config-plugins': 57.0.9([email protected])+ '@expo/config-types': 57.0.2+ '@expo/json-file': 11.0.1+ '@expo/require-utils': 57.0.5([email protected])+ deepmerge: 4.3.1+ getenv: 2.0.0+ glob: 13.0.6+ resolve-workspace-root: 2.0.1+ semver: 7.8.5+ slugify: 1.6.9+ transitivePeerDependencies:+ - supports-color+ - typescript++ '@expo/[email protected]':+ dependencies:+ '@expo/sudo-prompt': 9.3.2+ debug: 3.2.7+ transitivePeerDependencies:+ - supports-color++ '@expo/[email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])':+ dependencies:+ chalk: 4.1.2+ optionalDependencies:+ react: 19.2.8+ react-native: 0.86.3(@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])++ '@expo/[email protected]([email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])':+ dependencies:+ expo: 57.0.26(@babel/[email protected])(@expo/[email protected])(@expo/[email protected])([email protected])([email protected]([email protected]))([email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])([email protected])+ react: 19.2.8+ react-native: 0.86.3(@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])++ '@expo/[email protected]':+ dependencies:+ chalk: 4.1.2+ debug: 4.4.3+ getenv: 2.0.0+ transitivePeerDependencies:+ - supports-color++ '@expo/[email protected]': {}++ '@expo/[email protected]':+ dependencies:+ '@expo/env': 2.4.3+ '@expo/spawn-async': 1.8.0+ arg: 5.0.2+ chalk: 4.1.2+ debug: 4.4.3+ getenv: 2.0.0+ glob: 13.0.6+ ignore: 5.3.2+ minimatch: 10.2.6+ resolve-from: 5.0.0+ semver: 7.8.5+ transitivePeerDependencies:+ - supports-color++ '@expo/[email protected]([email protected])':dependencies:- '@typescript-eslint/scope-manager': 8.67.0- '@typescript-eslint/types': 8.67.0- eslint: 10.8.1([email protected])- ts-pattern: 5.9.0- typescript: 5.8.3+ '@expo/require-utils': 57.0.5([email protected])+ '@expo/spawn-async': 1.8.0+ chalk: 4.1.2+ getenv: 2.0.0+ jimp-compact: 0.16.1+ parse-png: 2.1.0+ semver: 7.8.5transitivePeerDependencies:- supports-color+ - typescript+ '@expo/[email protected]([email protected])':dependencies:- eslint: 10.8.1([email protected])- eslint-plugin-react-naming-convention: 5.18.6([email protected]([email protected]))([email protected])- typescript: 5.8.3+ '@expo/config-plugins': 57.0.9([email protected])transitivePeerDependencies:- supports-color+ - typescript+ '@expo/[email protected]':dependencies:- eslint: 10.8.1([email protected])- typescript: 5.8.3+ '@babel/code-frame': 7.29.7+ json5: 2.2.3++ '@expo/[email protected]([email protected])':+ dependencies:+ '@expo/config': 57.0.9([email protected])+ chalk: 4.1.2transitivePeerDependencies:- supports-color+ - typescript+ '@expo/[email protected](@expo/[email protected])([email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])':dependencies:- '@typescript-eslint/types': 8.67.0- eslint: 10.8.1([email protected])- ts-pattern: 5.9.0- typescript: 5.8.3+ '@expo/dom-webview': 57.0.1([email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])+ anser: 1.4.10+ expo: 57.0.26(@babel/[email protected])(@expo/[email protected])(@expo/[email protected])([email protected])([email protected]([email protected]))([email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])([email protected])+ react: 19.2.8+ react-native: 0.86.3(@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])+ stacktrace-parser: 0.1.11++ dependencies:+ '@babel/code-frame': 7.29.7+ '@babel/core': 7.29.7+ '@babel/generator': 7.29.8+ '@expo/config': 57.0.9([email protected])+ '@expo/env': 2.4.3+ '@expo/json-file': 11.0.1+ '@expo/metro': 56.0.2+ '@expo/require-utils': 57.0.5([email protected])+ '@expo/spawn-async': 1.8.0+ '@jridgewell/gen-mapping': 0.3.13+ '@jridgewell/remapping': 2.3.5+ '@jridgewell/sourcemap-codec': 1.5.5+ browserslist: 4.28.8+ chalk: 4.1.2+ debug: 4.4.3+ getenv: 2.0.0+ glob: 13.0.6+ hermes-parser: 0.36.1+ jsc-safe-url: 0.2.4+ lightningcss: 1.32.0+ picomatch: 4.0.5+ postcss: 8.5.26+ resolve-from: 5.0.0+ optionalDependencies:+ expo: 57.0.26(@babel/[email protected])(@expo/[email protected])(@expo/[email protected])([email protected])([email protected]([email protected]))([email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])([email protected])transitivePeerDependencies:+ - bufferutil- supports-color+ - typescript+ - utf-8-validate+ '@expo/[email protected]':dependencies:- eslint: 10.8.1([email protected])- ts-pattern: 5.9.0- typescript: 5.8.3- zod: 4.4.3+ debug: 4.4.3+ fb-watchman: 2.0.2+ invariant: 2.2.4+ jest-worker: 29.7.0+ micromatch: 4.0.8+ walker: 1.0.8transitivePeerDependencies:- supports-color+ '@expo/[email protected](@expo/[email protected])([email protected])([email protected]([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])':dependencies:- '@typescript-eslint/scope-manager': 8.67.0- '@typescript-eslint/types': 8.67.0- eslint: 10.8.1([email protected])- ts-pattern: 5.9.0- typescript: 5.8.3+ '@expo/log-box': 57.0.4(@expo/[email protected])([email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])+ anser: 1.4.10+ expo: 57.0.26(@babel/[email protected])(@expo/[email protected])(@expo/[email protected])([email protected])([email protected]([email protected]))([email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])([email protected])+ pretty-format: 29.7.0+ react: 19.2.8+ react-native: 0.86.3(@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])+ stacktrace-parser: 0.1.11+ whatwg-fetch: 3.6.20+ optionalDependencies:+ react-dom: 19.2.8([email protected])++ '@expo/[email protected]':+ dependencies:+ metro: 0.84.5+ metro-babel-transformer: 0.84.5+ metro-cache: 0.84.5+ metro-cache-key: 0.84.5+ metro-config: 0.84.5+ metro-core: 0.84.5+ metro-file-map: 0.84.5+ metro-minify-terser: 0.84.5+ metro-resolver: 0.84.5+ metro-runtime: 0.84.5+ metro-source-map: 0.84.5+ metro-symbolicate: 0.84.5+ metro-transform-plugins: 0.84.5+ metro-transform-worker: 0.84.5transitivePeerDependencies:+ - bufferutil- supports-color+ - utf-8-validate+ '@expo/[email protected]':dependencies:- '@eslint/core': 1.2.1- optionalDependencies:- eslint: 10.8.1([email protected])+ '@expo/spawn-async': 1.8.0- '@eslint/[email protected]':+ '@expo/[email protected]':dependencies:- '@eslint/object-schema': 3.0.5+ '@expo/json-file': 11.0.1+ '@expo/spawn-async': 1.8.0+ chalk: 4.1.2+ npm-package-arg: 11.0.3+ ora: 3.4.0+ resolve-workspace-root: 2.0.1++ '@expo/[email protected]':+ dependencies:+ '@xmldom/xmldom': 0.8.15+ base64-js: 1.5.1+ xmlbuilder: 15.1.1++ '@expo/[email protected]([email protected])':+ dependencies:+ '@expo/config': 57.0.9([email protected])+ '@expo/config-plugins': 57.0.9([email protected])+ '@expo/config-types': 57.0.2+ '@expo/image-utils': 0.11.5([email protected])+ '@expo/json-file': 11.0.1+ '@react-native/normalize-colors': 0.86.3debug: 4.4.3- minimatch: 10.2.6+ expo-modules-autolinking: 57.0.13([email protected])+ resolve-from: 5.0.0+ semver: 7.8.5transitivePeerDependencies:- supports-color+ - typescript- '@eslint/[email protected]':+ '@expo/[email protected]([email protected])':dependencies:- '@eslint/core': 1.2.1+ '@babel/code-frame': 7.29.7+ '@babel/core': 7.29.7+ '@babel/plugin-transform-modules-commonjs': 7.29.7(@babel/[email protected])+ optionalDependencies:+ typescript: 5.8.3+ transitivePeerDependencies:+ - supports-color- '@eslint/[email protected]':+ '@expo/[email protected](@expo/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]([email protected]))([email protected])':dependencies:- '@eslint/core': 1.2.1+ debug: 4.4.3+ expo: 57.0.26(@babel/[email protected])(@expo/[email protected])(@expo/[email protected])([email protected])([email protected]([email protected]))([email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])([email protected])+ expo-constants: 57.0.20([email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))+ expo-font: 57.0.4([email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])+ expo-server: 57.0.3+ react: 19.2.8+ optionalDependencies:+ '@expo/metro-runtime': 57.0.16(@expo/[email protected])([email protected])([email protected]([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])+ expo-router: 57.0.24(d7b84b55689872de76f06bc38ecca4aa)+ react-dom: 19.2.8([email protected])+ transitivePeerDependencies:+ - supports-color- '@eslint/[email protected]':- dependencies:- '@types/json-schema': 7.0.15+ '@expo/[email protected]': {}- '@eslint/[email protected]':+ '@expo/[email protected]': {}++ '@expo/[email protected]':dependencies:- mdn-data: 2.29.0- source-map-js: 1.2.1+ cross-spawn: 7.0.6- '@eslint/[email protected]':+ '@expo/[email protected]': {}++ '@expo/[email protected](@babel/[email protected])(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected])([email protected]([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])':dependencies:- '@eslint/core': 1.2.1- '@eslint/plugin-kit': 0.7.2- github-slugger: 2.0.0- mdast-util-from-markdown: 2.0.3- mdast-util-frontmatter: 2.0.1- mdast-util-gfm: 3.1.0- mdast-util-math: 3.0.0- micromark-extension-frontmatter: 2.0.0- micromark-extension-gfm: 3.0.0- micromark-extension-math: 3.1.0- micromark-util-normalize-identifier: 2.0.1+ expo: 57.0.26(@babel/[email protected])(@expo/[email protected])(@expo/[email protected])([email protected])([email protected]([email protected]))([email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])([email protected])+ react: 19.2.8+ react-native: 0.86.3(@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])+ sf-symbols-typescript: 2.2.0+ vaul: 1.1.2(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ optionalDependencies:+ '@babel/core': 7.29.7+ react-dom: 19.2.8([email protected])+ react-native-worklets: 0.10.1(@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])transitivePeerDependencies:- - supports-color+ - '@types/react'+ - '@types/react-dom'- '@eslint/[email protected]': {}+ '@expo/[email protected]([email protected])':+ dependencies:+ ws: 8.21.3- '@eslint/[email protected]':+ '@expo/[email protected]':dependencies:- '@eslint/core': 1.2.1- levn: 0.4.1+ '@babel/code-frame': 7.29.7+ chalk: 4.1.2+ js-yaml: 4.3.2'@formatjs/[email protected]':dependencies:@@ -8669,6 +11983,14 @@ snapshots:transitivePeerDependencies:- tailwind-merge+ dependencies:+ tailwind-variants: 3.3.1([email protected])([email protected])+ tailwindcss: 4.1.11+ tw-animate-css: 1.4.0+ transitivePeerDependencies:+ - tailwind-merge+'@humanfs/[email protected]':dependencies:'@humanfs/types': 0.15.0@@ -8715,6 +12037,8 @@ snapshots:dependencies:minipass: 7.1.3+ '@isaacs/[email protected]': {}+'@jest/[email protected]': {}'@jest/[email protected]':@@ -8728,10 +12052,23 @@ snapshots:'@types/node': 22.20.1jest-regex-util: 30.5.0+ '@jest/[email protected]':+ dependencies:+ '@sinclair/typebox': 0.27.12+'@jest/[email protected]':dependencies:'@sinclair/typebox': 0.34.52+ '@jest/[email protected]':+ dependencies:+ '@jest/schemas': 29.6.3+ '@types/istanbul-lib-coverage': 2.0.6+ '@types/istanbul-reports': 3.0.4+ '@types/node': 22.20.1+ '@types/yargs': 17.0.35+ chalk: 4.1.2+'@jest/[email protected]':dependencies:'@jest/pattern': 30.5.0@@ -8754,6 +12091,11 @@ snapshots:'@jridgewell/[email protected]': {}+ '@jridgewell/[email protected]':+ dependencies:+ '@jridgewell/gen-mapping': 0.3.13+ '@jridgewell/trace-mapping': 0.3.31+'@jridgewell/[email protected]': {}'@jridgewell/[email protected]':@@ -8867,59 +12209,179 @@ snapshots:'@pkgjs/[email protected]':optional: true- '@pkgr/[email protected]': {}+ '@pkgr/[email protected]': {}++ '@promptbook/[email protected]':+ dependencies:+ spacetrim: 0.11.59++ '@publint/[email protected]':+ dependencies:+ tinyexec: 1.3.1++ '@puppeteer/[email protected]':+ dependencies:+ debug: 4.4.3+ extract-zip: 2.0.1+ progress: 2.0.3+ proxy-agent: 6.5.0+ semver: 7.8.5+ tar-fs: 3.1.3+ yargs: 17.7.3+ transitivePeerDependencies:+ - bare-abort-controller+ - bare-buffer+ - react-native-b4a+ - supports-color++ '@quansync/[email protected]':+ dependencies:+ quansync: 1.0.0++ '@radix-ui/[email protected]': {}++ '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':+ dependencies:+ '@radix-ui/react-context': 1.1.3(@types/[email protected])([email protected])+ '@radix-ui/react-primitive': 2.1.4(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-use-callback-ref': 1.1.1(@types/[email protected])([email protected])+ '@radix-ui/react-use-is-hydrated': 0.1.0(@types/[email protected])([email protected])+ '@radix-ui/react-use-layout-effect': 1.1.1(@types/[email protected])([email protected])+ react: 19.2.8+ react-dom: 19.2.8([email protected])+ optionalDependencies:+ '@types/react': 19.2.18+ '@types/react-dom': 19.2.4(@types/[email protected])++ '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':+ dependencies:+ '@radix-ui/react-compose-refs': 1.1.5(@types/[email protected])([email protected])+ '@radix-ui/react-context': 1.2.2(@types/[email protected])([email protected])+ '@radix-ui/react-primitive': 2.1.10(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-slot': 1.3.3(@types/[email protected])([email protected])+ react: 19.2.8+ react-dom: 19.2.8([email protected])+ optionalDependencies:+ '@types/react': 19.2.18+ '@types/react-dom': 19.2.4(@types/[email protected])++ dependencies:+ react: 19.2.8+ optionalDependencies:+ '@types/react': 19.2.18++ dependencies:+ react: 19.2.8+ optionalDependencies:+ '@types/react': 19.2.18++ dependencies:+ react: 19.2.8+ optionalDependencies:+ '@types/react': 19.2.18++ dependencies:+ react: 19.2.8+ optionalDependencies:+ '@types/react': 19.2.18++ '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':+ dependencies:+ '@radix-ui/primitive': 1.1.7+ '@radix-ui/react-compose-refs': 1.1.5(@types/[email protected])([email protected])+ '@radix-ui/react-context': 1.2.2(@types/[email protected])([email protected])+ '@radix-ui/react-dismissable-layer': 1.1.19(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-focus-guards': 1.1.6(@types/[email protected])([email protected])+ '@radix-ui/react-focus-scope': 1.1.16(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-id': 1.1.4(@types/[email protected])([email protected])+ '@radix-ui/react-portal': 1.1.17(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-presence': 1.1.10(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-primitive': 2.1.10(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-slot': 1.3.3(@types/[email protected])([email protected])+ '@radix-ui/react-use-controllable-state': 1.2.6(@types/[email protected])([email protected])+ '@radix-ui/react-use-layout-effect': 1.1.4(@types/[email protected])([email protected])+ aria-hidden: 1.2.6+ react: 19.2.8+ react-dom: 19.2.8([email protected])+ react-remove-scroll: 2.7.2(@types/[email protected])([email protected])+ optionalDependencies:+ '@types/react': 19.2.18+ '@types/react-dom': 19.2.4(@types/[email protected])++ dependencies:+ react: 19.2.8+ optionalDependencies:+ '@types/react': 19.2.18- '@promptbook/[email protected]':+ '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':dependencies:- spacetrim: 0.11.59+ '@radix-ui/primitive': 1.1.7+ '@radix-ui/react-compose-refs': 1.1.5(@types/[email protected])([email protected])+ '@radix-ui/react-primitive': 2.1.10(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-use-callback-ref': 1.1.4(@types/[email protected])([email protected])+ '@radix-ui/react-use-effect-event': 0.0.5(@types/[email protected])([email protected])+ react: 19.2.8+ react-dom: 19.2.8([email protected])+ optionalDependencies:+ '@types/react': 19.2.18+ '@types/react-dom': 19.2.4(@types/[email protected])- '@publint/[email protected]':dependencies:- tinyexec: 1.3.1+ react: 19.2.8+ optionalDependencies:+ '@types/react': 19.2.18- '@puppeteer/[email protected]':+ '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':dependencies:- debug: 4.4.3- extract-zip: 2.0.1- progress: 2.0.3- proxy-agent: 6.5.0- semver: 7.8.5- tar-fs: 3.1.3- yargs: 17.7.3- transitivePeerDependencies:- - bare-abort-controller- - bare-buffer- - react-native-b4a- - supports-color+ '@radix-ui/react-compose-refs': 1.1.5(@types/[email protected])([email protected])+ '@radix-ui/react-primitive': 2.1.10(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-use-callback-ref': 1.1.4(@types/[email protected])([email protected])+ react: 19.2.8+ react-dom: 19.2.8([email protected])+ optionalDependencies:+ '@types/react': 19.2.18+ '@types/react-dom': 19.2.4(@types/[email protected])- '@quansync/[email protected]':dependencies:- quansync: 1.0.0+ '@radix-ui/react-use-layout-effect': 1.1.4(@types/[email protected])([email protected])+ react: 19.2.8+ optionalDependencies:+ '@types/react': 19.2.18- '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':+ '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':dependencies:- '@radix-ui/react-context': 1.1.3(@types/[email protected])([email protected])- '@radix-ui/react-primitive': 2.1.4(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])- '@radix-ui/react-use-callback-ref': 1.1.1(@types/[email protected])([email protected])- '@radix-ui/react-use-is-hydrated': 0.1.0(@types/[email protected])([email protected])- '@radix-ui/react-use-layout-effect': 1.1.1(@types/[email protected])([email protected])+ '@radix-ui/react-primitive': 2.1.10(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-use-layout-effect': 1.1.4(@types/[email protected])([email protected])react: 19.2.8react-dom: 19.2.8([email protected])optionalDependencies:'@types/react': 19.2.18'@types/react-dom': 19.2.4(@types/[email protected])+ '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':dependencies:+ '@radix-ui/react-use-layout-effect': 1.1.4(@types/[email protected])([email protected])react: 19.2.8+ react-dom: 19.2.8([email protected])optionalDependencies:'@types/react': 19.2.18+ '@types/react-dom': 19.2.4(@types/[email protected])+ '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':dependencies:+ '@radix-ui/react-slot': 1.3.3(@types/[email protected])([email protected])react: 19.2.8+ react-dom: 19.2.8([email protected])optionalDependencies:'@types/react': 19.2.18+ '@types/react-dom': 19.2.4(@types/[email protected])'@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':dependencies:@@ -8930,6 +12392,25 @@ snapshots:'@types/react': 19.2.18'@types/react-dom': 19.2.4(@types/[email protected])+ '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':+ dependencies:+ '@radix-ui/primitive': 1.1.7+ '@radix-ui/react-collection': 1.1.15(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-compose-refs': 1.1.5(@types/[email protected])([email protected])+ '@radix-ui/react-context': 1.2.2(@types/[email protected])([email protected])+ '@radix-ui/react-direction': 1.1.4(@types/[email protected])([email protected])+ '@radix-ui/react-id': 1.1.4(@types/[email protected])([email protected])+ '@radix-ui/react-primitive': 2.1.10(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-use-callback-ref': 1.1.4(@types/[email protected])([email protected])+ '@radix-ui/react-use-controllable-state': 1.2.6(@types/[email protected])([email protected])+ '@radix-ui/react-use-is-hydrated': 0.1.3(@types/[email protected])([email protected])+ '@radix-ui/react-use-layout-effect': 1.1.4(@types/[email protected])([email protected])+ react: 19.2.8+ react-dom: 19.2.8([email protected])+ optionalDependencies:+ '@types/react': 19.2.18+ '@types/react-dom': 19.2.4(@types/[email protected])+dependencies:'@radix-ui/react-compose-refs': 1.1.2(@types/[email protected])([email protected])@@ -8937,12 +12418,57 @@ snapshots:optionalDependencies:'@types/react': 19.2.18+ dependencies:+ '@radix-ui/react-compose-refs': 1.1.5(@types/[email protected])([email protected])+ react: 19.2.8+ optionalDependencies:+ '@types/react': 19.2.18++ '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':+ dependencies:+ '@radix-ui/primitive': 1.1.7+ '@radix-ui/react-context': 1.2.2(@types/[email protected])([email protected])+ '@radix-ui/react-direction': 1.1.4(@types/[email protected])([email protected])+ '@radix-ui/react-id': 1.1.4(@types/[email protected])([email protected])+ '@radix-ui/react-presence': 1.1.10(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-primitive': 2.1.10(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-roving-focus': 1.1.19(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-use-controllable-state': 1.2.6(@types/[email protected])([email protected])+ react: 19.2.8+ react-dom: 19.2.8([email protected])+ optionalDependencies:+ '@types/react': 19.2.18+ '@types/react-dom': 19.2.4(@types/[email protected])+dependencies:react: 19.2.8optionalDependencies:'@types/react': 19.2.18+ dependencies:+ react: 19.2.8+ optionalDependencies:+ '@types/react': 19.2.18++ dependencies:+ '@radix-ui/primitive': 1.1.7+ '@radix-ui/react-use-effect-event': 0.0.5(@types/[email protected])([email protected])+ '@radix-ui/react-use-layout-effect': 1.1.4(@types/[email protected])([email protected])+ react: 19.2.8+ optionalDependencies:+ '@types/react': 19.2.18++ dependencies:+ '@radix-ui/react-use-layout-effect': 1.1.4(@types/[email protected])([email protected])+ react: 19.2.8+ optionalDependencies:+ '@types/react': 19.2.18+dependencies:react: 19.2.8@@ -8950,12 +12476,24 @@ snapshots:optionalDependencies:'@types/react': 19.2.18+ dependencies:+ react: 19.2.8+ optionalDependencies:+ '@types/react': 19.2.18+dependencies:react: 19.2.8optionalDependencies:'@types/react': 19.2.18+ dependencies:+ react: 19.2.8+ optionalDependencies:+ '@types/react': 19.2.18+dependencies:'@swc/helpers': 0.5.23@@ -8988,6 +12526,155 @@ snapshots:react-dom: 19.2.8([email protected])react-stately: 3.49.0([email protected])+ '@react-native-async-storage/[email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))':+ dependencies:+ merge-options: 3.0.4+ react-native: 0.86.3(@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])++ '@react-native-masked-view/[email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])':+ dependencies:+ react: 19.2.8+ react-native: 0.86.3(@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])++ '@react-native/[email protected]': {}++ '@react-native/[email protected](@babel/[email protected])':+ dependencies:+ '@babel/traverse': 7.29.8+ '@react-native/codegen': 0.86.3(@babel/[email protected])+ transitivePeerDependencies:+ - '@babel/core'+ - supports-color++ '@react-native/[email protected](@babel/[email protected])':+ dependencies:+ '@babel/core': 7.29.7+ '@babel/plugin-proposal-export-default-from': 7.29.7(@babel/[email protected])+ '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/[email protected])+ '@babel/plugin-syntax-export-default-from': 7.29.7(@babel/[email protected])+ '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/[email protected])+ '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/[email protected])+ '@babel/plugin-transform-async-generator-functions': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-async-to-generator': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-block-scoping': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-class-properties': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-classes': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-destructuring': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-flow-strip-types': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-for-of': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-modules-commonjs': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-named-capturing-groups-regex': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-nullish-coalescing-operator': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-optional-catch-binding': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-optional-chaining': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-private-methods': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-private-property-in-object': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-react-display-name': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-react-jsx': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-react-jsx-self': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-react-jsx-source': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-regenerator': 7.29.8(@babel/[email protected])+ '@babel/plugin-transform-runtime': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-typescript': 7.29.9(@babel/[email protected])+ '@babel/plugin-transform-unicode-regex': 7.29.7(@babel/[email protected])+ '@react-native/babel-plugin-codegen': 0.86.3(@babel/[email protected])+ babel-plugin-syntax-hermes-parser: 0.36.0+ babel-plugin-transform-flow-enums: 0.0.2(@babel/[email protected])+ react-refresh: 0.14.2+ transitivePeerDependencies:+ - supports-color++ '@react-native/[email protected](@babel/[email protected])':+ dependencies:+ '@babel/core': 7.29.7+ '@babel/parser': 7.29.8+ hermes-parser: 0.36.0+ invariant: 2.2.4+ nullthrows: 1.1.1+ tinyglobby: 0.2.17+ yargs: 17.7.3++ dependencies:+ '@react-native/dev-middleware': 0.86.3+ debug: 4.4.3+ invariant: 2.2.4+ metro: 0.84.6+ metro-config: 0.84.6+ metro-core: 0.84.6+ semver: 7.8.5+ optionalDependencies:+ '@react-native/metro-config': 0.86.3(@babel/[email protected])+ transitivePeerDependencies:+ - bufferutil+ - supports-color+ - utf-8-validate++ '@react-native/[email protected]': {}++ '@react-native/[email protected]':+ dependencies:+ cross-spawn: 7.0.6+ debug: 4.4.3+ fb-dotslash: 0.5.8+ transitivePeerDependencies:+ - supports-color++ '@react-native/[email protected]':+ dependencies:+ '@isaacs/ttlcache': 1.4.1+ '@react-native/debugger-frontend': 0.86.3+ '@react-native/debugger-shell': 0.86.3+ chrome-launcher: 0.15.2+ chromium-edge-launcher: 0.3.0+ connect: 3.7.0+ debug: 4.4.3+ invariant: 2.2.4+ nullthrows: 1.1.1+ open: 7.4.2+ serve-static: 1.16.3+ ws: 7.5.13+ transitivePeerDependencies:+ - bufferutil+ - supports-color+ - utf-8-validate++ '@react-native/[email protected]': {}++ '@react-native/[email protected]': {}++ '@react-native/[email protected](@babel/[email protected])':+ dependencies:+ '@babel/core': 7.29.7+ '@react-native/babel-preset': 0.86.3(@babel/[email protected])+ hermes-parser: 0.36.0+ nullthrows: 1.1.1+ transitivePeerDependencies:+ - supports-color++ '@react-native/[email protected](@babel/[email protected])':+ dependencies:+ '@react-native/js-polyfills': 0.86.3+ '@react-native/metro-babel-transformer': 0.86.3(@babel/[email protected])+ metro-config: 0.84.6+ metro-runtime: 0.84.6+ transitivePeerDependencies:+ - '@babel/core'+ - bufferutil+ - supports-color+ - utf-8-validate++ '@react-native/[email protected]': {}++ '@react-native/[email protected](@types/[email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])':+ dependencies:+ invariant: 2.2.4+ nullthrows: 1.1.1+ react: 19.2.8+ react-native: 0.86.3(@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])+ optionalDependencies:+ '@types/react': 19.2.18+dependencies:@@ -9266,6 +12953,8 @@ snapshots:'@shikijs/[email protected]': {}+ '@sinclair/[email protected]': {}+'@sinclair/[email protected]': {}'@sindresorhus/[email protected]': {}@@ -9313,42 +13002,88 @@ snapshots:source-map-js: 1.2.1tailwindcss: 4.1.11+ '@tailwindcss/[email protected]':+ dependencies:+ '@jridgewell/remapping': 2.3.5+ enhanced-resolve: 5.24.5+ jiti: 2.7.0+ lightningcss: 1.32.0+ magic-string: 0.30.21+ source-map-js: 1.2.1+ tailwindcss: 4.3.3+'@tailwindcss/[email protected]':optional: true+ '@tailwindcss/[email protected]':+ optional: true+'@tailwindcss/[email protected]':optional: true+ '@tailwindcss/[email protected]':+ optional: true+'@tailwindcss/[email protected]':optional: true+ '@tailwindcss/[email protected]':+ optional: true+'@tailwindcss/[email protected]':optional: true+ '@tailwindcss/[email protected]':+ optional: true+'@tailwindcss/[email protected]':optional: true+ '@tailwindcss/[email protected]':+ optional: true+'@tailwindcss/[email protected]':optional: true+ '@tailwindcss/[email protected]':+ optional: true+'@tailwindcss/[email protected]':optional: true+ '@tailwindcss/[email protected]':+ optional: true+'@tailwindcss/[email protected]':optional: true+ '@tailwindcss/[email protected]':+ optional: true+'@tailwindcss/[email protected]':optional: true+ '@tailwindcss/[email protected]':+ optional: true+'@tailwindcss/[email protected]':optional: true+ '@tailwindcss/[email protected]':+ optional: true+'@tailwindcss/[email protected]':optional: true+ '@tailwindcss/[email protected]':+ optional: true+'@tailwindcss/[email protected]':optional: true+ '@tailwindcss/[email protected]':+ optional: true+'@tailwindcss/[email protected]':dependencies:detect-libc: 2.1.2@@ -9367,6 +13102,21 @@ snapshots:'@tailwindcss/oxide-win32-arm64-msvc': 4.1.11'@tailwindcss/oxide-win32-x64-msvc': 4.1.11+ '@tailwindcss/[email protected]':+ optionalDependencies:+ '@tailwindcss/oxide-android-arm64': 4.3.3+ '@tailwindcss/oxide-darwin-arm64': 4.3.3+ '@tailwindcss/oxide-darwin-x64': 4.3.3+ '@tailwindcss/oxide-freebsd-x64': 4.3.3+ '@tailwindcss/oxide-linux-arm-gnueabihf': 4.3.3+ '@tailwindcss/oxide-linux-arm64-gnu': 4.3.3+ '@tailwindcss/oxide-linux-arm64-musl': 4.3.3+ '@tailwindcss/oxide-linux-x64-gnu': 4.3.3+ '@tailwindcss/oxide-linux-x64-musl': 4.3.3+ '@tailwindcss/oxide-wasm32-wasi': 4.3.3+ '@tailwindcss/oxide-win32-arm64-msvc': 4.3.3+ '@tailwindcss/oxide-win32-x64-msvc': 4.3.3+'@tailwindcss/[email protected]':dependencies:'@alloc/quick-lru': 5.2.0@@ -9375,12 +13125,12 @@ snapshots:postcss: 8.5.26tailwindcss: 4.1.11- '@tailwindcss/[email protected]([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected]))':+ '@tailwindcss/[email protected]([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))':dependencies:'@tailwindcss/node': 4.1.11'@tailwindcss/oxide': 4.1.11tailwindcss: 4.1.11- vite: 7.3.6(@types/[email protected])([email protected])([email protected])([email protected])([email protected])+ vite: 7.3.6(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])'@tanstack/[email protected]': {}@@ -9512,10 +13262,14 @@ snapshots:'@types/[email protected]': {}+ '@types/[email protected]': {}+'@types/[email protected]': {}'@types/[email protected]': {}+ '@types/[email protected]': {}+'@types/[email protected]':dependencies:'@types/unist': 3.0.3@@ -9566,6 +13320,10 @@ snapshots:dependencies:'@types/react': 19.2.18+ '@types/[email protected]':+ dependencies:+ '@types/react': 19.2.18+'@types/[email protected]':dependencies:csstype: 3.2.3@@ -9695,7 +13453,7 @@ snapshots:'@ungap/[email protected]': {}- '@vitejs/[email protected]([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected]))':+ '@vitejs/[email protected]([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))':dependencies:'@babel/core': 7.29.7'@babel/plugin-transform-react-jsx-self': 7.29.7(@babel/[email protected])@@ -9703,7 +13461,7 @@ snapshots:'@rolldown/pluginutils': 1.0.0-beta.27'@types/babel__core': 7.20.5react-refresh: 0.17.0- vite: 7.3.6(@types/[email protected])([email protected])([email protected])([email protected])([email protected])+ vite: 7.3.6(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])transitivePeerDependencies:- supports-color@@ -9719,7 +13477,7 @@ snapshots:obug: 2.1.4std-env: 4.2.0tinyrainbow: 3.1.1- vitest: 4.1.11(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected]))+ vitest: 4.1.11(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))'@vitest/[email protected](@typescript-eslint/[email protected](@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected]([email protected]))([email protected]))([email protected]([email protected]))([email protected])([email protected])':dependencies:@@ -9729,7 +13487,7 @@ snapshots:optionalDependencies:'@typescript-eslint/eslint-plugin': 8.67.0(@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected]([email protected]))([email protected])typescript: 5.8.3- vitest: 4.1.11(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected]))+ vitest: 4.1.11(@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))transitivePeerDependencies:- supports-color@@ -9742,13 +13500,13 @@ snapshots:chai: 6.2.2tinyrainbow: 3.1.1- '@vitest/[email protected]([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected]))':+ '@vitest/[email protected]([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))':dependencies:'@vitest/spy': 4.1.11estree-walker: 3.0.3magic-string: 0.30.21optionalDependencies:- vite: 7.3.6(@types/[email protected])([email protected])([email protected])([email protected])([email protected])+ vite: 7.3.6(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])'@vitest/[email protected]':dependencies:@@ -9935,12 +13693,26 @@ snapshots:- react-native-b4a- supports-color+ '@xmldom/[email protected]': {}++ '@xmldom/[email protected]': {}+'@zip.js/[email protected]': {}dependencies:event-target-shim: 5.0.1+ dependencies:+ mime-types: 2.1.35+ negotiator: 0.6.3++ dependencies:+ mime-types: 3.0.2+ negotiator: 1.1.0+dependencies:acorn: 8.18.0@@ -9949,6 +13721,8 @@ snapshots:+ [email protected]: {}+dependencies:fast-deep-equal: 3.1.3@@ -9963,12 +13737,24 @@ snapshots:json-schema-traverse: 1.0.0require-from-string: 2.0.2+ [email protected]: {}++ dependencies:+ type-fest: 0.21.3++ [email protected]: {}++ dependencies:+ color-convert: 1.9.3+dependencies:color-convert: 2.0.1@@ -10010,6 +13796,8 @@ snapshots:+ [email protected]: {}+@@ -10024,6 +13812,8 @@ snapshots:+ [email protected]: {}+dependencies:safer-buffer: 2.1.2@@ -10049,14 +13839,114 @@ snapshots:- dependencies:- '@babel/types': 7.29.8+ [email protected](@babel/[email protected]):+ dependencies:+ '@babel/compat-data': 7.29.7+ '@babel/core': 7.29.7+ '@babel/helper-define-polyfill-provider': 0.6.8(@babel/[email protected])+ semver: 6.3.1+ transitivePeerDependencies:+ - supports-color++ [email protected](@babel/[email protected]):+ dependencies:+ '@babel/core': 7.29.7+ '@babel/helper-define-polyfill-provider': 0.6.8(@babel/[email protected])+ core-js-compat: 3.50.0+ transitivePeerDependencies:+ - supports-color++ [email protected](@babel/[email protected]):+ dependencies:+ '@babel/core': 7.29.7+ '@babel/helper-define-polyfill-provider': 0.6.8(@babel/[email protected])+ transitivePeerDependencies:+ - supports-color++ dependencies:+ '@babel/types': 7.29.8++ [email protected]: {}++ dependencies:+ hermes-parser: 0.36.0++ dependencies:+ hermes-parser: 0.36.1++ [email protected](@babel/[email protected]):+ dependencies:+ '@babel/plugin-syntax-flow': 7.29.7(@babel/[email protected])+ transitivePeerDependencies:+ - '@babel/core'++ [email protected](@babel/[email protected])(@babel/[email protected])([email protected])([email protected]):+ dependencies:+ '@babel/generator': 7.29.8+ '@babel/helper-module-imports': 7.29.7+ '@babel/plugin-proposal-decorators': 7.29.7(@babel/[email protected])+ '@babel/plugin-proposal-export-default-from': 7.29.7(@babel/[email protected])+ '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/[email protected])+ '@babel/plugin-syntax-export-default-from': 7.29.7(@babel/[email protected])+ '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/[email protected])+ '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/[email protected])+ '@babel/plugin-transform-async-generator-functions': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-async-to-generator': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-block-scoping': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-class-properties': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-class-static-block': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-classes': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-destructuring': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-export-namespace-from': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-flow-strip-types': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-for-of': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-logical-assignment-operators': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-modules-commonjs': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-named-capturing-groups-regex': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-nullish-coalescing-operator': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-object-rest-spread': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-optional-catch-binding': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-optional-chaining': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-parameters': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-private-methods': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-private-property-in-object': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-react-display-name': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-react-jsx': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-react-jsx-development': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-react-pure-annotations': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-runtime': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-typescript': 7.29.9(@babel/[email protected])+ '@babel/plugin-transform-unicode-regex': 7.29.7(@babel/[email protected])+ '@babel/preset-typescript': 7.29.7(@babel/[email protected])+ '@react-native/babel-plugin-codegen': 0.86.3(@babel/[email protected])+ babel-plugin-react-compiler: 1.0.0+ babel-plugin-react-native-web: 0.21.3+ babel-plugin-syntax-hermes-parser: 0.36.1+ babel-plugin-transform-flow-enums: 0.0.2(@babel/[email protected])+ debug: 4.4.3+ react-refresh: 0.14.2+ optionalDependencies:+ '@babel/runtime': 7.29.7+ expo: 57.0.26(@babel/[email protected])(@expo/[email protected])(@expo/[email protected])([email protected])([email protected]([email protected]))([email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])([email protected])+ transitivePeerDependencies:+ - '@babel/core'+ - supports-color++ [email protected]: {}+ [email protected](@types/[email protected]):+ dependencies:+ zxing-wasm: 3.1.3(@types/[email protected])+ transitivePeerDependencies:+ - '@types/emscripten'+@@ -10096,6 +13986,8 @@ snapshots:dependencies:tweetnacl: 0.14.5+ [email protected]: {}+@@ -10106,6 +13998,18 @@ snapshots:+ dependencies:+ stream-buffers: 2.2.0++ dependencies:+ big-integer: 1.6.52++ dependencies:+ big-integer: 1.6.52+dependencies:balanced-match: 1.0.2@@ -10126,10 +14030,16 @@ snapshots:node-releases: 2.0.53update-browserslist-db: 1.3.1([email protected])+ dependencies:+ node-int64: 0.4.0++ [email protected]: {}+dependencies:base64-js: 1.5.1@@ -10140,7 +14050,7 @@ snapshots:- [email protected](patch_hash=362685edd02f1561e78b740e2b4c1ec2bd8e266eb2e26a64055ae305cac1c3ac):+ [email protected](patch_hash=ea42dd1273f65a02e22aa9c25e39361c8dac2320ed2fbff9c58d2bd3f46a40a3):dependencies:args-tokenizer: 0.3.0cac: 7.0.0@@ -10194,12 +14104,20 @@ snapshots:+ [email protected]: {}++ dependencies:+ ansi-styles: 3.2.1+ escape-string-regexp: 1.0.5+ supports-color: 5.5.0+dependencies:ansi-styles: 4.3.0@@ -10291,6 +14209,29 @@ snapshots:+ dependencies:+ '@types/node': 22.20.1+ escape-string-regexp: 4.0.0+ is-wsl: 2.2.0+ lighthouse-logger: 1.4.2+ transitivePeerDependencies:+ - supports-color++ dependencies:+ '@types/node': 22.20.1+ escape-string-regexp: 4.0.0+ is-wsl: 2.2.0+ lighthouse-logger: 1.4.2+ mkdirp: 1.0.4+ transitivePeerDependencies:+ - supports-color++ [email protected]: {}++ [email protected]: {}+@@ -10299,6 +14240,12 @@ snapshots:+ dependencies:+ restore-cursor: 2.0.0++ [email protected]: {}+@@ -10313,21 +14260,42 @@ snapshots:strip-ansi: 6.0.1wrap-ansi: 7.0.0- optional: true+ [email protected]: {}+ dependencies:+ color-name: 1.1.3+dependencies:color-name: 1.1.4+ [email protected]: {}++ dependencies:+ color-name: 1.1.4+ simple-swizzle: 0.2.4++ dependencies:+ color-convert: 2.0.1+ color-string: 1.9.1++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}+@@ -10367,6 +14335,15 @@ snapshots:+ dependencies:+ debug: 2.6.9+ finalhandler: 1.1.2+ parseurl: 1.3.3+ utils-merge: 1.0.1+ transitivePeerDependencies:+ - supports-color+@@ -10431,6 +14408,11 @@ snapshots:+ dependencies:+ mdn-data: 2.0.14+ source-map: 0.6.1+@@ -10446,6 +14428,8 @@ snapshots:+ [email protected]: {}+@@ -10459,6 +14443,10 @@ snapshots:dependencies:ms: 2.0.0+ dependencies:+ ms: 2.1.3+dependencies:ms: 2.1.3@@ -10473,12 +14461,16 @@ snapshots:dependencies:character-entities: 2.0.2+ [email protected]: {}++ [email protected]: {}+@@ -10489,7 +14481,6 @@ snapshots:dependencies:clone: 1.0.4- optional: true@@ -10501,6 +14492,8 @@ snapshots:escodegen: 2.1.0esprima: 4.0.1+ [email protected]: {}+@@ -10511,6 +14504,8 @@ snapshots:+ [email protected]: {}+dependencies:dequal: 2.0.3@@ -10523,6 +14518,8 @@ snapshots:+ [email protected]: {}+@@ -10618,6 +14615,8 @@ snapshots:transitivePeerDependencies:- supports-color+ [email protected]: {}+@@ -10626,6 +14625,10 @@ snapshots:+ [email protected]: {}++ [email protected]: {}+dependencies:iconv-lite: 0.6.3@@ -10646,6 +14649,12 @@ snapshots:+ dependencies:+ stackframe: 1.3.4++ [email protected]: {}+@@ -10679,6 +14688,10 @@ snapshots:+ [email protected]: {}++ [email protected]: {}+@@ -11077,6 +15090,8 @@ snapshots:+ [email protected]: {}+@@ -11108,6 +15123,308 @@ snapshots:jest-mock: 30.5.1jest-util: 30.5.1+ dependencies:+ expo: 57.0.26(@babel/[email protected])(@expo/[email protected])(@expo/[email protected])([email protected])([email protected]([email protected]))([email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])([email protected])++ [email protected]([email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])([email protected]):+ dependencies:+ '@expo/image-utils': 0.11.5([email protected])+ expo: 57.0.26(@babel/[email protected])(@expo/[email protected])(@expo/[email protected])([email protected])([email protected]([email protected]))([email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])([email protected])+ expo-constants: 57.0.20([email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))+ react: 19.2.8+ react-native: 0.86.3(@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])+ transitivePeerDependencies:+ - supports-color+ - typescript++ [email protected]([email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]):+ dependencies:+ expo: 57.0.26(@babel/[email protected])(@expo/[email protected])(@expo/[email protected])([email protected])([email protected]([email protected]))([email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])([email protected])+ react: 19.2.8+ react-native: 0.86.3(@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])++ dependencies:+ '@expo/schema-utils': 57.0.2+ expo: 57.0.26(@babel/[email protected])(@expo/[email protected])(@expo/[email protected])([email protected])([email protected]([email protected]))([email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])([email protected])+ resolve-from: 5.0.0+ semver: 7.8.5++ [email protected](@types/[email protected])([email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]):+ dependencies:+ barcode-detector: 3.2.2(@types/[email protected])+ expo: 57.0.26(@babel/[email protected])(@expo/[email protected])(@expo/[email protected])([email protected])([email protected]([email protected]))([email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])([email protected])+ react: 19.2.8+ react-native: 0.86.3(@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])+ transitivePeerDependencies:+ - '@types/emscripten'++ [email protected]([email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])):+ dependencies:+ '@expo/env': 2.4.3+ expo: 57.0.26(@babel/[email protected])(@expo/[email protected])(@expo/[email protected])([email protected])([email protected]([email protected]))([email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])([email protected])+ react-native: 0.86.3(@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])+ transitivePeerDependencies:+ - supports-color++ dependencies:+ expo: 57.0.26(@babel/[email protected])(@expo/[email protected])(@expo/[email protected])([email protected])([email protected]([email protected]))([email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])([email protected])++ [email protected]([email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])):+ dependencies:+ expo: 57.0.26(@babel/[email protected])(@expo/[email protected])(@expo/[email protected])([email protected])([email protected]([email protected]))([email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])([email protected])+ expo-dev-launcher: 57.0.20([email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))+ expo-dev-menu: 57.0.18([email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))+ expo-dev-menu-interface: 57.0.0([email protected])+ expo-manifests: 57.0.2([email protected])+ expo-updates-interface: 57.0.2([email protected])+ transitivePeerDependencies:+ - react-native++ [email protected]([email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])):+ dependencies:+ '@expo/schema-utils': 57.0.2+ expo: 57.0.26(@babel/[email protected])(@expo/[email protected])(@expo/[email protected])([email protected])([email protected]([email protected]))([email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])([email protected])+ expo-dev-menu: 57.0.18([email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))+ expo-manifests: 57.0.2([email protected])+ react-native: 0.86.3(@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])++ dependencies:+ expo: 57.0.26(@babel/[email protected])(@expo/[email protected])(@expo/[email protected])([email protected])([email protected]([email protected]))([email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])([email protected])++ [email protected]([email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])):+ dependencies:+ expo: 57.0.26(@babel/[email protected])(@expo/[email protected])(@expo/[email protected])([email protected])([email protected]([email protected]))([email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])([email protected])+ expo-dev-menu-interface: 57.0.0([email protected])+ react-native: 0.86.3(@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])++ [email protected]([email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])):+ dependencies:+ expo: 57.0.26(@babel/[email protected])(@expo/[email protected])(@expo/[email protected])([email protected])([email protected]([email protected]))([email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])([email protected])+ react-native: 0.86.3(@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])++ [email protected]([email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]):+ dependencies:+ expo: 57.0.26(@babel/[email protected])(@expo/[email protected])(@expo/[email protected])([email protected])([email protected]([email protected]))([email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])([email protected])+ fontfaceobserver: 2.3.0+ react: 19.2.8+ react-native: 0.86.3(@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])++ [email protected]([email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]):+ dependencies:+ expo: 57.0.26(@babel/[email protected])(@expo/[email protected])(@expo/[email protected])([email protected])([email protected]([email protected]))([email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])([email protected])+ react: 19.2.8+ react-native: 0.86.3(@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])++ [email protected]: {}++ dependencies:+ expo: 57.0.26(@babel/[email protected])(@expo/[email protected])(@expo/[email protected])([email protected])([email protected]([email protected]))([email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])([email protected])+ react: 19.2.8++ [email protected]([email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]):+ dependencies:+ expo-constants: 57.0.20([email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))+ invariant: 2.2.4+ react: 19.2.8+ react-native: 0.86.3(@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])+ transitivePeerDependencies:+ - expo+ - supports-color++ dependencies:+ expo: 57.0.26(@babel/[email protected])(@expo/[email protected])(@expo/[email protected])([email protected])([email protected]([email protected]))([email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])([email protected])+ react: 19.2.8+ rtl-detect: 1.1.2++ dependencies:+ expo: 57.0.26(@babel/[email protected])(@expo/[email protected])(@expo/[email protected])([email protected])([email protected]([email protected]))([email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])([email protected])+ expo-json-utils: 57.0.2++ dependencies:+ '@expo/require-utils': 57.0.5([email protected])+ '@expo/spawn-async': 1.8.0+ chalk: 4.1.2+ commander: 7.2.0+ transitivePeerDependencies:+ - supports-color+ - typescript++ [email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]):+ dependencies:+ '@expo/expo-modules-macros-plugin': 0.6.1+ expo-modules-jsi: 57.1.1([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))+ invariant: 2.2.4+ react: 19.2.8+ react-native: 0.86.3(@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])+ optionalDependencies:+ react-native-worklets: 0.10.1(@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])++ [email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])):+ dependencies:+ react-native: 0.86.3(@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])++ dependencies:+ expo: 57.0.26(@babel/[email protected])(@expo/[email protected])(@expo/[email protected])([email protected])([email protected]([email protected]))([email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])([email protected])+ react: 19.2.8++ [email protected]([email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])([email protected]):+ dependencies:+ '@expo/image-utils': 0.11.5([email protected])+ abort-controller: 3.0.0+ badgin: 1.2.3+ expo: 57.0.26(@babel/[email protected])(@expo/[email protected])(@expo/[email protected])([email protected])([email protected]([email protected]))([email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])([email protected])+ expo-application: 57.0.3([email protected])+ expo-constants: 57.0.20([email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))+ react: 19.2.8+ react-native: 0.86.3(@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])+ transitivePeerDependencies:+ - supports-color+ - typescript++ [email protected](d7b84b55689872de76f06bc38ecca4aa):+ dependencies:+ '@expo/log-box': 57.0.4(@expo/[email protected])([email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])+ '@expo/metro-runtime': 57.0.16(@expo/[email protected])([email protected])([email protected]([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])+ '@expo/schema-utils': 57.0.2+ '@expo/ui': 57.0.21(@babel/[email protected])(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected])([email protected]([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])+ '@radix-ui/react-slot': 1.3.3(@types/[email protected])([email protected])+ '@radix-ui/react-tabs': 1.1.21(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@react-native-masked-view/masked-view': 0.3.2([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])+ client-only: 0.0.1+ color: 4.2.3+ debug: 4.4.3+ escape-string-regexp: 4.0.0+ expo: 57.0.26(@babel/[email protected])(@expo/[email protected])(@expo/[email protected])([email protected])([email protected]([email protected]))([email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])([email protected])+ expo-constants: 57.0.20([email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))+ expo-glass-effect: 57.0.4([email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])+ expo-linking: 57.0.11([email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])+ expo-server: 57.0.3+ expo-symbols: 57.0.3([email protected])([email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])+ fast-deep-equal: 3.1.3+ invariant: 2.2.4+ nanoid: 3.3.18+ query-string: 7.1.3+ react: 19.2.8+ react-fast-compare: 3.2.2+ react-is: 19.3.0+ react-native: 0.86.3(@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])+ react-native-drawer-layout: 4.2.11([email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])+ react-native-safe-area-context: 5.7.0([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])+ react-native-screens: 4.26.2([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])+ server-only: 0.0.1+ sf-symbols-typescript: 2.2.0+ shallowequal: 1.1.0+ standard-navigation: 0.0.5+ vaul: 1.1.2(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ optionalDependencies:+ react-dom: 19.2.8([email protected])+ react-native-gesture-handler: 2.32.0([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])+ react-native-reanimated: 4.5.1([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])+ transitivePeerDependencies:+ - '@babel/core'+ - '@types/react'+ - '@types/react-dom'+ - expo-font+ - react-native-worklets+ - supports-color++ dependencies:+ expo: 57.0.26(@babel/[email protected])(@expo/[email protected])(@expo/[email protected])([email protected])([email protected]([email protected]))([email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])([email protected])++ [email protected]: {}++ dependencies:+ '@expo/config-plugins': 57.0.9([email protected])+ '@expo/image-utils': 0.11.5([email protected])+ expo: 57.0.26(@babel/[email protected])(@expo/[email protected])(@expo/[email protected])([email protected])([email protected]([email protected]))([email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])([email protected])+ xml2js: 0.6.0+ transitivePeerDependencies:+ - supports-color+ - typescript++ [email protected]([email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]):+ dependencies:+ expo: 57.0.26(@babel/[email protected])(@expo/[email protected])(@expo/[email protected])([email protected])([email protected]([email protected]))([email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])([email protected])+ react: 19.2.8+ react-native: 0.86.3(@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])++ [email protected]([email protected])([email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]):+ dependencies:+ '@expo-google-fonts/material-symbols': 0.4.48+ expo: 57.0.26(@babel/[email protected])(@expo/[email protected])(@expo/[email protected])([email protected])([email protected]([email protected]))([email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])([email protected])+ expo-font: 57.0.4([email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])+ react: 19.2.8+ react-native: 0.86.3(@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])+ sf-symbols-typescript: 2.2.0++ [email protected]([email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])):+ dependencies:+ '@react-native/normalize-colors': 0.86.3+ debug: 4.4.3+ expo: 57.0.26(@babel/[email protected])(@expo/[email protected])(@expo/[email protected])([email protected])([email protected]([email protected]))([email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])([email protected])+ react-native: 0.86.3(@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])+ transitivePeerDependencies:+ - supports-color++ dependencies:+ expo: 57.0.26(@babel/[email protected])(@expo/[email protected])(@expo/[email protected])([email protected])([email protected]([email protected]))([email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])([email protected])++ [email protected](@babel/[email protected])(@expo/[email protected])(@expo/[email protected])([email protected])([email protected]([email protected]))([email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])([email protected]):+ dependencies:+ '@babel/runtime': 7.29.7+ '@expo/cli': 57.0.27(@expo/[email protected])(@expo/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])([email protected])+ '@expo/config': 57.0.9([email protected])+ '@expo/config-plugins': 57.0.9([email protected])+ '@expo/devtools': 57.0.1([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])+ '@expo/fingerprint': 0.20.13+ '@expo/local-build-cache-provider': 57.0.8([email protected])+ '@expo/log-box': 57.0.4(@expo/[email protected])([email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])+ '@expo/metro': 56.0.2+ '@expo/metro-config': 57.0.12([email protected])([email protected])+ '@ungap/structured-clone': 1.4.0+ babel-preset-expo: 57.0.13(@babel/[email protected])(@babel/[email protected])([email protected])([email protected])+ expo-asset: 57.0.18([email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])([email protected])+ expo-constants: 57.0.20([email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))+ expo-file-system: 57.0.7([email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))+ expo-font: 57.0.4([email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])+ expo-keep-awake: 57.0.2([email protected])([email protected])+ expo-modules-autolinking: 57.0.13([email protected])+ expo-modules-core: 57.0.20([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])+ pretty-format: 29.7.0+ react: 19.2.8+ react-native: 0.86.3(@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])+ react-refresh: 0.14.2+ whatwg-url-minimum: 0.1.2+ optionalDependencies:+ '@expo/dom-webview': 57.0.1([email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])+ '@expo/metro-runtime': 57.0.16(@expo/[email protected])([email protected])([email protected]([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])+ react-dom: 19.2.8([email protected])+ react-native-webview: 13.16.1([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])+ transitivePeerDependencies:+ - '@babel/core'+ - bufferutil+ - expo-router+ - expo-widgets+ - react-native-worklets+ - react-server-dom-webpack+ - supports-color+ - typescript+ - utf-8-validate++ [email protected]: {}+@@ -11146,6 +15463,12 @@ snapshots:dependencies:format: 0.2.2+ [email protected]: {}++ dependencies:+ bser: 2.1.1+dependencies:pend: 1.2.0@@ -11154,6 +15477,8 @@ snapshots:optionalDependencies:picomatch: 4.0.5+ [email protected]: {}+dependencies:flat-cache: 4.0.1@@ -11162,6 +15487,20 @@ snapshots:dependencies:to-regex-range: 5.0.1+ [email protected]: {}++ dependencies:+ debug: 2.6.9+ encodeurl: 1.0.2+ escape-html: 1.0.3+ on-finished: 2.3.0+ parseurl: 1.3.3+ statuses: 1.5.0+ unpipe: 1.0.0+ transitivePeerDependencies:+ - supports-color+@@ -11181,6 +15520,10 @@ snapshots:+ [email protected]: {}++ [email protected]: {}+dependencies:cross-spawn: 7.0.6@@ -11188,6 +15531,8 @@ snapshots:+ [email protected]: {}+dependencies:graceful-fs: 4.2.11@@ -11201,6 +15546,8 @@ snapshots:optional: true+ [email protected]: {}+@@ -11218,6 +15565,8 @@ snapshots:+ [email protected]: {}+@@ -11236,6 +15585,8 @@ snapshots:transitivePeerDependencies:- supports-color+ [email protected]: {}+dependencies:citty: 0.1.6@@ -11267,6 +15618,12 @@ snapshots:package-json-from-dist: 1.0.1path-scurry: 1.11.1+ dependencies:+ minimatch: 10.2.6+ minipass: 7.1.3+ path-scurry: 2.0.2+@@ -11294,8 +15651,14 @@ snapshots:rou3: 1.0.0srvx: 1.0.5+ [email protected]: {}++ dependencies:+ function-bind: 1.1.2+dependencies:'@types/hast': 3.0.5@@ -11314,10 +15677,53 @@ snapshots:dependencies:'@types/hast': 3.0.5+ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ dependencies:+ hermes-estree: 0.35.0++ dependencies:+ hermes-estree: 0.36.0++ dependencies:+ hermes-estree: 0.36.1++ [email protected](d3013b269d8332046d015128c9192891):+ dependencies:+ react: 19.2.8+ react-native: 0.86.3(@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])+ react-native-gesture-handler: 2.32.0([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])+ react-native-reanimated: 4.5.1([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])+ react-native-safe-area-context: 5.7.0([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])+ react-native-svg: 15.15.4([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])+ react-native-worklets: 0.10.1(@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])+ tailwind-merge: 3.7.0+ tailwind-variants: 3.3.1([email protected])([email protected])+ optionalDependencies:+ expo-blur: 57.0.3([email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])+ react-native-screens: 4.26.2([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])++ dependencies:+ react-is: 16.13.1++ dependencies:+ lru-cache: 10.4.3+dependencies:whatwg-encoding: 3.1.1@@ -11339,6 +15745,14 @@ snapshots:domutils: 3.2.2entities: 7.0.1+ dependencies:+ depd: 2.0.0+ inherits: 2.0.4+ setprototypeof: 1.2.0+ statuses: 2.0.2+ toidentifier: 1.0.1+dependencies:agent-base: 7.1.4@@ -11399,10 +15813,16 @@ snapshots:'@formatjs/icu-messageformat-parser': 2.11.4tslib: 2.8.1+ dependencies:+ loose-envify: 1.4.0++ [email protected]: {}+dependencies:binary-extensions: 2.3.0@@ -11411,6 +15831,12 @@ snapshots:dependencies:builtin-modules: 5.3.0+ dependencies:+ hasown: 2.0.4++ [email protected]: {}+@@ -11432,12 +15858,18 @@ snapshots:+ [email protected]: {}++ dependencies:+ is-docker: 2.2.1+dependencies:is-inside-container: 1.0.0@@ -11474,6 +15906,8 @@ snapshots:chalk: 4.1.2pretty-format: 30.5.1+ [email protected]: {}+dependencies:'@jest/get-type': 30.5.0@@ -11503,6 +15937,15 @@ snapshots:+ dependencies:+ '@jest/types': 29.6.3+ '@types/node': 22.20.1+ chalk: 4.1.2+ ci-info: 3.9.0+ graceful-fs: 4.2.11+ picomatch: 2.3.2+dependencies:'@jest/types': 30.5.1@@ -11512,6 +15955,24 @@ snapshots:graceful-fs: 4.2.11picomatch: 4.0.5+ dependencies:+ '@jest/types': 29.6.3+ camelcase: 6.3.0+ chalk: 4.1.2+ jest-get-type: 29.6.3+ leven: 3.1.0+ pretty-format: 29.7.0++ dependencies:+ '@types/node': 22.20.1+ jest-util: 29.7.0+ merge-stream: 2.0.0+ supports-color: 8.1.1++ [email protected]: {}+@@ -11524,6 +15985,8 @@ snapshots:dependencies:argparse: 2.0.1+ [email protected]: {}+@@ -11602,12 +16065,18 @@ snapshots:dependencies:json-buffer: 3.0.1+ [email protected]: {}++ [email protected]: {}+dependencies:readable-stream: 2.3.8+ [email protected]: {}+dependencies:prelude-ls: 1.2.1@@ -11617,36 +16086,76 @@ snapshots:dependencies:immediate: 3.0.6+ dependencies:+ debug: 2.6.9+ marky: 1.3.0+ transitivePeerDependencies:+ - supports-color++ optional: true+optional: true+ optional: true+optional: true+ optional: true+optional: true+ optional: true+optional: true+ optional: true+optional: true+ optional: true+optional: true+ optional: true+optional: true+ optional: true+optional: true+ optional: true+optional: true+ optional: true+optional: true+ optional: true+dependencies:detect-libc: 2.1.2@@ -11662,6 +16171,22 @@ snapshots:lightningcss-win32-arm64-msvc: 1.30.1lightningcss-win32-x64-msvc: 1.30.1+ dependencies:+ detect-libc: 2.1.2+ optionalDependencies:+ lightningcss-android-arm64: 1.32.0+ lightningcss-darwin-arm64: 1.32.0+ lightningcss-darwin-x64: 1.32.0+ lightningcss-freebsd-x64: 1.32.0+ lightningcss-linux-arm-gnueabihf: 1.32.0+ lightningcss-linux-arm64-gnu: 1.32.0+ lightningcss-linux-arm64-musl: 1.32.0+ lightningcss-linux-x64-gnu: 1.32.0+ lightningcss-linux-x64-musl: 1.32.0+ lightningcss-win32-arm64-msvc: 1.32.0+ lightningcss-win32-x64-msvc: 1.32.0+dependencies:mlly: 1.8.2@@ -11686,10 +16211,18 @@ snapshots:+ [email protected]: {}++ [email protected]: {}++ dependencies:+ chalk: 2.4.2+@@ -11714,6 +16247,14 @@ snapshots:+ [email protected](@types/[email protected])([email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]):+ dependencies:+ react: 19.2.8+ react-native: 0.86.3(@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])+ react-native-svg: 15.15.4([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])+ optionalDependencies:+ '@types/react': 19.2.18+@@ -11736,10 +16277,16 @@ snapshots:dependencies:semver: 7.8.5+ dependencies:+ tmpl: 1.0.5++ [email protected]: {}+dependencies:'@types/mdast': 4.0.4@@ -11877,8 +16424,364 @@ snapshots:dependencies:'@types/mdast': 4.0.4+ [email protected]: {}++ [email protected]: {}++ dependencies:+ is-plain-obj: 2.1.0++ [email protected]: {}++ dependencies:+ '@babel/core': 7.29.7+ flow-enums-runtime: 0.0.6+ hermes-parser: 0.35.0+ metro-cache-key: 0.84.5+ nullthrows: 1.1.1+ transitivePeerDependencies:+ - supports-color++ dependencies:+ '@babel/core': 7.29.7+ flow-enums-runtime: 0.0.6+ hermes-parser: 0.35.0+ metro-cache-key: 0.84.6+ nullthrows: 1.1.1+ transitivePeerDependencies:+ - supports-color++ dependencies:+ flow-enums-runtime: 0.0.6++ dependencies:+ flow-enums-runtime: 0.0.6++ dependencies:+ exponential-backoff: 3.1.3+ flow-enums-runtime: 0.0.6+ https-proxy-agent: 7.0.6+ metro-core: 0.84.5+ transitivePeerDependencies:+ - supports-color++ dependencies:+ exponential-backoff: 3.1.3+ flow-enums-runtime: 0.0.6+ https-proxy-agent: 7.0.6+ metro-core: 0.84.6+ transitivePeerDependencies:+ - supports-color++ dependencies:+ connect: 3.7.0+ flow-enums-runtime: 0.0.6+ jest-validate: 29.7.0+ metro: 0.84.5+ metro-cache: 0.84.5+ metro-core: 0.84.5+ metro-runtime: 0.84.5+ yaml: 2.9.0+ transitivePeerDependencies:+ - bufferutil+ - supports-color+ - utf-8-validate++ dependencies:+ connect: 3.7.0+ flow-enums-runtime: 0.0.6+ jest-validate: 29.7.0+ metro: 0.84.6+ metro-cache: 0.84.6+ metro-core: 0.84.6+ metro-runtime: 0.84.6+ yaml: 2.9.0+ transitivePeerDependencies:+ - bufferutil+ - supports-color+ - utf-8-validate++ dependencies:+ flow-enums-runtime: 0.0.6+ lodash.throttle: 4.1.1+ metro-resolver: 0.84.5++ dependencies:+ flow-enums-runtime: 0.0.6+ lodash.throttle: 4.1.1+ metro-resolver: 0.84.6++ dependencies:+ debug: 4.4.3+ fb-watchman: 2.0.2+ flow-enums-runtime: 0.0.6+ graceful-fs: 4.2.11+ invariant: 2.2.4+ jest-worker: 29.7.0+ micromatch: 4.0.8+ nullthrows: 1.1.1+ walker: 1.0.8+ transitivePeerDependencies:+ - supports-color++ dependencies:+ debug: 4.4.3+ fb-watchman: 2.0.2+ flow-enums-runtime: 0.0.6+ graceful-fs: 4.2.11+ invariant: 2.2.4+ jest-worker: 29.7.0+ micromatch: 4.0.8+ nullthrows: 1.1.1+ walker: 1.0.8+ transitivePeerDependencies:+ - supports-color++ dependencies:+ flow-enums-runtime: 0.0.6+ terser: 5.51.2++ dependencies:+ flow-enums-runtime: 0.0.6+ terser: 5.51.2++ dependencies:+ flow-enums-runtime: 0.0.6++ dependencies:+ flow-enums-runtime: 0.0.6++ dependencies:+ '@babel/runtime': 7.29.7+ flow-enums-runtime: 0.0.6++ dependencies:+ '@babel/runtime': 7.29.7+ flow-enums-runtime: 0.0.6++ dependencies:+ '@babel/traverse': 7.29.8+ '@babel/types': 7.29.8+ flow-enums-runtime: 0.0.6+ invariant: 2.2.4+ metro-symbolicate: 0.84.5+ nullthrows: 1.1.1+ ob1: 0.84.5+ source-map: 0.5.7+ vlq: 1.0.1+ transitivePeerDependencies:+ - supports-color++ dependencies:+ '@babel/traverse': 7.29.8+ '@babel/types': 7.29.8+ flow-enums-runtime: 0.0.6+ invariant: 2.2.4+ metro-symbolicate: 0.84.6+ nullthrows: 1.1.1+ ob1: 0.84.6+ source-map: 0.5.7+ vlq: 1.0.1+ transitivePeerDependencies:+ - supports-color++ dependencies:+ flow-enums-runtime: 0.0.6+ invariant: 2.2.4+ metro-source-map: 0.84.5+ nullthrows: 1.1.1+ source-map: 0.5.7+ vlq: 1.0.1+ transitivePeerDependencies:+ - supports-color++ dependencies:+ flow-enums-runtime: 0.0.6+ invariant: 2.2.4+ metro-source-map: 0.84.6+ nullthrows: 1.1.1+ source-map: 0.5.7+ vlq: 1.0.1+ transitivePeerDependencies:+ - supports-color++ dependencies:+ '@babel/core': 7.29.7+ '@babel/generator': 7.29.8+ '@babel/template': 7.29.7+ '@babel/traverse': 7.29.8+ flow-enums-runtime: 0.0.6+ nullthrows: 1.1.1+ transitivePeerDependencies:+ - supports-color++ dependencies:+ '@babel/core': 7.29.7+ '@babel/generator': 7.29.8+ '@babel/template': 7.29.7+ '@babel/traverse': 7.29.8+ flow-enums-runtime: 0.0.6+ nullthrows: 1.1.1+ transitivePeerDependencies:+ - supports-color++ dependencies:+ '@babel/core': 7.29.7+ '@babel/generator': 7.29.8+ '@babel/parser': 7.29.8+ '@babel/types': 7.29.8+ flow-enums-runtime: 0.0.6+ metro: 0.84.5+ metro-babel-transformer: 0.84.5+ metro-cache: 0.84.5+ metro-cache-key: 0.84.5+ metro-minify-terser: 0.84.5+ metro-source-map: 0.84.5+ metro-transform-plugins: 0.84.5+ nullthrows: 1.1.1+ transitivePeerDependencies:+ - bufferutil+ - supports-color+ - utf-8-validate++ dependencies:+ '@babel/core': 7.29.7+ '@babel/generator': 7.29.8+ '@babel/parser': 7.29.8+ '@babel/types': 7.29.8+ flow-enums-runtime: 0.0.6+ metro: 0.84.6+ metro-babel-transformer: 0.84.6+ metro-cache: 0.84.6+ metro-cache-key: 0.84.6+ metro-minify-terser: 0.84.6+ metro-source-map: 0.84.6+ metro-transform-plugins: 0.84.6+ nullthrows: 1.1.1+ transitivePeerDependencies:+ - bufferutil+ - supports-color+ - utf-8-validate++ dependencies:+ '@babel/code-frame': 7.29.7+ '@babel/core': 7.29.7+ '@babel/generator': 7.29.8+ '@babel/parser': 7.29.8+ '@babel/template': 7.29.7+ '@babel/traverse': 7.29.8+ '@babel/types': 7.29.8+ accepts: 2.0.0+ ci-info: 2.0.0+ connect: 3.7.0+ debug: 4.4.3+ error-stack-parser: 2.1.4+ flow-enums-runtime: 0.0.6+ graceful-fs: 4.2.11+ hermes-parser: 0.35.0+ invariant: 2.2.4+ jest-worker: 29.7.0+ jsc-safe-url: 0.2.4+ lodash.throttle: 4.1.1+ metro-babel-transformer: 0.84.5+ metro-cache: 0.84.5+ metro-cache-key: 0.84.5+ metro-config: 0.84.5+ metro-core: 0.84.5+ metro-file-map: 0.84.5+ metro-resolver: 0.84.5+ metro-runtime: 0.84.5+ metro-source-map: 0.84.5+ metro-symbolicate: 0.84.5+ metro-transform-plugins: 0.84.5+ metro-transform-worker: 0.84.5+ mime-types: 3.0.2+ nullthrows: 1.1.1+ serialize-error: 2.1.0+ source-map: 0.5.7+ throat: 5.0.0+ ws: 7.5.13+ yargs: 17.7.3+ transitivePeerDependencies:+ - bufferutil+ - supports-color+ - utf-8-validate++ dependencies:+ '@babel/code-frame': 7.29.7+ '@babel/core': 7.29.7+ '@babel/generator': 7.29.8+ '@babel/parser': 7.29.8+ '@babel/template': 7.29.7+ '@babel/traverse': 7.29.8+ '@babel/types': 7.29.8+ accepts: 2.0.0+ ci-info: 2.0.0+ connect: 3.7.0+ debug: 4.4.3+ error-stack-parser: 2.1.4+ flow-enums-runtime: 0.0.6+ graceful-fs: 4.2.11+ hermes-parser: 0.35.0+ invariant: 2.2.4+ jest-worker: 29.7.0+ jsc-safe-url: 0.2.4+ lodash.throttle: 4.1.1+ metro-babel-transformer: 0.84.6+ metro-cache: 0.84.6+ metro-cache-key: 0.84.6+ metro-config: 0.84.6+ metro-core: 0.84.6+ metro-file-map: 0.84.6+ metro-resolver: 0.84.6+ metro-runtime: 0.84.6+ metro-source-map: 0.84.6+ metro-symbolicate: 0.84.6+ metro-transform-plugins: 0.84.6+ metro-transform-worker: 0.84.6+ mime-types: 3.0.2+ nullthrows: 1.1.1+ serialize-error: 2.1.0+ source-map: 0.5.7+ throat: 5.0.0+ ws: 7.5.13+ yargs: 17.7.3+ transitivePeerDependencies:+ - bufferutil+ - supports-color+ - utf-8-validate+dependencies:decode-named-character-reference: 1.3.0@@ -12087,12 +16990,27 @@ snapshots:transitivePeerDependencies:- supports-color+ dependencies:+ braces: 3.0.3+ picomatch: 2.3.2++ [email protected]: {}++ dependencies:+ mime-db: 1.52.0+dependencies:mime-db: 1.54.0+ [email protected]: {}++ [email protected]: {}+dependencies:brace-expansion: 5.0.9@@ -12143,6 +17061,8 @@ snapshots:+ [email protected]: {}+optional: true@@ -12152,6 +17072,8 @@ snapshots:+ [email protected]: {}+@@ -12216,16 +17138,29 @@ snapshots:+ [email protected]: {}++ [email protected]: {}++ dependencies:+ hosted-git-info: 7.0.2+ proc-log: 4.2.0+ semver: 7.8.5+ validate-npm-package-name: 5.0.1+dependencies:boolbase: 1.0.0+ [email protected]: {}+@@ -12243,6 +17178,14 @@ snapshots:pathe: 2.0.3tinyexec: 1.3.1+ dependencies:+ flow-enums-runtime: 0.0.6++ dependencies:+ flow-enums-runtime: 0.0.6+@@ -12261,12 +17204,24 @@ snapshots:+ dependencies:+ ee-first: 1.1.1++ dependencies:+ ee-first: 1.1.1+dependencies:wrappy: 1.0.2+ dependencies:+ mimic-fn: 1.2.0+@@ -12282,6 +17237,11 @@ snapshots:is-inside-container: 1.0.0wsl-utils: 0.1.0+ dependencies:+ is-docker: 2.2.1+ is-wsl: 2.2.0+@@ -12293,6 +17253,15 @@ snapshots:type-check: 0.4.0word-wrap: 1.2.5+ dependencies:+ chalk: 2.4.2+ cli-cursor: 2.1.0+ cli-spinners: 2.9.2+ log-symbols: 2.2.0+ strip-ansi: 5.2.0+ wcwidth: 1.0.1+optionalDependencies:'@oxc-resolver/binding-android-arm-eabi': 11.24.2@@ -12374,6 +17343,10 @@ snapshots:+ dependencies:+ pngjs: 3.4.0+@@ -12389,6 +17362,8 @@ snapshots:dependencies:entities: 6.0.1+ [email protected]: {}+dependencies:no-case: 3.0.4@@ -12398,11 +17373,18 @@ snapshots:+ [email protected]: {}+dependencies:lru-cache: 10.4.3minipass: 7.1.3+ dependencies:+ lru-cache: 11.5.2+ minipass: 7.1.3+@@ -12437,8 +17419,16 @@ snapshots:dependencies:playwright-core: 1.63.0+ dependencies:+ '@xmldom/xmldom': 0.9.12+ base64-js: 1.5.1+ xmlbuilder: 15.1.1++ [email protected]: {}+@@ -12466,6 +17456,12 @@ snapshots:ansi-styles: 5.2.0react-is: 17.0.2+ dependencies:+ '@jest/schemas': 29.6.3+ ansi-styles: 5.2.0+ react-is: 18.3.1+dependencies:'@jest/react-is-18': [email protected]@@ -12477,12 +17473,23 @@ snapshots:dependencies:parse-ms: 4.0.0+ [email protected]: {}++ dependencies:+ asap: 2.0.6++ dependencies:+ kleur: 3.0.3+ sisteransi: 1.0.5+dependencies:loose-envify: 1.4.0@@ -12534,10 +17541,19 @@ snapshots:+ dependencies:+ decode-uri-component: 0.2.2+ filter-obj: 1.1.0+ split-on-first: 1.1.0+ strict-uri-encode: 2.0.0++ [email protected]: {}+dependencies:defu: 6.1.7@@ -12574,12 +17590,26 @@ snapshots:react-stately: 3.49.0([email protected])use-sync-external-store: 1.6.0([email protected])+ dependencies:+ shell-quote: 1.11.0+ ws: 7.5.13+ transitivePeerDependencies:+ - bufferutil+ - utf-8-validate+dependencies:react: 19.2.8scheduler: 0.27.0- [email protected]([email protected]([email protected]))([email protected]([email protected]))([email protected])([email protected]):+ [email protected]: {}++ dependencies:+ react: 19.2.8++ [email protected]([email protected]([email protected]))([email protected]([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])([email protected]):dependencies:'@babel/runtime': 7.29.7html-parse-stringify: 4.0.1@@ -12588,6 +17618,7 @@ snapshots:use-sync-external-store: 1.6.0([email protected])optionalDependencies:react-dom: 19.2.8([email protected])+ react-native: 0.86.3(@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])typescript: 5.8.3@@ -12602,8 +17633,153 @@ snapshots:+ [email protected]([email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]):+ dependencies:+ color: 4.2.3+ react: 19.2.8+ react-native: 0.86.3(@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])+ react-native-gesture-handler: 2.32.0([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])+ react-native-reanimated: 4.5.1([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])+ use-latest-callback: 0.2.6([email protected])++ [email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]):+ dependencies:+ '@egjs/hammerjs': 2.0.17+ '@types/react-test-renderer': 19.3.0+ hoist-non-react-statics: 3.3.2+ invariant: 2.2.4+ react: 19.2.8+ react-native: 0.86.3(@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])++ [email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]):+ dependencies:+ react: 19.2.8+ react-native: 0.86.3(@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])++ [email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]):+ dependencies:+ react: 19.2.8+ react-native: 0.86.3(@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])+ react-native-is-edge-to-edge: 1.3.1([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])+ react-native-worklets: 0.10.1(@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])+ semver: 7.8.5++ [email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]):+ dependencies:+ react: 19.2.8+ react-native: 0.86.3(@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])++ [email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]):+ dependencies:+ react: 19.2.8+ react-freeze: 1.0.4([email protected])+ react-native: 0.86.3(@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])+ warn-once: 0.1.1++ [email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]):+ dependencies:+ css-select: 5.2.2+ css-tree: 1.1.3+ react: 19.2.8+ react-native: 0.86.3(@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])+ warn-once: 0.1.1++ [email protected]([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]):+ dependencies:+ escape-string-regexp: 4.0.0+ invariant: 2.2.4+ react: 19.2.8+ react-native: 0.86.3(@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])++ [email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected]):+ dependencies:+ '@babel/core': 7.29.7+ '@babel/plugin-transform-arrow-functions': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-class-properties': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-classes': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-nullish-coalescing-operator': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-optional-chaining': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-shorthand-properties': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-template-literals': 7.29.7(@babel/[email protected])+ '@babel/plugin-transform-unicode-regex': 7.29.7(@babel/[email protected])+ '@babel/preset-typescript': 7.29.7(@babel/[email protected])+ '@babel/types': 7.29.8+ '@react-native/metro-config': 0.86.3(@babel/[email protected])+ convert-source-map: 2.0.0+ react: 19.2.8+ react-native: 0.86.3(@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])+ semver: 7.8.5+ transitivePeerDependencies:+ - supports-color++ [email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]):+ dependencies:+ '@react-native/assets-registry': 0.86.3+ '@react-native/codegen': 0.86.3(@babel/[email protected])+ '@react-native/community-cli-plugin': 0.86.3(@react-native/[email protected](@babel/[email protected]))+ '@react-native/gradle-plugin': 0.86.3+ '@react-native/js-polyfills': 0.86.3+ '@react-native/normalize-colors': 0.86.3+ '@react-native/virtualized-lists': 0.86.3(@types/[email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])+ abort-controller: 3.0.0+ anser: 1.4.10+ ansi-regex: 5.0.1+ babel-plugin-syntax-hermes-parser: 0.36.0+ base64-js: 1.5.1+ commander: 12.1.0+ flow-enums-runtime: 0.0.6+ hermes-compiler: 250829098.0.17+ invariant: 2.2.4+ memoize-one: 5.2.1+ metro-runtime: 0.84.6+ metro-source-map: 0.84.6+ nullthrows: 1.1.1+ pretty-format: 29.7.0+ promise: 8.3.0+ react: 19.2.8+ react-devtools-core: 6.1.5+ react-refresh: 0.14.2+ regenerator-runtime: 0.13.11+ scheduler: 0.27.0+ semver: 7.8.5+ stacktrace-parser: 0.1.11+ tinyglobby: 0.2.17+ whatwg-fetch: 3.6.20+ ws: 7.5.13+ yargs: 17.7.3+ optionalDependencies:+ '@types/react': 19.2.18+ transitivePeerDependencies:+ - '@babel/core'+ - '@react-native-community/cli'+ - '@react-native/metro-config'+ - bufferutil+ - supports-color+ - utf-8-validate++ [email protected]: {}++ dependencies:+ react: 19.2.8+ react-style-singleton: 2.2.3(@types/[email protected])([email protected])+ tslib: 2.8.1+ optionalDependencies:+ '@types/react': 19.2.18++ dependencies:+ react: 19.2.8+ react-remove-scroll-bar: 2.3.8(@types/[email protected])([email protected])+ react-style-singleton: 2.2.3(@types/[email protected])([email protected])+ tslib: 2.8.1+ use-callback-ref: 1.3.3(@types/[email protected])([email protected])+ use-sidecar: 1.1.3(@types/[email protected])([email protected])+ optionalDependencies:+ '@types/react': 19.2.18+dependencies:'@internationalized/date': 3.12.3@@ -12614,6 +17790,20 @@ snapshots:react: 19.2.8use-sync-external-store: 1.6.0([email protected])+ dependencies:+ get-nonce: 1.0.1+ react: 19.2.8+ tslib: 2.8.1+ optionalDependencies:+ '@types/react': 19.2.18++ dependencies:+ react: 19.2.8+ react-is: 19.3.0+ scheduler: 0.27.0+dependencies:'@babel/runtime': 7.29.7@@ -12657,6 +17847,14 @@ snapshots:dependencies:'@eslint-community/regexpp': 4.12.2+ dependencies:+ regenerate: 1.4.2++ [email protected]: {}++ [email protected]: {}+dependencies:regex-utilities: 2.3.0@@ -12672,6 +17870,17 @@ snapshots:'@eslint-community/regexpp': 4.12.2refa: 0.12.1+ dependencies:+ regenerate: 1.4.2+ regenerate-unicode-properties: 10.3.0+ regjsgen: 0.8.0+ regjsparser: 0.13.2+ unicode-match-property-ecmascript: 2.0.0+ unicode-match-property-value-ecmascript: 2.2.1++ [email protected]: {}+dependencies:jsesc: 3.1.0@@ -12684,14 +17893,30 @@ snapshots:+ [email protected]: {}++ [email protected]: {}++ dependencies:+ es-errors: 1.3.0+ is-core-module: 2.17.0+ path-parse: 1.0.7+ supports-preserve-symlinks-flag: 1.0.0+dependencies:fast-deep-equal: 2.0.1+ dependencies:+ onetime: 2.0.1+ signal-exit: 3.0.7+@@ -12792,6 +18017,8 @@ snapshots:+ [email protected]: {}+@@ -12810,6 +18037,10 @@ snapshots:+ [email protected]: {}++ [email protected]: {}+dependencies:xmlchars: 2.2.0@@ -12833,20 +18064,59 @@ snapshots:+ dependencies:+ debug: 2.6.9+ depd: 2.0.0+ destroy: 1.2.0+ encodeurl: 2.0.0+ escape-html: 1.0.3+ etag: 1.8.1+ fresh: 0.5.2+ http-errors: 2.0.1+ mime: 1.6.0+ ms: 2.1.3+ on-finished: 2.4.1+ range-parser: 1.2.1+ statuses: 2.0.2+ transitivePeerDependencies:+ - supports-color+dependencies:type-fest: 4.41.0+ [email protected]: {}++ dependencies:+ encodeurl: 2.0.0+ escape-html: 1.0.3+ parseurl: 1.3.3+ send: 0.19.2+ transitivePeerDependencies:+ - supports-color++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}+dependencies:shebang-regex: 3.0.0+ [email protected]: {}+dependencies:'@shikijs/core': 4.3.1@@ -12860,14 +18130,28 @@ snapshots:+ [email protected]: {}++ dependencies:+ bplist-creator: 0.1.0+ bplist-parser: 0.3.1+ plist: 3.1.1++ dependencies:+ is-arrayish: 0.3.4++ [email protected]: {}+@@ -12887,8 +18171,14 @@ snapshots:- optional: true+ dependencies:+ buffer-from: 1.1.2+ source-map: 0.6.1++ [email protected]: {}++ [email protected]: {}@@ -12903,6 +18193,8 @@ snapshots:+ [email protected]: {}+@@ -12921,10 +18213,24 @@ snapshots:+ [email protected]: {}++ dependencies:+ type-fest: 0.7.1++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}+dependencies:events-universal: 1.0.1@@ -12934,6 +18240,8 @@ snapshots:- bare-abort-controller- react-native-b4a+ [email protected]: {}+@@ -12961,6 +18269,10 @@ snapshots:character-entities-html4: 2.1.0character-entities-legacy: 3.0.0+ dependencies:+ ansi-regex: 4.1.1+dependencies:ansi-regex: 5.0.1@@ -12973,31 +18285,64 @@ snapshots:+ [email protected]: {}+dependencies:function-timeout: 1.0.2make-asynchronous: 1.1.0time-span: 5.1.0+ dependencies:+ has-flag: 3.0.0+dependencies:has-flag: 4.0.0+ dependencies:+ has-flag: 4.0.0++ dependencies:+ has-flag: 4.0.0+ supports-color: 7.2.0++ [email protected]: {}+dependencies:'@pkgr/core': 0.3.6+ [email protected]: {}++ [email protected]: {}+optionalDependencies:tailwind-merge: 3.4.0tailwindcss: 4.1.11+ optionalDependencies:+ tailwind-merge: 3.7.0+ tailwindcss: 4.1.11++ optionalDependencies:+ tailwind-merge: 3.7.0+ tailwindcss: 4.3.3++ [email protected]: {}+@@ -13047,12 +18392,26 @@ snapshots:- bare-abort-controller- react-native-b4a+ dependencies:+ ansi-escapes: 4.3.2+ supports-hyperlinks: 2.3.0++ dependencies:+ '@jridgewell/source-map': 0.3.11+ acorn: 8.18.0+ commander: 2.20.3+ source-map-support: 0.5.21+dependencies:b4a: 1.9.0transitivePeerDependencies:- react-native-b4a+ [email protected]: {}+dependencies:convert-hrtime: 5.0.0@@ -13076,6 +18435,8 @@ snapshots:dependencies:tldts-core: 6.1.86+ [email protected]: {}+dependencies:is-number: 7.0.0@@ -13085,10 +18446,14 @@ snapshots:'@sindresorhus/base62': 1.0.0reserved-identifiers: 1.2.0+ [email protected]: {}+dependencies:eslint-visitor-keys: 5.0.1+ [email protected]: {}+dependencies:tldts: 6.1.86@@ -13154,10 +18519,18 @@ snapshots:dependencies:prelude-ls: 1.2.1+ [email protected]: {}++ [email protected]: {}++ dependencies:+ tagged-tag: 1.0.0+@@ -13187,6 +18560,17 @@ snapshots:+ [email protected]: {}++ dependencies:+ unicode-canonical-property-names-ecmascript: 2.0.1+ unicode-property-aliases-ecmascript: 2.2.0++ [email protected]: {}++ [email protected]: {}+dependencies:'@types/unist': 3.0.3@@ -13217,6 +18601,23 @@ snapshots:+ [email protected](@expo/[email protected]([email protected])([email protected]))([email protected])([email protected])([email protected])([email protected](@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected]))([email protected])([email protected]):+ dependencies:+ '@tailwindcss/node': 4.3.3+ '@tailwindcss/oxide': 4.3.3+ culori: 4.0.2+ lightningcss: 1.30.1+ metro: 0.84.6+ metro-cache: 0.84.6+ react: 19.2.8+ react-native: 0.86.3(@babel/[email protected])(@react-native/[email protected](@babel/[email protected]))(@types/[email protected])([email protected])+ tailwindcss: 4.1.11+ optionalDependencies:+ '@expo/metro-config': 57.0.12([email protected])([email protected])+ metro-transform-worker: 0.84.6++ [email protected]: {}+dependencies:rolldown: 1.0.0-rc.17@@ -13248,6 +18649,25 @@ snapshots:+ dependencies:+ react: 19.2.8+ tslib: 2.8.1+ optionalDependencies:+ '@types/react': 19.2.18++ dependencies:+ react: 19.2.8++ dependencies:+ detect-node-es: 1.1.0+ react: 19.2.8+ tslib: 2.8.1+ optionalDependencies:+ '@types/react': 19.2.18+dependencies:react: 19.2.8@@ -13260,6 +18680,12 @@ snapshots:+ [email protected]: {}++ [email protected]: {}++ [email protected]: {}+dependencies:'@hairy/utils': 1.52.0@@ -13291,6 +18717,15 @@ snapshots:+ [email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected]):+ dependencies:+ '@radix-ui/react-dialog': 1.1.23(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ react: 19.2.8+ react-dom: 19.2.8([email protected])+ transitivePeerDependencies:+ - '@types/react'+ - '@types/react-dom'+@@ -13305,7 +18740,7 @@ snapshots:'@types/unist': 3.0.3vfile-message: 4.0.3- [email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected]):+ [email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]):dependencies:esbuild: 0.28.2fdir: 6.5.0([email protected])@@ -13317,14 +18752,15 @@ snapshots:'@types/node': 22.20.1fsevents: 2.3.3jiti: 2.7.0- lightningcss: 1.30.1+ lightningcss: 1.32.0+ terser: 5.51.2tsx: 4.23.12yaml: 2.9.0- [email protected](@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])):+ [email protected](@opentelemetry/[email protected])(@types/[email protected])(@vitest/[email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])):dependencies:'@vitest/expect': 4.1.11- '@vitest/mocker': 4.1.11([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected]))+ '@vitest/mocker': 4.1.11([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))'@vitest/pretty-format': 4.1.11'@vitest/runner': 4.1.11'@vitest/snapshot': 4.1.11@@ -13341,7 +18777,7 @@ snapshots:tinyexec: 1.3.1tinyglobby: 0.2.17tinyrainbow: 3.1.1- vite: 7.3.6(@types/[email protected])([email protected])([email protected])([email protected])([email protected])+ vite: 7.3.6(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])why-is-node-running: 2.3.0optionalDependencies:'@opentelemetry/api': 1.9.1@@ -13351,6 +18787,8 @@ snapshots:transitivePeerDependencies:- msw+ [email protected]: {}+dependencies:debug: 4.4.3@@ -13375,10 +18813,15 @@ snapshots:transitivePeerDependencies:- supports-color+ dependencies:+ makeerror: 1.0.12++ [email protected]: {}+dependencies:defaults: 1.0.4- optional: true@@ -13444,8 +18887,12 @@ snapshots:dependencies:iconv-lite: 0.6.3+ [email protected]: {}++ [email protected]: {}+dependencies:tr46: 5.1.1@@ -13488,14 +18935,30 @@ snapshots:+ [email protected]: {}+dependencies:is-wsl: 3.1.1+ dependencies:+ simple-plist: 1.3.1+ uuid: 7.0.3++ dependencies:+ sax: 1.6.1+ xmlbuilder: 11.0.1++ [email protected]: {}++ [email protected]: {}+@@ -13559,6 +19022,8 @@ snapshots:compress-commons: 6.0.2readable-stream: 4.7.0+ [email protected]: {}+@@ -13570,3 +19035,8 @@ snapshots:react: 19.2.8++ [email protected](@types/[email protected]):+ dependencies:+ '@types/emscripten': 1.41.6+ type-fest: 5.10.0diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yamlindex 9d103045..0c7fd7e1 100644--- a/pnpm-workspace.yaml+++ b/pnpm-workspace.yaml@@ -100,6 +100,7 @@ minimumReleaseAgeExclude:- '@deepseek-ai/[email protected]'- '@deepseek-ai/[email protected]'shellEmulator: truetrustPolicy: no-downgrade@@ -120,6 +121,7 @@ catalog:'@tauri-apps/plugin-store': ^2.4.4dsh-h3: 0.2.1h3: 2.0.1+ react-native-lucide: npm:[email protected]valtio: ^2.3.2catalogs:@@ -178,6 +180,39 @@ catalogs:'@eslint-react/eslint-plugin': ^5.18.6eslint: ^10.8.1eslint-plugin-react-refresh: ^0.5.4+ native:+ '@react-native-async-storage/async-storage': 2.2.0+ expo: ~57.0.26+ expo-blur: ~57.0.3+ expo-build-properties: ~57.0.22+ expo-camera: ~57.0.6+ expo-constants: ~57.0.20+ expo-crypto: ~57.0.3+ expo-dev-client: ~57.0.19+ expo-font: ~57.0.4+ expo-linking: ~57.0.11+ expo-localization: ~57.0.2+ expo-network: ~57.0.2+ expo-notifications: ~57.0.21+ expo-router: ~57.0.24+ expo-secure-store: ~57.0.4+ expo-splash-screen: ~57.0.9+ expo-status-bar: ~57.0.1+ expo-system-ui: ~57.0.4+ heroui-native: 1.0.10+ react-native: 0.86.3+ react-native-drawer-layout: 4.2.11+ react-native-gesture-handler: ~2.32.0+ react-native-reanimated: 4.5.1+ react-native-safe-area-context: ~5.7.0+ react-native-screens: ~4.26.0+ react-native-svg: 15.15.4+ react-native-webview: 13.16.1+ react-native-worklets: 0.10.1+ react-test-renderer: 19.2.8+ tailwind-merge: 3.7.0+ tw-animate-css: 1.4.0+ uniwind: 1.12.1release:bumpp: 12.2.1changelogithub: 15.0.5@@ -225,6 +260,7 @@ catalogs:'@types/qrcode': ^1.5.5'@types/react': ^19.2.18'@types/react-dom': ^19.2.4+ '@types/react-test-renderer': ^19.3.0'@types/semver': ^7.8.0'@types/ssh2': ^1.15.4ui:diff --git a/src-native/apis/index.ts b/src-native/apis/index.tsnew file mode 100644index 00000000..b35c59fb--- /dev/null+++ b/src-native/apis/index.ts@@ -0,0 +1,40 @@+import type { AuthStatus, BridgeManifest, GetAuthStatusPaths, GetManifestPaths } from './index.types'+import { AUTH_STATUS_PATH, MANIFEST_PATH } from '@/config/constants'+import { isBridgeManifest, parseAuthStatus } from '@/utils/bridge-protocol'++/**+ * 探测宿主的鉴权状态。网络错误由调用方(probe)捕获;+ * 非 2xx 或响应体不合法一律返回 null —— 表示「这个 origin 不是 DSH 宿主」。+ */+export async function getAuthStatus(paths: GetAuthStatusPaths, init?: RequestInit): Promise<AuthStatus | null> {+ const response = await fetch(new URL(AUTH_STATUS_PATH, paths.baseURL).toString(), {+ headers: { Accept: 'application/json' },+ cache: 'no-store',+ redirect: 'error',+ ...init,+ })++ if (!response.ok)+ return null++ return parseAuthStatus(await response.json())+}++/**+ * 读取宿主 manifest,用于判断宿主是否允许 loopback 连接。+ * 非 2xx 或校验失败返回 null。+ */+export async function getManifest(paths: GetManifestPaths, init?: RequestInit): Promise<BridgeManifest | null> {+ const response = await fetch(new URL(MANIFEST_PATH, paths.baseURL).toString(), {+ headers: { Accept: 'application/manifest+json' },+ cache: 'no-store',+ redirect: 'error',+ ...init,+ })++ if (!response.ok)+ return null++ const data: unknown = await response.json()+ return isBridgeManifest(data) ? data : null+}diff --git a/src-native/apis/index.types.ts b/src-native/apis/index.types.tsnew file mode 100644index 00000000..f89954c4--- /dev/null+++ b/src-native/apis/index.types.ts@@ -0,0 +1,22 @@+/** `getAuthStatus` 的路径参数:宿主 origin(`BridgeAddress.id`)。 */+export interface GetAuthStatusPaths {+ baseURL: string+}++/** `getManifest` 的路径参数:宿主 origin(`BridgeAddress.id`)。 */+export interface GetManifestPaths {+ baseURL: string+}++/** `GET /__dsh_bridge__/auth-status` 响应体。 */+export interface AuthStatus {+ enabled: boolean+ mode?: string+ allowLoopback?: boolean+}++/** `GET /manifest.webmanifest` 响应体中本 App 依赖的两个字段。 */+export interface BridgeManifest {+ name: string+ short_name: string+}diff --git a/src-native/app/_layout.tsx b/src-native/app/_layout.tsxnew file mode 100644index 00000000..b5b29aca--- /dev/null+++ b/src-native/app/_layout.tsx@@ -0,0 +1,81 @@+import { QueryClientProvider } from '@tanstack/react-query'+import { router, Stack } from 'expo-router'+import { StatusBar } from 'expo-status-bar'+import { HeroUINativeProvider } from 'heroui-native/provider'+import { useEffect } from 'react'+import { GestureHandlerRootView } from 'react-native-gesture-handler'+import { SafeAreaProvider } from 'react-native-safe-area-context'+import { queryClient } from '@/config/client'+import { useHostsHealth } from '@/hooks/use-hosts-health'+import { useNotifications } from '@/hooks/use-notifications'+import { connection } from '@/store/modules/connection'+import { connectAddress, startAutoScan, stopConnectionRuntime } from '@/store/modules/connection/runtime'+import { bindConnectionPersistence, restoreConnections } from '@/store/modules/connection/storage'+import '../global.css'++function RootNavigator() {+ useNotifications()+ // 已保存主机的健康轮询(含前台重取)由 React Query 托管,见 hooks/use-hosts-health.ts。+ useHostsHealth()+ // keep:effect Own hydration, persistence, cancellable discovery and notification focus.+ useEffect(() => {+ let disposed = false+ let unsubscribePersistence = () => {}+ function focusRequested() {+ const focus = connection.pendingFocus+ if (!connection.hydrated || !focus)+ return+ let entry = connection.current+ if (entry?.id !== focus.origin)+ entry = connection.history.find(entry => entry.id === focus.origin) ?? null+ if (!entry) {+ connection.queueFocus(null)+ return+ }+ router.dismissTo('/')+ connection.setDrawerOpen(false)+ if (connection.current?.id !== focus.origin)+ connectAddress(entry)+ }+ const unsubscribeFocus = connection.$subscribeKey('focusGeneration', focusRequested)+ async function initialize() {+ await restoreConnections()+ if (disposed)+ return+ unsubscribePersistence = bindConnectionPersistence()+ focusRequested()+ // 历史连接交给可取消的扫描自动接入;其余情况(无历史 / 已在连接中)由健康查询立即探测一次。+ if (connection.stage === 'idle' && connection.history.length > 0)+ void startAutoScan({ historyOnly: true })+ }+ void initialize()+ return () => {+ disposed = true+ unsubscribeFocus()+ unsubscribePersistence()+ stopConnectionRuntime()+ }+ }, [])++ return (+ <GestureHandlerRootView style={{ flex: 1 }}>+ <SafeAreaProvider>+ <HeroUINativeProvider config={{ devInfo: { stylingPrinciples: false } }}>+ <StatusBar style="auto" />+ <Stack screenOptions={{ headerShown: false }}>+ <Stack.Screen name="index" />+ <Stack.Screen name="scan" options={{ presentation: 'fullScreenModal' }} />+ </Stack>+ </HeroUINativeProvider>+ </SafeAreaProvider>+ </GestureHandlerRootView>+ )+}++export default function RootLayout() {+ return (+ <QueryClientProvider client={queryClient}>+ <RootNavigator />+ </QueryClientProvider>+ )+}diff --git a/src-native/app/index.tsx b/src-native/app/index.tsxnew file mode 100644index 00000000..f4084294--- /dev/null+++ b/src-native/app/index.tsx@@ -0,0 +1,259 @@+import type { BridgeAddress } from '@/utils/bridge-protocol'+import { router, useNavigation } from 'expo-router'+import { Button } from 'heroui-native/button'+import { Dialog } from 'heroui-native/dialog'+import { useThemeColor } from 'heroui-native/hooks'+import { Input } from 'heroui-native/input'+import { useEffect, useState } from 'react'+import { useTranslation } from 'react-i18next'+import { Else, If, Then } from 'react-if-lite'+import { Alert, BackHandler, ScrollView, Text, useWindowDimensions, View } from 'react-native'+import { Drawer } from 'react-native-drawer-layout'+import { History, Radar, RefreshCw, ScanLine, X } from 'react-native-lucide'+import { SafeAreaView } from 'react-native-safe-area-context'+import { useStore } from 'valtio-define'+import { BreathingLight } from '@/components/breathing-light'+import { Dot } from '@/components/dot'+import { Logo, Wordmark } from '@/components/icons'+import { connection } from '@/store/modules/connection'+import { cancelAutoScan, connectAddress, disconnectAndScan, refreshHealth, startAutoScan, stopConnectionRuntime } from '@/store/modules/connection/runtime'+import { BridgeWebView } from '@/ui/webview'+import { connectionLabel } from '@/utils/bridge-protocol'++function openScanner() {+ cancelAutoScan()+ connection.setDrawerOpen(false)+ router.push('/scan')+}++function openConnections() {+ if (connection.swipeHintVisible)+ connection.dismissHint()+ connection.setDrawerOpen(true)+ void refreshHealth()+}++function ConnectionDrawer() {+ const { t } = useTranslation()+ const state = useStore(connection)+ const [background, foreground, muted] = useThemeColor(['surface', 'foreground', 'muted'])+ const [renaming, setRenaming] = useState<BridgeAddress | null>(null)+ const [name, setName] = useState('')+ function editConnection(entry: BridgeAddress) {+ Alert.alert(connectionLabel(entry), entry.url, [+ { text: t('connection.rename'), onPress: () => {+ setName(connectionLabel(entry))+ setRenaming(entry)+ } },+ { text: t('connection.delete'), style: 'destructive', onPress: () => {+ let message = t('connection.deleteConfirm')+ if (connection.current?.id === entry.id)+ message = t('connection.deleteCurrentConfirm')+ Alert.alert(t('connection.delete'), message, [+ { text: t('common.cancel'), style: 'cancel' },+ { text: t('connection.delete'), style: 'destructive', onPress: () => {+ stopConnectionRuntime()+ connection.remove(entry.id)+ } },+ ])+ } },+ { text: t('common.cancel'), style: 'cancel' },+ ])+ }+ function saveName() {+ if (!renaming || !name.trim())+ return+ connection.rename(renaming.id, name)+ setRenaming(null)+ }+ let currentLabel: string = t('connection.noConnection')+ if (state.current)+ currentLabel = connectionLabel(state.current)+ let currentStatus: 'checking' | 'available' | 'unavailable' = 'checking'+ if (state.current)+ currentStatus = state.health[state.current.id] ?? 'checking'+ return (+ <SafeAreaView style={{ flex: 1, backgroundColor: background }} edges={['top', 'bottom', 'right']}>+ <View className="flex-row items-center justify-between px-5 pb-1 pt-2">+ <Text className="text-xl font-semibold text-foreground">{t('connection.connectionInfo')}</Text>+ <Button variant="ghost" size="sm" isIconOnly isDisabled={!state.hydrated} accessibilityLabel={t('scan.scanQr')} onPress={openScanner}>+ <ScanLine size={18} color={foreground} />+ </Button>+ </View>+ <ScrollView className="flex-1" contentContainerStyle={{ paddingHorizontal: 20, gap: 24, paddingBottom: 24 }}>+ <If cond={state.notice}>+ <Then><Text className="text-sm leading-6 text-warning" accessibilityLiveRegion="polite">{state.notice}</Text></Then>+ </If>+ <View className="gap-3">+ <Text className="text-sm font-semibold text-foreground">{t('connection.currentConnection')}</Text>+ <Button+ variant="ghost"+ className="h-auto min-h-16 justify-start gap-3 rounded-xl px-3 py-4"+ isDisabled={!state.current}+ accessibilityLabel={t('connection.reconnect')}+ onLongPress={() => {+ if (connection.current)+ editConnection(connection.current)+ }}+ accessibilityHint={t('connection.hostStatus', { host: currentLabel, status: t(`connection.${currentStatus}`) })}+ onPress={() => {+ if (connection.current)+ connectAddress(connection.current)+ }}+ >+ <If cond={state.current}>+ <Then><Dot status={currentStatus} /></Then>+ </If>+ <Text className="flex-1 text-sm font-medium text-foreground" numberOfLines={1}>{currentLabel}</Text>+ </Button>+ </View>+ <View className="gap-3">+ <View className="flex-row items-center justify-between">+ <Text className="text-sm font-semibold text-foreground">{t('connection.recentConnections')}</Text>+ <Button+ variant="ghost"+ size="sm"+ isIconOnly+ isDisabled={!state.hydrated}+ accessibilityLabel={t('connection.refreshConnections')}+ onPress={() => { void refreshHealth() }}+ >+ <RefreshCw size={18} color={foreground} />+ </Button>+ </View>+ <If cond={state.recentFive.length > 0}>+ <Then>+ <View className="gap-2">+ {state.recentFive.map((entry) => {+ const status = state.health[entry.id] ?? 'checking'+ return (+ <Button+ key={entry.id}+ variant="ghost"+ className="h-auto min-h-16 justify-start gap-3 rounded-xl px-3 py-4"+ accessibilityLabel={t('connection.hostStatus', { host: connectionLabel(entry), status: t(`connection.${status}`) })}+ accessibilityHint={t('connection.editHint')}+ onLongPress={() => editConnection(entry)}+ onPress={() => connectAddress(entry)}+ >+ <Dot status={status} />+ <Text className="flex-1 text-sm font-medium text-foreground" numberOfLines={1}>{connectionLabel(entry)}</Text>+ </Button>+ )+ })}+ </View>+ </Then>+ <Else><Text className="py-4 text-sm text-muted">{t('connection.noHistory')}</Text></Else>+ </If>+ </View>+ </ScrollView>+ <Dialog+ isOpen={renaming !== null}+ onOpenChange={(open) => {+ if (!open)+ setRenaming(null)+ }}+ >+ <Dialog.Portal>+ <Dialog.Overlay />+ <Dialog.Content>+ <Dialog.Title>{t('connection.rename')}</Dialog.Title>+ <Input accessibilityLabel={t('connection.name')} value={name} onChangeText={setName} autoFocus returnKeyType="done" onSubmitEditing={saveName} />+ <View className="flex-row justify-end gap-3">+ <Button variant="ghost" onPress={() => setRenaming(null)}>{t('common.cancel')}</Button>+ <Button isDisabled={!name.trim()} onPress={saveName}>{t('common.save')}</Button>+ </View>+ </Dialog.Content>+ </Dialog.Portal>+ </Dialog>+ <View className="gap-3 border-t border-border px-5 pb-4 pt-5">+ <Button variant="danger" isDisabled={!state.current} onPress={disconnectAndScan}>{t('connection.disconnect')}</Button>+ <Button variant="ghost" accessibilityLabel={t('connection.closeDrawer')} onPress={() => connection.setDrawerOpen(false)}>+ <X size={18} color={muted} />+ <Button.Label>{t('connection.closeDrawer')}</Button.Label>+ </Button>+ </View>+ </SafeAreaView>+ )+}++export default function HomeScreen() {+ const { t } = useTranslation()+ const state = useStore(connection)+ const navigation = useNavigation()+ const { width } = useWindowDimensions()+ const [background, foreground, backdrop, accentForeground] = useThemeColor(['background', 'foreground', 'backdrop', 'accent-foreground'])+ const scanning = state.stage === 'scanning'+ let scanText: string = t('connection.scanning')+ if (state.history.length > 0)+ scanText = t('connection.checkingHistory')+ // keep:effect Give the native drawer first refusal for Android's back button.+ useEffect(() => {+ const subscription = BackHandler.addEventListener('hardwareBackPress', () => {+ if (!navigation.isFocused() || !connection.drawerOpen)+ return false+ connection.setDrawerOpen(false)+ return true+ })+ return () => subscription.remove()+ }, [navigation])+ function renderContent() {+ if (state.current)+ return <BridgeWebView key={state.viewGeneration} address={state.current} generation={state.viewGeneration} />+ return (+ <SafeAreaView style={{ flex: 1, backgroundColor: background }}>+ <View className="flex-1 items-center justify-center gap-7 px-8">+ <View className="items-center gap-3">+ <Logo />+ <Wordmark />+ </View>+ <If cond={scanning}>+ <Then>+ <BreathingLight />+ <Text className="text-center text-sm leading-6 text-muted" accessibilityLiveRegion="polite">{scanText}</Text>+ <Button variant="ghost" onPress={cancelAutoScan}>{t('common.cancel')}</Button>+ </Then>+ </If>+ </View>+ <If cond={!scanning}>+ <Then>+ <View className="gap-3 px-6 pb-6">+ <If cond={state.notice}><Then><Text className="pb-3 text-center text-sm leading-6 text-muted" accessibilityLiveRegion="polite">{state.notice}</Text></Then></If>+ <Button size="lg" isDisabled={!state.hydrated} onPress={() => { void startAutoScan() }}>+ <Radar size={20} color={accentForeground} />+ <Button.Label>{t('connection.autoScan')}</Button.Label>+ </Button>+ <Button variant="outline" size="lg" isDisabled={!state.hydrated} onPress={openScanner}>+ <ScanLine size={20} color={foreground} />+ <Button.Label>{t('scan.scanQr')}</Button.Label>+ </Button>+ <Button variant="outline" size="lg" isDisabled={!state.hydrated} onPress={openConnections}>+ <History size={19} color={foreground} />+ <Button.Label>{t('connection.recentConnections')}</Button.Label>+ </Button>+ </View>+ </Then>+ </If>+ </SafeAreaView>+ )+ }+ return (+ <Drawer+ open={state.drawerOpen}+ onOpen={openConnections}+ onClose={() => connection.setDrawerOpen(false)}+ drawerPosition="right"+ direction="ltr"+ drawerType="slide"+ drawerStyle={{ width: Math.min(width * 0.88, 384), backgroundColor: background }}+ overlayStyle={{ backgroundColor: backdrop }}+ overlayAccessibilityLabel={t('connection.closeDrawer')}+ swipeEdgeWidth={96}+ swipeEnabled={state.hydrated}+ renderDrawerContent={() => <ConnectionDrawer />}+ style={{ flex: 1 }}+ >+ {renderContent()}+ </Drawer>+ )+}diff --git a/src-native/app/scan.tsx b/src-native/app/scan.tsxnew file mode 100644index 00000000..847e1260--- /dev/null+++ b/src-native/app/scan.tsx@@ -0,0 +1,115 @@+import type { BarcodeScanningResult } from 'expo-camera'+import { CameraView, useCameraPermissions } from 'expo-camera'+import { router } from 'expo-router'+import { Button } from 'heroui-native/button'+import { useThemeColor } from 'heroui-native/hooks'+import { useEffect, useRef, useState } from 'react'+import { useTranslation } from 'react-i18next'+import { Else, If, Then } from 'react-if-lite'+import { Linking, Text, View } from 'react-native'+import { X } from 'react-native-lucide'+import { useSafeAreaInsets } from 'react-native-safe-area-context'+import { BreathingLight } from '@/components/breathing-light'+import { useAppState } from '@/hooks/use-app-state'+import { connectAddress } from '@/store/modules/connection/runtime'+import { parseQrPayload } from '@/utils/bridge-protocol'++export default function ScanScreen() {+ const { t } = useTranslation()+ const [permission, requestPermission, refreshPermission] = useCameraPermissions()+ const appState = useAppState()+ // 模态路由挂在独立的原生视图树上,SafeAreaView 沿 superview 找不到根 provider,insets 恒为 0,只能取 context。+ const insets = useSafeAreaInsets()+ const [error, setError] = useState<string | null>(null)+ const [scanned, setScanned] = useState(false)+ const lockedRef = useRef(false)+ const [background, foreground] = useThemeColor(['background', 'foreground'])+ // keep:effect Recheck the native camera permission when returning from system settings.+ useEffect(() => {+ if (appState === 'active')+ void refreshPermission().catch(() => setError(t('scan.cameraError')))+ }, [appState, refreshPermission, t])+ function handleBarcode({ data }: BarcodeScanningResult) {+ if (lockedRef.current)+ return+ lockedRef.current = true+ setScanned(true)+ const address = parseQrPayload(data)+ if (!address) {+ setError(t('scan.invalidQr'))+ return+ }+ connectAddress(address)+ router.back()+ }+ async function allowCamera() {+ try {+ if (permission && !permission.canAskAgain)+ await Linking.openSettings()+ else+ await requestPermission()+ }+ catch {+ setError(t('scan.cameraError'))+ }+ }+ function retry() {+ lockedRef.current = false+ setError(null)+ setScanned(false)+ }+ let permissionLabel: string = t('scan.allowCamera')+ if (permission && !permission.canAskAgain)+ permissionLabel = t('scan.openSettings')+ return (+ <View style={{ flex: 1, backgroundColor: background, paddingTop: insets.top, paddingBottom: insets.bottom, paddingLeft: insets.left, paddingRight: insets.right }}>+ <View className="flex-row items-center justify-between gap-3 px-5 pb-3 pt-2">+ <Text className="flex-1 text-lg font-semibold text-foreground">{t('scan.cameraTitle')}</Text>+ <Button variant="ghost" isIconOnly accessibilityLabel={t('scan.closeScanner')} onPress={() => router.back()}>+ <X size={24} color={foreground} />+ </Button>+ </View>+ <If cond={permission !== null}>+ <Then>+ <If cond={permission?.granted}>+ <Then>+ <View className="mx-5 flex-1 overflow-hidden rounded-3xl bg-black">+ <If cond={appState === 'active'}>+ <Then>+ <CameraView+ style={{ flex: 1 }}+ facing="back"+ barcodeScannerSettings={{ barcodeTypes: ['qr'] }}+ onBarcodeScanned={scanned ? undefined : handleBarcode}+ onMountError={() => setError(t('scan.cameraError'))}+ />+ </Then>+ </If>+ <View pointerEvents="none" className="absolute inset-0 items-center justify-center">+ <View className="h-64 w-64 rounded-3xl border-2 border-white/80" />+ </View>+ </View>+ <View className="gap-4 px-6 py-6">+ <Text className="text-center text-sm leading-6 text-muted">{t('scan.cameraHint')}</Text>+ <If cond={error !== null}>+ <Then>+ <Text className="text-center text-sm text-danger" accessibilityLiveRegion="polite">{error}</Text>+ <Button variant="outline" onPress={retry}>{t('scan.qrRetry')}</Button>+ </Then>+ </If>+ </View>+ </Then>+ <Else>+ <View className="flex-1 items-center justify-center gap-6 px-8">+ <Text className="text-center text-base leading-7 text-foreground">{t('scan.cameraPermission')}</Text>+ <Button onPress={() => { void allowCamera() }}>{permissionLabel}</Button>+ <If cond={error}><Then><Text className="text-center text-sm text-danger">{error}</Text></Then></If>+ </View>+ </Else>+ </If>+ </Then>+ <Else><View className="flex-1 items-center justify-center"><BreathingLight /></View></Else>+ </If>+ </View>+ )+}diff --git a/src-native/components/breathing-light.tsx b/src-native/components/breathing-light.tsxnew file mode 100644index 00000000..72ba9146--- /dev/null+++ b/src-native/components/breathing-light.tsx@@ -0,0 +1,27 @@+import { useEffect } from 'react'+import { View } from 'react-native'+import Animated, { cancelAnimation, useAnimatedStyle, useSharedValue, withDelay, withRepeat, withSequence, withTiming } from 'react-native-reanimated'++function Pulse({ delay }: { delay: number }) {+ const pulse = useSharedValue(0)+ // keep:effect Start and cancel the native loading animation for this dot.+ useEffect(() => {+ pulse.value = withDelay(delay, withRepeat(withSequence(withTiming(1, { duration: 450 }), withTiming(0, { duration: 450 })), -1))+ return () => cancelAnimation(pulse)+ }, [delay, pulse])+ const style = useAnimatedStyle(() => ({+ opacity: 0.25 + pulse.value * 0.75,+ transform: [{ translateY: -pulse.value * 5 }],+ }))+ return <Animated.View className="h-2 w-2 rounded-full bg-foreground" style={style} />+}++export function BreathingLight() {+ return (+ <View className="h-6 flex-row items-center justify-center gap-2.5" accessible accessibilityRole="progressbar">+ <Pulse delay={0} />+ <Pulse delay={150} />+ <Pulse delay={300} />+ </View>+ )+}diff --git a/src-native/components/dot.tsx b/src-native/components/dot.tsxnew file mode 100644index 00000000..d7047ed3--- /dev/null+++ b/src-native/components/dot.tsx@@ -0,0 +1,10 @@+import { View } from 'react-native'++export function Dot({ status }: { status: 'checking' | 'available' | 'unavailable' }) {+ let className = 'h-2.5 w-2.5 rounded-full bg-muted'+ if (status === 'available')+ className = 'h-2.5 w-2.5 rounded-full bg-success'+ if (status === 'unavailable')+ className = 'h-2.5 w-2.5 rounded-full bg-danger'+ return <View className={className} />+}diff --git a/src-native/components/icons.tsx b/src-native/components/icons.tsxnew file mode 100644index 00000000..b58c2379--- /dev/null+++ b/src-native/components/icons.tsx@@ -0,0 +1,50 @@+import { useThemeColor } from 'heroui-native/hooks'+import Svg, { ClipPath, Defs, G, Path, Rect } from 'react-native-svg'+import { i18n } from '@/i18n'++/** DeepSeek Harness 文字标志(原 `components/dsh-wordmark.tsx`)。 */+export function Wordmark() {+ const [foreground, background] = useThemeColor(['foreground', 'background'])+ return (+ <>+ <Svg width={156} height={28.4375} viewBox="26 4.5 96 17.5" accessibilityRole="image" accessibilityLabel="DeepSeek">+ <Path d="M68.416 18.2447H67.0501V16.1272H68.416C69.2619 16.1272 70.1166 15.9163 70.6671 15.3304C71.2181 14.7444 71.426 13.8455 71.426 12.9471C71.426 12.0487 71.2268 11.1498 70.6671 10.5643C70.1083 9.97831 69.2619 9.76744 68.416 9.76744C67.5701 9.76744 66.7154 9.97831 66.1639 10.5643C65.6129 11.1503 65.4049 12.0487 65.4049 12.9471V21.6435H63.009V7.6582H65.4049V8.54883H65.8442C65.8918 8.49393 65.9394 8.44728 65.9875 8.40064C66.5871 7.85353 67.5049 7.6582 68.4072 7.6582C69.8212 7.6582 71.2341 8.00998 72.1607 8.98662C73.0868 9.96325 73.4143 11.4632 73.4143 12.9558C73.4143 14.4485 73.0785 15.9406 72.1607 16.925C71.2424 17.9094 69.8212 18.2457 68.416 18.2457V18.2447Z" fill={foreground} />+ <Path d="M31.9551 8.03497H33.3204V10.1525H31.9551C31.1087 10.1525 30.2545 10.3633 29.7035 10.9493C29.1525 11.5353 28.945 12.4342 28.945 13.3326C28.945 14.231 29.1447 15.1294 29.7035 15.7154C30.2623 16.3014 31.1087 16.5122 31.9551 16.5122C32.8015 16.5122 33.6562 16.3014 34.2072 15.7154C34.7582 15.1294 34.9657 14.231 34.9657 13.3326V4.62842H37.3611V18.6219H34.9657V17.7313H34.5264C34.4783 17.7857 34.4307 17.8329 34.3826 17.8795C33.7835 18.4261 32.8652 18.6219 31.9629 18.6219C30.5494 18.6219 29.136 18.2707 28.2099 17.294C27.2838 16.3174 26.9563 14.817 26.9563 13.3248C26.9563 11.8327 27.2916 10.34 28.2099 9.35561C29.136 8.37898 30.5494 8.03497 31.9551 8.03497Z" fill={foreground} />+ <Path d="M49.3786 13.1431V13.9948H42.9984V12.2996H47.2305C47.1348 11.6825 46.9113 11.1043 46.5119 10.682C45.9371 10.0727 45.0503 9.85409 44.1723 9.85409C43.2943 9.85409 42.4076 10.0727 41.8328 10.682C41.258 11.2913 41.05 12.2213 41.05 13.1435C41.05 14.0658 41.2575 15.003 41.8328 15.6046C42.4076 16.2061 43.2939 16.433 44.1723 16.433C45.0508 16.433 45.9371 16.2143 46.5119 15.6046C46.5916 15.5186 46.6635 15.4248 46.7354 15.331H49.0992C48.8918 16.0657 48.5643 16.7299 48.0691 17.2454C47.111 18.2531 45.6339 18.6205 44.1723 18.6205C42.7108 18.6205 41.2337 18.2609 40.2755 17.2454C39.3174 16.2299 38.9661 14.6828 38.9661 13.1435C38.9661 11.6043 39.3096 10.0494 40.2755 9.04168C41.242 8.03396 42.7108 7.66663 44.1723 7.66663C45.6339 7.66663 47.111 8.02618 48.0691 9.04168C49.0351 10.0572 49.3786 11.6043 49.3786 13.1435V13.1431Z" fill={foreground} />+ <Path d="M61.4045 13.1431V13.9948H55.0243V12.2996H59.2564C59.1602 11.6825 58.9372 11.1043 58.5378 10.682C57.963 10.0727 57.0762 9.85409 56.1982 9.85409C55.3202 9.85409 54.4335 10.0727 53.8587 10.682C53.2839 11.2913 53.0759 12.2213 53.0759 13.1435C53.0759 14.0658 53.2834 15.003 53.8587 15.6046C54.4335 16.2061 55.3202 16.433 56.1982 16.433C57.0762 16.433 57.963 16.2143 58.5378 15.6046C58.6179 15.5186 58.6894 15.4248 58.7608 15.331H61.1251C60.9171 16.0657 60.5897 16.7299 60.0945 17.2454C59.1364 18.2531 57.6593 18.6205 56.1982 18.6205C54.7372 18.6205 53.2596 18.2609 52.3014 17.2454C51.3432 16.2299 50.9919 14.6828 50.9919 13.1435C50.9919 11.6043 51.3355 10.0494 52.3014 9.04168C53.2678 8.03396 54.7367 7.66663 56.1982 7.66663C57.6598 7.66663 59.1364 8.02618 60.0945 9.04168C61.061 10.0572 61.4045 11.6043 61.4045 13.1435V13.1431Z" fill={foreground} />+ <Path d="M80.242 18.6214C81.7035 18.6214 83.1801 18.4105 84.1383 17.809C85.0965 17.2075 85.4482 16.2931 85.4482 15.3869C85.4482 14.4807 85.1042 13.5585 84.1383 12.9647C83.1801 12.371 81.703 12.1518 80.242 12.1518C79.6186 12.1518 79.0438 12.0658 78.6366 11.8394C78.2294 11.6047 78.0778 11.2534 78.0778 10.9017C78.0778 10.5499 78.2216 10.1908 78.6366 9.9639C79.0438 9.72921 79.6749 9.65147 80.2973 9.65147C80.9198 9.65147 81.5509 9.73747 81.9591 9.9639C82.3663 10.1986 82.5179 10.5499 82.5179 10.9017H84.9531C84.9531 9.99499 84.6421 9.07327 83.7719 8.47951C82.9017 7.88576 81.5679 7.66663 80.2424 7.66663C78.9169 7.66663 77.5837 7.8775 76.713 8.47951C75.8427 9.08104 75.5308 9.99499 75.5308 10.9017C75.5308 11.8083 75.8423 12.73 76.713 13.3238C77.5832 13.9176 78.9165 14.1367 80.2424 14.1367C80.929 14.1367 81.688 14.2227 82.1428 14.4491C82.5985 14.676 82.7579 15.0351 82.7579 15.3869C82.7579 15.7387 82.5985 16.0977 82.1428 16.3246C81.688 16.5511 80.9931 16.6371 80.3066 16.6371C79.62 16.6371 78.9169 16.5511 78.4694 16.3246C78.0224 16.0982 77.8543 15.7387 77.8543 15.3869H75.0435C75.0435 16.2935 75.3865 17.2153 76.3534 17.809C77.3194 18.4028 78.7809 18.6214 80.2424 18.6214H80.242Z" fill={foreground} />+ <Path d="M97.4733 13.1431V13.9948H91.0932V12.2996H95.3252C95.23 11.6825 95.006 11.1043 94.6071 10.682C94.0313 10.0727 93.1456 9.85409 92.2666 9.85409C91.3876 9.85409 90.5018 10.0727 89.927 10.682C89.3522 11.2913 89.1452 12.2213 89.1452 13.1435C89.1452 14.0658 89.3522 15.003 89.927 15.6046C90.5018 16.2061 91.3886 16.433 92.2666 16.433C93.1446 16.433 94.0313 16.2143 94.6071 15.6046C94.6863 15.5186 94.7587 15.4248 94.8301 15.331H97.1935C96.9855 16.0657 96.6585 16.7299 96.1639 17.2454C95.2057 18.2531 93.7281 18.6205 92.2666 18.6205C90.805 18.6205 89.3284 18.2609 88.3703 17.2454C87.4121 16.2299 87.0613 14.6828 87.0613 13.1435C87.0613 11.6043 87.4043 10.0494 88.3703 9.04168C89.3367 8.03396 90.806 7.66663 92.2666 7.66663C93.7272 7.66663 95.2057 8.02618 96.1639 9.04168C97.1298 10.0572 97.4729 11.6043 97.4729 13.1435L97.4733 13.1431Z" fill={foreground} />+ <Path d="M109.499 13.1431V13.9948H103.119V12.2996H107.351C107.256 11.6825 107.032 11.1043 106.632 10.682C106.057 10.0727 105.172 9.85409 104.293 9.85409C103.414 9.85409 102.528 10.0727 101.953 10.682C101.378 11.2913 101.17 12.2213 101.17 13.1435C101.17 14.0658 101.378 15.003 101.953 15.6046C102.528 16.2061 103.415 16.433 104.293 16.433C105.171 16.433 106.057 16.2143 106.632 15.6046C106.712 15.5186 106.784 15.4248 106.856 15.331H109.22C109.012 16.0657 108.685 16.7299 108.19 17.2454C107.231 18.2531 105.754 18.6205 104.293 18.6205C102.831 18.6205 101.355 18.2609 100.396 17.2454C99.4382 16.2299 99.0864 14.6828 99.0864 13.1435C99.0864 11.6043 99.4295 10.0494 100.396 9.04168C101.362 8.03396 102.832 7.66663 104.293 7.66663C105.754 7.66663 107.231 8.02618 108.19 9.04168C109.156 10.0572 109.499 11.6043 109.499 13.1435V13.1431Z" fill={foreground} />+ <Path d="M113.5 4.62817H111.104V18.6217H113.5V4.62817Z" fill={foreground} />+ <Path d="M117.589 12.8154L121.517 18.6208H118.554L114.625 12.8154L118.554 8.15088H121.517L117.589 12.8154Z" fill={foreground} />+ </Svg>+ <Svg width={88} height={88 * 14 / 52} viewBox="129.348 5.5 52 14" accessibilityRole="image" accessibilityLabel="Harness">+ <Rect x="129.348" y="5.5" width="52" height="14" rx="2" fill={foreground} />+ <G clipPath="url(#dsh-wordmark-badge-clip)">+ <Path d="M132.848 8.93205H134.08V16.137H132.848V8.93205ZM136.5 8.93205H137.732V16.137H136.5V8.93205ZM133.365 13.024V11.99H137.193V13.024H133.365Z" fill={background} />+ <Path d="M140.397 14.432L140.672 13.453H143.202L143.532 14.432H140.397ZM140.287 16.137H139.055L141.277 8.93205H142.201L142.146 9.74605L140.947 13.915H140.969L140.287 16.137ZM145.039 16.137H143.741L143.07 13.948L143.081 13.937L141.871 9.74605L141.926 8.93205H142.817L145.039 16.137Z" fill={background} />+ <Path d="M146.846 8.93205H149.068C149.852 8.93205 150.443 9.11538 150.839 9.48205C151.235 9.84138 151.433 10.3327 151.433 10.956C151.433 11.22 151.396 11.4657 151.323 11.693C151.249 11.9204 151.125 12.1257 150.949 12.309C150.773 12.4924 150.531 12.65 150.223 12.782C149.922 12.9067 149.541 13.0057 149.079 13.079V13.321H146.846V12.639L148.023 12.485C148.631 12.4044 149.09 12.298 149.398 12.166C149.706 12.034 149.915 11.8764 150.025 11.693C150.135 11.5024 150.19 11.2934 150.19 11.066C150.19 10.6994 150.083 10.417 149.871 10.219C149.658 10.021 149.324 9.92205 148.87 9.92205H146.846V8.93205ZM146.395 8.93205H147.627V16.137H146.395V8.93205ZM151.917 16.093V16.137H150.366L149.024 14.322C148.87 14.1094 148.73 13.9407 148.606 13.816C148.481 13.684 148.345 13.5887 148.199 13.53C148.052 13.464 147.872 13.42 147.66 13.398C147.447 13.3687 147.176 13.3504 146.846 13.343V13.145H149.079C149.233 13.211 149.368 13.2844 149.486 13.365C149.61 13.4457 149.735 13.5447 149.86 13.662C149.992 13.7794 150.138 13.937 150.3 14.135L151.917 16.093Z" fill={background} />+ <Path d="M153.58 9.57005L153.591 8.93205H154.46L157.584 15.51V16.137H156.704L153.58 9.57005ZM158.024 16.137H156.968L156.88 8.93205H158.024V16.137ZM154.24 16.137H153.096V8.93205H154.152L154.24 16.137Z" fill={background} />+ <Path d="M159.963 8.93205H161.206V16.137H159.963V8.93205ZM160.095 9.96605V8.93205H164.858V9.96605H160.095ZM160.095 16.137V15.103H164.902V16.137H160.095ZM160.095 13.013V11.99H164.374V13.013H160.095Z" fill={background} />+ <Path d="M169.052 15.257C169.543 15.257 169.895 15.1654 170.108 14.982C170.328 14.7987 170.438 14.5457 170.438 14.223C170.438 14.047 170.405 13.8967 170.339 13.772C170.273 13.6474 170.152 13.5337 169.976 13.431C169.807 13.321 169.558 13.2147 169.228 13.112L168.491 12.881C167.846 12.6757 167.38 12.4044 167.094 12.067C166.808 11.7297 166.665 11.3007 166.665 10.78C166.665 10.428 166.76 10.1017 166.951 9.80105C167.142 9.50038 167.428 9.25838 167.809 9.07505C168.19 8.89172 168.663 8.80005 169.228 8.80005C169.631 8.80005 169.998 8.82938 170.328 8.88805C170.665 8.93938 171.039 9.01638 171.45 9.11905L171.274 10.175C170.834 10.0504 170.442 9.96238 170.097 9.91105C169.76 9.85238 169.463 9.82305 169.206 9.82305C168.737 9.82305 168.403 9.90738 168.205 10.076C168.007 10.2374 167.908 10.439 167.908 10.681C167.908 10.857 167.941 11.0147 168.007 11.154C168.073 11.286 168.19 11.407 168.359 11.517C168.535 11.627 168.784 11.7334 169.107 11.836L169.866 12.078C170.526 12.276 170.995 12.5327 171.274 12.848C171.553 13.156 171.692 13.585 171.692 14.135C171.692 14.5604 171.589 14.9344 171.384 15.257C171.179 15.5797 170.878 15.8327 170.482 16.016C170.093 16.1994 169.609 16.291 169.03 16.291C168.627 16.291 168.212 16.247 167.787 16.159C167.362 16.071 166.9 15.9427 166.401 15.774L166.665 14.718C167.156 14.894 167.6 15.0297 167.996 15.125C168.399 15.213 168.751 15.257 169.052 15.257Z" fill={background} />+ <Path d="M175.809 15.257C176.3 15.257 176.652 15.1654 176.865 14.982C177.085 14.7987 177.195 14.5457 177.195 14.223C177.195 14.047 177.162 13.8967 177.096 13.772C177.03 13.6474 176.909 13.5337 176.733 13.431C176.564 13.321 176.315 13.2147 175.985 13.112L175.248 12.881C174.603 12.6757 174.137 12.4044 173.851 12.067C173.565 11.7297 173.422 11.3007 173.422 10.78C173.422 10.428 173.517 10.1017 173.708 9.80105C173.899 9.50038 174.185 9.25838 174.566 9.07505C174.947 8.89172 175.42 8.80005 175.985 8.80005C176.388 8.80005 176.755 8.82938 177.085 8.88805C177.422 8.93938 177.796 9.01638 178.207 9.11905L178.031 10.175C177.591 10.0504 177.199 9.96238 176.854 9.91105C176.517 9.85238 176.22 9.82305 175.963 9.82305C175.494 9.82305 175.16 9.90738 174.962 10.076C174.764 10.2374 174.665 10.439 174.665 10.681C174.665 10.857 174.698 11.0147 174.764 11.154C174.83 11.286 174.947 11.407 175.116 11.517C175.292 11.627 175.541 11.7334 175.864 11.836L176.623 12.078C177.283 12.276 177.752 12.5327 178.031 12.848C178.31 13.156 178.449 13.585 178.449 14.135C178.449 14.5604 178.346 14.9344 178.141 15.257C177.936 15.5797 177.635 15.8327 177.239 16.016C176.85 16.1994 176.366 16.291 175.787 16.291C175.384 16.291 174.969 16.247 174.544 16.159C174.119 16.071 173.657 15.9427 173.158 15.774L173.422 14.718C173.913 14.894 174.357 15.0297 174.753 15.125C175.156 15.213 175.508 15.257 175.809 15.257Z" fill={background} />+ </G>+ <Defs>+ <ClipPath id="dsh-wordmark-badge-clip">+ <Rect width="46" height="14" transform="translate(132.348 5.5)" />+ </ClipPath>+ </Defs>+ </Svg>+ </>+ )+}++/** DSH 鲸鱼标志(原 `components/whale-logo.tsx`)。 */+export function Logo({ size = 104 }: { size?: number }) {+ const foreground = useThemeColor('foreground')+ return (+ <Svg width={size} height={size * 17.04 / 23.16} viewBox="0 0 23.16 17.04" accessibilityRole="image" accessibilityLabel={i18n.t('app.name')}>+ <Path d="M22.9168 1.43018C22.6713 1.31018 22.5658 1.53918 22.4223 1.65519C22.3733 1.69269 22.3318 1.74169 22.2903 1.78669C21.9317 2.1697 21.5127 2.42121 20.9657 2.39121C20.1657 2.34621 19.4827 2.59771 18.8787 3.20973C18.7502 2.45521 18.3236 2.0047 17.6746 1.71569C17.3351 1.56568 16.9916 1.41518 16.7536 1.08867C16.5876 0.856163 16.5421 0.597155 16.4591 0.341647C16.4061 0.187643 16.3536 0.0301382 16.1761 0.00363739C15.9836 -0.0263635 15.9081 0.135141 15.8326 0.270145C15.5306 0.822162 15.4136 1.43018 15.4251 2.0462C15.4516 3.43174 16.0366 4.53527 17.1991 5.3203C17.3311 5.4103 17.3651 5.5003 17.3236 5.63181C17.2441 5.90231 17.1501 6.16482 17.0671 6.43533C17.0141 6.60784 16.9351 6.64584 16.7501 6.57033C16.1121 6.30383 15.5611 5.90931 15.074 5.4328C14.2475 4.63328 13.5 3.75075 12.568 3.05973C12.349 2.89822 12.13 2.74822 11.9034 2.60522C10.9524 1.68169 12.028 0.923165 12.277 0.833162C12.5375 0.739159 12.3675 0.41615 11.5259 0.42015C10.6844 0.42365 9.91439 0.705658 8.93286 1.08117C8.78935 1.13767 8.63835 1.17867 8.48384 1.21267C7.59332 1.04367 6.66829 1.00617 5.70226 1.11517C3.88321 1.31768 2.43016 2.1777 1.36213 3.64575C0.0790928 5.4103 -0.222916 7.41536 0.146595 9.50642C0.535106 11.7105 1.66014 13.535 3.38869 14.9616C5.18125 16.4406 7.24581 17.1657 9.60138 17.0266C11.0319 16.9441 12.6245 16.7526 14.421 15.2321C14.874 15.4576 15.3496 15.5476 16.1381 15.6151C16.7456 15.6716 17.3306 15.5851 17.7836 15.4911C18.4931 15.3411 18.4441 14.6841 18.1876 14.5636C16.1081 13.595 16.5646 13.9891 16.1496 13.67C17.2061 12.42 18.8202 10.1979 19.3182 7.17235C19.3672 6.83834 19.4297 6.36783 19.4222 6.09732C19.4182 5.93231 19.4562 5.86831 19.6447 5.84931C20.1657 5.78931 20.6712 5.64681 21.1357 5.3913C22.4833 4.65528 23.0268 3.44624 23.1548 1.9972C23.1738 1.77569 23.1508 1.54668 22.9168 1.43018ZM11.1749 14.4736C9.15936 12.889 8.18184 12.3675 7.77832 12.39C7.40081 12.4125 7.46881 12.8445 7.55182 13.126C7.63882 13.404 7.75182 13.5955 7.91033 13.8396C8.01983 14.0011 8.09533 14.2411 7.80083 14.4216C7.15181 14.8231 6.02327 14.2866 5.97027 14.2601C4.65673 13.4865 3.5587 12.4655 2.78467 11.069C2.03715 9.72493 1.60314 8.28289 1.53164 6.74384C1.51264 6.37233 1.62214 6.24082 1.99215 6.17332C2.47916 6.08332 2.98118 6.06432 3.46769 6.13582C5.52476 6.43633 7.27581 7.35586 8.74385 8.8129C9.58188 9.64243 10.2159 10.634 10.8689 11.6025C11.5634 12.631 12.3105 13.611 13.262 14.4146C13.598 14.6961 13.866 14.9101 14.1225 15.0681C13.349 15.1546 12.058 15.1731 11.1749 14.4746L11.1749 14.4736ZM12.141 8.25988C12.141 8.09488 12.273 7.96338 12.439 7.96338C12.4765 7.96338 12.5105 7.97088 12.541 7.98188C12.5825 7.99688 12.6205 8.01938 12.6505 8.05338C12.7035 8.10588 12.7335 8.18088 12.7335 8.25988C12.7335 8.42489 12.6015 8.55639 12.4355 8.55639C12.2695 8.55639 12.141 8.42489 12.141 8.25988ZM15.1415 9.79893C14.949 9.87793 14.7565 9.94544 14.5715 9.95294C14.2845 9.96794 13.9715 9.85143 13.8015 9.70893C13.5375 9.48742 13.3485 9.36342 13.2695 8.97691C13.2355 8.8119 13.2545 8.55639 13.2845 8.40989C13.3525 8.09438 13.277 7.89187 13.0545 7.70787C12.8735 7.55786 12.643 7.51636 12.39 7.51636C12.2955 7.51636 12.209 7.47486 12.1445 7.44136C12.039 7.38886 11.9519 7.25735 12.035 7.09585C12.0615 7.04335 12.19 6.91584 12.22 6.89334C12.5635 6.69784 12.9595 6.76184 13.326 6.90834C13.6655 7.04735 13.9225 7.30236 14.292 7.66287C14.6695 8.09838 14.7375 8.21838 14.9525 8.54539C15.1225 8.8009 15.277 9.06341 15.3831 9.36392C15.4471 9.55142 15.3641 9.70493 15.1415 9.79893Z" fill={foreground} />+ </Svg>+ )+}diff --git a/src-native/config/client.ts b/src-native/config/client.tsnew file mode 100644index 00000000..ce533e0d--- /dev/null+++ b/src-native/config/client.ts@@ -0,0 +1,19 @@+import { focusManager, QueryClient } from '@tanstack/react-query'+import { AppState } from 'react-native'++/**+ * 用 React Native 的 AppState 驱动 React Query 的焦点状态:应用退到后台即视为失焦+ * (`refetchIntervalInBackground: false` 会暂停轮询),回到前台立即重取活跃查询。+ * 等价替代原先 `app/_layout.tsx` 里手写的 interval + AppState 监听。+ */+focusManager.setEventListener((handleFocus) => {+ const subscription = AppState.addEventListener('change', state => handleFocus(state === 'active'))+ return () => subscription.remove()+})++/** 局域网内直连主机的探测没有瞬时网络抖动的重试价值,失败即返回;超时与取消由 probeBridge 负责。 */+export const queryClient = new QueryClient({+ defaultOptions: {+ queries: { retry: false },+ },+})diff --git a/src-native/config/constants.ts b/src-native/config/constants.tsnew file mode 100644index 00000000..9dcfd1c6--- /dev/null+++ b/src-native/config/constants.ts@@ -0,0 +1,16 @@+export const DEFAULT_PORTS = [3088, 3080] as const+export const EXTRA_SCAN_PORTS: number[] = []+export const SCAN_CONCURRENCY = 40+export const PROBE_TIMEOUT_MS = 600+export const HISTORY_PROBE_TIMEOUT_MS = 3000+export const SCAN_BUDGET_MS = 20000+export const HEALTH_INTERVAL_MS = 15000+export const HISTORY_LIMIT = 20+export const RECENT_LIMIT = 5+export const WEBVIEW_LOAD_TIMEOUT_MS = 20000+export const FOCUS_RETRY_INTERVAL_MS = 200+export const FOCUS_TIMEOUT_MS = 15000+export const NOTIFICATION_CHANNEL = 'dsh-bridge'+export const CONNECTION_STORAGE_KEY = 'dsh-bridge/connections'+export const AUTH_STATUS_PATH = '/__dsh_bridge__/auth-status'+export const MANIFEST_PATH = '/manifest.webmanifest'diff --git a/src-native/config/query-keys.ts b/src-native/config/query-keys.tsnew file mode 100644index 00000000..f646077e--- /dev/null+++ b/src-native/config/query-keys.ts@@ -0,0 +1,8 @@+/**+ * React Query key 注册表:key 是查询方与失效方之间的共享契约。+ * 保持单元素 snake_case 数组,参数化 key 用展开组合(`[...queryKeys.x, id]`),+ * 与桌面端 `src/config/query-keys.ts` 约定一致。+ */+export const queryKeys = {+ hostsHealth: ['hosts_health'],+} as constdiff --git a/src-native/entry.ts b/src-native/entry.tsnew file mode 100644index 00000000..3283874d--- /dev/null+++ b/src-native/entry.ts@@ -0,0 +1,10 @@+// 移动端应用入口。+//+// 为什么不直接把 package.json 的 `main` 写成 `expo-router/entry`:+// 本仓库用 pnpm 安装依赖,`node_modules/expo-router` 是指向 `node_modules/.pnpm/...` 的符号链接。+// Expo 会把 `main` 解析成绝对路径后再转成「相对工程根」的路径交给 Metro,而 Metro 的相对路径解析+// 只认 file map 里登记过的路径(pnpm 真实路径),于是报+// `Unable to resolve module ./node_modules/expo-router/entry`。+// 改用工程内的真实文件作为入口,再由它按包名引入 expo-router 官方入口,交给 Metro 的+// node_modules 解析(该路径对符号链接的处理是正常的)。+import 'expo-router/entry'diff --git a/src-native/env.d.ts b/src-native/env.d.tsnew file mode 100644index 00000000..14a0fb2a--- /dev/null+++ b/src-native/env.d.ts@@ -0,0 +1,2 @@+import 'expo/types'+import 'uniwind/types'diff --git a/src-native/global.css b/src-native/global.cssnew file mode 100644index 00000000..beccc541--- /dev/null+++ b/src-native/global.css@@ -0,0 +1,8 @@+@import 'tailwindcss';+@import 'uniwind';+@import 'tw-animate-css';+@import 'heroui-native/styles';+@import './styles/variables.css';++@source './';+@source '../node_modules/heroui-native/lib';diff --git a/src-native/hooks/use-app-state.ts b/src-native/hooks/use-app-state.tsnew file mode 100644index 00000000..8c5a8151--- /dev/null+++ b/src-native/hooks/use-app-state.ts@@ -0,0 +1,15 @@+import { useSyncExternalStore } from 'react'+import { AppState } from 'react-native'++function subscribe(onChange: () => void): () => void {+ const subscription = AppState.addEventListener('change', onChange)+ return () => subscription.remove()+}++function snapshot() {+ return AppState.currentState+}++export function useAppState() {+ return useSyncExternalStore(subscribe, snapshot, snapshot)+}diff --git a/src-native/hooks/use-hosts-health.ts b/src-native/hooks/use-hosts-health.tsnew file mode 100644index 00000000..c8cbeb05--- /dev/null+++ b/src-native/hooks/use-hosts-health.ts@@ -0,0 +1,26 @@+import { useQuery } from '@tanstack/react-query'+import { useStore } from 'valtio-define'+import { HEALTH_INTERVAL_MS } from '@/config/constants'+import { queryKeys } from '@/config/query-keys'+import { connection } from '@/store/modules/connection'+import { refreshHealth } from '@/store/modules/connection/runtime'++/**+ * 轮询已保存主机的可用性:定时器、并发去重与回前台重取都交给 React Query,+ * 因此入参只需要「是否已恢复连接记录」这一个门控。+ * `refreshHealth()` 仍是那次探测本身(写 health、发离线通知),手动刷新按钮继续直接调用它。+ * 查询函数必须返回非 `undefined`(React Query 会对 `undefined` 结果告警),故显式返回 `null`。+ */+export function useHostsHealth(): void {+ const { hydrated } = useStore(connection)+ useQuery({+ queryKey: queryKeys.hostsHealth,+ queryFn: async () => {+ await refreshHealth()+ return null+ },+ enabled: hydrated,+ refetchInterval: HEALTH_INTERVAL_MS,+ refetchIntervalInBackground: false,+ })+}diff --git a/src-native/hooks/use-notifications.test.ts b/src-native/hooks/use-notifications.test.tsnew file mode 100644index 00000000..f92b7b2c--- /dev/null+++ b/src-native/hooks/use-notifications.test.ts@@ -0,0 +1,559 @@+import type { Notification, NotificationHandler, NotificationPermissionsStatus, NotificationResponse } from 'expo-notifications'+import type { EffectCallback } from 'react'+import type { NativeNotificationMessage } from '@/utils/notification-policy'+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'+import { i18n } from '@/i18n'++const native = vi.hoisted(() => ({+ appState: { currentState: 'active' },+ platform: { OS: 'android' },+ useEffect: vi.fn<typeof import('react').useEffect>(),+ setNotificationChannelAsync: vi.fn<typeof import('expo-notifications').setNotificationChannelAsync>(),+ getPermissionsAsync: vi.fn<typeof import('expo-notifications').getPermissionsAsync>(),+ requestPermissionsAsync: vi.fn<typeof import('expo-notifications').requestPermissionsAsync>(),+ scheduleNotificationAsync: vi.fn<typeof import('expo-notifications').scheduleNotificationAsync>(),+ setNotificationHandler: vi.fn<typeof import('expo-notifications').setNotificationHandler>(),+ addNotificationResponseReceivedListener: vi.fn<typeof import('expo-notifications').addNotificationResponseReceivedListener>(),+ getLastNotificationResponseAsync: vi.fn<typeof import('expo-notifications').getLastNotificationResponseAsync>(),+ clearLastNotificationResponseAsync: vi.fn<typeof import('expo-notifications').clearLastNotificationResponseAsync>(),+ remove: vi.fn<() => void>(),+}))++vi.mock('react', async (importOriginal) => {+ const actual = await importOriginal<typeof import('react')>()+ return { ...actual, useEffect: native.useEffect }+})+vi.mock('react-native', () => ({ AppState: native.appState, Platform: native.platform }))+// 通知渠道名来自 i18n;node 环境无法真正加载 expo-localization(缺 __DEV__),设备区域固定为 zh-CN。+vi.mock('expo-localization', () => ({ getLocales: () => [{ languageTag: 'zh-CN' }] }))+// store 模块经 valtio-define persist 插件依赖 AsyncStorage,node 环境用最小实现顶替。+vi.mock('@react-native-async-storage/async-storage', () => ({ default: { getItem: vi.fn(async () => null), setItem: vi.fn(async () => {}) } }))+vi.mock('expo-notifications', () => ({+ AndroidImportance: { DEFAULT: 5, HIGH: 6 },+ DEFAULT_ACTION_IDENTIFIER: 'expo.modules.notifications.actions.DEFAULT',+ setNotificationChannelAsync: native.setNotificationChannelAsync,+ getPermissionsAsync: native.getPermissionsAsync,+ requestPermissionsAsync: native.requestPermissionsAsync,+ scheduleNotificationAsync: native.scheduleNotificationAsync,+ setNotificationHandler: native.setNotificationHandler,+ addNotificationResponseReceivedListener: native.addNotificationResponseReceivedListener,+ getLastNotificationResponseAsync: native.getLastNotificationResponseAsync,+ clearLastNotificationResponseAsync: native.clearLastNotificationResponseAsync,+}))++const origin = 'https://harness.test:3080'+const message: NativeNotificationMessage = {+ type: 'dsh://native-notification',+ title: 'Response complete',+ body: 'Your answer is ready',+ sessionId: 'session',+ tag: 'dsh-notification-session-1',+ silent: false,+}+const permissionGranted = {+ status: 'granted',+ granted: true,+ canAskAgain: true,+ expires: 'never',+} as NotificationPermissionsStatus+const permissionDenied = {+ status: 'denied',+ granted: false,+ canAskAgain: true,+ expires: 'never',+} as NotificationPermissionsStatus+let effects: EffectCallback[] = []+let dispose: (() => void) | undefined++function notification(sound: Notification['request']['content']['sound'] = 'default', data: unknown = {+ origin,+ sessionId: 'session',+ title: 'Response complete',+ tag: 'dsh-notification-session-1',+}): Notification {+ const result: Notification = {+ date: 1000,+ request: {+ identifier: '1525991148',+ trigger: { channelId: 'dsh-bridge' },+ content: { title: 'Response complete', subtitle: null, body: 'Your answer is ready', categoryIdentifier: null, sound },+ },+ }+ Reflect.set(result.request.content, 'data', data)+ return result+}++function response(data?: unknown): NotificationResponse {+ return { notification: notification('default', data), actionIdentifier: 'expo.modules.notifications.actions.DEFAULT' }+}++async function mountNotifications() {+ const hooks = await import('./use-notifications')+ const { connection } = await import('@/store/modules/connection')+ hooks.useNotifications()+ expect(effects).toHaveLength(1)+ const effect = effects[0]+ if (!effect)+ throw new Error('Notification effect was not registered')+ const cleanup = effect()+ if (typeof cleanup !== 'function')+ throw new Error('Notification effect did not provide cleanup')+ dispose = cleanup+ const handler: NotificationHandler | null | undefined = native.setNotificationHandler.mock.calls[0]?.[0]+ const listener = native.addNotificationResponseReceivedListener.mock.calls[0]?.[0]+ expect(handler).not.toBeNull()+ expect(listener).toBeTypeOf('function')+ if (!handler || !listener)+ throw new Error('Native notification handlers were not registered')+ return { ...hooks, connection, handler, listener }+}++beforeEach(() => {+ vi.resetModules()+ vi.resetAllMocks()+ native.appState.currentState = 'active'+ native.platform.OS = 'android'+ effects = []+ dispose = undefined+ native.useEffect.mockImplementation((effect) => {+ effects.push(effect)+ })+ native.setNotificationChannelAsync.mockResolvedValue(null)+ native.getPermissionsAsync.mockResolvedValue(permissionGranted)+ native.requestPermissionsAsync.mockResolvedValue(permissionGranted)+ native.scheduleNotificationAsync.mockResolvedValue('native-id')+ native.addNotificationResponseReceivedListener.mockReturnValue({ remove: native.remove })+ native.getLastNotificationResponseAsync.mockResolvedValue(null)+ native.clearLastNotificationResponseAsync.mockResolvedValue(undefined)+})++afterEach(() => {+ dispose?.()+ vi.restoreAllMocks()+ vi.resetAllMocks()+ vi.useRealTimers()+ vi.unstubAllGlobals()+ vi.unstubAllEnvs()+})++describe('native notification delivery', () => {+ it('suppresses foreground delivery before touching the native permission API', async () => {+ const { sendNativeNotification } = await import('./use-notifications')++ await sendNativeNotification(message, origin)++ expect(native.setNotificationChannelAsync).not.toHaveBeenCalled()+ expect(native.getPermissionsAsync).not.toHaveBeenCalled()+ expect(native.requestPermissionsAsync).not.toHaveBeenCalled()+ expect(native.scheduleNotificationAsync).not.toHaveBeenCalled()+ })++ it.each([+ [false, 'dsh-bridge', true],+ [true, 'dsh-bridge-silent', false],+ ] as const)('delivers Android silent=%s immediately on %s with native sound=%s', async (silent, channelId, sound) => {+ native.appState.currentState = 'background'+ const { sendNativeNotification } = await import('./use-notifications')++ await sendNativeNotification({ ...message, silent }, origin)++ expect(native.setNotificationChannelAsync.mock.calls).toEqual([+ ['dsh-bridge', { name: i18n.t('notification.channel'), importance: 6, sound: 'default', vibrationPattern: [0, 200] }],+ ['dsh-bridge-silent', { name: i18n.t('notification.channelSilent'), importance: 5, sound: null, enableVibrate: false }],+ ])+ expect(native.scheduleNotificationAsync.mock.calls).toEqual([[{+ identifier: '1525991148',+ content: {+ title: 'Response complete',+ body: 'Your answer is ready',+ sound,+ data: { origin: 'https://harness.test:3080', sessionId: 'session', title: 'Response complete', tag: 'dsh-notification-session-1' },+ },+ trigger: { channelId },+ }]])+ expect(native.requestPermissionsAsync).not.toHaveBeenCalled()+ })++ it('delivers an iOS notification immediately without creating Android channels', async () => {+ native.appState.currentState = 'background'+ native.platform.OS = 'ios'+ const { sendNativeNotification } = await import('./use-notifications')++ await sendNativeNotification(message, origin)++ expect(native.setNotificationChannelAsync).not.toHaveBeenCalled()+ expect(native.scheduleNotificationAsync).toHaveBeenCalledExactlyOnceWith({+ identifier: '1525991148',+ content: {+ title: 'Response complete',+ body: 'Your answer is ready',+ sound: true,+ data: { origin, sessionId: 'session', title: 'Response complete', tag: 'dsh-notification-session-1' },+ },+ trigger: null,+ })+ })++ it('never presents a permission prompt from the background when access is denied', async () => {+ native.appState.currentState = 'background'+ native.getPermissionsAsync.mockResolvedValue(permissionDenied)+ const { sendNativeNotification } = await import('./use-notifications')++ await sendNativeNotification(message, origin)++ expect(native.getPermissionsAsync).toHaveBeenCalledExactlyOnceWith()+ expect(native.requestPermissionsAsync).not.toHaveBeenCalled()+ expect(native.scheduleNotificationAsync).not.toHaveBeenCalled()+ })++ it('shares a single native permission check and prompt across concurrent callers', async () => {+ const check = Promise.withResolvers<NotificationPermissionsStatus>()+ const request = Promise.withResolvers<NotificationPermissionsStatus>()+ const requestStarted = Promise.withResolvers<void>()+ native.getPermissionsAsync.mockReturnValue(check.promise)+ native.requestPermissionsAsync.mockImplementation(() => {+ requestStarted.resolve()+ return request.promise+ })+ const { requestNotificationAccess } = await import('./use-notifications')++ const first = requestNotificationAccess()+ expect(requestNotificationAccess()).toBe(first)+ check.resolve(permissionDenied)+ await requestStarted.promise+ expect(requestNotificationAccess()).toBe(first)+ expect(native.getPermissionsAsync).toHaveBeenCalledTimes(1)+ expect(native.requestPermissionsAsync).toHaveBeenCalledExactlyOnceWith()+ request.resolve(permissionGranted)+ await expect(first).resolves.toBe(true)+ expect(native.setNotificationChannelAsync).toHaveBeenCalledTimes(2)+ })++ it('retries channel initialization after a native failure', async () => {+ const error = new Error('Android channel unavailable')+ const report = vi.spyOn(console, 'error').mockImplementation(() => {})+ native.setNotificationChannelAsync.mockRejectedValueOnce(error)+ const { requestNotificationAccess } = await import('./use-notifications')++ await expect(requestNotificationAccess()).resolves.toBe(false)+ expect(report).toHaveBeenCalledExactlyOnceWith('[notification] permission request failed:', error)+ expect(native.getPermissionsAsync).not.toHaveBeenCalled()+ await expect(requestNotificationAccess()).resolves.toBe(true)++ expect(native.setNotificationChannelAsync).toHaveBeenCalledTimes(4)+ expect(native.getPermissionsAsync).toHaveBeenCalledExactlyOnceWith()+ })++ it.each(['getPermissionsAsync', 'requestPermissionsAsync'] as const)('retries permission after %s rejects', async (operation) => {+ const error = new Error(`${operation} failed`)+ const report = vi.spyOn(console, 'error').mockImplementation(() => {})+ native.getPermissionsAsync.mockResolvedValue(operation === 'requestPermissionsAsync' ? permissionDenied : permissionGranted)+ native[operation].mockRejectedValueOnce(error)+ const { requestNotificationAccess } = await import('./use-notifications')++ await expect(requestNotificationAccess()).resolves.toBe(false)+ expect(report).toHaveBeenCalledExactlyOnceWith('[notification] permission request failed:', error)+ await expect(requestNotificationAccess()).resolves.toBe(true)++ expect(native.getPermissionsAsync).toHaveBeenCalledTimes(2)+ expect(native.requestPermissionsAsync).toHaveBeenCalledTimes(operation === 'requestPermissionsAsync' ? 2 : 0)+ expect(native.setNotificationChannelAsync).toHaveBeenCalledTimes(2)+ })++ it('observes a settings grant on the next background notification', async () => {+ native.appState.currentState = 'background'+ native.getPermissionsAsync.mockResolvedValueOnce(permissionDenied).mockResolvedValueOnce(permissionGranted)+ const { sendNativeNotification } = await import('./use-notifications')++ await sendNativeNotification(message, origin)+ expect(native.scheduleNotificationAsync).not.toHaveBeenCalled()+ await sendNativeNotification(message, origin)++ expect(native.getPermissionsAsync).toHaveBeenCalledTimes(2)+ expect(native.scheduleNotificationAsync).toHaveBeenCalledTimes(1)+ expect(native.requestPermissionsAsync).not.toHaveBeenCalled()+ })++ it('observes a settings revocation rather than caching granted access', async () => {+ native.appState.currentState = 'background'+ native.getPermissionsAsync.mockResolvedValueOnce(permissionGranted).mockResolvedValueOnce(permissionDenied)+ const { sendNativeNotification } = await import('./use-notifications')++ await sendNativeNotification(message, origin)+ await sendNativeNotification(message, origin)++ expect(native.getPermissionsAsync).toHaveBeenCalledTimes(2)+ expect(native.scheduleNotificationAsync).toHaveBeenCalledTimes(1)+ expect(native.requestPermissionsAsync).not.toHaveBeenCalled()+ })++ it('drops delivery when the app becomes active while native permission is pending', async () => {+ native.appState.currentState = 'background'+ const check = Promise.withResolvers<NotificationPermissionsStatus>()+ const checkStarted = Promise.withResolvers<void>()+ native.getPermissionsAsync.mockImplementation(() => {+ checkStarted.resolve()+ return check.promise+ })+ const { sendNativeNotification } = await import('./use-notifications')++ const pending = sendNativeNotification(message, origin)+ await checkStarted.promise+ native.appState.currentState = 'active'+ check.resolve(permissionGranted)+ await pending++ expect(native.scheduleNotificationAsync).not.toHaveBeenCalled()+ })++ it('reports native scheduling failure without blocking the next delivery', async () => {+ native.appState.currentState = 'background'+ const error = new Error('Native schedule failed')+ const report = vi.spyOn(console, 'error').mockImplementation(() => {})+ native.scheduleNotificationAsync.mockRejectedValueOnce(error)+ const { sendNativeNotification } = await import('./use-notifications')++ await expect(sendNativeNotification(message, origin)).resolves.toBeUndefined()+ expect(report).toHaveBeenCalledExactlyOnceWith('[notification] send failed:', error)+ await sendNativeNotification(message, origin)++ expect(native.scheduleNotificationAsync).toHaveBeenCalledTimes(2)+ expect(report).toHaveBeenCalledTimes(1)+ })+})++describe('native notification presentation', () => {+ it('suppresses foreground banners, list entries, sound, and badge updates', async () => {+ const { handler } = await mountNotifications()++ await expect(handler.handleNotification(notification('default'))).resolves.toEqual({+ shouldShowBanner: false,+ shouldShowList: false,+ shouldPlaySound: false,+ shouldSetBadge: false,+ })+ })++ it.each(['default', null] as const)('uses Expo output sound=%s to select background audio', async (sound) => {+ const { handler } = await mountNotifications()+ native.appState.currentState = 'background'++ await expect(handler.handleNotification(notification(sound))).resolves.toEqual({+ shouldShowBanner: true,+ shouldShowList: true,+ shouldPlaySound: sound === 'default',+ shouldSetBadge: false,+ })+ })+})++describe('native notification clicks', () => {+ it('restores a validated cold click into the real connection focus queue', async () => {+ const cold = response()+ const restore = Promise.withResolvers<NotificationResponse | null>()+ native.getLastNotificationResponseAsync.mockReturnValue(restore.promise)+ const { connection } = await mountNotifications()+ expect(connection.pendingFocus).toBeNull()++ restore.resolve(cold)+ await restore.promise++ expect(connection.pendingFocus).toEqual({ origin, sessionId: 'session', title: 'Response complete', tag: 'dsh-notification-session-1' })+ expect(native.clearLastNotificationResponseAsync).toHaveBeenCalledExactlyOnceWith()+ })++ it('queues a validated warm click with bounded session metadata', async () => {+ const { connection, listener } = await mountNotifications()++ listener(response({ origin, sessionId: 's'.repeat(300), title: 't'.repeat(300), tag: 'g'.repeat(300) }))++ expect(connection.pendingFocus).toEqual({ origin, sessionId: 's'.repeat(256), title: 't'.repeat(256), tag: 'g'.repeat(256) })+ expect(native.clearLastNotificationResponseAsync).toHaveBeenCalledExactlyOnceWith()+ })++ it('normalizes absent or non-string optional click metadata', async () => {+ const { connection, listener } = await mountNotifications()++ listener(response({ origin, sessionId: 12, title: null }))++ expect(connection.pendingFocus).toEqual({ origin, sessionId: '', title: '', tag: '' })+ expect(native.clearLastNotificationResponseAsync).toHaveBeenCalledExactlyOnceWith()+ })++ it.each([+ undefined,+ null,+ [],+ {},+ { origin: 12 },+ { origin: 'javascript:alert(1)' },+ { origin: 'https://user:[email protected]:3080' },+ { origin: 'harness.test:3080' },+ { origin: 'https://harness.test:3080/' },+ { origin: 'https://harness.test:3080?auth=secret' },+ { origin: 'https://HARNESS.test:3080' },+ ])('rejects native click data without an exact canonical HTTP origin: %j', async (data) => {+ const { connection, listener } = await mountNotifications()+ const malformed = response()+ Reflect.set(malformed.notification.request.content, 'data', data)++ listener(malformed)++ expect(connection.pendingFocus).toBeNull()+ expect(native.clearLastNotificationResponseAsync).not.toHaveBeenCalled()+ })++ it('ignores non-default notification actions', async () => {+ const { connection, listener } = await mountNotifications()++ listener({ ...response(), actionIdentifier: 'reply-action' })++ expect(connection.pendingFocus).toBeNull()+ expect(native.clearLastNotificationResponseAsync).not.toHaveBeenCalled()+ })++ it('coalesces a restored cold click with its immediate warm duplicate', async () => {+ vi.useFakeTimers()+ vi.setSystemTime(1000)+ const restore = Promise.withResolvers<NotificationResponse | null>()+ native.getLastNotificationResponseAsync.mockReturnValue(restore.promise)+ const { connection, listener } = await mountNotifications()+ const click = response()+ restore.resolve(click)+ await restore.promise+ connection.queueFocus(null)++ listener(click)++ expect(connection.pendingFocus).toBeNull()+ expect(native.clearLastNotificationResponseAsync).toHaveBeenCalledTimes(1)+ })++ it('does not replay a warm click when its cold snapshot resolves after the coalescing window', async () => {+ vi.useFakeTimers()+ vi.setSystemTime(1000)+ const restore = Promise.withResolvers<NotificationResponse | null>()+ native.getLastNotificationResponseAsync.mockReturnValue(restore.promise)+ const { connection, listener } = await mountNotifications()+ const click = response()+ listener(click)+ connection.queueFocus(null)+ vi.advanceTimersByTime(1000)++ restore.resolve(click)+ await restore.promise++ expect(connection.pendingFocus).toBeNull()+ expect(native.clearLastNotificationResponseAsync).toHaveBeenCalledTimes(1)+ })++ it('does not let an older cold snapshot overwrite a newer validated warm focus', async () => {+ const restore = Promise.withResolvers<NotificationResponse | null>()+ native.getLastNotificationResponseAsync.mockReturnValue(restore.promise)+ const { connection, listener } = await mountNotifications()+ const oldClick = response({ origin, sessionId: 'old-session', title: 'Old answer', tag: 'old-tag' })+ const newClick = response({ origin, sessionId: 'new-session', title: 'New answer', tag: 'new-tag' })+ newClick.notification.request.identifier = 'new-native-id'+ newClick.notification.date = 2000+ listener(newClick)++ restore.resolve(oldClick)+ await restore.promise++ expect(connection.pendingFocus).toEqual({ origin, sessionId: 'new-session', title: 'New answer', tag: 'new-tag' })+ expect(native.clearLastNotificationResponseAsync).toHaveBeenCalledTimes(1)+ })++ it('still restores a valid cold click after rejecting a malformed warm event', async () => {+ const restore = Promise.withResolvers<NotificationResponse | null>()+ native.getLastNotificationResponseAsync.mockReturnValue(restore.promise)+ const { connection, listener } = await mountNotifications()+ listener(response({ origin: 'https://user:[email protected]:3080' }))++ restore.resolve(response())+ await restore.promise++ expect(connection.pendingFocus).toEqual({ origin, sessionId: 'session', title: 'Response complete', tag: 'dsh-notification-session-1' })+ expect(native.clearLastNotificationResponseAsync).toHaveBeenCalledTimes(1)+ })++ it('coalesces warm duplicates for 250ms without suppressing a later genuine click', async () => {+ vi.useFakeTimers()+ vi.setSystemTime(1000)+ const { connection, listener } = await mountNotifications()+ const click = response()+ listener(click)+ connection.queueFocus(null)+ vi.advanceTimersByTime(249)+ listener(click)+ expect(connection.pendingFocus).toBeNull()+ expect(native.clearLastNotificationResponseAsync).toHaveBeenCalledTimes(1)+ vi.advanceTimersByTime(1)++ listener(click)++ expect(connection.pendingFocus).toEqual({ origin, sessionId: 'session', title: 'Response complete', tag: 'dsh-notification-session-1' })+ expect(native.clearLastNotificationResponseAsync).toHaveBeenCalledTimes(2)+ })++ it('distinguishes native responses sharing an identifier but having different dates', async () => {+ const { connection, listener } = await mountNotifications()+ const first = response()+ const second = response({ origin, sessionId: 'next-session', title: 'Next answer', tag: 'next-tag' })+ second.notification.date = 2000+ listener(first)+ connection.queueFocus(null)++ listener(second)++ expect(connection.pendingFocus).toEqual({ origin, sessionId: 'next-session', title: 'Next answer', tag: 'next-tag' })+ expect(native.clearLastNotificationResponseAsync).toHaveBeenCalledTimes(2)+ })++ it('disposes presentation and ignores retained warm callbacks or pending cold responses', async () => {+ const restore = Promise.withResolvers<NotificationResponse | null>()+ native.getLastNotificationResponseAsync.mockReturnValue(restore.promise)+ const { connection, listener } = await mountNotifications()+ if (!dispose)+ throw new Error('Notification cleanup is missing')+ dispose()+ dispose = undefined+ listener(response())+ restore.resolve(response())+ await restore.promise++ expect(connection.pendingFocus).toBeNull()+ expect(native.remove).toHaveBeenCalledExactlyOnceWith()+ expect(native.setNotificationHandler).toHaveBeenLastCalledWith(null)+ expect(native.clearLastNotificationResponseAsync).not.toHaveBeenCalled()+ })++ it('reports cold response restoration failure without dropping subsequent warm clicks', async () => {+ const error = new Error('Cold response unavailable')+ const report = vi.spyOn(console, 'error').mockImplementation(() => {})+ const restore = Promise.withResolvers<NotificationResponse | null>()+ native.getLastNotificationResponseAsync.mockReturnValue(restore.promise)+ const { connection, listener } = await mountNotifications()+ restore.reject(error)+ await expect(restore.promise).rejects.toThrow('Cold response unavailable')++ listener(response())++ expect(report).toHaveBeenCalledExactlyOnceWith('[notification] restore response failed:', error)+ expect(connection.pendingFocus).toEqual({ origin, sessionId: 'session', title: 'Response complete', tag: 'dsh-notification-session-1' })+ })++ it('reports native response clearing failure while preserving queued focus', async () => {+ const error = new Error('Response clear failed')+ const report = vi.spyOn(console, 'error').mockImplementation(() => {})+ const clear = Promise.withResolvers<void>()+ native.clearLastNotificationResponseAsync.mockReturnValue(clear.promise)+ const { connection, listener } = await mountNotifications()+ listener(response())+ clear.reject(error)+ await expect(clear.promise).rejects.toThrow('Response clear failed')++ expect(report).toHaveBeenCalledExactlyOnceWith('[notification] clear response failed:', error)+ expect(connection.pendingFocus).toEqual({ origin, sessionId: 'session', title: 'Response complete', tag: 'dsh-notification-session-1' })+ })+})diff --git a/src-native/hooks/use-notifications.ts b/src-native/hooks/use-notifications.tsnew file mode 100644index 00000000..ae16eae2--- /dev/null+++ b/src-native/hooks/use-notifications.ts@@ -0,0 +1,128 @@+import * as Notifications from 'expo-notifications'+import { useEffect } from 'react'+import { AppState, Platform } from 'react-native'+import { NOTIFICATION_CHANNEL } from '@/config/constants'+import { i18n } from '@/i18n'+import { connection } from '@/store/modules/connection'+import { isRecord, parseQrPayload } from '@/utils/bridge-protocol'+import { createNotificationDispatcher, createResponseCoalescer } from '@/utils/notification-policy'++const silentChannel = `${NOTIFICATION_CHANNEL}-silent`+let channelsReady: Promise<void> | undefined++function prepareChannels(): Promise<void> {+ if (Platform.OS !== 'android')+ return Promise.resolve()+ channelsReady ??= Promise.all([+ Notifications.setNotificationChannelAsync(NOTIFICATION_CHANNEL, {+ name: i18n.t('notification.channel'),+ importance: Notifications.AndroidImportance.HIGH,+ sound: 'default',+ vibrationPattern: [0, 200],+ }),+ Notifications.setNotificationChannelAsync(silentChannel, {+ name: i18n.t('notification.channelSilent'),+ importance: Notifications.AndroidImportance.DEFAULT,+ sound: null,+ enableVibrate: false,+ }),+ ]).then(() => {}).catch((error) => {+ channelsReady = undefined+ throw error+ })+ return channelsReady+}++const dispatcher = createNotificationDispatcher({+ isForeground: () => AppState.currentState === 'active',+ async checkPermission() {+ await prepareChannels()+ return (await Notifications.getPermissionsAsync()).granted+ },+ async requestPermission() {+ if (AppState.currentState !== 'active')+ return false+ return (await Notifications.requestPermissionsAsync()).granted+ },+ async deliver(message, origin, identifier) {+ let trigger: Notifications.NotificationTriggerInput = null+ if (Platform.OS === 'android') {+ let channelId = NOTIFICATION_CHANNEL+ if (message.silent)+ channelId = silentChannel+ trigger = { channelId }+ }+ await Notifications.scheduleNotificationAsync({+ identifier,+ content: {+ title: message.title,+ body: message.body,+ sound: !message.silent,+ data: { origin, sessionId: message.sessionId, title: message.title, tag: message.tag },+ },+ trigger,+ })+ },+ reportError(message, error) {+ console.error(message, error)+ },+})++export const sendNativeNotification = dispatcher.notify+export const requestNotificationAccess = dispatcher.ensurePermission++export function useNotifications(): void {+ // keep:effect Register and dispose native notification presentation and response listeners.+ useEffect(() => {+ const acceptResponse = createResponseCoalescer()+ let disposed = false+ let warmResponseReceived = false+ Notifications.setNotificationHandler({+ async handleNotification(notification) {+ const background = AppState.currentState !== 'active'+ return {+ shouldShowBanner: background,+ shouldShowList: background,+ shouldPlaySound: background && notification.request.content.sound !== null,+ shouldSetBadge: false,+ }+ },+ })+ function handleResponse(response: Notifications.NotificationResponse): boolean {+ if (disposed || response.actionIdentifier !== Notifications.DEFAULT_ACTION_IDENTIFIER)+ return false+ const data: unknown = response.notification.request.content.data+ if (!isRecord(data) || typeof data.origin !== 'string')+ return false+ const address = parseQrPayload(data.origin)+ if (!address || address.id !== data.origin)+ return false+ const key = `${response.notification.request.identifier}:${response.notification.date}:${response.actionIdentifier}`+ if (!acceptResponse(key))+ return true+ connection.queueFocus({+ origin: address.id,+ sessionId: typeof data.sessionId === 'string' ? data.sessionId.slice(0, 256) : '',+ title: typeof data.title === 'string' ? data.title.slice(0, 256) : '',+ tag: typeof data.tag === 'string' ? data.tag.slice(0, 256) : '',+ })+ void Notifications.clearLastNotificationResponseAsync().catch(error => console.error('[notification] clear response failed:', error))+ return true+ }+ const responseSubscription = Notifications.addNotificationResponseReceivedListener((response) => {+ if (handleResponse(response))+ warmResponseReceived = true+ })+ void Notifications.getLastNotificationResponseAsync()+ .then((response) => {+ if (response && !warmResponseReceived)+ handleResponse(response)+ })+ .catch(error => console.error('[notification] restore response failed:', error))+ return () => {+ disposed = true+ responseSubscription.remove()+ Notifications.setNotificationHandler(null)+ }+ }, [])+}diff --git a/src-native/i18n/index.detector.ts b/src-native/i18n/index.detector.tsnew file mode 100644index 00000000..111fbe7e--- /dev/null+++ b/src-native/i18n/index.detector.ts@@ -0,0 +1,17 @@+import type { LanguageDetectorModule } from 'i18next'+import { getLocales } from 'expo-localization'++/**+ * App 内没有语言切换入口,语言唯一的来源是设备区域设置,因此检测是**同步**的:+ * 不需要异步 `LanguageDetectorAsyncModule`(lexim 那种「读 store 再回退设备区域」),+ * 也就不需要把语言写回持久化存储。+ */+export function detectLanguage(): string {+ const tag = getLocales()[0]?.languageTag ?? 'en-US'+ return tag.toLowerCase().startsWith('zh') ? 'zh-CN' : 'en-US'+}++export const languageDetector: LanguageDetectorModule = {+ type: 'languageDetector',+ detect: () => detectLanguage(),+}diff --git a/src-native/i18n/index.resource.ts b/src-native/i18n/index.resource.tsnew file mode 100644index 00000000..45aeff0e--- /dev/null+++ b/src-native/i18n/index.resource.ts@@ -0,0 +1,11 @@+import en_US from './locales/en-US.json'+import zh_CN from './locales/zh-CN.json'++/**+ * 语言资源静态打包进 bundle(App 没有语言包下载/后端拉取路径)。+ * 与桌面端 `src/i18n/index.resource.ts` 一致,只保留当前支持的两个区域。+ */+export const resources = {+ 'en-US': { translation: en_US },+ 'zh-CN': { translation: zh_CN },+} as constdiff --git a/src-native/i18n/index.ts b/src-native/i18n/index.tsnew file mode 100644index 00000000..1aa0cc41--- /dev/null+++ b/src-native/i18n/index.ts@@ -0,0 +1,28 @@+import i18next from 'i18next'+import { initReactI18next } from 'react-i18next'+import { languageDetector } from './index.detector'+import { resources } from './index.resource'++/**+ * 与应用同寿的 i18n 实例:+ * - 资源静态打包(仅 en-US / zh-CN),语言由设备区域同步推导(见 index.detector.ts);+ * - `initAsync: false` 保证模块作用域(store 模块、通知处理器等非 React 代码)里 `i18n.t` 立即可用;+ * - 扁平 dot-notation key + 关闭 keySeparator/nsSeparator,与桌面端 `src/i18n` 约定保持一致。+ */+const instance = i18next.use(languageDetector).use(initReactI18next)++void instance.init({+ resources,+ fallbackLng: {+ 'en-*': ['en-US'],+ 'zh-*': ['zh-CN'],+ 'default': ['en-US'],+ },+ interpolation: { escapeValue: false },+ react: { useSuspense: false },+ keySeparator: false,+ nsSeparator: false,+ initAsync: false,+})++export const i18n = instancediff --git a/src-native/i18n/locales/en-US.json b/src-native/i18n/locales/en-US.jsonnew file mode 100644index 00000000..d69eb00e--- /dev/null+++ b/src-native/i18n/locales/en-US.json@@ -0,0 +1,52 @@+{+ "app.name": "DSH Mobile",+ "common.cancel": "Cancel",+ "connection.scanning": "Scanning LAN ports…",+ "connection.checkingHistory": "Looking for an available connection",+ "connection.loading": "Connecting…",+ "connection.loadingSlow": "The page is loading slowly. Still waiting for a response; you can keep waiting or reconnect.",+ "connection.autoScan": "Scan LAN automatically",+ "connection.recentConnections": "Recent connections",+ "connection.refreshConnections": "Refresh recent connections",+ "connection.connectionInfo": "Connection details",+ "connection.currentConnection": "Current connection",+ "connection.noConnection": "Not connected",+ "connection.noHistory": "No recent connections",+ "connection.noHistoryAvailable": "No reachable saved connection. Choose a connection method.",+ "common.save": "Save",+ "connection.rename": "Rename",+ "connection.name": "Connection name",+ "connection.delete": "Delete connection",+ "connection.deleteConfirm": "Delete this saved connection?",+ "connection.deleteCurrentConfirm": "This connection is in use. Deleting it will disconnect and return to the initial screen. Continue?",+ "connection.editHint": "Long press to rename or delete the connection",+ "connection.reconnect": "Reconnect",+ "connection.disconnect": "Disconnect",+ "connection.swipeHint": "Swipe left to see connection details",+ "connection.swipeAccessibility": "Dismiss swipe guide",+ "connection.closeDrawer": "Close connection details",+ "connection.hostOffline": "Host temporarily unavailable",+ "connection.tokenRequired": "This host requires an access token. Scan the desktop QR code or sign in inside the page.",+ "connection.available": "Available",+ "connection.unavailable": "Unavailable",+ "connection.checking": "Checking",+ "connection.hostStatus": "{{host}}, {{status}}",+ "connection.noNetwork": "Cannot read the LAN IPv4 address. Connect to Wi-Fi or scan a QR code.",+ "connection.noHosts": "No reachable host found. Check that both devices share the same LAN, or scan a QR code.",+ "connection.scanFailed": "Scan failed. Check the network and try again.",+ "connection.connectionFailed": "Connection failed. Check the host address, network, or access token.",+ "connection.focusFailed": "Connection restored, but the session from the notification could not be located. Select it in the page.",+ "connection.storageFailed": "Cannot read or save connection records. Check the device storage permission and free space.",+ "scan.scanQr": "Scan QR code",+ "scan.closeScanner": "Close scanner",+ "scan.cameraTitle": "Scan to connect to DSH Mobile",+ "scan.cameraHint": "Scan the connection QR code shown by the desktop app or DSH Mobile",+ "scan.cameraPermission": "Camera permission is required to scan a connection QR code.",+ "scan.allowCamera": "Allow camera",+ "scan.openSettings": "Open system settings",+ "scan.cameraError": "Cannot open the camera. Check the camera permission and try again.",+ "scan.invalidQr": "The QR code contains no valid HTTP/HTTPS connection address.",+ "scan.qrRetry": "Scan again",+ "notification.channel": "Connection and task notifications",+ "notification.channelSilent": "Connection and task notifications · silent"+}diff --git a/src-native/i18n/locales/zh-CN.json b/src-native/i18n/locales/zh-CN.jsonnew file mode 100644index 00000000..16b2e845--- /dev/null+++ b/src-native/i18n/locales/zh-CN.json@@ -0,0 +1,52 @@+{+ "app.name": "DSH Mobile",+ "common.cancel": "取消",+ "connection.scanning": "扫描局域网端口中...",+ "connection.checkingHistory": "寻找可用连接",+ "connection.loading": "连接中…",+ "connection.loadingSlow": "页面加载较慢,仍在等待响应。可以继续等待或重新连接。",+ "connection.autoScan": "自动扫描局域网",+ "connection.recentConnections": "最近连接",+ "connection.refreshConnections": "刷新最近连接",+ "connection.connectionInfo": "连接信息",+ "connection.currentConnection": "当前连接",+ "connection.noConnection": "尚未连接",+ "connection.noHistory": "暂无最近连接",+ "connection.noHistoryAvailable": "未找到可用的历史连接,请选择连接方式。",+ "common.save": "保存",+ "connection.rename": "重命名",+ "connection.name": "连接名称",+ "connection.delete": "删除连接",+ "connection.deleteConfirm": "确定删除这条连接记录吗?",+ "connection.deleteCurrentConfirm": "这条连接正在使用。删除后将停止连接并返回初始页,是否继续?",+ "connection.editHint": "长按可重命名或删除连接",+ "connection.reconnect": "重新连接",+ "connection.disconnect": "断开连接",+ "connection.swipeHint": "向左滑查看连接信息",+ "connection.swipeAccessibility": "关闭滑动引导",+ "connection.closeDrawer": "关闭连接信息",+ "connection.hostOffline": "主机暂时不可用",+ "connection.tokenRequired": "该主机需要访问令牌,请用桌面端二维码扫码连接,或在页面内登录。",+ "connection.available": "可用",+ "connection.unavailable": "不可用",+ "connection.checking": "正在检测",+ "connection.hostStatus": "{{host}},{{status}}",+ "connection.noNetwork": "无法获取局域网 IPv4 地址,请连接 Wi-Fi 或使用扫码连接。",+ "connection.noHosts": "未发现可用主机,请检查设备是否在同一局域网,或扫码连接。",+ "connection.scanFailed": "扫描失败,请检查网络后重试。",+ "connection.connectionFailed": "连接失败,请检查主机地址、网络或访问令牌。",+ "connection.focusFailed": "已恢复连接,但未能定位通知对应会话,请在网页中手动选择。",+ "connection.storageFailed": "无法读取或保存连接记录,请检查设备存储权限和空间。",+ "scan.scanQr": "扫码连接",+ "scan.closeScanner": "关闭扫码",+ "scan.cameraTitle": "扫码连接 DSH Mobile",+ "scan.cameraHint": "扫描桌面端或 DSH Mobile 中的连接二维码",+ "scan.cameraPermission": "需要相机权限才能扫描连接二维码。",+ "scan.allowCamera": "允许使用相机",+ "scan.openSettings": "打开系统设置",+ "scan.cameraError": "无法打开相机,请检查相机权限后重试。",+ "scan.invalidQr": "二维码中没有有效的 HTTP/HTTPS 连接地址。",+ "scan.qrRetry": "重新扫码",+ "notification.channel": "连接与任务通知",+ "notification.channelSilent": "连接与任务通知 · 静音"+}diff --git a/src-native/services/bridge.test-utils.ts b/src-native/services/bridge.test-utils.tsnew file mode 100644index 00000000..7441c320--- /dev/null+++ b/src-native/services/bridge.test-utils.ts@@ -0,0 +1,71 @@+import { vi } from 'vitest'++export interface Deferred<T> {+ promise: Promise<T>+ resolve: (value: T) => void+ reject: (reason: unknown) => void+}++export function deferred<T>(): Deferred<T> {+ let resolve!: (value: T) => void+ let reject!: (reason: unknown) => void+ const promise = new Promise<T>((resolvePromise, rejectPromise) => {+ resolve = resolvePromise+ reject = rejectPromise+ })+ return { promise, resolve, reject }+}++export function jsonResponse(value: unknown, status = 200): Response {+ return new Response(JSON.stringify(value), { status, headers: { 'Content-Type': 'application/json' } })+}++export interface DeferredRequest {+ url: string+ signal: AbortSignal+ resolve: (response: Response) => void+}++export function deferredNetwork() {+ const requests: DeferredRequest[] = []+ let inFlight = 0+ let peak = 0+ const fetchMock = vi.fn<typeof fetch>((input, init) => {+ const signal = init?.signal+ if (!signal)+ throw new Error('Expected an abort signal at the network boundary')+ const result = deferred<Response>()+ inFlight+++ peak = Math.max(peak, inFlight)+ let settled = false+ function settle() {+ if (settled)+ return false+ settled = true+ inFlight--+ signal!.removeEventListener('abort', abort)+ return true+ }+ function abort() {+ if (settle())+ result.reject(new DOMException('The operation was aborted.', 'AbortError'))+ }+ function resolve(response: Response) {+ if (settle())+ result.resolve(response)+ }+ requests.push({ url: String(input), signal, resolve })+ signal.addEventListener('abort', abort, { once: true })+ if (signal.aborted)+ abort()+ return result.promise+ })+ vi.stubGlobal('fetch', fetchMock)+ function active() {+ return inFlight+ }+ function maximum() {+ return peak+ }+ return { fetchMock, requests, active, maximum }+}diff --git a/src-native/services/probe-bridge.test.ts b/src-native/services/probe-bridge.test.tsnew file mode 100644index 00000000..5dad3ef7--- /dev/null+++ b/src-native/services/probe-bridge.test.ts@@ -0,0 +1,209 @@+import type { BridgeAddress } from '@/utils/bridge-protocol'+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'+import { deferred, deferredNetwork, jsonResponse } from './bridge.test-utils'+import { probeBridge } from './probe-bridge'++const address: BridgeAddress = {+ id: 'https://bridge.local:8443',+ url: 'https://bridge.local:8443/workspaces/one?theme=dark',+ host: 'bridge.local',+ port: 8443,+ token: 'not-for-discovery',+}++beforeEach(() => {+ vi.useFakeTimers()+})++afterEach(() => {+ vi.restoreAllMocks()+ vi.unstubAllGlobals()+ vi.clearAllTimers()+ vi.useRealTimers()+})++describe('probeBridge identity', () => {+ it('accepts the strict bridge auth response and probes only the stable origin without credentials', async () => {+ const fetchMock = vi.fn<typeof fetch>().mockResolvedValue(jsonResponse({ enabled: true, mode: 'token_only', allowLoopback: false, token: 'response-secret' }))+ vi.stubGlobal('fetch', fetchMock)+ const signal = new AbortController().signal+ const removeListener = vi.spyOn(signal, 'removeEventListener')+ expect(await probeBridge(address, signal)).toEqual({ ...address, auth: { enabled: true, mode: 'token_only', allowLoopback: false } })+ expect(fetchMock).toHaveBeenCalledTimes(1)+ expect(fetchMock).toHaveBeenCalledWith('https://bridge.local:8443/__dsh_bridge__/auth-status', {+ signal: expect.any(AbortSignal),+ headers: { Accept: 'application/json' },+ cache: 'no-store',+ redirect: 'error',+ })+ expect(removeListener).toHaveBeenCalledWith('abort', expect.any(Function))+ expect(vi.getTimerCount()).toBe(0)+ })++ it('requires the literal DSH manifest for a legacy auth response without allowLoopback', async () => {+ const fetchMock = vi.fn<typeof fetch>()+ .mockResolvedValueOnce(jsonResponse({ enabled: false }))+ .mockResolvedValueOnce(jsonResponse({ name: 'DeepSeek Harness', short_name: 'DSH' }))+ vi.stubGlobal('fetch', fetchMock)+ expect(await probeBridge(address, new AbortController().signal)).toEqual({ ...address, auth: { enabled: false } })+ expect(fetchMock.mock.calls.map(call => call[0])).toEqual([+ 'https://bridge.local:8443/__dsh_bridge__/auth-status',+ 'https://bridge.local:8443/manifest.webmanifest',+ ])+ expect(fetchMock.mock.calls[1]?.[1]).toEqual({+ signal: fetchMock.mock.calls[0]?.[1]?.signal,+ headers: { Accept: 'application/manifest+json' },+ cache: 'no-store',+ redirect: 'error',+ })+ expect(vi.getTimerCount()).toBe(0)+ })++ it.each([+ null,+ [],+ {},+ { enabled: 'false', allowLoopback: true },+ { enabled: true, mode: 1, allowLoopback: false },+ { enabled: false, allowLoopback: 'true' },+ ])('rejects malformed auth identity %j before manifest fallback', async (body) => {+ const fetchMock = vi.fn<typeof fetch>().mockResolvedValue(jsonResponse(body))+ vi.stubGlobal('fetch', fetchMock)+ expect(await probeBridge(address, new AbortController().signal)).toBeNull()+ expect(fetchMock).toHaveBeenCalledTimes(1)+ expect(vi.getTimerCount()).toBe(0)+ })++ it.each([+ {},+ { name: 'DeepSeek Harness' },+ { short_name: 'DSH' },+ { name: 'Other app', short_name: 'DSH' },+ { name: 'DeepSeek Harness', short_name: 'OTHER' },+ { name: 'deepseek harness', short_name: 'DSH' },+ ])('does not identify a legacy service with a foreign manifest %j', async (body) => {+ const fetchMock = vi.fn<typeof fetch>()+ .mockResolvedValueOnce(jsonResponse({ enabled: false }))+ .mockResolvedValueOnce(jsonResponse(body))+ vi.stubGlobal('fetch', fetchMock)+ expect(await probeBridge(address, new AbortController().signal)).toBeNull()+ expect(fetchMock).toHaveBeenCalledTimes(2)+ })++ it('rejects an HTTP error rather than interpreting its auth body', async () => {+ const response = jsonResponse({ enabled: false, allowLoopback: true }, 401)+ const json = vi.spyOn(response, 'json')+ const fetchMock = vi.fn<typeof fetch>().mockResolvedValue(response)+ vi.stubGlobal('fetch', fetchMock)+ expect(await probeBridge(address, new AbortController().signal)).toBeNull()+ expect(json).not.toHaveBeenCalled()+ expect(fetchMock).toHaveBeenCalledTimes(1)+ })++ it('rejects a failing manifest HTTP status even with a matching identity body', async () => {+ vi.stubGlobal('fetch', vi.fn<typeof fetch>()+ .mockResolvedValueOnce(jsonResponse({ enabled: false }))+ .mockResolvedValueOnce(jsonResponse({ name: 'DeepSeek Harness', short_name: 'DSH' }, 404)))+ expect(await probeBridge(address, new AbortController().signal)).toBeNull()+ })++ it('rejects invalid JSON from the auth endpoint', async () => {+ vi.stubGlobal('fetch', vi.fn<typeof fetch>().mockResolvedValue(new Response('not JSON')))+ expect(await probeBridge(address, new AbortController().signal)).toBeNull()+ expect(vi.getTimerCount()).toBe(0)+ })++ it('rejects invalid JSON from the legacy manifest endpoint', async () => {+ vi.stubGlobal('fetch', vi.fn<typeof fetch>()+ .mockResolvedValueOnce(jsonResponse({ enabled: false }))+ .mockResolvedValueOnce(new Response('not JSON')))+ expect(await probeBridge(address, new AbortController().signal)).toBeNull()+ })++ it('handles a rejected network request as an unavailable bridge', async () => {+ vi.stubGlobal('fetch', vi.fn<typeof fetch>().mockRejectedValue(new TypeError('Network unavailable')))+ expect(await probeBridge(address, new AbortController().signal)).toBeNull()+ expect(vi.getTimerCount()).toBe(0)+ })+})++describe('probeBridge cancellation', () => {+ it('does not fetch or allocate a timer for an already aborted caller', async () => {+ const network = deferredNetwork()+ const caller = new AbortController()+ caller.abort()+ expect(await probeBridge(address, caller.signal)).toBeNull()+ expect(network.fetchMock).not.toHaveBeenCalled()+ expect(vi.getTimerCount()).toBe(0)+ })++ it('propagates caller cancellation to the real request signal', async () => {+ const network = deferredNetwork()+ const caller = new AbortController()+ const pending = probeBridge(address, caller.signal, 500)+ expect(network.requests[0]?.signal.aborted).toBe(false)+ caller.abort()+ expect(await pending).toBeNull()+ expect(network.requests[0]?.signal.aborted).toBe(true)+ expect(network.active()).toBe(0)+ expect(vi.getTimerCount()).toBe(0)+ })++ it('aborts at the exact default 600ms timeout', async () => {+ const network = deferredNetwork()+ const pending = probeBridge(address, new AbortController().signal)+ await vi.advanceTimersByTimeAsync(599)+ expect(network.requests[0]?.signal.aborted).toBe(false)+ expect(network.active()).toBe(1)+ await vi.advanceTimersByTimeAsync(1)+ expect(await pending).toBeNull()+ expect(network.requests[0]?.signal.aborted).toBe(true)+ expect(network.active()).toBe(0)+ expect(vi.getTimerCount()).toBe(0)+ })++ it('uses one timeout budget across auth and manifest requests', async () => {+ const network = deferredNetwork()+ const pending = probeBridge(address, new AbortController().signal, 100)+ await vi.advanceTimersByTimeAsync(60)+ network.requests[0]!.resolve(jsonResponse({ enabled: false }))+ await vi.advanceTimersByTimeAsync(0)+ expect(network.requests.map(request => request.url)).toEqual([+ 'https://bridge.local:8443/__dsh_bridge__/auth-status',+ 'https://bridge.local:8443/manifest.webmanifest',+ ])+ await vi.advanceTimersByTimeAsync(39)+ expect(network.requests[1]?.signal.aborted).toBe(false)+ await vi.advanceTimersByTimeAsync(1)+ expect(await pending).toBeNull()+ expect(network.requests[1]?.signal.aborted).toBe(true)+ expect(network.active()).toBe(0)+ })++ it('discards an auth body that finishes parsing after the caller aborts', async () => {+ const body = deferred<unknown>()+ const response = jsonResponse({})+ vi.spyOn(response, 'json').mockReturnValue(body.promise)+ const fetchMock = vi.fn<typeof fetch>().mockResolvedValue(response)+ vi.stubGlobal('fetch', fetchMock)+ const caller = new AbortController()+ const pending = probeBridge(address, caller.signal)+ await vi.advanceTimersByTimeAsync(0)+ caller.abort()+ body.resolve({ enabled: false })+ expect(await pending).toBeNull()+ expect(fetchMock).toHaveBeenCalledTimes(1)+ })++ it('discards a late successful response even when a network mock ignores abort', async () => {+ const response = deferred<Response>()+ const fetchMock = vi.fn<typeof fetch>().mockReturnValue(response.promise)+ vi.stubGlobal('fetch', fetchMock)+ const caller = new AbortController()+ const pending = probeBridge(address, caller.signal)+ caller.abort()+ response.resolve(jsonResponse({ enabled: false, allowLoopback: true }))+ expect(await pending).toBeNull()+ expect(fetchMock.mock.calls[0]?.[1]?.signal?.aborted).toBe(true)+ })+})diff --git a/src-native/services/probe-bridge.ts b/src-native/services/probe-bridge.tsnew file mode 100644index 00000000..0fa066be--- /dev/null+++ b/src-native/services/probe-bridge.ts@@ -0,0 +1,42 @@+import type { AuthStatus } from '@/apis/index.types'+import type { BridgeAddress } from '@/utils/bridge-protocol'+import { getAuthStatus, getManifest } from '@/apis/index'+import { PROBE_TIMEOUT_MS } from '@/config/constants'++export interface BridgeHost extends BridgeAddress {+ auth: AuthStatus+}++/**+ * 探测单个候选地址是否为可用的 DSH 宿主。+ * 超时、网络错误、非 2xx、响应体不合法一律返回 null(扫描靠 null 判定「不可用」)。+ */+export async function probeBridge(address: BridgeAddress, signal: AbortSignal, timeoutMs = PROBE_TIMEOUT_MS): Promise<BridgeHost | null> {+ if (signal.aborted)+ return null+ const controller = new AbortController()+ const timeout = setTimeout(() => controller.abort(), timeoutMs)+ function abort() {+ controller.abort()+ }+ signal.addEventListener('abort', abort, { once: true })+ try {+ const auth = await getAuthStatus({ baseURL: address.id }, { signal: controller.signal })+ if (!auth || controller.signal.aborted)+ return null+ // 旧版宿主不返回 allowLoopback,此时用 manifest 兜底确认这是一台 DSH 宿主。+ if (auth.allowLoopback === undefined) {+ const manifest = await getManifest({ baseURL: address.id }, { signal: controller.signal })+ if (!manifest || controller.signal.aborted)+ return null+ }+ return { ...address, auth }+ }+ catch {+ return null+ }+ finally {+ clearTimeout(timeout)+ signal.removeEventListener('abort', abort)+ }+}diff --git a/src-native/services/scan-candidates.test.ts b/src-native/services/scan-candidates.test.tsnew file mode 100644index 00000000..d51f479c--- /dev/null+++ b/src-native/services/scan-candidates.test.ts@@ -0,0 +1,190 @@+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'+import { deferredNetwork, jsonResponse } from './bridge.test-utils'+import { scanCandidates } from './scan-candidates'++beforeEach(() => {+ vi.useFakeTimers()+})++afterEach(() => {+ vi.restoreAllMocks()+ vi.unstubAllGlobals()+ vi.clearAllTimers()+ vi.useRealTimers()+})++describe('scanCandidates scheduling', () => {+ it('limits in-flight workers to two and publishes each successful host in completion order', async () => {+ const network = deferredNetwork()+ const onFound = vi.fn()+ const pending = scanCandidates([+ { host: '10.0.0.1', port: 3080 },+ { host: '10.0.0.2', port: 3080 },+ { host: '10.0.0.3', port: 3080 },+ { host: '10.0.0.4', port: 3080 },+ { host: '10.0.0.5', port: 3080 },+ ], { signal: new AbortController().signal, concurrency: 2, timeoutMs: 1000, budgetMs: 5000, onFound })+ expect(network.requests.map(request => request.url)).toEqual([+ 'http://10.0.0.1:3080/__dsh_bridge__/auth-status',+ 'http://10.0.0.2:3080/__dsh_bridge__/auth-status',+ ])+ expect(network.active()).toBe(2)+ network.requests[1]!.resolve(jsonResponse({ enabled: false, allowLoopback: true }))+ await vi.advanceTimersByTimeAsync(0)+ expect(network.requests).toHaveLength(3)+ expect(onFound.mock.calls.map(call => call[0].id)).toEqual(['http://10.0.0.2:3080'])+ network.requests[0]!.resolve(jsonResponse({ enabled: false, allowLoopback: true }))+ await vi.advanceTimersByTimeAsync(0)+ expect(network.requests).toHaveLength(4)+ network.requests[2]!.resolve(jsonResponse({ enabled: false, allowLoopback: true }))+ await vi.advanceTimersByTimeAsync(0)+ expect(network.requests).toHaveLength(5)+ network.requests[3]!.resolve(jsonResponse({ enabled: false, allowLoopback: true }))+ network.requests[4]!.resolve(jsonResponse({ enabled: false, allowLoopback: true }))+ const found = await pending+ expect(found.map(host => host.id)).toEqual(['http://10.0.0.2:3080', 'http://10.0.0.1:3080', 'http://10.0.0.3:3080', 'http://10.0.0.4:3080', 'http://10.0.0.5:3080'])+ expect(found[0]).toEqual({ id: 'http://10.0.0.2:3080', url: 'http://10.0.0.2:3080/', host: '10.0.0.2', port: 3080, auth: { enabled: false, allowLoopback: true } })+ expect(onFound.mock.calls.map(call => call[0].id)).toEqual(['http://10.0.0.2:3080', 'http://10.0.0.1:3080', 'http://10.0.0.3:3080', 'http://10.0.0.4:3080', 'http://10.0.0.5:3080'])+ expect(network.maximum()).toBe(2)+ expect(network.active()).toBe(0)+ expect(vi.getTimerCount()).toBe(0)+ })++ it('enforces the literal default worker limit of forty', async () => {+ const network = deferredNetwork()+ const candidates = Array.from({ length: 41 }, (_, index) => ({ host: `10.0.0.${index + 1}`, port: 3082 }))+ const pending = scanCandidates(candidates, { signal: new AbortController().signal })+ expect(network.requests).toHaveLength(40)+ expect(network.active()).toBe(40)+ for (const request of network.requests.slice())+ request.resolve(jsonResponse({ enabled: false, allowLoopback: true }))+ await vi.advanceTimersByTimeAsync(0)+ expect(network.requests).toHaveLength(41)+ network.requests[40]!.resolve(jsonResponse({ enabled: false, allowLoopback: true }))+ expect(await pending).toHaveLength(41)+ expect(network.maximum()).toBe(40)+ expect(vi.getTimerCount()).toBe(0)+ })++ it('allows a worker to continue after a timed-out candidate', async () => {+ const network = deferredNetwork()+ const pending = scanCandidates([+ { host: '10.0.0.1', port: 3080 },+ { host: '10.0.0.2', port: 3080 },+ ], { signal: new AbortController().signal, concurrency: 1, timeoutMs: 50, budgetMs: 500 })+ await vi.advanceTimersByTimeAsync(49)+ expect(network.requests).toHaveLength(1)+ await vi.advanceTimersByTimeAsync(1)+ expect(network.requests[0]?.signal.aborted).toBe(true)+ expect(network.requests[1]?.signal.aborted).toBe(false)+ network.requests[1]!.resolve(jsonResponse({ enabled: false, allowLoopback: true }))+ expect((await pending).map(host => host.id)).toEqual(['http://10.0.0.2:3080'])+ expect(network.maximum()).toBe(1)+ })++ it('aborts all active requests at the scan budget and returns only prior discoveries', async () => {+ const network = deferredNetwork()+ const onFound = vi.fn()+ const pending = scanCandidates([+ { host: '10.0.0.1', port: 3080 },+ { host: '10.0.0.2', port: 3080 },+ { host: '10.0.0.3', port: 3080 },+ { host: '10.0.0.4', port: 3080 },+ ], { signal: new AbortController().signal, concurrency: 2, timeoutMs: 1000, budgetMs: 50, onFound })+ network.requests[0]!.resolve(jsonResponse({ enabled: false, allowLoopback: true }))+ await vi.advanceTimersByTimeAsync(49)+ expect(network.requests).toHaveLength(3)+ expect(network.active()).toBe(2)+ await vi.advanceTimersByTimeAsync(1)+ expect((await pending).map(host => host.id)).toEqual(['http://10.0.0.1:3080'])+ expect(network.requests.slice(1).map(request => request.signal.aborted)).toEqual([true, true])+ expect(network.requests).toHaveLength(3)+ expect(onFound).toHaveBeenCalledTimes(1)+ expect(network.active()).toBe(0)+ expect(vi.getTimerCount()).toBe(0)+ })++ it('supports onFound cancelling the actual scan without scheduling further candidates', async () => {+ const network = deferredNetwork()+ const caller = new AbortController()+ const onFound = vi.fn(() => caller.abort())+ const pending = scanCandidates([+ { host: '10.0.0.1', port: 3080 },+ { host: '10.0.0.2', port: 3080 },+ { host: '10.0.0.3', port: 3080 },+ ], { signal: caller.signal, concurrency: 2, onFound })+ network.requests[0]!.resolve(jsonResponse({ enabled: false, allowLoopback: true }))+ expect((await pending).map(host => host.id)).toEqual(['http://10.0.0.1:3080'])+ expect(onFound).toHaveBeenCalledTimes(1)+ expect(network.requests).toHaveLength(2)+ expect(network.requests[1]?.signal.aborted).toBe(true)+ expect(network.active()).toBe(0)+ expect(vi.getTimerCount()).toBe(0)+ })++ it('propagates a callback failure while aborting the remaining real worker requests', async () => {+ const network = deferredNetwork()+ const error = new Error('Consumer failed')+ const pending = scanCandidates([+ { host: '10.0.0.1', port: 3080 },+ { host: '10.0.0.2', port: 3080 },+ ], {+ signal: new AbortController().signal,+ concurrency: 2,+ onFound() { throw error },+ })+ const rejection = expect(pending).rejects.toBe(error)+ network.requests[0]!.resolve(jsonResponse({ enabled: false, allowLoopback: true }))+ await rejection+ expect(network.requests[1]?.signal.aborted).toBe(true)+ expect(network.active()).toBe(0)+ expect(vi.getTimerCount()).toBe(0)+ })++ it('does not notify onFound for failed probes or malformed candidates', async () => {+ const fetchMock = vi.fn<typeof fetch>().mockResolvedValue(jsonResponse({ enabled: 'false' }))+ vi.stubGlobal('fetch', fetchMock)+ const onFound = vi.fn()+ expect(await scanCandidates([+ { host: 'bad host', port: 3080 },+ { host: '10.0.0.1', port: 0 },+ { host: '10.0.0.2', port: 65536 },+ { host: '10.0.0.3', port: 3080 },+ ], { signal: new AbortController().signal, concurrency: 256, onFound })).toEqual([])+ expect(fetchMock).toHaveBeenCalledTimes(1)+ expect(fetchMock.mock.calls[0]?.[0]).toBe('http://10.0.0.3:3080/__dsh_bridge__/auth-status')+ expect(onFound).not.toHaveBeenCalled()+ expect(vi.getTimerCount()).toBe(0)+ })++ it('does not launch work for an empty or already aborted scan', async () => {+ const network = deferredNetwork()+ const caller = new AbortController()+ caller.abort()+ expect(await scanCandidates([{ host: '10.0.0.1', port: 3080 }], { signal: caller.signal })).toEqual([])+ expect(await scanCandidates([], { signal: new AbortController().signal })).toEqual([])+ expect(network.fetchMock).not.toHaveBeenCalled()+ expect(vi.getTimerCount()).toBe(0)+ })++ it.each([0, -1, 1.5, 257, Number.NaN, Number.POSITIVE_INFINITY])('rejects invalid worker concurrency %s', async (concurrency) => {+ const network = deferredNetwork()+ await expect(scanCandidates([], { signal: new AbortController().signal, concurrency })).rejects.toThrow('Scan concurrency must be between 1 and 256')+ expect(network.fetchMock).not.toHaveBeenCalled()+ })++ it.each([+ { timeoutMs: 0 },+ { timeoutMs: -1 },+ { timeoutMs: Number.NaN },+ { timeoutMs: Number.POSITIVE_INFINITY },+ { budgetMs: 0 },+ { budgetMs: -1 },+ { budgetMs: Number.NaN },+ { budgetMs: Number.POSITIVE_INFINITY },+ ])('rejects invalid scan timing options %j', async (options) => {+ const network = deferredNetwork()+ await expect(scanCandidates([], { signal: new AbortController().signal, ...options })).rejects.toThrow('Scan timeouts must be positive')+ expect(network.fetchMock).not.toHaveBeenCalled()+ })+})diff --git a/src-native/services/scan-candidates.ts b/src-native/services/scan-candidates.tsnew file mode 100644index 00000000..8f2b1240--- /dev/null+++ b/src-native/services/scan-candidates.ts@@ -0,0 +1,64 @@+import type { BridgeHost } from './probe-bridge'+import type { ScanCandidate } from '@/utils/discovery'+import { PROBE_TIMEOUT_MS, SCAN_BUDGET_MS, SCAN_CONCURRENCY } from '@/config/constants'+import { parseQrPayload } from '@/utils/bridge-protocol'+import { probeBridge } from './probe-bridge'++export interface ScanOptions {+ signal: AbortSignal+ concurrency?: number+ timeoutMs?: number+ budgetMs?: number+ onFound?: (host: BridgeHost) => void+}++/**+ * 并发探测候选地址(/24 网段扫描),受总预算 budgetMs 与外部 signal 双重约束。+ * 参数不合法直接抛 RangeError —— 调用方(store action)把它们当作编程错误而非网络错误。+ */+export async function scanCandidates(candidates: readonly ScanCandidate[], {+ signal,+ concurrency = SCAN_CONCURRENCY,+ timeoutMs = PROBE_TIMEOUT_MS,+ budgetMs = SCAN_BUDGET_MS,+ onFound,+}: ScanOptions): Promise<BridgeHost[]> {+ if (!Number.isInteger(concurrency) || concurrency < 1 || concurrency > 256)+ throw new RangeError('Scan concurrency must be between 1 and 256')+ if (!Number.isFinite(budgetMs) || budgetMs <= 0 || !Number.isFinite(timeoutMs) || timeoutMs <= 0)+ throw new RangeError('Scan timeouts must be positive')+ if (signal.aborted || candidates.length === 0)+ return []+ const controller = new AbortController()+ function abort() {+ controller.abort()+ }+ signal.addEventListener('abort', abort, { once: true })+ const deadline = setTimeout(abort, budgetMs)+ const found: BridgeHost[] = []+ let cursor = 0+ async function worker() {+ while (!controller.signal.aborted && cursor < candidates.length) {+ const candidate = candidates[cursor++]+ if (!candidate)+ break+ const address = parseQrPayload(`http://${candidate.host}:${candidate.port}`)+ if (!address)+ continue+ const result = await probeBridge(address, controller.signal, timeoutMs)+ if (result && !controller.signal.aborted) {+ found.push(result)+ onFound?.(result)+ }+ }+ }+ try {+ await Promise.all(Array.from({ length: Math.min(concurrency, candidates.length) }, worker))+ return found+ }+ finally {+ clearTimeout(deadline)+ controller.abort()+ signal.removeEventListener('abort', abort)+ }+}diff --git a/src-native/store/modules/connection/index.test.ts b/src-native/store/modules/connection/index.test.tsnew file mode 100644index 00000000..2497298d--- /dev/null+++ b/src-native/store/modules/connection/index.test.ts@@ -0,0 +1,471 @@+import type { ConnectionSnapshot } from './index'+import type { BridgeAddress } from '@/utils/bridge-protocol'+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'+import { connection, createConnectionState, parseConnectionSnapshot, resetConnectionStorageCache } from './index'++vi.mock('expo-localization', () => ({ getLocales: () => [{ languageTag: 'zh-CN' }] }))+vi.mock('@react-native-async-storage/async-storage', () => ({ default: { getItem: vi.fn(), setItem: vi.fn() } }))++const alpha: BridgeAddress = { id: 'http://bridge.local:3080', url: 'http://bridge.local:3080/tasks?theme=dark', host: 'bridge.local', port: 3080 }+const beta: BridgeAddress = { id: 'https://second.local', url: 'https://second.local/workspaces', host: 'second.local', port: 443 }++function load(address: BridgeAddress, at: number) {+ expect(connection.accept(address)).toBe(true)+ connection.markLoaded(connection.viewGeneration, at)+}++beforeEach(() => {+ connection.$persist.meta.hydrated = false+ connection.$persist.meta.mounted = false+ connection.$patch(createConnectionState())+ resetConnectionStorageCache()+ vi.clearAllMocks()+})++afterEach(() => {+ vi.restoreAllMocks()+ vi.unstubAllGlobals()+ vi.clearAllTimers()+ vi.useRealTimers()+})++describe('parseConnectionSnapshot trust boundary', () => {+ it.each([null, undefined, [], {}, { version: 2, history: [] }, { version: '1', history: [] }, { version: 1, history: {} }])('discards invalid snapshot envelope %j', (value) => {+ expect(parseConnectionSnapshot(value)).toEqual({ version: 1, history: [], guidedHosts: [] })+ })++ it('reconstructs addresses from URLs, strips secrets and ignores injected metadata and unknown guided origins', () => {+ expect(parseConnectionSnapshot({+ version: 1,+ history: [+ { id: 'https://evil.test', url: 'https://BRIDGE.local:443/tasks?auth=secret&token=other&theme=dark#private', host: 'evil.test', port: 1, token: 'injected', lastConnectedAt: 10 },+ { url: 'http://second.local:3082/route', lastConnectedAt: 20 },+ ],+ tokens: { 'https://bridge.local': 'untrusted' },+ guidedHosts: ['https://bridge.local', 'https://unknown.local', 'https://bridge.local', 7, 'http://second.local:3082/path'],+ })).toEqual({+ version: 1,+ history: [+ { id: 'http://second.local:3082', url: 'http://second.local:3082/route', host: 'second.local', port: 3082, lastConnectedAt: 20 },+ { id: 'https://bridge.local', url: 'https://bridge.local/tasks?theme=dark', host: 'bridge.local', port: 443, lastConnectedAt: 10 },+ ],+ guidedHosts: ['https://bridge.local'],+ })+ })++ it('rejects malformed entries and nonfinite or negative timestamps while retaining timestamp zero', () => {+ expect(parseConnectionSnapshot({+ version: 1,+ history: [+ null,+ [],+ { url: 42, lastConnectedAt: 1 },+ { url: 'http://missing.local', lastConnectedAt: '1' },+ { url: 'ftp://wrong.local', lastConnectedAt: 1 },+ { url: 'http://user:[email protected]', lastConnectedAt: 1 },+ { url: 'http://negative.local', lastConnectedAt: -1 },+ { url: 'http://nan.local', lastConnectedAt: Number.NaN },+ { url: 'http://infinite.local', lastConnectedAt: Number.POSITIVE_INFINITY },+ { url: 'http://zero.local', lastConnectedAt: 0 },+ ],+ guidedHosts: 'http://zero.local',+ })).toEqual({+ version: 1,+ history: [{ id: 'http://zero.local', url: 'http://zero.local/', host: 'zero.local', port: 80, lastConnectedAt: 0 }],+ guidedHosts: [],+ })+ })++ it('deduplicates equivalent default-port origins without merging distinct schemes or ports', () => {+ expect(parseConnectionSnapshot({+ version: 1,+ history: [+ { url: 'http://BRIDGE.local:80/new', lastConnectedAt: 3 },+ { url: 'http://bridge.local/old', lastConnectedAt: 1 },+ { url: 'https://bridge.local/', lastConnectedAt: 2 },+ { url: 'http://bridge.local:3080/', lastConnectedAt: 0 },+ ],+ }).history).toEqual([+ { id: 'http://bridge.local', url: 'http://bridge.local/new', host: 'bridge.local', port: 80, lastConnectedAt: 3 },+ { id: 'https://bridge.local', url: 'https://bridge.local/', host: 'bridge.local', port: 443, lastConnectedAt: 2 },+ { id: 'http://bridge.local:3080', url: 'http://bridge.local:3080/', host: 'bridge.local', port: 3080, lastConnectedAt: 0 },+ ])+ })++ it('retains the newest duplicate origin even when persisted history is unsorted', () => {+ expect(parseConnectionSnapshot({+ version: 1,+ history: [+ { url: 'http://bridge.local:3080/older?auth=old', lastConnectedAt: 1 },+ { url: 'http://bridge.local:3080/newer?token=new', lastConnectedAt: 7 },+ ],+ }).history).toEqual([+ { id: 'http://bridge.local:3080', url: 'http://bridge.local:3080/newer', host: 'bridge.local', port: 3080, lastConnectedAt: 7 },+ ])+ })++ it('sorts and caps persisted history at twenty while pruning guides for evicted origins', () => {+ const history = Array.from({ length: 22 }, (_, index) => ({ url: `http://host-${index + 1}.local:3080/`, lastConnectedAt: index + 1 }))+ const snapshot = parseConnectionSnapshot({ version: 1, history, guidedHosts: ['http://host-1.local:3080', 'http://host-22.local:3080'] })+ expect(snapshot.history).toHaveLength(20)+ expect(snapshot.history.map(entry => entry.lastConnectedAt)).toEqual([22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3])+ expect(snapshot.guidedHosts).toEqual(['http://host-22.local:3080'])+ expect(history).toHaveLength(22)+ expect(history[0]).toEqual({ url: 'http://host-1.local:3080/', lastConnectedAt: 1 })+ })+})++describe('connection editing', () => {+ it('keeps a trimmed display name through reconnect, load and snapshot restoration without changing the URL', () => {+ load(alpha, 10)+ const generation = connection.viewGeneration+ connection.rename(alpha.id, ' 我的电脑 ')+ expect(connection.current).toEqual({ ...alpha, name: '我的电脑' })+ expect(connection.viewGeneration).toBe(generation)+ expect(parseConnectionSnapshot(connection.serialize()).history).toEqual([{ ...alpha, name: '我的电脑', lastConnectedAt: 10 }])+ load(alpha, 20)+ expect(connection.current).toEqual({ ...alpha, name: '我的电脑' })+ expect(connection.history).toEqual([{ ...alpha, name: '我的电脑', lastConnectedAt: 20 }])+ connection.rename(alpha.id, ' ')+ expect(connection.history[0]?.name).toBe('我的电脑')+ })++ it('removes the active connection and invalidates late view callbacks while returning to idle', () => {+ load(alpha, 10)+ connection.markHydrated({ [alpha.id]: 'secret' })+ connection.dismissHint()+ connection.setDrawerOpen(true)+ connection.queueFocus({ origin: alpha.id, sessionId: 's1', title: 'Task', tag: 'task' })+ const generation = connection.viewGeneration+ connection.remove(alpha.id)+ connection.markLoaded(generation, 20)+ expect(connection.current).toBeNull()+ expect(connection.stage).toBe('idle')+ expect(connection.history).toEqual([])+ expect(connection.tokens).toEqual({})+ expect(connection.health).toEqual({})+ expect(connection.guidedHosts).toEqual([])+ expect(connection.pendingFocus).toBeNull()+ expect(connection.drawerOpen).toBe(false)+ expect(connection.viewGeneration).toBeGreaterThan(generation)+ })++ it('removes an inactive entry without interrupting the current connection', () => {+ load(alpha, 10)+ load(beta, 20)+ const generation = connection.viewGeneration+ connection.remove(alpha.id)+ expect(connection.current).toEqual(beta)+ expect(connection.viewGeneration).toBe(generation)+ expect(connection.stage).toBe('connected')+ expect(connection.history).toEqual([{ ...beta, lastConnectedAt: 20 }])+ })++ it('normalizes only string display names at the persistence boundary', () => {+ const snapshot = parseConnectionSnapshot({ version: 1, history: [+ { ...alpha, name: ' 工作电脑 ', lastConnectedAt: 10 },+ { ...beta, name: { url: 'evil' }, lastConnectedAt: 20 },+ ] })+ expect(snapshot.history).toEqual([{ ...beta, lastConnectedAt: 20 }, { ...alpha, name: '工作电脑', lastConnectedAt: 10 }])+ })+})++describe('connection hydration', () => {+ it('starts the singleton store with an isolated empty method-selection state', () => {+ expect(connection.$state).toEqual({+ version: 1,+ hydrated: false,+ stage: 'idle',+ current: null,+ history: [],+ tokens: {},+ health: {},+ guidedHosts: [],+ drawerOpen: false,+ swipeHintVisible: false,+ loading: false,+ loadError: null,+ notice: null,+ scanGeneration: 0,+ viewGeneration: 0,+ pendingFocus: null,+ focusGeneration: 0,+ })+ connection.setHealth('http://bridge.local:3080', 'unavailable')+ expect(connection.health).toEqual({ 'http://bridge.local:3080': 'unavailable' })+ expect(createConnectionState().health).toEqual({})+ })++ it('hydrates exactly once without opening a connection or replacing later state', () => {+ const snapshot: ConnectionSnapshot = {+ version: 1,+ history: [{ ...alpha, lastConnectedAt: 10 }],+ guidedHosts: ['http://bridge.local:3080'],+ }+ connection.$patch(parseConnectionSnapshot(snapshot))+ connection.markHydrated({ 'http://bridge.local:3080': 'secure-secret' })+ connection.markHydrated({})+ expect(connection.hydrated).toBe(true)+ expect(connection.history).toEqual([{ id: 'http://bridge.local:3080', url: 'http://bridge.local:3080/tasks?theme=dark', host: 'bridge.local', port: 3080, lastConnectedAt: 10 }])+ expect(connection.guidedHosts).toEqual(['http://bridge.local:3080'])+ expect(connection.tokens).toEqual({ 'http://bridge.local:3080': 'secure-secret' })+ expect(connection.current).toBeNull()+ expect(connection.stage).toBe('idle')+ expect(connection.scanGeneration).toBe(0)+ expect(connection.viewGeneration).toBe(0)+ })+})++describe('connection scan and view generations', () => {+ it('ignores stale scan results without mutating the active scan', () => {+ const first = connection.beginScan()+ const second = connection.beginScan()+ expect(first).toBe(1)+ expect(second).toBe(2)+ expect(connection.accept(alpha, first)).toBe(false)+ connection.finishScan(first, 'old notice')+ expect(connection.stage).toBe('scanning')+ expect(connection.current).toBeNull()+ expect(connection.notice).toBeNull()+ expect(connection.scanGeneration).toBe(2)+ connection.finishScan(second, 'No hosts')+ expect(connection.stage).toBe('idle')+ expect(connection.notice).toBe('No hosts')+ })++ it('cancelScan invalidates pending discoveries and completion notices', () => {+ const generation = connection.beginScan()+ connection.cancelScan()+ expect(connection.scanGeneration).toBe(2)+ expect(connection.stage).toBe('idle')+ expect(connection.accept(alpha, generation)).toBe(false)+ connection.finishScan(generation, 'stale')+ expect(connection.notice).toBeNull()+ expect(connection.current).toBeNull()+ })++ it('does not let scan cancellation or stale completion disconnect an accepted host', () => {+ const generation = connection.beginScan()+ expect(connection.accept(alpha, generation)).toBe(true)+ expect(connection.scanGeneration).toBe(2)+ expect(connection.viewGeneration).toBe(2)+ connection.finishScan(generation, 'late scan')+ connection.cancelScan()+ expect(connection.stage).toBe('connected')+ expect(connection.current).toEqual(alpha)+ expect(connection.notice).toBeNull()+ })++ it('beginScan clears transient view state while retaining successful history and tokens', () => {+ load({ ...alpha, token: 'saved' }, 10)+ connection.setDrawerOpen(true)+ connection.setNotice('old notice')+ connection.markLoadFailed(connection.viewGeneration, 'old error')+ expect(connection.beginScan()).toBe(2)+ expect(connection.viewGeneration).toBe(2)+ expect(connection.current).toBeNull()+ expect(connection.stage).toBe('scanning')+ expect(connection.loading).toBe(false)+ expect(connection.loadError).toBeNull()+ expect(connection.notice).toBeNull()+ expect(connection.drawerOpen).toBe(false)+ expect(connection.swipeHintVisible).toBe(false)+ expect(connection.history).toEqual([{ ...alpha, lastConnectedAt: 10 }])+ expect(connection.tokens).toEqual({ 'http://bridge.local:3080': 'saved' })+ })++ it('ignores stale loaded and failed callbacks after accepting another origin', () => {+ connection.accept(alpha)+ const oldView = connection.viewGeneration+ connection.accept(beta)+ connection.markLoaded(oldView, 100)+ connection.markLoadFailed(oldView, 'late failure')+ expect(connection.current).toEqual(beta)+ expect(connection.loading).toBe(true)+ expect(connection.loadError).toBeNull()+ expect(connection.history).toEqual([])+ expect(connection.health).toEqual({ 'http://bridge.local:3080': 'available', 'https://second.local': 'available' })+ connection.markLoaded(connection.viewGeneration, 200)+ expect(connection.history).toEqual([{ ...beta, lastConnectedAt: 200 }])+ })+})++describe('connection acceptance and successful history', () => {+ it('rejects invalid addresses without storing their token or advancing generations', () => {+ expect(connection.accept({ id: 'https://forged.local', url: 'ftp://bad.local', host: 'forged.local', port: 3080, token: 'secret' })).toBe(false)+ expect(connection.current).toBeNull()+ expect(connection.tokens).toEqual({})+ expect(connection.scanGeneration).toBe(0)+ expect(connection.viewGeneration).toBe(0)+ })++ it('normalizes the URL instead of trusting id, host and port supplied by a caller', () => {+ expect(connection.accept({ id: 'https://evil.local', url: 'http://BRIDGE.local:80/tasks?token=url-secret&theme=dark#fragment', host: 'evil.local', port: 9, token: 'explicit-secret' })).toBe(true)+ expect(connection.current).toEqual({ id: 'http://bridge.local', url: 'http://bridge.local/tasks?theme=dark', host: 'bridge.local', port: 80, token: 'explicit-secret' })+ expect(connection.tokens).toEqual({ 'http://bridge.local': 'explicit-secret' })+ expect(connection.history).toEqual([])+ expect(connection.health).toEqual({ 'http://bridge.local': 'available' })+ })++ it('reuses a secure token only for the exact normalized origin', () => {+ connection.markHydrated({ 'http://bridge.local:3080': 'saved' })+ connection.accept(alpha)+ expect(connection.current).toEqual({ ...alpha, token: 'saved' })+ connection.accept({ ...alpha, id: 'http://bridge.local:3082', url: 'http://bridge.local:3082/tasks', port: 3082 })+ expect(connection.current).toEqual({ id: 'http://bridge.local:3082', url: 'http://bridge.local:3082/tasks', host: 'bridge.local', port: 3082 })+ expect(connection.tokens).toEqual({ 'http://bridge.local:3080': 'saved' })+ })++ it('remembers a token extracted from the accepted URL even if there was no explicit token field', () => {+ connection.accept({ ...alpha, url: 'http://bridge.local:3080/tasks?auth=fresh&theme=dark' })+ expect(connection.current).toEqual({ ...alpha, token: 'fresh' })+ expect(connection.tokens).toEqual({ 'http://bridge.local:3080': 'fresh' })+ })++ it('prefers a newly scanned URL token over an older saved token for that origin', () => {+ connection.markHydrated({ 'http://bridge.local:3080': 'old' })+ connection.accept({ ...alpha, url: 'http://bridge.local:3080/tasks?auth=fresh&theme=dark' })+ expect(connection.current).toEqual({ ...alpha, token: 'fresh' })+ expect(connection.tokens).toEqual({ 'http://bridge.local:3080': 'fresh' })+ })++ it('records history only after a successful view load', () => {+ connection.accept({ ...alpha, token: 'secret' })+ expect(connection.history).toEqual([])+ connection.markLoadFailed(connection.viewGeneration, 'HTTP 401')+ connection.markLoaded(connection.viewGeneration, 100)+ expect(connection.history).toEqual([])+ expect(connection.loadError).toBe('HTTP 401')+ expect(connection.health['http://bridge.local:3080']).toBe('unavailable')+ expect(connection.loading).toBe(false)+ expect(connection.swipeHintVisible).toBe(false)+ load(alpha, 200)+ expect(connection.history).toEqual([{ ...alpha, lastConnectedAt: 200 }])+ expect(connection.loading).toBe(false)+ expect(connection.loadError).toBeNull()+ })++ it('does not rewrite history or reopen the dismissed guide on duplicate document readiness', () => {+ load(alpha, 10)+ connection.dismissHint()+ connection.markLoaded(connection.viewGeneration, 20)+ expect(connection.history).toEqual([{ ...alpha, lastConnectedAt: 10 }])+ expect(connection.guidedHosts).toEqual(['http://bridge.local:3080'])+ expect(connection.swipeHintVisible).toBe(false)+ expect(connection.loading).toBe(false)+ })++ it('uses the successful load clock rather than the accept time', () => {+ vi.useFakeTimers()+ vi.setSystemTime(new Date('2024-01-02T03:04:05.000Z'))+ connection.accept(alpha)+ vi.setSystemTime(new Date('2024-01-02T03:04:06.000Z'))+ connection.markLoaded(connection.viewGeneration)+ expect(connection.history).toEqual([{ ...alpha, lastConnectedAt: 1704164646000 }])+ })++ it('moves a repeated origin to the front with its latest route instead of duplicating it', () => {+ load(alpha, 1)+ load(beta, 2)+ load({ ...alpha, url: 'http://bridge.local:3080/new?auth=secret&view=compact' }, 3)+ expect(connection.history).toEqual([+ { id: 'http://bridge.local:3080', url: 'http://bridge.local:3080/new?view=compact', host: 'bridge.local', port: 3080, lastConnectedAt: 3 },+ { ...beta, lastConnectedAt: 2 },+ ])+ })++ it('retains twenty successful origins, exposes only five recent entries and prunes evicted guides', () => {+ for (let index = 1; index <= 21; index++) {+ load({ id: `http://host-${index}.local:3080`, url: `http://host-${index}.local:3080/`, host: `host-${index}.local`, port: 3080 }, index)+ if (index === 1 || index === 2)+ connection.dismissHint()+ }+ expect(connection.history).toHaveLength(20)+ expect(connection.history.map(entry => entry.lastConnectedAt)).toEqual([21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2])+ expect(connection.recentFive.map(entry => entry.id)).toEqual(['http://host-21.local:3080', 'http://host-20.local:3080', 'http://host-19.local:3080', 'http://host-18.local:3080', 'http://host-17.local:3080'])+ expect(connection.guidedHosts).toEqual(['http://host-2.local:3080'])+ connection.recentFive.pop()+ expect(connection.history).toHaveLength(20)+ expect(connection.recentFive).toHaveLength(5)+ })+})++describe('connection hints, disconnect and serialization', () => {+ it('shows the swipe hint only on successful load until dismissed for that exact origin', () => {+ connection.accept(alpha)+ expect(connection.swipeHintVisible).toBe(false)+ connection.markLoaded(connection.viewGeneration, 1)+ expect(connection.swipeHintVisible).toBe(true)+ connection.dismissHint()+ connection.dismissHint()+ expect(connection.guidedHosts).toEqual(['http://bridge.local:3080'])+ expect(connection.swipeHintVisible).toBe(false)+ load({ ...alpha, url: 'http://bridge.local:3080/another' }, 2)+ expect(connection.swipeHintVisible).toBe(false)+ load({ ...alpha, id: 'http://bridge.local:3082', url: 'http://bridge.local:3082/', port: 3082 }, 3)+ expect(connection.swipeHintVisible).toBe(true)+ expect(connection.guidedHosts).toEqual(['http://bridge.local:3080'])+ })++ it('cannot record an unseen guide as dismissed while the first document is loading or failed', () => {+ connection.accept(alpha)+ connection.dismissHint()+ expect(connection.guidedHosts).toEqual([])+ connection.markLoadFailed(connection.viewGeneration, 'Network unavailable')+ connection.dismissHint()+ expect(connection.guidedHosts).toEqual([])+ load(alpha, 10)+ expect(connection.swipeHintVisible).toBe(true)+ connection.dismissHint()+ expect(connection.guidedHosts).toEqual(['http://bridge.local:3080'])+ expect(connection.swipeHintVisible).toBe(false)+ })++ it('does not record a dismissed hint when no current host exists', () => {+ connection.dismissHint()+ expect(connection.guidedHosts).toEqual([])+ expect(connection.swipeHintVisible).toBe(false)+ })++ it('disconnect clears transient UI and invalidates callbacks while preserving history, secure tokens and guides', () => {+ load({ ...alpha, token: 'secure-secret' }, 10)+ connection.dismissHint()+ connection.setDrawerOpen(true)+ connection.setNotice('offline')+ connection.queueFocus({ origin: 'http://bridge.local:3080', sessionId: 'session-1', title: 'Task', tag: 'task-1' })+ const oldView = connection.viewGeneration+ connection.disconnect()+ connection.markLoaded(oldView, 20)+ connection.markLoadFailed(oldView, 'stale')+ expect(connection.current).toBeNull()+ expect(connection.stage).toBe('scanning')+ expect(connection.scanGeneration).toBe(2)+ expect(connection.viewGeneration).toBe(2)+ expect(connection.loading).toBe(false)+ expect(connection.loadError).toBeNull()+ expect(connection.notice).toBeNull()+ expect(connection.drawerOpen).toBe(false)+ expect(connection.swipeHintVisible).toBe(false)+ expect(connection.pendingFocus).toBeNull()+ expect(connection.history).toEqual([{ ...alpha, lastConnectedAt: 10 }])+ expect(connection.tokens).toEqual({ 'http://bridge.local:3080': 'secure-secret' })+ expect(connection.guidedHosts).toEqual(['http://bridge.local:3080'])+ })++ it('serializes only sanitized successful history and guides, never runtime state or tokens', () => {+ load({ ...alpha, url: 'http://bridge.local:3080/tasks?auth=secret&token=other&theme=dark#private', token: 'secure-secret' }, 10)+ connection.dismissHint()+ connection.queueFocus({ origin: 'http://bridge.local:3080', sessionId: 'session-1', title: 'Task', tag: 'task-1' })+ expect(connection.serialize()).toEqual({+ version: 1,+ history: [{ id: 'http://bridge.local:3080', url: 'http://bridge.local:3080/tasks?theme=dark', host: 'bridge.local', port: 3080, lastConnectedAt: 10 }],+ guidedHosts: ['http://bridge.local:3080'],+ })+ expect(JSON.stringify(connection.serialize())).not.toContain('secret')+ const serialized = connection.serialize()+ serialized.history[0]!.url = 'https://mutated.test/'+ serialized.guidedHosts.push('https://mutated.test')+ expect(connection.history[0]?.url).toBe('http://bridge.local:3080/tasks?theme=dark')+ expect(connection.guidedHosts).toEqual(['http://bridge.local:3080'])+ })+})diff --git a/src-native/store/modules/connection/index.ts b/src-native/store/modules/connection/index.tsnew file mode 100644index 00000000..30d8866d--- /dev/null+++ b/src-native/store/modules/connection/index.ts@@ -0,0 +1,354 @@+import type { BridgeAddress } from '@/utils/bridge-protocol'+import AsyncStorage from '@react-native-async-storage/async-storage'+import { defineStore } from 'valtio-define'+import { persist } from 'valtio-define/plugins/persist'+import { CONNECTION_STORAGE_KEY, HISTORY_LIMIT, RECENT_LIMIT } from '@/config/constants'+import { i18n } from '@/i18n'+import { isRecord, parseQrPayload } from '@/utils/bridge-protocol'++export type ConnectionStage = 'scanning' | 'idle' | 'connected'+export type HostHealth = 'checking' | 'available' | 'unavailable'++export interface HistoryEntry extends Omit<BridgeAddress, 'token'> {+ lastConnectedAt: number+}++export interface NotificationFocus {+ origin: string+ sessionId: string+ title: string+ tag: string+}++export interface ConnectionSnapshot {+ version: 1+ history: HistoryEntry[]+ guidedHosts: string[]+}++export interface ConnectionState {+ version: 1+ hydrated: boolean+ stage: ConnectionStage+ current: BridgeAddress | null+ history: HistoryEntry[]+ tokens: Record<string, string>+ health: Record<string, HostHealth>+ guidedHosts: string[]+ drawerOpen: boolean+ swipeHintVisible: boolean+ loading: boolean+ loadError: string | null+ notice: string | null+ scanGeneration: number+ viewGeneration: number+ pendingFocus: NotificationFocus | null+ focusGeneration: number+}++/** 持久化字段:插件按此顺序把 state 写成 `{version, history, guidedHosts}`。 */+const PERSISTED_PATHS = ['version', 'history', 'guidedHosts'] as const++export function parseConnectionSnapshot(value: unknown): ConnectionSnapshot {+ const snapshot: ConnectionSnapshot = { version: 1, history: [], guidedHosts: [] }+ if (!isRecord(value) || value.version !== 1 || !Array.isArray(value.history))+ return snapshot+ const entries = new Map<string, HistoryEntry>()+ for (const entry of value.history) {+ if (!isRecord(entry) || typeof entry.url !== 'string' || typeof entry.lastConnectedAt !== 'number')+ continue+ if (!Number.isFinite(entry.lastConnectedAt) || entry.lastConnectedAt < 0)+ continue+ const address = parseQrPayload(entry.url)+ if (!address)+ continue+ const previous = entries.get(address.id)+ if (!previous || entry.lastConnectedAt > previous.lastConnectedAt) {+ const historyEntry: HistoryEntry = { id: address.id, url: address.url, host: address.host, port: address.port, lastConnectedAt: entry.lastConnectedAt }+ if (typeof entry.name === 'string' && entry.name.trim())+ historyEntry.name = entry.name.trim()+ entries.set(address.id, historyEntry)+ }+ }+ snapshot.history = [...entries.values()].sort((a, b) => b.lastConnectedAt - a.lastConnectedAt)+ snapshot.history = snapshot.history.slice(0, HISTORY_LIMIT)+ const guidedHosts = value.guidedHosts+ if (Array.isArray(guidedHosts))+ snapshot.guidedHosts = snapshot.history.filter(entry => guidedHosts.includes(entry.id)).map(entry => entry.id)+ return snapshot+}++/**+ * valtio-define persist 插件的 AsyncStorage 适配器。+ * 插件自己负责 `JSON.stringify`,这里只做两侧归一化,保证磁盘负载与旧版自定义实现逐字节一致:+ * `{"version":1,"history":[...],"guidedHosts":[...]}`(永远不含令牌)。+ * 读写异常必须在这里吞掉并转成 notice —— 插件不会 await `setItem`,抛出去就是 unhandled rejection。+ *+ * 插件在每个 state 变更(含 `setDrawerOpen`/`setNotice`/`setHealth` 等瞬时 UI 状态)后都会调用 `setItem`,+ * 因此这里额外做**负载去重**:`persistedPayload` 记录最近一次已知落盘内容(`getItem` 读到即记录),+ * 负载不变直接返回。这样「持久化字段没变就不写盘」这条旧自定义实现的不变式得以保留,+ * 避免抽屉开合/轮询健康状态时产生大量重复写入。`setItem` 只统计最近一次成功写入。+ */+let persistedPayload: string | null = null+let writeQueue = Promise.resolve()++/**+ * 「磁盘内容未知」标记:只有 AsyncStorage 读失败(而非负载损坏)时置位。+ * 读失败时拿不到任何内容,写回会以空快照覆盖真实历史,因此这次会话不再写盘;+ * 负载损坏属于可恢复场景,正常覆盖。+ */+let readFailed = false++const connectionStorage = {+ async getItem(key: string): Promise<ConnectionSnapshot | null> {+ let serialized: string | null+ try {+ serialized = await AsyncStorage.getItem(key)+ }+ catch (error) {+ readFailed = true+ console.error('[connection] restore failed:', error)+ reportStorageFailure()+ return null+ }+ if (!serialized)+ return null+ try {+ const snapshot = parseConnectionSnapshot(JSON.parse(serialized))+ persistedPayload = JSON.stringify(snapshot)+ return snapshot+ }+ catch (error) {+ console.error('[connection] restore failed:', error)+ reportStorageFailure()+ return null+ }+ },+ async setItem(key: string, value: unknown): Promise<void> {+ if (readFailed)+ return+ try {+ const snapshot = parseConnectionSnapshot(typeof value === 'string' ? JSON.parse(value) : value)+ const serialized = JSON.stringify(snapshot)+ writeQueue = writeQueue.then(async () => {+ if (serialized === persistedPayload)+ return+ await AsyncStorage.setItem(key, serialized)+ persistedPayload = serialized+ }).catch((error) => {+ console.error('[connection] save failed:', error)+ reportStorageFailure()+ })+ await writeQueue+ }+ catch (error) {+ console.error('[connection] save failed:', error)+ reportStorageFailure()+ }+ },+}++/**+ * keep:test 清空负载去重缓存。测试在用例之间复位,才能让「首次写入 / 重复写入」可复现;+ * 生产代码不得调用(运行期缓存只由真实读写更新)。+ */+export function resetConnectionStorageCache(): void {+ persistedPayload = null+ readFailed = false+ writeQueue = Promise.resolve()+}++/**+ * 单例 store 的初始状态工厂。+ * `defineStore` 初始化与测试复位(`connection.$patch(createConnectionState())`)共用同一份定义,+ * 避免旧 `createConnectionStore()` 工厂被移除后测试各写一份初始态而漂移。+ */+export function createConnectionState(): ConnectionState {+ return {+ version: 1,+ hydrated: false,+ stage: 'idle',+ current: null,+ history: [],+ tokens: {},+ health: {},+ guidedHosts: [],+ drawerOpen: false,+ swipeHintVisible: false,+ loading: false,+ loadError: null,+ notice: null,+ scanGeneration: 0,+ viewGeneration: 0,+ pendingFocus: null,+ focusGeneration: 0,+ }+}++export const connection = defineStore({+ state: createConnectionState,+ getters: {+ recentFive(): HistoryEntry[] {+ return this.history.slice(0, RECENT_LIMIT)+ },+ },+ actions: {+ /** 由 `restoreConnections()` 在持久化快照与 SecureStore 令牌都落地后调用。 */+ markHydrated(tokens: Record<string, string>) {+ if (this.hydrated)+ return+ this.tokens = tokens+ this.hydrated = true+ },+ beginScan(): number {+ this.scanGeneration+++ this.viewGeneration+++ this.current = null+ this.stage = 'scanning'+ this.loading = false+ this.loadError = null+ this.notice = null+ this.drawerOpen = false+ this.swipeHintVisible = false+ return this.scanGeneration+ },+ cancelScan() {+ this.scanGeneration+++ if (this.stage === 'scanning')+ this.stage = 'idle'+ },+ finishScan(generation: number, notice: string) {+ if (generation !== this.scanGeneration || this.stage !== 'scanning')+ return+ this.stage = 'idle'+ this.notice = notice+ },+ accept(address: BridgeAddress, generation?: number): boolean {+ if (generation !== undefined && generation !== this.scanGeneration)+ return false+ const normalized = parseQrPayload(address.url)+ if (!normalized)+ return false+ let name = this.history.find(entry => entry.id === normalized.id)?.name+ if (!name && this.current?.id === normalized.id)+ name = this.current.name+ if (name)+ normalized.name = name+ const token = address.token ?? normalized.token ?? this.tokens[normalized.id]+ if (token) {+ normalized.token = token+ this.tokens[normalized.id] = token+ }+ this.scanGeneration+++ this.current = normalized+ this.stage = 'connected'+ this.loading = true+ this.loadError = null+ this.notice = null+ this.drawerOpen = false+ this.swipeHintVisible = false+ this.health[normalized.id] = 'available'+ this.viewGeneration+++ return true+ },+ markLoaded(generation: number, at = Date.now()) {+ if (!this.current || generation !== this.viewGeneration || this.loadError || !this.loading)+ return+ this.loading = false+ const { id, url, host, port, name } = this.current+ const entry: HistoryEntry = { id, url, host, port, lastConnectedAt: at }+ if (name)+ entry.name = name+ this.history = [entry, ...this.history.filter(entry => entry.id !== id)].slice(0, HISTORY_LIMIT)+ const retained = new Set(this.history.map(entry => entry.id))+ this.guidedHosts = this.guidedHosts.filter(origin => retained.has(origin))+ this.swipeHintVisible = !this.guidedHosts.includes(id)+ this.health[id] = 'available'+ },+ markLoadFailed(generation: number, message: string) {+ if (!this.current || generation !== this.viewGeneration)+ return+ this.loading = false+ this.loadError = message+ this.swipeHintVisible = false+ this.health[this.current.id] = 'unavailable'+ },+ dismissHint() {+ if (!this.swipeHintVisible)+ return+ if (this.current && !this.guidedHosts.includes(this.current.id))+ this.guidedHosts.push(this.current.id)+ this.swipeHintVisible = false+ },+ setDrawerOpen(open: boolean) {+ this.drawerOpen = open+ },+ setHealth(id: string, health: HostHealth) {+ this.health[id] = health+ },+ setNotice(notice: string | null) {+ this.notice = notice+ },+ queueFocus(focus: NotificationFocus | null) {+ this.pendingFocus = focus+ this.focusGeneration+++ },+ rename(id: string, name: string) {+ const trimmed = name.trim()+ if (!trimmed)+ return+ const entry = this.history.find(entry => entry.id === id)+ if (entry)+ entry.name = trimmed+ if (this.current?.id === id)+ this.current.name = trimmed+ },+ remove(id: string) {+ if (this.current?.id === id)+ this.disconnect('idle')+ this.history = this.history.filter(entry => entry.id !== id)+ this.guidedHosts = this.guidedHosts.filter(origin => origin !== id)+ delete this.tokens[id]+ delete this.health[id]+ if (this.pendingFocus?.origin === id)+ this.queueFocus(null)+ },+ disconnect(stage: 'scanning' | 'idle' = 'scanning') {+ this.scanGeneration+++ this.viewGeneration+++ this.current = null+ this.stage = stage+ this.loading = false+ this.loadError = null+ this.notice = null+ this.drawerOpen = false+ this.swipeHintVisible = false+ this.pendingFocus = null+ },+ /** 当前应当落盘的快照(含归一化),磁盘格式与旧版实现一致。 */+ serialize(): ConnectionSnapshot {+ return parseConnectionSnapshot({+ version: this.version,+ history: this.history,+ guidedHosts: [...this.guidedHosts],+ })+ },+ },+ persist: {+ key: CONNECTION_STORAGE_KEY,+ storage: connectionStorage,+ paths: [...PERSISTED_PATHS],+ },+})++// 手动水合:令牌只能进 SecureStore,所以先把快照读回来,再由 restoreConnections() 补令牌并 markHydrated。+connection.use(persist({ hydrate: false }))++// 读写失败时用 store 的 notice 提示用户;定义在 connection 之后以满足 ts/no-use-before-define+// (函数声明会被提升,connectionStorage 在运行期调用它时 connection 已初始化)。+// 只在 notice 变化时写入,避免「写盘失败 → notice 变更 → 再次写盘失败」的循环。+function reportStorageFailure() {+ const message = i18n.t('connection.storageFailed')+ if (connection.notice !== message)+ connection.setNotice(message)+}diff --git a/src-native/store/modules/connection/runtime.test.ts b/src-native/store/modules/connection/runtime.test.tsnew file mode 100644index 00000000..43b64954--- /dev/null+++ b/src-native/store/modules/connection/runtime.test.ts@@ -0,0 +1,1077 @@+import type { HistoryEntry } from './index'+import type { BridgeHost } from '@/services/probe-bridge'+import type { ScanOptions } from '@/services/scan-candidates'+import type { BridgeAddress } from '@/utils/bridge-protocol'+import type { ScanCandidate } from '@/utils/discovery'+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'+import { i18n } from '@/i18n'++const boundary = vi.hoisted(createBoundaryMocks)++function createBoundaryMocks() {+ return {+ ip: vi.fn<() => Promise<string>>(),+ probe: vi.fn<typeof import('@/services/probe-bridge').probeBridge>(),+ scan: vi.fn<typeof import('@/services/scan-candidates').scanCandidates>(),+ notify: vi.fn<typeof import('@/hooks/use-notifications').sendNativeNotification>(),+ }+}++vi.mock('expo-network', mockExpoNetwork)++function mockExpoNetwork() {+ return { getIpAddressAsync: boundary.ip }+}+vi.mock('@/services/probe-bridge', mockProbeBridge)++function mockProbeBridge() {+ return { probeBridge: boundary.probe }+}+vi.mock('@/services/scan-candidates', mockScanCandidates)++function mockScanCandidates() {+ return { scanCandidates: boundary.scan }+}+vi.mock('@/hooks/use-notifications', mockNativeNotification)++function mockNativeNotification() {+ return { sendNativeNotification: boundary.notify }+}++vi.mock('expo-localization', () => ({ getLocales: () => [{ languageTag: 'zh-CN' }] }))+vi.mock('@react-native-async-storage/async-storage', () => ({ default: { getItem: vi.fn(), setItem: vi.fn() } }))++const alpha: BridgeAddress = { id: 'http://10.0.0.20:4444', url: 'http://10.0.0.20:4444/tasks?theme=dark', host: '10.0.0.20', port: 4444 }+const beta: BridgeAddress = { id: 'http://10.0.0.2:3082', url: 'http://10.0.0.2:3082/workspaces', host: '10.0.0.2', port: 3082 }+const gamma: BridgeAddress = { id: 'http://10.0.0.3:3080', url: 'http://10.0.0.3:3080/', host: '10.0.0.3', port: 3080 }+const recentAlpha: HistoryEntry = { ...alpha, lastConnectedAt: 20 }+const recentBeta: HistoryEntry = { ...beta, lastConnectedAt: 10 }+const noHosts = i18n.t('connection.noHosts')+const noNetwork = i18n.t('connection.noNetwork')+const tokenRequired = i18n.t('connection.tokenRequired')+const hostOffline = i18n.t('connection.hostOffline')+const releases: (() => void)[] = []+let runtime: typeof import('./runtime')+let connection: typeof import('./index')['connection']++function hydrate(history: HistoryEntry[] = [], tokens: Record<string, string> = {}): void {+ connection.$patch({ version: 1, history, guidedHosts: [] })+ connection.markHydrated(tokens)+}++function openHost(address: BridgeAddress): BridgeHost {+ return { ...address, auth: { enabled: false, allowLoopback: false } }+}++function lockedHost(address: BridgeAddress): BridgeHost {+ return { ...address, auth: { enabled: true, mode: 'token_only', allowLoopback: false } }+}++function deferred<T>(fallback: T) {+ const pending = Promise.withResolvers<T>()+ releases.push(releasePendingFixture)++ function releasePendingFixture() {+ pending.resolve(fallback)+ }+ return pending+}++function recordedProbe(index = 0): Parameters<typeof import('@/services/probe-bridge').probeBridge> {+ const call = boundary.probe.mock.calls[index]+ if (!call)+ throw new Error(`Expected recorded bridge probe ${index}`)+ return call+}++function recordedScan(index = 0): Parameters<typeof import('@/services/scan-candidates').scanCandidates> {+ const call = boundary.scan.mock.calls[index]+ if (!call)+ throw new Error(`Expected recorded LAN scan ${index}`)+ return call+}++function publish(host: BridgeHost, index = 0): void {+ const options: ScanOptions = recordedScan(index)[1]+ if (!options.onFound)+ throw new Error('Expected a discovery callback at the bridge-client boundary')+ options.onFound(host)+}++beforeEach(initializeRuntime)++async function initializeRuntime() {+ vi.resetModules()+ vi.resetAllMocks()+ vi.clearAllMocks()+ vi.useFakeTimers()+ boundary.ip.mockResolvedValue('10.0.0.9')+ boundary.probe.mockResolvedValue(null)+ boundary.scan.mockResolvedValue([])+ boundary.notify.mockResolvedValue(undefined)+ const store = await import('./index')+ connection = store.connection+ connection.$persist.meta.hydrated = false+ connection.$persist.meta.mounted = false+ connection.$patch(store.createConnectionState())+ store.resetConnectionStorageCache()+ runtime = await import('./runtime')+}++afterEach(disposeRuntime)++async function disposeRuntime() {+ runtime.stopConnectionRuntime()+ for (const release of releases.splice(0))+ release()+ await vi.advanceTimersByTimeAsync(0)+ vi.restoreAllMocks()+ vi.resetAllMocks()+ vi.unstubAllGlobals()+ vi.unstubAllEnvs()+ vi.clearAllTimers()+ vi.useRealTimers()+ vi.resetModules()+}++describe('connectAddress', describeDirectConnections)++function describeDirectConnections() {+ it('opens the requested route with its saved origin token without probing or recording successful history', connectDirectly)++ function connectDirectly() {+ hydrate([], { 'http://10.0.0.20:4444': 'fixture-saved-token' })++ runtime.connectAddress(alpha)++ expect(connection.current).toEqual({ ...alpha, token: 'fixture-saved-token' })+ expect(connection.stage).toBe('connected')+ expect(connection.loading).toBe(true)+ expect(connection.notice).toBeNull()+ expect(connection.history).toEqual([])+ expect(connection.health).toEqual({ 'http://10.0.0.20:4444': 'available' })+ expect(boundary.probe).not.toHaveBeenCalled()+ expect(boundary.ip).not.toHaveBeenCalled()+ expect(boundary.scan).not.toHaveBeenCalled()+ expect(vi.getTimerCount()).toBe(0)+ }++ it('prefers an explicit new token over the saved token for the same origin', preferExplicitToken)++ function preferExplicitToken() {+ hydrate([], { 'http://10.0.0.20:4444': 'fixture-old-token' })++ runtime.connectAddress({ ...alpha, token: 'fixture-new-token' })++ expect(connection.current).toEqual({ ...alpha, token: 'fixture-new-token' })+ expect(connection.tokens).toEqual({ 'http://10.0.0.20:4444': 'fixture-new-token' })+ expect(connection.serialize()).toEqual({ version: 1, history: [], guidedHosts: [] })+ }++ it('preserves a new URL token instead of replacing it with an older saved token', preferUrlToken)++ function preferUrlToken() {+ hydrate([], { 'http://10.0.0.20:4444': 'fixture-old-token' })++ runtime.connectAddress({ ...alpha, url: 'http://10.0.0.20:4444/tasks?auth=fixture-new-token&theme=dark' })++ expect(connection.current).toEqual({ ...alpha, token: 'fixture-new-token' })+ expect(connection.tokens).toEqual({ 'http://10.0.0.20:4444': 'fixture-new-token' })+ }++ it('aborts an in-flight history probe before a direct connection and ignores its late success', supersedeHistoryWithDirectConnection)++ async function supersedeHistoryWithDirectConnection() {+ hydrate([recentAlpha])+ const probe = deferred<BridgeHost | null>(null)+ boundary.probe.mockReturnValue(probe.promise)+ const scanning = runtime.startAutoScan()+ const signal = recordedProbe()[1]+ expect(signal.aborted).toBe(false)++ runtime.connectAddress(beta)+ expect(signal.aborted).toBe(true)+ const generation = connection.scanGeneration+ probe.resolve(openHost(alpha))+ await scanning++ expect(connection.current).toEqual(beta)+ expect(connection.stage).toBe('connected')+ expect(connection.scanGeneration).toBe(generation)+ expect(connection.health[alpha.id]).toBe('checking')+ expect(connection.notice).toBeNull()+ expect(boundary.ip).not.toHaveBeenCalled()+ expect(boundary.scan).not.toHaveBeenCalled()+ expect(vi.getTimerCount()).toBe(0)+ }++ it('keeps a direct connection when an aborted LAN scan publishes a late discovery', supersedeLanWithDirectConnection)++ async function supersedeLanWithDirectConnection() {+ hydrate()+ const scan = deferred<BridgeHost[]>([])+ boundary.scan.mockReturnValue(scan.promise)+ const scanning = runtime.startAutoScan()+ await vi.advanceTimersByTimeAsync(0)+ const signal = recordedScan()[1].signal++ runtime.connectAddress(beta)+ expect(signal.aborted).toBe(true)+ publish(openHost(gamma))+ scan.resolve([openHost(gamma)])+ await scanning++ expect(connection.current).toEqual(beta)+ expect(connection.stage).toBe('connected')+ expect(connection.notice).toBeNull()+ expect(connection.health[gamma.id]).toBeUndefined()+ expect(vi.getTimerCount()).toBe(0)+ }+}++describe('startAutoScan history and host eligibility', describeDiscovery)++function describeDiscovery() {+ it('chooses the newest reachable history entry rather than the first probe to finish', prioritizeHistoryOrder)++ async function prioritizeHistoryOrder() {+ hydrate([recentAlpha, recentBeta])+ const newest = deferred<BridgeHost | null>(null)+ const older = deferred<BridgeHost | null>(null)+ boundary.probe.mockReturnValueOnce(newest.promise).mockReturnValueOnce(older.promise)+ const scanning = runtime.startAutoScan()+ const signal = recordedProbe()[1]++ expect(boundary.probe.mock.calls).toEqual([[recentAlpha, signal, 3000], [recentBeta, signal, 3000]])+ expect(connection.health).toEqual({ 'http://10.0.0.20:4444': 'checking', 'http://10.0.0.2:3082': 'checking' })+ older.resolve(openHost(beta))+ await vi.advanceTimersByTimeAsync(0)+ expect(connection.current).toBeNull()+ expect(boundary.ip).not.toHaveBeenCalled()+ newest.resolve(openHost(alpha))+ await scanning++ expect(connection.current).toEqual(alpha)+ expect(connection.stage).toBe('connected')+ expect(connection.loading).toBe(true)+ expect(connection.history).toEqual([recentAlpha, recentBeta])+ expect(connection.health).toEqual({ 'http://10.0.0.20:4444': 'available', 'http://10.0.0.2:3082': 'available' })+ expect(boundary.ip).not.toHaveBeenCalled()+ expect(boundary.scan).not.toHaveBeenCalled()+ expect(signal.aborted).toBe(true)+ expect(vi.getTimerCount()).toBe(0)+ }++ it('connects an older reachable history entry when the newest entry is unavailable', fallBackWithinHistory)++ async function fallBackWithinHistory() {+ hydrate([recentAlpha, recentBeta])+ boundary.probe.mockResolvedValueOnce(null).mockResolvedValueOnce(openHost(beta))++ await runtime.startAutoScan()++ expect(connection.current).toEqual(beta)+ expect(connection.health).toEqual({ 'http://10.0.0.20:4444': 'unavailable', 'http://10.0.0.2:3082': 'available' })+ expect(boundary.ip).not.toHaveBeenCalled()+ expect(boundary.scan).not.toHaveBeenCalled()+ }++ it('skips reachable token-only history without credentials in favor of a usable history entry', filterLockedHistory)++ async function filterLockedHistory() {+ hydrate([recentAlpha, recentBeta])+ boundary.probe.mockResolvedValueOnce(lockedHost(alpha)).mockResolvedValueOnce(openHost(beta))++ await runtime.startAutoScan()++ expect(connection.current).toEqual(beta)+ expect(connection.tokens).toEqual({})+ expect(connection.health[alpha.id]).toBe('available')+ expect(boundary.scan).not.toHaveBeenCalled()+ expect(connection.notice).toBeNull()+ }++ it('reuses the exact saved origin token when probing token-only history', acceptAuthenticatedHistory)++ async function acceptAuthenticatedHistory() {+ hydrate([recentAlpha], { 'http://10.0.0.20:4444': 'fixture-saved-token' })+ boundary.probe.mockResolvedValue(lockedHost({ ...alpha, token: 'fixture-saved-token' }))++ await runtime.startAutoScan()++ expect(recordedProbe()[0]).toEqual({ ...recentAlpha, token: 'fixture-saved-token' })+ expect(recordedProbe()[2]).toBe(3000)+ expect(connection.current).toEqual({ ...alpha, token: 'fixture-saved-token' })+ expect(connection.history).toEqual([recentAlpha])+ expect(boundary.ip).not.toHaveBeenCalled()+ expect(boundary.scan).not.toHaveBeenCalled()+ }++ it('retains the token-required notice from unusable history when the LAN has no usable host', retainHistoryTokenRequirement)++ async function retainHistoryTokenRequirement() {+ hydrate([recentAlpha])+ boundary.probe.mockResolvedValue(lockedHost(alpha))++ await runtime.startAutoScan()++ expect(boundary.scan).toHaveBeenCalledTimes(1)+ expect(connection.current).toBeNull()+ expect(connection.stage).toBe('idle')+ expect(connection.notice).toBe(tokenRequired)+ expect(connection.tokens).toEqual({})+ }++ it('passes history custom ports into the real subnet candidate builder while excluding self and subnet boundaries', includeHistoryPorts)++ async function includeHistoryPorts() {+ hydrate([recentAlpha, recentBeta])++ await runtime.startAutoScan()++ const [candidates, options] = recordedScan()+ expect(boundary.ip).toHaveBeenCalledExactlyOnceWith()+ expect([...new Set(candidates.map(candidatePort))]).toEqual([4444, 3082, 3088, 3080])++ function candidatePort(candidate: ScanCandidate): number {+ return candidate.port+ }+ expect(candidates).toHaveLength(1012)+ expect(candidates.slice(0, 2)).toEqual([{ host: '10.0.0.1', port: 4444 }, { host: '10.0.0.2', port: 4444 }])+ expect(candidates).toContainEqual({ host: '10.0.0.20', port: 4444 })+ expect(candidates.filter(excludedCandidate)).toEqual([])++ function excludedCandidate(candidate: ScanCandidate): boolean {+ return ['10.0.0.0', '10.0.0.9', '10.0.0.255'].includes(candidate.host)+ }+ expect(options.signal.aborted).toBe(true)+ expect(connection.notice).toBe(noHosts)+ expect(connection.current).toBeNull()+ }++ it.each(['', '::1', '127.0.0.1'])('finishes without a LAN scan when expo-network returns an ineligible IPv4 address %j', rejectUnavailableSubnet)++ async function rejectUnavailableSubnet(selfIp: string) {+ hydrate()+ boundary.ip.mockResolvedValue(selfIp)++ await runtime.startAutoScan()++ expect(boundary.scan).not.toHaveBeenCalled()+ expect(connection.current).toBeNull()+ expect(connection.stage).toBe('idle')+ expect(connection.notice).toBe(noNetwork)+ expect(vi.getTimerCount()).toBe(0)+ }++ it('finishes with a no-hosts notice after an empty eligible LAN scan', finishEmptyDiscovery)++ async function finishEmptyDiscovery() {+ hydrate()++ await runtime.startAutoScan()++ expect(recordedScan()[0]).toHaveLength(506)+ expect(connection.stage).toBe('idle')+ expect(connection.current).toBeNull()+ expect(connection.notice).toBe(noHosts)+ expect(vi.getTimerCount()).toBe(0)+ }++ it('keeps scanning after a token-only LAN host without a token and accepts the next usable discovery', filterLockedLanHost)++ async function filterLockedLanHost() {+ hydrate()+ const scan = deferred<BridgeHost[]>([])+ boundary.scan.mockReturnValue(scan.promise)+ const scanning = runtime.startAutoScan()+ await vi.advanceTimersByTimeAsync(0)+ const signal = recordedScan()[1].signal++ publish(lockedHost(beta))+ expect(signal.aborted).toBe(false)+ expect(connection.current).toBeNull()+ publish(openHost(gamma))+ expect(signal.aborted).toBe(true)+ scan.resolve([lockedHost(beta), openHost(gamma)])+ await scanning++ expect(connection.current).toEqual(gamma)+ expect(connection.stage).toBe('connected')+ expect(connection.notice).toBeNull()+ expect(connection.history).toEqual([])+ expect(connection.tokens).toEqual({})+ expect(vi.getTimerCount()).toBe(0)+ }++ it('reports token-required when every LAN discovery needs an unavailable token', reportLockedLanHosts)++ async function reportLockedLanHosts() {+ hydrate()+ const scan = deferred<BridgeHost[]>([])+ boundary.scan.mockReturnValue(scan.promise)+ const scanning = runtime.startAutoScan()+ await vi.advanceTimersByTimeAsync(0)++ publish(lockedHost(beta))+ publish(lockedHost(gamma))+ expect(recordedScan()[1].signal.aborted).toBe(false)+ scan.resolve([lockedHost(beta), lockedHost(gamma)])+ await scanning++ expect(connection.current).toBeNull()+ expect(connection.stage).toBe('idle')+ expect(connection.notice).toBe(tokenRequired)+ expect(connection.tokens).toEqual({})+ }++ it('accepts a token-only LAN discovery using a saved token for the exact origin', acceptAuthenticatedLanHost)++ async function acceptAuthenticatedLanHost() {+ hydrate([], { 'http://10.0.0.2:3082': 'fixture-saved-token' })+ const scan = deferred<BridgeHost[]>([])+ boundary.scan.mockReturnValue(scan.promise)+ const scanning = runtime.startAutoScan()+ await vi.advanceTimersByTimeAsync(0)++ publish(lockedHost(beta))+ expect(recordedScan()[1].signal.aborted).toBe(true)+ scan.resolve([lockedHost(beta)])+ await scanning++ expect(connection.current).toEqual({ ...beta, token: 'fixture-saved-token' })+ expect(connection.notice).toBeNull()+ expect(connection.history).toEqual([])+ }++ it('does not reuse a saved token for another port on the same LAN host', isolateLanTokensByOrigin)++ async function isolateLanTokensByOrigin() {+ hydrate([], { 'http://10.0.0.2:3080': 'fixture-sibling-token' })+ const scan = deferred<BridgeHost[]>([])+ boundary.scan.mockReturnValue(scan.promise)+ const scanning = runtime.startAutoScan()+ await vi.advanceTimersByTimeAsync(0)++ publish(lockedHost(beta))+ expect(recordedScan()[1].signal.aborted).toBe(false)+ scan.resolve([lockedHost(beta)])+ await scanning++ expect(connection.current).toBeNull()+ expect(connection.notice).toBe(tokenRequired)+ expect(connection.tokens).toEqual({ 'http://10.0.0.2:3080': 'fixture-sibling-token' })+ }++ it('reports a network-boundary rejection and releases the scan deadline', reportDiscoveryFailure)++ async function reportDiscoveryFailure() {+ hydrate()+ const error = new Error('Fixture network unavailable')+ const log = vi.spyOn(console, 'error').mockImplementation(suppressExpectedError)++ function suppressExpectedError() {}+ boundary.ip.mockRejectedValue(error)++ await runtime.startAutoScan()++ expect(connection.current).toBeNull()+ expect(connection.stage).toBe('idle')+ expect(connection.notice).toBe(i18n.t('connection.scanFailed'))+ expect(log).toHaveBeenCalledExactlyOnceWith('[connection] scan failed:', error)+ expect(boundary.scan).not.toHaveBeenCalled()+ expect(vi.getTimerCount()).toBe(0)+ }+}++describe('history-only re-entry', () => {+ it('preserves history ordering and saved tokens without reading the LAN address', async () => {+ hydrate([recentAlpha, recentBeta], { 'http://10.0.0.20:4444': 'fixture-saved-token' })+ boundary.probe.mockResolvedValueOnce(lockedHost({ ...alpha, token: 'fixture-saved-token' })).mockResolvedValueOnce(openHost(beta))++ await runtime.startAutoScan({ historyOnly: true })++ expect(recordedProbe()[0]).toEqual({ ...recentAlpha, token: 'fixture-saved-token' })+ expect(recordedProbe(1)[0]).toEqual(recentBeta)+ expect(connection.current).toEqual({ ...alpha, token: 'fixture-saved-token' })+ expect(connection.history).toEqual([recentAlpha, recentBeta])+ expect(boundary.ip).not.toHaveBeenCalled()+ expect(boundary.scan).not.toHaveBeenCalled()+ expect(vi.getTimerCount()).toBe(0)+ })++ it('falls back within saved history rather than scanning new LAN hosts', async () => {+ hydrate([recentAlpha, recentBeta])+ boundary.probe.mockResolvedValueOnce(null).mockResolvedValueOnce(openHost(beta))++ await runtime.startAutoScan({ historyOnly: true })++ expect(connection.current).toEqual(beta)+ expect(connection.health).toEqual({ 'http://10.0.0.20:4444': 'unavailable', 'http://10.0.0.2:3082': 'available' })+ expect(connection.notice).toBeNull()+ expect(boundary.ip).not.toHaveBeenCalled()+ expect(boundary.scan).not.toHaveBeenCalled()+ })++ it('returns to method selection when there is no available history without starting a LAN scan', async () => {+ hydrate([recentAlpha, recentBeta])++ await runtime.startAutoScan({ historyOnly: true })++ expect(connection.current).toBeNull()+ expect(connection.stage).toBe('idle')+ expect(connection.notice).toBe(i18n.t('connection.noHistoryAvailable'))+ expect(connection.history).toEqual([recentAlpha, recentBeta])+ expect(boundary.probe).toHaveBeenCalledTimes(2)+ expect(boundary.ip).not.toHaveBeenCalled()+ expect(boundary.scan).not.toHaveBeenCalled()+ expect(vi.getTimerCount()).toBe(0)+ })++ it('keeps unusable token-only history for QR login without silently searching the LAN', async () => {+ hydrate([recentAlpha])+ boundary.probe.mockResolvedValue(lockedHost(alpha))++ await runtime.startAutoScan({ historyOnly: true })++ expect(connection.current).toBeNull()+ expect(connection.stage).toBe('idle')+ expect(connection.notice).toBe(tokenRequired)+ expect(connection.health[alpha.id]).toBe('available')+ expect(connection.history).toEqual([recentAlpha])+ expect(connection.tokens).toEqual({})+ expect(boundary.ip).not.toHaveBeenCalled()+ expect(boundary.scan).not.toHaveBeenCalled()+ })++ it('lets an explicit QR address cancel history reconnection and discard its late result', async () => {+ hydrate([recentAlpha])+ const probe = deferred<BridgeHost | null>(null)+ boundary.probe.mockReturnValue(probe.promise)+ const reconnecting = runtime.startAutoScan({ historyOnly: true })+ const signal = recordedProbe()[1]++ runtime.connectAddress(beta)+ probe.resolve(openHost(alpha))+ await reconnecting++ expect(signal.aborted).toBe(true)+ expect(connection.current).toEqual(beta)+ expect(connection.notice).toBeNull()+ expect(boundary.ip).not.toHaveBeenCalled()+ expect(boundary.scan).not.toHaveBeenCalled()+ expect(vi.getTimerCount()).toBe(0)+ })+})++describe('runtime cancellation and scan generations', describeCancellation)++function describeCancellation() {+ it('aborts history probes on cancellation and discards late availability and connection results', cancelHistoryProbe)++ async function cancelHistoryProbe() {+ hydrate([recentAlpha])+ const probe = deferred<BridgeHost | null>(null)+ boundary.probe.mockReturnValue(probe.promise)+ const scanning = runtime.startAutoScan()+ const signal = recordedProbe()[1]+ const generation = connection.scanGeneration++ runtime.cancelAutoScan()+ expect(signal.aborted).toBe(true)+ expect(connection.scanGeneration).toBeGreaterThan(generation)+ probe.resolve(openHost(alpha))+ await scanning++ expect(connection.current).toBeNull()+ expect(connection.stage).toBe('idle')+ expect(connection.notice).toBeNull()+ expect(connection.health[alpha.id]).toBe('checking')+ expect(boundary.ip).not.toHaveBeenCalled()+ expect(boundary.scan).not.toHaveBeenCalled()+ expect(vi.getTimerCount()).toBe(0)+ }++ it('does not launch a LAN scan when the IP lookup resolves after cancellation', cancelIpLookup)++ async function cancelIpLookup() {+ hydrate()+ const ip = deferred('')+ boundary.ip.mockReturnValue(ip.promise)+ const scanning = runtime.startAutoScan()+ await vi.advanceTimersByTimeAsync(0)+ expect(boundary.ip).toHaveBeenCalledTimes(1)++ runtime.cancelAutoScan()+ ip.resolve('10.0.0.9')+ await scanning++ expect(boundary.scan).not.toHaveBeenCalled()+ expect(connection.current).toBeNull()+ expect(connection.stage).toBe('idle')+ expect(connection.notice).toBeNull()+ expect(vi.getTimerCount()).toBe(0)+ }++ it('does not reconnect when a cancelled LAN scan publishes and returns a late host', cancelLanDiscovery)++ async function cancelLanDiscovery() {+ hydrate()+ const scan = deferred<BridgeHost[]>([])+ boundary.scan.mockReturnValue(scan.promise)+ const scanning = runtime.startAutoScan()+ await vi.advanceTimersByTimeAsync(0)+ const signal = recordedScan()[1].signal++ runtime.cancelAutoScan()+ expect(signal.aborted).toBe(true)+ publish(openHost(gamma))+ scan.resolve([openHost(gamma)])+ await scanning++ expect(connection.current).toBeNull()+ expect(connection.stage).toBe('idle')+ expect(connection.notice).toBeNull()+ expect(connection.health).toEqual({})+ expect(vi.getTimerCount()).toBe(0)+ }++ it('keeps the newer scan connection when the superseded scan returns later', invalidateSupersededScan)++ async function invalidateSupersededScan() {+ hydrate()+ const older = deferred<BridgeHost[]>([])+ const newer = deferred<BridgeHost[]>([])+ boundary.scan.mockReturnValueOnce(older.promise).mockReturnValueOnce(newer.promise)+ const first = runtime.startAutoScan()+ await vi.advanceTimersByTimeAsync(0)+ const oldSignal = recordedScan()[1].signal+ const second = runtime.startAutoScan()+ await vi.advanceTimersByTimeAsync(0)+ expect(oldSignal.aborted).toBe(true)++ publish(openHost(gamma), 1)+ newer.resolve([openHost(gamma)])+ await second+ const generation = connection.scanGeneration+ publish(openHost(beta), 0)+ older.resolve([openHost(beta)])+ await first++ expect(connection.current).toEqual(gamma)+ expect(connection.stage).toBe('connected')+ expect(connection.scanGeneration).toBe(generation)+ expect(connection.notice).toBeNull()+ expect(connection.health[beta.id]).toBeUndefined()+ expect(vi.getTimerCount()).toBe(0)+ }++ it('stops both active scan and health probes without accepting their late results', stopAllRuntimeWork)++ async function stopAllRuntimeWork() {+ hydrate([recentAlpha])+ runtime.connectAddress(alpha)+ const scanProbe = deferred<BridgeHost | null>(null)+ const healthProbe = deferred<BridgeHost | null>(null)+ boundary.probe.mockReturnValueOnce(scanProbe.promise).mockReturnValueOnce(healthProbe.promise)+ const scanning = runtime.startAutoScan()+ const refreshing = runtime.refreshHealth()+ const scanSignal = recordedProbe(0)[1]+ const healthSignal = recordedProbe(1)[1]+ expect(scanSignal).not.toBe(healthSignal)++ runtime.stopConnectionRuntime()+ expect(scanSignal.aborted).toBe(true)+ expect(healthSignal.aborted).toBe(true)+ scanProbe.resolve(openHost(alpha))+ healthProbe.resolve(openHost(alpha))+ await Promise.all([scanning, refreshing])++ expect(connection.stage).toBe('idle')+ expect(connection.current).toBeNull()+ expect(connection.health[alpha.id]).toBe('checking')+ expect(connection.notice).toBeNull()+ expect(boundary.notify).not.toHaveBeenCalled()+ expect(boundary.scan).not.toHaveBeenCalled()+ expect(vi.getTimerCount()).toBe(0)+ }+}++describe('startAutoScan total deadline', describeScanDeadlines)++function describeScanDeadlines() {+ it('aborts stalled history at exactly 20000ms without accepting its later successful result', enforceHistoryDeadline)++ async function enforceHistoryDeadline() {+ hydrate([recentAlpha])+ const probe = deferred<BridgeHost | null>(null)+ boundary.probe.mockReturnValue(probe.promise)+ const scanning = runtime.startAutoScan()+ const signal = recordedProbe()[1]++ await vi.advanceTimersByTimeAsync(19999)+ expect(signal.aborted).toBe(false)+ expect(connection.stage).toBe('scanning')+ await vi.advanceTimersByTimeAsync(1)+ expect(signal.aborted).toBe(true)+ expect(connection.stage).toBe('idle')+ expect(connection.notice).toBe(noHosts)+ probe.resolve(openHost(alpha))+ await scanning++ expect(connection.current).toBeNull()+ expect(connection.health[alpha.id]).toBe('checking')+ expect(boundary.ip).not.toHaveBeenCalled()+ expect(boundary.scan).not.toHaveBeenCalled()+ expect(vi.getTimerCount()).toBe(0)+ }++ it('uses one 20000ms budget across history, IP lookup and LAN discovery rather than restarting it per phase', shareTotalDeadline)++ async function shareTotalDeadline() {+ hydrate([recentAlpha])+ const probe = deferred<BridgeHost | null>(null)+ const ip = deferred('')+ const scan = deferred<BridgeHost[]>([])+ boundary.probe.mockReturnValue(probe.promise)+ boundary.ip.mockReturnValue(ip.promise)+ boundary.scan.mockReturnValue(scan.promise)+ const scanning = runtime.startAutoScan()++ await vi.advanceTimersByTimeAsync(2500)+ probe.resolve(null)+ await vi.advanceTimersByTimeAsync(0)+ expect(boundary.ip).toHaveBeenCalledTimes(1)+ await vi.advanceTimersByTimeAsync(1500)+ ip.resolve('10.0.0.9')+ await vi.advanceTimersByTimeAsync(0)+ const signal = recordedScan()[1].signal+ expect(signal).toBe(recordedProbe()[1])+ await vi.advanceTimersByTimeAsync(15999)+ expect(signal.aborted).toBe(false)+ expect(connection.stage).toBe('scanning')+ await vi.advanceTimersByTimeAsync(1)+ expect(signal.aborted).toBe(true)+ expect(connection.stage).toBe('idle')+ expect(connection.notice).toBe(noHosts)+ scan.resolve([])+ await scanning++ expect(connection.current).toBeNull()+ expect(connection.notice).toBe(noHosts)+ expect(vi.getTimerCount()).toBe(0)+ }++ it('does not begin LAN discovery after an IP lookup outlives the total deadline', enforceIpLookupDeadline)++ async function enforceIpLookupDeadline() {+ hydrate()+ const ip = deferred('')+ boundary.ip.mockReturnValue(ip.promise)+ const scanning = runtime.startAutoScan()+ await vi.advanceTimersByTimeAsync(0)++ await vi.advanceTimersByTimeAsync(20000)+ expect(connection.stage).toBe('idle')+ expect(connection.notice).toBe(noHosts)+ ip.resolve('10.0.0.9')+ await scanning++ expect(boundary.scan).not.toHaveBeenCalled()+ expect(connection.current).toBeNull()+ expect(vi.getTimerCount()).toBe(0)+ }++ it('does not accept a predeadline discovery when aborted scan workers only settle after the total deadline', rejectExpiredChosenHost)++ async function rejectExpiredChosenHost() {+ hydrate()+ const scan = deferred<BridgeHost[]>([])+ boundary.scan.mockReturnValue(scan.promise)+ const scanning = runtime.startAutoScan()+ await vi.advanceTimersByTimeAsync(0)++ await vi.advanceTimersByTimeAsync(19999)+ publish(openHost(gamma))+ expect(recordedScan()[1].signal.aborted).toBe(true)+ expect(connection.stage).toBe('scanning')+ await vi.advanceTimersByTimeAsync(1)+ expect(connection.stage).toBe('idle')+ expect(connection.notice).toBe(noHosts)+ scan.resolve([openHost(gamma)])+ await scanning++ expect(connection.current).toBeNull()+ expect(connection.stage).toBe('idle')+ expect(connection.notice).toBe(noHosts)+ expect(vi.getTimerCount()).toBe(0)+ }++ it('does not reconnect when LAN discovery publishes a host after the total deadline has expired', discardDiscoveryAfterDeadline)++ async function discardDiscoveryAfterDeadline() {+ hydrate()+ const scan = deferred<BridgeHost[]>([])+ boundary.scan.mockReturnValue(scan.promise)+ const scanning = runtime.startAutoScan()+ await vi.advanceTimersByTimeAsync(0)++ await vi.advanceTimersByTimeAsync(20000)+ expect(recordedScan()[1].signal.aborted).toBe(true)+ expect(connection.stage).toBe('idle')+ publish(openHost(gamma))+ scan.resolve([openHost(gamma)])+ await scanning++ expect(connection.current).toBeNull()+ expect(connection.stage).toBe('idle')+ expect(connection.notice).toBe(noHosts)+ expect(connection.health).toEqual({})+ expect(vi.getTimerCount()).toBe(0)+ }+}++describe('disconnectAndScan', describeDisconnectDiscovery)++function describeDisconnectDiscovery() {+ it('skips the disconnected history origin and reconnects another reachable history entry', skipDisconnectedHistory)++ async function skipDisconnectedHistory() {+ hydrate([recentAlpha, recentBeta])+ runtime.connectAddress(alpha)+ boundary.probe.mockResolvedValue(openHost(beta))++ runtime.disconnectAndScan()+ expect(connection.current).toBeNull()+ await vi.advanceTimersByTimeAsync(0)++ expect(boundary.probe).toHaveBeenCalledTimes(1)+ expect(recordedProbe()[0]).toEqual(recentBeta)+ expect(connection.current).toEqual(beta)+ expect(connection.history).toEqual([recentAlpha, recentBeta])+ expect(connection.stage).toBe('connected')+ expect(boundary.ip).not.toHaveBeenCalled()+ expect(boundary.scan).not.toHaveBeenCalled()+ }++ it('excludes only the disconnected host and port from LAN discovery while preserving sibling ports and history custom ports', excludeDisconnectedAddress)++ async function excludeDisconnectedAddress() {+ const recentGamma: HistoryEntry = { ...gamma, lastConnectedAt: 30 }+ hydrate([recentGamma, recentAlpha])+ runtime.connectAddress(gamma)++ runtime.disconnectAndScan()+ await vi.advanceTimersByTimeAsync(0)++ expect(boundary.probe).toHaveBeenCalledTimes(1)+ expect(recordedProbe()[0]).toEqual(recentAlpha)+ const candidates = recordedScan()[0]+ expect(candidates).toHaveLength(758)+ expect(candidates).not.toContainEqual({ host: '10.0.0.3', port: 3080 })+ expect(candidates.filter(disconnectedHostCandidate)).toEqual([+ { host: '10.0.0.3', port: 4444 },+ { host: '10.0.0.3', port: 3088 },+ ])++ function disconnectedHostCandidate(candidate: ScanCandidate): boolean {+ return candidate.host === '10.0.0.3'+ }+ expect(candidates).toContainEqual({ host: '10.0.0.20', port: 4444 })+ expect(candidates.filter(selfCandidate)).toEqual([])++ function selfCandidate(candidate: ScanCandidate): boolean {+ return candidate.host === '10.0.0.9'+ }+ expect(connection.history).toEqual([recentGamma, recentAlpha])+ expect(connection.current).toBeNull()+ expect(connection.stage).toBe('idle')+ expect(connection.notice).toBe(noHosts)+ expect(vi.getTimerCount()).toBe(0)+ }+}++describe('refreshHealth and offline notifications', describeHealthRefresh)++function describeHealthRefresh() {+ it('deduplicates overlapping health refreshes and permits another refresh after the first settles', preventOverlappingHealthWork)++ async function preventOverlappingHealthWork() {+ hydrate([recentAlpha])+ runtime.connectAddress(alpha)+ const probe = deferred<BridgeHost | null>(null)+ boundary.probe.mockReturnValueOnce(probe.promise).mockResolvedValueOnce(openHost(alpha))+ const first = runtime.refreshHealth()++ await runtime.refreshHealth()+ expect(boundary.probe).toHaveBeenCalledTimes(1)+ expect(recordedProbe()[0]).toEqual(alpha)+ expect(recordedProbe()[2]).toBe(3000)+ probe.resolve(openHost(alpha))+ await first+ await runtime.refreshHealth()++ expect(boundary.probe).toHaveBeenCalledTimes(2)+ expect(connection.health[alpha.id]).toBe('available')+ expect(connection.current).toEqual(alpha)+ expect(boundary.notify).not.toHaveBeenCalled()+ }++ it('limits history health checks to the most recent five while including a current origin outside that window', restrictHealthWindow)++ async function restrictHealthWindow() {+ const history: HistoryEntry[] = Array.from({ length: 6 }, makeHistoryEntry)++ function makeHistoryEntry(_: unknown, index: number): HistoryEntry {+ return { id: `http://host-${index + 1}.test:3080`, url: `http://host-${index + 1}.test:3080/`, host: `host-${index + 1}.test`, port: 3080, lastConnectedAt: 6 - index }+ }+ hydrate(history)++ await runtime.refreshHealth()++ expect(boundary.probe.mock.calls.map(probedOrigin)).toEqual([+ 'http://host-1.test:3080',+ 'http://host-2.test:3080',+ 'http://host-3.test:3080',+ 'http://host-4.test:3080',+ 'http://host-5.test:3080',+ ])++ function probedOrigin(call: Parameters<typeof import('@/services/probe-bridge').probeBridge>): string {+ return call[0].id+ }+ expect(connection.health['http://host-6.test:3080']).toBeUndefined()+ boundary.probe.mockClear()+ runtime.connectAddress({ id: 'http://host-6.test:3080', url: 'http://host-6.test:3080/', host: 'host-6.test', port: 3080 })++ await runtime.refreshHealth()++ expect(boundary.probe.mock.calls.map(probedOrigin)).toEqual([+ 'http://host-1.test:3080',+ 'http://host-2.test:3080',+ 'http://host-3.test:3080',+ 'http://host-4.test:3080',+ 'http://host-5.test:3080',+ 'http://host-6.test:3080',+ ])+ }++ it('does not let a previous origin failure set the new origin offline notice or notification', isolatePreviousOriginHealth)++ async function isolatePreviousOriginHealth() {+ hydrate([recentAlpha])+ runtime.connectAddress(alpha)+ const probe = deferred<BridgeHost | null>(null)+ boundary.probe.mockReturnValue(probe.promise)+ const refreshing = runtime.refreshHealth()++ runtime.connectAddress(beta)+ probe.resolve(null)+ await refreshing++ expect(connection.current).toEqual(beta)+ expect(connection.health[alpha.id]).toBe('unavailable')+ expect(connection.health[beta.id]).toBe('available')+ expect(connection.notice).toBeNull()+ expect(boundary.notify).not.toHaveBeenCalled()+ }++ it('does not overwrite a newly reconnected origin with a health result from its previous view generation', discardHealthFromPreviousConnection)++ async function discardHealthFromPreviousConnection() {+ hydrate([recentAlpha])+ runtime.connectAddress(alpha)+ const probe = deferred<BridgeHost | null>(null)+ boundary.probe.mockReturnValue(probe.promise)+ const refreshing = runtime.refreshHealth()+ const oldGeneration = connection.viewGeneration++ runtime.connectAddress({ ...alpha, url: 'http://10.0.0.20:4444/new-route' })+ expect(connection.viewGeneration).toBeGreaterThan(oldGeneration)+ probe.resolve(null)+ await refreshing++ expect(connection.current).toEqual({ ...alpha, url: 'http://10.0.0.20:4444/new-route' })+ expect(connection.health[alpha.id]).toBe('available')+ expect(connection.notice).toBeNull()+ expect(boundary.notify).not.toHaveBeenCalled()+ }++ it('discards stopped health results and does not release the lock owned by a subsequent refresh', retainNewHealthControllerOwnership)++ async function retainNewHealthControllerOwnership() {+ hydrate([recentAlpha])+ runtime.connectAddress(alpha)+ const oldProbe = deferred<BridgeHost | null>(null)+ const newProbe = deferred<BridgeHost | null>(null)+ boundary.probe.mockReturnValueOnce(oldProbe.promise).mockReturnValueOnce(newProbe.promise)+ const oldRefresh = runtime.refreshHealth()+ const oldSignal = recordedProbe(0)[1]++ runtime.stopConnectionRuntime()+ expect(oldSignal.aborted).toBe(true)+ const newRefresh = runtime.refreshHealth()+ const newSignal = recordedProbe(1)[1]+ expect(newSignal).not.toBe(oldSignal)+ oldProbe.resolve(null)+ await oldRefresh+ expect(connection.health[alpha.id]).toBe('available')+ expect(connection.notice).toBeNull()+ await runtime.refreshHealth()+ expect(boundary.probe).toHaveBeenCalledTimes(2)+ expect(newSignal.aborted).toBe(false)+ newProbe.resolve(openHost(alpha))+ await newRefresh++ expect(connection.health[alpha.id]).toBe('available')+ expect(boundary.notify).not.toHaveBeenCalled()+ }++ it('notifies only on an available-to-offline current-host transition and clears the offline notice after recovery', notifyOfflineTransitions)++ async function notifyOfflineTransitions() {+ hydrate([recentAlpha])+ runtime.connectAddress(alpha)+ boundary.probe.mockResolvedValueOnce(null).mockResolvedValueOnce(null).mockResolvedValueOnce(openHost(alpha)).mockResolvedValueOnce(null)++ await runtime.refreshHealth()++ expect(connection.health[alpha.id]).toBe('unavailable')+ expect(connection.notice).toBe(hostOffline)+ expect(connection.current).toEqual(alpha)+ expect(boundary.notify).toHaveBeenCalledExactlyOnceWith({+ type: 'dsh://native-notification',+ title: 'DSH Mobile',+ body: hostOffline,+ tag: 'connection:http://10.0.0.20:4444',+ sessionId: '',+ silent: false,+ }, 'http://10.0.0.20:4444')+ await runtime.refreshHealth()+ expect(boundary.notify).toHaveBeenCalledTimes(1)+ expect(connection.notice).toBe(hostOffline)+ await runtime.refreshHealth()+ expect(connection.health[alpha.id]).toBe('available')+ expect(connection.notice).toBeNull()+ expect(boundary.notify).toHaveBeenCalledTimes(1)+ await runtime.refreshHealth()+ expect(connection.health[alpha.id]).toBe('unavailable')+ expect(connection.notice).toBe(hostOffline)+ expect(boundary.notify).toHaveBeenCalledTimes(2)+ }++ it('does not clear an unrelated notice when the current host is available', preserveUnrelatedNotice)++ async function preserveUnrelatedNotice() {+ hydrate([recentAlpha])+ runtime.connectAddress(alpha)+ connection.setNotice('Fixture unrelated notice')+ boundary.probe.mockResolvedValue(openHost(alpha))++ await runtime.refreshHealth()++ expect(connection.health[alpha.id]).toBe('available')+ expect(connection.notice).toBe('Fixture unrelated notice')+ expect(boundary.notify).not.toHaveBeenCalled()+ }+}diff --git a/src-native/store/modules/connection/runtime.ts b/src-native/store/modules/connection/runtime.tsnew file mode 100644index 00000000..d5141d26--- /dev/null+++ b/src-native/store/modules/connection/runtime.ts@@ -0,0 +1,178 @@+import type { BridgeHost } from '@/services/probe-bridge'+import type { BridgeAddress } from '@/utils/bridge-protocol'+import * as Network from 'expo-network'+import { EXTRA_SCAN_PORTS, HISTORY_PROBE_TIMEOUT_MS, SCAN_BUDGET_MS } from '@/config/constants'+import { sendNativeNotification } from '@/hooks/use-notifications'+import { i18n } from '@/i18n'+import { probeBridge } from '@/services/probe-bridge'+import { scanCandidates } from '@/services/scan-candidates'+import { parseQrPayload } from '@/utils/bridge-protocol'+import { buildCandidates } from '@/utils/discovery'+import { connection } from './index'++let scanController: AbortController | undefined+let healthController: AbortController | undefined++function withSavedToken(address: BridgeAddress): BridgeAddress {+ const normalized = parseQrPayload(address.url)+ const token = address.token ?? normalized?.token ?? connection.tokens[normalized?.id ?? address.id]+ if (token)+ return { ...address, token }+ return address+}++export function cancelAutoScan(): void {+ scanController?.abort()+ scanController = undefined+ connection.cancelScan()+}++export function connectAddress(address: BridgeAddress): void {+ cancelAutoScan()+ connection.accept(withSavedToken(address))+}++export async function startAutoScan({ skipId, historyOnly = false }: { skipId?: string, historyOnly?: boolean } = {}): Promise<void> {+ cancelAutoScan()+ const controller = new AbortController()+ scanController = controller+ const generation = connection.beginScan()+ let expired = false+ const deadline = setTimeout(() => {+ expired = true+ controller.abort()+ connection.finishScan(generation, i18n.t('connection.noHosts'))+ }, SCAN_BUDGET_MS)+ try {+ const history = connection.history.filter(entry => entry.id !== skipId)+ const previous = await Promise.all(history.map(async (entry) => {+ connection.setHealth(entry.id, 'checking')+ const host = await probeBridge(withSavedToken(entry), controller.signal, HISTORY_PROBE_TIMEOUT_MS)+ if (!controller.signal.aborted)+ connection.setHealth(entry.id, host ? 'available' : 'unavailable')+ return host+ }))+ if (controller.signal.aborted || generation !== connection.scanGeneration)+ return+ let needsToken = false+ for (const host of previous) {+ if (!host)+ continue+ if (host.auth.enabled && host.auth.mode === 'token_only' && !host.token) {+ needsToken = true+ continue+ }+ if (connection.accept(host, generation))+ return+ }+ if (historyOnly) {+ connection.finishScan(generation, needsToken ? i18n.t('connection.tokenRequired') : i18n.t('connection.noHistoryAvailable'))+ return+ }+ const selfIp = await Network.getIpAddressAsync()+ if (controller.signal.aborted || generation !== connection.scanGeneration)+ return+ const exclude: string[] = []+ if (skipId) {+ const skipped = parseQrPayload(skipId)+ if (skipped)+ exclude.push(`${skipped.host}:${skipped.port}`)+ }+ const candidates = buildCandidates({+ selfIp,+ ports: [...EXTRA_SCAN_PORTS, ...history.map(entry => entry.port)],+ exclude,+ })+ if (candidates.length === 0) {+ connection.finishScan(generation, i18n.t('connection.noNetwork'))+ return+ }+ let chosen: BridgeHost | undefined+ await scanCandidates(candidates, {+ signal: controller.signal,+ onFound(host) {+ if (expired || controller.signal.aborted || generation !== connection.scanGeneration)+ return+ const saved = withSavedToken(host)+ if (host.auth.enabled && host.auth.mode === 'token_only' && !saved.token) {+ needsToken = true+ return+ }+ chosen = { ...host, ...saved }+ controller.abort()+ },+ })+ if (expired || generation !== connection.scanGeneration)+ return+ if (chosen) {+ connection.accept(chosen, generation)+ }+ else {+ let notice: string = i18n.t('connection.noHosts')+ if (needsToken)+ notice = i18n.t('connection.tokenRequired')+ connection.finishScan(generation, notice)+ }+ }+ catch (error) {+ if (!controller.signal.aborted) {+ console.error('[connection] scan failed:', error)+ connection.finishScan(generation, i18n.t('connection.scanFailed'))+ }+ }+ finally {+ clearTimeout(deadline)+ controller.abort()+ if (scanController === controller)+ scanController = undefined+ }+}++export function disconnectAndScan(): void {+ const previousId = connection.current?.id+ connection.disconnect()+ void startAutoScan({ skipId: previousId })+}++export async function refreshHealth(): Promise<void> {+ if (healthController)+ return+ const controller = new AbortController()+ healthController = controller+ const viewGeneration = connection.viewGeneration+ const addresses = new Map<string, BridgeAddress>(connection.recentFive.map(entry => [entry.id, entry]))+ if (connection.current)+ addresses.set(connection.current.id, connection.current)+ try {+ await Promise.all([...addresses.values()].map(async (address) => {+ const wasAvailable = connection.health[address.id] === 'available'+ const host = await probeBridge(address, controller.signal, HISTORY_PROBE_TIMEOUT_MS)+ if (controller.signal.aborted || (address.id === connection.current?.id && viewGeneration !== connection.viewGeneration))+ return+ connection.setHealth(address.id, host ? 'available' : 'unavailable')+ if (wasAvailable && !host && address.id === connection.current?.id) {+ connection.setNotice(i18n.t('connection.hostOffline'))+ void sendNativeNotification({+ type: 'dsh://native-notification',+ title: i18n.t('app.name'),+ body: i18n.t('connection.hostOffline'),+ tag: `connection:${address.id}`,+ sessionId: '',+ silent: false,+ }, address.id)+ }+ if (host && address.id === connection.current?.id && connection.notice === i18n.t('connection.hostOffline'))+ connection.setNotice(null)+ }))+ }+ finally {+ if (healthController === controller)+ healthController = undefined+ }+}++export function stopConnectionRuntime(): void {+ cancelAutoScan()+ healthController?.abort()+ healthController = undefined+}diff --git a/src-native/store/modules/connection/storage.test.ts b/src-native/store/modules/connection/storage.test.tsnew file mode 100644index 00000000..1e05238f--- /dev/null+++ b/src-native/store/modules/connection/storage.test.ts@@ -0,0 +1,533 @@+import type { ConnectionSnapshot } from './index'+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'+import { i18n } from '@/i18n'+import { connection, createConnectionState, parseConnectionSnapshot, resetConnectionStorageCache } from './index'+import { bindConnectionPersistence, restoreConnections } from './storage'++const native = vi.hoisted(() => ({+ read: vi.fn<(key: string) => Promise<string | null>>(),+ write: vi.fn<(key: string, value: string) => Promise<void>>(),+ readToken: vi.fn<(key: string) => Promise<string | null>>(),+ writeToken: vi.fn<(key: string, value: string) => Promise<void>>(),+ deleteToken: vi.fn<(key: string) => Promise<void>>(),+}))++vi.mock('@react-native-async-storage/async-storage', () => ({ default: { getItem: native.read, setItem: native.write } }))+vi.mock('expo-secure-store', () => ({ getItemAsync: native.readToken, setItemAsync: native.writeToken, deleteItemAsync: native.deleteToken }))+vi.mock('expo-localization', () => ({ getLocales: () => [{ languageTag: 'zh-CN' }] }))++const alpha = { id: 'http://bridge.local:3080', url: 'http://bridge.local:3080/tasks?theme=dark', host: 'bridge.local', port: 3080 }+const beta = { id: 'https://second.local', url: 'https://second.local/workspaces', host: 'second.local', port: 443 }+const alphaKey = 'dsh-bridge.token.0068007400740070003a002f002f006200720069006400670065002e006c006f00630061006c003a0033003000380030'+const betaKey = 'dsh-bridge.token.00680074007400700073003a002f002f007300650063006f006e0064002e006c006f00630061006c'+const emptySnapshot: ConnectionSnapshot = { version: 1, history: [], guidedHosts: [] }+const emptyPayload = payload([])+const storageFailure = i18n.t('connection.storageFailed')+const unsubscribers: (() => void)[] = []++function payload(history: ConnectionSnapshot['history'], guidedHosts: string[] = []): string {+ return JSON.stringify({ version: 1, history, guidedHosts })+}++function secureKey(origin: string): string {+ return `dsh-bridge.token.${Array.from(origin, character => character.charCodeAt(0).toString(16).padStart(4, '0')).join('')}`+}++function writtenPayloads(): string[] {+ return native.write.mock.calls.map(call => call[1])+}++function deferred<T>() {+ let resolve!: (value: T) => void+ let reject!: (reason: unknown) => void+ const promise = new Promise<T>((resolvePromise, rejectPromise) => {+ resolve = resolvePromise+ reject = rejectPromise+ })+ return { promise, resolve, reject }+}++function bind() {+ const unsubscribe = bindConnectionPersistence()+ unsubscribers.push(unsubscribe)+ return unsubscribe+}++async function hydrate(snapshot: ConnectionSnapshot = emptySnapshot, tokens: Record<string, string> = {}) {+ native.read.mockResolvedValue(JSON.stringify(parseConnectionSnapshot(snapshot)))+ native.readToken.mockImplementation(async key => Object.entries(tokens).find(([id]) => secureKey(id) === key)?.[1] ?? null)+ await restoreConnections()+ await vi.advanceTimersByTimeAsync(0)+}++beforeEach(() => {+ vi.useFakeTimers()+ connection.$persist.meta.hydrated = false+ connection.$persist.meta.mounted = false+ connection.$patch(createConnectionState())+ resetConnectionStorageCache()+ vi.resetAllMocks()+ native.read.mockResolvedValue(null)+ native.write.mockResolvedValue(undefined)+ native.readToken.mockResolvedValue(null)+ native.writeToken.mockResolvedValue(undefined)+ native.deleteToken.mockResolvedValue(undefined)+ vi.clearAllMocks()+})++afterEach(() => {+ for (const unsubscribe of unsubscribers.splice(0))+ unsubscribe()+ vi.restoreAllMocks()+ vi.unstubAllGlobals()+ vi.clearAllTimers()+ vi.useRealTimers()+})++describe('connection editing persistence', () => {+ it('persists a renamed host and deletes its secure token when the active connection is removed', async () => {+ await hydrate({ version: 1, history: [{ ...alpha, lastConnectedAt: 10 }], guidedHosts: [alpha.id] }, { [alpha.id]: 'secret' })+ bind()+ connection.accept(alpha)+ connection.rename(alpha.id, '我的电脑')+ await vi.advanceTimersByTimeAsync(0)+ expect(JSON.parse(writtenPayloads().at(-1)!)).toEqual({ version: 1, history: [{ ...alpha, name: '我的电脑', lastConnectedAt: 10 }], guidedHosts: [alpha.id] })+ connection.remove(alpha.id)+ await vi.advanceTimersByTimeAsync(0)+ expect(writtenPayloads().at(-1)).toBe(emptyPayload)+ expect(native.deleteToken).toHaveBeenCalledExactlyOnceWith(alphaKey)+ })+})++describe('restoreConnections', () => {+ it('restores sanitized history and retrieves tokens exclusively from native secure storage by normalized origin', async () => {+ native.read.mockResolvedValue(JSON.stringify({+ version: 1,+ history: [+ { id: 'https://evil.test', url: 'http://BRIDGE.local:3080/tasks?auth=plaintext&token=other&theme=dark#private', host: 'evil.test', port: 9, token: 'injected', lastConnectedAt: 10 },+ { url: 'https://second.local/workspaces', lastConnectedAt: 20 },+ { url: 'ftp://wrong.local', lastConnectedAt: 30 },+ ],+ tokens: { 'http://bridge.local:3080': 'plaintext-map' },+ guidedHosts: ['http://bridge.local:3080', 'https://evil.test'],+ }))+ native.readToken.mockImplementation(async (key) => {+ if (key === alphaKey)+ return 'secure-alpha'+ if (key === betaKey)+ return null+ throw new Error(`Unexpected secure key: ${key}`)+ })+ await restoreConnections()+ expect(native.read).toHaveBeenCalledExactlyOnceWith('dsh-bridge/connections')+ expect(native.readToken.mock.calls).toEqual([[betaKey], [alphaKey]])+ expect(connection.hydrated).toBe(true)+ expect(connection.history).toEqual([{ ...beta, lastConnectedAt: 20 }, { ...alpha, lastConnectedAt: 10 }])+ expect(connection.tokens).toEqual({ 'http://bridge.local:3080': 'secure-alpha' })+ expect(connection.guidedHosts).toEqual(['http://bridge.local:3080'])+ expect(connection.current).toBeNull()+ expect(connection.stage).toBe('idle')+ expect(native.write).not.toHaveBeenCalled()+ expect(native.writeToken).not.toHaveBeenCalled()+ expect(native.deleteToken).not.toHaveBeenCalled()+ await restoreConnections()+ expect(native.read).toHaveBeenCalledTimes(1)+ expect(native.readToken).toHaveBeenCalledTimes(2)+ })++ it('hydrates an empty store and persists the clean snapshot when there is no persisted snapshot', async () => {+ await restoreConnections()+ await vi.advanceTimersByTimeAsync(0)+ expect(connection.hydrated).toBe(true)+ expect(connection.serialize()).toEqual({ version: 1, history: [], guidedHosts: [] })+ expect(connection.tokens).toEqual({})+ expect(connection.notice).toBeNull()+ expect(native.readToken).not.toHaveBeenCalled()+ expect(native.write).toHaveBeenCalledExactlyOnceWith('dsh-bridge/connections', emptyPayload)+ })++ it('rejects untrusted persisted address schemes and credentials before any secure-storage lookup', async () => {+ native.read.mockResolvedValue(JSON.stringify({+ version: 1,+ history: [+ { url: 'javascript:alert(1)', lastConnectedAt: 1 },+ { url: 'http://user:[email protected]:3080/', lastConnectedAt: 2 },+ { url: 'http://bridge.local:65536/', lastConnectedAt: 3 },+ { url: 'http://bad.local', lastConnectedAt: -1 },+ ],+ guidedHosts: ['http://bridge.local:3080'],+ tokens: { 'http://bridge.local:3080': 'untrusted' },+ }))+ await restoreConnections()+ expect(connection.serialize()).toEqual({ version: 1, history: [], guidedHosts: [] })+ expect(connection.tokens).toEqual({})+ expect(native.readToken).not.toHaveBeenCalled()+ expect(connection.hydrated).toBe(true)+ expect(native.write).not.toHaveBeenCalled()+ })++ it('reports malformed persisted JSON without accepting its embedded token and replaces it with a clean snapshot', async () => {+ native.read.mockResolvedValue('{"version":1,"tokens":{"bad":"secret"}')+ await restoreConnections()+ await vi.advanceTimersByTimeAsync(0)+ expect(connection.hydrated).toBe(true)+ expect(connection.serialize()).toEqual({ version: 1, history: [], guidedHosts: [] })+ expect(connection.tokens).toEqual({})+ expect(connection.notice).toBe(storageFailure)+ expect(native.readToken).not.toHaveBeenCalled()+ expect(native.write).toHaveBeenCalledExactlyOnceWith('dsh-bridge/connections', emptyPayload)+ })++ it('discards unsupported snapshot versions before fetching tokens', async () => {+ native.read.mockResolvedValue(JSON.stringify({ version: 2, history: [{ ...alpha, lastConnectedAt: 10 }], guidedHosts: [] }))+ await restoreConnections()+ expect(connection.hydrated).toBe(true)+ expect(connection.history).toEqual([])+ expect(native.readToken).not.toHaveBeenCalled()+ expect(native.write).not.toHaveBeenCalled()+ })++ it('reports a native history-read error and completes safe empty hydration', async () => {+ const error = new Error('History storage unavailable')+ const log = vi.spyOn(console, 'error').mockImplementation(() => {})+ native.read.mockRejectedValue(error)+ await restoreConnections()+ expect(connection.hydrated).toBe(true)+ expect(connection.serialize()).toEqual({ version: 1, history: [], guidedHosts: [] })+ expect(connection.tokens).toEqual({})+ expect(connection.notice).toBe(storageFailure)+ expect(log).toHaveBeenCalledExactlyOnceWith('[connection] restore failed:', error)+ expect(native.readToken).not.toHaveBeenCalled()+ expect(native.write).not.toHaveBeenCalled()+ })++ it('stops writing history after a failed read and resumes once a read succeeds', async () => {+ vi.spyOn(console, 'error').mockImplementation(() => {})+ native.read.mockRejectedValueOnce(new Error('History storage unavailable'))+ await restoreConnections()+ expect(connection.hydrated).toBe(true)+ expect(native.write).not.toHaveBeenCalled()++ connection.$patch(createConnectionState())+ connection.$persist.meta.hydrated = false+ connection.$persist.meta.mounted = false+ native.read.mockResolvedValue(JSON.stringify(parseConnectionSnapshot({ version: 1, history: [{ ...alpha, lastConnectedAt: 10 }], guidedHosts: [] })))+ await restoreConnections()+ await vi.advanceTimersByTimeAsync(0)++ expect(connection.history).toEqual([{ ...alpha, lastConnectedAt: 10 }])+ expect(writtenPayloads()).not.toContain(emptyPayload)+ })++ it('preserves valid history when secure-token reads fail without falling back to plaintext tokens', async () => {+ const error = new Error('Secure storage locked')+ const log = vi.spyOn(console, 'error').mockImplementation(() => {})+ native.read.mockResolvedValue(JSON.stringify({ version: 1, history: [{ ...alpha, token: 'plaintext', lastConnectedAt: 10 }], guidedHosts: [] }))+ native.readToken.mockRejectedValue(error)+ await restoreConnections()+ expect(connection.hydrated).toBe(true)+ expect(connection.serialize()).toEqual({ version: 1, history: [{ ...alpha, lastConnectedAt: 10 }], guidedHosts: [] })+ expect(connection.tokens).toEqual({})+ expect(connection.notice).toBe(storageFailure)+ expect(log).toHaveBeenCalledExactlyOnceWith('[connection] token restore failed:', error)+ expect(native.write).not.toHaveBeenCalled()+ })++ it('isolates a failed token read without discarding other readable tokens or saved guide state', async () => {+ const error = new Error('One token unavailable')+ const log = vi.spyOn(console, 'error').mockImplementation(() => {})+ native.read.mockResolvedValue(JSON.stringify({+ version: 1,+ history: [{ ...beta, lastConnectedAt: 20 }, { ...alpha, lastConnectedAt: 10 }],+ guidedHosts: [alpha.id],+ }))+ native.readToken.mockImplementation(async (key) => {+ if (key === betaKey)+ throw error+ return 'secure-alpha'+ })+ await restoreConnections()+ expect(connection.serialize()).toEqual({+ version: 1,+ history: [{ ...beta, lastConnectedAt: 20 }, { ...alpha, lastConnectedAt: 10 }],+ guidedHosts: [alpha.id],+ })+ expect(connection.tokens).toEqual({ [alpha.id]: 'secure-alpha' })+ expect(connection.notice).toBe(storageFailure)+ expect(log).toHaveBeenCalledExactlyOnceWith('[connection] token restore failed:', error)+ expect(native.write).not.toHaveBeenCalled()+ expect(native.writeToken).not.toHaveBeenCalled()+ expect(native.deleteToken).not.toHaveBeenCalled()+ })++ it('never writes before both history and secure-token hydration finish and does not echo the snapshot already on disk', async () => {+ const historyRead = deferred<string | null>()+ const tokenRead = deferred<string | null>()+ native.read.mockReturnValue(historyRead.promise)+ native.readToken.mockReturnValue(tokenRead.promise)+ bind()+ const restoring = restoreConnections()+ connection.setNotice('Restoring')+ await vi.advanceTimersByTimeAsync(0)+ expect(connection.hydrated).toBe(false)+ expect(connection.tokens).toEqual({})+ expect(native.write).not.toHaveBeenCalled()+ expect(native.writeToken).not.toHaveBeenCalled()+ historyRead.resolve(payload([{ ...alpha, lastConnectedAt: 10 }]))+ await vi.advanceTimersByTimeAsync(0)+ expect(native.readToken).toHaveBeenCalledExactlyOnceWith(alphaKey)+ expect(connection.hydrated).toBe(false)+ expect(connection.history).toEqual([{ ...alpha, lastConnectedAt: 10 }])+ expect(connection.tokens).toEqual({})+ expect(native.write).not.toHaveBeenCalled()+ tokenRead.resolve('secure-alpha')+ await restoring+ await vi.advanceTimersByTimeAsync(0)+ expect(connection.hydrated).toBe(true)+ expect(connection.tokens).toEqual({ [alpha.id]: 'secure-alpha' })+ expect(native.writeToken).toHaveBeenCalledExactlyOnceWith(alphaKey, 'secure-alpha')+ expect(native.write).not.toHaveBeenCalled()+ expect(native.deleteToken).not.toHaveBeenCalled()+ })+})++describe('bindConnectionPersistence security and ordering', () => {+ it('persists restored history after an earlier different snapshot finishes saving', async () => {+ const saved = payload([{ ...alpha, lastConnectedAt: 10 }])+ let disk = saved+ await hydrate({ version: 1, history: [{ ...alpha, lastConnectedAt: 10 }], guidedHosts: [] })+ const pending = deferred<void>()+ native.write.mockImplementationOnce(async (_key, value) => {+ await pending.promise+ disk = value+ }).mockImplementation(async (_key, value) => { disk = value })+ connection.$patch({ history: [{ ...beta, lastConnectedAt: 20 }] })+ await vi.advanceTimersByTimeAsync(0)+ expect(native.write).toHaveBeenCalledTimes(1)+ connection.$patch({ history: [{ ...alpha, lastConnectedAt: 10 }] })+ await vi.advanceTimersByTimeAsync(0)+ pending.resolve(undefined)+ await vi.advanceTimersByTimeAsync(0)+ expect(disk).toBe(saved)+ expect(writtenPayloads()).toEqual([payload([{ ...beta, lastConnectedAt: 20 }]), saved])+ })++ it('does not repeat pending snapshot writes for transient UI changes', async () => {+ await hydrate()+ const pending = deferred<void>()+ native.write.mockReturnValueOnce(pending.promise)+ connection.$patch({ history: [{ ...alpha, lastConnectedAt: 10 }] })+ await vi.advanceTimersByTimeAsync(0)+ connection.setDrawerOpen(true)+ await vi.advanceTimersByTimeAsync(0)+ connection.setNotice('Still saving')+ await vi.advanceTimersByTimeAsync(0)+ pending.resolve(undefined)+ await vi.advanceTimersByTimeAsync(0)+ expect(native.write).toHaveBeenCalledExactlyOnceWith('dsh-bridge/connections', payload([{ ...alpha, lastConnectedAt: 10 }]))+ })++ it('does not write any pre-hydration runtime changes', async () => {+ bind()+ connection.accept({ ...alpha, token: 'not-yet-hydrated' })+ connection.markLoaded(connection.viewGeneration, 10)+ await vi.advanceTimersByTimeAsync(0)+ expect(native.write).not.toHaveBeenCalled()+ expect(native.writeToken).not.toHaveBeenCalled()+ expect(native.deleteToken).not.toHaveBeenCalled()+ })++ it('retains the current unsaved token in secure storage without putting it in the public snapshot', async () => {+ await hydrate()+ bind()+ connection.accept({ ...alpha, token: 'current-secret' })+ await vi.advanceTimersByTimeAsync(0)+ expect(native.writeToken).toHaveBeenCalledExactlyOnceWith(alphaKey, 'current-secret')+ expect(native.writeToken.mock.calls).toEqual([[alphaKey, 'current-secret']])+ expect(native.write).not.toHaveBeenCalled()+ connection.markLoaded(connection.viewGeneration, 10)+ await vi.advanceTimersByTimeAsync(0)+ expect(native.write).toHaveBeenCalledExactlyOnceWith('dsh-bridge/connections', payload([{ ...alpha, lastConnectedAt: 10 }]))+ expect(writtenPayloads()[0]).not.toContain('current-secret')+ expect(connection.tokens).toEqual({ [alpha.id]: 'current-secret' })+ expect(native.deleteToken).not.toHaveBeenCalled()+ })++ it('writes only retained-origin tokens and excludes secrets from successful history serialization', async () => {+ await hydrate()+ connection.$patch({ tokens: { 'http://orphan.local': 'orphan-secret' } })+ bind()+ connection.accept({ ...alpha, url: 'http://bridge.local:3080/tasks?auth=qr-secret&token=other&theme=dark#private', token: 'secure-secret' })+ connection.markLoaded(connection.viewGeneration, 10)+ connection.dismissHint()+ await vi.advanceTimersByTimeAsync(0)+ expect(native.writeToken.mock.calls).toEqual([[alphaKey, 'secure-secret']])+ expect(native.write).toHaveBeenCalledExactlyOnceWith('dsh-bridge/connections', payload([{ ...alpha, lastConnectedAt: 10 }], ['http://bridge.local:3080']))+ expect(native.write.mock.calls[0]?.[1]).not.toContain('secret')+ expect(native.write.mock.calls[0]?.[1]).not.toContain('auth')+ expect(native.deleteToken).not.toHaveBeenCalled()+ })++ it('queues later normalized snapshots until an earlier snapshot write completes', async () => {+ const firstWrite = deferred<void>()+ native.write.mockReturnValueOnce(firstWrite.promise)+ await hydrate()+ bind()+ connection.accept({ ...alpha, token: 'alpha-secret' })+ connection.markLoaded(connection.viewGeneration, 10)+ await vi.advanceTimersByTimeAsync(0)+ expect(native.write).toHaveBeenCalledTimes(1)+ expect(native.writeToken.mock.calls).toEqual([[alphaKey, 'alpha-secret']])+ connection.accept({ ...beta, token: 'beta-secret' })+ connection.markLoaded(connection.viewGeneration, 20)+ await vi.advanceTimersByTimeAsync(0)+ expect(native.write).toHaveBeenCalledTimes(1)+ expect(JSON.parse(native.write.mock.calls[0]![1])).toEqual({ version: 1, history: [{ ...alpha, lastConnectedAt: 10 }], guidedHosts: [] })+ expect(native.writeToken.mock.calls).toEqual([[alphaKey, 'alpha-secret'], [alphaKey, 'alpha-secret'], [betaKey, 'beta-secret']])+ firstWrite.resolve(undefined)+ await vi.advanceTimersByTimeAsync(0)+ expect(native.write.mock.calls.map(call => [call[0], JSON.parse(call[1])])).toEqual([+ ['dsh-bridge/connections', { version: 1, history: [{ ...alpha, lastConnectedAt: 10 }], guidedHosts: [] }],+ ['dsh-bridge/connections', { version: 1, history: [{ ...beta, lastConnectedAt: 20 }, { ...alpha, lastConnectedAt: 10 }], guidedHosts: [] }],+ ])+ expect(native.writeToken.mock.calls).toEqual([[alphaKey, 'alpha-secret'], [alphaKey, 'alpha-secret'], [betaKey, 'beta-secret']])+ })++ it('writes the pruned history and deletes the secure token of an evicted origin without waiting for the snapshot write', async () => {+ const snapshotWrite = deferred<void>()+ native.write.mockReturnValueOnce(snapshotWrite.promise)+ await hydrate({ version: 1, history: [{ ...alpha, lastConnectedAt: 10 }, { ...beta, lastConnectedAt: 5 }], guidedHosts: [] }, { 'http://bridge.local:3080': 'alpha-secret', 'https://second.local': 'beta-secret' })+ bind()+ connection.$patch({ history: [{ ...beta, lastConnectedAt: 5 }] })+ await vi.advanceTimersByTimeAsync(0)+ expect(native.writeToken.mock.calls).toEqual([[betaKey, 'beta-secret']])+ expect(native.write).toHaveBeenCalledExactlyOnceWith('dsh-bridge/connections', payload([{ ...beta, lastConnectedAt: 5 }]))+ expect(native.deleteToken).toHaveBeenCalledExactlyOnceWith(alphaKey)+ expect(native.write.mock.invocationCallOrder[0]).toBeLessThan(native.deleteToken.mock.invocationCallOrder[0]!)+ snapshotWrite.resolve(undefined)+ await vi.advanceTimersByTimeAsync(0)+ expect(native.deleteToken).toHaveBeenCalledExactlyOnceWith(alphaKey)+ })++ it('keeps saved history tokens on disconnect while deleting a token for an unsaved current origin', async () => {+ await hydrate({ version: 1, history: [{ ...alpha, lastConnectedAt: 10 }], guidedHosts: [] }, { 'http://bridge.local:3080': 'alpha-secret' })+ bind()+ connection.accept({ ...beta, token: 'unsaved-secret' })+ await vi.advanceTimersByTimeAsync(0)+ expect(native.writeToken.mock.calls).toEqual([[alphaKey, 'alpha-secret'], [betaKey, 'unsaved-secret']])+ connection.disconnect()+ await vi.advanceTimersByTimeAsync(0)+ expect(connection.history).toEqual([{ ...alpha, lastConnectedAt: 10 }])+ expect(native.deleteToken.mock.calls).toEqual([[betaKey]])+ expect(native.writeToken.mock.calls).toEqual([[alphaKey, 'alpha-secret'], [betaKey, 'unsaved-secret'], [alphaKey, 'alpha-secret']])+ expect(native.write).not.toHaveBeenCalled()+ })++ it('does not rewrite an unchanged snapshot and token payload for transient UI changes', async () => {+ await hydrate()+ bind()+ connection.setNotice('First notice')+ await vi.advanceTimersByTimeAsync(0)+ expect(native.write).not.toHaveBeenCalled()+ connection.setNotice('Second notice')+ connection.setDrawerOpen(true)+ connection.setHealth('http://bridge.local:3080', 'unavailable')+ await vi.advanceTimersByTimeAsync(0)+ expect(native.write).not.toHaveBeenCalled()+ expect(native.writeToken).not.toHaveBeenCalled()+ expect(native.deleteToken).not.toHaveBeenCalled()+ })++ it('stops syncing secure-store tokens when the returned disposer is called', async () => {+ await hydrate()+ const unsubscribe = bind()+ connection.setNotice('Initial')+ await vi.advanceTimersByTimeAsync(0)+ expect(native.writeToken).not.toHaveBeenCalled()+ unsubscribe()+ connection.accept({ ...alpha, token: 'after-dispose' })+ connection.markLoaded(connection.viewGeneration, 10)+ await vi.advanceTimersByTimeAsync(0)+ expect(native.write).toHaveBeenCalledExactlyOnceWith('dsh-bridge/connections', payload([{ ...alpha, lastConnectedAt: 10 }]))+ expect(native.writeToken).not.toHaveBeenCalled()+ expect(native.deleteToken).not.toHaveBeenCalled()+ })+})++describe('connection persistence failures', () => {+ it('saves the queued latest snapshot after an earlier write rejects', async () => {+ await hydrate()+ const pending = deferred<void>()+ const error = new Error('First write failed')+ const log = vi.spyOn(console, 'error').mockImplementation(() => {})+ let disk = emptyPayload+ native.write.mockImplementationOnce(async () => pending.promise)+ .mockImplementation(async (_key, value) => { disk = value })+ connection.$patch({ history: [{ ...alpha, lastConnectedAt: 10 }] })+ await vi.advanceTimersByTimeAsync(0)+ connection.$patch({ history: [{ ...beta, lastConnectedAt: 20 }] })+ await vi.advanceTimersByTimeAsync(0)+ expect(native.write).toHaveBeenCalledTimes(1)+ pending.reject(error)+ await vi.advanceTimersByTimeAsync(0)+ expect(disk).toBe(payload([{ ...beta, lastConnectedAt: 20 }]))+ expect(native.write).toHaveBeenCalledTimes(2)+ expect(connection.notice).toBe(storageFailure)+ expect(log).toHaveBeenCalledExactlyOnceWith('[connection] save failed:', error)+ })++ it('reports a public snapshot write failure and permits a subsequent successful save', async () => {+ const error = new Error('Disk full')+ const log = vi.spyOn(console, 'error').mockImplementation(() => {})+ native.write.mockRejectedValueOnce(error)+ await restoreConnections()+ await vi.advanceTimersByTimeAsync(0)+ expect(log).toHaveBeenCalledExactlyOnceWith('[connection] save failed:', error)+ expect(connection.notice).toBe(storageFailure)+ bind()+ connection.accept({ ...alpha, token: 'secure-secret' })+ connection.markLoaded(connection.viewGeneration, 10)+ await vi.advanceTimersByTimeAsync(0)+ expect(native.write.mock.calls.map(call => [call[0], JSON.parse(call[1])])).toEqual([+ ['dsh-bridge/connections', { version: 1, history: [], guidedHosts: [] }],+ ['dsh-bridge/connections', { version: 1, history: [], guidedHosts: [] }],+ ['dsh-bridge/connections', { version: 1, history: [{ ...alpha, lastConnectedAt: 10 }], guidedHosts: [] }],+ ])+ expect(writtenPayloads()[2]).not.toContain('secure-secret')+ expect(native.deleteToken).not.toHaveBeenCalled()+ })++ it('writes the public snapshot independently of a failing secure-token save without leaking secrets', async () => {+ const error = new Error('Secure write refused')+ const log = vi.spyOn(console, 'error').mockImplementation(() => {})+ native.writeToken.mockRejectedValueOnce(error)+ await hydrate()+ bind()+ connection.accept({ ...alpha, token: 'secure-secret' })+ await vi.advanceTimersByTimeAsync(0)+ expect(log).toHaveBeenCalledExactlyOnceWith('[connection] token save failed:', error)+ expect(connection.notice).toBe(storageFailure)+ expect(native.writeToken.mock.calls).toEqual([[alphaKey, 'secure-secret'], [alphaKey, 'secure-secret']])+ expect(native.write).not.toHaveBeenCalled()+ connection.markLoaded(connection.viewGeneration, 10)+ await vi.advanceTimersByTimeAsync(0)+ expect(native.write).toHaveBeenCalledExactlyOnceWith('dsh-bridge/connections', payload([{ ...alpha, lastConnectedAt: 10 }]))+ expect(writtenPayloads()[0]).not.toContain('secure-secret')+ })++ it('reports a secure deletion failure and retries the eviction on the next persistence sync', async () => {+ const error = new Error('Secure delete refused')+ const log = vi.spyOn(console, 'error').mockImplementation(() => {})+ native.deleteToken.mockRejectedValueOnce(error)+ await hydrate({ version: 1, history: [{ ...alpha, lastConnectedAt: 10 }], guidedHosts: [] }, { 'http://bridge.local:3080': 'secure-secret' })+ bind()+ connection.$patch({ history: [] })+ await vi.advanceTimersByTimeAsync(0)+ expect(log).toHaveBeenCalledExactlyOnceWith('[connection] token save failed:', error)+ expect(connection.notice).toBe(storageFailure)+ expect(native.deleteToken.mock.calls).toEqual([[alphaKey], [alphaKey]])+ expect(native.write).toHaveBeenCalledExactlyOnceWith('dsh-bridge/connections', emptyPayload)+ expect(native.writeToken).not.toHaveBeenCalled()+ expect(native.write.mock.invocationCallOrder[0]).toBeLessThan(native.deleteToken.mock.invocationCallOrder[1]!)+ })+})diff --git a/src-native/store/modules/connection/storage.ts b/src-native/store/modules/connection/storage.tsnew file mode 100644index 00000000..3b72e823--- /dev/null+++ b/src-native/store/modules/connection/storage.ts@@ -0,0 +1,79 @@+import * as SecureStore from 'expo-secure-store'+import { i18n } from '@/i18n'+import { connection } from './index'++function tokenKey(origin: string): string {+ const encoded = Array.from(origin, character => character.charCodeAt(0).toString(16).padStart(4, '0')).join('')+ return `dsh-bridge.token.${encoded}`+}++function reportStorageFailure() {+ const message = i18n.t('connection.storageFailed')+ if (connection.notice !== message)+ connection.setNotice(message)+}++/**+ * 启动时恢复连接记录:+ * 1. `connection.$persist.rehydrate()` 由 valtio-define persist 插件把 `{version, history, guidedHosts}`+ * 读回 state(AsyncStorage 适配器在 store 模块里);+ * 2. 令牌永远只从 SecureStore 按 origin 派生键读取,绝不进 AsyncStorage;+ * 3. 最后 `markHydrated(tokens)` 才把 state 标记为可用(也是插件开始写盘的前提)。+ */+export async function restoreConnections(): Promise<void> {+ if (connection.hydrated)+ return+ await connection.$persist.rehydrate()+ const entries = await Promise.all(connection.history.map(async (entry) => {+ try {+ const token = await SecureStore.getItemAsync(tokenKey(entry.id))+ return [entry.id, token] as const+ }+ catch (error) {+ console.error('[connection] token restore failed:', error)+ reportStorageFailure()+ return [entry.id, null] as const+ }+ }))+ const tokens: Record<string, string> = {}+ for (const [id, token] of entries) {+ if (token)+ tokens[id] = token+ }+ connection.markHydrated(tokens)+}++/**+ * 令牌持久化:跟随 state 变化把 SecureStore 里的令牌写入/清理对齐。+ * 连接快照本身由 persist 插件落盘,这里只处理 SecureStore,且串行执行避免竞态。+ */+export function bindConnectionPersistence(): () => void {+ let writtenIds = new Set(connection.history.map(entry => entry.id))+ let lastPayload = ''+ let queue = Promise.resolve()+ return connection.$subscribe(() => {+ if (!connection.hydrated)+ return+ const retained = new Set(connection.history.map(entry => entry.id))+ if (connection.current)+ retained.add(connection.current.id)+ const tokens = Object.fromEntries(Object.entries(connection.tokens).filter(([id]) => retained.has(id)))+ const payload = JSON.stringify(tokens)+ if (payload === lastPayload)+ return+ lastPayload = payload+ queue = queue.then(async () => {+ for (const [id, token] of Object.entries(tokens))+ await SecureStore.setItemAsync(tokenKey(id), token)+ for (const id of writtenIds) {+ if (!retained.has(id))+ await SecureStore.deleteItemAsync(tokenKey(id))+ }+ writtenIds = retained+ }).catch((error) => {+ lastPayload = ''+ console.error('[connection] token save failed:', error)+ reportStorageFailure()+ })+ })+}diff --git a/src-native/styles/variables.css b/src-native/styles/variables.cssnew file mode 100644index 00000000..5f0d72a2--- /dev/null+++ b/src-native/styles/variables.css@@ -0,0 +1,60 @@+@layer theme {+ :root {+ --radius: 16px;+ --field-radius: 12px;++ @variant light {+ --background: #ffffff;+ --foreground: #0f1115;+ --surface: #f9fafb;+ --surface-foreground: #0f1115;+ --surface-secondary: #f5f6f7;+ --surface-secondary-foreground: #0f1115;+ --surface-tertiary: #f1f3f5;+ --surface-tertiary-foreground: #0f1115;+ --overlay: #ffffff;+ --overlay-foreground: #0f1115;+ --backdrop: rgba(0, 0, 0, 0.24);+ --muted: #81858c;+ --default: #f1f3f5;+ --default-foreground: #0f1115;+ --accent: #0f1115;+ --accent-foreground: #ffffff;+ --field-background: #f9fafb;+ --field-foreground: #0f1115;+ --field-placeholder: #81858c;+ --field-border: rgba(0, 0, 0, 0.1);+ --border: rgba(0, 0, 0, 0.1);+ --separator: rgba(0, 0, 0, 0.16);+ --success: #22c55e;+ --focus: var(--accent);+ }++ @variant dark {+ --background: #151517;+ --foreground: #f9fafb;+ --surface: #1b1b1c;+ --surface-foreground: #f9fafb;+ --surface-secondary: #2c2c2e;+ --surface-secondary-foreground: #f9fafb;+ --surface-tertiary: #2c2c2e;+ --surface-tertiary-foreground: #f9fafb;+ --overlay: #1b1b1c;+ --overlay-foreground: #f9fafb;+ --backdrop: rgba(0, 0, 0, 0.5);+ --muted: #adb2b8;+ --default: #2c2c2e;+ --default-foreground: #f9fafb;+ --accent: #f9fafb;+ --accent-foreground: #0f1115;+ --field-background: #1b1b1c;+ --field-foreground: #f9fafb;+ --field-placeholder: #adb2b8;+ --field-border: rgba(255, 255, 255, 0.12);+ --border: rgba(255, 255, 255, 0.12);+ --separator: rgba(255, 255, 255, 0.2);+ --success: #22c55e;+ --focus: var(--accent);+ }+ }+}diff --git a/src-native/test/app-config.test.ts b/src-native/test/app-config.test.tsnew file mode 100644index 00000000..bee7965b--- /dev/null+++ b/src-native/test/app-config.test.ts@@ -0,0 +1,77 @@+import { readFileSync } from 'node:fs'+import { dirname, resolve } from 'node:path'+import { fileURLToPath } from 'node:url'+import { getConfig } from 'expo/config'+import { describe, expect, it } from 'vitest'++const projectRoot = resolve(dirname(fileURLToPath(import.meta.url)), '../..')+const packageVersion = (JSON.parse(readFileSync(resolve(projectRoot, 'package.json'), 'utf8')) as { version: string }).version++describe('public Expo configuration packaged by expo-constants', () => {+ it('embeds the complete third-party notice without changing Android identity', () => {+ const { exp } = getConfig(projectRoot, { isPublicConfig: true, skipSDKVersionRequirement: true })+ const notice = exp.extra?.thirdPartyNotices++ expect(notice).toBe(readFileSync(resolve(projectRoot, 'THIRD_PARTY_NOTICES.md'), 'utf8'))+ expect(String(notice)).not.toBe('')+ expect(exp.name).toBe('DSH Mobile')+ expect(exp.slug).toBe('dsh-bridge')+ expect(exp.scheme).toBe('dshbridge')+ expect(exp.version).toBe(packageVersion)+ expect(exp.android?.package).toBe('com.dshtauri.dshbridge')+ expect(Number.isInteger(exp.android?.versionCode)).toBe(true)+ expect(exp.android?.versionCode ?? 0).toBeGreaterThan(0)+ })++ it('declares the iOS store identity and only the permissions used by the app', () => {+ const { exp } = getConfig(projectRoot, { isPublicConfig: true, skipSDKVersionRequirement: true })++ expect(exp.ios?.bundleIdentifier).toBe('com.dshtauri.dshbridge')+ expect(exp.ios?.supportsTablet).toBe(true)+ expect(exp.ios?.buildNumber).toBe('1')+ expect(exp.ios?.infoPlist?.['UISupportedInterfaceOrientations~ipad']).toEqual([+ 'UIInterfaceOrientationPortrait',+ 'UIInterfaceOrientationPortraitUpsideDown',+ 'UIInterfaceOrientationLandscapeLeft',+ 'UIInterfaceOrientationLandscapeRight',+ ])+ expect(getConfig(projectRoot, { skipSDKVersionRequirement: true }).exp.ios?.config?.usesNonExemptEncryption).toBe(false)+ expect(exp.ios?.infoPlist?.NSLocalNetworkUsageDescription).toBe('DSH Mobile 使用本地网络发现并连接您电脑上的 DSH 服务。')+ expect(exp.plugins).toContainEqual(['expo-camera', {+ cameraPermission: '允许 DSH Mobile 使用相机扫描连接二维码。',+ microphonePermission: false,+ recordAudioAndroid: false,+ }])+ expect(exp.plugins).toContainEqual(['expo-secure-store', { faceIDPermission: false }])+ expect(exp.plugins).toContainEqual(['expo-notifications', {+ icon: './assets/native/notification-icon.png',+ color: '#151517',+ mode: 'production',+ }])+ })++ it('shrinks release code and resources and compresses APK payloads', () => {+ const { exp } = getConfig(projectRoot, { skipSDKVersionRequirement: true })++ expect(exp.plugins).toContainEqual(['expo-build-properties', {+ android: {+ usesCleartextTraffic: true,+ buildArchs: ['arm64-v8a'],+ enableMinifyInReleaseBuilds: true,+ enableShrinkResourcesInReleaseBuilds: true,+ enableBundleCompression: true,+ useLegacyPackaging: true,+ },+ }])+ })++ it('keeps TestFlight build numbers on the EAS remote source', () => {+ const eas = JSON.parse(readFileSync(resolve(projectRoot, 'eas.json'), 'utf8')) as {+ cli?: { appVersionSource?: string }+ build?: { production?: { autoIncrement?: boolean } }+ }++ expect(eas.cli?.appVersionSource).toBe('remote')+ expect(eas.build?.production?.autoIncrement).toBe(true)+ })+})diff --git a/src-native/ui/_layout.test.tsx b/src-native/ui/_layout.test.tsxnew file mode 100644index 00000000..8d557b32--- /dev/null+++ b/src-native/ui/_layout.test.tsx@@ -0,0 +1,856 @@+import type { NotificationResponse } from 'expo-notifications'+import type { ComponentType, ReactNode } from 'react'+import type { ReactTestInstance, ReactTestRenderer } from 'react-test-renderer'+import { act, createElement } from 'react'+import { create } from 'react-test-renderer'+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'++// React Native 里 `window` 存在(就是全局对象),node 环境没有它会让 query-core 在模块加载时判定为 server 分支:+// `refetchInterval` 不再注册、`gcTime` 保持 Infinity。测试补一个最小客户端环境,让「前台轮询」按设备行为被验证。+vi.hoisted(() => {+ Object.assign(globalThis, {+ window: { addEventListener: () => undefined, removeEventListener: () => undefined },+ })+})++const native = vi.hoisted(() => ({+ path: '/',+ routes: {} as { home?: ComponentType, scan?: ComponentType },+ routeListeners: new Set<() => void>(),+ appState: { currentState: 'active' },+ appListeners: new Set<(state: string) => void>(),+ backListeners: new Set<() => boolean>(),+ responseListeners: new Set<(response: NotificationResponse) => void>(),+ navigation: { isFocused: vi.fn<() => boolean>() },+ push: vi.fn<(path: string) => void>(),+ back: vi.fn<() => void>(),+ dismissTo: vi.fn<(path: string) => void>(),+ read: vi.fn<(key: string) => Promise<string | null>>(),+ write: vi.fn<(key: string, value: string) => Promise<void>>(),+ readToken: vi.fn<(key: string) => Promise<string | null>>(),+ writeToken: vi.fn<(key: string, value: string) => Promise<void>>(),+ deleteToken: vi.fn<(key: string) => Promise<void>>(),+ fetch: vi.fn<typeof fetch>(),+ getIpAddressAsync: vi.fn<() => Promise<string>>(),+ setNotificationHandler: vi.fn(),+ getLastNotificationResponseAsync: vi.fn<() => Promise<NotificationResponse | null>>(),+ clearLastNotificationResponseAsync: vi.fn<() => Promise<void>>(),+ getPermissionsAsync: vi.fn<() => Promise<{ granted: boolean }>>(),+ requestPermissionsAsync: vi.fn<() => Promise<{ granted: boolean }>>(),+ setNotificationChannelAsync: vi.fn<(...args: unknown[]) => Promise<null>>(),+ scheduleNotificationAsync: vi.fn<(...args: unknown[]) => Promise<string>>(),+ cancelAnimation: vi.fn(),+}))++vi.mock('@react-native-async-storage/async-storage', () => ({ default: { getItem: native.read, setItem: native.write } }))+vi.mock('expo-secure-store', () => ({ getItemAsync: native.readToken, setItemAsync: native.writeToken, deleteItemAsync: native.deleteToken }))+vi.mock('expo-network', () => ({ getIpAddressAsync: native.getIpAddressAsync }))+vi.mock('expo-crypto', () => ({ randomUUID: () => 'root-test-nonce' }))+vi.mock('expo-notifications', () => ({+ AndroidImportance: { DEFAULT: 5, HIGH: 6 },+ DEFAULT_ACTION_IDENTIFIER: 'expo.modules.notifications.actions.DEFAULT',+ getPermissionsAsync: native.getPermissionsAsync,+ requestPermissionsAsync: native.requestPermissionsAsync,+ setNotificationChannelAsync: native.setNotificationChannelAsync,+ scheduleNotificationAsync: native.scheduleNotificationAsync,+ setNotificationHandler: native.setNotificationHandler,+ getLastNotificationResponseAsync: native.getLastNotificationResponseAsync,+ clearLastNotificationResponseAsync: native.clearLastNotificationResponseAsync,+ addNotificationResponseReceivedListener: (listener: (response: NotificationResponse) => void) => {+ native.responseListeners.add(listener)+ return { remove: () => {+ native.responseListeners.delete(listener)+ } }+ },+}))+vi.mock('expo-router', async () => {+ const { createElement, useSyncExternalStore } = await import('react')+ function subscribe(listener: () => void) {+ native.routeListeners.add(listener)+ return () => {+ native.routeListeners.delete(listener)+ }+ }+ function snapshot() {+ return native.path+ }+ function Stack(props: { children?: ReactNode }) {+ const path = useSyncExternalStore(subscribe, snapshot, snapshot)+ const { home: Home, scan: Scan } = native.routes+ if (!Home || !Scan)+ throw new Error('Production routes are not loaded')+ let modal: ReactNode = null+ if (path === '/scan')+ modal = createElement(Scan)+ return createElement('Stack', props, props.children, createElement(Home), modal)+ }+ return {+ router: { push: native.push, back: native.back, dismissTo: native.dismissTo },+ useNavigation: () => native.navigation,+ Stack: Object.assign(Stack, { Screen: 'Screen' }),+ }+})+vi.mock('uniwind', () => ({ Uniwind: { setTheme: vi.fn() } }))+// 文案与 store 现在都经过 i18n;node 环境无法真正加载 expo-localization(缺 __DEV__),设备区域固定为 zh-CN。+vi.mock('expo-localization', () => ({ getLocales: () => [{ languageTag: 'zh-CN' }] }))+vi.mock('expo-status-bar', () => ({ StatusBar: 'StatusBar' }))+vi.mock('expo-camera', () => ({+ CameraView: 'CameraView',+ useCameraPermissions: () => [{ granted: true, canAskAgain: true }, vi.fn(async () => ({})), refreshCameraPermission],+}))+vi.mock('heroui-native/provider', () => ({ HeroUINativeProvider: 'HeroUINativeProvider' }))+vi.mock('heroui-native/hooks', () => ({+ useThemeColor: (names: string | string[]) => {+ if (Array.isArray(names))+ return names.map(() => '#ffffff')+ return '#ffffff'+ },+}))+vi.mock('heroui-native/button', async () => {+ const { createElement } = await import('react')+ function Button({ children, ...props }: { children?: ReactNode }) {+ return createElement('Button', props, children)+ }+ return { Button: Object.assign(Button, { Label: 'Text' }) }+})+vi.mock('heroui-native/input', () => ({ Input: 'Input' }))+vi.mock('heroui-native/dialog', async () => {+ const { createElement } = await import('react')+ function Dialog({ children, isOpen, ...props }: { children?: ReactNode, isOpen: boolean }) {+ if (!isOpen)+ return null+ return createElement('Dialog', props, children)+ }+ return { Dialog: Object.assign(Dialog, { Portal: 'Portal', Overlay: 'Overlay', Content: 'Content', Title: 'Text' }) }+})+vi.mock('react-native-gesture-handler', () => ({ GestureHandlerRootView: 'GestureHandlerRootView' }))+vi.mock('react-native-safe-area-context', () => ({ SafeAreaProvider: 'SafeAreaProvider', SafeAreaView: 'SafeAreaView', useSafeAreaInsets: () => ({ top: 59, bottom: 34, left: 0, right: 0 }) }))+vi.mock('react-native-lucide', () => ({ History: 'Icon', Radar: 'Icon', ScanLine: 'Icon', RefreshCw: 'Icon', X: 'Icon', ArrowLeft: 'Icon', Hand: 'Icon' }))+vi.mock('react-native-svg', () => ({ default: 'Svg', Path: 'SvgPath', Rect: 'SvgRect', G: 'SvgGroup', Defs: 'SvgDefs', ClipPath: 'SvgClipPath' }))+vi.mock('react-native', () => ({+ View: 'View',+ Text: 'Text',+ Image: 'Image',+ Modal: 'Modal',+ ScrollView: 'ScrollView',+ Pressable: 'Pressable',+ Platform: { OS: 'android' },+ Linking: { openURL: vi.fn(async () => {}), openSettings: vi.fn(async () => {}) },+ useWindowDimensions: () => ({ width: 440, height: 900 }),+ AppState: {+ get currentState() { return native.appState.currentState },+ addEventListener: (_event: string, listener: (state: string) => void) => {+ native.appListeners.add(listener)+ return { remove: () => {+ native.appListeners.delete(listener)+ } }+ },+ },+ BackHandler: {+ addEventListener: (_event: string, listener: () => boolean) => {+ native.backListeners.add(listener)+ return { remove: () => {+ native.backListeners.delete(listener)+ } }+ },+ },+}))+vi.mock('react-native-reanimated', async () => {+ const { useRef } = await import('react')+ return {+ default: { View: 'AnimatedView' },+ useSharedValue: (value: number) => useRef({ value }).current,+ useAnimatedStyle: (style: () => unknown) => style(),+ withTiming: (value: number) => value,+ withDelay: (_delay: number, value: number) => value,+ withRepeat: (value: number) => value,+ withSequence: (...values: number[]) => values.at(-1),+ cancelAnimation: native.cancelAnimation,+ }+})+vi.mock('react-native-drawer-layout', async () => {+ const { createElement } = await import('react')+ function Drawer(props: { children?: ReactNode, open: boolean, renderDrawerContent: () => ReactNode }) {+ let content: ReactNode = null+ if (props.open)+ content = props.renderDrawerContent()+ return createElement('Drawer', props, props.children, content)+ }+ return { Drawer }+})+vi.mock('react-native-webview', async () => {+ const { Component, createElement } = await import('react')+ class WebView extends Component<Record<string, unknown>> {+ constructor(props: Record<string, unknown>) {+ super(props)+ Object.assign(this, {+ injectJavaScript: vi.fn<(script: string) => void>(),+ goBack: vi.fn<() => void>(),+ })+ }++ render() {+ return createElement('WebView', this.props)+ }+ }+ return { WebView }+})++const alpha = { id: 'http://bridge.local:3080', url: 'http://bridge.local:3080/tasks', host: 'bridge.local', port: 3080 }+const beta = { id: 'https://second.local', url: 'https://second.local/workspaces', host: 'second.local', port: 443 }+const snapshot = { version: 1 as const, history: [{ ...alpha, lastConnectedAt: 20 }, { ...beta, lastConnectedAt: 10 }], guidedHosts: ['http://bridge.local:3080', 'https://second.local'] }+let screen: ReactTestRenderer | undefined+let store: typeof import('@/store/modules/connection')+let connection: typeof import('@/store/modules/connection').connection+let runtime: typeof import('@/store/modules/connection/runtime')+let RootLayout: typeof import('@/app/_layout').default++/**+ * 统一复位契约:先清 persist 插件元数据(顺序反了 `$patch` 会触发一次写盘),再回到初始状态,+ * 最后清适配器的负载去重缓存,让「首次写入 / 重复写入」在每个用例里都可复现。+ */+function resetConnection() {+ connection.$persist.meta.hydrated = false+ connection.$persist.meta.mounted = false+ connection.$patch(store.createConnectionState())+ store.resetConnectionStorageCache()+ vi.clearAllMocks()+}++/**+ * 与 `restoreConnections()` 等价的水合:快照经 `parseConnectionSnapshot` 进 state,+ * 令牌单独给出,`hydrated` 由 `markHydrated` 置位(也是 persist 插件开始写盘的前提)。+ */+function hydrate(data: unknown = { version: 1, history: [], guidedHosts: [] }, tokens: Record<string, string> = {}) {+ connection.$patch(store.parseConnectionSnapshot(data))+ connection.markHydrated(tokens)+}++async function refreshCameraPermission() {+ return { granted: true, canAskAgain: true }+}++function response(origin: string, sessionId: string): NotificationResponse {+ return {+ actionIdentifier: 'expo.modules.notifications.actions.DEFAULT',+ notification: {+ date: 1000,+ request: {+ identifier: `native-${sessionId}`,+ trigger: { channelId: 'dsh-bridge' },+ content: {+ title: 'Answer complete',+ subtitle: null,+ body: 'Ready',+ categoryIdentifier: null,+ sound: 'default',+ data: { origin, sessionId, title: 'Answer complete', tag: `tag-${sessionId}` },+ },+ },+ },+ }+}++function text(node: ReactTestInstance | string): string {+ if (typeof node === 'string')+ return node+ return node.children.map(text).join('')+}++function root() {+ if (!screen)+ throw new Error('Root layout is not mounted')+ return screen.root+}++function texts() {+ return root().findAll(node => String(node.type) === 'Text').map(text)+}++function button(label: string) {+ const buttons = root().findAll(node => String(node.type) === 'Button')+ const accessible = buttons.filter(node => node.props.accessibilityLabel === label)+ const matches = accessible.length ? accessible : buttons.filter(node => text(node) === label)+ expect(matches, `Button ${label}`).toHaveLength(1)+ return matches[0]!+}++function drawer() {+ return root().find(node => String(node.type) === 'Drawer')+}++function webView() {+ const views = root().findAll(node => String(node.type) === 'WebView')+ expect(views).toHaveLength(1)+ return views[0]!+}++async function webViewInstance() {+ const { WebView } = await import('react-native-webview')+ return root().findByType(WebView).instance as { injectJavaScript: ReturnType<typeof vi.fn<(script: string) => void>> }+}++function navigate(path: string) {+ native.path = path+ for (const listener of native.routeListeners)+ listener()+}++async function press(label: string) {+ await act(async () => {+ await button(label).props.onPress()+ })+}++async function mount() {+ await act(async () => {+ screen = create(createElement(RootLayout))+ await vi.advanceTimersByTimeAsync(0)+ })+}++async function unmount() {+ await act(async () => {+ screen?.unmount()+ await vi.advanceTimersByTimeAsync(0)+ })+ screen = undefined+}++/** 卸载后残留的定时器只可能属于 React Query 的查询缓存回收,清掉查询缓存后再断言没有遗留定时器。 */+async function dropQueries() {+ const { queryClient } = await import('@/config/client')+ queryClient.clear()+}++async function emitResponse(click: NotificationResponse) {+ await act(async () => {+ for (const listener of native.responseListeners)+ listener(click)+ await vi.advanceTimersByTimeAsync(0)+ })+}++async function changeAppState(state: string) {+ await act(async () => {+ native.appState.currentState = state+ for (const listener of native.appListeners)+ listener(state)+ await vi.advanceTimersByTimeAsync(0)+ })+}++async function ready(origin: string) {+ await act(async () => {+ webView().props.onMessage({+ nativeEvent: {+ url: webView().props.source.uri,+ data: JSON.stringify({ channel: 'dsh-bridge', origin, nonce: 'root-test-nonce', payload: { type: 'dsh://bridge-ready' } }),+ },+ })+ await vi.advanceTimersByTimeAsync(0)+ })+}++async function focusResult(origin: string) {+ await act(async () => {+ webView().props.onMessage({+ nativeEvent: {+ url: webView().props.source.uri,+ data: JSON.stringify({ channel: 'dsh-bridge', origin, nonce: 'root-test-nonce', payload: { type: 'dsh://focus-result', requestId: 'root-test-nonce', handled: true } }),+ },+ })+ await vi.advanceTimersByTimeAsync(0)+ })+}++function holdNetwork() {+ native.fetch.mockImplementation((_input, options) => new Promise<Response>((resolve) => {+ const signal = options?.signal+ if (!signal)+ throw new Error('Expected an abortable network request')+ signal.addEventListener('abort', () => resolve(new Response(null, { status: 503 })), { once: true })+ }))+}++beforeEach(async () => {+ vi.resetModules()+ vi.resetAllMocks()+ vi.useFakeTimers()+ vi.setSystemTime(new Date('2026-01-01T00:00:00.000Z'))+ vi.stubGlobal('IS_REACT_ACT_ENVIRONMENT', true)+ const originalError = console.error.bind(console)+ vi.spyOn(console, 'error').mockImplementation((...args: unknown[]) => {+ if (args[0] === 'react-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer')+ return+ originalError(...args)+ })+ native.path = '/'+ native.routes = {}+ native.routeListeners.clear()+ native.appState.currentState = 'active'+ native.appListeners.clear()+ native.backListeners.clear()+ native.responseListeners.clear()+ native.navigation.isFocused.mockImplementation(() => native.path === '/')+ native.push.mockImplementation(navigate)+ native.back.mockImplementation(() => navigate('/'))+ native.dismissTo.mockImplementation(navigate)+ native.read.mockResolvedValue(null)+ native.write.mockResolvedValue(undefined)+ native.readToken.mockResolvedValue(null)+ native.writeToken.mockResolvedValue(undefined)+ native.deleteToken.mockResolvedValue(undefined)+ native.fetch.mockImplementation(async () => Response.json({ enabled: false, allowLoopback: true }))+ native.getIpAddressAsync.mockResolvedValue('0.0.0.0')+ native.getLastNotificationResponseAsync.mockResolvedValue(null)+ native.clearLastNotificationResponseAsync.mockResolvedValue(undefined)+ native.getPermissionsAsync.mockResolvedValue({ granted: true })+ native.requestPermissionsAsync.mockResolvedValue({ granted: true })+ native.setNotificationChannelAsync.mockResolvedValue(null)+ native.scheduleNotificationAsync.mockResolvedValue('notification-id')+ vi.stubGlobal('fetch', native.fetch)+ screen = undefined+ store = await import('@/store/modules/connection')+ connection = store.connection+ runtime = await import('@/store/modules/connection/runtime')+ resetConnection()+ native.routes.home = (await import('@/app/index')).default+ native.routes.scan = (await import('@/app/scan')).default+ ;({ default: RootLayout } = await import('@/app/_layout'))+})++afterEach(async () => {+ await unmount()+ runtime.stopConnectionRuntime()+ await vi.advanceTimersByTimeAsync(0)+ vi.restoreAllMocks()+ vi.resetAllMocks()+ vi.unstubAllGlobals()+ vi.clearAllTimers()+ vi.useRealTimers()+ expect(native.appListeners.size).toBe(0)+ expect(native.backListeners.size).toBe(0)+ expect(native.responseListeners.size).toBe(0)+ expect(native.routeListeners.size).toBe(0)+})++describe('rendered root hydration', () => {+ it('waits for history and secure tokens before discovery or persistence and declares the QR modal route', async () => {+ const historyRead = Promise.withResolvers<string | null>()+ const tokenRead = Promise.withResolvers<string | null>()+ native.read.mockReturnValue(historyRead.promise)+ native.readToken.mockReturnValue(tokenRead.promise)+ await mount()+ expect(root().findAll(node => String(node.type) === 'Screen').map(node => node.props)).toEqual([+ { name: 'index' },+ { name: 'scan', options: { presentation: 'fullScreenModal' } },+ ])+ expect(drawer().props.swipeEnabled).toBe(false)+ for (const label of ['自动扫描局域网', '扫码连接', '最近连接'])+ expect(button(label).props.isDisabled).toBe(true)+ expect(root().findAll(node => node.props.accessibilityRole === 'progressbar')).toHaveLength(0)+ await act(async () => {+ await vi.advanceTimersByTimeAsync(15000)+ })+ expect(native.fetch).not.toHaveBeenCalled()+ expect(native.getIpAddressAsync).not.toHaveBeenCalled()+ expect(native.write).not.toHaveBeenCalled()+ expect(native.writeToken).not.toHaveBeenCalled()++ await act(async () => {+ historyRead.resolve(JSON.stringify({ version: 1, history: [{ ...alpha, lastConnectedAt: 20 }], guidedHosts: [] }))+ await vi.advanceTimersByTimeAsync(0)+ })+ expect(native.readToken).toHaveBeenCalledTimes(1)+ expect(connection.hydrated).toBe(false)+ expect(native.fetch).not.toHaveBeenCalled()+ expect(native.write).not.toHaveBeenCalled()+ await act(async () => {+ tokenRead.resolve('secure-token')+ await vi.advanceTimersByTimeAsync(0)+ })++ expect(drawer().props.swipeEnabled).toBe(true)+ expect(webView().props.source).toEqual({ uri: 'http://bridge.local:3080/tasks?auth=secure-token' })+ expect(texts()).toContain('连接中…')+ expect(native.read).toHaveBeenCalledExactlyOnceWith('dsh-bridge/connections')+ expect(native.getIpAddressAsync).not.toHaveBeenCalled()+ // 磁盘上已是与快照等价的负载,适配器去重后水合本身不写盘(旧实现「持久化字段未变不写盘」的等价断言)。+ expect(native.write).not.toHaveBeenCalled()+ // 只有持久化字段真的变化(会话落库)才写盘,且负载永远不含令牌。+ await act(async () => {+ runtime.connectAddress(alpha)+ connection.markLoaded(connection.viewGeneration, 30)+ await vi.advanceTimersByTimeAsync(0)+ })+ expect(native.write.mock.calls.length).toBeGreaterThan(0)+ for (const [key, payload] of native.write.mock.calls) {+ expect(key).toBe('dsh-bridge/connections')+ expect(JSON.parse(payload)).toEqual({ version: 1, history: [{ ...alpha, lastConnectedAt: 30 }], guidedHosts: [] })+ expect(payload).not.toContain('secure-token')+ }+ })+})++describe('rendered root entry selection', () => {+ it('offers connection methods on a first launch without probing or automatically scanning the LAN', async () => {+ native.getIpAddressAsync.mockResolvedValue('192.168.1.50')+ await mount()++ expect(connection.hydrated).toBe(true)+ expect(connection.stage).toBe('idle')+ expect(connection.current).toBeNull()+ expect(connection.history).toEqual([])+ expect(connection.notice).toBeNull()+ expect(root().findAll(node => String(node.type) === 'WebView')).toHaveLength(0)+ expect(root().findAll(node => node.props.accessibilityRole === 'progressbar')).toHaveLength(0)+ for (const label of ['自动扫描局域网', '扫码连接', '最近连接'])+ expect(button(label).props.isDisabled).toBe(false)+ await act(async () => {+ await vi.advanceTimersByTimeAsync(30000)+ })+ await changeAppState('background')+ await changeAppState('active')+ expect(native.getIpAddressAsync).not.toHaveBeenCalled()+ expect(native.fetch).not.toHaveBeenCalled()+ expect(native.getPermissionsAsync).not.toHaveBeenCalled()+ expect(native.requestPermissionsAsync).not.toHaveBeenCalled()+ })++ it('does not treat an unsupported or invalid stored history as permission to scan automatically', async () => {+ native.read.mockResolvedValue(JSON.stringify({ version: 2, history: [{ ...alpha, lastConnectedAt: 20 }], guidedHosts: [] }))+ await mount()++ expect(connection.history).toEqual([])+ expect(connection.stage).toBe('idle')+ expect(button('自动扫描局域网').props.isDisabled).toBe(false)+ expect(native.readToken).not.toHaveBeenCalled()+ expect(native.getIpAddressAsync).not.toHaveBeenCalled()+ expect(native.fetch).not.toHaveBeenCalled()+ })++ it('automatically searches saved history on re-entry and connects the available older entry without a LAN scan', async () => {+ native.read.mockResolvedValue(JSON.stringify(snapshot))+ const newest = Promise.withResolvers<Response>()+ const older = Promise.withResolvers<Response>()+ native.fetch.mockImplementation((input) => {+ if (String(input).startsWith('http://bridge.local:3080/'))+ return newest.promise+ return older.promise+ })+ await mount()++ expect(connection.stage).toBe('scanning')+ expect(texts()).toContain('寻找可用连接')+ // 只锁定探测到的主机集合与顺序:水合后的健康查询与历史自动接入各探一轮,重复轮次不是本用例的契约。+ expect([...new Set(native.fetch.mock.calls.map(([url]) => url))]).toEqual([+ 'http://bridge.local:3080/__dsh_bridge__/auth-status',+ 'https://second.local/__dsh_bridge__/auth-status',+ ])+ expect(native.getIpAddressAsync).not.toHaveBeenCalled()+ await act(async () => {+ older.resolve(Response.json({ enabled: false, allowLoopback: true }))+ await vi.advanceTimersByTimeAsync(0)+ })+ expect(connection.current).toBeNull()+ await act(async () => {+ newest.resolve(new Response(null, { status: 503 }))+ await vi.advanceTimersByTimeAsync(0)+ })++ expect(connection.current).toEqual(beta)+ expect(webView().props.source).toEqual({ uri: 'https://second.local/workspaces' })+ expect(texts()).toContain('连接中…')+ expect(connection.history).toEqual(snapshot.history)+ expect(native.getIpAddressAsync).not.toHaveBeenCalled()+ await ready('https://second.local')+ expect(texts()).not.toContain('连接中…')+ })++ it('returns to method selection when all saved connections are unavailable instead of scanning the LAN', async () => {+ native.read.mockResolvedValue(JSON.stringify(snapshot))+ native.fetch.mockResolvedValue(new Response(null, { status: 503 }))+ await mount()++ expect(connection.stage).toBe('idle')+ expect(connection.current).toBeNull()+ expect(connection.history).toEqual(snapshot.history)+ expect(connection.health).toEqual({ 'http://bridge.local:3080': 'unavailable', 'https://second.local': 'unavailable' })+ expect(texts()).toContain('未找到可用的历史连接,请选择连接方式。')+ expect(root().findAll(node => String(node.type) === 'WebView')).toHaveLength(0)+ for (const label of ['自动扫描局域网', '扫码连接', '最近连接'])+ expect(button(label).props.isDisabled).toBe(false)+ // 每个已保存主机都被探测过(健康查询与历史自动接入各一轮,故这里只锁定去重后的主机数)。+ expect(new Set(native.fetch.mock.calls.map(([url]) => url)).size).toBe(2)+ expect(native.getIpAddressAsync).not.toHaveBeenCalled()+ expect(native.requestPermissionsAsync).not.toHaveBeenCalled()+ })++ it('lets the user cancel history reconnection and open QR without a late result replacing the selection', async () => {+ native.read.mockResolvedValue(JSON.stringify(snapshot))+ holdNetwork()+ await mount()+ expect(texts()).toContain('寻找可用连接')+ const signals = native.fetch.mock.calls.map(([, options]) => options!.signal!)++ await press('取消')+ // 取消中止的是历史自动接入那一轮探测(每个已保存主机一个);健康查询的探测由 React Query 自己管理。+ expect(signals.filter(signal => signal.aborted)).toHaveLength(2)+ expect(connection.stage).toBe('idle')+ expect(connection.notice).toBeNull()+ await press('扫码连接')+ expect(texts()).toContain('扫码连接 DSH Mobile')+ expect(connection.current).toBeNull()+ expect(connection.history).toEqual(snapshot.history)+ expect(native.getIpAddressAsync).not.toHaveBeenCalled()+ })+})++describe('rendered root notification focus', () => {+ it('holds a cold notification until hydration completes, then returns from QR to the saved host and delivers focus after readiness', async () => {+ const historyRead = Promise.withResolvers<string | null>()+ const tokenRead = Promise.withResolvers<string | null>()+ native.read.mockReturnValue(historyRead.promise)+ native.readToken.mockReturnValue(tokenRead.promise)+ native.getLastNotificationResponseAsync.mockResolvedValue(response('http://bridge.local:3080', 'cold-session'))+ native.path = '/scan'+ await mount()+ expect(texts()).toContain('扫码连接 DSH Mobile')+ expect(connection.pendingFocus).toEqual({ origin: 'http://bridge.local:3080', sessionId: 'cold-session', title: 'Answer complete', tag: 'tag-cold-session' })+ expect(native.dismissTo).not.toHaveBeenCalled()+ expect(native.fetch).not.toHaveBeenCalled()+ expect(native.write).not.toHaveBeenCalled()++ await act(async () => {+ historyRead.resolve(JSON.stringify({ version: 1, history: [{ ...alpha, lastConnectedAt: 20 }], guidedHosts: [] }))+ await vi.advanceTimersByTimeAsync(0)+ })+ expect(native.dismissTo).not.toHaveBeenCalled()+ expect(native.fetch).not.toHaveBeenCalled()+ await act(async () => {+ tokenRead.resolve('cold-secret')+ await vi.advanceTimersByTimeAsync(0)+ })++ expect(native.dismissTo).toHaveBeenCalledWith('/')+ expect(texts()).not.toContain('扫码连接 DSH Mobile')+ expect(root().findAll(node => String(node.type) === 'CameraView')).toHaveLength(0)+ expect(drawer().props.open).toBe(false)+ expect(webView().props.source).toEqual({ uri: 'http://bridge.local:3080/tasks?auth=cold-secret' })+ expect(native.getIpAddressAsync).not.toHaveBeenCalled()+ expect(connection.pendingFocus?.sessionId).toBe('cold-session')+ const instance = await webViewInstance()+ await ready('http://bridge.local:3080')+ expect(connection.pendingFocus?.sessionId).toBe('cold-session')+ expect(texts()).not.toContain('连接中…')+ expect(instance.injectJavaScript.mock.calls.map(([script]) => script).join('\n')).toContain('"type":"dsh://focus-session","requestId":"root-test-nonce","sessionId":"cold-session","title":"Answer complete","tag":"tag-cold-session"')+ await focusResult('http://bridge.local:3080')+ expect(connection.pendingFocus).toBeNull()+ expect(texts()).not.toContain('已恢复连接,但未能定位通知对应会话,请在网页中手动选择。')+ })++ it('routes a warm notification for another saved host out of the scanner and waits for that host to become ready', async () => {+ hydrate(snapshot, { 'http://bridge.local:3080': 'saved-secret' })+ runtime.connectAddress(beta)+ await mount()+ await ready('https://second.local')+ await act(async () => {+ drawer().props.onOpen()+ })+ await press('扫码连接')+ expect(texts()).toContain('扫码连接 DSH Mobile')+ const oldInstance = await webViewInstance()++ await emitResponse(response('http://bridge.local:3080', 'warm-session'))++ expect(native.dismissTo).toHaveBeenCalledExactlyOnceWith('/')+ expect(root().findAll(node => String(node.type) === 'CameraView')).toHaveLength(0)+ expect(texts()).not.toContain('扫码连接 DSH Mobile')+ expect(webView().props.source).toEqual({ uri: 'http://bridge.local:3080/tasks?auth=saved-secret' })+ expect(await webViewInstance()).not.toBe(oldInstance)+ expect(texts()).toContain('连接中…')+ expect(connection.pendingFocus?.sessionId).toBe('warm-session')+ const newInstance = await webViewInstance()+ await ready('http://bridge.local:3080')+ expect(connection.pendingFocus?.sessionId).toBe('warm-session')+ expect(texts()).not.toContain('连接中…')+ expect(newInstance.injectJavaScript.mock.calls.map(([script]) => script).join('\n')).toContain('"type":"dsh://focus-session","requestId":"root-test-nonce","sessionId":"warm-session","title":"Answer complete","tag":"tag-warm-session"')+ await focusResult('http://bridge.local:3080')+ expect(connection.pendingFocus).toBeNull()+ expect(native.read).not.toHaveBeenCalled()+ })++ it('dismisses a hydrated same-origin QR modal without reconnecting the already loaded WebView', async () => {+ hydrate(snapshot, { 'http://bridge.local:3080': 'saved-secret' })+ runtime.connectAddress(alpha)+ await mount()+ await ready('http://bridge.local:3080')+ const instance = await webViewInstance()+ const generation = connection.viewGeneration+ await act(async () => {+ drawer().props.onOpen()+ })+ await press('扫码连接')+ expect(root().findAll(node => String(node.type) === 'CameraView')).toHaveLength(1)++ await emitResponse(response('http://bridge.local:3080', 'same-session'))++ expect(native.dismissTo).toHaveBeenCalledExactlyOnceWith('/')+ expect(root().findAll(node => String(node.type) === 'CameraView')).toHaveLength(0)+ expect(texts()).not.toContain('扫码连接 DSH Mobile')+ expect(texts()).not.toContain('连接中…')+ expect(drawer().props.open).toBe(false)+ expect(await webViewInstance()).toBe(instance)+ expect(connection.viewGeneration).toBe(generation)+ expect(connection.pendingFocus?.sessionId).toBe('same-session')+ expect(instance.injectJavaScript.mock.calls.map(([script]) => script).join('\n')).toContain('"type":"dsh://focus-session","requestId":"root-test-nonce","sessionId":"same-session","title":"Answer complete","tag":"tag-same-session"')+ await focusResult('http://bridge.local:3080')+ expect(connection.pendingFocus).toBeNull()+ expect(await webViewInstance()).toBe(instance)+ })++ it('uses a same-origin current connection not yet in history to restore a pending focus at root mount', async () => {+ hydrate()+ runtime.connectAddress(alpha)+ connection.queueFocus({ origin: 'http://bridge.local:3080', sessionId: 'pending-session', title: 'Answer complete', tag: 'tag-pending-session' })+ connection.setDrawerOpen(true)+ native.path = '/scan'++ await mount()++ expect(native.dismissTo).toHaveBeenCalledWith('/')+ expect(drawer().props.open).toBe(false)+ expect(root().findAll(node => String(node.type) === 'CameraView')).toHaveLength(0)+ expect(connection.viewGeneration).toBe(1)+ expect(connection.history).toEqual([])+ expect(webView().props.source).toEqual({ uri: 'http://bridge.local:3080/tasks' })+ expect(connection.pendingFocus?.sessionId).toBe('pending-session')+ const instance = await webViewInstance()+ await ready('http://bridge.local:3080')+ expect(connection.pendingFocus?.sessionId).toBe('pending-session')+ expect(instance.injectJavaScript.mock.calls.map(([script]) => script).join('\n')).toContain('"type":"dsh://focus-session","requestId":"root-test-nonce","sessionId":"pending-session","title":"Answer complete","tag":"tag-pending-session"')+ await focusResult('http://bridge.local:3080')+ expect(connection.pendingFocus).toBeNull()+ })++ it('clears an unknown-origin notification without dismissing QR or replacing the visible connection', async () => {+ hydrate(snapshot)+ runtime.connectAddress(beta)+ native.path = '/scan'+ await mount()+ const instance = await webViewInstance()++ await emitResponse(response('https://unknown.local', 'unknown-session'))++ expect(connection.pendingFocus).toBeNull()+ expect(native.dismissTo).not.toHaveBeenCalled()+ expect(texts()).toContain('扫码连接 DSH Mobile')+ expect(root().findAll(node => String(node.type) === 'CameraView')).toHaveLength(1)+ expect(webView().props.source).toEqual({ uri: 'https://second.local/workspaces' })+ expect(await webViewInstance()).toBe(instance)+ expect(connection.history.map(entry => entry.id)).toEqual(['http://bridge.local:3080', 'https://second.local'])+ })+})++describe('rendered root lifecycle resources', () => {+ it('refreshes health on foreground return and active intervals, but not while backgrounded', async () => {+ // 客户端环境由文件顶部的 `vi.hoisted` 提供:`isServer` 在 query-core 模块加载时就已确定,+ // 测试内再补 `window` 不会生效,只会掩盖「前台按间隔轮询」这条设备行为。+ hydrate({ version: 1, history: [{ ...alpha, lastConnectedAt: 20 }], guidedHosts: ['http://bridge.local:3080'] })+ runtime.connectAddress(alpha)+ await mount()+ await ready('http://bridge.local:3080')+ await act(async () => {+ drawer().props.onOpen()+ })+ native.fetch.mockClear()++ await changeAppState('background')+ await act(async () => {+ await vi.advanceTimersByTimeAsync(15000)+ })+ expect(native.fetch).not.toHaveBeenCalled()+ native.fetch.mockResolvedValue(new Response(null, { status: 503 }))+ await changeAppState('active')+ expect(native.fetch).toHaveBeenCalledTimes(1)+ expect(texts()).toContain('主机暂时不可用')+ expect(button('bridge.local:3080,不可用').props.accessibilityLabel).toBe('bridge.local:3080,不可用')+ native.fetch.mockClear()+ native.fetch.mockImplementation(async () => Response.json({ enabled: false, allowLoopback: true }))+ await act(async () => {+ await vi.advanceTimersByTimeAsync(15000)+ })+ expect(native.fetch).toHaveBeenCalledTimes(1)+ expect(texts()).not.toContain('主机暂时不可用')+ expect(button('bridge.local:3080,可用').props.accessibilityLabel).toBe('bridge.local:3080,可用')+ expect(native.getIpAddressAsync).not.toHaveBeenCalled()+ })++ it('does not acquire persistence, discovery or focus work when unmounted before hydration resolves', async () => {+ const historyRead = Promise.withResolvers<string | null>()+ const coldResponse = Promise.withResolvers<NotificationResponse | null>()+ native.read.mockReturnValue(historyRead.promise)+ native.getLastNotificationResponseAsync.mockReturnValue(coldResponse.promise)+ native.readToken.mockResolvedValue('late-token')+ await mount()+ expect(connection.hydrated).toBe(false)++ await unmount()+ historyRead.resolve(JSON.stringify({ version: 1, history: [{ ...alpha, lastConnectedAt: 20 }], guidedHosts: [] }))+ coldResponse.resolve(response('http://bridge.local:3080', 'late-session'))+ await vi.advanceTimersByTimeAsync(0)++ expect(connection.hydrated).toBe(true)+ expect(connection.pendingFocus).toBeNull()+ expect(native.getIpAddressAsync).not.toHaveBeenCalled()+ expect(native.fetch).not.toHaveBeenCalled()+ expect(native.write).not.toHaveBeenCalled()+ expect(native.writeToken).not.toHaveBeenCalled()+ expect(native.dismissTo).not.toHaveBeenCalled()+ expect(native.setNotificationHandler).toHaveBeenLastCalledWith(null)+ // 卸载后残留的定时器只可能属于 React Query 的查询缓存回收,清掉查询缓存后再断言没有遗留定时器。+ await dropQueries()+ expect(vi.getTimerCount()).toBe(0)+ })++ it('aborts active discovery and disposes native subscriptions, persistence, focus and health timers on unmount', async () => {+ native.getIpAddressAsync.mockResolvedValue('192.168.1.50')+ holdNetwork()+ await mount()+ expect(native.fetch).not.toHaveBeenCalled()+ await press('自动扫描局域网')+ expect(texts()).toContain('扫描局域网端口中...')+ expect(native.fetch.mock.calls.length).toBeGreaterThan(0)+ const signals = native.fetch.mock.calls.map(([, options]) => options!.signal!)+ const listener = [...native.responseListeners][0]!++ await unmount()++ expect(signals.every(signal => signal.aborted)).toBe(true)+ expect(native.setNotificationHandler).toHaveBeenLastCalledWith(null)+ // 卸载后残留的定时器只可能属于 React Query 的查询缓存回收,清掉查询缓存后再断言没有遗留定时器。+ await dropQueries()+ expect(vi.getTimerCount()).toBe(0)+ expect(native.appListeners.size).toBe(0)+ expect(native.backListeners.size).toBe(0)+ expect(native.responseListeners.size).toBe(0)+ expect(native.routeListeners.size).toBe(0)+ native.write.mockClear()+ native.writeToken.mockClear()+ native.fetch.mockClear()+ listener(response('http://bridge.local:3080', 'disposed-session'))+ expect(connection.pendingFocus).toBeNull()+ runtime.connectAddress({ ...alpha, token: 'after-unmount' })+ connection.markLoaded(connection.viewGeneration, 40)+ connection.queueFocus({ origin: 'http://bridge.local:3080', sessionId: 'unobserved', title: '', tag: '' })+ await vi.advanceTimersByTimeAsync(15000)+ // 快照落盘归 persist 插件所有(进程级订阅,不随布局卸载释放),布局自己持有的只有 SecureStore 令牌订阅。+ expect(native.write.mock.calls.map(([, payload]) => JSON.parse(payload))).toEqual([+ { version: 1, history: [{ ...alpha, lastConnectedAt: 40 }], guidedHosts: [] },+ ])+ expect(native.writeToken).not.toHaveBeenCalled()+ expect(native.fetch).not.toHaveBeenCalled()+ expect(native.dismissTo).not.toHaveBeenCalled()+ })+})diff --git a/src-native/ui/index.test.tsx b/src-native/ui/index.test.tsxnew file mode 100644index 00000000..b1ddd76b--- /dev/null+++ b/src-native/ui/index.test.tsx@@ -0,0 +1,796 @@+import type { ReactNode } from 'react'+import type { ReactTestInstance, ReactTestRenderer } from 'react-test-renderer'+import type { HistoryEntry } from '@/store/modules/connection'+import { act, createElement } from 'react'+import { create } from 'react-test-renderer'+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'++const native = vi.hoisted(() => ({+ appState: { currentState: 'active' },+ appListeners: new Set<() => void>(),+ backListeners: new Set<() => boolean>(),+ navigation: { isFocused: vi.fn<() => boolean>() },+ push: vi.fn<(path: string) => void>(),+ fetch: vi.fn<typeof fetch>(),+ getIpAddressAsync: vi.fn<() => Promise<string>>(),+ getPermissionsAsync: vi.fn<() => Promise<{ granted: boolean }>>(),+ requestPermissionsAsync: vi.fn<() => Promise<{ granted: boolean }>>(),+ setNotificationChannelAsync: vi.fn<(...args: unknown[]) => Promise<null>>(),+ scheduleNotificationAsync: vi.fn<(...args: unknown[]) => Promise<string>>(),+ cancelAnimation: vi.fn(),+ alert: vi.fn<typeof import('react-native').Alert.alert>(),+ dimensions: { width: 440, height: 900 },+ theme: { 'background': '#ffffff', 'foreground': '#0f1115', 'accent-foreground': '#ffffff' } as Record<string, string>,+}))++vi.mock('react-native', () => ({+ Alert: { alert: native.alert },+ View: 'View',+ Text: 'Text',+ Image: 'Image',+ Modal: 'Modal',+ ScrollView: 'ScrollView',+ Pressable: 'Pressable',+ Platform: { OS: 'android' },+ Linking: { openURL: vi.fn(async () => {}) },+ useWindowDimensions: () => native.dimensions,+ AppState: {+ get currentState() { return native.appState.currentState },+ addEventListener: (_event: string, listener: () => void) => {+ native.appListeners.add(listener)+ return { remove: () => {+ native.appListeners.delete(listener)+ } }+ },+ },+ BackHandler: {+ addEventListener: (_event: string, listener: () => boolean) => {+ native.backListeners.add(listener)+ return { remove: () => {+ native.backListeners.delete(listener)+ } }+ },+ },+}))+vi.mock('uniwind', () => ({ Uniwind: { setTheme: vi.fn() } }))+// 文案与 store 现在都经过 i18n;node 环境无法真正加载 expo-localization(缺 __DEV__),设备区域固定为 zh-CN。+vi.mock('expo-localization', () => ({ getLocales: () => [{ languageTag: 'zh-CN' }] }))+// store 模块经 valtio-define persist 插件依赖 AsyncStorage,node 环境用最小实现顶替。+vi.mock('@react-native-async-storage/async-storage', () => ({ default: { getItem: vi.fn(async () => null), setItem: vi.fn(async () => {}) } }))+vi.mock('expo-router', () => ({ router: { push: native.push }, useNavigation: () => native.navigation }))+vi.mock('expo-network', () => ({ getIpAddressAsync: native.getIpAddressAsync }))+vi.mock('expo-crypto', () => ({ randomUUID: () => 'home-test-nonce' }))+vi.mock('expo-notifications', () => ({+ AndroidImportance: { DEFAULT: 5, HIGH: 6 },+ getPermissionsAsync: native.getPermissionsAsync,+ requestPermissionsAsync: native.requestPermissionsAsync,+ setNotificationChannelAsync: native.setNotificationChannelAsync,+ scheduleNotificationAsync: native.scheduleNotificationAsync,+}))+vi.mock('heroui-native/hooks', () => ({+ useThemeColor: (names: string | string[]) => {+ if (Array.isArray(names))+ return names.map(name => native.theme[name] ?? '#ffffff')+ return native.theme[names] ?? '#ffffff'+ },+}))+vi.mock('react-native-svg', () => ({ default: 'Svg', Path: 'SvgPath', Rect: 'SvgRect', G: 'SvgGroup', Defs: 'SvgDefs', ClipPath: 'SvgClipPath' }))+vi.mock('heroui-native/button', async () => {+ const { createElement } = await import('react')+ function Button({ children, ...props }: { children?: ReactNode }) {+ return createElement('Button', props, children)+ }+ return { Button: Object.assign(Button, { Label: 'Text' }) }+})+vi.mock('heroui-native/input', () => ({ Input: 'Input' }))+vi.mock('heroui-native/dialog', async () => {+ const { createElement } = await import('react')+ function Dialog({ children, isOpen, ...props }: { children?: ReactNode, isOpen: boolean }) {+ if (!isOpen)+ return null+ return createElement('Dialog', props, children)+ }+ return { Dialog: Object.assign(Dialog, { Portal: 'Portal', Overlay: 'Overlay', Content: 'Content', Title: 'Text' }) }+})+vi.mock('react-native-safe-area-context', () => ({ SafeAreaView: 'SafeAreaView' }))+vi.mock('react-native-lucide', () => ({ History: 'HistoryIcon', Radar: 'RadarIcon', QrCode: 'QrCodeIcon', ScanLine: 'ScanLineIcon', RefreshCw: 'RefreshIcon', X: 'Icon', ArrowLeft: 'Icon', Hand: 'Icon' }))+vi.mock('react-native-reanimated', async () => {+ const { useRef } = await import('react')+ return {+ default: { View: 'AnimatedView' },+ useSharedValue: (value: number) => useRef({ value }).current,+ useAnimatedStyle: (style: () => unknown) => style(),+ withTiming: (value: number) => value,+ withDelay: (_delay: number, value: number) => value,+ withRepeat: (value: number) => value,+ withSequence: (...values: number[]) => values.at(-1),+ cancelAnimation: native.cancelAnimation,+ }+})+vi.mock('react-native-drawer-layout', async () => {+ const { createElement } = await import('react')+ function Drawer(props: { children?: ReactNode, open: boolean, renderDrawerContent: () => ReactNode }) {+ let content: ReactNode = null+ if (props.open)+ content = props.renderDrawerContent()+ return createElement('Drawer', props, props.children, content)+ }+ return { Drawer }+})+vi.mock('react-native-webview', async () => {+ const { Component, createElement } = await import('react')+ class WebView extends Component<Record<string, unknown>> {+ constructor(props: Record<string, unknown>) {+ super(props)+ Object.assign(this, {+ injectJavaScript: vi.fn<(script: string) => void>(),+ goBack: vi.fn<() => void>(),+ })+ }++ render() {+ return createElement('WebView', this.props)+ }+ }+ return { WebView }+})++const alpha = { id: 'http://one.local:3080', url: 'http://one.local:3080/tasks', host: 'one.local', port: 3080 }+const history: HistoryEntry[] = ['one', 'two', 'three', 'four', 'five', 'six', 'seven'].map((name, index) => ({+ id: `http://${name}.local:3080`,+ url: `http://${name}.local:3080/tasks`,+ host: `${name}.local`,+ port: 3080,+ lastConnectedAt: 70 - index * 10,+}))+let screen: ReactTestRenderer | undefined+let store: typeof import('@/store/modules/connection')+let connection: typeof import('@/store/modules/connection').connection+let runtime: typeof import('@/store/modules/connection/runtime')+let HomeScreen: typeof import('@/app/index').default++function text(node: ReactTestInstance | string): string {+ if (typeof node === 'string')+ return node+ return node.children.map(text).join('')+}++function root() {+ if (!screen)+ throw new Error('Home screen is not mounted')+ return screen.root+}++function button(label: string) {+ const buttons = root().findAll(node => String(node.type) === 'Button')+ const accessible = buttons.filter(node => node.props.accessibilityLabel === label)+ const matches = accessible.length ? accessible : buttons.filter(node => text(node) === label)+ expect(matches, `Button ${label}`).toHaveLength(1)+ return matches[0]!+}++function texts() {+ return root().findAll(node => String(node.type) === 'Text').map(text)+}++function drawer() {+ return root().find(node => String(node.type) === 'Drawer')+}++function webView() {+ return root().find(node => String(node.type) === 'WebView')+}++async function press(label: string) {+ const target = button(label)+ expect(target.props.isDisabled).not.toBe(true)+ await act(async () => {+ await target.props.onPress()+ })+}++async function mount() {+ await act(async () => {+ screen = create(createElement(HomeScreen))+ })+}++/** persist 插件在模块加载时就已经订阅 state,必须先复位插件元数据,否则下面的 `$patch` 会立刻写一次盘。 */+function resetConnection() {+ connection.$persist.meta.hydrated = false+ connection.$persist.meta.mounted = false+ connection.$patch(store.createConnectionState())+ store.resetConnectionStorageCache()+ vi.clearAllMocks()+}++function hydrate(entries: HistoryEntry[] = []) {+ connection.$patch(store.parseConnectionSnapshot({ version: 1, history: entries, guidedHosts: [] }))+ connection.markHydrated({ 'http://one.local:3080': 'saved-token' })+}++function holdNetwork() {+ native.fetch.mockImplementation((_input, options) => new Promise<Response>((resolve) => {+ const signal = options?.signal+ if (!signal)+ throw new Error('Expected an abortable network request')+ signal.addEventListener('abort', () => resolve(new Response(null, { status: 503 })), { once: true })+ }))+}++async function ready() {+ await act(async () => {+ webView().props.onMessage({+ nativeEvent: {+ url: 'http://one.local:3080/tasks?auth=saved-token',+ data: JSON.stringify({ channel: 'dsh-bridge', origin: 'http://one.local:3080', nonce: 'home-test-nonce', payload: { type: 'dsh://bridge-ready' } }),+ },+ })+ })+}++beforeEach(async () => {+ vi.resetModules()+ vi.resetAllMocks()+ vi.useFakeTimers()+ vi.setSystemTime(new Date('2026-01-01T00:00:00.000Z'))+ vi.stubGlobal('IS_REACT_ACT_ENVIRONMENT', true)+ const originalError = console.error.bind(console)+ vi.spyOn(console, 'error').mockImplementation((...args: unknown[]) => {+ if (args[0] === 'react-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer')+ return+ originalError(...args)+ })+ native.appState.currentState = 'active'+ native.dimensions = { width: 440, height: 900 }+ native.theme = { 'background': '#ffffff', 'foreground': '#0f1115', 'accent-foreground': '#ffffff' }+ native.appListeners.clear()+ native.backListeners.clear()+ native.navigation.isFocused.mockReturnValue(true)+ native.fetch.mockImplementation(async () => Response.json({ enabled: false, allowLoopback: true }))+ native.getIpAddressAsync.mockResolvedValue('192.168.1.50')+ native.getPermissionsAsync.mockResolvedValue({ granted: true })+ native.requestPermissionsAsync.mockResolvedValue({ granted: true })+ native.setNotificationChannelAsync.mockResolvedValue(null)+ native.scheduleNotificationAsync.mockResolvedValue('notification-id')+ vi.stubGlobal('fetch', native.fetch)+ screen = undefined+ store = await import('@/store/modules/connection')+ connection = store.connection+ resetConnection()+ runtime = await import('@/store/modules/connection/runtime')+ ;({ default: HomeScreen } = await import('@/app/index'))+})++afterEach(async () => {+ await act(async () => {+ screen?.unmount()+ })+ screen = undefined+ runtime.stopConnectionRuntime()+ await vi.advanceTimersByTimeAsync(0)+ vi.restoreAllMocks()+ vi.resetAllMocks()+ vi.unstubAllGlobals()+ vi.clearAllTimers()+ vi.useRealTimers()+ expect(native.backListeners.size).toBe(0)+ expect(native.appListeners.size).toBe(0)+})++describe('rendered Home scanning and idle actions', () => {+ it('cancels the active discovery and reveals usable idle actions without a late timeout notice', async () => {+ hydrate(history.slice(0, 1))+ holdNetwork()+ let scanning!: Promise<void>+ await act(async () => {+ scanning = runtime.startAutoScan()+ })+ await mount()+ expect(texts()).toContain('寻找可用连接')+ expect(root().findAll(node => node.props.accessibilityRole === 'progressbar')).toHaveLength(1)+ const signal = native.fetch.mock.calls[0]![1]!.signal!++ await press('取消')+ await scanning++ expect(signal.aborted).toBe(true)+ expect(texts()).not.toContain('寻找可用连接')+ expect(button('自动扫描局域网').props.isDisabled).toBe(false)+ expect(button('扫码连接').props.isDisabled).toBe(false)+ expect(button('最近连接').props.isDisabled).toBe(false)+ await act(async () => {+ await vi.advanceTimersByTimeAsync(20000)+ })+ expect(texts()).not.toContain('未发现可用主机,请检查设备是否在同一局域网,或扫码连接。')+ })++ it('keeps idle actions and drawer swipes disabled until hydration completes', async () => {+ connection.cancelScan()+ await mount()+ for (const label of ['自动扫描局域网', '扫码连接', '最近连接'])+ expect(button(label).props.isDisabled).toBe(true)+ expect(drawer().props.swipeEnabled).toBe(false)++ await act(async () => {+ hydrate()+ })++ for (const label of ['自动扫描局域网', '扫码连接', '最近连接'])+ expect(button(label).props.isDisabled).toBe(false)+ expect(drawer().props.swipeEnabled).toBe(true)+ })++ it('starts discovery from the idle auto-scan action and shows its network failure notice', async () => {+ const ip = Promise.withResolvers<string>()+ native.getIpAddressAsync.mockReturnValue(ip.promise)+ hydrate()+ connection.cancelScan()+ await mount()++ await press('自动扫描局域网')++ expect(texts()).toContain('扫描局域网端口中...')+ expect(root().findAll(node => String(node.type) === 'Button').map(text)).toEqual(['取消'])+ await act(async () => {+ ip.resolve('0.0.0.0')+ })+ expect(texts()).toContain('无法获取局域网 IPv4 地址,请连接 Wi-Fi 或使用扫码连接。')+ expect(button('自动扫描局域网').props.isDisabled).toBe(false)+ })++ it('uses a scanning-frame icon rather than a QR-code image at both scanner entry points', async () => {+ hydrate()+ connection.cancelScan()+ await mount()+ expect(button('扫码连接').findAll(node => String(node.type) === 'ScanLineIcon')).toHaveLength(1)+ expect(root().findAll(node => String(node.type) === 'QrCodeIcon')).toHaveLength(0)++ await press('最近连接')++ expect(button('扫码连接').findAll(node => String(node.type) === 'ScanLineIcon')).toHaveLength(1)+ expect(root().findAll(node => String(node.type) === 'QrCodeIcon')).toHaveLength(0)+ })++ it('matches the two outlined connection actions and gives auto-scan a contrasting radar icon', async () => {+ hydrate()+ connection.cancelScan()+ await mount()++ expect(button('扫码连接').props).toMatchObject({ variant: 'outline', size: 'lg' })+ expect(button('最近连接').props).toMatchObject({ variant: 'outline', size: 'lg' })+ expect(button('自动扫描局域网').find(node => String(node.type) === 'RadarIcon').props).toMatchObject({ size: 20, color: '#ffffff' })+ expect(button('最近连接').findAll(node => String(node.type) === 'HistoryIcon')).toHaveLength(1)++ native.theme = { 'background': '#151517', 'foreground': '#f9fafb', 'accent-foreground': '#0f1115' }+ await act(async () => {+ screen!.update(createElement(HomeScreen))+ })++ expect(button('自动扫描局域网').find(node => String(node.type) === 'RadarIcon').props.color).toBe('#0f1115')+ expect(button('扫码连接').findAll(node => String(node.type) === 'ScanLineIcon').map(node => node.props.color)).toEqual(['#f9fafb'])+ })++ it('renders the original whale, DeepSeek and Harness as three centered transparent SVG rows in both themes', async () => {+ hydrate()+ await mount()++ const logos = root().findAll(node => String(node.type) === 'Svg')+ expect(logos.map(node => node.props.accessibilityLabel)).toEqual(['DSH Mobile', 'DeepSeek', 'Harness'])+ expect(logos.map(node => node.props.viewBox)).toEqual(['0 0 23.16 17.04', '26 4.5 96 17.5', '129.348 5.5 52 14'])+ const brand = root().find(node => String(node.type) === 'View' && node.props.className === 'items-center gap-3')+ expect(brand.findAll(node => String(node.type) === 'Svg')).toEqual(logos)+ expect(root().findAll(node => String(node.type) === 'Image')).toHaveLength(0)+ expect(logos[0]!.findAll(node => String(node.type) === 'SvgRect')).toHaveLength(0)+ expect(logos[0]!.find(node => String(node.type) === 'SvgPath').props.fill).toBe('#0f1115')+ expect(logos[1]!.findAll(node => String(node.type) === 'SvgPath')).toHaveLength(9)+ expect(logos[1]!.findAll(node => String(node.type) === 'SvgPath').every(node => node.props.fill === '#0f1115')).toBe(true)+ expect(logos[2]!.props).toMatchObject({ width: 88, height: 23.692307692307693 })+ expect(logos[2]!.findAll(node => String(node.type) === 'SvgPath')).toHaveLength(7)+ expect(logos[2]!.findAll(node => String(node.type) === 'SvgPath').every(node => node.props.fill === '#ffffff')).toBe(true)+ expect(texts()).not.toContain('DeepSeek')+ expect(texts()).not.toContain('Harness')++ native.theme = { 'background': '#151517', 'foreground': '#f9fafb', 'accent-foreground': '#0f1115' }+ await act(async () => {+ screen!.update(createElement(HomeScreen))+ })++ const idleLogos = root().findAll(node => String(node.type) === 'Svg')+ expect(idleLogos.map(node => node.props.accessibilityLabel)).toEqual(['DSH Mobile', 'DeepSeek', 'Harness'])+ expect(idleLogos[0]!.find(node => String(node.type) === 'SvgPath').props.fill).toBe('#f9fafb')+ expect(idleLogos[1]!.findAll(node => String(node.type) === 'SvgPath').every(node => node.props.fill === '#f9fafb')).toBe(true)+ expect(idleLogos[2]!.findAll(node => String(node.type) === 'SvgPath').every(node => node.props.fill === '#151517')).toBe(true)++ await act(async () => {+ runtime.connectAddress(alpha)+ })++ expect(root().findAll(node => String(node.type) === 'Svg').map(node => node.props.accessibilityLabel)).toEqual(['DSH Mobile', 'DeepSeek', 'Harness'])+ expect(texts()).toContain('连接中…')+ expect(texts()).not.toContain('寻找可用连接')+ expect(webView().props.source).toEqual({ uri: 'http://one.local:3080/tasks?auth=saved-token' })+ await ready()+ expect(root().findAll(node => String(node.type) === 'Svg')).toHaveLength(0)+ expect(texts()).not.toContain('连接中…')+ })++ it('opens the QR route from the idle scan action', async () => {+ hydrate()+ connection.cancelScan()+ await mount()++ await press('扫码连接')++ expect(native.push).toHaveBeenCalledExactlyOnceWith('/scan')+ expect(drawer().props.open).toBe(false)+ expect(connection.stage).toBe('idle')+ })+})++describe('rendered Home connection editing', () => {+ it('opens rename on long press and saves a display name without reconnecting the WebView', async () => {+ hydrate(history)+ runtime.connectAddress(alpha)+ await mount()+ await ready()+ await act(async () => connection.setDrawerOpen(true))+ const generation = connection.viewGeneration+ await act(async () => button('重新连接').props.onLongPress())+ const actions = native.alert.mock.calls.at(-1)![2]!+ expect(actions.map(action => action.text)).toEqual(['重命名', '删除连接', '取消'])+ await act(async () => actions[0]!.onPress!())+ const input = root().find(node => String(node.type) === 'Input')+ await act(async () => input.props.onChangeText(' 我的电脑 '))+ await press('保存')+ expect(texts()).toContain('我的电脑')+ expect(connection.current).toMatchObject({ ...alpha, name: '我的电脑' })+ expect(connection.viewGeneration).toBe(generation)+ expect(webView().props.source).toEqual({ uri: 'http://one.local:3080/tasks?auth=saved-token' })+ expect(root().findAll(node => String(node.type) === 'Dialog')).toHaveLength(0)+ })++ it('keeps the active connection on cancel and removes it only after confirming the disconnect warning', async () => {+ hydrate(history)+ runtime.connectAddress(alpha)+ await mount()+ await ready()+ await act(async () => connection.setDrawerOpen(true))+ await act(async () => button('one.local:3080,可用').props.onLongPress())+ await act(async () => native.alert.mock.calls.at(-1)![2]![1]!.onPress!())+ const confirmation = native.alert.mock.calls.at(-1)!+ expect(confirmation[1]).toBe('这条连接正在使用。删除后将停止连接并返回初始页,是否继续?')+ expect(confirmation[2]![0]!.style).toBe('cancel')+ expect(connection.current?.id).toBe(alpha.id)+ expect(root().findAll(node => String(node.type) === 'WebView')).toHaveLength(1)+ native.fetch.mockClear()+ await act(async () => confirmation[2]![1]!.onPress!())+ expect(connection.current).toBeNull()+ expect(connection.stage).toBe('idle')+ expect(connection.history.some(entry => entry.id === alpha.id)).toBe(false)+ expect(connection.tokens[alpha.id]).toBeUndefined()+ expect(drawer().props.open).toBe(false)+ expect(root().findAll(node => String(node.type) === 'WebView')).toHaveLength(0)+ expect(button('自动扫描局域网').props.isDisabled).toBe(false)+ expect(native.fetch).not.toHaveBeenCalled()+ })+})++describe('rendered Home connection drawer', () => {+ it('opens the right slide drawer from a wider inner-edge region and presents five recent hosts with accessible status', async () => {+ hydrate(history)+ connection.cancelScan()+ connection.setHealth('http://one.local:3080', 'available')+ connection.setHealth('http://two.local:3080', 'unavailable')+ holdNetwork()+ await mount()+ expect(drawer().props).toMatchObject({ drawerPosition: 'right', drawerType: 'slide', direction: 'ltr', swipeEdgeWidth: 96, swipeEnabled: true, drawerStyle: { width: 384 } })+ native.dimensions = { width: 320, height: 640 }+ await act(async () => {+ screen!.update(createElement(HomeScreen))+ })+ expect(drawer().props.swipeEdgeWidth).toBe(96)+ expect(drawer().props.drawerStyle.width).toBeCloseTo(281.6)++ await press('最近连接')++ expect(drawer().props.open).toBe(true)+ const entries = root().findAll(node => String(node.type) === 'Button' && String(node.props.accessibilityLabel).includes('local:3080,'))+ expect(entries.map(node => node.props.accessibilityLabel)).toEqual([+ 'one.local:3080,可用',+ 'two.local:3080,不可用',+ 'three.local:3080,正在检测',+ 'four.local:3080,正在检测',+ 'five.local:3080,正在检测',+ ])+ expect(texts()).not.toContain('six.local:3080')+ expect(texts()).not.toContain('seven.local:3080')+ expect(button('断开连接').props.isDisabled).toBe(true)+ expect(button('重新连接').props.isDisabled).toBe(true)+ })++ it('matches the scan and refresh icon button sizes without changing their accessible actions', async () => {+ hydrate()+ connection.cancelScan()+ await mount()+ await press('最近连接')++ const scan = button('扫码连接')+ const refresh = button('刷新最近连接')+ expect(scan.props).toMatchObject({ variant: 'ghost', size: 'sm', isIconOnly: true, isDisabled: false })+ expect(refresh.props).toMatchObject({ variant: 'ghost', size: 'sm', isIconOnly: true, isDisabled: false })+ expect(scan.find(node => String(node.type) === 'ScanLineIcon').props.size).toBe(18)+ expect(refresh.find(node => String(node.type) === 'RefreshIcon').props.size).toBe(18)++ await press('扫码连接')+ expect(native.push).toHaveBeenCalledExactlyOnceWith('/scan')+ expect(drawer().props.open).toBe(false)+ })++ it('keeps the connected page free of permanent drawer controls before and after its full-screen first-use guide', async () => {+ hydrate()+ runtime.connectAddress(alpha)+ await mount()+ const { WebView } = await import('react-native-webview')+ const instance = root().findByType(WebView).instance+ expect(root().findAll(node => node.props.accessibilityLabel === '打开连接信息')).toHaveLength(0)+ expect(root().findAll(node => String(node.type) === 'Modal')).toHaveLength(0)++ await ready()++ const modals = root().findAll(node => String(node.type) === 'Modal')+ expect(modals).toHaveLength(1)+ expect(modals[0]!.props).toMatchObject({ transparent: true, visible: true, statusBarTranslucent: true, navigationBarTranslucent: true })+ expect(modals[0]!.findAll(node => String(node.type) === 'Pressable').map(node => node.props.className)).toEqual(['flex-1 items-center justify-center gap-5 bg-black/60'])+ expect(modals[0]!.findAll(node => String(node.type) === 'Text').map(text)).toContain('向左滑查看连接信息')+ await act(async () => {+ modals[0]!.find(node => String(node.type) === 'Pressable').props.onPress()+ })++ expect(root().findAll(node => String(node.type) === 'Modal')).toHaveLength(0)+ expect(root().findAll(node => node.props.accessibilityLabel === '打开连接信息')).toHaveLength(0)+ expect(root().findByType(WebView).instance).toBe(instance)+ expect(connection.guidedHosts).toEqual(['http://one.local:3080'])+ await act(async () => {+ drawer().props.onOpen()+ drawer().props.onClose()+ })+ expect(root().findByType(WebView).instance).toBe(instance)+ expect(root().findAll(node => String(node.type) === 'Modal')).toHaveLength(0)+ })++ it('does not consume first-use guidance when the drawer is opened before the page is ready', async () => {+ hydrate()+ runtime.connectAddress(alpha)+ await mount()+ await act(async () => {+ drawer().props.onOpen()+ })+ expect(connection.guidedHosts).toEqual([])+ await ready()+ expect(root().findAll(node => String(node.type) === 'Modal')).toHaveLength(0)+ await act(async () => {+ drawer().props.onClose()+ })++ const modals = root().findAll(node => String(node.type) === 'Modal')+ expect(modals).toHaveLength(1)+ expect(modals[0]!.findAll(node => String(node.type) === 'Text').map(text)).toContain('向左滑查看连接信息')+ await act(async () => {+ modals[0]!.props.onRequestClose()+ })+ expect(connection.guidedHosts).toEqual(['http://one.local:3080'])+ expect(root().findAll(node => String(node.type) === 'Modal')).toHaveLength(0)+ })++ it('keeps the drawer heading close to the current connection without restoring a card wrapper', async () => {+ hydrate()+ connection.cancelScan()+ await mount()+ await press('最近连接')++ const heading = root().findAll(node => String(node.type) === 'View').find(node => node.findAll(child => String(child.type) === 'Button' && child.props.accessibilityLabel === '扫码连接').length === 1 && node.findAll(child => String(child.type) === 'Text').map(text).includes('连接信息') && node.props.className?.includes('justify-between'))+ expect(heading?.props.className).toBe('flex-row items-center justify-between px-5 pb-1 pt-2')+ expect(button('重新连接').props.className).toBe('h-auto min-h-16 justify-start gap-3 rounded-xl px-3 py-4')+ })++ it('uses the same title-and-item style for current and recent hosts with only status dots in the rows', async () => {+ hydrate(history)+ runtime.connectAddress(alpha)+ holdNetwork()+ await mount()+ await act(async () => {+ drawer().props.onOpen()+ })++ expect(texts()).toContain('当前连接')+ expect(texts()).toContain('最近连接')+ const current = button('重新连接')+ const recent = button('one.local:3080,可用')+ expect(current.props.variant).toBe('ghost')+ expect(current.props.className).toBe(recent.props.className)+ expect(text(current)).toBe('one.local:3080')+ expect(text(recent)).toBe('one.local:3080')+ expect(current.findAll(node => String(node.type) === 'View' && node.props.className?.includes('bg-success'))).toHaveLength(1)+ expect(recent.findAll(node => String(node.type) === 'View' && node.props.className?.includes('bg-success'))).toHaveLength(1)+ expect(texts()).not.toContain('可用')+ expect(texts()).not.toContain('不可用')+ expect(root().findAll(node => String(node.type) === 'View' && node.props.className?.includes('border-border') && node.props.className?.includes('bg-surface-secondary'))).toHaveLength(0)+ const refresh = button('刷新最近连接')+ expect(root().findAll(node => String(node.type) === 'RefreshIcon')).toEqual(refresh.findAll(node => String(node.type) === 'RefreshIcon'))++ await press('重新连接')++ expect(drawer().props.open).toBe(false)+ expect(connection.viewGeneration).toBe(2)+ expect(webView().props.source).toEqual({ uri: 'http://one.local:3080/tasks?auth=saved-token' })+ })++ it('refreshes host availability from the recent header without reconnecting or duplicating active probes', async () => {+ hydrate(history.slice(0, 1))+ connection.cancelScan()+ await mount()+ await press('最近连接')+ expect(button('one.local:3080,可用').props.isDisabled).not.toBe(true)+ expect(native.fetch).toHaveBeenCalledTimes(1)+ const refresh = button('刷新最近连接')+ expect(refresh.props).toMatchObject({ variant: 'ghost', isIconOnly: true })+ const header = root().findAll(node => String(node.type) === 'View' && node.props.className === 'flex-row items-center justify-between').find(node => node.findAll(child => String(child.type) === 'Text').map(text).includes('最近连接'))+ expect(header?.findAll(node => String(node.type) === 'RefreshIcon')).toHaveLength(1)+ expect(button('one.local:3080,可用').findAll(node => String(node.type) === 'RefreshIcon')).toHaveLength(0)++ native.fetch.mockResolvedValue(new Response(null, { status: 503 }))+ await press('刷新最近连接')++ expect(native.fetch).toHaveBeenCalledTimes(2)+ expect(button('one.local:3080,不可用').findAll(node => String(node.type) === 'View' && node.props.className?.includes('bg-danger'))).toHaveLength(1)+ expect(texts()).not.toContain('不可用')+ expect(connection.current).toBeNull()+ expect(drawer().props.open).toBe(true)+ holdNetwork()+ await press('刷新最近连接')+ await press('刷新最近连接')+ expect(native.fetch).toHaveBeenCalledTimes(3)+ expect(native.fetch.mock.calls[2]![0]).toBe('http://one.local:3080/__dsh_bridge__/auth-status')+ expect(connection.viewGeneration).toBe(0)+ })++ it('connects a tapped recent host using its saved token and closes the drawer', async () => {+ hydrate(history)+ connection.cancelScan()+ holdNetwork()+ await mount()+ await press('最近连接')++ await press('one.local:3080,正在检测')++ expect(drawer().props.open).toBe(false)+ expect(webView().props.source).toEqual({ uri: 'http://one.local:3080/tasks?auth=saved-token' })+ expect(texts()).toContain('连接中…')+ expect(connection.stage).toBe('connected')+ })++ it('cancels discovery and closes the drawer before opening its QR action', async () => {+ hydrate(history.slice(0, 1))+ holdNetwork()+ let scanning!: Promise<void>+ await act(async () => {+ scanning = runtime.startAutoScan()+ })+ await mount()+ await act(async () => {+ drawer().props.onOpen()+ })+ const signal = native.fetch.mock.calls[0]![1]!.signal!++ await press('扫码连接')+ await scanning++ expect(signal.aborted).toBe(true)+ expect(native.push).toHaveBeenCalledExactlyOnceWith('/scan')+ expect(drawer().props.open).toBe(false)+ expect(button('自动扫描局域网').props.isDisabled).toBe(false)+ })++ it('disconnects the displayed host back to visible scanning without losing successful history', async () => {+ hydrate()+ runtime.connectAddress(alpha)+ await mount()+ await ready()+ await act(async () => {+ drawer().props.onOpen()+ })+ holdNetwork()++ await press('断开连接')++ expect(root().findAll(node => String(node.type) === 'WebView')).toHaveLength(0)+ expect(drawer().props.open).toBe(false)+ expect(texts()).toContain('寻找可用连接')+ expect(button('取消').props.isDisabled).not.toBe(true)+ expect(connection.current).toBeNull()+ expect(connection.history.map(entry => entry.id)).toEqual(['http://one.local:3080'])+ })++ it('dismisses the first-host swipe hint when the native drawer is swiped open', async () => {+ hydrate()+ runtime.connectAddress(alpha)+ await mount()+ await ready()+ expect(texts()).toContain('向左滑查看连接信息')++ await act(async () => {+ drawer().props.onOpen()+ })++ expect(drawer().props.open).toBe(true)+ expect(texts()).not.toContain('向左滑查看连接信息')+ expect(connection.guidedHosts).toEqual(['http://one.local:3080'])+ await press('关闭连接信息')+ expect(texts()).not.toContain('向左滑查看连接信息')+ })++ it('preserves the same native WebView instance and URL through drawer swipes and button toggles', async () => {+ hydrate()+ runtime.connectAddress(alpha)+ await mount()+ await ready()+ const { WebView } = await import('react-native-webview')+ const instance = root().findByType(WebView).instance++ await act(async () => {+ drawer().props.onOpen()+ })+ expect(root().findByType(WebView).instance).toBe(instance)+ await act(async () => {+ drawer().props.onClose()+ })+ expect(root().findByType(WebView).instance).toBe(instance)+ await act(async () => {+ drawer().props.onOpen()+ })+ expect(root().findByType(WebView).instance).toBe(instance)+ await press('关闭连接信息')++ expect(root().findByType(WebView).instance).toBe(instance)+ expect(webView().props.source).toEqual({ uri: 'http://one.local:3080/tasks?auth=saved-token' })+ expect(texts()).not.toContain('连接中…')+ })+})++describe('rendered Home Android back handling', () => {+ it('closes a focused Home drawer and then leaves further back events unconsumed', async () => {+ hydrate()+ connection.cancelScan()+ await mount()+ await press('最近连接')+ const handler = [...native.backListeners][0]!+ let consumed: boolean | undefined++ await act(async () => {+ consumed = handler()+ })++ expect(consumed).toBe(true)+ expect(drawer().props.open).toBe(false)+ expect(handler()).toBe(false)+ })++ it('does not consume scanner-modal back events when Home navigation is not focused', async () => {+ hydrate()+ connection.cancelScan()+ await mount()+ await press('最近连接')+ native.navigation.isFocused.mockReturnValue(false)+ const handler = [...native.backListeners][0]!+ let consumed: boolean | undefined++ await act(async () => {+ consumed = handler()+ })++ expect(consumed).toBe(false)+ expect(drawer().props.open).toBe(true)+ expect(texts()).toContain('连接信息')+ })+})diff --git a/src-native/ui/scan.test.tsx b/src-native/ui/scan.test.tsxnew file mode 100644index 00000000..e70a9e1f--- /dev/null+++ b/src-native/ui/scan.test.tsx@@ -0,0 +1,393 @@+import type { ReactNode } from 'react'+import type { ReactTestInstance, ReactTestRenderer } from 'react-test-renderer'+import { act, createElement } from 'react'+import { create } from 'react-test-renderer'+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'++interface CameraPermission {+ granted: boolean+ canAskAgain: boolean+ status: 'denied' | 'granted'+ expires: 'never'+}++const native = vi.hoisted(() => ({+ permission: null as CameraPermission | null,+ appState: { currentState: 'active' },+ appListeners: new Set<() => void>(),+ requestPermission: vi.fn<() => Promise<CameraPermission>>(),+ refreshPermission: vi.fn<() => Promise<CameraPermission>>(),+ openSettings: vi.fn<() => Promise<void>>(),+ back: vi.fn<() => void>(),+ cancelAnimation: vi.fn(),+ insets: { top: 59, bottom: 34, left: 0, right: 0 },+}))++vi.mock('react-native', () => ({+ View: 'View',+ Text: 'Text',+ Platform: { OS: 'android' },+ Linking: { openSettings: native.openSettings },+ AppState: {+ get currentState() { return native.appState.currentState },+ addEventListener: (_event: string, listener: () => void) => {+ native.appListeners.add(listener)+ return { remove: () => {+ native.appListeners.delete(listener)+ } }+ },+ },+}))+vi.mock('expo-router', () => ({ router: { back: native.back } }))+// 文案与 store 现在都经过 i18n;node 环境无法真正加载 expo-localization(缺 __DEV__),设备区域固定为 zh-CN。+vi.mock('expo-localization', () => ({ getLocales: () => [{ languageTag: 'zh-CN' }] }))+// store 模块经 valtio-define persist 插件依赖 AsyncStorage,node 环境用最小实现顶替。+vi.mock('@react-native-async-storage/async-storage', () => ({ default: { getItem: vi.fn(async () => null), setItem: vi.fn(async () => {}) } }))+vi.mock('expo-network', () => ({ getIpAddressAsync: vi.fn(async () => '0.0.0.0') }))+vi.mock('expo-notifications', () => ({ AndroidImportance: { DEFAULT: 5, HIGH: 6 } }))+vi.mock('expo-camera', async () => {+ const { useRef, useState } = await import('react')+ function useCameraPermissions() {+ const [permission, setPermission] = useState(native.permission)+ const methodsRef = useRef({+ request: async () => {+ const value = await native.requestPermission()+ setPermission(value)+ return value+ },+ refresh: async () => {+ const value = await native.refreshPermission()+ setPermission(value)+ return value+ },+ })+ return [permission, methodsRef.current.request, methodsRef.current.refresh]+ }+ return { CameraView: 'CameraView', useCameraPermissions }+})+vi.mock('heroui-native/hooks', () => ({ useThemeColor: (names: string[]) => names.map(() => '#ffffff') }))+vi.mock('heroui-native/button', async () => {+ const { createElement } = await import('react')+ function Button({ children, ...props }: { children?: ReactNode }) {+ return createElement('Button', props, children)+ }+ return { Button: Object.assign(Button, { Label: 'Text' }) }+})+vi.mock('react-native-safe-area-context', () => ({ SafeAreaView: 'SafeAreaView', useSafeAreaInsets: () => native.insets }))+vi.mock('react-native-lucide', () => ({ X: 'Icon' }))+vi.mock('react-native-reanimated', async () => {+ const { useRef } = await import('react')+ return {+ default: { View: 'AnimatedView' },+ useSharedValue: (value: number) => useRef({ value }).current,+ useAnimatedStyle: (style: () => unknown) => style(),+ withTiming: (value: number) => value,+ withDelay: (_delay: number, value: number) => value,+ withRepeat: (value: number) => value,+ withSequence: (...values: number[]) => values.at(-1),+ cancelAnimation: native.cancelAnimation,+ }+})++const denied: CameraPermission = { granted: false, canAskAgain: true, status: 'denied', expires: 'never' }+const granted: CameraPermission = { granted: true, canAskAgain: true, status: 'granted', expires: 'never' }+let screen: ReactTestRenderer | undefined+let store: typeof import('@/store/modules/connection')+let connection: typeof import('@/store/modules/connection').connection+let runtime: typeof import('@/store/modules/connection/runtime')+let ScanScreen: typeof import('@/app/scan').default++/** persist 插件在模块加载时就已经订阅 state,必须先复位插件元数据,否则下面的 `$patch` 会立刻写一次盘。 */+function resetConnection() {+ connection.$persist.meta.hydrated = false+ connection.$persist.meta.mounted = false+ connection.$patch(store.createConnectionState())+ store.resetConnectionStorageCache()+ vi.clearAllMocks()+}++/** 与 restoreConnections() 等价的水合:快照进 state,令牌单独落 map,hydrated 由 markHydrated 置位。 */+function hydrate(tokens: Record<string, string> = {}) {+ connection.$patch(store.parseConnectionSnapshot({ version: 1, history: [], guidedHosts: [] }))+ connection.markHydrated(tokens)+}++function text(node: ReactTestInstance | string): string {+ if (typeof node === 'string')+ return node+ return node.children.map(text).join('')+}++function root() {+ if (!screen)+ throw new Error('Scanner screen is not mounted')+ return screen.root+}++function texts() {+ return root().findAll(node => String(node.type) === 'Text').map(text)+}++function button(label: string) {+ const matches = root().findAll(node => String(node.type) === 'Button' && (node.props.accessibilityLabel === label || text(node) === label))+ expect(matches, `Button ${label}`).toHaveLength(1)+ return matches[0]!+}++function camera() {+ return root().find(node => String(node.type) === 'CameraView')+}++async function press(label: string) {+ await act(async () => {+ await button(label).props.onPress()+ })+}++async function mount() {+ await act(async () => {+ screen = create(createElement(ScanScreen))+ })+}++async function changeAppState(state: string) {+ await act(async () => {+ native.appState.currentState = state+ for (const listener of native.appListeners)+ listener()+ })+}++beforeEach(async () => {+ vi.resetModules()+ vi.resetAllMocks()+ vi.useFakeTimers()+ vi.stubGlobal('IS_REACT_ACT_ENVIRONMENT', true)+ const originalError = console.error.bind(console)+ vi.spyOn(console, 'error').mockImplementation((...args: unknown[]) => {+ if (args[0] === 'react-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer')+ return+ originalError(...args)+ })+ native.appState.currentState = 'active'+ native.appListeners.clear()+ native.permission = granted+ native.refreshPermission.mockImplementation(async () => {+ if (!native.permission)+ throw new Error('Test permission has not been resolved')+ return native.permission+ })+ native.requestPermission.mockResolvedValue(denied)+ native.openSettings.mockResolvedValue(undefined)+ screen = undefined+ store = await import('@/store/modules/connection')+ connection = store.connection+ resetConnection()+ runtime = await import('@/store/modules/connection/runtime')+ ;({ default: ScanScreen } = await import('@/app/scan'))+ hydrate()+})++afterEach(async () => {+ await act(async () => {+ screen?.unmount()+ })+ screen = undefined+ runtime.stopConnectionRuntime()+ vi.restoreAllMocks()+ vi.resetAllMocks()+ vi.unstubAllGlobals()+ vi.clearAllTimers()+ vi.useRealTimers()+ expect(native.appListeners.size).toBe(0)+})++describe('rendered scanner camera permissions', () => {+ it('pads the scanner chrome by the host safe-area insets', async () => {+ await mount()++ expect(screen?.toJSON()).toMatchObject({ props: { style: { paddingTop: 59, paddingBottom: 34 } } })+ })++ it('shows a loader while permission is unresolved, then offers the denied-camera action', async () => {+ native.permission = null+ const permission = Promise.withResolvers<CameraPermission>()+ native.refreshPermission.mockReturnValue(permission.promise)+ await mount()+ expect(root().findAll(node => node.props.accessibilityRole === 'progressbar')).toHaveLength(1)+ expect(root().findAll(node => String(node.type) === 'CameraView')).toHaveLength(0)++ await act(async () => {+ permission.resolve(denied)+ })++ expect(root().findAll(node => node.props.accessibilityRole === 'progressbar')).toHaveLength(0)+ expect(texts()).toContain('需要相机权限才能扫描连接二维码。')+ expect(text(button('允许使用相机'))).toBe('允许使用相机')+ })++ it('requests camera access after denial and keeps QR scanning unavailable when permission stays denied', async () => {+ native.permission = denied+ await mount()++ await press('允许使用相机')++ expect(native.requestPermission).toHaveBeenCalledExactlyOnceWith()+ expect(native.openSettings).not.toHaveBeenCalled()+ expect(root().findAll(node => String(node.type) === 'CameraView')).toHaveLength(0)+ expect(texts()).toContain('需要相机权限才能扫描连接二维码。')+ expect(native.back).not.toHaveBeenCalled()+ expect(connection.current).toBeNull()+ })++ it('renders the camera when an explicit permission request is granted', async () => {+ native.permission = denied+ native.requestPermission.mockResolvedValue(granted)+ await mount()++ await press('允许使用相机')++ expect(camera().props).toMatchObject({ facing: 'back', barcodeScannerSettings: { barcodeTypes: ['qr'] } })+ expect(camera().props.onBarcodeScanned).toBeTypeOf('function')+ expect(texts()).not.toContain('需要相机权限才能扫描连接二维码。')+ })++ it('opens system settings for permanent denial and refreshes permission when the app returns', async () => {+ native.permission = { ...denied, canAskAgain: false }+ await mount()+ expect(text(button('打开系统设置'))).toBe('打开系统设置')++ await press('打开系统设置')++ expect(native.openSettings).toHaveBeenCalledExactlyOnceWith()+ expect(native.requestPermission).not.toHaveBeenCalled()+ await changeAppState('background')+ expect(root().findAll(node => String(node.type) === 'CameraView')).toHaveLength(0)+ native.permission = granted+ await changeAppState('active')+ expect(native.refreshPermission).toHaveBeenCalledTimes(2)+ expect(camera().props.onBarcodeScanned).toBeTypeOf('function')+ expect(texts()).toContain('扫描桌面端或 DSH Mobile 中的连接二维码')+ expect(texts()).not.toContain('需要相机权限才能扫描连接二维码。')+ })++ it('unmounts the camera in the background and observes a permission revocation on return', async () => {+ await mount()+ expect(camera().props.facing).toBe('back')++ await changeAppState('background')++ expect(root().findAll(node => String(node.type) === 'CameraView')).toHaveLength(0)+ native.permission = { ...denied, canAskAgain: false }+ await changeAppState('active')+ expect(root().findAll(node => String(node.type) === 'CameraView')).toHaveLength(0)+ expect(text(button('打开系统设置'))).toBe('打开系统设置')+ expect(native.refreshPermission).toHaveBeenCalledTimes(2)+ })++ it.each(['request', 'settings'] as const)('shows the camera error when the %s permission action rejects', async (operation) => {+ native.permission = denied+ let label = '允许使用相机'+ if (operation === 'settings') {+ native.permission = { ...denied, canAskAgain: false }+ native.openSettings.mockRejectedValue(new Error('Settings unavailable'))+ label = '打开系统设置'+ }+ else {+ native.requestPermission.mockRejectedValue(new Error('Camera request unavailable'))+ }+ await mount()++ await press(label)++ expect(texts()).toContain('无法打开相机,请检查相机权限后重试。')+ expect(root().findAll(node => String(node.type) === 'CameraView')).toHaveLength(0)+ expect(connection.current).toBeNull()+ expect(native.back).not.toHaveBeenCalled()+ })++ it('shows a visible error when refreshing native camera permission fails on foreground return', async () => {+ await mount()+ await changeAppState('background')+ native.refreshPermission.mockRejectedValue(new Error('Camera refresh failed'))++ await changeAppState('active')++ expect(texts()).toContain('无法打开相机,请检查相机权限后重试。')+ expect(text(button('重新扫码'))).toBe('重新扫码')+ expect(native.back).not.toHaveBeenCalled()+ })+})++describe('rendered scanner QR events', () => {+ it('accepts only the first valid QR event before React commits and returns to Home once', async () => {+ await mount()+ const scan = camera().props.onBarcodeScanned++ await act(async () => {+ scan({ data: 'http://bridge.local:3080/tasks?auth=qr-token&theme=dark#fragment' })+ scan({ data: 'https://second.local/' })+ })++ expect(connection.current).toEqual({ id: 'http://bridge.local:3080', url: 'http://bridge.local:3080/tasks?theme=dark', host: 'bridge.local', port: 3080, token: 'qr-token' })+ expect(connection.stage).toBe('connected')+ expect(connection.tokens).toEqual({ 'http://bridge.local:3080': 'qr-token' })+ expect(native.back).toHaveBeenCalledExactlyOnceWith()+ expect(camera().props.onBarcodeScanned).toBeUndefined()+ const generation = connection.viewGeneration+ await act(async () => {+ scan({ data: 'https://second.local/' })+ })+ expect(native.back).toHaveBeenCalledTimes(1)+ expect(connection.viewGeneration).toBe(generation)+ expect(connection.current?.id).toBe('http://bridge.local:3080')+ })++ it('locks an invalid QR result until the visible retry action enables a fresh valid scan', async () => {+ await mount()+ const scan = camera().props.onBarcodeScanned++ await act(async () => {+ scan({ data: 'not a connection QR code' })+ scan({ data: 'http://ignored.local:3080/' })+ })++ expect(texts()).toContain('二维码中没有有效的 HTTP/HTTPS 连接地址。')+ expect(camera().props.onBarcodeScanned).toBeUndefined()+ expect(connection.current).toBeNull()+ expect(native.back).not.toHaveBeenCalled()+ await press('重新扫码')+ expect(texts()).not.toContain('二维码中没有有效的 HTTP/HTTPS 连接地址。')+ expect(camera().props.onBarcodeScanned).toBeTypeOf('function')+ await act(async () => {+ camera().props.onBarcodeScanned({ data: '{"url":"https://bridge.local/tasks?token=fresh"}' })+ })+ expect(connection.current).toEqual({ id: 'https://bridge.local', url: 'https://bridge.local/tasks', host: 'bridge.local', port: 443, token: 'fresh' })+ expect(native.back).toHaveBeenCalledExactlyOnceWith()+ })++ it('presents native camera mount failures with a retry action that clears the error', async () => {+ await mount()++ await act(async () => {+ camera().props.onMountError({ message: 'Camera unavailable' })+ })++ expect(texts()).toContain('无法打开相机,请检查相机权限后重试。')+ await press('重新扫码')+ expect(texts()).not.toContain('无法打开相机,请检查相机权限后重试。')+ expect(camera().props.onBarcodeScanned).toBeTypeOf('function')+ expect(connection.current).toBeNull()+ })++ it('closes the scanner without changing the current connection', async () => {+ runtime.connectAddress({ id: 'https://existing.local', url: 'https://existing.local/tasks', host: 'existing.local', port: 443 })+ await mount()++ await press('关闭扫码')++ expect(native.back).toHaveBeenCalledExactlyOnceWith()+ expect(connection.current).toEqual({ id: 'https://existing.local', url: 'https://existing.local/tasks', host: 'existing.local', port: 443 })+ expect(connection.stage).toBe('connected')+ })+})diff --git a/src-native/ui/webview.test.tsx b/src-native/ui/webview.test.tsxnew file mode 100644index 00000000..4aaad7a0--- /dev/null+++ b/src-native/ui/webview.test.tsx@@ -0,0 +1,1228 @@+import type { ReactNode } from 'react'+import type { ReactTestInstance, ReactTestRenderer } from 'react-test-renderer'+import type { NotificationFocus } from '@/store/modules/connection'+import { createContext as createVmContext, runInContext } from 'node:vm'+import { act, createElement } from 'react'+import { create } from 'react-test-renderer'+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'++const native = vi.hoisted(() => ({+ appState: { currentState: 'active' },+ platform: { OS: 'android' },+ appListeners: new Set<() => void>(),+ backListeners: new Set<() => boolean>(),+ navigation: { isFocused: vi.fn<() => boolean>() },+ randomUUID: vi.fn<() => string>(),+ openURL: vi.fn<(url: string) => Promise<void>>(),+ getPermissionsAsync: vi.fn<() => Promise<{ granted: boolean }>>(),+ requestPermissionsAsync: vi.fn<() => Promise<{ granted: boolean }>>(),+ setNotificationChannelAsync: vi.fn<(...args: unknown[]) => Promise<null>>(),+ scheduleNotificationAsync: vi.fn<(...args: unknown[]) => Promise<string>>(),+ cancelAnimation: vi.fn(),+ setTheme: vi.fn<(theme: 'light' | 'dark' | 'system') => void>(),+}))++vi.mock('react-native', () => ({+ View: 'View',+ Text: 'Text',+ Modal: 'Modal',+ Pressable: 'Pressable',+ Platform: native.platform,+ Linking: { openURL: native.openURL },+ AppState: {+ get currentState() { return native.appState.currentState },+ addEventListener: (_event: string, listener: () => void) => {+ native.appListeners.add(listener)+ return { remove: () => {+ native.appListeners.delete(listener)+ } }+ },+ },+ BackHandler: {+ addEventListener: (_event: string, listener: () => boolean) => {+ native.backListeners.add(listener)+ return { remove: () => {+ native.backListeners.delete(listener)+ } }+ },+ },+}))+vi.mock('uniwind', () => ({ Uniwind: { setTheme: native.setTheme } }))+// 文案与 store 现在都经过 i18n;node 环境无法真正加载 expo-localization(缺 __DEV__),设备区域固定为 zh-CN。+vi.mock('expo-localization', () => ({ getLocales: () => [{ languageTag: 'zh-CN' }] }))+// store 模块经 valtio-define persist 插件依赖 AsyncStorage,node 环境用最小实现顶替。+vi.mock('@react-native-async-storage/async-storage', () => ({ default: { getItem: vi.fn(async () => null), setItem: vi.fn(async () => {}) } }))+vi.mock('expo-router', () => ({ useNavigation: () => native.navigation }))+vi.mock('expo-crypto', () => ({ randomUUID: native.randomUUID }))+vi.mock('expo-network', () => ({ getIpAddressAsync: vi.fn<() => Promise<string>>() }))+vi.mock('expo-notifications', () => ({+ AndroidImportance: { DEFAULT: 5, HIGH: 6 },+ getPermissionsAsync: native.getPermissionsAsync,+ requestPermissionsAsync: native.requestPermissionsAsync,+ setNotificationChannelAsync: native.setNotificationChannelAsync,+ scheduleNotificationAsync: native.scheduleNotificationAsync,+}))+vi.mock('heroui-native/hooks', () => ({ useThemeColor: (names: string | string[]) => Array.isArray(names) ? names.map(() => '#ffffff') : '#ffffff' }))+vi.mock('heroui-native/button', async () => {+ const { createElement } = await import('react')+ function Button({ children, ...props }: { children?: ReactNode }) {+ return createElement('Button', props, children)+ }+ return { Button }+})+vi.mock('react-native-svg', () => ({ default: 'Svg', Path: 'SvgPath', Rect: 'SvgRect', G: 'SvgGroup', Defs: 'SvgDefs', ClipPath: 'SvgClipPath' }))+vi.mock('react-native-lucide', () => ({ ArrowLeft: 'Icon', Hand: 'Icon' }))+vi.mock('react-native-safe-area-context', () => ({ SafeAreaView: 'SafeAreaView' }))+vi.mock('react-native-reanimated', async () => {+ const { useRef } = await import('react')+ return {+ default: { View: 'AnimatedView' },+ useSharedValue: (value: number) => useRef({ value }).current,+ useAnimatedStyle: (style: () => unknown) => style(),+ withTiming: (value: number) => value,+ withDelay: (_delay: number, value: number) => value,+ withRepeat: (value: number) => value,+ withSequence: (...values: number[]) => values.at(-1),+ cancelAnimation: native.cancelAnimation,+ }+})+vi.mock('react-native-webview', async () => {+ const { Component, createElement } = await import('react')+ class WebView extends Component<Record<string, unknown>> {+ constructor(props: Record<string, unknown>) {+ super(props)+ Object.assign(this, {+ injectJavaScript: vi.fn<(script: string) => void>(),+ goBack: vi.fn<() => void>(),+ })+ }++ render() {+ return createElement('WebView', this.props)+ }+ }+ return { WebView }+})++const alpha = { id: 'http://bridge.test:3080', url: 'http://bridge.test:3080/tasks', host: 'bridge.test', port: 3080 }+const beta = { id: 'https://second.test', url: 'https://second.test/workspaces', host: 'second.test', port: 443 }+const focus: NotificationFocus = { origin: 'http://bridge.test:3080', sessionId: 'session-alpha', title: 'Answer complete', tag: 'tag-alpha' }+const nonce = 'webview-uuid-1'+const failure = '连接失败,请检查主机地址、网络或访问令牌。'+const slowLoading = '页面加载较慢,仍在等待响应。可以继续等待或重新连接。'+const focusFailure = '已恢复连接,但未能定位通知对应会话,请在网页中手动选择。'+let screen: ReactTestRenderer | undefined+let store: typeof import('@/store/modules/connection')+let connection: typeof import('@/store/modules/connection').connection+let runtime: typeof import('@/store/modules/connection/runtime')+let BridgeWebView: typeof import('./webview').BridgeWebView+const pages: Array<Pick<EventTarget, 'dispatchEvent'>> = []++/** persist 插件在模块加载时就已经订阅 state,必须先复位插件元数据,否则下面的 `$patch` 会立刻写一次盘。 */+function resetConnection() {+ connection.$persist.meta.hydrated = false+ connection.$persist.meta.mounted = false+ connection.$patch(store.createConnectionState())+ store.resetConnectionStorageCache()+ vi.clearAllMocks()+}++/** 与 restoreConnections() 等价的水合:快照进 state,hydrated 由 markHydrated 置位。 */+function hydrate() {+ connection.$patch(store.parseConnectionSnapshot({ version: 1, history: [], guidedHosts: [] }))+ connection.markHydrated({})+}++interface NativeViewRef {+ injectJavaScript: ReturnType<typeof vi.fn<(script: string) => void>>+ goBack: ReturnType<typeof vi.fn<() => void>>+}++function root() {+ if (!screen)+ throw new Error('Bridge WebView is not mounted')+ return screen.root+}++function webView() {+ return root().find(node => String(node.type) === 'WebView')+}++function text(node: ReactTestInstance | string): string {+ if (typeof node === 'string')+ return node+ return node.children.map(text).join('')+}++function texts() {+ return root().findAll(node => String(node.type) === 'Text').map(text)+}++async function viewRef(): Promise<NativeViewRef> {+ const { WebView } = await import('react-native-webview')+ return root().findByType(WebView).instance as NativeViewRef+}++async function mount() {+ await act(async () => {+ screen = create(createElement(BridgeWebView, { address: alpha, generation: connection.viewGeneration }))+ })+}++async function unmount() {+ await act(async () => {+ screen?.unmount()+ })+ screen = undefined+}++async function message(payload: unknown, options: { origin?: string, nonce?: string, url?: string, channel?: string } = {}) {+ await rawMessage(JSON.stringify({+ channel: options.channel ?? 'dsh-bridge',+ origin: options.origin ?? alpha.id,+ nonce: options.nonce ?? nonce,+ payload,+ }), options.url ?? alpha.url)+}++async function rawMessage(data: string, url = alpha.url) {+ await act(async () => {+ webView().props.onMessage({ nativeEvent: { data, url } })+ })+}++async function ready() {+ await message({ type: 'dsh://bridge-ready' })+}++async function changeAppState(state: string) {+ await act(async () => {+ native.appState.currentState = state+ for (const listener of native.appListeners)+ listener()+ })+}++function injectedMessages(view: NativeViewRef, options: { origin?: string, nonce?: string, topFrame?: boolean } = {}) {+ const messages: Record<string, unknown>[] = []+ const window = {+ top: null as unknown,+ __dshBridgeNonce: options.nonce ?? nonce,+ __dshBridgeReceive: (data: Record<string, unknown>) => messages.push(data),+ }+ window.top = options.topFrame === false ? {} : window+ const context = createVmContext({ window, location: { origin: options.origin ?? alpha.id } })+ for (const [script] of view.injectJavaScript.mock.calls)+ expect(runInContext(script, context, { timeout: 1000 })).toBe(true)+ return messages+}++class BrowserMessageEvent extends Event {+ readonly data: unknown+ readonly origin: string+ readonly source: unknown++ constructor(type: string, options: { data?: unknown, origin?: string, source?: unknown } = {}) {+ super(type)+ this.data = options.data+ this.origin = options.origin ?? ''+ this.source = options.source ?? null+ }+}++function createPage(selectSession?: (sessionId: string) => void, kind: 'app' | 'login' | 'unverified' = 'app') {+ const posts: string[] = []+ const events = new EventTarget()+ const documentEvents = new EventTarget()+ const window = {+ top: null as unknown,+ __DSH_BOOT__: kind === 'app' ? {} : undefined,+ __dshClientCtx: kind === 'app' ? { uiWorkspace: { openSession: selectSession } } : undefined,+ ReactNativeWebView: { postMessage: (raw: string) => posts.push(raw) },+ addEventListener: (type: string, listener: EventListener, options?: AddEventListenerOptions) => events.addEventListener(type, listener, options),+ removeEventListener: (type: string, listener: EventListener, options?: EventListenerOptions) => events.removeEventListener(type, listener, options),+ dispatchEvent: (event: Event) => events.dispatchEvent(event),+ }+ window.top = window+ pages.push(window)+ const styles = new Map<string, { id: string, textContent: string }>()+ const document = {+ hidden: false,+ readyState: 'complete',+ documentElement: { getAttribute: () => null },+ body: null,+ head: { appendChild: (style: { id: string, textContent: string }) => styles.set(style.id, style) },+ createElement: () => ({ id: '', textContent: '' }),+ getElementById: (id: string) => styles.get(id) ?? (kind === 'login' && id === 'loginForm' ? {} : null),+ querySelectorAll: () => [],+ addEventListener: (type: string, listener: EventListener, options?: AddEventListenerOptions) => documentEvents.addEventListener(type, listener, options),+ removeEventListener: (type: string, listener: EventListener, options?: EventListenerOptions) => documentEvents.removeEventListener(type, listener, options),+ dispatchEvent: (event: Event) => documentEvents.dispatchEvent(event),+ }+ class PageMutationObserver {+ observe = vi.fn()+ disconnect = vi.fn()+ }+ const context = createVmContext({ window, document, location: { origin: alpha.id }, MutationObserver: PageMutationObserver, Event, MessageEvent: BrowserMessageEvent, Date, setTimeout, clearTimeout })+ function run(script: string) {+ expect(runInContext(script, context, { timeout: 1000 })).toBe(true)+ }+ run(webView().props.injectedJavaScriptBeforeContentLoaded)+ return { posts, window, document, styles, run }+}++beforeEach(async () => {+ vi.resetModules()+ vi.resetAllMocks()+ vi.useFakeTimers()+ vi.setSystemTime(new Date('2026-01-01T00:00:00.000Z'))+ vi.stubGlobal('IS_REACT_ACT_ENVIRONMENT', true)+ const originalError = console.error.bind(console)+ vi.spyOn(console, 'error').mockImplementation((...args: unknown[]) => {+ if (args[0] === 'react-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer')+ return+ originalError(...args)+ })+ native.appState.currentState = 'active'+ native.platform.OS = 'android'+ native.appListeners.clear()+ native.backListeners.clear()+ native.navigation.isFocused.mockReturnValue(true)+ let sequence = 0+ native.randomUUID.mockImplementation(() => `webview-uuid-${++sequence}`)+ native.openURL.mockResolvedValue(undefined)+ native.getPermissionsAsync.mockResolvedValue({ granted: true })+ native.requestPermissionsAsync.mockResolvedValue({ granted: true })+ native.setNotificationChannelAsync.mockResolvedValue(null)+ native.scheduleNotificationAsync.mockResolvedValue('notification-id')+ screen = undefined+ store = await import('@/store/modules/connection')+ connection = store.connection+ resetConnection()+ runtime = await import('@/store/modules/connection/runtime')+ ;({ BridgeWebView } = await import('./webview'))+ hydrate()+ runtime.connectAddress(alpha)+})++afterEach(async () => {+ for (const page of pages.splice(0))+ page.dispatchEvent(new Event('pagehide'))+ await unmount()+ runtime.stopConnectionRuntime()+ await vi.advanceTimersByTimeAsync(0)+ expect(native.appListeners.size).toBe(0)+ expect(native.backListeners.size).toBe(0)+ expect(vi.getTimerCount()).toBe(0)+ vi.restoreAllMocks()+ vi.resetAllMocks()+ vi.unstubAllGlobals()+ vi.clearAllTimers()+ vi.useRealTimers()+})++describe('rendered Bridge WebView document lifecycle', () => {+ it.each(['android', 'ios'])('declares only the safe-area edges already padded natively on %s', async (platform) => {+ native.platform.OS = platform+ await mount()+ const edges = platform === 'ios' ? ['top'] : ['top', 'bottom']+ expect(root().find(node => String(node.type) === 'SafeAreaView').props.edges).toEqual(edges)+ const page = createPage()+ const style = page.styles.get('dsh-bridge-tap-highlight')+ expect(style?.textContent).toContain('--dsh-mobile-safe-area-inset-top: 0px;')+ if (platform === 'android')+ expect(style?.textContent).toContain('--dsh-mobile-safe-area-inset-bottom: 0px;')+ else+ expect(style?.textContent).not.toContain('--dsh-mobile-safe-area-inset-bottom')+ expect(style?.textContent).not.toMatch(/--dsh-mobile-safe-area-inset-(left|right)/)+ expect(style?.textContent).toContain('-webkit-tap-highlight-color: transparent;')+ const receive = Reflect.get(page.window, '__dshBridgeReceive')+ page.run(webView().props.injectedJavaScript)+ await act(async () => {+ webView().props.onLoad({ nativeEvent: { url: alpha.url } })+ })+ for (const [script] of (await viewRef()).injectJavaScript.mock.calls)+ page.run(script)+ expect(page.styles.size).toBe(1)+ expect(page.styles.get('dsh-bridge-tap-highlight')).toBe(style)+ expect(Reflect.get(page.window, '__dshBridgeReceive')).toBe(receive)+ })++ it('never records Android native finish followed by network error as a successful connection', async () => {+ await mount()+ const view = await viewRef()+ await act(async () => {+ webView().props.onLoad({ nativeEvent: { url: alpha.url } })+ })++ expect(view.injectJavaScript).toHaveBeenCalledExactlyOnceWith(webView().props.injectedJavaScript)+ expect(connection.loading).toBe(true)+ expect(texts()).toContain('连接中…')+ expect(connection.history).toEqual([])+ expect(connection.swipeHintVisible).toBe(false)+ expect(native.getPermissionsAsync).not.toHaveBeenCalled()+ await act(async () => {+ webView().props.onError({ nativeEvent: { code: -2, description: 'net::ERR_NAME_NOT_RESOLVED' } })+ })+ await ready()++ expect(connection.loading).toBe(false)+ expect(connection.loadError).toBe(failure)+ expect(connection.health['http://bridge.test:3080']).toBe('unavailable')+ expect(connection.history).toEqual([])+ expect(connection.guidedHosts).toEqual([])+ expect(texts()).toContain(failure)+ expect(texts()).not.toContain('连接中…')+ expect(texts()).not.toContain('向左滑查看连接信息')+ expect(native.getPermissionsAsync).not.toHaveBeenCalled()+ })++ it('accepts only a source-, origin-, channel- and nonce-authenticated ready envelope and records success once', async () => {+ await mount()+ for (const options of [+ { url: 'http://bridge.test:3081/tasks' },+ { url: 'https://bridge.test:3080/tasks' },+ { origin: 'http://bridge.test:3080/' },+ { origin: 'http://evil.test:3080' },+ { nonce: 'old-webview-nonce' },+ { channel: 'untrusted-channel' },+ ]) {+ await message({ type: 'dsh://bridge-ready' }, options)+ expect(connection.loading).toBe(true)+ expect(connection.history).toEqual([])+ expect(native.getPermissionsAsync).not.toHaveBeenCalled()+ }+ await ready()++ expect(connection.history).toEqual([{ ...alpha, lastConnectedAt: 1767225600000 }])+ expect(connection.loading).toBe(false)+ expect(connection.loadError).toBeNull()+ expect(texts()).toContain('向左滑查看连接信息')+ expect(texts()).not.toContain('连接中…')+ const hint = root().find(node => node.props.accessibilityLabel === '关闭滑动引导')+ await act(async () => {+ hint.props.onPress()+ await vi.advanceTimersByTimeAsync(20001)+ })+ await ready()++ expect(connection.history).toEqual([{ ...alpha, lastConnectedAt: 1767225600000 }])+ expect(connection.guidedHosts).toEqual(['http://bridge.test:3080'])+ expect(connection.swipeHintVisible).toBe(false)+ expect(connection.loadError).toBeNull()+ })++ it.each(['before', 'after'] as const)('shows the verified DSH login document when Android reports its HTTP 401 %s readiness', async (order) => {+ await mount()+ const page = createPage(undefined, 'login')+ expect(page.posts.map(raw => JSON.parse(raw))).toEqual([{+ channel: 'dsh-bridge',+ origin: 'http://bridge.test:3080',+ nonce: 'webview-uuid-1',+ payload: { type: 'dsh://bridge-ready' },+ }])+ async function unauthorized() {+ await act(async () => {+ webView().props.onHttpError({ nativeEvent: { url: alpha.url, statusCode: 401 } })+ })+ }+ if (order === 'before')+ await unauthorized()+ await rawMessage(page.posts[0]!)+ if (order === 'after')+ await unauthorized()+ await act(async () => {+ await vi.advanceTimersByTimeAsync(20000)+ })++ expect(connection.loadError).toBeNull()+ expect(connection.loading).toBe(false)+ expect(connection.history).toEqual([{ ...alpha, lastConnectedAt: 1767225600000 }])+ expect(connection.health['http://bridge.test:3080']).toBe('available')+ expect(texts()).not.toContain(failure)+ expect(texts()).not.toContain('连接中…')+ })++ it('does not accept an HTTP 401 document without a DSH login or application fingerprint', async () => {+ await mount()+ const page = createPage(undefined, 'unverified')+ await act(async () => {+ webView().props.onHttpError({ nativeEvent: { url: alpha.url, statusCode: 401 } })+ })+ expect(page.posts).toEqual([])+ expect(connection.loading).toBe(true)+ expect(connection.loadError).toBeNull()+ expect(connection.history).toEqual([])+ await act(async () => {+ await vi.advanceTimersByTimeAsync(20000)+ })++ expect(connection.loading).toBe(true)+ expect(connection.loadError).toBeNull()+ expect(connection.history).toEqual([])+ expect(texts()).toContain(slowLoading)+ expect(texts()).not.toContain(failure)+ expect(native.getPermissionsAsync).not.toHaveBeenCalled()+ })++ it('offers recovery for a later unverified HTTP 401 document without erasing earlier successful history', async () => {+ await mount()+ await ready()+ await act(async () => {+ connection.dismissHint()+ await vi.advanceTimersByTimeAsync(30000)+ webView().props.onLoadStart({ nativeEvent: { url: alpha.url, loading: true } })+ })+ const page = createPage(undefined, 'unverified')+ await act(async () => {+ webView().props.onHttpError({ nativeEvent: { url: alpha.url, statusCode: 401 } })+ await vi.advanceTimersByTimeAsync(19999)+ })+ expect(page.posts).toEqual([])+ expect(connection.loadError).toBeNull()+ expect(connection.history).toEqual([{ ...alpha, lastConnectedAt: 1767225600000 }])+ await act(async () => {+ await vi.advanceTimersByTimeAsync(1)+ })++ expect(connection.loading).toBe(false)+ expect(connection.loadError).toBeNull()+ expect(connection.history).toEqual([{ ...alpha, lastConnectedAt: 1767225600000 }])+ expect(texts()).toContain(slowLoading)+ expect(texts()).not.toContain(failure)+ expect(native.getPermissionsAsync).toHaveBeenCalledTimes(1)+ })++ it('accepts a later verified HTTP 401 login document without its reload deadline firing', async () => {+ await mount()+ await ready()+ await act(async () => {+ connection.dismissHint()+ await vi.advanceTimersByTimeAsync(30000)+ webView().props.onLoadStart({ nativeEvent: { url: alpha.url, loading: true } })+ })+ const page = createPage(undefined, 'login')+ await act(async () => {+ webView().props.onHttpError({ nativeEvent: { url: alpha.url, statusCode: 401 } })+ await vi.advanceTimersByTimeAsync(19999)+ })+ await rawMessage(page.posts[0]!)+ await act(async () => {+ await vi.advanceTimersByTimeAsync(20000)+ })++ expect(connection.loading).toBe(false)+ expect(connection.loadError).toBeNull()+ expect(connection.history).toEqual([{ ...alpha, lastConnectedAt: 1767225600000 }])+ expect(texts()).not.toContain(failure)+ expect(texts()).not.toContain('连接中…')+ expect(connection.swipeHintVisible).toBe(false)+ })++ it('recognizes a verified document on Android finish reinjection after the early shim saw no fingerprint', async () => {+ await mount()+ const page = createPage(undefined, 'unverified')+ const view = await viewRef()+ expect(page.posts).toEqual([])+ page.window.__DSH_BOOT__ = {}+ await act(async () => {+ webView().props.onLoad({ nativeEvent: { url: alpha.url } })+ })+ for (const [script] of view.injectJavaScript.mock.calls)+ page.run(script)+ expect(page.posts.map(raw => JSON.parse(raw))).toEqual([{+ channel: 'dsh-bridge',+ origin: 'http://bridge.test:3080',+ nonce: 'webview-uuid-1',+ payload: { type: 'dsh://bridge-ready' },+ }])+ await rawMessage(page.posts[0]!)+ await act(async () => {+ await vi.advanceTimersByTimeAsync(20000)+ })++ expect(connection.loading).toBe(false)+ expect(connection.loadError).toBeNull()+ expect(connection.history).toEqual([{ ...alpha, lastConnectedAt: 1767225600000 }])+ expect(texts()).not.toContain(failure)+ })++ it('gives a new trusted document its own full deadline while the previous document is not ready', async () => {+ await mount()+ await act(async () => {+ await vi.advanceTimersByTimeAsync(19000)+ webView().props.onLoadStart({ nativeEvent: { url: 'http://bridge.test:3080/login', loading: true } })+ })+ await act(async () => {+ await vi.advanceTimersByTimeAsync(1000)+ })+ expect(connection.loadError).toBeNull()+ expect(connection.loading).toBe(true)+ await act(async () => {+ await vi.advanceTimersByTimeAsync(18999)+ })+ expect(connection.loadError).toBeNull()+ await act(async () => {+ await vi.advanceTimersByTimeAsync(1)+ })++ expect(connection.loadError).toBeNull()+ expect(connection.loading).toBe(true)+ expect(connection.history).toEqual([])+ expect(texts()).toContain(slowLoading)+ expect(texts()).not.toContain(failure)+ })++ it('restarts the slow-page prompt when a new trusted document replaces a timed-out document', async () => {+ await mount()+ await act(async () => {+ await vi.advanceTimersByTimeAsync(20000)+ })+ expect(texts()).toContain(slowLoading)+ await act(async () => {+ webView().props.onLoadStart({ nativeEvent: { url: 'http://bridge.test:3080/login', loading: true } })+ })+ expect(texts()).not.toContain(slowLoading)+ expect(texts()).toContain('连接中…')+ await act(async () => {+ await vi.advanceTimersByTimeAsync(19999)+ })+ expect(texts()).not.toContain(slowLoading)+ await act(async () => {+ await vi.advanceTimersByTimeAsync(1)+ })+ expect(texts()).toContain(slowLoading)+ expect(connection.loadError).toBeNull()+ expect(connection.history).toEqual([])+ })++ it('accepts the verified replacement document after the previous document deadline has elapsed', async () => {+ await mount()+ await act(async () => {+ await vi.advanceTimersByTimeAsync(19000)+ webView().props.onLoadStart({ nativeEvent: { url: 'http://bridge.test:3080/login', loading: true } })+ })+ const page = createPage(undefined, 'login')+ await act(async () => {+ await vi.advanceTimersByTimeAsync(2000)+ })+ await rawMessage(page.posts[0]!, 'http://bridge.test:3080/login')+ await act(async () => {+ await vi.advanceTimersByTimeAsync(20000)+ })++ expect(connection.loadError).toBeNull()+ expect(connection.loading).toBe(false)+ expect(connection.history).toEqual([{ ...alpha, lastConnectedAt: 1767225621000 }])+ expect(texts()).not.toContain(failure)+ })++ it('keeps the one-shot ready document verified across Android same-document history and hash callbacks', async () => {+ connection.queueFocus(focus)+ await mount()+ const page = createPage()+ await rawMessage(page.posts[0]!)+ const view = await viewRef()+ view.injectJavaScript.mockClear()+ await act(async () => {+ connection.dismissHint()+ webView().props.onLoadStart({ nativeEvent: { url: 'http://bridge.test:3080/tasks?session=alpha', loading: false } })+ webView().props.onLoadStart({ nativeEvent: { url: 'http://bridge.test:3080/tasks?session=alpha#latest', loading: false } })+ })+ expect(view.injectJavaScript).not.toHaveBeenCalled()+ expect(connection.pendingFocus).toEqual(focus)+ page.run(webView().props.injectedJavaScript)+ expect(page.posts).toHaveLength(1)+ await act(async () => {+ await vi.advanceTimersByTimeAsync(20000)+ })++ expect(connection.loadError).toBeNull()+ expect(connection.loading).toBe(false)+ expect(connection.history).toEqual([{ ...alpha, lastConnectedAt: 1767225600000 }])+ expect(connection.swipeHintVisible).toBe(false)+ expect(texts()).not.toContain(failure)+ await message({ type: 'dsh://focus-result', requestId: 'webview-uuid-2', handled: true }, { url: 'http://bridge.test:3080/tasks?session=alpha#latest' })+ expect(connection.pendingFocus).toBeNull()+ })++ it('offers recovery for a native-finished but unauthenticated document at exactly twenty seconds', async () => {+ await mount()+ await act(async () => {+ webView().props.onLoad({ nativeEvent: { url: alpha.url } })+ await vi.advanceTimersByTimeAsync(19999)+ })+ expect(connection.loading).toBe(true)+ expect(texts()).toContain('连接中…')+ expect(texts()).not.toContain(failure)+ await act(async () => {+ await vi.advanceTimersByTimeAsync(1)+ })++ expect(connection.loading).toBe(true)+ expect(connection.loadError).toBeNull()+ expect(connection.history).toEqual([])+ expect(texts()).toContain(slowLoading)+ expect(texts()).not.toContain(failure)+ expect(root().findAll(node => node.props.accessibilityRole === 'progressbar')).toHaveLength(0)+ expect(root().findAll(node => String(node.type) === 'Button').map(text)).toContain('重新连接')+ expect(native.getPermissionsAsync).not.toHaveBeenCalled()+ })++ it.each(['app', 'login'] as const)('accepts a verified %s document that becomes ready after the twenty-second deadline', async (kind) => {+ await mount()+ const view = await viewRef()+ await act(async () => {+ await vi.advanceTimersByTimeAsync(35000)+ })+ expect(texts()).toContain(slowLoading)+ expect(connection.history).toEqual([])+ expect(native.getPermissionsAsync).not.toHaveBeenCalled()+ for (const options of [{ url: 'https://foreign.test/' }, { nonce: 'stale-nonce' }])+ await message({ type: 'dsh://bridge-ready' }, options)+ expect(texts()).toContain(slowLoading)+ expect(connection.history).toEqual([])+ const page = createPage(undefined, kind)+ await rawMessage(page.posts[0]!)++ expect(connection.loadError).toBeNull()+ expect(connection.loading).toBe(false)+ expect(connection.history).toEqual([{ ...alpha, lastConnectedAt: 1767225635000 }])+ expect(connection.health[alpha.id]).toBe('available')+ expect(texts()).not.toContain(failure)+ expect(texts()).not.toContain(slowLoading)+ expect(native.getPermissionsAsync).toHaveBeenCalledTimes(1)+ expect(await viewRef()).toBe(view)+ await ready()+ expect(connection.history).toEqual([{ ...alpha, lastConnectedAt: 1767225635000 }])+ })++ it.each(['onError', 'onHttpError', 'onRenderProcessGone', 'onContentProcessDidTerminate'])('rejects late authenticated readiness when native %s reports a real error after the deadline', async (callback) => {+ await mount()+ await act(async () => {+ await vi.advanceTimersByTimeAsync(20001)+ webView().props[callback]({ nativeEvent: { url: alpha.url, code: -6, statusCode: 500, didCrash: true } })+ })+ const page = createPage()+ await rawMessage(page.posts[0]!)++ expect(connection.loadError).toBe(failure)+ expect(connection.loading).toBe(false)+ expect(connection.history).toEqual([])+ expect(connection.health[alpha.id]).toBe('unavailable')+ expect(texts()).toContain(failure)+ expect(texts()).not.toContain(slowLoading)+ expect(native.getPermissionsAsync).not.toHaveBeenCalled()+ })++ it('ignores all retained lifecycle and message callbacks from a replaced WebView generation', async () => {+ await mount()+ const stale = webView().props+ const oldView = await viewRef()+ const newerFocus = { ...focus, origin: 'https://second.test', sessionId: 'session-new' }+ await act(async () => {+ runtime.connectAddress(beta)+ connection.queueFocus(newerFocus)+ screen!.update(createElement(BridgeWebView, { key: connection.viewGeneration, address: beta, generation: connection.viewGeneration }))+ })+ await act(async () => {+ for (const payload of [+ { type: 'dsh://bridge-ready' },+ { type: 'dsh://focus-result', requestId: 'webview-uuid-2', handled: true },+ { type: 'dsh://native-notification', title: 'Stale answer', body: 'Old document', tag: 'old', sessionId: 'old' },+ ]) {+ stale.onMessage({ nativeEvent: { url: alpha.url, data: JSON.stringify({ channel: 'dsh-bridge', origin: alpha.id, nonce, payload }) } })+ }+ stale.onLoad({ nativeEvent: { url: alpha.url } })+ stale.onError({ nativeEvent: { code: -2 } })+ stale.onHttpError({ nativeEvent: { url: alpha.url, statusCode: 500 } })+ stale.onRenderProcessGone({ nativeEvent: { didCrash: true } })+ stale.onContentProcessDidTerminate({ nativeEvent: { url: alpha.url } })+ })++ expect(await viewRef()).not.toBe(oldView)+ expect(webView().props.source).toEqual({ uri: 'https://second.test/workspaces' })+ expect(connection.current).toEqual(beta)+ expect(connection.loading).toBe(true)+ expect(connection.loadError).toBeNull()+ expect(connection.history).toEqual([])+ expect(connection.pendingFocus).toEqual(newerFocus)+ expect(connection.notice).toBeNull()+ expect(native.getPermissionsAsync).not.toHaveBeenCalled()+ expect(native.scheduleNotificationAsync).not.toHaveBeenCalled()+ })++ it('keeps earlier success history but rejects late ready and focus acknowledgment after a document error', async () => {+ connection.queueFocus(focus)+ await mount()+ await ready()+ const view = await viewRef()+ await act(async () => {+ webView().props.onError({ nativeEvent: { code: -6, description: 'net::ERR_CONNECTION_REFUSED' } })+ })+ const cancelled = injectedMessages(view)+ expect(cancelled).toContainEqual({ type: 'dsh://cancel-focus', requestId: 'webview-uuid-2', nonce: 'webview-uuid-1' })+ view.injectJavaScript.mockClear()+ await ready()+ await message({ type: 'dsh://focus-result', requestId: 'webview-uuid-2', handled: true })+ await changeAppState('background')+ await changeAppState('active')++ expect(connection.history).toEqual([{ ...alpha, lastConnectedAt: 1767225600000 }])+ expect(connection.loadError).toBe(failure)+ expect(connection.pendingFocus).toEqual(focus)+ expect(connection.swipeHintVisible).toBe(false)+ expect(view.injectJavaScript).not.toHaveBeenCalled()+ expect(texts()).toContain(failure)+ expect(texts()).not.toContain('向左滑查看连接信息')+ })++ it('fails only HTTP errors for the tracked main document, not successful statuses or unrelated resources', async () => {+ await mount()+ await act(async () => {+ expect(webView().props.onShouldStartLoadWithRequest({ url: 'http://bridge.test:3080/sessions?selected=alpha' })).toBe(true)+ for (const nativeEvent of [+ { url: alpha.url, statusCode: 500 },+ { url: 'http://bridge.test:3080/assets/missing.js', statusCode: 404 },+ { url: 'http://foreign.test/error', statusCode: 503 },+ { url: 'http://bridge.test:3080/sessions?selected=alpha', statusCode: 399 },+ ])+ webView().props.onHttpError({ nativeEvent })+ })+ expect(connection.loading).toBe(true)+ expect(connection.loadError).toBeNull()+ await act(async () => {+ webView().props.onNavigationStateChange({ url: 'http://bridge.test:3080/login', canGoBack: true })+ webView().props.onHttpError({ nativeEvent: { url: 'http://bridge.test:3080/sessions?selected=alpha', statusCode: 500 } })+ })+ expect(connection.loadError).toBeNull()+ await act(async () => {+ webView().props.onHttpError({ nativeEvent: { url: 'http://bridge.test:3080/login', statusCode: 400 } })+ })++ expect(connection.loadError).toBe(failure)+ expect(connection.history).toEqual([])+ expect(texts()).toContain(failure)+ })++ it.each(['onRenderProcessGone', 'onContentProcessDidTerminate'])('shows a recoverable failure when native %s terminates the document', async (callback) => {+ await mount()+ await act(async () => {+ webView().props[callback]({ nativeEvent: { didCrash: true, url: alpha.url } })+ })++ expect(connection.loading).toBe(false)+ expect(connection.loadError).toBe(failure)+ expect(connection.health['http://bridge.test:3080']).toBe('unavailable')+ expect(connection.history).toEqual([])+ expect(texts()).toContain(failure)+ expect(root().findAll(node => String(node.type) === 'Button').map(text)).toContain('重新连接')+ })+})++describe('rendered Bridge WebView verified native notification boundary', () => {+ const notification = { type: 'dsh://native-notification', title: '完成', body: '轮次已完成', sessionId: 'alpha', tag: 'dsh-notification-alpha-1', silent: false }++ it('does not schedule a same-origin notification before document readiness', async () => {+ native.appState.currentState = 'background'+ await mount()+ await message(notification)+ expect(native.scheduleNotificationAsync).not.toHaveBeenCalled()+ expect(native.getPermissionsAsync).not.toHaveBeenCalled()+ })++ it('does not schedule a late completion after a document fails', async () => {+ native.appState.currentState = 'background'+ await mount()+ await ready()+ await act(async () => {+ webView().props.onError({ nativeEvent: { code: -6 } })+ })+ await message(notification)+ expect(connection.loadError).toBe(failure)+ expect(native.scheduleNotificationAsync).not.toHaveBeenCalled()+ expect(native.getPermissionsAsync).not.toHaveBeenCalled()+ })++ it('delivers one verified background notification while rejecting foreign sources and stale nonces', async () => {+ native.appState.currentState = 'background'+ await mount()+ await ready()+ await message(notification, { nonce: 'stale-nonce' })+ await message(notification, { url: 'https://foreign.test/tasks' })+ expect(native.scheduleNotificationAsync).not.toHaveBeenCalled()+ await message(notification)+ expect(native.scheduleNotificationAsync).toHaveBeenCalledOnce()+ expect(native.scheduleNotificationAsync.mock.calls[0]?.[0]).toMatchObject({+ content: { title: '完成', body: '轮次已完成', data: { origin: 'http://bridge.test:3080', sessionId: 'alpha', tag: 'dsh-notification-alpha-1' } },+ trigger: { channelId: 'dsh-bridge' },+ })+ })+})++describe('rendered Bridge WebView foreground notification authorization', () => {+ it('requests native permission when a document first becomes active after background readiness', async () => {+ native.appState.currentState = 'background'+ native.getPermissionsAsync.mockResolvedValue({ granted: false })+ await mount()+ await ready()+ expect(native.getPermissionsAsync).not.toHaveBeenCalled()+ expect(native.requestPermissionsAsync).not.toHaveBeenCalled()+ await changeAppState('active')++ expect(native.setNotificationChannelAsync.mock.calls.map(call => call[0])).toEqual(['dsh-bridge', 'dsh-bridge-silent'])+ expect(native.getPermissionsAsync).toHaveBeenCalledExactlyOnceWith()+ expect(native.requestPermissionsAsync).toHaveBeenCalledExactlyOnceWith()+ const calls = [...native.setNotificationChannelAsync.mock.invocationCallOrder, ...native.getPermissionsAsync.mock.invocationCallOrder, ...native.requestPermissionsAsync.mock.invocationCallOrder]+ expect(calls).toEqual([...calls].sort((a, b) => a - b))+ })+})++describe('rendered Bridge WebView acknowledged notification focus', () => {+ it('keeps preexisting focus pending until the real injected page selects it and returns an authenticated matching acknowledgment', async () => {+ connection.queueFocus(focus)+ connection.setDrawerOpen(true)+ await mount()+ const view = await viewRef()+ expect(view.injectJavaScript).not.toHaveBeenCalled()+ const selectSession = vi.fn<(sessionId: string) => void>()+ const page = createPage(selectSession)+ expect(JSON.parse(page.posts[0]!)).toEqual({ channel: 'dsh-bridge', origin: 'http://bridge.test:3080', nonce: 'webview-uuid-1', payload: { type: 'dsh://bridge-ready' } })+ await rawMessage(page.posts[0]!)++ expect(connection.pendingFocus).toEqual(focus)+ expect(connection.drawerOpen).toBe(false)+ expect(injectedMessages(view)).toEqual([+ { type: 'dsh://visibility-state', hidden: false, nonce: 'webview-uuid-1' },+ { type: 'dsh://focus-session', requestId: 'webview-uuid-2', sessionId: 'session-alpha', title: 'Answer complete', tag: 'tag-alpha', nonce: 'webview-uuid-1' },+ ])+ expect(injectedMessages(view, { origin: 'http://evil.test:3080' })).toEqual([])+ expect(injectedMessages(view, { nonce: 'old-view-nonce' })).toEqual([])+ expect(injectedMessages(view, { topFrame: false })).toEqual([])+ for (const [script] of view.injectJavaScript.mock.calls)+ page.run(script)+ expect(selectSession).toHaveBeenCalledExactlyOnceWith('session-alpha')+ expect(connection.pendingFocus).toEqual(focus)+ expect(JSON.parse(page.posts[1]!)).toEqual({ channel: 'dsh-bridge', origin: 'http://bridge.test:3080', nonce: 'webview-uuid-1', payload: { type: 'dsh://focus-result', requestId: 'webview-uuid-2', handled: true } })+ for (const options of [{ nonce: 'wrong-nonce' }, { origin: 'https://second.test' }, { url: 'http://bridge.test:3081/tasks' }]) {+ await message({ type: 'dsh://focus-result', requestId: 'webview-uuid-2', handled: true }, options)+ expect(connection.pendingFocus).toEqual(focus)+ }+ await rawMessage(page.posts[1]!)++ expect(connection.pendingFocus).toBeNull()+ expect(connection.notice).toBeNull()+ expect(injectedMessages(view)).toContainEqual({ type: 'dsh://cancel-focus', requestId: 'webview-uuid-2', nonce: 'webview-uuid-1' })+ })++ it('shows a visible manual-selection notice when the real page exhausts its fifteen-second focus budget', async () => {+ connection.queueFocus(focus)+ await mount()+ const view = await viewRef()+ const page = createPage()+ await rawMessage(page.posts[0]!)+ for (const [script] of view.injectJavaScript.mock.calls)+ page.run(script)+ await act(async () => {+ await vi.advanceTimersByTimeAsync(14999)+ })+ expect(connection.pendingFocus).toEqual(focus)+ expect(connection.notice).toBeNull()+ expect(page.posts).toHaveLength(1)+ await act(async () => {+ await vi.advanceTimersByTimeAsync(1)+ })+ expect(JSON.parse(page.posts[1]!)).toEqual({ channel: 'dsh-bridge', origin: 'http://bridge.test:3080', nonce: 'webview-uuid-1', payload: { type: 'dsh://focus-result', requestId: 'webview-uuid-2', handled: false } })+ await rawMessage(page.posts[1]!)++ expect(connection.pendingFocus).toBeNull()+ expect(connection.notice).toBe(focusFailure)+ expect(texts()).toContain(focusFailure)+ })++ it('cancels superseded focus and cannot clear a newer pending session with an old or wrong request acknowledgment', async () => {+ connection.queueFocus(focus)+ await mount()+ await ready()+ const view = await viewRef()+ const newerFocus = { ...focus, sessionId: 'session-new', title: 'New answer', tag: 'tag-new' }+ await act(async () => {+ connection.queueFocus(newerFocus)+ webView().props.onMessage({ nativeEvent: { url: alpha.url, data: JSON.stringify({ channel: 'dsh-bridge', origin: alpha.id, nonce, payload: { type: 'dsh://focus-result', requestId: 'webview-uuid-2', handled: false } }) } })+ })+ expect(connection.pendingFocus).toEqual(newerFocus)+ expect(connection.notice).toBeNull()+ expect(injectedMessages(view)).toContainEqual({ type: 'dsh://cancel-focus', requestId: 'webview-uuid-2', nonce: 'webview-uuid-1' })+ expect(injectedMessages(view)).toContainEqual({ type: 'dsh://focus-session', requestId: 'webview-uuid-3', sessionId: 'session-new', title: 'New answer', tag: 'tag-new', nonce: 'webview-uuid-1' })+ for (const requestId of ['webview-uuid-2', 'unknown-request']) {+ await message({ type: 'dsh://focus-result', requestId, handled: false })+ expect(connection.pendingFocus).toEqual(newerFocus)+ expect(connection.notice).toBeNull()+ }+ await message({ type: 'dsh://focus-result', requestId: 'webview-uuid-3', handled: true })++ expect(connection.pendingFocus).toBeNull()+ expect(connection.notice).toBeNull()+ })++ it('assigns a fresh request when identical focus metadata is requeued so its earlier acknowledgment cannot clear the retry', async () => {+ connection.queueFocus(focus)+ await mount()+ await ready()+ const view = await viewRef()+ await act(async () => {+ connection.queueFocus({ ...focus })+ })+ expect(injectedMessages(view)).toContainEqual({ type: 'dsh://cancel-focus', requestId: 'webview-uuid-2', nonce: 'webview-uuid-1' })+ expect(injectedMessages(view)).toContainEqual({ type: 'dsh://focus-session', requestId: 'webview-uuid-3', sessionId: 'session-alpha', title: 'Answer complete', tag: 'tag-alpha', nonce: 'webview-uuid-1' })+ await message({ type: 'dsh://focus-result', requestId: 'webview-uuid-2', handled: true })+ expect(connection.pendingFocus).toEqual(focus)+ await message({ type: 'dsh://focus-result', requestId: 'webview-uuid-3', handled: true })++ expect(connection.pendingFocus).toBeNull()+ })++ it('defers initial focus until authenticated foreground visibility and cancels/requeues it across background transitions', async () => {+ native.appState.currentState = 'background'+ connection.queueFocus(focus)+ await mount()+ const view = await viewRef()+ await changeAppState('active')+ expect(view.injectJavaScript).not.toHaveBeenCalled()+ await changeAppState('background')+ await ready()+ expect(injectedMessages(view)).toEqual([{ type: 'dsh://visibility-state', hidden: true, nonce: 'webview-uuid-1' }])+ expect(connection.pendingFocus).toEqual(focus)+ expect(native.getPermissionsAsync).not.toHaveBeenCalled()+ await changeAppState('active')+ expect(injectedMessages(view)).toContainEqual({ type: 'dsh://focus-session', requestId: 'webview-uuid-2', sessionId: 'session-alpha', title: 'Answer complete', tag: 'tag-alpha', nonce: 'webview-uuid-1' })+ await changeAppState('inactive')+ expect(injectedMessages(view)).toContainEqual({ type: 'dsh://cancel-focus', requestId: 'webview-uuid-2', nonce: 'webview-uuid-1' })+ await message({ type: 'dsh://focus-result', requestId: 'webview-uuid-2', handled: true })+ expect(connection.pendingFocus).toEqual(focus)+ await changeAppState('active')+ const messages = injectedMessages(view)+ expect(messages.filter(message => message.type === 'dsh://visibility-state')).toEqual([+ { type: 'dsh://visibility-state', hidden: true, nonce: 'webview-uuid-1' },+ { type: 'dsh://visibility-state', hidden: false, nonce: 'webview-uuid-1' },+ { type: 'dsh://visibility-state', hidden: true, nonce: 'webview-uuid-1' },+ { type: 'dsh://visibility-state', hidden: false, nonce: 'webview-uuid-1' },+ ])+ expect(messages.at(-1)).toEqual({ type: 'dsh://focus-session', requestId: 'webview-uuid-3', sessionId: 'session-alpha', title: 'Answer complete', tag: 'tag-alpha', nonce: 'webview-uuid-1' })+ expect(connection.pendingFocus).toEqual(focus)+ })++ it('resynchronizes background visibility when a trusted document reloads without an AppState change', async () => {+ native.appState.currentState = 'background'+ await mount()+ await ready()+ const view = await viewRef()+ view.injectJavaScript.mockClear()+ await act(async () => {+ webView().props.onLoadStart({ nativeEvent: { url: alpha.url, loading: true } })+ })+ await ready()++ expect(injectedMessages(view)).toEqual([{ type: 'dsh://visibility-state', hidden: true, nonce: 'webview-uuid-1' }])+ expect(connection.history).toEqual([{ ...alpha, lastConnectedAt: 1767225600000 }])+ expect(native.getPermissionsAsync).not.toHaveBeenCalled()+ })++ it('cancels focus across login navigation and retries only after the new document is ready', async () => {+ connection.queueFocus(focus)+ await mount()+ await ready()+ const view = await viewRef()+ view.injectJavaScript.mockClear()+ await act(async () => {+ webView().props.onLoadStart({ nativeEvent: { url: 'http://bridge.test:3080/tasks', loading: true } })+ webView().props.onMessage({ nativeEvent: { url: alpha.url, data: JSON.stringify({ channel: 'dsh-bridge', origin: alpha.id, nonce, payload: { type: 'dsh://focus-result', requestId: 'webview-uuid-2', handled: true } }) } })+ })+ expect(connection.pendingFocus).toEqual(focus)+ expect(injectedMessages(view)).toEqual([{ type: 'dsh://cancel-focus', requestId: 'webview-uuid-2', nonce: 'webview-uuid-1' }])+ await ready()+ expect(injectedMessages(view)).toContainEqual({ type: 'dsh://visibility-state', hidden: false, nonce: 'webview-uuid-1' })+ expect(injectedMessages(view)).toContainEqual({ type: 'dsh://focus-session', requestId: 'webview-uuid-3', sessionId: 'session-alpha', title: 'Answer complete', tag: 'tag-alpha', nonce: 'webview-uuid-1' })+ await message({ type: 'dsh://focus-result', requestId: 'webview-uuid-2', handled: false })+ expect(connection.pendingFocus).toEqual(focus)+ await message({ type: 'dsh://focus-result', requestId: 'webview-uuid-3', handled: true })+ expect(connection.pendingFocus).toBeNull()+ })++ it('does not send another origin pending focus into the ready page or close its open drawer', async () => {+ const foreignFocus = { ...focus, origin: 'https://second.test' }+ connection.queueFocus(foreignFocus)+ connection.setDrawerOpen(true)+ await mount()+ await ready()++ expect(injectedMessages(await viewRef())).toEqual([{ type: 'dsh://visibility-state', hidden: false, nonce: 'webview-uuid-1' }])+ expect(connection.pendingFocus).toEqual(foreignFocus)+ expect(connection.drawerOpen).toBe(true)+ })+})++describe('rendered Bridge WebView native navigation and resource boundaries', () => {+ it('treats missing Android isTopFrame as top-level and permits only exact-origin documents inside the WebView', async () => {+ await mount()+ await act(async () => {+ expect(webView().props.onShouldStartLoadWithRequest({ url: 'http://bridge.test:3080/session?id=alpha' })).toBe(true)+ expect(webView().props.onShouldStartLoadWithRequest({ url: 'about:blank' })).toBe(true)+ expect(webView().props.onShouldStartLoadWithRequest({ url: 'https://foreign.test/embedded', isTopFrame: false })).toBe(true)+ for (const url of ['http://bridge.test:3081/tasks', 'https://bridge.test:3080/tasks', 'http://bridge.test.evil/tasks'])+ expect(webView().props.onShouldStartLoadWithRequest({ url })).toBe(false)+ })++ expect(native.openURL.mock.calls).toEqual([+ ['http://bridge.test:3081/tasks'],+ ['https://bridge.test:3080/tasks'],+ ['http://bridge.test.evil/tasks'],+ ])+ const view = await viewRef()+ await act(async () => {+ webView().props.onLoad({ nativeEvent: { url: 'https://foreign.test/embedded' } })+ })+ expect(view.injectJavaScript).not.toHaveBeenCalled()+ expect(webView().props).toMatchObject({+ allowFileAccess: false,+ allowFileAccessFromFileURLs: false,+ allowUniversalAccessFromFileURLs: false,+ mixedContentMode: 'never',+ thirdPartyCookiesEnabled: false,+ injectedJavaScriptForMainFrameOnly: true,+ injectedJavaScriptBeforeContentLoadedForMainFrameOnly: true,+ })+ })++ it('opens only safe HTTP popup URLs externally and surfaces native Linking failures without executing custom schemes', async () => {+ await mount()+ await act(async () => {+ for (const targetUrl of ['javascript:alert(1)', 'file:///private/data', 'mailto:[email protected]', 'https://user:[email protected]/'])+ webView().props.onOpenWindow({ nativeEvent: { targetUrl } })+ webView().props.onOpenWindow({ nativeEvent: { targetUrl: 'https://external.test/help?q=bridge' } })+ })+ expect(native.openURL).toHaveBeenCalledExactlyOnceWith('https://external.test/help?q=bridge')+ expect(connection.notice).toBeNull()+ native.openURL.mockRejectedValueOnce(new Error('Native browser unavailable'))+ await act(async () => {+ webView().props.onOpenWindow({ nativeEvent: { targetUrl: 'http://external.test/unavailable' } })+ })++ expect(native.openURL).toHaveBeenLastCalledWith('http://external.test/unavailable')+ expect(connection.notice).toBe(failure)+ expect(connection.loadError).toBeNull()+ expect(connection.history).toEqual([])+ })++ it('applies only authenticated page theme updates from the current verified document without remounting WebView', async () => {+ await mount()+ const view = await viewRef()+ await message({ type: 'dsh://theme-state', theme: 'light' })+ expect(native.setTheme).not.toHaveBeenCalled()+ await ready()+ for (const options of [+ { nonce: 'wrong' },+ { origin: 'http://foreign.test:3080' },+ { url: 'http://foreign.test:3080/' },+ { channel: 'other' },+ ]) {+ await message({ type: 'dsh://theme-state', theme: 'dark' }, options)+ }+ await message({ type: 'dsh://theme-state', theme: 'sepia' })+ expect(native.setTheme).not.toHaveBeenCalled()+ for (const theme of ['light', 'dark', 'system'])+ await message({ type: 'dsh://theme-state', theme })+ expect(native.setTheme.mock.calls).toEqual([['light'], ['dark'], ['system']])+ expect(await viewRef()).toBe(view)+ expect(native.scheduleNotificationAsync).not.toHaveBeenCalled()+ await act(async () => {+ webView().props.onLoadStart({ nativeEvent: { url: alpha.url, loading: true } })+ })+ await message({ type: 'dsh://theme-state', theme: 'light' })+ expect(native.setTheme).toHaveBeenCalledTimes(3)+ await ready()+ await act(async () => {+ webView().props.onError({ nativeEvent: { code: -2 } })+ })+ await message({ type: 'dsh://theme-state', theme: 'light' })+ expect(native.setTheme).toHaveBeenCalledTimes(3)+ })++ it('accepts the initial theme sent immediately after readiness before React commits state', async () => {+ await mount()+ await act(async () => {+ const receive = webView().props.onMessage+ for (const payload of [{ type: 'dsh://bridge-ready' }, { type: 'dsh://theme-state', theme: 'light' }]) {+ receive({ nativeEvent: {+ url: alpha.url,+ data: JSON.stringify({ channel: 'dsh-bridge', origin: alpha.id, nonce, payload }),+ } })+ }+ })+ expect(native.setTheme).toHaveBeenCalledExactlyOnceWith('light')+ })++ it('ignores theme messages from a replaced WebView generation', async () => {+ await mount()+ await ready()+ await act(async () => {+ connection.accept({ id: 'http://second.test:3080', url: 'http://second.test:3080', host: 'second.test', port: 3080 })+ })+ await message({ type: 'dsh://theme-state', theme: 'dark' })+ expect(native.setTheme).not.toHaveBeenCalled()+ })++ it('gives scanner focus and an open drawer first refusal before consuming Android back for WebView history', async () => {+ await mount()+ const view = await viewRef()+ expect(native.backListeners.size).toBe(1)+ const handler = [...native.backListeners][0]!+ expect(handler()).toBe(false)+ await act(async () => {+ webView().props.onNavigationStateChange({ url: alpha.url, canGoBack: true })+ })+ native.navigation.isFocused.mockReturnValue(false)+ expect(handler()).toBe(false)+ native.navigation.isFocused.mockReturnValue(true)+ await act(async () => {+ connection.setDrawerOpen(true)+ })+ expect(handler()).toBe(false)+ expect(view.goBack).not.toHaveBeenCalled()+ await act(async () => {+ connection.setDrawerOpen(false)+ })+ expect(handler()).toBe(true)+ expect(view.goBack).toHaveBeenCalledExactlyOnceWith()+ await act(async () => {+ webView().props.onNavigationStateChange({ url: alpha.url, canGoBack: false })+ })+ expect(handler()).toBe(false)+ })++ it('disposes native listeners, loader animations and the loading deadline so unmount cannot fail a later store state', async () => {+ await mount()+ const view = await viewRef()+ expect(native.appListeners.size).toBe(1)+ expect(native.backListeners.size).toBe(1)+ expect(vi.getTimerCount()).toBe(1)+ await unmount()++ expect(native.appListeners.size).toBe(0)+ expect(native.backListeners.size).toBe(0)+ expect(native.cancelAnimation).toHaveBeenCalledTimes(3)+ expect(vi.getTimerCount()).toBe(0)+ connection.queueFocus(focus)+ await changeAppState('background')+ await act(async () => {+ await vi.advanceTimersByTimeAsync(20001)+ })+ expect(connection.loading).toBe(true)+ expect(connection.loadError).toBeNull()+ expect(connection.history).toEqual([])+ expect(connection.pendingFocus).toEqual(focus)+ expect(view.injectJavaScript).not.toHaveBeenCalled()+ expect(native.getPermissionsAsync).not.toHaveBeenCalled()+ expect(native.scheduleNotificationAsync).not.toHaveBeenCalled()+ })+})diff --git a/src-native/ui/webview.tsx b/src-native/ui/webview.tsxnew file mode 100644index 00000000..d28444dd--- /dev/null+++ b/src-native/ui/webview.tsx@@ -0,0 +1,273 @@+import type { Edge } from 'react-native-safe-area-context'+import type { ShouldStartLoadRequest, WebViewMessageEvent } from 'react-native-webview/lib/WebViewTypes'+import type { NotificationFocus } from '@/store/modules/connection'+import type { BridgeAddress } from '@/utils/bridge-protocol'+import { useWhenever } from '@reause/core'+import { randomUUID } from 'expo-crypto'+import { useNavigation } from 'expo-router'+import { Button } from 'heroui-native/button'+import { useThemeColor } from 'heroui-native/hooks'+import { useEffect, useRef, useState } from 'react'+import { useTranslation } from 'react-i18next'+import { If, Then } from 'react-if-lite'+import { BackHandler, Linking, Modal, Platform, Pressable, Text, View } from 'react-native'+import { ArrowLeft, Hand } from 'react-native-lucide'+import { SafeAreaView } from 'react-native-safe-area-context'+import { WebView } from 'react-native-webview'+import { Uniwind } from 'uniwind'+import { useStore } from 'valtio-define'+import { BreathingLight } from '@/components/breathing-light'+import { Logo, Wordmark } from '@/components/icons'+import { WEBVIEW_LOAD_TIMEOUT_MS } from '@/config/constants'+import { useAppState } from '@/hooks/use-app-state'+import { requestNotificationAccess, sendNativeNotification } from '@/hooks/use-notifications'+import { connection } from '@/store/modules/connection'+import { connectAddress, refreshHealth } from '@/store/modules/connection/runtime'+import { buildConnectUrl, isTrustedOrigin } from '@/utils/bridge-protocol'+import { createNotificationShim, nativeMessageScript, parseNativeMessage } from '@/utils/webview-bridge'++export function BridgeWebView({ address, generation }: { address: BridgeAddress, generation: number }) {+ const ref = useRef<WebView>(null)+ const { t } = useTranslation()+ const [nonce] = useState(randomUUID)+ const mainUrlRef = useRef(buildConnectUrl(address))+ const canGoBackRef = useRef(false)+ const focusRequestRef = useRef<{ requestId: string, focus: NotificationFocus } | null>(null)+ const documentReadyRef = useRef(false)+ const [documentReady, setDocumentReady] = useState(false)+ const [loadingTimedOut, setLoadingTimedOut] = useState(false)+ const [documentGeneration, setDocumentGeneration] = useState(0)+ const state = useStore(connection)+ const navigation = useNavigation()+ const appState = useAppState()+ const background = useThemeColor('background')+ const edges: Edge[] = ['top']+ if (Platform.OS !== 'ios')+ edges.push('bottom')+ const shim = createNotificationShim(address.id, nonce, edges)+ // keep:effect Mirror native visibility into the authenticated loaded document.+ useEffect(() => {+ if (!documentReady || state.loadError)+ return+ ref.current?.injectJavaScript(nativeMessageScript(address.id, nonce, {+ type: 'dsh://visibility-state',+ hidden: appState !== 'active',+ }))+ }, [address.id, appState, documentReady, nonce, state.loadError])+ // keep:whenever Request native notification access as soon as a verified document reaches the foreground.+ useWhenever(documentReady && !state.loadError && appState === 'active', () => void requestNotificationAccess())+ // keep:effect Keep notification focus pending until the loaded page acknowledges selection.+ useEffect(() => {+ const focus = state.pendingFocus+ if (!documentReady || state.loadError || focus?.origin !== address.id || appState !== 'active')+ return+ const requestId = randomUUID()+ const webView = ref.current+ focusRequestRef.current = { requestId, focus }+ webView?.injectJavaScript(nativeMessageScript(address.id, nonce, {+ type: 'dsh://focus-session',+ requestId,+ sessionId: focus.sessionId,+ title: focus.title,+ tag: focus.tag,+ }))+ connection.setDrawerOpen(false)+ return () => {+ webView?.injectJavaScript(nativeMessageScript(address.id, nonce, { type: 'dsh://cancel-focus', requestId }))+ if (focusRequestRef.current?.requestId === requestId)+ focusRequestRef.current = null+ }+ }, [address.id, appState, documentReady, nonce, state.loadError, state.pendingFocus, state.focusGeneration])+ // keep:effect Offer recovery for a slow document without rejecting its later authenticated readiness.+ useEffect(() => {+ if (documentReady || state.loadError)+ return+ const timeout = setTimeout(setLoadingTimedOut, WEBVIEW_LOAD_TIMEOUT_MS, true)+ return () => clearTimeout(timeout)+ }, [documentGeneration, documentReady, state.loadError])+ // keep:effect Route Android back to WebView history without consuming an open drawer's back event.+ useEffect(() => {+ const subscription = BackHandler.addEventListener('hardwareBackPress', () => {+ if (!navigation.isFocused() || connection.drawerOpen || !canGoBackRef.current)+ return false+ ref.current?.goBack()+ return true+ })+ return () => subscription.remove()+ }, [navigation])+ async function openExternal(raw: string) {+ try {+ const url = new URL(raw)+ if ((url.protocol === 'http:' || url.protocol === 'https:') && !url.username && !url.password)+ await Linking.openURL(url.toString())+ }+ catch {+ connection.setNotice(t('connection.connectionFailed'))+ }+ }+ function allowNavigation(request: ShouldStartLoadRequest): boolean {+ if (request.isTopFrame === false)+ return true+ if (isTrustedOrigin(request.url, address.id)) {+ mainUrlRef.current = request.url+ return true+ }+ if (request.url === 'about:blank')+ return true+ void openExternal(request.url)+ return false+ }+ function handleMessage({ nativeEvent }: WebViewMessageEvent) {+ const message = parseNativeMessage(nativeEvent.data, nativeEvent.url, address.id, nonce)+ if (!message || generation !== connection.viewGeneration)+ return+ if (message.type === 'dsh://bridge-ready') {+ if (connection.loadError)+ return+ documentReadyRef.current = true+ setDocumentReady(true)+ setLoadingTimedOut(false)+ connection.markLoaded(generation)+ return+ }+ if (!documentReadyRef.current || connection.loadError)+ return+ if (message.type === 'dsh://theme-state') {+ Uniwind.setTheme(message.theme)+ return+ }+ if (message.type === 'dsh://focus-result') {+ const request = focusRequestRef.current+ const pending = connection.pendingFocus+ if (!request || request.requestId !== message.requestId || !pending+ || pending.origin !== request.focus.origin || pending.sessionId !== request.focus.sessionId+ || pending.tag !== request.focus.tag || pending.title !== request.focus.title) {+ return+ }+ connection.queueFocus(null)+ if (!message.handled)+ connection.setNotice(t('connection.focusFailed'))+ return+ }+ void sendNativeNotification(message, address.id)+ }+ function loadingStarted(url: string, loading: boolean) {+ if (generation !== connection.viewGeneration || !isTrustedOrigin(url, address.id))+ return+ mainUrlRef.current = url+ if (!loading)+ return+ focusRequestRef.current = null+ documentReadyRef.current = false+ setDocumentReady(false)+ setLoadingTimedOut(false)+ setDocumentGeneration(value => value + 1)+ }+ function loaded(url: string) {+ if (isTrustedOrigin(url, address.id))+ ref.current?.injectJavaScript(shim)+ }+ function openDrawer() {+ connection.dismissHint()+ connection.setDrawerOpen(true)+ void refreshHealth()+ }+ return (+ <SafeAreaView style={{ flex: 1, backgroundColor: background }} edges={edges}>+ <View className="flex-1">+ <WebView+ ref={ref}+ source={{ uri: buildConnectUrl(address) }}+ style={{ flex: 1, backgroundColor: background }}+ injectedJavaScriptBeforeContentLoaded={shim}+ injectedJavaScript={shim}+ injectedJavaScriptForMainFrameOnly+ injectedJavaScriptBeforeContentLoadedForMainFrameOnly+ javaScriptEnabled+ domStorageEnabled+ sharedCookiesEnabled+ thirdPartyCookiesEnabled={false}+ allowFileAccess={false}+ allowFileAccessFromFileURLs={false}+ allowUniversalAccessFromFileURLs={false}+ mixedContentMode="never"+ originWhitelist={['*']}+ onShouldStartLoadWithRequest={allowNavigation}+ onMessage={handleMessage}+ onLoadStart={event => loadingStarted(event.nativeEvent.url, event.nativeEvent.loading)}+ onLoad={event => loaded(event.nativeEvent.url)}+ onError={() => connection.markLoadFailed(generation, t('connection.connectionFailed'))}+ onHttpError={({ nativeEvent }) => {+ if (nativeEvent.statusCode >= 400 && nativeEvent.statusCode !== 401 && nativeEvent.url === mainUrlRef.current)+ connection.markLoadFailed(generation, t('connection.connectionFailed'))+ }}+ onNavigationStateChange={(navigation) => {+ canGoBackRef.current = navigation.canGoBack+ if (isTrustedOrigin(navigation.url, address.id))+ mainUrlRef.current = navigation.url+ }}+ onOpenWindow={({ nativeEvent }) => { void openExternal(nativeEvent.targetUrl) }}+ onRenderProcessGone={() => connection.markLoadFailed(generation, t('connection.connectionFailed'))}+ onContentProcessDidTerminate={() => connection.markLoadFailed(generation, t('connection.connectionFailed'))}+ />+ <If cond={state.notice && !state.drawerOpen}>+ <Then>+ <Pressable+ className="absolute left-3 right-3 top-3 rounded-xl border border-border bg-surface px-4 py-3"+ accessibilityRole="button"+ accessibilityLabel={state.notice ?? t('connection.connectionInfo')}+ onPress={openDrawer}+ >+ <Text className="text-sm leading-6 text-warning" accessibilityLiveRegion="polite">{state.notice}</Text>+ </Pressable>+ </Then>+ </If>+ <If cond={state.loading && !loadingTimedOut}>+ <Then>+ <View className="absolute inset-0 items-center justify-center gap-7 bg-background px-8">+ <View className="items-center gap-3">+ <Logo />+ <Wordmark />+ </View>+ <BreathingLight />+ <Text className="text-sm text-muted" accessibilityLiveRegion="polite">{t('connection.loading')}</Text>+ </View>+ </Then>+ </If>+ <If cond={state.loadError || (loadingTimedOut && !documentReady)}>+ <Then>+ <View className="absolute inset-0 items-center justify-center gap-5 bg-background px-8">+ <Text className="text-center text-base leading-7 text-foreground" accessibilityLiveRegion="polite">{state.loadError ?? t('connection.loadingSlow')}</Text>+ <Button onPress={() => connectAddress(address)}>{t('connection.reconnect')}</Button>+ <Button variant="ghost" onPress={openDrawer}>{t('connection.connectionInfo')}</Button>+ </View>+ </Then>+ </If>+ <If cond={documentReady && state.swipeHintVisible && !state.drawerOpen}>+ <Then>+ <Modal+ transparent+ visible+ statusBarTranslucent+ navigationBarTranslucent+ onRequestClose={() => connection.dismissHint()}+ >+ <Pressable+ className="flex-1 items-center justify-center gap-5 bg-black/60"+ accessibilityRole="button"+ accessibilityLabel={t('connection.swipeAccessibility')}+ onPress={() => connection.dismissHint()}+ >+ <View className="flex-row items-center gap-3">+ <ArrowLeft size={34} color="#ffffff" />+ <Hand size={52} color="#ffffff" strokeWidth={1.5} />+ </View>+ <Text className="text-base font-medium text-white">{t('connection.swipeHint')}</Text>+ </Pressable>+ </Modal>+ </Then>+ </If>+ </View>+ </SafeAreaView>+ )+}diff --git a/src-native/uniwind-types.d.ts b/src-native/uniwind-types.d.tsnew file mode 100644index 00000000..cc099419--- /dev/null+++ b/src-native/uniwind-types.d.ts@@ -0,0 +1,10 @@+// NOTE: This file is generated by uniwind and it should not be edited manually.+/// <reference types="uniwind/types" />++declare module 'uniwind' {+ export interface UniwindConfig {+ themes: readonly ['light', 'dark']+ }+}++export {}diff --git a/src-native/utils/bridge-protocol.test.ts b/src-native/utils/bridge-protocol.test.tsnew file mode 100644index 00000000..b1e9b2b0--- /dev/null+++ b/src-native/utils/bridge-protocol.test.ts@@ -0,0 +1,183 @@+import { afterEach, describe, expect, it, vi } from 'vitest'+import { buildConnectUrl, connectionLabel, isBridgeManifest, isRecord, isTrustedOrigin, parseAuthStatus, parseQrPayload } from './bridge-protocol'++afterEach(() => {+ vi.restoreAllMocks()+ vi.unstubAllGlobals()+ vi.clearAllTimers()+ vi.useRealTimers()+})++describe('parseQrPayload', () => {+ it.each([+ '',+ 'bridge.local',+ '//bridge.local:3080',+ 'ftp://bridge.local:3080',+ 'ws://bridge.local:3080',+ 'javascript:alert(1)',+ 'file:///bridge',+ 'http://[email protected]:3080',+ 'https://user:[email protected]',+ 'http://bridge.local:0',+ 'http://bridge.local:65536',+ 'http://bridge.local:not-a-port',+ 'http://[broken',+ 'http://',+ 'http://bridge.local/a b',+ 'http://bridge.local\\evil',+ 'http://bridge.local/\u0000',+ 'http://bridge.local/\npath',+ '{broken}',+ '{"url":42}',+ '{"address":"http://bridge.local:3080"}',+ ])('rejects invalid or unsafe address %j', (raw) => {+ expect(parseQrPayload(raw)).toBeNull()+ })++ it('rejects oversized QR payloads before parsing', () => {+ expect(parseQrPayload(`http://bridge.local/${'x'.repeat(8192)}`)).toBeNull()+ })++ it('accepts the 8192-character boundary', () => {+ const raw = `http://bridge.local/${'x'.repeat(8172)}`+ expect(raw).toHaveLength(8192)+ expect(parseQrPayload(raw)).toEqual({+ id: 'http://bridge.local',+ url: raw,+ host: 'bridge.local',+ port: 80,+ })+ })++ it('decodes a JSON QR and removes every secret query value without losing route or public query', () => {+ expect(parseQrPayload(' {"url":" https://BRIDGE.local:443/workspaces/w-1?theme=dark&auth=a%2Bb&token=ignored&auth=again&session=s-7#private ","token":"untrusted"} ')).toEqual({+ id: 'https://bridge.local',+ url: 'https://bridge.local/workspaces/w-1?theme=dark&session=s-7',+ host: 'bridge.local',+ port: 443,+ token: 'a+b',+ })+ })++ it('accepts host:port shorthand with a token and preserves its path', () => {+ expect(parseQrPayload(' 192.168.7.20:3082/projects?token=scan-secret&view=compact ')).toEqual({+ id: 'http://192.168.7.20:3082',+ url: 'http://192.168.7.20:3082/projects?view=compact',+ host: '192.168.7.20',+ port: 3082,+ token: 'scan-secret',+ })+ })++ it('does not retain an empty token or fragment', () => {+ expect(parseQrPayload('http://bridge.local:3080/?auth=&token=other#token=fragment')).toEqual({+ id: 'http://bridge.local:3080',+ url: 'http://bridge.local:3080/',+ host: 'bridge.local',+ port: 3080,+ })+ })++ it.each([+ ['http://BRIDGE.local', 'http://bridge.local', 'http://bridge.local/', 'bridge.local', 80],+ ['http://bridge.local:80/a', 'http://bridge.local', 'http://bridge.local/a', 'bridge.local', 80],+ ['https://bridge.local', 'https://bridge.local', 'https://bridge.local/', 'bridge.local', 443],+ ['https://bridge.local:443/b', 'https://bridge.local', 'https://bridge.local/b', 'bridge.local', 443],+ ['http://bridge.local:65535/c', 'http://bridge.local:65535', 'http://bridge.local:65535/c', 'bridge.local', 65535],+ ['https://bridge.local:8443/d', 'https://bridge.local:8443', 'https://bridge.local:8443/d', 'bridge.local', 8443],+ ['http://[2001:db8::1]:3080/e', 'http://[2001:db8::1]:3080', 'http://[2001:db8::1]:3080/e', '[2001:db8::1]', 3080],+ ])('normalizes the stable origin and port of %s', (raw, id, url, host, port) => {+ expect(parseQrPayload(raw)).toEqual({ id, url, host, port })+ })+})++describe('connect URL and label', () => {+ it('adds an encoded auth token without mutating the sanitized address', () => {+ const address = {+ id: 'https://bridge.local:8443',+ url: 'https://bridge.local:8443/workspaces/w-1?theme=dark&auth=old',+ host: 'bridge.local',+ port: 8443,+ token: 'a+b&?#',+ }+ expect(buildConnectUrl(address)).toBe('https://bridge.local:8443/workspaces/w-1?theme=dark&auth=a%2Bb%26%3F%23')+ expect(address.url).toBe('https://bridge.local:8443/workspaces/w-1?theme=dark&auth=old')+ })++ it('keeps a token-free URL unchanged', () => {+ expect(buildConnectUrl({ id: 'http://bridge.local', url: 'http://bridge.local/tasks?session=7', host: 'bridge.local', port: 80 })).toBe('http://bridge.local/tasks?session=7')+ })++ it.each([+ [{ id: 'http://bridge.local', url: 'http://bridge.local/a', host: 'bridge.local', port: 80 }, 'bridge.local'],+ [{ id: 'https://bridge.local', url: 'https://bridge.local/a', host: 'bridge.local', port: 443 }, 'bridge.local'],+ [{ id: 'http://bridge.local:3082', url: 'http://bridge.local:3082/a', host: 'bridge.local', port: 3082 }, 'bridge.local:3082'],+ [{ id: 'http://[::1]:3080', url: 'http://[::1]:3080/', host: '[::1]', port: 3080 }, '[::1]:3080'],+ ])('labels %j without secrets or paths', (address, label) => {+ expect(connectionLabel(address)).toBe(label)+ })+})++describe('protocol response validation', () => {+ it.each([null, undefined, [], true, 1, 'object'])('does not treat %j as a record', (value) => {+ expect(isRecord(value)).toBe(false)+ })++ it('accepts plain records', () => {+ expect(isRecord({ enabled: false })).toBe(true)+ })++ it.each([+ null,+ [],+ {},+ { enabled: 'true' },+ { enabled: 1 },+ { enabled: false, mode: null },+ { enabled: true, mode: 4 },+ { enabled: true, allowLoopback: 'true' },+ { enabled: true, allowLoopback: null },+ ])('rejects malformed auth status %j', (value) => {+ expect(parseAuthStatus(value)).toBeNull()+ })++ it('returns only validated auth fields', () => {+ expect(parseAuthStatus({ enabled: true, mode: 'token_only', allowLoopback: false, token: 'secret', extra: true })).toEqual({ enabled: true, mode: 'token_only', allowLoopback: false })+ expect(parseAuthStatus({ enabled: false })).toEqual({ enabled: false })+ })++ it.each([+ null,+ [],+ {},+ { name: 'DeepSeek Harness' },+ { short_name: 'DSH' },+ { name: 'Deepseek Harness', short_name: 'DSH' },+ { name: 'DeepSeek Harness', short_name: 'dsh' },+ { name: 'Other app', short_name: 'DSH' },+ ])('rejects a manifest without the exact DSH identity: %j', (value) => {+ expect(isBridgeManifest(value)).toBe(false)+ })++ it('recognizes the literal DSH manifest identity', () => {+ expect(isBridgeManifest({ name: 'DeepSeek Harness', short_name: 'DSH', start_url: '/' })).toBe(true)+ })+})++describe('isTrustedOrigin', () => {+ it.each([+ ['https://BRIDGE.local:443/a?auth=secret#fragment', 'https://bridge.local/path', true],+ ['http://bridge.local:80/a', 'http://bridge.local/', true],+ ['https://bridge.local:8443/a', 'https://bridge.local:8443/', true],+ ['https://bridge.local:8444/', 'https://bridge.local:8443/', false],+ ['http://bridge.local/', 'https://bridge.local/', false],+ ['https://bridge.local.evil.test/', 'https://bridge.local/', false],+ ['https://[email protected]/', 'https://bridge.local/', false],+ ['javascript:alert(1)', 'https://bridge.local/', false],+ ['not a URL', 'https://bridge.local/', false],+ ['https://bridge.local/', 'not a URL', false],+ ])('checks complete origin equality for %s against %s', (candidate, expected, trusted) => {+ expect(isTrustedOrigin(candidate, expected)).toBe(trusted)+ })+})diff --git a/src-native/utils/bridge-protocol.ts b/src-native/utils/bridge-protocol.tsnew file mode 100644index 00000000..9c60d19b--- /dev/null+++ b/src-native/utils/bridge-protocol.ts@@ -0,0 +1,108 @@+import type { AuthStatus, BridgeManifest } from '@/apis/index.types'++export interface BridgeAddress {+ id: string+ url: string+ host: string+ port: number+ token?: string+ name?: string+}++export function isRecord(value: unknown): value is Record<string, unknown> {+ return typeof value === 'object' && value !== null && !Array.isArray(value)+}++export function parseAuthStatus(value: unknown): AuthStatus | null {+ if (!isRecord(value) || typeof value.enabled !== 'boolean')+ return null+ if (value.mode !== undefined && typeof value.mode !== 'string')+ return null+ if (value.allowLoopback !== undefined && typeof value.allowLoopback !== 'boolean')+ return null+ const status: AuthStatus = { enabled: value.enabled }+ if (typeof value.mode === 'string')+ status.mode = value.mode+ if (typeof value.allowLoopback === 'boolean')+ status.allowLoopback = value.allowLoopback+ return status+}++export function isBridgeManifest(value: unknown): value is BridgeManifest {+ return isRecord(value) && value.name === 'DeepSeek Harness' && value.short_name === 'DSH'+}++export function parseQrPayload(raw: string): BridgeAddress | null {+ if (raw.length > 8192)+ return null+ let text = raw.trim()+ if (text.startsWith('{')) {+ try {+ const data: unknown = JSON.parse(text)+ if (!isRecord(data) || typeof data.url !== 'string')+ return null+ text = data.url.trim()+ }+ catch {+ return null+ }+ }+ if (/^[\w.-]+:\d+(?:[/?].*)?$/.test(text))+ text = `http://${text}`+ if (!/^https?:\/\//i.test(text) || /[\s\\]/.test(text) || Array.from(text).some(character => character.charCodeAt(0) < 32))+ return null+ try {+ const url = new URL(text)+ if (url.username || url.password || !url.hostname)+ return null+ let port = 80+ if (url.protocol === 'https:')+ port = 443+ if (url.port)+ port = Number(url.port)+ if (!Number.isInteger(port) || port < 1 || port > 65535)+ return null+ const token = url.searchParams.get('auth') ?? url.searchParams.get('token') ?? undefined+ url.searchParams.delete('auth')+ url.searchParams.delete('token')+ url.hash = ''+ const address: BridgeAddress = {+ id: url.origin,+ url: url.toString(),+ host: url.hostname,+ port,+ }+ if (token)+ address.token = token+ return address+ }+ catch {+ return null+ }+}++export function buildConnectUrl(address: BridgeAddress): string {+ const url = new URL(address.url)+ if (address.token)+ url.searchParams.set('auth', address.token)+ return url.toString()+}++export function connectionLabel(address: BridgeAddress): string {+ if (address.name)+ return address.name+ const url = new URL(address.url)+ if (url.port)+ return `${address.host}:${address.port}`+ return address.host+}++export function isTrustedOrigin(candidate: string, expected: string): boolean {+ try {+ const url = new URL(candidate)+ return (url.protocol === 'http:' || url.protocol === 'https:') && url.origin === new URL(expected).origin+ }+ catch {+ return false+ }+}diff --git a/src-native/utils/discovery.test.ts b/src-native/utils/discovery.test.tsnew file mode 100644index 00000000..3fda8237--- /dev/null+++ b/src-native/utils/discovery.test.ts@@ -0,0 +1,97 @@+import { afterEach, describe, expect, it, vi } from 'vitest'+import { buildCandidates, parseIpv4 } from './discovery'++afterEach(() => {+ vi.restoreAllMocks()+ vi.unstubAllGlobals()+ vi.clearAllTimers()+ vi.useRealTimers()+})++describe('unicast IPv4 validation', () => {+ it.each([+ ['', null],+ [' 192.168.1.2', null],+ ['192.168.1.2 ', null],+ ['192.168.1', null],+ ['192.168.1.2.3', null],+ ['192.168.1.-2', null],+ ['192.168.1.256', null],+ ['256.1.2.3', null],+ ['192.168.1.2/24', null],+ ['192.168.1.2:3080', null],+ ['::1', null],+ ['0.1.2.3', null],+ ['127.0.0.1', null],+ ['224.0.0.1', null],+ ['239.10.20.30', null],+ ['255.255.255.255', null],+ ['10.0.0.9', [10, 0, 0, 9]],+ ['172.16.50.254', [172, 16, 50, 254]],+ ['192.168.7.2', [192, 168, 7, 2]],+ ['223.255.255.254', [223, 255, 255, 254]],+ ])('parses only a valid unicast IPv4 address: %s', (ip, expected) => {+ expect(parseIpv4(ip)).toEqual(expected)+ })+})++describe('buildCandidates', () => {+ it.each(['', '127.0.0.1', '224.1.2.3', '::1', '192.168.1.256'])('does not scan an invalid subnet %s', (selfIp) => {+ expect(buildCandidates({ selfIp, ports: [9999] })).toEqual([])+ })++ it('scans the two literal default ports in port-major order while excluding self and network/broadcast addresses', () => {+ const candidates = buildCandidates({ selfIp: '192.168.7.12' })+ expect(candidates).toHaveLength(506)+ expect(candidates.slice(0, 3)).toEqual([+ { host: '192.168.7.1', port: 3088 },+ { host: '192.168.7.2', port: 3088 },+ { host: '192.168.7.3', port: 3088 },+ ])+ expect(candidates.slice(252, 255)).toEqual([+ { host: '192.168.7.254', port: 3088 },+ { host: '192.168.7.1', port: 3080 },+ { host: '192.168.7.2', port: 3080 },+ ])+ expect(candidates.at(-1)).toEqual({ host: '192.168.7.254', port: 3080 })+ expect(candidates.filter(candidate => ['192.168.7.0', '192.168.7.12', '192.168.7.255'].includes(candidate.host))).toEqual([])+ expect(new Set(candidates.map(candidate => `${candidate.host}:${candidate.port}`)).size).toBe(506)+ })++ it('deduplicates history ports and rejects zero, out-of-range, fractional and nonfinite ports', () => {+ const ports = [4444, 3080, 4444, 3088, 0, -1, 65536, 1.5, Number.NaN, Number.POSITIVE_INFINITY, 65535, 80]+ const candidates = buildCandidates({ selfIp: '10.0.0.9', ports })+ expect(candidates).toHaveLength(1265)+ expect([...new Set(candidates.map(candidate => candidate.port))]).toEqual([4444, 3080, 3088, 65535, 80])+ expect(candidates.filter(candidate => candidate.port === 4444)).toHaveLength(253)+ expect(candidates.filter(candidate => candidate.port === 65535)).toHaveLength(253)+ expect(ports).toEqual([4444, 3080, 4444, 3088, 0, -1, 65536, 1.5, Number.NaN, Number.POSITIVE_INFINITY, 65535, 80])+ })++ it('excludes an entire host or just an exact host:port without excluding sibling ports', () => {+ const candidates = buildCandidates({+ selfIp: '10.0.0.9',+ exclude: ['10.0.0.2', '10.0.0.3:3088', '10.0.1.4', '10.0.0.2'],+ })+ expect(candidates).toHaveLength(503)+ expect(candidates.slice(0, 2)).toEqual([+ { host: '10.0.0.1', port: 3088 },+ { host: '10.0.0.4', port: 3088 },+ ])+ expect(candidates.filter(candidate => candidate.host === '10.0.0.2')).toEqual([])+ expect(candidates.filter(candidate => candidate.host === '10.0.0.3')).toEqual([{ host: '10.0.0.3', port: 3080 }])+ })++ it('does not generate .0 or .255 even when self is a subnet boundary', () => {+ const candidates = buildCandidates({ selfIp: '10.0.0.0' })+ expect(candidates).toHaveLength(508)+ expect([...new Set(candidates.map(candidate => candidate.host))].slice(0, 2)).toEqual(['10.0.0.1', '10.0.0.2'])+ expect(candidates.filter(candidate => candidate.host === '10.0.0.255')).toEqual([])+ })++ it('excludes the normalized self address when IPv4 octets have leading zeros', () => {+ const candidates = buildCandidates({ selfIp: '192.168.007.012' })+ expect(candidates).toHaveLength(506)+ expect(candidates.filter(candidate => candidate.host === '192.168.7.12')).toEqual([])+ })+})diff --git a/src-native/utils/discovery.ts b/src-native/utils/discovery.tsnew file mode 100644index 00000000..85e87690--- /dev/null+++ b/src-native/utils/discovery.ts@@ -0,0 +1,40 @@+import { DEFAULT_PORTS } from '@/config/constants'++export interface ScanCandidate {+ host: string+ port: number+}++export function parseIpv4(ip: string): number[] | null {+ if (!/^\d{1,3}(?:\.\d{1,3}){3}$/.test(ip))+ return null+ const octets = ip.split('.').map(Number)+ if (octets.some(value => value < 0 || value > 255))+ return null+ if (octets[0] === 0 || octets[0] === 127 || (octets[0] ?? 256) >= 224)+ return null+ return octets+}++export function buildCandidates({ selfIp, ports = [], exclude = [] }: {+ selfIp: string+ ports?: readonly number[]+ exclude?: readonly string[]+}): ScanCandidate[] {+ const octets = parseIpv4(selfIp)+ if (!octets)+ return []+ const prefix = octets.slice(0, 3).join('.')+ const allPorts = [...new Set([...ports, ...DEFAULT_PORTS])]+ .filter(port => Number.isInteger(port) && port > 0 && port <= 65535)+ const excluded = new Set([octets.join('.'), ...exclude])+ const candidates: ScanCandidate[] = []+ for (const port of allPorts) {+ for (let last = 1; last <= 254; last++) {+ const host = `${prefix}.${last}`+ if (!excluded.has(host) && !excluded.has(`${host}:${port}`))+ candidates.push({ host, port })+ }+ }+ return candidates+}diff --git a/src-native/utils/notification-policy.test.ts b/src-native/utils/notification-policy.test.tsnew file mode 100644index 00000000..fcf17cfb--- /dev/null+++ b/src-native/utils/notification-policy.test.ts@@ -0,0 +1,329 @@+import type { NativeNotificationMessage, NotificationAdapter } from './notification-policy'+import { afterEach, describe, expect, it, vi } from 'vitest'+import { createNotificationDispatcher, createResponseCoalescer, notificationIdFor } from './notification-policy'++const origin = 'https://harness.test:3080'+const notification: NativeNotificationMessage = {+ type: 'dsh://native-notification',+ title: 'Response complete',+ body: 'Your answer is ready',+ sessionId: 'session',+ tag: 'dsh-notification-session-1',+ silent: false,+}++function createAdapter() {+ return {+ isForeground: vi.fn<NotificationAdapter['isForeground']>(() => false),+ checkPermission: vi.fn<NotificationAdapter['checkPermission']>().mockResolvedValue(false),+ requestPermission: vi.fn<NotificationAdapter['requestPermission']>().mockResolvedValue(true),+ deliver: vi.fn<NotificationAdapter['deliver']>().mockResolvedValue(undefined),+ reportError: vi.fn<NotificationAdapter['reportError']>(),+ }+}++afterEach(() => {+ vi.restoreAllMocks()+ vi.useRealTimers()+ vi.unstubAllGlobals()+ vi.unstubAllEnvs()+})++describe('notificationIdFor', () => {+ it('returns the stable native identifier for a session notification tag', () => {+ expect(notificationIdFor('dsh-notification-session-1')).toBe('1525991148')+ })++ it('leaves an empty tag without a native identifier', () => {+ expect(notificationIdFor('')).toBeUndefined()+ })++ it('replaces a zero hash with a nonzero identifier', () => {+ expect(notificationIdFor('\u0000')).toBe('1')+ })+})++describe('createNotificationDispatcher', () => {+ it('drops foreground notifications before checking permission', async () => {+ const adapter = createAdapter()+ adapter.isForeground.mockReturnValue(true)+ const dispatcher = createNotificationDispatcher(adapter)++ await dispatcher.notify(notification, origin)++ expect(adapter.checkPermission).not.toHaveBeenCalled()+ expect(adapter.requestPermission).not.toHaveBeenCalled()+ expect(adapter.deliver).not.toHaveBeenCalled()+ expect(adapter.reportError).not.toHaveBeenCalled()+ })++ it('checks permission before requesting it and delivers only after approval', async () => {+ const adapter = createAdapter()+ const order: string[] = []+ adapter.checkPermission.mockImplementation(async () => {+ order.push('check')+ return false+ })+ adapter.requestPermission.mockImplementation(async () => {+ order.push('request')+ return true+ })+ adapter.deliver.mockImplementation(async () => {+ order.push('deliver')+ })+ const dispatcher = createNotificationDispatcher(adapter)++ await dispatcher.notify(notification, origin)++ expect(order).toEqual(['check', 'request', 'deliver'])+ expect(adapter.checkPermission).toHaveBeenCalledExactlyOnceWith()+ expect(adapter.requestPermission).toHaveBeenCalledExactlyOnceWith()+ expect(adapter.deliver).toHaveBeenCalledExactlyOnceWith(notification, origin, '1525991148')+ })++ it('delivers already-granted notifications without another permission request', async () => {+ const adapter = createAdapter()+ adapter.checkPermission.mockResolvedValue(true)+ const dispatcher = createNotificationDispatcher(adapter)++ await dispatcher.notify(notification, origin)++ expect(adapter.checkPermission).toHaveBeenCalledExactlyOnceWith()+ expect(adapter.requestPermission).not.toHaveBeenCalled()+ expect(adapter.deliver).toHaveBeenCalledExactlyOnceWith(notification, origin, '1525991148')+ })++ it('does not deliver when the permission request is denied', async () => {+ const adapter = createAdapter()+ adapter.requestPermission.mockResolvedValue(false)+ const dispatcher = createNotificationDispatcher(adapter)++ await dispatcher.notify(notification, origin)++ expect(adapter.checkPermission).toHaveBeenCalledExactlyOnceWith()+ expect(adapter.requestPermission).toHaveBeenCalledExactlyOnceWith()+ expect(adapter.deliver).not.toHaveBeenCalled()+ expect(adapter.reportError).not.toHaveBeenCalled()+ })++ it('shares one in-flight check and request across concurrent callers', async () => {+ const adapter = createAdapter()+ const check = Promise.withResolvers<boolean>()+ const request = Promise.withResolvers<boolean>()+ const requestStarted = Promise.withResolvers<void>()+ adapter.checkPermission.mockReturnValue(check.promise)+ adapter.requestPermission.mockImplementation(() => {+ requestStarted.resolve()+ return request.promise+ })+ const dispatcher = createNotificationDispatcher(adapter)++ const first = dispatcher.notify(notification, origin)+ const second = dispatcher.notify(notification, origin)+ const permission = dispatcher.ensurePermission()+ expect(dispatcher.ensurePermission()).toBe(permission)+ expect(adapter.checkPermission).toHaveBeenCalledTimes(1)+ expect(adapter.requestPermission).not.toHaveBeenCalled()+ expect(adapter.deliver).not.toHaveBeenCalled()++ check.resolve(false)+ await requestStarted.promise+ const third = dispatcher.notify(notification, origin)+ expect(adapter.checkPermission).toHaveBeenCalledTimes(1)+ expect(adapter.requestPermission).toHaveBeenCalledTimes(1)+ expect(adapter.deliver).not.toHaveBeenCalled()++ request.resolve(true)+ await expect(permission).resolves.toBe(true)+ await Promise.all([first, second, third])++ expect(adapter.deliver.mock.calls).toEqual([+ [notification, origin, '1525991148'],+ [notification, origin, '1525991148'],+ [notification, origin, '1525991148'],+ ])+ expect(adapter.reportError).not.toHaveBeenCalled()+ })++ it('drops a notification when the app becomes foreground during permission checking', async () => {+ const adapter = createAdapter()+ const check = Promise.withResolvers<boolean>()+ adapter.checkPermission.mockReturnValue(check.promise)+ const dispatcher = createNotificationDispatcher(adapter)++ const pending = dispatcher.notify(notification, origin)+ expect(adapter.deliver).not.toHaveBeenCalled()+ adapter.isForeground.mockReturnValue(true)+ check.resolve(true)+ await pending++ expect(adapter.isForeground).toHaveBeenCalledTimes(2)+ expect(adapter.requestPermission).not.toHaveBeenCalled()+ expect(adapter.deliver).not.toHaveBeenCalled()+ })++ it.each(['checkPermission', 'requestPermission'] as const)('logs %s failure and retries on the next notification', async (operation) => {+ const adapter = createAdapter()+ const error = new Error(`${operation} failed`)+ adapter[operation].mockRejectedValueOnce(error)+ const dispatcher = createNotificationDispatcher(adapter)++ await expect(dispatcher.notify(notification, origin)).resolves.toBeUndefined()++ expect(adapter.reportError).toHaveBeenCalledExactlyOnceWith('[notification] permission request failed:', error)+ expect(adapter.deliver).not.toHaveBeenCalled()++ await dispatcher.notify(notification, origin)++ expect(adapter.checkPermission).toHaveBeenCalledTimes(2)+ expect(adapter.requestPermission).toHaveBeenCalledTimes(operation === 'checkPermission' ? 1 : 2)+ expect(adapter.deliver).toHaveBeenCalledExactlyOnceWith(notification, origin, '1525991148')+ expect(adapter.reportError).toHaveBeenCalledTimes(1)+ })++ it('rechecks permission after a settings grant rather than caching denial', async () => {+ const adapter = createAdapter()+ adapter.checkPermission.mockResolvedValueOnce(false).mockResolvedValueOnce(true)+ adapter.requestPermission.mockResolvedValue(false)+ const dispatcher = createNotificationDispatcher(adapter)++ await dispatcher.notify(notification, origin)+ expect(adapter.deliver).not.toHaveBeenCalled()+ await dispatcher.notify(notification, origin)++ expect(adapter.checkPermission).toHaveBeenCalledTimes(2)+ expect(adapter.requestPermission).toHaveBeenCalledTimes(1)+ expect(adapter.deliver).toHaveBeenCalledExactlyOnceWith(notification, origin, '1525991148')+ })++ it('rechecks permission after a settings revocation rather than caching approval', async () => {+ const adapter = createAdapter()+ adapter.checkPermission.mockResolvedValueOnce(true).mockResolvedValueOnce(false)+ adapter.requestPermission.mockResolvedValue(false)+ const dispatcher = createNotificationDispatcher(adapter)++ await dispatcher.notify(notification, origin)+ await dispatcher.notify(notification, origin)++ expect(adapter.checkPermission).toHaveBeenCalledTimes(2)+ expect(adapter.requestPermission).toHaveBeenCalledTimes(1)+ expect(adapter.deliver).toHaveBeenCalledExactlyOnceWith(notification, origin, '1525991148')+ })++ it.each([false, true])('preserves notification metadata and silent=%s when delivering', async (silent) => {+ const adapter = createAdapter()+ const dispatcher = createNotificationDispatcher(adapter)++ await dispatcher.notify({ ...notification, silent }, origin)++ expect(adapter.deliver.mock.calls).toEqual([[+ {+ type: 'dsh://native-notification',+ title: 'Response complete',+ body: 'Your answer is ready',+ sessionId: 'session',+ tag: 'dsh-notification-session-1',+ silent,+ },+ 'https://harness.test:3080',+ '1525991148',+ ]])+ })++ it('delivers an untagged notification without manufacturing an identifier', async () => {+ const adapter = createAdapter()+ const dispatcher = createNotificationDispatcher(adapter)++ await dispatcher.notify({ ...notification, tag: '' }, origin)++ expect(adapter.deliver).toHaveBeenCalledExactlyOnceWith({ ...notification, tag: '' }, origin, undefined)+ })++ it('logs a delivery failure without preventing the next delivery', async () => {+ const adapter = createAdapter()+ const error = new Error('native delivery failed')+ adapter.deliver.mockRejectedValueOnce(error)+ const dispatcher = createNotificationDispatcher(adapter)++ await expect(dispatcher.notify(notification, origin)).resolves.toBeUndefined()+ expect(adapter.reportError).toHaveBeenCalledExactlyOnceWith('[notification] send failed:', error)++ await dispatcher.notify(notification, origin)++ expect(adapter.deliver).toHaveBeenCalledTimes(2)+ expect(adapter.checkPermission).toHaveBeenCalledTimes(2)+ expect(adapter.reportError).toHaveBeenCalledTimes(1)+ })+})++describe('createResponseCoalescer', () => {+ it('rejects repeated responses through 249ms and accepts them at exactly 250ms', () => {+ const accept = createResponseCoalescer()++ expect(accept('response', 0)).toBe(true)+ expect(accept('response', 0)).toBe(false)+ expect(accept('response', 249)).toBe(false)+ expect(accept('response', 250)).toBe(true)+ expect(accept('response', 499)).toBe(false)+ expect(accept('response', 500)).toBe(true)+ })++ it('does not extend the coalescing window when a duplicate is rejected', () => {+ const accept = createResponseCoalescer()++ expect(accept('response', 1000)).toBe(true)+ expect(accept('response', 1249)).toBe(false)+ expect(accept('response', 1250)).toBe(true)+ })++ it('coalesces independent response keys separately, including the empty key', () => {+ const accept = createResponseCoalescer()++ expect(accept('first', 1000)).toBe(true)+ expect(accept('second', 1000)).toBe(true)+ expect(accept('', 1000)).toBe(true)+ expect(accept('first', 1001)).toBe(false)+ expect(accept('second', 1001)).toBe(false)+ expect(accept('', 1001)).toBe(false)+ })++ it('uses the controlled clock when no explicit timestamp is supplied', () => {+ vi.useFakeTimers()+ vi.setSystemTime(1000)+ const accept = createResponseCoalescer()++ expect(accept('response')).toBe(true)+ vi.advanceTimersByTime(249)+ expect(accept('response')).toBe(false)+ vi.advanceTimersByTime(1)+ expect(accept('response')).toBe(true)+ })++ it('honors a custom coalescing window', () => {+ const accept = createResponseCoalescer(10)++ expect(accept('response', 0)).toBe(true)+ expect(accept('response', 9)).toBe(false)+ expect(accept('response', 10)).toBe(true)+ })++ it('accepts simultaneous duplicate responses when the window is zero', () => {+ const accept = createResponseCoalescer(0)++ expect(accept('response', 0)).toBe(true)+ expect(accept('response', 0)).toBe(true)+ })++ it('retains 64 keys and evicts the oldest key when a 65th is accepted', () => {+ const accept = createResponseCoalescer()+ for (let index = 0; index < 64; index++)+ expect(accept(`key-${index}`, 1000)).toBe(true)++ expect(accept('key-0', 1000)).toBe(false)+ expect(accept('key-64', 1000)).toBe(true)+ expect(accept('key-1', 1000)).toBe(false)+ expect(accept('key-63', 1000)).toBe(false)+ expect(accept('key-64', 1000)).toBe(false)+ expect(accept('key-0', 1000)).toBe(true)+ })+})diff --git a/src-native/utils/notification-policy.ts b/src-native/utils/notification-policy.tsnew file mode 100644index 00000000..2a9a54cf--- /dev/null+++ b/src-native/utils/notification-policy.ts@@ -0,0 +1,76 @@+export interface NativeNotificationMessage {+ type: 'dsh://native-notification'+ title: string+ body: string+ sessionId: string+ tag: string+ silent: boolean+}++export interface NotificationAdapter {+ isForeground: () => boolean+ checkPermission: () => Promise<boolean>+ requestPermission: () => Promise<boolean>+ deliver: (message: NativeNotificationMessage, origin: string, identifier?: string) => Promise<void>+ reportError: (message: string, error: unknown) => void+}++export function notificationIdFor(tag: string): string | undefined {+ if (!tag)+ return undefined+ let hash = 0+ for (let index = 0; index < tag.length; index++)+ hash = (Math.imul(hash, 31) + tag.charCodeAt(index)) | 0+ return String(Math.abs(hash) % 0x7FFFFFFF || 1)+}++export function createNotificationDispatcher(adapter: NotificationAdapter) {+ let permissionRequest: Promise<boolean> | undefined+ function ensurePermission(): Promise<boolean> {+ permissionRequest ??= (async () => {+ try {+ if (await adapter.checkPermission())+ return true+ return await adapter.requestPermission()+ }+ catch (error) {+ adapter.reportError('[notification] permission request failed:', error)+ return false+ }+ })().finally(() => { permissionRequest = undefined })+ return permissionRequest+ }+ async function notify(message: NativeNotificationMessage, origin: string): Promise<void> {+ if (adapter.isForeground())+ return+ if (!await ensurePermission() || adapter.isForeground())+ return+ try {+ await adapter.deliver(message, origin, notificationIdFor(message.tag))+ }+ catch (error) {+ adapter.reportError('[notification] send failed:', error)+ }+ }+ return { ensurePermission, notify }+}++export function createResponseCoalescer(windowMs = 250) {+ const seen = new Map<string, number>()+ return function accept(key: string, now = Date.now()): boolean {+ const previous = seen.get(key)+ if (previous !== undefined && now - previous < windowMs)+ return false+ seen.set(key, now)+ for (const [entry, time] of seen) {+ if (now - time >= windowMs)+ seen.delete(entry)+ }+ if (seen.size > 64) {+ const oldest = seen.keys().next().value+ if (oldest !== undefined)+ seen.delete(oldest)+ }+ return true+ }+}diff --git a/src-native/utils/webview-bridge.test.ts b/src-native/utils/webview-bridge.test.tsnew file mode 100644index 00000000..45990b01--- /dev/null+++ b/src-native/utils/webview-bridge.test.ts@@ -0,0 +1,1105 @@+/// <reference types="node" />+import { createContext as createVmContext, runInContext } from 'node:vm'+import { afterEach, describe, expect, it, vi } from 'vitest'+import { createNotificationShim, nativeMessageScript, parseNativeMessage } from './webview-bridge'++const origin = 'https://harness.test:3080'+const nonce = 'bridge-nonce'+const nativeUrl = `${origin}/sessions?session=session-alpha`+const payload = {+ type: 'dsh://native-notification',+ title: 'Response complete',+ body: 'Your answer is ready',+ sessionId: 'session-alpha',+ tag: 'dsh-notification-session-alpha-17',+ silent: false,+}++function envelope(notification: unknown = payload): string {+ return JSON.stringify({ channel: 'dsh-bridge', origin, nonce, payload: notification })+}++interface BrowserNotification {+ title: string+ body: string+ tag: string+ onclick: ((event: Event) => void) | null+ close: () => void+}++interface NotificationConstructor {+ new (title: unknown, options?: Record<string, unknown>): BrowserNotification+ permission: string+ requestPermission: () => Promise<string>+}++interface SessionNode {+ getAttribute: (name: string) => string | null+ click: () => void+}++interface BrowserWindow {+ top: unknown+ Notification?: NotificationConstructor+ ReactNativeWebView?: { postMessage: (message: string) => void }+ __dshBridgeNonce?: string+ __dshBridgeReceive?: (data: Record<string, unknown>) => void+ __DSH_BOOT__?: Record<string, unknown>+ __dshClientCtx?: {+ get?: (name: string) => unknown+ uiWorkspace?: { openSession: (sessionId: string) => void }+ sessions?: { open: (sessionId: string) => void }+ }+ addEventListener: (type: string, listener: EventListener, options?: AddEventListenerOptions) => void+ removeEventListener: (type: string, listener: EventListener, options?: EventListenerOptions) => void+ dispatchEvent: (event: Event) => boolean+}++class BrowserMessageEvent extends Event {+ readonly data: unknown+ readonly origin: string+ readonly source: unknown++ constructor(type: string, options: { data?: unknown, origin?: string, source?: unknown } = {}) {+ super(type)+ this.data = options.data+ this.origin = options.origin ?? ''+ this.source = options.source ?? null+ }+}++function browserElement() {+ const attributes = new Map<string, string>()+ return {+ getAttribute: (name: string) => attributes.get(name) ?? null,+ hasAttribute: (name: string) => attributes.has(name),+ setAttribute: (name: string, value: string) => attributes.set(name, value),+ removeAttribute: (name: string) => attributes.delete(name),+ }+}++interface BrowserStyle {+ id: string+ textContent: string+ remove: () => void+}++function createBrowser(options: { locationOrigin?: string, topFrame?: boolean, hidden?: boolean, nodes?: SessionNode[], readyState?: 'loading' | 'complete', login?: boolean, rootAvailable?: boolean } = {}) {+ const posts = vi.fn<(message: string) => void>()+ const windowEvents = new EventTarget()+ const documentEvents = new EventTarget()+ const window: BrowserWindow = {+ top: null,+ ReactNativeWebView: { postMessage: posts },+ addEventListener: vi.fn((type: string, listener: EventListener, options?: AddEventListenerOptions) => windowEvents.addEventListener(type, listener, options)),+ removeEventListener: vi.fn((type: string, listener: EventListener, options?: EventListenerOptions) => windowEvents.removeEventListener(type, listener, options)),+ dispatchEvent: vi.fn((event: Event) => windowEvents.dispatchEvent(event)),+ }+ window.top = options.topFrame === false ? {} : window+ const styles = new Map<string, BrowserStyle>()+ const appendChild = vi.fn((style: BrowserStyle) => {+ styles.set(style.id, style)+ })+ const documentElement = { ...browserElement(), appendChild }+ const body = browserElement()+ const mutations: Array<{ callback: () => void, observe: ReturnType<typeof vi.fn>, disconnect: ReturnType<typeof vi.fn> }> = []+ class BrowserMutationObserver {+ callback: () => void+ observe = vi.fn()+ disconnect = vi.fn()++ constructor(callback: () => void) {+ this.callback = callback+ mutations.push(this)+ }+ }+ const document = {+ hidden: options.hidden ?? false,+ visibilityState: options.hidden ? 'hidden' : 'visible',+ readyState: options.readyState ?? 'complete',+ documentElement: options.rootAvailable === false ? null : documentElement,+ body: options.rootAvailable === false ? null : body,+ head: options.rootAvailable === false ? null : { appendChild },+ createElement: vi.fn((tag: string) => {+ expect(tag).toBe('style')+ const style: BrowserStyle = {+ id: '',+ textContent: '',+ remove: () => {+ styles.delete(style.id)+ },+ }+ return style+ }),+ getElementById: vi.fn((id: string) => styles.get(id) ?? (options.login && id === 'loginForm' ? {} : null)),+ querySelectorAll: vi.fn<(selector: string) => SessionNode[]>().mockReturnValue(options.nodes ?? []),+ addEventListener: vi.fn((type: string, listener: EventListener, eventOptions?: AddEventListenerOptions) => documentEvents.addEventListener(type, listener, eventOptions)),+ removeEventListener: vi.fn((type: string, listener: EventListener, eventOptions?: EventListenerOptions) => documentEvents.removeEventListener(type, listener, eventOptions)),+ dispatchEvent: vi.fn((event: Event) => documentEvents.dispatchEvent(event)),+ }+ const location = { origin: options.locationOrigin ?? origin }+ const context = createVmContext({ window, document, location, MutationObserver: BrowserMutationObserver, Event, MessageEvent: BrowserMessageEvent, Date, setTimeout, clearTimeout })+ function run(script: string): unknown {+ return runInContext(script, context, { timeout: 1000 })+ }+ function inject(injectedNonce = nonce): NotificationConstructor {+ expect(run(createNotificationShim(origin, injectedNonce))).toBe(true)+ const Notification = window.Notification+ if (!Notification)+ throw new Error('Notification shim was not installed')+ return Notification+ }+ function postMessage(data: unknown, eventOrigin = origin, source: unknown = window) {+ window.dispatchEvent(new BrowserMessageEvent('message', { data, origin: eventOrigin, source }))+ }+ return { window, document, documentElement, body, styles, appendChild, mutations, location, posts, run, inject, postMessage }+}++function sessionNode(attributes: Record<string, string>): SessionNode {+ return { getAttribute: name => attributes[name] ?? null, click: vi.fn<() => void>() }+}++afterEach(() => {+ vi.restoreAllMocks()+ vi.resetAllMocks()+ vi.useRealTimers()+ vi.unstubAllGlobals()+ vi.unstubAllEnvs()+})++describe('parseNativeMessage', () => {+ it('accepts a trusted main-page envelope with complete notification metadata', () => {+ expect(parseNativeMessage(envelope(), nativeUrl, origin, nonce)).toEqual({+ type: 'dsh://native-notification',+ title: 'Response complete',+ body: 'Your answer is ready',+ sessionId: 'session-alpha',+ tag: 'dsh-notification-session-alpha-17',+ silent: false,+ })+ })++ it('normalizes omitted optional metadata without changing an empty body', () => {+ expect(parseNativeMessage(envelope({ type: 'dsh://native-notification', title: 'Ready', body: '' }), nativeUrl, origin, nonce)).toEqual({+ type: 'dsh://native-notification',+ title: 'Ready',+ body: '',+ tag: '',+ sessionId: '',+ silent: false,+ })+ })++ it('accepts the exact title, body, tag, and session-length boundaries', () => {+ expect(parseNativeMessage(envelope({+ type: 'dsh://native-notification',+ title: 't'.repeat(256),+ body: 'b'.repeat(4096),+ tag: 'g'.repeat(256),+ sessionId: 's'.repeat(256),+ silent: true,+ }), nativeUrl, origin, nonce)).toEqual({+ type: 'dsh://native-notification',+ title: 't'.repeat(256),+ body: 'b'.repeat(4096),+ tag: 'g'.repeat(256),+ sessionId: 's'.repeat(256),+ silent: true,+ })+ })++ it.each(['', '{invalid', 'null', '[]', '"message"', '17', 'true'])('rejects malformed or non-record JSON %j', (raw) => {+ expect(parseNativeMessage(raw, nativeUrl, origin, nonce)).toBeNull()+ })++ it.each([+ {},+ { channel: 'other-channel', origin, nonce, payload },+ { channel: 'dsh-bridge', origin, payload },+ { channel: 'dsh-bridge', origin, nonce: 'wrong-nonce', payload },+ { channel: 'dsh-bridge', nonce, payload },+ { channel: 'dsh-bridge', origin: `${origin}/`, nonce, payload },+ { channel: 'dsh-bridge', origin: 'https://evil.test:3080', nonce, payload },+ ])('rejects an unauthenticated native envelope %j', (value) => {+ expect(parseNativeMessage(JSON.stringify(value), nativeUrl, origin, nonce)).toBeNull()+ })++ it.each([+ 'https://evil.test:3080/',+ 'http://harness.test:3080/',+ 'https://harness.test:3081/',+ 'about:blank',+ 'file:///sessions',+ 'javascript:alert(1)',+ 'not-a-url',+ ])('rejects an envelope sent from an untrusted native URL %s', (url) => {+ expect(parseNativeMessage(envelope(), url, origin, nonce)).toBeNull()+ })++ it.each([+ null,+ [],+ {},+ { ...payload, type: 'dsh://focus-session' },+ { ...payload, title: undefined },+ { ...payload, title: 17 },+ { ...payload, title: '' },+ { ...payload, title: ' \n\t' },+ { ...payload, title: 't'.repeat(257) },+ { ...payload, body: undefined },+ { ...payload, body: null },+ { ...payload, body: 'b'.repeat(4097) },+ { ...payload, tag: null },+ { ...payload, tag: 17 },+ { ...payload, tag: 'g'.repeat(257) },+ { ...payload, sessionId: null },+ { ...payload, sessionId: 17 },+ { ...payload, sessionId: 's'.repeat(257) },+ { ...payload, silent: null },+ { ...payload, silent: 'true' },+ ])('rejects an invalid notification payload %j', (value) => {+ expect(parseNativeMessage(envelope(value), nativeUrl, origin, nonce)).toBeNull()+ })++ it('accepts the exact raw-message limit but rejects one extra character', () => {+ const valid = envelope()+ const boundary = valid.padEnd(16384, ' ')++ expect(parseNativeMessage(boundary, nativeUrl, origin, nonce)).toEqual(payload)+ expect(parseNativeMessage(`${boundary} `, nativeUrl, origin, nonce)).toBeNull()+ })+})++describe('trusted WebView theme and touch styling', () => {+ it.each(['light', 'dark', 'system'] as const)('accepts only the canonical theme source %s through authenticated IPC', (theme) => {+ expect(parseNativeMessage(envelope({ type: 'dsh://theme-state', theme }), nativeUrl, origin, nonce)).toEqual({ type: 'dsh://theme-state', theme })+ expect(parseNativeMessage(envelope({ type: 'dsh://theme-state', theme }), nativeUrl, origin, 'stale-nonce')).toBeNull()+ expect(parseNativeMessage(envelope({ type: 'dsh://theme-state', theme }), 'https://foreign.test/', origin, nonce)).toBeNull()+ })++ it.each([undefined, null, 1, '', 'sepia', 'LIGHT', 'auto'])('rejects unsupported theme values %j', (theme) => {+ expect(parseNativeMessage(envelope({ type: 'dsh://theme-state', theme }), nativeUrl, origin, nonce)).toBeNull()+ })++ it('installs only tap transparency, repairs a removed style, and preserves same-nonce bridge identity', () => {+ const browser = createBrowser()+ const Notification = browser.inject()+ const receive = browser.window.__dshBridgeReceive+ const style = browser.styles.get('dsh-bridge-tap-highlight')++ expect(style?.textContent).toBe('* { -webkit-tap-highlight-color: transparent; }')+ expect(browser.styles.size).toBe(1)+ expect(browser.document.createElement).toHaveBeenCalledExactlyOnceWith('style')+ expect(browser.inject()).toBe(Notification)+ expect(browser.window.__dshBridgeReceive).toBe(receive)+ expect(browser.styles.size).toBe(1)+ expect(browser.document.createElement).toHaveBeenCalledTimes(1)+ style?.remove()+ expect(browser.styles.size).toBe(0)+ browser.inject()+ expect(browser.styles.get('dsh-bridge-tap-highlight')?.textContent).toBe('* { -webkit-tap-highlight-color: transparent; }')+ expect(browser.document.createElement).toHaveBeenCalledTimes(2)+ expect(browser.window.__dshBridgeReceive).toBe(receive)+ expect(browser.posts).not.toHaveBeenCalled()+ })++ it('updates native safe-area ownership before the same-nonce early return without replacing the bridge', () => {+ const browser = createBrowser()+ const Notification = browser.inject()+ const receive = browser.window.__dshBridgeReceive+ const style = browser.styles.get('dsh-bridge-tap-highlight')+ const script = createNotificationShim(origin, nonce, ['top', 'bottom'])+ expect(browser.run(script)).toBe(true)+ expect(style?.textContent).toContain(':root { --dsh-mobile-safe-area-inset-top: 0px; --dsh-mobile-safe-area-inset-bottom: 0px; }')+ expect(browser.styles.size).toBe(1)+ expect(browser.styles.get('dsh-bridge-tap-highlight')).toBe(style)+ expect(browser.document.createElement).toHaveBeenCalledExactlyOnceWith('style')+ expect(browser.window.Notification).toBe(Notification)+ expect(browser.window.__dshBridgeReceive).toBe(receive)+ style?.remove()+ expect(browser.run(script)).toBe(true)+ expect(browser.styles.get('dsh-bridge-tap-highlight')?.textContent).toBe(style?.textContent)+ expect(browser.window.__dshBridgeReceive).toBe(receive)+ })++ it('defers touch and safe-area styling until the root exists when injected before HTML content', () => {+ const browser = createBrowser({ rootAvailable: false, readyState: 'loading' })+ expect(browser.run(createNotificationShim(origin, nonce, ['top']))).toBe(true)+ expect(browser.styles.size).toBe(0)+ expect(browser.document.createElement).not.toHaveBeenCalled()+ browser.document.documentElement = browser.documentElement+ browser.document.head = { appendChild: browser.appendChild }+ browser.document.body = browser.body+ browser.document.dispatchEvent(new Event('DOMContentLoaded'))+ browser.document.dispatchEvent(new Event('DOMContentLoaded'))++ expect(browser.styles.get('dsh-bridge-tap-highlight')?.textContent).toContain('--dsh-mobile-safe-area-inset-top: 0px;')+ expect(browser.styles.get('dsh-bridge-tap-highlight')?.textContent).not.toContain('--dsh-mobile-safe-area-inset-bottom')+ expect(browser.styles.get('dsh-bridge-tap-highlight')?.textContent).toContain('* { -webkit-tap-highlight-color: transparent; }')+ expect(browser.styles.size).toBe(1)+ expect(browser.document.createElement).toHaveBeenCalledExactlyOnceWith('style')+ })++ it.each([{ locationOrigin: 'https://evil.test:3080' }, { topFrame: false }])('does not style or observe an untrusted document %j', (options) => {+ const browser = createBrowser(options)+ browser.documentElement.setAttribute('data-ds-theme-source', 'light')+ browser.window.__DSH_BOOT__ = {}+ browser.run(createNotificationShim(origin, nonce, ['top', 'bottom']))++ expect(browser.styles.size).toBe(0)+ expect(browser.document.createElement).not.toHaveBeenCalled()+ expect(browser.mutations).toEqual([])+ expect(browser.posts).not.toHaveBeenCalled()+ })++ it('mirrors the DSH-owned theme source only after readiness and follows mutations without duplicate observers or messages', () => {+ const browser = createBrowser({ readyState: 'loading' })+ browser.window.__DSH_BOOT__ = {}+ browser.documentElement.setAttribute('data-ds-theme-source', 'light')+ browser.inject()+ expect(browser.posts).not.toHaveBeenCalled()+ browser.document.readyState = 'complete'+ browser.window.dispatchEvent(new Event('load'))++ expect(browser.posts.mock.calls.map(([raw]) => parseNativeMessage(raw, nativeUrl, origin, nonce))).toEqual([+ { type: 'dsh://bridge-ready' },+ { type: 'dsh://theme-state', theme: 'light' },+ ])+ expect(browser.mutations).toHaveLength(1)+ expect(browser.mutations[0]!.observe).toHaveBeenCalledWith(browser.documentElement, { attributes: true, attributeFilter: ['data-ds-theme-source'] })+ browser.inject()+ browser.mutations[0]!.callback()+ expect(browser.posts).toHaveBeenCalledTimes(2)+ browser.documentElement.setAttribute('data-ds-theme-source', 'dark')+ browser.mutations[0]!.callback()+ browser.documentElement.setAttribute('data-ds-theme-source', 'system')+ browser.mutations[0]!.callback()+ expect(browser.posts.mock.calls.slice(2).map(([raw]) => parseNativeMessage(raw, nativeUrl, origin, nonce))).toEqual([+ { type: 'dsh://theme-state', theme: 'dark' },+ { type: 'dsh://theme-state', theme: 'system' },+ ])+ browser.window.dispatchEvent(new Event('pagehide'))+ expect(browser.mutations[0]!.disconnect).toHaveBeenCalledTimes(1)+ })++ it('follows legacy DSH body palette changes when no native theme-source marker is exposed', () => {+ const browser = createBrowser()+ browser.window.__dshClientCtx = {}+ browser.body.setAttribute('data-ds-dark-theme', '')+ browser.inject()+ expect(browser.posts.mock.calls.map(([raw]) => parseNativeMessage(raw, nativeUrl, origin, nonce))).toEqual([+ { type: 'dsh://bridge-ready' },+ { type: 'dsh://theme-state', theme: 'dark' },+ ])+ expect(browser.mutations).toHaveLength(1)+ expect(browser.mutations[0]!.observe).toHaveBeenCalledWith(browser.body, { attributes: true, attributeFilter: ['data-ds-dark-theme'] })+ browser.body.removeAttribute('data-ds-dark-theme')+ browser.mutations[0]!.callback()+ expect(parseNativeMessage(browser.posts.mock.calls[2]![0], nativeUrl, origin, nonce)).toEqual({ type: 'dsh://theme-state', theme: 'light' })+ })++ it('does not infer a light theme from a marker-free login page or incomplete arbitrary HTML', () => {+ const login = createBrowser({ login: true })+ login.inject()+ expect(login.posts.mock.calls.map(([raw]) => parseNativeMessage(raw, nativeUrl, origin, nonce))).toEqual([{ type: 'dsh://bridge-ready' }])+ const unverified = createBrowser()+ unverified.documentElement.setAttribute('data-ds-theme-source', 'light')+ unverified.inject()+ unverified.mutations[0]?.callback()+ expect(unverified.posts).not.toHaveBeenCalled()+ })+})++describe('notification shim trust boundary', () => {+ it.each([+ { locationOrigin: 'https://evil.test:3080' },+ { topFrame: false },+ ])('does not install into an untrusted page or subframe %j', (options) => {+ const browser = createBrowser(options)++ expect(browser.run(createNotificationShim(origin, nonce))).toBe(true)++ expect(browser.window.Notification).toBeUndefined()+ expect(browser.window.__dshBridgeNonce).toBeUndefined()+ expect(browser.window.__dshBridgeReceive).toBeUndefined()+ expect(browser.window.addEventListener).not.toHaveBeenCalled()+ expect(browser.posts).not.toHaveBeenCalled()+ })++ it('forwards an authenticated top-window notification event through the actual native parser', () => {+ const browser = createBrowser()+ browser.inject()++ browser.postMessage(payload)++ expect(browser.posts).toHaveBeenCalledTimes(1)+ const raw = browser.posts.mock.calls[0]?.[0]+ if (raw === undefined)+ throw new Error('Native notification envelope was not posted')+ expect(JSON.parse(raw)).toEqual({ channel: 'dsh-bridge', origin: 'https://harness.test:3080', nonce: 'bridge-nonce', payload })+ expect(parseNativeMessage(raw, nativeUrl, origin, nonce)).toEqual(payload)+ })++ it.each(['https://evil.test:3080', 'http://harness.test:3080', 'null', ''])('never forwards a message with foreign origin %j', (eventOrigin) => {+ const browser = createBrowser()+ browser.inject()++ browser.postMessage(payload, eventOrigin)++ expect(browser.posts).not.toHaveBeenCalled()+ })++ it.each([{}, null])('never forwards a same-origin message from another window or missing source %j', (source) => {+ const browser = createBrowser()+ browser.inject()++ browser.postMessage(payload, origin, source)++ expect(browser.posts).not.toHaveBeenCalled()+ })++ it('never forwards a same-origin notification event with omitted source', () => {+ const browser = createBrowser()+ browser.inject()++ browser.window.dispatchEvent(new BrowserMessageEvent('message', { origin, data: payload }))++ expect(browser.posts).not.toHaveBeenCalled()+ })++ it('ignores page message types outside the notification contract', () => {+ const browser = createBrowser()+ browser.inject()++ browser.postMessage({ type: 'dsh://focus-session', sessionId: 'session-alpha' })++ expect(browser.posts).not.toHaveBeenCalled()+ })++ it('does not throw when the native WebView postMessage endpoint is unavailable', () => {+ const browser = createBrowser()+ browser.window.ReactNativeWebView = undefined+ const Notification = browser.inject()++ expect(() => new Notification('Ready', { body: 'Done', tag: 'no-native-endpoint' })).not.toThrow()+ expect(browser.posts).not.toHaveBeenCalled()+ })+})++describe('notification constructor contract', () => {+ it('posts the title, body, tag, explicit session, and silent selection of a new Notification', () => {+ const browser = createBrowser()+ const Notification = browser.inject()++ const instance = new Notification('Response complete', { body: 'Your answer is ready', tag: 'dsh-notification-session-alpha-17', sessionId: 'explicit-session', silent: true })++ expect(instance.title).toBe('Response complete')+ expect(instance.body).toBe('Your answer is ready')+ expect(instance.tag).toBe('dsh-notification-session-alpha-17')+ expect(browser.posts.mock.calls.map(([raw]) => JSON.parse(raw))).toEqual([{+ channel: 'dsh-bridge',+ origin: 'https://harness.test:3080',+ nonce: 'bridge-nonce',+ payload: {+ type: 'dsh://native-notification',+ title: 'Response complete',+ body: 'Your answer is ready',+ tag: 'dsh-notification-session-alpha-17',+ sessionId: 'explicit-session',+ silent: true,+ },+ }])+ })++ it.each([+ ['dsh-notification-session-alpha-17', 'session-alpha'],+ ['dsh-notification-pending-session-alpha-17', 'session-alpha'],+ ['dsh-notification-session-with-hyphens-100', 'session-with-hyphens'],+ ['connection:https://harness.test:3080', ''],+ ['dsh-notification-session-alpha-not-a-number', ''],+ ])('derives a session from native tag=%s as %s', (tag, sessionId) => {+ const browser = createBrowser()+ const Notification = browser.inject()++ const instance = new Notification('Ready', { body: 'Done', tag })++ expect(instance.tag).toBe(tag)++ expect(browser.posts.mock.calls.map(([raw]) => JSON.parse(raw))).toEqual([{+ channel: 'dsh-bridge',+ origin: 'https://harness.test:3080',+ nonce: 'bridge-nonce',+ payload: { type: 'dsh://native-notification', title: 'Ready', body: 'Done', tag, sessionId, silent: false },+ }])+ })++ it('provides granted permission without requesting a browser permission dialog', async () => {+ const browser = createBrowser()+ const Notification = browser.inject()++ expect(Notification.permission).toBe('granted')+ await expect(Notification.requestPermission()).resolves.toBe('granted')+ expect(browser.posts).not.toHaveBeenCalled()+ })++ it('assigns distinct generated tags when callers omit the tag', () => {+ const browser = createBrowser()+ const Notification = browser.inject()++ const first = new Notification('First')+ const second = new Notification('Second')++ expect(first.tag).toMatch(/^mobile-\d+-1$/)+ expect(second.tag).toMatch(/^mobile-\d+-2$/)+ expect(first.tag).not.toBe(second.tag)+ expect(first.body).toBe('')+ expect(browser.posts).toHaveBeenCalledTimes(2)+ })++ it('coerces supported title and body values while requiring boolean true for silent mode', () => {+ const browser = createBrowser()+ const Notification = browser.inject()++ const instance = new Notification(17, { body: 23, tag: 'numeric-title', silent: 'true' })++ expect(instance.title).toBe('17')+ expect(instance.body).toBe('23')++ expect(browser.posts.mock.calls.map(([raw]) => JSON.parse(raw))).toEqual([{+ channel: 'dsh-bridge',+ origin: 'https://harness.test:3080',+ nonce: 'bridge-nonce',+ payload: { type: 'dsh://native-notification', title: '17', body: '23', tag: 'numeric-title', sessionId: '', silent: false },+ }])+ })++ it('preserves the constructor and existing click callback during repeated injection', () => {+ const browser = createBrowser()+ const Notification = browser.inject()+ const instance = new Notification('Ready', { tag: 'retained-tag' })+ const onclick = vi.fn<(event: Event) => void>()+ instance.onclick = onclick++ expect(browser.inject()).toBe(Notification)+ browser.run(nativeMessageScript(origin, nonce, { type: 'dsh://notification-clicked', tag: 'retained-tag' }))++ expect(browser.window.addEventListener).toHaveBeenCalledTimes(2)+ expect(onclick).toHaveBeenCalledExactlyOnceWith(expect.objectContaining({ type: 'click' }))+ expect(browser.posts).toHaveBeenCalledTimes(1)+ })+})++describe('native visibility messages', () => {+ it('mirrors hidden and visibilityState only when native visibility actually changes', () => {+ const browser = createBrowser()+ browser.inject()+ expect(browser.document.hidden).toBe(false)+ expect(browser.document.visibilityState).toBe('visible')++ browser.run(nativeMessageScript(origin, nonce, { type: 'dsh://visibility-state', hidden: true }))+ expect(browser.document.hidden).toBe(true)+ expect(browser.document.visibilityState).toBe('hidden')+ expect(browser.document.dispatchEvent).toHaveBeenCalledExactlyOnceWith(expect.objectContaining({ type: 'visibilitychange' }))+ browser.run(nativeMessageScript(origin, nonce, { type: 'dsh://visibility-state', hidden: true }))+ expect(browser.document.dispatchEvent).toHaveBeenCalledTimes(1)+ browser.run(nativeMessageScript(origin, nonce, { type: 'dsh://visibility-state', hidden: false }))++ expect(browser.document.hidden).toBe(false)+ expect(browser.document.visibilityState).toBe('visible')+ expect(browser.document.dispatchEvent).toHaveBeenCalledTimes(2)+ })++ it('preserves initial hidden state until the native app becomes active', () => {+ const browser = createBrowser({ hidden: true })+ browser.inject()++ expect(browser.document.hidden).toBe(true)+ expect(browser.document.visibilityState).toBe('hidden')+ browser.run(nativeMessageScript(origin, nonce, { type: 'dsh://visibility-state', hidden: false }))++ expect(browser.document.hidden).toBe(false)+ expect(browser.document.visibilityState).toBe('visible')+ expect(browser.document.dispatchEvent).toHaveBeenCalledTimes(1)+ })++ it('rejects visibility messages that bypass injection with an incorrect nonce', () => {+ const browser = createBrowser()+ browser.inject()++ browser.window.__dshBridgeReceive?.({ type: 'dsh://visibility-state', hidden: true, nonce: 'wrong-nonce' })++ expect(browser.document.hidden).toBe(false)+ expect(browser.document.visibilityState).toBe('visible')+ expect(browser.document.dispatchEvent).not.toHaveBeenCalled()+ })+})++describe('native click and focus messages', () => {+ it('invokes a retained Notification click callback once and broadcasts the native click to the page', () => {+ const browser = createBrowser()+ const Notification = browser.inject()+ const instance = new Notification('Ready', { tag: 'clicked-tag' })+ const onclick = vi.fn<(event: Event) => void>()+ instance.onclick = onclick+ const script = nativeMessageScript(origin, nonce, { type: 'dsh://notification-clicked', tag: 'clicked-tag' })++ browser.run(script)+ browser.run(script)++ expect(onclick).toHaveBeenCalledExactlyOnceWith(expect.objectContaining({ type: 'click' }))+ expect(browser.window.dispatchEvent).toHaveBeenCalledWith(expect.objectContaining({+ type: 'message',+ origin: 'https://harness.test:3080',+ data: { type: 'dsh://notification-clicked', tag: 'clicked-tag', nonce: 'bridge-nonce' },+ }))+ expect(browser.posts).toHaveBeenCalledTimes(1)+ })++ it('does not invoke a callback for a closed Notification', () => {+ const browser = createBrowser()+ const Notification = browser.inject()+ const instance = new Notification('Ready', { tag: 'closed-tag' })+ const onclick = vi.fn<(event: Event) => void>()+ instance.onclick = onclick+ instance.close()++ browser.run(nativeMessageScript(origin, nonce, { type: 'dsh://notification-clicked', tag: 'closed-tag' }))++ expect(onclick).not.toHaveBeenCalled()+ expect(browser.window.dispatchEvent).toHaveBeenCalledTimes(1)+ })++ it('routes a replaced notification tag to the most recent Notification instance', () => {+ const browser = createBrowser()+ const Notification = browser.inject()+ const oldClick = vi.fn<(event: Event) => void>()+ const newClick = vi.fn<(event: Event) => void>()+ new Notification('Old', { tag: 'shared-tag' }).onclick = oldClick+ new Notification('New', { tag: 'shared-tag' }).onclick = newClick++ browser.run(nativeMessageScript(origin, nonce, { type: 'dsh://notification-clicked', tag: 'shared-tag' }))++ expect(oldClick).not.toHaveBeenCalled()+ expect(newClick).toHaveBeenCalledExactlyOnceWith(expect.objectContaining({ type: 'click' }))+ })++ it('bounds retained notification callbacks to the most recent 128 instances', () => {+ const browser = createBrowser()+ const Notification = browser.inject()+ const oldClick = vi.fn<(event: Event) => void>()+ const recentClick = vi.fn<(event: Event) => void>()+ new Notification('Old', { tag: 'tag-0' }).onclick = oldClick+ for (let index = 1; index < 128; index++) {+ const instance = new Notification('Middle', { tag: `tag-${index}` })+ expect(instance.tag).toBe(`tag-${index}`)+ }+ new Notification('Recent', { tag: 'tag-128' }).onclick = recentClick++ browser.run(nativeMessageScript(origin, nonce, { type: 'dsh://notification-clicked', tag: 'tag-0' }))+ browser.run(nativeMessageScript(origin, nonce, { type: 'dsh://notification-clicked', tag: 'tag-128' }))++ expect(oldClick).not.toHaveBeenCalled()+ expect(recentClick).toHaveBeenCalledExactlyOnceWith(expect.objectContaining({ type: 'click' }))+ })++ it('round-trips a tag-derived session through the optional official workspace service and acknowledged focus', () => {+ const browser = createBrowser()+ const Notification = browser.inject()+ const focus = vi.fn<(sessionId: string) => void>()+ const get = vi.fn().mockReturnValue({ openSession: focus })+ browser.window.__dshClientCtx = {+ get,+ get uiWorkspace(): { openSession: (sessionId: string) => void } { throw new Error('cannot get property "uiWorkspace" without inject') },+ }+ const instance = new Notification('Ready', { body: 'Done', tag: 'dsh-notification-pending-session-alpha-17' })+ const onclick = vi.fn()+ instance.onclick = onclick+ const raw = browser.posts.mock.calls[0]?.[0]+ if (raw === undefined)+ throw new Error('Tag-derived notification was not posted')+ const message = parseNativeMessage(raw, nativeUrl, origin, nonce)+ expect(message).toEqual({ type: 'dsh://native-notification', title: 'Ready', body: 'Done', tag: 'dsh-notification-pending-session-alpha-17', sessionId: 'session-alpha', silent: false })+ if (message?.type !== 'dsh://native-notification')+ throw new Error('Tag-derived notification failed native validation')++ browser.run(nativeMessageScript(origin, nonce, { type: 'dsh://focus-session', requestId: 'request-1', sessionId: message.sessionId, tag: message.tag, title: message.title }))++ expect(get).toHaveBeenCalledExactlyOnceWith('uiWorkspace')+ expect(focus).toHaveBeenCalledExactlyOnceWith('session-alpha')+ expect(onclick).toHaveBeenCalledExactlyOnceWith(expect.objectContaining({ type: 'click' }))+ expect(browser.document.querySelectorAll).not.toHaveBeenCalled()+ expect(browser.window.dispatchEvent).toHaveBeenCalledExactlyOnceWith(expect.objectContaining({+ type: 'message',+ source: browser.window,+ origin: 'https://harness.test:3080',+ data: { type: 'dsh://focus-session', requestId: 'request-1', sessionId: 'session-alpha', tag: 'dsh-notification-pending-session-alpha-17', title: 'Ready' },+ }))+ expect(parseNativeMessage(browser.posts.mock.calls[1]![0], nativeUrl, origin, nonce)).toEqual({ type: 'dsh://focus-result', requestId: 'request-1', handled: true })+ })++ it('uses the actual DSH session row key rather than an invented session attribute', () => {+ const unrelated = sessionNode({ 'data-row-key': 'workspace:session-alpha' })+ const target = sessionNode({ 'data-row-key': 'session:session-alpha' })+ const duplicate = sessionNode({ 'data-row-key': 'session:session-alpha' })+ const browser = createBrowser({ nodes: [unrelated, target, duplicate] })+ browser.inject()++ browser.run(nativeMessageScript(origin, nonce, { type: 'dsh://focus-session', requestId: 'row-request', sessionId: 'session-alpha', tag: 'tag' }))++ expect(browser.document.querySelectorAll).toHaveBeenCalledExactlyOnceWith('[data-row-key]')+ expect(unrelated.click).not.toHaveBeenCalled()+ expect(target.click).toHaveBeenCalledExactlyOnceWith()+ expect(duplicate.click).not.toHaveBeenCalled()+ expect(parseNativeMessage(browser.posts.mock.calls[0]![0], nativeUrl, origin, nonce)).toEqual({ type: 'dsh://focus-result', requestId: 'row-request', handled: true })+ })++ it('supports the verified older sessions.open contract when the optional workspace service is absent', () => {+ const browser = createBrowser()+ browser.inject()+ const open = vi.fn()+ browser.window.__dshClientCtx = { get: vi.fn().mockReturnValue(undefined), sessions: { open } }++ browser.run(nativeMessageScript(origin, nonce, { type: 'dsh://focus-session', requestId: 'old-request', sessionId: 'session-alpha', tag: 'tag' }))++ expect(open).toHaveBeenCalledExactlyOnceWith('session-alpha')+ expect(parseNativeMessage(browser.posts.mock.calls[0]![0], nativeUrl, origin, nonce)).toEqual({ type: 'dsh://focus-result', requestId: 'old-request', handled: true })+ })++ it('does not select a session for an application-level notification with an empty session identifier', () => {+ const browser = createBrowser()+ browser.inject()+ const focus = vi.fn()+ browser.window.__dshClientCtx = { uiWorkspace: { openSession: focus } }++ browser.run(nativeMessageScript(origin, nonce, { type: 'dsh://focus-session', requestId: 'app-request', sessionId: '', tag: 'app-tag' }))++ expect(focus).not.toHaveBeenCalled()+ expect(browser.document.querySelectorAll).not.toHaveBeenCalled()+ expect(parseNativeMessage(browser.posts.mock.calls[0]![0], nativeUrl, origin, nonce)).toEqual({ type: 'dsh://focus-result', requestId: 'app-request', handled: true })+ })++ it('does not invoke focus or click callbacks when a direct native message has the wrong nonce', () => {+ const browser = createBrowser()+ const focus = vi.fn<(sessionId: string) => void>()+ const onclick = vi.fn<(event: Event) => void>()+ browser.window.__dshClientCtx = { uiWorkspace: { openSession: focus } }+ const Notification = browser.inject()+ new Notification('Ready', { tag: 'protected-tag' }).onclick = onclick++ browser.window.__dshBridgeReceive?.({ type: 'dsh://focus-session', requestId: 'wrong-request', sessionId: 'session-alpha', tag: 'protected-tag', nonce: 'wrong-nonce' })+ browser.window.__dshBridgeReceive?.({ type: 'dsh://notification-clicked', tag: 'protected-tag', nonce: 'wrong-nonce' })++ expect(focus).not.toHaveBeenCalled()+ expect(onclick).not.toHaveBeenCalled()+ expect(browser.window.dispatchEvent).not.toHaveBeenCalled()+ })+})++describe('authenticated document readiness', () => {+ it('accepts only the explicitly whitelisted readiness payload after the usual origin and nonce checks', () => {+ expect(parseNativeMessage(envelope({ type: 'dsh://bridge-ready', ignored: 'extra' }), nativeUrl, origin, nonce)).toEqual({ type: 'dsh://bridge-ready' })+ expect(parseNativeMessage(envelope({ type: 'dsh://bridge-ready' }), 'about:blank', origin, nonce)).toBeNull()+ expect(parseNativeMessage(envelope({ type: 'dsh://bridge-ready' }), nativeUrl, origin, 'other-nonce')).toBeNull()+ })++ it('does not declare an Android error document or arbitrary HTML successful just because it is complete', () => {+ const browser = createBrowser()+ browser.inject()+ browser.window.dispatchEvent(new Event('load'))++ expect(browser.posts).not.toHaveBeenCalled()+ })++ it.each(['boot', 'context', 'login'] as const)('recognizes a completed verified %s document and sends readiness only once', (kind) => {+ const browser = createBrowser({ login: kind === 'login' })+ if (kind === 'boot')+ browser.window.__DSH_BOOT__ = {}+ if (kind === 'context')+ browser.window.__dshClientCtx = {}+ browser.inject()+ browser.inject()++ const expected: Array<{ type: string, theme?: string }> = [{ type: 'dsh://bridge-ready' }]+ if (kind !== 'login')+ expected.push({ type: 'dsh://theme-state', theme: 'light' })+ expect(browser.posts.mock.calls.map(([raw]) => parseNativeMessage(raw, nativeUrl, origin, nonce))).toEqual(expected)+ })++ it('rechecks a later DSH fingerprint on same-nonce reinjection without replacing the shim or sending readiness twice', () => {+ const browser = createBrowser()+ const Notification = browser.inject()+ const listenerCount = vi.mocked(browser.window.addEventListener).mock.calls.length+ expect(browser.posts).not.toHaveBeenCalled()+ browser.window.__DSH_BOOT__ = {}++ expect(browser.inject()).toBe(Notification)+ browser.inject()++ expect(browser.posts.mock.calls.map(([raw]) => parseNativeMessage(raw, nativeUrl, origin, nonce))).toEqual([+ { type: 'dsh://bridge-ready' },+ { type: 'dsh://theme-state', theme: 'light' },+ ])+ expect(browser.window.addEventListener).toHaveBeenCalledTimes(listenerCount)+ })++ it('does not declare readiness on reinjection while the verified document is still loading', () => {+ const browser = createBrowser({ readyState: 'loading' })+ browser.inject()+ browser.window.__dshClientCtx = {}+ browser.inject()+ expect(browser.posts).not.toHaveBeenCalled()+ browser.document.readyState = 'complete'+ browser.window.dispatchEvent(new Event('load'))+ browser.inject()++ expect(browser.posts.mock.calls.map(([raw]) => parseNativeMessage(raw, nativeUrl, origin, nonce))).toEqual([+ { type: 'dsh://bridge-ready' },+ { type: 'dsh://theme-state', theme: 'light' },+ ])+ })++ it('retries readiness when the native message endpoint was absent during the first verified injection', () => {+ const browser = createBrowser()+ browser.window.__DSH_BOOT__ = {}+ browser.window.ReactNativeWebView = undefined+ const Notification = browser.inject()+ expect(browser.posts).not.toHaveBeenCalled()+ browser.window.ReactNativeWebView = { postMessage: browser.posts }++ expect(browser.inject()).toBe(Notification)+ browser.inject()++ expect(browser.posts.mock.calls.map(([raw]) => parseNativeMessage(raw, nativeUrl, origin, nonce))).toEqual([+ { type: 'dsh://bridge-ready' },+ { type: 'dsh://theme-state', theme: 'light' },+ ])+ })++ it.each(['origin', 'frame'] as const)('still rejects reinjection when the current %s is no longer trusted', (boundary) => {+ const browser = createBrowser()+ const Notification = browser.inject()+ browser.window.__DSH_BOOT__ = {}+ if (boundary === 'origin')+ browser.location.origin = 'https://foreign.test'+ else+ browser.window.top = {}++ expect(browser.run(createNotificationShim(origin, nonce))).toBe(true)++ expect(browser.window.Notification).toBe(Notification)+ expect(browser.posts).not.toHaveBeenCalled()+ })++ it('waits for document completion rather than native load-finish when injected before page content', () => {+ const browser = createBrowser({ readyState: 'loading' })+ browser.window.__DSH_BOOT__ = {}+ browser.inject()+ expect(browser.posts).not.toHaveBeenCalled()+ browser.document.readyState = 'complete'+ browser.window.dispatchEvent(new Event('load'))+ browser.window.dispatchEvent(new Event('load'))++ expect(browser.posts.mock.calls.map(([raw]) => parseNativeMessage(raw, nativeUrl, origin, nonce))).toEqual([+ { type: 'dsh://bridge-ready' },+ { type: 'dsh://theme-state', theme: 'light' },+ ])+ })+})++describe('focus acknowledgments and cold startup', () => {+ it.each([+ { type: 'dsh://focus-result', handled: true },+ { type: 'dsh://focus-result', requestId: '', handled: true },+ { type: 'dsh://focus-result', requestId: 1, handled: true },+ { type: 'dsh://focus-result', requestId: 'r'.repeat(129), handled: true },+ { type: 'dsh://focus-result', requestId: 'r' },+ { type: 'dsh://focus-result', requestId: 'r', handled: 'true' },+ ])('rejects invalid focus result metadata %j', (message) => {+ expect(parseNativeMessage(envelope(message), nativeUrl, origin, nonce)).toBeNull()+ })++ it.each([true, false])('round-trips a bounded focus result with handled=%s', (handled) => {+ const requestId = 'r'.repeat(128)+ expect(parseNativeMessage(envelope({ type: 'dsh://focus-result', requestId, handled }), nativeUrl, origin, nonce)).toEqual({ type: 'dsh://focus-result', requestId, handled })+ })++ it('retries until the real client context registers and then acknowledges exactly one selection', async () => {+ vi.useFakeTimers()+ const browser = createBrowser()+ browser.inject()+ const openSession = vi.fn()+ browser.run(nativeMessageScript(origin, nonce, { type: 'dsh://focus-session', requestId: 'cold-request', sessionId: 'session-cold', tag: 'cold-tag' }))+ await vi.advanceTimersByTimeAsync(400)+ expect(browser.posts).not.toHaveBeenCalled()+ browser.window.__dshClientCtx = { get: vi.fn().mockReturnValue({ openSession }) }+ await vi.advanceTimersByTimeAsync(200)++ expect(openSession).toHaveBeenCalledExactlyOnceWith('session-cold')+ expect(parseNativeMessage(browser.posts.mock.calls[0]![0], nativeUrl, origin, nonce)).toEqual({ type: 'dsh://focus-result', requestId: 'cold-request', handled: true })+ await vi.advanceTimersByTimeAsync(20000)+ expect(browser.posts).toHaveBeenCalledTimes(1)+ expect(vi.getTimerCount()).toBe(0)+ })++ it('does not steal focus while the page is still loading or the app is hidden', async () => {+ vi.useFakeTimers()+ const browser = createBrowser({ readyState: 'loading', hidden: true })+ browser.inject()+ const openSession = vi.fn()+ browser.window.__dshClientCtx = { uiWorkspace: { openSession } }+ browser.run(nativeMessageScript(origin, nonce, { type: 'dsh://focus-session', requestId: 'visible-request', sessionId: 'session-visible', tag: 'tag' }))+ await vi.advanceTimersByTimeAsync(200)+ browser.document.readyState = 'complete'+ await vi.advanceTimersByTimeAsync(200)+ expect(openSession).not.toHaveBeenCalled()+ browser.run(nativeMessageScript(origin, nonce, { type: 'dsh://visibility-state', hidden: false }))+ await vi.advanceTimersByTimeAsync(200)++ expect(openSession).toHaveBeenCalledExactlyOnceWith('session-visible')+ expect(parseNativeMessage(browser.posts.mock.calls[0]![0], nativeUrl, origin, nonce)).toEqual({ type: 'dsh://focus-result', requestId: 'visible-request', handled: true })+ })++ it('returns a negative acknowledgment at the exact fifteen-second budget instead of losing a cold click', async () => {+ vi.useFakeTimers()+ const browser = createBrowser()+ browser.inject()+ browser.run(nativeMessageScript(origin, nonce, { type: 'dsh://focus-session', requestId: 'expired-request', sessionId: 'not-ready', tag: 'tag' }))+ await vi.advanceTimersByTimeAsync(14999)+ expect(browser.posts).not.toHaveBeenCalled()+ await vi.advanceTimersByTimeAsync(1)++ expect(parseNativeMessage(browser.posts.mock.calls[0]![0], nativeUrl, origin, nonce)).toEqual({ type: 'dsh://focus-result', requestId: 'expired-request', handled: false })+ expect(vi.getTimerCount()).toBe(0)+ })++ it('cancels superseded requests and never selects their stale session later', async () => {+ vi.useFakeTimers()+ const browser = createBrowser()+ browser.inject()+ browser.run(nativeMessageScript(origin, nonce, { type: 'dsh://focus-session', requestId: 'first', sessionId: 'session-old', tag: 'tag-old' }))+ browser.run(nativeMessageScript(origin, nonce, { type: 'dsh://focus-session', requestId: 'second', sessionId: 'session-new', tag: 'tag-new' }))+ const openSession = vi.fn()+ browser.window.__dshClientCtx = { uiWorkspace: { openSession } }+ await vi.advanceTimersByTimeAsync(200)++ expect(openSession).toHaveBeenCalledExactlyOnceWith('session-new')+ expect(parseNativeMessage(browser.posts.mock.calls[0]![0], nativeUrl, origin, nonce)).toEqual({ type: 'dsh://focus-result', requestId: 'second', handled: true })+ expect(browser.posts).toHaveBeenCalledTimes(1)+ })++ it('only cancels the request named by the native cleanup and releases its timer', async () => {+ vi.useFakeTimers()+ const browser = createBrowser()+ browser.inject()+ browser.run(nativeMessageScript(origin, nonce, { type: 'dsh://focus-session', requestId: 'cancelled', sessionId: 'session-old', tag: 'tag' }))+ browser.run(nativeMessageScript(origin, nonce, { type: 'dsh://cancel-focus', requestId: 'other' }))+ expect(vi.getTimerCount()).toBe(1)+ browser.run(nativeMessageScript(origin, nonce, { type: 'dsh://cancel-focus', requestId: 'cancelled' }))+ expect(vi.getTimerCount()).toBe(0)+ const openSession = vi.fn()+ browser.window.__dshClientCtx = { uiWorkspace: { openSession } }+ await vi.advanceTimersByTimeAsync(20000)+ expect(openSession).not.toHaveBeenCalled()+ expect(browser.posts).not.toHaveBeenCalled()+ })++ it('releases a pending cold-focus timer when the document navigates away', () => {+ vi.useFakeTimers()+ const browser = createBrowser()+ browser.inject()+ browser.run(nativeMessageScript(origin, nonce, { type: 'dsh://focus-session', requestId: 'page-request', sessionId: 'session', tag: 'tag' }))+ expect(vi.getTimerCount()).toBe(1)+ browser.window.dispatchEvent(new Event('pagehide'))+ expect(vi.getTimerCount()).toBe(0)+ })++ it('acknowledges retries of an already handled request without selecting or clicking twice', () => {+ const browser = createBrowser()+ const Notification = browser.inject()+ const openSession = vi.fn()+ const onclick = vi.fn()+ browser.window.__dshClientCtx = { uiWorkspace: { openSession } }+ new Notification('Ready', { tag: 'tag' }).onclick = onclick+ browser.posts.mockClear()+ const script = nativeMessageScript(origin, nonce, { type: 'dsh://focus-session', requestId: 'replayed', sessionId: 'session', tag: 'tag' })+ browser.run(script)+ browser.run(script)++ expect(openSession).toHaveBeenCalledExactlyOnceWith('session')+ expect(onclick).toHaveBeenCalledTimes(1)+ expect(browser.posts.mock.calls.map(([raw]) => parseNativeMessage(raw, nativeUrl, origin, nonce))).toEqual([+ { type: 'dsh://focus-result', requestId: 'replayed', handled: true },+ { type: 'dsh://focus-result', requestId: 'replayed', handled: true },+ ])+ })+})++describe('nativeMessageScript origin guard', () => {+ it('delivers a native payload only to the installed top-page bridge', () => {+ const browser = createBrowser()+ const receive = vi.fn<(data: Record<string, unknown>) => void>()+ browser.window.__dshBridgeNonce = nonce+ browser.window.__dshBridgeReceive = receive++ expect(browser.run(nativeMessageScript(origin, nonce, { type: 'dsh://visibility-state', hidden: true }))).toBe(true)++ expect(receive).toHaveBeenCalledExactlyOnceWith({ type: 'dsh://visibility-state', hidden: true, nonce: 'bridge-nonce' })+ })++ it.each([+ { locationOrigin: 'https://evil.test:3080' },+ { locationOrigin: 'http://harness.test:3080' },+ { topFrame: false },+ ])('does not expose a native payload after untrusted navigation or in a subframe %j', (options) => {+ const browser = createBrowser(options)+ const receive = vi.fn<(data: Record<string, unknown>) => void>()+ browser.window.__dshBridgeNonce = nonce+ browser.window.__dshBridgeReceive = receive++ expect(browser.run(nativeMessageScript(origin, nonce, { type: 'dsh://focus-session', sessionId: 'private-session' }))).toBe(true)++ expect(receive).not.toHaveBeenCalled()+ })++ it('rejects injection when the installed bridge nonce belongs to another WebView generation', () => {+ const browser = createBrowser()+ const receive = vi.fn<(data: Record<string, unknown>) => void>()+ browser.window.__dshBridgeNonce = 'old-bridge-nonce'+ browser.window.__dshBridgeReceive = receive++ browser.run(nativeMessageScript(origin, nonce, { type: 'dsh://focus-session', sessionId: 'private-session' }))++ expect(receive).not.toHaveBeenCalled()+ })++ it('completes safely if the page bridge receiver has not been installed', () => {+ const browser = createBrowser()+ browser.window.__dshBridgeNonce = nonce++ expect(browser.run(nativeMessageScript(origin, nonce, { type: 'dsh://visibility-state', hidden: true }))).toBe(true)+ expect(browser.window.__dshBridgeReceive).toBeUndefined()+ })++ it('serializes quotes and control characters without executing payload text', () => {+ const browser = createBrowser()+ const receive = vi.fn<(data: Record<string, unknown>) => void>()+ browser.window.__dshBridgeNonce = nonce+ browser.window.__dshBridgeReceive = receive+ const sessionId = '\"\\\n; throw new Error(\"payload executed\"); //'++ expect(browser.run(nativeMessageScript(origin, nonce, { type: 'dsh://focus-session', sessionId }))).toBe(true)++ expect(receive).toHaveBeenCalledExactlyOnceWith({ type: 'dsh://focus-session', sessionId: '\"\\\n; throw new Error(\"payload executed\"); //', nonce: 'bridge-nonce' })+ })++ it('does not allow payload metadata to override the authenticated native nonce', () => {+ const browser = createBrowser()+ const receive = vi.fn<(data: Record<string, unknown>) => void>()+ browser.window.__dshBridgeNonce = nonce+ browser.window.__dshBridgeReceive = receive++ browser.run(nativeMessageScript(origin, nonce, { type: 'dsh://visibility-state', hidden: true, nonce: 'forged-nonce' }))++ expect(receive).toHaveBeenCalledExactlyOnceWith({ type: 'dsh://visibility-state', hidden: true, nonce: 'bridge-nonce' })+ })+})diff --git a/src-native/utils/webview-bridge.ts b/src-native/utils/webview-bridge.tsnew file mode 100644index 00000000..648350d4--- /dev/null+++ b/src-native/utils/webview-bridge.ts@@ -0,0 +1,377 @@+import type { Edge } from 'react-native-safe-area-context'+import type { NativeNotificationMessage } from './notification-policy'+import { FOCUS_RETRY_INTERVAL_MS, FOCUS_TIMEOUT_MS } from '@/config/constants'+import { isRecord, isTrustedOrigin } from './bridge-protocol'++export type NativeWebViewMessage+ = | NativeNotificationMessage+ | { type: 'dsh://bridge-ready' }+ | { type: 'dsh://theme-state', theme: 'light' | 'dark' | 'system' }+ | { type: 'dsh://focus-result', requestId: string, handled: boolean }++export function parseNativeMessage(raw: string, nativeUrl: string, expectedOrigin: string, nonce: string): NativeWebViewMessage | null {+ if (raw.length > 16384 || !isTrustedOrigin(nativeUrl, expectedOrigin))+ return null+ try {+ const value: unknown = JSON.parse(raw)+ if (!isRecord(value) || value.channel !== 'dsh-bridge' || value.nonce !== nonce || value.origin !== expectedOrigin)+ return null+ const payload = value.payload+ if (!isRecord(payload))+ return null+ if (payload.type === 'dsh://bridge-ready')+ return { type: 'dsh://bridge-ready' }+ if (payload.type === 'dsh://theme-state') {+ if (payload.theme !== 'light' && payload.theme !== 'dark' && payload.theme !== 'system')+ return null+ return { type: 'dsh://theme-state', theme: payload.theme }+ }+ if (payload.type === 'dsh://focus-result') {+ if (typeof payload.requestId !== 'string' || !payload.requestId || payload.requestId.length > 128 || typeof payload.handled !== 'boolean')+ return null+ return { type: 'dsh://focus-result', requestId: payload.requestId, handled: payload.handled }+ }+ if (payload.type !== 'dsh://native-notification')+ return null+ if (typeof payload.title !== 'string' || typeof payload.body !== 'string')+ return null+ if (!payload.title.trim() || payload.title.length > 256 || payload.body.length > 4096)+ return null+ if (payload.tag !== undefined && (typeof payload.tag !== 'string' || payload.tag.length > 256))+ return null+ if (payload.sessionId !== undefined && (typeof payload.sessionId !== 'string' || payload.sessionId.length > 256))+ return null+ if (payload.silent !== undefined && typeof payload.silent !== 'boolean')+ return null+ return {+ type: 'dsh://native-notification',+ title: payload.title,+ body: payload.body,+ tag: String(payload.tag ?? ''),+ sessionId: String(payload.sessionId ?? ''),+ silent: payload.silent === true,+ }+ }+ catch {+ return null+ }+}++export function createNotificationShim(origin: string, nonce: string, nativeSafeAreaEdges: readonly Edge[] = []): string {+ const safeAreaStyle = nativeSafeAreaEdges.length+ ? `:root { ${nativeSafeAreaEdges.map(edge => `--dsh-mobile-safe-area-inset-${edge}: 0px;`).join(' ')} } `+ : ''+ return `+(function () {+ var expectedOrigin = ${JSON.stringify(origin)};+ var nonce = ${JSON.stringify(nonce)};+ if (window.top !== window || location.origin !== expectedOrigin) return;+ function suppressTapHighlight() {+ var style = document.getElementById('dsh-bridge-tap-highlight');+ if (!style) {+ style = document.createElement('style');+ style.id = 'dsh-bridge-tap-highlight';+ (document.head || document.documentElement).appendChild(style);+ }+ style.textContent = ${JSON.stringify(`${safeAreaStyle}* { -webkit-tap-highlight-color: transparent; }`)};+ }+ if (document.documentElement) suppressTapHighlight();+ else document.addEventListener('DOMContentLoaded', suppressTapHighlight, { once: true });+ if (window.__dshBridgeNonce === nonce) {+ if (typeof window.__dshBridgeReady === 'function') window.__dshBridgeReady();+ return;+ }+ if (typeof window.__dshBridgeDispose === 'function') window.__dshBridgeDispose();+ window.__dshBridgeNonce = nonce;+ var active = true;+ var instances = new Map();+ var sessionRunning = new Map();+ var completionSent = new Set();+ var completionTimers = new Map();+ var listSource = null;+ var statusSource = null;+ var disposeList = null;+ var disposeStatus = null;+ var sessionWatchTimer = null;+ var sessionWatchAttempts = 0;+ var hidden = document.hidden;+ var sequence = 0;+ var pendingFocus = null;+ var focusStartedAt = 0;+ var focusTimer = null;+ var results = new Map();+ function send(payload) {+ if (!active || window.__dshBridgeNonce !== nonce || !window.ReactNativeWebView) return false;+ var raw = JSON.stringify({ channel: 'dsh-bridge', origin: expectedOrigin, nonce: nonce, payload: payload });+ if (raw.length > 16384) return false;+ window.ReactNativeWebView.postMessage(raw);+ return true;+ }+ function cancelCompletion(sessionId) {+ clearTimeout(completionTimers.get(sessionId));+ completionTimers.delete(sessionId);+ }+ function forwardNotification(payload) {+ // Why: rejected native payloads must not consume an otherwise valid completion fallback.+ if (payload.type !== 'dsh://native-notification' || typeof payload.title !== 'string' || !payload.title.trim()+ || payload.title.length > 256 || typeof payload.body !== 'string' || payload.body.length > 4096+ || (payload.tag !== undefined && (typeof payload.tag !== 'string' || payload.tag.length > 256))+ || (payload.sessionId !== undefined && (typeof payload.sessionId !== 'string' || payload.sessionId.length > 256))+ || (payload.silent !== undefined && typeof payload.silent !== 'boolean')) return;+ var tag = payload.tag || '';+ var sessionId = payload.sessionId || sessionIdFromTag(tag);+ var completed = /^dsh-notification-(?!pending-).+-\\d+$/.test(tag) && sessionRunning.has(sessionId);+ if (completed && completionSent.has(sessionId)) return;+ if (send(payload) && completed) {+ cancelCompletion(sessionId);+ completionSent.add(sessionId);+ }+ }+ function sessionIdFromTag(tag) {+ var match = /^dsh-notification-(?:pending-)?(.+)-\\d+$/.exec(tag || '');+ return match ? match[1] : '';+ }+ function DshNotification(title, options) {+ options = options || {};+ this.title = String(title || '');+ this.body = String(options.body || '');+ this.tag = String(options.tag || ('mobile-' + Date.now() + '-' + (++sequence)));+ this.onclick = null;+ this.onclose = null;+ this.onaction = null;+ instances.set(this.tag, this);+ if (instances.size > 128) instances.delete(instances.keys().next().value);+ forwardNotification({+ type: 'dsh://native-notification', title: this.title, body: this.body,+ tag: this.tag, sessionId: options.sessionId || sessionIdFromTag(this.tag),+ silent: options.silent === true+ });+ }+ DshNotification.permission = 'granted';+ DshNotification.requestPermission = function () { return Promise.resolve('granted'); };+ DshNotification.prototype.close = function () { instances.delete(this.tag); };+ window.Notification = DshNotification;+ try {+ Object.defineProperty(document, 'hidden', { configurable: true, get: function () { return hidden; } });+ Object.defineProperty(document, 'visibilityState', { configurable: true, get: function () { return hidden ? 'hidden' : 'visible'; } });+ } catch (_) {}+ function receiveNotification(event) {+ if (event.origin !== expectedOrigin || event.source !== window) return;+ var data = event.data;+ if (data && data.type === 'dsh://native-notification') forwardNotification(data);+ }+ window.addEventListener('message', receiveNotification);+ function focusResult(data, handled) {+ results.set(data.requestId, handled);+ if (results.size > 32) results.delete(results.keys().next().value);+ send({ type: 'dsh://focus-result', requestId: data.requestId, handled: handled });+ }+ function openSession(sessionId) {+ if (!sessionId) return true;+ var ctx = window.__dshClientCtx;+ try {+ var workspace = ctx && (typeof ctx.get === 'function' ? ctx.get('uiWorkspace') : ctx.uiWorkspace);+ if (workspace && typeof workspace.openSession === 'function') {+ workspace.openSession(sessionId);+ return true;+ }+ } catch (_) {}+ // Why: DSH 0.1.6 moved session selection from sessions.open to uiWorkspace.openSession.+ try {+ var sessions = ctx && ctx.sessions;+ if (sessions && typeof sessions.open === 'function') {+ sessions.open(sessionId);+ return true;+ }+ } catch (_) {}+ var nodes = document.querySelectorAll('[data-row-key]');+ for (var i = 0; i < nodes.length; i++) {+ if (nodes[i].getAttribute('data-row-key') === 'session:' + sessionId) {+ nodes[i].click();+ return true;+ }+ }+ return false;+ }+ function tryFocus() {+ focusTimer = null;+ var data = pendingFocus;+ if (!data) return;+ if (!hidden && document.readyState === 'complete' && openSession(data.sessionId)) {+ pendingFocus = null;+ var instance = instances.get(data.tag);+ if (instance) {+ instances.delete(data.tag);+ try { if (typeof instance.onclick === 'function') instance.onclick(new Event('click')); } catch (_) {}+ }+ window.dispatchEvent(new MessageEvent('message', { data: data, origin: expectedOrigin, source: window }));+ focusResult(data, true);+ return;+ }+ if (Date.now() - focusStartedAt >= ${FOCUS_TIMEOUT_MS}) {+ pendingFocus = null;+ focusResult(data, false);+ return;+ }+ focusTimer = setTimeout(tryFocus, ${FOCUS_RETRY_INTERVAL_MS});+ }+ window.__dshBridgeReceive = function (data) {+ if (!active || window.__dshBridgeNonce !== nonce || !data || data.nonce !== nonce) return;+ if (data.type === 'dsh://visibility-state') {+ if (hidden !== !!data.hidden) {+ hidden = !!data.hidden;+ document.dispatchEvent(new Event('visibilitychange'));+ }+ }+ if (data.type === 'dsh://notification-clicked') {+ var instance = instances.get(data.tag);+ if (instance) {+ instances.delete(data.tag);+ if (typeof instance.onclick === 'function') instance.onclick(new Event('click'));+ }+ window.dispatchEvent(new MessageEvent('message', { data: data, origin: expectedOrigin }));+ }+ if (data.type === 'dsh://cancel-focus' && pendingFocus && pendingFocus.requestId === data.requestId) {+ pendingFocus = null;+ clearTimeout(focusTimer);+ focusTimer = null;+ }+ if (data.type === 'dsh://focus-session' && typeof data.requestId === 'string' && data.requestId && typeof data.sessionId === 'string' && typeof data.tag === 'string') {+ if (results.has(data.requestId)) {+ send({ type: 'dsh://focus-result', requestId: data.requestId, handled: results.get(data.requestId) });+ return;+ }+ clearTimeout(focusTimer);+ pendingFocus = { type: data.type, requestId: data.requestId, sessionId: data.sessionId, tag: data.tag, title: data.title };+ focusStartedAt = Date.now();+ tryFocus();+ }+ };+ function readService(name) {+ var ctx = window.__dshClientCtx;+ try { return ctx && (typeof ctx.get === 'function' ? ctx.get(name) : ctx[name]); } catch (_) {}+ }+ function sessionObservation(sessionId, list, statuses) {+ var summary = list && list.byId[sessionId];+ if (!summary || summary.origin === 'subagent') return;+ var status = statuses && statuses.get(sessionId);+ return { summary: summary, running: statusSource ? status && status.running : summary.running, pending: status && status.pendingInteraction };+ }+ function observeSessions() {+ if (!active || window.__dshBridgeNonce !== nonce || !listSource) return;+ var list = listSource.getSnapshot();+ var statuses = statusSource && statusSource.getSnapshot();+ var present = new Set();+ list.ids.forEach(function (sessionId) {+ var observed = sessionObservation(sessionId, list, statuses);+ if (!observed) return;+ present.add(sessionId);+ var previous = sessionRunning.get(sessionId);+ sessionRunning.set(sessionId, observed.running);+ if (observed.running === true && previous !== true) {+ completionSent.delete(sessionId);+ cancelCompletion(sessionId);+ }+ if (previous === true && observed.running === false && !observed.pending && hidden) {+ cancelCompletion(sessionId);+ completionTimers.set(sessionId, setTimeout(function () {+ completionTimers.delete(sessionId);+ var latestList = listSource && listSource.getSnapshot();+ var current = sessionObservation(sessionId, latestList, statusSource && statusSource.getSnapshot());+ if (!active || !hidden || !current || latestList.ids.indexOf(sessionId) === -1+ || current.running !== false || current.pending || completionSent.has(sessionId)) return;+ var title = String(current.summary.displayTitle || current.summary.title || '').trim().slice(0, 256) || 'DSH 会话';+ new DshNotification(title, { body: '轮次已完成', sessionId: sessionId, tag: 'dsh-notification-' + sessionId + '-' + (++sequence) });+ }, 250));+ }+ });+ sessionRunning.forEach(function (_, sessionId) {+ if (present.has(sessionId)) return;+ sessionRunning.delete(sessionId);+ completionSent.delete(sessionId);+ cancelCompletion(sessionId);+ });+ }+ function watchSessions() {+ sessionWatchTimer = null;+ if (!active || !readySent || window.__dshBridgeNonce !== nonce) return;+ var sessions = readService('sessions');+ var uiSession = readService('uiSession');+ if (!listSource && sessions && sessions.list && typeof sessions.list.subscribe === 'function' && typeof sessions.list.getSnapshot === 'function') {+ listSource = sessions.list;+ disposeList = listSource.subscribe(observeSessions);+ }+ if (!statusSource && uiSession && uiSession.sessionStatus && typeof uiSession.sessionStatus.subscribe === 'function' && typeof uiSession.sessionStatus.getSnapshot === 'function') {+ statusSource = uiSession.sessionStatus;+ disposeStatus = statusSource.subscribe(observeSessions);+ }+ observeSessions();+ if ((!listSource || !statusSource) && (window.__DSH_BOOT__ || window.__dshClientCtx)) {+ // ponytail: one slow attach timer supports late/legacy providers; stop it when both public sources exist.+ sessionWatchTimer = setTimeout(watchSessions, sessionWatchAttempts++ < 20 ? 250 : 5000);+ }+ }+ var readySent = false;+ var lastTheme = null;+ var themeObserver = null;+ function syncTheme() {+ if (!readySent || window.__dshBridgeNonce !== nonce || !window.ReactNativeWebView) return;+ var root = document.documentElement;+ var theme = root && root.getAttribute('data-ds-theme-source');+ if (theme !== 'light' && theme !== 'dark' && theme !== 'system') {+ if (!document.body || (!window.__DSH_BOOT__ && !window.__dshClientCtx)) return;+ theme = document.body.hasAttribute('data-ds-dark-theme') ? 'dark' : 'light';+ }+ if (theme === lastTheme) return;+ lastTheme = theme;+ send({ type: 'dsh://theme-state', theme: theme });+ }+ function ready() {+ if (!active || window.__dshBridgeNonce !== nonce) return;+ if (!readySent && window.ReactNativeWebView && document.readyState === 'complete'+ && (window.__DSH_BOOT__ || window.__dshClientCtx || document.getElementById('loginForm'))) {+ readySent = true;+ send({ type: 'dsh://bridge-ready' });+ }+ if (readySent && !themeObserver && document.documentElement) {+ themeObserver = new MutationObserver(syncTheme);+ themeObserver.observe(document.documentElement, { attributes: true, attributeFilter: ['data-ds-theme-source'] });+ if (document.body) themeObserver.observe(document.body, { attributes: true, attributeFilter: ['data-ds-dark-theme'] });+ window.__dshBridgeThemeObserver = themeObserver;+ }+ syncTheme();+ clearTimeout(sessionWatchTimer);+ watchSessions();+ }+ window.__dshBridgeReady = ready;+ if (document.readyState === 'complete') ready();+ else window.addEventListener('load', ready, { once: true });+ function dispose() {+ if (!active) return;+ active = false;+ window.removeEventListener('message', receiveNotification);+ window.removeEventListener('load', ready);+ window.removeEventListener('pagehide', dispose);+ document.removeEventListener('DOMContentLoaded', suppressTapHighlight);+ if (window.__dshBridgeNonce === nonce) window.__dshBridgeNonce = null;+ pendingFocus = null;+ clearTimeout(focusTimer);+ clearTimeout(sessionWatchTimer);+ completionTimers.forEach(clearTimeout);+ completionTimers.clear();+ if (disposeList) disposeList();+ if (disposeStatus) disposeStatus();+ disposeList = null;+ disposeStatus = null;+ if (themeObserver) themeObserver.disconnect();+ themeObserver = null;+ }+ window.__dshBridgeDispose = dispose;+ window.addEventListener('pagehide', dispose);+})(); true;+`+}++export function nativeMessageScript(origin: string, nonce: string, payload: Record<string, unknown>): string {+ return `if (window.top === window && location.origin === ${JSON.stringify(origin)} && window.__dshBridgeNonce === ${JSON.stringify(nonce)}) { window.__dshBridgeReceive && window.__dshBridgeReceive(${JSON.stringify({ ...payload, nonce })}); } true;`+}diff --git a/src-native/utils/webview-completion.test.ts b/src-native/utils/webview-completion.test.tsnew file mode 100644index 00000000..5c3fe6b9--- /dev/null+++ b/src-native/utils/webview-completion.test.ts@@ -0,0 +1,402 @@+/// <reference types="node" />+import { getEventListeners } from 'node:events'+import { createContext as createVmContext, runInContext } from 'node:vm'+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'+import { createNotificationShim, nativeMessageScript, parseNativeMessage } from './webview-bridge'++const origin = 'https://harness.test:3080'+const nonce = 'completion-nonce'++interface SessionRow {+ running: boolean+ displayTitle?: string+ title?: string+ origin?: 'subagent'+}+interface SessionStatus {+ running?: boolean+ pendingInteraction?: unknown+ completionUnread?: boolean+}++function source<T>(initial: T) {+ let snapshot = initial+ const listeners = new Set<() => void>()+ return {+ listeners,+ getSnapshot: () => snapshot,+ subscribe(listener: () => void) {+ listeners.add(listener)+ return () => {+ listeners.delete(listener)+ }+ },+ publish(next: T) {+ snapshot = next+ for (const listener of listeners)+ listener()+ },+ }+}++function sessionServices(rows: Record<string, SessionRow> = { alpha: { running: false, displayTitle: '测试任务' } }) {+ const list = source({ ids: Object.keys(rows), byId: rows, phase: 'ready' })+ const sessionStatus = source(new Map<string, SessionStatus>(Object.entries(rows).map(([id, row]) => [id, { running: row.running }])))+ return { sessions: { list }, uiSession: { sessionStatus } }+}++const browsers: Array<{ window: EventTarget }> = []+function browser(services?: ReturnType<typeof sessionServices>, options: { hidden?: boolean, useGet?: boolean, login?: boolean } = {}) {+ const posts: string[] = []+ const ctx: Record<string, unknown> | undefined = services+ ? options.useGet ? { get: (name: string) => services[name as keyof typeof services] } : services+ : undefined+ const window = Object.assign(new EventTarget(), {+ top: null as unknown,+ __DSH_BOOT__: options.login ? undefined : {},+ __dshClientCtx: ctx,+ Notification: undefined as unknown as { new (title: string, options?: Record<string, unknown>): unknown },+ ReactNativeWebView: { postMessage: (raw: string) => posts.push(raw) },+ })+ window.top = window+ const styles = new Map<string, { id: string, textContent: string }>()+ const document = Object.assign(new EventTarget(), {+ hidden: options.hidden ?? true,+ readyState: 'complete',+ documentElement: { getAttribute: () => null },+ body: null,+ head: { appendChild: (style: { id: string, textContent: string }) => styles.set(style.id, style) },+ createElement: () => ({ id: '', textContent: '' }),+ getElementById: (id: string) => styles.get(id) ?? (options.login && id === 'loginForm' ? {} : null),+ querySelectorAll: () => [],+ })+ class MutationObserver {+ observe() {}+ disconnect() {}+ }+ const vm = createVmContext({ window, document, location: { origin }, MutationObserver, Event, MessageEvent, Date, setTimeout, clearTimeout })+ function inject(nextNonce = nonce) {+ expect(runInContext(createNotificationShim(origin, nextNonce), vm, { timeout: 1000 })).toBe(true)+ }+ function visibility(hidden: boolean) {+ expect(runInContext(nativeMessageScript(origin, nonce, { type: 'dsh://visibility-state', hidden }), vm, { timeout: 1000 })).toBe(true)+ }+ function notifications() {+ return posts.map(raw => parseNativeMessage(raw, `${origin}/tasks`, origin, nonce)).filter(message => message?.type === 'dsh://native-notification')+ }+ browsers.push({ window })+ return { window, inject, visibility, notifications, posts }+}++beforeEach(() => {+ vi.useFakeTimers()+ vi.setSystemTime(new Date('2026-01-01T00:00:00Z'))+})+afterEach(() => {+ for (const page of browsers.splice(0))+ page.window.dispatchEvent(new Event('pagehide'))+ expect(vi.getTimerCount()).toBe(0)+ vi.restoreAllMocks()+ vi.resetAllMocks()+ vi.useRealTimers()+ vi.unstubAllGlobals()+})++describe('injected DSH completion producer', () => {+ it('subscribes once to public services and produces a bounded native completion with a stable session identity', async () => {+ const services = sessionServices()+ const page = browser(services, { useGet: true })+ page.inject()+ page.inject()+ expect(services.sessions.list.listeners.size).toBe(1)+ expect(services.uiSession.sessionStatus.listeners.size).toBe(1)+ expect(page.notifications()).toEqual([])+ services.uiSession.sessionStatus.publish(new Map([['alpha', { running: true }]]))+ services.uiSession.sessionStatus.publish(new Map([['alpha', { running: false, completionUnread: true }]]))+ await vi.advanceTimersByTimeAsync(249)+ expect(page.notifications()).toEqual([])+ await vi.advanceTimersByTimeAsync(1)+ expect(page.notifications()).toEqual([{+ type: 'dsh://native-notification',+ title: '测试任务',+ body: '轮次已完成',+ sessionId: 'alpha',+ tag: 'dsh-notification-alpha-1',+ silent: false,+ }])+ services.uiSession.sessionStatus.publish(new Map([['alpha', { running: false, completionUnread: false }]]))+ await vi.advanceTimersByTimeAsync(1000)+ expect(page.notifications()).toHaveLength(1)+ })++ it('uses the legacy list only when the authoritative uiSession source is unavailable', async () => {+ const services = sessionServices({ alpha: { running: true, title: '旧版任务' } })+ const page = browser()+ page.window.__dshClientCtx = { sessions: services.sessions }+ page.inject()+ services.sessions.list.publish({ ids: ['alpha'], byId: { alpha: { running: false, title: '旧版任务' } }, phase: 'ready' })+ await vi.advanceTimersByTimeAsync(250)+ expect(page.notifications()).toEqual([{+ type: 'dsh://native-notification',+ title: '旧版任务',+ body: '轮次已完成',+ sessionId: 'alpha',+ tag: 'dsh-notification-alpha-1',+ silent: false,+ }])+ })++ it('does not replay preexisting idle/unread states or mistake unknown running for completion', async () => {+ const services = sessionServices()+ services.uiSession.sessionStatus.publish(new Map([['alpha', { running: false, completionUnread: true }]]))+ const page = browser(services)+ page.inject()+ services.uiSession.sessionStatus.publish(new Map([['alpha', { running: true }]]))+ services.uiSession.sessionStatus.publish(new Map([['alpha', { running: undefined }]]))+ await vi.advanceTimersByTimeAsync(1000)+ expect(page.notifications()).toEqual([])+ })++ it('does not interpret a stale list stop as completion when the authoritative status is still running', async () => {+ const services = sessionServices({ alpha: { running: true } })+ const page = browser(services)+ page.inject()+ services.sessions.list.publish({ ids: ['alpha'], byId: { alpha: { running: false } }, phase: 'ready' })+ await vi.advanceTimersByTimeAsync(1000)+ expect(page.notifications()).toEqual([])+ })++ it('cancels unstable stops, then notifies the later stable completion once', async () => {+ const services = sessionServices({ alpha: { running: true } })+ const page = browser(services)+ page.inject()+ services.uiSession.sessionStatus.publish(new Map([['alpha', { running: false }]]))+ await vi.advanceTimersByTimeAsync(249)+ services.uiSession.sessionStatus.publish(new Map([['alpha', { running: true }]]))+ await vi.advanceTimersByTimeAsync(1)+ expect(page.notifications()).toEqual([])+ services.uiSession.sessionStatus.publish(new Map([['alpha', { running: false }]]))+ await vi.advanceTimersByTimeAsync(250)+ expect(page.notifications()).toHaveLength(1)+ })++ it('never schedules a foreground completion or replays it on backgrounding', async () => {+ const services = sessionServices({ alpha: { running: true } })+ const page = browser(services, { hidden: false })+ page.inject()+ services.uiSession.sessionStatus.publish(new Map([['alpha', { running: false }]]))+ page.visibility(true)+ await vi.advanceTimersByTimeAsync(1000)+ expect(page.notifications()).toEqual([])+ services.uiSession.sessionStatus.publish(new Map([['alpha', { running: true }]]))+ services.uiSession.sessionStatus.publish(new Map([['alpha', { running: false }]]))+ page.visibility(false)+ await vi.advanceTimersByTimeAsync(250)+ expect(page.notifications()).toEqual([])+ })++ it('does not label pending interactions, removed sessions, or subagent rows as completed work', async () => {+ const services = sessionServices({ alpha: { running: true }, child: { running: true, origin: 'subagent' } })+ const page = browser(services)+ page.inject()+ services.uiSession.sessionStatus.publish(new Map([+ ['alpha', { running: false, pendingInteraction: { key: 'approval-1', kind: 'approval' } }],+ ['child', { running: false }],+ ]))+ await vi.advanceTimersByTimeAsync(250)+ expect(page.notifications()).toEqual([])+ services.uiSession.sessionStatus.publish(new Map([['alpha', { running: true }]]))+ services.uiSession.sessionStatus.publish(new Map([['alpha', { running: false }]]))+ services.sessions.list.publish({ ids: [], byId: {}, phase: 'ready' })+ await vi.advanceTimersByTimeAsync(250)+ expect(page.notifications()).toEqual([])+ })++ it('bounds titles and uses a safe fallback without placing the connection URL in notification metadata', async () => {+ const services = sessionServices({ alpha: { running: true, displayTitle: ` ${'题'.repeat(300)} ` }, beta: { running: true } })+ const page = browser(services)+ page.inject()+ services.uiSession.sessionStatus.publish(new Map([['alpha', { running: false }], ['beta', { running: false }]]))+ await vi.advanceTimersByTimeAsync(250)+ expect(page.notifications().map(message => message?.title)).toEqual(['题'.repeat(256), 'DSH 会话'])+ expect(page.notifications().map(message => message?.sessionId)).toEqual(['alpha', 'beta'])+ })++ it('coalesces a real page completion notification with the synthesized fallback but preserves pending reminders', async () => {+ const services = sessionServices({ alpha: { running: true } })+ const page = browser(services)+ page.inject()+ services.uiSession.sessionStatus.publish(new Map([['alpha', { running: false }]]))+ const completed = new page.window.Notification('上游完成', { body: '已结束', sessionId: 'alpha', tag: 'dsh-notification-alpha-88' })+ const pending = new page.window.Notification('需要回答', { body: '问题', sessionId: 'alpha', tag: 'dsh-notification-pending-alpha-89' })+ expect(completed).toHaveProperty('title', '上游完成')+ expect(pending).toHaveProperty('title', '需要回答')+ await vi.advanceTimersByTimeAsync(250)+ expect(page.notifications().map(message => message?.title)).toEqual(['上游完成', '需要回答'])+ services.uiSession.sessionStatus.publish(new Map([['alpha', { running: true }]]))+ services.uiSession.sessionStatus.publish(new Map([['alpha', { running: false }]]))+ await vi.advanceTimersByTimeAsync(250)+ expect(page.notifications()).toHaveLength(3)+ })++ it('attaches a late context and status source while retaining only one slow retry for unavailable sources', async () => {+ const services = sessionServices({ alpha: { running: true } })+ const page = browser()+ page.inject()+ await vi.advanceTimersByTimeAsync(500)+ page.window.__dshClientCtx = { sessions: services.sessions }+ await vi.advanceTimersByTimeAsync(250)+ expect(services.sessions.list.listeners.size).toBe(1)+ page.window.__dshClientCtx = services+ await vi.advanceTimersByTimeAsync(250)+ expect(services.uiSession.sessionStatus.listeners.size).toBe(1)+ services.uiSession.sessionStatus.publish(new Map([['alpha', { running: false }]]))+ await vi.advanceTimersByTimeAsync(250)+ expect(page.notifications()).toHaveLength(1)+ const unavailable = browser()+ unavailable.inject()+ await vi.advanceTimersByTimeAsync(5000)+ expect(vi.getTimerCount()).toBe(1)+ await vi.advanceTimersByTimeAsync(60000)+ expect(vi.getTimerCount()).toBe(1)+ })++ it('disposes subscriptions and unsettled completion on pagehide and replaces the old nonce owner', async () => {+ const services = sessionServices({ alpha: { running: true } })+ const page = browser(services)+ page.inject()+ services.uiSession.sessionStatus.publish(new Map([['alpha', { running: false }]]))+ page.window.dispatchEvent(new Event('pagehide'))+ expect(services.sessions.list.listeners.size).toBe(0)+ expect(services.uiSession.sessionStatus.listeners.size).toBe(0)+ await vi.advanceTimersByTimeAsync(250)+ expect(page.notifications()).toEqual([])+ page.inject('next-nonce')+ expect(services.sessions.list.listeners.size).toBe(1)+ expect(services.uiSession.sessionStatus.listeners.size).toBe(1)+ page.inject('third-nonce')+ expect(services.sessions.list.listeners.size).toBe(1)+ expect(services.uiSession.sessionStatus.listeners.size).toBe(1)+ })++ it('attaches services exposed after the fast boot window without needing another injection', async () => {+ const services = sessionServices({ alpha: { running: true } })+ const page = browser()+ page.inject()+ await vi.advanceTimersByTimeAsync(5250)+ page.window.__dshClientCtx = services+ await vi.advanceTimersByTimeAsync(5000)+ expect(services.sessions.list.listeners.size).toBe(1)+ expect(services.uiSession.sessionStatus.listeners.size).toBe(1)+ services.uiSession.sessionStatus.publish(new Map([['alpha', { running: false }]]))+ await vi.advanceTimersByTimeAsync(250)+ expect(page.notifications()).toHaveLength(1)+ expect(vi.getTimerCount()).toBe(0)+ })++ it('preserves an already observed completion when the authoritative status service arrives during its debounce', async () => {+ const services = sessionServices({ alpha: { running: true } })+ const page = browser()+ page.window.__dshClientCtx = { sessions: services.sessions }+ page.inject()+ await vi.advanceTimersByTimeAsync(100)+ services.sessions.list.publish({ ids: ['alpha'], byId: { alpha: { running: false } }, phase: 'ready' })+ services.uiSession.sessionStatus.publish(new Map([['alpha', { running: false }]]))+ page.window.__dshClientCtx = services+ await vi.advanceTimersByTimeAsync(249)+ expect(services.uiSession.sessionStatus.listeners.size).toBe(1)+ expect(page.notifications()).toEqual([])+ await vi.advanceTimersByTimeAsync(1)+ expect(page.notifications()).toHaveLength(1)+ })++ it('does not reset completion deduplication for a harmless catalog update while status still reports running', async () => {+ const services = sessionServices({ alpha: { running: true } })+ const page = browser(services)+ page.inject()+ const notification = new page.window.Notification('上游完成', { body: '已结束', sessionId: 'alpha', tag: 'dsh-notification-alpha-88' })+ expect(notification).toHaveProperty('title', '上游完成')+ services.sessions.list.publish({ ...services.sessions.list.getSnapshot() })+ services.uiSession.sessionStatus.publish(new Map([['alpha', { running: false }]]))+ await vi.advanceTimersByTimeAsync(250)+ expect(page.notifications().map(message => message?.title)).toEqual(['上游完成'])+ services.uiSession.sessionStatus.publish(new Map([['alpha', { running: true }]]))+ services.uiSession.sessionStatus.publish(new Map([['alpha', { running: false }]]))+ await vi.advanceTimersByTimeAsync(250)+ expect(page.notifications()).toHaveLength(2)+ })++ it.each([+ { title: 'x'.repeat(257) },+ { title: ' ' },+ { body: 'x'.repeat(4097) },+ { body: '\u0000'.repeat(4096) },+ { tag: `dsh-notification-${'x'.repeat(256)}-88` },+ { sessionId: 'x'.repeat(257) },+ ])('does not let a rejected upstream completion suppress the bounded local fallback: %j', async (invalid) => {+ const services = sessionServices({ alpha: { running: true, displayTitle: '测试任务' } })+ const page = browser(services)+ page.inject()+ services.uiSession.sessionStatus.publish(new Map([['alpha', { running: false }]]))+ const notification = new page.window.Notification(invalid.title ?? '上游完成', {+ body: '已结束',+ sessionId: 'alpha',+ tag: 'dsh-notification-alpha-88',+ ...invalid,+ })+ expect(notification).toHaveProperty('title', invalid.title ?? '上游完成')+ await vi.advanceTimersByTimeAsync(250)+ expect(page.notifications()).toEqual([{+ type: 'dsh://native-notification',+ title: '测试任务',+ body: '轮次已完成',+ sessionId: 'alpha',+ tag: 'dsh-notification-alpha-1',+ silent: false,+ }])+ })++ it('releases document listeners and restores the same nonce after a persisted page is reinjected', async () => {+ const services = sessionServices({ alpha: { running: true } })+ const page = browser(services)+ page.inject()+ const PreviousNotification = page.window.Notification+ expect(getEventListeners(page.window, 'message')).toHaveLength(1)+ page.window.dispatchEvent(Object.assign(new Event('pagehide'), { persisted: true }))+ expect(getEventListeners(page.window, 'message')).toHaveLength(0)+ expect(getEventListeners(page.window, 'pagehide')).toHaveLength(0)+ page.window.dispatchEvent(Object.assign(new Event('pageshow'), { persisted: true }))+ page.inject()+ expect(services.sessions.list.listeners.size).toBe(1)+ expect(services.uiSession.sessionStatus.listeners.size).toBe(1)+ expect(getEventListeners(page.window, 'message')).toHaveLength(1)+ const stale = new PreviousNotification('旧页面回调', { tag: 'stale-callback' })+ expect(stale).toHaveProperty('title', '旧页面回调')+ expect(page.notifications()).toEqual([])+ services.uiSession.sessionStatus.publish(new Map([['alpha', { running: false }]]))+ await vi.advanceTimersByTimeAsync(250)+ expect(page.notifications()).toHaveLength(1)+ page.inject('second-owner')+ page.inject('third-owner')+ expect(getEventListeners(page.window, 'message')).toHaveLength(1)+ expect(getEventListeners(page.window, 'pagehide')).toHaveLength(1)+ })++ it('observes a catalog in linear membership work instead of searching the full list for each row', () => {+ const rows = Object.fromEntries(Array.from({ length: 1000 }, (_, index) => [`session-${index}`, { running: false }]))+ const services = sessionServices(rows)+ const membership = vi.spyOn(services.sessions.list.getSnapshot().ids, 'indexOf')+ const page = browser(services)+ page.inject()+ expect(membership.mock.calls.length).toBeLessThanOrEqual(1)+ expect(page.notifications()).toEqual([])+ })++ it('leaves a login page without a context free of session subscriptions and retry timers', async () => {+ const page = browser(undefined, { login: true })+ page.inject()+ expect(vi.getTimerCount()).toBe(0)+ await vi.advanceTimersByTimeAsync(5000)+ expect(page.notifications()).toEqual([])+ })+})diff --git a/src/ui/dialog/update.test.tsx b/src/ui/dialog/update.test.tsxindex 0e29d7fb..d977b278 100644--- a/src/ui/dialog/update.test.tsx+++ b/src/ui/dialog/update.test.tsx@@ -1,7 +1,7 @@// @vitest-environment jsdomimport { OverlaysProvider, useOverlay } from '@overlastic/react'import { QueryClient, QueryClientProvider } from '@tanstack/react-query'-import { cleanup, fireEvent, render, screen } from '@testing-library/react'+import { act, cleanup, fireEvent, render, screen } from '@testing-library/react'import { StrictMode } from 'react'import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'import { DesktopUpdateDialog } from './update'@@ -41,6 +41,7 @@ function openDialog() {}beforeEach(() => {+ vi.useFakeTimers({ shouldAdvanceTime: true })client = new QueryClient({ defaultOptions: { mutations: { retry: false } } })desktopUpdater.updateInfo = {currentVersion: '0.21.1',@@ -54,8 +55,14 @@ beforeEach(() => {desktopUpdater.downloadAndOpen.mockReset()})-afterEach(() => {+afterEach(async () => {+ await act(async () => {+ await vi.runOnlyPendingTimersAsync()+ })cleanup()+ client.clear()+ vi.clearAllTimers()+ vi.useRealTimers()vi.restoreAllMocks()})diff --git a/test/e2e/plugins/dsh-tauri-mobile-settings.e2e.ts b/test/e2e/plugins/dsh-tauri-mobile-settings.e2e.tsindex 737566dd..e4a66f24 100644--- a/test/e2e/plugins/dsh-tauri-mobile-settings.e2e.ts+++ b/test/e2e/plugins/dsh-tauri-mobile-settings.e2e.ts@@ -44,6 +44,65 @@ async function openPhoneSettings(width: number, height: number) {}describe('mobile settings official host composition', () => {+ it('animates real touch toggles without tap outlines and honors reduced motion', async () => {+ const app = await newDshPage(browser, {+ viewport: { width: 390, height: 844 },+ hasTouch: true,+ isMobile: true,+ ready: '[data-dsh-mobile-sidebar-toggle]',+ })+ try {+ await app.page.emulateMedia({ reducedMotion: 'no-preference' })+ const toggle = app.frame.locator('[data-dsh-mobile-sidebar-toggle]')+ const plus = app.frame.locator('[data-dsh-mobile-new-session]')+ const center = app.frame.locator('[class$="_centerCol"]')+ const shade = app.frame.locator('[data-dsh-mobile-sidebar-shade]')+ await app.frame.locator('[class$="_centerCol"], [data-dsh-mobile-sidebar-shade]').evaluateAll((elements) => {+ for (const element of elements) {+ element.setAttribute('data-e2e-transform-count', '0')+ element.addEventListener('transitionrun', (event) => {+ if (event.target === element && (event as TransitionEvent).propertyName === 'transform')+ element.setAttribute('data-e2e-transform-count', String(Number(element.getAttribute('data-e2e-transform-count')) + 1))+ })+ }+ })+ await toggle.tap()+ await expect.poll(() => toggle.getAttribute('aria-expanded')).toBe('true')+ await expect.poll(() => center.getAttribute('data-e2e-transform-count'), { message: '点击展开必须真正启动主面板位移动效' }).toBe('1')+ await expect.poll(() => shade.getAttribute('data-e2e-transform-count'), { message: '遮罩必须跟随主面板过渡' }).toBe('1')+ await expect.poll(async () => Math.round((await center.boundingBox())!.x)).toBe(319)+ await shade.tap()+ await expect.poll(() => toggle.getAttribute('aria-expanded')).toBe('false')+ await expect.poll(() => center.getAttribute('data-e2e-transform-count'), { message: '点击关闭也必须保留位移动效' }).toBe('2')+ await expect.poll(async () => Math.round((await center.boundingBox())!.x)).toBe(0)+ expect(await toggle.evaluate(element => ({+ outline: getComputedStyle(element).outlineStyle,+ tap: getComputedStyle(element).getPropertyValue('-webkit-tap-highlight-color'),+ keyboardFocus: element.matches(':focus-visible'),+ })), '触摸后恢复焦点不能留下浏览器默认框').toEqual({ outline: 'none', tap: 'rgba(0, 0, 0, 0)', keyboardFocus: false })+ await plus.tap()+ expect(await plus.evaluate(element => getComputedStyle(element).outlineStyle), '新会话图标触摸后也不能留下默认框').toBe('none')+ await app.page.keyboard.press('Shift+Tab')+ await toggle.focus()+ expect(await toggle.evaluate(element => element.matches(':focus-visible')), '键盘导航仍须有可见焦点').toBe(true)+ expect(await toggle.evaluate(element => getComputedStyle(element).outlineStyle)).toBe('solid')++ await app.page.emulateMedia({ reducedMotion: 'reduce' })+ await toggle.tap()+ await expect.poll(() => toggle.getAttribute('aria-expanded')).toBe('true')+ expect(Math.round((await center.boundingBox())!.x), '减少动态效果时应直接到达展开位置').toBe(319)+ expect(await center.getAttribute('data-e2e-transform-count'), '系统减少动态效果时不得强行动画').toBe('2')+ await shade.tap()+ await expect.poll(() => toggle.getAttribute('aria-expanded')).toBe('false')+ expect(Math.round((await center.boundingBox())!.x)).toBe(0)+ expectNoSyntheticFallbacks(app)+ expect(app.errors).toEqual([])+ }+ finally {+ await app.close()+ }+ })+it.each([{ width: 320, height: 568 }, { width: 430, height: 943 }, { width: 767, height: 800 }])('keeps the official section mounted through categories at $width pixels', async ({ width, height }) => {const { app, dialog } = await openPhoneSettings(width, height)try {diff --git a/tsconfig.native.json b/tsconfig.native.jsonnew file mode 100644index 00000000..956a3da8--- /dev/null+++ b/tsconfig.native.json@@ -0,0 +1,18 @@+{+ "extends": "expo/tsconfig.base",+ "compilerOptions": {+ "paths": {+ "@/*": ["./src-native/*"]+ },+ "strict": true,+ "noUncheckedIndexedAccess": true+ },+ "include": [+ "src-native/**/*.ts",+ "src-native/**/*.tsx",+ ".expo/types/**/*.ts",+ "expo-env.d.ts",+ "vitest.native.config.ts"+ ],+ "exclude": ["node_modules", ".temp", "android", "ios", "dist"]+}diff --git a/vitest.native.config.ts b/vitest.native.config.tsnew file mode 100644index 00000000..99d163be--- /dev/null+++ b/vitest.native.config.ts@@ -0,0 +1,20 @@+import path from 'node:path'+import { fileURLToPath } from 'node:url'+import { defineConfig } from 'vitest/config'++// `expo/tsconfig.base` 的 lib 含 DOM,`new URL()` 会得到 DOM 的 URL 类型而无法传给 node 的 `fileURLToPath`;+// 这里改用 `path.join` + `import.meta.url` 字符串,避免 DOM/node 的 URL 类型冲突。+const nativeRoot = path.join(path.dirname(fileURLToPath(import.meta.url)), 'src-native')++export default defineConfig({+ resolve: {+ alias: {+ '@': nativeRoot,+ },+ },+ test: {+ environment: 'node',+ include: ['src-native/**/*.test.{ts,tsx}'],+ testTimeout: 10000,+ },+})