@tenerife.music/ui 1.0.15 → 1.1.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.
@@ -115,6 +115,1261 @@ var init_default = __esm({
115
115
  }
116
116
  });
117
117
 
118
+ // src/FOUNDATION/tokens/colors.ts
119
+ var primaryColors = {
120
+ 50: "210 40% 98%",
121
+ // Lightest blue
122
+ 100: "210 40% 96%",
123
+ 200: "217 32.6% 17.5%",
124
+ 300: "216 28% 26%",
125
+ 400: "215 25% 30%",
126
+ // Adjusted for better progression
127
+ 500: "215 20% 38%",
128
+ // Adjusted for better progression
129
+ 600: "215 16% 45%",
130
+ // Adjusted for better progression
131
+ 700: "216 12% 35%",
132
+ // Rebalanced for semantic strength (L* ~35)
133
+ 800: "217 10% 28%",
134
+ // Adjusted for proper progression
135
+ 900: "222 47.4% 18%",
136
+ // Adjusted for better progression
137
+ 950: "222 84% 4.9%"
138
+ // Darkest blue
139
+ };
140
+ var accentColors = {
141
+ 50: "280 100% 98%",
142
+ 100: "280 65% 96%",
143
+ 200: "280 60% 85%",
144
+ 300: "280 55% 75%",
145
+ 400: "280 50% 65%",
146
+ 500: "280 65% 72%",
147
+ // Adjusted for WCAG AA contrast (4.5:1) with dark text in night mode
148
+ 600: "259 65% 59%",
149
+ // Default accent - lightened for better contrast vs secondary (L* ~59, was 52, 15 delta from secondary-600)
150
+ 700: "259 60% 44%",
151
+ // Active state - rebalanced for semantic strength (L* ~44, 12 delta from secondary-700)
152
+ 800: "259 55% 38%",
153
+ // Adjusted for proper progression
154
+ 900: "259 50% 32%",
155
+ 950: "259 45% 30%"
156
+ };
157
+ var secondaryColors = {
158
+ 50: "173 100% 98%",
159
+ 100: "173 100% 95%",
160
+ 200: "173 100% 85%",
161
+ 300: "173 100% 70%",
162
+ 400: "173 100% 55%",
163
+ 500: "173 100% 45%",
164
+ // Adjusted for better scale progression
165
+ 600: "173 100% 44%",
166
+ // Default secondary - rebalanced for better contrast vs primary (L* ~44, was 38)
167
+ 700: "173 95% 32%",
168
+ // Active state - rebalanced for semantic strength (L* ~32)
169
+ 800: "173 90% 22%",
170
+ // Primary variant - darkened for dominance (L* ~22, was 26)
171
+ 900: "173 85% 20%",
172
+ 950: "173 80% 12%"
173
+ };
174
+ var surfaceColors = {
175
+ day: {
176
+ base: "0 0% 100%",
177
+ // White background
178
+ elevated1: "0 0% 98%",
179
+ // Slightly elevated
180
+ elevated2: "0 0% 96%",
181
+ // More elevated
182
+ elevated3: "0 0% 94%",
183
+ // Most elevated
184
+ overlay: "0 0% 0% / 0.5",
185
+ // Overlay backdrop
186
+ glass: "0 0% 100% / 0.8"
187
+ // Glass effect
188
+ },
189
+ night: {
190
+ base: "240 10% 3.9%",
191
+ // Dark background (#0b0b10)
192
+ elevated1: "240 10% 5.1%",
193
+ // #0e1016
194
+ elevated2: "240 10% 6.3%",
195
+ // Slightly lighter
196
+ elevated3: "240 10% 7.5%",
197
+ // Even lighter
198
+ overlay: "0 0% 0% / 0.7",
199
+ // Darker overlay
200
+ glass: "240 10% 10% / 0.9"
201
+ // Dark glass effect
202
+ }
203
+ };
204
+ var semanticColors = {
205
+ day: {
206
+ success: "142 70% 28%",
207
+ // Darker green for better contrast
208
+ successForeground: "0 0% 100%",
209
+ error: "0 80% 40%",
210
+ // Richer red for contrast
211
+ errorForeground: "0 0% 100%",
212
+ warning: "38 92% 50%",
213
+ // Orange
214
+ warningForeground: "0 0% 9%",
215
+ info: "199 89% 48%",
216
+ // Blue
217
+ infoForeground: "0 0% 100%"
218
+ },
219
+ night: {
220
+ success: "142 70% 45%",
221
+ successForeground: "0 0% 100%",
222
+ error: "0 62.8% 30.6%",
223
+ // Darker red
224
+ errorForeground: "0 0% 98%",
225
+ warning: "38 92% 33%",
226
+ // Darker orange for WCAG AA contrast with white text
227
+ warningForeground: "0 0% 100%",
228
+ // Light foreground for dark theme readability
229
+ info: "199 89% 35%",
230
+ // Darker blue for WCAG AA contrast with white text
231
+ infoForeground: "0 0% 100%"
232
+ // Light foreground for dark theme readability
233
+ }
234
+ };
235
+ var chartColors = {
236
+ day: {
237
+ chart1: "12 76% 61%",
238
+ // Orange-red
239
+ chart2: "173 58% 39%",
240
+ // Teal-cyan
241
+ chart3: "197 37% 24%",
242
+ // Dark blue
243
+ chart4: "43 74% 66%",
244
+ // Yellow
245
+ chart5: "27 87% 67%"
246
+ // Orange
247
+ },
248
+ night: {
249
+ chart1: "220 70% 50%",
250
+ // Blue
251
+ chart2: "160 60% 45%",
252
+ // Teal
253
+ chart3: "30 80% 55%",
254
+ // Orange
255
+ chart4: "280 65% 60%",
256
+ // Purple
257
+ chart5: "340 75% 55%"
258
+ // Pink
259
+ }
260
+ };
261
+ var textColors = {
262
+ day: {
263
+ primary: "0 0% 9%",
264
+ // Almost black (neutral-900 equivalent)
265
+ secondary: "0 0% 45%",
266
+ // Medium gray
267
+ tertiary: "0 0% 65%",
268
+ // Light gray
269
+ muted: "0 0% 42%",
270
+ // Muted gray - adjusted for WCAG AA contrast (4.5:1) on surface.elevated2
271
+ inverse: "0 0% 100%"
272
+ // White (for dark backgrounds)
273
+ },
274
+ night: {
275
+ primary: "0 0% 89.8%",
276
+ // Light gray (#e5e7eb)
277
+ secondary: "240 5% 64.9%",
278
+ // Medium gray
279
+ tertiary: "240 5% 50%",
280
+ // Darker gray
281
+ muted: "240 5% 64.9%",
282
+ // Muted gray
283
+ inverse: "0 0% 9%"
284
+ // Almost black (for light backgrounds)
285
+ }
286
+ };
287
+ var baseColors = {
288
+ day: {
289
+ background: "0 0% 100%",
290
+ foreground: "0 0% 9%",
291
+ card: "0 0% 100%",
292
+ cardForeground: "0 0% 9%",
293
+ popover: "0 0% 100%",
294
+ popoverForeground: "0 0% 9%",
295
+ border: "0 0% 89.8%",
296
+ input: "0 0% 89.8%",
297
+ ring: "0 0% 3.9%"
298
+ },
299
+ night: {
300
+ background: "240 10% 3.9%",
301
+ // #0b0b10
302
+ foreground: "0 0% 89.8%",
303
+ // #e5e7eb
304
+ card: "240 10% 3.9%",
305
+ cardForeground: "0 0% 89.8%",
306
+ popover: "240 10% 5.1%",
307
+ // #0e1016
308
+ popoverForeground: "0 0% 89.8%",
309
+ border: "240 3.7% 15.9%",
310
+ input: "240 3.7% 15.9%",
311
+ ring: "240 4.9% 83.9%"
312
+ }
313
+ };
314
+ var cssVariableColorTokens = {
315
+ day: {
316
+ ...baseColors.day,
317
+ primary: "hsl(var(--tm-primary))",
318
+ primaryForeground: "hsl(var(--tm-primary-foreground))",
319
+ secondary: "hsl(var(--tm-secondary))",
320
+ secondaryForeground: "hsl(var(--tm-secondary-foreground))",
321
+ muted: "hsl(var(--muted))",
322
+ mutedForeground: "hsl(var(--muted-foreground))",
323
+ accent: "hsl(var(--tm-accent))",
324
+ accentForeground: "hsl(var(--tm-accent-foreground))",
325
+ destructive: `hsl(${semanticColors.day.error})`,
326
+ destructiveForeground: semanticColors.day.errorForeground,
327
+ chart1: `hsl(${chartColors.day.chart1})`,
328
+ chart2: `hsl(${chartColors.day.chart2})`,
329
+ chart3: `hsl(${chartColors.day.chart3})`,
330
+ chart4: `hsl(${chartColors.day.chart4})`,
331
+ chart5: `hsl(${chartColors.day.chart5})`
332
+ },
333
+ night: {
334
+ ...baseColors.night,
335
+ primary: "hsl(var(--tm-primary))",
336
+ primaryForeground: "hsl(var(--tm-primary-foreground))",
337
+ secondary: "hsl(var(--tm-secondary))",
338
+ secondaryForeground: "hsl(var(--tm-secondary-foreground))",
339
+ muted: "hsl(var(--muted))",
340
+ mutedForeground: "hsl(var(--muted-foreground))",
341
+ accent: "hsl(var(--tm-accent))",
342
+ accentForeground: "hsl(var(--tm-accent-foreground))",
343
+ destructive: `hsl(${semanticColors.night.error})`,
344
+ destructiveForeground: semanticColors.night.errorForeground,
345
+ chart1: `hsl(${chartColors.night.chart1})`,
346
+ chart2: `hsl(${chartColors.night.chart2})`,
347
+ chart3: `hsl(${chartColors.night.chart3})`,
348
+ chart4: `hsl(${chartColors.night.chart4})`,
349
+ chart5: `hsl(${chartColors.night.chart5})`
350
+ }
351
+ };
352
+ ({
353
+ // Primary scale
354
+ "--primary-50": primaryColors[50],
355
+ "--primary-100": primaryColors[100],
356
+ "--primary-200": primaryColors[200],
357
+ "--primary-300": primaryColors[300],
358
+ "--primary-400": primaryColors[400],
359
+ "--primary-500": primaryColors[500],
360
+ "--primary-600": primaryColors[600],
361
+ "--primary-700": primaryColors[700],
362
+ "--primary-800": primaryColors[800],
363
+ "--primary-900": primaryColors[900],
364
+ "--primary-950": primaryColors[950],
365
+ // Accent scale
366
+ "--accent-50": accentColors[50],
367
+ "--accent-100": accentColors[100],
368
+ "--accent-200": accentColors[200],
369
+ "--accent-300": accentColors[300],
370
+ "--accent-400": accentColors[400],
371
+ "--accent-500": accentColors[500],
372
+ "--accent-600": accentColors[600],
373
+ "--accent-700": accentColors[700],
374
+ "--accent-800": accentColors[800],
375
+ "--accent-900": accentColors[900],
376
+ "--accent-950": accentColors[950],
377
+ // Secondary scale
378
+ "--secondary-50": secondaryColors[50],
379
+ "--secondary-100": secondaryColors[100],
380
+ "--secondary-200": secondaryColors[200],
381
+ "--secondary-300": secondaryColors[300],
382
+ "--secondary-400": secondaryColors[400],
383
+ "--secondary-500": secondaryColors[500],
384
+ "--secondary-600": secondaryColors[600],
385
+ "--secondary-700": secondaryColors[700],
386
+ "--secondary-800": secondaryColors[800],
387
+ "--secondary-900": secondaryColors[900],
388
+ "--secondary-950": secondaryColors[950]
389
+ // Surface colors (mode-dependent, set dynamically by theme system)
390
+ // Note: These are set via updateCSSVariablesFromTokens() in applyMode.ts
391
+ // Semantic colors (mode-dependent, set dynamically by theme system)
392
+ // Note: These are set via updateCSSVariablesFromTokens() in applyMode.ts
393
+ // Text colors (mode-dependent, set dynamically by theme system)
394
+ // Note: These are set via updateCSSVariablesFromTokens() in applyMode.ts
395
+ // Chart colors (mode-dependent, set dynamically by theme system)
396
+ // Note: These are set via updateCSSVariablesFromTokens() in applyMode.ts
397
+ });
398
+ var tailwindThemeColors = {
399
+ // Base colors
400
+ background: "hsl(var(--background))",
401
+ foreground: "hsl(var(--foreground))",
402
+ // Card colors
403
+ card: {
404
+ DEFAULT: "hsl(var(--card))",
405
+ foreground: "hsl(var(--card-foreground))"
406
+ },
407
+ // Popover colors
408
+ popover: {
409
+ DEFAULT: "hsl(var(--popover))",
410
+ foreground: "hsl(var(--popover-foreground))"
411
+ },
412
+ // Primary colors (using CSS variables)
413
+ primary: {
414
+ DEFAULT: "hsl(var(--tm-primary))",
415
+ foreground: "hsl(var(--tm-primary-foreground))",
416
+ 50: `hsl(var(--primary-50))`,
417
+ 100: `hsl(var(--primary-100))`,
418
+ 200: `hsl(var(--primary-200))`,
419
+ 300: `hsl(var(--primary-300))`,
420
+ 400: `hsl(var(--primary-400))`,
421
+ 500: `hsl(var(--primary-500))`,
422
+ 600: `hsl(var(--primary-600))`,
423
+ 700: `hsl(var(--primary-700))`,
424
+ 800: `hsl(var(--primary-800))`,
425
+ 900: `hsl(var(--primary-900))`,
426
+ 950: `hsl(var(--primary-950))`
427
+ },
428
+ // Secondary colors
429
+ secondary: {
430
+ DEFAULT: "hsl(var(--tm-secondary))",
431
+ foreground: "hsl(var(--tm-secondary-foreground))",
432
+ 50: `hsl(var(--secondary-50))`,
433
+ 100: `hsl(var(--secondary-100))`,
434
+ 200: `hsl(var(--secondary-200))`,
435
+ 300: `hsl(var(--secondary-300))`,
436
+ 400: `hsl(var(--secondary-400))`,
437
+ 500: `hsl(var(--secondary-500))`,
438
+ 600: `hsl(var(--secondary-600))`,
439
+ 700: `hsl(var(--secondary-700))`,
440
+ 800: `hsl(var(--secondary-800))`,
441
+ 900: `hsl(var(--secondary-900))`,
442
+ 950: `hsl(var(--secondary-950))`
443
+ },
444
+ // Accent colors
445
+ accent: {
446
+ DEFAULT: "hsl(var(--tm-accent))",
447
+ foreground: "hsl(var(--tm-accent-foreground))",
448
+ 50: `hsl(var(--accent-50))`,
449
+ 100: `hsl(var(--accent-100))`,
450
+ 200: `hsl(var(--accent-200))`,
451
+ 300: `hsl(var(--accent-300))`,
452
+ 400: `hsl(var(--accent-400))`,
453
+ 500: `hsl(var(--accent-500))`,
454
+ 600: `hsl(var(--accent-600))`,
455
+ 700: `hsl(var(--accent-700))`,
456
+ 800: `hsl(var(--accent-800))`,
457
+ 900: `hsl(var(--accent-900))`,
458
+ 950: `hsl(var(--accent-950))`
459
+ },
460
+ // Muted colors
461
+ muted: {
462
+ DEFAULT: "hsl(var(--muted))",
463
+ foreground: "hsl(var(--muted-foreground))"
464
+ },
465
+ // Destructive colors (semantic error)
466
+ destructive: {
467
+ DEFAULT: "hsl(var(--destructive))",
468
+ foreground: "hsl(var(--destructive-foreground))"
469
+ },
470
+ // Semantic colors
471
+ success: {
472
+ DEFAULT: `hsl(var(--semantic-success))`,
473
+ foreground: `hsl(var(--semantic-success-foreground))`
474
+ },
475
+ error: {
476
+ DEFAULT: `hsl(var(--semantic-error))`,
477
+ foreground: `hsl(var(--semantic-error-foreground))`
478
+ },
479
+ warning: {
480
+ DEFAULT: `hsl(var(--semantic-warning))`,
481
+ foreground: `hsl(var(--semantic-warning-foreground))`
482
+ },
483
+ info: {
484
+ DEFAULT: `hsl(var(--semantic-info))`,
485
+ foreground: `hsl(var(--semantic-info-foreground))`
486
+ },
487
+ // Surface colors
488
+ surface: {
489
+ base: `hsl(var(--surface-base))`,
490
+ elevated1: `hsl(var(--surface-elevated1))`,
491
+ elevated2: `hsl(var(--surface-elevated2))`,
492
+ elevated3: `hsl(var(--surface-elevated3))`,
493
+ overlay: `hsl(var(--surface-overlay))`,
494
+ glass: `hsl(var(--surface-glass))`
495
+ },
496
+ // Text colors
497
+ text: {
498
+ primary: `hsl(var(--text-primary))`,
499
+ secondary: `hsl(var(--text-secondary))`,
500
+ tertiary: `hsl(var(--text-tertiary))`,
501
+ muted: `hsl(var(--text-muted))`,
502
+ destructive: `hsl(var(--destructive))`,
503
+ accent: `hsl(var(--tm-accent))`,
504
+ inverse: `hsl(var(--text-inverse))`
505
+ },
506
+ // Border and input
507
+ border: "hsl(var(--border))",
508
+ input: "hsl(var(--input))",
509
+ ring: "hsl(var(--ring))",
510
+ // Chart colors (using CSS variables)
511
+ chart: {
512
+ 1: `hsl(var(--chart-1))`,
513
+ 2: `hsl(var(--chart-2))`,
514
+ 3: `hsl(var(--chart-3))`,
515
+ 4: `hsl(var(--chart-4))`,
516
+ 5: `hsl(var(--chart-5))`
517
+ }
518
+ };
519
+
520
+ // src/FOUNDATION/tokens/motion/v2.ts
521
+ var motionV2Durations = {
522
+ fast: "150ms",
523
+ // Quick interactions
524
+ normal: "250ms",
525
+ // Default transitions
526
+ slow: "350ms",
527
+ // Emphasized animations
528
+ reduced: "0ms"
529
+ // For prefers-reduced-motion
530
+ };
531
+ var motionV2Easings = {
532
+ soft: "cubic-bezier(0.22, 1, 0.36, 1)",
533
+ // Gentle, smooth
534
+ standard: "cubic-bezier(0.4, 0, 0.2, 1)",
535
+ // Material Design standard
536
+ emphasized: "cubic-bezier(0.2, 0, 0, 1)"
537
+ // Strong, decisive
538
+ };
539
+ var motionV2Transitions = {
540
+ fast: `${motionV2Durations.fast} ${motionV2Easings.standard}`,
541
+ normal: `${motionV2Durations.normal} ${motionV2Easings.standard}`,
542
+ slow: `${motionV2Durations.slow} ${motionV2Easings.emphasized}`,
543
+ soft: `${motionV2Durations.normal} ${motionV2Easings.soft}`,
544
+ reduced: `${motionV2Durations.reduced} linear`
545
+ };
546
+ var motionV2CSSVariables = {
547
+ // Durations
548
+ "--motion-duration-fast": motionV2Durations.fast,
549
+ "--motion-duration-normal": motionV2Durations.normal,
550
+ "--motion-duration-slow": motionV2Durations.slow,
551
+ "--motion-duration-reduced": motionV2Durations.reduced,
552
+ // Easings
553
+ "--motion-easing-soft": motionV2Easings.soft,
554
+ "--motion-easing-standard": motionV2Easings.standard,
555
+ "--motion-easing-emphasized": motionV2Easings.emphasized,
556
+ // Transitions
557
+ "--motion-transition-fast": motionV2Transitions.fast,
558
+ "--motion-transition-normal": motionV2Transitions.normal,
559
+ "--motion-transition-slow": motionV2Transitions.slow,
560
+ "--motion-transition-soft": motionV2Transitions.soft,
561
+ "--motion-transition-reduced": motionV2Transitions.reduced
562
+ };
563
+
564
+ // src/FOUNDATION/tokens/motion.ts
565
+ var durations = {
566
+ instant: "0ms",
567
+ fast: "150ms",
568
+ // 1.5 × base (quick interactions)
569
+ normal: "300ms",
570
+ // 3 × base (default)
571
+ slow: "500ms",
572
+ // 5 × base (emphasized)
573
+ slower: "700ms",
574
+ // 7 × base (very emphasized)
575
+ slowest: "1000ms",
576
+ // 10 × base (maximum emphasis)
577
+ // Additional granular durations
578
+ "75": "75ms",
579
+ // Ultra-fast
580
+ "100": "100ms",
581
+ // Base unit
582
+ "200": "200ms",
583
+ // Fast-normal
584
+ "250": "250ms",
585
+ // Between fast and normal
586
+ "400": "400ms",
587
+ // Between normal and slow
588
+ "600": "600ms",
589
+ // Between slow and slower
590
+ "800": "800ms"
591
+ // Between slower and slowest
592
+ };
593
+ var easings = {
594
+ // Linear (no easing)
595
+ linear: "linear",
596
+ // Ease-in (accelerate) - cubic-bezier
597
+ "ease-in": "cubic-bezier(0.4, 0, 1, 1)",
598
+ // Ease-out (decelerate) - recommended for most UI - cubic-bezier
599
+ "ease-out": "cubic-bezier(0, 0, 0.2, 1)",
600
+ // Ease-in-out (accelerate and decelerate)
601
+ "ease-in-out": "cubic-bezier(0.4, 0, 0.2, 1)",
602
+ // Advanced easing functions
603
+ bounce: "cubic-bezier(0.68, -0.55, 0.265, 1.55)",
604
+ elastic: "cubic-bezier(0.175, 0.885, 0.32, 1.275)",
605
+ // Material Design easing
606
+ "ease-out-cubic": "cubic-bezier(0.215, 0.61, 0.355, 1)",
607
+ "ease-in-cubic": "cubic-bezier(0.55, 0.055, 0.675, 0.19)",
608
+ "ease-in-out-cubic": "cubic-bezier(0.645, 0.045, 0.355, 1)"
609
+ };
610
+ var transitions = {
611
+ // Fast transitions (quick interactions)
612
+ fast: `${durations.fast} ${easings["ease-out"]}`,
613
+ "fast-in": `${durations.fast} ${easings["ease-in"]}`,
614
+ "fast-out": `${durations.fast} ${easings["ease-out"]}`,
615
+ "fast-in-out": `${durations.fast} ${easings["ease-in-out"]}`,
616
+ // Normal transitions (default)
617
+ normal: `${durations.normal} ${easings["ease-in-out"]}`,
618
+ "normal-in": `${durations.normal} ${easings["ease-in"]}`,
619
+ "normal-out": `${durations.normal} ${easings["ease-out"]}`,
620
+ "normal-in-out": `${durations.normal} ${easings["ease-in-out"]}`,
621
+ // Slow transitions (emphasized)
622
+ slow: `${durations.slow} ${easings["ease-in-out"]}`,
623
+ "slow-in": `${durations.slow} ${easings["ease-in"]}`,
624
+ "slow-out": `${durations.slow} ${easings["ease-out"]}`,
625
+ "slow-in-out": `${durations.slow} ${easings["ease-in-out"]}`,
626
+ // Special transitions
627
+ bounce: `${durations.normal} ${easings.bounce}`,
628
+ elastic: `${durations.slow} ${easings.elastic}`,
629
+ // Default (normal)
630
+ DEFAULT: `${durations.normal} ${easings["ease-in-out"]}`
631
+ };
632
+ var motionCSSVariables = {
633
+ // Durations
634
+ "--duration-instant": durations.instant,
635
+ "--duration-fast": durations.fast,
636
+ "--duration-normal": durations.normal,
637
+ "--duration-slow": durations.slow,
638
+ "--duration-slower": durations.slower,
639
+ "--duration-slowest": durations.slowest,
640
+ // Additional granular durations
641
+ "--duration-75": durations["75"],
642
+ "--duration-100": durations["100"],
643
+ "--duration-200": durations["200"],
644
+ "--duration-250": durations["250"],
645
+ "--duration-400": durations["400"],
646
+ "--duration-600": durations["600"],
647
+ "--duration-800": durations["800"],
648
+ // Easings
649
+ "--ease-linear": easings.linear,
650
+ "--ease-in": easings["ease-in"],
651
+ "--ease-out": easings["ease-out"],
652
+ "--ease-in-out": easings["ease-in-out"],
653
+ "--ease-bounce": easings.bounce,
654
+ "--ease-elastic": easings.elastic,
655
+ "--ease-out-cubic": easings["ease-out-cubic"],
656
+ "--ease-in-cubic": easings["ease-in-cubic"],
657
+ "--ease-in-out-cubic": easings["ease-in-out-cubic"],
658
+ // Transitions
659
+ "--transition-fast": transitions.fast,
660
+ "--transition-normal": transitions.normal,
661
+ "--transition-slow": transitions.slow,
662
+ "--transition-default": transitions.DEFAULT,
663
+ "--transition-fast-in": transitions["fast-in"],
664
+ "--transition-fast-out": transitions["fast-out"],
665
+ "--transition-fast-in-out": transitions["fast-in-out"],
666
+ "--transition-normal-in": transitions["normal-in"],
667
+ "--transition-normal-out": transitions["normal-out"],
668
+ "--transition-normal-in-out": transitions["normal-in-out"],
669
+ "--transition-slow-in": transitions["slow-in"],
670
+ "--transition-slow-out": transitions["slow-out"],
671
+ "--transition-slow-in-out": transitions["slow-in-out"],
672
+ "--transition-bounce": transitions.bounce,
673
+ "--transition-elastic": transitions.elastic
674
+ };
675
+
676
+ // src/FOUNDATION/tokens/radius.ts
677
+ var borderRadius = {
678
+ // No radius
679
+ none: "0",
680
+ // Extra small radius
681
+ xs: "0.125rem",
682
+ // 2px
683
+ // Small radius
684
+ sm: "0.25rem",
685
+ // 4px (same as sm)
686
+ base: "0.25rem",
687
+ // 4px (alias)
688
+ // Medium radius
689
+ md: "0.375rem",
690
+ // 6px
691
+ // Large radius
692
+ lg: "0.5rem",
693
+ // 8px (2 × base)
694
+ // Extra large radius
695
+ xl: "0.75rem",
696
+ // 12px (3 × base)
697
+ // 2XL radius
698
+ "2xl": "1rem",
699
+ // 16px (4 × base)
700
+ // 3XL radius
701
+ "3xl": "1.5rem",
702
+ // 24px (6 × base)
703
+ // Full radius (circular)
704
+ full: "9999px"
705
+ };
706
+ var componentRadius = {
707
+ // Button radius standards
708
+ button: {
709
+ // 4px (compact buttons)
710
+ md: borderRadius.md},
711
+ // Card radius standards
712
+ card: {
713
+ // 4px (compact cards)
714
+ md: borderRadius.md},
715
+ // Input/Form field radius standards
716
+ input: {
717
+ // 4px (compact inputs)
718
+ md: borderRadius.md},
719
+ // Badge/Status radius standards
720
+ badge: {
721
+ // 2px (compact badges)
722
+ md: borderRadius.sm},
723
+ // Modal/Dialog radius standards
724
+ modal: {
725
+ // 6px (small modals)
726
+ md: borderRadius.lg},
727
+ // Tooltip radius standards
728
+ tooltip: {
729
+ sm: borderRadius.sm},
730
+ // Toast/Notification radius standards
731
+ toast: {
732
+ // 6px (compact toasts)
733
+ md: borderRadius.lg},
734
+ // Chip/Tag radius standards
735
+ chip: {
736
+ // 2px (compact chips)
737
+ md: borderRadius.sm},
738
+ // Image/Media radius standards
739
+ image: {
740
+ // 4px (subtle rounding)
741
+ md: borderRadius.md}
742
+ };
743
+ var radiusCSSVariables = {
744
+ // Border radius scale
745
+ "--radius-none": borderRadius.none,
746
+ "--radius-xs": borderRadius.xs,
747
+ "--radius-sm": borderRadius.sm,
748
+ "--radius-base": borderRadius.base,
749
+ "--radius-md": borderRadius.md,
750
+ "--radius-lg": borderRadius.lg,
751
+ "--radius-xl": borderRadius.xl,
752
+ "--radius-2xl": borderRadius["2xl"],
753
+ "--radius-3xl": borderRadius["3xl"],
754
+ "--radius-full": borderRadius.full,
755
+ // Default radius variable (commonly used)
756
+ "--radius": borderRadius.md,
757
+ // Default to medium (6px)
758
+ // Component-specific radius variables
759
+ "--radius-button": componentRadius.button.md,
760
+ "--radius-card": componentRadius.card.md,
761
+ "--radius-input": componentRadius.input.md,
762
+ "--radius-badge": componentRadius.badge.md,
763
+ "--radius-modal": componentRadius.modal.md,
764
+ "--radius-tooltip": componentRadius.tooltip.sm,
765
+ "--radius-toast": componentRadius.toast.md,
766
+ "--radius-chip": componentRadius.chip.md,
767
+ "--radius-image": componentRadius.image.md
768
+ };
769
+
770
+ // src/FOUNDATION/tokens/shadows.ts
771
+ var shadowBase = {
772
+ black: "0 0 0"};
773
+ var shadowOpacity = {
774
+ xs: "0.05",
775
+ sm: "0.1",
776
+ md: "0.1",
777
+ lg: "0.1",
778
+ xl: "0.1",
779
+ "2xl": "0.25"};
780
+ var elevationShadows = {
781
+ none: "none",
782
+ xs: `0 1px 2px 0 rgb(${shadowBase.black} / ${shadowOpacity.xs})`,
783
+ sm: `0 1px 3px 0 rgb(${shadowBase.black} / ${shadowOpacity.sm}), 0 1px 2px -1px rgb(${shadowBase.black} / ${shadowOpacity.sm})`,
784
+ md: `0 4px 6px -1px rgb(${shadowBase.black} / ${shadowOpacity.md}), 0 2px 4px -2px rgb(${shadowBase.black} / ${shadowOpacity.md})`,
785
+ lg: `0 10px 15px -3px rgb(${shadowBase.black} / ${shadowOpacity.lg}), 0 4px 6px -4px rgb(${shadowBase.black} / ${shadowOpacity.lg})`,
786
+ xl: `0 20px 25px -5px rgb(${shadowBase.black} / ${shadowOpacity.xl}), 0 8px 10px -6px rgb(${shadowBase.black} / ${shadowOpacity.xl})`,
787
+ "2xl": `0 25px 50px -12px rgb(${shadowBase.black} / ${shadowOpacity["2xl"]})`
788
+ };
789
+ var primaryColoredShadows = {
790
+ xs: "0 1px 2px 0 hsl(var(--primary-500) / 0.15)",
791
+ sm: "0 2px 4px 0 hsl(var(--primary-500) / 0.2)",
792
+ md: "0 4px 8px 0 hsl(var(--primary-500) / 0.3)",
793
+ lg: "0 8px 16px 0 hsl(var(--primary-500) / 0.4)",
794
+ xl: "0 12px 24px 0 hsl(var(--primary-500) / 0.5)",
795
+ "2xl": "0 16px 32px 0 hsl(var(--primary-500) / 0.6)"
796
+ };
797
+ var accentColoredShadows = {
798
+ xs: "0 1px 2px 0 hsl(var(--accent-500) / 0.15)",
799
+ sm: "0 2px 4px 0 hsl(var(--accent-500) / 0.2)",
800
+ md: "0 4px 8px 0 hsl(var(--accent-500) / 0.3)",
801
+ lg: "0 8px 16px 0 hsl(var(--accent-500) / 0.4)",
802
+ xl: "0 12px 24px 0 hsl(var(--accent-500) / 0.5)",
803
+ "2xl": "0 16px 32px 0 hsl(var(--accent-500) / 0.6)"
804
+ };
805
+ var glowEffects = {
806
+ // Primary glow effects
807
+ "glow-primary": "0 0 20px 0 hsl(var(--primary-500) / 0.5), 0 0 40px 0 hsl(var(--primary-500) / 0.3)",
808
+ "glow-primary-subtle": "0 0 8px 0 hsl(var(--primary-500) / 0.3)",
809
+ "glow-primary-medium": "0 0 16px 0 hsl(var(--primary-500) / 0.5)",
810
+ "glow-primary-strong": "0 0 24px 0 hsl(var(--primary-500) / 0.6)",
811
+ // Accent glow effects
812
+ "glow-accent": "0 0 20px 0 hsl(var(--accent-500) / 0.5), 0 0 40px 0 hsl(var(--accent-500) / 0.3)",
813
+ "glow-accent-subtle": "0 0 8px 0 hsl(var(--accent-500) / 0.3)",
814
+ "glow-accent-medium": "0 0 16px 0 hsl(var(--accent-500) / 0.5)",
815
+ "glow-accent-strong": "0 0 24px 0 hsl(var(--accent-500) / 0.6)"
816
+ };
817
+ var focusRings = {
818
+ default: "0 0 0 3px hsl(var(--ring) / 0.5)",
819
+ primary: "0 0 0 3px hsl(var(--primary-500) / 0.3)",
820
+ accent: "0 0 0 3px hsl(var(--accent-500) / 0.3)",
821
+ "focus-primary": "0 0 0 3px hsl(var(--primary-500) / 0.3)",
822
+ "focus-accent": "0 0 0 3px hsl(var(--accent-500) / 0.3)"
823
+ };
824
+ var shadowCSSVariables = {
825
+ // Elevation shadows
826
+ "--shadow-none": elevationShadows.none,
827
+ "--shadow-xs": elevationShadows.xs,
828
+ "--shadow-sm": elevationShadows.sm,
829
+ "--shadow-md": elevationShadows.md,
830
+ "--shadow-lg": elevationShadows.lg,
831
+ "--shadow-xl": elevationShadows.xl,
832
+ "--shadow-2xl": elevationShadows["2xl"],
833
+ // Primary colored shadows
834
+ "--shadow-primary-xs": primaryColoredShadows.xs,
835
+ "--shadow-primary-sm": primaryColoredShadows.sm,
836
+ "--shadow-primary-md": primaryColoredShadows.md,
837
+ "--shadow-primary-lg": primaryColoredShadows.lg,
838
+ "--shadow-primary-xl": primaryColoredShadows.xl,
839
+ "--shadow-primary-2xl": primaryColoredShadows["2xl"],
840
+ // Accent colored shadows
841
+ "--shadow-accent-xs": accentColoredShadows.xs,
842
+ "--shadow-accent-sm": accentColoredShadows.sm,
843
+ "--shadow-accent-md": accentColoredShadows.md,
844
+ "--shadow-accent-lg": accentColoredShadows.lg,
845
+ "--shadow-accent-xl": accentColoredShadows.xl,
846
+ "--shadow-accent-2xl": accentColoredShadows["2xl"],
847
+ // Glow effects
848
+ "--glow-primary": glowEffects["glow-primary"],
849
+ "--glow-primary-subtle": glowEffects["glow-primary-subtle"],
850
+ "--glow-primary-medium": glowEffects["glow-primary-medium"],
851
+ "--glow-primary-strong": glowEffects["glow-primary-strong"],
852
+ "--glow-accent": glowEffects["glow-accent"],
853
+ "--glow-accent-subtle": glowEffects["glow-accent-subtle"],
854
+ "--glow-accent-medium": glowEffects["glow-accent-medium"],
855
+ "--glow-accent-strong": glowEffects["glow-accent-strong"],
856
+ // Focus rings
857
+ "--focus-ring-default": focusRings.default,
858
+ "--focus-ring-primary": focusRings.primary,
859
+ "--focus-ring-accent": focusRings.accent,
860
+ "--focus-primary": focusRings["focus-primary"],
861
+ "--focus-accent": focusRings["focus-accent"]
862
+ };
863
+
864
+ // src/FOUNDATION/tokens/spacing.ts
865
+ var spacing = {
866
+ // Zero spacing
867
+ 0: "0",
868
+ px: "1px",
869
+ // Half unit (4px)
870
+ 0.5: "0.125rem",
871
+ // 4px
872
+ // Base unit multiples (8px increments)
873
+ 1: "0.25rem",
874
+ // 4px (half unit, common)
875
+ 1.5: "0.375rem",
876
+ // 6px (rare, for fine adjustments)
877
+ 2: "0.5rem",
878
+ // 8px (base unit)
879
+ 2.5: "0.625rem",
880
+ // 10px (rare)
881
+ 3: "0.75rem",
882
+ // 12px (1.5 × base)
883
+ 3.5: "0.875rem",
884
+ // 14px (rare)
885
+ 4: "1rem",
886
+ // 16px (2 × base)
887
+ 5: "1.25rem",
888
+ // 20px (2.5 × base)
889
+ 6: "1.5rem",
890
+ // 24px (3 × base)
891
+ 7: "1.75rem",
892
+ // 28px (3.5 × base)
893
+ 8: "2rem",
894
+ // 32px (4 × base)
895
+ 9: "2.25rem",
896
+ // 36px (4.5 × base)
897
+ 10: "2.5rem",
898
+ // 40px (5 × base)
899
+ 11: "2.75rem",
900
+ // 44px (5.5 × base)
901
+ 12: "3rem",
902
+ // 48px (6 × base)
903
+ 14: "3.5rem",
904
+ // 56px (7 × base)
905
+ 16: "4rem",
906
+ // 64px (8 × base)
907
+ 20: "5rem",
908
+ // 80px (10 × base)
909
+ 24: "6rem"};
910
+ var semanticSpacing = {
911
+ // Extra small spacing (tight, minimal)
912
+ xs: spacing[1],
913
+ // 4px (0.25rem)
914
+ // Small spacing (compact)
915
+ sm: spacing[2],
916
+ // 8px (0.5rem)
917
+ // Medium spacing (default)
918
+ md: spacing[4],
919
+ // 16px (1rem)
920
+ // Large spacing (spacious)
921
+ lg: spacing[6],
922
+ // 24px (1.5rem)
923
+ // Extra large spacing (very spacious)
924
+ xl: spacing[8],
925
+ // 32px (2rem)
926
+ // 2XL spacing (section-level)
927
+ "2xl": spacing[12],
928
+ // 48px (3rem)
929
+ // 3XL spacing (major sections)
930
+ "3xl": spacing[16],
931
+ // 64px (4rem)
932
+ // 4XL spacing (page sections)
933
+ "4xl": spacing[20],
934
+ // 80px (5rem)
935
+ // 5XL spacing (hero sections)
936
+ "5xl": spacing[24],
937
+ // 96px (6rem)
938
+ // None (no spacing)
939
+ none: spacing[0]
940
+ // 0
941
+ };
942
+ var layoutSpacing = {
943
+ // Section spacing (vertical spacing between major sections)
944
+ section: {
945
+ xs: spacing[6],
946
+ // 24px (compact sections)
947
+ sm: spacing[8],
948
+ // 32px (small sections)
949
+ md: spacing[12],
950
+ // 48px (default sections)
951
+ lg: spacing[16],
952
+ // 64px (large sections)
953
+ xl: spacing[20],
954
+ // 80px (extra large sections)
955
+ "2xl": spacing[24]
956
+ // 96px (hero sections)
957
+ },
958
+ // Container spacing (padding inside containers)
959
+ container: {
960
+ xs: spacing[2],
961
+ // 8px (tight containers)
962
+ sm: spacing[4],
963
+ // 16px (compact containers)
964
+ md: spacing[6],
965
+ // 24px (default containers)
966
+ lg: spacing[8],
967
+ // 32px (spacious containers)
968
+ xl: spacing[12]
969
+ // 48px (very spacious containers)
970
+ },
971
+ // Grid spacing (gap between grid items)
972
+ grid: {
973
+ xs: spacing[2],
974
+ // 8px (tight grids)
975
+ sm: spacing[4],
976
+ // 16px (compact grids)
977
+ md: spacing[6],
978
+ // 24px (default grids)
979
+ lg: spacing[8],
980
+ // 32px (spacious grids)
981
+ xl: spacing[12]
982
+ // 48px (very spacious grids)
983
+ },
984
+ // Stack spacing (gap between stacked items)
985
+ stack: {
986
+ xs: spacing[1],
987
+ // 4px (tight stacks)
988
+ sm: spacing[2],
989
+ // 8px (compact stacks)
990
+ md: spacing[4],
991
+ // 16px (default stacks)
992
+ lg: spacing[6],
993
+ // 24px (spacious stacks)
994
+ xl: spacing[8]
995
+ // 32px (very spacious stacks)
996
+ },
997
+ // Component internal spacing (padding inside components)
998
+ component: {
999
+ xs: spacing[1],
1000
+ // 4px (tight components)
1001
+ sm: spacing[2],
1002
+ // 8px (compact components)
1003
+ md: spacing[4],
1004
+ // 16px (default components)
1005
+ lg: spacing[6],
1006
+ // 24px (spacious components)
1007
+ xl: spacing[8]
1008
+ // 32px (extra spacious components)
1009
+ }
1010
+ };
1011
+ var spacingCSSVariables = {
1012
+ // Base spacing scale
1013
+ "--spacing-0": spacing[0],
1014
+ "--spacing-px": spacing.px,
1015
+ "--spacing-0-5": spacing[0.5],
1016
+ "--spacing-1": spacing[1],
1017
+ "--spacing-1-5": spacing[1.5],
1018
+ "--spacing-2": spacing[2],
1019
+ "--spacing-2-5": spacing[2.5],
1020
+ "--spacing-3": spacing[3],
1021
+ "--spacing-3-5": spacing[3.5],
1022
+ "--spacing-4": spacing[4],
1023
+ "--spacing-5": spacing[5],
1024
+ "--spacing-6": spacing[6],
1025
+ "--spacing-7": spacing[7],
1026
+ "--spacing-8": spacing[8],
1027
+ "--spacing-9": spacing[9],
1028
+ "--spacing-10": spacing[10],
1029
+ "--spacing-11": spacing[11],
1030
+ "--spacing-12": spacing[12],
1031
+ "--spacing-14": spacing[14],
1032
+ "--spacing-16": spacing[16],
1033
+ "--spacing-20": spacing[20],
1034
+ "--spacing-24": spacing[24],
1035
+ // Semantic spacing
1036
+ "--spacing-xs": semanticSpacing.xs,
1037
+ "--spacing-sm": semanticSpacing.sm,
1038
+ "--spacing-md": semanticSpacing.md,
1039
+ "--spacing-lg": semanticSpacing.lg,
1040
+ "--spacing-xl": semanticSpacing.xl,
1041
+ "--spacing-2xl": semanticSpacing["2xl"],
1042
+ "--spacing-3xl": semanticSpacing["3xl"],
1043
+ "--spacing-4xl": semanticSpacing["4xl"],
1044
+ "--spacing-5xl": semanticSpacing["5xl"],
1045
+ "--spacing-none": semanticSpacing.none,
1046
+ // Layout spacing - sections
1047
+ "--layout-section-xs": layoutSpacing.section.xs,
1048
+ "--layout-section-sm": layoutSpacing.section.sm,
1049
+ "--layout-section-md": layoutSpacing.section.md,
1050
+ "--layout-section-lg": layoutSpacing.section.lg,
1051
+ "--layout-section-xl": layoutSpacing.section.xl,
1052
+ "--layout-section-2xl": layoutSpacing.section["2xl"],
1053
+ // Layout spacing - containers
1054
+ "--layout-container-xs": layoutSpacing.container.xs,
1055
+ "--layout-container-sm": layoutSpacing.container.sm,
1056
+ "--layout-container-md": layoutSpacing.container.md,
1057
+ "--layout-container-lg": layoutSpacing.container.lg,
1058
+ "--layout-container-xl": layoutSpacing.container.xl,
1059
+ // Layout spacing - grids
1060
+ "--layout-grid-xs": layoutSpacing.grid.xs,
1061
+ "--layout-grid-sm": layoutSpacing.grid.sm,
1062
+ "--layout-grid-md": layoutSpacing.grid.md,
1063
+ "--layout-grid-lg": layoutSpacing.grid.lg,
1064
+ "--layout-grid-xl": layoutSpacing.grid.xl,
1065
+ // Layout spacing - stacks
1066
+ "--layout-stack-xs": layoutSpacing.stack.xs,
1067
+ "--layout-stack-sm": layoutSpacing.stack.sm,
1068
+ "--layout-stack-md": layoutSpacing.stack.md,
1069
+ "--layout-stack-lg": layoutSpacing.stack.lg,
1070
+ "--layout-stack-xl": layoutSpacing.stack.xl,
1071
+ // Layout spacing - components
1072
+ "--layout-component-xs": layoutSpacing.component.xs,
1073
+ "--layout-component-sm": layoutSpacing.component.sm,
1074
+ "--layout-component-md": layoutSpacing.component.md,
1075
+ "--layout-component-lg": layoutSpacing.component.lg,
1076
+ "--layout-component-xl": layoutSpacing.component.xl
1077
+ };
1078
+
1079
+ // src/FOUNDATION/tokens/typography.ts
1080
+ var fontFamily = {
1081
+ // Primary font - Inter (default sans)
1082
+ sans: [
1083
+ "Inter",
1084
+ "ui-sans-serif",
1085
+ "system-ui",
1086
+ "-apple-system",
1087
+ "BlinkMacSystemFont",
1088
+ "Segoe UI",
1089
+ "Roboto",
1090
+ "Helvetica Neue",
1091
+ "Arial",
1092
+ "Noto Sans",
1093
+ "sans-serif",
1094
+ "Apple Color Emoji",
1095
+ "Segoe UI Emoji",
1096
+ "Segoe UI Symbol",
1097
+ "Noto Color Emoji"
1098
+ ],
1099
+ // Optional font - Satoshi
1100
+ satoshi: [
1101
+ "Satoshi",
1102
+ "Inter",
1103
+ "ui-sans-serif",
1104
+ "system-ui",
1105
+ "-apple-system",
1106
+ "BlinkMacSystemFont",
1107
+ "Segoe UI",
1108
+ "Roboto",
1109
+ "sans-serif"
1110
+ ],
1111
+ // Display font - Clash Display (for headings and hero sections)
1112
+ display: [
1113
+ "Clash Display",
1114
+ "Inter",
1115
+ "ui-sans-serif",
1116
+ "system-ui",
1117
+ "-apple-system",
1118
+ "BlinkMacSystemFont",
1119
+ "Segoe UI",
1120
+ "Roboto",
1121
+ "sans-serif"
1122
+ ],
1123
+ // Serif font family
1124
+ serif: ["ui-serif", "Georgia", "Cambria", "Times New Roman", "Times", "serif"],
1125
+ // Monospace font family
1126
+ mono: [
1127
+ "ui-monospace",
1128
+ "SFMono-Regular",
1129
+ "Menlo",
1130
+ "Monaco",
1131
+ "Consolas",
1132
+ "Liberation Mono",
1133
+ "Courier New",
1134
+ "monospace"
1135
+ ]
1136
+ };
1137
+ var fontSize = {
1138
+ // text-xs: 12px base, scales from 0.75rem to 0.875rem
1139
+ xs: [
1140
+ "clamp(0.75rem, 0.7rem + 0.125vw, 0.875rem)",
1141
+ { lineHeight: "1rem", letterSpacing: "0.05em" }
1142
+ ],
1143
+ // text-sm: 14px base, scales from 0.875rem to 1rem
1144
+ sm: [
1145
+ "clamp(0.875rem, 0.8rem + 0.25vw, 1rem)",
1146
+ { lineHeight: "1.25rem", letterSpacing: "0.025em" }
1147
+ ],
1148
+ // text-base: 16px base, scales from 1rem to 1.125rem
1149
+ base: ["clamp(1rem, 0.95rem + 0.25vw, 1.125rem)", { lineHeight: "1.5rem", letterSpacing: "0em" }],
1150
+ // text-lg: 18px base, scales from 1.125rem to 1.25rem
1151
+ lg: [
1152
+ "clamp(1.125rem, 1rem + 0.5vw, 1.25rem)",
1153
+ { lineHeight: "1.75rem", letterSpacing: "-0.025em" }
1154
+ ],
1155
+ // text-xl: 20px base, scales from 1.25rem to 1.5rem
1156
+ xl: [
1157
+ "clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem)",
1158
+ { lineHeight: "1.75rem", letterSpacing: "-0.025em" }
1159
+ ],
1160
+ // text-2xl: 24px base, scales from 1.5rem to 2rem
1161
+ "2xl": [
1162
+ "clamp(1.5rem, 1.25rem + 1.25vw, 2rem)",
1163
+ { lineHeight: "2rem", letterSpacing: "-0.05em" }
1164
+ ],
1165
+ // text-3xl: 30px base, scales from 1.875rem to 2.5rem
1166
+ "3xl": [
1167
+ "clamp(1.875rem, 1.5rem + 1.875vw, 2.5rem)",
1168
+ { lineHeight: "2.25rem", letterSpacing: "-0.05em" }
1169
+ ],
1170
+ // text-4xl: 36px base, scales from 2.25rem to 3rem
1171
+ "4xl": [
1172
+ "clamp(2.25rem, 1.75rem + 2.5vw, 3rem)",
1173
+ { lineHeight: "2.5rem", letterSpacing: "-0.025em" }
1174
+ ],
1175
+ // text-5xl: 48px base, scales from 3rem to 4rem
1176
+ "5xl": ["clamp(3rem, 2rem + 5vw, 4rem)", { lineHeight: "1", letterSpacing: "-0.025em" }],
1177
+ // text-6xl: 60px base, scales from 3.75rem to 5rem
1178
+ "6xl": ["clamp(3.75rem, 2.5rem + 6.25vw, 5rem)", { lineHeight: "1", letterSpacing: "-0.05em" }],
1179
+ // text-7xl: 72px base (optional, for hero sections)
1180
+ "7xl": ["clamp(4.5rem, 3rem + 7.5vw, 6rem)", { lineHeight: "1", letterSpacing: "-0.05em" }],
1181
+ // text-8xl: 96px base (optional, for hero sections)
1182
+ "8xl": ["clamp(6rem, 4rem + 10vw, 8rem)", { lineHeight: "1", letterSpacing: "-0.05em" }],
1183
+ // text-9xl: 128px base (optional, for hero sections)
1184
+ "9xl": ["clamp(8rem, 5rem + 15vw, 12rem)", { lineHeight: "1", letterSpacing: "-0.05em" }]
1185
+ };
1186
+ var fontWeight = {
1187
+ thin: "100",
1188
+ extralight: "200",
1189
+ light: "300",
1190
+ normal: "400",
1191
+ medium: "500",
1192
+ semibold: "600",
1193
+ bold: "700",
1194
+ extrabold: "800",
1195
+ black: "900"
1196
+ };
1197
+ var lineHeight = {
1198
+ none: "1",
1199
+ tight: "1.25",
1200
+ snug: "1.375",
1201
+ normal: "1.5",
1202
+ relaxed: "1.625",
1203
+ loose: "2"
1204
+ };
1205
+ var letterSpacing = {
1206
+ tighter: "-0.05em",
1207
+ tight: "-0.025em",
1208
+ normal: "0em",
1209
+ wide: "0.025em",
1210
+ wider: "0.05em",
1211
+ widest: "0.1em"
1212
+ };
1213
+ var typographyCSSVariables = {
1214
+ // Font families
1215
+ "--font-sans": fontFamily.sans.join(", "),
1216
+ "--font-satoshi": fontFamily.satoshi.join(", "),
1217
+ "--font-display": fontFamily.display.join(", "),
1218
+ "--font-serif": fontFamily.serif.join(", "),
1219
+ "--font-mono": fontFamily.mono.join(", "),
1220
+ // Font sizes (using clamp values)
1221
+ "--font-size-xs": fontSize.xs[0],
1222
+ "--font-size-sm": fontSize.sm[0],
1223
+ "--font-size-base": fontSize.base[0],
1224
+ "--font-size-lg": fontSize.lg[0],
1225
+ "--font-size-xl": fontSize.xl[0],
1226
+ "--font-size-2xl": fontSize["2xl"][0],
1227
+ "--font-size-3xl": fontSize["3xl"][0],
1228
+ "--font-size-4xl": fontSize["4xl"][0],
1229
+ "--font-size-5xl": fontSize["5xl"][0],
1230
+ "--font-size-6xl": fontSize["6xl"][0],
1231
+ // Font weights
1232
+ "--font-weight-thin": fontWeight.thin,
1233
+ "--font-weight-extralight": fontWeight.extralight,
1234
+ "--font-weight-light": fontWeight.light,
1235
+ "--font-weight-normal": fontWeight.normal,
1236
+ "--font-weight-medium": fontWeight.medium,
1237
+ "--font-weight-semibold": fontWeight.semibold,
1238
+ "--font-weight-bold": fontWeight.bold,
1239
+ "--font-weight-extrabold": fontWeight.extrabold,
1240
+ "--font-weight-black": fontWeight.black,
1241
+ // Line heights
1242
+ "--line-height-none": lineHeight.none,
1243
+ "--line-height-tight": lineHeight.tight,
1244
+ "--line-height-snug": lineHeight.snug,
1245
+ "--line-height-normal": lineHeight.normal,
1246
+ "--line-height-relaxed": lineHeight.relaxed,
1247
+ "--line-height-loose": lineHeight.loose,
1248
+ // Letter spacing
1249
+ "--letter-spacing-tighter": letterSpacing.tighter,
1250
+ "--letter-spacing-tight": letterSpacing.tight,
1251
+ "--letter-spacing-normal": letterSpacing.normal,
1252
+ "--letter-spacing-wide": letterSpacing.wide,
1253
+ "--letter-spacing-wider": letterSpacing.wider,
1254
+ "--letter-spacing-widest": letterSpacing.widest
1255
+ };
1256
+ ({
1257
+ // Display styles (for hero sections)
1258
+ display: {
1259
+ fontSize: fontSize["6xl"][0]},
1260
+ // Heading styles
1261
+ h1: {
1262
+ fontSize: fontSize["5xl"][0]},
1263
+ h2: {
1264
+ fontSize: fontSize["4xl"][0]},
1265
+ h3: {
1266
+ fontSize: fontSize["3xl"][0]},
1267
+ h4: {
1268
+ fontSize: fontSize["2xl"][0]},
1269
+ h5: {
1270
+ fontSize: fontSize.xl[0]},
1271
+ h6: {
1272
+ fontSize: fontSize.lg[0]},
1273
+ // Body text styles
1274
+ body: {
1275
+ fontSize: fontSize.base[0]},
1276
+ "body-sm": {
1277
+ fontSize: fontSize.sm[0]},
1278
+ "body-xs": {
1279
+ fontSize: fontSize.xs[0]},
1280
+ // Label styles
1281
+ label: {
1282
+ fontSize: fontSize.sm[0]},
1283
+ "label-sm": {
1284
+ fontSize: fontSize.xs[0]},
1285
+ // Caption styles
1286
+ caption: {
1287
+ fontSize: fontSize.xs[0]}
1288
+ });
1289
+ ({
1290
+ fontSize: {
1291
+ xs: [
1292
+ fontSize.xs[0],
1293
+ { lineHeight: fontSize.xs[1].lineHeight, letterSpacing: fontSize.xs[1].letterSpacing }
1294
+ ],
1295
+ sm: [
1296
+ fontSize.sm[0],
1297
+ { lineHeight: fontSize.sm[1].lineHeight, letterSpacing: fontSize.sm[1].letterSpacing }
1298
+ ],
1299
+ md: [
1300
+ fontSize.base[0],
1301
+ { lineHeight: fontSize.base[1].lineHeight, letterSpacing: fontSize.base[1].letterSpacing }
1302
+ ],
1303
+ base: [
1304
+ fontSize.base[0],
1305
+ { lineHeight: fontSize.base[1].lineHeight, letterSpacing: fontSize.base[1].letterSpacing }
1306
+ ],
1307
+ lg: [
1308
+ fontSize.lg[0],
1309
+ { lineHeight: fontSize.lg[1].lineHeight, letterSpacing: fontSize.lg[1].letterSpacing }
1310
+ ],
1311
+ xl: [
1312
+ fontSize.xl[0],
1313
+ { lineHeight: fontSize.xl[1].lineHeight, letterSpacing: fontSize.xl[1].letterSpacing }
1314
+ ],
1315
+ "2xl": [
1316
+ fontSize["2xl"][0],
1317
+ {
1318
+ lineHeight: fontSize["2xl"][1].lineHeight,
1319
+ letterSpacing: fontSize["2xl"][1].letterSpacing
1320
+ }
1321
+ ],
1322
+ "3xl": [
1323
+ fontSize["3xl"][0],
1324
+ {
1325
+ lineHeight: fontSize["3xl"][1].lineHeight,
1326
+ letterSpacing: fontSize["3xl"][1].letterSpacing
1327
+ }
1328
+ ],
1329
+ "4xl": [
1330
+ fontSize["4xl"][0],
1331
+ {
1332
+ lineHeight: fontSize["4xl"][1].lineHeight,
1333
+ letterSpacing: fontSize["4xl"][1].letterSpacing
1334
+ }
1335
+ ],
1336
+ "5xl": [
1337
+ fontSize["5xl"][0],
1338
+ {
1339
+ lineHeight: fontSize["5xl"][1].lineHeight,
1340
+ letterSpacing: fontSize["5xl"][1].letterSpacing
1341
+ }
1342
+ ],
1343
+ "6xl": [
1344
+ fontSize["6xl"][0],
1345
+ {
1346
+ lineHeight: fontSize["6xl"][1].lineHeight,
1347
+ letterSpacing: fontSize["6xl"][1].letterSpacing
1348
+ }
1349
+ ],
1350
+ "7xl": [
1351
+ fontSize["7xl"][0],
1352
+ {
1353
+ lineHeight: fontSize["7xl"][1].lineHeight,
1354
+ letterSpacing: fontSize["7xl"][1].letterSpacing
1355
+ }
1356
+ ],
1357
+ "8xl": [
1358
+ fontSize["8xl"][0],
1359
+ {
1360
+ lineHeight: fontSize["8xl"][1].lineHeight,
1361
+ letterSpacing: fontSize["8xl"][1].letterSpacing
1362
+ }
1363
+ ],
1364
+ "9xl": [
1365
+ fontSize["9xl"][0],
1366
+ {
1367
+ lineHeight: fontSize["9xl"][1].lineHeight,
1368
+ letterSpacing: fontSize["9xl"][1].letterSpacing
1369
+ }
1370
+ ]
1371
+ }});
1372
+
118
1373
  // src/themes/minimal.ts
119
1374
  var minimalBrand = {
120
1375
  id: "minimal",
@@ -1122,19 +2377,19 @@ function applyBrandOverrides(brand, mode) {
1122
2377
  });
1123
2378
  }
1124
2379
  if (overrides.radius.componentRadius) {
1125
- const { componentRadius } = overrides.radius;
1126
- if (componentRadius.button) {
1127
- Object.entries(componentRadius.button).forEach(([key, value]) => {
2380
+ const { componentRadius: componentRadius2 } = overrides.radius;
2381
+ if (componentRadius2.button) {
2382
+ Object.entries(componentRadius2.button).forEach(([key, value]) => {
1128
2383
  root.style.setProperty(`--brand-${namespace}-radius-button-${key}`, value);
1129
2384
  });
1130
2385
  }
1131
- if (componentRadius.card) {
1132
- Object.entries(componentRadius.card).forEach(([key, value]) => {
2386
+ if (componentRadius2.card) {
2387
+ Object.entries(componentRadius2.card).forEach(([key, value]) => {
1133
2388
  root.style.setProperty(`--brand-${namespace}-radius-card-${key}`, value);
1134
2389
  });
1135
2390
  }
1136
- if (componentRadius.input) {
1137
- Object.entries(componentRadius.input).forEach(([key, value]) => {
2391
+ if (componentRadius2.input) {
2392
+ Object.entries(componentRadius2.input).forEach(([key, value]) => {
1138
2393
  root.style.setProperty(`--brand-${namespace}-radius-input-${key}`, value);
1139
2394
  });
1140
2395
  }
@@ -1148,541 +2403,275 @@ function removeBrandOverrides(namespace) {
1148
2403
  if (typeof document === "undefined") return;
1149
2404
  const root = document.documentElement;
1150
2405
  const { style } = root;
1151
- const propsToRemove = [];
1152
- for (let i = 0; i < style.length; i++) {
1153
- const prop = style.item(i);
1154
- if (prop && prop.startsWith(`--brand-${namespace}-`)) {
1155
- propsToRemove.push(prop);
1156
- }
1157
- }
1158
- propsToRemove.forEach((prop) => {
1159
- style.removeProperty(prop);
1160
- });
1161
- root.removeAttribute("data-brand");
1162
- root.removeAttribute("data-brand-namespace");
1163
- if (activeNamespace === namespace) {
1164
- clearActiveBrand();
1165
- }
1166
- }
1167
-
1168
- // src/themes/index.ts
1169
- var themes = {
1170
- default: () => Promise.resolve().then(() => (init_default(), default_exports)).then((m) => m.defaultTheme),
1171
- dark: () => Promise.resolve().then(() => (init_dark(), dark_exports)).then((m) => m.darkTheme),
1172
- brand: () => Promise.resolve().then(() => (init_brand(), brand_exports)).then((m) => m.brandTheme)
1173
- };
1174
- async function getTheme(name) {
1175
- const themeLoader = themes[name];
1176
- if (!themeLoader) {
1177
- throw new Error(`Theme "${name}" not found`);
1178
- }
1179
- return await themeLoader();
1180
- }
1181
-
1182
- // src/tokens/colors.ts
1183
- var primaryColors = {
1184
- 50: "210 40% 98%",
1185
- // Lightest blue
1186
- 100: "210 40% 96%",
1187
- 200: "217 32.6% 17.5%",
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%",
1196
- 950: "222 84% 4.9%"
1197
- // Darkest blue
1198
- };
1199
- var accentColors = {
1200
- 50: "280 100% 98%",
1201
- 100: "280 65% 96%",
1202
- 200: "280 60% 85%",
1203
- 300: "280 55% 75%",
1204
- 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%",
1211
- 950: "259 45% 30%"
1212
- };
1213
- var secondaryColors = {
1214
- 50: "173 100% 98%",
1215
- 100: "173 100% 95%",
1216
- 200: "173 100% 85%",
1217
- 300: "173 100% 70%",
1218
- 400: "173 100% 55%",
1219
- 500: "173 100% 37%",
1220
- // Base secondary (Tenerife #00bfa6)
1221
- 600: "173 100% 32%",
1222
- 700: "173 95% 27%",
1223
- 800: "173 90% 22%",
1224
- 900: "173 85% 17%",
1225
- 950: "173 80% 12%"
1226
- };
1227
- var surfaceColors = {
1228
- day: {
1229
- base: "0 0% 100%",
1230
- // White background
1231
- elevated1: "0 0% 98%",
1232
- // Slightly elevated
1233
- elevated2: "0 0% 96%",
1234
- // More elevated
1235
- elevated3: "0 0% 94%",
1236
- // Most elevated
1237
- overlay: "0 0% 0% / 0.5",
1238
- // Overlay backdrop
1239
- glass: "0 0% 100% / 0.8"
1240
- // Glass effect
1241
- },
1242
- night: {
1243
- base: "240 10% 3.9%",
1244
- // Dark background (#0b0b10)
1245
- elevated1: "240 10% 5.1%",
1246
- // #0e1016
1247
- elevated2: "240 10% 6.3%",
1248
- // Slightly lighter
1249
- elevated3: "240 10% 7.5%",
1250
- // Even lighter
1251
- overlay: "0 0% 0% / 0.7",
1252
- // Darker overlay
1253
- glass: "240 10% 10% / 0.9"
1254
- // Dark glass effect
1255
- }
1256
- };
1257
- var semanticColors = {
1258
- day: {
1259
- success: "142 70% 28%",
1260
- // Darker green for better contrast
1261
- successForeground: "0 0% 100%",
1262
- error: "0 80% 40%",
1263
- // Richer red for contrast
1264
- errorForeground: "0 0% 100%",
1265
- warning: "38 92% 50%",
1266
- // Orange
1267
- warningForeground: "0 0% 9%",
1268
- info: "199 89% 48%",
1269
- // Blue
1270
- infoForeground: "0 0% 100%"
1271
- },
1272
- night: {
1273
- success: "142 70% 45%",
1274
- successForeground: "0 0% 100%",
1275
- error: "0 62.8% 30.6%",
1276
- // Darker red
1277
- errorForeground: "0 0% 98%",
1278
- warning: "38 92% 33%",
1279
- // Darker orange for WCAG AA contrast with white text
1280
- warningForeground: "0 0% 100%",
1281
- // Light foreground for dark theme readability
1282
- info: "199 89% 35%",
1283
- // Darker blue for WCAG AA contrast with white text
1284
- infoForeground: "0 0% 100%"
1285
- // Light foreground for dark theme readability
1286
- }
1287
- };
1288
- var chartColors = {
1289
- day: {
1290
- chart1: "12 76% 61%",
1291
- // Orange-red
1292
- chart2: "173 58% 39%",
1293
- // Teal-cyan
1294
- chart3: "197 37% 24%",
1295
- // Dark blue
1296
- chart4: "43 74% 66%",
1297
- // Yellow
1298
- chart5: "27 87% 67%"
1299
- // Orange
1300
- },
1301
- night: {
1302
- chart1: "220 70% 50%",
1303
- // Blue
1304
- chart2: "160 60% 45%",
1305
- // Teal
1306
- chart3: "30 80% 55%",
1307
- // Orange
1308
- chart4: "280 65% 60%",
1309
- // Purple
1310
- chart5: "340 75% 55%"
1311
- // Pink
1312
- }
1313
- };
1314
- var textColors = {
1315
- day: {
1316
- primary: "0 0% 9%",
1317
- // Almost black
1318
- secondary: "0 0% 45%",
1319
- // Medium gray
1320
- tertiary: "0 0% 65%",
1321
- // Light gray
1322
- muted: "0 0% 38%",
1323
- // Muted gray with stronger contrast
1324
- inverse: "0 0% 100%"
1325
- // White (for dark backgrounds)
1326
- },
1327
- night: {
1328
- primary: "0 0% 89.8%",
1329
- // Light gray (#e5e7eb)
1330
- secondary: "240 5% 64.9%",
1331
- // Medium gray
1332
- tertiary: "240 5% 50%",
1333
- // Darker gray
1334
- muted: "240 5% 64.9%",
1335
- // Muted gray
1336
- inverse: "0 0% 9%"
1337
- // Almost black (for light backgrounds)
2406
+ const propsToRemove = [];
2407
+ for (let i = 0; i < style.length; i++) {
2408
+ const prop = style.item(i);
2409
+ if (prop && prop.startsWith(`--brand-${namespace}-`)) {
2410
+ propsToRemove.push(prop);
2411
+ }
1338
2412
  }
1339
- };
1340
- var baseColors = {
1341
- day: {
1342
- background: "0 0% 100%",
1343
- foreground: "0 0% 9%",
1344
- card: "0 0% 100%",
1345
- cardForeground: "0 0% 9%",
1346
- popover: "0 0% 100%",
1347
- popoverForeground: "0 0% 9%",
1348
- border: "0 0% 89.8%",
1349
- input: "0 0% 89.8%",
1350
- ring: "0 0% 3.9%"
1351
- },
1352
- night: {
1353
- background: "240 10% 3.9%",
1354
- // #0b0b10
1355
- foreground: "0 0% 89.8%",
1356
- // #e5e7eb
1357
- card: "240 10% 3.9%",
1358
- cardForeground: "0 0% 89.8%",
1359
- popover: "240 10% 5.1%",
1360
- // #0e1016
1361
- popoverForeground: "0 0% 89.8%",
1362
- border: "240 3.7% 15.9%",
1363
- input: "240 3.7% 15.9%",
1364
- ring: "240 4.9% 83.9%"
2413
+ propsToRemove.forEach((prop) => {
2414
+ style.removeProperty(prop);
2415
+ });
2416
+ root.removeAttribute("data-brand");
2417
+ root.removeAttribute("data-brand-namespace");
2418
+ if (activeNamespace === namespace) {
2419
+ clearActiveBrand();
1365
2420
  }
2421
+ }
2422
+
2423
+ // src/themes/index.ts
2424
+ var themes = {
2425
+ default: () => Promise.resolve().then(() => (init_default(), default_exports)).then((m) => m.defaultTheme),
2426
+ dark: () => Promise.resolve().then(() => (init_dark(), dark_exports)).then((m) => m.darkTheme),
2427
+ brand: () => Promise.resolve().then(() => (init_brand(), brand_exports)).then((m) => m.brandTheme)
1366
2428
  };
1367
- var cssVariableColorTokens = {
1368
- day: {
1369
- ...baseColors.day,
1370
- primary: "hsl(var(--tm-primary))",
1371
- primaryForeground: "hsl(var(--tm-primary-foreground))",
1372
- secondary: "hsl(var(--tm-secondary))",
1373
- secondaryForeground: "hsl(var(--tm-secondary-foreground))",
1374
- muted: "hsl(var(--muted))",
1375
- mutedForeground: "hsl(var(--muted-foreground))",
1376
- accent: "hsl(var(--tm-accent))",
1377
- accentForeground: "hsl(var(--tm-accent-foreground))",
1378
- destructive: `hsl(${semanticColors.day.error})`,
1379
- destructiveForeground: semanticColors.day.errorForeground,
1380
- chart1: `hsl(${chartColors.day.chart1})`,
1381
- chart2: `hsl(${chartColors.day.chart2})`,
1382
- chart3: `hsl(${chartColors.day.chart3})`,
1383
- chart4: `hsl(${chartColors.day.chart4})`,
1384
- chart5: `hsl(${chartColors.day.chart5})`
1385
- },
1386
- night: {
1387
- ...baseColors.night,
1388
- primary: "hsl(var(--tm-primary))",
1389
- primaryForeground: "hsl(var(--tm-primary-foreground))",
1390
- secondary: "hsl(var(--tm-secondary))",
1391
- secondaryForeground: "hsl(var(--tm-secondary-foreground))",
1392
- muted: "hsl(var(--muted))",
1393
- mutedForeground: "hsl(var(--muted-foreground))",
1394
- accent: "hsl(var(--tm-accent))",
1395
- accentForeground: "hsl(var(--tm-accent-foreground))",
1396
- destructive: `hsl(${semanticColors.night.error})`,
1397
- destructiveForeground: semanticColors.night.errorForeground,
1398
- chart1: `hsl(${chartColors.night.chart1})`,
1399
- chart2: `hsl(${chartColors.night.chart2})`,
1400
- chart3: `hsl(${chartColors.night.chart3})`,
1401
- chart4: `hsl(${chartColors.night.chart4})`,
1402
- chart5: `hsl(${chartColors.night.chart5})`
2429
+ async function getTheme(name) {
2430
+ const themeLoader = themes[name];
2431
+ if (!themeLoader) {
2432
+ throw new Error(`Theme "${name}" not found`);
1403
2433
  }
1404
- };
1405
- ({
1406
- // Primary scale
1407
- "--primary-50": primaryColors[50],
1408
- "--primary-100": primaryColors[100],
1409
- "--primary-200": primaryColors[200],
1410
- "--primary-300": primaryColors[300],
1411
- "--primary-400": primaryColors[400],
1412
- "--primary-500": primaryColors[500],
1413
- "--primary-600": primaryColors[600],
1414
- "--primary-700": primaryColors[700],
1415
- "--primary-800": primaryColors[800],
1416
- "--primary-900": primaryColors[900],
1417
- "--primary-950": primaryColors[950],
1418
- // Accent scale
1419
- "--accent-50": accentColors[50],
1420
- "--accent-100": accentColors[100],
1421
- "--accent-200": accentColors[200],
1422
- "--accent-300": accentColors[300],
1423
- "--accent-400": accentColors[400],
1424
- "--accent-500": accentColors[500],
1425
- "--accent-600": accentColors[600],
1426
- "--accent-700": accentColors[700],
1427
- "--accent-800": accentColors[800],
1428
- "--accent-900": accentColors[900],
1429
- "--accent-950": accentColors[950],
1430
- // Secondary scale
1431
- "--secondary-50": secondaryColors[50],
1432
- "--secondary-100": secondaryColors[100],
1433
- "--secondary-200": secondaryColors[200],
1434
- "--secondary-300": secondaryColors[300],
1435
- "--secondary-400": secondaryColors[400],
1436
- "--secondary-500": secondaryColors[500],
1437
- "--secondary-600": secondaryColors[600],
1438
- "--secondary-700": secondaryColors[700],
1439
- "--secondary-800": secondaryColors[800],
1440
- "--secondary-900": secondaryColors[900],
1441
- "--secondary-950": secondaryColors[950]
1442
- // Surface colors (mode-dependent, set dynamically by theme system)
1443
- // Note: These are set via updateCSSVariablesFromTokens() in applyMode.ts
1444
- // Semantic colors (mode-dependent, set dynamically by theme system)
1445
- // Note: These are set via updateCSSVariablesFromTokens() in applyMode.ts
1446
- // Text colors (mode-dependent, set dynamically by theme system)
1447
- // Note: These are set via updateCSSVariablesFromTokens() in applyMode.ts
1448
- // Chart colors (mode-dependent, set dynamically by theme system)
1449
- // Note: These are set via updateCSSVariablesFromTokens() in applyMode.ts
1450
- });
1451
- var tailwindThemeColors = {
1452
- // Base colors
1453
- background: "hsl(var(--background))",
1454
- foreground: "hsl(var(--foreground))",
1455
- // Card colors
1456
- card: {
1457
- DEFAULT: "hsl(var(--card))",
1458
- foreground: "hsl(var(--card-foreground))"
1459
- },
1460
- // Popover colors
1461
- popover: {
1462
- DEFAULT: "hsl(var(--popover))",
1463
- foreground: "hsl(var(--popover-foreground))"
1464
- },
1465
- // Primary colors (using CSS variables)
1466
- primary: {
1467
- DEFAULT: "hsl(var(--tm-primary))",
1468
- foreground: "hsl(var(--tm-primary-foreground))",
1469
- 50: `hsl(var(--primary-50))`,
1470
- 100: `hsl(var(--primary-100))`,
1471
- 200: `hsl(var(--primary-200))`,
1472
- 300: `hsl(var(--primary-300))`,
1473
- 400: `hsl(var(--primary-400))`,
1474
- 500: `hsl(var(--primary-500))`,
1475
- 600: `hsl(var(--primary-600))`,
1476
- 700: `hsl(var(--primary-700))`,
1477
- 800: `hsl(var(--primary-800))`,
1478
- 900: `hsl(var(--primary-900))`,
1479
- 950: `hsl(var(--primary-950))`
1480
- },
1481
- // Secondary colors
1482
- secondary: {
1483
- DEFAULT: "hsl(var(--tm-secondary))",
1484
- foreground: "hsl(var(--tm-secondary-foreground))",
1485
- 50: `hsl(var(--secondary-50))`,
1486
- 100: `hsl(var(--secondary-100))`,
1487
- 200: `hsl(var(--secondary-200))`,
1488
- 300: `hsl(var(--secondary-300))`,
1489
- 400: `hsl(var(--secondary-400))`,
1490
- 500: `hsl(var(--secondary-500))`,
1491
- 600: `hsl(var(--secondary-600))`,
1492
- 700: `hsl(var(--secondary-700))`,
1493
- 800: `hsl(var(--secondary-800))`,
1494
- 900: `hsl(var(--secondary-900))`,
1495
- 950: `hsl(var(--secondary-950))`
1496
- },
1497
- // Accent colors
1498
- accent: {
1499
- DEFAULT: "hsl(var(--tm-accent))",
1500
- foreground: "hsl(var(--tm-accent-foreground))",
1501
- 50: `hsl(var(--accent-50))`,
1502
- 100: `hsl(var(--accent-100))`,
1503
- 200: `hsl(var(--accent-200))`,
1504
- 300: `hsl(var(--accent-300))`,
1505
- 400: `hsl(var(--accent-400))`,
1506
- 500: `hsl(var(--accent-500))`,
1507
- 600: `hsl(var(--accent-600))`,
1508
- 700: `hsl(var(--accent-700))`,
1509
- 800: `hsl(var(--accent-800))`,
1510
- 900: `hsl(var(--accent-900))`,
1511
- 950: `hsl(var(--accent-950))`
1512
- },
1513
- // Muted colors
1514
- muted: {
1515
- DEFAULT: "hsl(var(--muted))",
1516
- foreground: "hsl(var(--muted-foreground))"
1517
- },
1518
- // Destructive colors (semantic error)
1519
- destructive: {
1520
- DEFAULT: "hsl(var(--destructive))",
1521
- foreground: "hsl(var(--destructive-foreground))"
1522
- },
1523
- // Semantic colors
1524
- success: {
1525
- DEFAULT: `hsl(var(--semantic-success))`,
1526
- foreground: `hsl(var(--semantic-success-foreground))`
1527
- },
1528
- error: {
1529
- DEFAULT: `hsl(var(--semantic-error))`,
1530
- foreground: `hsl(var(--semantic-error-foreground))`
1531
- },
1532
- warning: {
1533
- DEFAULT: `hsl(var(--semantic-warning))`,
1534
- foreground: `hsl(var(--semantic-warning-foreground))`
1535
- },
1536
- info: {
1537
- DEFAULT: `hsl(var(--semantic-info))`,
1538
- foreground: `hsl(var(--semantic-info-foreground))`
1539
- },
1540
- // Surface colors
1541
- surface: {
1542
- base: `hsl(var(--surface-base))`,
1543
- elevated1: `hsl(var(--surface-elevated1))`,
1544
- elevated2: `hsl(var(--surface-elevated2))`,
1545
- elevated3: `hsl(var(--surface-elevated3))`,
1546
- overlay: `hsl(var(--surface-overlay))`,
1547
- glass: `hsl(var(--surface-glass))`
1548
- },
1549
- // Text colors
1550
- text: {
1551
- primary: `hsl(var(--text-primary))`,
1552
- secondary: `hsl(var(--text-secondary))`,
1553
- tertiary: `hsl(var(--text-tertiary))`,
1554
- muted: `hsl(var(--text-muted))`,
1555
- destructive: `hsl(var(--destructive))`,
1556
- accent: `hsl(var(--tm-accent))`,
1557
- inverse: `hsl(var(--text-inverse))`
1558
- },
1559
- // Border and input
1560
- border: "hsl(var(--border))",
1561
- input: "hsl(var(--input))",
1562
- ring: "hsl(var(--ring))",
1563
- // Chart colors (using CSS variables)
1564
- chart: {
1565
- 1: `hsl(var(--chart-1))`,
1566
- 2: `hsl(var(--chart-2))`,
1567
- 3: `hsl(var(--chart-3))`,
1568
- 4: `hsl(var(--chart-4))`,
1569
- 5: `hsl(var(--chart-5))`
2434
+ return await themeLoader();
2435
+ }
2436
+
2437
+ // src/FOUNDATION/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
+ }
1570
2469
  }
1571
- };
2470
+ return variables;
2471
+ }
1572
2472
 
1573
- // src/tokens/motion.ts
1574
- var durations = {
1575
- instant: "0ms",
1576
- fast: "150ms",
1577
- // 1.5 × base (quick interactions)
1578
- normal: "300ms",
1579
- // 3 × base (default)
1580
- slow: "500ms",
1581
- // 5 × base (emphasized)
1582
- slower: "700ms",
1583
- // 7 × base (very emphasized)
1584
- slowest: "1000ms",
1585
- // 10 × base (maximum emphasis)
1586
- // Additional granular durations
1587
- "75": "75ms",
1588
- // Ultra-fast
1589
- "100": "100ms",
1590
- // Base unit
1591
- "200": "200ms",
1592
- // Fast-normal
1593
- "250": "250ms",
1594
- // Between fast and normal
1595
- "400": "400ms",
1596
- // Between normal and slow
1597
- "600": "600ms",
1598
- // Between slow and slower
1599
- "800": "800ms"
1600
- // Between slower and slowest
1601
- };
1602
- var easings = {
1603
- // Linear (no easing)
1604
- linear: "linear",
1605
- // Ease-in (accelerate) - cubic-bezier
1606
- "ease-in": "cubic-bezier(0.4, 0, 1, 1)",
1607
- // Ease-out (decelerate) - recommended for most UI - cubic-bezier
1608
- "ease-out": "cubic-bezier(0, 0, 0.2, 1)",
1609
- // Ease-in-out (accelerate and decelerate)
1610
- "ease-in-out": "cubic-bezier(0.4, 0, 0.2, 1)",
1611
- // Advanced easing functions
1612
- bounce: "cubic-bezier(0.68, -0.55, 0.265, 1.55)",
1613
- elastic: "cubic-bezier(0.175, 0.885, 0.32, 1.275)",
1614
- // Material Design easing
1615
- "ease-out-cubic": "cubic-bezier(0.215, 0.61, 0.355, 1)",
1616
- "ease-in-cubic": "cubic-bezier(0.55, 0.055, 0.675, 0.19)",
1617
- "ease-in-out-cubic": "cubic-bezier(0.645, 0.045, 0.355, 1)"
1618
- };
1619
- var transitions = {
1620
- // Fast transitions (quick interactions)
1621
- fast: `${durations.fast} ${easings["ease-out"]}`,
1622
- "fast-in": `${durations.fast} ${easings["ease-in"]}`,
1623
- "fast-out": `${durations.fast} ${easings["ease-out"]}`,
1624
- "fast-in-out": `${durations.fast} ${easings["ease-in-out"]}`,
1625
- // Normal transitions (default)
1626
- normal: `${durations.normal} ${easings["ease-in-out"]}`,
1627
- "normal-in": `${durations.normal} ${easings["ease-in"]}`,
1628
- "normal-out": `${durations.normal} ${easings["ease-out"]}`,
1629
- "normal-in-out": `${durations.normal} ${easings["ease-in-out"]}`,
1630
- // Slow transitions (emphasized)
1631
- slow: `${durations.slow} ${easings["ease-in-out"]}`,
1632
- "slow-in": `${durations.slow} ${easings["ease-in"]}`,
1633
- "slow-out": `${durations.slow} ${easings["ease-out"]}`,
1634
- "slow-in-out": `${durations.slow} ${easings["ease-in-out"]}`,
1635
- // Special transitions
1636
- bounce: `${durations.normal} ${easings.bounce}`,
1637
- elastic: `${durations.slow} ${easings.elastic}`,
1638
- // Default (normal)
1639
- DEFAULT: `${durations.normal} ${easings["ease-in-out"]}`
1640
- };
1641
- var motionCSSVariables = {
1642
- // Durations
1643
- "--duration-instant": durations.instant,
1644
- "--duration-fast": durations.fast,
1645
- "--duration-normal": durations.normal,
1646
- "--duration-slow": durations.slow,
1647
- "--duration-slower": durations.slower,
1648
- "--duration-slowest": durations.slowest,
1649
- // Additional granular durations
1650
- "--duration-75": durations["75"],
1651
- "--duration-100": durations["100"],
1652
- "--duration-200": durations["200"],
1653
- "--duration-250": durations["250"],
1654
- "--duration-400": durations["400"],
1655
- "--duration-600": durations["600"],
1656
- "--duration-800": durations["800"],
1657
- // Easings
1658
- "--ease-linear": easings.linear,
1659
- "--ease-in": easings["ease-in"],
1660
- "--ease-out": easings["ease-out"],
1661
- "--ease-in-out": easings["ease-in-out"],
1662
- "--ease-bounce": easings.bounce,
1663
- "--ease-elastic": easings.elastic,
1664
- "--ease-out-cubic": easings["ease-out-cubic"],
1665
- "--ease-in-cubic": easings["ease-in-cubic"],
1666
- "--ease-in-out-cubic": easings["ease-in-out-cubic"],
1667
- // Transitions
1668
- "--transition-fast": transitions.fast,
1669
- "--transition-normal": transitions.normal,
1670
- "--transition-slow": transitions.slow,
1671
- "--transition-default": transitions.DEFAULT,
1672
- "--transition-fast-in": transitions["fast-in"],
1673
- "--transition-fast-out": transitions["fast-out"],
1674
- "--transition-fast-in-out": transitions["fast-in-out"],
1675
- "--transition-normal-in": transitions["normal-in"],
1676
- "--transition-normal-out": transitions["normal-out"],
1677
- "--transition-normal-in-out": transitions["normal-in-out"],
1678
- "--transition-slow-in": transitions["slow-in"],
1679
- "--transition-slow-out": transitions["slow-out"],
1680
- "--transition-slow-in-out": transitions["slow-in-out"],
1681
- "--transition-bounce": transitions.bounce,
1682
- "--transition-elastic": transitions.elastic
1683
- };
2473
+ // src/FOUNDATION/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/FOUNDATION/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
+ }
1684
2673
 
1685
- // src/theme/applyMode.ts
2674
+ // src/FOUNDATION/theme/applyMode.ts
1686
2675
  var MODE_ATTRIBUTE = "data-mode";
1687
2676
  var THEME_ATTRIBUTE = "data-theme-name";
1688
2677
  var MODE_THEME_ATTRIBUTE = "data-theme";
@@ -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) {
@@ -1980,7 +3084,7 @@ function persistBrand(brandId, storageKey = "tm_brand") {
1980
3084
  }
1981
3085
  }
1982
3086
 
1983
- // src/theme/registry.ts
3087
+ // src/FOUNDATION/theme/registry.ts
1984
3088
  var themeRegistry = /* @__PURE__ */ new Map();
1985
3089
  function registerTheme(entry) {
1986
3090
  themeRegistry.set(entry.metadata.id, entry);
@@ -2060,7 +3164,7 @@ function initializeDefaultThemes() {
2060
3164
  }
2061
3165
  initializeDefaultThemes();
2062
3166
 
2063
- // src/theme/schema.ts
3167
+ // src/FOUNDATION/theme/schema.ts
2064
3168
  var REQUIRED_FIELDS = ["id", "name"];
2065
3169
  function validateThemeSchema(theme) {
2066
3170
  const errors = [];
@@ -2154,7 +3258,7 @@ function createMinimalThemeSchema(id, name) {
2154
3258
  };
2155
3259
  }
2156
3260
 
2157
- // src/theme/loader.ts
3261
+ // src/FOUNDATION/theme/loader.ts
2158
3262
  var DEFAULT_OPTIONS = {
2159
3263
  fallbackThemeId: "default",
2160
3264
  validate: true,
@@ -2231,8 +3335,8 @@ async function canLoadTheme(themeId) {
2231
3335
  }
2232
3336
  }
2233
3337
 
2234
- // src/theme/spacing.ts
2235
- var spacing = {
3338
+ // src/FOUNDATION/theme/spacing.ts
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
  () => ({
@@ -2513,7 +3691,7 @@ function useTheme() {
2513
3691
  return context;
2514
3692
  }
2515
3693
 
2516
- // src/theme/typography.ts
3694
+ // src/FOUNDATION/theme/typography.ts
2517
3695
  var fontFamilies = {
2518
3696
  sans: [
2519
3697
  "ui-sans-serif",
@@ -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 };