{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "download-changelog",
  "type": "registry:component",
  "title": "Download Changelog",
  "description": "A release section with the latest version card, highlights and download buttons per platform, next to a changelog timeline that draws in, with collapsible releases, typed notes and filters for new, improved and fixed.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "download",
    "changelog",
    "release notes",
    "download",
    "timeline",
    "versions",
    "accordion"
  ],
  "docs": "https://hyperblur.dev/effects/download-changelog",
  "files": [
    {
      "path": "registry/hyperblur/download-changelog.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/download-changelog.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport type DownloadChangelogNoteType = \"new\" | \"improved\" | \"fixed\";\n\nexport interface DownloadChangelogRelease {\n  version: string;\n  date: string;\n  name?: string;\n  notes: { type: DownloadChangelogNoteType; text: string }[];\n}\n\nexport interface DownloadChangelogDownload {\n  label: string;\n  detail: string;\n  size: string;\n  href: string;\n  os: \"mac\" | \"windows\" | \"linux\";\n}\n\nexport interface DownloadChangelogProps extends Omit<React.HTMLAttributes<HTMLElement>, \"title\"> {\n  eyebrow?: string;\n  title?: string;\n  summary?: string;\n  highlights?: string[];\n  releases?: DownloadChangelogRelease[];\n  downloads?: DownloadChangelogDownload[];\n  defaultExpanded?: number;\n  onDownload?: (item: DownloadChangelogDownload) => void;\n  allReleasesHref?: string;\n  accent?: string;\n}\n\nconst css = `\n.hb-yha {\n  --hb-yha-accent: #10b981;\n  position: relative;\n  box-sizing: border-box;\n  width: 100%;\n  container-type: inline-size;\n  overflow: hidden;\n  padding: clamp(64px, 8cqi, 104px) 20px;\n  background: #0a0a0a;\n  color: #ededed;\n  font-family: inherit;\n  -webkit-font-smoothing: antialiased;\n}\n.hb-yha *, .hb-yha *::before, .hb-yha *::after { box-sizing: border-box; }\n.hb-yha-in { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px; align-items: start; max-width: 1120px; margin: 0 auto; }\n.hb-yha-card {\n  position: sticky;\n  top: 24px;\n  padding: 28px;\n  border: 1px solid rgba(255,255,255,.08);\n  border-radius: 22px;\n  background:\n    radial-gradient(90% 50% at 0% 0%, color-mix(in srgb, var(--hb-yha-accent) 18%, transparent), transparent 70%),\n    linear-gradient(180deg, #131313, #0d0d0d);\n  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);\n}\n.hb-yha-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }\n.hb-yha-ver { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border: 1px solid color-mix(in srgb, var(--hb-yha-accent) 40%, transparent); border-radius: 8px; background: color-mix(in srgb, var(--hb-yha-accent) 12%, transparent); color: color-mix(in srgb, var(--hb-yha-accent) 60%, #fff); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; font-weight: 600; }\n.hb-yha-latest { display: inline-flex; align-items: center; gap: 6px; color: #a1a1a1; font-size: 12.5px; font-weight: 500; }\n.hb-yha-latest i { position: relative; width: 7px; height: 7px; border-radius: 50%; background: var(--hb-yha-accent); }\n.hb-yha-latest i::after { content: \"\"; position: absolute; inset: -4px; border-radius: 50%; background: var(--hb-yha-accent); opacity: .5; animation: hb-yha-ping 1.8s ease-out infinite; }\n.hb-yha-eyebrow { margin-top: 18px; color: #8f8f8f; font-size: 13px; }\n.hb-yha-title { margin: 6px 0 0; font-size: clamp(26px, 3.4cqi, 36px); font-weight: 650; letter-spacing: -.035em; line-height: 1.1; }\n.hb-yha-sum { margin: 12px 0 0; color: #8f8f8f; font-size: 14.5px; line-height: 1.6; }\n.hb-yha-hl { display: grid; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }\n.hb-yha-hl li { display: flex; gap: 10px; color: #c9c9c9; font-size: 13.5px; line-height: 1.5; }\n.hb-yha-hl svg { flex: none; width: 16px; height: 16px; margin-top: 2px; fill: none; stroke: var(--hb-yha-accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }\n.hb-yha-dls { display: grid; gap: 8px; margin-top: 24px; }\n.hb-yha-dl {\n  display: flex;\n  align-items: center;\n  gap: 12px;\n  min-height: 56px;\n  padding: 10px 14px;\n  border: 1px solid rgba(255,255,255,.08);\n  border-radius: 14px;\n  background: rgba(255,255,255,.025);\n  color: #ededed;\n  text-decoration: none;\n  transition: background-color .2s ease, border-color .2s ease, transform .15s ease;\n}\n.hb-yha-dl:hover { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); }\n.hb-yha-dl:active { transform: scale(.99); }\n.hb-yha-dl:first-child { border-color: transparent; background: #ededed; color: #0a0a0a; }\n.hb-yha-dl:first-child:hover { background: #fff; }\n.hb-yha-dl:focus-visible { outline: 2px solid var(--hb-yha-accent); outline-offset: 2px; }\n.hb-yha-os { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.06); }\n.hb-yha-dl:first-child .hb-yha-os { background: rgba(0,0,0,.07); }\n.hb-yha-os svg { width: 17px; height: 17px; fill: currentColor; }\n.hb-yha-dt { flex: 1; min-width: 0; }\n.hb-yha-dn { display: block; font-size: 14px; font-weight: 600; }\n.hb-yha-dd { display: block; margin-top: 1px; color: #8f8f8f; font-size: 12px; }\n.hb-yha-dl:first-child .hb-yha-dd { color: #525252; }\n.hb-yha-sz { color: #8f8f8f; font-size: 12px; font-variant-numeric: tabular-nums; }\n.hb-yha-dl:first-child .hb-yha-sz { color: #525252; }\n.hb-yha-arrow { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s cubic-bezier(.3,1.4,.5,1); }\n.hb-yha-dl:hover .hb-yha-arrow { transform: translateY(2px); }\n.hb-yha-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }\n.hb-yha-h { margin: 0; font-size: 18px; font-weight: 650; letter-spacing: -.01em; }\n.hb-yha-filters { display: flex; gap: 4px; padding: 3px; border: 1px solid rgba(255,255,255,.08); border-radius: 999px; background: #101010; }\n.hb-yha-f { height: 28px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: #8f8f8f; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: background-color .2s ease, color .2s ease; }\n.hb-yha-f:hover { color: #ededed; }\n.hb-yha-f[aria-pressed=\"true\"] { background: rgba(255,255,255,.09); color: #fff; }\n.hb-yha-f:focus-visible, .hb-yha-sum2:focus-visible, .hb-yha-all:focus-visible { outline: 2px solid var(--hb-yha-accent); outline-offset: 2px; }\n.hb-yha-tl { position: relative; margin: 0; padding: 0 0 0 28px; list-style: none; }\n.hb-yha-tl::before { content: \"\"; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 1px; background: linear-gradient(180deg, var(--hb-yha-accent), rgba(255,255,255,.1) 30%, rgba(255,255,255,.04)); transform-origin: top; transform: scaleY(0); animation: hb-yha-line 1.2s cubic-bezier(.6,0,.2,1) .2s forwards; }\n.hb-yha-rel { position: relative; padding-bottom: 14px; opacity: 0; transform: translateY(10px); animation: hb-yha-in .6s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: calc(300ms + var(--hb-yha-i) * 110ms); }\n.hb-yha-dot { position: absolute; left: -27px; top: 14px; width: 11px; height: 11px; border: 2px solid #0a0a0a; border-radius: 50%; background: #3a3a3a; box-shadow: 0 0 0 1px rgba(255,255,255,.12); }\n.hb-yha-rel:first-child .hb-yha-dot { background: var(--hb-yha-accent); box-shadow: 0 0 0 1px var(--hb-yha-accent), 0 0 12px var(--hb-yha-accent); }\n.hb-yha-box { border: 1px solid rgba(255,255,255,.07); border-radius: 16px; background: #0f0f0f; transition: border-color .2s ease; }\n.hb-yha-box[data-open=\"true\"] { border-color: rgba(255,255,255,.11); background: #111; }\n.hb-yha-sum2 { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 50px; margin: 0; padding: 10px 16px; border: 0; border-radius: 16px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }\n.hb-yha-v2 { flex: none; height: 22px; padding: 0 8px; border-radius: 6px; background: rgba(255,255,255,.06); color: #d4d4d4; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; font-weight: 600; line-height: 22px; }\n.hb-yha-rel:first-child .hb-yha-v2 { background: color-mix(in srgb, var(--hb-yha-accent) 16%, transparent); color: color-mix(in srgb, var(--hb-yha-accent) 60%, #fff); }\n.hb-yha-rn { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n.hb-yha-date { flex: none; color: #6f6f6f; font-size: 12.5px; }\n.hb-yha-chev { width: 14px; height: 14px; flex: none; fill: none; stroke: #8f8f8f; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s ease; }\n.hb-yha-box[data-open=\"true\"] .hb-yha-chev { transform: rotate(180deg); }\n.hb-yha-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s cubic-bezier(.2,.8,.2,1); }\n.hb-yha-box[data-open=\"true\"] .hb-yha-body { grid-template-rows: 1fr; }\n.hb-yha-body > div { min-height: 0; overflow: hidden; }\n.hb-yha-notes { display: grid; gap: 9px; margin: 0; padding: 2px 16px 16px; list-style: none; }\n.hb-yha-note { display: flex; align-items: flex-start; gap: 10px; color: #c4c4c4; font-size: 13.5px; line-height: 1.5; }\n.hb-yha-type { flex: none; width: 70px; height: 20px; margin-top: 1px; border-radius: 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; line-height: 20px; text-align: center; text-transform: uppercase; }\n.hb-yha-type[data-t=\"new\"] { background: color-mix(in srgb, var(--hb-yha-accent) 15%, transparent); color: color-mix(in srgb, var(--hb-yha-accent) 70%, #fff); }\n.hb-yha-type[data-t=\"improved\"] { background: rgba(56,189,248,.13); color: #7dd3fc; }\n.hb-yha-type[data-t=\"fixed\"] { background: rgba(251,191,36,.12); color: #fcd34d; }\n.hb-yha-empty { padding: 2px 16px 16px; color: #6f6f6f; font-size: 13px; }\n.hb-yha-all { display: inline-flex; align-items: center; gap: 6px; margin: 6px 0 0 28px; color: #a1a1a1; font-size: 13.5px; font-weight: 600; text-decoration: none; }\n.hb-yha-all:hover { color: #ededed; }\n@keyframes hb-yha-ping { from { transform: scale(.5); opacity: .6; } to { transform: scale(1.6); opacity: 0; } }\n@keyframes hb-yha-line { to { transform: scaleY(1); } }\n@keyframes hb-yha-in { to { opacity: 1; transform: none; } }\n@container (max-width: 860px) {\n  .hb-yha-in { grid-template-columns: minmax(0, 1fr); gap: 32px; }\n  .hb-yha-card { position: relative; top: 0; }\n}\n@container (max-width: 480px) {\n  .hb-yha-card { padding: 22px; }\n  .hb-yha-head { flex-direction: column; align-items: flex-start; }\n  .hb-yha-date { display: none; }\n  .hb-yha-note { flex-direction: column; gap: 4px; }\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-yha *, .hb-yha *::before, .hb-yha *::after { animation: none !important; transition: none !important; }\n  .hb-yha-tl::before { transform: none; }\n  .hb-yha-rel { opacity: 1; transform: none; }\n}\n`;\n\nconst defaultReleases: DownloadChangelogRelease[] = [\n  {\n    version: \"4.2.0\",\n    date: \"Nov 3, 2026\",\n    name: \"Offline mode and faster sync\",\n    notes: [\n      { type: \"new\", text: \"Work fully offline. Changes queue locally and merge when you reconnect.\" },\n      { type: \"improved\", text: \"Initial sync of large workspaces is up to 3x faster.\" },\n      { type: \"fixed\", text: \"Pasting tables from Excel no longer drops merged cells.\" },\n    ],\n  },\n  {\n    version: \"4.1.2\",\n    date: \"Oct 21, 2026\",\n    name: \"Stability fixes\",\n    notes: [\n      { type: \"fixed\", text: \"App could freeze when closing a window during export on Windows 11.\" },\n      { type: \"fixed\", text: \"Linux tray icon now respects dark themes.\" },\n    ],\n  },\n  {\n    version: \"4.1.0\",\n    date: \"Oct 8, 2026\",\n    name: \"Command menu everywhere\",\n    notes: [\n      { type: \"new\", text: \"Press Cmd K in any view to jump, create or run actions.\" },\n      { type: \"improved\", text: \"Search results rank recent documents first.\" },\n    ],\n  },\n  {\n    version: \"4.0.0\",\n    date: \"Sep 16, 2026\",\n    name: \"The 4.0 redesign\",\n    notes: [\n      { type: \"new\", text: \"A new sidebar, tabs and split view across macOS, Windows and Linux.\" },\n      { type: \"improved\", text: \"Memory use cut by 40 percent on long sessions.\" },\n    ],\n  },\n];\n\nconst defaultDownloads: DownloadChangelogDownload[] = [\n  { label: \"macOS\", detail: \"Apple Silicon, macOS 13 or later\", size: \"112 MB\", href: \"#\", os: \"mac\" },\n  { label: \"macOS\", detail: \"Intel, macOS 12 or later\", size: \"118 MB\", href: \"#\", os: \"mac\" },\n  { label: \"Windows\", detail: \"64-bit installer, Windows 10 or 11\", size: \"98 MB\", href: \"#\", os: \"windows\" },\n  { label: \"Linux\", detail: \"AppImage, deb and rpm\", size: \"104 MB\", href: \"#\", os: \"linux\" },\n];\n\nconst defaultHighlights = [\"Offline mode with automatic merge\", \"Sync up to 3x faster on big workspaces\", \"Signed and notarized builds for every platform\"];\n\nconst osIcon: Record<DownloadChangelogDownload[\"os\"], React.ReactNode> = {\n  mac: <path d=\"M13.2 10.4c0-1.8 1.5-2.7 1.6-2.8-.9-1.3-2.2-1.5-2.7-1.5-1.1-.1-2.2.7-2.8.7-.6 0-1.5-.7-2.4-.6-1.3 0-2.4.7-3.1 1.9-1.3 2.3-.3 5.6.9 7.4.6.9 1.3 1.9 2.3 1.8.9 0 1.3-.6 2.4-.6s1.4.6 2.4.6 1.6-.9 2.2-1.8c.7-1 1-2 1-2.1-.1 0-1.8-.7-1.8-3zM11.4 4.9c.5-.6.8-1.4.7-2.3-.7 0-1.6.5-2.1 1.1-.5.5-.9 1.4-.8 2.2.8.1 1.6-.4 2.2-1z\" />,\n  windows: <path d=\"M3 4.6 8.7 3.8v5.5H3zM9.5 3.7 17 2.6v6.7H9.5zM3 10.1h5.7v5.5L3 14.8zM9.5 10.1H17v6.7l-7.5-1.1z\" />,\n  linux: <path d=\"M10 2.5c-1.9 0-2.8 1.6-2.8 3.4 0 1.1.2 1.6-.6 2.9-.9 1.3-2.1 3-2.1 5 0 .7.3 1.3.8 1.6-.4.4-.5 1-.1 1.4.6.6 2 .4 3 .9.8.3 1.3.3 1.8.3s1 0 1.8-.3c1-.5 2.4-.3 3-.9.4-.4.3-1-.1-1.4.5-.3.8-.9.8-1.6 0-2-1.2-3.7-2.1-5-.8-1.3-.6-1.8-.6-2.9 0-1.8-.9-3.4-2.8-3.4z\" />,\n};\n\nconst filterLabels: { id: \"all\" | DownloadChangelogNoteType; label: string }[] = [\n  { id: \"all\", label: \"All\" },\n  { id: \"new\", label: \"New\" },\n  { id: \"improved\", label: \"Improved\" },\n  { id: \"fixed\", label: \"Fixed\" },\n];\n\nexport function DownloadChangelog({\n  eyebrow = \"Released November 3, 2026\",\n  title = \"Download Quill 4.2\",\n  summary = \"Free for personal use. Updates install in the background and never touch your files.\",\n  highlights = defaultHighlights,\n  releases = defaultReleases,\n  downloads = defaultDownloads,\n  defaultExpanded = 2,\n  onDownload,\n  allReleasesHref = \"#\",\n  accent = \"#10b981\",\n  className = \"\",\n  style,\n  ...rest\n}: DownloadChangelogProps) {\n  const uid = React.useId();\n  const [open, setOpen] = React.useState<Set<string>>(() => new Set(releases.slice(0, defaultExpanded).map((r) => r.version)));\n  const [filter, setFilter] = React.useState<\"all\" | DownloadChangelogNoteType>(\"all\");\n  const latest = releases[0];\n\n  function toggle(v: string) {\n    setOpen((prev) => {\n      const next = new Set(prev);\n      if (next.has(v)) next.delete(v);\n      else next.add(v);\n      return next;\n    });\n  }\n\n  return (\n    <section className={`hb-yha ${className}`} style={{ \"--hb-yha-accent\": accent, ...style } as React.CSSProperties} {...rest}>\n      <style href=\"hb-download-changelog\" precedence=\"default\">\n        {css}\n      </style>\n      <div className=\"hb-yha-in\">\n        <div className=\"hb-yha-card\">\n          {latest && (\n            <div className=\"hb-yha-top\">\n              <span className=\"hb-yha-ver\">v{latest.version}</span>\n              <span className=\"hb-yha-latest\">\n                <i aria-hidden=\"true\" />\n                Latest release\n              </span>\n            </div>\n          )}\n          <div className=\"hb-yha-eyebrow\">{eyebrow}</div>\n          <h2 className=\"hb-yha-title\">{title}</h2>\n          {summary && <p className=\"hb-yha-sum\">{summary}</p>}\n          {highlights.length > 0 && (\n            <ul className=\"hb-yha-hl\">\n              {highlights.map((h) => (\n                <li key={h}>\n                  <svg viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n                    <path d=\"m3.5 8.5 3 3 6-7\" />\n                  </svg>\n                  {h}\n                </li>\n              ))}\n            </ul>\n          )}\n          <div className=\"hb-yha-dls\">\n            {downloads.map((d) => (\n              <a key={`${d.label}-${d.detail}`} href={d.href} className=\"hb-yha-dl\" onClick={() => onDownload?.(d)} download>\n                <span className=\"hb-yha-os\">\n                  <svg viewBox=\"0 0 20 20\" aria-hidden=\"true\">\n                    {osIcon[d.os]}\n                  </svg>\n                </span>\n                <span className=\"hb-yha-dt\">\n                  <span className=\"hb-yha-dn\">Download for {d.label}</span>\n                  <span className=\"hb-yha-dd\">{d.detail}</span>\n                </span>\n                <span className=\"hb-yha-sz\">{d.size}</span>\n                <svg className=\"hb-yha-arrow\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n                  <path d=\"M8 2.5v9M4 8l4 4 4-4M3 14h10\" />\n                </svg>\n              </a>\n            ))}\n          </div>\n        </div>\n        <div>\n          <div className=\"hb-yha-head\">\n            <h3 className=\"hb-yha-h\">Changelog</h3>\n            <div className=\"hb-yha-filters\" role=\"group\" aria-label=\"Filter changes\">\n              {filterLabels.map((f) => (\n                <button key={f.id} type=\"button\" className=\"hb-yha-f\" aria-pressed={filter === f.id} onClick={() => setFilter(f.id)}>\n                  {f.label}\n                </button>\n              ))}\n            </div>\n          </div>\n          <ol className=\"hb-yha-tl\">\n            {releases.map((r, i) => {\n              const isOpen = open.has(r.version);\n              const notes = filter === \"all\" ? r.notes : r.notes.filter((n) => n.type === filter);\n              const bodyId = `${uid}-r${i}`;\n              return (\n                <li key={r.version} className=\"hb-yha-rel\" style={{ \"--hb-yha-i\": i } as React.CSSProperties}>\n                  <span className=\"hb-yha-dot\" aria-hidden=\"true\" />\n                  <div className=\"hb-yha-box\" data-open={isOpen ? \"true\" : \"false\"}>\n                    <button type=\"button\" className=\"hb-yha-sum2\" aria-expanded={isOpen} aria-controls={bodyId} onClick={() => toggle(r.version)}>\n                      <span className=\"hb-yha-v2\">v{r.version}</span>\n                      <span className=\"hb-yha-rn\">{r.name ?? `Version ${r.version}`}</span>\n                      <span className=\"hb-yha-date\">{r.date}</span>\n                      <svg className=\"hb-yha-chev\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n                        <path d=\"m4 6 4 4 4-4\" />\n                      </svg>\n                    </button>\n                    <div className=\"hb-yha-body\" id={bodyId}>\n                      <div>\n                        {notes.length ? (\n                          <ul className=\"hb-yha-notes\">\n                            {notes.map((n) => (\n                              <li key={n.text} className=\"hb-yha-note\">\n                                <span className=\"hb-yha-type\" data-t={n.type}>\n                                  {n.type}\n                                </span>\n                                <span>{n.text}</span>\n                              </li>\n                            ))}\n                          </ul>\n                        ) : (\n                          <p className=\"hb-yha-empty\">No {filter} changes in this release.</p>\n                        )}\n                      </div>\n                    </div>\n                  </div>\n                </li>\n              );\n            })}\n          </ol>\n          {allReleasesHref && (\n            <a href={allReleasesHref} className=\"hb-yha-all\">\n              See all releases\n              <svg width=\"14\" height=\"14\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" aria-hidden=\"true\">\n                <path d=\"M3 8h10M9 4l4 4-4 4\" />\n              </svg>\n            </a>\n          )}\n        </div>\n      </div>\n    </section>\n  );\n}\n"
    }
  ]
}