dsh-claude-style 0.2.2
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 +59 -0
- package/LICENSE +30 -0
- package/README.en.md +93 -0
- package/README.md +103 -0
- package/cordis.patch.yml +4 -0
- package/docs/STYLE.md +87 -0
- package/docs/dark.png +0 -0
- package/docs/light.png +0 -0
- package/lib/client.js +3559 -0
- package/lib/index.js +3 -0
- package/package.json +59 -0
- package/skin.json +11 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [0.2.2] - 2026-09-19
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
- **对话内输入框重设计**:在已有对话中,输入框压缩为紧凑的单行卡片,随内容自然向下撑高(支持平滑滚动);右侧内置回车符号(`↵`)发送按钮,回车直接发送、Shift+Enter 换行,支持中文等 IME 正常选词;权限控制组件、指令 / 附件按钮与模型选择器合并到输入框下方同一行,自适应排列不重叠,权限弹出菜单支持 `Read only` / `Accept edits` / `Full access` 快捷切换与勾选;有附件时附件轨与输入框平滑连接为一体化卡片并撑高文本区,无附件时附件轨完全隐藏;宽度自适应,杜绝 Windows 系统及缩放比例下的异常横向滚动条;对话内占位符为 `Type / for commands`,点击卡片空白处即可聚焦。新会话页保持经典双层分段设计。
|
|
7
|
+
- **输入框焦点样式**:获得焦点时描边转为与输入框自身阴影一致的中性色细线(亮色为暖黑,暗色为纯黑),外扩 1px 同色晕边并加深投影,形成发光感;底栏托盘同步跟随,整体轮廓一体。深浅主题分别调校。
|
|
8
|
+
- **分时段首页欢迎语**:新会话页欢迎语随本地时间自动轮换——6–8 点 `Good morning, {用户名}!`(用户名取工作区路径,失败回退为 `User`)、8–9 点 `Happy {星期几}.`、9–12 点 `What are you working on?`、12–14 点 `What’s on the agenda today?`、14–18 点 `Coffee and Claude time?`、18–24 点 `Evening, how are things?`、0–6 点 `You are here!`;应用保持打开跨过整点时每 60 秒自动刷新手写欢迎语。
|
|
9
|
+
- **模型思考状态重塑**:收录 Claude Code 的 185 种思考动词(如 `Smooshing...`、`Boogieing...`、`Clauding...`、`Noodling...`),每轮思考随机抽取一个动词稳定展示;扫光从 DeepSeek 蓝渐变换为陶土橙与蜜桃暖色高光。
|
|
10
|
+
- **工作区运行中状态重塑**:会话运行时,侧栏会话状态加载动画从 DeepSeek 方形蓝色 LED 矩阵替换为 Windows 11 Fluent 风格的圆形圆弧旋转,深浅主题自适应。
|
|
11
|
+
- **可切换品牌标识**:设置页新增「Claude Style」分区,用分段控件在 Claude(默认,官方星芒)与 Anthropic(`A\` + ANTHROPIC 字标)两套品牌标识间切换,新会话页品牌标识随之切换并保持陶烬橙填充;选择保存在本地,重启应用后保持。
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
- **源码拆分与构建化**:`lib/client.js` 改为构建产物(勿手改),源码拆分至 `src/`(五个 JS 片段 + `src/styles/` 六个纯 CSS 文件);`npm run build` 内联拼装并做语法与令牌自检,发布前自动构建。新增 `scripts/probe.cjs` 无头浏览器回归探针,断言输入框吸底、单行起步、随内容增长等关键不变量(`npm run probe -- --token <launch-token>`)。
|
|
15
|
+
- **Anthropic 字体入仓库**:`fonts/` 提供 Anthropic Sans Web Text / Serif Web Text / Mono Variable 三个字体文件,随 Git 仓库分发、**不随 npm 包分发**(`files` 白名单排除);安装到系统后皮肤字体栈即可生效——版权归 Anthropic,仅供个人使用,不适用 MIT 许可(见 LICENSE 字体声明)。
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
- 修复会话页输入框脱离底部、不随消息流跟随滚动的问题:移除皮肤对宿主 `viewArea` 布局契约的覆盖,恢复 `composerSeat` 的 sticky 吸底语义。
|
|
19
|
+
- 修复对话内输入框被钉死单行的问题:子串选择器 `[class*="row"]` 误命中输入框增长容器类名 `…_grow`,统一改用精确子串 `[class*="_row"]`。
|
|
20
|
+
- 修复对话内输入框含图片时附件区出现内外两层边框的问题:附件轨实为两层嵌套(外层 `…_rail` 包裹 AttachmentRail 的滚动内轨 `…_rail`),子串选择器 `[class*="rail"]` 同时命中两层导致卡片描边被绘制两次;内层滚动轨显式重置为无框,仅外层承载卡片轮廓。
|
|
21
|
+
- 修复上下文用量弹层面板变形的问题:用量面板渲染在对话内输入卡片内部,其图例类名 `…_rows` / `…_row` 被子串选择器 `[class*="_row"]` 的工具行规则误命中,整表被压成一条 28px 弹性行导致文字换行错乱;显式恢复其纵向定义列表布局。
|
|
22
|
+
- 修复插件在侧栏底部植入非按钮控件(开关、下拉、状态组件等)时未被收纳进账户抽屉的问题:重定向从「只收集 footerActions 里的 button」改为按条目(footerActions 直接子节点)镜像,弹层菜单项激活该条目的首个可交互元素;含浮层(fixed 定位面板、dialog/menu/listbox)的条目仅隐藏非浮层分支,保证从抽屉打开后面板仍可达;卸载皮肤时清理全部隐藏标记。
|
|
23
|
+
- 修复账户抽屉弹层按钮显示不全的回归:所有插件条目实际渲染在同一个 `div[data-slot]` 锚点(display:contents)内部,footerActions 的直接子节点只有锚点本身,按直接子节点镜像会把全部注册条目坍缩成一项;条目枚举改为穿透锚点取其子节点,并跳过死单元(`data-slot-error`)。
|
|
24
|
+
- 修复账户抽屉镜像项图标与文本错位的问题:镜像项按索引复用时只更新文本与徽章、不更新图标,槽位顺序变化后旧图标配新文本;复用时图标一并刷新。
|
|
25
|
+
- 修复纯展示/富控件型插件条目(如费用插件的余额/配额进度条)在账户抽屉中不显示的问题:动作与控件的判定不再只看「有无触发器」——触发器文本不能覆盖条目全部可见文本(含 role=progressbar/meter 语义,或容器型可点击根)的条目判定为富控件,把该条目的实时克隆嵌入弹层(标记属性、id 与浮层子树在克隆中剥除,源 DOM 变更时按 outerHTML 差异刷新);条目带触发器时嵌入块可点击并转发给真实触发器,交互型按钮条目仍走文本镜像路径;条目在两种模式间切换时旧形态镜像会被清除。
|
|
26
|
+
- 修复嵌入控件点击效果与所点位置不一致的问题:此前嵌入块的点击一律转发给条目在 DOM 序中的第一个可交互元素,多控件控件(费用插件栈含刷新/折叠/页签多个按钮)下点「余额」区域触发的却是排最前的按钮;改为按被点克隆节点的 child-index 路径回放到原始条目(逐层校验标签形状,浮层裁剪导致的错位自动回退),激活映射节点的最近可交互祖先——点克隆里的哪个按钮就触发原始的哪个按钮,只读区域与失配路径回退到主触发器;嵌入点击不再顺手关闭弹层,控件的响应(页签切换、条宽变化)可在弹层内直接看到。
|
|
27
|
+
- 修复账户抽屉弹层镜像「乱序 + 显示与点击不一致」的根因:宿主在每次渲染时按 `order` 对 `sidebar.footer.action` 列表槽位稳定重排、插件在启动时渐进装载,但弹层镜像的两个状态被冻结——镜像节点的位置冻结在首次同步的快照(冷启动或重排后即乱序),点击回调里的触发目标在创建时被闭包锁死(重排后标签显示新条目、点击却触发旧条目)。现改为每轮同步都按实时 footer DOM 顺序重新排列镜像(文本项与嵌入控件一并跟随),并把点击目标重新绑定到当前索引对应的条目,双重问题一并消除。
|
|
28
|
+
- 修复 dsh-agy-link 的 run_code 工具卡片渲染异常:该插件以 keyed toolview 替换宿主 run_code 卡片,其非镜像回退卡片的头部是两个无样式裸 span(连间距都没有)、`pre` 无内边距,皮肤的标题衬线规则又放大了违和感;为其头部补齐工具行节奏(flex + 间距)、工具名改用皮肤的等宽技术字体、变体标签渲染为真正的徽章、代码预览补齐卡片内边距。
|
|
29
|
+
|
|
30
|
+
## [0.2.1] - 2026-09-19
|
|
31
|
+
|
|
32
|
+
### Added
|
|
33
|
+
- 账户抽屉支持悬停展开与延迟关闭,移入弹层不打断浏览。
|
|
34
|
+
|
|
35
|
+
### Changed
|
|
36
|
+
- 权限控制器首段从 Plan 改名为 Read,与它映射的只读预设(read-only)名称一致。
|
|
37
|
+
- 新会话按钮改为与会话行同高的窄条:左对齐加号图标、常驻悬停底色。
|
|
38
|
+
- 会话行标题默认为次级灰,悬停或选中时回到主文字色。
|
|
39
|
+
- 账户底栏改为贯通侧栏的全宽分割线布局。
|
|
40
|
+
|
|
41
|
+
### Fixed
|
|
42
|
+
- 补齐 LICENSE 版权署名;修正 README 中无效的手工 patch 配置示例。
|
|
43
|
+
|
|
44
|
+
## [0.2.0] - 2026-09-19
|
|
45
|
+
|
|
46
|
+
### Added
|
|
47
|
+
- **Claude Code Desktop Theme**: 重构,从配色皮肤升级为完整的 Claude Code Desktop 视觉与交互复刻主题。
|
|
48
|
+
- **Plan / Edit / Auto 分段权限控制**:行内三段式控制器,支持快捷切换会话权限(Plan 只读、Edit 写入、Auto 完全权限并带安全确认)。
|
|
49
|
+
- **侧栏账户抽屉**:侧栏底部集成账户按钮与弹出菜单,支持一键打开设置(`Ctrl+,`)与管理插件。
|
|
50
|
+
- **视觉与文案重塑**:专属问候语、输入框引导文案与品牌星芒标识。
|
|
51
|
+
|
|
52
|
+
### Changed
|
|
53
|
+
- 项目重命名为 `dsh-claude-style`,与上游 `claude-style-skin` 区分。
|
|
54
|
+
- 优化亮色画布色值(`#FCFCFB`)与侧栏色值(`#FBFBF9`)。
|
|
55
|
+
|
|
56
|
+
## [0.1.0] - 2026-08-22
|
|
57
|
+
|
|
58
|
+
### Added
|
|
59
|
+
- 初始版本:暖调象牙白/暖黑双画布与陶烬橙强调色。
|
package/LICENSE
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Nwflower
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
Font files notice: `fonts/AnthropicSansWebText.ttf`, `fonts/AnthropicSerifWebText.ttf`
|
|
26
|
+
and `fonts/AnthropicMonoVariable.ttf` are proprietary typefaces of Anthropic,
|
|
27
|
+
extracted from Anthropic's web products. They are included in this repository
|
|
28
|
+
for personal use only and are **not** covered by the MIT license above; all
|
|
29
|
+
rights remain with Anthropic. The npm package does not ship these files.
|
|
30
|
+
|
package/README.en.md
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
# DSH Claude Style
|
|
3
|
+
|
|
4
|
+
**A Claude Code Desktop theme for the DeepSeek Harness (DSH) web client — the warm ivory editorial canvas, the clay ember accent, and the Claude Code interaction model rebuilt on DSH.**
|
|
5
|
+
|
|
6
|
+
> **Coffee and Claude time?**
|
|
7
|
+
|
|
8
|
+
[](README.en.md) [](README.md)
|
|
9
|
+
|
|
10
|
+
[](https://github.com/Nwflower/dsh-claude-style)
|
|
11
|
+
[](LICENSE)
|
|
12
|
+
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
## Preview
|
|
16
|
+
|
|
17
|
+
<table>
|
|
18
|
+
<tr>
|
|
19
|
+
<td align="center" width="50%"><img src="./docs/light.png" alt="Light canvas — warm ivory" /></td>
|
|
20
|
+
<td align="center" width="50%"><img src="./docs/dark.png" alt="Dark canvas — warm black" /></td>
|
|
21
|
+
</tr>
|
|
22
|
+
</table>
|
|
23
|
+
|
|
24
|
+
> Light: ivory canvas `#FCFCFB` with a muted sidebar `#FBFBF9`. Dark: warm black `#141413`. The theme follows the system color scheme; clay ember `#D97757` is the single accent on both canvases.
|
|
25
|
+
|
|
26
|
+
## Fonts
|
|
27
|
+
|
|
28
|
+
> **Important: the npm package does NOT ship the font files.** They live in the repository's [`fonts/`](fonts/) folder for download; the skin's font stack (Anthropic Sans UI / Serif body / Mono code) only takes effect once the fonts are installed into the system, then refresh / restart the web GUI.
|
|
29
|
+
|
|
30
|
+
| Font | Used for | File |
|
|
31
|
+
|---|---|---|
|
|
32
|
+
| Anthropic Sans Web Text | UI chrome | [`fonts/AnthropicSansWebText.ttf`](https://github.com/Nwflower/dsh-claude-style/raw/main/fonts/AnthropicSansWebText.ttf) |
|
|
33
|
+
| Anthropic Serif Web Text | Conversation body / markdown | [`fonts/AnthropicSerifWebText.ttf`](https://github.com/Nwflower/dsh-claude-style/raw/main/fonts/AnthropicSerifWebText.ttf) |
|
|
34
|
+
| Anthropic Mono Variable | Code / code blocks | [`fonts/AnthropicMonoVariable.ttf`](https://github.com/Nwflower/dsh-claude-style/raw/main/fonts/AnthropicMonoVariable.ttf) |
|
|
35
|
+
|
|
36
|
+
Install: double-click the `.ttf` on Windows → *Install*; on macOS import via *Font Book*. Refresh the page afterwards.
|
|
37
|
+
|
|
38
|
+
> The typefaces are Anthropic's property, provided for personal use only and not covered by the MIT license above (see the font notice in [LICENSE](LICENSE)).
|
|
39
|
+
|
|
40
|
+
## Install
|
|
41
|
+
|
|
42
|
+
> Tested on dsh 0.1.5-rc.2 · not yet published to npm — install from GitHub
|
|
43
|
+
|
|
44
|
+
1. Install via terminal
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
dsh plugin --profile web add Nwflower/dsh-claude-style # GitHub source
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
2. Install via [Plugin Marketplace](https://github.com/dsh-market/dsh-market)
|
|
51
|
+
|
|
52
|
+
Only one theme should be active at a time. After installing, **restart `dsh web`** and refresh the page.
|
|
53
|
+
|
|
54
|
+
## Usage
|
|
55
|
+
|
|
56
|
+
1. **Theme** — applies the whole canvas automatically after install; no configuration needed. Light and dark follow the system color scheme.
|
|
57
|
+
2. **Permission segments** — the composer gets a Read | Edit | Auto segmented control replacing the shipped access-mode menu: read-only, workspace write, and full access (Auto is switched through the shipped risk-confirmation dialog).
|
|
58
|
+
3. **Brand switch** — Settings (`Ctrl+,`) → **Claude Style**: the sidebar brand flips between the Claude starburst + the official Claude wordmark and Anthropic (`A\` + ANTHROPIC wordmark); the hero mark follows the choice with the clay fill. The choice persists in the browser; `claude` is the default.
|
|
59
|
+
4. **Account drawer** — the sidebar footer button opens a hover popover with quick access to Settings (`Ctrl+,`) and plugin management.
|
|
60
|
+
5. **Status polish** — thinking turns pick one of Claude Code's 185 spinner verbs per turn; the workspace loading state uses a Fluent-style circular indicator.
|
|
61
|
+
|
|
62
|
+
## Disable & Uninstall
|
|
63
|
+
|
|
64
|
+
Pause the theme without uninstalling — add the following to the profile's `cordis.patch.yml` (`~/.dsh/profiles/web/cordis.patch.yml`):
|
|
65
|
+
|
|
66
|
+
```yaml
|
|
67
|
+
- id: ui-skin-claude-style
|
|
68
|
+
disabled: true
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
It hot-reloads within about a second; refresh to return to the stock look.
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
dsh plugin --profile web remove dsh-claude-style # uninstall
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Then restart `dsh web`; remove hand-added rows for this theme from `cordis.patch.yml` as well.
|
|
78
|
+
|
|
79
|
+
## Docs
|
|
80
|
+
|
|
81
|
+
| Document | Description |
|
|
82
|
+
| --- | --- |
|
|
83
|
+
| [Design Tokens](docs/STYLE.md) | Palette, typography, shapes, plus the bundle source layout and host-selector discipline |
|
|
84
|
+
| [Changelog](CHANGELOG.md) | Version history |
|
|
85
|
+
| [Contributing](CONTRIBUTING.md) | How to build from `src/`, commit rules, and the screenshot/regression tooling |
|
|
86
|
+
|
|
87
|
+
## Related Links
|
|
88
|
+
|
|
89
|
+
> Running several themes side by side? Recommended: [dsh-skin-manager](https://github.com/xiaoyangcheng84-svg/dsh-skin-manager) — switch all installed themes from its Settings page.
|
|
90
|
+
|
|
91
|
+
## Star History
|
|
92
|
+
|
|
93
|
+
[](https://www.star-history.com/?type=date&repos=Nwflower%2Fdsh-claude-style)
|
package/README.md
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
# DSH Claude Style
|
|
3
|
+
|
|
4
|
+
**为 DeepSeek Harness (DSH) Web 客户端复刻 Claude Code Desktop 视觉与交互体验的主题插件 —— 暖调象牙画布、陶烬橙强调色,以及在 DSH 上重筑的 Claude Code 交互模型。**
|
|
5
|
+
|
|
6
|
+
> **咖啡与 Claude 的下午茶时光。**
|
|
7
|
+
|
|
8
|
+
[](README.en.md) [](README.md)
|
|
9
|
+
|
|
10
|
+
[](https://github.com/Nwflower/dsh-claude-style)
|
|
11
|
+
[](LICENSE)
|
|
12
|
+
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
## 预览
|
|
16
|
+
|
|
17
|
+
<table>
|
|
18
|
+
<tr>
|
|
19
|
+
<td align="center" width="50%"><img src="./docs/light.png" alt="亮色画布 —— 暖调象牙" /></td>
|
|
20
|
+
<td align="center" width="50%"><img src="./docs/dark.png" alt="暗色画布 —— 暖调黑" /></td>
|
|
21
|
+
</tr>
|
|
22
|
+
</table>
|
|
23
|
+
|
|
24
|
+
> 亮色:象牙白画布 `#FCFCFB` 与浅色侧栏 `#FBFBF9`;暗色:暖黑 `#141413`。主题遵循系统亮暗模式切换,陶烬橙 `#D97757` 是两套画布唯一的操作强调色。
|
|
25
|
+
|
|
26
|
+
## 字体
|
|
27
|
+
|
|
28
|
+
> **重要:npm 包不随包分发字体文件。** 字体文件放在仓库 [`fonts/`](fonts/) 供下载;安装到系统后皮肤的字体栈(Anthropic Sans UI / Serif 正文 / Mono 代码)才会生效,安装后刷新 / 重启 web。
|
|
29
|
+
|
|
30
|
+
| 字体 | 用途 | 文件 |
|
|
31
|
+
|---|---|---|
|
|
32
|
+
| Anthropic Sans Web Text | 界面 / UI | [`fonts/AnthropicSansWebText.ttf`](https://github.com/Nwflower/dsh-claude-style/raw/main/fonts/AnthropicSansWebText.ttf) |
|
|
33
|
+
| Anthropic Serif Web Text | 对话正文 / Markdown | [`fonts/AnthropicSerifWebText.ttf`](https://github.com/Nwflower/dsh-claude-style/raw/main/fonts/AnthropicSerifWebText.ttf) |
|
|
34
|
+
| Anthropic Mono Variable | 代码 / 代码块 | [`fonts/AnthropicMonoVariable.ttf`](https://github.com/Nwflower/dsh-claude-style/raw/main/fonts/AnthropicMonoVariable.ttf) |
|
|
35
|
+
|
|
36
|
+
安装:Windows 双击 `.ttf` → 「安装」;macOS 用「字体册」导入。安装后刷新页面生效。
|
|
37
|
+
|
|
38
|
+
> 字体版权归 Anthropic 所有,仅供个人使用,不适用 MIT 许可(详见 [LICENSE](LICENSE) 字体声明)。
|
|
39
|
+
|
|
40
|
+
## 安装
|
|
41
|
+
|
|
42
|
+
> 已在 dsh 0.1.5-rc.2 上测试 · 暂未发布 npm —— 请从 GitHub 源安装
|
|
43
|
+
|
|
44
|
+
1. 通过终端安装
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
dsh plugin --profile web add Nwflower/dsh-claude-style # GitHub 源
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
2. 通过[插件市场](https://github.com/dsh-market/dsh-market)安装
|
|
51
|
+
|
|
52
|
+
同一时刻建议只启用一个主题。安装后**重启 `dsh web`** 并刷新页面即生效。
|
|
53
|
+
|
|
54
|
+
## 使用
|
|
55
|
+
|
|
56
|
+
1. **主题** —— 安装即全局生效,无需配置;亮暗跟随系统颜色模式。
|
|
57
|
+
2. **权限分段** —— 输入框以 Read | Edit | Auto 三段式控制器替换原生的访问模式菜单:只读、工作区写入与完全权限(Auto 经宿主的安全确认弹窗切换)。
|
|
58
|
+
3. **品牌切换** —— 设置(`Ctrl+,`)→ **Claude Style**:侧栏品牌在 Claude(官方星芒 + Claude 字标)与 Anthropic(`A\` + ANTHROPIC 字标)之间切换,新会话页标识随所选品牌保持陶烬橙星芒;选择保存在浏览器本地,默认 Claude。
|
|
59
|
+
4. **账户抽屉** —— 侧栏底栏的账户按钮悬停展开弹层,一键打开设置(`Ctrl+,`)与管理插件。
|
|
60
|
+
5. **状态细节** —— 思考状态每轮从 Claude Code 的 185 个思考动词随机抽取一个稳定展示;工作区运行中状态使用 Fluent 风格的圆形加载动画。
|
|
61
|
+
|
|
62
|
+
## 停用与卸载
|
|
63
|
+
|
|
64
|
+
不停用安装、先暂停主题 —— 在 profile 的 `cordis.patch.yml`(`~/.dsh/profiles/web/cordis.patch.yml`)中加入:
|
|
65
|
+
|
|
66
|
+
```yaml
|
|
67
|
+
- id: ui-skin-claude-style
|
|
68
|
+
disabled: true
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
保存后约 1 秒内热生效,刷新页面即回到原生外观。
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
dsh plugin --profile web remove dsh-claude-style # 卸载
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
然后重启 `dsh web`;若曾在 `cordis.patch.yml` 手工添加过本主题的条目,一并删除。
|
|
78
|
+
|
|
79
|
+
## 功能一览
|
|
80
|
+
|
|
81
|
+
| 能力 | 入口 | 说明 |
|
|
82
|
+
| --- | --- | --- |
|
|
83
|
+
| Claude 视觉 | 全局 | 象牙白/暖黑双画布、陶烬橙唯一强调色、衬线展示标题 + 无衬线界面 + 等宽代码三字体分工 |
|
|
84
|
+
| 权限控制器 | 输入框浮层 / 新会话分段 | Read · Edit · Auto 三段切换会话权限,Auto 走宿主安全确认 |
|
|
85
|
+
| 品牌切换 | 设置 → Claude Style | Claude(星芒 + Claude 字标)与 Anthropic(`A\`)双标识,选择持久化 |
|
|
86
|
+
| 状态动画 | 会话运行中 | 185 个思考动词随机展示;Windows 11 Fluent 风格圆形加载器 |
|
|
87
|
+
| 账户抽屉 | 侧栏底栏 | 悬停展开弹层,直达设置与管理插件 |
|
|
88
|
+
|
|
89
|
+
## 文档
|
|
90
|
+
|
|
91
|
+
| 文档 | 说明 |
|
|
92
|
+
| --- | --- |
|
|
93
|
+
| [设计令牌](docs/STYLE.md) | 调色板、字体、形状,源码结构与宿主选择器纪律(英文) |
|
|
94
|
+
| [更新日志](CHANGELOG.md) | 版本历史 |
|
|
95
|
+
| [贡献指南](CONTRIBUTING.md) | 如何从 `src/` 构建、提交规范与截图/回归工具(英文) |
|
|
96
|
+
|
|
97
|
+
## 友链
|
|
98
|
+
|
|
99
|
+
> 同时启用多个主题?推荐 [dsh-skin-manager](https://github.com/xiaoyangcheng84-svg/dsh-skin-manager),在其设置页一键切换所有已安装主题。
|
|
100
|
+
|
|
101
|
+
## Star History
|
|
102
|
+
|
|
103
|
+
[](https://www.star-history.com/?type=date&repos=Nwflower%2Fdsh-claude-style)
|
package/cordis.patch.yml
ADDED
package/docs/STYLE.md
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Style Guide · 设计令牌
|
|
2
|
+
|
|
3
|
+
Design tokens for `dsh-claude-style`, recreating the Claude Code Desktop aesthetic.
|
|
4
|
+
|
|
5
|
+
## Palette
|
|
6
|
+
|
|
7
|
+
| Token | Value | Use |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| ivory light | `#FCFCFB` | light canvas |
|
|
10
|
+
| sidebar light | `#FBFBF9` | light sidebar |
|
|
11
|
+
| ivory | `#F0EEE6` | secondary surfaces |
|
|
12
|
+
| ivory dark | `#E8E6DC` | hover / section bg |
|
|
13
|
+
| slate dark | `#141413` | text (light mode), canvas (dark mode) |
|
|
14
|
+
| warm gray | `#B0AEA5` | metadata |
|
|
15
|
+
| clay | `#D97757` | single accent — CTA / links |
|
|
16
|
+
| accent deep | `#C6613F` | accent hover |
|
|
17
|
+
| hairline | `#1414131a` | 1px warm border |
|
|
18
|
+
|
|
19
|
+
Rules:
|
|
20
|
+
|
|
21
|
+
- Never pure white, never pure black, never cool grays.
|
|
22
|
+
- Accent usage stays under ~10% of visible elements.
|
|
23
|
+
|
|
24
|
+
## Typography
|
|
25
|
+
|
|
26
|
+
- **Serif display** — headings / editorial statements (`--dsw-font-serif`).
|
|
27
|
+
- **Sans UI** — chrome, body (`--dsw-font-family`).
|
|
28
|
+
- **Mono** — code, technical labels (`--dsw-font-code`).
|
|
29
|
+
|
|
30
|
+
## Shapes
|
|
31
|
+
|
|
32
|
+
- Radius: 4 / 8 / 16 px; pills for CTAs (`9999px`).
|
|
33
|
+
- Borders: 1px warm hairline.
|
|
34
|
+
- Spacing: 4 px rhythm.
|
|
35
|
+
- Focus: the composer field lights up — its hairline takes the input box's own
|
|
36
|
+
shadow colour (espresso `#141413` in light, black in dark), with a 1px halo
|
|
37
|
+
in the same tone and a deeper drop shadow. The footer tray below follows the
|
|
38
|
+
same hairline so the two tiers stay one outline. Accent is never used for
|
|
39
|
+
focus strokes.
|
|
40
|
+
|
|
41
|
+
## Implementation notes
|
|
42
|
+
|
|
43
|
+
- Every rule is scoped under `body[data-dsh-claude-style]`.
|
|
44
|
+
- Dark tokens are the base; light overrides use `:not([data-ds-dark-theme])`.
|
|
45
|
+
|
|
46
|
+
## Architecture · 源码结构
|
|
47
|
+
|
|
48
|
+
The shipped bundle `lib/client.js` is **generated** — never edit it directly.
|
|
49
|
+
Source lives in `src/` and `node scripts/build.mjs` (or `npm run build`)
|
|
50
|
+
assembles the bundle:
|
|
51
|
+
|
|
52
|
+
| Source | Zone | Content |
|
|
53
|
+
|---|---|---|
|
|
54
|
+
| `src/constants.js` | 1 | constants, spinner verbs, SVG masks (evaluated at build time to fill `%%TOKEN%%` placeholders in the stylesheets) |
|
|
55
|
+
| `src/styles/tokens.css` | 2.1 | design tokens (dark base + ivory light) |
|
|
56
|
+
| `src/styles/typography.css` | 2.2 | serif display / sans UI / mono code, editorial markdown |
|
|
57
|
+
| `src/styles/chrome.css` | 2.3 | canvas, hairlines, clay accent, chrome details |
|
|
58
|
+
| `src/styles/composer.css` | 2.3 | hero + in-conversation composer |
|
|
59
|
+
| `src/styles/sidebar.css` | 2.3 | sidebar brand, new-session row, workspace tree |
|
|
60
|
+
| `src/styles/components.css` | 2.4 | segments, permission popover, account drawer, settings section |
|
|
61
|
+
| `src/context.js` | 3 | host context & helpers |
|
|
62
|
+
| `src/overrides.js` | 4+5 | DOM overrides, MutationObserver scheduler, teardown |
|
|
63
|
+
| `src/settings.js` | 4.4 | settings section (brand switch) |
|
|
64
|
+
| `src/entry.js` | 6 | `apply()` + exports |
|
|
65
|
+
|
|
66
|
+
Fragments share one factory scope at runtime: keep the 4-space base
|
|
67
|
+
indentation and do not use `import`/`export` inside fragments. The build
|
|
68
|
+
script rejects unsubstituted `%%TOKENS%%` and refuses to emit a bundle that
|
|
69
|
+
fails to parse.
|
|
70
|
+
|
|
71
|
+
### Host selector discipline · 宿主选择器纪律
|
|
72
|
+
|
|
73
|
+
The host uses hashed CSS-module classes (`p_FcLG_row`, `_0cyzDW_viewArea`, …).
|
|
74
|
+
Substring matchers must use the **longest stable fragment**, and every new
|
|
75
|
+
rule should be checked for accidental hits:
|
|
76
|
+
|
|
77
|
+
- `[class*="_row"]`, never `[class*="row"]` — the bare substring also matches
|
|
78
|
+
the composer growth wrapper `…_grow` and pinned the input field to 28px.
|
|
79
|
+
- Never override the host's active-phase layout contract on
|
|
80
|
+
`[class*="viewArea"]` (`flex: 1 0 auto; min-height: auto`) — it is what
|
|
81
|
+
keeps the sticky composer seat pinned to the scrollport bottom.
|
|
82
|
+
|
|
83
|
+
`node scripts/probe.cjs --token <launch-token>` drives a headless Chrome over
|
|
84
|
+
CDP and asserts the invariants (composer pinned at bottom, single-line start,
|
|
85
|
+
content growth). `node scripts/shoot.cjs --token <launch-token>` recaptures
|
|
86
|
+
the README screenshots (`docs/light.png` / `docs/dark.png`), swapping personal
|
|
87
|
+
data for neutral stand-ins in the DOM before any pixel is written.
|
package/docs/dark.png
ADDED
|
Binary file
|
package/docs/light.png
ADDED
|
Binary file
|