@changfenhuang/dsh-genui 0.9.2 → 0.9.6
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 +23 -0
- package/README.md +11 -0
- package/README.zh-CN.md +17 -0
- package/lib/client.js +3 -3
- package/lib/index.js +11 -4
- package/lib/types/client/TemplateDrawer.d.ts +7 -0
- package/lib/types/client/achievement-store.d.ts +35 -0
- package/lib/types/client/achievement-toast.d.ts +2 -0
- package/lib/types/client/achievements.d.ts +48 -0
- package/lib/types/client/panel.d.ts +4 -1
- package/lib/types/client/templates.d.ts +22 -0
- package/package.json +1 -1
- package/src/client/GenuiBlock.module.css +151 -14
- package/src/client/GenuiBlock.tsx +16 -1
- package/src/client/PlotBlock.tsx +23 -10
- package/src/client/TemplateDrawer.module.css +152 -0
- package/src/client/TemplateDrawer.tsx +137 -0
- package/src/client/achievement-store.ts +151 -0
- package/src/client/achievement-toast.tsx +68 -0
- package/src/client/achievements.ts +111 -0
- package/src/client/blocks/advanced.tsx +36 -4
- package/src/client/guard.ts +20 -4
- package/src/client/index.tsx +13 -0
- package/src/client/panel.tsx +109 -10
- package/src/client/templates.ts +280 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.9.6] - 2026-08-28
|
|
4
|
+
### 兼容性
|
|
5
|
+
- **dsh 0.1.2-alpha.1**:真机验收改为读取新版 Web 启动时生成的一次性令牌地址,先建立浏览器登录态,再按启动图公告的不可变组合地址检查插件资源;后台启动显式使用 `--no-open`,不再误开用户浏览器。插件运行代码和宿主配置契约无需兼容层,也未修改 dsh 本体;官方标签源码构建在 Node 24.13 下完成 macOS 真机页面激活,启动图资源返回 200。Node 24.11 会令该宿主启动图为空,验收与本机入口已固定使用 24.13。
|
|
6
|
+
|
|
7
|
+
## [0.9.5] - 未发布
|
|
8
|
+
### 新增
|
|
9
|
+
- **探索成就(PR #66)**:12 个本地成就(从「初次相见」到隐藏传说「蓝图之魂」),面板 header「成就」按钮打开成就页(由 `dsh-ui` spec 自渲染,dogfooding)。埋点只统计使用事件计数(fence 渲染/交互回传/面板出现/模板试用),去重指纹以哈希形式存储,**localStorage 绝不保存消息或界面内容**;解锁时右下角 toast 提示(3.6s 自动消退),隐藏成就在解锁前显示「?」。
|
|
10
|
+
|
|
11
|
+
## [0.9.4] - 未发布
|
|
12
|
+
### 新增
|
|
13
|
+
- **GenUI 模板中心(PR #66,新手引导)**:面板 header 新增「模板」按钮,打开分类模板抽屉(11 个示例:仪表盘/对比表/引导步骤/测验/趋势图/标签页/清单/FAQ/架构图/3D 场景/文件树)。每个模板支持内嵌实时预览(demo spec 由 GenUI 自身渲染)、「试用」(把自然语言指令插入 composer 草稿,走 `conversation.input.for` 标准通道)与「复制指令」;首次出现面板内容时显示一次性 6 秒提示(localStorage 幂等)。
|
|
14
|
+
|
|
15
|
+
## [0.9.3] - 2026-08-27
|
|
16
|
+
### 发布
|
|
17
|
+
- **首次经 GitHub Actions 自动发布到 npm(issue #59,PR #61)**:新增 `.github/workflows/release.yml`——GitHub Release 发布时以 OIDC Trusted Publishing 构建并推送 npm(无需仓库内存放 NPM_TOKEN),tag 与 `package.json` 版本强校验,发布前完整执行 `pnpm run check` + verify-pack + lib 一致性门禁;含防回退保护:目标版本低于已发布 `latest` 时拒绝发布。DSH Desktop 插件市场从此可直接安装/更新精确版本。
|
|
18
|
+
|
|
19
|
+
### 修复
|
|
20
|
+
- **quiz 字符串选项兼容(PR #60)**:选项为字符串时按文本判定 answer;无法恢复出合法选项的 quiz 节点整体丢弃而非渲染残缺 UI。
|
|
21
|
+
- **表格入场动画闪屏修复(PR #56)**:reveal 动画结束后释放 transform,悬停高亮不再触发整卡重绘闪烁。
|
|
22
|
+
- **plot 滚轮缩放不再穿透(PR #64)**:绘图区滚轮缩放时锁定事件,外层对话框不再跟随滚动。
|
|
23
|
+
- **窄卡片评分布局(PR #65)**:判题行纵向堆叠,答案在窄卡片中保持可读。
|
|
24
|
+
- **copy 芯片剪贴板回退(PR #51)**:剪贴板写入被拒后重试回退通道,仅真实写入成功才播报「已复制」。
|
|
25
|
+
|
|
3
26
|
## [0.9.2] - 2026-08-24
|
|
4
27
|
### 文档
|
|
5
28
|
- 在中英文 README 中补充原生 `npm install @changfenhuang/dsh-genui` 命令,并明确它只添加 Node 依赖;安装并激活 DSH 插件仍使用 `dsh plugin add`。
|
package/README.md
CHANGED
|
@@ -115,6 +115,17 @@ npm install @changfenhuang/dsh-genui
|
|
|
115
115
|
|
|
116
116
|
> ⚠️ **Don't use `link:` on a freshly cloned directory** — `link:` does not install the plugin's dependencies (mermaid / three / react), so the renderer will break. Use the git URL form above; reserve `link:` for local development iteration (see below).
|
|
117
117
|
|
|
118
|
+
### Migrating from the old `@omdsh-dev` package name
|
|
119
|
+
|
|
120
|
+
If you installed from `github:omdsh-dev/dsh-genui` before v0.9.2, pnpm may keep the dependency under the old `@omdsh-dev/dsh-genui` key even though the repository now declares `@changfenhuang/dsh-genui`. The loader resolves plugins from the profile's dependency keys, so a later reinstall can then fail with `Cannot find package '@changfenhuang/dsh-genui'`. Re-add the plugin under its current package name:
|
|
121
|
+
|
|
122
|
+
```sh
|
|
123
|
+
dsh plugin --profile web remove @omdsh-dev/dsh-genui
|
|
124
|
+
dsh plugin --profile web add @changfenhuang/dsh-genui
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
This migration is required once for old GitHub-spec installs. New npm and GitHub installs created with the commands above use the current dependency key.
|
|
128
|
+
|
|
118
129
|
### Verify the install in 60 seconds
|
|
119
130
|
|
|
120
131
|
After the command completes, restart dsh web and hard-refresh the browser. In a **new** session, say:
|
package/README.zh-CN.md
CHANGED
|
@@ -115,6 +115,17 @@ npm install @changfenhuang/dsh-genui
|
|
|
115
115
|
|
|
116
116
|
> ⚠️ **别用 `link:` 装一个刚 clone 的目录**——`link:` 不会安装插件的依赖(mermaid / three / react),装完渲染器会挂。请用上面的 git URL 方式;只有本地开发迭代才用 link:(见下文)。
|
|
117
117
|
|
|
118
|
+
### 从旧 `@omdsh-dev` 包名迁移
|
|
119
|
+
|
|
120
|
+
如果你在 v0.9.2 之前通过 `github:omdsh-dev/dsh-genui` 安装过,pnpm 可能仍把依赖保存在旧的 `@omdsh-dev/dsh-genui` 键下,但仓库当前声明的包名已经是 `@changfenhuang/dsh-genui`。加载器按 profile 的依赖键解析插件,后续重装时就可能报 `Cannot find package '@changfenhuang/dsh-genui'`。请用当前包名重新添加一次:
|
|
121
|
+
|
|
122
|
+
```sh
|
|
123
|
+
dsh plugin --profile web remove @omdsh-dev/dsh-genui
|
|
124
|
+
dsh plugin --profile web add @changfenhuang/dsh-genui
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
这次迁移只针对改名前留下的 GitHub 源安装。此后使用上面的 npm 或 GitHub 命令新装,都会采用当前依赖键。
|
|
128
|
+
|
|
118
129
|
### 60 秒验证安装
|
|
119
130
|
|
|
120
131
|
命令完成后,重启 dsh web 并对浏览器硬刷新。在**新**会话中输入:
|
|
@@ -175,6 +186,12 @@ dsh plugin --profile web add link:$PWD
|
|
|
175
186
|
- **可访问性**:tabs/折叠/开关/进度条带完整 ARIA 与键盘导航(方向键切页、Home/End 跳转)
|
|
176
187
|
- **零打扰**:不装插件时围栏只是代码块,不报错、不污染会话
|
|
177
188
|
|
|
189
|
+
## 🏆 新手引导:模板中心与探索成就(0.9.4+)
|
|
190
|
+
|
|
191
|
+
- **模板中心**:会话面板 dock 顶部的「模板」按钮——11 个分类示例(仪表盘/方案对比/上手流程/随堂测验/趋势图/标签页/清单/FAQ/架构图/3D/文件树),点击即内嵌预览(示例由 GenUI 本身渲染),「试用」一键把指令插入输入框、发送即让模型生成;「复制指令」可带走。
|
|
192
|
+
- **探索成就**:同一 dock 的「成就」按钮——12 个成就(初次相见 → 蓝图之魂),按渲染/交互/面板/模板埋点计数,解锁弹 toast,成就页由 `dsh-ui` 渲染自己的列表;只存计数(localStorage),绝不读取消息内容;隐藏成就(传说)解锁前显示「?」。
|
|
193
|
+
- **首次提示**:第一块面板出现时显示 6 秒一次性提示(指向「模板」按钮),不打扰式引导。
|
|
194
|
+
|
|
178
195
|
组件 JSON 语法见 [SKILL.md](./SKILL.md)(也可复制到 `~/.dsh/skills/genui/` 增强模型使用)。
|
|
179
196
|
|
|
180
197
|
## 📄 示例
|