feat: complete master feature parity with interactive PDF editing, Reveal.js export dialog, Large File Mode, and scoped CSS

This commit is contained in:
2026-06-15 01:22:17 +05:30
parent 7eb90d467a
commit 36422a9ab3
18 changed files with 917 additions and 66 deletions
+1
View File
@@ -23,6 +23,7 @@ export type ModalState =
| { kind: 'export-docx'; props: { sourcePath: string } }
| { kind: 'export-html'; props: { sourcePath: string } }
| { kind: 'export-batch'; props: { sourcePaths: string[] } }
| { kind: 'export-revealjs'; props: { sourcePath: string } }
| { kind: 'settings' }
| { kind: 'about' }
| { kind: 'welcome' }
+13
View File
@@ -3,8 +3,11 @@ import { create } from 'zustand';
interface PreviewState {
source: string;
scrollRatio: number;
largeFileMode: boolean;
setSource: (s: string) => void;
setScrollRatio: (r: number) => void;
setLargeFileMode: (v: boolean) => void;
forceRender: (s: string) => void;
}
const DEBOUNCE_MS = 300;
@@ -14,7 +17,12 @@ let pending: string = '';
export const usePreviewStore = create<PreviewState>((set) => ({
source: '',
scrollRatio: 0,
largeFileMode: false,
setSource: (s) => {
// If in large file mode, do not auto-update preview source on user typing
if (usePreviewStore.getState().largeFileMode) {
return;
}
pending = s;
if (timer) clearTimeout(timer);
timer = setTimeout(() => {
@@ -22,4 +30,9 @@ export const usePreviewStore = create<PreviewState>((set) => ({
}, DEBOUNCE_MS);
},
setScrollRatio: (r) => set({ scrollRatio: r }),
setLargeFileMode: (v) => set({ largeFileMode: v }),
forceRender: (s) => {
if (timer) clearTimeout(timer);
set({ source: s });
},
}));