{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "changelog-compact",
  "type": "registry:block",
  "title": "Changelog, compact list",
  "description": "A dense changelog: one row per change with date, a tag in words and a title that links to the entry. For a sidebar-sized \"what is new\" or a page that lists many releases. A link at the end goes to the full list.",
  "categories": [
    "changelog"
  ],
  "dependencies": [
    "zod@^4.6.5"
  ],
  "registryDependencies": [
    "https://ui.klarhimmel.com/r/badge.json",
    "https://ui.klarhimmel.com/r/block-kit.json",
    "https://ui.klarhimmel.com/r/button.json",
    "https://ui.klarhimmel.com/r/editing.json",
    "https://ui.klarhimmel.com/r/kit-c-proof.json",
    "https://ui.klarhimmel.com/r/text-link.json",
    "https://ui.klarhimmel.com/r/utils.json"
  ],
  "files": [
    {
      "path": "src/blocks/changelog-compact/spec.ts",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/changelog-compact/spec.ts",
      "content": "import { z } from 'zod';\nimport { defineSpec, link, t } from '../_shared/schema';\n\nconst schema = z.object({\n  eyebrow: t(60),\n  title: t(120),\n  description: t(300),\n  /** Each row is one line: a date, a tag, the change and where to read more. */\n  rows: z.array(z.object({ date: t(20), tag: t(16), title: t(120), href: t(300) })).min(3).max(10),\n  more: link,\n});\n\nexport const spec = defineSpec({\n  type: 'changelog-compact',\n  aliases: ['changelog/compact'],\n  name: 'Changelog, compact list',\n  category: 'changelog',\n  role: 'body',\n  description: 'A dense changelog: one row per change with date, a tag in words and a title that links to the entry. For a sidebar-sized \"what is new\" or a page that lists many releases. A link at the end goes to the full list.',\n  schema,\n  defaults: {\n    eyebrow: 'Name the topic',\n    title: 'Say what this lists',\n    description: 'Say in one line what the list covers.',\n    rows: [\n      { date: '1 Jan', tag: 'Name a tag', title: 'Say what changed, in one short line', href: '#e1' },\n      { date: '1 Jan', tag: 'Name a tag', title: 'Say what changed, in one short line', href: '#e2' },\n      { date: '1 Jan', tag: 'Name a tag', title: 'Say what changed, in one short line', href: '#e3' },\n      { date: '1 Jan', tag: 'Name a tag', title: 'Say what changed, in one short line', href: '#e4' },\n      { date: '1 Jan', tag: 'Name a tag', title: 'Say what changed', href: '#e5' },\n    ],\n    more: { label: 'Second action', href: '#history' },\n  },\n});\n"
    },
    {
      "path": "src/blocks/changelog-compact/index.tsx",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/changelog-compact/index.tsx",
      "content": "import { Text, withHeadingLevel } from '../../editing';\nimport { cn } from '../../lib/utils';\nimport { Badge } from '../../ui/badge';\nimport { safeHref } from '../../ui/button';\nimport { linkClass } from '../../ui/text-link';\nimport { ActionLink, Container, Section, useEditing } from '../_shared/kit';\nimport { Heading, useHeadingId } from '../_shared/c-proof-kit';\nimport { spec } from './spec';\nimport type { BlockProps } from '../types';\nimport type { z } from 'zod';\n\nexport { spec };\ntype Props = z.infer<typeof spec.schema>;\n\nfunction ChangelogCompact({ props }: BlockProps<Props>) {\n  const id = useHeadingId(props.title);\n  const editing = useEditing();\n  return (\n    <Section labelledBy={id}>\n      <Container width=\"narrow\">\n        <Heading id={id} eyebrow={props.eyebrow} title={props.title} description={props.description} />\n        <ul className=\"mt-10 divide-y divide-kh-line border-y border-kh-line\">\n          {props.rows.map((r, i) => (\n            <li key={i} className=\"grid grid-cols-[4.5rem_auto] items-center gap-x-4 gap-y-1 py-1 @xl:grid-cols-[5rem_6.5rem_1fr]\">\n              <Text path={['rows', i, 'date']} value={r.date} as=\"span\" className=\"text-kh-small tabular-nums text-kh-muted\" />\n              <span>\n                {(r.tag || editing) && (\n                  <Badge tone=\"outline\">\n                    <Text path={['rows', i, 'tag']} value={r.tag} as=\"span\" />\n                  </Badge>\n                )}\n              </span>\n              {(r.title || editing) && (\n                <a href={safeHref(r.href)} className={cn(linkClass(), 'col-span-2 inline-flex min-h-11 items-center text-kh-body @xl:col-span-1')}>\n                  <Text path={['rows', i, 'title']} value={r.title} as=\"span\" />\n                </a>\n              )}\n            </li>\n          ))}\n        </ul>\n        <ActionLink path={['more']} value={props.more} variant=\"secondary\" size=\"md\" className=\"mt-8\" />\n      </Container>\n    </Section>\n  );\n}\n\nexport default withHeadingLevel(ChangelogCompact);\n"
    }
  ]
}
