{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "report-callout",
  "type": "registry:block",
  "title": "Report, callout",
  "description": "A boxed aside in a report: a note, a tip, a warning or something important. The kind is a word and an icon, never colour alone.",
  "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/editing.json",
    "https://ui.klarhimmel.com/r/kit-report.json",
    "https://ui.klarhimmel.com/r/utils.json"
  ],
  "files": [
    {
      "path": "src/blocks/report-callout/spec.ts",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/report-callout/spec.ts",
      "content": "import { z } from 'zod';\nimport { defineSpec, t } from '../_shared/schema';\n\nconst schema = z.object({\n  tone: z.enum(['note', 'tip', 'warning', 'important']),\n  title: t(80),\n  text: z.string().min(1).max(1500),\n});\n\nexport const spec = defineSpec({\n  type: 'report-callout',\n  aliases: ['report/callout'],\n  name: 'Report, callout',\n  category: 'report',\n  role: 'body',\n  description: 'A boxed aside in a report: a note, a tip, a warning or something important. The kind is a word and an icon, never colour alone.',\n  schema,\n  defaults: {\n    tone: 'warning',\n    title: 'Name the point of the note',\n    text: 'Say what the reader needs to know and what happens next, in a sentence or two.',\n  },\n  headingSlot: false,\n});\n"
    },
    {
      "path": "src/blocks/report-callout/index.tsx",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/report-callout/index.tsx",
      "content": "import { AlertTriangle, Info, Lightbulb, Star } from 'lucide-react';\nimport { Text, withHeadingLevel } from '../../editing';\nimport { cn } from '../../lib/utils';\nimport { Opt } from '../_shared/kit';\nimport { ReportSection } from '../_shared/report-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\n// Each kind is a word and a shape, so it reads in greyscale and in print.\nconst TONE = {\n  note: { Icon: Info, word: 'Note', box: 'border-kh-line bg-kh-surface', label: 'text-kh-muted' },\n  tip: { Icon: Lightbulb, word: 'Tip', box: 'border-kh-line bg-kh-surface-2', label: 'text-kh-ink' },\n  warning: { Icon: AlertTriangle, word: 'Warning', box: 'border-kh-ink bg-kh-surface', label: 'text-kh-ink' },\n  important: { Icon: Star, word: 'Important', box: 'border-kh-accent bg-kh-accent-soft', label: 'text-kh-accent-ink' },\n} as const;\n\nfunction ReportCallout({ props }: BlockProps<Props>) {\n  const k = TONE[props.tone] ?? TONE.note;\n  return (\n    <ReportSection className=\"py-4 @3xl:py-5 print:py-2\">\n      <aside className={cn('rounded-kh-lg border p-4 @xl:p-5 print:break-inside-avoid', k.box)}>\n        <p className={cn('flex items-center gap-2 text-kh-caption font-semibold uppercase tracking-widest', k.label)}>\n          <k.Icon aria-hidden className=\"size-4\" />\n          {k.word}\n        </p>\n        <Opt path={['title']} value={props.title} as=\"p\" className=\"mt-2 text-kh-body font-semibold\" placeholder=\"Title\" />\n        <Text path={['text']} value={props.text} as=\"p\" rich className=\"mt-1 text-kh-body [overflow-wrap:anywhere]\" />\n      </aside>\n    </ReportSection>\n  );\n}\n\nexport default withHeadingLevel(ReportCallout);\n"
    }
  ]
}
