dsh-theme-palette 1.4.0 → 1.4.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 +11 -0
- package/README-es.md +87 -0
- package/README-hi.md +87 -0
- package/README-pt.md +87 -0
- package/README-zh.md +87 -0
- package/README.md +53 -179
- package/client.js +1 -1
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +16 -5
- package/tools/release.mjs +14 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,17 @@
|
|
|
4
4
|
|
|
5
5
|
## 版本一览
|
|
6
6
|
|
|
7
|
+
### 1.4.2
|
|
8
|
+
- **修复启动崩溃**:1.4.1 为了展示元数据加了 `exports`,但漏了 `"./client"` —— 宿主 `client-modules` 找不到 client bundle 时会让 **required 插件 `modules` 启动失败**,整个 profile 的插件全部不加载(重启后界面报错、插件消失)
|
|
9
|
+
- `exports` 现在显式列出 `./client`、`./client.js`、`./index.js`、`./cordis.patch.yml`、`./package.json`
|
|
10
|
+
- `tools/release.mjs` 增加守卫:声明了 `dsh.client` 就必须能解析 `exports["./client"]`,否则发版前直接失败
|
|
11
|
+
|
|
12
|
+
### 1.4.1
|
|
13
|
+
- README 按 DSH 插件标准拆成五语:`README.md`(英文源)/ `README-zh.md` / `README-es.md` / `README-pt.md` / `README-hi.md`,章节结构完全一致
|
|
14
|
+
- 补展示元数据:`locale/{en,zh}.json` 的 `meta.title`/`meta.description` + `exports` 暴露 `./locale/*.json` 与 `./icon`
|
|
15
|
+
- 对齐官方工程门禁:`engines.node` → `^22.19.0 || >=24.0.0`、`packageManager` 钉 `pnpm@11.7.0`
|
|
16
|
+
- `dsh-plugin-dev check`:**11 passed / 0 failed / 0 warned**
|
|
17
|
+
|
|
7
18
|
### 1.4.0
|
|
8
19
|
- 多语言:简体中文 / 繁體中文 / English / 日本語;「自动」跟随宿主的 `documentElement.lang`
|
|
9
20
|
- 配色名(黑白/暖砂/靛蓝/苔绿)、各档位文案、状态行都本地化,不是只翻标题
|
package/README-es.md
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# dsh-theme-palette
|
|
2
|
+
|
|
3
|
+
[English](README.md) · [中文](README-zh.md) · [Español](README-es.md) · [Português](README-pt.md) · [हिन्दी](README-hi.md)
|
|
4
|
+
|
|
5
|
+
Paleta de tema para DeepSeek Harness (web y escritorio): **4 paletas × claro/oscuro**, dos ejes independientes.
|
|
6
|
+
|
|
7
|
+
## Compatibility
|
|
8
|
+
|
|
9
|
+
| Superficie | Estado |
|
|
10
|
+
|---|---|
|
|
11
|
+
| Cliente DSH de escritorio / web | 0.2.x |
|
|
12
|
+
| Node.js | ≥ 20 |
|
|
13
|
+
| Cambios en el código del host | ninguno |
|
|
14
|
+
|
|
15
|
+
El plugin solo apila tokens de color mediante `ctx.theme.overrideTokens`; no registra un tema, no parchea el host y no toca la preferencia de apariencia.
|
|
16
|
+
|
|
17
|
+
## What it does
|
|
18
|
+
|
|
19
|
+
- **4 paletas** — Mono, Arena cálida, Índigo, Musgo — cada una adaptada de forma independiente a claro y oscuro;
|
|
20
|
+
- la escala se **recalcula** completa: reconstrucción OKLCH → croma por rol → **ajuste al gamut sRGB** → contraste resuelto sobre superficies reales;
|
|
21
|
+
- más de 27.000 referencias de token: texto, secundario, terciario, notas, enlaces, barras laterales, tarjetas, burbuja del usuario, botón primario, barras de desplazamiento, interruptores, títulos/negritas de Markdown, bloques de código;
|
|
22
|
+
- ajustable: intensidad del texto (3), profundidad de la barra lateral (3), panel derecho (2), énfasis de Markdown, barras de desplazamiento, color de interruptores;
|
|
23
|
+
- **autorreparable**: si el host descarta la capa de override, la paleta se vuelve a aplicar;
|
|
24
|
+
- interfaz en 简体中文 / 繁體中文 / English / 日本語 (sigue el idioma del host y se puede fijar).
|
|
25
|
+
|
|
26
|
+
## Install
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
# desde npm
|
|
30
|
+
cd ~/.dsh/profiles/desktop
|
|
31
|
+
pnpm add dsh-theme-palette
|
|
32
|
+
|
|
33
|
+
# o una versión concreta
|
|
34
|
+
pnpm add dsh-theme-palette@1.4.0
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Desde el tarball del release de GitHub:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
pnpm add "https://github.com/zuoyunlai/dsh-theme-palette/releases/download/v1.4.0/dsh-theme-palette-1.4.0.tgz"
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Después **reinicia la interfaz**: un proceso en marcha conserva el módulo antiguo. Se abre en avatar → Ajustes → **Color theme**.
|
|
44
|
+
|
|
45
|
+
## Configuration
|
|
46
|
+
|
|
47
|
+
| Elemento | Opciones |
|
|
48
|
+
|---|---|
|
|
49
|
+
| Paleta | Mono · Arena cálida · Índigo · Musgo (las miniaturas siguen claro/oscuro) |
|
|
50
|
+
| Intensidad | Suave / Estándar / Fuerte — cuánto sigue el texto a la paleta |
|
|
51
|
+
| Superficies | Barra lateral (Más clara / Igual / Más oscura), panel derecho (Igual que la barra / Seguir el lienzo) |
|
|
52
|
+
| Más opciones | Idioma, énfasis de Markdown, barras de desplazamiento, interruptores |
|
|
53
|
+
|
|
54
|
+
Cada elección se aplica al instante y se guarda en `localStorage`. Claro/oscuro sigue en el control «Apariencia» del host.
|
|
55
|
+
|
|
56
|
+
## Palette engine
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
OKLCH(L, C, tono) ──► ajuste al gamut (búsqueda binaria en C) ──► hex sRGB
|
|
60
|
+
▲
|
|
61
|
+
└── croma por rol × intensidad, luego contraste sobre {lienzo, tarjeta, barra, superposición}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
- los alias semánticos mantienen cadenas `var(--dsw-static-neutral-bluish-NN)`, así que todo lo que sigue a un token sigue a la paleta;
|
|
65
|
+
- superficies claras usan los pasos 00–300, las oscuras 800–950;
|
|
66
|
+
- los mínimos de texto se exigen en tiempo de construcción: cuerpo ≥ 12, secundario ≥ 6.1, terciario/enlace ≥ 4.6, texto en barra lateral ≥ 7, texto en burbuja ≥ 7;
|
|
67
|
+
- `node palette-dev.mjs` comprueba 432 combinaciones.
|
|
68
|
+
|
|
69
|
+
Las notas de diseño, el criterio por componente y las tablas de contraste están en [docs/DESIGN.md](docs/DESIGN.md). Historial: [CHANGELOG.md](CHANGELOG.md).
|
|
70
|
+
|
|
71
|
+
## Development
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
node palette-dev.mjs # informe de tokens de todas las paletas
|
|
75
|
+
node tools/sheet.mjs # tablero de paletas → tools/sheet.html
|
|
76
|
+
node tools/shoot-sheet.mjs # captura del tablero (Chrome headless)
|
|
77
|
+
node tools/compare.mjs --dir tools/out/<run> # comparar con la línea base
|
|
78
|
+
node tools/preview-settings.mjs --lang en # renderizar la página de ajustes
|
|
79
|
+
node tools/release.mjs --dry # preflight de publicación
|
|
80
|
+
node tools/release.mjs --tag # publicar en npm + tag
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
La regresión visual tiene dos capas: el tablero de paletas (sin autenticación) y la ventana real del escritorio vía CDP (`tools/shoot-desktop.mjs`, requiere `--remote-debugging-port`). Ver [tools/README.md](tools/README.md).
|
|
84
|
+
|
|
85
|
+
## License
|
|
86
|
+
|
|
87
|
+
MIT © 2026 Zuoyunlai
|
package/README-hi.md
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# dsh-theme-palette
|
|
2
|
+
|
|
3
|
+
[English](README.md) · [中文](README-zh.md) · [Español](README-es.md) · [Português](README-pt.md) · [हिन्दी](README-hi.md)
|
|
4
|
+
|
|
5
|
+
DeepSeek Harness (वेब और डेस्कटॉप) के लिए थीम पैलेट: **4 पैलेट × लाइट/डार्क**, दो स्वतंत्र अक्ष।
|
|
6
|
+
|
|
7
|
+
## Compatibility
|
|
8
|
+
|
|
9
|
+
| सतह | स्थिति |
|
|
10
|
+
|---|---|
|
|
11
|
+
| DSH डेस्कटॉप / वेब क्लाइंट | 0.2.x |
|
|
12
|
+
| Node.js | ≥ 20 |
|
|
13
|
+
| होस्ट सोर्स में बदलाव | कोई नहीं |
|
|
14
|
+
|
|
15
|
+
प्लगइन केवल `ctx.theme.overrideTokens` से रंग टोकन की एक परत जोड़ता है; यह नया थीम पंजीकृत नहीं करता, होस्ट को पैच नहीं करता और अपीयरेंस सेटिंग नहीं बदलता।
|
|
16
|
+
|
|
17
|
+
## What it does
|
|
18
|
+
|
|
19
|
+
- **4 पैलेट** — मोनो, वार्म सैंड, इंडिगो, मॉस — हर एक लाइट और डार्क दोनों के लिए अलग से अनुकूलित;
|
|
20
|
+
- पूरी रैंप **दोबारा गणना** होती है, बदली नहीं जाती: OKLCH पुनर्निर्माण → भूमिका-आधारित क्रोमा → **sRGB गैमट क्लैंप** → वास्तविक सतहों पर कंट्रास्ट हल;
|
|
21
|
+
- 27,000+ टोकन संदर्भ शामिल: मुख्य टेक्स्ट, द्वितीयक, तृतीयक, कैप्शन, लिंक, साइडबार, कार्ड, उपयोगकर्ता बबल, प्राइमरी बटन, स्क्रॉलबार, स्विच, Markdown शीर्षक/बोल्ड, कोड ब्लॉक;
|
|
22
|
+
- समायोज्य: टेक्स्ट की तीव्रता (3), साइडबार की गहराई (3), दायाँ पैनल (2), Markdown ज़ोर, स्क्रॉलबार, स्विच का रंग;
|
|
23
|
+
- **स्व-उपचार**: यदि होस्ट ओवरराइड परत हटा दे, पैलेट फिर से लगा दी जाती है;
|
|
24
|
+
- इंटरफ़ेस 简体中文 / 繁體中文 / English / 日本語 में (होस्ट की भाषा का पालन करता है, हाथ से भी चुना जा सकता है)।
|
|
25
|
+
|
|
26
|
+
## Install
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
# npm से
|
|
30
|
+
cd ~/.dsh/profiles/desktop
|
|
31
|
+
pnpm add dsh-theme-palette
|
|
32
|
+
|
|
33
|
+
# या कोई विशेष संस्करण
|
|
34
|
+
pnpm add dsh-theme-palette@1.4.0
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
GitHub रिलीज़ के tarball से:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
pnpm add "https://github.com/zuoyunlai/dsh-theme-palette/releases/download/v1.4.0/dsh-theme-palette-1.4.0.tgz"
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
इसके बाद **GUI को फिर से शुरू करें** — चल रहा प्रोसेस पुराना मॉड्यूल रखता है। खोलें: अवतार → सेटिंग्स → **Color theme**।
|
|
44
|
+
|
|
45
|
+
## Configuration
|
|
46
|
+
|
|
47
|
+
| विकल्प | विकल्प |
|
|
48
|
+
|---|---|
|
|
49
|
+
| पैलेट | मोनो · वार्म सैंड · इंडिगो · मॉस (थंबनेल लाइट/डार्क का पालन करते हैं) |
|
|
50
|
+
| तीव्रता | शांत / मानक / गहरा — टेक्स्ट पैलेट का कितना पालन करे |
|
|
51
|
+
| सतहें | साइडबार (हल्का / समान / गहरा), दायाँ पैनल (साइडबार जैसा / कैनवास जैसा) |
|
|
52
|
+
| और विकल्प | भाषा, Markdown ज़ोर, स्क्रॉलबार, स्विच/चेक |
|
|
53
|
+
|
|
54
|
+
हर चुनाव तुरंत लागू होता है और `localStorage` में सहेजा जाता है। लाइट/डार्क होस्ट की «अपीयरेंस» सेटिंग में ही रहता है।
|
|
55
|
+
|
|
56
|
+
## Palette engine
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
OKLCH(L, C, ह्यू) ──► गैमट क्लैंप (C पर बाइनरी खोज) ──► sRGB हेक्स
|
|
60
|
+
▲
|
|
61
|
+
└── भूमिका क्रोमा × तीव्रता, फिर {कैनवास, कार्ड, साइडबार, ओवरले} पर कंट्रास्ट
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
- सेमांटिक एलियस `var(--dsw-static-neutral-bluish-NN)` श्रृंखलाएँ बनाए रखते हैं, इसलिए जो भी टोकन का पालन करता है वह पैलेट का भी करता है;
|
|
65
|
+
- लाइट सतहें स्टेप 00–300, डार्क सतहें 800–950;
|
|
66
|
+
- टेक्स्ट की न्यूनतम सीमा बनाते समय लागू: मुख्य ≥ 12, द्वितीयक ≥ 6.1, तृतीयक/लिंक ≥ 4.6, साइडबार में ≥ 7, बबल में ≥ 7;
|
|
67
|
+
- `node palette-dev.mjs` 432 संयोजन जाँचता है।
|
|
68
|
+
|
|
69
|
+
डिज़ाइन नोट्स, घटक-वार तर्क और कंट्रास्ट तालिकाएँ [docs/DESIGN.md](docs/DESIGN.md) में। इतिहास: [CHANGELOG.md](CHANGELOG.md)।
|
|
70
|
+
|
|
71
|
+
## Development
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
node palette-dev.mjs # सभी पैलेट का टोकन रिपोर्ट
|
|
75
|
+
node tools/sheet.mjs # पैलेट बोर्ड → tools/sheet.html
|
|
76
|
+
node tools/shoot-sheet.mjs # बोर्ड का स्क्रीनशॉट (हेडलेस Chrome)
|
|
77
|
+
node tools/compare.mjs --dir tools/out/<run> # बेसलाइन से तुलना
|
|
78
|
+
node tools/preview-settings.mjs --lang en # सेटिंग्स पेज रेंडर करें
|
|
79
|
+
node tools/release.mjs --dry # रिलीज़ प्रीफ़्लाइट
|
|
80
|
+
node tools/release.mjs --tag # npm पर प्रकाशित + टैग
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
स्क्रीनशॉट रिग्रेशन की दो परतें हैं: पैलेट बोर्ड (बिना लॉगिन) और CDP से असली डेस्कटॉप विंडो (`tools/shoot-desktop.mjs`, `--remote-debugging-port` चाहिए)। देखें [tools/README.md](tools/README.md)।
|
|
84
|
+
|
|
85
|
+
## License
|
|
86
|
+
|
|
87
|
+
MIT © 2026 Zuoyunlai
|
package/README-pt.md
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# dsh-theme-palette
|
|
2
|
+
|
|
3
|
+
[English](README.md) · [中文](README-zh.md) · [Español](README-es.md) · [Português](README-pt.md) · [हिन्दी](README-hi.md)
|
|
4
|
+
|
|
5
|
+
Paleta de tema para o DeepSeek Harness (web e desktop): **4 paletas × claro/escuro**, dois eixos independentes.
|
|
6
|
+
|
|
7
|
+
## Compatibility
|
|
8
|
+
|
|
9
|
+
| Superfície | Estado |
|
|
10
|
+
|---|---|
|
|
11
|
+
| Cliente DSH desktop / web | 0.2.x |
|
|
12
|
+
| Node.js | ≥ 20 |
|
|
13
|
+
| Alterações no código do host | nenhuma |
|
|
14
|
+
|
|
15
|
+
O plugin apenas empilha tokens de cor via `ctx.theme.overrideTokens`; não registra um tema, não altera o host e não toca na preferência de aparência.
|
|
16
|
+
|
|
17
|
+
## What it does
|
|
18
|
+
|
|
19
|
+
- **4 paletas** — Mono, Areia quente, Índigo, Musgo — cada uma adaptada de forma independente ao claro e ao escuro;
|
|
20
|
+
- a escala é **recalculada** por completo: reconstrução OKLCH → croma por papel → **limite de gamut sRGB** → contraste resolvido sobre superfícies reais;
|
|
21
|
+
- mais de 27.000 referências de token: texto, secundário, terciário, legendas, links, barras laterais, cartões, balão do usuário, botão primário, barras de rolagem, interruptores, títulos/negrito de Markdown, blocos de código;
|
|
22
|
+
- ajustável: intensidade do texto (3), profundidade da barra lateral (3), painel direito (2), ênfase de Markdown, barras de rolagem, cor dos interruptores;
|
|
23
|
+
- **autorrecuperação**: se o host descartar a camada de override, a paleta é reaplicada;
|
|
24
|
+
- interface em 简体中文 / 繁體中文 / English / 日本語 (segue o idioma do host e pode ser fixada).
|
|
25
|
+
|
|
26
|
+
## Install
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
# via npm
|
|
30
|
+
cd ~/.dsh/profiles/desktop
|
|
31
|
+
pnpm add dsh-theme-palette
|
|
32
|
+
|
|
33
|
+
# ou uma versão específica
|
|
34
|
+
pnpm add dsh-theme-palette@1.4.0
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
A partir do tarball do release do GitHub:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
pnpm add "https://github.com/zuoyunlai/dsh-theme-palette/releases/download/v1.4.0/dsh-theme-palette-1.4.0.tgz"
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Depois **reinicie a interface**: um processo em execução mantém o módulo antigo. Abra em avatar → Configurações → **Color theme**.
|
|
44
|
+
|
|
45
|
+
## Configuration
|
|
46
|
+
|
|
47
|
+
| Item | Opções |
|
|
48
|
+
|---|---|
|
|
49
|
+
| Paleta | Mono · Areia quente · Índigo · Musgo (as miniaturas seguem claro/escuro) |
|
|
50
|
+
| Intensidade | Suave / Padrão / Forte — quanto o texto segue a paleta |
|
|
51
|
+
| Superfícies | Barra lateral (Mais clara / Igual / Mais escura), painel direito (Igual à barra / Seguir a tela) |
|
|
52
|
+
| Mais opções | Idioma, ênfase de Markdown, barras de rolagem, interruptores |
|
|
53
|
+
|
|
54
|
+
Cada escolha aplica na hora e fica em `localStorage`. Claro/escuro continua no controle «Aparência» do host.
|
|
55
|
+
|
|
56
|
+
## Palette engine
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
OKLCH(L, C, matiz) ──► limite de gamut (busca binária em C) ──► hex sRGB
|
|
60
|
+
▲
|
|
61
|
+
└── croma por papel × intensidade, depois contraste sobre {tela, cartão, barra, sobreposição}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
- os aliases semânticos mantêm cadeias `var(--dsw-static-neutral-bluish-NN)`, então tudo que segue um token segue a paleta;
|
|
65
|
+
- superfícies claras usam os passos 00–300, as escuras 800–950;
|
|
66
|
+
- os pisos de texto são exigidos na construção: corpo ≥ 12, secundário ≥ 6.1, terciário/link ≥ 4.6, texto na barra lateral ≥ 7, texto no balão ≥ 7;
|
|
67
|
+
- `node palette-dev.mjs` verifica 432 combinações.
|
|
68
|
+
|
|
69
|
+
Notas de design, critério por componente e tabelas de contraste em [docs/DESIGN.md](docs/DESIGN.md). Histórico: [CHANGELOG.md](CHANGELOG.md).
|
|
70
|
+
|
|
71
|
+
## Development
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
node palette-dev.mjs # relatório de tokens de todas as paletas
|
|
75
|
+
node tools/sheet.mjs # painel de paletas → tools/sheet.html
|
|
76
|
+
node tools/shoot-sheet.mjs # captura do painel (Chrome headless)
|
|
77
|
+
node tools/compare.mjs --dir tools/out/<run> # comparar com a linha de base
|
|
78
|
+
node tools/preview-settings.mjs --lang en # renderizar a página de ajustes
|
|
79
|
+
node tools/release.mjs --dry # pré-checagem de release
|
|
80
|
+
node tools/release.mjs --tag # publicar no npm + tag
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
A regressão visual tem duas camadas: o painel de paletas (sem autenticação) e a janela real do desktop via CDP (`tools/shoot-desktop.mjs`, requer `--remote-debugging-port`). Veja [tools/README.md](tools/README.md).
|
|
84
|
+
|
|
85
|
+
## License
|
|
86
|
+
|
|
87
|
+
MIT © 2026 Zuoyunlai
|
package/README-zh.md
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# dsh-theme-palette
|
|
2
|
+
|
|
3
|
+
[English](README.md) · [中文](README-zh.md) · [Español](README-es.md) · [Português](README-pt.md) · [हिन्दी](README-hi.md)
|
|
4
|
+
|
|
5
|
+
DeepSeek Harness(Web / 桌面)的主题配色插件:**4 套配色 × 明暗两模式**,两个轴互相独立。
|
|
6
|
+
|
|
7
|
+
## Compatibility
|
|
8
|
+
|
|
9
|
+
| 项目 | 状态 |
|
|
10
|
+
|---|---|
|
|
11
|
+
| DSH 桌面 / Web 客户端 | 0.2.x |
|
|
12
|
+
| Node.js | ≥ 20 |
|
|
13
|
+
| 对宿主源码的改动 | 无 |
|
|
14
|
+
|
|
15
|
+
插件只用 `ctx.theme.overrideTokens` 叠一层颜色 token:不注册主题、不改宿主、不动「外观」偏好。
|
|
16
|
+
|
|
17
|
+
## What it does
|
|
18
|
+
|
|
19
|
+
- **4 套配色** —— 黑白 / 暖砂 / 靛蓝 / 苔绿,各自独立适配明暗两侧;
|
|
20
|
+
- 色阶**整体重算**而不是替换:OKLCH 重建 → 角色化色度 → **sRGB 色域钳位** → 在真实承载面上求解对比度;
|
|
21
|
+
- 覆盖 27,000+ 处 token 引用:正文、次级、三级、注释、链接、侧栏、卡片、主人气泡、主按钮、滚动条、开关、Markdown 标题/加粗、代码块;
|
|
22
|
+
- 可调:文字着色三档、侧栏三档、右栏两档、Markdown 强调、滚动条、开关配色;
|
|
23
|
+
- **自愈**:宿主丢弃 override 层时自动重放;
|
|
24
|
+
- 界面支持 简体中文 / 繁體中文 / English / 日本語(跟随宿主,也可手选)。
|
|
25
|
+
|
|
26
|
+
## Install
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
# 从 npm
|
|
30
|
+
cd ~/.dsh/profiles/desktop
|
|
31
|
+
pnpm add dsh-theme-palette
|
|
32
|
+
|
|
33
|
+
# 或指定版本
|
|
34
|
+
pnpm add dsh-theme-palette@1.4.0
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
从 GitHub Release 的 tarball:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
pnpm add "https://github.com/zuoyunlai/dsh-theme-palette/releases/download/v1.4.0/dsh-theme-palette-1.4.0.tgz"
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
装完**必须重启 GUI**(运行中的进程仍持旧模块)。入口:左下角头像 → **设置** → 「**主题色**」。
|
|
44
|
+
|
|
45
|
+
## Configuration
|
|
46
|
+
|
|
47
|
+
| 项 | 选项 |
|
|
48
|
+
|---|---|
|
|
49
|
+
| 配色 | 黑白 · 暖砂 · 靛蓝 · 苔绿(卡片缩略图跟随明暗) |
|
|
50
|
+
| 强度 | 静 / 标准 / 浓 —— 正文与强调的着色程度 |
|
|
51
|
+
| 面板表面 | 左侧栏(更浅 / 同色 / 更深)、右侧栏(同左栏 / 跟随画布) |
|
|
52
|
+
| 更多选项 | 语言、Markdown 强调、滚动条、开关 / 勾选 |
|
|
53
|
+
|
|
54
|
+
选择即时生效并存在 `localStorage`;明暗仍由宿主「外观」控制。
|
|
55
|
+
|
|
56
|
+
## Palette engine
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
OKLCH(L, C, hue) ──► 色域钳位(对 C 二分) ──► sRGB hex
|
|
60
|
+
▲
|
|
61
|
+
└── 角色色度 × 强度,再在 {画布, 卡层, 侧栏, 悬浮层} 上求解对比度
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
- 语义别名保留 `var(--dsw-static-neutral-bluish-NN)` 引用链,跟 token 的元素就跟着配色走;
|
|
65
|
+
- 浅色面用色阶 00–300,深色面用 800–950;
|
|
66
|
+
- 文字下限在构建期强制:正文 ≥ 12、次级 ≥ 6.1、三级/链接 ≥ 4.6、侧栏内 ≥ 7、气泡内 ≥ 7;
|
|
67
|
+
- `node palette-dev.mjs` 跑 432 组配置。
|
|
68
|
+
|
|
69
|
+
逐组件设计取舍与对比度表见 [docs/DESIGN.md](docs/DESIGN.md),版本记录见 [CHANGELOG.md](CHANGELOG.md)。
|
|
70
|
+
|
|
71
|
+
## Development
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
node palette-dev.mjs # 全部配色的 token 报表
|
|
75
|
+
node tools/sheet.mjs # 配色看板 → tools/sheet.html
|
|
76
|
+
node tools/shoot-sheet.mjs # 无头 Chrome 截看板
|
|
77
|
+
node tools/compare.mjs --dir tools/out/<run> # 与基线比
|
|
78
|
+
node tools/preview-settings.mjs --lang en # 渲染设置页
|
|
79
|
+
node tools/release.mjs --dry # 发版预检
|
|
80
|
+
node tools/release.mjs --tag # 发 npm + 打 tag
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
截图回归分两层:配色看板(免登录)与桌面真机窗口(`tools/shoot-desktop.mjs`,需要 `--remote-debugging-port`)。见 [tools/README.md](tools/README.md)。
|
|
84
|
+
|
|
85
|
+
## License
|
|
86
|
+
|
|
87
|
+
MIT © 2026 Zuoyunlai
|
package/README.md
CHANGED
|
@@ -1,213 +1,87 @@
|
|
|
1
1
|
# dsh-theme-palette
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[English](README.md) · [中文](README-zh.md) · [Español](README-es.md) · [Português](README-pt.md) · [हिन्दी](README-hi.md)
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
选择即时生效,存在 `localStorage`。
|
|
5
|
+
Theme palette for DeepSeek Harness (web & desktop): **4 palettes × light/dark**, two independent axes.
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
## Compatibility
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
- **4 套配色**(黑白 / 暖砂 / 靛蓝 / 苔绿)× **明暗两模式**,两个轴互相独立;
|
|
13
|
-
- 色阶**整体重算**(OKLCH 重建 + 色域钳位 + 在真实承载面上求解对比度),不是换几个变量;
|
|
14
|
-
- 覆盖 27,000+ 处 token 引用:正文、次级、三级、注释、链接、侧栏、卡片、气泡、主按钮、滚动条、开关、Markdown 标题/加粗、代码块;
|
|
15
|
-
- 四种界面语言:简体中文 / 繁體中文 / English / 日本語(自动跟随宿主,也可手选);
|
|
16
|
-
- **自愈**:宿主丢弃 override 层时自动重放。
|
|
17
|
-
|
|
18
|
-
## 使用
|
|
19
|
-
|
|
20
|
-
左下角头像 → **设置** → 左侧导航「**主题色**」:
|
|
21
|
-
|
|
22
|
-
| 项 | 选项 |
|
|
9
|
+
| Surface | Status |
|
|
23
10
|
|---|---|
|
|
24
|
-
|
|
|
25
|
-
|
|
|
26
|
-
|
|
|
27
|
-
| 更多选项 | 语言、Markdown 强调、滚动条、开关/勾选 |
|
|
11
|
+
| DSH desktop / web client | 0.2.x |
|
|
12
|
+
| Node.js | ≥ 20 |
|
|
13
|
+
| Changes to host source | none |
|
|
28
14
|
|
|
29
|
-
|
|
15
|
+
The plugin only stacks colour tokens through `ctx.theme.overrideTokens`; it does not register a theme, patch the host, or touch the appearance preference.
|
|
30
16
|
|
|
31
|
-
|
|
17
|
+
## What it does
|
|
32
18
|
|
|
33
|
-
|
|
19
|
+
- **4 palettes** — Mono, Warm sand, Indigo, Moss — each adapting to light *and* dark independently;
|
|
20
|
+
- the whole ramp is **recomputed**, not swapped: OKLCH rebuild → role-based chroma → **sRGB gamut clamp** → contrast solved on real surfaces;
|
|
21
|
+
- 27,000+ token references covered: body, secondary, tertiary, captions, links, sidebars, cards, user bubble, primary button, scrollbars, switches, Markdown headings/bold, code blocks;
|
|
22
|
+
- adjustable: text tint (3), sidebar depth (3), right panel (2), Markdown emphasis, scrollbars, switch colour;
|
|
23
|
+
- **self-healing**: if the host drops the override layer, the palette is re-applied;
|
|
24
|
+
- UI in 简体中文 / 繁體中文 / English / 日本語 (follows the host language, can be pinned).
|
|
34
25
|
|
|
35
|
-
|
|
26
|
+
## Install
|
|
36
27
|
|
|
37
28
|
```bash
|
|
38
|
-
#
|
|
29
|
+
# from npm
|
|
39
30
|
cd ~/.dsh/profiles/desktop
|
|
40
31
|
pnpm add dsh-theme-palette
|
|
41
32
|
|
|
42
|
-
#
|
|
43
|
-
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
从 GitHub Release 的 tarball(npm 不可达时):
|
|
47
|
-
|
|
48
|
-
```bash
|
|
49
|
-
pnpm add "https://github.com/zuoyunlai/dsh-theme-palette/releases/download/v1.3.1/dsh-theme-palette-1.3.1.tgz"
|
|
33
|
+
# or a specific version
|
|
34
|
+
pnpm add dsh-theme-palette@1.4.0
|
|
50
35
|
```
|
|
51
36
|
|
|
52
|
-
|
|
37
|
+
From the GitHub Release tarball:
|
|
53
38
|
|
|
54
39
|
```bash
|
|
55
|
-
|
|
56
|
-
dsh plugin --profile desktop add "$PWD/dsh-theme-palette"
|
|
40
|
+
pnpm add "https://github.com/zuoyunlai/dsh-theme-palette/releases/download/v1.4.0/dsh-theme-palette-1.4.0.tgz"
|
|
57
41
|
```
|
|
58
42
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
> 开发时注意:`node_modules/dsh-theme-palette` 是**副本**,改源码后要
|
|
62
|
-
> `rm -rf node_modules/dsh-theme-palette && pnpm install` —— `pnpm add` 对已存在的
|
|
63
|
-
> `file:` 目录不会刷新内容。
|
|
64
|
-
|
|
65
|
-
安装后:左下角头像 → 设置 → 左侧「**主题色**」。
|
|
66
|
-
|
|
67
|
-
## 配色怎么算
|
|
68
|
-
|
|
69
|
-
1. **OKLCH 重建色阶**:保留每一步的感知亮度,只换色相与色度。
|
|
70
|
-
2. **色度按 UI 角色给**:浅色底 0.013–0.024、中间灰 0.006、浅色正文 0.004、
|
|
71
|
-
深色层 0.014–0.028、深色正文 0.009–0.014。正文只给极低色度以保证字形锐利。
|
|
72
|
-
**深色层的色度必须按色相分别给**,不能三套共用一个数:绝对色度不决定观感,占比才决定 ——
|
|
73
|
-
L 0.23 处可用色域是暖砂 0.048 / 苔绿 0.061 / 靛蓝 0.157,同一个 0.016 会得到
|
|
74
|
-
35% / 23% / 11% 三种相对饱和度(暖砂发脏、靛蓝发灰)。现在三套分别落在 30% / 24% / 19%。
|
|
75
|
-
深色层的色度权重也**不随明度递减**(`800/850/875` = 1.0 / 1.0 / 0.95):层与层之间只靠明度分层,
|
|
76
|
-
权重递减会让卡片/模块比画布灰 30–45%,读作「换了一种材质」。
|
|
77
|
-
3. **近白端等量下移 0.032**(`L ≥ 0.92`):不是压缩斜率。压缩会把「画布↔卡层」的 ΔL
|
|
78
|
-
从 0.031 压到 0.0147,而 `L<0.92` 那段又没压,明度节奏会在边界处断层。
|
|
79
|
-
4. **对比度求解到真实承载面**:三级文字与链接大量落在卡层 `60`、悬浮层 `150`、深模块 `800` 上,
|
|
80
|
-
所以靶点用这些面而不是画布;上限 ±0.13(从 4.41 抬到 4.62 需要 ΔL≈0.096)。
|
|
81
|
-
|
|
82
|
-
覆盖 **75 个 token / 套**:4 条静态色阶(19+16+10+12)+ 14 个**字面量**别名
|
|
83
|
-
(边框 `border-l1..l4`、`bg-skeleton`、`menu-group-surface`、`interactive-bg-hover/-active/-hover-accent`、
|
|
84
|
-
`button-tool-bar-*`、`bg-mask-drop` 等)+ 3 个侧栏 token。
|
|
85
|
-
|
|
86
|
-
## 对比度(按真实承载面实测)
|
|
87
|
-
|
|
88
|
-
暖砂一行为例(三套同构,差在 0.01 量级):
|
|
89
|
-
|
|
90
|
-
| 承载面 | 底 | 主文本 | 次文本 | 三级 | 链接 |
|
|
91
|
-
|---|---|---|---|---|---|
|
|
92
|
-
| 画布 `00` | `#fbf4e3` | 17.23 | 6.78 | 5.02 | 5.57 |
|
|
93
|
-
| 卡层 `60` | `#f2ebdb` | 15.90 | 6.26 | 4.63 | 5.14 |
|
|
94
|
-
| 深画布 `950` | `#1e1b14` | 14.98 | 11.39 | 8.02 | 7.36 |
|
|
95
|
-
| 深层1 `875` | `#2c2922` | 12.65 | 9.62 | 6.77 | 6.22 |
|
|
96
|
-
| 深卡 `850` | `#36332b` | 10.99 | 8.36 | 5.89 | 5.40 |
|
|
97
|
-
| 深模块 `800` | `#403c35` | 9.56 | 7.27 | 5.12 | 4.70 |
|
|
43
|
+
Then **restart the GUI** — a running process keeps the old module. Open it from avatar → Settings → **Color theme**.
|
|
98
44
|
|
|
99
|
-
|
|
100
|
-
见 §品牌基准色与链接。
|
|
45
|
+
## Configuration
|
|
101
46
|
|
|
102
|
-
|
|
103
|
-
所以深色的三级文字与链接要按**最亮的那个面**(`800`)兜底,而不是按画布。
|
|
104
|
-
|
|
105
|
-
**承诺范围**:`00 / 60 / 800 / 850 / 875 / 950` 全部 ≥ AA(三级与链接 4.62 起),
|
|
106
|
-
正文在所有深色面上 ≥ 8.95(AAA 的 7 线有余量)。三套配色 **0 处低于下限**。
|
|
107
|
-
|
|
108
|
-
`palette-dev.mjs` 把「合规下限」与「设计目标」分开记:低于 WCAG 线打 `✗` 并计数,
|
|
109
|
-
只低于设计目标(深色正文 ≥ 10)打 `△`、不计违规。现在唯一带 `△` 的是 `800` 面的正文
|
|
110
|
-
(8.95–9.56)—— 那是「最亮的深色面 + 近白文字」的固有代价,不是还没修好的违规。
|
|
111
|
-
悬浮层 `150`(toast / tooltip / popover)**不在承诺内**:宿主在这些面上本来就用白字,
|
|
112
|
-
在参数上补偿会把强调色冲淡;需要时由宿主自己保证。
|
|
113
|
-
|
|
114
|
-
## 四套配色的落色
|
|
115
|
-
|
|
116
|
-
| | 画布 | 卡层 | 正文 | 次文 | 三级 | 强调 | 深底 | 深卡 | 深正文 | 深强调 |
|
|
117
|
-
|---|---|---|---|---|---|---|---|---|---|---|
|
|
118
|
-
| 暖砂 | `#fbf4e3` | `#f2ebdb` | `#12110d` | `#575551` | `#696967` | **`#a9683e`** | `#1e1b14` | `#36332b` | `#f5efe0` | `#c8a28b` |
|
|
119
|
-
| 靛蓝 | `#eff5ff` | `#e7ebf6` | `#0f1114` | `#53555a` | `#676869` | **`#3f66a3`** | `#161c2a` | `#2e3443` | `#ebeff9` | `#95acd0` |
|
|
120
|
-
| 苔绿 | `#eef7f0` | `#e6eee7` | `#0f120f` | `#525753` | `#686968` | **`#4f7a42`** | `#1a211b` | `#313933` | `#e7f3e9` | `#9cb695` |
|
|
121
|
-
|
|
122
|
-
「强调」列是设计稿给的**基准色**(色阶 `500`),「深强调」是由它派生的深色侧强调(色阶 `400`)。
|
|
123
|
-
|
|
124
|
-
深底三套的明度**故意不同**(L 0.223 / 0.227 / 0.239):低色度下色相换不来区分度,
|
|
125
|
-
三套原本都落在 0.230,结果暖砂↔苔绿在深色层上只差 ΔE 1.15(低于 JND 2,等于分不出)。
|
|
126
|
-
错开明度后最小一对是 2.05。
|
|
127
|
-
|
|
128
|
-
黑白走宿主原值(`#ffffff` / `#151517`),只叠侧栏档位 —— 它没有色调可继承。
|
|
129
|
-
|
|
130
|
-
## 挂在哪一层
|
|
131
|
-
|
|
132
|
-
注册 **`settings.section`**(设置侧栏独立一节)。官方内置节顺序 account -10 / general 0 / models 10 /
|
|
133
|
-
plugins 15 / agent-presets 20,本插件 `order: 5`,紧跟「通用」之后。页面自己画标题(`h2` 18px/600),
|
|
134
|
-
与官方 `AgentPresetSection` 一致 —— `settings.section` 只渲染侧栏条目(文字取 `label()`),不渲染内容标题。
|
|
135
|
-
|
|
136
|
-
## 结构
|
|
137
|
-
|
|
138
|
-
| 文件 | 作用 |
|
|
47
|
+
| Item | Options |
|
|
139
48
|
|---|---|
|
|
140
|
-
|
|
|
141
|
-
|
|
|
142
|
-
|
|
|
143
|
-
|
|
|
144
|
-
|
|
145
|
-
`palette-dev.mjs` 通过 `window.__DSH_THEME_PALETTE_DEV__` 这个开发期钩子拿到
|
|
146
|
-
`buildTokens / SCHEMES / SIDEBAR_MODES`,不再保留第二份配色实现 ——
|
|
147
|
-
早先它自带一套旧引擎,报表和上线不是同一套。
|
|
148
|
-
|
|
149
|
-
## 调参
|
|
150
|
-
|
|
151
|
-
```js
|
|
152
|
-
{ id: 'warm', label: '暖砂', desc: '米白 + 棕调', tinted: true,
|
|
153
|
-
hue: 88, lightC: 0.024, midC: 0.006, textC: 0.004, // 灰阶:色相 + 三档色度
|
|
154
|
-
darkC: 0.014, darkLift: 0.026, paperC: 0.014, // 深色:层色度 / 明度错位 / 正文色度
|
|
155
|
-
accentHue: 52.4, accentC: 0.101, accentL: 0.58, // 强调:色相 / 色度 / 基准档明度
|
|
156
|
-
accentScale: 1.0 } // 整条强调色阶的明度倍率(保持 1.0)
|
|
157
|
-
```
|
|
49
|
+
| Palette | Mono · Warm sand · Indigo · Moss (thumbnails follow light/dark) |
|
|
50
|
+
| Strength | Quiet / Standard / Strong — how much body text follows the palette |
|
|
51
|
+
| Panel surfaces | Sidebar (Lighter / Same / Deeper), right panel (Match sidebar / Follow canvas) |
|
|
52
|
+
| More options | Language, Markdown emphasis, scrollbars, switches/checks |
|
|
158
53
|
|
|
159
|
-
|
|
160
|
-
卡片预览色、`info` 按钮、焦点环全部自动跟随;链接会自己派生一条够 AA 的(见 §品牌基准色与链接)。
|
|
161
|
-
把目标颜色换成 OKLCH 的现成方法:`toOklch('#a9683e')` → `[0.5799, 0.1012, 52.3]`,
|
|
162
|
-
分别填进 `accentL` / `accentC` / `accentHue`,再用 `node palette-dev.mjs` 核 `500` 是否逐位对上
|
|
163
|
-
(8-bit 取整偶尔差 1,把 `accentHue` 挪 0.1–0.5° 即可)。
|
|
54
|
+
Every choice applies immediately and is stored in `localStorage`. Light/dark stays under the host’s Appearance control.
|
|
164
55
|
|
|
165
|
-
|
|
56
|
+
## Palette engine
|
|
166
57
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
58
|
+
```
|
|
59
|
+
OKLCH(L, C, hue) ──► gamut clamp (binary search on C) ──► sRGB hex
|
|
60
|
+
▲
|
|
61
|
+
└── role chroma × intensity, then contrast solve on {canvas, card, sidebar, overlay}
|
|
62
|
+
```
|
|
172
63
|
|
|
173
|
-
|
|
174
|
-
|
|
64
|
+
- semantic aliases keep `var(--dsw-static-neutral-bluish-NN)` chains, so anything following a token follows the palette;
|
|
65
|
+
- light surfaces use steps 00–300, dark surfaces 800–950;
|
|
66
|
+
- text floors are enforced at build time: body ≥ 12, secondary ≥ 6.1, tertiary/link ≥ 4.6, sidebar text ≥ 7, bubble text ≥ 7;
|
|
67
|
+
- 432 configuration combos are checked by `node palette-dev.mjs`.
|
|
175
68
|
|
|
176
|
-
|
|
177
|
-
文字着色倍率在 `TEXT_MODES` 里(`textScale` 管浅色正文、`paperScale` 管深色正文)。
|
|
178
|
-
`accentScale` 保持 1.0 —— 它是乘性的,压低会把强调色浅端(`deepseek-50/100/200`)整条压塌,
|
|
179
|
-
而这几个正是宿主的「选中态软底」。
|
|
69
|
+
Design notes, per-component rationale and the contrast tables live in [docs/DESIGN.md](docs/DESIGN.md). Release history: [CHANGELOG.md](CHANGELOG.md).
|
|
180
70
|
|
|
181
|
-
##
|
|
71
|
+
## Development
|
|
182
72
|
|
|
183
73
|
```bash
|
|
184
|
-
node
|
|
185
|
-
node tools/
|
|
186
|
-
node tools/
|
|
74
|
+
node palette-dev.mjs # token report for all palettes
|
|
75
|
+
node tools/sheet.mjs # palette board → tools/sheet.html
|
|
76
|
+
node tools/shoot-sheet.mjs # screenshot the board (headless Chrome)
|
|
77
|
+
node tools/compare.mjs --dir tools/out/<run> # diff against baseline
|
|
78
|
+
node tools/preview-settings.mjs --lang en # render the settings page
|
|
79
|
+
node tools/release.mjs --dry # release preflight
|
|
80
|
+
node tools/release.mjs --tag # publish to npm + tag
|
|
187
81
|
```
|
|
188
82
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
- 悬浮层 `150` 上三级文字 4.22–4.27,不在承诺内(见上)。
|
|
196
|
-
- **暖砂基准色上的白字只有 4.43**(靛蓝 5.77、苔绿 5.01)。宿主把 `deepseek-500` 当
|
|
197
|
-
`button-info-fill` 的填充色,若那里写白字,4.43 差 0.07 到 AA —— 这是 `#a9683e` 这个颜色
|
|
198
|
-
本身的属性(赭石色偏亮),不是参数能修的。要过就把该按钮的文字换成深端(`deepseek-900`
|
|
199
|
-
那侧)或改 15px 以下的字号策略。
|
|
200
|
-
- **基准色与链接色是两条线**:`--dsw-static-deepseek-500` 是设计标准值(填充/焦点环/预览色),
|
|
201
|
-
`--dsw-alias-link` 是派生色。任何新加的 UI 若把 500 当**文字**用,都会踩 AA(暖砂 3.40)。
|
|
202
|
-
- 深色最亮的承载面 `800`(layer-3 / module)上链接是 4.65(0.8.2 后 4.64–4.70),只比阈值高
|
|
203
|
-
0.02–0.08 —— 那是求解器靶点决定的(`MIN_LINK_DARK = 4.62`)。**以后若再抬 `darkLift`,
|
|
204
|
-
必须同步抬 `MIN_LINK_DARK`**,否则链接会在 AA 线上横跳。
|
|
205
|
-
- `paperC` 只服务 `50` 号色,而 `50` 号在浅色侧同时是菜单表面的基色(`menu-surface-fill`):
|
|
206
|
-
`paperScale` 任何放大都会顺带把浅色菜单染深。0.8.1 把 `paperC` 降下来后这个耦合的影响变小了,
|
|
207
|
-
但结构还在。真要解耦得让 `50` 号不再兼任「深色正文」与「浅色表面」。
|
|
208
|
-
- 深色三档文字色拉不开(ΔE 0.4–1.0)是 sRGB 近白天花板决定的物理限制,
|
|
209
|
-
不是参数没调对 —— 别为拉档差去抬 `paperScale`。
|
|
210
|
-
- 黑白配色完全走宿主值,含宿主本身的 3.71 / 4.23(AA 未达标)。要修需要给 mono 建一条
|
|
211
|
-
走引擎的色阶,属于观感变更,另行确认。
|
|
212
|
-
- `blue` 与 `deepseek` 两条色阶被染到同一色相,信息态与品牌色不可分;需要时给 `blue` 单独的色度系数。
|
|
213
|
-
- 渲染效果未在真实 GUI 里验证过(本机没有可控浏览器会话)。
|
|
83
|
+
Screenshot regression has two layers: the palette board (no auth needed) and the real desktop window via CDP (`tools/shoot-desktop.mjs`, needs `--remote-debugging-port`). See [tools/README.md](tools/README.md).
|
|
84
|
+
|
|
85
|
+
## License
|
|
86
|
+
|
|
87
|
+
MIT © 2026 Zuoyunlai
|
package/client.js
CHANGED
|
@@ -27,7 +27,7 @@ window.__ModuleLoader__.load({
|
|
|
27
27
|
const React = require('react')
|
|
28
28
|
const h = React.createElement
|
|
29
29
|
|
|
30
|
-
const PLUGIN_VERSION = '1.4.
|
|
30
|
+
const PLUGIN_VERSION = '1.4.2'
|
|
31
31
|
const STORE_KEY = 'dsh-theme-palette.v1'
|
|
32
32
|
const OVERRIDE_SOURCE = 'dsh-theme-palette'
|
|
33
33
|
|
package/locale/en.json
ADDED
package/locale/zh.json
ADDED
package/package.json
CHANGED
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-theme-palette",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.2",
|
|
4
4
|
"description": "DSH 主题配色:4 套配色 × 明暗两模式,OKLCH 色域安全重建 + 真实承载面对比度求解,可调强度与面板表面。",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": "./index.js",
|
|
9
9
|
"./client": "./client.js",
|
|
10
|
-
"./
|
|
10
|
+
"./client.js": "./client.js",
|
|
11
|
+
"./index.js": "./index.js",
|
|
12
|
+
"./cordis.patch.yml": "./cordis.patch.yml",
|
|
13
|
+
"./locale/*.json": "./locale/*.json",
|
|
14
|
+
"./icon": "./icon.svg",
|
|
15
|
+
"./package.json": "./package.json"
|
|
11
16
|
},
|
|
12
17
|
"files": [
|
|
13
18
|
"index.js",
|
|
@@ -25,13 +30,18 @@
|
|
|
25
30
|
"tools/compare.mjs",
|
|
26
31
|
"tools/release.mjs",
|
|
27
32
|
"CHANGELOG.md",
|
|
28
|
-
"docs/DESIGN.md"
|
|
33
|
+
"docs/DESIGN.md",
|
|
34
|
+
"README-zh.md",
|
|
35
|
+
"README-es.md",
|
|
36
|
+
"README-pt.md",
|
|
37
|
+
"README-hi.md",
|
|
38
|
+
"locale"
|
|
29
39
|
],
|
|
30
40
|
"peerDependencies": {
|
|
31
41
|
"@deepseek-ai/cordis": "^4.0.0"
|
|
32
42
|
},
|
|
33
43
|
"engines": {
|
|
34
|
-
"node": ">=
|
|
44
|
+
"node": "^22.19.0 || >=24.0.0"
|
|
35
45
|
},
|
|
36
46
|
"dsh": {
|
|
37
47
|
"bundle": {
|
|
@@ -67,5 +77,6 @@
|
|
|
67
77
|
"publishConfig": {
|
|
68
78
|
"access": "public",
|
|
69
79
|
"registry": "https://registry.npmjs.org"
|
|
70
|
-
}
|
|
80
|
+
},
|
|
81
|
+
"packageManager": "pnpm@11.7.0"
|
|
71
82
|
}
|
package/tools/release.mjs
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* 另外 latest 不保证自动前移,得验一次。
|
|
13
13
|
*/
|
|
14
14
|
import { execFileSync } from 'node:child_process'
|
|
15
|
-
import { readFileSync } from 'node:fs'
|
|
15
|
+
import { readFileSync, existsSync } from 'node:fs'
|
|
16
16
|
import path from 'node:path'
|
|
17
17
|
import { fileURLToPath } from 'node:url'
|
|
18
18
|
|
|
@@ -41,6 +41,19 @@ console.log(`\n发版 ${name}@${version}${has('dry') ? '(dry run)' : ''}\n`)
|
|
|
41
41
|
|
|
42
42
|
// 1. 本地检查
|
|
43
43
|
try { run(process.execPath, ['--check', 'client.js']); ok('client.js 语法') } catch { die('client.js 语法错误') }
|
|
44
|
+
// 1b. dsh.client 必须配 exports["./client"] —— 缺了宿主 client-modules 会直接启动失败
|
|
45
|
+
// (2026-10-21 实测:加 exports 却漏掉 ./client 导致重启后整个 profile 起不来)
|
|
46
|
+
{
|
|
47
|
+
const manifest = JSON.parse(readFileSync(path.join(root, 'package.json'), 'utf8'))
|
|
48
|
+
if (manifest.dsh && manifest.dsh.client) {
|
|
49
|
+
const clientRel = manifest.exports && manifest.exports['./client']
|
|
50
|
+
if (!clientRel) die('dsh.client 已声明但 exports 缺 "./client"(宿主会报 exports no "./client" bundle)')
|
|
51
|
+
const rel = typeof clientRel === 'string' ? clientRel : clientRel.default
|
|
52
|
+
if (typeof rel !== 'string' || !existsSync(path.join(root, rel))) die('exports["./client"] 指向的文件不存在:' + rel)
|
|
53
|
+
ok('client 子路径可解析:exports["./client"] → ' + rel)
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
44
57
|
const dirty = sh('git status --porcelain')
|
|
45
58
|
if (dirty) die('工作区不干净,先提交:\n' + dirty)
|
|
46
59
|
ok('工作区干净')
|