{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "error-links",
  "type": "registry:block",
  "title": "Error, with links",
  "description": "A not-found or error page that does not leave people stranded: code, plain explanation, one primary action, and a short list of described places to go next. Left-aligned, two columns when wide.",
  "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/button.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/error-links/spec.ts",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/error-links/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  linksTitle: t(60),\n  links: z.array(z.object({ label: t(60), description: t(120), href: t(300) })).min(1).max(5),\n});\n\nexport const spec = defineSpec({\n  type: 'error-links',\n  aliases: ['error/links'],\n  name: 'Error, with links',\n  category: 'error',\n  role: 'body',\n  description: 'A not-found or error page that does not leave people stranded: code, plain explanation, one primary action, and a short list of described places to go next. Left-aligned, two columns when wide.',\n  schema,\n  defaults: {\n    code: '404',\n    title: 'Say what went wrong in plain words',\n    description: 'Say in two sentences what likely happened and that nothing is wrong on their side, then point to the pages below.',\n    primary: { label: 'Main action', href: '/' },\n    linksTitle: 'Name the pages below',\n    links: [\n      { label: 'First page', description: 'Say what they find there, in a line', href: '/rooms' },\n      { label: 'Second page', description: 'Say what they find there, in a line', href: '/book' },\n      { label: 'Third page', description: 'Say what they find there, in a line', href: '/directions' },\n      { label: 'Fourth page', description: 'Say what they find there, in a line', href: '/contact' },\n    ],\n  },\n});\n"
    },
    {
      "path": "src/blocks/error-links/index.tsx",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/error-links/index.tsx",
      "content": "import { useId } from 'react';\nimport { ArrowRight } from 'lucide-react';\nimport { Text, withHeadingLevel } from '../../editing';\nimport { safeHref } from '../../ui/button';\nimport { ActionLink, Container, 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 ErrorLinks({ props }: BlockProps<Props>) {\n  const id = useId();\n  const listId = useId();\n  return (\n    <Section labelledBy={id} className=\"py-20 @3xl:py-28\">\n      <Container className=\"grid gap-14 @4xl:grid-cols-[1.1fr_1fr] @4xl:items-center @4xl:gap-20\">\n        <div>\n          <Text path={['code']} value={props.code} as=\"p\" className=\"text-kh-display font-semibold tabular-nums text-kh-accent-ink\" />\n          <div id={id}>\n            <Text path={['title']} value={props.title} as=\"h1\" className=\"mt-4 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\">\n            <ActionLink path={['primary']} value={props.primary} />\n          </div>\n        </div>\n        <nav aria-labelledby={listId}>\n          <div id={listId}>\n            <Text path={['linksTitle']} value={props.linksTitle} as=\"h2\" className=\"text-kh-small font-medium text-kh-muted\" />\n          </div>\n          <ul className=\"mt-4 divide-y divide-kh-line border-y border-kh-line\">\n            {props.links.map((l, i) => (\n              <li key={i}>\n                <a href={safeHref(l.href)} className={cn('group flex min-h-16 items-center justify-between gap-6 rounded-kh py-4', FOCUS)}>\n                  <span className=\"min-w-0\">\n                    <Text path={['links', i, 'label']} value={l.label} as=\"span\" className=\"block text-kh-body font-medium\" />\n                    <Text path={['links', i, 'description']} value={l.description} as=\"span\" className=\"block text-kh-small text-kh-muted\" />\n                  </span>\n                  <ArrowRight aria-hidden className=\"size-5 shrink-0 text-kh-muted transition-transform duration-(--kh-dur) group-hover:translate-x-1 group-hover:text-kh-ink\" />\n                </a>\n              </li>\n            ))}\n          </ul>\n        </nav>\n      </Container>\n    </Section>\n  );\n}\n\nexport default withHeadingLevel(ErrorLinks);\n"
    }
  ]
}
