{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "content-legal",
  "type": "registry:block",
  "title": "Content, policy document",
  "description": "A policy or terms page: title and last-updated line, a sticky contents list that jumps to numbered sections (plain anchors, no script), and the sections themselves.",
  "categories": [
    "content"
  ],
  "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-d-chrome.json",
    "https://ui.klarhimmel.com/r/utils.json"
  ],
  "files": [
    {
      "path": "src/blocks/content-legal/spec.ts",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/content-legal/spec.ts",
      "content": "import { z } from 'zod';\nimport { defineSpec, t, req } from '../_shared/schema';\n\nconst schema = z.object({\n  eyebrow: t(60),\n  title: t(100),\n  updated: t(60),\n  intro: t(500),\n  contentsLabel: t(40),\n  sections: z.array(z.object({ title: req(80), body: t(1200) })).min(2).max(8),\n});\n\nexport const spec = defineSpec({\n  type: 'content-legal',\n  aliases: ['content/legal'],\n  name: 'Content, policy document',\n  category: 'content',\n  role: 'body',\n  description: 'A policy or terms page: title and last-updated line, a sticky contents list that jumps to numbered sections (plain anchors, no script), and the sections themselves.',\n  schema,\n  defaults: {\n    eyebrow: 'Name the kind',\n    title: 'Name the document',\n    updated: 'Last updated 0 Month 0000',\n    intro: 'Say what this document covers, who it is for and how it is meant to be read. Keep it plain and short.',\n    contentsLabel: 'On this page',\n    sections: [\n      { title: 'Name the first topic', body: 'Say what is collected or covered under the first topic, in two sentences or so. Name the things that are never collected or stored.' },\n      { title: 'Name the second topic', body: 'Say why it is collected or covered, and which rules require it, in one or two sentences.' },\n      { title: 'Name the third topic', body: 'Say how long each kind of thing is kept, what the rules say about it and when it is deleted.' },\n      { title: 'Name the fourth topic', body: 'Say who else sees it, where they are based and what binds them. Name what is never sold or shared.' },\n      { title: 'Name the fifth', body: 'Say what the reader can ask for, where to write and how quickly you answer. Keep it short and clear.' },\n    ],\n  },\n});\n"
    },
    {
      "path": "src/blocks/content-legal/index.tsx",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/content-legal/index.tsx",
      "content": "import { useId } from 'react';\nimport { Text, withHeadingLevel } from '../../editing';\nimport { Container, Eyebrow, Opt, Section } from '../_shared/kit';\nimport { FOCUS } from '../_shared/d-chrome-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 ContentLegal({ props }: BlockProps<Props>) {\n  const id = useId();\n  const base = id.replace(/[^a-zA-Z0-9]/g, '');\n  const tocId = `${base}-toc`;\n  return (\n    <Section labelledBy={id}>\n      <Container className=\"grid gap-12 @4xl:grid-cols-[14rem_1fr] @4xl:gap-20\">\n        <nav aria-labelledby={tocId} className=\"@4xl:sticky @4xl:top-8 @4xl:self-start\">\n          <p id={tocId} className=\"text-kh-small font-medium text-kh-muted\">\n            <Text path={['contentsLabel']} value={props.contentsLabel} as=\"span\" />\n          </p>\n          <ol className=\"mt-3 border-l border-kh-line\">\n            {props.sections.map((s, i) => (\n              <li key={i}>\n                <a href={`#${base}-s${i}`} className={cn('-ml-px flex min-h-9 items-center gap-2 border-l border-transparent py-1 pl-4 text-kh-small text-kh-muted hover:border-kh-ink hover:text-kh-ink', FOCUS)}>\n                  <span className=\"tabular-nums\">{i + 1}.</span>\n                  <span className=\"min-w-0 [overflow-wrap:anywhere]\">{s.title}</span>\n                </a>\n              </li>\n            ))}\n          </ol>\n        </nav>\n        <div className=\"max-w-kh-prose\">\n          <Eyebrow path={['eyebrow']} value={props.eyebrow} />\n          <div id={id}>\n            <Text path={['title']} value={props.title} as=\"h1\" className=\"text-kh-title font-semibold\" />\n          </div>\n          <Opt path={['updated']} value={props.updated} className=\"mt-3 text-kh-small text-kh-muted\" placeholder=\"Last updated\" />\n          <Opt path={['intro']} value={props.intro} multiline className=\"mt-6 text-kh-lead text-kh-muted\" placeholder=\"Intro\" />\n          <div className=\"mt-12 space-y-12\">\n            {props.sections.map((s, i) => (\n              <section key={i} id={`${base}-s${i}`} aria-labelledby={`${base}-h${i}`} className=\"scroll-mt-8 border-t border-kh-line pt-8\">\n                <h2 id={`${base}-h${i}`} className=\"flex gap-3 text-kh-heading font-semibold\">\n                  <span aria-hidden className=\"tabular-nums text-kh-muted\">{i + 1}.</span>\n                  <Text path={['sections', i, 'title']} value={s.title} as=\"span\" />\n                </h2>\n                <Text path={['sections', i, 'body']} value={s.body} as=\"p\" multiline className=\"mt-4 text-kh-body leading-relaxed text-kh-ink-2\" />\n              </section>\n            ))}\n          </div>\n        </div>\n      </Container>\n    </Section>\n  );\n}\n\nexport default withHeadingLevel(ContentLegal);\n"
    }
  ]
}
