feat(viewer): Add data source dialog

Introduce a dialog for switching between built-in content and a
user-selected local folder. Persist the folder handle in IndexedDB
so the selection survives page refreshes. Scan the folder for .md,
.yarn, and .csv files to build the file index.

Update App and Sidebar to pass file tree and heading data, and
add TypeScript declarations for the File System Access API.
This commit is contained in:
hyper
2026-06-30 19:20:08 +08:00
parent a05b0f4291
commit 53c8ce0677
7 changed files with 523 additions and 29 deletions
+2
View File
@@ -21,6 +21,8 @@ export type { SidebarProps } from "./Sidebar";
export { FileTreeNode, HeadingNode } from "./FileTree";
export { default as DocDialog } from "./DocDialog";
export type { DocDialogProps } from "./DocDialog";
export { default as DataSourceDialog } from "./DataSourceDialog";
export type { DataSourceDialogProps } from "./DataSourceDialog";
// 导出数据类型
export type { DiceProps } from "./md-dice";