{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "docs-anatomy",
  "type": "registry:block",
  "title": "Docs, anatomy",
  "description": "A diagram or live demo beside the part tree and part list of a compound component.",
  "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-anatomy/spec.ts",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/docs-anatomy/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  preview: media.optional(),\n  demo: t(80).optional(),\n  tree: t(600),\n  parts: z.array(z.object({ name: t(40), description: t(160) })).max(12),\n});\n\nexport const spec = defineSpec({\n  type: 'docs-anatomy',\n  aliases: ['docs/anatomy'],\n  name: 'Docs, anatomy',\n  category: 'docs',\n  role: 'body',\n  description: 'A diagram or live demo beside the part tree and part list of a compound component.',\n  schema,\n  defaults: {\n    title: 'Name this part',\n    description: 'Say in a sentence how the parts fit together.',\n    preview: { src: '', alt: 'Show the parts of the component, each one labelled' },\n    demo: 'card-basic',\n    tree: '<Root>\\n  <Header>\\n    <Title />\\n    <Description />\\n  </Header>\\n  <Content />\\n  <Footer />\\n</Root>',\n    parts: [\n      { name: 'First part', description: 'Say what this part is for and how it behaves' },\n      { name: 'Second part', description: 'Say what this part is for and how it behaves' },\n      { name: 'Third part', description: 'Say what this part is for and how it behaves' },\n      { name: 'Fourth part', description: 'Say what this part is for, briefly' },\n      { name: 'Fifth part', description: 'Say what this part holds' },\n      { name: 'Sixth part', description: 'Say what this part is for' },\n    ],\n  },\n});\n"
    },
    {
      "path": "src/blocks/docs-anatomy/index.tsx",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/docs-anatomy/index.tsx",
      "content": "import { useId } from 'react';\nimport { Text, withHeadingLevel } from '../../editing';\nimport { Container, 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 DocsAnatomy({ 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        <div className=\"mt-8 grid items-start gap-6 @3xl:grid-cols-2\">\n          <div className=\"overflow-hidden rounded-kh-xl border border-kh-line\">\n            <Stage demoPath={['demo']} demo={props.demo} mediaPath={['preview']} media={props.preview} ratio=\"4 / 3\" />\n          </div>\n          <div className=\"space-y-6\">\n            {(props.tree || editing) && <CodePanel path={['tree']} code={props.tree} />}\n            {(props.parts.length > 0 || editing) && (\n              <ul className=\"divide-y divide-kh-line rounded-kh-lg border border-kh-line bg-kh-surface\">\n                {props.parts.map((p, i) => (\n                  <li key={i} className=\"grid gap-x-4 gap-y-1 px-4 py-3 @md:grid-cols-[10rem_1fr]\">\n                    <Text path={['parts', i, 'name']} value={p.name} as=\"code\" className=\"self-start font-kh-mono text-kh-small font-medium\" />\n                    <Text path={['parts', i, 'description']} value={p.description} as=\"span\" className=\"text-kh-small text-kh-muted\" />\n                  </li>\n                ))}\n              </ul>\n            )}\n          </div>\n        </div>\n      </Container>\n    </Section>\n  );\n}\n\nexport default withHeadingLevel(DocsAnatomy);\n"
    }
  ]
}
