dsh-mermaid-smooth 0.2.2 → 0.2.3
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 +59 -11
- package/README.zh.md +35 -4
- package/icon.svg +17 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +30 -3
package/README.md
CHANGED
|
@@ -2,10 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
English | [中文](README.zh.md)
|
|
4
4
|
|
|
5
|
-
Render mermaid code fences in DeepSeek Harness (
|
|
6
|
-
default, with smooth zoom and pan, a per-fence
|
|
7
|
-
card's top-right, a persisted per-fence
|
|
8
|
-
fully bundled offline engine (zero CDN).
|
|
5
|
+
Render mermaid code fences in DeepSeek Harness (DSH) Web chat and the DSH
|
|
6
|
+
Desktop app as diagrams by default, with smooth zoom and pan, a per-fence
|
|
7
|
+
diagram/code toggle at each card's top-right, a persisted per-fence
|
|
8
|
+
preference, dark-mode follow, and a fully bundled offline engine (zero CDN).
|
|
9
|
+
|
|
10
|
+
The Desktop app is an Electron shell around the complete DSH Web application,
|
|
11
|
+
so it loads the same Web frontend and the same plugin bundle — one client
|
|
12
|
+
build serves both, with no Desktop-specific code path.
|
|
9
13
|
|
|
10
14
|
## Supported diagram types
|
|
11
15
|
|
|
@@ -68,12 +72,12 @@ to screen readers via `aria-live="polite"`.
|
|
|
68
72
|
|
|
69
73
|
## Install
|
|
70
74
|
|
|
71
|
-
dsh-mermaid-smooth is a plugin for the DeepSeek Harness (
|
|
72
|
-
proceeding, make sure
|
|
73
|
-
up.
|
|
75
|
+
dsh-mermaid-smooth is a plugin for the DeepSeek Harness (DSH) Web UI and the
|
|
76
|
+
DSH Desktop app. Before proceeding, make sure DSH is installed and set up.
|
|
74
77
|
|
|
75
|
-
|
|
76
|
-
sessions are persisted on disk and can be resumed after
|
|
78
|
+
Six ways — pick one, then restart DSH Web or the Desktop app (the current
|
|
79
|
+
session ends, but DSH sessions are persisted on disk and can be resumed after
|
|
80
|
+
restart).
|
|
77
81
|
|
|
78
82
|
**1. npm package (recommended, simplest)**
|
|
79
83
|
|
|
@@ -138,8 +142,52 @@ cd dsh-mermaid-smooth
|
|
|
138
142
|
dsh plugin --profile web add .
|
|
139
143
|
```
|
|
140
144
|
|
|
141
|
-
|
|
142
|
-
|
|
145
|
+
**5. From the DSH plugin market (Discover)**
|
|
146
|
+
|
|
147
|
+
This repo publishes its own market index, so the plugin can be installed from
|
|
148
|
+
**Discover** without typing a package name:
|
|
149
|
+
|
|
150
|
+
```text
|
|
151
|
+
https://cdn.jsdelivr.net/gh/gitByteFree/dsh-mermaid-smooth@main/market/index.json
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Open **Plugins** in the sidebar, switch on **Custom plugin markets** under
|
|
155
|
+
**Experimental plugins** if it is off, then in **Discover** add the index URL
|
|
156
|
+
above as a source and install **Mermaid Smooth**. The same index works in the
|
|
157
|
+
Desktop app.
|
|
158
|
+
|
|
159
|
+
jsDelivr serves the index because Discover needs a direct `200` without
|
|
160
|
+
redirects; a release can take up to 12 hours to appear there. To pick up a
|
|
161
|
+
fresh release immediately, pin an immutable commit (`@<commit>` instead of
|
|
162
|
+
`@main`) or use
|
|
163
|
+
`https://raw.githubusercontent.com/gitByteFree/dsh-mermaid-smooth/main/market/index.json`.
|
|
164
|
+
|
|
165
|
+
**6. DSH Desktop app (Electron)**
|
|
166
|
+
|
|
167
|
+
The Desktop app bundles the complete DSH Web application, so this plugin needs
|
|
168
|
+
no separate Desktop build. Desktop exclusively owns the `desktop` profile, and
|
|
169
|
+
only the CLI bundled with the app can manage it — an npm-installed `dsh`
|
|
170
|
+
refuses it with
|
|
171
|
+
`profile "desktop" is managed exclusively by the Electron application`.
|
|
172
|
+
|
|
173
|
+
1. Launch the Desktop app once so it initializes `$DSH_HOME/profiles/desktop`,
|
|
174
|
+
then quit it completely.
|
|
175
|
+
2. Install the app's command from the menu (**Manage dsh Command… →
|
|
176
|
+
Install**) and run:
|
|
177
|
+
|
|
178
|
+
```sh
|
|
179
|
+
dsh plugin --profile desktop add dsh-mermaid-smooth
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
3. Reopen the app. You can also install from its **Plugins** page or from the
|
|
183
|
+
market index in method 5.
|
|
184
|
+
|
|
185
|
+
Runtime behaviour is identical: diagrams, wheel zoom and drag, the per-fence
|
|
186
|
+
switch, the persisted preference, theme follow, copy, SVG download, and
|
|
187
|
+
fullscreen all run in the shared Web client.
|
|
188
|
+
|
|
189
|
+
Restart the web app (`dsh web`, or your `dsh-web` service) or reopen the
|
|
190
|
+
Desktop app so the new bundle layer is composed.
|
|
143
191
|
|
|
144
192
|
## License
|
|
145
193
|
|
package/README.zh.md
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
[English](README.md) | 中文
|
|
4
4
|
|
|
5
|
-
将 DeepSeek Harness(
|
|
5
|
+
将 DeepSeek Harness(DSH)**Web 与桌面版**对话中的 mermaid 代码围栏**默认渲染为图**:丝滑的缩放与拖拽,每张图右上角提供图/文案切换,偏好按围栏记忆,明暗主题跟随,渲染引擎完全本地打包(零 CDN)。
|
|
6
|
+
|
|
7
|
+
桌面版是完整 DSH Web 应用的 Electron 外壳,加载的是同一份 Web 前端与同一份插件 bundle —— 一份客户端产物同时服务两端,没有桌面版专用的代码分支。
|
|
6
8
|
|
|
7
9
|
## 支持的图表类型
|
|
8
10
|
|
|
@@ -52,9 +54,9 @@
|
|
|
52
54
|
|
|
53
55
|
## 安装
|
|
54
56
|
|
|
55
|
-
dsh-mermaid-smooth 是 DeepSeek Harness
|
|
57
|
+
dsh-mermaid-smooth 是 DeepSeek Harness(DSH)Web 界面与桌面版的插件。使用前请确保你已安装并配置好 dsh。
|
|
56
58
|
|
|
57
|
-
|
|
59
|
+
六种方式任选其一,装完重启 DSH Web 或桌面版即生效(当前会话会中断,但 DSH 会话有磁盘持久化,重启后可以恢复)。
|
|
58
60
|
|
|
59
61
|
**方式一:npm 正式包(推荐,最简单)**
|
|
60
62
|
|
|
@@ -99,7 +101,36 @@ cd dsh-mermaid-smooth
|
|
|
99
101
|
dsh plugin --profile web add .
|
|
100
102
|
```
|
|
101
103
|
|
|
102
|
-
|
|
104
|
+
**方式五:从 DSH 插件市场(Discover)安装**
|
|
105
|
+
|
|
106
|
+
本仓库自带一份插件市场索引,因此可以在 **Discover** 里直接安装,无需手输包名:
|
|
107
|
+
|
|
108
|
+
```text
|
|
109
|
+
https://cdn.jsdelivr.net/gh/gitByteFree/dsh-mermaid-smooth@main/market/index.json
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
打开侧边栏 **Plugins**,若 **Experimental plugins** 下的 **Custom plugin markets** 未开启则先打开;随后在 **Discover** 中把上面的索引 URL 添加为来源,再安装 **Mermaid 丝滑图表**。桌面版同样可用这份索引。
|
|
113
|
+
|
|
114
|
+
索引走 jsDelivr 分发,因为 Discover 要求直接返回 `200` 且不重定向;新版本可能需要最多 12 小时才会出现在上面。想立刻拿到刚发布的版本,可以把索引 URL 钉到不可变 commit(用 `@<commit>` 代替 `@main`),或改用
|
|
115
|
+
`https://raw.githubusercontent.com/gitByteFree/dsh-mermaid-smooth/main/market/index.json`。
|
|
116
|
+
|
|
117
|
+
**方式六:从 DSH 桌面版(Electron)安装**
|
|
118
|
+
|
|
119
|
+
桌面版内置了完整的 DSH Web 应用,因此本插件无需单独的桌面版构建。`desktop` profile 由桌面版独占,只有桌面版自带的 CLI 能管理它 —— npm 全局安装的 `dsh` 会直接拒绝:
|
|
120
|
+
`profile "desktop" is managed exclusively by the Electron application`。
|
|
121
|
+
|
|
122
|
+
1. 先启动一次桌面版,让它初始化 `$DSH_HOME/profiles/desktop`,然后**完全退出**应用。
|
|
123
|
+
2. 从应用菜单 **Manage dsh Command… → Install** 安装 CLI,然后执行:
|
|
124
|
+
|
|
125
|
+
```sh
|
|
126
|
+
dsh plugin --profile desktop add dsh-mermaid-smooth
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
3. 重新打开桌面版即可。也可以通过应用内 **Plugins** 页或方式五的市场索引安装。
|
|
130
|
+
|
|
131
|
+
两端运行时行为一致:成图、滚轮缩放与拖拽、按围栏切换、偏好记忆、主题跟随、复制、SVG 下载、全屏都跑在同一份 Web 客户端里。
|
|
132
|
+
|
|
133
|
+
安装后重启 web 应用(`dsh web` 或你的 `dsh-web` 服务)或重新打开桌面版,使新 bundle 层生效。
|
|
103
134
|
|
|
104
135
|
## 许可
|
|
105
136
|
|
package/icon.svg
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="64" height="64" role="img" aria-label="Mermaid Smooth">
|
|
2
|
+
<rect x="1" y="1" width="62" height="62" rx="14" fill="#111827"/>
|
|
3
|
+
<g fill="none" stroke="#5eead4" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
|
|
4
|
+
<path d="M32 20 L32 28"/>
|
|
5
|
+
<path d="M32 28 L18 28 L18 36"/>
|
|
6
|
+
<path d="M32 28 L46 28 L46 36"/>
|
|
7
|
+
</g>
|
|
8
|
+
<g fill="#1f2937" stroke="#f472b6" stroke-width="2.5">
|
|
9
|
+
<rect x="21" y="8" width="22" height="12" rx="4"/>
|
|
10
|
+
<rect x="9" y="36" width="18" height="12" rx="4"/>
|
|
11
|
+
<rect x="37" y="36" width="18" height="12" rx="4"/>
|
|
12
|
+
</g>
|
|
13
|
+
<g stroke="#5eead4" stroke-width="2" stroke-linecap="round">
|
|
14
|
+
<path d="M14 42 L22 42"/>
|
|
15
|
+
<path d="M42 42 L50 42"/>
|
|
16
|
+
</g>
|
|
17
|
+
</svg>
|
package/locale/en.json
ADDED
package/locale/zh.json
ADDED
package/package.json
CHANGED
|
@@ -1,30 +1,57 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-mermaid-smooth",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"description": "Render mermaid fences in
|
|
3
|
+
"version": "0.2.3",
|
|
4
|
+
"description": "Render mermaid fences in DeepSeek Harness (Web and Desktop) chat as diagrams by default with smooth zoom/pan, per-fence diagram/code toggle at top-right, persisted per-fence preference, dark-mode follow, and full offline (bundled engine, zero CDN). DSH Web 与桌面版对话中的 mermaid 围栏默认成图:丝滑缩放拖拽、图右上角图/文案切换、按围栏记忆偏好、明暗主题跟随、引擎本地打包完全离线。",
|
|
5
5
|
"license": "MIT",
|
|
6
|
+
"author": "chris",
|
|
7
|
+
"homepage": "https://github.com/gitByteFree/dsh-mermaid-smooth#readme",
|
|
6
8
|
"repository": {
|
|
7
9
|
"type": "git",
|
|
8
10
|
"url": "git+https://github.com/gitByteFree/dsh-mermaid-smooth.git"
|
|
9
11
|
},
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/gitByteFree/dsh-mermaid-smooth/issues"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"dsh",
|
|
17
|
+
"dsh-plugin",
|
|
18
|
+
"deepseek-harness",
|
|
19
|
+
"mermaid",
|
|
20
|
+
"diagram",
|
|
21
|
+
"flowchart",
|
|
22
|
+
"markdown",
|
|
23
|
+
"visualization",
|
|
24
|
+
"offline"
|
|
25
|
+
],
|
|
26
|
+
"publishConfig": {
|
|
27
|
+
"access": "public"
|
|
28
|
+
},
|
|
29
|
+
"engines": {
|
|
30
|
+
"dsh": ">=0.2.1-rc.2"
|
|
31
|
+
},
|
|
10
32
|
"type": "module",
|
|
11
33
|
"main": "lib/index.js",
|
|
12
34
|
"exports": {
|
|
13
35
|
".": "./lib/index.js",
|
|
14
36
|
"./client": "./lib/client.js",
|
|
37
|
+
"./locale/*.json": "./locale/*.json",
|
|
38
|
+
"./icon": "./icon.svg",
|
|
15
39
|
"./package.json": "./package.json"
|
|
16
40
|
},
|
|
17
41
|
"files": [
|
|
18
42
|
"lib/index.js",
|
|
19
43
|
"lib/client.js",
|
|
20
44
|
"cordis.patch.yml",
|
|
45
|
+
"icon.svg",
|
|
46
|
+
"locale/*.json",
|
|
21
47
|
"README.md",
|
|
22
48
|
"LICENSE"
|
|
23
49
|
],
|
|
24
50
|
"scripts": {
|
|
25
51
|
"build": "node scripts/build.mjs",
|
|
26
52
|
"prepare": "node scripts/build.mjs",
|
|
27
|
-
"test": "node --test \"test/*.test.mjs\""
|
|
53
|
+
"test": "node --test \"test/*.test.mjs\"",
|
|
54
|
+
"market": "node scripts/market.mjs"
|
|
28
55
|
},
|
|
29
56
|
"devDependencies": {
|
|
30
57
|
"mermaid": "^11.17.2",
|