{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "release-pill-devtool-demo",
  "type": "registry:block",
  "title": "Release Pill: Version Bump",
  "description": "Hover Changelog Badge example, Version Bump: A dark developer-tool hero: monospace versions with a Feature, Fix or Breaking tag on each row, and a last row with the upgrade command whose copy button turns into Copied. A take on the badge (pill). Fits hero and changelog sections.",
  "author": "KeyframeUI <https://keyframeui.com>",
  "categories": [
    "hero",
    "changelog",
    "badge",
    "tooltip",
    "hover"
  ],
  "docs": "Live preview, examples and props: https://keyframeui.com/components/release-pill#release-pill-devtool-demo",
  "registryDependencies": [
    "https://keyframeui.com/r/release-pill.json"
  ],
  "files": [
    {
      "path": "components/release-pill-devtool-demo.tsx",
      "type": "registry:component",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nimport { ReleasePill, type Release } from \"@/components/ui/release-pill\";\n\nconst KIND = {\n  Feature: \"bg-emerald-500/15 text-emerald-300\",\n  Fix: \"bg-amber-500/15 text-amber-300\",\n  Breaking: \"bg-rose-500/15 text-rose-300\",\n};\n\nfunction Kind({ kind }: { kind: keyof typeof KIND }) {\n  return (\n    <span\n      className={`shrink-0 rounded px-1.5 py-px font-mono text-[10px] leading-4 font-medium ${KIND[kind]}`}\n    >\n      {kind}\n    </span>\n  );\n}\n\nconst releases: Release[] = [\n  {\n    version: \"v3.2.0\",\n    title: \"Parallel task graph\",\n    date: \"Oct 10\",\n    href: \"#v3.2.0\",\n    label: <Kind kind=\"Feature\" />,\n    summary: \"Independent tasks run side by side. 2.4× faster on 8 cores.\",\n  },\n  {\n    version: \"v3.1.4\",\n    title: \"Fix watch-mode leak\",\n    date: \"Oct 3\",\n    href: \"#v3.1.4\",\n    label: <Kind kind=\"Fix\" />,\n  },\n  {\n    version: \"v3.0.0\",\n    title: \"ESM-only output\",\n    date: \"Sep 19\",\n    href: \"#v3.0.0\",\n    label: <Kind kind=\"Breaking\" />,\n  },\n];\n\nconst COMMAND = \"npm i acme@3\";\n\nfunction UpgradeCommand() {\n  const [copied, setCopied] = React.useState(false);\n  const timer = React.useRef(0);\n  React.useEffect(() => () => window.clearTimeout(timer.current), []);\n\n  const copy = () => {\n    navigator.clipboard?.writeText(COMMAND).catch(() => {});\n    setCopied(true);\n    window.clearTimeout(timer.current);\n    timer.current = window.setTimeout(() => setCopied(false), 1800);\n  };\n\n  return (\n    <div className=\"flex items-center gap-2 font-mono text-xs\">\n      <span aria-hidden className=\"text-muted-foreground select-none\">\n        $\n      </span>\n      <code className=\"min-w-0 flex-1 truncate\">{COMMAND}</code>\n      <button\n        type=\"button\"\n        onClick={copy}\n        aria-label={copied ? \"Copied\" : `Copy ${COMMAND}`}\n        className=\"relative inline-flex h-7 w-[4.5rem] shrink-0 cursor-pointer items-center justify-center rounded-md bg-foreground/10 text-[11px] font-medium outline-none hover:bg-foreground/15 focus-visible:ring-2 focus-visible:ring-foreground/60\"\n      >\n        <span\n          className={`absolute transition-all duration-200 ${copied ? \"-translate-y-1.5 opacity-0\" : \"opacity-100\"}`}\n        >\n          Copy\n        </span>\n        <span\n          aria-hidden={!copied}\n          className={`absolute inline-flex items-center gap-1 text-emerald-300 transition-all duration-200 ${copied ? \"opacity-100\" : \"translate-y-1.5 opacity-0\"}`}\n        >\n          <svg\n            aria-hidden\n            viewBox=\"0 0 16 16\"\n            className=\"size-3\"\n            fill=\"none\"\n            stroke=\"currentColor\"\n            strokeWidth=\"2\"\n            strokeLinecap=\"round\"\n            strokeLinejoin=\"round\"\n          >\n            <path d=\"m3.5 8.5 3 3 6-7\" />\n          </svg>\n          Copied\n        </span>\n      </button>\n    </div>\n  );\n}\n\nexport function ReleasePillDevtoolDemo() {\n  return (\n    // The panel is always dark, so it re-points the theme colors the pill reads.\n    <section className=\"relative w-full max-w-3xl rounded-3xl bg-background px-6 py-16 text-center text-foreground ring-1 ring-white/10 [--background:#0b0b0e] [--foreground:#f4f4f5] [--muted-foreground:#9a9aa6] sm:py-24\">\n      <div className=\"flex flex-col items-center\">\n        <ReleasePill releases={releases} tag=\"Release\" changelogHref=\"#changelog\">\n          <UpgradeCommand />\n        </ReleasePill>\n\n        <h2 className=\"mt-7 max-w-[16ch] font-mono text-3xl/[1.15] font-semibold tracking-tight text-balance sm:text-5xl/[1.1]\">\n          Builds that finish before you look away\n        </h2>\n        <p className=\"mt-5 max-w-md text-base/7 text-pretty text-muted-foreground\">\n          Acme runs your tasks as a graph, caches what hasn&apos;t changed, and tells you why when\n          something does.\n        </p>\n\n        <div className=\"mt-9 flex flex-wrap items-center justify-center gap-3\">\n          <a\n            href=\"#docs\"\n            className=\"inline-flex h-11 items-center rounded-lg bg-foreground px-5 text-sm font-medium text-background outline-none hover:opacity-90 focus-visible:ring-2 focus-visible:ring-foreground focus-visible:ring-offset-2 focus-visible:ring-offset-background\"\n          >\n            Read the docs\n          </a>\n          <a\n            href=\"#github\"\n            className=\"inline-flex h-11 items-center rounded-lg px-5 font-mono text-sm ring-1 ring-foreground/15 outline-none hover:bg-foreground/5 focus-visible:ring-2 focus-visible:ring-foreground\"\n          >\n            github.com/acme\n          </a>\n        </div>\n      </div>\n    </section>\n  );\n}\n"
    }
  ]
}