dsh-vt-gen-ui 1.0.0 → 1.1.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.
Files changed (42) hide show
  1. package/LICENSES/Apache-2.0.txt +222 -0
  2. package/README.md +4 -4
  3. package/SKILL.md +1 -1
  4. package/THIRD_PARTY_NOTICES.md +55 -3
  5. package/docs/CAPABILITY-MAP.md +4 -4
  6. package/docs/MERMAID-EXAMPLES.md +465 -0
  7. package/docs/recon/scaffold.md +3 -3
  8. package/docs/recon/schema.md +2 -2
  9. package/lib/assets/pele.js +150 -0
  10. package/lib/assets/standalone-runtime.js +31 -30
  11. package/lib/client.js +33 -32
  12. package/lib/types/client/asset-loader.d.ts +3 -3
  13. package/lib/types/client/blocks/icon.d.ts +11 -0
  14. package/lib/types/client/diagram-core.d.ts +10 -0
  15. package/lib/types/client/diagram-resolvers.d.ts +20 -0
  16. package/lib/types/client/diagram-types.d.ts +19 -0
  17. package/lib/types/client/icons/caret.d.ts +13 -0
  18. package/lib/types/client/standalone/asset-loader.d.ts +1 -1
  19. package/lib/types/client/stream-skeleton.d.ts +1 -0
  20. package/package.json +6 -2
  21. package/src/client/GenuiBlock.module.css +110 -42
  22. package/src/client/asset-loader.ts +3 -3
  23. package/src/client/asset-pele.ts +13 -0
  24. package/src/client/blocks/advanced.tsx +37 -8
  25. package/src/client/blocks/charts.tsx +3 -2
  26. package/src/client/blocks/icon.tsx +17 -0
  27. package/src/client/diagram-core.ts +108 -0
  28. package/src/client/diagram-resolvers.ts +122 -0
  29. package/src/client/diagram-types.ts +21 -0
  30. package/src/client/dom-fence.tsx +6 -21
  31. package/src/client/icons/caret.tsx +17 -0
  32. package/src/client/mermaid-lazy.ts +14 -4
  33. package/src/client/standalone/asset-loader.ts +1 -1
  34. package/src/client/stream-skeleton.tsx +193 -0
  35. package/tsdown.config.ts +4 -4
  36. package/lib/assets/mermaid.js +0 -3673
  37. package/lib/types/client/mermaid-colors.d.ts +0 -2
  38. package/lib/types/client/mermaid-core.d.ts +0 -9
  39. package/src/client/asset-mermaid.ts +0 -13
  40. package/src/client/mermaid-colors.ts +0 -40
  41. package/src/client/mermaid-core.ts +0 -341
  42. /package/lib/types/client/{asset-mermaid.d.ts → asset-pele.d.ts} +0 -0
@@ -0,0 +1,222 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
203
+
204
+
205
+
206
+
207
+
208
+ ========================================================================
209
+ Apache ECharts Subcomponents:
210
+
211
+ The Apache ECharts project contains subcomponents with separate copyright
212
+ notices and license terms. Your use of the source code for these
213
+ subcomponents is also subject to the terms and conditions of the following
214
+ licenses.
215
+
216
+ BSD 3-Clause (d3.js):
217
+ The following files embed [d3.js](https://github.com/d3/d3) BSD 3-Clause:
218
+ `/src/chart/treemap/treemapLayout.ts`,
219
+ `/src/chart/tree/layoutHelper.ts`,
220
+ `/src/chart/graph/forceHelper.ts`,
221
+ `/src/util/number.ts`
222
+ See `/licenses/LICENSE-d3` for details of the license.
package/README.md CHANGED
@@ -42,16 +42,16 @@ https://vontean.github.io/vt-dsh-plugin/index.json
42
42
  **npm**
43
43
 
44
44
  ```bash
45
- dsh plugin --profile <profile> add dsh-vt-gen-ui@1.0.0
45
+ dsh plugin --profile <profile> add dsh-vt-gen-ui@1.1.0
46
46
  ```
47
47
 
48
48
  **Release tarball**
49
49
 
50
50
  到 [Releases](https://github.com/Vontean/vt-dsh-plugin/releases) 下载
51
- `dsh-vt-gen-ui-1.0.0.tgz`,然后:
51
+ `dsh-vt-gen-ui-1.1.0.tgz`,然后:
52
52
 
53
53
  ```bash
54
- dsh plugin --profile <profile> add /绝对路径/dsh-vt-gen-ui-1.0.0.tgz
54
+ dsh plugin --profile <profile> add /绝对路径/dsh-vt-gen-ui-1.1.0.tgz
55
55
  ```
56
56
 
57
57
  **与上游共存时的切换顺序**(顺序不能反,否则重复注册抛错):先在插件页停用上游,或在 profile 里
@@ -60,7 +60,7 @@ dsh plugin --profile <profile> add /绝对路径/dsh-vt-gen-ui-1.0.0.tgz
60
60
  ```bash
61
61
  # 装本插件前:先去掉上游
62
62
  dsh plugin --profile <profile> remove @changfenhuang/dsh-genui
63
- dsh plugin --profile <profile> add dsh-vt-gen-ui@1.0.0
63
+ dsh plugin --profile <profile> add dsh-vt-gen-ui@1.1.0
64
64
 
65
65
  # 回滚:先去掉本插件,再装回上游
66
66
  dsh plugin --profile <profile> remove dsh-vt-gen-ui
package/SKILL.md CHANGED
@@ -111,7 +111,7 @@ Check CheckCircle Info InfoCircle Warning Error X Plus Minus Circle ArrowDown Ar
111
111
  ### 高级
112
112
  - svg: `{"type":"svg","title":"<user-language title>","height":300,"code":"<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 200 100\"><rect width=\"200\" height=\"100\" fill=\"#534ab7\"/></svg>"}` — 独立 SVG 图片预览;`title`/`height` 可省略,height 为 100–800,code 最多 12,000 字符。必须提供完整 SVG 文档(含 xmlns),建议带 viewBox。使用隔离图片模式,不支持脚本、宿主 CSS 或外部资源;图形无法加载时显示源码和提示。**放在 dsh-ui 围栏中;这不是 ECharts renderer 配置。**
113
113
  - 也可以直接输出 ```svg 代码围栏(不带 dsh-ui 包装):会自动显示为「预览/源码」切换的图形预览,源码可复制;无法解析时保留源码并提示。
114
- - mermaid: `{"type":"mermaid","code":"graph TD\\nA-->B"}` — flowchart/sequence/class/gantt/pie/er/state/journey;主题自动跟随宿主(暗/浅)
114
+ - mermaid: `{"type":"mermaid","code":"graph TD\\nA-->B"}` — 支持 Mermaid 12.1 全图型:flowchart/graph、swimlane、sequenceDiagram、classDiagram、stateDiagram(-v2)、erDiagram、gantt、gitGraph、pie、mindmap、kanban、timeline、journey、quadrantChart、xychart(-beta)、requirementDiagram、sankey(-beta)、architecture-beta、C4*、block(-beta)、radar-beta、treemap(-beta)、packet(-beta)、venn-beta、ishikawa、wardley-beta、cynefin-beta、eventmodeling、usecase-beta、railroad-*、treeView-beta、info、agentflow-beta;主题自动跟随宿主(暗/浅)。**标签里可用 `$$…$$`(KaTeX 排版)与 `@{ icon: "fa:fa-xxx" }`(取插件图标集,如 fa:fa-sparkles / fa:fa-grid)**;**规则类图(时间线/看板/脑图/桑基/象限/xychart)优先用 mermaid 而不是手写坐标**。**易错语法**:`swimlane-beta` 用 `subgraph` 当泳道(无 `lane` 关键字);`usecase-beta` 用 `user(用户)` / `usecase(…)` 圆括号;`eventmodeling` 一个 `tf NN` 帧只能放一条实体,多实体拆成多帧;实体类型只有 `ui` / `command` / `event` / `readmodel`(写 `automation`、`policy` 之类会解析失败);`radar-beta` 曲线是 `curve name{1,5}`(花括号);`xychart-beta` 的 `title` 要引号、坐标轴标签用 ASCII;`requirement`/`component`/`actor` 等**标识符位置必须 ASCII**(中文只能放在引号或链接标签里)
115
115
  - diagram: `{"type":"diagram","kind":"architecture","title":"<user-language title>","variant":"light|dark|editorial","nodes":[...],"edges":[...],"theme":{...}}` — **编辑级品牌图**(移植自 diagram-design 的 27 种视觉类型)。节点: `{"id":"a","label":"<user-language label>","type":"focal|backend|store|external|input|optional|security","x":40,"y":40,"w":128,"h":48,"sub":"<user-language text>","tag":"<user-language text>"}`;边: `{"from":"a","to":"b","label":"<user-language label>","kind":"solid|dashed|accent|link"}`。**规则由渲染器强制**: 正交连接器(r=8 弯折、禁止斜线)、4px 网格、语义 token(paper/ink/muted/accent)、焦点色 ≤2 个、复杂度预算(≤9 节点/≤12 边)、z-order(箭头在节点后)、边标签 6-10px 间隙。27 种 kind:architecture / it-state / flowchart / sequence / state / er / timeline / swimlane / quadrant / radar / loop / nested / tree / org-chart / layers / venn / pyramid / bar / line / gantt / scatter / high-level / process / medallion / data-flow / dp-integration / dp-security-matrix。**坐标类 kind**(architecture/it-state/high-level/process/medallion/data-flow/dp-integration)用 x/y/w/h 精确定位;**规则类 kind** 只给数据自动排版。架构/流程/层次结构优先用 diagram 而非 mermaid(自动布局用 mermaid,编辑级排版用 diagram)。
116
116
  - scene3d: `{"type":"scene3d","title":"...","meshes":[{"shape":"box|sphere|cone|cylinder|torus","color":"#hex?","size":n|[w,h,d]?,"position":[x,y,z]?,"rotation":[rx,ry,rz]?,"scale":n?|[...]?}],"ambient":0-2?,"background":"#hex?"}` — 3D WebGL,可拖拽旋转、滚轮缩放;mesh 数量 1–5 个
117
117
  - quiz: `{"type":"quiz","question":"...","options":[{"label":"...","correct":true?,"feedback":"..."?}],"explanation":"...","id":"..."?,"action":"answer"?}` — 教学问答:点选即判题、可重试;`id` 变化时重置;带 action 时另回传 `{type:'quiz',question,answer,correct}`
@@ -49,7 +49,59 @@ The colour values referenced by the `--dsl-g-*` token layer are *not* copied
49
49
  from that project: they resolve through the host's `--dsw-alias-*` tokens, and
50
50
  the literals in `GenuiBlock.module.css` are last-resort fallbacks.
51
51
 
52
- ## KaTeX / Mermaid / ECharts / three.js
52
+ ## Pele (MIT) — the Mermaid-compatible diagram engine
53
53
 
54
- Those engines are loaded at runtime from their own packages under their own
55
- licenses; they are not vendored into this repository.
54
+ `mermaid` nodes are rendered by [`pele`](https://github.com/obsidianmd/pele)
55
+ 1.13.0 (MIT, `Copyright (c) 2026 Obsidian`) instead of mermaid.js: it parses the
56
+ same Mermaid 12.1 syntax and paints from CSS variables. Pele is built into the
57
+ lazy asset `lib/assets/pele.js`; no source is vendored into this repository.
58
+ Its parsers and grammar files derive from Mermaid (also MIT).
59
+
60
+ ## Bundled engines (built into `lib/`)
61
+
62
+ The build inlines these packages into the shipped bundles. No source is
63
+ vendored into the repository; each package is consumed unmodified from npm at
64
+ build time.
65
+
66
+ | package | version | license | lands in |
67
+ | --- | --- | --- | --- |
68
+ | `pele` | 1.13.0 | MIT | `lib/assets/pele.js` |
69
+ | `katex` | 0.16.47 | MIT | `lib/client.js` |
70
+ | `@apache-echarts/echarts` (`echarts`) | 5.6.0 | **Apache-2.0** | `lib/assets/echarts-core.js`, `lib/assets/echarts-full.js` |
71
+ | `echarts-wordcloud` | 2.1.0 | ISC | `lib/assets/echarts-full.js` |
72
+ | `three` | 0.180.0 | MIT | `lib/assets/three.js` |
73
+ | `mermaid` (Mermaid grammar/spec references only) | — | MIT | not bundled since 1.1.0 |
74
+ | `mdast-util-from-markdown` | 2.0.3 | MIT | `lib/client.js` |
75
+ | `react` / `react-dom` | 18.3.1 | MIT | peer, provided by the host |
76
+
77
+ ### Apache ECharts (Apache-2.0)
78
+
79
+ The bundled ECharts build is distributed under the Apache License, Version 2.0.
80
+ The full license text — including ECharts' own notice about the d3-derived
81
+ source files it carries — is vendored at
82
+ [`LICENSES/Apache-2.0.txt`](./LICENSES/Apache-2.0.txt).
83
+
84
+ Apache ECharts
85
+ Copyright 2017-2025 The Apache Software Foundation
86
+
87
+ This product includes software developed at
88
+ The Apache Software Foundation (http://www.apache.org/).
89
+
90
+ Changes: none. The package is bundled byte-for-byte by the build
91
+ (`tsdown.config.ts`, `assetConfig('echarts-*')`); no ECharts source is patched.
92
+
93
+ ### ISC (`echarts-wordcloud`)
94
+
95
+ Copyright (c) 2017, ecomfe
96
+
97
+ Permission to use, copy, modify, and/or distribute this software for any
98
+ purpose with or without fee is hereby granted, provided that the above
99
+ copyright notice and this permission notice appear in all copies.
100
+
101
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
102
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
103
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
104
+ SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
105
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
106
+ OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
107
+ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
@@ -40,7 +40,7 @@ flowchart LR
40
40
  | --- | --- | --- |
41
41
  | host 半边 | `lib/index.js`(≈190 KB) | 教模型写围栏、注册 `render_ui` / `validate_dsh_ui`、回合末自修、托管懒加载资产、注册 `genui` 技能 |
42
42
  | client 半边 | `lib/client.js`(≈780 KB) | 观察会话 DOM、解析围栏、修复容错、挂载 React 组件、本地交互、状态持久化、面板 dock、导出 |
43
- | 懒加载资产 | `lib/assets/*.js` | 重型引擎按需下载:mermaid 3.4 MB、three 700 KB、echarts-core 588 KB / full 1.04 MB、icons 969 KB、standalone 1.1 MB |
43
+ | 懒加载资产 | `lib/assets/*.js` | 重型引擎按需下载:pele 700 KB、three 700 KB、echarts-core 588 KB / full 1.04 MB、icons 969 KB、standalone 1.1 MB |
44
44
  | 技能 | `SKILL.md` | 48 KB 的模型手册:语法铁律、组件词汇、内容→组件映射、编排范式、6 个完整范例 |
45
45
  | 构建 | `tsdown.config.ts` | 8 个产物:host、client、standalone、5 个 IIFE 资产;CSS Modules 在构建期内联成 `<style>` |
46
46
 
@@ -71,7 +71,7 @@ flowchart LR
71
71
 
72
72
  **交互与表单(12)**:`button` `input`(`action` on blur/Enter、IME 安全) `textarea` `select` `checkbox` `radio` `switch` `slider`(300 ms 尾部防抖) `submit`(**本地判卷** + groups 进度) `quiz`(单选即判、可重做) `link` `copy`(可展开预览)
73
73
 
74
- **高级(10)**:`callout` `diff` `json` `code` `mermaid`(懒加载 + 视口触发 + 自动修复) `diagram`(editorial 风格 SVG 架构图,自研布局引擎) `scene3d`(three.js) `tabs` `accordion` `blocks`
74
+ **高级(10)**:`callout` `diff` `json` `code` `mermaid`(Pele 引擎,支持 Mermaid 12.1 全图型;样例见 [`MERMAID-EXAMPLES.md`](./MERMAID-EXAMPLES.md)) `diagram`(editorial 风格 SVG 架构图,自研布局引擎) `scene3d`(three.js) `tabs` `accordion` `blocks`
75
75
 
76
76
  ---
77
77
 
@@ -141,7 +141,7 @@ flowchart LR
141
141
  | CSS | CSS Modules 在构建期被 `lightningcss` 转换为字符串 + 注入 `<style data-plugin-css>`,**不进 bundle 的 CSS 通道** |
142
142
  | 资产 | 由 host 的 `webserver` 服务注册前缀路由 `/plugins/<包名>/assets/*`,client 用 `?rev=` 缓存击穿 |
143
143
  | **共存风险** | 新旧插件**不能同时启用**:都会注入同一个 system prompt 段、都观察 `dsh-ui` 围栏 DOM、都注册同名工具与技能 → 双渲染 / 工具冲突。切换时必须先禁用 `genui` 这一 row |
144
- | 许可 | MIT。fork 必须保留 `LICENSE` 与 `THIRD_PARTY_NOTICES.md`(mermaid / three / echarts / katex 等) |
144
+ | 许可 | MIT。fork 必须保留 `LICENSE` 与 `THIRD_PARTY_NOTICES.md`(pele / three / echarts / katex 等) |
145
145
 
146
146
  ---
147
147
 
@@ -167,5 +167,5 @@ flowchart LR
167
167
  | 构建 | `npx tsdown` 通过 → `lib/index.js` + `lib/client.js` + `lib/assets/*`(8 个产物) |
168
168
  | 类型检查 | `npx tsc -p tsconfig.json` 通过 → `lib/types/**` |
169
169
  | 清单 | `package.json`(`dsh.bundle` / `dsh.client`)+ `cordis.patch.yml`(insert id `dsh-vt-gen-ui`) |
170
- | 装机 | **已切换**(2026-11-01):旧插件 `@changfenhuang/dsh-genui` 已禁用 → 新插件 `dsh-vt-gen-ui@0.1.0` 已 link 安装(`application: applied`)。三条验证:`render_ui`/`validate_dsh_ui` 工具在位、`genui` 技能回到技能目录、client 端 `genui-panel` 已占位 `conversation.input.dock`、`/plugins/dsh-vt-gen-ui/assets/mermaid.js` 返回 200 |
170
+ | 装机 | **已切换**(2026-11-01):旧插件 `@changfenhuang/dsh-genui` 已禁用 → 新插件 `dsh-vt-gen-ui@0.1.0` 已 link 安装(`application: applied`)。三条验证:`render_ui`/`validate_dsh_ui` 工具在位、`genui` 技能回到技能目录、client 端 `genui-panel` 已占位 `conversation.input.dock`、`/plugins/dsh-vt-gen-ui/assets/pele.js` 返回 200 |
171
171
  | 回滚 | `plugin_manager set_bundle dsh-vt-gen-ui enabled=false` → 再 `set_bundle @changfenhuang/dsh-genui enabled=true`(顺反了会因重复注册抛错) |