"use client"; import { Check } from "lucide-react"; import type { UiSettings } from "./SettingsContext"; type Theme = UiSettings["theme"]; // Explicit palette values lifted from app/globals.css — kept here as plain // hex/rgba so each preview tile can render its theme's colours even while // the actual document theme is something else. Keep in sync with globals.css // when colours change there. type Palette = { bg: string; fg: string; card: string; primary: string; muted: string; border: string; // True for translucent themes — adds a soft gradient/backdrop to convey // the "frosted glass" treatment visually. glass?: boolean; }; const PALETTES: Record = { // theme id "light" applies no class → :root Cream palette (warm parchment, // the default; renamed from generic "Light" to honestly signal its warmth) light: { bg: "#fdfcf9", fg: "#1c1816", card: "#ffffff", primary: "#b0501e", muted: "#f1ede2", border: "#e6decc", }, // theme id "snow" applies the .theme-snow class → "Default": pure-white // neutral palette, grey surfaces, blue primary (Codex-style chrome) snow: { bg: "#ffffff", fg: "#0d0d0d", card: "#ffffff", primary: "#2563eb", muted: "#f2f2f2", border: "#e5e5e5", }, dark: { bg: "#1a1918", fg: "#e8e4de", card: "#242220", primary: "#d4734b", muted: "#2a2725", border: "#3a3634", }, glass: { bg: "#0e0d1a", fg: "#ffffff", card: "rgba(255,255,255,0.06)", primary: "#a855f7", muted: "rgba(255,255,255,0.06)", border: "rgba(255,255,255,0.12)", glass: true, }, }; // Renders a miniature DeepTutor UI mockup in the given theme's palette — // a left sidebar with one highlighted nav row, a content area with two // text lines and an accent button. Pure SVG so it stays crisp at any // device pixel ratio without leaking real interactive controls. function MiniPreview({ palette }: { palette: Palette }) { const { bg, fg, card, primary, muted, border, glass } = palette; return ( {/* Outer frame */} {glass && ( <> )} {/* Sidebar */} {/* Sidebar nav rows */} {/* Sidebar divider */} {/* Content card */} {/* Title line */} {/* Body lines */} {/* Accent button */} ); } export function ThemePreviewCard({ theme, label, selected, onSelect, }: { theme: Theme; label: string; selected: boolean; onSelect: (theme: Theme) => void; }) { const palette = PALETTES[theme]; return ( ); }