@vllnt/ui-core 0.1.0-canary.100.shabd406b0b1cdb

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.
@@ -0,0 +1,435 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "VLLNT UI design tokens",
4
+ "type": "object",
5
+ "required": [
6
+ "name",
7
+ "version",
8
+ "source",
9
+ "color",
10
+ "brand",
11
+ "typography",
12
+ "spacing",
13
+ "radius",
14
+ "size",
15
+ "opacity",
16
+ "elevation",
17
+ "shadow",
18
+ "blur",
19
+ "material",
20
+ "depth",
21
+ "motion",
22
+ "iconography",
23
+ "themes"
24
+ ],
25
+ "properties": {
26
+ "$schema": { "type": "string" },
27
+ "name": { "const": "VLLNT UI" },
28
+ "version": { "type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$" },
29
+ "source": {
30
+ "type": "object",
31
+ "required": ["guide", "theme"],
32
+ "properties": {
33
+ "guide": { "type": "string" },
34
+ "theme": { "type": "string" }
35
+ },
36
+ "additionalProperties": false
37
+ },
38
+ "color": {
39
+ "type": "object",
40
+ "required": ["format", "semantic"],
41
+ "properties": {
42
+ "format": { "const": "oklch-channel" },
43
+ "semantic": {
44
+ "type": "object",
45
+ "minProperties": 1,
46
+ "additionalProperties": { "$ref": "#/$defs/semanticColor" }
47
+ },
48
+ "border-strong": { "$ref": "#/$defs/modeColor" },
49
+ "glass-border": { "$ref": "#/$defs/modeColor" },
50
+ "glass-input": { "$ref": "#/$defs/modeColor" },
51
+ "glass-muted-foreground": { "$ref": "#/$defs/modeColor" },
52
+ "badge-label": { "$ref": "#/$defs/tokenGroup" }
53
+ },
54
+ "additionalProperties": false
55
+ },
56
+ "brand": {
57
+ "type": "object",
58
+ "required": ["status"],
59
+ "properties": {
60
+ "status": { "$ref": "#/$defs/tokenGroup" }
61
+ },
62
+ "additionalProperties": false
63
+ },
64
+ "typography": {
65
+ "type": "object",
66
+ "required": ["fontFamily", "fontWeight", "scale"],
67
+ "properties": {
68
+ "fontFamily": {
69
+ "type": "object",
70
+ "additionalProperties": { "$ref": "#/$defs/fontFamily" }
71
+ },
72
+ "fontWeight": {
73
+ "type": "object",
74
+ "additionalProperties": { "$ref": "#/$defs/fontWeight" }
75
+ },
76
+ "scale": {
77
+ "type": "object",
78
+ "additionalProperties": { "$ref": "#/$defs/typeScale" }
79
+ }
80
+ },
81
+ "additionalProperties": false
82
+ },
83
+ "spacing": {
84
+ "type": "object",
85
+ "required": [
86
+ "unit",
87
+ "scale",
88
+ "page-gutter",
89
+ "page-gutter-tablet",
90
+ "page-gutter-desktop"
91
+ ],
92
+ "properties": {
93
+ "unit": { "$ref": "#/$defs/cssLength" },
94
+ "scale": { "$ref": "#/$defs/stringMap" },
95
+ "page-gutter": { "$ref": "#/$defs/token" },
96
+ "page-gutter-tablet": { "$ref": "#/$defs/token" },
97
+ "page-gutter-desktop": { "$ref": "#/$defs/token" }
98
+ },
99
+ "additionalProperties": false
100
+ },
101
+ "radius": { "$ref": "#/$defs/stringMap" },
102
+ "size": { "$ref": "#/$defs/tokenGroup" },
103
+ "opacity": { "$ref": "#/$defs/tokenGroup" },
104
+ "elevation": {
105
+ "description": "Deprecated (see deprecated): read shadow.raised in place of sm, and shadow.overlay in place of md and lg. Stays for every 0.x release.",
106
+ "$ref": "#/$defs/stringMap"
107
+ },
108
+ "deprecated": {
109
+ "description": "Deprecation notes by token path (elevation.sm). The token keeps its shape and value; the note says what to read instead.",
110
+ "type": "object",
111
+ "propertyNames": { "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$" },
112
+ "additionalProperties": { "type": "string", "pattern": "^Deprecated: " }
113
+ },
114
+ "shadow": {
115
+ "type": "object",
116
+ "minProperties": 1,
117
+ "additionalProperties": { "$ref": "#/$defs/shadowToken" }
118
+ },
119
+ "blur": {
120
+ "type": "object",
121
+ "required": ["glass"],
122
+ "properties": { "glass": { "$ref": "#/$defs/tokenGroup" } },
123
+ "additionalProperties": false
124
+ },
125
+ "material": {
126
+ "type": "object",
127
+ "required": ["glass", "highlight", "solid"],
128
+ "properties": {
129
+ "glass": {
130
+ "type": "object",
131
+ "minProperties": 1,
132
+ "additionalProperties": {
133
+ "oneOf": [
134
+ { "$ref": "#/$defs/token" },
135
+ { "$ref": "#/$defs/tokenGroup" },
136
+ { "$ref": "#/$defs/modeToken" }
137
+ ]
138
+ }
139
+ },
140
+ "highlight": {
141
+ "type": "object",
142
+ "required": ["top"],
143
+ "properties": { "top": { "$ref": "#/$defs/modeColor" } },
144
+ "additionalProperties": false
145
+ },
146
+ "solid": {
147
+ "type": "object",
148
+ "minProperties": 1,
149
+ "propertyNames": { "pattern": "^[a-z][a-z0-9.-]*$" },
150
+ "additionalProperties": { "type": "string", "minLength": 1 }
151
+ }
152
+ },
153
+ "additionalProperties": false
154
+ },
155
+ "depth": {
156
+ "type": "object",
157
+ "minProperties": 1,
158
+ "propertyNames": { "pattern": "^z-[0-9]+$" },
159
+ "additionalProperties": {
160
+ "type": "object",
161
+ "required": ["border", "surface", "offset", "shadow", "tint"],
162
+ "properties": {
163
+ "border": { "$ref": "#/$defs/token" },
164
+ "surface": { "$ref": "#/$defs/token" },
165
+ "offset": { "$ref": "#/$defs/token" },
166
+ "shadow": { "$ref": "#/$defs/token" },
167
+ "tint": { "$ref": "#/$defs/token" }
168
+ },
169
+ "additionalProperties": false
170
+ }
171
+ },
172
+ "motion": {
173
+ "type": "object",
174
+ "required": ["duration", "easing", "press", "raise", "reducedMotion"],
175
+ "properties": {
176
+ "duration": { "$ref": "#/$defs/stringMap" },
177
+ "easing": { "$ref": "#/$defs/stringMap" },
178
+ "press": { "$ref": "#/$defs/motionToken" },
179
+ "raise": { "$ref": "#/$defs/motionToken" },
180
+ "reducedMotion": { "type": "string", "minLength": 1 }
181
+ },
182
+ "additionalProperties": false
183
+ },
184
+ "iconography": {
185
+ "type": "object",
186
+ "required": ["library", "size", "strokeWidth", "color"],
187
+ "properties": {
188
+ "library": { "type": "string", "minLength": 1 },
189
+ "size": { "$ref": "#/$defs/stringMap" },
190
+ "strokeWidth": { "type": "number", "exclusiveMinimum": 0 },
191
+ "color": { "type": "string", "minLength": 1 }
192
+ },
193
+ "additionalProperties": false
194
+ },
195
+ "themes": {
196
+ "type": "object",
197
+ "minProperties": 1,
198
+ "propertyNames": { "pattern": "^[a-z][a-z0-9]*$" },
199
+ "additionalProperties": { "$ref": "#/$defs/theme" }
200
+ }
201
+ },
202
+ "$defs": {
203
+ "cssLength": {
204
+ "type": "string",
205
+ "pattern": "^-?[0-9]+(?:\\.[0-9]+)?(?:px|rem|em|%)$"
206
+ },
207
+ "cssVariable": {
208
+ "type": "string",
209
+ "pattern": "^--[a-z][a-z0-9-]*$"
210
+ },
211
+ "fontFamily": {
212
+ "type": "object",
213
+ "required": ["cssVariable", "value", "role"],
214
+ "properties": {
215
+ "cssVariable": { "$ref": "#/$defs/cssVariable" },
216
+ "value": { "type": "string", "minLength": 1 },
217
+ "role": { "type": "string", "minLength": 1 }
218
+ },
219
+ "additionalProperties": false
220
+ },
221
+ "fontWeight": {
222
+ "type": "object",
223
+ "required": ["value"],
224
+ "properties": {
225
+ "cssVariable": { "$ref": "#/$defs/cssVariable" },
226
+ "value": { "type": "integer", "minimum": 1, "maximum": 1000 },
227
+ "role": { "type": "string", "minLength": 1 }
228
+ },
229
+ "additionalProperties": false
230
+ },
231
+ "oklchChannel": {
232
+ "type": "string",
233
+ "pattern": "^(?:0(?:\\.[0-9]+)?|1(?:\\.0+)?) (?:0(?:\\.[0-9]+)?|1(?:\\.0+)?) -?[0-9]+(?:\\.[0-9]+)?$"
234
+ },
235
+ "hexAlphaColor": {
236
+ "type": "string",
237
+ "pattern": "^#[0-9A-F]{8}$"
238
+ },
239
+ "opacityValue": {
240
+ "type": "string",
241
+ "pattern": "^(?:0(?:\\.[0-9]+)?|1(?:\\.0+)?)$"
242
+ },
243
+ "modeToken": {
244
+ "type": "object",
245
+ "required": ["light", "dark", "role"],
246
+ "properties": {
247
+ "light": { "$ref": "#/$defs/modeValue" },
248
+ "dark": { "$ref": "#/$defs/modeValue" },
249
+ "role": { "type": "string", "minLength": 1 }
250
+ },
251
+ "additionalProperties": false
252
+ },
253
+ "modeValue": {
254
+ "oneOf": [
255
+ { "$ref": "#/$defs/oklchChannel" },
256
+ { "$ref": "#/$defs/hexAlphaColor" },
257
+ { "$ref": "#/$defs/opacityValue" }
258
+ ]
259
+ },
260
+ "modeColor": {
261
+ "type": "object",
262
+ "required": ["light", "dark", "role"],
263
+ "properties": {
264
+ "light": {
265
+ "oneOf": [
266
+ { "$ref": "#/$defs/oklchChannel" },
267
+ { "$ref": "#/$defs/hexAlphaColor" }
268
+ ]
269
+ },
270
+ "dark": {
271
+ "oneOf": [
272
+ { "$ref": "#/$defs/oklchChannel" },
273
+ { "$ref": "#/$defs/hexAlphaColor" }
274
+ ]
275
+ },
276
+ "role": { "type": "string", "minLength": 1 }
277
+ },
278
+ "additionalProperties": false
279
+ },
280
+ "semanticColor": {
281
+ "type": "object",
282
+ "required": ["cssVariable", "light", "dark", "role"],
283
+ "properties": {
284
+ "cssVariable": { "$ref": "#/$defs/cssVariable" },
285
+ "light": { "$ref": "#/$defs/oklchChannel" },
286
+ "dark": { "$ref": "#/$defs/oklchChannel" },
287
+ "role": { "type": "string", "minLength": 1 }
288
+ },
289
+ "additionalProperties": false
290
+ },
291
+ "motionToken": {
292
+ "type": "object",
293
+ "required": ["duration", "easing", "role"],
294
+ "properties": {
295
+ "duration": { "type": "string", "pattern": "^\\{motion\\.duration\\.[a-z]+\\}$" },
296
+ "easing": { "type": "string", "pattern": "^\\{motion\\.easing\\.[a-z]+\\}$" },
297
+ "role": { "type": "string", "minLength": 1 }
298
+ },
299
+ "additionalProperties": false
300
+ },
301
+ "stringMap": {
302
+ "type": "object",
303
+ "minProperties": 1,
304
+ "additionalProperties": { "type": "string", "minLength": 1 }
305
+ },
306
+ "token": {
307
+ "type": "object",
308
+ "required": ["value", "role"],
309
+ "properties": {
310
+ "value": { "type": "string", "minLength": 1 },
311
+ "coarse": {
312
+ "type": "string",
313
+ "pattern": "^\\{[a-z][a-z0-9.-]*\\}$"
314
+ },
315
+ "role": { "type": "string", "minLength": 1 }
316
+ },
317
+ "additionalProperties": false
318
+ },
319
+ "shadowLayer": {
320
+ "type": "object",
321
+ "required": ["offsetX", "offsetY", "blur", "spread", "color", "inset"],
322
+ "properties": {
323
+ "offsetX": { "type": "string", "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$" },
324
+ "offsetY": { "type": "string", "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$" },
325
+ "blur": { "type": "string", "pattern": "^[0-9]+(?:\\.[0-9]+)?$" },
326
+ "spread": { "type": "string", "pattern": "^-?[0-9]+(?:\\.[0-9]+)?$" },
327
+ "color": { "type": "string", "pattern": "^#[0-9A-F]{8}$" },
328
+ "inset": { "type": "boolean" }
329
+ },
330
+ "additionalProperties": false
331
+ },
332
+ "shadowToken": {
333
+ "type": "object",
334
+ "required": ["role", "light", "dark"],
335
+ "properties": {
336
+ "role": { "type": "string", "minLength": 1 },
337
+ "light": {
338
+ "type": "array",
339
+ "description": "Layers drawn in light mode. An empty list is no shadow.",
340
+ "items": { "$ref": "#/$defs/shadowLayer" }
341
+ },
342
+ "dark": {
343
+ "type": "array",
344
+ "description": "Layers drawn in dark mode. An empty list is no shadow.",
345
+ "items": { "$ref": "#/$defs/shadowLayer" }
346
+ }
347
+ },
348
+ "additionalProperties": false
349
+ },
350
+ "tokenGroup": {
351
+ "type": "object",
352
+ "minProperties": 1,
353
+ "additionalProperties": {
354
+ "oneOf": [
355
+ { "$ref": "#/$defs/token" },
356
+ { "$ref": "#/$defs/tokenGroup" }
357
+ ]
358
+ }
359
+ },
360
+ "themeColors": {
361
+ "type": "object",
362
+ "minProperties": 1,
363
+ "additionalProperties": { "$ref": "#/$defs/oklchChannel" }
364
+ },
365
+ "themeTypeScale": {
366
+ "type": "object",
367
+ "minProperties": 1,
368
+ "properties": {
369
+ "fontSize": { "$ref": "#/$defs/cssLength" },
370
+ "lineHeight": { "type": "string", "pattern": "^[0-9]+(?:\\.[0-9]+)?$" }
371
+ },
372
+ "additionalProperties": false
373
+ },
374
+ "theme": {
375
+ "type": "object",
376
+ "required": ["label", "description"],
377
+ "properties": {
378
+ "label": { "type": "string", "minLength": 1 },
379
+ "description": { "type": "string", "minLength": 1 },
380
+ "defaultMode": { "enum": ["light", "dark"] },
381
+ "color": {
382
+ "type": "object",
383
+ "required": ["light", "dark"],
384
+ "properties": {
385
+ "light": { "$ref": "#/$defs/themeColors" },
386
+ "dark": { "$ref": "#/$defs/themeColors" }
387
+ },
388
+ "additionalProperties": false
389
+ },
390
+ "typography": {
391
+ "type": "object",
392
+ "minProperties": 1,
393
+ "properties": {
394
+ "fontFamily": { "$ref": "#/$defs/stringMap" },
395
+ "fontWeight": {
396
+ "type": "object",
397
+ "minProperties": 1,
398
+ "additionalProperties": {
399
+ "type": "integer",
400
+ "minimum": 1,
401
+ "maximum": 1000
402
+ }
403
+ },
404
+ "scale": {
405
+ "type": "object",
406
+ "minProperties": 1,
407
+ "additionalProperties": { "$ref": "#/$defs/themeTypeScale" }
408
+ }
409
+ },
410
+ "additionalProperties": false
411
+ },
412
+ "radius": { "$ref": "#/$defs/stringMap" },
413
+ "opacity": { "$ref": "#/$defs/stringMap" }
414
+ },
415
+ "additionalProperties": false
416
+ },
417
+ "typeScale": {
418
+ "type": "object",
419
+ "required": [
420
+ "cssVariable",
421
+ "fontSize",
422
+ "lineHeight",
423
+ "lineHeightCssVariable"
424
+ ],
425
+ "properties": {
426
+ "cssVariable": { "$ref": "#/$defs/cssVariable" },
427
+ "fontSize": { "$ref": "#/$defs/cssLength" },
428
+ "lineHeight": { "type": "string", "pattern": "^[0-9]+(?:\\.[0-9]+)?$" },
429
+ "lineHeightCssVariable": { "$ref": "#/$defs/cssVariable" }
430
+ },
431
+ "additionalProperties": false
432
+ }
433
+ },
434
+ "additionalProperties": false
435
+ }