dsh-islands-ui 1.1.0 → 1.1.1
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 +19 -0
- package/README.en.md +16 -11
- package/README.md +18 -13
- package/client.js +554 -167
- package/docs/host-contracts.md +49 -0
- package/package.json +7 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.1.1 — 2026-11-14
|
|
4
|
+
|
|
5
|
+
### 界面
|
|
6
|
+
|
|
7
|
+
- Windows 端不再使用自绘顶栏:工作区折叠沿用标题栏左上角的原生侧栏开关,右侧栏开关、底部面板入口等工具留在 DSH 原生的会话头位置,岛屿直接接在原生标题栏下方;macOS / Linux 保持 40px 顶栏和顶栏内的右侧工具。
|
|
8
|
+
|
|
9
|
+
### 兼容性
|
|
10
|
+
|
|
11
|
+
- 样式与 DOM 查询不再依赖 DSH 构建的哈希类名。新增 `src/host/runtime.js`:宿主契约、本地名提取、区域/部件表和遍历器;样式统一读 `data-islands-part` 与 `data-slot`、`data-phase` 等公开契约。宿主重新构建改变哈希时无需更新;宿主改本地名时对应规则安静失效,改部件表一行即可恢复。
|
|
12
|
+
- 删除按 DSH 版本选择的 `src/variants/scroll.css` 与版本方言表;rc.1/rc.2 的侧栏结构差异由同一张样式表按部件是否存在处理。
|
|
13
|
+
- 兼容门禁改为校验核心契约与核心部件;单个装饰部件缺失不再关闭整个皮肤。设置页导航改用部件查询,设置入口优先点击原生 settings 触发器。
|
|
14
|
+
- 新增 `npm run check:css`、`check:parts` 与 `node --test`;构建会拒绝哈希类名、`[class*=...]`、未定义部件和作用域外的宿主选择器。
|
|
15
|
+
- 第三方 dsh-better-sidebar 的底部工作台规则移到 `src/60-peers.css`;dsh-sidenote 的内部类名规则移除。
|
|
16
|
+
|
|
17
|
+
### 修复
|
|
18
|
+
|
|
19
|
+
- 适配 DSH 0.2.2-rc.3 新增的 `newSessionRow` 包装:新建会话行重新作为侧栏网格的第二行项,修复新建会话按钮消失、图标与左侧栏 home 图标重叠的问题。
|
|
20
|
+
- 注册 `islands.model.open` 时补上 `aliases: []`,修复 rc.2 Web 端快捷键参考组件读取 `row.aliases` 时的 `TypeError`。
|
|
21
|
+
|
|
3
22
|
## 1.1.0 — 2026-11-13
|
|
4
23
|
|
|
5
24
|
### 界面
|
package/README.en.md
CHANGED
|
@@ -65,7 +65,7 @@ The skin is a client-only style layer. Pinning helpers, the pinned shelf and the
|
|
|
65
65
|
| Canvas | Solid `#f7f7f7` (dark `#0f1012`), opaque, no blur |
|
|
66
66
|
| Islands | White / dark-gray surfaces, 16–20px radius, 1px hairline, no shadows |
|
|
67
67
|
| Spacing | 5px between every island, including the bottom panel |
|
|
68
|
-
| Top bar | 40px window strip; macOS clears the traffic lights,
|
|
68
|
+
| Top bar | 40px window strip hosting the conversation tools and the right-panel toggle; macOS clears the traffic lights, Linux starts at 8px below the native title bar. Windows renders no island top bar: the caption row keeps the native sidebar toggle and the right-hand tools stay in the conversation header |
|
|
69
69
|
| Accent | Brand blue by default; purple / green / orange / pink / red presets or any custom color |
|
|
70
70
|
|
|
71
71
|
---
|
|
@@ -75,10 +75,10 @@ The skin is a client-only style layer. Pinning helpers, the pinned shelf and the
|
|
|
75
75
|
| Platform | Status |
|
|
76
76
|
| --- | --- |
|
|
77
77
|
| macOS | ✅ Tested |
|
|
78
|
-
| Windows | 🟡
|
|
78
|
+
| Windows | 🟡 Native title-bar layout (no island top bar), rail, right-hand native header tools, settings gear and model picker adapted; **not tested on a physical Windows machine** |
|
|
79
79
|
| Linux | 🟡 Uses the same top bar and rail; **not tested** |
|
|
80
80
|
|
|
81
|
-
On Windows the
|
|
81
|
+
On Windows the island top bar is not rendered and the islands sit directly below the native title bar. The workspace collapse uses DSH's own sidebar button in the caption row's top-left corner, while the right-panel toggle, bottom-panel entry and session tools stay in DSH's native conversation header — position, look and hover are the host's. The rail, settings gear and shortcuts stay enabled. Linux follows native window decorations, which vary by desktop environment.
|
|
82
82
|
|
|
83
83
|
If you hit a title-bar, drag-region, window-button or layout issue, please open an [issue](https://github.com/DawnCHL/dsh-islands-ui/issues) with your OS version, window size and a screenshot.
|
|
84
84
|
|
|
@@ -131,10 +131,15 @@ src/
|
|
|
131
131
|
40-settings.css settings dialog and section shell
|
|
132
132
|
45-model-picker.css model / reasoning popover
|
|
133
133
|
50-components.css preference rows, switches, accent picker
|
|
134
|
+
60-peers.css third-party plugin adapters ([class*=...] is allowed only here)
|
|
135
|
+
host/runtime.js host contracts, local-name extraction, part table, walker
|
|
134
136
|
client.template.js browser entry (React components + slot registrations)
|
|
135
|
-
build.mjs inline src/*.css into client.js
|
|
137
|
+
build.mjs inline src/*.css and host/runtime.js into client.js
|
|
136
138
|
client.js built, self-contained artifact
|
|
139
|
+
scripts/check-css.mjs selector gate
|
|
140
|
+
scripts/check-parts.mjs part-table gate
|
|
137
141
|
scripts/check-package.mjs pre-publish packaging checks
|
|
142
|
+
test/ local-name and table-integrity tests
|
|
138
143
|
skin.json theme-manager manifest
|
|
139
144
|
```
|
|
140
145
|
|
|
@@ -180,12 +185,12 @@ Repository settings: `main` requires a PR, the `check (Node 20/22/24)` CI jobs a
|
|
|
180
185
|
## Compatibility
|
|
181
186
|
|
|
182
187
|
- The skin is a pure client style layer and does not replace session, settings or plugin data or behavior.
|
|
183
|
-
-
|
|
184
|
-
- On startup the plugin verifies the
|
|
185
|
-
- Settings → Islands UI shows the detected DSH release and sidebar structure for support triage.
|
|
188
|
+
- Styles depend on two stable layers only: host contracts (`data-slot`, `data-phase`, `data-conversation-scroll`, `data-composer-card`, `data-row-key`, `role` / `aria-*`) and the skin's own part marks in `data-islands-part`. Host class names appear only as local names in the tables in `src/host/runtime.js`; a hash segment never enters a selector. A Harness rebuild that changes hashes needs no update, and a host rename makes the affected rule go quiet until one table line changes.
|
|
189
|
+
- On startup the plugin verifies the core contracts (`[data-slot="root"]`, `[data-slot="sidebar"]`) and the core parts (frame, center column, sidebar root). Only a missing core contract leaves the skin **off**; DSH keeps its default look, a toast explains why (5s auto-dismiss, manual close, click to open the plugin settings) and Settings → Islands UI carries a persistent amber notice plus a session-scoped "Enable anyway". A missing decorative part only silences its own rules.
|
|
190
|
+
- Settings → Islands UI shows the detected DSH release and sidebar structure (`flat` / `scroll`, inferred from the parts present) for support triage.
|
|
186
191
|
- Dark mode follows `data-ds-dark-theme`; the accent remaps `--dsw-alias-state-business-primary`, so it affects both the skin and native buttons.
|
|
187
|
-
- Windows uses `data-windows-titlebar` and `--dsh-windows-titlebar-height
|
|
188
|
-
- `dsh.engines.dsh` / `engines.dsh` pin the tested line to `>=0.2.2-rc.1 <0.3.0-0`; outside that range the plugin manager refuses to install or upgrade
|
|
192
|
+
- Windows uses `data-windows-titlebar` and `--dsh-windows-titlebar-height` and renders no island top bar; Linux currently follows native window decorations.
|
|
193
|
+
- `dsh.engines.dsh` / `engines.dsh` pin the tested line to `>=0.2.2-rc.1 <0.3.0-0`; outside that range the plugin manager refuses to install or upgrade. Structure drift inside the line is handled by one stylesheet keyed on the parts present, no longer by a version-selected variant. `skin.json` gives theme managers the id, accent and mount row.
|
|
189
194
|
|
|
190
195
|
---
|
|
191
196
|
|
|
@@ -209,11 +214,11 @@ Not recommended. Two skins write the same `--dsw-*` tokens and layout rules, so
|
|
|
209
214
|
|
|
210
215
|
**Why do some surfaces keep the old look?**
|
|
211
216
|
|
|
212
|
-
|
|
217
|
+
A DSH upgrade can change a host local name or a contract. The affected rule goes quiet instead of matching a neighbour; update Islands UI, or open an issue with a screenshot and DSH version.
|
|
213
218
|
|
|
214
219
|
**Windows / Linux?**
|
|
215
220
|
|
|
216
|
-
The top bar, rail, right-panel toggle and title-bar height are adapted, but neither has been tested on a physical machine. Please report title-bar, drag-region or window-button issues using the issue template.
|
|
221
|
+
The native title bar (no island top bar on Windows), rail, right-hand native header tools, right-panel toggle and title-bar height are adapted, but neither platform has been tested on a physical machine. Please report title-bar, drag-region or window-button issues using the issue template.
|
|
217
222
|
|
|
218
223
|
**Will it be in plugin stores?**
|
|
219
224
|
|
package/README.md
CHANGED
|
@@ -86,7 +86,7 @@ dsh plugin --profile desktop remove dsh-islands-ui
|
|
|
86
86
|
| 画布 | 纯色 `#f7f7f7`(深色 `#0f1012`),不透明、无毛玻璃 |
|
|
87
87
|
| 岛屿 | 白色 / 深灰表面,16–20px 圆角,1px 发丝描边,无投影 |
|
|
88
88
|
| 间距 | 所有岛屿统一 5px 间隙,左右、顶部、底部、底部面板四周一致 |
|
|
89
|
-
| 顶部栏 | 40px
|
|
89
|
+
| 顶部栏 | 40px 窗口栏,承载对话工具组和右侧栏开关;macOS 避开红绿灯,Linux 从 8px 开始。Windows 不渲染该顶栏:标题栏保留原生侧栏开关,右侧工具回到会话头原生位置 |
|
|
90
90
|
| 强调色 | 默认品牌蓝,可改为紫 / 绿 / 橙 / 粉 / 红或任意取色 |
|
|
91
91
|
|
|
92
92
|
### 常用快捷键
|
|
@@ -110,10 +110,10 @@ dsh plugin --profile desktop remove dsh-islands-ui
|
|
|
110
110
|
| 平台 | 状态 |
|
|
111
111
|
| --- | --- |
|
|
112
112
|
| macOS | ✅ 已实测(开发与日常使用环境) |
|
|
113
|
-
| Windows | 🟡
|
|
113
|
+
| Windows | 🟡 已适配原生标题栏布局(不渲染插件顶栏)、左侧栏、设置齿轮、右侧工具原生位置、置顶聚合与模型弹层;**尚未在真实 Windows 电脑上实测** |
|
|
114
114
|
| Linux | 🟡 使用同一套顶栏与左侧栏;**尚未实测** |
|
|
115
115
|
|
|
116
|
-
Windows
|
|
116
|
+
Windows 下不渲染插件顶栏,岛屿直接接在原生标题栏下方;工作区折叠使用标题栏左上角的 DSH 原生侧栏按钮,右侧栏开关、底部面板入口与会话工具留在 DSH 原生的会话头位置(位置、外观与悬停都交给宿主)。左侧栏、设置齿轮和快捷键均已启用。Linux 按原生窗口装饰处理,不同桌面环境可能有差异。
|
|
117
117
|
|
|
118
118
|
> **反馈**:如果你在 Windows 或 Linux 上遇到标题栏高度、拖拽区域、窗口按钮重叠、布局错位或快捷键问题,欢迎提交 [Issue](https://github.com/DawnCHL/dsh-islands-ui/issues) 或 PR,附系统版本、窗口尺寸和截图即可。
|
|
119
119
|
|
|
@@ -145,17 +145,22 @@ src/
|
|
|
145
145
|
40-settings.css 设置弹窗、设置页外壳
|
|
146
146
|
45-model-picker.css 模型/推理两级弹层
|
|
147
147
|
50-components.css 偏好行、开关、强调色选择器等共享组件
|
|
148
|
+
60-peers.css 第三方插件适配(仅此文件允许 [class*=...])
|
|
149
|
+
host/runtime.js 宿主契约、本地名提取、区域/部件表、遍历器
|
|
148
150
|
client.template.js 浏览器端入口模板(React 组件 + 插槽注册)
|
|
149
|
-
build.mjs 把 src/*.css 内联进 client.js
|
|
151
|
+
build.mjs 把 src/*.css 与 host/runtime.js 内联进 client.js
|
|
150
152
|
client.js 构建产物(自包含,运行时无法读文件)
|
|
153
|
+
scripts/check-css.mjs 选择器门禁
|
|
154
|
+
scripts/check-parts.mjs 部件表门禁
|
|
151
155
|
scripts/check-package.mjs 发布前包内容校验
|
|
156
|
+
test/ 本地名与表完整性测试
|
|
152
157
|
skin.json 主题管理器清单
|
|
153
|
-
docs/
|
|
158
|
+
docs/ 发布、商店收录与宿主契约说明
|
|
154
159
|
```
|
|
155
160
|
|
|
156
161
|
```bash
|
|
157
162
|
npm run build # 修改 src/*.css 或模板后重新生成 client.js
|
|
158
|
-
npm run check # 校验 client.js
|
|
163
|
+
npm run check # 校验 client.js、CSS/部件门禁、单元测试和 npm 包
|
|
159
164
|
npm run pack:check # npm pack --dry-run
|
|
160
165
|
npm pack # 生成 dsh-islands-ui-<version>.tgz
|
|
161
166
|
```
|
|
@@ -195,12 +200,12 @@ npm pack # 生成 dsh-islands-ui-<version>.tgz
|
|
|
195
200
|
## 兼容性与边界
|
|
196
201
|
|
|
197
202
|
- 皮肤是**纯客户端样式层**,不替换会话、设置或插件的数据与交互;左侧栏图标排序与显隐、置顶聚合、定位等额外能力也只在客户端完成。
|
|
198
|
-
-
|
|
199
|
-
-
|
|
200
|
-
- 设置 → Islands UI 显示检测到的 DSH
|
|
203
|
+
- 样式只依赖两层稳定信息:Harness 公开的契约(`data-slot`、`data-phase`、`data-conversation-scroll`、`data-composer-card`、`data-row-key`、`role` / `aria-*`),以及皮肤写回的部件标记 `data-islands-part`。宿主类名只在 `src/host/runtime.js` 的部件表里以本地名出现,哈希段不进入任何选择器;Harness 重新构建改变哈希时无需更新,宿主改本地名时对应规则安静失效,改表一行即可恢复。
|
|
204
|
+
- 启动时只校验核心契约(`[data-slot="root"]`、`[data-slot="sidebar"]`)和核心部件(frame、center column、sidebar root);核心契约缺失时才**不启用皮肤**,DSH 保持默认外观,右下角弹出说明(5 秒自动关闭、可手动关闭、点击进入插件设置),设置 → Islands UI 里也常驻一条黄色说明,并提供会话级的「仍然启用」。单个装饰部件缺失只让对应规则失效,不会关掉整个皮肤。
|
|
205
|
+
- 设置 → Islands UI 显示检测到的 DSH 版本与侧栏结构(`flat` / `scroll`,由部件是否存在推断),便于排查升级后的样式问题。
|
|
201
206
|
- 深色模式跟随 Harness 的 `data-ds-dark-theme`;强调色通过重映射 `--dsw-alias-state-business-primary` 生效,会同时影响皮肤和原生按钮。
|
|
202
|
-
- Windows 使用 `data-windows-titlebar` 与 `--dsh-windows-titlebar-height`
|
|
203
|
-
- `dsh.engines.dsh` / `engines.dsh` 把兼容线钉在 `>=0.2.2-rc.1 <0.3.0-0
|
|
207
|
+
- Windows 使用 `data-windows-titlebar` 与 `--dsh-windows-titlebar-height` 适配原生标题栏,并且不渲染插件顶栏;Linux 暂无专用标题栏变量,按原生窗口装饰处理。
|
|
208
|
+
- `dsh.engines.dsh` / `engines.dsh` 把兼容线钉在 `>=0.2.2-rc.1 <0.3.0-0`,越界时插件管理器会拒绝安装或升级;同一兼容线内部的结构差异由同一张样式表按部件是否存在处理,不再按版本注入方言。`skin.json` 为主题管理器提供 id、强调色和挂载行。
|
|
204
209
|
|
|
205
210
|
---
|
|
206
211
|
|
|
@@ -224,11 +229,11 @@ npm pack # 生成 dsh-islands-ui-<version>.tgz
|
|
|
224
229
|
|
|
225
230
|
**为什么某些界面还是旧样式?**
|
|
226
231
|
|
|
227
|
-
|
|
232
|
+
说明皮肤**检测到核心宿主契约缺失,已自动关闭**。DSH 升级可能改掉 `data-slot`、`data-phase` 等公开契约;半启用会变成双栏重叠,所以插件宁可保持默认外观:右下角会有提示,设置 → Islands UI 顶部有黄色说明条并列出缺失的契约。把 Islands UI 更新到适配当前 DSH 的版本即可恢复;确认界面正常也可以点「仍然启用」临时开启(下次启动重新检测)。
|
|
228
233
|
|
|
229
234
|
**Windows / Linux 能用吗?**
|
|
230
235
|
|
|
231
|
-
|
|
236
|
+
已按原生标题栏(Windows 不渲染插件顶栏)、左侧栏、右侧工具原生位置和标题栏高度适配,但还没有在真实 Windows / Linux 机器上实测。遇到标题栏、拖拽区或窗口按钮问题,欢迎按 Issue 模板反馈。
|
|
232
237
|
|
|
233
238
|
**会发到插件商店吗?**
|
|
234
239
|
|