{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "gallery-featured",
  "type": "registry:block",
  "title": "Gallery, featured",
  "description": "One large lead image beside a stacked column of two or three smaller ones, each with a caption. A guided look: start here, then these.",
  "categories": [
    "gallery"
  ],
  "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"
  ],
  "files": [
    {
      "path": "src/blocks/gallery-featured/spec.ts",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/gallery-featured/spec.ts",
      "content": "import { z } from 'zod';\nimport { defineSpec, media, t } from '../_shared/schema';\n\nconst shot = z.object({ media, caption: t(120) });\n\nconst schema = z.object({\n  eyebrow: t(60),\n  title: t(120),\n  description: t(300),\n  featured: shot,\n  thumbs: z.array(shot).min(2).max(3),\n});\n\nexport const spec = defineSpec({\n  type: 'gallery-featured',\n  aliases: ['gallery/featured'],\n  name: 'Gallery, featured',\n  category: 'gallery',\n  role: 'body',\n  description: 'One large lead image beside a stacked column of two or three smaller ones, each with a caption. A guided look: start here, then these.',\n  schema,\n  defaults: {\n    eyebrow: 'Name the topic',\n    title: 'Say what to look at first',\n    description: 'Say in one line what the pictures show and why it is worth a look.',\n    featured: { media: { src: '', alt: 'Show the main subject, wide and clear' }, caption: 'Say what the main picture shows' },\n    thumbs: [\n      { media: { src: '', alt: 'Show the subject of this picture, close' }, caption: 'Say what this picture shows' },\n      { media: { src: '', alt: 'Show the subject of this picture, close' }, caption: 'Name what this shows' },\n      { media: { src: '', alt: 'Show the subject of this picture, close' }, caption: 'Name the subject' },\n    ],\n  },\n});\n"
    },
    {
      "path": "src/blocks/gallery-featured/index.tsx",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/gallery-featured/index.tsx",
      "content": "import { Media, withHeadingLevel } from '../../editing';\nimport { Container, Opt, Section } from '../_shared/kit';\nimport { Heading, useHeadingId } from '../_shared/c-proof-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 GalleryFeatured({ props }: BlockProps<Props>) {\n  const id = useHeadingId(props.title);\n  return (\n    <Section labelledBy={id}>\n      <Container>\n        <Heading id={id} eyebrow={props.eyebrow} title={props.title} description={props.description} />\n        <div className=\"mt-14 grid gap-6 @4xl:grid-cols-[2fr_1fr]\">\n          {/* Side by side, the featured picture stretches to the height of the thumbnail column (cropped by object-fit), so the two\n              columns end on one line whatever the number of thumbs; stacked, it keeps 4:3. */}\n          <figure className=\"@4xl:flex @4xl:flex-col\">\n            <Media path={['featured', 'media']} value={props.featured.media} ratio=\"4 / 3\" className=\"rounded-kh-xl border border-kh-line @4xl:aspect-auto @4xl:min-h-80 @4xl:flex-1\" />\n            <Opt path={['featured', 'caption']} value={props.featured.caption} as=\"figcaption\" className=\"mt-3 text-kh-small text-kh-muted\" placeholder=\"Caption\" />\n          </figure>\n          <ul className=\"grid gap-6 @md:grid-cols-2 @4xl:grid-cols-1 @4xl:content-between\">\n            {props.thumbs.map((s, i) => (\n              <li key={i} className=\"@md:last:odd:col-span-2 @4xl:last:odd:col-span-1\">\n                <figure>\n                  <Media path={['thumbs', i, 'media']} value={s.media} ratio=\"16 / 10\" className=\"rounded-kh-lg border border-kh-line\" />\n                  <Opt path={['thumbs', i, 'caption']} value={s.caption} as=\"figcaption\" className=\"mt-2 text-kh-small text-kh-muted\" placeholder=\"Caption\" />\n                </figure>\n              </li>\n            ))}\n          </ul>\n        </div>\n      </Container>\n    </Section>\n  );\n}\n\nexport default withHeadingLevel(GalleryFeatured);\n"
    }
  ]
}
