@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/color/apca.d.ts +48 -0
- package/dist/color/apca.js +94 -0
- package/dist/color/color-name.js +30 -12
- package/dist/color/contrast.d.ts +46 -0
- package/dist/color/contrast.js +113 -1
- package/dist/color/image-extract.d.ts +56 -0
- package/dist/color/image-extract.js +217 -0
- package/dist/color/semantic.d.ts +52 -0
- package/dist/color/semantic.js +68 -0
- package/dist/color/vision.d.ts +22 -0
- package/dist/color/vision.js +63 -0
- package/dist/data/mood-primary-colors.d.ts +77 -0
- package/dist/data/mood-primary-colors.js +83 -0
- package/dist/export/dtcg.d.ts +70 -0
- package/dist/export/dtcg.js +433 -0
- package/dist/export/inject-template.js +6 -2
- package/dist/export/registry.js +5 -1
- package/dist/export/tailwind.js +13 -1
- package/dist/export/tailwind4.d.ts +14 -0
- package/dist/export/tailwind4.js +66 -0
- package/dist/export/wordpress.js +1 -1
- package/dist/gradient/render.d.ts +4 -2
- package/dist/gradient/render.js +44 -5
- package/dist/index.d.ts +16 -1
- package/dist/index.js +36 -4
- package/dist/studio.js +14 -4
- package/dist/theme.js +26 -7
- package/dist/token/css.js +23 -3
- package/dist/token/json.js +6 -0
- package/dist/token/radius.d.ts +38 -0
- package/dist/token/radius.js +94 -0
- package/dist/types.d.ts +31 -0
- package/package.json +1 -1
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.
|
|
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",
|