{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "testimonial-quote",
  "type": "registry:block",
  "title": "Testimonial, quote",
  "description": "One large pull quote with a name, a role, a company and a portrait; a quote alone (a press line) shows without them.",
  "categories": [
    "testimonials"
  ],
  "dependencies": [
    "lucide-react@^1.49.0",
    "zod@^4.6.5"
  ],
  "registryDependencies": [
    "https://ui.klarhimmel.com/r/block-kit.json",
    "https://ui.klarhimmel.com/r/editing.json"
  ],
  "files": [
    {
      "path": "src/blocks/testimonial-quote/spec.ts",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/testimonial-quote/spec.ts",
      "content": "import { z } from 'zod';\nimport { defineSpec, media, t } from '../_shared/schema';\n\nconst schema = z.object({\n  quote: t(400),\n  name: t(60),\n  role: t(80),\n  company: t(60),\n  photo: media,\n});\n\nexport const spec = defineSpec({\n  type: 'testimonial-quote',\n  aliases: ['testimonials/quote'],\n  name: 'Testimonial, quote',\n  category: 'testimonials',\n  role: 'body',\n  description: 'One large pull quote with a name, a role, a company and a portrait; a quote alone (a press line) shows without them.',\n  schema,\n  defaults: {\n    quote: 'Quote a customer, in their words, on the result they got, what changed for them and why they would say it again.',\n    name: 'Name a person',\n    role: 'Their job title',\n    company: 'Their company',\n    photo: { src: '', alt: 'Portrait of the person quoted' },\n  },\n});\n"
    },
    {
      "path": "src/blocks/testimonial-quote/index.tsx",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/testimonial-quote/index.tsx",
      "content": "import { useId } from 'react';\nimport { Quote } from 'lucide-react';\nimport { Media, Text, withHeadingLevel } from '../../editing';\nimport { Container, 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 TestimonialQuote({ props }: BlockProps<Props>) {\n  const nameId = useId();\n  const editing = useEditing();\n  // A quote taken from a page (a press line) may have no person: no empty portrait, no empty caption (launcher 18:57). While editing, both slots stay.\n  const showPhoto = Boolean(props.photo?.src?.trim()) || editing;\n  const showCaption = showPhoto || [props.name, props.role, props.company].some((x) => x?.trim()) || editing;\n  return (\n    <Section labelledBy={showCaption ? nameId : undefined}>\n      <Container width=\"narrow\">\n        <figure className=\"text-center\">\n          <Quote aria-hidden strokeWidth={1.5} className=\"mx-auto size-8 text-kh-accent-ink\" />\n          <blockquote className=\"mt-8\">\n            <Text path={['quote']} value={props.quote} as=\"p\" multiline className=\"text-kh-lead font-medium leading-snug text-kh-ink @3xl:text-kh-title @3xl:leading-tight\" />\n          </blockquote>\n          {showCaption && <figcaption className=\"mt-10 flex flex-col items-center gap-4\">\n            {showPhoto && <div className=\"size-16 overflow-hidden rounded-kh-pill border border-kh-line\">\n              <Media path={['photo']} value={props.photo} ratio=\"1 / 1\" />\n            </div>}\n            <span className=\"block\">\n              <span id={nameId} className=\"block\">\n                <Text path={['name']} value={props.name} as=\"span\" className=\"text-kh-body font-semibold\" />\n              </span>\n              <span className=\"mt-0.5 flex flex-wrap items-center justify-center gap-x-2 text-kh-small text-kh-muted\">\n                <Text path={['role']} value={props.role} as=\"span\" />\n                <Opt path={['company']} value={props.company} as=\"span\" className=\"font-medium text-kh-ink-2 before:mr-2 before:content-['/'] before:font-normal before:text-kh-line-strong\" placeholder=\"Company\" />\n              </span>\n            </span>\n          </figcaption>}\n        </figure>\n      </Container>\n    </Section>\n  );\n}\n\nexport default withHeadingLevel(TestimonialQuote);\n"
    }
  ]
}
