@baseline-ui/tokens 0.44.1 → 0.45.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import * as _vanilla_extract_sprinkles from '@vanilla-extract/sprinkles';
2
+ import { z } from 'zod/v4';
2
3
  import * as _vanilla_extract_css from '@vanilla-extract/css';
3
4
  import { GlobalStyleRule, StyleRule } from '@vanilla-extract/css';
4
5
  import React from 'react';
@@ -256,6 +257,340 @@ declare const createLayerSprinkles: (layer: string) => ((props: {
256
257
  };
257
258
  type BaseSprinkles = ReturnType<typeof createLayerSprinkles>;
258
259
 
260
+ declare const themeSchema: z.ZodObject<{
261
+ name: z.ZodOptional<z.ZodString>;
262
+ elevation: z.ZodObject<{
263
+ low: z.ZodString;
264
+ medium: z.ZodString;
265
+ }, z.core.$strip>;
266
+ opacity: z.ZodObject<{
267
+ none: z.ZodString;
268
+ low: z.ZodString;
269
+ medium: z.ZodString;
270
+ high: z.ZodString;
271
+ }, z.core.$strip>;
272
+ rounded: z.ZodObject<{
273
+ xs: z.ZodString;
274
+ sm: z.ZodString;
275
+ md: z.ZodString;
276
+ lg: z.ZodString;
277
+ xl: z.ZodString;
278
+ "2xl": z.ZodString;
279
+ full: z.ZodString;
280
+ }, z.core.$strip>;
281
+ spacing: z.ZodObject<{
282
+ xs: z.ZodString;
283
+ sm: z.ZodString;
284
+ md: z.ZodString;
285
+ lg: z.ZodString;
286
+ xl: z.ZodString;
287
+ "2xl": z.ZodString;
288
+ "3xl": z.ZodString;
289
+ "4xl": z.ZodString;
290
+ "5xl": z.ZodString;
291
+ "6xl": z.ZodString;
292
+ "7xl": z.ZodString;
293
+ "8xl": z.ZodString;
294
+ "9xl": z.ZodString;
295
+ }, z.core.$strip>;
296
+ color: z.ZodObject<{
297
+ support: z.ZodObject<{
298
+ error: z.ZodObject<{
299
+ subtler: z.ZodString;
300
+ subtle: z.ZodString;
301
+ medium: z.ZodString;
302
+ strong: z.ZodString;
303
+ }, z.core.$strip>;
304
+ success: z.ZodObject<{
305
+ subtler: z.ZodString;
306
+ subtle: z.ZodString;
307
+ medium: z.ZodString;
308
+ strong: z.ZodString;
309
+ }, z.core.$strip>;
310
+ warning: z.ZodObject<{
311
+ subtler: z.ZodString;
312
+ subtle: z.ZodString;
313
+ medium: z.ZodString;
314
+ strong: z.ZodString;
315
+ }, z.core.$strip>;
316
+ info: z.ZodObject<{
317
+ subtler: z.ZodString;
318
+ subtle: z.ZodString;
319
+ medium: z.ZodString;
320
+ strong: z.ZodString;
321
+ }, z.core.$strip>;
322
+ }, z.core.$strip>;
323
+ focused: z.ZodObject<{
324
+ default: z.ZodString;
325
+ inset: z.ZodString;
326
+ }, z.core.$strip>;
327
+ background: z.ZodObject<{
328
+ primary: z.ZodObject<{
329
+ subtle: z.ZodString;
330
+ medium: z.ZodString;
331
+ strong: z.ZodString;
332
+ }, z.core.$strip>;
333
+ interactive: z.ZodObject<{
334
+ enabled: z.ZodString;
335
+ hovered: z.ZodString;
336
+ active: z.ZodString;
337
+ visited: z.ZodString;
338
+ disabled: z.ZodString;
339
+ }, z.core.$strip>;
340
+ inverse: z.ZodObject<{
341
+ subtle: z.ZodString;
342
+ medium: z.ZodString;
343
+ strong: z.ZodString;
344
+ }, z.core.$strip>;
345
+ secondary: z.ZodObject<{
346
+ subtle: z.ZodString;
347
+ medium: z.ZodString;
348
+ strong: z.ZodString;
349
+ }, z.core.$strip>;
350
+ overlay: z.ZodObject<{
351
+ subtle: z.ZodString;
352
+ medium: z.ZodString;
353
+ interactive: z.ZodString;
354
+ }, z.core.$strip>;
355
+ positive: z.ZodObject<{
356
+ subtle: z.ZodString;
357
+ medium: z.ZodString;
358
+ strong: z.ZodString;
359
+ interactive: z.ZodObject<{
360
+ enabled: z.ZodString;
361
+ }, z.core.$strip>;
362
+ }, z.core.$strip>;
363
+ }, z.core.$strip>;
364
+ text: z.ZodObject<{
365
+ primary: z.ZodString;
366
+ secondary: z.ZodString;
367
+ helper: z.ZodString;
368
+ placeholder: z.ZodString;
369
+ inverse: z.ZodString;
370
+ oninteractive: z.ZodString;
371
+ interactive: z.ZodObject<{
372
+ enabled: z.ZodString;
373
+ hovered: z.ZodString;
374
+ active: z.ZodString;
375
+ visited: z.ZodString;
376
+ disabled: z.ZodString;
377
+ }, z.core.$strip>;
378
+ }, z.core.$strip>;
379
+ icon: z.ZodObject<{
380
+ primary: z.ZodString;
381
+ secondary: z.ZodString;
382
+ inverse: z.ZodString;
383
+ oninteractive: z.ZodString;
384
+ interactive: z.ZodObject<{
385
+ enabled: z.ZodString;
386
+ hovered: z.ZodString;
387
+ active: z.ZodString;
388
+ visited: z.ZodString;
389
+ disabled: z.ZodString;
390
+ }, z.core.$strip>;
391
+ }, z.core.$strip>;
392
+ border: z.ZodObject<{
393
+ subtle: z.ZodString;
394
+ medium: z.ZodString;
395
+ strong: z.ZodString;
396
+ inverse: z.ZodString;
397
+ interactive: z.ZodObject<{
398
+ enabled: z.ZodString;
399
+ hovered: z.ZodString;
400
+ active: z.ZodString;
401
+ visited: z.ZodString;
402
+ disabled: z.ZodString;
403
+ }, z.core.$strip>;
404
+ positive: z.ZodObject<{
405
+ interactive: z.ZodObject<{
406
+ enabled: z.ZodString;
407
+ }, z.core.$strip>;
408
+ subtle: z.ZodString;
409
+ medium: z.ZodString;
410
+ strong: z.ZodString;
411
+ }, z.core.$strip>;
412
+ }, z.core.$strip>;
413
+ }, z.core.$strip>;
414
+ typography: z.ZodObject<{
415
+ heading: z.ZodObject<{
416
+ h1: z.ZodObject<{
417
+ regular: z.ZodObject<{
418
+ font: z.ZodString;
419
+ letterSpacing: z.ZodString;
420
+ }, z.core.$strip>;
421
+ medium: z.ZodObject<{
422
+ font: z.ZodString;
423
+ letterSpacing: z.ZodString;
424
+ }, z.core.$strip>;
425
+ semibold: z.ZodObject<{
426
+ font: z.ZodString;
427
+ letterSpacing: z.ZodString;
428
+ }, z.core.$strip>;
429
+ }, z.core.$strip>;
430
+ h2: z.ZodObject<{
431
+ regular: z.ZodObject<{
432
+ font: z.ZodString;
433
+ letterSpacing: z.ZodString;
434
+ }, z.core.$strip>;
435
+ medium: z.ZodObject<{
436
+ font: z.ZodString;
437
+ letterSpacing: z.ZodString;
438
+ }, z.core.$strip>;
439
+ semibold: z.ZodObject<{
440
+ font: z.ZodString;
441
+ letterSpacing: z.ZodString;
442
+ }, z.core.$strip>;
443
+ }, z.core.$strip>;
444
+ h3: z.ZodObject<{
445
+ regular: z.ZodObject<{
446
+ font: z.ZodString;
447
+ letterSpacing: z.ZodString;
448
+ }, z.core.$strip>;
449
+ medium: z.ZodObject<{
450
+ font: z.ZodString;
451
+ letterSpacing: z.ZodString;
452
+ }, z.core.$strip>;
453
+ semibold: z.ZodObject<{
454
+ font: z.ZodString;
455
+ letterSpacing: z.ZodString;
456
+ }, z.core.$strip>;
457
+ }, z.core.$strip>;
458
+ h4: z.ZodObject<{
459
+ regular: z.ZodObject<{
460
+ font: z.ZodString;
461
+ letterSpacing: z.ZodString;
462
+ }, z.core.$strip>;
463
+ medium: z.ZodObject<{
464
+ font: z.ZodString;
465
+ letterSpacing: z.ZodString;
466
+ }, z.core.$strip>;
467
+ semibold: z.ZodObject<{
468
+ font: z.ZodString;
469
+ letterSpacing: z.ZodString;
470
+ }, z.core.$strip>;
471
+ }, z.core.$strip>;
472
+ h5: z.ZodObject<{
473
+ regular: z.ZodObject<{
474
+ font: z.ZodString;
475
+ letterSpacing: z.ZodString;
476
+ }, z.core.$strip>;
477
+ medium: z.ZodObject<{
478
+ font: z.ZodString;
479
+ letterSpacing: z.ZodString;
480
+ }, z.core.$strip>;
481
+ semibold: z.ZodObject<{
482
+ font: z.ZodString;
483
+ letterSpacing: z.ZodString;
484
+ }, z.core.$strip>;
485
+ }, z.core.$strip>;
486
+ h6: z.ZodObject<{
487
+ regular: z.ZodObject<{
488
+ font: z.ZodString;
489
+ letterSpacing: z.ZodString;
490
+ }, z.core.$strip>;
491
+ medium: z.ZodObject<{
492
+ font: z.ZodString;
493
+ letterSpacing: z.ZodString;
494
+ }, z.core.$strip>;
495
+ semibold: z.ZodObject<{
496
+ font: z.ZodString;
497
+ letterSpacing: z.ZodString;
498
+ }, z.core.$strip>;
499
+ }, z.core.$strip>;
500
+ }, z.core.$strip>;
501
+ label: z.ZodObject<{
502
+ sm: z.ZodObject<{
503
+ regular: z.ZodObject<{
504
+ font: z.ZodString;
505
+ letterSpacing: z.ZodString;
506
+ }, z.core.$strip>;
507
+ medium: z.ZodObject<{
508
+ font: z.ZodString;
509
+ letterSpacing: z.ZodString;
510
+ }, z.core.$strip>;
511
+ semibold: z.ZodObject<{
512
+ font: z.ZodString;
513
+ letterSpacing: z.ZodString;
514
+ }, z.core.$strip>;
515
+ }, z.core.$strip>;
516
+ md: z.ZodObject<{
517
+ regular: z.ZodObject<{
518
+ font: z.ZodString;
519
+ letterSpacing: z.ZodString;
520
+ }, z.core.$strip>;
521
+ medium: z.ZodObject<{
522
+ font: z.ZodString;
523
+ letterSpacing: z.ZodString;
524
+ }, z.core.$strip>;
525
+ semibold: z.ZodObject<{
526
+ font: z.ZodString;
527
+ letterSpacing: z.ZodString;
528
+ }, z.core.$strip>;
529
+ }, z.core.$strip>;
530
+ lg: z.ZodObject<{
531
+ regular: z.ZodObject<{
532
+ font: z.ZodString;
533
+ letterSpacing: z.ZodString;
534
+ }, z.core.$strip>;
535
+ medium: z.ZodObject<{
536
+ font: z.ZodString;
537
+ letterSpacing: z.ZodString;
538
+ }, z.core.$strip>;
539
+ semibold: z.ZodObject<{
540
+ font: z.ZodString;
541
+ letterSpacing: z.ZodString;
542
+ }, z.core.$strip>;
543
+ }, z.core.$strip>;
544
+ }, z.core.$strip>;
545
+ body: z.ZodObject<{
546
+ sm: z.ZodObject<{
547
+ regular: z.ZodObject<{
548
+ font: z.ZodString;
549
+ letterSpacing: z.ZodString;
550
+ }, z.core.$strip>;
551
+ medium: z.ZodObject<{
552
+ font: z.ZodString;
553
+ letterSpacing: z.ZodString;
554
+ }, z.core.$strip>;
555
+ semibold: z.ZodObject<{
556
+ font: z.ZodString;
557
+ letterSpacing: z.ZodString;
558
+ }, z.core.$strip>;
559
+ }, z.core.$strip>;
560
+ md: z.ZodObject<{
561
+ regular: z.ZodObject<{
562
+ font: z.ZodString;
563
+ letterSpacing: z.ZodString;
564
+ }, z.core.$strip>;
565
+ medium: z.ZodObject<{
566
+ font: z.ZodString;
567
+ letterSpacing: z.ZodString;
568
+ }, z.core.$strip>;
569
+ semibold: z.ZodObject<{
570
+ font: z.ZodString;
571
+ letterSpacing: z.ZodString;
572
+ }, z.core.$strip>;
573
+ }, z.core.$strip>;
574
+ lg: z.ZodObject<{
575
+ regular: z.ZodObject<{
576
+ font: z.ZodString;
577
+ letterSpacing: z.ZodString;
578
+ }, z.core.$strip>;
579
+ medium: z.ZodObject<{
580
+ font: z.ZodString;
581
+ letterSpacing: z.ZodString;
582
+ }, z.core.$strip>;
583
+ semibold: z.ZodObject<{
584
+ font: z.ZodString;
585
+ letterSpacing: z.ZodString;
586
+ }, z.core.$strip>;
587
+ }, z.core.$strip>;
588
+ }, z.core.$strip>;
589
+ }, z.core.$strip>;
590
+ }, z.core.$strip>;
591
+ type Theme$1 = z.infer<typeof themeSchema>;
592
+ declare function validateTheme(theme: unknown): Theme$1;
593
+
259
594
  declare const themeContract: {
260
595
  elevation: {
261
596
  low: string;
@@ -935,158 +1270,6 @@ interface ResponsiveStyle {
935
1270
  }
936
1271
  declare const responsiveStyle: ({ mobile, tablet, desktop, }: ResponsiveStyle) => StyleRule;
937
1272
 
938
- interface Theme {
939
- elevation: Elevation;
940
- opacity: Opacity;
941
- rounded: Rounded;
942
- spacing: Spacing;
943
- color: Color;
944
- typography: Typography;
945
- }
946
- interface Typography {
947
- heading: Heading;
948
- label: Label;
949
- body: Label;
950
- }
951
- interface Label {
952
- sm: H6;
953
- md: H6;
954
- lg: H6;
955
- }
956
- interface Heading {
957
- h6: H6;
958
- h5: H6;
959
- h4: H6;
960
- h3: H6;
961
- h2: H6;
962
- h1: H6;
963
- }
964
- interface H6 {
965
- regular: Regular;
966
- medium: Regular;
967
- semibold: Regular;
968
- }
969
- interface Regular {
970
- font: string;
971
- letterSpacing: string;
972
- }
973
- interface Color {
974
- support: Support;
975
- focused: Focused;
976
- background: Background;
977
- text: Text;
978
- icon: Icon;
979
- border: Border;
980
- }
981
- interface Border {
982
- subtle: string;
983
- medium: string;
984
- strong: string;
985
- inverse: string;
986
- interactive: Interactive;
987
- positive: Positive;
988
- }
989
- interface Icon {
990
- primary: string;
991
- secondary: string;
992
- inverse: string;
993
- oninteractive: string;
994
- interactive: Interactive;
995
- }
996
- interface Text {
997
- primary: string;
998
- secondary: string;
999
- helper: string;
1000
- placeholder: string;
1001
- inverse: string;
1002
- oninteractive: string;
1003
- interactive: Interactive;
1004
- }
1005
- interface Background {
1006
- primary: Primary;
1007
- interactive: Interactive;
1008
- inverse: Primary;
1009
- secondary: Primary;
1010
- overlay: Overlay;
1011
- positive: Positive;
1012
- }
1013
- interface Positive {
1014
- subtle: string;
1015
- medium: string;
1016
- strong: string;
1017
- interactive: Interactive2;
1018
- }
1019
- interface Interactive2 {
1020
- enabled: string;
1021
- }
1022
- interface Overlay {
1023
- subtle: string;
1024
- medium: string;
1025
- interactive: string;
1026
- }
1027
- interface Interactive {
1028
- enabled: string;
1029
- hovered: string;
1030
- active: string;
1031
- visited: string;
1032
- disabled: string;
1033
- }
1034
- interface Primary {
1035
- subtle: string;
1036
- medium: string;
1037
- strong: string;
1038
- }
1039
- interface Focused {
1040
- default: string;
1041
- inset: string;
1042
- }
1043
- interface Support {
1044
- error: Error;
1045
- success: Error;
1046
- warning: Error;
1047
- info: Error;
1048
- }
1049
- interface Error {
1050
- subtler: string;
1051
- subtle: string;
1052
- medium: string;
1053
- strong: string;
1054
- }
1055
- interface Spacing {
1056
- xs: string;
1057
- sm: string;
1058
- md: string;
1059
- lg: string;
1060
- xl: string;
1061
- '2xl': string;
1062
- '3xl': string;
1063
- '4xl': string;
1064
- '5xl': string;
1065
- '6xl': string;
1066
- '7xl': string;
1067
- '8xl': string;
1068
- '9xl': string;
1069
- }
1070
- interface Rounded {
1071
- xs: string;
1072
- sm: string;
1073
- md: string;
1074
- lg: string;
1075
- xl: string;
1076
- '2xl': string;
1077
- full: string;
1078
- }
1079
- interface Opacity {
1080
- none: string;
1081
- low: string;
1082
- medium: string;
1083
- high: string;
1084
- }
1085
- interface Elevation {
1086
- low: string;
1087
- medium: string;
1088
- }
1089
-
1090
1273
  type Join<K, P> = K extends string | number ? P extends string | number ? `${K}.${P}` : never : never;
1091
1274
  type IsObject<T> = T extends object ? T extends any[] ? false : T extends Function ? false : true : false;
1092
1275
  type AllPropertiesArePrimitives<T> = {
@@ -2857,6 +3040,9 @@ interface Sprinkles extends BaseSprinkles {
2857
3040
  }
2858
3041
  declare const sprinkles: Sprinkles;
2859
3042
 
3043
+ type Theme = Theme$1 & {
3044
+ name?: string;
3045
+ };
2860
3046
  declare const themes: {
2861
3047
  base: {
2862
3048
  light: {
@@ -3188,6 +3374,7 @@ declare const themes: {
3188
3374
  };
3189
3375
  };
3190
3376
  };
3377
+ name: string;
3191
3378
  };
3192
3379
  dark: {
3193
3380
  elevation: {
@@ -3518,6 +3705,7 @@ declare const themes: {
3518
3705
  };
3519
3706
  };
3520
3707
  };
3708
+ name: string;
3521
3709
  };
3522
3710
  };
3523
3711
  ave: {
@@ -3850,6 +4038,7 @@ declare const themes: {
3850
4038
  };
3851
4039
  };
3852
4040
  };
4041
+ name: string;
3853
4042
  };
3854
4043
  dark: {
3855
4044
  elevation: {
@@ -4180,6 +4369,7 @@ declare const themes: {
4180
4369
  };
4181
4370
  };
4182
4371
  };
4372
+ name: string;
4183
4373
  };
4184
4374
  };
4185
4375
  nutrient: {
@@ -4512,6 +4702,7 @@ declare const themes: {
4512
4702
  };
4513
4703
  };
4514
4704
  };
4705
+ name: string;
4515
4706
  };
4516
4707
  dark: {
4517
4708
  elevation: {
@@ -4842,8 +5033,9 @@ declare const themes: {
4842
5033
  };
4843
5034
  };
4844
5035
  };
5036
+ name: string;
4845
5037
  };
4846
5038
  };
4847
5039
  };
4848
5040
 
4849
- export { type Breakpoint, Layers, type Sprinkles, type Theme, aveDark as aveDarkTheme, aveLight as aveLightTheme, breakpoints, dark as darkTheme, getLayoutValue, layoutSprinkleValues, light as lightTheme, nutrientLight as nutrientLightTheme, queries, responsiveStyle, sprinkles, themeContract, themeVars, themes };
5041
+ export { type Breakpoint, Layers, type Sprinkles, type Theme, aveDark as aveDarkTheme, aveLight as aveLightTheme, breakpoints, dark as darkTheme, getLayoutValue, layoutSprinkleValues, light as lightTheme, nutrientLight as nutrientLightTheme, queries, responsiveStyle, sprinkles, themeContract, themeVars, themes, validateTheme };