@huoweifang/dsh-mindmap 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,35 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.0
4
+
5
+ Data safety
6
+ - Backups are kept per kind (daily 14, manual 10, pre-restore 5, purge 5); the daily snapshot is taken before the first write of the day.
7
+ - Restore is atomic (staged in `docs.new/`, swapped, recovered on startup if interrupted).
8
+ - Trash keeps documents for 30 days, then purges them automatically; "Empty trash" added. Permanent deletes take a coalesced backup first.
9
+ - Requests are checked for a loopback `Host` and same-origin `Origin`; body limits are per route (save 32 MB, restore 64 MB, other 1 MB); server errors no longer echo internal messages.
10
+ - Quarantined (corrupt) files are listed in the backup panel; warnings are shown once.
11
+ - Changes in another tab or window are picked up (BroadcastChannel + refetch on focus); a save conflict offers 载入对方版本 / 保留我的 / 另存为副本.
12
+ - Import refuses trees deeper than 200 levels; tree code is iterative (no stack overflow on very deep documents).
13
+
14
+ Formats
15
+ - OPML: attributes containing `>` parse correctly; `_note` is imported and exported.
16
+ - Markdown: node notes round-trip as quote lines; fenced code blocks and paragraphs under headings become notes.
17
+
18
+ Outline
19
+ - Node notes, find and replace, #tag filter, row selection with batch operations, structured copy/paste, mark toggles, visual-line ↑/↓, shortcut panel (Ctrl+/), status bar with node / character / to-do counts.
20
+ - Enter on an empty last child outdents it; Backspace at the start merges more predictably; Alt+↑/↓ can move across parents.
21
+ - Undo merges typing for at most 3 s; folding is no longer an undo step; undo zooms out when the restored node is outside the focused subtree.
22
+
23
+ Mind map
24
+ - Two-sided balanced layout (toggle 两侧 / 向右), branch colours, tapered main branches, long-text ellipsis, done styling.
25
+ - Keyboard editing on the map (Tab / Enter / Delete / F2 / Space / arrows), drag to reparent, Esc on a new empty node removes it.
26
+ - Much faster on large documents (culling, memoised layout); fit keeps text readable; export checks canvas limits and offers SVG instead.
27
+
28
+ Documents
29
+ - Nested folders, drag and drop of documents and folders, sorting (recent / title / created), hover ⋯ menu, Alt+1…9 for favorites, undo toast after moving to trash, trash preview.
30
+ - New document from pasted Markdown.
31
+ - Dialogs trap focus; menus return focus to their opener; narrow windows move secondary buttons into 更多.
32
+
3
33
  ## 0.1.0
4
34
 
5
35
  - First public release. npm package `@huoweifang/dsh-mindmap`, plugin id `dsh-mindmap`.
package/README.md CHANGED
@@ -10,11 +10,11 @@ Outline notes with a live mind-map view for the [DeepSeek Harness](https://githu
10
10
 
11
11
  ## Features
12
12
 
13
- - **Outline** — unlimited levels; Enter splits/creates a sibling, Shift+Enter inserts a line break, Tab / Shift+Tab indent / outdent, Backspace deletes an empty node or merges with the previous one, Delete merges the next one, ↑/↓ move across nodes, Alt+↑/↓ move a node, Ctrl+. collapse, Ctrl+Enter toggle done, Alt+→ focus a subtree (breadcrumb to go back), Ctrl+Z / Ctrl+Shift+Z / Ctrl+Y undo/redo. Drag the bullet to reorder or change level. Multi-line paste becomes a tree. Inline Markdown (bold, italic, strikethrough, code, links, #tags) and checkboxes. IME composition is never intercepted.
14
- - **Mind map** — horizontal tree with connectors, collapse/expand, Ctrl+wheel zoom (20%–300%), drag to pan, center / fit / 100%, double-click or F2 to edit, Tab adds a child, Enter adds a sibling.
15
- - **Documents** — create, rename, trash and restore, folders, favorites, last-edited time, search across titles and node text.
13
+ - **Outline** — unlimited levels; Enter splits/creates a sibling, Alt+Enter inserts a line break, Shift+Enter adds a note, Tab / Shift+Tab indent / outdent, Backspace deletes an empty node or merges with the previous one, Delete merges the next one, ↑/↓ move across nodes, Alt+↑/↓ move a node, Ctrl+. collapse, Ctrl+Enter toggle done, Alt+→ focus a subtree (breadcrumb to go back), Ctrl+Z / Ctrl+Shift+Z / Ctrl+Y undo/redo. Drag the bullet to reorder or change level. Multi-line paste becomes a tree. Inline Markdown (bold, italic, strikethrough, code, links, #tags) and checkboxes. Find and replace (Ctrl+F), #tag filter, Esc selects rows for batch indent / move / delete / copy. Press Ctrl+/ for all shortcuts. IME composition is never intercepted.
14
+ - **Mind map** — two-sided or right-only tree with coloured branches, collapse/expand, Ctrl+wheel zoom (20%–300%), drag to pan, center / fit / 100%, double-click or F2 to edit, Tab adds a child, Enter adds a sibling, arrows move between nodes, drag a node to reparent it.
15
+ - **Documents** — create, rename, trash and restore, nested folders with drag and drop, favorites (Alt+1…9), sorting, last-edited time, search across titles, node text and notes; trash is emptied automatically after 30 days.
16
16
  - **Import / export** — import Markdown and OPML; export Markdown, OPML, PNG and SVG (whole document or the focused subtree).
17
- - **Storage** — autosave 800 ms after typing stops and immediately on document switch / page hide; atomic writes; revision-based conflict detection; daily automatic backups (last 30 kept), manual backup, download and restore.
17
+ - **Storage** — autosave 800 ms after typing stops and immediately on document switch / page hide; atomic writes; revision-based conflict detection; daily automatic backups (14 kept), manual backup, download and atomic restore; edits in another tab are picked up automatically.
18
18
 
19
19
  ## Requirements
20
20
 
@@ -34,7 +34,7 @@ dsh plugin --profile desktop add @huoweifang/dsh-mindmap
34
34
  From GitHub (pin a tag; `lib/` is committed, so no build step runs on install):
35
35
 
36
36
  ```sh
37
- dsh plugin --profile desktop add github:IsaacHuo/dsh-mindmap#v0.1.0
37
+ dsh plugin --profile desktop add github:IsaacHuo/dsh-mindmap#v0.2.0
38
38
  ```
39
39
 
40
40
  Restart DSH. A **思维导图** entry appears in the sidebar.
@@ -60,7 +60,7 @@ Uninstalling keeps your documents. Delete the data directory below by hand if yo
60
60
 
61
61
  - Data directory: `~/.dsh/dsh-mindmap/` (or `$DSH_HOME/dsh-mindmap`; override with `DSH_MINDMAP_DIR`). It holds `library.json`, `docs/<id>.json` and `backups/`.
62
62
  - Documents are plain, unencrypted JSON. Anyone with access to your user account can read them; don't store secrets.
63
- - The plugin only registers HTTP routes under `/dsh-mindmap/api` on the DSH web server and inherits its access control. Write requests must be `application/json` (blocks simple cross-site form posts); bodies are capped at 8 MB; document ids are validated before touching the file system.
63
+ - The plugin only registers HTTP routes under `/dsh-mindmap/api` on the DSH web server and inherits its access control. Write requests must be `application/json` (blocks simple cross-site form posts); requests must come from a loopback host with a same-origin `Origin`; bodies are capped per route (save 32 MB, restore 64 MB, others 1 MB); document ids are validated before touching the file system.
64
64
  - No network requests, telemetry, agent tools or model calls. Links in notes open only for `http(s)` URLs, and notes are never rendered as HTML.
65
65
 
66
66
  ## Development
package/README.zh-CN.md CHANGED
@@ -10,11 +10,11 @@
10
10
 
11
11
  ## 功能
12
12
 
13
- - **大纲**:无限层级;Enter 拆分 / 新建同级,Shift+Enter 换行,Tab / Shift+Tab 缩进 / 反缩进,Backspace 删除空节点或与上一行合并,Delete 合并下一行,↑/↓ 跨节点移动,Alt+↑/↓ 移动节点,Ctrl+. 折叠,Ctrl+Enter 完成,Alt+→ 聚焦子树(面包屑返回),Ctrl+Z / Ctrl+Shift+Z / Ctrl+Y 撤销重做;拖动圆点调整顺序或层级;多行粘贴自动生成层级;行内 Markdown(粗体、斜体、删除线、代码、链接、#标签)与复选框;输入法组字期间不拦截按键。
14
- - **导图**:水平树、连线、折叠 / 展开、Ctrl+滚轮缩放(20%–300%)、拖动平移、居中 / 适应窗口 / 100%;双击或 F2 编辑,Tab 加子节点,Enter 加同级。
15
- - **文档管理**:新建、重命名、删除到回收站并可恢复、文件夹、收藏、最近编辑时间、搜索标题与节点内容。
13
+ - **大纲**:无限层级;Enter 拆分 / 新建同级,Alt+Enter 换行,Shift+Enter 添加备注,Tab / Shift+Tab 缩进 / 反缩进,Backspace 删除空节点或与上一行合并,Delete 合并下一行,↑/↓ 跨节点移动,Alt+↑/↓ 移动节点,Ctrl+. 折叠,Ctrl+Enter 完成,Alt+→ 聚焦子树(面包屑返回),Ctrl+Z / Ctrl+Shift+Z / Ctrl+Y 撤销重做;拖动圆点调整顺序或层级;多行粘贴自动生成层级;行内 Markdown(粗体、斜体、删除线、代码、链接、#标签)与复选框;查找替换(Ctrl+F)、#标签筛选,Esc 进入行选择后可批量缩进 / 移动 / 删除 / 复制;Ctrl+/ 查看全部快捷键;输入法组字期间不拦截按键。
14
+ - **导图**:两侧或向右布局、分支配色、折叠 / 展开、Ctrl+滚轮缩放(20%–300%)、拖动平移、居中 / 适应窗口 / 100%;双击或 F2 编辑,Tab 加子节点,Enter 加同级,方向键切换节点,拖动节点改变父级。
15
+ - **文档管理**:新建、重命名、删除到回收站并可恢复、多级文件夹与拖放、收藏(Alt+1…9)、排序、最近编辑时间、搜索标题 / 节点 / 备注;回收站 30 天后自动清空。
16
16
  - **导入导出**:导入 Markdown、OPML;导出 Markdown、OPML、PNG、SVG(整篇或聚焦的子树)。
17
- - **存储**:停止输入 800 ms 后自动保存,切换文档 / 离开页面时立即保存;原子写入;修订号冲突检测;每日自动备份(保留 30 份),可手动备份、下载、恢复。
17
+ - **存储**:停止输入 800 ms 后自动保存,切换文档 / 离开页面时立即保存;原子写入;修订号冲突检测;每日自动备份(保留 14 份),可手动备份、下载、原子恢复;其他标签页的修改会自动同步。
18
18
 
19
19
  ## 环境要求
20
20
 
@@ -34,7 +34,7 @@ dsh plugin --profile desktop add @huoweifang/dsh-mindmap
34
34
  从 GitHub 安装(固定到 tag;仓库提交了 `lib/`,安装时不需要构建):
35
35
 
36
36
  ```sh
37
- dsh plugin --profile desktop add github:IsaacHuo/dsh-mindmap#v0.1.0
37
+ dsh plugin --profile desktop add github:IsaacHuo/dsh-mindmap#v0.2.0
38
38
  ```
39
39
 
40
40
  重启 DSH,侧边栏出现「思维导图」。
@@ -60,7 +60,7 @@ dsh plugin --profile desktop remove @huoweifang/dsh-mindmap
60
60
 
61
61
  - 数据目录:`~/.dsh/dsh-mindmap/`(或 `$DSH_HOME/dsh-mindmap`,可用 `DSH_MINDMAP_DIR` 覆盖),包含 `library.json`、`docs/<id>.json`、`backups/`。
62
62
  - 文档是未加密的 JSON 文件,能访问你系统账号的人都能读到,请勿存放机密。
63
- - 插件只在 DSH Web 服务上注册 `/dsh-mindmap/api` 路由,沿用 DSH 自身的访问控制;写请求必须是 `application/json`(挡住简单的跨站表单提交),请求体上限 8 MB,文档 id 在访问文件系统前校验。
63
+ - 插件只在 DSH Web 服务上注册 `/dsh-mindmap/api` 路由,沿用 DSH 自身的访问控制;写请求必须是 `application/json`(挡住简单的跨站表单提交),请求须来自回环地址且 `Origin` 同源,请求体按路由限制(保存 32 MB、恢复 64 MB、其他 1 MB),文档 id 在访问文件系统前校验。
64
64
  - 不发起网络请求、无遥测、不注册 Agent 工具、不调用模型。笔记中的链接只允许 `http(s)`,笔记内容从不作为 HTML 渲染。
65
65
 
66
66
  ## 开发