@ttoss/fsl-theme 2.1.2 → 2.1.4

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.
@@ -52,17 +52,17 @@ var baseTheme = {
52
52
  },
53
53
  neutral: {
54
54
  0: "#ffffff",
55
- 50: "#f8fafc",
56
- 100: "#f1f5f9",
57
- 200: "#e2e8f0",
58
- 300: "#cbd5e1",
59
- 400: "#94a3b8",
60
- 500: "#64748b",
61
- 600: "#475569",
62
- 700: "#334155",
63
- 800: "#1e293b",
64
- 900: "#0f172a",
65
- 1e3: "#020617"
55
+ 50: "#fafafa",
56
+ 100: "#f4f4f5",
57
+ 200: "#e4e4e7",
58
+ 300: "#d4d4d8",
59
+ 400: "#a1a1aa",
60
+ 500: "#71717a",
61
+ 600: "#52525b",
62
+ 700: "#3f3f46",
63
+ 800: "#27272a",
64
+ 900: "#18181b",
65
+ 1e3: "#09090b"
66
66
  },
67
67
  red: {
68
68
  100: "#fee2e2",
@@ -133,7 +133,7 @@ var baseTheme = {
133
133
  },
134
134
  font: {
135
135
  family: {
136
- sans: "ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, \"Apple Color Emoji\", \"Segoe UI Emoji\"",
136
+ sans: "\"Inter Variable\", Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, \"Apple Color Emoji\", \"Segoe UI Emoji\"",
137
137
  serif: "ui-serif, Georgia, Cambria, \"Times New Roman\", Times, serif",
138
138
  mono: "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace"
139
139
  },
@@ -352,7 +352,7 @@ var baseTheme = {
352
352
  focused: "{core.colors.brand.500}",
353
353
  disabled: "{core.colors.neutral.200}",
354
354
  pressed: "{core.colors.neutral.400}",
355
- expanded: "{core.colors.brand.500}"
355
+ expanded: "{core.colors.neutral.500}"
356
356
  },
357
357
  text: {
358
358
  default: "{core.colors.neutral.900}",
@@ -426,7 +426,7 @@ var baseTheme = {
426
426
  focused: "{core.colors.brand.500}",
427
427
  disabled: "{core.colors.neutral.200}",
428
428
  pressed: "{core.colors.neutral.300}",
429
- expanded: "{core.colors.brand.500}"
429
+ expanded: "{core.colors.neutral.500}"
430
430
  },
431
431
  text: {
432
432
  default: "{core.colors.neutral.700}",
@@ -445,10 +445,10 @@ var baseTheme = {
445
445
  hover: "{core.colors.neutral.50}",
446
446
  active: "{core.colors.neutral.50}",
447
447
  disabled: "{core.colors.neutral.100}",
448
- selected: "{core.colors.brand.50}",
448
+ selected: "{core.colors.neutral.100}",
449
449
  droptarget: "{core.colors.neutral.50}",
450
- checked: "{core.colors.brand.500}",
451
- indeterminate: "{core.colors.brand.300}",
450
+ checked: "{core.colors.neutral.1000}",
451
+ indeterminate: "{core.colors.neutral.1000}",
452
452
  pressed: "{core.colors.neutral.100}",
453
453
  expanded: "{core.colors.neutral.50}",
454
454
  invalid: "{core.colors.neutral.0}"
@@ -456,14 +456,14 @@ var baseTheme = {
456
456
  border: {
457
457
  default: "{core.colors.neutral.300}",
458
458
  hover: "{core.colors.neutral.500}",
459
- active: "{core.colors.brand.500}",
459
+ active: "{core.colors.neutral.500}",
460
460
  focused: "{core.colors.brand.500}",
461
461
  disabled: "{core.colors.neutral.200}",
462
- selected: "{core.colors.brand.500}",
463
- checked: "{core.colors.brand.500}",
464
- indeterminate: "{core.colors.brand.300}",
462
+ selected: "{core.colors.neutral.1000}",
463
+ checked: "{core.colors.neutral.1000}",
464
+ indeterminate: "{core.colors.neutral.1000}",
465
465
  pressed: "{core.colors.neutral.500}",
466
- expanded: "{core.colors.brand.500}",
466
+ expanded: "{core.colors.neutral.500}",
467
467
  invalid: "{core.colors.red.600}"
468
468
  },
469
469
  text: {
@@ -471,7 +471,7 @@ var baseTheme = {
471
471
  disabled: "{core.colors.neutral.500}",
472
472
  checked: "{core.colors.neutral.0}",
473
473
  invalid: "{core.colors.neutral.900}",
474
- indeterminate: "{core.colors.neutral.900}"
474
+ indeterminate: "{core.colors.neutral.0}"
475
475
  }
476
476
  },
477
477
  secondary: {
@@ -480,30 +480,30 @@ var baseTheme = {
480
480
  hover: "{core.colors.neutral.50}",
481
481
  active: "{core.colors.neutral.100}",
482
482
  disabled: "{core.colors.neutral.100}",
483
- selected: "{core.colors.brand.50}",
483
+ selected: "{core.colors.neutral.100}",
484
484
  droptarget: "{core.colors.neutral.50}",
485
- checked: "{core.colors.brand.500}",
486
- indeterminate: "{core.colors.brand.300}",
485
+ checked: "{core.colors.neutral.1000}",
486
+ indeterminate: "{core.colors.neutral.1000}",
487
487
  pressed: "{core.colors.neutral.100}",
488
488
  expanded: "{core.colors.neutral.50}"
489
489
  },
490
490
  border: {
491
491
  default: "{core.colors.neutral.200}",
492
492
  hover: "{core.colors.neutral.300}",
493
- active: "{core.colors.brand.500}",
493
+ active: "{core.colors.neutral.500}",
494
494
  focused: "{core.colors.brand.500}",
495
495
  disabled: "{core.colors.neutral.200}",
496
- selected: "{core.colors.brand.500}",
497
- checked: "{core.colors.brand.500}",
498
- indeterminate: "{core.colors.brand.300}",
496
+ selected: "{core.colors.neutral.1000}",
497
+ checked: "{core.colors.neutral.1000}",
498
+ indeterminate: "{core.colors.neutral.1000}",
499
499
  pressed: "{core.colors.neutral.300}",
500
- expanded: "{core.colors.brand.500}"
500
+ expanded: "{core.colors.neutral.500}"
501
501
  },
502
502
  text: {
503
503
  default: "{core.colors.neutral.900}",
504
504
  disabled: "{core.colors.neutral.500}",
505
505
  checked: "{core.colors.neutral.0}",
506
- indeterminate: "{core.colors.neutral.900}"
506
+ indeterminate: "{core.colors.neutral.0}"
507
507
  }
508
508
  },
509
509
  negative: {
@@ -590,7 +590,7 @@ var baseTheme = {
590
590
  checked: "{core.colors.neutral.500}",
591
591
  indeterminate: "{core.colors.neutral.300}",
592
592
  pressed: "{core.colors.neutral.500}",
593
- expanded: "{core.colors.brand.500}"
593
+ expanded: "{core.colors.neutral.500}"
594
594
  },
595
595
  text: {
596
596
  default: "{core.colors.neutral.700}",
@@ -606,8 +606,8 @@ var baseTheme = {
606
606
  hover: "{core.colors.neutral.50}",
607
607
  active: "{core.colors.neutral.100}",
608
608
  disabled: "{core.colors.neutral.100}",
609
- selected: "{core.colors.brand.50}",
610
- droptarget: "{core.colors.brand.50}",
609
+ selected: "{core.colors.neutral.100}",
610
+ droptarget: "{core.colors.neutral.100}",
611
611
  visited: "{core.colors.neutral.50}"
612
612
  },
613
613
  border: {
@@ -616,8 +616,8 @@ var baseTheme = {
616
616
  active: "{core.colors.neutral.300}",
617
617
  focused: "{core.colors.brand.500}",
618
618
  disabled: "{core.colors.neutral.100}",
619
- selected: "{core.colors.brand.300}",
620
- droptarget: "{core.colors.brand.300}"
619
+ selected: "{core.colors.neutral.400}",
620
+ droptarget: "{core.colors.neutral.400}"
621
621
  },
622
622
  text: {
623
623
  default: "{core.colors.neutral.900}",
@@ -631,7 +631,7 @@ var baseTheme = {
631
631
  hover: "{core.colors.neutral.100}",
632
632
  active: "{core.colors.neutral.200}",
633
633
  disabled: "{core.colors.neutral.100}",
634
- selected: "{core.colors.brand.50}",
634
+ selected: "{core.colors.neutral.100}",
635
635
  droptarget: "{core.colors.neutral.100}",
636
636
  visited: "{core.colors.neutral.100}"
637
637
  },
@@ -641,7 +641,7 @@ var baseTheme = {
641
641
  active: "{core.colors.neutral.300}",
642
642
  focused: "{core.colors.brand.500}",
643
643
  disabled: "{core.colors.neutral.100}",
644
- selected: "{core.colors.brand.300}"
644
+ selected: "{core.colors.neutral.400}"
645
645
  },
646
646
  text: {
647
647
  default: "{core.colors.neutral.700}",
@@ -837,16 +837,18 @@ var baseTheme = {
837
837
  },
838
838
  border: {
839
839
  default: "{core.colors.neutral.0}",
840
- focused: "{core.colors.brand.500}"
840
+ focused: "{core.colors.brand.500}",
841
+ selected: "{core.colors.neutral.1000}",
842
+ current: "{core.colors.neutral.1000}"
841
843
  },
842
844
  text: {
843
- default: "{core.colors.brand.700}",
844
- hover: "{core.colors.brand.900}",
845
- active: "{core.colors.brand.900}",
845
+ default: "{core.colors.neutral.800}",
846
+ hover: "{core.colors.neutral.1000}",
847
+ active: "{core.colors.neutral.1000}",
846
848
  disabled: "{core.colors.neutral.500}",
847
- current: "{core.colors.brand.900}",
849
+ current: "{core.colors.neutral.1000}",
848
850
  visited: "{core.colors.neutral.500}",
849
- expanded: "{core.colors.brand.900}"
851
+ expanded: "{core.colors.neutral.1000}"
850
852
  }
851
853
  },
852
854
  secondary: {
@@ -855,9 +857,9 @@ var baseTheme = {
855
857
  hover: "{core.colors.neutral.100}",
856
858
  active: "{core.colors.neutral.200}",
857
859
  disabled: "{core.colors.neutral.100}",
858
- selected: "{core.colors.brand.50}",
860
+ selected: "{core.colors.neutral.100}",
859
861
  droptarget: "{core.colors.neutral.100}",
860
- current: "{core.colors.brand.100}",
862
+ current: "{core.colors.neutral.200}",
861
863
  visited: "{core.colors.neutral.100}",
862
864
  expanded: "{core.colors.neutral.100}"
863
865
  },
@@ -867,15 +869,15 @@ var baseTheme = {
867
869
  active: "{core.colors.neutral.300}",
868
870
  focused: "{core.colors.brand.500}",
869
871
  disabled: "{core.colors.neutral.200}",
870
- selected: "{core.colors.brand.400}",
871
- current: "{core.colors.brand.500}"
872
+ selected: "{core.colors.neutral.1000}",
873
+ current: "{core.colors.neutral.1000}"
872
874
  },
873
875
  text: {
874
876
  default: "{core.colors.neutral.700}",
875
877
  hover: "{core.colors.neutral.900}",
876
878
  disabled: "{core.colors.neutral.500}",
877
- selected: "{core.colors.brand.700}",
878
- current: "{core.colors.brand.700}",
879
+ selected: "{core.colors.neutral.1000}",
880
+ current: "{core.colors.neutral.1000}",
879
881
  visited: "{core.colors.neutral.700}",
880
882
  expanded: "{core.colors.neutral.900}"
881
883
  }
@@ -1351,23 +1353,31 @@ var darkAlternate = {
1351
1353
  hover: "{core.colors.neutral.500}",
1352
1354
  active: "{core.colors.neutral.500}",
1353
1355
  disabled: "{core.colors.neutral.900}",
1354
- selected: "{core.colors.brand.700}",
1356
+ selected: "{core.colors.neutral.800}",
1355
1357
  droptarget: "{core.colors.neutral.700}",
1356
1358
  pressed: "{core.colors.neutral.500}",
1357
1359
  expanded: "{core.colors.neutral.500}",
1358
- invalid: "{core.colors.neutral.700}"
1360
+ invalid: "{core.colors.neutral.700}",
1361
+ checked: "{core.colors.neutral.0}",
1362
+ indeterminate: "{core.colors.neutral.0}"
1359
1363
  },
1360
1364
  border: {
1361
1365
  default: "{core.colors.neutral.500}",
1362
1366
  hover: "{core.colors.neutral.300}",
1367
+ active: "{core.colors.neutral.300}",
1363
1368
  focused: "{core.colors.brand.500}",
1364
1369
  disabled: "{core.colors.neutral.700}",
1365
- invalid: "{core.colors.red.300}"
1370
+ invalid: "{core.colors.red.300}",
1371
+ selected: "{core.colors.neutral.300}",
1372
+ checked: "{core.colors.neutral.0}",
1373
+ indeterminate: "{core.colors.neutral.0}"
1366
1374
  },
1367
1375
  text: {
1368
1376
  default: "{core.colors.neutral.0}",
1369
1377
  disabled: "{core.colors.neutral.500}",
1370
- invalid: "{core.colors.neutral.0}"
1378
+ invalid: "{core.colors.neutral.0}",
1379
+ checked: "{core.colors.neutral.900}",
1380
+ indeterminate: "{core.colors.neutral.900}"
1371
1381
  }
1372
1382
  },
1373
1383
  secondary: {
@@ -1376,27 +1386,30 @@ var darkAlternate = {
1376
1386
  hover: "{core.colors.neutral.500}",
1377
1387
  active: "{core.colors.neutral.500}",
1378
1388
  disabled: "{core.colors.neutral.900}",
1379
- selected: "{core.colors.brand.700}",
1389
+ selected: "{core.colors.neutral.800}",
1380
1390
  droptarget: "{core.colors.neutral.700}",
1381
1391
  pressed: "{core.colors.neutral.500}",
1382
- expanded: "{core.colors.neutral.500}"
1392
+ expanded: "{core.colors.neutral.500}",
1393
+ checked: "{core.colors.neutral.0}",
1394
+ indeterminate: "{core.colors.neutral.0}"
1383
1395
  },
1384
1396
  border: {
1385
1397
  default: "{core.colors.neutral.500}",
1386
1398
  hover: "{core.colors.neutral.300}",
1387
- active: "{core.colors.brand.500}",
1399
+ active: "{core.colors.neutral.300}",
1388
1400
  focused: "{core.colors.brand.500}",
1389
1401
  disabled: "{core.colors.neutral.700}",
1390
- selected: "{core.colors.brand.500}",
1391
- checked: "{core.colors.brand.500}",
1392
- indeterminate: "{core.colors.brand.300}",
1402
+ selected: "{core.colors.neutral.300}",
1403
+ checked: "{core.colors.neutral.0}",
1404
+ indeterminate: "{core.colors.neutral.0}",
1393
1405
  pressed: "{core.colors.neutral.300}",
1394
- expanded: "{core.colors.brand.500}"
1406
+ expanded: "{core.colors.neutral.300}"
1395
1407
  },
1396
1408
  text: {
1397
1409
  default: "{core.colors.neutral.0}",
1398
1410
  disabled: "{core.colors.neutral.500}",
1399
- checked: "{core.colors.neutral.0}"
1411
+ checked: "{core.colors.neutral.900}",
1412
+ indeterminate: "{core.colors.neutral.900}"
1400
1413
  }
1401
1414
  },
1402
1415
  negative: {
@@ -1458,7 +1471,7 @@ var darkAlternate = {
1458
1471
  hover: "{core.colors.neutral.700}",
1459
1472
  active: "{core.colors.neutral.700}",
1460
1473
  disabled: "{core.colors.neutral.700}",
1461
- selected: "{core.colors.brand.900}",
1474
+ selected: "{core.colors.neutral.700}",
1462
1475
  droptarget: "{core.colors.neutral.700}",
1463
1476
  visited: "{core.colors.neutral.700}"
1464
1477
  },
@@ -1476,7 +1489,7 @@ var darkAlternate = {
1476
1489
  hover: "{core.colors.neutral.500}",
1477
1490
  active: "{core.colors.neutral.500}",
1478
1491
  disabled: "{core.colors.neutral.700}",
1479
- selected: "{core.colors.brand.900}",
1492
+ selected: "{core.colors.neutral.500}",
1480
1493
  droptarget: "{core.colors.neutral.700}",
1481
1494
  visited: "{core.colors.neutral.700}"
1482
1495
  },
@@ -1632,16 +1645,18 @@ var darkAlternate = {
1632
1645
  },
1633
1646
  border: {
1634
1647
  default: "{core.colors.neutral.900}",
1635
- focused: "{core.colors.brand.400}"
1648
+ focused: "{core.colors.brand.400}",
1649
+ selected: "{core.colors.neutral.0}",
1650
+ current: "{core.colors.neutral.0}"
1636
1651
  },
1637
1652
  text: {
1638
- default: "{core.colors.brand.300}",
1639
- hover: "{core.colors.brand.100}",
1640
- active: "{core.colors.brand.100}",
1653
+ default: "{core.colors.neutral.200}",
1654
+ hover: "{core.colors.neutral.0}",
1655
+ active: "{core.colors.neutral.0}",
1641
1656
  disabled: "{core.colors.neutral.500}",
1642
- current: "{core.colors.brand.100}",
1657
+ current: "{core.colors.neutral.0}",
1643
1658
  visited: "{core.colors.neutral.300}",
1644
- expanded: "{core.colors.brand.100}"
1659
+ expanded: "{core.colors.neutral.0}"
1645
1660
  }
1646
1661
  },
1647
1662
  secondary: {
@@ -1649,8 +1664,8 @@ var darkAlternate = {
1649
1664
  default: "{core.colors.neutral.900}",
1650
1665
  hover: "{core.colors.neutral.700}",
1651
1666
  active: "{core.colors.neutral.700}",
1652
- selected: "{core.colors.brand.900}",
1653
- current: "{core.colors.brand.900}",
1667
+ selected: "{core.colors.neutral.700}",
1668
+ current: "{core.colors.neutral.700}",
1654
1669
  visited: "{core.colors.neutral.900}",
1655
1670
  expanded: "{core.colors.neutral.700}",
1656
1671
  disabled: "{core.colors.neutral.700}",
@@ -1661,15 +1676,15 @@ var darkAlternate = {
1661
1676
  hover: "{core.colors.neutral.500}",
1662
1677
  active: "{core.colors.neutral.500}",
1663
1678
  focused: "{core.colors.brand.400}",
1664
- selected: "{core.colors.brand.500}",
1665
- current: "{core.colors.brand.500}"
1679
+ selected: "{core.colors.neutral.300}",
1680
+ current: "{core.colors.neutral.300}"
1666
1681
  },
1667
1682
  text: {
1668
1683
  default: "{core.colors.neutral.300}",
1669
1684
  hover: "{core.colors.neutral.0}",
1670
1685
  disabled: "{core.colors.neutral.500}",
1671
- selected: "{core.colors.brand.300}",
1672
- current: "{core.colors.brand.300}",
1686
+ selected: "{core.colors.neutral.0}",
1687
+ current: "{core.colors.neutral.0}",
1673
1688
  visited: "{core.colors.neutral.300}",
1674
1689
  expanded: "{core.colors.neutral.50}"
1675
1690
  }
@@ -3,7 +3,9 @@ Object.defineProperty(exports, Symbol.toStringTag, {
3
3
  value: 'Module'
4
4
  });
5
5
  const require_react = require('../react-C1WRCOFF.cjs');
6
- const require_withDataviz = require('../withDataviz-B-XQ1MDT.cjs');
6
+ const require_baseBundle = require('../baseBundle-DaO6jyk3.cjs');
7
+ const require_withDataviz = require('../withDataviz-BzDgnXPu.cjs');
8
+ const require_toVars = require('../toVars-O-E9ryvq.cjs');
7
9
 
8
10
  //#region src/dataviz/useDatavizTokens.ts
9
11
  /**
@@ -38,8 +40,35 @@ var useDatavizTokens = () => {
38
40
  return tokens.dataviz;
39
41
  };
40
42
 
43
+ //#endregion
44
+ //#region src/dataviz/vars.ts
45
+ /**
46
+ * Typed CSS-var mirror of the dataviz semantic tokens — the extension's
47
+ * counterpart of the foundation's `vars` export.
48
+ *
49
+ * Var names derive from token paths alone, so this map is valid for any
50
+ * theme extended with `withDataviz` (only the values behind the CSS vars
51
+ * change per theme/mode). Chart code references the vars; the CSS emitted
52
+ * by `toCssVars` carries the values.
53
+ *
54
+ * @example
55
+ * ```tsx
56
+ * import { datavizVars } from '@ttoss/fsl-theme/dataviz';
57
+ *
58
+ * <rect fill={datavizVars.color.series[1]} />
59
+ * // → fill: 'var(--tt-dataviz-color-series-1)'
60
+ * ```
61
+ */
62
+ var datavizVars = require_toVars.buildVarsMap({
63
+ core: require_baseBundle.baseBundle.base.core,
64
+ semantic: {
65
+ dataviz: require_withDataviz.semanticDataviz
66
+ }
67
+ }).dataviz;
68
+
41
69
  //#endregion
42
70
  exports.coreDataviz = require_withDataviz.coreDataviz;
71
+ exports.datavizVars = datavizVars;
43
72
  exports.semanticDataviz = require_withDataviz.semanticDataviz;
44
73
  exports.useDatavizTokens = useDatavizTokens;
45
74
  exports.withDataviz = require_withDataviz.withDataviz;
@@ -1,5 +1,6 @@
1
1
 
2
2
  import { c as SemanticDataviz, i as ThemeBundle, s as CoreDataviz } from "../Types-8o6d09ll.cjs";
3
+ import { t as CssVarsMap } from "../toVars-BcSZEbMb.cjs";
3
4
 
4
5
  //#region src/dataviz/baseTheme.d.ts
5
6
  /**
@@ -39,6 +40,26 @@ declare const semanticDataviz: SemanticDataviz;
39
40
  */
40
41
  declare const useDatavizTokens: () => SemanticDataviz;
41
42
  //#endregion
43
+ //#region src/dataviz/vars.d.ts
44
+ /**
45
+ * Typed CSS-var mirror of the dataviz semantic tokens — the extension's
46
+ * counterpart of the foundation's `vars` export.
47
+ *
48
+ * Var names derive from token paths alone, so this map is valid for any
49
+ * theme extended with `withDataviz` (only the values behind the CSS vars
50
+ * change per theme/mode). Chart code references the vars; the CSS emitted
51
+ * by `toCssVars` carries the values.
52
+ *
53
+ * @example
54
+ * ```tsx
55
+ * import { datavizVars } from '@ttoss/fsl-theme/dataviz';
56
+ *
57
+ * <rect fill={datavizVars.color.series[1]} />
58
+ * // → fill: 'var(--tt-dataviz-color-series-1)'
59
+ * ```
60
+ */
61
+ declare const datavizVars: CssVarsMap<SemanticDataviz>;
62
+ //#endregion
42
63
  //#region src/dataviz/withDataviz.d.ts
43
64
  /**
44
65
  * Extend a `ThemeBundle` with the dataviz token layer.
@@ -63,4 +84,4 @@ declare const useDatavizTokens: () => SemanticDataviz;
63
84
  */
64
85
  declare const withDataviz: (bundle: ThemeBundle) => ThemeBundle;
65
86
  //#endregion
66
- export { type CoreDataviz, type SemanticDataviz, coreDataviz, semanticDataviz, useDatavizTokens, withDataviz };
87
+ export { type CoreDataviz, type SemanticDataviz, coreDataviz, datavizVars, semanticDataviz, useDatavizTokens, withDataviz };
@@ -1,5 +1,6 @@
1
1
 
2
2
  import { c as SemanticDataviz, i as ThemeBundle, s as CoreDataviz } from "../Types-8o6d09ll.mjs";
3
+ import { t as CssVarsMap } from "../toVars-BTDr1haK.mjs";
3
4
 
4
5
  //#region src/dataviz/baseTheme.d.ts
5
6
  /**
@@ -39,6 +40,26 @@ declare const semanticDataviz: SemanticDataviz;
39
40
  */
40
41
  declare const useDatavizTokens: () => SemanticDataviz;
41
42
  //#endregion
43
+ //#region src/dataviz/vars.d.ts
44
+ /**
45
+ * Typed CSS-var mirror of the dataviz semantic tokens — the extension's
46
+ * counterpart of the foundation's `vars` export.
47
+ *
48
+ * Var names derive from token paths alone, so this map is valid for any
49
+ * theme extended with `withDataviz` (only the values behind the CSS vars
50
+ * change per theme/mode). Chart code references the vars; the CSS emitted
51
+ * by `toCssVars` carries the values.
52
+ *
53
+ * @example
54
+ * ```tsx
55
+ * import { datavizVars } from '@ttoss/fsl-theme/dataviz';
56
+ *
57
+ * <rect fill={datavizVars.color.series[1]} />
58
+ * // → fill: 'var(--tt-dataviz-color-series-1)'
59
+ * ```
60
+ */
61
+ declare const datavizVars: CssVarsMap<SemanticDataviz>;
62
+ //#endregion
42
63
  //#region src/dataviz/withDataviz.d.ts
43
64
  /**
44
65
  * Extend a `ThemeBundle` with the dataviz token layer.
@@ -63,4 +84,4 @@ declare const useDatavizTokens: () => SemanticDataviz;
63
84
  */
64
85
  declare const withDataviz: (bundle: ThemeBundle) => ThemeBundle;
65
86
  //#endregion
66
- export { type CoreDataviz, type SemanticDataviz, coreDataviz, semanticDataviz, useDatavizTokens, withDataviz };
87
+ export { type CoreDataviz, type SemanticDataviz, coreDataviz, datavizVars, semanticDataviz, useDatavizTokens, withDataviz };
@@ -1,6 +1,8 @@
1
1
  /** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
2
- import { n as coreDataviz, r as semanticDataviz, t as withDataviz } from "../withDataviz-B3mEhBPh.mjs";
2
+ import { t as baseBundle } from "../baseBundle-BpCf8Cc9.mjs";
3
+ import { n as coreDataviz, r as semanticDataviz, t as withDataviz } from "../withDataviz-BKqs0un0.mjs";
3
4
  import { useTokens } from "../react.mjs";
5
+ import { t as buildVarsMap } from "../toVars-BDBDTI_F.mjs";
4
6
 
5
7
  //#region src/dataviz/useDatavizTokens.ts
6
8
  /**
@@ -36,4 +38,30 @@ var useDatavizTokens = () => {
36
38
  };
37
39
 
38
40
  //#endregion
39
- export { coreDataviz, semanticDataviz, useDatavizTokens, withDataviz };
41
+ //#region src/dataviz/vars.ts
42
+ /**
43
+ * Typed CSS-var mirror of the dataviz semantic tokens — the extension's
44
+ * counterpart of the foundation's `vars` export.
45
+ *
46
+ * Var names derive from token paths alone, so this map is valid for any
47
+ * theme extended with `withDataviz` (only the values behind the CSS vars
48
+ * change per theme/mode). Chart code references the vars; the CSS emitted
49
+ * by `toCssVars` carries the values.
50
+ *
51
+ * @example
52
+ * ```tsx
53
+ * import { datavizVars } from '@ttoss/fsl-theme/dataviz';
54
+ *
55
+ * <rect fill={datavizVars.color.series[1]} />
56
+ * // → fill: 'var(--tt-dataviz-color-series-1)'
57
+ * ```
58
+ */
59
+ var datavizVars = buildVarsMap({
60
+ core: baseBundle.base.core,
61
+ semantic: {
62
+ dataviz: semanticDataviz
63
+ }
64
+ }).dataviz;
65
+
66
+ //#endregion
67
+ export { coreDataviz, datavizVars, semanticDataviz, useDatavizTokens, withDataviz };
package/dist/index.cjs CHANGED
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, {
3
3
  value: 'Module'
4
4
  });
5
- const require_createTheme = require('./createTheme-BzlJdFAG.cjs');
5
+ const require_createTheme = require('./createTheme-r7mUCPFX.cjs');
6
6
  const require_themes_bruttal = require('./themes/bruttal.cjs');
7
7
  exports.baseTheme = require_createTheme.baseTheme;
8
8
  exports.bruttal = require_themes_bruttal.bruttal;
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
1
  /** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
2
- import { a as darkAlternate, i as baseTheme, n as createTheme } from "./createTheme-gTjIryKH.mjs";
2
+ import { a as darkAlternate, i as baseTheme, n as createTheme } from "./createTheme-C05ONnLw.mjs";
3
3
  import { bruttal } from "./themes/bruttal.mjs";
4
4
  export { baseTheme, bruttal, createTheme, darkAlternate };
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, {
3
3
  value: 'Module'
4
4
  });
5
- const require_createTheme = require('../createTheme-BzlJdFAG.cjs');
5
+ const require_createTheme = require('../createTheme-r7mUCPFX.cjs');
6
6
  const require_helpers = require('../helpers-BU40JvFA.cjs');
7
- const require_withDataviz = require('../withDataviz-B-XQ1MDT.cjs');
7
+ const require_withDataviz = require('../withDataviz-BzDgnXPu.cjs');
8
8
 
9
9
  //#region src/themes/bruttal.ts
10
10
  /**
@@ -1,7 +1,7 @@
1
1
  /** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
2
- import { a as darkAlternate, n as createTheme } from "../createTheme-gTjIryKH.mjs";
2
+ import { a as darkAlternate, n as createTheme } from "../createTheme-C05ONnLw.mjs";
3
3
  import { r as deepMerge } from "../helpers-BXaKe2s3.mjs";
4
- import { t as withDataviz } from "../withDataviz-B3mEhBPh.mjs";
4
+ import { t as withDataviz } from "../withDataviz-BKqs0un0.mjs";
5
5
 
6
6
  //#region src/themes/bruttal.ts
7
7
  /**
@@ -0,0 +1,39 @@
1
+ /** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
2
+ import { o as isPlainObject } from "./helpers-BXaKe2s3.mjs";
3
+ import { t as toCssVarName } from "./toCssVars-CTGqZ_t3.mjs";
4
+
5
+ //#region src/roots/toVars.ts
6
+ /**
7
+ * Build a deeply-nested CSS var-reference map from a theme's semantic layer.
8
+ *
9
+ * Walks `theme.semantic` recursively and replaces every leaf value with the
10
+ * corresponding `var(--tt-*)` CSS custom property reference. The resulting
11
+ * object has the exact same shape as `theme.semantic` but with `string` leaves.
12
+ *
13
+ * Keys starting with `$` are skipped (deprecation metadata).
14
+ *
15
+ * @example
16
+ * ```ts
17
+ * import { buildVarsMap } from './roots/toVars';
18
+ * import { baseTheme } from './baseTheme';
19
+ *
20
+ * const vars = buildVarsMap(baseTheme);
21
+ * vars.colors.action.primary.background.default
22
+ * // → 'var(--tt-colors-action-primary-background-default)'
23
+ * ```
24
+ */
25
+ var buildVarsMap = theme => {
26
+ const walk = (obj, prefix) => {
27
+ const result = {};
28
+ for (const [key, value] of Object.entries(obj)) {
29
+ if (key.startsWith("$")) continue;
30
+ const fullPath = `${prefix}.${key}`;
31
+ if (isPlainObject(value)) result[key] = walk(value, fullPath);else if (typeof value === "string" || typeof value === "number") result[key] = `var(${toCssVarName(fullPath)})`;
32
+ }
33
+ return result;
34
+ };
35
+ return walk(theme.semantic, "semantic");
36
+ };
37
+
38
+ //#endregion
39
+ export { buildVarsMap as t };