{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "hero-split",
  "type": "registry:block",
  "title": "Hero, split",
  "description": "Headline, short description and two actions on the left; an image on the right. Stacks in narrow containers.",
  "categories": [
    "hero"
  ],
  "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/hero-split/spec.ts",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/hero-split/spec.ts",
      "content": "import { z } from 'zod';\nimport { defineSpec, link, media, t } from '../_shared/schema';\n\nconst schema = z.object({\n  eyebrow: t(60),\n  title: t(120),\n  description: t(900), // KB-178: longest real text 780 chars (tetris-flytt); blank lines draw as paragraph gaps\n  primary: link,\n  secondary: link,\n  media,\n  command: t(120).optional(),\n  note: t(80).optional(),\n  // 'display' draws the heading at the display size for a hero that fills the screen; unset keeps the title size.\n  titleSize: z.enum(['title', 'display']).optional(),\n  // Moves the two actions (and the note) out of the text column into a ruled row under both columns, start-aligned. Off by default.\n  actionsBelow: z.boolean().optional(),\n  // Up to three figures in a ruled strip under the actions in the text column. None by default.\n  stats: z.array(z.object({ value: t(20), label: t(60) })).max(3).optional(),\n});\n\nexport const spec = defineSpec({\n  type: 'hero-split',\n  aliases: ['hero/split'],\n  sourceRuns: ['rmwjf5tju66c184', 'rmwj00gl526cebb', 'rmwj106uc38aa43', 'rmwj0xjdb217e25', 'rmwj0trt42e0545', 'rmwj0w0ht141ac6'],\n  name: 'Hero, split',\n  category: 'hero',\n  role: 'body',\n  description: 'Headline, short description and two actions on the left; an image on the right. Stacks in narrow containers.',\n  schema,\n  // A library row draws business pages, where an install command reads as a developer's terminal (KB-541 cold pick): a row offers none.\n  rowOmit: ['command'],\n  defaults: {\n    eyebrow: 'Name what this is',\n    title: 'Say what the visitor gets in one line',\n    description: 'Say in one or two sentences what it does, who it is for and what the visitor can do next, in plain words.',\n    primary: { label: 'Main action', href: '#start' },\n    secondary: { label: 'Second action', href: '#how' },\n    media: { src: '', alt: 'Show the main screen of the product at work, with real content in it' },\n    command: 'npm create your-app@latest',\n    note: 'Say what makes starting easy.',\n  },\n});\n"
    },
    {
      "path": "src/blocks/hero-split/index.tsx",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/hero-split/index.tsx",
      "content": "import { useId } from 'react';\nimport { Media, Text, withHeadingLevel } from '../../editing';\nimport { ActionLink, CommandBlock, Container, Eyebrow, Opt, Section, useEditing } 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 HeroSplit({ props }: BlockProps<Props>) {\n  const id = useId();\n  const editing = useEditing();\n  const below = props.actionsBelow === true;\n  const stats = props.stats ?? [];\n  const actions = (\n    <>\n      <div className={below ? 'flex flex-wrap gap-3' : 'mt-8 flex flex-wrap gap-3'}>\n        <ActionLink path={['primary']} value={props.primary} />\n        <ActionLink path={['secondary']} value={props.secondary} variant=\"secondary\" />\n      </div>\n      <Opt path={['note']} value={props.note} className=\"mt-4 text-kh-small text-kh-muted\" placeholder=\"Reassurance line\" />\n    </>\n  );\n  return (\n    <Section labelledBy={id} className=\"pt-16 @3xl:pt-24\">\n      <Container className=\"grid grid-cols-1 items-center gap-12 @4xl:grid-cols-[1.05fr_1fr] @4xl:gap-16\">\n        <div>\n          <Eyebrow path={['eyebrow']} value={props.eyebrow} />\n          <div id={id}>\n            <Text path={['title']} value={props.title} as=\"h1\" className={props.titleSize === 'display' ? 'text-kh-display font-semibold' : 'text-kh-title font-semibold'} />\n          </div>\n          <Text path={['description']} value={props.description} as=\"p\" multiline className=\"mt-6 max-w-kh-lead whitespace-pre-line text-kh-lead text-kh-muted\" />\n          {(props.command || editing) && <CommandBlock path={['command']} value={props.command ?? ''} className=\"mt-8 max-w-md\" />}\n          {!below && actions}\n          {stats.length > 0 && (\n            <dl className=\"mt-10 grid grid-cols-3 gap-6 border-t border-kh-line pt-8\">\n              {stats.map((s, i) => (\n                <div key={i} className=\"flex flex-col gap-2\">\n                  <Text path={['stats', i, 'value']} value={s.value} as=\"dd\" className=\"text-kh-heading font-semibold\" />\n                  <Text path={['stats', i, 'label']} value={s.label} as=\"dt\" className=\"order-1 text-kh-small text-kh-muted\" />\n                </div>\n              ))}\n            </dl>\n          )}\n        </div>\n        <Media path={['media']} value={props.media} priority ratio=\"4 / 3\" className=\"rounded-kh-xl border border-kh-line shadow-kh-3\" />\n        {below && <div className=\"@4xl:col-span-2 border-t border-kh-line pt-8\">{actions}</div>}\n      </Container>\n    </Section>\n  );\n}\n\nexport default withHeadingLevel(HeroSplit);\n"
    }
  ]
}
