{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"aurora","type":"registry:ui","title":"Aurora","description":"Soft blurred color blobs that drift slowly in two layers, like warm northern lights.","dependencies":["motion"],"registryDependencies":["https://ui.mekaigames.com/r/theme.json"],"files":[{"path":"components/ui/aurora.tsx","type":"registry:ui","content":"\"use client\";\n\nimport { motion, useReducedMotion } from \"motion/react\";\n\ntype AuroraProps = {\n  /** Three hex colors, used from the back layer to the front. */\n  colors?: [string, string, string];\n  /** Drift speed multiplier. */\n  speed?: number;\n  /** Blur radius of the back layer, in pixels. The front layer uses a little less. */\n  blur?: number;\n  /** Overall opacity, from 0 to 1. */\n  opacity?: number;\n  className?: string;\n};\n\ntype Blob = {\n  /** Index into colors. */\n  c: number;\n  /** Box in percent of the parent. */\n  left: number;\n  top: number;\n  w: number;\n  h: number;\n  /** Drift path in percent of the blob's own size, scale and tilt keyframes, loop length in seconds. */\n  x: number[];\n  y: number[];\n  scale: number[];\n  rotate: number[];\n  duration: number;\n  front?: boolean;\n};\n\n// Back layer: wide, slow pools of color. Front layer: thinner ribbons that tilt like curtains of light.\nconst BLOBS: Blob[] = [\n  { c: 0, left: -12, top: -20, w: 72, h: 66, x: [0, 18, -4, 0], y: [0, 12, 24, 0], scale: [1, 1.16, 0.94, 1], rotate: [0, 0, 0, 0], duration: 28 },\n  { c: 1, left: 46, top: -14, w: 58, h: 56, x: [0, -16, 8, 0], y: [0, 20, 4, 0], scale: [1, 0.9, 1.12, 1], rotate: [0, 0, 0, 0], duration: 24 },\n  { c: 2, left: 18, top: 42, w: 64, h: 60, x: [0, 14, -12, 0], y: [0, -16, -6, 0], scale: [1.05, 0.94, 1.14, 1.05], rotate: [0, 0, 0, 0], duration: 32 },\n  { c: 0, left: 52, top: 30, w: 70, h: 22, x: [0, -22, -6, 0], y: [0, -18, 14, 0], scale: [1, 1.12, 0.96, 1], rotate: [-14, -4, -18, -14], duration: 21, front: true },\n  { c: 1, left: -6, top: 22, w: 66, h: 18, x: [0, 18, 28, 0], y: [0, 22, -8, 0], scale: [0.95, 1.08, 1, 0.95], rotate: [10, 18, 4, 10], duration: 19, front: true },\n  { c: 2, left: 28, top: 4, w: 48, h: 16, x: [0, 24, -18, 0], y: [0, 30, 10, 0], scale: [1, 0.86, 1.1, 1], rotate: [-6, 6, -2, -6], duration: 17, front: true },\n];\n\nconst pct = (values: number[]) => values.map((v) => `${v}%`);\n\n/** Soft blurred color blobs drifting slowly in two layers. Fills its nearest positioned parent. */\nexport function Aurora({\n  colors = [\"#ff784f\", \"#ffc24a\", \"#e2552b\"],\n  speed = 1,\n  blur = 70,\n  opacity = 0.6,\n  className = \"\",\n}: AuroraProps) {\n  const reduce = useReducedMotion();\n  const pace = Math.max(speed, 0.05);\n\n  return (\n    <div\n      aria-hidden=\"true\"\n      className={`pointer-events-none absolute inset-0 isolate overflow-hidden ${className}`}\n      style={{ opacity: Math.min(1, Math.max(0, opacity)) }}\n    >\n      {BLOBS.map((b, i) => {\n        const color = colors[b.c % colors.length] ?? \"#ff784f\";\n        return (\n          <motion.div\n            key={i}\n            className=\"absolute rounded-full will-change-transform\"\n            style={{\n              left: `${b.left}%`,\n              top: `${b.top}%`,\n              width: `${b.w}%`,\n              height: `${b.h}%`,\n              background: `radial-gradient(closest-side, ${color}, transparent)`,\n              filter: `blur(${Math.max(0, b.front ? blur * 0.55 : blur)}px)`,\n              mixBlendMode: b.front ? \"screen\" : \"normal\",\n              opacity: b.front ? 0.75 : 1,\n              rotate: b.rotate[0],\n              scale: b.scale[0],\n            }}\n            animate={reduce ? undefined : { x: pct(b.x), y: pct(b.y), scale: b.scale, rotate: b.rotate }}\n            transition={{ duration: b.duration / pace, repeat: Infinity, ease: \"easeInOut\" }}\n          />\n        );\n      })}\n    </div>\n  );\n}\n"}]}