@arbor-css/preset 0.0.2
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/arborPreset.d.ts +347 -0
- package/dist/arborPreset.d.ts.map +1 -0
- package/dist/arborPreset.js +198 -0
- package/dist/arborPreset.js.map +1 -0
- package/dist/config.d.ts +16 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +4 -0
- package/dist/config.js.map +1 -0
- package/dist/createArborPreset.d.ts +26 -0
- package/dist/createArborPreset.d.ts.map +1 -0
- package/dist/createArborPreset.js +55 -0
- package/dist/createArborPreset.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/primitives/primitives.d.ts +46 -0
- package/dist/primitives/primitives.d.ts.map +1 -0
- package/dist/primitives/primitives.js +75 -0
- package/dist/primitives/primitives.js.map +1 -0
- package/dist/util/convertStructure.d.ts +8 -0
- package/dist/util/convertStructure.d.ts.map +1 -0
- package/dist/util/convertStructure.js +30 -0
- package/dist/util/convertStructure.js.map +1 -0
- package/package.json +45 -0
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
import { CompiledColors } from '@arbor-css/colors';
|
|
2
|
+
import { ModeValues } from '@arbor-css/modes';
|
|
3
|
+
import { Primitives } from '@arbor-css/primitives';
|
|
4
|
+
export declare const arborModeSchema: import("@arbor-css/modes").ModeSchema<{
|
|
5
|
+
colors: {
|
|
6
|
+
main: {
|
|
7
|
+
paper: "color";
|
|
8
|
+
wash: "color";
|
|
9
|
+
lighter: "color";
|
|
10
|
+
light: "color";
|
|
11
|
+
mid: "color";
|
|
12
|
+
heavy: "color";
|
|
13
|
+
heavier: "color";
|
|
14
|
+
ink: "color";
|
|
15
|
+
};
|
|
16
|
+
neutral: {
|
|
17
|
+
paper: "color";
|
|
18
|
+
wash: "color";
|
|
19
|
+
lighter: "color";
|
|
20
|
+
light: "color";
|
|
21
|
+
mid: "color";
|
|
22
|
+
heavy: "color";
|
|
23
|
+
heavier: "color";
|
|
24
|
+
ink: "color";
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
action: {
|
|
28
|
+
primary: {
|
|
29
|
+
fg: "color";
|
|
30
|
+
bg: "color";
|
|
31
|
+
border: "color";
|
|
32
|
+
};
|
|
33
|
+
secondary: {
|
|
34
|
+
fg: "color";
|
|
35
|
+
bg: "color";
|
|
36
|
+
border: "color";
|
|
37
|
+
};
|
|
38
|
+
ambient: {
|
|
39
|
+
fg: "color";
|
|
40
|
+
bg: "color";
|
|
41
|
+
border: "color";
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
control: {
|
|
45
|
+
fg: "color";
|
|
46
|
+
bg: "color";
|
|
47
|
+
border: "color";
|
|
48
|
+
};
|
|
49
|
+
surface: {
|
|
50
|
+
primary: {
|
|
51
|
+
fg: "color";
|
|
52
|
+
bg: "color";
|
|
53
|
+
border: "color";
|
|
54
|
+
};
|
|
55
|
+
secondary: {
|
|
56
|
+
fg: "color";
|
|
57
|
+
bg: "color";
|
|
58
|
+
border: "color";
|
|
59
|
+
};
|
|
60
|
+
ambient: {
|
|
61
|
+
fg: "color";
|
|
62
|
+
bg: "color";
|
|
63
|
+
border: "color";
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
text: {
|
|
67
|
+
primary: {
|
|
68
|
+
size: "font-size";
|
|
69
|
+
weight: "font-weight";
|
|
70
|
+
lineHeight: "line-height";
|
|
71
|
+
font: "other";
|
|
72
|
+
};
|
|
73
|
+
secondary: {
|
|
74
|
+
size: "font-size";
|
|
75
|
+
weight: "font-weight";
|
|
76
|
+
lineHeight: "line-height";
|
|
77
|
+
font: "other";
|
|
78
|
+
};
|
|
79
|
+
ambient: {
|
|
80
|
+
size: "font-size";
|
|
81
|
+
weight: "font-weight";
|
|
82
|
+
lineHeight: "line-height";
|
|
83
|
+
font: "other";
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
density: "other";
|
|
87
|
+
spacing: {
|
|
88
|
+
xs: "spacing";
|
|
89
|
+
sm: "spacing";
|
|
90
|
+
md: "spacing";
|
|
91
|
+
lg: "spacing";
|
|
92
|
+
xl: "spacing";
|
|
93
|
+
};
|
|
94
|
+
borderWidth: {
|
|
95
|
+
sm: "border-width";
|
|
96
|
+
md: "border-width";
|
|
97
|
+
lg: "border-width";
|
|
98
|
+
};
|
|
99
|
+
borderRadius: {
|
|
100
|
+
sm: "border-radius";
|
|
101
|
+
md: "border-radius";
|
|
102
|
+
lg: "border-radius";
|
|
103
|
+
};
|
|
104
|
+
shadow: {
|
|
105
|
+
color: "color";
|
|
106
|
+
sm: {
|
|
107
|
+
x: "shadow-x";
|
|
108
|
+
y: "shadow-y";
|
|
109
|
+
blur: "shadow-blur";
|
|
110
|
+
spread: "shadow-spread";
|
|
111
|
+
color: "shadow-color";
|
|
112
|
+
compiled: "shadow";
|
|
113
|
+
};
|
|
114
|
+
md: {
|
|
115
|
+
x: "shadow-x";
|
|
116
|
+
y: "shadow-y";
|
|
117
|
+
blur: "shadow-blur";
|
|
118
|
+
spread: "shadow-spread";
|
|
119
|
+
color: "shadow-color";
|
|
120
|
+
compiled: "shadow";
|
|
121
|
+
};
|
|
122
|
+
lg: {
|
|
123
|
+
x: "shadow-x";
|
|
124
|
+
y: "shadow-y";
|
|
125
|
+
blur: "shadow-blur";
|
|
126
|
+
spread: "shadow-spread";
|
|
127
|
+
color: "shadow-color";
|
|
128
|
+
compiled: "shadow";
|
|
129
|
+
};
|
|
130
|
+
xl: {
|
|
131
|
+
x: "shadow-x";
|
|
132
|
+
y: "shadow-y";
|
|
133
|
+
blur: "shadow-blur";
|
|
134
|
+
spread: "shadow-spread";
|
|
135
|
+
color: "shadow-color";
|
|
136
|
+
compiled: "shadow";
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
}>;
|
|
140
|
+
export type ArborModeSchema = typeof arborModeSchema;
|
|
141
|
+
export type ArborModeShape = ModeValues<ArborModeSchema['definition']>;
|
|
142
|
+
export declare function createArborModeValues<TCompiledColors extends CompiledColors>(config: {
|
|
143
|
+
mainColor: keyof TCompiledColors[keyof TCompiledColors]['colors'];
|
|
144
|
+
primitives: Primitives<TCompiledColors>;
|
|
145
|
+
}): {
|
|
146
|
+
colors: {
|
|
147
|
+
main: any;
|
|
148
|
+
neutral: any;
|
|
149
|
+
};
|
|
150
|
+
surface: {
|
|
151
|
+
primary: {
|
|
152
|
+
bg: import("@arbor-css/modes").TrackedValue;
|
|
153
|
+
fg: import("@arbor-css/modes").TrackedValue;
|
|
154
|
+
border: import("@arbor-css/modes").TrackedValue;
|
|
155
|
+
};
|
|
156
|
+
secondary: {
|
|
157
|
+
bg: import("@arbor-css/modes").TrackedValue;
|
|
158
|
+
fg: import("@arbor-css/modes").TrackedValue;
|
|
159
|
+
border: import("@arbor-css/modes").TrackedValue;
|
|
160
|
+
};
|
|
161
|
+
ambient: {
|
|
162
|
+
bg: import("@arbor-css/modes").TrackedValue;
|
|
163
|
+
fg: import("@arbor-css/modes").TrackedValue;
|
|
164
|
+
border: import("@arbor-css/modes").TrackedValue;
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
action: {
|
|
168
|
+
primary: {
|
|
169
|
+
bg: import("@arbor-css/modes").TrackedValue;
|
|
170
|
+
fg: import("@arbor-css/modes").TrackedValue;
|
|
171
|
+
border: import("@arbor-css/modes").TrackedValue;
|
|
172
|
+
};
|
|
173
|
+
secondary: {
|
|
174
|
+
bg: import("@arbor-css/modes").TrackedValue;
|
|
175
|
+
fg: import("@arbor-css/modes").TrackedValue;
|
|
176
|
+
border: import("@arbor-css/modes").TrackedValue;
|
|
177
|
+
};
|
|
178
|
+
ambient: {
|
|
179
|
+
bg: import("@arbor-css/modes").TrackedValue;
|
|
180
|
+
fg: import("@arbor-css/modes").TrackedValue;
|
|
181
|
+
border: string;
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
control: {
|
|
185
|
+
bg: import("@arbor-css/modes").TrackedValue;
|
|
186
|
+
fg: import("@arbor-css/modes").TrackedValue;
|
|
187
|
+
border: import("@arbor-css/modes").TrackedValue;
|
|
188
|
+
};
|
|
189
|
+
density: number;
|
|
190
|
+
spacing: {
|
|
191
|
+
xs: import("@arbor-css/modes").TrackedValue;
|
|
192
|
+
sm: import("@arbor-css/modes").TrackedValue;
|
|
193
|
+
md: import("@arbor-css/modes").TrackedValue;
|
|
194
|
+
lg: import("@arbor-css/modes").TrackedValue;
|
|
195
|
+
xl: import("@arbor-css/modes").TrackedValue;
|
|
196
|
+
};
|
|
197
|
+
text: {
|
|
198
|
+
primary: {
|
|
199
|
+
size: import("@arbor-css/modes").TrackedValue;
|
|
200
|
+
weight: {
|
|
201
|
+
"@@TOKEN@@": true;
|
|
202
|
+
name: string;
|
|
203
|
+
type: import("@arbor-css/tokens").PropertyType;
|
|
204
|
+
tag: string | undefined;
|
|
205
|
+
purpose: import("@arbor-css/tokens").TokenPurpose;
|
|
206
|
+
group: string | undefined;
|
|
207
|
+
fallback: string | number | undefined;
|
|
208
|
+
var: string;
|
|
209
|
+
varFallback: (fallbackOverride?: string | number) => string;
|
|
210
|
+
assign: (value?: string | number) => string;
|
|
211
|
+
readonly definition: string;
|
|
212
|
+
suffixed: (suffix: string) => /*elided*/ any;
|
|
213
|
+
prefixed: (prefix: string) => /*elided*/ any;
|
|
214
|
+
};
|
|
215
|
+
lineHeight: {
|
|
216
|
+
"@@TOKEN@@": true;
|
|
217
|
+
name: string;
|
|
218
|
+
type: import("@arbor-css/tokens").PropertyType;
|
|
219
|
+
tag: string | undefined;
|
|
220
|
+
purpose: import("@arbor-css/tokens").TokenPurpose;
|
|
221
|
+
group: string | undefined;
|
|
222
|
+
fallback: string | number | undefined;
|
|
223
|
+
var: string;
|
|
224
|
+
varFallback: (fallbackOverride?: string | number) => string;
|
|
225
|
+
assign: (value?: string | number) => string;
|
|
226
|
+
readonly definition: string;
|
|
227
|
+
suffixed: (suffix: string) => /*elided*/ any;
|
|
228
|
+
prefixed: (prefix: string) => /*elided*/ any;
|
|
229
|
+
};
|
|
230
|
+
font: string;
|
|
231
|
+
};
|
|
232
|
+
secondary: {
|
|
233
|
+
size: import("@arbor-css/modes").TrackedValue;
|
|
234
|
+
weight: {
|
|
235
|
+
"@@TOKEN@@": true;
|
|
236
|
+
name: string;
|
|
237
|
+
type: import("@arbor-css/tokens").PropertyType;
|
|
238
|
+
tag: string | undefined;
|
|
239
|
+
purpose: import("@arbor-css/tokens").TokenPurpose;
|
|
240
|
+
group: string | undefined;
|
|
241
|
+
fallback: string | number | undefined;
|
|
242
|
+
var: string;
|
|
243
|
+
varFallback: (fallbackOverride?: string | number) => string;
|
|
244
|
+
assign: (value?: string | number) => string;
|
|
245
|
+
readonly definition: string;
|
|
246
|
+
suffixed: (suffix: string) => /*elided*/ any;
|
|
247
|
+
prefixed: (prefix: string) => /*elided*/ any;
|
|
248
|
+
};
|
|
249
|
+
lineHeight: {
|
|
250
|
+
"@@TOKEN@@": true;
|
|
251
|
+
name: string;
|
|
252
|
+
type: import("@arbor-css/tokens").PropertyType;
|
|
253
|
+
tag: string | undefined;
|
|
254
|
+
purpose: import("@arbor-css/tokens").TokenPurpose;
|
|
255
|
+
group: string | undefined;
|
|
256
|
+
fallback: string | number | undefined;
|
|
257
|
+
var: string;
|
|
258
|
+
varFallback: (fallbackOverride?: string | number) => string;
|
|
259
|
+
assign: (value?: string | number) => string;
|
|
260
|
+
readonly definition: string;
|
|
261
|
+
suffixed: (suffix: string) => /*elided*/ any;
|
|
262
|
+
prefixed: (prefix: string) => /*elided*/ any;
|
|
263
|
+
};
|
|
264
|
+
font: string;
|
|
265
|
+
};
|
|
266
|
+
ambient: {
|
|
267
|
+
size: import("@arbor-css/modes").TrackedValue;
|
|
268
|
+
weight: {
|
|
269
|
+
"@@TOKEN@@": true;
|
|
270
|
+
name: string;
|
|
271
|
+
type: import("@arbor-css/tokens").PropertyType;
|
|
272
|
+
tag: string | undefined;
|
|
273
|
+
purpose: import("@arbor-css/tokens").TokenPurpose;
|
|
274
|
+
group: string | undefined;
|
|
275
|
+
fallback: string | number | undefined;
|
|
276
|
+
var: string;
|
|
277
|
+
varFallback: (fallbackOverride?: string | number) => string;
|
|
278
|
+
assign: (value?: string | number) => string;
|
|
279
|
+
readonly definition: string;
|
|
280
|
+
suffixed: (suffix: string) => /*elided*/ any;
|
|
281
|
+
prefixed: (prefix: string) => /*elided*/ any;
|
|
282
|
+
};
|
|
283
|
+
lineHeight: {
|
|
284
|
+
"@@TOKEN@@": true;
|
|
285
|
+
name: string;
|
|
286
|
+
type: import("@arbor-css/tokens").PropertyType;
|
|
287
|
+
tag: string | undefined;
|
|
288
|
+
purpose: import("@arbor-css/tokens").TokenPurpose;
|
|
289
|
+
group: string | undefined;
|
|
290
|
+
fallback: string | number | undefined;
|
|
291
|
+
var: string;
|
|
292
|
+
varFallback: (fallbackOverride?: string | number) => string;
|
|
293
|
+
assign: (value?: string | number) => string;
|
|
294
|
+
readonly definition: string;
|
|
295
|
+
suffixed: (suffix: string) => /*elided*/ any;
|
|
296
|
+
prefixed: (prefix: string) => /*elided*/ any;
|
|
297
|
+
};
|
|
298
|
+
font: string;
|
|
299
|
+
};
|
|
300
|
+
};
|
|
301
|
+
borderRadius: {
|
|
302
|
+
sm: import("@arbor-css/modes").TrackedValue;
|
|
303
|
+
md: import("@arbor-css/modes").TrackedValue;
|
|
304
|
+
lg: import("@arbor-css/modes").TrackedValue;
|
|
305
|
+
};
|
|
306
|
+
borderWidth: {
|
|
307
|
+
sm: string;
|
|
308
|
+
md: string;
|
|
309
|
+
lg: string;
|
|
310
|
+
};
|
|
311
|
+
shadow: {
|
|
312
|
+
color: import("@arbor-css/modes").TrackedValue;
|
|
313
|
+
sm: {
|
|
314
|
+
x: import("@arbor-css/modes").TrackedValue;
|
|
315
|
+
y: import("@arbor-css/modes").TrackedValue;
|
|
316
|
+
blur: import("@arbor-css/modes").TrackedValue;
|
|
317
|
+
spread: import("@arbor-css/modes").TrackedValue;
|
|
318
|
+
color: import("@arbor-css/modes").TrackedValue;
|
|
319
|
+
compiled: import("@arbor-css/modes").TrackedValue;
|
|
320
|
+
};
|
|
321
|
+
md: {
|
|
322
|
+
x: import("@arbor-css/modes").TrackedValue;
|
|
323
|
+
y: import("@arbor-css/modes").TrackedValue;
|
|
324
|
+
blur: import("@arbor-css/modes").TrackedValue;
|
|
325
|
+
spread: import("@arbor-css/modes").TrackedValue;
|
|
326
|
+
color: import("@arbor-css/modes").TrackedValue;
|
|
327
|
+
compiled: import("@arbor-css/modes").TrackedValue;
|
|
328
|
+
};
|
|
329
|
+
lg: {
|
|
330
|
+
x: import("@arbor-css/modes").TrackedValue;
|
|
331
|
+
y: import("@arbor-css/modes").TrackedValue;
|
|
332
|
+
blur: import("@arbor-css/modes").TrackedValue;
|
|
333
|
+
spread: import("@arbor-css/modes").TrackedValue;
|
|
334
|
+
color: import("@arbor-css/modes").TrackedValue;
|
|
335
|
+
compiled: import("@arbor-css/modes").TrackedValue;
|
|
336
|
+
};
|
|
337
|
+
xl: {
|
|
338
|
+
x: import("@arbor-css/modes").TrackedValue;
|
|
339
|
+
y: import("@arbor-css/modes").TrackedValue;
|
|
340
|
+
blur: import("@arbor-css/modes").TrackedValue;
|
|
341
|
+
spread: import("@arbor-css/modes").TrackedValue;
|
|
342
|
+
color: import("@arbor-css/modes").TrackedValue;
|
|
343
|
+
compiled: import("@arbor-css/modes").TrackedValue;
|
|
344
|
+
};
|
|
345
|
+
};
|
|
346
|
+
};
|
|
347
|
+
//# sourceMappingURL=arborPreset.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arborPreset.d.ts","sourceRoot":"","sources":["../src/arborPreset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,OAAO,EAIN,UAAU,EACV,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAwBnD,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsE1B,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,OAAO,eAAe,CAAC;AACrD,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC;AAmBvE,wBAAgB,qBAAqB,CACpC,eAAe,SAAS,cAAc,EACrC,MAAM,EAAE;IACT,SAAS,EAAE,MAAM,eAAe,CAAC,MAAM,eAAe,CAAC,CAAC,QAAQ,CAAC,CAAC;IAClE,UAAU,EAAE,UAAU,CAAC,eAAe,CAAC,CAAC;CACxC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+FA"}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { $globalProps } from '@arbor-css/globals';
|
|
2
|
+
import { createModeSchema, derive, } from '@arbor-css/modes';
|
|
3
|
+
const colorIntents = {
|
|
4
|
+
fg: 'color',
|
|
5
|
+
bg: 'color',
|
|
6
|
+
border: 'color',
|
|
7
|
+
};
|
|
8
|
+
const textIntents = {
|
|
9
|
+
size: 'font-size',
|
|
10
|
+
weight: 'font-weight',
|
|
11
|
+
lineHeight: 'line-height',
|
|
12
|
+
font: 'other',
|
|
13
|
+
};
|
|
14
|
+
const shadowIntents = {
|
|
15
|
+
x: 'shadow-x',
|
|
16
|
+
y: 'shadow-y',
|
|
17
|
+
blur: 'shadow-blur',
|
|
18
|
+
spread: 'shadow-spread',
|
|
19
|
+
color: 'shadow-color',
|
|
20
|
+
compiled: 'shadow',
|
|
21
|
+
};
|
|
22
|
+
export const arborModeSchema = createModeSchema({
|
|
23
|
+
colors: {
|
|
24
|
+
main: {
|
|
25
|
+
paper: 'color',
|
|
26
|
+
wash: 'color',
|
|
27
|
+
lighter: 'color',
|
|
28
|
+
light: 'color',
|
|
29
|
+
mid: 'color',
|
|
30
|
+
heavy: 'color',
|
|
31
|
+
heavier: 'color',
|
|
32
|
+
ink: 'color',
|
|
33
|
+
},
|
|
34
|
+
neutral: {
|
|
35
|
+
paper: 'color',
|
|
36
|
+
wash: 'color',
|
|
37
|
+
lighter: 'color',
|
|
38
|
+
light: 'color',
|
|
39
|
+
mid: 'color',
|
|
40
|
+
heavy: 'color',
|
|
41
|
+
heavier: 'color',
|
|
42
|
+
ink: 'color',
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
// intents
|
|
46
|
+
action: {
|
|
47
|
+
primary: colorIntents,
|
|
48
|
+
secondary: colorIntents,
|
|
49
|
+
ambient: colorIntents,
|
|
50
|
+
},
|
|
51
|
+
control: colorIntents,
|
|
52
|
+
surface: {
|
|
53
|
+
primary: colorIntents,
|
|
54
|
+
secondary: colorIntents,
|
|
55
|
+
ambient: colorIntents,
|
|
56
|
+
},
|
|
57
|
+
text: {
|
|
58
|
+
primary: textIntents,
|
|
59
|
+
secondary: textIntents,
|
|
60
|
+
ambient: textIntents,
|
|
61
|
+
},
|
|
62
|
+
// density
|
|
63
|
+
density: 'other',
|
|
64
|
+
spacing: {
|
|
65
|
+
xs: 'spacing',
|
|
66
|
+
sm: 'spacing',
|
|
67
|
+
md: 'spacing',
|
|
68
|
+
lg: 'spacing',
|
|
69
|
+
xl: 'spacing',
|
|
70
|
+
},
|
|
71
|
+
// other cosmetics
|
|
72
|
+
borderWidth: {
|
|
73
|
+
sm: 'border-width',
|
|
74
|
+
md: 'border-width',
|
|
75
|
+
lg: 'border-width',
|
|
76
|
+
},
|
|
77
|
+
borderRadius: {
|
|
78
|
+
sm: 'border-radius',
|
|
79
|
+
md: 'border-radius',
|
|
80
|
+
lg: 'border-radius',
|
|
81
|
+
},
|
|
82
|
+
shadow: {
|
|
83
|
+
color: 'color',
|
|
84
|
+
sm: shadowIntents,
|
|
85
|
+
md: shadowIntents,
|
|
86
|
+
lg: shadowIntents,
|
|
87
|
+
xl: shadowIntents,
|
|
88
|
+
},
|
|
89
|
+
});
|
|
90
|
+
function createShadowIntentLevel(primitives, size) {
|
|
91
|
+
return {
|
|
92
|
+
x: derive `${primitives.$tokens.shadows[size].x}`,
|
|
93
|
+
y: derive `${primitives.$tokens.shadows[size].y}`,
|
|
94
|
+
blur: derive `${primitives.$tokens.shadows[size].blur}`,
|
|
95
|
+
spread: derive `${primitives.$tokens.shadows[size].spread}`,
|
|
96
|
+
color: derive `${{
|
|
97
|
+
value: arborModeSchema.$tokens.shadow.color,
|
|
98
|
+
fallback: primitives.$tokens.shadows[size].color,
|
|
99
|
+
}}`,
|
|
100
|
+
compiled: derive `${arborModeSchema.$tokens.shadow[size].x} ${arborModeSchema.$tokens.shadow[size].y} ${arborModeSchema.$tokens.shadow[size].blur} ${arborModeSchema.$tokens.shadow[size].spread} ${arborModeSchema.$tokens.shadow[size].color}`,
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
export function createArborModeValues(config) {
|
|
104
|
+
// FIXME: user-facing typing for this is good, but internally something is
|
|
105
|
+
// broken...
|
|
106
|
+
const mainColor = config.primitives.$tokens.colors[config.mainColor];
|
|
107
|
+
return {
|
|
108
|
+
colors: {
|
|
109
|
+
main: mainColor,
|
|
110
|
+
neutral: mainColor.$neutral,
|
|
111
|
+
},
|
|
112
|
+
surface: {
|
|
113
|
+
primary: {
|
|
114
|
+
bg: derive `${arborModeSchema.$tokens.colors.main.lighter}`,
|
|
115
|
+
fg: derive `${arborModeSchema.$tokens.colors.main.ink}`,
|
|
116
|
+
border: derive `${arborModeSchema.$tokens.colors.main.heavy}`,
|
|
117
|
+
},
|
|
118
|
+
secondary: {
|
|
119
|
+
bg: derive `${arborModeSchema.$tokens.colors.main.wash}`,
|
|
120
|
+
fg: derive `${arborModeSchema.$tokens.colors.neutral.ink}`,
|
|
121
|
+
border: derive `${arborModeSchema.$tokens.colors.main.ink}`,
|
|
122
|
+
},
|
|
123
|
+
ambient: {
|
|
124
|
+
bg: derive `${arborModeSchema.$tokens.colors.neutral.paper}`,
|
|
125
|
+
fg: derive `${arborModeSchema.$tokens.colors.neutral.ink}`,
|
|
126
|
+
border: derive `${arborModeSchema.$tokens.colors.neutral.heavy}`,
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
action: {
|
|
130
|
+
primary: {
|
|
131
|
+
bg: derive `${arborModeSchema.$tokens.colors.main.mid}`,
|
|
132
|
+
fg: derive `${arborModeSchema.$tokens.colors.main.ink}`,
|
|
133
|
+
border: derive `${arborModeSchema.$tokens.colors.main.heavy}`,
|
|
134
|
+
},
|
|
135
|
+
secondary: {
|
|
136
|
+
bg: derive `${arborModeSchema.$tokens.colors.neutral.wash}`,
|
|
137
|
+
fg: derive `${arborModeSchema.$tokens.colors.neutral.heavier}`,
|
|
138
|
+
border: derive `${arborModeSchema.$tokens.colors.neutral.heavy}`,
|
|
139
|
+
},
|
|
140
|
+
ambient: {
|
|
141
|
+
bg: derive `${arborModeSchema.$tokens.colors.main.lighter}`,
|
|
142
|
+
fg: derive `${arborModeSchema.$tokens.colors.main.ink}`,
|
|
143
|
+
border: 'transparent',
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
control: {
|
|
147
|
+
bg: derive `${arborModeSchema.$tokens.colors.neutral.paper}`,
|
|
148
|
+
fg: derive `${arborModeSchema.$tokens.colors.neutral.ink}`,
|
|
149
|
+
border: derive `${arborModeSchema.$tokens.colors.neutral.heavy}`,
|
|
150
|
+
},
|
|
151
|
+
density: 1,
|
|
152
|
+
spacing: {
|
|
153
|
+
xs: derive `calc(${config.primitives.$tokens.spacing.xs} / ${arborModeSchema.$tokens.density})`,
|
|
154
|
+
sm: derive `calc(${config.primitives.$tokens.spacing.sm} / ${arborModeSchema.$tokens.density})`,
|
|
155
|
+
md: derive `calc(${config.primitives.$tokens.spacing.md} / ${arborModeSchema.$tokens.density})`,
|
|
156
|
+
lg: derive `calc(${config.primitives.$tokens.spacing.lg} / ${arborModeSchema.$tokens.density})`,
|
|
157
|
+
xl: derive `calc(${config.primitives.$tokens.spacing.xl} / ${arborModeSchema.$tokens.density})`,
|
|
158
|
+
},
|
|
159
|
+
text: {
|
|
160
|
+
primary: {
|
|
161
|
+
size: derive `calc(${config.primitives.$tokens.typography['3xl'].size} / ${arborModeSchema.$tokens.density})`,
|
|
162
|
+
weight: config.primitives.$tokens.typography['3xl'].weight,
|
|
163
|
+
lineHeight: config.primitives.$tokens.typography['3xl'].lineHeight,
|
|
164
|
+
font: 'sans-serif',
|
|
165
|
+
},
|
|
166
|
+
secondary: {
|
|
167
|
+
size: derive `calc(${config.primitives.$tokens.typography.md.size} / ${arborModeSchema.$tokens.density})`,
|
|
168
|
+
weight: config.primitives.$tokens.typography.md.weight,
|
|
169
|
+
lineHeight: config.primitives.$tokens.typography.md.lineHeight,
|
|
170
|
+
font: 'sans-serif',
|
|
171
|
+
},
|
|
172
|
+
ambient: {
|
|
173
|
+
size: derive `calc(${config.primitives.$tokens.typography.sm.size} / ${arborModeSchema.$tokens.density})`,
|
|
174
|
+
weight: config.primitives.$tokens.typography.sm.weight,
|
|
175
|
+
lineHeight: config.primitives.$tokens.typography.sm.lineHeight,
|
|
176
|
+
font: 'sans-serif',
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
borderRadius: {
|
|
180
|
+
sm: derive `calc(${$globalProps.roundness} * ${config.primitives.$tokens.spacing.md} / ${arborModeSchema.$tokens.density})`,
|
|
181
|
+
md: derive `calc(${$globalProps.roundness} * ${config.primitives.$tokens.spacing.lg} / ${arborModeSchema.$tokens.density})`,
|
|
182
|
+
lg: derive `calc(${$globalProps.roundness} * ${config.primitives.$tokens.spacing.xl} / ${arborModeSchema.$tokens.density})`,
|
|
183
|
+
},
|
|
184
|
+
borderWidth: {
|
|
185
|
+
sm: '1',
|
|
186
|
+
md: '1',
|
|
187
|
+
lg: '2',
|
|
188
|
+
},
|
|
189
|
+
shadow: {
|
|
190
|
+
color: derive `${arborModeSchema.$tokens.colors.neutral.heavier}`,
|
|
191
|
+
sm: createShadowIntentLevel(config.primitives, 'sm'),
|
|
192
|
+
md: createShadowIntentLevel(config.primitives, 'md'),
|
|
193
|
+
lg: createShadowIntentLevel(config.primitives, 'lg'),
|
|
194
|
+
xl: createShadowIntentLevel(config.primitives, 'xl'),
|
|
195
|
+
},
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
//# sourceMappingURL=arborPreset.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arborPreset.js","sourceRoot":"","sources":["../src/arborPreset.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EACN,gBAAgB,EAChB,MAAM,GAGN,MAAM,kBAAkB,CAAC;AAG1B,MAAM,YAAY,GAAG;IACpB,EAAE,EAAE,OAAO;IACX,EAAE,EAAE,OAAO;IACX,MAAM,EAAE,OAAO;CACW,CAAC;AAE5B,MAAM,WAAW,GAAG;IACnB,IAAI,EAAE,WAAW;IACjB,MAAM,EAAE,aAAa;IACrB,UAAU,EAAE,aAAa;IACzB,IAAI,EAAE,OAAO;CACa,CAAC;AAE5B,MAAM,aAAa,GAAG;IACrB,CAAC,EAAE,UAAU;IACb,CAAC,EAAE,UAAU;IACb,IAAI,EAAE,aAAa;IACnB,MAAM,EAAE,eAAe;IACvB,KAAK,EAAE,cAAc;IACrB,QAAQ,EAAE,QAAQ;CACQ,CAAC;AAE5B,MAAM,CAAC,MAAM,eAAe,GAAG,gBAAgB,CAAC;IAC/C,MAAM,EAAE;QACP,IAA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AAE,EAAE,uBAAuB,CAAC,MAAM,CAAC,UAAU,EAAE,IAAI,CAAC;YACpD,EAAE,EAAE,uBAAuB,CAAC,MAAM,CAAC,UAAU,EAAE,IAAI,CAAC;YACpD,EAAE,EAAE,uBAAuB,CAAC,MAAM,CAAC,UAAU,EAAE,IAAI,CAAC;SACpD;KAC4D,CAAC;AAChE,CAAC"}
|
package/dist/config.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CompiledColors } from '@arbor-css/colors';
|
|
2
|
+
import { ModeInstance, ModeSchemaLevel, PartialModeInstance } from '@arbor-css/modes';
|
|
3
|
+
import { Primitives } from '@arbor-css/primitives';
|
|
4
|
+
import { CompiledShadows } from '@arbor-css/shadows';
|
|
5
|
+
import { CompiledSpacing } from '@arbor-css/spacing';
|
|
6
|
+
import { TokenSchema } from '@arbor-css/tokens';
|
|
7
|
+
import { CompiledTypography } from '@arbor-css/typography';
|
|
8
|
+
export interface ArborPreset<TModeShape extends ModeSchemaLevel, TCompiledColors extends CompiledColors<any, any> = CompiledColors<any, any>, TTypography extends CompiledTypography<any> = CompiledTypography<any>, TSpacing extends CompiledSpacing<any> = CompiledSpacing<any>, TShadows extends CompiledShadows<any> = CompiledShadows<any>, TOtherTokens extends TokenSchema = TokenSchema> {
|
|
9
|
+
primitives: Primitives<TCompiledColors, TTypography, TSpacing, TShadows, TOtherTokens>;
|
|
10
|
+
modes: {
|
|
11
|
+
base: ModeInstance<TModeShape>;
|
|
12
|
+
[key: string]: PartialModeInstance<TModeShape>;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export declare function definePreset<TModeShape extends ModeSchemaLevel, TCompiledColors extends CompiledColors<any, any>, TTypography extends CompiledTypography<any>, TSpacing extends CompiledSpacing<any>, TShadows extends CompiledShadows<any>, TOtherTokens extends TokenSchema = TokenSchema>(config: ArborPreset<TModeShape, TCompiledColors, TTypography, TSpacing, TShadows, TOtherTokens>): ArborPreset<TModeShape, TCompiledColors, TTypography, TSpacing, TShadows, TOtherTokens>;
|
|
16
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EACN,YAAY,EACZ,eAAe,EACf,mBAAmB,EACnB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D,MAAM,WAAW,WAAW,CAC3B,UAAU,SAAS,eAAe,EAClC,eAAe,SAAS,cAAc,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,cAAc,CAAC,GAAG,EAAE,GAAG,CAAC,EAC3E,WAAW,SAAS,kBAAkB,CAAC,GAAG,CAAC,GAAG,kBAAkB,CAAC,GAAG,CAAC,EACrE,QAAQ,SAAS,eAAe,CAAC,GAAG,CAAC,GAAG,eAAe,CAAC,GAAG,CAAC,EAC5D,QAAQ,SAAS,eAAe,CAAC,GAAG,CAAC,GAAG,eAAe,CAAC,GAAG,CAAC,EAC5D,YAAY,SAAS,WAAW,GAAG,WAAW;IAE9C,UAAU,EAAE,UAAU,CACrB,eAAe,EACf,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,YAAY,CACZ,CAAC;IACF,KAAK,EAAE;QACN,IAAI,EAAE,YAAY,CAAC,UAAU,CAAC,CAAC;QAC/B,CAAC,GAAG,EAAE,MAAM,GAAG,mBAAmB,CAAC,UAAU,CAAC,CAAC;KAC/C,CAAC;CACF;AAED,wBAAgB,YAAY,CAC3B,UAAU,SAAS,eAAe,EAClC,eAAe,SAAS,cAAc,CAAC,GAAG,EAAE,GAAG,CAAC,EAChD,WAAW,SAAS,kBAAkB,CAAC,GAAG,CAAC,EAC3C,QAAQ,SAAS,eAAe,CAAC,GAAG,CAAC,EACrC,QAAQ,SAAS,eAAe,CAAC,GAAG,CAAC,EACrC,YAAY,SAAS,WAAW,GAAG,WAAW,EAE9C,MAAM,EAAE,WAAW,CAClB,UAAU,EACV,eAAe,EACf,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,YAAY,CACZ,GACC,WAAW,CACb,UAAU,EACV,eAAe,EACf,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,YAAY,CACZ,CAEA"}
|
package/dist/config.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAiCA,MAAM,UAAU,YAAY,CAQ3B,MAOC;IASD,OAAO,MAAM,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ColorRangeConfig, CompiledColors, SchemeDefinition } from '@arbor-css/colors';
|
|
2
|
+
import { GlobalConfig } from '@arbor-css/globals';
|
|
3
|
+
import { DeepPartial, ModeValues } from '@arbor-css/modes';
|
|
4
|
+
import { ShadowConfig } from '@arbor-css/shadows';
|
|
5
|
+
import { SpacingConfig } from '@arbor-css/spacing';
|
|
6
|
+
import { TypographyConfig } from '@arbor-css/typography';
|
|
7
|
+
import { ArborModeSchema, arborModeSchema } from './arborPreset.js';
|
|
8
|
+
import { ArborPreset } from './config.js';
|
|
9
|
+
export interface CreateArborPresetConfig<TRanges extends Record<string, ColorRangeConfig<any>>, TSchemes extends Record<string, SchemeDefinition>> {
|
|
10
|
+
globals?: Partial<GlobalConfig>;
|
|
11
|
+
colors: {
|
|
12
|
+
ranges: TRanges;
|
|
13
|
+
schemes?: TSchemes;
|
|
14
|
+
mainColor: keyof TRanges;
|
|
15
|
+
defaultScheme?: keyof CompiledColors<TRanges, TSchemes>;
|
|
16
|
+
schemeTags?: Record<string, string>;
|
|
17
|
+
};
|
|
18
|
+
typography?: Omit<TypographyConfig, 'globals'>;
|
|
19
|
+
spacing?: Omit<SpacingConfig, 'globals'>;
|
|
20
|
+
shadows?: Omit<ShadowConfig, 'globals'>;
|
|
21
|
+
baseMode?: Partial<ModeValues<(typeof arborModeSchema)['definition']>>;
|
|
22
|
+
}
|
|
23
|
+
export declare function createArborPreset<TRanges extends Record<string, ColorRangeConfig<any>>, TSchemes extends Record<string, SchemeDefinition> = Record<string, never>>(config: CreateArborPresetConfig<TRanges, TSchemes>): ArborPreset<ArborModeSchema['definition']> & {
|
|
24
|
+
addMode: (name: string, mode: DeepPartial<ModeValues<ArborModeSchema['definition']>>) => void;
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=createArborPreset.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createArborPreset.d.ts","sourceRoot":"","sources":["../src/createArborPreset.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,gBAAgB,EAEhB,cAAc,EACd,gBAAgB,EAChB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAiB,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE3D,OAAO,EAAkB,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAkB,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAqB,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC5E,OAAO,EACN,eAAe,EACf,eAAe,EAEf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,MAAM,WAAW,uBAAuB,CACvC,OAAO,SAAS,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,GAAG,CAAC,CAAC,EACrD,QAAQ,SAAS,MA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bor-css/globals';
|
|
3
|
+
import { createPrimitives } from '@arbor-css/primitives';
|
|
4
|
+
import { compileShadows } from '@arbor-css/shadows';
|
|
5
|
+
import { compileSpacing } from '@arbor-css/spacing';
|
|
6
|
+
import { compileTypography } from '@arbor-css/typography';
|
|
7
|
+
import { arborModeSchema, createArborModeValues, } from './arborPreset.js';
|
|
8
|
+
export function createArborPreset(config) {
|
|
9
|
+
const globals = createGlobals(config.globals ?? {});
|
|
10
|
+
const colors = compileColors({
|
|
11
|
+
ranges: config.colors.ranges,
|
|
12
|
+
schemes: config.colors.schemes,
|
|
13
|
+
globals,
|
|
14
|
+
});
|
|
15
|
+
const typography = compileTypography({
|
|
16
|
+
...config.typography,
|
|
17
|
+
globals,
|
|
18
|
+
});
|
|
19
|
+
const spacing = compileSpacing({
|
|
20
|
+
...config.spacing,
|
|
21
|
+
globals,
|
|
22
|
+
});
|
|
23
|
+
const shadows = compileShadows({
|
|
24
|
+
...config.shadows,
|
|
25
|
+
globals,
|
|
26
|
+
});
|
|
27
|
+
const primitives = createPrimitives({
|
|
28
|
+
colors,
|
|
29
|
+
typography,
|
|
30
|
+
spacing,
|
|
31
|
+
shadows,
|
|
32
|
+
globals,
|
|
33
|
+
defaultScheme: config.colors.defaultScheme,
|
|
34
|
+
schemeTags: config.colors.schemeTags,
|
|
35
|
+
});
|
|
36
|
+
const baseModeValues = {
|
|
37
|
+
...createArborModeValues({
|
|
38
|
+
mainColor: config.colors.mainColor,
|
|
39
|
+
primitives,
|
|
40
|
+
}),
|
|
41
|
+
...config.baseMode,
|
|
42
|
+
};
|
|
43
|
+
const baseMode = arborModeSchema.createBase(baseModeValues);
|
|
44
|
+
const modes = {
|
|
45
|
+
base: baseMode,
|
|
46
|
+
};
|
|
47
|
+
return {
|
|
48
|
+
modes,
|
|
49
|
+
primitives,
|
|
50
|
+
addMode(name, mode) {
|
|
51
|
+
modes[name] = arborModeSchema.createPartial(name, mode);
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=createArborPreset.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createArborPreset.js","sourceRoot":"","sources":["../src/createArborPreset.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,aAAa,GAGb,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,aAAa,EAAgB,MAAM,oBAAoB,CAAC;AAEjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAgB,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,cAAc,EAAiB,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAoB,MAAM,uBAAuB,CAAC;AAC5E,OAAO,EAEN,eAAe,EACf,qBAAqB,GACrB,MAAM,kBAAkB,CAAC;AAqB1B,MAAM,UAAU,iBAAiB,CAIhC,MAAkD;IAOlD,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC;IAEpD,MAAM,MAAM,GAAG,aAAa,CAAC;QAC5B,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM;QAC5B,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,OAAO;QAC9B,OAAO;KACP,CAAC,CAAC;IAEH,MAAM,UAAU,GAAG,iBAAiB,CAAC;QACpC,GAAG,MAAM,CAAC,UAAU;QACpB,OAAO;KACP,CAAC,CAAC;IAEH,MAAM,OAAO,GAAG,cAAc,CAAC;QAC9B,GAAG,MAAM,CAAC,OAAO;QACjB,OAAO;KACP,CAAC,CAAC;IAEH,MAAM,OAAO,GAAG,cAAc,CAAC;QAC9B,GAAG,MAAM,CAAC,OAAO;QACjB,OAAO;KACP,CAAC,CAAC;IAEH,MAAM,UAAU,GAAG,gBAAgB,CAAC;QACnC,MAAM;QACN,UAAU;QACV,OAAO;QACP,OAAO;QACP,OAAO;QACP,aAAa,EAAE,MAAM,CAAC,MAAM,CAAC,aAAa;QAC1C,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,UAAU;KACpC,CAAC,CAAC;IAEH,MAAM,cAAc,GAAG;QACtB,GAAG,qBAAqB,CAAC;YACxB,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,SAAgB;YACzC,UAAU;SACV,CAAC;QACF,GAAG,MAAM,CAAC,QAAQ;KAClB,CAAC;IAEF,MAAM,QAAQ,GAAG,eAAe,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC;IAE5D,MAAM,KAAK,GAAwD;QAClE,IAAI,EAAE,QAAQ;KACd,CAAC;IAEF,OAAO;QACN,KAAK;QACL,UAAU;QACV,OAAO,CAAC,IAAI,EAAE,IAAI;YACjB,KAAK,CAAC,IAAI,CAAC,GAAG,eAAe,CAAC,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACzD,CAAC;KACD,CAAC;AACH,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from '@arbor-css/colors';
|
|
2
|
+
export { $systemProps, createGlobals, defaultGlobals, type GlobalConfigProps, type GlobalConfig as PrimitiveGlobals, } from '@arbor-css/globals';
|
|
3
|
+
export * from '@arbor-css/modes';
|
|
4
|
+
export * from '@arbor-css/shadows';
|
|
5
|
+
export * from '@arbor-css/spacing';
|
|
6
|
+
export * from '@arbor-css/tokens';
|
|
7
|
+
export * from '@arbor-css/typography';
|
|
8
|
+
export * from './arborPreset.js';
|
|
9
|
+
export * from './createArborPreset.js';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,OAAO,EACN,YAAY,EACZ,aAAa,EACb,cAAc,EACd,KAAK,iBAAiB,EACtB,KAAK,YAAY,IAAI,gBAAgB,GACrC,MAAM,oBAAoB,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from '@arbor-css/colors';
|
|
2
|
+
export { $systemProps, createGlobals, defaultGlobals, } from '@arbor-css/globals';
|
|
3
|
+
export * from '@arbor-css/modes';
|
|
4
|
+
export * from '@arbor-css/shadows';
|
|
5
|
+
export * from '@arbor-css/spacing';
|
|
6
|
+
export * from '@arbor-css/tokens';
|
|
7
|
+
export * from '@arbor-css/typography';
|
|
8
|
+
export * from './arborPreset.js';
|
|
9
|
+
export * from './createArborPreset.js';
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,OAAO,EACN,YAAY,EACZ,aAAa,EACb,cAAc,GAGd,MAAM,oBAAoB,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ColorRangeItem, CompiledColors } from '@arbor-css/colors';
|
|
2
|
+
import { GlobalConfig } from '@arbor-css/globals';
|
|
3
|
+
import { CompiledShadows } from '@arbor-css/shadows';
|
|
4
|
+
import { CompiledSpacing } from '@arbor-css/spacing';
|
|
5
|
+
import { Token, TokenSchema } from '@arbor-css/tokens';
|
|
6
|
+
import { CompiledTypography } from '@arbor-css/typography';
|
|
7
|
+
export declare const defaultDefaultScheme = "light";
|
|
8
|
+
export interface PrimitivesConfig<TCompiledColors extends CompiledColors<any, any>, TCompiledTypography extends CompiledTypography<any>, TCompiledSpacing extends CompiledSpacing<any>, TCompiledShadows extends CompiledShadows<any>, TOtherTokens extends TokenSchema = TokenSchema> {
|
|
9
|
+
colors: TCompiledColors;
|
|
10
|
+
typography: TCompiledTypography;
|
|
11
|
+
spacing: TCompiledSpacing;
|
|
12
|
+
shadows: TCompiledShadows;
|
|
13
|
+
misc?: TOtherTokens;
|
|
14
|
+
defaultScheme?: keyof TCompiledColors;
|
|
15
|
+
schemeTags?: Record<string, string>;
|
|
16
|
+
globals?: Partial<GlobalConfig>;
|
|
17
|
+
}
|
|
18
|
+
type LiteralsToTokens<T extends Record<string, any>> = {
|
|
19
|
+
[K in keyof T]: T[K] extends string | number ? Token : T[K] extends Record<string, any> ? LiteralsToTokens<T[K]> : never;
|
|
20
|
+
};
|
|
21
|
+
export interface PrimitivesColorScheme {
|
|
22
|
+
[Color: string]: ColorRangeItem[];
|
|
23
|
+
}
|
|
24
|
+
export type Primitives<TCompiledColors extends CompiledColors<any, any> = CompiledColors<any, any>, TCompiledTypography extends CompiledTypography = CompiledTypography, TCompiledSpacing extends CompiledSpacing = CompiledSpacing, TCompiledShadows extends CompiledShadows = CompiledShadows, TOtherTokens extends TokenSchema = TokenSchema> = {
|
|
25
|
+
/**
|
|
26
|
+
* A map of color values, keyed by scheme name.
|
|
27
|
+
* Each entry is the same structure: a record of color name keys
|
|
28
|
+
* and string values which represent CSS colors.
|
|
29
|
+
*/
|
|
30
|
+
colors: TCompiledColors;
|
|
31
|
+
typography: TCompiledTypography;
|
|
32
|
+
spacing: TCompiledSpacing;
|
|
33
|
+
shadows: TCompiledShadows;
|
|
34
|
+
defaultScheme: keyof TCompiledColors;
|
|
35
|
+
schemeTags: Record<string, string>;
|
|
36
|
+
globals: GlobalConfig;
|
|
37
|
+
$tokens: {
|
|
38
|
+
colors: LiteralsToTokens<TCompiledColors[keyof TCompiledColors]['colors']>;
|
|
39
|
+
typography: LiteralsToTokens<TCompiledTypography['levels']>;
|
|
40
|
+
spacing: LiteralsToTokens<TCompiledSpacing['levels']>;
|
|
41
|
+
shadows: LiteralsToTokens<TCompiledShadows['levels']>;
|
|
42
|
+
} & TOtherTokens;
|
|
43
|
+
};
|
|
44
|
+
export declare function createPrimitives<TCompiledColors extends CompiledColors<any, any>, TCompiledTypography extends CompiledTypography, TCompiledSpacing extends CompiledSpacing, TCompiledShadows extends CompiledShadows, TOtherTokens extends TokenSchema>(config: PrimitivesConfig<TCompiledColors, TCompiledTypography, TCompiledSpacing, TCompiledShadows, TOtherTokens>): Primitives<TCompiledColors, TCompiledTypography, TCompiledSpacing, TCompiledShadows, TOtherTokens>;
|
|
45
|
+
export {};
|
|
46
|
+
//# sourceMappingURL=primitives.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../../src/primitives/primitives.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAkB,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAe,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAqB,MAAM,uBAAuB,CAAC;AAG9E,eAAO,MAAM,oBAAoB,UAAU,CAAC;AAE5C,MAAM,WAAW,gBAAgB,CAChC,eAAe,SAAS,cAAc,CAAC,GAAG,EAAE,GAAG,CAAC,EAChD,mBAAmB,SAAS,kBAAkB,CAAC,GAAG,CAAC,EACnD,gBAAgB,SAAS,eAAe,CAAC,GAAG,CAAC,EAC7C,gBAAgB,SAAS,eAAe,CAAC,GAAG,CAAC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AM,eAAe,CAAC;IACrC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,OAAO,EAAE,YAAY,CAAC;IACtB,OAAO,EAAE;QACR,MAAM,EAAE,gBAAgB,CAAC,eAAe,CAAC,MAAM,eAAe,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC3E,UAAU,EAAE,gBAAgB,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC5D,OAAO,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAC;QACtD,OAAO,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAC;KACtD,GAAG,YAAY,CAAC;CACjB,CAAC;AAEF,wBAAgB,gBAAgB,CAC/B,eAAe,SAAS,cAAc,CAAC,GAAG,EAAE,GAAG,CAAC,EAChD,mBAAmB,SAAS,kBAAkB,EAC9C,gBAAgB,SAAS,eAAe,EACxC,gBAAgB,SAAS,eAAe,EACxC,YAAY,SAAS,WAAW,EAEhC,MAAM,EAAE,gBAAgB,CACvB,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,CACZ,GACC,UAAU,CACZ,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,CACZ,CAgGA"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { defaultGlobals } from '@arbor-css/globals';
|
|
2
|
+
import { createToken } from '@arbor-css/tokens';
|
|
3
|
+
import { isTypographyLevel } from '@arbor-css/typography';
|
|
4
|
+
import { convertStructure } from '../util/convertStructure.js';
|
|
5
|
+
export const defaultDefaultScheme = 'light';
|
|
6
|
+
export function createPrimitives(config) {
|
|
7
|
+
const { colors, defaultScheme, globals: userGlobals } = config;
|
|
8
|
+
const arbitraryScheme = Object.values(colors)[0];
|
|
9
|
+
if (!arbitraryScheme) {
|
|
10
|
+
throw new Error('At least one color scheme must be defined in primitives');
|
|
11
|
+
}
|
|
12
|
+
// TODO: validate all scheme shapes are the same...
|
|
13
|
+
const $colorProps = convertStructure(arbitraryScheme.colors, (item) => typeof item === 'string', (_, path) => createToken(path.join('-'), {
|
|
14
|
+
type: 'color',
|
|
15
|
+
purpose: 'color',
|
|
16
|
+
group: path.slice(0, -1).join('-'),
|
|
17
|
+
tag: '🎨',
|
|
18
|
+
}));
|
|
19
|
+
const $typographyProps = convertStructure(config.typography.levels, isTypographyLevel, (_, path) => ({
|
|
20
|
+
size: createToken(`typography-${path.join('-')}-size`, {
|
|
21
|
+
type: 'length',
|
|
22
|
+
purpose: 'font-size',
|
|
23
|
+
group: path.join('-'),
|
|
24
|
+
tag: '🅰️',
|
|
25
|
+
}),
|
|
26
|
+
weight: createToken(`typography-${path.join('-')}-weight`, {
|
|
27
|
+
type: '*',
|
|
28
|
+
purpose: 'font-weight',
|
|
29
|
+
group: path.join('-'),
|
|
30
|
+
tag: '🅰️',
|
|
31
|
+
}),
|
|
32
|
+
lineHeight: createToken(`typography-${path.join('-')}-line-height`, {
|
|
33
|
+
type: '*',
|
|
34
|
+
purpose: 'line-height',
|
|
35
|
+
group: path.join('-'),
|
|
36
|
+
tag: '🅰️',
|
|
37
|
+
}),
|
|
38
|
+
}));
|
|
39
|
+
const $spacingProps = convertStructure(config.spacing.levels, (value) => typeof value === 'string' || typeof value === 'number', (_, path) => createToken(`spacing-${path.join('-')}`, {
|
|
40
|
+
type: 'length',
|
|
41
|
+
purpose: 'spacing',
|
|
42
|
+
tag: 's',
|
|
43
|
+
}));
|
|
44
|
+
const $shadowProps = convertStructure(config.shadows.levels, (value) => typeof value === 'string' || typeof value === 'number', (_, path) => createToken(`shadow-${path.join('-')}`, {
|
|
45
|
+
type: '*',
|
|
46
|
+
purpose: 'shadow',
|
|
47
|
+
tag: '🌫️',
|
|
48
|
+
}));
|
|
49
|
+
const globals = {
|
|
50
|
+
...defaultGlobals,
|
|
51
|
+
...userGlobals,
|
|
52
|
+
};
|
|
53
|
+
const schemeTags = {
|
|
54
|
+
light: '☀️',
|
|
55
|
+
dark: '🌑',
|
|
56
|
+
...config.schemeTags,
|
|
57
|
+
};
|
|
58
|
+
return {
|
|
59
|
+
defaultScheme: defaultScheme ?? defaultDefaultScheme,
|
|
60
|
+
schemeTags,
|
|
61
|
+
globals,
|
|
62
|
+
colors,
|
|
63
|
+
typography: config.typography,
|
|
64
|
+
spacing: config.spacing,
|
|
65
|
+
shadows: config.shadows,
|
|
66
|
+
$tokens: {
|
|
67
|
+
...(config.misc ?? {}),
|
|
68
|
+
colors: $colorProps,
|
|
69
|
+
typography: $typographyProps,
|
|
70
|
+
spacing: $spacingProps,
|
|
71
|
+
shadows: $shadowProps,
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=primitives.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"primitives.js","sourceRoot":"","sources":["../../src/primitives/primitives.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAgB,MAAM,oBAAoB,CAAC;AAGlE,OAAO,EAAE,WAAW,EAAsB,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAsB,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE/D,MAAM,CAAC,MAAM,oBAAoB,GAAG,OAAO,CAAC;AAwD5C,MAAM,UAAU,gBAAgB,CAO/B,MAMC;IAQD,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,MAAM,CAAC;IAE/D,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IACjD,IAAI,CAAC,eAAe,EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;IAC5E,CAAC;IACD,mDAAmD;IACnD,MAAM,W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5B,OAAO,EAAE,aAAa;YACtB,OAAO,EAAE,YAAY;SACrB;KACD,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Walk an object structure and convert matching items using the supplied
|
|
3
|
+
* function.
|
|
4
|
+
*/
|
|
5
|
+
export declare function convertStructure<In, Out>(input: any, matchConvertedItem: (item: any, path: (string | number)[]) => item is In, convert: (item: In, path: (string | number)[]) => Out, { path, ...options }?: {
|
|
6
|
+
path?: (string | number)[];
|
|
7
|
+
}): any;
|
|
8
|
+
//# sourceMappingURL=convertStructure.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convertStructure.d.ts","sourceRoot":"","sources":["../../src/util/convertStructure.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,GAAG,EACvC,KAAK,EAAE,GAAG,EACV,kBAAkB,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,KAAK,IAAI,IAAI,EAAE,EACxE,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,KAAK,GAAG,EACrD,EACC,IAAS,EACT,GAAG,OAAO,EACV,GAAE;IACF,IAAI,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;CACtB,GACJ,GAAG,CAuBL"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Walk an object structure and convert matching items using the supplied
|
|
3
|
+
* function.
|
|
4
|
+
*/
|
|
5
|
+
export function convertStructure(input, matchConvertedItem, convert, { path = [], ...options } = {}) {
|
|
6
|
+
path ?? (path = []);
|
|
7
|
+
if (matchConvertedItem(input, path)) {
|
|
8
|
+
return convert(input, path);
|
|
9
|
+
}
|
|
10
|
+
else if (Array.isArray(input)) {
|
|
11
|
+
return input.map((item, index) => convertStructure(item, matchConvertedItem, convert, {
|
|
12
|
+
path: [...path, index],
|
|
13
|
+
...options,
|
|
14
|
+
}));
|
|
15
|
+
}
|
|
16
|
+
else if (typeof input === 'object' && input !== null) {
|
|
17
|
+
const output = {};
|
|
18
|
+
for (const key in input) {
|
|
19
|
+
output[key] = convertStructure(input[key], matchConvertedItem, convert, {
|
|
20
|
+
path: [...path, key],
|
|
21
|
+
...options,
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
return output;
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
return input;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=convertStructure.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convertStructure.js","sourceRoot":"","sources":["../../src/util/convertStructure.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAC/B,KAAU,EACV,kBAAwE,EACxE,OAAqD,EACrD,EACC,IAAI,GAAG,EAAE,EACT,GAAG,OAAO,KAGP,EAAE;IAEN,IAAI,KAAJ,IAAI,GAAK,EAAE,EAAC;IACZ,IAAI,kBAAkB,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC;QACrC,OAAO,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAC7B,CAAC;SAAM,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACjC,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAChC,gBAAgB,CAAC,IAAI,EAAE,kBAAkB,EAAE,OAAO,EAAE;YACnD,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC;YACtB,GAAG,OAAO;SACV,CAAC,CACF,CAAC;IACH,CAAC;SAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QACxD,MAAM,MAAM,GAAwB,EAAE,CAAC;QACvC,KAAK,MAAM,GAAG,IAAI,KAAK,EAAE,CAAC;YACzB,MAAM,CAAC,GAAG,CAAC,GAAG,gBAAgB,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,kBAAkB,EAAE,OAAO,EAAE;gBACvE,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,CAAC;gBACpB,GAAG,OAAO;aACV,CAAC,CAAC;QACJ,CAAC;QACD,OAAO,MAAM,CAAC;IACf,CAAC;SAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACd,CAAC;AACF,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@arbor-css/preset",
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "public"
|
|
7
|
+
},
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"development": "./src/index.ts",
|
|
14
|
+
"import": "./dist/index.js",
|
|
15
|
+
"node": "./dist/index.js",
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"default": "./dist/index.js"
|
|
18
|
+
},
|
|
19
|
+
"./config": {
|
|
20
|
+
"development": "./src/config.ts",
|
|
21
|
+
"import": "./dist/config.js",
|
|
22
|
+
"node": "./dist/config.js",
|
|
23
|
+
"types": "./dist/config.d.ts",
|
|
24
|
+
"default": "./dist/config.js"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"sideEffects": false,
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"typescript": "^6.0.3"
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@arbor-css/colors": "0.0.2",
|
|
33
|
+
"@arbor-css/modes": "0.0.2",
|
|
34
|
+
"@arbor-css/globals": "0.0.2",
|
|
35
|
+
"@arbor-css/primitives": "0.0.2",
|
|
36
|
+
"@arbor-css/shadows": "0.0.2",
|
|
37
|
+
"@arbor-css/spacing": "0.0.2",
|
|
38
|
+
"@arbor-css/typography": "0.0.2",
|
|
39
|
+
"@arbor-css/tokens": "0.0.2"
|
|
40
|
+
},
|
|
41
|
+
"scripts": {
|
|
42
|
+
"build": "tsc",
|
|
43
|
+
"dev": "tsc -w --preserveWatchOutput"
|
|
44
|
+
}
|
|
45
|
+
}
|