@apollo-design/theme 0.0.0-stage → 0.1.9

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.
Files changed (38) hide show
  1. package/README.md +140 -2
  2. package/dist/algorithms/compact.mjs +19 -0
  3. package/dist/algorithms/dark.mjs +36 -0
  4. package/dist/algorithms/default.mjs +28 -0
  5. package/dist/algorithms/palettes.mjs +123 -0
  6. package/dist/alias.mjs +169 -0
  7. package/dist/css-var.mjs +153 -0
  8. package/dist/get-design-token.mjs +42 -0
  9. package/dist/index.d.mts +360 -0
  10. package/dist/index.d.ts +360 -0
  11. package/dist/index.mjs +17 -0
  12. package/dist/merge-theme.mjs +21 -0
  13. package/dist/presets/default.css +108 -0
  14. package/dist/presets/default.d.mts +6 -0
  15. package/dist/presets/default.d.ts +6 -0
  16. package/dist/presets/default.mjs +3 -0
  17. package/dist/presets/material3.css +54 -0
  18. package/dist/presets/material3.d.mts +6 -0
  19. package/dist/presets/material3.d.ts +6 -0
  20. package/dist/presets/material3.mjs +71 -0
  21. package/dist/presets/mono.css +54 -0
  22. package/dist/presets/mono.d.mts +6 -0
  23. package/dist/presets/mono.d.ts +6 -0
  24. package/dist/presets/mono.mjs +41 -0
  25. package/dist/seed.mjs +74 -0
  26. package/dist/shared/color-map-token.mjs +97 -0
  27. package/dist/shared/common-map-token.mjs +14 -0
  28. package/dist/shared/control-height.mjs +9 -0
  29. package/dist/shared/font-map-token.mjs +36 -0
  30. package/dist/shared/font-sizes.mjs +27 -0
  31. package/dist/shared/get-alpha-color.mjs +28 -0
  32. package/dist/shared/radius.mjs +44 -0
  33. package/dist/shared/size-map-token.mjs +31 -0
  34. package/dist/shared/theme.DBaLDtcj.d.mts +358 -0
  35. package/dist/shared/theme.DBaLDtcj.d.ts +358 -0
  36. package/dist/tokens.css +146 -0
  37. package/dist/vue.mjs +113 -0
  38. package/package.json +52 -3
@@ -0,0 +1,36 @@
1
+ import genFontSizes from './font-sizes.mjs';
2
+
3
+ function genFontMapToken(fontSize) {
4
+ const p = genFontSizes(fontSize);
5
+ const fontSizeSM = p[0].size;
6
+ const fontSizeMD = p[1].size;
7
+ const fontSizeLG = p[2].size;
8
+ const lineHeight = p[1].lineHeight;
9
+ const lineHeightSM = p[0].lineHeight;
10
+ const lineHeightLG = p[2].lineHeight;
11
+ return {
12
+ fontSizeSM,
13
+ fontSize: fontSizeMD,
14
+ fontSizeLG,
15
+ fontSizeXL: p[3].size,
16
+ fontSizeHeading1: p[6].size,
17
+ fontSizeHeading2: p[5].size,
18
+ fontSizeHeading3: p[4].size,
19
+ // ⚠️ heading4 与 XL 同值、heading5 与 LG 同值 —— antd 的冗余定义,不是笔误
20
+ fontSizeHeading4: p[3].size,
21
+ fontSizeHeading5: p[2].size,
22
+ lineHeight,
23
+ lineHeightLG,
24
+ lineHeightSM,
25
+ fontHeight: Math.round(lineHeight * fontSizeMD),
26
+ fontHeightLG: Math.round(lineHeightLG * fontSizeLG),
27
+ fontHeightSM: Math.round(lineHeightSM * fontSizeSM),
28
+ lineHeightHeading1: p[6].lineHeight,
29
+ lineHeightHeading2: p[5].lineHeight,
30
+ lineHeightHeading3: p[4].lineHeight,
31
+ lineHeightHeading4: p[3].lineHeight,
32
+ lineHeightHeading5: p[2].lineHeight
33
+ };
34
+ }
35
+
36
+ export { genFontMapToken as default };
@@ -0,0 +1,27 @@
1
+ function getLineHeight(fontSize) {
2
+ return (fontSize + 8) / fontSize;
3
+ }
4
+ function genFontSizes(base) {
5
+ const pairAt = (index) => {
6
+ if (index === 1) return { size: base, lineHeight: getLineHeight(base) };
7
+ const i = index - 1;
8
+ const baseSize = base * Math.E ** (i / 5);
9
+ const intSize = index > 1 ? Math.floor(baseSize) : Math.ceil(baseSize);
10
+ const size = Math.floor(intSize / 2) * 2;
11
+ return { size, lineHeight: getLineHeight(size) };
12
+ };
13
+ return [
14
+ pairAt(0),
15
+ pairAt(1),
16
+ pairAt(2),
17
+ pairAt(3),
18
+ pairAt(4),
19
+ pairAt(5),
20
+ pairAt(6),
21
+ pairAt(7),
22
+ pairAt(8),
23
+ pairAt(9)
24
+ ];
25
+ }
26
+
27
+ export { genFontSizes as default, getLineHeight };
@@ -0,0 +1,28 @@
1
+ import { Color } from '@apollo-design/utils';
2
+
3
+ function isStableColor(color) {
4
+ return color >= 0 && color <= 255;
5
+ }
6
+ function getAlphaColor(frontColor, backgroundColor) {
7
+ const { r: fR, g: fG, b: fB, a: originAlpha } = new Color(frontColor).toRgb();
8
+ if (originAlpha < 1) {
9
+ return frontColor;
10
+ }
11
+ const { r: bR, g: bG, b: bB } = new Color(backgroundColor).toRgb();
12
+ for (let fA = 0.01; fA <= 1; fA += 0.01) {
13
+ const r = Math.round((fR - bR * (1 - fA)) / fA);
14
+ const g = Math.round((fG - bG * (1 - fA)) / fA);
15
+ const b = Math.round((fB - bB * (1 - fA)) / fA);
16
+ if (isStableColor(r) && isStableColor(g) && isStableColor(b)) {
17
+ return new Color({
18
+ r,
19
+ g,
20
+ b,
21
+ a: Math.round(fA * 100) / 100
22
+ }).toRgbString();
23
+ }
24
+ }
25
+ return new Color({ r: fR, g: fG, b: fB, a: 1 }).toRgbString();
26
+ }
27
+
28
+ export { getAlphaColor as default };
@@ -0,0 +1,44 @@
1
+ function genRadius(radiusBase) {
2
+ let radiusLG = radiusBase;
3
+ let radiusSM = radiusBase;
4
+ let radiusXS = radiusBase;
5
+ let radiusOuter = radiusBase;
6
+ if (radiusBase < 6 && radiusBase >= 5) {
7
+ radiusLG = radiusBase + 1;
8
+ } else if (radiusBase < 16 && radiusBase >= 6) {
9
+ radiusLG = radiusBase + 2;
10
+ } else if (radiusBase >= 16) {
11
+ radiusLG = 16;
12
+ }
13
+ if (radiusBase < 7 && radiusBase >= 5) {
14
+ radiusSM = 4;
15
+ } else if (radiusBase < 8 && radiusBase >= 7) {
16
+ radiusSM = 5;
17
+ } else if (radiusBase < 14 && radiusBase >= 8) {
18
+ radiusSM = 6;
19
+ } else if (radiusBase < 16 && radiusBase >= 14) {
20
+ radiusSM = 7;
21
+ } else if (radiusBase >= 16) {
22
+ radiusSM = 8;
23
+ }
24
+ if (radiusBase < 6 && radiusBase >= 2) {
25
+ radiusXS = 1;
26
+ } else if (radiusBase >= 6) {
27
+ radiusXS = 2;
28
+ }
29
+ if (radiusBase > 4 && radiusBase < 8) {
30
+ radiusOuter = 4;
31
+ } else if (radiusBase >= 8) {
32
+ radiusOuter = 6;
33
+ }
34
+ return {
35
+ borderRadius: radiusBase,
36
+ borderRadiusCircle: "100%",
37
+ borderRadiusXS: radiusXS,
38
+ borderRadiusSM: radiusSM,
39
+ borderRadiusLG: radiusLG,
40
+ borderRadiusOuter: radiusOuter
41
+ };
42
+ }
43
+
44
+ export { genRadius };
@@ -0,0 +1,31 @@
1
+ function genSizeMapToken(token) {
2
+ const { sizeUnit, sizeStep } = token;
3
+ return {
4
+ sizeXXL: sizeUnit * (sizeStep + 8),
5
+ sizeXL: sizeUnit * (sizeStep + 4),
6
+ sizeLG: sizeUnit * (sizeStep + 2),
7
+ sizeMD: sizeUnit * (sizeStep + 1),
8
+ sizeMS: sizeUnit * sizeStep,
9
+ size: sizeUnit * sizeStep,
10
+ sizeSM: sizeUnit * (sizeStep - 1),
11
+ sizeXS: sizeUnit * (sizeStep - 2),
12
+ sizeXXS: sizeUnit * (sizeStep - 3)
13
+ };
14
+ }
15
+ function genCompactSizeMapToken(token) {
16
+ const { sizeUnit, sizeStep } = token;
17
+ const compactSizeStep = sizeStep - 2;
18
+ return {
19
+ sizeXXL: sizeUnit * (compactSizeStep + 10),
20
+ sizeXL: sizeUnit * (compactSizeStep + 6),
21
+ sizeLG: sizeUnit * (compactSizeStep + 2),
22
+ sizeMD: sizeUnit * (compactSizeStep + 2),
23
+ sizeMS: sizeUnit * (compactSizeStep + 1),
24
+ size: sizeUnit * compactSizeStep,
25
+ sizeSM: sizeUnit * compactSizeStep,
26
+ sizeXS: sizeUnit * (compactSizeStep - 1),
27
+ sizeXXS: sizeUnit * (compactSizeStep - 1)
28
+ };
29
+ }
30
+
31
+ export { genCompactSizeMapToken, genSizeMapToken };
@@ -0,0 +1,358 @@
1
+ /**
2
+ * @apollo-design/theme — Token 类型
3
+ *
4
+ * Seed → Map → Alias → Component 的公开类型由 Apollo API 决定。
5
+ * 历史上游字段与默认值是回归证据,不限制独立发展的字段集合。
6
+ *
7
+ * 类型是「重新定义」而非复制:antd 的类型文件带大量 JSDoc,逐字搬运会让我们
8
+ * 在自己的注释里说别人的话。这里只保留契约本身(名称 + 类型),
9
+ * 语义说明写在我们自己的文档中。
10
+ */
11
+ /** antd 的 13 个预设色。pink 是 magenta 的废弃别名,值相同。 */
12
+ type PresetColorKey = 'blue' | 'purple' | 'cyan' | 'green' | 'magenta' | 'pink' | 'red' | 'orange' | 'yellow' | 'volcano' | 'geekblue' | 'lime' | 'gold';
13
+ type PresetColorType = Record<PresetColorKey, string>;
14
+ /**
15
+ * 预设色板展开后的键:`blue-1`…`blue-10` 与 `blue1`…`blue10`。
16
+ * 两种写法 antd 都产出,且值相同(历史兼容)。
17
+ */
18
+ type PresetColorPalettes = {
19
+ [K in PresetColorKey as `${K}-${1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10}`]: string;
20
+ } & {
21
+ [K in PresetColorKey as `${K}${1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10}`]: string;
22
+ };
23
+ /** 色板梯度:1 最浅 → 10 最深(antd 用的是 1-based,不是 0-based) */
24
+ type ColorPalette = Record<1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10, string>;
25
+ interface SeedToken extends PresetColorType {
26
+ colorPrimary: string;
27
+ colorSuccess: string;
28
+ colorWarning: string;
29
+ colorError: string;
30
+ colorInfo: string;
31
+ colorLink: string;
32
+ colorTextBase: string;
33
+ colorBgBase: string;
34
+ fontFamily: string;
35
+ fontFamilyCode: string;
36
+ fontSize: number;
37
+ lineWidth: number;
38
+ lineType: string;
39
+ borderRadius: number;
40
+ /**
41
+ * 完美圆的圆角值(`'100%'`)。是几何常量,不是视觉设计值 —— `1em × 1em` 的方块
42
+ * 套这个值会渲染成圆。给 `borderRadiusCircle` 留一个变量是组件层去掉硬编码 `100%`
43
+ * 的最小代价;它不在 design-system 调色板上,主题切换也不会改它。
44
+ */
45
+ borderRadiusCircle: string;
46
+ sizeUnit: number;
47
+ sizeStep: number;
48
+ sizePopupArrow: number;
49
+ controlHeight: number;
50
+ zIndexBase: number;
51
+ zIndexPopupBase: number;
52
+ opacityImage: number;
53
+ motionUnit: number;
54
+ motionBase: number;
55
+ motionEaseOutCirc: string;
56
+ motionEaseInOutCirc: string;
57
+ motionEaseOut: string;
58
+ motionEaseInOut: string;
59
+ motionEaseOutBack: string;
60
+ motionEaseInBack: string;
61
+ motionEaseInQuint: string;
62
+ motionEaseOutQuint: string;
63
+ wireframe: boolean;
64
+ focusOutline: boolean;
65
+ motion: boolean;
66
+ }
67
+ /** 中性色 + 功能色梯度。由 genColorMapToken 产出。 */
68
+ interface ColorNeutralMapToken {
69
+ colorBgBase: string;
70
+ colorTextBase: string;
71
+ colorShadow: string;
72
+ colorText: string;
73
+ colorTextSecondary: string;
74
+ colorTextTertiary: string;
75
+ colorTextQuaternary: string;
76
+ colorFill: string;
77
+ colorFillSecondary: string;
78
+ colorFillTertiary: string;
79
+ colorFillQuaternary: string;
80
+ colorBgSolid: string;
81
+ colorBgSolidHover: string;
82
+ colorBgSolidActive: string;
83
+ colorBgLayout: string;
84
+ colorBgContainer: string;
85
+ colorBgElevated: string;
86
+ colorBgSpotlight: string;
87
+ colorBgBlur: string;
88
+ colorBorder: string;
89
+ colorBorderDisabled: string;
90
+ colorBorderSecondary: string;
91
+ }
92
+ /** 功能色(primary / success / warning / error / info / link)的 11 档梯度 */
93
+ interface FunctionalColorMapToken {
94
+ colorPrimaryBg: string;
95
+ colorPrimaryBgHover: string;
96
+ colorPrimaryBorder: string;
97
+ colorPrimaryBorderHover: string;
98
+ colorPrimaryHover: string;
99
+ colorPrimary: string;
100
+ colorPrimaryActive: string;
101
+ colorPrimaryTextHover: string;
102
+ colorPrimaryText: string;
103
+ colorPrimaryTextActive: string;
104
+ colorSuccessBg: string;
105
+ colorSuccessBgHover: string;
106
+ colorSuccessBorder: string;
107
+ colorSuccessBorderHover: string;
108
+ colorSuccessHover: string;
109
+ colorSuccess: string;
110
+ colorSuccessActive: string;
111
+ colorSuccessTextHover: string;
112
+ colorSuccessText: string;
113
+ colorSuccessTextActive: string;
114
+ colorErrorBg: string;
115
+ colorErrorBgHover: string;
116
+ colorErrorBgFilledHover: string;
117
+ colorErrorBgActive: string;
118
+ colorErrorBorder: string;
119
+ colorErrorBorderHover: string;
120
+ colorErrorHover: string;
121
+ colorError: string;
122
+ colorErrorActive: string;
123
+ colorErrorTextHover: string;
124
+ colorErrorText: string;
125
+ colorErrorTextActive: string;
126
+ colorWarningBg: string;
127
+ colorWarningBgHover: string;
128
+ colorWarningBorder: string;
129
+ colorWarningBorderHover: string;
130
+ colorWarningHover: string;
131
+ colorWarning: string;
132
+ colorWarningActive: string;
133
+ colorWarningTextHover: string;
134
+ colorWarningText: string;
135
+ colorWarningTextActive: string;
136
+ colorInfoBg: string;
137
+ colorInfoBgHover: string;
138
+ colorInfoBorder: string;
139
+ colorInfoBorderHover: string;
140
+ colorInfoHover: string;
141
+ colorInfo: string;
142
+ colorInfoActive: string;
143
+ colorInfoTextHover: string;
144
+ colorInfoText: string;
145
+ colorInfoTextActive: string;
146
+ colorLinkHover: string;
147
+ colorLink: string;
148
+ colorLinkActive: string;
149
+ colorBgMask: string;
150
+ colorWhite: string;
151
+ }
152
+ /** 每个预设色派生的 Hover / Active 两档 */
153
+ type PresetColorMapToken = {
154
+ [K in PresetColorKey as `${K}Hover`]: string;
155
+ } & {
156
+ [K in PresetColorKey as `${K}Active`]: string;
157
+ };
158
+ type ColorMapToken = ColorNeutralMapToken & FunctionalColorMapToken & PresetColorMapToken;
159
+ interface FontMapToken {
160
+ fontSizeSM: number;
161
+ fontSize: number;
162
+ fontSizeLG: number;
163
+ fontSizeXL: number;
164
+ fontSizeHeading1: number;
165
+ fontSizeHeading2: number;
166
+ fontSizeHeading3: number;
167
+ fontSizeHeading4: number;
168
+ fontSizeHeading5: number;
169
+ lineHeight: number;
170
+ lineHeightLG: number;
171
+ lineHeightSM: number;
172
+ fontHeight: number;
173
+ fontHeightLG: number;
174
+ fontHeightSM: number;
175
+ lineHeightHeading1: number;
176
+ lineHeightHeading2: number;
177
+ lineHeightHeading3: number;
178
+ lineHeightHeading4: number;
179
+ lineHeightHeading5: number;
180
+ }
181
+ interface SizeMapToken {
182
+ sizeXXL: number;
183
+ sizeXL: number;
184
+ sizeLG: number;
185
+ sizeMD: number;
186
+ sizeMS: number;
187
+ size: number;
188
+ sizeSM: number;
189
+ sizeXS: number;
190
+ sizeXXS: number;
191
+ }
192
+ interface HeightMapToken {
193
+ controlHeight: number;
194
+ controlHeightSM: number;
195
+ controlHeightXS: number;
196
+ controlHeightLG: number;
197
+ }
198
+ interface StyleMapToken {
199
+ lineWidthBold: number;
200
+ borderRadiusXS: number;
201
+ borderRadiusSM: number;
202
+ borderRadius: number;
203
+ borderRadiusLG: number;
204
+ borderRadiusOuter: number;
205
+ borderRadiusCircle: string;
206
+ }
207
+ interface CommonMapToken {
208
+ motionDurationFast: string;
209
+ motionDurationMid: string;
210
+ motionDurationSlow: string;
211
+ }
212
+ type MapToken = SeedToken & ColorMapToken & FontMapToken & SizeMapToken & HeightMapToken & StyleMapToken & CommonMapToken & PresetColorPalettes;
213
+ interface AliasToken extends MapToken {
214
+ colorFillContent: string;
215
+ colorFillContentHover: string;
216
+ colorFillAlter: string;
217
+ colorBgContainerDisabled: string;
218
+ colorBorderBg: string;
219
+ colorSplit: string;
220
+ colorTextPlaceholder: string;
221
+ colorTextDisabled: string;
222
+ colorTextHeading: string;
223
+ colorTextLabel: string;
224
+ colorTextDescription: string;
225
+ colorTextLightSolid: string;
226
+ colorHighlight: string;
227
+ colorBgTextHover: string;
228
+ colorBgTextActive: string;
229
+ colorIcon: string;
230
+ colorIconHover: string;
231
+ colorErrorOutline: string;
232
+ colorWarningOutline: string;
233
+ colorErrorAffix: string;
234
+ colorWarningAffix: string;
235
+ fontSizeIcon: number;
236
+ lineWidthFocus: number;
237
+ controlOutlineWidth: number;
238
+ controlInteractiveSize: number;
239
+ controlItemBgHover: string;
240
+ controlItemBgActive: string;
241
+ controlItemBgActiveHover: string;
242
+ controlItemBgActiveDisabled: string;
243
+ controlTmpOutline: string;
244
+ controlOutline: string;
245
+ fontWeightStrong: number;
246
+ opacityLoading: number;
247
+ linkDecoration: string;
248
+ linkHoverDecoration: string;
249
+ linkFocusDecoration: string;
250
+ controlPaddingHorizontal: number;
251
+ controlPaddingHorizontalSM: number;
252
+ paddingXXS: number;
253
+ paddingXS: number;
254
+ paddingSM: number;
255
+ padding: number;
256
+ paddingMD: number;
257
+ paddingLG: number;
258
+ paddingXL: number;
259
+ paddingContentHorizontalLG: number;
260
+ paddingContentVerticalLG: number;
261
+ paddingContentHorizontal: number;
262
+ paddingContentVertical: number;
263
+ paddingContentHorizontalSM: number;
264
+ paddingContentVerticalSM: number;
265
+ marginXXS: number;
266
+ marginXS: number;
267
+ marginSM: number;
268
+ margin: number;
269
+ marginMD: number;
270
+ marginLG: number;
271
+ marginXL: number;
272
+ marginXXL: number;
273
+ boxShadow: string;
274
+ boxShadowSecondary: string;
275
+ boxShadowTertiary: string;
276
+ boxShadowPopoverArrow: string;
277
+ dropShadowPopover: string;
278
+ boxShadowCard: string;
279
+ boxShadowDrawerRight: string;
280
+ boxShadowDrawerLeft: string;
281
+ boxShadowDrawerUp: string;
282
+ boxShadowDrawerDown: string;
283
+ boxShadowTabsOverflowLeft: string;
284
+ boxShadowTabsOverflowRight: string;
285
+ boxShadowTabsOverflowTop: string;
286
+ boxShadowTabsOverflowBottom: string;
287
+ screenXS: number;
288
+ screenXSMin: number;
289
+ screenXSMax: number;
290
+ screenSM: number;
291
+ screenSMMin: number;
292
+ screenSMMax: number;
293
+ screenMD: number;
294
+ screenMDMin: number;
295
+ screenMDMax: number;
296
+ screenLG: number;
297
+ screenLGMin: number;
298
+ screenLGMax: number;
299
+ screenXL: number;
300
+ screenXLMin: number;
301
+ screenXLMax: number;
302
+ screenXXL: number;
303
+ screenXXLMin: number;
304
+ screenXXLMax: number;
305
+ screenXXXL: number;
306
+ screenXXXLMin: number;
307
+ }
308
+ /**
309
+ * 组件 Token 的类型入口。
310
+ *
311
+ * antd 的组件 token **默认值分散在各组件自己的 style 里**(`components/<x>/style/index.ts`
312
+ * 的 `prepareComponentToken`),`theme/interface/components.ts` 只做类型聚合。
313
+ * 本包遵循同样的分工:这里只声明类型与合并机制,默认值由 `packages/ui` 逐组件提供 ——
314
+ * 见本包 README 的「明确不做」。
315
+ */
316
+ type ComponentTokenMap = Record<string, Record<string, string | number | boolean>>;
317
+ /**
318
+ * 派生算法。
319
+ *
320
+ * 第二个参数 `mapToken` 是**前一个算法的结果**(antd 的 `Theme.getDerivativeToken`
321
+ * 用 `reduce` 串联)。为 `undefined` 时表示自己是链上的第一个,需要自己先跑 default。
322
+ * 这个「可组合」语义是 antd 的契约,不能改成「每个算法都从 seed 重算」。
323
+ */
324
+ type MappingAlgorithm = (seed: SeedToken, mapToken?: MapToken) => MapToken;
325
+ type ThemeMode = 'light' | 'dark' | 'system';
326
+ type ThemeAppearance = Exclude<ThemeMode, 'system'>;
327
+ type ThemeTokenOverrides = Partial<AliasToken & Record<string, string | number | boolean>>;
328
+ /** A preset uses the same seeds, aliases and optional mapping algorithms as user configuration. */
329
+ interface ThemePresetScheme {
330
+ readonly token?: Readonly<ThemeTokenOverrides>;
331
+ readonly algorithm?: MappingAlgorithm | MappingAlgorithm[];
332
+ }
333
+ interface ThemePreset {
334
+ readonly name: string;
335
+ readonly token?: Readonly<ThemeTokenOverrides>;
336
+ readonly light?: ThemePresetScheme;
337
+ readonly dark?: ThemePresetScheme;
338
+ }
339
+ interface ThemeConfig {
340
+ /** Presets are ordinary public data, imported independently from component structure. */
341
+ preset?: ThemePreset;
342
+ /** Live providers resolve system preference; pure/SSR derivation defaults to light. */
343
+ mode?: ThemeMode;
344
+ /** ConfigProvider inherits by default; ThemeProvider only inherits when true. */
345
+ inherit?: boolean;
346
+ /** Known Seed/Map/Alias keys retain their value types; undefined is an omission. */
347
+ token?: ThemeTokenOverrides;
348
+ /** Empty arrays use the default algorithm; nonempty arrays run in order. */
349
+ algorithm?: MappingAlgorithm | MappingAlgorithm[];
350
+ /** CSS 变量前缀。默认 `apollo`(已裁决:prefix-cls-default = A)。 */
351
+ cssVarPrefix?: string;
352
+ /** 组件级 token 覆盖,键为组件名 */
353
+ components?: ComponentTokenMap;
354
+ }
355
+ /** getDesignToken 的完整输出 */
356
+ type GlobalToken = AliasToken;
357
+
358
+ export type { AliasToken as A, ColorPalette as C, FontMapToken as F, GlobalToken as G, HeightMapToken as H, MapToken as M, PresetColorKey as P, SeedToken as S, ThemeConfig as T, ThemeAppearance as a, PresetColorType as b, ColorNeutralMapToken as c, ColorMapToken as d, CommonMapToken as e, StyleMapToken as f, SizeMapToken as g, ComponentTokenMap as h, MappingAlgorithm as i, PresetColorPalettes as j, ThemeMode as k, ThemePreset as l, ThemePresetScheme as m, ThemeTokenOverrides as n };