UI Library for Design Engineers. Animated components and effects you can copy and paste into your apps. Free. Open Source.
fix: update registry
Dillion Vermad127b83e2bd9
diff --git a/public/r/animated-gradient-text-demo.json b/public/r/animated-gradient-text-demo.jsonindex 02fca298..15d461db 100644--- a/public/r/animated-gradient-text-demo.json+++ b/public/r/animated-gradient-text-demo.json@@ -13,7 +13,7 @@"files": [{"path": "registry/example/animated-gradient-text-demo.tsx",- "content": "import { cn } from \"@/lib/utils\";\nimport { AnimatedGradientText } from \"@/components/magicui/animated-gradient-text\";\nimport { ChevronRight } from \"lucide-react\";\n\nexport default function AnimatedGradientTextDemo() {\n return (\n <div className=\"group relative mx-auto flex items-center justify-center rounded-full px-4 py-1.5 shadow-[inset_0_-8px_10px_#8fdfff1f] transition-shadow duration-500 ease-out hover:shadow-[inset_0_-5px_10px_#8fdfff3f] \">\n <span\n className={cn(\n \"absolute inset-0 block h-full w-full animate-gradient rounded-[inherit] bg-gradient-to-r from-[#ffaa40]/50 via-[#9c40ff]/50 to-[#ffaa40]/50 bg-[length:300%_100%] p-[1px]\",\n \"[mask-composite:subtract] [mask:linear-gradient(#fff_0_0)_content-box,linear-gradient(#fff_0_0)]\",\n )}\n />\n π <hr className=\"mx-2 h-4 w-px shrink-0 bg-neutral-500\" />\n <AnimatedGradientText className=\"text-sm font-medium\">\n Introducing Magic UI\n </AnimatedGradientText>\n <ChevronRight\n className=\"ml-1 size-4 stroke-neutral-500 transition-transform\n duration-300 ease-in-out group-hover:translate-x-0.5\"\n />\n </div>\n );\n}\n",+ "content": "import { cn } from \"@/lib/utils\";\nimport { AnimatedGradientText } from \"@/components/magicui/animated-gradient-text\";\nimport { ChevronRight } from \"lucide-react\";\n\nexport default function AnimatedGradientTextDemo() {\n return (\n <div className=\"group relative mx-auto flex items-center justify-center rounded-full px-4 py-1.5 shadow-[inset_0_-8px_10px_#8fdfff1f] transition-shadow duration-500 ease-out hover:shadow-[inset_0_-5px_10px_#8fdfff3f] \">\n <span\n className={cn(\n \"absolute inset-0 block h-full w-full animate-gradient rounded-[inherit] bg-gradient-to-r from-[#ffaa40]/50 via-[#9c40ff]/50 to-[#ffaa40]/50 bg-[length:300%_100%] p-[1px]\",\n )}\n style={{\n WebkitMask:\n \"linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)\",\n WebkitMaskComposite: \"destination-out\",\n mask: \"linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)\",\n maskComposite: \"subtract\",\n WebkitClipPath: \"padding-box\",\n }}\n />\n π <hr className=\"mx-2 h-4 w-px shrink-0 bg-neutral-500\" />\n <AnimatedGradientText className=\"text-sm font-medium\">\n Introducing Magic UI\n </AnimatedGradientText>\n <ChevronRight\n className=\"ml-1 size-4 stroke-neutral-500 transition-transform\n duration-300 ease-in-out group-hover:translate-x-0.5\"\n />\n </div>\n );\n}\n","type": "registry:example","target": "components/animated-gradient-text-demo.tsx"}diff --git a/public/r/number-ticker.json b/public/r/number-ticker.jsonindex dc383cc9..957ead94 100644--- a/public/r/number-ticker.json+++ b/public/r/number-ticker.json@@ -10,7 +10,7 @@"files": [{"path": "registry/magicui/number-ticker.tsx",- "content": "\"use client\";\n\nimport { useInView, useMotionValue, useSpring } from \"motion/react\";\nimport { ComponentPropsWithoutRef, useEffect, useRef } from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\ninterface NumberTickerProps extends ComponentPropsWithoutRef<\"span\"> {\n value: number;\n direction?: \"up\" | \"down\";\n delay?: number; // delay in s\n decimalPlaces?: number;\n}\n\nexport function NumberTicker({\n value,\n direction = \"up\",\n delay = 0,\n className,\n decimalPlaces = 0,\n ...props\n}: NumberTickerProps) {\n const ref = useRef<HTMLSpanElement>(null);\n const motionValue = useMotionValue(direction === \"down\" ? value : 0);\n const springValue = useSpring(motionValue, {\n damping: 60,\n stiffness: 100,\n });\n const isInView = useInView(ref, { once: true, margin: \"0px\" });\n\n useEffect(() => {\n isInView &&\n setTimeout(() => {\n motionValue.set(direction === \"down\" ? 0 : value);\n }, delay * 1000);\n }, [motionValue, isInView, delay, value, direction]);\n\n useEffect(\n () =>\n springValue.on(\"change\", (latest) => {\n if (ref.current) {\n ref.current.textContent = Intl.NumberFormat(\"en-US\", {\n minimumFractionDigits: decimalPlaces,\n maximumFractionDigits: decimalPlaces,\n }).format(Number(latest.toFixed(decimalPlaces)));\n }\n }),\n [springValue, decimalPlaces],\n );\n\n return (\n <span\n ref={ref}\n className={cn(\n \"inline-block tabular-nums tracking-wider text-black dark:text-white\",\n className,\n )}\n {...props}\n />\n );\n}\n",+ "content": "\"use client\";\n\nimport { useInView, useMotionValue, useSpring } from \"motion/react\";\nimport { ComponentPropsWithoutRef, useEffect, useRef } from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\ninterface NumberTickerProps extends ComponentPropsWithoutRef<\"span\"> {\n value: number;\n direction?: \"up\" | \"down\";\n delay?: number; // delay in s\n decimalPlaces?: number;\n}\n\nexport function NumberTicker({\n value,\n direction = \"up\",\n delay = 0,\n className,\n decimalPlaces = 0,\n ...props\n}: NumberTickerProps) {\n const ref = useRef<HTMLSpanElement>(null);\n const motionValue = useMotionValue(direction === \"down\" ? value : 0);\n const springValue = useSpring(motionValue, {\n damping: 60,\n stiffness: 100,\n });\n const isInView = useInView(ref, { once: true, margin: \"0px\" });\n\n useEffect(() => {\n if (isInView) {\n const timer = setTimeout(() => {\n motionValue.set(direction === \"down\" ? 0 : value);\n }, delay * 1000);\n return () => clearTimeout(timer);\n }\n }, [motionValue, isInView, delay, value, direction]);\n\n useEffect(\n () =>\n springValue.on(\"change\", (latest) => {\n if (ref.current) {\n ref.current.textContent = Intl.NumberFormat(\"en-US\", {\n minimumFractionDigits: decimalPlaces,\n maximumFractionDigits: decimalPlaces,\n }).format(Number(latest.toFixed(decimalPlaces)));\n }\n }),\n [springValue, decimalPlaces],\n );\n\n return (\n <span\n ref={ref}\n className={cn(\n \"inline-block tabular-nums tracking-wider text-black dark:text-white\",\n className,\n )}\n {...props}\n />\n );\n}\n","type": "registry:ui","target": "components/magicui/number-ticker.tsx"}