Skip to content

AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.

Simplify mobile app experience

tianma-ifd6b692c27700
diff --git a/apps/mobile/package.json b/apps/mobile/package.json
index 9d4def6f..818d0d06 100644
--- a/apps/mobile/package.json
+++ b/apps/mobile/package.json
@@ -15,7 +15,6 @@
"@edgeever/client": "workspace:*",
"@edgeever/shared": "workspace:*",
"@expo/vector-icons": "^15.1.1",
- "@gorhom/bottom-sheet": "latest",
"@react-native-async-storage/async-storage": "2.2.0",
"@tanstack/query-async-storage-persister": "^5.101.2",
"@tanstack/react-query": "latest",
@@ -57,7 +56,6 @@
"@types/react": "latest",
"@types/semver": "^7.7.1",
"babel-preset-expo": "latest",
- "gluestack-ui": "latest",
"typescript": "6.0.3"
}
}
diff --git a/apps/mobile/src/components/LocalTiptapEditor.tsx b/apps/mobile/src/components/LocalTiptapEditor.tsx
index 2bd62e74..d533938a 100644
--- a/apps/mobile/src/components/LocalTiptapEditor.tsx
+++ b/apps/mobile/src/components/LocalTiptapEditor.tsx
@@ -23,15 +23,12 @@ import {
getMobileEditorImageScaleLabel,
getMobileEditorImageWidthPresetLabel,
getMobileEditorPlaceholder,
- getMobileEditorTableMenuCopy,
getMobileEditorToolbarActionLabel,
getMobileEditorToolbarLabel,
- isMobileEditorActionDisabledInTableHeader,
- type MobileEditorTableActionId,
type MobileEditorToolbarActionId,
} from "@edgeever/shared/mobile-editor";
import { useDOMImperativeHandle, type DOMImperativeFactory, type DOMProps } from "expo/dom";
-import { useCallback, useEffect, useMemo, useRef, useState, type ReactNode, type Ref } from "react";
+import { useCallback, useEffect, useMemo, useRef, type ReactNode, type Ref } from "react";
import {
createMobileImageUploadPlaceholderSource,
isMobileImageUploadPlaceholderSource,
@@ -232,7 +229,6 @@ const inlineMermaidSvgStyles = (svg: string) => {
};
function LocalTiptapEditorImpl(props: LocalTiptapEditorProps) {
- const [tableMenuOpen, setTableMenuOpen] = useState(false);
const startedAtRef = useRef(performance.now());
const changeTimerRef = useRef<number | null>(null);
const imageUploadInFlightRef = useRef(false);
@@ -449,19 +445,9 @@ function LocalTiptapEditorImpl(props: LocalTiptapEditorProps) {
editor,
selector: ({ editor: activeEditor }) =>
(activeEditor?.isActive("bold") ? MOBILE_EDITOR_ACTIVE_FLAGS.bold : 0) |
- (activeEditor?.isActive("codeBlock", { language: "mermaid" }) ? MOBILE_EDITOR_ACTIVE_FLAGS.mermaid : 0) |
(activeEditor?.isActive("bulletList") ? MOBILE_EDITOR_ACTIVE_FLAGS.bulletList : 0) |
- (activeEditor?.isActive("blockquote") ? MOBILE_EDITOR_ACTIVE_FLAGS.blockquote : 0) |
- (activeEditor?.isActive("table") ? MOBILE_EDITOR_ACTIVE_FLAGS.table : 0) |
- (activeEditor?.isActive("tableHeader") ? MOBILE_EDITOR_ACTIVE_FLAGS.tableHeader : 0),
+ (activeEditor?.isActive("blockquote") ? MOBILE_EDITOR_ACTIVE_FLAGS.blockquote : 0),
});
- const tableMenuCopy = getMobileEditorTableMenuCopy(props.locale);
-
- useEffect(() => {
- if (!(toolbarState & MOBILE_EDITOR_ACTIVE_FLAGS.table)) {
- setTableMenuOpen(false);
- }
- }, [toolbarState]);
const insertImage = async () => {
if (!editor || imageUploadInFlightRef.current) {
@@ -482,99 +468,34 @@ function LocalTiptapEditorImpl(props: LocalTiptapEditorProps) {
}
};
- const runTableAction = (action: MobileEditorTableActionId) => {
- const chain = editor?.chain().focus();
- if (!chain) {
- return;
- }
-
- switch (action) {
- case "insertTable":
- chain.insertTable({ rows: 3, cols: 3, withHeaderRow: true }).run();
- return;
- case "addTableRow":
- chain.addRowAfter().run();
- return;
- case "deleteTableRow":
- if (!editor?.isActive("tableHeader")) {
- chain.deleteRow().run();
- }
- return;
- case "addTableColumn":
- chain.addColumnAfter().run();
- return;
- case "deleteTableColumn":
- chain.deleteColumn().run();
- return;
- case "toggleTableHeader":
- chain.toggleHeaderRow().run();
- return;
- case "deleteTable":
- chain.deleteTable().run();
- }
- };
-
const toolbarIcons: Record<MobileEditorToolbarActionId, ReactNode> = {
image: <ImagePlusIcon />,
- mermaid: <DiagramIcon />,
bold: <BoldIcon />,
bulletList: <ListIcon />,
increaseListIndent: <ListIndentIncreaseIcon />,
decreaseListIndent: <ListIndentDecreaseIcon />,
blockquote: <QuoteIcon />,
horizontalRule: <MinusIcon />,
- insertTable: <TableGridIcon />,
- addTableRow: null,
- deleteTableRow: null,
- addTableColumn: null,
- deleteTableColumn: null,
- toggleTableHeader: null,
- deleteTable: null,
};
const toolbarHandlers: Record<MobileEditorToolbarActionId, () => void> = {
image: () => void insertImage(),
- mermaid: () => {
- if (!editor) {
- return;
- }
- if (editor.isActive("codeBlock")) {
- editor.chain().focus().updateAttributes("codeBlock", { language: "mermaid" }).run();
- return;
- }
- editor.chain().focus().insertContent({
- type: "codeBlock",
- attrs: { language: "mermaid" },
- content: [{ type: "text", text: "flowchart LR\n A[Start] --> B[End]" }],
- }).run();
- },
bold: () => editor?.chain().focus().toggleBold().run(),
bulletList: () => editor?.chain().focus().toggleBulletList().run(),
increaseListIndent: () => editor?.chain().focus().sinkListItem("listItem").run(),
decreaseListIndent: () => editor?.chain().focus().liftListItem("listItem").run(),
blockquote: () => editor?.chain().focus().toggleBlockquote().run(),
horizontalRule: () => editor?.chain().focus().setHorizontalRule().run(),
- insertTable: () => runTableAction("insertTable"),
- addTableRow: () => runTableAction("addTableRow"),
- deleteTableRow: () => runTableAction("deleteTableRow"),
- addTableColumn: () => runTableAction("addTableColumn"),
- deleteTableColumn: () => runTableAction("deleteTableColumn"),
- toggleTableHeader: () => runTableAction("toggleTableHeader"),
- deleteTable: () => runTableAction("deleteTable"),
};
return (
<div className="edgeever-editor-shell">
<style>{getEditorStyles(props.theme)}</style>
<div aria-label={getMobileEditorToolbarLabel(props.locale)} className="edgeever-editor-toolbar" role="toolbar">
- {MOBILE_EDITOR_TOOLBAR_ACTIONS
- .filter((action) => !action.requiresTable
- && (!(toolbarState & MOBILE_EDITOR_ACTIVE_FLAGS.table) || action.id !== "insertTable"))
- .map((action) => (
+ {MOBILE_EDITOR_TOOLBAR_ACTIONS.map((action) => (
<ToolbarButton
key={action.id}
active={action.activeFlag > 0 && Boolean(toolbarState & action.activeFlag)}
- disabled={(action.id === "insertTable" && Boolean(toolbarState & MOBILE_EDITOR_ACTIVE_FLAGS.table))
- || (action.id === "increaseListIndent"
+ disabled={(action.id === "increaseListIndent"
&& !Boolean(editor?.can().chain().focus().sinkListItem("listItem").run()))
|| (action.id === "decreaseListIndent"
&& !Boolean(editor?.can().chain().focus().liftListItem("listItem").run()))}
@@ -583,54 +504,7 @@ function LocalTiptapEditorImpl(props: LocalTiptapEditorProps) {
onRun={toolbarHandlers[action.id]}
/>
))}
- {Boolean(toolbarState & MOBILE_EDITOR_ACTIVE_FLAGS.table) && (
- <button
- aria-label={tableMenuCopy.title}
- className="edgeever-table-menu-trigger"
- onMouseDown={(event) => event.preventDefault()}
- onClick={() => setTableMenuOpen(true)}
- type="button"
- >
- <TableGridIcon />
- <span>{tableMenuCopy.title}</span>
- </button>
- )}
</div>
- {Boolean(toolbarState & MOBILE_EDITOR_ACTIVE_FLAGS.table) && tableMenuOpen && (
- <div className="edgeever-table-menu-backdrop" role="presentation" onMouseDown={() => setTableMenuOpen(false)}>
- <section
- aria-label={tableMenuCopy.title}
- aria-modal="true"
- className="edgeever-table-menu-sheet"
- role="dialog"
- onMouseDown={(event) => event.stopPropagation()}
- >
- <div className="edgeever-table-menu-handle" aria-hidden="true" />
- <div className="edgeever-table-menu-header">
- <strong>{tableMenuCopy.title}</strong>
- <button type="button" onClick={() => setTableMenuOpen(false)}>{tableMenuCopy.close}</button>
- </div>
- <div className="edgeever-table-menu-actions">
- {MOBILE_EDITOR_TOOLBAR_ACTIONS.filter((action) => action.requiresTable).map((action) => (
- <button
- key={action.id}
- className={action.id === "deleteTable" ? "is-destructive" : undefined}
- disabled={isMobileEditorActionDisabledInTableHeader(action.id)
- && Boolean(toolbarState & MOBILE_EDITOR_ACTIVE_FLAGS.tableHeader)}
- onMouseDown={(event) => event.preventDefault()}
- onClick={() => {
- setTableMenuOpen(false);
- toolbarHandlers[action.id]();
- }}
- type="button"
- >
- {getMobileEditorToolbarActionLabel(action.id, props.locale)}
- </button>
- ))}
- </div>
- </section>
- </div>
- )}
<EditorContent editor={editor} />
</div>
);
@@ -711,15 +585,6 @@ const BoldIcon = () => (
</EditorIcon>
);
-const DiagramIcon = () => (
- <EditorIcon size={18} strokeWidth={2}>
- <rect height="5" rx="1" width="7" x="2" y="3" />
- <rect height="5" rx="1" width="7" x="15" y="16" />
- <path d="M9 5.5h3a3 3 0 0 1 3 3v5a3 3 0 0 0 3 3" />
- <path d="m15 13 3 3-3 3" />
- </EditorIcon>
-);
-
const ListIcon = () => (
<EditorIcon size={18} strokeWidth={2.2}>
<path d="M3 5h.01M3 12h.01M3 19h.01M8 5h13M8 12h13M8 19h13" />
@@ -753,13 +618,6 @@ const MinusIcon = () => (
</EditorIcon>
);
-const TableGridIcon = () => (
- <EditorIcon size={18} strokeWidth={2}>
- <rect height="16" rx="1" width="18" x="3" y="4" />
- <path d="M3 10h18M9 4v16M15 4v16" />
- </EditorIcon>
-);
-
const mapImageSources = (doc: EditorDoc, mapSource: (source: string) => string): EditorDoc => {
const visit = (value: unknown): unknown => {
if (Array.isArray(value)) {
@@ -1394,18 +1252,6 @@ const getEditorStyles = (theme: "light" | "dark") => `
.edgeever-editor-toolbar button { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 36px; min-height: 32px; padding: 0; border: 1px solid transparent; border-radius: 999px; background: transparent; color: ${theme === "dark" ? "#cbd5e1" : "#64748b"}; }
.edgeever-editor-toolbar button:active, .edgeever-editor-toolbar button.is-active { border-color: ${theme === "dark" ? "#166534" : "#bbf7d0"}; background: ${theme === "dark" ? "#14532d" : "#ecfdf5"}; color: ${theme === "dark" ? "#86efac" : "#047857"}; }
.edgeever-editor-toolbar button:disabled { opacity: 0.38; }
- .edgeever-editor-toolbar .edgeever-table-menu-trigger { gap: 6px; width: auto; padding-inline: 10px; font-size: 13px; font-weight: 700; }
- .edgeever-table-menu-backdrop { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; background: ${theme === "dark" ? "rgba(2, 6, 23, 0.62)" : "rgba(15, 23, 42, 0.22)"}; }
- .edgeever-table-menu-sheet { width: 100%; border-radius: 18px 18px 0 0; padding: 8px 0 max(10px, env(safe-area-inset-bottom)); background: ${theme === "dark" ? "#1e293b" : "#fff"}; box-shadow: 0 -18px 45px rgba(15, 23, 42, 0.16); }
- .edgeever-table-menu-handle { width: 38px; height: 4px; margin: 2px auto 8px; border-radius: 999px; background: #cbd5e1; }
- .edgeever-table-menu-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid ${theme === "dark" ? "#334155" : "#f1f5f9"}; padding: 0 16px 10px; }
- .edgeever-table-menu-header strong { color: ${theme === "dark" ? "#f8fafc" : "#0f172a"}; font-size: 16px; }
- .edgeever-table-menu-header button { min-height: 32px; border: 0; border-radius: 999px; padding: 6px 10px; background: ${theme === "dark" ? "#334155" : "#f8fafc"}; color: ${theme === "dark" ? "#cbd5e1" : "#64748b"}; font: inherit; font-size: 14px; font-weight: 650; }
- .edgeever-table-menu-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 12px; }
- .edgeever-table-menu-actions button { min-height: 48px; border: 0; border-radius: 10px; padding: 8px; background: ${theme === "dark" ? "#334155" : "#f8fafc"}; color: ${theme === "dark" ? "#e2e8f0" : "#334155"}; font: inherit; font-size: 15px; font-weight: 650; }
- .edgeever-table-menu-actions button:active { background: ${theme === "dark" ? "#14532d" : "#ecfdf5"}; color: ${theme === "dark" ? "#86efac" : "#047857"}; }
- .edgeever-table-menu-actions button:disabled { color: #94a3b8; opacity: 0.55; }
- .edgeever-table-menu-actions button.is-destructive { background: ${theme === "dark" ? "#4c0519" : "#fff1f2"}; color: ${theme === "dark" ? "#fda4af" : "#be123c"}; }
.tiptap { min-height: 100%; outline: none; }
.edgeever-editor-shell > div:last-child { min-height: 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.edgeever-editor-content { min-height: 100%; padding: 18px 12px 32px; font-size: 17px; line-height: 1.7; word-break: break-word; caret-color: #0f766e; }
diff --git a/apps/mobile/src/lib/preferences.ts b/apps/mobile/src/lib/preferences.ts
index eec43e09..d25ebc8f 100644
--- a/apps/mobile/src/lib/preferences.ts
+++ b/apps/mobile/src/lib/preferences.ts
@@ -3,12 +3,10 @@ import AsyncStorage from "@react-native-async-storage/async-storage";
const MEMO_LIST_DENSITY_KEY = "edgeever.mobile.memoListDensity";
const IMAGE_COMPRESSION_KEY = "edgeever.mobile.imageCompressionEnabled";
const LOCALE_PREFERENCE_KEY = "edgeever.mobile.localePreference";
-const RESOURCE_LAYOUT_KEY = "edgeever.mobile.resourceLayout";
const THEME_PREFERENCE_KEY = "edgeever.mobile.themePreference";
export type MobileMemoListDensity = "preview" | "compact";
export type MobileLocalePreference = "system" | "zh-CN" | "en-US";
-export type MobileResourceLayoutPreference = "grid" | "list";
export type MobileThemePreference = "system" | "light" | "dark";
export const readMobileMemoListDensity = async (): Promise<MobileMemoListDensity> => {
@@ -32,13 +30,6 @@ export const readMobileLocalePreference = async (): Promise<MobileLocalePreferen
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);
-
export const readMobileThemePreference = async (): Promise<MobileThemePreference> => {
const value = await AsyncStorage.getItem(THEME_PREFERENCE_KEY);
return value === "light" || value === "dark" || value === "system" ? value : "system";
diff --git a/apps/mobile/src/screens/AccountSecurityModal.tsx b/apps/mobile/src/screens/AccountSecurityModal.tsx
index fd712050..1f230290 100644
--- a/apps/mobile/src/screens/AccountSecurityModal.tsx
+++ b/apps/mobile/src/screens/AccountSecurityModal.tsx
@@ -1,52 +1,26 @@
import { ApiRequestError } from "@edgeever/client";
-import type { AuthUser } from "@edgeever/shared";
-import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
-import { KeyRound, Plus, UserRound } from "../components/icons";
+import { useMutation } from "@tanstack/react-query";
+import { KeyRound } from "../components/icons";
import { useEffect, useState } from "react";
import {
- ActivityIndicator,
- Modal,
StyleSheet,
- Switch,
View,
} from "react-native";
import { Pressable, Text, TextInput } from "../components/LocalizedText";
import { resolveMobileThemeStyles, useMobileTheme, type MobileResolvedTheme } from "../lib/mobile-theme";
import { useSession } from "../lib/session";
-export type AccountSecuritySection = "password" | "users";
-
export const AccountSecurityPanel = ({
active,
- currentUser,
- section,
}: {
active: boolean;
- currentUser: AuthUser | null;
- section: AccountSecuritySection;
}) => {
const { resolvedTheme } = useMobileTheme();
refreshAccountSecurityThemeStyles(resolvedTheme);
const { client } = useSession();
- const queryClient = useQueryClient();
const [currentPassword, setCurrentPassword] = useState("");
const [newPassword, setNewPassword] = useState("");
const [confirmPassword, setConfirmPassword] = useState("");
- const [createOpen, setCreateOpen] = useState(false);
- const [username, setUsername] = useState("");
- const [displayName, setDisplayName] = useState("");
- const [memberPassword, setMemberPassword] = useState("");
- const [resetUserId, setResetUserId] = useState<string | null>(null);
- const [resetPasswordValue, setResetPasswordValue] = useState("");
-
- const usersQuery = useQuery({
- queryKey: ["mobile", "users"],
- queryFn: async () => {
- if (!client) throw new Error("Client is not ready");
- return client.listUsers();
- },
- enabled: Boolean(client && active && currentUser?.role === "owner" && section === "users"),
- });
const passwordMutation = useMutation({
mutationFn: async () => {
@@ -62,57 +36,18 @@ export const AccountSecurityPanel = ({
},
});
- const createUserMutation = useMutation({
- mutationFn: async () => {
- if (!client) throw new Error("Client is not ready");
- if (memberPassword.length < 8) throw new Error("密码至少需要 8 个字符");
- return client.createUser({ username: username.trim(), displayName: displayName.trim() || null, password: memberPassword });
- },
- onSuccess: async () => {
- setCreateOpen(false);
- setUsername("");
- setDisplayName("");
- setMemberPassword("");
- await queryClient.invalidateQueries({ queryKey: ["mobile", "users"] });
- },
- });
-
- const updateUserMutation = useMutation({
- mutationFn: async ({ userId, input }: { userId: string; input: { password?: string; isDisabled?: boolean } }) => {
- if (!client) throw new Error("Client is not ready");
- return client.updateUser(userId, input);
- },
- onSuccess: async () => queryClient.invalidateQueries({ queryKey: ["mobile", "users"] }),
- });
-
useEffect(() => {
if (!active) {
passwordMutation.reset();
- createUserMutation.reset();
- updateUserMutation.reset();
}
}, [active]);
const errorMessage = (error: unknown) => {
if (error instanceof ApiRequestError && error.code === "invalid_current_password") return "当前密码不正确";
- if (error instanceof ApiRequestError && error.code === "username_exists") return "该用户名已经存在";
return error instanceof Error ? error.message : "操作失败,请稍后再试";
};
- const resetUser = usersQuery.data?.users.find((user) => user.id === resetUserId) ?? null;
- const closeCreateDialog = () => {
- setCreateOpen(false);
- setUsername("");
- setDisplayName("");
- setMemberPassword("");
- createUserMutation.reset();
- };
- const closeResetDialog = () => {
- setResetUserId(null);
- setResetPasswordValue("");
- updateUserMutation.reset();
- };
- return section === "password" ? (
+ return (
<View style={styles.content}>
<View style={styles.hero}>
<KeyRound color="#15803d" size={22} />
@@ -132,81 +67,6 @@ export const AccountSecurityPanel = ({
onPress={() => passwordMutation.mutate()}
/>
</View>
- ) : (
- <View style={styles.content}>
- <View style={styles.sectionHeader}>
- <View style={styles.flex}>
- <Text style={styles.cardTitle}>成员管理</Text>
- <Text style={styles.help}>为家人或团队成员创建独立的个人笔记空间。实例不开放公开注册。</Text>
- </View>
- <Pressable onPress={() => setCreateOpen(true)} style={styles.addButton}>
- <Plus color="#ffffff" size={16} />
- <Text style={styles.addButtonText}>添加成员</Text>
- </Pressable>
- </View>
-
- {usersQuery.isLoading ? <ActivityIndicator color="#15803d" /> : null}
- {usersQuery.error ? <Text style={styles.error}>{errorMessage(usersQuery.error)}</Text> : null}
- {usersQuery.data?.users.map((user) => (
- <View key={user.id} style={styles.userBlock}>
- <View style={styles.userCard}>
- <View style={styles.userIcon}><UserRound color="#15803d" size={18} /></View>
- <View style={styles.flex}>
- <Text style={styles.userName}>{user.displayName || user.username}</Text>
- <Text style={styles.help}>@{user.username} · {user.role === "owner" ? "实例管理员" : user.isDisabled ? "已停用" : "已启用"}</Text>
- <Pressable onPress={() => { setResetUserId(user.id); setResetPasswordValue(""); }}><Text style={styles.link}>重置密码</Text></Pressable>
- </View>
- {user.role !== "owner" ? (
- <Switch
- disabled={updateUserMutation.isPending}
- onValueChange={(enabled) => updateUserMutation.mutate({ userId: user.id, input: { isDisabled: !enabled } })}
- value={!user.isDisabled}
- />
- ) : null}
- </View>
- </View>
- ))}
- <Modal animationType="fade" onRequestClose={closeCreateDialog} transparent visible={createOpen}>
- <Pressable onPress={closeCreateDialog} style={styles.dialogBackdrop}>
- <Pressable style={styles.dialogCard}>
- <Text style={styles.cardTitle}>添加新成员</Text>
- <Text style={styles.help}>新账号会获得完全独立的笔记、附件、回收站和 MCP Token。</Text>
- <Field label="用户名" onChangeText={setUsername} placeholder="例如:xiaoming" secure={false} value={username} />
- <Field label="显示名称" onChangeText={setDisplayName} placeholder="选填,例如:小明" secure={false} value={displayName} />
- <Field help="成员首次登录后可以在个人中心修改密码。" label="初始密码" onChangeText={setMemberPassword} placeholder="请输入至少 8 位密码" value={memberPassword} />
- {createUserMutation.error ? <Text style={styles.error}>{errorMessage(createUserMutation.error)}</Text> : null}
- <View style={styles.dialogActions}>
- <Pressable onPress={closeCreateDialog} style={styles.cancelButton}><Text style={styles.cancelText}>取消</Text></Pressable>
- <PrimaryButton
- disabled={createUserMutation.isPending || !username.trim() || memberPassword.length < 8}
- label={createUserMutation.isPending ? "正在创建..." : "添加成员"}
- onPress={() => createUserMutation.mutate()}
- />
- </View>
- </Pressable>
- </Pressable>
- </Modal>
- <Modal animationType="fade" onRequestClose={closeResetDialog} transparent visible={Boolean(resetUser)}>
- <Pressable onPress={closeResetDialog} style={styles.dialogBackdrop}>
- <Pressable style={styles.dialogCard}>
- <Text style={styles.cardTitle}>{`重置 ${resetUser?.username ?? ""} 的密码`}</Text>
- <Text style={styles.help}>重置后,该账号在其他设备上的登录会话将失效。</Text>
- <Field label="新密码(至少 8 位)" onChangeText={setResetPasswordValue} placeholder="请输入至少 8 位密码" value={resetPasswordValue} />
- <View style={styles.dialogActions}>
- <Pressable onPress={closeResetDialog} style={styles.cancelButton}><Text style={styles.cancelText}>取消</Text></Pressable>
- <PrimaryButton
- disabled={updateUserMutation.isPending || resetPasswordValue.length < 8 || !resetUser}
- label={updateUserMutation.isPending ? "正在重置..." : "重置密码"}
- onPress={() => resetUser && updateUserMutation.mutate(
- { userId: resetUser.id, input: { password: resetPasswordValue } },
- { onSuccess: closeResetDialog },
- )}
- />
- </View>
- </Pressable>
- </Pressable>
- </Modal>
- </View>
);
};
@@ -243,7 +103,6 @@ const PrimaryButton = ({ disabled, label, onPress }: { disabled: boolean; label:
const baseAccountSecurityStyles = StyleSheet.create({
content: { gap: 14, padding: 16, paddingBottom: 40 },
hero: { alignItems: "flex-start", backgroundColor: "transparent", flexDirection: "row", gap: 10 },
- sectionHeader: { alignItems: "center", flexDirection: "row", gap: 12 },
flex: { flex: 1 },
cardTitle: { color: "#17211a", fontSize: 16, fontWeight: "800" },
help: { color: "#64748b", fontSize: 12, lineHeight: 18, marginTop: 3 },
@@ -255,18 +114,6 @@ const baseAccountSecurityStyles = StyleSheet.create({
disabled: { opacity: 0.45 },
error: { color: "#be123c", fontSize: 13, lineHeight: 19 },
success: { color: "#15803d", fontSize: 13, fontWeight: "700", lineHeight: 19 },
- addButton: { alignItems: "center", backgroundColor: "#15803d", borderRadius: 9, flexDirection: "row", gap: 6, paddingHorizontal: 12, paddingVertical: 9 },
- addButtonText: { color: "#ffffff", fontSize: 13, fontWeight: "800" },
- userCard: { alignItems: "center", backgroundColor: "#ffffff", borderColor: "#dce7dd", borderRadius: 14, borderWidth: 1, flexDirection: "row", gap: 12, padding: 14 },
- userBlock: { gap: 8 },
- dialogBackdrop: { alignItems: "center", backgroundColor: "rgba(15, 23, 42, 0.48)", flex: 1, justifyContent: "center", padding: 20 },
- dialogCard: { backgroundColor: "#ffffff", borderRadius: 14, gap: 14, maxWidth: 520, padding: 18, width: "100%" },
- dialogActions: { alignItems: "center", flexDirection: "row", gap: 10, justifyContent: "flex-end" },
- cancelButton: { alignItems: "center", borderColor: "#dce7dd", borderRadius: 10, borderWidth: 1, justifyContent: "center", minHeight: 48, paddingHorizontal: 16 },
- cancelText: { color: "#64748b", fontSize: 13, fontWeight: "700" },
- userIcon: { alignItems: "center", backgroundColor: "#ecfdf3", borderRadius: 20, height: 40, justifyContent: "center", width: 40 },
- userName: { color: "#17211a", fontSize: 14, fontWeight: "800" },
- link: { color: "#15803d", fontSize: 12, fontWeight: "700", marginTop: 6 },
});
let styles = baseAccountSecurityStyles;
diff --git a/apps/mobile/src/screens/WorkspaceScreen.tsx b/apps/mobile/src/screens/WorkspaceScreen.tsx
index 7568f42a..c126d66f 100644
--- a/apps/mobile/src/screens/WorkspaceScreen.tsx
+++ b/apps/mobile/src/screens/WorkspaceScreen.tsx
@@ -5,7 +5,6 @@ import Constants from "expo-constants";
import { File as ExpoFile } from "expo-file-system";
import type { MemoFilterMode, MemoSortMode } from "@edgeever/client";
import {
- Archive,
BookOpen,
Check,
ChevronDown,
@@ -14,25 +13,18 @@ import {
CheckSquare,
Copy,
ExternalLink,
- FileArchive,
- FileSpreadsheet,
FileText,
Folder,
- Grid,
- HardDrive,
History,
Home,
Image as ImageIcon,
Info,
- KeyRound,
List,
LogOut,
- Merge,
MessageSquare,
Moon,
MoreHorizontal,
MoreVertical,
- Music,
Pencil,
Plus,
RefreshCw,
@@ -44,13 +36,8 @@ import {
Sun,
Tag,
Trash2,
- Upload,
UserRound,
- Users,
- Video,
X,
- ZoomIn,
- ZoomOut,
} from "../components/icons";
import {
ActivityIndicator,
@@ -82,19 +69,16 @@ import { SafeAreaView, useSafeAreaInsets } from "react-native-safe-area-context"
import { Alert, Pressable, Text, TextInput } from "../components/LocalizedText";
import Markdown, { type ASTNode, type RenderRules } from "react-native-markdown-display";
import { SvgXml } from "react-native-svg";
-import { buildGitHubFeedbackUrl, buildRevisionDiffRows, createExcerpt, docToMarkdown, docToText, getNotebookDescendantIds, markdownToDoc, resolveMemoContentDoc, type ApiToken, type AuthUser, type MemoDetail, type MemoRevision, type MemoSummary, type Notebook, type ResourceListItem, type RevisionDiffRow, type TagSummary, type TiptapDoc } from "@edgeever/shared";
+import { buildGitHubFeedbackUrl, createExcerpt, docToMarkdown, docToText, getNotebookDescendantIds, markdownToDoc, resolveMemoContentDoc, type AuthUser, type MemoDetail, type MemoRevision, type MemoSummary, type Notebook, type TiptapDoc } from "@edgeever/shared";
import { MOBILE_UI_METRICS, getMobileCenteredScrollOffset, getMobileNotebookSearchVisibleIds, toggleMobileMemoFilterMode, toggleMobileMemoSelection } from "@edgeever/shared/mobile-ui";
import { clearMobileMemoDraft, clearMobileNewMemoDraft, readMobileMemoDraft, readMobileNewMemoDraft, writeMobileMemoDraft, writeMobileNewMemoDraft, type MobileMemoDraft } from "../lib/mobile-drafts";
import {
readMobileImageCompressionEnabled,
readMobileMemoListDensity,
- readMobileResourceLayout,
writeMobileImageCompressionEnabled,
writeMobileMemoListDensity,
- writeMobileResourceLayout,
type MobileLocalePreference,
type MobileMemoListDensity,
- type MobileResourceLayoutPreference,
} from "../lib/preferences";
import { useMobileLocale } from "../lib/mobile-locale";
import { useSession } from "../lib/session";
@@ -136,7 +120,6 @@ const resolveEditableMemoTitle = (title?: string | null) => {
return trimmedTitle === DEFAULT_MEMO_TITLE ? "" : trimmedTitle;
};
const MOBILE_APP_VERSION = Constants.expoConfig?.version ?? "0.1.2";
-const GITHUB_REPOSITORY_URL = "https://github.com/tianma-if/edgeever";
const ANDROID_SYSTEM_NAVIGATION_FALLBACK = 48;
const DETAIL_CONTENT_HORIZONTAL_PADDING = 16;
const DETAIL_TABLE_FIT_COLUMN_COUNT = 3;
@@ -156,63 +139,13 @@ const formatExecutionEnvironment = (environment: string | null | undefined, loca
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" },
];
type MobileView = "notes" | "settings";
-type SettingsTab = "general" | "users" | "ai" | "account";
+type SettingsTab = "general" | "account";
type MemoView = "notebook" | "trash";
type NotebookOption = {
notebook: Notebook;
@@ -258,10 +191,6 @@ export const WorkspaceScreen = () => {
const [notebookPickerOpen, setNotebookPickerOpen] = useState(false);
const [richEditingSession, setRichEditingSession] = useState<RichEditingSession | null>(null);
const [editorRuntimeWarm, setEditorRuntimeWarm] = useState(false);
- const [tagsManagerOpen, setTagsManagerOpen] = useState(false);
- const [resourcesOpen, setResourcesOpen] = useState(false);
- const [resourceTargetMemo, setResourceTargetMemo] = useState<MemoDetail | null>(null);
- const [apiTokensOpen, setApiTokensOpen] = useState(false);
const [revisionMemo, setRevisionMemo] = useState<MemoDetail | null>(null);
const [selectionMode, setSelectionMode] = useState(false);
const [selectedMemoIds, setSelectedMemoIds] = useState<Set<string>>(() => new Set());
@@ -595,38 +524,6 @@ export const WorkspaceScreen = () => {
}
}, [loadMemoDraft, selectedMemo]);
- useEffect(() => {
- setResourceTargetMemo(null);
- }, [dataScope]);
-
- useEffect(() => {
- if (selectedMemo && !selectedMemo.isDeleted) {
- setResourceTargetMemo(selectedMemo);
- }
- }, [selectedMemo]);
-
- useEffect(() => {
- if (!resourcesOpen || selectedMemo || resourceTargetMemo) {
- return;
- }
-
- const fallbackMemo = visibleMemos.find((memo) => !memo.isDeleted);
- if (!fallbackMemo) {
- return;
- }
-
- let mounted = true;
- void getLocalMemo(dataScope, fallbackMemo.id).then((memo) => {
- if (mounted && memo && !memo.isDeleted) {
- setResourceTargetMemo(memo);
- }
- });
-
- return () => {
- mounted = false;
- };
- }, [dataScope, resourceTargetMemo, resourcesOpen, selectedMemo, visibleMemos]);
-
useEffect(() => {
clearSelection();
}, [activeNotebookId, memoFilterMode, memoSortMode, memoView]);
@@ -834,22 +731,6 @@ export const WorkspaceScreen = () => {
},
});
- 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 } });
};
@@ -892,16 +773,6 @@ export const WorkspaceScreen = () => {
setSelectedMemoIds(new Set([memoId]));
};
- const handleMergeSelection = () => {
- if (selectedMemoIdList.length < 2) {
- return;
- }
-
- const targetNotebookId = activeNotebookId === ALL_NOTES_ID ? selectedMemos[0]?.notebookId : activeNotebookId;
-
- mergeMemosMutation.mutate({ memoIds: selectedMemoIdList, notebookId: targetNotebookId });
- };
-
const runAutomaticSync = async () => {
if (!client) {
return;
@@ -1107,13 +978,11 @@ export const WorkspaceScreen = () => {
{activeView === "settings" ? (
<SettingsView
- baseUrl={session?.baseUrl ?? ""}
currentUser={session?.user ?? null}
onClose={closeSettings}
localePreference={localePreference}
onLocalePreferenceChange={handleLocalePreferenceChange}
imageCompressionEnabled={imageCompressionEnabled}
- isOwner={session?.user?.role === "owner"}
onImageCompressionChange={handleImageCompressionChange}
onSignOut={signOut}
/>
@@ -1155,9 +1024,6 @@ export const WorkspaceScreen = () => {
visible
/> : null}
- {tagsManagerOpen ? <TagsManagerModal onClose={() => setTagsManagerOpen(false)} visible /> : null}
- {resourcesOpen ? <ResourcesModal activeMemo={selectedMemo ?? resourceTargetMemo} imageCompressionEnabled={imageCompressionEnabled} onClose={() => setResourcesOpen(false)} visible /> : null}
- {apiTokensOpen ? <ApiTokensModal baseUrl={session?.baseUrl ?? ""} onClose={() => setApiTokensOpen(false)} visible /> : null}
{revisionMemo ? <RevisionHistoryModal
memo={revisionMemo}
onClose={() => setRevisionMemo(null)}
@@ -1207,18 +1073,6 @@ export const WorkspaceScreen = () => {
setNotesActionsOpen(false);
enterSelectionMode();
}}
- onOpenApiTokens={() => {
- setNotesActionsOpen(false);
- setApiTokensOpen(true);
- }}
- onOpenResources={() => {
- setNotesActionsOpen(false);
- setResourcesOpen(true);
- }}
- onOpenTags={() => {
- setNotesActionsOpen(false);
- setTagsManagerOpen(true);
- }}
onMemoListDensityChange={handleMemoListDensityChange}
onSortModeChange={setMemoSortMode}
selectionMode={selectionMode}
@@ -1227,15 +1081,10 @@ export const WorkspaceScreen = () => {
{selectionMoreOpen ? <SelectionMoreModal
bottomOffset={58 + safeAreaInsets.bottom}
- canMerge={memoView !== "trash" && selectedMemoIds.size >= 2 && !mergeMemosMutation.isPending}
canPin={memoView !== "trash" && selectedMemoIds.size > 0 && !pinMemosMutation.isPending}
canToggleVisibleSelection={canToggleVisibleSelection}
onClear={clearSelection}
onClose={() => setSelectionMoreOpen(false)}
- onMerge={() => {
- setSelectionMoreOpen(false);
- handleMergeSelection();
- }}
onPin={() => {
setSelectionMoreOpen(false);
pinMemosMutation.mutate({ memoIds: selectedMemoIdList, isPinned: nextSelectionPinValue });
@@ -1254,7 +1103,7 @@ export const WorkspaceScreen = () => {
<SelectionActionBar
bottomInset={safeAreaInsets.bottom}
canMove={memoView !== "trash" && selectedMemoIds.size > 0}
- isBusy={deleteMemosMutation.isPending || moveMemosMutation.isPending || pinMemosMutation.isPending || mergeMemosMutation.isPending}
+ isBusy={deleteMemosMutation.isPending || moveMemosMutation.isPending || pinMemosMutation.isPending}
isTrashView={memoView === "trash"}
onDelete={handleDeleteSelection}
onMore={() => setSelectionMoreOpen(true)}
@@ -1500,9 +1349,6 @@ const NotesActionsModal = ({
onClose,
onEnterSelection,
onMemoListDensityChange,
- onOpenApiTokens,
- onOpenResources,
- onOpenTags,
onSortModeChange,
selectionMode,
visible,
@@ -1516,9 +1362,6 @@ const NotesActionsModal = ({
onClose: () => void;
onEnterSelection: () => void;
onMemoListDensityChange: (density: MobileMemoListDensity) => void;
- onOpenApiTokens: () => void;
- onOpenResources: () => void;
- onOpenTags: () => void;
onSortModeChange: (sortMode: MemoSortMode) => void;
selectionMode: boolean;
visible: boolean;
@@ -1561,10 +1404,6 @@ const NotesActionsModal = ({
<SheetOptionRow active={memoSortMode === "updated-desc"} label="最近更新" onPress={() => onSortModeChange("updated-desc")} />
<SheetOptionRow active={memoSortMode === "created-desc"} label="创建时间" onPress={() => onSortModeChange("created-desc")} />
<SheetOptionRow active={memoSortMode === "title-asc"} label="标题 A-Z" onPress={() => onSortModeChange("title-asc")} />
- <View style={styles.listActionDivider} />
- <ActionSheetItem compact icon={<Tag color="#0f172a" size={18} />} label="标签" onPress={onOpenTags} />
- <ActionSheetItem compact icon={<Archive color="#0f172a" size={18} />} label="附件" onPress={onOpenResources} />
- <ActionSheetItem compact icon={<KeyRound color="#0f172a" size={18} />} label="MCP Token" onPress={onOpenApiTokens} />
</ScrollView>
</Pressable>
</Pressable>
@@ -1800,48 +1639,17 @@ const ActionSheetItem = ({ compact = false, danger = false, disabled = false, ic
</Pressable>
);
-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 = ({
- baseUrl,
currentUser,
imageCompressionEnabled,
- isOwner,
localePreference,
onClose,
onImageCompressionChange,
onLocalePreferenceChange,
onSignOut,
}: {
- baseUrl: string;
currentUser: AuthUser | null;
imageCompressionEnabled: boolean;
- isOwner: boolean;
localePreference: MobileLocaleMode;
onClose: () => void;
onImageCompressionChange: (enabled: boolean) => void;
@@ -1856,8 +1664,6 @@ const SettingsView = ({
const localeSelectRef = useRef<ComponentRef<typeof Pressable>>(null);
const tabs: Array<{ key: SettingsTab; label: string; icon: ReactNode }> = [
{ key: "general", label: "常规设置", icon: <SlidersHorizontal color="#059669" size={17} /> },
- ...(isOwner ? [{ key: "users" as const, label: "成员管理", icon: <Users color="#059669" size={17} /> }] : []),
- { key: "ai", label: "AI集成", icon: <Sparkles color="#059669" size={17} /> },
{ key: "account", label: "登录设置", icon: <ShieldCheck color="#059669" size={17} /> },
];
const title = tabs.find((tab) => tab.key === activeTab)?.label ?? "我的";
@@ -1918,21 +1724,6 @@ const SettingsView = ({
</View>
);
}
- if (activeTab === "users") {
- return (
- <View style={styles.settingsGroup}>
- <AccountSecurityPanel active currentUser={currentUser} section="users" />
- </View>
- );
- }
- if (activeTab === "ai") {
- return (
- <View style={styles.settingsGroup}>
- <AdvancedPlayCard embedded />
- <ApiTokensContent active baseUrl={baseUrl} embedded />
- </View>
- );
- }
return (
<View style={styles.settingsDetailList}>
<View style={styles.accountSummaryCard}>
@@ -1948,7 +1739,7 @@ const SettingsView = ({
</View>
</View>
<View style={styles.settingsGroup}>
- <AccountSecurityPanel active currentUser={currentUser} section="password" />
+ <AccountSecurityPanel active />
</View>
<View style={styles.settingsLogoutCard}>
<Pressable onPress={onSignOut} style={styles.settingsLogoutButton}>
@@ -2482,1347 +2273,152 @@ const CreateMemoModal = ({
);
};
-const TagsManagerModal = ({ onClose, visible }: { onClose: () => void; visible: boolean }) => {
+const SystemInfoCard = ({ embedded = false }: { embedded?: boolean }) => {
+ const [copied, setCopied] = useState(false);
+ const [expanded, setExpanded] = useState(false);
+ const { checkForUpdate, hasUpdate, status } = useMobileUpdate();
+ const localePreference = useMobileLocalePreference();
+ const copy = getMobileSystemInfoText(localePreference);
+ const infoItems = getMobileSystemInfoItems(localePreference);
+
+ const copySystemInfo = async () => {
+ await Clipboard.setStringAsync(infoItems.map((item) => `${item.label}: ${item.value}`).join("\n"));
+ setCopied(true);
+ setTimeout(() => setCopied(false), 1600);
+ };
+
+ return (
+ <View style={[styles.settingsGroup, embedded && styles.settingsEmbeddedSection]}>
+ <Pressable accessibilityState={{ expanded }} onPress={() => setExpanded((value) => !value)} style={styles.settingsAccordionHeader}>
+ <View style={styles.settingsLinkCopy}>
+ <View style={styles.settingsGroupHeader}>
+ <Info color="#047857" size={16} />
+ <Text style={styles.settingsGroupTitle}>{copy.title}</Text>
+ {hasUpdate ? <View accessibilityLabel="有新版本" style={styles.updateDot} /> : null}
+ </View>
+ <Text style={styles.settingsLinkDescription}>{copy.description}</Text>
+ </View>
+ {expanded ? <ChevronDown color="#94a3b8" size={17} /> : <ChevronRight color="#94a3b8" size={17} />}
+ </Pressable>
+ {expanded ? (
+ <View style={styles.settingsAccordionContent}>
+ <ActionButton label={copied ? "已复制" : "复制信息"} onPress={copySystemInfo}>
+ {copied ? <ShieldCheck color="#047857" size={16} /> : <Copy color="#0f172a" size={16} />}
+ </ActionButton>
+ <ActionButton
+ disabled={status === "checking"}
+ label={status === "checking" ? "正在检查…" : hasUpdate ? "发现新版本" : "检查更新"}
+ onPress={() => void checkForUpdate()}
+ >
+ {status === "checking" ? <ActivityIndicator color="#047857" size="small" /> : <RefreshCw color="#047857" size={16} />}
+ </ActionButton>
+ <View style={styles.systemInfoRows}>
+ {Array.from({ length: Math.ceil(infoItems.length / 3) }, (_, rowIndex) => {
+ const rowItems = infoItems.slice(rowIndex * 3, rowIndex * 3 + 3);
+
+ return (
+ <View
+ key={`system-info-row-${rowIndex}`}
+ style={[styles.systemInfoRow, rowIndex === Math.ceil(infoItems.length / 3) - 1 && styles.systemInfoRowLast]}
+ >
+ {rowItems.map((item, itemIndex) => (
+ <View
+ key={item.label}
+ style={[styles.systemInfoCell, itemIndex < rowItems.length - 1 && styles.systemInfoCellDivider]}
+ >
+ <Text numberOfLines={1} style={styles.panelLabel}>{item.label}</Text>
+ <Text numberOfLines={1} selectable style={styles.systemInfoListValue}>
+ {item.value}
+ </Text>
+ </View>
+ ))}
+ </View>
+ );
+ })}
+ </View>
+ </View>
+ ) : null}
+ </View>
+ );
+};
+
+const RevisionHistoryModal = ({
+ memo,
+ onClose,
+ onRestored,
+}: {
+ memo: MemoDetail | null;
+ onClose: () => void;
+ onRestored: (memo: MemoDetail) => void;
+}) => {
const { client } = useSession();
- const { translate } = useMobileLocale();
const queryClient = useQueryClient();
const localePreference = useMobileLocalePreference();
- const [editingTagName, setEditingTagName] = useState<string | null>(null);
- const [editingTagValue, setEditingTagValue] = useState("");
+ const [selectedRevisionId, setSelectedRevisionId] = useState<string | null>(null);
- const tagsQuery = useQuery({
- queryKey: ["mobile", "tags"],
+ const revisionsQuery = useQuery({
+ queryKey: ["mobile", "memo-revisions", memo?.id],
queryFn: async () => {
- if (!client) {
- throw new Error("Client is not ready");
+ if (!client || !memo) {
+ throw new Error("Memo is not selected");
}
- return client.listTags();
+ return client.listMemoRevisions(memo.id);
},
- enabled: Boolean(client && visible),
+ enabled: Boolean(client && memo),
});
- 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 revisions = revisionsQuery.data?.revisions ?? [];
+ const selectedRevision = revisions.find((revision) => revision.id === selectedRevisionId) ?? revisions[0] ?? null;
- const trimmed = name.trim();
+ useEffect(() => {
+ if (memo && revisions.length > 0 && !selectedRevisionId) {
+ setSelectedRevisionId(revisions[0].id);
+ }
+ }, [memo, revisions, selectedRevisionId]);
- if (!trimmed) {
- throw new Error("请输入标签名称");
- }
+ useEffect(() => {
+ if (!memo) {
+ setSelectedRevisionId(null);
+ }
+ }, [memo]);
- return client.renameTag(tag, trimmed);
- },
- onSuccess: async () => {
- setEditingTagName(null);
- setEditingTagValue("");
- await invalidateTagsAndMemos();
- },
- });
+ useEffect(() => {
+ setSelectedRevisionId(null);
+ }, [memo?.id]);
- const deleteTagMutation = useMutation({
- mutationFn: async (tag: string) => {
- if (!client) {
- throw new Error("Client is not ready");
+ const restoreRevisionMutation = useMutation({
+ mutationFn: async (revision: MemoRevision) => {
+ if (!client || !memo) {
+ throw new Error("Memo is not selected");
}
- return client.deleteTag(tag);
+ 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);
},
- onSuccess: invalidateTagsAndMemos,
});
- const requestDeleteTag = (tag: TagSummary) => {
- Alert.alert(`删除标签 #${tag.name}`, `将从 ${tag.memoCount} 条笔记中移除这个标签,笔记内容不会被删除。`, [
+ const requestRestoreRevision = (revision: MemoRevision) => {
+ Alert.alert("恢复到这个历史版本", "当前内容会被这个历史版本替换,恢复后仍会产生新的历史记录。", [
{ text: "取消", style: "cancel" },
{
- text: "删除标签",
- style: "destructive",
- onPress: () => deleteTagMutation.mutate(tag.name),
+ text: "恢复",
+ onPress: () => restoreRevisionMutation.mutate(revision),
},
]);
};
- const tags = tagsQuery.data?.tags ?? [];
- const renderTagItem = ({ item: tag }: { item: TagSummary }) => {
- const editing = editingTagName === tag.name;
- const nextName = editingTagValue.trim();
- const canRename = Boolean(nextName && nextName !== tag.name && !renameTagMutation.isPending);
-
- return (
- <View style={[styles.tagManageRow, editing && styles.tagManageRowEditing]}>
- {editing ? (
- <View style={styles.tagRenameForm}>
- <TextInput
- accessibilityLabel="标签名称"
- autoFocus
- editable={!renameTagMutation.isPending}
- maxLength={80}
- onChangeText={setEditingTagValue}
- onSubmitEditing={() => {
- if (canRename) {
- renameTagMutation.mutate({ tag: tag.name, name: nextName });
- }
- }}
- placeholder="标签名称"
- placeholderTextColor="#94a3b8"
- returnKeyType="done"
- style={styles.tagRenameInput}
- value={editingTagValue}
- />
- <View style={styles.tagRenameActions}>
- <Pressable
- accessibilityLabel="保存"
- accessibilityRole="button"
- disabled={!canRename}
- onPress={() => renameTagMutation.mutate({ tag: tag.name, name: nextName })}
- style={[styles.tagRenameSaveButton, !canRename && styles.buttonDisabled]}
- >
- {renameTagMutation.isPending ? <ActivityIndicator color="#ffffff" size="small" /> : <Text style={styles.tagRenameSaveText}>保存</Text>}
- </Pressable>
- <Pressable
- accessibilityLabel="取消"
- accessibilityRole="button"
- disabled={renameTagMutation.isPending}
- onPress={() => {
- setEditingTagName(null);
- setEditingTagValue("");
- }}
- style={[styles.tagRenameCancelButton, renameTagMutation.isPending && styles.buttonDisabled]}
- >
- <Text style={styles.tagRenameCancelText}>取消</Text>
- </Pressable>
- </View>
- </View>
- ) : (
- <>
- <View style={styles.tagManageText}>
- <Text numberOfLines={1} style={styles.tagManageName}>
- #{tag.name}
- </Text>
- <Text style={styles.tagManageMeta}>
- {translate(`${tag.memoCount} 条笔记`)}{tag.updatedAt ? ` · ${formatDate(tag.updatedAt, localePreference)}` : ""}
- </Text>
- </View>
- <Pressable
- accessibilityLabel={translate(`重命名标签 ${tag.name}`)}
- accessibilityRole="button"
- onPress={() => {
- setEditingTagName(tag.name);
- setEditingTagValue(tag.name);
- }}
- style={styles.tagManageAction}
- >
- <Pencil color="#64748b" size={16} />
- </Pressable>
- <Pressable
- accessibilityLabel={translate(`删除标签 ${tag.name}`)}
- accessibilityRole="button"
- onPress={() => requestDeleteTag(tag)}
- style={[styles.tagManageAction, styles.tagManageActionDanger]}
- >
- <Trash2 color="#b91c1c" size={16} />
- </Pressable>
- </>
- )}
- </View>
- );
- };
-
return (
- <Modal animationType="slide" onRequestClose={onClose} presentationStyle="pageSheet" visible={visible}>
- <SafeAreaView style={styles.modalSafeArea}>
- <View style={styles.managementHeader}>
- <Pressable accessibilityLabel="返回" accessibilityRole="button" onPress={onClose} style={styles.managementBackButton}>
- <ChevronLeft color="#64748b" size={21} />
- </Pressable>
- <View style={styles.managementHeaderText}>
- <View style={styles.managementTitleRow}>
- <Tag color="#047857" size={17} />
- <Text style={styles.managementTitle}>标签</Text>
- </View>
- <Text style={styles.managementSubtitle}>{tags.length} tags</Text>
- </View>
- </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>
- ) : (
- <FlatList
- contentContainerStyle={styles.tagManagerListContent}
- data={tags}
- initialNumToRender={12}
- keyboardShouldPersistTaps="handled"
- keyExtractor={(tag) => tag.name}
- ListFooterComponent={(
- <>
- {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}
- </>
- )}
- maxToRenderPerBatch={10}
- removeClippedSubviews={Platform.OS === "android"}
- renderItem={renderTagItem}
- style={styles.tagManagerList}
- updateCellsBatchingPeriod={32}
- windowSize={7}
- />
- )}
- </SafeAreaView>
- </Modal>
- );
-};
-
-const ApiTokensContent = ({ active, baseUrl, embedded = false }: { active: boolean; baseUrl: string; embedded?: boolean }) => {
- const { client } = useSession();
- const { translate } = useMobileLocale();
- const queryClient = useQueryClient();
- const [name, setName] = useState("MCP Token 1");
- const [nameDefaultsSynced, setNameDefaultsSynced] = useState(false);
- const [selectedScopes, setSelectedScopes] = useState<Set<string>>(() => new Set(ALL_TOKEN_SCOPES));
- const [scopeDefaultsSynced, setScopeDefaultsSynced] = useState(false);
- const [scopesExpanded, setScopesExpanded] = useState(false);
- const [createdToken, setCreatedToken] = useState<string | null>(null);
- const [copiedValue, setCopiedValue] = useState<string | null>(null);
- const [exampleOpen, setExampleOpen] = useState(false);
-
- const tokensQuery = useQuery({
- queryKey: ["mobile", "api-tokens"],
- queryFn: async () => {
- if (!client) {
- throw new Error("Client is not ready");
- }
-
- return client.listApiTokens();
- },
- enabled: Boolean(client && active),
- });
-
- const availableScopes = tokensQuery.data?.availableScopes ?? ALL_TOKEN_SCOPES;
- const tokens = tokensQuery.data?.apiTokens ?? [];
-
- useEffect(() => {
- if (nameDefaultsSynced || !tokensQuery.data) {
- return;
- }
- const highestTokenNumber = tokens.reduce((highest, token) => {
- const match = token.name.match(/^MCP Token (\d+)$/i);
- return match ? Math.max(highest, Number(match[1])) : highest;
- }, 0);
- setName(`MCP Token ${highestTokenNumber + 1}`);
- setNameDefaultsSynced(true);
- }, [nameDefaultsSynced, tokens, tokensQuery.data]);
-
- 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}」吗?`, "删除操作不可逆。一旦删除,使用此 Token 进行 API 或 MCP 调用的一切客户端将立即失效并被拒绝访问。", [
- { text: "取消", style: "cancel" },
- {
- text: "确认删除",
- style: "destructive",
- onPress: () => revokeTokenMutation.mutate(token.id),
- },
- ]);
- };
-
- return (
- <View style={[styles.settingsGroup, embedded && styles.settingsAiEmbeddedCard]}>
- <View style={styles.mcpCardHeader}>
- <View style={styles.mcpCardTitleRow}>
- <KeyRound color="#047857" size={16} />
- <Text style={styles.settingsGroupTitle}>生成 MCP 配置</Text>
- <Pressable accessibilityRole="button" onPress={() => setExampleOpen(true)} style={styles.mcpExampleButton}>
- <Text style={styles.mcpExampleButtonText}>使用示例</Text>
- </Pressable>
- </View>
- <Text style={styles.mcpCardDescription}>让 AI Agent 可以读取和整理你的笔记。</Text>
- </View>
-
- <View style={styles.mcpCardContent}>
- {createdToken ? (
- <View style={styles.createdTokenPanel}>
- <View style={styles.assetsSummary}>
- <ShieldCheck color="#047857" size={18} />
- <Text style={styles.assetsSummaryText}>API 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}
-
- <TextInput
- accessibilityLabel={translate("Token 名称")}
- editable={!createTokenMutation.isPending}
- maxLength={80}
- onChangeText={setName}
- onSubmitEditing={() => {
- if (name.trim() && selectedScopes.size > 0 && !createTokenMutation.isPending) {
- createTokenMutation.mutate();
- }
- }}
- placeholder="Token 名称,例如:Codex 或 Claude Code"
- placeholderTextColor="#94a3b8"
- returnKeyType="done"
- style={styles.mcpNameInput}
- value={name}
- />
-
- <Pressable
- accessibilityRole="button"
- disabled={createTokenMutation.isPending || !name.trim() || selectedScopes.size === 0}
- onPress={() => createTokenMutation.mutate()}
- style={[styles.mcpGenerateButton, (createTokenMutation.isPending || !name.trim() || selectedScopes.size === 0) && styles.buttonDisabled]}
- >
- {createTokenMutation.isPending ? <ActivityIndicator color="#ffffff" size="small" /> : <Plus color="#ffffff" size={16} />}
- <Text style={styles.mcpGenerateButtonText}>{createTokenMutation.isPending ? "正在创建..." : "生成 Token"}</Text>
- </Pressable>
-
- <Pressable accessibilityState={{ expanded: scopesExpanded }} onPress={() => setScopesExpanded((value) => !value)} style={styles.tokenScopeHeader}>
- <View>
- <Text style={styles.settingsRowTitle}>Token 权限范围</Text>
- <Text style={styles.settingsRowDescription}>{translate(`已选择 ${selectedScopes.size}/${availableScopes.length}`)}</Text>
- </View>
- {scopesExpanded ? <ChevronDown color="#94a3b8" size={17} /> : <ChevronRight color="#94a3b8" size={17} />}
- </Pressable>
- {scopesExpanded ? <View style={styles.scopeGrid}>
- {availableScopes.map((scope) => {
- const selected = selectedScopes.has(scope);
-
- return (
- <Pressable
- accessibilityRole="checkbox"
- accessibilityState={{ checked: selected }}
- key={scope}
- onPress={() => toggleScope(scope)}
- style={[styles.scopeOption, selected && styles.scopeOptionSelected]}
- >
- <View style={[styles.scopeCheckbox, selected && styles.scopeCheckboxSelected]}>
- {selected ? <Check color="#ffffff" size={12} /> : null}
- </View>
- <Text numberOfLines={1} style={[styles.scopeOptionText, selected && styles.scopeOptionTextSelected]}>{translate(getTokenScopeLabel(scope))}</Text>
- </Pressable>
- );
- })}
- </View> : null}
- {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 ? (
- <Text style={styles.apiTokenEmptyText}>暂无 API Token</Text>
- ) : (
- 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}
- </View>
- <Modal animationType="fade" onRequestClose={() => setExampleOpen(false)} transparent visible={exampleOpen}>
- <Pressable onPress={() => setExampleOpen(false)} style={styles.settingsDialogBackdrop}>
- <Pressable style={styles.settingsExampleDialog}>
- <View style={styles.promptCardHeader}>
- <Text style={styles.settingsGroupTitle}>Remote MCP 示例</Text>
- <IconButton accessibilityLabel="关闭" onPress={() => setExampleOpen(false)}>
- <X color="#0f172a" size={18} />
- </IconButton>
- </View>
- <Text selectable style={styles.tokenValueText}>{buildMcpRemoteConfig(baseUrl, "YOUR_TOKEN_HERE")}</Text>
- <ActionButton label={copiedValue === "example-config" ? "已复制" : "复制示例"} onPress={() => copyText(buildMcpRemoteConfig(baseUrl, "YOUR_TOKEN_HERE"), "example-config")}>
- <Copy color="#0f172a" size={16} />
- </ActionButton>
- </Pressable>
- </Pressable>
- </Modal>
- </View>
- );
-};
-
-const ApiTokensModal = ({ baseUrl, onClose, visible }: { baseUrl: string; onClose: () => void; visible: boolean }) => (
- <Modal animationType="slide" onRequestClose={onClose} presentationStyle="pageSheet" visible={visible}>
- <SafeAreaView style={styles.modalSafeArea}>
- <View style={styles.modalHeader}>
- <IconButton accessibilityLabel="关闭" onPress={onClose}>
- <X color="#0f172a" size={20} />
- </IconButton>
- <Text style={styles.modalTitle}>MCP 与 API Token</Text>
- <View style={styles.iconButtonPlaceholder} />
- </View>
- <ScrollView contentContainerStyle={styles.editorForm}>
- <ApiTokensContent active={visible} baseUrl={baseUrl} />
- </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 { resolvedLocale, translate } = useMobileLocale();
- 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.apiTokenText}>
- <Text numberOfLines={1} style={styles.apiTokenName}>
- {token.name}
- </Text>
- <Text numberOfLines={1} style={styles.apiTokenScopes}>
- {token.scopes.map((scope) => translate(getTokenScopeLabel(scope))).join(resolvedLocale === "en-US" ? ", " : "、") || translate("无权限")}
- </Text>
- <Text style={styles.apiTokenMeta}>
- {translate(token.lastUsedAt ? `上次调用时间:${formatDate(token.lastUsedAt, localePreference)}` : "从未被调用")}
- {!token.token ? ` · ${translate("旧 Token 无法找回明文,请重新生成")}` : ""}
- </Text>
- </View>
- <View style={styles.apiTokenActions}>
- <Pressable
- accessibilityLabel={canCopyToken ? "复制 Token" : "旧 Token 无法复制"}
- accessibilityRole="button"
- disabled={!canCopyToken}
- onPress={() => token.token && onCopy(token.token, tokenCopyLabel)}
- style={[styles.apiTokenActionButton, !canCopyToken && styles.buttonDisabled]}
- >
- {copiedValue === tokenCopyLabel ? <ShieldCheck color="#047857" size={18} /> : <Copy color={canCopyToken ? "#0f172a" : "#cbd5e1"} size={18} />}
- <Text style={styles.apiTokenActionText}>{copiedValue === tokenCopyLabel ? "已复制" : "复制 Token"}</Text>
- </Pressable>
- <Pressable
- accessibilityLabel={canCopyToken ? "复制完整 MCP 配置" : "旧 Token 无法复制 MCP 配置"}
- accessibilityRole="button"
- disabled={!canCopyToken}
- onPress={() => token.token && onCopy(buildMcpRemoteConfig(baseUrl, token.token), configCopyLabel)}
- style={[styles.apiTokenActionButton, !canCopyToken && styles.buttonDisabled]}
- >
- {copiedValue === configCopyLabel ? <ShieldCheck color="#047857" size={18} /> : <KeyRound color={canCopyToken ? "#0f172a" : "#cbd5e1"} size={18} />}
- <Text style={styles.apiTokenActionText}>{copiedValue === configCopyLabel ? "已复制" : "复制完整 MCP 配置"}</Text>
- </Pressable>
- <Pressable
- accessibilityLabel="删除 Token"
- accessibilityRole="button"
- disabled={isDeleting}
- onPress={() => onDelete(token)}
- style={[styles.apiTokenActionButton, styles.apiTokenDeleteButton, isDeleting && styles.buttonDisabled]}
- >
- <Trash2 color="#b91c1c" size={18} />
- <Text style={styles.apiTokenDeleteText}>删除 Token</Text>
- </Pressable>
- </View>
- </View>
- );
-};
-
-const AdvancedPlayCard = ({ embedded = false }: { embedded?: boolean }) => {
- const [copiedPromptId, setCopiedPromptId] = useState<string | null>(null);
- const [expanded, setExpanded] = useState(false);
- 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 (
- <View style={[styles.settingsGroup, embedded && styles.settingsAiEmbeddedCardFirst]}>
- <Pressable accessibilityState={{ expanded }} onPress={() => setExpanded((value) => !value)} style={styles.settingsAccordionHeader}>
- <View style={styles.settingsLinkCopy}>
- <View style={styles.settingsGroupHeader}>
- <Sparkles color="#047857" size={16} />
- <Text style={styles.settingsGroupTitle}>进阶玩法</Text>
- </View>
- <Text style={styles.settingsLinkDescription}>搭配 AI Agent 的进阶玩法。</Text>
- </View>
- <ChevronDown color="#94a3b8" size={17} style={[styles.settingsAccordionChevron, expanded && styles.settingsAccordionChevronExpanded]} />
- </Pressable>
- {expanded ? (
- <View style={styles.settingsAccordionContent}>
- <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>
- ))}
- </View>
- ) : null}
- </View>
- );
-};
-
-const SystemInfoCard = ({ embedded = false }: { embedded?: boolean }) => {
- const [copied, setCopied] = useState(false);
- const [expanded, setExpanded] = useState(false);
- const { checkForUpdate, hasUpdate, status } = useMobileUpdate();
- const localePreference = useMobileLocalePreference();
- const copy = getMobileSystemInfoText(localePreference);
- const infoItems = getMobileSystemInfoItems(localePreference);
-
- const copySystemInfo = async () => {
- await Clipboard.setStringAsync(infoItems.map((item) => `${item.label}: ${item.value}`).join("\n"));
- setCopied(true);
- setTimeout(() => setCopied(false), 1600);
- };
-
- return (
- <View style={[styles.settingsGroup, embedded && styles.settingsEmbeddedSection]}>
- <Pressable accessibilityState={{ expanded }} onPress={() => setExpanded((value) => !value)} style={styles.settingsAccordionHeader}>
- <View style={styles.settingsLinkCopy}>
- <View style={styles.settingsGroupHeader}>
- <Info color="#047857" size={16} />
- <Text style={styles.settingsGroupTitle}>{copy.title}</Text>
- {hasUpdate ? <View accessibilityLabel="有新版本" style={styles.updateDot} /> : null}
- </View>
- <Text style={styles.settingsLinkDescription}>{copy.description}</Text>
- </View>
- {expanded ? <ChevronDown color="#94a3b8" size={17} /> : <ChevronRight color="#94a3b8" size={17} />}
- </Pressable>
- {expanded ? (
- <View style={styles.settingsAccordionContent}>
- <ActionButton label={copied ? "已复制" : "复制信息"} onPress={copySystemInfo}>
- {copied ? <ShieldCheck color="#047857" size={16} /> : <Copy color="#0f172a" size={16} />}
- </ActionButton>
- <ActionButton
- disabled={status === "checking"}
- label={status === "checking" ? "正在检查…" : hasUpdate ? "发现新版本" : "检查更新"}
- onPress={() => void checkForUpdate()}
- >
- {status === "checking" ? <ActivityIndicator color="#047857" size="small" /> : <RefreshCw color="#047857" size={16} />}
- </ActionButton>
- <View style={styles.systemInfoRows}>
- {Array.from({ length: Math.ceil(infoItems.length / 3) }, (_, rowIndex) => {
- const rowItems = infoItems.slice(rowIndex * 3, rowIndex * 3 + 3);
-
- return (
- <View
- key={`system-info-row-${rowIndex}`}
- style={[styles.systemInfoRow, rowIndex === Math.ceil(infoItems.length / 3) - 1 && styles.systemInfoRowLast]}
- >
- {rowItems.map((item, itemIndex) => (
- <View
- key={item.label}
- style={[styles.systemInfoCell, itemIndex < rowItems.length - 1 && styles.systemInfoCellDivider]}
- >
- <Text numberOfLines={1} style={styles.panelLabel}>{item.label}</Text>
- <Text numberOfLines={1} selectable style={styles.systemInfoListValue}>
- {item.value}
- </Text>
- </View>
- ))}
- </View>
- );
- })}
- </View>
- </View>
- ) : null}
- </View>
- );
-};
-
-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 { translate } = useMobileLocale();
- 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 DocumentPicker = await import("expo-document-picker");
- 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 = [];
-
- for (const [index, asset] of assets.entries()) {
- setUploadProgress(`正在上传第 ${index + 1}/${assets.length} 个文件...`);
- const form = new FormData();
- const uploadAsset = await prepareUploadAsset(asset, imageCompressionEnabled);
- form.append("file", new ExpoFile(uploadAsset.uri));
-
- const { resource } = await client.uploadMemoResource(activeMemo.id, form);
- resources.push(resource);
- }
-
- return { resources };
- },
- onSuccess: async (result) => {
- if (!result) {
- return;
- }
-
- await Promise.all([
- queryClient.invalidateQueries({ queryKey: ["mobile", "resources"] }),
- queryClient.invalidateQueries({ queryKey: ["mobile", "memo"] }),
- ]);
- setFilter(result.resources.some((resource) => resource.kind === "image") ? "image" : "all");
- setUploadProgress("上传成功!");
- },
- 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.managementHeader}>
- <Pressable
- accessibilityLabel="返回"
- accessibilityRole="button"
- disabled={uploadResourceMutation.isPending}
- onPress={onClose}
- style={styles.managementBackButton}
- >
- <ChevronLeft color={uploadResourceMutation.isPending ? "#cbd5e1" : "#64748b"} size={21} />
- </Pressable>
- <View style={styles.managementHeaderText}>
- <View style={styles.managementTitleRow}>
- <Archive color="#047857" size={17} />
- <Text style={styles.managementTitle}>附件管理</Text>
- </View>
- <Text numberOfLines={1} style={styles.managementSubtitle}>
- {formatBytes(summary.totalBytes)} • {translate(`${summary.totalCount} 文件`)} • {translate(`${summary.imageCount} 图片`)}
- </Text>
- </View>
- </View>
-
- <View style={styles.assetsToolbar}>
- <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.assetsSearchLayoutRow}>
- <View style={[styles.searchBox, styles.assetsSearchBox]}>
- <Search color="#64748b" size={17} />
- <TextInput
- autoCapitalize="none"
- autoCorrect={false}
- onChangeText={setSearchText}
- placeholder="搜索附件名或来源笔记..."
- placeholderTextColor="#94a3b8"
- style={[styles.searchInput, styles.assetsSearchInput]}
- value={searchText}
- />
- {searchText ? (
- <Pressable onPress={() => setSearchText("")}>
- <X color="#64748b" size={17} />
- </Pressable>
- ) : null}
- </View>
- <View style={styles.layoutToggle}>
- <Pressable accessibilityLabel="网格视图" accessibilityRole="button" onPress={() => handleLayoutChange("grid")} style={[styles.layoutToggleButton, layout === "grid" && styles.layoutToggleButtonActive]}>
- <Grid color={layout === "grid" ? "#047857" : "#64748b"} size={16} />
- </Pressable>
- <Pressable accessibilityLabel="列表视图" accessibilityRole="button" onPress={() => handleLayoutChange("list")} style={[styles.layoutToggleButton, layout === "list" && styles.layoutToggleButtonActive]}>
- <List color={layout === "list" ? "#047857" : "#64748b"} size={16} />
- </Pressable>
- </View>
- </View>
- </View>
-
- <View style={[styles.assetsUploadBanner, !activeMemo && styles.assetsUploadBannerInactive]}>
- <Text numberOfLines={2} style={[styles.assetsUploadHint, !activeMemo && styles.assetsUploadHintInactive]}>
- {translate(uploadProgress || uploadTargetHint)}
- </Text>
- {activeMemo ? (
- <Pressable
- accessibilityRole="button"
- disabled={activeMemo.isDeleted || uploadResourceMutation.isPending}
- onPress={() => uploadResourceMutation.mutate()}
- style={[styles.assetsUploadButton, (activeMemo.isDeleted || uploadResourceMutation.isPending) && styles.buttonDisabled]}
- >
- {uploadResourceMutation.isPending ? <ActivityIndicator color="#ffffff" size="small" /> : <Upload color="#ffffff" size={13} />}
- <Text style={styles.assetsUploadButtonText}>{uploadResourceMutation.isPending ? "处理中..." : "上传附件"}</Text>
- </Pressable>
- ) : null}
- </View>
- {uploadResourceMutation.error ? (
- <Text style={styles.assetsUploadError}>{uploadResourceMutation.error instanceof Error ? uploadResourceMutation.error.message : "上传失败"}</Text>
- ) : null}
-
- {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}
- initialNumToRender={6}
- key={layout}
- keyExtractor={(resource) => resource.id}
- maxToRenderPerBatch={8}
- numColumns={layout === "grid" ? 2 : 1}
- removeClippedSubviews={Platform.OS === "android"}
- renderItem={({ item }) => <ResourceCard layout={layout} resource={item} onOpen={() => openResource(item)} onPreview={() => setPreviewResource(item)} />}
- refreshControl={<RefreshControl onRefresh={() => resourcesQuery.refetch()} refreshing={resourcesQuery.isFetching} tintColor="#0f172a" />}
- updateCellsBatchingPeriod={32}
- windowSize={5}
- />
- )}
-
- <ImagePreviewModal
- onClose={() => setPreviewResource(null)}
- onNext={() => handlePreviewStep(1)}
- onPrevious={() => handlePreviewStep(-1)}
- onSelect={setPreviewResource}
- resource={previewResource}
- resources={imageResources}
- resourceIndex={previewIndex}
- />
- </SafeAreaView>
- </Modal>
- );
-};
-
-const ResourceCard = ({
- layout,
- onOpen,
- onPreview,
- resource,
-}: {
- layout: MobileResourceLayoutPreference;
- onOpen: () => void;
- onPreview: () => void;
- resource: ResourceListItem;
-}) => {
- const { session } = useSession();
- const { translate } = useMobileLocale();
- const source = resource.memoDeleted ? "已删除笔记" : resource.memoTitle || resource.memoExcerpt || resource.memoId;
- const isImage = resource.kind === "image";
- const localePreference = useMobileLocalePreference();
-
- return (
- <Pressable
- accessibilityLabel={`${resource.filename || resource.id}, ${formatBytes(resource.byteSize)}, ${translate(`来自:${source}`)}`}
- accessibilityRole="button"
- onPress={isImage ? onPreview : onOpen}
- style={layout === "grid" ? styles.resourceGridCard : styles.resourceCard}
- >
- <View style={layout === "grid" ? styles.resourceGridThumb : styles.resourceThumb}>
- {isImage ? (
- <AuthenticatedResourceImage
- alt={resource.filename || "图片资源"}
- source={getAuthenticatedResourceSource(resource.url, session)}
- 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" ? (
- <>
- <View style={styles.resourceGridMetaRow}>
- <Text numberOfLines={1} style={styles.resourceGridMetaText}>{formatBytes(resource.byteSize)}</Text>
- <Text numberOfLines={1} style={styles.resourceGridMetaText}>{(resource.mimeType?.split("/")[1] || resource.kind).toUpperCase()}</Text>
- </View>
- <Text accessibilityLabel={translate(`来自:${source}`)} numberOfLines={1} style={styles.resourceGridSource}>
- 📄 {translate(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}>
- {translate(`来源笔记:${source}`)}
- </Text>
- </>
- )}
- </View>
- {layout === "list" ? (
- <Pressable accessibilityLabel={translate("在新窗口打开")} accessibilityRole="button" onPress={onOpen} style={styles.secondaryIconButton}>
- <ExternalLink color="#0f172a" size={16} />
- </Pressable>
- ) : null}
- </Pressable>
- );
-};
-
-const ImagePreviewModal = ({
- onClose,
- onNext,
- onPrevious,
- onSelect,
- resource,
- resources,
- resourceIndex,
-}: {
- onClose: () => void;
- onNext: () => void;
- onPrevious: () => void;
- onSelect: (resource: ResourceListItem) => void;
- resource: ResourceListItem | null;
- resources: ResourceListItem[];
- resourceIndex: number;
-}) => {
- const { session } = useSession();
- const { resolvedLocale, translate } = useMobileLocale();
- const previewInsets = useSafeAreaInsets();
- const [zoomLevel, setZoomLevel] = useState(1);
- const [showThumbnails, setShowThumbnails] = useState(false);
- const thumbnailListRef = useRef<FlatList<ResourceListItem>>(null);
- const scale = useSharedValue(1);
- const savedScale = useSharedValue(1);
- const translateX = useSharedValue(0);
- const translateY = useSharedValue(0);
- const savedTranslateX = useSharedValue(0);
- const savedTranslateY = useSharedValue(0);
- const stageWidth = useSharedValue(0);
- const stageHeight = useSharedValue(0);
- const resourceCount = resources.length;
-
- const resetTransform = useCallback(() => {
- scale.value = 1;
- savedScale.value = 1;
- translateX.value = 0;
- translateY.value = 0;
- savedTranslateX.value = 0;
- savedTranslateY.value = 0;
- setZoomLevel(1);
- }, [savedScale, savedTranslateX, savedTranslateY, scale, translateX, translateY]);
-
- useEffect(() => {
- resetTransform();
- if (resourceIndex > 0) {
- thumbnailListRef.current?.scrollToIndex({ animated: true, index: resourceIndex, viewPosition: 0.5 });
- }
- }, [resetTransform, resource?.id, resourceIndex]);
-
- useEffect(() => {
- if (!resource) {
- setShowThumbnails(false);
- return;
- }
- const task = InteractionManager.runAfterInteractions(() => setShowThumbnails(true));
- return () => task.cancel();
- }, [Boolean(resource)]);
-
- const applyZoom = useCallback((nextZoom: number) => {
- const resolvedZoom = Math.max(1, Math.min(3, nextZoom));
- scale.value = withTiming(resolvedZoom, { duration: 160 });
- savedScale.value = resolvedZoom;
- const maxTranslateX = Math.max(0, (resolvedZoom - 1) * stageWidth.value / 2);
- const maxTranslateY = Math.max(0, (resolvedZoom - 1) * stageHeight.value / 2);
- const resolvedTranslateX = Math.max(-maxTranslateX, Math.min(maxTranslateX, translateX.value));
- const resolvedTranslateY = Math.max(-maxTranslateY, Math.min(maxTranslateY, translateY.value));
- translateX.value = withTiming(resolvedTranslateX, { duration: 160 });
- translateY.value = withTiming(resolvedTranslateY, { duration: 160 });
- savedTranslateX.value = resolvedTranslateX;
- savedTranslateY.value = resolvedTranslateY;
- setZoomLevel(resolvedZoom);
- }, [savedScale, savedTranslateX, savedTranslateY, scale, stageHeight, stageWidth, translateX, translateY]);
-
- const previewGesture = useMemo(() => Gesture.Simultaneous(
- Gesture.Pinch()
- .onUpdate((event) => {
- scale.value = Math.max(1, Math.min(3, savedScale.value * event.scale));
- })
- .onEnd(() => {
- const resolvedZoom = Math.max(1, Math.min(3, scale.value));
- scale.value = withTiming(resolvedZoom, { duration: 120 });
- savedScale.value = resolvedZoom;
- const maxTranslateX = Math.max(0, (resolvedZoom - 1) * stageWidth.value / 2);
- const maxTranslateY = Math.max(0, (resolvedZoom - 1) * stageHeight.value / 2);
- const resolvedTranslateX = Math.max(-maxTranslateX, Math.min(maxTranslateX, translateX.value));
- const resolvedTranslateY = Math.max(-maxTranslateY, Math.min(maxTranslateY, translateY.value));
- translateX.value = withTiming(resolvedTranslateX, { duration: 120 });
- translateY.value = withTiming(resolvedTranslateY, { duration: 120 });
- savedTranslateX.value = resolvedTranslateX;
- savedTranslateY.value = resolvedTranslateY;
- runOnJS(setZoomLevel)(resolvedZoom);
- }),
- Gesture.Pan()
- .onUpdate((event) => {
- if (scale.value > 1) {
- const maxTranslateX = Math.max(0, (scale.value - 1) * stageWidth.value / 2);
- const maxTranslateY = Math.max(0, (scale.value - 1) * stageHeight.value / 2);
- translateX.value = Math.max(-maxTranslateX, Math.min(maxTranslateX, savedTranslateX.value + event.translationX));
- translateY.value = Math.max(-maxTranslateY, Math.min(maxTranslateY, savedTranslateY.value + event.translationY));
- }
- })
- .onEnd(() => {
- savedTranslateX.value = translateX.value;
- savedTranslateY.value = translateY.value;
- })
- ), [savedScale, savedTranslateX, savedTranslateY, scale, stageHeight, stageWidth, translateX, translateY]);
- const previewAnimatedStyle = useAnimatedStyle(() => ({
- transform: [
- { translateX: translateX.value },
- { translateY: translateY.value },
- { scale: scale.value },
- ],
- }));
-
- return <Modal animationType="fade" transparent visible={Boolean(resource)} onRequestClose={onClose}>
- <View style={styles.previewBackdrop}>
- <View style={[styles.previewToolbar, { top: previewInsets.top + 8 }]}>
- <Pressable
- accessibilityLabel={translate("放大")}
- accessibilityRole="button"
- disabled={zoomLevel >= 3}
- onPress={() => applyZoom(zoomLevel + 0.5)}
- style={[styles.previewToolbarButton, zoomLevel >= 3 && styles.previewToolbarButtonDisabled]}
- >
- <ZoomIn color="#ffffff" size={24} />
- </Pressable>
- <Pressable
- accessibilityLabel={translate("缩小")}
- accessibilityRole="button"
- disabled={zoomLevel <= 1}
- onPress={() => applyZoom(zoomLevel - 0.5)}
- style={[styles.previewToolbarButton, zoomLevel <= 1 && styles.previewToolbarButtonDisabled]}
- >
- <ZoomOut color="#ffffff" size={24} />
- </Pressable>
- <Pressable accessibilityLabel={translate("关闭")} accessibilityRole="button" onPress={onClose} style={styles.previewToolbarButton}>
- <X color="#ffffff" size={27} />
- </Pressable>
- </View>
-
- <View
- onLayout={(event) => {
- stageWidth.value = event.nativeEvent.layout.width;
- stageHeight.value = event.nativeEvent.layout.height;
- }}
- style={[styles.previewStage, { bottom: Math.max(136, previewInsets.bottom + 108) }]}
- >
- {resource ? (
- <GestureDetector gesture={previewGesture}>
- <Animated.View style={[styles.previewImageFrame, previewAnimatedStyle]}>
- <AuthenticatedResourceImage
- alt={resource.filename || "图片预览"}
- resizeMode="contain"
- source={getAuthenticatedResourceSource(resource.url, session)}
- style={styles.previewImage}
- />
- </Animated.View>
- </GestureDetector>
- ) : null}
- </View>
- {resourceCount > 1 ? (
- <View style={styles.previewNavRow}>
- <Pressable accessibilityLabel={translate("上一张")} accessibilityRole="button" onPress={onPrevious} style={styles.previewNavButton}>
- <ChevronLeft color="#ffffff" size={28} style={styles.previewNavIcon} />
- </Pressable>
- <Pressable accessibilityLabel={translate("下一张")} accessibilityRole="button" onPress={onNext} style={styles.previewNavButton}>
- <ChevronRight color="#ffffff" size={28} style={styles.previewNavIcon} />
- </Pressable>
- </View>
- ) : null}
- {showThumbnails && resourceCount > 0 ? (
- <View style={[styles.previewThumbnailRail, { bottom: previewInsets.bottom + 8 }]}>
- <FlatList
- contentContainerStyle={styles.previewThumbnailList}
- data={resources}
- getItemLayout={(_data, index) => ({ index, length: 108, offset: 108 * index })}
- horizontal
- initialNumToRender={5}
- keyExtractor={(item) => item.id}
- maxToRenderPerBatch={6}
- onScrollToIndexFailed={({ index }) => thumbnailListRef.current?.scrollToOffset({ animated: true, offset: Math.max(0, index * 108) })}
- ref={thumbnailListRef}
- renderItem={({ index, item }) => (
- <Pressable
- accessibilityLabel={resolvedLocale === "en-US" ? `${index + 1} of ${resourceCount}` : `${index + 1}/${resourceCount}`}
- accessibilityRole="button"
- onPress={() => onSelect(item)}
- style={[styles.previewThumbnail, item.id === resource?.id && styles.previewThumbnailActive]}
- >
- <AuthenticatedResourceImage
- alt={item.filename || "图片预览"}
- resizeMode="contain"
- source={getAuthenticatedResourceSource(item.url, session)}
- style={styles.previewThumbnailImage}
- />
- </Pressable>
- )}
- showsHorizontalScrollIndicator={false}
- windowSize={5}
- />
- </View>
- ) : 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("恢复到这个历史版本", "当前内容会被这个历史版本替换,恢复后仍会产生新的历史记录。", [
- { text: "取消", style: "cancel" },
- {
- text: "恢复",
- onPress: () => restoreRevisionMutation.mutate(revision),
- },
- ]);
- };
-
- return (
- <Modal animationType="slide" onRequestClose={onClose} presentationStyle="pageSheet" visible={Boolean(memo)}>
+ <Modal animationType="slide" onRequestClose={onClose} presentationStyle="pageSheet" visible={Boolean(memo)}>
<SafeAreaView style={styles.modalSafeArea}>
<View style={styles.managementHeader}>
<View style={styles.managementHeaderText}>
@@ -3840,8 +2436,8 @@ const RevisionHistoryModal = ({
<ScrollView contentContainerStyle={styles.revisionHistoryContent}>
<View style={styles.revisionSummaryRow}>
<View style={styles.revisionSummaryText}>
- <Text style={styles.settingsRowTitle}>{selectedRevision ? `版本 ${selectedRevision.revision} 与当前内容` : "未选择历史版本"}</Text>
- {selectedRevision ? <Text style={styles.revisionChangeBadge}>{`${changedLines} 行有变化`}</Text> : null}
+ <Text style={styles.settingsRowTitle}>{selectedRevision ? `版本 ${selectedRevision.revision}` : "未选择历史版本"}</Text>
+ <Text style={styles.settingsRowDescription}>选择历史记录后可预览并恢复。</Text>
</View>
{selectedRevision ? (
<ActionButton disabled={restoreRevisionMutation.isPending || Boolean(memo?.isDeleted)} label={restoreRevisionMutation.isPending ? "恢复中" : "恢复该版本"} onPress={() => requestRestoreRevision(selectedRevision)}>
@@ -3886,7 +2482,11 @@ const RevisionHistoryModal = ({
</View>
)}
- {selectedRevision ? <RevisionComparisonTable leftRows={diffRows?.leftRows ?? []} rightRows={diffRows?.rightRows ?? []} /> : null}
+ {selectedRevision ? (
+ <View style={styles.revisionPreviewCard}>
+ <Text selectable style={styles.revisionPreviewText}>{selectedRevision.contentMarkdown || "空笔记"}</Text>
+ </View>
+ ) : null}
{restoreRevisionMutation.error ? (
<Text style={styles.errorText}>{restoreRevisionMutation.error instanceof Error ? restoreRevisionMutation.error.message : "恢复失败"}</Text>
) : null}
@@ -3896,32 +2496,6 @@ const RevisionHistoryModal = ({
);
};
-const RevisionComparisonTable = ({ leftRows, rightRows }: { leftRows: RevisionDiffRow[]; rightRows: RevisionDiffRow[] }) => {
- const hasContent = leftRows.some((row) => row.text) || rightRows.some((row) => row.text);
-
- return (
- <View style={styles.revisionComparisonTable}>
- <View style={styles.revisionComparisonHeader}>
- <Text style={styles.revisionComparisonHeaderText}>历史版本</Text>
- <Text style={styles.revisionComparisonHeaderText}>当前内容</Text>
- </View>
- {hasContent ? leftRows.map((leftRow, index) => (
- <View key={`${leftRow.lineNumber ?? "empty"}-${index}`} style={styles.revisionComparisonRow}>
- <RevisionDiffCell row={leftRow} tone="history" />
- <RevisionDiffCell row={rightRows[index] ?? { lineNumber: null, text: "", state: "empty" }} tone="current" />
- </View>
- )) : <Text style={styles.revisionComparisonEmpty}>空笔记</Text>}
- </View>
- );
-};
-
-const RevisionDiffCell = ({ row, tone }: { row: RevisionDiffRow; tone: "history" | "current" }) => (
- <View style={[styles.revisionComparisonCell, tone === "current" && styles.revisionComparisonCellCurrent, row.state === "changed" && (tone === "history" ? styles.revisionDiffRowHistory : styles.revisionDiffRowCurrent)]}>
- <Text style={styles.revisionComparisonLineNumber}>{row.lineNumber ?? ""}</Text>
- <Text style={[styles.revisionComparisonText, row.state === "empty" && styles.revisionDiffTextEmpty]}>{row.text || " "}</Text>
- </View>
-);
-
const getAuthenticatedResourceSource = (
source: string,
session: { baseUrl: string; token: string } | null
@@ -4106,7 +2680,6 @@ const MemoDetailModal = ({
const safeAreaInsets = useSafeAreaInsets();
const [actionsOpen, setActionsOpen] = useState(false);
const [searchOpen, setSearchOpen] = useState(false);
- const [searchReplaceOpen, setSearchReplaceOpen] = useState(false);
const [searchQuery, setSearchQuery] = useState("");
const [activeMatchIndex, setActiveMatchIndex] = useState(0);
const localePreference = useMobileLocalePreference();
@@ -4274,19 +2847,6 @@ const MemoDetailModal = ({
/>
<Text style={[styles.noteSearchCount, searchQuery.trim() && searchMatches.length === 0 && styles.noteSearchCountEmpty]}>{searchMatchLabel}</Text>
</View>
- {searchReplaceOpen ? (
- <View style={styles.searchBox}>
- <RefreshCw color="#94a3b8" size={18} />
- <TextInput
- accessibilityLabel="替换为"
- editable={false}
- placeholder="替换为"
- placeholderTextColor="#94a3b8"
- style={styles.searchInput}
- value=""
- />
- </View>
- ) : null}
<View style={styles.richEditorSearchActions}>
<ActionButton disabled={searchMatches.length === 0} label="上一个搜索结果" onPress={() => moveSearchMatch(-1)}>
<ChevronLeft color={searchMatches.length === 0 ? "#cbd5e1" : "#0f172a"} size={16} />
@@ -4294,14 +2854,8 @@ const MemoDetailModal = ({
<ActionButton disabled={searchMatches.length === 0} label="下一个搜索结果" onPress={() => moveSearchMatch(1)}>
<ChevronRight color={searchMatches.length === 0 ? "#cbd5e1" : "#0f172a"} size={16} />
</ActionButton>
- {searchReplaceOpen ? (
- <ActionButton disabled label="全部替换" onPress={() => undefined}>
- <RefreshCw color="#cbd5e1" size={16} />
- </ActionButton>
- ) : null}
<ActionButton label="关闭搜索" onPress={() => {
setSearchOpen(false);
- setSearchReplaceOpen(false);
setSearchQuery("");
}}>
<X color="#0f172a" size={16} />
@@ -4344,11 +2898,6 @@ const MemoDetailModal = ({
<Text style={styles.actionSheetTitle}>笔记操作</Text>
<ActionSheetItem icon={<Search color="#0f172a" size={18} />} label="搜索当前笔记" onPress={() => closeActionsAndRun(() => {
setSearchOpen(true);
- setSearchReplaceOpen(false);
- })} />
- <ActionSheetItem icon={<RefreshCw color="#0f172a" size={18} />} label="替换当前笔记" onPress={() => closeActionsAndRun(() => {
- setSearchOpen(true);
- setSearchReplaceOpen(true);
})} />
<ActionSheetItem icon={<History color="#0f172a" size={18} />} label="版本历史" onPress={() => closeActionsAndRun(() => onOpenRevisions(memo))} />
<ActionSheetItem disabled={isRestoring} icon={<RotateCcw color="#0f172a" size={18} />} label={isRestoring ? "恢复中" : "恢复笔记"} onPress={() => closeActionsAndRun(() => onRestore(memo))} />
@@ -5060,12 +3609,10 @@ const SelectionActionBar = ({
const SelectionMoreModal = ({
bottomOffset,
- canMerge,
canPin,
canToggleVisibleSelection,
onClear,
onClose,
- onMerge,
onPin,
onToggleVisibleSelection,
pinLabel,
@@ -5074,12 +3621,10 @@ const SelectionMoreModal = ({
visible,
}: {
bottomOffset: number;
- canMerge: boolean;
canPin: boolean;
canToggleVisibleSelection: boolean;
onClear: () => void;
onClose: () => void;
- onMerge: () => void;
onPin: () => void;
onToggleVisibleSelection: () => void;
pinLabel: string;
@@ -5101,7 +3646,6 @@ const SelectionMoreModal = ({
</Pressable>
</View>
<ActionSheetItem disabled={!canToggleVisibleSelection} icon={<CheckSquare color={canToggleVisibleSelection ? "#0f172a" : "#cbd5e1"} size={18} />} label={selectionToggleLabel} onPress={onToggleVisibleSelection} />
- <ActionSheetItem disabled={!canMerge} icon={<Merge color={canMerge ? "#0f172a" : "#cbd5e1"} size={18} />} label="合并笔记" onPress={onMerge} />
<ActionSheetItem disabled={!canPin} icon={<Sparkles color={canPin ? "#0f172a" : "#cbd5e1"} size={18} />} label={pinLabel} onPress={onPin} />
<ActionSheetItem icon={<X color="#0f172a" size={18} />} label="取消选择" onPress={onClear} />
</Pressable>
@@ -5594,9 +4138,6 @@ const getResolvedMobileLocale = (localePreference: MobileLocaleMode) =>
const isEnglishMobileLocale = (localePreference: MobileLocaleMode) => getResolvedMobileLocale(localePreference).startsWith("en");
-const getMobileAdvancedPrompts = (localePreference: MobileLocaleMode) =>
- isEnglishMobileLocale(localePreference) ? ADVANCED_PROMPTS_EN : ADVANCED_PROMPTS_ZH;
-
const getMobileSystemInfoText = (localePreference: MobileLocaleMode) =>
isEnglishMobileLocale(localePreference)
? {
@@ -5699,61 +4240,6 @@ const formatMemoPreviewDate = (value: string, localePreference: MobileLocaleMode
return new Intl.DateTimeFormat(locale, { year: "numeric", month: "numeric", day: "numeric" }).format(date);
};
-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 blobToDataUrl = (blob: Blob) => new Promise<string>((resolve, reject) => {
const reader = new FileReader();
reader.onerror = () => reject(reader.error ?? new Error("资源读取失败"));
@@ -5944,21 +4430,6 @@ const markdownToLocalText = (markdown: string) =>
.replace(/\s+/g, " ")
.trim();
-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 getTextSearchMatches = (text: string, query: string) => {
const normalizedQuery = query.trim().toLowerCase();
@@ -5985,22 +4456,6 @@ const getTextSearchMatches = (text: string, query: string) => {
return matches;
};
-const buildMcpRemoteConfig = (baseUrl: string, token: string) =>
- JSON.stringify(
- {
- mcpServers: {
- edgeever: {
- url: `${baseUrl.replace(/\/+$/, "")}/mcp`,
- headers: {
- Authorization: `Bearer ${token}`,
- },
- },
- },
- },
- null,
- 2
- );
-
const formatRevisionActor = (actor: string) => {
if (actor.startsWith("user:")) {
return "user";
@@ -6435,75 +4890,6 @@ const baseWorkspaceStyles = StyleSheet.create({
color: "#047857",
fontWeight: "700",
},
- settingsExampleDialog: {
- backgroundColor: "#ffffff",
- borderRadius: 14,
- gap: 14,
- maxWidth: 620,
- padding: 16,
- width: "100%",
- },
- mcpCardHeader: {
- gap: 4,
- padding: 16,
- },
- mcpCardTitleRow: {
- alignItems: "center",
- flexDirection: "row",
- flexWrap: "wrap",
- gap: 8,
- },
- mcpCardDescription: {
- color: "#64748b",
- fontSize: 12,
- lineHeight: 16,
- },
- mcpExampleButton: {
- alignItems: "center",
- backgroundColor: "#ffffff",
- borderColor: "#e2e8f0",
- borderRadius: 6,
- borderWidth: 1,
- height: 28,
- justifyContent: "center",
- paddingHorizontal: 10,
- },
- mcpExampleButtonText: {
- color: "#334155",
- fontSize: 12,
- fontWeight: "600",
- },
- mcpCardContent: {
- gap: 12,
- paddingBottom: 16,
- paddingHorizontal: 16,
- },
- mcpNameInput: {
- backgroundColor: "#ffffff",
- borderColor: "#e2e8f0",
- borderRadius: 6,
- borderWidth: 1,
- color: "#0f172a",
- fontSize: 12,
- height: 36,
- paddingHorizontal: 12,
- paddingVertical: 0,
- },
- mcpGenerateButton: {
- alignItems: "center",
- backgroundColor: "#10b981",
- borderRadius: 6,
- flexDirection: "row",
- gap: 8,
- height: 36,
- justifyContent: "center",
- paddingHorizontal: 12,
- },
- mcpGenerateButtonText: {
- color: "#ffffff",
- fontSize: 12,
- fontWeight: "700",
- },
settingsLinkCopy: {
flex: 1,
paddingBottom: 16,
@@ -6721,91 +5107,6 @@ const baseWorkspaceStyles = StyleSheet.create({
fontSize: 15,
minHeight: 44,
},
- assetsToolbar: {
- backgroundColor: "#ffffff",
- borderBottomColor: "#e2e8f0",
- borderBottomWidth: 1,
- gap: 12,
- padding: 16,
- },
- assetsSearchLayoutRow: {
- alignItems: "center",
- flexDirection: "row",
- gap: 8,
- },
- assetsSearchBox: {
- flex: 1,
- minHeight: 36,
- },
- assetsSearchInput: {
- fontSize: 12,
- minHeight: 34,
- },
- assetsSummary: {
- alignItems: "center",
- flexDirection: "row",
- flexWrap: "wrap",
- gap: 7,
- },
- assetsSummaryText: {
- color: "#0f172a",
- fontSize: 14,
- fontWeight: "800",
- },
- assetsHint: {
- color: "#047857",
- fontSize: 12,
- fontWeight: "700",
- lineHeight: 18,
- },
- assetsUploadBanner: {
- alignItems: "center",
- backgroundColor: "#ecfdf5",
- borderBottomColor: "#a7f3d0",
- borderBottomWidth: 1,
- flexDirection: "row",
- gap: 8,
- minHeight: 40,
- paddingHorizontal: 16,
- paddingVertical: 6,
- },
- assetsUploadBannerInactive: {
- backgroundColor: "#fffbeb",
- borderBottomColor: "#fde68a",
- },
- assetsUploadHint: {
- color: "#047857",
- flex: 1,
- fontSize: 11,
- fontWeight: "600",
- lineHeight: 15,
- },
- assetsUploadHintInactive: {
- color: "#92400e",
- },
- assetsUploadButton: {
- alignItems: "center",
- backgroundColor: "#059669",
- borderRadius: 4,
- flexDirection: "row",
- gap: 4,
- height: 28,
- justifyContent: "center",
- paddingHorizontal: 8,
- },
- assetsUploadButtonText: {
- color: "#ffffff",
- fontSize: 10,
- fontWeight: "700",
- },
- assetsUploadError: {
- backgroundColor: "#fef2f2",
- color: "#b91c1c",
- fontSize: 12,
- fontWeight: "600",
- paddingHorizontal: 16,
- paddingVertical: 8,
- },
layoutToggle: {
alignSelf: "flex-start",
backgroundColor: "#f8fafc",
@@ -6869,17 +5170,6 @@ const baseWorkspaceStyles = StyleSheet.create({
listLoadingFooter: {
marginVertical: 18,
},
- assetList: {
- padding: 18,
- paddingBottom: 48,
- },
- assetGrid: {
- padding: 12,
- paddingBottom: 48,
- },
- assetGridRow: {
- gap: 10,
- },
emptyList: {
flexGrow: 1,
paddingBottom: 22,
@@ -7114,99 +5404,20 @@ const baseWorkspaceStyles = StyleSheet.create({
memoMetaCompact: {
marginTop: 8,
},
- memoDate: {
- color: "#334155",
- fontSize: 12,
- fontWeight: "500",
- },
- tag: {
- backgroundColor: "#f1f5f9",
- borderRadius: 2,
- color: "#0f172a",
- fontSize: 12,
- fontWeight: "500",
- overflow: "hidden",
- paddingHorizontal: 6,
- paddingVertical: 2,
- },
- 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,
- 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: 4,
- minWidth: 0,
- padding: 12,
- },
- resourceGridMetaRow: {
- alignItems: "center",
- flexDirection: "row",
- justifyContent: "space-between",
- },
- resourceGridMetaText: {
- color: "#94a3b8",
- fontSize: 10,
- fontWeight: "600",
+ memoDate: {
+ color: "#334155",
+ fontSize: 12,
+ fontWeight: "500",
},
- resourceGridSource: {
- borderTopColor: "#f8fafc",
- borderTopWidth: 1,
- color: "#94a3b8",
- fontSize: 10,
- marginTop: 2,
- paddingTop: 4,
+ tag: {
+ backgroundColor: "#f1f5f9",
+ borderRadius: 2,
+ color: "#0f172a",
+ fontSize: 12,
+ fontWeight: "500",
+ overflow: "hidden",
+ paddingHorizontal: 6,
+ paddingVertical: 2,
},
centerState: {
alignItems: "center",
@@ -7849,383 +6060,138 @@ const baseWorkspaceStyles = StyleSheet.create({
detailHeaderIconButton: {
alignItems: "center",
borderRadius: 6,
- height: 32,
- justifyContent: "center",
- width: 32,
- },
- detailSyncStatus: {
- backgroundColor: "#f1f5f9",
- borderRadius: 999,
- color: "#64748b",
- fontSize: 11,
- fontWeight: "500",
- maxWidth: 88,
- overflow: "hidden",
- paddingHorizontal: 8,
- paddingVertical: 4,
- },
- detailMetaRow: {
- alignItems: "center",
- flexDirection: "row",
- gap: 8,
- marginTop: 12,
- },
- detailNotebookButton: {
- alignItems: "center",
- flexDirection: "row",
- gap: 4,
- height: 32,
- maxWidth: "46%",
- paddingHorizontal: 8,
- },
- detailNotebookName: {
- color: "#64748b",
- flexShrink: 1,
- fontSize: 14,
- },
- detailTagsGroup: {
- alignItems: "center",
- flex: 1,
- flexDirection: "row",
- gap: 8,
- height: 32,
- paddingHorizontal: 8,
- },
- detailTagsInline: {
- color: "#64748b",
- flex: 1,
- fontSize: 14,
- },
- detailTagsPlaceholder: {
- color: "#94a3b8",
- },
- detailDivider: {
- backgroundColor: "#e2e8f0",
- height: 1,
- marginHorizontal: -16,
- marginTop: 16,
- marginBottom: 18,
- },
- detailEditFab: {
- alignItems: "center",
- backgroundColor: "#10b981",
- borderRadius: 24,
- elevation: 6,
- height: 48,
- justifyContent: "center",
- position: "absolute",
- right: 16,
- shadowColor: "#0f172a",
- shadowOffset: { width: 0, height: 4 },
- shadowOpacity: 0.2,
- shadowRadius: 8,
- width: 48,
- },
- 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",
- },
- 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",
- },
- parentSelectList: {
- flexGrow: 0,
- },
- notebookPicker: {
- gap: 10,
- },
- tagManageRow: {
- alignItems: "center",
- backgroundColor: "#ffffff",
- borderColor: "#e2e8f0",
- borderRadius: 6,
- borderWidth: 1,
- flexDirection: "row",
- gap: 12,
- minHeight: 48,
- paddingHorizontal: 12,
- paddingVertical: 8,
- },
- tagManageRowEditing: {
- backgroundColor: "#ecfdf5",
- borderColor: "#a7f3d0",
- },
- tagManagerList: {
- flex: 1,
- },
- tagManagerListContent: {
- gap: 8,
- paddingBottom: 32,
- paddingHorizontal: 16,
- paddingTop: 16,
- },
- tagManageText: {
- flex: 1,
- minWidth: 0,
- },
- tagManageName: {
- color: "#0f172a",
- fontSize: 14,
- fontWeight: "600",
- },
- tagManageMeta: {
- color: "#64748b",
- fontSize: 12,
- marginTop: 4,
- },
- tagManageAction: {
- alignItems: "center",
- backgroundColor: "transparent",
- borderRadius: 6,
- height: 32,
- justifyContent: "center",
- width: 32,
- },
- tagManageActionDanger: {
- backgroundColor: "#fef2f2",
- borderColor: "#fecaca",
- borderWidth: 1,
- },
- tagRenameForm: {
- flex: 1,
- gap: 8,
- minWidth: 0,
- },
- tagRenameInput: {
- backgroundColor: "#ffffff",
- borderColor: "#e2e8f0",
- borderRadius: 6,
- borderWidth: 1,
- color: "#0f172a",
- fontSize: 14,
- height: 36,
- paddingHorizontal: 10,
- paddingVertical: 0,
- },
- tagRenameActions: {
- flexDirection: "row",
- gap: 8,
- },
- tagRenameSaveButton: {
- alignItems: "center",
- backgroundColor: "#10b981",
- borderRadius: 6,
- height: 32,
- justifyContent: "center",
- minWidth: 58,
- paddingHorizontal: 10,
- },
- tagRenameSaveText: {
- color: "#ffffff",
- fontSize: 12,
- fontWeight: "600",
- },
- tagRenameCancelButton: {
- alignItems: "center",
- backgroundColor: "#ffffff",
- borderColor: "#e2e8f0",
- borderRadius: 6,
- borderWidth: 1,
- height: 32,
- justifyContent: "center",
- minWidth: 58,
- paddingHorizontal: 10,
- },
- tagRenameCancelText: {
- color: "#334155",
- fontSize: 12,
- fontWeight: "600",
- },
- 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,
+ height: 32,
+ justifyContent: "center",
+ width: 32,
},
- scopeGrid: {
- gap: 4,
+ detailSyncStatus: {
+ backgroundColor: "#f1f5f9",
+ borderRadius: 999,
+ color: "#64748b",
+ fontSize: 11,
+ fontWeight: "500",
+ maxWidth: 88,
+ overflow: "hidden",
+ paddingHorizontal: 8,
+ paddingVertical: 4,
},
- tokenScopeHeader: {
+ detailMetaRow: {
alignItems: "center",
- borderBottomColor: "#f1f5f9",
- borderBottomWidth: 1,
- borderTopColor: "#f1f5f9",
- borderTopWidth: 1,
flexDirection: "row",
- justifyContent: "space-between",
- minHeight: 44,
- paddingVertical: 8,
+ gap: 8,
+ marginTop: 12,
},
- scopeOption: {
+ detailNotebookButton: {
alignItems: "center",
- borderRadius: 6,
flexDirection: "row",
- gap: 12,
- minHeight: 40,
- paddingHorizontal: 12,
- paddingVertical: 8,
+ gap: 4,
+ height: 32,
+ maxWidth: "46%",
+ paddingHorizontal: 8,
},
- scopeOptionSelected: {
- backgroundColor: "#ecfdf5",
+ detailNotebookName: {
+ color: "#64748b",
+ flexShrink: 1,
+ fontSize: 14,
},
- scopeCheckbox: {
+ detailTagsGroup: {
alignItems: "center",
- backgroundColor: "#ffffff",
- borderColor: "#6ee7b7",
- borderRadius: 4,
- borderWidth: 1,
- height: 18,
- justifyContent: "center",
- width: 18,
- },
- scopeCheckboxSelected: {
- backgroundColor: "#10b981",
- borderColor: "#10b981",
+ flex: 1,
+ flexDirection: "row",
+ gap: 8,
+ height: 32,
+ paddingHorizontal: 8,
},
- scopeOptionText: {
- color: "#475569",
+ detailTagsInline: {
+ color: "#64748b",
flex: 1,
- fontSize: 12,
- fontWeight: "600",
+ fontSize: 14,
},
- scopeOptionTextSelected: {
- color: "#047857",
+ detailTagsPlaceholder: {
+ color: "#94a3b8",
},
- apiTokenRow: {
- borderTopColor: "#f1f5f9",
- borderTopWidth: 1,
- gap: 12,
- minHeight: 64,
- paddingVertical: 12,
+ detailDivider: {
+ backgroundColor: "#e2e8f0",
+ height: 1,
+ marginHorizontal: -16,
+ marginTop: 16,
+ marginBottom: 18,
},
- apiTokenText: {
- minWidth: 0,
+ detailEditFab: {
+ alignItems: "center",
+ backgroundColor: "#10b981",
+ borderRadius: 24,
+ elevation: 6,
+ height: 48,
+ justifyContent: "center",
+ position: "absolute",
+ right: 16,
+ shadowColor: "#0f172a",
+ shadowOffset: { width: 0, height: 4 },
+ shadowOpacity: 0.2,
+ shadowRadius: 8,
+ width: 48,
},
- apiTokenName: {
- color: "#0f172a",
- fontSize: 14,
- fontWeight: "800",
+ detailMarkdown: {
+ color: "#1f2937",
+ fontSize: 16,
+ lineHeight: 25,
+ marginTop: 20,
},
- apiTokenScopes: {
- alignSelf: "flex-start",
+ noteSearchPanel: {
backgroundColor: "#f8fafc",
- borderColor: "#f1f5f9",
- borderRadius: 6,
+ borderColor: "#e2e8f0",
+ borderRadius: 8,
borderWidth: 1,
+ gap: 10,
+ marginTop: 14,
+ padding: 10,
+ },
+ noteSearchCount: {
color: "#64748b",
- fontSize: 11,
- fontWeight: "600",
- marginTop: 8,
- maxWidth: "100%",
- paddingHorizontal: 8,
- paddingVertical: 4,
+ fontSize: 12,
+ fontWeight: "800",
},
- apiTokenMeta: {
- color: "#94a3b8",
- fontSize: 11,
- fontWeight: "500",
- lineHeight: 16,
- marginTop: 8,
+ noteSearchCountEmpty: {
+ color: "#b91c1c",
},
- apiTokenActions: {
- gap: 8,
+ noteSearchHighlight: {
+ backgroundColor: "#fef3c7",
+ color: "#78350f",
+ },
+ noteSearchHighlightActive: {
+ backgroundColor: "#fde68a",
+ color: "#0f172a",
+ fontWeight: "800",
},
- apiTokenActionButton: {
+ actionButton: {
alignItems: "center",
backgroundColor: "#ffffff",
borderColor: "#e2e8f0",
- borderRadius: 6,
+ borderRadius: 8,
borderWidth: 1,
flexDirection: "row",
- gap: 8,
- height: 36,
- justifyContent: "center",
+ gap: 6,
+ minHeight: 38,
paddingHorizontal: 12,
},
- apiTokenActionText: {
- color: "#334155",
- fontSize: 12,
- fontWeight: "600",
- },
- apiTokenDeleteButton: {
+ actionButtonDanger: {
backgroundColor: "#fef2f2",
borderColor: "#fecaca",
},
- apiTokenDeleteText: {
+ actionButtonText: {
+ color: "#0f172a",
+ fontSize: 13,
+ fontWeight: "800",
+ },
+ actionButtonTextDanger: {
color: "#b91c1c",
- fontSize: 12,
- fontWeight: "600",
},
- apiTokenEmptyText: {
- color: "#94a3b8",
- fontSize: 14,
- paddingVertical: 16,
+ parentSelectList: {
+ flexGrow: 0,
+ },
+ notebookPicker: {
+ gap: 10,
},
centerInline: {
alignItems: "center",
@@ -8409,81 +6375,18 @@ const baseWorkspaceStyles = StyleSheet.create({
fontWeight: "700",
marginTop: 4,
},
- revisionComparisonTable: {
+ revisionPreviewCard: {
backgroundColor: "#ffffff",
borderColor: "#e2e8f0",
borderRadius: 8,
borderWidth: 1,
- overflow: "hidden",
- },
- revisionComparisonHeader: {
- backgroundColor: "#f8fafc",
- flexDirection: "row",
- },
- revisionComparisonHeaderText: {
- color: "#475569",
- flex: 1,
- fontSize: 11,
- fontWeight: "800",
padding: 10,
},
- revisionComparisonRow: {
- alignItems: "stretch",
- borderBottomColor: "#f1f5f9",
- borderBottomWidth: 1,
- flexDirection: "row",
- minHeight: 28,
- },
- revisionComparisonCell: {
- flex: 1,
- flexDirection: "row",
- minWidth: 0,
- },
- revisionComparisonCellCurrent: {
- borderLeftColor: "#e2e8f0",
- borderLeftWidth: 1,
- },
- revisionComparisonLineNumber: {
- backgroundColor: "#f8fafc",
- borderRightColor: "#e2e8f0",
- borderRightWidth: 1,
- color: "#94a3b8",
- fontSize: 10,
- minWidth: 28,
- paddingHorizontal: 4,
- paddingTop: 6,
- textAlign: "right",
- },
- revisionComparisonText: {
- color: "#334155",
- flex: 1,
- fontFamily: Platform.select({ android: "monospace", ios: "Menlo" }),
- fontSize: 11,
- lineHeight: 17,
- minWidth: 0,
- paddingHorizontal: 6,
- paddingVertical: 5,
- },
- revisionComparisonEmpty: {
- color: "#94a3b8",
- fontSize: 13,
- padding: 24,
- textAlign: "center",
- },
revisionPreviewText: {
color: "#334155",
fontSize: 13,
lineHeight: 20,
},
- revisionDiffRowHistory: {
- backgroundColor: "#fff1f2",
- },
- revisionDiffRowCurrent: {
- backgroundColor: "#ecfdf5",
- },
- revisionDiffTextEmpty: {
- color: "#94a3b8",
- },
label: {
color: "#334155",
fontSize: 13,
@@ -8567,89 +6470,6 @@ const baseWorkspaceStyles = StyleSheet.create({
flex: 1,
justifyContent: "center",
},
- previewToolbar: {
- alignItems: "center",
- flexDirection: "row",
- gap: 8,
- position: "absolute",
- right: 12,
- top: 44,
- zIndex: 4,
- },
- previewToolbarButton: {
- alignItems: "center",
- height: 44,
- justifyContent: "center",
- width: 44,
- },
- previewToolbarButtonDisabled: {
- opacity: 0.34,
- },
- previewStage: {
- alignItems: "center",
- bottom: 136,
- justifyContent: "center",
- left: 0,
- overflow: "hidden",
- position: "absolute",
- right: 0,
- top: 98,
- },
- previewImageFrame: {
- height: "100%",
- width: "100%",
- },
- previewImage: {
- height: "100%",
- width: "100%",
- },
- previewNavRow: {
- flexDirection: "row",
- justifyContent: "space-between",
- left: 8,
- position: "absolute",
- right: 8,
- zIndex: 3,
- },
- previewNavButton: {
- alignItems: "center",
- backgroundColor: "transparent",
- height: 44,
- justifyContent: "center",
- width: 44,
- },
- previewNavIcon: {
- textShadowColor: "rgba(0, 0, 0, 0.88)",
- textShadowOffset: { height: 1, width: 0 },
- textShadowRadius: 3,
- },
- previewThumbnailRail: {
- bottom: 18,
- left: 0,
- position: "absolute",
- right: 0,
- zIndex: 4,
- },
- previewThumbnailList: {
- gap: 12,
- },
- previewThumbnail: {
- borderColor: "rgba(255, 255, 255, 0.48)",
- borderRadius: 3,
- borderWidth: 1,
- height: 84,
- overflow: "hidden",
- width: 96,
- },
- previewThumbnailActive: {
- borderColor: "#ffffff",
- borderWidth: 2,
- },
- previewThumbnailImage: {
- backgroundColor: "#020617",
- height: "100%",
- width: "100%",
- },
});
let styles = baseWorkspaceStyles;
diff --git a/apps/web/src/components/MobileStandaloneEditorParts.tsx b/apps/web/src/components/MobileStandaloneEditorParts.tsx
index 7c32b93a..c740d91f 100644
--- a/apps/web/src/components/MobileStandaloneEditorParts.tsx
+++ b/apps/web/src/components/MobileStandaloneEditorParts.tsx
@@ -1,15 +1,12 @@
-import { Bold, Check, ChevronDown, ImagePlus, List, ListIndentDecrease, ListIndentIncrease, Minus, Quote, Table2, Workflow } from "lucide-react";
+import { Bold, Check, ChevronDown, ImagePlus, List, ListIndentDecrease, ListIndentIncrease, Minus, Quote } from "lucide-react";
import { useTranslation } from "react-i18next";
import {
MOBILE_EDITOR_TOOLBAR_ACTIONS,
- getMobileEditorTableMenuCopy,
getMobileEditorToolbarActionLabel,
- isMobileEditorActionDisabledInTableHeader,
type MobileEditorLocale,
- type MobileEditorTableActionId,
type MobileEditorToolbarActionId,
} from "@edgeever/shared/mobile-editor";
-import { useEffect, useState, type ReactNode } from "react";
+import type { ReactNode } from "react";
import type { NotebookMoveOption } from "@/lib/app-helpers";
import type { MobileEditorSaveState } from "@/lib/mobile-editor-standalone";
@@ -62,19 +59,14 @@ export const MobileEditorToolbar = ({
increaseListIndentAvailable,
decreaseListIndentAvailable,
blockquoteActive,
- mermaidActive,
- tableActive,
- tableHeaderActive,
locale,
onPickImage,
- onInsertMermaid,
onToggleBold,
onToggleBulletList,
onIncreaseListIndent,
onDecreaseListIndent,
onToggleBlockquote,
onSetHorizontalRule,
- onTableAction,
}: {
disabled: boolean;
boldActive: boolean;
@@ -82,149 +74,63 @@ export const MobileEditorToolbar = ({
increaseListIndentAvailable: boolean;
decreaseListIndentAvailable: boolean;
blockquoteActive: boolean;
- mermaidActive: boolean;
- tableActive: boolean;
- tableHeaderActive: boolean;
locale: MobileEditorLocale;
onPickImage: () => void;
- onInsertMermaid: () => void;
onToggleBold: () => void;
onToggleBulletList: () => void;
onIncreaseListIndent: () => void;
onDecreaseListIndent: () => void;
onToggleBlockquote: () => void;
onSetHorizontalRule: () => void;
- onTableAction: (action: MobileEditorTableActionId) => void;
}) => {
- const [tableMenuOpen, setTableMenuOpen] = useState(false);
- const tableMenuCopy = getMobileEditorTableMenuCopy(locale);
const icons: Record<MobileEditorToolbarActionId, ReactNode> = {
image: <ImagePlus aria-hidden="true" size={18} strokeWidth={2} />,
- mermaid: <Workflow aria-hidden="true" size={18} strokeWidth={2} />,
bold: <Bold aria-hidden="true" size={17} strokeWidth={2.4} />,
bulletList: <List aria-hidden="true" size={18} strokeWidth={2.2} />,
increaseListIndent: <ListIndentIncrease aria-hidden="true" size={18} strokeWidth={2.1} />,
decreaseListIndent: <ListIndentDecrease aria-hidden="true" size={18} strokeWidth={2.1} />,
blockquote: <Quote aria-hidden="true" size={17} strokeWidth={2.2} />,
horizontalRule: <Minus aria-hidden="true" size={18} strokeWidth={2.4} />,
- insertTable: <Table2 aria-hidden="true" size={18} strokeWidth={2} />,
- addTableRow: null,
- deleteTableRow: null,
- addTableColumn: null,
- deleteTableColumn: null,
- toggleTableHeader: null,
- deleteTable: null,
};
const handlers: Record<MobileEditorToolbarActionId, () => void> = {
image: onPickImage,
- mermaid: onInsertMermaid,
bold: onToggleBold,
bulletList: onToggleBulletList,
increaseListIndent: onIncreaseListIndent,
decreaseListIndent: onDecreaseListIndent,
blockquote: onToggleBlockquote,
horizontalRule: onSetHorizontalRule,
- insertTable: () => onTableAction("insertTable"),
- addTableRow: () => onTableAction("addTableRow"),
- deleteTableRow: () => onTableAction("deleteTableRow"),
- addTableColumn: () => onTableAction("addTableColumn"),
- deleteTableColumn: () => onTableAction("deleteTableColumn"),
- toggleTableHeader: () => onTableAction("toggleTableHeader"),
- deleteTable: () => onTableAction("deleteTable"),
};
const activeStates: Partial<Record<MobileEditorToolbarActionId, boolean>> = {
bold: boldActive,
bulletList: bulletListActive,
blockquote: blockquoteActive,
- mermaid: mermaidActive,
};
- useEffect(() => {
- if (!tableActive) {
- setTableMenuOpen(false);
- }
- }, [tableActive]);
-
return (
- <>
- <div className="mobile-editor-tool-row">
- {MOBILE_EDITOR_TOOLBAR_ACTIONS
- .filter(({ id, requiresTable }) => !requiresTable && (!tableActive || id !== "insertTable"))
- .map(({ id }) => {
- const label = getMobileEditorToolbarActionLabel(id, locale);
+ <div className="mobile-editor-tool-row">
+ {MOBILE_EDITOR_TOOLBAR_ACTIONS.map(({ id }) => {
+ const label = getMobileEditorToolbarActionLabel(id, locale);
- return (
- <button
- key={id}
- className="mobile-editor-tool-button"
- type="button"
- aria-label={label}
- title={label}
- aria-pressed={activeStates[id]}
- disabled={disabled
- || (id === "insertTable" && tableActive)
- || (id === "increaseListIndent" && !increaseListIndentAvailable)
- || (id === "decreaseListIndent" && !decreaseListIndentAvailable)}
- onPointerDown={(event) => event.preventDefault()}
- onClick={handlers[id]}
- >
- {icons[id]}
- </button>
- );
- })}
- {tableActive && (
+ return (
<button
- className="mobile-editor-tool-button mobile-editor-table-menu-trigger"
+ key={id}
+ className="mobile-editor-tool-button"
type="button"
- aria-label={tableMenuCopy.title}
- title={tableMenuCopy.title}
- disabled={disabled}
+ aria-label={label}
+ title={label}
+ aria-pressed={activeStates[id]}
+ disabled={disabled
+ || (id === "increaseListIndent" && !increaseListIndentAvailable)
+ || (id === "decreaseListIndent" && !decreaseListIndentAvailable)}
onPointerDown={(event) => event.preventDefault()}
- onClick={() => setTableMenuOpen(true)}
+ onClick={handlers[id]}
>
- <Table2 aria-hidden="true" size={18} strokeWidth={2} />
- <span>{tableMenuCopy.title}</span>
+ {icons[id]}
</button>
- )}
- </div>
- {tableActive && tableMenuOpen && (
- <div className="mobile-editor-sheet-backdrop" role="presentation" onClick={() => setTableMenuOpen(false)}>
- <section
- className="mobile-editor-table-sheet"
- role="dialog"
- aria-modal="true"
- aria-label={tableMenuCopy.title}
- onClick={(event) => event.stopPropagation()}
- >
- <div className="mobile-editor-notebook-sheet-handle" aria-hidden="true" />
- <div className="mobile-editor-notebook-sheet-header">
- <h2>{tableMenuCopy.title}</h2>
- <button type="button" onClick={() => setTableMenuOpen(false)}>{tableMenuCopy.close}</button>
- </div>
- <div className="mobile-editor-table-action-list">
- {MOBILE_EDITOR_TOOLBAR_ACTIONS.filter(({ requiresTable }) => requiresTable).map(({ id }) => {
- const label = getMobileEditorToolbarActionLabel(id, locale);
- return (
- <button
- key={id}
- className={id === "deleteTable" ? "is-destructive" : undefined}
- type="button"
- disabled={disabled || (isMobileEditorActionDisabledInTableHeader(id) && tableHeaderActive)}
- onPointerDown={(event) => event.preventDefault()}
- onClick={() => {
- setTableMenuOpen(false);
- handlers[id]();
- }}
- >
- {label}
- </button>
- );
- })}
- </div>
- </section>
- </div>
- )}
- </>
+ );
+ })}
+ </div>
);
};
diff --git a/apps/web/src/components/MobileStandaloneTiptapEditor.tsx b/apps/web/src/components/MobileStandaloneTiptapEditor.tsx
index 04d488c0..e8de5708 100644
--- a/apps/web/src/components/MobileStandaloneTiptapEditor.tsx
+++ b/apps/web/src/components/MobileStandaloneTiptapEditor.tsx
@@ -6,7 +6,7 @@ import Image from "@tiptap/extension-image";
import Placeholder from "@tiptap/extension-placeholder";
import { TableKit } from "@tiptap/extension-table";
import { createExcerpt, docToMarkdown, docToText, emptyDoc, type MemoDetail, type MemoEditSession, type Notebook, type TiptapDoc } from "@edgeever/shared";
-import { getMobileEditorInputAttributes, getMobileEditorPlaceholder, type MobileEditorTableActionId } from "@edgeever/shared/mobile-editor";
+import { getMobileEditorInputAttributes, getMobileEditorPlaceholder } from "@edgeever/shared/mobile-editor";
import {
MobileEditorFallback,
MobileEditorHeader,
@@ -844,9 +844,6 @@ export const MobileStandaloneTiptapEditor = ({
notebookOptions.find((notebook) => notebook.id === memo?.notebookId)?.name ?? t("editor.notebookFallback");
const fallbackMarkdown = memo ? docToMarkdown(contentJsonRef.current) : "";
- const tableActive = Boolean(editor?.isActive("table"));
- const tableHeaderActive = Boolean(editor?.isActive("tableHeader"));
-
const runEditorCommand = (command: () => boolean) => {
if (editorActionDisabled || !editor) {
return;
@@ -856,32 +853,6 @@ export const MobileStandaloneTiptapEditor = ({
editor.commands.focus();
};
- const runTableAction = (action: MobileEditorTableActionId) => {
- runEditorCommand(() => {
- const chain = editor?.chain().focus();
- if (!chain) {
- return false;
- }
-
- switch (action) {
- case "insertTable":
- return chain.insertTable({ rows: 3, cols: 3, withHeaderRow: true }).run();
- case "addTableRow":
- return chain.addRowAfter().run();
- case "deleteTableRow":
- return editor?.isActive("tableHeader") ? false : chain.deleteRow().run();
- case "addTableColumn":
- return chain.addColumnAfter().run();
- case "deleteTableColumn":
- return chain.deleteColumn().run();
- case "toggleTableHeader":
- return chain.toggleHeaderRow().run();
- case "deleteTable":
- return chain.deleteTable().run();
- }
- });
- };
-
return (
<div className="mobile-editor-shell">
<MobileEditorHeader saveLabel={saveLabel} statusClassName={statusClassName} saveState={saveState} onLeave={() => void leavePage()} />
@@ -921,31 +892,14 @@ export const MobileStandaloneTiptapEditor = ({
increaseListIndentAvailable={Boolean(editor?.can().chain().focus().sinkListItem("listItem").run())}
decreaseListIndentAvailable={Boolean(editor?.can().chain().focus().liftListItem("listItem").run())}
blockquoteActive={Boolean(editor?.isActive("blockquote"))}
- mermaidActive={Boolean(editor?.isActive("codeBlock", { language: "mermaid" }))}
- tableActive={tableActive}
- tableHeaderActive={tableHeaderActive}
locale={locale}
onPickImage={() => imageInputRef.current?.click()}
- onInsertMermaid={() => runEditorCommand(() => {
- if (!editor) {
- return false;
- }
- if (editor.isActive("codeBlock")) {
- return editor.chain().focus().updateAttributes("codeBlock", { language: "mermaid" }).run();
- }
- return editor.chain().focus().insertContent({
- type: "codeBlock",
- attrs: { language: "mermaid" },
- content: [{ type: "text", text: "flowchart LR\n A[Start] --> B[End]" }],
- }).run();
- })}
onToggleBold={() => runEditorCommand(() => editor?.chain().focus().toggleBold().run() ?? false)}
onToggleBulletList={() => runEditorCommand(() => editor?.chain().focus().toggleBulletList().run() ?? false)}
onIncreaseListIndent={() => runEditorCommand(() => editor?.chain().focus().sinkListItem("listItem").run() ?? false)}
onDecreaseListIndent={() => runEditorCommand(() => editor?.chain().focus().liftListItem("listItem").run() ?? false)}
onToggleBlockquote={() => runEditorCommand(() => editor?.chain().focus().toggleBlockquote().run() ?? false)}
onSetHorizontalRule={() => runEditorCommand(() => editor?.chain().focus().setHorizontalRule().run() ?? false)}
- onTableAction={runTableAction}
/>
<input
ref={imageInputRef}
diff --git a/apps/web/src/styles/mobile-markdown-editor.css b/apps/web/src/styles/mobile-markdown-editor.css
index 57c27881..c44f3b5a 100644
--- a/apps/web/src/styles/mobile-markdown-editor.css
+++ b/apps/web/src/styles/mobile-markdown-editor.css
@@ -237,14 +237,6 @@ input {
color: #334155;
}
-.mobile-editor-table-menu-trigger {
- gap: 6px;
- width: auto;
- padding-inline: 10px;
- font-size: 13px;
- font-weight: 700;
-}
-
.mobile-editor-sheet-backdrop {
position: fixed;
inset: 0;
@@ -254,8 +246,7 @@ input {
background: rgb(15 23 42 / 0.22);
}
-.mobile-editor-notebook-sheet,
-.mobile-editor-table-sheet {
+.mobile-editor-notebook-sheet {
width: 100%;
max-height: 68dvh;
overflow: hidden;
@@ -278,8 +269,7 @@ input {
:root.dark .mobile-editor-header,
:root.dark .mobile-editor-title,
:root.dark .mobile-editor-tags,
-:root.dark .mobile-editor-notebook-sheet,
-:root.dark .mobile-editor-table-sheet {
+:root.dark .mobile-editor-notebook-sheet {
background: #1e293b;
color: #f8fafc;
}
@@ -392,48 +382,6 @@ input {
color: #047857;
}
-.mobile-editor-table-action-list {
- display: grid;
- grid-template-columns: repeat(2, minmax(0, 1fr));
- gap: 8px;
- padding: 12px;
-}
-
-.mobile-editor-table-action-list button {
- min-height: 48px;
- border: 0;
- border-radius: 10px;
- background: #f8fafc;
- color: #334155;
- font-size: 15px;
- font-weight: 650;
-}
-
-.mobile-editor-table-action-list button:active {
- background: #ecfdf5;
- color: #047857;
-}
-
-.mobile-editor-table-action-list button:disabled {
- color: #94a3b8;
- opacity: 0.55;
-}
-
-.mobile-editor-table-action-list button.is-destructive {
- background: #fff1f2;
- color: #be123c;
-}
-
-:root.dark .mobile-editor-table-action-list button {
- background: #334155;
- color: #e2e8f0;
-}
-
-:root.dark .mobile-editor-table-action-list button.is-destructive {
- background: #4c0519;
- color: #fda4af;
-}
-
.mobile-editor-notebook-option:active {
background: #f1f5f9;
}
diff --git a/bun.lock b/bun.lock
index 9cb7051b..a139a0f1 100644
--- a/bun.lock
+++ b/bun.lock
@@ -88,7 +88,6 @@
"@edgeever/client": "workspace:*",
"@edgeever/shared": "workspace:*",
"@expo/vector-icons": "^15.1.1",
- "@gorhom/bottom-sheet": "latest",
"@react-native-async-storage/async-storage": "2.2.0",
"@tanstack/query-async-storage-persister": "^5.101.2",
"@tanstack/react-query": "latest",
@@ -130,7 +129,6 @@
"@types/react": "latest",
"@types/semver": "^7.7.1",
"babel-preset-expo": "latest",
- "gluestack-ui": "latest",
"typescript": "6.0.3",
},
},
@@ -475,14 +473,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=="],
@@ -499,10 +493,6 @@
"@chevrotain/types": ["@chevrotain/[email protected]", "", {}, "sha512-U+HFai5+zmJCkK86QsaJtoITlboZHBqrVketcO2ROv865xfCMSFpELQoz1GkX5GzME8pTa+3kbKrZHQtI0gdbw=="],
- "@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=="],
@@ -691,10 +681,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=="],
@@ -763,12 +749,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=="],
@@ -791,10 +771,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=="],
"@mermaid-js/parser": ["@mermaid-js/[email protected]", "", { "dependencies": { "@chevrotain/types": "~11.1.2" } }, "sha512-oYPyv8A4As1yH5Bx+04iQEQxXuIQDe0GKCNSRgao6z8AM9jixXIfP0vsppRLvGf+nKIOb9/LdpWA4YuJiVvESA=="],
@@ -935,8 +911,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=="],
@@ -1045,10 +1019,6 @@
"@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=="],
@@ -1067,8 +1037,6 @@
"@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=="],
@@ -1365,7 +1333,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=="],
@@ -1385,14 +1353,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=="],
@@ -1535,8 +1499,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=="],
@@ -1555,14 +1517,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=="],
@@ -1813,8 +1771,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=="],
@@ -1951,20 +1907,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=="],
@@ -1983,7 +1929,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=="],
@@ -2025,8 +1971,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=="],
@@ -2117,8 +2061,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=="],
@@ -2195,8 +2137,6 @@
"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-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=="],
"is-regexp": ["[email protected]", "", {}, "sha512-7zjFAPO4/gwyQAAgRRmqeEeyIICSdmCqa3tsVHMdBzaXXRiqopZL4Cyghg/XulGWrtABTpbnYYzzIRffLkP4oA=="],
@@ -2227,8 +2167,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=="],
@@ -2251,8 +2189,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=="],
@@ -2269,8 +2205,6 @@
"khroma": ["[email protected]", "", {}, "sha512-Ls993zuzfayK269Svk9hzpeGUKob/sIgZzyHYdjQoAdQetRKpOLj+k/QQQ/6Qi0Yz65mlROrfd+Ev+1+7dz9Kw=="],
- "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=="],
@@ -2319,8 +2253,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-es": ["[email protected]", "", {}, "sha512-J8xewKD/Gk22OZbhpOVSwcs60zhd95ESDwezOFuA3/099925PdHJ7OFHNTGtajL3AlZkykD32HykiMo+BIBI8A=="],
"lodash.debounce": ["[email protected]", "", {}, "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow=="],
@@ -2347,8 +2279,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=="],
@@ -2551,12 +2481,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=="],
"nested-property": ["[email protected]", "", {}, "sha512-yFehXNWRs4cM0+dz7QxCd06hTbWbSkV0ISsqBfkntU6TOY4Qm3Q88fRRLOddkGh2Qq6dZvnKVAahfhjcUvLnyA=="],
@@ -2623,14 +2549,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=="],
@@ -2653,8 +2575,6 @@
"path-data-parser": ["[email protected]", "", {}, "sha512-NOnmBpt5Y2RWbuv0LMzsayp3lVylAHLPUTut412ZA3l+C4uw4ZVkQbjShYCQ8TCpUMdPapr4YjUqLYD6v68j+w=="],
- "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=="],
@@ -2681,8 +2601,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=="],
@@ -2775,8 +2693,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=="],
@@ -2793,8 +2709,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-fit-image": ["[email protected]", "", { "dependencies": { "prop-types": "^15.5.10" } }, "sha512-Wl3Vq2DQzxgsWKuW4USfck9zS7YzhvLNPpkwUUCF90bL32e1a0zOVQ3WsJILJOwzmPdHfzZmWasiiAUNBkhNkg=="],
@@ -2827,16 +2741,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=="],
@@ -2971,8 +2881,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=="],
@@ -2995,8 +2903,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=="],
@@ -3107,14 +3013,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=="],
@@ -3373,8 +3275,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=="],
@@ -3447,8 +3347,6 @@
"@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.4" }, "peerDependencies": { "react": "^18 || ^19" } }, "sha512-yRg2pfOCxIs4ZJW3XYYHU/WgtD04FHSnfHlpRT7h7pR77hwkdRG4wxbKe4aq6P0RvXUTBSQpQeadS1SUYUe+KA=="],
@@ -3651,12 +3549,6 @@
"glob/minimatch": ["[email protected]", "", { "dependencies": { "brace-expansion": "^5.0.5" } }, "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg=="],
- "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=="],
@@ -3685,10 +3577,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=="],
-
"markdown-it/entities": ["[email protected]", "", {}, "sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ=="],
"mdast-util-find-and-replace/escape-string-regexp": ["[email protected]", "", {}, "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw=="],
@@ -3729,16 +3617,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=="],
"plist/@xmldom/xmldom": ["@xmldom/[email protected]", "", {}, "sha512-A9gOqLdi6cV4ibazAjcQufGj0B1y/vDqYrcuP6d/6x8P27gRS8643Dj9o1dEKtB6O7fwxb2FgBmJS2mX7gpvdw=="],
"plist/xmlbuilder": ["[email protected]", "", {}, "sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg=="],
- "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=="],
@@ -3747,16 +3631,12 @@
"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=="],
-
"react-native-web/@react-native/normalize-colors": ["@react-native/[email protected]", "", {}, "sha512-qoMMXddVKVhZ8PA1AbUCk83trpd6N+1nF2A6k1i6LsQObyS92fELuk8kU/lQs6M7BsMHwqyLCpQJ1uFgNvIQXg=="],
"react-native-web/memoize-one": ["[email protected]", "", {}, "sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw=="],
"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=="],
@@ -3793,14 +3673,14 @@
"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/glob": ["[email protected]", "", { "dependencies": { "foreground-child": "^3.3.1", "jackspeak": "^4.1.1", "minimatch": "^10.1.1", "minipass": "^7.1.2", "package-json-from-dist": "^1.0.0", "path-scurry": "^2.0.0" }, "bin": { "glob": "dist/esm/bin.mjs" } }, "sha512-vuNwKSaKiqm7g0THUBu2x7ckSs3XJLXE+2ssL7/MfTGPLLcrJQ/4Uq1CjPTtO5cCIiRxqvN6Twy1qOwhL0Xjcw=="],
"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=="],
@@ -3869,32 +3749,54 @@
"@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/fingerprint/minimatch/brace-expansion": ["[email protected]", "", { "dependencies": { "balanced-match": "^4.0.2" } }, "sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g=="],
+ "@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=="],
@@ -3903,8 +3805,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=="],
@@ -4035,18 +3935,24 @@
"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=="],
+ "expo-updates/chalk/ansi-styles": ["[email protected]", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="],
+
"expo-updates/chalk/supports-color": ["[email protected]", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="],
"finalhandler/debug/ms": ["[email protected]", "", {}, "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="],
"glob/minimatch/brace-expansion": ["[email protected]", "", { "dependencies": { "balanced-match": "^4.0.2" } }, "sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g=="],
- "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=="],
@@ -4127,28 +4033,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=="],
@@ -4269,6 +4153,8 @@
"workbox-build/glob/minimatch/brace-expansion": ["[email protected]", "", { "dependencies": { "balanced-match": "^4.0.2" } }, "sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g=="],
+ "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=="],
diff --git a/packages/shared/src/mobile-editor.test.mjs b/packages/shared/src/mobile-editor.test.mjs
index 6719af0f..e1cd4a6f 100644
--- a/packages/shared/src/mobile-editor.test.mjs
+++ b/packages/shared/src/mobile-editor.test.mjs
@@ -6,50 +6,33 @@ import {
getMobileEditorImageScaleLabel,
getMobileEditorImageWidthPresetLabel,
getMobileEditorPlaceholder,
- getMobileEditorTableMenuCopy,
getMobileEditorToolbarActionLabel,
getMobileEditorToolbarLabel,
- isMobileEditorActionDisabledInTableHeader,
} from "./mobile-editor.ts";
describe("mobile editor contract", () => {
test("keeps the core toolbar compact and ordered by editing frequency", () => {
expect(MOBILE_EDITOR_TOOLBAR_ACTIONS.map(({ id }) => id)).toEqual([
"image",
- "mermaid",
"bold",
"bulletList",
"increaseListIndent",
"decreaseListIndent",
"blockquote",
"horizontalRule",
- "insertTable",
- "addTableRow",
- "deleteTableRow",
- "addTableColumn",
- "deleteTableColumn",
- "toggleTableHeader",
- "deleteTable",
]);
expect(MOBILE_EDITOR_TOOLBAR_ACTIONS.find(({ id }) => id === "bold")?.activeFlag).toBe(
MOBILE_EDITOR_ACTIVE_FLAGS.bold
);
- expect(isMobileEditorActionDisabledInTableHeader("deleteTableRow")).toBe(true);
- expect(isMobileEditorActionDisabledInTableHeader("deleteTableColumn")).toBe(false);
- expect(MOBILE_EDITOR_ACTIVE_FLAGS.tableHeader & MOBILE_EDITOR_ACTIVE_FLAGS.table).toBe(0);
});
test("provides the same localized copy to both mobile clients", () => {
expect(getMobileEditorPlaceholder("zh-CN")).toBe("开始记录...");
expect(getMobileEditorPlaceholder("en-US")).toBe("Start writing...");
expect(getMobileEditorToolbarLabel("zh-CN")).toBe("编辑器工具栏");
- expect(getMobileEditorTableMenuCopy("zh-CN")).toEqual({ title: "表格操作", close: "关闭" });
- expect(getMobileEditorTableMenuCopy("en-US")).toEqual({ title: "Table actions", close: "Close" });
expect(getMobileEditorToolbarActionLabel("bulletList", "en-US")).toBe("Bullet list");
expect(getMobileEditorToolbarActionLabel("increaseListIndent", "zh-CN")).toBe("增加列表层级(Tab)");
expect(getMobileEditorToolbarActionLabel("decreaseListIndent", "en-US")).toBe("Decrease list level (Shift + Tab)");
- expect(getMobileEditorToolbarActionLabel("mermaid", "zh-CN")).toBe("插入 Mermaid 图表");
- expect(getMobileEditorToolbarActionLabel("insertTable", "zh-CN")).toBe("插入表格");
expect(getMobileEditorImageScaleLabel("zh-CN")).toBe("图片显示尺寸");
expect(getMobileEditorImageWidthPresetLabel("medium", "en-US")).toBe("Medium");
});
diff --git a/packages/shared/src/mobile-editor.ts b/packages/shared/src/mobile-editor.ts
index 835701ee..be61adae 100644
--- a/packages/shared/src/mobile-editor.ts
+++ b/packages/shared/src/mobile-editor.ts
@@ -4,83 +4,44 @@ export type MobileEditorLocale = "zh-CN" | "en-US";
export type MobileEditorToolbarActionId =
| "image"
- | "mermaid"
| "bold"
| "bulletList"
| "increaseListIndent"
| "decreaseListIndent"
| "blockquote"
- | "horizontalRule"
- | MobileEditorTableActionId;
-
-export type MobileEditorTableActionId =
- | "insertTable"
- | "addTableRow"
- | "deleteTableRow"
- | "addTableColumn"
- | "deleteTableColumn"
- | "toggleTableHeader"
- | "deleteTable";
+ | "horizontalRule";
export const MOBILE_EDITOR_ACTIVE_FLAGS = {
bold: 1,
- mermaid: 2,
bulletList: 8,
blockquote: 16,
- table: 32,
- tableHeader: 64,
} as const;
export const MOBILE_EDITOR_TOOLBAR_ACTIONS = [
- { id: "image", activeFlag: 0, requiresTable: false },
- { id: "mermaid", activeFlag: MOBILE_EDITOR_ACTIVE_FLAGS.mermaid, requiresTable: false },
- { id: "bold", activeFlag: MOBILE_EDITOR_ACTIVE_FLAGS.bold, requiresTable: false },
- { id: "bulletList", activeFlag: MOBILE_EDITOR_ACTIVE_FLAGS.bulletList, requiresTable: false },
- { id: "increaseListIndent", activeFlag: 0, requiresTable: false },
- { id: "decreaseListIndent", activeFlag: 0, requiresTable: false },
- { id: "blockquote", activeFlag: MOBILE_EDITOR_ACTIVE_FLAGS.blockquote, requiresTable: false },
- { id: "horizontalRule", activeFlag: 0, requiresTable: false },
- { id: "insertTable", activeFlag: 0, requiresTable: false },
- { id: "addTableRow", activeFlag: 0, requiresTable: true },
- { id: "deleteTableRow", activeFlag: 0, requiresTable: true },
- { id: "addTableColumn", activeFlag: 0, requiresTable: true },
- { id: "deleteTableColumn", activeFlag: 0, requiresTable: true },
- { id: "toggleTableHeader", activeFlag: 0, requiresTable: true },
- { id: "deleteTable", activeFlag: 0, requiresTable: true },
+ { id: "image", activeFlag: 0 },
+ { id: "bold", activeFlag: MOBILE_EDITOR_ACTIVE_FLAGS.bold },
+ { id: "bulletList", activeFlag: MOBILE_EDITOR_ACTIVE_FLAGS.bulletList },
+ { id: "increaseListIndent", activeFlag: 0 },
+ { id: "decreaseListIndent", activeFlag: 0 },
+ { id: "blockquote", activeFlag: MOBILE_EDITOR_ACTIVE_FLAGS.blockquote },
+ { id: "horizontalRule", activeFlag: 0 },
] as const satisfies ReadonlyArray<{
id: MobileEditorToolbarActionId;
activeFlag: number;
- requiresTable: boolean;
}>;
-export const isMobileEditorActionDisabledInTableHeader = (
- action: MobileEditorToolbarActionId
-): boolean => action === "deleteTableRow";
-
const MOBILE_EDITOR_COPY = {
"zh-CN": {
placeholder: "开始记录...",
toolbar: "编辑器工具栏",
- tableMenu: {
- title: "表格操作",
- close: "关闭",
- },
actions: {
image: "上传图片",
- mermaid: "插入 Mermaid 图表",
bold: "加粗",
bulletList: "无序列表",
increaseListIndent: "增加列表层级(Tab)",
decreaseListIndent: "减少列表层级(Shift + Tab)",
blockquote: "引用",
horizontalRule: "分割线",
- insertTable: "插入表格",
- addTableRow: "在下方添加行",
- deleteTableRow: "删除当前行",
- addTableColumn: "在右侧添加列",
- deleteTableColumn: "删除当前列",
- toggleTableHeader: "切换表头行",
- deleteTable: "删除表格",
},
imageScale: "图片显示尺寸",
imageSizes: {
@@ -93,26 +54,14 @@ const MOBILE_EDITOR_COPY = {
"en-US": {
placeholder: "Start writing...",
toolbar: "Editor toolbar",
- tableMenu: {
- title: "Table actions",
- close: "Close",
- },
actions: {
image: "Upload image",
- mermaid: "Insert Mermaid diagram",
bold: "Bold",
bulletList: "Bullet list",
increaseListIndent: "Increase list level (Tab)",
decreaseListIndent: "Decrease list level (Shift + Tab)",
blockquote: "Quote",
horizontalRule: "Horizontal rule",
- insertTable: "Insert table",
- addTableRow: "Add row below",
- deleteTableRow: "Delete current row",
- addTableColumn: "Add column right",
- deleteTableColumn: "Delete current column",
- toggleTableHeader: "Toggle header row",
- deleteTable: "Delete table",
},
imageScale: "Image display size",
imageSizes: {
@@ -130,9 +79,6 @@ export const getMobileEditorPlaceholder = (locale: MobileEditorLocale): string =
export const getMobileEditorToolbarLabel = (locale: MobileEditorLocale): string =>
MOBILE_EDITOR_COPY[locale].toolbar;
-export const getMobileEditorTableMenuCopy = (locale: MobileEditorLocale) =>
- MOBILE_EDITOR_COPY[locale].tableMenu;
-
export const getMobileEditorToolbarActionLabel = (
action: MobileEditorToolbarActionId,
locale: MobileEditorLocale
diff --git a/tests/mobile-app-scope.test.ts b/tests/mobile-app-scope.test.ts
new file mode 100644
index 00000000..893c2337
--- /dev/null
+++ b/tests/mobile-app-scope.test.ts
@@ -0,0 +1,32 @@
+import { describe, expect, test } from "bun:test";
+import { readFileSync } from "node:fs";
+
+const workspaceSource = readFileSync(
+ new URL("../apps/mobile/src/screens/WorkspaceScreen.tsx", import.meta.url),
+ "utf8"
+);
+const accountSecuritySource = readFileSync(
+ new URL("../apps/mobile/src/screens/AccountSecurityModal.tsx", import.meta.url),
+ "utf8"
+);
+
+describe("mobile app scope", () => {
+ test("keeps workspace administration out of the native app", () => {
+ for (const removedCapability of [
+ "ApiTokensModal",
+ "ResourcesModal",
+ "TagsManagerModal",
+ "createApiToken",
+ "deleteApiToken",
+ "mergeMemos",
+ ]) {
+ expect(workspaceSource).not.toContain(removedCapability);
+ }
+ });
+
+ test("limits account security to the signed-in user", () => {
+ for (const removedCapability of ["createUser", "listUsers", "updateUser"]) {
+ expect(accountSecuritySource).not.toContain(removedCapability);
+ }
+ });
+});