@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.
@@ -121,6 +121,1261 @@ var init_default = __esm({
121
121
  }
122
122
  });
123
123
 
124
+ // src/FOUNDATION/tokens/colors.ts
125
+ var primaryColors = {
126
+ 50: "210 40% 98%",
127
+ // Lightest blue
128
+ 100: "210 40% 96%",
129
+ 200: "217 32.6% 17.5%",
130
+ 300: "216 28% 26%",
131
+ 400: "215 25% 30%",
132
+ // Adjusted for better progression
133
+ 500: "215 20% 38%",
134
+ // Adjusted for better progression
135
+ 600: "215 16% 45%",
136
+ // Adjusted for better progression
137
+ 700: "216 12% 35%",
138
+ // Rebalanced for semantic strength (L* ~35)
139
+ 800: "217 10% 28%",
140
+ // Adjusted for proper progression
141
+ 900: "222 47.4% 18%",
142
+ // Adjusted for better progression
143
+ 950: "222 84% 4.9%"
144
+ // Darkest blue
145
+ };
146
+ var accentColors = {
147
+ 50: "280 100% 98%",
148
+ 100: "280 65% 96%",
149
+ 200: "280 60% 85%",
150
+ 300: "280 55% 75%",
151
+ 400: "280 50% 65%",
152
+ 500: "280 65% 72%",
153
+ // Adjusted for WCAG AA contrast (4.5:1) with dark text in night mode
154
+ 600: "259 65% 59%",
155
+ // Default accent - lightened for better contrast vs secondary (L* ~59, was 52, 15 delta from secondary-600)
156
+ 700: "259 60% 44%",
157
+ // Active state - rebalanced for semantic strength (L* ~44, 12 delta from secondary-700)
158
+ 800: "259 55% 38%",
159
+ // Adjusted for proper progression
160
+ 900: "259 50% 32%",
161
+ 950: "259 45% 30%"
162
+ };
163
+ var secondaryColors = {
164
+ 50: "173 100% 98%",
165
+ 100: "173 100% 95%",
166
+ 200: "173 100% 85%",
167
+ 300: "173 100% 70%",
168
+ 400: "173 100% 55%",
169
+ 500: "173 100% 45%",
170
+ // Adjusted for better scale progression
171
+ 600: "173 100% 44%",
172
+ // Default secondary - rebalanced for better contrast vs primary (L* ~44, was 38)
173
+ 700: "173 95% 32%",
174
+ // Active state - rebalanced for semantic strength (L* ~32)
175
+ 800: "173 90% 22%",
176
+ // Primary variant - darkened for dominance (L* ~22, was 26)
177
+ 900: "173 85% 20%",
178
+ 950: "173 80% 12%"
179
+ };
180
+ var surfaceColors = {
181
+ day: {
182
+ base: "0 0% 100%",
183
+ // White background
184
+ elevated1: "0 0% 98%",
185
+ // Slightly elevated
186
+ elevated2: "0 0% 96%",
187
+ // More elevated
188
+ elevated3: "0 0% 94%",
189
+ // Most elevated
190
+ overlay: "0 0% 0% / 0.5",
191
+ // Overlay backdrop
192
+ glass: "0 0% 100% / 0.8"
193
+ // Glass effect
194
+ },
195
+ night: {
196
+ base: "240 10% 3.9%",
197
+ // Dark background (#0b0b10)
198
+ elevated1: "240 10% 5.1%",
199
+ // #0e1016
200
+ elevated2: "240 10% 6.3%",
201
+ // Slightly lighter
202
+ elevated3: "240 10% 7.5%",
203
+ // Even lighter
204
+ overlay: "0 0% 0% / 0.7",
205
+ // Darker overlay
206
+ glass: "240 10% 10% / 0.9"
207
+ // Dark glass effect
208
+ }
209
+ };
210
+ var semanticColors = {
211
+ day: {
212
+ success: "142 70% 28%",
213
+ // Darker green for better contrast
214
+ successForeground: "0 0% 100%",
215
+ error: "0 80% 40%",
216
+ // Richer red for contrast
217
+ errorForeground: "0 0% 100%",
218
+ warning: "38 92% 50%",
219
+ // Orange
220
+ warningForeground: "0 0% 9%",
221
+ info: "199 89% 48%",
222
+ // Blue
223
+ infoForeground: "0 0% 100%"
224
+ },
225
+ night: {
226
+ success: "142 70% 45%",
227
+ successForeground: "0 0% 100%",
228
+ error: "0 62.8% 30.6%",
229
+ // Darker red
230
+ errorForeground: "0 0% 98%",
231
+ warning: "38 92% 33%",
232
+ // Darker orange for WCAG AA contrast with white text
233
+ warningForeground: "0 0% 100%",
234
+ // Light foreground for dark theme readability
235
+ info: "199 89% 35%",
236
+ // Darker blue for WCAG AA contrast with white text
237
+ infoForeground: "0 0% 100%"
238
+ // Light foreground for dark theme readability
239
+ }
240
+ };
241
+ var chartColors = {
242
+ day: {
243
+ chart1: "12 76% 61%",
244
+ // Orange-red
245
+ chart2: "173 58% 39%",
246
+ // Teal-cyan
247
+ chart3: "197 37% 24%",
248
+ // Dark blue
249
+ chart4: "43 74% 66%",
250
+ // Yellow
251
+ chart5: "27 87% 67%"
252
+ // Orange
253
+ },
254
+ night: {
255
+ chart1: "220 70% 50%",
256
+ // Blue
257
+ chart2: "160 60% 45%",
258
+ // Teal
259
+ chart3: "30 80% 55%",
260
+ // Orange
261
+ chart4: "280 65% 60%",
262
+ // Purple
263
+ chart5: "340 75% 55%"
264
+ // Pink
265
+ }
266
+ };
267
+ var textColors = {
268
+ day: {
269
+ primary: "0 0% 9%",
270
+ // Almost black (neutral-900 equivalent)
271
+ secondary: "0 0% 45%",
272
+ // Medium gray
273
+ tertiary: "0 0% 65%",
274
+ // Light gray
275
+ muted: "0 0% 42%",
276
+ // Muted gray - adjusted for WCAG AA contrast (4.5:1) on surface.elevated2
277
+ inverse: "0 0% 100%"
278
+ // White (for dark backgrounds)
279
+ },
280
+ night: {
281
+ primary: "0 0% 89.8%",
282
+ // Light gray (#e5e7eb)
283
+ secondary: "240 5% 64.9%",
284
+ // Medium gray
285
+ tertiary: "240 5% 50%",
286
+ // Darker gray
287
+ muted: "240 5% 64.9%",
288
+ // Muted gray
289
+ inverse: "0 0% 9%"
290
+ // Almost black (for light backgrounds)
291
+ }
292
+ };
293
+ var baseColors = {
294
+ day: {
295
+ background: "0 0% 100%",
296
+ foreground: "0 0% 9%",
297
+ card: "0 0% 100%",
298
+ cardForeground: "0 0% 9%",
299
+ popover: "0 0% 100%",
300
+ popoverForeground: "0 0% 9%",
301
+ border: "0 0% 89.8%",
302
+ input: "0 0% 89.8%",
303
+ ring: "0 0% 3.9%"
304
+ },
305
+ night: {
306
+ background: "240 10% 3.9%",
307
+ // #0b0b10
308
+ foreground: "0 0% 89.8%",
309
+ // #e5e7eb
310
+ card: "240 10% 3.9%",
311
+ cardForeground: "0 0% 89.8%",
312
+ popover: "240 10% 5.1%",
313
+ // #0e1016
314
+ popoverForeground: "0 0% 89.8%",
315
+ border: "240 3.7% 15.9%",
316
+ input: "240 3.7% 15.9%",
317
+ ring: "240 4.9% 83.9%"
318
+ }
319
+ };
320
+ var cssVariableColorTokens = {
321
+ day: {
322
+ ...baseColors.day,
323
+ primary: "hsl(var(--tm-primary))",
324
+ primaryForeground: "hsl(var(--tm-primary-foreground))",
325
+ secondary: "hsl(var(--tm-secondary))",
326
+ secondaryForeground: "hsl(var(--tm-secondary-foreground))",
327
+ muted: "hsl(var(--muted))",
328
+ mutedForeground: "hsl(var(--muted-foreground))",
329
+ accent: "hsl(var(--tm-accent))",
330
+ accentForeground: "hsl(var(--tm-accent-foreground))",
331
+ destructive: `hsl(${semanticColors.day.error})`,
332
+ destructiveForeground: semanticColors.day.errorForeground,
333
+ chart1: `hsl(${chartColors.day.chart1})`,
334
+ chart2: `hsl(${chartColors.day.chart2})`,
335
+ chart3: `hsl(${chartColors.day.chart3})`,
336
+ chart4: `hsl(${chartColors.day.chart4})`,
337
+ chart5: `hsl(${chartColors.day.chart5})`
338
+ },
339
+ night: {
340
+ ...baseColors.night,
341
+ primary: "hsl(var(--tm-primary))",
342
+ primaryForeground: "hsl(var(--tm-primary-foreground))",
343
+ secondary: "hsl(var(--tm-secondary))",
344
+ secondaryForeground: "hsl(var(--tm-secondary-foreground))",
345
+ muted: "hsl(var(--muted))",
346
+ mutedForeground: "hsl(var(--muted-foreground))",
347
+ accent: "hsl(var(--tm-accent))",
348
+ accentForeground: "hsl(var(--tm-accent-foreground))",
349
+ destructive: `hsl(${semanticColors.night.error})`,
350
+ destructiveForeground: semanticColors.night.errorForeground,
351
+ chart1: `hsl(${chartColors.night.chart1})`,
352
+ chart2: `hsl(${chartColors.night.chart2})`,
353
+ chart3: `hsl(${chartColors.night.chart3})`,
354
+ chart4: `hsl(${chartColors.night.chart4})`,
355
+ chart5: `hsl(${chartColors.night.chart5})`
356
+ }
357
+ };
358
+ ({
359
+ // Primary scale
360
+ "--primary-50": primaryColors[50],
361
+ "--primary-100": primaryColors[100],
362
+ "--primary-200": primaryColors[200],
363
+ "--primary-300": primaryColors[300],
364
+ "--primary-400": primaryColors[400],
365
+ "--primary-500": primaryColors[500],
366
+ "--primary-600": primaryColors[600],
367
+ "--primary-700": primaryColors[700],
368
+ "--primary-800": primaryColors[800],
369
+ "--primary-900": primaryColors[900],
370
+ "--primary-950": primaryColors[950],
371
+ // Accent scale
372
+ "--accent-50": accentColors[50],
373
+ "--accent-100": accentColors[100],
374
+ "--accent-200": accentColors[200],
375
+ "--accent-300": accentColors[300],
376
+ "--accent-400": accentColors[400],
377
+ "--accent-500": accentColors[500],
378
+ "--accent-600": accentColors[600],
379
+ "--accent-700": accentColors[700],
380
+ "--accent-800": accentColors[800],
381
+ "--accent-900": accentColors[900],
382
+ "--accent-950": accentColors[950],
383
+ // Secondary scale
384
+ "--secondary-50": secondaryColors[50],
385
+ "--secondary-100": secondaryColors[100],
386
+ "--secondary-200": secondaryColors[200],
387
+ "--secondary-300": secondaryColors[300],
388
+ "--secondary-400": secondaryColors[400],
389
+ "--secondary-500": secondaryColors[500],
390
+ "--secondary-600": secondaryColors[600],
391
+ "--secondary-700": secondaryColors[700],
392
+ "--secondary-800": secondaryColors[800],
393
+ "--secondary-900": secondaryColors[900],
394
+ "--secondary-950": secondaryColors[950]
395
+ // Surface colors (mode-dependent, set dynamically by theme system)
396
+ // Note: These are set via updateCSSVariablesFromTokens() in applyMode.ts
397
+ // Semantic colors (mode-dependent, set dynamically by theme system)
398
+ // Note: These are set via updateCSSVariablesFromTokens() in applyMode.ts
399
+ // Text colors (mode-dependent, set dynamically by theme system)
400
+ // Note: These are set via updateCSSVariablesFromTokens() in applyMode.ts
401
+ // Chart colors (mode-dependent, set dynamically by theme system)
402
+ // Note: These are set via updateCSSVariablesFromTokens() in applyMode.ts
403
+ });
404
+ var tailwindThemeColors = {
405
+ // Base colors
406
+ background: "hsl(var(--background))",
407
+ foreground: "hsl(var(--foreground))",
408
+ // Card colors
409
+ card: {
410
+ DEFAULT: "hsl(var(--card))",
411
+ foreground: "hsl(var(--card-foreground))"
412
+ },
413
+ // Popover colors
414
+ popover: {
415
+ DEFAULT: "hsl(var(--popover))",
416
+ foreground: "hsl(var(--popover-foreground))"
417
+ },
418
+ // Primary colors (using CSS variables)
419
+ primary: {
420
+ DEFAULT: "hsl(var(--tm-primary))",
421
+ foreground: "hsl(var(--tm-primary-foreground))",
422
+ 50: `hsl(var(--primary-50))`,
423
+ 100: `hsl(var(--primary-100))`,
424
+ 200: `hsl(var(--primary-200))`,
425
+ 300: `hsl(var(--primary-300))`,
426
+ 400: `hsl(var(--primary-400))`,
427
+ 500: `hsl(var(--primary-500))`,
428
+ 600: `hsl(var(--primary-600))`,
429
+ 700: `hsl(var(--primary-700))`,
430
+ 800: `hsl(var(--primary-800))`,
431
+ 900: `hsl(var(--primary-900))`,
432
+ 950: `hsl(var(--primary-950))`
433
+ },
434
+ // Secondary colors
435
+ secondary: {
436
+ DEFAULT: "hsl(var(--tm-secondary))",
437
+ foreground: "hsl(var(--tm-secondary-foreground))",
438
+ 50: `hsl(var(--secondary-50))`,
439
+ 100: `hsl(var(--secondary-100))`,
440
+ 200: `hsl(var(--secondary-200))`,
441
+ 300: `hsl(var(--secondary-300))`,
442
+ 400: `hsl(var(--secondary-400))`,
443
+ 500: `hsl(var(--secondary-500))`,
444
+ 600: `hsl(var(--secondary-600))`,
445
+ 700: `hsl(var(--secondary-700))`,
446
+ 800: `hsl(var(--secondary-800))`,
447
+ 900: `hsl(var(--secondary-900))`,
448
+ 950: `hsl(var(--secondary-950))`
449
+ },
450
+ // Accent colors
451
+ accent: {
452
+ DEFAULT: "hsl(var(--tm-accent))",
453
+ foreground: "hsl(var(--tm-accent-foreground))",
454
+ 50: `hsl(var(--accent-50))`,
455
+ 100: `hsl(var(--accent-100))`,
456
+ 200: `hsl(var(--accent-200))`,
457
+ 300: `hsl(var(--accent-300))`,
458
+ 400: `hsl(var(--accent-400))`,
459
+ 500: `hsl(var(--accent-500))`,
460
+ 600: `hsl(var(--accent-600))`,
461
+ 700: `hsl(var(--accent-700))`,
462
+ 800: `hsl(var(--accent-800))`,
463
+ 900: `hsl(var(--accent-900))`,
464
+ 950: `hsl(var(--accent-950))`
465
+ },
466
+ // Muted colors
467
+ muted: {
468
+ DEFAULT: "hsl(var(--muted))",
469
+ foreground: "hsl(var(--muted-foreground))"
470
+ },
471
+ // Destructive colors (semantic error)
472
+ destructive: {
473
+ DEFAULT: "hsl(var(--destructive))",
474
+ foreground: "hsl(var(--destructive-foreground))"
475
+ },
476
+ // Semantic colors
477
+ success: {
478
+ DEFAULT: `hsl(var(--semantic-success))`,
479
+ foreground: `hsl(var(--semantic-success-foreground))`
480
+ },
481
+ error: {
482
+ DEFAULT: `hsl(var(--semantic-error))`,
483
+ foreground: `hsl(var(--semantic-error-foreground))`
484
+ },
485
+ warning: {
486
+ DEFAULT: `hsl(var(--semantic-warning))`,
487
+ foreground: `hsl(var(--semantic-warning-foreground))`
488
+ },
489
+ info: {
490
+ DEFAULT: `hsl(var(--semantic-info))`,
491
+ foreground: `hsl(var(--semantic-info-foreground))`
492
+ },
493
+ // Surface colors
494
+ surface: {
495
+ base: `hsl(var(--surface-base))`,
496
+ elevated1: `hsl(var(--surface-elevated1))`,
497
+ elevated2: `hsl(var(--surface-elevated2))`,
498
+ elevated3: `hsl(var(--surface-elevated3))`,
499
+ overlay: `hsl(var(--surface-overlay))`,
500
+ glass: `hsl(var(--surface-glass))`
501
+ },
502
+ // Text colors
503
+ text: {
504
+ primary: `hsl(var(--text-primary))`,
505
+ secondary: `hsl(var(--text-secondary))`,
506
+ tertiary: `hsl(var(--text-tertiary))`,
507
+ muted: `hsl(var(--text-muted))`,
508
+ destructive: `hsl(var(--destructive))`,
509
+ accent: `hsl(var(--tm-accent))`,
510
+ inverse: `hsl(var(--text-inverse))`
511
+ },
512
+ // Border and input
513
+ border: "hsl(var(--border))",
514
+ input: "hsl(var(--input))",
515
+ ring: "hsl(var(--ring))",
516
+ // Chart colors (using CSS variables)
517
+ chart: {
518
+ 1: `hsl(var(--chart-1))`,
519
+ 2: `hsl(var(--chart-2))`,
520
+ 3: `hsl(var(--chart-3))`,
521
+ 4: `hsl(var(--chart-4))`,
522
+ 5: `hsl(var(--chart-5))`
523
+ }
524
+ };
525
+
526
+ // src/FOUNDATION/tokens/motion/v2.ts
527
+ var motionV2Durations = {
528
+ fast: "150ms",
529
+ // Quick interactions
530
+ normal: "250ms",
531
+ // Default transitions
532
+ slow: "350ms",
533
+ // Emphasized animations
534
+ reduced: "0ms"
535
+ // For prefers-reduced-motion
536
+ };
537
+ var motionV2Easings = {
538
+ soft: "cubic-bezier(0.22, 1, 0.36, 1)",
539
+ // Gentle, smooth
540
+ standard: "cubic-bezier(0.4, 0, 0.2, 1)",
541
+ // Material Design standard
542
+ emphasized: "cubic-bezier(0.2, 0, 0, 1)"
543
+ // Strong, decisive
544
+ };
545
+ var motionV2Transitions = {
546
+ fast: `${motionV2Durations.fast} ${motionV2Easings.standard}`,
547
+ normal: `${motionV2Durations.normal} ${motionV2Easings.standard}`,
548
+ slow: `${motionV2Durations.slow} ${motionV2Easings.emphasized}`,
549
+ soft: `${motionV2Durations.normal} ${motionV2Easings.soft}`,
550
+ reduced: `${motionV2Durations.reduced} linear`
551
+ };
552
+ var motionV2CSSVariables = {
553
+ // Durations
554
+ "--motion-duration-fast": motionV2Durations.fast,
555
+ "--motion-duration-normal": motionV2Durations.normal,
556
+ "--motion-duration-slow": motionV2Durations.slow,
557
+ "--motion-duration-reduced": motionV2Durations.reduced,
558
+ // Easings
559
+ "--motion-easing-soft": motionV2Easings.soft,
560
+ "--motion-easing-standard": motionV2Easings.standard,
561
+ "--motion-easing-emphasized": motionV2Easings.emphasized,
562
+ // Transitions
563
+ "--motion-transition-fast": motionV2Transitions.fast,
564
+ "--motion-transition-normal": motionV2Transitions.normal,
565
+ "--motion-transition-slow": motionV2Transitions.slow,
566
+ "--motion-transition-soft": motionV2Transitions.soft,
567
+ "--motion-transition-reduced": motionV2Transitions.reduced
568
+ };
569
+
570
+ // src/FOUNDATION/tokens/motion.ts
571
+ var durations = {
572
+ instant: "0ms",
573
+ fast: "150ms",
574
+ // 1.5 × base (quick interactions)
575
+ normal: "300ms",
576
+ // 3 × base (default)
577
+ slow: "500ms",
578
+ // 5 × base (emphasized)
579
+ slower: "700ms",
580
+ // 7 × base (very emphasized)
581
+ slowest: "1000ms",
582
+ // 10 × base (maximum emphasis)
583
+ // Additional granular durations
584
+ "75": "75ms",
585
+ // Ultra-fast
586
+ "100": "100ms",
587
+ // Base unit
588
+ "200": "200ms",
589
+ // Fast-normal
590
+ "250": "250ms",
591
+ // Between fast and normal
592
+ "400": "400ms",
593
+ // Between normal and slow
594
+ "600": "600ms",
595
+ // Between slow and slower
596
+ "800": "800ms"
597
+ // Between slower and slowest
598
+ };
599
+ var easings = {
600
+ // Linear (no easing)
601
+ linear: "linear",
602
+ // Ease-in (accelerate) - cubic-bezier
603
+ "ease-in": "cubic-bezier(0.4, 0, 1, 1)",
604
+ // Ease-out (decelerate) - recommended for most UI - cubic-bezier
605
+ "ease-out": "cubic-bezier(0, 0, 0.2, 1)",
606
+ // Ease-in-out (accelerate and decelerate)
607
+ "ease-in-out": "cubic-bezier(0.4, 0, 0.2, 1)",
608
+ // Advanced easing functions
609
+ bounce: "cubic-bezier(0.68, -0.55, 0.265, 1.55)",
610
+ elastic: "cubic-bezier(0.175, 0.885, 0.32, 1.275)",
611
+ // Material Design easing
612
+ "ease-out-cubic": "cubic-bezier(0.215, 0.61, 0.355, 1)",
613
+ "ease-in-cubic": "cubic-bezier(0.55, 0.055, 0.675, 0.19)",
614
+ "ease-in-out-cubic": "cubic-bezier(0.645, 0.045, 0.355, 1)"
615
+ };
616
+ var transitions = {
617
+ // Fast transitions (quick interactions)
618
+ fast: `${durations.fast} ${easings["ease-out"]}`,
619
+ "fast-in": `${durations.fast} ${easings["ease-in"]}`,
620
+ "fast-out": `${durations.fast} ${easings["ease-out"]}`,
621
+ "fast-in-out": `${durations.fast} ${easings["ease-in-out"]}`,
622
+ // Normal transitions (default)
623
+ normal: `${durations.normal} ${easings["ease-in-out"]}`,
624
+ "normal-in": `${durations.normal} ${easings["ease-in"]}`,
625
+ "normal-out": `${durations.normal} ${easings["ease-out"]}`,
626
+ "normal-in-out": `${durations.normal} ${easings["ease-in-out"]}`,
627
+ // Slow transitions (emphasized)
628
+ slow: `${durations.slow} ${easings["ease-in-out"]}`,
629
+ "slow-in": `${durations.slow} ${easings["ease-in"]}`,
630
+ "slow-out": `${durations.slow} ${easings["ease-out"]}`,
631
+ "slow-in-out": `${durations.slow} ${easings["ease-in-out"]}`,
632
+ // Special transitions
633
+ bounce: `${durations.normal} ${easings.bounce}`,
634
+ elastic: `${durations.slow} ${easings.elastic}`,
635
+ // Default (normal)
636
+ DEFAULT: `${durations.normal} ${easings["ease-in-out"]}`
637
+ };
638
+ var motionCSSVariables = {
639
+ // Durations
640
+ "--duration-instant": durations.instant,
641
+ "--duration-fast": durations.fast,
642
+ "--duration-normal": durations.normal,
643
+ "--duration-slow": durations.slow,
644
+ "--duration-slower": durations.slower,
645
+ "--duration-slowest": durations.slowest,
646
+ // Additional granular durations
647
+ "--duration-75": durations["75"],
648
+ "--duration-100": durations["100"],
649
+ "--duration-200": durations["200"],
650
+ "--duration-250": durations["250"],
651
+ "--duration-400": durations["400"],
652
+ "--duration-600": durations["600"],
653
+ "--duration-800": durations["800"],
654
+ // Easings
655
+ "--ease-linear": easings.linear,
656
+ "--ease-in": easings["ease-in"],
657
+ "--ease-out": easings["ease-out"],
658
+ "--ease-in-out": easings["ease-in-out"],
659
+ "--ease-bounce": easings.bounce,
660
+ "--ease-elastic": easings.elastic,
661
+ "--ease-out-cubic": easings["ease-out-cubic"],
662
+ "--ease-in-cubic": easings["ease-in-cubic"],
663
+ "--ease-in-out-cubic": easings["ease-in-out-cubic"],
664
+ // Transitions
665
+ "--transition-fast": transitions.fast,
666
+ "--transition-normal": transitions.normal,
667
+ "--transition-slow": transitions.slow,
668
+ "--transition-default": transitions.DEFAULT,
669
+ "--transition-fast-in": transitions["fast-in"],
670
+ "--transition-fast-out": transitions["fast-out"],
671
+ "--transition-fast-in-out": transitions["fast-in-out"],
672
+ "--transition-normal-in": transitions["normal-in"],
673
+ "--transition-normal-out": transitions["normal-out"],
674
+ "--transition-normal-in-out": transitions["normal-in-out"],
675
+ "--transition-slow-in": transitions["slow-in"],
676
+ "--transition-slow-out": transitions["slow-out"],
677
+ "--transition-slow-in-out": transitions["slow-in-out"],
678
+ "--transition-bounce": transitions.bounce,
679
+ "--transition-elastic": transitions.elastic
680
+ };
681
+
682
+ // src/FOUNDATION/tokens/radius.ts
683
+ var borderRadius = {
684
+ // No radius
685
+ none: "0",
686
+ // Extra small radius
687
+ xs: "0.125rem",
688
+ // 2px
689
+ // Small radius
690
+ sm: "0.25rem",
691
+ // 4px (same as sm)
692
+ base: "0.25rem",
693
+ // 4px (alias)
694
+ // Medium radius
695
+ md: "0.375rem",
696
+ // 6px
697
+ // Large radius
698
+ lg: "0.5rem",
699
+ // 8px (2 × base)
700
+ // Extra large radius
701
+ xl: "0.75rem",
702
+ // 12px (3 × base)
703
+ // 2XL radius
704
+ "2xl": "1rem",
705
+ // 16px (4 × base)
706
+ // 3XL radius
707
+ "3xl": "1.5rem",
708
+ // 24px (6 × base)
709
+ // Full radius (circular)
710
+ full: "9999px"
711
+ };
712
+ var componentRadius = {
713
+ // Button radius standards
714
+ button: {
715
+ // 4px (compact buttons)
716
+ md: borderRadius.md},
717
+ // Card radius standards
718
+ card: {
719
+ // 4px (compact cards)
720
+ md: borderRadius.md},
721
+ // Input/Form field radius standards
722
+ input: {
723
+ // 4px (compact inputs)
724
+ md: borderRadius.md},
725
+ // Badge/Status radius standards
726
+ badge: {
727
+ // 2px (compact badges)
728
+ md: borderRadius.sm},
729
+ // Modal/Dialog radius standards
730
+ modal: {
731
+ // 6px (small modals)
732
+ md: borderRadius.lg},
733
+ // Tooltip radius standards
734
+ tooltip: {
735
+ sm: borderRadius.sm},
736
+ // Toast/Notification radius standards
737
+ toast: {
738
+ // 6px (compact toasts)
739
+ md: borderRadius.lg},
740
+ // Chip/Tag radius standards
741
+ chip: {
742
+ // 2px (compact chips)
743
+ md: borderRadius.sm},
744
+ // Image/Media radius standards
745
+ image: {
746
+ // 4px (subtle rounding)
747
+ md: borderRadius.md}
748
+ };
749
+ var radiusCSSVariables = {
750
+ // Border radius scale
751
+ "--radius-none": borderRadius.none,
752
+ "--radius-xs": borderRadius.xs,
753
+ "--radius-sm": borderRadius.sm,
754
+ "--radius-base": borderRadius.base,
755
+ "--radius-md": borderRadius.md,
756
+ "--radius-lg": borderRadius.lg,
757
+ "--radius-xl": borderRadius.xl,
758
+ "--radius-2xl": borderRadius["2xl"],
759
+ "--radius-3xl": borderRadius["3xl"],
760
+ "--radius-full": borderRadius.full,
761
+ // Default radius variable (commonly used)
762
+ "--radius": borderRadius.md,
763
+ // Default to medium (6px)
764
+ // Component-specific radius variables
765
+ "--radius-button": componentRadius.button.md,
766
+ "--radius-card": componentRadius.card.md,
767
+ "--radius-input": componentRadius.input.md,
768
+ "--radius-badge": componentRadius.badge.md,
769
+ "--radius-modal": componentRadius.modal.md,
770
+ "--radius-tooltip": componentRadius.tooltip.sm,
771
+ "--radius-toast": componentRadius.toast.md,
772
+ "--radius-chip": componentRadius.chip.md,
773
+ "--radius-image": componentRadius.image.md
774
+ };
775
+
776
+ // src/FOUNDATION/tokens/shadows.ts
777
+ var shadowBase = {
778
+ black: "0 0 0"};
779
+ var shadowOpacity = {
780
+ xs: "0.05",
781
+ sm: "0.1",
782
+ md: "0.1",
783
+ lg: "0.1",
784
+ xl: "0.1",
785
+ "2xl": "0.25"};
786
+ var elevationShadows = {
787
+ none: "none",
788
+ xs: `0 1px 2px 0 rgb(${shadowBase.black} / ${shadowOpacity.xs})`,
789
+ sm: `0 1px 3px 0 rgb(${shadowBase.black} / ${shadowOpacity.sm}), 0 1px 2px -1px rgb(${shadowBase.black} / ${shadowOpacity.sm})`,
790
+ md: `0 4px 6px -1px rgb(${shadowBase.black} / ${shadowOpacity.md}), 0 2px 4px -2px rgb(${shadowBase.black} / ${shadowOpacity.md})`,
791
+ lg: `0 10px 15px -3px rgb(${shadowBase.black} / ${shadowOpacity.lg}), 0 4px 6px -4px rgb(${shadowBase.black} / ${shadowOpacity.lg})`,
792
+ xl: `0 20px 25px -5px rgb(${shadowBase.black} / ${shadowOpacity.xl}), 0 8px 10px -6px rgb(${shadowBase.black} / ${shadowOpacity.xl})`,
793
+ "2xl": `0 25px 50px -12px rgb(${shadowBase.black} / ${shadowOpacity["2xl"]})`
794
+ };
795
+ var primaryColoredShadows = {
796
+ xs: "0 1px 2px 0 hsl(var(--primary-500) / 0.15)",
797
+ sm: "0 2px 4px 0 hsl(var(--primary-500) / 0.2)",
798
+ md: "0 4px 8px 0 hsl(var(--primary-500) / 0.3)",
799
+ lg: "0 8px 16px 0 hsl(var(--primary-500) / 0.4)",
800
+ xl: "0 12px 24px 0 hsl(var(--primary-500) / 0.5)",
801
+ "2xl": "0 16px 32px 0 hsl(var(--primary-500) / 0.6)"
802
+ };
803
+ var accentColoredShadows = {
804
+ xs: "0 1px 2px 0 hsl(var(--accent-500) / 0.15)",
805
+ sm: "0 2px 4px 0 hsl(var(--accent-500) / 0.2)",
806
+ md: "0 4px 8px 0 hsl(var(--accent-500) / 0.3)",
807
+ lg: "0 8px 16px 0 hsl(var(--accent-500) / 0.4)",
808
+ xl: "0 12px 24px 0 hsl(var(--accent-500) / 0.5)",
809
+ "2xl": "0 16px 32px 0 hsl(var(--accent-500) / 0.6)"
810
+ };
811
+ var glowEffects = {
812
+ // Primary glow effects
813
+ "glow-primary": "0 0 20px 0 hsl(var(--primary-500) / 0.5), 0 0 40px 0 hsl(var(--primary-500) / 0.3)",
814
+ "glow-primary-subtle": "0 0 8px 0 hsl(var(--primary-500) / 0.3)",
815
+ "glow-primary-medium": "0 0 16px 0 hsl(var(--primary-500) / 0.5)",
816
+ "glow-primary-strong": "0 0 24px 0 hsl(var(--primary-500) / 0.6)",
817
+ // Accent glow effects
818
+ "glow-accent": "0 0 20px 0 hsl(var(--accent-500) / 0.5), 0 0 40px 0 hsl(var(--accent-500) / 0.3)",
819
+ "glow-accent-subtle": "0 0 8px 0 hsl(var(--accent-500) / 0.3)",
820
+ "glow-accent-medium": "0 0 16px 0 hsl(var(--accent-500) / 0.5)",
821
+ "glow-accent-strong": "0 0 24px 0 hsl(var(--accent-500) / 0.6)"
822
+ };
823
+ var focusRings = {
824
+ default: "0 0 0 3px hsl(var(--ring) / 0.5)",
825
+ primary: "0 0 0 3px hsl(var(--primary-500) / 0.3)",
826
+ accent: "0 0 0 3px hsl(var(--accent-500) / 0.3)",
827
+ "focus-primary": "0 0 0 3px hsl(var(--primary-500) / 0.3)",
828
+ "focus-accent": "0 0 0 3px hsl(var(--accent-500) / 0.3)"
829
+ };
830
+ var shadowCSSVariables = {
831
+ // Elevation shadows
832
+ "--shadow-none": elevationShadows.none,
833
+ "--shadow-xs": elevationShadows.xs,
834
+ "--shadow-sm": elevationShadows.sm,
835
+ "--shadow-md": elevationShadows.md,
836
+ "--shadow-lg": elevationShadows.lg,
837
+ "--shadow-xl": elevationShadows.xl,
838
+ "--shadow-2xl": elevationShadows["2xl"],
839
+ // Primary colored shadows
840
+ "--shadow-primary-xs": primaryColoredShadows.xs,
841
+ "--shadow-primary-sm": primaryColoredShadows.sm,
842
+ "--shadow-primary-md": primaryColoredShadows.md,
843
+ "--shadow-primary-lg": primaryColoredShadows.lg,
844
+ "--shadow-primary-xl": primaryColoredShadows.xl,
845
+ "--shadow-primary-2xl": primaryColoredShadows["2xl"],
846
+ // Accent colored shadows
847
+ "--shadow-accent-xs": accentColoredShadows.xs,
848
+ "--shadow-accent-sm": accentColoredShadows.sm,
849
+ "--shadow-accent-md": accentColoredShadows.md,
850
+ "--shadow-accent-lg": accentColoredShadows.lg,
851
+ "--shadow-accent-xl": accentColoredShadows.xl,
852
+ "--shadow-accent-2xl": accentColoredShadows["2xl"],
853
+ // Glow effects
854
+ "--glow-primary": glowEffects["glow-primary"],
855
+ "--glow-primary-subtle": glowEffects["glow-primary-subtle"],
856
+ "--glow-primary-medium": glowEffects["glow-primary-medium"],
857
+ "--glow-primary-strong": glowEffects["glow-primary-strong"],
858
+ "--glow-accent": glowEffects["glow-accent"],
859
+ "--glow-accent-subtle": glowEffects["glow-accent-subtle"],
860
+ "--glow-accent-medium": glowEffects["glow-accent-medium"],
861
+ "--glow-accent-strong": glowEffects["glow-accent-strong"],
862
+ // Focus rings
863
+ "--focus-ring-default": focusRings.default,
864
+ "--focus-ring-primary": focusRings.primary,
865
+ "--focus-ring-accent": focusRings.accent,
866
+ "--focus-primary": focusRings["focus-primary"],
867
+ "--focus-accent": focusRings["focus-accent"]
868
+ };
869
+
870
+ // src/FOUNDATION/tokens/spacing.ts
871
+ var spacing = {
872
+ // Zero spacing
873
+ 0: "0",
874
+ px: "1px",
875
+ // Half unit (4px)
876
+ 0.5: "0.125rem",
877
+ // 4px
878
+ // Base unit multiples (8px increments)
879
+ 1: "0.25rem",
880
+ // 4px (half unit, common)
881
+ 1.5: "0.375rem",
882
+ // 6px (rare, for fine adjustments)
883
+ 2: "0.5rem",
884
+ // 8px (base unit)
885
+ 2.5: "0.625rem",
886
+ // 10px (rare)
887
+ 3: "0.75rem",
888
+ // 12px (1.5 × base)
889
+ 3.5: "0.875rem",
890
+ // 14px (rare)
891
+ 4: "1rem",
892
+ // 16px (2 × base)
893
+ 5: "1.25rem",
894
+ // 20px (2.5 × base)
895
+ 6: "1.5rem",
896
+ // 24px (3 × base)
897
+ 7: "1.75rem",
898
+ // 28px (3.5 × base)
899
+ 8: "2rem",
900
+ // 32px (4 × base)
901
+ 9: "2.25rem",
902
+ // 36px (4.5 × base)
903
+ 10: "2.5rem",
904
+ // 40px (5 × base)
905
+ 11: "2.75rem",
906
+ // 44px (5.5 × base)
907
+ 12: "3rem",
908
+ // 48px (6 × base)
909
+ 14: "3.5rem",
910
+ // 56px (7 × base)
911
+ 16: "4rem",
912
+ // 64px (8 × base)
913
+ 20: "5rem",
914
+ // 80px (10 × base)
915
+ 24: "6rem"};
916
+ var semanticSpacing = {
917
+ // Extra small spacing (tight, minimal)
918
+ xs: spacing[1],
919
+ // 4px (0.25rem)
920
+ // Small spacing (compact)
921
+ sm: spacing[2],
922
+ // 8px (0.5rem)
923
+ // Medium spacing (default)
924
+ md: spacing[4],
925
+ // 16px (1rem)
926
+ // Large spacing (spacious)
927
+ lg: spacing[6],
928
+ // 24px (1.5rem)
929
+ // Extra large spacing (very spacious)
930
+ xl: spacing[8],
931
+ // 32px (2rem)
932
+ // 2XL spacing (section-level)
933
+ "2xl": spacing[12],
934
+ // 48px (3rem)
935
+ // 3XL spacing (major sections)
936
+ "3xl": spacing[16],
937
+ // 64px (4rem)
938
+ // 4XL spacing (page sections)
939
+ "4xl": spacing[20],
940
+ // 80px (5rem)
941
+ // 5XL spacing (hero sections)
942
+ "5xl": spacing[24],
943
+ // 96px (6rem)
944
+ // None (no spacing)
945
+ none: spacing[0]
946
+ // 0
947
+ };
948
+ var layoutSpacing = {
949
+ // Section spacing (vertical spacing between major sections)
950
+ section: {
951
+ xs: spacing[6],
952
+ // 24px (compact sections)
953
+ sm: spacing[8],
954
+ // 32px (small sections)
955
+ md: spacing[12],
956
+ // 48px (default sections)
957
+ lg: spacing[16],
958
+ // 64px (large sections)
959
+ xl: spacing[20],
960
+ // 80px (extra large sections)
961
+ "2xl": spacing[24]
962
+ // 96px (hero sections)
963
+ },
964
+ // Container spacing (padding inside containers)
965
+ container: {
966
+ xs: spacing[2],
967
+ // 8px (tight containers)
968
+ sm: spacing[4],
969
+ // 16px (compact containers)
970
+ md: spacing[6],
971
+ // 24px (default containers)
972
+ lg: spacing[8],
973
+ // 32px (spacious containers)
974
+ xl: spacing[12]
975
+ // 48px (very spacious containers)
976
+ },
977
+ // Grid spacing (gap between grid items)
978
+ grid: {
979
+ xs: spacing[2],
980
+ // 8px (tight grids)
981
+ sm: spacing[4],
982
+ // 16px (compact grids)
983
+ md: spacing[6],
984
+ // 24px (default grids)
985
+ lg: spacing[8],
986
+ // 32px (spacious grids)
987
+ xl: spacing[12]
988
+ // 48px (very spacious grids)
989
+ },
990
+ // Stack spacing (gap between stacked items)
991
+ stack: {
992
+ xs: spacing[1],
993
+ // 4px (tight stacks)
994
+ sm: spacing[2],
995
+ // 8px (compact stacks)
996
+ md: spacing[4],
997
+ // 16px (default stacks)
998
+ lg: spacing[6],
999
+ // 24px (spacious stacks)
1000
+ xl: spacing[8]
1001
+ // 32px (very spacious stacks)
1002
+ },
1003
+ // Component internal spacing (padding inside components)
1004
+ component: {
1005
+ xs: spacing[1],
1006
+ // 4px (tight components)
1007
+ sm: spacing[2],
1008
+ // 8px (compact components)
1009
+ md: spacing[4],
1010
+ // 16px (default components)
1011
+ lg: spacing[6],
1012
+ // 24px (spacious components)
1013
+ xl: spacing[8]
1014
+ // 32px (extra spacious components)
1015
+ }
1016
+ };
1017
+ var spacingCSSVariables = {
1018
+ // Base spacing scale
1019
+ "--spacing-0": spacing[0],
1020
+ "--spacing-px": spacing.px,
1021
+ "--spacing-0-5": spacing[0.5],
1022
+ "--spacing-1": spacing[1],
1023
+ "--spacing-1-5": spacing[1.5],
1024
+ "--spacing-2": spacing[2],
1025
+ "--spacing-2-5": spacing[2.5],
1026
+ "--spacing-3": spacing[3],
1027
+ "--spacing-3-5": spacing[3.5],
1028
+ "--spacing-4": spacing[4],
1029
+ "--spacing-5": spacing[5],
1030
+ "--spacing-6": spacing[6],
1031
+ "--spacing-7": spacing[7],
1032
+ "--spacing-8": spacing[8],
1033
+ "--spacing-9": spacing[9],
1034
+ "--spacing-10": spacing[10],
1035
+ "--spacing-11": spacing[11],
1036
+ "--spacing-12": spacing[12],
1037
+ "--spacing-14": spacing[14],
1038
+ "--spacing-16": spacing[16],
1039
+ "--spacing-20": spacing[20],
1040
+ "--spacing-24": spacing[24],
1041
+ // Semantic spacing
1042
+ "--spacing-xs": semanticSpacing.xs,
1043
+ "--spacing-sm": semanticSpacing.sm,
1044
+ "--spacing-md": semanticSpacing.md,
1045
+ "--spacing-lg": semanticSpacing.lg,
1046
+ "--spacing-xl": semanticSpacing.xl,
1047
+ "--spacing-2xl": semanticSpacing["2xl"],
1048
+ "--spacing-3xl": semanticSpacing["3xl"],
1049
+ "--spacing-4xl": semanticSpacing["4xl"],
1050
+ "--spacing-5xl": semanticSpacing["5xl"],
1051
+ "--spacing-none": semanticSpacing.none,
1052
+ // Layout spacing - sections
1053
+ "--layout-section-xs": layoutSpacing.section.xs,
1054
+ "--layout-section-sm": layoutSpacing.section.sm,
1055
+ "--layout-section-md": layoutSpacing.section.md,
1056
+ "--layout-section-lg": layoutSpacing.section.lg,
1057
+ "--layout-section-xl": layoutSpacing.section.xl,
1058
+ "--layout-section-2xl": layoutSpacing.section["2xl"],
1059
+ // Layout spacing - containers
1060
+ "--layout-container-xs": layoutSpacing.container.xs,
1061
+ "--layout-container-sm": layoutSpacing.container.sm,
1062
+ "--layout-container-md": layoutSpacing.container.md,
1063
+ "--layout-container-lg": layoutSpacing.container.lg,
1064
+ "--layout-container-xl": layoutSpacing.container.xl,
1065
+ // Layout spacing - grids
1066
+ "--layout-grid-xs": layoutSpacing.grid.xs,
1067
+ "--layout-grid-sm": layoutSpacing.grid.sm,
1068
+ "--layout-grid-md": layoutSpacing.grid.md,
1069
+ "--layout-grid-lg": layoutSpacing.grid.lg,
1070
+ "--layout-grid-xl": layoutSpacing.grid.xl,
1071
+ // Layout spacing - stacks
1072
+ "--layout-stack-xs": layoutSpacing.stack.xs,
1073
+ "--layout-stack-sm": layoutSpacing.stack.sm,
1074
+ "--layout-stack-md": layoutSpacing.stack.md,
1075
+ "--layout-stack-lg": layoutSpacing.stack.lg,
1076
+ "--layout-stack-xl": layoutSpacing.stack.xl,
1077
+ // Layout spacing - components
1078
+ "--layout-component-xs": layoutSpacing.component.xs,
1079
+ "--layout-component-sm": layoutSpacing.component.sm,
1080
+ "--layout-component-md": layoutSpacing.component.md,
1081
+ "--layout-component-lg": layoutSpacing.component.lg,
1082
+ "--layout-component-xl": layoutSpacing.component.xl
1083
+ };
1084
+
1085
+ // src/FOUNDATION/tokens/typography.ts
1086
+ var fontFamily = {
1087
+ // Primary font - Inter (default sans)
1088
+ sans: [
1089
+ "Inter",
1090
+ "ui-sans-serif",
1091
+ "system-ui",
1092
+ "-apple-system",
1093
+ "BlinkMacSystemFont",
1094
+ "Segoe UI",
1095
+ "Roboto",
1096
+ "Helvetica Neue",
1097
+ "Arial",
1098
+ "Noto Sans",
1099
+ "sans-serif",
1100
+ "Apple Color Emoji",
1101
+ "Segoe UI Emoji",
1102
+ "Segoe UI Symbol",
1103
+ "Noto Color Emoji"
1104
+ ],
1105
+ // Optional font - Satoshi
1106
+ satoshi: [
1107
+ "Satoshi",
1108
+ "Inter",
1109
+ "ui-sans-serif",
1110
+ "system-ui",
1111
+ "-apple-system",
1112
+ "BlinkMacSystemFont",
1113
+ "Segoe UI",
1114
+ "Roboto",
1115
+ "sans-serif"
1116
+ ],
1117
+ // Display font - Clash Display (for headings and hero sections)
1118
+ display: [
1119
+ "Clash Display",
1120
+ "Inter",
1121
+ "ui-sans-serif",
1122
+ "system-ui",
1123
+ "-apple-system",
1124
+ "BlinkMacSystemFont",
1125
+ "Segoe UI",
1126
+ "Roboto",
1127
+ "sans-serif"
1128
+ ],
1129
+ // Serif font family
1130
+ serif: ["ui-serif", "Georgia", "Cambria", "Times New Roman", "Times", "serif"],
1131
+ // Monospace font family
1132
+ mono: [
1133
+ "ui-monospace",
1134
+ "SFMono-Regular",
1135
+ "Menlo",
1136
+ "Monaco",
1137
+ "Consolas",
1138
+ "Liberation Mono",
1139
+ "Courier New",
1140
+ "monospace"
1141
+ ]
1142
+ };
1143
+ var fontSize = {
1144
+ // text-xs: 12px base, scales from 0.75rem to 0.875rem
1145
+ xs: [
1146
+ "clamp(0.75rem, 0.7rem + 0.125vw, 0.875rem)",
1147
+ { lineHeight: "1rem", letterSpacing: "0.05em" }
1148
+ ],
1149
+ // text-sm: 14px base, scales from 0.875rem to 1rem
1150
+ sm: [
1151
+ "clamp(0.875rem, 0.8rem + 0.25vw, 1rem)",
1152
+ { lineHeight: "1.25rem", letterSpacing: "0.025em" }
1153
+ ],
1154
+ // text-base: 16px base, scales from 1rem to 1.125rem
1155
+ base: ["clamp(1rem, 0.95rem + 0.25vw, 1.125rem)", { lineHeight: "1.5rem", letterSpacing: "0em" }],
1156
+ // text-lg: 18px base, scales from 1.125rem to 1.25rem
1157
+ lg: [
1158
+ "clamp(1.125rem, 1rem + 0.5vw, 1.25rem)",
1159
+ { lineHeight: "1.75rem", letterSpacing: "-0.025em" }
1160
+ ],
1161
+ // text-xl: 20px base, scales from 1.25rem to 1.5rem
1162
+ xl: [
1163
+ "clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem)",
1164
+ { lineHeight: "1.75rem", letterSpacing: "-0.025em" }
1165
+ ],
1166
+ // text-2xl: 24px base, scales from 1.5rem to 2rem
1167
+ "2xl": [
1168
+ "clamp(1.5rem, 1.25rem + 1.25vw, 2rem)",
1169
+ { lineHeight: "2rem", letterSpacing: "-0.05em" }
1170
+ ],
1171
+ // text-3xl: 30px base, scales from 1.875rem to 2.5rem
1172
+ "3xl": [
1173
+ "clamp(1.875rem, 1.5rem + 1.875vw, 2.5rem)",
1174
+ { lineHeight: "2.25rem", letterSpacing: "-0.05em" }
1175
+ ],
1176
+ // text-4xl: 36px base, scales from 2.25rem to 3rem
1177
+ "4xl": [
1178
+ "clamp(2.25rem, 1.75rem + 2.5vw, 3rem)",
1179
+ { lineHeight: "2.5rem", letterSpacing: "-0.025em" }
1180
+ ],
1181
+ // text-5xl: 48px base, scales from 3rem to 4rem
1182
+ "5xl": ["clamp(3rem, 2rem + 5vw, 4rem)", { lineHeight: "1", letterSpacing: "-0.025em" }],
1183
+ // text-6xl: 60px base, scales from 3.75rem to 5rem
1184
+ "6xl": ["clamp(3.75rem, 2.5rem + 6.25vw, 5rem)", { lineHeight: "1", letterSpacing: "-0.05em" }],
1185
+ // text-7xl: 72px base (optional, for hero sections)
1186
+ "7xl": ["clamp(4.5rem, 3rem + 7.5vw, 6rem)", { lineHeight: "1", letterSpacing: "-0.05em" }],
1187
+ // text-8xl: 96px base (optional, for hero sections)
1188
+ "8xl": ["clamp(6rem, 4rem + 10vw, 8rem)", { lineHeight: "1", letterSpacing: "-0.05em" }],
1189
+ // text-9xl: 128px base (optional, for hero sections)
1190
+ "9xl": ["clamp(8rem, 5rem + 15vw, 12rem)", { lineHeight: "1", letterSpacing: "-0.05em" }]
1191
+ };
1192
+ var fontWeight = {
1193
+ thin: "100",
1194
+ extralight: "200",
1195
+ light: "300",
1196
+ normal: "400",
1197
+ medium: "500",
1198
+ semibold: "600",
1199
+ bold: "700",
1200
+ extrabold: "800",
1201
+ black: "900"
1202
+ };
1203
+ var lineHeight = {
1204
+ none: "1",
1205
+ tight: "1.25",
1206
+ snug: "1.375",
1207
+ normal: "1.5",
1208
+ relaxed: "1.625",
1209
+ loose: "2"
1210
+ };
1211
+ var letterSpacing = {
1212
+ tighter: "-0.05em",
1213
+ tight: "-0.025em",
1214
+ normal: "0em",
1215
+ wide: "0.025em",
1216
+ wider: "0.05em",
1217
+ widest: "0.1em"
1218
+ };
1219
+ var typographyCSSVariables = {
1220
+ // Font families
1221
+ "--font-sans": fontFamily.sans.join(", "),
1222
+ "--font-satoshi": fontFamily.satoshi.join(", "),
1223
+ "--font-display": fontFamily.display.join(", "),
1224
+ "--font-serif": fontFamily.serif.join(", "),
1225
+ "--font-mono": fontFamily.mono.join(", "),
1226
+ // Font sizes (using clamp values)
1227
+ "--font-size-xs": fontSize.xs[0],
1228
+ "--font-size-sm": fontSize.sm[0],
1229
+ "--font-size-base": fontSize.base[0],
1230
+ "--font-size-lg": fontSize.lg[0],
1231
+ "--font-size-xl": fontSize.xl[0],
1232
+ "--font-size-2xl": fontSize["2xl"][0],
1233
+ "--font-size-3xl": fontSize["3xl"][0],
1234
+ "--font-size-4xl": fontSize["4xl"][0],
1235
+ "--font-size-5xl": fontSize["5xl"][0],
1236
+ "--font-size-6xl": fontSize["6xl"][0],
1237
+ // Font weights
1238
+ "--font-weight-thin": fontWeight.thin,
1239
+ "--font-weight-extralight": fontWeight.extralight,
1240
+ "--font-weight-light": fontWeight.light,
1241
+ "--font-weight-normal": fontWeight.normal,
1242
+ "--font-weight-medium": fontWeight.medium,
1243
+ "--font-weight-semibold": fontWeight.semibold,
1244
+ "--font-weight-bold": fontWeight.bold,
1245
+ "--font-weight-extrabold": fontWeight.extrabold,
1246
+ "--font-weight-black": fontWeight.black,
1247
+ // Line heights
1248
+ "--line-height-none": lineHeight.none,
1249
+ "--line-height-tight": lineHeight.tight,
1250
+ "--line-height-snug": lineHeight.snug,
1251
+ "--line-height-normal": lineHeight.normal,
1252
+ "--line-height-relaxed": lineHeight.relaxed,
1253
+ "--line-height-loose": lineHeight.loose,
1254
+ // Letter spacing
1255
+ "--letter-spacing-tighter": letterSpacing.tighter,
1256
+ "--letter-spacing-tight": letterSpacing.tight,
1257
+ "--letter-spacing-normal": letterSpacing.normal,
1258
+ "--letter-spacing-wide": letterSpacing.wide,
1259
+ "--letter-spacing-wider": letterSpacing.wider,
1260
+ "--letter-spacing-widest": letterSpacing.widest
1261
+ };
1262
+ ({
1263
+ // Display styles (for hero sections)
1264
+ display: {
1265
+ fontSize: fontSize["6xl"][0]},
1266
+ // Heading styles
1267
+ h1: {
1268
+ fontSize: fontSize["5xl"][0]},
1269
+ h2: {
1270
+ fontSize: fontSize["4xl"][0]},
1271
+ h3: {
1272
+ fontSize: fontSize["3xl"][0]},
1273
+ h4: {
1274
+ fontSize: fontSize["2xl"][0]},
1275
+ h5: {
1276
+ fontSize: fontSize.xl[0]},
1277
+ h6: {
1278
+ fontSize: fontSize.lg[0]},
1279
+ // Body text styles
1280
+ body: {
1281
+ fontSize: fontSize.base[0]},
1282
+ "body-sm": {
1283
+ fontSize: fontSize.sm[0]},
1284
+ "body-xs": {
1285
+ fontSize: fontSize.xs[0]},
1286
+ // Label styles
1287
+ label: {
1288
+ fontSize: fontSize.sm[0]},
1289
+ "label-sm": {
1290
+ fontSize: fontSize.xs[0]},
1291
+ // Caption styles
1292
+ caption: {
1293
+ fontSize: fontSize.xs[0]}
1294
+ });
1295
+ ({
1296
+ fontSize: {
1297
+ xs: [
1298
+ fontSize.xs[0],
1299
+ { lineHeight: fontSize.xs[1].lineHeight, letterSpacing: fontSize.xs[1].letterSpacing }
1300
+ ],
1301
+ sm: [
1302
+ fontSize.sm[0],
1303
+ { lineHeight: fontSize.sm[1].lineHeight, letterSpacing: fontSize.sm[1].letterSpacing }
1304
+ ],
1305
+ md: [
1306
+ fontSize.base[0],
1307
+ { lineHeight: fontSize.base[1].lineHeight, letterSpacing: fontSize.base[1].letterSpacing }
1308
+ ],
1309
+ base: [
1310
+ fontSize.base[0],
1311
+ { lineHeight: fontSize.base[1].lineHeight, letterSpacing: fontSize.base[1].letterSpacing }
1312
+ ],
1313
+ lg: [
1314
+ fontSize.lg[0],
1315
+ { lineHeight: fontSize.lg[1].lineHeight, letterSpacing: fontSize.lg[1].letterSpacing }
1316
+ ],
1317
+ xl: [
1318
+ fontSize.xl[0],
1319
+ { lineHeight: fontSize.xl[1].lineHeight, letterSpacing: fontSize.xl[1].letterSpacing }
1320
+ ],
1321
+ "2xl": [
1322
+ fontSize["2xl"][0],
1323
+ {
1324
+ lineHeight: fontSize["2xl"][1].lineHeight,
1325
+ letterSpacing: fontSize["2xl"][1].letterSpacing
1326
+ }
1327
+ ],
1328
+ "3xl": [
1329
+ fontSize["3xl"][0],
1330
+ {
1331
+ lineHeight: fontSize["3xl"][1].lineHeight,
1332
+ letterSpacing: fontSize["3xl"][1].letterSpacing
1333
+ }
1334
+ ],
1335
+ "4xl": [
1336
+ fontSize["4xl"][0],
1337
+ {
1338
+ lineHeight: fontSize["4xl"][1].lineHeight,
1339
+ letterSpacing: fontSize["4xl"][1].letterSpacing
1340
+ }
1341
+ ],
1342
+ "5xl": [
1343
+ fontSize["5xl"][0],
1344
+ {
1345
+ lineHeight: fontSize["5xl"][1].lineHeight,
1346
+ letterSpacing: fontSize["5xl"][1].letterSpacing
1347
+ }
1348
+ ],
1349
+ "6xl": [
1350
+ fontSize["6xl"][0],
1351
+ {
1352
+ lineHeight: fontSize["6xl"][1].lineHeight,
1353
+ letterSpacing: fontSize["6xl"][1].letterSpacing
1354
+ }
1355
+ ],
1356
+ "7xl": [
1357
+ fontSize["7xl"][0],
1358
+ {
1359
+ lineHeight: fontSize["7xl"][1].lineHeight,
1360
+ letterSpacing: fontSize["7xl"][1].letterSpacing
1361
+ }
1362
+ ],
1363
+ "8xl": [
1364
+ fontSize["8xl"][0],
1365
+ {
1366
+ lineHeight: fontSize["8xl"][1].lineHeight,
1367
+ letterSpacing: fontSize["8xl"][1].letterSpacing
1368
+ }
1369
+ ],
1370
+ "9xl": [
1371
+ fontSize["9xl"][0],
1372
+ {
1373
+ lineHeight: fontSize["9xl"][1].lineHeight,
1374
+ letterSpacing: fontSize["9xl"][1].letterSpacing
1375
+ }
1376
+ ]
1377
+ }});
1378
+
124
1379
  // src/themes/minimal.ts
125
1380
  var minimalBrand = {
126
1381
  id: "minimal",
@@ -1128,19 +2383,19 @@ function applyBrandOverrides(brand, mode) {
1128
2383
  });
1129
2384
  }
1130
2385
  if (overrides.radius.componentRadius) {
1131
- const { componentRadius } = overrides.radius;
1132
- if (componentRadius.button) {
1133
- Object.entries(componentRadius.button).forEach(([key, value]) => {
2386
+ const { componentRadius: componentRadius2 } = overrides.radius;
2387
+ if (componentRadius2.button) {
2388
+ Object.entries(componentRadius2.button).forEach(([key, value]) => {
1134
2389
  root.style.setProperty(`--brand-${namespace}-radius-button-${key}`, value);
1135
2390
  });
1136
2391
  }
1137
- if (componentRadius.card) {
1138
- Object.entries(componentRadius.card).forEach(([key, value]) => {
2392
+ if (componentRadius2.card) {
2393
+ Object.entries(componentRadius2.card).forEach(([key, value]) => {
1139
2394
  root.style.setProperty(`--brand-${namespace}-radius-card-${key}`, value);
1140
2395
  });
1141
2396
  }
1142
- if (componentRadius.input) {
1143
- Object.entries(componentRadius.input).forEach(([key, value]) => {
2397
+ if (componentRadius2.input) {
2398
+ Object.entries(componentRadius2.input).forEach(([key, value]) => {
1144
2399
  root.style.setProperty(`--brand-${namespace}-radius-input-${key}`, value);
1145
2400
  });
1146
2401
  }
@@ -1154,541 +2409,275 @@ function removeBrandOverrides(namespace) {
1154
2409
  if (typeof document === "undefined") return;
1155
2410
  const root = document.documentElement;
1156
2411
  const { style } = root;
1157
- const propsToRemove = [];
1158
- for (let i = 0; i < style.length; i++) {
1159
- const prop = style.item(i);
1160
- if (prop && prop.startsWith(`--brand-${namespace}-`)) {
1161
- propsToRemove.push(prop);
1162
- }
1163
- }
1164
- propsToRemove.forEach((prop) => {
1165
- style.removeProperty(prop);
1166
- });
1167
- root.removeAttribute("data-brand");
1168
- root.removeAttribute("data-brand-namespace");
1169
- if (activeNamespace === namespace) {
1170
- clearActiveBrand();
1171
- }
1172
- }
1173
-
1174
- // src/themes/index.ts
1175
- var themes = {
1176
- default: () => Promise.resolve().then(() => (init_default(), default_exports)).then((m) => m.defaultTheme),
1177
- dark: () => Promise.resolve().then(() => (init_dark(), dark_exports)).then((m) => m.darkTheme),
1178
- brand: () => Promise.resolve().then(() => (init_brand(), brand_exports)).then((m) => m.brandTheme)
1179
- };
1180
- async function getTheme(name) {
1181
- const themeLoader = themes[name];
1182
- if (!themeLoader) {
1183
- throw new Error(`Theme "${name}" not found`);
1184
- }
1185
- return await themeLoader();
1186
- }
1187
-
1188
- // src/tokens/colors.ts
1189
- var primaryColors = {
1190
- 50: "210 40% 98%",
1191
- // Lightest blue
1192
- 100: "210 40% 96%",
1193
- 200: "217 32.6% 17.5%",
1194
- 300: "216 28% 26%",
1195
- 400: "215 25% 27%",
1196
- 500: "215 20% 35%",
1197
- // Base primary
1198
- 600: "215 16% 47%",
1199
- 700: "216 12% 54%",
1200
- 800: "217 10% 62%",
1201
- 900: "222 47.4% 11.2%",
1202
- 950: "222 84% 4.9%"
1203
- // Darkest blue
1204
- };
1205
- var accentColors = {
1206
- 50: "280 100% 98%",
1207
- 100: "280 65% 96%",
1208
- 200: "280 60% 85%",
1209
- 300: "280 55% 75%",
1210
- 400: "280 50% 65%",
1211
- 500: "280 70% 67%",
1212
- // Base accent (night mode primary)
1213
- 600: "259 65% 58%",
1214
- 700: "259 60% 50%",
1215
- 800: "259 55% 45%",
1216
- 900: "259 50% 40%",
1217
- 950: "259 45% 30%"
1218
- };
1219
- var secondaryColors = {
1220
- 50: "173 100% 98%",
1221
- 100: "173 100% 95%",
1222
- 200: "173 100% 85%",
1223
- 300: "173 100% 70%",
1224
- 400: "173 100% 55%",
1225
- 500: "173 100% 37%",
1226
- // Base secondary (Tenerife #00bfa6)
1227
- 600: "173 100% 32%",
1228
- 700: "173 95% 27%",
1229
- 800: "173 90% 22%",
1230
- 900: "173 85% 17%",
1231
- 950: "173 80% 12%"
1232
- };
1233
- var surfaceColors = {
1234
- day: {
1235
- base: "0 0% 100%",
1236
- // White background
1237
- elevated1: "0 0% 98%",
1238
- // Slightly elevated
1239
- elevated2: "0 0% 96%",
1240
- // More elevated
1241
- elevated3: "0 0% 94%",
1242
- // Most elevated
1243
- overlay: "0 0% 0% / 0.5",
1244
- // Overlay backdrop
1245
- glass: "0 0% 100% / 0.8"
1246
- // Glass effect
1247
- },
1248
- night: {
1249
- base: "240 10% 3.9%",
1250
- // Dark background (#0b0b10)
1251
- elevated1: "240 10% 5.1%",
1252
- // #0e1016
1253
- elevated2: "240 10% 6.3%",
1254
- // Slightly lighter
1255
- elevated3: "240 10% 7.5%",
1256
- // Even lighter
1257
- overlay: "0 0% 0% / 0.7",
1258
- // Darker overlay
1259
- glass: "240 10% 10% / 0.9"
1260
- // Dark glass effect
1261
- }
1262
- };
1263
- var semanticColors = {
1264
- day: {
1265
- success: "142 70% 28%",
1266
- // Darker green for better contrast
1267
- successForeground: "0 0% 100%",
1268
- error: "0 80% 40%",
1269
- // Richer red for contrast
1270
- errorForeground: "0 0% 100%",
1271
- warning: "38 92% 50%",
1272
- // Orange
1273
- warningForeground: "0 0% 9%",
1274
- info: "199 89% 48%",
1275
- // Blue
1276
- infoForeground: "0 0% 100%"
1277
- },
1278
- night: {
1279
- success: "142 70% 45%",
1280
- successForeground: "0 0% 100%",
1281
- error: "0 62.8% 30.6%",
1282
- // Darker red
1283
- errorForeground: "0 0% 98%",
1284
- warning: "38 92% 33%",
1285
- // Darker orange for WCAG AA contrast with white text
1286
- warningForeground: "0 0% 100%",
1287
- // Light foreground for dark theme readability
1288
- info: "199 89% 35%",
1289
- // Darker blue for WCAG AA contrast with white text
1290
- infoForeground: "0 0% 100%"
1291
- // Light foreground for dark theme readability
1292
- }
1293
- };
1294
- var chartColors = {
1295
- day: {
1296
- chart1: "12 76% 61%",
1297
- // Orange-red
1298
- chart2: "173 58% 39%",
1299
- // Teal-cyan
1300
- chart3: "197 37% 24%",
1301
- // Dark blue
1302
- chart4: "43 74% 66%",
1303
- // Yellow
1304
- chart5: "27 87% 67%"
1305
- // Orange
1306
- },
1307
- night: {
1308
- chart1: "220 70% 50%",
1309
- // Blue
1310
- chart2: "160 60% 45%",
1311
- // Teal
1312
- chart3: "30 80% 55%",
1313
- // Orange
1314
- chart4: "280 65% 60%",
1315
- // Purple
1316
- chart5: "340 75% 55%"
1317
- // Pink
1318
- }
1319
- };
1320
- var textColors = {
1321
- day: {
1322
- primary: "0 0% 9%",
1323
- // Almost black
1324
- secondary: "0 0% 45%",
1325
- // Medium gray
1326
- tertiary: "0 0% 65%",
1327
- // Light gray
1328
- muted: "0 0% 38%",
1329
- // Muted gray with stronger contrast
1330
- inverse: "0 0% 100%"
1331
- // White (for dark backgrounds)
1332
- },
1333
- night: {
1334
- primary: "0 0% 89.8%",
1335
- // Light gray (#e5e7eb)
1336
- secondary: "240 5% 64.9%",
1337
- // Medium gray
1338
- tertiary: "240 5% 50%",
1339
- // Darker gray
1340
- muted: "240 5% 64.9%",
1341
- // Muted gray
1342
- inverse: "0 0% 9%"
1343
- // Almost black (for light backgrounds)
2412
+ const propsToRemove = [];
2413
+ for (let i = 0; i < style.length; i++) {
2414
+ const prop = style.item(i);
2415
+ if (prop && prop.startsWith(`--brand-${namespace}-`)) {
2416
+ propsToRemove.push(prop);
2417
+ }
1344
2418
  }
1345
- };
1346
- var baseColors = {
1347
- day: {
1348
- background: "0 0% 100%",
1349
- foreground: "0 0% 9%",
1350
- card: "0 0% 100%",
1351
- cardForeground: "0 0% 9%",
1352
- popover: "0 0% 100%",
1353
- popoverForeground: "0 0% 9%",
1354
- border: "0 0% 89.8%",
1355
- input: "0 0% 89.8%",
1356
- ring: "0 0% 3.9%"
1357
- },
1358
- night: {
1359
- background: "240 10% 3.9%",
1360
- // #0b0b10
1361
- foreground: "0 0% 89.8%",
1362
- // #e5e7eb
1363
- card: "240 10% 3.9%",
1364
- cardForeground: "0 0% 89.8%",
1365
- popover: "240 10% 5.1%",
1366
- // #0e1016
1367
- popoverForeground: "0 0% 89.8%",
1368
- border: "240 3.7% 15.9%",
1369
- input: "240 3.7% 15.9%",
1370
- ring: "240 4.9% 83.9%"
2419
+ propsToRemove.forEach((prop) => {
2420
+ style.removeProperty(prop);
2421
+ });
2422
+ root.removeAttribute("data-brand");
2423
+ root.removeAttribute("data-brand-namespace");
2424
+ if (activeNamespace === namespace) {
2425
+ clearActiveBrand();
1371
2426
  }
2427
+ }
2428
+
2429
+ // src/themes/index.ts
2430
+ var themes = {
2431
+ default: () => Promise.resolve().then(() => (init_default(), default_exports)).then((m) => m.defaultTheme),
2432
+ dark: () => Promise.resolve().then(() => (init_dark(), dark_exports)).then((m) => m.darkTheme),
2433
+ brand: () => Promise.resolve().then(() => (init_brand(), brand_exports)).then((m) => m.brandTheme)
1372
2434
  };
1373
- var cssVariableColorTokens = {
1374
- day: {
1375
- ...baseColors.day,
1376
- primary: "hsl(var(--tm-primary))",
1377
- primaryForeground: "hsl(var(--tm-primary-foreground))",
1378
- secondary: "hsl(var(--tm-secondary))",
1379
- secondaryForeground: "hsl(var(--tm-secondary-foreground))",
1380
- muted: "hsl(var(--muted))",
1381
- mutedForeground: "hsl(var(--muted-foreground))",
1382
- accent: "hsl(var(--tm-accent))",
1383
- accentForeground: "hsl(var(--tm-accent-foreground))",
1384
- destructive: `hsl(${semanticColors.day.error})`,
1385
- destructiveForeground: semanticColors.day.errorForeground,
1386
- chart1: `hsl(${chartColors.day.chart1})`,
1387
- chart2: `hsl(${chartColors.day.chart2})`,
1388
- chart3: `hsl(${chartColors.day.chart3})`,
1389
- chart4: `hsl(${chartColors.day.chart4})`,
1390
- chart5: `hsl(${chartColors.day.chart5})`
1391
- },
1392
- night: {
1393
- ...baseColors.night,
1394
- primary: "hsl(var(--tm-primary))",
1395
- primaryForeground: "hsl(var(--tm-primary-foreground))",
1396
- secondary: "hsl(var(--tm-secondary))",
1397
- secondaryForeground: "hsl(var(--tm-secondary-foreground))",
1398
- muted: "hsl(var(--muted))",
1399
- mutedForeground: "hsl(var(--muted-foreground))",
1400
- accent: "hsl(var(--tm-accent))",
1401
- accentForeground: "hsl(var(--tm-accent-foreground))",
1402
- destructive: `hsl(${semanticColors.night.error})`,
1403
- destructiveForeground: semanticColors.night.errorForeground,
1404
- chart1: `hsl(${chartColors.night.chart1})`,
1405
- chart2: `hsl(${chartColors.night.chart2})`,
1406
- chart3: `hsl(${chartColors.night.chart3})`,
1407
- chart4: `hsl(${chartColors.night.chart4})`,
1408
- chart5: `hsl(${chartColors.night.chart5})`
2435
+ async function getTheme(name) {
2436
+ const themeLoader = themes[name];
2437
+ if (!themeLoader) {
2438
+ throw new Error(`Theme "${name}" not found`);
1409
2439
  }
1410
- };
1411
- ({
1412
- // Primary scale
1413
- "--primary-50": primaryColors[50],
1414
- "--primary-100": primaryColors[100],
1415
- "--primary-200": primaryColors[200],
1416
- "--primary-300": primaryColors[300],
1417
- "--primary-400": primaryColors[400],
1418
- "--primary-500": primaryColors[500],
1419
- "--primary-600": primaryColors[600],
1420
- "--primary-700": primaryColors[700],
1421
- "--primary-800": primaryColors[800],
1422
- "--primary-900": primaryColors[900],
1423
- "--primary-950": primaryColors[950],
1424
- // Accent scale
1425
- "--accent-50": accentColors[50],
1426
- "--accent-100": accentColors[100],
1427
- "--accent-200": accentColors[200],
1428
- "--accent-300": accentColors[300],
1429
- "--accent-400": accentColors[400],
1430
- "--accent-500": accentColors[500],
1431
- "--accent-600": accentColors[600],
1432
- "--accent-700": accentColors[700],
1433
- "--accent-800": accentColors[800],
1434
- "--accent-900": accentColors[900],
1435
- "--accent-950": accentColors[950],
1436
- // Secondary scale
1437
- "--secondary-50": secondaryColors[50],
1438
- "--secondary-100": secondaryColors[100],
1439
- "--secondary-200": secondaryColors[200],
1440
- "--secondary-300": secondaryColors[300],
1441
- "--secondary-400": secondaryColors[400],
1442
- "--secondary-500": secondaryColors[500],
1443
- "--secondary-600": secondaryColors[600],
1444
- "--secondary-700": secondaryColors[700],
1445
- "--secondary-800": secondaryColors[800],
1446
- "--secondary-900": secondaryColors[900],
1447
- "--secondary-950": secondaryColors[950]
1448
- // Surface colors (mode-dependent, set dynamically by theme system)
1449
- // Note: These are set via updateCSSVariablesFromTokens() in applyMode.ts
1450
- // Semantic colors (mode-dependent, set dynamically by theme system)
1451
- // Note: These are set via updateCSSVariablesFromTokens() in applyMode.ts
1452
- // Text colors (mode-dependent, set dynamically by theme system)
1453
- // Note: These are set via updateCSSVariablesFromTokens() in applyMode.ts
1454
- // Chart colors (mode-dependent, set dynamically by theme system)
1455
- // Note: These are set via updateCSSVariablesFromTokens() in applyMode.ts
1456
- });
1457
- var tailwindThemeColors = {
1458
- // Base colors
1459
- background: "hsl(var(--background))",
1460
- foreground: "hsl(var(--foreground))",
1461
- // Card colors
1462
- card: {
1463
- DEFAULT: "hsl(var(--card))",
1464
- foreground: "hsl(var(--card-foreground))"
1465
- },
1466
- // Popover colors
1467
- popover: {
1468
- DEFAULT: "hsl(var(--popover))",
1469
- foreground: "hsl(var(--popover-foreground))"
1470
- },
1471
- // Primary colors (using CSS variables)
1472
- primary: {
1473
- DEFAULT: "hsl(var(--tm-primary))",
1474
- foreground: "hsl(var(--tm-primary-foreground))",
1475
- 50: `hsl(var(--primary-50))`,
1476
- 100: `hsl(var(--primary-100))`,
1477
- 200: `hsl(var(--primary-200))`,
1478
- 300: `hsl(var(--primary-300))`,
1479
- 400: `hsl(var(--primary-400))`,
1480
- 500: `hsl(var(--primary-500))`,
1481
- 600: `hsl(var(--primary-600))`,
1482
- 700: `hsl(var(--primary-700))`,
1483
- 800: `hsl(var(--primary-800))`,
1484
- 900: `hsl(var(--primary-900))`,
1485
- 950: `hsl(var(--primary-950))`
1486
- },
1487
- // Secondary colors
1488
- secondary: {
1489
- DEFAULT: "hsl(var(--tm-secondary))",
1490
- foreground: "hsl(var(--tm-secondary-foreground))",
1491
- 50: `hsl(var(--secondary-50))`,
1492
- 100: `hsl(var(--secondary-100))`,
1493
- 200: `hsl(var(--secondary-200))`,
1494
- 300: `hsl(var(--secondary-300))`,
1495
- 400: `hsl(var(--secondary-400))`,
1496
- 500: `hsl(var(--secondary-500))`,
1497
- 600: `hsl(var(--secondary-600))`,
1498
- 700: `hsl(var(--secondary-700))`,
1499
- 800: `hsl(var(--secondary-800))`,
1500
- 900: `hsl(var(--secondary-900))`,
1501
- 950: `hsl(var(--secondary-950))`
1502
- },
1503
- // Accent colors
1504
- accent: {
1505
- DEFAULT: "hsl(var(--tm-accent))",
1506
- foreground: "hsl(var(--tm-accent-foreground))",
1507
- 50: `hsl(var(--accent-50))`,
1508
- 100: `hsl(var(--accent-100))`,
1509
- 200: `hsl(var(--accent-200))`,
1510
- 300: `hsl(var(--accent-300))`,
1511
- 400: `hsl(var(--accent-400))`,
1512
- 500: `hsl(var(--accent-500))`,
1513
- 600: `hsl(var(--accent-600))`,
1514
- 700: `hsl(var(--accent-700))`,
1515
- 800: `hsl(var(--accent-800))`,
1516
- 900: `hsl(var(--accent-900))`,
1517
- 950: `hsl(var(--accent-950))`
1518
- },
1519
- // Muted colors
1520
- muted: {
1521
- DEFAULT: "hsl(var(--muted))",
1522
- foreground: "hsl(var(--muted-foreground))"
1523
- },
1524
- // Destructive colors (semantic error)
1525
- destructive: {
1526
- DEFAULT: "hsl(var(--destructive))",
1527
- foreground: "hsl(var(--destructive-foreground))"
1528
- },
1529
- // Semantic colors
1530
- success: {
1531
- DEFAULT: `hsl(var(--semantic-success))`,
1532
- foreground: `hsl(var(--semantic-success-foreground))`
1533
- },
1534
- error: {
1535
- DEFAULT: `hsl(var(--semantic-error))`,
1536
- foreground: `hsl(var(--semantic-error-foreground))`
1537
- },
1538
- warning: {
1539
- DEFAULT: `hsl(var(--semantic-warning))`,
1540
- foreground: `hsl(var(--semantic-warning-foreground))`
1541
- },
1542
- info: {
1543
- DEFAULT: `hsl(var(--semantic-info))`,
1544
- foreground: `hsl(var(--semantic-info-foreground))`
1545
- },
1546
- // Surface colors
1547
- surface: {
1548
- base: `hsl(var(--surface-base))`,
1549
- elevated1: `hsl(var(--surface-elevated1))`,
1550
- elevated2: `hsl(var(--surface-elevated2))`,
1551
- elevated3: `hsl(var(--surface-elevated3))`,
1552
- overlay: `hsl(var(--surface-overlay))`,
1553
- glass: `hsl(var(--surface-glass))`
1554
- },
1555
- // Text colors
1556
- text: {
1557
- primary: `hsl(var(--text-primary))`,
1558
- secondary: `hsl(var(--text-secondary))`,
1559
- tertiary: `hsl(var(--text-tertiary))`,
1560
- muted: `hsl(var(--text-muted))`,
1561
- destructive: `hsl(var(--destructive))`,
1562
- accent: `hsl(var(--tm-accent))`,
1563
- inverse: `hsl(var(--text-inverse))`
1564
- },
1565
- // Border and input
1566
- border: "hsl(var(--border))",
1567
- input: "hsl(var(--input))",
1568
- ring: "hsl(var(--ring))",
1569
- // Chart colors (using CSS variables)
1570
- chart: {
1571
- 1: `hsl(var(--chart-1))`,
1572
- 2: `hsl(var(--chart-2))`,
1573
- 3: `hsl(var(--chart-3))`,
1574
- 4: `hsl(var(--chart-4))`,
1575
- 5: `hsl(var(--chart-5))`
2440
+ return await themeLoader();
2441
+ }
2442
+
2443
+ // src/FOUNDATION/tokens/state-matrix.ts
2444
+ function getStateVariableName(component, variant, state, property) {
2445
+ const propertyMap = {
2446
+ background: "bg",
2447
+ text: "text",
2448
+ border: "border",
2449
+ outline: "outline",
2450
+ shadow: "shadow"
2451
+ };
2452
+ const propertySuffix = propertyMap[property];
2453
+ return `--${component}-${variant}-${state}-${propertySuffix}`;
2454
+ }
2455
+ function flattenStateMatrix(stateMatrix) {
2456
+ const variables = /* @__PURE__ */ new Map();
2457
+ for (const [componentName, componentStates] of Object.entries(stateMatrix)) {
2458
+ for (const [variantName, variantStates] of Object.entries(componentStates)) {
2459
+ for (const [state, stateProperties] of Object.entries(variantStates)) {
2460
+ if (stateProperties && typeof stateProperties === "object") {
2461
+ for (const [property, value] of Object.entries(stateProperties)) {
2462
+ if (value && typeof value === "string") {
2463
+ const varName = getStateVariableName(
2464
+ componentName,
2465
+ variantName,
2466
+ state,
2467
+ property
2468
+ );
2469
+ variables.set(varName, value);
2470
+ }
2471
+ }
2472
+ }
2473
+ }
2474
+ }
1576
2475
  }
1577
- };
2476
+ return variables;
2477
+ }
1578
2478
 
1579
- // src/tokens/motion.ts
1580
- var durations = {
1581
- instant: "0ms",
1582
- fast: "150ms",
1583
- // 1.5 × base (quick interactions)
1584
- normal: "300ms",
1585
- // 3 × base (default)
1586
- slow: "500ms",
1587
- // 5 × base (emphasized)
1588
- slower: "700ms",
1589
- // 7 × base (very emphasized)
1590
- slowest: "1000ms",
1591
- // 10 × base (maximum emphasis)
1592
- // Additional granular durations
1593
- "75": "75ms",
1594
- // Ultra-fast
1595
- "100": "100ms",
1596
- // Base unit
1597
- "200": "200ms",
1598
- // Fast-normal
1599
- "250": "250ms",
1600
- // Between fast and normal
1601
- "400": "400ms",
1602
- // Between normal and slow
1603
- "600": "600ms",
1604
- // Between slow and slower
1605
- "800": "800ms"
1606
- // Between slower and slowest
1607
- };
1608
- var easings = {
1609
- // Linear (no easing)
1610
- linear: "linear",
1611
- // Ease-in (accelerate) - cubic-bezier
1612
- "ease-in": "cubic-bezier(0.4, 0, 1, 1)",
1613
- // Ease-out (decelerate) - recommended for most UI - cubic-bezier
1614
- "ease-out": "cubic-bezier(0, 0, 0.2, 1)",
1615
- // Ease-in-out (accelerate and decelerate)
1616
- "ease-in-out": "cubic-bezier(0.4, 0, 0.2, 1)",
1617
- // Advanced easing functions
1618
- bounce: "cubic-bezier(0.68, -0.55, 0.265, 1.55)",
1619
- elastic: "cubic-bezier(0.175, 0.885, 0.32, 1.275)",
1620
- // Material Design easing
1621
- "ease-out-cubic": "cubic-bezier(0.215, 0.61, 0.355, 1)",
1622
- "ease-in-cubic": "cubic-bezier(0.55, 0.055, 0.675, 0.19)",
1623
- "ease-in-out-cubic": "cubic-bezier(0.645, 0.045, 0.355, 1)"
1624
- };
1625
- var transitions = {
1626
- // Fast transitions (quick interactions)
1627
- fast: `${durations.fast} ${easings["ease-out"]}`,
1628
- "fast-in": `${durations.fast} ${easings["ease-in"]}`,
1629
- "fast-out": `${durations.fast} ${easings["ease-out"]}`,
1630
- "fast-in-out": `${durations.fast} ${easings["ease-in-out"]}`,
1631
- // Normal transitions (default)
1632
- normal: `${durations.normal} ${easings["ease-in-out"]}`,
1633
- "normal-in": `${durations.normal} ${easings["ease-in"]}`,
1634
- "normal-out": `${durations.normal} ${easings["ease-out"]}`,
1635
- "normal-in-out": `${durations.normal} ${easings["ease-in-out"]}`,
1636
- // Slow transitions (emphasized)
1637
- slow: `${durations.slow} ${easings["ease-in-out"]}`,
1638
- "slow-in": `${durations.slow} ${easings["ease-in"]}`,
1639
- "slow-out": `${durations.slow} ${easings["ease-out"]}`,
1640
- "slow-in-out": `${durations.slow} ${easings["ease-in-out"]}`,
1641
- // Special transitions
1642
- bounce: `${durations.normal} ${easings.bounce}`,
1643
- elastic: `${durations.slow} ${easings.elastic}`,
1644
- // Default (normal)
1645
- DEFAULT: `${durations.normal} ${easings["ease-in-out"]}`
1646
- };
1647
- var motionCSSVariables = {
1648
- // Durations
1649
- "--duration-instant": durations.instant,
1650
- "--duration-fast": durations.fast,
1651
- "--duration-normal": durations.normal,
1652
- "--duration-slow": durations.slow,
1653
- "--duration-slower": durations.slower,
1654
- "--duration-slowest": durations.slowest,
1655
- // Additional granular durations
1656
- "--duration-75": durations["75"],
1657
- "--duration-100": durations["100"],
1658
- "--duration-200": durations["200"],
1659
- "--duration-250": durations["250"],
1660
- "--duration-400": durations["400"],
1661
- "--duration-600": durations["600"],
1662
- "--duration-800": durations["800"],
1663
- // Easings
1664
- "--ease-linear": easings.linear,
1665
- "--ease-in": easings["ease-in"],
1666
- "--ease-out": easings["ease-out"],
1667
- "--ease-in-out": easings["ease-in-out"],
1668
- "--ease-bounce": easings.bounce,
1669
- "--ease-elastic": easings.elastic,
1670
- "--ease-out-cubic": easings["ease-out-cubic"],
1671
- "--ease-in-cubic": easings["ease-in-cubic"],
1672
- "--ease-in-out-cubic": easings["ease-in-out-cubic"],
1673
- // Transitions
1674
- "--transition-fast": transitions.fast,
1675
- "--transition-normal": transitions.normal,
1676
- "--transition-slow": transitions.slow,
1677
- "--transition-default": transitions.DEFAULT,
1678
- "--transition-fast-in": transitions["fast-in"],
1679
- "--transition-fast-out": transitions["fast-out"],
1680
- "--transition-fast-in-out": transitions["fast-in-out"],
1681
- "--transition-normal-in": transitions["normal-in"],
1682
- "--transition-normal-out": transitions["normal-out"],
1683
- "--transition-normal-in-out": transitions["normal-in-out"],
1684
- "--transition-slow-in": transitions["slow-in"],
1685
- "--transition-slow-out": transitions["slow-out"],
1686
- "--transition-slow-in-out": transitions["slow-in-out"],
1687
- "--transition-bounce": transitions.bounce,
1688
- "--transition-elastic": transitions.elastic
1689
- };
2479
+ // src/FOUNDATION/tokens/states.ts
2480
+ function getButtonStateMatrix(mode, baseColors2, surfaceColors2) {
2481
+ const primaryBase = primaryColors[600];
2482
+ const primaryHover = primaryColors[700];
2483
+ const primaryActive = primaryColors[800];
2484
+ const primaryFocus = primaryColors[600];
2485
+ const primaryDisabledBg = primaryColors[300];
2486
+ const primaryDisabledText = primaryColors[400];
2487
+ const primaryLoading = primaryColors[600];
2488
+ const secondaryHover = secondaryColors[700];
2489
+ const secondaryActive = secondaryColors[800];
2490
+ const secondaryDisabledBg = secondaryColors[300];
2491
+ const secondaryDisabledText = secondaryColors[400];
2492
+ const accentHover = accentColors[700];
2493
+ const accentActive = accentColors[800];
2494
+ const accentDisabledBg = accentColors[300];
2495
+ const accentDisabledText = accentColors[400];
2496
+ const outlineHoverBg = accentColors[600];
2497
+ const outlineHoverText = accentColors[950];
2498
+ const outlineHoverBorder = accentColors[600];
2499
+ const outlineActiveBg = accentColors[700];
2500
+ const outlineActiveText = accentColors[950];
2501
+ const outlineActiveBorder = accentColors[700];
2502
+ const outlineDisabledBg = baseColors2.background;
2503
+ const outlineDisabledText = baseColors2.foreground;
2504
+ const outlineDisabledBorder = baseColors2.border;
2505
+ const ghostHoverBg = surfaceColors2.elevated1;
2506
+ const ghostHoverText = baseColors2.foreground;
2507
+ const ghostActiveBg = surfaceColors2.elevated2;
2508
+ const ghostActiveText = baseColors2.foreground;
2509
+ const ghostDisabledBg = "transparent";
2510
+ const ghostDisabledText = baseColors2.foreground;
2511
+ const destructiveHover = semanticColors[mode].error;
2512
+ const destructiveActive = semanticColors[mode].error;
2513
+ const destructiveDisabledBg = semanticColors[mode].error;
2514
+ const destructiveDisabledText = semanticColors[mode].errorForeground;
2515
+ return {
2516
+ button: {
2517
+ primary: {
2518
+ base: {
2519
+ background: primaryBase
2520
+ },
2521
+ hover: {
2522
+ background: primaryHover
2523
+ },
2524
+ active: {
2525
+ background: primaryActive
2526
+ },
2527
+ focus: {
2528
+ background: primaryFocus
2529
+ },
2530
+ disabled: {
2531
+ background: primaryDisabledBg,
2532
+ text: primaryDisabledText
2533
+ },
2534
+ loading: {
2535
+ background: primaryLoading
2536
+ }
2537
+ },
2538
+ secondary: {
2539
+ hover: {
2540
+ background: secondaryHover
2541
+ },
2542
+ active: {
2543
+ background: secondaryActive
2544
+ },
2545
+ disabled: {
2546
+ background: secondaryDisabledBg,
2547
+ text: secondaryDisabledText
2548
+ }
2549
+ },
2550
+ accent: {
2551
+ hover: {
2552
+ background: accentHover
2553
+ },
2554
+ active: {
2555
+ background: accentActive
2556
+ },
2557
+ disabled: {
2558
+ background: accentDisabledBg,
2559
+ text: accentDisabledText
2560
+ }
2561
+ },
2562
+ outline: {
2563
+ hover: {
2564
+ background: outlineHoverBg,
2565
+ text: outlineHoverText,
2566
+ border: outlineHoverBorder
2567
+ },
2568
+ active: {
2569
+ background: outlineActiveBg,
2570
+ text: outlineActiveText,
2571
+ border: outlineActiveBorder
2572
+ },
2573
+ disabled: {
2574
+ background: outlineDisabledBg,
2575
+ text: outlineDisabledText,
2576
+ border: outlineDisabledBorder
2577
+ }
2578
+ },
2579
+ ghost: {
2580
+ hover: {
2581
+ background: ghostHoverBg,
2582
+ text: ghostHoverText
2583
+ },
2584
+ active: {
2585
+ background: ghostActiveBg,
2586
+ text: ghostActiveText
2587
+ },
2588
+ disabled: {
2589
+ background: ghostDisabledBg,
2590
+ text: ghostDisabledText
2591
+ }
2592
+ },
2593
+ destructive: {
2594
+ hover: {
2595
+ background: destructiveHover
2596
+ },
2597
+ active: {
2598
+ background: destructiveActive
2599
+ },
2600
+ disabled: {
2601
+ background: destructiveDisabledBg,
2602
+ text: destructiveDisabledText
2603
+ }
2604
+ }
2605
+ }
2606
+ };
2607
+ }
2608
+
2609
+ // src/FOUNDATION/theme/applyStateMatrix.ts
2610
+ function getMergedBaseTokens(_mode) {
2611
+ return {
2612
+ baseColors,
2613
+ surfaceColors
2614
+ };
2615
+ }
2616
+ function getAllStateMatrices(mode) {
2617
+ const { baseColors: baseColors2, surfaceColors: surfaceColors2 } = getMergedBaseTokens();
2618
+ const buttonMatrix = getButtonStateMatrix(mode, baseColors2[mode], surfaceColors2[mode]);
2619
+ return {
2620
+ ...buttonMatrix
2621
+ // Add other component matrices here as they are implemented
2622
+ // input: getInputStateMatrix(mode, baseColors[mode], surfaceColors[mode]),
2623
+ // select: getSelectStateMatrix(mode, baseColors[mode], surfaceColors[mode]),
2624
+ };
2625
+ }
2626
+ function updateStateMatrixFromTokens(mode) {
2627
+ if (typeof document === "undefined" || !document.documentElement) return;
2628
+ const root = document.documentElement;
2629
+ let stateMatrix;
2630
+ try {
2631
+ stateMatrix = getAllStateMatrices(mode);
2632
+ } catch (error) {
2633
+ console.error("[State Matrix] Failed to get state matrices:", error);
2634
+ return;
2635
+ }
2636
+ let variables;
2637
+ try {
2638
+ variables = flattenStateMatrix(stateMatrix);
2639
+ } catch (error) {
2640
+ console.error("[State Matrix] Failed to flatten state matrix:", error);
2641
+ return;
2642
+ }
2643
+ const hoverVars = {};
2644
+ variables.forEach((value, varName) => {
2645
+ try {
2646
+ root.style.setProperty(varName, value);
2647
+ if (varName.includes("hover") || varName.includes("active") || varName.includes("disabled")) {
2648
+ hoverVars[varName] = value;
2649
+ }
2650
+ } catch (error) {
2651
+ console.error(`[State Matrix] Failed to set variable ${varName}:`, error);
2652
+ }
2653
+ });
2654
+ if (typeof window !== "undefined") {
2655
+ const primaryHoverVar = root.style.getPropertyValue("--button-primary-hover-bg");
2656
+ const primaryHoverComputed = typeof getComputedStyle !== "undefined" ? getComputedStyle(root).getPropertyValue("--button-primary-hover-bg") : "N/A";
2657
+ fetch("http://127.0.0.1:7243/ingest/ff5d1e20-0815-4ca0-af82-fcbd3cfa35b1", {
2658
+ method: "POST",
2659
+ headers: { "Content-Type": "application/json" },
2660
+ body: JSON.stringify({
2661
+ location: "applyStateMatrix.ts:103",
2662
+ message: "State variables set check",
2663
+ data: {
2664
+ totalVars: variables.size,
2665
+ hoverVarsCount: Object.keys(hoverVars).length,
2666
+ primaryHoverVar,
2667
+ primaryHoverComputed,
2668
+ sampleHoverVars: Object.fromEntries(Object.entries(hoverVars).slice(0, 5))
2669
+ },
2670
+ timestamp: Date.now(),
2671
+ sessionId: "debug-session",
2672
+ runId: "run1",
2673
+ hypothesisId: "B"
2674
+ })
2675
+ }).catch(() => {
2676
+ });
2677
+ }
2678
+ }
1690
2679
 
1691
- // src/theme/applyMode.ts
2680
+ // src/FOUNDATION/theme/applyMode.ts
1692
2681
  var MODE_ATTRIBUTE = "data-mode";
1693
2682
  var THEME_ATTRIBUTE = "data-theme-name";
1694
2683
  var MODE_THEME_ATTRIBUTE = "data-theme";
@@ -1781,9 +2770,30 @@ function getMergedTokens(_mode) {
1781
2770
  };
1782
2771
  }
1783
2772
  function updateCSSVariablesFromTokens(mode) {
1784
- if (typeof document === "undefined") return;
2773
+ if (typeof document === "undefined" || !document.documentElement) return;
1785
2774
  const root = document.documentElement;
1786
- const tokens = getMergedTokens();
2775
+ let tokens;
2776
+ try {
2777
+ tokens = getMergedTokens(mode);
2778
+ } catch (error) {
2779
+ console.error("[Theme] Failed to get merged tokens:", error);
2780
+ return;
2781
+ }
2782
+ const secondary800 = tokens.secondaryColors[800];
2783
+ fetch("http://127.0.0.1:7243/ingest/ff5d1e20-0815-4ca0-af82-fcbd3cfa35b1", {
2784
+ method: "POST",
2785
+ headers: { "Content-Type": "application/json" },
2786
+ body: JSON.stringify({
2787
+ location: "applyMode.ts:188",
2788
+ message: "tokens retrieved",
2789
+ data: { hasTokens: !!tokens, secondary800, hasSecondary800: !!secondary800 },
2790
+ timestamp: Date.now(),
2791
+ sessionId: "debug-session",
2792
+ runId: "run1",
2793
+ hypothesisId: "B"
2794
+ })
2795
+ }).catch(() => {
2796
+ });
1787
2797
  const {
1788
2798
  primaryColors: primaryColors2,
1789
2799
  accentColors: accentColors2,
@@ -1794,99 +2804,192 @@ function updateCSSVariablesFromTokens(mode) {
1794
2804
  textColors: textColors2,
1795
2805
  chartColors: chartColors2
1796
2806
  } = tokens;
1797
- const base = baseColors2[mode];
1798
- root.style.setProperty("--background", base.background);
1799
- root.style.setProperty("--foreground", base.foreground);
1800
- root.style.setProperty("--card", base.card);
1801
- root.style.setProperty("--card-foreground", base.cardForeground);
1802
- root.style.setProperty("--popover", base.popover);
1803
- root.style.setProperty("--popover-foreground", base.popoverForeground);
1804
- root.style.setProperty("--border", base.border);
1805
- root.style.setProperty("--input", base.input);
1806
- root.style.setProperty("--ring", base.ring);
1807
- const surface = surfaceColors2[mode];
1808
- root.style.setProperty("--surface-base", surface.base);
1809
- root.style.setProperty("--surface-elevated1", surface.elevated1);
1810
- root.style.setProperty("--surface-elevated2", surface.elevated2);
1811
- root.style.setProperty("--surface-elevated3", surface.elevated3);
1812
- root.style.setProperty("--surface-overlay", surface.overlay);
1813
- root.style.setProperty("--surface-glass", surface.glass);
1814
- const semantic = semanticColors2[mode];
1815
- root.style.setProperty("--semantic-success", semantic.success);
1816
- root.style.setProperty("--semantic-success-foreground", semantic.successForeground);
1817
- root.style.setProperty("--semantic-error", semantic.error);
1818
- root.style.setProperty("--semantic-error-foreground", semantic.errorForeground);
1819
- root.style.setProperty("--semantic-warning", semantic.warning);
1820
- root.style.setProperty("--semantic-warning-foreground", semantic.warningForeground);
1821
- root.style.setProperty("--semantic-info", semantic.info);
1822
- root.style.setProperty("--semantic-info-foreground", semantic.infoForeground);
1823
- const text = textColors2[mode];
1824
- root.style.setProperty("--text-primary", text.primary);
1825
- root.style.setProperty("--text-secondary", text.secondary);
1826
- root.style.setProperty("--text-tertiary", text.tertiary);
1827
- root.style.setProperty("--text-muted", text.muted);
1828
- root.style.setProperty("--text-inverse", text.inverse);
1829
- const chart = chartColors2[mode];
1830
- root.style.setProperty("--chart-1", chart.chart1);
1831
- root.style.setProperty("--chart-2", chart.chart2);
1832
- root.style.setProperty("--chart-3", chart.chart3);
1833
- root.style.setProperty("--chart-4", chart.chart4);
1834
- root.style.setProperty("--chart-5", chart.chart5);
1835
- root.style.setProperty("--primary-50", primaryColors2[50]);
1836
- root.style.setProperty("--primary-100", primaryColors2[100]);
1837
- root.style.setProperty("--primary-200", primaryColors2[200]);
1838
- root.style.setProperty("--primary-300", primaryColors2[300]);
1839
- root.style.setProperty("--primary-400", primaryColors2[400]);
1840
- root.style.setProperty("--primary-500", primaryColors2[500]);
1841
- root.style.setProperty("--primary-600", primaryColors2[600]);
1842
- root.style.setProperty("--primary-700", primaryColors2[700]);
1843
- root.style.setProperty("--primary-800", primaryColors2[800]);
1844
- root.style.setProperty("--primary-900", primaryColors2[900]);
1845
- root.style.setProperty("--primary-950", primaryColors2[950]);
1846
- root.style.setProperty("--accent-50", accentColors2[50]);
1847
- root.style.setProperty("--accent-100", accentColors2[100]);
1848
- root.style.setProperty("--accent-200", accentColors2[200]);
1849
- root.style.setProperty("--accent-300", accentColors2[300]);
1850
- root.style.setProperty("--accent-400", accentColors2[400]);
1851
- root.style.setProperty("--accent-500", accentColors2[500]);
1852
- root.style.setProperty("--accent-600", accentColors2[600]);
1853
- root.style.setProperty("--accent-700", accentColors2[700]);
1854
- root.style.setProperty("--accent-800", accentColors2[800]);
1855
- root.style.setProperty("--accent-900", accentColors2[900]);
1856
- root.style.setProperty("--accent-950", accentColors2[950]);
1857
- root.style.setProperty("--secondary-50", secondaryColors2[50]);
1858
- root.style.setProperty("--secondary-100", secondaryColors2[100]);
1859
- root.style.setProperty("--secondary-200", secondaryColors2[200]);
1860
- root.style.setProperty("--secondary-300", secondaryColors2[300]);
1861
- root.style.setProperty("--secondary-400", secondaryColors2[400]);
1862
- root.style.setProperty("--secondary-500", secondaryColors2[500]);
1863
- root.style.setProperty("--secondary-600", secondaryColors2[600]);
1864
- root.style.setProperty("--secondary-700", secondaryColors2[700]);
1865
- root.style.setProperty("--secondary-800", secondaryColors2[800]);
1866
- root.style.setProperty("--secondary-900", secondaryColors2[900]);
1867
- root.style.setProperty("--secondary-950", secondaryColors2[950]);
1868
- if (mode === "day") {
1869
- root.style.setProperty("--tm-primary", secondaryColors2[500]);
1870
- root.style.setProperty("--tm-primary-foreground", "0 0% 100%");
1871
- root.style.setProperty("--tm-secondary", "0 0% 95.7%");
1872
- root.style.setProperty("--tm-secondary-foreground", "0 0% 6.7%");
1873
- root.style.setProperty("--tm-accent", "0 0% 89.8%");
1874
- root.style.setProperty("--tm-accent-foreground", "0 0% 6.7%");
1875
- } else {
1876
- root.style.setProperty("--tm-primary", accentColors2[600]);
1877
- root.style.setProperty("--tm-primary-foreground", "0 0% 100%");
1878
- root.style.setProperty("--tm-secondary", "240 10% 7%");
1879
- root.style.setProperty("--tm-secondary-foreground", "0 0% 89.8%");
1880
- root.style.setProperty("--tm-accent", "240 10% 10%");
1881
- root.style.setProperty("--tm-accent-foreground", "0 0% 89.8%");
1882
- }
1883
- root.style.setProperty("--muted", base.card);
1884
- root.style.setProperty("--muted-foreground", base.cardForeground);
1885
- root.style.setProperty("--destructive", semantic.error);
1886
- root.style.setProperty("--destructive-foreground", semantic.errorForeground);
1887
- Object.entries(motionCSSVariables).forEach(([key, value]) => {
1888
- root.style.setProperty(key, value);
1889
- });
2807
+ try {
2808
+ const base = baseColors2[mode];
2809
+ root.style.setProperty("--background", base.background);
2810
+ root.style.setProperty("--foreground", base.foreground);
2811
+ root.style.setProperty("--card", base.card);
2812
+ root.style.setProperty("--card-foreground", base.cardForeground);
2813
+ root.style.setProperty("--popover", base.popover);
2814
+ root.style.setProperty("--popover-foreground", base.popoverForeground);
2815
+ root.style.setProperty("--border", base.border);
2816
+ root.style.setProperty("--input", base.input);
2817
+ root.style.setProperty("--ring", base.ring);
2818
+ } catch (error) {
2819
+ console.error("[Theme] Failed to set base colors:", error);
2820
+ }
2821
+ try {
2822
+ const surface = surfaceColors2[mode];
2823
+ root.style.setProperty("--surface-base", surface.base);
2824
+ root.style.setProperty("--surface-elevated1", surface.elevated1);
2825
+ root.style.setProperty("--surface-elevated2", surface.elevated2);
2826
+ root.style.setProperty("--surface-elevated3", surface.elevated3);
2827
+ root.style.setProperty("--surface-overlay", surface.overlay);
2828
+ root.style.setProperty("--surface-glass", surface.glass);
2829
+ } catch (error) {
2830
+ console.error("[Theme] Failed to set surface colors:", error);
2831
+ }
2832
+ try {
2833
+ const semantic = semanticColors2[mode];
2834
+ root.style.setProperty("--semantic-success", semantic.success);
2835
+ root.style.setProperty("--semantic-success-foreground", semantic.successForeground);
2836
+ root.style.setProperty("--semantic-error", semantic.error);
2837
+ root.style.setProperty("--semantic-error-foreground", semantic.errorForeground);
2838
+ root.style.setProperty("--semantic-warning", semantic.warning);
2839
+ root.style.setProperty("--semantic-warning-foreground", semantic.warningForeground);
2840
+ root.style.setProperty("--semantic-info", semantic.info);
2841
+ root.style.setProperty("--semantic-info-foreground", semantic.infoForeground);
2842
+ } catch (error) {
2843
+ console.error("[Theme] Failed to set semantic colors:", error);
2844
+ }
2845
+ try {
2846
+ const text = textColors2[mode];
2847
+ root.style.setProperty("--text-primary", text.primary);
2848
+ root.style.setProperty("--text-secondary", text.secondary);
2849
+ root.style.setProperty("--text-tertiary", text.tertiary);
2850
+ root.style.setProperty("--text-muted", text.muted);
2851
+ root.style.setProperty("--text-inverse", text.inverse);
2852
+ } catch (error) {
2853
+ console.error("[Theme] Failed to set text colors:", error);
2854
+ }
2855
+ try {
2856
+ const chart = chartColors2[mode];
2857
+ root.style.setProperty("--chart-1", chart.chart1);
2858
+ root.style.setProperty("--chart-2", chart.chart2);
2859
+ root.style.setProperty("--chart-3", chart.chart3);
2860
+ root.style.setProperty("--chart-4", chart.chart4);
2861
+ root.style.setProperty("--chart-5", chart.chart5);
2862
+ } catch (error) {
2863
+ console.error("[Theme] Failed to set chart colors:", error);
2864
+ }
2865
+ try {
2866
+ root.style.setProperty("--primary-50", primaryColors2[50]);
2867
+ root.style.setProperty("--primary-100", primaryColors2[100]);
2868
+ root.style.setProperty("--primary-200", primaryColors2[200]);
2869
+ root.style.setProperty("--primary-300", primaryColors2[300]);
2870
+ root.style.setProperty("--primary-400", primaryColors2[400]);
2871
+ root.style.setProperty("--primary-500", primaryColors2[500]);
2872
+ root.style.setProperty("--primary-600", primaryColors2[600]);
2873
+ root.style.setProperty("--primary-700", primaryColors2[700]);
2874
+ root.style.setProperty("--primary-800", primaryColors2[800]);
2875
+ root.style.setProperty("--primary-900", primaryColors2[900]);
2876
+ root.style.setProperty("--primary-950", primaryColors2[950]);
2877
+ } catch (error) {
2878
+ console.error("[Theme] Failed to set primary color scale:", error);
2879
+ }
2880
+ try {
2881
+ root.style.setProperty("--accent-50", accentColors2[50]);
2882
+ root.style.setProperty("--accent-100", accentColors2[100]);
2883
+ root.style.setProperty("--accent-200", accentColors2[200]);
2884
+ root.style.setProperty("--accent-300", accentColors2[300]);
2885
+ root.style.setProperty("--accent-400", accentColors2[400]);
2886
+ root.style.setProperty("--accent-500", accentColors2[500]);
2887
+ root.style.setProperty("--accent-600", accentColors2[600]);
2888
+ root.style.setProperty("--accent-700", accentColors2[700]);
2889
+ root.style.setProperty("--accent-800", accentColors2[800]);
2890
+ root.style.setProperty("--accent-900", accentColors2[900]);
2891
+ root.style.setProperty("--accent-950", accentColors2[950]);
2892
+ } catch (error) {
2893
+ console.error("[Theme] Failed to set accent color scale:", error);
2894
+ }
2895
+ try {
2896
+ root.style.setProperty("--secondary-50", secondaryColors2[50]);
2897
+ root.style.setProperty("--secondary-100", secondaryColors2[100]);
2898
+ root.style.setProperty("--secondary-200", secondaryColors2[200]);
2899
+ root.style.setProperty("--secondary-300", secondaryColors2[300]);
2900
+ root.style.setProperty("--secondary-400", secondaryColors2[400]);
2901
+ root.style.setProperty("--secondary-500", secondaryColors2[500]);
2902
+ root.style.setProperty("--secondary-600", secondaryColors2[600]);
2903
+ root.style.setProperty("--secondary-700", secondaryColors2[700]);
2904
+ root.style.setProperty("--secondary-800", secondaryColors2[800]);
2905
+ root.style.setProperty("--secondary-900", secondaryColors2[900]);
2906
+ root.style.setProperty("--secondary-950", secondaryColors2[950]);
2907
+ } catch (error) {
2908
+ console.error("[Theme] Failed to set secondary color scale:", error);
2909
+ }
2910
+ try {
2911
+ if (mode === "day") {
2912
+ root.style.setProperty("--tm-primary", secondaryColors2[800]);
2913
+ root.style.setProperty("--tm-primary-foreground", "0 0% 100%");
2914
+ root.style.setProperty("--tm-secondary", secondaryColors2[600]);
2915
+ root.style.setProperty("--tm-secondary-foreground", "0 0% 100%");
2916
+ root.style.setProperty("--tm-accent", accentColors2[600]);
2917
+ root.style.setProperty("--tm-accent-foreground", "0 0% 100%");
2918
+ } else {
2919
+ root.style.setProperty("--tm-primary", accentColors2[600]);
2920
+ root.style.setProperty("--tm-primary-foreground", "0 0% 100%");
2921
+ root.style.setProperty("--tm-secondary", "240 10% 7%");
2922
+ root.style.setProperty("--tm-secondary-foreground", "0 0% 89.8%");
2923
+ root.style.setProperty("--tm-accent", "240 10% 10%");
2924
+ root.style.setProperty("--tm-accent-foreground", "0 0% 89.8%");
2925
+ }
2926
+ } catch (error) {
2927
+ console.error("[Theme] Failed to set Tenerife brand colors:", error);
2928
+ }
2929
+ try {
2930
+ const base = baseColors2[mode];
2931
+ root.style.setProperty("--muted", base.card);
2932
+ root.style.setProperty("--muted-foreground", base.cardForeground);
2933
+ } catch (error) {
2934
+ console.error("[Theme] Failed to set muted colors:", error);
2935
+ }
2936
+ try {
2937
+ const accentValue = mode === "day" ? accentColors2[600] : "240 10% 10%";
2938
+ const accentForegroundValue = mode === "day" ? "0 0% 100%" : "0 0% 89.8%";
2939
+ root.style.setProperty("--accent", accentValue);
2940
+ root.style.setProperty("--accent-foreground", accentForegroundValue);
2941
+ } catch (error) {
2942
+ console.error("[Theme] Failed to set accent aliases:", error);
2943
+ }
2944
+ try {
2945
+ const semantic = semanticColors2[mode];
2946
+ root.style.setProperty("--destructive", semantic.error);
2947
+ root.style.setProperty("--destructive-foreground", semantic.errorForeground);
2948
+ } catch (error) {
2949
+ console.error("[Theme] Failed to set destructive colors:", error);
2950
+ }
2951
+ try {
2952
+ Object.entries(motionCSSVariables).forEach(([key, value]) => {
2953
+ root.style.setProperty(key, value);
2954
+ });
2955
+ } catch (error) {
2956
+ console.error("[Theme] Failed to set motion CSS variables:", error);
2957
+ }
2958
+ try {
2959
+ Object.entries(motionV2CSSVariables).forEach(([key, value]) => {
2960
+ root.style.setProperty(key, value);
2961
+ });
2962
+ } catch (error) {
2963
+ console.error("[Theme] Failed to set motion V2 CSS variables:", error);
2964
+ }
2965
+ try {
2966
+ Object.entries(radiusCSSVariables).forEach(([key, value]) => {
2967
+ root.style.setProperty(key, value);
2968
+ });
2969
+ } catch (error) {
2970
+ console.error("[Theme] Failed to set radius CSS variables:", error);
2971
+ }
2972
+ try {
2973
+ Object.entries(shadowCSSVariables).forEach(([key, value]) => {
2974
+ root.style.setProperty(key, value);
2975
+ });
2976
+ } catch (error) {
2977
+ console.error("[Theme] Failed to set shadow CSS variables:", error);
2978
+ }
2979
+ try {
2980
+ Object.entries(spacingCSSVariables).forEach(([key, value]) => {
2981
+ root.style.setProperty(key, value);
2982
+ });
2983
+ } catch (error) {
2984
+ console.error("[Theme] Failed to set spacing CSS variables:", error);
2985
+ }
2986
+ try {
2987
+ Object.entries(typographyCSSVariables).forEach(([key, value]) => {
2988
+ root.style.setProperty(key, value);
2989
+ });
2990
+ } catch (error) {
2991
+ console.error("[Theme] Failed to set typography CSS variables:", error);
2992
+ }
1890
2993
  }
1891
2994
  async function applyDocumentTheme(mode, themeName = "default", brandId = null) {
1892
2995
  if (typeof document === "undefined") return;
@@ -1913,6 +3016,7 @@ async function applyDocumentTheme(mode, themeName = "default", brandId = null) {
1913
3016
  root.classList.remove(DARK_CLASS);
1914
3017
  }
1915
3018
  updateCSSVariablesFromTokens(mode);
3019
+ updateStateMatrixFromTokens(mode);
1916
3020
  const tokens = getMergedTokens();
1917
3021
  const { background, foreground } = tokens.baseColors[mode];
1918
3022
  if (body) {
@@ -1986,7 +3090,7 @@ function persistBrand(brandId, storageKey = "tm_brand") {
1986
3090
  }
1987
3091
  }
1988
3092
 
1989
- // src/theme/registry.ts
3093
+ // src/FOUNDATION/theme/registry.ts
1990
3094
  var themeRegistry = /* @__PURE__ */ new Map();
1991
3095
  function registerTheme(entry) {
1992
3096
  themeRegistry.set(entry.metadata.id, entry);
@@ -2066,7 +3170,7 @@ function initializeDefaultThemes() {
2066
3170
  }
2067
3171
  initializeDefaultThemes();
2068
3172
 
2069
- // src/theme/schema.ts
3173
+ // src/FOUNDATION/theme/schema.ts
2070
3174
  var REQUIRED_FIELDS = ["id", "name"];
2071
3175
  function validateThemeSchema(theme) {
2072
3176
  const errors = [];
@@ -2160,7 +3264,7 @@ function createMinimalThemeSchema(id, name) {
2160
3264
  };
2161
3265
  }
2162
3266
 
2163
- // src/theme/loader.ts
3267
+ // src/FOUNDATION/theme/loader.ts
2164
3268
  var DEFAULT_OPTIONS = {
2165
3269
  fallbackThemeId: "default",
2166
3270
  validate: true,
@@ -2237,8 +3341,8 @@ async function canLoadTheme(themeId) {
2237
3341
  }
2238
3342
  }
2239
3343
 
2240
- // src/theme/spacing.ts
2241
- var spacing = {
3344
+ // src/FOUNDATION/theme/spacing.ts
3345
+ var spacing2 = {
2242
3346
  none: "0",
2243
3347
  xs: "0.25rem",
2244
3348
  // 4px
@@ -2259,7 +3363,7 @@ var spacing = {
2259
3363
  "5xl": "5rem"
2260
3364
  // 80px
2261
3365
  };
2262
- var borderRadius = {
3366
+ var borderRadius2 = {
2263
3367
  none: "0px",
2264
3368
  sm: "0.125rem",
2265
3369
  // 2px
@@ -2442,6 +3546,23 @@ function ThemeProvider({
2442
3546
  }
2443
3547
  }, [reduceMotionOverride, enableAnimationsOverride]);
2444
3548
  React__default.default.useEffect(() => {
3549
+ if (typeof document !== "undefined" && document.documentElement) {
3550
+ const beforeApply = document.documentElement.style.getPropertyValue("--tm-primary");
3551
+ fetch("http://127.0.0.1:7243/ingest/ff5d1e20-0815-4ca0-af82-fcbd3cfa35b1", {
3552
+ method: "POST",
3553
+ headers: { "Content-Type": "application/json" },
3554
+ body: JSON.stringify({
3555
+ location: "ThemeProvider.tsx:281",
3556
+ message: "ThemeProvider useEffect before applyDocumentTheme",
3557
+ data: { beforeValue: beforeApply, hasValue: !!beforeApply },
3558
+ timestamp: Date.now(),
3559
+ sessionId: "debug-session",
3560
+ runId: "run1",
3561
+ hypothesisId: "C"
3562
+ })
3563
+ }).catch(() => {
3564
+ });
3565
+ }
2445
3566
  const initialMode = getInitialMode(defaultMode, storageKey, enableSystem);
2446
3567
  const initialTheme = getInitialTheme(defaultTheme2, themeStorageKey);
2447
3568
  const initialBrand = getInitialBrand(defaultBrand, brandStorageKey);
@@ -2449,6 +3570,25 @@ function ThemeProvider({
2449
3570
  setThemeState(initialTheme);
2450
3571
  setBrandState(initialBrand);
2451
3572
  applyDocumentTheme(initialMode, initialTheme, initialBrand);
3573
+ if (typeof document !== "undefined" && document.documentElement) {
3574
+ setTimeout(() => {
3575
+ const afterApply = document.documentElement.style.getPropertyValue("--tm-primary");
3576
+ fetch("http://127.0.0.1:7243/ingest/ff5d1e20-0815-4ca0-af82-fcbd3cfa35b1", {
3577
+ method: "POST",
3578
+ headers: { "Content-Type": "application/json" },
3579
+ body: JSON.stringify({
3580
+ location: "ThemeProvider.tsx:289",
3581
+ message: "ThemeProvider useEffect after applyDocumentTheme",
3582
+ data: { afterValue: afterApply, hasValue: !!afterApply },
3583
+ timestamp: Date.now(),
3584
+ sessionId: "debug-session",
3585
+ runId: "run1",
3586
+ hypothesisId: "C"
3587
+ })
3588
+ }).catch(() => {
3589
+ });
3590
+ }, 100);
3591
+ }
2452
3592
  persistMode(initialMode, storageKey);
2453
3593
  persistTheme(initialTheme, themeStorageKey);
2454
3594
  persistBrand(initialBrand, brandStorageKey);
@@ -2477,7 +3617,45 @@ function ThemeProvider({
2477
3617
  return () => mediaQuery.removeEventListener("change", handleChange);
2478
3618
  }, [enableSystem, storageKey, setMode]);
2479
3619
  React__default.default.useEffect(() => {
3620
+ if (typeof document !== "undefined" && document.documentElement) {
3621
+ const beforeChange = document.documentElement.style.getPropertyValue("--tm-primary");
3622
+ fetch("http://127.0.0.1:7243/ingest/ff5d1e20-0815-4ca0-af82-fcbd3cfa35b1", {
3623
+ method: "POST",
3624
+ headers: { "Content-Type": "application/json" },
3625
+ body: JSON.stringify({
3626
+ location: "ThemeProvider.tsx:325",
3627
+ message: "ThemeProvider useEffect mode/theme/brand change",
3628
+ data: { mode, theme, brand, beforeValue: beforeChange, hasValue: !!beforeChange },
3629
+ timestamp: Date.now(),
3630
+ sessionId: "debug-session",
3631
+ runId: "run1",
3632
+ hypothesisId: "C"
3633
+ })
3634
+ }).catch(() => {
3635
+ });
3636
+ }
2480
3637
  applyDocumentTheme(mode, theme, brand);
3638
+ if (typeof document !== "undefined" && document.documentElement) {
3639
+ setTimeout(() => {
3640
+ if (typeof document !== "undefined" && document.documentElement) {
3641
+ const afterChange = document.documentElement.style.getPropertyValue("--tm-primary");
3642
+ fetch("http://127.0.0.1:7243/ingest/ff5d1e20-0815-4ca0-af82-fcbd3cfa35b1", {
3643
+ method: "POST",
3644
+ headers: { "Content-Type": "application/json" },
3645
+ body: JSON.stringify({
3646
+ location: "ThemeProvider.tsx:327",
3647
+ message: "ThemeProvider useEffect after applyDocumentTheme change",
3648
+ data: { afterValue: afterChange, hasValue: !!afterChange },
3649
+ timestamp: Date.now(),
3650
+ sessionId: "debug-session",
3651
+ runId: "run1",
3652
+ hypothesisId: "C"
3653
+ })
3654
+ }).catch(() => {
3655
+ });
3656
+ }
3657
+ }, 100);
3658
+ }
2481
3659
  }, [mode, theme, brand]);
2482
3660
  const value = React__default.default.useMemo(
2483
3661
  () => ({
@@ -2519,7 +3697,7 @@ function useTheme() {
2519
3697
  return context;
2520
3698
  }
2521
3699
 
2522
- // src/theme/typography.ts
3700
+ // src/FOUNDATION/theme/typography.ts
2523
3701
  var fontFamilies = {
2524
3702
  sans: [
2525
3703
  "ui-sans-serif",
@@ -2600,7 +3778,7 @@ var letterSpacings = {
2600
3778
  };
2601
3779
 
2602
3780
  exports.ThemeProvider = ThemeProvider;
2603
- exports.borderRadius = borderRadius;
3781
+ exports.borderRadius = borderRadius2;
2604
3782
  exports.canLoadTheme = canLoadTheme;
2605
3783
  exports.createMinimalThemeSchema = createMinimalThemeSchema;
2606
3784
  exports.cssVariableColorTokens = cssVariableColorTokens;
@@ -2626,7 +3804,7 @@ exports.persistTheme = persistTheme;
2626
3804
  exports.preloadThemes = preloadThemes;
2627
3805
  exports.registerTheme = registerTheme;
2628
3806
  exports.shadows = shadows;
2629
- exports.spacing = spacing;
3807
+ exports.spacing = spacing2;
2630
3808
  exports.tailwindThemeColors = tailwindThemeColors;
2631
3809
  exports.themeExists = themeExists;
2632
3810
  exports.themeRegistry = themeRegistry;