{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "error-status",
  "type": "registry:block",
  "title": "Error, server error",
  "description": "A 500-style page for when it is our fault: plain apology, retry and status actions, and a side panel with a copyable reference id for support plus up to three things to try.",
  "categories": [
    "error"
  ],
  "dependencies": [
    "lucide-react@^1.49.0",
    "zod@^4.6.5"
  ],
  "registryDependencies": [
    "https://ui.klarhimmel.com/r/block-kit.json",
    "https://ui.klarhimmel.com/r/copy-button.json",
    "https://ui.klarhimmel.com/r/editing.json"
  ],
  "files": [
    {
      "path": "src/blocks/error-status/spec.ts",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/error-status/spec.ts",
      "content": "import { z } from 'zod';\nimport { defineSpec, link, t } from '../_shared/schema';\n\nconst schema = z.object({\n  code: t(20),\n  title: t(100),\n  description: t(300),\n  primary: link,\n  secondary: link,\n  referenceLabel: t(40),\n  reference: t(40),\n  tipsTitle: t(60),\n  tips: z.array(t(120)).max(3),\n});\n\nexport const spec = defineSpec({\n  type: 'error-status',\n  aliases: ['error/status'],\n  name: 'Error, server error',\n  category: 'error',\n  role: 'body',\n  description: 'A 500-style page for when it is our fault: plain apology, retry and status actions, and a side panel with a copyable reference id for support plus up to three things to try.',\n  schema,\n  defaults: {\n    code: '500',\n    title: 'Say what went wrong in plain words',\n    description: 'Say in two sentences that you know and are fixing it, that their data is safe, and what to try.',\n    primary: { label: 'Main action', href: '#' },\n    secondary: { label: 'Second action', href: '/status' },\n    referenceLabel: 'Name the reference code',\n    reference: 'AAA-0000-0000',\n    tipsTitle: 'Say what to try',\n    tips: ['Say a first thing to try', 'Say a second thing to try', 'Say what to quote if they write to you'],\n  },\n});\n"
    },
    {
      "path": "src/blocks/error-status/index.tsx",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/error-status/index.tsx",
      "content": "import { useId } from 'react';\nimport { Check } from 'lucide-react';\nimport { Text, withHeadingLevel } from '../../editing';\nimport { CopyButton } from '../../ui/copy-button';\nimport { ActionLink, 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 ErrorStatus({ props }: BlockProps<Props>) {\n  const id = useId();\n  const editing = useEditing();\n  return (\n    <Section labelledBy={id} className=\"py-20 @3xl:py-28\">\n      <Container className=\"grid gap-12 @4xl:grid-cols-[1.2fr_1fr] @4xl:gap-16\">\n        <div>\n          <Text path={['code']} value={props.code} as=\"p\" className=\"font-kh-mono text-kh-small font-medium tracking-widest text-kh-accent-ink\" />\n          <div id={id}>\n            <Text path={['title']} value={props.title} as=\"h1\" className=\"mt-3 text-kh-title font-semibold\" />\n          </div>\n          <Opt path={['description']} value={props.description} multiline className=\"mt-5 max-w-kh-lead text-kh-lead text-kh-muted\" placeholder=\"Description\" />\n          <div className=\"mt-8 flex flex-wrap gap-3\">\n            <ActionLink path={['primary']} value={props.primary} />\n            <ActionLink path={['secondary']} value={props.secondary} variant=\"secondary\" />\n          </div>\n        </div>\n        <aside className=\"rounded-kh-xl border border-kh-line bg-kh-surface p-7\">\n          <Text path={['referenceLabel']} value={props.referenceLabel} as=\"p\" className=\"text-kh-small font-medium text-kh-muted\" />\n          <div className=\"mt-2 flex items-center justify-between gap-3 rounded-kh-lg border border-kh-line-strong bg-kh-canvas py-1.5 pl-4 pr-2\">\n            <Text path={['reference']} value={props.reference} as=\"code\" className=\"min-w-0 break-all font-kh-mono text-kh-body\" />\n            <CopyButton value={props.reference} label=\"Copy reference\" />\n          </div>\n          {(props.tips.length > 0 || editing) && (\n            <>\n              <Text path={['tipsTitle']} value={props.tipsTitle} as=\"h2\" className=\"mt-8 text-kh-small font-medium text-kh-muted\" />\n              <ul className=\"mt-3 space-y-3\">\n                {props.tips.map((tip, i) => (\n                  <li key={i} className=\"flex items-start gap-3 text-kh-small\">\n                    <Check aria-hidden className=\"mt-0.5 size-4 shrink-0 text-kh-accent-ink\" strokeWidth={2.25} />\n                    <Text path={['tips', i]} value={tip} as=\"span\" />\n                  </li>\n                ))}\n              </ul>\n            </>\n          )}\n        </aside>\n      </Container>\n    </Section>\n  );\n}\n\nexport default withHeadingLevel(ErrorStatus);\n"
    }
  ]
}
