@tac-ui/tokens 0.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.
@@ -0,0 +1,723 @@
1
+ // src/semantic.ts
2
+ var semanticTokens = {
3
+ light: {
4
+ // ── Canvas & Surface (Off-white paper base) ──
5
+ background: "#FAFAFA",
6
+ // Off-white base
7
+ backgroundSubtle: "#F4F4F5",
8
+ // Slightly darker gray
9
+ surface: "#FCFCFC",
10
+ // Just faintly off-white surface
11
+ surfaceHover: "#F4F4F5",
12
+ surfaceBase: "#FAFAFA",
13
+ surfaceElevatedLow: "#FCFCFC",
14
+ surfaceElevatedMid: "#FCFCFC",
15
+ surfaceElevatedHigh: "#FCFCFC",
16
+ card: "#FCFCFC",
17
+ cardForeground: "#121212",
18
+ // Barely off-black
19
+ // ── Text ──
20
+ foreground: "#121212",
21
+ muted: "#F4F4F5",
22
+ mutedForeground: "#71717A",
23
+ // ── Brand ──
24
+ primary: "#1E232D",
25
+ // Iron Navy
26
+ primaryHover: "#2A303D",
27
+ // Slightly lighter for hover
28
+ primaryForeground: "#FAFAFA",
29
+ secondary: "#E4E4E7",
30
+ // Darkened from F4F4F5 for better visibility
31
+ secondaryForeground: "#1E232D",
32
+ ring: "#1E232D",
33
+ // ── Point / Accent (Steel Navy) ──
34
+ point: "#323944",
35
+ pointHover: "#4A5361",
36
+ pointForeground: "#FAFAFA",
37
+ pointSubtle: "rgba(30, 35, 45, 0.08)",
38
+ // ── Border ──
39
+ border: "#E4E4E7",
40
+ input: "#E4E4E7",
41
+ // ── Gray Scale ──
42
+ gray50: "#FAFAFA",
43
+ gray100: "#F4F4F5",
44
+ gray200: "#E4E4E7",
45
+ gray300: "#D4D4D8",
46
+ gray400: "#A1A1AA",
47
+ gray500: "#71717A",
48
+ gray600: "#52525B",
49
+ gray700: "#3F3F46",
50
+ gray800: "#27272A",
51
+ gray900: "#18181B",
52
+ // ── Glass & Effects ──
53
+ glassBg: "rgba(252, 252, 252, 0.85)",
54
+ glassBorder: "rgba(18, 18, 18, 0.04)",
55
+ glassInset: "inset 0 1px 0 rgba(250, 250, 250, 0.6)",
56
+ glassPanelShadow: "0 12px 40px rgba(18, 18, 18, 0.04), 0 1px 3px rgba(18, 18, 18, 0.02)",
57
+ accentGlow: "0 0 0 transparent",
58
+ // ── Gradients ──
59
+ gradientBrand: "none",
60
+ gradientBrandHover: "none",
61
+ gradientSubtle: "none",
62
+ gradientAccent: "none",
63
+ gradientAccentVivid: "none",
64
+ gradientGlow: "none",
65
+ gradientMesh: "none",
66
+ gradientSurface: "none",
67
+ gradientGlowShadow: "none",
68
+ // ── Shadow ──
69
+ shadowColor: "rgba(18, 18, 18, 0.05)",
70
+ // ── Status ──
71
+ success: "#1A4331",
72
+ successBg: "#EAF1EC",
73
+ successForeground: "#1A4331",
74
+ warning: "#8A6D3B",
75
+ warningBg: "#F7F3EA",
76
+ warningForeground: "#8A6D3B",
77
+ error: "#7C2128",
78
+ errorBg: "#F4EAEB",
79
+ errorForeground: "#7C2128",
80
+ info: "#121212",
81
+ infoBg: "#FAFAFA",
82
+ infoForeground: "#121212",
83
+ // ── Interaction States ──
84
+ interactiveHover: "rgba(18, 18, 18, 0.04)",
85
+ interactivePressed: "rgba(18, 18, 18, 0.08)",
86
+ interactiveFocus: "#121212",
87
+ interactiveSurfaceTint: "rgba(18, 18, 18, 0.02)",
88
+ interactiveHoverTint: "rgba(18, 18, 18, 0.04)",
89
+ focusGlow: "0 0 0 2px #E4E4E7",
90
+ pointGlow: "0 0 0 2px rgba(18, 18, 18, 0.15)",
91
+ // ── Components ──
92
+ btnPrimarySurface: "#1E232D",
93
+ btnPrimaryHover: "#2A303D",
94
+ btnPrimaryEnergy: "0 4px 12px rgba(30, 35, 45, 0.16)",
95
+ btnPrimaryInset: "none",
96
+ btnSecondarySurface: "#E4E4E7",
97
+ btnSecondaryHover: "#D4D4D8",
98
+ btnOutlineBorder: "#E4E4E7",
99
+ btnOutlineBorderHover: "#D4D4D8",
100
+ btnOutlineHoverBg: "#F4F4F5",
101
+ btnGhostHover: "#F4F4F5",
102
+ btnPointSurface: "#323944",
103
+ btnPointBorder: "transparent",
104
+ btnPointHoverSurface: "#4A5361",
105
+ btnPointHoverBorder: "transparent",
106
+ btnPointEnergy: "0 4px 12px rgba(50, 57, 68, 0.2)",
107
+ btnDestructiveSurface: "#7C2128",
108
+ btnDestructiveHover: "#5B171D",
109
+ inputBg: "#FCFCFC",
110
+ inputBorderRest: "#E4E4E7",
111
+ inputBorderHover: "#A1A1AA",
112
+ inputHoverGlow: "0 0 0 2px #F4F4F5",
113
+ inputFocusGlow: "0 0 0 2px #E4E4E7",
114
+ inputErrorGlow: "0 0 0 2px #F4EAEB",
115
+ dropdownBg: "#FCFCFC",
116
+ dropdownShadow: "0 20px 25px -5px rgba(18, 18, 18, 0.08), 0 0 0 1px rgba(18, 18, 18, 0.03)",
117
+ dropdownItemHover: "#F4F4F5",
118
+ cardAccentBorder: "#E4E4E7",
119
+ cardAccentGlow: "none",
120
+ cardAccentHoverBorder: "#D4D4D8",
121
+ cardAccentHoverGlow: "0 8px 24px rgba(18, 18, 18, 0.06)"
122
+ },
123
+ dark: {
124
+ // ── Canvas & Surface (High-Contrast Charcoal Base) ──
125
+ background: "#121214",
126
+ // Off-black charcoal
127
+ backgroundSubtle: "#18181A",
128
+ // Zinc 900
129
+ surface: "#27272A",
130
+ // Zinc 800 - distinct from subtle background
131
+ surfaceHover: "#3F3F46",
132
+ // Zinc 700
133
+ surfaceBase: "#121214",
134
+ surfaceElevatedLow: "#18181A",
135
+ surfaceElevatedMid: "#27272A",
136
+ surfaceElevatedHigh: "#3F3F46",
137
+ card: "#18181A",
138
+ // Zinc 900
139
+ cardForeground: "#F4F4F5",
140
+ // Off-white
141
+ // ── Text ──
142
+ foreground: "#F4F4F5",
143
+ // Off-white
144
+ muted: "#27272A",
145
+ // Zinc 800
146
+ mutedForeground: "#A1A1AA",
147
+ // Zinc 400
148
+ // ── Brand (Iron Navy Light / Cold Steel Blue-Gray) ──
149
+ primary: "#B8C4D9",
150
+ primaryHover: "#D1DBE8",
151
+ primaryForeground: "#1E232D",
152
+ // Deep Iron Navy text
153
+ secondary: "#27272A",
154
+ secondaryForeground: "#B8C4D9",
155
+ ring: "#B8C4D9",
156
+ // ── Point / Accent (Lighter Steel Blue-Gray) ──
157
+ point: "#D1DBE8",
158
+ pointHover: "#E6ECEF",
159
+ pointForeground: "#1E232D",
160
+ pointSubtle: "rgba(209, 219, 232, 0.12)",
161
+ // ── Border (Highly Visible) ──
162
+ border: "#3F3F46",
163
+ // Zinc 700
164
+ input: "#3F3F46",
165
+ // ── Gray Scale (Zinc) ──
166
+ gray50: "#121214",
167
+ gray100: "#18181A",
168
+ gray200: "#27272A",
169
+ gray300: "#3F3F46",
170
+ gray400: "#52525B",
171
+ gray500: "#71717A",
172
+ gray600: "#A1A1AA",
173
+ gray700: "#D4D4D8",
174
+ gray800: "#E4E4E7",
175
+ gray900: "#FAFAFA",
176
+ // ── Glass & Effects ──
177
+ glassBg: "rgba(18, 18, 20, 0.85)",
178
+ glassBorder: "rgba(250, 250, 250, 0.1)",
179
+ glassInset: "inset 0 1px 0 rgba(250, 250, 250, 0.05)",
180
+ glassPanelShadow: "0 20px 40px rgba(0, 0, 0, 0.8)",
181
+ accentGlow: "none",
182
+ // ── Gradients ──
183
+ gradientBrand: "none",
184
+ gradientBrandHover: "none",
185
+ gradientSubtle: "none",
186
+ gradientAccent: "none",
187
+ gradientAccentVivid: "none",
188
+ gradientGlow: "none",
189
+ gradientMesh: "none",
190
+ gradientSurface: "none",
191
+ gradientGlowShadow: "none",
192
+ // ── Shadow ──
193
+ shadowColor: "rgba(0, 0, 0, 0.9)",
194
+ // ── Status (Deep & Clear) ──
195
+ success: "#34D399",
196
+ successBg: "rgba(52, 211, 153, 0.15)",
197
+ successForeground: "#34D399",
198
+ warning: "#FBBF24",
199
+ warningBg: "rgba(251, 191, 36, 0.15)",
200
+ warningForeground: "#FBBF24",
201
+ error: "#F87171",
202
+ errorBg: "rgba(248, 113, 113, 0.15)",
203
+ errorForeground: "#F87171",
204
+ info: "#FAFAFA",
205
+ infoBg: "rgba(250, 250, 250, 0.15)",
206
+ infoForeground: "#FAFAFA",
207
+ // ── Interaction States ──
208
+ interactiveHover: "rgba(250, 250, 250, 0.08)",
209
+ interactivePressed: "rgba(250, 250, 250, 0.12)",
210
+ interactiveFocus: "#FAFAFA",
211
+ interactiveSurfaceTint: "rgba(250, 250, 250, 0.04)",
212
+ interactiveHoverTint: "rgba(250, 250, 250, 0.08)",
213
+ focusGlow: "0 0 0 2px #3F3F46",
214
+ pointGlow: "0 0 0 2px rgba(250, 250, 250, 0.3)",
215
+ // ── Components ──
216
+ btnPrimarySurface: "#B8C4D9",
217
+ btnPrimaryHover: "#D1DBE8",
218
+ btnPrimaryEnergy: "0 4px 16px rgba(184, 196, 217, 0.25)",
219
+ btnPrimaryInset: "none",
220
+ btnSecondarySurface: "#27272A",
221
+ btnSecondaryHover: "#3F3F46",
222
+ btnOutlineBorder: "#3F3F46",
223
+ btnOutlineBorderHover: "#52525B",
224
+ btnOutlineHoverBg: "#27272A",
225
+ btnGhostHover: "#27272A",
226
+ btnPointSurface: "#D1DBE8",
227
+ btnPointBorder: "transparent",
228
+ btnPointHoverSurface: "#E6ECEF",
229
+ btnPointHoverBorder: "transparent",
230
+ btnPointEnergy: "0 4px 16px rgba(209, 219, 232, 0.25)",
231
+ btnDestructiveSurface: "#7C2128",
232
+ btnDestructiveHover: "#9A2A32",
233
+ inputBg: "#18181A",
234
+ inputBorderRest: "#3F3F46",
235
+ inputBorderHover: "#52525B",
236
+ inputHoverGlow: "0 0 0 2px #27272A",
237
+ inputFocusGlow: "0 0 0 2px #3F3F46",
238
+ inputErrorGlow: "0 0 0 2px #3E1014",
239
+ dropdownBg: "#18181A",
240
+ dropdownShadow: "0 20px 25px -5px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(250,250,250,0.1)",
241
+ dropdownItemHover: "#27272A",
242
+ cardAccentBorder: "#3F3F46",
243
+ cardAccentGlow: "none",
244
+ cardAccentHoverBorder: "#52525B",
245
+ cardAccentHoverGlow: "0 8px 24px rgba(0, 0, 0, 0.8)"
246
+ }
247
+ };
248
+
249
+ // src/component.ts
250
+ var component = {
251
+ button: {
252
+ sm: { height: 34, paddingX: 18, paddingY: 8, fontSize: 12, borderRadius: 8, iconSize: 16 },
253
+ md: { height: 42, paddingX: 28, paddingY: 12, fontSize: 13, borderRadius: 10, iconSize: 18 },
254
+ lg: { height: 50, paddingX: 36, paddingY: 16, fontSize: 15, borderRadius: 14, iconSize: 20 }
255
+ },
256
+ input: {
257
+ height: 42,
258
+ paddingX: 18,
259
+ paddingY: 12,
260
+ fontSize: 14,
261
+ borderRadius: 10,
262
+ iconSize: 18,
263
+ iconPadding: 42
264
+ },
265
+ card: {
266
+ padding: 28,
267
+ gap: 20,
268
+ borderRadius: 16,
269
+ titleSize: 17,
270
+ bodySize: 14
271
+ },
272
+ badge: {
273
+ paddingX: 12,
274
+ paddingY: 6,
275
+ fontSize: 12,
276
+ fontWeight: 500,
277
+ borderRadius: 9999
278
+ },
279
+ checkbox: {
280
+ wrapperPaddingX: 16,
281
+ wrapperPaddingY: 10,
282
+ wrapperRadius: 10,
283
+ gap: 12,
284
+ size: 20,
285
+ borderRadius: 6,
286
+ borderWidth: 2,
287
+ iconSize: 14,
288
+ labelSize: 14
289
+ },
290
+ radio: {
291
+ wrapperPaddingX: 16,
292
+ wrapperPaddingY: 10,
293
+ wrapperRadius: 10,
294
+ gap: 12,
295
+ size: 20,
296
+ borderWidth: 2,
297
+ checkedBorderWidth: 6,
298
+ labelSize: 14
299
+ },
300
+ switch: {
301
+ width: 52,
302
+ height: 32,
303
+ thumbSize: 24,
304
+ thumbOffset: 4,
305
+ thumbTranslateOn: 24,
306
+ thumbTranslateOff: 4
307
+ },
308
+ chip: {
309
+ paddingX: 16,
310
+ paddingY: 8,
311
+ fontSize: 13,
312
+ borderRadius: 9999,
313
+ iconSize: 14,
314
+ iconPaddingX: 12
315
+ },
316
+ tabs: {
317
+ primary: {
318
+ paddingX: 20,
319
+ paddingY: 12,
320
+ fontSize: 14,
321
+ indicatorHeight: 2
322
+ },
323
+ secondary: {
324
+ paddingX: 20,
325
+ paddingY: 8,
326
+ fontSize: 13,
327
+ containerPadding: 4,
328
+ containerRadius: 14,
329
+ itemRadius: 10
330
+ }
331
+ },
332
+ slider: {
333
+ trackHeight: 6,
334
+ thumbSize: 20,
335
+ thumbBorderWidth: 2
336
+ },
337
+ tooltip: {
338
+ simple: { paddingX: 14, paddingY: 8, fontSize: 13, borderRadius: 10 },
339
+ rich: { paddingX: 16, paddingY: 10, maxWidth: 240, borderRadius: 10 },
340
+ delay: 150
341
+ },
342
+ avatar: {
343
+ sm: { size: 28, fontSize: 11 },
344
+ md: { size: 36, fontSize: 14 },
345
+ lg: { size: 48, fontSize: 18 },
346
+ xl: { size: 64, fontSize: 24 },
347
+ statusDot: 10,
348
+ statusBorder: 2
349
+ },
350
+ divider: {
351
+ thickness: 1,
352
+ thickThickness: 8,
353
+ insetMargin: 64,
354
+ labelSize: 12
355
+ },
356
+ progress: {
357
+ linear: { height: 8, borderRadius: 9999 },
358
+ circular: { strokeWidth: 4, textSize: 14 }
359
+ },
360
+ snackbar: {
361
+ paddingTop: 16,
362
+ paddingRight: 18,
363
+ paddingBottom: 16,
364
+ paddingLeft: 22,
365
+ borderRadius: 14,
366
+ gap: 12,
367
+ iconSize: 18,
368
+ messageSize: 14,
369
+ actionPaddingX: 14,
370
+ actionPaddingY: 6,
371
+ actionRadius: 8,
372
+ actionSize: 13
373
+ },
374
+ dialog: {
375
+ width: 380,
376
+ borderRadius: 20,
377
+ headerPaddingX: 28,
378
+ headerPaddingY: 24,
379
+ footerPaddingX: 28,
380
+ footerPaddingY: 20,
381
+ titleSize: 17,
382
+ descSize: 14,
383
+ footerGap: 14
384
+ },
385
+ animatedToggle: {
386
+ size: 40,
387
+ borderRadius: 10,
388
+ iconSize: 20
389
+ }
390
+ };
391
+
392
+ // src/typography.ts
393
+ var typography = {
394
+ fontFamily: {
395
+ primary: "Pretendard",
396
+ secondary: "Pretendard",
397
+ display: "Pretendard"
398
+ },
399
+ display: {
400
+ lg: { size: 56, weight: 700, lineHeight: 1.12, letterSpacing: -0.03 },
401
+ md: { size: 48, weight: 700, lineHeight: 1.12, letterSpacing: -0.025 },
402
+ sm: { size: 40, weight: 600, lineHeight: 1.15, letterSpacing: -0.02 }
403
+ },
404
+ heading: {
405
+ h1: { size: 32, weight: 700, lineHeight: 1.2, letterSpacing: -0.025 },
406
+ h2: { size: 28, weight: 600, lineHeight: 1.22, letterSpacing: -0.02 },
407
+ h3: { size: 24, weight: 600, lineHeight: 1.25, letterSpacing: -0.015 },
408
+ h4: { size: 20, weight: 500, lineHeight: 1.3, letterSpacing: -0.01 },
409
+ h5: { size: 16, weight: 500, lineHeight: 1.35, letterSpacing: -5e-3 },
410
+ h6: { size: 14, weight: 500, lineHeight: 1.4, letterSpacing: 0 }
411
+ },
412
+ body: {
413
+ lg: { size: 17, weight: 400, lineHeight: 1.65, letterSpacing: -0.01 },
414
+ md: { size: 15, weight: 400, lineHeight: 1.6, letterSpacing: -5e-3 },
415
+ sm: { size: 13, weight: 400, lineHeight: 1.55, letterSpacing: 0 }
416
+ },
417
+ caption: { size: 11, weight: 400, lineHeight: 1.5, letterSpacing: 0.01 },
418
+ fontWeight: {
419
+ light: "300",
420
+ regular: "400",
421
+ medium: "500",
422
+ semibold: "600",
423
+ bold: "700"
424
+ }
425
+ };
426
+
427
+ // src/spacing.ts
428
+ var spacing = {
429
+ "2xs": 2,
430
+ xs: 4,
431
+ sm: 8,
432
+ m: 16,
433
+ lg: 24,
434
+ xl: 40,
435
+ "2xl": 56,
436
+ "3xl": 80
437
+ };
438
+ var radius = {
439
+ none: 0,
440
+ xs: 4,
441
+ sm: 6,
442
+ m: 10,
443
+ lg: 14,
444
+ xl: 20,
445
+ "2xl": 24,
446
+ pill: 9999
447
+ };
448
+ var breakpoints = {
449
+ sm: 640,
450
+ md: 768,
451
+ lg: 1024,
452
+ xl: 1280,
453
+ "2xl": 1536
454
+ };
455
+ var grid = {
456
+ columns: 12,
457
+ gutter: 20,
458
+ margin: {
459
+ mobile: 20,
460
+ tablet: 32,
461
+ desktop: 40
462
+ }
463
+ };
464
+ var containers = {
465
+ sm: 640,
466
+ md: 768,
467
+ lg: 1024,
468
+ xl: 1280
469
+ };
470
+
471
+ // src/elevation.ts
472
+ var elevation = {
473
+ light: {
474
+ sm: "0 1px 2px rgba(94,94,94,0.04), 0 1px 3px rgba(94,94,94,0.02)",
475
+ m: "0 2px 4px rgba(94,94,94,0.04), 0 8px 16px rgba(94,94,94,0.04)",
476
+ lg: "0 4px 8px rgba(94,94,94,0.05), 0 16px 32px rgba(94,94,94,0.06)",
477
+ xl: "0 8px 16px rgba(94,94,94,0.06), 0 24px 48px rgba(94,94,94,0.08)",
478
+ glass: "0 4px 24px rgba(94,94,94,0.05), 0 1px 2px rgba(94,94,94,0.02)",
479
+ glassLg: "0 8px 32px rgba(94,94,94,0.08), 0 2px 4px rgba(94,94,94,0.03)"
480
+ },
481
+ dark: {
482
+ sm: "0 1px 2px rgba(0,0,0,0.20), 0 1px 3px rgba(0,0,0,0.14)",
483
+ m: "0 1px 4px rgba(0,0,0,0.20), 0 4px 12px rgba(0,0,0,0.16)",
484
+ lg: "0 2px 8px rgba(0,0,0,0.20), 0 8px 24px rgba(0,0,0,0.18)",
485
+ xl: "0 4px 12px rgba(0,0,0,0.22), 0 12px 32px rgba(0,0,0,0.20)",
486
+ glass: "0 2px 12px rgba(0,0,0,0.18), 0 1px 2px rgba(0,0,0,0.12), 0 0 0 0.5px rgba(255,255,255,0.06)",
487
+ glassLg: "0 4px 20px rgba(0,0,0,0.20), 0 2px 4px rgba(0,0,0,0.12), 0 0 16px rgba(138,163,184,0.03)"
488
+ }
489
+ };
490
+ var elevationLight = elevation.light;
491
+ var zIndex = {
492
+ hide: -1,
493
+ base: 0,
494
+ dropdown: 1e3,
495
+ sticky: 1100,
496
+ overlay: 1200,
497
+ modal: 1300,
498
+ popover: 1400,
499
+ tooltip: 1500,
500
+ toast: 1600
501
+ };
502
+
503
+ // src/motion.ts
504
+ var DIA_SPRING_DEFAULT = { type: "spring", stiffness: 260, damping: 34, mass: 1 };
505
+ var DIA_SPRING_LIGHT = { type: "spring", stiffness: 260, damping: 34, mass: 0.5 };
506
+ var motion = {
507
+ duration: {
508
+ instant: 80,
509
+ fast: 150,
510
+ normal: 220,
511
+ slow: 320,
512
+ complex: 450
513
+ },
514
+ easing: {
515
+ /** Dia's signature curve — slight overshoot with smooth natural deceleration. */
516
+ standard: "cubic-bezier(0.22, 1, 0.36, 1)",
517
+ /** Exit easing — fast acceleration, abrupt departure. */
518
+ easeIn: "cubic-bezier(0.55, 0, 1, 0.45)",
519
+ /** Entrance easing — gentle deceleration without overshoot. */
520
+ easeOut: "cubic-bezier(0, 0.55, 0.45, 1)",
521
+ /** Symmetric ease — smooth in both directions. */
522
+ easeInOut: "cubic-bezier(0.65, 0, 0.35, 1)",
523
+ /** Playful overshoot — for toggles, switches, confirmatory feedback. */
524
+ bounce: "cubic-bezier(0.34, 1.56, 0.64, 1)",
525
+ /** Stronger spring feel — deliberate physical presence. */
526
+ spring: "cubic-bezier(0.22, 1.2, 0.36, 1)",
527
+ /** Subtle rubber-band — elastic resistance with quick snap back. */
528
+ elastic: "cubic-bezier(0.68, -0.2, 0.265, 1.2)"
529
+ },
530
+ /** Framer Motion spring presets calibrated for Dia-style organic feel. */
531
+ spring: {
532
+ /** Quick interactive feedback — subtle and responsive. */
533
+ snappy: { type: "spring", stiffness: 260, damping: 28 },
534
+ /** Smooth state changes — gentle spring resolution. */
535
+ gentle: { type: "spring", stiffness: 180, damping: 26 },
536
+ /** Toggle/switch feel — restrained with minimal bounce. */
537
+ bouncy: { type: "spring", stiffness: 260, damping: 24 },
538
+ /** Large layout shifts — deliberate mass with controlled deceleration. */
539
+ slow: { type: "spring", stiffness: 140, damping: 24 },
540
+ /** Press/release with life — elastic resistance, mass gives it weight. */
541
+ elastic: { type: "spring", stiffness: 220, damping: 22, mass: 0.8 },
542
+ /** Elements appearing — spring resolves cleanly with organic arrival. */
543
+ entrance: { type: "spring", stiffness: 180, damping: 24, mass: 0.9 }
544
+ },
545
+ /** Mass-differentiated spring configs for Dia Browser-like physics interactions. */
546
+ diaSpring: {
547
+ default: DIA_SPRING_DEFAULT,
548
+ light: DIA_SPRING_LIGHT,
549
+ heavy: { type: "spring", stiffness: 220, damping: 32, mass: 1.5 },
550
+ magnetic: { type: "spring", stiffness: 340, damping: 38, mass: 0.8 },
551
+ entrance: { type: "spring", stiffness: 180, damping: 28, mass: 1.2 }
552
+ },
553
+ /** Standard animation keyframe presets for reuse across components. */
554
+ keyframes: {
555
+ fadeIn: { from: { opacity: "0" }, to: { opacity: "1" } },
556
+ fadeOut: { from: { opacity: "1" }, to: { opacity: "0" } },
557
+ /** Blur entrance — element fades in from blurry with subtle upward spring motion. */
558
+ blurFadeIn: {
559
+ from: { opacity: "0", filter: "blur(4px)", transform: "translateY(4px)" },
560
+ to: { opacity: "1", filter: "blur(0px)", transform: "translateY(0)" }
561
+ },
562
+ /** Blur scale entrance — deblurs while gently scaling up from slight compression. */
563
+ blurScaleIn: {
564
+ from: { opacity: "0", filter: "blur(3px)", transform: "scale(0.98)" },
565
+ to: { opacity: "1", filter: "blur(0px)", transform: "scale(1)" }
566
+ },
567
+ /** Slide entrance from below — element springs up from offset position. */
568
+ slideInUp: { from: { opacity: "0", transform: "translateY(5px)" }, to: { opacity: "1", transform: "translateY(0)" } },
569
+ /** Slide entrance from above — element springs down from offset position. */
570
+ slideInDown: { from: { opacity: "0", transform: "translateY(-5px)" }, to: { opacity: "1", transform: "translateY(0)" } },
571
+ /** Slide entrance from left — element springs in from offset. */
572
+ slideInLeft: { from: { opacity: "0", transform: "translateX(-5px)" }, to: { opacity: "1", transform: "translateX(0)" } },
573
+ /** Slide entrance from right — element springs in from offset. */
574
+ slideInRight: { from: { opacity: "0", transform: "translateX(5px)" }, to: { opacity: "1", transform: "translateX(0)" } },
575
+ /** Scale entrance — element inflates from slight compression. */
576
+ scaleIn: { from: { opacity: "0", transform: "scale(0.98)" }, to: { opacity: "1", transform: "scale(1)" } },
577
+ scaleOut: { from: { opacity: "1", transform: "scale(1)" }, to: { opacity: "0", transform: "scale(0.98)" } },
578
+ /** Zoom entrance — element arrives from meaningful distance, not just nearby. */
579
+ zoomIn: { from: { opacity: "0", transform: "scale(0.92)" }, to: { opacity: "1", transform: "scale(1)" } },
580
+ /** Press feedback — subtle scale to confirm tap/click with physical weight. */
581
+ pressDown: { from: { transform: "scale(1)" }, to: { transform: "scale(0.98)" } },
582
+ /** Press keyframes — clean squish held at destination. */
583
+ elasticPress: {
584
+ "0%": { transform: "scale(1)" },
585
+ "50%": { transform: "scale(0.98)" },
586
+ "100%": { transform: "scale(0.98)" }
587
+ },
588
+ /** Release keyframes — spring overshoots slightly then resolves to rest. */
589
+ elasticRelease: {
590
+ "0%": { transform: "scale(0.98)" },
591
+ "50%": { transform: "scale(1.005)" },
592
+ "100%": { transform: "scale(1)" }
593
+ },
594
+ /** Lift — subtle elevation shift on hover, element has mass. */
595
+ liftUp: { from: { transform: "translateY(0)" }, to: { transform: "translateY(-1px)" } },
596
+ /** Glow pulse — ambient glow to indicate active state. */
597
+ glowPulse: {
598
+ "0%, 100%": { boxShadow: "0 0 0 0 color-mix(in srgb, var(--point) 0%, transparent)" },
599
+ "50%": { boxShadow: "0 0 12px 2px color-mix(in srgb, var(--point) 20%, transparent)" }
600
+ },
601
+ shimmer: {
602
+ "0%": { backgroundPosition: "-200% 0" },
603
+ "100%": { backgroundPosition: "200% 0" }
604
+ },
605
+ gradientShimmer: {
606
+ "0%": { backgroundPosition: "0% 50%" },
607
+ "50%": { backgroundPosition: "100% 50%" },
608
+ "100%": { backgroundPosition: "0% 50%" }
609
+ },
610
+ /** Gradient glow — soft glow for decorative emphasis. */
611
+ gradientGlow: {
612
+ "0%, 100%": { boxShadow: "0 0 0 0 color-mix(in srgb, var(--point) 0%, transparent)" },
613
+ "50%": { boxShadow: "0 0 16px 3px color-mix(in srgb, var(--point) 15%, transparent)" }
614
+ },
615
+ /** Spotlight pulse — radial glow that breathes gently. */
616
+ spotlightPulse: {
617
+ "0%, 100%": { opacity: "0" },
618
+ "50%": { opacity: "1" }
619
+ },
620
+ spin: { from: { transform: "rotate(0deg)" }, to: { transform: "rotate(360deg)" } },
621
+ pulse: { "0%, 100%": { opacity: "1" }, "50%": { opacity: "0.5" } },
622
+ bounce: { "0%, 100%": { transform: "translateY(0)" }, "50%": { transform: "translateY(-2px)" } },
623
+ /** Float — gentle hovering motion with spring-like rhythm. */
624
+ float: {
625
+ "0%, 100%": { transform: "translateY(0)" },
626
+ "50%": { transform: "translateY(-2px)" }
627
+ }
628
+ },
629
+ /** Glow animation configuration for border glow effects. */
630
+ glow: {
631
+ /** Rotation speed in seconds for the border glow sweep. */
632
+ rotationSpeed: { idle: 3, focused: 1.5 },
633
+ /** Blur radius in px applied to the glow trail. */
634
+ blur: { idle: 8, focused: 16 },
635
+ /** Opacity of the glow sweep. */
636
+ opacity: { idle: 0.3, focused: 0.6 },
637
+ /** Conic gradient color stop percentages. */
638
+ spread: { transparent: 25, start: 40, peak: 50, end: 60, fadeOut: 75 }
639
+ },
640
+ /** Layout morphing spring config — for FLIP transitions between components. */
641
+ morph: {
642
+ /** Spring config for morph transitions — references diaSpring.default. */
643
+ spring: DIA_SPRING_DEFAULT,
644
+ /** Faster variant for small elements. */
645
+ springFast: { type: "spring", stiffness: 400, damping: 35, mass: 0.8 }
646
+ }
647
+ };
648
+ var diaSpring = motion.diaSpring;
649
+
650
+ // src/chart.ts
651
+ var chart = {
652
+ light: {
653
+ colors: [
654
+ "#1E232D",
655
+ // chart-1: Iron Navy (Primary)
656
+ "#323944",
657
+ // chart-2: Steel Navy (Secondary)
658
+ "#4A5361",
659
+ // chart-3: Slate Navy (Tertiary)
660
+ "#71717A",
661
+ // chart-4: Zinc 500 (Accent 1)
662
+ "#A1A1AA",
663
+ // chart-5: Zinc 400 (Accent 2)
664
+ "#D4D4D8",
665
+ // chart-6: Zinc 300 (Fill)
666
+ "#0F172A",
667
+ // chart-7: Deep Slate 900 (Deep Fill)
668
+ "#E4E4E7"
669
+ // chart-8: Zinc 200 (Light Fill)
670
+ ],
671
+ grid: "rgba(30, 35, 45, 0.04)",
672
+ axis: "rgba(30, 35, 45, 0.08)",
673
+ label: "#71717A",
674
+ // Zinc 500
675
+ tooltipBg: "#FFFFFF"
676
+ },
677
+ dark: {
678
+ colors: [
679
+ "#B8C4D9",
680
+ // chart-1: Bright Ice Navy (Primary)
681
+ "#D1DBE8",
682
+ // chart-2: Ice Steel (Secondary)
683
+ "#E6ECEF",
684
+ // chart-3: Pale Silver (Tertiary)
685
+ "#A1A1AA",
686
+ // chart-4: Zinc 400 (Accent 1)
687
+ "#71717A",
688
+ // chart-5: Zinc 500 (Accent 2)
689
+ "#808B9D",
690
+ // chart-6: Cold Steel (Fill)
691
+ "#FFFFFF",
692
+ // chart-7: Pure White (Highlight)
693
+ "#52525B"
694
+ // chart-8: Zinc 600 (Deep Fill)
695
+ ],
696
+ grid: "rgba(255, 255, 255, 0.04)",
697
+ axis: "rgba(255, 255, 255, 0.06)",
698
+ label: "#A1A1AA",
699
+ // Zinc 400
700
+ tooltipBg: "#18181A"
701
+ // Off-black chart tooltip matches dropdowns
702
+ },
703
+ lineWidth: 1.5,
704
+ dotSize: 2.5,
705
+ barRadius: 4,
706
+ areaOpacity: 0.08
707
+ };
708
+
709
+ // src/web/unit-utils.ts
710
+ function rem(v) {
711
+ return `${v / 16}rem`;
712
+ }
713
+ function px(v) {
714
+ return `${v}px`;
715
+ }
716
+ function ms(v) {
717
+ return `${v}ms`;
718
+ }
719
+ function unitless(v) {
720
+ return `${v}`;
721
+ }
722
+
723
+ export { breakpoints, chart, component, containers, diaSpring, elevation, elevationLight, grid, motion, ms, px, radius, rem, semanticTokens, spacing, typography, unitless, zIndex };