@axiom-core/token-schema 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/dist/index.d.ts +203 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/package.json +38 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
declare const __AXIOM_TOKEN_REF_BRAND: unique symbol;
|
|
2
|
+
export type PrimitiveTokens = {
|
|
3
|
+
color: {
|
|
4
|
+
[tokenName: string]: string;
|
|
5
|
+
};
|
|
6
|
+
spacing: {
|
|
7
|
+
[tokenName: string]: string | number;
|
|
8
|
+
};
|
|
9
|
+
radius: {
|
|
10
|
+
[tokenName: string]: string | number;
|
|
11
|
+
};
|
|
12
|
+
fontFamily: {
|
|
13
|
+
base: string;
|
|
14
|
+
display: string;
|
|
15
|
+
mono: string;
|
|
16
|
+
};
|
|
17
|
+
fontSize: {
|
|
18
|
+
xs: string;
|
|
19
|
+
sm: string;
|
|
20
|
+
md: string;
|
|
21
|
+
lg: string;
|
|
22
|
+
xl: string;
|
|
23
|
+
'2xl': string;
|
|
24
|
+
'3xl': string;
|
|
25
|
+
'4xl': string;
|
|
26
|
+
};
|
|
27
|
+
lineHeight: {
|
|
28
|
+
tight: string;
|
|
29
|
+
normal: string;
|
|
30
|
+
relaxed: string;
|
|
31
|
+
};
|
|
32
|
+
letterSpacing: {
|
|
33
|
+
tight: string;
|
|
34
|
+
normal: string;
|
|
35
|
+
wide: string;
|
|
36
|
+
};
|
|
37
|
+
fontWeight: {
|
|
38
|
+
regular: number;
|
|
39
|
+
medium: number;
|
|
40
|
+
semibold: number;
|
|
41
|
+
bold: number;
|
|
42
|
+
};
|
|
43
|
+
shadow: {
|
|
44
|
+
level0: string;
|
|
45
|
+
level1: string;
|
|
46
|
+
level2: string;
|
|
47
|
+
level3: string;
|
|
48
|
+
level4: string;
|
|
49
|
+
level5: string;
|
|
50
|
+
};
|
|
51
|
+
blur: {
|
|
52
|
+
sm: string;
|
|
53
|
+
md: string;
|
|
54
|
+
lg: string;
|
|
55
|
+
};
|
|
56
|
+
opacity: {
|
|
57
|
+
subtle: number;
|
|
58
|
+
glass: number;
|
|
59
|
+
};
|
|
60
|
+
stateOverlay: {
|
|
61
|
+
subtle: string;
|
|
62
|
+
medium: string;
|
|
63
|
+
strong: string;
|
|
64
|
+
};
|
|
65
|
+
stateOpacity: {
|
|
66
|
+
disabled: number;
|
|
67
|
+
muted: number;
|
|
68
|
+
};
|
|
69
|
+
focusRing: {
|
|
70
|
+
default: string;
|
|
71
|
+
strong: string;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
export type PrimitiveCategory = keyof PrimitiveTokens;
|
|
75
|
+
export type TokenRefPath = `${PrimitiveCategory}.${string}`;
|
|
76
|
+
export type TokenReference<Path extends TokenRefPath = TokenRefPath> = {
|
|
77
|
+
ref: Path;
|
|
78
|
+
} & {
|
|
79
|
+
readonly [__AXIOM_TOKEN_REF_BRAND]: true;
|
|
80
|
+
};
|
|
81
|
+
export type TokenLeaf = TokenReference;
|
|
82
|
+
export type TokenTree = {
|
|
83
|
+
[key: string]: TokenTree;
|
|
84
|
+
} | TokenLeaf;
|
|
85
|
+
export type SurfaceTokens = {
|
|
86
|
+
background: TokenReference;
|
|
87
|
+
container: {
|
|
88
|
+
default: TokenReference;
|
|
89
|
+
subtle: TokenReference;
|
|
90
|
+
strong: TokenReference;
|
|
91
|
+
};
|
|
92
|
+
elevated: {
|
|
93
|
+
default: TokenReference;
|
|
94
|
+
subtle: TokenReference;
|
|
95
|
+
strong: TokenReference;
|
|
96
|
+
};
|
|
97
|
+
overlay: {
|
|
98
|
+
default: TokenReference;
|
|
99
|
+
backdrop: TokenReference;
|
|
100
|
+
};
|
|
101
|
+
glass?: {
|
|
102
|
+
default: TokenReference;
|
|
103
|
+
strong: TokenReference;
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
export type ElevationTokens = {
|
|
107
|
+
level0: TokenReference;
|
|
108
|
+
level1: TokenReference;
|
|
109
|
+
level2: TokenReference;
|
|
110
|
+
level3: TokenReference;
|
|
111
|
+
level4: TokenReference;
|
|
112
|
+
level5: TokenReference;
|
|
113
|
+
};
|
|
114
|
+
export type EffectTokens = {
|
|
115
|
+
blur: {
|
|
116
|
+
sm: TokenReference;
|
|
117
|
+
md: TokenReference;
|
|
118
|
+
lg: TokenReference;
|
|
119
|
+
};
|
|
120
|
+
opacity: {
|
|
121
|
+
glass: TokenReference;
|
|
122
|
+
subtle: TokenReference;
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
export type TypographyRole = {
|
|
126
|
+
fontFamily: TokenReference;
|
|
127
|
+
fontSize: TokenReference;
|
|
128
|
+
lineHeight: TokenReference;
|
|
129
|
+
letterSpacing: TokenReference;
|
|
130
|
+
fontWeight: TokenReference;
|
|
131
|
+
};
|
|
132
|
+
export type FlexibleNamespace = {
|
|
133
|
+
[key: string]: TokenTree;
|
|
134
|
+
};
|
|
135
|
+
export type SemanticNamespace = 'surface' | 'typography' | 'content' | 'border' | 'overlay' | 'elevation' | 'shadow' | 'effect';
|
|
136
|
+
export type SemanticTokens = {
|
|
137
|
+
surface: SurfaceTokens;
|
|
138
|
+
elevation: ElevationTokens;
|
|
139
|
+
effect: EffectTokens;
|
|
140
|
+
typography: {
|
|
141
|
+
display: {
|
|
142
|
+
xl: TypographyRole;
|
|
143
|
+
lg: TypographyRole;
|
|
144
|
+
};
|
|
145
|
+
heading: {
|
|
146
|
+
h1: TypographyRole;
|
|
147
|
+
h2: TypographyRole;
|
|
148
|
+
h3: TypographyRole;
|
|
149
|
+
h4: TypographyRole;
|
|
150
|
+
};
|
|
151
|
+
title: {
|
|
152
|
+
lg: TypographyRole;
|
|
153
|
+
md: TypographyRole;
|
|
154
|
+
sm: TypographyRole;
|
|
155
|
+
};
|
|
156
|
+
body: {
|
|
157
|
+
lg: TypographyRole;
|
|
158
|
+
md: TypographyRole;
|
|
159
|
+
sm: TypographyRole;
|
|
160
|
+
};
|
|
161
|
+
label: {
|
|
162
|
+
lg: TypographyRole;
|
|
163
|
+
md: TypographyRole;
|
|
164
|
+
sm: TypographyRole;
|
|
165
|
+
};
|
|
166
|
+
caption: TypographyRole;
|
|
167
|
+
overline: TypographyRole;
|
|
168
|
+
};
|
|
169
|
+
state: {
|
|
170
|
+
hover: {
|
|
171
|
+
overlay: TokenReference;
|
|
172
|
+
};
|
|
173
|
+
active: {
|
|
174
|
+
overlay: TokenReference;
|
|
175
|
+
elevation?: TokenReference;
|
|
176
|
+
};
|
|
177
|
+
focus: {
|
|
178
|
+
border: TokenReference;
|
|
179
|
+
};
|
|
180
|
+
disabled: {
|
|
181
|
+
opacity: TokenReference;
|
|
182
|
+
};
|
|
183
|
+
selected: {
|
|
184
|
+
overlay: TokenReference;
|
|
185
|
+
border?: TokenReference;
|
|
186
|
+
};
|
|
187
|
+
};
|
|
188
|
+
content: FlexibleNamespace;
|
|
189
|
+
border: FlexibleNamespace;
|
|
190
|
+
overlay: FlexibleNamespace;
|
|
191
|
+
shadow: FlexibleNamespace;
|
|
192
|
+
};
|
|
193
|
+
export type TokenSchema = {
|
|
194
|
+
primitives: PrimitiveTokens;
|
|
195
|
+
semantic: SemanticTokens;
|
|
196
|
+
};
|
|
197
|
+
export type Token = {
|
|
198
|
+
id: string;
|
|
199
|
+
type: string;
|
|
200
|
+
value: unknown;
|
|
201
|
+
};
|
|
202
|
+
export {};
|
|
203
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,CAAC,MAAM,uBAAuB,EAAE,OAAO,MAAM,CAAC;AAGrD,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE;QACL,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;KAC7B,CAAC;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AAC;AAGF,MAAM,MAAM,KAAK,GAAG;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,uEAAuE;AACvE,sFAAsF"}
|
package/package.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@axiom-core/token-schema",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Axiom Core — token schema and type definitions",
|
|
5
|
+
"private": false,
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
|
+
"module": "./dist/index.js",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"import": "./dist/index.js",
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"default": "./dist/index.js"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist"
|
|
19
|
+
],
|
|
20
|
+
"sideEffects": false,
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "https://github.com/Haneefe/Axiom-Core.git"
|
|
25
|
+
},
|
|
26
|
+
"homepage": "https://github.com/Haneefe/Axiom-Core",
|
|
27
|
+
"bugs": {
|
|
28
|
+
"url": "https://github.com/Haneefe/Axiom-Core/issues"
|
|
29
|
+
},
|
|
30
|
+
"publishConfig": {
|
|
31
|
+
"access": "public"
|
|
32
|
+
},
|
|
33
|
+
"scripts": {
|
|
34
|
+
"build": "tsc -b",
|
|
35
|
+
"clean": "rimraf dist",
|
|
36
|
+
"dev": "tsc -w -p tsconfig.json"
|
|
37
|
+
}
|
|
38
|
+
}
|