{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "gild",
  "type": "registry:ui",
  "title": "Gild",
  "description": "A metallic light sweep crosses glyphs on a deliberate slow interval — a white core edged in refined champagne gold over a brushed-bronze base. Pure CSS, driven by an animated @property.",
  "dependencies": [],
  "registryDependencies": [
    "https://crucibleui.com/r/use-reduced-motion.json"
  ],
  "files": [
    {
      "path": "registry/default/text/gild/gild.tsx",
      "type": "registry:ui",
      "target": "components/crucible/gild.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\nimport { useReducedMotion } from \"@/hooks/use-reduced-motion\";\n\nexport interface GildColors {\n  /** Resting metal tone the sweep travels across. @default warm neutral-bronze */\n  base?: string;\n  /** White core of the sweep. @default white */\n  core?: string;\n  /** Inner edge of the sweep. @default champagne gold */\n  amber?: string;\n  /** Outer edge of the sweep. @default deep champagne */\n  ember?: string;\n}\n\nexport interface GildProps extends React.ComponentPropsWithoutRef<\"span\"> {\n  /** Element tag rendered. @default \"span\" */\n  as?: \"span\" | \"div\" | \"p\" | \"h1\" | \"h2\" | \"h3\";\n  /** Gradient stops for the base tone and sweep core/edges. */\n  colors?: GildColors;\n  /** Seconds between sweeps. @default 4.5 */\n  interval?: number;\n  /** Sweep angle in degrees. @default 100 */\n  angle?: number;\n  /** Only sweep while hovered, instead of continuously on an interval. @default false */\n  hoverOnly?: boolean;\n  /** Freeze the sweep at its current frame. @default false */\n  paused?: boolean;\n}\n\nconst DEFAULT_COLORS: Required<GildColors> = {\n  base: \"#9c8b6e\",\n  core: \"#ffffff\",\n  amber: \"#e8d5a3\",\n  ember: \"#c9ae7c\",\n};\n\n/**\n * Gild — a narrow white light band, edged in refined champagne gold, sweeps\n * across a brushed neutral-bronze text fill on a deliberate slow interval —\n * never a constant conveyor shimmer. Pure CSS, driven by an animated\n * `@property` so the sweep interpolates smoothly inside the gradient stops.\n * Freezes at a static mid-sweep frame under reduced motion.\n */\nexport function Gild({\n  as = \"span\",\n  colors,\n  interval = 4.5,\n  angle = 100,\n  hoverOnly = false,\n  paused = false,\n  className,\n  style,\n  children,\n  ...props\n}: GildProps) {\n  const reducedMotion = useReducedMotion();\n  const c = { ...DEFAULT_COLORS, ...colors };\n  const Tag = as;\n\n  const gradient = `linear-gradient(${angle}deg,\n    ${c.base} 0%,\n    ${c.base} calc(var(--gild-shine, 45%) - 22%),\n    ${c.amber} calc(var(--gild-shine, 45%) - 8%),\n    ${c.core} var(--gild-shine, 45%),\n    ${c.amber} calc(var(--gild-shine, 45%) + 8%),\n    ${c.ember} calc(var(--gild-shine, 45%) + 16%),\n    ${c.base} calc(var(--gild-shine, 45%) + 30%),\n    ${c.base} 100%)`;\n\n  const forcePaused = paused || reducedMotion;\n\n  return (\n    <Tag\n      data-crucible=\"gild\"\n      data-hover-only={hoverOnly ? \"\" : undefined}\n      className={cn(\"gild-text inline-block bg-clip-text text-transparent\", className)}\n      style={\n        {\n          backgroundImage: gradient,\n          backgroundSize: \"220% 220%\",\n          // Per-instance duration: the <style> rule below is shared by every\n          // Gild on the page, so the interval must ride a custom property.\n          \"--gild-interval\": `${Math.max(interval, 0.1)}s`,\n          ...(forcePaused ? { \"--gild-play\": \"paused\" } : {}),\n          ...(reducedMotion ? { \"--gild-shine\": \"45%\" } : {}),\n          ...style,\n        } as React.CSSProperties\n      }\n      {...props}\n    >\n      <style>{`\n        /* Rest at -35% so every sweep stop (widest: shine + 30%) sits below 0%\n           and the resting fill is pure base — no stuck ember glyph. */\n        @property --gild-shine {\n          syntax: '<percentage>';\n          inherits: true;\n          initial-value: -35%;\n        }\n        @keyframes crucible-gild-sweep {\n          0% { --gild-shine: -35%; }\n          30% { --gild-shine: 120%; }\n          100% { --gild-shine: 120%; }\n        }\n        [data-crucible=\"gild\"] {\n          animation: crucible-gild-sweep var(--gild-interval, 4.5s) ease-in-out infinite;\n          animation-play-state: var(--gild-play, running);\n        }\n        [data-crucible=\"gild\"][data-hover-only] {\n          animation-play-state: var(--gild-play, paused);\n        }\n        [data-crucible=\"gild\"][data-hover-only]:hover {\n          animation-play-state: var(--gild-play, running);\n        }\n        @media (prefers-reduced-motion: reduce) {\n          [data-crucible=\"gild\"] {\n            animation: none;\n            --gild-shine: 45%;\n          }\n        }\n      `}</style>\n      {children}\n    </Tag>\n  );\n}\n"
    }
  ]
}