@@ -23,6 +23,8 @@ export function AppShell() {
2323 dataset,
2424 loadSampleData,
2525 loadCSVData,
26+ theme,
27+ toggleTheme,
2628 } = useRayLensStore ( ) ;
2729
2830 // Panel visibility
@@ -128,14 +130,14 @@ export function AppShell() {
128130 const availableFields = dataset ?. schema . map ( ( s ) => s . name ) ?? [ ] ;
129131
130132 return (
131- < div className = "flex h-screen flex-col bg-gray-950" >
133+ < div className = "flex h-screen flex-col bg-gray-50 dark:bg-gray- 950" >
132134 { /* Top toolbar */ }
133- < header className = "flex h-12 items-center justify-between border-b border-gray-800 px-4 shrink-0" >
135+ < header className = "flex h-12 items-center justify-between border-b border-gray-200 dark:border-gray- 800 bg-white dark:bg-gray-900 px-4 shrink-0" >
134136 < div className = "flex items-center gap-4" >
135137 { /* Logo */ }
136138 < div className = "flex items-center gap-2" >
137139 < svg
138- className = "h-6 w-6 text-ray-500"
140+ className = "h-6 w-6 text-ray-600 dark:text-ray- 500"
139141 viewBox = "0 0 24 24"
140142 fill = "none"
141143 stroke = "currentColor"
@@ -145,14 +147,14 @@ export function AppShell() {
145147 < path d = "M2 17l10 5 10-5" />
146148 < path d = "M2 12l10 5 10-5" />
147149 </ svg >
148- < span className = "font-semibold text-white" > RayLens</ span >
150+ < span className = "font-semibold text-gray-900 dark:text- white" > RayLens</ span >
149151 </ div >
150152
151153 { /* Menu items */ }
152154 < nav className = "flex items-center gap-1" >
153155 < button
154156 onClick = { ( ) => fileInputRef . current ?. click ( ) }
155- className = "flex items-center gap-1.5 rounded px-3 py-1.5 text-sm text-gray-300 hover:bg-gray-800 hover:text-white transition-colors"
157+ className = "flex items-center gap-1.5 rounded px-3 py-1.5 text-sm text-gray-600 dark:text-gray- 300 hover:bg-gray-100 dark:hover:bg-gray- 800 hover:text-gray-900 dark: hover:text-white transition-colors"
156158 >
157159 < svg className = "w-4 h-4" fill = "none" viewBox = "0 0 24 24" stroke = "currentColor" >
158160 < path strokeLinecap = "round" strokeLinejoin = "round" strokeWidth = { 2 } d = "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12" />
@@ -171,17 +173,17 @@ export function AppShell() {
171173 loadSampleData ( ) ;
172174 setLeftPanelTab ( 'data' ) ;
173175 } }
174- className = "flex items-center gap-1.5 rounded px-3 py-1.5 text-sm text-gray-300 hover:bg-gray-800 hover:text-white transition-colors"
176+ className = "flex items-center gap-1.5 rounded px-3 py-1.5 text-sm text-gray-600 dark:text-gray- 300 hover:bg-gray-100 dark:hover:bg-gray- 800 hover:text-gray-900 dark: hover:text-white transition-colors"
175177 >
176178 < svg className = "w-4 h-4" fill = "none" viewBox = "0 0 24 24" stroke = "currentColor" >
177179 < path strokeLinecap = "round" strokeLinejoin = "round" strokeWidth = { 2 } d = "M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4" />
178180 </ svg >
179181 Sample Data
180182 </ button >
181- < div className = "w-px h-6 bg-gray-800 mx-2" />
183+ < div className = "w-px h-6 bg-gray-200 dark:bg-gray- 800 mx-2" />
182184 < button
183185 onClick = { ( ) => setWidgets ( [ ] ) }
184- className = "flex items-center gap-1.5 rounded px-3 py-1.5 text-sm text-gray-300 hover:bg-gray-800 hover:text-white transition-colors"
186+ className = "flex items-center gap-1.5 rounded px-3 py-1.5 text-sm text-gray-600 dark:text-gray- 300 hover:bg-gray-100 dark:hover:bg-gray- 800 hover:text-gray-900 dark: hover:text-white transition-colors"
185187 >
186188 < svg className = "w-4 h-4" fill = "none" viewBox = "0 0 24 24" stroke = "currentColor" >
187189 < path strokeLinecap = "round" strokeLinejoin = "round" strokeWidth = { 2 } d = "M12 6v6m0 0v6m0-6h6m-6 0H6" />
@@ -192,13 +194,31 @@ export function AppShell() {
192194 </ div >
193195
194196 < div className = "flex items-center gap-4" >
195- < span className = "text-xs text-gray-500" > Rayforce { version ?? '...' } </ span >
197+ < span className = "text-xs text-gray-500 dark:text-gray-500" > Rayforce { version ?? '...' } </ span >
198+
199+ { /* Theme toggle */ }
200+ < button
201+ onClick = { toggleTheme }
202+ className = "p-1.5 rounded transition-colors text-gray-500 hover:text-gray-300 dark:text-gray-400 dark:hover:text-white"
203+ title = { `Switch to ${ theme === 'dark' ? 'light' : 'dark' } mode` }
204+ >
205+ { theme === 'dark' ? (
206+ < svg className = "w-4 h-4" fill = "none" viewBox = "0 0 24 24" stroke = "currentColor" >
207+ < path strokeLinecap = "round" strokeLinejoin = "round" strokeWidth = { 2 } d = "M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z" />
208+ </ svg >
209+ ) : (
210+ < svg className = "w-4 h-4" fill = "none" viewBox = "0 0 24 24" stroke = "currentColor" >
211+ < path strokeLinecap = "round" strokeLinejoin = "round" strokeWidth = { 2 } d = "M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z" />
212+ </ svg >
213+ ) }
214+ </ button >
215+
196216 { /* Panel toggles */ }
197217 < div className = "flex items-center gap-1" >
198218 < button
199219 onClick = { ( ) => setLeftPanelOpen ( ! leftPanelOpen ) }
200220 className = { `p-1.5 rounded transition-colors ${
201- leftPanelOpen ? 'bg-gray-800 text-ray-400' : 'text-gray-500 hover:text-gray-300'
221+ leftPanelOpen ? 'bg-gray-200 dark:bg-gray- 800 text-ray-600 dark:text-ray- 400' : 'text-gray-500 hover:text-gray-700 dark: hover:text-gray-300'
202222 } `}
203223 title = "Toggle left panel"
204224 >
@@ -209,7 +229,7 @@ export function AppShell() {
209229 < button
210230 onClick = { ( ) => setRightPanelOpen ( ! rightPanelOpen ) }
211231 className = { `p-1.5 rounded transition-colors ${
212- rightPanelOpen ? 'bg-gray-800 text-ray-400' : 'text-gray-500 hover:text-gray-300'
232+ rightPanelOpen ? 'bg-gray-200 dark:bg-gray- 800 text-ray-600 dark:text-ray- 400' : 'text-gray-500 hover:text-gray-700 dark: hover:text-gray-300'
213233 } `}
214234 title = "Toggle right panel"
215235 >
@@ -225,15 +245,15 @@ export function AppShell() {
225245 < div className = "flex flex-1 overflow-hidden" >
226246 { /* Left panel - Components & Data */ }
227247 { leftPanelOpen && (
228- < aside className = "w-64 border-r border-gray-800 bg-gray-900/50 flex flex-col shrink-0" >
248+ < aside className = "w-64 border-r border-gray-200 dark:border-gray- 800 bg-white/80 dark: bg-gray-900/50 flex flex-col shrink-0" >
229249 { /* Tab buttons */ }
230- < div className = "flex border-b border-gray-800" >
250+ < div className = "flex border-b border-gray-200 dark:border-gray- 800" >
231251 < button
232252 onClick = { ( ) => setLeftPanelTab ( 'components' ) }
233253 className = { `flex-1 px-3 py-2 text-xs font-medium transition-colors ${
234254 leftPanelTab === 'components'
235- ? 'text-white bg-gray-800/50 border-b-2 border-ray-500'
236- : 'text-gray-400 hover:text-gray-300'
255+ ? 'text-gray-900 dark:text- white bg-gray-100 dark: bg-gray-800/50 border-b-2 border-ray-500'
256+ : 'text-gray-500 dark:text-gray- 400 hover:text-gray-700 dark: hover:text-gray-300'
237257 } `}
238258 >
239259 Components
@@ -242,11 +262,11 @@ export function AppShell() {
242262 onClick = { ( ) => setLeftPanelTab ( 'data' ) }
243263 className = { `flex-1 px-3 py-2 text-xs font-medium transition-colors ${
244264 leftPanelTab === 'data'
245- ? 'text-white bg-gray-800/50 border-b-2 border-ray-500'
246- : 'text-gray-400 hover:text-gray-300'
265+ ? 'text-gray-900 dark:text- white bg-gray-100 dark: bg-gray-800/50 border-b-2 border-ray-500'
266+ : 'text-gray-500 dark:text-gray- 400 hover:text-gray-700 dark: hover:text-gray-300'
247267 } `}
248268 >
249- Data { dataset && < span className = "ml-1 text-ray-400" > •</ span > }
269+ Data { dataset && < span className = "ml-1 text-ray-500 dark:text-ray- 400" > •</ span > }
250270 </ button >
251271 </ div >
252272
@@ -265,7 +285,7 @@ export function AppShell() {
265285 ) }
266286
267287 { /* Center - Dashboard Canvas */ }
268- < main ref = { canvasRef } className = "flex-1 overflow-hidden p-4" >
288+ < main ref = { canvasRef } className = "flex-1 overflow-hidden p-4 bg-gray-100/50 dark:bg-transparent " >
269289 < DashboardCanvas
270290 widgets = { widgets }
271291 onWidgetsChange = { setWidgets }
@@ -280,7 +300,7 @@ export function AppShell() {
280300
281301 { /* Right panel - Property Inspector */ }
282302 { rightPanelOpen && (
283- < aside className = "w-72 border-l border-gray-800 bg-gray-900/50 shrink-0" >
303+ < aside className = "w-72 border-l border-gray-200 dark:border-gray- 800 bg-white/80 dark: bg-gray-900/50 shrink-0" >
284304 < PropertyInspector
285305 selectedComponent = { selectedWidget ?. component ?? null }
286306 title = { selectedWidget ?. title ?? '' }
@@ -300,7 +320,7 @@ export function AppShell() {
300320 </ div >
301321
302322 { /* Status bar */ }
303- < footer className = "flex h-6 items-center justify-between border-t border-gray-800 bg-gray-900 px-4 text-2xs text-gray-500 shrink-0" >
323+ < footer className = "flex h-6 items-center justify-between border-t border-gray-200 dark:border-gray- 800 bg-gray-100 dark: bg-gray-900 px-4 text-2xs text-gray-500 shrink-0" >
304324 < div className = "flex items-center gap-4" >
305325 { dataset ? (
306326 < >
0 commit comments