import React, { useState } from "react"; import { Palette, Folder, FileCode, CheckCircle2, RefreshCw, Layout, Layers, ShieldCheck, Code, } from "lucide-react"; import { ThemeConfig } from "../types"; interface ThemeTabProps { theme: ThemeConfig; onValidateTheme: () => Promise; } export const ThemeTab: React.FC = ({ theme, onValidateTheme, }) => { const [isValidating, setIsValidating] = useState(false); const [statusMsg, setStatusMsg] = useState(null); const handleValidate = async () => { setIsValidating(true); await onValidateTheme(); setStatusMsg( "Theme /.theme validated successfully. All required templates, CSS resets, and package supports are valid.", ); setIsValidating(false); }; return (
{/* HEADER */}

Theme Management

PRD AC-10 Standard Location: /.theme

Loads active theme from{" "} /.theme, validates{" "} theme.yaml, templates, assets, and supported package layouts.

{statusMsg && (
{statusMsg}
)} {/* THEME STRUCTURE GRID */}
{/* LEFT COLUMN: THEME METADATA & MANIFEST (5 COLS) */}

{theme.name}

v{theme.version}
Theme Root Location {theme.path}
Theme ID {theme.id}
Supported Style Packages ({theme.supportsPackages.length})
{theme.supportsPackages.map((pkg) => ( builtin:{pkg} ))}
{/* RIGHT COLUMN: TEMPLATES & ASSETS INSPECTOR (7 COLS) */}

Theme Assets & Templates Catalog

{/* TEMPLATES LIST */}
Required Templates
{Object.entries(theme.templates).map(([key, val]) => (
{key} {val}
))}
{/* STYLES & SCRIPTS */}
CSS Style Assets {theme.styles.map((s) => (
{s}
))}
JS Script Assets {theme.scripts.map((s) => (
{s}
))}
); };