@qilin-agent/client-ui-theme-brand 3.1.6 → 3.1.8
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 +11 -8
- package/README.md +19 -7
- package/README.zh.md +19 -7
- package/lib/client.js +684 -19
- package/lib/index.js +930 -5
- package/lib/types/client/index.d.ts +6 -4
- package/lib/types/index.d.ts +11 -4
- package/lib/types/packs/blush.d.ts +18 -0
- package/lib/types/packs/mono.d.ts +17 -0
- package/lib/types/{client/tokens.d.ts → packs/qilin.d.ts} +8 -14
- package/lib/types/packs/verdant.d.ts +18 -0
- package/lib/types/skin.d.ts +44 -0
- package/package.json +5 -5
package/README.i18n.yaml
CHANGED
|
@@ -3,20 +3,23 @@
|
|
|
3
3
|
# After editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write packages/client/ui-theme-brand/README.md
|
|
5
5
|
/:
|
|
6
|
-
en:
|
|
7
|
-
zh:
|
|
6
|
+
en: 763dfb98e211e46d
|
|
7
|
+
zh: d3bdf27798087d52
|
|
8
8
|
/qilin-agent-client-ui-theme-brand:
|
|
9
9
|
en: 90f7429d1b7e9c64
|
|
10
10
|
zh: f775963209c0196c
|
|
11
11
|
/qilin-agent-client-ui-theme-brand/summary:
|
|
12
|
-
en:
|
|
13
|
-
zh:
|
|
12
|
+
en: 4e4f26b5369f41ec
|
|
13
|
+
zh: 3d62c368a35fc196
|
|
14
14
|
/qilin-agent-client-ui-theme-brand/table-of-contents:
|
|
15
15
|
en: 4e53164159b5ce41
|
|
16
16
|
zh: 024420bdbdd3e0ac
|
|
17
17
|
/qilin-agent-client-ui-theme-brand/use-this-package:
|
|
18
|
-
en:
|
|
19
|
-
zh:
|
|
18
|
+
en: 1f7a36b5e15a4999
|
|
19
|
+
zh: cd513bacec0f488f
|
|
20
|
+
/qilin-agent-client-ui-theme-brand/use-this-package/shipped-packs:
|
|
21
|
+
en: 177307a20be095c4
|
|
22
|
+
zh: d48d855384c451ae
|
|
20
23
|
/qilin-agent-client-ui-theme-brand/dev-note:
|
|
21
24
|
en: f3c698886ef928a7
|
|
22
25
|
zh: eaac63c14c20b932
|
|
@@ -27,5 +30,5 @@
|
|
|
27
30
|
en: d47c23dd182c8c5a
|
|
28
31
|
zh: db61ce21c1c13a37
|
|
29
32
|
/qilin-agent-client-ui-theme-brand/known-limitations-and-deferred-work:
|
|
30
|
-
en:
|
|
31
|
-
zh:
|
|
33
|
+
en: 73c03a4fb258d936
|
|
34
|
+
zh: 6af54d0d30818be9
|
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "QiLin brand color
|
|
2
|
+
description: "QiLin brand color skin for the Web client: alias-token overrides layered over the user's active light or dark palette."
|
|
3
3
|
kind: "package-reference"
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -9,7 +9,7 @@ English | [中文](README.zh.md)
|
|
|
9
9
|
|
|
10
10
|
## Summary
|
|
11
11
|
|
|
12
|
-
Mount this plugin beside [`ui-theme`](../ui-theme/README.md) to
|
|
12
|
+
Mount this plugin beside [`ui-theme`](../ui-theme/README.md) to ship selectable color packs. Each pack registers one `ctx.theme` skin: the user's `light`, `dark`, or `system` preference and every base token stay untouched, and only the alias tokens the pack owns are replaced while it is selected. Packs carry the product's own palette plus neutral alternatives, identified by their palette rather than a product name. Unloading the plugin restores the platform palette because every registration is a Kylin effect, and the durable skin choice survives its provider so a later load restores the user's pick.
|
|
13
13
|
|
|
14
14
|
## Table of Contents
|
|
15
15
|
|
|
@@ -23,9 +23,20 @@ Mount this plugin beside [`ui-theme`](../ui-theme/README.md) to give the QiLin W
|
|
|
23
23
|
<a id="use-this-package"></a>
|
|
24
24
|
## Use this package
|
|
25
25
|
|
|
26
|
-
The `qilin` profile mounts this package through its bundle patch, so no configuration is required. A deployment that wants
|
|
26
|
+
The `qilin` profile mounts this package through its bundle patch, so no configuration is required; the same patch sets `skin: qilin` on the `ui-theme` row, making the dark-gold pack the product default. The package's node half registers every pack's canvas colors with the Host boot registry, so the first paint already uses the selected pack's background. A deployment that wants another palette with the same base theme ships its own pack and selects it through the appearance row; the light/dark/system preference keeps composing underneath. Any user who picks a different pack switches away from the default, and the choice persists across restarts. The desktop welcome page and the Windows installer palettes are generated from the product pack by `apps/desktop/scripts/gen-desktop-theme.ts`, whose `--check` gate rejects stale artifacts.
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
### Shipped packs
|
|
29
|
+
|
|
30
|
+
| Id | Label | Light canvas | Dark canvas | Accent (light / dark) |
|
|
31
|
+
|---|---|---|---|---|
|
|
32
|
+
| `qilin` | 玄金 / Xuanjin | `#f8f5ee` | `#0d0b09` | `#8f6f2e` / `#c9a24a` |
|
|
33
|
+
| `blush` | 浅樱 / Blush | `#fbf6f4` | `#141010` | `#b25b74` / `#f2bccb` |
|
|
34
|
+
| `mono` | 黑白 / Mono | `#f4f4f4` | `#000000` | `#1a1a1a` / `#f2f2f2` |
|
|
35
|
+
| `verdant` | 墨绿 / Verdant | `#f1f6f2` | `#0a120e` | `#2f6b4b` / `#8fd0a8` |
|
|
36
|
+
|
|
37
|
+
A pack covers the same semantic families in every scheme — accent, link, canvas and layer surfaces, sidebar, component fills, ink labels, hairlines and hovers, the secondary button family, and the code/scrollbar reading surfaces — so switching packs never leaves a component on the previous palette. Tokens a pack does not name stay with the base palettes.
|
|
38
|
+
|
|
39
|
+
The dark-gold pack is the "Xuanjin" landing VI in both schemes: the dark values transplant the landing tokens verbatim, the light values derive the warm-paper counterpart ([decision note](../../../.agents/notes/implemented/architecture/2026-09-14-xuanjin-dual-scheme-palette.md)). Its tokens are grouped by family in [packs/qilin.ts](src/packs/qilin.ts).
|
|
29
40
|
|
|
30
41
|
| Role | Token | Light | Dark |
|
|
31
42
|
|---|---|---|---|
|
|
@@ -33,7 +44,7 @@ The palette is the "Xuanjin" dark-gold landing VI in both schemes: the dark valu
|
|
|
33
44
|
| Canvas | `--qilin-alias-bg-base` | `#f8f5ee` (paper) | `#0d0b09` (landing bg) |
|
|
34
45
|
| Sidebar | `--qilin-specific-sidebar-fill` | `#f1ece0` | `#0d0b09` |
|
|
35
46
|
| Link | `--qilin-alias-link` | `#7d6126` (5.3:1 on paper) | `#f3dc9e` (14.5:1) |
|
|
36
|
-
| Seal | `--qilin-specific-brand-seal-fill` | `#
|
|
47
|
+
| Seal | `--qilin-specific-brand-seal-fill` | `#b7352c` | `#c94a40` |
|
|
37
48
|
|
|
38
49
|
Feature components consume these through the `--qilin-alias-*` aliases they already use, so the palette reaches the sidebar, composer, conversation, and deliverables without any component being aware of QiLin. Hover keeps each platform's convention (dark brightens toward gold-300, light deepens toward the link gold), state colors and the ongoing blue stay with the base palettes, and `--qilin-specific-brand-seal-fill` carries the seal's own cinnabar for surfaces that must match the stamp; its two values are stops of the seal gradient in `ui-brand`.
|
|
39
50
|
|
|
@@ -55,5 +66,6 @@ None; the theme contributes no prompt text.
|
|
|
55
66
|
|
|
56
67
|
<a id="known-limitations-and-deferred-work"></a>
|
|
57
68
|
|
|
58
|
-
- Tokens without a current component consumer stay with the base palettes; a future consumer that needs the warm values joins this
|
|
59
|
-
- The
|
|
69
|
+
- Tokens without a current component consumer stay with the base palettes; a future consumer that needs the warm values joins this skin rather than re-deriving them.
|
|
70
|
+
- The spec mounts the production theme runtime and a real boot registry, and the bundle spec asserts the product patch sets `skin: qilin`. A browser-rendered assertion for the assembled surface is still manual.
|
|
71
|
+
- A skin the user selects but whose provider is disabled keeps the base scheme background for the pre-plugin frame, because the boot registry only knows colors from mounted providers.
|
package/README.zh.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "QiLin 在 Web
|
|
2
|
+
description: "QiLin 在 Web 客户端上的品牌配色包:以别名令牌覆盖叠加在用户当前浅色或深色配色之上。"
|
|
3
3
|
kind: "package-reference"
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -9,7 +9,7 @@ kind: "package-reference"
|
|
|
9
9
|
|
|
10
10
|
## 概述
|
|
11
11
|
|
|
12
|
-
把本插件挂在 [`ui-theme`](../ui-theme/README.zh.md)
|
|
12
|
+
把本插件挂在 [`ui-theme`](../ui-theme/README.zh.md) 旁边,即可提供多套可选配色包。每个包注册一个 `ctx.theme` 配色包(skin):用户的 `light`、`dark` 或 `system` 偏好与全部基础令牌保持不变,选中该包时才替换它拥有的别名令牌。包内既有产品自有配色,也有中性备选,均以调色板而非产品名标识。由于注册是 Kylin effect,卸载插件即恢复平台调色板,而持久的配色选择会随提供方一并保留,下次加载再恢复用户的选择。
|
|
13
13
|
|
|
14
14
|
## 目录
|
|
15
15
|
|
|
@@ -23,9 +23,20 @@ kind: "package-reference"
|
|
|
23
23
|
<a id="use-this-package"></a>
|
|
24
24
|
## 使用本包
|
|
25
25
|
|
|
26
|
-
`qilin` profile 通过其 bundle
|
|
26
|
+
`qilin` profile 通过其 bundle 补丁挂载本包,无需配置;同一补丁给 `ui-theme` 行设下 `skin: qilin`,使玄金配色成为产品默认。本包的宿主侧把每个包的画布底色注册到 Host 的引导注册表,因此首帧即使用选中包的底色。若部署方希望在同一基础主题上使用其他配色,自带一个配色包并在外观行选中即可,浅色/深色/跟随系统偏好仍在其下叠加。用户改选其他包即离开默认配色,选择跨重启持久化。桌面欢迎页与 Windows 安装器的调色由 `apps/desktop/scripts/gen-desktop-theme.ts` 从产品配色包生成,其 `--check` 门禁拒绝过期产物。
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
### 随附配色包
|
|
29
|
+
|
|
30
|
+
| Id | 名称 | 浅色画布 | 深色画布 | 强调色(浅 / 深) |
|
|
31
|
+
|---|---|---|---|---|
|
|
32
|
+
| `qilin` | 玄金 / Xuanjin | `#f8f5ee` | `#0d0b09` | `#8f6f2e` / `#c9a24a` |
|
|
33
|
+
| `mono` | 黑白 / Mono | `#f4f4f4` | `#000000` | `#1a1a1a` / `#f2f2f2` |
|
|
34
|
+
| `verdant` | 墨绿 / Verdant | `#f1f6f2` | `#0a120e` | `#2f6b4b` / `#8fd0a8` |
|
|
35
|
+
| `blush` | 浅樱 / Blush | `#fbf6f4` | `#141010` | `#b25b74` / `#f2bccb` |
|
|
36
|
+
|
|
37
|
+
每个包在两套 scheme 下覆盖同一组语义家族——强调色、链接、画布与层级表面、侧栏、组件填充、墨阶文字、细线与悬停、次级按钮族、代码与滚动条阅读面——因此切换包不会让任何组件停在上一套调色上。包里未声明的令牌留在基础配色。
|
|
38
|
+
|
|
39
|
+
玄金包是「玄金」暗金 landing VI 的双 scheme 版本:深色值逐字移植 landing 令牌,浅色值推导暖纸对应版([决策笔记](../../../.agents/notes/implemented/architecture/2026-09-14-xuanjin-dual-scheme-palette.zh.md)),令牌按族分组在 [packs/qilin.ts](src/packs/qilin.ts)。
|
|
29
40
|
|
|
30
41
|
| 角色 | 令牌 | 浅色 | 深色 |
|
|
31
42
|
|---|---|---|---|
|
|
@@ -33,7 +44,7 @@ kind: "package-reference"
|
|
|
33
44
|
| 画布 | `--qilin-alias-bg-base` | `#f8f5ee`(纸白) | `#0d0b09`(landing 底色) |
|
|
34
45
|
| 侧栏 | `--qilin-specific-sidebar-fill` | `#f1ece0` | `#0d0b09` |
|
|
35
46
|
| 链接 | `--qilin-alias-link` | `#7d6126`(纸面 5.3:1) | `#f3dc9e`(14.5:1) |
|
|
36
|
-
| 印章 | `--qilin-specific-brand-seal-fill` | `#
|
|
47
|
+
| 印章 | `--qilin-specific-brand-seal-fill` | `#b7352c` | `#c94a40` |
|
|
37
48
|
|
|
38
49
|
功能组件通过既有的 `--qilin-alias-*` 别名消费这些令牌,因此配色可到达侧边栏、输入框、会话与交付物,而任何组件都无需感知 QiLin。悬停遵循各平台惯例(深色向 gold-300 变亮,浅色向链接金加深),状态色与进行中蓝保留基础配色,`--qilin-specific-brand-seal-fill` 则为需要与印记一致的表面携带印章自身的朱砂;它的两个取值都是 `ui-brand` 中印章渐变的色标。
|
|
39
50
|
|
|
@@ -55,5 +66,6 @@ kind: "package-reference"
|
|
|
55
66
|
|
|
56
67
|
<a id="known-limitations-and-deferred-work"></a>
|
|
57
68
|
|
|
58
|
-
-
|
|
59
|
-
-
|
|
69
|
+
- 无当前组件消费者的令牌留在基础配色;未来需要暖色值的消费者应并入本包,而不是重新推导。
|
|
70
|
+
- 规格跑在生产主题运行时与真实的引导注册表上,bundle 规格断言产品补丁设置 `skin: qilin`。组装表面的浏览器渲染断言仍为手工执行。
|
|
71
|
+
- 用户选中但提供方被禁用的配色包,在插件前那一帧仍使用基础方案底色,因为引导注册表只认识已挂载提供方声明的颜色。
|