{
  "name": "grid-pulse-default",
  "type": "registry:ui",
  "tier": "free",
  "dependencies": [
    "framer-motion"
  ],
  "registryDependencies": [
    "https://www.craftui.space/r/craftui-base.json"
  ],
  "files": [
    {
      "path": "components/craftui/loaders/grid-pulse/default.tsx",
      "content": "'use client';\n\nimport { motion } from 'motion/react';\n\ninterface GridPulseProps {\n  width?: number;\n  height?: number;\n  color?: string;\n  dotSize?: number;\n  isAnimating?: boolean;\n  duration?: number;\n  ease?: any;\n  gridSize?: number;\n}\n\nexport function GridPulse({\n  width = 100,\n  height = 100,\n  color = 'currentColor',\n  dotSize = 16,\n  isAnimating = true,\n  duration = 1.6,\n  ease = 'easeInOut',\n  gridSize = 3,\n}: GridPulseProps) {\n  const n = Math.max(2, Math.min(6, gridSize));\n  const stride = 100 / (n + 1);\n  const dotRadius = Math.min(dotSize, stride * 0.85) / 2;\n\n  // Diagonal wave: top-left fires first, bottom-right last\n  const maxDiag = (n - 1) * 2;\n  const diagStep = maxDiag > 0 ? (duration * 0.55) / maxDiag : 0;\n\n  return (\n    <svg\n      width={width}\n      height={height}\n      viewBox=\"0 0 100 100\"\n      fill=\"none\"\n      xmlns=\"http://www.w3.org/2000/svg\"\n      aria-label=\"Loading\"\n      role=\"img\"\n    >\n      {Array.from({ length: n }).map((_, row) =>\n        Array.from({ length: n }).map((_, col) => {\n          const cx = stride + col * stride;\n          const cy = stride + row * stride;\n          const diagonalDelay = (row + col) * diagStep;\n\n          return (\n            <motion.circle\n              key={`${row}-${col}`}\n              cx={cx}\n              cy={cy}\n              fill={color}\n              initial={{ r: dotRadius * 0.4, opacity: 0.15 }}\n              animate={{\n                r: [dotRadius * 0.4, dotRadius, dotRadius * 0.4],\n                opacity: [0.15, 1, 0.15],\n              }}\n              transition={{\n                duration: duration,\n                repeat: isAnimating ? Infinity : 0,\n                delay: diagonalDelay,\n                ease: ease,\n                times: [0, 0.35, 1],\n              }}\n            />\n          );\n        })\n      )}\n    </svg>\n  );\n}\n",
      "type": "registry:ui",
      "target": "~/components/craftui/loaders/grid-pulse/default.tsx"
    }
  ],
  "meta": {
    "displayName": "Grid Pulse - Grid Pulse",
    "description": "Nine dots arranged in a 3×3 grid light up and fade in a rolling diagonal wave, top-left to bottom-right",
    "category": "loaders",
    "tags": [
      "grid",
      "dots",
      "pulse",
      "wave",
      "diagonal",
      "matrix"
    ],
    "animationType": "loop"
  }
}