{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "loader-orbit-sync",
  "type": "registry:component",
  "title": "Loader Orbit Sync",
  "description": "Satellites travel tilted elliptical orbits around a sync hub, growing as they pass in front and fading behind it. The hub sends out a pulse each time a satellite comes around.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "loaders",
    "loader",
    "sync",
    "orbit",
    "3d",
    "integrations",
    "css"
  ],
  "docs": "https://hyperblur.dev/effects/loader-orbit-sync",
  "files": [
    {
      "path": "registry/hyperblur/loader-orbit-sync.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/loader-orbit-sync.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface LoaderOrbitSyncProps extends React.HTMLAttributes<HTMLSpanElement> {\n  size?: number;\n  color?: string;\n  accent?: string;\n  speed?: number;\n  satellites?: number;\n  label?: string;\n}\n\nconst css = `\n.hb-vk1 {\n  display: inline-flex;\n  flex-direction: column;\n  align-items: center;\n  gap: 0.75em;\n  box-sizing: border-box;\n  font-family: inherit;\n  color: #ededed;\n  vertical-align: middle;\n}\n.hb-vk1 *, .hb-vk1 *::before, .hb-vk1 *::after { box-sizing: border-box; }\n.hb-vk1-stage {\n  position: relative;\n  flex: none;\n  width: var(--hb-vk1-s);\n  height: var(--hb-vk1-s);\n}\n.hb-vk1-plane {\n  position: absolute;\n  inset: 0;\n  transform: rotate(var(--hb-vk1-tilt)) scaleY(0.36);\n}\n.hb-vk1-ring {\n  position: absolute;\n  inset: 4%;\n  border-radius: 50%;\n  border: 1.5px solid color-mix(in srgb, var(--hb-vk1-c) 26%, transparent);\n}\n.hb-vk1-spin {\n  position: absolute;\n  inset: 0;\n  animation: hb-vk1-rot var(--hb-vk1-d) linear infinite;\n  animation-delay: var(--hb-vk1-delay);\n}\n.hb-vk1-arm {\n  position: absolute;\n  top: 50%;\n  left: 96%;\n  width: 0;\n  height: 0;\n  animation: hb-vk1-rot var(--hb-vk1-d) linear infinite reverse;\n  animation-delay: var(--hb-vk1-delay);\n}\n.hb-vk1-fix {\n  position: absolute;\n  left: 0;\n  top: 0;\n  transform: scaleY(2.7778) rotate(calc(var(--hb-vk1-tilt) * -1));\n}\n.hb-vk1-dot {\n  position: absolute;\n  left: calc(var(--hb-vk1-s) * -0.055);\n  top: calc(var(--hb-vk1-s) * -0.055);\n  width: calc(var(--hb-vk1-s) * 0.11);\n  height: calc(var(--hb-vk1-s) * 0.11);\n  border-radius: 50%;\n  background: radial-gradient(circle at 35% 30%, #fff 0 18%, var(--hb-vk1-a) 42%, var(--hb-vk1-c) 100%);\n  box-shadow: 0 0 0 2px #0a0a0a, 0 0 12px color-mix(in srgb, var(--hb-vk1-a) 70%, transparent);\n  animation: hb-vk1-depth var(--hb-vk1-d) linear infinite;\n  animation-delay: var(--hb-vk1-delay);\n}\n.hb-vk1-hub {\n  position: absolute;\n  left: 50%;\n  top: 50%;\n  width: 34%;\n  height: 34%;\n  transform: translate(-50%, -50%);\n  border-radius: 28%;\n  background: linear-gradient(160deg, #262a33, #121418 70%);\n  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), inset 0 -1px 0 rgba(0,0,0,0.6), 0 6px 18px rgba(0,0,0,0.55);\n  display: grid;\n  place-items: center;\n}\n.hb-vk1-hub::before {\n  content: \"\";\n  position: absolute;\n  inset: -8%;\n  border-radius: 32%;\n  border: 1.5px solid var(--hb-vk1-a);\n  opacity: 0;\n  animation: hb-vk1-ping calc(var(--hb-vk1-d) / var(--hb-vk1-n)) cubic-bezier(0.2, 0.7, 0.3, 1) infinite;\n}\n.hb-vk1-hub svg { width: 52%; height: 52%; display: block; }\n.hb-vk1-l { font-size: 12px; line-height: 1.3; color: #a1a1a1; white-space: nowrap; }\n.hb-vk1-sr {\n  position: absolute;\n  width: 1px;\n  height: 1px;\n  margin: -1px;\n  overflow: hidden;\n  clip-path: inset(50%);\n  white-space: nowrap;\n}\n@keyframes hb-vk1-rot { to { transform: rotate(360deg); } }\n@keyframes hb-vk1-depth {\n  0% { transform: scale(0.95); opacity: 0.9; }\n  25% { transform: scale(1.25); opacity: 1; }\n  50% { transform: scale(0.95); opacity: 0.9; }\n  75% { transform: scale(0.6); opacity: 0.45; }\n  100% { transform: scale(0.95); opacity: 0.9; }\n}\n@keyframes hb-vk1-ping {\n  0% { transform: scale(0.9); opacity: 0.8; }\n  100% { transform: scale(1.5); opacity: 0; }\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-vk1-spin, .hb-vk1-arm, .hb-vk1-dot, .hb-vk1-hub::before { animation: none; }\n}\n`;\n\nexport function LoaderOrbitSync({\n  size = 96,\n  color = \"#2f7bff\",\n  accent = \"#7fb3ff\",\n  speed = 2.8,\n  satellites = 3,\n  label,\n  className = \"\",\n  style,\n  ...rest\n}: LoaderOrbitSyncProps) {\n  const count = Math.max(1, Math.min(5, Math.round(satellites)));\n  const tilts = Array.from({ length: count }, (_, i) => (i * 180) / count - 30);\n  const vars = {\n    \"--hb-vk1-s\": `${size}px`,\n    \"--hb-vk1-c\": color,\n    \"--hb-vk1-a\": accent,\n    \"--hb-vk1-d\": `${Math.max(0.6, speed)}s`,\n    \"--hb-vk1-n\": count,\n    ...style,\n  } as React.CSSProperties;\n\n  return (\n    <>\n      <style href=\"hb-loader-orbit-sync\" precedence=\"default\">{css}</style>\n      <span role=\"status\" className={`hb-vk1 ${className}`} style={vars} {...rest}>\n        <span className=\"hb-vk1-stage\" aria-hidden=\"true\">\n          {tilts.map((t, i) => (\n            <span\n              key={`r${i}`}\n              className=\"hb-vk1-plane\"\n              style={{ \"--hb-vk1-tilt\": `${t.toFixed(1)}deg` } as React.CSSProperties}\n            >\n              <span className=\"hb-vk1-ring\" />\n            </span>\n          ))}\n          <span className=\"hb-vk1-hub\">\n            <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke={accent} strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n              <path d=\"M4 12a8 8 0 0 1 13.7-5.6L20 8.5\" />\n              <path d=\"M20 4v4.5h-4.5\" />\n              <path d=\"M20 12a8 8 0 0 1-13.7 5.6L4 15.5\" />\n              <path d=\"M4 20v-4.5h4.5\" />\n            </svg>\n          </span>\n          {tilts.map((t, i) => (\n            <span\n              key={`p${i}`}\n              className=\"hb-vk1-plane\"\n              style={\n                {\n                  \"--hb-vk1-tilt\": `${t.toFixed(1)}deg`,\n                  \"--hb-vk1-delay\": `${((-i * Math.max(0.6, speed)) / count).toFixed(2)}s`,\n                } as React.CSSProperties\n              }\n            >\n              <span className=\"hb-vk1-spin\">\n                <span className=\"hb-vk1-arm\">\n                  <span className=\"hb-vk1-fix\">\n                    <span className=\"hb-vk1-dot\" />\n                  </span>\n                </span>\n              </span>\n            </span>\n          ))}\n        </span>\n        <span className={label ? \"hb-vk1-l\" : \"hb-vk1-sr\"}>{label ?? \"Syncing\"}</span>\n      </span>\n    </>\n  );\n}\n"
    }
  ]
}