{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "checkpoint-deploy-demo",
  "type": "registry:block",
  "title": "Checkpoint: Release Gate",
  "description": "Approval Flow Animation example, Release Gate: Releases through tests, preview, migrations and a change freeze, where a Friday-evening deploy is turned away. A take on the flow diagram (flowchart). Fits features sections.",
  "author": "KeyframeUI <https://keyframeui.com>",
  "categories": [
    "features",
    "flow-diagram",
    "steps",
    "ai",
    "interaction",
    "data"
  ],
  "docs": "Live preview, examples and props: https://keyframeui.com/components/checkpoint#checkpoint-deploy-demo",
  "registryDependencies": [
    "https://keyframeui.com/r/checkpoint.json"
  ],
  "files": [
    {
      "path": "components/checkpoint-deploy-demo.tsx",
      "type": "registry:component",
      "content": "import * as React from \"react\";\n\nimport { Checkpoint, type CheckpointRequest, type CheckpointRule } from \"@/components/ui/checkpoint\";\n\nfunction Glyph({ children }: { children: React.ReactNode }) {\n  return (\n    <svg\n      viewBox=\"0 0 24 24\"\n      fill=\"none\"\n      stroke=\"currentColor\"\n      strokeWidth=\"1.8\"\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n      aria-hidden\n    >\n      {children}\n    </svg>\n  );\n}\n\nconst rocket = (\n  <Glyph>\n    <path d=\"M12 3c3 2 4.5 5.2 4.5 9v3.5h-9V12c0-3.8 1.5-7 4.5-9z\" />\n    <path d=\"M7.5 13l-2.5 2v3.5l2.5-1.5M16.5 13l2.5 2v3.5L16.5 17M10 20h4\" />\n    <circle cx=\"12\" cy=\"9.5\" r=\"1.4\" />\n  </Glyph>\n);\n\n// Northwind's release checks. Every name, version and time is made up.\nconst RULES: CheckpointRule[] = [\n  {\n    id: \"tests\",\n    label: \"Tests\",\n    detail: \"1,284 passing on the release commit\",\n    value: \"CI\",\n    icon: (\n      <Glyph>\n        <path d=\"M9 3.5h6M10 3.5v5.2L5.2 18a1.6 1.6 0 0 0 1.4 2.5h10.8a1.6 1.6 0 0 0 1.4-2.5L14 8.7V3.5\" />\n        <path d=\"M7.6 14.5h8.8\" />\n      </Glyph>\n    ),\n  },\n  {\n    id: \"preview\",\n    label: \"Preview\",\n    detail: \"Signed off on the preview URL\",\n    value: \"Design\",\n    icon: (\n      <Glyph>\n        <path d=\"M2.5 12s3.5-6.5 9.5-6.5 9.5 6.5 9.5 6.5-3.5 6.5-9.5 6.5S2.5 12 2.5 12z\" />\n        <circle cx=\"12\" cy=\"12\" r=\"2.8\" />\n      </Glyph>\n    ),\n  },\n  {\n    id: \"migrations\",\n    label: \"Migrations\",\n    detail: \"Destructive changes need a DBA\",\n    value: \"Safe\",\n    icon: (\n      <Glyph>\n        <ellipse cx=\"12\" cy=\"6\" rx=\"7\" ry=\"2.7\" />\n        <path d=\"M5 6v12c0 1.5 3.1 2.7 7 2.7s7-1.2 7-2.7V6M5 12c0 1.5 3.1 2.7 7 2.7s7-1.2 7-2.7\" />\n      </Glyph>\n    ),\n  },\n  {\n    id: \"freeze\",\n    label: \"Change freeze\",\n    detail: \"No deploys Fri 16:00 → Mon 09:00\",\n    value: \"Freeze\",\n    icon: (\n      <Glyph>\n        <path d=\"M12 3v18M4.2 7.5l15.6 9M4.2 16.5l15.6-9M9.5 4.5L12 6.5l2.5-2M9.5 19.5L12 17.5l2.5 2\" />\n      </Glyph>\n    ),\n  },\n];\n\nconst REQUESTS: CheckpointRequest[] = [\n  { id: \"web-2140\", label: \"web@2.14.0\", meta: \"18 commits · maya.l\", icon: rocket },\n  {\n    id: \"api-320\",\n    label: \"api@3.2.0\",\n    meta: \"drops column users.legacy_id\",\n    verdicts: { migrations: \"hold\" },\n    icon: rocket,\n  },\n  {\n    id: \"web-2150\",\n    label: \"web@2.15.0\",\n    meta: \"Fri 17:42 · 41 commits · jonas.r\",\n    verdicts: { freeze: \"block\" },\n    reason: \"Freeze until Mon 09:00\",\n    icon: rocket,\n  },\n];\n\nexport function CheckpointDeployDemo() {\n  return (\n    <div className=\"w-full max-w-xl rounded-[26px] border border-zinc-950/[0.08] bg-white p-1.5 shadow-[0_1px_2px_rgba(0,0,0,0.04)] dark:border-white/10 dark:bg-zinc-950\">\n      <div className=\"rounded-[20px] bg-zinc-50 p-4 sm:p-5 dark:bg-white/[0.03]\">\n        <div className=\"mb-4 flex items-center justify-between gap-4 px-0.5\">\n          <div className=\"flex min-w-0 items-center gap-2\">\n            <span className=\"grid size-6 place-items-center rounded-md bg-zinc-950 text-[11px] font-semibold text-white dark:bg-white dark:text-zinc-950\">\n              N\n            </span>\n            <p className=\"truncate text-[13px] font-semibold tracking-tight text-zinc-950 dark:text-zinc-100\">\n              Release gate <span className=\"font-normal text-zinc-500 dark:text-zinc-400\">· northwind/production</span>\n            </p>\n          </div>\n          <span className=\"hidden shrink-0 rounded-full border border-zinc-950/10 px-2 py-0.5 font-mono text-[11px] text-zinc-500 sm:inline dark:border-white/15 dark:text-zinc-400\">\n            eu-west-1\n          </span>\n        </div>\n        <Checkpoint\n          rules={RULES}\n          requests={REQUESTS}\n          approver=\"Priya (DBA)\"\n          className=\"[--checkpoint-accent:#2f5bff] dark:[--checkpoint-accent:#6d8bff]\"\n        />\n      </div>\n    </div>\n  );\n}\n"
    }
  ]
}