@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,570 @@
|
|
|
1
|
+
// src/generated/native-tokens.ts
|
|
2
|
+
var nativeColorTokens = {
|
|
3
|
+
"dark": {
|
|
4
|
+
"background": "#050505",
|
|
5
|
+
"foreground": "#ffffff",
|
|
6
|
+
"card": "#0a0a0a",
|
|
7
|
+
"cardForeground": "#ffffff",
|
|
8
|
+
"popover": "#0a0a0a",
|
|
9
|
+
"popoverForeground": "#ededed",
|
|
10
|
+
"primary": "#ffffff",
|
|
11
|
+
"primaryForeground": "#000000",
|
|
12
|
+
"secondary": "#262626",
|
|
13
|
+
"secondaryForeground": "#ededed",
|
|
14
|
+
"muted": "#262626",
|
|
15
|
+
"mutedForeground": "#a3a3a3",
|
|
16
|
+
"accent": "#262626",
|
|
17
|
+
"accentForeground": "#ededed",
|
|
18
|
+
"destructive": "#fa6961",
|
|
19
|
+
"destructiveForeground": "#171717",
|
|
20
|
+
"success": "#4ed589",
|
|
21
|
+
"successForeground": "#171717",
|
|
22
|
+
"warning": "#f0bb3b",
|
|
23
|
+
"warningForeground": "#171717",
|
|
24
|
+
"info": "#65b2f1",
|
|
25
|
+
"infoForeground": "#171717",
|
|
26
|
+
"diffAdded": "#102b17",
|
|
27
|
+
"diffRemoved": "#3b1816",
|
|
28
|
+
"border": "#262626",
|
|
29
|
+
"input": "#696969",
|
|
30
|
+
"ring": "#d4d4d4",
|
|
31
|
+
"sidebar": "#000000",
|
|
32
|
+
"pill": "#000000",
|
|
33
|
+
"pillBorder": "#262626",
|
|
34
|
+
"composerBorder": "#2a2a2a",
|
|
35
|
+
"statusNeedsYou": "#eab305",
|
|
36
|
+
"statusUnread": "#3b82f6",
|
|
37
|
+
"statusFailed": "#ef4444",
|
|
38
|
+
"statusDone": "#00c950",
|
|
39
|
+
"statusRing": "#a3a3a3"
|
|
40
|
+
},
|
|
41
|
+
"light": {
|
|
42
|
+
"background": "#ffffff",
|
|
43
|
+
"foreground": "#000000",
|
|
44
|
+
"card": "#ffffff",
|
|
45
|
+
"cardForeground": "#000000",
|
|
46
|
+
"popover": "#ffffff",
|
|
47
|
+
"popoverForeground": "#000000",
|
|
48
|
+
"primary": "#000000",
|
|
49
|
+
"primaryForeground": "#ffffff",
|
|
50
|
+
"secondary": "#f5f5f5",
|
|
51
|
+
"secondaryForeground": "#171717",
|
|
52
|
+
"muted": "#f5f5f5",
|
|
53
|
+
"mutedForeground": "#6a6a6a",
|
|
54
|
+
"accent": "#f5f5f5",
|
|
55
|
+
"accentForeground": "#171717",
|
|
56
|
+
"destructive": "#cf1f29",
|
|
57
|
+
"destructiveForeground": "#fafafa",
|
|
58
|
+
"success": "#1e7546",
|
|
59
|
+
"successForeground": "#fafafa",
|
|
60
|
+
"warning": "#825a27",
|
|
61
|
+
"warningForeground": "#fafafa",
|
|
62
|
+
"info": "#1762b6",
|
|
63
|
+
"infoForeground": "#fafafa",
|
|
64
|
+
"diffAdded": "#d9f3dd",
|
|
65
|
+
"diffRemoved": "#ffe4e1",
|
|
66
|
+
"border": "#e5e5e5",
|
|
67
|
+
"input": "#858585",
|
|
68
|
+
"ring": "#0a0a0a",
|
|
69
|
+
"sidebar": "#fafafa",
|
|
70
|
+
"pill": "#f5f5f5",
|
|
71
|
+
"pillBorder": "#e5e5e5",
|
|
72
|
+
"composerBorder": "#d4d4d4",
|
|
73
|
+
"statusNeedsYou": "#a65f00",
|
|
74
|
+
"statusUnread": "#2563eb",
|
|
75
|
+
"statusFailed": "#dc2626",
|
|
76
|
+
"statusDone": "#15803d",
|
|
77
|
+
"statusRing": "#737373"
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
var nativeDepthTokens = {
|
|
81
|
+
"dark": {
|
|
82
|
+
"z-0": {
|
|
83
|
+
"border": "#262626",
|
|
84
|
+
"offset": 0,
|
|
85
|
+
"shadow": {
|
|
86
|
+
"elevation": 0,
|
|
87
|
+
"shadowColor": "#000000",
|
|
88
|
+
"shadowOffset": {
|
|
89
|
+
"height": 0,
|
|
90
|
+
"width": 0
|
|
91
|
+
},
|
|
92
|
+
"shadowOpacity": 0,
|
|
93
|
+
"shadowRadius": 0
|
|
94
|
+
},
|
|
95
|
+
"surface": "#050505",
|
|
96
|
+
"tint": 0.82
|
|
97
|
+
},
|
|
98
|
+
"z-1": {
|
|
99
|
+
"border": "#262626",
|
|
100
|
+
"offset": 2,
|
|
101
|
+
"shadow": {
|
|
102
|
+
"elevation": 0,
|
|
103
|
+
"shadowColor": "#000000",
|
|
104
|
+
"shadowOffset": {
|
|
105
|
+
"height": 0,
|
|
106
|
+
"width": 0
|
|
107
|
+
},
|
|
108
|
+
"shadowOpacity": 0,
|
|
109
|
+
"shadowRadius": 0
|
|
110
|
+
},
|
|
111
|
+
"surface": "#0a0a0a",
|
|
112
|
+
"tint": 0.82
|
|
113
|
+
},
|
|
114
|
+
"z-2": {
|
|
115
|
+
"border": "#262626",
|
|
116
|
+
"offset": 8,
|
|
117
|
+
"shadow": {
|
|
118
|
+
"elevation": 0,
|
|
119
|
+
"shadowColor": "#000000",
|
|
120
|
+
"shadowOffset": {
|
|
121
|
+
"height": 0,
|
|
122
|
+
"width": 0
|
|
123
|
+
},
|
|
124
|
+
"shadowOpacity": 0,
|
|
125
|
+
"shadowRadius": 0
|
|
126
|
+
},
|
|
127
|
+
"surface": "#0a0a0a",
|
|
128
|
+
"tint": 0.82
|
|
129
|
+
},
|
|
130
|
+
"z-3": {
|
|
131
|
+
"border": "#3a3a3a",
|
|
132
|
+
"offset": 16,
|
|
133
|
+
"shadow": {
|
|
134
|
+
"elevation": 0,
|
|
135
|
+
"shadowColor": "#000000",
|
|
136
|
+
"shadowOffset": {
|
|
137
|
+
"height": 0,
|
|
138
|
+
"width": 0
|
|
139
|
+
},
|
|
140
|
+
"shadowOpacity": 0,
|
|
141
|
+
"shadowRadius": 0
|
|
142
|
+
},
|
|
143
|
+
"surface": "#0a0a0a",
|
|
144
|
+
"tint": 0.9
|
|
145
|
+
},
|
|
146
|
+
"z-4": {
|
|
147
|
+
"border": "#3a3a3a",
|
|
148
|
+
"offset": 32,
|
|
149
|
+
"shadow": {
|
|
150
|
+
"elevation": 0,
|
|
151
|
+
"shadowColor": "#000000",
|
|
152
|
+
"shadowOffset": {
|
|
153
|
+
"height": 0,
|
|
154
|
+
"width": 0
|
|
155
|
+
},
|
|
156
|
+
"shadowOpacity": 0,
|
|
157
|
+
"shadowRadius": 0
|
|
158
|
+
},
|
|
159
|
+
"surface": "#0a0a0a",
|
|
160
|
+
"tint": 0.9
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
"light": {
|
|
164
|
+
"z-0": {
|
|
165
|
+
"border": "#e5e5e5",
|
|
166
|
+
"offset": 0,
|
|
167
|
+
"shadow": {
|
|
168
|
+
"elevation": 0,
|
|
169
|
+
"shadowColor": "#000000",
|
|
170
|
+
"shadowOffset": {
|
|
171
|
+
"height": 0,
|
|
172
|
+
"width": 0
|
|
173
|
+
},
|
|
174
|
+
"shadowOpacity": 0,
|
|
175
|
+
"shadowRadius": 0
|
|
176
|
+
},
|
|
177
|
+
"surface": "#ffffff",
|
|
178
|
+
"tint": 0.82
|
|
179
|
+
},
|
|
180
|
+
"z-1": {
|
|
181
|
+
"border": "#e5e5e5",
|
|
182
|
+
"offset": 2,
|
|
183
|
+
"shadow": {
|
|
184
|
+
"elevation": 0,
|
|
185
|
+
"shadowColor": "#000000",
|
|
186
|
+
"shadowOffset": {
|
|
187
|
+
"height": 0,
|
|
188
|
+
"width": 0
|
|
189
|
+
},
|
|
190
|
+
"shadowOpacity": 0,
|
|
191
|
+
"shadowRadius": 0
|
|
192
|
+
},
|
|
193
|
+
"surface": "#ffffff",
|
|
194
|
+
"tint": 0.82
|
|
195
|
+
},
|
|
196
|
+
"z-2": {
|
|
197
|
+
"border": "#e5e5e5",
|
|
198
|
+
"offset": 8,
|
|
199
|
+
"shadow": {
|
|
200
|
+
"elevation": 0,
|
|
201
|
+
"shadowColor": "#000000",
|
|
202
|
+
"shadowOffset": {
|
|
203
|
+
"height": 0,
|
|
204
|
+
"width": 0
|
|
205
|
+
},
|
|
206
|
+
"shadowOpacity": 0,
|
|
207
|
+
"shadowRadius": 0
|
|
208
|
+
},
|
|
209
|
+
"surface": "#ffffff",
|
|
210
|
+
"tint": 0.82
|
|
211
|
+
},
|
|
212
|
+
"z-3": {
|
|
213
|
+
"border": "#e5e5e5",
|
|
214
|
+
"offset": 16,
|
|
215
|
+
"shadow": {
|
|
216
|
+
"elevation": 0,
|
|
217
|
+
"shadowColor": "#000000",
|
|
218
|
+
"shadowOffset": {
|
|
219
|
+
"height": 0,
|
|
220
|
+
"width": 0
|
|
221
|
+
},
|
|
222
|
+
"shadowOpacity": 0,
|
|
223
|
+
"shadowRadius": 0
|
|
224
|
+
},
|
|
225
|
+
"surface": "#ffffff",
|
|
226
|
+
"tint": 0.9
|
|
227
|
+
},
|
|
228
|
+
"z-4": {
|
|
229
|
+
"border": "#e5e5e5",
|
|
230
|
+
"offset": 32,
|
|
231
|
+
"shadow": {
|
|
232
|
+
"elevation": 0,
|
|
233
|
+
"shadowColor": "#000000",
|
|
234
|
+
"shadowOffset": {
|
|
235
|
+
"height": 0,
|
|
236
|
+
"width": 0
|
|
237
|
+
},
|
|
238
|
+
"shadowOpacity": 0,
|
|
239
|
+
"shadowRadius": 0
|
|
240
|
+
},
|
|
241
|
+
"surface": "#ffffff",
|
|
242
|
+
"tint": 0.9
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
};
|
|
246
|
+
var nativeGlassTokens = {
|
|
247
|
+
"dark": {
|
|
248
|
+
"blur": {
|
|
249
|
+
"sm": 8,
|
|
250
|
+
"md": 12,
|
|
251
|
+
"lg": 24,
|
|
252
|
+
"default": 20
|
|
253
|
+
},
|
|
254
|
+
"foreground": "#ffffff",
|
|
255
|
+
"hairline": "#ffffff2e",
|
|
256
|
+
"input": "#a3a3a3",
|
|
257
|
+
"mutedForeground": "#d4d4d4",
|
|
258
|
+
"shadow": {
|
|
259
|
+
"glass": {
|
|
260
|
+
"elevation": 6,
|
|
261
|
+
"shadowColor": "#000000",
|
|
262
|
+
"shadowOffset": {
|
|
263
|
+
"height": 4,
|
|
264
|
+
"width": 0
|
|
265
|
+
},
|
|
266
|
+
"shadowOpacity": 0.302,
|
|
267
|
+
"shadowRadius": 7
|
|
268
|
+
},
|
|
269
|
+
"glassFloating": {
|
|
270
|
+
"elevation": 12,
|
|
271
|
+
"shadowColor": "#000000",
|
|
272
|
+
"shadowOffset": {
|
|
273
|
+
"height": 10,
|
|
274
|
+
"width": 0
|
|
275
|
+
},
|
|
276
|
+
"shadowOpacity": 0.502,
|
|
277
|
+
"shadowRadius": 14
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
"tint": {
|
|
281
|
+
"top": "#1c1c1cb2",
|
|
282
|
+
"bottom": "#1414149c",
|
|
283
|
+
"denseTop": "#121212e0",
|
|
284
|
+
"denseBottom": "#121212d1"
|
|
285
|
+
},
|
|
286
|
+
"solid": {
|
|
287
|
+
"blur": {
|
|
288
|
+
"sm": 0,
|
|
289
|
+
"md": 0,
|
|
290
|
+
"lg": 0,
|
|
291
|
+
"default": 0
|
|
292
|
+
},
|
|
293
|
+
"foreground": "#ffffff",
|
|
294
|
+
"hairline": "#262626",
|
|
295
|
+
"input": "#696969",
|
|
296
|
+
"mutedForeground": "#a3a3a3",
|
|
297
|
+
"shadow": {
|
|
298
|
+
"glass": {
|
|
299
|
+
"elevation": 0,
|
|
300
|
+
"shadowColor": "#000000",
|
|
301
|
+
"shadowOffset": {
|
|
302
|
+
"height": 0,
|
|
303
|
+
"width": 0
|
|
304
|
+
},
|
|
305
|
+
"shadowOpacity": 0,
|
|
306
|
+
"shadowRadius": 0
|
|
307
|
+
},
|
|
308
|
+
"glassFloating": {
|
|
309
|
+
"elevation": 0,
|
|
310
|
+
"shadowColor": "#000000",
|
|
311
|
+
"shadowOffset": {
|
|
312
|
+
"height": 0,
|
|
313
|
+
"width": 0
|
|
314
|
+
},
|
|
315
|
+
"shadowOpacity": 0,
|
|
316
|
+
"shadowRadius": 0
|
|
317
|
+
}
|
|
318
|
+
},
|
|
319
|
+
"tint": {
|
|
320
|
+
"top": "#0a0a0a",
|
|
321
|
+
"bottom": "#0a0a0a",
|
|
322
|
+
"denseTop": "#0a0a0a",
|
|
323
|
+
"denseBottom": "#0a0a0a"
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
},
|
|
327
|
+
"light": {
|
|
328
|
+
"blur": {
|
|
329
|
+
"sm": 8,
|
|
330
|
+
"md": 12,
|
|
331
|
+
"lg": 24,
|
|
332
|
+
"default": 20
|
|
333
|
+
},
|
|
334
|
+
"foreground": "#000000",
|
|
335
|
+
"hairline": "#00000024",
|
|
336
|
+
"input": "#595959",
|
|
337
|
+
"mutedForeground": "#404040",
|
|
338
|
+
"shadow": {
|
|
339
|
+
"glass": {
|
|
340
|
+
"elevation": 6,
|
|
341
|
+
"shadowColor": "#000000",
|
|
342
|
+
"shadowOffset": {
|
|
343
|
+
"height": 4,
|
|
344
|
+
"width": 0
|
|
345
|
+
},
|
|
346
|
+
"shadowOpacity": 0.059,
|
|
347
|
+
"shadowRadius": 7
|
|
348
|
+
},
|
|
349
|
+
"glassFloating": {
|
|
350
|
+
"elevation": 12,
|
|
351
|
+
"shadowColor": "#000000",
|
|
352
|
+
"shadowOffset": {
|
|
353
|
+
"height": 10,
|
|
354
|
+
"width": 0
|
|
355
|
+
},
|
|
356
|
+
"shadowOpacity": 0.122,
|
|
357
|
+
"shadowRadius": 14
|
|
358
|
+
}
|
|
359
|
+
},
|
|
360
|
+
"tint": {
|
|
361
|
+
"top": "#ffffffa3",
|
|
362
|
+
"bottom": "#ffffff80",
|
|
363
|
+
"denseTop": "#ffffffe6",
|
|
364
|
+
"denseBottom": "#ffffffd6"
|
|
365
|
+
},
|
|
366
|
+
"solid": {
|
|
367
|
+
"blur": {
|
|
368
|
+
"sm": 0,
|
|
369
|
+
"md": 0,
|
|
370
|
+
"lg": 0,
|
|
371
|
+
"default": 0
|
|
372
|
+
},
|
|
373
|
+
"foreground": "#000000",
|
|
374
|
+
"hairline": "#e5e5e5",
|
|
375
|
+
"input": "#858585",
|
|
376
|
+
"mutedForeground": "#6a6a6a",
|
|
377
|
+
"shadow": {
|
|
378
|
+
"glass": {
|
|
379
|
+
"elevation": 0,
|
|
380
|
+
"shadowColor": "#000000",
|
|
381
|
+
"shadowOffset": {
|
|
382
|
+
"height": 0,
|
|
383
|
+
"width": 0
|
|
384
|
+
},
|
|
385
|
+
"shadowOpacity": 0,
|
|
386
|
+
"shadowRadius": 0
|
|
387
|
+
},
|
|
388
|
+
"glassFloating": {
|
|
389
|
+
"elevation": 0,
|
|
390
|
+
"shadowColor": "#000000",
|
|
391
|
+
"shadowOffset": {
|
|
392
|
+
"height": 0,
|
|
393
|
+
"width": 0
|
|
394
|
+
},
|
|
395
|
+
"shadowOpacity": 0,
|
|
396
|
+
"shadowRadius": 0
|
|
397
|
+
}
|
|
398
|
+
},
|
|
399
|
+
"tint": {
|
|
400
|
+
"top": "#ffffff",
|
|
401
|
+
"bottom": "#ffffff",
|
|
402
|
+
"denseTop": "#ffffff",
|
|
403
|
+
"denseBottom": "#ffffff"
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
};
|
|
408
|
+
var nativeMotionTokens = {
|
|
409
|
+
"duration": {
|
|
410
|
+
"fast": 100,
|
|
411
|
+
"base": 200,
|
|
412
|
+
"slow": 300
|
|
413
|
+
},
|
|
414
|
+
"press": {
|
|
415
|
+
"duration": 100,
|
|
416
|
+
"easing": "ease-out"
|
|
417
|
+
},
|
|
418
|
+
"raise": {
|
|
419
|
+
"duration": 200,
|
|
420
|
+
"easing": "ease-out"
|
|
421
|
+
}
|
|
422
|
+
};
|
|
423
|
+
var nativeRadiusTokens = {
|
|
424
|
+
"none": 0,
|
|
425
|
+
"sm": 4,
|
|
426
|
+
"md": 8,
|
|
427
|
+
"lg": 12,
|
|
428
|
+
"xl": 16,
|
|
429
|
+
"full": 9999,
|
|
430
|
+
"control": 4,
|
|
431
|
+
"surface": 6
|
|
432
|
+
};
|
|
433
|
+
var nativeSpacingTokens = {
|
|
434
|
+
"1": 4,
|
|
435
|
+
"2": 8,
|
|
436
|
+
"3": 12,
|
|
437
|
+
"4": 16,
|
|
438
|
+
"5": 20,
|
|
439
|
+
"6": 24,
|
|
440
|
+
"8": 32,
|
|
441
|
+
"10": 40,
|
|
442
|
+
"12": 48,
|
|
443
|
+
"16": 64,
|
|
444
|
+
"24": 96
|
|
445
|
+
};
|
|
446
|
+
var nativeTargetTokens = {
|
|
447
|
+
"min": 44,
|
|
448
|
+
"pointer": 24,
|
|
449
|
+
"touch": 44,
|
|
450
|
+
"spatial": 60
|
|
451
|
+
};
|
|
452
|
+
var nativeTypographyTokens = {
|
|
453
|
+
"fontWeight": {
|
|
454
|
+
"heading": 500,
|
|
455
|
+
"display": 600,
|
|
456
|
+
"body": 400,
|
|
457
|
+
"caption": 400,
|
|
458
|
+
"label": 500
|
|
459
|
+
},
|
|
460
|
+
"scale": {
|
|
461
|
+
"display": {
|
|
462
|
+
"fontSize": 28,
|
|
463
|
+
"lineHeight": 30.8
|
|
464
|
+
},
|
|
465
|
+
"h1": {
|
|
466
|
+
"fontSize": 20,
|
|
467
|
+
"lineHeight": 26
|
|
468
|
+
},
|
|
469
|
+
"h2": {
|
|
470
|
+
"fontSize": 14,
|
|
471
|
+
"lineHeight": 19.6
|
|
472
|
+
},
|
|
473
|
+
"h3": {
|
|
474
|
+
"fontSize": 13,
|
|
475
|
+
"lineHeight": 18.2
|
|
476
|
+
},
|
|
477
|
+
"h4": {
|
|
478
|
+
"fontSize": 13,
|
|
479
|
+
"lineHeight": 18.2
|
|
480
|
+
},
|
|
481
|
+
"h5": {
|
|
482
|
+
"fontSize": 13,
|
|
483
|
+
"lineHeight": 18.2
|
|
484
|
+
},
|
|
485
|
+
"h6": {
|
|
486
|
+
"fontSize": 13,
|
|
487
|
+
"lineHeight": 18.2
|
|
488
|
+
},
|
|
489
|
+
"bodyLarge": {
|
|
490
|
+
"fontSize": 15,
|
|
491
|
+
"lineHeight": 24
|
|
492
|
+
},
|
|
493
|
+
"body": {
|
|
494
|
+
"fontSize": 14,
|
|
495
|
+
"lineHeight": 21
|
|
496
|
+
},
|
|
497
|
+
"bodySmall": {
|
|
498
|
+
"fontSize": 13,
|
|
499
|
+
"lineHeight": 18.85
|
|
500
|
+
},
|
|
501
|
+
"caption": {
|
|
502
|
+
"fontSize": 12,
|
|
503
|
+
"lineHeight": 16.8
|
|
504
|
+
},
|
|
505
|
+
"label": {
|
|
506
|
+
"fontSize": 11,
|
|
507
|
+
"lineHeight": 15.4
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
};
|
|
511
|
+
var nativeTokens = {
|
|
512
|
+
color: nativeColorTokens,
|
|
513
|
+
depth: nativeDepthTokens,
|
|
514
|
+
glass: nativeGlassTokens,
|
|
515
|
+
motion: nativeMotionTokens,
|
|
516
|
+
radius: nativeRadiusTokens,
|
|
517
|
+
spacing: nativeSpacingTokens,
|
|
518
|
+
target: nativeTargetTokens,
|
|
519
|
+
typography: nativeTypographyTokens
|
|
520
|
+
};
|
|
521
|
+
|
|
522
|
+
// src/theme.ts
|
|
523
|
+
var lightTheme = {
|
|
524
|
+
colors: nativeColorTokens.light,
|
|
525
|
+
colorScheme: "light",
|
|
526
|
+
glass: nativeGlassTokens.light,
|
|
527
|
+
motion: nativeMotionTokens,
|
|
528
|
+
radius: nativeRadiusTokens,
|
|
529
|
+
spacing: nativeSpacingTokens,
|
|
530
|
+
typography: nativeTypographyTokens
|
|
531
|
+
};
|
|
532
|
+
var darkTheme = {
|
|
533
|
+
...lightTheme,
|
|
534
|
+
colors: nativeColorTokens.dark,
|
|
535
|
+
colorScheme: "dark",
|
|
536
|
+
glass: nativeGlassTokens.dark
|
|
537
|
+
};
|
|
538
|
+
function merge(base, override) {
|
|
539
|
+
const defined = Object.entries(override ?? {}).filter(
|
|
540
|
+
([, value]) => value !== void 0
|
|
541
|
+
);
|
|
542
|
+
return { ...base, ...Object.fromEntries(defined) };
|
|
543
|
+
}
|
|
544
|
+
function createNativeTheme(colorScheme, override = {}) {
|
|
545
|
+
const base = colorScheme === "dark" ? darkTheme : lightTheme;
|
|
546
|
+
return {
|
|
547
|
+
colors: merge(base.colors, override.colors),
|
|
548
|
+
colorScheme: base.colorScheme,
|
|
549
|
+
glass: base.glass,
|
|
550
|
+
motion: {
|
|
551
|
+
duration: merge(base.motion.duration, override.motion?.duration)
|
|
552
|
+
},
|
|
553
|
+
radius: merge(base.radius, override.radius),
|
|
554
|
+
spacing: merge(base.spacing, override.spacing),
|
|
555
|
+
typography: {
|
|
556
|
+
fontWeight: merge(
|
|
557
|
+
base.typography.fontWeight,
|
|
558
|
+
override.typography?.fontWeight
|
|
559
|
+
),
|
|
560
|
+
scale: merge(base.typography.scale, override.typography?.scale)
|
|
561
|
+
}
|
|
562
|
+
};
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
export {
|
|
566
|
+
nativeTokens,
|
|
567
|
+
lightTheme,
|
|
568
|
+
darkTheme,
|
|
569
|
+
createNativeTheme
|
|
570
|
+
};
|