@tenerife.music/ui 1.0.13 → 1.0.16

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.
@@ -1122,19 +1122,19 @@ function applyBrandOverrides(brand, mode) {
1122
1122
  });
1123
1123
  }
1124
1124
  if (overrides.radius.componentRadius) {
1125
- const { componentRadius } = overrides.radius;
1126
- if (componentRadius.button) {
1127
- Object.entries(componentRadius.button).forEach(([key, value]) => {
1125
+ const { componentRadius: componentRadius2 } = overrides.radius;
1126
+ if (componentRadius2.button) {
1127
+ Object.entries(componentRadius2.button).forEach(([key, value]) => {
1128
1128
  root.style.setProperty(`--brand-${namespace}-radius-button-${key}`, value);
1129
1129
  });
1130
1130
  }
1131
- if (componentRadius.card) {
1132
- Object.entries(componentRadius.card).forEach(([key, value]) => {
1131
+ if (componentRadius2.card) {
1132
+ Object.entries(componentRadius2.card).forEach(([key, value]) => {
1133
1133
  root.style.setProperty(`--brand-${namespace}-radius-card-${key}`, value);
1134
1134
  });
1135
1135
  }
1136
- if (componentRadius.input) {
1137
- Object.entries(componentRadius.input).forEach(([key, value]) => {
1136
+ if (componentRadius2.input) {
1137
+ Object.entries(componentRadius2.input).forEach(([key, value]) => {
1138
1138
  root.style.setProperty(`--brand-${namespace}-radius-input-${key}`, value);
1139
1139
  });
1140
1140
  }
@@ -1186,13 +1186,18 @@ var primaryColors = {
1186
1186
  100: "210 40% 96%",
1187
1187
  200: "217 32.6% 17.5%",
1188
1188
  300: "216 28% 26%",
1189
- 400: "215 25% 27%",
1190
- 500: "215 20% 35%",
1191
- // Base primary
1192
- 600: "215 16% 47%",
1193
- 700: "216 12% 54%",
1194
- 800: "217 10% 62%",
1195
- 900: "222 47.4% 11.2%",
1189
+ 400: "215 25% 30%",
1190
+ // Adjusted for better progression
1191
+ 500: "215 20% 38%",
1192
+ // Adjusted for better progression
1193
+ 600: "215 16% 45%",
1194
+ // Adjusted for better progression
1195
+ 700: "216 12% 35%",
1196
+ // Rebalanced for semantic strength (L* ~35)
1197
+ 800: "217 10% 28%",
1198
+ // Adjusted for proper progression
1199
+ 900: "222 47.4% 18%",
1200
+ // Adjusted for better progression
1196
1201
  950: "222 84% 4.9%"
1197
1202
  // Darkest blue
1198
1203
  };
@@ -1202,12 +1207,15 @@ var accentColors = {
1202
1207
  200: "280 60% 85%",
1203
1208
  300: "280 55% 75%",
1204
1209
  400: "280 50% 65%",
1205
- 500: "280 70% 67%",
1206
- // Base accent (night mode primary)
1207
- 600: "259 65% 58%",
1208
- 700: "259 60% 50%",
1209
- 800: "259 55% 45%",
1210
- 900: "259 50% 40%",
1210
+ 500: "280 65% 72%",
1211
+ // Adjusted for WCAG AA contrast (4.5:1) with dark text in night mode
1212
+ 600: "259 65% 59%",
1213
+ // Default accent - lightened for better contrast vs secondary (L* ~59, was 52, 15 delta from secondary-600)
1214
+ 700: "259 60% 44%",
1215
+ // Active state - rebalanced for semantic strength (L* ~44, 12 delta from secondary-700)
1216
+ 800: "259 55% 38%",
1217
+ // Adjusted for proper progression
1218
+ 900: "259 50% 32%",
1211
1219
  950: "259 45% 30%"
1212
1220
  };
1213
1221
  var secondaryColors = {
@@ -1216,12 +1224,15 @@ var secondaryColors = {
1216
1224
  200: "173 100% 85%",
1217
1225
  300: "173 100% 70%",
1218
1226
  400: "173 100% 55%",
1219
- 500: "173 100% 37%",
1220
- // Base secondary (Tenerife #00bfa6)
1221
- 600: "173 100% 32%",
1222
- 700: "173 95% 27%",
1227
+ 500: "173 100% 45%",
1228
+ // Adjusted for better scale progression
1229
+ 600: "173 100% 44%",
1230
+ // Default secondary - rebalanced for better contrast vs primary (L* ~44, was 38)
1231
+ 700: "173 95% 32%",
1232
+ // Active state - rebalanced for semantic strength (L* ~32)
1223
1233
  800: "173 90% 22%",
1224
- 900: "173 85% 17%",
1234
+ // Primary variant - darkened for dominance (L* ~22, was 26)
1235
+ 900: "173 85% 20%",
1225
1236
  950: "173 80% 12%"
1226
1237
  };
1227
1238
  var surfaceColors = {
@@ -1314,13 +1325,13 @@ var chartColors = {
1314
1325
  var textColors = {
1315
1326
  day: {
1316
1327
  primary: "0 0% 9%",
1317
- // Almost black
1328
+ // Almost black (neutral-900 equivalent)
1318
1329
  secondary: "0 0% 45%",
1319
1330
  // Medium gray
1320
1331
  tertiary: "0 0% 65%",
1321
1332
  // Light gray
1322
- muted: "0 0% 38%",
1323
- // Muted gray with stronger contrast
1333
+ muted: "0 0% 42%",
1334
+ // Muted gray - adjusted for WCAG AA contrast (4.5:1) on surface.elevated2
1324
1335
  inverse: "0 0% 100%"
1325
1336
  // White (for dark backgrounds)
1326
1337
  },
@@ -1570,6 +1581,50 @@ var tailwindThemeColors = {
1570
1581
  }
1571
1582
  };
1572
1583
 
1584
+ // src/tokens/motion/v2.ts
1585
+ var motionV2Durations = {
1586
+ fast: "150ms",
1587
+ // Quick interactions
1588
+ normal: "250ms",
1589
+ // Default transitions
1590
+ slow: "350ms",
1591
+ // Emphasized animations
1592
+ reduced: "0ms"
1593
+ // For prefers-reduced-motion
1594
+ };
1595
+ var motionV2Easings = {
1596
+ soft: "cubic-bezier(0.22, 1, 0.36, 1)",
1597
+ // Gentle, smooth
1598
+ standard: "cubic-bezier(0.4, 0, 0.2, 1)",
1599
+ // Material Design standard
1600
+ emphasized: "cubic-bezier(0.2, 0, 0, 1)"
1601
+ // Strong, decisive
1602
+ };
1603
+ var motionV2Transitions = {
1604
+ fast: `${motionV2Durations.fast} ${motionV2Easings.standard}`,
1605
+ normal: `${motionV2Durations.normal} ${motionV2Easings.standard}`,
1606
+ slow: `${motionV2Durations.slow} ${motionV2Easings.emphasized}`,
1607
+ soft: `${motionV2Durations.normal} ${motionV2Easings.soft}`,
1608
+ reduced: `${motionV2Durations.reduced} linear`
1609
+ };
1610
+ var motionV2CSSVariables = {
1611
+ // Durations
1612
+ "--motion-duration-fast": motionV2Durations.fast,
1613
+ "--motion-duration-normal": motionV2Durations.normal,
1614
+ "--motion-duration-slow": motionV2Durations.slow,
1615
+ "--motion-duration-reduced": motionV2Durations.reduced,
1616
+ // Easings
1617
+ "--motion-easing-soft": motionV2Easings.soft,
1618
+ "--motion-easing-standard": motionV2Easings.standard,
1619
+ "--motion-easing-emphasized": motionV2Easings.emphasized,
1620
+ // Transitions
1621
+ "--motion-transition-fast": motionV2Transitions.fast,
1622
+ "--motion-transition-normal": motionV2Transitions.normal,
1623
+ "--motion-transition-slow": motionV2Transitions.slow,
1624
+ "--motion-transition-soft": motionV2Transitions.soft,
1625
+ "--motion-transition-reduced": motionV2Transitions.reduced
1626
+ };
1627
+
1573
1628
  // src/tokens/motion.ts
1574
1629
  var durations = {
1575
1630
  instant: "0ms",
@@ -1682,6 +1737,940 @@ var motionCSSVariables = {
1682
1737
  "--transition-elastic": transitions.elastic
1683
1738
  };
1684
1739
 
1740
+ // src/tokens/radius.ts
1741
+ var borderRadius = {
1742
+ // No radius
1743
+ none: "0",
1744
+ // Extra small radius
1745
+ xs: "0.125rem",
1746
+ // 2px
1747
+ // Small radius
1748
+ sm: "0.25rem",
1749
+ // 4px (same as sm)
1750
+ base: "0.25rem",
1751
+ // 4px (alias)
1752
+ // Medium radius
1753
+ md: "0.375rem",
1754
+ // 6px
1755
+ // Large radius
1756
+ lg: "0.5rem",
1757
+ // 8px (2 × base)
1758
+ // Extra large radius
1759
+ xl: "0.75rem",
1760
+ // 12px (3 × base)
1761
+ // 2XL radius
1762
+ "2xl": "1rem",
1763
+ // 16px (4 × base)
1764
+ // 3XL radius
1765
+ "3xl": "1.5rem",
1766
+ // 24px (6 × base)
1767
+ // Full radius (circular)
1768
+ full: "9999px"
1769
+ };
1770
+ var componentRadius = {
1771
+ // Button radius standards
1772
+ button: {
1773
+ // 4px (compact buttons)
1774
+ md: borderRadius.md},
1775
+ // Card radius standards
1776
+ card: {
1777
+ // 4px (compact cards)
1778
+ md: borderRadius.md},
1779
+ // Input/Form field radius standards
1780
+ input: {
1781
+ // 4px (compact inputs)
1782
+ md: borderRadius.md},
1783
+ // Badge/Status radius standards
1784
+ badge: {
1785
+ // 2px (compact badges)
1786
+ md: borderRadius.sm},
1787
+ // Modal/Dialog radius standards
1788
+ modal: {
1789
+ // 6px (small modals)
1790
+ md: borderRadius.lg},
1791
+ // Tooltip radius standards
1792
+ tooltip: {
1793
+ sm: borderRadius.sm},
1794
+ // Toast/Notification radius standards
1795
+ toast: {
1796
+ // 6px (compact toasts)
1797
+ md: borderRadius.lg},
1798
+ // Chip/Tag radius standards
1799
+ chip: {
1800
+ // 2px (compact chips)
1801
+ md: borderRadius.sm},
1802
+ // Image/Media radius standards
1803
+ image: {
1804
+ // 4px (subtle rounding)
1805
+ md: borderRadius.md}
1806
+ };
1807
+ var radiusCSSVariables = {
1808
+ // Border radius scale
1809
+ "--radius-none": borderRadius.none,
1810
+ "--radius-xs": borderRadius.xs,
1811
+ "--radius-sm": borderRadius.sm,
1812
+ "--radius-base": borderRadius.base,
1813
+ "--radius-md": borderRadius.md,
1814
+ "--radius-lg": borderRadius.lg,
1815
+ "--radius-xl": borderRadius.xl,
1816
+ "--radius-2xl": borderRadius["2xl"],
1817
+ "--radius-3xl": borderRadius["3xl"],
1818
+ "--radius-full": borderRadius.full,
1819
+ // Default radius variable (commonly used)
1820
+ "--radius": borderRadius.md,
1821
+ // Default to medium (6px)
1822
+ // Component-specific radius variables
1823
+ "--radius-button": componentRadius.button.md,
1824
+ "--radius-card": componentRadius.card.md,
1825
+ "--radius-input": componentRadius.input.md,
1826
+ "--radius-badge": componentRadius.badge.md,
1827
+ "--radius-modal": componentRadius.modal.md,
1828
+ "--radius-tooltip": componentRadius.tooltip.sm,
1829
+ "--radius-toast": componentRadius.toast.md,
1830
+ "--radius-chip": componentRadius.chip.md,
1831
+ "--radius-image": componentRadius.image.md
1832
+ };
1833
+
1834
+ // src/tokens/shadows.ts
1835
+ var shadowBase = {
1836
+ black: "0 0 0"};
1837
+ var shadowOpacity = {
1838
+ xs: "0.05",
1839
+ sm: "0.1",
1840
+ md: "0.1",
1841
+ lg: "0.1",
1842
+ xl: "0.1",
1843
+ "2xl": "0.25"};
1844
+ var elevationShadows = {
1845
+ none: "none",
1846
+ xs: `0 1px 2px 0 rgb(${shadowBase.black} / ${shadowOpacity.xs})`,
1847
+ sm: `0 1px 3px 0 rgb(${shadowBase.black} / ${shadowOpacity.sm}), 0 1px 2px -1px rgb(${shadowBase.black} / ${shadowOpacity.sm})`,
1848
+ md: `0 4px 6px -1px rgb(${shadowBase.black} / ${shadowOpacity.md}), 0 2px 4px -2px rgb(${shadowBase.black} / ${shadowOpacity.md})`,
1849
+ lg: `0 10px 15px -3px rgb(${shadowBase.black} / ${shadowOpacity.lg}), 0 4px 6px -4px rgb(${shadowBase.black} / ${shadowOpacity.lg})`,
1850
+ xl: `0 20px 25px -5px rgb(${shadowBase.black} / ${shadowOpacity.xl}), 0 8px 10px -6px rgb(${shadowBase.black} / ${shadowOpacity.xl})`,
1851
+ "2xl": `0 25px 50px -12px rgb(${shadowBase.black} / ${shadowOpacity["2xl"]})`
1852
+ };
1853
+ var primaryColoredShadows = {
1854
+ xs: "0 1px 2px 0 hsl(var(--primary-500) / 0.15)",
1855
+ sm: "0 2px 4px 0 hsl(var(--primary-500) / 0.2)",
1856
+ md: "0 4px 8px 0 hsl(var(--primary-500) / 0.3)",
1857
+ lg: "0 8px 16px 0 hsl(var(--primary-500) / 0.4)",
1858
+ xl: "0 12px 24px 0 hsl(var(--primary-500) / 0.5)",
1859
+ "2xl": "0 16px 32px 0 hsl(var(--primary-500) / 0.6)"
1860
+ };
1861
+ var accentColoredShadows = {
1862
+ xs: "0 1px 2px 0 hsl(var(--accent-500) / 0.15)",
1863
+ sm: "0 2px 4px 0 hsl(var(--accent-500) / 0.2)",
1864
+ md: "0 4px 8px 0 hsl(var(--accent-500) / 0.3)",
1865
+ lg: "0 8px 16px 0 hsl(var(--accent-500) / 0.4)",
1866
+ xl: "0 12px 24px 0 hsl(var(--accent-500) / 0.5)",
1867
+ "2xl": "0 16px 32px 0 hsl(var(--accent-500) / 0.6)"
1868
+ };
1869
+ var glowEffects = {
1870
+ // Primary glow effects
1871
+ "glow-primary": "0 0 20px 0 hsl(var(--primary-500) / 0.5), 0 0 40px 0 hsl(var(--primary-500) / 0.3)",
1872
+ "glow-primary-subtle": "0 0 8px 0 hsl(var(--primary-500) / 0.3)",
1873
+ "glow-primary-medium": "0 0 16px 0 hsl(var(--primary-500) / 0.5)",
1874
+ "glow-primary-strong": "0 0 24px 0 hsl(var(--primary-500) / 0.6)",
1875
+ // Accent glow effects
1876
+ "glow-accent": "0 0 20px 0 hsl(var(--accent-500) / 0.5), 0 0 40px 0 hsl(var(--accent-500) / 0.3)",
1877
+ "glow-accent-subtle": "0 0 8px 0 hsl(var(--accent-500) / 0.3)",
1878
+ "glow-accent-medium": "0 0 16px 0 hsl(var(--accent-500) / 0.5)",
1879
+ "glow-accent-strong": "0 0 24px 0 hsl(var(--accent-500) / 0.6)"
1880
+ };
1881
+ var focusRings = {
1882
+ default: "0 0 0 3px hsl(var(--ring) / 0.5)",
1883
+ primary: "0 0 0 3px hsl(var(--primary-500) / 0.3)",
1884
+ accent: "0 0 0 3px hsl(var(--accent-500) / 0.3)",
1885
+ "focus-primary": "0 0 0 3px hsl(var(--primary-500) / 0.3)",
1886
+ "focus-accent": "0 0 0 3px hsl(var(--accent-500) / 0.3)"
1887
+ };
1888
+ var shadowCSSVariables = {
1889
+ // Elevation shadows
1890
+ "--shadow-none": elevationShadows.none,
1891
+ "--shadow-xs": elevationShadows.xs,
1892
+ "--shadow-sm": elevationShadows.sm,
1893
+ "--shadow-md": elevationShadows.md,
1894
+ "--shadow-lg": elevationShadows.lg,
1895
+ "--shadow-xl": elevationShadows.xl,
1896
+ "--shadow-2xl": elevationShadows["2xl"],
1897
+ // Primary colored shadows
1898
+ "--shadow-primary-xs": primaryColoredShadows.xs,
1899
+ "--shadow-primary-sm": primaryColoredShadows.sm,
1900
+ "--shadow-primary-md": primaryColoredShadows.md,
1901
+ "--shadow-primary-lg": primaryColoredShadows.lg,
1902
+ "--shadow-primary-xl": primaryColoredShadows.xl,
1903
+ "--shadow-primary-2xl": primaryColoredShadows["2xl"],
1904
+ // Accent colored shadows
1905
+ "--shadow-accent-xs": accentColoredShadows.xs,
1906
+ "--shadow-accent-sm": accentColoredShadows.sm,
1907
+ "--shadow-accent-md": accentColoredShadows.md,
1908
+ "--shadow-accent-lg": accentColoredShadows.lg,
1909
+ "--shadow-accent-xl": accentColoredShadows.xl,
1910
+ "--shadow-accent-2xl": accentColoredShadows["2xl"],
1911
+ // Glow effects
1912
+ "--glow-primary": glowEffects["glow-primary"],
1913
+ "--glow-primary-subtle": glowEffects["glow-primary-subtle"],
1914
+ "--glow-primary-medium": glowEffects["glow-primary-medium"],
1915
+ "--glow-primary-strong": glowEffects["glow-primary-strong"],
1916
+ "--glow-accent": glowEffects["glow-accent"],
1917
+ "--glow-accent-subtle": glowEffects["glow-accent-subtle"],
1918
+ "--glow-accent-medium": glowEffects["glow-accent-medium"],
1919
+ "--glow-accent-strong": glowEffects["glow-accent-strong"],
1920
+ // Focus rings
1921
+ "--focus-ring-default": focusRings.default,
1922
+ "--focus-ring-primary": focusRings.primary,
1923
+ "--focus-ring-accent": focusRings.accent,
1924
+ "--focus-primary": focusRings["focus-primary"],
1925
+ "--focus-accent": focusRings["focus-accent"]
1926
+ };
1927
+
1928
+ // src/tokens/spacing.ts
1929
+ var spacing = {
1930
+ // Zero spacing
1931
+ 0: "0",
1932
+ px: "1px",
1933
+ // Half unit (4px)
1934
+ 0.5: "0.125rem",
1935
+ // 4px
1936
+ // Base unit multiples (8px increments)
1937
+ 1: "0.25rem",
1938
+ // 4px (half unit, common)
1939
+ 1.5: "0.375rem",
1940
+ // 6px (rare, for fine adjustments)
1941
+ 2: "0.5rem",
1942
+ // 8px (base unit)
1943
+ 2.5: "0.625rem",
1944
+ // 10px (rare)
1945
+ 3: "0.75rem",
1946
+ // 12px (1.5 × base)
1947
+ 3.5: "0.875rem",
1948
+ // 14px (rare)
1949
+ 4: "1rem",
1950
+ // 16px (2 × base)
1951
+ 5: "1.25rem",
1952
+ // 20px (2.5 × base)
1953
+ 6: "1.5rem",
1954
+ // 24px (3 × base)
1955
+ 7: "1.75rem",
1956
+ // 28px (3.5 × base)
1957
+ 8: "2rem",
1958
+ // 32px (4 × base)
1959
+ 9: "2.25rem",
1960
+ // 36px (4.5 × base)
1961
+ 10: "2.5rem",
1962
+ // 40px (5 × base)
1963
+ 11: "2.75rem",
1964
+ // 44px (5.5 × base)
1965
+ 12: "3rem",
1966
+ // 48px (6 × base)
1967
+ 14: "3.5rem",
1968
+ // 56px (7 × base)
1969
+ 16: "4rem",
1970
+ // 64px (8 × base)
1971
+ 20: "5rem",
1972
+ // 80px (10 × base)
1973
+ 24: "6rem"};
1974
+ var semanticSpacing = {
1975
+ // Extra small spacing (tight, minimal)
1976
+ xs: spacing[1],
1977
+ // 4px (0.25rem)
1978
+ // Small spacing (compact)
1979
+ sm: spacing[2],
1980
+ // 8px (0.5rem)
1981
+ // Medium spacing (default)
1982
+ md: spacing[4],
1983
+ // 16px (1rem)
1984
+ // Large spacing (spacious)
1985
+ lg: spacing[6],
1986
+ // 24px (1.5rem)
1987
+ // Extra large spacing (very spacious)
1988
+ xl: spacing[8],
1989
+ // 32px (2rem)
1990
+ // 2XL spacing (section-level)
1991
+ "2xl": spacing[12],
1992
+ // 48px (3rem)
1993
+ // 3XL spacing (major sections)
1994
+ "3xl": spacing[16],
1995
+ // 64px (4rem)
1996
+ // 4XL spacing (page sections)
1997
+ "4xl": spacing[20],
1998
+ // 80px (5rem)
1999
+ // 5XL spacing (hero sections)
2000
+ "5xl": spacing[24],
2001
+ // 96px (6rem)
2002
+ // None (no spacing)
2003
+ none: spacing[0]
2004
+ // 0
2005
+ };
2006
+ var layoutSpacing = {
2007
+ // Section spacing (vertical spacing between major sections)
2008
+ section: {
2009
+ xs: spacing[6],
2010
+ // 24px (compact sections)
2011
+ sm: spacing[8],
2012
+ // 32px (small sections)
2013
+ md: spacing[12],
2014
+ // 48px (default sections)
2015
+ lg: spacing[16],
2016
+ // 64px (large sections)
2017
+ xl: spacing[20],
2018
+ // 80px (extra large sections)
2019
+ "2xl": spacing[24]
2020
+ // 96px (hero sections)
2021
+ },
2022
+ // Container spacing (padding inside containers)
2023
+ container: {
2024
+ xs: spacing[2],
2025
+ // 8px (tight containers)
2026
+ sm: spacing[4],
2027
+ // 16px (compact containers)
2028
+ md: spacing[6],
2029
+ // 24px (default containers)
2030
+ lg: spacing[8],
2031
+ // 32px (spacious containers)
2032
+ xl: spacing[12]
2033
+ // 48px (very spacious containers)
2034
+ },
2035
+ // Grid spacing (gap between grid items)
2036
+ grid: {
2037
+ xs: spacing[2],
2038
+ // 8px (tight grids)
2039
+ sm: spacing[4],
2040
+ // 16px (compact grids)
2041
+ md: spacing[6],
2042
+ // 24px (default grids)
2043
+ lg: spacing[8],
2044
+ // 32px (spacious grids)
2045
+ xl: spacing[12]
2046
+ // 48px (very spacious grids)
2047
+ },
2048
+ // Stack spacing (gap between stacked items)
2049
+ stack: {
2050
+ xs: spacing[1],
2051
+ // 4px (tight stacks)
2052
+ sm: spacing[2],
2053
+ // 8px (compact stacks)
2054
+ md: spacing[4],
2055
+ // 16px (default stacks)
2056
+ lg: spacing[6],
2057
+ // 24px (spacious stacks)
2058
+ xl: spacing[8]
2059
+ // 32px (very spacious stacks)
2060
+ },
2061
+ // Component internal spacing (padding inside components)
2062
+ component: {
2063
+ xs: spacing[1],
2064
+ // 4px (tight components)
2065
+ sm: spacing[2],
2066
+ // 8px (compact components)
2067
+ md: spacing[4],
2068
+ // 16px (default components)
2069
+ lg: spacing[6],
2070
+ // 24px (spacious components)
2071
+ xl: spacing[8]
2072
+ // 32px (extra spacious components)
2073
+ }
2074
+ };
2075
+ var spacingCSSVariables = {
2076
+ // Base spacing scale
2077
+ "--spacing-0": spacing[0],
2078
+ "--spacing-px": spacing.px,
2079
+ "--spacing-0-5": spacing[0.5],
2080
+ "--spacing-1": spacing[1],
2081
+ "--spacing-1-5": spacing[1.5],
2082
+ "--spacing-2": spacing[2],
2083
+ "--spacing-2-5": spacing[2.5],
2084
+ "--spacing-3": spacing[3],
2085
+ "--spacing-3-5": spacing[3.5],
2086
+ "--spacing-4": spacing[4],
2087
+ "--spacing-5": spacing[5],
2088
+ "--spacing-6": spacing[6],
2089
+ "--spacing-7": spacing[7],
2090
+ "--spacing-8": spacing[8],
2091
+ "--spacing-9": spacing[9],
2092
+ "--spacing-10": spacing[10],
2093
+ "--spacing-11": spacing[11],
2094
+ "--spacing-12": spacing[12],
2095
+ "--spacing-14": spacing[14],
2096
+ "--spacing-16": spacing[16],
2097
+ "--spacing-20": spacing[20],
2098
+ "--spacing-24": spacing[24],
2099
+ // Semantic spacing
2100
+ "--spacing-xs": semanticSpacing.xs,
2101
+ "--spacing-sm": semanticSpacing.sm,
2102
+ "--spacing-md": semanticSpacing.md,
2103
+ "--spacing-lg": semanticSpacing.lg,
2104
+ "--spacing-xl": semanticSpacing.xl,
2105
+ "--spacing-2xl": semanticSpacing["2xl"],
2106
+ "--spacing-3xl": semanticSpacing["3xl"],
2107
+ "--spacing-4xl": semanticSpacing["4xl"],
2108
+ "--spacing-5xl": semanticSpacing["5xl"],
2109
+ "--spacing-none": semanticSpacing.none,
2110
+ // Layout spacing - sections
2111
+ "--layout-section-xs": layoutSpacing.section.xs,
2112
+ "--layout-section-sm": layoutSpacing.section.sm,
2113
+ "--layout-section-md": layoutSpacing.section.md,
2114
+ "--layout-section-lg": layoutSpacing.section.lg,
2115
+ "--layout-section-xl": layoutSpacing.section.xl,
2116
+ "--layout-section-2xl": layoutSpacing.section["2xl"],
2117
+ // Layout spacing - containers
2118
+ "--layout-container-xs": layoutSpacing.container.xs,
2119
+ "--layout-container-sm": layoutSpacing.container.sm,
2120
+ "--layout-container-md": layoutSpacing.container.md,
2121
+ "--layout-container-lg": layoutSpacing.container.lg,
2122
+ "--layout-container-xl": layoutSpacing.container.xl,
2123
+ // Layout spacing - grids
2124
+ "--layout-grid-xs": layoutSpacing.grid.xs,
2125
+ "--layout-grid-sm": layoutSpacing.grid.sm,
2126
+ "--layout-grid-md": layoutSpacing.grid.md,
2127
+ "--layout-grid-lg": layoutSpacing.grid.lg,
2128
+ "--layout-grid-xl": layoutSpacing.grid.xl,
2129
+ // Layout spacing - stacks
2130
+ "--layout-stack-xs": layoutSpacing.stack.xs,
2131
+ "--layout-stack-sm": layoutSpacing.stack.sm,
2132
+ "--layout-stack-md": layoutSpacing.stack.md,
2133
+ "--layout-stack-lg": layoutSpacing.stack.lg,
2134
+ "--layout-stack-xl": layoutSpacing.stack.xl,
2135
+ // Layout spacing - components
2136
+ "--layout-component-xs": layoutSpacing.component.xs,
2137
+ "--layout-component-sm": layoutSpacing.component.sm,
2138
+ "--layout-component-md": layoutSpacing.component.md,
2139
+ "--layout-component-lg": layoutSpacing.component.lg,
2140
+ "--layout-component-xl": layoutSpacing.component.xl
2141
+ };
2142
+
2143
+ // src/tokens/typography.ts
2144
+ var fontFamily = {
2145
+ // Primary font - Inter (default sans)
2146
+ sans: [
2147
+ "Inter",
2148
+ "ui-sans-serif",
2149
+ "system-ui",
2150
+ "-apple-system",
2151
+ "BlinkMacSystemFont",
2152
+ "Segoe UI",
2153
+ "Roboto",
2154
+ "Helvetica Neue",
2155
+ "Arial",
2156
+ "Noto Sans",
2157
+ "sans-serif",
2158
+ "Apple Color Emoji",
2159
+ "Segoe UI Emoji",
2160
+ "Segoe UI Symbol",
2161
+ "Noto Color Emoji"
2162
+ ],
2163
+ // Optional font - Satoshi
2164
+ satoshi: [
2165
+ "Satoshi",
2166
+ "Inter",
2167
+ "ui-sans-serif",
2168
+ "system-ui",
2169
+ "-apple-system",
2170
+ "BlinkMacSystemFont",
2171
+ "Segoe UI",
2172
+ "Roboto",
2173
+ "sans-serif"
2174
+ ],
2175
+ // Display font - Clash Display (for headings and hero sections)
2176
+ display: [
2177
+ "Clash Display",
2178
+ "Inter",
2179
+ "ui-sans-serif",
2180
+ "system-ui",
2181
+ "-apple-system",
2182
+ "BlinkMacSystemFont",
2183
+ "Segoe UI",
2184
+ "Roboto",
2185
+ "sans-serif"
2186
+ ],
2187
+ // Serif font family
2188
+ serif: ["ui-serif", "Georgia", "Cambria", "Times New Roman", "Times", "serif"],
2189
+ // Monospace font family
2190
+ mono: [
2191
+ "ui-monospace",
2192
+ "SFMono-Regular",
2193
+ "Menlo",
2194
+ "Monaco",
2195
+ "Consolas",
2196
+ "Liberation Mono",
2197
+ "Courier New",
2198
+ "monospace"
2199
+ ]
2200
+ };
2201
+ var fontSize = {
2202
+ // text-xs: 12px base, scales from 0.75rem to 0.875rem
2203
+ xs: [
2204
+ "clamp(0.75rem, 0.7rem + 0.125vw, 0.875rem)",
2205
+ { lineHeight: "1rem", letterSpacing: "0.05em" }
2206
+ ],
2207
+ // text-sm: 14px base, scales from 0.875rem to 1rem
2208
+ sm: [
2209
+ "clamp(0.875rem, 0.8rem + 0.25vw, 1rem)",
2210
+ { lineHeight: "1.25rem", letterSpacing: "0.025em" }
2211
+ ],
2212
+ // text-base: 16px base, scales from 1rem to 1.125rem
2213
+ base: ["clamp(1rem, 0.95rem + 0.25vw, 1.125rem)", { lineHeight: "1.5rem", letterSpacing: "0em" }],
2214
+ // text-lg: 18px base, scales from 1.125rem to 1.25rem
2215
+ lg: [
2216
+ "clamp(1.125rem, 1rem + 0.5vw, 1.25rem)",
2217
+ { lineHeight: "1.75rem", letterSpacing: "-0.025em" }
2218
+ ],
2219
+ // text-xl: 20px base, scales from 1.25rem to 1.5rem
2220
+ xl: [
2221
+ "clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem)",
2222
+ { lineHeight: "1.75rem", letterSpacing: "-0.025em" }
2223
+ ],
2224
+ // text-2xl: 24px base, scales from 1.5rem to 2rem
2225
+ "2xl": [
2226
+ "clamp(1.5rem, 1.25rem + 1.25vw, 2rem)",
2227
+ { lineHeight: "2rem", letterSpacing: "-0.05em" }
2228
+ ],
2229
+ // text-3xl: 30px base, scales from 1.875rem to 2.5rem
2230
+ "3xl": [
2231
+ "clamp(1.875rem, 1.5rem + 1.875vw, 2.5rem)",
2232
+ { lineHeight: "2.25rem", letterSpacing: "-0.05em" }
2233
+ ],
2234
+ // text-4xl: 36px base, scales from 2.25rem to 3rem
2235
+ "4xl": [
2236
+ "clamp(2.25rem, 1.75rem + 2.5vw, 3rem)",
2237
+ { lineHeight: "2.5rem", letterSpacing: "-0.025em" }
2238
+ ],
2239
+ // text-5xl: 48px base, scales from 3rem to 4rem
2240
+ "5xl": ["clamp(3rem, 2rem + 5vw, 4rem)", { lineHeight: "1", letterSpacing: "-0.025em" }],
2241
+ // text-6xl: 60px base, scales from 3.75rem to 5rem
2242
+ "6xl": ["clamp(3.75rem, 2.5rem + 6.25vw, 5rem)", { lineHeight: "1", letterSpacing: "-0.05em" }],
2243
+ // text-7xl: 72px base (optional, for hero sections)
2244
+ "7xl": ["clamp(4.5rem, 3rem + 7.5vw, 6rem)", { lineHeight: "1", letterSpacing: "-0.05em" }],
2245
+ // text-8xl: 96px base (optional, for hero sections)
2246
+ "8xl": ["clamp(6rem, 4rem + 10vw, 8rem)", { lineHeight: "1", letterSpacing: "-0.05em" }],
2247
+ // text-9xl: 128px base (optional, for hero sections)
2248
+ "9xl": ["clamp(8rem, 5rem + 15vw, 12rem)", { lineHeight: "1", letterSpacing: "-0.05em" }]
2249
+ };
2250
+ var fontWeight = {
2251
+ thin: "100",
2252
+ extralight: "200",
2253
+ light: "300",
2254
+ normal: "400",
2255
+ medium: "500",
2256
+ semibold: "600",
2257
+ bold: "700",
2258
+ extrabold: "800",
2259
+ black: "900"
2260
+ };
2261
+ var lineHeight = {
2262
+ none: "1",
2263
+ tight: "1.25",
2264
+ snug: "1.375",
2265
+ normal: "1.5",
2266
+ relaxed: "1.625",
2267
+ loose: "2"
2268
+ };
2269
+ var letterSpacing = {
2270
+ tighter: "-0.05em",
2271
+ tight: "-0.025em",
2272
+ normal: "0em",
2273
+ wide: "0.025em",
2274
+ wider: "0.05em",
2275
+ widest: "0.1em"
2276
+ };
2277
+ var typographyCSSVariables = {
2278
+ // Font families
2279
+ "--font-sans": fontFamily.sans.join(", "),
2280
+ "--font-satoshi": fontFamily.satoshi.join(", "),
2281
+ "--font-display": fontFamily.display.join(", "),
2282
+ "--font-serif": fontFamily.serif.join(", "),
2283
+ "--font-mono": fontFamily.mono.join(", "),
2284
+ // Font sizes (using clamp values)
2285
+ "--font-size-xs": fontSize.xs[0],
2286
+ "--font-size-sm": fontSize.sm[0],
2287
+ "--font-size-base": fontSize.base[0],
2288
+ "--font-size-lg": fontSize.lg[0],
2289
+ "--font-size-xl": fontSize.xl[0],
2290
+ "--font-size-2xl": fontSize["2xl"][0],
2291
+ "--font-size-3xl": fontSize["3xl"][0],
2292
+ "--font-size-4xl": fontSize["4xl"][0],
2293
+ "--font-size-5xl": fontSize["5xl"][0],
2294
+ "--font-size-6xl": fontSize["6xl"][0],
2295
+ // Font weights
2296
+ "--font-weight-thin": fontWeight.thin,
2297
+ "--font-weight-extralight": fontWeight.extralight,
2298
+ "--font-weight-light": fontWeight.light,
2299
+ "--font-weight-normal": fontWeight.normal,
2300
+ "--font-weight-medium": fontWeight.medium,
2301
+ "--font-weight-semibold": fontWeight.semibold,
2302
+ "--font-weight-bold": fontWeight.bold,
2303
+ "--font-weight-extrabold": fontWeight.extrabold,
2304
+ "--font-weight-black": fontWeight.black,
2305
+ // Line heights
2306
+ "--line-height-none": lineHeight.none,
2307
+ "--line-height-tight": lineHeight.tight,
2308
+ "--line-height-snug": lineHeight.snug,
2309
+ "--line-height-normal": lineHeight.normal,
2310
+ "--line-height-relaxed": lineHeight.relaxed,
2311
+ "--line-height-loose": lineHeight.loose,
2312
+ // Letter spacing
2313
+ "--letter-spacing-tighter": letterSpacing.tighter,
2314
+ "--letter-spacing-tight": letterSpacing.tight,
2315
+ "--letter-spacing-normal": letterSpacing.normal,
2316
+ "--letter-spacing-wide": letterSpacing.wide,
2317
+ "--letter-spacing-wider": letterSpacing.wider,
2318
+ "--letter-spacing-widest": letterSpacing.widest
2319
+ };
2320
+ ({
2321
+ // Display styles (for hero sections)
2322
+ display: {
2323
+ fontSize: fontSize["6xl"][0]},
2324
+ // Heading styles
2325
+ h1: {
2326
+ fontSize: fontSize["5xl"][0]},
2327
+ h2: {
2328
+ fontSize: fontSize["4xl"][0]},
2329
+ h3: {
2330
+ fontSize: fontSize["3xl"][0]},
2331
+ h4: {
2332
+ fontSize: fontSize["2xl"][0]},
2333
+ h5: {
2334
+ fontSize: fontSize.xl[0]},
2335
+ h6: {
2336
+ fontSize: fontSize.lg[0]},
2337
+ // Body text styles
2338
+ body: {
2339
+ fontSize: fontSize.base[0]},
2340
+ "body-sm": {
2341
+ fontSize: fontSize.sm[0]},
2342
+ "body-xs": {
2343
+ fontSize: fontSize.xs[0]},
2344
+ // Label styles
2345
+ label: {
2346
+ fontSize: fontSize.sm[0]},
2347
+ "label-sm": {
2348
+ fontSize: fontSize.xs[0]},
2349
+ // Caption styles
2350
+ caption: {
2351
+ fontSize: fontSize.xs[0]}
2352
+ });
2353
+ ({
2354
+ fontSize: {
2355
+ xs: [
2356
+ fontSize.xs[0],
2357
+ { lineHeight: fontSize.xs[1].lineHeight, letterSpacing: fontSize.xs[1].letterSpacing }
2358
+ ],
2359
+ sm: [
2360
+ fontSize.sm[0],
2361
+ { lineHeight: fontSize.sm[1].lineHeight, letterSpacing: fontSize.sm[1].letterSpacing }
2362
+ ],
2363
+ md: [
2364
+ fontSize.base[0],
2365
+ { lineHeight: fontSize.base[1].lineHeight, letterSpacing: fontSize.base[1].letterSpacing }
2366
+ ],
2367
+ base: [
2368
+ fontSize.base[0],
2369
+ { lineHeight: fontSize.base[1].lineHeight, letterSpacing: fontSize.base[1].letterSpacing }
2370
+ ],
2371
+ lg: [
2372
+ fontSize.lg[0],
2373
+ { lineHeight: fontSize.lg[1].lineHeight, letterSpacing: fontSize.lg[1].letterSpacing }
2374
+ ],
2375
+ xl: [
2376
+ fontSize.xl[0],
2377
+ { lineHeight: fontSize.xl[1].lineHeight, letterSpacing: fontSize.xl[1].letterSpacing }
2378
+ ],
2379
+ "2xl": [
2380
+ fontSize["2xl"][0],
2381
+ {
2382
+ lineHeight: fontSize["2xl"][1].lineHeight,
2383
+ letterSpacing: fontSize["2xl"][1].letterSpacing
2384
+ }
2385
+ ],
2386
+ "3xl": [
2387
+ fontSize["3xl"][0],
2388
+ {
2389
+ lineHeight: fontSize["3xl"][1].lineHeight,
2390
+ letterSpacing: fontSize["3xl"][1].letterSpacing
2391
+ }
2392
+ ],
2393
+ "4xl": [
2394
+ fontSize["4xl"][0],
2395
+ {
2396
+ lineHeight: fontSize["4xl"][1].lineHeight,
2397
+ letterSpacing: fontSize["4xl"][1].letterSpacing
2398
+ }
2399
+ ],
2400
+ "5xl": [
2401
+ fontSize["5xl"][0],
2402
+ {
2403
+ lineHeight: fontSize["5xl"][1].lineHeight,
2404
+ letterSpacing: fontSize["5xl"][1].letterSpacing
2405
+ }
2406
+ ],
2407
+ "6xl": [
2408
+ fontSize["6xl"][0],
2409
+ {
2410
+ lineHeight: fontSize["6xl"][1].lineHeight,
2411
+ letterSpacing: fontSize["6xl"][1].letterSpacing
2412
+ }
2413
+ ],
2414
+ "7xl": [
2415
+ fontSize["7xl"][0],
2416
+ {
2417
+ lineHeight: fontSize["7xl"][1].lineHeight,
2418
+ letterSpacing: fontSize["7xl"][1].letterSpacing
2419
+ }
2420
+ ],
2421
+ "8xl": [
2422
+ fontSize["8xl"][0],
2423
+ {
2424
+ lineHeight: fontSize["8xl"][1].lineHeight,
2425
+ letterSpacing: fontSize["8xl"][1].letterSpacing
2426
+ }
2427
+ ],
2428
+ "9xl": [
2429
+ fontSize["9xl"][0],
2430
+ {
2431
+ lineHeight: fontSize["9xl"][1].lineHeight,
2432
+ letterSpacing: fontSize["9xl"][1].letterSpacing
2433
+ }
2434
+ ]
2435
+ }});
2436
+
2437
+ // src/tokens/state-matrix.ts
2438
+ function getStateVariableName(component, variant, state, property) {
2439
+ const propertyMap = {
2440
+ background: "bg",
2441
+ text: "text",
2442
+ border: "border",
2443
+ outline: "outline",
2444
+ shadow: "shadow"
2445
+ };
2446
+ const propertySuffix = propertyMap[property];
2447
+ return `--${component}-${variant}-${state}-${propertySuffix}`;
2448
+ }
2449
+ function flattenStateMatrix(stateMatrix) {
2450
+ const variables = /* @__PURE__ */ new Map();
2451
+ for (const [componentName, componentStates] of Object.entries(stateMatrix)) {
2452
+ for (const [variantName, variantStates] of Object.entries(componentStates)) {
2453
+ for (const [state, stateProperties] of Object.entries(variantStates)) {
2454
+ if (stateProperties && typeof stateProperties === "object") {
2455
+ for (const [property, value] of Object.entries(stateProperties)) {
2456
+ if (value && typeof value === "string") {
2457
+ const varName = getStateVariableName(
2458
+ componentName,
2459
+ variantName,
2460
+ state,
2461
+ property
2462
+ );
2463
+ variables.set(varName, value);
2464
+ }
2465
+ }
2466
+ }
2467
+ }
2468
+ }
2469
+ }
2470
+ return variables;
2471
+ }
2472
+
2473
+ // src/tokens/states.ts
2474
+ function getButtonStateMatrix(mode, baseColors2, surfaceColors2) {
2475
+ const primaryBase = primaryColors[600];
2476
+ const primaryHover = primaryColors[700];
2477
+ const primaryActive = primaryColors[800];
2478
+ const primaryFocus = primaryColors[600];
2479
+ const primaryDisabledBg = primaryColors[300];
2480
+ const primaryDisabledText = primaryColors[400];
2481
+ const primaryLoading = primaryColors[600];
2482
+ const secondaryHover = secondaryColors[700];
2483
+ const secondaryActive = secondaryColors[800];
2484
+ const secondaryDisabledBg = secondaryColors[300];
2485
+ const secondaryDisabledText = secondaryColors[400];
2486
+ const accentHover = accentColors[700];
2487
+ const accentActive = accentColors[800];
2488
+ const accentDisabledBg = accentColors[300];
2489
+ const accentDisabledText = accentColors[400];
2490
+ const outlineHoverBg = accentColors[600];
2491
+ const outlineHoverText = accentColors[950];
2492
+ const outlineHoverBorder = accentColors[600];
2493
+ const outlineActiveBg = accentColors[700];
2494
+ const outlineActiveText = accentColors[950];
2495
+ const outlineActiveBorder = accentColors[700];
2496
+ const outlineDisabledBg = baseColors2.background;
2497
+ const outlineDisabledText = baseColors2.foreground;
2498
+ const outlineDisabledBorder = baseColors2.border;
2499
+ const ghostHoverBg = surfaceColors2.elevated1;
2500
+ const ghostHoverText = baseColors2.foreground;
2501
+ const ghostActiveBg = surfaceColors2.elevated2;
2502
+ const ghostActiveText = baseColors2.foreground;
2503
+ const ghostDisabledBg = "transparent";
2504
+ const ghostDisabledText = baseColors2.foreground;
2505
+ const destructiveHover = semanticColors[mode].error;
2506
+ const destructiveActive = semanticColors[mode].error;
2507
+ const destructiveDisabledBg = semanticColors[mode].error;
2508
+ const destructiveDisabledText = semanticColors[mode].errorForeground;
2509
+ return {
2510
+ button: {
2511
+ primary: {
2512
+ base: {
2513
+ background: primaryBase
2514
+ },
2515
+ hover: {
2516
+ background: primaryHover
2517
+ },
2518
+ active: {
2519
+ background: primaryActive
2520
+ },
2521
+ focus: {
2522
+ background: primaryFocus
2523
+ },
2524
+ disabled: {
2525
+ background: primaryDisabledBg,
2526
+ text: primaryDisabledText
2527
+ },
2528
+ loading: {
2529
+ background: primaryLoading
2530
+ }
2531
+ },
2532
+ secondary: {
2533
+ hover: {
2534
+ background: secondaryHover
2535
+ },
2536
+ active: {
2537
+ background: secondaryActive
2538
+ },
2539
+ disabled: {
2540
+ background: secondaryDisabledBg,
2541
+ text: secondaryDisabledText
2542
+ }
2543
+ },
2544
+ accent: {
2545
+ hover: {
2546
+ background: accentHover
2547
+ },
2548
+ active: {
2549
+ background: accentActive
2550
+ },
2551
+ disabled: {
2552
+ background: accentDisabledBg,
2553
+ text: accentDisabledText
2554
+ }
2555
+ },
2556
+ outline: {
2557
+ hover: {
2558
+ background: outlineHoverBg,
2559
+ text: outlineHoverText,
2560
+ border: outlineHoverBorder
2561
+ },
2562
+ active: {
2563
+ background: outlineActiveBg,
2564
+ text: outlineActiveText,
2565
+ border: outlineActiveBorder
2566
+ },
2567
+ disabled: {
2568
+ background: outlineDisabledBg,
2569
+ text: outlineDisabledText,
2570
+ border: outlineDisabledBorder
2571
+ }
2572
+ },
2573
+ ghost: {
2574
+ hover: {
2575
+ background: ghostHoverBg,
2576
+ text: ghostHoverText
2577
+ },
2578
+ active: {
2579
+ background: ghostActiveBg,
2580
+ text: ghostActiveText
2581
+ },
2582
+ disabled: {
2583
+ background: ghostDisabledBg,
2584
+ text: ghostDisabledText
2585
+ }
2586
+ },
2587
+ destructive: {
2588
+ hover: {
2589
+ background: destructiveHover
2590
+ },
2591
+ active: {
2592
+ background: destructiveActive
2593
+ },
2594
+ disabled: {
2595
+ background: destructiveDisabledBg,
2596
+ text: destructiveDisabledText
2597
+ }
2598
+ }
2599
+ }
2600
+ };
2601
+ }
2602
+
2603
+ // src/theme/applyStateMatrix.ts
2604
+ function getMergedBaseTokens(_mode) {
2605
+ return {
2606
+ baseColors,
2607
+ surfaceColors
2608
+ };
2609
+ }
2610
+ function getAllStateMatrices(mode) {
2611
+ const { baseColors: baseColors2, surfaceColors: surfaceColors2 } = getMergedBaseTokens();
2612
+ const buttonMatrix = getButtonStateMatrix(mode, baseColors2[mode], surfaceColors2[mode]);
2613
+ return {
2614
+ ...buttonMatrix
2615
+ // Add other component matrices here as they are implemented
2616
+ // input: getInputStateMatrix(mode, baseColors[mode], surfaceColors[mode]),
2617
+ // select: getSelectStateMatrix(mode, baseColors[mode], surfaceColors[mode]),
2618
+ };
2619
+ }
2620
+ function updateStateMatrixFromTokens(mode) {
2621
+ if (typeof document === "undefined" || !document.documentElement) return;
2622
+ const root = document.documentElement;
2623
+ let stateMatrix;
2624
+ try {
2625
+ stateMatrix = getAllStateMatrices(mode);
2626
+ } catch (error) {
2627
+ console.error("[State Matrix] Failed to get state matrices:", error);
2628
+ return;
2629
+ }
2630
+ let variables;
2631
+ try {
2632
+ variables = flattenStateMatrix(stateMatrix);
2633
+ } catch (error) {
2634
+ console.error("[State Matrix] Failed to flatten state matrix:", error);
2635
+ return;
2636
+ }
2637
+ const hoverVars = {};
2638
+ variables.forEach((value, varName) => {
2639
+ try {
2640
+ root.style.setProperty(varName, value);
2641
+ if (varName.includes("hover") || varName.includes("active") || varName.includes("disabled")) {
2642
+ hoverVars[varName] = value;
2643
+ }
2644
+ } catch (error) {
2645
+ console.error(`[State Matrix] Failed to set variable ${varName}:`, error);
2646
+ }
2647
+ });
2648
+ if (typeof window !== "undefined") {
2649
+ const primaryHoverVar = root.style.getPropertyValue("--button-primary-hover-bg");
2650
+ const primaryHoverComputed = typeof getComputedStyle !== "undefined" ? getComputedStyle(root).getPropertyValue("--button-primary-hover-bg") : "N/A";
2651
+ fetch("http://127.0.0.1:7243/ingest/ff5d1e20-0815-4ca0-af82-fcbd3cfa35b1", {
2652
+ method: "POST",
2653
+ headers: { "Content-Type": "application/json" },
2654
+ body: JSON.stringify({
2655
+ location: "applyStateMatrix.ts:103",
2656
+ message: "State variables set check",
2657
+ data: {
2658
+ totalVars: variables.size,
2659
+ hoverVarsCount: Object.keys(hoverVars).length,
2660
+ primaryHoverVar,
2661
+ primaryHoverComputed,
2662
+ sampleHoverVars: Object.fromEntries(Object.entries(hoverVars).slice(0, 5))
2663
+ },
2664
+ timestamp: Date.now(),
2665
+ sessionId: "debug-session",
2666
+ runId: "run1",
2667
+ hypothesisId: "B"
2668
+ })
2669
+ }).catch(() => {
2670
+ });
2671
+ }
2672
+ }
2673
+
1685
2674
  // src/theme/applyMode.ts
1686
2675
  var MODE_ATTRIBUTE = "data-mode";
1687
2676
  var THEME_ATTRIBUTE = "data-theme-name";
@@ -1775,9 +2764,30 @@ function getMergedTokens(_mode) {
1775
2764
  };
1776
2765
  }
1777
2766
  function updateCSSVariablesFromTokens(mode) {
1778
- if (typeof document === "undefined") return;
2767
+ if (typeof document === "undefined" || !document.documentElement) return;
1779
2768
  const root = document.documentElement;
1780
- const tokens = getMergedTokens();
2769
+ let tokens;
2770
+ try {
2771
+ tokens = getMergedTokens(mode);
2772
+ } catch (error) {
2773
+ console.error("[Theme] Failed to get merged tokens:", error);
2774
+ return;
2775
+ }
2776
+ const secondary800 = tokens.secondaryColors[800];
2777
+ fetch("http://127.0.0.1:7243/ingest/ff5d1e20-0815-4ca0-af82-fcbd3cfa35b1", {
2778
+ method: "POST",
2779
+ headers: { "Content-Type": "application/json" },
2780
+ body: JSON.stringify({
2781
+ location: "applyMode.ts:188",
2782
+ message: "tokens retrieved",
2783
+ data: { hasTokens: !!tokens, secondary800, hasSecondary800: !!secondary800 },
2784
+ timestamp: Date.now(),
2785
+ sessionId: "debug-session",
2786
+ runId: "run1",
2787
+ hypothesisId: "B"
2788
+ })
2789
+ }).catch(() => {
2790
+ });
1781
2791
  const {
1782
2792
  primaryColors: primaryColors2,
1783
2793
  accentColors: accentColors2,
@@ -1788,99 +2798,192 @@ function updateCSSVariablesFromTokens(mode) {
1788
2798
  textColors: textColors2,
1789
2799
  chartColors: chartColors2
1790
2800
  } = tokens;
1791
- const base = baseColors2[mode];
1792
- root.style.setProperty("--background", base.background);
1793
- root.style.setProperty("--foreground", base.foreground);
1794
- root.style.setProperty("--card", base.card);
1795
- root.style.setProperty("--card-foreground", base.cardForeground);
1796
- root.style.setProperty("--popover", base.popover);
1797
- root.style.setProperty("--popover-foreground", base.popoverForeground);
1798
- root.style.setProperty("--border", base.border);
1799
- root.style.setProperty("--input", base.input);
1800
- root.style.setProperty("--ring", base.ring);
1801
- const surface = surfaceColors2[mode];
1802
- root.style.setProperty("--surface-base", surface.base);
1803
- root.style.setProperty("--surface-elevated1", surface.elevated1);
1804
- root.style.setProperty("--surface-elevated2", surface.elevated2);
1805
- root.style.setProperty("--surface-elevated3", surface.elevated3);
1806
- root.style.setProperty("--surface-overlay", surface.overlay);
1807
- root.style.setProperty("--surface-glass", surface.glass);
1808
- const semantic = semanticColors2[mode];
1809
- root.style.setProperty("--semantic-success", semantic.success);
1810
- root.style.setProperty("--semantic-success-foreground", semantic.successForeground);
1811
- root.style.setProperty("--semantic-error", semantic.error);
1812
- root.style.setProperty("--semantic-error-foreground", semantic.errorForeground);
1813
- root.style.setProperty("--semantic-warning", semantic.warning);
1814
- root.style.setProperty("--semantic-warning-foreground", semantic.warningForeground);
1815
- root.style.setProperty("--semantic-info", semantic.info);
1816
- root.style.setProperty("--semantic-info-foreground", semantic.infoForeground);
1817
- const text = textColors2[mode];
1818
- root.style.setProperty("--text-primary", text.primary);
1819
- root.style.setProperty("--text-secondary", text.secondary);
1820
- root.style.setProperty("--text-tertiary", text.tertiary);
1821
- root.style.setProperty("--text-muted", text.muted);
1822
- root.style.setProperty("--text-inverse", text.inverse);
1823
- const chart = chartColors2[mode];
1824
- root.style.setProperty("--chart-1", chart.chart1);
1825
- root.style.setProperty("--chart-2", chart.chart2);
1826
- root.style.setProperty("--chart-3", chart.chart3);
1827
- root.style.setProperty("--chart-4", chart.chart4);
1828
- root.style.setProperty("--chart-5", chart.chart5);
1829
- root.style.setProperty("--primary-50", primaryColors2[50]);
1830
- root.style.setProperty("--primary-100", primaryColors2[100]);
1831
- root.style.setProperty("--primary-200", primaryColors2[200]);
1832
- root.style.setProperty("--primary-300", primaryColors2[300]);
1833
- root.style.setProperty("--primary-400", primaryColors2[400]);
1834
- root.style.setProperty("--primary-500", primaryColors2[500]);
1835
- root.style.setProperty("--primary-600", primaryColors2[600]);
1836
- root.style.setProperty("--primary-700", primaryColors2[700]);
1837
- root.style.setProperty("--primary-800", primaryColors2[800]);
1838
- root.style.setProperty("--primary-900", primaryColors2[900]);
1839
- root.style.setProperty("--primary-950", primaryColors2[950]);
1840
- root.style.setProperty("--accent-50", accentColors2[50]);
1841
- root.style.setProperty("--accent-100", accentColors2[100]);
1842
- root.style.setProperty("--accent-200", accentColors2[200]);
1843
- root.style.setProperty("--accent-300", accentColors2[300]);
1844
- root.style.setProperty("--accent-400", accentColors2[400]);
1845
- root.style.setProperty("--accent-500", accentColors2[500]);
1846
- root.style.setProperty("--accent-600", accentColors2[600]);
1847
- root.style.setProperty("--accent-700", accentColors2[700]);
1848
- root.style.setProperty("--accent-800", accentColors2[800]);
1849
- root.style.setProperty("--accent-900", accentColors2[900]);
1850
- root.style.setProperty("--accent-950", accentColors2[950]);
1851
- root.style.setProperty("--secondary-50", secondaryColors2[50]);
1852
- root.style.setProperty("--secondary-100", secondaryColors2[100]);
1853
- root.style.setProperty("--secondary-200", secondaryColors2[200]);
1854
- root.style.setProperty("--secondary-300", secondaryColors2[300]);
1855
- root.style.setProperty("--secondary-400", secondaryColors2[400]);
1856
- root.style.setProperty("--secondary-500", secondaryColors2[500]);
1857
- root.style.setProperty("--secondary-600", secondaryColors2[600]);
1858
- root.style.setProperty("--secondary-700", secondaryColors2[700]);
1859
- root.style.setProperty("--secondary-800", secondaryColors2[800]);
1860
- root.style.setProperty("--secondary-900", secondaryColors2[900]);
1861
- root.style.setProperty("--secondary-950", secondaryColors2[950]);
1862
- if (mode === "day") {
1863
- root.style.setProperty("--tm-primary", secondaryColors2[500]);
1864
- root.style.setProperty("--tm-primary-foreground", "0 0% 100%");
1865
- root.style.setProperty("--tm-secondary", "0 0% 95.7%");
1866
- root.style.setProperty("--tm-secondary-foreground", "0 0% 6.7%");
1867
- root.style.setProperty("--tm-accent", "0 0% 89.8%");
1868
- root.style.setProperty("--tm-accent-foreground", "0 0% 6.7%");
1869
- } else {
1870
- root.style.setProperty("--tm-primary", accentColors2[600]);
1871
- root.style.setProperty("--tm-primary-foreground", "0 0% 100%");
1872
- root.style.setProperty("--tm-secondary", "240 10% 7%");
1873
- root.style.setProperty("--tm-secondary-foreground", "0 0% 89.8%");
1874
- root.style.setProperty("--tm-accent", "240 10% 10%");
1875
- root.style.setProperty("--tm-accent-foreground", "0 0% 89.8%");
1876
- }
1877
- root.style.setProperty("--muted", base.card);
1878
- root.style.setProperty("--muted-foreground", base.cardForeground);
1879
- root.style.setProperty("--destructive", semantic.error);
1880
- root.style.setProperty("--destructive-foreground", semantic.errorForeground);
1881
- Object.entries(motionCSSVariables).forEach(([key, value]) => {
1882
- root.style.setProperty(key, value);
1883
- });
2801
+ try {
2802
+ const base = baseColors2[mode];
2803
+ root.style.setProperty("--background", base.background);
2804
+ root.style.setProperty("--foreground", base.foreground);
2805
+ root.style.setProperty("--card", base.card);
2806
+ root.style.setProperty("--card-foreground", base.cardForeground);
2807
+ root.style.setProperty("--popover", base.popover);
2808
+ root.style.setProperty("--popover-foreground", base.popoverForeground);
2809
+ root.style.setProperty("--border", base.border);
2810
+ root.style.setProperty("--input", base.input);
2811
+ root.style.setProperty("--ring", base.ring);
2812
+ } catch (error) {
2813
+ console.error("[Theme] Failed to set base colors:", error);
2814
+ }
2815
+ try {
2816
+ const surface = surfaceColors2[mode];
2817
+ root.style.setProperty("--surface-base", surface.base);
2818
+ root.style.setProperty("--surface-elevated1", surface.elevated1);
2819
+ root.style.setProperty("--surface-elevated2", surface.elevated2);
2820
+ root.style.setProperty("--surface-elevated3", surface.elevated3);
2821
+ root.style.setProperty("--surface-overlay", surface.overlay);
2822
+ root.style.setProperty("--surface-glass", surface.glass);
2823
+ } catch (error) {
2824
+ console.error("[Theme] Failed to set surface colors:", error);
2825
+ }
2826
+ try {
2827
+ const semantic = semanticColors2[mode];
2828
+ root.style.setProperty("--semantic-success", semantic.success);
2829
+ root.style.setProperty("--semantic-success-foreground", semantic.successForeground);
2830
+ root.style.setProperty("--semantic-error", semantic.error);
2831
+ root.style.setProperty("--semantic-error-foreground", semantic.errorForeground);
2832
+ root.style.setProperty("--semantic-warning", semantic.warning);
2833
+ root.style.setProperty("--semantic-warning-foreground", semantic.warningForeground);
2834
+ root.style.setProperty("--semantic-info", semantic.info);
2835
+ root.style.setProperty("--semantic-info-foreground", semantic.infoForeground);
2836
+ } catch (error) {
2837
+ console.error("[Theme] Failed to set semantic colors:", error);
2838
+ }
2839
+ try {
2840
+ const text = textColors2[mode];
2841
+ root.style.setProperty("--text-primary", text.primary);
2842
+ root.style.setProperty("--text-secondary", text.secondary);
2843
+ root.style.setProperty("--text-tertiary", text.tertiary);
2844
+ root.style.setProperty("--text-muted", text.muted);
2845
+ root.style.setProperty("--text-inverse", text.inverse);
2846
+ } catch (error) {
2847
+ console.error("[Theme] Failed to set text colors:", error);
2848
+ }
2849
+ try {
2850
+ const chart = chartColors2[mode];
2851
+ root.style.setProperty("--chart-1", chart.chart1);
2852
+ root.style.setProperty("--chart-2", chart.chart2);
2853
+ root.style.setProperty("--chart-3", chart.chart3);
2854
+ root.style.setProperty("--chart-4", chart.chart4);
2855
+ root.style.setProperty("--chart-5", chart.chart5);
2856
+ } catch (error) {
2857
+ console.error("[Theme] Failed to set chart colors:", error);
2858
+ }
2859
+ try {
2860
+ root.style.setProperty("--primary-50", primaryColors2[50]);
2861
+ root.style.setProperty("--primary-100", primaryColors2[100]);
2862
+ root.style.setProperty("--primary-200", primaryColors2[200]);
2863
+ root.style.setProperty("--primary-300", primaryColors2[300]);
2864
+ root.style.setProperty("--primary-400", primaryColors2[400]);
2865
+ root.style.setProperty("--primary-500", primaryColors2[500]);
2866
+ root.style.setProperty("--primary-600", primaryColors2[600]);
2867
+ root.style.setProperty("--primary-700", primaryColors2[700]);
2868
+ root.style.setProperty("--primary-800", primaryColors2[800]);
2869
+ root.style.setProperty("--primary-900", primaryColors2[900]);
2870
+ root.style.setProperty("--primary-950", primaryColors2[950]);
2871
+ } catch (error) {
2872
+ console.error("[Theme] Failed to set primary color scale:", error);
2873
+ }
2874
+ try {
2875
+ root.style.setProperty("--accent-50", accentColors2[50]);
2876
+ root.style.setProperty("--accent-100", accentColors2[100]);
2877
+ root.style.setProperty("--accent-200", accentColors2[200]);
2878
+ root.style.setProperty("--accent-300", accentColors2[300]);
2879
+ root.style.setProperty("--accent-400", accentColors2[400]);
2880
+ root.style.setProperty("--accent-500", accentColors2[500]);
2881
+ root.style.setProperty("--accent-600", accentColors2[600]);
2882
+ root.style.setProperty("--accent-700", accentColors2[700]);
2883
+ root.style.setProperty("--accent-800", accentColors2[800]);
2884
+ root.style.setProperty("--accent-900", accentColors2[900]);
2885
+ root.style.setProperty("--accent-950", accentColors2[950]);
2886
+ } catch (error) {
2887
+ console.error("[Theme] Failed to set accent color scale:", error);
2888
+ }
2889
+ try {
2890
+ root.style.setProperty("--secondary-50", secondaryColors2[50]);
2891
+ root.style.setProperty("--secondary-100", secondaryColors2[100]);
2892
+ root.style.setProperty("--secondary-200", secondaryColors2[200]);
2893
+ root.style.setProperty("--secondary-300", secondaryColors2[300]);
2894
+ root.style.setProperty("--secondary-400", secondaryColors2[400]);
2895
+ root.style.setProperty("--secondary-500", secondaryColors2[500]);
2896
+ root.style.setProperty("--secondary-600", secondaryColors2[600]);
2897
+ root.style.setProperty("--secondary-700", secondaryColors2[700]);
2898
+ root.style.setProperty("--secondary-800", secondaryColors2[800]);
2899
+ root.style.setProperty("--secondary-900", secondaryColors2[900]);
2900
+ root.style.setProperty("--secondary-950", secondaryColors2[950]);
2901
+ } catch (error) {
2902
+ console.error("[Theme] Failed to set secondary color scale:", error);
2903
+ }
2904
+ try {
2905
+ if (mode === "day") {
2906
+ root.style.setProperty("--tm-primary", secondaryColors2[800]);
2907
+ root.style.setProperty("--tm-primary-foreground", "0 0% 100%");
2908
+ root.style.setProperty("--tm-secondary", secondaryColors2[600]);
2909
+ root.style.setProperty("--tm-secondary-foreground", "0 0% 100%");
2910
+ root.style.setProperty("--tm-accent", accentColors2[600]);
2911
+ root.style.setProperty("--tm-accent-foreground", "0 0% 100%");
2912
+ } else {
2913
+ root.style.setProperty("--tm-primary", accentColors2[600]);
2914
+ root.style.setProperty("--tm-primary-foreground", "0 0% 100%");
2915
+ root.style.setProperty("--tm-secondary", "240 10% 7%");
2916
+ root.style.setProperty("--tm-secondary-foreground", "0 0% 89.8%");
2917
+ root.style.setProperty("--tm-accent", "240 10% 10%");
2918
+ root.style.setProperty("--tm-accent-foreground", "0 0% 89.8%");
2919
+ }
2920
+ } catch (error) {
2921
+ console.error("[Theme] Failed to set Tenerife brand colors:", error);
2922
+ }
2923
+ try {
2924
+ const base = baseColors2[mode];
2925
+ root.style.setProperty("--muted", base.card);
2926
+ root.style.setProperty("--muted-foreground", base.cardForeground);
2927
+ } catch (error) {
2928
+ console.error("[Theme] Failed to set muted colors:", error);
2929
+ }
2930
+ try {
2931
+ const accentValue = mode === "day" ? accentColors2[600] : "240 10% 10%";
2932
+ const accentForegroundValue = mode === "day" ? "0 0% 100%" : "0 0% 89.8%";
2933
+ root.style.setProperty("--accent", accentValue);
2934
+ root.style.setProperty("--accent-foreground", accentForegroundValue);
2935
+ } catch (error) {
2936
+ console.error("[Theme] Failed to set accent aliases:", error);
2937
+ }
2938
+ try {
2939
+ const semantic = semanticColors2[mode];
2940
+ root.style.setProperty("--destructive", semantic.error);
2941
+ root.style.setProperty("--destructive-foreground", semantic.errorForeground);
2942
+ } catch (error) {
2943
+ console.error("[Theme] Failed to set destructive colors:", error);
2944
+ }
2945
+ try {
2946
+ Object.entries(motionCSSVariables).forEach(([key, value]) => {
2947
+ root.style.setProperty(key, value);
2948
+ });
2949
+ } catch (error) {
2950
+ console.error("[Theme] Failed to set motion CSS variables:", error);
2951
+ }
2952
+ try {
2953
+ Object.entries(motionV2CSSVariables).forEach(([key, value]) => {
2954
+ root.style.setProperty(key, value);
2955
+ });
2956
+ } catch (error) {
2957
+ console.error("[Theme] Failed to set motion V2 CSS variables:", error);
2958
+ }
2959
+ try {
2960
+ Object.entries(radiusCSSVariables).forEach(([key, value]) => {
2961
+ root.style.setProperty(key, value);
2962
+ });
2963
+ } catch (error) {
2964
+ console.error("[Theme] Failed to set radius CSS variables:", error);
2965
+ }
2966
+ try {
2967
+ Object.entries(shadowCSSVariables).forEach(([key, value]) => {
2968
+ root.style.setProperty(key, value);
2969
+ });
2970
+ } catch (error) {
2971
+ console.error("[Theme] Failed to set shadow CSS variables:", error);
2972
+ }
2973
+ try {
2974
+ Object.entries(spacingCSSVariables).forEach(([key, value]) => {
2975
+ root.style.setProperty(key, value);
2976
+ });
2977
+ } catch (error) {
2978
+ console.error("[Theme] Failed to set spacing CSS variables:", error);
2979
+ }
2980
+ try {
2981
+ Object.entries(typographyCSSVariables).forEach(([key, value]) => {
2982
+ root.style.setProperty(key, value);
2983
+ });
2984
+ } catch (error) {
2985
+ console.error("[Theme] Failed to set typography CSS variables:", error);
2986
+ }
1884
2987
  }
1885
2988
  async function applyDocumentTheme(mode, themeName = "default", brandId = null) {
1886
2989
  if (typeof document === "undefined") return;
@@ -1907,6 +3010,7 @@ async function applyDocumentTheme(mode, themeName = "default", brandId = null) {
1907
3010
  root.classList.remove(DARK_CLASS);
1908
3011
  }
1909
3012
  updateCSSVariablesFromTokens(mode);
3013
+ updateStateMatrixFromTokens(mode);
1910
3014
  const tokens = getMergedTokens();
1911
3015
  const { background, foreground } = tokens.baseColors[mode];
1912
3016
  if (body) {
@@ -2232,7 +3336,7 @@ async function canLoadTheme(themeId) {
2232
3336
  }
2233
3337
 
2234
3338
  // src/theme/spacing.ts
2235
- var spacing = {
3339
+ var spacing2 = {
2236
3340
  none: "0",
2237
3341
  xs: "0.25rem",
2238
3342
  // 4px
@@ -2253,7 +3357,7 @@ var spacing = {
2253
3357
  "5xl": "5rem"
2254
3358
  // 80px
2255
3359
  };
2256
- var borderRadius = {
3360
+ var borderRadius2 = {
2257
3361
  none: "0px",
2258
3362
  sm: "0.125rem",
2259
3363
  // 2px
@@ -2436,6 +3540,23 @@ function ThemeProvider({
2436
3540
  }
2437
3541
  }, [reduceMotionOverride, enableAnimationsOverride]);
2438
3542
  React.useEffect(() => {
3543
+ if (typeof document !== "undefined" && document.documentElement) {
3544
+ const beforeApply = document.documentElement.style.getPropertyValue("--tm-primary");
3545
+ fetch("http://127.0.0.1:7243/ingest/ff5d1e20-0815-4ca0-af82-fcbd3cfa35b1", {
3546
+ method: "POST",
3547
+ headers: { "Content-Type": "application/json" },
3548
+ body: JSON.stringify({
3549
+ location: "ThemeProvider.tsx:281",
3550
+ message: "ThemeProvider useEffect before applyDocumentTheme",
3551
+ data: { beforeValue: beforeApply, hasValue: !!beforeApply },
3552
+ timestamp: Date.now(),
3553
+ sessionId: "debug-session",
3554
+ runId: "run1",
3555
+ hypothesisId: "C"
3556
+ })
3557
+ }).catch(() => {
3558
+ });
3559
+ }
2439
3560
  const initialMode = getInitialMode(defaultMode, storageKey, enableSystem);
2440
3561
  const initialTheme = getInitialTheme(defaultTheme2, themeStorageKey);
2441
3562
  const initialBrand = getInitialBrand(defaultBrand, brandStorageKey);
@@ -2443,6 +3564,25 @@ function ThemeProvider({
2443
3564
  setThemeState(initialTheme);
2444
3565
  setBrandState(initialBrand);
2445
3566
  applyDocumentTheme(initialMode, initialTheme, initialBrand);
3567
+ if (typeof document !== "undefined" && document.documentElement) {
3568
+ setTimeout(() => {
3569
+ const afterApply = document.documentElement.style.getPropertyValue("--tm-primary");
3570
+ fetch("http://127.0.0.1:7243/ingest/ff5d1e20-0815-4ca0-af82-fcbd3cfa35b1", {
3571
+ method: "POST",
3572
+ headers: { "Content-Type": "application/json" },
3573
+ body: JSON.stringify({
3574
+ location: "ThemeProvider.tsx:289",
3575
+ message: "ThemeProvider useEffect after applyDocumentTheme",
3576
+ data: { afterValue: afterApply, hasValue: !!afterApply },
3577
+ timestamp: Date.now(),
3578
+ sessionId: "debug-session",
3579
+ runId: "run1",
3580
+ hypothesisId: "C"
3581
+ })
3582
+ }).catch(() => {
3583
+ });
3584
+ }, 100);
3585
+ }
2446
3586
  persistMode(initialMode, storageKey);
2447
3587
  persistTheme(initialTheme, themeStorageKey);
2448
3588
  persistBrand(initialBrand, brandStorageKey);
@@ -2471,7 +3611,45 @@ function ThemeProvider({
2471
3611
  return () => mediaQuery.removeEventListener("change", handleChange);
2472
3612
  }, [enableSystem, storageKey, setMode]);
2473
3613
  React.useEffect(() => {
3614
+ if (typeof document !== "undefined" && document.documentElement) {
3615
+ const beforeChange = document.documentElement.style.getPropertyValue("--tm-primary");
3616
+ fetch("http://127.0.0.1:7243/ingest/ff5d1e20-0815-4ca0-af82-fcbd3cfa35b1", {
3617
+ method: "POST",
3618
+ headers: { "Content-Type": "application/json" },
3619
+ body: JSON.stringify({
3620
+ location: "ThemeProvider.tsx:325",
3621
+ message: "ThemeProvider useEffect mode/theme/brand change",
3622
+ data: { mode, theme, brand, beforeValue: beforeChange, hasValue: !!beforeChange },
3623
+ timestamp: Date.now(),
3624
+ sessionId: "debug-session",
3625
+ runId: "run1",
3626
+ hypothesisId: "C"
3627
+ })
3628
+ }).catch(() => {
3629
+ });
3630
+ }
2474
3631
  applyDocumentTheme(mode, theme, brand);
3632
+ if (typeof document !== "undefined" && document.documentElement) {
3633
+ setTimeout(() => {
3634
+ if (typeof document !== "undefined" && document.documentElement) {
3635
+ const afterChange = document.documentElement.style.getPropertyValue("--tm-primary");
3636
+ fetch("http://127.0.0.1:7243/ingest/ff5d1e20-0815-4ca0-af82-fcbd3cfa35b1", {
3637
+ method: "POST",
3638
+ headers: { "Content-Type": "application/json" },
3639
+ body: JSON.stringify({
3640
+ location: "ThemeProvider.tsx:327",
3641
+ message: "ThemeProvider useEffect after applyDocumentTheme change",
3642
+ data: { afterValue: afterChange, hasValue: !!afterChange },
3643
+ timestamp: Date.now(),
3644
+ sessionId: "debug-session",
3645
+ runId: "run1",
3646
+ hypothesisId: "C"
3647
+ })
3648
+ }).catch(() => {
3649
+ });
3650
+ }
3651
+ }, 100);
3652
+ }
2475
3653
  }, [mode, theme, brand]);
2476
3654
  const value = React.useMemo(
2477
3655
  () => ({
@@ -2593,4 +3771,4 @@ var letterSpacings = {
2593
3771
  widest: "0.1em"
2594
3772
  };
2595
3773
 
2596
- export { ThemeProvider, borderRadius, canLoadTheme, createMinimalThemeSchema, cssVariableColorTokens, fontFamilies, fontSizes, fontWeights, getAllThemes, getAvailableThemeIds, getInitialBrand, getInitialMode, getInitialTheme, getThemeMetadata, getThemesByCategory, initializeDefaultThemes, isThemeSchema, letterSpacings, lineHeights, loadTheme, loadThemeSafe, persistBrand, persistMode, persistTheme, preloadThemes, registerTheme, shadows, spacing, tailwindThemeColors, themeExists, themeRegistry, useTheme, validateThemeSchema };
3774
+ export { ThemeProvider, borderRadius2 as borderRadius, canLoadTheme, createMinimalThemeSchema, cssVariableColorTokens, fontFamilies, fontSizes, fontWeights, getAllThemes, getAvailableThemeIds, getInitialBrand, getInitialMode, getInitialTheme, getThemeMetadata, getThemesByCategory, initializeDefaultThemes, isThemeSchema, letterSpacings, lineHeights, loadTheme, loadThemeSafe, persistBrand, persistMode, persistTheme, preloadThemes, registerTheme, shadows, spacing2 as spacing, tailwindThemeColors, themeExists, themeRegistry, useTheme, validateThemeSchema };