{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "team-grid",
  "type": "registry:block",
  "title": "Team, grid",
  "description": "A heading and a grid of people with photo, name, role and a short bio.",
  "categories": [
    "team"
  ],
  "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/utils.json"
  ],
  "files": [
    {
      "path": "src/blocks/team-grid/spec.ts",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/team-grid/spec.ts",
      "content": "import { z } from 'zod';\nimport { defineSpec, media, t } from '../_shared/schema';\n\n// KB-178: bio raised 200 -> 900; real bios run 390-800 chars (longest about 800, salong-you). Blank lines draw as paragraph gaps.\nconst schema = z.object({\n  eyebrow: t(60),\n  title: t(120),\n  description: t(300),\n  members: z.array(z.object({ name: t(60), role: t(60), bio: t(900), photo: media })).min(1).max(8),\n});\n\nexport const spec = defineSpec({\n  type: 'team-grid',\n  aliases: ['team/grid'],\n  name: 'Team, grid',\n  category: 'team',\n  role: 'body',\n  description: 'A heading and a grid of people with photo, name, role and a short bio.',\n  schema,\n  defaults: {\n    eyebrow: 'Name a topic',\n    title: 'Say who the people are',\n    description: 'Say in one line what the team stands for.',\n    members: [\n      { name: 'Name a person', role: 'Their role and focus', bio: 'Say what they do and what they care about, in a line', photo: { src: '', alt: 'A portrait of the person' } },\n      { name: 'Name a person', role: 'Their role and focus', bio: 'Say what they do, in one line', photo: { src: '', alt: 'A portrait of the person' } },\n      { name: 'Name a person', role: 'Their role', bio: 'Say what they do, in a short line', photo: { src: '', alt: 'A portrait of the person' } },\n      { name: 'Name a person', role: 'Their role', bio: 'Say what they do, in one line', photo: { src: '', alt: 'A portrait of the person' } },\n    ],\n  },\n});\n"
    },
    {
      "path": "src/blocks/team-grid/index.tsx",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/team-grid/index.tsx",
      "content": "import { useId } from 'react';\nimport { Media, Text, withHeadingLevel } from '../../editing';\nimport { Container, Section, SectionHeader, usePictureSlots } from '../_shared/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 TeamGrid({ props }: BlockProps<Props>) {\n  const id = useId();\n  const slots = usePictureSlots();\n  // Photos draw only when every person has one (a row never mixes faces and grey boxes); without them each person is a text card\n  // under a rule. While editing and in the directory the slots stay.\n  const photos = slots || props.members.every((m) => m.photo.src);\n  return (\n    <Section labelledBy={id}>\n      <Container>\n        <SectionHeader id={id} eyebrow={props.eyebrow} title={props.title} description={props.description} />\n        {/* Three or six people fill rows of three; one or two keep two columns at the width of a row of three (two teachers, not two\n            cards and two holes); any other count keeps rows of four, so a full row never ends in an empty column. */}\n        <ul className={cn('mt-14 grid grid-cols-1 gap-x-6 gap-y-12 @md:grid-cols-2', props.members.length % 3 === 0 ? '@4xl:grid-cols-3 @4xl:gap-x-8' : props.members.length <= 2 ? '@4xl:max-w-3xl @4xl:gap-x-8' : '@4xl:grid-cols-4')}>\n          {props.members.map((m, i) => (\n            <li key={i} className={photos ? undefined : 'border-t border-kh-line pt-5'}>\n              {photos && <Media path={['members', i, 'photo']} value={m.photo} ratio=\"1 / 1\" className=\"rounded-kh-lg border border-kh-line\" />}\n              <Text path={['members', i, 'name']} value={m.name} as=\"h3\" className={cn('text-kh-heading font-semibold', photos && 'mt-5')} />\n              <Text path={['members', i, 'role']} value={m.role} as=\"p\" className=\"text-kh-small text-kh-accent-ink\" />\n              <Text path={['members', i, 'bio']} value={m.bio} as=\"p\" multiline className=\"mt-2 whitespace-pre-line text-kh-small text-kh-muted\" />\n            </li>\n          ))}\n        </ul>\n      </Container>\n    </Section>\n  );\n}\n\nexport default withHeadingLevel(TeamGrid);\n"
    }
  ]
}
