collab-canvas 0.3.0 → 0.4.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/README.md +16 -5
- package/dist/host.js +957 -161
- package/lib/ccv-logic.js +281 -0
- package/lib/client.js +1058 -1633
- package/lib/doc-model.js +291 -0
- package/lib/selref.js +107 -20
- package/lib/viewer-md.js +4075 -0
- package/package.json +4 -3
- package/lib/docdrop.js +0 -362
- package/lib/doclink.js +0 -436
package/README.md
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# collab-canvas(话布)
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/collab-canvas)
|
|
3
4
|
[](https://opensource.org/licenses/MIT)
|
|
4
5
|
[](https://github.com/deepseek-ai/deepseek-harness)
|
|
5
6
|
|
|
@@ -20,16 +21,23 @@
|
|
|
20
21
|
|
|
21
22
|
| 功能 | 说明 |
|
|
22
23
|
|------|------|
|
|
23
|
-
| 📝 **浏览器内编辑** |
|
|
24
|
+
| 📝 **浏览器内编辑** | 在 DSH 的**文档查看器**里直接编辑 `.md`(旧侧边栏画布面板已删 ✓ 能力全在查看器里 ✓)|
|
|
24
25
|
| 🤖 **AI 可读写** | 9 个 `canvas_*` 工具,模型直接操作画布 |
|
|
25
|
-
| ↩️ **撤销历史** | 每次写入入栈,你和 AI
|
|
26
|
+
| ↩️ **撤销历史** | 每次写入入栈,你和 AI 的改动都可回退(粒度是整篇快照 + 按时间合并 ✓ 分步撤销见"未完成"✓)|
|
|
26
27
|
| 🔒 **冲突检测** | `canvas_write` 支持 `baseVersion` 强一致检查,不符返回 `E_CONFLICT` 并给出最新版本 |
|
|
27
28
|
| 💾 **文件持久化** | 画布落成普通 `.md` 文件,另有 `.canvases.json` 记录元信息 |
|
|
28
29
|
| 🎯 **划词引用** | 选中画布里的文字即弹出划词栏,可把该段引用进对话 |
|
|
29
|
-
|
|
|
30
|
+
| 🖱️ **选区编辑区** | 划一段 → 点「问 AI」→ AI **只改这一小段**,拼接回原文,落成**一个**撤销步骤 |
|
|
31
|
+
| 🔍 **查找 / 替换** | `Ctrl+F` ✓ 上一处/下一处 ✓ 替换 / 全部替换 ✓(查找**不改内容**就能定位 ✓)|
|
|
32
|
+
| 📊 **表格工具** | 插入表格(网格选择器)· Tab 跳格并自动加行 · 列宽/行高拖拽(落盘成注释 ✓ markdown 可读)· 列对齐 |
|
|
33
|
+
| 📐 **排版与快捷键** | 标题 / 加粗 / 斜体 / 删除线 / 高亮 / 行内代码 / 代码块 / 引用 / 链接 / 脚注 / 任务列表 / 缩进 · `Ctrl+B/I/K/S` |
|
|
30
34
|
| 📁 **存储根可配** | `canvas_configure` 可把画布根目录固定到任意位置(如项目目录) |
|
|
31
35
|
| 🎨 **跟随主题** | 界面全部使用 `var(--dsw-*)` 设计 token,换肤自动适配 |
|
|
32
36
|
|
|
37
|
+
> ⚠️ 2026-10-11 更正:原来的「文档链接 / 拖放」**随画布面板一起删除了** ✗
|
|
38
|
+
> (`lib/doclink.js` / `lib/docdrop.js` 已删 ✓ 上表是当前真实能力 ✓)
|
|
39
|
+
> 拖放上传 / 粘贴图片**还没接**(上传通道已有 ✓ 见《未完成事项清单》✓)
|
|
40
|
+
|
|
33
41
|
## AI 工具
|
|
34
42
|
|
|
35
43
|
| 工具 | 用途 |
|
|
@@ -47,8 +55,9 @@
|
|
|
47
55
|
## 安装
|
|
48
56
|
|
|
49
57
|
```bash
|
|
50
|
-
# 1. 装进 profile
|
|
51
|
-
dsh plugin --profile web add
|
|
58
|
+
# 1. 装进 profile(下面两种来源任选其一)
|
|
59
|
+
dsh plugin --profile web add collab-canvas # 从 npm 装(推荐)
|
|
60
|
+
dsh plugin --profile web add github:godchen520/collab-canvas # 从 GitHub 装(跟随最新提交)
|
|
52
61
|
|
|
53
62
|
# 2. 把 "collab-canvas" 加进 profile package.json 的 dsh.profile.bundles 数组
|
|
54
63
|
# (只加 dependencies 不加 bundles 的话,cordis.patch.yml 不会生效 —— 插件"装了但没启用")
|
|
@@ -60,6 +69,8 @@ dsh web
|
|
|
60
69
|
> **两处都要加**:`dependencies` 负责把包装上,`dsh.profile.bundles` 负责让它的
|
|
61
70
|
> `cordis.patch.yml` 进入组合。缺任何一边都会出现"装上了但功能不在"。
|
|
62
71
|
|
|
72
|
+
> **npm 安装的好处**:不受 npm 对 git 依赖触发的 `allowBuilds` 构建授权步骤影响,且市场能显示下载量。
|
|
73
|
+
|
|
63
74
|
## 数据存放
|
|
64
75
|
|
|
65
76
|
```
|