{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "infinity-track",
  "files": [
    {
      "path": "registry/components/loading-ui/infinity-track.tsx",
      "content": "import { cn } from \"@/lib/utils\";\n\nconst INFINITY_TRACK_BLOCKS = [\"█\", \"▓\", \"▒\"] as const;\n\ntype InfinityTrackProps = React.ComponentProps<\"span\"> & {\n  blocks?: readonly string[];\n  track?: string;\n};\n\nfunction InfinityTrack({\n  className,\n  blocks = INFINITY_TRACK_BLOCKS,\n  track = \"░\",\n  ...props\n}: InfinityTrackProps) {\n  const glyphs = INFINITY_TRACK_BLOCKS.map(\n    (_, index) => blocks[index] ?? INFINITY_TRACK_BLOCKS[index],\n  );\n  const gridCells = Array.from({ length: 45 }, (_, index) => {\n    const row = Math.floor(index / 9);\n    const col = index % 9;\n\n    return row === 0 || row === 4 || col === 0 || col === 4 || col === 8\n      ? track\n      : \" \";\n  });\n\n  return (\n    <>\n      <style>{`\n        @keyframes loading-ui-infinity-track {\n          0%,\n          100% {\n            transform: translate(4ch, 0);\n          }\n\n          12.5% {\n            transform: translate(0, 0);\n          }\n\n          25% {\n            transform: translate(0, 4ch);\n          }\n\n          37.5% {\n            transform: translate(4ch, 4ch);\n          }\n\n          50% {\n            transform: translate(4ch, 0);\n          }\n\n          62.5% {\n            transform: translate(8ch, 0);\n          }\n\n          75% {\n            transform: translate(8ch, 4ch);\n          }\n\n          87.5% {\n            transform: translate(4ch, 4ch);\n          }\n        }\n      `}</style>\n      <span\n        role=\"status\"\n        className={cn(\n          \"relative inline-flex h-[5ch] w-[9ch] overflow-hidden font-mono text-xl leading-none text-current select-none\",\n          className,\n        )}\n        {...props}\n      >\n        <span\n          aria-hidden=\"true\"\n          className=\"pointer-events-none absolute inset-0 grid grid-cols-9 grid-rows-5\"\n        >\n          {gridCells.map((glyph, index) => (\n            <span\n              key={index}\n              className=\"flex h-[1ch] w-[1ch] items-center justify-center\"\n            >\n              {glyph}\n            </span>\n          ))}\n        </span>\n        {glyphs.map((glyph, index) => (\n          <span\n            key={`${glyph}-${index}`}\n            aria-hidden=\"true\"\n            className={cn(\n              \"pointer-events-none absolute top-0 left-0 flex h-[1ch] w-[1ch] items-center justify-center\",\n              [\"z-30\", \"z-20\", \"z-10\"][index],\n            )}\n            style={{\n              animation:\n                \"loading-ui-infinity-track var(--duration, 3.2s) linear infinite\",\n              animationDelay: `calc(var(--delay, 0.1s) * ${index})`,\n              backgroundColor: \"var(--mask-color, var(--background))\",\n            }}\n          >\n            {glyph}\n          </span>\n        ))}\n        <span className=\"sr-only\">Loading</span>\n      </span>\n    </>\n  );\n}\n\nexport { InfinityTrack };\n",
      "type": "registry:component",
      "target": ""
    }
  ],
  "type": "registry:component"
}
