@mooncellwiki/prts-design-tokens 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026-present MooncellWiki
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,13 @@
1
+ # @mooncellwiki/prts-design-tokens
2
+
3
+ PRTS Design(明日方舟网页设计系统,prts.wiki 皮肤)的设计令牌,≈ primer/primitives。
4
+
5
+ - `src/**/*.json5`:W3C DTCG 格式的源——`base/` 原始色板 · 字体 · 尺寸 · 动效 · 层级,`functional/` 亮 / 暗 / 高对比语义令牌与页眉头图画布主题接口,`bridge/` MediaWiki Codex 桥接
6
+ - `tokens.css`:CSS 变量版——亮 `:root` / 暗 `data-theme="dark"` · `html.skin-theme-clientpref-night` / 跟随系统 / 局部主题 `.ak-scope[data-theme]` / 高对比;只要令牌时 `import "@mooncellwiki/prts-design-tokens/tokens.css"`
7
+ - `tokens.json`:每个令牌的 CSS 写法与亮 / 暗解析值
8
+
9
+ `tokens.css` 与 [`packages/css`](../css)(`@mooncellwiki/prts-design-css`)里的 `src/tokens.css` 是同一份生成物;Codex / MediaWiki 桥接(`bridge/codex` 源)单独生成在 CSS 包的 `bridge-codex.css`,只属于皮肤、不在这份 `tokens.css` 里(`tokens.json` 里仍有它们)。仓库内改完源文件跑 `pnpm tokens` 重新生成。
10
+
11
+ 许可:MIT。
12
+
13
+ 文档:https://mooncellwiki.github.io/prts-design/foundations/color
package/package.json ADDED
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "@mooncellwiki/prts-design-tokens",
3
+ "version": "0.1.0",
4
+ "description": "PRTS Design · 明日方舟网页设计系统的设计令牌:W3C DTCG 格式的 JSON5 源 + CSS 变量版 tokens.css(亮 / 暗 / 跟随系统 / 局部主题)+ 解析后的 tokens.json(每个令牌带 CSS 写法与亮 / 暗解析值)",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "homepage": "https://mooncellwiki.github.io/prts-design/foundations/color",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/MooncellWiki/prts-design.git",
11
+ "directory": "packages/tokens"
12
+ },
13
+ "exports": {
14
+ "./tokens.css": "./tokens.css",
15
+ "./tokens.json": "./tokens.json",
16
+ "./src/*": "./src/*",
17
+ "./package.json": "./package.json"
18
+ },
19
+ "files": [
20
+ "src",
21
+ "tokens.css",
22
+ "tokens.json"
23
+ ],
24
+ "devDependencies": {
25
+ "json5": "^2.2.3",
26
+ "style-dictionary": "^5.5.5"
27
+ },
28
+ "publishConfig": {
29
+ "access": "public"
30
+ },
31
+ "scripts": {
32
+ "build": "node build.ts"
33
+ }
34
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ asset: {
3
+ $description: "资源路径约定:模板 / Gadget 拼图标路径的基准(默认相对 preview/assets;生产环境见文档站 /foundations/icons#游戏图标)。CSS 不读它——url() 里不能放 var();CSS 引用的游戏素材走 base/skin-assets.css 的 --ak-item-bg-* 接口",
4
+ "asset-base": { $value: "assets" },
5
+ },
6
+ }
@@ -0,0 +1,94 @@
1
+ {
2
+ color: {
3
+ $description: "1. 原始色板 --ak-{hue}-{step}(来源:官网 CSS / 游戏解包 / gamedata);组件不直接用,经由 functional/themes 的语义令牌引用",
4
+ neutral: {
5
+ $description: "Neutrals · 取自游戏内 UI 灰阶(btn #313131 / panel #F5F5F5)与官网灰阶",
6
+ $type: "color",
7
+ "gray-0": { $value: "#ffffff" },
8
+ "gray-50": { $value: "#f5f5f5", $description: "in-game light panel" },
9
+ "gray-100": { $value: "#ebebeb" },
10
+ "gray-200": { $value: "#d2d2d2", $description: "site" },
11
+ "gray-300": { $value: "#b1b1b1" },
12
+ "gray-400": { $value: "#8d8d8d", $description: "site" },
13
+ "gray-500": { $value: "#626262", $description: "in-game btn_done" },
14
+ "gray-600": { $value: "#535353" },
15
+ "gray-700": { $value: "#3b3b3b" },
16
+ "gray-800": { $value: "#313131", $description: "in-game standard button" },
17
+ "gray-850": { $value: "#272727", $description: "site" },
18
+ "gray-900": { $value: "#1d1f20", $description: "site panel" },
19
+ "gray-950": { $value: "#181818", $description: "in-game deep" },
20
+ "gray-1000": { $value: "#000000" },
21
+ },
22
+ brand: {
23
+ $description: "Brand cyan / blue · 官网 #18D1FF,游戏内选中蓝 #0098DC",
24
+ $type: "color",
25
+ "cyan-200": { $value: "#7ee5ff" },
26
+ "cyan-300": { $value: "#5ddcff" },
27
+ "cyan-400": { $value: "#22bbff", $description: "in-game select_round" },
28
+ "cyan-500": { $value: "#18d1ff", $description: "★ site brand accent" },
29
+ "blue-400": { $value: "#00b0ff", $description: "in-game <ba.kw>" },
30
+ "blue-500": { $value: "#0098dc", $description: "★ in-game UI blue / <ba.vup>" },
31
+ "blue-600": { $value: "#0075a9", $description: "in-game toggle-on" },
32
+ "blue-700": { $value: "#005a82" },
33
+ },
34
+ yellow: {
35
+ $description: "Yellow · 稀有度星 / 商店 / 关卡名",
36
+ $type: "color",
37
+ "yellow-400": { $value: "#ffe75a" },
38
+ "yellow-500": { $value: "#ffd800", $description: "★ in-game yellow (rarity #FFDE00)" },
39
+ "yellow-600": { $value: "#ffc90e", $description: "<ga.subtitle>" },
40
+ "yellow-700": { $value: "#eab841" },
41
+ },
42
+ lime: {
43
+ $description: "Lime · SP / 官网次级强调",
44
+ $type: "color",
45
+ "lime-400": { $value: "#caec46", $description: "in-game SP cost" },
46
+ "lime-500": { $value: "#c8eb21", $description: "site" },
47
+ "lime-600": { $value: "#8fc31f", $description: "site" },
48
+ },
49
+ orange: {
50
+ $description: "Orange",
51
+ $type: "color",
52
+ "orange-400": { $value: "#ff9433", $description: "6★" },
53
+ "orange-500": { $value: "#f49800", $description: "<ba.rem>" },
54
+ "orange-600": { $value: "#e5622b", $description: "in-game mission track" },
55
+ },
56
+ red: {
57
+ $description: "Red",
58
+ $type: "color",
59
+ "red-400": { $value: "#ff6237", $description: "<ba.vdown>" },
60
+ "red-500": { $value: "#d83c3c", $description: "<ba.enemy>" },
61
+ "red-600": { $value: "#c82a36", $description: "in-game NEW mark" },
62
+ "red-700": { $value: "#a40000", $description: "in-game BREAKING NEWS" },
63
+ "red-800": { $value: "#711111", $description: "in-game confirm button" },
64
+ "red-900": { $value: "#860101", $description: "specialization" },
65
+ "magenta-500": { $value: "#e40043", $description: "in-game monthly card" },
66
+ },
67
+ "green-purple": {
68
+ $description: "Green / Purple",
69
+ $type: "color",
70
+ "green-500": { $value: "#2fac78", $description: "<ba.gild>" },
71
+ "green-400": { $value: "#4ffaa5" },
72
+ "purple-400": { $value: "#bf96ed", $description: "4★" },
73
+ "purple-500": { $value: "#9266b2" },
74
+ },
75
+ rarity: {
76
+ $description: "Rarity · 官方色阶 (gamedata sandbox_table.charRarityColorList)",
77
+ $type: "color",
78
+ "rarity-1": { $value: "#bababa" },
79
+ "rarity-2": { $value: "#d3dc35" },
80
+ "rarity-3": { $value: "#82c5f5" },
81
+ "rarity-4": { $value: "#bf96ed" },
82
+ "rarity-5": { $value: "#efd691" },
83
+ "rarity-6": { $value: "#ff9433" },
84
+ },
85
+ sp: {
86
+ $description: "Skill SP 回复类型(对应游戏内技能框配色,近似取值)",
87
+ $type: "color",
88
+ "sp-auto": { $value: "#8fc31f", $description: "自动回复 INCREASE_WITH_TIME" },
89
+ "sp-attack": { $value: "#ff8a00", $description: "攻击回复 INCREASE_WHEN_ATTACK" },
90
+ "sp-hit": { $value: "#ffd800", $description: "受击回复 INCREASE_WHEN_TAKEN_DAMAGE" },
91
+ "sp-passive": { $value: "#8d8d8d", $description: "被动" },
92
+ },
93
+ },
94
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ motion: {
3
+ duration: {
4
+ $description: "Motion · 时长",
5
+ $type: "duration",
6
+ "dur-instant": { $value: "80ms" },
7
+ "dur-fast": { $value: "150ms" },
8
+ "dur-normal": { $value: "250ms" },
9
+ "dur-slow": { $value: "400ms" },
10
+ },
11
+ easing: {
12
+ $description: "Motion · 缓动",
13
+ $type: "cubicBezier",
14
+ ease: { $value: "cubic-bezier(0.2, 0.8, 0.2, 1)" },
15
+ "ease-in": { $value: "cubic-bezier(0.4, 0, 1, 1)" },
16
+ "ease-out": { $value: "cubic-bezier(0, 0, 0.2, 1)" },
17
+ "ease-sharp": { $value: "cubic-bezier(0.4, 0, 0.2, 1)" },
18
+ },
19
+ },
20
+ }
@@ -0,0 +1,57 @@
1
+ {
2
+ size: {
3
+ space: {
4
+ $description: "Spacing (4px grid)",
5
+ $type: "dimension",
6
+ "space-1": { $value: "4px" },
7
+ "space-2": { $value: "8px" },
8
+ "space-3": { $value: "12px" },
9
+ "space-4": { $value: "16px" },
10
+ "space-5": { $value: "20px" },
11
+ "space-6": { $value: "24px" },
12
+ "space-8": { $value: "32px" },
13
+ "space-10": { $value: "40px" },
14
+ "space-12": { $value: "48px" },
15
+ "space-16": { $value: "64px" },
16
+ "space-20": { $value: "80px" },
17
+ "space-24": { $value: "96px" },
18
+ },
19
+ shape: {
20
+ $description: "Shape · 方舟 = 直角;仅极小圆角用于输入框。不做切角 / 斜切 / 斜带——整套系统里没有 45° 的斜边。\n色条 + 细框(pre / 消息 / 面板头 / 模组卡 …):粗的 border-left 与 1px 的 border-top/bottom 在角上会被浏览器\n斜接(miter)出一道小斜边,看着像「斜切装饰」;所以这类盒子的框用 border-image 画成直角拼接:\nborder: 1px solid var(--ak-border); border-left-width: 4px;\nborder-image: linear-gradient(to right, <色条色> 4px, var(--ak-border) 4px) 1 1 1 4; ← slice 与各边 border-width 一致\n(顶部色条同理:linear-gradient(<色条色> 3px, var(--ak-border) 3px) 3 1 1 1)。只有一条边有色条、其它边无框的盒子不受影响。",
21
+ $type: "dimension",
22
+ radius: { $value: "0px" },
23
+ "radius-sm": { $value: "2px" },
24
+ "radius-pill": { $value: "999px" },
25
+ "bar-w": { $value: "4px", $description: "标题左侧色条宽度" },
26
+ "bar-w-lg": { $value: "8px" },
27
+ },
28
+ layout: {
29
+ $description: "Layout · 与 Codex 断点一致: 320 / 640 / 1120 / 1680",
30
+ $type: "dimension",
31
+ "header-h": { $value: "56px" },
32
+ "local-nav-h": { $value: "48px", $description: "二级吸顶栏(<1400 出现:菜单 / 本页目录)" },
33
+ "sidebar-w": { $value: "248px" },
34
+ "toc-w": { $value: "240px" },
35
+ "content-max": { $value: "1240px", $description: "阅读区最大宽度;表格密集页可加 .ak-wide" },
36
+ "content-narrow": { $value: "760px" },
37
+ gutter: { $value: "24px" },
38
+ "gutter-sm": { $value: "16px" },
39
+ },
40
+ icon: {
41
+ $description: "Icon sizes",
42
+ $type: "dimension",
43
+ "icon-xs": { $value: "14px" },
44
+ "icon-sm": { $value: "18px" },
45
+ "icon-md": { $value: "24px" },
46
+ "icon-lg": { $value: "32px" },
47
+ "icon-xl": { $value: "48px" },
48
+ },
49
+ decoration: {
50
+ $description: "Signature decorations",
51
+ $type: "dimension",
52
+ "stripe-size": { $value: "8px" },
53
+ "halftone-size": { $value: "6px" },
54
+ "grid-size": { $value: "32px" },
55
+ },
56
+ },
57
+ }
@@ -0,0 +1,56 @@
1
+ {
2
+ typography: {
3
+ font: {
4
+ $description: "Typography —— 每条链的前两段都由 fonts.css 自托管(人人一致,也是「上线效果」):\n① 官网同源的 Novecento Sans Wide / Bender(ASCII 子集:· » — × ° 等非 ASCII 会逐字落到 ②)\n② OFL 的 Noto Sans SC / Oswald / Chakra Petch / JetBrains Mono\n之后是装机备选 → 系统字。fonts.css 没加载(Gadget 关掉 / 离线单文件)时自然退到后两段。",
5
+ $type: "fontFamily",
6
+ "font-body": {
7
+ $value: "\"Source Han Sans SC\", \"Noto Sans SC\", \"Noto Sans CJK SC\", \"PingFang SC\", \"HarmonyOS Sans SC\", \"Microsoft YaHei\", system-ui, -apple-system, sans-serif",
8
+ },
9
+ "font-display": {
10
+ $value: "\"Novecento Sans Wide\", \"Novecentosanswide-Bold\", \"Bender\", \"Oswald\", \"Michroma\", \"Arial Narrow\", system-ui, sans-serif",
11
+ $description: "拉丁展示字(大写):Novecento 500–800 → Bender → Oswald 接非 ASCII",
12
+ },
13
+ "font-label": {
14
+ $value: "\"Bender\", \"Bender-Bold\", \"Chakra Petch\", \"Rajdhani\", \"Saira\", \"Oswald\", system-ui, sans-serif",
15
+ $description: "HUD 标签 / 数值:Bender 400/700 → Chakra Petch 接非 ASCII",
16
+ },
17
+ "font-condensed": {
18
+ $value: "\"Oswald\", \"Roboto Condensed\", \"Arial Narrow\", sans-serif",
19
+ $description: "自托管 Oswald 200–700",
20
+ },
21
+ "font-mono": {
22
+ $value: "\"JetBrains Mono\", \"SF Mono\", Menlo, Consolas, \"Liberation Mono\", monospace",
23
+ $description: "自托管 JetBrains Mono 100–800 正 / 斜",
24
+ },
25
+ },
26
+ "font-size": {
27
+ $description: "字号(rem;注释为 px)",
28
+ $type: "dimension",
29
+ "fs-display-xl": { $value: "3.5rem", $description: "56" },
30
+ "fs-display": { $value: "2.5rem", $description: "40" },
31
+ "fs-h1": { $value: "2rem", $description: "32" },
32
+ "fs-h2": { $value: "1.5rem", $description: "24" },
33
+ "fs-h3": { $value: "1.25rem", $description: "20" },
34
+ "fs-h4": { $value: "1.0625rem", $description: "17" },
35
+ "fs-body-lg": { $value: "1.125rem", $description: "18" },
36
+ "fs-body": { $value: "1rem", $description: "16" },
37
+ "fs-sm": { $value: "0.875rem", $description: "14" },
38
+ "fs-xs": { $value: "0.75rem", $description: "12" },
39
+ "fs-overline": { $value: "0.6875rem", $description: "11" },
40
+ },
41
+ "line-height": {
42
+ $description: "行高",
43
+ $type: "number",
44
+ "lh-body": { $value: "1.7", $description: "CJK 正文" },
45
+ "lh-tight": { $value: "1.25" },
46
+ "lh-display": { $value: "1.05" },
47
+ },
48
+ tracking: {
49
+ $description: "字距",
50
+ $type: "dimension",
51
+ "tracking-caps": { $value: "0.08em" },
52
+ "tracking-overline": { $value: "0.14em" },
53
+ "tracking-display": { $value: "-0.02em" },
54
+ },
55
+ },
56
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ layer: {
3
+ "z-index": {
4
+ $description: "Z-index",
5
+ $type: "number",
6
+ "z-dropdown": { $value: "100" },
7
+ "z-sticky": { $value: "200" },
8
+ "z-header": { $value: "1000" },
9
+ "z-overlay": { $value: "1500" },
10
+ "z-modal": { $value: "2000" },
11
+ "z-toast": { $value: "3000" },
12
+ "z-tooltip": { $value: "4000" },
13
+ },
14
+ },
15
+ }
@@ -0,0 +1,90 @@
1
+ {
2
+ codex: {
3
+ $description: "MediaWiki 1.43 核心与扩展(Codex 组件、mw-message-box、OOUI WikimediaUI 主题的部分)读取这些 CSS 变量。\n把它们映射到 PRTS Design 语义令牌,皮肤外的 UI 即可自动换肤。",
4
+ "background-color-base": { $value: "{theme.background.bg-surface}" },
5
+ "background-color-neutral": { $value: "{theme.background.bg-surface-2}" },
6
+ "background-color-neutral-subtle": { $value: "{theme.background.bg-canvas}" },
7
+ "background-color-interactive": { $value: "{theme.background.bg-surface-2}" },
8
+ "background-color-interactive-subtle": { $value: "{theme.background.bg-surface-2}" },
9
+ "background-color-interactive--hover": { $value: "{theme.background.bg-hover}" },
10
+ "background-color-interactive--active": { $value: "{theme.background.bg-active}" },
11
+ "background-color-disabled": { $value: "{theme.background.bg-surface-3}" },
12
+ "background-color-disabled-subtle": { $value: "{theme.background.bg-surface-2}" },
13
+ "background-color-inverted": { $value: "{theme.background.bg-inverse}" },
14
+ "background-color-progressive": { $value: "{theme.accent.accent}" },
15
+ "background-color-progressive--hover": { $value: "{theme.accent.accent-hover}" },
16
+ "background-color-progressive--active": { $value: "{theme.accent.accent-hover}" },
17
+ "background-color-progressive-subtle": { $value: "{theme.accent.accent-subtle}" },
18
+ "background-color-destructive": { $value: "{theme.status.danger}" },
19
+ "background-color-destructive-subtle": { $value: "{theme.status.danger-bg}" },
20
+ "background-color-error-subtle": { $value: "{theme.status.danger-bg}" },
21
+ "background-color-warning-subtle": { $value: "{theme.status.warning-bg}" },
22
+ "background-color-success-subtle": { $value: "{theme.status.success-bg}" },
23
+ "background-color-notice-subtle": { $value: "{theme.status.info-bg}" },
24
+ "background-color-backdrop-light": { $value: "{theme.background.bg-overlay}" },
25
+ "background-color-backdrop-dark": { $value: "{theme.background.bg-overlay}" },
26
+ "color-base": { $value: "{theme.foreground.fg}" },
27
+ "color-base--hover": { $value: "{theme.foreground.fg}" },
28
+ "color-emphasized": { $value: "{theme.foreground.fg}" },
29
+ "color-subtle": { $value: "{theme.foreground.fg-muted}" },
30
+ "color-placeholder": { $value: "{theme.foreground.fg-subtle}" },
31
+ "color-disabled": { $value: "{theme.foreground.fg-disabled}" },
32
+ "color-inverted": { $value: "{theme.foreground.fg-inverse}" },
33
+ "color-progressive": { $value: "{theme.link.link}" },
34
+ "color-progressive--hover": { $value: "{theme.link.link-hover}" },
35
+ "color-progressive--active": { $value: "{theme.link.link-hover}" },
36
+ "color-visited": { $value: "{theme.link.link-visited}" },
37
+ "color-destructive": { $value: "{theme.status.danger}" },
38
+ "color-destructive--visited": { $value: "{theme.link.link-new}" },
39
+ "color-error": { $value: "{theme.status.danger}" },
40
+ "color-warning": { $value: "{theme.status.warning}" },
41
+ "color-success": { $value: "{theme.status.success}" },
42
+ "color-notice": { $value: "{theme.foreground.fg-secondary}" },
43
+ "color-link-red": { $value: "{theme.link.link-new}" },
44
+ "color-link-red--visited": { $value: "{theme.link.link-new}" },
45
+ "color-icon-base": { $value: "{theme.foreground.fg-secondary}" },
46
+ "border-color-base": { $value: "{theme.border.border}" },
47
+ "border-color-subtle": { $value: "{theme.border.border-subtle}" },
48
+ "border-color-muted": { $value: "{theme.border.border-subtle}" },
49
+ "border-color-interactive": { $value: "{theme.border.border-strong}" },
50
+ "border-color-disabled": { $value: "{theme.border.border-subtle}" },
51
+ "border-color-progressive": { $value: "{theme.accent.accent}" },
52
+ "border-color-progressive--focus": { $value: "{theme.border.focus}" },
53
+ "border-color-input-binary": {
54
+ $value: "{theme.border.border-strong}",
55
+ $description: "复选框/单选框/开关:OOUI 用 6px 边框画选中态的圆点,不映射就是 Codex 默认的 #36c,和强调色对不上",
56
+ },
57
+ "border-color-input-binary--checked": { $value: "{theme.accent.accent}" },
58
+ "border-color-input-binary--active": { $value: "{theme.accent.accent-hover}" },
59
+ "border-color-destructive": { $value: "{theme.status.danger}" },
60
+ "border-color-error": { $value: "{theme.status.danger}" },
61
+ "border-color-warning": { $value: "{theme.status.warning}" },
62
+ "border-color-success": { $value: "{theme.status.success}" },
63
+ "border-color-notice": { $value: "{theme.border.border-strong}" },
64
+ "border-color-transparent": { $value: "transparent" },
65
+ "border-radius-base": { $value: "{size.shape.radius}" },
66
+ "border-radius-sharp": { $value: "0" },
67
+ "border-radius-pill": { $value: "{size.shape.radius-pill}" },
68
+ "box-shadow-drop-small": { $value: "{theme.shadow.shadow-sm}" },
69
+ "box-shadow-drop-medium": { $value: "{theme.shadow.shadow-md}" },
70
+ "box-shadow-drop-xx-large": { $value: "{theme.shadow.shadow-lg}" },
71
+ "box-shadow-color-progressive--focus": { $value: "{theme.border.focus}" },
72
+ "box-shadow-color-progressive--active": { $value: "{theme.accent.accent-hover}" },
73
+ "font-family-base": { $value: "{typography.font.font-body}" },
74
+ "font-family-heading-main": { $value: "{typography.font.font-body}" },
75
+ "font-family-monospace": { $value: "{typography.font.font-mono}" },
76
+ "font-size-medium": { $value: "{typography.font-size.fs-body}" },
77
+ "font-size-small": { $value: "{typography.font-size.fs-sm}" },
78
+ "font-size-x-small": { $value: "{typography.font-size.fs-xs}" },
79
+ "line-height-medium": { $value: "{typography.line-height.lh-body}" },
80
+ "opacity-icon-base": { $value: "0.87" },
81
+ "opacity-icon-subtle": { $value: "0.67" },
82
+ "z-index-dropdown": { $value: "{layer.z-index.z-dropdown}" },
83
+ "z-index-sticky": { $value: "{layer.z-index.z-sticky}" },
84
+ "z-index-fixed": { $value: "{layer.z-index.z-header}" },
85
+ "z-index-overlay": { $value: "{layer.z-index.z-overlay}" },
86
+ "z-index-overlay-backdrop": { $value: "{layer.z-index.z-overlay}" },
87
+ "z-index-toast-notification": { $value: "{layer.z-index.z-toast}" },
88
+ "z-index-tooltip": { $value: "{layer.z-index.z-tooltip}" },
89
+ },
90
+ }
@@ -0,0 +1,41 @@
1
+ {
2
+ chrome: {
3
+ $description: "2d. CHROME · 页眉 / 头图 / 画布 的主题接口(活动主题只改这里)\n皮肤的「框」(页眉主行 + 二级栏 + 窄屏工具卡片)在两套主题下都是黑的:官网导航栏、游戏主界面顶栏、\n干员档案页的顶部黑边都是\"黑框白纸 / 黑框黑纸\"——所以 chrome 令牌不随明暗主题变,只跟着活动主题变。\nprts.wiki 大活期间会换头图 / 顶栏角饰 / 站标 / 侧栏配色(现网 ext.gadget.seventhStyle 就是改这些):\n新皮肤把这些位置抽成下面这组变量,Gadget / MediaWiki:Common.css 只需在 :root(或 html.ak-theme-xxx)上覆盖,\n不必碰选择器。skin.css 里的 .ak-header 把语义令牌重映射到 --ak-chrome-*,页眉内的按钮 / 输入 / 头像 / 菜单自动跟随。\n页眉与头图的关系:头图 .ak-keyart 从页面顶端铺起,页眉是压在它上面的一块均匀黑玻璃(--ak-chrome-bg + 毛玻璃)——\n玻璃保证页眉可读,画从玻璃后面透出来;照片一律走 --ak-keyart-image,--ak-chrome-image 只放画在玻璃之上的深色角饰 / 底纹。\n--ak-logo-image(不设默认值):站标,设置后 .ak-header__logo img 用 content 替换(Chromium / WebKit;Firefox 请改 $wgLogos)。",
4
+ "theme-accent": {
5
+ $value: "{color.brand.cyan-500}",
6
+ $description: "活动主色:页眉标语 / 悬停、侧栏与目录分组条、页脚斜纹、窄屏卡片顶条 …(正文里的链接 / 选中仍是 --ak-accent;想一起换就连 --ak-accent 也覆盖)",
7
+ },
8
+ "theme-accent-fg": { $value: "#000" },
9
+ "chrome-bg": {
10
+ $value: "rgba(8, 9, 10, .9)",
11
+ $description: "页眉玻璃:半透明 + 毛玻璃,头图 / 滚过来的正文在下面均匀透出。活动主题想让头图多透一点可调 alpha 到 .78–.85;别低于 .72(白色画面之下 #F2F2F2 仍 ≥7:1)",
12
+ },
13
+ "chrome-bg-solid": { $value: "#0e0f10", $description: "不透明处:窄屏工具卡片、飞出菜单" },
14
+ "chrome-fg": { $value: "#f2f2f2" },
15
+ "chrome-fg-2": { $value: "rgba(255, 255, 255, .74)" },
16
+ "chrome-fg-muted": { $value: "rgba(255, 255, 255, .5)" },
17
+ "chrome-line": { $value: "rgba(255, 255, 255, .14)", $description: "页眉底线 / 分隔线" },
18
+ "chrome-line-strong": { $value: "rgba(255, 255, 255, .32)" },
19
+ "chrome-hover": { $value: "rgba(255, 255, 255, .08)" },
20
+ "chrome-field": { $value: "rgba(255, 255, 255, .07)", $description: "搜索触发器底" },
21
+ "chrome-image": {
22
+ $value: "none",
23
+ $description: "顶栏角饰 / 底纹:url(left.png), url(right.png)(现网 PRTSheadleft 的活动徽章 / Garanheadright 的波纹那种)。画在玻璃之上、不会被压暗——只放深色低对比素材,照片请走 --ak-keyart-image",
24
+ },
25
+ "chrome-image-position": { $value: "right top" },
26
+ "chrome-image-size": { $value: "auto 100%" },
27
+ "chrome-image-repeat": { $value: "no-repeat" },
28
+ "chrome-texture": { $value: ".55", $description: "右侧半调网点强度 0–1(游戏顶栏 img_back / 官网左缘网点),0 关闭" },
29
+ "keyart-image": { $value: "none", $description: "头图(Key Visual):从页面顶端铺起、页眉压在它上面的一条通栏画;--ak-keyart-h 为 0 时不占位(只在页眉后面透)" },
30
+ "keyart-h": { $value: "0px", $description: "页眉之下可见的那段高度" },
31
+ "keyart-position": { $value: "center 30%", $description: "-position / -size 相对整块(页眉高 + -h)计算" },
32
+ "keyart-size": { $value: "cover" },
33
+ "keyart-bg": { $value: "transparent", $description: "画未铺满 / 未加载时的底色;默认透明,没有头图时页眉背后什么也不多画" },
34
+ "keyart-fade": { $value: "96px", $description: "底部渐隐进画布的高度,0 关闭" },
35
+ "canvas-image": { $value: "none", $description: "页面画布底纹 / 底图(body 背景,叠在 --ak-bg-canvas 之上;现网 body 的 bkg 图位置)" },
36
+ "canvas-position": { $value: "center top" },
37
+ "canvas-size": { $value: "auto" },
38
+ "canvas-repeat": { $value: "repeat" },
39
+ "canvas-attachment": { $value: "scroll" },
40
+ },
41
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ control: {
3
+ "select-arrow": {
4
+ $description: "下拉箭头 ▾:裸 <select> 与 .ak-select 同一枚(两条 45° 渐变拼成实心三角,颜色随主题的 --ak-fg-muted)",
5
+ "select-arrow": {
6
+ $value: "linear-gradient(45deg, transparent 50%, {theme.foreground.fg-muted} 50%), linear-gradient(135deg, {theme.foreground.fg-muted} 50%, transparent 50%)",
7
+ },
8
+ },
9
+ },
10
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ theme: {
3
+ border: {
4
+ $type: "color",
5
+ border: { $value: "{theme.border.border-strong}" },
6
+ },
7
+ foreground: {
8
+ $type: "color",
9
+ "fg-muted": { $value: "{theme.foreground.fg-secondary}" },
10
+ },
11
+ },
12
+ }
@@ -0,0 +1,114 @@
1
+ {
2
+ theme: {
3
+ background: {
4
+ $description: "背景 / 表面",
5
+ $type: "color",
6
+ "bg-canvas": { $value: "#0f0f10" },
7
+ "bg-surface": { $value: "#1a1b1c" },
8
+ "bg-surface-2": { $value: "#232425" },
9
+ "bg-surface-3": { $value: "#2d2e30" },
10
+ "bg-inset": { $value: "#141516" },
11
+ "bg-hover": { $value: "rgba(255, 255, 255, 0.06)" },
12
+ "bg-active": { $value: "rgba(255, 255, 255, 0.11)" },
13
+ "bg-inverse": { $value: "{color.neutral.gray-0}" },
14
+ "bg-overlay": { $value: "rgba(0, 0, 0, 0.7)" },
15
+ },
16
+ foreground: {
17
+ $description: "文字",
18
+ $type: "color",
19
+ fg: { $value: "#f0f0f0" },
20
+ "fg-secondary": { $value: "#c9c9c9" },
21
+ "fg-muted": { $value: "{color.neutral.gray-400}" },
22
+ "fg-subtle": { $value: "#6f7071" },
23
+ "fg-disabled": { $value: "#4a4b4c" },
24
+ "fg-inverse": { $value: "{color.neutral.gray-950}" },
25
+ },
26
+ accent: {
27
+ $description: "强调色:亮色 = 游戏内蓝 #0098DC,暗色 = 官网青 #18D1FF;次强调 = 黄",
28
+ $type: "color",
29
+ accent: { $value: "{color.brand.cyan-500}", $description: "暗色下用官网青 #18D1FF" },
30
+ "accent-hover": { $value: "{color.brand.cyan-200}" },
31
+ "accent-fg": { $value: "#000000" },
32
+ "accent-subtle": { $value: "rgba(24, 209, 255, 0.10)" },
33
+ "accent-muted": { $value: "rgba(24, 209, 255, 0.30)" },
34
+ "accent-2": { $value: "{color.yellow.yellow-500}" },
35
+ "accent-2-fg": { $value: "#000000" },
36
+ },
37
+ link: {
38
+ $description: "链接",
39
+ $type: "color",
40
+ link: { $value: "{color.brand.cyan-300}" },
41
+ "link-hover": { $value: "{color.brand.cyan-200}" },
42
+ "link-visited": {
43
+ $value: "#3f8ea4",
44
+ $description: "已访问 = 青 #5ddcff × 62% + 画布 #0f0f10 × 38%(视觉上就是「62% 透明的链接色」,写成实色);黑底 5:1、surface 4.6:1",
45
+ },
46
+ "link-new": { $value: "#ff6b6b" },
47
+ "link-external": { $value: "{color.brand.cyan-300}" },
48
+ },
49
+ border: {
50
+ $description: "边框 / 焦点 / 选区 / 高亮",
51
+ $type: "color",
52
+ border: { $value: "#2f3133" },
53
+ "border-subtle": { $value: "#262729" },
54
+ "border-strong": { $value: "#4a4c4f" },
55
+ "border-accent": { $value: "{color.brand.cyan-500}" },
56
+ focus: { $value: "{color.brand.cyan-500}" },
57
+ selection: { $value: "rgba(24, 209, 255, 0.28)" },
58
+ "mark-bg": { $value: "rgba(24, 209, 255, 0.20)" },
59
+ },
60
+ status: {
61
+ $description: "状态色",
62
+ $type: "color",
63
+ info: { $value: "{color.brand.cyan-300}" },
64
+ "info-bg": { $value: "rgba(24, 209, 255, 0.10)" },
65
+ success: { $value: "#4fd18f" },
66
+ "success-bg": { $value: "rgba(47, 172, 120, 0.14)" },
67
+ warning: { $value: "#ffb340" },
68
+ "warning-bg": { $value: "rgba(244, 152, 0, 0.14)" },
69
+ danger: { $value: "#ff5c5c" },
70
+ "danger-bg": { $value: "rgba(216, 60, 60, 0.14)" },
71
+ },
72
+ "rich-text": {
73
+ $description: "Rich text(游戏内 <color> 标签)· 暗色下即游戏原值",
74
+ $type: "color",
75
+ "rt-vup": { $value: "{color.brand.blue-500}" },
76
+ "rt-vdown": { $value: "{color.red.red-400}" },
77
+ "rt-rem": { $value: "{color.orange.orange-500}" },
78
+ "rt-kw": { $value: "{color.brand.blue-400}" },
79
+ "rt-imp": { $value: "#ff3b3b" },
80
+ "rt-drop": { $value: "#36acff" },
81
+ "rt-enemy": { $value: "{color.red.red-500}" },
82
+ "rt-gild": { $value: "{color.green-purple.green-500}" },
83
+ "rt-acrem": { $value: "#8a8a8a" },
84
+ "rt-level": { $value: "#ffde00" },
85
+ },
86
+ "rarity-text": {
87
+ $description: "Rarity text-safe · 暗色下直接用稀有度原色",
88
+ $type: "color",
89
+ "rarity-1-text": { $value: "{color.rarity.rarity-1}" },
90
+ "rarity-2-text": { $value: "{color.rarity.rarity-2}" },
91
+ "rarity-3-text": { $value: "{color.rarity.rarity-3}" },
92
+ "rarity-4-text": { $value: "{color.rarity.rarity-4}" },
93
+ "rarity-5-text": { $value: "{color.rarity.rarity-5}" },
94
+ "rarity-6-text": { $value: "{color.rarity.rarity-6}" },
95
+ },
96
+ shadow: {
97
+ $description: "阴影",
98
+ $type: "shadow",
99
+ "shadow-sm": { $value: "0 1px 2px rgba(0,0,0,.4)" },
100
+ "shadow-md": { $value: "0 4px 14px rgba(0,0,0,.5), 0 1px 3px rgba(0,0,0,.4)" },
101
+ "shadow-lg": { $value: "0 16px 40px rgba(0,0,0,.6), 0 2px 6px rgba(0,0,0,.4)" },
102
+ "shadow-accent": { $value: "0 0 0 3px {theme.accent.accent-subtle}" },
103
+ },
104
+ decoration: {
105
+ $description: "装饰:白线稿反相 / 斜纹 / 网格 / 网点 / 滚动条",
106
+ "glyph-filter": { $value: "none" },
107
+ "glyph-filter-inverse": { $value: "invert(1)" },
108
+ "stripe-color": { $value: "rgba(255,255,255,.07)" },
109
+ "grid-color": { $value: "rgba(255,255,255,.05)" },
110
+ "halftone-color": { $value: "rgba(255,255,255,.16)" },
111
+ scrollbar: { $value: "#3b3d40" },
112
+ },
113
+ },
114
+ }