{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "status-board",
  "title": "Status Board",
  "type": "registry:block",
  "description": "Overall system state plus 90-day history per service",
  "dependencies": [
    "motion@^12.43.0"
  ],
  "files": [
    {
      "path": "src/kavyn/status-board.jsx",
      "type": "registry:file",
      "target": "@components/kavyn/status-board.jsx",
      "content": "'use client'\n\nimport { useMemo } from 'react'\nimport { motion } from 'motion/react'\n\nconst SERVICES = [\n  { name: 'API', inc: [61] }, { name: 'Dashboard', inc: [] }, { name: 'Edge network', inc: [12, 13] }, { name: 'DNS', inc: [] }, { name: 'Webhooks', inc: [80] },\n]\n\n// Block: public status page with overall state and 90-day history per service.\nexport default function StatusBoard({ services = SERVICES, days = 90 }) {\n  const rows = useMemo(() => services.map((s) => ({ ...s, bars: Array.from({ length: days }, (_, i) => (s.inc.includes(i) ? 'bad' : 'ok')) })), [services, days])\n  const allOk = rows.every((r) => r.bars[days - 1] === 'ok')\n  return (\n    <section className=\"@container w-full rounded-2xl border border-line bg-bg p-5 @2xl:p-8\">\n      <div className={`flex items-center gap-3 rounded-xl border px-4 py-3 ${allOk ? 'border-emerald-400/20 bg-emerald-400/[.06]' : 'border-amber-400/30 bg-amber-400/[.06]'}`}>\n        <span className=\"relative flex size-2.5\"><span className={`absolute inset-0 animate-ping rounded-full ${allOk ? 'bg-emerald-400' : 'bg-amber-400'} opacity-60`} /><span className={`relative size-2.5 rounded-full ${allOk ? 'bg-emerald-400' : 'bg-amber-400'}`} /></span>\n        <span className=\"text-sm text-tx\">{allOk ? 'All systems operational' : 'Some systems degraded'}</span>\n      </div>\n      <ul className=\"mt-5 space-y-5\">\n        {rows.map((r, ri) => (\n          <li key={r.name}>\n            <div className=\"flex justify-between text-sm\"><span className=\"text-tx\">{r.name}</span><span className=\"font-mono text-xs text-mute\">{(100 - (r.inc.length / days) * 2.1).toFixed(2)}%</span></div>\n            <div className=\"mt-2 flex h-7 gap-px @2xl:gap-[2px]\">\n              {r.bars.map((b, i) => (\n                <motion.span key={i} title={b === 'bad' ? 'Incident' : 'No issues'} initial={{ scaleY: 0 }} animate={{ scaleY: 1 }} transition={{ delay: ri * 0.08 + i * 0.004, type: 'spring', stiffness: 400, damping: 28 }}\n                  className={`flex-1 origin-bottom rounded-[2px] ${b === 'bad' ? 'bg-amber-400' : 'bg-emerald-400/70'}`} />\n              ))}\n            </div>\n          </li>\n        ))}\n      </ul>\n    </section>\n  )\n}\n"
    }
  ],
  "cssVars": {
    "theme": {
      "color-bg": "var(--bg)",
      "color-panel": "var(--panel)",
      "color-panel2": "var(--panel2)",
      "color-line": "var(--line)",
      "color-line2": "var(--line2)",
      "color-tx": "var(--tx)",
      "color-mute": "var(--mute)",
      "color-faint": "var(--faint)",
      "color-acc": "var(--acc)",
      "color-acc-fg": "var(--acc-fg)"
    },
    "light": {
      "bg": "#ffffff",
      "panel": "#f5f5f7",
      "panel2": "#e8e8ed",
      "line": "#e5e5ea",
      "line2": "#d2d2d7",
      "tx": "#1d1d1f",
      "mute": "#6e6e73",
      "faint": "#a1a1a6",
      "acc": "#1d1d1f",
      "acc-fg": "#ffffff"
    },
    "dark": {
      "bg": "#000000",
      "panel": "#141416",
      "panel2": "#1f1f22",
      "line": "#262628",
      "line2": "#3a3a3d",
      "tx": "#f5f5f7",
      "mute": "#a1a1a6",
      "faint": "#6e6e73",
      "acc": "#f5f5f7",
      "acc-fg": "#000000"
    }
  },
  "css": {
    ".light": {
      "--bg": "#ffffff",
      "--panel": "#f5f5f7",
      "--panel2": "#e8e8ed",
      "--line": "#e5e5ea",
      "--line2": "#d2d2d7",
      "--tx": "#1d1d1f",
      "--mute": "#6e6e73",
      "--faint": "#a1a1a6",
      "--acc": "#1d1d1f",
      "--acc-fg": "#ffffff"
    }
  }
}
