@vinaverse/tokens 0.1.0-alpha.2 → 0.1.0-alpha.21

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.cts CHANGED
@@ -25,6 +25,10 @@ var color = {
25
25
  $type: "color",
26
26
  $value: "#545B67"
27
27
  },
28
+ textSecondary: {
29
+ $type: "color",
30
+ $value: "#454B55"
31
+ },
28
32
  primary: {
29
33
  $type: "color",
30
34
  $value: "#2B57CF"
@@ -84,6 +88,14 @@ var color = {
84
88
  focus: {
85
89
  $type: "color",
86
90
  $value: "#2B57CF"
91
+ },
92
+ primarySubtle: {
93
+ $type: "color",
94
+ $value: "#F5F6F8"
95
+ },
96
+ rating: {
97
+ $type: "color",
98
+ $value: "#7A4F00"
87
99
  }
88
100
  },
89
101
  dark: {
@@ -111,6 +123,10 @@ var color = {
111
123
  $type: "color",
112
124
  $value: "#A6ADBA"
113
125
  },
126
+ textSecondary: {
127
+ $type: "color",
128
+ $value: "#BEC4CF"
129
+ },
114
130
  primary: {
115
131
  $type: "color",
116
132
  $value: "#8DB0FF"
@@ -170,6 +186,14 @@ var color = {
170
186
  focus: {
171
187
  $type: "color",
172
188
  $value: "#8DB0FF"
189
+ },
190
+ primarySubtle: {
191
+ $type: "color",
192
+ $value: "#181B21"
193
+ },
194
+ rating: {
195
+ $type: "color",
196
+ $value: "#E6B85C"
173
197
  }
174
198
  }
175
199
  };
@@ -260,9 +284,13 @@ var radius$1 = {
260
284
  }
261
285
  };
262
286
  var motion$1 = {
287
+ instant: {
288
+ $type: "duration",
289
+ $value: 80
290
+ },
263
291
  fast: {
264
292
  $type: "duration",
265
- $value: 120
293
+ $value: 140
266
294
  },
267
295
  normal: {
268
296
  $type: "duration",
@@ -272,6 +300,26 @@ var motion$1 = {
272
300
  $type: "duration",
273
301
  $value: 600,
274
302
  $description: "how long a connecting banner waits before it shows, so a quick connection never flashes one"
303
+ },
304
+ base: {
305
+ $type: "duration",
306
+ $value: 220
307
+ },
308
+ slow: {
309
+ $type: "duration",
310
+ $value: 320
311
+ },
312
+ stagger: {
313
+ $type: "duration",
314
+ $value: 30
315
+ },
316
+ rise: {
317
+ $type: "dimension",
318
+ $value: 8
319
+ },
320
+ pressScale: {
321
+ $type: "number",
322
+ $value: 0.97
275
323
  }
276
324
  };
277
325
  var size$1 = {
@@ -289,6 +337,333 @@ var size$1 = {
289
337
  $description: "the AI disclosure is never drawn smaller"
290
338
  }
291
339
  };
340
+ var chat$1 = {
341
+ $description: "The chat shell (spec 00), kit defaults a tenant overrides (ThemeOverrides.chat): elevation draws in light only.",
342
+ gutter: {
343
+ $type: "dimension",
344
+ $value: 16
345
+ },
346
+ gap: {
347
+ sameAuthor: {
348
+ $type: "dimension",
349
+ $value: 4
350
+ },
351
+ authorChange: {
352
+ $type: "dimension",
353
+ $value: 12
354
+ },
355
+ block: {
356
+ $type: "dimension",
357
+ $value: 8
358
+ }
359
+ },
360
+ bubble: {
361
+ padX: {
362
+ $type: "dimension",
363
+ $value: 14
364
+ },
365
+ padY: {
366
+ $type: "dimension",
367
+ $value: 10
368
+ },
369
+ maxWidth: {
370
+ $type: "number",
371
+ $value: 0.82
372
+ }
373
+ },
374
+ card: {
375
+ pad: {
376
+ $type: "dimension",
377
+ $value: 14
378
+ },
379
+ gap: {
380
+ $type: "dimension",
381
+ $value: 8
382
+ },
383
+ carouselGap: {
384
+ $type: "dimension",
385
+ $value: 10
386
+ },
387
+ carouselWidth: {
388
+ $type: "dimension",
389
+ $value: 214
390
+ }
391
+ },
392
+ chip: {
393
+ height: {
394
+ $type: "dimension",
395
+ $value: 38
396
+ },
397
+ gap: {
398
+ $type: "dimension",
399
+ $value: 8
400
+ }
401
+ },
402
+ header: {
403
+ height: {
404
+ $type: "dimension",
405
+ $value: 56
406
+ }
407
+ },
408
+ composer: {
409
+ minHeight: {
410
+ $type: "dimension",
411
+ $value: 48
412
+ }
413
+ },
414
+ input: {
415
+ gap: {
416
+ $type: "dimension",
417
+ $value: 12
418
+ }
419
+ },
420
+ radius: {
421
+ bubble: {
422
+ $type: "dimension",
423
+ $value: 20
424
+ },
425
+ bubbleTail: {
426
+ $type: "dimension",
427
+ $value: 6
428
+ },
429
+ card: {
430
+ $type: "dimension",
431
+ $value: 16
432
+ },
433
+ cardMedia: {
434
+ $type: "dimension",
435
+ $value: 12
436
+ },
437
+ chip: {
438
+ $type: "dimension",
439
+ $value: 999
440
+ },
441
+ slot: {
442
+ $type: "dimension",
443
+ $value: 12
444
+ },
445
+ field: {
446
+ $type: "dimension",
447
+ $value: 12
448
+ },
449
+ composer: {
450
+ $type: "dimension",
451
+ $value: 24
452
+ },
453
+ sheet: {
454
+ $type: "dimension",
455
+ $value: 28
456
+ }
457
+ },
458
+ elevation: {
459
+ card: {
460
+ $type: "shadow",
461
+ $value: {
462
+ offsetY: 1,
463
+ blur: 3,
464
+ opacity: 0.08
465
+ }
466
+ },
467
+ raised: {
468
+ $type: "shadow",
469
+ $value: {
470
+ offsetY: 4,
471
+ blur: 12,
472
+ opacity: 0.08
473
+ }
474
+ },
475
+ overlay: {
476
+ $type: "shadow",
477
+ $value: {
478
+ offsetY: 12,
479
+ blur: 28,
480
+ opacity: 0.12
481
+ }
482
+ },
483
+ sheet: {
484
+ $type: "shadow",
485
+ $value: {
486
+ offsetY: -4,
487
+ blur: 16,
488
+ opacity: 0.08
489
+ }
490
+ }
491
+ },
492
+ type: {
493
+ bubble: {
494
+ size: {
495
+ $type: "dimension",
496
+ $value: 16
497
+ },
498
+ line: {
499
+ $type: "dimension",
500
+ $value: 22
501
+ },
502
+ weight: {
503
+ $type: "fontWeight",
504
+ $value: 400
505
+ }
506
+ },
507
+ meta: {
508
+ size: {
509
+ $type: "dimension",
510
+ $value: 12
511
+ },
512
+ line: {
513
+ $type: "dimension",
514
+ $value: 16
515
+ },
516
+ weight: {
517
+ $type: "fontWeight",
518
+ $value: 400
519
+ }
520
+ },
521
+ cardTitle: {
522
+ size: {
523
+ $type: "dimension",
524
+ $value: 15
525
+ },
526
+ line: {
527
+ $type: "dimension",
528
+ $value: 20
529
+ },
530
+ weight: {
531
+ $type: "fontWeight",
532
+ $value: 600
533
+ }
534
+ },
535
+ cardBody: {
536
+ size: {
537
+ $type: "dimension",
538
+ $value: 13
539
+ },
540
+ line: {
541
+ $type: "dimension",
542
+ $value: 18
543
+ },
544
+ weight: {
545
+ $type: "fontWeight",
546
+ $value: 400
547
+ }
548
+ },
549
+ cardPrice: {
550
+ size: {
551
+ $type: "dimension",
552
+ $value: 15
553
+ },
554
+ line: {
555
+ $type: "dimension",
556
+ $value: 20
557
+ },
558
+ weight: {
559
+ $type: "fontWeight",
560
+ $value: 600
561
+ }
562
+ },
563
+ chip: {
564
+ size: {
565
+ $type: "dimension",
566
+ $value: 14
567
+ },
568
+ line: {
569
+ $type: "dimension",
570
+ $value: 20
571
+ },
572
+ weight: {
573
+ $type: "fontWeight",
574
+ $value: 500
575
+ }
576
+ },
577
+ working: {
578
+ size: {
579
+ $type: "dimension",
580
+ $value: 14
581
+ },
582
+ line: {
583
+ $type: "dimension",
584
+ $value: 19
585
+ },
586
+ weight: {
587
+ $type: "fontWeight",
588
+ $value: 400
589
+ }
590
+ }
591
+ },
592
+ thinking: {
593
+ dotSize: {
594
+ $type: "dimension",
595
+ $value: 6
596
+ },
597
+ dotGap: {
598
+ $type: "dimension",
599
+ $value: 4
600
+ },
601
+ rise: {
602
+ $type: "dimension",
603
+ $value: 3
604
+ },
605
+ cycle: {
606
+ $type: "duration",
607
+ $value: 900
608
+ },
609
+ delay: {
610
+ $type: "duration",
611
+ $value: 300
612
+ },
613
+ dotDelay: {
614
+ $type: "duration",
615
+ $value: 150
616
+ }
617
+ },
618
+ working: {
619
+ minStep: {
620
+ $type: "duration",
621
+ $value: 600
622
+ },
623
+ iconSize: {
624
+ $type: "dimension",
625
+ $value: 14
626
+ },
627
+ fontSize: {
628
+ $type: "dimension",
629
+ $value: 14
630
+ },
631
+ lineHeight: {
632
+ $type: "dimension",
633
+ $value: 19
634
+ }
635
+ },
636
+ caret: {
637
+ width: {
638
+ $type: "dimension",
639
+ $value: 2
640
+ },
641
+ height: {
642
+ $type: "dimension",
643
+ $value: 18
644
+ },
645
+ cycle: {
646
+ $type: "duration",
647
+ $value: 1000
648
+ }
649
+ },
650
+ stream: {
651
+ flush: {
652
+ $type: "duration",
653
+ $value: 50
654
+ }
655
+ },
656
+ skeleton: {
657
+ pulse: {
658
+ $type: "duration",
659
+ $value: 1200
660
+ },
661
+ minOpacity: {
662
+ $type: "number",
663
+ $value: 0.55
664
+ }
665
+ }
666
+ };
292
667
  var contrast = {
293
668
  $description: "The text and control pairs a theme must keep legible, in every mode: WCAG 2 ratio of fg on bg at least min (4.5 for text, 3 for controls and borders). divider is decorative and has none.",
294
669
  pairs: [
@@ -312,6 +687,21 @@ var contrast = {
312
687
  bg: "color.surface",
313
688
  min: 4.5
314
689
  },
690
+ {
691
+ fg: "color.textSecondary",
692
+ bg: "color.background",
693
+ min: 4.5
694
+ },
695
+ {
696
+ fg: "color.textSecondary",
697
+ bg: "color.surface",
698
+ min: 4.5
699
+ },
700
+ {
701
+ fg: "color.textSecondary",
702
+ bg: "color.agentBubble",
703
+ min: 4.5
704
+ },
315
705
  {
316
706
  fg: "color.agentText",
317
707
  bg: "color.agentBubble",
@@ -357,6 +747,11 @@ var contrast = {
357
747
  bg: "color.background",
358
748
  min: 4.5
359
749
  },
750
+ {
751
+ fg: "color.warning",
752
+ bg: "color.surface",
753
+ min: 4.5
754
+ },
360
755
  {
361
756
  fg: "color.success",
362
757
  bg: "color.background",
@@ -371,9 +766,44 @@ var contrast = {
371
766
  fg: "color.focus",
372
767
  bg: "color.background",
373
768
  min: 3
769
+ },
770
+ {
771
+ fg: "color.primary",
772
+ bg: "color.primarySubtle",
773
+ min: 4.5
374
774
  }
375
775
  ]
376
776
  };
777
+ var ease$1 = {
778
+ $description: "cubic-bezier control points: standard for what moves and stays, out for what enters, in for what leaves",
779
+ standard: {
780
+ $type: "cubicBezier",
781
+ $value: [
782
+ 0.2,
783
+ 0,
784
+ 0,
785
+ 1
786
+ ]
787
+ },
788
+ out: {
789
+ $type: "cubicBezier",
790
+ $value: [
791
+ 0.16,
792
+ 1,
793
+ 0.3,
794
+ 1
795
+ ]
796
+ },
797
+ "in": {
798
+ $type: "cubicBezier",
799
+ $value: [
800
+ 0.4,
801
+ 0,
802
+ 1,
803
+ 1
804
+ ]
805
+ }
806
+ };
377
807
  var json = {
378
808
  $description: $description,
379
809
  color: color,
@@ -382,7 +812,9 @@ var json = {
382
812
  radius: radius$1,
383
813
  motion: motion$1,
384
814
  size: size$1,
385
- contrast: contrast
815
+ chat: chat$1,
816
+ contrast: contrast,
817
+ ease: ease$1
386
818
  };
387
819
 
388
820
  type ColorScheme = 'light' | 'dark';
@@ -398,8 +830,149 @@ declare const font: {
398
830
  };
399
831
  declare const space: Readonly<Record<"xs" | "sm" | "md" | "lg" | "xl" | "xxs", number>>;
400
832
  declare const radius: Readonly<Record<"sm" | "md" | "lg" | "pill", number>>;
401
- declare const motion: Readonly<Record<"fast" | "normal" | "bannerDelay", number>>;
833
+ declare const motion: Readonly<Record<"instant" | "fast" | "normal" | "bannerDelay" | "base" | "slow" | "stagger" | "rise" | "pressScale", number>>;
402
834
  declare const size: Readonly<Record<"touchTarget" | "avatar" | "disclosureFontMin", number>>;
835
+ /** Easing curves as cubic-bezier control points: `standard` moves, `out` enters, `in` leaves. */
836
+ declare const ease: Readonly<Record<"standard" | "out" | "in", number[]>>;
837
+ /** A token group's values, nested as in the JSON, `$` keys dropped. */
838
+ type TokenTree<T> = T extends {
839
+ readonly $value: infer V;
840
+ } ? V : {
841
+ readonly [K in keyof T as K extends `$${string}` ? never : K]: TokenTree<T[K]>;
842
+ };
843
+ /**
844
+ * The chat shell (spec 00): spacing, radii, elevation (light only), type and the agent's state indicators, as a tenant
845
+ * overrides them through the theme (`ThemeOverrides.chat`).
846
+ */
847
+ declare const chat: {
848
+ readonly gutter: number;
849
+ readonly gap: {
850
+ readonly sameAuthor: number;
851
+ readonly authorChange: number;
852
+ readonly block: number;
853
+ };
854
+ readonly bubble: {
855
+ readonly padX: number;
856
+ readonly padY: number;
857
+ readonly maxWidth: number;
858
+ };
859
+ readonly card: {
860
+ readonly pad: number;
861
+ readonly gap: number;
862
+ readonly carouselGap: number;
863
+ readonly carouselWidth: number;
864
+ };
865
+ readonly chip: {
866
+ readonly height: number;
867
+ readonly gap: number;
868
+ };
869
+ readonly header: {
870
+ readonly height: number;
871
+ };
872
+ readonly composer: {
873
+ readonly minHeight: number;
874
+ };
875
+ readonly input: {
876
+ readonly gap: number;
877
+ };
878
+ readonly radius: {
879
+ readonly bubble: number;
880
+ readonly bubbleTail: number;
881
+ readonly card: number;
882
+ readonly cardMedia: number;
883
+ readonly chip: number;
884
+ readonly slot: number;
885
+ readonly field: number;
886
+ readonly composer: number;
887
+ readonly sheet: number;
888
+ };
889
+ readonly elevation: {
890
+ readonly card: {
891
+ offsetY: number;
892
+ blur: number;
893
+ opacity: number;
894
+ };
895
+ readonly raised: {
896
+ offsetY: number;
897
+ blur: number;
898
+ opacity: number;
899
+ };
900
+ readonly overlay: {
901
+ offsetY: number;
902
+ blur: number;
903
+ opacity: number;
904
+ };
905
+ readonly sheet: {
906
+ offsetY: number;
907
+ blur: number;
908
+ opacity: number;
909
+ };
910
+ };
911
+ readonly type: {
912
+ readonly bubble: {
913
+ readonly size: number;
914
+ readonly line: number;
915
+ readonly weight: number;
916
+ };
917
+ readonly meta: {
918
+ readonly size: number;
919
+ readonly line: number;
920
+ readonly weight: number;
921
+ };
922
+ readonly cardTitle: {
923
+ readonly size: number;
924
+ readonly line: number;
925
+ readonly weight: number;
926
+ };
927
+ readonly cardBody: {
928
+ readonly size: number;
929
+ readonly line: number;
930
+ readonly weight: number;
931
+ };
932
+ readonly cardPrice: {
933
+ readonly size: number;
934
+ readonly line: number;
935
+ readonly weight: number;
936
+ };
937
+ readonly chip: {
938
+ readonly size: number;
939
+ readonly line: number;
940
+ readonly weight: number;
941
+ };
942
+ readonly working: {
943
+ readonly size: number;
944
+ readonly line: number;
945
+ readonly weight: number;
946
+ };
947
+ };
948
+ readonly thinking: {
949
+ readonly dotSize: number;
950
+ readonly dotGap: number;
951
+ readonly rise: number;
952
+ readonly cycle: number;
953
+ readonly delay: number;
954
+ readonly dotDelay: number;
955
+ };
956
+ readonly working: {
957
+ readonly minStep: number;
958
+ readonly iconSize: number;
959
+ readonly fontSize: number;
960
+ readonly lineHeight: number;
961
+ };
962
+ readonly caret: {
963
+ readonly width: number;
964
+ readonly height: number;
965
+ readonly cycle: number;
966
+ };
967
+ readonly stream: {
968
+ readonly flush: number;
969
+ };
970
+ readonly skeleton: {
971
+ readonly pulse: number;
972
+ readonly minOpacity: number;
973
+ };
974
+ };
975
+ type ChatTokens = typeof chat;
403
976
  /** The text and control pairs a theme must keep legible: [foreground, background, minimum WCAG contrast], from the JSON. */
404
977
  declare const CONTRAST_PAIRS: readonly (readonly [
405
978
  ColorName,
@@ -422,4 +995,4 @@ declare function contrastProblems(palette: Colors): {
422
995
  minimum: number;
423
996
  }[];
424
997
 
425
- export { CONTRAST_PAIRS, type ColorName, type ColorScheme, type Colors, colors, contrastProblems, contrastRatio, cssVariable, font, motion, radius, size, space, tokenPaths };
998
+ export { CONTRAST_PAIRS, type ChatTokens, type ColorName, type ColorScheme, type Colors, type TokenTree, chat, colors, contrastProblems, contrastRatio, cssVariable, ease, font, motion, radius, size, space, tokenPaths };