dsh-arknights-theme 1.0.0 → 1.0.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/README.md CHANGED
@@ -16,7 +16,7 @@ a coat of theme paint.
16
16
  **预构建包(推荐) / Prebuilt tarball (recommended)**
17
17
 
18
18
  ```sh
19
- dsh plugin add https://github.com/Theflowyears/dsh-arknights-theme/releases/download/v1.0.0/dsh-arknights-theme-1.0.0.tgz
19
+ dsh plugin add https://github.com/Theflowyears/dsh-arknights-theme/releases/download/v1.0.2/dsh-arknights-theme-1.0.2.tgz
20
20
  ```
21
21
 
22
22
  **从仓库安装 / From the repository**
@@ -95,7 +95,7 @@ This is the manual: what the package is made of, what is measured per wallpaper,
95
95
  glyph is used, how to rebuild it, and where its limits are. Installation and the highlight reel
96
96
  live on the repository front page.
97
97
 
98
- - 版本 / Version: **1.0.0**
98
+ - 版本 / Version: **1.0.2**
99
99
  - 适用 / Requires: DSH Web,`@deepseek-ai/cordis` 4.x
100
100
  - 许可 / Licence: 代码 MIT,美术素材不在 MIT 范围内(见 [版权与署名](#版权与署名--rights-and-credit))
101
101
 
@@ -160,20 +160,45 @@ Twelve, each measured once at import time, with the result recorded in `assets/w
160
160
  This is the heart of the skin, and the difference between it and "set a background image".
161
161
 
162
162
  1. **文字色来自壁纸,而不是写死的黑或白。**
163
- 取画面的主色相,用 OKLCH 求解亮度,保证正文在最差的那层玻璃上仍达 **WCAG AA**(正文 ≥ 4.5:1)。
163
+ 取画面的主色相,用 OKLCH 求解亮度,保证正文在承载它的每一层面板上仍达 **WCAG AA**(≥ 4.5:1)。
164
+ 亮度只允许为了这一点颜色偏离配色自带的文字色 **0.055**(OKLCH 亮度)——否则就会像上一版那样,
165
+ 为了 0.025 的色度把文字压到灰扑扑的 L 0.75,看着像褪色而不是文字。
164
166
  **Ink is derived from the picture**, not hard-coded: the hue comes from the image, the
165
- lightness is solved in OKLCH so body text keeps **WCAG AA** (≥ 4.5:1) on the worst surface.
166
- 2. **玻璃的浓度按画面亮度解算**,并随沉浸度滑杆插值,两端分别是"完全沉浸"和"最好读"。
167
- **Glass opacity is solved from the picture's luminance** and interpolated by the immersion
168
- dial, whose ends are "fully immersive" and "most readable".
169
- 3. **文字层最低不透明度 0.45**(`TEXT_SURFACE_MIN_ALPHA`),低于它就不再让画面透过来影响阅读。
170
- **Text surfaces never go below 0.45 alpha** (`TEXT_SURFACE_MIN_ALPHA`).
167
+ lightness is solved in OKLCH so body text keeps **WCAG AA** (≥ 4.5:1) on every panel it lands on.
168
+ The tint may pull the text's lightness **0.055** (OKLCH) away from the palette's own label
169
+ colour and no further — the previous release spent 0.24 of lightness to buy 0.025 of chroma and
170
+ shipped grey-looking text.
171
+ 2. **玻璃的浓度也来自画面**:亮壁纸得到更厚的霜,暗壁纸得到更薄的板,沉浸度滑杆在这个区间内
172
+ 插值,两端分别是"完全沉浸"和"最好读";读数解算只作为下限,保证不会薄到读不清。
173
+ **Glass opacity is solved from the picture's luminance** — a bright wallpaper gets a heavier
174
+ frost than a dark one — and the immersion dial interpolates within that band, between "fully
175
+ immersive" and "most readable"; the readability solve is a lower bound, not the whole answer.
176
+ 3. **承载文字的每一层面板,最薄处也不低于 0.45 不透明度**(`TEXT_SURFACE_MIN_ALPHA`,实测最低
177
+ 0.500)。画布 `bg-base` 是唯一允许更薄的一层,它的薄端按对比度解算:**暗色配色满沉浸仍
178
+ ≥ 4.5:1**(实测最差 4.84:1);**浅色配色的白纱只发解算值的一半**——半张白纸盖上去就不是壁纸了,
179
+ 所以浅色配色配暗壁纸在极高沉浸度落到 3.5–3.9:1,守住 3:1 的可读底线但低于 AA。选择器显示的是
180
+ 实测值,不是承诺值。
181
+ **Every panel that carries text stays at or above 0.45 alpha** (`TEXT_SURFACE_MIN_ALPHA`;
182
+ measured floor 0.500). The `bg-base` canvas is the one layer allowed to go thinner, and its thin
183
+ end is solved for contrast: the **dark palette still clears 4.5:1 at full immersion** (measured
184
+ worst 4.84:1), while the **light palette ships half of its solved white veil** — half a white
185
+ sheet over a dark wallpaper is no longer a wallpaper — which puts the light palette on dark
186
+ wallpapers at 3.5–3.9:1 at the far end of the dial: above the 3:1 legibility floor, below AA. The
187
+ picker shows the measured figure, not a promise.
171
188
  4. 选择器实时显示当前壁纸在当前沉浸度下的**实测对比度**。
172
189
  The picker shows the *measured* contrast for the current picture at the current immersion.
173
190
 
174
191
  浅色与深色两套配色各自解算,互不借用。
175
192
  The light and dark palettes are solved independently; neither borrows the other's numbers.
176
193
 
194
+ 以上五条由 `tools/audit-core.mjs` 逐条对着**构建产物里的数字**核对,而不是对着"本该生成这些数字的
195
+ 代码"核对:读的是打进 `lib/client.js` 的那份解算结果,任何一条不成立就以非零码退出。在仓库根目录
196
+ 执行 `node tools/audit-core.mjs` 即可自己跑一遍。
197
+ All five are checked by `tools/audit-core.mjs` against the numbers *in the build output* — the
198
+ solved values baked into `lib/client.js` — rather than against the code that was supposed to
199
+ produce them; a claim that stops being true fails the script. Run it yourself from the repository
200
+ root with `node tools/audit-core.mjs`.
201
+
177
202
  ---
178
203
 
179
204
  ## 图标与签名 / Iconography and signatures
@@ -268,9 +293,18 @@ rather than spread across the twelve files as a guess.
268
293
  ## 已知边界 / Known limits
269
294
 
270
295
  - **皮肤的许多选择器锚在宿主 CSS 模块的类名尾部**(如 `[class$='_titleGroup']`)。
271
- 这些局部名不是公开契约:DSH 升级若改名,对应的装饰会**静默失效**(不会报错,只是不生效)。
296
+ 这些局部名不是公开契约:DSH 升级若改名或**改了嵌套层级**,对应的装饰会失效。
297
+ 1.0.2 就是为此发的:DSH 0.2.0-rc.2 把新会话按钮的图标挪进了 `newSessionContent`,并把
298
+ 工具数据栏多渲染出一种没有 `_anchor` 的紧凑形态,两处装饰因此错位。现在两条路径都覆盖,
299
+ 并且构建里加了 `check-anchors.mjs`——它对着**已安装的 DSH** 逐个核对类名尾部、`data-*`
300
+ 属性与结构契约,宿主哪次升级挪了东西会直接让构建失败,而不是安静地少一块装饰。
272
301
  Many selectors anchor on the tail of the host's CSS-module class names. Those local names are
273
- not a public contract; if a DSH release renames one, that decoration stops applying — silently.
302
+ not a public contract; if a DSH release renames or re-nests one, that decoration breaks. 1.0.2
303
+ exists for exactly that: DSH 0.2.0-rc.2 moved the new-session icon inside `newSessionContent` and
304
+ added an anchor-less compact shape for the stats bar. Both shapes are handled now, and the build
305
+ runs `check-anchors.mjs`, which checks every class tail, `data-*` attribute and structural
306
+ contract against the **installed** DSH — a host upgrade that moves something fails the build
307
+ instead of silently dropping a decoration.
274
308
  - 选择界面、设置界面、对话框只做**颜色、描边与圆角**,不改布局:那三处是宿主自己的版面。
275
309
  The picker chrome, settings screen and dialogs are only re-coloured — their layout is the
276
310
  host's own, and stays that way.