{"$schema":"https://ui.shadcn.com/schema/registry-item.json","author":"Eduardo Calvo <educlopez93@gmail.com>","css":{},"dependencies":["motion"],"description":"A ShimmerSweep text animation component for SmoothUI.","devDependencies":[],"files":[{"content":"\"use client\";\n\nimport { motion, useInView, useReducedMotion } from \"motion/react\";\nimport { useRef } from \"react\";\n\nexport interface ShimmerSweepProps {\n  children: string;\n  className?: string;\n  /** Delay before the animation starts, in milliseconds. */\n  delay?: number;\n  /** Animate only once the text scrolls into view. */\n  triggerOnView?: boolean;\n}\n\nconst DURATION_S = 0.85;\nconst MS = 1000;\n// Apple's signature ease-out.\nconst EASE = [0.22, 1, 0.36, 1] as const;\n\n/**\n * ShimmerSweep — whole-text fade-in with a left-to-center slide and blur\n * dissolve. A subtle sweep across a clean headline, blending in while gliding\n * from left to center. From the animate-text catalog (`shimmer-sweep`).\n * Best on hero titles and section headings.\n */\nconst ShimmerSweep = ({\n  children,\n  className = \"\",\n  delay = 0,\n  triggerOnView = false,\n}: ShimmerSweepProps) => {\n  const ref = useRef<HTMLSpanElement>(null);\n  const inView = useInView(ref, { once: true });\n  const shouldReduceMotion = useReducedMotion();\n  const play = (!triggerOnView || inView) && !shouldReduceMotion;\n\n  return (\n    <span aria-label={children} className={className} ref={ref}>\n      <motion.span\n        animate={play ? { filter: \"blur(0px)\", opacity: 1, x: 0 } : undefined}\n        aria-hidden=\"true\"\n        initial={\n          shouldReduceMotion\n            ? { filter: \"blur(0px)\", opacity: 1, x: 0 }\n            : { filter: \"blur(8px)\", opacity: 0, x: -22 }\n        }\n        style={{ display: \"inline-block\" }}\n        transition={\n          shouldReduceMotion\n            ? { duration: 0 }\n            : {\n                delay: delay / MS,\n                duration: DURATION_S,\n                ease: EASE,\n              }\n        }\n      >\n        {children}\n      </motion.span>\n    </span>\n  );\n};\n\nexport default ShimmerSweep;\n","path":"index.tsx","target":"components/smoothui/shimmer-sweep/index.tsx","type":"registry:ui"}],"name":"shimmer-sweep","registryDependencies":[],"title":"Shimmer Sweep","type":"registry:ui"}