AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.
HTML ai-agentcloudflarecloudflare-d1cloudflare-r2cloudflare-workersdockerelectronevernoteevernote-alternativeknowledge-basemcpnote-takingobsidian-alternativeoffline-firstpersonal-knowledge-basepwaself-hostedsqlitetiptapweb-clipper
feat: align Android app with mobile PWA
tianma-ifb3e1ebe09178
diff --git a/README.md b/README.mdindex 53eb0427..90243ac5 100644--- a/README.md+++ b/README.md@@ -94,9 +94,9 @@ The Chrome/Edge web clipper is complete and pending store publication.## Native Clients-Native clients are part of the EdgeEver roadmap. The mobile app is planned to be built with React Native, and the desktop app is planned to be built with Tauri.+The Android app is built with Expo and React Native. After securely connecting to a self-hosted instance, it runs that instance's current mobile PWA inside a restricted same-origin native container. This keeps the App UI, editing features, offline drafts, sync queue, settings, and import/export workflow aligned with the PWA without maintaining a second workspace implementation. Native bridges handle secure session reuse, external links, Android navigation, and exported-file sharing.-The goal is to let users connect these clients to their own self-hosted EdgeEver instance, keeping the same Cloudflare-based backend, open API, and user-owned data model while providing a smoother native experience on mobile and desktop.+The desktop app remains on the roadmap and is planned to use Tauri.## Tech Stackdiff --git a/README.zh-CN.md b/README.zh-CN.mdindex 11b5599d..0e99226d 100644--- a/README.zh-CN.md+++ b/README.zh-CN.md@@ -96,9 +96,9 @@ Chrome/Edge 网页裁剪插件已开发完成,待上架。## 关于客户端-原生客户端已纳入 EdgeEver 的开发计划。移动端 App 计划基于 React Native 构建,桌面端 App 计划基于 Tauri 构建。+Android App 基于 Expo 与 React Native 构建。用户安全连接自托管实例后,App 会在限制为实例同源的原生容器内运行该实例当前版本的移动 PWA,使 App 的 UI、编辑能力、离线草稿、同步队列、设置与导入导出流程始终跟随 PWA,而不再维护第二套独立工作区。原生桥接负责安全复用会话、外链跳转、Android 返回操作和导出文件分享。-目标是让用户可以将这些客户端连接到自己的自托管 EdgeEver 实例,在继续保持 Cloudflare 后端、开放 API 和用户自有数据模型的同时,获得更顺滑的移动端与桌面端原生体验。+桌面端 App 仍在规划中,计划基于 Tauri 构建。## 技术栈diff --git a/apps/mobile/app.json b/apps/mobile/app.jsonindex bc8cd22f..e5aafce5 100644--- a/apps/mobile/app.json+++ b/apps/mobile/app.json@@ -3,9 +3,9 @@"name": "EdgeEver","slug": "edgeever","scheme": "edgeever",- "version": "0.1.3",+ "version": "0.2.8","orientation": "portrait",- "userInterfaceStyle": "light",+ "userInterfaceStyle": "automatic","newArchEnabled": true,"ios": {"bundleIdentifier": "org.edgeever.mobile",@@ -13,7 +13,7 @@},"android": {"package": "org.edgeever.mobile",- "versionCode": 1,+ "versionCode": 2,"adaptiveIcon": {"backgroundColor": "#f8fafc"}@@ -29,7 +29,8 @@"targetSdkVersion": 36}}- ]+ ],+ "expo-sharing"],"experiments": {"typedRoutes": truediff --git a/apps/mobile/app/_layout.tsx b/apps/mobile/app/_layout.tsxindex d053b672..b003d5a2 100644--- a/apps/mobile/app/_layout.tsx+++ b/apps/mobile/app/_layout.tsx@@ -1,26 +1,15 @@-import "react-native-gesture-handler";--import { QueryClient, QueryClientProvider } from "@tanstack/react-query";import { Stack } from "expo-router";import { StatusBar } from "expo-status-bar";-import { useState } from "react";-import { GestureHandlerRootView } from "react-native-gesture-handler";import { SafeAreaProvider } from "react-native-safe-area-context";import { SessionProvider } from "../src/lib/session";export default function RootLayout() {- const [queryClient] = useState(() => new QueryClient());-return (- <GestureHandlerRootView style={{ flex: 1 }}>- <SafeAreaProvider>- <QueryClientProvider client={queryClient}>- <SessionProvider>- <Stack screenOptions={{ headerShown: false }} />- <StatusBar style="dark" />- </SessionProvider>- </QueryClientProvider>- </SafeAreaProvider>- </GestureHandlerRootView>+ <SafeAreaProvider>+ <SessionProvider>+ <Stack screenOptions={{ headerShown: false }} />+ <StatusBar style="auto" />+ </SessionProvider>+ </SafeAreaProvider>);}diff --git a/apps/mobile/app/index.tsx b/apps/mobile/app/index.tsxindex aef90904..9646107f 100644--- a/apps/mobile/app/index.tsx+++ b/apps/mobile/app/index.tsx@@ -1,6 +1,6 @@import { ActivityIndicator, StyleSheet, View } from "react-native";import { LoginScreen } from "../src/screens/LoginScreen";-import { WorkspaceScreen } from "../src/screens/WorkspaceScreen";+import { PwaWorkspaceScreen } from "../src/screens/PwaWorkspaceScreen";import { useSession } from "../src/lib/session";export default function IndexScreen() {@@ -14,7 +14,7 @@ export default function IndexScreen() {);}- return session ? <WorkspaceScreen /> : <LoginScreen />;+ return session ? <PwaWorkspaceScreen /> : <LoginScreen />;}const styles = StyleSheet.create({diff --git a/apps/mobile/babel.config.js b/apps/mobile/babel.config.jsindex 82b39590..b6c0d57a 100644--- a/apps/mobile/babel.config.js+++ b/apps/mobile/babel.config.js@@ -3,6 +3,5 @@ export default function babelConfig(api) {return {presets: ["babel-preset-expo"],- plugins: ["react-native-reanimated/plugin"],};}diff --git a/apps/mobile/package.json b/apps/mobile/package.jsonindex b7c32529..01f4cc72 100644--- a/apps/mobile/package.json+++ b/apps/mobile/package.json@@ -1,6 +1,6 @@{"name": "@edgeever/mobile",- "version": "0.1.3",+ "version": "0.2.8","private": true,"type": "module","main": "expo-router/entry",@@ -14,23 +14,17 @@"dependencies": {"@edgeever/client": "workspace:*","@edgeever/shared": "workspace:*",- "@gorhom/bottom-sheet": "latest",- "@react-native-async-storage/async-storage": "2.2.0",- "@tanstack/react-query": "latest","expo": "~57.0.7","expo-build-properties": "~57.0.6",- "expo-clipboard": "~57.0.1",- "expo-constants": "~57.0.6",- "expo-document-picker": "~57.0.1",- "expo-image-manipulator": "~57.0.5",+ "expo-file-system": "~57.0.1","expo-router": "latest","expo-secure-store": "latest",+ "expo-sharing": "~57.0.6","expo-status-bar": "latest",+ "expo-system-ui": "~57.0.1","lucide-react-native": "latest","react": "19.2.3","react-native": "latest",- "react-native-gesture-handler": "~2.32.0",- "react-native-reanimated": "4.5.0","react-native-safe-area-context": "~5.7.0","react-native-screens": "4.25.2","react-native-svg": "15.15.4",@@ -39,7 +33,6 @@"devDependencies": {"@types/react": "latest","babel-preset-expo": "latest",- "gluestack-ui": "latest","typescript": "6.0.3"}}diff --git a/apps/mobile/src/lib/mobile-drafts.ts b/apps/mobile/src/lib/mobile-drafts.tsdeleted file mode 100644index ce93dda6..00000000--- a/apps/mobile/src/lib/mobile-drafts.ts+++ /dev/null@@ -1,51 +0,0 @@-import AsyncStorage from "@react-native-async-storage/async-storage";--const MOBILE_DRAFT_PREFIX = "edgeever.mobile.memoDraft:";--export type MobileMemoDraft = {- memoId: string;- expectedRevision: number;- title: string;- contentMarkdown: string;- notebookId: string;- tagsText: string;- updatedAt: string;-};--export const readMobileMemoDraft = async (memoId: string): Promise<MobileMemoDraft | null> => {- const rawValue = await AsyncStorage.getItem(getMobileMemoDraftKey(memoId));-- if (!rawValue) {- return null;- }-- try {- const parsed = JSON.parse(rawValue);- return isMobileMemoDraft(parsed) ? parsed : null;- } catch {- return null;- }-};--export const writeMobileMemoDraft = (draft: MobileMemoDraft) => AsyncStorage.setItem(getMobileMemoDraftKey(draft.memoId), JSON.stringify(draft));--export const clearMobileMemoDraft = (memoId: string) => AsyncStorage.removeItem(getMobileMemoDraftKey(memoId));--const getMobileMemoDraftKey = (memoId: string) => `${MOBILE_DRAFT_PREFIX}${memoId}`;--const isMobileMemoDraft = (value: unknown): value is MobileMemoDraft => {- if (!value || typeof value !== "object") {- return false;- }-- const draft = value as Partial<MobileMemoDraft>;- return (- typeof draft.memoId === "string" &&- typeof draft.expectedRevision === "number" &&- typeof draft.title === "string" &&- typeof draft.contentMarkdown === "string" &&- typeof draft.notebookId === "string" &&- typeof draft.tagsText === "string" &&- typeof draft.updatedAt === "string"- );-};diff --git a/apps/mobile/src/lib/preferences.ts b/apps/mobile/src/lib/preferences.tsdeleted file mode 100644index 9a01ada9..00000000--- a/apps/mobile/src/lib/preferences.ts+++ /dev/null@@ -1,52 +0,0 @@-import AsyncStorage from "@react-native-async-storage/async-storage";--const MEMO_LIST_DENSITY_KEY = "edgeever.mobile.memoListDensity";-const NOTEBOOK_SORT_KEY = "edgeever.mobile.notebookSort";-const IMAGE_COMPRESSION_KEY = "edgeever.mobile.imageCompressionEnabled";-const LOCALE_PREFERENCE_KEY = "edgeever.mobile.localePreference";-const RESOURCE_LAYOUT_KEY = "edgeever.mobile.resourceLayout";--export type MobileMemoListDensity = "preview" | "compact";-export type MobileNotebookSortPreference = "manual" | "name-asc" | "memo-count-desc" | "updated-desc";-export type MobileLocalePreference = "system" | "zh-CN" | "en-US";-export type MobileResourceLayoutPreference = "grid" | "list";--export const readMobileMemoListDensity = async (): Promise<MobileMemoListDensity> => {- const value = await AsyncStorage.getItem(MEMO_LIST_DENSITY_KEY);- return value === "compact" ? "compact" : "preview";-};--export const writeMobileMemoListDensity = (density: MobileMemoListDensity) => AsyncStorage.setItem(MEMO_LIST_DENSITY_KEY, density);--export const readMobileNotebookSort = async (): Promise<MobileNotebookSortPreference> => {- const value = await AsyncStorage.getItem(NOTEBOOK_SORT_KEY);- return isMobileNotebookSortPreference(value) ? value : "manual";-};--export const writeMobileNotebookSort = (sortMode: MobileNotebookSortPreference) => AsyncStorage.setItem(NOTEBOOK_SORT_KEY, sortMode);--export const readMobileImageCompressionEnabled = async () => {- const value = await AsyncStorage.getItem(IMAGE_COMPRESSION_KEY);- return value !== "false";-};--export const writeMobileImageCompressionEnabled = (enabled: boolean) => AsyncStorage.setItem(IMAGE_COMPRESSION_KEY, enabled ? "true" : "false");--export const readMobileLocalePreference = async (): Promise<MobileLocalePreference> => {- const value = await AsyncStorage.getItem(LOCALE_PREFERENCE_KEY);- return isMobileLocalePreference(value) ? value : "system";-};--export const writeMobileLocalePreference = (locale: MobileLocalePreference) => AsyncStorage.setItem(LOCALE_PREFERENCE_KEY, locale);--export const readMobileResourceLayout = async (): Promise<MobileResourceLayoutPreference> => {- const value = await AsyncStorage.getItem(RESOURCE_LAYOUT_KEY);- return value === "list" ? "list" : "grid";-};--export const writeMobileResourceLayout = (layout: MobileResourceLayoutPreference) => AsyncStorage.setItem(RESOURCE_LAYOUT_KEY, layout);--const isMobileNotebookSortPreference = (value: unknown): value is MobileNotebookSortPreference =>- value === "manual" || value === "name-asc" || value === "memo-count-desc" || value === "updated-desc";--const isMobileLocalePreference = (value: unknown): value is MobileLocalePreference => value === "system" || value === "zh-CN" || value === "en-US";diff --git a/apps/mobile/src/lib/sync-queue.ts b/apps/mobile/src/lib/sync-queue.tsdeleted file mode 100644index 5bdb6ea4..00000000--- a/apps/mobile/src/lib/sync-queue.ts+++ /dev/null@@ -1,221 +0,0 @@-import AsyncStorage from "@react-native-async-storage/async-storage";-import { ApiRequestError, type createEdgeEverClient } from "@edgeever/client";-import type { MemoDetail } from "@edgeever/shared";--const SYNC_QUEUE_KEY = "edgeever.mobile.syncQueue.v1";--export type MobileMemoUpdateSyncPayload = {- memoId: string;- expectedRevision: number;- expectedContentHash: string;- title: string;- contentMarkdown: string;- notebookId: string;- tags: string[];-};--export type MobileSyncQueueItem = {- id: string;- kind: "memo.update";- memoId: string;- status: "pending" | "syncing" | "conflict" | "error";- payload: MobileMemoUpdateSyncPayload;- attemptCount: number;- lastError: string | null;- nextAttemptAt: string | null;- createdAt: string;- updatedAt: string;-};--export type MobileSyncQueueSummary = {- total: number;- pending: number;- syncing: number;- conflict: number;- error: number;-};--export type MobileSyncRunResult = {- attempted: number;- synced: number;- failed: number;- conflicted: number;-};--export const emptyMobileSyncQueueSummary = (): MobileSyncQueueSummary => ({- total: 0,- pending: 0,- syncing: 0,- conflict: 0,- error: 0,-});--export const getMobileMemoUpdateQueueId = (memoId: string) => `memo.update:${memoId}`;--export const queueMobileMemoUpdate = async (payload: MobileMemoUpdateSyncPayload) => {- const now = new Date().toISOString();- const items = await readMobileSyncQueue();- const id = getMobileMemoUpdateQueueId(payload.memoId);- const existing = items.find((item) => item.id === id);- const nextItem: MobileSyncQueueItem = {- id,- kind: "memo.update",- memoId: payload.memoId,- status: "pending",- payload,- attemptCount: existing?.attemptCount ?? 0,- lastError: null,- nextAttemptAt: null,- createdAt: existing?.createdAt ?? now,- updatedAt: now,- };-- await writeMobileSyncQueue([nextItem, ...items.filter((item) => item.id !== id)]);- return summarizeMobileSyncQueue(await readMobileSyncQueue());-};--export const loadMobileSyncQueueSummary = async () => summarizeMobileSyncQueue(await readMobileSyncQueue());--export const listMobileSyncQueueItems = async () =>- (await readMobileSyncQueue()).sort((left, right) => right.updatedAt.localeCompare(left.updatedAt));--export const deleteMobileSyncQueueItem = async (id: string) => {- await removeMobileSyncQueueItem(id);- return loadMobileSyncQueueSummary();-};--export const syncMobileQueuedChanges = async (- client: ReturnType<typeof createEdgeEverClient>,- options: {- onSynced?: (memo: MemoDetail) => void | Promise<void>;- } = {}-): Promise<MobileSyncRunResult> => {- const result: MobileSyncRunResult = {- attempted: 0,- synced: 0,- failed: 0,- conflicted: 0,- };- const now = new Date();- const items = (await readMobileSyncQueue())- .filter((item) => item.status === "pending" || item.status === "error" || item.status === "syncing")- .filter((item) => !item.nextAttemptAt || new Date(item.nextAttemptAt) <= now)- .sort((left, right) => left.createdAt.localeCompare(right.createdAt));-- for (const item of items) {- result.attempted += 1;- await updateMobileSyncQueueItem(item.id, {- status: "syncing",- updatedAt: new Date().toISOString(),- });-- try {- const memo = await syncMobileQueueItem(client, item);- await removeMobileSyncQueueItem(item.id);- await options.onSynced?.(memo);- result.synced += 1;- } catch (error) {- const status = isRevisionConflict(error) ? "conflict" : "error";- const attemptCount = item.attemptCount + 1;-- await updateMobileSyncQueueItem(item.id, {- status,- attemptCount,- lastError: getErrorMessage(error),- nextAttemptAt: status === "error" ? nextRetryAt(attemptCount) : null,- updatedAt: new Date().toISOString(),- });-- if (status === "conflict") {- result.conflicted += 1;- } else {- result.failed += 1;- }- }- }-- return result;-};--export const shouldQueueMobileMemoSaveError = (error: unknown) => {- if (error instanceof ApiRequestError) {- return error.status === 408 || error.status === 429 || error.status >= 500;- }-- return error instanceof TypeError || getErrorMessage(error).toLowerCase().includes("network");-};--const syncMobileQueueItem = async (client: ReturnType<typeof createEdgeEverClient>, item: MobileSyncQueueItem) => {- const { editSession } = await client.createMemoEditSession(item.memoId);-- if (- editSession.baseRevision !== item.payload.expectedRevision ||- editSession.baseContentHash !== item.payload.expectedContentHash- ) {- throw new ApiRequestError("Note changed before the offline draft could sync.", 409, "revision_conflict");- }-- const response = await client.updateMemo(item.memoId, {- expectedRevision: item.payload.expectedRevision,- expectedContentHash: item.payload.expectedContentHash,- editSessionId: editSession.id,- title: item.payload.title,- contentMarkdown: item.payload.contentMarkdown,- notebookId: item.payload.notebookId,- tags: item.payload.tags,- });-- return response.memo;-};--const readMobileSyncQueue = async (): Promise<MobileSyncQueueItem[]> => {- const rawValue = await AsyncStorage.getItem(SYNC_QUEUE_KEY);-- if (!rawValue) {- return [];- }-- try {- const parsed = JSON.parse(rawValue);- return Array.isArray(parsed) ? parsed.filter(isMobileSyncQueueItem) : [];- } catch {- return [];- }-};--const writeMobileSyncQueue = (items: MobileSyncQueueItem[]) => AsyncStorage.setItem(SYNC_QUEUE_KEY, JSON.stringify(items));--const updateMobileSyncQueueItem = async (id: string, patch: Partial<MobileSyncQueueItem>) => {- const items = await readMobileSyncQueue();- await writeMobileSyncQueue(items.map((item) => (item.id === id ? { ...item, ...patch } : item)));-};--const removeMobileSyncQueueItem = async (id: string) => {- const items = await readMobileSyncQueue();- await writeMobileSyncQueue(items.filter((item) => item.id !== id));-};--const summarizeMobileSyncQueue = (items: MobileSyncQueueItem[]) =>- items.reduce((summary, item) => {- summary.total += 1;- summary[item.status] += 1;- return summary;- }, emptyMobileSyncQueueSummary());--const isMobileSyncQueueItem = (value: unknown): value is MobileSyncQueueItem => {- if (!value || typeof value !== "object") {- return false;- }-- const item = value as Partial<MobileSyncQueueItem>;- return item.kind === "memo.update" && typeof item.id === "string" && typeof item.memoId === "string" && Boolean(item.payload);-};--const isRevisionConflict = (error: unknown) => error instanceof ApiRequestError && error.code === "revision_conflict";--const getErrorMessage = (error: unknown) => (error instanceof Error ? error.message : "Sync failed");--const nextRetryAt = (attemptCount: number) => {- const delayMs = Math.min(5 * 60_000, 2 ** Math.min(attemptCount, 6) * 1000);- return new Date(Date.now() + delayMs).toISOString();-};diff --git a/apps/mobile/src/screens/LoginScreen.tsx b/apps/mobile/src/screens/LoginScreen.tsxindex 5427dc10..e969ba0e 100644--- a/apps/mobile/src/screens/LoginScreen.tsx+++ b/apps/mobile/src/screens/LoginScreen.tsx@@ -11,7 +11,7 @@ import {View,} from "react-native";import { SafeAreaView } from "react-native-safe-area-context";-import { ExternalLink } from "lucide-react-native";+import { ExternalLink, LockKeyhole } from "lucide-react-native";import { useSession } from "../lib/session";const GITHUB_REPOSITORY_URL = "https://github.com/tianma-if/edgeever";@@ -19,7 +19,7 @@ const GITHUB_REPOSITORY_URL = "https://github.com/tianma-if/edgeever";export const LoginScreen = () => {const { signIn } = useSession();const [baseUrl, setBaseUrl] = useState("");- const [username, setUsername] = useState("owner");+ const [username, setUsername] = useState("admin");const [password, setPassword] = useState("");const [error, setError] = useState<string | null>(null);const [submitting, setSubmitting] = useState(false);@@ -49,12 +49,16 @@ export const LoginScreen = () => {<ExternalLink color="#475569" size={20} /></Pressable><KeyboardAvoidingView behavior={Platform.OS === "ios" ? "padding" : undefined} style={styles.keyboard}>- <View style={styles.header}>- <Text style={styles.title}>EdgeEver</Text>- <Text style={styles.subtitle}>连接你的自托管笔记空间</Text>- </View>-<View style={styles.form}>+ <View style={styles.header}>+ <View style={styles.logo}>+ <LockKeyhole color="#ffffff" size={22} />+ </View>+ <View style={styles.headerText}>+ <Text style={styles.title}>EdgeEver</Text>+ <Text style={styles.subtitle}>连接你的自托管笔记空间</Text>+ </View>+ </View><View style={styles.field}><Text style={styles.label}>实例地址</Text><TextInput@@ -116,7 +120,7 @@ export const LoginScreen = () => {const styles = StyleSheet.create({safeArea: {- backgroundColor: "#f8fafc",+ backgroundColor: "#ecfdf5",flex: 1,},githubButton: {@@ -139,20 +143,42 @@ const styles = StyleSheet.create({padding: 24,},header: {- marginBottom: 28,+ alignItems: "center",+ flexDirection: "row",+ gap: 14,+ marginBottom: 10,+ },+ headerText: {+ flex: 1,+ },+ logo: {+ alignItems: "center",+ backgroundColor: "#10b981",+ borderRadius: 12,+ height: 48,+ justifyContent: "center",+ width: 48,},title: {color: "#0f172a",- fontSize: 34,+ fontSize: 22,fontWeight: "800",},subtitle: {color: "#64748b",- fontSize: 16,- marginTop: 8,+ fontSize: 12,+ marginTop: 3,},form: {+ alignSelf: "center",+ backgroundColor: "#ffffff",+ borderColor: "#a7f3d0",+ borderRadius: 18,+ borderWidth: 1,gap: 16,+ maxWidth: 420,+ padding: 24,+ width: "100%",},field: {gap: 8,@@ -179,8 +205,8 @@ const styles = StyleSheet.create({},button: {alignItems: "center",- backgroundColor: "#0f172a",- borderRadius: 8,+ backgroundColor: "#10b981",+ borderRadius: 10,justifyContent: "center",minHeight: 50,},diff --git a/apps/mobile/src/screens/PwaWorkspaceScreen.tsx b/apps/mobile/src/screens/PwaWorkspaceScreen.tsxnew file mode 100644index 00000000..66f7826b--- /dev/null+++ b/apps/mobile/src/screens/PwaWorkspaceScreen.tsx@@ -0,0 +1,302 @@+import { useCallback, useMemo, useRef, useState } from "react";+import * as FileSystem from "expo-file-system/legacy";+import * as Sharing from "expo-sharing";+import { Alert, BackHandler, Linking, Pressable, StyleSheet, Text, View } from "react-native";+import { useFocusEffect } from "expo-router";+import { SafeAreaView } from "react-native-safe-area-context";+import { RefreshCw } from "lucide-react-native";+import { WebView, type WebViewMessageEvent, type WebViewNavigation } from "react-native-webview";+import { useSession } from "../lib/session";++type NativeBridgeMessage =+ | { type: "download"; filename?: string; dataUrl?: string }+ | { type: "logout" }+ | { type: "unauthorized" };++const SAFE_DOWNLOAD_NAME = /[^a-zA-Z0-9._\-\u4e00-\u9fff]/g;++export const PwaWorkspaceScreen = () => {+ const { session, signOut } = useSession();+ const webViewRef = useRef<WebView>(null);+ const [canGoBack, setCanGoBack] = useState(false);+ const [loadError, setLoadError] = useState<string | null>(null);++ if (!session) {+ return null;+ }++ const instanceOrigin = new URL(session.baseUrl).origin;+ const injectedJavaScriptBeforeContentLoaded = useMemo(+ () => createBridgeScript(instanceOrigin, session.token),+ [instanceOrigin, session.token]+ );++ const handleMessage = useCallback(+ async (event: WebViewMessageEvent) => {+ let message: NativeBridgeMessage;++ try {+ message = JSON.parse(event.nativeEvent.data) as NativeBridgeMessage;+ } catch {+ return;+ }++ if (message.type === "logout" || message.type === "unauthorized") {+ await signOut();+ return;+ }++ if (message.type !== "download" || !message.dataUrl) {+ return;+ }++ try {+ await shareDataUrl(message.dataUrl, message.filename);+ } catch (error) {+ Alert.alert("导出失败", error instanceof Error ? error.message : "无法保存导出文件");+ }+ },+ [signOut]+ );++ useFocusEffect(+ useCallback(() => {+ const subscription = BackHandler.addEventListener("hardwareBackPress", () => {+ if (!canGoBack) {+ return false;+ }++ webViewRef.current?.goBack();+ return true;+ });++ return () => subscription.remove();+ }, [canGoBack])+ );++ const allowNavigation = useCallback(+ (request: { url: string }) => {+ if (request.url === "about:blank") {+ return true;+ }++ try {+ const target = new URL(request.url);+ if (target.origin === instanceOrigin) {+ return true;+ }+ } catch {+ return false;+ }++ void Linking.openURL(request.url);+ return false;+ },+ [instanceOrigin]+ );++ if (loadError) {+ return (+ <SafeAreaView style={styles.errorSafeArea}>+ <View style={styles.errorCard}>+ <Text style={styles.errorTitle}>无法打开 EdgeEver</Text>+ <Text style={styles.errorMessage}>{loadError}</Text>+ <Text numberOfLines={2} style={styles.instanceUrl}>{session.baseUrl}</Text>+ <Pressable+ accessibilityRole="button"+ onPress={() => setLoadError(null)}+ style={({ pressed }) => [styles.retryButton, pressed && styles.retryButtonPressed]}+ >+ <RefreshCw color="#ffffff" size={17} />+ <Text style={styles.retryButtonText}>重新加载</Text>+ </Pressable>+ <Pressable accessibilityRole="button" onPress={() => void signOut()} style={styles.switchButton}>+ <Text style={styles.switchButtonText}>退出并切换实例</Text>+ </Pressable>+ </View>+ </SafeAreaView>+ );+ }++ return (+ <SafeAreaView edges={["top", "bottom"]} style={styles.safeArea}>+ <WebView+ ref={webViewRef}+ allowsBackForwardNavigationGestures+ allowsInlineMediaPlayback+ cacheEnabled+ domStorageEnabled+ javaScriptEnabled+ mediaPlaybackRequiresUserAction={false}+ originWhitelist={["https://*", "http://*", "about:*"]}+ pullToRefreshEnabled+ setSupportMultipleWindows={false}+ sharedCookiesEnabled+ source={{ uri: session.baseUrl }}+ injectedJavaScriptBeforeContentLoaded={injectedJavaScriptBeforeContentLoaded}+ onContentProcessDidTerminate={() => webViewRef.current?.reload()}+ onError={(event) => setLoadError(event.nativeEvent.description || "网络连接失败")}+ onHttpError={(event) => {+ if (event.nativeEvent.statusCode >= 500) {+ setLoadError(`实例返回 HTTP ${event.nativeEvent.statusCode}`);+ }+ }}+ onMessage={handleMessage}+ onNavigationStateChange={(state: WebViewNavigation) => setCanGoBack(state.canGoBack)}+ onShouldStartLoadWithRequest={allowNavigation}+ style={styles.webView}+ />+ </SafeAreaView>+ );+};++const createBridgeScript = (instanceOrigin: string, token: string) => `+(() => {+ if (window.__EDGE_EVER_NATIVE_BRIDGE__) return;+ window.__EDGE_EVER_NATIVE_BRIDGE__ = true;++ const instanceOrigin = ${JSON.stringify(instanceOrigin)};+ const sessionToken = ${JSON.stringify(token)};+ const post = (payload) => window.ReactNativeWebView?.postMessage(JSON.stringify(payload));+ const originalFetch = window.fetch.bind(window);+ const originalCreateObjectURL = URL.createObjectURL.bind(URL);+ const downloadBlobs = new Map();++ window.fetch = async (input, init = {}) => {+ const requestUrl = new URL(typeof input === "string" ? input : input.url, window.location.href);+ const headers = new Headers(typeof input === "string" ? undefined : input.headers);+ new Headers(init.headers || {}).forEach((value, key) => headers.set(key, value));++ if (requestUrl.origin === instanceOrigin && requestUrl.pathname.startsWith("/api/")) {+ headers.set("Authorization", "Bearer " + sessionToken);+ }++ const response = await originalFetch(input, { ...init, headers });+ if (requestUrl.origin === instanceOrigin && response.status === 401) {+ post({ type: "unauthorized" });+ } else if (requestUrl.origin === instanceOrigin && requestUrl.pathname.endsWith("/auth/logout") && response.ok) {+ post({ type: "logout" });+ }+ return response;+ };++ URL.createObjectURL = (blob) => {+ const url = originalCreateObjectURL(blob);+ downloadBlobs.set(url, blob);+ return url;+ };++ document.addEventListener("click", (event) => {+ const anchor = event.target?.closest?.("a[download]");+ if (!anchor || !anchor.href?.startsWith("blob:")) return;+ const blob = downloadBlobs.get(anchor.href);+ if (!blob) return;++ event.preventDefault();+ const reader = new FileReader();+ reader.onload = () => post({+ type: "download",+ filename: anchor.download || "edgeever-export",+ dataUrl: reader.result,+ });+ reader.readAsDataURL(blob);+ }, true);+})();+true;+`;++const shareDataUrl = async (dataUrl: string, requestedName?: string) => {+ const separator = dataUrl.indexOf(",");+ if (separator < 0 || !dataUrl.slice(0, separator).includes(";base64")) {+ throw new Error("导出文件格式不受支持");+ }++ const filename = (requestedName || "edgeever-export").replace(SAFE_DOWNLOAD_NAME, "_");+ const directory = FileSystem.cacheDirectory;+ if (!directory) {+ throw new Error("无法访问系统缓存目录");+ }++ const fileUri = `${directory}${Date.now()}-${filename}`;+ await FileSystem.writeAsStringAsync(fileUri, dataUrl.slice(separator + 1), {+ encoding: FileSystem.EncodingType.Base64,+ });++ if (!(await Sharing.isAvailableAsync())) {+ throw new Error("当前设备不支持系统分享");+ }++ await Sharing.shareAsync(fileUri);+};++const styles = StyleSheet.create({+ safeArea: {+ backgroundColor: "#f8fafc",+ flex: 1,+ },+ webView: {+ backgroundColor: "#f8fafc",+ flex: 1,+ },+ errorSafeArea: {+ alignItems: "center",+ backgroundColor: "#ecfdf5",+ flex: 1,+ justifyContent: "center",+ padding: 24,+ },+ errorCard: {+ backgroundColor: "#ffffff",+ borderColor: "#a7f3d0",+ borderRadius: 18,+ borderWidth: 1,+ maxWidth: 420,+ padding: 24,+ width: "100%",+ },+ errorTitle: {+ color: "#0f172a",+ fontSize: 20,+ fontWeight: "800",+ },+ errorMessage: {+ color: "#475569",+ fontSize: 14,+ lineHeight: 21,+ marginTop: 10,+ },+ instanceUrl: {+ color: "#64748b",+ fontSize: 12,+ marginTop: 8,+ },+ retryButton: {+ alignItems: "center",+ backgroundColor: "#10b981",+ borderRadius: 10,+ flexDirection: "row",+ gap: 8,+ justifyContent: "center",+ marginTop: 22,+ minHeight: 46,+ },+ retryButtonPressed: {+ backgroundColor: "#059669",+ },+ retryButtonText: {+ color: "#ffffff",+ fontSize: 15,+ fontWeight: "700",+ },+ switchButton: {+ alignItems: "center",+ justifyContent: "center",+ marginTop: 10,+ minHeight: 42,+ },+ switchButtonText: {+ color: "#475569",+ fontSize: 14,+ fontWeight: "600",+ },+});diff --git a/apps/mobile/src/screens/WorkspaceScreen.tsx b/apps/mobile/src/screens/WorkspaceScreen.tsxdeleted file mode 100644index af104d50..00000000--- a/apps/mobile/src/screens/WorkspaceScreen.tsx+++ /dev/null@@ -1,7138 +0,0 @@-import { createContext, useContext, useEffect, useMemo, useRef, useState, type ReactNode } from "react";-import { useMutation, useQuery, useQueryClient, type UseMutationResult } from "@tanstack/react-query";-import * as Clipboard from "expo-clipboard";-import Constants from "expo-constants";-import * as DocumentPicker from "expo-document-picker";-import { manipulateAsync, SaveFormat } from "expo-image-manipulator";-import type { MemoFilterMode, MemoSortMode } from "@edgeever/client";-import {- Archive,- BookOpen,- Bold,- Check,- ChevronDown,- ChevronLeft,- ChevronRight,- CheckSquare,- Code,- Copy,- ExternalLink,- FileArchive,- FileSpreadsheet,- FileText,- Folder,- Grid,- HardDrive,- Heading2,- History,- Home,- Image as ImageIcon,- ImagePlus,- Italic,- KeyRound,- Link,- List,- LogOut,- Merge,- Minus,- MoreHorizontal,- Music,- Pencil,- Pin,- Plus,- Quote,- RefreshCw,- RotateCcw,- Search,- ShieldCheck,- Sparkles,- Tag,- Trash2,- Upload,- UserRound,- Video,- X,-} from "lucide-react-native";-import {- ActivityIndicator,- Alert,- AppState,- type AppStateStatus,- FlatList,- Image as RNImage,- Linking,- Modal,- Platform,- Pressable,- RefreshControl,- ScrollView,- StyleSheet,- Switch,- Text,- TextInput,- View,-} from "react-native";-import { SafeAreaView } from "react-native-safe-area-context";-import { WebView } from "react-native-webview";-import type { ApiToken, MemoDetail, MemoRevision, MemoSummary, Notebook, ResourceListItem, TagSummary } from "@edgeever/shared";-import { clearMobileMemoDraft, readMobileMemoDraft, writeMobileMemoDraft } from "../lib/mobile-drafts";-import {- readMobileImageCompressionEnabled,- readMobileLocalePreference,- readMobileMemoListDensity,- readMobileNotebookSort,- readMobileResourceLayout,- writeMobileImageCompressionEnabled,- writeMobileLocalePreference,- writeMobileMemoListDensity,- writeMobileNotebookSort,- writeMobileResourceLayout,- type MobileLocalePreference,- type MobileMemoListDensity,- type MobileNotebookSortPreference,- type MobileResourceLayoutPreference,-} from "../lib/preferences";-import { useSession } from "../lib/session";-import {- deleteMobileSyncQueueItem,- emptyMobileSyncQueueSummary,- listMobileSyncQueueItems,- loadMobileSyncQueueSummary,- queueMobileMemoUpdate,- shouldQueueMobileMemoSaveError,- syncMobileQueuedChanges,- type MobileSyncQueueItem,- type MobileSyncQueueSummary,-} from "../lib/sync-queue";--const ALL_NOTES_ID = "all";-const DEFAULT_MEMO_TITLE = "无标题笔记";-const MOBILE_APP_VERSION = Constants.expoConfig?.version ?? "0.1.2";-const GITHUB_REPOSITORY_URL = "https://github.com/tianma-if/edgeever";-const EVERNOTE_IMPORT_SCRIPT_URL =- "https://raw.githubusercontent.com/tianma-if/edgeever/main/scripts/import-evernote-enex-via-mcp.mjs";-const EVERNOTE_MIGRATION_PROMPT = `你是 AI 编程助手。请帮我把本地的印象笔记全量迁移到我当前部署的 EdgeEver 实例中:-1. 检查并使用 \`pipx install evernote-backup\` 自动安装备份工具。-2. 提示我输入印象笔记的用户名和密码并初始化数据库(指定 china 后端),随后同步数据并导出到 \`./evernote-export\` 目录。-3. 从 GitHub 下载最新版迁移脚本:\`${EVERNOTE_IMPORT_SCRIPT_URL}\` 到本地。-4. 安装脚本所需的本地图片压缩库 \`sharp\` 和 \`fast-xml-parser\` 依赖。-5. 使用先前配置的 URL 和 Token 运行该脚本完成迁移(脚本会自动进行 WebP 图片转换):- - 全量迁移:\`bun import-evernote-enex-via-mcp.mjs --input "./evernote-export" --yes\`- - 指定迁移某些笔记本:追加 \`--include "笔记本A,笔记本B"\` 参数。--请告诉我你需要什么信息(如账号密码),收到后直接并发自动执行上述步骤。`;-const MOBILE_MEMO_TEMPLATES_ZH: MemoTemplate[] = [- {- id: "quick-note",- title: "速记",- description: "适合临时记录想法、链接和灵感。",- contentMarkdown: "## 速记\n\n- \n\n## 后续动作\n\n- [ ] ",- tags: ["template", "quick-note"],- },- {- id: "meeting",- title: "会议记录",- description: "议题、结论和待办放在同一页。",- contentMarkdown: "## 会议记录\n\n时间:\n参与人:\n\n## 议题\n\n- \n\n## 结论\n\n- \n\n## 待办\n\n- [ ] ",- tags: ["template", "meeting"],- },- {- id: "checklist",- title: "清单",- description: "快速列出待办、采购、项目检查项。",- contentMarkdown: "## 清单\n\n- [ ] \n- [ ] \n- [ ] ",- tags: ["template", "checklist"],- },- {- id: "reading",- title: "读书笔记",- description: "摘录、观点和下一步阅读整理。",- contentMarkdown: "## 读书笔记\n\n书名:\n作者:\n\n## 摘录\n\n> \n\n## 我的观点\n\n\n## 延伸问题\n\n- ",- tags: ["template", "reading"],- },- {- id: "daily",- title: "每日复盘",- description: "记录今天完成了什么、卡在哪里。",- contentMarkdown: "## 每日复盘\n\n## 今天完成\n\n- \n\n## 遇到的问题\n\n- \n\n## 明天优先级\n\n- [ ] ",- tags: ["template", "daily"],- },-];-const MOBILE_MEMO_TEMPLATES_EN: MemoTemplate[] = [- {- id: "quick-note",- title: "Quick note",- description: "For temporary ideas, links, and sparks.",- contentMarkdown: "## Quick note\n\n- \n\n## Next actions\n\n- [ ] ",- tags: ["template", "quick-note"],- },- {- id: "meeting",- title: "Meeting notes",- description: "Keep agenda, decisions, and todos on one page.",- contentMarkdown: "## Meeting notes\n\nTime:\nAttendees:\n\n## Agenda\n\n- \n\n## Decisions\n\n- \n\n## Todos\n\n- [ ] ",- tags: ["template", "meeting"],- },- {- id: "checklist",- title: "Checklist",- description: "Quickly list tasks, shopping items, or project checks.",- contentMarkdown: "## Checklist\n\n- [ ] \n- [ ] \n- [ ] ",- tags: ["template", "checklist"],- },- {- id: "reading",- title: "Reading notes",- description: "Collect excerpts, ideas, and follow-up reading.",- contentMarkdown: "## Reading notes\n\nBook:\nAuthor:\n\n## Excerpts\n\n> \n\n## My thoughts\n\n\n## Follow-up questions\n\n- ",- tags: ["template", "reading"],- },- {- id: "daily",- title: "Daily review",- description: "Record what you finished today and where you got stuck.",- contentMarkdown: "## Daily review\n\n## Done today\n\n- \n\n## Blockers\n\n- \n\n## Tomorrow's priorities\n\n- [ ] ",- tags: ["template", "daily"],- },-];--const formatExecutionEnvironment = (environment: string | null | undefined, localePreference: MobileLocaleMode = "system") => {- const english = isEnglishMobileLocale(localePreference);-- switch (environment) {- case "standalone":- return english ? "Standalone app" : "独立安装包";- case "storeClient":- return english ? "Expo Go / development client" : "Expo Go / 开发客户端";- case "bare":- return "Bare React Native";- default:- return environment || getMobileSystemInfoText(localePreference).unknown;- }-};-const ALL_TOKEN_SCOPES = [- "read:notebooks",- "write:notebooks",- "read:memos",- "write:memos",- "read:resources",- "write:resources",- "read:tags",- "write:tags",-];-const ADVANCED_PROMPTS_ZH = [- {- id: "persona",- title: "人物画像",- prompt:- "请通过 EdgeEver MCP 读取我的笔记,基于真实笔记内容为我整理一份人物画像。请只根据笔记中的证据判断,不要做心理诊断,不要夸张定性。输出包括:长期关注的主题、做事偏好、能力线索、反复出现的问题、近期动向,并在每条结论后列出相关笔记标题或 memo id。",- },- {- id: "knowledgeMap",- title: "知识图谱",- prompt:- "请通过 EdgeEver MCP 读取我的笔记,为我整理一份知识地图。请找出主要知识领域、每个领域下的关键概念、相关笔记、我已经掌握的部分和还需要补齐的问题。输出结构要适合后续继续学习和写作。",- },- {- id: "tagAdvice",- title: "标签建议",- prompt:- "请通过 EdgeEver MCP 读取我的笔记和现有标签,帮我设计一套更清晰的标签体系。请指出重复、过细、过宽或命名不一致的标签,并给出合并、重命名和新增标签建议。先不要修改笔记,等我确认后再执行。",- },-];-const ADVANCED_PROMPTS_EN = [- {- id: "persona",- title: "Persona profile",- prompt:- "Use EdgeEver MCP to read my notes and create a persona profile based on the real note content. Judge only from evidence in the notes, do not make psychological diagnoses, and do not exaggerate traits. Include long-term themes, work preferences, capability signals, recurring problems, recent direction, and list related note titles or memo ids after each conclusion.",- },- {- id: "knowledgeMap",- title: "Knowledge map",- prompt:- "Use EdgeEver MCP to read my notes and organize a knowledge map. Identify the main knowledge areas, key concepts in each area, related notes, what I already understand, and the gaps I still need to fill. Structure the output so it is useful for continued learning and writing.",- },- {- id: "tagAdvice",- title: "Tag suggestions",- prompt:- "Use EdgeEver MCP to read my notes and existing tags, then design a clearer tag system. Point out duplicate, overly narrow, overly broad, or inconsistently named tags, and suggest merges, renames, and new tags. Do not modify notes yet. Wait for my confirmation before applying changes.",- },-];-const MOBILE_LOCALE_OPTIONS: Array<{ label: string; value: MobileLocalePreference }> = [- { label: "跟随系统", value: "system" },- { label: "简体中文", value: "zh-CN" },- { label: "English", value: "en-US" },-];-const COMPRESSIBLE_IMAGE_TYPES = new Set(["image/png", "image/jpeg", "image/webp", "image/avif"]);-const MAX_COMPRESSED_IMAGE_EDGE = 2560;-const IMAGE_COMPRESSION_QUALITY = 0.82;--type MobileView = "notes" | "search" | "account" | "settings";-type MemoView = "notebook" | "trash";-type MemoTemplate = {- id: string;- title: string;- description: string;- contentMarkdown: string;- tags: string[];-};-type NotebookOption = {- notebook: Notebook;- depth: number;-};-type MobileNotebookSortMode = MobileNotebookSortPreference;-type MobileLocaleMode = MobileLocalePreference;-const MobileLocaleContext = createContext<MobileLocaleMode>("system");-const useMobileLocalePreference = () => useContext(MobileLocaleContext);-type TextSelection = {- start: number;- end: number;-};-type MarkdownAction = "heading" | "bold" | "italic" | "bullet" | "checklist" | "quote" | "code" | "link" | "horizontalRule";--export const WorkspaceScreen = () => {- const { client, session, signOut } = useSession();- const queryClient = useQueryClient();- const [activeView, setActiveView] = useState<MobileView>("notes");- const [activeNotebookId, setActiveNotebookId] = useState<string>(ALL_NOTES_ID);- const [memoView, setMemoView] = useState<MemoView>("notebook");- const [memoFilterMode, setMemoFilterMode] = useState<MemoFilterMode>("all");- const [memoSortMode, setMemoSortMode] = useState<MemoSortMode>("updated-desc");- const [memoListDensity, setMemoListDensity] = useState<MobileMemoListDensity>("preview");- const [notebookSortMode, setNotebookSortMode] = useState<MobileNotebookSortMode>("manual");- const [localePreference, setLocalePreference] = useState<MobileLocaleMode>("system");- const [imageCompressionEnabled, setImageCompressionEnabled] = useState(true);- const [selectedMemoId, setSelectedMemoId] = useState<string | null>(null);- const [searchText, setSearchText] = useState("");- const [createOpen, setCreateOpen] = useState(false);- const [notesActionsOpen, setNotesActionsOpen] = useState(false);- const [notebookPickerOpen, setNotebookPickerOpen] = useState(false);- const [memoActionsMemo, setMemoActionsMemo] = useState<MemoSummary | null>(null);- const [templatesOpen, setTemplatesOpen] = useState(false);- const [editingMemo, setEditingMemo] = useState<MemoDetail | null>(null);- const [richEditingMemo, setRichEditingMemo] = useState<MemoDetail | null>(null);- const [notebookManagerOpen, setNotebookManagerOpen] = useState(false);- const [tagsManagerOpen, setTagsManagerOpen] = useState(false);- const [resourcesOpen, setResourcesOpen] = useState(false);- const [apiTokensOpen, setApiTokensOpen] = useState(false);- const [evernoteGuideOpen, setEvernoteGuideOpen] = useState(false);- const [advancedPlayOpen, setAdvancedPlayOpen] = useState(false);- const [systemInfoOpen, setSystemInfoOpen] = useState(false);- const [syncQueueOpen, setSyncQueueOpen] = useState(false);- const [revisionMemo, setRevisionMemo] = useState<MemoDetail | null>(null);- const [selectionMode, setSelectionMode] = useState(false);- const [selectedMemoIds, setSelectedMemoIds] = useState<Set<string>>(() => new Set());- const [selectionMoveOpen, setSelectionMoveOpen] = useState(false);- const [syncQueueSummary, setSyncQueueSummary] = useState<MobileSyncQueueSummary>(() => emptyMobileSyncQueueSummary());- const [syncQueueMessage, setSyncQueueMessage] = useState("");- const [isSyncingQueue, setIsSyncingQueue] = useState(false);- const [lastAutoSyncAt, setLastAutoSyncAt] = useState<string | null>(null);- const autoSyncRunningRef = useRef(false);-- const notebooksQuery = useQuery({- queryKey: ["mobile", "notebooks"],- queryFn: async () => {- if (!client) {- throw new Error("Client is not ready");- }-- return client.listNotebooks();- },- enabled: Boolean(client),- });-- const notebooks = notebooksQuery.data?.notebooks ?? [];- const activeNotebook = notebooks.find((notebook) => notebook.id === activeNotebookId) ?? null;-- const memosQuery = useQuery({- queryKey: ["mobile", "memos", memoView, activeNotebookId, memoFilterMode, memoSortMode],- queryFn: async () => {- if (!client) {- throw new Error("Client is not ready");- }-- return client.listMemos({- notebookId: activeNotebookId === ALL_NOTES_ID ? null : activeNotebookId,- filter: memoFilterMode,- limit: 50,- sort: memoSortMode,- trash: memoView === "trash",- });- },- enabled: Boolean(client),- });-- const searchQuery = useQuery({- queryKey: ["mobile", "search", searchText.trim()],- queryFn: async () => {- if (!client) {- throw new Error("Client is not ready");- }-- return client.listMemos({- q: searchText.trim(),- limit: 50,- sort: "updated-desc",- });- },- enabled: Boolean(client && searchText.trim().length > 0),- });-- const memoDetailQuery = useQuery({- queryKey: ["mobile", "memo", memoView, selectedMemoId],- queryFn: async () => {- if (!client || !selectedMemoId) {- throw new Error("Memo is not selected");- }-- return client.getMemo(selectedMemoId, { includeDeleted: memoView === "trash" });- },- enabled: Boolean(client && selectedMemoId),- });-- const refresh = async () => {- await Promise.all([- queryClient.invalidateQueries({ queryKey: ["mobile", "notebooks"] }),- queryClient.invalidateQueries({ queryKey: ["mobile", "memos"] }),- queryClient.invalidateQueries({ queryKey: ["mobile", "search"] }),- queryClient.invalidateQueries({ queryKey: ["mobile", "memo"] }),- ]);- setSyncQueueSummary(await loadMobileSyncQueueSummary());- };-- const handleMemoPress = (memoId: string) => {- if (selectionMode) {- toggleSelectedMemo(memoId);- return;- }-- setSelectedMemoId(memoId);- };-- const handleSearchMemoPress = (memo: MemoSummary) => {- setActiveView("notes");- setMemoView(memo.isDeleted ? "trash" : "notebook");- if (!memo.isDeleted) {- setActiveNotebookId(memo.notebookId);- }- setSelectedMemoId(memo.id);- };-- const toggleSelectedMemo = (memoId: string) => {- setSelectionMode(true);- setSelectedMemoIds((current) => {- const next = new Set(current);-- if (next.has(memoId)) {- next.delete(memoId);- } else {- next.add(memoId);- }-- return next;- });- };-- const clearSelection = () => {- setSelectionMode(false);- setSelectedMemoIds(new Set());- setSelectionMoveOpen(false);- };-- const toggleVisibleSelection = () => {- const visibleMemoIds = memos.map((memo) => memo.id);-- if (visibleMemoIds.length === 0) {- return;- }-- setSelectionMode(true);- setSelectedMemoIds((current) => {- const next = new Set(current);- const allVisibleSelected = visibleMemoIds.every((memoId) => next.has(memoId));-- for (const memoId of visibleMemoIds) {- if (allVisibleSelected) {- next.delete(memoId);- } else {- next.add(memoId);- }- }-- return next;- });- };-- const enterSelectionMode = () => {- setSelectionMode(true);- };-- const closeDetail = () => {- setSelectedMemoId(null);- };-- const closeRichEditor = () => {- const memoId = richEditingMemo?.id ?? null;- setRichEditingMemo(null);- if (memoId) {- setSelectedMemoId(memoId);- }- void invalidateWorkspace();- };-- const memoCount = notebooks.reduce((total, notebook) => total + notebook.memoCount, 0);- const memos = memosQuery.data?.memos ?? [];- const searchResults = searchQuery.data?.memos ?? [];- const selectedMemo = memoDetailQuery.data?.memo ?? null;- const isRefreshing = notebooksQuery.isFetching || memosQuery.isFetching || searchQuery.isFetching || memoDetailQuery.isFetching;- const selectedMemoIdList = Array.from(selectedMemoIds);- const selectedMemos = memos.filter((memo) => selectedMemoIds.has(memo.id));- const canToggleVisibleSelection = memos.length > 0;- const allVisibleMemosSelected = canToggleVisibleSelection && memos.every((memo) => selectedMemoIds.has(memo.id));- const nextSelectionPinValue = selectedMemos.some((memo) => !memo.isPinned);- const canCreateMemo = memoView !== "trash" && notebooks.length > 0;- const selectedMemoIndex = selectedMemoId ? memos.findIndex((memo) => memo.id === selectedMemoId) : -1;- const previousMemoId = selectedMemoIndex > 0 ? memos[selectedMemoIndex - 1]?.id : null;- const nextMemoId = selectedMemoIndex >= 0 && selectedMemoIndex < memos.length - 1 ? memos[selectedMemoIndex + 1]?.id : null;-- useEffect(() => {- clearSelection();- }, [activeNotebookId, memoFilterMode, memoSortMode, memoView]);-- useEffect(() => {- let mounted = true;-- loadMobileSyncQueueSummary().then((summary) => {- if (mounted) {- setSyncQueueSummary(summary);- }- });-- return () => {- mounted = false;- };- }, []);-- useEffect(() => {- let mounted = true;-- readMobileImageCompressionEnabled().then((enabled) => {- if (mounted) {- setImageCompressionEnabled(enabled);- }- });-- return () => {- mounted = false;- };- }, []);-- useEffect(() => {- let mounted = true;-- readMobileMemoListDensity().then((density) => {- if (mounted) {- setMemoListDensity(density);- }- });-- return () => {- mounted = false;- };- }, []);-- useEffect(() => {- let mounted = true;-- readMobileLocalePreference().then((locale) => {- if (mounted) {- setLocalePreference(locale);- }- });-- return () => {- mounted = false;- };- }, []);-- useEffect(() => {- let mounted = true;-- readMobileNotebookSort().then((sortMode) => {- if (mounted) {- setNotebookSortMode(sortMode);- }- });-- return () => {- mounted = false;- };- }, []);-- const handleMemoListDensityChange = (density: MobileMemoListDensity) => {- setMemoListDensity(density);- void writeMobileMemoListDensity(density);- };-- const handleNotebookSortModeChange = (sortMode: MobileNotebookSortMode) => {- setNotebookSortMode(sortMode);- void writeMobileNotebookSort(sortMode);- };-- const handleLocalePreferenceChange = (locale: MobileLocaleMode) => {- setLocalePreference(locale);- void writeMobileLocalePreference(locale);- };-- const handleImageCompressionChange = (enabled: boolean) => {- setImageCompressionEnabled(enabled);- void writeMobileImageCompressionEnabled(enabled);- };-- const invalidateWorkspace = async () => {- await Promise.all([- queryClient.invalidateQueries({ queryKey: ["mobile", "notebooks"] }),- queryClient.invalidateQueries({ queryKey: ["mobile", "memos"] }),- queryClient.invalidateQueries({ queryKey: ["mobile", "search"] }),- queryClient.invalidateQueries({ queryKey: ["mobile", "memo"] }),- ]);- };-- const updateMemoMutation = useMutation({- mutationFn: async ({ memo, payload }: { memo: MemoDetail; payload: { title?: string; contentMarkdown?: string; isPinned?: boolean; notebookId?: string; tags?: string[] } }) => {- if (!client) {- throw new Error("Client is not ready");- }-- const editSessionResponse = payload.contentMarkdown !== undefined- ? await client.createMemoEditSession(memo.id)- : null;- const response = await client.updateMemo(memo.id, {- expectedRevision: memo.revision,- ...(editSessionResponse- ? {- expectedContentHash: memo.contentHash,- editSessionId: editSessionResponse.editSession.id,- }- : {}),- ...payload,- });-- return response.memo;- },- onSuccess: async (memo) => {- await invalidateWorkspace();- queryClient.setQueryData(["mobile", "memo", memoView, memo.id], { memo });- },- });-- const deleteMemoMutation = useMutation({- mutationFn: async ({ memo, permanent }: { memo: MemoDetail; permanent: boolean }) => {- if (!client) {- throw new Error("Client is not ready");- }-- await client.deleteMemo(memo.id, { permanent });- return { memo, permanent };- },- onSuccess: async () => {- await invalidateWorkspace();- setSelectedMemoId(null);- },- });-- const restoreMemoMutation = useMutation({- mutationFn: async (memo: MemoDetail) => {- if (!client) {- throw new Error("Client is not ready");- }-- const response = await client.restoreMemo(memo.id);- return response.memo;- },- onSuccess: async (memo) => {- await invalidateWorkspace();- setMemoView("notebook");- setSelectedMemoId(memo.id);- },- });-- const restoreMemoByIdMutation = useMutation({- mutationFn: async (memoId: string) => {- if (!client) {- throw new Error("Client is not ready");- }-- const response = await client.restoreMemo(memoId);- return response.memo;- },- onSuccess: async (memo) => {- await invalidateWorkspace();- setMemoView("notebook");- setSelectedMemoId(memo.id);- setMemoActionsMemo(null);- },- });-- const emptyTrashMutation = useMutation({- mutationFn: async () => {- if (!client) {- throw new Error("Client is not ready");- }-- return client.emptyTrash();- },- onSuccess: async () => {- await invalidateWorkspace();- setSelectedMemoId(null);- },- });-- const moveMemosMutation = useMutation({- mutationFn: async ({ memoIds, notebookId }: { memoIds: string[]; notebookId: string }) => {- if (!client) {- throw new Error("Client is not ready");- }-- return client.moveMemos({ memoIds, notebookId });- },- onSuccess: async () => {- await invalidateWorkspace();- clearSelection();- },- });-- const pinMemosMutation = useMutation({- mutationFn: async ({ memoIds, isPinned }: { memoIds: string[]; isPinned: boolean }) => {- if (!client) {- throw new Error("Client is not ready");- }-- await Promise.all(memoIds.map((memoId) => client.updateMemo(memoId, { isPinned })));- return { ok: true };- },- onSuccess: async () => {- await invalidateWorkspace();- clearSelection();- },- });-- const deleteMemosMutation = useMutation({- mutationFn: async ({ memoIds, permanent }: { memoIds: string[]; permanent: boolean }) => {- if (!client) {- throw new Error("Client is not ready");- }-- return client.deleteMemos({ memoIds, permanent });- },- onSuccess: async () => {- await invalidateWorkspace();- clearSelection();- },- });-- const mergeMemosMutation = useMutation({- mutationFn: async ({ memoIds, notebookId }: { memoIds: string[]; notebookId?: string }) => {- if (!client) {- throw new Error("Client is not ready");- }-- const response = await client.mergeMemos({ memoIds, notebookId });- return response.memo;- },- onSuccess: async (memo) => {- await invalidateWorkspace();- clearSelection();- setSelectedMemoId(memo.id);- },- });-- const handleTogglePin = (memo: MemoDetail) => {- updateMemoMutation.mutate({ memo, payload: { isPinned: !memo.isPinned } });- };-- const handleDeleteMemo = (memo: MemoDetail) => {- Alert.alert(memoView === "trash" ? "永久删除笔记?" : "删除笔记?", memoView === "trash" ? "此操作不可撤销。" : "笔记会移动到回收站。", [- { text: "取消", style: "cancel" },- {- text: memoView === "trash" ? "永久删除" : "删除",- style: "destructive",- onPress: () => deleteMemoMutation.mutate({ memo, permanent: memoView === "trash" }),- },- ]);- };-- const handleEmptyTrash = () => {- Alert.alert("清空回收站?", "回收站中的笔记会被永久删除,此操作不可撤销。", [- { text: "取消", style: "cancel" },- {- text: "清空",- style: "destructive",- onPress: () => emptyTrashMutation.mutate(),- },- ]);- };-- const handleDeleteSelection = () => {- const permanent = memoView === "trash";-- Alert.alert(permanent ? "永久删除选中笔记?" : "删除选中笔记?", permanent ? "此操作不可撤销。" : "选中的笔记会移动到回收站。", [- { text: "取消", style: "cancel" },- {- text: permanent ? "永久删除" : "删除",- style: "destructive",- onPress: () => deleteMemosMutation.mutate({ memoIds: selectedMemoIdList, permanent }),- },- ]);- };-- const requestDeleteMemoSummary = (memo: MemoSummary) => {- const permanent = memoView === "trash";-- Alert.alert(permanent ? "永久删除笔记?" : "删除笔记?", permanent ? "此操作不可撤销。" : "笔记会移动到回收站。", [- { text: "取消", style: "cancel" },- {- text: permanent ? "永久删除" : "删除",- style: "destructive",- onPress: () => {- setMemoActionsMemo(null);- deleteMemosMutation.mutate({ memoIds: [memo.id], permanent });- },- },- ]);- };-- const selectSingleMemo = (memoId: string) => {- setSelectionMode(true);- setSelectedMemoIds(new Set([memoId]));- };-- const handleMergeSelection = () => {- if (selectedMemoIdList.length < 2) {- return;- }-- const targetNotebookId = activeNotebookId === ALL_NOTES_ID ? selectedMemos[0]?.notebookId : activeNotebookId;-- Alert.alert("合并选中笔记?", "服务端会把选中的笔记合并成一条新笔记。", [- { text: "取消", style: "cancel" },- {- text: "合并",- onPress: () => mergeMemosMutation.mutate({ memoIds: selectedMemoIdList, notebookId: targetNotebookId }),- },- ]);- };-- const handleSyncQueuedChanges = async () => {- if (!client || isSyncingQueue) {- return;- }-- setIsSyncingQueue(true);- setSyncQueueMessage("");-- try {- const result = await syncMobileQueuedChanges(client, {- onSynced: async (memo) => {- queryClient.setQueryData(["mobile", "memo", "notebook", memo.id], { memo });- queryClient.setQueryData(["mobile", "memo", "trash", memo.id], { memo });- },- });- await invalidateWorkspace();- setSyncQueueSummary(await loadMobileSyncQueueSummary());- setSyncQueueMessage(result.attempted === 0 ? "没有可同步的变更" : `已同步 ${result.synced} 条,失败 ${result.failed + result.conflicted} 条`);- } catch (error) {- setSyncQueueSummary(await loadMobileSyncQueueSummary());- setSyncQueueMessage(error instanceof Error ? error.message : "同步失败");- } finally {- setIsSyncingQueue(false);- }- };-- const runAutomaticSync = async () => {- if (!client || autoSyncRunningRef.current) {- return;- }-- autoSyncRunningRef.current = true;-- const summary = await loadMobileSyncQueueSummary();- setSyncQueueSummary(summary);-- if (summary.pending + summary.error + summary.syncing === 0) {- autoSyncRunningRef.current = false;- return;- }-- setIsSyncingQueue(true);- setSyncQueueMessage("正在自动同步本地变更");-- try {- const result = await syncMobileQueuedChanges(client, {- onSynced: async (memo) => {- queryClient.setQueryData(["mobile", "memo", "notebook", memo.id], { memo });- queryClient.setQueryData(["mobile", "memo", "trash", memo.id], { memo });- },- });- await invalidateWorkspace();- setSyncQueueSummary(await loadMobileSyncQueueSummary());- setLastAutoSyncAt(new Date().toISOString());- setSyncQueueMessage(result.attempted === 0 ? "" : `自动同步完成:成功 ${result.synced} 条,失败 ${result.failed + result.conflicted} 条`);- } catch (error) {- setSyncQueueSummary(await loadMobileSyncQueueSummary());- setSyncQueueMessage(error instanceof Error ? error.message : "自动同步失败");- } finally {- setIsSyncingQueue(false);- autoSyncRunningRef.current = false;- }- };-- useEffect(() => {- if (!client) {- return;- }-- void runAutomaticSync();-- const subscription = AppState.addEventListener("change", (nextState: AppStateStatus) => {- if (nextState === "active") {- void runAutomaticSync();- }- });-- return () => subscription.remove();- }, [client, lastAutoSyncAt]);-- return (- <MobileLocaleContext.Provider value={localePreference}>- <SafeAreaView style={styles.safeArea}>- <AppHeader instance={session?.baseUrl ?? ""} onRefresh={refresh} onSignOut={signOut} />-- {activeView === "notes" ? (- <NotesView- activeNotebook={activeNotebook}- activeNotebookId={activeNotebookId}- isLoading={memosQuery.isLoading}- isRefreshing={isRefreshing}- memoCount={memosQuery.data?.totalCount ?? memos.length}- memoFilterMode={memoFilterMode}- memoListDensity={memoListDensity}- memoSortMode={memoSortMode}- memoView={memoView}- memos={memos}- notebookSortMode={notebookSortMode}- notebooks={notebooks}- notebooksMemoCount={memoCount}- onCreate={() => setCreateOpen(true)}- onEmptyTrash={handleEmptyTrash}- onFilterModeChange={setMemoFilterMode}- onMemoListDensityChange={handleMemoListDensityChange}- onOpenActions={() => setNotesActionsOpen(true)}- onOpenNotebookPicker={() => setNotebookPickerOpen(true)}- onOpenSearch={() => setActiveView("search")}- onOpenTemplates={() => setTemplatesOpen(true)}- onMemoPress={handleMemoPress}- onMemoLongPress={(memo) => setMemoActionsMemo(memo)}- onRefresh={refresh}- onSelectNotebook={setActiveNotebookId}- onSetMemoView={setMemoView}- onSortModeChange={setMemoSortMode}- selectionMode={selectionMode}- selectedMemoIds={selectedMemoIds}- error={memosQuery.error}- isError={memosQuery.isError}- isEmptyingTrash={emptyTrashMutation.isPending}- />- ) : null}-- {activeView === "search" ? (- <SearchView- isLoading={searchQuery.isFetching}- isRefreshing={isRefreshing}- onClose={() => {- setSearchText("");- setActiveView("notes");- }}- onMemoPress={handleSearchMemoPress}- onRefresh={refresh}- results={searchResults}- searchText={searchText}- setSearchText={setSearchText}- totalCount={searchQuery.data?.totalCount ?? searchResults.length}- />- ) : null}-- {activeView === "account" ? <AccountView instance={session?.baseUrl ?? ""} userName={session?.user?.username ?? "owner"} onSignOut={signOut} /> : null}- {activeView === "settings" ? (- <SettingsView- instance={session?.baseUrl ?? ""}- userName={session?.user?.username ?? "owner"}- notebookCount={notebooks.length}- memoCount={memoCount}- onOpenAdvancedPlay={() => setAdvancedPlayOpen(true)}- onOpenApiTokens={() => setApiTokensOpen(true)}- onOpenEvernoteGuide={() => setEvernoteGuideOpen(true)}- onOpenNotebookManager={() => setNotebookManagerOpen(true)}- onOpenResources={() => setResourcesOpen(true)}- onOpenSystemInfo={() => setSystemInfoOpen(true)}- onOpenTagsManager={() => setTagsManagerOpen(true)}- onOpenTemplates={() => setTemplatesOpen(true)}- onOpenSyncQueue={() => setSyncQueueOpen(true)}- onSyncQueuedChanges={handleSyncQueuedChanges}- syncQueueMessage={syncQueueMessage}- syncQueueSummary={syncQueueSummary}- isSyncingQueue={isSyncingQueue}- localePreference={localePreference}- onLocalePreferenceChange={handleLocalePreferenceChange}- imageCompressionEnabled={imageCompressionEnabled}- onImageCompressionChange={handleImageCompressionChange}- onSignOut={signOut}- />- ) : null}-- <MemoDetailModal- isDeleting={deleteMemoMutation.isPending}- isLoading={memoDetailQuery.isLoading}- isRestoring={restoreMemoMutation.isPending}- isSaving={updateMemoMutation.isPending}- memo={selectedMemo}- onClose={closeDetail}- onDelete={handleDeleteMemo}- onEdit={setEditingMemo}- onRichEdit={setRichEditingMemo}- onOpenNextMemo={nextMemoId ? () => setSelectedMemoId(nextMemoId) : undefined}- onOpenPreviousMemo={previousMemoId ? () => setSelectedMemoId(previousMemoId) : undefined}- onOpenResources={() => setResourcesOpen(true)}- onOpenRevisions={setRevisionMemo}- onRestore={(memo) => restoreMemoMutation.mutate(memo)}- onTogglePin={handleTogglePin}- visible={Boolean(selectedMemoId)}- />-- <EditMemoModal- memo={editingMemo}- imageCompressionEnabled={imageCompressionEnabled}- notebooks={notebooks}- onClose={() => setEditingMemo(null)}- onQueued={async () => {- setEditingMemo(null);- setSyncQueueSummary(await loadMobileSyncQueueSummary());- setSyncQueueMessage("变更已保存到本地队列");- }}- onSaved={(memo) => {- setEditingMemo(null);- setSelectedMemoId(memo.id);- }}- updateMutation={updateMemoMutation}- />- <RichEditorModal baseUrl={session?.baseUrl ?? ""} memo={richEditingMemo} notebooks={notebooks} onClose={closeRichEditor} token={session?.token ?? ""} />- <NotebookPickerModal- activeNotebookId={activeNotebookId}- notebookSortMode={notebookSortMode}- notebooks={notebooks}- notebooksMemoCount={memoCount}- onClose={() => setNotebookPickerOpen(false)}- onSelect={(notebookId) => {- setActiveNotebookId(notebookId);- setNotebookPickerOpen(false);- }}- visible={notebookPickerOpen}- />-- <NotebookManagerModal- notebookSortMode={notebookSortMode}- notebooks={notebooks}- onClose={() => setNotebookManagerOpen(false)}- onSortModeChange={handleNotebookSortModeChange}- visible={notebookManagerOpen}- />- <TagsManagerModal onClose={() => setTagsManagerOpen(false)} visible={tagsManagerOpen} />- <ResourcesModal activeMemo={selectedMemo} imageCompressionEnabled={imageCompressionEnabled} onClose={() => setResourcesOpen(false)} visible={resourcesOpen} />- <ApiTokensModal baseUrl={session?.baseUrl ?? ""} onClose={() => setApiTokensOpen(false)} visible={apiTokensOpen} />- <EvernoteGuideModal onClose={() => setEvernoteGuideOpen(false)} visible={evernoteGuideOpen} />- <AdvancedPlayModal onClose={() => setAdvancedPlayOpen(false)} visible={advancedPlayOpen} />- <SyncQueueModal- onClose={() => setSyncQueueOpen(false)}- onChanged={async () => setSyncQueueSummary(await loadMobileSyncQueueSummary())}- onSync={handleSyncQueuedChanges}- visible={syncQueueOpen}- />- <SystemInfoModal baseUrl={session?.baseUrl ?? ""} memoCount={memoCount} notebookCount={notebooks.length} onClose={() => setSystemInfoOpen(false)} visible={systemInfoOpen} />- <RevisionHistoryModal- memo={revisionMemo}- onClose={() => setRevisionMemo(null)}- onRestored={(memo) => {- setRevisionMemo(null);- setSelectedMemoId(memo.id);- }}- />-- <CreateMemoModal- activeNotebookId={activeNotebookId}- notebooks={notebooks}- onClose={() => setCreateOpen(false)}- onCreated={(memo) => {- setCreateOpen(false);- setActiveView("notes");- setMemoView("notebook");- setActiveNotebookId(memo.notebookId);- setSelectedMemoId(null);- setRichEditingMemo(memo);- }}- visible={createOpen}- />-- <TemplatesModal- activeNotebookId={activeNotebookId}- notebooks={notebooks}- onClose={() => setTemplatesOpen(false)}- onCreated={(memo) => {- setTemplatesOpen(false);- setActiveView("notes");- setMemoView("notebook");- setActiveNotebookId(memo.notebookId);- setSelectedMemoId(null);- setRichEditingMemo(memo);- }}- visible={templatesOpen}- />-- <MoveSelectionModal- isMoving={moveMemosMutation.isPending}- notebooks={notebooks}- onClose={() => setSelectionMoveOpen(false)}- onMove={(notebookId) => moveMemosMutation.mutate({ memoIds: selectedMemoIdList, notebookId })}- selectedCount={selectedMemoIds.size}- visible={selectionMoveOpen}- />-- <NotesActionsModal- memoListDensity={memoListDensity}- memoSortMode={memoSortMode}- memoView={memoView}- isEmptyingTrash={emptyTrashMutation.isPending}- onClose={() => setNotesActionsOpen(false)}- onEnterSelection={() => {- setNotesActionsOpen(false);- enterSelectionMode();- }}- onEmptyTrash={() => {- setNotesActionsOpen(false);- handleEmptyTrash();- }}- onOpenApiTokens={() => {- setNotesActionsOpen(false);- setApiTokensOpen(true);- }}- onOpenResources={() => {- setNotesActionsOpen(false);- setResourcesOpen(true);- }}- onOpenTags={() => {- setNotesActionsOpen(false);- setTagsManagerOpen(true);- }}- onMemoListDensityChange={handleMemoListDensityChange}- onSortModeChange={setMemoSortMode}- onToggleTrash={() => {- setNotesActionsOpen(false);- setMemoView(memoView === "trash" ? "notebook" : "trash");- }}- visible={notesActionsOpen}- />-- <MemoActionsModal- isBusy={deleteMemosMutation.isPending || pinMemosMutation.isPending || restoreMemoByIdMutation.isPending}- memo={memoActionsMemo}- memoView={memoView}- onClose={() => setMemoActionsMemo(null)}- onDelete={requestDeleteMemoSummary}- onMove={(memo) => {- setMemoActionsMemo(null);- selectSingleMemo(memo.id);- setSelectionMoveOpen(true);- }}- onOpen={(memo) => {- setMemoActionsMemo(null);- setSelectedMemoId(memo.id);- }}- onRestore={(memo) => restoreMemoByIdMutation.mutate(memo.id)}- onSelect={(memo) => {- setMemoActionsMemo(null);- selectSingleMemo(memo.id);- }}- onTogglePin={(memo) => {- setMemoActionsMemo(null);- pinMemosMutation.mutate({ memoIds: [memo.id], isPinned: !memo.isPinned });- }}- />-- {activeView === "notes" && selectionMode ? (- <SelectionActionBar- canMerge={memoView !== "trash" && selectedMemoIds.size >= 2}- canMove={memoView !== "trash" && selectedMemoIds.size > 0}- isBusy={deleteMemosMutation.isPending || moveMemosMutation.isPending || pinMemosMutation.isPending || mergeMemosMutation.isPending}- isTrashView={memoView === "trash"}- onToggleVisibleSelection={toggleVisibleSelection}- onClear={clearSelection}- onDelete={handleDeleteSelection}- onMerge={handleMergeSelection}- onMove={() => setSelectionMoveOpen(true)}- onPin={() => pinMemosMutation.mutate({ memoIds: selectedMemoIdList, isPinned: nextSelectionPinValue })}- pinLabel={nextSelectionPinValue ? "置顶" : "取消置顶"}- selectionToggleDisabled={!canToggleVisibleSelection}- selectionToggleLabel={allVisibleMemosSelected ? "取消当前列表" : "选择当前列表"}- selectedCount={selectedMemoIds.size}- />- ) : null}-- <View style={styles.bottomNav}>- <BottomNavItem- active={activeView === "notes"}- icon={<Home color={activeView === "notes" ? "#0f172a" : "#64748b"} size={20} />}- label="笔记"- onPress={() => setActiveView("notes")}- />- <Pressable- accessibilityRole="button"- disabled={!canCreateMemo}- onPress={() => setCreateOpen(true)}- style={[styles.bottomCreateButton, !canCreateMemo && styles.bottomCreateButtonDisabled]}- >- <Plus color={canCreateMemo ? "#ffffff" : "#e2e8f0"} size={28} />- </Pressable>- <BottomNavItem- active={activeView === "settings"}- icon={<UserRound color={activeView === "settings" ? "#0f172a" : "#64748b"} size={20} />}- label="我的"- onPress={() => setActiveView("settings")}- />- </View>- </SafeAreaView>- </MobileLocaleContext.Provider>- );-};--const AppHeader = ({ instance, onRefresh, onSignOut }: { instance: string; onRefresh: () => void; onSignOut: () => void }) => (- <View style={styles.header}>- <View>- <Text style={styles.title}>EdgeEver</Text>- <Text numberOfLines={1} style={styles.instance}>- {instance}- </Text>- </View>-- <View style={styles.headerActions}>- <IconButton onPress={onRefresh}>- <RefreshCw color="#0f172a" size={18} />- </IconButton>- <IconButton onPress={onSignOut}>- <LogOut color="#0f172a" size={18} />- </IconButton>- </View>- </View>-);--const NotesView = ({- activeNotebook,- activeNotebookId,- error,- isError,- isLoading,- isRefreshing,- memoCount,- memoFilterMode,- memoListDensity,- memoSortMode,- memoView,- memos,- notebookSortMode,- notebooks,- notebooksMemoCount,- onCreate,- onEmptyTrash,- onFilterModeChange,- onMemoListDensityChange,- onOpenActions,- onOpenNotebookPicker,- onOpenSearch,- onMemoLongPress,- onMemoPress,- onOpenTemplates,- onRefresh,- onSelectNotebook,- onSetMemoView,- onSortModeChange,- selectedMemoIds,- selectionMode,- isEmptyingTrash,-}: {- activeNotebook: Notebook | null;- activeNotebookId: string;- error: unknown;- isError: boolean;- isLoading: boolean;- isRefreshing: boolean;- memoCount: number;- memoFilterMode: MemoFilterMode;- memoListDensity: MobileMemoListDensity;- memoSortMode: MemoSortMode;- memoView: MemoView;- memos: MemoSummary[];- notebookSortMode: MobileNotebookSortMode;- notebooks: Notebook[];- notebooksMemoCount: number;- onCreate: () => void;- onEmptyTrash: () => void;- onFilterModeChange: (filterMode: MemoFilterMode) => void;- onMemoListDensityChange: (density: MobileMemoListDensity) => void;- onOpenActions: () => void;- onOpenNotebookPicker: () => void;- onOpenSearch: () => void;- onMemoLongPress: (memo: MemoSummary) => void;- onMemoPress: (memoId: string) => void;- onOpenTemplates: () => void;- onRefresh: () => void;- onSelectNotebook: (notebookId: string) => void;- onSetMemoView: (memoView: MemoView) => void;- onSortModeChange: (sortMode: MemoSortMode) => void;- selectionMode: boolean;- selectedMemoIds: Set<string>;- isEmptyingTrash: boolean;-}) => {- const [collapsedNotebookIds, setCollapsedNotebookIds] = useState<Set<string>>(() => new Set());- const notebookOptions = flattenNotebooks(notebooks, notebookSortMode);- const childNotebookIds = getNotebookParentIdSet(notebooks);- const visibleNotebookOptions = filterCollapsedNotebookOptions(notebookOptions, collapsedNotebookIds);- const toggleNotebookCollapsed = (notebookId: string) => {- setCollapsedNotebookIds((current) => {- const next = new Set(current);- if (next.has(notebookId)) {- next.delete(notebookId);- } else {- next.add(notebookId);- }- return next;- });- };-- return (- <View style={styles.viewBody}>- {memoView === "notebook" ? (- <View style={styles.tabs}>- <ScrollView horizontal showsHorizontalScrollIndicator={false}>- <NotebookPill active={activeNotebookId === ALL_NOTES_ID} label="全部笔记" memoCount={notebooksMemoCount} onPress={() => onSelectNotebook(ALL_NOTES_ID)} />- {visibleNotebookOptions.map(({ depth, notebook }) => (- <NotebookPill- active={activeNotebookId === notebook.id}- collapsed={collapsedNotebookIds.has(notebook.id)}- hasChildren={childNotebookIds.has(notebook.id)}- key={notebook.id}- label={`${" ".repeat(depth)}${depth > 0 ? "└ " : ""}${notebook.name}`}- memoCount={notebook.memoCount}- onPress={() => onSelectNotebook(notebook.id)}- onToggleCollapse={() => toggleNotebookCollapsed(notebook.id)}- />- ))}- </ScrollView>- </View>- ) : null}-- <View style={styles.contentHeader}>- <View>- <Text style={styles.sectionTitle}>{memoView === "trash" ? "回收站" : activeNotebook?.name ?? "全部笔记"}</Text>- <Text style={styles.sectionSubtitle}>{memoCount} 条笔记</Text>- </View>- <View style={styles.contentActions}>- {memoView === "notebook" ? (- <Pressable accessibilityRole="button" onPress={onOpenNotebookPicker} style={styles.secondaryIconButton}>- <Folder color="#0f172a" size={18} />- </Pressable>- ) : null}- <Pressable accessibilityRole="button" onPress={onOpenSearch} style={styles.secondaryIconButton}>- <Search color="#0f172a" size={18} />- </Pressable>- <Pressable accessibilityRole="button" onPress={onOpenActions} style={styles.secondaryIconButton}>- <MoreHorizontal color="#0f172a" size={18} />- </Pressable>- <Pressable accessibilityRole="button" onPress={() => onSetMemoView(memoView === "trash" ? "notebook" : "trash")} style={styles.secondaryIconButton}>- {memoView === "trash" ? <BookOpen color="#0f172a" size={18} /> : <Trash2 color="#0f172a" size={18} />}- </Pressable>- {memoView === "notebook" ? (- <>- <Pressable accessibilityRole="button" onPress={onOpenTemplates} style={styles.secondaryIconButton}>- <FileText color="#0f172a" size={18} />- </Pressable>- <Pressable accessibilityRole="button" onPress={onCreate} style={styles.primaryIconButton}>- <Plus color="#ffffff" size={20} />- </Pressable>- </>- ) : (- <Pressable- accessibilityRole="button"- disabled={isEmptyingTrash || memoCount === 0}- onPress={onEmptyTrash}- style={[styles.dangerIconButton, (isEmptyingTrash || memoCount === 0) && styles.buttonDisabled]}- >- <Trash2 color="#b91c1c" size={18} />- </Pressable>- )}- </View>- </View>-- {memoView === "notebook" ? (- <View style={styles.listControls}>- <ScrollView horizontal showsHorizontalScrollIndicator={false}>- <OptionPill active={memoFilterMode === "all"} label="全部" onPress={() => onFilterModeChange("all")} />- <OptionPill active={memoFilterMode === "pinned"} label="置顶" onPress={() => onFilterModeChange(memoFilterMode === "pinned" ? "all" : "pinned")} />- <OptionPill active={memoFilterMode === "tagged"} label="有标签" onPress={() => onFilterModeChange(memoFilterMode === "tagged" ? "all" : "tagged")} />- <OptionPill active={memoFilterMode === "untagged"} label="无标签" onPress={() => onFilterModeChange(memoFilterMode === "untagged" ? "all" : "untagged")} />- </ScrollView>- <ScrollView horizontal showsHorizontalScrollIndicator={false}>- <OptionPill active={memoSortMode === "updated-desc"} label="最近更新" onPress={() => onSortModeChange("updated-desc")} />- <OptionPill active={memoSortMode === "created-desc"} label="创建时间" onPress={() => onSortModeChange("created-desc")} />- <OptionPill active={memoSortMode === "title-asc"} label="标题 A-Z" onPress={() => onSortModeChange("title-asc")} />- </ScrollView>- <ScrollView horizontal showsHorizontalScrollIndicator={false}>- <OptionPill active={memoListDensity === "preview"} label="预览" onPress={() => onMemoListDensityChange("preview")} />- <OptionPill active={memoListDensity === "compact"} label="紧凑" onPress={() => onMemoListDensityChange("compact")} />- </ScrollView>- </View>- ) : null}-- <MemoList- emptyAction={memoView === "notebook" && notebooks.length > 0 ? { label: "新建笔记", onPress: onCreate } : undefined}- emptyDescription={memoView === "trash" ? "删除的笔记会出现在这里" : notebooks.length > 0 ? "点击下方加号或这里创建第一条笔记" : "请先创建一个笔记本"}- emptyTitle={memoView === "trash" ? "回收站为空" : "暂无笔记"}- error={error}- isError={isError}- isLoading={isLoading}- isRefreshing={isRefreshing}- listDensity={memoListDensity}- memos={memos}- onMemoLongPress={onMemoLongPress}- onMemoPress={onMemoPress}- onRefresh={onRefresh}- selectionMode={selectionMode}- selectedMemoIds={selectedMemoIds}- />- </View>- );-};--const NotesActionsModal = ({- isEmptyingTrash,- memoListDensity,- memoSortMode,- memoView,- onClose,- onEmptyTrash,- onEnterSelection,- onMemoListDensityChange,- onOpenApiTokens,- onOpenResources,- onOpenTags,- onSortModeChange,- onToggleTrash,- visible,-}: {- isEmptyingTrash: boolean;- memoListDensity: MobileMemoListDensity;- memoSortMode: MemoSortMode;- memoView: MemoView;- onClose: () => void;- onEmptyTrash: () => void;- onEnterSelection: () => void;- onMemoListDensityChange: (density: MobileMemoListDensity) => void;- onOpenApiTokens: () => void;- onOpenResources: () => void;- onOpenTags: () => void;- onSortModeChange: (sortMode: MemoSortMode) => void;- onToggleTrash: () => void;- visible: boolean;-}) => (- <Modal animationType="fade" onRequestClose={onClose} transparent visible={visible}>- <Pressable onPress={onClose} style={styles.actionSheetBackdrop}>- <Pressable style={styles.actionSheet}>- <View style={styles.actionSheetHandle} />- <Text style={styles.actionSheetTitle}>列表操作</Text>- <ActionSheetItem icon={<CheckSquare color="#0f172a" size={18} />} label="选择笔记" onPress={onEnterSelection} />- <Text style={styles.actionSheetSectionTitle}>显示模式</Text>- <ScrollView horizontal showsHorizontalScrollIndicator={false}>- <OptionPill active={memoListDensity === "preview"} label="预览" onPress={() => onMemoListDensityChange("preview")} />- <OptionPill active={memoListDensity === "compact"} label="紧凑" onPress={() => onMemoListDensityChange("compact")} />- </ScrollView>- <Text style={styles.actionSheetSectionTitle}>排序方式</Text>- <ScrollView horizontal showsHorizontalScrollIndicator={false}>- <OptionPill active={memoSortMode === "updated-desc"} label="最近更新" onPress={() => onSortModeChange("updated-desc")} />- <OptionPill active={memoSortMode === "created-desc"} label="创建时间" onPress={() => onSortModeChange("created-desc")} />- <OptionPill active={memoSortMode === "title-asc"} label="标题 A-Z" onPress={() => onSortModeChange("title-asc")} />- </ScrollView>- <ActionSheetItem icon={<Tag color="#0f172a" size={18} />} label="标签管理" onPress={onOpenTags} />- <ActionSheetItem icon={<Archive color="#0f172a" size={18} />} label="资源库" onPress={onOpenResources} />- {memoView === "trash" ? (- <>- <ActionSheetItem icon={<BookOpen color="#0f172a" size={18} />} label="返回笔记列表" onPress={onToggleTrash} />- <ActionSheetItem danger disabled={isEmptyingTrash} icon={<Trash2 color="#b91c1c" size={18} />} label={isEmptyingTrash ? "清空中" : "清空回收站"} onPress={onEmptyTrash} />- </>- ) : (- <ActionSheetItem icon={<Trash2 color="#b91c1c" size={18} />} label="回收站" onPress={onToggleTrash} />- )}- <ActionSheetItem icon={<KeyRound color="#0f172a" size={18} />} label="MCP Token" onPress={onOpenApiTokens} />- </Pressable>- </Pressable>- </Modal>-);--const NotebookPickerModal = ({- activeNotebookId,- notebookSortMode,- notebooks,- notebooksMemoCount,- onClose,- onSelect,- visible,-}: {- activeNotebookId: string;- notebookSortMode: MobileNotebookSortMode;- notebooks: Notebook[];- notebooksMemoCount: number;- onClose: () => void;- onSelect: (notebookId: string) => void;- visible: boolean;-}) => {- const [searchText, setSearchText] = useState("");- const [collapsedNotebookIds, setCollapsedNotebookIds] = useState<Set<string>>(() => new Set());- const notebookOptions = flattenNotebooks(notebooks, notebookSortMode);- const searchQuery = searchText.trim();- const childNotebookIds = getNotebookParentIdSet(notebooks);- const visibleNotebookOptions = searchQuery- ? filterNotebookOptions(notebookOptions, searchText)- : filterCollapsedNotebookOptions(notebookOptions, collapsedNotebookIds);-- useEffect(() => {- if (visible) {- setSearchText("");- }- }, [visible]);-- const toggleNotebookCollapsed = (notebookId: string) => {- setCollapsedNotebookIds((current) => {- const next = new Set(current);-- if (next.has(notebookId)) {- next.delete(notebookId);- } else {- next.add(notebookId);- }-- return next;- });- };-- return (- <Modal animationType="slide" onRequestClose={onClose} presentationStyle="pageSheet" visible={visible}>- <SafeAreaView style={styles.modalSafeArea}>- <View style={styles.modalHeader}>- <IconButton onPress={onClose}>- <X color="#0f172a" size={20} />- </IconButton>- <Text style={styles.modalTitle}>选择笔记本</Text>- <View style={styles.iconButtonPlaceholder} />- </View>-- <ScrollView contentContainerStyle={styles.editorForm}>- <View style={styles.searchBox}>- <Search color="#64748b" size={18} />- <TextInput- autoCapitalize="none"- autoCorrect={false}- onChangeText={setSearchText}- placeholder="搜索笔记本"- placeholderTextColor="#94a3b8"- style={styles.searchInput}- value={searchText}- />- {searchText ? (- <Pressable onPress={() => setSearchText("")}>- <X color="#64748b" size={18} />- </Pressable>- ) : null}- </View>-- <Pressable onPress={() => onSelect(ALL_NOTES_ID)} style={[styles.moveNotebookRow, activeNotebookId === ALL_NOTES_ID && styles.moveNotebookRowActive]}>- <View style={styles.moveNotebookText}>- <Text numberOfLines={1} style={styles.panelValue}>- 全部笔记- </Text>- <Text style={styles.panelLabel}>{notebooksMemoCount} 条笔记</Text>- </View>- {activeNotebookId === ALL_NOTES_ID ? <Check color="#0f172a" size={18} /> : null}- </Pressable>-- <Text style={styles.label}>{searchQuery ? "匹配的笔记本" : "笔记本"}</Text>- {visibleNotebookOptions.map(({ depth, notebook }) => (- <View- key={notebook.id}- style={[styles.moveNotebookRow, activeNotebookId === notebook.id && styles.moveNotebookRowActive, depth > 0 && { marginLeft: Math.min(depth * 14, 42) }]}- >- {childNotebookIds.has(notebook.id) && !searchQuery ? (- <Pressable accessibilityRole="button" onPress={() => toggleNotebookCollapsed(notebook.id)} style={styles.notebookTreeToggle}>- {collapsedNotebookIds.has(notebook.id) ? <ChevronRight color="#64748b" size={17} /> : <ChevronDown color="#64748b" size={17} />}- </Pressable>- ) : (- <View style={styles.notebookTreeTogglePlaceholder} />- )}- <Pressable onPress={() => onSelect(notebook.id)} style={styles.moveNotebookSelectArea}>- <Text numberOfLines={1} style={styles.panelValue}>- {depth > 0 ? `${"· ".repeat(depth)}${notebook.name}` : notebook.name}- </Text>- <Text style={styles.panelLabel}>{notebook.memoCount} 条笔记</Text>- </Pressable>- {activeNotebookId === notebook.id ? <Check color="#0f172a" size={18} /> : null}- </View>- ))}- {visibleNotebookOptions.length === 0 ? (- <View style={styles.emptyInlinePanel}>- <Folder color="#94a3b8" size={28} />- <Text style={styles.mutedText}>没有匹配的笔记本</Text>- </View>- ) : null}- </ScrollView>- </SafeAreaView>- </Modal>- );-};--const MemoActionsModal = ({- isBusy,- memo,- memoView,- onClose,- onDelete,- onMove,- onOpen,- onRestore,- onSelect,- onTogglePin,-}: {- isBusy: boolean;- memo: MemoSummary | null;- memoView: MemoView;- onClose: () => void;- onDelete: (memo: MemoSummary) => void;- onMove: (memo: MemoSummary) => void;- onOpen: (memo: MemoSummary) => void;- onRestore: (memo: MemoSummary) => void;- onSelect: (memo: MemoSummary) => void;- onTogglePin: (memo: MemoSummary) => void;-}) => (- <Modal animationType="fade" onRequestClose={onClose} transparent visible={Boolean(memo)}>- <Pressable onPress={onClose} style={styles.actionSheetBackdrop}>- <Pressable style={styles.actionSheet}>- <View style={styles.actionSheetHandle} />- <Text numberOfLines={1} style={styles.actionSheetTitle}>- {memo?.title?.trim() || DEFAULT_MEMO_TITLE}- </Text>- {memo ? (- <>- <ActionSheetItem disabled={isBusy} icon={<FileText color="#0f172a" size={18} />} label="打开笔记" onPress={() => onOpen(memo)} />- <ActionSheetItem disabled={isBusy} icon={<CheckSquare color="#0f172a" size={18} />} label="选择笔记" onPress={() => onSelect(memo)} />- {memoView === "trash" ? (- <>- <ActionSheetItem disabled={isBusy} icon={<RotateCcw color="#0f172a" size={18} />} label="恢复笔记" onPress={() => onRestore(memo)} />- <ActionSheetItem danger disabled={isBusy} icon={<Trash2 color="#b91c1c" size={18} />} label="永久删除" onPress={() => onDelete(memo)} />- </>- ) : (- <>- <ActionSheetItem disabled={isBusy} icon={<Folder color="#0f172a" size={18} />} label="移动到笔记本" onPress={() => onMove(memo)} />- <ActionSheetItem disabled={isBusy} icon={<Pin color="#0f172a" size={18} />} label={memo.isPinned ? "取消置顶" : "置顶"} onPress={() => onTogglePin(memo)} />- <ActionSheetItem danger disabled={isBusy} icon={<Trash2 color="#b91c1c" size={18} />} label="删除笔记" onPress={() => onDelete(memo)} />- </>- )}- </>- ) : null}- </Pressable>- </Pressable>- </Modal>-);--const ActionSheetItem = ({ danger = false, disabled = false, icon, label, onPress }: { danger?: boolean; disabled?: boolean; icon: ReactNode; label: string; onPress: () => void }) => (- <Pressable accessibilityRole="button" disabled={disabled} onPress={onPress} style={[styles.actionSheetItem, disabled && styles.buttonDisabled]}>- {icon}- <Text style={[styles.actionSheetItemText, danger && styles.actionSheetItemTextDanger]}>{label}</Text>- </Pressable>-);--const SearchView = ({- isLoading,- isRefreshing,- onClose,- onMemoPress,- onRefresh,- results,- searchText,- setSearchText,- totalCount,-}: {- isLoading: boolean;- isRefreshing: boolean;- onClose: () => void;- onMemoPress: (memo: MemoSummary) => void;- onRefresh: () => void;- results: MemoSummary[];- searchText: string;- setSearchText: (value: string) => void;- totalCount: number;-}) => (- <View style={styles.viewBody}>- <View style={styles.searchHeader}>- <View style={styles.searchTitleRow}>- <Text style={styles.sectionTitle}>搜索</Text>- <IconButton onPress={onClose}>- <X color="#0f172a" size={20} />- </IconButton>- </View>- <View style={styles.searchBox}>- <Search color="#64748b" size={18} />- <TextInput- autoCapitalize="none"- autoCorrect={false}- onChangeText={setSearchText}- placeholder="搜索标题、正文或标签"- placeholderTextColor="#94a3b8"- style={styles.searchInput}- value={searchText}- />- {searchText ? (- <Pressable onPress={() => setSearchText("")}>- <X color="#64748b" size={18} />- </Pressable>- ) : null}- </View>- {searchText.trim() ? <Text style={styles.sectionSubtitle}>{totalCount} 条结果</Text> : null}- </View>-- {searchText.trim() ? (- <MemoList- emptyDescription="换个关键词再试"- emptyTitle="没有找到匹配笔记"- isError={false}- isLoading={isLoading}- isRefreshing={isRefreshing}- listDensity="preview"- memos={results}- onMemoPress={(memoId) => {- const memo = results.find((item) => item.id === memoId);- if (memo) {- onMemoPress(memo);- }- }}- onRefresh={onRefresh}- />- ) : (- <View style={styles.centerState}>- <Search color="#94a3b8" size={32} />- <Text style={styles.emptyTitle}>输入关键词开始搜索</Text>- <Text style={styles.mutedText}>搜索会请求你的 EdgeEver 实例</Text>- </View>- )}- </View>-);--const AccountView = ({ instance, userName, onSignOut }: { instance: string; userName: string; onSignOut: () => void }) => {- const [copied, setCopied] = useState(false);-- const copyAccountInfo = async () => {- const accountInfo = [- `当前用户: ${userName}`,- `实例地址: ${instance || "未连接"}`,- `移动端版本: v${MOBILE_APP_VERSION}`,- `GitHub 仓库: ${GITHUB_REPOSITORY_URL}`,- ].join("\n");-- await Clipboard.setStringAsync(accountInfo);- setCopied(true);- setTimeout(() => setCopied(false), 1600);- };-- return (- <ScrollView contentContainerStyle={styles.panelList} style={styles.viewBody}>- <Text style={styles.sectionTitle}>账户</Text>- <PanelRow label="当前用户" value={userName} />- <PanelRow label="实例地址" value={instance} />- <Pressable accessibilityRole="button" onPress={copyAccountInfo} style={[styles.panelRow, styles.panelLinkRow]}>- <View style={styles.panelLinkText}>- <Text style={styles.panelLabel}>账户信息</Text>- <Text style={styles.panelValue}>{copied ? "已复制" : "复制当前连接信息"}</Text>- </View>- {copied ? <ShieldCheck color="#047857" size={18} /> : <Copy color="#0f172a" size={18} />}- </Pressable>- <Pressable accessibilityRole="link" onPress={() => Linking.openURL(GITHUB_REPOSITORY_URL)} style={[styles.panelRow, styles.panelLinkRow]}>- <View style={styles.panelLinkText}>- <Text style={styles.panelLabel}>GitHub 仓库</Text>- <Text style={styles.panelValue}>tianma-if/edgeever</Text>- </View>- <ExternalLink color="#0f172a" size={18} />- </Pressable>- <Pressable onPress={onSignOut} style={styles.dangerButton}>- <LogOut color="#b91c1c" size={18} />- <Text style={styles.dangerButtonText}>退出登录</Text>- </Pressable>- </ScrollView>- );-};--const AccountInfoCopyRow = ({ instance, userName }: { instance: string; userName: string }) => {- const [copied, setCopied] = useState(false);-- const copyAccountInfo = async () => {- const accountInfo = [- `当前用户: ${userName}`,- `实例地址: ${instance || "未连接"}`,- `移动端版本: v${MOBILE_APP_VERSION}`,- `GitHub 仓库: ${GITHUB_REPOSITORY_URL}`,- ].join("\n");-- await Clipboard.setStringAsync(accountInfo);- setCopied(true);- setTimeout(() => setCopied(false), 1600);- };-- return (- <Pressable accessibilityRole="button" onPress={copyAccountInfo} style={[styles.panelRow, styles.panelLinkRow]}>- <View style={styles.panelLinkText}>- <Text style={styles.panelLabel}>账户信息</Text>- <Text style={styles.panelValue}>{copied ? "已复制" : "复制当前连接信息"}</Text>- </View>- {copied ? <ShieldCheck color="#047857" size={18} /> : <Copy color="#0f172a" size={18} />}- </Pressable>- );-};--const SettingsView = ({- imageCompressionEnabled,- instance,- isSyncingQueue,- localePreference,- memoCount,- notebookCount,- onImageCompressionChange,- onLocalePreferenceChange,- onOpenAdvancedPlay,- onOpenApiTokens,- onOpenEvernoteGuide,- onOpenNotebookManager,- onOpenResources,- onOpenSystemInfo,- onOpenSyncQueue,- onOpenTagsManager,- onOpenTemplates,- onSignOut,- onSyncQueuedChanges,- syncQueueMessage,- syncQueueSummary,- userName,-}: {- imageCompressionEnabled: boolean;- instance: string;- isSyncingQueue: boolean;- localePreference: MobileLocaleMode;- memoCount: number;- notebookCount: number;- onImageCompressionChange: (enabled: boolean) => void;- onLocalePreferenceChange: (locale: MobileLocaleMode) => void;- onOpenAdvancedPlay: () => void;- onOpenApiTokens: () => void;- onOpenEvernoteGuide: () => void;- onOpenNotebookManager: () => void;- onOpenResources: () => void;- onOpenSystemInfo: () => void;- onOpenSyncQueue: () => void;- onOpenTagsManager: () => void;- onOpenTemplates: () => void;- onSignOut: () => void;- onSyncQueuedChanges: () => void;- syncQueueMessage: string;- syncQueueSummary: MobileSyncQueueSummary;- userName: string;-}) => (- <ScrollView contentContainerStyle={styles.panelList} style={styles.viewBody}>- <Text style={styles.sectionTitle}>我的</Text>- <PanelRow label="当前用户" value={userName} />- <PanelRow label="实例地址" value={instance} />- <AccountInfoCopyRow instance={instance} userName={userName} />- <Pressable onPress={onOpenNotebookManager}>- <PanelRow label="笔记本管理" value="创建、重命名、删除" />- </Pressable>- <Pressable onPress={onOpenTagsManager}>- <PanelRow label="标签管理" value="重命名、删除标签" />- </Pressable>- <Pressable onPress={onOpenResources}>- <PanelRow label="资源库" value="图片、附件、来源笔记" />- </Pressable>- <Pressable onPress={onOpenTemplates}>- <PanelRow label="模板" value="速记、会议、清单、读书、复盘" />- </Pressable>- <Pressable onPress={onOpenApiTokens}>- <PanelRow label="MCP 与 API Token" value="创建、复制、撤销 Token" />- </Pressable>- <Pressable onPress={onOpenEvernoteGuide}>- <PanelRow label="Evernote 导入指引" value="MCP 迁移流程与 Prompt" />- </Pressable>- <Pressable onPress={onOpenAdvancedPlay}>- <PanelRow label="进阶玩法" value="人物画像、知识图谱、标签建议 Prompt" />- </Pressable>- <Pressable onPress={onOpenSystemInfo}>- <PanelRow label="系统信息" value="版本、平台、实例、统计" />- </Pressable>- <PanelRow label="移动端形态" value="React Native" />- <PanelRow label="笔记本数量" value={String(notebookCount)} />- <PanelRow label="笔记总数" value={String(memoCount)} />- <View style={styles.panelRow}>- <View style={styles.preferenceStack}>- <View style={styles.preferenceText}>- <Text style={styles.panelLabel}>语言偏好</Text>- <Text style={styles.panelValue}>{getMobileLocalePreferenceLabel(localePreference)}</Text>- <Text style={styles.panelHint}>与 PWA 设置保持一致,可选择跟随系统、简体中文或 English。</Text>- </View>- <View style={styles.scopeGrid}>- {MOBILE_LOCALE_OPTIONS.map((option) => {- const selected = localePreference === option.value;-- return (- <Pressable key={option.value} onPress={() => onLocalePreferenceChange(option.value)} style={[styles.scopePill, selected && styles.scopePillActive]}>- <Text style={[styles.scopePillText, selected && styles.scopePillTextActive]}>{option.label}</Text>- </Pressable>- );- })}- </View>- </View>- </View>- <View style={styles.panelRow}>- <View style={styles.preferenceRow}>- <View style={styles.preferenceText}>- <Text style={styles.panelLabel}>图片上传压缩</Text>- <Text style={styles.panelValue}>{imageCompressionEnabled ? "已开启" : "已关闭"}</Text>- <Text style={styles.panelHint}>开启后会把支持的图片压缩为 WebP,降低移动网络和存储占用。</Text>- </View>- <Switch onValueChange={onImageCompressionChange} value={imageCompressionEnabled} />- </View>- </View>- <SyncQueuePanel isSyncing={isSyncingQueue} message={syncQueueMessage} onOpen={onOpenSyncQueue} onSync={onSyncQueuedChanges} summary={syncQueueSummary} />- <PanelRow label="富文本编辑器" value="已接入 PWA TipTap WebView" />- <Pressable onPress={onSignOut} style={styles.dangerButton}>- <LogOut color="#b91c1c" size={18} />- <Text style={styles.dangerButtonText}>退出登录</Text>- </Pressable>- </ScrollView>-);--const CreateMemoModal = ({- activeNotebookId,- notebooks,- onClose,- onCreated,- visible,-}: {- activeNotebookId: string;- notebooks: Notebook[];- onClose: () => void;- onCreated: (memo: MemoDetail) => void;- visible: boolean;-}) => {- const { client } = useSession();- const queryClient = useQueryClient();- const fallbackNotebookId = activeNotebookId !== ALL_NOTES_ID ? activeNotebookId : notebooks[0]?.id ?? "";- const [notebookId, setNotebookId] = useState(fallbackNotebookId);- const [title, setTitle] = useState("");- const [tagsText, setTagsText] = useState("");- const [contentMarkdown, setContentMarkdown] = useState("");- const [contentSelection, setContentSelection] = useState<TextSelection>({ start: 0, end: 0 });- const [insertTextOpen, setInsertTextOpen] = useState(false);- const targetNotebookId = notebookId || fallbackNotebookId;-- useEffect(() => {- if (visible) {- setNotebookId(fallbackNotebookId);- }- }, [fallbackNotebookId, visible]);-- const createMutation = useMutation({- mutationFn: async () => {- if (!client) {- throw new Error("Client is not ready");- }-- if (!targetNotebookId) {- throw new Error("请先创建一个笔记本");- }-- const response = await client.createMemo({- notebookId: targetNotebookId,- title: title.trim() || DEFAULT_MEMO_TITLE,- tags: parseTags(tagsText),- contentMarkdown: contentMarkdown.trim(),- });-- return response.memo;- },- onSuccess: async (memo) => {- await Promise.all([- queryClient.invalidateQueries({ queryKey: ["mobile", "notebooks"] }),- queryClient.invalidateQueries({ queryKey: ["mobile", "memos"] }),- ]);- setTitle("");- setTagsText("");- setContentMarkdown("");- onCreated(memo);- },- });- const canSubmitCreateMemo = Boolean(targetNotebookId) && !createMutation.isPending;-- const pasteClipboardText = async () => {- const text = await Clipboard.getStringAsync();-- if (!text.trim()) {- return;- }-- const next = insertPlainText(contentMarkdown, contentSelection, text);- setContentMarkdown(next.value);- setContentSelection(next.selection);- };-- const insertManualText = (text: string) => {- const next = insertPlainText(contentMarkdown, contentSelection, text);- setContentMarkdown(next.value);- setContentSelection(next.selection);- };-- return (- <Modal animationType="slide" onRequestClose={() => !createMutation.isPending && onClose()} presentationStyle="pageSheet" visible={visible}>- <SafeAreaView style={styles.modalSafeArea}>- <View style={styles.modalHeader}>- <IconButton disabled={createMutation.isPending} onPress={onClose}>- <X color={createMutation.isPending ? "#cbd5e1" : "#0f172a"} size={20} />- </IconButton>- <Text style={styles.modalTitle}>新建笔记</Text>- <IconButton disabled={!canSubmitCreateMemo} onPress={() => createMutation.mutate()}>- {createMutation.isPending ? <ActivityIndicator color="#0f172a" /> : <Check color={canSubmitCreateMemo ? "#0f172a" : "#cbd5e1"} size={20} />}- </IconButton>- </View>-- <ScrollView contentContainerStyle={styles.editorForm}>- <Text style={styles.label}>笔记本</Text>- <NotebookPicker notebooks={notebooks} onChange={setNotebookId} selectedNotebookId={notebookId || fallbackNotebookId} />-- <Text style={styles.label}>标题</Text>- <TextInput onChangeText={setTitle} placeholder={DEFAULT_MEMO_TITLE} placeholderTextColor="#94a3b8" style={styles.titleInput} value={title} />-- <Text style={styles.label}>标签</Text>- <TextInput onChangeText={setTagsText} placeholder="用逗号分隔标签" placeholderTextColor="#94a3b8" style={styles.titleInput} value={tagsText} />-- <Text style={styles.label}>正文</Text>- <MarkdownToolbar- onAction={(action) => {- const next = applyMarkdownAction(contentMarkdown, contentSelection, action);- setContentMarkdown(next.value);- setContentSelection(next.selection);- }}- onInsertText={() => setInsertTextOpen(true)}- onPasteText={() => void pasteClipboardText()}- />- <TextInput- multiline- onChangeText={setContentMarkdown}- onSelectionChange={(event) => setContentSelection(event.nativeEvent.selection)}- placeholder="输入正文,可用上方工具插入 Markdown 格式"- placeholderTextColor="#94a3b8"- selection={contentSelection}- style={styles.markdownInput}- textAlignVertical="top"- value={contentMarkdown}- />-- {createMutation.error ? (- <Text style={styles.errorText}>{createMutation.error instanceof Error ? createMutation.error.message : "创建失败"}</Text>- ) : null}- </ScrollView>- <InsertTextModal onClose={() => setInsertTextOpen(false)} onInsert={insertManualText} visible={insertTextOpen} />- </SafeAreaView>- </Modal>- );-};--const TemplatesModal = ({- activeNotebookId,- notebooks,- onClose,- onCreated,- visible,-}: {- activeNotebookId: string;- notebooks: Notebook[];- onClose: () => void;- onCreated: (memo: MemoDetail) => void;- visible: boolean;-}) => {- const { client } = useSession();- const queryClient = useQueryClient();- const localePreference = useMobileLocalePreference();- const fallbackNotebookId = activeNotebookId !== ALL_NOTES_ID ? activeNotebookId : notebooks[0]?.id ?? "";- const [targetNotebookId, setTargetNotebookId] = useState(fallbackNotebookId);- const memoTemplates = useMemo(() => getMobileMemoTemplates(localePreference), [localePreference]);-- useEffect(() => {- if (visible) {- setTargetNotebookId(fallbackNotebookId);- }- }, [fallbackNotebookId, visible]);-- const createFromTemplateMutation = useMutation({- mutationFn: async (template: MemoTemplate) => {- if (!client) {- throw new Error("Client is not ready");- }-- if (!targetNotebookId) {- throw new Error("请先创建一个笔记本");- }-- const response = await client.createMemo({- notebookId: targetNotebookId,- title: template.title,- contentMarkdown: template.contentMarkdown,- tags: template.tags,- });-- return response.memo;- },- onSuccess: async (memo) => {- await Promise.all([- queryClient.invalidateQueries({ queryKey: ["mobile", "notebooks"] }),- queryClient.invalidateQueries({ queryKey: ["mobile", "memos"] }),- queryClient.invalidateQueries({ queryKey: ["mobile", "tags"] }),- ]);- onCreated(memo);- },- });-- return (- <Modal animationType="slide" onRequestClose={() => !createFromTemplateMutation.isPending && onClose()} presentationStyle="pageSheet" visible={visible}>- <SafeAreaView style={styles.modalSafeArea}>- <View style={styles.modalHeader}>- <IconButton disabled={createFromTemplateMutation.isPending} onPress={onClose}>- <X color={createFromTemplateMutation.isPending ? "#cbd5e1" : "#0f172a"} size={20} />- </IconButton>- <Text style={styles.modalTitle}>模板</Text>- <View style={styles.iconButtonPlaceholder} />- </View>-- <ScrollView contentContainerStyle={styles.editorForm}>- <Text style={styles.sectionSubtitle}>选择一个模板,直接创建新笔记。</Text>- <Text style={styles.label}>目标笔记本</Text>- <NotebookPicker notebooks={notebooks} onChange={setTargetNotebookId} selectedNotebookId={targetNotebookId || fallbackNotebookId} />- {!targetNotebookId ? (- <View style={styles.warningPanel}>- <Text style={styles.warningText}>当前无法创建笔记,请先创建可用笔记本。</Text>- </View>- ) : null}- {memoTemplates.map((template) => (- <Pressable- disabled={!targetNotebookId || createFromTemplateMutation.isPending}- key={template.id}- onPress={() => createFromTemplateMutation.mutate(template)}- style={[styles.templateCard, (!targetNotebookId || createFromTemplateMutation.isPending) && styles.buttonDisabled]}- >- <View style={styles.templateIcon}>- <FileText color="#047857" size={20} />- </View>- <View style={styles.templateText}>- <Text style={styles.panelValue}>{template.title}</Text>- <Text style={styles.panelLabel}>{template.description}</Text>- </View>- {createFromTemplateMutation.isPending ? <ActivityIndicator color="#0f172a" /> : null}- </Pressable>- ))}- {createFromTemplateMutation.error ? (- <Text style={styles.errorText}>{createFromTemplateMutation.error instanceof Error ? createFromTemplateMutation.error.message : "创建失败"}</Text>- ) : null}- </ScrollView>- </SafeAreaView>- </Modal>- );-};--const NotebookManagerModal = ({- notebookSortMode,- notebooks,- onClose,- onSortModeChange,- visible,-}: {- notebookSortMode: MobileNotebookSortMode;- notebooks: Notebook[];- onClose: () => void;- onSortModeChange: (sortMode: MobileNotebookSortMode) => void;- visible: boolean;-}) => {- const { client } = useSession();- const queryClient = useQueryClient();- const createNotebookInputRef = useRef<TextInput>(null);- const [name, setName] = useState("");- const [parentId, setParentId] = useState<string | null>(null);- const [editingNotebookId, setEditingNotebookId] = useState<string | null>(null);- const [editingName, setEditingName] = useState("");- const [editingParentId, setEditingParentId] = useState<string | null>(null);- const [notebookSearchText, setNotebookSearchText] = useState("");- const [collapsedNotebookIds, setCollapsedNotebookIds] = useState<Set<string>>(() => new Set());- const notebookOptions = flattenNotebooks(notebooks, notebookSortMode);- const notebookSearchQuery = notebookSearchText.trim();- const childNotebookIds = getNotebookParentIdSet(notebooks);- const hasCollapsibleNotebooks = childNotebookIds.size > 0;- const visibleNotebookOptions = notebookSearchQuery- ? filterNotebookOptions(notebookOptions, notebookSearchText)- : filterCollapsedNotebookOptions(notebookOptions, collapsedNotebookIds);-- const invalidateNotebooks = async () => {- await Promise.all([- queryClient.invalidateQueries({ queryKey: ["mobile", "notebooks"] }),- queryClient.invalidateQueries({ queryKey: ["mobile", "memos"] }),- ]);- };-- const createNotebookMutation = useMutation({- mutationFn: async () => {- if (!client) {- throw new Error("Client is not ready");- }-- const trimmed = name.trim();-- if (!trimmed) {- throw new Error("请输入笔记本名称");- }-- return client.createNotebook({ name: trimmed, parentId });- },- onSuccess: async () => {- setName("");- setParentId(null);- await invalidateNotebooks();- },- });-- const renameNotebookMutation = useMutation({- mutationFn: async ({ notebookId, nextName, nextParentId }: { notebookId: string; nextName: string; nextParentId: string | null }) => {- if (!client) {- throw new Error("Client is not ready");- }-- const trimmed = nextName.trim();-- if (!trimmed) {- throw new Error("请输入笔记本名称");- }-- return client.updateNotebook(notebookId, { name: trimmed, parentId: nextParentId });- },- onSuccess: async () => {- setEditingNotebookId(null);- setEditingName("");- setEditingParentId(null);- await invalidateNotebooks();- },- });-- const deleteNotebookMutation = useMutation({- mutationFn: async (notebookId: string) => {- if (!client) {- throw new Error("Client is not ready");- }-- return client.deleteNotebook(notebookId);- },- onSuccess: invalidateNotebooks,- });-- const requestDeleteNotebook = (notebook: Notebook) => {- if (notebook.id === "nb_inbox" || notebook.slug === "inbox" || notebook.name === "等待分类") {- Alert.alert("等待分类不能删除", "等待分类是默认笔记本,用来保证新笔记始终有归属。");- return;- }-- Alert.alert("删除笔记本?", `将删除“${notebook.name}”。如果服务端不允许删除非空笔记本,请先移动或删除其中笔记。`, [- { text: "取消", style: "cancel" },- {- text: "删除",- style: "destructive",- onPress: () => deleteNotebookMutation.mutate(notebook.id),- },- ]);- };-- const prepareCreateChildNotebook = (notebook: Notebook) => {- setParentId(notebook.id);- setName("");- setTimeout(() => createNotebookInputRef.current?.focus(), 50);- };-- const toggleNotebookCollapsed = (notebookId: string) => {- setCollapsedNotebookIds((current) => {- const next = new Set(current);-- if (next.has(notebookId)) {- next.delete(notebookId);- } else {- next.add(notebookId);- }-- return next;- });- };-- const collapseAllNotebooks = () => {- setCollapsedNotebookIds(new Set(childNotebookIds));- };-- const expandAllNotebooks = () => {- setCollapsedNotebookIds(new Set());- };-- return (- <Modal animationType="slide" onRequestClose={onClose} presentationStyle="pageSheet" visible={visible}>- <SafeAreaView style={styles.modalSafeArea}>- <View style={styles.modalHeader}>- <IconButton onPress={onClose}>- <X color="#0f172a" size={20} />- </IconButton>- <Text style={styles.modalTitle}>笔记本管理</Text>- <View style={styles.iconButtonPlaceholder} />- </View>-- <ScrollView contentContainerStyle={styles.editorForm}>- <Text style={styles.label}>新建笔记本</Text>- <View style={styles.inlineForm}>- <TextInput ref={createNotebookInputRef} onChangeText={setName} placeholder="笔记本名称" placeholderTextColor="#94a3b8" style={[styles.titleInput, styles.inlineInput]} value={name} />- <Pressable- disabled={createNotebookMutation.isPending}- onPress={() => createNotebookMutation.mutate()}- style={[styles.inlineButton, createNotebookMutation.isPending && styles.buttonDisabled]}- >- <Plus color="#ffffff" size={18} />- </Pressable>- </View>- <Text style={styles.label}>父级笔记本</Text>- <NotebookParentSelector- currentParentId={parentId}- options={notebookOptions}- onChange={setParentId}- />- {createNotebookMutation.error ? (- <Text style={styles.errorText}>{createNotebookMutation.error instanceof Error ? createNotebookMutation.error.message : "创建失败"}</Text>- ) : null}-- <Text style={styles.label}>全部笔记本</Text>- <View style={styles.searchBox}>- <Search color="#64748b" size={18} />- <TextInput- autoCapitalize="none"- autoCorrect={false}- onChangeText={setNotebookSearchText}- placeholder="搜索笔记本"- placeholderTextColor="#94a3b8"- style={styles.searchInput}- value={notebookSearchText}- />- {notebookSearchText ? (- <Pressable onPress={() => setNotebookSearchText("")}>- <X color="#64748b" size={18} />- </Pressable>- ) : null}- </View>- <ScrollView horizontal showsHorizontalScrollIndicator={false}>- <OptionPill active={notebookSortMode === "manual"} label="手动排序" onPress={() => onSortModeChange("manual")} />- <OptionPill active={notebookSortMode === "name-asc"} label="名称 A-Z" onPress={() => onSortModeChange("name-asc")} />- <OptionPill active={notebookSortMode === "memo-count-desc"} label="笔记数量" onPress={() => onSortModeChange("memo-count-desc")} />- <OptionPill active={notebookSortMode === "updated-desc"} label="最近更新" onPress={() => onSortModeChange("updated-desc")} />- </ScrollView>- {hasCollapsibleNotebooks && !notebookSearchQuery ? (- <ScrollView horizontal showsHorizontalScrollIndicator={false}>- <OptionPill active={false} label="全部展开" onPress={expandAllNotebooks} />- <OptionPill active={false} label="全部折叠" onPress={collapseAllNotebooks} />- </ScrollView>- ) : null}- {visibleNotebookOptions.map(({ depth, notebook }) => {- const editing = editingNotebookId === notebook.id;- const parentOptions = notebookOptions.filter((option) => option.notebook.id !== notebook.id && !isNotebookDescendant(notebooks, option.notebook.id, notebook.id));-- return (- <View key={notebook.id} style={[styles.notebookManageRow, depth > 0 && { marginLeft: Math.min(depth * 14, 42) }]}>- {childNotebookIds.has(notebook.id) && !notebookSearchQuery ? (- <Pressable accessibilityRole="button" onPress={() => toggleNotebookCollapsed(notebook.id)} style={styles.notebookTreeToggle}>- {collapsedNotebookIds.has(notebook.id) ? <ChevronRight color="#64748b" size={17} /> : <ChevronDown color="#64748b" size={17} />}- </Pressable>- ) : (- <View style={styles.notebookTreeTogglePlaceholder} />- )}- {editing ? (- <View style={styles.notebookEditBox}>- <TextInput onChangeText={setEditingName} style={styles.titleInput} value={editingName} />- <NotebookParentSelector- currentParentId={editingParentId}- options={parentOptions}- onChange={setEditingParentId}- />- </View>- ) : (- <View style={styles.notebookManageText}>- <Text numberOfLines={1} style={styles.panelValue}>- {depth > 0 ? `${"· ".repeat(depth)}${notebook.name}` : notebook.name}- </Text>- <Text style={styles.panelLabel}>{notebook.memoCount} 条笔记{notebook.parentId ? " · 子级笔记本" : ""}</Text>- </View>- )}-- {editing ? (- <IconButton onPress={() => renameNotebookMutation.mutate({ notebookId: notebook.id, nextName: editingName, nextParentId: editingParentId })}>- {renameNotebookMutation.isPending ? <ActivityIndicator color="#0f172a" /> : <Check color="#0f172a" size={18} />}- </IconButton>- ) : (- <IconButton- onPress={() => {- setEditingNotebookId(notebook.id);- setEditingName(notebook.name);- setEditingParentId(notebook.parentId);- }}- >- <Pencil color="#0f172a" size={18} />- </IconButton>- )}- {!editing ? (- <IconButton disabled={createNotebookMutation.isPending} onPress={() => prepareCreateChildNotebook(notebook)}>- <Plus color="#0f172a" size={18} />- </IconButton>- ) : null}- <IconButton onPress={() => requestDeleteNotebook(notebook)}>- <Trash2 color="#b91c1c" size={18} />- </IconButton>- </View>- );- })}- {visibleNotebookOptions.length === 0 ? (- <View style={styles.emptyInlinePanel}>- <BookOpen color="#94a3b8" size={28} />- <Text style={styles.mutedText}>没有匹配的笔记本</Text>- </View>- ) : null}- {renameNotebookMutation.error ? (- <Text style={styles.errorText}>{renameNotebookMutation.error instanceof Error ? renameNotebookMutation.error.message : "重命名失败"}</Text>- ) : null}- {deleteNotebookMutation.error ? (- <Text style={styles.errorText}>{deleteNotebookMutation.error instanceof Error ? deleteNotebookMutation.error.message : "删除失败"}</Text>- ) : null}- </ScrollView>- </SafeAreaView>- </Modal>- );-};--const TagsManagerModal = ({ onClose, visible }: { onClose: () => void; visible: boolean }) => {- const { client } = useSession();- const queryClient = useQueryClient();- const localePreference = useMobileLocalePreference();- const [editingTagName, setEditingTagName] = useState<string | null>(null);- const [editingTagValue, setEditingTagValue] = useState("");-- const tagsQuery = useQuery({- queryKey: ["mobile", "tags"],- queryFn: async () => {- if (!client) {- throw new Error("Client is not ready");- }-- return client.listTags();- },- enabled: Boolean(client && visible),- });-- const invalidateTagsAndMemos = async () => {- await Promise.all([- queryClient.invalidateQueries({ queryKey: ["mobile", "tags"] }),- queryClient.invalidateQueries({ queryKey: ["mobile", "memos"] }),- queryClient.invalidateQueries({ queryKey: ["mobile", "search"] }),- queryClient.invalidateQueries({ queryKey: ["mobile", "memo"] }),- ]);- };-- const renameTagMutation = useMutation({- mutationFn: async ({ tag, name }: { tag: string; name: string }) => {- if (!client) {- throw new Error("Client is not ready");- }-- const trimmed = name.trim();-- if (!trimmed) {- throw new Error("请输入标签名称");- }-- return client.renameTag(tag, trimmed);- },- onSuccess: async () => {- setEditingTagName(null);- setEditingTagValue("");- await invalidateTagsAndMemos();- },- });-- const deleteTagMutation = useMutation({- mutationFn: async (tag: string) => {- if (!client) {- throw new Error("Client is not ready");- }-- return client.deleteTag(tag);- },- onSuccess: invalidateTagsAndMemos,- });-- const requestDeleteTag = (tag: TagSummary) => {- Alert.alert("删除标签?", `将从 ${tag.memoCount} 条笔记中移除 #${tag.name}。`, [- { text: "取消", style: "cancel" },- {- text: "删除",- style: "destructive",- onPress: () => deleteTagMutation.mutate(tag.name),- },- ]);- };-- const tags = tagsQuery.data?.tags ?? [];-- return (- <Modal animationType="slide" onRequestClose={onClose} presentationStyle="pageSheet" visible={visible}>- <SafeAreaView style={styles.modalSafeArea}>- <View style={styles.modalHeader}>- <IconButton onPress={onClose}>- <X color="#0f172a" size={20} />- </IconButton>- <Text style={styles.modalTitle}>标签管理</Text>- <View style={styles.iconButtonPlaceholder} />- </View>-- {tagsQuery.isLoading ? (- <View style={styles.centerState}>- <ActivityIndicator color="#0f172a" />- </View>- ) : tags.length === 0 ? (- <View style={styles.centerState}>- <Tag color="#94a3b8" size={32} />- <Text style={styles.emptyTitle}>暂无标签</Text>- <Text style={styles.mutedText}>在编辑笔记时添加标签后会显示在这里</Text>- </View>- ) : (- <ScrollView contentContainerStyle={styles.editorForm}>- <Text style={styles.sectionSubtitle}>共 {tags.length} 个标签</Text>- {tags.map((tag) => {- const editing = editingTagName === tag.name;- const nextName = editingTagValue.trim();-- return (- <View key={tag.name} style={styles.tagManageRow}>- {editing ? (- <TextInput- autoFocus- onChangeText={setEditingTagValue}- placeholder="标签名称"- placeholderTextColor="#94a3b8"- style={[styles.titleInput, styles.inlineInput]}- value={editingTagValue}- />- ) : (- <View style={styles.notebookManageText}>- <Text numberOfLines={1} style={styles.panelValue}>- #{tag.name}- </Text>- <Text style={styles.panelLabel}>{tag.memoCount} 条笔记 · {tag.updatedAt ? formatDate(tag.updatedAt, localePreference) : "未更新"}</Text>- </View>- )}-- {editing ? (- <>- <IconButton onPress={() => renameTagMutation.mutate({ tag: tag.name, name: nextName })}>- {renameTagMutation.isPending ? <ActivityIndicator color="#0f172a" /> : <Check color="#0f172a" size={18} />}- </IconButton>- <IconButton- onPress={() => {- setEditingTagName(null);- setEditingTagValue("");- }}- >- <X color="#0f172a" size={18} />- </IconButton>- </>- ) : (- <>- <IconButton- onPress={() => {- setEditingTagName(tag.name);- setEditingTagValue(tag.name);- }}- >- <Pencil color="#0f172a" size={18} />- </IconButton>- <IconButton onPress={() => requestDeleteTag(tag)}>- <Trash2 color="#b91c1c" size={18} />- </IconButton>- </>- )}- </View>- );- })}- {renameTagMutation.error ? (- <Text style={styles.errorText}>{renameTagMutation.error instanceof Error ? renameTagMutation.error.message : "重命名失败"}</Text>- ) : null}- {deleteTagMutation.error ? (- <Text style={styles.errorText}>{deleteTagMutation.error instanceof Error ? deleteTagMutation.error.message : "删除失败"}</Text>- ) : null}- </ScrollView>- )}- </SafeAreaView>- </Modal>- );-};--const ApiTokensModal = ({ baseUrl, onClose, visible }: { baseUrl: string; onClose: () => void; visible: boolean }) => {- const { client } = useSession();- const queryClient = useQueryClient();- const [name, setName] = useState("MCP Agent");- const [selectedScopes, setSelectedScopes] = useState<Set<string>>(() => new Set(ALL_TOKEN_SCOPES));- const [scopeDefaultsSynced, setScopeDefaultsSynced] = useState(false);- const [createdToken, setCreatedToken] = useState<string | null>(null);- const [copiedValue, setCopiedValue] = useState<string | null>(null);-- const tokensQuery = useQuery({- queryKey: ["mobile", "api-tokens"],- queryFn: async () => {- if (!client) {- throw new Error("Client is not ready");- }-- return client.listApiTokens();- },- enabled: Boolean(client && visible),- });-- const availableScopes = tokensQuery.data?.availableScopes ?? ALL_TOKEN_SCOPES;- const tokens = tokensQuery.data?.apiTokens ?? [];-- useEffect(() => {- if (scopeDefaultsSynced || !tokensQuery.data?.availableScopes) {- return;- }-- setSelectedScopes(new Set(tokensQuery.data.availableScopes));- setScopeDefaultsSynced(true);- }, [scopeDefaultsSynced, tokensQuery.data?.availableScopes]);-- const createTokenMutation = useMutation({- mutationFn: async () => {- if (!client) {- throw new Error("Client is not ready");- }-- const trimmedName = name.trim();- const scopes = Array.from(selectedScopes);-- if (!trimmedName) {- throw new Error("请输入 Token 名称");- }-- if (scopes.length === 0) {- throw new Error("请至少选择一个权限");- }-- return client.createApiToken({ name: trimmedName, scopes });- },- onSuccess: async (data) => {- setCreatedToken(data.token);- setName("");- setSelectedScopes(new Set(availableScopes));- await queryClient.invalidateQueries({ queryKey: ["mobile", "api-tokens"] });- },- });-- const revokeTokenMutation = useMutation({- mutationFn: async (tokenId: string) => {- if (!client) {- throw new Error("Client is not ready");- }-- return client.revokeApiToken(tokenId);- },- onSuccess: async () => {- await queryClient.invalidateQueries({ queryKey: ["mobile", "api-tokens"] });- },- });-- const toggleScope = (scope: string) => {- setSelectedScopes((current) => {- const next = new Set(current);-- if (next.has(scope)) {- next.delete(scope);- } else {- next.add(scope);- }-- return next;- });- };-- const copyText = async (value: string, label: string) => {- await Clipboard.setStringAsync(value);- setCopiedValue(label);- setTimeout(() => {- setCopiedValue((current) => (current === label ? null : current));- }, 1600);- };-- const requestRevokeToken = (token: ApiToken) => {- Alert.alert("撤销 Token?", `将撤销“${token.name}”,使用它的 MCP 客户端会失去访问权限。`, [- { text: "取消", style: "cancel" },- {- text: "撤销",- style: "destructive",- onPress: () => revokeTokenMutation.mutate(token.id),- },- ]);- };-- return (- <Modal animationType="slide" onRequestClose={onClose} presentationStyle="pageSheet" visible={visible}>- <SafeAreaView style={styles.modalSafeArea}>- <View style={styles.modalHeader}>- <IconButton onPress={onClose}>- <X color="#0f172a" size={20} />- </IconButton>- <Text style={styles.modalTitle}>MCP 与 API Token</Text>- <IconButton onPress={() => tokensQuery.refetch()}>- {tokensQuery.isFetching ? <ActivityIndicator color="#0f172a" /> : <RefreshCw color="#0f172a" size={18} />}- </IconButton>- </View>-- <ScrollView contentContainerStyle={styles.editorForm}>- <Text style={styles.sectionSubtitle}>创建远程 MCP 或 API 调用使用的 Bearer Token。</Text>- <ActionButton label={copiedValue === "example-config" ? "已复制示例" : "复制示例配置"} onPress={() => copyText(buildMcpRemoteConfig(baseUrl, "YOUR_TOKEN_HERE"), "example-config")}>- <Copy color="#0f172a" size={16} />- </ActionButton>-- {createdToken ? (- <View style={styles.createdTokenPanel}>- <View style={styles.assetsSummary}>- <ShieldCheck color="#047857" size={18} />- <Text style={styles.assetsSummaryText}>Token 已创建</Text>- </View>- <Text selectable numberOfLines={2} style={styles.tokenValueText}>- {createdToken}- </Text>- <View style={styles.tokenActionRow}>- <ActionButton label={copiedValue === "created-token" ? "已复制" : "复制 Token"} onPress={() => copyText(createdToken, "created-token")}>- <Copy color="#0f172a" size={16} />- </ActionButton>- <ActionButton label={copiedValue === "created-config" ? "已复制" : "复制 MCP 配置"} onPress={() => copyText(buildMcpRemoteConfig(baseUrl, createdToken), "created-config")}>- <KeyRound color="#0f172a" size={16} />- </ActionButton>- </View>- <Text style={styles.assetsHint}>请立即保存。离开后服务端不会再次显示完整 Token。</Text>- </View>- ) : null}-- <Text style={styles.label}>Token 名称</Text>- <TextInput onChangeText={setName} placeholder="MCP Agent" placeholderTextColor="#94a3b8" style={styles.titleInput} value={name} />-- <Text style={styles.label}>权限范围</Text>- <View style={styles.scopeGrid}>- {availableScopes.map((scope) => {- const selected = selectedScopes.has(scope);-- return (- <Pressable key={scope} onPress={() => toggleScope(scope)} style={[styles.scopePill, selected && styles.scopePillActive]}>- <Text style={[styles.scopePillText, selected && styles.scopePillTextActive]}>{getTokenScopeLabel(scope)}</Text>- </Pressable>- );- })}- </View>-- <Pressable- disabled={createTokenMutation.isPending}- onPress={() => createTokenMutation.mutate()}- style={[styles.uploadButton, createTokenMutation.isPending && styles.buttonDisabled]}- >- {createTokenMutation.isPending ? <ActivityIndicator color="#ffffff" /> : <Plus color="#ffffff" size={18} />}- <Text style={styles.uploadButtonText}>{createTokenMutation.isPending ? "创建中" : "创建 Token"}</Text>- </Pressable>- {createTokenMutation.error ? (- <Text style={styles.errorText}>{createTokenMutation.error instanceof Error ? createTokenMutation.error.message : "创建失败"}</Text>- ) : null}-- <Text style={styles.label}>活跃 Token</Text>- {tokensQuery.isLoading ? (- <View style={styles.centerInline}>- <ActivityIndicator color="#0f172a" />- </View>- ) : tokens.length === 0 ? (- <View style={styles.emptyInlinePanel}>- <KeyRound color="#94a3b8" size={28} />- <Text style={styles.mutedText}>暂无 Token</Text>- </View>- ) : (- tokens.map((token) => (- <ApiTokenRow- baseUrl={baseUrl}- copiedValue={copiedValue}- isDeleting={revokeTokenMutation.isPending}- key={token.id}- onCopy={copyText}- onDelete={requestRevokeToken}- token={token}- />- ))- )}- {revokeTokenMutation.error ? (- <Text style={styles.errorText}>{revokeTokenMutation.error instanceof Error ? revokeTokenMutation.error.message : "撤销失败"}</Text>- ) : null}- </ScrollView>- </SafeAreaView>- </Modal>- );-};--const ApiTokenRow = ({- baseUrl,- copiedValue,- isDeleting,- onCopy,- onDelete,- token,-}: {- baseUrl: string;- copiedValue: string | null;- isDeleting: boolean;- onCopy: (value: string, label: string) => void;- onDelete: (token: ApiToken) => void;- token: ApiToken;-}) => {- const tokenCopyLabel = `token-${token.id}`;- const configCopyLabel = `config-${token.id}`;- const canCopyToken = Boolean(token.token && !token.isRevoked);- const localePreference = useMobileLocalePreference();-- return (- <View style={[styles.apiTokenRow, token.isRevoked && styles.buttonDisabled]}>- <View style={styles.notebookManageText}>- <Text numberOfLines={1} style={styles.panelValue}>- {token.name}- </Text>- <Text numberOfLines={2} style={styles.panelLabel}>- {token.scopes.map(getTokenScopeLabel).join("、") || "无权限"}- </Text>- <Text style={styles.panelLabel}>{token.lastUsedAt ? `最近使用 ${formatDate(token.lastUsedAt, localePreference)}` : "从未使用"}</Text>- </View>- <View style={styles.apiTokenActions}>- <IconButton disabled={!canCopyToken} onPress={() => token.token && onCopy(token.token, tokenCopyLabel)}>- {copiedValue === tokenCopyLabel ? <ShieldCheck color="#047857" size={18} /> : <Copy color={canCopyToken ? "#0f172a" : "#cbd5e1"} size={18} />}- </IconButton>- <IconButton disabled={!canCopyToken} onPress={() => token.token && onCopy(buildMcpRemoteConfig(baseUrl, token.token), configCopyLabel)}>- {copiedValue === configCopyLabel ? <ShieldCheck color="#047857" size={18} /> : <KeyRound color={canCopyToken ? "#0f172a" : "#cbd5e1"} size={18} />}- </IconButton>- <IconButton onPress={() => !isDeleting && onDelete(token)}>- <Trash2 color="#b91c1c" size={18} />- </IconButton>- </View>- </View>- );-};--const EvernoteGuideModal = ({ onClose, visible }: { onClose: () => void; visible: boolean }) => {- const [copiedValue, setCopiedValue] = useState<string | null>(null);-- const copyText = async (value: string, label: string) => {- await Clipboard.setStringAsync(value);- setCopiedValue(label);- setTimeout(() => setCopiedValue((current) => (current === label ? null : current)), 1600);- };-- return (- <Modal animationType="slide" onRequestClose={onClose} presentationStyle="pageSheet" visible={visible}>- <SafeAreaView style={styles.modalSafeArea}>- <View style={styles.modalHeader}>- <IconButton onPress={onClose}>- <X color="#0f172a" size={20} />- </IconButton>- <Text style={styles.modalTitle}>Evernote 导入指引</Text>- <IconButton onPress={() => copyText(EVERNOTE_MIGRATION_PROMPT, "prompt-header")}>- {copiedValue === "prompt-header" ? <ShieldCheck color="#047857" size={18} /> : <Copy color="#0f172a" size={18} />}- </IconButton>- </View>-- <ScrollView contentContainerStyle={styles.editorForm}>- <View style={styles.guideHero}>- <Upload color="#047857" size={24} />- <Text style={styles.panelValue}>推荐通过 AI 编程助手 + EdgeEver MCP 自动迁移</Text>- <Text style={styles.panelLabel}>- 该方案支持大体量 ENEX 导入、WebP 图片转换、创建/修改时间保留,以及嵌套笔记本目录层级还原。- </Text>- </View>-- <GuideStep- title="1. 配置 EdgeEver MCP 服务"- body="在设置页打开“MCP 与 API Token”,创建包含笔记本、笔记、资源、标签读写权限的 Token,复制完整 MCP 配置并交给 AI 编程助手安装。"- />- <GuideStep- title="2. 发送完整迁移 Prompt"- body="让助手安装 evernote-backup,初始化印象笔记 china 后端数据库,同步并导出 ENEX,再下载 EdgeEver 迁移脚本执行导入。"- />- <GuideStep- title="3. 按需限定导入范围"- body="默认会全量迁移。只想导入部分笔记本时,让助手在导入命令后追加 --include 参数。"- />- <GuideStep- title="4. 回到 EdgeEver 验证"- body="导入完成后刷新客户端,检查笔记本组层级、笔记正文、图片资源、创建时间和修改时间是否正常。"- />-- <View style={styles.promptCard}>- <View style={styles.promptCardHeader}>- <Text style={styles.panelValue}>可直接复制给 AI 助手的 Prompt</Text>- <ActionButton label={copiedValue === "prompt-card" ? "已复制" : "复制"} onPress={() => copyText(EVERNOTE_MIGRATION_PROMPT, "prompt-card")}>- {copiedValue === "prompt-card" ? <ShieldCheck color="#047857" size={16} /> : <Copy color="#0f172a" size={16} />}- </ActionButton>- </View>- <Text selectable style={styles.revisionPreviewText}>- {EVERNOTE_MIGRATION_PROMPT}- </Text>- </View>-- <View style={styles.revisionPreviewBlock}>- <Text style={styles.label}>手动模式备用</Text>- <Text style={styles.revisionPreviewText}>- 不使用 AI 助手时,可以手动下载迁移脚本并按脚本头部注释执行。脚本地址:- </Text>- <Text selectable style={styles.tokenValueText}>- {EVERNOTE_IMPORT_SCRIPT_URL}- </Text>- <View style={styles.tokenActionRow}>- <ActionButton label={copiedValue === "script-url" ? "已复制" : "复制地址"} onPress={() => copyText(EVERNOTE_IMPORT_SCRIPT_URL, "script-url")}>- {copiedValue === "script-url" ? <ShieldCheck color="#047857" size={16} /> : <Copy color="#0f172a" size={16} />}- </ActionButton>- <ActionButton label="打开" onPress={() => Linking.openURL(EVERNOTE_IMPORT_SCRIPT_URL)}>- <ExternalLink color="#0f172a" size={16} />- </ActionButton>- </View>- </View>- </ScrollView>- </SafeAreaView>- </Modal>- );-};--const AdvancedPlayModal = ({ onClose, visible }: { onClose: () => void; visible: boolean }) => {- const [copiedPromptId, setCopiedPromptId] = useState<string | null>(null);- const localePreference = useMobileLocalePreference();- const advancedPrompts = useMemo(() => getMobileAdvancedPrompts(localePreference), [localePreference]);-- const copyPrompt = async (promptId: string, prompt: string) => {- await Clipboard.setStringAsync(prompt);- setCopiedPromptId(promptId);- setTimeout(() => setCopiedPromptId((current) => (current === promptId ? null : current)), 1600);- };-- return (- <Modal animationType="slide" onRequestClose={onClose} presentationStyle="pageSheet" visible={visible}>- <SafeAreaView style={styles.modalSafeArea}>- <View style={styles.modalHeader}>- <IconButton onPress={onClose}>- <X color="#0f172a" size={20} />- </IconButton>- <Text style={styles.modalTitle}>进阶玩法</Text>- <View style={styles.iconButtonPlaceholder} />- </View>-- <ScrollView contentContainerStyle={styles.editorForm}>- <View style={styles.guideHero}>- <Sparkles color="#047857" size={24} />- <Text style={styles.panelValue}>搭配 AI Agent 的进阶工作流</Text>- <Text style={styles.panelLabel}>复制 Prompt 后,配合 EdgeEver MCP 让 AI 读取真实笔记并输出结构化结果。</Text>- </View>-- {advancedPrompts.map((item) => (- <View key={item.id} style={styles.promptCard}>- <View style={styles.promptCardHeader}>- <Text style={styles.panelValue}>{item.title}</Text>- <ActionButton label={copiedPromptId === item.id ? "已复制" : "复制"} onPress={() => copyPrompt(item.id, item.prompt)}>- {copiedPromptId === item.id ? <ShieldCheck color="#047857" size={16} /> : <Copy color="#0f172a" size={16} />}- </ActionButton>- </View>- <Text selectable style={styles.revisionPreviewText}>- {item.prompt}- </Text>- </View>- ))}- </ScrollView>- </SafeAreaView>- </Modal>- );-};--const SyncQueueModal = ({- onChanged,- onClose,- onSync,- visible,-}: {- onChanged: () => void | Promise<void>;- onClose: () => void;- onSync: () => void | Promise<void>;- visible: boolean;-}) => {- const [items, setItems] = useState<MobileSyncQueueItem[]>([]);- const [loading, setLoading] = useState(false);- const localePreference = useMobileLocalePreference();-- const refreshItems = async () => {- setLoading(true);- try {- setItems(await listMobileSyncQueueItems());- } finally {- setLoading(false);- }- };-- useEffect(() => {- if (visible) {- void refreshItems();- }- }, [visible]);-- const discardItem = (item: MobileSyncQueueItem) => {- Alert.alert("丢弃本地变更?", "此操作会移除这条待同步记录,不会修改服务端笔记。", [- { text: "取消", style: "cancel" },- {- text: "丢弃",- style: "destructive",- onPress: async () => {- await deleteMobileSyncQueueItem(item.id);- await onChanged();- await refreshItems();- },- },- ]);- };-- const syncAll = async () => {- await onSync();- await onChanged();- await refreshItems();- };-- return (- <Modal animationType="slide" onRequestClose={onClose} presentationStyle="pageSheet" visible={visible}>- <SafeAreaView style={styles.modalSafeArea}>- <View style={styles.modalHeader}>- <IconButton onPress={onClose}>- <X color="#0f172a" size={20} />- </IconButton>- <Text style={styles.modalTitle}>同步队列</Text>- <IconButton onPress={refreshItems}>- {loading ? <ActivityIndicator color="#0f172a" /> : <RefreshCw color="#0f172a" size={18} />}- </IconButton>- </View>-- <ScrollView contentContainerStyle={styles.editorForm}>- <View style={styles.guideHero}>- <RefreshCw color="#047857" size={24} />- <Text style={styles.panelValue}>本地待同步变更</Text>- <Text style={styles.panelLabel}>失败和冲突会保留在这里。冲突通常表示服务端版本已更新,需要确认后再处理。</Text>- </View>-- <Pressable disabled={loading || items.length === 0} onPress={() => void syncAll()} style={[styles.uploadButton, (loading || items.length === 0) && styles.buttonDisabled]}>- <RefreshCw color="#ffffff" size={18} />- <Text style={styles.uploadButtonText}>立即同步全部</Text>- </Pressable>-- {loading ? (- <View style={styles.centerInline}>- <ActivityIndicator color="#0f172a" />- </View>- ) : items.length === 0 ? (- <View style={styles.emptyInlinePanel}>- <ShieldCheck color="#94a3b8" size={28} />- <Text style={styles.mutedText}>暂无待同步变更</Text>- </View>- ) : (- items.map((item) => (- <View key={item.id} style={styles.syncQueueItem}>- <View style={styles.promptCardHeader}>- <Text style={styles.panelValue}>{item.payload.title || DEFAULT_MEMO_TITLE}</Text>- <Text style={[styles.syncStatusPill, getSyncQueueStatusStyle(item.status)]}>{getSyncQueueStatusLabel(item.status)}</Text>- </View>- <Text selectable style={styles.panelLabel}>- {item.memoId}- </Text>- <Text style={styles.panelHint}>- 更新于 {formatDate(item.updatedAt, localePreference)} · 尝试 {item.attemptCount} 次- </Text>- {item.lastError ? <Text style={styles.errorText}>{item.lastError}</Text> : null}- <View style={styles.tokenActionRow}>- <ActionButton danger label="丢弃" onPress={() => discardItem(item)}>- <Trash2 color="#b91c1c" size={16} />- </ActionButton>- </View>- </View>- ))- )}- </ScrollView>- </SafeAreaView>- </Modal>- );-};--const GuideStep = ({ body, title }: { body: string; title: string }) => (- <View style={styles.guideStep}>- <Text style={styles.panelValue}>{title}</Text>- <Text style={styles.panelLabel}>{body}</Text>- </View>-);--const SystemInfoModal = ({- baseUrl,- memoCount,- notebookCount,- onClose,- visible,-}: {- baseUrl: string;- memoCount: number;- notebookCount: number;- onClose: () => void;- visible: boolean;-}) => {- const [copied, setCopied] = useState(false);- const localePreference = useMobileLocalePreference();- const resolvedLocale = getResolvedMobileLocale(localePreference);- const copy = getMobileSystemInfoText(localePreference);- const expoConfig = Constants.expoConfig;- const expoExtra = expoConfig?.extra as { eas?: { projectId?: string } } | undefined;- const nativeIdentifier = Platform.select({- android: expoConfig?.android?.package,- ios: expoConfig?.ios?.bundleIdentifier,- default: expoConfig?.slug,- });- const infoItems = [- { label: copy.version, value: `v${MOBILE_APP_VERSION}` },- { label: copy.build, value: __DEV__ ? "development" : "production" },- { label: copy.platform, value: Platform.OS },- { label: copy.platformVersion, value: String(Platform.Version) },- { label: copy.installMode, value: formatExecutionEnvironment(Constants.executionEnvironment, localePreference) },- { label: copy.appIdentifier, value: nativeIdentifier || copy.unknown },- { label: "Expo Owner", value: expoConfig?.owner || copy.notSet },- { label: "Expo Slug", value: expoConfig?.slug || copy.unknown },- { label: "EAS Project ID", value: Constants.easConfig?.projectId || expoExtra?.eas?.projectId || copy.disconnected },- { label: copy.instanceUrl, value: baseUrl || copy.disconnected },- { label: copy.notebookCount, value: String(notebookCount) },- { label: copy.memoCount, value: String(memoCount) },- { label: copy.timeZone, value: Intl.DateTimeFormat().resolvedOptions().timeZone || copy.unknown },- { label: copy.language, value: localePreference === "system" ? `${resolvedLocale} (${copy.followSystem})` : resolvedLocale },- ];-- const copySystemInfo = async () => {- await Clipboard.setStringAsync(infoItems.map((item) => `${item.label}: ${item.value}`).join("\n"));- setCopied(true);- setTimeout(() => setCopied(false), 1600);- };-- return (- <Modal animationType="slide" onRequestClose={onClose} presentationStyle="pageSheet" visible={visible}>- <SafeAreaView style={styles.modalSafeArea}>- <View style={styles.modalHeader}>- <IconButton onPress={onClose}>- <X color="#0f172a" size={20} />- </IconButton>- <Text style={styles.modalTitle}>{copy.title}</Text>- <IconButton onPress={copySystemInfo}>- {copied ? <ShieldCheck color="#047857" size={18} /> : <Copy color="#0f172a" size={18} />}- </IconButton>- </View>-- <ScrollView contentContainerStyle={styles.editorForm}>- <Text style={styles.sectionSubtitle}>{copy.description}</Text>- {infoItems.map((item) => (- <PanelRow key={item.label} label={item.label} value={item.value} />- ))}- </ScrollView>- </SafeAreaView>- </Modal>- );-};--type ResourceFilter = "all" | "image" | "document" | "other";--const DOCUMENT_MIME_TYPES = new Set([- "application/pdf",- "application/msword",- "application/vnd.openxmlformats-officedocument.wordprocessingml.document",- "application/vnd.ms-excel",- "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",- "application/vnd.ms-powerpoint",- "application/vnd.openxmlformats-officedocument.presentationml.presentation",- "text/plain",- "text/markdown",- "application/json",- "application/xml",- "text/html",- "text/css",- "text/javascript",-]);--const ResourcesModal = ({- activeMemo,- imageCompressionEnabled,- onClose,- visible,-}: {- activeMemo: MemoDetail | null;- imageCompressionEnabled: boolean;- onClose: () => void;- visible: boolean;-}) => {- const { client } = useSession();- const queryClient = useQueryClient();- const [searchText, setSearchText] = useState("");- const [filter, setFilter] = useState<ResourceFilter>("all");- const [layout, setLayout] = useState<MobileResourceLayoutPreference>("grid");- const [previewResource, setPreviewResource] = useState<ResourceListItem | null>(null);- const [uploadProgress, setUploadProgress] = useState("");-- useEffect(() => {- if (!visible) {- setUploadProgress("");- return;- }-- let mounted = true;-- readMobileResourceLayout().then((value) => {- if (mounted) {- setLayout(value);- }- });-- return () => {- mounted = false;- };- }, [visible]);-- const resourcesQuery = useQuery({- queryKey: ["mobile", "resources"],- queryFn: async () => {- if (!client) {- throw new Error("Client is not ready");- }-- return client.listResources();- },- enabled: Boolean(client && visible),- });-- const uploadResourceMutation = useMutation({- mutationFn: async () => {- if (!client || !activeMemo) {- throw new Error("请先打开一条可用笔记");- }-- if (activeMemo.isDeleted) {- throw new Error("回收站中的笔记不能上传资源");- }-- const result = await DocumentPicker.getDocumentAsync({- copyToCacheDirectory: true,- multiple: true,- type: "*/*",- });-- if (result.canceled) {- return null;- }-- const assets = result.assets.filter((asset) => asset.uri);-- if (assets.length === 0) {- throw new Error("没有选择文件");- }-- const resources = [];- let nextMarkdown = activeMemo.contentMarkdown || activeMemo.contentText || "";-- for (const [index, asset] of assets.entries()) {- setUploadProgress(`上传 ${index + 1}/${assets.length}:${asset.name || "文件"}`);- const form = new FormData();- const uploadAsset = await prepareUploadAsset(asset, imageCompressionEnabled);- form.append("file", uploadAsset as unknown as Blob);-- const { resource } = await client.uploadMemoResource(activeMemo.id, form);- resources.push(resource);- nextMarkdown = appendResourceMarkdown(nextMarkdown, {- filename: resource.filename || uploadAsset.name || asset.name || "upload",- kind: resource.kind,- url: resource.url,- });- }-- setUploadProgress("写入笔记正文");- const { editSession } = await client.createMemoEditSession(activeMemo.id);- const { memo } = await client.updateMemo(activeMemo.id, {- contentMarkdown: nextMarkdown,- expectedRevision: activeMemo.revision,- expectedContentHash: activeMemo.contentHash,- editSessionId: editSession.id,- });-- return { memo, resources };- },- onSuccess: async (result) => {- if (!result) {- return;- }-- await Promise.all([- queryClient.invalidateQueries({ queryKey: ["mobile", "resources"] }),- queryClient.invalidateQueries({ queryKey: ["mobile", "memo"] }),- queryClient.invalidateQueries({ queryKey: ["mobile", "memos"] }),- ]);- queryClient.setQueryData(["mobile", "memo", "notebook", result.memo.id], { memo: result.memo });- setFilter(result.resources.some((resource) => resource.kind === "image") ? "image" : "all");- setUploadProgress(`已上传 ${result.resources.length} 个文件`);- },- onError: () => {- setUploadProgress("");- },- });-- const resources = resourcesQuery.data?.resources ?? [];- const summary = resourcesQuery.data?.summary ?? {- totalCount: 0,- totalBytes: 0,- imageCount: 0,- attachmentCount: 0,- };- const filteredResources = resources.filter((resource) => {- const isDocument = isDocumentResource(resource);-- if (filter === "image" && resource.kind !== "image") {- return false;- }-- if (filter === "document" && (!isDocument || resource.kind === "image")) {- return false;- }-- if (filter === "other" && (resource.kind === "image" || isDocument)) {- return false;- }-- const query = searchText.trim().toLowerCase();-- if (!query) {- return true;- }-- return (- (resource.filename || "").toLowerCase().includes(query) ||- (resource.memoTitle || "").toLowerCase().includes(query) ||- (resource.memoExcerpt || "").toLowerCase().includes(query)- );- });- const imageResources = filteredResources.filter((resource) => resource.kind === "image");- const previewIndex = previewResource ? imageResources.findIndex((resource) => resource.id === previewResource.id) : -1;- const uploadTargetHint = !activeMemo- ? "打开一条笔记后可作为资源上传目标"- : activeMemo.isDeleted- ? "已删除笔记不能上传附件,请先恢复笔记"- : `当前笔记:${activeMemo.title?.trim() || activeMemo.excerpt || DEFAULT_MEMO_TITLE};上传后会写入正文`;- const handlePreviewStep = (direction: -1 | 1) => {- if (previewIndex < 0 || imageResources.length < 2) {- return;- }-- const nextIndex = (previewIndex + direction + imageResources.length) % imageResources.length;- setPreviewResource(imageResources[nextIndex]);- };- const handleLayoutChange = (nextLayout: MobileResourceLayoutPreference) => {- setLayout(nextLayout);- void writeMobileResourceLayout(nextLayout);- };-- return (- <Modal animationType="slide" onRequestClose={() => !uploadResourceMutation.isPending && onClose()} presentationStyle="pageSheet" visible={visible}>- <SafeAreaView style={styles.modalSafeArea}>- <View style={styles.modalHeader}>- <IconButton disabled={uploadResourceMutation.isPending} onPress={onClose}>- <X color={uploadResourceMutation.isPending ? "#cbd5e1" : "#0f172a"} size={20} />- </IconButton>- <Text style={styles.modalTitle}>资源库</Text>- <IconButton onPress={() => resourcesQuery.refetch()}>- {resourcesQuery.isFetching ? <ActivityIndicator color="#0f172a" /> : <RefreshCw color="#0f172a" size={18} />}- </IconButton>- </View>-- <View style={styles.assetsToolbar}>- <View style={styles.assetsSummary}>- <Archive color="#047857" size={18} />- <Text style={styles.assetsSummaryText}>{summary.totalCount} 个文件</Text>- <Text style={styles.assetsSummaryMeta}>{formatBytes(summary.totalBytes)}</Text>- </View>- <View style={styles.assetsSummary}>- <ImageIcon color="#64748b" size={16} />- <Text style={styles.assetsSummaryMeta}>{summary.imageCount} 张图片</Text>- <HardDrive color="#64748b" size={16} />- <Text style={styles.assetsSummaryMeta}>{summary.attachmentCount} 个附件</Text>- </View>-- <View style={styles.searchBox}>- <Search color="#64748b" size={18} />- <TextInput- autoCapitalize="none"- autoCorrect={false}- onChangeText={setSearchText}- placeholder="搜索文件名或来源笔记"- placeholderTextColor="#94a3b8"- style={styles.searchInput}- value={searchText}- />- {searchText ? (- <Pressable onPress={() => setSearchText("")}>- <X color="#64748b" size={18} />- </Pressable>- ) : null}- </View>-- <ScrollView horizontal showsHorizontalScrollIndicator={false}>- <OptionPill active={filter === "all"} label="全部" onPress={() => setFilter("all")} />- <OptionPill active={filter === "image"} label="图片" onPress={() => setFilter("image")} />- <OptionPill active={filter === "document"} label="文档" onPress={() => setFilter("document")} />- <OptionPill active={filter === "other"} label="其他" onPress={() => setFilter("other")} />- </ScrollView>-- <View style={styles.layoutToggle}>- <Pressable accessibilityRole="button" onPress={() => handleLayoutChange("grid")} style={[styles.layoutToggleButton, layout === "grid" && styles.layoutToggleButtonActive]}>- <Grid color={layout === "grid" ? "#047857" : "#64748b"} size={16} />- <Text style={[styles.layoutToggleText, layout === "grid" && styles.layoutToggleTextActive]}>网格</Text>- </Pressable>- <Pressable accessibilityRole="button" onPress={() => handleLayoutChange("list")} style={[styles.layoutToggleButton, layout === "list" && styles.layoutToggleButtonActive]}>- <List color={layout === "list" ? "#047857" : "#64748b"} size={16} />- <Text style={[styles.layoutToggleText, layout === "list" && styles.layoutToggleTextActive]}>列表</Text>- </Pressable>- </View>-- <Pressable- disabled={!activeMemo || activeMemo.isDeleted || uploadResourceMutation.isPending}- onPress={() => uploadResourceMutation.mutate()}- style={[styles.uploadButton, (!activeMemo || activeMemo.isDeleted || uploadResourceMutation.isPending) && styles.buttonDisabled]}- >- {uploadResourceMutation.isPending ? <ActivityIndicator color="#ffffff" /> : <Upload color="#ffffff" size={18} />}- <Text style={styles.uploadButtonText}>{uploadResourceMutation.isPending ? uploadProgress || "上传中" : "上传附件"}</Text>- </Pressable>- {uploadProgress ? <Text style={styles.assetsHint}>{uploadProgress}</Text> : null}-- <Text style={styles.assetsHint}>{uploadTargetHint}</Text>- {uploadResourceMutation.error ? (- <Text style={styles.errorText}>{uploadResourceMutation.error instanceof Error ? uploadResourceMutation.error.message : "上传失败"}</Text>- ) : null}- </View>-- {resourcesQuery.isLoading ? (- <View style={styles.centerState}>- <ActivityIndicator color="#0f172a" />- </View>- ) : filteredResources.length === 0 ? (- <View style={styles.centerState}>- <Archive color="#94a3b8" size={32} />- <Text style={styles.emptyTitle}>{searchText || filter !== "all" ? "没有匹配资源" : "资源库为空"}</Text>- <Text style={styles.mutedText}>{searchText || filter !== "all" ? "调整筛选条件后再试" : "PWA 上传的图片和附件会显示在这里"}</Text>- </View>- ) : (- <FlatList- columnWrapperStyle={layout === "grid" ? styles.assetGridRow : undefined}- contentContainerStyle={layout === "grid" ? styles.assetGrid : styles.assetList}- data={filteredResources}- key={layout}- keyExtractor={(resource) => resource.id}- numColumns={layout === "grid" ? 2 : 1}- renderItem={({ item }) => <ResourceCard layout={layout} resource={item} onOpen={() => openResource(item)} onPreview={() => setPreviewResource(item)} />}- refreshControl={<RefreshControl onRefresh={() => resourcesQuery.refetch()} refreshing={resourcesQuery.isFetching} tintColor="#0f172a" />}- />- )}-- <ImagePreviewModal- onClose={() => setPreviewResource(null)}- onNext={() => handlePreviewStep(1)}- onPrevious={() => handlePreviewStep(-1)}- resource={previewResource}- resourceCount={imageResources.length}- resourceIndex={previewIndex}- />- </SafeAreaView>- </Modal>- );-};--const ResourceCard = ({- layout,- onOpen,- onPreview,- resource,-}: {- layout: MobileResourceLayoutPreference;- onOpen: () => void;- onPreview: () => void;- resource: ResourceListItem;-}) => {- const source = resource.memoDeleted ? "已删除笔记" : resource.memoTitle || resource.memoExcerpt || resource.memoId;- const isImage = resource.kind === "image";- const localePreference = useMobileLocalePreference();-- return (- <Pressable onPress={isImage ? onPreview : onOpen} style={layout === "grid" ? styles.resourceGridCard : styles.resourceCard}>- <View style={layout === "grid" ? styles.resourceGridThumb : styles.resourceThumb}>- {isImage ? (- <RNImage source={{ uri: resource.url }} style={styles.resourceImage} />- ) : (- <View style={styles.resourceFileIcon}>{getResourceIcon(resource)}</View>- )}- </View>- <View style={layout === "grid" ? styles.resourceGridInfo : styles.resourceInfo}>- <Text numberOfLines={1} style={styles.memoTitle}>- {resource.filename || resource.id}- </Text>- {layout === "grid" ? (- <>- <Text numberOfLines={1} style={styles.panelLabel}>- {formatBytes(resource.byteSize)} · {resource.mimeType?.split("/")[1] || resource.kind}- </Text>- <Text numberOfLines={1} style={styles.panelLabel}>- {formatDate(resource.createdAt, localePreference)}- </Text>- <Text numberOfLines={1} style={styles.panelLabel}>- 来源:{source}- </Text>- </>- ) : (- <>- <Text numberOfLines={1} style={styles.panelLabel}>- {formatBytes(resource.byteSize)} · {resource.mimeType?.split("/")[1] || resource.kind} · {formatDate(resource.createdAt, localePreference)}- </Text>- <Text numberOfLines={1} style={styles.panelLabel}>- 来源:{source}- </Text>- </>- )}- </View>- {layout === "list" ? (- <Pressable onPress={onOpen} style={styles.secondaryIconButton}>- <ExternalLink color="#0f172a" size={16} />- </Pressable>- ) : null}- </Pressable>- );-};--const ImagePreviewModal = ({- onClose,- onNext,- onPrevious,- resource,- resourceCount,- resourceIndex,-}: {- onClose: () => void;- onNext: () => void;- onPrevious: () => void;- resource: ResourceListItem | null;- resourceCount: number;- resourceIndex: number;-}) => (- <Modal animationType="fade" transparent visible={Boolean(resource)} onRequestClose={onClose}>- <View style={styles.previewBackdrop}>- <View style={styles.previewHeader}>- <Text numberOfLines={1} style={styles.previewTitle}>- {resource?.filename || "图片预览"}- </Text>- {resourceCount > 1 && resourceIndex >= 0 ? (- <Text style={styles.previewCounter}>- {resourceIndex + 1}/{resourceCount}- </Text>- ) : null}- <IconButton onPress={onClose}>- <X color="#0f172a" size={20} />- </IconButton>- </View>- {resource ? <RNImage resizeMode="contain" source={{ uri: resource.url }} style={styles.previewImage} /> : null}- {resourceCount > 1 ? (- <View style={styles.previewNavRow}>- <Pressable accessibilityLabel="上一张" accessibilityRole="button" onPress={onPrevious} style={styles.previewNavButton}>- <ChevronLeft color="#ffffff" size={26} />- </Pressable>- <Pressable accessibilityLabel="下一张" accessibilityRole="button" onPress={onNext} style={styles.previewNavButton}>- <ChevronRight color="#ffffff" size={26} />- </Pressable>- </View>- ) : null}- {resource ? (- <Pressable onPress={() => openResource(resource)} style={styles.previewOpenButton}>- <ExternalLink color="#ffffff" size={18} />- <Text style={styles.previewOpenText}>打开原文件</Text>- </Pressable>- ) : null}- </View>- </Modal>-);--const RevisionHistoryModal = ({- memo,- onClose,- onRestored,-}: {- memo: MemoDetail | null;- onClose: () => void;- onRestored: (memo: MemoDetail) => void;-}) => {- const { client } = useSession();- const queryClient = useQueryClient();- const localePreference = useMobileLocalePreference();- const [selectedRevisionId, setSelectedRevisionId] = useState<string | null>(null);-- const revisionsQuery = useQuery({- queryKey: ["mobile", "memo-revisions", memo?.id],- queryFn: async () => {- if (!client || !memo) {- throw new Error("Memo is not selected");- }-- return client.listMemoRevisions(memo.id);- },- enabled: Boolean(client && memo),- });-- const revisions = revisionsQuery.data?.revisions ?? [];- const selectedRevision = revisions.find((revision) => revision.id === selectedRevisionId) ?? revisions[0] ?? null;- const diffRows = selectedRevision ? buildRevisionDiffRows(selectedRevision.contentMarkdown, memo?.contentMarkdown ?? "") : null;- const changedLines = diffRows?.changed ?? 0;-- useEffect(() => {- if (memo && revisions.length > 0 && !selectedRevisionId) {- setSelectedRevisionId(revisions[0].id);- }- }, [memo, revisions, selectedRevisionId]);-- useEffect(() => {- if (!memo) {- setSelectedRevisionId(null);- }- }, [memo]);-- useEffect(() => {- setSelectedRevisionId(null);- }, [memo?.id]);-- const restoreRevisionMutation = useMutation({- mutationFn: async (revision: MemoRevision) => {- if (!client || !memo) {- throw new Error("Memo is not selected");- }-- const response = await client.restoreMemoRevision(memo.id, revision.id);- return response.memo;- },- onSuccess: async (restoredMemo) => {- await Promise.all([- queryClient.invalidateQueries({ queryKey: ["mobile", "memos"] }),- queryClient.invalidateQueries({ queryKey: ["mobile", "search"] }),- queryClient.invalidateQueries({ queryKey: ["mobile", "memo"] }),- queryClient.invalidateQueries({ queryKey: ["mobile", "memo-revisions", restoredMemo.id] }),- ]);- onRestored(restoredMemo);- },- });-- const requestRestoreRevision = (revision: MemoRevision) => {- Alert.alert("恢复此版本?", `将把笔记内容恢复到修订 ${revision.revision}。当前内容会作为新的修订保留。`, [- { text: "取消", style: "cancel" },- {- text: "恢复",- onPress: () => restoreRevisionMutation.mutate(revision),- },- ]);- };-- return (- <Modal animationType="slide" onRequestClose={onClose} presentationStyle="pageSheet" visible={Boolean(memo)}>- <SafeAreaView style={styles.modalSafeArea}>- <View style={styles.modalHeader}>- <IconButton onPress={onClose}>- <X color="#0f172a" size={20} />- </IconButton>- <Text numberOfLines={1} style={styles.modalTitle}>- 修订历史- </Text>- <View style={styles.iconButtonPlaceholder} />- </View>-- {revisionsQuery.isLoading ? (- <View style={styles.centerState}>- <ActivityIndicator color="#0f172a" />- </View>- ) : revisions.length === 0 ? (- <View style={styles.centerState}>- <History color="#94a3b8" size={32} />- <Text style={styles.emptyTitle}>暂无历史版本</Text>- <Text style={styles.mutedText}>笔记保存后产生的修订会显示在这里</Text>- </View>- ) : (- <ScrollView contentContainerStyle={styles.editorForm}>- <Text style={styles.detailTitle}>{memo?.title?.trim() || DEFAULT_MEMO_TITLE}</Text>- <Text style={styles.sectionSubtitle}>{selectedRevision ? `修订 ${selectedRevision.revision} · ${changedLines} 行差异` : "请选择一个修订"}</Text>-- <ScrollView horizontal showsHorizontalScrollIndicator={false}>- {revisions.map((revision) => (- <Pressable- key={revision.id}- onPress={() => setSelectedRevisionId(revision.id)}- style={[styles.revisionPill, selectedRevision?.id === revision.id && styles.revisionPillActive]}- >- <Text style={[styles.revisionPillTitle, selectedRevision?.id === revision.id && styles.revisionPillTitleActive]}>修订 {revision.revision}</Text>- <Text style={[styles.revisionPillMeta, selectedRevision?.id === revision.id && styles.revisionPillTitleActive]}>- {formatDate(revision.createdAt, localePreference)} · {formatRevisionActor(revision.createdBy)}- </Text>- </Pressable>- ))}- </ScrollView>-- {selectedRevision ? (- <>- <ActionButton disabled={restoreRevisionMutation.isPending || Boolean(memo?.isDeleted)} label={restoreRevisionMutation.isPending ? "恢复中" : "恢复此版本"} onPress={() => requestRestoreRevision(selectedRevision)}>- <RotateCcw color="#0f172a" size={16} />- </ActionButton>- <View style={styles.revisionPreviewBlock}>- <Text style={styles.label}>历史版本</Text>- <RevisionDiffPreview rows={diffRows?.leftRows ?? []} tone="history" />- </View>- <View style={styles.revisionPreviewBlock}>- <Text style={styles.label}>当前内容</Text>- <RevisionDiffPreview rows={diffRows?.rightRows ?? []} tone="current" />- </View>- </>- ) : null}- {restoreRevisionMutation.error ? (- <Text style={styles.errorText}>{restoreRevisionMutation.error instanceof Error ? restoreRevisionMutation.error.message : "恢复失败"}</Text>- ) : null}- </ScrollView>- )}- </SafeAreaView>- </Modal>- );-};--const RevisionDiffPreview = ({ rows, tone }: { rows: DiffRow[]; tone: "history" | "current" }) => {- const hasContent = rows.some((row) => row.text);-- if (!hasContent) {- return <Text style={styles.mutedText}>没有正文内容</Text>;- }-- return (- <View style={styles.revisionDiffTable}>- {rows.map((row) => {- const changed = row.state === "changed";-- return (- <View- key={row.lineNumber}- style={[- styles.revisionDiffRow,- changed && tone === "history" && styles.revisionDiffRowHistory,- changed && tone === "current" && styles.revisionDiffRowCurrent,- ]}- >- <Text style={styles.revisionDiffLineNumber}>{row.lineNumber}</Text>- <Text style={[styles.revisionDiffText, row.state === "empty" && styles.revisionDiffTextEmpty]}>{row.text || " "}</Text>- </View>- );- })}- </View>- );-};--const MemoDetailModal = ({- isDeleting,- isLoading,- isRestoring,- isSaving,- memo,- onClose,- onDelete,- onEdit,- onRichEdit,- onOpenNextMemo,- onOpenPreviousMemo,- onOpenResources,- onOpenRevisions,- onRestore,- onTogglePin,- visible,-}: {- isDeleting: boolean;- isLoading: boolean;- isRestoring: boolean;- isSaving: boolean;- memo: MemoDetail | null;- onClose: () => void;- onDelete: (memo: MemoDetail) => void;- onEdit: (memo: MemoDetail) => void;- onRichEdit: (memo: MemoDetail) => void;- onOpenNextMemo?: () => void;- onOpenPreviousMemo?: () => void;- onOpenResources: () => void;- onOpenRevisions: (memo: MemoDetail) => void;- onRestore: (memo: MemoDetail) => void;- onTogglePin: (memo: MemoDetail) => void;- visible: boolean;-}) => {- const [searchOpen, setSearchOpen] = useState(false);- const [searchQuery, setSearchQuery] = useState("");- const [activeMatchIndex, setActiveMatchIndex] = useState(0);- const localePreference = useMobileLocalePreference();- const detailText = memo?.contentMarkdown || memo?.contentText || "没有正文内容";- const searchMatches = useMemo(() => getTextSearchMatches(detailText, searchQuery), [detailText, searchQuery]);- const searchMatchLabel = searchQuery.trim() ? `${searchMatches.length > 0 ? activeMatchIndex + 1 : 0}/${searchMatches.length}` : "0/0";-- useEffect(() => {- setActiveMatchIndex(0);- }, [detailText, searchQuery]);-- const moveSearchMatch = (direction: 1 | -1) => {- if (searchMatches.length === 0) {- return;- }-- setActiveMatchIndex((current) => (current + direction + searchMatches.length) % searchMatches.length);- };-- return (- <Modal animationType="slide" onRequestClose={onClose} presentationStyle="pageSheet" visible={visible}>- <SafeAreaView style={styles.modalSafeArea}>- <View style={styles.modalHeader}>- <IconButton onPress={onClose}>- <X color="#0f172a" size={20} />- </IconButton>- <Text numberOfLines={1} style={styles.modalTitle}>- {memo?.title?.trim() || DEFAULT_MEMO_TITLE}- </Text>- <View style={styles.modalHeaderActions}>- <IconButton disabled={!onOpenPreviousMemo} onPress={() => onOpenPreviousMemo?.()}>- <ChevronLeft color={onOpenPreviousMemo ? "#0f172a" : "#cbd5e1"} size={18} />- </IconButton>- <IconButton disabled={!onOpenNextMemo} onPress={() => onOpenNextMemo?.()}>- <ChevronRight color={onOpenNextMemo ? "#0f172a" : "#cbd5e1"} size={18} />- </IconButton>- </View>- </View>-- {isLoading ? (- <View style={styles.centerState}>- <ActivityIndicator color="#0f172a" />- </View>- ) : memo ? (- <ScrollView contentContainerStyle={styles.detailContent}>- <Text style={styles.detailTitle}>{memo.title?.trim() || DEFAULT_MEMO_TITLE}</Text>- <View style={styles.memoMeta}>- <Text style={styles.memoDate}>{formatDate(memo.updatedAt, localePreference)}</Text>- <Text style={styles.memoDate}>修订 {memo.revision}</Text>- </View>- <View style={styles.actionRow}>- {memo.isDeleted ? (- <>- <ActionButton label="查找" onPress={() => setSearchOpen((open) => !open)}>- <Search color="#0f172a" size={16} />- </ActionButton>- <ActionButton label="历史" onPress={() => onOpenRevisions(memo)}>- <History color="#0f172a" size={16} />- </ActionButton>- <ActionButton label="资源" onPress={onOpenResources}>- <Archive color="#0f172a" size={16} />- </ActionButton>- <ActionButton disabled={isRestoring} label={isRestoring ? "恢复中" : "恢复"} onPress={() => onRestore(memo)}>- <RotateCcw color="#0f172a" size={16} />- </ActionButton>- </>- ) : (- <>- <ActionButton disabled={isSaving} label={memo.isPinned ? "取消置顶" : "置顶"} onPress={() => onTogglePin(memo)}>- <Pin color="#0f172a" size={16} />- </ActionButton>- <ActionButton label="编辑" onPress={() => onEdit(memo)}>- <Pencil color="#0f172a" size={16} />- </ActionButton>- <ActionButton label="富文本" onPress={() => onRichEdit(memo)}>- <Bold color="#0f172a" size={16} />- </ActionButton>- <ActionButton label="查找" onPress={() => setSearchOpen((open) => !open)}>- <Search color="#0f172a" size={16} />- </ActionButton>- <ActionButton label="历史" onPress={() => onOpenRevisions(memo)}>- <History color="#0f172a" size={16} />- </ActionButton>- <ActionButton label="资源" onPress={onOpenResources}>- <Archive color="#0f172a" size={16} />- </ActionButton>- </>- )}- <ActionButton danger disabled={isDeleting} label={isDeleting ? "删除中" : memo.isDeleted ? "永久删除" : "删除"} onPress={() => onDelete(memo)}>- <Trash2 color="#b91c1c" size={16} />- </ActionButton>- </View>- {searchOpen ? (- <View style={styles.noteSearchPanel}>- <View style={styles.searchBox}>- <Search color="#64748b" size={18} />- <TextInput- autoCapitalize="none"- autoCorrect={false}- onChangeText={setSearchQuery}- placeholder="搜索当前笔记"- placeholderTextColor="#94a3b8"- style={styles.searchInput}- value={searchQuery}- />- <Text style={[styles.noteSearchCount, searchQuery.trim() && searchMatches.length === 0 && styles.noteSearchCountEmpty]}>{searchMatchLabel}</Text>- </View>- <View style={styles.tokenActionRow}>- <ActionButton disabled={searchMatches.length === 0} label="上一条" onPress={() => moveSearchMatch(-1)}>- <Search color={searchMatches.length === 0 ? "#cbd5e1" : "#0f172a"} size={16} />- </ActionButton>- <ActionButton disabled={searchMatches.length === 0} label="下一条" onPress={() => moveSearchMatch(1)}>- <Search color={searchMatches.length === 0 ? "#cbd5e1" : "#0f172a"} size={16} />- </ActionButton>- </View>- </View>- ) : null}- {memo.tags.length ? (- <View style={styles.tagList}>- {memo.tags.map((tag) => (- <Text key={tag} style={styles.tag}>- #{tag}- </Text>- ))}- </View>- ) : null}- <HighlightedDetailText activeIndex={activeMatchIndex} matches={searchMatches} text={detailText} />- </ScrollView>- ) : (- <View style={styles.centerState}>- <Text style={styles.errorText}>笔记加载失败</Text>- </View>- )}- </SafeAreaView>- </Modal>- );-};--const HighlightedDetailText = ({- activeIndex,- matches,- text,-}: {- activeIndex: number;- matches: Array<{ end: number; start: number }>;- text: string;-}) => {- if (matches.length === 0) {- return <Text style={styles.detailMarkdown}>{text}</Text>;- }-- const segments: ReactNode[] = [];- let cursor = 0;-- matches.forEach((match, index) => {- if (match.start > cursor) {- segments.push(text.slice(cursor, match.start));- }-- segments.push(- <Text key={`${match.start}-${match.end}`} style={index === activeIndex ? styles.noteSearchHighlightActive : styles.noteSearchHighlight}>- {text.slice(match.start, match.end)}- </Text>- );- cursor = match.end;- });-- if (cursor < text.length) {- segments.push(text.slice(cursor));- }-- return <Text style={styles.detailMarkdown}>{segments}</Text>;-};--const RichEditorModal = ({- baseUrl,- memo,- notebooks,- onClose,- token,-}: {- baseUrl: string;- memo: MemoDetail | null;- notebooks: Notebook[];- onClose: () => void;- token: string;-}) => {- const [loading, setLoading] = useState(true);- const [error, setError] = useState(false);- const editorUrl = memo && baseUrl ? buildRichEditorUrl(baseUrl, memo.id) : "";- const injectedJavaScriptBeforeContentLoaded = buildRichEditorAuthScript(token);- const notebookLabel = memo ? notebooks.find((notebook) => notebook.id === memo.notebookId)?.name ?? "未分类" : "笔记本";- const saveLabel = error ? "加载失败" : loading ? "加载中" : "编辑中";-- useEffect(() => {- if (memo) {- setLoading(true);- setError(false);- }- }, [memo]);-- return (- <Modal animationType="slide" onRequestClose={onClose} presentationStyle="fullScreen" visible={Boolean(memo)}>- <SafeAreaView style={styles.richEditorSafeArea}>- <View style={styles.modalHeader}>- <IconButton onPress={onClose}>- <X color="#0f172a" size={20} />- </IconButton>- <Text numberOfLines={1} style={styles.modalTitle}>- 富文本编辑器- </Text>- <IconButton onPress={() => editorUrl && Linking.openURL(editorUrl)}>- <ExternalLink color="#0f172a" size={18} />- </IconButton>- </View>-- {editorUrl ? (- <View style={styles.richEditorContainer}>- <View style={styles.richEditorMeta}>- <View style={styles.richEditorTitleBlock}>- <Text numberOfLines={1} style={styles.richEditorTitle}>- {memo?.title?.trim() || DEFAULT_MEMO_TITLE}- </Text>- <Text numberOfLines={1} style={styles.richEditorNotebook}>- {notebookLabel} · 修订 {memo?.revision ?? "-"}- </Text>- </View>- <Text style={[styles.richEditorStatus, error ? styles.richEditorStatusError : loading ? styles.richEditorStatusLoading : styles.richEditorStatusActive]}>{saveLabel}</Text>- </View>- {memo?.tags.length ? (- <ScrollView contentContainerStyle={styles.richEditorTagsContent} horizontal showsHorizontalScrollIndicator={false} style={styles.richEditorTags}>- {memo.tags.map((tag) => (- <Text key={tag} style={styles.tag}>- #{tag}- </Text>- ))}- </ScrollView>- ) : null}- <View style={styles.richEditorFrame}>- {loading ? (- <View style={styles.richEditorLoading}>- <ActivityIndicator color="#0f172a" />- <Text style={styles.mutedText}>正在加载 TipTap 编辑器</Text>- </View>- ) : null}- {error ? (- <View style={styles.centerState}>- <Text style={styles.errorText}>富文本编辑器加载失败</Text>- <Text style={styles.mutedText}>请确认实例已部署最新版 Web/PWA 资源。</Text>- </View>- ) : (- <WebView- allowsBackForwardNavigationGestures- injectedJavaScriptBeforeContentLoaded={injectedJavaScriptBeforeContentLoaded}- onError={() => {- setLoading(false);- setError(true);- }}- onLoadEnd={() => setLoading(false)}- onNavigationStateChange={(state) => {- if (state.url && !state.url.includes("/mobile-edit.html") && !state.url.startsWith("about:")) {- onClose();- }- }}- originWhitelist={["http://*", "https://*"]}- source={{ uri: editorUrl }}- style={styles.richEditorWebView}- />- )}- </View>- </View>- ) : (- <View style={styles.centerState}>- <Text style={styles.errorText}>缺少实例地址,无法打开富文本编辑器</Text>- </View>- )}- </SafeAreaView>- </Modal>- );-};--const EditMemoModal = ({- imageCompressionEnabled,- memo,- notebooks,- onClose,- onQueued,- onSaved,- updateMutation,-}: {- imageCompressionEnabled: boolean;- memo: MemoDetail | null;- notebooks: Notebook[];- onClose: () => void;- onQueued: () => void | Promise<void>;- onSaved: (memo: MemoDetail) => void;- updateMutation: UseMutationResult<- MemoDetail,- Error,- {- memo: MemoDetail;- payload: {- title?: string;- contentMarkdown?: string;- isPinned?: boolean;- notebookId?: string;- tags?: string[];- };- }- >;-}) => {- const { client } = useSession();- const [title, setTitle] = useState("");- const [contentMarkdown, setContentMarkdown] = useState("");- const [contentSelection, setContentSelection] = useState<TextSelection>({ start: 0, end: 0 });- const [notebookId, setNotebookId] = useState("");- const [tagsText, setTagsText] = useState("");- const [replaceQuery, setReplaceQuery] = useState("");- const [replaceValue, setReplaceValue] = useState("");- const [draftLoaded, setDraftLoaded] = useState(false);- const [loadedDraftUpdatedAt, setLoadedDraftUpdatedAt] = useState<string | null>(null);- const [insertTextOpen, setInsertTextOpen] = useState(false);- const [uploadProgress, setUploadProgress] = useState("");- const localePreference = useMobileLocalePreference();- const replaceMatches = useMemo(() => getTextSearchMatches(contentMarkdown, replaceQuery), [contentMarkdown, replaceQuery]);- const hasEditChanges = Boolean(- memo &&- (title !== (memo.title?.trim() || "") ||- contentMarkdown !== (memo.contentMarkdown || "") ||- notebookId !== memo.notebookId ||- tagsText !== memo.tags.join(", "))- );- const canSaveEditMemo = Boolean(memo && notebookId && hasEditChanges && !updateMutation.isPending);-- useEffect(() => {- let mounted = true;-- if (memo) {- setDraftLoaded(false);- setTitle(memo.title?.trim() || "");- setContentMarkdown(memo.contentMarkdown || "");- setContentSelection({ start: 0, end: 0 });- setNotebookId(memo.notebookId);- setTagsText(memo.tags.join(", "));- setReplaceQuery("");- setReplaceValue("");- setUploadProgress("");- setLoadedDraftUpdatedAt(null);- readMobileMemoDraft(memo.id).then((draft) => {- if (!mounted) {- return;- }-- if (draft && Date.parse(draft.updatedAt) >= Date.parse(memo.updatedAt)) {- setTitle(draft.title);- setContentMarkdown(draft.contentMarkdown);- setNotebookId(draft.notebookId);- setTagsText(draft.tagsText);- setLoadedDraftUpdatedAt(draft.updatedAt);- }-- setDraftLoaded(true);- });- } else {- setDraftLoaded(false);- setUploadProgress("");- setLoadedDraftUpdatedAt(null);- }-- return () => {- mounted = false;- };- }, [memo]);-- useEffect(() => {- if (!memo || !draftLoaded) {- return;- }-- const hasDraftChanges =- title !== (memo.title?.trim() || "") ||- contentMarkdown !== (memo.contentMarkdown || "") ||- notebookId !== memo.notebookId ||- tagsText !== memo.tags.join(", ");-- if (!hasDraftChanges) {- return;- }-- const timeout = setTimeout(() => {- void writeMobileMemoDraft({- memoId: memo.id,- expectedRevision: memo.revision,- title,- contentMarkdown,- notebookId,- tagsText,- updatedAt: new Date().toISOString(),- });- }, 350);-- return () => clearTimeout(timeout);- }, [contentMarkdown, draftLoaded, memo, notebookId, tagsText, title]);-- const uploadResourceMutation = useMutation({- mutationFn: async () => {- if (!client || !memo) {- throw new Error("请先打开一条可用笔记");- }-- if (memo.isDeleted) {- throw new Error("回收站中的笔记不能上传资源");- }-- const result = await DocumentPicker.getDocumentAsync({- copyToCacheDirectory: true,- multiple: true,- type: "*/*",- });-- if (result.canceled) {- return null;- }-- const assets = result.assets.filter((asset) => asset.uri);-- if (assets.length === 0) {- throw new Error("没有选择文件");- }-- const uploadedResources = [];-- for (const [index, asset] of assets.entries()) {- const filename = asset.name || "文件";- setUploadProgress(`处理 ${index + 1}/${assets.length}:${filename}`);- const form = new FormData();- const uploadAsset = await prepareUploadAsset(asset, imageCompressionEnabled);- form.append("file", uploadAsset as unknown as Blob);-- setUploadProgress(`上传 ${index + 1}/${assets.length}:${uploadAsset.name || filename}`);- const { resource } = await client.uploadMemoResource(memo.id, form);- uploadedResources.push({- filename: resource.filename || uploadAsset.name || asset.name || "upload",- kind: resource.kind,- url: resource.url,- });- }-- setUploadProgress("插入正文");- return uploadedResources;- },- onSuccess: (resources) => {- if (!resources || resources.length === 0) {- setUploadProgress("");- return;- }-- const next = resources.reduce(- (draft, resource) => insertResourceMarkdown(draft.value, draft.selection, resource),- { value: contentMarkdown, selection: contentSelection }- );- setContentMarkdown(next.value);- setContentSelection(next.selection);- setUploadProgress(`已插入 ${resources.length} 个资源`);- },- onError: () => {- setUploadProgress("");- },- });-- const handleSave = () => {- if (!memo || updateMutation.isPending || !notebookId) {- return;- }-- updateMutation.mutate(- {- memo,- payload: {- title: title.trim() || DEFAULT_MEMO_TITLE,- contentMarkdown,- notebookId,- tags: parseTags(tagsText),- },- },- {- onSuccess: async (savedMemo) => {- await clearMobileMemoDraft(savedMemo.id);- setLoadedDraftUpdatedAt(null);- onSaved(savedMemo);- },- onError: async (error) => {- if (!shouldQueueMobileMemoSaveError(error)) {- return;- }-- await queueMobileMemoUpdate({- memoId: memo.id,- expectedRevision: memo.revision,- expectedContentHash: memo.contentHash,- title: title.trim() || DEFAULT_MEMO_TITLE,- contentMarkdown,- notebookId,- tags: parseTags(tagsText),- });- await clearMobileMemoDraft(memo.id);- await onQueued();- updateMutation.reset();- Alert.alert("已保存到本地队列", "网络恢复后可在设置页手动同步。");- },- }- );- };-- const requestClose = () => {- if (updateMutation.isPending || uploadResourceMutation.isPending) {- return;- }-- if (!hasEditChanges) {- onClose();- return;- }-- const buttons: Array<{- onPress?: () => void;- style?: "cancel" | "default" | "destructive";- text: string;- }> = [- { text: "继续编辑", style: "cancel" },- { text: "放弃修改", style: "destructive", onPress: onClose },- ];-- if (canSaveEditMemo) {- buttons.push({ text: "保存", onPress: handleSave });- }-- Alert.alert("保存更改?", "当前笔记有未保存修改。", buttons);- };-- const replaceAllMatches = () => {- if (replaceMatches.length === 0) {- return;- }-- const nextMarkdown = replaceTextMatches(contentMarkdown, replaceMatches, replaceValue);- setContentMarkdown(nextMarkdown);- setContentSelection({ start: 0, end: 0 });- };-- const pasteClipboardText = async () => {- const text = await Clipboard.getStringAsync();-- if (!text.trim()) {- return;- }-- const next = insertPlainText(contentMarkdown, contentSelection, text);- setContentMarkdown(next.value);- setContentSelection(next.selection);- };-- const insertManualText = (text: string) => {- const next = insertPlainText(contentMarkdown, contentSelection, text);- setContentMarkdown(next.value);- setContentSelection(next.selection);- };-- return (- <Modal animationType="slide" onRequestClose={requestClose} presentationStyle="pageSheet" visible={Boolean(memo)}>- <SafeAreaView style={styles.modalSafeArea}>- <View style={styles.modalHeader}>- <IconButton disabled={updateMutation.isPending || uploadResourceMutation.isPending} onPress={requestClose}>- <X color={updateMutation.isPending || uploadResourceMutation.isPending ? "#cbd5e1" : "#0f172a"} size={20} />- </IconButton>- <Text style={styles.modalTitle}>编辑笔记</Text>- <IconButton disabled={!canSaveEditMemo} onPress={handleSave}>- {updateMutation.isPending ? <ActivityIndicator color="#0f172a" /> : <Check color={canSaveEditMemo ? "#0f172a" : "#cbd5e1"} size={20} />}- </IconButton>- </View>-- <ScrollView contentContainerStyle={styles.editorForm}>- {loadedDraftUpdatedAt ? (- <View style={styles.warningPanel}>- <Text style={styles.warningText}>已加载本地草稿,最后保存于 {formatDate(loadedDraftUpdatedAt, localePreference)}。保存后会同步到服务端。</Text>- </View>- ) : null}-- <Text style={styles.label}>笔记本</Text>- <NotebookPicker notebooks={notebooks} onChange={setNotebookId} selectedNotebookId={notebookId} />-- <Text style={styles.label}>标题</Text>- <TextInput onChangeText={setTitle} placeholder={DEFAULT_MEMO_TITLE} placeholderTextColor="#94a3b8" style={styles.titleInput} value={title} />-- <Text style={styles.label}>标签</Text>- <TextInput onChangeText={setTagsText} placeholder="用逗号分隔标签" placeholderTextColor="#94a3b8" style={styles.titleInput} value={tagsText} />-- <Text style={styles.label}>正文</Text>- <MarkdownToolbar- isUploading={uploadResourceMutation.isPending}- onAction={(action) => {- const next = applyMarkdownAction(contentMarkdown, contentSelection, action);- setContentMarkdown(next.value);- setContentSelection(next.selection);- }}- onInsertText={() => setInsertTextOpen(true)}- onPasteText={() => void pasteClipboardText()}- onUploadResource={() => uploadResourceMutation.mutate()}- />- {uploadProgress ? <Text style={styles.assetsHint}>{uploadProgress}</Text> : null}- <View style={styles.noteSearchPanel}>- <View style={styles.searchBox}>- <Search color="#64748b" size={18} />- <TextInput- autoCapitalize="none"- autoCorrect={false}- onChangeText={setReplaceQuery}- placeholder="查找正文"- placeholderTextColor="#94a3b8"- style={styles.searchInput}- value={replaceQuery}- />- <Text style={[styles.noteSearchCount, replaceQuery.trim() && replaceMatches.length === 0 && styles.noteSearchCountEmpty]}>{replaceQuery.trim() ? replaceMatches.length : 0}</Text>- </View>- <View style={styles.searchBox}>- <RefreshCw color="#64748b" size={18} />- <TextInput- autoCapitalize="none"- autoCorrect={false}- onChangeText={setReplaceValue}- placeholder="替换为"- placeholderTextColor="#94a3b8"- style={styles.searchInput}- value={replaceValue}- />- </View>- <ActionButton disabled={replaceMatches.length === 0} label="全部替换" onPress={replaceAllMatches}>- <RefreshCw color={replaceMatches.length === 0 ? "#cbd5e1" : "#0f172a"} size={16} />- </ActionButton>- </View>- <TextInput- multiline- onChangeText={setContentMarkdown}- onSelectionChange={(event) => setContentSelection(event.nativeEvent.selection)}- placeholder="Markdown 正文"- placeholderTextColor="#94a3b8"- selection={contentSelection}- style={styles.markdownInput}- textAlignVertical="top"- value={contentMarkdown}- />-- {updateMutation.error ? (- <Text style={styles.errorText}>{updateMutation.error instanceof Error ? updateMutation.error.message : "保存失败"}</Text>- ) : null}- {uploadResourceMutation.error ? (- <Text style={styles.errorText}>{uploadResourceMutation.error instanceof Error ? uploadResourceMutation.error.message : "上传失败"}</Text>- ) : null}- </ScrollView>- <InsertTextModal onClose={() => setInsertTextOpen(false)} onInsert={insertManualText} visible={insertTextOpen} />- </SafeAreaView>- </Modal>- );-};--const MemoList = ({- emptyAction,- emptyDescription,- emptyTitle,- error,- isError,- isLoading,- isRefreshing,- listDensity,- memos,- onMemoLongPress,- onMemoPress,- onRefresh,- selectionMode = false,- selectedMemoIds = new Set(),-}: {- emptyAction?: { label: string; onPress: () => void };- emptyDescription: string;- emptyTitle: string;- error?: unknown;- isError: boolean;- isLoading: boolean;- isRefreshing: boolean;- listDensity: MobileMemoListDensity;- memos: MemoSummary[];- onMemoLongPress?: (memo: MemoSummary) => void;- onMemoPress: (memoId: string) => void;- onRefresh: () => void;- selectionMode?: boolean;- selectedMemoIds?: Set<string>;-}) => {- if (isLoading) {- return (- <View style={styles.centerState}>- <ActivityIndicator color="#0f172a" />- </View>- );- }-- if (isError) {- return (- <View style={styles.centerState}>- <Text style={styles.errorText}>加载失败</Text>- <Text style={styles.mutedText}>{error instanceof Error ? error.message : "请稍后再试"}</Text>- </View>- );- }-- return (- <FlatList- contentContainerStyle={memos.length === 0 ? styles.emptyList : styles.list}- data={memos}- keyExtractor={(memo) => memo.id}- refreshControl={<RefreshControl onRefresh={onRefresh} refreshing={isRefreshing} tintColor="#0f172a" />}- renderItem={({ item }) => (- <MemoCard- memo={item}- listDensity={listDensity}- onLongPress={onMemoLongPress ? () => onMemoLongPress(item) : undefined}- onPress={() => onMemoPress(item.id)}- selected={selectedMemoIds.has(item.id)}- selectionMode={selectionMode}- />- )}- ListEmptyComponent={- <View style={styles.centerState}>- <BookOpen color="#94a3b8" size={32} />- <Text style={styles.emptyTitle}>{emptyTitle}</Text>- <Text style={styles.mutedText}>{emptyDescription}</Text>- {emptyAction ? (- <Pressable accessibilityRole="button" onPress={emptyAction.onPress} style={styles.emptyActionButton}>- <Plus color="#ffffff" size={18} />- <Text style={styles.emptyActionButtonText}>{emptyAction.label}</Text>- </Pressable>- ) : null}- </View>- }- />- );-};--const MoveSelectionModal = ({- isMoving,- notebooks,- onClose,- onMove,- selectedCount,- visible,-}: {- isMoving: boolean;- notebooks: Notebook[];- onClose: () => void;- onMove: (notebookId: string) => void;- selectedCount: number;- visible: boolean;-}) => {- const [targetNotebookId, setTargetNotebookId] = useState("");- const [searchText, setSearchText] = useState("");- const notebookOptions = flattenNotebooks(notebooks);-- useEffect(() => {- if (visible) {- setTargetNotebookId(notebooks[0]?.id ?? "");- setSearchText("");- }- }, [notebooks, visible]);-- return (- <Modal animationType="slide" onRequestClose={onClose} presentationStyle="pageSheet" visible={visible}>- <SafeAreaView style={styles.modalSafeArea}>- <View style={styles.modalHeader}>- <IconButton onPress={onClose}>- <X color="#0f172a" size={20} />- </IconButton>- <Text style={styles.modalTitle}>移动笔记</Text>- <IconButton onPress={() => targetNotebookId && onMove(targetNotebookId)}>- {isMoving ? <ActivityIndicator color="#0f172a" /> : <Check color="#0f172a" size={20} />}- </IconButton>- </View>-- <ScrollView contentContainerStyle={styles.editorForm}>- <Text style={styles.sectionSubtitle}>已选择 {selectedCount} 条笔记</Text>- <View style={styles.searchBox}>- <Search color="#64748b" size={18} />- <TextInput- autoCapitalize="none"- autoCorrect={false}- onChangeText={setSearchText}- placeholder="搜索笔记本"- placeholderTextColor="#94a3b8"- style={styles.searchInput}- value={searchText}- />- {searchText ? (- <Pressable onPress={() => setSearchText("")}>- <X color="#64748b" size={18} />- </Pressable>- ) : null}- </View>- <Text style={styles.label}>目标笔记本</Text>- <NotebookTreeOptionRows- emptyIconSize={28}- notebooks={notebooks}- onSelect={setTargetNotebookId}- options={notebookOptions}- searchText={searchText}- selectedNotebookId={targetNotebookId}- />- </ScrollView>- </SafeAreaView>- </Modal>- );-};--const SelectionActionBar = ({- canMerge,- canMove,- isBusy,- isTrashView,- onClear,- onDelete,- onMerge,- onMove,- onPin,- onToggleVisibleSelection,- pinLabel,- selectionToggleDisabled,- selectionToggleLabel,- selectedCount,-}: {- canMerge: boolean;- canMove: boolean;- isBusy: boolean;- isTrashView: boolean;- onClear: () => void;- onDelete: () => void;- onMerge: () => void;- onMove: () => void;- onPin: () => void;- onToggleVisibleSelection: () => void;- pinLabel: string;- selectionToggleDisabled: boolean;- selectionToggleLabel: string;- selectedCount: number;-}) => (- <View style={styles.selectionBar}>- <View style={styles.selectionBarHeader}>- <Text style={styles.selectionCount}>已选 {selectedCount} 条</Text>- <View style={styles.selectionHeaderActions}>- <Pressable disabled={selectionToggleDisabled} onPress={onToggleVisibleSelection}>- <Text style={[styles.selectionClear, selectionToggleDisabled && styles.selectionClearDisabled]}>{selectionToggleLabel}</Text>- </Pressable>- <Pressable onPress={onClear}>- <Text style={styles.selectionClear}>取消</Text>- </Pressable>- </View>- </View>- <View style={styles.selectionActions}>- <SelectionAction disabled={isBusy || !canMove} icon={<Folder color={canMove ? "#0f172a" : "#cbd5e1"} size={18} />} label="移动" onPress={onMove} />- <SelectionAction disabled={isBusy || isTrashView || selectedCount === 0} icon={<Pin color={isTrashView || selectedCount === 0 ? "#cbd5e1" : "#0f172a"} size={18} />} label={pinLabel} onPress={onPin} />- <SelectionAction disabled={isBusy || !canMerge} icon={<Merge color={canMerge ? "#0f172a" : "#cbd5e1"} size={18} />} label="合并" onPress={onMerge} />- <SelectionAction danger disabled={isBusy || selectedCount === 0} icon={<Trash2 color={selectedCount === 0 ? "#cbd5e1" : "#b91c1c"} size={18} />} label={isTrashView ? "永久删除" : "删除"} onPress={onDelete} />- </View>- </View>-);--const SelectionAction = ({- danger = false,- disabled = false,- icon,- label,- onPress,-}: {- danger?: boolean;- disabled?: boolean;- icon: ReactNode;- label: string;- onPress: () => void;-}) => (- <Pressable disabled={disabled} onPress={onPress} style={[styles.selectionAction, disabled && styles.buttonDisabled]}>- {icon}- <Text style={[styles.selectionActionText, danger && styles.selectionActionTextDanger]}>{label}</Text>- </Pressable>-);--const NotebookParentSelector = ({- currentParentId,- onChange,- options,-}: {- currentParentId: string | null;- onChange: (parentId: string | null) => void;- options: NotebookOption[];-}) => (- <ScrollView horizontal showsHorizontalScrollIndicator={false} style={styles.parentSelectList}>- <OptionPill active={currentParentId === null} label="顶层" onPress={() => onChange(null)} />- {options.map(({ depth, notebook }) => (- <OptionPill- active={currentParentId === notebook.id}- key={notebook.id}- label={`${" ".repeat(depth)}${depth > 0 ? "└ " : ""}${notebook.name}`}- onPress={() => onChange(notebook.id)}- />- ))}- </ScrollView>-);--const NotebookTreeOptionRows = ({- emptyIconSize,- notebooks,- onSelect,- options,- searchText,- selectedNotebookId,-}: {- emptyIconSize: number;- notebooks: Notebook[];- onSelect: (notebookId: string) => void;- options: NotebookOption[];- searchText: string;- selectedNotebookId: string;-}) => {- const [collapsedNotebookIds, setCollapsedNotebookIds] = useState<Set<string>>(() => new Set());- const searchQuery = searchText.trim();- const childNotebookIds = getNotebookParentIdSet(notebooks);- const visibleNotebookOptions = searchQuery- ? filterNotebookOptions(options, searchText)- : filterCollapsedNotebookOptions(options, collapsedNotebookIds);-- const toggleNotebookCollapsed = (notebookId: string) => {- setCollapsedNotebookIds((current) => {- const next = new Set(current);-- if (next.has(notebookId)) {- next.delete(notebookId);- } else {- next.add(notebookId);- }-- return next;- });- };-- if (visibleNotebookOptions.length === 0) {- return (- <View style={styles.emptyInlinePanel}>- <Folder color="#94a3b8" size={emptyIconSize} />- <Text style={styles.mutedText}>没有匹配的笔记本</Text>- </View>- );- }-- return (- <View style={styles.notebookTreeRows}>- {visibleNotebookOptions.map(({ depth, notebook }) => (- <View- key={notebook.id}- style={[styles.moveNotebookRow, selectedNotebookId === notebook.id && styles.moveNotebookRowActive, depth > 0 && { marginLeft: Math.min(depth * 14, 42) }]}- >- {childNotebookIds.has(notebook.id) && !searchQuery ? (- <Pressable accessibilityRole="button" onPress={() => toggleNotebookCollapsed(notebook.id)} style={styles.notebookTreeToggle}>- {collapsedNotebookIds.has(notebook.id) ? <ChevronRight color="#64748b" size={17} /> : <ChevronDown color="#64748b" size={17} />}- </Pressable>- ) : (- <View style={styles.notebookTreeTogglePlaceholder} />- )}- <Pressable onPress={() => onSelect(notebook.id)} style={styles.moveNotebookSelectArea}>- <Text numberOfLines={1} style={styles.panelValue}>- {depth > 0 ? `${"· ".repeat(depth)}${notebook.name}` : notebook.name}- </Text>- <Text style={styles.panelLabel}>{notebook.memoCount} 条笔记</Text>- </Pressable>- {selectedNotebookId === notebook.id ? <Check color="#0f172a" size={18} /> : null}- </View>- ))}- </View>- );-};--const NotebookPicker = ({- notebooks,- onChange,- selectedNotebookId,-}: {- notebooks: Notebook[];- onChange: (notebookId: string) => void;- selectedNotebookId: string;-}) => {- const [searchText, setSearchText] = useState("");- const notebookOptions = flattenNotebooks(notebooks);-- return (- <View style={styles.notebookPicker}>- <View style={styles.searchBox}>- <Search color="#64748b" size={18} />- <TextInput- autoCapitalize="none"- autoCorrect={false}- onChangeText={setSearchText}- placeholder="搜索笔记本"- placeholderTextColor="#94a3b8"- style={styles.searchInput}- value={searchText}- />- {searchText ? (- <Pressable onPress={() => setSearchText("")}>- <X color="#64748b" size={18} />- </Pressable>- ) : null}- </View>- <NotebookTreeOptionRows- emptyIconSize={24}- notebooks={notebooks}- onSelect={onChange}- options={notebookOptions}- searchText={searchText}- selectedNotebookId={selectedNotebookId}- />- </View>- );-};--const NotebookPill = ({- active,- collapsed,- hasChildren,- label,- memoCount,- onPress,- onToggleCollapse,-}: {- active: boolean;- collapsed?: boolean;- hasChildren?: boolean;- label: string;- memoCount: number;- onPress: () => void;- onToggleCollapse?: () => void;-}) => (- <Pressable onPress={onPress} style={[styles.notebookPill, active && styles.notebookPillActive]}>- {hasChildren ? (- <Pressable- accessibilityRole="button"- onPress={(event) => {- event.stopPropagation();- onToggleCollapse?.();- }}- style={styles.notebookPillToggle}- >- {collapsed ? <ChevronRight color={active ? "#ffffff" : "#64748b"} size={14} /> : <ChevronDown color={active ? "#ffffff" : "#64748b"} size={14} />}- </Pressable>- ) : null}- <Text numberOfLines={1} style={[styles.notebookPillText, active && styles.notebookPillTextActive]}>- {label}- </Text>- <Text style={[styles.notebookPillCount, active && styles.notebookPillTextActive]}>{memoCount}</Text>- </Pressable>-);--const OptionPill = ({ active, label, onPress }: { active: boolean; label: string; onPress: () => void }) => (- <Pressable onPress={onPress} style={[styles.optionPill, active && styles.optionPillActive]}>- <Text style={[styles.optionPillText, active && styles.optionPillTextActive]}>{label}</Text>- </Pressable>-);--const MemoCard = ({- listDensity,- memo,- onLongPress,- onPress,- selected = false,- selectionMode = false,-}: {- listDensity: MobileMemoListDensity;- memo: MemoSummary;- onLongPress?: () => void;- onPress: () => void;- selected?: boolean;- selectionMode?: boolean;-}) => {- const localePreference = useMobileLocalePreference();-- return (- <Pressable onLongPress={onLongPress} onPress={onPress} style={[styles.memoCard, listDensity === "compact" && styles.memoCardCompact, selected && styles.memoCardSelected]}>- <View style={styles.memoCardTop}>- {selectionMode ? (- <View style={[styles.selectionIndicator, selected && styles.selectionIndicatorActive]}>- {selected ? <Check color="#ffffff" size={14} /> : null}- </View>- ) : (- <FileText color="#64748b" size={18} />- )}- <Text numberOfLines={1} style={styles.memoTitle}>- {memo.title?.trim() || DEFAULT_MEMO_TITLE}- </Text>- {memo.isPinned ? <Text style={styles.pinText}>置顶</Text> : null}- </View>- {listDensity === "preview" ? (- <Text numberOfLines={2} style={styles.memoExcerpt}>- {memo.excerpt || "没有正文预览"}- </Text>- ) : null}- <View style={[styles.memoMeta, listDensity === "compact" && styles.memoMetaCompact]}>- <Text style={styles.memoDate}>{formatDate(memo.updatedAt, localePreference)}</Text>- {memo.tags.slice(0, 2).map((tag) => (- <Text key={tag} style={styles.tag}>- #{tag}- </Text>- ))}- </View>- </Pressable>- );-};--const PanelRow = ({ label, value }: { label: string; value: string }) => (- <View style={styles.panelRow}>- <Text style={styles.panelLabel}>{label}</Text>- <Text selectable style={styles.panelValue}>- {value}- </Text>- </View>-);--const SyncQueuePanel = ({- isSyncing,- message,- onOpen,- onSync,- summary,-}: {- isSyncing: boolean;- message: string;- onOpen: () => void;- onSync: () => void;- summary: MobileSyncQueueSummary;-}) => {- const hasQueuedChanges = summary.total > 0;- const value = getSyncQueueSummaryLabel(summary, isSyncing);-- return (- <View style={styles.panelRow}>- <Text style={styles.panelLabel}>离线同步</Text>- <Text style={styles.panelValue}>{value}</Text>- {message ? <Text style={styles.panelHint}>{message}</Text> : null}- <View style={styles.tokenActionRow}>- <Pressable disabled={isSyncing || !hasQueuedChanges} onPress={onSync} style={[styles.syncButton, (isSyncing || !hasQueuedChanges) && styles.buttonDisabled]}>- {isSyncing ? <ActivityIndicator color="#ffffff" /> : <RefreshCw color="#ffffff" size={16} />}- <Text style={styles.syncButtonText}>{isSyncing ? "同步中" : "立即同步"}</Text>- </Pressable>- <Pressable disabled={!hasQueuedChanges} onPress={onOpen} style={[styles.actionButton, !hasQueuedChanges && styles.buttonDisabled]}>- <List color="#0f172a" size={16} />- <Text style={styles.actionButtonText}>查看队列</Text>- </Pressable>- </View>- </View>- );-};--const IconButton = ({ children, disabled = false, onPress }: { children: ReactNode; disabled?: boolean; onPress: () => void }) => (- <Pressable accessibilityRole="button" disabled={disabled} onPress={onPress} style={[styles.iconButton, disabled && styles.buttonDisabled]}>- {children}- </Pressable>-);--const ActionButton = ({- children,- danger = false,- disabled = false,- label,- onPress,-}: {- children: ReactNode;- danger?: boolean;- disabled?: boolean;- label: string;- onPress: () => void;-}) => (- <Pressable disabled={disabled} onPress={onPress} style={[styles.actionButton, danger && styles.actionButtonDanger, disabled && styles.buttonDisabled]}>- {children}- <Text style={[styles.actionButtonText, danger && styles.actionButtonTextDanger]}>{label}</Text>- </Pressable>-);--const BottomNavItem = ({ active = false, icon, label, onPress }: { active?: boolean; icon: ReactNode; label: string; onPress: () => void }) => (- <Pressable onPress={onPress} style={styles.bottomNavItem}>- {icon}- <Text style={[styles.bottomNavText, active && styles.bottomNavTextActive]}>{label}</Text>- </Pressable>-);--const MarkdownToolbar = ({- isUploading = false,- onAction,- onInsertText,- onPasteText,- onUploadResource,-}: {- isUploading?: boolean;- onAction: (action: MarkdownAction) => void;- onInsertText?: () => void;- onPasteText?: () => void;- onUploadResource?: () => void;-}) => (- <ScrollView horizontal showsHorizontalScrollIndicator={false} style={styles.markdownToolbar}>- {onPasteText ? <MarkdownToolbarButton icon={<Copy color="#334155" size={15} />} label="粘贴" onPress={onPasteText} /> : null}- {onInsertText ? <MarkdownToolbarButton icon={<Pencil color="#334155" size={15} />} label="输入" onPress={onInsertText} /> : null}- {onUploadResource ? (- <MarkdownToolbarButton disabled={isUploading} icon={<ImagePlus color="#334155" size={15} />} label={isUploading ? "上传中" : "资源"} onPress={onUploadResource} />- ) : null}- <MarkdownToolbarButton icon={<Heading2 color="#334155" size={15} />} label="标题" onPress={() => onAction("heading")} />- <MarkdownToolbarButton icon={<Bold color="#334155" size={15} />} label="加粗" onPress={() => onAction("bold")} />- <MarkdownToolbarButton icon={<Italic color="#334155" size={15} />} label="斜体" onPress={() => onAction("italic")} />- <MarkdownToolbarButton icon={<List color="#334155" size={15} />} label="列表" onPress={() => onAction("bullet")} />- <MarkdownToolbarButton icon={<CheckSquare color="#334155" size={15} />} label="待办" onPress={() => onAction("checklist")} />- <MarkdownToolbarButton icon={<Quote color="#334155" size={15} />} label="引用" onPress={() => onAction("quote")} />- <MarkdownToolbarButton icon={<Minus color="#334155" size={15} />} label="分割线" onPress={() => onAction("horizontalRule")} />- <MarkdownToolbarButton icon={<Code color="#334155" size={15} />} label="代码" onPress={() => onAction("code")} />- <MarkdownToolbarButton icon={<Link color="#334155" size={15} />} label="链接" onPress={() => onAction("link")} />- </ScrollView>-);--const MarkdownToolbarButton = ({- disabled = false,- icon,- label,- onPress,-}: {- disabled?: boolean;- icon: ReactNode;- label: string;- onPress: () => void;-}) => (- <Pressable disabled={disabled} onPress={onPress} style={[styles.markdownToolButton, disabled && styles.buttonDisabled]}>- {icon}- <Text style={styles.markdownToolText}>{label}</Text>- </Pressable>-);--const InsertTextModal = ({- onClose,- onInsert,- visible,-}: {- onClose: () => void;- onInsert: (text: string) => void;- visible: boolean;-}) => {- const [text, setText] = useState("");-- useEffect(() => {- if (!visible) {- setText("");- }- }, [visible]);-- const handleInsert = () => {- if (!text.trim()) {- return;- }-- onInsert(text);- setText("");- onClose();- };-- return (- <Modal animationType="fade" onRequestClose={onClose} transparent visible={visible}>- <Pressable onPress={onClose} style={styles.actionSheetBackdrop}>- <Pressable style={styles.insertTextSheet}>- <View style={styles.actionSheetHandle} />- <Text style={styles.actionSheetTitle}>输入文本</Text>- <TextInput- autoFocus- multiline- onChangeText={setText}- placeholder="输入要插入到正文的内容"- placeholderTextColor="#94a3b8"- style={styles.insertTextInput}- textAlignVertical="top"- value={text}- />- <View style={styles.actionRow}>- <ActionButton label="取消" onPress={onClose}>- <X color="#0f172a" size={16} />- </ActionButton>- <ActionButton disabled={!text.trim()} label="插入" onPress={handleInsert}>- <Check color={text.trim() ? "#0f172a" : "#cbd5e1"} size={16} />- </ActionButton>- </View>- </Pressable>- </Pressable>- </Modal>- );-};--const parseTags = (value: string) =>- Array.from(- new Set(- value- .split(/[,,\n]/)- .map((tag) => tag.trim())- .filter(Boolean)- )- );--const applyMarkdownAction = (value: string, selection: TextSelection, action: MarkdownAction) => {- const start = Math.max(0, Math.min(selection.start, value.length));- const end = Math.max(start, Math.min(selection.end, value.length));- const selectedText = value.slice(start, end);-- if (action === "heading") {- return prefixSelectedLines(value, start, end, "## ");- }-- if (action === "bullet") {- return prefixSelectedLines(value, start, end, "- ");- }-- if (action === "checklist") {- return prefixSelectedLines(value, start, end, "- [ ] ");- }-- if (action === "quote") {- return prefixSelectedLines(value, start, end, "> ");- }-- if (action === "horizontalRule") {- const separator = value.slice(0, start).endsWith("\n") ? "" : "\n";- const trailing = value.slice(end).startsWith("\n") ? "" : "\n";- const replacement = `${separator}---${trailing}`;- const nextValue = replaceRange(value, start, end, replacement);- const nextPosition = start + replacement.length;-- return {- value: nextValue,- selection: { start: nextPosition, end: nextPosition },- };- }-- if (action === "bold") {- return wrapSelectedText(value, start, end, "**", "**", "加粗文本");- }-- if (action === "italic") {- return wrapSelectedText(value, start, end, "*", "*", "斜体文本");- }-- if (action === "link") {- return wrapSelectedText(value, start, end, "[", "](https://)", "链接文本");- }-- if (selectedText.includes("\n")) {- return wrapSelectedText(value, start, end, "\n```\n", "\n```\n", selectedText || "代码块");- }-- return wrapSelectedText(value, start, end, "`", "`", "代码");-};--const wrapSelectedText = (value: string, start: number, end: number, before: string, after: string, fallbackText: string) => {- const selectedText = value.slice(start, end) || fallbackText;- const replacement = `${before}${selectedText}${after}`;- const nextValue = replaceRange(value, start, end, replacement);- const selectedStart = start + before.length;- const selectedEnd = selectedStart + selectedText.length;-- return {- value: nextValue,- selection: { start: selectedStart, end: selectedEnd },- };-};--const prefixSelectedLines = (value: string, start: number, end: number, prefix: string) => {- const lineStart = value.lastIndexOf("\n", Math.max(0, start - 1)) + 1;- const nextLineBreak = value.indexOf("\n", end);- const lineEnd = nextLineBreak === -1 ? value.length : nextLineBreak;- const block = value.slice(lineStart, lineEnd) || "";- const replacement = block- .split("\n")- .map((line) => (line.startsWith(prefix) ? line : `${prefix}${line}`))- .join("\n");- const nextValue = replaceRange(value, lineStart, lineEnd, replacement);-- return {- value: nextValue,- selection: { start: lineStart, end: lineStart + replacement.length },- };-};--const insertResourceMarkdown = (- value: string,- selection: TextSelection,- resource: {- filename: string;- kind: "image" | "attachment";- url: string;- }-) => {- const start = Math.max(0, Math.min(selection.start, value.length));- const end = Math.max(start, Math.min(selection.end, value.length));- const markdown = appendResourceMarkdown("", resource).trim();- const separatorBefore = start > 0 && !value.slice(0, start).endsWith("\n") ? "\n\n" : "";- const separatorAfter = end < value.length && !value.slice(end).startsWith("\n") ? "\n\n" : "\n";- const replacement = `${separatorBefore}${markdown}${separatorAfter}`;- const nextValue = replaceRange(value, start, end, replacement);- const nextPosition = start + replacement.length;-- return {- value: nextValue,- selection: { start: nextPosition, end: nextPosition },- };-};--const insertPlainText = (value: string, selection: TextSelection, text: string) => {- const start = Math.max(0, Math.min(selection.start, value.length));- const end = Math.max(start, Math.min(selection.end, value.length));- const nextValue = replaceRange(value, start, end, text);- const nextPosition = start + text.length;-- return {- value: nextValue,- selection: { start: nextPosition, end: nextPosition },- };-};--const replaceRange = (value: string, start: number, end: number, replacement: string) => `${value.slice(0, start)}${replacement}${value.slice(end)}`;--const flattenNotebooks = (notebooks: Notebook[], sortMode: MobileNotebookSortMode = "manual") => {- const byParent = new Map<string | null, Notebook[]>();- const byId = new Set(notebooks.map((notebook) => notebook.id));- const result: NotebookOption[] = [];-- for (const notebook of notebooks) {- const parentId = notebook.parentId && byId.has(notebook.parentId) ? notebook.parentId : null;- const siblings = byParent.get(parentId) ?? [];- siblings.push(notebook);- byParent.set(parentId, siblings);- }-- for (const siblings of byParent.values()) {- siblings.sort(getNotebookComparator(sortMode));- }-- const walk = (parentId: string | null, depth: number) => {- for (const notebook of byParent.get(parentId) ?? []) {- result.push({ notebook, depth });- walk(notebook.id, depth + 1);- }- };-- walk(null, 0);- return result;-};--const getNotebookComparator = (sortMode: MobileNotebookSortMode) => {- if (sortMode === "name-asc") {- return compareNotebookNameAsc;- }-- if (sortMode === "memo-count-desc") {- return (left: Notebook, right: Notebook) => right.memoCount - left.memoCount || compareNotebookNameAsc(left, right);- }-- if (sortMode === "updated-desc") {- return (left: Notebook, right: Notebook) =>- Date.parse(right.lastMemoUpdatedAt || right.updatedAt) - Date.parse(left.lastMemoUpdatedAt || left.updatedAt) || compareNotebookNameAsc(left, right);- }-- return compareNotebooksManual;-};--const compareNotebooksManual = (left: Notebook, right: Notebook) =>- left.sortOrder - right.sortOrder || left.name.localeCompare(right.name, "zh-CN") || left.id.localeCompare(right.id);--const compareNotebookNameAsc = (left: Notebook, right: Notebook) => left.name.localeCompare(right.name, "zh-CN") || left.id.localeCompare(right.id);--const filterNotebookOptions = (options: NotebookOption[], searchText: string) => {- const query = searchText.trim().toLowerCase();-- if (!query) {- return options;- }-- return options.filter(({ notebook }) => notebook.name.toLowerCase().includes(query) || (notebook.slug || "").toLowerCase().includes(query));-};--const getNotebookParentIdSet = (notebooks: Notebook[]) => {- const notebookIds = new Set(notebooks.map((notebook) => notebook.id));- const parentIds = new Set<string>();-- for (const notebook of notebooks) {- if (notebook.parentId && notebookIds.has(notebook.parentId)) {- parentIds.add(notebook.parentId);- }- }-- return parentIds;-};--const filterCollapsedNotebookOptions = (options: NotebookOption[], collapsedNotebookIds: Set<string>) => {- if (collapsedNotebookIds.size === 0) {- return options;- }-- const visibleOptions: NotebookOption[] = [];- let hiddenDepth: number | null = null;-- for (const option of options) {- if (hiddenDepth !== null && option.depth > hiddenDepth) {- continue;- }-- hiddenDepth = null;- visibleOptions.push(option);-- if (collapsedNotebookIds.has(option.notebook.id)) {- hiddenDepth = option.depth;- }- }-- return visibleOptions;-};--const isNotebookDescendant = (notebooks: Notebook[], candidateNotebookId: string, ancestorNotebookId: string) => {- let current = notebooks.find((notebook) => notebook.id === candidateNotebookId) ?? null;-- while (current?.parentId) {- if (current.parentId === ancestorNotebookId) {- return true;- }-- current = notebooks.find((notebook) => notebook.id === current?.parentId) ?? null;- }-- return false;-};--const getResolvedMobileLocale = (localePreference: MobileLocaleMode) =>- localePreference === "system" ? Intl.DateTimeFormat().resolvedOptions().locale || "zh-CN" : localePreference;--const isEnglishMobileLocale = (localePreference: MobileLocaleMode) => getResolvedMobileLocale(localePreference).startsWith("en");--const getMobileMemoTemplates = (localePreference: MobileLocaleMode) =>- isEnglishMobileLocale(localePreference) ? MOBILE_MEMO_TEMPLATES_EN : MOBILE_MEMO_TEMPLATES_ZH;--const getMobileAdvancedPrompts = (localePreference: MobileLocaleMode) =>- isEnglishMobileLocale(localePreference) ? ADVANCED_PROMPTS_EN : ADVANCED_PROMPTS_ZH;--const getMobileSystemInfoText = (localePreference: MobileLocaleMode) =>- isEnglishMobileLocale(localePreference)- ? {- appIdentifier: "App identifier",- build: "Build",- description: "Use this to troubleshoot the app, instance connection, and multi-device environment.",- disconnected: "Disconnected",- followSystem: "Follow system",- installMode: "Mode",- instanceUrl: "Instance URL",- language: "Language",- memoCount: "Notes",- notSet: "Not set",- notebookCount: "Notebooks",- platform: "Platform",- platformVersion: "Platform version",- timeZone: "Time zone",- title: "System info",- unknown: "Unknown",- version: "Version",- }- : {- appIdentifier: "应用标识",- build: "构建",- description: "用于排查客户端、实例连接和多端环境问题。",- disconnected: "未连接",- followSystem: "跟随系统",- installMode: "安装形态",- instanceUrl: "实例地址",- language: "语言",- memoCount: "笔记总数",- notSet: "未设置",- notebookCount: "笔记本数量",- platform: "平台",- platformVersion: "平台版本",- timeZone: "时区",- title: "系统信息",- unknown: "未知",- version: "版本",- };--const formatDate = (value: string, localePreference: MobileLocaleMode = "system") =>- new Intl.DateTimeFormat(getResolvedMobileLocale(localePreference), {- month: "2-digit",- day: "2-digit",- hour: "2-digit",- minute: "2-digit",- }).format(new Date(value));--const formatBytes = (bytes: number) => {- if (!Number.isFinite(bytes) || bytes <= 0) {- return "0 B";- }-- const units = ["B", "KB", "MB", "GB", "TB"];- const exponent = Math.min(Math.floor(Math.log(bytes) / Math.log(1024)), units.length - 1);- const value = bytes / 1024 ** exponent;-- return `${exponent === 0 ? value.toFixed(0) : value.toFixed(value >= 10 ? 1 : 2)} ${units[exponent]}`;-};--const isDocumentResource = (resource: ResourceListItem) => DOCUMENT_MIME_TYPES.has(resource.mimeType || "") || resource.kind === "attachment";--const getResourceIcon = (resource: ResourceListItem) => {- const mime = (resource.mimeType || "").toLowerCase();- const extension = (resource.filename || "").split(".").pop()?.toLowerCase() || "";-- if (mime.startsWith("image/")) {- return <ImageIcon color="#10b981" size={28} />;- }-- if (mime.startsWith("audio/")) {- return <Music color="#0ea5e9" size={28} />;- }-- if (mime.startsWith("video/")) {- return <Video color="#e11d48" size={28} />;- }-- if (mime === "application/pdf" || extension === "pdf") {- return <FileText color="#dc2626" size={28} />;- }-- if (mime.includes("spreadsheet") || mime.includes("excel") || ["xls", "xlsx", "csv"].includes(extension)) {- return <FileSpreadsheet color="#16a34a" size={28} />;- }-- if (mime.includes("word") || mime.includes("officedocument.wordprocessingml") || ["doc", "docx"].includes(extension)) {- return <FileText color="#2563eb" size={28} />;- }-- if (mime.includes("zip") || mime.includes("tar") || mime.includes("rar") || mime.includes("gzip") || ["zip", "rar", "tar", "gz"].includes(extension)) {- return <FileArchive color="#f59e0b" size={28} />;- }-- return <FileText color="#64748b" size={28} />;-};--const openResource = (resource: ResourceListItem) => {- Linking.openURL(resource.url).catch(() => {- Alert.alert("无法打开资源", "系统没有可用应用打开此链接。");- });-};--const appendResourceMarkdown = (- currentMarkdown: string,- resource: {- filename: string;- kind: "image" | "attachment";- url: string;- }-) => {- const label = resource.filename.replace(/\]/g, "\\]");- const markdown = resource.kind === "image" ? `` : `附件:[${label}](${resource.url})`;- const trimmed = currentMarkdown.trimEnd();-- return trimmed ? `${trimmed}\n\n${markdown}\n` : `${markdown}\n`;-};--const prepareUploadAsset = async (- asset: DocumentPicker.DocumentPickerAsset,- imageCompressionEnabled: boolean-): Promise<{ uri: string; name: string; type: string }> => {- const mimeType = asset.mimeType || "application/octet-stream";- const filename = asset.name || "upload";-- if (!imageCompressionEnabled || !COMPRESSIBLE_IMAGE_TYPES.has(mimeType)) {- return {- uri: asset.uri,- name: filename,- type: mimeType,- };- }-- try {- const measured = await manipulateAsync(asset.uri, [], { compress: 1, format: SaveFormat.JPEG });- const maxEdge = Math.max(measured.width, measured.height);- const resizeAction = maxEdge > MAX_COMPRESSED_IMAGE_EDGE ? [{ resize: getCompressedImageSize(measured.width, measured.height) }] : [];- const compressed = await manipulateAsync(asset.uri, resizeAction, {- compress: IMAGE_COMPRESSION_QUALITY,- format: SaveFormat.WEBP,- });-- return {- uri: compressed.uri,- name: toCompressedImageFilename(filename),- type: "image/webp",- };- } catch {- return {- uri: asset.uri,- name: filename,- type: mimeType,- };- }-};--const getCompressedImageSize = (width: number, height: number) => {- if (width >= height) {- return { width: MAX_COMPRESSED_IMAGE_EDGE };- }-- return { height: MAX_COMPRESSED_IMAGE_EDGE };-};--const toCompressedImageFilename = (filename: string) => {- const trimmed = filename.trim();-- if (!trimmed) {- return "image.webp";- }-- return trimmed.replace(/\.[^.]+$/, "") + ".webp";-};--const getTokenScopeLabel = (scope: string) => {- const labels: Record<string, string> = {- "read:notebooks": "读取笔记本",- "write:notebooks": "写入笔记本",- "read:memos": "读取笔记",- "write:memos": "写入笔记",- "read:resources": "读取资源",- "write:resources": "写入资源",- "read:tags": "读取标签",- "write:tags": "写入标签",- };-- return labels[scope] ?? scope;-};--const getMobileLocalePreferenceLabel = (locale: MobileLocaleMode) =>- MOBILE_LOCALE_OPTIONS.find((option) => option.value === locale)?.label ?? "跟随系统";--const getTextSearchMatches = (text: string, query: string) => {- const normalizedQuery = query.trim().toLowerCase();-- if (!normalizedQuery) {- return [];- }-- const normalizedText = text.toLowerCase();- const matches: Array<{ end: number; start: number }> = [];- let cursor = 0;-- while (cursor < normalizedText.length) {- const start = normalizedText.indexOf(normalizedQuery, cursor);-- if (start === -1) {- break;- }-- const end = start + normalizedQuery.length;- matches.push({ end, start });- cursor = end;- }-- return matches;-};--const replaceTextMatches = (text: string, matches: Array<{ end: number; start: number }>, replacement: string) => {- let nextText = text;-- for (const match of [...matches].reverse()) {- nextText = `${nextText.slice(0, match.start)}${replacement}${nextText.slice(match.end)}`;- }-- return nextText;-};--const buildMcpRemoteConfig = (baseUrl: string, token: string) =>- JSON.stringify(- {- mcpServers: {- edgeever: {- url: `${baseUrl.replace(/\/+$/, "")}/mcp`,- headers: {- Authorization: `Bearer ${token}`,- },- },- },- },- null,- 2- );--type DiffRow = {- lineNumber: number;- text: string;- state: "same" | "changed" | "empty";-};--const buildRevisionDiffRows = (left: string, right: string) => {- const leftLines = left.split("\n");- const rightLines = right.split("\n");- const maxLines = Math.max(leftLines.length, rightLines.length, 1);- const leftRows: DiffRow[] = [];- const rightRows: DiffRow[] = [];- let changed = 0;-- for (let index = 0; index < maxLines; index += 1) {- const leftText = leftLines[index] ?? "";- const rightText = rightLines[index] ?? "";- const isChanged = leftText !== rightText;-- if (isChanged) {- changed += 1;- }-- leftRows.push({- lineNumber: index + 1,- text: leftText,- state: isChanged ? "changed" : leftText ? "same" : "empty",- });- rightRows.push({- lineNumber: index + 1,- text: rightText,- state: isChanged ? "changed" : rightText ? "same" : "empty",- });- }-- return { changed, leftRows, rightRows };-};--const formatRevisionActor = (actor: string) => {- if (actor.startsWith("user:")) {- return "user";- }-- if (actor.startsWith("agent:")) {- return "agent";- }-- return actor || "system";-};--const buildRichEditorUrl = (baseUrl: string, memoId: string) => {- const normalizedBaseUrl = baseUrl.replace(/\/+$/, "");- const params = new URLSearchParams({- memoId,- returnTo: "/",- });-- return `${normalizedBaseUrl}/mobile-edit.html#${params.toString()}`;-};--const buildRichEditorAuthScript = (token: string) => `-(() => {- const token = ${JSON.stringify(token)};- if (!token) {- return true;- }-- const applyAuthHeader = (headers) => {- const nextHeaders = new Headers(headers || {});- if (!nextHeaders.has("Authorization")) {- nextHeaders.set("Authorization", "Bearer " + token);- }- return nextHeaders;- };-- const shouldAuthorize = (input) => {- const url = typeof input === "string" ? input : input && "url" in input ? input.url : "";- if (!url) {- return true;- }- return url.startsWith("/api/") || url.includes("/api/");- };-- const originalFetch = window.fetch.bind(window);- window.fetch = (input, init = {}) => {- if (!shouldAuthorize(input)) {- return originalFetch(input, init);- }-- if (input instanceof Request) {- const headers = applyAuthHeader(init.headers || input.headers);- return originalFetch(new Request(input, { ...init, headers }));- }-- return originalFetch(input, { ...init, headers: applyAuthHeader(init.headers) });- };-- true;-})();-`;--const getSyncQueueStatusLabel = (status: MobileSyncQueueItem["status"]) => {- const labels: Record<MobileSyncQueueItem["status"], string> = {- pending: "待同步",- syncing: "同步中",- conflict: "冲突",- error: "失败",- };-- return labels[status];-};--const getSyncQueueSummaryLabel = (summary: MobileSyncQueueSummary, isSyncing: boolean) => {- if (isSyncing || summary.syncing > 0) {- return "同步中";- }-- if (summary.conflict > 0) {- return `${summary.conflict} 项同步冲突`;- }-- if (summary.error > 0) {- return `${summary.error} 项等待重试`;- }-- if (summary.pending > 0) {- return `${summary.pending} 项待同步`;- }-- return "已同步";-};--const getSyncQueueStatusStyle = (status: MobileSyncQueueItem["status"]) => {- if (status === "conflict" || status === "error") {- return styles.syncStatusDanger;- }-- if (status === "syncing") {- return styles.syncStatusActive;- }-- return styles.syncStatusPending;-};--const styles = StyleSheet.create({- safeArea: {- backgroundColor: "#f8fafc",- flex: 1,- },- viewBody: {- flex: 1,- paddingBottom: 64,- },- header: {- alignItems: "center",- flexDirection: "row",- justifyContent: "space-between",- paddingHorizontal: 18,- paddingTop: 6,- },- title: {- color: "#0f172a",- fontSize: 24,- fontWeight: "800",- },- instance: {- color: "#64748b",- fontSize: 12,- marginTop: 2,- maxWidth: 230,- },- headerActions: {- flexDirection: "row",- gap: 8,- },- iconButton: {- alignItems: "center",- backgroundColor: "#ffffff",- borderColor: "#e2e8f0",- borderRadius: 8,- borderWidth: 1,- height: 38,- justifyContent: "center",- width: 38,- },- iconButtonPlaceholder: {- height: 38,- width: 38,- },- modalHeaderActions: {- flexDirection: "row",- gap: 6,- },- tabs: {- paddingLeft: 18,- paddingTop: 18,- },- notebookPill: {- alignItems: "center",- backgroundColor: "#ffffff",- borderColor: "#e2e8f0",- borderRadius: 8,- borderWidth: 1,- flexDirection: "row",- gap: 8,- marginRight: 8,- maxWidth: 190,- minHeight: 38,- paddingHorizontal: 12,- },- notebookPillActive: {- backgroundColor: "#0f172a",- borderColor: "#0f172a",- },- notebookPillToggle: {- alignItems: "center",- height: 18,- justifyContent: "center",- marginLeft: -4,- width: 18,- },- notebookPillText: {- color: "#334155",- flexShrink: 1,- fontSize: 14,- fontWeight: "700",- },- notebookPillTextActive: {- color: "#ffffff",- },- notebookPillCount: {- color: "#64748b",- fontSize: 12,- fontWeight: "700",- },- contentHeader: {- alignItems: "center",- flexDirection: "row",- justifyContent: "space-between",- paddingHorizontal: 18,- paddingTop: 22,- paddingBottom: 10,- },- contentActions: {- alignItems: "center",- flexDirection: "row",- gap: 8,- },- searchHeader: {- gap: 12,- paddingHorizontal: 18,- paddingTop: 22,- paddingBottom: 10,- },- searchTitleRow: {- alignItems: "center",- flexDirection: "row",- justifyContent: "space-between",- },- searchBox: {- alignItems: "center",- backgroundColor: "#ffffff",- borderColor: "#e2e8f0",- borderRadius: 8,- borderWidth: 1,- flexDirection: "row",- gap: 10,- minHeight: 46,- paddingHorizontal: 12,- },- searchInput: {- color: "#0f172a",- flex: 1,- fontSize: 15,- minHeight: 44,- },- assetsToolbar: {- backgroundColor: "#ffffff",- borderBottomColor: "#e2e8f0",- borderBottomWidth: 1,- gap: 10,- padding: 14,- },- assetsSummary: {- alignItems: "center",- flexDirection: "row",- flexWrap: "wrap",- gap: 7,- },- assetsSummaryText: {- color: "#0f172a",- fontSize: 14,- fontWeight: "800",- },- assetsSummaryMeta: {- color: "#64748b",- fontSize: 12,- fontWeight: "700",- },- assetsHint: {- color: "#047857",- fontSize: 12,- fontWeight: "700",- lineHeight: 18,- },- layoutToggle: {- alignSelf: "flex-start",- backgroundColor: "#f8fafc",- borderColor: "#e2e8f0",- borderRadius: 8,- borderWidth: 1,- flexDirection: "row",- overflow: "hidden",- },- layoutToggleButton: {- alignItems: "center",- flexDirection: "row",- gap: 6,- minHeight: 36,- paddingHorizontal: 10,- },- layoutToggleButtonActive: {- backgroundColor: "#ecfdf5",- },- layoutToggleText: {- color: "#64748b",- fontSize: 12,- fontWeight: "800",- },- layoutToggleTextActive: {- color: "#047857",- },- uploadButton: {- alignItems: "center",- backgroundColor: "#047857",- borderRadius: 8,- flexDirection: "row",- gap: 8,- justifyContent: "center",- minHeight: 44,- paddingHorizontal: 14,- },- uploadButtonText: {- color: "#ffffff",- fontSize: 14,- fontWeight: "800",- },- sectionTitle: {- color: "#0f172a",- fontSize: 21,- fontWeight: "800",- },- sectionSubtitle: {- color: "#64748b",- fontSize: 12,- marginTop: 3,- },- primaryIconButton: {- alignItems: "center",- backgroundColor: "#0f172a",- borderRadius: 8,- height: 40,- justifyContent: "center",- width: 40,- },- secondaryIconButton: {- alignItems: "center",- backgroundColor: "#ffffff",- borderColor: "#e2e8f0",- borderRadius: 8,- borderWidth: 1,- height: 40,- justifyContent: "center",- width: 40,- },- dangerIconButton: {- alignItems: "center",- backgroundColor: "#fef2f2",- borderColor: "#fecaca",- borderRadius: 8,- borderWidth: 1,- height: 40,- justifyContent: "center",- width: 40,- },- listControls: {- gap: 8,- paddingBottom: 10,- paddingHorizontal: 18,- },- optionPill: {- alignItems: "center",- backgroundColor: "#ffffff",- borderColor: "#e2e8f0",- borderRadius: 8,- borderWidth: 1,- justifyContent: "center",- marginRight: 8,- minHeight: 34,- paddingHorizontal: 12,- },- optionPillActive: {- backgroundColor: "#e2e8f0",- borderColor: "#cbd5e1",- },- optionPillText: {- color: "#475569",- fontSize: 13,- fontWeight: "700",- },- optionPillTextActive: {- color: "#0f172a",- },- list: {- paddingBottom: 22,- paddingHorizontal: 18,- },- assetList: {- padding: 18,- paddingBottom: 48,- },- assetGrid: {- padding: 12,- paddingBottom: 48,- },- assetGridRow: {- gap: 10,- },- emptyList: {- flexGrow: 1,- paddingBottom: 22,- },- memoCard: {- backgroundColor: "#ffffff",- borderColor: "#e2e8f0",- borderRadius: 8,- borderWidth: 1,- marginBottom: 10,- padding: 14,- },- memoCardCompact: {- marginBottom: 8,- padding: 11,- },- memoCardSelected: {- backgroundColor: "#f8fafc",- borderColor: "#0f172a",- },- memoCardTop: {- alignItems: "center",- flexDirection: "row",- gap: 8,- },- selectionIndicator: {- alignItems: "center",- borderColor: "#cbd5e1",- borderRadius: 6,- borderWidth: 1,- height: 20,- justifyContent: "center",- width: 20,- },- selectionIndicatorActive: {- backgroundColor: "#0f172a",- borderColor: "#0f172a",- },- memoTitle: {- color: "#0f172a",- flex: 1,- fontSize: 16,- fontWeight: "800",- },- pinText: {- color: "#2563eb",- fontSize: 12,- fontWeight: "800",- },- memoExcerpt: {- color: "#475569",- fontSize: 14,- lineHeight: 20,- marginTop: 8,- },- memoMeta: {- alignItems: "center",- flexDirection: "row",- flexWrap: "wrap",- gap: 8,- marginTop: 12,- },- memoMetaCompact: {- marginTop: 8,- },- memoDate: {- color: "#94a3b8",- fontSize: 12,- fontWeight: "600",- },- tagList: {- flexDirection: "row",- flexWrap: "wrap",- gap: 8,- marginTop: 12,- },- tag: {- backgroundColor: "#f1f5f9",- borderRadius: 6,- color: "#475569",- fontSize: 12,- fontWeight: "700",- overflow: "hidden",- paddingHorizontal: 7,- paddingVertical: 3,- },- resourceCard: {- alignItems: "center",- backgroundColor: "#ffffff",- borderColor: "#e2e8f0",- borderRadius: 8,- borderWidth: 1,- flexDirection: "row",- gap: 12,- marginBottom: 10,- padding: 10,- },- resourceGridCard: {- backgroundColor: "#ffffff",- borderColor: "#e2e8f0",- borderRadius: 8,- borderWidth: 1,- flex: 1,- gap: 8,- marginBottom: 10,- minWidth: 0,- overflow: "hidden",- },- resourceThumb: {- alignItems: "center",- backgroundColor: "#f8fafc",- borderColor: "#e2e8f0",- borderRadius: 8,- borderWidth: 1,- height: 58,- justifyContent: "center",- overflow: "hidden",- width: 58,- },- resourceGridThumb: {- alignItems: "center",- aspectRatio: 1.18,- backgroundColor: "#f8fafc",- borderBottomColor: "#e2e8f0",- borderBottomWidth: 1,- justifyContent: "center",- overflow: "hidden",- width: "100%",- },- resourceImage: {- height: "100%",- width: "100%",- },- resourceFileIcon: {- alignItems: "center",- justifyContent: "center",- },- resourceInfo: {- flex: 1,- gap: 4,- minWidth: 0,- },- resourceGridInfo: {- gap: 5,- minWidth: 0,- padding: 10,- },- centerState: {- alignItems: "center",- flex: 1,- gap: 8,- justifyContent: "center",- padding: 24,- },- errorText: {- color: "#dc2626",- fontSize: 14,- fontWeight: "700",- lineHeight: 20,- },- emptyTitle: {- color: "#334155",- fontSize: 16,- fontWeight: "800",- },- mutedText: {- color: "#64748b",- fontSize: 13,- textAlign: "center",- },- emptyActionButton: {- alignItems: "center",- backgroundColor: "#0f172a",- borderRadius: 8,- flexDirection: "row",- gap: 8,- marginTop: 8,- minHeight: 38,- paddingHorizontal: 14,- },- emptyActionButtonText: {- color: "#ffffff",- fontSize: 13,- fontWeight: "800",- },- panelList: {- gap: 12,- padding: 18,- paddingBottom: 96,- },- panelRow: {- backgroundColor: "#ffffff",- borderColor: "#e2e8f0",- borderRadius: 8,- borderWidth: 1,- gap: 6,- padding: 14,- },- panelLinkRow: {- alignItems: "center",- flexDirection: "row",- justifyContent: "space-between",- },- panelLinkText: {- flex: 1,- gap: 6,- minWidth: 0,- },- panelLabel: {- color: "#64748b",- fontSize: 12,- fontWeight: "700",- },- panelValue: {- color: "#0f172a",- fontSize: 15,- fontWeight: "700",- },- panelHint: {- color: "#64748b",- fontSize: 12,- fontWeight: "700",- lineHeight: 18,- },- preferenceRow: {- alignItems: "center",- flexDirection: "row",- gap: 12,- justifyContent: "space-between",- },- preferenceStack: {- gap: 12,- },- preferenceText: {- flex: 1,- gap: 6,- minWidth: 0,- },- syncButton: {- alignItems: "center",- alignSelf: "flex-start",- backgroundColor: "#0f172a",- borderRadius: 8,- flexDirection: "row",- gap: 8,- minHeight: 38,- paddingHorizontal: 12,- },- syncButtonText: {- color: "#ffffff",- fontSize: 13,- fontWeight: "800",- },- dangerButton: {- alignItems: "center",- backgroundColor: "#fef2f2",- borderColor: "#fecaca",- borderRadius: 8,- borderWidth: 1,- flexDirection: "row",- gap: 8,- justifyContent: "center",- minHeight: 48,- },- dangerButtonText: {- color: "#b91c1c",- fontSize: 15,- fontWeight: "800",- },- warningPanel: {- backgroundColor: "#fffbeb",- borderColor: "#fde68a",- borderRadius: 8,- borderWidth: 1,- padding: 12,- },- warningText: {- color: "#92400e",- fontSize: 13,- fontWeight: "700",- lineHeight: 19,- },- buttonDisabled: {- opacity: 0.5,- },- modalSafeArea: {- backgroundColor: "#f8fafc",- flex: 1,- },- richEditorSafeArea: {- backgroundColor: "#ffffff",- flex: 1,- },- richEditorContainer: {- backgroundColor: "#ffffff",- flex: 1,- },- richEditorMeta: {- alignItems: "center",- backgroundColor: "#ffffff",- borderBottomColor: "#e2e8f0",- borderBottomWidth: 1,- flexDirection: "row",- gap: 12,- paddingHorizontal: 14,- paddingVertical: 10,- },- richEditorTitleBlock: {- flex: 1,- minWidth: 0,- },- richEditorTitle: {- color: "#0f172a",- fontSize: 16,- fontWeight: "800",- },- richEditorNotebook: {- color: "#64748b",- fontSize: 12,- fontWeight: "700",- marginTop: 3,- },- richEditorStatus: {- borderRadius: 999,- fontSize: 12,- fontWeight: "800",- overflow: "hidden",- paddingHorizontal: 9,- paddingVertical: 4,- },- richEditorStatusActive: {- backgroundColor: "#ecfdf5",- color: "#047857",- },- richEditorStatusLoading: {- backgroundColor: "#eff6ff",- color: "#2563eb",- },- richEditorStatusError: {- backgroundColor: "#fef2f2",- color: "#b91c1c",- },- richEditorTags: {- backgroundColor: "#ffffff",- borderBottomColor: "#e2e8f0",- borderBottomWidth: 1,- flexGrow: 0,- maxHeight: 44,- },- richEditorTagsContent: {- gap: 8,- paddingHorizontal: 14,- paddingVertical: 9,- },- richEditorFrame: {- flex: 1,- },- richEditorLoading: {- alignItems: "center",- backgroundColor: "#ffffff",- bottom: 0,- gap: 10,- justifyContent: "center",- left: 0,- position: "absolute",- right: 0,- top: 0,- zIndex: 2,- },- richEditorWebView: {- backgroundColor: "#ffffff",- flex: 1,- },- modalHeader: {- alignItems: "center",- borderBottomColor: "#e2e8f0",- borderBottomWidth: 1,- flexDirection: "row",- justifyContent: "space-between",- padding: 14,- },- modalTitle: {- color: "#0f172a",- flex: 1,- fontSize: 16,- fontWeight: "800",- marginHorizontal: 12,- textAlign: "center",- },- actionSheetBackdrop: {- backgroundColor: "rgba(15, 23, 42, 0.34)",- flex: 1,- justifyContent: "flex-end",- },- actionSheet: {- backgroundColor: "#ffffff",- borderTopLeftRadius: 16,- borderTopRightRadius: 16,- gap: 8,- paddingBottom: 28,- paddingHorizontal: 16,- paddingTop: 10,- },- actionSheetHandle: {- alignSelf: "center",- backgroundColor: "#cbd5e1",- borderRadius: 999,- height: 4,- marginBottom: 8,- width: 42,- },- actionSheetTitle: {- color: "#0f172a",- fontSize: 15,- fontWeight: "800",- paddingBottom: 4,- },- actionSheetSectionTitle: {- color: "#64748b",- fontSize: 12,- fontWeight: "800",- paddingTop: 4,- },- actionSheetItem: {- alignItems: "center",- backgroundColor: "#f8fafc",- borderColor: "#e2e8f0",- borderRadius: 8,- borderWidth: 1,- flexDirection: "row",- gap: 10,- minHeight: 48,- paddingHorizontal: 12,- },- actionSheetItemText: {- color: "#0f172a",- fontSize: 14,- fontWeight: "800",- },- actionSheetItemTextDanger: {- color: "#b91c1c",- },- insertTextSheet: {- backgroundColor: "#ffffff",- borderTopLeftRadius: 16,- borderTopRightRadius: 16,- gap: 10,- paddingBottom: 28,- paddingHorizontal: 16,- paddingTop: 10,- },- insertTextInput: {- backgroundColor: "#f8fafc",- borderColor: "#e2e8f0",- borderRadius: 8,- borderWidth: 1,- color: "#0f172a",- fontSize: 15,- lineHeight: 22,- minHeight: 160,- padding: 12,- },- detailContent: {- padding: 18,- paddingBottom: 48,- },- detailTitle: {- color: "#0f172a",- fontSize: 24,- fontWeight: "800",- lineHeight: 30,- },- detailMarkdown: {- color: "#1f2937",- fontSize: 16,- lineHeight: 25,- marginTop: 20,- },- noteSearchPanel: {- backgroundColor: "#f8fafc",- borderColor: "#e2e8f0",- borderRadius: 8,- borderWidth: 1,- gap: 10,- marginTop: 14,- padding: 10,- },- noteSearchCount: {- color: "#64748b",- fontSize: 12,- fontWeight: "800",- },- noteSearchCountEmpty: {- color: "#b91c1c",- },- noteSearchHighlight: {- backgroundColor: "#fef3c7",- color: "#78350f",- },- noteSearchHighlightActive: {- backgroundColor: "#fde68a",- color: "#0f172a",- fontWeight: "800",- },- actionRow: {- flexDirection: "row",- flexWrap: "wrap",- gap: 8,- marginTop: 16,- },- actionButton: {- alignItems: "center",- backgroundColor: "#ffffff",- borderColor: "#e2e8f0",- borderRadius: 8,- borderWidth: 1,- flexDirection: "row",- gap: 6,- minHeight: 38,- paddingHorizontal: 12,- },- actionButtonDanger: {- backgroundColor: "#fef2f2",- borderColor: "#fecaca",- },- actionButtonText: {- color: "#0f172a",- fontSize: 13,- fontWeight: "800",- },- actionButtonTextDanger: {- color: "#b91c1c",- },- inlineForm: {- alignItems: "center",- flexDirection: "row",- gap: 8,- },- inlineInput: {- flex: 1,- },- inlineButton: {- alignItems: "center",- backgroundColor: "#0f172a",- borderRadius: 8,- height: 48,- justifyContent: "center",- width: 48,- },- notebookManageRow: {- alignItems: "center",- backgroundColor: "#ffffff",- borderColor: "#e2e8f0",- borderRadius: 8,- borderWidth: 1,- flexDirection: "row",- gap: 8,- minHeight: 58,- padding: 10,- },- notebookManageText: {- flex: 1,- gap: 4,- minWidth: 0,- },- notebookEditBox: {- flex: 1,- gap: 8,- minWidth: 0,- },- parentSelectList: {- flexGrow: 0,- },- notebookPicker: {- gap: 10,- },- tagManageRow: {- alignItems: "center",- backgroundColor: "#ffffff",- borderColor: "#e2e8f0",- borderRadius: 8,- borderWidth: 1,- flexDirection: "row",- gap: 8,- minHeight: 60,- padding: 10,- },- createdTokenPanel: {- backgroundColor: "#ecfdf5",- borderColor: "#a7f3d0",- borderRadius: 8,- borderWidth: 1,- gap: 10,- padding: 12,- },- tokenValueText: {- backgroundColor: "#ffffff",- borderColor: "#a7f3d0",- borderRadius: 8,- borderWidth: 1,- color: "#0f172a",- fontSize: 12,- fontWeight: "700",- lineHeight: 18,- padding: 10,- },- tokenActionRow: {- flexDirection: "row",- flexWrap: "wrap",- gap: 8,- },- scopeGrid: {- flexDirection: "row",- flexWrap: "wrap",- gap: 8,- },- scopePill: {- backgroundColor: "#ffffff",- borderColor: "#e2e8f0",- borderRadius: 8,- borderWidth: 1,- minHeight: 34,- paddingHorizontal: 10,- paddingVertical: 8,- },- scopePillActive: {- backgroundColor: "#ecfdf5",- borderColor: "#34d399",- },- scopePillText: {- color: "#475569",- fontSize: 12,- fontWeight: "800",- },- scopePillTextActive: {- color: "#047857",- },- apiTokenRow: {- alignItems: "center",- backgroundColor: "#ffffff",- borderColor: "#e2e8f0",- borderRadius: 8,- borderWidth: 1,- flexDirection: "row",- gap: 10,- minHeight: 82,- padding: 12,- },- apiTokenActions: {- flexDirection: "row",- gap: 6,- },- centerInline: {- alignItems: "center",- padding: 18,- },- emptyInlinePanel: {- alignItems: "center",- backgroundColor: "#ffffff",- borderColor: "#e2e8f0",- borderRadius: 8,- borderStyle: "dashed",- borderWidth: 1,- gap: 8,- padding: 22,- },- guideHero: {- backgroundColor: "#ecfdf5",- borderColor: "#a7f3d0",- borderRadius: 8,- borderWidth: 1,- gap: 8,- padding: 14,- },- guideStep: {- backgroundColor: "#ffffff",- borderColor: "#e2e8f0",- borderRadius: 8,- borderWidth: 1,- gap: 6,- padding: 14,- },- promptCard: {- backgroundColor: "#ffffff",- borderColor: "#e2e8f0",- borderRadius: 8,- borderWidth: 1,- gap: 10,- padding: 14,- },- promptCardHeader: {- alignItems: "center",- flexDirection: "row",- flexWrap: "wrap",- gap: 10,- justifyContent: "space-between",- },- syncQueueItem: {- backgroundColor: "#ffffff",- borderColor: "#e2e8f0",- borderRadius: 8,- borderWidth: 1,- gap: 8,- padding: 14,- },- syncStatusPill: {- borderRadius: 999,- fontSize: 11,- fontWeight: "800",- overflow: "hidden",- paddingHorizontal: 8,- paddingVertical: 3,- },- syncStatusPending: {- backgroundColor: "#f1f5f9",- color: "#475569",- },- syncStatusActive: {- backgroundColor: "#eff6ff",- color: "#2563eb",- },- syncStatusDanger: {- backgroundColor: "#fef2f2",- color: "#b91c1c",- },- templateCard: {- alignItems: "center",- backgroundColor: "#ffffff",- borderColor: "#e2e8f0",- borderRadius: 8,- borderWidth: 1,- flexDirection: "row",- gap: 12,- minHeight: 82,- padding: 12,- },- templateIcon: {- alignItems: "center",- backgroundColor: "#f0fdf4",- borderColor: "#bbf7d0",- borderRadius: 8,- borderWidth: 1,- height: 42,- justifyContent: "center",- width: 42,- },- templateText: {- flex: 1,- gap: 5,- minWidth: 0,- },- moveNotebookRow: {- alignItems: "center",- backgroundColor: "#ffffff",- borderColor: "#e2e8f0",- borderRadius: 8,- borderWidth: 1,- flexDirection: "row",- gap: 12,- minHeight: 58,- padding: 12,- },- moveNotebookRowActive: {- borderColor: "#0f172a",- },- moveNotebookText: {- flex: 1,- gap: 4,- minWidth: 0,- },- moveNotebookSelectArea: {- flex: 1,- gap: 4,- justifyContent: "center",- minHeight: 34,- minWidth: 0,- },- notebookTreeToggle: {- alignItems: "center",- borderRadius: 8,- height: 32,- justifyContent: "center",- width: 32,- },- notebookTreeTogglePlaceholder: {- width: 32,- },- notebookTreeRows: {- gap: 10,- },- editorForm: {- gap: 12,- padding: 18,- paddingBottom: 48,- },- revisionPill: {- backgroundColor: "#ffffff",- borderColor: "#e2e8f0",- borderRadius: 8,- borderWidth: 1,- marginRight: 8,- minHeight: 58,- minWidth: 132,- paddingHorizontal: 12,- paddingVertical: 9,- },- revisionPillActive: {- backgroundColor: "#0f172a",- borderColor: "#0f172a",- },- revisionPillTitle: {- color: "#0f172a",- fontSize: 13,- fontWeight: "800",- },- revisionPillTitleActive: {- color: "#ffffff",- },- revisionPillMeta: {- color: "#64748b",- fontSize: 11,- fontWeight: "700",- marginTop: 4,- },- revisionPreviewBlock: {- backgroundColor: "#ffffff",- borderColor: "#e2e8f0",- borderRadius: 8,- borderWidth: 1,- gap: 8,- padding: 12,- },- revisionPreviewText: {- color: "#334155",- fontSize: 13,- lineHeight: 20,- },- revisionDiffTable: {- borderColor: "#e2e8f0",- borderRadius: 8,- borderWidth: 1,- overflow: "hidden",- },- revisionDiffRow: {- borderBottomColor: "#f1f5f9",- borderBottomWidth: 1,- flexDirection: "row",- minHeight: 28,- },- revisionDiffRowHistory: {- backgroundColor: "#fffbeb",- },- revisionDiffRowCurrent: {- backgroundColor: "#ecfdf5",- },- revisionDiffLineNumber: {- borderRightColor: "#e2e8f0",- borderRightWidth: 1,- color: "#94a3b8",- fontSize: 11,- minWidth: 42,- paddingHorizontal: 8,- paddingTop: 6,- textAlign: "right",- },- revisionDiffText: {- color: "#334155",- flex: 1,- fontSize: 12,- lineHeight: 18,- paddingHorizontal: 10,- paddingVertical: 5,- },- revisionDiffTextEmpty: {- color: "#94a3b8",- },- label: {- color: "#334155",- fontSize: 13,- fontWeight: "800",- },- titleInput: {- backgroundColor: "#ffffff",- borderColor: "#e2e8f0",- borderRadius: 8,- borderWidth: 1,- color: "#0f172a",- fontSize: 17,- minHeight: 48,- paddingHorizontal: 14,- },- markdownInput: {- backgroundColor: "#ffffff",- borderColor: "#e2e8f0",- borderRadius: 8,- borderWidth: 1,- color: "#0f172a",- fontSize: 16,- lineHeight: 23,- minHeight: 260,- padding: 14,- },- markdownToolbar: {- flexGrow: 0,- },- markdownToolButton: {- alignItems: "center",- backgroundColor: "#ffffff",- borderColor: "#e2e8f0",- borderRadius: 8,- borderWidth: 1,- flexDirection: "row",- gap: 5,- marginRight: 8,- minHeight: 34,- paddingHorizontal: 10,- },- markdownToolText: {- color: "#334155",- fontSize: 12,- fontWeight: "800",- },- bottomNav: {- alignItems: "center",- backgroundColor: "#ffffff",- borderColor: "#e2e8f0",- borderTopWidth: 1,- bottom: 0,- flexDirection: "row",- height: 64,- justifyContent: "space-between",- left: 0,- paddingHorizontal: 44,- position: "absolute",- right: 0,- },- bottomCreateButton: {- alignItems: "center",- backgroundColor: "#10b981",- borderColor: "#ffffff",- borderRadius: 28,- borderWidth: 5,- height: 56,- justifyContent: "center",- marginTop: -28,- shadowColor: "#10b981",- shadowOffset: { width: 0, height: 10 },- shadowOpacity: 0.28,- shadowRadius: 18,- width: 56,- },- bottomCreateButtonDisabled: {- backgroundColor: "#cbd5e1",- shadowOpacity: 0,- },- selectionBar: {- backgroundColor: "#ffffff",- borderColor: "#e2e8f0",- borderTopWidth: 1,- bottom: 64,- left: 0,- paddingHorizontal: 14,- paddingTop: 10,- paddingBottom: 12,- position: "absolute",- right: 0,- },- selectionBarHeader: {- alignItems: "center",- flexDirection: "row",- justifyContent: "space-between",- marginBottom: 8,- },- selectionCount: {- color: "#0f172a",- fontSize: 13,- fontWeight: "800",- },- selectionHeaderActions: {- alignItems: "center",- flexDirection: "row",- gap: 12,- },- selectionClear: {- color: "#2563eb",- fontSize: 13,- fontWeight: "800",- },- selectionClearDisabled: {- color: "#cbd5e1",- },- selectionActions: {- flexDirection: "row",- gap: 8,- },- selectionAction: {- alignItems: "center",- backgroundColor: "#f8fafc",- borderColor: "#e2e8f0",- borderRadius: 8,- borderWidth: 1,- flex: 1,- gap: 4,- justifyContent: "center",- minHeight: 54,- },- selectionActionText: {- color: "#0f172a",- fontSize: 11,- fontWeight: "800",- },- selectionActionTextDanger: {- color: "#b91c1c",- },- bottomNavItem: {- alignItems: "center",- gap: 4,- minWidth: 58,- },- bottomNavText: {- color: "#64748b",- fontSize: 11,- fontWeight: "700",- },- bottomNavTextActive: {- color: "#0f172a",- },- previewBackdrop: {- alignItems: "center",- backgroundColor: "rgba(15, 23, 42, 0.92)",- flex: 1,- justifyContent: "center",- padding: 16,- },- previewHeader: {- alignItems: "center",- backgroundColor: "#ffffff",- borderRadius: 8,- flexDirection: "row",- gap: 12,- left: 16,- padding: 10,- position: "absolute",- right: 16,- top: 54,- zIndex: 2,- },- previewTitle: {- color: "#0f172a",- flex: 1,- fontSize: 14,- fontWeight: "800",- },- previewCounter: {- color: "#475569",- fontSize: 12,- fontWeight: "800",- },- previewImage: {- height: "72%",- width: "100%",- },- previewNavRow: {- flexDirection: "row",- justifyContent: "space-between",- left: 16,- position: "absolute",- right: 16,- },- previewNavButton: {- alignItems: "center",- backgroundColor: "rgba(15, 23, 42, 0.68)",- borderColor: "rgba(255, 255, 255, 0.24)",- borderRadius: 24,- borderWidth: 1,- height: 48,- justifyContent: "center",- width: 48,- },- previewOpenButton: {- alignItems: "center",- backgroundColor: "#0f172a",- borderColor: "rgba(255, 255, 255, 0.22)",- borderRadius: 8,- borderWidth: 1,- bottom: 42,- flexDirection: "row",- gap: 8,- minHeight: 46,- paddingHorizontal: 16,- position: "absolute",- },- previewOpenText: {- color: "#ffffff",- fontSize: 14,- fontWeight: "800",- },-});diff --git a/bun.lock b/bun.lockindex b2ccd391..a56fe9f8 100644--- a/bun.lock+++ b/bun.lock@@ -79,27 +79,21 @@},"apps/mobile": {"name": "@edgeever/mobile",- "version": "0.1.3",+ "version": "0.2.8","dependencies": {"@edgeever/client": "workspace:*","@edgeever/shared": "workspace:*",- "@gorhom/bottom-sheet": "latest",- "@react-native-async-storage/async-storage": "2.2.0",- "@tanstack/react-query": "latest","expo": "~57.0.7","expo-build-properties": "~57.0.6",- "expo-clipboard": "~57.0.1",- "expo-constants": "~57.0.6",- "expo-document-picker": "~57.0.1",- "expo-image-manipulator": "~57.0.5",+ "expo-file-system": "~57.0.1","expo-router": "latest","expo-secure-store": "latest",+ "expo-sharing": "~57.0.6","expo-status-bar": "latest",+ "expo-system-ui": "~57.0.1","lucide-react-native": "latest","react": "19.2.3","react-native": "latest",- "react-native-gesture-handler": "~2.32.0",- "react-native-reanimated": "4.5.0","react-native-safe-area-context": "~5.7.0","react-native-screens": "4.25.2","react-native-svg": "15.15.4",@@ -108,7 +102,6 @@"devDependencies": {"@types/react": "latest","babel-preset-expo": "latest",- "gluestack-ui": "latest","typescript": "6.0.3",},},@@ -409,14 +402,10 @@"@babel/preset-env": ["@babel/[email protected]", "", { "dependencies": { "@babel/compat-data": "^7.29.7", "@babel/helper-compilation-targets": "^7.29.7", "@babel/helper-plugin-utils": "^7.29.7", "@babel/helper-validator-option": "^7.29.7", "@babel/plugin-bugfix-firefox-class-in-computed-class-key": "^7.29.7", "@babel/plugin-bugfix-safari-class-field-initializer-scope": "^7.29.7", "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.29.7", "@babel/plugin-bugfix-safari-rest-destructuring-rhs-array": "^7.29.7", "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.29.7", "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.29.7", "@babel/plugin-proposal-private-property-in-object": "7.21.0-placeholder-for-preset-env.2", "@babel/plugin-syntax-import-assertions": "^7.29.7", "@babel/plugin-syntax-import-attributes": "^7.29.7", "@babel/plugin-syntax-unicode-sets-regex": "^7.18.6", "@babel/plugin-transform-arrow-functions": "^7.29.7", "@babel/plugin-transform-async-generator-functions": "^7.29.7", "@babel/plugin-transform-async-to-generator": "^7.29.7", "@babel/plugin-transform-block-scoped-functions": "^7.29.7", "@babel/plugin-transform-block-scoping": "^7.29.7", "@babel/plugin-transform-class-properties": "^7.29.7", "@babel/plugin-transform-class-static-block": "^7.29.7", "@babel/plugin-transform-classes": "^7.29.7", "@babel/plugin-transform-computed-properties": "^7.29.7", "@babel/plugin-transform-destructuring": "^7.29.7", "@babel/plugin-transform-dotall-regex": "^7.29.7", "@babel/plugin-transform-duplicate-keys": "^7.29.7", "@babel/plugin-transform-duplicate-named-capturing-groups-regex": "^7.29.7", "@babel/plugin-transform-dynamic-import": "^7.29.7", "@babel/plugin-transform-explicit-resource-management": "^7.29.7", "@babel/plugin-transform-exponentiation-operator": "^7.29.7", "@babel/plugin-transform-export-namespace-from": "^7.29.7", "@babel/plugin-transform-for-of": "^7.29.7", "@babel/plugin-transform-function-name": "^7.29.7", "@babel/plugin-transform-json-strings": "^7.29.7", "@babel/plugin-transform-literals": "^7.29.7", "@babel/plugin-transform-logical-assignment-operators": "^7.29.7", "@babel/plugin-transform-member-expression-literals": "^7.29.7", "@babel/plugin-transform-modules-amd": "^7.29.7", "@babel/plugin-transform-modules-commonjs": "^7.29.7", "@babel/plugin-transform-modules-systemjs": "^7.29.7", "@babel/plugin-transform-modules-umd": "^7.29.7", "@babel/plugin-transform-named-capturing-groups-regex": "^7.29.7", "@babel/plugin-transform-new-target": "^7.29.7", "@babel/plugin-transform-nullish-coalescing-operator": "^7.29.7", "@babel/plugin-transform-numeric-separator": "^7.29.7", "@babel/plugin-transform-object-rest-spread": "^7.29.7", "@babel/plugin-transform-object-super": "^7.29.7", "@babel/plugin-transform-optional-catch-binding": "^7.29.7", "@babel/plugin-transform-optional-chaining": "^7.29.7", "@babel/plugin-transform-parameters": "^7.29.7", "@babel/plugin-transform-private-methods": "^7.29.7", "@babel/plugin-transform-private-property-in-object": "^7.29.7", "@babel/plugin-transform-property-literals": "^7.29.7", "@babel/plugin-transform-regenerator": "^7.29.7", "@babel/plugin-transform-regexp-modifiers": "^7.29.7", "@babel/plugin-transform-reserved-words": "^7.29.7", "@babel/plugin-transform-shorthand-properties": "^7.29.7", "@babel/plugin-transform-spread": "^7.29.7", "@babel/plugin-transform-sticky-regex": "^7.29.7", "@babel/plugin-transform-template-literals": "^7.29.7", "@babel/plugin-transform-typeof-symbol": "^7.29.7", "@babel/plugin-transform-unicode-escapes": "^7.29.7", "@babel/plugin-transform-unicode-property-regex": "^7.29.7", "@babel/plugin-transform-unicode-regex": "^7.29.7", "@babel/plugin-transform-unicode-sets-regex": "^7.29.7", "@babel/preset-modules": "0.1.6-no-external-plugins", "babel-plugin-polyfill-corejs2": "^0.4.15", "babel-plugin-polyfill-corejs3": "^0.14.0", "babel-plugin-polyfill-regenerator": "^0.6.6", "core-js-compat": "^3.48.0", "semver": "^6.3.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-GYzX36n1nsciIb0uyH0GHwxwtNwPQIcpxSeiVLDtG/B7jB5xXgchnmL1f/jCX5o+pwnaDBtO60ONSJhEBJfxYA=="],- "@babel/preset-flow": ["@babel/[email protected]", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.29.7", "@babel/helper-validator-option": "^7.29.7", "@babel/plugin-transform-flow-strip-types": "^7.29.7" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-KYIRV0BuaN68CDdsqFkAD7MU7yipUqQNuNElwATdxaIdpTjhvtY82QvkBJs7zV3Evxj2jFAAZ1iO8nyy0nhjqA=="],-"@babel/preset-modules": ["@babel/[email protected]", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.0.0", "@babel/types": "^7.4.4", "esutils": "^2.0.2" }, "peerDependencies": { "@babel/core": "^7.0.0-0 || ^8.0.0-0 <8.0.0" } }, "sha512-HrcgcIESLm9aIR842yhJ5RWan/gebQUJ6E/E5+rf0y9o6oj7w0Br+sWuL6kEQ/o/AdfvR1Je9jG18/gnpwjEyA=="],"@babel/preset-typescript": ["@babel/[email protected]", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.29.7", "@babel/helper-validator-option": "^7.29.7", "@babel/plugin-syntax-jsx": "^7.29.7", "@babel/plugin-transform-modules-commonjs": "^7.29.7", "@babel/plugin-transform-typescript": "^7.29.7" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-/Foi8vKY2EVbed/1eZx0gJEEwHAIxogrySI7rULcRIvhZzbvoE/b5qG5Ghc0WKAFKOHA9SD1x7RsFlOYdutIiQ=="],- "@babel/register": ["@babel/[email protected]", "", { "dependencies": { "clone-deep": "^4.0.1", "find-cache-dir": "^2.0.0", "make-dir": "^2.1.0", "pirates": "^4.0.6", "source-map-support": "^0.5.16" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-AMGJoWuES861riy6pcB0fphE1YXybtQnBYQMuIyPv6mKLiosfa79BKTnAOyx215c/3RJPJpdQwoHZ3earVH7AA=="],-"@babel/runtime": ["@babel/[email protected]", "", {}, "sha512-Nq8OhGWiZIZGV6hLHoyAKLLcJihP/xFeBMGJoUrxTX2psI8dCifzLhZISFb+VWS3wFMRDmCGw5R+dOySCqPLhw=="],"@babel/template": ["@babel/[email protected]", "", { "dependencies": { "@babel/code-frame": "^7.29.7", "@babel/parser": "^7.29.7", "@babel/types": "^7.29.7" } }, "sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg=="],@@ -427,10 +416,6 @@"@capsizecss/unpack": ["@capsizecss/[email protected]", "", { "dependencies": { "fontkitten": "^1.0.3" } }, "sha512-CuNiSqg7+e1cO/GjffyMOm5Tt2jUF9CWHHnvQ/UkqvtkGfHdgwEC0wpmq7fkN3gxwpRnrAN0WzO3vREKmNolMQ=="],- "@clack/core": ["@clack/[email protected]", "", { "dependencies": { "picocolors": "^1.0.0", "sisteransi": "^1.0.5" } }, "sha512-5cfhQNH+1VQ2xLQlmzXMqUoiaH0lRBq9/CLW9lTyMbuKLC3+xEK01tHVvyut++mLOn5urSHmkm6I0Lg9MaJSTQ=="],-- "@clack/prompts": ["@clack/[email protected]", "", { "dependencies": { "@clack/core": "^0.3.2", "is-unicode-supported": "*", "picocolors": "^1.0.0", "sisteransi": "^1.0.5" } }, "sha512-AM+kFmAHawpUQv2q9+mcB6jLKxXGjgu/r2EQjEwujgpCdzrST6BJqYw00GRn56/L/Izw5U7ImoLmy00X/r80Pw=="],-"@cloudflare/kv-asset-handler": ["@cloudflare/[email protected]", "", {}, "sha512-jxQYkj8dSIzc0cD6cMMNdOc1UVjqSqu8BZdor5s8cGjW2I8BjODt/kWPVdY+u9zj3ms75Q5qaZgnxUad83+eAg=="],"@cloudflare/unenv-preset": ["@cloudflare/[email protected]", "", { "peerDependencies": { "unenv": "2.0.0-rc.24", "workerd": ">1.20260305.0 <2.0.0-0" }, "optionalPeers": ["workerd"] }, "sha512-ECxObrMfyTl5bhQf/lZCXwo5G6xX9IAUo+nDMKK4SZ8m4Jvvxp52vilxyySSWh2YTZz8+HQ07qGH/2rEom1vDw=="],@@ -617,10 +602,6 @@"@fontsource-variable/inter": ["@fontsource-variable/[email protected]", "", {}, "sha512-kOfP2D+ykbcX/P3IFnokOhVRNoTozo5/JxhAIVYLpea/UBmCQ/YWPBfWIDuBImXX/15KH+eKh4xpEUyS2sQQGQ=="],- "@gorhom/bottom-sheet": ["@gorhom/[email protected]", "", { "dependencies": { "@gorhom/portal": "1.0.14", "invariant": "^2.2.4" }, "peerDependencies": { "@types/react": "*", "@types/react-native": "*", "react": "*", "react-native": "*", "react-native-gesture-handler": ">=2.16.1", "react-native-reanimated": ">=3.16.0 || >=4.0.0-" }, "optionalPeers": ["@types/react", "@types/react-native"] }, "sha512-uLQFlDjp9z+jrOFcMSEldPqL5JdaXL3vXOh+juhwoNvXgTsEorJLjHTugXu+YccAG/0KJnShzKCrb71MHBsvJg=="],-- "@gorhom/portal": ["@gorhom/[email protected]", "", { "dependencies": { "nanoid": "^3.3.1" }, "peerDependencies": { "react": "*", "react-native": "*" } }, "sha512-MXyL4xvCjmgaORr/rtryDNFy3kU4qUbKlwtQqqsygd0xX3mhKjOLn6mQK8wfu0RkoE0pBE0nAasRoHua+/QZ7A=="],-"@hono/zod-validator": ["@hono/[email protected]", "", { "peerDependencies": { "hono": ">=4.10.0", "zod": "^3.25.0 || ^4.0.0" } }, "sha512-5uS4S1/LKtZQYvD4BtpPUFkOv8d1wNxHHrChm26buMiEYc1FrHWvDUaKVBwkiVtvSExHSpLGDvcnpI2Copyj9w=="],"@iconify-json/bx": ["@iconify-json/[email protected]", "", { "dependencies": { "@iconify/types": "*" } }, "sha512-ihvX+2d688otgW7MAvUEdKVln+fZ28BJTlygazKUU/+RCODWT+2KObjAHe8+KPs4VhC8V6Tgoy1qrX0Myn/upA=="],@@ -689,12 +670,6 @@"@img/sharp-win32-x64": ["@img/[email protected]", "", { "os": "win32", "cpu": "x64" }, "sha512-imoOyBcoM/iiUr4J6VPpCNjPnjvP/Gks95898yB8YqoGGYmHYbOyCuNv9FMhFgtaiHFGbHW8bxKqRV6VjtXThQ=="],- "@internationalized/date": ["@internationalized/[email protected]", "", { "dependencies": { "@swc/helpers": "^0.5.0" } }, "sha512-FY1Y+H64NDs+HAF6omlnWxm3mEpfgaCSWtL5l551ZZfImA+kGjPFgrnJrGjH6lfmLL0g8Z/mBu1R3kufeCp6Jw=="],-- "@internationalized/number": ["@internationalized/[email protected]", "", { "dependencies": { "@swc/helpers": "^0.5.0" } }, "sha512-3ji1fcrT+FPAK86UqEhB/psHixYo6niWPJtt7+qRaYFynt/BaJG8GhAPimtWUpEiVSTq8ZM8L5psMxGquiB/Vg=="],-- "@internationalized/string": ["@internationalized/[email protected]", "", { "dependencies": { "@swc/helpers": "^0.5.0" } }, "sha512-kzP/M/mbQxODlmOt4bIQZ2SBVUWUSqMLXooXixnX7noche8WHaQcA+nwFN1K2KCF/cp+LDUhcJsCicwkvhD1pg=="],-"@isaacs/cliui": ["@isaacs/[email protected]", "", {}, "sha512-AokJm4tuBHillT+FpMtxQ60n8ObyXBatq7jD2/JA9dxbDDokKQm8KMht5ibGzLVU9IJDIKK4TPKgMHEYMn3lMg=="],"@isaacs/fs-minipass": ["@isaacs/[email protected]", "", { "dependencies": { "minipass": "^7.0.4" } }, "sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w=="],@@ -717,10 +692,6 @@"@jridgewell/trace-mapping": ["@jridgewell/[email protected]", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw=="],- "@kwsites/file-exists": ["@kwsites/[email protected]", "", { "dependencies": { "debug": "^4.1.1" } }, "sha512-m9/5YGR18lIwxSFDwfE3oA7bWuq9kdau6ugN4H2rJeyhFQZcG9AgSHkQtSD15a8WvTgfz9aikZMrKPHvbpqFiw=="],-- "@kwsites/promise-deferred": ["@kwsites/[email protected]", "", {}, "sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw=="],-"@mdx-js/mdx": ["@mdx-js/[email protected]", "", { "dependencies": { "@types/estree": "^1.0.0", "@types/estree-jsx": "^1.0.0", "@types/hast": "^3.0.0", "@types/mdx": "^2.0.0", "acorn": "^8.0.0", "collapse-white-space": "^2.0.0", "devlop": "^1.0.0", "estree-util-is-identifier-name": "^3.0.0", "estree-util-scope": "^1.0.0", "estree-walker": "^3.0.0", "hast-util-to-jsx-runtime": "^2.0.0", "markdown-extensions": "^2.0.0", "recma-build-jsx": "^1.0.0", "recma-jsx": "^1.0.0", "recma-stringify": "^1.0.0", "rehype-recma": "^1.0.0", "remark-mdx": "^3.0.0", "remark-parse": "^11.0.0", "remark-rehype": "^11.0.0", "source-map": "^0.7.0", "unified": "^11.0.0", "unist-util-position-from-estree": "^2.0.0", "unist-util-stringify-position": "^4.0.0", "unist-util-visit": "^5.0.0", "vfile": "^6.0.0" } }, "sha512-f6ZO2ifpwAQIpzGWaBQT2TXxPv6z3RBzQKpVftEWN78Vl/YweF1uwussDx8ECAXVtr3Rs89fKyG9YlzUs9DyGQ=="],"@mixmark-io/domino": ["@mixmark-io/[email protected]", "", {}, "sha512-Y28PR25bHXUg88kCV7nivXrP2Nj2RueZ3/l/jdx6J9f8J4nsEGcgX0Qe6lt7Pa+J79+kPiJU3LguR6O/6zrLOw=="],@@ -827,8 +798,6 @@"@radix-ui/rect": ["@radix-ui/[email protected]", "", {}, "sha512-xnXE7wG13PI+cxieVssYXlQJuYVRhH9NBoxt3KNwzghDIA69GMm7d4wXRouHIYjE+KvS6U/MsMO73NdS2MH9ZA=="],- "@react-native-async-storage/async-storage": ["@react-native-async-storage/[email protected]", "", { "dependencies": { "merge-options": "^3.0.4" }, "peerDependencies": { "react-native": "^0.0.0-0 || >=0.65 <1.0" } }, "sha512-gvRvjR5JAaUZF8tv2Kcq/Gbt3JHwbKFYfmb445rhOj6NUMx3qPLixmDx5pZAyb9at1bYvJ4/eTUipU5aki45xw=="],-"@react-native-masked-view/masked-view": ["@react-native-masked-view/[email protected]", "", { "peerDependencies": { "react": ">=16", "react-native": ">=0.57" } }, "sha512-XwuQoW7/GEgWRMovOQtX3A4PrXhyaZm0lVUiY8qJDvdngjLms9Cpdck6SmGAUNqQwcj2EadHC1HwL0bEyoa/SQ=="],"@react-native/assets-registry": ["@react-native/[email protected]", "", {}, "sha512-nIaXbm2jX1OTYp0qbviJ3O6KZivoE8z3BnhUQ2LsqfZSWRoOK/n1qsiAr6oALiNKWnXY3j2KPwtYORnZzp8xew=="],@@ -859,8 +828,6 @@"@react-native/virtualized-lists": ["@react-native/[email protected]", "", { "dependencies": { "invariant": "^2.2.4", "nullthrows": "^1.1.1" }, "peerDependencies": { "@types/react": "^19.2.0", "react": "*", "react-native": "0.86.0" }, "optionalPeers": ["@types/react"] }, "sha512-4/ZLXdf/OSpPDVO0AsQ1SJdRIzt5t9BNQ46QwGgxvX7/cirYR5k8KXctNGGgW8lQo2gZChEfY2zFCZg9nM/jiw=="],- "@react-types/shared": ["@react-types/[email protected]", "", { "peerDependencies": { "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" } }, "sha512-DkP/H0C2YjjS7gZWKNqOmU8a16qHPjQNdzMwmTq9SzplM6Iw0kVMTZ0OIoe6FOgGqa+FwMsE2QbPjh/n3g/jXQ=="],-"@rolldown/binding-android-arm64": ["@rolldown/[email protected]", "", { "os": "android", "cpu": "arm64" }, "sha512-DT6Z3PhvioeHMvxo+xHc3KtqggrI7CCTXCmC2h/5zUlp5jVitv7XEy+9q5/7v8IolhlioawpMo8Kg0EEBy7J0g=="],"@rolldown/binding-darwin-arm64": ["@rolldown/[email protected]", "", { "os": "darwin", "cpu": "arm64" }, "sha512-0NwgwsjM7LrsuVnXMK3koTpagBNOhloc/BNjKqZjv4V5zI5r13qx69uVhRx+o5Z0yy4Hzq+lpy7TAgUG/ocvrw=="],@@ -969,18 +936,12 @@"@shikijs/vscode-textmate": ["@shikijs/[email protected]", "", {}, "sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg=="],- "@simple-git/args-pathspec": ["@simple-git/[email protected]", "", {}, "sha512-ngJMaHlsWDTfjyq9F3VIQ8b7NXbBLq5j9i5bJ6XLYtD6qlDXT7fdKY2KscWWUF8t18xx052Y/PUO1K1TRc9yKA=="],-- "@simple-git/argv-parser": ["@simple-git/[email protected]", "", { "dependencies": { "@simple-git/args-pathspec": "^1.0.3" } }, "sha512-Q9lBcfQ+VQCpQqGJFHe5yooOS5hGdLFFbJ5R+R5aDsnkPCahtn1hSkMcORX65J2Z5lxSkD0lQorMsncuBQxYUw=="],-"@sinclair/typebox": ["@sinclair/[email protected]", "", {}, "sha512-MTBk/3jGLNB2tVxv6uLlFh1iu64iYOQ2PbdOSK3NW8JZsmlaOh2q6sdtKowBhfw8QFLmYNzTW4/oK4uATIi6ZA=="],"@sindresorhus/is": ["@sindresorhus/[email protected]", "", {}, "sha512-P1Cz1dWaFfR4IR+U13mqqiGsLFf1KbayybWwdd2vfctdV6hDpUkgCY0nKOLLTMSoRd/jJNjtbqzf13K8DCCXQw=="],"@speed-highlight/core": ["@speed-highlight/[email protected]", "", {}, "sha512-Z92FwKpCtfaW1V0jTU/fh3QzYEZN8wDwrzRIBoADCJfn4mJCNcJN/XegifX7BDrQ8/h9Xh/JnbyMchL0FqXrkg=="],- "@swc/helpers": ["@swc/[email protected]", "", { "dependencies": { "tslib": "^2.8.0" } }, "sha512-5lSsMOTXURePglDfvuAQUqkGek9Hg2kksOYay2m0+XR++b2NWYL/4sWyuvVBIs8oKnJaxkdi9whaL/sqN13afw=="],-"@tailwindcss/node": ["@tailwindcss/[email protected]", "", { "dependencies": { "@jridgewell/remapping": "^2.3.5", "enhanced-resolve": "5.21.6", "jiti": "^2.7.0", "lightningcss": "1.32.0", "magic-string": "^0.30.21", "source-map-js": "^1.2.1", "tailwindcss": "4.3.2" } }, "sha512-yWP/sqEcBLaD8JuA6zNwxoYKr75qxTioYwlRwekj5Jr/I5GXnoJfjetH/psLUIv74cYTH2lBUEzBkinthoYcBg=="],"@tailwindcss/oxide": ["@tailwindcss/[email protected]", "", { "optionalDependencies": { "@tailwindcss/oxide-android-arm64": "4.3.2", "@tailwindcss/oxide-darwin-arm64": "4.3.2", "@tailwindcss/oxide-darwin-x64": "4.3.2", "@tailwindcss/oxide-freebsd-x64": "4.3.2", "@tailwindcss/oxide-linux-arm-gnueabihf": "4.3.2", "@tailwindcss/oxide-linux-arm64-gnu": "4.3.2", "@tailwindcss/oxide-linux-arm64-musl": "4.3.2", "@tailwindcss/oxide-linux-x64-gnu": "4.3.2", "@tailwindcss/oxide-linux-x64-musl": "4.3.2", "@tailwindcss/oxide-wasm32-wasi": "4.3.2", "@tailwindcss/oxide-win32-arm64-msvc": "4.3.2", "@tailwindcss/oxide-win32-x64-msvc": "4.3.2" } }, "sha512-z8ZgnzX8gdNoWLBLqBPoh/sjnxkwvf9ZuWjnO0l0yIzbLa5/9S+eC5QxGZKRobVHIC3/1BoMWjHblqWjcgFgag=="],@@ -1201,7 +1162,7 @@"ansi-regex": ["[email protected]", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="],- "ansi-styles": ["[email protected]", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="],+ "ansi-styles": ["[email protected]", "", {}, "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA=="],"any-promise": ["[email protected]", "", {}, "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A=="],@@ -1221,14 +1182,10 @@"array-iterate": ["[email protected]", "", {}, "sha512-I1jXZMjAgCMmxT4qxXfPXa6SthSoE8h6gkSI9BGGNv8mP8G/v0blc+qFnZu6K42vTOiuME596QaLO0TP3Lk0xg=="],- "array-timsort": ["[email protected]", "", {}, "sha512-/+3GRL7dDAGEfM6TseQk/U+mi18TU2Ms9I3UlLdUMhz2hbvGNTKdj9xniwXfUqgYhHxRx0+8UnKkvlNwVU+cWQ=="],-"arraybuffer.prototype.slice": ["[email protected]", "", { "dependencies": { "array-buffer-byte-length": "^1.0.1", "call-bind": "^1.0.8", "define-properties": "^1.2.1", "es-abstract": "^1.23.5", "es-errors": "^1.3.0", "get-intrinsic": "^1.2.6", "is-array-buffer": "^3.0.4" } }, "sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ=="],"asap": ["[email protected]", "", {}, "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA=="],- "ast-types": ["[email protected]", "", { "dependencies": { "tslib": "^2.0.1" } }, "sha512-6t10qk83GOG8p0vKmaCr8eiilZwO171AvbROMtvvNiwrTly62t+7XkA8RdIIVbpMhCASAsxgAzdRSwh6nw/5Dg=="],-"astring": ["[email protected]", "", { "bin": { "astring": "bin/astring" } }, "sha512-LElXdjswlqjWrPpJFg1Fx4wpkOCxj1TDHlSV4PlaRxHGWko024xICaa97ZkMfs6DRKlCguiAI+rbXv5GWwXIkg=="],"astro": ["[email protected]", "", { "dependencies": { "@astrojs/compiler": "^2.13.0", "@astrojs/internal-helpers": "0.7.6", "@astrojs/markdown-remark": "6.3.11", "@astrojs/telemetry": "3.3.0", "@capsizecss/unpack": "^4.0.0", "@oslojs/encoding": "^1.1.0", "@rollup/pluginutils": "^5.3.0", "acorn": "^8.15.0", "aria-query": "^5.3.2", "axobject-query": "^4.1.0", "boxen": "8.0.1", "ci-info": "^4.3.1", "clsx": "^2.1.1", "common-ancestor-path": "^1.0.1", "cookie": "^1.1.1", "cssesc": "^3.0.0", "debug": "^4.4.3", "deterministic-object-hash": "^2.0.2", "devalue": "^5.6.2", "diff": "^8.0.3", "dlv": "^1.1.3", "dset": "^3.1.4", "es-module-lexer": "^1.7.0", "esbuild": "^0.27.3", "estree-walker": "^3.0.3", "flattie": "^1.1.1", "fontace": "~0.4.0", "github-slugger": "^2.0.0", "html-escaper": "3.0.3", "http-cache-semantics": "^4.2.0", "import-meta-resolve": "^4.2.0", "js-yaml": "^4.1.1", "magic-string": "^0.30.21", "magicast": "^0.5.1", "mrmime": "^2.0.1", "neotraverse": "^0.6.18", "p-limit": "^6.2.0", "p-queue": "^8.1.1", "package-manager-detector": "^1.6.0", "piccolore": "^0.1.3", "picomatch": "^4.0.3", "prompts": "^2.4.2", "rehype": "^13.0.2", "semver": "^7.7.3", "shiki": "^3.21.0", "smol-toml": "^1.6.0", "svgo": "^4.0.0", "tinyexec": "^1.0.2", "tinyglobby": "^0.2.15", "tsconfck": "^3.1.6", "ultrahtml": "^1.6.0", "unifont": "~0.7.3", "unist-util-visit": "^5.0.0", "unstorage": "^1.17.4", "vfile": "^6.0.3", "vite": "^6.4.1", "vitefu": "^1.1.1", "xxhash-wasm": "^1.1.0", "yargs-parser": "^21.1.1", "yocto-spinner": "^0.2.3", "zod": "^3.25.76", "zod-to-json-schema": "^3.25.1", "zod-to-ts": "^1.2.0" }, "optionalDependencies": { "sharp": "^0.34.0" }, "bin": { "astro": "astro.js" } }, "sha512-TnFwLnAXty5MXKPDGuKXqK4AMBXG+FH6RUdK7Oyc3gyfNoFIthT+4eRbzOK43bdRlLaZuxgciDSjgtggZ3OtGQ=="],@@ -1359,8 +1316,6 @@"clone": ["[email protected]", "", {}, "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg=="],- "clone-deep": ["[email protected]", "", { "dependencies": { "is-plain-object": "^2.0.4", "kind-of": "^6.0.2", "shallow-clone": "^3.0.0" } }, "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ=="],-"clsx": ["[email protected]", "", {}, "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA=="],"cmdk": ["[email protected]", "", { "dependencies": { "@radix-ui/react-compose-refs": "^1.1.1", "@radix-ui/react-dialog": "^1.1.6", "@radix-ui/react-id": "^1.1.0", "@radix-ui/react-primitive": "^2.0.2" }, "peerDependencies": { "react": "^18 || ^19 || ^19.0.0-rc", "react-dom": "^18 || ^19 || ^19.0.0-rc" } }, "sha512-Vsv7kFaXm+ptHDMZ7izaRsP70GgrW9NBNGswt9OZaVBLlE0SNpDq8eu/VGXyF9r7M0azK3Wy7OlYXsuyYLFzHg=="],@@ -1379,14 +1334,10 @@"commander": ["[email protected]", "", {}, "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA=="],- "comment-json": ["[email protected]", "", { "dependencies": { "array-timsort": "^1.0.3", "esprima": "^4.0.1" } }, "sha512-R2rze/hDX30uul4NZoIZ76ImSJLFxn/1/ZxtKC1L77y2X1k+yYu1joKbAtMA2Fg3hZrTOiw0I5mwVMo0cf250w=="],-"common-ancestor-path": ["[email protected]", "", {}, "sha512-L3sHRo1pXXEqX8VU28kfgUY+YGsk09hPqZiZmLacNib6XNTCM8ubYeT7ryXQw8asB1sKgcU5lkB7ONug08aB8w=="],"common-tags": ["[email protected]", "", {}, "sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA=="],- "commondir": ["[email protected]", "", {}, "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg=="],-"compressible": ["[email protected]", "", { "dependencies": { "mime-db": ">= 1.43.0 < 2" } }, "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg=="],"compression": ["[email protected]", "", { "dependencies": { "bytes": "3.1.2", "compressible": "~2.0.18", "debug": "2.6.9", "negotiator": "~0.6.4", "on-headers": "~1.1.0", "safe-buffer": "5.2.1", "vary": "~1.1.2" } }, "sha512-9mAqGPHLakhCLeNyxPkK4xVo746zQ/czLH1Ky+vkitMnWfWZps8r0qXuwhwizagCRttsL4lfG4pIOvaWLpAP0w=="],@@ -1541,8 +1492,6 @@"escape-string-regexp": ["[email protected]", "", {}, "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA=="],- "esprima": ["[email protected]", "", { "bin": { "esparse": "./bin/esparse.js", "esvalidate": "./bin/esvalidate.js" } }, "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="],-"estree-util-attach-comments": ["[email protected]", "", { "dependencies": { "@types/estree": "^1.0.0" } }, "sha512-cKUwm/HUcTDsYh/9FgnuFqpfquUbwIqwKM26BVCGDPVgvaCl/nDCCjUfiLlx6lsEZ3Z4RFxNbOQ60pkaEwFxGw=="],"estree-util-build-jsx": ["[email protected]", "", { "dependencies": { "@types/estree-jsx": "^1.0.0", "devlop": "^1.0.0", "estree-util-is-identifier-name": "^3.0.0", "estree-walker": "^3.0.0" } }, "sha512-8U5eiL6BTrPxp/CHbs2yMgP8ftMhR5ww1eIKoWRMlqvltHF8fZn5LRDvTKuxD3DUn+shRbLGqXemcP51oFCsGQ=="],@@ -1573,22 +1522,14 @@"expo-build-properties": ["[email protected]", "", { "dependencies": { "@expo/schema-utils": "^57.0.2", "resolve-from": "^5.0.0", "semver": "^7.6.0" }, "peerDependencies": { "expo": "*" } }, "sha512-/iEpjjBgOc8twOqtaDdVcerBRbZGyOFhhpsBch2IfxNFazbrOIIPXc97s732Fia8HiNkhwaHk3GkBB7zi4WZ3g=="],- "expo-clipboard": ["[email protected]", "", { "peerDependencies": { "expo": "*", "react": "*", "react-native": "*" } }, "sha512-HWICri4+1ao7S6QEfcorxVumXDiDnx1guGGewjZgGJWLGxFYs0RgH8ujBs+lkTzBkMmlwADaWSlaesR+nDJt5Q=="],-"expo-constants": ["[email protected]", "", { "dependencies": { "@expo/env": "~2.4.2" }, "peerDependencies": { "expo": "*", "react-native": "*" } }, "sha512-OV+4XUshdO18TKNlo1cxUkXeJWgUOPgalvl8ofmc7kmPPHoyfz2hGJ94tyY/RND/GG5RREE+me9YHClNEzo+Ow=="],- "expo-document-picker": ["[email protected]", "", { "peerDependencies": { "expo": "*" } }, "sha512-qBwM5oxDZ3I9kwFD3pUE1oK/WNv9artoEKO6UpqhQgNRr0XA1ALRVWYjkF4+ge9lUNDRehjTm/jenINkzqg84g=="],-"expo-file-system": ["[email protected]", "", { "peerDependencies": { "expo": "*", "react-native": "*" } }, "sha512-w7/ERvQFrGP2apTO9lDtZ+O6JQIhfakL7+Xqzh+rfMO9B4LB4qwrz+YvLgir8KFRVX64JHBnRuYBVLY1oQZcqw=="],"expo-font": ["[email protected]", "", { "dependencies": { "fontfaceobserver": "^2.1.0" }, "peerDependencies": { "expo": "*", "react": "*", "react-native": "*" } }, "sha512-QyS9L1Kh9sKJg4gfU6rdbpxpmH+DyzBX8z6jVvXMUDoqLr1GqmkO/Wu379KCXjL///kWbhpNlbi7AgBuj4VdIQ=="],"expo-glass-effect": ["[email protected]", "", { "peerDependencies": { "expo": "*", "react": "*", "react-native": "*" } }, "sha512-m/n8maxqNcHk6ZDhuqXBfD5Kt1Iz3M8xykVgdB0iSCIXvF70IqWXmQhX8Psswhrp8eZ+3r0mAD0Jh/2gFA3QaA=="],- "expo-image-loader": ["[email protected]", "", { "peerDependencies": { "expo": "*" } }, "sha512-uhrZKLT/cTl2mXyR28kPpVkS5O+PK9N1QA/07IFM4f5T4g0lTW1JHT3NEWwEEsGFldPmVX4j7LwUVVZxE+woug=="],-- "expo-image-manipulator": ["[email protected]", "", { "dependencies": { "expo-image-loader": "~57.0.1" }, "peerDependencies": { "expo": "*" } }, "sha512-gEZ6tEsLwtz+dRXPC2QDObcQhAW7c9J6WW4W+5qQ4T6DlgkjtunLpHijM79W8fc99ER2X2IQS1ogJ8u9VAF7qA=="],-"expo-keep-awake": ["[email protected]", "", { "peerDependencies": { "expo": "*", "react": "*" } }, "sha512-28lkFImeXTS+bhAjuCFV7w7tW5bXg27BJVrxv+nC/nyYa86qEa0oFeHwqol6ha5k4pdVDQgBF09GM4A1k76Ssg=="],"expo-linking": ["[email protected]", "", { "dependencies": { "expo-constants": "~57.0.3", "invariant": "^2.2.4" }, "peerDependencies": { "react": "*", "react-native": "*" } }, "sha512-A7912NxC4ibDiv7fN2BuEWCrTCmmWdaD+bQa4iNddPDOa3Svs1YDoWdbhJt3mniSaAh9AnUKS2MdFbO4zk8z+Q=="],@@ -1605,10 +1546,14 @@"expo-server": ["[email protected]", "", {}, "sha512-sBfVDH6dmKVHZxqUxbfkzS00PZELMZt1IpnHKxcOTMZtR/t7CtRAFrbXcisG+EyzeqHSVDacZT+1tbYfZt5D8w=="],+ "expo-sharing": ["[email protected]", "", { "dependencies": { "@expo/config-plugins": "^57.0.5", "@expo/config-types": "^57.0.2", "@expo/plist": "^0.8.1" }, "peerDependencies": { "expo": "*", "react": "*", "react-native": "*" } }, "sha512-mxGWmKJxIEx7r17ubP8Fu7OrMs9wLhWgdS/GFf3rL5eGNgJ+5taNN1euLiisHiSShr1QxQ2brzk8ndcBj9uIgg=="],+"expo-status-bar": ["[email protected]", "", { "peerDependencies": { "expo": "*", "react": "*", "react-native": "*" } }, "sha512-Xwaq1gAoVRWx5dPG5VhT5RSbnI9OilhZnO5qoPBnUaBAa5VzRzfdS8q0/bsPt0jR2DKLtGuP0bQ6efMJ4RIMDg=="],"expo-symbols": ["[email protected]", "", { "dependencies": { "@expo-google-fonts/material-symbols": "^0.4.1", "sf-symbols-typescript": "^2.0.0" }, "peerDependencies": { "expo": "*", "expo-font": "*", "react": "*", "react-native": "*" } }, "sha512-8Zf+a83OywV0vf1NUtSKpNqKcULmO0GTI+zfFnGYl7SLDH9FjL5RcEZoy6CHvCgq2KDrQF21pl3r7Tb4ItPscw=="],+ "expo-system-ui": ["[email protected]", "", { "dependencies": { "@react-native/normalize-colors": "0.86.0", "debug": "^4.3.2" }, "peerDependencies": { "expo": "*", "react-native": "*", "react-native-web": "*" }, "optionalPeers": ["react-native-web"] }, "sha512-r8a6Jk2suL0vI7Uq4iKJab5Eesk8dkB56Q6HksVNkzuAExV0axoikQwZv8aAyHGbu2VHp0artB0N1/PQDLSgBg=="],+"exponential-backoff": ["[email protected]", "", {}, "sha512-ZgEeZXj30q+I0EN+CbSSpIyPaJ5HVQD18Z1m+u1FXbAeT94mr1zw50q4q6jiiC447Nl/YTcIYSAftiGqetwXCA=="],"exsolve": ["[email protected]", "", {}, "sha512-D+42+T12DdIlJM3uepa55qGiL3sYdLBOxIl2ifQCzCHz4c7eiolaHsi3BIqEr7JxBzxv2pYZQX9kw16ziMcEmw=="],@@ -1657,20 +1602,10 @@"finalhandler": ["[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" } }, "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA=="],- "find-cache-dir": ["[email protected]", "", { "dependencies": { "commondir": "^1.0.1", "make-dir": "^2.0.0", "pkg-dir": "^3.0.0" } }, "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ=="],-- "find-package-json": ["[email protected]", "", {}, "sha512-+SOGcLGYDJHtyqHd87ysBhmaeQ95oWspDKnMXBrnQ9Eq4OkLNqejgoaD8xVWu6GPa0B6roa6KinCMEMcVeqONw=="],-- "find-up": ["[email protected]", "", { "dependencies": { "locate-path": "^3.0.0" } }, "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg=="],-"flattie": ["[email protected]", "", {}, "sha512-9UbaD6XdAL97+k/n+N7JwX46K/M6Zc6KcFYskrYL8wbBV/Uyk0CTAMY0VT+qiK5PM7AIc9aTWYtq65U7T+aCNQ=="],"flow-enums-runtime": ["[email protected]", "", {}, "sha512-3PYnM29RFXwvAN6Pc/scUfkI7RwhQ/xqyLUyPNlXUp9S40zI8nup9tUSrTLSVnWGBN38FNiGWbwZOB6uR4OGdw=="],- "flow-estree": ["[email protected]", "", {}, "sha512-rQY7YKoo+PKpAHQjEP2cxyIefk04OCEKUlbtV4y6LAUG3Ly7guQX9YH8th6drSmYcNkMgpqWMaHRhhYaAF69CA=="],-- "flow-parser": ["[email protected]", "", { "dependencies": { "flow-estree": "0.321.0" } }, "sha512-9LNK2rp/NWWbwdEK6mxC54XfQRyD2lVV0iPVBYf+5o5vvqJl7ietkR1hX3/dZ39j0GAbL4PIFoeekDViOW0x/Q=="],-"fontace": ["[email protected]", "", { "dependencies": { "fontkitten": "^1.0.2" } }, "sha512-lDMvbAzSnHmbYMTEld5qdtvNH2/pWpICOqpean9IgC7vUbUJc3k+k5Dokp85CegamqQpFbXf0rAVkbzpyTA8aw=="],"fontfaceobserver": ["[email protected]", "", {}, "sha512-6FPvD/IVyT4ZlNe7Wcn5Fb/4ChigpucKYSvD6a+0iMoLn2inpo711eyIcKjmDtE5XNcgAkSH9uN/nfAeZzHEfg=="],@@ -1687,7 +1622,7 @@"fresh": ["[email protected]", "", {}, "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q=="],- "fs-extra": ["[email protected]", "", { "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", "universalify": "^2.0.0" } }, "sha512-w8ZNZr2mKIc7qeNaQ9AVPT1+iFaI+Avd4xudVOvdDJ8VytREi1Ft5Ih7hd9jjehod8vAM5GMsfQ/TpPf4EyoEA=="],+ "fs-extra": ["[email protected]", "", { "dependencies": { "at-least-node": "^1.0.0", "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", "universalify": "^2.0.0" } }, "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ=="],"fsevents": ["[email protected]", "", { "os": "darwin" }, "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw=="],@@ -1729,8 +1664,6 @@"globalthis": ["[email protected]", "", { "dependencies": { "define-properties": "^1.2.1", "gopd": "^1.0.1" } }, "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ=="],- "gluestack-ui": ["[email protected]", "", { "dependencies": { "@clack/prompts": "^0.6.3", "chalk": "4.1.2", "commander": "^12.0.0", "fast-glob": "^3.3.2", "find-package-json": "^1.2.0", "fs-extra": "^11.1.0", "jscodeshift": "^17.1.1", "nativewind": "^4.1.23", "prettier": "^3.3.2", "react-aria": "^3.33.0", "react-native-svg": "^15.2.0", "recast": "^0.23.9", "simple-git": "^3.16.0", "zod": "^3.22.4" }, "bin": { "gluestack-ui": "dist/index.js" } }, "sha512-jXLyWJcf+Ls1NUeLEFKkmorGGjf1hzZkcIpkJODLcM1oFglNaEM26tn0bkU4Nrx6XyEWvJ1gEzrHcUHmH3jAJQ=="],-"gopd": ["[email protected]", "", {}, "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg=="],"graceful-fs": ["[email protected]", "", {}, "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ=="],@@ -1815,8 +1748,6 @@"import-meta-resolve": ["[email protected]", "", {}, "sha512-Iqv2fzaTQN28s/FwZAoFq0ZSs/7hMAHJVX+w8PZl3cY19Pxk6jFFalxQoIfW2826i/fDLXv8IiEZRIT0lDuWcg=="],- "imurmurhash": ["[email protected]", "", {}, "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA=="],-"indent-string": ["[email protected]", "", {}, "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg=="],"inherits": ["[email protected]", "", {}, "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="],@@ -1885,9 +1816,7 @@"is-obj": ["[email protected]", "", {}, "sha512-l4RyHgRqGN4Y3+9JHVrNqO+tN0rV5My76uW5/nuO4K1b6vw5G8d/cmFjP9tRfEsdhZNt0IFdZuK/c2Vr4Nb+Qg=="],- "is-plain-obj": ["[email protected]", "", {}, "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA=="],-- "is-plain-object": ["[email protected]", "", { "dependencies": { "isobject": "^3.0.1" } }, "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og=="],+ "is-plain-obj": ["[email protected]", "", {}, "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg=="],"is-regex": ["[email protected]", "", { "dependencies": { "call-bound": "^1.0.2", "gopd": "^1.2.0", "has-tostringtag": "^1.0.2", "hasown": "^2.0.2" } }, "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g=="],@@ -1919,8 +1848,6 @@"isexe": ["[email protected]", "", {}, "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw=="],- "isobject": ["[email protected]", "", {}, "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg=="],-"jackspeak": ["[email protected]", "", { "dependencies": { "@isaacs/cliui": "^9.0.0" } }, "sha512-ykkVRwrYvFm1nb2AJfKKYPr0emF6IiXDYUaFx4Zn9ZuIH7MrzEZ3sD5RlqGXNRpHtvUHJyOnCEFxOlNDtGo7wg=="],"jake": ["[email protected]", "", { "dependencies": { "async": "^3.2.6", "filelist": "^1.0.4", "picocolors": "^1.1.1" }, "bin": { "jake": "bin/cli.js" } }, "sha512-wpHYzhxiVQL+IV05BLE2Xn34zW1S223hvjtqk0+gsPrwd/8JNLXJgZZM/iPFsYc1xyphF+6M6EvdE5E9MBGkDA=="],@@ -1943,8 +1870,6 @@"jsc-safe-url": ["[email protected]", "", {}, "sha512-0wM3YBWtYePOjfyXQH5MWQ8H7sdk5EXSwZvmSLKk2RboVQ2Bu239jycHDz5J/8Blf3K0Qnoy2b6xD+z10MFB+Q=="],- "jscodeshift": ["[email protected]", "", { "dependencies": { "@babel/core": "^7.24.7", "@babel/parser": "^7.24.7", "@babel/plugin-transform-class-properties": "^7.24.7", "@babel/plugin-transform-modules-commonjs": "^7.24.7", "@babel/plugin-transform-nullish-coalescing-operator": "^7.24.7", "@babel/plugin-transform-optional-chaining": "^7.24.7", "@babel/plugin-transform-private-methods": "^7.24.7", "@babel/preset-flow": "^7.24.7", "@babel/preset-typescript": "^7.24.7", "@babel/register": "^7.24.6", "flow-parser": "0.*", "graceful-fs": "^4.2.4", "micromatch": "^4.0.7", "neo-async": "^2.5.0", "picocolors": "^1.0.1", "recast": "^0.23.11", "tmp": "^0.2.3", "write-file-atomic": "^5.0.1" }, "peerDependencies": { "@babel/preset-env": "^7.1.6" }, "optionalPeers": ["@babel/preset-env"], "bin": { "jscodeshift": "bin/jscodeshift.js" } }, "sha512-LjFrGOIORqXBU+jwfC9nbkjmQfFldtMIoS6d9z2LG/lkmyNXsJAySPT+2SWXJEoE68/bCWcxKpXH37npftgmow=="],-"jsesc": ["[email protected]", "", { "bin": { "jsesc": "bin/jsesc" } }, "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA=="],"json-schema-traverse": ["[email protected]", "", {}, "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug=="],@@ -1957,8 +1882,6 @@"jsonpointer": ["[email protected]", "", {}, "sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ=="],- "kind-of": ["[email protected]", "", {}, "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw=="],-"kleur": ["[email protected]", "", {}, "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w=="],"kolorist": ["[email protected]", "", {}, "sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ=="],@@ -2001,8 +1924,6 @@"local-pkg": ["[email protected]", "", { "dependencies": { "mlly": "^1.7.4", "pkg-types": "^2.3.0", "quansync": "^0.2.11" } }, "sha512-++gUqRDEvcnN6Zhqrr+y/CkVEHhlrR96vZn3nZZPYzMcBUyBtTKzB9NadClFIsIVSsu+3i9tfk/erqy9kAmt7Q=="],- "locate-path": ["[email protected]", "", { "dependencies": { "p-locate": "^3.0.0", "path-exists": "^3.0.0" } }, "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A=="],-"lodash.debounce": ["[email protected]", "", {}, "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow=="],"lodash.sortby": ["[email protected]", "", {}, "sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA=="],@@ -2029,8 +1950,6 @@"magicast": ["[email protected]", "", { "dependencies": { "@babel/parser": "^7.29.3", "@babel/types": "^7.29.0", "source-map-js": "^1.2.1" } }, "sha512-pVKE4UdSQ7DvHzivsCIFx2BJn1mHG6KsyrFcaxFx6tONdneEuThrDx0Cj3AMg58KyN4pzYT+LHOotxDQDjNvkw=="],- "make-dir": ["[email protected]", "", { "dependencies": { "pify": "^4.0.1", "semver": "^5.6.0" } }, "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA=="],-"makeerror": ["[email protected]", "", { "dependencies": { "tmpl": "1.0.5" } }, "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg=="],"markdown-extensions": ["[email protected]", "", {}, "sha512-o5vL7aDWatOTX8LzaS1WMoaoxIiLRQJuIKKe2wAw6IeULDHaqbiqiggmx+pKvZDb1Sj+pE46Sn1T7lCqfFtg1Q=="],@@ -2081,8 +2000,6 @@"memoize-one": ["[email protected]", "", {}, "sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q=="],- "merge-options": ["[email protected]", "", { "dependencies": { "is-plain-obj": "^2.1.0" } }, "sha512-2Sug1+knBjkaMsMgf1ctR1Ujx+Ayku4EdJN4Z+C2+JzoeF7A3OZ9KM2GY0CpQS51NR61LTurMJrRKPhSs3ZRTQ=="],-"merge-stream": ["[email protected]", "", {}, "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w=="],"merge2": ["[email protected]", "", {}, "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg=="],@@ -2225,12 +2142,8 @@"nanoid": ["[email protected]", "", { "bin": { "nanoid": "bin/nanoid.cjs" } }, "sha512-y7Wygv/7mEOvxTuEQDB8StXdMRBWf1kR/tlhAzBRUFkB2jfcLOAxO/SHmOO2zgz1pVgK29/kyupn059/bCHdjA=="],- "nativewind": ["[email protected]", "", { "dependencies": { "comment-json": "^4.2.5", "debug": "^4.3.7", "react-native-css-interop": "0.2.6" }, "peerDependencies": { "tailwindcss": ">3.3.0" } }, "sha512-kLPRH3Yh/hhIFufXzUZDe39fuK471GwaPBCqYNgcRygILr+obV+wFfDmG+zaJnniVUFFQzYOTCEldem6XktZ+A=="],-"negotiator": ["[email protected]", "", {}, "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg=="],- "neo-async": ["[email protected]", "", {}, "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw=="],-"neotraverse": ["[email protected]", "", {}, "sha512-Z4SmBUweYa09+o6pG+eASabEpP6QkQ70yHj351pQoEXIs8uHbaU2DWVmzBANKgflPa47A50PtB2+NgRpQvr7vA=="],"nlcst-to-string": ["[email protected]", "", { "dependencies": { "@types/nlcst": "^2.0.0" } }, "sha512-YKLBCcUYKAg0FNlOBT6aI91qFmSiFKiluk655WzPF+DDMA02qIyy8uiRqI8QXtcFpEvll12LpL5MXqEmAZ+dcA=="],@@ -2291,14 +2204,10 @@"p-limit": ["[email protected]", "", { "dependencies": { "yocto-queue": "^1.1.1" } }, "sha512-kuUqqHNUqoIWp/c467RI4X6mmyuojY5jGutNU0wVTmEOOfcuwLqyMVoAi9MKi2Ak+5i9+nhmrK4ufZE8069kHA=="],- "p-locate": ["[email protected]", "", { "dependencies": { "p-limit": "^2.0.0" } }, "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ=="],-"p-queue": ["[email protected]", "", { "dependencies": { "eventemitter3": "^5.0.1", "p-timeout": "^6.1.2" } }, "sha512-aNZ+VfjobsWryoiPnEApGGmf5WmNsCo9xu8dfaYamG5qaLP7ClhLN6NgsFe6SwJ2UbLEBK5dv9x8Mn5+RVhMWQ=="],"p-timeout": ["[email protected]", "", {}, "sha512-MyIV3ZA/PmyBN/ud8vV9XzwTrNtR4jFrObymZYnZqMmW0zA8Z17vnT0rBgFE/TlohB+YCHqXMgZzb3Csp49vqg=="],- "p-try": ["[email protected]", "", {}, "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ=="],-"package-json-from-dist": ["[email protected]", "", {}, "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw=="],"package-manager-detector": ["[email protected]", "", {}, "sha512-xg1eHpwYL/D/HEdWw2goFZP6vV0FH7W+PZ5rFkGjdIDLtxq7EkzBUeT3m+lndYCt8wKbmofUu1MUdMCXkCk9ZQ=="],@@ -2319,8 +2228,6 @@"path-browserify": ["[email protected]", "", {}, "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g=="],- "path-exists": ["[email protected]", "", {}, "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ=="],-"path-expression-matcher": ["[email protected]", "", {}, "sha512-h7bxdzhHk8Knyc4Tj+jMaa7fEEoUJy7p1qtbVgkYg1Uhpe5Np5VuGXCRZnkZvU+Q42M1vStt0ifa3ueykRJPmQ=="],"path-key": ["[email protected]", "", {}, "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q=="],@@ -2345,8 +2252,6 @@"pirates": ["[email protected]", "", {}, "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA=="],- "pkg-dir": ["[email protected]", "", { "dependencies": { "find-up": "^3.0.0" } }, "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw=="],-"pkg-types": ["[email protected]", "", { "dependencies": { "confbox": "^0.2.4", "exsolve": "^1.0.8", "pathe": "^2.0.3" } }, "sha512-y+ichcgc2LrADuhLNAx8DFjVfgz91pRxfZdI3UDhxHvcVEZsenLO+7XaU5vOp0u/7V/wZ+plyuQxtrDlZJ+yeg=="],"plist": ["[email protected]", "", { "dependencies": { "@xmldom/xmldom": "^0.9.10", "base64-js": "^1.5.1", "xmlbuilder": "^15.1.1" } }, "sha512-ZIfcLJC+7E7FBFnDxm9MPmt7D+DidyQ26lewieO75AdhA2ayMtsJSES0iWzqJQbcVRSrTufQoy0DR94xHue0oA=="],@@ -2433,8 +2338,6 @@"react": ["[email protected]", "", {}, "sha512-HNe9WslTbXmFK8o8cmwgAeJFSBvt1bPdHCVKtaaV+WlAN36mpT4hcRpwbf3fY56ar2oIXzsBpOAiIRHAdY0OlQ=="],- "react-aria": ["[email protected]", "", { "dependencies": { "@internationalized/date": "^3.12.2", "@internationalized/number": "^3.6.7", "@internationalized/string": "^3.2.9", "@react-types/shared": "^3.36.0", "@swc/helpers": "^0.5.0", "aria-hidden": "^1.2.3", "clsx": "^2.0.0", "react-stately": "3.48.0", "use-sync-external-store": "^1.6.0" }, "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" } }, "sha512-S0Os6QZk33fzUAKu1QLT9afoUaCBt1ZNdoiq0n2YMVgKIdNIQS8zxiZ8O9hYE6QyDkHKjD6q39LQZ+qaSAIgjw=="],-"react-devtools-core": ["[email protected]", "", { "dependencies": { "shell-quote": "^1.6.1", "ws": "^7" } }, "sha512-ePrwPfxAnB+7hgnEr8vpKxL9cmnp7F322t8oqcPshbIQQhDKgFDW4tjhF2wjVbdXF9O/nyuy3sQWd9JGpiLPvA=="],"react-dom": ["[email protected]", "", { "dependencies": { "scheduler": "^0.27.0" }, "peerDependencies": { "react": "^19.2.7" } }, "sha512-t0BRVXvbiE/o20Hfw669rLbMCDWtYZLvmJigy2f0MxsXF+71pxhR3xOkspmsO8h3ZlNzyibAmtCa3l4lYKk6gQ=="],@@ -2451,8 +2354,6 @@"react-native": ["[email protected]", "", { "dependencies": { "@react-native/assets-registry": "0.86.0", "@react-native/codegen": "0.86.0", "@react-native/community-cli-plugin": "0.86.0", "@react-native/gradle-plugin": "0.86.0", "@react-native/js-polyfills": "0.86.0", "@react-native/normalize-colors": "0.86.0", "@react-native/virtualized-lists": "0.86.0", "abort-controller": "^3.0.0", "anser": "^1.4.9", "ansi-regex": "^5.0.0", "babel-plugin-syntax-hermes-parser": "0.36.0", "base64-js": "^1.5.1", "commander": "^12.0.0", "flow-enums-runtime": "^0.0.6", "hermes-compiler": "250829098.0.14", "invariant": "^2.2.4", "memoize-one": "^5.0.0", "metro-runtime": "^0.84.3", "metro-source-map": "^0.84.3", "nullthrows": "^1.1.1", "pretty-format": "^29.7.0", "promise": "^8.3.0", "react-devtools-core": "^6.1.5", "react-refresh": "^0.14.0", "regenerator-runtime": "^0.13.2", "scheduler": "0.27.0", "semver": "^7.1.3", "stacktrace-parser": "^0.1.10", "tinyglobby": "^0.2.15", "whatwg-fetch": "^3.0.0", "ws": "^7.5.10", "yargs": "^17.6.2" }, "peerDependencies": { "@react-native/jest-preset": "0.86.0", "@types/react": "^19.1.1", "react": "^19.2.3" }, "optionalPeers": ["@react-native/jest-preset", "@types/react"], "bin": { "react-native": "cli.js" } }, "sha512-17ALh/dd6AO4pgOVmOO5Axll5PbErEo3XFyLokyzW6usyi+OShIEPwUW26wLPlhVifgSOIfECCH0WN+0IqtJ1w=="],- "react-native-css-interop": ["[email protected]", "", { "dependencies": { "@babel/helper-module-imports": "^7.22.15", "@babel/traverse": "^7.23.0", "@babel/types": "^7.23.0", "debug": "^4.3.7", "lightningcss": "~1.27.0", "semver": "^7.6.3" }, "peerDependencies": { "react": ">=18", "react-native": "*", "react-native-reanimated": ">=3.6.2", "react-native-safe-area-context": "*", "react-native-svg": "*", "tailwindcss": "~3" }, "optionalPeers": ["react-native-safe-area-context", "react-native-svg"] }, "sha512-uXad6EWqufupnRjrba2De30tiAx26kLEcwSV3eSLVBwpfYeOnrpDc9k6kHk6SBNbmHHlE5sc9vsfKdVRS9msYg=="],-"react-native-drawer-layout": ["[email protected]", "", { "dependencies": { "color": "^4.2.3", "use-latest-callback": "^0.2.4" }, "peerDependencies": { "react": ">= 18.2.0", "react-native": "*", "react-native-gesture-handler": ">= 2.0.0", "react-native-reanimated": ">= 2.0.0" } }, "sha512-hhD+E0QmUPkP2Sj1MsUdrvU7GeOiHChPAFPtKahroTwlBGnpgJsUVSL0GWOy5cG3oCZfnu4Pb+gIzOa4ItGNuA=="],"react-native-gesture-handler": ["[email protected]", "", { "dependencies": { "@egjs/hammerjs": "^2.0.17", "@types/react-test-renderer": "^19.1.0", "hoist-non-react-statics": "^3.3.0", "invariant": "^2.2.4" }, "peerDependencies": { "react": "*", "react-native": "*" } }, "sha512-uYIMOKlKENORq2SABE+jIjbPU+h5I/sQKcq2v16zRq848nwEp1fWRVwML4QWqijc8UcXJC25o54S8GQd4Mf2OA=="],@@ -2479,16 +2380,12 @@"react-router": ["[email protected]", "", { "dependencies": { "cookie-es": "^3.1.1" }, "peerDependencies": { "react": ">=19.2.7", "react-dom": ">=19.2.7" }, "optionalPeers": ["react-dom"] }, "sha512-Mdfi61uObuvWNN9OhChOC0HV6YWOIfKRzEWOvCHRSuQg8IM+Nv10edaM/2HE8ZixBpUTdQbruyWqC3sDkkh9vw=="],- "react-stately": ["[email protected]", "", { "dependencies": { "@internationalized/date": "^3.12.2", "@internationalized/number": "^3.6.7", "@internationalized/string": "^3.2.9", "@react-types/shared": "^3.36.0", "@swc/helpers": "^0.5.0", "use-sync-external-store": "^1.6.0" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" } }, "sha512-ImicSAG+lTotAe5izcs1fz49Zk48w7pDusqYg04WaPhCoej8BJ24soMu3iLXIrsi273s4P1gZrYGrqReMfgEEA=="],-"react-style-singleton": ["[email protected]", "", { "dependencies": { "get-nonce": "^1.0.0", "tslib": "^2.0.0" }, "peerDependencies": { "@types/react": "*", "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-b6jSvxvVnyptAiLjbkWLE/lOnR4lfTtDAl+eUC7RZy+QQWc6wRzIV2CE6xBuMmDxc2qIihtDCZD5NPOFl7fRBQ=="],"read-cache": ["[email protected]", "", { "dependencies": { "pify": "^2.3.0" } }, "sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA=="],"readdirp": ["[email protected]", "", { "dependencies": { "picomatch": "^2.2.1" } }, "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA=="],- "recast": ["[email protected]", "", { "dependencies": { "ast-types": "^0.16.1", "esprima": "~4.0.0", "source-map": "~0.6.1", "tiny-invariant": "^1.3.3", "tslib": "^2.0.1" } }, "sha512-dEWRjcINDu/F4l2dYx57ugBtD7HV9KXESyxhzw/MqWLeglJrsjJKqACPyUPg+6AF8mIgm+Zi0dZ3ACoIg+QtpA=="],-"recma-build-jsx": ["[email protected]", "", { "dependencies": { "@types/estree": "^1.0.0", "estree-util-build-jsx": "^3.0.0", "vfile": "^6.0.0" } }, "sha512-8GtdyqaBcDfva+GUKDr3nev3VpKAhup1+RvkMvUxURHpW7QyIvk9F5wz7Vzo06CEMSilw6uArgRqhpiUcWp8ew=="],"recma-jsx": ["[email protected]", "", { "dependencies": { "acorn-jsx": "^5.0.0", "estree-util-to-js": "^2.0.0", "recma-parse": "^1.0.0", "recma-stringify": "^1.0.0", "unified": "^11.0.0" }, "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, "sha512-huSIy7VU2Z5OLv6oFLosQGGDqPqdO1iq6bWNAdhzMxSJP7RAso4fCZ1cKu8j9YHCZf3TPrq4dw3okhrylgcd7w=="],@@ -2613,8 +2510,6 @@"sf-symbols-typescript": ["[email protected]", "", {}, "sha512-TPbeg0b7ylrswdGCji8FRGFAKuqbpQlLbL8SOle3j1iHSs5Ob5mhvMAxWN2UItOjgALAB5Zp3fmMfj8mbWvXKw=="],- "shallow-clone": ["[email protected]", "", { "dependencies": { "kind-of": "^6.0.2" } }, "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA=="],-"shallowequal": ["[email protected]", "", {}, "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ=="],"sharp": ["[email protected]", "", { "dependencies": { "@img/colour": "^1.1.0", "detect-libc": "^2.1.2", "semver": "^7.8.4" }, "optionalDependencies": { "@img/sharp-darwin-arm64": "0.35.2", "@img/sharp-darwin-x64": "0.35.2", "@img/sharp-freebsd-wasm32": "0.35.2", "@img/sharp-libvips-darwin-arm64": "1.3.1", "@img/sharp-libvips-darwin-x64": "1.3.1", "@img/sharp-libvips-linux-arm": "1.3.1", "@img/sharp-libvips-linux-arm64": "1.3.1", "@img/sharp-libvips-linux-ppc64": "1.3.1", "@img/sharp-libvips-linux-riscv64": "1.3.1", "@img/sharp-libvips-linux-s390x": "1.3.1", "@img/sharp-libvips-linux-x64": "1.3.1", "@img/sharp-libvips-linuxmusl-arm64": "1.3.1", "@img/sharp-libvips-linuxmusl-x64": "1.3.1", "@img/sharp-linux-arm": "0.35.2", "@img/sharp-linux-arm64": "0.35.2", "@img/sharp-linux-ppc64": "0.35.2", "@img/sharp-linux-riscv64": "0.35.2", "@img/sharp-linux-s390x": "0.35.2", "@img/sharp-linux-x64": "0.35.2", "@img/sharp-linuxmusl-arm64": "0.35.2", "@img/sharp-linuxmusl-x64": "0.35.2", "@img/sharp-webcontainers-wasm32": "0.35.2", "@img/sharp-win32-arm64": "0.35.2", "@img/sharp-win32-ia32": "0.35.2", "@img/sharp-win32-x64": "0.35.2" } }, "sha512-FVtFjtBCMiJS6yb5CX7Sop45WFMpeGw6oRKuJnXYgf/f1ms/D7LE/ZUSNxnW7rZ/dbslQWYkoqFHGPaDBtaK4w=="],@@ -2637,8 +2532,6 @@"signal-exit": ["[email protected]", "", {}, "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw=="],- "simple-git": ["[email protected]", "", { "dependencies": { "@kwsites/file-exists": "^1.1.1", "@kwsites/promise-deferred": "^1.1.1", "@simple-git/args-pathspec": "^1.0.3", "@simple-git/argv-parser": "^1.1.0", "debug": "^4.4.0" } }, "sha512-cGQjLjK8bxJw4QuYT7gxHw3/IouVESbhahSsHrX97MzCL1gu2u7oy38W6L2ZIGECEfIBG4BabsWDPjBxJENv9Q=="],-"simple-plist": ["[email protected]", "", { "dependencies": { "bplist-creator": "0.1.0", "bplist-parser": "0.3.1", "plist": "^3.0.5" } }, "sha512-iMSw5i0XseMnrhtIzRb7XpQEXepa9xhWxGUojHBL43SIpQuDQkh3Wpy67ZbDzZVr6EKxvwVChnVpdl8hEVLDiw=="],"simple-swizzle": ["[email protected]", "", { "dependencies": { "is-arrayish": "^0.3.1" } }, "sha512-nAu1WFPQSMNr2Zn9PGSZK9AGn4t/y97lEm+MXTtUDwfP0ksAIX4nO+6ruD9Jwut4C49SB1Ws+fbXsm/yScWOHw=="],@@ -2743,14 +2636,10 @@"tiny-inflate": ["[email protected]", "", {}, "sha512-pkY1fj1cKHb2seWDy0B16HeWyczlJA9/WW3u3c4z/NiWDsO3DOU5D7nhTLE9CF0yXv/QZFY7sEJmj24dK+Rrqw=="],- "tiny-invariant": ["[email protected]", "", {}, "sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg=="],-"tinyexec": ["[email protected]", "", {}, "sha512-SHf/r48b7vOrjve9PxJo3MN5v5yuyjHvdUcrQffT3WXMUfnGmHDVbC4k3sHJaJTgZCwpUplIaAo5ANtMyp3YHg=="],"tinyglobby": ["[email protected]", "", { "dependencies": { "fdir": "^6.5.0", "picomatch": "^4.0.4" } }, "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g=="],- "tmp": ["[email protected]", "", {}, "sha512-e0votIpp4Uo2AJYSzVHV6xCcawuiez3DzqDAbrTc3YxBkplN6e+dM13ZeIcZnDg/QpSuU2zfZ3rzwY8ukEnaXw=="],-"tmpl": ["[email protected]", "", {}, "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw=="],"to-regex-range": ["[email protected]", "", { "dependencies": { "is-number": "^7.0.0" } }, "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ=="],@@ -2995,8 +2884,6 @@"wrappy": ["[email protected]", "", {}, "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="],- "write-file-atomic": ["[email protected]", "", { "dependencies": { "imurmurhash": "^0.1.4", "signal-exit": "^4.0.1" } }, "sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw=="],-"ws": ["[email protected]", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": "^5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-zS54Oen9bITtp7kp2XM3AydrCIq1D+HwJOuH+c+e4LfpL/lotP5osijd+UoMnxwAam1GN8R4KtLAyIrIcBNpiA=="],"xcode": ["[email protected]", "", { "dependencies": { "simple-plist": "^1.1.0", "uuid": "^7.0.3" } }, "sha512-kCz5k7J7XbJtjABOvkc5lJmkiDh8VhjVCGNiqdKCscmVpdVUpEAyXv1xmCLkQJ5dsHqx3IPO4XW+NTDhU/fatA=="],@@ -3069,12 +2956,8 @@"@babel/preset-env/semver": ["[email protected]", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="],- "@clack/prompts/is-unicode-supported": ["[email protected]", "", { "bundled": true }, "sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ=="],-"@cspotcode/source-map-support/@jridgewell/trace-mapping": ["@jridgewell/[email protected]", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.0.3", "@jridgewell/sourcemap-codec": "^1.4.10" } }, "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ=="],- "@edgeever/mobile/@tanstack/react-query": ["@tanstack/[email protected]", "", { "dependencies": { "@tanstack/query-core": "5.101.2" }, "peerDependencies": { "react": "^18 || ^19" } }, "sha512-seDkr6kzGzX1okaaTtZPtgA688CDPlXUz1C6xSg0ESqn04Vuc8tlrYms1s3de+znBqhPVxFRfpAfUf+6XvfPWg=="],-"@edgeever/mobile/react": ["[email protected]", "", {}, "sha512-Ku/hhYbVjOQnXDZFv2+RibmLFGwFdeeKHFcOTlrt7xplBnya5OGn/hIRDsqDiSUcfORsDC7MPxwork8jBwsIWA=="],"@edgeever/site/sharp": ["[email protected]", "", { "dependencies": { "color": "^4.2.3", "detect-libc": "^2.0.3", "semver": "^7.6.3" }, "optionalDependencies": { "@img/sharp-darwin-arm64": "0.33.5", "@img/sharp-darwin-x64": "0.33.5", "@img/sharp-libvips-darwin-arm64": "1.0.4", "@img/sharp-libvips-darwin-x64": "1.0.4", "@img/sharp-libvips-linux-arm": "1.0.5", "@img/sharp-libvips-linux-arm64": "1.0.4", "@img/sharp-libvips-linux-s390x": "1.0.4", "@img/sharp-libvips-linux-x64": "1.0.4", "@img/sharp-libvips-linuxmusl-arm64": "1.0.4", "@img/sharp-libvips-linuxmusl-x64": "1.0.4", "@img/sharp-linux-arm": "0.33.5", "@img/sharp-linux-arm64": "0.33.5", "@img/sharp-linux-s390x": "0.33.5", "@img/sharp-linux-x64": "0.33.5", "@img/sharp-linuxmusl-arm64": "0.33.5", "@img/sharp-linuxmusl-x64": "0.33.5", "@img/sharp-wasm32": "0.33.5", "@img/sharp-win32-ia32": "0.33.5", "@img/sharp-win32-x64": "0.33.5" } }, "sha512-haPVm1EkS9pgvHrQ/F3Xy+hgcuMV0Wm9vfIBSiwZ05k+xgb0PkBQpGsAA/oWdDobNaZTH5ppvHtzCFbnSEwHVw=="],@@ -3243,12 +3126,6 @@"finalhandler/statuses": ["[email protected]", "", {}, "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA=="],- "gluestack-ui/chalk": ["[email protected]", "", { "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="],-- "gluestack-ui/react-native-svg": ["[email protected]", "", { "dependencies": { "css-select": "^5.1.0", "css-tree": "^1.1.3" }, "peerDependencies": { "react": "*", "react-native": "*" } }, "sha512-L4go5jA+GWutdJ/JucuN20cjAbMg1HmMtAP+wZ+3JLCf6Jd0bhXQHxciRP/AQm/FlrIEZwkMcHNZP+FXAiic0w=="],-- "gluestack-ui/zod": ["[email protected]", "", {}, "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ=="],-"h3/cookie-es": ["[email protected]", "", {}, "sha512-lXVyvUvrNXblMqzIRrxHb57UUVmqsSWlxqt3XIjCkUP0wDAf6uicO6KMbEgYrMNtEvWgWHwe42CKxPu9MYAnWw=="],"hoist-non-react-statics/react-is": ["[email protected]", "", {}, "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="],@@ -3273,10 +3150,6 @@"log-symbols/chalk": ["[email protected]", "", { "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", "supports-color": "^5.3.0" } }, "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ=="],- "make-dir/pify": ["[email protected]", "", {}, "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g=="],-- "make-dir/semver": ["[email protected]", "", { "bin": { "semver": "bin/semver" } }, "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g=="],-"mdast-util-find-and-replace/escape-string-regexp": ["[email protected]", "", {}, "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw=="],"metro/accepts": ["[email protected]", "", { "dependencies": { "mime-types": "^3.0.0", "negotiator": "^1.0.0" } }, "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng=="],@@ -3313,16 +3186,12 @@"ora/strip-ansi": ["[email protected]", "", { "dependencies": { "ansi-regex": "^4.1.0" } }, "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA=="],- "p-locate/p-limit": ["[email protected]", "", { "dependencies": { "p-try": "^2.0.0" } }, "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w=="],-"parse-entities/@types/unist": ["@types/[email protected]", "", {}, "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA=="],"parse5/entities": ["[email protected]", "", {}, "sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g=="],"plist/@xmldom/xmldom": ["@xmldom/[email protected]", "", {}, "sha512-A9gOqLdi6cV4ibazAjcQufGj0B1y/vDqYrcuP6d/6x8P27gRS8643Dj9o1dEKtB6O7fwxb2FgBmJS2mX7gpvdw=="],- "pretty-format/ansi-styles": ["[email protected]", "", {}, "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA=="],-"pretty-format/react-is": ["[email protected]", "", {}, "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg=="],"prop-types/react-is": ["[email protected]", "", {}, "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="],@@ -3331,12 +3200,8 @@"react-native/yargs": ["[email protected]", "", { "dependencies": { "cliui": "^8.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", "string-width": "^4.2.3", "y18n": "^5.0.5", "yargs-parser": "^21.1.1" } }, "sha512-GZtjxm/J/4TSxuL3FNYjCmLktBTnIw/rVmKSIyKeYAZpmJB2ig9VauCC5xsa82GNKVKDAqpOn3KVzNt0zmrU0g=="],- "react-native-css-interop/lightningcss": ["[email protected]", "", { "dependencies": { "detect-libc": "^1.0.3" }, "optionalDependencies": { "lightningcss-darwin-arm64": "1.27.0", "lightningcss-darwin-x64": "1.27.0", "lightningcss-freebsd-x64": "1.27.0", "lightningcss-linux-arm-gnueabihf": "1.27.0", "lightningcss-linux-arm64-gnu": "1.27.0", "lightningcss-linux-arm64-musl": "1.27.0", "lightningcss-linux-x64-gnu": "1.27.0", "lightningcss-linux-x64-musl": "1.27.0", "lightningcss-win32-arm64-msvc": "1.27.0", "lightningcss-win32-x64-msvc": "1.27.0" } }, "sha512-8f7aNmS1+etYSLHht0fQApPc2kNO8qGRutifN5rVIc6Xo6ABsEbqOr758UwI7ALVbTt4x1fllKt0PYgzD9S3yQ=="],-"readdirp/picomatch": ["[email protected]", "", {}, "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA=="],- "recast/source-map": ["[email protected]", "", {}, "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="],-"restore-cursor/signal-exit": ["[email protected]", "", {}, "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="],"send/debug": ["[email protected]", "", { "dependencies": { "ms": "2.0.0" } }, "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA=="],@@ -3361,8 +3226,6 @@"terser/commander": ["[email protected]", "", {}, "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="],- "unified/is-plain-obj": ["[email protected]", "", {}, "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg=="],-"unifont/css-tree": ["[email protected]", "", { "dependencies": { "mdn-data": "2.27.1", "source-map-js": "^1.2.1" } }, "sha512-X7sjQzceUhu1u7Y/ylrRZFU2FS6LRiFVp6rKLPg23y3x3c3DOKAwuXGDp+PAGjh6CSnCjYeAul8pcT8bAl+lSA=="],"unstorage/chokidar": ["[email protected]", "", { "dependencies": { "readdirp": "^5.0.0" } }, "sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw=="],@@ -3373,12 +3236,12 @@"vscode-languageserver/vscode-languageserver-protocol": ["[email protected]", "", { "dependencies": { "vscode-jsonrpc": "8.2.0", "vscode-languageserver-types": "3.17.5" } }, "sha512-mb1bvRJN8SVznADSGWM9u/b07H7Ecg0I3OgXDuLdn307rl/J3A9YD6/eYOssqhecL27hK1IPZAsaqh00i/Jljg=="],- "workbox-build/fs-extra": ["[email protected]", "", { "dependencies": { "at-least-node": "^1.0.0", "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", "universalify": "^2.0.0" } }, "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ=="],-"workbox-build/pretty-bytes": ["[email protected]", "", {}, "sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg=="],"workbox-build/source-map": ["[email protected]", "", { "dependencies": { "whatwg-url": "^7.0.0" } }, "sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA=="],+ "wrap-ansi/ansi-styles": ["[email protected]", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="],+"wrap-ansi/string-width": ["[email protected]", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="],"wrap-ansi/strip-ansi": ["[email protected]", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="],@@ -3409,8 +3272,6 @@"@babel/helper-compilation-targets/lru-cache/yallist": ["[email protected]", "", {}, "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="],- "@edgeever/mobile/@tanstack/react-query/@tanstack/query-core": ["@tanstack/[email protected]", "", {}, "sha512-hH5MLoJhF7KaIGd7q3xTXGXvslI+GYlM1Z/35aSHHWaCJWB7XvTSHYuV3eM7tw+aE0mT/xMro4M4Q9rCGHT0lw=="],-"@edgeever/site/sharp/@img/sharp-darwin-arm64": ["@img/[email protected]", "", { "optionalDependencies": { "@img/sharp-libvips-darwin-arm64": "1.0.4" }, "os": "darwin", "cpu": "arm64" }, "sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ=="],"@edgeever/site/sharp/@img/sharp-darwin-x64": ["@img/[email protected]", "", { "optionalDependencies": { "@img/sharp-libvips-darwin-x64": "1.0.4" }, "os": "darwin", "cpu": "x64" }, "sha512-fyHac4jIc1ANYGRDxtiqelIbdWkIuQaI84Mv45KvGRRxSAa7o7d1ZKAOBaYbnepLC1WqxfpimdeWfvqqSGwR2Q=="],@@ -3447,30 +3308,52 @@"@edgeever/site/sharp/@img/sharp-win32-x64": ["@img/[email protected]", "", { "os": "win32", "cpu": "x64" }, "sha512-MpY/o8/8kj+EcnxwvrP4aTJSWw/aZ7JIGR4aBeZkZw5B7/Jn+tY9/VNwtcoGmdT7GfggGIU4kygOMSbYnOrAbg=="],+ "@expo/cli/chalk/ansi-styles": ["[email protected]", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="],+"@expo/cli/chalk/supports-color": ["[email protected]", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="],+ "@expo/config-plugins/chalk/ansi-styles": ["[email protected]", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="],+"@expo/config-plugins/chalk/supports-color": ["[email protected]", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="],+ "@expo/devtools/chalk/ansi-styles": ["[email protected]", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="],+"@expo/devtools/chalk/supports-color": ["[email protected]", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="],+ "@expo/env/chalk/ansi-styles": ["[email protected]", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="],+"@expo/env/chalk/supports-color": ["[email protected]", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="],+ "@expo/fingerprint/chalk/ansi-styles": ["[email protected]", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="],+"@expo/fingerprint/chalk/supports-color": ["[email protected]", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="],+ "@expo/image-utils/chalk/ansi-styles": ["[email protected]", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="],+"@expo/image-utils/chalk/supports-color": ["[email protected]", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="],+ "@expo/local-build-cache-provider/chalk/ansi-styles": ["[email protected]", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="],+"@expo/local-build-cache-provider/chalk/supports-color": ["[email protected]", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="],+ "@expo/metro-config/chalk/ansi-styles": ["[email protected]", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="],+"@expo/metro-config/chalk/supports-color": ["[email protected]", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="],+ "@expo/package-manager/chalk/ansi-styles": ["[email protected]", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="],+"@expo/package-manager/chalk/supports-color": ["[email protected]", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="],+ "@expo/xcpretty/chalk/ansi-styles": ["[email protected]", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="],+"@expo/xcpretty/chalk/supports-color": ["[email protected]", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="],"@iconify/tools/svgo/commander": ["[email protected]", "", {}, "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw=="],"@iconify/tools/svgo/css-tree": ["[email protected]", "", { "dependencies": { "mdn-data": "2.0.30", "source-map-js": "^1.0.1" } }, "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw=="],+ "@jest/types/chalk/ansi-styles": ["[email protected]", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="],+"@jest/types/chalk/supports-color": ["[email protected]", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="],"@radix-ui/react-tabs/@radix-ui/react-roving-focus/@radix-ui/react-collection": ["@radix-ui/[email protected]", "", { "dependencies": { "@radix-ui/react-compose-refs": "1.1.3", "@radix-ui/react-context": "1.2.0", "@radix-ui/react-primitive": "2.1.7", "@radix-ui/react-slot": "1.3.0" }, "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" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-nb67INpE0IahJKN7EYPp9m9YGwYeKlnzxT3MwXVkgCskaSJia97kG4T0ywpjNUSSnoJk/uvk12V8vbrEHEj+/Q=="],@@ -3479,8 +3362,6 @@"@react-native/codegen/yargs/string-width": ["[email protected]", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="],- "@testing-library/dom/pretty-format/ansi-styles": ["[email protected]", "", {}, "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA=="],-"@testing-library/dom/pretty-format/react-is": ["[email protected]", "", {}, "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w=="],"ansi-align/string-width/emoji-regex": ["[email protected]", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="],@@ -3605,16 +3486,20 @@"expo-linking/expo-constants/@expo/env": ["@expo/[email protected]", "", { "dependencies": { "chalk": "^4.0.0", "debug": "^4.3.4", "getenv": "^2.0.0" } }, "sha512-3c9Mg9x0HmGPEsVrGAGyEDJsNUOZ55cZvZ47/HLmXh7MHV9Zv7My73wThklKrObaBBoMfE4YqpKjYKDRzojpjQ=="],+ "expo-modules-autolinking/chalk/ansi-styles": ["[email protected]", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="],+"expo-modules-autolinking/chalk/supports-color": ["[email protected]", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="],"filelist/minimatch/brace-expansion": ["[email protected]", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-WR1cURNjuvBLMZBMbqM0UoE+WAfdUcEV1ccD8PVBVOI+Z3ND4+SZbN8RsfT2bMuG1qwz5RFvPukSZm5fF2D5eA=="],"finalhandler/debug/ms": ["[email protected]", "", {}, "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="],- "gluestack-ui/chalk/supports-color": ["[email protected]", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="],+ "jest-util/chalk/ansi-styles": ["[email protected]", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="],"jest-util/chalk/supports-color": ["[email protected]", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="],+ "jest-validate/chalk/ansi-styles": ["[email protected]", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="],+"jest-validate/chalk/supports-color": ["[email protected]", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="],"lighthouse-logger/debug/ms": ["[email protected]", "", {}, "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="],@@ -3695,28 +3580,6 @@"ora/strip-ansi/ansi-regex": ["[email protected]", "", {}, "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g=="],- "react-native-css-interop/lightningcss/detect-libc": ["[email protected]", "", { "bin": { "detect-libc": "./bin/detect-libc.js" } }, "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg=="],-- "react-native-css-interop/lightningcss/lightningcss-darwin-arm64": ["[email protected]", "", { "os": "darwin", "cpu": "arm64" }, "sha512-Gl/lqIXY+d+ySmMbgDf0pgaWSqrWYxVHoc88q+Vhf2YNzZ8DwoRzGt5NZDVqqIW5ScpSnmmjcgXP87Dn2ylSSQ=="],-- "react-native-css-interop/lightningcss/lightningcss-darwin-x64": ["[email protected]", "", { "os": "darwin", "cpu": "x64" }, "sha512-0+mZa54IlcNAoQS9E0+niovhyjjQWEMrwW0p2sSdLRhLDc8LMQ/b67z7+B5q4VmjYCMSfnFi3djAAQFIDuj/Tg=="],-- "react-native-css-interop/lightningcss/lightningcss-freebsd-x64": ["[email protected]", "", { "os": "freebsd", "cpu": "x64" }, "sha512-n1sEf85fePoU2aDN2PzYjoI8gbBqnmLGEhKq7q0DKLj0UTVmOTwDC7PtLcy/zFxzASTSBlVQYJUhwIStQMIpRA=="],-- "react-native-css-interop/lightningcss/lightningcss-linux-arm-gnueabihf": ["[email protected]", "", { "os": "linux", "cpu": "arm" }, "sha512-MUMRmtdRkOkd5z3h986HOuNBD1c2lq2BSQA1Jg88d9I7bmPGx08bwGcnB75dvr17CwxjxD6XPi3Qh8ArmKFqCA=="],-- "react-native-css-interop/lightningcss/lightningcss-linux-arm64-gnu": ["[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-cPsxo1QEWq2sfKkSq2Bq5feQDHdUEwgtA9KaB27J5AX22+l4l0ptgjMZZtYtUnteBofjee+0oW1wQ1guv04a7A=="],-- "react-native-css-interop/lightningcss/lightningcss-linux-arm64-musl": ["[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-rCGBm2ax7kQ9pBSeITfCW9XSVF69VX+fm5DIpvDZQl4NnQoMQyRwhZQm9pd59m8leZ1IesRqWk2v/DntMo26lg=="],-- "react-native-css-interop/lightningcss/lightningcss-linux-x64-gnu": ["[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-Dk/jovSI7qqhJDiUibvaikNKI2x6kWPN79AQiD/E/KeQWMjdGe9kw51RAgoWFDi0coP4jinaH14Nrt/J8z3U4A=="],-- "react-native-css-interop/lightningcss/lightningcss-linux-x64-musl": ["[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-QKjTxXm8A9s6v9Tg3Fk0gscCQA1t/HMoF7Woy1u68wCk5kS4fR+q3vXa1p3++REW784cRAtkYKrPy6JKibrEZA=="],-- "react-native-css-interop/lightningcss/lightningcss-win32-arm64-msvc": ["[email protected]", "", { "os": "win32", "cpu": "arm64" }, "sha512-/wXegPS1hnhkeG4OXQKEMQeJd48RDC3qdh+OA8pCuOPCyvnm/yEayrJdJVqzBsqpy1aJklRCVxscpFur80o6iQ=="],-- "react-native-css-interop/lightningcss/lightningcss-win32-x64-msvc": ["[email protected]", "", { "os": "win32", "cpu": "x64" }, "sha512-/OJLj94Zm/waZShL8nB5jsNj3CfNATLCTyFxZyouilfTmSoLDX7VlVAmhPHoZWVFp4vdmoiEbPEYC8HID3m6yw=="],-"react-native/yargs/cliui": ["[email protected]", "", { "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.1", "wrap-ansi": "^7.0.0" } }, "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ=="],"react-native/yargs/string-width": ["[email protected]", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="],@@ -3827,6 +3690,8 @@"react-native/yargs/string-width/strip-ansi": ["[email protected]", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="],+ "expo-linking/expo-constants/@expo/env/chalk/ansi-styles": ["[email protected]", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="],+"expo-linking/expo-constants/@expo/env/chalk/supports-color": ["[email protected]", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="],"log-symbols/chalk/ansi-styles/color-convert/color-name": ["[email protected]", "", {}, "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw=="],