{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "astro-key-metrics",
  "title": "Key Metrics Block (Astro)",
  "description": "Stat cards for scannable numbers.",
  "dependencies": [
    "@contentbit/core",
    "@contentbit/blocks",
    "@contentbit/astro"
  ],
  "registryDependencies": [],
  "files": [
    {
      "path": "src/astro/key-metrics.astro",
      "content": "---\nimport type { KeyMetricsData } from '@contentbit/blocks'\nimport type { ValidatedBlockNode } from '@contentbit/core'\n\ninterface Props {\n  node: ValidatedBlockNode<unknown>\n}\n\n// Static map so Tailwind can see the class names.\nconst COLS: Record<number, string> = {\n  1: 'sm:grid-cols-1',\n  2: 'sm:grid-cols-2',\n  3: 'sm:grid-cols-3',\n  4: 'sm:grid-cols-4',\n}\n\nconst { node } = Astro.props\nconst data = node.data as KeyMetricsData\nconst cols = COLS[Math.min(data.rows.length, 4)]\n---\n\n<div data-cb-styled class:list={['my-6 grid grid-cols-2 gap-3', cols]}>\n  {\n    data.rows.map((row) => (\n      <div class=\"bg-card relative overflow-hidden rounded-lg border px-4 pt-4 pb-3.5\">\n        <span class=\"via-foreground/20 absolute inset-x-0 top-0 h-px bg-gradient-to-r from-transparent to-transparent\" aria-hidden=\"true\" />\n        <div class=\"text-2xl font-bold tracking-tight tabular-nums sm:text-[1.75rem]\">{row.value}</div>\n        <div class=\"text-muted-foreground mt-1 truncate font-mono text-[11px] tracking-wide uppercase\">{row.label}</div>\n      </div>\n    ))\n  }\n</div>\n",
      "type": "registry:component",
      "target": "components/content-blocks/key-metrics.astro"
    }
  ],
  "type": "registry:component"
}