{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "sad-mac-404",
  "title": "Sad Mac 404",
  "description": "Full-page not-found screen with a pure-SVG Sad Mac, hex error codes and a Restart link home. Dark and light variants.",
  "registryDependencies": [
    "https://nostalgia-ui.com/r/nostalgia-theme.json",
    "https://nostalgia-ui.com/r/retro-button.json"
  ],
  "files": [
    {
      "path": "registry/new-york/blocks/sad-mac-404.tsx",
      "content": "import * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { RetroButton } from \"@/registry/new-york/ui/retro-button\"\n\n/* ------------------------------------------------------------------ */\n/*  Sad Mac artwork — pixel-grid SVG, no image assets                  */\n/* ------------------------------------------------------------------ */\n\nfunction SadMacArt({ className }: { className?: string }) {\n  return (\n    <svg\n      viewBox=\"0 0 24 32\"\n      width={96}\n      height={128}\n      className={className}\n      shapeRendering=\"crispEdges\"\n      aria-hidden\n    >\n      {/* Case */}\n      <rect x=\"0.5\" y=\"0.5\" width=\"23\" height=\"26\" fill=\"var(--os9-white)\" stroke=\"var(--os9-black)\" />\n      {/* Screen */}\n      <rect x=\"3.5\" y=\"3.5\" width=\"17\" height=\"13\" fill=\"var(--os9-white)\" stroke=\"var(--os9-black)\" />\n      <g fill=\"var(--os9-black)\">\n        {/* X eyes */}\n        <rect x=\"7\" y=\"6\" width=\"1\" height=\"1\" />\n        <rect x=\"9\" y=\"6\" width=\"1\" height=\"1\" />\n        <rect x=\"8\" y=\"7\" width=\"1\" height=\"1\" />\n        <rect x=\"7\" y=\"8\" width=\"1\" height=\"1\" />\n        <rect x=\"9\" y=\"8\" width=\"1\" height=\"1\" />\n        <rect x=\"14\" y=\"6\" width=\"1\" height=\"1\" />\n        <rect x=\"16\" y=\"6\" width=\"1\" height=\"1\" />\n        <rect x=\"15\" y=\"7\" width=\"1\" height=\"1\" />\n        <rect x=\"14\" y=\"8\" width=\"1\" height=\"1\" />\n        <rect x=\"16\" y=\"8\" width=\"1\" height=\"1\" />\n        {/* Nose */}\n        <rect x=\"12\" y=\"7\" width=\"1\" height=\"4\" />\n        <rect x=\"11\" y=\"10\" width=\"1\" height=\"1\" />\n        {/* Frown */}\n        <rect x=\"9\" y=\"12\" width=\"6\" height=\"1\" />\n        <rect x=\"8\" y=\"13\" width=\"1\" height=\"1\" />\n        <rect x=\"15\" y=\"13\" width=\"1\" height=\"1\" />\n        {/* Floppy slot */}\n        <rect x=\"13\" y=\"21\" width=\"7\" height=\"1\" />\n        {/* Logo badge */}\n        <rect x=\"4\" y=\"21\" width=\"2\" height=\"2\" />\n      </g>\n      {/* Foot */}\n      <rect x=\"2.5\" y=\"26.5\" width=\"19\" height=\"4\" fill=\"var(--os9-white)\" stroke=\"var(--os9-black)\" />\n    </svg>\n  )\n}\n\n/* ------------------------------------------------------------------ */\n/*  SadMac404Block                                                     */\n/* ------------------------------------------------------------------ */\n\ninterface SadMac404BlockProps\n  extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> {\n  /** Error code shown on the second line (zero-padded to 8 characters). Defaults to 404. */\n  code?: string | number\n  /** Where the Restart button links to. Defaults to \"/\". */\n  homeHref?: string\n  /** \"dark\" is the classic black screen; \"light\" sits on a platinum background. */\n  variant?: \"dark\" | \"light\"\n  /** Short explanation below the codes. Pass `null` to hide. */\n  message?: React.ReactNode\n  /** Label for the home link. Defaults to \"Restart\". */\n  restartLabel?: string\n}\n\nfunction toHexLine(value: string | number) {\n  return String(value).toUpperCase().padStart(8, \"0\").slice(-8)\n}\n\nconst SadMac404Block = React.forwardRef<HTMLDivElement, SadMac404BlockProps>(\n  function SadMac404Block(\n    {\n      code = 404,\n      homeHref = \"/\",\n      variant = \"dark\",\n      message = \"The page you were looking for could not be found.\",\n      restartLabel = \"Restart\",\n      className,\n      ...props\n    },\n    ref\n  ) {\n    const dark = variant === \"dark\"\n    return (\n      <div\n        ref={ref}\n        className={cn(\n          \"flex min-h-dvh w-full flex-col items-center justify-center gap-6 px-6 py-10 text-center\",\n          dark ? \"bg-os9-black text-os9-white\" : \"bg-os9-gray-200 text-os9-black\",\n          className\n        )}\n        {...props}\n      >\n        <SadMacArt className=\"h-auto w-[72px] sm:w-[96px]\" />\n\n        <h1 className=\"sr-only\">Page not found (error {String(code)})</h1>\n\n        <div\n          aria-hidden\n          className=\"font-[family-name:var(--os9-font-heading)] text-[14px] leading-[1.4] tracking-[2px] tabular-nums\"\n        >\n          <div>0000000F</div>\n          <div>{toHexLine(code)}</div>\n        </div>\n\n        {message !== null && (\n          <p\n            className={cn(\n              \"max-w-[320px] font-[family-name:var(--os9-font-sans)] text-[11px] leading-[1.5]\",\n              dark ? \"text-os9-gray-600\" : \"text-os9-gray-800\"\n            )}\n          >\n            {message}\n          </p>\n        )}\n\n        <RetroButton render={<a href={homeHref} />} className=\"min-w-[90px] no-underline\">\n          {restartLabel}\n        </RetroButton>\n      </div>\n    )\n  }\n)\nSadMac404Block.displayName = \"SadMac404Block\"\n\nexport { SadMac404Block }\nexport type { SadMac404BlockProps }\n",
      "type": "registry:component"
    }
  ],
  "type": "registry:block"
}