{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "docs-examples",
  "type": "registry:block",
  "title": "Docs, examples",
  "description": "Named example groups (Variants, Sizes, States, With icon, Composition), each a stage (live demo or image) with optional code beneath.",
  "categories": [
    "docs"
  ],
  "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-a-docs.json"
  ],
  "files": [
    {
      "path": "src/blocks/docs-examples/spec.ts",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/docs-examples/spec.ts",
      "content": "import { z } from 'zod';\nimport { defineSpec, media, t } from '../_shared/schema';\n\nconst schema = z.object({\n  title: t(60),\n  description: t(200),\n  groups: z.array(z.object({\n    title: t(40),\n    description: t(200),\n    preview: media.optional(),\n    demo: t(80).optional(),\n    code: t(2400), // a demo's whole source, imports included\n  })).min(1).max(8),\n});\n\nexport const spec = defineSpec({\n  type: 'docs-examples',\n  aliases: ['docs/examples'],\n  name: 'Docs, examples',\n  category: 'docs',\n  role: 'body',\n  description: 'Named example groups (Variants, Sizes, States, With icon, Composition), each a stage (live demo or image) with optional code beneath.',\n  schema,\n  defaults: {\n    title: 'Name the set',\n    description: 'Say what each group changes, in one line',\n    groups: [\n      {\n        title: 'First group',\n        description: 'Say what this group shows and when to use it',\n        preview: { src: '', alt: 'Show the first group in use' },\n        demo: 'button-variants',\n        code: '<Component>First</Component>\\n<Component option=\"second\">Second</Component>\\n<Component option=\"third\">Third</Component>',\n      },\n      {\n        title: 'Second group',\n        description: 'Say what this group shows and when to use it',\n        preview: { src: '', alt: 'Show the second group in use' },\n        demo: 'button-sizes',\n        code: '<Component size=\"a\">First</Component>\\n<Component size=\"b\">Second</Component>\\n<Component size=\"c\">Third</Component>',\n      },\n      {\n        title: 'Third group',\n        description: 'Say what this group shows, when to use it and what to watch for',\n        preview: { src: '', alt: 'Show the third group in use' },\n        demo: 'button-states',\n        code: '',\n      },\n    ],\n  },\n});\n"
    },
    {
      "path": "src/blocks/docs-examples/index.tsx",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/docs-examples/index.tsx",
      "content": "import { useId } from 'react';\nimport { Text, withHeadingLevel } from '../../editing';\nimport { Container, Opt, Section, SectionHeader, useEditing } from '../_shared/kit';\nimport { CodePanel, Stage } from '../_shared/a-docs-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 DocsExamples({ props }: BlockProps<Props>) {\n  const id = useId();\n  const editing = useEditing();\n  return (\n    <Section labelledBy={id} className=\"py-10 @3xl:py-14\">\n      <Container>\n        <SectionHeader id={id} title={props.title} description={props.description} />\n        <ul className=\"mt-10 space-y-12\">\n          {props.groups.map((g, i) => (\n            <li key={i}>\n              <Text path={['groups', i, 'title']} value={g.title} as=\"h3\" className=\"text-kh-heading font-semibold\" />\n              <Opt path={['groups', i, 'description']} value={g.description} className=\"mt-1.5 max-w-kh-prose text-kh-small text-kh-muted\" placeholder=\"Description\" />\n              <div className=\"mt-5 overflow-hidden rounded-kh-xl border border-kh-line bg-kh-surface\">\n                <Stage demoPath={['groups', i, 'demo']} demo={g.demo} mediaPath={['groups', i, 'preview']} media={g.preview} ratio=\"16 / 6\" />\n                {(g.code || editing) && (\n                  <div className=\"border-t border-kh-line\">\n                    <CodePanel path={['groups', i, 'code']} code={g.code} flush />\n                  </div>\n                )}\n              </div>\n            </li>\n          ))}\n        </ul>\n      </Container>\n    </Section>\n  );\n}\n\nexport default withHeadingLevel(DocsExamples);\n"
    }
  ]
}
