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