@linxin666/dsh-client-ui-skin-center 0.4.10 → 0.4.12
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.i18n.yaml +2 -2
- package/README.md +7 -6
- package/README.zh.md +6 -6
- package/contracts/semantic-attrs-v1.md +8 -5
- package/lib/client.js +872 -613
- package/lib/client.js.map +1 -1
- package/package.json +1 -1
package/README.i18n.yaml
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# node scripts/verify-docs.mjs --write <dir>
|
|
5
|
-
README.md:
|
|
6
|
-
README.zh.md:
|
|
5
|
+
README.md: fcc6aab11e1c45af6a3dab1b1242a19d7127c172
|
|
6
|
+
README.zh.md: 90b60538871a0312ce9fbfdc811b3cc8e8ceebda
|
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ English | [中文](README.zh.md)
|
|
|
15
15
|
<em>Themes & Skins · Frosted Glass Blur · Custom Themes · Live Try-On · Wallpaper Engine via its dedicated plugin</em>
|
|
16
16
|
</p>
|
|
17
17
|
|
|
18
|
-
`@linxin666/dsh-client-ui-skin-center` (cordis plugin id `ui-skin-center`) is the single skin package of the dsh Web GUI: it puts the skin list / try-on / apply into the real GUI as the first-level Skin Center
|
|
18
|
+
`@linxin666/dsh-client-ui-skin-center` (cordis plugin id `ui-skin-center`) is the single skin package of the dsh Web GUI: it puts the skin list / try-on / apply into the real GUI as the Skins TAB under Settings → Web Extensions (or a standalone first-level Skin Center section without that parent), listing only installed skins, and it is the only loader and renderer for skins. A skin is a pure asset directory — no package.json, no npm publish, no cordis wiring — that couples only to the skin-center contract (`contracts/`); the skin center absorbs every official-DSH coupling behind that contract. The card carries its own enable switch (off disables try-on, apply and the background controls).
|
|
19
19
|
|
|
20
20
|
- List: shows "官方默认" (official default) plus every installed skin in the catalog with its name, tagline and accent color; the currently active target carries the Active marker. The catalog merges two sources: the default skin shipped inside this package (`skins/blue-fantasy/`) and user skins dropped into `$DSH_HOME/skins/<id>/` (a user skin with the same id shadows the built-in one). Every other skin of the collection is a market item: install it on demand from the DSH Market store (one-click install) into `$DSH_HOME/skins/<id>/`, where this same catalog manages it as a user skin — no restart, reopen the card or reload to pick it up. Skins whose `skin.json` fails validation are excluded fail-closed and reported as catalog diagnostics.
|
|
21
21
|
- Custom theme: the final card is a user-level theme derived from the official stock look, separate from both the official-default card and catalog skins. Light and dark profiles independently edit accent, background, foreground and contrast (0–100), with live try-on, apply, current-mode reset and reload persistence. Its generated CSS is limited to an audited official-token allowlist; it cannot accept selectors, arbitrary CSS or asset URLs. Catalog skin definitions are never modified, and an active catalog skin automatically suppresses the custom-theme layer.
|
|
@@ -69,7 +69,7 @@ skin-center is a self-contained bundle meeting the official DSH plugin standard
|
|
|
69
69
|
|
|
70
70
|
Wallpaper Engine support is **not bundled** here. It lives in its own plugin, [dsh-wallpaper-engine](https://github.com/elysia395/dsh-wallpaper-engine) (`dsh-plugin-wallpaper-engine`), which owns the wallpaper library, the video / web / scene rendering paths, the wallpaper settings surface and the glass over the wallpaper. It is the **recommended** Workshop item for wallpapers, and the skin center card installs it for you.
|
|
71
71
|
|
|
72
|
-
**One-click install**: open 设置 →
|
|
72
|
+
**One-click install**: open 设置 → Web 扩展 → 皮肤 and press **Install** on the card's wallpaper notice. The install goes through whichever plugin-management face the running host publishes — the official in-process plugin manager when it is there (the same call the official Plugins page makes, and the only writer on the packaged Desktop client), otherwise the family plugin-manager face. A host that publishes neither keeps the copy-command fallback.
|
|
73
73
|
|
|
74
74
|
By hand, the equivalent is:
|
|
75
75
|
|
|
@@ -101,9 +101,10 @@ interface. The Claude Code Desktop theme is one — it lives in [dsh-claude-styl
|
|
|
101
101
|
(`dsh-claude-style`), which repaints the shell, sidebar, composer and conversation on its own. It is a
|
|
102
102
|
**separate package**: nothing here bundles it, versions it or ships its files.
|
|
103
103
|
|
|
104
|
-
Such a look is still a **skin you can select**. It gets its own
|
|
105
|
-
|
|
106
|
-
like any other skin: try it on, apply it, and it is
|
|
104
|
+
Such a look is still a **skin you can select**. It gets its own card at the top of the page, under
|
|
105
|
+
**Looks from other plugins** and beside the Wallpaper Engine card, carries a `Plugin theme` badge,
|
|
106
|
+
and behaves like any other skin while the skin center is on: try it on, apply it, and it is
|
|
107
|
+
remembered across a reload. It does not take a tile
|
|
107
108
|
in the grid: a grid cell exists to show a preview image, and this package holds none for a look another
|
|
108
109
|
plugin paints. What it never does is paint from here — the plugin paints it, and this package keeps
|
|
109
110
|
the selection.
|
|
@@ -183,7 +184,7 @@ skins/skin-center/
|
|
|
183
184
|
|
|
184
185
|
## Acceptance checklist
|
|
185
186
|
|
|
186
|
-
- [x] The skin-center section appears in 设置 →
|
|
187
|
+
- [x] The skin-center section appears in 设置 → Web 扩展 → 皮肤 without console errors
|
|
187
188
|
- [x] The list shows the official default plus every catalog skin; the active one is marked; invalid skins surface as diagnostics
|
|
188
189
|
- [x] Try-on takes effect immediately and Exit restores the committed skin; only one skin is ever on the page
|
|
189
190
|
- [x] One-click apply switches atomically with no reload; a later page load boots straight into the skin (no FOUC)
|
package/README.zh.md
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<em>主题换肤 · 毛玻璃高斯模糊 · 自定义深浅色配色 · 创意工坊即时试穿 · Wallpaper Engine 由专用插件提供</em>
|
|
16
16
|
</p>
|
|
17
17
|
|
|
18
|
-
`@linxin666/dsh-client-ui-skin-center`(cordis 插件 id `ui-skin-center`)是 dsh Web GUI 唯一的皮肤包:它把皮肤列表 / 试穿 /
|
|
18
|
+
`@linxin666/dsh-client-ui-skin-center`(cordis 插件 id `ui-skin-center`)是 dsh Web GUI 唯一的皮肤包:它把皮肤列表 / 试穿 / 应用放进「设置 → Web 扩展 → 皮肤」TAB(父级缺席时保留一级「皮肤中心」分区,只列已安装皮肤),并且是所有皮肤的唯一加载器与渲染器。皮肤是纯资产目录——没有 package.json、不发 npm、不接 cordis 接线——只与皮肤中心契约(`contracts/`)耦合;皮肤中心把对官方 DSH 的全部耦合吸收在契约之后。卡片自带总开关(关闭即停用试穿、应用与背景控制)。
|
|
19
19
|
|
|
20
20
|
- 列表:展示「官方默认」加目录册里已安装的皮肤(名称、标语、强调色),当前应用目标带「使用中」标记。目录册合并两个来源:随本包内置的默认皮肤(`skins/blue-fantasy/`)与放进 `$DSH_HOME/skins/<id>/` 的用户皮肤(同 id 时用户皮肤遮蔽内置皮肤)。皮肤集中的其余皮肤都是市场条目:在 DSH 市场商店一键按需安装到 `$DSH_HOME/skins/<id>/`,即由同一目录册作为用户皮肤管理——无需重启,重开卡片或刷新页面即收录。`skin.json` 校验失败的皮肤按 fail-closed 排除,并作为目录诊断上报。
|
|
21
21
|
- 自定义主题:列表末尾提供一张基于官方默认外观派生的用户级主题卡,与「官方默认」及目录册皮肤相互独立。浅色、深色分别编辑强调色、背景色、前景色和对比度(0–100),支持即时试穿、应用、恢复当前模式默认值和刷新持久化。生成的 CSS 只能覆盖经审计的官方 token 白名单,不接收选择器、任意 CSS 或资源 URL;不会修改任何第三方皮肤定义,目录册皮肤激活时自定义主题层自动停用。
|
|
@@ -69,7 +69,7 @@ dsh plugin --profile web add @linxin666/dsh-client-ui-skin-center
|
|
|
69
69
|
|
|
70
70
|
Wallpaper Engine 支持**不再内置**在本包。它由独立插件 [dsh-wallpaper-engine](https://github.com/elysia395/dsh-wallpaper-engine)(`dsh-plugin-wallpaper-engine`)提供,壁纸库、视频 / 网页 / 场景三条渲染路径、壁纸设置面与壁纸之上的玻璃都归它管。它是壁纸方面的**推荐**工坊条目,皮肤中心卡片可直接帮你装上。
|
|
71
71
|
|
|
72
|
-
**一键安装**:打开 设置 →
|
|
72
|
+
**一键安装**:打开 设置 → Web 扩展 → 皮肤,在卡片的壁纸提示条上点「一键安装」。安装走宿主当前发布的插件管理面——存在官方进程内插件管理器时优先用它(与官方插件页同一个调用,也是打包版桌面客户端上唯一的写入者),否则退回家族插件管理器面;两者都没有时保留复制命令的兜底。
|
|
73
73
|
|
|
74
74
|
手工等价命令:
|
|
75
75
|
|
|
@@ -101,9 +101,9 @@ dsh plugin --profile web add dsh-plugin-wallpaper-engine
|
|
|
101
101
|
自行重绘外壳、侧栏、输入区与对话区。它是一个**独立包**:本仓库不捆绑、不接管版本,也不
|
|
102
102
|
分发它的文件。
|
|
103
103
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
104
|
+
这样的外观同样是**可以选用的皮肤**。它在页面顶部「插件提供的外观」分组里独占一张卡片,与
|
|
105
|
+
Wallpaper Engine 卡片并排,带 `插件皮肤` 标记;皮肤中心开启时,用起来与其他皮肤完全一致:试穿、
|
|
106
|
+
应用,刷新后依然保留。它不占网格里的方块位:那一格是为了放预览图,而这套外观由别的插件绘制,本包里没有
|
|
107
107
|
它的截图。区别只在于它不由本包绘制——由那个插件绘制,本包只保管这个选择。
|
|
108
108
|
|
|
109
109
|
- **插件还没装时这一行就在。** 在该行点「一键安装插件」即可(与壁纸提示同一套一键路径:宿主
|
|
@@ -176,7 +176,7 @@ skins/skin-center/
|
|
|
176
176
|
|
|
177
177
|
## 验收清单
|
|
178
178
|
|
|
179
|
-
- [x] 皮肤中心出现在 设置 →
|
|
179
|
+
- [x] 皮肤中心出现在 设置 → Web 扩展 → 皮肤,无控制台报错
|
|
180
180
|
- [x] 列表展示官方默认加目录册全部皮肤;当前使用者有标记;非法皮肤以诊断形式呈现
|
|
181
181
|
- [x] 试穿即时生效,退出完整恢复已提交皮肤;页面上永远只有一套皮肤
|
|
182
182
|
- [x] 一键应用原子切换、无需刷新;后续页面加载直接以该皮肤启动(无 FOUC)
|
|
@@ -124,6 +124,9 @@ family / 插件区域:
|
|
|
124
124
|
| `summon-button` | pet | 召唤钮;`[data-testid="pet-summon"]` |
|
|
125
125
|
| `preset-panel` | preset-center | 创意工坊「预设」标签页面板根;`[data-dsh-plugin="preset-center"] [data-dsh-part="preset-panel"]` |
|
|
126
126
|
| `plugin-item` | web-ui-settings | 家族插件设置卡;`[data-slot="web-ui.plugin.item"]` 内 entry |
|
|
127
|
+
| `extensions` | web-ui-settings | 「Web 扩展」父级根;一级 `settings.section` id `web-ui-plugins` 的内容容器 |
|
|
128
|
+
| `tabs` / `tab` / `panel` | web-ui-settings | 「Web 扩展」二级 TAB 导航、TAB 按钮与当前页面容器;`[role="tablist"]` / `[role="tab"]` / `[role="tabpanel"]` |
|
|
129
|
+
| `panel` | skin-center | 皮肤设置卡根;`[data-dsh-plugin="skin-center"][data-dsh-part="panel"]` |
|
|
127
130
|
| `tab-bar` / `tab` | skill-explorer | 技能中心页签条/页签(中间列面板,同 ssh);`[data-dsh-plugin="skill-explorer"] [data-dsh-part="tab-bar"]` / `[data-dsh-plugin="skill-explorer"] [data-dsh-part="tab"]` |
|
|
128
131
|
| `skill-row` | skill-explorer | 技能卡行;`[data-dsh-plugin="skill-explorer"] [data-dsh-part="skill-row"]` |
|
|
129
132
|
| `filter-bar` | skill-explorer | 技能列表筛选条(搜索框 + 工作区选择 + 刷新);`[data-dsh-plugin="skill-explorer"] [data-dsh-part="filter-bar"]` |
|
|
@@ -195,16 +198,16 @@ shell 的 `[class*="panelGlyph"]` 内)。shell 目前不把 entry id 透传到
|
|
|
195
198
|
| `task-board` | dsh-task-board | `[data-dsh-taskboard-view]` / 面板行字形 `[data-dsh-panel-entry="task-board"]` / `sidebar.panellist` entry id |
|
|
196
199
|
| `ssh` | dsh-ssh | `[data-dsh-ssh-view]` / 面板行字形 `[data-dsh-panel-entry="ssh"]` |
|
|
197
200
|
| `git-graph` | dsh-git-graph | slot entry id `git-graph`;`[data-gitgraph-chip-anchor]` / `[data-gitgraph-dialog]` |
|
|
198
|
-
| `pet` | dsh-pet | `[data-dsh-pet-root]
|
|
201
|
+
| `pet` | dsh-pet | `[data-dsh-pet-root]`;设置页 `[data-dsh-plugin="pet"]`(Web 扩展 keyed id `pet`,独立安装时为一级 settings.section id `pet`,只列内置与已安装宠物) |
|
|
199
202
|
| `remote-web-ui` | dsh-remote-web-ui | slot entry id `remote-web-ui` |
|
|
200
203
|
| `update` | dsh-update | footer action slot entry id `update`;`[data-dsh-plugin="update"]`(面板根 + 入口触发器) |
|
|
201
|
-
| `web-ui-settings` | dsh-web-settings | settings.section id `web-ui-plugins` |
|
|
204
|
+
| `web-ui-settings` | dsh-web-settings | 一级 settings.section id `web-ui-plugins`;`[data-dsh-plugin="web-ui-settings"][data-dsh-part="extensions"]` 父级根 |
|
|
202
205
|
| `skill-explorer` | dsh-skill-explorer | `[data-dsh-skill-explorer-view]` / 面板行字形 `[data-dsh-panel-entry="skill-explorer"]` |
|
|
203
|
-
| `dsh-web-ui-market` | dsh-market |
|
|
204
|
-
| `skin-center` | skins/skin-center |
|
|
206
|
+
| `dsh-web-ui-market` | dsh-market | 创意工坊商店页 `[data-dsh-plugin="dsh-web-ui-market"]`(Web 扩展 keyed id `dsh-workshop`,独立安装时为一级 settings.section id `dsh-workshop`),商店卡与目录条目容器 |
|
|
207
|
+
| `skin-center` | skins/skin-center | 设置卡 `[data-dsh-plugin="skin-center"]`(Web 扩展 keyed id `skin-center`,独立安装时为一级 settings.section id `skin-center`,列已安装皮肤,属内置源时显式标记) |
|
|
205
208
|
| `session-id` | dsh-session-id | footer action slot entry id `session-id`;`[data-dsh-plugin="session-id"]`(面板 overlay 根 + 入口触发器) |
|
|
206
209
|
| `message-edit` | dsh-message-edit | `conversation.chat.turnTail` slot entry id `message-edit`;`[data-dsh-plugin="message-edit"]`(触发按钮 + 内联编辑器根) |
|
|
207
|
-
| `usage` | dsh-usage |
|
|
210
|
+
| `usage` | dsh-usage | 设置页 `[data-dsh-plugin="usage"]`(Web 扩展 keyed id `dsh-usage`,独立安装时为一级 settings.section id `dsh-usage`);侧栏底部速览卡容器 `[data-dsh-usage-foot-card]` |
|
|
208
211
|
| `preset-center` | dsh-preset-center | 创意工坊卡片的「预设」标签页面板(`dsh-workshop.panel` keyed 槽 key `preset`);`[data-dsh-plugin="preset-center"]` |
|
|
209
212
|
| `liangshen` | dsh-liangshen | 首页输入框内的梁神模式拨杆;`[data-dsh-plugin="liangshen"][data-dsh-part="lever"]`,slot entry id `liangshen-lever` |
|
|
210
213
|
| `browser-view` | dsh-browser-view | 右栏标签页类型 id `@linxin666/dsh-client-ui-browser-view`(`sidebar.right.pane.tab` 与 `.title` 的 key);`[data-dsh-plugin="browser-view"]`(面板根 + 会话头触发器);chip 内自有部分 `[data-dsh-part="tab-title"]` |
|