import * as React from "react"; import { createRoot } from "react-dom/client"; import { SiteErrorBoundary } from "@colineapp/sdk/site/react"; import { IconBrandNpm, IconCode, IconDeviceDesktop, IconFileText, IconMoon, IconRobot, IconSun } from "@tabler/icons-react"; import { Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ColineSiteProvider, EmptyState, SegmentedControl, Separator, Tabs, TabsContent, TabsList, TabsTrigger, type ColineSiteTheme, } from "@colineapp/ui"; import { LiquidGlass } from "@colineapp/liquid-glass/react"; import "@colineapp/ui/styles.css"; import "@colineapp/liquid-glass/styles.css"; import "./app.css"; import { EXAMPLES, INSTALL, NPM_URL, PACKAGE, SITE_URL, SOURCE_URL, VERSION } from "./api"; import { CodeBlock, CopyButton, InstallCommand } from "./code"; import { Playground } from "./playground"; import { Reference, Rules } from "./reference"; import { GlassCard, GlassDialog, GlassMenu, GlassSearch, GlassTabs, GlassToolbar } from "./showcase"; import { Stage, type BackdropKind } from "./stage"; // The @colineapp/liquid-glass site: the page chrome is Coline's own // components (@colineapp/ui); everything made of glass is the package, // installed from npm like anyone else would. app.config.ts lists the plain-text // docs for agents and the two tools agents in the browser can call. const ACCENT = "#5b5bd6"; const THEME_KEY = "liquid-glass-theme"; const example = (id: string) => EXAMPLES.find((item) => item.id === id)?.code ?? ""; const NAV = [ { href: "#playground", label: "Playground" }, { href: "#components", label: "Components" }, { href: "#install", label: "Install" }, { href: "#reference", label: "Reference" }, { href: "#agents", label: "For agents" }, ]; function readTheme(): ColineSiteTheme { try { const saved = localStorage.getItem(THEME_KEY); return saved === "light" || saved === "dark" ? saved : "system"; } catch { return "system"; } } function Mark() { return (