reactnatively-theme 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.
package/dist/index.mjs ADDED
@@ -0,0 +1,686 @@
1
+ import { createContext, useState, useCallback, useMemo, useContext } from 'react';
2
+ import { useColorScheme as useColorScheme$1 } from 'react-native';
3
+ import { deepMerge } from 'reactnatively-utils';
4
+ import { jsx } from 'react/jsx-runtime';
5
+
6
+ // src/ThemeProvider.tsx
7
+
8
+ // src/tokens/colors.ts
9
+ var palette = {
10
+ blue: {
11
+ 50: "#eff6ff",
12
+ 100: "#dbeafe",
13
+ 200: "#bfdbfe",
14
+ 300: "#93c5fd",
15
+ 400: "#60a5fa",
16
+ 500: "#3b82f6",
17
+ 600: "#2563eb",
18
+ 700: "#1d4ed8",
19
+ 800: "#1e40af",
20
+ 900: "#1e3a8a",
21
+ 950: "#172554"
22
+ },
23
+ indigo: {
24
+ 50: "#eef2ff",
25
+ 100: "#e0e7ff",
26
+ 200: "#c7d2fe",
27
+ 300: "#a5b4fc",
28
+ 400: "#818cf8",
29
+ 500: "#6366f1",
30
+ 600: "#4f46e5",
31
+ 700: "#4338ca",
32
+ 800: "#3730a3",
33
+ 900: "#312e81",
34
+ 950: "#1e1b4b"
35
+ },
36
+ violet: {
37
+ 50: "#f5f3ff",
38
+ 100: "#ede9fe",
39
+ 200: "#ddd6fe",
40
+ 300: "#c4b5fd",
41
+ 400: "#a78bfa",
42
+ 500: "#8b5cf6",
43
+ 600: "#7c3aed",
44
+ 700: "#6d28d9",
45
+ 800: "#5b21b6",
46
+ 900: "#4c1d95",
47
+ 950: "#2e1065"
48
+ },
49
+ cyan: {
50
+ 50: "#ecfeff",
51
+ 100: "#cffafe",
52
+ 200: "#a5f3fc",
53
+ 300: "#67e8f9",
54
+ 400: "#22d3ee",
55
+ 500: "#06b6d4",
56
+ 600: "#0891b2",
57
+ 700: "#0e7490",
58
+ 800: "#155e75",
59
+ 900: "#164e63",
60
+ 950: "#083344"
61
+ },
62
+ emerald: {
63
+ 50: "#ecfdf5",
64
+ 100: "#d1fae5",
65
+ 200: "#a7f3d0",
66
+ 300: "#6ee7b7",
67
+ 400: "#34d399",
68
+ 500: "#10b981",
69
+ 600: "#059669",
70
+ 700: "#047857",
71
+ 800: "#065f46",
72
+ 900: "#064e3b",
73
+ 950: "#022c22"
74
+ },
75
+ amber: {
76
+ 50: "#fffbeb",
77
+ 100: "#fef3c7",
78
+ 200: "#fde68a",
79
+ 300: "#fcd34d",
80
+ 400: "#fbbf24",
81
+ 500: "#f59e0b",
82
+ 600: "#d97706",
83
+ 700: "#b45309",
84
+ 800: "#92400e",
85
+ 900: "#78350f",
86
+ 950: "#451a03"
87
+ },
88
+ rose: {
89
+ 50: "#fff1f2",
90
+ 100: "#ffe4e6",
91
+ 200: "#fecdd3",
92
+ 300: "#fda4af",
93
+ 400: "#fb7185",
94
+ 500: "#f43f5e",
95
+ 600: "#e11d48",
96
+ 700: "#be123c",
97
+ 800: "#9f1239",
98
+ 900: "#881337",
99
+ 950: "#4c0519"
100
+ },
101
+ neutral: {
102
+ 0: "#ffffff",
103
+ 50: "#fafafa",
104
+ 100: "#f5f5f5",
105
+ 200: "#e5e5e5",
106
+ 300: "#d4d4d4",
107
+ 400: "#a3a3a3",
108
+ 500: "#737373",
109
+ 600: "#525252",
110
+ 700: "#404040",
111
+ 800: "#262626",
112
+ 900: "#171717",
113
+ 950: "#0a0a0a",
114
+ 1e3: "#000000"
115
+ },
116
+ // Liquid Glass — raw RGBA primitives for glass layers
117
+ glass: {
118
+ white5: "rgba(255,255,255,0.05)",
119
+ white8: "rgba(255,255,255,0.08)",
120
+ white10: "rgba(255,255,255,0.10)",
121
+ white15: "rgba(255,255,255,0.15)",
122
+ white20: "rgba(255,255,255,0.20)",
123
+ white25: "rgba(255,255,255,0.25)",
124
+ white30: "rgba(255,255,255,0.30)",
125
+ white40: "rgba(255,255,255,0.40)",
126
+ white50: "rgba(255,255,255,0.50)",
127
+ white60: "rgba(255,255,255,0.60)",
128
+ white72: "rgba(255,255,255,0.72)",
129
+ white85: "rgba(255,255,255,0.85)",
130
+ black5: "rgba(0,0,0,0.05)",
131
+ black8: "rgba(0,0,0,0.08)",
132
+ black10: "rgba(0,0,0,0.10)",
133
+ black15: "rgba(0,0,0,0.15)",
134
+ black20: "rgba(0,0,0,0.20)",
135
+ black30: "rgba(0,0,0,0.30)",
136
+ black40: "rgba(0,0,0,0.40)",
137
+ black50: "rgba(0,0,0,0.50)",
138
+ black60: "rgba(0,0,0,0.60)",
139
+ black72: "rgba(0,0,0,0.72)",
140
+ black85: "rgba(0,0,0,0.85)"
141
+ }
142
+ };
143
+
144
+ // src/tokens/glass.ts
145
+ var glassTokens = {
146
+ // Blur intensity scale — maps to expo-blur `intensity` (0-100)
147
+ blur: {
148
+ none: 0,
149
+ hairline: 4,
150
+ subtle: 10,
151
+ light: 20,
152
+ medium: 35,
153
+ heavy: 55,
154
+ intense: 72,
155
+ extreme: 90
156
+ },
157
+ // Tint: semi-transparent color applied over the blur layer
158
+ tint: {
159
+ light: {
160
+ ultraThin: "rgba(255,255,255,0.45)",
161
+ thin: "rgba(255,255,255,0.60)",
162
+ surface: "rgba(255,255,255,0.72)",
163
+ elevated: "rgba(255,255,255,0.82)",
164
+ overlay: "rgba(255,255,255,0.92)",
165
+ frosted: "rgba(240,242,250,0.68)",
166
+ tinted: "rgba(59,130,246,0.12)"
167
+ },
168
+ dark: {
169
+ ultraThin: "rgba(20,20,30,0.45)",
170
+ thin: "rgba(20,20,30,0.58)",
171
+ surface: "rgba(25,25,38,0.72)",
172
+ elevated: "rgba(30,30,48,0.80)",
173
+ overlay: "rgba(15,15,25,0.88)",
174
+ frosted: "rgba(22,24,40,0.70)",
175
+ tinted: "rgba(99,102,241,0.15)"
176
+ }
177
+ },
178
+ // Elevation: the glass depth system (0 = flat, 5 = floating modal)
179
+ // Each level defines the complete glass rendering recipe
180
+ elevation: {
181
+ 0: {
182
+ blur: 0,
183
+ tintOpacity: 0.95,
184
+ shadowOpacity: 0,
185
+ shadowRadius: 0,
186
+ shadowY: 0
187
+ },
188
+ 1: {
189
+ blur: 12,
190
+ tintOpacity: 0.82,
191
+ shadowOpacity: 0.06,
192
+ shadowRadius: 8,
193
+ shadowY: 2
194
+ },
195
+ 2: {
196
+ blur: 24,
197
+ tintOpacity: 0.72,
198
+ shadowOpacity: 0.12,
199
+ shadowRadius: 16,
200
+ shadowY: 4
201
+ },
202
+ 3: {
203
+ blur: 40,
204
+ tintOpacity: 0.65,
205
+ shadowOpacity: 0.18,
206
+ shadowRadius: 24,
207
+ shadowY: 8
208
+ },
209
+ 4: {
210
+ blur: 55,
211
+ tintOpacity: 0.55,
212
+ shadowOpacity: 0.24,
213
+ shadowRadius: 36,
214
+ shadowY: 12
215
+ },
216
+ 5: {
217
+ blur: 72,
218
+ tintOpacity: 0.45,
219
+ shadowOpacity: 0.32,
220
+ shadowRadius: 48,
221
+ shadowY: 20
222
+ }
223
+ },
224
+ // Highlight: top-edge shimmer — creates the "wet glass" refraction
225
+ highlight: {
226
+ none: "transparent",
227
+ subtle: "rgba(255,255,255,0.20)",
228
+ medium: "rgba(255,255,255,0.38)",
229
+ strong: "rgba(255,255,255,0.55)",
230
+ intense: "rgba(255,255,255,0.72)"
231
+ },
232
+ // Highlight gradient: gradient from highlight to transparent (vertical)
233
+ highlightGradientEnd: "transparent",
234
+ // Border: glass edge line — makes glass surfaces feel distinct
235
+ border: {
236
+ light: {
237
+ subtle: "rgba(255,255,255,0.20)",
238
+ medium: "rgba(255,255,255,0.32)",
239
+ strong: "rgba(255,255,255,0.50)"
240
+ },
241
+ dark: {
242
+ subtle: "rgba(255,255,255,0.08)",
243
+ medium: "rgba(255,255,255,0.14)",
244
+ strong: "rgba(255,255,255,0.22)"
245
+ }
246
+ },
247
+ // Glow: ambient glow emitted from glass surfaces
248
+ glow: {
249
+ primary: { color: "#6366f1", radius: 24, opacity: 0.35 },
250
+ blue: { color: "#3b82f6", radius: 24, opacity: 0.35 },
251
+ cyan: { color: "#06b6d4", radius: 20, opacity: 0.4 },
252
+ rose: { color: "#f43f5e", radius: 20, opacity: 0.35 },
253
+ success: { color: "#10b981", radius: 20, opacity: 0.3 },
254
+ warning: { color: "#f59e0b", radius: 20, opacity: 0.3 }
255
+ },
256
+ // Vibrancy mode — controls how aggressively colors pop through glass
257
+ vibrancy: {
258
+ none: { saturation: 1, brightness: 1 },
259
+ subtle: { saturation: 1.1, brightness: 1.02 },
260
+ medium: { saturation: 1.2, brightness: 1.04 },
261
+ vivid: { saturation: 1.4, brightness: 1.06 }
262
+ }
263
+ };
264
+
265
+ // src/tokens/spacing.ts
266
+ var spacing = {
267
+ 0: 0,
268
+ px: 1,
269
+ 0.5: 2,
270
+ 1: 4,
271
+ 1.5: 6,
272
+ 2: 8,
273
+ 2.5: 10,
274
+ 3: 12,
275
+ 3.5: 14,
276
+ 4: 16,
277
+ 5: 20,
278
+ 6: 24,
279
+ 7: 28,
280
+ 8: 32,
281
+ 9: 36,
282
+ 10: 40,
283
+ 11: 44,
284
+ 12: 48,
285
+ 14: 56,
286
+ 16: 64,
287
+ 20: 80,
288
+ 24: 96,
289
+ 28: 112,
290
+ 32: 128,
291
+ 36: 144,
292
+ 40: 160,
293
+ 48: 192,
294
+ 56: 224,
295
+ 64: 256
296
+ };
297
+
298
+ // src/tokens/radii.ts
299
+ var radii = {
300
+ none: 0,
301
+ xs: 4,
302
+ sm: 6,
303
+ md: 8,
304
+ lg: 12,
305
+ xl: 16,
306
+ "2xl": 20,
307
+ "3xl": 24,
308
+ "4xl": 32,
309
+ full: 9999
310
+ };
311
+
312
+ // src/tokens/typography.ts
313
+ var fontFamily = {
314
+ sans: "System",
315
+ mono: "Courier"
316
+ // Override with custom fonts via ThemeProvider:
317
+ // fontFamily: { sans: 'Inter_400Regular', ... }
318
+ };
319
+ var fontSize = {
320
+ "2xs": 10,
321
+ xs: 12,
322
+ sm: 13,
323
+ base: 15,
324
+ md: 15,
325
+ lg: 17,
326
+ xl: 19,
327
+ "2xl": 22,
328
+ "3xl": 26,
329
+ "4xl": 32,
330
+ "5xl": 40,
331
+ "6xl": 52,
332
+ "7xl": 64
333
+ };
334
+ var lineHeight = {
335
+ none: 1,
336
+ tight: 1.2,
337
+ snug: 1.35,
338
+ normal: 1.5,
339
+ relaxed: 1.625,
340
+ loose: 2
341
+ };
342
+ var fontWeight = {
343
+ thin: "100",
344
+ extralight: "200",
345
+ light: "300",
346
+ normal: "400",
347
+ medium: "500",
348
+ semibold: "600",
349
+ bold: "700",
350
+ extrabold: "800",
351
+ black: "900"
352
+ };
353
+ var letterSpacing = {
354
+ tighter: -0.8,
355
+ tight: -0.4,
356
+ normal: 0,
357
+ wide: 0.4,
358
+ wider: 0.8,
359
+ widest: 1.6
360
+ };
361
+ var typography = {
362
+ fontFamily,
363
+ fontSize,
364
+ lineHeight,
365
+ fontWeight,
366
+ letterSpacing
367
+ };
368
+
369
+ // src/tokens/shadows.ts
370
+ var shadows = {
371
+ none: {
372
+ ios: {
373
+ shadowColor: "transparent",
374
+ shadowOffset: { width: 0, height: 0 },
375
+ shadowOpacity: 0,
376
+ shadowRadius: 0
377
+ },
378
+ android: { elevation: 0 }
379
+ },
380
+ xs: {
381
+ ios: {
382
+ shadowColor: "#000",
383
+ shadowOffset: { width: 0, height: 1 },
384
+ shadowOpacity: 0.05,
385
+ shadowRadius: 2
386
+ },
387
+ android: { elevation: 1 }
388
+ },
389
+ sm: {
390
+ ios: {
391
+ shadowColor: "#000",
392
+ shadowOffset: { width: 0, height: 2 },
393
+ shadowOpacity: 0.08,
394
+ shadowRadius: 4
395
+ },
396
+ android: { elevation: 2 }
397
+ },
398
+ md: {
399
+ ios: {
400
+ shadowColor: "#000",
401
+ shadowOffset: { width: 0, height: 4 },
402
+ shadowOpacity: 0.12,
403
+ shadowRadius: 8
404
+ },
405
+ android: { elevation: 4 }
406
+ },
407
+ lg: {
408
+ ios: {
409
+ shadowColor: "#000",
410
+ shadowOffset: { width: 0, height: 8 },
411
+ shadowOpacity: 0.15,
412
+ shadowRadius: 16
413
+ },
414
+ android: { elevation: 8 }
415
+ },
416
+ xl: {
417
+ ios: {
418
+ shadowColor: "#000",
419
+ shadowOffset: { width: 0, height: 12 },
420
+ shadowOpacity: 0.18,
421
+ shadowRadius: 24
422
+ },
423
+ android: { elevation: 12 }
424
+ },
425
+ "2xl": {
426
+ ios: {
427
+ shadowColor: "#000",
428
+ shadowOffset: { width: 0, height: 20 },
429
+ shadowOpacity: 0.22,
430
+ shadowRadius: 40
431
+ },
432
+ android: { elevation: 20 }
433
+ },
434
+ // Glass-specific: colored shadows for glowing surfaces
435
+ glassGlow: {
436
+ ios: {
437
+ shadowColor: "#6366f1",
438
+ shadowOffset: { width: 0, height: 8 },
439
+ shadowOpacity: 0.4,
440
+ shadowRadius: 24
441
+ },
442
+ android: { elevation: 12 }
443
+ }
444
+ };
445
+
446
+ // src/tokens/motion.ts
447
+ var duration = {
448
+ instant: 50,
449
+ fast: 120,
450
+ normal: 220,
451
+ slow: 380,
452
+ verySlow: 550,
453
+ // Glass-specific: blur fades need slightly longer to feel smooth
454
+ blurIn: 280,
455
+ blurOut: 180,
456
+ // Entrance animations
457
+ enter: 300,
458
+ exit: 200
459
+ // Spring-based don't use duration — see springs below
460
+ };
461
+ var easing = {
462
+ // Cubic bezier definitions for Reanimated's `withTiming`
463
+ // Use `Easing.bezier(x1, y1, x2, y2)` in Reanimated code
464
+ standard: [0.4, 0, 0.2, 1],
465
+ // most transitions
466
+ decelerate: [0, 0, 0.2, 1],
467
+ // elements entering viewport
468
+ accelerate: [0.4, 0, 1, 1],
469
+ // elements leaving viewport
470
+ sharp: [0.4, 0, 0.6, 1]
471
+ // quick attention-grabbing
472
+ };
473
+ var springs = {
474
+ // iOS-style: fast, confident, no overshoot
475
+ snappy: {
476
+ damping: 22,
477
+ stiffness: 420,
478
+ mass: 0.8,
479
+ overshootClamping: false
480
+ },
481
+ // The liquid glass spring: physical, fluid, slight wobble
482
+ liquid: {
483
+ damping: 15,
484
+ stiffness: 280,
485
+ mass: 1,
486
+ overshootClamping: false
487
+ },
488
+ // Reveal: for blurs fading in, dialogs mounting
489
+ reveal: {
490
+ damping: 30,
491
+ stiffness: 200,
492
+ mass: 1.2,
493
+ overshootClamping: false
494
+ },
495
+ // Bounce: FAB, badges, notification pops
496
+ bounce: {
497
+ damping: 8,
498
+ stiffness: 340,
499
+ mass: 0.7,
500
+ overshootClamping: false
501
+ },
502
+ // Precise: sliders, progress — no overshoot
503
+ precise: {
504
+ damping: 40,
505
+ stiffness: 300,
506
+ mass: 1,
507
+ overshootClamping: true
508
+ }
509
+ };
510
+ var reducedMotion = {
511
+ duration: {
512
+ instant: 0,
513
+ fast: 0,
514
+ normal: 50,
515
+ slow: 80,
516
+ verySlow: 100,
517
+ blurIn: 80,
518
+ blurOut: 60,
519
+ enter: 80,
520
+ exit: 60
521
+ },
522
+ springs: {
523
+ snappy: { damping: 40, stiffness: 400, mass: 1 },
524
+ liquid: { damping: 40, stiffness: 400, mass: 1 },
525
+ reveal: { damping: 40, stiffness: 400, mass: 1 },
526
+ bounce: { damping: 40, stiffness: 400, mass: 1 },
527
+ precise: { damping: 40, stiffness: 400, mass: 1 }
528
+ }
529
+ };
530
+ var motion = { duration, easing, springs, reducedMotion };
531
+
532
+ // src/themes/base.ts
533
+ var lightColors = {
534
+ primary: palette.indigo[500],
535
+ primaryHover: palette.indigo[600],
536
+ primaryFocused: palette.indigo[400],
537
+ primarySubtle: palette.indigo[50],
538
+ primaryMuted: "rgba(99,102,241,0.12)",
539
+ secondary: palette.violet[500],
540
+ secondaryHover: palette.violet[600],
541
+ secondarySubtle: palette.violet[50],
542
+ success: palette.emerald[500],
543
+ successSubtle: palette.emerald[50],
544
+ successText: palette.emerald[700],
545
+ warning: palette.amber[500],
546
+ warningSubtle: palette.amber[50],
547
+ warningText: palette.amber[700],
548
+ error: palette.rose[500],
549
+ errorHover: palette.rose[600],
550
+ errorSubtle: palette.rose[50],
551
+ errorText: palette.rose[700],
552
+ info: palette.cyan[500],
553
+ infoSubtle: palette.cyan[50],
554
+ infoText: palette.cyan[700],
555
+ background: palette.neutral[50],
556
+ backgroundDeep: palette.neutral[100],
557
+ surface: palette.neutral[0],
558
+ surfaceRaised: palette.neutral[0],
559
+ surfaceOverlay: palette.neutral[0],
560
+ text: palette.neutral[900],
561
+ textSecondary: palette.neutral[600],
562
+ textMuted: palette.neutral[400],
563
+ textDisabled: palette.neutral[300],
564
+ textInverted: palette.neutral[0],
565
+ border: palette.neutral[200],
566
+ borderSubtle: palette.neutral[100],
567
+ borderStrong: palette.neutral[300],
568
+ neutral: palette.neutral[600],
569
+ neutralSubtle: palette.neutral[100]
570
+ };
571
+ var baseTheme = {
572
+ colors: lightColors,
573
+ glass: glassTokens,
574
+ spacing,
575
+ radii,
576
+ typography,
577
+ shadows,
578
+ motion
579
+ };
580
+
581
+ // src/themes/dark.ts
582
+ var darkColors = {
583
+ primary: palette.indigo[400],
584
+ primaryHover: palette.indigo[300],
585
+ primaryFocused: palette.indigo[500],
586
+ primarySubtle: "rgba(99,102,241,0.15)",
587
+ primaryMuted: "rgba(99,102,241,0.10)",
588
+ secondary: palette.violet[400],
589
+ secondaryHover: palette.violet[300],
590
+ secondarySubtle: "rgba(139,92,246,0.15)",
591
+ success: palette.emerald[400],
592
+ successSubtle: "rgba(16,185,129,0.15)",
593
+ successText: palette.emerald[300],
594
+ warning: palette.amber[400],
595
+ warningSubtle: "rgba(245,158,11,0.15)",
596
+ warningText: palette.amber[300],
597
+ error: palette.rose[400],
598
+ errorHover: palette.rose[300],
599
+ errorSubtle: "rgba(244,63,94,0.15)",
600
+ errorText: palette.rose[300],
601
+ info: palette.cyan[400],
602
+ infoSubtle: "rgba(6,182,212,0.15)",
603
+ infoText: palette.cyan[300],
604
+ background: "#0c0c14",
605
+ backgroundDeep: "#08080f",
606
+ surface: "#13131f",
607
+ surfaceRaised: "#1a1a2e",
608
+ surfaceOverlay: "rgba(13,13,25,0.95)",
609
+ text: palette.neutral[50],
610
+ textSecondary: palette.neutral[300],
611
+ textMuted: palette.neutral[500],
612
+ textDisabled: palette.neutral[700],
613
+ textInverted: palette.neutral[900],
614
+ border: palette.neutral[800],
615
+ borderSubtle: palette.neutral[900],
616
+ borderStrong: palette.neutral[700],
617
+ neutral: palette.neutral[400],
618
+ neutralSubtle: "rgba(255,255,255,0.06)"
619
+ };
620
+ var ThemeContext = createContext(null);
621
+ function ThemeProvider({
622
+ theme: themeOverrides,
623
+ colorScheme: initialPreference = "system",
624
+ children
625
+ }) {
626
+ const systemColorScheme = useColorScheme$1() === "dark" ? "dark" : "light";
627
+ const [preference, setPreference] = useState(initialPreference);
628
+ const resolvedScheme = preference === "system" ? systemColorScheme : preference;
629
+ const setColorScheme = useCallback((scheme) => {
630
+ setPreference(scheme);
631
+ }, []);
632
+ const resolvedTheme = useMemo(() => {
633
+ let result = { ...baseTheme };
634
+ if (resolvedScheme === "dark") {
635
+ result = { ...result, colors: darkColors };
636
+ }
637
+ if (themeOverrides) {
638
+ result = deepMerge(
639
+ result,
640
+ themeOverrides
641
+ );
642
+ }
643
+ return result;
644
+ }, [themeOverrides, resolvedScheme]);
645
+ const value = useMemo(
646
+ () => ({
647
+ theme: resolvedTheme,
648
+ colorScheme: resolvedScheme,
649
+ colorSchemePreference: preference,
650
+ setColorScheme,
651
+ isDark: resolvedScheme === "dark",
652
+ isLight: resolvedScheme === "light"
653
+ }),
654
+ [resolvedTheme, resolvedScheme, preference, setColorScheme]
655
+ );
656
+ return /* @__PURE__ */ jsx(ThemeContext.Provider, { value, children });
657
+ }
658
+ function useTheme() {
659
+ const ctx = useContext(ThemeContext);
660
+ if (!ctx) {
661
+ throw new Error(
662
+ "[Reactnatively] useTheme must be called within a <ThemeProvider>. Wrap your app root with <ThemeProvider>."
663
+ );
664
+ }
665
+ return ctx;
666
+ }
667
+ function useColorScheme() {
668
+ return useTheme().colorScheme;
669
+ }
670
+ function useIsDark() {
671
+ return useTheme().isDark;
672
+ }
673
+ function useToken(key) {
674
+ const { theme } = useTheme();
675
+ return theme[key];
676
+ }
677
+ function createTheme(overrides) {
678
+ return deepMerge(
679
+ baseTheme,
680
+ overrides
681
+ );
682
+ }
683
+
684
+ export { ThemeProvider, baseTheme, createTheme, duration, easing, fontFamily, fontSize, fontWeight, glassTokens, letterSpacing, lineHeight, motion, palette, radii, reducedMotion, shadows, spacing, springs, typography, useColorScheme, useIsDark, useTheme, useToken };
685
+ //# sourceMappingURL=index.mjs.map
686
+ //# sourceMappingURL=index.mjs.map