{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "report-header",
  "type": "registry:block",
  "title": "Report, header",
  "description": "The top of a report: what kind it is (Status, Decision, Research), the title, a summary and a few facts (date, author, refs).",
  "categories": [
    "report"
  ],
  "dependencies": [
    "lucide-react@^1.49.0",
    "zod@^4.6.5"
  ],
  "registryDependencies": [
    "https://ui.klarhimmel.com/r/block-kit.json",
    "https://ui.klarhimmel.com/r/button.json",
    "https://ui.klarhimmel.com/r/editing.json"
  ],
  "files": [
    {
      "path": "src/blocks/report-header/spec.ts",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/report-header/spec.ts",
      "content": "import { z } from 'zod';\nimport { defineSpec, t } from '../_shared/schema';\n\nconst schema = z.object({\n  eyebrow: t(40),\n  title: t(160),\n  summary: t(1200),\n  meta: z.array(z.object({ label: t(30), value: t(120) })).max(8),\n  /** Things to review (a prototype, a local dev server): buttons under the summary, opening in a new tab (Felix 14:20). */\n  review: z.array(z.object({ label: t(80), href: t(500) })).max(4).optional(),\n});\n\nexport const spec = defineSpec({\n  type: 'report-header',\n  aliases: ['report/header'],\n  name: 'Report, header',\n  category: 'report',\n  role: 'body',\n  description: 'The top of a report: what kind it is (Status, Decision, Research), the title, a summary and a few facts (date, author, refs).',\n  schema,\n  defaults: {\n    eyebrow: 'Name the kind',\n    title: 'Say what the report concerns',\n    summary: 'Say in two or three sentences what the report finds, with the **key figure** in bold, and what is left to do.',\n    meta: [\n      { label: 'Fact one', value: '1 January' },\n      { label: 'Fact two', value: 'Name the author' },\n      { label: 'Fact three', value: '0000000' },\n    ],\n  },\n});\n"
    },
    {
      "path": "src/blocks/report-header/index.tsx",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/report-header/index.tsx",
      "content": "import { useId } from 'react';\nimport { ExternalLink } from 'lucide-react';\nimport { Text, withHeadingLevel } from '../../editing';\nimport { ButtonLink } from '../../ui/button';\nimport { Container, Eyebrow, Opt, Section } from '../_shared/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 ReportHeader({ props }: BlockProps<Props>) {\n  const id = useId();\n  return (\n    <Section labelledBy={id} className=\"pb-6 pt-10 @3xl:pt-14 print:py-4\">\n      <Container className=\"max-w-[54rem]\">\n        <Eyebrow path={['eyebrow']} value={props.eyebrow} className=\"mb-3 uppercase tracking-widest text-kh-caption\" />\n        <div id={id}>\n          <Text path={['title']} value={props.title} as=\"h1\" className=\"text-kh-title font-semibold tracking-tight text-balance\" />\n        </div>\n        <Opt path={['summary']} value={props.summary} rich as=\"p\" className=\"mt-5 max-w-kh-prose text-kh-lead text-kh-muted\" placeholder=\"Summary\" />\n        {(props.review?.length ?? 0) > 0 && (\n          <div className=\"mt-6 flex flex-wrap gap-3 print:hidden\">\n            {props.review!.map((r, i) => (\n              <ButtonLink key={i} href={r.href} target=\"_blank\" rel=\"noopener\" variant={i === 0 ? 'primary' : 'secondary'} size=\"lg\" iconEnd={<ExternalLink aria-hidden className=\"size-4\" />}>\n                <Text path={['review', i, 'label']} value={r.label} as=\"span\" />\n              </ButtonLink>\n            ))}\n          </div>\n        )}\n        {props.meta.length > 0 && (\n          <dl className=\"mt-6 flex flex-wrap gap-x-8 gap-y-2 border-t border-kh-line pt-4 text-kh-small\">\n            {props.meta.map((m, i) => (\n              <div key={i} className=\"flex gap-2\">\n                <dt className=\"text-kh-muted\"><Text path={['meta', i, 'label']} value={m.label} as=\"span\" /></dt>\n                <dd className=\"font-medium\"><Text path={['meta', i, 'value']} value={m.value} as=\"span\" rich /></dd>\n              </div>\n            ))}\n          </dl>\n        )}\n      </Container>\n    </Section>\n  );\n}\n\nexport default withHeadingLevel(ReportHeader);\n"
    }
  ]
}
