@hia-doc/theme-default 0.1.2 → 0.1.3
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 +26 -0
- package/dist/index.d.ts +226 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +603 -22
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,6 +11,32 @@ This package owns the default CSS and minimal browser-side script. It does not p
|
|
|
11
11
|
- asset metadata for renderer output
|
|
12
12
|
- minimal runtime locale switching for `[data-hia-locale]` blocks
|
|
13
13
|
- project view segmented controls for unified project pages
|
|
14
|
+
- native nested `<details>/<summary>` Portal IA disclosure, visible `:focus-visible` treatment, active-ancestor styling, and semantic topic slots
|
|
15
|
+
- versioned `documentation-portal-theme@0.1.0-draft` metadata, semantic light/dark color tokens, forced-colors adaptation, and print fallback
|
|
16
|
+
- `portal.classic`, `portal.graphite`, and `portal.lumen` built-in skins, each supporting `system`, `light`, and `dark`
|
|
17
|
+
- visible skin/scheme controls with local reading-preference persistence and build-time no-script defaults
|
|
18
|
+
- native topic, member, and source-card disclosure without authored `aria-expanded`
|
|
19
|
+
- narrow-viewport stacking and safe wrapping for long documentation field keys
|
|
20
|
+
|
|
21
|
+
The theme intentionally does not emit or style a WAI-ARIA `tree` contract. Arrow-key navigation and typeahead are not claimed by this first slice; native Tab and Enter/Space disclosure behavior remains authoritative.
|
|
22
|
+
|
|
23
|
+
## Theme Contract
|
|
24
|
+
|
|
25
|
+
`documentation-portal-theme@0.1.0-draft` is owned by this package. The contract exposes a metadata-only reference for renderers and a complete light/dark semantic color-token set. Portal pages now provide three owner-local skins and a visible selector. A browser may persist the reader's local skin/scheme preference, but the preference never enters the contract, renderer manifest, presentation profile, or search index.
|
|
26
|
+
|
|
27
|
+
Existing `--hia-bg`, `--hia-surface`, `--hia-border`, `--hia-text`, `--hia-muted`, `--hia-accent`, `--hia-accent-soft`, `--hia-code-bg`, and `--hia-code-text` variables remain additive aliases. Removing, renaming, or changing the semantics of a token requires a new contract version.
|
|
28
|
+
|
|
29
|
+
Native `<details>/<summary>` keeps the `open` attribute as the sole disclosure state. Browsers map that state into the accessibility tree, so the theme does not duplicate an authored `aria-expanded` value that could drift. Disclosure remains usable without JavaScript, and print media reveals collapsed content.
|
|
30
|
+
|
|
31
|
+
中文摘要:本包拥有中性 `documentation-portal-theme@0.1.0-draft` contract,并提供 Classic、Graphite、Lumen
|
|
32
|
+
三套 Portal-owned skin、system/light/dark 配色、可见选择器和本地阅读偏好。偏好不进入 profile/manifest/search;第三方
|
|
33
|
+
主题市场与完整 Portal P6/P7 仍不在当前范围。
|
|
34
|
+
|
|
35
|
+
## Brand colors
|
|
36
|
+
|
|
37
|
+
`getDefaultThemeAssets({ colors: { accent: "#0f4f82" } })` returns new asset records with validated semantic hex-color overrides.
|
|
38
|
+
默认常量不变;只接受既有token与安全十六进制颜色,不接受CSS代码。配色需按所选scheme复核对比度。
|
|
39
|
+
See [shared assets and branding](../../docs/shared-theme-assets.md).
|
|
14
40
|
|
|
15
41
|
## Font Policy
|
|
16
42
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,236 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @lang zh-CN 默认主题 contract 的中性名称;包名与 CSS 命名空间不改变该协议身份。
|
|
3
|
+
* @lang en Neutral name of the default-theme contract; neither the package name nor the CSS namespace changes this protocol identity.
|
|
4
|
+
*/
|
|
5
|
+
export declare const DOCUMENTATION_PORTAL_THEME_CONTRACT = "documentation-portal-theme";
|
|
6
|
+
/**
|
|
7
|
+
* @lang zh-CN 默认主题 contract 的首个 exact draft 版本;未知版本不得按字符串猜测兼容。
|
|
8
|
+
* @lang en First exact draft version of the default-theme contract; consumers must not infer compatibility for unknown versions.
|
|
9
|
+
*/
|
|
10
|
+
export declare const DOCUMENTATION_PORTAL_THEME_CONTRACT_VERSION = "0.1.0-draft";
|
|
11
|
+
/**
|
|
12
|
+
* @lang zh-CN W-P104 首批稳定的 semantic color token 名称。
|
|
13
|
+
* @lang en Stable semantic color-token names introduced by the W-P104 slice.
|
|
14
|
+
*/
|
|
15
|
+
export declare const DOCUMENTATION_PORTAL_THEME_COLOR_TOKEN_NAMES: readonly ["canvas", "surface", "surfaceMuted", "border", "text", "textMuted", "accent", "accentContrast", "accentSoft", "accentHover", "focusRing", "codeBackground", "codeText", "danger"];
|
|
16
|
+
/**
|
|
17
|
+
* @lang zh-CN 主题 contract 可识别的 semantic color token 名称。
|
|
18
|
+
* @lang en Semantic color-token name recognized by the theme contract.
|
|
19
|
+
*/
|
|
20
|
+
export type DocumentationPortalThemeColorTokenName = typeof DOCUMENTATION_PORTAL_THEME_COLOR_TOKEN_NAMES[number];
|
|
21
|
+
/**
|
|
22
|
+
* @lang zh-CN 一个完整 light 或 dark scheme 的颜色值;每项都按语义命名,不绑定具体组件。
|
|
23
|
+
* @lang en Complete color values for one light or dark scheme; every field is semantic rather than component-specific.
|
|
24
|
+
*/
|
|
25
|
+
export type DocumentationPortalThemeColorTokens = Readonly<Record<DocumentationPortalThemeColorTokenName, string>>;
|
|
26
|
+
/**
|
|
27
|
+
* @lang zh-CN Portal owner 的内置 skin identity;与 JTH-owned skin catalog 保持实现隔离。
|
|
28
|
+
* @lang en Built-in Portal-owner skin identities, implementation-isolated from the JTH-owned skin catalog.
|
|
29
|
+
*/
|
|
30
|
+
export declare const PORTAL_THEME_SKIN_IDS: readonly ["portal.classic", "portal.graphite", "portal.lumen"];
|
|
31
|
+
/** @lang zh-CN skin 独立支持的颜色 scheme 闭集。 @lang en Closed color-scheme set supported independently by every skin. */
|
|
32
|
+
export declare const PORTAL_THEME_SCHEMES: readonly ["dark", "light", "system"];
|
|
33
|
+
/** @lang zh-CN Portal 内置 skin identity 类型。 @lang en Portal built-in skin identity type. */
|
|
34
|
+
export type PortalThemeSkinId = typeof PORTAL_THEME_SKIN_IDS[number];
|
|
35
|
+
/** @lang zh-CN Portal 颜色 scheme 类型。 @lang en Portal color-scheme type. */
|
|
36
|
+
export type PortalThemeScheme = typeof PORTAL_THEME_SCHEMES[number];
|
|
37
|
+
/**
|
|
38
|
+
* @lang zh-CN renderer-neutral 的 Portal skin capability;不包含 CSS selector、DOM 或 token value。
|
|
39
|
+
* @lang en Renderer-neutral Portal skin capability containing no CSS selector, DOM, or token value.
|
|
40
|
+
*/
|
|
41
|
+
export interface PortalThemeSkinCapability {
|
|
42
|
+
capabilities: string[];
|
|
43
|
+
skinId: PortalThemeSkinId;
|
|
44
|
+
supportedSchemes: PortalThemeScheme[];
|
|
45
|
+
tokenContract: string;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* @lang zh-CN renderer 与静态 portal 可投射的最小 theme reference;不包含颜色值、用户偏好或私有状态。
|
|
49
|
+
* @lang en Minimal theme reference projected by renderers and static portals; it contains no color values, user preference, or private state.
|
|
50
|
+
*/
|
|
51
|
+
export interface DocumentationPortalThemeReference {
|
|
52
|
+
/** @lang zh-CN exact contract 名称。 @lang en Exact contract name. */
|
|
53
|
+
contract: typeof DOCUMENTATION_PORTAL_THEME_CONTRACT;
|
|
54
|
+
/** @lang zh-CN exact contract 版本。 @lang en Exact contract version. */
|
|
55
|
+
contractVersion: typeof DOCUMENTATION_PORTAL_THEME_CONTRACT_VERSION;
|
|
56
|
+
/** @lang zh-CN 当前内置主题名称。 @lang en Name of the current built-in theme. */
|
|
57
|
+
name: "default";
|
|
58
|
+
/** @lang zh-CN 颜色模式只跟随系统 preference。 @lang en Color mode follows only the system preference. */
|
|
59
|
+
colorSchemePolicy: "system";
|
|
60
|
+
/** @lang zh-CN disclosure 由原生 details/summary 与 open attribute 负责。 @lang en Disclosure is owned by native details/summary and the open attribute. */
|
|
61
|
+
disclosure: "native-details-summary";
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* @lang zh-CN W-P104 默认主题的版本化 contract;它冻结 token、disclosure、兼容性和 privacy 边界。
|
|
65
|
+
* @lang en Versioned W-P104 default-theme contract freezing token, disclosure, compatibility, and privacy boundaries.
|
|
66
|
+
*/
|
|
67
|
+
export interface DocumentationPortalThemeContract extends DocumentationPortalThemeReference {
|
|
68
|
+
/** @lang zh-CN 支持的构建时 token sets。 @lang en Supported build-time token sets. */
|
|
69
|
+
colorSchemes: readonly ["light", "dark"];
|
|
70
|
+
/** @lang zh-CN light/dark 的完整 semantic token 值。 @lang en Complete semantic token values for light and dark schemes. */
|
|
71
|
+
tokens: Readonly<Record<"light" | "dark", DocumentationPortalThemeColorTokens>>;
|
|
72
|
+
/** @lang zh-CN 旧 CSS consumer 可继续使用的 additive alias。 @lang en Additive aliases retained for legacy CSS consumers. */
|
|
73
|
+
legacyAliases: readonly string[];
|
|
74
|
+
/** @lang zh-CN 原生 disclosure 的状态与 fallback policy。 @lang en State and fallback policy for native disclosure. */
|
|
75
|
+
disclosurePolicy: {
|
|
76
|
+
/** @lang zh-CN DOM 状态唯一来源。 @lang en Sole source of DOM state. */
|
|
77
|
+
stateAuthority: "details-open-attribute";
|
|
78
|
+
/** @lang zh-CN expanded/collapsed 由 HTML accessibility mapping 提供。 @lang en Expanded/collapsed state comes from the HTML accessibility mapping. */
|
|
79
|
+
accessibilityState: "native-expanded-state";
|
|
80
|
+
/** @lang zh-CN 原生 summary 不重复写 authored aria-expanded。 @lang en Native summaries do not duplicate authored aria-expanded. */
|
|
81
|
+
authoredAriaExpanded: false;
|
|
82
|
+
/** @lang zh-CN disclosure toggle 不依赖 JavaScript。 @lang en Disclosure toggling does not require JavaScript. */
|
|
83
|
+
scriptRequired: false;
|
|
84
|
+
/** @lang zh-CN 打印介质呈现折叠内容。 @lang en Print media reveals disclosure content. */
|
|
85
|
+
printBehavior: "expand-content";
|
|
86
|
+
};
|
|
87
|
+
/** @lang zh-CN draft 演进与旧 CSS alias 规则。 @lang en Draft evolution and legacy CSS-alias rules. */
|
|
88
|
+
compatibility: {
|
|
89
|
+
/** @lang zh-CN draft consumer 只接受 exact version。 @lang en Draft consumers accept exact versions only. */
|
|
90
|
+
exactDraftRequired: true;
|
|
91
|
+
/** @lang zh-CN 新增 token 是兼容的 additive change。 @lang en Adding a token is a compatible additive change. */
|
|
92
|
+
additiveTokenChange: "compatible";
|
|
93
|
+
/** @lang zh-CN 删除、重命名或改变语义需要新 contract 版本。 @lang en Removal, rename, or semantic change requires a new contract version. */
|
|
94
|
+
semanticTokenChange: "new-contract-version";
|
|
95
|
+
};
|
|
96
|
+
/** @lang zh-CN theme metadata 固定不携带的敏感类别。 @lang en Sensitive categories permanently excluded from theme metadata. */
|
|
97
|
+
privacy: {
|
|
98
|
+
/** @lang zh-CN 不嵌入源码正文。 @lang en Source bodies are not embedded. */
|
|
99
|
+
sourceBodyIncluded: false;
|
|
100
|
+
/** @lang zh-CN 不嵌入原始注释正文。 @lang en Raw comment bodies are not embedded. */
|
|
101
|
+
rawCommentIncluded: false;
|
|
102
|
+
/** @lang zh-CN 不嵌入主机绝对路径。 @lang en Host absolute paths are not embedded. */
|
|
103
|
+
absolutePathIncluded: false;
|
|
104
|
+
/** @lang zh-CN 不嵌入凭据或 secret。 @lang en Credentials and secrets are not embedded. */
|
|
105
|
+
credentialIncluded: false;
|
|
106
|
+
/** @lang zh-CN contract metadata 不投射用户主题偏好。 @lang en Contract metadata does not project user theme preferences. */
|
|
107
|
+
persistedUserPreferenceIncluded: false;
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* @lang zh-CN 默认主题的 immutable-by-contract 描述;runtime consumer 不得原地改写。
|
|
112
|
+
* @lang en Immutable-by-contract description of the default theme; runtime consumers must not mutate it in place.
|
|
113
|
+
*/
|
|
114
|
+
export declare const DEFAULT_DOCUMENTATION_PORTAL_THEME: {
|
|
115
|
+
readonly contract: "documentation-portal-theme";
|
|
116
|
+
readonly contractVersion: "0.1.0-draft";
|
|
117
|
+
readonly name: "default";
|
|
118
|
+
readonly colorSchemePolicy: "system";
|
|
119
|
+
readonly disclosure: "native-details-summary";
|
|
120
|
+
readonly colorSchemes: readonly ["light", "dark"];
|
|
121
|
+
readonly tokens: {
|
|
122
|
+
readonly light: {
|
|
123
|
+
readonly canvas: "#f7f8fa";
|
|
124
|
+
readonly surface: "#ffffff";
|
|
125
|
+
readonly surfaceMuted: "#eef2f6";
|
|
126
|
+
readonly border: "#8793a5";
|
|
127
|
+
readonly text: "#172033";
|
|
128
|
+
readonly textMuted: "#4f5e75";
|
|
129
|
+
readonly accent: "#08736f";
|
|
130
|
+
readonly accentContrast: "#ffffff";
|
|
131
|
+
readonly accentSoft: "#d5f0eb";
|
|
132
|
+
readonly accentHover: "#065f5b";
|
|
133
|
+
readonly focusRing: "#005fcc";
|
|
134
|
+
readonly codeBackground: "#101820";
|
|
135
|
+
readonly codeText: "#d7f4ff";
|
|
136
|
+
readonly danger: "#9b2c2c";
|
|
137
|
+
};
|
|
138
|
+
readonly dark: {
|
|
139
|
+
readonly canvas: "#10151f";
|
|
140
|
+
readonly surface: "#18202c";
|
|
141
|
+
readonly surfaceMuted: "#202a38";
|
|
142
|
+
readonly border: "#7b899d";
|
|
143
|
+
readonly text: "#eff4ff";
|
|
144
|
+
readonly textMuted: "#c6d0df";
|
|
145
|
+
readonly accent: "#6ee7da";
|
|
146
|
+
readonly accentContrast: "#061a19";
|
|
147
|
+
readonly accentSoft: "#153c3a";
|
|
148
|
+
readonly accentHover: "#9af2e8";
|
|
149
|
+
readonly focusRing: "#f7c948";
|
|
150
|
+
readonly codeBackground: "#090f17";
|
|
151
|
+
readonly codeText: "#d7f4ff";
|
|
152
|
+
readonly danger: "#ffb4ab";
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
readonly legacyAliases: readonly ["--hia-bg", "--hia-surface", "--hia-border", "--hia-text", "--hia-muted", "--hia-accent", "--hia-accent-soft", "--hia-code-bg", "--hia-code-text"];
|
|
156
|
+
readonly disclosurePolicy: {
|
|
157
|
+
readonly stateAuthority: "details-open-attribute";
|
|
158
|
+
readonly accessibilityState: "native-expanded-state";
|
|
159
|
+
readonly authoredAriaExpanded: false;
|
|
160
|
+
readonly scriptRequired: false;
|
|
161
|
+
readonly printBehavior: "expand-content";
|
|
162
|
+
};
|
|
163
|
+
readonly compatibility: {
|
|
164
|
+
readonly exactDraftRequired: true;
|
|
165
|
+
readonly additiveTokenChange: "compatible";
|
|
166
|
+
readonly semanticTokenChange: "new-contract-version";
|
|
167
|
+
};
|
|
168
|
+
readonly privacy: {
|
|
169
|
+
readonly sourceBodyIncluded: false;
|
|
170
|
+
readonly rawCommentIncluded: false;
|
|
171
|
+
readonly absolutePathIncluded: false;
|
|
172
|
+
readonly credentialIncluded: false;
|
|
173
|
+
readonly persistedUserPreferenceIncluded: false;
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
/**
|
|
177
|
+
* @lang zh-CN 返回深拷贝的 metadata-only skin catalog,供 neutral presentation profile 使用。
|
|
178
|
+
* @lang en Returns a deep-copied metadata-only skin catalog for neutral presentation profiles.
|
|
179
|
+
*
|
|
180
|
+
* @returns 不含 token value 与 owner selector 的确定性 catalog。Deterministic catalog without token values or owner selectors.
|
|
181
|
+
*/
|
|
182
|
+
export declare function getPortalThemeSkinCatalog(): PortalThemeSkinCapability[];
|
|
183
|
+
/**
|
|
184
|
+
* @lang zh-CN 返回一个内置 skin 的双语可见标签;未知值 fail closed 到 classic。
|
|
185
|
+
* @lang en Returns the bilingual visible label for a built-in skin; unknown values fail closed to classic.
|
|
186
|
+
*
|
|
187
|
+
* @param skinId - 待解析的 skin identity。Skin identity to resolve.
|
|
188
|
+
* @returns 可见标签。Visible label.
|
|
189
|
+
*/
|
|
190
|
+
export declare function getPortalThemeSkinLabel(skinId: PortalThemeSkinId): string;
|
|
191
|
+
/**
|
|
192
|
+
* @lang zh-CN 返回内置 scheme 的双语可见标签。
|
|
193
|
+
* @lang en Returns the bilingual visible label for a built-in scheme.
|
|
194
|
+
*
|
|
195
|
+
* @param scheme - Portal scheme identity。Portal scheme identity.
|
|
196
|
+
* @returns 可见标签。Visible label.
|
|
197
|
+
*/
|
|
198
|
+
export declare function getPortalThemeSchemeLabel(scheme: PortalThemeScheme): string;
|
|
199
|
+
/** 默认主题 CSS artifact path。Default theme CSS artifact path. */
|
|
1
200
|
export declare const DEFAULT_THEME_CSS_PATH = "assets/hia-default.css";
|
|
201
|
+
/** 默认主题 JavaScript artifact path。Default theme JavaScript artifact path. */
|
|
2
202
|
export declare const DEFAULT_THEME_JS_PATH = "assets/hia-default.js";
|
|
203
|
+
/** 单个静态主题资源。One static theme asset. */
|
|
3
204
|
export interface HiaThemeAsset {
|
|
205
|
+
/** @lang zh-CN renderer 输出中的相对资源路径。 @lang en Relative asset path in renderer output. */
|
|
4
206
|
path: string;
|
|
207
|
+
/** @lang zh-CN UTF-8 静态资源正文。 @lang en UTF-8 static asset body. */
|
|
5
208
|
contents: string;
|
|
209
|
+
/** @lang zh-CN 带字符集的 MIME 类型。 @lang en MIME type including its character set. */
|
|
6
210
|
contentType: string;
|
|
7
211
|
}
|
|
8
|
-
|
|
212
|
+
/**
|
|
213
|
+
* @lang zh-CN 返回不含 token 值的默认 theme reference 副本,供 renderer 安全投射。
|
|
214
|
+
* @lang en Returns a copy of the default theme reference without token values for safe renderer projection.
|
|
215
|
+
*
|
|
216
|
+
* @returns 默认主题的公开 metadata-only reference。Public metadata-only reference for the default theme.
|
|
217
|
+
*/
|
|
218
|
+
export declare function getDefaultDocumentationPortalThemeReference(): DocumentationPortalThemeReference;
|
|
219
|
+
/**
|
|
220
|
+
* @lang zh-CN 返回renderer可直接分发的默认主题资源副本,可追加已校验品牌颜色,不改变默认常量。
|
|
221
|
+
* @lang en Returns default-theme asset copies ready for renderer distribution, optionally appending validated brand colors without changing default constants.
|
|
222
|
+
* @param options <lang><zh-CN>可选封闭十六进制颜色token;缺省保持原始资源。</zh-CN><en>Optional closed hex color tokens; omission preserves original assets.</en></lang>
|
|
223
|
+
* @returns <lang><zh-CN>两份新CSS/JS文件记录,无文件I/O。</zh-CN><en>Two new CSS/JS file records without filesystem I/O.</en></lang>
|
|
224
|
+
* @throws {TypeError} <lang><zh-CN>非法颜色或访问器以HIA_THEME_COLORS_INVALID拒绝。</zh-CN><en>Invalid colors or accessors are rejected with HIA_THEME_COLORS_INVALID.</en></lang>
|
|
225
|
+
*/
|
|
226
|
+
export declare function getDefaultThemeAssets(options?: HiaThemeAssetOptions): HiaThemeAsset[];
|
|
227
|
+
/** @lang zh-CN 默认主题的构建期品牌选项;只改变明确颜色,不声明新皮肤或公开权限。 @lang en Build-time brand options for the default theme, changing only explicit colors without declaring a new skin or disclosure permission. */
|
|
228
|
+
export interface HiaThemeAssetOptions {
|
|
229
|
+
/** @lang zh-CN 封闭semantic token名及#RGB/#RGBA/#RRGGBB/#RRGGBBAA值,适用于当前配色;调用者须复核所选scheme对比度。 @lang en Closed semantic token names and hex color values, applying to the selected palette; callers must review contrast for their chosen scheme. */
|
|
230
|
+
colors?: Partial<Record<DocumentationPortalThemeColorTokenName, string>>;
|
|
231
|
+
}
|
|
232
|
+
/** 默认主题 CSS;Portal IA 仍依赖 native HTML disclosure,不声明 ARIA tree。Default-theme CSS; Portal IA keeps native HTML disclosure and makes no ARIA-tree claim. */
|
|
9
233
|
export declare const DEFAULT_THEME_CSS: string;
|
|
234
|
+
/** 默认主题的最小 locale switch runtime。Minimal locale-switch runtime for the default theme. */
|
|
10
235
|
export declare const DEFAULT_THEME_JS: string;
|
|
11
236
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB,2BAA2B,CAAC;AAC/D,eAAO,MAAM,qBAAqB,0BAA0B,CAAC;AAE7D,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,
|
|
1
|
+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H,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,iBAAiB,GAAG,MAAM,CAEzE;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,iBAAiB,GAAG,MAAM,CAE3E;AAED,8DAA8D;AAC9D,eAAO,MAAM,sBAAsB,2BAA2B,CAAC;AAC/D,4EAA4E;AAC5E,eAAO,MAAM,qBAAqB,0BAA0B,CAAC;AAE7D,uCAAuC;AACvC,MAAM,WAAW,aAAa;IAC5B,wFAAwF;IACxF,IAAI,EAAE,MAAM,CAAC;IACb,kEAAkE;IAClE,QAAQ,EAAE,MAAM,CAAC;IACjB,iFAAiF;IACjF,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;;GAKG;AACH,wBAAgB,2CAA2C,IAAI,iCAAiC,CAQ/F;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,GAAE,oBAAyB,GAAG,aAAa,EAAE,CAkBzF;AAED,kMAAkM;AAClM,MAAM,WAAW,oBAAoB;IACnC,gPAAgP;IAChP,MAAM,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,sCAAsC,EAAE,MAAM,CAAC,CAAC,CAAC;CAC1E;AA6DD,0JAA0J;AAC1J,eAAO,MAAM,iBAAiB,QAqrBtB,CAAC;AAET,yFAAyF;AACzF,eAAO,MAAM,gBAAgB,QAwDrB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,245 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @lang zh-CN 默认主题 contract 的中性名称;包名与 CSS 命名空间不改变该协议身份。
|
|
3
|
+
* @lang en Neutral name of the default-theme contract; neither the package name nor the CSS namespace changes this protocol identity.
|
|
4
|
+
*/
|
|
5
|
+
export const DOCUMENTATION_PORTAL_THEME_CONTRACT = "documentation-portal-theme";
|
|
6
|
+
/**
|
|
7
|
+
* @lang zh-CN 默认主题 contract 的首个 exact draft 版本;未知版本不得按字符串猜测兼容。
|
|
8
|
+
* @lang en First exact draft version of the default-theme contract; consumers must not infer compatibility for unknown versions.
|
|
9
|
+
*/
|
|
10
|
+
export const DOCUMENTATION_PORTAL_THEME_CONTRACT_VERSION = "0.1.0-draft";
|
|
11
|
+
/**
|
|
12
|
+
* @lang zh-CN W-P104 首批稳定的 semantic color token 名称。
|
|
13
|
+
* @lang en Stable semantic color-token names introduced by the W-P104 slice.
|
|
14
|
+
*/
|
|
15
|
+
export const DOCUMENTATION_PORTAL_THEME_COLOR_TOKEN_NAMES = [
|
|
16
|
+
"canvas",
|
|
17
|
+
"surface",
|
|
18
|
+
"surfaceMuted",
|
|
19
|
+
"border",
|
|
20
|
+
"text",
|
|
21
|
+
"textMuted",
|
|
22
|
+
"accent",
|
|
23
|
+
"accentContrast",
|
|
24
|
+
"accentSoft",
|
|
25
|
+
"accentHover",
|
|
26
|
+
"focusRing",
|
|
27
|
+
"codeBackground",
|
|
28
|
+
"codeText",
|
|
29
|
+
"danger"
|
|
30
|
+
];
|
|
31
|
+
/**
|
|
32
|
+
* @lang zh-CN Portal owner 的内置 skin identity;与 JTH-owned skin catalog 保持实现隔离。
|
|
33
|
+
* @lang en Built-in Portal-owner skin identities, implementation-isolated from the JTH-owned skin catalog.
|
|
34
|
+
*/
|
|
35
|
+
export const PORTAL_THEME_SKIN_IDS = ["portal.classic", "portal.graphite", "portal.lumen"];
|
|
36
|
+
/** @lang zh-CN skin 独立支持的颜色 scheme 闭集。 @lang en Closed color-scheme set supported independently by every skin. */
|
|
37
|
+
export const PORTAL_THEME_SCHEMES = ["dark", "light", "system"];
|
|
38
|
+
/**
|
|
39
|
+
* @lang zh-CN 默认主题的 immutable-by-contract 描述;runtime consumer 不得原地改写。
|
|
40
|
+
* @lang en Immutable-by-contract description of the default theme; runtime consumers must not mutate it in place.
|
|
41
|
+
*/
|
|
42
|
+
export const DEFAULT_DOCUMENTATION_PORTAL_THEME = {
|
|
43
|
+
contract: DOCUMENTATION_PORTAL_THEME_CONTRACT,
|
|
44
|
+
contractVersion: DOCUMENTATION_PORTAL_THEME_CONTRACT_VERSION,
|
|
45
|
+
name: "default",
|
|
46
|
+
colorSchemePolicy: "system",
|
|
47
|
+
disclosure: "native-details-summary",
|
|
48
|
+
colorSchemes: ["light", "dark"],
|
|
49
|
+
tokens: {
|
|
50
|
+
light: {
|
|
51
|
+
canvas: "#f7f8fa",
|
|
52
|
+
surface: "#ffffff",
|
|
53
|
+
surfaceMuted: "#eef2f6",
|
|
54
|
+
border: "#8793a5",
|
|
55
|
+
text: "#172033",
|
|
56
|
+
textMuted: "#4f5e75",
|
|
57
|
+
accent: "#08736f",
|
|
58
|
+
accentContrast: "#ffffff",
|
|
59
|
+
accentSoft: "#d5f0eb",
|
|
60
|
+
accentHover: "#065f5b",
|
|
61
|
+
focusRing: "#005fcc",
|
|
62
|
+
codeBackground: "#101820",
|
|
63
|
+
codeText: "#d7f4ff",
|
|
64
|
+
danger: "#9b2c2c"
|
|
65
|
+
},
|
|
66
|
+
dark: {
|
|
67
|
+
canvas: "#10151f",
|
|
68
|
+
surface: "#18202c",
|
|
69
|
+
surfaceMuted: "#202a38",
|
|
70
|
+
border: "#7b899d",
|
|
71
|
+
text: "#eff4ff",
|
|
72
|
+
textMuted: "#c6d0df",
|
|
73
|
+
accent: "#6ee7da",
|
|
74
|
+
accentContrast: "#061a19",
|
|
75
|
+
accentSoft: "#153c3a",
|
|
76
|
+
accentHover: "#9af2e8",
|
|
77
|
+
focusRing: "#f7c948",
|
|
78
|
+
codeBackground: "#090f17",
|
|
79
|
+
codeText: "#d7f4ff",
|
|
80
|
+
danger: "#ffb4ab"
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
legacyAliases: [
|
|
84
|
+
"--hia-bg",
|
|
85
|
+
"--hia-surface",
|
|
86
|
+
"--hia-border",
|
|
87
|
+
"--hia-text",
|
|
88
|
+
"--hia-muted",
|
|
89
|
+
"--hia-accent",
|
|
90
|
+
"--hia-accent-soft",
|
|
91
|
+
"--hia-code-bg",
|
|
92
|
+
"--hia-code-text"
|
|
93
|
+
],
|
|
94
|
+
disclosurePolicy: {
|
|
95
|
+
stateAuthority: "details-open-attribute",
|
|
96
|
+
accessibilityState: "native-expanded-state",
|
|
97
|
+
authoredAriaExpanded: false,
|
|
98
|
+
scriptRequired: false,
|
|
99
|
+
printBehavior: "expand-content"
|
|
100
|
+
},
|
|
101
|
+
compatibility: {
|
|
102
|
+
exactDraftRequired: true,
|
|
103
|
+
additiveTokenChange: "compatible",
|
|
104
|
+
semanticTokenChange: "new-contract-version"
|
|
105
|
+
},
|
|
106
|
+
privacy: {
|
|
107
|
+
sourceBodyIncluded: false,
|
|
108
|
+
rawCommentIncluded: false,
|
|
109
|
+
absolutePathIncluded: false,
|
|
110
|
+
credentialIncluded: false,
|
|
111
|
+
persistedUserPreferenceIncluded: false
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
// <lang><zh-CN>三套皮肤独立定义视觉层次;共同 capability 与 token contract 保持跨变体语义一致。</zh-CN><en>The three skins define distinct visual hierarchy while sharing capabilities and the token contract across variants.</en></lang>
|
|
115
|
+
const PORTAL_THEME_SKINS = [
|
|
116
|
+
{
|
|
117
|
+
skinId: "portal.classic",
|
|
118
|
+
label: "Classic / 经典",
|
|
119
|
+
density: "1",
|
|
120
|
+
radius: "6px",
|
|
121
|
+
tokenContract: `${DOCUMENTATION_PORTAL_THEME_CONTRACT}@${DOCUMENTATION_PORTAL_THEME_CONTRACT_VERSION}`,
|
|
122
|
+
supportedSchemes: [...PORTAL_THEME_SCHEMES],
|
|
123
|
+
capabilities: ["native-disclosure", "no-script-default", "source-reader", "theme-selector"],
|
|
124
|
+
tokens: DEFAULT_DOCUMENTATION_PORTAL_THEME.tokens
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
skinId: "portal.graphite",
|
|
128
|
+
label: "Graphite / 石墨",
|
|
129
|
+
density: ".94",
|
|
130
|
+
radius: "3px",
|
|
131
|
+
tokenContract: `${DOCUMENTATION_PORTAL_THEME_CONTRACT}@${DOCUMENTATION_PORTAL_THEME_CONTRACT_VERSION}`,
|
|
132
|
+
supportedSchemes: [...PORTAL_THEME_SCHEMES],
|
|
133
|
+
capabilities: ["native-disclosure", "no-script-default", "source-reader", "theme-selector"],
|
|
134
|
+
tokens: {
|
|
135
|
+
light: {
|
|
136
|
+
canvas: "#eef0f3", surface: "#fafafa", surfaceMuted: "#e1e5ea", border: "#69717c",
|
|
137
|
+
text: "#181b20", textMuted: "#4b525c", accent: "#4059a9", accentContrast: "#ffffff",
|
|
138
|
+
accentSoft: "#dce3fb", accentHover: "#30458c", focusRing: "#9a3e00", codeBackground: "#171a20",
|
|
139
|
+
codeText: "#edf1f7", danger: "#9a2e35"
|
|
140
|
+
},
|
|
141
|
+
dark: {
|
|
142
|
+
canvas: "#111318", surface: "#191c22", surfaceMuted: "#232730", border: "#89919d",
|
|
143
|
+
text: "#f2f4f7", textMuted: "#c4cad2", accent: "#a8b9ff", accentContrast: "#12182e",
|
|
144
|
+
accentSoft: "#29345d", accentHover: "#cad4ff", focusRing: "#ffbf69", codeBackground: "#080a0e",
|
|
145
|
+
codeText: "#edf1f7", danger: "#ffb3bb"
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
skinId: "portal.lumen",
|
|
151
|
+
label: "Lumen / 明亮",
|
|
152
|
+
density: "1.06",
|
|
153
|
+
radius: "12px",
|
|
154
|
+
tokenContract: `${DOCUMENTATION_PORTAL_THEME_CONTRACT}@${DOCUMENTATION_PORTAL_THEME_CONTRACT_VERSION}`,
|
|
155
|
+
supportedSchemes: [...PORTAL_THEME_SCHEMES],
|
|
156
|
+
capabilities: ["native-disclosure", "no-script-default", "source-reader", "theme-selector"],
|
|
157
|
+
tokens: {
|
|
158
|
+
light: {
|
|
159
|
+
canvas: "#fffaf0", surface: "#ffffff", surfaceMuted: "#f8efd9", border: "#9b835b",
|
|
160
|
+
text: "#2c2418", textMuted: "#685944", accent: "#9c4f00", accentContrast: "#ffffff",
|
|
161
|
+
accentSoft: "#ffe2b7", accentHover: "#783d00", focusRing: "#005fcc", codeBackground: "#252019",
|
|
162
|
+
codeText: "#fff5df", danger: "#a22b35"
|
|
163
|
+
},
|
|
164
|
+
dark: {
|
|
165
|
+
canvas: "#1d1811", surface: "#282117", surfaceMuted: "#352b1d", border: "#b8a078",
|
|
166
|
+
text: "#fff5df", textMuted: "#e1ceb0", accent: "#ffbd70", accentContrast: "#2a1600",
|
|
167
|
+
accentSoft: "#59401f", accentHover: "#ffd39e", focusRing: "#78c8ff", codeBackground: "#100d09",
|
|
168
|
+
codeText: "#fff5df", danger: "#ffb3bb"
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
];
|
|
173
|
+
/**
|
|
174
|
+
* @lang zh-CN 返回深拷贝的 metadata-only skin catalog,供 neutral presentation profile 使用。
|
|
175
|
+
* @lang en Returns a deep-copied metadata-only skin catalog for neutral presentation profiles.
|
|
176
|
+
*
|
|
177
|
+
* @returns 不含 token value 与 owner selector 的确定性 catalog。Deterministic catalog without token values or owner selectors.
|
|
178
|
+
*/
|
|
179
|
+
export function getPortalThemeSkinCatalog() {
|
|
180
|
+
return PORTAL_THEME_SKINS.map(({ capabilities, skinId, supportedSchemes, tokenContract }) => ({
|
|
181
|
+
skinId,
|
|
182
|
+
tokenContract,
|
|
183
|
+
supportedSchemes: [...supportedSchemes],
|
|
184
|
+
capabilities: [...capabilities]
|
|
185
|
+
}));
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* @lang zh-CN 返回一个内置 skin 的双语可见标签;未知值 fail closed 到 classic。
|
|
189
|
+
* @lang en Returns the bilingual visible label for a built-in skin; unknown values fail closed to classic.
|
|
190
|
+
*
|
|
191
|
+
* @param skinId - 待解析的 skin identity。Skin identity to resolve.
|
|
192
|
+
* @returns 可见标签。Visible label.
|
|
193
|
+
*/
|
|
194
|
+
export function getPortalThemeSkinLabel(skinId) {
|
|
195
|
+
return PORTAL_THEME_SKINS.find((skin) => skin.skinId === skinId)?.label ?? PORTAL_THEME_SKINS[0].label;
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* @lang zh-CN 返回内置 scheme 的双语可见标签。
|
|
199
|
+
* @lang en Returns the bilingual visible label for a built-in scheme.
|
|
200
|
+
*
|
|
201
|
+
* @param scheme - Portal scheme identity。Portal scheme identity.
|
|
202
|
+
* @returns 可见标签。Visible label.
|
|
203
|
+
*/
|
|
204
|
+
export function getPortalThemeSchemeLabel(scheme) {
|
|
205
|
+
return ({ dark: "Dark / 深色", light: "Light / 浅色", system: "System / 跟随系统" })[scheme];
|
|
206
|
+
}
|
|
207
|
+
/** 默认主题 CSS artifact path。Default theme CSS artifact path. */
|
|
1
208
|
export const DEFAULT_THEME_CSS_PATH = "assets/hia-default.css";
|
|
209
|
+
/** 默认主题 JavaScript artifact path。Default theme JavaScript artifact path. */
|
|
2
210
|
export const DEFAULT_THEME_JS_PATH = "assets/hia-default.js";
|
|
3
|
-
|
|
211
|
+
/**
|
|
212
|
+
* @lang zh-CN 返回不含 token 值的默认 theme reference 副本,供 renderer 安全投射。
|
|
213
|
+
* @lang en Returns a copy of the default theme reference without token values for safe renderer projection.
|
|
214
|
+
*
|
|
215
|
+
* @returns 默认主题的公开 metadata-only reference。Public metadata-only reference for the default theme.
|
|
216
|
+
*/
|
|
217
|
+
export function getDefaultDocumentationPortalThemeReference() {
|
|
218
|
+
return {
|
|
219
|
+
contract: DEFAULT_DOCUMENTATION_PORTAL_THEME.contract,
|
|
220
|
+
contractVersion: DEFAULT_DOCUMENTATION_PORTAL_THEME.contractVersion,
|
|
221
|
+
name: DEFAULT_DOCUMENTATION_PORTAL_THEME.name,
|
|
222
|
+
colorSchemePolicy: DEFAULT_DOCUMENTATION_PORTAL_THEME.colorSchemePolicy,
|
|
223
|
+
disclosure: DEFAULT_DOCUMENTATION_PORTAL_THEME.disclosure
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* @lang zh-CN 返回renderer可直接分发的默认主题资源副本,可追加已校验品牌颜色,不改变默认常量。
|
|
228
|
+
* @lang en Returns default-theme asset copies ready for renderer distribution, optionally appending validated brand colors without changing default constants.
|
|
229
|
+
* @param options <lang><zh-CN>可选封闭十六进制颜色token;缺省保持原始资源。</zh-CN><en>Optional closed hex color tokens; omission preserves original assets.</en></lang>
|
|
230
|
+
* @returns <lang><zh-CN>两份新CSS/JS文件记录,无文件I/O。</zh-CN><en>Two new CSS/JS file records without filesystem I/O.</en></lang>
|
|
231
|
+
* @throws {TypeError} <lang><zh-CN>非法颜色或访问器以HIA_THEME_COLORS_INVALID拒绝。</zh-CN><en>Invalid colors or accessors are rejected with HIA_THEME_COLORS_INVALID.</en></lang>
|
|
232
|
+
*/
|
|
233
|
+
export function getDefaultThemeAssets(options = {}) {
|
|
234
|
+
// <lang><zh-CN>只在副本中追加已校验的颜色,默认常量和JS资源不变,不接收任意CSS片段。</zh-CN><en>Append validated colors only to a copy, leaving default constants and JavaScript unchanged and accepting no arbitrary CSS fragments.</en></lang>
|
|
235
|
+
const declarations = createBrandColorDeclarations(options);
|
|
236
|
+
const branding = declarations.length
|
|
237
|
+
? `\n\n:root, :root[data-hia-skin], :root[data-hia-skin][data-hia-scheme] {\n${declarations.join("\n")}\n}`
|
|
238
|
+
: "";
|
|
4
239
|
return [
|
|
5
240
|
{
|
|
6
241
|
path: DEFAULT_THEME_CSS_PATH,
|
|
7
|
-
contents: DEFAULT_THEME_CSS,
|
|
242
|
+
contents: DEFAULT_THEME_CSS + branding,
|
|
8
243
|
contentType: "text/css; charset=utf-8"
|
|
9
244
|
},
|
|
10
245
|
{
|
|
@@ -14,21 +249,119 @@ export function getDefaultThemeAssets() {
|
|
|
14
249
|
}
|
|
15
250
|
];
|
|
16
251
|
}
|
|
252
|
+
/** @lang zh-CN 快照普通数据选项并生成安全颜色声明;非法值/访问器/反射异常统一拒绝,不回显原值。 @lang en Snapshots ordinary data options into safe color declarations, uniformly rejecting invalid values/accessors/reflection failures without echoing values. */
|
|
253
|
+
function createBrandColorDeclarations(options) {
|
|
254
|
+
try {
|
|
255
|
+
// <lang><zh-CN>描述符读取不调用getter;颜色容器只接受普通对象或null-prototype对象。</zh-CN><en>Descriptor reads do not invoke getters; color containers accept only ordinary or null-prototype objects.</en></lang>
|
|
256
|
+
const descriptor = Object.getOwnPropertyDescriptor(options, "colors");
|
|
257
|
+
if (!descriptor)
|
|
258
|
+
return [];
|
|
259
|
+
if (!("value" in descriptor) || !descriptor.enumerable)
|
|
260
|
+
throw new TypeError();
|
|
261
|
+
const colors = descriptor.value;
|
|
262
|
+
if (colors === undefined)
|
|
263
|
+
return [];
|
|
264
|
+
if (!colors || typeof colors !== "object" || Array.isArray(colors) || ![Object.prototype, null].includes(Object.getPrototypeOf(colors)))
|
|
265
|
+
throw new TypeError();
|
|
266
|
+
const declarations = [];
|
|
267
|
+
for (const name of Reflect.ownKeys(colors)) {
|
|
268
|
+
const property = Object.getOwnPropertyDescriptor(colors, name);
|
|
269
|
+
if (typeof name !== "string" || !DOCUMENTATION_PORTAL_THEME_COLOR_TOKEN_NAMES.includes(name) || !property?.enumerable || !("value" in property))
|
|
270
|
+
throw new TypeError();
|
|
271
|
+
const value = property.value;
|
|
272
|
+
if (typeof value !== "string" || value.trim() !== value || !/^#(?:[0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/iu.test(value))
|
|
273
|
+
throw new TypeError();
|
|
274
|
+
declarations.push(` --hia-color-${themeTokenCssName(name)}: ${value};`);
|
|
275
|
+
}
|
|
276
|
+
return declarations;
|
|
277
|
+
}
|
|
278
|
+
catch {
|
|
279
|
+
throw new TypeError("HIA_THEME_COLORS_INVALID: Brand colors require known semantic names and literal hex values.");
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* @lang zh-CN 将 semantic token 名转换为稳定 CSS custom-property suffix。
|
|
284
|
+
* @lang en Converts a semantic token name to a stable CSS custom-property suffix.
|
|
285
|
+
* @param name - contract token name。Contract token name.
|
|
286
|
+
* @returns kebab-case CSS suffix。Kebab-case CSS suffix.
|
|
287
|
+
*/
|
|
288
|
+
function themeTokenCssName(name) {
|
|
289
|
+
return name.replace(/[A-Z]/gu, (letter) => `-${letter.toLowerCase()}`);
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* @lang zh-CN 为一个 skin/scheme 生成纯 token rule;不包含 component selector。
|
|
293
|
+
* @lang en Generates a token-only rule for one skin/scheme without component selectors.
|
|
294
|
+
* @param selector - 仅由 owner 构造的 root selector。Owner-constructed root selector.
|
|
295
|
+
* @param skin - 内部 skin definition。Internal skin definition.
|
|
296
|
+
* @param scheme - concrete light/dark token set。Concrete light/dark token set.
|
|
297
|
+
* @returns 确定性 CSS rule。Deterministic CSS rule.
|
|
298
|
+
*/
|
|
299
|
+
function renderPortalSkinTokenRule(selector, skin, scheme) {
|
|
300
|
+
const tokenLines = DOCUMENTATION_PORTAL_THEME_COLOR_TOKEN_NAMES
|
|
301
|
+
.map((name) => ` --hia-color-${themeTokenCssName(name)}: ${skin.tokens[scheme][name]};`)
|
|
302
|
+
.join("\n");
|
|
303
|
+
return `${selector} {\n${tokenLines}\n --hia-density: ${skin.density};\n --hia-radius: ${skin.radius};\n}`;
|
|
304
|
+
}
|
|
305
|
+
/** @lang zh-CN 构造三 skin × 三 scheme 的 CSS token 投影。 @lang en Builds the CSS token projection for three skins by three schemes. */
|
|
306
|
+
function renderPortalSkinCss() {
|
|
307
|
+
return PORTAL_THEME_SKINS.map((skin) => [
|
|
308
|
+
renderPortalSkinTokenRule(`:root[data-hia-skin="${skin.skinId}"]`, skin, "light"),
|
|
309
|
+
renderPortalSkinTokenRule(`:root[data-hia-skin="${skin.skinId}"][data-hia-scheme="light"]`, skin, "light"),
|
|
310
|
+
renderPortalSkinTokenRule(`:root[data-hia-skin="${skin.skinId}"][data-hia-scheme="dark"]`, skin, "dark"),
|
|
311
|
+
`@media (prefers-color-scheme: dark) {\n${renderPortalSkinTokenRule(`:root[data-hia-skin="${skin.skinId}"][data-hia-scheme="system"]`, skin, "dark")}\n}`
|
|
312
|
+
].join("\n\n")).join("\n\n");
|
|
313
|
+
}
|
|
314
|
+
/** 默认主题 CSS;Portal IA 仍依赖 native HTML disclosure,不声明 ARIA tree。Default-theme CSS; Portal IA keeps native HTML disclosure and makes no ARIA-tree claim. */
|
|
17
315
|
export const DEFAULT_THEME_CSS = `
|
|
18
316
|
:root {
|
|
19
|
-
color-scheme: light;
|
|
20
|
-
--hia-
|
|
21
|
-
--hia-surface:
|
|
22
|
-
--hia-
|
|
23
|
-
--hia-
|
|
24
|
-
--hia-
|
|
25
|
-
--hia-
|
|
26
|
-
--hia-accent
|
|
27
|
-
--hia-
|
|
28
|
-
--hia-
|
|
317
|
+
color-scheme: light dark;
|
|
318
|
+
--hia-color-canvas: ${DEFAULT_DOCUMENTATION_PORTAL_THEME.tokens.light.canvas};
|
|
319
|
+
--hia-color-surface: ${DEFAULT_DOCUMENTATION_PORTAL_THEME.tokens.light.surface};
|
|
320
|
+
--hia-color-surface-muted: ${DEFAULT_DOCUMENTATION_PORTAL_THEME.tokens.light.surfaceMuted};
|
|
321
|
+
--hia-color-border: ${DEFAULT_DOCUMENTATION_PORTAL_THEME.tokens.light.border};
|
|
322
|
+
--hia-color-text: ${DEFAULT_DOCUMENTATION_PORTAL_THEME.tokens.light.text};
|
|
323
|
+
--hia-color-text-muted: ${DEFAULT_DOCUMENTATION_PORTAL_THEME.tokens.light.textMuted};
|
|
324
|
+
--hia-color-accent: ${DEFAULT_DOCUMENTATION_PORTAL_THEME.tokens.light.accent};
|
|
325
|
+
--hia-color-accent-contrast: ${DEFAULT_DOCUMENTATION_PORTAL_THEME.tokens.light.accentContrast};
|
|
326
|
+
--hia-color-accent-soft: ${DEFAULT_DOCUMENTATION_PORTAL_THEME.tokens.light.accentSoft};
|
|
327
|
+
--hia-color-accent-hover: ${DEFAULT_DOCUMENTATION_PORTAL_THEME.tokens.light.accentHover};
|
|
328
|
+
--hia-color-focus-ring: ${DEFAULT_DOCUMENTATION_PORTAL_THEME.tokens.light.focusRing};
|
|
329
|
+
--hia-color-code-background: ${DEFAULT_DOCUMENTATION_PORTAL_THEME.tokens.light.codeBackground};
|
|
330
|
+
--hia-color-code-text: ${DEFAULT_DOCUMENTATION_PORTAL_THEME.tokens.light.codeText};
|
|
331
|
+
--hia-color-danger: ${DEFAULT_DOCUMENTATION_PORTAL_THEME.tokens.light.danger};
|
|
332
|
+
--hia-bg: var(--hia-color-canvas);
|
|
333
|
+
--hia-surface: var(--hia-color-surface);
|
|
334
|
+
--hia-border: var(--hia-color-border);
|
|
335
|
+
--hia-text: var(--hia-color-text);
|
|
336
|
+
--hia-muted: var(--hia-color-text-muted);
|
|
337
|
+
--hia-accent: var(--hia-color-accent);
|
|
338
|
+
--hia-accent-soft: var(--hia-color-accent-soft);
|
|
339
|
+
--hia-code-bg: var(--hia-color-code-background);
|
|
340
|
+
--hia-code-text: var(--hia-color-code-text);
|
|
29
341
|
font-family: "Inter", "Noto Sans SC", "Source Han Sans SC", "Sarasa Gothic SC", sans-serif;
|
|
30
342
|
}
|
|
31
343
|
|
|
344
|
+
@media (prefers-color-scheme: dark) {
|
|
345
|
+
:root {
|
|
346
|
+
--hia-color-canvas: ${DEFAULT_DOCUMENTATION_PORTAL_THEME.tokens.dark.canvas};
|
|
347
|
+
--hia-color-surface: ${DEFAULT_DOCUMENTATION_PORTAL_THEME.tokens.dark.surface};
|
|
348
|
+
--hia-color-surface-muted: ${DEFAULT_DOCUMENTATION_PORTAL_THEME.tokens.dark.surfaceMuted};
|
|
349
|
+
--hia-color-border: ${DEFAULT_DOCUMENTATION_PORTAL_THEME.tokens.dark.border};
|
|
350
|
+
--hia-color-text: ${DEFAULT_DOCUMENTATION_PORTAL_THEME.tokens.dark.text};
|
|
351
|
+
--hia-color-text-muted: ${DEFAULT_DOCUMENTATION_PORTAL_THEME.tokens.dark.textMuted};
|
|
352
|
+
--hia-color-accent: ${DEFAULT_DOCUMENTATION_PORTAL_THEME.tokens.dark.accent};
|
|
353
|
+
--hia-color-accent-contrast: ${DEFAULT_DOCUMENTATION_PORTAL_THEME.tokens.dark.accentContrast};
|
|
354
|
+
--hia-color-accent-soft: ${DEFAULT_DOCUMENTATION_PORTAL_THEME.tokens.dark.accentSoft};
|
|
355
|
+
--hia-color-accent-hover: ${DEFAULT_DOCUMENTATION_PORTAL_THEME.tokens.dark.accentHover};
|
|
356
|
+
--hia-color-focus-ring: ${DEFAULT_DOCUMENTATION_PORTAL_THEME.tokens.dark.focusRing};
|
|
357
|
+
--hia-color-code-background: ${DEFAULT_DOCUMENTATION_PORTAL_THEME.tokens.dark.codeBackground};
|
|
358
|
+
--hia-color-code-text: ${DEFAULT_DOCUMENTATION_PORTAL_THEME.tokens.dark.codeText};
|
|
359
|
+
--hia-color-danger: ${DEFAULT_DOCUMENTATION_PORTAL_THEME.tokens.dark.danger};
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
${renderPortalSkinCss()}
|
|
364
|
+
|
|
32
365
|
* {
|
|
33
366
|
box-sizing: border-box;
|
|
34
367
|
}
|
|
@@ -54,7 +387,7 @@ a {
|
|
|
54
387
|
.hia-sidebar {
|
|
55
388
|
border-right: 1px solid var(--hia-border);
|
|
56
389
|
padding: 1.5rem;
|
|
57
|
-
background:
|
|
390
|
+
background: var(--hia-color-surface-muted);
|
|
58
391
|
}
|
|
59
392
|
|
|
60
393
|
.hia-project-split-site .hia-sidebar {
|
|
@@ -122,7 +455,7 @@ a {
|
|
|
122
455
|
.hia-project-view-button[aria-pressed="true"] {
|
|
123
456
|
background: var(--hia-accent);
|
|
124
457
|
border-color: var(--hia-accent);
|
|
125
|
-
color:
|
|
458
|
+
color: var(--hia-color-accent-contrast);
|
|
126
459
|
}
|
|
127
460
|
|
|
128
461
|
.hia-project-search {
|
|
@@ -148,9 +481,11 @@ a {
|
|
|
148
481
|
width: 100%;
|
|
149
482
|
}
|
|
150
483
|
|
|
151
|
-
.hia-project-search input:focus
|
|
484
|
+
.hia-project-search input:focus-visible,
|
|
485
|
+
.hia-language-switch select:focus-visible {
|
|
152
486
|
border-color: var(--hia-accent);
|
|
153
|
-
outline:
|
|
487
|
+
outline: 3px solid var(--hia-color-focus-ring);
|
|
488
|
+
outline-offset: 2px;
|
|
154
489
|
}
|
|
155
490
|
|
|
156
491
|
.hia-language-switch {
|
|
@@ -159,6 +494,31 @@ a {
|
|
|
159
494
|
margin: 1rem 0;
|
|
160
495
|
}
|
|
161
496
|
|
|
497
|
+
.hia-theme-switch {
|
|
498
|
+
display: grid;
|
|
499
|
+
gap: .5rem;
|
|
500
|
+
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
|
|
501
|
+
margin: 1rem 0;
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
.hia-theme-switch label {
|
|
505
|
+
color: var(--hia-muted);
|
|
506
|
+
display: grid;
|
|
507
|
+
font-size: .82rem;
|
|
508
|
+
font-weight: 700;
|
|
509
|
+
gap: .3rem;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
.hia-theme-switch select {
|
|
513
|
+
background: var(--hia-surface);
|
|
514
|
+
border: 1px solid var(--hia-border);
|
|
515
|
+
border-radius: var(--hia-radius, 6px);
|
|
516
|
+
color: var(--hia-text);
|
|
517
|
+
min-width: 0;
|
|
518
|
+
padding: .4rem .45rem;
|
|
519
|
+
width: 100%;
|
|
520
|
+
}
|
|
521
|
+
|
|
162
522
|
.hia-language-switch label {
|
|
163
523
|
color: var(--hia-muted);
|
|
164
524
|
font-size: .82rem;
|
|
@@ -182,7 +542,7 @@ a {
|
|
|
182
542
|
.hia-symbol {
|
|
183
543
|
background: var(--hia-surface);
|
|
184
544
|
border: 1px solid var(--hia-border);
|
|
185
|
-
border-radius: 6px;
|
|
545
|
+
border-radius: var(--hia-radius, 6px);
|
|
186
546
|
margin: 1rem 0;
|
|
187
547
|
min-width: 0;
|
|
188
548
|
padding: 1rem;
|
|
@@ -198,6 +558,8 @@ a {
|
|
|
198
558
|
|
|
199
559
|
.hia-symbol h2 {
|
|
200
560
|
margin: 0 0 .5rem;
|
|
561
|
+
/* <lang><zh-CN>长成员标识在单页与多页均可折行,不改变内容层级。</zh-CN><en>Wrap long member identifiers in document and project pages without changing content hierarchy.</en></lang> */
|
|
562
|
+
overflow-wrap: anywhere;
|
|
201
563
|
}
|
|
202
564
|
|
|
203
565
|
.hia-kind {
|
|
@@ -219,6 +581,9 @@ a {
|
|
|
219
581
|
.hia-signature {
|
|
220
582
|
border: 1px solid var(--hia-border);
|
|
221
583
|
padding: .5rem;
|
|
584
|
+
/* <lang><zh-CN>长签名保留空白并在窄屏换行;源码预览仍沿用独立的原始排版。</zh-CN><en>Long signatures preserve whitespace and wrap on narrow screens; source previews retain their separate original formatting.</en></lang> */
|
|
585
|
+
white-space: pre-wrap;
|
|
586
|
+
overflow-wrap: anywhere;
|
|
222
587
|
}
|
|
223
588
|
|
|
224
589
|
.hia-source-code {
|
|
@@ -271,6 +636,12 @@ a {
|
|
|
271
636
|
font-size: .85rem;
|
|
272
637
|
}
|
|
273
638
|
|
|
639
|
+
.hia-i18n-field dt,
|
|
640
|
+
.hia-i18n-field dd {
|
|
641
|
+
min-width: 0;
|
|
642
|
+
overflow-wrap: anywhere;
|
|
643
|
+
}
|
|
644
|
+
|
|
274
645
|
.hia-i18n-field dd {
|
|
275
646
|
margin: 0;
|
|
276
647
|
}
|
|
@@ -290,7 +661,7 @@ a {
|
|
|
290
661
|
}
|
|
291
662
|
|
|
292
663
|
.hia-source-unresolved {
|
|
293
|
-
color:
|
|
664
|
+
color: var(--hia-color-danger);
|
|
294
665
|
}
|
|
295
666
|
|
|
296
667
|
.hia-project-source-preview {
|
|
@@ -298,6 +669,7 @@ a {
|
|
|
298
669
|
}
|
|
299
670
|
|
|
300
671
|
.hia-source-fetch-button,
|
|
672
|
+
.hia-source-reset-button,
|
|
301
673
|
.hia-project-secondary-action,
|
|
302
674
|
.hia-project-entry-link {
|
|
303
675
|
appearance: none;
|
|
@@ -308,6 +680,7 @@ a {
|
|
|
308
680
|
}
|
|
309
681
|
|
|
310
682
|
.hia-source-fetch-button,
|
|
683
|
+
.hia-source-reset-button,
|
|
311
684
|
.hia-project-secondary-action {
|
|
312
685
|
background: var(--hia-surface);
|
|
313
686
|
color: var(--hia-text);
|
|
@@ -321,6 +694,7 @@ a {
|
|
|
321
694
|
}
|
|
322
695
|
|
|
323
696
|
.hia-source-fetch-button:hover,
|
|
697
|
+
.hia-source-reset-button:hover,
|
|
324
698
|
.hia-project-secondary-action:hover,
|
|
325
699
|
.hia-project-entry-link:hover {
|
|
326
700
|
border-color: var(--hia-accent);
|
|
@@ -343,6 +717,28 @@ a {
|
|
|
343
717
|
overflow-wrap: anywhere;
|
|
344
718
|
}
|
|
345
719
|
|
|
720
|
+
details > summary:focus-visible,
|
|
721
|
+
.hia-project-entry-link:focus-visible,
|
|
722
|
+
.hia-project-secondary-action:focus-visible,
|
|
723
|
+
.hia-project-view-button:focus-visible,
|
|
724
|
+
.hia-source-fetch-button:focus-visible,
|
|
725
|
+
.hia-source-reset-button:focus-visible,
|
|
726
|
+
.hia-theme-switch select:focus-visible {
|
|
727
|
+
outline: 3px solid var(--hia-color-focus-ring);
|
|
728
|
+
outline-offset: 2px;
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
.hia-project-hierarchy-list details[data-hia-active-ancestor="true"] > summary {
|
|
732
|
+
background: var(--hia-accent-soft);
|
|
733
|
+
border-radius: 4px;
|
|
734
|
+
color: var(--hia-accent);
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
.hia-project-hierarchy-list [data-hia-active-entry="true"] > .hia-project-entry-link,
|
|
738
|
+
.hia-project-hierarchy-list [data-hia-active-entry="true"] > details > summary {
|
|
739
|
+
font-weight: 700;
|
|
740
|
+
}
|
|
741
|
+
|
|
346
742
|
.hia-project-tree-open {
|
|
347
743
|
flex: none;
|
|
348
744
|
font-size: .78rem;
|
|
@@ -360,7 +756,7 @@ a {
|
|
|
360
756
|
}
|
|
361
757
|
|
|
362
758
|
.hia-project-load-error {
|
|
363
|
-
border-left: 3px solid
|
|
759
|
+
border-left: 3px solid var(--hia-color-danger);
|
|
364
760
|
padding-left: .75rem;
|
|
365
761
|
}
|
|
366
762
|
|
|
@@ -376,7 +772,7 @@ a {
|
|
|
376
772
|
background: var(--hia-accent);
|
|
377
773
|
border: 1px solid var(--hia-accent);
|
|
378
774
|
border-radius: 6px;
|
|
379
|
-
color:
|
|
775
|
+
color: var(--hia-color-accent-contrast);
|
|
380
776
|
cursor: pointer;
|
|
381
777
|
font: inherit;
|
|
382
778
|
font-size: .86rem;
|
|
@@ -385,8 +781,9 @@ a {
|
|
|
385
781
|
}
|
|
386
782
|
|
|
387
783
|
.hia-source-actions button:hover {
|
|
388
|
-
background:
|
|
389
|
-
border-color:
|
|
784
|
+
background: var(--hia-color-accent-hover);
|
|
785
|
+
border-color: var(--hia-color-accent-hover);
|
|
786
|
+
color: var(--hia-color-accent-contrast);
|
|
390
787
|
}
|
|
391
788
|
|
|
392
789
|
.hia-project-source-map-list {
|
|
@@ -441,11 +838,158 @@ a {
|
|
|
441
838
|
padding: 1rem;
|
|
442
839
|
}
|
|
443
840
|
|
|
841
|
+
.hia-project-topic-header {
|
|
842
|
+
align-items: baseline;
|
|
843
|
+
display: flex;
|
|
844
|
+
flex-wrap: wrap;
|
|
845
|
+
gap: .45rem;
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
.hia-project-topic-header h2 {
|
|
849
|
+
flex: 1 1 100%;
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
.hia-project-topic-section {
|
|
853
|
+
border-top: 1px solid var(--hia-border);
|
|
854
|
+
margin-top: 1rem;
|
|
855
|
+
padding-top: 1rem;
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
.hia-project-topic-section > summary,
|
|
859
|
+
.hia-project-member-card > summary {
|
|
860
|
+
cursor: pointer;
|
|
861
|
+
font-weight: 700;
|
|
862
|
+
padding: .25rem 0;
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
.hia-project-topic-section > .hia-project-topic-section-body,
|
|
866
|
+
.hia-project-member-card > .hia-project-member-card-body {
|
|
867
|
+
padding-top: .65rem;
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
.hia-project-member-card {
|
|
871
|
+
border: 1px solid var(--hia-border);
|
|
872
|
+
border-left: 3px solid var(--hia-accent);
|
|
873
|
+
border-radius: var(--hia-radius, 6px);
|
|
874
|
+
padding: .5rem .75rem;
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
.hia-project-topic-section > h3 {
|
|
878
|
+
margin: 0 0 .65rem;
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
.hia-project-member-topics {
|
|
882
|
+
display: grid;
|
|
883
|
+
gap: .75rem;
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
.hia-project-member-topics > .hia-project-topic {
|
|
887
|
+
border-left: 3px solid var(--hia-accent-soft);
|
|
888
|
+
margin: 0;
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
.hia-project-unavailable {
|
|
892
|
+
color: var(--hia-muted);
|
|
893
|
+
font-style: italic;
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
@media (forced-colors: active) {
|
|
897
|
+
/* <lang><zh-CN>第二个 selector 与 skin/scheme rule 等 specificity,且后声明,保证系统颜色真正覆盖主题 token。</zh-CN><en>The second selector matches the skin/scheme rule specificity and appears later so system colors actually override theme tokens.</en></lang> */
|
|
898
|
+
:root,
|
|
899
|
+
:root[data-hia-skin][data-hia-scheme] {
|
|
900
|
+
--hia-color-canvas: Canvas;
|
|
901
|
+
--hia-color-surface: Canvas;
|
|
902
|
+
--hia-color-surface-muted: Canvas;
|
|
903
|
+
--hia-color-border: CanvasText;
|
|
904
|
+
--hia-color-text: CanvasText;
|
|
905
|
+
--hia-color-text-muted: CanvasText;
|
|
906
|
+
--hia-color-accent: LinkText;
|
|
907
|
+
--hia-color-accent-contrast: Canvas;
|
|
908
|
+
--hia-color-accent-soft: Canvas;
|
|
909
|
+
--hia-color-accent-hover: LinkText;
|
|
910
|
+
--hia-color-focus-ring: Highlight;
|
|
911
|
+
--hia-color-code-background: Canvas;
|
|
912
|
+
--hia-color-code-text: CanvasText;
|
|
913
|
+
--hia-color-danger: MarkText;
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
@media print {
|
|
918
|
+
/* <lang><zh-CN>显式匹配 skin/scheme specificity,避免打印仍继承暗色画布。</zh-CN><en>Explicitly match skin/scheme specificity so print output cannot retain a dark canvas.</en></lang> */
|
|
919
|
+
:root,
|
|
920
|
+
:root[data-hia-skin][data-hia-scheme] {
|
|
921
|
+
color-scheme: only light;
|
|
922
|
+
--hia-color-canvas: #ffffff;
|
|
923
|
+
--hia-color-surface: #ffffff;
|
|
924
|
+
--hia-color-surface-muted: #ffffff;
|
|
925
|
+
--hia-color-border: #000000;
|
|
926
|
+
--hia-color-text: #000000;
|
|
927
|
+
--hia-color-text-muted: #222222;
|
|
928
|
+
--hia-color-accent: #000000;
|
|
929
|
+
--hia-color-accent-contrast: #ffffff;
|
|
930
|
+
--hia-color-accent-soft: #ffffff;
|
|
931
|
+
--hia-color-code-background: #ffffff;
|
|
932
|
+
--hia-color-code-text: #000000;
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
body,
|
|
936
|
+
.hia-shell {
|
|
937
|
+
background: #ffffff;
|
|
938
|
+
color: #000000;
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
.hia-shell {
|
|
942
|
+
display: block;
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
.hia-sidebar,
|
|
946
|
+
.hia-project-split-site .hia-sidebar {
|
|
947
|
+
border: 0;
|
|
948
|
+
height: auto;
|
|
949
|
+
max-height: none;
|
|
950
|
+
overflow: visible;
|
|
951
|
+
padding: 0;
|
|
952
|
+
position: static;
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
.hia-main {
|
|
956
|
+
max-width: none;
|
|
957
|
+
padding: 0;
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
.hia-language-switch,
|
|
961
|
+
.hia-theme-switch,
|
|
962
|
+
.hia-project-search,
|
|
963
|
+
.hia-project-secondary-action,
|
|
964
|
+
.hia-project-views,
|
|
965
|
+
.hia-source-actions {
|
|
966
|
+
display: none !important;
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
details:not([open]) > *:not(summary) {
|
|
970
|
+
display: block !important;
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
details > summary {
|
|
974
|
+
color: #000000;
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
a {
|
|
978
|
+
color: #000000;
|
|
979
|
+
text-decoration: underline;
|
|
980
|
+
}
|
|
981
|
+
}
|
|
982
|
+
|
|
444
983
|
@media (max-width: 760px) {
|
|
445
984
|
.hia-shell {
|
|
446
985
|
display: block;
|
|
447
986
|
}
|
|
448
987
|
|
|
988
|
+
/* <lang><zh-CN>窄屏把长字段键与正文改为单列,避免术语键撑大页面。</zh-CN><en>Stack long field keys and bodies on narrow screens so terminology keys cannot widen the page.</en></lang> */
|
|
989
|
+
.hia-i18n-field {
|
|
990
|
+
grid-template-columns: minmax(0, 1fr);
|
|
991
|
+
}
|
|
992
|
+
|
|
449
993
|
.hia-sidebar {
|
|
450
994
|
border-right: 0;
|
|
451
995
|
border-bottom: 1px solid var(--hia-border);
|
|
@@ -462,10 +1006,47 @@ a {
|
|
|
462
1006
|
}
|
|
463
1007
|
}
|
|
464
1008
|
`.trim();
|
|
1009
|
+
/** 默认主题的最小 locale switch runtime。Minimal locale-switch runtime for the default theme. */
|
|
465
1010
|
export const DEFAULT_THEME_JS = `
|
|
466
1011
|
(() => {
|
|
467
1012
|
document.documentElement.dataset.hiaTheme = "default";
|
|
468
1013
|
|
|
1014
|
+
const skinIds = ${JSON.stringify(PORTAL_THEME_SKIN_IDS)};
|
|
1015
|
+
const schemes = ${JSON.stringify(PORTAL_THEME_SCHEMES)};
|
|
1016
|
+
const skinControl = document.querySelector("[data-hia-skin-control]");
|
|
1017
|
+
const schemeControl = document.querySelector("[data-hia-scheme-control]");
|
|
1018
|
+
const skinStorageKey = "hia-doc.portal.skin";
|
|
1019
|
+
const schemeStorageKey = "hia-doc.portal.scheme";
|
|
1020
|
+
|
|
1021
|
+
function readPreference(key) {
|
|
1022
|
+
try { return localStorage.getItem(key); } catch { return null; }
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
function writePreference(key, value) {
|
|
1026
|
+
try { localStorage.setItem(key, value); } catch { /* <lang><zh-CN>偏好持久化是可选增强。</zh-CN><en>Preference persistence is optional.</en></lang> */ }
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
function applyThemeSelection(skin, scheme, persist) {
|
|
1030
|
+
// <lang><zh-CN>未知存储值 fail closed 到构建期默认,不允许注入任意 data attribute。</zh-CN><en>Unknown stored values fail closed to build defaults and cannot inject arbitrary data attributes.</en></lang>
|
|
1031
|
+
const selectedSkin = skinIds.includes(skin) ? skin : "portal.classic";
|
|
1032
|
+
const selectedScheme = schemes.includes(scheme) ? scheme : "system";
|
|
1033
|
+
document.documentElement.dataset.hiaSkin = selectedSkin;
|
|
1034
|
+
document.documentElement.dataset.hiaScheme = selectedScheme;
|
|
1035
|
+
if (skinControl) skinControl.value = selectedSkin;
|
|
1036
|
+
if (schemeControl) schemeControl.value = selectedScheme;
|
|
1037
|
+
if (persist) {
|
|
1038
|
+
writePreference(skinStorageKey, selectedSkin);
|
|
1039
|
+
writePreference(schemeStorageKey, selectedScheme);
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
// <lang><zh-CN>本地阅读偏好覆盖构建默认,但永不进入 profile、manifest 或 search index。</zh-CN><en>Local reading preferences override build defaults but never enter profiles, manifests, or search indexes.</en></lang>
|
|
1044
|
+
const initialSkin = readPreference(skinStorageKey) || document.documentElement.dataset.hiaSkin || "portal.classic";
|
|
1045
|
+
const initialScheme = readPreference(schemeStorageKey) || document.documentElement.dataset.hiaScheme || "system";
|
|
1046
|
+
applyThemeSelection(initialSkin, initialScheme, false);
|
|
1047
|
+
skinControl?.addEventListener("change", () => applyThemeSelection(skinControl.value, schemeControl?.value || initialScheme, true));
|
|
1048
|
+
schemeControl?.addEventListener("change", () => applyThemeSelection(skinControl?.value || initialSkin, schemeControl.value, true));
|
|
1049
|
+
|
|
469
1050
|
const control = document.querySelector("[data-hia-locale-control]");
|
|
470
1051
|
const localizedBlocks = Array.from(document.querySelectorAll("[data-hia-locale]"));
|
|
471
1052
|
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,sBAAsB,GAAG,wBAAwB,CAAC;AAC/D,MAAM,CAAC,MAAM,qBAAqB,GAAG,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAAG,4BAA4B,CAAC;AAEhF;;;GAGG;AACH,MAAM,CAAC,MAAM,2CAA2C,GAAG,aAAa,CAAC;AAEzE;;;GAGG;AACH,MAAM,CAAC,MAAM,4CAA4C,GAAG;IAC1D,QAAQ;IACR,SAAS;IACT,cAAc;IACd,QAAQ;IACR,MAAM;IACN,WAAW;IACX,QAAQ;IACR,gBAAgB;IAChB,YAAY;IACZ,aAAa;IACb,WAAW;IACX,gBAAgB;IAChB,UAAU;IACV,QAAQ;CACA,CAAC;AAcX;;;GAGG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,gBAAgB,EAAE,iBAAiB,EAAE,cAAc,CAAU,CAAC;AAEpG,kHAAkH;AAClH,MAAM,CAAC,MAAM,oBAAoB,GA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