{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "related-content",
  "type": "registry:block",
  "title": "Related content",
  "description": "A shared grid of linked cards for other articles, projects, services, products or events. Images are optional.",
  "categories": [
    "blog"
  ],
  "dependencies": [
    "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",
    "https://ui.klarhimmel.com/r/kit-c-proof.json",
    "https://ui.klarhimmel.com/r/kit-d-chrome.json",
    "https://ui.klarhimmel.com/r/utils.json"
  ],
  "files": [
    {
      "path": "src/blocks/related-content/spec.ts",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/related-content/spec.ts",
      "content": "import { z } from 'zod';\nimport { defineSpec, media, req, t } from '../_shared/schema';\nconst schema = z.object({\n  title: req(120),\n  description: t(300),\n  items: z.array(z.object({ title: req(100), description: t(200), href: req(300), media: media.optional() })).min(1).max(6),\n});\nexport const spec = defineSpec({\n  type: 'related-content', aliases: ['content/related'], name: 'Related content', category: 'blog', role: 'body',\n  description: 'A shared grid of linked cards for other articles, projects, services, products or events. Images are optional.', schema,\n  defaults: { title: 'Name the next step', description: 'Say in one line what these lead to.', items: [\n    { title: 'Name the related page', description: 'Say what they find there, in a line', href: '#guide', media: { src: '', alt: 'Show what the page is about, in one picture' } },\n    { title: 'Name the related page', description: 'Say what they find there, in a line', href: '#project', media: { src: '', alt: 'Show what the page is about, in one picture' } },\n  ] },\n});\n"
    },
    {
      "path": "src/blocks/related-content/index.tsx",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/related-content/index.tsx",
      "content": "import { Text, Media, withHeadingLevel } from '../../editing';\nimport { safeHref } from '../../ui/button';\nimport { Section, Container } from '../_shared/kit';\nimport { Heading, useHeadingId } from '../_shared/c-proof-kit';\nimport { FOCUS } from '../_shared/d-chrome-kit';\nimport { cn } from '../../lib/utils';\nimport { spec } from './spec';\nimport type { BlockProps } from '../types';\nimport type { z } from 'zod';\nexport { spec };\ntype Props = z.infer<typeof spec.schema>;\nfunction RelatedContent({ props }: BlockProps<Props>) {\n  const id = useHeadingId(props.title);\n  return <Section labelledBy={id}><Container>\n    <Heading id={id} title={props.title} description={props.description} />\n    <ul className=\"mt-8 grid gap-6 @2xl:grid-cols-2 @4xl:grid-cols-3\">\n      {props.items.map((item, i) => <li key={i} className=\"flex min-w-0\">\n        <a href={safeHref(item.href)} aria-label={item.title} className={cn('flex min-w-0 flex-1 flex-col overflow-hidden rounded-kh-xl border border-kh-line bg-kh-surface transition-[box-shadow,border-color] hover:border-kh-accent hover:shadow-md motion-reduce:transition-none', FOCUS)}>\n          {item.media && <Media path={['items',i,'media']} value={item.media} ratio=\"16 / 10\" />}\n          <div className=\"flex flex-1 flex-col gap-3 p-6\">\n            <Text path={['items',i,'title']} value={item.title} as=\"h3\" className=\"text-kh-heading font-semibold\" />\n            <Text path={['items',i,'description']} value={item.description} as=\"p\" className=\"text-kh-small text-kh-muted\" />\n            <span className=\"mt-auto pt-3 text-kh-small font-medium\" aria-hidden=\"true\">Explore <span>→</span></span>\n          </div>\n        </a>\n      </li>)}\n    </ul>\n  </Container></Section>;\n}\nexport default withHeadingLevel(RelatedContent);\n"
    }
  ]
}
