Replaces the deleted kit.ts + kit.css with DesignKit.tsx, gated behind import.meta.env.DEV and loaded on ?kit. Shows the full tailwind.config.ts token mapping (colours across all 6 palettes, typography, spacing, radii, z-index) plus buttons, ActivityRail states, SessionCard states, and terminal chrome, all switchable live through ThemeContext. Closes #254
26 lines
742 B
TypeScript
26 lines
742 B
TypeScript
import { createRoot } from "react-dom/client";
|
|
import { App } from "./App.js";
|
|
import { ThemeProvider } from "./contexts/ThemeContext.js";
|
|
import "./main.css";
|
|
|
|
const container = document.getElementById("root");
|
|
if (!container) {
|
|
throw new Error("missing #root element");
|
|
}
|
|
|
|
const root = createRoot(container);
|
|
|
|
// Dev-only: `?kit` renders the standalone design kit instead of the app
|
|
// shell (#254). Dynamic import keeps it out of the production bundle.
|
|
if (import.meta.env.DEV && new URLSearchParams(location.search).has("kit")) {
|
|
void import("./components/kit/DesignKit.js").then(({ DesignKit }) => {
|
|
root.render(
|
|
<ThemeProvider>
|
|
<DesignKit />
|
|
</ThemeProvider>,
|
|
);
|
|
});
|
|
} else {
|
|
root.render(<App />);
|
|
}
|