@hia/theme-core 0.5.0 → 0.7.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/dist/types.d.ts CHANGED
@@ -46,6 +46,22 @@ export interface SpacingTokens {
46
46
  levels: number;
47
47
  overrides?: Record<string, number>;
48
48
  }
49
+ export interface RadiusTokens {
50
+ base: number;
51
+ overrides?: Record<string, number>;
52
+ }
53
+ export interface ShadowTokens {
54
+ strength: 'none' | 'soft' | 'medium' | 'strong';
55
+ tintFromPrimary?: boolean;
56
+ overrides?: Record<string, string>;
57
+ }
58
+ export type SemanticStatusKey = 'success' | 'info' | 'warning' | 'danger';
59
+ export interface SemanticTokens {
60
+ success: RoleColor;
61
+ info: RoleColor;
62
+ warning: RoleColor;
63
+ danger: RoleColor;
64
+ }
49
65
  export interface Theme {
50
66
  name: string;
51
67
  category: string;
@@ -60,6 +76,9 @@ export interface Theme {
60
76
  seriesRelation: SeriesRelationId;
61
77
  thirdColor?: RoleColor;
62
78
  auxiliary: RoleColor[];
79
+ radius?: RadiusTokens;
80
+ shadow?: ShadowTokens;
81
+ semantic?: SemanticTokens;
63
82
  }
64
83
  export interface ThemeInput {
65
84
  name?: string;
@@ -78,6 +97,9 @@ export interface ThemeInput {
78
97
  thirdColor?: RoleColor;
79
98
  auxiliary?: RoleColor[];
80
99
  auxiliaryModifiers?: AuxiliaryModifier[];
100
+ radius?: RadiusTokens;
101
+ shadow?: ShadowTokens;
102
+ semantic?: SemanticTokens;
81
103
  }
82
104
  export interface PrimaryCandidate {
83
105
  id: string;
@@ -107,6 +129,10 @@ export interface Preset {
107
129
  seriesRelation?: SeriesRelationId;
108
130
  thirdColor?: RoleColor;
109
131
  auxiliary?: RoleColor[];
132
+ radius?: RadiusTokens;
133
+ shadow?: ShadowTokens;
134
+ semantic?: SemanticTokens;
135
+ semanticDerived?: Record<string, boolean>;
110
136
  }
111
137
  export interface HarmonyDef {
112
138
  id: string;
@@ -136,6 +162,11 @@ export interface ThemeDraft {
136
162
  thirdColor?: RoleColor;
137
163
  auxiliary?: RoleColor[];
138
164
  auxiliaryModifiers?: AuxiliaryModifier[];
165
+ radius?: RadiusTokens;
166
+ shadow?: ShadowTokens;
167
+ semantic?: SemanticTokens;
168
+ /** @lang zh-CN 语义色派生标记(ADR-012):true=仍随主色派生;缺省 false=用户值不跟随。 @lang en Semantic derivation flags (ADR-012): true = still derived from primary; absent/false = user-managed. */
169
+ semanticDerived?: Record<string, boolean>;
139
170
  }
140
171
  export type SeriesMode = 'single' | 'dual' | 'triad';
141
172
  export type SeriesRelationId = 'manual' | 'complement' | 'clash' | 'neutral' | 'analogous' | 'split-complement' | 'tertiary' | 'primary-combo' | 'secondary-combo' | 'pure';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hia/theme-core",
3
- "version": "0.5.0",
3
+ "version": "0.7.0",
4
4
  "description": "HIA cross-platform theme domain core: models, OKLCH algorithms, theme studio state, gradient rendering, token export and website-color analysis.",
5
5
  "license": "MIT",
6
6
  "author": "HIA Theme Builder contributors",