@backbay/glia 0.2.0-alpha.7 → 0.2.0-alpha.8
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/audio/index.js +1145 -5
- package/dist/audio/index.js.map +1 -1
- package/dist/components/index.js +3187 -10
- package/dist/components/index.js.map +1 -1
- package/dist/core.js +19714 -12
- package/dist/core.js.map +1 -1
- package/dist/emotion/index.js +1 -1
- package/dist/emotion/index.js.map +1 -1
- package/dist/hooks/index.js +941 -6
- package/dist/hooks/index.js.map +1 -1
- package/dist/index.js +31841 -183
- package/dist/index.js.map +1 -1
- package/dist/primitives/index.js +21111 -57
- package/dist/primitives/index.js.map +1 -1
- package/dist/protocol/index.js +360 -2
- package/dist/protocol/index.js.map +1 -1
- package/dist/speakeasy/index.js +2786 -38
- package/dist/speakeasy/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/theme/index.js +1150 -3
- package/dist/theme/index.js.map +1 -1
- package/dist/vision/index.js +370 -2
- package/dist/vision/index.js.map +1 -1
- package/dist/workspace/index.js +16824 -2
- package/dist/workspace/index.js.map +1 -1
- package/package.json +15 -9
- package/dist/AuroraBackground-AP6ZHVFA.js +0 -6
- package/dist/AuroraBackground-AP6ZHVFA.js.map +0 -1
- package/dist/BentoGrid-CDARICNM.js +0 -6
- package/dist/BentoGrid-CDARICNM.js.map +0 -1
- package/dist/CommandPalette-JCWJKRBY.js +0 -6
- package/dist/CommandPalette-JCWJKRBY.js.map +0 -1
- package/dist/Glass-H4X4ZI4P.js +0 -7
- package/dist/Glass-H4X4ZI4P.js.map +0 -1
- package/dist/GlitchText-KLQ57PPY.js +0 -6
- package/dist/GlitchText-KLQ57PPY.js.map +0 -1
- package/dist/GlowButton-VGBPMZO7.js +0 -6
- package/dist/GlowButton-VGBPMZO7.js.map +0 -1
- package/dist/Graph3D-GO7N2EZQ.js +0 -540
- package/dist/Graph3D-GO7N2EZQ.js.map +0 -1
- package/dist/HUDProgressRing-N6C5NAEV.js +0 -6
- package/dist/HUDProgressRing-N6C5NAEV.js.map +0 -1
- package/dist/KPIStat-PBQK27ZB.js +0 -6
- package/dist/KPIStat-PBQK27ZB.js.map +0 -1
- package/dist/NeonToast-W5F7MU3U.js +0 -6
- package/dist/NeonToast-W5F7MU3U.js.map +0 -1
- package/dist/ParticleField-WK6CNHWU.js +0 -51
- package/dist/ParticleField-WK6CNHWU.js.map +0 -1
- package/dist/TextGenerateEffect-EUCEIIUJ.js +0 -6
- package/dist/TextGenerateEffect-EUCEIIUJ.js.map +0 -1
- package/dist/ThreeDCard-VH5I3SSY.js +0 -6
- package/dist/ThreeDCard-VH5I3SSY.js.map +0 -1
- package/dist/TypingAnimation-GIWOHPIX.js +0 -6
- package/dist/TypingAnimation-GIWOHPIX.js.map +0 -1
- package/dist/alert-dialog-QOSYBIIE.js +0 -19
- package/dist/alert-dialog-QOSYBIIE.js.map +0 -1
- package/dist/avatar-N5R37PCU.js +0 -10
- package/dist/avatar-N5R37PCU.js.map +0 -1
- package/dist/badge-GTVIIGPY.js +0 -8
- package/dist/badge-GTVIIGPY.js.map +0 -1
- package/dist/button-D7IMSV2D.js +0 -8
- package/dist/button-D7IMSV2D.js.map +0 -1
- package/dist/chunk-3CMPQOMY.js +0 -69
- package/dist/chunk-3CMPQOMY.js.map +0 -1
- package/dist/chunk-3OQT6IYR.js +0 -41
- package/dist/chunk-3OQT6IYR.js.map +0 -1
- package/dist/chunk-43B2WVLS.js +0 -85
- package/dist/chunk-43B2WVLS.js.map +0 -1
- package/dist/chunk-4SRFO5W3.js +0 -121
- package/dist/chunk-4SRFO5W3.js.map +0 -1
- package/dist/chunk-5IZELOOU.js +0 -362
- package/dist/chunk-5IZELOOU.js.map +0 -1
- package/dist/chunk-6DM4ACSS.js +0 -154
- package/dist/chunk-6DM4ACSS.js.map +0 -1
- package/dist/chunk-6IGT34PC.js +0 -50
- package/dist/chunk-6IGT34PC.js.map +0 -1
- package/dist/chunk-6RKBCJHN.js +0 -194
- package/dist/chunk-6RKBCJHN.js.map +0 -1
- package/dist/chunk-6RX2WGCO.js +0 -108
- package/dist/chunk-6RX2WGCO.js.map +0 -1
- package/dist/chunk-7K4WZM3U.js +0 -189
- package/dist/chunk-7K4WZM3U.js.map +0 -1
- package/dist/chunk-7MDBHJPT.js +0 -407
- package/dist/chunk-7MDBHJPT.js.map +0 -1
- package/dist/chunk-7UQD6ROV.js +0 -9
- package/dist/chunk-7UQD6ROV.js.map +0 -1
- package/dist/chunk-AFNIVLZP.js +0 -1069
- package/dist/chunk-AFNIVLZP.js.map +0 -1
- package/dist/chunk-ANWYRO6A.js +0 -407
- package/dist/chunk-ANWYRO6A.js.map +0 -1
- package/dist/chunk-DIXPOHDO.js +0 -71
- package/dist/chunk-DIXPOHDO.js.map +0 -1
- package/dist/chunk-DWYMKYPI.js +0 -3
- package/dist/chunk-DWYMKYPI.js.map +0 -1
- package/dist/chunk-E3NVDCZG.js +0 -280
- package/dist/chunk-E3NVDCZG.js.map +0 -1
- package/dist/chunk-EBM7YBKL.js +0 -399
- package/dist/chunk-EBM7YBKL.js.map +0 -1
- package/dist/chunk-EPAM7IWW.js +0 -294
- package/dist/chunk-EPAM7IWW.js.map +0 -1
- package/dist/chunk-EXQ7GYRS.js +0 -134
- package/dist/chunk-EXQ7GYRS.js.map +0 -1
- package/dist/chunk-F4QTUZ3C.js +0 -136
- package/dist/chunk-F4QTUZ3C.js.map +0 -1
- package/dist/chunk-FEW533R2.js +0 -105
- package/dist/chunk-FEW533R2.js.map +0 -1
- package/dist/chunk-FFZLJKC7.js +0 -270
- package/dist/chunk-FFZLJKC7.js.map +0 -1
- package/dist/chunk-GEAMOBF7.js +0 -8486
- package/dist/chunk-GEAMOBF7.js.map +0 -1
- package/dist/chunk-GRTRSCTD.js +0 -74
- package/dist/chunk-GRTRSCTD.js.map +0 -1
- package/dist/chunk-IKGYOGLK.js +0 -16
- package/dist/chunk-IKGYOGLK.js.map +0 -1
- package/dist/chunk-IQ7WYWVJ.js +0 -73
- package/dist/chunk-IQ7WYWVJ.js.map +0 -1
- package/dist/chunk-IXIVWQLF.js +0 -543
- package/dist/chunk-IXIVWQLF.js.map +0 -1
- package/dist/chunk-JCJU57RC.js +0 -115
- package/dist/chunk-JCJU57RC.js.map +0 -1
- package/dist/chunk-KORSTBU4.js +0 -117
- package/dist/chunk-KORSTBU4.js.map +0 -1
- package/dist/chunk-KSEZ6UM2.js +0 -235
- package/dist/chunk-KSEZ6UM2.js.map +0 -1
- package/dist/chunk-MHPF7R3O.js +0 -1376
- package/dist/chunk-MHPF7R3O.js.map +0 -1
- package/dist/chunk-MPC5IH7E.js +0 -81
- package/dist/chunk-MPC5IH7E.js.map +0 -1
- package/dist/chunk-MQIU2NYA.js +0 -114
- package/dist/chunk-MQIU2NYA.js.map +0 -1
- package/dist/chunk-NYMBJOGR.js +0 -2192
- package/dist/chunk-NYMBJOGR.js.map +0 -1
- package/dist/chunk-OBZD2M3C.js +0 -169
- package/dist/chunk-OBZD2M3C.js.map +0 -1
- package/dist/chunk-ODM2AG6G.js +0 -176
- package/dist/chunk-ODM2AG6G.js.map +0 -1
- package/dist/chunk-ONDKF5LP.js +0 -53
- package/dist/chunk-ONDKF5LP.js.map +0 -1
- package/dist/chunk-P25YCWQB.js +0 -41
- package/dist/chunk-P25YCWQB.js.map +0 -1
- package/dist/chunk-PFYVNM6H.js +0 -14
- package/dist/chunk-PFYVNM6H.js.map +0 -1
- package/dist/chunk-PWNNSGFL.js +0 -20
- package/dist/chunk-PWNNSGFL.js.map +0 -1
- package/dist/chunk-Q2PGZVOT.js +0 -36
- package/dist/chunk-Q2PGZVOT.js.map +0 -1
- package/dist/chunk-Q2XDMV7U.js +0 -76
- package/dist/chunk-Q2XDMV7U.js.map +0 -1
- package/dist/chunk-QG7FH2FI.js +0 -45
- package/dist/chunk-QG7FH2FI.js.map +0 -1
- package/dist/chunk-R7HUOK2D.js +0 -1914
- package/dist/chunk-R7HUOK2D.js.map +0 -1
- package/dist/chunk-REUYY7G5.js +0 -773
- package/dist/chunk-REUYY7G5.js.map +0 -1
- package/dist/chunk-RHC2Z2HT.js +0 -199
- package/dist/chunk-RHC2Z2HT.js.map +0 -1
- package/dist/chunk-RMCVLIFE.js +0 -23
- package/dist/chunk-RMCVLIFE.js.map +0 -1
- package/dist/chunk-ROZLTXGR.js +0 -234
- package/dist/chunk-ROZLTXGR.js.map +0 -1
- package/dist/chunk-RSS2C2O3.js +0 -17
- package/dist/chunk-RSS2C2O3.js.map +0 -1
- package/dist/chunk-SAGCG5SH.js +0 -355
- package/dist/chunk-SAGCG5SH.js.map +0 -1
- package/dist/chunk-TM6AOUSD.js +0 -40
- package/dist/chunk-TM6AOUSD.js.map +0 -1
- package/dist/chunk-TPK4BYCO.js +0 -970
- package/dist/chunk-TPK4BYCO.js.map +0 -1
- package/dist/chunk-UNQIL4K2.js +0 -34
- package/dist/chunk-UNQIL4K2.js.map +0 -1
- package/dist/chunk-UUG6L75Y.js +0 -47
- package/dist/chunk-UUG6L75Y.js.map +0 -1
- package/dist/chunk-V2SYMV4W.js +0 -114
- package/dist/chunk-V2SYMV4W.js.map +0 -1
- package/dist/chunk-V7EN5CTH.js +0 -130
- package/dist/chunk-V7EN5CTH.js.map +0 -1
- package/dist/chunk-VITKG2HL.js +0 -1125
- package/dist/chunk-VITKG2HL.js.map +0 -1
- package/dist/chunk-VYEWU5LO.js +0 -2631
- package/dist/chunk-VYEWU5LO.js.map +0 -1
- package/dist/chunk-W67QAGSH.js +0 -178
- package/dist/chunk-W67QAGSH.js.map +0 -1
- package/dist/chunk-WWBIN6KV.js +0 -1353
- package/dist/chunk-WWBIN6KV.js.map +0 -1
- package/dist/chunk-X77Z4PFB.js +0 -224
- package/dist/chunk-X77Z4PFB.js.map +0 -1
- package/dist/chunk-X7VG7OTT.js +0 -8
- package/dist/chunk-X7VG7OTT.js.map +0 -1
- package/dist/chunk-XE4K2SGI.js +0 -74
- package/dist/chunk-XE4K2SGI.js.map +0 -1
- package/dist/chunk-YIUG7IJK.js +0 -628
- package/dist/chunk-YIUG7IJK.js.map +0 -1
- package/dist/chunk-YNVN3V4Y.js +0 -13
- package/dist/chunk-YNVN3V4Y.js.map +0 -1
- package/dist/chunk-Z2S54IZX.js +0 -198
- package/dist/chunk-Z2S54IZX.js.map +0 -1
- package/dist/chunk-ZR6AH25Z.js +0 -17
- package/dist/chunk-ZR6AH25Z.js.map +0 -1
- package/dist/dialog-SPM3DTTI.js +0 -17
- package/dist/dialog-SPM3DTTI.js.map +0 -1
- package/dist/dropdown-menu-HMTWKWGK.js +0 -21
- package/dist/dropdown-menu-HMTWKWGK.js.map +0 -1
- package/dist/input-BH4P4S26.js +0 -6
- package/dist/input-BH4P4S26.js.map +0 -1
- package/dist/label-5Z4Q6VER.js +0 -8
- package/dist/label-5Z4Q6VER.js.map +0 -1
- package/dist/popover-IFOUXYLI.js +0 -18
- package/dist/popover-IFOUXYLI.js.map +0 -1
- package/dist/scroll-area-DJXNW6QX.js +0 -14
- package/dist/scroll-area-DJXNW6QX.js.map +0 -1
- package/dist/select-FZ277C3G.js +0 -22
- package/dist/select-FZ277C3G.js.map +0 -1
- package/dist/separator-BTMLN4NB.js +0 -8
- package/dist/separator-BTMLN4NB.js.map +0 -1
- package/dist/skeleton-DXIWBH4W.js +0 -6
- package/dist/skeleton-DXIWBH4W.js.map +0 -1
- package/dist/switch-4MCXIZBY.js +0 -13
- package/dist/switch-4MCXIZBY.js.map +0 -1
- package/dist/tabs-O7AW3APK.js +0 -17
- package/dist/tabs-O7AW3APK.js.map +0 -1
- package/dist/textarea-IB5WAFDO.js +0 -6
- package/dist/textarea-IB5WAFDO.js.map +0 -1
- package/dist/toggle-XVPPG6P4.js +0 -10
- package/dist/toggle-XVPPG6P4.js.map +0 -1
- package/dist/tooltip-JICZTD4F.js +0 -18
- package/dist/tooltip-JICZTD4F.js.map +0 -1
package/dist/chunk-VITKG2HL.js
DELETED
|
@@ -1,1125 +0,0 @@
|
|
|
1
|
-
import { usePrefersReducedMotion } from './chunk-3CMPQOMY.js';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { MotionConfig } from 'framer-motion';
|
|
4
|
-
import { jsx } from 'react/jsx-runtime';
|
|
5
|
-
|
|
6
|
-
// src/theme/nebula.ts
|
|
7
|
-
var nebulaTheme = {
|
|
8
|
-
id: "nebula",
|
|
9
|
-
name: "Nebula",
|
|
10
|
-
description: "Clinical cyberpunk HUD with neon accents and starfield ambience",
|
|
11
|
-
color: {
|
|
12
|
-
bg: {
|
|
13
|
-
body: "#02040a",
|
|
14
|
-
panel: "rgba(4, 8, 16, 0.94)",
|
|
15
|
-
elevated: "rgba(12, 17, 23, 0.98)",
|
|
16
|
-
horizon: "#050609"
|
|
17
|
-
},
|
|
18
|
-
text: {
|
|
19
|
-
primary: "#E5E7EB",
|
|
20
|
-
muted: "#94A3B8",
|
|
21
|
-
soft: "#64748B"
|
|
22
|
-
},
|
|
23
|
-
accent: {
|
|
24
|
-
primary: "#22D3EE",
|
|
25
|
-
// cyan-neon
|
|
26
|
-
secondary: "#F43F5E",
|
|
27
|
-
// magenta-neon
|
|
28
|
-
positive: "#10B981",
|
|
29
|
-
// emerald-neon
|
|
30
|
-
warning: "#EAB308",
|
|
31
|
-
// yellow-warning
|
|
32
|
-
destructive: "#F43F5E"
|
|
33
|
-
},
|
|
34
|
-
border: "rgba(34, 211, 238, 0.12)",
|
|
35
|
-
ring: "#22D3EE"
|
|
36
|
-
},
|
|
37
|
-
glass: {
|
|
38
|
-
panelBg: "rgba(4, 8, 16, 0.94)",
|
|
39
|
-
panelBorder: "rgba(34, 211, 238, 0.12)",
|
|
40
|
-
panelBlur: "24px",
|
|
41
|
-
headerGradient: "linear-gradient(to right, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.015), transparent)",
|
|
42
|
-
cardBg: "rgba(255, 255, 255, 0.015)",
|
|
43
|
-
cardBorder: "rgba(255, 255, 255, 0.04)",
|
|
44
|
-
hoverBg: "rgba(34, 211, 238, 0.08)",
|
|
45
|
-
activeBorder: "rgba(34, 211, 238, 0.35)",
|
|
46
|
-
activeShadow: "0 6px 28px rgba(34, 211, 238, 0.1)"
|
|
47
|
-
},
|
|
48
|
-
elevation: {
|
|
49
|
-
softDrop: "0 2px 8px rgba(0, 0, 0, 0.15)",
|
|
50
|
-
hudPanel: "0 8px 32px rgba(2, 4, 8, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.02)",
|
|
51
|
-
hudRail: "0 -6px 32px rgba(2, 4, 8, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.02)",
|
|
52
|
-
modal: "0 16px 48px rgba(0, 0, 0, 0.5), 0 8px 24px rgba(34, 211, 238, 0.08)",
|
|
53
|
-
glow: "0 0 16px 1px rgba(34, 211, 238, 0.4)"
|
|
54
|
-
},
|
|
55
|
-
motion: {
|
|
56
|
-
fast: { duration: 0.15, ease: "easeOut" },
|
|
57
|
-
normal: { duration: 0.2, ease: "easeOut" },
|
|
58
|
-
spring: { type: "spring", damping: 25, stiffness: 280 },
|
|
59
|
-
ambientDrift: { duration: 8, ease: "linear" },
|
|
60
|
-
ripple: { duration: 2, ease: "easeInOut" }
|
|
61
|
-
},
|
|
62
|
-
ambient: {
|
|
63
|
-
type: "nebula-stars",
|
|
64
|
-
particleColors: ["#22D3EE", "#F43F5E", "#8B5CF6", "#10B981"],
|
|
65
|
-
particleDensity: 0.6,
|
|
66
|
-
particleSpeed: 0.3,
|
|
67
|
-
particleSizeRange: [1, 3],
|
|
68
|
-
horizonGradient: `
|
|
69
|
-
radial-gradient(ellipse at top left, rgba(34, 211, 238, 0.08), transparent 50%),
|
|
70
|
-
radial-gradient(ellipse at bottom right, rgba(139, 92, 246, 0.06), transparent 50%),
|
|
71
|
-
radial-gradient(circle at 30% 70%, rgba(244, 63, 94, 0.04), transparent 40%)
|
|
72
|
-
`,
|
|
73
|
-
rippleColorPrimary: "rgba(34, 211, 238, 0.04)",
|
|
74
|
-
rippleColorSecondary: "rgba(217, 70, 239, 0.025)",
|
|
75
|
-
glowIntensity: 0.8
|
|
76
|
-
},
|
|
77
|
-
controls: {
|
|
78
|
-
switch: {
|
|
79
|
-
track: {
|
|
80
|
-
bg: {
|
|
81
|
-
on: "rgba(34, 211, 238, 0.2)",
|
|
82
|
-
off: "rgba(255, 255, 255, 0.08)"
|
|
83
|
-
},
|
|
84
|
-
border: {
|
|
85
|
-
on: "rgba(34, 211, 238, 0.4)",
|
|
86
|
-
off: "rgba(255, 255, 255, 0.15)"
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
|
-
thumb: {
|
|
90
|
-
bg: {
|
|
91
|
-
on: "#22D3EE",
|
|
92
|
-
off: "#64748B"
|
|
93
|
-
},
|
|
94
|
-
shadow: {
|
|
95
|
-
on: "0 0 8px rgba(34, 211, 238, 0.5)",
|
|
96
|
-
off: "0 1px 2px rgba(0, 0, 0, 0.2)"
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
|
-
slider: {
|
|
101
|
-
track: {
|
|
102
|
-
bg: "rgba(255, 255, 255, 0.08)",
|
|
103
|
-
border: "rgba(255, 255, 255, 0.15)"
|
|
104
|
-
},
|
|
105
|
-
thumb: {
|
|
106
|
-
bg: "#22D3EE",
|
|
107
|
-
shadow: "0 0 8px rgba(34, 211, 238, 0.5)"
|
|
108
|
-
},
|
|
109
|
-
fill: "rgba(34, 211, 238, 0.6)"
|
|
110
|
-
},
|
|
111
|
-
buttonGlow: {
|
|
112
|
-
hoverBg: "rgba(34, 211, 238, 0.08)",
|
|
113
|
-
hoverText: "#22D3EE",
|
|
114
|
-
hoverShadow: "0 0 10px rgba(34, 211, 238, 0.1)"
|
|
115
|
-
}
|
|
116
|
-
},
|
|
117
|
-
fonts: {
|
|
118
|
-
display: "'Inter', sans-serif",
|
|
119
|
-
body: "'Inter', sans-serif",
|
|
120
|
-
mono: "'JetBrains Mono', monospace"
|
|
121
|
-
},
|
|
122
|
-
radii: {
|
|
123
|
-
sm: "6px",
|
|
124
|
-
md: "8px",
|
|
125
|
-
lg: "8px"
|
|
126
|
-
},
|
|
127
|
-
spacing: {
|
|
128
|
-
taskbarHeight: "48px",
|
|
129
|
-
titlebarHeight: "36px",
|
|
130
|
-
windowPadding: "12px",
|
|
131
|
-
iconSize: "64px",
|
|
132
|
-
iconGap: "16px",
|
|
133
|
-
windowBorderWidth: "1px"
|
|
134
|
-
}
|
|
135
|
-
};
|
|
136
|
-
|
|
137
|
-
// src/theme/solarpunk.ts
|
|
138
|
-
var solarpunkTheme = {
|
|
139
|
-
id: "solarpunk",
|
|
140
|
-
name: "Solarpunk Observatory",
|
|
141
|
-
description: "Botanical space station with sunlit warmth and organic calm",
|
|
142
|
-
color: {
|
|
143
|
-
bg: {
|
|
144
|
-
body: "#0a0f14",
|
|
145
|
-
// Slightly warmer than nebula
|
|
146
|
-
panel: "rgba(16, 24, 32, 0.92)",
|
|
147
|
-
elevated: "rgba(24, 32, 40, 0.96)",
|
|
148
|
-
horizon: "#0d1318"
|
|
149
|
-
},
|
|
150
|
-
text: {
|
|
151
|
-
primary: "#F0EDE8",
|
|
152
|
-
// Warm white
|
|
153
|
-
muted: "#A8B4A8",
|
|
154
|
-
// Sage-tinged gray
|
|
155
|
-
soft: "#6B7B6B"
|
|
156
|
-
// Muted sage
|
|
157
|
-
},
|
|
158
|
-
accent: {
|
|
159
|
-
primary: "#F5A623",
|
|
160
|
-
// Warm gold (sun)
|
|
161
|
-
secondary: "#4ADE80",
|
|
162
|
-
// Leaf green
|
|
163
|
-
positive: "#4ADE80",
|
|
164
|
-
// Same leaf green
|
|
165
|
-
warning: "#FB923C",
|
|
166
|
-
// Warm orange
|
|
167
|
-
destructive: "#EF4444"
|
|
168
|
-
// Softer red
|
|
169
|
-
},
|
|
170
|
-
border: "rgba(74, 222, 128, 0.15)",
|
|
171
|
-
ring: "#4ADE80"
|
|
172
|
-
},
|
|
173
|
-
glass: {
|
|
174
|
-
panelBg: "rgba(16, 24, 20, 0.88)",
|
|
175
|
-
// Jade-tinted
|
|
176
|
-
panelBorder: "rgba(74, 222, 128, 0.12)",
|
|
177
|
-
panelBlur: "20px",
|
|
178
|
-
// Slightly less blur for organic feel
|
|
179
|
-
headerGradient: "linear-gradient(to right, rgba(245, 166, 35, 0.06), rgba(74, 222, 128, 0.04), transparent)",
|
|
180
|
-
cardBg: "rgba(245, 166, 35, 0.02)",
|
|
181
|
-
cardBorder: "rgba(74, 222, 128, 0.08)",
|
|
182
|
-
hoverBg: "rgba(245, 166, 35, 0.06)",
|
|
183
|
-
activeBorder: "rgba(245, 166, 35, 0.35)",
|
|
184
|
-
activeShadow: "0 6px 24px rgba(245, 166, 35, 0.1)"
|
|
185
|
-
},
|
|
186
|
-
elevation: {
|
|
187
|
-
softDrop: "0 4px 12px rgba(0, 0, 0, 0.12)",
|
|
188
|
-
hudPanel: "0 8px 32px rgba(10, 15, 20, 0.5), inset 0 1px 0 rgba(245, 166, 35, 0.02)",
|
|
189
|
-
hudRail: "0 -6px 28px rgba(10, 15, 20, 0.5), inset 0 1px 0 rgba(74, 222, 128, 0.03)",
|
|
190
|
-
modal: "0 16px 48px rgba(0, 0, 0, 0.4), 0 4px 16px rgba(245, 166, 35, 0.06)",
|
|
191
|
-
glow: "0 0 20px 2px rgba(245, 166, 35, 0.25)"
|
|
192
|
-
},
|
|
193
|
-
motion: {
|
|
194
|
-
fast: { duration: 0.18, ease: "easeOut" },
|
|
195
|
-
normal: { duration: 0.25, ease: [0.4, 0, 0.2, 1] },
|
|
196
|
-
// Slightly smoother
|
|
197
|
-
spring: { type: "spring", damping: 28, stiffness: 240 },
|
|
198
|
-
// More relaxed
|
|
199
|
-
ambientDrift: { duration: 12, ease: "linear" },
|
|
200
|
-
// Slower drift
|
|
201
|
-
ripple: { duration: 2.5, ease: "easeInOut" }
|
|
202
|
-
},
|
|
203
|
-
ambient: {
|
|
204
|
-
type: "dust-motes",
|
|
205
|
-
particleColors: [
|
|
206
|
-
"rgba(245, 166, 35, 0.6)",
|
|
207
|
-
// Gold
|
|
208
|
-
"rgba(255, 248, 220, 0.5)",
|
|
209
|
-
// Warm cream
|
|
210
|
-
"rgba(74, 222, 128, 0.3)",
|
|
211
|
-
// Faint green
|
|
212
|
-
"rgba(255, 255, 255, 0.4)"
|
|
213
|
-
// White
|
|
214
|
-
],
|
|
215
|
-
particleDensity: 0.35,
|
|
216
|
-
// Sparser than stars
|
|
217
|
-
particleSpeed: 0.15,
|
|
218
|
-
// Slower, lazier drift
|
|
219
|
-
particleSizeRange: [2, 6],
|
|
220
|
-
// Larger motes
|
|
221
|
-
horizonGradient: `
|
|
222
|
-
radial-gradient(ellipse at top, rgba(245, 166, 35, 0.06), transparent 60%),
|
|
223
|
-
radial-gradient(ellipse at bottom left, rgba(74, 222, 128, 0.05), transparent 50%),
|
|
224
|
-
linear-gradient(to bottom, rgba(16, 24, 20, 0.3), transparent 70%)
|
|
225
|
-
`,
|
|
226
|
-
rippleColorPrimary: "rgba(245, 166, 35, 0.035)",
|
|
227
|
-
rippleColorSecondary: "rgba(74, 222, 128, 0.025)",
|
|
228
|
-
glowIntensity: 0.5
|
|
229
|
-
// Softer glow
|
|
230
|
-
},
|
|
231
|
-
controls: {
|
|
232
|
-
switch: {
|
|
233
|
-
track: {
|
|
234
|
-
bg: {
|
|
235
|
-
on: "rgba(74, 222, 128, 0.2)",
|
|
236
|
-
off: "rgba(245, 230, 210, 0.1)"
|
|
237
|
-
// Warm cream off state
|
|
238
|
-
},
|
|
239
|
-
border: {
|
|
240
|
-
on: "rgba(74, 222, 128, 0.4)",
|
|
241
|
-
off: "rgba(245, 230, 210, 0.2)"
|
|
242
|
-
}
|
|
243
|
-
},
|
|
244
|
-
thumb: {
|
|
245
|
-
bg: {
|
|
246
|
-
on: "#F5A623",
|
|
247
|
-
// Gold sun disk
|
|
248
|
-
off: "#8B9B8B"
|
|
249
|
-
// Sage gray
|
|
250
|
-
},
|
|
251
|
-
shadow: {
|
|
252
|
-
on: "0 0 10px rgba(245, 166, 35, 0.5), inset 0 -1px 2px rgba(0,0,0,0.1)",
|
|
253
|
-
off: "0 1px 3px rgba(0, 0, 0, 0.15)"
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
},
|
|
257
|
-
slider: {
|
|
258
|
-
track: {
|
|
259
|
-
bg: "rgba(245, 230, 210, 0.1)",
|
|
260
|
-
border: "rgba(74, 222, 128, 0.15)"
|
|
261
|
-
},
|
|
262
|
-
thumb: {
|
|
263
|
-
bg: "linear-gradient(135deg, #F5A623, #D4860F)",
|
|
264
|
-
// Brass/wood knob
|
|
265
|
-
shadow: "0 2px 6px rgba(0, 0, 0, 0.2), 0 0 8px rgba(245, 166, 35, 0.3)"
|
|
266
|
-
},
|
|
267
|
-
fill: "rgba(74, 222, 128, 0.5)"
|
|
268
|
-
},
|
|
269
|
-
buttonGlow: {
|
|
270
|
-
hoverBg: "rgba(245, 166, 35, 0.08)",
|
|
271
|
-
hoverText: "#F5A623",
|
|
272
|
-
hoverShadow: "0 0 12px rgba(245, 166, 35, 0.12)"
|
|
273
|
-
}
|
|
274
|
-
},
|
|
275
|
-
fonts: {
|
|
276
|
-
display: "'Inter', sans-serif",
|
|
277
|
-
body: "'Inter', sans-serif",
|
|
278
|
-
mono: "'JetBrains Mono', monospace"
|
|
279
|
-
},
|
|
280
|
-
radii: {
|
|
281
|
-
sm: "6px",
|
|
282
|
-
md: "8px",
|
|
283
|
-
lg: "8px"
|
|
284
|
-
},
|
|
285
|
-
spacing: {
|
|
286
|
-
taskbarHeight: "48px",
|
|
287
|
-
titlebarHeight: "36px",
|
|
288
|
-
windowPadding: "12px",
|
|
289
|
-
iconSize: "64px",
|
|
290
|
-
iconGap: "16px",
|
|
291
|
-
windowBorderWidth: "1px"
|
|
292
|
-
}
|
|
293
|
-
};
|
|
294
|
-
|
|
295
|
-
// src/theme/registry.ts
|
|
296
|
-
var THEMES = {
|
|
297
|
-
nebula: nebulaTheme,
|
|
298
|
-
solarpunk: solarpunkTheme
|
|
299
|
-
};
|
|
300
|
-
var DEFAULT_THEME_ID = "nebula";
|
|
301
|
-
function getTheme(id) {
|
|
302
|
-
return THEMES[id] ?? THEMES[DEFAULT_THEME_ID];
|
|
303
|
-
}
|
|
304
|
-
function getThemeIds() {
|
|
305
|
-
return Object.keys(THEMES);
|
|
306
|
-
}
|
|
307
|
-
function clampByte(value) {
|
|
308
|
-
if (Number.isNaN(value)) return 0;
|
|
309
|
-
return Math.min(255, Math.max(0, value));
|
|
310
|
-
}
|
|
311
|
-
function parseHexColor(hex) {
|
|
312
|
-
const value = hex.trim();
|
|
313
|
-
if (!value.startsWith("#")) return null;
|
|
314
|
-
const raw = value.slice(1);
|
|
315
|
-
if (raw.length === 3) {
|
|
316
|
-
const r = Number.parseInt(raw[0] + raw[0], 16);
|
|
317
|
-
const g = Number.parseInt(raw[1] + raw[1], 16);
|
|
318
|
-
const b = Number.parseInt(raw[2] + raw[2], 16);
|
|
319
|
-
if ([r, g, b].some((n) => Number.isNaN(n))) return null;
|
|
320
|
-
return { r, g, b };
|
|
321
|
-
}
|
|
322
|
-
if (raw.length === 6) {
|
|
323
|
-
const r = Number.parseInt(raw.slice(0, 2), 16);
|
|
324
|
-
const g = Number.parseInt(raw.slice(2, 4), 16);
|
|
325
|
-
const b = Number.parseInt(raw.slice(4, 6), 16);
|
|
326
|
-
if ([r, g, b].some((n) => Number.isNaN(n))) return null;
|
|
327
|
-
return { r, g, b };
|
|
328
|
-
}
|
|
329
|
-
return null;
|
|
330
|
-
}
|
|
331
|
-
function parseRgbFunction(color) {
|
|
332
|
-
const match = color.trim().match(/^rgba?\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)(?:\s*,\s*[\d.]+)?\s*\)$/i);
|
|
333
|
-
if (!match) return null;
|
|
334
|
-
const r = clampByte(Number.parseFloat(match[1]));
|
|
335
|
-
const g = clampByte(Number.parseFloat(match[2]));
|
|
336
|
-
const b = clampByte(Number.parseFloat(match[3]));
|
|
337
|
-
return { r, g, b };
|
|
338
|
-
}
|
|
339
|
-
function parseColorToRgb(color) {
|
|
340
|
-
return parseHexColor(color) ?? parseRgbFunction(color);
|
|
341
|
-
}
|
|
342
|
-
function rgbToHslComponents(rgb) {
|
|
343
|
-
const r = rgb.r / 255;
|
|
344
|
-
const g = rgb.g / 255;
|
|
345
|
-
const b = rgb.b / 255;
|
|
346
|
-
const max = Math.max(r, g, b);
|
|
347
|
-
const min = Math.min(r, g, b);
|
|
348
|
-
const delta = max - min;
|
|
349
|
-
let h = 0;
|
|
350
|
-
let s = 0;
|
|
351
|
-
const l = (max + min) / 2;
|
|
352
|
-
if (delta !== 0) {
|
|
353
|
-
s = l > 0.5 ? delta / (2 - max - min) : delta / (max + min);
|
|
354
|
-
switch (max) {
|
|
355
|
-
case r:
|
|
356
|
-
h = (g - b) / delta + (g < b ? 6 : 0);
|
|
357
|
-
break;
|
|
358
|
-
case g:
|
|
359
|
-
h = (b - r) / delta + 2;
|
|
360
|
-
break;
|
|
361
|
-
default:
|
|
362
|
-
h = (r - g) / delta + 4;
|
|
363
|
-
break;
|
|
364
|
-
}
|
|
365
|
-
h /= 6;
|
|
366
|
-
}
|
|
367
|
-
const hDeg = Math.round(h * 360);
|
|
368
|
-
const sPct = Math.round(s * 100);
|
|
369
|
-
const lPct = Math.round(l * 100);
|
|
370
|
-
return `${hDeg} ${sPct}% ${lPct}%`;
|
|
371
|
-
}
|
|
372
|
-
function colorToHslComponents(color) {
|
|
373
|
-
const rgb = parseColorToRgb(color);
|
|
374
|
-
if (!rgb) return null;
|
|
375
|
-
return rgbToHslComponents(rgb);
|
|
376
|
-
}
|
|
377
|
-
function themeToCssVariables(theme) {
|
|
378
|
-
return {
|
|
379
|
-
// Colors
|
|
380
|
-
"--theme-bg-body": theme.color.bg.body,
|
|
381
|
-
"--theme-bg-panel": theme.color.bg.panel,
|
|
382
|
-
"--theme-bg-elevated": theme.color.bg.elevated,
|
|
383
|
-
"--theme-bg-horizon": theme.color.bg.horizon,
|
|
384
|
-
"--theme-text-primary": theme.color.text.primary,
|
|
385
|
-
"--theme-text-muted": theme.color.text.muted,
|
|
386
|
-
"--theme-text-soft": theme.color.text.soft,
|
|
387
|
-
"--theme-accent-primary": theme.color.accent.primary,
|
|
388
|
-
"--theme-accent-secondary": theme.color.accent.secondary,
|
|
389
|
-
"--theme-accent-positive": theme.color.accent.positive,
|
|
390
|
-
"--theme-accent-warning": theme.color.accent.warning,
|
|
391
|
-
"--theme-accent-destructive": theme.color.accent.destructive,
|
|
392
|
-
"--theme-border": theme.color.border,
|
|
393
|
-
"--theme-ring": theme.color.ring,
|
|
394
|
-
// Glass
|
|
395
|
-
"--theme-glass-panel-bg": theme.glass.panelBg,
|
|
396
|
-
"--theme-glass-panel-border": theme.glass.panelBorder,
|
|
397
|
-
"--theme-glass-panel-blur": theme.glass.panelBlur,
|
|
398
|
-
"--theme-glass-header-gradient": theme.glass.headerGradient,
|
|
399
|
-
"--theme-glass-card-bg": theme.glass.cardBg,
|
|
400
|
-
"--theme-glass-card-border": theme.glass.cardBorder,
|
|
401
|
-
"--theme-glass-hover-bg": theme.glass.hoverBg,
|
|
402
|
-
"--theme-glass-active-border": theme.glass.activeBorder,
|
|
403
|
-
"--theme-glass-active-shadow": theme.glass.activeShadow,
|
|
404
|
-
// Elevation
|
|
405
|
-
"--theme-shadow-soft": theme.elevation.softDrop,
|
|
406
|
-
"--theme-shadow-hud-panel": theme.elevation.hudPanel,
|
|
407
|
-
"--theme-shadow-hud-rail": theme.elevation.hudRail,
|
|
408
|
-
"--theme-shadow-modal": theme.elevation.modal,
|
|
409
|
-
"--theme-shadow-glow": theme.elevation.glow,
|
|
410
|
-
// Ambient
|
|
411
|
-
"--theme-ambient-horizon": theme.ambient.horizonGradient,
|
|
412
|
-
"--theme-ambient-ripple-primary": theme.ambient.rippleColorPrimary,
|
|
413
|
-
"--theme-ambient-ripple-secondary": theme.ambient.rippleColorSecondary,
|
|
414
|
-
"--theme-ambient-glow-intensity": String(theme.ambient.glowIntensity),
|
|
415
|
-
// Controls
|
|
416
|
-
"--theme-switch-track-on": theme.controls.switch.track.bg.on,
|
|
417
|
-
"--theme-switch-track-off": theme.controls.switch.track.bg.off,
|
|
418
|
-
"--theme-switch-thumb-on": theme.controls.switch.thumb.bg.on,
|
|
419
|
-
"--theme-switch-thumb-off": theme.controls.switch.thumb.bg.off,
|
|
420
|
-
"--theme-button-glow-hover-bg": theme.controls.buttonGlow.hoverBg,
|
|
421
|
-
"--theme-button-glow-hover-text": theme.controls.buttonGlow.hoverText,
|
|
422
|
-
"--theme-button-glow-hover-shadow": theme.controls.buttonGlow.hoverShadow
|
|
423
|
-
};
|
|
424
|
-
}
|
|
425
|
-
var TAILWIND_CSS_VARIABLE_KEYS = [
|
|
426
|
-
"--cyan-neon",
|
|
427
|
-
"--magenta-neon",
|
|
428
|
-
"--emerald-neon",
|
|
429
|
-
"--violet-neon",
|
|
430
|
-
"--yellow-warning",
|
|
431
|
-
"--background",
|
|
432
|
-
"--foreground",
|
|
433
|
-
"--card",
|
|
434
|
-
"--card-foreground",
|
|
435
|
-
"--popover",
|
|
436
|
-
"--popover-foreground",
|
|
437
|
-
"--primary",
|
|
438
|
-
"--primary-foreground",
|
|
439
|
-
"--secondary",
|
|
440
|
-
"--secondary-foreground",
|
|
441
|
-
"--muted",
|
|
442
|
-
"--muted-foreground",
|
|
443
|
-
"--accent",
|
|
444
|
-
"--accent-foreground",
|
|
445
|
-
"--destructive",
|
|
446
|
-
"--destructive-foreground",
|
|
447
|
-
"--border",
|
|
448
|
-
"--input",
|
|
449
|
-
"--ring"
|
|
450
|
-
];
|
|
451
|
-
function themeToTailwindCssVariables(theme) {
|
|
452
|
-
const bg = colorToHslComponents(theme.color.bg.body);
|
|
453
|
-
const fg = colorToHslComponents(theme.color.text.primary);
|
|
454
|
-
const panel = colorToHslComponents(theme.color.bg.panel);
|
|
455
|
-
const elevated = colorToHslComponents(theme.color.bg.elevated);
|
|
456
|
-
const primary = colorToHslComponents(theme.color.accent.primary);
|
|
457
|
-
const secondary = colorToHslComponents(theme.color.accent.secondary);
|
|
458
|
-
const positive = colorToHslComponents(theme.color.accent.positive);
|
|
459
|
-
const warning = colorToHslComponents(theme.color.accent.warning);
|
|
460
|
-
const destructive = colorToHslComponents(theme.color.accent.destructive);
|
|
461
|
-
const border = colorToHslComponents(theme.color.border);
|
|
462
|
-
const ring = colorToHslComponents(theme.color.ring);
|
|
463
|
-
const mutedFg = colorToHslComponents(theme.color.text.muted);
|
|
464
|
-
const violetFallback = theme.id === "nebula" ? colorToHslComponents("#8B5CF6") : colorToHslComponents(theme.color.accent.secondary);
|
|
465
|
-
return {
|
|
466
|
-
"--cyan-neon": primary ?? void 0,
|
|
467
|
-
"--magenta-neon": secondary ?? void 0,
|
|
468
|
-
"--emerald-neon": positive ?? void 0,
|
|
469
|
-
"--violet-neon": violetFallback ?? void 0,
|
|
470
|
-
"--yellow-warning": warning ?? void 0,
|
|
471
|
-
"--background": bg ?? void 0,
|
|
472
|
-
"--foreground": fg ?? void 0,
|
|
473
|
-
"--card": panel ?? void 0,
|
|
474
|
-
"--card-foreground": fg ?? void 0,
|
|
475
|
-
"--popover": elevated ?? void 0,
|
|
476
|
-
"--popover-foreground": fg ?? void 0,
|
|
477
|
-
"--primary": primary ?? void 0,
|
|
478
|
-
"--primary-foreground": bg ?? void 0,
|
|
479
|
-
"--secondary": secondary ?? void 0,
|
|
480
|
-
"--secondary-foreground": fg ?? void 0,
|
|
481
|
-
"--muted": elevated ?? void 0,
|
|
482
|
-
"--muted-foreground": mutedFg ?? void 0,
|
|
483
|
-
"--accent": panel ?? void 0,
|
|
484
|
-
"--accent-foreground": primary ?? void 0,
|
|
485
|
-
"--destructive": destructive ?? void 0,
|
|
486
|
-
"--destructive-foreground": fg ?? void 0,
|
|
487
|
-
"--border": border ?? void 0,
|
|
488
|
-
"--input": elevated ?? void 0,
|
|
489
|
-
"--ring": ring ?? void 0
|
|
490
|
-
};
|
|
491
|
-
}
|
|
492
|
-
function applyThemeCssVariables(theme, target = document.documentElement) {
|
|
493
|
-
const variables = themeToCssVariables(theme);
|
|
494
|
-
const tailwindVariables = themeToTailwindCssVariables(theme);
|
|
495
|
-
for (const [key, value] of Object.entries(variables)) {
|
|
496
|
-
target.style.setProperty(key, value);
|
|
497
|
-
}
|
|
498
|
-
for (const [key, value] of Object.entries(tailwindVariables)) {
|
|
499
|
-
if (!value) continue;
|
|
500
|
-
target.style.setProperty(key, value);
|
|
501
|
-
}
|
|
502
|
-
target.dataset.uiTheme = theme.id;
|
|
503
|
-
}
|
|
504
|
-
function removeThemeCssVariables(target = document.documentElement) {
|
|
505
|
-
const variables = themeToCssVariables(THEMES.nebula);
|
|
506
|
-
for (const key of Object.keys(variables)) {
|
|
507
|
-
target.style.removeProperty(key);
|
|
508
|
-
}
|
|
509
|
-
for (const key of TAILWIND_CSS_VARIABLE_KEYS) {
|
|
510
|
-
target.style.removeProperty(key);
|
|
511
|
-
}
|
|
512
|
-
delete target.dataset.uiTheme;
|
|
513
|
-
}
|
|
514
|
-
var UiThemeContext = React.createContext(null);
|
|
515
|
-
var STORAGE_KEY = "oos-ui-theme";
|
|
516
|
-
function UiThemeProvider({
|
|
517
|
-
children,
|
|
518
|
-
defaultThemeId = DEFAULT_THEME_ID,
|
|
519
|
-
themeId: controlledThemeId,
|
|
520
|
-
onThemeChange,
|
|
521
|
-
storageKey = STORAGE_KEY,
|
|
522
|
-
disableCssVariables = false
|
|
523
|
-
}) {
|
|
524
|
-
const deprecationWarned = React.useRef(false);
|
|
525
|
-
if (!deprecationWarned.current) {
|
|
526
|
-
deprecationWarned.current = true;
|
|
527
|
-
console.warn("[Glia] UiThemeProvider is deprecated. Use GliaThemeProvider instead.");
|
|
528
|
-
}
|
|
529
|
-
const [isHydrating, setIsHydrating] = React.useState(true);
|
|
530
|
-
const [internalThemeId, setInternalThemeId] = React.useState(defaultThemeId);
|
|
531
|
-
const activeThemeId = controlledThemeId ?? internalThemeId;
|
|
532
|
-
const theme = getTheme(activeThemeId);
|
|
533
|
-
React.useEffect(() => {
|
|
534
|
-
if (controlledThemeId !== void 0) {
|
|
535
|
-
setIsHydrating(false);
|
|
536
|
-
return;
|
|
537
|
-
}
|
|
538
|
-
try {
|
|
539
|
-
const stored = localStorage.getItem(storageKey);
|
|
540
|
-
if (stored && (stored === "nebula" || stored === "solarpunk")) {
|
|
541
|
-
setInternalThemeId(stored);
|
|
542
|
-
}
|
|
543
|
-
} catch {
|
|
544
|
-
}
|
|
545
|
-
setIsHydrating(false);
|
|
546
|
-
}, [controlledThemeId, storageKey]);
|
|
547
|
-
React.useEffect(() => {
|
|
548
|
-
if (disableCssVariables || isHydrating) return;
|
|
549
|
-
applyThemeCssVariables(theme);
|
|
550
|
-
return () => {
|
|
551
|
-
};
|
|
552
|
-
}, [theme, disableCssVariables, isHydrating]);
|
|
553
|
-
const setThemeId = React.useCallback(
|
|
554
|
-
(id) => {
|
|
555
|
-
if (controlledThemeId === void 0) {
|
|
556
|
-
setInternalThemeId(id);
|
|
557
|
-
try {
|
|
558
|
-
localStorage.setItem(storageKey, id);
|
|
559
|
-
} catch {
|
|
560
|
-
}
|
|
561
|
-
}
|
|
562
|
-
onThemeChange?.(id);
|
|
563
|
-
},
|
|
564
|
-
[controlledThemeId, onThemeChange, storageKey]
|
|
565
|
-
);
|
|
566
|
-
const contextValue = React.useMemo(
|
|
567
|
-
() => ({
|
|
568
|
-
theme,
|
|
569
|
-
themeId: activeThemeId,
|
|
570
|
-
setThemeId,
|
|
571
|
-
isHydrating
|
|
572
|
-
}),
|
|
573
|
-
[theme, activeThemeId, setThemeId, isHydrating]
|
|
574
|
-
);
|
|
575
|
-
const reduceMotion = usePrefersReducedMotion();
|
|
576
|
-
return /* @__PURE__ */ jsx(UiThemeContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(MotionConfig, { reducedMotion: reduceMotion ? "always" : "never", children }) });
|
|
577
|
-
}
|
|
578
|
-
function useUiTheme() {
|
|
579
|
-
const context = React.useContext(UiThemeContext);
|
|
580
|
-
if (!context) {
|
|
581
|
-
throw new Error("useUiTheme must be used within a UiThemeProvider");
|
|
582
|
-
}
|
|
583
|
-
return context;
|
|
584
|
-
}
|
|
585
|
-
function useThemeTokens() {
|
|
586
|
-
const { theme } = useUiTheme();
|
|
587
|
-
return theme;
|
|
588
|
-
}
|
|
589
|
-
function useGlassTokens() {
|
|
590
|
-
const { theme } = useUiTheme();
|
|
591
|
-
return theme.glass;
|
|
592
|
-
}
|
|
593
|
-
function useColorTokens() {
|
|
594
|
-
const { theme } = useUiTheme();
|
|
595
|
-
return theme.color;
|
|
596
|
-
}
|
|
597
|
-
function useMotionTokens() {
|
|
598
|
-
const { theme } = useUiTheme();
|
|
599
|
-
return theme.motion;
|
|
600
|
-
}
|
|
601
|
-
function useAmbientTokens() {
|
|
602
|
-
const { theme } = useUiTheme();
|
|
603
|
-
return theme.ambient;
|
|
604
|
-
}
|
|
605
|
-
function useControlTokens() {
|
|
606
|
-
const { theme } = useUiTheme();
|
|
607
|
-
return theme.controls;
|
|
608
|
-
}
|
|
609
|
-
function useElevationTokens() {
|
|
610
|
-
const { theme } = useUiTheme();
|
|
611
|
-
return theme.elevation;
|
|
612
|
-
}
|
|
613
|
-
function useIsSolarpunk() {
|
|
614
|
-
const { themeId } = useUiTheme();
|
|
615
|
-
return themeId === "solarpunk";
|
|
616
|
-
}
|
|
617
|
-
function useIsNebula() {
|
|
618
|
-
const { themeId } = useUiTheme();
|
|
619
|
-
return themeId === "nebula";
|
|
620
|
-
}
|
|
621
|
-
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React.useLayoutEffect : React.useEffect;
|
|
622
|
-
function easeToCss(ease) {
|
|
623
|
-
if (Array.isArray(ease)) {
|
|
624
|
-
return `cubic-bezier(${ease[0]}, ${ease[1]}, ${ease[2]}, ${ease[3]})`;
|
|
625
|
-
}
|
|
626
|
-
const map = {
|
|
627
|
-
linear: "linear",
|
|
628
|
-
easeIn: "cubic-bezier(0.4, 0, 1, 1)",
|
|
629
|
-
easeOut: "cubic-bezier(0, 0, 0.2, 1)",
|
|
630
|
-
easeInOut: "cubic-bezier(0.4, 0, 0.2, 1)"
|
|
631
|
-
};
|
|
632
|
-
return map[ease] ?? "cubic-bezier(0.4, 0, 0.2, 1)";
|
|
633
|
-
}
|
|
634
|
-
function buildGliaCssVariables(theme) {
|
|
635
|
-
const vars = {};
|
|
636
|
-
vars["--glia-color-bg-body"] = theme.color.bg.body;
|
|
637
|
-
vars["--glia-color-bg-panel"] = theme.color.bg.panel;
|
|
638
|
-
vars["--glia-color-bg-elevated"] = theme.color.bg.elevated;
|
|
639
|
-
vars["--glia-color-bg-horizon"] = theme.color.bg.horizon;
|
|
640
|
-
vars["--glia-color-text-primary"] = theme.color.text.primary;
|
|
641
|
-
vars["--glia-color-text-muted"] = theme.color.text.muted;
|
|
642
|
-
vars["--glia-color-text-soft"] = theme.color.text.soft;
|
|
643
|
-
vars["--glia-color-accent"] = theme.color.accent.primary;
|
|
644
|
-
vars["--glia-color-accent-secondary"] = theme.color.accent.secondary;
|
|
645
|
-
vars["--glia-color-accent-positive"] = theme.color.accent.positive;
|
|
646
|
-
vars["--glia-color-accent-warning"] = theme.color.accent.warning;
|
|
647
|
-
vars["--glia-color-accent-destructive"] = theme.color.accent.destructive;
|
|
648
|
-
vars["--glia-color-border"] = theme.color.border;
|
|
649
|
-
vars["--glia-color-ring"] = theme.color.ring;
|
|
650
|
-
vars["--glia-glass-panel-bg"] = theme.glass.panelBg;
|
|
651
|
-
vars["--glia-glass-panel-border"] = theme.glass.panelBorder;
|
|
652
|
-
vars["--glia-glass-panel-blur"] = theme.glass.panelBlur;
|
|
653
|
-
vars["--glia-glass-header-gradient"] = theme.glass.headerGradient;
|
|
654
|
-
vars["--glia-glass-card-bg"] = theme.glass.cardBg;
|
|
655
|
-
vars["--glia-glass-card-border"] = theme.glass.cardBorder;
|
|
656
|
-
vars["--glia-glass-hover-bg"] = theme.glass.hoverBg;
|
|
657
|
-
vars["--glia-glass-active-border"] = theme.glass.activeBorder;
|
|
658
|
-
vars["--glia-glass-active-shadow"] = theme.glass.activeShadow;
|
|
659
|
-
vars["--glia-shadow-soft"] = theme.elevation.softDrop;
|
|
660
|
-
vars["--glia-shadow-hud-panel"] = theme.elevation.hudPanel;
|
|
661
|
-
vars["--glia-shadow-hud-rail"] = theme.elevation.hudRail;
|
|
662
|
-
vars["--glia-shadow-modal"] = theme.elevation.modal;
|
|
663
|
-
vars["--glia-shadow-glow"] = theme.elevation.glow;
|
|
664
|
-
vars["--glia-ambient-horizon"] = theme.ambient.horizonGradient;
|
|
665
|
-
vars["--glia-ambient-ripple-primary"] = theme.ambient.rippleColorPrimary;
|
|
666
|
-
vars["--glia-ambient-ripple-secondary"] = theme.ambient.rippleColorSecondary;
|
|
667
|
-
vars["--glia-ambient-glow-intensity"] = String(theme.ambient.glowIntensity);
|
|
668
|
-
vars["--glia-switch-track-on"] = theme.controls.switch.track.bg.on;
|
|
669
|
-
vars["--glia-switch-track-off"] = theme.controls.switch.track.bg.off;
|
|
670
|
-
vars["--glia-switch-thumb-on"] = theme.controls.switch.thumb.bg.on;
|
|
671
|
-
vars["--glia-switch-thumb-off"] = theme.controls.switch.thumb.bg.off;
|
|
672
|
-
vars["--glia-button-glow-hover-bg"] = theme.controls.buttonGlow.hoverBg;
|
|
673
|
-
vars["--glia-button-glow-hover-text"] = theme.controls.buttonGlow.hoverText;
|
|
674
|
-
vars["--glia-button-glow-hover-shadow"] = theme.controls.buttonGlow.hoverShadow;
|
|
675
|
-
vars["--glia-font-display"] = theme.fonts.display;
|
|
676
|
-
vars["--glia-font-body"] = theme.fonts.body;
|
|
677
|
-
vars["--glia-font-mono"] = theme.fonts.mono;
|
|
678
|
-
vars["--glia-radius-sm"] = theme.radii.sm;
|
|
679
|
-
vars["--glia-radius-md"] = theme.radii.md;
|
|
680
|
-
vars["--glia-radius-lg"] = theme.radii.lg;
|
|
681
|
-
vars["--glia-spacing-taskbar-height"] = theme.spacing.taskbarHeight;
|
|
682
|
-
vars["--glia-spacing-titlebar-height"] = theme.spacing.titlebarHeight;
|
|
683
|
-
vars["--glia-spacing-window-padding"] = theme.spacing.windowPadding;
|
|
684
|
-
vars["--glia-spacing-icon-size"] = theme.spacing.iconSize;
|
|
685
|
-
vars["--glia-spacing-icon-gap"] = theme.spacing.iconGap;
|
|
686
|
-
vars["--glia-spacing-window-border-width"] = theme.spacing.windowBorderWidth;
|
|
687
|
-
const fastMs = Math.round(theme.motion.fast.duration * 1e3);
|
|
688
|
-
const normalMs = Math.round(theme.motion.normal.duration * 1e3);
|
|
689
|
-
const slowMs = Math.round(theme.motion.normal.duration * 1500);
|
|
690
|
-
vars["--glia-duration-fast"] = `${fastMs}ms`;
|
|
691
|
-
vars["--glia-duration-normal"] = `${normalMs}ms`;
|
|
692
|
-
vars["--glia-duration-slow"] = `${slowMs}ms`;
|
|
693
|
-
vars["--glia-easing-default"] = easeToCss(theme.motion.normal.ease);
|
|
694
|
-
vars["--glia-easing-spring"] = "cubic-bezier(0.34, 1.56, 0.64, 1)";
|
|
695
|
-
vars["--glia-easing-bounce"] = "cubic-bezier(0.68, -0.55, 0.265, 1.55)";
|
|
696
|
-
vars["--glia-blur-backdrop"] = `blur(${theme.glass.panelBlur})`;
|
|
697
|
-
const twMap = {
|
|
698
|
-
"background": theme.color.bg.body,
|
|
699
|
-
"foreground": theme.color.text.primary,
|
|
700
|
-
"card": theme.color.bg.panel,
|
|
701
|
-
"card-foreground": theme.color.text.primary,
|
|
702
|
-
"popover": theme.color.bg.elevated,
|
|
703
|
-
"popover-foreground": theme.color.text.primary,
|
|
704
|
-
"primary": theme.color.accent.primary,
|
|
705
|
-
"primary-foreground": theme.color.bg.body,
|
|
706
|
-
"secondary": theme.color.accent.secondary,
|
|
707
|
-
"secondary-foreground": theme.color.text.primary,
|
|
708
|
-
"muted": theme.color.bg.elevated,
|
|
709
|
-
"muted-foreground": theme.color.text.muted,
|
|
710
|
-
"accent": theme.color.bg.panel,
|
|
711
|
-
"accent-foreground": theme.color.accent.primary,
|
|
712
|
-
"destructive": theme.color.accent.destructive,
|
|
713
|
-
"destructive-foreground": theme.color.text.primary,
|
|
714
|
-
"border": theme.color.border,
|
|
715
|
-
"input": theme.color.bg.elevated,
|
|
716
|
-
"ring": theme.color.ring
|
|
717
|
-
};
|
|
718
|
-
for (const [name, color] of Object.entries(twMap)) {
|
|
719
|
-
const hsl = colorToHslComponents(color);
|
|
720
|
-
if (hsl) {
|
|
721
|
-
vars[`--glia-tw-${name}`] = hsl;
|
|
722
|
-
}
|
|
723
|
-
}
|
|
724
|
-
const neonMap = {
|
|
725
|
-
"cyan-neon": theme.color.accent.primary,
|
|
726
|
-
"magenta-neon": theme.color.accent.secondary,
|
|
727
|
-
"emerald-neon": theme.color.accent.positive,
|
|
728
|
-
"yellow-warning": theme.color.accent.warning
|
|
729
|
-
};
|
|
730
|
-
const violetFallback = theme.id === "nebula" ? "#8B5CF6" : theme.color.accent.secondary;
|
|
731
|
-
neonMap["violet-neon"] = violetFallback;
|
|
732
|
-
for (const [name, color] of Object.entries(neonMap)) {
|
|
733
|
-
const hsl = colorToHslComponents(color);
|
|
734
|
-
if (hsl) {
|
|
735
|
-
vars[`--glia-tw-${name}`] = hsl;
|
|
736
|
-
}
|
|
737
|
-
}
|
|
738
|
-
vars["--theme-bg-body"] = "var(--glia-color-bg-body)";
|
|
739
|
-
vars["--theme-bg-panel"] = "var(--glia-color-bg-panel)";
|
|
740
|
-
vars["--theme-bg-elevated"] = "var(--glia-color-bg-elevated)";
|
|
741
|
-
vars["--theme-bg-horizon"] = "var(--glia-color-bg-horizon)";
|
|
742
|
-
vars["--theme-text-primary"] = "var(--glia-color-text-primary)";
|
|
743
|
-
vars["--theme-text-muted"] = "var(--glia-color-text-muted)";
|
|
744
|
-
vars["--theme-text-soft"] = "var(--glia-color-text-soft)";
|
|
745
|
-
vars["--theme-accent-primary"] = "var(--glia-color-accent)";
|
|
746
|
-
vars["--theme-accent-secondary"] = "var(--glia-color-accent-secondary)";
|
|
747
|
-
vars["--theme-accent-positive"] = "var(--glia-color-accent-positive)";
|
|
748
|
-
vars["--theme-accent-warning"] = "var(--glia-color-accent-warning)";
|
|
749
|
-
vars["--theme-accent-destructive"] = "var(--glia-color-accent-destructive)";
|
|
750
|
-
vars["--theme-border"] = "var(--glia-color-border)";
|
|
751
|
-
vars["--theme-ring"] = "var(--glia-color-ring)";
|
|
752
|
-
vars["--theme-glass-panel-bg"] = "var(--glia-glass-panel-bg)";
|
|
753
|
-
vars["--theme-glass-panel-border"] = "var(--glia-glass-panel-border)";
|
|
754
|
-
vars["--theme-glass-panel-blur"] = "var(--glia-glass-panel-blur)";
|
|
755
|
-
vars["--theme-glass-header-gradient"] = "var(--glia-glass-header-gradient)";
|
|
756
|
-
vars["--theme-glass-card-bg"] = "var(--glia-glass-card-bg)";
|
|
757
|
-
vars["--theme-glass-card-border"] = "var(--glia-glass-card-border)";
|
|
758
|
-
vars["--theme-glass-hover-bg"] = "var(--glia-glass-hover-bg)";
|
|
759
|
-
vars["--theme-glass-active-border"] = "var(--glia-glass-active-border)";
|
|
760
|
-
vars["--theme-glass-active-shadow"] = "var(--glia-glass-active-shadow)";
|
|
761
|
-
vars["--theme-shadow-soft"] = "var(--glia-shadow-soft)";
|
|
762
|
-
vars["--theme-shadow-hud-panel"] = "var(--glia-shadow-hud-panel)";
|
|
763
|
-
vars["--theme-shadow-hud-rail"] = "var(--glia-shadow-hud-rail)";
|
|
764
|
-
vars["--theme-shadow-modal"] = "var(--glia-shadow-modal)";
|
|
765
|
-
vars["--theme-shadow-glow"] = "var(--glia-shadow-glow)";
|
|
766
|
-
vars["--theme-ambient-horizon"] = "var(--glia-ambient-horizon)";
|
|
767
|
-
vars["--theme-ambient-ripple-primary"] = "var(--glia-ambient-ripple-primary)";
|
|
768
|
-
vars["--theme-ambient-ripple-secondary"] = "var(--glia-ambient-ripple-secondary)";
|
|
769
|
-
vars["--theme-ambient-glow-intensity"] = "var(--glia-ambient-glow-intensity)";
|
|
770
|
-
vars["--theme-switch-track-on"] = "var(--glia-switch-track-on)";
|
|
771
|
-
vars["--theme-switch-track-off"] = "var(--glia-switch-track-off)";
|
|
772
|
-
vars["--theme-switch-thumb-on"] = "var(--glia-switch-thumb-on)";
|
|
773
|
-
vars["--theme-switch-thumb-off"] = "var(--glia-switch-thumb-off)";
|
|
774
|
-
vars["--theme-button-glow-hover-bg"] = "var(--glia-button-glow-hover-bg)";
|
|
775
|
-
vars["--theme-button-glow-hover-text"] = "var(--glia-button-glow-hover-text)";
|
|
776
|
-
vars["--theme-button-glow-hover-shadow"] = "var(--glia-button-glow-hover-shadow)";
|
|
777
|
-
vars["--bb-color-window-bg"] = "var(--glia-color-bg-panel)";
|
|
778
|
-
vars["--bb-color-window-border"] = "var(--glia-color-border)";
|
|
779
|
-
vars["--bb-color-window-border-focused"] = "var(--glia-glass-active-border)";
|
|
780
|
-
vars["--bb-color-titlebar-bg"] = "var(--glia-color-bg-panel)";
|
|
781
|
-
vars["--bb-color-titlebar-text"] = "var(--glia-color-text-primary)";
|
|
782
|
-
vars["--bb-color-accent"] = "var(--glia-color-accent)";
|
|
783
|
-
vars["--bb-color-accent-muted"] = "var(--glia-glass-hover-bg)";
|
|
784
|
-
vars["--bb-color-accent-glow"] = "var(--glia-glass-active-shadow)";
|
|
785
|
-
vars["--bb-color-taskbar-bg"] = "var(--glia-glass-panel-bg)";
|
|
786
|
-
vars["--bb-color-taskbar-text"] = "var(--glia-color-text-muted)";
|
|
787
|
-
vars["--bb-color-start-menu-bg"] = "var(--glia-color-bg-elevated)";
|
|
788
|
-
vars["--bb-color-context-menu-bg"] = "var(--glia-color-bg-elevated)";
|
|
789
|
-
vars["--bb-color-context-menu-hover"] = "var(--glia-glass-hover-bg)";
|
|
790
|
-
vars["--bb-color-desktop-bg"] = "var(--glia-color-bg-body)";
|
|
791
|
-
vars["--bb-color-icon-text"] = "var(--glia-color-text-muted)";
|
|
792
|
-
vars["--bb-color-icon-selected"] = "var(--glia-glass-hover-bg)";
|
|
793
|
-
vars["--bb-color-destructive"] = "var(--glia-color-accent-destructive)";
|
|
794
|
-
vars["--bb-color-success"] = "var(--glia-color-accent-positive)";
|
|
795
|
-
vars["--bb-color-warning"] = "var(--glia-color-accent-warning)";
|
|
796
|
-
vars["--bb-color-text-primary"] = "var(--glia-color-text-primary)";
|
|
797
|
-
vars["--bb-color-text-secondary"] = "var(--glia-color-text-muted)";
|
|
798
|
-
vars["--bb-color-text-muted"] = "var(--glia-color-text-soft)";
|
|
799
|
-
vars["--bb-font-display"] = "var(--glia-font-display)";
|
|
800
|
-
vars["--bb-font-body"] = "var(--glia-font-body)";
|
|
801
|
-
vars["--bb-font-mono"] = "var(--glia-font-mono)";
|
|
802
|
-
vars["--bb-radius-window"] = "var(--glia-radius-lg)";
|
|
803
|
-
vars["--bb-radius-button"] = "var(--glia-radius-sm)";
|
|
804
|
-
vars["--bb-radius-menu"] = "var(--glia-radius-md)";
|
|
805
|
-
vars["--bb-radius-input"] = "var(--glia-radius-sm)";
|
|
806
|
-
vars["--bb-shadow-window"] = "var(--glia-shadow-hud-panel)";
|
|
807
|
-
vars["--bb-shadow-window-focused"] = "var(--glia-shadow-modal)";
|
|
808
|
-
vars["--bb-shadow-menu"] = "var(--glia-shadow-hud-panel)";
|
|
809
|
-
vars["--bb-shadow-tooltip"] = "var(--glia-shadow-soft)";
|
|
810
|
-
vars["--bb-spacing-window-padding"] = "var(--glia-spacing-window-padding)";
|
|
811
|
-
vars["--bb-spacing-taskbar-height"] = "var(--glia-spacing-taskbar-height)";
|
|
812
|
-
vars["--bb-spacing-icon-size"] = "var(--glia-spacing-icon-size)";
|
|
813
|
-
vars["--bb-spacing-icon-gap"] = "var(--glia-spacing-icon-gap)";
|
|
814
|
-
vars["--bb-spacing-titlebar-height"] = "var(--glia-spacing-titlebar-height)";
|
|
815
|
-
vars["--bb-spacing-window-border-width"] = "var(--glia-spacing-window-border-width)";
|
|
816
|
-
vars["--bb-duration-fast"] = "var(--glia-duration-fast)";
|
|
817
|
-
vars["--bb-duration-normal"] = "var(--glia-duration-normal)";
|
|
818
|
-
vars["--bb-duration-slow"] = "var(--glia-duration-slow)";
|
|
819
|
-
vars["--bb-easing-default"] = "var(--glia-easing-default)";
|
|
820
|
-
vars["--bb-easing-spring"] = "var(--glia-easing-spring)";
|
|
821
|
-
vars["--bb-easing-bounce"] = "var(--glia-easing-bounce)";
|
|
822
|
-
vars["--bb-blur-backdrop"] = "var(--glia-blur-backdrop)";
|
|
823
|
-
return vars;
|
|
824
|
-
}
|
|
825
|
-
function applyGliaCssVariables(theme, target = document.documentElement) {
|
|
826
|
-
const vars = buildGliaCssVariables(theme);
|
|
827
|
-
for (const [key, value] of Object.entries(vars)) {
|
|
828
|
-
target.style.setProperty(key, value);
|
|
829
|
-
}
|
|
830
|
-
applyThemeCssVariables(theme, target);
|
|
831
|
-
target.dataset.gliaTheme = theme.id;
|
|
832
|
-
}
|
|
833
|
-
var GliaThemeContext = React.createContext(null);
|
|
834
|
-
var STORAGE_KEY2 = "glia-theme";
|
|
835
|
-
function GliaThemeProvider({
|
|
836
|
-
children,
|
|
837
|
-
themeId: controlledThemeId,
|
|
838
|
-
overrides,
|
|
839
|
-
storageKey = STORAGE_KEY2
|
|
840
|
-
}) {
|
|
841
|
-
const [internalThemeId, setInternalThemeId] = React.useState(
|
|
842
|
-
controlledThemeId ?? DEFAULT_THEME_ID
|
|
843
|
-
);
|
|
844
|
-
const activeThemeId = controlledThemeId ?? internalThemeId;
|
|
845
|
-
const theme = React.useMemo(() => {
|
|
846
|
-
const base = getTheme(activeThemeId);
|
|
847
|
-
if (!overrides) return base;
|
|
848
|
-
return { ...base, ...overrides };
|
|
849
|
-
}, [activeThemeId, overrides]);
|
|
850
|
-
React.useEffect(() => {
|
|
851
|
-
if (controlledThemeId !== void 0) return;
|
|
852
|
-
try {
|
|
853
|
-
const stored = localStorage.getItem(storageKey);
|
|
854
|
-
if (stored && (stored === "nebula" || stored === "solarpunk")) {
|
|
855
|
-
setInternalThemeId(stored);
|
|
856
|
-
}
|
|
857
|
-
} catch {
|
|
858
|
-
}
|
|
859
|
-
}, [controlledThemeId, storageKey]);
|
|
860
|
-
useIsomorphicLayoutEffect(() => {
|
|
861
|
-
applyGliaCssVariables(theme);
|
|
862
|
-
return () => {
|
|
863
|
-
};
|
|
864
|
-
}, [theme]);
|
|
865
|
-
const setThemeId = React.useCallback(
|
|
866
|
-
(id) => {
|
|
867
|
-
if (controlledThemeId === void 0) {
|
|
868
|
-
setInternalThemeId(id);
|
|
869
|
-
try {
|
|
870
|
-
localStorage.setItem(storageKey, id);
|
|
871
|
-
} catch {
|
|
872
|
-
}
|
|
873
|
-
}
|
|
874
|
-
},
|
|
875
|
-
[controlledThemeId, storageKey]
|
|
876
|
-
);
|
|
877
|
-
const contextValue = React.useMemo(
|
|
878
|
-
() => ({ theme, themeId: activeThemeId, setThemeId }),
|
|
879
|
-
[theme, activeThemeId, setThemeId]
|
|
880
|
-
);
|
|
881
|
-
return /* @__PURE__ */ jsx(GliaThemeContext.Provider, { value: contextValue, children });
|
|
882
|
-
}
|
|
883
|
-
function useGliaTheme() {
|
|
884
|
-
const context = React.useContext(GliaThemeContext);
|
|
885
|
-
if (!context) {
|
|
886
|
-
throw new Error("useGliaTheme must be used within a GliaThemeProvider");
|
|
887
|
-
}
|
|
888
|
-
return context;
|
|
889
|
-
}
|
|
890
|
-
function useFontTokens() {
|
|
891
|
-
const { theme } = useGliaTheme();
|
|
892
|
-
return theme.fonts;
|
|
893
|
-
}
|
|
894
|
-
function useRadiiTokens() {
|
|
895
|
-
const { theme } = useGliaTheme();
|
|
896
|
-
return theme.radii;
|
|
897
|
-
}
|
|
898
|
-
function useSpacingTokens() {
|
|
899
|
-
const { theme } = useGliaTheme();
|
|
900
|
-
return theme.spacing;
|
|
901
|
-
}
|
|
902
|
-
|
|
903
|
-
// src/theme/bridge.ts
|
|
904
|
-
var EASING_MAP = {
|
|
905
|
-
linear: "linear",
|
|
906
|
-
easeIn: "cubic-bezier(0.4, 0, 1, 1)",
|
|
907
|
-
easeOut: "cubic-bezier(0, 0, 0.2, 1)",
|
|
908
|
-
easeInOut: "cubic-bezier(0.4, 0, 0.2, 1)"
|
|
909
|
-
};
|
|
910
|
-
function easeToCss2(ease) {
|
|
911
|
-
if (Array.isArray(ease)) {
|
|
912
|
-
return `cubic-bezier(${ease[0]}, ${ease[1]}, ${ease[2]}, ${ease[3]})`;
|
|
913
|
-
}
|
|
914
|
-
return EASING_MAP[ease] ?? "cubic-bezier(0.4, 0, 0.2, 1)";
|
|
915
|
-
}
|
|
916
|
-
function extractColorFromShadow(shadow, fallback) {
|
|
917
|
-
const rgbaMatch = shadow.match(/rgba?\([^)]+\)/);
|
|
918
|
-
return rgbaMatch ? rgbaMatch[0] : fallback;
|
|
919
|
-
}
|
|
920
|
-
function nudgeAlpha(color, delta) {
|
|
921
|
-
const match = color.match(
|
|
922
|
-
/^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/
|
|
923
|
-
);
|
|
924
|
-
if (!match) return color;
|
|
925
|
-
const [, r, g, b, a] = match;
|
|
926
|
-
const newAlpha = Math.min(1, Math.max(0, parseFloat(a) + delta));
|
|
927
|
-
return `rgba(${r}, ${g}, ${b}, ${newAlpha})`;
|
|
928
|
-
}
|
|
929
|
-
function desktopThemeFromUiTheme(uiTheme, options = {}) {
|
|
930
|
-
const { overrides, fonts: fontOverrides } = options;
|
|
931
|
-
const colors = {
|
|
932
|
-
windowBg: uiTheme.color.bg.panel,
|
|
933
|
-
windowBorder: uiTheme.color.border,
|
|
934
|
-
windowBorderFocused: uiTheme.glass.activeBorder,
|
|
935
|
-
titlebarBg: nudgeAlpha(uiTheme.color.bg.panel, 0.02),
|
|
936
|
-
titlebarText: uiTheme.color.text.primary,
|
|
937
|
-
accent: uiTheme.color.accent.primary,
|
|
938
|
-
accentMuted: uiTheme.glass.hoverBg,
|
|
939
|
-
accentGlow: extractColorFromShadow(
|
|
940
|
-
uiTheme.glass.activeShadow,
|
|
941
|
-
uiTheme.color.accent.primary
|
|
942
|
-
),
|
|
943
|
-
taskbarBg: uiTheme.glass.panelBg,
|
|
944
|
-
taskbarText: uiTheme.color.text.muted,
|
|
945
|
-
startMenuBg: uiTheme.color.bg.elevated,
|
|
946
|
-
contextMenuBg: uiTheme.color.bg.elevated,
|
|
947
|
-
contextMenuHover: uiTheme.glass.hoverBg,
|
|
948
|
-
desktopBg: uiTheme.color.bg.body,
|
|
949
|
-
iconText: uiTheme.color.text.muted,
|
|
950
|
-
iconSelected: uiTheme.glass.hoverBg,
|
|
951
|
-
destructive: uiTheme.color.accent.destructive,
|
|
952
|
-
success: uiTheme.color.accent.positive,
|
|
953
|
-
warning: uiTheme.color.accent.warning,
|
|
954
|
-
textPrimary: uiTheme.color.text.primary,
|
|
955
|
-
textSecondary: uiTheme.color.text.muted,
|
|
956
|
-
textMuted: uiTheme.color.text.soft,
|
|
957
|
-
...overrides?.colors
|
|
958
|
-
};
|
|
959
|
-
const fonts = {
|
|
960
|
-
display: fontOverrides?.display ?? uiTheme.fonts.display,
|
|
961
|
-
body: fontOverrides?.body ?? uiTheme.fonts.body,
|
|
962
|
-
mono: fontOverrides?.mono ?? uiTheme.fonts.mono,
|
|
963
|
-
...overrides?.fonts
|
|
964
|
-
};
|
|
965
|
-
const radii = {
|
|
966
|
-
window: uiTheme.radii.lg,
|
|
967
|
-
button: uiTheme.radii.sm,
|
|
968
|
-
menu: uiTheme.radii.md,
|
|
969
|
-
input: uiTheme.radii.sm,
|
|
970
|
-
...overrides?.radii
|
|
971
|
-
};
|
|
972
|
-
const shadows = {
|
|
973
|
-
window: uiTheme.elevation.hudPanel,
|
|
974
|
-
windowFocused: uiTheme.elevation.modal,
|
|
975
|
-
menu: uiTheme.elevation.hudPanel,
|
|
976
|
-
tooltip: uiTheme.elevation.softDrop,
|
|
977
|
-
...overrides?.shadows
|
|
978
|
-
};
|
|
979
|
-
const spacing = {
|
|
980
|
-
windowPadding: uiTheme.spacing.windowPadding,
|
|
981
|
-
taskbarHeight: uiTheme.spacing.taskbarHeight,
|
|
982
|
-
iconSize: uiTheme.spacing.iconSize,
|
|
983
|
-
iconGap: uiTheme.spacing.iconGap,
|
|
984
|
-
titlebarHeight: uiTheme.spacing.titlebarHeight,
|
|
985
|
-
windowBorderWidth: uiTheme.spacing.windowBorderWidth,
|
|
986
|
-
...overrides?.spacing
|
|
987
|
-
};
|
|
988
|
-
const fastMs = Math.round(uiTheme.motion.fast.duration * 1e3);
|
|
989
|
-
const normalMs = Math.round(uiTheme.motion.normal.duration * 1e3);
|
|
990
|
-
const slowMs = Math.round(uiTheme.motion.normal.duration * 1500);
|
|
991
|
-
const animation = {
|
|
992
|
-
duration: {
|
|
993
|
-
fast: `${fastMs}ms`,
|
|
994
|
-
normal: `${normalMs}ms`,
|
|
995
|
-
slow: `${slowMs}ms`
|
|
996
|
-
},
|
|
997
|
-
easing: {
|
|
998
|
-
default: easeToCss2(uiTheme.motion.normal.ease),
|
|
999
|
-
spring: "cubic-bezier(0.34, 1.56, 0.64, 1)",
|
|
1000
|
-
bounce: "cubic-bezier(0.68, -0.55, 0.265, 1.55)"
|
|
1001
|
-
}
|
|
1002
|
-
};
|
|
1003
|
-
const blur = {
|
|
1004
|
-
backdrop: `blur(${uiTheme.glass.panelBlur})`
|
|
1005
|
-
};
|
|
1006
|
-
return {
|
|
1007
|
-
id: `bridged-${uiTheme.id}`,
|
|
1008
|
-
name: `${uiTheme.name} (Bridged)`,
|
|
1009
|
-
colors,
|
|
1010
|
-
fonts,
|
|
1011
|
-
radii,
|
|
1012
|
-
shadows,
|
|
1013
|
-
spacing,
|
|
1014
|
-
animation,
|
|
1015
|
-
blur
|
|
1016
|
-
};
|
|
1017
|
-
}
|
|
1018
|
-
|
|
1019
|
-
// src/theme/materials.ts
|
|
1020
|
-
var GLASS_MATERIALS = {
|
|
1021
|
-
/**
|
|
1022
|
-
* Standard frosted glass -- the default material.
|
|
1023
|
-
* Medium blur, full opacity, subtle noise grain.
|
|
1024
|
-
*/
|
|
1025
|
-
frosted: {
|
|
1026
|
-
id: "frosted",
|
|
1027
|
-
name: "Frosted Glass",
|
|
1028
|
-
backdropFilter: "blur(24px)",
|
|
1029
|
-
bgOpacity: 1,
|
|
1030
|
-
borderOpacity: 1,
|
|
1031
|
-
showNoise: true,
|
|
1032
|
-
noisePreset: "glass",
|
|
1033
|
-
noiseOpacity: 0.03,
|
|
1034
|
-
saturate: 180,
|
|
1035
|
-
brightness: 110
|
|
1036
|
-
},
|
|
1037
|
-
/**
|
|
1038
|
-
* Thin/clear glass -- minimal blur, very transparent.
|
|
1039
|
-
* For subtle layering where content behind should remain visible.
|
|
1040
|
-
*/
|
|
1041
|
-
thin: {
|
|
1042
|
-
id: "thin",
|
|
1043
|
-
name: "Thin Glass",
|
|
1044
|
-
backdropFilter: "blur(8px)",
|
|
1045
|
-
bgOpacity: 0.4,
|
|
1046
|
-
borderOpacity: 0.6,
|
|
1047
|
-
showNoise: false,
|
|
1048
|
-
noisePreset: "fine",
|
|
1049
|
-
noiseOpacity: 0.02,
|
|
1050
|
-
saturate: 120,
|
|
1051
|
-
brightness: 105
|
|
1052
|
-
},
|
|
1053
|
-
/**
|
|
1054
|
-
* Thick/dense glass -- heavy blur, opaque, strong borders.
|
|
1055
|
-
* For modals, dialogs, and high-contrast surfaces.
|
|
1056
|
-
*/
|
|
1057
|
-
thick: {
|
|
1058
|
-
id: "thick",
|
|
1059
|
-
name: "Thick Glass",
|
|
1060
|
-
backdropFilter: "blur(40px)",
|
|
1061
|
-
bgOpacity: 1.2,
|
|
1062
|
-
borderOpacity: 1.5,
|
|
1063
|
-
showNoise: true,
|
|
1064
|
-
noisePreset: "card",
|
|
1065
|
-
noiseOpacity: 0.05,
|
|
1066
|
-
saturate: 200,
|
|
1067
|
-
brightness: 100
|
|
1068
|
-
},
|
|
1069
|
-
/**
|
|
1070
|
-
* Clear glass -- no blur, just tinted transparency.
|
|
1071
|
-
* For overlays that should be visible but not obscured.
|
|
1072
|
-
*/
|
|
1073
|
-
clear: {
|
|
1074
|
-
id: "clear",
|
|
1075
|
-
name: "Clear Glass",
|
|
1076
|
-
backdropFilter: "blur(0px)",
|
|
1077
|
-
bgOpacity: 0.3,
|
|
1078
|
-
borderOpacity: 0.4,
|
|
1079
|
-
showNoise: false,
|
|
1080
|
-
noisePreset: "glass",
|
|
1081
|
-
noiseOpacity: 0,
|
|
1082
|
-
saturate: 100,
|
|
1083
|
-
brightness: 100
|
|
1084
|
-
},
|
|
1085
|
-
/**
|
|
1086
|
-
* Holographic glass -- saturated, vibrant, with heavy noise.
|
|
1087
|
-
* For decorative/accent panels with a sci-fi feel.
|
|
1088
|
-
*/
|
|
1089
|
-
holographic: {
|
|
1090
|
-
id: "holographic",
|
|
1091
|
-
name: "Holographic Glass",
|
|
1092
|
-
backdropFilter: "blur(20px)",
|
|
1093
|
-
bgOpacity: 0.8,
|
|
1094
|
-
borderOpacity: 1,
|
|
1095
|
-
showNoise: true,
|
|
1096
|
-
noisePreset: "heavy",
|
|
1097
|
-
noiseOpacity: 0.08,
|
|
1098
|
-
saturate: 250,
|
|
1099
|
-
brightness: 120
|
|
1100
|
-
}
|
|
1101
|
-
};
|
|
1102
|
-
function getGlassMaterial(id) {
|
|
1103
|
-
return GLASS_MATERIALS[id] ?? GLASS_MATERIALS.frosted;
|
|
1104
|
-
}
|
|
1105
|
-
function buildBackdropFilter(material) {
|
|
1106
|
-
const parts = [material.backdropFilter];
|
|
1107
|
-
if (material.saturate !== 100) {
|
|
1108
|
-
parts.push(`saturate(${material.saturate}%)`);
|
|
1109
|
-
}
|
|
1110
|
-
if (material.brightness !== 100) {
|
|
1111
|
-
parts.push(`brightness(${material.brightness}%)`);
|
|
1112
|
-
}
|
|
1113
|
-
return parts.join(" ");
|
|
1114
|
-
}
|
|
1115
|
-
function getReducedTransparencyStyles(material) {
|
|
1116
|
-
return {
|
|
1117
|
-
backdropFilter: "none",
|
|
1118
|
-
bgOpacity: Math.min(material.bgOpacity * 2.5, 1),
|
|
1119
|
-
showNoise: false
|
|
1120
|
-
};
|
|
1121
|
-
}
|
|
1122
|
-
|
|
1123
|
-
export { DEFAULT_THEME_ID, GLASS_MATERIALS, GliaThemeProvider, THEMES, UiThemeProvider, applyGliaCssVariables, applyThemeCssVariables, buildBackdropFilter, buildGliaCssVariables, desktopThemeFromUiTheme, getGlassMaterial, getReducedTransparencyStyles, getTheme, getThemeIds, nebulaTheme, removeThemeCssVariables, solarpunkTheme, themeToCssVariables, useAmbientTokens, useColorTokens, useControlTokens, useElevationTokens, useFontTokens, useGlassTokens, useGliaTheme, useIsNebula, useIsSolarpunk, useMotionTokens, useRadiiTokens, useSpacingTokens, useThemeTokens, useUiTheme };
|
|
1124
|
-
//# sourceMappingURL=chunk-VITKG2HL.js.map
|
|
1125
|
-
//# sourceMappingURL=chunk-VITKG2HL.js.map
|