@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.
- package/CHANGELOG.md +108 -0
- package/LICENSE +21 -0
- package/README.md +90 -0
- package/component-contracts.json +208 -0
- package/component-contracts.schema.json +136 -0
- package/dist/chunk-25M4DIJU.js +570 -0
- package/dist/index.d.ts +1857 -0
- package/dist/index.js +1973 -0
- package/dist/theme-ChrZM15o.d.ts +612 -0
- package/dist/theme.d.ts +1 -0
- package/dist/theme.js +10 -0
- package/llms.txt +14 -0
- package/package.json +79 -0
- package/tokens.json +834 -0
- package/tokens.schema.json +435 -0
|
@@ -0,0 +1,612 @@
|
|
|
1
|
+
/** Tokens resolved to React Native units: sRGB colors, points, native shadows. */
|
|
2
|
+
declare const nativeTokens: {
|
|
3
|
+
readonly color: {
|
|
4
|
+
readonly dark: {
|
|
5
|
+
readonly background: "#050505";
|
|
6
|
+
readonly foreground: "#ffffff";
|
|
7
|
+
readonly card: "#0a0a0a";
|
|
8
|
+
readonly cardForeground: "#ffffff";
|
|
9
|
+
readonly popover: "#0a0a0a";
|
|
10
|
+
readonly popoverForeground: "#ededed";
|
|
11
|
+
readonly primary: "#ffffff";
|
|
12
|
+
readonly primaryForeground: "#000000";
|
|
13
|
+
readonly secondary: "#262626";
|
|
14
|
+
readonly secondaryForeground: "#ededed";
|
|
15
|
+
readonly muted: "#262626";
|
|
16
|
+
readonly mutedForeground: "#a3a3a3";
|
|
17
|
+
readonly accent: "#262626";
|
|
18
|
+
readonly accentForeground: "#ededed";
|
|
19
|
+
readonly destructive: "#fa6961";
|
|
20
|
+
readonly destructiveForeground: "#171717";
|
|
21
|
+
readonly success: "#4ed589";
|
|
22
|
+
readonly successForeground: "#171717";
|
|
23
|
+
readonly warning: "#f0bb3b";
|
|
24
|
+
readonly warningForeground: "#171717";
|
|
25
|
+
readonly info: "#65b2f1";
|
|
26
|
+
readonly infoForeground: "#171717";
|
|
27
|
+
readonly diffAdded: "#102b17";
|
|
28
|
+
readonly diffRemoved: "#3b1816";
|
|
29
|
+
readonly border: "#262626";
|
|
30
|
+
readonly input: "#696969";
|
|
31
|
+
readonly ring: "#d4d4d4";
|
|
32
|
+
readonly sidebar: "#000000";
|
|
33
|
+
readonly pill: "#000000";
|
|
34
|
+
readonly pillBorder: "#262626";
|
|
35
|
+
readonly composerBorder: "#2a2a2a";
|
|
36
|
+
readonly statusNeedsYou: "#eab305";
|
|
37
|
+
readonly statusUnread: "#3b82f6";
|
|
38
|
+
readonly statusFailed: "#ef4444";
|
|
39
|
+
readonly statusDone: "#00c950";
|
|
40
|
+
readonly statusRing: "#a3a3a3";
|
|
41
|
+
};
|
|
42
|
+
readonly light: {
|
|
43
|
+
readonly background: "#ffffff";
|
|
44
|
+
readonly foreground: "#000000";
|
|
45
|
+
readonly card: "#ffffff";
|
|
46
|
+
readonly cardForeground: "#000000";
|
|
47
|
+
readonly popover: "#ffffff";
|
|
48
|
+
readonly popoverForeground: "#000000";
|
|
49
|
+
readonly primary: "#000000";
|
|
50
|
+
readonly primaryForeground: "#ffffff";
|
|
51
|
+
readonly secondary: "#f5f5f5";
|
|
52
|
+
readonly secondaryForeground: "#171717";
|
|
53
|
+
readonly muted: "#f5f5f5";
|
|
54
|
+
readonly mutedForeground: "#6a6a6a";
|
|
55
|
+
readonly accent: "#f5f5f5";
|
|
56
|
+
readonly accentForeground: "#171717";
|
|
57
|
+
readonly destructive: "#cf1f29";
|
|
58
|
+
readonly destructiveForeground: "#fafafa";
|
|
59
|
+
readonly success: "#1e7546";
|
|
60
|
+
readonly successForeground: "#fafafa";
|
|
61
|
+
readonly warning: "#825a27";
|
|
62
|
+
readonly warningForeground: "#fafafa";
|
|
63
|
+
readonly info: "#1762b6";
|
|
64
|
+
readonly infoForeground: "#fafafa";
|
|
65
|
+
readonly diffAdded: "#d9f3dd";
|
|
66
|
+
readonly diffRemoved: "#ffe4e1";
|
|
67
|
+
readonly border: "#e5e5e5";
|
|
68
|
+
readonly input: "#858585";
|
|
69
|
+
readonly ring: "#0a0a0a";
|
|
70
|
+
readonly sidebar: "#fafafa";
|
|
71
|
+
readonly pill: "#f5f5f5";
|
|
72
|
+
readonly pillBorder: "#e5e5e5";
|
|
73
|
+
readonly composerBorder: "#d4d4d4";
|
|
74
|
+
readonly statusNeedsYou: "#a65f00";
|
|
75
|
+
readonly statusUnread: "#2563eb";
|
|
76
|
+
readonly statusFailed: "#dc2626";
|
|
77
|
+
readonly statusDone: "#15803d";
|
|
78
|
+
readonly statusRing: "#737373";
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
readonly depth: {
|
|
82
|
+
readonly dark: {
|
|
83
|
+
readonly "z-0": {
|
|
84
|
+
readonly border: "#262626";
|
|
85
|
+
readonly offset: 0;
|
|
86
|
+
readonly shadow: {
|
|
87
|
+
readonly elevation: 0;
|
|
88
|
+
readonly shadowColor: "#000000";
|
|
89
|
+
readonly shadowOffset: {
|
|
90
|
+
readonly height: 0;
|
|
91
|
+
readonly width: 0;
|
|
92
|
+
};
|
|
93
|
+
readonly shadowOpacity: 0;
|
|
94
|
+
readonly shadowRadius: 0;
|
|
95
|
+
};
|
|
96
|
+
readonly surface: "#050505";
|
|
97
|
+
readonly tint: 0.82;
|
|
98
|
+
};
|
|
99
|
+
readonly "z-1": {
|
|
100
|
+
readonly border: "#262626";
|
|
101
|
+
readonly offset: 2;
|
|
102
|
+
readonly shadow: {
|
|
103
|
+
readonly elevation: 0;
|
|
104
|
+
readonly shadowColor: "#000000";
|
|
105
|
+
readonly shadowOffset: {
|
|
106
|
+
readonly height: 0;
|
|
107
|
+
readonly width: 0;
|
|
108
|
+
};
|
|
109
|
+
readonly shadowOpacity: 0;
|
|
110
|
+
readonly shadowRadius: 0;
|
|
111
|
+
};
|
|
112
|
+
readonly surface: "#0a0a0a";
|
|
113
|
+
readonly tint: 0.82;
|
|
114
|
+
};
|
|
115
|
+
readonly "z-2": {
|
|
116
|
+
readonly border: "#262626";
|
|
117
|
+
readonly offset: 8;
|
|
118
|
+
readonly shadow: {
|
|
119
|
+
readonly elevation: 0;
|
|
120
|
+
readonly shadowColor: "#000000";
|
|
121
|
+
readonly shadowOffset: {
|
|
122
|
+
readonly height: 0;
|
|
123
|
+
readonly width: 0;
|
|
124
|
+
};
|
|
125
|
+
readonly shadowOpacity: 0;
|
|
126
|
+
readonly shadowRadius: 0;
|
|
127
|
+
};
|
|
128
|
+
readonly surface: "#0a0a0a";
|
|
129
|
+
readonly tint: 0.82;
|
|
130
|
+
};
|
|
131
|
+
readonly "z-3": {
|
|
132
|
+
readonly border: "#3a3a3a";
|
|
133
|
+
readonly offset: 16;
|
|
134
|
+
readonly shadow: {
|
|
135
|
+
readonly elevation: 0;
|
|
136
|
+
readonly shadowColor: "#000000";
|
|
137
|
+
readonly shadowOffset: {
|
|
138
|
+
readonly height: 0;
|
|
139
|
+
readonly width: 0;
|
|
140
|
+
};
|
|
141
|
+
readonly shadowOpacity: 0;
|
|
142
|
+
readonly shadowRadius: 0;
|
|
143
|
+
};
|
|
144
|
+
readonly surface: "#0a0a0a";
|
|
145
|
+
readonly tint: 0.9;
|
|
146
|
+
};
|
|
147
|
+
readonly "z-4": {
|
|
148
|
+
readonly border: "#3a3a3a";
|
|
149
|
+
readonly offset: 32;
|
|
150
|
+
readonly shadow: {
|
|
151
|
+
readonly elevation: 0;
|
|
152
|
+
readonly shadowColor: "#000000";
|
|
153
|
+
readonly shadowOffset: {
|
|
154
|
+
readonly height: 0;
|
|
155
|
+
readonly width: 0;
|
|
156
|
+
};
|
|
157
|
+
readonly shadowOpacity: 0;
|
|
158
|
+
readonly shadowRadius: 0;
|
|
159
|
+
};
|
|
160
|
+
readonly surface: "#0a0a0a";
|
|
161
|
+
readonly tint: 0.9;
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
readonly light: {
|
|
165
|
+
readonly "z-0": {
|
|
166
|
+
readonly border: "#e5e5e5";
|
|
167
|
+
readonly offset: 0;
|
|
168
|
+
readonly shadow: {
|
|
169
|
+
readonly elevation: 0;
|
|
170
|
+
readonly shadowColor: "#000000";
|
|
171
|
+
readonly shadowOffset: {
|
|
172
|
+
readonly height: 0;
|
|
173
|
+
readonly width: 0;
|
|
174
|
+
};
|
|
175
|
+
readonly shadowOpacity: 0;
|
|
176
|
+
readonly shadowRadius: 0;
|
|
177
|
+
};
|
|
178
|
+
readonly surface: "#ffffff";
|
|
179
|
+
readonly tint: 0.82;
|
|
180
|
+
};
|
|
181
|
+
readonly "z-1": {
|
|
182
|
+
readonly border: "#e5e5e5";
|
|
183
|
+
readonly offset: 2;
|
|
184
|
+
readonly shadow: {
|
|
185
|
+
readonly elevation: 0;
|
|
186
|
+
readonly shadowColor: "#000000";
|
|
187
|
+
readonly shadowOffset: {
|
|
188
|
+
readonly height: 0;
|
|
189
|
+
readonly width: 0;
|
|
190
|
+
};
|
|
191
|
+
readonly shadowOpacity: 0;
|
|
192
|
+
readonly shadowRadius: 0;
|
|
193
|
+
};
|
|
194
|
+
readonly surface: "#ffffff";
|
|
195
|
+
readonly tint: 0.82;
|
|
196
|
+
};
|
|
197
|
+
readonly "z-2": {
|
|
198
|
+
readonly border: "#e5e5e5";
|
|
199
|
+
readonly offset: 8;
|
|
200
|
+
readonly shadow: {
|
|
201
|
+
readonly elevation: 0;
|
|
202
|
+
readonly shadowColor: "#000000";
|
|
203
|
+
readonly shadowOffset: {
|
|
204
|
+
readonly height: 0;
|
|
205
|
+
readonly width: 0;
|
|
206
|
+
};
|
|
207
|
+
readonly shadowOpacity: 0;
|
|
208
|
+
readonly shadowRadius: 0;
|
|
209
|
+
};
|
|
210
|
+
readonly surface: "#ffffff";
|
|
211
|
+
readonly tint: 0.82;
|
|
212
|
+
};
|
|
213
|
+
readonly "z-3": {
|
|
214
|
+
readonly border: "#e5e5e5";
|
|
215
|
+
readonly offset: 16;
|
|
216
|
+
readonly shadow: {
|
|
217
|
+
readonly elevation: 0;
|
|
218
|
+
readonly shadowColor: "#000000";
|
|
219
|
+
readonly shadowOffset: {
|
|
220
|
+
readonly height: 0;
|
|
221
|
+
readonly width: 0;
|
|
222
|
+
};
|
|
223
|
+
readonly shadowOpacity: 0;
|
|
224
|
+
readonly shadowRadius: 0;
|
|
225
|
+
};
|
|
226
|
+
readonly surface: "#ffffff";
|
|
227
|
+
readonly tint: 0.9;
|
|
228
|
+
};
|
|
229
|
+
readonly "z-4": {
|
|
230
|
+
readonly border: "#e5e5e5";
|
|
231
|
+
readonly offset: 32;
|
|
232
|
+
readonly shadow: {
|
|
233
|
+
readonly elevation: 0;
|
|
234
|
+
readonly shadowColor: "#000000";
|
|
235
|
+
readonly shadowOffset: {
|
|
236
|
+
readonly height: 0;
|
|
237
|
+
readonly width: 0;
|
|
238
|
+
};
|
|
239
|
+
readonly shadowOpacity: 0;
|
|
240
|
+
readonly shadowRadius: 0;
|
|
241
|
+
};
|
|
242
|
+
readonly surface: "#ffffff";
|
|
243
|
+
readonly tint: 0.9;
|
|
244
|
+
};
|
|
245
|
+
};
|
|
246
|
+
};
|
|
247
|
+
readonly glass: {
|
|
248
|
+
readonly dark: {
|
|
249
|
+
readonly blur: {
|
|
250
|
+
readonly sm: 8;
|
|
251
|
+
readonly md: 12;
|
|
252
|
+
readonly lg: 24;
|
|
253
|
+
readonly default: 20;
|
|
254
|
+
};
|
|
255
|
+
readonly foreground: "#ffffff";
|
|
256
|
+
readonly hairline: "#ffffff2e";
|
|
257
|
+
readonly input: "#a3a3a3";
|
|
258
|
+
readonly mutedForeground: "#d4d4d4";
|
|
259
|
+
readonly shadow: {
|
|
260
|
+
readonly glass: {
|
|
261
|
+
readonly elevation: 6;
|
|
262
|
+
readonly shadowColor: "#000000";
|
|
263
|
+
readonly shadowOffset: {
|
|
264
|
+
readonly height: 4;
|
|
265
|
+
readonly width: 0;
|
|
266
|
+
};
|
|
267
|
+
readonly shadowOpacity: 0.302;
|
|
268
|
+
readonly shadowRadius: 7;
|
|
269
|
+
};
|
|
270
|
+
readonly glassFloating: {
|
|
271
|
+
readonly elevation: 12;
|
|
272
|
+
readonly shadowColor: "#000000";
|
|
273
|
+
readonly shadowOffset: {
|
|
274
|
+
readonly height: 10;
|
|
275
|
+
readonly width: 0;
|
|
276
|
+
};
|
|
277
|
+
readonly shadowOpacity: 0.502;
|
|
278
|
+
readonly shadowRadius: 14;
|
|
279
|
+
};
|
|
280
|
+
};
|
|
281
|
+
readonly tint: {
|
|
282
|
+
readonly top: "#1c1c1cb2";
|
|
283
|
+
readonly bottom: "#1414149c";
|
|
284
|
+
readonly denseTop: "#121212e0";
|
|
285
|
+
readonly denseBottom: "#121212d1";
|
|
286
|
+
};
|
|
287
|
+
readonly solid: {
|
|
288
|
+
readonly blur: {
|
|
289
|
+
readonly sm: 0;
|
|
290
|
+
readonly md: 0;
|
|
291
|
+
readonly lg: 0;
|
|
292
|
+
readonly default: 0;
|
|
293
|
+
};
|
|
294
|
+
readonly foreground: "#ffffff";
|
|
295
|
+
readonly hairline: "#262626";
|
|
296
|
+
readonly input: "#696969";
|
|
297
|
+
readonly mutedForeground: "#a3a3a3";
|
|
298
|
+
readonly shadow: {
|
|
299
|
+
readonly glass: {
|
|
300
|
+
readonly elevation: 0;
|
|
301
|
+
readonly shadowColor: "#000000";
|
|
302
|
+
readonly shadowOffset: {
|
|
303
|
+
readonly height: 0;
|
|
304
|
+
readonly width: 0;
|
|
305
|
+
};
|
|
306
|
+
readonly shadowOpacity: 0;
|
|
307
|
+
readonly shadowRadius: 0;
|
|
308
|
+
};
|
|
309
|
+
readonly glassFloating: {
|
|
310
|
+
readonly elevation: 0;
|
|
311
|
+
readonly shadowColor: "#000000";
|
|
312
|
+
readonly shadowOffset: {
|
|
313
|
+
readonly height: 0;
|
|
314
|
+
readonly width: 0;
|
|
315
|
+
};
|
|
316
|
+
readonly shadowOpacity: 0;
|
|
317
|
+
readonly shadowRadius: 0;
|
|
318
|
+
};
|
|
319
|
+
};
|
|
320
|
+
readonly tint: {
|
|
321
|
+
readonly top: "#0a0a0a";
|
|
322
|
+
readonly bottom: "#0a0a0a";
|
|
323
|
+
readonly denseTop: "#0a0a0a";
|
|
324
|
+
readonly denseBottom: "#0a0a0a";
|
|
325
|
+
};
|
|
326
|
+
};
|
|
327
|
+
};
|
|
328
|
+
readonly light: {
|
|
329
|
+
readonly blur: {
|
|
330
|
+
readonly sm: 8;
|
|
331
|
+
readonly md: 12;
|
|
332
|
+
readonly lg: 24;
|
|
333
|
+
readonly default: 20;
|
|
334
|
+
};
|
|
335
|
+
readonly foreground: "#000000";
|
|
336
|
+
readonly hairline: "#00000024";
|
|
337
|
+
readonly input: "#595959";
|
|
338
|
+
readonly mutedForeground: "#404040";
|
|
339
|
+
readonly shadow: {
|
|
340
|
+
readonly glass: {
|
|
341
|
+
readonly elevation: 6;
|
|
342
|
+
readonly shadowColor: "#000000";
|
|
343
|
+
readonly shadowOffset: {
|
|
344
|
+
readonly height: 4;
|
|
345
|
+
readonly width: 0;
|
|
346
|
+
};
|
|
347
|
+
readonly shadowOpacity: 0.059;
|
|
348
|
+
readonly shadowRadius: 7;
|
|
349
|
+
};
|
|
350
|
+
readonly glassFloating: {
|
|
351
|
+
readonly elevation: 12;
|
|
352
|
+
readonly shadowColor: "#000000";
|
|
353
|
+
readonly shadowOffset: {
|
|
354
|
+
readonly height: 10;
|
|
355
|
+
readonly width: 0;
|
|
356
|
+
};
|
|
357
|
+
readonly shadowOpacity: 0.122;
|
|
358
|
+
readonly shadowRadius: 14;
|
|
359
|
+
};
|
|
360
|
+
};
|
|
361
|
+
readonly tint: {
|
|
362
|
+
readonly top: "#ffffffa3";
|
|
363
|
+
readonly bottom: "#ffffff80";
|
|
364
|
+
readonly denseTop: "#ffffffe6";
|
|
365
|
+
readonly denseBottom: "#ffffffd6";
|
|
366
|
+
};
|
|
367
|
+
readonly solid: {
|
|
368
|
+
readonly blur: {
|
|
369
|
+
readonly sm: 0;
|
|
370
|
+
readonly md: 0;
|
|
371
|
+
readonly lg: 0;
|
|
372
|
+
readonly default: 0;
|
|
373
|
+
};
|
|
374
|
+
readonly foreground: "#000000";
|
|
375
|
+
readonly hairline: "#e5e5e5";
|
|
376
|
+
readonly input: "#858585";
|
|
377
|
+
readonly mutedForeground: "#6a6a6a";
|
|
378
|
+
readonly shadow: {
|
|
379
|
+
readonly glass: {
|
|
380
|
+
readonly elevation: 0;
|
|
381
|
+
readonly shadowColor: "#000000";
|
|
382
|
+
readonly shadowOffset: {
|
|
383
|
+
readonly height: 0;
|
|
384
|
+
readonly width: 0;
|
|
385
|
+
};
|
|
386
|
+
readonly shadowOpacity: 0;
|
|
387
|
+
readonly shadowRadius: 0;
|
|
388
|
+
};
|
|
389
|
+
readonly glassFloating: {
|
|
390
|
+
readonly elevation: 0;
|
|
391
|
+
readonly shadowColor: "#000000";
|
|
392
|
+
readonly shadowOffset: {
|
|
393
|
+
readonly height: 0;
|
|
394
|
+
readonly width: 0;
|
|
395
|
+
};
|
|
396
|
+
readonly shadowOpacity: 0;
|
|
397
|
+
readonly shadowRadius: 0;
|
|
398
|
+
};
|
|
399
|
+
};
|
|
400
|
+
readonly tint: {
|
|
401
|
+
readonly top: "#ffffff";
|
|
402
|
+
readonly bottom: "#ffffff";
|
|
403
|
+
readonly denseTop: "#ffffff";
|
|
404
|
+
readonly denseBottom: "#ffffff";
|
|
405
|
+
};
|
|
406
|
+
};
|
|
407
|
+
};
|
|
408
|
+
};
|
|
409
|
+
readonly motion: {
|
|
410
|
+
readonly duration: {
|
|
411
|
+
readonly fast: 100;
|
|
412
|
+
readonly base: 200;
|
|
413
|
+
readonly slow: 300;
|
|
414
|
+
};
|
|
415
|
+
readonly press: {
|
|
416
|
+
readonly duration: 100;
|
|
417
|
+
readonly easing: "ease-out";
|
|
418
|
+
};
|
|
419
|
+
readonly raise: {
|
|
420
|
+
readonly duration: 200;
|
|
421
|
+
readonly easing: "ease-out";
|
|
422
|
+
};
|
|
423
|
+
};
|
|
424
|
+
readonly radius: {
|
|
425
|
+
readonly none: 0;
|
|
426
|
+
readonly sm: 4;
|
|
427
|
+
readonly md: 8;
|
|
428
|
+
readonly lg: 12;
|
|
429
|
+
readonly xl: 16;
|
|
430
|
+
readonly full: 9999;
|
|
431
|
+
readonly control: 4;
|
|
432
|
+
readonly surface: 6;
|
|
433
|
+
};
|
|
434
|
+
readonly spacing: {
|
|
435
|
+
readonly "1": 4;
|
|
436
|
+
readonly "2": 8;
|
|
437
|
+
readonly "3": 12;
|
|
438
|
+
readonly "4": 16;
|
|
439
|
+
readonly "5": 20;
|
|
440
|
+
readonly "6": 24;
|
|
441
|
+
readonly "8": 32;
|
|
442
|
+
readonly "10": 40;
|
|
443
|
+
readonly "12": 48;
|
|
444
|
+
readonly "16": 64;
|
|
445
|
+
readonly "24": 96;
|
|
446
|
+
};
|
|
447
|
+
readonly target: {
|
|
448
|
+
readonly min: 44;
|
|
449
|
+
readonly pointer: 24;
|
|
450
|
+
readonly touch: 44;
|
|
451
|
+
readonly spatial: 60;
|
|
452
|
+
};
|
|
453
|
+
readonly typography: {
|
|
454
|
+
readonly fontWeight: {
|
|
455
|
+
readonly heading: 500;
|
|
456
|
+
readonly display: 600;
|
|
457
|
+
readonly body: 400;
|
|
458
|
+
readonly caption: 400;
|
|
459
|
+
readonly label: 500;
|
|
460
|
+
};
|
|
461
|
+
readonly scale: {
|
|
462
|
+
readonly display: {
|
|
463
|
+
readonly fontSize: 28;
|
|
464
|
+
readonly lineHeight: 30.8;
|
|
465
|
+
};
|
|
466
|
+
readonly h1: {
|
|
467
|
+
readonly fontSize: 20;
|
|
468
|
+
readonly lineHeight: 26;
|
|
469
|
+
};
|
|
470
|
+
readonly h2: {
|
|
471
|
+
readonly fontSize: 14;
|
|
472
|
+
readonly lineHeight: 19.6;
|
|
473
|
+
};
|
|
474
|
+
readonly h3: {
|
|
475
|
+
readonly fontSize: 13;
|
|
476
|
+
readonly lineHeight: 18.2;
|
|
477
|
+
};
|
|
478
|
+
readonly h4: {
|
|
479
|
+
readonly fontSize: 13;
|
|
480
|
+
readonly lineHeight: 18.2;
|
|
481
|
+
};
|
|
482
|
+
readonly h5: {
|
|
483
|
+
readonly fontSize: 13;
|
|
484
|
+
readonly lineHeight: 18.2;
|
|
485
|
+
};
|
|
486
|
+
readonly h6: {
|
|
487
|
+
readonly fontSize: 13;
|
|
488
|
+
readonly lineHeight: 18.2;
|
|
489
|
+
};
|
|
490
|
+
readonly bodyLarge: {
|
|
491
|
+
readonly fontSize: 15;
|
|
492
|
+
readonly lineHeight: 24;
|
|
493
|
+
};
|
|
494
|
+
readonly body: {
|
|
495
|
+
readonly fontSize: 14;
|
|
496
|
+
readonly lineHeight: 21;
|
|
497
|
+
};
|
|
498
|
+
readonly bodySmall: {
|
|
499
|
+
readonly fontSize: 13;
|
|
500
|
+
readonly lineHeight: 18.85;
|
|
501
|
+
};
|
|
502
|
+
readonly caption: {
|
|
503
|
+
readonly fontSize: 12;
|
|
504
|
+
readonly lineHeight: 16.8;
|
|
505
|
+
};
|
|
506
|
+
readonly label: {
|
|
507
|
+
readonly fontSize: 11;
|
|
508
|
+
readonly lineHeight: 15.4;
|
|
509
|
+
};
|
|
510
|
+
};
|
|
511
|
+
};
|
|
512
|
+
};
|
|
513
|
+
type SemanticColorName = keyof typeof nativeTokens.color.light;
|
|
514
|
+
|
|
515
|
+
/** Color modes available to renderer adapters. */
|
|
516
|
+
type ThemeColorScheme = keyof typeof nativeTokens.color;
|
|
517
|
+
type NumberMap<T> = {
|
|
518
|
+
readonly [Key in keyof T]: number;
|
|
519
|
+
};
|
|
520
|
+
type StringMap<T> = {
|
|
521
|
+
readonly [Key in keyof T]: string;
|
|
522
|
+
};
|
|
523
|
+
type NativeFontWeight = 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
|
|
524
|
+
/**
|
|
525
|
+
* A shadow in React Native terms: the iOS shadow props plus the Android
|
|
526
|
+
* `elevation`. Generated from a CSS shadow token; the mapping rule is on
|
|
527
|
+
* `nativeShadow` in `packages/design/scripts/generate-tokens.mjs`.
|
|
528
|
+
*/
|
|
529
|
+
type NativeShadow = {
|
|
530
|
+
readonly elevation: number;
|
|
531
|
+
readonly shadowColor: string;
|
|
532
|
+
readonly shadowOffset: {
|
|
533
|
+
readonly height: number;
|
|
534
|
+
readonly width: number;
|
|
535
|
+
};
|
|
536
|
+
readonly shadowOpacity: number;
|
|
537
|
+
readonly shadowRadius: number;
|
|
538
|
+
};
|
|
539
|
+
type GlassSurfaceTokens = {
|
|
540
|
+
readonly blur: NumberMap<typeof nativeTokens.glass.light.blur>;
|
|
541
|
+
readonly foreground: string;
|
|
542
|
+
readonly hairline: string;
|
|
543
|
+
readonly input: string;
|
|
544
|
+
readonly mutedForeground: string;
|
|
545
|
+
readonly shadow: {
|
|
546
|
+
readonly [Key in keyof typeof nativeTokens.glass.light.shadow]: NativeShadow;
|
|
547
|
+
};
|
|
548
|
+
readonly tint: StringMap<typeof nativeTokens.glass.light.tint>;
|
|
549
|
+
};
|
|
550
|
+
/**
|
|
551
|
+
* The glass material for one color scheme, named after the design tokens:
|
|
552
|
+
* `tint` is `material.glass.tint-*`, `hairline` is `material.glass.hairline`,
|
|
553
|
+
* `mutedForeground` and `input` are `color.glass-muted-foreground` and
|
|
554
|
+
* `color.glass-input`, `blur` is `blur.glass`, `shadow` is `shadow.glass` and
|
|
555
|
+
* `shadow.glass-floating`. Tint and hairline colors carry alpha as `#rrggbbaa`.
|
|
556
|
+
* `foreground` is the base foreground role, which text on glass keeps.
|
|
557
|
+
*
|
|
558
|
+
* `solid` is the same surface with glass off (Reduce Transparency, High
|
|
559
|
+
* Contrast, `material="solid"`): opaque colors, no blur, the raised shadows.
|
|
560
|
+
* A renderer swaps `glass` for `glass.solid` and draws the same way.
|
|
561
|
+
*/
|
|
562
|
+
type NativeGlassTokens = GlassSurfaceTokens & {
|
|
563
|
+
readonly solid: GlassSurfaceTokens;
|
|
564
|
+
};
|
|
565
|
+
/** Platform-neutral, React Native-compatible theme contract. */
|
|
566
|
+
type NativeTheme = {
|
|
567
|
+
readonly colors: Readonly<Record<SemanticColorName, string>>;
|
|
568
|
+
readonly colorScheme: ThemeColorScheme;
|
|
569
|
+
readonly glass: NativeGlassTokens;
|
|
570
|
+
readonly motion: {
|
|
571
|
+
readonly duration: NumberMap<typeof nativeTokens.motion.duration>;
|
|
572
|
+
};
|
|
573
|
+
readonly radius: NumberMap<typeof nativeTokens.radius>;
|
|
574
|
+
readonly spacing: NumberMap<typeof nativeTokens.spacing>;
|
|
575
|
+
readonly typography: {
|
|
576
|
+
readonly fontWeight: {
|
|
577
|
+
readonly [Key in keyof typeof nativeTokens.typography.fontWeight]: NativeFontWeight;
|
|
578
|
+
};
|
|
579
|
+
readonly scale: {
|
|
580
|
+
readonly [Key in keyof typeof nativeTokens.typography.scale]: {
|
|
581
|
+
readonly fontSize: number;
|
|
582
|
+
readonly lineHeight: number;
|
|
583
|
+
};
|
|
584
|
+
};
|
|
585
|
+
};
|
|
586
|
+
};
|
|
587
|
+
/** Supported semantic overrides for a generated native theme. */
|
|
588
|
+
type NativeThemeOverride = {
|
|
589
|
+
readonly colors?: Partial<NativeTheme["colors"]>;
|
|
590
|
+
readonly motion?: {
|
|
591
|
+
readonly duration?: Partial<NativeTheme["motion"]["duration"]>;
|
|
592
|
+
};
|
|
593
|
+
readonly radius?: Partial<NativeTheme["radius"]>;
|
|
594
|
+
readonly spacing?: Partial<NativeTheme["spacing"]>;
|
|
595
|
+
readonly typography?: {
|
|
596
|
+
readonly fontWeight?: Partial<NativeTheme["typography"]["fontWeight"]>;
|
|
597
|
+
readonly scale?: Partial<NativeTheme["typography"]["scale"]>;
|
|
598
|
+
};
|
|
599
|
+
};
|
|
600
|
+
/** Generated light theme. Values are sRGB colors and density-independent points. */
|
|
601
|
+
declare const lightTheme: NativeTheme;
|
|
602
|
+
/** Generated dark theme. Values are sRGB colors and density-independent points. */
|
|
603
|
+
declare const darkTheme: NativeTheme;
|
|
604
|
+
/**
|
|
605
|
+
* Creates a native theme while preserving every required semantic token.
|
|
606
|
+
* `undefined` override values keep the default; any scheme other than
|
|
607
|
+
* `"dark"` produces the light theme.
|
|
608
|
+
*/
|
|
609
|
+
declare function createNativeTheme(colorScheme: ThemeColorScheme, override?: NativeThemeOverride): NativeTheme;
|
|
610
|
+
|
|
611
|
+
export { createNativeTheme as d, darkTheme as e, lightTheme as l, nativeTokens as n };
|
|
612
|
+
export type { NativeGlassTokens as N, SemanticColorName as S, ThemeColorScheme as T, NativeShadow as a, NativeTheme as b, NativeThemeOverride as c };
|
package/dist/theme.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { N as NativeGlassTokens, a as NativeShadow, b as NativeTheme, c as NativeThemeOverride, T as ThemeColorScheme, d as createNativeTheme, e as darkTheme, l as lightTheme } from './theme-ChrZM15o.js';
|
package/dist/theme.js
ADDED
package/llms.txt
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# @vllnt/ui-core
|
|
2
|
+
|
|
3
|
+
> Platform-neutral design tokens and component contracts shared by @vllnt/ui (web) and @vllnt/ui-native.
|
|
4
|
+
|
|
5
|
+
## Docs
|
|
6
|
+
|
|
7
|
+
- [README.md](./README.md): Install and use the tokens, native themes and option unions
|
|
8
|
+
- [tokens.json](./tokens.json): Design tokens (schema: tokens.schema.json)
|
|
9
|
+
- [component-contracts.json](./component-contracts.json): Portable component contracts (schema: component-contracts.schema.json)
|
|
10
|
+
- [CHANGELOG.md](./CHANGELOG.md): Release notes for every version
|
|
11
|
+
|
|
12
|
+
## Ecosystem
|
|
13
|
+
|
|
14
|
+
- [vllnt oss](https://oss.vllnt.com/llms.txt): every public @vllnt package, with what each one is for
|