@linxin666/dsh-client-ui-skin-center 0.4.5 → 0.4.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/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: 8c35732dd824eb7b137a9f4ef2c62e58eb7dbf65
6
- README.zh.md: 23f6ce6952c7c42d47ca7109a3fcabc2a160be30
5
+ README.md: 8caf0b19d2eae9ae77ef2982764f7521d9fc1182
6
+ README.zh.md: d133c34e4006452dd58ce1f6478e2d8f5957d0b0
package/README.md CHANGED
@@ -94,7 +94,39 @@ The card says so while it is standing down, so a paused skin reads as a state, n
94
94
 
95
95
  Skin background art is part of a skin own look, so it is withheld together with the rest of the skin while a wallpaper renders. Skins that ship their own full-bleed plate (the ground-plate canvases in the catalog) additionally key their yield rules on `body[data-we-wallpaper]`, so they step aside rather than compete for the backdrop.
96
96
 
97
- ## Configuration
97
+ ## Delegated plugin skins
98
+
99
+ Some looks are not asset directories at all: they ship as their own plugin and paint the whole
100
+ interface. The Claude Code Desktop theme is one — it lives in [dsh-claude-style](https://github.com/Nwflower/dsh-claude-style)
101
+ (`dsh-claude-style`), which repaints the shell, sidebar, composer and conversation on its own. It is a
102
+ **separate package**: nothing here bundles it, versions it or ships its files.
103
+
104
+ Such a look is still a **skin you can select**. It gets its own full-width bar ABOVE the skin grid —
105
+ the same row shape as the custom-theme card below it — carries a `Plugin theme` badge, and behaves
106
+ like any other skin: try it on, apply it, and it is remembered across a reload. It does not take a tile
107
+ in the grid: a grid cell exists to show a preview image, and this package holds none for a look another
108
+ plugin paints. What it never does is paint from here — the plugin paints it, and this package keeps
109
+ the selection.
110
+
111
+ - **The row exists before the plugin does.** Press **Install plugin** on the row (the same
112
+ one-click path the wallpaper notice uses: the official in-process plugin manager when the host
113
+ publishes it, the family plugin-manager face otherwise, the exact command when it publishes
114
+ neither). A profile without the plugin is exactly where the prompt belongs.
115
+ - **Selecting it hands the page over.** The skin center stamps nothing, loads nothing and paints
116
+ nothing; the plugin's own client chain mounts its bundle. The selection persists like any other,
117
+ so the delegated look survives a restart.
118
+ - **Any other skin, the stock look, or a running wallpaper takes the page back.** That is the
119
+ reverse of the same handoff: this package stamps `html[data-dsh-skin]` again, the plugin reads
120
+ it and stands its own visual down, and the skin paints over it. No reload, no re-apply.
121
+ - **A build that cannot hand the page back is not offered.** The plugin advertises that it can
122
+ yield with a body attribute; without it, the row says so and offers no try-on or apply, because
123
+ the two would otherwise paint the same shell at once. Update the plugin and the row becomes
124
+ selectable.
125
+ - **Its settings page and preferences survive the yield.** Standing down is a visual state, not an
126
+ uninstall: the plugin keeps its own settings page while another skin is on screen.
127
+
128
+ The skin center reads the plugin's markers and never writes them, and the plugin never writes
129
+ `data-dsh-skin`. Neither side can strand the other.## Configuration
98
130
 
99
131
  - **Enable switch**: turns the whole card (try-on / apply / background controls) on or off; persisted in the v2 active-state document.
100
132
  - **Background sliders**: occlusion (0–100%), two backdrop blur radii, input-card blur (0–20 px), and bubble opacity (0–100%); persisted in the same v2 document.
package/README.zh.md CHANGED
@@ -94,6 +94,32 @@ dsh plugin --profile web add dsh-plugin-wallpaper-engine
94
94
 
95
95
  皮肤背景图属于皮肤自身外观的一部分,因此壁纸渲染期间会随皮肤整体停画。自带满幅底板的皮肤(目录里的 ground-plate 画布类)另把让路规则锚定在 `body[data-we-wallpaper]` 上,从而主动让位而不是争夺背景。
96
96
 
97
+ ## 委托皮肤(由插件绘制的皮肤)
98
+
99
+ 有些外观不是资产目录,而是各自作为插件发布的整套界面。Claude Code 风格就是其中一个:
100
+ 它在 [dsh-claude-style](https://github.com/Nwflower/dsh-claude-style)(`dsh-claude-style`)里,
101
+ 自行重绘外壳、侧栏、输入区与对话区。它是一个**独立包**:本仓库不捆绑、不接管版本,也不
102
+ 分发它的文件。
103
+
104
+ 这样的外观同样是**可以选用的皮肤**。它在皮肤列表**上方**独占一条通栏横条(与网格下方的
105
+ 「自定义主题」同一种行式),带 `插件皮肤` 标记,用起来与其他皮肤完全一致:试穿、应用,刷新后
106
+ 依然保留。它不占网格里的方块位:那一格是为了放预览图,而这套外观由别的插件绘制,本包里没有
107
+ 它的截图。区别只在于它不由本包绘制——由那个插件绘制,本包只保管这个选择。
108
+
109
+ - **插件还没装时这一行就在。** 在该行点「一键安装插件」即可(与壁纸提示同一套一键路径:宿主
110
+ 提供官方进程内插件管理器时走它,否则走家族插件管理器,两者都没有时给出可复制的命令)。
111
+ 还没装的档案正是提示该出现的地方。
112
+ - **选中它即交出页面。** 皮肤中心不盖章、不加载、不绘制任何东西;由插件自己的客户端链路挂载
113
+ 它的 bundle。这个选择与其他皮肤一样持久化,重启后仍是这套外观。
114
+ - **换其他皮肤、官方默认,或壁纸在跑时,页面就交还回来。** 走的是同一次交接的反向:皮肤中心
115
+ 重新盖上 `html[data-dsh-skin]`,插件读到后收起自己的视觉,皮肤画上去。无需刷新,无需重新
116
+ 应用。
117
+ - **无法让路的版本不会被选用。** 插件用一个 body 属性声明自己能让路;没有它时该行会说明情况,
118
+ 并且不提供试穿与应用——否则两者会同时绘制同一副外壳。更新插件后该行即可选用。
119
+ - **让路不影响插件的设置页与偏好。** 收起的是视觉,不是卸载:别的皮肤在屏幕上时,插件自己的
120
+ 设置页照常可用。
121
+
122
+ 皮肤中心只读插件的标记、从不写入,插件也从不写 `data-dsh-skin`,两边都无法把对方卡死。
97
123
  ## 配置
98
124
 
99
125
  - **总开关**:开关整张卡片(试穿 / 应用 / 背景控制);持久化在 v2 活跃状态文档中。
@@ -54,6 +54,23 @@
54
54
  | --- | --- | --- |
55
55
  | `data-we-wallpaper` | body(元素级,owner: 外部壁纸插件) | 外部插件渲染壁纸期间置位,停止时移除。皮肤中心在置位期间**整体停画皮肤**(不加载皮肤 CSS、不画 `backgroundMedia`、不跑 hooks、不挂 composer 磨砂,并把 `html[data-dsh-skin]` 属性撤下),用户选择保留,属性清除即自动恢复;用户显式发起的激活是唯一例外,它先翻 `html[data-dsh-skin]` 抢一次台以驱动对方让路,无人应答则在一个让路窗口后自行退回停画(#49);皮肤目录内的让路规则(`body[data-we-wallpaper]::after` 等)也锚定它。等价属主与写者只有外部插件一方 |
56
56
 
57
+ ### 委托皮肤标记(owner: 委托插件自身,只读消费)
58
+
59
+ 一条皮肤可以不由本包绘制,而是由另一个插件绘制(委托皮肤,见
60
+ `src/core/delegated-skins.ts`)。该插件在页面期间给 `body` 打上自有属性,
61
+ 皮肤中心只读、从不写:
62
+
63
+ | 属性 | 位置 | 含义 / 锚定方式 |
64
+ | --- | --- | --- |
65
+ | `data-dsh-claude-style` | body(元素级,owner: `dsh-claude-style`) | 插件在页面上运行、其样式表已挂载期间置位(值是它的 build id),停用或卸载时移除。皮肤中心据此判断该行是否真的在作画 |
66
+ | `data-dsh-claude-style-handoff` | body(元素级,owner: `dsh-claude-style`) | 该构建支持让路时置位,即它会在 `html[data-dsh-skin]` 或 `body[data-we-wallpaper]` 出现时收掉自己的视觉。**有无该属性是能力信号**:没有它的构建无法把页面交还给皮肤,卡片因此不向它提供试穿/应用 |
67
+
68
+ 让路方向只有一条,且只经由 `html[data-dsh-skin]`:委托皮肤被选中时该属性不
69
+ 置位(这正是它第一屏的文档形态,也是插件继续作画的前提);用户改选其他皮肤
70
+ 或官方默认时该属性翻上,委托插件让路;壁纸渲染期间委托插件同样让路。
71
+ 皮肤中心不写委托插件的任何属性,委托插件不写 `data-dsh-skin`,双方都无法把
72
+ 对方卡死。委托皮肤的选择会照常持久化、开机采纳与试穿还原;让路暂停的是
73
+ 视觉,不是插件的设置页与偏好。
57
74
  ## part 组(81 行,含各 owner 行)
58
75
 
59
76
  shell 区域(owner: shell):