{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"meteors","type":"registry:ui","title":"Meteors","description":"Shooting stars streak across the container. Pure CSS, SSR-safe.","dependencies":[],"registryDependencies":[],"files":[{"path":"registry/ui/meteors.tsx","type":"registry:ui","content":"\"use client\";\n\nimport type { CSSProperties } from \"react\";\n\nconst css = `@keyframes meteor-fall{0%{transform:rotate(var(--meteor-angle)) translateX(0);opacity:1}70%{opacity:1}100%{transform:rotate(var(--meteor-angle)) translateX(-900px);opacity:0}}`;\n\nexport interface MeteorsProps {\n  count?: number;\n  color?: string;\n  /** Travel direction in degrees. */\n  angle?: number;\n  className?: string;\n}\n\n// Deterministic pseudo-random so server and client render the same meteors.\nconst rand = (i: number, salt: number) => {\n  const x = Math.sin(i * 12.9898 + salt * 78.233) * 43758.5453;\n  return x - Math.floor(x);\n};\n\nexport function Meteors({ count = 20, color = \"#e4e4e7\", angle = 215, className }: MeteorsProps) {\n  return (\n    <div\n      aria-hidden\n      className={className}\n      style={{ position: \"absolute\", inset: 0, overflow: \"hidden\", pointerEvents: \"none\" }}\n    >\n      <style href=\"meteors\" precedence=\"default\">\n        {css}\n      </style>\n      {Array.from({ length: count }, (_, i) => (\n        <span\n          key={i}\n          style={\n            {\n              \"--meteor-angle\": `${angle}deg`,\n              position: \"absolute\",\n              top: `${rand(i, 1) * 40 - 10}%`,\n              left: `${rand(i, 2) * 110}%`,\n              width: 2,\n              height: 2,\n              borderRadius: 9999,\n              background: color,\n              boxShadow: `0 0 0 1px ${color}22`,\n              animation: `meteor-fall ${3 + rand(i, 3) * 6}s linear ${rand(i, 4) * 6}s infinite`,\n              opacity: 0,\n            } as CSSProperties\n          }\n        >\n          <span\n            style={{\n              position: \"absolute\",\n              top: \"50%\",\n              left: \"100%\",\n              width: 60 + rand(i, 5) * 60,\n              height: 1,\n              transform: \"translateY(-50%)\",\n              background: `linear-gradient(90deg, ${color}, transparent)`,\n            }}\n          />\n        </span>\n      ))}\n    </div>\n  );\n}\n"}]}