@titan-design/react-ui 0.4.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (150) hide show
  1. package/dist/MesoStatusCard-CQk71hSi.d.mts +77 -0
  2. package/dist/MesoStatusCard-CQk71hSi.d.ts +77 -0
  3. package/dist/bodymap.d.mts +246 -3
  4. package/dist/bodymap.d.ts +246 -3
  5. package/dist/bodymap.js +232 -185
  6. package/dist/bodymap.js.map +1 -1
  7. package/dist/bodymap.mjs +1963 -11
  8. package/dist/bodymap.mjs.map +1 -1
  9. package/dist/index.d.mts +193 -744
  10. package/dist/index.d.ts +193 -744
  11. package/dist/index.js +1551 -1856
  12. package/dist/index.js.map +1 -1
  13. package/dist/index.mjs +10770 -8213
  14. package/dist/index.mjs.map +1 -1
  15. package/dist/pages-D7Jlssvp.d.ts +791 -0
  16. package/dist/pages-MO0JCySL.d.mts +791 -0
  17. package/dist/pages.d.mts +4 -0
  18. package/dist/pages.d.ts +4 -0
  19. package/dist/pages.js +6694 -0
  20. package/dist/pages.js.map +1 -0
  21. package/dist/pages.mjs +6674 -0
  22. package/dist/pages.mjs.map +1 -0
  23. package/dist/theme/index.d.mts +473 -211
  24. package/dist/theme/index.d.ts +473 -211
  25. package/dist/theme/index.js +341 -127
  26. package/dist/theme/index.js.map +1 -1
  27. package/dist/theme/index.mjs +2085 -2
  28. package/dist/theme/index.mjs.map +1 -1
  29. package/dist/theme/tokens-css.js +148 -139
  30. package/dist/theme/tokens-css.js.map +1 -1
  31. package/dist/theme/tokens-css.mjs +582 -1
  32. package/dist/theme/tokens-css.mjs.map +1 -1
  33. package/package.json +11 -7
  34. package/src/components/custom/DateTime/DateTime.stories.tsx +82 -6
  35. package/src/components/custom/DateTime/DateTime.test.tsx +29 -3
  36. package/src/components/custom/DateTime/DateTime.tsx +55 -15
  37. package/src/components/custom/Gauge/Gauge.test.tsx +2 -2
  38. package/src/components/custom/Gauge/Gauge.tsx +6 -3
  39. package/src/components/custom/Scatter/Scatter.tsx +3 -5
  40. package/src/components/custom/Treemap/Treemap.tsx +3 -5
  41. package/src/components/custom/Typography/Typography.stories.tsx +45 -27
  42. package/src/components/custom/Typography/Typography.test.tsx +13 -3
  43. package/src/components/custom/Typography/Typography.tsx +5 -0
  44. package/src/components/custom/Workout/ActiveWorkoutPage.tsx +2 -1
  45. package/src/components/custom/Workout/BaseBadge.stories.tsx +3 -3
  46. package/src/components/custom/Workout/BaseBadge.test.tsx +1 -1
  47. package/src/components/custom/Workout/BaseBadge.tsx +1 -1
  48. package/src/components/custom/Workout/BodyMap.tsx +6 -3
  49. package/src/components/custom/Workout/BodyMapDetailPanel.tsx +6 -3
  50. package/src/components/custom/Workout/CapacityBandChart.test.tsx +2 -2
  51. package/src/components/custom/Workout/CapacityBandChart.tsx +9 -6
  52. package/src/components/custom/Workout/DeviationBar.test.tsx +1 -1
  53. package/src/components/custom/Workout/DeviationBar.tsx +7 -4
  54. package/src/components/custom/Workout/ExerciseCard.tsx +5 -1
  55. package/src/components/custom/Workout/ExerciseDetailPage.tsx +19 -5
  56. package/src/components/custom/Workout/InputBar.tsx +2 -1
  57. package/src/components/custom/Workout/IntensityBar.test.tsx +112 -60
  58. package/src/components/custom/Workout/IntensityBar.tsx +113 -58
  59. package/src/components/custom/Workout/MesoCard.tsx +8 -3
  60. package/src/components/custom/Workout/MesoProgressBar.test.tsx +1 -1
  61. package/src/components/custom/Workout/MesoProgressBar.tsx +3 -2
  62. package/src/components/custom/Workout/MesoStatusCard.tsx +20 -13
  63. package/src/components/custom/Workout/MuscleGroupChip.tsx +7 -4
  64. package/src/components/custom/Workout/PlaceholderStrip.tsx +5 -9
  65. package/src/components/custom/Workout/PrBadge.tsx +7 -4
  66. package/src/components/custom/Workout/PrHistoryModal.tsx +6 -5
  67. package/src/components/custom/Workout/ProgramPlanningPage.tsx +2 -1
  68. package/src/components/custom/Workout/README.md +50 -0
  69. package/src/components/custom/Workout/ReadinessCheck.tsx +7 -4
  70. package/src/components/custom/Workout/RestTimer.test.tsx +41 -10
  71. package/src/components/custom/Workout/RestTimer.tsx +50 -44
  72. package/src/components/custom/Workout/SetRow.tsx +12 -2
  73. package/src/components/custom/Workout/Sparkline.tsx +2 -1
  74. package/src/components/custom/Workout/StatusDot.test.tsx +2 -2
  75. package/src/components/custom/Workout/StatusDot.tsx +12 -9
  76. package/src/components/custom/Workout/StrengthTrendChart.tsx +9 -6
  77. package/src/components/custom/Workout/SupersetWrapper.tsx +2 -1
  78. package/src/components/custom/Workout/TempoDisplay.stories.tsx +69 -2
  79. package/src/components/custom/Workout/TempoDisplay.test.tsx +35 -0
  80. package/src/components/custom/Workout/TempoDisplay.tsx +109 -3
  81. package/src/components/custom/Workout/VelocityStrip.test.tsx +89 -2
  82. package/src/components/custom/Workout/VelocityStrip.tsx +203 -38
  83. package/src/components/custom/Workout/WeekRow.test.tsx +2 -2
  84. package/src/components/custom/Workout/WeekRow.tsx +3 -2
  85. package/src/components/custom/Workout/WeightBadge.test.tsx +2 -2
  86. package/src/components/custom/Workout/WeightBadge.tsx +8 -4
  87. package/src/components/custom/Workout/WorkoutCard.tsx +5 -2
  88. package/src/components/custom/Workout/WorkoutPill.tsx +12 -8
  89. package/src/components/custom/Workout/icons.tsx +7 -0
  90. package/src/components/custom/Workout/index.ts +38 -47
  91. package/src/components/icons/SvgIcon.tsx +50 -0
  92. package/src/components/icons/icons.stories.tsx +57 -0
  93. package/src/components/icons/icons.test.tsx +43 -0
  94. package/src/components/icons/icons.tsx +45 -0
  95. package/src/components/icons/index.ts +4 -0
  96. package/src/components/index.ts +6 -0
  97. package/src/components/shell/BrandLockup.stories.tsx +27 -0
  98. package/src/components/shell/BrandLockup.test.tsx +23 -0
  99. package/src/components/shell/BrandLockup.tsx +47 -0
  100. package/src/components/shell/DeviceIndicator.stories.tsx +28 -0
  101. package/src/components/shell/DeviceIndicator.test.tsx +26 -0
  102. package/src/components/shell/DeviceIndicator.tsx +52 -0
  103. package/src/components/shell/DeviceMenu.stories.tsx +47 -0
  104. package/src/components/shell/DeviceMenu.test.tsx +40 -0
  105. package/src/components/shell/DeviceMenu.tsx +65 -0
  106. package/src/components/shell/DeviceRow.stories.tsx +38 -0
  107. package/src/components/shell/DeviceRow.test.tsx +37 -0
  108. package/src/components/shell/DeviceRow.tsx +58 -0
  109. package/src/components/shell/README.md +86 -0
  110. package/src/components/shell/SessionStatePill.stories.tsx +27 -0
  111. package/src/components/shell/SessionStatePill.test.tsx +25 -0
  112. package/src/components/shell/SessionStatePill.tsx +46 -0
  113. package/src/components/shell/TopBar.stories.tsx +49 -0
  114. package/src/components/shell/TopBar.test.tsx +36 -0
  115. package/src/components/shell/TopBar.tsx +89 -0
  116. package/src/components/shell/index.ts +8 -0
  117. package/src/components/ui/indicator/Indicator.stories.tsx +37 -1
  118. package/src/components/ui/indicator/Indicator.test.tsx +19 -1
  119. package/src/components/ui/indicator/Indicator.tsx +45 -6
  120. package/src/components/ui/indicator/index.ts +1 -1
  121. package/src/components/ui/spinner/Spinner.tsx +3 -2
  122. package/src/components/ui/toolbar-button/ToolbarButton.tsx +2 -1
  123. package/src/index.ts +3 -2
  124. package/src/pages.ts +61 -0
  125. package/src/test/stories-smoke.test.tsx +50 -0
  126. package/src/theme/ColorSystem.stories.tsx +323 -0
  127. package/src/theme/Colors.stories.tsx +69 -1
  128. package/src/theme/barrel.ts +54 -0
  129. package/src/theme/config.ts +16 -3
  130. package/src/theme/extracted-colors-dataviz.ts +21 -0
  131. package/src/theme/extracted-colors-ui.ts +20 -0
  132. package/src/theme/global.css +64 -52
  133. package/src/theme/gradients.test.ts +25 -0
  134. package/src/theme/gradients.ts +36 -0
  135. package/src/theme/index.ts +8 -43
  136. package/src/theme/native-theming-guard.test.ts +117 -0
  137. package/src/theme/tokens/primitives.test.ts +232 -0
  138. package/src/theme/tokens/primitives.ts +247 -0
  139. package/src/theme/tokens/semantic.ts +93 -81
  140. package/src/theme/workout-tokens.ts +22 -21
  141. package/src/utils/avatar-color.ts +3 -3
  142. package/tailwind.config.js +10 -3
  143. package/dist/bodymap-BhG55xHM.d.mts +0 -318
  144. package/dist/bodymap-BhG55xHM.d.ts +0 -318
  145. package/dist/chunk-2SISKTWM.mjs +0 -1027
  146. package/dist/chunk-2SISKTWM.mjs.map +0 -1
  147. package/dist/chunk-7XPB4NAO.mjs +0 -1013
  148. package/dist/chunk-7XPB4NAO.mjs.map +0 -1
  149. package/dist/chunk-SNVKL5WZ.mjs +0 -883
  150. package/dist/chunk-SNVKL5WZ.mjs.map +0 -1
@@ -1,4 +1,2087 @@
1
- export { ThemeProvider, applyThemePreset, audiobookPreset, componentElevationRanges, createFlatShadow, createPressedHoverShadow, createPressedShadow, createRaisedHoverShadow, createRaisedShadow, darken, defaultPreset, elevationSystem, getBaseSurfaceColor, getElevationConfig, getElevationShadow, getElevationSurface, getGlowShadow, getHoverColors, getValidatedElevation, hexToRgb, hsvToRgb, isCssPropertyManifest, isDark, lighten, neumorphicShadows, resolveColor, rgbToHex, rgbToHsv, shadowColors, validateCssPropertyManifest } from '../chunk-SNVKL5WZ.mjs';
2
- export { buttonSizes, darkThemeCSSVars, discreteRainbow, getDiscreteRainbowColor, getSemanticColors, getThemeCSSVars, gluestackConfig, lightThemeCSSVars, primitiveBorderRadius, primitiveBreakpoints, primitiveColors, primitiveShadows, primitiveSpacing, primitiveTypography, primitiveZIndex, semanticColorsDark, semanticColorsLight, semanticTypography } from '../chunk-7XPB4NAO.mjs';
1
+ import { Platform, View } from 'react-native';
2
+ import { vars } from 'nativewind';
3
+ import { jsx as jsx$1 } from 'react/jsx-runtime';
4
+
5
+ // src/theme/tokens/primitives.ts
6
+ var primitiveColors = {
7
+ // Blue scale (primary brand)
8
+ blue: {
9
+ 50: "#EFF6FF",
10
+ 100: "#DBEAFE",
11
+ 200: "#BFDBFE",
12
+ 300: "#93C5FD",
13
+ 400: "#60A5FA",
14
+ 500: "#3B82F6",
15
+ 600: "#5048E5",
16
+ // Primary main
17
+ 700: "#3832A0",
18
+ // Primary dark
19
+ 800: "#1E40AF",
20
+ 900: "#1E3A8A"
21
+ },
22
+ // Green scale (secondary brand)
23
+ green: {
24
+ 50: "#ECFDF5",
25
+ 100: "#D1FAE5",
26
+ 200: "#A7F3D0",
27
+ 300: "#6EE7B7",
28
+ 400: "#3FC79A",
29
+ // Secondary light
30
+ 500: "#10B981",
31
+ // Secondary main
32
+ 600: "#059669",
33
+ 700: "#0B815A",
34
+ // Secondary dark
35
+ 800: "#065F46",
36
+ 900: "#064E3B"
37
+ },
38
+ // Teal scale (success)
39
+ teal: {
40
+ 50: "#F0FDFA",
41
+ 100: "#CCFBF1",
42
+ 200: "#99F6E4",
43
+ 300: "#5EEAD4",
44
+ 400: "#43C6B7",
45
+ // Success light
46
+ 500: "#14B8A6",
47
+ // Success main
48
+ 600: "#0D9488",
49
+ 700: "#0E8074",
50
+ // Success dark
51
+ 800: "#115E59",
52
+ 900: "#134E4A"
53
+ },
54
+ // Red scale (error)
55
+ red: {
56
+ 50: "#FEF2F2",
57
+ 100: "#FEE2E2",
58
+ 200: "#FECACA",
59
+ 300: "#FCA5A5",
60
+ 400: "#DA6868",
61
+ // Error light
62
+ 500: "#EF4444",
63
+ 600: "#D14343",
64
+ // Error main
65
+ 700: "#922E2E",
66
+ // Error dark
67
+ 800: "#991B1B",
68
+ 900: "#7F1D1D"
69
+ },
70
+ // Vivid green scale (live/go success)
71
+ greenVivid: {
72
+ 50: "#E9FBF0",
73
+ 100: "#C8F7DA",
74
+ 200: "#9FF0BF",
75
+ 300: "#6BE79D",
76
+ 400: "#47DE84",
77
+ // Success vivid light
78
+ 500: "#2ED573",
79
+ // Success vivid main
80
+ 600: "#22B85F",
81
+ 700: "#1A9950",
82
+ // Success vivid dark
83
+ 800: "#157A40",
84
+ 900: "#105C30"
85
+ },
86
+ // Vivid red scale (alert)
87
+ redVivid: {
88
+ 50: "#FFECEE",
89
+ 100: "#FFD6DB",
90
+ 200: "#FFB3BC",
91
+ 300: "#FF8593",
92
+ 400: "#FF6070",
93
+ // Error vivid light
94
+ 500: "#FF4757",
95
+ // Error vivid main
96
+ 600: "#E63548",
97
+ 700: "#C42539",
98
+ // Error vivid dark
99
+ 800: "#9E1C2C",
100
+ 900: "#7A1520"
101
+ },
102
+ // Amber scale (warning)
103
+ amber: {
104
+ 50: "#FFFBEB",
105
+ 100: "#FEF3C7",
106
+ 200: "#FDE68A",
107
+ 300: "#FCD34D",
108
+ 400: "#FFBF4C",
109
+ // Warning light
110
+ 500: "#FFB020",
111
+ // Warning main
112
+ 600: "#B27B16",
113
+ // Warning dark
114
+ 700: "#B45309",
115
+ 800: "#92400E",
116
+ 900: "#78350F"
117
+ },
118
+ // Sky/Blue scale (info)
119
+ sky: {
120
+ 50: "#F0F9FF",
121
+ 100: "#E0F2FE",
122
+ 200: "#BAE6FD",
123
+ 300: "#7DD3FC",
124
+ 400: "#64B6F7",
125
+ // Info light
126
+ 500: "#2196F3",
127
+ // Info main
128
+ 600: "#0284C7",
129
+ 700: "#0B79D0",
130
+ // Info dark
131
+ 800: "#075985",
132
+ 900: "#0C4A6E"
133
+ },
134
+ // Neutral/Gray scale
135
+ neutral: {
136
+ 50: "#FAFAFA",
137
+ 100: "#F3F4F6",
138
+ 200: "#E5E7EB",
139
+ 300: "#D1D5DB",
140
+ 400: "#9CA3AF",
141
+ 500: "#6B7280",
142
+ 600: "#4B5563",
143
+ 700: "#374151",
144
+ 800: "#1F2937",
145
+ 900: "#111827",
146
+ 950: "#030712"
147
+ },
148
+ // Orange scale (accent/brand color)
149
+ accent: {
150
+ 100: "#FFA860",
151
+ 200: "#FF9630",
152
+ 300: "#FF8500",
153
+ 400: "#FF7900",
154
+ 500: "#F56C00",
155
+ 600: "#E06D10",
156
+ 700: "#D0620C",
157
+ 800: "#B75500",
158
+ 900: "#A34900"
159
+ },
160
+ // Charcoal scale (dark backgrounds)
161
+ charcoal: {
162
+ 0: "#6E6E6E",
163
+ 50: "#5D5D5D",
164
+ 100: "#4C4C4C",
165
+ 200: "#3C3C3C",
166
+ 300: "#2C2C2C",
167
+ 400: "#1F1F1F",
168
+ 500: "#1C1C1C",
169
+ 600: "#191919",
170
+ 700: "#161616",
171
+ 800: "#131313",
172
+ 900: "#101010"
173
+ },
174
+ // Steel scale (cool accent)
175
+ steel: {
176
+ 100: "#8AA4B8",
177
+ 200: "#7894A8",
178
+ 300: "#678498",
179
+ 400: "#557488",
180
+ 500: "#406D87",
181
+ 600: "#39617A",
182
+ 700: "#32556D",
183
+ 800: "#243D53",
184
+ 900: "#1D3146"
185
+ },
186
+ // Pure colors
187
+ white: "#FFFFFF",
188
+ black: "#000000",
189
+ transparent: "transparent"
190
+ };
191
+ var primitiveRamps = {
192
+ red: {
193
+ 50: "#FFF4F4",
194
+ 100: "#FFE3E5",
195
+ 200: "#FFC2C5",
196
+ 300: "#FF9A9D",
197
+ 400: "#F77175",
198
+ 500: "#E05254",
199
+ 600: "#D14343",
200
+ // pin
201
+ 700: "#A4221C",
202
+ 800: "#7E1002",
203
+ 900: "#5A0900",
204
+ 950: "#3D0400"
205
+ },
206
+ orange: {
207
+ 50: "#FFF5ED",
208
+ 100: "#FFE6D4",
209
+ 200: "#FFC7A2",
210
+ 300: "#FFA063",
211
+ 400: "#FF7900",
212
+ // pin
213
+ 500: "#DA5F00",
214
+ 600: "#B94A00",
215
+ 700: "#983804",
216
+ 800: "#6F290F",
217
+ 900: "#4E1C0C",
218
+ 950: "#331107"
219
+ },
220
+ amber: {
221
+ 50: "#FFF7DD",
222
+ 100: "#FFEAA9",
223
+ 200: "#FFD352",
224
+ 300: "#F9B415",
225
+ // pin
226
+ 400: "#E08C00",
227
+ 500: "#C27400",
228
+ 600: "#A45E00",
229
+ 700: "#814D14",
230
+ 800: "#5B3A1A",
231
+ 900: "#442503",
232
+ 950: "#301500"
233
+ },
234
+ green: {
235
+ 50: "#E3FFEE",
236
+ 100: "#B5FFD2",
237
+ 200: "#58F69E",
238
+ 300: "#2ED573",
239
+ // pin
240
+ 400: "#21C05D",
241
+ 500: "#22A444",
242
+ 600: "#298732",
243
+ 700: "#2B6B25",
244
+ 800: "#264D1C",
245
+ 900: "#1B3515",
246
+ 950: "#11220D"
247
+ },
248
+ cyan: {
249
+ 50: "#E6FBFF",
250
+ 100: "#C2F6FF",
251
+ 200: "#62EAFF",
252
+ 300: "#22D3EE",
253
+ // pin
254
+ 400: "#01B5D1",
255
+ 500: "#2697B7",
256
+ 600: "#307B9B",
257
+ 700: "#2A617F",
258
+ 800: "#22465F",
259
+ 900: "#0B3149",
260
+ 950: "#001F36"
261
+ },
262
+ blue: {
263
+ 50: "#EFF8FF",
264
+ 100: "#D9EFFF",
265
+ 200: "#ACDBFF",
266
+ 300: "#78C2FF",
267
+ 400: "#3CA8FF",
268
+ 500: "#2196F3",
269
+ // pin
270
+ 600: "#1072CB",
271
+ 700: "#135AA8",
272
+ 800: "#14407E",
273
+ 900: "#112C5A",
274
+ 950: "#091B3C"
275
+ },
276
+ magenta: {
277
+ 50: "#FFF3F9",
278
+ 100: "#FFE2F1",
279
+ 200: "#FFBDE2",
280
+ 300: "#FF8FD5",
281
+ 400: "#ED69C3",
282
+ 500: "#D548AF",
283
+ 600: "#BA2996",
284
+ 700: "#9C0D7A",
285
+ // pin
286
+ 800: "#77005A",
287
+ 900: "#56003F",
288
+ 950: "#3B0029"
289
+ }
290
+ };
291
+ var categoricalPalette = {
292
+ default: [
293
+ primitiveRamps.blue[500],
294
+ primitiveRamps.magenta[500],
295
+ primitiveRamps.red[500],
296
+ primitiveRamps.orange[400],
297
+ primitiveRamps.green[300],
298
+ primitiveRamps.cyan[300],
299
+ primitiveRamps.amber[600]
300
+ // extended (7th) — pair with a legend
301
+ ],
302
+ dark: [
303
+ primitiveRamps.blue[600],
304
+ primitiveRamps.magenta[600],
305
+ primitiveRamps.red[500],
306
+ primitiveRamps.orange[600],
307
+ primitiveRamps.green[800],
308
+ primitiveRamps.cyan[800],
309
+ primitiveRamps.amber[500]
310
+ // extended (7th) — pair with a legend
311
+ ]
312
+ };
313
+ var CATEGORICAL_CVD_SAFE_MAX = 6;
314
+ function getCategoricalColor(index, variant = "default") {
315
+ const palette = categoricalPalette[variant];
316
+ index = Math.max(0, Math.floor(index));
317
+ return palette[index % palette.length];
318
+ }
319
+ var divergingScale = [
320
+ primitiveRamps.blue[500],
321
+ // under
322
+ primitiveRamps.cyan[300],
323
+ // maintenance
324
+ primitiveRamps.green[200],
325
+ // optimal (light center)
326
+ primitiveRamps.amber[300],
327
+ // approaching
328
+ primitiveRamps.red[600]
329
+ // over
330
+ ];
331
+ var sequentialEffort = [
332
+ primitiveRamps.green[300],
333
+ primitiveRamps.amber[200],
334
+ primitiveRamps.amber[300],
335
+ primitiveRamps.orange[400],
336
+ primitiveRamps.red[600],
337
+ primitiveRamps.red[700]
338
+ ];
339
+ function bestTextColor(hex) {
340
+ const [r, g, b] = [0, 2, 4].map((i) => {
341
+ const c = parseInt(hex.replace("#", "").slice(i, i + 2), 16) / 255;
342
+ return c >= 0.04045 ? ((c + 0.055) / 1.055) ** 2.4 : c / 12.92;
343
+ });
344
+ const l = 0.2126 * r + 0.7152 * g + 0.0722 * b;
345
+ return (l + 0.05) / 0.05 >= 1.05 / (l + 0.05) ? "#000000" : "#FFFFFF";
346
+ }
347
+ var discreteRainbow = [
348
+ "#E8ECFB",
349
+ "#D9CCE3",
350
+ "#D1BBD7",
351
+ "#CAACCB",
352
+ "#BA8DB4",
353
+ "#AE76A3",
354
+ "#AA6F9E",
355
+ "#994F88",
356
+ "#882E72",
357
+ "#1965B0",
358
+ "#437DBF",
359
+ "#5289C7",
360
+ "#6195CF",
361
+ "#7BAFDE",
362
+ "#4EB265",
363
+ "#90C987",
364
+ "#CAE0AB",
365
+ "#F7F056",
366
+ "#F7CB45",
367
+ "#F6C141",
368
+ "#F4A736",
369
+ "#F1932D",
370
+ "#EE8026",
371
+ "#E8601C",
372
+ "#E65518",
373
+ "#DC050C",
374
+ "#A5170E",
375
+ "#72190E",
376
+ "#42150A"
377
+ ];
378
+ var discreteRainbowPalettes = [
379
+ [10],
380
+ [10, 26],
381
+ [10, 18, 26],
382
+ [10, 15, 18, 26],
383
+ [10, 14, 15, 18, 26],
384
+ [10, 14, 15, 17, 18, 26],
385
+ [9, 10, 14, 15, 17, 18, 26],
386
+ [9, 10, 14, 15, 17, 18, 23, 26],
387
+ [9, 10, 14, 15, 17, 18, 23, 26, 28],
388
+ [9, 10, 14, 15, 17, 18, 21, 24, 26, 28],
389
+ [9, 10, 12, 14, 15, 17, 18, 21, 24, 26, 28],
390
+ [3, 6, 9, 10, 12, 14, 15, 17, 18, 21, 24, 26],
391
+ [3, 6, 9, 10, 12, 14, 15, 16, 17, 18, 21, 24, 26],
392
+ [3, 6, 9, 10, 12, 14, 15, 16, 17, 18, 20, 22, 24, 26],
393
+ [3, 6, 9, 10, 12, 14, 15, 16, 17, 18, 20, 22, 24, 26, 28],
394
+ [3, 5, 7, 9, 10, 12, 14, 15, 16, 17, 18, 20, 22, 24, 26, 28],
395
+ [3, 5, 7, 8, 9, 10, 12, 14, 15, 16, 17, 18, 20, 22, 24, 26, 28],
396
+ [3, 5, 7, 8, 9, 10, 12, 14, 15, 16, 17, 18, 20, 22, 24, 26, 27, 28],
397
+ [2, 4, 5, 7, 8, 9, 10, 12, 14, 15, 16, 17, 18, 20, 22, 24, 26, 27, 28],
398
+ [2, 4, 5, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 20, 22, 24, 26, 27, 28],
399
+ [2, 4, 5, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 21, 23, 25, 26, 27, 28],
400
+ [2, 4, 5, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 21, 23, 25, 26, 27, 28, 29],
401
+ [1, 2, 4, 5, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 21, 23, 25, 26, 27, 28, 29]
402
+ ];
403
+ function getDiscreteRainbowColor(index, size) {
404
+ index = Math.max(0, index);
405
+ size = Math.min(Math.max(1, size), discreteRainbowPalettes.length);
406
+ const palette = discreteRainbowPalettes[size - 1];
407
+ if (index >= palette.length) index = index % palette.length;
408
+ return discreteRainbow[palette[index] - 1];
409
+ }
410
+ var primitiveTypography = {
411
+ fontFamilies: {
412
+ sans: ["Inter", "-apple-system", "BlinkMacSystemFont", "Segoe UI", "Helvetica", "Arial", "sans-serif"],
413
+ body: ["Nunito Sans", "sans-serif"],
414
+ heading: ["Space Grotesk", "sans-serif"],
415
+ mono: ["SF Mono", "Monaco", "Inconsolata", "Fira Mono", "Droid Sans Mono", "Source Code Pro", "monospace"]
416
+ },
417
+ fontSizes: {
418
+ xs: "0.75rem",
419
+ // 12px
420
+ sm: "0.875rem",
421
+ // 14px
422
+ base: "1rem",
423
+ // 16px
424
+ lg: "1.125rem",
425
+ // 18px
426
+ xl: "1.5rem",
427
+ // 24px
428
+ "2xl": "2rem",
429
+ // 32px
430
+ "3xl": "2.25rem",
431
+ // 36px
432
+ "4xl": "3rem",
433
+ // 48px
434
+ "5xl": "3.5rem"
435
+ // 56px
436
+ },
437
+ fontWeights: {
438
+ normal: 400,
439
+ medium: 500,
440
+ semibold: 600,
441
+ bold: 700
442
+ },
443
+ lineHeights: {
444
+ none: 1,
445
+ tight: 1.375,
446
+ snug: 1.5,
447
+ normal: 1.57,
448
+ relaxed: 1.66,
449
+ loose: 1.75
450
+ },
451
+ letterSpacing: {
452
+ tighter: "-0.05em",
453
+ tight: "-0.025em",
454
+ normal: "0em",
455
+ wide: "0.025em",
456
+ wider: "0.05em",
457
+ widest: "0.5px"
458
+ }
459
+ };
460
+ var primitiveSpacing = {
461
+ 0: "0",
462
+ px: "1px",
463
+ 0.5: "0.125rem",
464
+ // 2px
465
+ 1: "0.25rem",
466
+ // 4px
467
+ 1.5: "0.375rem",
468
+ // 6px
469
+ 2: "0.5rem",
470
+ // 8px
471
+ 2.5: "0.625rem",
472
+ // 10px
473
+ 3: "0.75rem",
474
+ // 12px
475
+ 3.5: "0.875rem",
476
+ // 14px
477
+ 4: "1rem",
478
+ // 16px
479
+ 5: "1.25rem",
480
+ // 20px
481
+ 6: "1.5rem",
482
+ // 24px
483
+ 7: "1.75rem",
484
+ // 28px
485
+ 8: "2rem",
486
+ // 32px
487
+ 9: "2.25rem",
488
+ // 36px
489
+ 10: "2.5rem",
490
+ // 40px
491
+ 11: "2.75rem",
492
+ // 44px
493
+ 12: "3rem",
494
+ // 48px
495
+ 14: "3.5rem",
496
+ // 56px
497
+ 16: "4rem",
498
+ // 64px
499
+ 20: "5rem",
500
+ // 80px
501
+ 24: "6rem",
502
+ // 96px
503
+ 28: "7rem",
504
+ // 112px
505
+ 32: "8rem"
506
+ // 128px
507
+ };
508
+ var primitiveBorderRadius = {
509
+ none: "0",
510
+ sm: "4px",
511
+ DEFAULT: "8px",
512
+ md: "8px",
513
+ lg: "12px",
514
+ xl: "16px",
515
+ "2xl": "24px",
516
+ full: "9999px"
517
+ };
518
+ var primitiveShadows = {
519
+ none: "none",
520
+ sm: "0px 1px 2px rgba(100, 116, 139, 0.12)",
521
+ DEFAULT: "0px 1px 3px rgba(100, 116, 139, 0.12), 0px 1px 2px rgba(100, 116, 139, 0.24)",
522
+ md: "0px 4px 6px rgba(100, 116, 139, 0.12)",
523
+ lg: "0px 10px 15px rgba(100, 116, 139, 0.12)",
524
+ xl: "0px 20px 25px rgba(100, 116, 139, 0.12)",
525
+ "2xl": "0px 25px 50px rgba(100, 116, 139, 0.25)",
526
+ inner: "inset 0 2px 4px 0 rgba(0, 0, 0, 0.06)"
527
+ };
528
+ var primitiveBreakpoints = {
529
+ xs: 0,
530
+ sm: 600,
531
+ md: 1e3,
532
+ lg: 1200,
533
+ xl: 1920
534
+ };
535
+ var primitiveZIndex = {
536
+ hide: -1,
537
+ auto: "auto",
538
+ base: 0,
539
+ docked: 10,
540
+ dropdown: 1e3,
541
+ sticky: 1100,
542
+ drawer: 1100,
543
+ banner: 1200,
544
+ appBar: 1200,
545
+ overlay: 1300,
546
+ modal: 1400,
547
+ popover: 1500,
548
+ skipLink: 1600,
549
+ toast: 1700,
550
+ tooltip: 1800
551
+ };
552
+
553
+ // src/theme/tokens/semantic.ts
554
+ var semanticColorsLight = {
555
+ // Brand colors (brand-*)
556
+ "brand-primary": primitiveRamps.orange[400],
557
+ "brand-primary-light": primitiveRamps.orange[300],
558
+ "brand-primary-dark": primitiveRamps.orange[500],
559
+ "brand-primary-subtle": "rgba(255, 121, 0, 0.08)",
560
+ "brand-primary-hover": primitiveRamps.orange[500],
561
+ "brand-primary-active": primitiveRamps.orange[600],
562
+ "brand-secondary": primitiveRamps.cyan[600],
563
+ "brand-secondary-light": primitiveRamps.cyan[500],
564
+ "brand-secondary-dark": primitiveRamps.cyan[700],
565
+ "brand-secondary-subtle": "rgba(48, 123, 155, 0.08)",
566
+ "brand-secondary-hover": primitiveRamps.cyan[700],
567
+ "brand-secondary-active": primitiveRamps.cyan[800],
568
+ // Text on brand backgrounds (on-*)
569
+ "on-brand-primary": primitiveColors.white,
570
+ "on-brand-secondary": primitiveColors.white,
571
+ // Status colors (status-*)
572
+ "status-success": primitiveRamps.green[300],
573
+ "status-success-light": primitiveRamps.green[200],
574
+ "status-success-dark": primitiveRamps.green[600],
575
+ "status-success-subtle": primitiveRamps.green[50],
576
+ "status-error": primitiveRamps.red[600],
577
+ "status-error-light": primitiveRamps.red[500],
578
+ "status-error-dark": primitiveRamps.red[700],
579
+ "status-error-subtle": primitiveRamps.red[50],
580
+ "status-error-vivid": primitiveColors.redVivid[500],
581
+ // vivid alert red
582
+ "status-error-vivid-light": primitiveColors.redVivid[400],
583
+ "status-error-vivid-dark": primitiveColors.redVivid[700],
584
+ "status-error-vivid-subtle": "rgba(255, 71, 87, 0.12)",
585
+ "status-warning": primitiveRamps.amber[300],
586
+ "status-warning-light": primitiveRamps.amber[200],
587
+ "status-warning-dark": primitiveRamps.amber[500],
588
+ "status-warning-subtle": primitiveRamps.amber[50],
589
+ "status-info": primitiveRamps.blue[500],
590
+ "status-info-light": primitiveRamps.blue[300],
591
+ "status-info-dark": primitiveRamps.blue[600],
592
+ "status-info-subtle": primitiveRamps.blue[50],
593
+ // Text on status backgrounds (on-status-*)
594
+ "on-status-success": primitiveColors.white,
595
+ "on-status-error": primitiveColors.white,
596
+ "on-status-warning": primitiveColors.white,
597
+ "on-status-info": primitiveColors.white,
598
+ // Result/outcome indicators (result-*)
599
+ "result-improve": "#4caf50",
600
+ // Green - positive outcome
601
+ "result-improve-light": "rgba(76, 175, 80, 0.12)",
602
+ "result-improve-dark": "#248a24",
603
+ "result-degrade": "#ef5350",
604
+ // Red - negative outcome
605
+ "result-degrade-light": "rgba(239, 83, 80, 0.12)",
606
+ "result-degrade-dark": "#b30000",
607
+ "result-inconclusive": "#9E9A97",
608
+ // Gray - no clear result
609
+ "result-inconclusive-light": "rgba(158, 154, 151, 0.12)",
610
+ "result-neutral": primitiveColors.neutral[500],
611
+ // Neutral baseline
612
+ // Text on result backgrounds (on-result-*)
613
+ "on-result-improve": primitiveColors.white,
614
+ "on-result-degrade": primitiveColors.white,
615
+ "on-result-inconclusive": primitiveColors.white,
616
+ // Data visualization colors (data-*)
617
+ // First 10 colors from discrete rainbow optimized for charts
618
+ "data-1": discreteRainbow[9],
619
+ // Blue
620
+ "data-2": discreteRainbow[14],
621
+ // Green
622
+ "data-3": discreteRainbow[17],
623
+ // Yellow
624
+ "data-4": discreteRainbow[25],
625
+ // Red
626
+ "data-5": discreteRainbow[8],
627
+ // Purple
628
+ "data-6": discreteRainbow[20],
629
+ // Orange
630
+ "data-7": discreteRainbow[13],
631
+ // Light Blue
632
+ "data-8": discreteRainbow[15],
633
+ // Light Green
634
+ "data-9": discreteRainbow[3],
635
+ // Lavender
636
+ "data-10": discreteRainbow[22],
637
+ // Dark Orange
638
+ // Text colors (text-*)
639
+ "text-primary": "#121828",
640
+ "text-secondary": "#65748B",
641
+ "text-tertiary": primitiveColors.neutral[400],
642
+ "text-disabled": "rgba(55, 65, 81, 0.48)",
643
+ "text-inverse": primitiveColors.white,
644
+ "text-link": primitiveColors.blue[600],
645
+ "text-link-hover": primitiveColors.blue[700],
646
+ // Surface colors (surface-*) - for elevated containers
647
+ "surface-base": primitiveColors.white,
648
+ "surface-elevated": primitiveColors.neutral[50],
649
+ // slightly off-white for elevated cards
650
+ "surface-raised": primitiveColors.neutral[100],
651
+ // light gray for raised cards
652
+ "surface-overlay": primitiveColors.white,
653
+ "surface-input": primitiveColors.neutral[50],
654
+ // Input field background (filled variant)
655
+ // Background colors (background-*)
656
+ "background-base": "#EBEBEB",
657
+ "background-default": primitiveColors.white,
658
+ "background-subtle": primitiveColors.neutral[50],
659
+ // Border colors (border-*)
660
+ "border-default": "#E8E9EB",
661
+ "border-subtle": primitiveColors.neutral[100],
662
+ "border-strong": primitiveColors.neutral[300],
663
+ "border-prominent": primitiveColors.neutral[400],
664
+ // high-visibility divider
665
+ "border-focus": primitiveColors.blue[600],
666
+ "border-input": primitiveColors.neutral[300],
667
+ // Input field border
668
+ "border-input-hover": primitiveColors.neutral[400],
669
+ // Input field border on hover
670
+ "border-input-focus": primitiveColors.blue[600],
671
+ // Input field border on focus
672
+ "border-input-error": primitiveColors.red[600],
673
+ // Input field border on error
674
+ // Interactive states (interactive-*)
675
+ "interactive-hover": "rgba(55, 65, 81, 0.04)",
676
+ "interactive-focus": "rgba(55, 65, 81, 0.12)",
677
+ "interactive-active": "rgba(55, 65, 81, 0.16)",
678
+ "interactive-selected": "rgba(55, 65, 81, 0.08)",
679
+ "interactive-disabled": "rgba(55, 65, 81, 0.12)",
680
+ "interactive-disabled-text": "rgba(55, 65, 81, 0.26)",
681
+ // Divider
682
+ "divider": "#E8E9EB",
683
+ // Avatar default
684
+ "avatar-background": primitiveColors.neutral[500],
685
+ "avatar-text": primitiveColors.white
686
+ };
687
+ var semanticColorsDark = {
688
+ // Brand colors stay the same in dark mode
689
+ "brand-primary": primitiveRamps.orange[400],
690
+ "brand-primary-light": primitiveRamps.orange[300],
691
+ "brand-primary-dark": primitiveRamps.orange[500],
692
+ "brand-primary-subtle": "rgba(255, 121, 0, 0.12)",
693
+ "brand-primary-hover": primitiveRamps.orange[300],
694
+ "brand-primary-active": primitiveRamps.orange[200],
695
+ "brand-secondary": primitiveRamps.cyan[600],
696
+ "brand-secondary-light": primitiveRamps.cyan[500],
697
+ "brand-secondary-dark": primitiveRamps.cyan[700],
698
+ "brand-secondary-subtle": "rgba(48, 123, 155, 0.12)",
699
+ "brand-secondary-hover": primitiveRamps.cyan[500],
700
+ "brand-secondary-active": primitiveRamps.cyan[400],
701
+ // Text on brand backgrounds
702
+ "on-brand-primary": primitiveColors.white,
703
+ "on-brand-secondary": primitiveColors.white,
704
+ // Status colors
705
+ "status-success": primitiveRamps.green[300],
706
+ "status-success-light": primitiveRamps.green[200],
707
+ "status-success-dark": primitiveRamps.green[600],
708
+ "status-success-subtle": "rgba(46, 213, 115, 0.12)",
709
+ "status-error": primitiveRamps.red[600],
710
+ "status-error-light": primitiveRamps.red[500],
711
+ "status-error-dark": primitiveRamps.red[700],
712
+ "status-error-subtle": "rgba(209, 67, 67, 0.12)",
713
+ "status-error-vivid": primitiveColors.redVivid[500],
714
+ "status-error-vivid-light": primitiveColors.redVivid[400],
715
+ "status-error-vivid-dark": primitiveColors.redVivid[700],
716
+ "status-error-vivid-subtle": "rgba(255, 71, 87, 0.12)",
717
+ "status-warning": primitiveRamps.amber[300],
718
+ "status-warning-light": primitiveRamps.amber[200],
719
+ "status-warning-dark": primitiveRamps.amber[500],
720
+ "status-warning-subtle": "rgba(249, 180, 21, 0.12)",
721
+ "status-info": primitiveRamps.blue[500],
722
+ "status-info-light": primitiveRamps.blue[300],
723
+ "status-info-dark": primitiveRamps.blue[600],
724
+ "status-info-subtle": "rgba(33, 150, 243, 0.12)",
725
+ // Text on status backgrounds
726
+ "on-status-success": primitiveColors.white,
727
+ "on-status-error": primitiveColors.white,
728
+ "on-status-warning": primitiveColors.white,
729
+ "on-status-info": primitiveColors.white,
730
+ // Result/outcome indicators (result-*)
731
+ "result-improve": "#4caf50",
732
+ "result-improve-light": "rgba(76, 175, 80, 0.16)",
733
+ "result-improve-dark": "#248a24",
734
+ "result-degrade": "#ef5350",
735
+ "result-degrade-light": "rgba(239, 83, 80, 0.16)",
736
+ "result-degrade-dark": "#b30000",
737
+ "result-inconclusive": "#9E9A97",
738
+ "result-inconclusive-light": "rgba(158, 154, 151, 0.16)",
739
+ "result-neutral": primitiveColors.neutral[400],
740
+ // Text on result backgrounds
741
+ "on-result-improve": primitiveColors.white,
742
+ "on-result-degrade": primitiveColors.white,
743
+ "on-result-inconclusive": primitiveColors.white,
744
+ // Data visualization colors (same in dark mode for consistency)
745
+ "data-1": discreteRainbow[9],
746
+ "data-2": discreteRainbow[14],
747
+ "data-3": discreteRainbow[17],
748
+ "data-4": discreteRainbow[25],
749
+ "data-5": discreteRainbow[8],
750
+ "data-6": discreteRainbow[20],
751
+ "data-7": discreteRainbow[13],
752
+ "data-8": discreteRainbow[15],
753
+ "data-9": discreteRainbow[3],
754
+ "data-10": discreteRainbow[22],
755
+ // Text colors - inverted for dark mode
756
+ "text-primary": primitiveColors.neutral[100],
757
+ "text-secondary": primitiveColors.neutral[400],
758
+ "text-tertiary": primitiveColors.neutral[500],
759
+ "text-disabled": "rgba(255, 255, 255, 0.38)",
760
+ "text-inverse": primitiveColors.neutral[900],
761
+ "text-link": "#828DF8",
762
+ "text-link-hover": primitiveColors.blue[400],
763
+ // Surface colors - dark backgrounds
764
+ "surface-base": primitiveColors.charcoal[700],
765
+ // main surface
766
+ "surface-elevated": primitiveColors.charcoal[600],
767
+ // elevated surface
768
+ "surface-raised": primitiveColors.charcoal[500],
769
+ // raised surface
770
+ "surface-overlay": primitiveColors.charcoal[600],
771
+ // overlay surface
772
+ "surface-input": primitiveColors.charcoal[600],
773
+ // input surface
774
+ // Background colors
775
+ "background-base": primitiveColors.charcoal[900],
776
+ // darkest charcoal
777
+ "background-default": primitiveColors.charcoal[700],
778
+ // main background
779
+ "background-subtle": primitiveColors.charcoal[500],
780
+ // subtle background
781
+ // Border colors
782
+ "border-default": primitiveColors.charcoal[400],
783
+ // default border
784
+ "border-subtle": primitiveColors.charcoal[500],
785
+ // subtle border
786
+ "border-strong": primitiveColors.charcoal[300],
787
+ // strong border
788
+ "border-prominent": primitiveColors.charcoal[200],
789
+ // high-visibility divider
790
+ "border-focus": "#828DF8",
791
+ "border-input": primitiveColors.neutral[600],
792
+ "border-input-hover": primitiveColors.neutral[500],
793
+ "border-input-focus": "#828DF8",
794
+ "border-input-error": primitiveColors.red[500],
795
+ // Interactive states
796
+ "interactive-hover": "rgba(255, 255, 255, 0.04)",
797
+ "interactive-focus": "rgba(255, 255, 255, 0.12)",
798
+ "interactive-active": "rgba(255, 255, 255, 0.16)",
799
+ "interactive-selected": "rgba(255, 255, 255, 0.08)",
800
+ "interactive-disabled": "rgba(255, 255, 255, 0.12)",
801
+ "interactive-disabled-text": "rgba(255, 255, 255, 0.26)",
802
+ // Divider
803
+ "divider": primitiveColors.charcoal[400],
804
+ // divider color
805
+ // Avatar default
806
+ "avatar-background": primitiveColors.neutral[600],
807
+ "avatar-text": primitiveColors.white
808
+ };
809
+ var semanticTypography = {
810
+ // Headings (Space Grotesk)
811
+ h1: {
812
+ fontFamily: "heading",
813
+ fontSize: "3.5rem",
814
+ fontWeight: 700,
815
+ lineHeight: 1.375
816
+ },
817
+ h2: {
818
+ fontFamily: "heading",
819
+ fontSize: "3rem",
820
+ fontWeight: 700,
821
+ lineHeight: 1.375
822
+ },
823
+ h3: {
824
+ fontFamily: "heading",
825
+ fontSize: "2.25rem",
826
+ fontWeight: 700,
827
+ lineHeight: 1.375
828
+ },
829
+ h4: {
830
+ fontFamily: "heading",
831
+ fontSize: "2rem",
832
+ fontWeight: 700,
833
+ lineHeight: 1.375
834
+ },
835
+ h5: {
836
+ fontFamily: "heading",
837
+ fontSize: "1.5rem",
838
+ fontWeight: 600,
839
+ lineHeight: 1.375
840
+ },
841
+ h6: {
842
+ fontFamily: "heading",
843
+ fontSize: "1.125rem",
844
+ fontWeight: 600,
845
+ lineHeight: 1.375
846
+ },
847
+ // Body text (Nunito Sans)
848
+ body1: {
849
+ fontFamily: "body",
850
+ fontSize: "1rem",
851
+ fontWeight: 400,
852
+ lineHeight: 1.5
853
+ },
854
+ body2: {
855
+ fontFamily: "body",
856
+ fontSize: "0.875rem",
857
+ fontWeight: 400,
858
+ lineHeight: 1.57
859
+ },
860
+ subtitle1: {
861
+ fontFamily: "body",
862
+ fontSize: "1rem",
863
+ fontWeight: 500,
864
+ lineHeight: 1.75
865
+ },
866
+ subtitle2: {
867
+ fontFamily: "body",
868
+ fontSize: "0.875rem",
869
+ fontWeight: 500,
870
+ lineHeight: 1.57
871
+ },
872
+ caption: {
873
+ fontFamily: "body",
874
+ fontSize: "0.75rem",
875
+ fontWeight: 400,
876
+ lineHeight: 1.66
877
+ },
878
+ overline: {
879
+ fontFamily: "body",
880
+ fontSize: "0.75rem",
881
+ fontWeight: 600,
882
+ lineHeight: 2.5,
883
+ letterSpacing: "0.5px",
884
+ textTransform: "uppercase"
885
+ },
886
+ button: {
887
+ fontFamily: "sans",
888
+ fontSize: "0.875rem",
889
+ fontWeight: 600,
890
+ lineHeight: 1.75
891
+ }
892
+ };
893
+ var buttonSizes = {
894
+ sm: {
895
+ paddingX: "16px",
896
+ paddingY: "6px",
897
+ fontSize: "0.875rem"
898
+ },
899
+ md: {
900
+ paddingX: "20px",
901
+ paddingY: "8px",
902
+ fontSize: "0.875rem"
903
+ },
904
+ lg: {
905
+ paddingX: "24px",
906
+ paddingY: "11px",
907
+ fontSize: "1rem"
908
+ }
909
+ };
910
+ function getSemanticColors(mode) {
911
+ return mode === "dark" ? semanticColorsDark : semanticColorsLight;
912
+ }
913
+
914
+ // src/theme/config.ts
915
+ var themeIndependentCSSVars = {
916
+ // RGB decomposed values for glow shadows
917
+ "--color-brand-primary-rgb": "255, 121, 0",
918
+ "--color-brand-secondary-rgb": "48, 123, 155",
919
+ "--color-status-success-rgb": "46, 213, 115",
920
+ "--color-status-error-rgb": "209, 67, 67",
921
+ "--color-status-error-vivid-rgb": "255, 71, 87",
922
+ "--color-status-warning-rgb": "249, 180, 21",
923
+ "--color-status-info-rgb": "33, 150, 243",
924
+ "--color-background-base-rgb": "16, 16, 16",
925
+ // Font families
926
+ "--font-family-sans": "'Inter'",
927
+ "--font-family-body": "'Nunito Sans'",
928
+ "--font-family-heading": "'Space Grotesk'",
929
+ "--font-family-mono": "'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace",
930
+ // Animation tokens
931
+ "--ease-out": "cubic-bezier(0.22, 1, 0.36, 1)",
932
+ "--ease-in-out": "cubic-bezier(0.65, 0, 0.35, 1)",
933
+ "--ease-spring": "cubic-bezier(0.34, 1.56, 0.64, 1)",
934
+ "--duration-fast": "150ms",
935
+ "--duration-normal": "250ms",
936
+ "--duration-slow": "400ms"
937
+ };
938
+ var lightThemeCSSVars = {
939
+ "--color-brand-primary": semanticColorsLight["brand-primary"],
940
+ "--color-brand-primary-light": semanticColorsLight["brand-primary-light"],
941
+ "--color-brand-primary-dark": semanticColorsLight["brand-primary-dark"],
942
+ "--color-brand-primary-subtle": semanticColorsLight["brand-primary-subtle"],
943
+ "--color-brand-secondary": semanticColorsLight["brand-secondary"],
944
+ "--color-brand-secondary-light": semanticColorsLight["brand-secondary-light"],
945
+ "--color-brand-secondary-dark": semanticColorsLight["brand-secondary-dark"],
946
+ "--color-brand-secondary-subtle": semanticColorsLight["brand-secondary-subtle"],
947
+ "--color-on-brand-primary": semanticColorsLight["on-brand-primary"],
948
+ "--color-on-brand-secondary": semanticColorsLight["on-brand-secondary"],
949
+ "--color-status-success": semanticColorsLight["status-success"],
950
+ "--color-status-success-subtle": semanticColorsLight["status-success-subtle"],
951
+ "--color-status-error": semanticColorsLight["status-error"],
952
+ "--color-status-error-subtle": semanticColorsLight["status-error-subtle"],
953
+ "--color-status-warning": semanticColorsLight["status-warning"],
954
+ "--color-status-warning-subtle": semanticColorsLight["status-warning-subtle"],
955
+ "--color-status-info": semanticColorsLight["status-info"],
956
+ "--color-status-info-subtle": semanticColorsLight["status-info-subtle"],
957
+ "--color-status-error-vivid": semanticColorsLight["status-error-vivid"],
958
+ "--color-status-error-vivid-light": semanticColorsLight["status-error-vivid-light"],
959
+ "--color-status-error-vivid-dark": semanticColorsLight["status-error-vivid-dark"],
960
+ "--color-status-error-vivid-subtle": semanticColorsLight["status-error-vivid-subtle"],
961
+ "--color-text-primary": semanticColorsLight["text-primary"],
962
+ "--color-text-secondary": semanticColorsLight["text-secondary"],
963
+ "--color-text-tertiary": semanticColorsLight["text-tertiary"],
964
+ "--color-text-disabled": semanticColorsLight["text-disabled"],
965
+ "--color-text-inverse": semanticColorsLight["text-inverse"],
966
+ "--color-text-link": semanticColorsLight["text-link"],
967
+ "--color-surface-base": semanticColorsLight["surface-base"],
968
+ "--color-surface-elevated": semanticColorsLight["surface-elevated"],
969
+ "--color-surface-raised": semanticColorsLight["surface-raised"],
970
+ "--color-background-base": semanticColorsLight["background-base"],
971
+ "--color-background-default": semanticColorsLight["background-default"],
972
+ "--color-background-subtle": semanticColorsLight["background-subtle"],
973
+ "--color-border-default": semanticColorsLight["border-default"],
974
+ "--color-border-subtle": semanticColorsLight["border-subtle"],
975
+ "--color-border-strong": semanticColorsLight["border-strong"],
976
+ "--color-border-prominent": semanticColorsLight["border-prominent"],
977
+ "--color-border-focus": semanticColorsLight["border-focus"],
978
+ "--color-interactive-hover": semanticColorsLight["interactive-hover"],
979
+ "--color-interactive-focus": semanticColorsLight["interactive-focus"],
980
+ "--color-interactive-active": semanticColorsLight["interactive-active"],
981
+ "--color-interactive-selected": semanticColorsLight["interactive-selected"],
982
+ "--color-interactive-disabled": semanticColorsLight["interactive-disabled"],
983
+ "--color-divider": semanticColorsLight["divider"],
984
+ "--color-brand-primary-hover": semanticColorsLight["brand-primary-hover"],
985
+ "--color-brand-primary-active": semanticColorsLight["brand-primary-active"],
986
+ "--color-brand-secondary-hover": semanticColorsLight["brand-secondary-hover"],
987
+ "--color-brand-secondary-active": semanticColorsLight["brand-secondary-active"],
988
+ "--color-status-success-light": semanticColorsLight["status-success-light"],
989
+ "--color-status-success-dark": semanticColorsLight["status-success-dark"],
990
+ "--color-status-error-light": semanticColorsLight["status-error-light"],
991
+ "--color-status-error-dark": semanticColorsLight["status-error-dark"],
992
+ "--color-status-warning-light": semanticColorsLight["status-warning-light"],
993
+ "--color-status-warning-dark": semanticColorsLight["status-warning-dark"],
994
+ "--color-status-info-light": semanticColorsLight["status-info-light"],
995
+ "--color-status-info-dark": semanticColorsLight["status-info-dark"],
996
+ "--color-on-status-success": semanticColorsLight["on-status-success"],
997
+ "--color-on-status-error": semanticColorsLight["on-status-error"],
998
+ "--color-on-status-warning": semanticColorsLight["on-status-warning"],
999
+ "--color-on-status-info": semanticColorsLight["on-status-info"],
1000
+ "--color-result-improve": semanticColorsLight["result-improve"],
1001
+ "--color-result-improve-light": semanticColorsLight["result-improve-light"],
1002
+ "--color-result-improve-dark": semanticColorsLight["result-improve-dark"],
1003
+ "--color-result-degrade": semanticColorsLight["result-degrade"],
1004
+ "--color-result-degrade-light": semanticColorsLight["result-degrade-light"],
1005
+ "--color-result-degrade-dark": semanticColorsLight["result-degrade-dark"],
1006
+ "--color-result-inconclusive": semanticColorsLight["result-inconclusive"],
1007
+ "--color-result-inconclusive-light": semanticColorsLight["result-inconclusive-light"],
1008
+ "--color-result-neutral": semanticColorsLight["result-neutral"],
1009
+ "--color-on-result-improve": semanticColorsLight["on-result-improve"],
1010
+ "--color-on-result-degrade": semanticColorsLight["on-result-degrade"],
1011
+ "--color-on-result-inconclusive": semanticColorsLight["on-result-inconclusive"],
1012
+ "--color-data-1": semanticColorsLight["data-1"],
1013
+ "--color-data-2": semanticColorsLight["data-2"],
1014
+ "--color-data-3": semanticColorsLight["data-3"],
1015
+ "--color-data-4": semanticColorsLight["data-4"],
1016
+ "--color-data-5": semanticColorsLight["data-5"],
1017
+ "--color-data-6": semanticColorsLight["data-6"],
1018
+ "--color-data-7": semanticColorsLight["data-7"],
1019
+ "--color-data-8": semanticColorsLight["data-8"],
1020
+ "--color-data-9": semanticColorsLight["data-9"],
1021
+ "--color-data-10": semanticColorsLight["data-10"],
1022
+ "--color-text-link-hover": semanticColorsLight["text-link-hover"],
1023
+ "--color-surface-overlay": semanticColorsLight["surface-overlay"],
1024
+ "--color-surface-input": semanticColorsLight["surface-input"],
1025
+ "--color-border-input": semanticColorsLight["border-input"],
1026
+ "--color-border-input-hover": semanticColorsLight["border-input-hover"],
1027
+ "--color-border-input-focus": semanticColorsLight["border-input-focus"],
1028
+ "--color-border-input-error": semanticColorsLight["border-input-error"],
1029
+ "--color-interactive-disabled-text": semanticColorsLight["interactive-disabled-text"],
1030
+ "--color-avatar-background": semanticColorsLight["avatar-background"],
1031
+ "--color-avatar-text": semanticColorsLight["avatar-text"],
1032
+ ...themeIndependentCSSVars
1033
+ };
1034
+ var darkThemeCSSVars = {
1035
+ "--color-brand-primary": semanticColorsDark["brand-primary"],
1036
+ "--color-brand-primary-light": semanticColorsDark["brand-primary-light"],
1037
+ "--color-brand-primary-dark": semanticColorsDark["brand-primary-dark"],
1038
+ "--color-brand-primary-subtle": semanticColorsDark["brand-primary-subtle"],
1039
+ "--color-brand-secondary": semanticColorsDark["brand-secondary"],
1040
+ "--color-brand-secondary-light": semanticColorsDark["brand-secondary-light"],
1041
+ "--color-brand-secondary-dark": semanticColorsDark["brand-secondary-dark"],
1042
+ "--color-brand-secondary-subtle": semanticColorsDark["brand-secondary-subtle"],
1043
+ "--color-on-brand-primary": semanticColorsDark["on-brand-primary"],
1044
+ "--color-on-brand-secondary": semanticColorsDark["on-brand-secondary"],
1045
+ "--color-status-success": semanticColorsDark["status-success"],
1046
+ "--color-status-success-subtle": semanticColorsDark["status-success-subtle"],
1047
+ "--color-status-error": semanticColorsDark["status-error"],
1048
+ "--color-status-error-subtle": semanticColorsDark["status-error-subtle"],
1049
+ "--color-status-warning": semanticColorsDark["status-warning"],
1050
+ "--color-status-warning-subtle": semanticColorsDark["status-warning-subtle"],
1051
+ "--color-status-info": semanticColorsDark["status-info"],
1052
+ "--color-status-info-subtle": semanticColorsDark["status-info-subtle"],
1053
+ "--color-status-error-vivid": semanticColorsDark["status-error-vivid"],
1054
+ "--color-status-error-vivid-light": semanticColorsDark["status-error-vivid-light"],
1055
+ "--color-status-error-vivid-dark": semanticColorsDark["status-error-vivid-dark"],
1056
+ "--color-status-error-vivid-subtle": semanticColorsDark["status-error-vivid-subtle"],
1057
+ "--color-text-primary": semanticColorsDark["text-primary"],
1058
+ "--color-text-secondary": semanticColorsDark["text-secondary"],
1059
+ "--color-text-tertiary": semanticColorsDark["text-tertiary"],
1060
+ "--color-text-disabled": semanticColorsDark["text-disabled"],
1061
+ "--color-text-inverse": semanticColorsDark["text-inverse"],
1062
+ "--color-text-link": semanticColorsDark["text-link"],
1063
+ "--color-surface-base": semanticColorsDark["surface-base"],
1064
+ "--color-surface-elevated": semanticColorsDark["surface-elevated"],
1065
+ "--color-surface-raised": semanticColorsDark["surface-raised"],
1066
+ "--color-background-base": semanticColorsDark["background-base"],
1067
+ "--color-background-default": semanticColorsDark["background-default"],
1068
+ "--color-background-subtle": semanticColorsDark["background-subtle"],
1069
+ "--color-border-default": semanticColorsDark["border-default"],
1070
+ "--color-border-subtle": semanticColorsDark["border-subtle"],
1071
+ "--color-border-strong": semanticColorsDark["border-strong"],
1072
+ "--color-border-prominent": semanticColorsDark["border-prominent"],
1073
+ "--color-border-focus": semanticColorsDark["border-focus"],
1074
+ "--color-interactive-hover": semanticColorsDark["interactive-hover"],
1075
+ "--color-interactive-focus": semanticColorsDark["interactive-focus"],
1076
+ "--color-interactive-active": semanticColorsDark["interactive-active"],
1077
+ "--color-interactive-selected": semanticColorsDark["interactive-selected"],
1078
+ "--color-interactive-disabled": semanticColorsDark["interactive-disabled"],
1079
+ "--color-divider": semanticColorsDark["divider"],
1080
+ "--color-brand-primary-hover": semanticColorsDark["brand-primary-hover"],
1081
+ "--color-brand-primary-active": semanticColorsDark["brand-primary-active"],
1082
+ "--color-brand-secondary-hover": semanticColorsDark["brand-secondary-hover"],
1083
+ "--color-brand-secondary-active": semanticColorsDark["brand-secondary-active"],
1084
+ "--color-status-success-light": semanticColorsDark["status-success-light"],
1085
+ "--color-status-success-dark": semanticColorsDark["status-success-dark"],
1086
+ "--color-status-error-light": semanticColorsDark["status-error-light"],
1087
+ "--color-status-error-dark": semanticColorsDark["status-error-dark"],
1088
+ "--color-status-warning-light": semanticColorsDark["status-warning-light"],
1089
+ "--color-status-warning-dark": semanticColorsDark["status-warning-dark"],
1090
+ "--color-status-info-light": semanticColorsDark["status-info-light"],
1091
+ "--color-status-info-dark": semanticColorsDark["status-info-dark"],
1092
+ "--color-on-status-success": semanticColorsDark["on-status-success"],
1093
+ "--color-on-status-error": semanticColorsDark["on-status-error"],
1094
+ "--color-on-status-warning": semanticColorsDark["on-status-warning"],
1095
+ "--color-on-status-info": semanticColorsDark["on-status-info"],
1096
+ "--color-result-improve": semanticColorsDark["result-improve"],
1097
+ "--color-result-improve-light": semanticColorsDark["result-improve-light"],
1098
+ "--color-result-improve-dark": semanticColorsDark["result-improve-dark"],
1099
+ "--color-result-degrade": semanticColorsDark["result-degrade"],
1100
+ "--color-result-degrade-light": semanticColorsDark["result-degrade-light"],
1101
+ "--color-result-degrade-dark": semanticColorsDark["result-degrade-dark"],
1102
+ "--color-result-inconclusive": semanticColorsDark["result-inconclusive"],
1103
+ "--color-result-inconclusive-light": semanticColorsDark["result-inconclusive-light"],
1104
+ "--color-result-neutral": semanticColorsDark["result-neutral"],
1105
+ "--color-on-result-improve": semanticColorsDark["on-result-improve"],
1106
+ "--color-on-result-degrade": semanticColorsDark["on-result-degrade"],
1107
+ "--color-on-result-inconclusive": semanticColorsDark["on-result-inconclusive"],
1108
+ "--color-data-1": semanticColorsDark["data-1"],
1109
+ "--color-data-2": semanticColorsDark["data-2"],
1110
+ "--color-data-3": semanticColorsDark["data-3"],
1111
+ "--color-data-4": semanticColorsDark["data-4"],
1112
+ "--color-data-5": semanticColorsDark["data-5"],
1113
+ "--color-data-6": semanticColorsDark["data-6"],
1114
+ "--color-data-7": semanticColorsDark["data-7"],
1115
+ "--color-data-8": semanticColorsDark["data-8"],
1116
+ "--color-data-9": semanticColorsDark["data-9"],
1117
+ "--color-data-10": semanticColorsDark["data-10"],
1118
+ "--color-text-link-hover": semanticColorsDark["text-link-hover"],
1119
+ "--color-surface-overlay": semanticColorsDark["surface-overlay"],
1120
+ "--color-surface-input": semanticColorsDark["surface-input"],
1121
+ "--color-border-input": semanticColorsDark["border-input"],
1122
+ "--color-border-input-hover": semanticColorsDark["border-input-hover"],
1123
+ "--color-border-input-focus": semanticColorsDark["border-input-focus"],
1124
+ "--color-border-input-error": semanticColorsDark["border-input-error"],
1125
+ "--color-interactive-disabled-text": semanticColorsDark["interactive-disabled-text"],
1126
+ "--color-avatar-background": semanticColorsDark["avatar-background"],
1127
+ "--color-avatar-text": semanticColorsDark["avatar-text"],
1128
+ ...themeIndependentCSSVars
1129
+ };
1130
+ function getThemeCSSVars(mode) {
1131
+ return mode === "dark" ? darkThemeCSSVars : lightThemeCSSVars;
1132
+ }
1133
+ var gluestackConfig = {
1134
+ tokens: {
1135
+ colors: {
1136
+ // Map to our semantic colors via CSS vars
1137
+ primary500: "var(--color-brand-primary)",
1138
+ primary600: "var(--color-brand-primary-dark)",
1139
+ primary400: "var(--color-brand-primary-light)",
1140
+ secondary500: "var(--color-brand-secondary)",
1141
+ secondary600: "var(--color-brand-secondary-dark)",
1142
+ secondary400: "var(--color-brand-secondary-light)",
1143
+ success500: "var(--color-status-success)",
1144
+ error500: "var(--color-status-error)",
1145
+ warning500: "var(--color-status-warning)",
1146
+ info500: "var(--color-status-info)",
1147
+ textLight: "var(--color-text-primary)",
1148
+ textDark: "var(--color-text-inverse)",
1149
+ backgroundLight: "var(--color-background-default)",
1150
+ backgroundDark: "var(--color-surface-base)"
1151
+ },
1152
+ space: {
1153
+ "0": 0,
1154
+ "1": 4,
1155
+ "2": 8,
1156
+ "3": 12,
1157
+ "4": 16,
1158
+ "5": 20,
1159
+ "6": 24,
1160
+ "8": 32,
1161
+ "10": 40,
1162
+ "12": 48,
1163
+ "16": 64,
1164
+ "20": 80,
1165
+ "24": 96
1166
+ },
1167
+ radii: {
1168
+ none: 0,
1169
+ sm: 4,
1170
+ md: 8,
1171
+ lg: 12,
1172
+ xl: 16,
1173
+ "2xl": 24,
1174
+ full: 9999
1175
+ },
1176
+ fontSizes: {
1177
+ xs: 12,
1178
+ sm: 14,
1179
+ md: 16,
1180
+ lg: 18,
1181
+ xl: 20,
1182
+ "2xl": 24,
1183
+ "3xl": 30,
1184
+ "4xl": 36,
1185
+ "5xl": 48
1186
+ }
1187
+ },
1188
+ aliases: {
1189
+ bg: "backgroundColor",
1190
+ p: "padding",
1191
+ px: "paddingHorizontal",
1192
+ py: "paddingVertical",
1193
+ m: "margin",
1194
+ mx: "marginHorizontal",
1195
+ my: "marginVertical",
1196
+ h: "height",
1197
+ w: "width",
1198
+ rounded: "borderRadius"
1199
+ }
1200
+ };
1201
+ function hexToRgb(hex) {
1202
+ const cleaned = hex.replace("#", "");
1203
+ let r, g, b;
1204
+ if (cleaned.length === 3) {
1205
+ r = parseInt(cleaned[0] + cleaned[0], 16);
1206
+ g = parseInt(cleaned[1] + cleaned[1], 16);
1207
+ b = parseInt(cleaned[2] + cleaned[2], 16);
1208
+ } else if (cleaned.length === 6) {
1209
+ r = parseInt(cleaned.slice(0, 2), 16);
1210
+ g = parseInt(cleaned.slice(2, 4), 16);
1211
+ b = parseInt(cleaned.slice(4, 6), 16);
1212
+ } else {
1213
+ return null;
1214
+ }
1215
+ return { r, g, b };
1216
+ }
1217
+ function rgbToHsv(r, g, b) {
1218
+ const rNorm = r / 255;
1219
+ const gNorm = g / 255;
1220
+ const bNorm = b / 255;
1221
+ const max = Math.max(rNorm, gNorm, bNorm);
1222
+ const min = Math.min(rNorm, gNorm, bNorm);
1223
+ const delta = max - min;
1224
+ const v = max;
1225
+ const s = max === 0 ? 0 : delta / max;
1226
+ let h = 0;
1227
+ if (delta !== 0) {
1228
+ if (max === rNorm) {
1229
+ h = 60 * ((gNorm - bNorm) / delta % 6);
1230
+ } else if (max === gNorm) {
1231
+ h = 60 * ((bNorm - rNorm) / delta + 2);
1232
+ } else {
1233
+ h = 60 * ((rNorm - gNorm) / delta + 4);
1234
+ }
1235
+ }
1236
+ if (h < 0) h += 360;
1237
+ return { h, s, v };
1238
+ }
1239
+ function hsvToRgb(h, s, v) {
1240
+ const c = v * s;
1241
+ const x = c * (1 - Math.abs(h / 60 % 2 - 1));
1242
+ const m = v - c;
1243
+ let rPrime, gPrime, bPrime;
1244
+ if (h >= 0 && h < 60) {
1245
+ rPrime = c;
1246
+ gPrime = x;
1247
+ bPrime = 0;
1248
+ } else if (h >= 60 && h < 120) {
1249
+ rPrime = x;
1250
+ gPrime = c;
1251
+ bPrime = 0;
1252
+ } else if (h >= 120 && h < 180) {
1253
+ rPrime = 0;
1254
+ gPrime = c;
1255
+ bPrime = x;
1256
+ } else if (h >= 180 && h < 240) {
1257
+ rPrime = 0;
1258
+ gPrime = x;
1259
+ bPrime = c;
1260
+ } else if (h >= 240 && h < 300) {
1261
+ rPrime = x;
1262
+ gPrime = 0;
1263
+ bPrime = c;
1264
+ } else {
1265
+ rPrime = c;
1266
+ gPrime = 0;
1267
+ bPrime = x;
1268
+ }
1269
+ return {
1270
+ r: Math.round((rPrime + m) * 255),
1271
+ g: Math.round((gPrime + m) * 255),
1272
+ b: Math.round((bPrime + m) * 255)
1273
+ };
1274
+ }
1275
+ function rgbToHex(r, g, b) {
1276
+ const toHex = (n) => {
1277
+ const clamped = Math.max(0, Math.min(255, Math.round(n)));
1278
+ return clamped.toString(16).padStart(2, "0");
1279
+ };
1280
+ return `#${toHex(r)}${toHex(g)}${toHex(b)}`;
1281
+ }
1282
+ function lighten(hex, amount = 0.1) {
1283
+ const rgb = hexToRgb(hex);
1284
+ if (!rgb) return hex;
1285
+ const hsv = rgbToHsv(rgb.r, rgb.g, rgb.b);
1286
+ const newV = Math.min(1, hsv.v + amount);
1287
+ const newRgb = hsvToRgb(hsv.h, hsv.s, newV);
1288
+ return rgbToHex(newRgb.r, newRgb.g, newRgb.b);
1289
+ }
1290
+ function darken(hex, amount = 0.1) {
1291
+ const rgb = hexToRgb(hex);
1292
+ if (!rgb) return hex;
1293
+ const hsv = rgbToHsv(rgb.r, rgb.g, rgb.b);
1294
+ const newV = Math.max(0, hsv.v - amount);
1295
+ const newRgb = hsvToRgb(hsv.h, hsv.s, newV);
1296
+ return rgbToHex(newRgb.r, newRgb.g, newRgb.b);
1297
+ }
1298
+ function getHoverColors(bgColor, intensity = "medium") {
1299
+ const amounts = {
1300
+ subtle: 0.01,
1301
+ medium: 0.02,
1302
+ strong: 0.03
1303
+ };
1304
+ const amount = amounts[intensity];
1305
+ return {
1306
+ raised: lighten(bgColor, amount),
1307
+ // Raised hover: lighten (lifting up)
1308
+ pressed: darken(bgColor, amount)
1309
+ // Pressed hover: darken (pressing down)
1310
+ };
1311
+ }
1312
+ function isDark(hex) {
1313
+ const rgb = hexToRgb(hex);
1314
+ if (!rgb) return true;
1315
+ const hsv = rgbToHsv(rgb.r, rgb.g, rgb.b);
1316
+ return hsv.v < 0.6;
1317
+ }
1318
+ var shadowColors = {
1319
+ // For charcoal surfaces (~#2C2C2C to #3C3C3C)
1320
+ charcoal: {
1321
+ dark: "rgba(0, 0, 0, 0.5)",
1322
+ light: "rgba(255, 255, 255, 0.12)",
1323
+ // brighter for crisp rim light
1324
+ darker: "rgba(0, 0, 0, 0.6)"
1325
+ },
1326
+ // For neutral dark surfaces (~#1F2937)
1327
+ neutralDark: {
1328
+ dark: "rgba(0, 0, 0, 0.4)",
1329
+ light: "rgba(255, 255, 255, 0.08)",
1330
+ darker: "rgba(0, 0, 0, 0.5)"
1331
+ },
1332
+ // For light surfaces (white/light gray backgrounds)
1333
+ neutralLight: {
1334
+ dark: "rgba(0, 0, 0, 0.15)",
1335
+ // Visible dark shadow for depth on light backgrounds
1336
+ light: "rgba(255, 255, 255, 1)",
1337
+ // Bright highlight for raised effect (visible on light gray)
1338
+ darker: "rgba(0, 0, 0, 0.2)"
1339
+ // Deeper shadow for pressed states
1340
+ }
1341
+ };
1342
+ var intensityConfig = {
1343
+ subtle: { offset: 1, blur: 2 },
1344
+ // very light, barely visible
1345
+ medium: { offset: 2, blur: 4 },
1346
+ // noticeable but restrained
1347
+ strong: { offset: 2, blur: 5 }
1348
+ // slightly deeper blur, same offset as medium
1349
+ };
1350
+ function createRaisedShadow(surface = "charcoal", intensity = "medium") {
1351
+ const colors = shadowColors[surface];
1352
+ const { offset, blur } = intensityConfig[intensity];
1353
+ const rimBlur = 1;
1354
+ return Platform.select({
1355
+ web: {
1356
+ boxShadow: `${offset}px ${offset}px ${blur}px ${colors.dark}, -${offset}px -${offset}px ${rimBlur}px ${colors.light}`
1357
+ },
1358
+ default: {
1359
+ // React Native shadow approximation (limited compared to web)
1360
+ shadowColor: "#000",
1361
+ shadowOffset: { width: offset, height: offset },
1362
+ shadowOpacity: 0.3,
1363
+ shadowRadius: blur / 2,
1364
+ elevation: offset
1365
+ }
1366
+ });
1367
+ }
1368
+ function createPressedShadow(surface = "charcoal", intensity = "medium") {
1369
+ const colors = shadowColors[surface];
1370
+ const { offset, blur } = intensityConfig[intensity];
1371
+ const rimOffset = 1;
1372
+ const rimBlur = 1;
1373
+ return Platform.select({
1374
+ web: {
1375
+ boxShadow: `inset ${offset}px ${offset}px ${blur}px ${colors.darker}, inset -${rimOffset}px -${rimOffset}px ${rimBlur}px ${colors.light}`
1376
+ },
1377
+ default: {
1378
+ // React Native doesn't support inset shadows, approximate with darker bg
1379
+ shadowOpacity: 0,
1380
+ elevation: 0
1381
+ }
1382
+ });
1383
+ }
1384
+ function createFlatShadow() {
1385
+ return Platform.select({
1386
+ web: {
1387
+ boxShadow: "none"
1388
+ },
1389
+ default: {
1390
+ shadowOpacity: 0,
1391
+ elevation: 0
1392
+ }
1393
+ });
1394
+ }
1395
+ function createRaisedHoverShadow(surface = "charcoal", intensity = "medium") {
1396
+ const colors = shadowColors[surface];
1397
+ const { offset, blur } = intensityConfig[intensity];
1398
+ const hoverOffset = Math.max(1, Math.round(offset / 2));
1399
+ const hoverBlur = Math.max(1, Math.round(blur / 2));
1400
+ const rimBlur = 1;
1401
+ return Platform.select({
1402
+ web: {
1403
+ // Keep same offsets as normal state for rim to prevent "shrinking" effect
1404
+ boxShadow: `${hoverOffset}px ${hoverOffset}px ${hoverBlur}px ${colors.dark}, -${offset}px -${offset}px ${rimBlur}px ${colors.light}`
1405
+ },
1406
+ default: {
1407
+ shadowColor: "#000",
1408
+ shadowOffset: { width: hoverOffset, height: hoverOffset },
1409
+ shadowOpacity: 0.2,
1410
+ shadowRadius: hoverBlur / 2,
1411
+ elevation: hoverOffset
1412
+ }
1413
+ });
1414
+ }
1415
+ function createPressedHoverShadow(surface = "charcoal", intensity = "medium") {
1416
+ const colors = shadowColors[surface];
1417
+ const { offset, blur } = intensityConfig[intensity];
1418
+ const hoverOffset = Math.max(1, Math.round(offset / 2));
1419
+ const hoverBlur = Math.max(1, Math.round(blur / 2));
1420
+ const rimBlur = 1;
1421
+ return Platform.select({
1422
+ web: {
1423
+ // Keep rim offset at 1px (same as pressed normal) to prevent "shrinking" effect
1424
+ boxShadow: `inset ${hoverOffset}px ${hoverOffset}px ${hoverBlur}px ${colors.darker}, inset -1px -1px ${rimBlur}px ${colors.light}`
1425
+ },
1426
+ default: {
1427
+ shadowOpacity: 0,
1428
+ elevation: 0
1429
+ }
1430
+ });
1431
+ }
1432
+ var neumorphicShadows = {
1433
+ // Charcoal surface shadows (for dark toolbars, cards)
1434
+ charcoal: {
1435
+ raised: {
1436
+ subtle: createRaisedShadow("charcoal", "subtle"),
1437
+ medium: createRaisedShadow("charcoal", "medium"),
1438
+ strong: createRaisedShadow("charcoal", "strong")
1439
+ },
1440
+ raisedHover: {
1441
+ subtle: createRaisedHoverShadow("charcoal", "subtle"),
1442
+ medium: createRaisedHoverShadow("charcoal", "medium"),
1443
+ strong: createRaisedHoverShadow("charcoal", "strong")
1444
+ },
1445
+ pressed: {
1446
+ subtle: createPressedShadow("charcoal", "subtle"),
1447
+ medium: createPressedShadow("charcoal", "medium"),
1448
+ strong: createPressedShadow("charcoal", "strong")
1449
+ },
1450
+ pressedHover: {
1451
+ subtle: createPressedHoverShadow("charcoal", "subtle"),
1452
+ medium: createPressedHoverShadow("charcoal", "medium"),
1453
+ strong: createPressedHoverShadow("charcoal", "strong")
1454
+ },
1455
+ flat: createFlatShadow()
1456
+ },
1457
+ // Neutral dark surface shadows
1458
+ neutralDark: {
1459
+ raised: {
1460
+ subtle: createRaisedShadow("neutralDark", "subtle"),
1461
+ medium: createRaisedShadow("neutralDark", "medium"),
1462
+ strong: createRaisedShadow("neutralDark", "strong")
1463
+ },
1464
+ raisedHover: {
1465
+ subtle: createRaisedHoverShadow("neutralDark", "subtle"),
1466
+ medium: createRaisedHoverShadow("neutralDark", "medium"),
1467
+ strong: createRaisedHoverShadow("neutralDark", "strong")
1468
+ },
1469
+ pressed: {
1470
+ subtle: createPressedShadow("neutralDark", "subtle"),
1471
+ medium: createPressedShadow("neutralDark", "medium"),
1472
+ strong: createPressedShadow("neutralDark", "strong")
1473
+ },
1474
+ pressedHover: {
1475
+ subtle: createPressedHoverShadow("neutralDark", "subtle"),
1476
+ medium: createPressedHoverShadow("neutralDark", "medium"),
1477
+ strong: createPressedHoverShadow("neutralDark", "strong")
1478
+ },
1479
+ flat: createFlatShadow()
1480
+ },
1481
+ // Neutral light surface shadows
1482
+ neutralLight: {
1483
+ raised: {
1484
+ subtle: createRaisedShadow("neutralLight", "subtle"),
1485
+ medium: createRaisedShadow("neutralLight", "medium"),
1486
+ strong: createRaisedShadow("neutralLight", "strong")
1487
+ },
1488
+ raisedHover: {
1489
+ subtle: createRaisedHoverShadow("neutralLight", "subtle"),
1490
+ medium: createRaisedHoverShadow("neutralLight", "medium"),
1491
+ strong: createRaisedHoverShadow("neutralLight", "strong")
1492
+ },
1493
+ pressed: {
1494
+ subtle: createPressedShadow("neutralLight", "subtle"),
1495
+ medium: createPressedShadow("neutralLight", "medium"),
1496
+ strong: createPressedShadow("neutralLight", "strong")
1497
+ },
1498
+ pressedHover: {
1499
+ subtle: createPressedHoverShadow("neutralLight", "subtle"),
1500
+ medium: createPressedHoverShadow("neutralLight", "medium"),
1501
+ strong: createPressedHoverShadow("neutralLight", "strong")
1502
+ },
1503
+ flat: createFlatShadow()
1504
+ }
1505
+ };
1506
+ var elevationSystem = {
1507
+ // Deep inset (recessed input fields, deeply pressed buttons)
1508
+ [-2]: {
1509
+ name: "deep-inset",
1510
+ colorAdjustment: 0,
1511
+ shadowIntensity: "strong",
1512
+ shadowStyle: "pressed",
1513
+ description: "Deeply recessed elements (e.g., input fields, deeply pressed buttons)"
1514
+ },
1515
+ // Shallow inset (pressed buttons, sunken panels)
1516
+ [-1]: {
1517
+ name: "inset",
1518
+ colorAdjustment: 0,
1519
+ shadowIntensity: "medium",
1520
+ shadowStyle: "pressed",
1521
+ description: "Shallow inset elements (e.g., pressed buttons, sunken panels within cards)"
1522
+ },
1523
+ // Base level (page background, default surface)
1524
+ [0]: {
1525
+ name: "base",
1526
+ colorAdjustment: 0,
1527
+ shadowIntensity: "subtle",
1528
+ shadowStyle: "raised",
1529
+ description: "Base surface level (page background, default containers)"
1530
+ },
1531
+ // Level 1: Subtle elevation (outline cards, subtle containers)
1532
+ [1]: {
1533
+ name: "subtle",
1534
+ colorAdjustment: 0.01,
1535
+ shadowIntensity: "subtle",
1536
+ shadowStyle: "raised",
1537
+ description: "Subtle elevation (outline cards, subtle containers)"
1538
+ },
1539
+ // Level 2: Standard elevation (default cards, buttons)
1540
+ [2]: {
1541
+ name: "standard",
1542
+ colorAdjustment: 0.02,
1543
+ shadowIntensity: "medium",
1544
+ shadowStyle: "raised",
1545
+ description: "Standard elevation (default cards, raised buttons)"
1546
+ },
1547
+ // Level 3: Prominent elevation (important cards, modals)
1548
+ [3]: {
1549
+ name: "prominent",
1550
+ colorAdjustment: 0.04,
1551
+ shadowIntensity: "strong",
1552
+ shadowStyle: "raised",
1553
+ description: "Prominent elevation (important cards, modals, dropdowns)"
1554
+ },
1555
+ // Level 4: High elevation (overlays, popovers)
1556
+ [4]: {
1557
+ name: "high",
1558
+ colorAdjustment: 0.06,
1559
+ shadowIntensity: "strong",
1560
+ shadowStyle: "raised",
1561
+ description: "High elevation (overlays, popovers, tooltips)"
1562
+ },
1563
+ // Level 5: Floating (toasts, floating action buttons)
1564
+ [5]: {
1565
+ name: "floating",
1566
+ colorAdjustment: 0.08,
1567
+ shadowIntensity: "strong",
1568
+ shadowStyle: "raised",
1569
+ description: "Floating elevation (toasts, floating action buttons, highest z-index)"
1570
+ }
1571
+ };
1572
+ function calculateRimLightColor(baseColor, level) {
1573
+ const rgb = hexToRgb(baseColor);
1574
+ if (!rgb) {
1575
+ return "rgba(255, 255, 255, 0.5)";
1576
+ }
1577
+ const hsv = rgbToHsv(rgb.r, rgb.g, rgb.b);
1578
+ const isLight = hsv.v > 0.6;
1579
+ const isSaturated = hsv.s > 0.3;
1580
+ const absLevel = Math.abs(level);
1581
+ const opacityBoost = Math.max(0, (absLevel - 1) * 0.05);
1582
+ if (isSaturated) {
1583
+ const rimLightValue = 0.95;
1584
+ const rimLightRgb = hsvToRgb(hsv.h, hsv.s * 0.3, rimLightValue);
1585
+ const baseOpacity = isLight ? 0.9 : 0.5;
1586
+ const finalOpacity = Math.min(1, baseOpacity + opacityBoost);
1587
+ return `rgba(${rimLightRgb.r}, ${rimLightRgb.g}, ${rimLightRgb.b}, ${finalOpacity.toFixed(2)})`;
1588
+ } else {
1589
+ const baseOpacity = isLight ? 0.9 : 0.12;
1590
+ const finalOpacity = Math.min(1, baseOpacity + opacityBoost);
1591
+ return `rgba(255, 255, 255, ${finalOpacity.toFixed(2)})`;
1592
+ }
1593
+ }
1594
+ function calculateDarkShadowColors(surfaceColor) {
1595
+ const rgb = hexToRgb(surfaceColor);
1596
+ if (!rgb) {
1597
+ return {
1598
+ dark: "rgba(0, 0, 0, 0.3)",
1599
+ darker: "rgba(0, 0, 0, 0.4)"
1600
+ };
1601
+ }
1602
+ const hsv = rgbToHsv(rgb.r, rgb.g, rgb.b);
1603
+ const isLight = hsv.v > 0.6;
1604
+ const isSaturated = hsv.s > 0.3;
1605
+ if (isSaturated) {
1606
+ const darkShadowValue = 0.15;
1607
+ const darkShadowRgb = hsvToRgb(hsv.h, hsv.s, darkShadowValue);
1608
+ if (isLight) {
1609
+ return {
1610
+ dark: `rgba(${darkShadowRgb.r}, ${darkShadowRgb.g}, ${darkShadowRgb.b}, 0.3)`,
1611
+ darker: `rgba(${darkShadowRgb.r}, ${darkShadowRgb.g}, ${darkShadowRgb.b}, 0.4)`
1612
+ };
1613
+ } else {
1614
+ return {
1615
+ dark: `rgba(${darkShadowRgb.r}, ${darkShadowRgb.g}, ${darkShadowRgb.b}, 0.5)`,
1616
+ darker: `rgba(${darkShadowRgb.r}, ${darkShadowRgb.g}, ${darkShadowRgb.b}, 0.6)`
1617
+ };
1618
+ }
1619
+ } else {
1620
+ if (isLight) {
1621
+ return {
1622
+ dark: "rgba(0, 0, 0, 0.2)",
1623
+ darker: "rgba(0, 0, 0, 0.3)"
1624
+ };
1625
+ } else {
1626
+ return {
1627
+ dark: "rgba(0, 0, 0, 0.5)",
1628
+ darker: "rgba(0, 0, 0, 0.6)"
1629
+ };
1630
+ }
1631
+ }
1632
+ }
1633
+ function getRimLightConfig() {
1634
+ return {
1635
+ offset: 1,
1636
+ // Fixed 1px for crisp rim
1637
+ blur: 1
1638
+ // Tight blur for crisp edge
1639
+ };
1640
+ }
1641
+ function getElevationConfig(level) {
1642
+ return elevationSystem[level];
1643
+ }
1644
+ var elevationSurfaceCache = /* @__PURE__ */ new Map();
1645
+ var MAX_CACHE_SIZE = 100;
1646
+ function getCacheKey(baseColor, level, theme) {
1647
+ return `${baseColor}-${level}-${theme}`;
1648
+ }
1649
+ function calculateElevationSurface(baseColor, level, theme) {
1650
+ const config = elevationSystem[level];
1651
+ if (config.colorAdjustment === 0) {
1652
+ return baseColor;
1653
+ }
1654
+ if (level < 0) {
1655
+ return baseColor;
1656
+ }
1657
+ return lighten(baseColor, config.colorAdjustment);
1658
+ }
1659
+ function getElevationSurface(baseColor, level, theme) {
1660
+ const cacheKey = getCacheKey(baseColor, level, theme);
1661
+ if (elevationSurfaceCache.has(cacheKey)) {
1662
+ return elevationSurfaceCache.get(cacheKey);
1663
+ }
1664
+ const result = calculateElevationSurface(baseColor, level);
1665
+ if (elevationSurfaceCache.size >= MAX_CACHE_SIZE) {
1666
+ const firstKey = elevationSurfaceCache.keys().next().value;
1667
+ elevationSurfaceCache.delete(firstKey);
1668
+ }
1669
+ elevationSurfaceCache.set(cacheKey, result);
1670
+ return result;
1671
+ }
1672
+ var elevationShadowCache = /* @__PURE__ */ new Map();
1673
+ var MAX_SHADOW_CACHE_SIZE = 50;
1674
+ function getShadowCacheKey(baseColor, level, theme, isHovered) {
1675
+ return `${baseColor}-${level}-${theme}-${isHovered}`;
1676
+ }
1677
+ function calculateElevationShadow(baseColor, level, theme, isHovered = false) {
1678
+ const config = elevationSystem[level];
1679
+ if (level === 0) {
1680
+ return {};
1681
+ }
1682
+ const elevatedSurfaceColor = calculateElevationSurface(baseColor, level);
1683
+ const rimLightColor = calculateRimLightColor(baseColor, level);
1684
+ const darkShadowColors = calculateDarkShadowColors(elevatedSurfaceColor);
1685
+ const intensityConfig2 = {
1686
+ subtle: { offset: 1, blur: 2 },
1687
+ medium: { offset: 2, blur: 4 },
1688
+ strong: { offset: 2, blur: 5 }
1689
+ };
1690
+ const { offset, blur } = intensityConfig2[config.shadowIntensity];
1691
+ const rimConfig = getRimLightConfig();
1692
+ if (config.shadowStyle === "pressed") {
1693
+ if (isHovered) {
1694
+ const hoverOffset = Math.max(1, Math.round(offset / 2));
1695
+ const hoverBlur = Math.max(1, Math.round(blur / 2));
1696
+ return Platform.select({
1697
+ web: {
1698
+ boxShadow: `inset ${hoverOffset}px ${hoverOffset}px ${hoverBlur}px ${darkShadowColors.darker}, inset -${rimConfig.offset}px -${rimConfig.offset}px ${rimConfig.blur}px ${rimLightColor}`
1699
+ },
1700
+ default: {
1701
+ shadowOpacity: 0,
1702
+ elevation: 0
1703
+ }
1704
+ });
1705
+ }
1706
+ return Platform.select({
1707
+ web: {
1708
+ boxShadow: `inset ${offset}px ${offset}px ${blur}px ${darkShadowColors.darker}, inset -${rimConfig.offset}px -${rimConfig.offset}px ${rimConfig.blur}px ${rimLightColor}`
1709
+ },
1710
+ default: {
1711
+ shadowOpacity: 0,
1712
+ elevation: 0
1713
+ }
1714
+ });
1715
+ } else {
1716
+ if (isHovered) {
1717
+ const hoverOffset = Math.max(1, Math.round(offset / 2));
1718
+ const hoverBlur = Math.max(1, Math.round(blur / 2));
1719
+ return Platform.select({
1720
+ web: {
1721
+ boxShadow: `${hoverOffset}px ${hoverOffset}px ${hoverBlur}px ${darkShadowColors.dark}, -${rimConfig.offset}px -${rimConfig.offset}px ${rimConfig.blur}px ${rimLightColor}`
1722
+ },
1723
+ default: {
1724
+ shadowColor: "#000",
1725
+ shadowOffset: { width: hoverOffset, height: hoverOffset },
1726
+ shadowOpacity: 0.2,
1727
+ shadowRadius: hoverBlur / 2,
1728
+ elevation: hoverOffset
1729
+ }
1730
+ });
1731
+ }
1732
+ return Platform.select({
1733
+ web: {
1734
+ boxShadow: `${offset}px ${offset}px ${blur}px ${darkShadowColors.dark}, -${rimConfig.offset}px -${rimConfig.offset}px ${rimConfig.blur}px ${rimLightColor}`
1735
+ },
1736
+ default: {
1737
+ shadowColor: "#000",
1738
+ shadowOffset: { width: offset, height: offset },
1739
+ shadowOpacity: 0.3,
1740
+ shadowRadius: blur / 2,
1741
+ elevation: offset
1742
+ }
1743
+ });
1744
+ }
1745
+ }
1746
+ function getElevationShadow(baseColor, level, theme, isHovered = false) {
1747
+ const cacheKey = getShadowCacheKey(baseColor, level, theme, isHovered);
1748
+ if (elevationShadowCache.has(cacheKey)) {
1749
+ return elevationShadowCache.get(cacheKey);
1750
+ }
1751
+ const result = calculateElevationShadow(baseColor, level, theme, isHovered);
1752
+ if (elevationShadowCache.size >= MAX_SHADOW_CACHE_SIZE) {
1753
+ const firstKey = elevationShadowCache.keys().next().value;
1754
+ elevationShadowCache.delete(firstKey);
1755
+ }
1756
+ elevationShadowCache.set(cacheKey, result);
1757
+ return result;
1758
+ }
1759
+ function getBaseSurfaceColor(theme) {
1760
+ return theme === "light" ? semanticColorsLight["surface-raised"] : semanticColorsDark["surface-elevated"];
1761
+ }
1762
+ var componentElevationRanges = {
1763
+ button: {
1764
+ allowed: [2],
1765
+ default: 2,
1766
+ hover: 3
1767
+ },
1768
+ card: {
1769
+ allowed: [1, 2, 3],
1770
+ default: 2,
1771
+ hover: 3
1772
+ },
1773
+ input: {
1774
+ allowed: [-2, -1, 0],
1775
+ default: -1
1776
+ },
1777
+ overlay: {
1778
+ allowed: [4, 5],
1779
+ default: 4
1780
+ }
1781
+ };
1782
+ function getValidatedElevation(component, requested) {
1783
+ const range = componentElevationRanges[component];
1784
+ if (range.allowed.includes(requested)) {
1785
+ return requested;
1786
+ }
1787
+ const sorted = [...range.allowed].sort((a, b) => a - b);
1788
+ if (requested < sorted[0]) return sorted[0];
1789
+ if (requested > sorted[sorted.length - 1]) return sorted[sorted.length - 1];
1790
+ return sorted.reduce(
1791
+ (prev, curr) => Math.abs(curr - requested) < Math.abs(prev - requested) ? curr : prev
1792
+ );
1793
+ }
1794
+ var glowConfig = {
1795
+ subtle: { blur: 12, spread: 0, opacity: 0.25 },
1796
+ medium: { blur: 20, spread: 2, opacity: 0.4 },
1797
+ strong: { blur: 30, spread: 4, opacity: 0.55 }
1798
+ };
1799
+ function getGlowShadow(color, intensity = "medium") {
1800
+ const config = glowConfig[intensity];
1801
+ const rgb = hexToRgb(color);
1802
+ if (!rgb) return {};
1803
+ return Platform.select({
1804
+ web: {
1805
+ boxShadow: `0 0 ${config.blur}px ${config.spread}px rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, ${config.opacity})`
1806
+ },
1807
+ default: {
1808
+ shadowColor: color,
1809
+ shadowOffset: { width: 0, height: 0 },
1810
+ shadowOpacity: config.opacity,
1811
+ shadowRadius: config.blur / 2,
1812
+ elevation: 0
1813
+ }
1814
+ });
1815
+ }
1816
+
1817
+ // src/theme/manifest/css-property-manifest.validate.ts
1818
+ var isPlainObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
1819
+ var isVariantAxes = (value) => isPlainObject(value) && Object.keys(value).length > 0 && Object.values(value).every((axisValue) => typeof axisValue === "string");
1820
+ function collectVariantOverrideErrors(override, path) {
1821
+ if (!isPlainObject(override)) return [`${path} must be an object`];
1822
+ const errors = [];
1823
+ if (!isVariantAxes(override.variant))
1824
+ errors.push(`${path}.variant must be a non-empty string-keyed object`);
1825
+ if (override.token !== void 0 && override.token !== null && typeof override.token !== "string") {
1826
+ errors.push(`${path}.token must be a string or null`);
1827
+ }
1828
+ if (typeof override.resolvedValue !== "string" || override.resolvedValue.length === 0) {
1829
+ errors.push(`${path}.resolvedValue must be a non-empty string`);
1830
+ }
1831
+ return errors;
1832
+ }
1833
+ function collectPropertyErrors(entry, path) {
1834
+ if (!isPlainObject(entry)) return [`${path} must be an object`];
1835
+ const errors = [];
1836
+ if (typeof entry.property !== "string" || entry.property.length === 0) {
1837
+ errors.push(`${path}.property must be a non-empty string`);
1838
+ }
1839
+ if (entry.token !== null && typeof entry.token !== "string") {
1840
+ errors.push(`${path}.token must be a string or null`);
1841
+ }
1842
+ if (typeof entry.resolvedValue !== "string" || entry.resolvedValue.length === 0) {
1843
+ errors.push(`${path}.resolvedValue must be a non-empty string`);
1844
+ }
1845
+ if (entry.variantOverrides !== void 0) {
1846
+ if (!Array.isArray(entry.variantOverrides)) {
1847
+ errors.push(`${path}.variantOverrides must be an array`);
1848
+ } else {
1849
+ entry.variantOverrides.forEach(
1850
+ (override, i) => errors.push(...collectVariantOverrideErrors(override, `${path}.variantOverrides[${i}]`))
1851
+ );
1852
+ }
1853
+ }
1854
+ return errors;
1855
+ }
1856
+ function validateCssPropertyManifest(candidate) {
1857
+ if (!isPlainObject(candidate)) return { valid: false, errors: ["manifest must be an object"] };
1858
+ const errors = [];
1859
+ if (typeof candidate.component !== "string" || candidate.component.length === 0) {
1860
+ errors.push("component must be a non-empty string");
1861
+ }
1862
+ if (candidate.baseVariant !== void 0 && !isVariantAxes(candidate.baseVariant)) {
1863
+ errors.push("baseVariant must be a non-empty string-keyed object");
1864
+ }
1865
+ if (!Array.isArray(candidate.properties) || candidate.properties.length === 0) {
1866
+ errors.push("properties must be a non-empty array");
1867
+ } else {
1868
+ candidate.properties.forEach(
1869
+ (entry, i) => errors.push(...collectPropertyErrors(entry, `properties[${i}]`))
1870
+ );
1871
+ }
1872
+ return { valid: errors.length === 0, errors };
1873
+ }
1874
+ function isCssPropertyManifest(candidate) {
1875
+ return validateCssPropertyManifest(candidate).valid;
1876
+ }
1877
+ function resolveColor(token, mode = "dark") {
1878
+ return Platform.OS === "web" ? `var(--color-${token})` : getSemanticColors(mode)[token];
1879
+ }
1880
+
1881
+ // src/theme/gradients.ts
1882
+ function linearGradient(from, to, angle = 180, mode = "dark") {
1883
+ return {
1884
+ backgroundImage: `linear-gradient(${angle}deg, ${resolveColor(from, mode)}, ${resolveColor(to, mode)})`
1885
+ };
1886
+ }
1887
+ var surfaceGradient = {
1888
+ /** Chrome bands (top bar, headers): elevated → base, a subtle dark wash. */
1889
+ chrome: (mode = "dark") => linearGradient("surface-elevated", "background-base", 180, mode)
1890
+ };
1891
+
1892
+ // src/theme/presets/apply.ts
1893
+ function colorKeyToVar(key) {
1894
+ return `--color-${key}`;
1895
+ }
1896
+ function applyColorOverrides(colors, root) {
1897
+ for (const [key, value] of Object.entries(colors)) {
1898
+ if (value !== void 0) {
1899
+ root.style.setProperty(colorKeyToVar(key), value);
1900
+ }
1901
+ }
1902
+ }
1903
+ function applyFontOverrides(fonts, root) {
1904
+ const fontVarMap = {
1905
+ sans: "--font-family-sans",
1906
+ body: "--font-family-body",
1907
+ heading: "--font-family-heading",
1908
+ mono: "--font-family-mono"
1909
+ };
1910
+ for (const [key, value] of Object.entries(fonts)) {
1911
+ if (value !== void 0 && fontVarMap[key]) {
1912
+ root.style.setProperty(fontVarMap[key], value);
1913
+ }
1914
+ }
1915
+ }
1916
+ function injectFontImport(url) {
1917
+ if (typeof document === "undefined") return;
1918
+ const existing = document.querySelector(`link[href="${url}"]`);
1919
+ if (existing) return;
1920
+ const link = document.createElement("link");
1921
+ link.rel = "stylesheet";
1922
+ link.href = url;
1923
+ document.head.appendChild(link);
1924
+ }
1925
+ function applyThemePreset(preset) {
1926
+ if (typeof document === "undefined") {
1927
+ return () => {
1928
+ };
1929
+ }
1930
+ const root = document.documentElement;
1931
+ const removals = [];
1932
+ if (preset.fontImport) {
1933
+ injectFontImport(preset.fontImport);
1934
+ }
1935
+ const isLight = root.classList.contains("light");
1936
+ const modeColors = isLight ? preset.colors?.light : preset.colors?.dark;
1937
+ if (modeColors) {
1938
+ const previousValues = {};
1939
+ for (const key of Object.keys(modeColors)) {
1940
+ previousValues[colorKeyToVar(key)] = root.style.getPropertyValue(colorKeyToVar(key)) || null;
1941
+ }
1942
+ applyColorOverrides(modeColors, root);
1943
+ removals.push(() => {
1944
+ for (const [varName, prev] of Object.entries(previousValues)) {
1945
+ if (prev === null) {
1946
+ root.style.removeProperty(varName);
1947
+ } else {
1948
+ root.style.setProperty(varName, prev);
1949
+ }
1950
+ }
1951
+ });
1952
+ }
1953
+ if (preset.fonts) {
1954
+ applyFontOverrides(preset.fonts, root);
1955
+ }
1956
+ if (preset.rootClasses) {
1957
+ for (const cls of preset.rootClasses) {
1958
+ root.classList.add(cls);
1959
+ }
1960
+ removals.push(() => {
1961
+ for (const cls of preset.rootClasses) {
1962
+ root.classList.remove(cls);
1963
+ }
1964
+ });
1965
+ }
1966
+ return () => {
1967
+ for (const remove of removals) {
1968
+ remove();
1969
+ }
1970
+ };
1971
+ }
1972
+
1973
+ // src/theme/presets/default.ts
1974
+ var defaultPreset = {
1975
+ name: "default",
1976
+ description: "Titan Design System default theme \u2014 orange accent, steel secondary"
1977
+ };
1978
+
1979
+ // src/theme/presets/audiobook.ts
1980
+ var audiobookPreset = {
1981
+ name: "audiobook",
1982
+ description: "Warm copper/patina theme with editorial typography",
1983
+ fontImport: "https://fonts.googleapis.com/css2?family=Newsreader:ital,wght@0,400;0,600;0,700;1,400&family=Outfit:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap",
1984
+ fonts: {
1985
+ sans: "'Outfit', 'Avenir', 'Avenir Next', system-ui, sans-serif",
1986
+ body: "'Outfit', 'Avenir', 'Avenir Next', system-ui, sans-serif",
1987
+ heading: "'Newsreader', 'Libre Baskerville', Georgia, serif",
1988
+ mono: "'JetBrains Mono', 'SF Mono', 'Fira Code', monospace"
1989
+ },
1990
+ colors: {
1991
+ dark: {
1992
+ // Brand: Copper accent
1993
+ "brand-primary": "#d4782a",
1994
+ "brand-primary-light": "#e8944a",
1995
+ "brand-primary-dark": "#9a4a15",
1996
+ "brand-primary-subtle": "rgba(212, 120, 42, 0.12)",
1997
+ "brand-primary-hover": "#e8944a",
1998
+ "brand-primary-active": "#f5b070",
1999
+ // Brand secondary: Patina/verdigris
2000
+ "brand-secondary": "#3a9b8a",
2001
+ "brand-secondary-light": "#55baa7",
2002
+ "brand-secondary-dark": "#1f5c52",
2003
+ "brand-secondary-subtle": "rgba(58, 155, 138, 0.12)",
2004
+ "brand-secondary-hover": "#55baa7",
2005
+ "brand-secondary-active": "#7ed4c4",
2006
+ "on-brand-primary": "#FFFFFF",
2007
+ "on-brand-secondary": "#FFFFFF",
2008
+ // Status colors (audiobook's warmer status palette)
2009
+ "status-success": "#5fb870",
2010
+ "status-error": "#d85c4a",
2011
+ "status-warning": "#d4a43a",
2012
+ "status-info": "#5a8fd4",
2013
+ // Text: warm off-whites
2014
+ "text-primary": "#f4f3f1",
2015
+ "text-secondary": "#b5b3af",
2016
+ "text-tertiary": "#7a7875",
2017
+ // Surfaces: warm charcoals (not pure gray)
2018
+ "surface-base": "#101114",
2019
+ "surface-elevated": "#15171c",
2020
+ "surface-raised": "#1a1d24",
2021
+ "surface-overlay": "#15171c",
2022
+ "surface-input": "#15171c",
2023
+ // Backgrounds
2024
+ "background-base": "#0a0b0d",
2025
+ "background-default": "#101114",
2026
+ "background-subtle": "#1a1d24",
2027
+ // Borders
2028
+ "border-default": "rgba(255, 255, 255, 0.06)",
2029
+ "border-subtle": "rgba(255, 255, 255, 0.03)",
2030
+ "border-strong": "#2d323d",
2031
+ "border-focus": "#d4782a",
2032
+ "border-input": "#2d323d",
2033
+ "border-input-hover": "#454c5c",
2034
+ "border-input-focus": "#d4782a",
2035
+ "border-input-error": "#d85c4a",
2036
+ // Interactive
2037
+ "interactive-hover": "rgba(255, 255, 255, 0.04)",
2038
+ "interactive-focus": "rgba(255, 255, 255, 0.12)",
2039
+ "interactive-active": "rgba(255, 255, 255, 0.16)",
2040
+ "interactive-selected": "rgba(255, 255, 255, 0.08)",
2041
+ "divider": "rgba(255, 255, 255, 0.06)",
2042
+ // Glow RGB values for shadow utilities
2043
+ "brand-primary-rgb": "212, 120, 42",
2044
+ "brand-secondary-rgb": "58, 155, 138",
2045
+ "status-success-rgb": "95, 184, 112",
2046
+ "status-error-rgb": "216, 92, 74",
2047
+ "status-warning-rgb": "212, 164, 58",
2048
+ "status-info-rgb": "90, 143, 212",
2049
+ "background-base-rgb": "10, 11, 13"
2050
+ }
2051
+ },
2052
+ rootClasses: ["atmosphere-warm", "grain"]
2053
+ };
2054
+ function wrapJsx(fn) {
2055
+ return function(type, props, ...rest) {
2056
+ if (props && typeof props.className === "string" && props.className) {
2057
+ const cn = props.className;
2058
+ const cssStyle = { $$css: true, [cn]: cn };
2059
+ const existing = props.style;
2060
+ props = {
2061
+ ...props,
2062
+ style: existing ? [cssStyle, existing] : cssStyle
2063
+ };
2064
+ delete props.className;
2065
+ }
2066
+ return fn(type, props, ...rest);
2067
+ };
2068
+ }
2069
+ var jsx = wrapJsx(jsx$1);
2070
+
2071
+ // src/theme/ThemeProvider.tsx
2072
+ var MODE_VARS = {
2073
+ dark: vars(darkThemeCSSVars),
2074
+ light: vars(lightThemeCSSVars)
2075
+ };
2076
+ function ThemeProvider({
2077
+ mode = "dark",
2078
+ style,
2079
+ children,
2080
+ ...props
2081
+ }) {
2082
+ return /* @__PURE__ */ jsx(View, { style: [MODE_VARS[mode], { flex: 1 }, style], ...props, children });
2083
+ }
2084
+
2085
+ export { CATEGORICAL_CVD_SAFE_MAX, ThemeProvider, applyThemePreset, audiobookPreset, bestTextColor, buttonSizes, categoricalPalette, componentElevationRanges, createFlatShadow, createPressedHoverShadow, createPressedShadow, createRaisedHoverShadow, createRaisedShadow, darkThemeCSSVars, darken, defaultPreset, discreteRainbow, divergingScale, elevationSystem, getBaseSurfaceColor, getCategoricalColor, getDiscreteRainbowColor, getElevationConfig, getElevationShadow, getElevationSurface, getGlowShadow, getHoverColors, getSemanticColors, getThemeCSSVars, getValidatedElevation, gluestackConfig, hexToRgb, hsvToRgb, isCssPropertyManifest, isDark, lightThemeCSSVars, lighten, linearGradient, neumorphicShadows, primitiveBorderRadius, primitiveBreakpoints, primitiveColors, primitiveRamps, primitiveShadows, primitiveSpacing, primitiveTypography, primitiveZIndex, resolveColor, rgbToHex, rgbToHsv, semanticColorsDark, semanticColorsLight, semanticTypography, sequentialEffort, shadowColors, surfaceGradient, validateCssPropertyManifest };
3
2086
  //# sourceMappingURL=index.mjs.map
4
2087
  //# sourceMappingURL=index.mjs.map