AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.
HTML ai-agentcloudflarecloudflare-d1cloudflare-r2cloudflare-workersdockerelectronevernoteevernote-alternativeknowledge-basemcpnote-takingobsidian-alternativeoffline-firstpersonal-knowledge-basepwaself-hostedsqlitetiptapweb-clipper
fix(mobile): align note flows with PWA
tianma-ife149c534b28e
diff --git a/apps/mobile/app.json b/apps/mobile/app.jsonindex f7e443d9..0612646c 100644--- a/apps/mobile/app.json+++ b/apps/mobile/app.json@@ -3,7 +3,7 @@"name": "EdgeEver","slug": "edgeever","scheme": "edgeever",- "version": "0.4.2",+ "version": "0.4.3","orientation": "portrait","userInterfaceStyle": "light","newArchEnabled": true,@@ -13,7 +13,7 @@},"android": {"package": "org.edgeever.mobile",- "versionCode": 8,+ "versionCode": 9,"adaptiveIcon": {"backgroundColor": "#f8fafc"}diff --git a/apps/mobile/package.json b/apps/mobile/package.jsonindex 35e3a614..eb7d0fbe 100644--- a/apps/mobile/package.json+++ b/apps/mobile/package.json@@ -28,12 +28,13 @@"expo-image-manipulator": "~57.0.5","expo-router": "latest","expo-secure-store": "latest",- "expo-sqlite": "~57.0.1","expo-splash-screen": "^57.0.4",+ "expo-sqlite": "~57.0.1","expo-status-bar": "latest","react": "19.2.3","react-native": "latest","react-native-gesture-handler": "~2.32.0",+ "react-native-markdown-display": "^7.0.2","react-native-reanimated": "4.5.0","react-native-safe-area-context": "~5.7.0","react-native-screens": "4.25.2",diff --git a/apps/mobile/src/screens/WorkspaceScreen.tsx b/apps/mobile/src/screens/WorkspaceScreen.tsxindex 5e3e0fbf..8fd15d55 100644--- a/apps/mobile/src/screens/WorkspaceScreen.tsx+++ b/apps/mobile/src/screens/WorkspaceScreen.tsx@@ -73,6 +73,7 @@ import {View,} from "react-native";import { SafeAreaView, useSafeAreaInsets } from "react-native-safe-area-context";+import Markdown from "react-native-markdown-display";import { createExcerpt, docToText, getNotebookDescendantIds, markdownToDoc, type ApiToken, type MemoDetail, type MemoRevision, type MemoSummary, type Notebook, type ResourceListItem, type TagSummary } from "@edgeever/shared";import { clearMobileMemoDraft, readMobileMemoDraft, writeMobileMemoDraft } from "../lib/mobile-drafts";import {@@ -544,9 +545,6 @@ export const WorkspaceScreen = () => {const allVisibleMemosSelected = canToggleVisibleSelection && memos.every((memo) => selectedMemoIds.has(memo.id));const nextSelectionPinValue = selectedMemos.some((memo) => !memo.isPinned);const canCreateMemo = memoView !== "trash" && notebooks.length > 0;- const selectedMemoIndex = selectedMemoId ? memos.findIndex((memo) => memo.id === selectedMemoId) : -1;- const previousMemoId = selectedMemoIndex > 0 ? memos[selectedMemoIndex - 1]?.id : null;- const nextMemoId = selectedMemoIndex >= 0 && selectedMemoIndex < memos.length - 1 ? memos[selectedMemoIndex + 1]?.id : null;useEffect(() => {clearSelection();@@ -1154,12 +1152,11 @@ export const WorkspaceScreen = () => {isRestoring={restoreMemoMutation.isPending}isSaving={updateMemoMutation.isPending}memo={selectedMemo}+ notebookName={notebooks.find((notebook) => notebook.id === selectedMemo?.notebookId)?.name ?? "未分类"}onClose={closeDetail}onDelete={handleDeleteMemo}onEdit={setEditingMemo}onRichEdit={setRichEditingMemo}- onOpenNextMemo={nextMemoId ? () => setSelectedMemoId(nextMemoId) : undefined}- onOpenPreviousMemo={previousMemoId ? () => setSelectedMemoId(previousMemoId) : undefined}onOpenResources={() => setResourcesOpen(true)}onOpenRevisions={setRevisionMemo}onRestore={(memo) => restoreMemoMutation.mutate(memo)}@@ -2033,7 +2030,9 @@ const CreateMemoModal = ({const [contentMarkdown, setContentMarkdown] = useState("");const [contentSelection, setContentSelection] = useState<TextSelection>({ start: 0, end: 0 });const [insertTextOpen, setInsertTextOpen] = useState(false);+ const [notebookPickerOpen, setNotebookPickerOpen] = useState(false);const targetNotebookId = notebookId || fallbackNotebookId;+ const selectedNotebookName = notebooks.find((notebook) => notebook.id === targetNotebookId)?.name ?? "选择笔记本";useEffect(() => {if (visible) {@@ -2119,18 +2118,22 @@ const CreateMemoModal = ({<Modal animationType="slide" onRequestClose={() => !createMutation.isPending && onClose()} presentationStyle="pageSheet" visible={visible}><SafeAreaView style={styles.modalSafeArea}><View style={styles.modalHeader}>- <IconButton disabled={createMutation.isPending} onPress={onClose}>+ <IconButton accessibilityLabel="关闭新建" disabled={createMutation.isPending} onPress={onClose}><X color={createMutation.isPending ? "#cbd5e1" : "#0f172a"} size={20} /></IconButton><Text style={styles.modalTitle}>新建笔记</Text>- <IconButton disabled={!canSubmitCreateMemo} onPress={() => createMutation.mutate()}>+ <IconButton accessibilityLabel="创建笔记" disabled={!canSubmitCreateMemo} onPress={() => createMutation.mutate()}>{createMutation.isPending ? <ActivityIndicator color="#0f172a" /> : <Check color={canSubmitCreateMemo ? "#0f172a" : "#cbd5e1"} size={20} />}</IconButton></View><ScrollView contentContainerStyle={styles.editorForm}><Text style={styles.label}>笔记本</Text>- <NotebookPicker notebooks={notebooks} onChange={setNotebookId} selectedNotebookId={notebookId || fallbackNotebookId} />+ <Pressable accessibilityRole="button" onPress={() => setNotebookPickerOpen(true)} style={styles.editorNotebookButton}>+ <Folder color="#64748b" size={18} />+ <Text numberOfLines={1} style={styles.editorNotebookButtonText}>{selectedNotebookName}</Text>+ <ChevronRight color="#94a3b8" size={18} />+ </Pressable><Text style={styles.label}>标题</Text><TextInput onChangeText={setTitle} placeholder={DEFAULT_MEMO_TITLE} placeholderTextColor="#94a3b8" style={styles.titleInput} value={title} />@@ -2165,6 +2168,18 @@ const CreateMemoModal = ({) : null}</ScrollView><InsertTextModal onClose={() => setInsertTextOpen(false)} onInsert={insertManualText} visible={insertTextOpen} />+ <NotebookPickerModal+ activeNotebookId={targetNotebookId}+ notebookSortMode="manual"+ notebooks={notebooks}+ notebooksMemoCount={notebooks.reduce((total, notebook) => total + notebook.memoCount, 0)}+ onClose={() => setNotebookPickerOpen(false)}+ onSelect={(nextNotebookId) => {+ setNotebookId(nextNotebookId);+ setNotebookPickerOpen(false);+ }}+ visible={notebookPickerOpen}+ /></SafeAreaView></Modal>);@@ -3892,12 +3907,11 @@ const MemoDetailModal = ({isRestoring,isSaving,memo,+ notebookName,onClose,onDelete,onEdit,onRichEdit,- onOpenNextMemo,- onOpenPreviousMemo,onOpenResources,onOpenRevisions,onRestore,@@ -3909,18 +3923,18 @@ const MemoDetailModal = ({isRestoring: boolean;isSaving: boolean;memo: MemoDetail | null;+ notebookName: string;onClose: () => void;onDelete: (memo: MemoDetail) => void;onEdit: (memo: MemoDetail) => void;onRichEdit: (memo: MemoDetail) => void;- onOpenNextMemo?: () => void;- onOpenPreviousMemo?: () => void;onOpenResources: () => void;onOpenRevisions: (memo: MemoDetail) => void;onRestore: (memo: MemoDetail) => void;onTogglePin: (memo: MemoDetail) => void;visible: boolean;}) => {+ const [actionsOpen, setActionsOpen] = useState(false);const [searchOpen, setSearchOpen] = useState(false);const [searchQuery, setSearchQuery] = useState("");const [activeMatchIndex, setActiveMatchIndex] = useState(0);@@ -3941,24 +3955,22 @@ const MemoDetailModal = ({setActiveMatchIndex((current) => (current + direction + searchMatches.length) % searchMatches.length);};+ const closeActionsAndRun = (action: () => void) => {+ setActionsOpen(false);+ action();+ };+return (- <Modal animationType="slide" onRequestClose={onClose} presentationStyle="pageSheet" visible={visible}>+ <Modal animationType="slide" onRequestClose={onClose} presentationStyle="fullScreen" visible={visible}><SafeAreaView style={styles.modalSafeArea}>- <View style={styles.modalHeader}>- <IconButton onPress={onClose}>- <X color="#0f172a" size={20} />- </IconButton>- <Text numberOfLines={1} style={styles.modalTitle}>- {memo?.title?.trim() || DEFAULT_MEMO_TITLE}- </Text>- <View style={styles.modalHeaderActions}>- <IconButton disabled={!onOpenPreviousMemo} onPress={() => onOpenPreviousMemo?.()}>- <ChevronLeft color={onOpenPreviousMemo ? "#0f172a" : "#cbd5e1"} size={18} />- </IconButton>- <IconButton disabled={!onOpenNextMemo} onPress={() => onOpenNextMemo?.()}>- <ChevronRight color={onOpenNextMemo ? "#0f172a" : "#cbd5e1"} size={18} />- </IconButton>- </View>+ <View style={styles.detailHeader}>+ <Pressable accessibilityLabel="返回" accessibilityRole="button" onPress={onClose} style={styles.detailHeaderButton}>+ <ChevronLeft color="#475569" size={21} />+ </Pressable>+ <Text style={styles.detailSyncStatus}>{isSaving ? "保存中" : "已同步"}</Text>+ <Pressable accessibilityLabel="笔记操作" accessibilityRole="button" onPress={() => setActionsOpen(true)} style={styles.detailHeaderButton}>+ <MoreHorizontal color="#475569" size={21} />+ </Pressable></View>{isLoading ? (@@ -3968,51 +3980,10 @@ const MemoDetailModal = ({) : memo ? (<ScrollView contentContainerStyle={styles.detailContent}><Text style={styles.detailTitle}>{memo.title?.trim() || DEFAULT_MEMO_TITLE}</Text>- <View style={styles.memoMeta}>- <Text style={styles.memoDate}>{formatDate(memo.updatedAt, localePreference)}</Text>- <Text style={styles.memoDate}>修订 {memo.revision}</Text>- </View>- <View style={styles.actionRow}>- {memo.isDeleted ? (- <>- <ActionButton label="查找" onPress={() => setSearchOpen((open) => !open)}>- <Search color="#0f172a" size={16} />- </ActionButton>- <ActionButton label="历史" onPress={() => onOpenRevisions(memo)}>- <History color="#0f172a" size={16} />- </ActionButton>- <ActionButton label="资源" onPress={onOpenResources}>- <Archive color="#0f172a" size={16} />- </ActionButton>- <ActionButton disabled={isRestoring} label={isRestoring ? "恢复中" : "恢复"} onPress={() => onRestore(memo)}>- <RotateCcw color="#0f172a" size={16} />- </ActionButton>- </>- ) : (- <>- <ActionButton disabled={isSaving} label={memo.isPinned ? "取消置顶" : "置顶"} onPress={() => onTogglePin(memo)}>- <Pin color="#0f172a" size={16} />- </ActionButton>- <ActionButton label="编辑" onPress={() => onEdit(memo)}>- <Pencil color="#0f172a" size={16} />- </ActionButton>- <ActionButton label="富文本" onPress={() => onRichEdit(memo)}>- <Bold color="#0f172a" size={16} />- </ActionButton>- <ActionButton label="查找" onPress={() => setSearchOpen((open) => !open)}>- <Search color="#0f172a" size={16} />- </ActionButton>- <ActionButton label="历史" onPress={() => onOpenRevisions(memo)}>- <History color="#0f172a" size={16} />- </ActionButton>- <ActionButton label="资源" onPress={onOpenResources}>- <Archive color="#0f172a" size={16} />- </ActionButton>- </>- )}- <ActionButton danger disabled={isDeleting} label={isDeleting ? "删除中" : memo.isDeleted ? "永久删除" : "删除"} onPress={() => onDelete(memo)}>- <Trash2 color="#b91c1c" size={16} />- </ActionButton>+ <View style={styles.detailMetaRow}>+ <Text numberOfLines={1} style={styles.detailNotebookName}>{notebookName}</Text>+ {memo.tags.length ? <Tag color="#64748b" size={15} /> : null}+ {memo.tags.length ? <Text numberOfLines={1} style={styles.detailTagsInline}>{memo.tags.join(", ")}</Text> : null}</View>{searchOpen ? (<View style={styles.noteSearchPanel}>@@ -4039,22 +4010,45 @@ const MemoDetailModal = ({</View></View>) : null}- {memo.tags.length ? (- <View style={styles.tagList}>- {memo.tags.map((tag) => (- <Text key={tag} style={styles.tag}>- #{tag}- </Text>- ))}- </View>- ) : null}- <HighlightedDetailText activeIndex={activeMatchIndex} matches={searchMatches} text={detailText} />+ <View style={styles.detailDivider} />+ {searchOpen && searchQuery.trim() ? (+ <HighlightedDetailText activeIndex={activeMatchIndex} matches={searchMatches} text={detailText} />+ ) : (+ <Markdown style={detailMarkdownStyles}>{detailText}</Markdown>+ )}</ScrollView>) : (<View style={styles.centerState}><Text style={styles.errorText}>笔记加载失败</Text></View>)}+ {memo && !memo.isDeleted ? (+ <Pressable accessibilityLabel="编辑笔记" accessibilityRole="button" onPress={() => onEdit(memo)} style={styles.detailEditFab}>+ <Pencil color="#ffffff" size={22} />+ </Pressable>+ ) : null}+ {memo ? (+ <Modal animationType="fade" onRequestClose={() => setActionsOpen(false)} transparent visible={actionsOpen}>+ <Pressable onPress={() => setActionsOpen(false)} style={styles.actionSheetBackdrop}>+ <Pressable style={styles.actionSheet}>+ <View style={styles.actionSheetHandle} />+ <Text style={styles.actionSheetTitle}>笔记操作</Text>+ {memo.isDeleted ? (+ <ActionSheetItem disabled={isRestoring} icon={<RotateCcw color="#0f172a" size={18} />} label={isRestoring ? "恢复中" : "恢复笔记"} onPress={() => closeActionsAndRun(() => onRestore(memo))} />+ ) : (+ <>+ <ActionSheetItem disabled={isSaving} icon={<Pin color="#0f172a" size={18} />} label={memo.isPinned ? "取消置顶" : "置顶"} onPress={() => closeActionsAndRun(() => onTogglePin(memo))} />+ <ActionSheetItem icon={<Bold color="#0f172a" size={18} />} label="富文本编辑" onPress={() => closeActionsAndRun(() => onRichEdit(memo))} />+ </>+ )}+ <ActionSheetItem icon={<Search color="#0f172a" size={18} />} label="查找当前笔记" onPress={() => closeActionsAndRun(() => setSearchOpen((open) => !open))} />+ <ActionSheetItem icon={<History color="#0f172a" size={18} />} label="修订历史" onPress={() => closeActionsAndRun(() => onOpenRevisions(memo))} />+ <ActionSheetItem icon={<Archive color="#0f172a" size={18} />} label="资源" onPress={() => closeActionsAndRun(onOpenResources)} />+ <ActionSheetItem danger disabled={isDeleting} icon={<Trash2 color="#b91c1c" size={18} />} label={isDeleting ? "删除中" : memo.isDeleted ? "永久删除" : "删除"} onPress={() => closeActionsAndRun(() => onDelete(memo))} />+ </Pressable>+ </Pressable>+ </Modal>+ ) : null}</SafeAreaView></Modal>);@@ -4241,9 +4235,11 @@ const EditMemoModal = ({const [tagsText, setTagsText] = useState("");const [replaceQuery, setReplaceQuery] = useState("");const [replaceValue, setReplaceValue] = useState("");+ const [replaceOpen, setReplaceOpen] = useState(false);const [draftLoaded, setDraftLoaded] = useState(false);const [loadedDraftUpdatedAt, setLoadedDraftUpdatedAt] = useState<string | null>(null);const [insertTextOpen, setInsertTextOpen] = useState(false);+ const [notebookPickerOpen, setNotebookPickerOpen] = useState(false);const [uploadProgress, setUploadProgress] = useState("");const localePreference = useMobileLocalePreference();const replaceMatches = useMemo(() => getTextSearchMatches(contentMarkdown, replaceQuery), [contentMarkdown, replaceQuery]);@@ -4255,6 +4251,7 @@ const EditMemoModal = ({tagsText !== memo.tags.join(", ")));const canSaveEditMemo = Boolean(memo && notebookId && hasEditChanges && !updateMutation.isPending);+ const selectedNotebookName = notebooks.find((notebook) => notebook.id === notebookId)?.name ?? "选择笔记本";useEffect(() => {let mounted = true;@@ -4268,6 +4265,7 @@ const EditMemoModal = ({setTagsText(memo.tags.join(", "));setReplaceQuery("");setReplaceValue("");+ setReplaceOpen(false);setUploadProgress("");setLoadedDraftUpdatedAt(null);readMobileMemoDraft(memo.id).then((draft) => {@@ -4476,11 +4474,11 @@ const EditMemoModal = ({<Modal animationType="slide" onRequestClose={requestClose} presentationStyle="pageSheet" visible={Boolean(memo)}><SafeAreaView style={styles.modalSafeArea}><View style={styles.modalHeader}>- <IconButton disabled={updateMutation.isPending || uploadResourceMutation.isPending} onPress={requestClose}>+ <IconButton accessibilityLabel="关闭编辑" disabled={updateMutation.isPending || uploadResourceMutation.isPending} onPress={requestClose}><X color={updateMutation.isPending || uploadResourceMutation.isPending ? "#cbd5e1" : "#0f172a"} size={20} /></IconButton><Text style={styles.modalTitle}>编辑笔记</Text>- <IconButton disabled={!canSaveEditMemo} onPress={handleSave}>+ <IconButton accessibilityLabel="保存笔记" disabled={!canSaveEditMemo} onPress={handleSave}>{updateMutation.isPending ? <ActivityIndicator color="#0f172a" /> : <Check color={canSaveEditMemo ? "#0f172a" : "#cbd5e1"} size={20} />}</IconButton></View>@@ -4493,7 +4491,11 @@ const EditMemoModal = ({) : null}<Text style={styles.label}>笔记本</Text>- <NotebookPicker notebooks={notebooks} onChange={setNotebookId} selectedNotebookId={notebookId} />+ <Pressable accessibilityRole="button" onPress={() => setNotebookPickerOpen(true)} style={styles.editorNotebookButton}>+ <Folder color="#64748b" size={18} />+ <Text numberOfLines={1} style={styles.editorNotebookButtonText}>{selectedNotebookName}</Text>+ <ChevronRight color="#94a3b8" size={18} />+ </Pressable><Text style={styles.label}>标题</Text><TextInput onChangeText={setTitle} placeholder={DEFAULT_MEMO_TITLE} placeholderTextColor="#94a3b8" style={styles.titleInput} value={title} />@@ -4514,36 +4516,43 @@ const EditMemoModal = ({onUploadResource={() => uploadResourceMutation.mutate()}/>{uploadProgress ? <Text style={styles.assetsHint}>{uploadProgress}</Text> : null}- <View style={styles.noteSearchPanel}>- <View style={styles.searchBox}>- <Search color="#64748b" size={18} />- <TextInput- autoCapitalize="none"- autoCorrect={false}- onChangeText={setReplaceQuery}- placeholder="查找正文"- placeholderTextColor="#94a3b8"- style={styles.searchInput}- value={replaceQuery}- />- <Text style={[styles.noteSearchCount, replaceQuery.trim() && replaceMatches.length === 0 && styles.noteSearchCountEmpty]}>{replaceQuery.trim() ? replaceMatches.length : 0}</Text>- </View>- <View style={styles.searchBox}>- <RefreshCw color="#64748b" size={18} />- <TextInput- autoCapitalize="none"- autoCorrect={false}- onChangeText={setReplaceValue}- placeholder="替换为"- placeholderTextColor="#94a3b8"- style={styles.searchInput}- value={replaceValue}- />+ <Pressable accessibilityRole="button" onPress={() => setReplaceOpen((open) => !open)} style={styles.editorFindToggle}>+ <Search color="#64748b" size={17} />+ <Text style={styles.editorFindToggleText}>{replaceOpen ? "收起查找与替换" : "查找与替换"}</Text>+ <ChevronDown color="#94a3b8" size={17} style={replaceOpen ? { transform: [{ rotate: "180deg" }] } : undefined} />+ </Pressable>+ {replaceOpen ? (+ <View style={styles.noteSearchPanel}>+ <View style={styles.searchBox}>+ <Search color="#64748b" size={18} />+ <TextInput+ autoCapitalize="none"+ autoCorrect={false}+ onChangeText={setReplaceQuery}+ placeholder="查找正文"+ placeholderTextColor="#94a3b8"+ style={styles.searchInput}+ value={replaceQuery}+ />+ <Text style={[styles.noteSearchCount, replaceQuery.trim() && replaceMatches.length === 0 && styles.noteSearchCountEmpty]}>{replaceQuery.trim() ? replaceMatches.length : 0}</Text>+ </View>+ <View style={styles.searchBox}>+ <RefreshCw color="#64748b" size={18} />+ <TextInput+ autoCapitalize="none"+ autoCorrect={false}+ onChangeText={setReplaceValue}+ placeholder="替换为"+ placeholderTextColor="#94a3b8"+ style={styles.searchInput}+ value={replaceValue}+ />+ </View>+ <ActionButton disabled={replaceMatches.length === 0} label="全部替换" onPress={replaceAllMatches}>+ <RefreshCw color={replaceMatches.length === 0 ? "#cbd5e1" : "#0f172a"} size={16} />+ </ActionButton></View>- <ActionButton disabled={replaceMatches.length === 0} label="全部替换" onPress={replaceAllMatches}>- <RefreshCw color={replaceMatches.length === 0 ? "#cbd5e1" : "#0f172a"} size={16} />- </ActionButton>- </View>+ ) : null}<TextInputmultilineonChangeText={setContentMarkdown}@@ -4564,6 +4573,18 @@ const EditMemoModal = ({) : null}</ScrollView><InsertTextModal onClose={() => setInsertTextOpen(false)} onInsert={insertManualText} visible={insertTextOpen} />+ <NotebookPickerModal+ activeNotebookId={notebookId}+ notebookSortMode="manual"+ notebooks={notebooks}+ notebooksMemoCount={notebooks.reduce((total, notebook) => total + notebook.memoCount, 0)}+ onClose={() => setNotebookPickerOpen(false)}+ onSelect={(nextNotebookId) => {+ setNotebookId(nextNotebookId);+ setNotebookPickerOpen(false);+ }}+ visible={notebookPickerOpen}+ /></SafeAreaView></Modal>);@@ -5052,8 +5073,8 @@ const SyncQueuePanel = ({);};-const IconButton = ({ children, disabled = false, onPress }: { children: ReactNode; disabled?: boolean; onPress: () => void }) => (- <Pressable accessibilityRole="button" disabled={disabled} onPress={onPress} style={[styles.iconButton, disabled && styles.buttonDisabled]}>+const IconButton = ({ accessibilityLabel, children, disabled = false, onPress }: { accessibilityLabel?: string; children: ReactNode; disabled?: boolean; onPress: () => void }) => (+ <Pressable accessibilityLabel={accessibilityLabel} accessibilityRole="button" disabled={disabled} onPress={onPress} style={[styles.iconButton, disabled && styles.buttonDisabled]}>{children}</Pressable>);@@ -5989,6 +6010,80 @@ const getSyncQueueStatusStyle = (status: MobileSyncQueueItem["status"]) => {return styles.syncStatusPending;};+const detailMarkdownStyles = StyleSheet.create({+ body: {+ color: "#0f172a",+ fontSize: 17,+ lineHeight: 27,+ },+ blockquote: {+ backgroundColor: "#f8fafc",+ borderLeftColor: "#94a3b8",+ borderLeftWidth: 3,+ marginVertical: 10,+ paddingHorizontal: 14,+ paddingVertical: 8,+ },+ bullet_list: {+ marginVertical: 8,+ },+ code_inline: {+ backgroundColor: "#f1f5f9",+ borderRadius: 4,+ color: "#334155",+ fontSize: 15,+ },+ fence: {+ backgroundColor: "#0f172a",+ borderColor: "#0f172a",+ borderRadius: 8,+ color: "#e2e8f0",+ fontSize: 14,+ marginVertical: 10,+ padding: 12,+ },+ heading1: {+ color: "#0f172a",+ fontSize: 26,+ fontWeight: "800",+ lineHeight: 34,+ marginBottom: 10,+ marginTop: 14,+ },+ heading2: {+ color: "#0f172a",+ fontSize: 21,+ fontWeight: "800",+ lineHeight: 29,+ marginBottom: 8,+ marginTop: 18,+ },+ heading3: {+ color: "#0f172a",+ fontSize: 18,+ fontWeight: "800",+ lineHeight: 26,+ marginBottom: 6,+ marginTop: 14,+ },+ link: {+ color: "#059669",+ },+ list_item: {+ marginVertical: 3,+ },+ ordered_list: {+ marginVertical: 8,+ },+ paragraph: {+ marginBottom: 10,+ marginTop: 0,+ },+ strong: {+ fontWeight: "800",+ },+});+const styles = StyleSheet.create({safeArea: {backgroundColor: "#f8fafc",@@ -6745,14 +6840,81 @@ const styles = StyleSheet.create({padding: 12,},detailContent: {- padding: 18,- paddingBottom: 48,+ paddingBottom: 112,+ paddingHorizontal: 18,+ paddingTop: 14,},detailTitle: {color: "#0f172a",- fontSize: 24,+ fontSize: 23,fontWeight: "800",- lineHeight: 30,+ lineHeight: 31,+ },+ detailHeader: {+ alignItems: "center",+ borderBottomColor: "#f1f5f9",+ borderBottomWidth: 1,+ flexDirection: "row",+ justifyContent: "space-between",+ minHeight: 52,+ paddingHorizontal: 10,+ },+ detailHeaderButton: {+ alignItems: "center",+ borderRadius: 20,+ height: 40,+ justifyContent: "center",+ width: 40,+ },+ detailSyncStatus: {+ backgroundColor: "#f1f5f9",+ borderRadius: 999,+ color: "#64748b",+ fontSize: 12,+ fontWeight: "700",+ overflow: "hidden",+ paddingHorizontal: 10,+ paddingVertical: 5,+ },+ detailMetaRow: {+ alignItems: "center",+ flexDirection: "row",+ gap: 7,+ marginTop: 16,+ },+ detailNotebookName: {+ color: "#64748b",+ fontSize: 13,+ marginRight: 8,+ maxWidth: "42%",+ },+ detailTagsInline: {+ color: "#64748b",+ flex: 1,+ fontSize: 13,+ },+ detailDivider: {+ backgroundColor: "#e2e8f0",+ height: 1,+ marginHorizontal: -18,+ marginTop: 20,+ marginBottom: 18,+ },+ detailEditFab: {+ alignItems: "center",+ backgroundColor: "#10b981",+ borderRadius: 28,+ bottom: 28,+ elevation: 6,+ height: 56,+ justifyContent: "center",+ position: "absolute",+ right: 22,+ shadowColor: "#0f172a",+ shadowOffset: { width: 0, height: 4 },+ shadowOpacity: 0.2,+ shadowRadius: 8,+ width: 56,},detailMarkdown: {color: "#1f2937",@@ -7077,6 +7239,36 @@ const styles = StyleSheet.create({padding: 18,paddingBottom: 48,},+ editorNotebookButton: {+ alignItems: "center",+ backgroundColor: "#ffffff",+ borderColor: "#e2e8f0",+ borderRadius: 8,+ borderWidth: 1,+ flexDirection: "row",+ gap: 10,+ minHeight: 48,+ paddingHorizontal: 13,+ },+ editorNotebookButtonText: {+ color: "#0f172a",+ flex: 1,+ fontSize: 15,+ fontWeight: "700",+ },+ editorFindToggle: {+ alignItems: "center",+ flexDirection: "row",+ gap: 8,+ minHeight: 40,+ paddingHorizontal: 4,+ },+ editorFindToggleText: {+ color: "#475569",+ flex: 1,+ fontSize: 14,+ fontWeight: "700",+ },revisionPill: {backgroundColor: "#ffffff",borderColor: "#e2e8f0",diff --git a/bun.lock b/bun.lockindex efad52d9..7d027b6f 100644--- a/bun.lock+++ b/bun.lock@@ -79,7 +79,7 @@},"apps/mobile": {"name": "@edgeever/mobile",- "version": "0.3.2",+ "version": "0.4.0","dependencies": {"@edgeever/client": "workspace:*","@edgeever/shared": "workspace:*",@@ -103,6 +103,7 @@"react": "19.2.3","react-native": "latest","react-native-gesture-handler": "~2.32.0",+ "react-native-markdown-display": "^7.0.2","react-native-reanimated": "4.5.0","react-native-safe-area-context": "~5.7.0","react-native-screens": "4.25.2",@@ -1223,7 +1224,7 @@"arg": ["[email protected]", "", {}, "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg=="],- "argparse": ["[email protected]", "", {}, "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="],+ "argparse": ["[email protected]", "", { "dependencies": { "sprintf-js": "~1.0.2" } }, "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg=="],"aria-hidden": ["[email protected]", "", { "dependencies": { "tslib": "^2.0.0" } }, "sha512-ik3ZgC9dY/lYVVM++OISsaYDeg1tb0VtP5uL3ouh1koGOaUMDPpbFIei4JkFimWUFPn90sbMNMXQAIVOlnYKJA=="],@@ -1331,6 +1332,8 @@"camelcase-css": ["[email protected]", "", {}, "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA=="],+ "camelize": ["[email protected]", "", {}, "sha512-dU+Tx2fsypxTgtLoE36npi3UqcjSSMNYfkqgmoEhtZrraP5VWq0K7FkWVTYa8eMPtnU/G2txVsfdCJTn9uzpuQ=="],+"caniuse-lite": ["[email protected]", "", {}, "sha512-hG1bReV+OUU+MOqK4t/ZWI0tZOyz3rqS9XuhOUz1cIcbwBKjOyJEJuw9ER5JuNyqxNk8u/JUVbGibBOL1yrjFw=="],"ccount": ["[email protected]", "", {}, "sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg=="],@@ -1425,8 +1428,12 @@"crypto-random-string": ["[email protected]", "", {}, "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA=="],+ "css-color-keywords": ["[email protected]", "", {}, "sha512-FyyrDHZKEjXDpNJYvVsV960FiqQyXc/LlYmsxl2BcdMb2WPx0OGRVgTg55rPSyLSNMqP52R9r8geSp7apN3Ofg=="],+"css-select": ["[email protected]", "", { "dependencies": { "boolbase": "^1.0.0", "css-what": "^6.1.0", "domhandler": "^5.0.2", "domutils": "^3.0.1", "nth-check": "^2.0.1" } }, "sha512-TizTzUddG/xYLA3NXodFM0fSbNizXjOKhqiQQwvhlspadZokn1KDy0NZFS0wuEubIYAV5/c1/lAr0TaaFXEXzw=="],+ "css-to-react-native": ["[email protected]", "", { "dependencies": { "camelize": "^1.0.0", "css-color-keywords": "^1.0.0", "postcss-value-parser": "^4.0.2" } }, "sha512-e8RKaLXMOFii+02mOlqwjbD00KSEKqblnpO9e++1aXS1fPQOpS1YoqdVHBqPjHNoxeF2mimzVqawm2KCbEdtHQ=="],+"css-tree": ["[email protected]", "", { "dependencies": { "mdn-data": "2.0.14", "source-map": "^0.6.1" } }, "sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q=="],"css-what": ["[email protected]", "", {}, "sha512-u/O3vwbptzhMs3L1fQE82ZSLHQQfto5gyZzwteVIEyeaY5Fc7R4dapF/BvRoSYFeqfBk4m0V1Vafq5Pjv25wvA=="],@@ -1521,7 +1528,7 @@"enhanced-resolve": ["[email protected]", "", { "dependencies": { "graceful-fs": "^4.2.4", "tapable": "^2.3.3" } }, "sha512-aNnGCvbJ/RIyWo1IuhNdVjnNF+EjH9wpzpNHt+ci/m9He9LJvUN8wrCcXjp9cWsGNAuvSpVFTx/vraAFQ8qGjQ=="],- "entities": ["[email protected]", "", {}, "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw=="],+ "entities": ["[email protected]", "", {}, "sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ=="],"error-stack-parser": ["[email protected]", "", { "dependencies": { "stackframe": "^1.3.4" } }, "sha512-Sk5V6wVazPhq5MhpO+AUxJn5x7XSXGl1R93Vn7i+zS15KDVxQijejNCrz8340/2bgLBjR9GtEG8ZVKONDjcqGQ=="],@@ -2015,6 +2022,8 @@"lines-and-columns": ["[email protected]", "", {}, "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg=="],+ "linkify-it": ["[email protected]", "", { "dependencies": { "uc.micro": "^1.0.1" } }, "sha512-GnAl/knGn+i1U/wjBz3akz2stz+HrHLsxMwHQGofCDfPvlf+gDKN58UtfmUquTY4/MXeE2x7k19KQmeoZi94Iw=="],+"linkifyjs": ["[email protected]", "", {}, "sha512-P8aEP5U/D1/IlTY2OeYsErdwh9bGuLE30NcXtKEjgdHcahveQoQwM2yZNsioQHsWFz0P7KKudisbrzCgR0sDHg=="],"local-pkg": ["[email protected]", "", { "dependencies": { "mlly": "^1.7.4", "pkg-types": "^2.3.0", "quansync": "^0.2.11" } }, "sha512-++gUqRDEvcnN6Zhqrr+y/CkVEHhlrR96vZn3nZZPYzMcBUyBtTKzB9NadClFIsIVSsu+3i9tfk/erqy9kAmt7Q=="],@@ -2051,6 +2060,8 @@"markdown-extensions": ["[email protected]", "", {}, "sha512-o5vL7aDWatOTX8LzaS1WMoaoxIiLRQJuIKKe2wAw6IeULDHaqbiqiggmx+pKvZDb1Sj+pE46Sn1T7lCqfFtg1Q=="],+ "markdown-it": ["[email protected]", "", { "dependencies": { "argparse": "^1.0.7", "entities": "~2.0.0", "linkify-it": "^2.0.0", "mdurl": "^1.0.1", "uc.micro": "^1.0.5" }, "bin": { "markdown-it": "bin/markdown-it.js" } }, "sha512-YWOP1j7UbDNz+TumYP1kpwnP0aEa711cJjrAQrzd0UXlbJfc5aAq0F/PZHjiioqDC1NKgvIMX+o+9Bk7yuM2dg=="],+"markdown-table": ["[email protected]", "", {}, "sha512-wiYz4+JrLyb/DqW2hkFJxP7Vd7JuTDm77fvbM8VfEQdmSMqcImWeeRbHwZjBjIFki/VaMK2BhFi7oUUZeM5bqw=="],"marked": ["[email protected]", "", { "bin": { "marked": "bin/marked.js" } }, "sha512-S6GcvALHg6K4ohtu4E7x0a1AqhAjp6cV8KhLSyN9qVapnzJkusVBxZRcIU9AeYsbe6P1hKDusSbEOzGyyuce6w=="],@@ -2095,6 +2106,8 @@"mdn-data": ["[email protected]", "", {}, "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow=="],+ "mdurl": ["[email protected]", "", {}, "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g=="],+"memoize-one": ["[email protected]", "", {}, "sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q=="],"merge-options": ["[email protected]", "", { "dependencies": { "is-plain-obj": "^2.1.0" } }, "sha512-2Sug1+knBjkaMsMgf1ctR1Ujx+Ayku4EdJN4Z+C2+JzoeF7A3OZ9KM2GY0CpQS51NR61LTurMJrRKPhSs3ZRTQ=="],@@ -2471,10 +2484,14 @@"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=="],+"react-native-gesture-handler": ["[email protected]", "", { "dependencies": { "@egjs/hammerjs": "^2.0.17", "@types/react-test-renderer": "^19.1.0", "hoist-non-react-statics": "^3.3.0", "invariant": "^2.2.4" }, "peerDependencies": { "react": "*", "react-native": "*" } }, "sha512-uYIMOKlKENORq2SABE+jIjbPU+h5I/sQKcq2v16zRq848nwEp1fWRVwML4QWqijc8UcXJC25o54S8GQd4Mf2OA=="],"react-native-is-edge-to-edge": ["[email protected]", "", { "peerDependencies": { "react": "*", "react-native": "*" } }, "sha512-NIXU/iT5+ORyCc7p0z2nnlkouYKX425vuU1OEm6bMMtWWR9yvb+Xg5AZmImTKoF9abxCPqrKC3rOZsKzUYgYZA=="],+ "react-native-markdown-display": ["[email protected]", "", { "dependencies": { "css-to-react-native": "^3.0.0", "markdown-it": "^10.0.0", "prop-types": "^15.7.2", "react-native-fit-image": "^1.5.5" }, "peerDependencies": { "react": ">=16.2.0", "react-native": ">=0.50.4" } }, "sha512-Mn4wotMvMfLAwbX/huMLt202W5DsdpMO/kblk+6eUs55S57VVNni1gzZCh5qpznYLjIQELNh50VIozEfY6fvaQ=="],+"react-native-reanimated": ["[email protected]", "", { "dependencies": { "react-native-is-edge-to-edge": "^1.3.1", "semver": "^7.7.3" }, "peerDependencies": { "react": "*", "react-native": "0.83 - 0.86", "react-native-worklets": "0.10.x" } }, "sha512-+iPfvK34PKKYP/p/4TaBliFkbfvjGDIvXuiiaxvISP5ip7sWegvlacwU/uAV6zNDSSmX0tDyER7PurPMKGDipA=="],"react-native-safe-area-context": ["[email protected]", "", { "peerDependencies": { "react": "*", "react-native": "*" } }, "sha512-/9/MtQz8ODphjsLdZ+GZAIcC/RtoqW9EeShf7Uvnfgm/pzYrJ75y3PV/J1wuAV1T5Dye5ygq4EAW20RoBq0ABQ=="],@@ -2679,6 +2696,8 @@"split-on-first": ["[email protected]", "", {}, "sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw=="],+ "sprintf-js": ["[email protected]", "", {}, "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g=="],+"stackframe": ["[email protected]", "", {}, "sha512-oeVtt7eWQS+Na6F//S4kJ2K2VbRlS9D43mAlMyVpVWovy9o+jfgH8O9agzANzaiLjclA0oYzUXEM4PurhSUChw=="],"stacktrace-parser": ["[email protected]", "", { "dependencies": { "type-fest": "^0.7.1" } }, "sha512-WjlahMgHmCJpqzU8bIBy4qtsZdU9lRlcZE3Lvyej6t4tuOuv1vk57OW3MBrj6hXBFx/nNoC9MPMTcr5YA7NQbg=="],@@ -2807,6 +2826,8 @@"typescript-auto-import-cache": ["[email protected]", "", { "dependencies": { "semver": "^7.3.8" } }, "sha512-RpuHXrknHdVdK7wv/8ug3Fr0WNsNi5l5aB8MYYuXhq2UH5lnEB1htJ1smhtD5VeCsGr2p8mUDtd83LCQDFVgjQ=="],+ "uc.micro": ["[email protected]", "", {}, "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA=="],+"ufo": ["[email protected]", "", {}, "sha512-JFNbkD1Svwe0KvGi8GOeLcP4kAWQ609twvCdcHxq1oSL8svv39ZuSvajcD8B+5D0eL4+s1Is2D/O6KN3qcTeRA=="],"ultrahtml": ["[email protected]", "", {}, "sha512-R9fBn90VTJrqqLDwyMph+HGne8eqY1iPfYhPzZrvKpIfwkWZbcYlfpsb8B9dTvBfpy1/hqAD7Wi8EKfP9e8zdw=="],@@ -3243,6 +3264,8 @@"csso/css-tree": ["[email protected]", "", { "dependencies": { "mdn-data": "2.0.28", "source-map-js": "^1.0.1" } }, "sha512-OA0mILzGc1kCOCSJerOeqDxDQ4HOh+G8NbOJFOTgOCzpw7fCBubk0fEyxp8AgOL/jvLgYA/uV0cMbe43ElF1JA=="],+ "dom-serializer/entities": ["[email protected]", "", {}, "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw=="],+"expo/react-refresh": ["[email protected]", "", {}, "sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA=="],"expo-linking/expo-constants": ["[email protected]", "", { "dependencies": { "@expo/env": "~2.4.1" }, "peerDependencies": { "expo": "*", "react-native": "*" } }, "sha512-BghbZlzwFnA22BG0CWv6W29zx8w19FozYPfSeZ3HjMitoy4aAmF1FnFbbjYSmZz6HHXXTWOfqwobOEIaglfzxg=="],@@ -3291,6 +3314,8 @@"jest-worker/supports-color": ["[email protected]", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q=="],+ "js-yaml/argparse": ["[email protected]", "", {}, "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="],+"lighthouse-logger/debug": ["[email protected]", "", { "dependencies": { "ms": "2.0.0" } }, "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA=="],"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=="],