{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "perspective-grid",
  "title": "Perspective Grid",
  "description": "A pointer-reactive perspective horizon grid without canvas or WebGL.",
  "registryDependencies": [
    "@rivelle/utils"
  ],
  "files": [
    {
      "path": "registry/nova/effects/perspective-grid.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\ntype PerspectiveGridProps = React.ComponentProps<\"div\"> & {\n  fade?: boolean;\n};\n\nfunction PerspectiveGrid({\n  children,\n  className,\n  fade = true,\n  onPointerLeave,\n  onPointerMove,\n  style,\n  ...props\n}: PerspectiveGridProps) {\n  return (\n    <div\n      className={cn(\n        \"relative isolate overflow-hidden rounded-[2.25rem] border border-foreground/10 bg-foreground text-background\",\n        className,\n      )}\n      data-slot=\"perspective-grid\"\n      onPointerLeave={(event) => {\n        event.currentTarget.style.setProperty(\"--grid-rx\", \"58deg\");\n        event.currentTarget.style.setProperty(\"--grid-rz\", \"0deg\");\n        onPointerLeave?.(event);\n      }}\n      onPointerMove={(event) => {\n        if (!window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches) {\n          const bounds = event.currentTarget.getBoundingClientRect();\n          const x = (event.clientX - bounds.left) / bounds.width - 0.5;\n          const y = (event.clientY - bounds.top) / bounds.height - 0.5;\n          event.currentTarget.style.setProperty(\n            \"--grid-rx\",\n            `${58 - y * 24}deg`,\n          );\n          event.currentTarget.style.setProperty(\"--grid-rz\", `${x * 16}deg`);\n        }\n        onPointerMove?.(event);\n      }}\n      style={\n        {\n          \"--grid-rx\": \"58deg\",\n          \"--grid-rz\": \"0deg\",\n          ...style,\n        } as React.CSSProperties\n      }\n      {...props}\n    >\n      <div\n        aria-hidden=\"true\"\n        className=\"absolute inset-x-[-35%] bottom-[-32%] h-[88%] origin-bottom transition-transform duration-200 ease-out will-change-transform [backface-visibility:hidden] [transform:perspective(520px)_rotateX(var(--grid-rx))_rotateZ(var(--grid-rz))] motion-reduce:transition-none\"\n        style={{\n          backgroundImage:\n            \"linear-gradient(color-mix(in oklch, var(--primary) 44%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in oklch, var(--primary) 44%, transparent) 1px, transparent 1px)\",\n          backgroundSize: \"56px 56px\",\n        }}\n      />\n      <div\n        aria-hidden=\"true\"\n        className=\"absolute bottom-[26%] left-1/2 h-px w-[70%] -translate-x-1/2 bg-primary/70 shadow-[0_0_40px_8px_color-mix(in_oklch,var(--primary)_45%,transparent)]\"\n      />\n      {fade ? (\n        <div\n          aria-hidden=\"true\"\n          className=\"absolute inset-0 bg-[radial-gradient(ellipse_at_50%_65%,transparent_5%,var(--foreground)_72%)] opacity-80\"\n        />\n      ) : null}\n      <div className=\"relative z-10\">{children}</div>\n    </div>\n  );\n}\n\nexport { PerspectiveGrid };\nexport type { PerspectiveGridProps };\n",
      "type": "registry:ui",
      "target": "@effects/perspective-grid.tsx"
    }
  ],
  "type": "registry:ui"
}