{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "armature",
  "type": "registry:ui",
  "title": "Armature",
  "description": "Orbiting icon rings around a fixed center slot. Compose Armature + ArmatureRing for a multi-radius orbital system with per-ring speed, direction, and an optional eccentric elliptical ring. Pure CSS, pause-on-hover.",
  "dependencies": [],
  "registryDependencies": [],
  "files": [
    {
      "path": "registry/default/utility/armature/armature.tsx",
      "type": "registry:ui",
      "target": "components/crucible/armature.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nexport interface ArmatureProps extends React.ComponentPropsWithoutRef<\"div\"> {\n  /** Content pinned in the fixed center slot — logo, icon, avatar. */\n  center?: React.ReactNode;\n  /** One or more `<ArmatureRing>` elements. */\n  children: React.ReactNode;\n  /** Pause every ring (and its counter-rotating icons) while hovered. @default true */\n  pauseOnHover?: boolean;\n  /** Color of the soft light cast behind the center slot. @default \"#ffffff\" */\n  emberColor?: string;\n}\n\nexport interface ArmatureRingProps extends React.ComponentPropsWithoutRef<\"div\"> {\n  /** Ring radius in px. */\n  radius: number;\n  /** Seconds per revolution. @default 20 */\n  speed?: number;\n  /** Spin direction. @default \"cw\" */\n  direction?: \"cw\" | \"ccw\";\n  /** Draw a hairline guide circle with a rotating brightened arc. @default true */\n  showPath?: boolean;\n  /** Icons/elements distributed evenly around the ring. */\n  children: React.ReactNode;\n  /** Squash factor (0–1) for a slightly elliptical, off-axis orbit. @default 0 */\n  eccentricity?: number;\n  /** Color of the guide circle / trailing arc. @default \"#ffffff\" */\n  color?: string;\n}\n\nconst KEYFRAMES = `\n@keyframes crucible-armature-spin-cw { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }\n@keyframes crucible-armature-spin-ccw { from { transform: rotate(360deg); } to { transform: rotate(0deg); } }\n@keyframes crucible-armature-counter-cw { from { transform: rotate(0deg); } to { transform: rotate(-360deg); } }\n@keyframes crucible-armature-counter-ccw { from { transform: rotate(-360deg); } to { transform: rotate(0deg); } }\n@keyframes crucible-armature-ember {\n  0%, 100% { opacity: 0.55; transform: translate(-50%, -50%) scale(1); }\n  50% { opacity: 0.85; transform: translate(-50%, -50%) scale(1.12); }\n}\n[data-crucible=\"armature\"][data-paused=\"true\"] .armature-spin {\n  /* !important: the spin animation is set as an inline style whose shorthand\n     implies animation-play-state:running, and inline wins over a plain rule. */\n  animation-play-state: paused !important;\n}\n@media (prefers-reduced-motion: reduce) {\n  [data-crucible=\"armature\"] .armature-spin,\n  [data-crucible=\"armature\"] .armature-ember {\n    animation: none !important;\n  }\n}\n`;\n\n/**\n * Armature — orbiting icon rings around a fixed center slot. Compose with\n * `<ArmatureRing>` for a multi-radius orbital system: each ring sets its own\n * radius, speed, and direction, and icons stay upright via a counter-rotation\n * so only their position orbits, not their orientation.\n *\n * Crucible signature: rings render as neutral hairline guide circles with a\n * rotating arc that brightens to white just behind the icons, a soft white\n * glow behind the center slot, and support for one ring set deliberately\n * eccentric (`eccentricity`) for a slightly elliptical orbit. Pure CSS —\n * pauses on hover and freezes orbits (and the center glow's breathing) to a\n * static, correctly-centered frame under reduced motion.\n */\nexport function Armature({\n  center,\n  children,\n  pauseOnHover = true,\n  emberColor = \"#ffffff\",\n  className,\n  onMouseEnter,\n  onMouseLeave,\n  ...props\n}: ArmatureProps) {\n  const [paused, setPaused] = React.useState(false);\n\n  return (\n    <div\n      data-crucible=\"armature\"\n      data-paused={pauseOnHover && paused}\n      className={cn(\"relative flex items-center justify-center\", className)}\n      onMouseEnter={(e) => {\n        onMouseEnter?.(e);\n        if (pauseOnHover) setPaused(true);\n      }}\n      onMouseLeave={(e) => {\n        onMouseLeave?.(e);\n        if (pauseOnHover) setPaused(false);\n      }}\n      {...props}\n    >\n      <style>{KEYFRAMES}</style>\n      <span\n        aria-hidden\n        className=\"armature-ember pointer-events-none absolute top-1/2 left-1/2 h-24 w-24 rounded-full blur-2xl\"\n        style={{\n          background: `radial-gradient(circle, ${emberColor}66, transparent 70%)`,\n          // Resting pose (centered, mid-glow) for when the breath is disabled\n          // under reduced motion; the running animation overrides both.\n          transform: \"translate(-50%, -50%)\",\n          opacity: 0.7,\n          animation: \"crucible-armature-ember 4s ease-in-out infinite\",\n        }}\n      />\n      {center && <div className=\"relative z-10 flex items-center justify-center\">{center}</div>}\n      {children}\n    </div>\n  );\n}\n\n/**\n * ArmatureRing — one orbit within an `<Armature>`. Must be a descendant of\n * `Armature` (it positions itself absolutely against the nearest positioned\n * ancestor, i.e. Armature's root).\n */\nexport function ArmatureRing({\n  radius,\n  speed = 20,\n  direction = \"cw\",\n  showPath = true,\n  eccentricity = 0,\n  color = \"#ffffff\",\n  children,\n  className,\n  style,\n  ...props\n}: ArmatureRingProps) {\n  const icons = React.Children.toArray(children);\n  const size = radius * 2;\n  const squash = 1 - Math.min(1, Math.max(0, eccentricity)) * 0.16;\n  const tilt = Math.min(1, Math.max(0, eccentricity)) * 5;\n  const spinAnimation = `crucible-armature-spin-${direction} ${speed}s linear infinite`;\n  const counterAnimation = `crucible-armature-counter-${direction} ${speed}s linear infinite`;\n\n  return (\n    <div\n      data-crucible=\"armature-ring\"\n      className={cn(\"pointer-events-none absolute top-1/2 left-1/2\", className)}\n      style={{\n        width: size,\n        height: size,\n        transform: `translate(-50%, -50%) scale(1, ${squash}) rotate(${tilt}deg)`,\n        ...style,\n      }}\n      {...props}\n    >\n      {showPath && (\n        <div\n          aria-hidden\n          className=\"absolute inset-0 rounded-full\"\n          style={{ border: `1px solid ${color}`, opacity: 0.25 }}\n        />\n      )}\n      {showPath && (\n        <div\n          aria-hidden\n          className=\"armature-spin absolute inset-0 rounded-full\"\n          style={{\n            background: `conic-gradient(from 0deg, transparent 0deg, transparent 290deg, ${color} 330deg, transparent 358deg)`,\n            WebkitMask: \"radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px))\",\n            mask: \"radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px))\",\n            animation: spinAnimation,\n          }}\n        />\n      )}\n      <div className=\"armature-spin absolute inset-0\" style={{ animation: spinAnimation }}>\n        {icons.map((icon, i) => {\n          const angle = (360 / icons.length) * i;\n          return (\n            <div\n              key={i}\n              className=\"absolute top-1/2 left-1/2\"\n              style={{ transform: `translate(-50%, -50%) rotate(${angle}deg) translate(${radius}px) rotate(-${angle}deg)` }}\n            >\n              <div className=\"armature-spin pointer-events-auto\" style={{ animation: counterAnimation }}>\n                {icon}\n              </div>\n            </div>\n          );\n        })}\n      </div>\n    </div>\n  );\n}\n"
    }
  ]
}