{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "cta-band",
  "type": "registry:block",
  "title": "Call to action, band",
  "description": "A contrasting panel with a short headline and one or two actions, to close a page.",
  "categories": [
    "cta"
  ],
  "dependencies": [
    "zod@^4.6.5"
  ],
  "registryDependencies": [
    "https://ui.klarhimmel.com/r/block-kit.json",
    "https://ui.klarhimmel.com/r/editing.json"
  ],
  "files": [
    {
      "path": "src/blocks/cta-band/spec.ts",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/cta-band/spec.ts",
      "content": "import { z } from 'zod';\nimport { defineSpec, link, t } from '../_shared/schema';\n\n// Limits (KB-178): description raised to 900 for the longest real text, 780 chars (tetris-flytt); blank lines draw as paragraph gaps. The buttons are optional (a section may carry only copy).\nconst schema = z.object({\n  title: t(120),\n  description: t(900),\n  primary: link.optional(),\n  secondary: link.optional(),\n  // panel: 'plain' draws the band straight on the page, with no contrasting panel: headline at ordinary heading size, a filled main button and an outlined second one.\n  panel: z.enum(['contrast', 'plain']).optional(),\n});\n\nexport const spec = defineSpec({\n  type: 'cta-band',\n  aliases: ['cta/banner'],\n  sourceRuns: ['rmwj0tmwza1a90c'],\n  name: 'Call to action, band',\n  category: 'cta',\n  role: 'body',\n  description: 'A contrasting panel with a short headline and one or two actions, to close a page.',\n  schema,\n  defaults: {\n    title: 'Say what the visitor can do next',\n    description: 'Say in one sentence what the first step is and what it costs.',\n    primary: { label: 'Main action', href: '#start' },\n    secondary: { label: 'Second action', href: '#contact' },\n  },\n});\n"
    },
    {
      "path": "src/blocks/cta-band/index.tsx",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/cta-band/index.tsx",
      "content": "import { useId } from 'react';\nimport { Text, withHeadingLevel } from '../../editing';\nimport { ActionLink, Container, 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 CtaBand({ props }: BlockProps<Props>) {\n  const id = useId();\n  const plain = props.panel === 'plain';\n  return (\n    <Section labelledBy={id} className=\"py-16 @3xl:py-24\">\n      <Container>\n        {/* the panel re-maps tokens with its own inverse tone, so buttons and text follow; in dark mode it is raised instead (theme-base) */}\n        <div {...(plain ? {} : { 'data-kh-tone': 'inverse', 'data-kh-dark': 'raised' })} className={plain ? 'flex flex-col items-start justify-between gap-8 text-kh-ink @3xl:flex-row @3xl:items-center' : 'flex flex-col items-start justify-between gap-8 rounded-kh-xl bg-kh-canvas px-8 py-12 text-kh-ink @3xl:flex-row @3xl:items-center @3xl:px-14 @3xl:py-16'}>\n          <div className=\"min-w-0 max-w-kh-lead flex-1\">\n            <div id={id}>\n              <Text path={['title']} value={props.title} as=\"h2\" className={plain ? 'text-kh-heading font-semibold' : 'text-kh-title font-semibold'} />\n            </div>\n            <Text path={['description']} value={props.description} as=\"p\" multiline className=\"mt-3 whitespace-pre-line text-kh-lead text-kh-muted\" />\n          </div>\n          {(props.primary || props.secondary) && (\n          <div className=\"flex max-w-full shrink-0 flex-wrap gap-3\">\n            {props.primary && <ActionLink path={['primary']} value={props.primary} variant={plain ? undefined : 'accent'} />}\n            {props.secondary && <ActionLink path={['secondary']} value={props.secondary} variant={plain ? 'secondary' : 'ghost'} />}\n          </div>\n          )}\n        </div>\n      </Container>\n    </Section>\n  );\n}\n\nexport default withHeadingLevel(CtaBand);\n"
    }
  ]
}
