{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "logos-row-around-heading",
  "type": "registry:block",
  "title": "Logos, row around heading",
  "description": "A centred row of logos on top, then a centred heading with one action beneath it, and optionally a second logo row under the action. Logos wrap on a phone.",
  "categories": [
    "logos"
  ],
  "dependencies": [
    "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-c-proof.json",
    "https://ui.klarhimmel.com/r/utils.json"
  ],
  "files": [
    {
      "path": "src/blocks/logos-row-around-heading/spec.ts",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/logos-row-around-heading/spec.ts",
      "content": "import { z } from 'zod';\nimport { defineSpec, link, media, req } from '../_shared/schema';\n\nconst logo = z.object({ media });\n\nconst schema = z.object({\n  /** The logos above the heading. */\n  logos: z.array(logo).min(3).max(8),\n  title: req(80),\n  cta: link,\n  /** A second row of logos under the action; empty draws none. */\n  logosBelow: z.array(logo).max(8),\n  /** Larger logos and a larger heading; the default is the quiet size. */\n  large: z.boolean(),\n});\n\nconst slot = (n: string) => ({ media: { src: '', alt: `Show the ${n} logo` } });\n\nexport const spec = defineSpec({\n  type: 'logos-row-around-heading',\n  aliases: ['logo-cloud/row-around-heading'],\n  sourceRuns: ['rmwj0wvsv693505', 'rmwj0wvttc7b787'],\n  name: 'Logos, row around heading',\n  category: 'logos',\n  role: 'body',\n  description: 'A centred row of logos on top, then a centred heading with one action beneath it, and optionally a second logo row under the action. Logos wrap on a phone.',\n  schema,\n  defaults: {\n    logos: [slot('first'), slot('second'), slot('third'), slot('fourth'), slot('fifth')],\n    title: 'Say what the logos above stand for',\n    cta: { label: 'Main action', href: '#start' },\n    logosBelow: [],\n    large: false,\n  },\n});\n"
    },
    {
      "path": "src/blocks/logos-row-around-heading/index.tsx",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/logos-row-around-heading/index.tsx",
      "content": "import { Media, Text, withHeadingLevel } from '../../editing';\nimport { ActionLink, Section } from '../_shared/kit';\nimport { useHeadingId } from '../_shared/c-proof-kit';\nimport { cn } from '../../lib/utils';\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 Row({ path, logos, large }: { path: string; logos: Props['logos']; large: boolean }) {\n  return (\n    <ul className={cn('flex w-full flex-wrap items-center justify-center gap-x-12 text-kh-muted', large ? 'gap-y-8 text-kh-heading' : 'gap-y-6 text-kh-lead')}>\n      {logos.map((l, i) => (\n        <li key={i} className=\"w-[6em] max-w-full\">\n          <Media path={[path, i, 'media']} value={l.media} ratio=\"3 / 1\" />\n        </li>\n      ))}\n    </ul>\n  );\n}\n\n// Logo row on top, the heading and action centred beneath it, and an optional second row under them.\nfunction LogosRowAroundHeading({ props }: BlockProps<Props>) {\n  const id = useHeadingId(props.title);\n  return (\n    <Section labelledBy={id} className=\"bg-kh-canvas px-kh-gutter py-kh-section\">\n      <div className=\"mx-auto flex max-w-kh-page flex-col items-center gap-kh-section\">\n        <Row path=\"logos\" logos={props.logos} large={props.large} />\n        <div className=\"flex max-w-kh-narrow flex-col items-center gap-6 text-center\">\n          <div id={id}>\n            <Text path={['title']} value={props.title} as=\"h2\" className={cn('font-kh-display text-kh-ink', props.large ? 'text-kh-title' : 'text-kh-heading')} />\n          </div>\n          <ActionLink path={['cta']} value={props.cta} size=\"md\" className=\"rounded-kh-pill\" />\n        </div>\n        {props.logosBelow.length > 0 && <Row path=\"logosBelow\" logos={props.logosBelow} large={props.large} />}\n      </div>\n    </Section>\n  );\n}\n\nexport default withHeadingLevel(LogosRowAroundHeading);\n"
    }
  ]
}
