{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "changelog-release",
  "type": "registry:block",
  "title": "Changelog Release Spread",
  "description": "A single release as a poster spread with an oversized version numeral.",
  "files": [
    {
      "path": "src/registry/blocks/changelog/changelog-release.tsx",
      "type": "registry:block",
      "content": "import { useId, type ComponentProps, type CSSProperties } from \"react\";\nimport { cn } from \"@/lib/utils\";\n\nexport type ReleaseGroup = { heading: string; items: string[] };\n\nexport type ChangelogReleaseProps = {\n  /** Full version, used in metadata, e.g. \"5.0.0\". */\n  version?: string;\n  /** Short form set as the poster numeral, e.g. \"5.0\". */\n  numeral?: string;\n  product?: string;\n  title?: string;\n  /** Display date, e.g. \"6 October 2026\". */\n  date?: string;\n  /** Machine-readable date for the <time> element. */\n  dateTime?: string;\n  lead?: string;\n  groups?: ReleaseGroup[];\n  /** Footnote under the groups, e.g. upgrade instructions. */\n  note?: string;\n  /** The colour field. Default ink blue. */\n  accent?: string;\n  /** Second ink, used for the shapes on the field. Default near-black. */\n  secondary?: string;\n  /** Text and line colour on the field. Default white. */\n  fieldForeground?: string;\n} & ComponentProps<\"section\">;\n\nconst DEFAULT_GROUPS: ReleaseGroup[] = [\n  {\n    heading: \"New\",\n    items: [\n      \"Baselines are committed to .plumbline/ as lossless WebP, about 40 KB per snapshot, and reviewed in the same pull request as the code.\",\n      \"plumbline review opens the review queue on localhost:4410, so you can approve before you push.\",\n      \"Per-story thresholds: set tolerance: 0.2% on a chart story without loosening the rest of the library.\",\n    ],\n  },\n  {\n    heading: \"Improved\",\n    items: [\n      \"Capture on a 400-story library dropped from 6m 12s to 2m 41s on the default 4-core runner.\",\n      \"Review queue shortcuts: J and K to move, A to approve, R to request changes.\",\n      \"Diffs open at the changed region instead of the top-left of the snapshot.\",\n    ],\n  },\n  {\n    heading: \"Fixed\",\n    items: [\n      \"Snapshots taken at 125% zoom no longer report a 1px shift on every edge.\",\n      \"Stories with an autoplaying video are captured on the first frame, every time.\",\n      \"Renaming a story keeps its history instead of starting a new baseline.\",\n    ],\n  },\n];\n\nconst DEFAULTS = {\n  version: \"5.0.0\",\n  numeral: \"5.0\",\n  product: \"Plumbline\",\n  title: \"Baselines that live next to your code\",\n  date: \"6 October 2026\",\n  dateTime: \"2026-10-06\",\n  lead: \"For four years Plumbline kept your approved screenshots on our servers. That meant a revert restored the code but not the pictures, and two branches could fight over one baseline. In version 5 the baselines move into your repository, and the rest of the release follows from that.\",\n  note: \"Upgrading from 4.x: run npx plumbline migrate. It copies your current baselines into the repository and opens one commit for you to review. Nothing is deleted from our side for 90 days.\",\n};\n\nexport function ChangelogRelease({\n  version = DEFAULTS.version,\n  numeral = DEFAULTS.numeral,\n  product = DEFAULTS.product,\n  title = DEFAULTS.title,\n  date = DEFAULTS.date,\n  dateTime = DEFAULTS.dateTime,\n  lead = DEFAULTS.lead,\n  groups = DEFAULT_GROUPS,\n  note = DEFAULTS.note,\n  accent = \"#0A6EFF\",\n  secondary = \"#0A0A0A\",\n  fieldForeground = \"#FFFFFF\",\n  className,\n  style,\n  ...props\n}: ChangelogReleaseProps) {\n  const headingId = useId();\n\n  return (\n    <section\n      data-slot=\"changelog-release\"\n      aria-labelledby={headingId}\n      className={cn(\"w-full bg-background text-foreground\", className)}\n      style={\n        {\n          \"--block-accent\": accent,\n          \"--block-secondary\": secondary,\n          \"--block-on-accent\": fieldForeground,\n          ...style,\n        } as CSSProperties\n      }\n      {...props}\n    >\n      <div className=\"mx-auto max-w-6xl px-6 py-20 md:py-28\">\n        <div className=\"flex flex-wrap items-baseline justify-between gap-x-6 gap-y-1 border-y py-3 font-mono text-xs uppercase tracking-wider text-muted-foreground\">\n          <span>{product} release notes</span>\n          <span>\n            Version {version} · <time dateTime={dateTime}>{date}</time>\n          </span>\n        </div>\n\n        <div className=\"mt-10 grid gap-10 md:grid-cols-12 md:gap-12\">\n          {/* The colour field: a poster numeral and a plumb line. */}\n          <div\n            aria-hidden\n            className=\"relative aspect-[4/5] overflow-hidden bg-[var(--block-accent)] text-[var(--block-on-accent)] md:col-span-7\"\n          >\n            <svg\n              viewBox=\"0 0 400 500\"\n              preserveAspectRatio=\"xMaxYMin slice\"\n              className=\"absolute inset-0 size-full\"\n            >\n              <circle cx=\"400\" cy=\"110\" r=\"96\" fill=\"var(--block-secondary)\" />\n              <line\n                x1=\"270\"\n                y1=\"0\"\n                x2=\"270\"\n                y2=\"258\"\n                stroke=\"var(--block-on-accent)\"\n                strokeWidth=\"1.5\"\n              />\n              <path d=\"M250 258 h40 l-20 52 z\" fill=\"var(--block-secondary)\" />\n              <rect x=\"252\" y=\"252\" width=\"36\" height=\"6\" fill=\"var(--block-on-accent)\" />\n              {Array.from({ length: 20 }, (_, i) => (\n                <circle\n                  key={i}\n                  cx={300 + (i % 5) * 18}\n                  cy={360 + Math.floor(i / 5) * 18}\n                  r=\"2.2\"\n                  fill=\"var(--block-on-accent)\"\n                />\n              ))}\n            </svg>\n            <p className=\"absolute top-6 left-6 font-mono text-xs uppercase tracking-wider\">\n              {product} / {version}\n            </p>\n            <p className=\"absolute bottom-0 left-4 text-[8.5rem] leading-[0.8] font-semibold tracking-[-0.06em] tabular-nums sm:text-[13rem] lg:text-[15rem]\">\n              {numeral}\n            </p>\n          </div>\n\n          <div className=\"flex flex-col md:col-span-5 md:pt-2\">\n            <p className=\"font-mono text-xs uppercase tracking-wider text-muted-foreground\">\n              <time dateTime={dateTime}>{date}</time>\n            </p>\n            <h2\n              id={headingId}\n              className=\"mt-5 text-4xl font-semibold leading-[1.02] tracking-[-0.03em] text-balance md:text-5xl\"\n            >\n              {title}\n            </h2>\n            <p className=\"mt-8 font-serif text-lg leading-relaxed text-pretty\">{lead}</p>\n            <p className=\"mt-auto hidden border-t pt-4 font-mono text-xs text-muted-foreground md:block\">\n              Continued below: {groups.reduce((n, g) => n + g.items.length, 0)} changes in{\" \"}\n              {groups.length} groups.\n            </p>\n          </div>\n        </div>\n\n        <div className=\"mt-16 grid gap-10 border-t pt-10 md:grid-cols-3 md:gap-0 md:divide-x\">\n          {groups.map((group, i) => (\n            <div key={group.heading} className=\"md:px-8 md:first:pl-0 md:last:pr-0\">\n              <h3 className=\"flex items-baseline gap-3 font-mono text-xs uppercase tracking-wider\">\n                <span className=\"text-muted-foreground tabular-nums\">\n                  ({String(i + 1).padStart(2, \"0\")})\n                </span>\n                {group.heading}\n              </h3>\n              <ul className=\"mt-5 space-y-4\">\n                {group.items.map((item) => (\n                  <li key={item} className=\"flex gap-3 text-sm leading-relaxed\">\n                    <span\n                      aria-hidden\n                      className=\"mt-[0.45rem] size-1.5 shrink-0 bg-[var(--block-secondary)]\"\n                    />\n                    <span>{item}</span>\n                  </li>\n                ))}\n              </ul>\n            </div>\n          ))}\n        </div>\n\n        {note && (\n          <p className=\"mt-14 max-w-2xl border-l-2 border-[var(--block-secondary)] pl-4 text-sm leading-relaxed text-muted-foreground\">\n            {note}\n          </p>\n        )}\n      </div>\n    </section>\n  );\n}\n"
    }
  ]
}
