refactor: Context-based theme provider with animated Typewriter toggle

- Convert theme to SolidJS Context/Provider pattern (ThemeProvider)
- Extract createThemeState() for testability without context
- Add Typewriter component with character-by-character reveal
- Animate ThemeToggle with Typewriter label and hover scale
- Add cursor CSS animations (typewriter-blink, cursor-typing, cursor-block)
- Fix background color transition by using 'all' on :root
- Rename theme.ts -> theme.tsx for JSX support
- All 26 theme tests passing
This commit is contained in:
2026-05-25 15:10:52 -04:00
parent c9a82fc6de
commit d4c1b62a97
6 changed files with 311 additions and 46 deletions

View File

@@ -2,13 +2,13 @@ import { MetaProvider, Title } from "@solidjs/meta";
import { Router } from "@solidjs/router";
import { FileRoutes } from "@solidjs/start/router";
import { Suspense } from "solid-js";
import { useTheme } from "./lib/theme";
import { ThemeProvider } from "./lib/theme";
import { AppShell } from "./components/layout";
import "./app.css";
export default function App() {
useTheme();
return (
<ThemeProvider>
<Router
root={(props) => (
<AppShell>
@@ -18,5 +18,6 @@ export default function App() {
>
<FileRoutes />
</Router>
</ThemeProvider>
);
}