feat: initial Honcho UI scaffold

React 19 + Vite 8 + TanStack Router SPA for browsing and chatting with
a self-hosted Honcho instance. Configurable base URL stored in localStorage
only. Dark/light theme, framer-motion animations, lucide-react icons.
This commit is contained in:
Offending Commit
2026-04-24 21:30:48 -05:00
commit 8eff34b3c6
53 changed files with 15366 additions and 0 deletions

14
src/lib/theme.ts Normal file
View File

@@ -0,0 +1,14 @@
const THEME_KEY = "honcho-ui:theme";
export type Theme = "dark" | "light";
export function getStoredTheme(): Theme {
const stored = localStorage.getItem(THEME_KEY) as Theme | null;
if (stored === "dark" || stored === "light") return stored;
return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
}
export function applyTheme(theme: Theme): void {
document.documentElement.setAttribute("data-theme", theme);
localStorage.setItem(THEME_KEY, theme);
}