dsh-claude-style 0.2.7 → 0.3.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.
package/CHANGELOG.md CHANGED
@@ -1,11 +1,31 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.3.0] - 2026-09-20
4
+
5
+ ### Added
6
+ - **账户横条彩蛋:Claude 封号页**:侧栏底栏账户弹层顶部那条用户名横条现在可以点,点开是 Claude 官方「Your account is on hold」封号页的完整复刻(手绘锁形图标、`account_banned` 提示条、三步复核流程卡片、申请复核按钮、导出数据/删除账户两条操作)。它只是彩蛋——不改宿主状态、不碰会话与设置,只是一个挂在 `<body>` 上、退出时移除的全窗口浮层,因此能盖住标题栏、侧栏与输入区,也不会被侧栏列宽裁掉。退出全是明确动作:页面上的每个按钮(退出登录、申请复核、两条操作、提示条、窗口控制)都能关掉它,`Esc` 也能;点页面空白处不会关。**切走窗口不会关**——这页是用来读的,读者很可能要切出去查点东西,一失焦就消失比多留一会儿更糟,所以窗口失焦那条退出路径已经拿掉。品牌偏好同样生效——选 Anthropic 时页头换成 `A\` + ANTHROPIC 字标,选「关闭」时只留 Claude 字标。
7
+ - **`封号彩蛋语言` 设置**:彩蛋那页的语言由设置(`Ctrl+,` → Claude Style)单独决定,可选中文/英文,默认英文;文案仍走 `model-descriptions.json` 的 `ban` 块。之所以不让它跟随界面语言:那页复刻的是 Claude 的真实界面,按它本来的语言读才对。改语言会立刻重建已打开的那一页,时间戳的时钟也跟着换(英文 AM/PM、中文 24 小时制);该值存在宿主设置命名空间的 `banLocale` 字段,读取端对未知值一律回落到英文,手改配置不会把页面变成空白。
8
+
9
+ ### Changed
10
+ - **封号页的锁改为手绘描摹**:那页顶部的锁此前是 `rect` + `circle` 拼出来的标准图标,跟参考草图的手绘气质不搭。现在整把锁按参考图(89×92px)的墨迹中心线逐锚点描摹成三条三次贝塞尔路径——方框的每条「直」边都带一点自己的倾斜与漂移(顶边右低、底边微垂、左边下行时外移、右边绕过锁孔处外鼓再收回),四角用一小段斜线收口,锁梁里外两拱不同心、两条腿停在方框顶边上而不穿过它,锁孔的头部比正圆扁、腰身偏右、底座比头更宽。手绘感来自锚点本身,不是滤镜也不是随机抖动,所以缩放到任何尺寸都成立;锚点数值整体映射到图标集统一的 24 单位格(墨迹 15.3×20 单位居中),图标框 58px → 75px(墨迹 47.5px → 62.8px,约 +32%),描边 0.5 单位。选这两个数是量出来的:参考页里「锁的墨迹高 ÷ 标题墨迹高」是 3.08,改完是 2.70(此前 2.05);参考页的「线宽 ÷ 锁高」是 0.025,改完实测 0.0250(此前 0.075,粗了近三倍)。
11
+ - **修掉 `banSvg` 的重复属性**:图标助手此前把 `stroke-width` 追加在 `<svg>` 已有的一条之后,形成重复属性——HTML 解析器只认第一条,于是覆盖静默失效,锁实际按图标集的 1.6 画(在 58px 框里近 3.9px),这正是它看起来「线条太粗」的原因。现在粗细是 `banSvg(body, strokeWidth)` 的形参,只发一条属性;`.debug` 里的校验脚本会数属性条数,防止再犯。
12
+ - **点击展开的账户弹层不再被鼠标移出关掉**:此前点账户按钮展开弹层后,指针一离开按钮(弹层挂在按钮下方,指针必须离开)就被 `mouseleave` 关掉,等于点开即关、弹层里的条目够不着;现在点击展开的弹层改为由「点击别处」或「移出整个底栏」关闭,悬停展开仍按原来的延迟关闭逻辑。
13
+ - **账户弹层:账号名下的横线移出 hover 区**:弹层顶部原来是「整块(含横线)在 hover 时整体铺底」,指针扫过横线也会亮;现在横线是账号行的兄弟节点、归弹层所有(左右通栏到弹层内边距边缘),hover 底板只覆盖账号名那一行。
14
+ - **封号页排版**:内容列由靠左改为水平居中;页头(左上角品牌标 + 右上角 Sign out 与窗口控制)整体下移 30px。
15
+ - **行内代码片收紧**:行内代码(`` `npm run build` ``)的圆角矩形此前继承正文行高(15px 代码字号配 23px 行盒),上下各空出约 5px 底纹,显得虚胖。现在代码片自带 `line-height: 1.2`,行盒收到 18px、整片高度 27px → 22px,1px 内边距成为唯一的可见内缩;再小就开始切字形下伸部。底纹、描边、圆角、字号不变,正文段落/表格/标题的行距不受影响。
16
+
17
+ ### Fixed
18
+ - **回退引用块的链接材质**:0.2.7 把 Markdown 引用块(`blockquote`)改成了链接材质(蓝字 + 蓝色下划线 + 蓝色底纹/竖条),但引用是**容器**而不是链接,这套样式会连同块内的行内代码、文件引用一起染蓝,等于让链接材质泄露进引用块。现回退为原来的中性灰:文字 `#B0AEA5`(亮色 `#6E6A60`)、灰底 + 灰竖条,块内的链接、行内代码片、文件引用各自保持自己的材质,互不串色。`padding` 也不再需要 `!important` 钉死。
19
+ - **文件引用(行内文件名)颜色与超链接不一致**:聊天里的 `` `CHANGELOG.md` `` 这类**文件引用**是宿主把行内代码里的文件路径解析成按钮(`.fileMention`)后的产物,但皮肤的通配行内代码规则(`code:not(pre code)`,特异性 (0,2,1))压过宿主自己的链接色类((0,1,0)),于是同一段话里文件引用是代码片的暖红、真正的超链接是链接蓝。现在文件引用的文字改用链接色(亮 `#184F95` / 暗 `#8AB4F8`)、字重 500,下划线沿用超链接那一套(静止态实线、链接色调 60%、1.5px、offset 2px;hover/focus 同样实线、换成不透明的链接色,**线宽与线位不变**),**代码片本身完全不动**——底纹、描边、圆角、内边距与普通行内代码逐项相同,只有文字颜色不同。hover 规则只改颜色:先前用 `text-decoration` 简写会把 `text-decoration-thickness` 重置为 `auto`,导致 hover 时下划线反而变细。普通行内代码仍是暖红代码片;宿主类名带哈希,故按仓库纪律取最长稳定片段 `[class*="_fileMention"]`。
20
+ - **修复 Markdown 表格左侧空隙**:删除旧的全局 `table { width:100% }`、`table th` 背景与 `td/th { padding: 0.6em 0.85em !important }` 规则,避免覆盖宿主 `th:first-child { padding-left: 0 }` 和 `width: max-content`,表格过宽时不再出现左侧空白与外部边框错位。 同时对全部 `.tableScroll` 包装器强制 table margin/padding/border-spacing 归零,首/末单元格恢复 16px 内边距,并把表头背景与行线覆盖到 `thead th/td` 和每行首末单元格(th 或 td),使首列的留白看起来是表格内部区域而不是空隙。
21
+
3
22
  ## [0.2.7] - 2026-09-20
4
23
 
5
24
  ### Added
6
25
  - **模型选择器厂商标识**:模型行显示**模型所属厂商**的标识(而非转售该模型的 provider),「更多模型」的 provider 分组标题显示该 provider 的标识。标识取自 [Lobe Icons](https://lobehub.com/icons) 的静态 SVG(`@lobehub/icons-static-svg`,MIT),按仓库既有架构在构建期内联进 bundle——`@lobehub/icons` 是 React 组件包,装它就要破坏「零依赖、零打包器、单文件产物」这条约束。用单色字形(`fill="currentColor"`)随主题文字色绘制,亮暗两画布都清晰,也不与「陶烬橙唯一强调色」冲突;彩色变体不做——OpenAI、Anthropic、xAI、Moonshot、Z.ai、Vercel、Groq 等 12 家上游本就没有彩色版,且部分厂商色在 `#141413` 画布上不可见。绑定关系仍是数据:`model-descriptions.json` 的 `brands.providers` / `brands.models`,构建期校验引用的标识都已 vendored,写错即构建失败。
7
26
 
8
27
  ### Changed
28
+ - **Markdown 引用块改用超链接材质**:引用(`blockquote`)此前是中性灰文字 + 灰底灰条,与超链接毫无关联;现改为与 Markdown 链接同一套材质——链接蓝文字(亮 `#184F95` / 暗 `#8AB4F8`)、静止态同色下划线(1.5px、offset 2px,与链接逐项一致),底纹与左侧竖条取该蓝色的淡色(亮 `rgba(24,79,149,.08)` / `.45`,暗 `rgba(138,180,248,.12)` / `.55`)。引用与链接本就是同一类信号(「这段内容来自别处」),故共用一种材质;正文衬线字体不变。同时把引用块 `padding` 钉死,宿主 `.markdown blockquote` 的 `padding-left: 14px` 不再吃掉右侧内边距,底纹左右等宽。
9
29
  - **文本选区改为实色两态**:选中文字不再用半透明陶烬橙,改为平台式实色——窗口聚焦时蓝底白字(`#3366D0` / `#FFFFFF`),窗口失焦时灰底黑字(`#C7C7C6` / `#000000`),亮暗两画布一致。选区是瞬时操作而非界面表层,因此不跟随主题;两态都是实色且带 `!important`,覆盖底下的链接色、行内代码色与语法高亮色,避免"蓝底上保留原文字色"导致读不清。CSS 无法读取窗口焦点(Chromium 走内部 `-internal-inactive-selection-*`),故由新增的 `src/overrides/selection.js` 把焦点态镜像到文档属性上,样式表据此切换;失焦时选区本身保留,不消失。
10
30
  - **接入 cc-switch 全量供应商图标**:`src/assets/icons/providers` 引入其 107 个图标,build 解析 `index.ts` / `metadata.ts` 生成 `PROVIDER_ICONS` / `PROVIDER_ICON_METADATA`,宿主新增 `/dsh-claude-style/icons/providers/*` 路由;模型选择器优先用 cc-switch 图标,缺失时回退 Lobe。
11
31
  - **更多模型供应商标签改为推挤式 sticky**:每个供应商包成 section,滚动时上一个标签被下一个 section 往上推,而不是直接覆盖。
package/README.en.md CHANGED
@@ -58,7 +58,7 @@ Only one theme should be active at a time. After installing, **restart `dsh web`
58
58
  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).
59
59
  3. **Model picker** — the composer's model seat becomes a two-level Claude-style menu: the first level lists DeepSeek's official models, a divider, the reasoning-effort row and "More models", and the second opens beside it. Every model row carries the mark of the **vendor that made the model** (not the provider reselling it), and the "More models" group headers carry the provider's mark. The marks are [Lobe Icons](https://lobehub.com/icons) mono glyphs painted in the theme's own text colour, so they stay legible on both canvases — no React dependency, and no full-colour logos.
60
60
  4. **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.
61
- 5. **Account drawer** — the sidebar footer button opens a hover popover with quick access to Settings (`Ctrl+,`) and plugin management.
61
+ 5. **Account drawer** — the sidebar footer button opens a hover popover with quick access to Settings (`Ctrl+,`) and plugin management; the username row at its top is an easter egg: it opens Claude's own "Your account is on hold" page (a purely local reproduction that touches no real state — click any control on it, or press `Esc`, to leave; it deliberately stays put when the window loses focus, so you can switch away and read it). That page's language is its own setting (**Account-hold easter egg language**, Chinese/English, English by default).
62
62
  6. **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.
63
63
 
64
64
  ## Disable & Uninstall
package/README.md CHANGED
@@ -59,7 +59,7 @@ dsh plugin --profile web add Nwflower/dsh-claude-style # GitHub 源
59
59
  2. **权限分段** —— 输入框以 Read | Edit | Auto 三段式控制器替换原生的访问模式菜单:只读、工作区写入与完全权限(Auto 经宿主的安全确认弹窗切换)。
60
60
  3. **模型选择器** —— 输入框的模型席位换成 Claude 风格的两级弹层:一级列出 DeepSeek 官方模型、分隔线、推理等级与「更多模型」,二级在右侧展开。每个模型行显示**所属厂商**的标识(不是转售该模型的 provider),「更多模型」的分组标题显示 provider 的标识。标识取自 [Lobe Icons](https://lobehub.com/icons) 的单色字形,跟随主题文字色绘制,因此亮暗两套画布都清晰;不引入 React 组件依赖,也不使用彩色 logo。
61
61
  4. **品牌切换** —— 设置(`Ctrl+,`)→ **Claude Style**:侧栏品牌在 Claude(官方星芒 + Claude 字标)与 Anthropic(`A\` + ANTHROPIC 字标)之间切换,新会话页标识随所选品牌保持陶烬橙星芒;选择保存在浏览器本地,默认 Claude。
62
- 5. **账户抽屉** —— 侧栏底栏的账户按钮悬停展开弹层,一键打开设置(`Ctrl+,`)与管理插件。
62
+ 5. **账户抽屉** —— 侧栏底栏的账户按钮悬停展开弹层,一键打开设置(`Ctrl+,`)与管理插件;弹层顶部那条用户名横条是个彩蛋:点开会看到 Claude 官方的「账户已暂停」页(纯本地复刻,不碰任何真实状态,点页面上任意按钮或按 `Esc` 退出;切走窗口**不会**关,方便你切出去照着它看)。这页的语言在设置里单独选(**封号彩蛋语言**,中文/英文,默认英文)。
63
63
  6. **状态细节** —— 思考状态每轮从 Claude Code 的 185 个思考动词随机抽取一个稳定展示;工作区运行中状态使用 Fluent 风格的圆形加载动画。
64
64
 
65
65
  ## 停用与卸载
@@ -89,6 +89,7 @@ dsh plugin --profile web remove dsh-claude-style # 卸载
89
89
  | 品牌切换 | 设置 → Claude Style | Claude(星芒 + Claude 字标)与 Anthropic(`A\`)双标识,选择持久化 |
90
90
  | 状态动画 | 会话运行中 | 185 个思考动词随机展示;Windows 11 Fluent 风格圆形加载器 |
91
91
  | 账户抽屉 | 侧栏底栏 | 悬停展开弹层,直达设置与管理插件 |
92
+ | 封号页彩蛋 | 账户弹层顶部的用户名横条 | 复刻 Claude「Your account is on hold」整页,点任意按钮或按 `Esc` 退出(切走窗口不关);语言由「封号彩蛋语言」设置决定(默认英文) |
92
93
 
93
94
  ## 文档
94
95
 
package/docs/STYLE.md CHANGED
@@ -59,6 +59,35 @@ address. `src/overrides/selection.js` therefore mirrors `document.hasFocus()`
59
59
  onto `data-dsh-window-blur` and the stylesheet switches on that attribute; the
60
60
  selection itself survives the blur.
61
61
 
62
+ ## Markdown material
63
+
64
+ A quote is a **container**, not a link: it keeps the prose face on a neutral bar
65
+ and wash (text `#B0AEA5`, light `#6E6A60`), and whatever sits inside it keeps its
66
+ own material — links stay blue, inline-code chips stay warm red, file mentions
67
+ stay link-blue. Never paint the quote itself with the link colour: the colour
68
+ inherits into the block's inline code and mentions, which is exactly the leak
69
+ that made every path inside a quote read as a link.
70
+
71
+ **Inline file mentions are links, not code.** The host resolves a file path
72
+ inside an inline code span to a button (`.fileMention`, hashed — match it with
73
+ `[class*="_fileMention"]`) and paints it with its link alias. The generic
74
+ inline-code chip rule is more specific than that class, so a mention inherits
75
+ the chip's warm red unless a rule names it. A mention takes the link blue, weight
76
+ 500, and the link's underline (solid in the link tone at rest, solid and fully
77
+ opaque on hover, same thickness and offset — the same treatment the skin gives an
78
+ anchor); the chip itself is left alone — the same fill, hairline, radius and
79
+ padding as any other inline code. Plain inline code keeps its warm text. Note the
80
+ hover rule must set only `text-decoration-color`: the `text-decoration` shorthand
81
+ resets `text-decoration-thickness` to `auto` and thins the line mid-hover.
82
+
83
+ ## Inline code
84
+
85
+ The chip hugs its glyphs. The host builds it as an `inline-flex` box that
86
+ inherits the prose line box — 23px for a 15px code size — which left ~5px of
87
+ empty wash above and below the text. The skin sets `line-height: 1.2` on inline
88
+ code (27px → 22px, with the 1px padding as the visible inset); lower values
89
+ start clipping descenders. The fill, hairline, radius and size are unchanged.
90
+
62
91
  ## Implementation notes
63
92
 
64
93
  - Every rule is scoped under `body[data-dsh-claude-style]`.
@@ -85,6 +114,7 @@ assembles the bundle:
85
114
  | `src/styles/sidebar.css` | sidebar brand, new-session row, workspace tree |
86
115
  | `src/styles/components/permissions.css` | permission segments and popover |
87
116
  | `src/styles/components/account-footer.css` | account row and floating popover |
117
+ | `src/styles/components/ban-screen.css` | the account-hold easter egg (full-window overlay) |
88
118
  | `src/styles/components/model-picker.css` | model picker popovers |
89
119
  | `src/styles/components/footer-takeover.css` | host footer takeover rules |
90
120
  | `src/styles/components/third-party.css` | agy-link repair rules |
@@ -98,6 +128,7 @@ assembles the bundle:
98
128
  | `src/overrides/permissions.js` | permission segments/popover installer |
99
129
  | `src/overrides/model-picker.js` | model picker installer |
100
130
  | `src/overrides/account-footer.js` | account footer/popover installer |
131
+ | `src/overrides/ban-screen.js` | account-hold easter egg installer |
101
132
  | `src/overrides/scheduler.js` | scheduler, observers, subscriptions, teardown |
102
133
  | `src/overrides/selection.js` | mirrors the window's focus state onto the document for the two text-selection paints |
103
134
  | `src/settings.js` | settings section (brand switch) |