UI Library for Design Engineers. Animated components and effects you can copy and paste into your apps. Free. Open Source.
fix: add registry target
Dillion Verma2f42722c73f7
diff --git a/public/r/android-demo-2.json b/public/r/android-demo-2.jsonindex 94c9a36d..15c18975 100644--- a/public/r/android-demo-2.json+++ b/public/r/android-demo-2.json@@ -11,7 +11,8 @@{"path": "registry/example/android-demo-2.tsx","content": "import Android from \"@/registry/magicui/android\";\n\nexport default function AndroidDemo() {\n return (\n <div className=\"relative\">\n <Android\n className=\"size-full\"\n src=\"https://images.unsplash.com/photo-1730326405863-c6fa7e499a6e?q=80&w=1964&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\"\n />\n </div>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/android-demo-3.json b/public/r/android-demo-3.jsonindex cfbe9100..a31e6346 100644--- a/public/r/android-demo-3.json+++ b/public/r/android-demo-3.json@@ -11,7 +11,8 @@{"path": "registry/example/android-demo-3.tsx","content": "import Android from \"@/registry/magicui/android\";\n\nexport default function AndroidDemo() {\n return (\n <div className=\"relative\">\n <Android\n className=\"size-full\"\n videoSrc=\"https://videos.pexels.com/video-files/14993748/14993748-uhd_1296_2304_30fps.mp4\"\n />\n </div>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/android-demo.json b/public/r/android-demo.jsonindex c13e942e..bd7073f1 100644--- a/public/r/android-demo.json+++ b/public/r/android-demo.json@@ -11,7 +11,8 @@{"path": "registry/example/android-demo.tsx","content": "import Android from \"@/registry/magicui/android\";\n\nexport default function AndroidDemo() {\n return (\n <div className=\"relative\">\n <Android className=\"size-full\" />\n </div>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/android.json b/public/r/android.jsonindex 43ed9903..92bea3b6 100644--- a/public/r/android.json+++ b/public/r/android.json@@ -8,7 +8,8 @@{"path": "registry/magicui/android.tsx","content": "import { SVGProps } from \"react\";\n\nexport interface AndroidProps extends SVGProps<SVGSVGElement> {\n width?: number;\n height?: number;\n src?: string;\n videoSrc?: string;\n}\n\nexport default function Android({\n width = 433,\n height = 882,\n src,\n videoSrc,\n ...props\n}: AndroidProps) {\n return (\n <svg\n width={width}\n height={height}\n viewBox={`0 0 ${width} ${height}`}\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <path\n d=\"M376 153H378C379.105 153 380 153.895 380 155V249C380 250.105 379.105 251 378 251H376V153Z\"\n className=\"fill-[#E5E5E5] dark:fill-[#404040]\"\n />\n <path\n d=\"M376 301H378C379.105 301 380 301.895 380 303V351C380 352.105 379.105 353 378 353H376V301Z\"\n className=\"fill-[#E5E5E5] dark:fill-[#404040]\"\n />\n <path\n d=\"M0 42C0 18.8041 18.804 0 42 0H336C359.196 0 378 18.804 378 42V788C378 811.196 359.196 830 336 830H42C18.804 830 0 811.196 0 788V42Z\"\n className=\"fill-[#E5E5E5] dark:fill-[#404040]\"\n />\n <path\n d=\"M2 43C2 22.0132 19.0132 5 40 5H338C358.987 5 376 22.0132 376 43V787C376 807.987 358.987 825 338 825H40C19.0132 825 2 807.987 2 787V43Z\"\n className=\"fill-white dark:fill-[#262626]\"\n />\n\n <g clip-path=\"url(#clip0_514_20855)\">\n <path\n d=\"M9.25 48C9.25 29.3604 24.3604 14.25 43 14.25H335C353.64 14.25 368.75 29.3604 368.75 48V780C368.75 798.64 353.64 813.75 335 813.75H43C24.3604 813.75 9.25 798.64 9.25 780V48Z\"\n className=\"fill-[#E5E5E5] stroke-[#E5E5E5] stroke-[0.5] dark:fill-[#404040] dark:stroke-[#404040]\"\n />\n </g>\n <circle\n cx=\"189\"\n cy=\"28\"\n r=\"9\"\n className=\"fill-white dark:fill-[#262626]\"\n />\n <circle\n cx=\"189\"\n cy=\"28\"\n r=\"4\"\n className=\"fill-[#E5E5E5] dark:fill-[#404040]\"\n />\n {src && (\n <image\n href={src}\n width=\"360\"\n height=\"800\"\n className=\"size-full object-cover\"\n preserveAspectRatio=\"xMidYMid slice\"\n clipPath=\"url(#clip0_514_20855)\"\n />\n )}\n {videoSrc && (\n <foreignObject\n width=\"380\"\n height=\"820\"\n clipPath=\"url(#clip0_514_20855)\"\n preserveAspectRatio=\"xMidYMid slice\"\n >\n <video\n className=\"size-full object-cover\"\n src={videoSrc}\n autoPlay\n loop\n muted\n playsInline\n />\n </foreignObject>\n )}\n <defs>\n <clipPath id=\"clip0_514_20855\">\n <rect\n width=\"360\"\n height=\"800\"\n rx=\"33\"\n ry=\"25\"\n className=\"fill-white dark:fill-[#262626]\"\n transform=\"translate(9 14)\"\n />\n </clipPath>\n </defs>\n </svg>\n );\n}\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/animated-beam-demo.json b/public/r/animated-beam-demo.jsonindex ce108dae..394dfbcc 100644--- a/public/r/animated-beam-demo.json+++ b/public/r/animated-beam-demo.json@@ -14,7 +14,8 @@{"path": "registry/example/animated-beam-demo.tsx","content": "\"use client\";\n\nimport React, { forwardRef, useRef } from \"react\";\n\nimport { cn } from \"@/lib/utils\";\nimport { AnimatedBeam } from \"@/registry/magicui/animated-beam\";\n\nconst Circle = forwardRef<\n HTMLDivElement,\n { className?: string; children?: React.ReactNode }\n>(({ className, children }, ref) => {\n return (\n <div\n ref={ref}\n className={cn(\n \"z-10 flex size-12 items-center justify-center rounded-full border-2 bg-white p-3 shadow-[0_0_20px_-12px_rgba(0,0,0,0.8)]\",\n className,\n )}\n >\n {children}\n </div>\n );\n});\n\nCircle.displayName = \"Circle\";\n\nexport default function AnimatedBeamDemo() {\n const containerRef = useRef<HTMLDivElement>(null);\n const div1Ref = useRef<HTMLDivElement>(null);\n const div2Ref = useRef<HTMLDivElement>(null);\n const div3Ref = useRef<HTMLDivElement>(null);\n const div4Ref = useRef<HTMLDivElement>(null);\n const div5Ref = useRef<HTMLDivElement>(null);\n const div6Ref = useRef<HTMLDivElement>(null);\n const div7Ref = useRef<HTMLDivElement>(null);\n\n return (\n <div\n className=\"relative flex h-[500px] w-full items-center justify-center overflow-hidden rounded-lg border bg-background p-10 md:shadow-xl\"\n ref={containerRef}\n >\n <div className=\"flex size-full max-h-[200px] max-w-lg flex-col items-stretch justify-between gap-10\">\n <div className=\"flex flex-row items-center justify-between\">\n <Circle ref={div1Ref}>\n <Icons.googleDrive />\n </Circle>\n <Circle ref={div5Ref}>\n <Icons.googleDocs />\n </Circle>\n </div>\n <div className=\"flex flex-row items-center justify-between\">\n <Circle ref={div2Ref}>\n <Icons.notion />\n </Circle>\n <Circle ref={div4Ref} className=\"size-16\">\n <Icons.openai />\n </Circle>\n <Circle ref={div6Ref}>\n <Icons.zapier />\n </Circle>\n </div>\n <div className=\"flex flex-row items-center justify-between\">\n <Circle ref={div3Ref}>\n <Icons.whatsapp />\n </Circle>\n <Circle ref={div7Ref}>\n <Icons.messenger />\n </Circle>\n </div>\n </div>\n\n <AnimatedBeam\n containerRef={containerRef}\n fromRef={div1Ref}\n toRef={div4Ref}\n curvature={-75}\n endYOffset={-10}\n />\n <AnimatedBeam\n containerRef={containerRef}\n fromRef={div2Ref}\n toRef={div4Ref}\n />\n <AnimatedBeam\n containerRef={containerRef}\n fromRef={div3Ref}\n toRef={div4Ref}\n curvature={75}\n endYOffset={10}\n />\n <AnimatedBeam\n containerRef={containerRef}\n fromRef={div5Ref}\n toRef={div4Ref}\n curvature={-75}\n endYOffset={-10}\n reverse\n />\n <AnimatedBeam\n containerRef={containerRef}\n fromRef={div6Ref}\n toRef={div4Ref}\n reverse\n />\n <AnimatedBeam\n containerRef={containerRef}\n fromRef={div7Ref}\n toRef={div4Ref}\n curvature={75}\n endYOffset={10}\n reverse\n />\n </div>\n );\n}\n\nconst Icons = {\n notion: () => (\n <svg\n width=\"100\"\n height=\"100\"\n viewBox=\"0 0 100 100\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M6.017 4.313l55.333 -4.087c6.797 -0.583 8.543 -0.19 12.817 2.917l17.663 12.443c2.913 2.14 3.883 2.723 3.883 5.053v68.243c0 4.277 -1.553 6.807 -6.99 7.193L24.467 99.967c-4.08 0.193 -6.023 -0.39 -8.16 -3.113L3.3 79.94c-2.333 -3.113 -3.3 -5.443 -3.3 -8.167V11.113c0 -3.497 1.553 -6.413 6.017 -6.8z\"\n fill=\"#ffffff\"\n />\n <path\n d=\"M61.35 0.227l-55.333 4.087C1.553 4.7 0 7.617 0 11.113v60.66c0 2.723 0.967 5.053 3.3 8.167l13.007 16.913c2.137 2.723 4.08 3.307 8.16 3.113l64.257 -3.89c5.433 -0.387 6.99 -2.917 6.99 -7.193V20.64c0 -2.21 -0.873 -2.847 -3.443 -4.733L74.167 3.143c-4.273 -3.107 -6.02 -3.5 -12.817 -2.917zM25.92 19.523c-5.247 0.353 -6.437 0.433 -9.417 -1.99L8.927 11.507c-0.77 -0.78 -0.383 -1.753 1.557 -1.947l53.193 -3.887c4.467 -0.39 6.793 1.167 8.54 2.527l9.123 6.61c0.39 0.197 1.36 1.36 0.193 1.36l-54.933 3.307 -0.68 0.047zM19.803 88.3V30.367c0 -2.53 0.777 -3.697 3.103 -3.893L86 22.78c2.14 -0.193 3.107 1.167 3.107 3.693v57.547c0 2.53 -0.39 4.67 -3.883 4.863l-60.377 3.5c-3.493 0.193 -5.043 -0.97 -5.043 -4.083zm59.6 -54.827c0.387 1.75 0 3.5 -1.75 3.7l-2.91 0.577v42.773c-2.527 1.36 -4.853 2.137 -6.797 2.137 -3.107 0 -3.883 -0.973 -6.21 -3.887l-19.03 -29.94v28.967l6.02 1.363s0 3.5 -4.857 3.5l-13.39 0.777c-0.39 -0.78 0 -2.723 1.357 -3.11l3.497 -0.97v-38.3L30.48 40.667c-0.39 -1.75 0.58 -4.277 3.3 -4.473l14.367 -0.967 19.8 30.327v-26.83l-5.047 -0.58c-0.39 -2.143 1.163 -3.7 3.103 -3.89l13.4 -0.78z\"\n fill=\"#000000\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n />\n </svg>\n ),\n openai: () => (\n <svg\n width=\"100\"\n height=\"100\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z\" />\n </svg>\n ),\n googleDrive: () => (\n <svg\n width=\"100\"\n height=\"100\"\n viewBox=\"0 0 87.3 78\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"m6.6 66.85 3.85 6.65c.8 1.4 1.95 2.5 3.3 3.3l13.75-23.8h-27.5c0 1.55.4 3.1 1.2 4.5z\"\n fill=\"#0066da\"\n />\n <path\n d=\"m43.65 25-13.75-23.8c-1.35.8-2.5 1.9-3.3 3.3l-25.4 44a9.06 9.06 0 0 0 -1.2 4.5h27.5z\"\n fill=\"#00ac47\"\n />\n <path\n d=\"m73.55 76.8c1.35-.8 2.5-1.9 3.3-3.3l1.6-2.75 7.65-13.25c.8-1.4 1.2-2.95 1.2-4.5h-27.502l5.852 11.5z\"\n fill=\"#ea4335\"\n />\n <path\n d=\"m43.65 25 13.75-23.8c-1.35-.8-2.9-1.2-4.5-1.2h-18.5c-1.6 0-3.15.45-4.5 1.2z\"\n fill=\"#00832d\"\n />\n <path\n d=\"m59.8 53h-32.3l-13.75 23.8c1.35.8 2.9 1.2 4.5 1.2h50.8c1.6 0 3.15-.45 4.5-1.2z\"\n fill=\"#2684fc\"\n />\n <path\n d=\"m73.4 26.5-12.7-22c-.8-1.4-1.95-2.5-3.3-3.3l-13.75 23.8 16.15 28h27.45c0-1.55-.4-3.1-1.2-4.5z\"\n fill=\"#ffba00\"\n />\n </svg>\n ),\n whatsapp: () => (\n <svg\n width=\"100\"\n height=\"100\"\n viewBox=\"0 0 175.216 175.552\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <defs>\n <linearGradient\n id=\"b\"\n x1=\"85.915\"\n x2=\"86.535\"\n y1=\"32.567\"\n y2=\"137.092\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop offset=\"0\" stopColor=\"#57d163\" />\n <stop offset=\"1\" stopColor=\"#23b33a\" />\n </linearGradient>\n <filter\n id=\"a\"\n width=\"1.115\"\n height=\"1.114\"\n x=\"-.057\"\n y=\"-.057\"\n colorInterpolationFilters=\"sRGB\"\n >\n <feGaussianBlur stdDeviation=\"3.531\" />\n </filter>\n </defs>\n <path\n d=\"m54.532 138.45 2.235 1.324c9.387 5.571 20.15 8.518 31.126 8.523h.023c33.707 0 61.139-27.426 61.153-61.135.006-16.335-6.349-31.696-17.895-43.251A60.75 60.75 0 0 0 87.94 25.983c-33.733 0-61.166 27.423-61.178 61.13a60.98 60.98 0 0 0 9.349 32.535l1.455 2.312-6.179 22.558zm-40.811 23.544L24.16 123.88c-6.438-11.154-9.825-23.808-9.821-36.772.017-40.556 33.021-73.55 73.578-73.55 19.681.01 38.154 7.669 52.047 21.572s21.537 32.383 21.53 52.037c-.018 40.553-33.027 73.553-73.578 73.553h-.032c-12.313-.005-24.412-3.094-35.159-8.954zm0 0\"\n fill=\"#b3b3b3\"\n filter=\"url(#a)\"\n />\n <path\n d=\"m12.966 161.238 10.439-38.114a73.42 73.42 0 0 1-9.821-36.772c.017-40.556 33.021-73.55 73.578-73.55 19.681.01 38.154 7.669 52.047 21.572s21.537 32.383 21.53 52.037c-.018 40.553-33.027 73.553-73.578 73.553h-.032c-12.313-.005-24.412-3.094-35.159-8.954z\"\n fill=\"#ffffff\"\n />\n <path\n d=\"M87.184 25.227c-33.733 0-61.166 27.423-61.178 61.13a60.98 60.98 0 0 0 9.349 32.535l1.455 2.312-6.179 22.559 23.146-6.069 2.235 1.324c9.387 5.571 20.15 8.518 31.126 8.524h.023c33.707 0 61.14-27.426 61.153-61.135a60.75 60.75 0 0 0-17.895-43.251 60.75 60.75 0 0 0-43.235-17.929z\"\n fill=\"url(#linearGradient1780)\"\n />\n <path\n d=\"M87.184 25.227c-33.733 0-61.166 27.423-61.178 61.13a60.98 60.98 0 0 0 9.349 32.535l1.455 2.313-6.179 22.558 23.146-6.069 2.235 1.324c9.387 5.571 20.15 8.517 31.126 8.523h.023c33.707 0 61.14-27.426 61.153-61.135a60.75 60.75 0 0 0-17.895-43.251 60.75 60.75 0 0 0-43.235-17.928z\"\n fill=\"url(#b)\"\n />\n <path\n d=\"M68.772 55.603c-1.378-3.061-2.828-3.123-4.137-3.176l-3.524-.043c-1.226 0-3.218.46-4.902 2.3s-6.435 6.287-6.435 15.332 6.588 17.785 7.506 19.013 12.718 20.381 31.405 27.75c15.529 6.124 18.689 4.906 22.061 4.6s10.877-4.447 12.408-8.74 1.532-7.971 1.073-8.74-1.685-1.226-3.525-2.146-10.877-5.367-12.562-5.981-2.91-.919-4.137.921-4.746 5.979-5.819 7.206-2.144 1.381-3.984.462-7.76-2.861-14.784-9.124c-5.465-4.873-9.154-10.891-10.228-12.73s-.114-2.835.808-3.751c.825-.824 1.838-2.147 2.759-3.22s1.224-1.84 1.836-3.065.307-2.301-.153-3.22-4.032-10.011-5.666-13.647\"\n fill=\"#ffffff\"\n fillRule=\"evenodd\"\n />\n </svg>\n ),\n googleDocs: () => (\n <svg\n width=\"47px\"\n height=\"65px\"\n viewBox=\"0 0 47 65\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <defs>\n <path\n d=\"M29.375,0 L4.40625,0 C1.9828125,0 0,1.99431818 0,4.43181818 L0,60.5681818 C0,63.0056818 1.9828125,65 4.40625,65 L42.59375,65 C45.0171875,65 47,63.0056818 47,60.5681818 L47,17.7272727 L29.375,0 Z\"\n id=\"path-1\"\n />\n <path\n d=\"M29.375,0 L4.40625,0 C1.9828125,0 0,1.99431818 0,4.43181818 L0,60.5681818 C0,63.0056818 1.9828125,65 4.40625,65 L42.59375,65 C45.0171875,65 47,63.0056818 47,60.5681818 L47,17.7272727 L29.375,0 Z\"\n id=\"path-3\"\n />\n <linearGradient\n x1=\"50.0053945%\"\n y1=\"8.58610612%\"\n x2=\"50.0053945%\"\n y2=\"100.013939%\"\n id=\"linearGradient-5\"\n >\n <stop stopColor=\"#1A237E\" stopOpacity=\"0.2\" offset=\"0%\" />\n <stop stopColor=\"#1A237E\" stopOpacity=\"0.02\" offset=\"100%\" />\n </linearGradient>\n <path\n d=\"M29.375,0 L4.40625,0 C1.9828125,0 0,1.99431818 0,4.43181818 L0,60.5681818 C0,63.0056818 1.9828125,65 4.40625,65 L42.59375,65 C45.0171875,65 47,63.0056818 47,60.5681818 L47,17.7272727 L29.375,0 Z\"\n id=\"path-6\"\n />\n <path\n d=\"M29.375,0 L4.40625,0 C1.9828125,0 0,1.99431818 0,4.43181818 L0,60.5681818 C0,63.0056818 1.9828125,65 4.40625,65 L42.59375,65 C45.0171875,65 47,63.0056818 47,60.5681818 L47,17.7272727 L29.375,0 Z\"\n id=\"path-8\"\n />\n <path\n d=\"M29.375,0 L4.40625,0 C1.9828125,0 0,1.99431818 0,4.43181818 L0,60.5681818 C0,63.0056818 1.9828125,65 4.40625,65 L42.59375,65 C45.0171875,65 47,63.0056818 47,60.5681818 L47,17.7272727 L29.375,0 Z\"\n id=\"path-10\"\n />\n <path\n d=\"M29.375,0 L4.40625,0 C1.9828125,0 0,1.99431818 0,4.43181818 L0,60.5681818 C0,63.0056818 1.9828125,65 4.40625,65 L42.59375,65 C45.0171875,65 47,63.0056818 47,60.5681818 L47,17.7272727 L29.375,0 Z\"\n id=\"path-12\"\n />\n <path\n d=\"M29.375,0 L4.40625,0 C1.9828125,0 0,1.99431818 0,4.43181818 L0,60.5681818 C0,63.0056818 1.9828125,65 4.40625,65 L42.59375,65 C45.0171875,65 47,63.0056818 47,60.5681818 L47,17.7272727 L29.375,0 Z\"\n id=\"path-14\"\n />\n <radialGradient\n cx=\"3.16804688%\"\n cy=\"2.71744318%\"\n fx=\"3.16804688%\"\n fy=\"2.71744318%\"\n r=\"161.248516%\"\n gradientTransform=\"translate(0.031680,0.027174),scale(1.000000,0.723077),translate(-0.031680,-0.027174)\"\n id=\"radialGradient-16\"\n >\n <stop stopColor=\"#FFFFFF\" stopOpacity=\"0.1\" offset=\"0%\" />\n <stop stopColor=\"#FFFFFF\" stopOpacity=\"0\" offset=\"100%\" />\n </radialGradient>\n </defs>\n <g\n id=\"Page-1\"\n stroke=\"none\"\n strokeWidth=\"1\"\n fill=\"none\"\n fillRule=\"evenodd\"\n >\n <g transform=\"translate(-451.000000, -463.000000)\">\n <g id=\"Hero\" transform=\"translate(0.000000, 63.000000)\">\n <g id=\"Personal\" transform=\"translate(277.000000, 309.000000)\">\n <g id=\"Docs-icon\" transform=\"translate(174.000000, 91.000000)\">\n <g id=\"Group\">\n <g id=\"Clipped\">\n <mask id=\"mask-2\" fill=\"white\">\n <use xlinkHref=\"#path-1\" />\n </mask>\n <g id=\"SVGID_1_\" />\n <path\n d=\"M29.375,0 L4.40625,0 C1.9828125,0 0,1.99431818 0,4.43181818 L0,60.5681818 C0,63.0056818 1.9828125,65 4.40625,65 L42.59375,65 C45.0171875,65 47,63.0056818 47,60.5681818 L47,17.7272727 L36.71875,10.3409091 L29.375,0 Z\"\n id=\"Path\"\n fill=\"#4285F4\"\n fillRule=\"nonzero\"\n mask=\"url(#mask-2)\"\n />\n </g>\n <g id=\"Clipped\">\n <mask id=\"mask-4\" fill=\"white\">\n <use xlinkHref=\"#path-3\" />\n </mask>\n <g id=\"SVGID_1_\" />\n <polygon\n id=\"Path\"\n fill=\"url(#linearGradient-5)\"\n fillRule=\"nonzero\"\n mask=\"url(#mask-4)\"\n points=\"30.6638281 16.4309659 47 32.8582386 47 17.7272727\"\n ></polygon>\n </g>\n <g id=\"Clipped\">\n <mask id=\"mask-7\" fill=\"white\">\n <use xlinkHref=\"#path-6\" />\n </mask>\n <g id=\"SVGID_1_\" />\n <path\n d=\"M11.75,47.2727273 L35.25,47.2727273 L35.25,44.3181818 L11.75,44.3181818 L11.75,47.2727273 Z M11.75,53.1818182 L29.375,53.1818182 L29.375,50.2272727 L11.75,50.2272727 L11.75,53.1818182 Z M11.75,32.5 L11.75,35.4545455 L35.25,35.4545455 L35.25,32.5 L11.75,32.5 Z M11.75,41.3636364 L35.25,41.3636364 L35.25,38.4090909 L11.75,38.4090909 L11.75,41.3636364 Z\"\n id=\"Shape\"\n fill=\"#F1F1F1\"\n fillRule=\"nonzero\"\n mask=\"url(#mask-7)\"\n />\n </g>\n <g id=\"Clipped\">\n <mask id=\"mask-9\" fill=\"white\">\n <use xlinkHref=\"#path-8\" />\n </mask>\n <g id=\"SVGID_1_\" />\n <g id=\"Group\" mask=\"url(#mask-9)\">\n <g transform=\"translate(26.437500, -2.954545)\">\n <path\n d=\"M2.9375,2.95454545 L2.9375,16.25 C2.9375,18.6985795 4.90929688,20.6818182 7.34375,20.6818182 L20.5625,20.6818182 L2.9375,2.95454545 Z\"\n id=\"Path\"\n fill=\"#A1C2FA\"\n fillRule=\"nonzero\"\n />\n </g>\n </g>\n </g>\n <g id=\"Clipped\">\n <mask id=\"mask-11\" fill=\"white\">\n <use xlinkHref=\"#path-10\" />\n </mask>\n <g id=\"SVGID_1_\" />\n <path\n d=\"M4.40625,0 C1.9828125,0 0,1.99431818 0,4.43181818 L0,4.80113636 C0,2.36363636 1.9828125,0.369318182 4.40625,0.369318182 L29.375,0.369318182 L29.375,0 L4.40625,0 Z\"\n id=\"Path\"\n fillOpacity=\"0.2\"\n fill=\"#FFFFFF\"\n fillRule=\"nonzero\"\n mask=\"url(#mask-11)\"\n />\n </g>\n <g id=\"Clipped\">\n <mask id=\"mask-13\" fill=\"white\">\n <use xlinkHref=\"#path-12\" />\n </mask>\n <g id=\"SVGID_1_\" />\n <path\n d=\"M42.59375,64.6306818 L4.40625,64.6306818 C1.9828125,64.6306818 0,62.6363636 0,60.1988636 L0,60.5681818 C0,63.0056818 1.9828125,65 4.40625,65 L42.59375,65 C45.0171875,65 47,63.0056818 47,60.5681818 L47,60.1988636 C47,62.6363636 45.0171875,64.6306818 42.59375,64.6306818 Z\"\n id=\"Path\"\n fillOpacity=\"0.2\"\n fill=\"#1A237E\"\n fillRule=\"nonzero\"\n mask=\"url(#mask-13)\"\n />\n </g>\n <g id=\"Clipped\">\n <mask id=\"mask-15\" fill=\"white\">\n <use xlinkHref=\"#path-14\" />\n </mask>\n <g id=\"SVGID_1_\" />\n <path\n d=\"M33.78125,17.7272727 C31.3467969,17.7272727 29.375,15.7440341 29.375,13.2954545 L29.375,13.6647727 C29.375,16.1133523 31.3467969,18.0965909 33.78125,18.0965909 L47,18.0965909 L47,17.7272727 L33.78125,17.7272727 Z\"\n id=\"Path\"\n fillOpacity=\"0.1\"\n fill=\"#1A237E\"\n fillRule=\"nonzero\"\n mask=\"url(#mask-15)\"\n />\n </g>\n </g>\n <path\n d=\"M29.375,0 L4.40625,0 C1.9828125,0 0,1.99431818 0,4.43181818 L0,60.5681818 C0,63.0056818 1.9828125,65 4.40625,65 L42.59375,65 C45.0171875,65 47,63.0056818 47,60.5681818 L47,17.7272727 L29.375,0 Z\"\n id=\"Path\"\n fill=\"url(#radialGradient-16)\"\n fillRule=\"nonzero\"\n />\n </g>\n </g>\n </g>\n </g>\n </g>\n </svg>\n ),\n zapier: () => (\n <svg\n width=\"105\"\n height=\"28\"\n viewBox=\"0 0 244 66\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M57.1877 45.2253L57.1534 45.1166L78.809 25.2914V15.7391H44.0663V25.2914H64.8181L64.8524 25.3829L43.4084 45.2253V54.7775H79.1579V45.2253H57.1877Z\"\n fill=\"#201515\"\n />\n <path\n d=\"M100.487 14.8297C96.4797 14.8297 93.2136 15.434 90.6892 16.6429C88.3376 17.6963 86.3568 19.4321 85.0036 21.6249C83.7091 23.8321 82.8962 26.2883 82.6184 28.832L93.1602 30.3135C93.5415 28.0674 94.3042 26.4754 95.4482 25.5373C96.7486 24.5562 98.3511 24.0605 99.9783 24.136C102.118 24.136 103.67 24.7079 104.634 25.8519C105.59 26.9959 106.076 28.5803 106.076 30.6681V31.7091H95.9401C90.7807 31.7091 87.0742 32.8531 84.8206 35.1411C82.5669 37.429 81.442 40.4492 81.4458 44.2014C81.4458 48.0452 82.5707 50.9052 84.8206 52.7813C87.0704 54.6574 89.8999 55.5897 93.3089 55.5783C97.5379 55.5783 100.791 54.1235 103.067 51.214C104.412 49.426 105.372 47.3793 105.887 45.2024H106.27L107.723 54.7546H117.275V30.5651C117.275 25.5659 115.958 21.6936 113.323 18.948C110.688 16.2024 106.409 14.8297 100.487 14.8297ZM103.828 44.6475C102.312 45.9116 100.327 46.5408 97.8562 46.5408C95.8199 46.5408 94.4052 46.1843 93.6121 45.4712C93.2256 45.1338 92.9182 44.7155 92.7116 44.246C92.505 43.7764 92.4043 43.2671 92.4166 42.7543C92.3941 42.2706 92.4702 41.7874 92.6403 41.3341C92.8104 40.8808 93.071 40.4668 93.4062 40.1174C93.7687 39.7774 94.1964 39.5145 94.6633 39.3444C95.1303 39.1743 95.6269 39.1006 96.1231 39.1278H106.093V39.7856C106.113 40.7154 105.919 41.6374 105.527 42.4804C105.134 43.3234 104.553 44.0649 103.828 44.6475Z\"\n fill=\"#201515\"\n />\n <path\n d=\"M175.035 15.7391H163.75V54.7833H175.035V15.7391Z\"\n fill=\"#201515\"\n />\n <path\n d=\"M241.666 15.7391C238.478 15.7391 235.965 16.864 234.127 19.1139C232.808 20.7307 231.805 23.1197 231.119 26.2809H230.787L229.311 15.7391H219.673V54.7775H230.959V34.7578C230.959 32.2335 231.55 30.2982 232.732 28.9521C233.914 27.606 236.095 26.933 239.275 26.933H243.559V15.7391H241.666Z\"\n fill=\"#201515\"\n />\n <path\n d=\"M208.473 17.0147C205.839 15.4474 202.515 14.6657 198.504 14.6695C192.189 14.6695 187.247 16.4675 183.678 20.0634C180.108 23.6593 178.324 28.6166 178.324 34.9352C178.233 38.7553 179.067 42.5407 180.755 45.9689C182.3 49.0238 184.706 51.5592 187.676 53.2618C190.665 54.9892 194.221 55.8548 198.344 55.8586C201.909 55.8586 204.887 55.3095 207.278 54.2113C209.526 53.225 211.483 51.6791 212.964 49.7211C214.373 47.7991 215.42 45.6359 216.052 43.3377L206.329 40.615C205.919 42.1094 205.131 43.4728 204.041 44.5732C202.942 45.6714 201.102 46.2206 198.521 46.2206C195.451 46.2206 193.163 45.3416 191.657 43.5837C190.564 42.3139 189.878 40.5006 189.575 38.1498H216.201C216.31 37.0515 216.367 36.1306 216.367 35.387V32.9561C216.431 29.6903 215.757 26.4522 214.394 23.4839C213.118 20.7799 211.054 18.5248 208.473 17.0147ZM198.178 23.9758C202.754 23.9758 205.348 26.2275 205.962 30.731H189.775C190.032 29.2284 190.655 27.8121 191.588 26.607C193.072 24.8491 195.268 23.972 198.178 23.9758Z\"\n fill=\"#201515\"\n />\n <path\n d=\"M169.515 0.00366253C168.666 -0.0252113 167.82 0.116874 167.027 0.421484C166.234 0.726094 165.511 1.187 164.899 1.77682C164.297 2.3723 163.824 3.08658 163.512 3.87431C163.2 4.66204 163.055 5.50601 163.086 6.35275C163.056 7.20497 163.201 8.05433 163.514 8.84781C163.826 9.64129 164.299 10.3619 164.902 10.9646C165.505 11.5673 166.226 12.0392 167.02 12.3509C167.814 12.6626 168.663 12.8074 169.515 12.7762C170.362 12.8082 171.206 12.6635 171.994 12.3514C172.782 12.0392 173.496 11.5664 174.091 10.963C174.682 10.3534 175.142 9.63077 175.446 8.83849C175.75 8.04621 175.89 7.20067 175.859 6.35275C175.898 5.50985 175.761 4.66806 175.456 3.88115C175.151 3.09424 174.686 2.37951 174.09 1.78258C173.493 1.18565 172.779 0.719644 171.992 0.414327C171.206 0.109011 170.364 -0.0288946 169.521 0.00938803L169.515 0.00366253Z\"\n fill=\"#201515\"\n />\n <path\n d=\"M146.201 14.6695C142.357 14.6695 139.268 15.8764 136.935 18.2902C135.207 20.0786 133.939 22.7479 133.131 26.2981H132.771L131.295 15.7563H121.657V66H132.942V45.3054H133.354C133.698 46.6852 134.181 48.0267 134.795 49.3093C135.75 51.3986 137.316 53.1496 139.286 54.3314C141.328 55.446 143.629 56.0005 145.955 55.9387C150.68 55.9387 154.277 54.0988 156.748 50.419C159.219 46.7392 160.455 41.6046 160.455 35.0153C160.455 28.6509 159.259 23.6689 156.869 20.0691C154.478 16.4694 150.922 14.6695 146.201 14.6695ZM147.345 42.9602C146.029 44.8668 143.97 45.8201 141.167 45.8201C140.012 45.8735 138.86 45.6507 137.808 45.1703C136.755 44.6898 135.832 43.9656 135.116 43.0574C133.655 41.2233 132.927 38.7122 132.931 35.5243V34.7807C132.931 31.5432 133.659 29.0646 135.116 27.3448C136.572 25.625 138.59 24.7747 141.167 24.7937C144.02 24.7937 146.092 25.6994 147.385 27.5107C148.678 29.322 149.324 31.8483 149.324 35.0896C149.332 38.4414 148.676 41.065 147.356 42.9602H147.345Z\"\n fill=\"#201515\"\n />\n <path d=\"M39.0441 45.2253H0V54.789H39.0441V45.2253Z\" fill=\"#FF4F00\" />\n </svg>\n ),\n messenger: () => (\n <svg\n width=\"100\"\n height=\"100\"\n viewBox=\"0 0 48 48\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <radialGradient\n id=\"8O3wK6b5ASW2Wn6hRCB5xa_YFbzdUk7Q3F8_gr1\"\n cx=\"11.087\"\n cy=\"7.022\"\n r=\"47.612\"\n gradientTransform=\"matrix(1 0 0 -1 0 50)\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop offset=\"0\" stopColor=\"#1292ff\"></stop>\n <stop offset=\".079\" stopColor=\"#2982ff\"></stop>\n <stop offset=\".23\" stopColor=\"#4e69ff\"></stop>\n <stop offset=\".351\" stopColor=\"#6559ff\"></stop>\n <stop offset=\".428\" stopColor=\"#6d53ff\"></stop>\n <stop offset=\".754\" stopColor=\"#df47aa\"></stop>\n <stop offset=\".946\" stopColor=\"#ff6257\"></stop>\n </radialGradient>\n <path\n fill=\"url(#8O3wK6b5ASW2Wn6hRCB5xa_YFbzdUk7Q3F8_gr1)\"\n d=\"M44,23.5C44,34.27,35.05,43,24,43c-1.651,0-3.25-0.194-4.784-0.564\tc-0.465-0.112-0.951-0.069-1.379,0.145L13.46,44.77C12.33,45.335,11,44.513,11,43.249v-4.025c0-0.575-0.257-1.111-0.681-1.499\tC6.425,34.165,4,29.11,4,23.5C4,12.73,12.95,4,24,4S44,12.73,44,23.5z\"\n />\n <path\n d=\"M34.992,17.292c-0.428,0-0.843,0.142-1.2,0.411l-5.694,4.215\tc-0.133,0.1-0.28,0.15-0.435,0.15c-0.15,0-0.291-0.047-0.41-0.136l-3.972-2.99c-0.808-0.601-1.76-0.918-2.757-0.918\tc-1.576,0-3.025,0.791-3.876,2.116l-1.211,1.891l-4.12,6.695c-0.392,0.614-0.422,1.372-0.071,2.014\tc0.358,0.654,1.034,1.06,1.764,1.06c0.428,0,0.843-0.142,1.2-0.411l5.694-4.215c0.133-0.1,0.28-0.15,0.435-0.15\tc0.15,0,0.291,0.047,0.41,0.136l3.972,2.99c0.809,0.602,1.76,0.918,2.757,0.918c1.576,0,3.025-0.791,3.876-2.116l1.211-1.891\tl4.12-6.695c0.392-0.614,0.422-1.372,0.071-2.014C36.398,17.698,35.722,17.292,34.992,17.292L34.992,17.292z\"\n opacity=\".05\"\n />\n <path\n d=\"M34.992,17.792c-0.319,0-0.63,0.107-0.899,0.31l-5.697,4.218\tc-0.216,0.163-0.468,0.248-0.732,0.248c-0.259,0-0.504-0.082-0.71-0.236l-3.973-2.991c-0.719-0.535-1.568-0.817-2.457-0.817\tc-1.405,0-2.696,0.705-3.455,1.887l-1.21,1.891l-4.115,6.688c-0.297,0.465-0.32,1.033-0.058,1.511c0.266,0.486,0.787,0.8,1.325,0.8\tc0.319,0,0.63-0.107,0.899-0.31l5.697-4.218c0.216-0.163,0.468-0.248,0.732-0.248c0.259,0,0.504,0.082,0.71,0.236l3.973,2.991\tc0.719,0.535,1.568,0.817,2.457,0.817c1.405,0,2.696-0.705,3.455-1.887l1.21-1.891l4.115-6.688c0.297-0.465,0.32-1.033,0.058-1.511\tC36.051,18.106,35.531,17.792,34.992,17.792L34.992,17.792z\"\n opacity=\".07\"\n />\n <path\n fill=\"#ffffff\"\n d=\"M34.394,18.501l-5.7,4.22c-0.61,0.46-1.44,0.46-2.04,0.01L22.68,19.74\tc-1.68-1.25-4.06-0.82-5.19,0.94l-1.21,1.89l-4.11,6.68c-0.6,0.94,0.55,2.01,1.44,1.34l5.7-4.22c0.61-0.46,1.44-0.46,2.04-0.01\tl3.974,2.991c1.68,1.25,4.06,0.82,5.19-0.94l1.21-1.89l4.11-6.68C36.434,18.901,35.284,17.831,34.394,18.501z\"\n />\n </svg>\n ),\n};\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/animated-beam.json b/public/r/animated-beam.jsonindex 0dba1c2a..f3ee3aec 100644--- a/public/r/animated-beam.json+++ b/public/r/animated-beam.json@@ -11,7 +11,8 @@{"path": "registry/magicui/animated-beam.tsx","content": "\"use client\";\n\nimport { motion } from \"motion/react\";\nimport { RefObject, useEffect, useId, useState } from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nexport interface AnimatedBeamProps {\n className?: string;\n containerRef: RefObject<HTMLElement | null>; // Container ref\n fromRef: RefObject<HTMLElement | null>;\n toRef: RefObject<HTMLElement | null>;\n curvature?: number;\n reverse?: boolean;\n pathColor?: string;\n pathWidth?: number;\n pathOpacity?: number;\n gradientStartColor?: string;\n gradientStopColor?: string;\n delay?: number;\n duration?: number;\n startXOffset?: number;\n startYOffset?: number;\n endXOffset?: number;\n endYOffset?: number;\n}\n\nexport const AnimatedBeam: React.FC<AnimatedBeamProps> = ({\n className,\n containerRef,\n fromRef,\n toRef,\n curvature = 0,\n reverse = false, // Include the reverse prop\n duration = Math.random() * 3 + 4,\n delay = 0,\n pathColor = \"gray\",\n pathWidth = 2,\n pathOpacity = 0.2,\n gradientStartColor = \"#ffaa40\",\n gradientStopColor = \"#9c40ff\",\n startXOffset = 0,\n startYOffset = 0,\n endXOffset = 0,\n endYOffset = 0,\n}) => {\n const id = useId();\n const [pathD, setPathD] = useState(\"\");\n const [svgDimensions, setSvgDimensions] = useState({ width: 0, height: 0 });\n\n // Calculate the gradient coordinates based on the reverse prop\n const gradientCoordinates = reverse\n ? {\n x1: [\"90%\", \"-10%\"],\n x2: [\"100%\", \"0%\"],\n y1: [\"0%\", \"0%\"],\n y2: [\"0%\", \"0%\"],\n }\n : {\n x1: [\"10%\", \"110%\"],\n x2: [\"0%\", \"100%\"],\n y1: [\"0%\", \"0%\"],\n y2: [\"0%\", \"0%\"],\n };\n\n useEffect(() => {\n const updatePath = () => {\n if (containerRef.current && fromRef.current && toRef.current) {\n const containerRect = containerRef.current.getBoundingClientRect();\n const rectA = fromRef.current.getBoundingClientRect();\n const rectB = toRef.current.getBoundingClientRect();\n\n const svgWidth = containerRect.width;\n const svgHeight = containerRect.height;\n setSvgDimensions({ width: svgWidth, height: svgHeight });\n\n const startX =\n rectA.left - containerRect.left + rectA.width / 2 + startXOffset;\n const startY =\n rectA.top - containerRect.top + rectA.height / 2 + startYOffset;\n const endX =\n rectB.left - containerRect.left + rectB.width / 2 + endXOffset;\n const endY =\n rectB.top - containerRect.top + rectB.height / 2 + endYOffset;\n\n const controlY = startY - curvature;\n const d = `M ${startX},${startY} Q ${\n (startX + endX) / 2\n },${controlY} ${endX},${endY}`;\n setPathD(d);\n }\n };\n\n // Initialize ResizeObserver\n const resizeObserver = new ResizeObserver((entries) => {\n // For all entries, recalculate the path\n for (let entry of entries) {\n updatePath();\n }\n });\n\n // Observe the container element\n if (containerRef.current) {\n resizeObserver.observe(containerRef.current);\n }\n\n // Call the updatePath initially to set the initial path\n updatePath();\n\n // Clean up the observer on component unmount\n return () => {\n resizeObserver.disconnect();\n };\n }, [\n containerRef,\n fromRef,\n toRef,\n curvature,\n startXOffset,\n startYOffset,\n endXOffset,\n endYOffset,\n ]);\n\n return (\n <svg\n fill=\"none\"\n width={svgDimensions.width}\n height={svgDimensions.height}\n xmlns=\"http://www.w3.org/2000/svg\"\n className={cn(\n \"pointer-events-none absolute left-0 top-0 transform-gpu stroke-2\",\n className,\n )}\n viewBox={`0 0 ${svgDimensions.width} ${svgDimensions.height}`}\n >\n <path\n d={pathD}\n stroke={pathColor}\n strokeWidth={pathWidth}\n strokeOpacity={pathOpacity}\n strokeLinecap=\"round\"\n />\n <path\n d={pathD}\n strokeWidth={pathWidth}\n stroke={`url(#${id})`}\n strokeOpacity=\"1\"\n strokeLinecap=\"round\"\n />\n <defs>\n <motion.linearGradient\n className=\"transform-gpu\"\n id={id}\n gradientUnits={\"userSpaceOnUse\"}\n initial={{\n x1: \"0%\",\n x2: \"0%\",\n y1: \"0%\",\n y2: \"0%\",\n }}\n animate={{\n x1: gradientCoordinates.x1,\n x2: gradientCoordinates.x2,\n y1: gradientCoordinates.y1,\n y2: gradientCoordinates.y2,\n }}\n transition={{\n delay,\n duration,\n ease: [0.16, 1, 0.3, 1], // https://easings.net/#easeOutExpo\n repeat: Infinity,\n repeatDelay: 0,\n }}\n >\n <stop stopColor={gradientStartColor} stopOpacity=\"0\"></stop>\n <stop stopColor={gradientStartColor}></stop>\n <stop offset=\"32.5%\" stopColor={gradientStopColor}></stop>\n <stop\n offset=\"100%\"\n stopColor={gradientStopColor}\n stopOpacity=\"0\"\n ></stop>\n </motion.linearGradient>\n </defs>\n </svg>\n );\n};\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/animated-grid-pattern.json b/public/r/animated-grid-pattern.jsonindex 6d3fcb85..446c4d6c 100644--- a/public/r/animated-grid-pattern.json+++ b/public/r/animated-grid-pattern.json@@ -11,7 +11,8 @@{"path": "registry/magicui/animated-grid-pattern.tsx","content": "\"use client\";\n\nimport { motion } from \"motion/react\";\nimport {\n ComponentPropsWithoutRef,\n useEffect,\n useId,\n useRef,\n useState,\n} from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nexport interface AnimatedGridPatternProps\n extends ComponentPropsWithoutRef<\"svg\"> {\n width?: number;\n height?: number;\n x?: number;\n y?: number;\n strokeDasharray?: any;\n numSquares?: number;\n maxOpacity?: number;\n duration?: number;\n repeatDelay?: number;\n}\n\nexport function AnimatedGridPattern({\n width = 40,\n height = 40,\n x = -1,\n y = -1,\n strokeDasharray = 0,\n numSquares = 50,\n className,\n maxOpacity = 0.5,\n duration = 4,\n repeatDelay = 0.5,\n ...props\n}: AnimatedGridPatternProps) {\n const id = useId();\n const containerRef = useRef(null);\n const [dimensions, setDimensions] = useState({ width: 0, height: 0 });\n const [squares, setSquares] = useState(() => generateSquares(numSquares));\n\n function getPos() {\n return [\n Math.floor((Math.random() * dimensions.width) / width),\n Math.floor((Math.random() * dimensions.height) / height),\n ];\n }\n\n // Adjust the generateSquares function to return objects with an id, x, and y\n function generateSquares(count: number) {\n return Array.from({ length: count }, (_, i) => ({\n id: i,\n pos: getPos(),\n }));\n }\n\n // Function to update a single square's position\n const updateSquarePosition = (id: number) => {\n setSquares((currentSquares) =>\n currentSquares.map((sq) =>\n sq.id === id\n ? {\n ...sq,\n pos: getPos(),\n }\n : sq,\n ),\n );\n };\n\n // Update squares to animate in\n useEffect(() => {\n if (dimensions.width && dimensions.height) {\n setSquares(generateSquares(numSquares));\n }\n }, [dimensions, numSquares]);\n\n // Resize observer to update container dimensions\n useEffect(() => {\n const resizeObserver = new ResizeObserver((entries) => {\n for (let entry of entries) {\n setDimensions({\n width: entry.contentRect.width,\n height: entry.contentRect.height,\n });\n }\n });\n\n if (containerRef.current) {\n resizeObserver.observe(containerRef.current);\n }\n\n return () => {\n if (containerRef.current) {\n resizeObserver.unobserve(containerRef.current);\n }\n };\n }, [containerRef]);\n\n return (\n <svg\n ref={containerRef}\n aria-hidden=\"true\"\n className={cn(\n \"pointer-events-none absolute inset-0 h-full w-full fill-gray-400/30 stroke-gray-400/30\",\n className,\n )}\n {...props}\n >\n <defs>\n <pattern\n id={id}\n width={width}\n height={height}\n patternUnits=\"userSpaceOnUse\"\n x={x}\n y={y}\n >\n <path\n d={`M.5 ${height}V.5H${width}`}\n fill=\"none\"\n strokeDasharray={strokeDasharray}\n />\n </pattern>\n </defs>\n <rect width=\"100%\" height=\"100%\" fill={`url(#${id})`} />\n <svg x={x} y={y} className=\"overflow-visible\">\n {squares.map(({ pos: [x, y], id }, index) => (\n <motion.rect\n initial={{ opacity: 0 }}\n animate={{ opacity: maxOpacity }}\n transition={{\n duration,\n repeat: 1,\n delay: index * 0.1,\n repeatType: \"reverse\",\n }}\n onAnimationComplete={() => updateSquarePosition(id)}\n key={`${x}-${y}-${index}`}\n width={width - 1}\n height={height - 1}\n x={x * width + 1}\n y={y * height + 1}\n fill=\"currentColor\"\n strokeWidth=\"0\"\n />\n ))}\n </svg>\n </svg>\n );\n}\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/animated-list-demo.json b/public/r/animated-list-demo.jsonindex 080e3231..b800d12c 100644--- a/public/r/animated-list-demo.json+++ b/public/r/animated-list-demo.json@@ -11,7 +11,8 @@{"path": "registry/example/animated-list-demo.tsx","content": "\"use client\";\n\nimport { cn } from \"@/lib/utils\";\nimport { AnimatedList } from \"@/registry/magicui/animated-list\";\n\ninterface Item {\n name: string;\n description: string;\n icon: string;\n color: string;\n time: string;\n}\n\nlet notifications = [\n {\n name: \"Payment received\",\n description: \"Magic UI\",\n time: \"15m ago\",\n\n icon: \"💸\",\n color: \"#00C9A7\",\n },\n {\n name: \"User signed up\",\n description: \"Magic UI\",\n time: \"10m ago\",\n icon: \"👤\",\n color: \"#FFB800\",\n },\n {\n name: \"New message\",\n description: \"Magic UI\",\n time: \"5m ago\",\n icon: \"💬\",\n color: \"#FF3D71\",\n },\n {\n name: \"New event\",\n description: \"Magic UI\",\n time: \"2m ago\",\n icon: \"🗞️\",\n color: \"#1E86FF\",\n },\n];\n\nnotifications = Array.from({ length: 10 }, () => notifications).flat();\n\nconst Notification = ({ name, description, icon, color, time }: Item) => {\n return (\n <figure\n className={cn(\n \"relative mx-auto min-h-fit w-full max-w-[400px] cursor-pointer overflow-hidden rounded-2xl p-4\",\n // animation styles\n \"transition-all duration-200 ease-in-out hover:scale-[103%]\",\n // light styles\n \"bg-white [box-shadow:0_0_0_1px_rgba(0,0,0,.03),0_2px_4px_rgba(0,0,0,.05),0_12px_24px_rgba(0,0,0,.05)]\",\n // dark styles\n \"transform-gpu dark:bg-transparent dark:backdrop-blur-md dark:[border:1px_solid_rgba(255,255,255,.1)] dark:[box-shadow:0_-20px_80px_-20px_#ffffff1f_inset]\",\n )}\n >\n <div className=\"flex flex-row items-center gap-3\">\n <div\n className=\"flex size-10 items-center justify-center rounded-2xl\"\n style={{\n backgroundColor: color,\n }}\n >\n <span className=\"text-lg\">{icon}</span>\n </div>\n <div className=\"flex flex-col overflow-hidden\">\n <figcaption className=\"flex flex-row items-center whitespace-pre text-lg font-medium dark:text-white \">\n <span className=\"text-sm sm:text-lg\">{name}</span>\n <span className=\"mx-1\">·</span>\n <span className=\"text-xs text-gray-500\">{time}</span>\n </figcaption>\n <p className=\"text-sm font-normal dark:text-white/60\">\n {description}\n </p>\n </div>\n </div>\n </figure>\n );\n};\n\nexport default function AnimatedListDemo({\n className,\n}: {\n className?: string;\n}) {\n return (\n <div\n className={cn(\n \"relative flex h-[500px] w-full flex-col overflow-hidden rounded-lg border bg-background p-6 md:shadow-xl\",\n className,\n )}\n >\n <AnimatedList>\n {notifications.map((item, idx) => (\n <Notification {...item} key={idx} />\n ))}\n </AnimatedList>\n </div>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/animated-list.json b/public/r/animated-list.jsonindex c80773de..333deffc 100644--- a/public/r/animated-list.json+++ b/public/r/animated-list.json@@ -11,7 +11,8 @@{"path": "registry/magicui/animated-list.tsx","content": "\"use client\";\n\nimport { AnimatePresence, motion } from \"motion/react\";\nimport React, {\n ComponentPropsWithoutRef,\n useEffect,\n useMemo,\n useState,\n} from \"react\";\n\nexport function AnimatedListItem({ children }: { children: React.ReactNode }) {\n const animations = {\n initial: { scale: 0, opacity: 0 },\n animate: { scale: 1, opacity: 1, originY: 0 },\n exit: { scale: 0, opacity: 0 },\n transition: { type: \"spring\", stiffness: 350, damping: 40 },\n };\n\n return (\n <motion.div {...animations} layout className=\"mx-auto w-full\">\n {children}\n </motion.div>\n );\n}\n\nexport interface AnimatedListProps extends ComponentPropsWithoutRef<\"div\"> {\n children: React.ReactNode;\n delay?: number;\n}\n\nexport const AnimatedList = React.memo(\n ({ children, className, delay = 1000, ...props }: AnimatedListProps) => {\n const [index, setIndex] = useState(0);\n const childrenArray = useMemo(\n () => React.Children.toArray(children),\n [children],\n );\n\n useEffect(() => {\n if (index < childrenArray.length - 1) {\n const timeout = setTimeout(() => {\n setIndex((prevIndex) => prevIndex + 1);\n }, delay);\n\n return () => clearTimeout(timeout);\n }\n }, [index, delay, childrenArray.length]);\n\n const itemsToShow = useMemo(() => {\n const result = childrenArray.slice(0, index + 1).reverse();\n return result;\n }, [index, childrenArray]);\n\n return (\n <div\n className={`flex flex-col items-center gap-4 ${className}`}\n {...props}\n >\n <AnimatePresence>\n {itemsToShow.map((item) => (\n <AnimatedListItem key={(item as React.ReactElement).key}>\n {item}\n </AnimatedListItem>\n ))}\n </AnimatePresence>\n </div>\n );\n },\n);\n\nAnimatedList.displayName = \"AnimatedList\";\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/animated-shiny-text.json b/public/r/animated-shiny-text.jsonindex 6aa8296d..de16e5c3 100644--- a/public/r/animated-shiny-text.json+++ b/public/r/animated-shiny-text.json@@ -8,7 +8,8 @@{"path": "registry/magicui/animated-shiny-text.tsx","content": "import { ComponentPropsWithoutRef, CSSProperties, FC } from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nexport interface AnimatedShinyTextProps\n extends ComponentPropsWithoutRef<\"span\"> {\n shimmerWidth?: number;\n}\n\nexport const AnimatedShinyText: FC<AnimatedShinyTextProps> = ({\n children,\n className,\n shimmerWidth = 100,\n ...props\n}) => {\n return (\n <span\n style={\n {\n \"--shiny-width\": `${shimmerWidth}px`,\n } as CSSProperties\n }\n className={cn(\n \"mx-auto max-w-md text-neutral-600/70 dark:text-neutral-400/70\",\n\n // Shine effect\n \"animate-shiny-text bg-clip-text bg-no-repeat [background-position:0_0] [background-size:var(--shiny-width)_100%] [transition:background-position_1s_cubic-bezier(.6,.6,0,1)_infinite]\",\n\n // Shine gradient\n \"bg-gradient-to-r from-transparent via-black/80 via-50% to-transparent dark:via-white/80\",\n\n className,\n )}\n {...props}\n >\n {children}\n </span>\n );\n};\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}],"tailwind": {diff --git a/public/r/aurora-text-demo.json b/public/r/aurora-text-demo.jsonindex c937459b..9bb37395 100644--- a/public/r/aurora-text-demo.json+++ b/public/r/aurora-text-demo.json@@ -11,7 +11,8 @@{"path": "registry/example/aurora-text-demo.tsx","content": "import { AuroraText } from \"@/registry/magicui/aurora-text\";\n\nexport default function AuroraTextDemo() {\n return (\n <h1 className=\"text-4xl font-bold tracking-tighter md:text-5xl lg:text-7xl\">\n Ship <AuroraText>beautiful</AuroraText>\n </h1>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/aurora-text.json b/public/r/aurora-text.jsonindex 95d5925e..6bea1611 100644--- a/public/r/aurora-text.json+++ b/public/r/aurora-text.json@@ -11,7 +11,8 @@{"path": "registry/magicui/aurora-text.tsx","content": "\"use client\";\n\nimport { cn } from \"@/lib/utils\";\nimport { motion, MotionProps } from \"motion/react\";\nimport React from \"react\";\n\ninterface AuroraTextProps\n extends Omit<React.HTMLAttributes<HTMLElement>, keyof MotionProps> {\n className?: string;\n children: React.ReactNode;\n as?: React.ElementType;\n}\n\nexport function AuroraText({\n className,\n children,\n as: Component = \"span\",\n ...props\n}: AuroraTextProps) {\n const MotionComponent = motion.create(Component);\n\n return (\n <MotionComponent\n className={cn(\"relative inline-flex overflow-hidden\", className)}\n {...props}\n >\n {children}\n <span className=\"pointer-events-none absolute inset-0 mix-blend-lighten dark:mix-blend-darken\">\n <span className=\"pointer-events-none absolute -top-1/2 h-[30vw] w-[30vw] animate-[aurora-border_6s_ease-in-out_infinite,aurora-1_12s_ease-in-out_infinite_alternate] bg-[hsl(var(--color-1))] mix-blend-overlay blur-[1rem]\"></span>\n <span className=\"pointer-events-none absolute right-0 top-0 h-[30vw] w-[30vw] animate-[aurora-border_6s_ease-in-out_infinite,aurora-2_12s_ease-in-out_infinite_alternate] bg-[hsl(var(--color-2))] mix-blend-overlay blur-[1rem]\"></span>\n <span className=\"pointer-events-none absolute bottom-0 left-0 h-[30vw] w-[30vw] animate-[aurora-border_6s_ease-in-out_infinite,aurora-3_12s_ease-in-out_infinite_alternate] bg-[hsl(var(--color-3))] mix-blend-overlay blur-[1rem]\"></span>\n <span className=\"pointer-events-none absolute -bottom-1/2 right-0 h-[30vw] w-[30vw] animate-[aurora-border_6s_ease-in-out_infinite,aurora-4_12s_ease-in-out_infinite_alternate] bg-[hsl(var(--color-4))] mix-blend-overlay blur-[1rem]\"></span>\n </span>\n </MotionComponent>\n );\n}\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}],"tailwind": {diff --git a/public/r/avatar-circles-demo.json b/public/r/avatar-circles-demo.jsonindex 7c9d6ef6..d7809813 100644--- a/public/r/avatar-circles-demo.json+++ b/public/r/avatar-circles-demo.json@@ -11,7 +11,8 @@{"path": "registry/example/avatar-circles-demo.tsx","content": "import { AvatarCircles } from \"@/registry/magicui/avatar-circles\";\n\nconst avatars = [\n {\n imageUrl: \"https://avatars.githubusercontent.com/u/16860528\",\n profileUrl: \"https://github.com/dillionverma\",\n },\n {\n imageUrl: \"https://avatars.githubusercontent.com/u/20110627\",\n profileUrl: \"https://github.com/tomonarifeehan\",\n },\n {\n imageUrl: \"https://avatars.githubusercontent.com/u/106103625\",\n profileUrl: \"https://github.com/BankkRoll\",\n },\n {\n imageUrl: \"https://avatars.githubusercontent.com/u/59228569\",\n profileUrl: \"https://github.com/safethecode\",\n },\n {\n imageUrl: \"https://avatars.githubusercontent.com/u/59442788\",\n profileUrl: \"https://github.com/sanjay-mali\",\n },\n {\n imageUrl: \"https://avatars.githubusercontent.com/u/89768406\",\n profileUrl: \"https://github.com/itsarghyadas\",\n },\n];\n\nexport default function AvatarCirclesDemo() {\n return <AvatarCircles numPeople={99} avatarUrls={avatars} />;\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/avatar-circles.json b/public/r/avatar-circles.jsonindex 2c2c8670..4cb048f7 100644--- a/public/r/avatar-circles.json+++ b/public/r/avatar-circles.json@@ -8,7 +8,8 @@{"path": "registry/magicui/avatar-circles.tsx","content": "/* eslint-disable @next/next/no-img-element */\n\"use client\";\n\nimport { cn } from \"@/lib/utils\";\n\ninterface Avatar {\n imageUrl: string;\n profileUrl: string;\n}\ninterface AvatarCirclesProps {\n className?: string;\n numPeople?: number;\n avatarUrls: Avatar[];\n}\n\nexport const AvatarCircles = ({\n numPeople,\n className,\n avatarUrls,\n}: AvatarCirclesProps) => {\n return (\n <div className={cn(\"z-10 flex -space-x-4 rtl:space-x-reverse\", className)}>\n {avatarUrls.map((url, index) => (\n <a\n key={index}\n href={url.profileUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n <img\n key={index}\n className=\"h-10 w-10 rounded-full border-2 border-white dark:border-gray-800\"\n src={url.imageUrl}\n width={40}\n height={40}\n alt={`Avatar ${index + 1}`}\n />\n </a>\n ))}\n {(numPeople ?? 0) > 0 && (\n <a\n className=\"flex h-10 w-10 items-center justify-center rounded-full border-2 border-white bg-black text-center text-xs font-medium text-white hover:bg-gray-600 dark:border-gray-800 dark:bg-white dark:text-black\"\n href=\"\"\n >\n +{numPeople}\n </a>\n )}\n </div>\n );\n};\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/bento-demo-vertical.json b/public/r/bento-demo-vertical.jsonindex 5808f84b..c6ec4ed3 100644--- a/public/r/bento-demo-vertical.json+++ b/public/r/bento-demo-vertical.json@@ -14,7 +14,8 @@{"path": "registry/example/bento-demo-vertical.tsx","content": "import {\n BellIcon,\n CalendarIcon,\n FileTextIcon,\n GlobeIcon,\n InputIcon,\n} from \"@radix-ui/react-icons\";\n\nimport { BentoCard, BentoGrid } from \"@/registry/magicui/bento-grid\";\n\nconst features = [\n {\n Icon: FileTextIcon,\n name: \"Save your files\",\n description: \"We automatically save your files as you type.\",\n href: \"/\",\n cta: \"Learn more\",\n background: <img className=\"absolute -right-20 -top-20 opacity-60\" />,\n className: \"lg:row-start-1 lg:row-end-4 lg:col-start-2 lg:col-end-3\",\n },\n {\n Icon: InputIcon,\n name: \"Full text search\",\n description: \"Search through all your files in one place.\",\n href: \"/\",\n cta: \"Learn more\",\n background: <img className=\"absolute -right-20 -top-20 opacity-60\" />,\n className: \"lg:col-start-1 lg:col-end-2 lg:row-start-1 lg:row-end-3\",\n },\n {\n Icon: GlobeIcon,\n name: \"Multilingual\",\n description: \"Supports 100+ languages and counting.\",\n href: \"/\",\n cta: \"Learn more\",\n background: <img className=\"absolute -right-20 -top-20 opacity-60\" />,\n className: \"lg:col-start-1 lg:col-end-2 lg:row-start-3 lg:row-end-4\",\n },\n {\n Icon: CalendarIcon,\n name: \"Calendar\",\n description: \"Use the calendar to filter your files by date.\",\n href: \"/\",\n cta: \"Learn more\",\n background: <img className=\"absolute -right-20 -top-20 opacity-60\" />,\n className: \"lg:col-start-3 lg:col-end-3 lg:row-start-1 lg:row-end-2\",\n },\n {\n Icon: BellIcon,\n name: \"Notifications\",\n description:\n \"Get notified when someone shares a file or mentions you in a comment.\",\n href: \"/\",\n cta: \"Learn more\",\n background: <img className=\"absolute -right-20 -top-20 opacity-60\" />,\n className: \"lg:col-start-3 lg:col-end-3 lg:row-start-2 lg:row-end-4\",\n },\n];\n\nexport default function BentoDemo() {\n return (\n <BentoGrid className=\"lg:grid-rows-3\">\n {features.map((feature) => (\n <BentoCard key={feature.name} {...feature} />\n ))}\n </BentoGrid>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/bento-demo.json b/public/r/bento-demo.jsonindex cf9fb904..47d984c7 100644--- a/public/r/bento-demo.json+++ b/public/r/bento-demo.json@@ -19,7 +19,8 @@{"path": "registry/example/bento-demo.tsx","content": "import { CalendarIcon, FileTextIcon } from \"@radix-ui/react-icons\";\nimport { BellIcon, Share2Icon } from \"lucide-react\";\n\nimport { Calendar } from \"@/components/ui/calendar\";\nimport { cn } from \"@/lib/utils\";\nimport AnimatedBeamMultipleOutputDemo from \"@/registry/example/animated-beam-multiple-outputs\";\nimport AnimatedListDemo from \"@/registry/example/animated-list-demo\";\nimport { BentoCard, BentoGrid } from \"@/registry/magicui/bento-grid\";\nimport { Marquee } from \"@/registry/magicui/marquee\";\n\nconst files = [\n {\n name: \"bitcoin.pdf\",\n body: \"Bitcoin is a cryptocurrency invented in 2008 by an unknown person or group of people using the name Satoshi Nakamoto.\",\n },\n {\n name: \"finances.xlsx\",\n body: \"A spreadsheet or worksheet is a file made of rows and columns that help sort data, arrange data easily, and calculate numerical data.\",\n },\n {\n name: \"logo.svg\",\n body: \"Scalable Vector Graphics is an Extensible Markup Language-based vector image format for two-dimensional graphics with support for interactivity and animation.\",\n },\n {\n name: \"keys.gpg\",\n body: \"GPG keys are used to encrypt and decrypt email, files, directories, and whole disk partitions and to authenticate messages.\",\n },\n {\n name: \"seed.txt\",\n body: \"A seed phrase, seed recovery phrase or backup seed phrase is a list of words which store all the information needed to recover Bitcoin funds on-chain.\",\n },\n];\n\nconst features = [\n {\n Icon: FileTextIcon,\n name: \"Save your files\",\n description: \"We automatically save your files as you type.\",\n href: \"#\",\n cta: \"Learn more\",\n className: \"col-span-3 lg:col-span-1\",\n background: (\n <Marquee\n pauseOnHover\n className=\"absolute top-10 [--duration:20s] [mask-image:linear-gradient(to_top,transparent_40%,#000_100%)] \"\n >\n {files.map((f, idx) => (\n <figure\n key={idx}\n className={cn(\n \"relative w-32 cursor-pointer overflow-hidden rounded-xl border p-4\",\n \"border-gray-950/[.1] bg-gray-950/[.01] hover:bg-gray-950/[.05]\",\n \"dark:border-gray-50/[.1] dark:bg-gray-50/[.10] dark:hover:bg-gray-50/[.15]\",\n \"transform-gpu blur-[1px] transition-all duration-300 ease-out hover:blur-none\",\n )}\n >\n <div className=\"flex flex-row items-center gap-2\">\n <div className=\"flex flex-col\">\n <figcaption className=\"text-sm font-medium dark:text-white \">\n {f.name}\n </figcaption>\n </div>\n </div>\n <blockquote className=\"mt-2 text-xs\">{f.body}</blockquote>\n </figure>\n ))}\n </Marquee>\n ),\n },\n {\n Icon: BellIcon,\n name: \"Notifications\",\n description: \"Get notified when something happens.\",\n href: \"#\",\n cta: \"Learn more\",\n className: \"col-span-3 lg:col-span-2\",\n background: (\n <AnimatedListDemo className=\"absolute right-2 top-4 h-[300px] w-full border-none transition-all duration-300 ease-out [mask-image:linear-gradient(to_top,transparent_10%,#000_100%)] group-hover:scale-105\" />\n ),\n },\n {\n Icon: Share2Icon,\n name: \"Integrations\",\n description: \"Supports 100+ integrations and counting.\",\n href: \"#\",\n cta: \"Learn more\",\n className: \"col-span-3 lg:col-span-2\",\n background: (\n <AnimatedBeamMultipleOutputDemo className=\"absolute right-2 top-4 h-[300px] border-none transition-all duration-300 ease-out [mask-image:linear-gradient(to_top,transparent_10%,#000_100%)] group-hover:scale-105\" />\n ),\n },\n {\n Icon: CalendarIcon,\n name: \"Calendar\",\n description: \"Use the calendar to filter your files by date.\",\n className: \"col-span-3 lg:col-span-1\",\n href: \"#\",\n cta: \"Learn more\",\n background: (\n <Calendar\n mode=\"single\"\n selected={new Date(2022, 4, 11, 0, 0, 0)}\n className=\"absolute right-0 top-10 origin-top rounded-md border transition-all duration-300 ease-out [mask-image:linear-gradient(to_top,transparent_40%,#000_100%)] group-hover:scale-105\"\n />\n ),\n },\n];\n\nexport default function BentoDemo() {\n return (\n <BentoGrid>\n {features.map((feature, idx) => (\n <BentoCard key={idx} {...feature} />\n ))}\n </BentoGrid>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/bento-grid.json b/public/r/bento-grid.jsonindex d866cc8f..e33d851c 100644--- a/public/r/bento-grid.json+++ b/public/r/bento-grid.json@@ -14,7 +14,8 @@{"path": "registry/magicui/bento-grid.tsx","content": "import { ArrowRightIcon } from \"@radix-ui/react-icons\";\nimport { ComponentPropsWithoutRef, ReactNode } from \"react\";\n\nimport { Button } from \"@/components/ui/button\";\nimport { cn } from \"@/lib/utils\";\n\ninterface BentoGridProps extends ComponentPropsWithoutRef<\"div\"> {\n children: ReactNode;\n className?: string;\n}\n\ninterface BentoCardProps extends ComponentPropsWithoutRef<\"div\"> {\n name: string;\n className: string;\n background: ReactNode;\n Icon: React.ElementType;\n description: string;\n href: string;\n cta: string;\n}\n\nconst BentoGrid = ({ children, className, ...props }: BentoGridProps) => {\n return (\n <div\n className={cn(\n \"grid w-full auto-rows-[22rem] grid-cols-3 gap-4\",\n className,\n )}\n {...props}\n >\n {children}\n </div>\n );\n};\n\nconst BentoCard = ({\n name,\n className,\n background,\n Icon,\n description,\n href,\n cta,\n ...props\n}: BentoCardProps) => (\n <div\n key={name}\n className={cn(\n \"group relative col-span-3 flex flex-col justify-between overflow-hidden rounded-xl\",\n // light styles\n \"bg-white [box-shadow:0_0_0_1px_rgba(0,0,0,.03),0_2px_4px_rgba(0,0,0,.05),0_12px_24px_rgba(0,0,0,.05)]\",\n // dark styles\n \"transform-gpu dark:bg-black dark:[border:1px_solid_rgba(255,255,255,.1)] dark:[box-shadow:0_-20px_80px_-20px_#ffffff1f_inset]\",\n className,\n )}\n {...props}\n >\n <div>{background}</div>\n <div className=\"pointer-events-none z-10 flex transform-gpu flex-col gap-1 p-6 transition-all duration-300 group-hover:-translate-y-10\">\n <Icon className=\"h-12 w-12 origin-left transform-gpu text-neutral-700 transition-all duration-300 ease-in-out group-hover:scale-75\" />\n <h3 className=\"text-xl font-semibold text-neutral-700 dark:text-neutral-300\">\n {name}\n </h3>\n <p className=\"max-w-lg text-neutral-400\">{description}</p>\n </div>\n\n <div\n className={cn(\n \"pointer-events-none absolute bottom-0 flex w-full translate-y-10 transform-gpu flex-row items-center p-4 opacity-0 transition-all duration-300 group-hover:translate-y-0 group-hover:opacity-100\",\n )}\n >\n <Button variant=\"ghost\" asChild size=\"sm\" className=\"pointer-events-auto\">\n <a href={href}>\n {cta}\n <ArrowRightIcon className=\"ms-2 h-4 w-4 rtl:rotate-180\" />\n </a>\n </Button>\n </div>\n <div className=\"pointer-events-none absolute inset-0 transform-gpu transition-all duration-300 group-hover:bg-black/[.03] group-hover:dark:bg-neutral-800/10\" />\n </div>\n);\n\nexport { BentoCard, BentoGrid };\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/blur-fade-demo.json b/public/r/blur-fade-demo.jsonindex f4368445..52687dfe 100644--- a/public/r/blur-fade-demo.json+++ b/public/r/blur-fade-demo.json@@ -11,7 +11,8 @@{"path": "registry/example/blur-fade-demo.tsx","content": "/* eslint-disable @next/next/no-img-element */\nimport { BlurFade } from \"@/registry/magicui/blur-fade\";\n\nconst images = Array.from({ length: 9 }, (_, i) => {\n const isLandscape = i % 2 === 0;\n const width = isLandscape ? 800 : 600;\n const height = isLandscape ? 600 : 800;\n return `https://picsum.photos/seed/${i + 1}/${width}/${height}`;\n});\n\nexport default function BlurFadeDemo() {\n return (\n <section id=\"photos\">\n <div className=\"columns-2 gap-4 sm:columns-3\">\n {images.map((imageUrl, idx) => (\n <BlurFade key={imageUrl} delay={0.25 + idx * 0.05} inView>\n <img\n className=\"mb-4 size-full rounded-lg object-contain\"\n src={imageUrl}\n alt={`Random stock image ${idx + 1}`}\n />\n </BlurFade>\n ))}\n </div>\n </section>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/blur-fade-text-demo.json b/public/r/blur-fade-text-demo.jsonindex 61379961..aea72951 100644--- a/public/r/blur-fade-text-demo.json+++ b/public/r/blur-fade-text-demo.json@@ -11,7 +11,8 @@{"path": "registry/example/blur-fade-text-demo.tsx","content": "import { BlurFade } from \"@/registry/magicui/blur-fade\";\n\nexport default function BlurFadeTextDemo() {\n return (\n <section id=\"header\">\n <BlurFade delay={0.25} inView>\n <h2 className=\"text-3xl font-bold tracking-tighter sm:text-5xl xl:text-6xl/none\">\n Hello World 👋\n </h2>\n </BlurFade>\n <BlurFade delay={0.25 * 2} inView>\n <span className=\"text-pretty text-xl tracking-tighter sm:text-3xl xl:text-4xl/none\">\n Nice to meet you\n </span>\n </BlurFade>\n </section>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/blur-fade.json b/public/r/blur-fade.jsonindex d58c4e1d..a2048f6d 100644--- a/public/r/blur-fade.json+++ b/public/r/blur-fade.json@@ -11,7 +11,8 @@{"path": "registry/magicui/blur-fade.tsx","content": "\"use client\";\n\nimport {\n AnimatePresence,\n motion,\n useInView,\n UseInViewOptions,\n Variants,\n} from \"motion/react\";\nimport { useRef } from \"react\";\n\ntype MarginType = UseInViewOptions[\"margin\"];\n\ninterface BlurFadeProps {\n children: React.ReactNode;\n className?: string;\n variant?: {\n hidden: { y: number };\n visible: { y: number };\n };\n duration?: number;\n delay?: number;\n offset?: number;\n direction?: \"up\" | \"down\" | \"left\" | \"right\";\n inView?: boolean;\n inViewMargin?: MarginType;\n blur?: string;\n}\n\nexport function BlurFade({\n children,\n className,\n variant,\n duration = 0.4,\n delay = 0,\n offset = 6,\n direction = \"down\",\n inView = false,\n inViewMargin = \"-50px\",\n blur = \"6px\",\n}: BlurFadeProps) {\n const ref = useRef(null);\n const inViewResult = useInView(ref, { once: true, margin: inViewMargin });\n const isInView = !inView || inViewResult;\n const defaultVariants: Variants = {\n hidden: {\n [direction === \"left\" || direction === \"right\" ? \"x\" : \"y\"]:\n direction === \"right\" || direction === \"down\" ? -offset : offset,\n opacity: 0,\n filter: `blur(${blur})`,\n },\n visible: {\n [direction === \"left\" || direction === \"right\" ? \"x\" : \"y\"]: 0,\n opacity: 1,\n filter: `blur(0px)`,\n },\n };\n const combinedVariants = variant || defaultVariants;\n return (\n <AnimatePresence>\n <motion.div\n ref={ref}\n initial=\"hidden\"\n animate={isInView ? \"visible\" : \"hidden\"}\n exit=\"hidden\"\n variants={combinedVariants}\n transition={{\n delay: 0.04 + delay,\n duration,\n ease: \"easeOut\",\n }}\n className={className}\n >\n {children}\n </motion.div>\n </AnimatePresence>\n );\n}\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/border-beam-demo.json b/public/r/border-beam-demo.jsonindex 72855b95..2d690101 100644--- a/public/r/border-beam-demo.json+++ b/public/r/border-beam-demo.json@@ -11,7 +11,8 @@{"path": "registry/example/border-beam-demo.tsx","content": "import { BorderBeam } from \"@/registry/magicui/border-beam\";\n\nexport default function BorderBeamDemo() {\n return (\n <div className=\"relative flex h-[500px] w-full flex-col items-center justify-center overflow-hidden rounded-lg border bg-background md:shadow-xl\">\n <span className=\"pointer-events-none whitespace-pre-wrap bg-gradient-to-b from-black to-gray-300/80 bg-clip-text text-center text-8xl font-semibold leading-none text-transparent dark:from-white dark:to-slate-900/10\">\n Border Beam\n </span>\n <BorderBeam size={250} duration={12} delay={9} />\n </div>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/border-beam.json b/public/r/border-beam.jsonindex d60c014d..f8af290a 100644--- a/public/r/border-beam.json+++ b/public/r/border-beam.json@@ -8,7 +8,8 @@{"path": "registry/magicui/border-beam.tsx","content": "import { cn } from \"@/lib/utils\";\nimport { ComponentPropsWithoutRef } from \"react\";\n\ninterface BorderBeamProps extends ComponentPropsWithoutRef<\"div\"> {\n size?: number;\n duration?: number;\n borderWidth?: number;\n anchor?: number;\n colorFrom?: string;\n colorTo?: string;\n delay?: number;\n}\n\nexport const BorderBeam = ({\n className,\n size = 200,\n duration = 15,\n anchor = 90,\n borderWidth = 1.5,\n colorFrom = \"#ffaa40\",\n colorTo = \"#9c40ff\",\n delay = 0,\n ...props\n}: BorderBeamProps) => {\n return (\n <div\n style={\n {\n \"--size\": size,\n \"--duration\": duration,\n \"--anchor\": anchor,\n \"--border-width\": borderWidth,\n \"--color-from\": colorFrom,\n \"--color-to\": colorTo,\n \"--delay\": `-${delay}s`,\n } as React.CSSProperties\n }\n className={cn(\n \"pointer-events-none absolute inset-0 rounded-[inherit] [border:calc(var(--border-width)*1px)_solid_transparent]\",\n\n // mask styles\n \"![mask-clip:padding-box,border-box] ![mask-composite:intersect] [mask:linear-gradient(transparent,transparent),linear-gradient(white,white)]\",\n\n // pseudo styles\n \"after:absolute after:aspect-square after:w-[calc(var(--size)*1px)] after:animate-border-beam after:[animation-delay:var(--delay)] after:[background:linear-gradient(to_left,var(--color-from),var(--color-to),transparent)] after:[offset-anchor:calc(var(--anchor)*1%)_50%] after:[offset-path:rect(0_auto_auto_0_round_calc(var(--size)*1px))]\",\n className,\n )}\n {...props}\n />\n );\n};\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}],"tailwind": {diff --git a/public/r/box-reveal-demo.json b/public/r/box-reveal-demo.jsonindex e270a0e5..9b271dee 100644--- a/public/r/box-reveal-demo.json+++ b/public/r/box-reveal-demo.json@@ -11,7 +11,8 @@{"path": "registry/example/box-reveal-demo.tsx","content": "import { Button } from \"@/components/ui/button\";\nimport { BoxReveal } from \"@/registry/magicui/box-reveal\";\n\nexport default function BoxRevealDemo() {\n return (\n <div className=\"size-full max-w-lg items-center justify-center overflow-hidden pt-8\">\n <BoxReveal boxColor={\"#5046e6\"} duration={0.5}>\n <p className=\"text-[3.5rem] font-semibold\">\n Magic UI<span className=\"text-[#5046e6]\">.</span>\n </p>\n </BoxReveal>\n\n <BoxReveal boxColor={\"#5046e6\"} duration={0.5}>\n <h2 className=\"mt-[.5rem] text-[1rem]\">\n UI library for{\" \"}\n <span className=\"text-[#5046e6]\">Design Engineers</span>\n </h2>\n </BoxReveal>\n\n <BoxReveal boxColor={\"#5046e6\"} duration={0.5}>\n <div className=\"mt-6\">\n <p>\n -> 20+ free and open-source animated components built with\n <span className=\"font-semibold text-[#5046e6]\"> React</span>,\n <span className=\"font-semibold text-[#5046e6]\"> Typescript</span>,\n <span className=\"font-semibold text-[#5046e6]\"> Tailwind CSS</span>,\n and\n <span className=\"font-semibold text-[#5046e6]\"> Framer Motion</span>\n . <br />\n -> 100% open-source, and customizable. <br />\n </p>\n </div>\n </BoxReveal>\n\n <BoxReveal boxColor={\"#5046e6\"} duration={0.5}>\n <Button className=\"mt-[1.6rem] bg-[#5046e6]\">Explore</Button>\n </BoxReveal>\n </div>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/box-reveal.json b/public/r/box-reveal.jsonindex 2ba1c46a..1bf65f54 100644--- a/public/r/box-reveal.json+++ b/public/r/box-reveal.json@@ -11,7 +11,8 @@{"path": "registry/magicui/box-reveal.tsx","content": "\"use client\";\n\nimport { motion, useAnimation, useInView } from \"motion/react\";\nimport { useEffect, useRef } from \"react\";\n\ninterface BoxRevealProps {\n children: JSX.Element;\n width?: \"fit-content\" | \"100%\";\n boxColor?: string;\n duration?: number;\n}\n\nexport const BoxReveal = ({\n children,\n width = \"fit-content\",\n boxColor = \"#5046e6\",\n duration,\n}: BoxRevealProps) => {\n const mainControls = useAnimation();\n const slideControls = useAnimation();\n\n const ref = useRef(null);\n const isInView = useInView(ref, { once: true });\n\n useEffect(() => {\n if (isInView) {\n slideControls.start(\"visible\");\n mainControls.start(\"visible\");\n } else {\n slideControls.start(\"hidden\");\n mainControls.start(\"hidden\");\n }\n }, [isInView, mainControls, slideControls]);\n\n return (\n <div ref={ref} style={{ position: \"relative\", width, overflow: \"hidden\" }}>\n <motion.div\n variants={{\n hidden: { opacity: 0, y: 75 },\n visible: { opacity: 1, y: 0 },\n }}\n initial=\"hidden\"\n animate={mainControls}\n transition={{ duration: duration ? duration : 0.5, delay: 0.25 }}\n >\n {children}\n </motion.div>\n\n <motion.div\n variants={{\n hidden: { left: 0 },\n visible: { left: \"100%\" },\n }}\n initial=\"hidden\"\n animate={slideControls}\n transition={{ duration: duration ? duration : 0.5, ease: \"easeIn\" }}\n style={{\n position: \"absolute\",\n top: 4,\n bottom: 4,\n left: 0,\n right: 0,\n zIndex: 20,\n background: boxColor,\n }}\n />\n </div>\n );\n};\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/client-tweet-card.json b/public/r/client-tweet-card.jsonindex eea43394..f8cb1ec1 100644--- a/public/r/client-tweet-card.json+++ b/public/r/client-tweet-card.json@@ -11,7 +11,8 @@{"path": "registry/magicui/client-tweet-card.tsx","content": "\"use client\";\n\nimport { TweetProps, useTweet } from \"react-tweet\";\n\nimport {\n MagicTweet,\n TweetNotFound,\n TweetSkeleton,\n} from \"@/registry/magicui/tweet-card\";\n\nexport const ClientTweetCard = ({\n id,\n apiUrl,\n fallback = <TweetSkeleton />,\n components,\n fetchOptions,\n onError,\n ...props\n}: TweetProps & { className?: string }) => {\n const { data, error, isLoading } = useTweet(id, apiUrl, fetchOptions);\n\n if (isLoading) return fallback;\n if (error || !data) {\n const NotFound = components?.TweetNotFound || TweetNotFound;\n return <NotFound error={onError ? onError(error) : error} />;\n }\n\n return <MagicTweet tweet={data} components={components} {...props} />;\n};\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/code-comparison-demo.json b/public/r/code-comparison-demo.jsonindex 34b1978a..0a2608f8 100644--- a/public/r/code-comparison-demo.json+++ b/public/r/code-comparison-demo.json@@ -11,7 +11,8 @@{"path": "registry/example/code-comparison-demo.tsx","content": "import { CodeComparison } from \"@/registry/magicui/code-comparison\";\n\nconst beforeCode = `import { NextRequest } from 'next/server';\n\nexport const middleware = async (req: NextRequest) => {\n let user = undefined;\n let team = undefined;\n const token = req.headers.get('token');\n\n if(req.nextUrl.pathname.startsWith('/auth')) {\n user = await getUserByToken(token);\n\n if(!user) {\n return NextResponse.redirect('/login');\n }\n }\n\n if(req.nextUrl.pathname.startsWith('/team')) {\n user = await getUserByToken(token);\n\n if(!user) {\n return NextResponse.redirect('/login');\n }\n\n const slug = req.nextUrl.query.slug;\n team = await getTeamBySlug(slug);\n\n if(!team) {\n return NextResponse.redirect('/');\n }\n }\n\n return NextResponse.next();\n}\n\nexport const config = {\n matcher: ['/((?!_next/|_static|_vercel|[\\\\w-]+\\\\.\\\\w+).*)'],\n};`;\n\nconst afterCode = `import { createMiddleware, type MiddlewareFunctionProps } from '@app/(auth)/auth/_middleware';\nimport { auth } from '@app/(auth)/auth/_middleware';\nimport { team } from '@app/(team)/team/_middleware';\n\nconst middlewares = {\n '/auth{/:path?}': auth,\n '/team{/:slug?}': [ auth, team ],\n};\n\nexport const middleware = createMiddleware(middlewares);\n\nexport const config = {\n matcher: ['/((?!_next/|_static|_vercel|[\\\\w-]+\\\\.\\\\w+).*)'],\n};`;\n\nexport default function CodeComparisonDemo() {\n return (\n <CodeComparison\n beforeCode={beforeCode}\n afterCode={afterCode}\n language=\"typescript\"\n filename=\"middleware.ts\"\n lightTheme=\"github-light\"\n darkTheme=\"github-dark\"\n />\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/code-comparison.json b/public/r/code-comparison.jsonindex e720dc66..79a935c5 100644--- a/public/r/code-comparison.json+++ b/public/r/code-comparison.json@@ -12,7 +12,8 @@{"path": "registry/magicui/code-comparison.tsx","content": "\"use client\";\n\nimport { FileIcon } from \"lucide-react\";\nimport { useTheme } from \"next-themes\";\nimport { useEffect, useState } from \"react\";\n\ninterface CodeComparisonProps {\n beforeCode: string;\n afterCode: string;\n language: string;\n filename: string;\n lightTheme: string;\n darkTheme: string;\n}\n\nexport function CodeComparison({\n beforeCode,\n afterCode,\n language,\n filename,\n lightTheme,\n darkTheme,\n}: CodeComparisonProps) {\n const { theme, systemTheme } = useTheme();\n const [highlightedBefore, setHighlightedBefore] = useState(\"\");\n const [highlightedAfter, setHighlightedAfter] = useState(\"\");\n\n useEffect(() => {\n const currentTheme = theme === \"system\" ? systemTheme : theme;\n const selectedTheme = currentTheme === \"dark\" ? darkTheme : lightTheme;\n\n async function highlightCode() {\n try {\n const { codeToHtml } = await import(\"shiki\");\n const before = await codeToHtml(beforeCode, {\n lang: language,\n theme: selectedTheme,\n });\n const after = await codeToHtml(afterCode, {\n lang: language,\n theme: selectedTheme,\n });\n setHighlightedBefore(before);\n setHighlightedAfter(after);\n } catch (error) {\n console.error(\"Error highlighting code:\", error);\n setHighlightedBefore(`<pre>${beforeCode}</pre>`);\n setHighlightedAfter(`<pre>${afterCode}</pre>`);\n }\n }\n highlightCode();\n }, [\n theme,\n systemTheme,\n beforeCode,\n afterCode,\n language,\n lightTheme,\n darkTheme,\n ]);\n\n const renderCode = (code: string, highlighted: string) => {\n if (highlighted) {\n return (\n <div\n className=\"h-full overflow-auto bg-background font-mono text-xs [&>pre]:h-full [&>pre]:!bg-transparent [&>pre]:p-4 [&_code]:break-all\"\n dangerouslySetInnerHTML={{ __html: highlighted }}\n />\n );\n } else {\n return (\n <pre className=\"h-full overflow-auto break-all bg-background p-4 font-mono text-xs text-foreground\">\n {code}\n </pre>\n );\n }\n };\n return (\n <div className=\"mx-auto w-full max-w-5xl\">\n <div className=\"relative w-full overflow-hidden rounded-xl border border-border\">\n <div className=\"relative grid md:grid-cols-2 md:divide-x md:divide-border\">\n <div>\n <div className=\"flex items-center bg-accent p-2 text-sm text-foreground\">\n <FileIcon className=\"mr-2 h-4 w-4\" />\n {filename}\n <span className=\"ml-auto\">before</span>\n </div>\n {renderCode(beforeCode, highlightedBefore)}\n </div>\n <div>\n <div className=\"flex items-center bg-accent p-2 text-sm text-foreground\">\n <FileIcon className=\"mr-2 h-4 w-4\" />\n {filename}\n <span className=\"ml-auto\">after</span>\n </div>\n {renderCode(afterCode, highlightedAfter)}\n </div>\n </div>\n <div className=\"absolute left-1/2 top-1/2 flex h-8 w-8 -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-md bg-accent text-xs text-foreground\">\n VS\n </div>\n </div>\n </div>\n );\n}\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/confetti-basic-cannon.json b/public/r/confetti-basic-cannon.jsonindex edc69e95..4a405b80 100644--- a/public/r/confetti-basic-cannon.json+++ b/public/r/confetti-basic-cannon.json@@ -11,7 +11,8 @@{"path": "registry/example/confetti-basic-cannon.tsx","content": "import { ConfettiButton } from \"@/registry/magicui/confetti\";\n\nexport default function ConfettiButtonDemo() {\n return (\n <div className=\"relative\">\n <ConfettiButton>Confetti 🎉</ConfettiButton>\n </div>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/confetti-custom-shapes.json b/public/r/confetti-custom-shapes.jsonindex 47e91ed1..f6aa2348 100644--- a/public/r/confetti-custom-shapes.json+++ b/public/r/confetti-custom-shapes.json@@ -11,7 +11,8 @@{"path": "registry/example/confetti-custom-shapes.tsx","content": "\"use client\";\n\nimport confetti from \"canvas-confetti\";\n\nimport { Button } from \"@/components/ui/button\";\n\nexport default function ConfettiCustomShapes() {\n const handleClick = () => {\n const scalar = 2;\n const triangle = confetti.shapeFromPath({\n path: \"M0 10 L5 0 L10 10z\",\n });\n const square = confetti.shapeFromPath({\n path: \"M0 0 L10 0 L10 10 L0 10 Z\",\n });\n const coin = confetti.shapeFromPath({\n path: \"M5 0 A5 5 0 1 0 5 10 A5 5 0 1 0 5 0 Z\",\n });\n const tree = confetti.shapeFromPath({\n path: \"M5 0 L10 10 L0 10 Z\",\n });\n\n const defaults = {\n spread: 360,\n ticks: 60,\n gravity: 0,\n decay: 0.96,\n startVelocity: 20,\n shapes: [triangle, square, coin, tree],\n scalar,\n };\n\n const shoot = () => {\n confetti({\n ...defaults,\n particleCount: 30,\n });\n\n confetti({\n ...defaults,\n particleCount: 5,\n });\n\n confetti({\n ...defaults,\n particleCount: 15,\n scalar: scalar / 2,\n shapes: [\"circle\"],\n });\n };\n\n setTimeout(shoot, 0);\n setTimeout(shoot, 100);\n setTimeout(shoot, 200);\n };\n\n return (\n <div className=\"relative flex items-center justify-center\">\n <Button onClick={handleClick}>Trigger Shapes</Button>\n </div>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/confetti-demo.json b/public/r/confetti-demo.jsonindex bb577a45..89e6cf17 100644--- a/public/r/confetti-demo.json+++ b/public/r/confetti-demo.json@@ -11,7 +11,8 @@{"path": "registry/example/confetti-demo.tsx","content": "\"use client\";\n\nimport { useRef } from \"react\";\n\nimport { Confetti, type ConfettiRef } from \"@/registry/magicui/confetti\";\n\nexport default function ConfettiDemo() {\n const confettiRef = useRef<ConfettiRef>(null);\n\n return (\n <div className=\"relative flex h-[500px] w-full flex-col items-center justify-center overflow-hidden rounded-lg border bg-background md:shadow-xl\">\n <span className=\"pointer-events-none whitespace-pre-wrap bg-gradient-to-b from-black to-gray-300/80 bg-clip-text text-center text-8xl font-semibold leading-none text-transparent dark:from-white dark:to-slate-900/10\">\n Confetti\n </span>\n\n <Confetti\n ref={confettiRef}\n className=\"absolute left-0 top-0 z-0 size-full\"\n onMouseEnter={() => {\n confettiRef.current?.fire({});\n }}\n />\n </div>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/confetti-emoji.json b/public/r/confetti-emoji.jsonindex 106ec963..ad31fc58 100644--- a/public/r/confetti-emoji.json+++ b/public/r/confetti-emoji.json@@ -11,7 +11,8 @@{"path": "registry/example/confetti-emoji.tsx","content": "\"use client\";\n\nimport confetti from \"canvas-confetti\";\n\nimport { Button } from \"@/components/ui/button\";\n\nexport default function ConfettiEmoji() {\n const handleClick = () => {\n const scalar = 2;\n const unicorn = confetti.shapeFromText({ text: \"🦄\", scalar });\n\n const defaults = {\n spread: 360,\n ticks: 60,\n gravity: 0,\n decay: 0.96,\n startVelocity: 20,\n shapes: [unicorn],\n scalar,\n };\n\n const shoot = () => {\n confetti({\n ...defaults,\n particleCount: 30,\n });\n\n confetti({\n ...defaults,\n particleCount: 5,\n });\n\n confetti({\n ...defaults,\n particleCount: 15,\n scalar: scalar / 2,\n shapes: [\"circle\"],\n });\n };\n\n setTimeout(shoot, 0);\n setTimeout(shoot, 100);\n setTimeout(shoot, 200);\n };\n\n return (\n <div className=\"relative justify-center\">\n <Button onClick={handleClick}>Trigger Emoji</Button>\n </div>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/confetti-fireworks.json b/public/r/confetti-fireworks.jsonindex b3ea5583..9811a4db 100644--- a/public/r/confetti-fireworks.json+++ b/public/r/confetti-fireworks.json@@ -11,7 +11,8 @@{"path": "registry/example/confetti-fireworks.tsx","content": "\"use client\";\n\nimport confetti from \"canvas-confetti\";\n\nimport { Button } from \"@/components/ui/button\";\n\nexport default function ConfettiFireworks() {\n const handleClick = () => {\n const duration = 5 * 1000;\n const animationEnd = Date.now() + duration;\n const defaults = { startVelocity: 30, spread: 360, ticks: 60, zIndex: 0 };\n\n const randomInRange = (min: number, max: number) =>\n Math.random() * (max - min) + min;\n\n const interval = window.setInterval(() => {\n const timeLeft = animationEnd - Date.now();\n\n if (timeLeft <= 0) {\n return clearInterval(interval);\n }\n\n const particleCount = 50 * (timeLeft / duration);\n confetti({\n ...defaults,\n particleCount,\n origin: { x: randomInRange(0.1, 0.3), y: Math.random() - 0.2 },\n });\n confetti({\n ...defaults,\n particleCount,\n origin: { x: randomInRange(0.7, 0.9), y: Math.random() - 0.2 },\n });\n }, 250);\n };\n\n return (\n <div className=\"relative\">\n <Button onClick={handleClick}>Trigger Fireworks</Button>\n </div>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/confetti-side-cannons.json b/public/r/confetti-side-cannons.jsonindex 1f8e5b42..8a442aef 100644--- a/public/r/confetti-side-cannons.json+++ b/public/r/confetti-side-cannons.json@@ -11,7 +11,8 @@{"path": "registry/example/confetti-side-cannons.tsx","content": "\"use client\";\n\nimport confetti from \"canvas-confetti\";\n\nimport { Button } from \"@/components/ui/button\";\n\nexport default function ConfettiSideCannons() {\n const handleClick = () => {\n const end = Date.now() + 3 * 1000; // 3 seconds\n const colors = [\"#a786ff\", \"#fd8bbc\", \"#eca184\", \"#f8deb1\"];\n\n const frame = () => {\n if (Date.now() > end) return;\n\n confetti({\n particleCount: 2,\n angle: 60,\n spread: 55,\n startVelocity: 60,\n origin: { x: 0, y: 0.5 },\n colors: colors,\n });\n confetti({\n particleCount: 2,\n angle: 120,\n spread: 55,\n startVelocity: 60,\n origin: { x: 1, y: 0.5 },\n colors: colors,\n });\n\n requestAnimationFrame(frame);\n };\n\n frame();\n };\n\n return (\n <div className=\"relative\">\n <Button onClick={handleClick}>Trigger Side Cannons</Button>\n </div>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/confetti-stars.json b/public/r/confetti-stars.jsonindex 6ccd86e0..f4e24acf 100644--- a/public/r/confetti-stars.json+++ b/public/r/confetti-stars.json@@ -11,7 +11,8 @@{"path": "registry/example/confetti-stars.tsx","content": "\"use client\";\n\nimport confetti from \"canvas-confetti\";\n\nimport { Button } from \"@/components/ui/button\";\n\nexport default function ConfettiStars() {\n const handleClick = () => {\n const defaults = {\n spread: 360,\n ticks: 50,\n gravity: 0,\n decay: 0.94,\n startVelocity: 30,\n colors: [\"#FFE400\", \"#FFBD00\", \"#E89400\", \"#FFCA6C\", \"#FDFFB8\"],\n };\n\n const shoot = () => {\n confetti({\n ...defaults,\n particleCount: 40,\n scalar: 1.2,\n shapes: [\"star\"],\n });\n\n confetti({\n ...defaults,\n particleCount: 10,\n scalar: 0.75,\n shapes: [\"circle\"],\n });\n };\n\n setTimeout(shoot, 0);\n setTimeout(shoot, 100);\n setTimeout(shoot, 200);\n };\n\n return (\n <div className=\"relative\">\n <Button onClick={handleClick}>Trigger Stars</Button>\n </div>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/confetti.json b/public/r/confetti.jsonindex dbaf631d..0e136caa 100644--- a/public/r/confetti.json+++ b/public/r/confetti.json@@ -15,7 +15,8 @@{"path": "registry/magicui/confetti.tsx","content": "\"use client\";\n\nimport type {\n GlobalOptions as ConfettiGlobalOptions,\n CreateTypes as ConfettiInstance,\n Options as ConfettiOptions,\n} from \"canvas-confetti\";\nimport confetti from \"canvas-confetti\";\nimport type { ReactNode } from \"react\";\nimport React, {\n createContext,\n forwardRef,\n useCallback,\n useEffect,\n useImperativeHandle,\n useMemo,\n useRef,\n} from \"react\";\n\nimport { Button, ButtonProps } from \"@/components/ui/button\";\n\ntype Api = {\n fire: (options?: ConfettiOptions) => void;\n};\n\ntype Props = React.ComponentPropsWithRef<\"canvas\"> & {\n options?: ConfettiOptions;\n globalOptions?: ConfettiGlobalOptions;\n manualstart?: boolean;\n children?: ReactNode;\n};\n\nexport type ConfettiRef = Api | null;\n\nconst ConfettiContext = createContext<Api>({} as Api);\n\n// Define component first\nconst ConfettiComponent = forwardRef<ConfettiRef, Props>((props, ref) => {\n const {\n options,\n globalOptions = { resize: true, useWorker: true },\n manualstart = false,\n children,\n ...rest\n } = props;\n const instanceRef = useRef<ConfettiInstance | null>(null);\n\n const canvasRef = useCallback(\n (node: HTMLCanvasElement) => {\n if (node !== null) {\n if (instanceRef.current) return;\n instanceRef.current = confetti.create(node, {\n ...globalOptions,\n resize: true,\n });\n } else {\n if (instanceRef.current) {\n instanceRef.current.reset();\n instanceRef.current = null;\n }\n }\n },\n [globalOptions],\n );\n\n const fire = useCallback(\n async (opts = {}) => {\n try {\n await instanceRef.current?.({ ...options, ...opts });\n } catch (error) {\n console.error(\"Confetti error:\", error);\n }\n },\n [options],\n );\n\n const api = useMemo(\n () => ({\n fire,\n }),\n [fire],\n );\n\n useImperativeHandle(ref, () => api, [api]);\n\n useEffect(() => {\n if (!manualstart) {\n (async () => {\n try {\n await fire();\n } catch (error) {\n console.error(\"Confetti effect error:\", error);\n }\n })();\n }\n }, [manualstart, fire]);\n\n return (\n <ConfettiContext.Provider value={api}>\n <canvas ref={canvasRef} {...rest} />\n {children}\n </ConfettiContext.Provider>\n );\n});\n\n// Set display name immediately\nConfettiComponent.displayName = \"Confetti\";\n\n// Export as Confetti\nexport const Confetti = ConfettiComponent;\n\ninterface ConfettiButtonProps extends ButtonProps {\n options?: ConfettiOptions &\n ConfettiGlobalOptions & { canvas?: HTMLCanvasElement };\n children?: React.ReactNode;\n}\n\nconst ConfettiButtonComponent = ({\n options,\n children,\n ...props\n}: ConfettiButtonProps) => {\n const handleClick = async (event: React.MouseEvent<HTMLButtonElement>) => {\n try {\n const rect = event.currentTarget.getBoundingClientRect();\n const x = rect.left + rect.width / 2;\n const y = rect.top + rect.height / 2;\n await confetti({\n ...options,\n origin: {\n x: x / window.innerWidth,\n y: y / window.innerHeight,\n },\n });\n } catch (error) {\n console.error(\"Confetti button error:\", error);\n }\n };\n\n return (\n <Button onClick={handleClick} {...props}>\n {children}\n </Button>\n );\n};\n\nConfettiButtonComponent.displayName = \"ConfettiButton\";\n\nexport const ConfettiButton = ConfettiButtonComponent;\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/cool-mode-custom.json b/public/r/cool-mode-custom.jsonindex 3c795017..6a052609 100644--- a/public/r/cool-mode-custom.json+++ b/public/r/cool-mode-custom.json@@ -11,7 +11,8 @@{"path": "registry/example/cool-mode-custom.tsx","content": "import { Button } from \"@/components/ui/button\";\nimport { CoolMode } from \"@/registry/magicui/cool-mode\";\n\nexport default function CoolModeCustom() {\n return (\n <div className=\"relative justify-center\">\n <CoolMode\n options={{\n particle:\n \"https://pbs.twimg.com/profile_images/1782811051504885763/YR5-kWOI_400x400.jpg\",\n }}\n >\n <Button>Click Me!</Button>\n </CoolMode>\n </div>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/cool-mode-demo.json b/public/r/cool-mode-demo.jsonindex 57e77c2e..0364ab2a 100644--- a/public/r/cool-mode-demo.json+++ b/public/r/cool-mode-demo.json@@ -11,7 +11,8 @@{"path": "registry/example/cool-mode-demo.tsx","content": "import { Button } from \"@/components/ui/button\";\nimport { CoolMode } from \"@/registry/magicui/cool-mode\";\n\nexport default function CoolModeDemo() {\n return (\n <div className=\"relative justify-center\">\n <CoolMode>\n <Button>Click Me!</Button>\n </CoolMode>\n </div>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/cool-mode.json b/public/r/cool-mode.jsonindex a0cb94a6..813d1b43 100644--- a/public/r/cool-mode.json+++ b/public/r/cool-mode.json@@ -8,7 +8,8 @@{"path": "registry/magicui/cool-mode.tsx","content": "\"use client\";\n\nimport React, { ReactNode, useEffect, useRef } from \"react\";\n\nexport interface BaseParticle {\n element: HTMLElement | SVGSVGElement;\n left: number;\n size: number;\n top: number;\n}\n\nexport interface BaseParticleOptions {\n particle?: string;\n size?: number;\n}\n\nexport interface CoolParticle extends BaseParticle {\n direction: number;\n speedHorz: number;\n speedUp: number;\n spinSpeed: number;\n spinVal: number;\n}\n\nexport interface CoolParticleOptions extends BaseParticleOptions {\n particleCount?: number;\n speedHorz?: number;\n speedUp?: number;\n}\n\nconst getContainer = () => {\n const id = \"_coolMode_effect\";\n let existingContainer = document.getElementById(id);\n\n if (existingContainer) {\n return existingContainer;\n }\n\n const container = document.createElement(\"div\");\n container.setAttribute(\"id\", id);\n container.setAttribute(\n \"style\",\n \"overflow:hidden; position:fixed; height:100%; top:0; left:0; right:0; bottom:0; pointer-events:none; z-index:2147483647\",\n );\n\n document.body.appendChild(container);\n\n return container;\n};\n\nlet instanceCounter = 0;\n\nconst applyParticleEffect = (\n element: HTMLElement,\n options?: CoolParticleOptions,\n): (() => void) => {\n instanceCounter++;\n\n const defaultParticle = \"circle\";\n const particleType = options?.particle || defaultParticle;\n const sizes = [15, 20, 25, 35, 45];\n const limit = 45;\n\n let particles: CoolParticle[] = [];\n let autoAddParticle = false;\n let mouseX = 0;\n let mouseY = 0;\n\n const container = getContainer();\n\n function generateParticle() {\n const size =\n options?.size || sizes[Math.floor(Math.random() * sizes.length)];\n const speedHorz = options?.speedHorz || Math.random() * 10;\n const speedUp = options?.speedUp || Math.random() * 25;\n const spinVal = Math.random() * 360;\n const spinSpeed = Math.random() * 35 * (Math.random() <= 0.5 ? -1 : 1);\n const top = mouseY - size / 2;\n const left = mouseX - size / 2;\n const direction = Math.random() <= 0.5 ? -1 : 1;\n\n const particle = document.createElement(\"div\");\n\n if (particleType === \"circle\") {\n const svgNS = \"http://www.w3.org/2000/svg\";\n const circleSVG = document.createElementNS(svgNS, \"svg\");\n const circle = document.createElementNS(svgNS, \"circle\");\n circle.setAttributeNS(null, \"cx\", (size / 2).toString());\n circle.setAttributeNS(null, \"cy\", (size / 2).toString());\n circle.setAttributeNS(null, \"r\", (size / 2).toString());\n circle.setAttributeNS(\n null,\n \"fill\",\n `hsl(${Math.random() * 360}, 70%, 50%)`,\n );\n\n circleSVG.appendChild(circle);\n circleSVG.setAttribute(\"width\", size.toString());\n circleSVG.setAttribute(\"height\", size.toString());\n\n particle.appendChild(circleSVG);\n } else {\n particle.innerHTML = `<img src=\"${particleType}\" width=\"${size}\" height=\"${size}\" style=\"border-radius: 50%\">`;\n }\n\n particle.style.position = \"absolute\";\n particle.style.transform = `translate3d(${left}px, ${top}px, 0px) rotate(${spinVal}deg)`;\n\n container.appendChild(particle);\n\n particles.push({\n direction,\n element: particle,\n left,\n size,\n speedHorz,\n speedUp,\n spinSpeed,\n spinVal,\n top,\n });\n }\n\n function refreshParticles() {\n particles.forEach((p) => {\n p.left = p.left - p.speedHorz * p.direction;\n p.top = p.top - p.speedUp;\n p.speedUp = Math.min(p.size, p.speedUp - 1);\n p.spinVal = p.spinVal + p.spinSpeed;\n\n if (\n p.top >=\n Math.max(window.innerHeight, document.body.clientHeight) + p.size\n ) {\n particles = particles.filter((o) => o !== p);\n p.element.remove();\n }\n\n p.element.setAttribute(\n \"style\",\n [\n \"position:absolute\",\n \"will-change:transform\",\n `top:${p.top}px`,\n `left:${p.left}px`,\n `transform:rotate(${p.spinVal}deg)`,\n ].join(\";\"),\n );\n });\n }\n\n let animationFrame: number | undefined;\n\n let lastParticleTimestamp = 0;\n const particleGenerationDelay = 30;\n\n function loop() {\n const currentTime = performance.now();\n if (\n autoAddParticle &&\n particles.length < limit &&\n currentTime - lastParticleTimestamp > particleGenerationDelay\n ) {\n generateParticle();\n lastParticleTimestamp = currentTime;\n }\n\n refreshParticles();\n animationFrame = requestAnimationFrame(loop);\n }\n\n loop();\n\n const isTouchInteraction = \"ontouchstart\" in window;\n\n const tap = isTouchInteraction ? \"touchstart\" : \"mousedown\";\n const tapEnd = isTouchInteraction ? \"touchend\" : \"mouseup\";\n const move = isTouchInteraction ? \"touchmove\" : \"mousemove\";\n\n const updateMousePosition = (e: MouseEvent | TouchEvent) => {\n if (\"touches\" in e) {\n mouseX = e.touches?.[0].clientX;\n mouseY = e.touches?.[0].clientY;\n } else {\n mouseX = e.clientX;\n mouseY = e.clientY;\n }\n };\n\n const tapHandler = (e: MouseEvent | TouchEvent) => {\n updateMousePosition(e);\n autoAddParticle = true;\n };\n\n const disableAutoAddParticle = () => {\n autoAddParticle = false;\n };\n\n element.addEventListener(move, updateMousePosition, { passive: true });\n element.addEventListener(tap, tapHandler, { passive: true });\n element.addEventListener(tapEnd, disableAutoAddParticle, { passive: true });\n element.addEventListener(\"mouseleave\", disableAutoAddParticle, {\n passive: true,\n });\n\n return () => {\n element.removeEventListener(move, updateMousePosition);\n element.removeEventListener(tap, tapHandler);\n element.removeEventListener(tapEnd, disableAutoAddParticle);\n element.removeEventListener(\"mouseleave\", disableAutoAddParticle);\n\n const interval = setInterval(() => {\n if (animationFrame && particles.length === 0) {\n cancelAnimationFrame(animationFrame);\n clearInterval(interval);\n\n if (--instanceCounter === 0) {\n container.remove();\n }\n }\n }, 500);\n };\n};\n\ninterface CoolModeProps {\n children: ReactNode;\n options?: CoolParticleOptions;\n}\n\nexport const CoolMode: React.FC<CoolModeProps> = ({ children, options }) => {\n const ref = useRef<HTMLElement>(null);\n\n useEffect(() => {\n if (ref.current) {\n return applyParticleEffect(ref.current, options);\n }\n }, [options]);\n\n return React.cloneElement(children as React.ReactElement, { ref });\n};\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/dock-demo-2.json b/public/r/dock-demo-2.jsonindex f77ae1be..9da51f90 100644--- a/public/r/dock-demo-2.json+++ b/public/r/dock-demo-2.json@@ -11,7 +11,8 @@{"path": "registry/example/dock-demo-2.tsx","content": "\"use client\";\n\nimport React from \"react\";\n\nimport { Dock, DockIcon } from \"@/registry/magicui/dock\";\n\nexport type IconProps = React.HTMLAttributes<SVGElement>;\n\nexport default function DockDemo() {\n return (\n <div className=\"relative\">\n <Dock direction=\"middle\">\n <DockIcon>\n <Icons.gitHub className=\"size-6\" />\n </DockIcon>\n <DockIcon>\n <Icons.googleDrive className=\"size-6\" />\n </DockIcon>\n <DockIcon>\n <Icons.notion className=\"size-6\" />\n </DockIcon>\n <DockIcon>\n <Icons.whatsapp className=\"size-6\" />\n </DockIcon>\n </Dock>\n </div>\n );\n}\n\nconst Icons = {\n gitHub: (props: IconProps) => (\n <svg viewBox=\"0 0 438.549 438.549\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M409.132 114.573c-19.608-33.596-46.205-60.194-79.798-79.8-33.598-19.607-70.277-29.408-110.063-29.408-39.781 0-76.472 9.804-110.063 29.408-33.596 19.605-60.192 46.204-79.8 79.8C9.803 148.168 0 184.854 0 224.63c0 47.78 13.94 90.745 41.827 128.906 27.884 38.164 63.906 64.572 108.063 79.227 5.14.954 8.945.283 11.419-1.996 2.475-2.282 3.711-5.14 3.711-8.562 0-.571-.049-5.708-.144-15.417a2549.81 2549.81 0 01-.144-25.406l-6.567 1.136c-4.187.767-9.469 1.092-15.846 1-6.374-.089-12.991-.757-19.842-1.999-6.854-1.231-13.229-4.086-19.13-8.559-5.898-4.473-10.085-10.328-12.56-17.556l-2.855-6.57c-1.903-4.374-4.899-9.233-8.992-14.559-4.093-5.331-8.232-8.945-12.419-10.848l-1.999-1.431c-1.332-.951-2.568-2.098-3.711-3.429-1.142-1.331-1.997-2.663-2.568-3.997-.572-1.335-.098-2.43 1.427-3.289 1.525-.859 4.281-1.276 8.28-1.276l5.708.853c3.807.763 8.516 3.042 14.133 6.851 5.614 3.806 10.229 8.754 13.846 14.842 4.38 7.806 9.657 13.754 15.846 17.847 6.184 4.093 12.419 6.136 18.699 6.136 6.28 0 11.704-.476 16.274-1.423 4.565-.952 8.848-2.383 12.847-4.285 1.713-12.758 6.377-22.559 13.988-29.41-10.848-1.14-20.601-2.857-29.264-5.14-8.658-2.286-17.605-5.996-26.835-11.14-9.235-5.137-16.896-11.516-22.985-19.126-6.09-7.614-11.088-17.61-14.987-29.979-3.901-12.374-5.852-26.648-5.852-42.826 0-23.035 7.52-42.637 22.557-58.817-7.044-17.318-6.379-36.732 1.997-58.24 5.52-1.715 13.706-.428 24.554 3.853 10.85 4.283 18.794 7.952 23.84 10.994 5.046 3.041 9.089 5.618 12.135 7.708 17.705-4.947 35.976-7.421 54.818-7.421s37.117 2.474 54.823 7.421l10.849-6.849c7.419-4.57 16.18-8.758 26.262-12.565 10.088-3.805 17.802-4.853 23.134-3.138 8.562 21.509 9.325 40.922 2.279 58.24 15.036 16.18 22.559 35.787 22.559 58.817 0 16.178-1.958 30.497-5.853 42.966-3.9 12.471-8.941 22.457-15.125 29.979-6.191 7.521-13.901 13.85-23.131 18.986-9.232 5.14-18.182 8.85-26.84 11.136-8.662 2.286-18.415 4.004-29.263 5.146 9.894 8.562 14.842 22.077 14.842 40.539v60.237c0 3.422 1.19 6.279 3.572 8.562 2.379 2.279 6.136 2.95 11.276 1.995 44.163-14.653 80.185-41.062 108.068-79.226 27.88-38.161 41.825-81.126 41.825-128.906-.01-39.771-9.818-76.454-29.414-110.049z\"\n ></path>\n </svg>\n ),\n notion: (props: IconProps) => (\n <svg\n width=\"100\"\n height=\"100\"\n viewBox=\"0 0 100 100\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <path\n d=\"M6.017 4.313l55.333 -4.087c6.797 -0.583 8.543 -0.19 12.817 2.917l17.663 12.443c2.913 2.14 3.883 2.723 3.883 5.053v68.243c0 4.277 -1.553 6.807 -6.99 7.193L24.467 99.967c-4.08 0.193 -6.023 -0.39 -8.16 -3.113L3.3 79.94c-2.333 -3.113 -3.3 -5.443 -3.3 -8.167V11.113c0 -3.497 1.553 -6.413 6.017 -6.8z\"\n fill=\"#fff\"\n />\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M61.35 0.227l-55.333 4.087C1.553 4.7 0 7.617 0 11.113v60.66c0 2.723 0.967 5.053 3.3 8.167l13.007 16.913c2.137 2.723 4.08 3.307 8.16 3.113l64.257 -3.89c5.433 -0.387 6.99 -2.917 6.99 -7.193V20.64c0 -2.21 -0.873 -2.847 -3.443 -4.733L74.167 3.143c-4.273 -3.107 -6.02 -3.5 -12.817 -2.917zM25.92 19.523c-5.247 0.353 -6.437 0.433 -9.417 -1.99L8.927 11.507c-0.77 -0.78 -0.383 -1.753 1.557 -1.947l53.193 -3.887c4.467 -0.39 6.793 1.167 8.54 2.527l9.123 6.61c0.39 0.197 1.36 1.36 0.193 1.36l-54.933 3.307 -0.68 0.047zM19.803 88.3V30.367c0 -2.53 0.777 -3.697 3.103 -3.893L86 22.78c2.14 -0.193 3.107 1.167 3.107 3.693v57.547c0 2.53 -0.39 4.67 -3.883 4.863l-60.377 3.5c-3.493 0.193 -5.043 -0.97 -5.043 -4.083zm59.6 -54.827c0.387 1.75 0 3.5 -1.75 3.7l-2.91 0.577v42.773c-2.527 1.36 -4.853 2.137 -6.797 2.137 -3.107 0 -3.883 -0.973 -6.21 -3.887l-19.03 -29.94v28.967l6.02 1.363s0 3.5 -4.857 3.5l-13.39 0.777c-0.39 -0.78 0 -2.723 1.357 -3.11l3.497 -0.97v-38.3L30.48 40.667c-0.39 -1.75 0.58 -4.277 3.3 -4.473l14.367 -0.967 19.8 30.327v-26.83l-5.047 -0.58c-0.39 -2.143 1.163 -3.7 3.103 -3.89l13.4 -0.78z\"\n fill=\"#000\"\n />\n </svg>\n ),\n googleDrive: (props: IconProps) => (\n <svg viewBox=\"0 0 87.3 78\" xmlns=\"http://www.w3.org/2000/svg\" {...props}>\n <path\n d=\"m6.6 66.85 3.85 6.65c.8 1.4 1.95 2.5 3.3 3.3l13.75-23.8h-27.5c0 1.55.4 3.1 1.2 4.5z\"\n fill=\"#0066da\"\n />\n <path\n d=\"m43.65 25-13.75-23.8c-1.35.8-2.5 1.9-3.3 3.3l-25.4 44a9.06 9.06 0 0 0 -1.2 4.5h27.5z\"\n fill=\"#00ac47\"\n />\n <path\n d=\"m73.55 76.8c1.35-.8 2.5-1.9 3.3-3.3l1.6-2.75 7.65-13.25c.8-1.4 1.2-2.95 1.2-4.5h-27.502l5.852 11.5z\"\n fill=\"#ea4335\"\n />\n <path\n d=\"m43.65 25 13.75-23.8c-1.35-.8-2.9-1.2-4.5-1.2h-18.5c-1.6 0-3.15.45-4.5 1.2z\"\n fill=\"#00832d\"\n />\n <path\n d=\"m59.8 53h-32.3l-13.75 23.8c1.35.8 2.9 1.2 4.5 1.2h50.8c1.6 0 3.15-.45 4.5-1.2z\"\n fill=\"#2684fc\"\n />\n <path\n d=\"m73.4 26.5-12.7-22c-.8-1.4-1.95-2.5-3.3-3.3l-13.75 23.8 16.15 28h27.45c0-1.55-.4-3.1-1.2-4.5z\"\n fill=\"#ffba00\"\n />\n </svg>\n ),\n whatsapp: (props: IconProps) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 175.216 175.552\"\n {...props}\n >\n <defs>\n <linearGradient\n id=\"b\"\n x1=\"85.915\"\n x2=\"86.535\"\n y1=\"32.567\"\n y2=\"137.092\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop offset=\"0\" stopColor=\"#57d163\" />\n <stop offset=\"1\" stopColor=\"#23b33a\" />\n </linearGradient>\n <filter\n id=\"a\"\n width=\"1.115\"\n height=\"1.114\"\n x=\"-.057\"\n y=\"-.057\"\n colorInterpolationFilters=\"sRGB\"\n >\n <feGaussianBlur stdDeviation=\"3.531\" />\n </filter>\n </defs>\n <path\n fill=\"#b3b3b3\"\n d=\"m54.532 138.45 2.235 1.324c9.387 5.571 20.15 8.518 31.126 8.523h.023c33.707 0 61.139-27.426 61.153-61.135.006-16.335-6.349-31.696-17.895-43.251A60.75 60.75 0 0 0 87.94 25.983c-33.733 0-61.166 27.423-61.178 61.13a60.98 60.98 0 0 0 9.349 32.535l1.455 2.312-6.179 22.558zm-40.811 23.544L24.16 123.88c-6.438-11.154-9.825-23.808-9.821-36.772.017-40.556 33.021-73.55 73.578-73.55 19.681.01 38.154 7.669 52.047 21.572s21.537 32.383 21.53 52.037c-.018 40.553-33.027 73.553-73.578 73.553h-.032c-12.313-.005-24.412-3.094-35.159-8.954zm0 0\"\n filter=\"url(#a)\"\n />\n <path\n fill=\"#fff\"\n d=\"m12.966 161.238 10.439-38.114a73.42 73.42 0 0 1-9.821-36.772c.017-40.556 33.021-73.55 73.578-73.55 19.681.01 38.154 7.669 52.047 21.572s21.537 32.383 21.53 52.037c-.018 40.553-33.027 73.553-73.578 73.553h-.032c-12.313-.005-24.412-3.094-35.159-8.954z\"\n />\n <path\n fill=\"url(#linearGradient1780)\"\n d=\"M87.184 25.227c-33.733 0-61.166 27.423-61.178 61.13a60.98 60.98 0 0 0 9.349 32.535l1.455 2.312-6.179 22.559 23.146-6.069 2.235 1.324c9.387 5.571 20.15 8.518 31.126 8.524h.023c33.707 0 61.14-27.426 61.153-61.135a60.75 60.75 0 0 0-17.895-43.251 60.75 60.75 0 0 0-43.235-17.929z\"\n />\n <path\n fill=\"url(#b)\"\n d=\"M87.184 25.227c-33.733 0-61.166 27.423-61.178 61.13a60.98 60.98 0 0 0 9.349 32.535l1.455 2.313-6.179 22.558 23.146-6.069 2.235 1.324c9.387 5.571 20.15 8.517 31.126 8.523h.023c33.707 0 61.14-27.426 61.153-61.135a60.75 60.75 0 0 0-17.895-43.251 60.75 60.75 0 0 0-43.235-17.928z\"\n />\n <path\n fill=\"#fff\"\n fillRule=\"evenodd\"\n d=\"M68.772 55.603c-1.378-3.061-2.828-3.123-4.137-3.176l-3.524-.043c-1.226 0-3.218.46-4.902 2.3s-6.435 6.287-6.435 15.332 6.588 17.785 7.506 19.013 12.718 20.381 31.405 27.75c15.529 6.124 18.689 4.906 22.061 4.6s10.877-4.447 12.408-8.74 1.532-7.971 1.073-8.74-1.685-1.226-3.525-2.146-10.877-5.367-12.562-5.981-2.91-.919-4.137.921-4.746 5.979-5.819 7.206-2.144 1.381-3.984.462-7.76-2.861-14.784-9.124c-5.465-4.873-9.154-10.891-10.228-12.73s-.114-2.835.808-3.751c.825-.824 1.838-2.147 2.759-3.22s1.224-1.84 1.836-3.065.307-2.301-.153-3.22-4.032-10.011-5.666-13.647\"\n />\n </svg>\n ),\n};\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/dock-demo-3.json b/public/r/dock-demo-3.jsonindex 7ef8b04d..42ce10dd 100644--- a/public/r/dock-demo-3.json+++ b/public/r/dock-demo-3.json@@ -11,7 +11,8 @@{"path": "registry/example/dock-demo-3.tsx","content": "\"use client\";\n\nimport React from \"react\";\n\nimport { Dock, DockIcon } from \"@/registry/magicui/dock\";\n\nexport type IconProps = React.HTMLAttributes<SVGElement>;\n\nexport default function DockDemo() {\n return (\n <div className=\"relative\">\n <Dock iconMagnification={60} iconDistance={100}>\n <DockIcon className=\"bg-black/10 dark:bg-white/10\">\n <Icons.gitHub className=\"size-full\" />\n </DockIcon>\n <DockIcon className=\"bg-black/10 dark:bg-white/10\">\n <Icons.googleDrive className=\"size-full\" />\n </DockIcon>\n <DockIcon className=\"bg-black/10 dark:bg-white/10\">\n <Icons.notion className=\"size-full\" />\n </DockIcon>\n <DockIcon className=\"bg-black/10 dark:bg-white/10\">\n <Icons.whatsapp className=\"size-full\" />\n </DockIcon>\n </Dock>\n </div>\n );\n}\n\nconst Icons = {\n gitHub: (props: IconProps) => (\n <svg viewBox=\"0 0 438.549 438.549\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M409.132 114.573c-19.608-33.596-46.205-60.194-79.798-79.8-33.598-19.607-70.277-29.408-110.063-29.408-39.781 0-76.472 9.804-110.063 29.408-33.596 19.605-60.192 46.204-79.8 79.8C9.803 148.168 0 184.854 0 224.63c0 47.78 13.94 90.745 41.827 128.906 27.884 38.164 63.906 64.572 108.063 79.227 5.14.954 8.945.283 11.419-1.996 2.475-2.282 3.711-5.14 3.711-8.562 0-.571-.049-5.708-.144-15.417a2549.81 2549.81 0 01-.144-25.406l-6.567 1.136c-4.187.767-9.469 1.092-15.846 1-6.374-.089-12.991-.757-19.842-1.999-6.854-1.231-13.229-4.086-19.13-8.559-5.898-4.473-10.085-10.328-12.56-17.556l-2.855-6.57c-1.903-4.374-4.899-9.233-8.992-14.559-4.093-5.331-8.232-8.945-12.419-10.848l-1.999-1.431c-1.332-.951-2.568-2.098-3.711-3.429-1.142-1.331-1.997-2.663-2.568-3.997-.572-1.335-.098-2.43 1.427-3.289 1.525-.859 4.281-1.276 8.28-1.276l5.708.853c3.807.763 8.516 3.042 14.133 6.851 5.614 3.806 10.229 8.754 13.846 14.842 4.38 7.806 9.657 13.754 15.846 17.847 6.184 4.093 12.419 6.136 18.699 6.136 6.28 0 11.704-.476 16.274-1.423 4.565-.952 8.848-2.383 12.847-4.285 1.713-12.758 6.377-22.559 13.988-29.41-10.848-1.14-20.601-2.857-29.264-5.14-8.658-2.286-17.605-5.996-26.835-11.14-9.235-5.137-16.896-11.516-22.985-19.126-6.09-7.614-11.088-17.61-14.987-29.979-3.901-12.374-5.852-26.648-5.852-42.826 0-23.035 7.52-42.637 22.557-58.817-7.044-17.318-6.379-36.732 1.997-58.24 5.52-1.715 13.706-.428 24.554 3.853 10.85 4.283 18.794 7.952 23.84 10.994 5.046 3.041 9.089 5.618 12.135 7.708 17.705-4.947 35.976-7.421 54.818-7.421s37.117 2.474 54.823 7.421l10.849-6.849c7.419-4.57 16.18-8.758 26.262-12.565 10.088-3.805 17.802-4.853 23.134-3.138 8.562 21.509 9.325 40.922 2.279 58.24 15.036 16.18 22.559 35.787 22.559 58.817 0 16.178-1.958 30.497-5.853 42.966-3.9 12.471-8.941 22.457-15.125 29.979-6.191 7.521-13.901 13.85-23.131 18.986-9.232 5.14-18.182 8.85-26.84 11.136-8.662 2.286-18.415 4.004-29.263 5.146 9.894 8.562 14.842 22.077 14.842 40.539v60.237c0 3.422 1.19 6.279 3.572 8.562 2.379 2.279 6.136 2.95 11.276 1.995 44.163-14.653 80.185-41.062 108.068-79.226 27.88-38.161 41.825-81.126 41.825-128.906-.01-39.771-9.818-76.454-29.414-110.049z\"\n ></path>\n </svg>\n ),\n notion: (props: IconProps) => (\n <svg\n width=\"100\"\n height=\"100\"\n viewBox=\"0 0 100 100\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <path\n d=\"M6.017 4.313l55.333 -4.087c6.797 -0.583 8.543 -0.19 12.817 2.917l17.663 12.443c2.913 2.14 3.883 2.723 3.883 5.053v68.243c0 4.277 -1.553 6.807 -6.99 7.193L24.467 99.967c-4.08 0.193 -6.023 -0.39 -8.16 -3.113L3.3 79.94c-2.333 -3.113 -3.3 -5.443 -3.3 -8.167V11.113c0 -3.497 1.553 -6.413 6.017 -6.8z\"\n fill=\"#fff\"\n />\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M61.35 0.227l-55.333 4.087C1.553 4.7 0 7.617 0 11.113v60.66c0 2.723 0.967 5.053 3.3 8.167l13.007 16.913c2.137 2.723 4.08 3.307 8.16 3.113l64.257 -3.89c5.433 -0.387 6.99 -2.917 6.99 -7.193V20.64c0 -2.21 -0.873 -2.847 -3.443 -4.733L74.167 3.143c-4.273 -3.107 -6.02 -3.5 -12.817 -2.917zM25.92 19.523c-5.247 0.353 -6.437 0.433 -9.417 -1.99L8.927 11.507c-0.77 -0.78 -0.383 -1.753 1.557 -1.947l53.193 -3.887c4.467 -0.39 6.793 1.167 8.54 2.527l9.123 6.61c0.39 0.197 1.36 1.36 0.193 1.36l-54.933 3.307 -0.68 0.047zM19.803 88.3V30.367c0 -2.53 0.777 -3.697 3.103 -3.893L86 22.78c2.14 -0.193 3.107 1.167 3.107 3.693v57.547c0 2.53 -0.39 4.67 -3.883 4.863l-60.377 3.5c-3.493 0.193 -5.043 -0.97 -5.043 -4.083zm59.6 -54.827c0.387 1.75 0 3.5 -1.75 3.7l-2.91 0.577v42.773c-2.527 1.36 -4.853 2.137 -6.797 2.137 -3.107 0 -3.883 -0.973 -6.21 -3.887l-19.03 -29.94v28.967l6.02 1.363s0 3.5 -4.857 3.5l-13.39 0.777c-0.39 -0.78 0 -2.723 1.357 -3.11l3.497 -0.97v-38.3L30.48 40.667c-0.39 -1.75 0.58 -4.277 3.3 -4.473l14.367 -0.967 19.8 30.327v-26.83l-5.047 -0.58c-0.39 -2.143 1.163 -3.7 3.103 -3.89l13.4 -0.78z\"\n fill=\"#000\"\n />\n </svg>\n ),\n googleDrive: (props: IconProps) => (\n <svg viewBox=\"0 0 87.3 78\" xmlns=\"http://www.w3.org/2000/svg\" {...props}>\n <path\n d=\"m6.6 66.85 3.85 6.65c.8 1.4 1.95 2.5 3.3 3.3l13.75-23.8h-27.5c0 1.55.4 3.1 1.2 4.5z\"\n fill=\"#0066da\"\n />\n <path\n d=\"m43.65 25-13.75-23.8c-1.35.8-2.5 1.9-3.3 3.3l-25.4 44a9.06 9.06 0 0 0 -1.2 4.5h27.5z\"\n fill=\"#00ac47\"\n />\n <path\n d=\"m73.55 76.8c1.35-.8 2.5-1.9 3.3-3.3l1.6-2.75 7.65-13.25c.8-1.4 1.2-2.95 1.2-4.5h-27.502l5.852 11.5z\"\n fill=\"#ea4335\"\n />\n <path\n d=\"m43.65 25 13.75-23.8c-1.35-.8-2.9-1.2-4.5-1.2h-18.5c-1.6 0-3.15.45-4.5 1.2z\"\n fill=\"#00832d\"\n />\n <path\n d=\"m59.8 53h-32.3l-13.75 23.8c1.35.8 2.9 1.2 4.5 1.2h50.8c1.6 0 3.15-.45 4.5-1.2z\"\n fill=\"#2684fc\"\n />\n <path\n d=\"m73.4 26.5-12.7-22c-.8-1.4-1.95-2.5-3.3-3.3l-13.75 23.8 16.15 28h27.45c0-1.55-.4-3.1-1.2-4.5z\"\n fill=\"#ffba00\"\n />\n </svg>\n ),\n whatsapp: (props: IconProps) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 175.216 175.552\"\n {...props}\n >\n <defs>\n <linearGradient\n id=\"b\"\n x1=\"85.915\"\n x2=\"86.535\"\n y1=\"32.567\"\n y2=\"137.092\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop offset=\"0\" stopColor=\"#57d163\" />\n <stop offset=\"1\" stopColor=\"#23b33a\" />\n </linearGradient>\n <filter\n id=\"a\"\n width=\"1.115\"\n height=\"1.114\"\n x=\"-.057\"\n y=\"-.057\"\n colorInterpolationFilters=\"sRGB\"\n >\n <feGaussianBlur stdDeviation=\"3.531\" />\n </filter>\n </defs>\n <path\n fill=\"#b3b3b3\"\n d=\"m54.532 138.45 2.235 1.324c9.387 5.571 20.15 8.518 31.126 8.523h.023c33.707 0 61.139-27.426 61.153-61.135.006-16.335-6.349-31.696-17.895-43.251A60.75 60.75 0 0 0 87.94 25.983c-33.733 0-61.166 27.423-61.178 61.13a60.98 60.98 0 0 0 9.349 32.535l1.455 2.312-6.179 22.558zm-40.811 23.544L24.16 123.88c-6.438-11.154-9.825-23.808-9.821-36.772.017-40.556 33.021-73.55 73.578-73.55 19.681.01 38.154 7.669 52.047 21.572s21.537 32.383 21.53 52.037c-.018 40.553-33.027 73.553-73.578 73.553h-.032c-12.313-.005-24.412-3.094-35.159-8.954zm0 0\"\n filter=\"url(#a)\"\n />\n <path\n fill=\"#fff\"\n d=\"m12.966 161.238 10.439-38.114a73.42 73.42 0 0 1-9.821-36.772c.017-40.556 33.021-73.55 73.578-73.55 19.681.01 38.154 7.669 52.047 21.572s21.537 32.383 21.53 52.037c-.018 40.553-33.027 73.553-73.578 73.553h-.032c-12.313-.005-24.412-3.094-35.159-8.954z\"\n />\n <path\n fill=\"url(#linearGradient1780)\"\n d=\"M87.184 25.227c-33.733 0-61.166 27.423-61.178 61.13a60.98 60.98 0 0 0 9.349 32.535l1.455 2.312-6.179 22.559 23.146-6.069 2.235 1.324c9.387 5.571 20.15 8.518 31.126 8.524h.023c33.707 0 61.14-27.426 61.153-61.135a60.75 60.75 0 0 0-17.895-43.251 60.75 60.75 0 0 0-43.235-17.929z\"\n />\n <path\n fill=\"url(#b)\"\n d=\"M87.184 25.227c-33.733 0-61.166 27.423-61.178 61.13a60.98 60.98 0 0 0 9.349 32.535l1.455 2.313-6.179 22.558 23.146-6.069 2.235 1.324c9.387 5.571 20.15 8.517 31.126 8.523h.023c33.707 0 61.14-27.426 61.153-61.135a60.75 60.75 0 0 0-17.895-43.251 60.75 60.75 0 0 0-43.235-17.928z\"\n />\n <path\n fill=\"#fff\"\n fillRule=\"evenodd\"\n d=\"M68.772 55.603c-1.378-3.061-2.828-3.123-4.137-3.176l-3.524-.043c-1.226 0-3.218.46-4.902 2.3s-6.435 6.287-6.435 15.332 6.588 17.785 7.506 19.013 12.718 20.381 31.405 27.75c15.529 6.124 18.689 4.906 22.061 4.6s10.877-4.447 12.408-8.74 1.532-7.971 1.073-8.74-1.685-1.226-3.525-2.146-10.877-5.367-12.562-5.981-2.91-.919-4.137.921-4.746 5.979-5.819 7.206-2.144 1.381-3.984.462-7.76-2.861-14.784-9.124c-5.465-4.873-9.154-10.891-10.228-12.73s-.114-2.835.808-3.751c.825-.824 1.838-2.147 2.759-3.22s1.224-1.84 1.836-3.065.307-2.301-.153-3.22-4.032-10.011-5.666-13.647\"\n />\n </svg>\n ),\n};\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/dock-demo.json b/public/r/dock-demo.jsonindex 42c33ef4..bb86e152 100644--- a/public/r/dock-demo.json+++ b/public/r/dock-demo.json@@ -11,7 +11,8 @@{"path": "registry/example/dock-demo.tsx","content": "\"use client\";\n\nimport { CalendarIcon, HomeIcon, MailIcon, PencilIcon } from \"lucide-react\";\nimport Link from \"next/link\";\nimport React from \"react\";\n\nimport { ModeToggle } from \"@/components/mode-toggle\";\nimport { buttonVariants } from \"@/components/ui/button\";\nimport { Separator } from \"@/components/ui/separator\";\nimport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { cn } from \"@/lib/utils\";\nimport { Dock, DockIcon } from \"@/registry/magicui/dock\";\n\nexport type IconProps = React.HTMLAttributes<SVGElement>;\n\nconst Icons = {\n calendar: (props: IconProps) => <CalendarIcon {...props} />,\n email: (props: IconProps) => <MailIcon {...props} />,\n linkedin: (props: IconProps) => (\n <svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" {...props}>\n <title>LinkedIn</title>\n <path\n fill=\"currentColor\"\n d=\"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z\"\n />\n </svg>\n ),\n x: (props: IconProps) => (\n <svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" {...props}>\n <title>X</title>\n <path\n fill=\"currentColor\"\n d=\"M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z\"\n />\n </svg>\n ),\n youtube: (props: IconProps) => (\n <svg\n width=\"32px\"\n height=\"32px\"\n viewBox=\"0 0 32 32\"\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <title>youtube</title>\n <path d=\"M29.41,9.26a3.5,3.5,0,0,0-2.47-2.47C24.76,6.2,16,6.2,16,6.2s-8.76,0-10.94.59A3.5,3.5,0,0,0,2.59,9.26,36.13,36.13,0,0,0,2,16a36.13,36.13,0,0,0,.59,6.74,3.5,3.5,0,0,0,2.47,2.47C7.24,25.8,16,25.8,16,25.8s8.76,0,10.94-.59a3.5,3.5,0,0,0,2.47-2.47A36.13,36.13,0,0,0,30,16,36.13,36.13,0,0,0,29.41,9.26ZM13.2,20.2V11.8L20.47,16Z\" />\n </svg>\n ),\n github: (props: IconProps) => (\n <svg viewBox=\"0 0 438.549 438.549\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M409.132 114.573c-19.608-33.596-46.205-60.194-79.798-79.8-33.598-19.607-70.277-29.408-110.063-29.408-39.781 0-76.472 9.804-110.063 29.408-33.596 19.605-60.192 46.204-79.8 79.8C9.803 148.168 0 184.854 0 224.63c0 47.78 13.94 90.745 41.827 128.906 27.884 38.164 63.906 64.572 108.063 79.227 5.14.954 8.945.283 11.419-1.996 2.475-2.282 3.711-5.14 3.711-8.562 0-.571-.049-5.708-.144-15.417a2549.81 2549.81 0 01-.144-25.406l-6.567 1.136c-4.187.767-9.469 1.092-15.846 1-6.374-.089-12.991-.757-19.842-1.999-6.854-1.231-13.229-4.086-19.13-8.559-5.898-4.473-10.085-10.328-12.56-17.556l-2.855-6.57c-1.903-4.374-4.899-9.233-8.992-14.559-4.093-5.331-8.232-8.945-12.419-10.848l-1.999-1.431c-1.332-.951-2.568-2.098-3.711-3.429-1.142-1.331-1.997-2.663-2.568-3.997-.572-1.335-.098-2.43 1.427-3.289 1.525-.859 4.281-1.276 8.28-1.276l5.708.853c3.807.763 8.516 3.042 14.133 6.851 5.614 3.806 10.229 8.754 13.846 14.842 4.38 7.806 9.657 13.754 15.846 17.847 6.184 4.093 12.419 6.136 18.699 6.136 6.28 0 11.704-.476 16.274-1.423 4.565-.952 8.848-2.383 12.847-4.285 1.713-12.758 6.377-22.559 13.988-29.41-10.848-1.14-20.601-2.857-29.264-5.14-8.658-2.286-17.605-5.996-26.835-11.14-9.235-5.137-16.896-11.516-22.985-19.126-6.09-7.614-11.088-17.61-14.987-29.979-3.901-12.374-5.852-26.648-5.852-42.826 0-23.035 7.52-42.637 22.557-58.817-7.044-17.318-6.379-36.732 1.997-58.24 5.52-1.715 13.706-.428 24.554 3.853 10.85 4.283 18.794 7.952 23.84 10.994 5.046 3.041 9.089 5.618 12.135 7.708 17.705-4.947 35.976-7.421 54.818-7.421s37.117 2.474 54.823 7.421l10.849-6.849c7.419-4.57 16.18-8.758 26.262-12.565 10.088-3.805 17.802-4.853 23.134-3.138 8.562 21.509 9.325 40.922 2.279 58.24 15.036 16.18 22.559 35.787 22.559 58.817 0 16.178-1.958 30.497-5.853 42.966-3.9 12.471-8.941 22.457-15.125 29.979-6.191 7.521-13.901 13.85-23.131 18.986-9.232 5.14-18.182 8.85-26.84 11.136-8.662 2.286-18.415 4.004-29.263 5.146 9.894 8.562 14.842 22.077 14.842 40.539v60.237c0 3.422 1.19 6.279 3.572 8.562 2.379 2.279 6.136 2.95 11.276 1.995 44.163-14.653 80.185-41.062 108.068-79.226 27.88-38.161 41.825-81.126 41.825-128.906-.01-39.771-9.818-76.454-29.414-110.049z\"\n ></path>\n </svg>\n ),\n};\n\nconst DATA = {\n navbar: [\n { href: \"#\", icon: HomeIcon, label: \"Home\" },\n { href: \"#\", icon: PencilIcon, label: \"Blog\" },\n ],\n contact: {\n social: {\n GitHub: {\n name: \"GitHub\",\n url: \"#\",\n icon: Icons.github,\n },\n LinkedIn: {\n name: \"LinkedIn\",\n url: \"#\",\n icon: Icons.linkedin,\n },\n X: {\n name: \"X\",\n url: \"#\",\n icon: Icons.x,\n },\n email: {\n name: \"Send Email\",\n url: \"#\",\n icon: Icons.email,\n },\n },\n },\n};\n\nexport default function DockDemo() {\n return (\n <div className=\"relative flex h-[500px] w-full flex-col items-center justify-center overflow-hidden rounded-lg border bg-background md:shadow-xl\">\n <span className=\"pointer-events-none whitespace-pre-wrap bg-gradient-to-b from-black to-gray-300/80 bg-clip-text text-center text-8xl font-semibold leading-none text-transparent dark:from-white dark:to-slate-900/10\">\n Dock\n </span>\n <TooltipProvider>\n <Dock direction=\"middle\">\n {DATA.navbar.map((item) => (\n <DockIcon key={item.label}>\n <Tooltip>\n <TooltipTrigger asChild>\n <Link\n href={item.href}\n aria-label={item.label}\n className={cn(\n buttonVariants({ variant: \"ghost\", size: \"icon\" }),\n \"size-12 rounded-full\",\n )}\n >\n <item.icon className=\"size-4\" />\n </Link>\n </TooltipTrigger>\n <TooltipContent>\n <p>{item.label}</p>\n </TooltipContent>\n </Tooltip>\n </DockIcon>\n ))}\n <Separator orientation=\"vertical\" className=\"h-full\" />\n {Object.entries(DATA.contact.social).map(([name, social]) => (\n <DockIcon key={name}>\n <Tooltip>\n <TooltipTrigger asChild>\n <Link\n href={social.url}\n aria-label={social.name}\n className={cn(\n buttonVariants({ variant: \"ghost\", size: \"icon\" }),\n \"size-12 rounded-full\",\n )}\n >\n <social.icon className=\"size-4\" />\n </Link>\n </TooltipTrigger>\n <TooltipContent>\n <p>{name}</p>\n </TooltipContent>\n </Tooltip>\n </DockIcon>\n ))}\n <Separator orientation=\"vertical\" className=\"h-full py-2\" />\n <DockIcon>\n <Tooltip>\n <TooltipTrigger asChild>\n <ModeToggle className=\"rounded-full\" />\n </TooltipTrigger>\n <TooltipContent>\n <p>Theme</p>\n </TooltipContent>\n </Tooltip>\n </DockIcon>\n </Dock>\n </TooltipProvider>\n </div>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/dock.json b/public/r/dock.jsonindex e2bf7df7..9469bb8f 100644--- a/public/r/dock.json+++ b/public/r/dock.json@@ -11,7 +11,8 @@{"path": "registry/magicui/dock.tsx","content": "\"use client\";\n\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport {\n motion,\n MotionProps,\n MotionValue,\n useMotionValue,\n useSpring,\n useTransform,\n} from \"motion/react\";\nimport React, { PropsWithChildren, useRef } from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nexport interface DockProps extends VariantProps<typeof dockVariants> {\n className?: string;\n iconSize?: number;\n iconMagnification?: number;\n iconDistance?: number;\n direction?: \"top\" | \"middle\" | \"bottom\";\n children: React.ReactNode;\n}\n\nconst DEFAULT_SIZE = 40;\nconst DEFAULT_MAGNIFICATION = 60;\nconst DEFAULT_DISTANCE = 140;\n\nconst dockVariants = cva(\n \"supports-backdrop-blur:bg-white/10 supports-backdrop-blur:dark:bg-black/10 mx-auto mt-8 flex h-[58px] w-max items-center justify-center gap-2 rounded-2xl border p-2 backdrop-blur-md\",\n);\n\nconst Dock = React.forwardRef<HTMLDivElement, DockProps>(\n (\n {\n className,\n children,\n iconSize = DEFAULT_SIZE,\n iconMagnification = DEFAULT_MAGNIFICATION,\n iconDistance = DEFAULT_DISTANCE,\n direction = \"middle\",\n ...props\n },\n ref,\n ) => {\n const mouseX = useMotionValue(Infinity);\n\n const renderChildren = () => {\n return React.Children.map(children, (child) => {\n if (React.isValidElement(child) && child.type === DockIcon) {\n return React.cloneElement(child, {\n ...child.props,\n mouseX: mouseX,\n size: iconSize,\n magnification: iconMagnification,\n distance: iconDistance,\n });\n }\n return child;\n });\n };\n\n return (\n <motion.div\n ref={ref}\n onMouseMove={(e) => mouseX.set(e.pageX)}\n onMouseLeave={() => mouseX.set(Infinity)}\n {...props}\n className={cn(dockVariants({ className }), {\n \"items-start\": direction === \"top\",\n \"items-center\": direction === \"middle\",\n \"items-end\": direction === \"bottom\",\n })}\n >\n {renderChildren()}\n </motion.div>\n );\n },\n);\n\nDock.displayName = \"Dock\";\n\nexport interface DockIconProps\n extends Omit<MotionProps & React.HTMLAttributes<HTMLDivElement>, \"children\"> {\n size?: number;\n magnification?: number;\n distance?: number;\n mouseX?: MotionValue<number>;\n className?: string;\n children?: React.ReactNode;\n props?: PropsWithChildren;\n}\n\nconst DockIcon = ({\n size = DEFAULT_SIZE,\n magnification = DEFAULT_MAGNIFICATION,\n distance = DEFAULT_DISTANCE,\n mouseX,\n className,\n children,\n ...props\n}: DockIconProps) => {\n const ref = useRef<HTMLDivElement>(null);\n const padding = Math.max(6, size * 0.2);\n const defaultMouseX = useMotionValue(Infinity);\n\n const distanceCalc = useTransform(mouseX ?? defaultMouseX, (val: number) => {\n const bounds = ref.current?.getBoundingClientRect() ?? { x: 0, width: 0 };\n return val - bounds.x - bounds.width / 2;\n });\n\n const sizeTransform = useTransform(\n distanceCalc,\n [-distance, 0, distance],\n [size, magnification, size],\n );\n\n const scaleSize = useSpring(sizeTransform, {\n mass: 0.1,\n stiffness: 150,\n damping: 12,\n });\n\n return (\n <motion.div\n ref={ref}\n style={{ width: scaleSize, height: scaleSize, padding }}\n className={cn(\n \"flex aspect-square cursor-pointer items-center justify-center rounded-full\",\n className,\n )}\n {...props}\n >\n {children}\n </motion.div>\n );\n};\n\nDockIcon.displayName = \"DockIcon\";\n\nexport { Dock, DockIcon, dockVariants };\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/dot-pattern-demo.json b/public/r/dot-pattern-demo.jsonindex 5bcc1b67..aed93280 100644--- a/public/r/dot-pattern-demo.json+++ b/public/r/dot-pattern-demo.json@@ -11,7 +11,8 @@{"path": "registry/example/dot-pattern-demo.tsx","content": "\"use client\";\n\nimport { cn } from \"@/lib/utils\";\nimport { DotPattern } from \"@/registry/magicui/dot-pattern\";\n\nexport default function DotPatternDemo() {\n return (\n <div className=\"relative flex h-[500px] w-full flex-col items-center justify-center overflow-hidden rounded-lg border bg-background md:shadow-xl\">\n <p className=\"z-10 whitespace-pre-wrap text-center text-5xl font-medium tracking-tighter text-black dark:text-white\">\n Dot Pattern\n </p>\n <DotPattern\n className={cn(\n \"[mask-image:radial-gradient(300px_circle_at_center,white,transparent)]\",\n )}\n />\n </div>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/dot-pattern.json b/public/r/dot-pattern.jsonindex a06a3f0c..e73e74c6 100644--- a/public/r/dot-pattern.json+++ b/public/r/dot-pattern.json@@ -8,7 +8,8 @@{"path": "registry/magicui/dot-pattern.tsx","content": "import { useId } from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\ninterface DotPatternProps extends React.SVGProps<SVGSVGElement> {\n width?: number;\n height?: number;\n x?: number;\n y?: number;\n cx?: number;\n cy?: number;\n cr?: number;\n className?: string;\n [key: string]: unknown;\n}\nexport function DotPattern({\n width = 16,\n height = 16,\n x = 0,\n y = 0,\n cx = 1,\n cy = 1,\n cr = 1,\n className,\n ...props\n}: DotPatternProps) {\n const id = useId();\n\n return (\n <svg\n aria-hidden=\"true\"\n className={cn(\n \"pointer-events-none absolute inset-0 h-full w-full fill-neutral-400/80\",\n className,\n )}\n {...props}\n >\n <defs>\n <pattern\n id={id}\n width={width}\n height={height}\n patternUnits=\"userSpaceOnUse\"\n patternContentUnits=\"userSpaceOnUse\"\n x={x}\n y={y}\n >\n <circle id=\"pattern-circle\" cx={cx} cy={cy} r={cr} />\n </pattern>\n </defs>\n <rect width=\"100%\" height=\"100%\" strokeWidth={0} fill={`url(#${id})`} />\n </svg>\n );\n}\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/file-tree-demo.json b/public/r/file-tree-demo.jsonindex 110d38ef..7ab0db34 100644--- a/public/r/file-tree-demo.json+++ b/public/r/file-tree-demo.json@@ -11,7 +11,8 @@{"path": "registry/example/file-tree-demo.tsx","content": "import { File, Folder, Tree } from \"@/registry/magicui/file-tree\";\n\nexport default function FileTreeDemo() {\n return (\n <div className=\"relative flex h-[300px] w-1/2 flex-col items-center justify-center overflow-hidden rounded-lg border bg-background md:shadow-xl\">\n <Tree\n className=\"overflow-hidden rounded-md bg-background p-2\"\n initialSelectedId=\"7\"\n initialExpandedItems={[\n \"1\",\n \"2\",\n \"3\",\n \"4\",\n \"5\",\n \"6\",\n \"7\",\n \"8\",\n \"9\",\n \"10\",\n \"11\",\n ]}\n elements={ELEMENTS}\n >\n <Folder element=\"src\" value=\"1\">\n <Folder value=\"2\" element=\"app\">\n <File value=\"3\">\n <p>layout.tsx</p>\n </File>\n <File value=\"4\">\n <p>page.tsx</p>\n </File>\n </Folder>\n <Folder value=\"5\" element=\"components\">\n <Folder value=\"6\" element=\"ui\">\n <File value=\"7\">\n <p>button.tsx</p>\n </File>\n </Folder>\n <File value=\"8\">\n <p>header.tsx</p>\n </File>\n <File value=\"9\">\n <p>footer.tsx</p>\n </File>\n </Folder>\n <Folder value=\"10\" element=\"lib\">\n <File value=\"11\">\n <p>utils.ts</p>\n </File>\n </Folder>\n </Folder>\n </Tree>\n </div>\n );\n}\n\nconst ELEMENTS = [\n {\n id: \"1\",\n isSelectable: true,\n name: \"src\",\n children: [\n {\n id: \"2\",\n isSelectable: true,\n name: \"app\",\n children: [\n {\n id: \"3\",\n isSelectable: true,\n name: \"layout.tsx\",\n },\n {\n id: \"4\",\n isSelectable: true,\n name: \"page.tsx\",\n },\n ],\n },\n {\n id: \"5\",\n isSelectable: true,\n name: \"components\",\n children: [\n {\n id: \"6\",\n isSelectable: true,\n name: \"header.tsx\",\n },\n {\n id: \"7\",\n isSelectable: true,\n name: \"footer.tsx\",\n },\n ],\n },\n {\n id: \"8\",\n isSelectable: true,\n name: \"lib\",\n children: [\n {\n id: \"9\",\n isSelectable: true,\n name: \"utils.ts\",\n },\n ],\n },\n ],\n },\n];\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/file-tree.json b/public/r/file-tree.jsonindex 71cce05f..9e30e718 100644--- a/public/r/file-tree.json+++ b/public/r/file-tree.json@@ -8,7 +8,8 @@{"path": "registry/magicui/file-tree.tsx","content": "\"use client\";\n\nimport * as AccordionPrimitive from \"@radix-ui/react-accordion\";\nimport { FileIcon, FolderIcon, FolderOpenIcon } from \"lucide-react\";\nimport React, {\n createContext,\n forwardRef,\n useCallback,\n useContext,\n useEffect,\n useState,\n} from \"react\";\n\nimport { Button } from \"@/components/ui/button\";\nimport { ScrollArea } from \"@/components/ui/scroll-area\";\nimport { cn } from \"@/lib/utils\";\n\ntype TreeViewElement = {\n id: string;\n name: string;\n isSelectable?: boolean;\n children?: TreeViewElement[];\n};\n\ntype TreeContextProps = {\n selectedId: string | undefined;\n expandedItems: string[] | undefined;\n indicator: boolean;\n handleExpand: (id: string) => void;\n selectItem: (id: string) => void;\n setExpandedItems?: React.Dispatch<React.SetStateAction<string[] | undefined>>;\n openIcon?: React.ReactNode;\n closeIcon?: React.ReactNode;\n direction: \"rtl\" | \"ltr\";\n};\n\nconst TreeContext = createContext<TreeContextProps | null>(null);\n\nconst useTree = () => {\n const context = useContext(TreeContext);\n if (!context) {\n throw new Error(\"useTree must be used within a TreeProvider\");\n }\n return context;\n};\n\ninterface TreeViewComponentProps extends React.HTMLAttributes<HTMLDivElement> {}\n\ntype Direction = \"rtl\" | \"ltr\" | undefined;\n\ntype TreeViewProps = {\n initialSelectedId?: string;\n indicator?: boolean;\n elements?: TreeViewElement[];\n initialExpandedItems?: string[];\n openIcon?: React.ReactNode;\n closeIcon?: React.ReactNode;\n} & TreeViewComponentProps;\n\nconst Tree = forwardRef<HTMLDivElement, TreeViewProps>(\n (\n {\n className,\n elements,\n initialSelectedId,\n initialExpandedItems,\n children,\n indicator = true,\n openIcon,\n closeIcon,\n dir,\n ...props\n },\n ref,\n ) => {\n const [selectedId, setSelectedId] = useState<string | undefined>(\n initialSelectedId,\n );\n const [expandedItems, setExpandedItems] = useState<string[] | undefined>(\n initialExpandedItems,\n );\n\n const selectItem = useCallback((id: string) => {\n setSelectedId(id);\n }, []);\n\n const handleExpand = useCallback((id: string) => {\n setExpandedItems((prev) => {\n if (prev?.includes(id)) {\n return prev.filter((item) => item !== id);\n }\n return [...(prev ?? []), id];\n });\n }, []);\n\n const expandSpecificTargetedElements = useCallback(\n (elements?: TreeViewElement[], selectId?: string) => {\n if (!elements || !selectId) return;\n const findParent = (\n currentElement: TreeViewElement,\n currentPath: string[] = [],\n ) => {\n const isSelectable = currentElement.isSelectable ?? true;\n const newPath = [...currentPath, currentElement.id];\n if (currentElement.id === selectId) {\n if (isSelectable) {\n setExpandedItems((prev) => [...(prev ?? []), ...newPath]);\n } else {\n if (newPath.includes(currentElement.id)) {\n newPath.pop();\n setExpandedItems((prev) => [...(prev ?? []), ...newPath]);\n }\n }\n return;\n }\n if (\n isSelectable &&\n currentElement.children &&\n currentElement.children.length > 0\n ) {\n currentElement.children.forEach((child) => {\n findParent(child, newPath);\n });\n }\n };\n elements.forEach((element) => {\n findParent(element);\n });\n },\n [],\n );\n\n useEffect(() => {\n if (initialSelectedId) {\n expandSpecificTargetedElements(elements, initialSelectedId);\n }\n }, [initialSelectedId, elements]);\n\n const direction = dir === \"rtl\" ? \"rtl\" : \"ltr\";\n\n return (\n <TreeContext.Provider\n value={{\n selectedId,\n expandedItems,\n handleExpand,\n selectItem,\n setExpandedItems,\n indicator,\n openIcon,\n closeIcon,\n direction,\n }}\n >\n <div className={cn(\"size-full\", className)}>\n <ScrollArea\n ref={ref}\n className=\"relative h-full px-2\"\n dir={dir as Direction}\n >\n <AccordionPrimitive.Root\n {...props}\n type=\"multiple\"\n defaultValue={expandedItems}\n value={expandedItems}\n className=\"flex flex-col gap-1\"\n onValueChange={(value) =>\n setExpandedItems((prev) => [...(prev ?? []), value[0]])\n }\n dir={dir as Direction}\n >\n {children}\n </AccordionPrimitive.Root>\n </ScrollArea>\n </div>\n </TreeContext.Provider>\n );\n },\n);\n\nTree.displayName = \"Tree\";\n\nconst TreeIndicator = forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => {\n const { direction } = useTree();\n\n return (\n <div\n dir={direction}\n ref={ref}\n className={cn(\n \"absolute left-1.5 h-full w-px rounded-md bg-muted py-3 duration-300 ease-in-out hover:bg-slate-300 rtl:right-1.5\",\n className,\n )}\n {...props}\n />\n );\n});\n\nTreeIndicator.displayName = \"TreeIndicator\";\n\ninterface FolderComponentProps\n extends React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item> {}\n\ntype FolderProps = {\n expandedItems?: string[];\n element: string;\n isSelectable?: boolean;\n isSelect?: boolean;\n} & FolderComponentProps;\n\nconst Folder = forwardRef<\n HTMLDivElement,\n FolderProps & React.HTMLAttributes<HTMLDivElement>\n>(\n (\n {\n className,\n element,\n value,\n isSelectable = true,\n isSelect,\n children,\n ...props\n },\n ref,\n ) => {\n const {\n direction,\n handleExpand,\n expandedItems,\n indicator,\n setExpandedItems,\n openIcon,\n closeIcon,\n } = useTree();\n\n return (\n <AccordionPrimitive.Item\n {...props}\n value={value}\n className=\"relative h-full overflow-hidden\"\n >\n <AccordionPrimitive.Trigger\n className={cn(\n `flex items-center gap-1 rounded-md text-sm`,\n className,\n {\n \"bg-muted rounded-md\": isSelect && isSelectable,\n \"cursor-pointer\": isSelectable,\n \"cursor-not-allowed opacity-50\": !isSelectable,\n },\n )}\n disabled={!isSelectable}\n onClick={() => handleExpand(value)}\n >\n {expandedItems?.includes(value)\n ? (openIcon ?? <FolderOpenIcon className=\"size-4\" />)\n : (closeIcon ?? <FolderIcon className=\"size-4\" />)}\n <span>{element}</span>\n </AccordionPrimitive.Trigger>\n <AccordionPrimitive.Content className=\"relative h-full overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down\">\n {element && indicator && <TreeIndicator aria-hidden=\"true\" />}\n <AccordionPrimitive.Root\n dir={direction}\n type=\"multiple\"\n className=\"ml-5 flex flex-col gap-1 py-1 rtl:mr-5 \"\n defaultValue={expandedItems}\n value={expandedItems}\n onValueChange={(value) => {\n setExpandedItems?.((prev) => [...(prev ?? []), value[0]]);\n }}\n >\n {children}\n </AccordionPrimitive.Root>\n </AccordionPrimitive.Content>\n </AccordionPrimitive.Item>\n );\n },\n);\n\nFolder.displayName = \"Folder\";\n\nconst File = forwardRef<\n HTMLButtonElement,\n {\n value: string;\n handleSelect?: (id: string) => void;\n isSelectable?: boolean;\n isSelect?: boolean;\n fileIcon?: React.ReactNode;\n } & React.ButtonHTMLAttributes<HTMLButtonElement>\n>(\n (\n {\n value,\n className,\n handleSelect,\n isSelectable = true,\n isSelect,\n fileIcon,\n children,\n ...props\n },\n ref,\n ) => {\n const { direction, selectedId, selectItem } = useTree();\n const isSelected = isSelect ?? selectedId === value;\n return (\n <button\n ref={ref}\n type=\"button\"\n disabled={!isSelectable}\n className={cn(\n \"flex w-fit items-center gap-1 rounded-md pr-1 text-sm duration-200 ease-in-out rtl:pl-1 rtl:pr-0\",\n {\n \"bg-muted\": isSelected && isSelectable,\n },\n isSelectable ? \"cursor-pointer\" : \"cursor-not-allowed opacity-50\",\n direction === \"rtl\" ? \"rtl\" : \"ltr\",\n className,\n )}\n onClick={() => selectItem(value)}\n {...props}\n >\n {fileIcon ?? <FileIcon className=\"size-4\" />}\n {children}\n </button>\n );\n },\n);\n\nFile.displayName = \"File\";\n\nconst CollapseButton = forwardRef<\n HTMLButtonElement,\n {\n elements: TreeViewElement[];\n expandAll?: boolean;\n } & React.HTMLAttributes<HTMLButtonElement>\n>(({ className, elements, expandAll = false, children, ...props }, ref) => {\n const { expandedItems, setExpandedItems } = useTree();\n\n const expendAllTree = useCallback((elements: TreeViewElement[]) => {\n const expandTree = (element: TreeViewElement) => {\n const isSelectable = element.isSelectable ?? true;\n if (isSelectable && element.children && element.children.length > 0) {\n setExpandedItems?.((prev) => [...(prev ?? []), element.id]);\n element.children.forEach(expandTree);\n }\n };\n\n elements.forEach(expandTree);\n }, []);\n\n const closeAll = useCallback(() => {\n setExpandedItems?.([]);\n }, []);\n\n useEffect(() => {\n console.log(expandAll);\n if (expandAll) {\n expendAllTree(elements);\n }\n }, [expandAll]);\n\n return (\n <Button\n variant={\"ghost\"}\n className=\"absolute bottom-1 right-2 h-8 w-fit p-1\"\n onClick={\n expandedItems && expandedItems.length > 0\n ? closeAll\n : () => expendAllTree(elements)\n }\n ref={ref}\n {...props}\n >\n {children}\n <span className=\"sr-only\">Toggle</span>\n </Button>\n );\n});\n\nCollapseButton.displayName = \"CollapseButton\";\n\nexport { CollapseButton, File, Folder, Tree, type TreeViewElement };\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/flickering-grid-demo.json b/public/r/flickering-grid-demo.jsonindex 015f2a2a..5118ed40 100644--- a/public/r/flickering-grid-demo.json+++ b/public/r/flickering-grid-demo.json@@ -11,7 +11,8 @@{"path": "registry/example/flickering-grid-demo.tsx","content": "import { FlickeringGrid } from \"@/registry/magicui/flickering-grid\";\n\nexport default function FlickeringGridDemo() {\n return (\n <div className=\"relative h-[500px] w-full overflow-hidden rounded-lg border bg-background\">\n <FlickeringGrid\n className=\"absolute inset-0 z-0 size-full\"\n squareSize={4}\n gridGap={6}\n color=\"#6B7280\"\n maxOpacity={0.5}\n flickerChance={0.1}\n height={800}\n width={800}\n />\n </div>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/flickering-grid.json b/public/r/flickering-grid.jsonindex be6caef2..04af92c3 100644--- a/public/r/flickering-grid.json+++ b/public/r/flickering-grid.json@@ -8,7 +8,8 @@{"path": "registry/magicui/flickering-grid.tsx","content": "\"use client\";\n\nimport { cn } from \"@/lib/utils\";\nimport React, {\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\n\ninterface FlickeringGridProps extends React.HTMLAttributes<HTMLDivElement> {\n squareSize?: number;\n gridGap?: number;\n flickerChance?: number;\n color?: string;\n width?: number;\n height?: number;\n className?: string;\n maxOpacity?: number;\n}\n\nexport const FlickeringGrid: React.FC<FlickeringGridProps> = ({\n squareSize = 4,\n gridGap = 6,\n flickerChance = 0.3,\n color = \"rgb(0, 0, 0)\",\n width,\n height,\n className,\n maxOpacity = 0.3,\n ...props\n}) => {\n const canvasRef = useRef<HTMLCanvasElement>(null);\n const containerRef = useRef<HTMLDivElement>(null);\n const [isInView, setIsInView] = useState(false);\n const [canvasSize, setCanvasSize] = useState({ width: 0, height: 0 });\n\n const memoizedColor = useMemo(() => {\n const toRGBA = (color: string) => {\n if (typeof window === \"undefined\") {\n return `rgba(0, 0, 0,`;\n }\n const canvas = document.createElement(\"canvas\");\n canvas.width = canvas.height = 1;\n const ctx = canvas.getContext(\"2d\");\n if (!ctx) return \"rgba(255, 0, 0,\";\n ctx.fillStyle = color;\n ctx.fillRect(0, 0, 1, 1);\n const [r, g, b] = Array.from(ctx.getImageData(0, 0, 1, 1).data);\n return `rgba(${r}, ${g}, ${b},`;\n };\n return toRGBA(color);\n }, [color]);\n\n const setupCanvas = useCallback(\n (canvas: HTMLCanvasElement, width: number, height: number) => {\n const dpr = window.devicePixelRatio || 1;\n canvas.width = width * dpr;\n canvas.height = height * dpr;\n canvas.style.width = `${width}px`;\n canvas.style.height = `${height}px`;\n const cols = Math.floor(width / (squareSize + gridGap));\n const rows = Math.floor(height / (squareSize + gridGap));\n\n const squares = new Float32Array(cols * rows);\n for (let i = 0; i < squares.length; i++) {\n squares[i] = Math.random() * maxOpacity;\n }\n\n return { cols, rows, squares, dpr };\n },\n [squareSize, gridGap, maxOpacity],\n );\n\n const updateSquares = useCallback(\n (squares: Float32Array, deltaTime: number) => {\n for (let i = 0; i < squares.length; i++) {\n if (Math.random() < flickerChance * deltaTime) {\n squares[i] = Math.random() * maxOpacity;\n }\n }\n },\n [flickerChance, maxOpacity],\n );\n\n const drawGrid = useCallback(\n (\n ctx: CanvasRenderingContext2D,\n width: number,\n height: number,\n cols: number,\n rows: number,\n squares: Float32Array,\n dpr: number,\n ) => {\n ctx.clearRect(0, 0, width, height);\n ctx.fillStyle = \"transparent\";\n ctx.fillRect(0, 0, width, height);\n\n for (let i = 0; i < cols; i++) {\n for (let j = 0; j < rows; j++) {\n const opacity = squares[i * rows + j];\n ctx.fillStyle = `${memoizedColor}${opacity})`;\n ctx.fillRect(\n i * (squareSize + gridGap) * dpr,\n j * (squareSize + gridGap) * dpr,\n squareSize * dpr,\n squareSize * dpr,\n );\n }\n }\n },\n [memoizedColor, squareSize, gridGap],\n );\n\n useEffect(() => {\n const canvas = canvasRef.current;\n const container = containerRef.current;\n if (!canvas || !container) return;\n\n const ctx = canvas.getContext(\"2d\");\n if (!ctx) return;\n\n let animationFrameId: number;\n let gridParams: ReturnType<typeof setupCanvas>;\n\n const updateCanvasSize = () => {\n const newWidth = width || container.clientWidth;\n const newHeight = height || container.clientHeight;\n setCanvasSize({ width: newWidth, height: newHeight });\n gridParams = setupCanvas(canvas, newWidth, newHeight);\n };\n\n updateCanvasSize();\n\n let lastTime = 0;\n const animate = (time: number) => {\n if (!isInView) return;\n\n const deltaTime = (time - lastTime) / 1000;\n lastTime = time;\n\n updateSquares(gridParams.squares, deltaTime);\n drawGrid(\n ctx,\n canvas.width,\n canvas.height,\n gridParams.cols,\n gridParams.rows,\n gridParams.squares,\n gridParams.dpr,\n );\n animationFrameId = requestAnimationFrame(animate);\n };\n\n const resizeObserver = new ResizeObserver(() => {\n updateCanvasSize();\n });\n\n resizeObserver.observe(container);\n\n const intersectionObserver = new IntersectionObserver(\n ([entry]) => {\n setIsInView(entry.isIntersecting);\n },\n { threshold: 0 },\n );\n\n intersectionObserver.observe(canvas);\n\n if (isInView) {\n animationFrameId = requestAnimationFrame(animate);\n }\n\n return () => {\n cancelAnimationFrame(animationFrameId);\n resizeObserver.disconnect();\n intersectionObserver.disconnect();\n };\n }, [setupCanvas, updateSquares, drawGrid, width, height, isInView]);\n\n return (\n <div\n ref={containerRef}\n className={cn(`h-full w-full ${className}`)}\n {...props}\n >\n <canvas\n ref={canvasRef}\n className=\"pointer-events-none\"\n style={{\n width: canvasSize.width,\n height: canvasSize.height,\n }}\n />\n </div>\n );\n};\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/flip-text-demo.json b/public/r/flip-text-demo.jsonindex 8b6aac1d..50777f98 100644--- a/public/r/flip-text-demo.json+++ b/public/r/flip-text-demo.json@@ -11,7 +11,8 @@{"path": "registry/example/flip-text-demo.tsx","content": "import { FlipText } from \"@/registry/magicui/flip-text\";\n\nexport default function FlipTextDemo() {\n return (\n <FlipText\n className=\"text-4xl font-bold -tracking-widest text-black dark:text-white md:text-7xl md:leading-[5rem]\"\n word=\"Flip Text\"\n />\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/flip-text.json b/public/r/flip-text.jsonindex 372f0bfb..c58202f8 100644--- a/public/r/flip-text.json+++ b/public/r/flip-text.json@@ -11,7 +11,8 @@{"path": "registry/magicui/flip-text.tsx","content": "\"use client\";\n\nimport { AnimatePresence, motion, Variants } from \"motion/react\";\n\nimport { cn } from \"@/lib/utils\";\n\ninterface FlipTextProps {\n word: string;\n duration?: number;\n delayMultiple?: number;\n framerProps?: Variants;\n className?: string;\n}\n\nexport function FlipText({\n word,\n duration = 0.5,\n delayMultiple = 0.08,\n framerProps = {\n hidden: { rotateX: -90, opacity: 0 },\n visible: { rotateX: 0, opacity: 1 },\n },\n className,\n}: FlipTextProps) {\n return (\n <div className=\"flex justify-center space-x-2\">\n <AnimatePresence mode=\"wait\">\n {word.split(\"\").map((char, i) => (\n <motion.span\n key={i}\n initial=\"hidden\"\n animate=\"visible\"\n exit=\"hidden\"\n variants={framerProps}\n transition={{ duration, delay: i * delayMultiple }}\n className={cn(\"origin-center drop-shadow-sm\", className)}\n >\n {char}\n </motion.span>\n ))}\n </AnimatePresence>\n </div>\n );\n}\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/globe-demo.json b/public/r/globe-demo.jsonindex e78dd73d..731738e1 100644--- a/public/r/globe-demo.json+++ b/public/r/globe-demo.json@@ -11,7 +11,8 @@{"path": "registry/example/globe-demo.tsx","content": "import { Globe } from \"@/registry/magicui/globe\";\n\nexport default function GlobeDemo() {\n return (\n <div className=\"relative flex size-full max-w-lg items-center justify-center overflow-hidden rounded-lg border bg-background px-40 pb-40 pt-8 md:pb-60 md:shadow-xl\">\n <span className=\"pointer-events-none whitespace-pre-wrap bg-gradient-to-b from-black to-gray-300/80 bg-clip-text text-center text-8xl font-semibold leading-none text-transparent dark:from-white dark:to-slate-900/10\">\n Globe\n </span>\n <Globe className=\"top-28\" />\n <div className=\"pointer-events-none absolute inset-0 h-full bg-[radial-gradient(circle_at_50%_200%,rgba(0,0,0,0.2),rgba(255,255,255,0))]\" />\n </div>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/globe.json b/public/r/globe.jsonindex b3bc0a8b..8c0b49e4 100644--- a/public/r/globe.json+++ b/public/r/globe.json@@ -11,7 +11,8 @@{"path": "registry/magicui/globe.tsx","content": "\"use client\";\n\nimport createGlobe, { COBEOptions } from \"cobe\";\nimport { useCallback, useEffect, useRef, useState } from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst GLOBE_CONFIG: COBEOptions = {\n width: 800,\n height: 800,\n onRender: () => {},\n devicePixelRatio: 2,\n phi: 0,\n theta: 0.3,\n dark: 0,\n diffuse: 0.4,\n mapSamples: 16000,\n mapBrightness: 1.2,\n baseColor: [1, 1, 1],\n markerColor: [251 / 255, 100 / 255, 21 / 255],\n glowColor: [1, 1, 1],\n markers: [\n { location: [14.5995, 120.9842], size: 0.03 },\n { location: [19.076, 72.8777], size: 0.1 },\n { location: [23.8103, 90.4125], size: 0.05 },\n { location: [30.0444, 31.2357], size: 0.07 },\n { location: [39.9042, 116.4074], size: 0.08 },\n { location: [-23.5505, -46.6333], size: 0.1 },\n { location: [19.4326, -99.1332], size: 0.1 },\n { location: [40.7128, -74.006], size: 0.1 },\n { location: [34.6937, 135.5022], size: 0.05 },\n { location: [41.0082, 28.9784], size: 0.06 },\n ],\n};\n\nexport function Globe({\n className,\n config = GLOBE_CONFIG,\n}: {\n className?: string;\n config?: COBEOptions;\n}) {\n let phi = 0;\n let width = 0;\n const canvasRef = useRef<HTMLCanvasElement>(null);\n const pointerInteracting = useRef(null);\n const pointerInteractionMovement = useRef(0);\n const [r, setR] = useState(0);\n\n const updatePointerInteraction = (value: any) => {\n pointerInteracting.current = value;\n if (canvasRef.current) {\n canvasRef.current.style.cursor = value ? \"grabbing\" : \"grab\";\n }\n };\n\n const updateMovement = (clientX: any) => {\n if (pointerInteracting.current !== null) {\n const delta = clientX - pointerInteracting.current;\n pointerInteractionMovement.current = delta;\n setR(delta / 200);\n }\n };\n\n const onRender = useCallback(\n (state: Record<string, any>) => {\n if (!pointerInteracting.current) phi += 0.005;\n state.phi = phi + r;\n state.width = width * 2;\n state.height = width * 2;\n },\n [r],\n );\n\n const onResize = () => {\n if (canvasRef.current) {\n width = canvasRef.current.offsetWidth;\n }\n };\n\n useEffect(() => {\n window.addEventListener(\"resize\", onResize);\n onResize();\n\n const globe = createGlobe(canvasRef.current!, {\n ...config,\n width: width * 2,\n height: width * 2,\n onRender,\n });\n\n setTimeout(() => (canvasRef.current!.style.opacity = \"1\"));\n return () => globe.destroy();\n }, []);\n\n return (\n <div\n className={cn(\n \"absolute inset-0 mx-auto aspect-[1/1] w-full max-w-[600px]\",\n className,\n )}\n >\n <canvas\n className={cn(\n \"size-full opacity-0 transition-opacity duration-500 [contain:layout_paint_size]\",\n )}\n ref={canvasRef}\n onPointerDown={(e) =>\n updatePointerInteraction(\n e.clientX - pointerInteractionMovement.current,\n )\n }\n onPointerUp={() => updatePointerInteraction(null)}\n onPointerOut={() => updatePointerInteraction(null)}\n onMouseMove={(e) => updateMovement(e.clientX)}\n onTouchMove={(e) =>\n e.touches[0] && updateMovement(e.touches[0].clientX)\n }\n />\n </div>\n );\n}\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/grid-pattern-dashed.json b/public/r/grid-pattern-dashed.jsonindex 2b4f5421..d52667ad 100644--- a/public/r/grid-pattern-dashed.json+++ b/public/r/grid-pattern-dashed.json@@ -11,7 +11,8 @@{"path": "registry/example/grid-pattern-dashed.tsx","content": "\"use client\";\n\nimport { cn } from \"@/lib/utils\";\nimport { GridPattern } from \"@/registry/magicui/grid-pattern\";\n\nexport default function GridPatternDashed() {\n return (\n <div className=\"relative flex size-full items-center justify-center overflow-hidden rounded-lg border bg-background p-20 md:shadow-xl\">\n <p className=\"z-10 whitespace-pre-wrap text-center text-5xl font-medium tracking-tighter text-black dark:text-white\">\n Grid Pattern\n </p>\n <GridPattern\n width={30}\n height={30}\n x={-1}\n y={-1}\n strokeDasharray={\"4 2\"}\n className={cn(\n \"[mask-image:radial-gradient(300px_circle_at_center,white,transparent)]\",\n )}\n />\n </div>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/grid-pattern-demo.json b/public/r/grid-pattern-demo.jsonindex d4d47f6e..f5dbf1ea 100644--- a/public/r/grid-pattern-demo.json+++ b/public/r/grid-pattern-demo.json@@ -11,7 +11,8 @@{"path": "registry/example/grid-pattern-demo.tsx","content": "\"use client\";\n\nimport { cn } from \"@/lib/utils\";\nimport { GridPattern } from \"@/registry/magicui/grid-pattern\";\n\nexport default function GridPatternDemo() {\n return (\n <div className=\"relative flex h-[500px] w-full flex-col items-center justify-center overflow-hidden rounded-lg border bg-background md:shadow-xl\">\n <p className=\"z-10 whitespace-pre-wrap text-center text-5xl font-medium tracking-tighter text-black dark:text-white\">\n Grid Pattern\n </p>\n <GridPattern\n squares={[\n [4, 4],\n [5, 1],\n [8, 2],\n [5, 3],\n [5, 5],\n [10, 10],\n [12, 15],\n [15, 10],\n [10, 15],\n [15, 10],\n [10, 15],\n [15, 10],\n ]}\n className={cn(\n \"[mask-image:radial-gradient(400px_circle_at_center,white,transparent)]\",\n \"inset-x-0 inset-y-[-30%] h-[200%] skew-y-12\",\n )}\n />\n </div>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/grid-pattern.json b/public/r/grid-pattern.jsonindex 9cbdab8b..368313d6 100644--- a/public/r/grid-pattern.json+++ b/public/r/grid-pattern.json@@ -8,7 +8,8 @@{"path": "registry/magicui/grid-pattern.tsx","content": "import { useId } from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\ninterface GridPatternProps extends React.SVGProps<SVGSVGElement> {\n width?: number;\n height?: number;\n x?: number;\n y?: number;\n squares?: Array<[x: number, y: number]>;\n strokeDasharray?: string;\n className?: string;\n [key: string]: unknown;\n}\n\nexport function GridPattern({\n width = 40,\n height = 40,\n x = -1,\n y = -1,\n strokeDasharray = \"0\",\n squares,\n className,\n ...props\n}: GridPatternProps) {\n const id = useId();\n\n return (\n <svg\n aria-hidden=\"true\"\n className={cn(\n \"pointer-events-none absolute inset-0 h-full w-full fill-gray-400/30 stroke-gray-400/30\",\n className,\n )}\n {...props}\n >\n <defs>\n <pattern\n id={id}\n width={width}\n height={height}\n patternUnits=\"userSpaceOnUse\"\n x={x}\n y={y}\n >\n <path\n d={`M.5 ${height}V.5H${width}`}\n fill=\"none\"\n strokeDasharray={strokeDasharray}\n />\n </pattern>\n </defs>\n <rect width=\"100%\" height=\"100%\" strokeWidth={0} fill={`url(#${id})`} />\n {squares && (\n <svg x={x} y={y} className=\"overflow-visible\">\n {squares.map(([x, y]) => (\n <rect\n strokeWidth=\"0\"\n key={`${x}-${y}`}\n width={width - 1}\n height={height - 1}\n x={x * width + 1}\n y={y * height + 1}\n />\n ))}\n </svg>\n )}\n </svg>\n );\n}\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/hero-video-dialog-demo.json b/public/r/hero-video-dialog-demo.jsonindex 96b11580..5797f07b 100644--- a/public/r/hero-video-dialog-demo.json+++ b/public/r/hero-video-dialog-demo.json@@ -11,7 +11,8 @@{"path": "registry/example/hero-video-dialog-demo.tsx","content": "import HeroVideoDialog from \"@/registry/magicui/hero-video-dialog\";\n\nexport default function HeroVideoDialogDemo() {\n return (\n <div className=\"relative\">\n <HeroVideoDialog\n className=\"block dark:hidden\"\n animationStyle=\"from-center\"\n videoSrc=\"https://www.youtube.com/embed/qh3NGpYRG3I?si=4rb-zSdDkVK9qxxb\"\n thumbnailSrc=\"https://startup-template-sage.vercel.app/hero-light.png\"\n thumbnailAlt=\"Hero Video\"\n />\n <HeroVideoDialog\n className=\"hidden dark:block\"\n animationStyle=\"from-center\"\n videoSrc=\"https://www.youtube.com/embed/qh3NGpYRG3I?si=4rb-zSdDkVK9qxxb\"\n thumbnailSrc=\"https://startup-template-sage.vercel.app/hero-dark.png\"\n thumbnailAlt=\"Hero Video\"\n />\n </div>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/hero-video-dialog.json b/public/r/hero-video-dialog.jsonindex 59682f52..2d4b0754 100644--- a/public/r/hero-video-dialog.json+++ b/public/r/hero-video-dialog.json@@ -11,7 +11,8 @@{"path": "registry/magicui/hero-video-dialog.tsx","content": "/* eslint-disable @next/next/no-img-element */\n\"use client\";\n\nimport { useState } from \"react\";\nimport { AnimatePresence, motion } from \"motion/react\";\nimport { Play, XIcon } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\n\ntype AnimationStyle =\n | \"from-bottom\"\n | \"from-center\"\n | \"from-top\"\n | \"from-left\"\n | \"from-right\"\n | \"fade\"\n | \"top-in-bottom-out\"\n | \"left-in-right-out\";\n\ninterface HeroVideoProps {\n animationStyle?: AnimationStyle;\n videoSrc: string;\n thumbnailSrc: string;\n thumbnailAlt?: string;\n className?: string;\n}\n\nconst animationVariants = {\n \"from-bottom\": {\n initial: { y: \"100%\", opacity: 0 },\n animate: { y: 0, opacity: 1 },\n exit: { y: \"100%\", opacity: 0 },\n },\n \"from-center\": {\n initial: { scale: 0.5, opacity: 0 },\n animate: { scale: 1, opacity: 1 },\n exit: { scale: 0.5, opacity: 0 },\n },\n \"from-top\": {\n initial: { y: \"-100%\", opacity: 0 },\n animate: { y: 0, opacity: 1 },\n exit: { y: \"-100%\", opacity: 0 },\n },\n \"from-left\": {\n initial: { x: \"-100%\", opacity: 0 },\n animate: { x: 0, opacity: 1 },\n exit: { x: \"-100%\", opacity: 0 },\n },\n \"from-right\": {\n initial: { x: \"100%\", opacity: 0 },\n animate: { x: 0, opacity: 1 },\n exit: { x: \"100%\", opacity: 0 },\n },\n fade: {\n initial: { opacity: 0 },\n animate: { opacity: 1 },\n exit: { opacity: 0 },\n },\n \"top-in-bottom-out\": {\n initial: { y: \"-100%\", opacity: 0 },\n animate: { y: 0, opacity: 1 },\n exit: { y: \"100%\", opacity: 0 },\n },\n \"left-in-right-out\": {\n initial: { x: \"-100%\", opacity: 0 },\n animate: { x: 0, opacity: 1 },\n exit: { x: \"100%\", opacity: 0 },\n },\n};\n\nexport default function HeroVideoDialog({\n animationStyle = \"from-center\",\n videoSrc,\n thumbnailSrc,\n thumbnailAlt = \"Video thumbnail\",\n className,\n}: HeroVideoProps) {\n const [isVideoOpen, setIsVideoOpen] = useState(false);\n const selectedAnimation = animationVariants[animationStyle];\n\n return (\n <div className={cn(\"relative\", className)}>\n <div\n className=\"group relative cursor-pointer\"\n onClick={() => setIsVideoOpen(true)}\n >\n <img\n src={thumbnailSrc}\n alt={thumbnailAlt}\n width={1920}\n height={1080}\n className=\"w-full rounded-md border shadow-lg transition-all duration-200 ease-out group-hover:brightness-[0.8]\"\n />\n <div className=\"absolute inset-0 flex scale-[0.9] items-center justify-center rounded-2xl transition-all duration-200 ease-out group-hover:scale-100\">\n <div className=\"flex size-28 items-center justify-center rounded-full bg-primary/10 backdrop-blur-md\">\n <div\n className={`relative flex size-20 scale-100 items-center justify-center rounded-full bg-gradient-to-b from-primary/30 to-primary shadow-md transition-all duration-200 ease-out group-hover:scale-[1.2]`}\n >\n <Play\n className=\"size-8 scale-100 fill-white text-white transition-transform duration-200 ease-out group-hover:scale-105\"\n style={{\n filter:\n \"drop-shadow(0 4px 3px rgb(0 0 0 / 0.07)) drop-shadow(0 2px 2px rgb(0 0 0 / 0.06))\",\n }}\n />\n </div>\n </div>\n </div>\n </div>\n <AnimatePresence>\n {isVideoOpen && (\n <motion.div\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n onClick={() => setIsVideoOpen(false)}\n exit={{ opacity: 0 }}\n className=\"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-md\"\n >\n <motion.div\n {...selectedAnimation}\n transition={{ type: \"spring\", damping: 30, stiffness: 300 }}\n className=\"relative mx-4 aspect-video w-full max-w-4xl md:mx-0\"\n >\n <motion.button className=\"absolute -top-16 right-0 rounded-full bg-neutral-900/50 p-2 text-xl text-white ring-1 backdrop-blur-md dark:bg-neutral-100/50 dark:text-black\">\n <XIcon className=\"size-5\" />\n </motion.button>\n <div className=\"relative isolate z-[1] size-full overflow-hidden rounded-2xl border-2 border-white\">\n <iframe\n src={videoSrc}\n className=\"size-full rounded-2xl\"\n allowFullScreen\n allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\"\n ></iframe>\n </div>\n </motion.div>\n </motion.div>\n )}\n </AnimatePresence>\n </div>\n );\n}\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/hyper-text-demo.json b/public/r/hyper-text-demo.jsonindex 13e3b498..83b0439c 100644--- a/public/r/hyper-text-demo.json+++ b/public/r/hyper-text-demo.json@@ -11,7 +11,8 @@{"path": "registry/example/hyper-text-demo.tsx","content": "import { HyperText } from \"@/registry/magicui/hyper-text\";\n\nexport default function HyperTextDemo() {\n return <HyperText>Hover Me!</HyperText>;\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/hyper-text.json b/public/r/hyper-text.jsonindex 250e2066..1988e003 100644--- a/public/r/hyper-text.json+++ b/public/r/hyper-text.json@@ -11,7 +11,8 @@{"path": "registry/magicui/hyper-text.tsx","content": "\"use client\";\n\nimport { cn } from \"@/lib/utils\";\nimport { AnimatePresence, motion, MotionProps } from \"motion/react\";\nimport { useEffect, useRef, useState } from \"react\";\n\ntype CharacterSet = string[] | readonly string[];\n\ninterface HyperTextProps extends MotionProps {\n /** The text content to be animated */\n children: string;\n /** Optional className for styling */\n className?: string;\n /** Duration of the animation in milliseconds */\n duration?: number;\n /** Delay before animation starts in milliseconds */\n delay?: number;\n /** Component to render as - defaults to div */\n as?: React.ElementType;\n /** Whether to start animation when element comes into view */\n startOnView?: boolean;\n /** Whether to trigger animation on hover */\n animateOnHover?: boolean;\n /** Custom character set for scramble effect. Defaults to uppercase alphabet */\n characterSet?: CharacterSet;\n}\n\nconst DEFAULT_CHARACTER_SET = Object.freeze(\n \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\".split(\"\"),\n) as readonly string[];\n\nconst getRandomInt = (max: number): number => Math.floor(Math.random() * max);\n\nexport function HyperText({\n children,\n className,\n duration = 800,\n delay = 0,\n as: Component = \"div\",\n startOnView = false,\n animateOnHover = true,\n characterSet = DEFAULT_CHARACTER_SET,\n ...props\n}: HyperTextProps) {\n const MotionComponent = motion.create(Component, {\n forwardMotionProps: true,\n });\n\n const [displayText, setDisplayText] = useState<string[]>(() =>\n children.split(\"\"),\n );\n const [isAnimating, setIsAnimating] = useState(false);\n const iterationCount = useRef(0);\n const elementRef = useRef<HTMLElement>(null);\n\n const handleAnimationTrigger = () => {\n if (animateOnHover && !isAnimating) {\n iterationCount.current = 0;\n setIsAnimating(true);\n }\n };\n\n // Handle animation start based on view or delay\n useEffect(() => {\n if (!startOnView) {\n const startTimeout = setTimeout(() => {\n setIsAnimating(true);\n }, delay);\n return () => clearTimeout(startTimeout);\n }\n\n const observer = new IntersectionObserver(\n ([entry]) => {\n if (entry.isIntersecting) {\n setTimeout(() => {\n setIsAnimating(true);\n }, delay);\n observer.disconnect();\n }\n },\n { threshold: 0.1, rootMargin: \"-30% 0px -30% 0px\" },\n );\n\n if (elementRef.current) {\n observer.observe(elementRef.current);\n }\n\n return () => observer.disconnect();\n }, [delay, startOnView]);\n\n // Handle scramble animation\n useEffect(() => {\n if (!isAnimating) return;\n\n const intervalDuration = duration / (children.length * 10);\n const maxIterations = children.length;\n\n const interval = setInterval(() => {\n if (iterationCount.current < maxIterations) {\n setDisplayText((currentText) =>\n currentText.map((letter, index) =>\n letter === \" \"\n ? letter\n : index <= iterationCount.current\n ? children[index]\n : characterSet[getRandomInt(characterSet.length)],\n ),\n );\n iterationCount.current = iterationCount.current + 0.1;\n } else {\n setIsAnimating(false);\n clearInterval(interval);\n }\n }, intervalDuration);\n\n return () => clearInterval(interval);\n }, [children, duration, isAnimating, characterSet]);\n\n return (\n <MotionComponent\n ref={elementRef}\n className={cn(\"overflow-hidden py-2 text-4xl font-bold\", className)}\n onMouseEnter={handleAnimationTrigger}\n {...props}\n >\n <AnimatePresence>\n {displayText.map((letter, index) => (\n <motion.span\n key={index}\n className={cn(\"font-mono\", letter === \" \" ? \"w-3\" : \"\")}\n >\n {letter.toUpperCase()}\n </motion.span>\n ))}\n </AnimatePresence>\n </MotionComponent>\n );\n}\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/icon-cloud-demo-2.json b/public/r/icon-cloud-demo-2.jsonindex 7e163d00..6469c463 100644--- a/public/r/icon-cloud-demo-2.json+++ b/public/r/icon-cloud-demo-2.json@@ -11,7 +11,8 @@{"path": "registry/example/icon-cloud-demo-2.tsx","content": "import { IconCloud } from \"@/registry/magicui/icon-cloud\";\n\nconst images = [\n \"https://images.unsplash.com/photo-1720048171230-c60d162f93a0?q=80&w=1974&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDF8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\",\n \"https://plus.unsplash.com/premium_photo-1675553988173-a5249b5815fe?q=80&w=1964&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\",\n \"https://plus.unsplash.com/premium_photo-1675297844586-534b030564e0?q=80&w=1964&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\",\n \"https://plus.unsplash.com/premium_photo-1675555581018-7f1a352ff9a6?q=80&w=1964&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\",\n \"https://images.unsplash.com/photo-1719937050517-68d4e2a1702e?q=80&w=1974&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\",\n \"https://images.unsplash.com/photo-1720048171230-c60d162f93a0?q=80&w=1974&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDF8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\",\n \"https://plus.unsplash.com/premium_photo-1675553988173-a5249b5815fe?q=80&w=1964&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\",\n \"https://plus.unsplash.com/premium_photo-1675297844586-534b030564e0?q=80&w=1964&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\",\n \"https://plus.unsplash.com/premium_photo-1675555581018-7f1a352ff9a6?q=80&w=1964&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\",\n \"https://images.unsplash.com/photo-1719937050517-68d4e2a1702e?q=80&w=1974&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\",\n \"https://images.unsplash.com/photo-1720048171230-c60d162f93a0?q=80&w=1974&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDF8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\",\n \"https://plus.unsplash.com/premium_photo-1675553988173-a5249b5815fe?q=80&w=1964&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\",\n \"https://plus.unsplash.com/premium_photo-1675297844586-534b030564e0?q=80&w=1964&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\",\n \"https://plus.unsplash.com/premium_photo-1675555581018-7f1a352ff9a6?q=80&w=1964&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\",\n \"https://images.unsplash.com/photo-1719937050517-68d4e2a1702e?q=80&w=1974&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\",\n];\n\nexport default function IconCloudDemo() {\n return (\n <div className=\"relative flex size-full max-w-lg items-center justify-center overflow-hidden rounded-lg border bg-background\">\n <IconCloud images={images} />\n </div>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/icon-cloud-demo-3.json b/public/r/icon-cloud-demo-3.jsonindex 4e4915bb..93459f1f 100644--- a/public/r/icon-cloud-demo-3.json+++ b/public/r/icon-cloud-demo-3.json@@ -11,7 +11,8 @@{"path": "registry/example/icon-cloud-demo-3.tsx","content": "import { IconCloud } from \"@/registry/magicui/icon-cloud\";\n\nconst Icons = {\n gitHub: () => (\n <svg width=\"100\" height=\"100\" viewBox=\"0 0 438.549 438.549\">\n <path\n fill=\"currentColor\"\n d=\"M409.132 114.573c-19.608-33.596-46.205-60.194-79.798-79.8-33.598-19.607-70.277-29.408-110.063-29.408-39.781 0-76.472 9.804-110.063 29.408-33.596 19.605-60.192 46.204-79.8 79.8C9.803 148.168 0 184.854 0 224.63c0 47.78 13.94 90.745 41.827 128.906 27.884 38.164 63.906 64.572 108.063 79.227 5.14.954 8.945.283 11.419-1.996 2.475-2.282 3.711-5.14 3.711-8.562 0-.571-.049-5.708-.144-15.417a2549.81 2549.81 0 01-.144-25.406l-6.567 1.136c-4.187.767-9.469 1.092-15.846 1-6.374-.089-12.991-.757-19.842-1.999-6.854-1.231-13.229-4.086-19.13-8.559-5.898-4.473-10.085-10.328-12.56-17.556l-2.855-6.57c-1.903-4.374-4.899-9.233-8.992-14.559-4.093-5.331-8.232-8.945-12.419-10.848l-1.999-1.431c-1.332-.951-2.568-2.098-3.711-3.429-1.142-1.331-1.997-2.663-2.568-3.997-.572-1.335-.098-2.43 1.427-3.289 1.525-.859 4.281-1.276 8.28-1.276l5.708.853c3.807.763 8.516 3.042 14.133 6.851 5.614 3.806 10.229 8.754 13.846 14.842 4.38 7.806 9.657 13.754 15.846 17.847 6.184 4.093 12.419 6.136 18.699 6.136 6.28 0 11.704-.476 16.274-1.423 4.565-.952 8.848-2.383 12.847-4.285 1.713-12.758 6.377-22.559 13.988-29.41-10.848-1.14-20.601-2.857-29.264-5.14-8.658-2.286-17.605-5.996-26.835-11.14-9.235-5.137-16.896-11.516-22.985-19.126-6.09-7.614-11.088-17.61-14.987-29.979-3.901-12.374-5.852-26.648-5.852-42.826 0-23.035 7.52-42.637 22.557-58.817-7.044-17.318-6.379-36.732 1.997-58.24 5.52-1.715 13.706-.428 24.554 3.853 10.85 4.283 18.794 7.952 23.84 10.994 5.046 3.041 9.089 5.618 12.135 7.708 17.705-4.947 35.976-7.421 54.818-7.421s37.117 2.474 54.823 7.421l10.849-6.849c7.419-4.57 16.18-8.758 26.262-12.565 10.088-3.805 17.802-4.853 23.134-3.138 8.562 21.509 9.325 40.922 2.279 58.24 15.036 16.18 22.559 35.787 22.559 58.817 0 16.178-1.958 30.497-5.853 42.966-3.9 12.471-8.941 22.457-15.125 29.979-6.191 7.521-13.901 13.85-23.131 18.986-9.232 5.14-18.182 8.85-26.84 11.136-8.662 2.286-18.415 4.004-29.263 5.146 9.894 8.562 14.842 22.077 14.842 40.539v60.237c0 3.422 1.19 6.279 3.572 8.562 2.379 2.279 6.136 2.95 11.276 1.995 44.163-14.653 80.185-41.062 108.068-79.226 27.88-38.161 41.825-81.126 41.825-128.906-.01-39.771-9.818-76.454-29.414-110.049z\"\n />\n </svg>\n ),\n notion: () => (\n <svg\n width=\"100\"\n height=\"100\"\n viewBox=\"0 0 100 100\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M6.017 4.313l55.333 -4.087c6.797 -0.583 8.543 -0.19 12.817 2.917l17.663 12.443c2.913 2.14 3.883 2.723 3.883 5.053v68.243c0 4.277 -1.553 6.807 -6.99 7.193L24.467 99.967c-4.08 0.193 -6.023 -0.39 -8.16 -3.113L3.3 79.94c-2.333 -3.113 -3.3 -5.443 -3.3 -8.167V11.113c0 -3.497 1.553 -6.413 6.017 -6.8z\"\n fill=\"#ffffff\"\n />\n <path\n d=\"M61.35 0.227l-55.333 4.087C1.553 4.7 0 7.617 0 11.113v60.66c0 2.723 0.967 5.053 3.3 8.167l13.007 16.913c2.137 2.723 4.08 3.307 8.16 3.113l64.257 -3.89c5.433 -0.387 6.99 -2.917 6.99 -7.193V20.64c0 -2.21 -0.873 -2.847 -3.443 -4.733L74.167 3.143c-4.273 -3.107 -6.02 -3.5 -12.817 -2.917zM25.92 19.523c-5.247 0.353 -6.437 0.433 -9.417 -1.99L8.927 11.507c-0.77 -0.78 -0.383 -1.753 1.557 -1.947l53.193 -3.887c4.467 -0.39 6.793 1.167 8.54 2.527l9.123 6.61c0.39 0.197 1.36 1.36 0.193 1.36l-54.933 3.307 -0.68 0.047zM19.803 88.3V30.367c0 -2.53 0.777 -3.697 3.103 -3.893L86 22.78c2.14 -0.193 3.107 1.167 3.107 3.693v57.547c0 2.53 -0.39 4.67 -3.883 4.863l-60.377 3.5c-3.493 0.193 -5.043 -0.97 -5.043 -4.083zm59.6 -54.827c0.387 1.75 0 3.5 -1.75 3.7l-2.91 0.577v42.773c-2.527 1.36 -4.853 2.137 -6.797 2.137 -3.107 0 -3.883 -0.973 -6.21 -3.887l-19.03 -29.94v28.967l6.02 1.363s0 3.5 -4.857 3.5l-13.39 0.777c-0.39 -0.78 0 -2.723 1.357 -3.11l3.497 -0.97v-38.3L30.48 40.667c-0.39 -1.75 0.58 -4.277 3.3 -4.473l14.367 -0.967 19.8 30.327v-26.83l-5.047 -0.58c-0.39 -2.143 1.163 -3.7 3.103 -3.89l13.4 -0.78z\"\n fill=\"#000000\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n />\n </svg>\n ),\n openai: () => (\n <svg\n width=\"100\"\n height=\"100\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"fill-black dark:fill-white\"\n >\n <path d=\"M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z\" />\n </svg>\n ),\n googleDrive: () => (\n <svg\n width=\"100\"\n height=\"100\"\n viewBox=\"0 0 87.3 78\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"m6.6 66.85 3.85 6.65c.8 1.4 1.95 2.5 3.3 3.3l13.75-23.8h-27.5c0 1.55.4 3.1 1.2 4.5z\"\n fill=\"#0066da\"\n />\n <path\n d=\"m43.65 25-13.75-23.8c-1.35.8-2.5 1.9-3.3 3.3l-25.4 44a9.06 9.06 0 0 0 -1.2 4.5h27.5z\"\n fill=\"#00ac47\"\n />\n <path\n d=\"m73.55 76.8c1.35-.8 2.5-1.9 3.3-3.3l1.6-2.75 7.65-13.25c.8-1.4 1.2-2.95 1.2-4.5h-27.502l5.852 11.5z\"\n fill=\"#ea4335\"\n />\n <path\n d=\"m43.65 25 13.75-23.8c-1.35-.8-2.9-1.2-4.5-1.2h-18.5c-1.6 0-3.15.45-4.5 1.2z\"\n fill=\"#00832d\"\n />\n <path\n d=\"m59.8 53h-32.3l-13.75 23.8c1.35.8 2.9 1.2 4.5 1.2h50.8c1.6 0 3.15-.45 4.5-1.2z\"\n fill=\"#2684fc\"\n />\n <path\n d=\"m73.4 26.5-12.7-22c-.8-1.4-1.95-2.5-3.3-3.3l-13.75 23.8 16.15 28h27.45c0-1.55-.4-3.1-1.2-4.5z\"\n fill=\"#ffba00\"\n />\n </svg>\n ),\n whatsapp: () => (\n <svg\n width=\"100\"\n height=\"100\"\n viewBox=\"0 0 175.216 175.552\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <defs>\n <linearGradient\n id=\"b\"\n x1=\"85.915\"\n x2=\"86.535\"\n y1=\"32.567\"\n y2=\"137.092\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop offset=\"0\" stopColor=\"#57d163\" />\n <stop offset=\"1\" stopColor=\"#23b33a\" />\n </linearGradient>\n <filter\n id=\"a\"\n width=\"1.115\"\n height=\"1.114\"\n x=\"-.057\"\n y=\"-.057\"\n colorInterpolationFilters=\"sRGB\"\n >\n <feGaussianBlur stdDeviation=\"3.531\" />\n </filter>\n </defs>\n <path\n d=\"m54.532 138.45 2.235 1.324c9.387 5.571 20.15 8.518 31.126 8.523h.023c33.707 0 61.139-27.426 61.153-61.135.006-16.335-6.349-31.696-17.895-43.251A60.75 60.75 0 0 0 87.94 25.983c-33.733 0-61.166 27.423-61.178 61.13a60.98 60.98 0 0 0 9.349 32.535l1.455 2.312-6.179 22.558zm-40.811 23.544L24.16 123.88c-6.438-11.154-9.825-23.808-9.821-36.772.017-40.556 33.021-73.55 73.578-73.55 19.681.01 38.154 7.669 52.047 21.572s21.537 32.383 21.53 52.037c-.018 40.553-33.027 73.553-73.578 73.553h-.032c-12.313-.005-24.412-3.094-35.159-8.954zm0 0\"\n fill=\"#b3b3b3\"\n filter=\"url(#a)\"\n />\n <path\n d=\"m12.966 161.238 10.439-38.114a73.42 73.42 0 0 1-9.821-36.772c.017-40.556 33.021-73.55 73.578-73.55 19.681.01 38.154 7.669 52.047 21.572s21.537 32.383 21.53 52.037c-.018 40.553-33.027 73.553-73.578 73.553h-.032c-12.313-.005-24.412-3.094-35.159-8.954z\"\n fill=\"#ffffff\"\n />\n <path\n d=\"M87.184 25.227c-33.733 0-61.166 27.423-61.178 61.13a60.98 60.98 0 0 0 9.349 32.535l1.455 2.312-6.179 22.559 23.146-6.069 2.235 1.324c9.387 5.571 20.15 8.518 31.126 8.524h.023c33.707 0 61.14-27.426 61.153-61.135a60.75 60.75 0 0 0-17.895-43.251 60.75 60.75 0 0 0-43.235-17.929z\"\n fill=\"url(#linearGradient1780)\"\n />\n <path\n d=\"M87.184 25.227c-33.733 0-61.166 27.423-61.178 61.13a60.98 60.98 0 0 0 9.349 32.535l1.455 2.313-6.179 22.558 23.146-6.069 2.235 1.324c9.387 5.571 20.15 8.517 31.126 8.523h.023c33.707 0 61.14-27.426 61.153-61.135a60.75 60.75 0 0 0-17.895-43.251 60.75 60.75 0 0 0-43.235-17.928z\"\n fill=\"url(#b)\"\n />\n <path\n d=\"M68.772 55.603c-1.378-3.061-2.828-3.123-4.137-3.176l-3.524-.043c-1.226 0-3.218.46-4.902 2.3s-6.435 6.287-6.435 15.332 6.588 17.785 7.506 19.013 12.718 20.381 31.405 27.75c15.529 6.124 18.689 4.906 22.061 4.6s10.877-4.447 12.408-8.74 1.532-7.971 1.073-8.74-1.685-1.226-3.525-2.146-10.877-5.367-12.562-5.981-2.91-.919-4.137.921-4.746 5.979-5.819 7.206-2.144 1.381-3.984.462-7.76-2.861-14.784-9.124c-5.465-4.873-9.154-10.891-10.228-12.73s-.114-2.835.808-3.751c.825-.824 1.838-2.147 2.759-3.22s1.224-1.84 1.836-3.065.307-2.301-.153-3.22-4.032-10.011-5.666-13.647\"\n fill=\"#ffffff\"\n fillRule=\"evenodd\"\n />\n </svg>\n ),\n};\n\nexport default function IconCloudDemo() {\n return (\n <div className=\"relative flex size-full max-w-lg items-center justify-center overflow-hidden rounded-lg border bg-background\">\n <IconCloud\n icons={[\n <Icons.gitHub key=\"github\" />,\n <Icons.notion key=\"notion\" />,\n <Icons.openai key=\"openai\" />,\n <Icons.googleDrive key=\"gdrive\" />,\n <Icons.whatsapp key=\"whatsapp\" />,\n <Icons.gitHub key=\"github2\" />,\n <Icons.notion key=\"notion2\" />,\n <Icons.openai key=\"openai2\" />,\n <Icons.googleDrive key=\"gdrive2\" />,\n <Icons.whatsapp key=\"whatsapp2\" />,\n <Icons.gitHub key=\"github3\" />,\n <Icons.notion key=\"notion3\" />,\n <Icons.openai key=\"openai3\" />,\n <Icons.googleDrive key=\"gdrive3\" />,\n <Icons.whatsapp key=\"whatsapp3\" />,\n <Icons.gitHub key=\"github4\" />,\n <Icons.notion key=\"notion4\" />,\n <Icons.openai key=\"openai4\" />,\n <Icons.googleDrive key=\"gdrive4\" />,\n <Icons.whatsapp key=\"whatsapp4\" />,\n <Icons.notion key=\"notion4\" />,\n <Icons.openai key=\"openai4\" />,\n <Icons.googleDrive key=\"gdrive4\" />,\n <Icons.whatsapp key=\"whatsapp4\" />,\n ]}\n />\n </div>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/icon-cloud-demo.json b/public/r/icon-cloud-demo.jsonindex b93400dd..a6b798c5 100644--- a/public/r/icon-cloud-demo.json+++ b/public/r/icon-cloud-demo.json@@ -11,7 +11,8 @@{"path": "registry/example/icon-cloud-demo.tsx","content": "import { IconCloud } from \"@/registry/magicui/icon-cloud\";\n\nconst slugs = [\n \"typescript\",\n \"javascript\",\n \"dart\",\n \"java\",\n \"react\",\n \"flutter\",\n \"android\",\n \"html5\",\n \"css3\",\n \"nodedotjs\",\n \"express\",\n \"nextdotjs\",\n \"prisma\",\n \"amazonaws\",\n \"postgresql\",\n \"firebase\",\n \"nginx\",\n \"vercel\",\n \"testinglibrary\",\n \"jest\",\n \"cypress\",\n \"docker\",\n \"git\",\n \"jira\",\n \"github\",\n \"gitlab\",\n \"visualstudiocode\",\n \"androidstudio\",\n \"sonarqube\",\n \"figma\",\n];\n\nexport default function IconCloudDemo() {\n const images = slugs.map(\n (slug) => `https://cdn.simpleicons.org/${slug}/${slug}`,\n );\n\n return (\n <div className=\"relative flex size-full max-w-lg items-center justify-center overflow-hidden rounded-lg border bg-background\">\n <IconCloud images={images} />\n </div>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/icon-cloud.json b/public/r/icon-cloud.jsonindex edda983e..510a6b67 100644--- a/public/r/icon-cloud.json+++ b/public/r/icon-cloud.json@@ -9,7 +9,8 @@{"path": "registry/magicui/icon-cloud.tsx","content": "\"use client\";\n\nimport React, { useEffect, useRef, useState } from \"react\";\nimport { renderToString } from \"react-dom/server\";\n\ninterface Icon {\n x: number;\n y: number;\n z: number;\n scale: number;\n opacity: number;\n id: number;\n}\n\ninterface IconCloudProps {\n icons?: React.ReactNode[];\n images?: string[];\n}\n\nfunction easeOutCubic(t: number): number {\n return 1 - Math.pow(1 - t, 3);\n}\n\nexport function IconCloud({ icons, images }: IconCloudProps) {\n const canvasRef = useRef<HTMLCanvasElement>(null);\n const [iconPositions, setIconPositions] = useState<Icon[]>([]);\n const [rotation, setRotation] = useState({ x: 0, y: 0 });\n const [isDragging, setIsDragging] = useState(false);\n const [lastMousePos, setLastMousePos] = useState({ x: 0, y: 0 });\n const [mousePos, setMousePos] = useState({ x: 0, y: 0 });\n const [targetRotation, setTargetRotation] = useState<{\n x: number;\n y: number;\n startX: number;\n startY: number;\n distance: number;\n startTime: number;\n duration: number;\n } | null>(null);\n const animationFrameRef = useRef<number>();\n const rotationRef = useRef(rotation);\n const iconCanvasesRef = useRef<HTMLCanvasElement[]>([]);\n const imagesLoadedRef = useRef<boolean[]>([]);\n\n // Create icon canvases once when icons/images change\n useEffect(() => {\n if (!icons && !images) return;\n\n const items = icons || images || [];\n imagesLoadedRef.current = new Array(items.length).fill(false);\n\n const newIconCanvases = items.map((item, index) => {\n const offscreen = document.createElement(\"canvas\");\n offscreen.width = 40;\n offscreen.height = 40;\n const offCtx = offscreen.getContext(\"2d\");\n\n if (offCtx) {\n if (images) {\n // Handle image URLs directly\n const img = new Image();\n img.crossOrigin = \"anonymous\";\n img.src = items[index] as string;\n img.onload = () => {\n offCtx.clearRect(0, 0, offscreen.width, offscreen.height);\n\n // Create circular clipping path\n offCtx.beginPath();\n offCtx.arc(20, 20, 20, 0, Math.PI * 2);\n offCtx.closePath();\n offCtx.clip();\n\n // Draw the image\n offCtx.drawImage(img, 0, 0, 40, 40);\n\n imagesLoadedRef.current[index] = true;\n };\n } else {\n // Handle SVG icons\n offCtx.scale(0.4, 0.4);\n const svgString = renderToString(item as React.ReactElement);\n const img = new Image();\n img.src = \"data:image/svg+xml;base64,\" + btoa(svgString);\n img.onload = () => {\n offCtx.clearRect(0, 0, offscreen.width, offscreen.height);\n offCtx.drawImage(img, 0, 0);\n imagesLoadedRef.current[index] = true;\n };\n }\n }\n return offscreen;\n });\n\n iconCanvasesRef.current = newIconCanvases;\n }, [icons, images]);\n\n // Generate initial icon positions on a sphere\n useEffect(() => {\n const items = icons || images || [];\n const newIcons: Icon[] = [];\n const numIcons = items.length || 20;\n\n // Fibonacci sphere parameters\n const offset = 2 / numIcons;\n const increment = Math.PI * (3 - Math.sqrt(5));\n\n for (let i = 0; i < numIcons; i++) {\n const y = i * offset - 1 + offset / 2;\n const r = Math.sqrt(1 - y * y);\n const phi = i * increment;\n\n const x = Math.cos(phi) * r;\n const z = Math.sin(phi) * r;\n\n newIcons.push({\n x: x * 100,\n y: y * 100,\n z: z * 100,\n scale: 1,\n opacity: 1,\n id: i,\n });\n }\n setIconPositions(newIcons);\n }, [icons, images]);\n\n // Handle mouse events\n const handleMouseDown = (e: React.MouseEvent<HTMLCanvasElement>) => {\n const rect = canvasRef.current?.getBoundingClientRect();\n if (!rect || !canvasRef.current) return;\n\n const x = e.clientX - rect.left;\n const y = e.clientY - rect.top;\n\n const ctx = canvasRef.current.getContext(\"2d\");\n if (!ctx) return;\n\n iconPositions.forEach((icon) => {\n const cosX = Math.cos(rotationRef.current.x);\n const sinX = Math.sin(rotationRef.current.x);\n const cosY = Math.cos(rotationRef.current.y);\n const sinY = Math.sin(rotationRef.current.y);\n\n const rotatedX = icon.x * cosY - icon.z * sinY;\n const rotatedZ = icon.x * sinY + icon.z * cosY;\n const rotatedY = icon.y * cosX + rotatedZ * sinX;\n\n const screenX = canvasRef.current!.width / 2 + rotatedX;\n const screenY = canvasRef.current!.height / 2 + rotatedY;\n\n const scale = (rotatedZ + 200) / 300;\n const radius = 20 * scale;\n const dx = x - screenX;\n const dy = y - screenY;\n\n if (dx * dx + dy * dy < radius * radius) {\n const targetX = -Math.atan2(\n icon.y,\n Math.sqrt(icon.x * icon.x + icon.z * icon.z),\n );\n const targetY = Math.atan2(icon.x, icon.z);\n\n const currentX = rotationRef.current.x;\n const currentY = rotationRef.current.y;\n const distance = Math.sqrt(\n Math.pow(targetX - currentX, 2) + Math.pow(targetY - currentY, 2),\n );\n\n const duration = Math.min(2000, Math.max(800, distance * 1000));\n\n setTargetRotation({\n x: targetX,\n y: targetY,\n startX: currentX,\n startY: currentY,\n distance,\n startTime: performance.now(),\n duration,\n });\n return;\n }\n });\n\n setIsDragging(true);\n setLastMousePos({ x: e.clientX, y: e.clientY });\n };\n\n const handleMouseMove = (e: React.MouseEvent<HTMLCanvasElement>) => {\n const rect = canvasRef.current?.getBoundingClientRect();\n if (rect) {\n const x = e.clientX - rect.left;\n const y = e.clientY - rect.top;\n setMousePos({ x, y });\n }\n\n if (isDragging) {\n const deltaX = e.clientX - lastMousePos.x;\n const deltaY = e.clientY - lastMousePos.y;\n\n rotationRef.current = {\n x: rotationRef.current.x + deltaY * 0.002,\n y: rotationRef.current.y + deltaX * 0.002,\n };\n\n setLastMousePos({ x: e.clientX, y: e.clientY });\n }\n };\n\n const handleMouseUp = () => {\n setIsDragging(false);\n };\n\n // Animation and rendering\n useEffect(() => {\n const canvas = canvasRef.current;\n const ctx = canvas?.getContext(\"2d\");\n if (!canvas || !ctx) return;\n\n const animate = () => {\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n\n const centerX = canvas.width / 2;\n const centerY = canvas.height / 2;\n const maxDistance = Math.sqrt(centerX * centerX + centerY * centerY);\n const dx = mousePos.x - centerX;\n const dy = mousePos.y - centerY;\n const distance = Math.sqrt(dx * dx + dy * dy);\n const speed = 0.003 + (distance / maxDistance) * 0.01;\n\n if (targetRotation) {\n const elapsed = performance.now() - targetRotation.startTime;\n const progress = Math.min(1, elapsed / targetRotation.duration);\n const easedProgress = easeOutCubic(progress);\n\n rotationRef.current = {\n x:\n targetRotation.startX +\n (targetRotation.x - targetRotation.startX) * easedProgress,\n y:\n targetRotation.startY +\n (targetRotation.y - targetRotation.startY) * easedProgress,\n };\n\n if (progress >= 1) {\n setTargetRotation(null);\n }\n } else if (!isDragging) {\n rotationRef.current = {\n x: rotationRef.current.x + (dy / canvas.height) * speed,\n y: rotationRef.current.y + (dx / canvas.width) * speed,\n };\n }\n\n iconPositions.forEach((icon, index) => {\n const cosX = Math.cos(rotationRef.current.x);\n const sinX = Math.sin(rotationRef.current.x);\n const cosY = Math.cos(rotationRef.current.y);\n const sinY = Math.sin(rotationRef.current.y);\n\n const rotatedX = icon.x * cosY - icon.z * sinY;\n const rotatedZ = icon.x * sinY + icon.z * cosY;\n const rotatedY = icon.y * cosX + rotatedZ * sinX;\n\n const scale = (rotatedZ + 200) / 300;\n const opacity = Math.max(0.2, Math.min(1, (rotatedZ + 150) / 200));\n\n ctx.save();\n ctx.translate(\n canvas.width / 2 + rotatedX,\n canvas.height / 2 + rotatedY,\n );\n ctx.scale(scale, scale);\n ctx.globalAlpha = opacity;\n\n if (icons || images) {\n // Only try to render icons/images if they exist\n if (\n iconCanvasesRef.current[index] &&\n imagesLoadedRef.current[index]\n ) {\n ctx.drawImage(iconCanvasesRef.current[index], -20, -20, 40, 40);\n }\n } else {\n // Show numbered circles if no icons/images are provided\n ctx.beginPath();\n ctx.arc(0, 0, 20, 0, Math.PI * 2);\n ctx.fillStyle = \"#4444ff\";\n ctx.fill();\n ctx.fillStyle = \"white\";\n ctx.textAlign = \"center\";\n ctx.textBaseline = \"middle\";\n ctx.font = \"16px Arial\";\n ctx.fillText(`${icon.id + 1}`, 0, 0);\n }\n\n ctx.restore();\n });\n animationFrameRef.current = requestAnimationFrame(animate);\n };\n\n animate();\n\n return () => {\n if (animationFrameRef.current) {\n cancelAnimationFrame(animationFrameRef.current);\n }\n };\n }, [icons, images, iconPositions, isDragging, mousePos, targetRotation]);\n\n return (\n <canvas\n ref={canvasRef}\n width={400}\n height={400}\n onMouseDown={handleMouseDown}\n onMouseMove={handleMouseMove}\n onMouseUp={handleMouseUp}\n onMouseLeave={handleMouseUp}\n className=\"rounded-lg\"\n aria-label=\"Interactive 3D Icon Cloud\"\n role=\"img\"\n />\n );\n}\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/iphone-15-pro-demo-2.json b/public/r/iphone-15-pro-demo-2.jsonindex 1cfd2c4e..26cc29a7 100644--- a/public/r/iphone-15-pro-demo-2.json+++ b/public/r/iphone-15-pro-demo-2.json@@ -11,7 +11,8 @@{"path": "registry/example/iphone-15-pro-demo-2.tsx","content": "import Iphone15Pro from \"@/registry/magicui/iphone-15-pro\";\n\nexport default function Iphone15ProDemo() {\n return (\n <div className=\"relative\">\n <Iphone15Pro\n className=\"size-full\"\n src=\"https://via.placeholder.com/430x880\"\n />\n </div>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/iphone-15-pro-demo-3.json b/public/r/iphone-15-pro-demo-3.jsonindex cffa2351..0955cf07 100644--- a/public/r/iphone-15-pro-demo-3.json+++ b/public/r/iphone-15-pro-demo-3.json@@ -11,7 +11,8 @@{"path": "registry/example/iphone-15-pro-demo-3.tsx","content": "import Iphone15Pro from \"@/registry/magicui/iphone-15-pro\";\n\nexport default function Iphone15ProDemo() {\n return (\n <div className=\"relative\">\n <Iphone15Pro\n className=\"size-full\"\n videoSrc=\"https://videos.pexels.com/video-files/8946986/8946986-uhd_1440_2732_25fps.mp4\"\n />\n </div>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/iphone-15-pro-demo.json b/public/r/iphone-15-pro-demo.jsonindex 7d02062c..21910750 100644--- a/public/r/iphone-15-pro-demo.json+++ b/public/r/iphone-15-pro-demo.json@@ -11,7 +11,8 @@{"path": "registry/example/iphone-15-pro-demo.tsx","content": "import Iphone15Pro from \"@/registry/magicui/iphone-15-pro\";\n\nexport default function Iphone15ProDemo() {\n return (\n <div className=\"relative\">\n <Iphone15Pro className=\"size-full\" />\n </div>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/iphone-15-pro.json b/public/r/iphone-15-pro.jsonindex 3151a5e6..674522a2 100644--- a/public/r/iphone-15-pro.json+++ b/public/r/iphone-15-pro.json@@ -8,7 +8,8 @@{"path": "registry/magicui/iphone-15-pro.tsx","content": "import { SVGProps } from \"react\";\n\nexport interface Iphone15ProProps extends SVGProps<SVGSVGElement> {\n width?: number;\n height?: number;\n src?: string;\n videoSrc?: string;\n}\n\nexport default function Iphone15Pro({\n width = 433,\n height = 882,\n src,\n videoSrc,\n ...props\n}: Iphone15ProProps) {\n return (\n <svg\n width={width}\n height={height}\n viewBox={`0 0 ${width} ${height}`}\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <path\n d=\"M2 73C2 32.6832 34.6832 0 75 0H357C397.317 0 430 32.6832 430 73V809C430 849.317 397.317 882 357 882H75C34.6832 882 2 849.317 2 809V73Z\"\n className=\"fill-[#E5E5E5] dark:fill-[#404040]\"\n />\n <path\n d=\"M0 171C0 170.448 0.447715 170 1 170H3V204H1C0.447715 204 0 203.552 0 203V171Z\"\n className=\"fill-[#E5E5E5] dark:fill-[#404040]\"\n />\n <path\n d=\"M1 234C1 233.448 1.44772 233 2 233H3.5V300H2C1.44772 300 1 299.552 1 299V234Z\"\n className=\"fill-[#E5E5E5] dark:fill-[#404040]\"\n />\n <path\n d=\"M1 319C1 318.448 1.44772 318 2 318H3.5V385H2C1.44772 385 1 384.552 1 384V319Z\"\n className=\"fill-[#E5E5E5] dark:fill-[#404040]\"\n />\n <path\n d=\"M430 279H432C432.552 279 433 279.448 433 280V384C433 384.552 432.552 385 432 385H430V279Z\"\n className=\"fill-[#E5E5E5] dark:fill-[#404040]\"\n />\n <path\n d=\"M6 74C6 35.3401 37.3401 4 76 4H356C394.66 4 426 35.3401 426 74V808C426 846.66 394.66 878 356 878H76C37.3401 878 6 846.66 6 808V74Z\"\n className=\"fill-white dark:fill-[#262626]\"\n />\n <path\n opacity=\"0.5\"\n d=\"M174 5H258V5.5C258 6.60457 257.105 7.5 256 7.5H176C174.895 7.5 174 6.60457 174 5.5V5Z\"\n className=\"fill-[#E5E5E5] dark:fill-[#404040]\"\n />\n <path\n d=\"M21.25 75C21.25 44.2101 46.2101 19.25 77 19.25H355C385.79 19.25 410.75 44.2101 410.75 75V807C410.75 837.79 385.79 862.75 355 862.75H77C46.2101 862.75 21.25 837.79 21.25 807V75Z\"\n className=\"fill-[#E5E5E5] stroke-[#E5E5E5] stroke-[0.5] dark:fill-[#404040] dark:stroke-[#404040]\"\n />\n\n {src && (\n <image\n href={src}\n x=\"21.25\"\n y=\"19.25\"\n width=\"389.5\"\n height=\"843.5\"\n preserveAspectRatio=\"xMidYMid slice\"\n clipPath=\"url(#roundedCorners)\"\n />\n )}\n {videoSrc && (\n <foreignObject x=\"21.25\" y=\"19.25\" width=\"389.5\" height=\"843.5\">\n <video\n className=\"size-full overflow-hidden rounded-[55.75px] object-cover\"\n src={videoSrc}\n autoPlay\n loop\n muted\n playsInline\n />\n </foreignObject>\n )}\n <path\n d=\"M154 48.5C154 38.2827 162.283 30 172.5 30H259.5C269.717 30 278 38.2827 278 48.5C278 58.7173 269.717 67 259.5 67H172.5C162.283 67 154 58.7173 154 48.5Z\"\n className=\"fill-[#F5F5F5] dark:fill-[#262626]\"\n />\n <path\n d=\"M249 48.5C249 42.701 253.701 38 259.5 38C265.299 38 270 42.701 270 48.5C270 54.299 265.299 59 259.5 59C253.701 59 249 54.299 249 48.5Z\"\n className=\"fill-[#F5F5F5] dark:fill-[#262626]\"\n />\n <path\n d=\"M254 48.5C254 45.4624 256.462 43 259.5 43C262.538 43 265 45.4624 265 48.5C265 51.5376 262.538 54 259.5 54C256.462 54 254 51.5376 254 48.5Z\"\n className=\"fill-[#E5E5E5] dark:fill-[#404040]\"\n />\n <defs>\n <clipPath id=\"roundedCorners\">\n <rect\n x=\"21.25\"\n y=\"19.25\"\n width=\"389.5\"\n height=\"843.5\"\n rx=\"55.75\"\n ry=\"55.75\"\n />\n </clipPath>\n </defs>\n </svg>\n );\n}\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/line-shadow-text-demo.json b/public/r/line-shadow-text-demo.jsonindex 6a8381e0..be9022c5 100644--- a/public/r/line-shadow-text-demo.json+++ b/public/r/line-shadow-text-demo.json@@ -11,7 +11,8 @@{"path": "registry/example/line-shadow-text-demo.tsx","content": "\"use client\";\n\nimport { LineShadowText } from \"@/registry/magicui/line-shadow-text\";\nimport { useTheme } from \"next-themes\";\n\nexport default function LineShadowTextDemo() {\n const theme = useTheme();\n const shadowColor = theme.resolvedTheme === \"dark\" ? \"white\" : \"black\";\n return (\n <h1 className=\"text-balance text-5xl font-semibold leading-none tracking-tighter sm:text-6xl md:text-7xl lg:text-8xl\">\n Ship\n <LineShadowText className=\"italic\" shadowColor={shadowColor}>\n Fast\n </LineShadowText>\n </h1>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/line-shadow-text.json b/public/r/line-shadow-text.jsonindex 4b19993e..f021384a 100644--- a/public/r/line-shadow-text.json+++ b/public/r/line-shadow-text.json@@ -11,7 +11,8 @@{"path": "registry/magicui/line-shadow-text.tsx","content": "import { cn } from \"@/lib/utils\";\nimport { motion, MotionProps } from \"motion/react\";\n\ninterface LineShadowTextProps\n extends Omit<React.HTMLAttributes<HTMLElement>, keyof MotionProps>,\n MotionProps {\n shadowColor?: string;\n as?: React.ElementType;\n}\n\nexport function LineShadowText({\n children,\n shadowColor = \"black\",\n className,\n as: Component = \"span\",\n ...props\n}: LineShadowTextProps) {\n const MotionComponent = motion.create(Component);\n const content = typeof children === \"string\" ? children : null;\n\n if (!content) {\n throw new Error(\"LineShadowText only accepts string content\");\n }\n\n return (\n <MotionComponent\n style={{ \"--shadow-color\": shadowColor } as React.CSSProperties}\n className={cn(\n \"relative z-0 inline-flex\",\n \"after:absolute after:left-[0.04em] after:top-[0.04em] after:content-[attr(data-text)]\",\n \"after:bg-[linear-gradient(45deg,transparent_45%,var(--shadow-color)_45%,var(--shadow-color)_55%,transparent_0)]\",\n \"after:-z-10 after:bg-[length:0.06em_0.06em] after:bg-clip-text after:text-transparent\",\n \"after:animate-line-shadow\",\n className,\n )}\n data-text={content}\n {...props}\n >\n {content}\n </MotionComponent>\n );\n}\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/magic-card-demo.json b/public/r/magic-card-demo.jsonindex 0002f0d8..5605a593 100644--- a/public/r/magic-card-demo.json+++ b/public/r/magic-card-demo.json@@ -11,7 +11,8 @@{"path": "registry/example/magic-card-demo.tsx","content": "\"use client\";\n\nimport { useTheme } from \"next-themes\";\n\nimport { MagicCard } from \"@/registry/magicui/magic-card\";\n\nexport default function MagicCardDemo() {\n const { theme } = useTheme();\n return (\n <div\n className={\n \"flex h-[500px] w-full flex-col gap-4 lg:h-[250px] lg:flex-row\"\n }\n >\n <MagicCard\n className=\"cursor-pointer flex-col items-center justify-center whitespace-nowrap text-4xl shadow-2xl\"\n gradientColor={theme === \"dark\" ? \"#262626\" : \"#D9D9D955\"}\n >\n Magic\n </MagicCard>\n <MagicCard\n className=\"cursor-pointer flex-col items-center justify-center whitespace-nowrap text-4xl shadow-2xl\"\n gradientColor={theme === \"dark\" ? \"#262626\" : \"#D9D9D955\"}\n >\n Card\n </MagicCard>\n </div>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/magic-card.json b/public/r/magic-card.jsonindex cf7ff470..0f31b505 100644--- a/public/r/magic-card.json+++ b/public/r/magic-card.json@@ -11,7 +11,8 @@{"path": "registry/magicui/magic-card.tsx","content": "\"use client\";\n\nimport { motion, useMotionTemplate, useMotionValue } from \"motion/react\";\nimport React, { useCallback, useEffect, useRef } from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\ninterface MagicCardProps extends React.HTMLAttributes<HTMLDivElement> {\n gradientSize?: number;\n gradientColor?: string;\n gradientOpacity?: number;\n gradientFrom?: string;\n gradientTo?: string;\n}\n\nexport function MagicCard({\n children,\n className,\n gradientSize = 200,\n gradientColor = \"#262626\",\n gradientOpacity = 0.8,\n gradientFrom = \"#9E7AFF\",\n gradientTo = \"#FE8BBB\",\n}: MagicCardProps) {\n const cardRef = useRef<HTMLDivElement>(null);\n const mouseX = useMotionValue(-gradientSize);\n const mouseY = useMotionValue(-gradientSize);\n\n const handleMouseMove = useCallback(\n (e: MouseEvent) => {\n if (cardRef.current) {\n const { left, top } = cardRef.current.getBoundingClientRect();\n const clientX = e.clientX;\n const clientY = e.clientY;\n mouseX.set(clientX - left);\n mouseY.set(clientY - top);\n }\n },\n [mouseX, mouseY],\n );\n\n const handleMouseOut = useCallback(\n (e: MouseEvent) => {\n if (!e.relatedTarget) {\n document.removeEventListener(\"mousemove\", handleMouseMove);\n mouseX.set(-gradientSize);\n mouseY.set(-gradientSize);\n }\n },\n [handleMouseMove, mouseX, gradientSize, mouseY],\n );\n\n const handleMouseEnter = useCallback(() => {\n document.addEventListener(\"mousemove\", handleMouseMove);\n mouseX.set(-gradientSize);\n mouseY.set(-gradientSize);\n }, [handleMouseMove, mouseX, gradientSize, mouseY]);\n\n useEffect(() => {\n document.addEventListener(\"mousemove\", handleMouseMove);\n document.addEventListener(\"mouseout\", handleMouseOut);\n document.addEventListener(\"mouseenter\", handleMouseEnter);\n\n return () => {\n document.removeEventListener(\"mousemove\", handleMouseMove);\n document.removeEventListener(\"mouseout\", handleMouseOut);\n document.removeEventListener(\"mouseenter\", handleMouseEnter);\n };\n }, [handleMouseEnter, handleMouseMove, handleMouseOut]);\n\n useEffect(() => {\n mouseX.set(-gradientSize);\n mouseY.set(-gradientSize);\n }, [gradientSize, mouseX, mouseY]);\n\n return (\n <div\n ref={cardRef}\n className={cn(\"group relative flex size-full rounded-xl\", className)}\n >\n <div className=\"absolute inset-px z-10 rounded-xl bg-background\" />\n <div className=\"relative z-30\">{children}</div>\n <motion.div\n className=\"pointer-events-none absolute inset-px z-10 rounded-xl opacity-0 transition-opacity duration-300 group-hover:opacity-100\"\n style={{\n background: useMotionTemplate`\n radial-gradient(${gradientSize}px circle at ${mouseX}px ${mouseY}px, ${gradientColor}, transparent 100%)\n `,\n opacity: gradientOpacity,\n }}\n />\n <motion.div\n className=\"pointer-events-none absolute inset-0 rounded-xl bg-border duration-300 group-hover:opacity-100\"\n style={{\n background: useMotionTemplate`\n radial-gradient(${gradientSize}px circle at ${mouseX}px ${mouseY}px,\n ${gradientFrom}, \n ${gradientTo}, \n hsl(var(--border)) 100%\n )\n `,\n }}\n />\n </div>\n );\n}\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/marquee-3d.json b/public/r/marquee-3d.jsonindex 9f03d87a..e23f6ff7 100644--- a/public/r/marquee-3d.json+++ b/public/r/marquee-3d.json@@ -11,7 +11,8 @@{"path": "registry/example/marquee-3d.tsx","content": "import { Marquee } from \"@/registry/magicui/marquee\";\n\nconst logos = [\n {\n name: \"Microsoft\",\n img: \"https://picsum.photos/id/1/200/300\",\n },\n {\n name: \"Apple\",\n img: \"https://picsum.photos/id/2/200/300\",\n },\n {\n name: \"Google\",\n img: \"https://picsum.photos/id/3/200/300\",\n },\n {\n name: \"Facebook\",\n img: \"https://picsum.photos/id/4/200/300\",\n },\n {\n name: \"LinkedIn\",\n img: \"https://picsum.photos/id/5/200/300\",\n },\n {\n name: \"Twitter\",\n img: \"https://picsum.photos/id/6/200/300\",\n },\n];\n\nexport default function Marquee3D() {\n return (\n <div className=\"relative flex h-full w-96 flex-col items-center justify-center gap-4 overflow-hidden rounded-lg border bg-background px-20 md:shadow-xl\">\n <div className=\"flex flex-row gap-4 [perspective:300px]\">\n <Marquee\n className=\"h-96 justify-center overflow-hidden [--duration:60s] [--gap:1rem]\"\n vertical\n style={{\n transform:\n \"translateX(0px) translateY(0px) translateZ(-50px) rotateX(0deg) rotateY(-20deg) rotateZ(10deg) scale(1.5)\",\n }}\n >\n {logos.map((data, idx) => (\n <img\n key={idx}\n src={data.img}\n alt={data.name}\n className=\"mx-auto h-full w-3/4 cursor-pointer rounded-xl border border-neutral-300 transition-all duration-300 hover:ring-1 hover:ring-neutral-300\"\n />\n ))}\n </Marquee>\n </div>\n\n <div className=\"pointer-events-none absolute inset-y-0 left-0 w-1/3 bg-gradient-to-r from-white dark:from-background\"></div>\n <div className=\"pointer-events-none absolute inset-y-0 right-0 w-1/3 bg-gradient-to-l from-white dark:from-background\"></div>\n </div>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/marquee-demo-vertical.json b/public/r/marquee-demo-vertical.jsonindex 04793f76..264ed35a 100644--- a/public/r/marquee-demo-vertical.json+++ b/public/r/marquee-demo-vertical.json@@ -11,7 +11,8 @@{"path": "registry/example/marquee-demo-vertical.tsx","content": "import { cn } from \"@/lib/utils\";\nimport { Marquee } from \"@/registry/magicui/marquee\";\n\nconst reviews = [\n {\n name: \"Jack\",\n username: \"@jack\",\n body: \"I've never seen anything like this before. It's amazing. I love it.\",\n img: \"https://avatar.vercel.sh/jack\",\n },\n {\n name: \"Jill\",\n username: \"@jill\",\n body: \"I don't know what to say. I'm speechless. This is amazing.\",\n img: \"https://avatar.vercel.sh/jill\",\n },\n {\n name: \"John\",\n username: \"@john\",\n body: \"I'm at a loss for words. This is amazing. I love it.\",\n img: \"https://avatar.vercel.sh/john\",\n },\n];\n\nconst firstRow = reviews.slice(0, reviews.length / 2);\nconst secondRow = reviews.slice(reviews.length / 2);\n\nconst ReviewCard = ({\n img,\n name,\n username,\n body,\n}: {\n img: string;\n name: string;\n username: string;\n body: string;\n}) => {\n return (\n <figure\n className={cn(\n \"relative h-40 w-36 cursor-pointer overflow-hidden rounded-xl border p-4\",\n // light styles\n \"border-gray-950/[.1] bg-gray-950/[.01] hover:bg-gray-950/[.05]\",\n // dark styles\n \"dark:border-gray-50/[.1] dark:bg-gray-50/[.10] dark:hover:bg-gray-50/[.15]\",\n )}\n >\n <div className=\"flex flex-row items-center gap-2\">\n <img className=\"rounded-full\" width=\"32\" height=\"32\" alt=\"\" src={img} />\n <div className=\"flex flex-col\">\n <figcaption className=\"text-sm font-medium dark:text-white\">\n {name}\n </figcaption>\n <p className=\"text-xs font-medium dark:text-white/40\">{username}</p>\n </div>\n </div>\n <blockquote className=\"mt-2 text-sm\">{body}</blockquote>\n </figure>\n );\n};\n\nexport default function MarqueeDemoVertical() {\n return (\n <div className=\"relative flex h-[500px] w-full flex-row items-center justify-center overflow-hidden rounded-lg border bg-background md:shadow-xl\">\n <Marquee pauseOnHover vertical className=\"[--duration:20s]\">\n {firstRow.map((review) => (\n <ReviewCard key={review.username} {...review} />\n ))}\n </Marquee>\n <Marquee reverse pauseOnHover vertical className=\"[--duration:20s]\">\n {secondRow.map((review) => (\n <ReviewCard key={review.username} {...review} />\n ))}\n </Marquee>\n <div className=\"pointer-events-none absolute inset-x-0 top-0 h-1/3 bg-gradient-to-b from-white dark:from-background\"></div>\n <div className=\"pointer-events-none absolute inset-x-0 bottom-0 h-1/3 bg-gradient-to-t from-white dark:from-background\"></div>\n </div>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/marquee-demo.json b/public/r/marquee-demo.jsonindex b248258f..bcd938bc 100644--- a/public/r/marquee-demo.json+++ b/public/r/marquee-demo.json@@ -11,7 +11,8 @@{"path": "registry/example/marquee-demo.tsx","content": "import { cn } from \"@/lib/utils\";\nimport { Marquee } from \"@/registry/magicui/marquee\";\n\nconst reviews = [\n {\n name: \"Jack\",\n username: \"@jack\",\n body: \"I've never seen anything like this before. It's amazing. I love it.\",\n img: \"https://avatar.vercel.sh/jack\",\n },\n {\n name: \"Jill\",\n username: \"@jill\",\n body: \"I don't know what to say. I'm speechless. This is amazing.\",\n img: \"https://avatar.vercel.sh/jill\",\n },\n {\n name: \"John\",\n username: \"@john\",\n body: \"I'm at a loss for words. This is amazing. I love it.\",\n img: \"https://avatar.vercel.sh/john\",\n },\n {\n name: \"Jane\",\n username: \"@jane\",\n body: \"I'm at a loss for words. This is amazing. I love it.\",\n img: \"https://avatar.vercel.sh/jane\",\n },\n {\n name: \"Jenny\",\n username: \"@jenny\",\n body: \"I'm at a loss for words. This is amazing. I love it.\",\n img: \"https://avatar.vercel.sh/jenny\",\n },\n {\n name: \"James\",\n username: \"@james\",\n body: \"I'm at a loss for words. This is amazing. I love it.\",\n img: \"https://avatar.vercel.sh/james\",\n },\n];\n\nconst firstRow = reviews.slice(0, reviews.length / 2);\nconst secondRow = reviews.slice(reviews.length / 2);\n\nconst ReviewCard = ({\n img,\n name,\n username,\n body,\n}: {\n img: string;\n name: string;\n username: string;\n body: string;\n}) => {\n return (\n <figure\n className={cn(\n \"relative w-64 cursor-pointer overflow-hidden rounded-xl border p-4\",\n // light styles\n \"border-gray-950/[.1] bg-gray-950/[.01] hover:bg-gray-950/[.05]\",\n // dark styles\n \"dark:border-gray-50/[.1] dark:bg-gray-50/[.10] dark:hover:bg-gray-50/[.15]\",\n )}\n >\n <div className=\"flex flex-row items-center gap-2\">\n <img className=\"rounded-full\" width=\"32\" height=\"32\" alt=\"\" src={img} />\n <div className=\"flex flex-col\">\n <figcaption className=\"text-sm font-medium dark:text-white\">\n {name}\n </figcaption>\n <p className=\"text-xs font-medium dark:text-white/40\">{username}</p>\n </div>\n </div>\n <blockquote className=\"mt-2 text-sm\">{body}</blockquote>\n </figure>\n );\n};\n\nexport default function MarqueeDemo() {\n return (\n <div className=\"relative flex h-[500px] w-full flex-col items-center justify-center overflow-hidden rounded-lg border bg-background md:shadow-xl\">\n <Marquee pauseOnHover className=\"[--duration:20s]\">\n {firstRow.map((review) => (\n <ReviewCard key={review.username} {...review} />\n ))}\n </Marquee>\n <Marquee reverse pauseOnHover className=\"[--duration:20s]\">\n {secondRow.map((review) => (\n <ReviewCard key={review.username} {...review} />\n ))}\n </Marquee>\n <div className=\"pointer-events-none absolute inset-y-0 left-0 w-1/3 bg-gradient-to-r from-white dark:from-background\"></div>\n <div className=\"pointer-events-none absolute inset-y-0 right-0 w-1/3 bg-gradient-to-l from-white dark:from-background\"></div>\n </div>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/marquee-logos.json b/public/r/marquee-logos.jsonindex 737bfdfb..3bd0b39e 100644--- a/public/r/marquee-logos.json+++ b/public/r/marquee-logos.json@@ -11,7 +11,8 @@{"path": "registry/example/marquee-logos.tsx","content": "import { cn } from \"@/lib/utils\";\nimport { Marquee } from \"@/registry/magicui/marquee\";\n\nconst logos = [\n {\n name: \"Microsoft\",\n img: \"https://cdn.simpleicons.org/microsoft/000/fff\",\n },\n {\n name: \"Apple\",\n img: \"https://cdn.simpleicons.org/apple/000/fff\",\n },\n {\n name: \"Google\",\n img: \"https://cdn.simpleicons.org/google/000/fff\",\n },\n {\n name: \"Facebook\",\n img: \"https://cdn.simpleicons.org/facebook/000/fff\",\n },\n {\n name: \"LinkedIn\",\n img: \"https://cdn.simpleicons.org/linkedin/000/fff\",\n },\n {\n name: \"Twitter\",\n img: \"https://cdn.simpleicons.org/twitter/000/fff\",\n },\n];\n\nconst Logo = ({ name, img }: { name: string; img: string }) => {\n return (\n <div className={cn(\"size-12 cursor-pointer\")}>\n <img src={img} alt={name} />\n </div>\n );\n};\n\nexport default function MarqueeLogos() {\n return (\n <div className=\"relative flex size-full flex-col items-center justify-center gap-4 overflow-hidden rounded-lg border bg-background py-20 md:shadow-xl\">\n <Marquee className=\"[--gap:3rem]\">\n {logos.map((logo, idx) => (\n <Logo key={idx} {...logo} />\n ))}\n </Marquee>\n <div className=\"pointer-events-none absolute inset-y-0 left-0 w-1/3 bg-gradient-to-r from-white dark:from-background\"></div>\n <div className=\"pointer-events-none absolute inset-y-0 right-0 w-1/3 bg-gradient-to-l from-white dark:from-background\"></div>\n </div>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/marquee.json b/public/r/marquee.jsonindex d59e6da1..d1ec3f10 100644--- a/public/r/marquee.json+++ b/public/r/marquee.json@@ -8,7 +8,8 @@{"path": "registry/magicui/marquee.tsx","content": "import { cn } from \"@/lib/utils\";\nimport { ComponentPropsWithoutRef } from \"react\";\n\ninterface MarqueeProps extends ComponentPropsWithoutRef<\"div\"> {\n /**\n * Optional CSS class name to apply custom styles\n */\n className?: string;\n /**\n * Whether to reverse the animation direction\n * @default false\n */\n reverse?: boolean;\n /**\n * Whether to pause the animation on hover\n * @default false\n */\n pauseOnHover?: boolean;\n /**\n * Content to be displayed in the marquee\n */\n children: React.ReactNode;\n /**\n * Whether to animate vertically instead of horizontally\n * @default false\n */\n vertical?: boolean;\n /**\n * Number of times to repeat the content\n * @default 4\n */\n repeat?: number;\n}\n\nexport function Marquee({\n className,\n reverse = false,\n pauseOnHover = false,\n children,\n vertical = false,\n repeat = 4,\n ...props\n}: MarqueeProps) {\n return (\n <div\n {...props}\n className={cn(\n \"group flex overflow-hidden p-2 [--duration:40s] [--gap:1rem] [gap:var(--gap)]\",\n {\n \"flex-row\": !vertical,\n \"flex-col\": vertical,\n },\n className,\n )}\n >\n {Array(repeat)\n .fill(0)\n .map((_, i) => (\n <div\n key={i}\n className={cn(\"flex shrink-0 justify-around [gap:var(--gap)]\", {\n \"animate-marquee flex-row\": !vertical,\n \"animate-marquee-vertical flex-col\": vertical,\n \"group-hover:[animation-play-state:paused]\": pauseOnHover,\n \"[animation-direction:reverse]\": reverse,\n })}\n >\n {children}\n </div>\n ))}\n </div>\n );\n}\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}],"tailwind": {diff --git a/public/r/meteors-demo.json b/public/r/meteors-demo.jsonindex 01abe6f0..4909190e 100644--- a/public/r/meteors-demo.json+++ b/public/r/meteors-demo.json@@ -11,7 +11,8 @@{"path": "registry/example/meteors-demo.tsx","content": "import { Meteors } from \"@/registry/magicui/meteors\";\n\nexport default function MeteorDemo() {\n return (\n <div className=\"relative flex h-[500px] w-full flex-col items-center justify-center overflow-hidden rounded-lg border bg-background md:shadow-xl\">\n <Meteors number={30} />\n <span className=\"pointer-events-none whitespace-pre-wrap bg-gradient-to-b from-black to-gray-300/80 bg-clip-text text-center text-8xl font-semibold leading-none text-transparent dark:from-white dark:to-slate-900/10\">\n Meteors\n </span>\n </div>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/meteors.json b/public/r/meteors.jsonindex 2d312f29..ba263dbb 100644--- a/public/r/meteors.json+++ b/public/r/meteors.json@@ -8,7 +8,8 @@{"path": "registry/magicui/meteors.tsx","content": "\"use client\";\n\nimport { useEffect, useState } from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\ninterface MeteorsProps extends React.HTMLAttributes<HTMLSpanElement> {\n number?: number;\n}\nexport const Meteors = ({ number = 20, ...props }: MeteorsProps) => {\n const [meteorStyles, setMeteorStyles] = useState<Array<React.CSSProperties>>(\n [],\n );\n\n useEffect(() => {\n const styles = [...new Array(number)].map(() => ({\n top: -5,\n left: Math.floor(Math.random() * window.innerWidth) + \"px\",\n animationDelay: Math.random() * 1 + 0.2 + \"s\",\n animationDuration: Math.floor(Math.random() * 8 + 2) + \"s\",\n }));\n setMeteorStyles(styles);\n }, [number]);\n\n return (\n <>\n {[...meteorStyles].map((style, idx) => (\n // Meteor Head\n <span\n key={idx}\n className={cn(\n \"pointer-events-none absolute left-1/2 top-1/2 size-0.5 rotate-[215deg] animate-meteor rounded-full bg-slate-500 shadow-[0_0_0_1px_#ffffff10]\",\n )}\n style={style}\n {...props}\n >\n {/* Meteor Tail */}\n <div className=\"pointer-events-none absolute top-1/2 -z-10 h-px w-[50px] -translate-y-1/2 bg-gradient-to-r from-slate-500 to-transparent\" />\n </span>\n ))}\n </>\n );\n};\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}],"tailwind": {diff --git a/public/r/morphing-text-demo.json b/public/r/morphing-text-demo.jsonindex 6a5f144f..91799b95 100644--- a/public/r/morphing-text-demo.json+++ b/public/r/morphing-text-demo.json@@ -11,7 +11,8 @@{"path": "registry/example/morphing-text-demo.tsx","content": "import { MorphingText } from \"@/registry/magicui/morphing-text\";\n\nconst texts = [\n \"Hello\",\n \"Morphing\",\n \"Text\",\n \"Animation\",\n \"React\",\n \"Component\",\n \"Smooth\",\n \"Transition\",\n \"Engaging\",\n];\n\nexport default function MorphingTextDemo() {\n return <MorphingText texts={texts} />;\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/morphing-text.json b/public/r/morphing-text.jsonindex 2845dd90..11606d9f 100644--- a/public/r/morphing-text.json+++ b/public/r/morphing-text.json@@ -8,7 +8,8 @@{"path": "registry/magicui/morphing-text.tsx","content": "\"use client\";\n\nimport { useCallback, useEffect, useRef } from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst morphTime = 1.5;\nconst cooldownTime = 0.5;\n\nconst useMorphingText = (texts: string[]) => {\n const textIndexRef = useRef(0);\n const morphRef = useRef(0);\n const cooldownRef = useRef(0);\n const timeRef = useRef(new Date());\n\n const text1Ref = useRef<HTMLSpanElement>(null);\n const text2Ref = useRef<HTMLSpanElement>(null);\n\n const setStyles = useCallback(\n (fraction: number) => {\n const [current1, current2] = [text1Ref.current, text2Ref.current];\n if (!current1 || !current2) return;\n\n current2.style.filter = `blur(${Math.min(8 / fraction - 8, 100)}px)`;\n current2.style.opacity = `${Math.pow(fraction, 0.4) * 100}%`;\n\n const invertedFraction = 1 - fraction;\n current1.style.filter = `blur(${Math.min(8 / invertedFraction - 8, 100)}px)`;\n current1.style.opacity = `${Math.pow(invertedFraction, 0.4) * 100}%`;\n\n current1.textContent = texts[textIndexRef.current % texts.length];\n current2.textContent = texts[(textIndexRef.current + 1) % texts.length];\n },\n [texts],\n );\n\n const doMorph = useCallback(() => {\n morphRef.current -= cooldownRef.current;\n cooldownRef.current = 0;\n\n let fraction = morphRef.current / morphTime;\n\n if (fraction > 1) {\n cooldownRef.current = cooldownTime;\n fraction = 1;\n }\n\n setStyles(fraction);\n\n if (fraction === 1) {\n textIndexRef.current++;\n }\n }, [setStyles]);\n\n const doCooldown = useCallback(() => {\n morphRef.current = 0;\n const [current1, current2] = [text1Ref.current, text2Ref.current];\n if (current1 && current2) {\n current2.style.filter = \"none\";\n current2.style.opacity = \"100%\";\n current1.style.filter = \"none\";\n current1.style.opacity = \"0%\";\n }\n }, []);\n\n useEffect(() => {\n let animationFrameId: number;\n\n const animate = () => {\n animationFrameId = requestAnimationFrame(animate);\n\n const newTime = new Date();\n const dt = (newTime.getTime() - timeRef.current.getTime()) / 1000;\n timeRef.current = newTime;\n\n cooldownRef.current -= dt;\n\n if (cooldownRef.current <= 0) doMorph();\n else doCooldown();\n };\n\n animate();\n return () => {\n cancelAnimationFrame(animationFrameId);\n };\n }, [doMorph, doCooldown]);\n\n return { text1Ref, text2Ref };\n};\n\ninterface MorphingTextProps {\n className?: string;\n texts: string[];\n}\n\nconst Texts: React.FC<Pick<MorphingTextProps, \"texts\">> = ({ texts }) => {\n const { text1Ref, text2Ref } = useMorphingText(texts);\n return (\n <>\n <span\n className=\"absolute inset-x-0 top-0 m-auto inline-block w-full\"\n ref={text1Ref}\n />\n <span\n className=\"absolute inset-x-0 top-0 m-auto inline-block w-full\"\n ref={text2Ref}\n />\n </>\n );\n};\n\nconst SvgFilters: React.FC = () => (\n <svg\n id=\"filters\"\n className=\"fixed h-0 w-0\"\n preserveAspectRatio=\"xMidYMid slice\"\n >\n <defs>\n <filter id=\"threshold\">\n <feColorMatrix\n in=\"SourceGraphic\"\n type=\"matrix\"\n values=\"1 0 0 0 0\n 0 1 0 0 0\n 0 0 1 0 0\n 0 0 0 255 -140\"\n />\n </filter>\n </defs>\n </svg>\n);\n\nexport const MorphingText: React.FC<MorphingTextProps> = ({\n texts,\n className,\n}) => (\n <div\n className={cn(\n \"relative mx-auto h-16 w-full max-w-screen-md text-center font-sans text-[40pt] font-bold leading-none [filter:url(#threshold)_blur(0.6px)] md:h-24 lg:text-[6rem]\",\n className,\n )}\n >\n <Texts texts={texts} />\n <SvgFilters />\n </div>\n);\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/neon-gradient-card-demo.json b/public/r/neon-gradient-card-demo.jsonindex c465f2cd..c582bf91 100644--- a/public/r/neon-gradient-card-demo.json+++ b/public/r/neon-gradient-card-demo.json@@ -11,7 +11,8 @@{"path": "registry/example/neon-gradient-card-demo.tsx","content": "import { NeonGradientCard } from \"@/registry/magicui/neon-gradient-card\";\n\nexport default function NeonGradientCardDemo() {\n return (\n <NeonGradientCard className=\"max-w-sm items-center justify-center text-center\">\n <span className=\"pointer-events-none z-10 h-full whitespace-pre-wrap bg-gradient-to-br from-[#ff2975] from-35% to-[#00FFF1] bg-clip-text text-center text-6xl font-bold leading-none tracking-tighter text-transparent dark:drop-shadow-[0_5px_5px_rgba(0,0,0,0.8)]\">\n Neon Gradient Card\n </span>\n </NeonGradientCard>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/neon-gradient-card.json b/public/r/neon-gradient-card.jsonindex f68c8807..97dbd321 100644--- a/public/r/neon-gradient-card.json+++ b/public/r/neon-gradient-card.json@@ -8,7 +8,8 @@{"path": "registry/magicui/neon-gradient-card.tsx","content": "\"use client\";\n\nimport {\n CSSProperties,\n ReactElement,\n ReactNode,\n useEffect,\n useRef,\n useState,\n} from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\ninterface NeonColorsProps {\n firstColor: string;\n secondColor: string;\n}\n\ninterface NeonGradientCardProps {\n /**\n * @default <div />\n * @type ReactElement\n * @description\n * The component to be rendered as the card\n * */\n as?: ReactElement;\n /**\n * @default \"\"\n * @type string\n * @description\n * The className of the card\n */\n className?: string;\n\n /**\n * @default \"\"\n * @type ReactNode\n * @description\n * The children of the card\n * */\n children?: ReactNode;\n\n /**\n * @default 5\n * @type number\n * @description\n * The size of the border in pixels\n * */\n borderSize?: number;\n\n /**\n * @default 20\n * @type number\n * @description\n * The size of the radius in pixels\n * */\n borderRadius?: number;\n\n /**\n * @default \"{ firstColor: '#ff00aa', secondColor: '#00FFF1' }\"\n * @type string\n * @description\n * The colors of the neon gradient\n * */\n neonColors?: NeonColorsProps;\n\n [key: string]: any;\n}\n\nexport const NeonGradientCard: React.FC<NeonGradientCardProps> = ({\n className,\n children,\n borderSize = 2,\n borderRadius = 20,\n neonColors = {\n firstColor: \"#ff00aa\",\n secondColor: \"#00FFF1\",\n },\n ...props\n}) => {\n const containerRef = useRef<HTMLDivElement>(null);\n const [dimensions, setDimensions] = useState({ width: 0, height: 0 });\n\n useEffect(() => {\n const updateDimensions = () => {\n if (containerRef.current) {\n const { offsetWidth, offsetHeight } = containerRef.current;\n setDimensions({ width: offsetWidth, height: offsetHeight });\n }\n };\n\n updateDimensions();\n window.addEventListener(\"resize\", updateDimensions);\n\n return () => {\n window.removeEventListener(\"resize\", updateDimensions);\n };\n }, []);\n\n useEffect(() => {\n if (containerRef.current) {\n const { offsetWidth, offsetHeight } = containerRef.current;\n setDimensions({ width: offsetWidth, height: offsetHeight });\n }\n }, [children]);\n\n return (\n <div\n ref={containerRef}\n style={\n {\n \"--border-size\": `${borderSize}px`,\n \"--border-radius\": `${borderRadius}px`,\n \"--neon-first-color\": neonColors.firstColor,\n \"--neon-second-color\": neonColors.secondColor,\n \"--card-width\": `${dimensions.width}px`,\n \"--card-height\": `${dimensions.height}px`,\n \"--card-content-radius\": `${borderRadius - borderSize}px`,\n \"--pseudo-element-background-image\": `linear-gradient(0deg, ${neonColors.firstColor}, ${neonColors.secondColor})`,\n \"--pseudo-element-width\": `${dimensions.width + borderSize * 2}px`,\n \"--pseudo-element-height\": `${dimensions.height + borderSize * 2}px`,\n \"--after-blur\": `${dimensions.width / 3}px`,\n } as CSSProperties\n }\n className={cn(\n \"relative z-10 size-full rounded-[var(--border-radius)]\",\n className,\n )}\n {...props}\n >\n <div\n className={cn(\n \"relative size-full min-h-[inherit] rounded-[var(--card-content-radius)] bg-gray-100 p-6\",\n \"before:absolute before:-left-[var(--border-size)] before:-top-[var(--border-size)] before:-z-10 before:block\",\n \"before:h-[var(--pseudo-element-height)] before:w-[var(--pseudo-element-width)] before:rounded-[var(--border-radius)] before:content-['']\",\n \"before:bg-[linear-gradient(0deg,var(--neon-first-color),var(--neon-second-color))] before:bg-[length:100%_200%]\",\n \"before:animate-background-position-spin\",\n \"after:absolute after:-left-[var(--border-size)] after:-top-[var(--border-size)] after:-z-10 after:block\",\n \"after:h-[var(--pseudo-element-height)] after:w-[var(--pseudo-element-width)] after:rounded-[var(--border-radius)] after:blur-[var(--after-blur)] after:content-['']\",\n \"after:bg-[linear-gradient(0deg,var(--neon-first-color),var(--neon-second-color))] after:bg-[length:100%_200%] after:opacity-80\",\n \"after:animate-background-position-spin\",\n \"dark:bg-neutral-900\",\n )}\n >\n {children}\n </div>\n </div>\n );\n};\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}],"tailwind": {diff --git a/public/r/number-ticker-demo.json b/public/r/number-ticker-demo.jsonindex f2fa392c..a2d23da6 100644--- a/public/r/number-ticker-demo.json+++ b/public/r/number-ticker-demo.json@@ -11,7 +11,8 @@{"path": "registry/example/number-ticker-demo.tsx","content": "import { NumberTicker } from \"@/registry/magicui/number-ticker\";\n\nexport default function NumberTickerDemo() {\n return (\n <NumberTicker\n value={100}\n className=\"whitespace-pre-wrap text-8xl font-medium tracking-tighter text-black dark:text-white\"\n />\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/number-ticker.json b/public/r/number-ticker.jsonindex 38e07437..46f54d8c 100644--- a/public/r/number-ticker.json+++ b/public/r/number-ticker.json@@ -11,7 +11,8 @@{"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",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/orbiting-circles-demo.json b/public/r/orbiting-circles-demo.jsonindex 64f22e59..67130b6b 100644--- a/public/r/orbiting-circles-demo.json+++ b/public/r/orbiting-circles-demo.json@@ -14,7 +14,8 @@{"path": "registry/example/orbiting-circles-demo.tsx","content": "import { OrbitingCircles } from \"@/registry/magicui/orbiting-circles\";\n\nexport default function OrbitingCirclesDemo() {\n return (\n <div className=\"relative flex h-[500px] w-full flex-col items-center justify-center overflow-hidden rounded-lg border bg-background md:shadow-xl\">\n <span className=\"pointer-events-none whitespace-pre-wrap bg-gradient-to-b from-black to-gray-300 bg-clip-text text-center text-8xl font-semibold leading-none text-transparent dark:from-white dark:to-black\">\n Circles\n </span>\n\n <OrbitingCircles iconSize={40}>\n <Icons.whatsapp />\n <Icons.notion />\n <Icons.openai />\n <Icons.googleDrive />\n <Icons.whatsapp />\n </OrbitingCircles>\n <OrbitingCircles iconSize={30} radius={100} reverse speed={2}>\n <Icons.whatsapp />\n <Icons.notion />\n <Icons.openai />\n <Icons.googleDrive />\n </OrbitingCircles>\n </div>\n );\n}\n\nconst Icons = {\n gitHub: () => (\n <svg width=\"100\" height=\"100\" viewBox=\"0 0 438.549 438.549\">\n <path\n fill=\"currentColor\"\n d=\"M409.132 114.573c-19.608-33.596-46.205-60.194-79.798-79.8-33.598-19.607-70.277-29.408-110.063-29.408-39.781 0-76.472 9.804-110.063 29.408-33.596 19.605-60.192 46.204-79.8 79.8C9.803 148.168 0 184.854 0 224.63c0 47.78 13.94 90.745 41.827 128.906 27.884 38.164 63.906 64.572 108.063 79.227 5.14.954 8.945.283 11.419-1.996 2.475-2.282 3.711-5.14 3.711-8.562 0-.571-.049-5.708-.144-15.417a2549.81 2549.81 0 01-.144-25.406l-6.567 1.136c-4.187.767-9.469 1.092-15.846 1-6.374-.089-12.991-.757-19.842-1.999-6.854-1.231-13.229-4.086-19.13-8.559-5.898-4.473-10.085-10.328-12.56-17.556l-2.855-6.57c-1.903-4.374-4.899-9.233-8.992-14.559-4.093-5.331-8.232-8.945-12.419-10.848l-1.999-1.431c-1.332-.951-2.568-2.098-3.711-3.429-1.142-1.331-1.997-2.663-2.568-3.997-.572-1.335-.098-2.43 1.427-3.289 1.525-.859 4.281-1.276 8.28-1.276l5.708.853c3.807.763 8.516 3.042 14.133 6.851 5.614 3.806 10.229 8.754 13.846 14.842 4.38 7.806 9.657 13.754 15.846 17.847 6.184 4.093 12.419 6.136 18.699 6.136 6.28 0 11.704-.476 16.274-1.423 4.565-.952 8.848-2.383 12.847-4.285 1.713-12.758 6.377-22.559 13.988-29.41-10.848-1.14-20.601-2.857-29.264-5.14-8.658-2.286-17.605-5.996-26.835-11.14-9.235-5.137-16.896-11.516-22.985-19.126-6.09-7.614-11.088-17.61-14.987-29.979-3.901-12.374-5.852-26.648-5.852-42.826 0-23.035 7.52-42.637 22.557-58.817-7.044-17.318-6.379-36.732 1.997-58.24 5.52-1.715 13.706-.428 24.554 3.853 10.85 4.283 18.794 7.952 23.84 10.994 5.046 3.041 9.089 5.618 12.135 7.708 17.705-4.947 35.976-7.421 54.818-7.421s37.117 2.474 54.823 7.421l10.849-6.849c7.419-4.57 16.18-8.758 26.262-12.565 10.088-3.805 17.802-4.853 23.134-3.138 8.562 21.509 9.325 40.922 2.279 58.24 15.036 16.18 22.559 35.787 22.559 58.817 0 16.178-1.958 30.497-5.853 42.966-3.9 12.471-8.941 22.457-15.125 29.979-6.191 7.521-13.901 13.85-23.131 18.986-9.232 5.14-18.182 8.85-26.84 11.136-8.662 2.286-18.415 4.004-29.263 5.146 9.894 8.562 14.842 22.077 14.842 40.539v60.237c0 3.422 1.19 6.279 3.572 8.562 2.379 2.279 6.136 2.95 11.276 1.995 44.163-14.653 80.185-41.062 108.068-79.226 27.88-38.161 41.825-81.126 41.825-128.906-.01-39.771-9.818-76.454-29.414-110.049z\"\n />\n </svg>\n ),\n notion: () => (\n <svg\n width=\"100\"\n height=\"100\"\n viewBox=\"0 0 100 100\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M6.017 4.313l55.333 -4.087c6.797 -0.583 8.543 -0.19 12.817 2.917l17.663 12.443c2.913 2.14 3.883 2.723 3.883 5.053v68.243c0 4.277 -1.553 6.807 -6.99 7.193L24.467 99.967c-4.08 0.193 -6.023 -0.39 -8.16 -3.113L3.3 79.94c-2.333 -3.113 -3.3 -5.443 -3.3 -8.167V11.113c0 -3.497 1.553 -6.413 6.017 -6.8z\"\n fill=\"#ffffff\"\n />\n <path\n d=\"M61.35 0.227l-55.333 4.087C1.553 4.7 0 7.617 0 11.113v60.66c0 2.723 0.967 5.053 3.3 8.167l13.007 16.913c2.137 2.723 4.08 3.307 8.16 3.113l64.257 -3.89c5.433 -0.387 6.99 -2.917 6.99 -7.193V20.64c0 -2.21 -0.873 -2.847 -3.443 -4.733L74.167 3.143c-4.273 -3.107 -6.02 -3.5 -12.817 -2.917zM25.92 19.523c-5.247 0.353 -6.437 0.433 -9.417 -1.99L8.927 11.507c-0.77 -0.78 -0.383 -1.753 1.557 -1.947l53.193 -3.887c4.467 -0.39 6.793 1.167 8.54 2.527l9.123 6.61c0.39 0.197 1.36 1.36 0.193 1.36l-54.933 3.307 -0.68 0.047zM19.803 88.3V30.367c0 -2.53 0.777 -3.697 3.103 -3.893L86 22.78c2.14 -0.193 3.107 1.167 3.107 3.693v57.547c0 2.53 -0.39 4.67 -3.883 4.863l-60.377 3.5c-3.493 0.193 -5.043 -0.97 -5.043 -4.083zm59.6 -54.827c0.387 1.75 0 3.5 -1.75 3.7l-2.91 0.577v42.773c-2.527 1.36 -4.853 2.137 -6.797 2.137 -3.107 0 -3.883 -0.973 -6.21 -3.887l-19.03 -29.94v28.967l6.02 1.363s0 3.5 -4.857 3.5l-13.39 0.777c-0.39 -0.78 0 -2.723 1.357 -3.11l3.497 -0.97v-38.3L30.48 40.667c-0.39 -1.75 0.58 -4.277 3.3 -4.473l14.367 -0.967 19.8 30.327v-26.83l-5.047 -0.58c-0.39 -2.143 1.163 -3.7 3.103 -3.89l13.4 -0.78z\"\n fill=\"#000000\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n />\n </svg>\n ),\n openai: () => (\n <svg\n width=\"100\"\n height=\"100\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"fill-black dark:fill-white\"\n >\n <path d=\"M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z\" />\n </svg>\n ),\n googleDrive: () => (\n <svg\n width=\"100\"\n height=\"100\"\n viewBox=\"0 0 87.3 78\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"m6.6 66.85 3.85 6.65c.8 1.4 1.95 2.5 3.3 3.3l13.75-23.8h-27.5c0 1.55.4 3.1 1.2 4.5z\"\n fill=\"#0066da\"\n />\n <path\n d=\"m43.65 25-13.75-23.8c-1.35.8-2.5 1.9-3.3 3.3l-25.4 44a9.06 9.06 0 0 0 -1.2 4.5h27.5z\"\n fill=\"#00ac47\"\n />\n <path\n d=\"m73.55 76.8c1.35-.8 2.5-1.9 3.3-3.3l1.6-2.75 7.65-13.25c.8-1.4 1.2-2.95 1.2-4.5h-27.502l5.852 11.5z\"\n fill=\"#ea4335\"\n />\n <path\n d=\"m43.65 25 13.75-23.8c-1.35-.8-2.9-1.2-4.5-1.2h-18.5c-1.6 0-3.15.45-4.5 1.2z\"\n fill=\"#00832d\"\n />\n <path\n d=\"m59.8 53h-32.3l-13.75 23.8c1.35.8 2.9 1.2 4.5 1.2h50.8c1.6 0 3.15-.45 4.5-1.2z\"\n fill=\"#2684fc\"\n />\n <path\n d=\"m73.4 26.5-12.7-22c-.8-1.4-1.95-2.5-3.3-3.3l-13.75 23.8 16.15 28h27.45c0-1.55-.4-3.1-1.2-4.5z\"\n fill=\"#ffba00\"\n />\n </svg>\n ),\n whatsapp: () => (\n <svg\n width=\"100\"\n height=\"100\"\n viewBox=\"0 0 175.216 175.552\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <defs>\n <linearGradient\n id=\"b\"\n x1=\"85.915\"\n x2=\"86.535\"\n y1=\"32.567\"\n y2=\"137.092\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop offset=\"0\" stopColor=\"#57d163\" />\n <stop offset=\"1\" stopColor=\"#23b33a\" />\n </linearGradient>\n <filter\n id=\"a\"\n width=\"1.115\"\n height=\"1.114\"\n x=\"-.057\"\n y=\"-.057\"\n colorInterpolationFilters=\"sRGB\"\n >\n <feGaussianBlur stdDeviation=\"3.531\" />\n </filter>\n </defs>\n <path\n d=\"m54.532 138.45 2.235 1.324c9.387 5.571 20.15 8.518 31.126 8.523h.023c33.707 0 61.139-27.426 61.153-61.135.006-16.335-6.349-31.696-17.895-43.251A60.75 60.75 0 0 0 87.94 25.983c-33.733 0-61.166 27.423-61.178 61.13a60.98 60.98 0 0 0 9.349 32.535l1.455 2.312-6.179 22.558zm-40.811 23.544L24.16 123.88c-6.438-11.154-9.825-23.808-9.821-36.772.017-40.556 33.021-73.55 73.578-73.55 19.681.01 38.154 7.669 52.047 21.572s21.537 32.383 21.53 52.037c-.018 40.553-33.027 73.553-73.578 73.553h-.032c-12.313-.005-24.412-3.094-35.159-8.954zm0 0\"\n fill=\"#b3b3b3\"\n filter=\"url(#a)\"\n />\n <path\n d=\"m12.966 161.238 10.439-38.114a73.42 73.42 0 0 1-9.821-36.772c.017-40.556 33.021-73.55 73.578-73.55 19.681.01 38.154 7.669 52.047 21.572s21.537 32.383 21.53 52.037c-.018 40.553-33.027 73.553-73.578 73.553h-.032c-12.313-.005-24.412-3.094-35.159-8.954z\"\n fill=\"#ffffff\"\n />\n <path\n d=\"M87.184 25.227c-33.733 0-61.166 27.423-61.178 61.13a60.98 60.98 0 0 0 9.349 32.535l1.455 2.312-6.179 22.559 23.146-6.069 2.235 1.324c9.387 5.571 20.15 8.518 31.126 8.524h.023c33.707 0 61.14-27.426 61.153-61.135a60.75 60.75 0 0 0-17.895-43.251 60.75 60.75 0 0 0-43.235-17.929z\"\n fill=\"url(#linearGradient1780)\"\n />\n <path\n d=\"M87.184 25.227c-33.733 0-61.166 27.423-61.178 61.13a60.98 60.98 0 0 0 9.349 32.535l1.455 2.313-6.179 22.558 23.146-6.069 2.235 1.324c9.387 5.571 20.15 8.517 31.126 8.523h.023c33.707 0 61.14-27.426 61.153-61.135a60.75 60.75 0 0 0-17.895-43.251 60.75 60.75 0 0 0-43.235-17.928z\"\n fill=\"url(#b)\"\n />\n <path\n d=\"M68.772 55.603c-1.378-3.061-2.828-3.123-4.137-3.176l-3.524-.043c-1.226 0-3.218.46-4.902 2.3s-6.435 6.287-6.435 15.332 6.588 17.785 7.506 19.013 12.718 20.381 31.405 27.75c15.529 6.124 18.689 4.906 22.061 4.6s10.877-4.447 12.408-8.74 1.532-7.971 1.073-8.74-1.685-1.226-3.525-2.146-10.877-5.367-12.562-5.981-2.91-.919-4.137.921-4.746 5.979-5.819 7.206-2.144 1.381-3.984.462-7.76-2.861-14.784-9.124c-5.465-4.873-9.154-10.891-10.228-12.73s-.114-2.835.808-3.751c.825-.824 1.838-2.147 2.759-3.22s1.224-1.84 1.836-3.065.307-2.301-.153-3.22-4.032-10.011-5.666-13.647\"\n fill=\"#ffffff\"\n fillRule=\"evenodd\"\n />\n </svg>\n ),\n};\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/orbiting-circles.json b/public/r/orbiting-circles.jsonindex 6ca6fb56..1b539828 100644--- a/public/r/orbiting-circles.json+++ b/public/r/orbiting-circles.json@@ -8,7 +8,8 @@{"path": "registry/magicui/orbiting-circles.tsx","content": "import { cn } from \"@/lib/utils\";\nimport React from \"react\";\n\nexport interface OrbitingCirclesProps\n extends React.HTMLAttributes<HTMLDivElement> {\n className?: string;\n children?: React.ReactNode;\n reverse?: boolean;\n duration?: number;\n delay?: number;\n radius?: number;\n path?: boolean;\n iconSize?: number;\n speed?: number;\n}\n\nexport function OrbitingCircles({\n className,\n children,\n reverse,\n duration = 20,\n radius = 160,\n path = true,\n iconSize = 30,\n speed = 1,\n ...props\n}: OrbitingCirclesProps) {\n const calculatedDuration = duration / speed;\n return (\n <>\n {path && (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n version=\"1.1\"\n className=\"pointer-events-none absolute inset-0 size-full\"\n >\n <circle\n className=\"stroke-black/10 stroke-1 dark:stroke-white/10\"\n cx=\"50%\"\n cy=\"50%\"\n r={radius}\n fill=\"none\"\n />\n </svg>\n )}\n {React.Children.map(children, (child, index) => {\n const angle = (360 / React.Children.count(children)) * index;\n return (\n <div\n style={\n {\n \"--duration\": calculatedDuration,\n \"--radius\": radius,\n \"--angle\": angle,\n \"--icon-size\": `${iconSize}px`,\n } as React.CSSProperties\n }\n className={cn(\n `absolute flex size-[var(--icon-size)] transform-gpu animate-orbit items-center justify-center rounded-full`,\n { \"[animation-direction:reverse]\": reverse },\n className,\n )}\n {...props}\n >\n {child}\n </div>\n );\n })}\n </>\n );\n}\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}],"tailwind": {diff --git a/public/r/particles-demo.json b/public/r/particles-demo.jsonindex 68c335c9..328832d9 100644--- a/public/r/particles-demo.json+++ b/public/r/particles-demo.json@@ -14,7 +14,8 @@{"path": "registry/example/particles-demo.tsx","content": "\"use client\";\n\nimport { useTheme } from \"next-themes\";\nimport { useEffect, useState } from \"react\";\n\nimport { Particles } from \"@/registry/magicui/particles\";\n\nexport default function ParticlesDemo() {\n const { resolvedTheme } = useTheme();\n const [color, setColor] = useState(\"#ffffff\");\n\n useEffect(() => {\n setColor(resolvedTheme === \"dark\" ? \"#ffffff\" : \"#000000\");\n }, [resolvedTheme]);\n\n return (\n <div className=\"relative flex h-[500px] w-full flex-col items-center justify-center overflow-hidden rounded-lg border bg-background md:shadow-xl\">\n <span className=\"pointer-events-none z-10 whitespace-pre-wrap text-center text-8xl font-semibold leading-none\">\n Particles\n </span>\n <Particles\n className=\"absolute inset-0 z-0\"\n quantity={100}\n ease={80}\n color={color}\n refresh\n />\n </div>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/particles.json b/public/r/particles.jsonindex 0ee51c0a..2ee119b1 100644--- a/public/r/particles.json+++ b/public/r/particles.json@@ -8,7 +8,8 @@{"path": "registry/magicui/particles.tsx","content": "\"use client\";\n\nimport { cn } from \"@/lib/utils\";\nimport React, {\n ComponentPropsWithoutRef,\n useEffect,\n useRef,\n useState,\n} from \"react\";\n\ninterface MousePosition {\n x: number;\n y: number;\n}\n\nfunction MousePosition(): MousePosition {\n const [mousePosition, setMousePosition] = useState<MousePosition>({\n x: 0,\n y: 0,\n });\n\n useEffect(() => {\n const handleMouseMove = (event: MouseEvent) => {\n setMousePosition({ x: event.clientX, y: event.clientY });\n };\n\n window.addEventListener(\"mousemove\", handleMouseMove);\n\n return () => {\n window.removeEventListener(\"mousemove\", handleMouseMove);\n };\n }, []);\n\n return mousePosition;\n}\n\ninterface ParticlesProps extends ComponentPropsWithoutRef<\"div\"> {\n className?: string;\n quantity?: number;\n staticity?: number;\n ease?: number;\n size?: number;\n refresh?: boolean;\n color?: string;\n vx?: number;\n vy?: number;\n}\n\nfunction hexToRgb(hex: string): number[] {\n hex = hex.replace(\"#\", \"\");\n\n if (hex.length === 3) {\n hex = hex\n .split(\"\")\n .map((char) => char + char)\n .join(\"\");\n }\n\n const hexInt = parseInt(hex, 16);\n const red = (hexInt >> 16) & 255;\n const green = (hexInt >> 8) & 255;\n const blue = hexInt & 255;\n return [red, green, blue];\n}\n\ntype Circle = {\n x: number;\n y: number;\n translateX: number;\n translateY: number;\n size: number;\n alpha: number;\n targetAlpha: number;\n dx: number;\n dy: number;\n magnetism: number;\n};\n\nexport const Particles: React.FC<ParticlesProps> = ({\n className = \"\",\n quantity = 100,\n staticity = 50,\n ease = 50,\n size = 0.4,\n refresh = false,\n color = \"#ffffff\",\n vx = 0,\n vy = 0,\n ...props\n}) => {\n const canvasRef = useRef<HTMLCanvasElement>(null);\n const canvasContainerRef = useRef<HTMLDivElement>(null);\n const context = useRef<CanvasRenderingContext2D | null>(null);\n const circles = useRef<Circle[]>([]);\n const mousePosition = MousePosition();\n const mouse = useRef<{ x: number; y: number }>({ x: 0, y: 0 });\n const canvasSize = useRef<{ w: number; h: number }>({ w: 0, h: 0 });\n const dpr = typeof window !== \"undefined\" ? window.devicePixelRatio : 1;\n const rafID = useRef<number | null>(null);\n const resizeTimeout = useRef<NodeJS.Timeout>();\n\n useEffect(() => {\n if (canvasRef.current) {\n context.current = canvasRef.current.getContext(\"2d\");\n }\n initCanvas();\n animate();\n\n const handleResize = () => {\n if (resizeTimeout.current) {\n clearTimeout(resizeTimeout.current);\n }\n resizeTimeout.current = setTimeout(() => {\n initCanvas();\n }, 200);\n };\n\n window.addEventListener(\"resize\", handleResize);\n\n return () => {\n if (rafID.current != null) {\n window.cancelAnimationFrame(rafID.current);\n }\n if (resizeTimeout.current) {\n clearTimeout(resizeTimeout.current);\n }\n window.removeEventListener(\"resize\", handleResize);\n };\n }, [color]);\n\n useEffect(() => {\n onMouseMove();\n }, [mousePosition.x, mousePosition.y]);\n\n useEffect(() => {\n initCanvas();\n }, [refresh]);\n\n const initCanvas = () => {\n resizeCanvas();\n drawParticles();\n };\n\n const onMouseMove = () => {\n if (canvasRef.current) {\n const rect = canvasRef.current.getBoundingClientRect();\n const { w, h } = canvasSize.current;\n const x = mousePosition.x - rect.left - w / 2;\n const y = mousePosition.y - rect.top - h / 2;\n const inside = x < w / 2 && x > -w / 2 && y < h / 2 && y > -h / 2;\n if (inside) {\n mouse.current.x = x;\n mouse.current.y = y;\n }\n }\n };\n\n const resizeCanvas = () => {\n if (canvasContainerRef.current && canvasRef.current && context.current) {\n canvasSize.current.w = canvasContainerRef.current.offsetWidth;\n canvasSize.current.h = canvasContainerRef.current.offsetHeight;\n\n canvasRef.current.width = canvasSize.current.w * dpr;\n canvasRef.current.height = canvasSize.current.h * dpr;\n canvasRef.current.style.width = `${canvasSize.current.w}px`;\n canvasRef.current.style.height = `${canvasSize.current.h}px`;\n context.current.scale(dpr, dpr);\n\n // Clear existing particles and create new ones with exact quantity\n circles.current = [];\n for (let i = 0; i < quantity; i++) {\n const circle = circleParams();\n drawCircle(circle);\n }\n }\n };\n\n const circleParams = (): Circle => {\n const x = Math.floor(Math.random() * canvasSize.current.w);\n const y = Math.floor(Math.random() * canvasSize.current.h);\n const translateX = 0;\n const translateY = 0;\n const pSize = Math.floor(Math.random() * 2) + size;\n const alpha = 0;\n const targetAlpha = parseFloat((Math.random() * 0.6 + 0.1).toFixed(1));\n const dx = (Math.random() - 0.5) * 0.1;\n const dy = (Math.random() - 0.5) * 0.1;\n const magnetism = 0.1 + Math.random() * 4;\n return {\n x,\n y,\n translateX,\n translateY,\n size: pSize,\n alpha,\n targetAlpha,\n dx,\n dy,\n magnetism,\n };\n };\n\n const rgb = hexToRgb(color);\n\n const drawCircle = (circle: Circle, update = false) => {\n if (context.current) {\n const { x, y, translateX, translateY, size, alpha } = circle;\n context.current.translate(translateX, translateY);\n context.current.beginPath();\n context.current.arc(x, y, size, 0, 2 * Math.PI);\n context.current.fillStyle = `rgba(${rgb.join(\", \")}, ${alpha})`;\n context.current.fill();\n context.current.setTransform(dpr, 0, 0, dpr, 0, 0);\n\n if (!update) {\n circles.current.push(circle);\n }\n }\n };\n\n const clearContext = () => {\n if (context.current) {\n context.current.clearRect(\n 0,\n 0,\n canvasSize.current.w,\n canvasSize.current.h,\n );\n }\n };\n\n const drawParticles = () => {\n clearContext();\n const particleCount = quantity;\n for (let i = 0; i < particleCount; i++) {\n const circle = circleParams();\n drawCircle(circle);\n }\n };\n\n const remapValue = (\n value: number,\n start1: number,\n end1: number,\n start2: number,\n end2: number,\n ): number => {\n const remapped =\n ((value - start1) * (end2 - start2)) / (end1 - start1) + start2;\n return remapped > 0 ? remapped : 0;\n };\n\n const animate = () => {\n clearContext();\n circles.current.forEach((circle: Circle, i: number) => {\n // Handle the alpha value\n const edge = [\n circle.x + circle.translateX - circle.size, // distance from left edge\n canvasSize.current.w - circle.x - circle.translateX - circle.size, // distance from right edge\n circle.y + circle.translateY - circle.size, // distance from top edge\n canvasSize.current.h - circle.y - circle.translateY - circle.size, // distance from bottom edge\n ];\n const closestEdge = edge.reduce((a, b) => Math.min(a, b));\n const remapClosestEdge = parseFloat(\n remapValue(closestEdge, 0, 20, 0, 1).toFixed(2),\n );\n if (remapClosestEdge > 1) {\n circle.alpha += 0.02;\n if (circle.alpha > circle.targetAlpha) {\n circle.alpha = circle.targetAlpha;\n }\n } else {\n circle.alpha = circle.targetAlpha * remapClosestEdge;\n }\n circle.x += circle.dx + vx;\n circle.y += circle.dy + vy;\n circle.translateX +=\n (mouse.current.x / (staticity / circle.magnetism) - circle.translateX) /\n ease;\n circle.translateY +=\n (mouse.current.y / (staticity / circle.magnetism) - circle.translateY) /\n ease;\n\n drawCircle(circle, true);\n\n // circle gets out of the canvas\n if (\n circle.x < -circle.size ||\n circle.x > canvasSize.current.w + circle.size ||\n circle.y < -circle.size ||\n circle.y > canvasSize.current.h + circle.size\n ) {\n // remove the circle from the array\n circles.current.splice(i, 1);\n // create a new circle\n const newCircle = circleParams();\n drawCircle(newCircle);\n }\n });\n rafID.current = window.requestAnimationFrame(animate);\n };\n\n return (\n <div\n className={cn(\"pointer-events-none\", className)}\n ref={canvasContainerRef}\n aria-hidden=\"true\"\n {...props}\n >\n <canvas ref={canvasRef} className=\"size-full\" />\n </div>\n );\n};\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/pulsating-button-demo.json b/public/r/pulsating-button-demo.jsonindex e125dfee..88cd95d9 100644--- a/public/r/pulsating-button-demo.json+++ b/public/r/pulsating-button-demo.json@@ -11,7 +11,8 @@{"path": "registry/example/pulsating-button-demo.tsx","content": "import { PulsatingButton } from \"@/registry/magicui/pulsating-button\";\n\nexport default function PulsatingButtonDemo() {\n return <PulsatingButton>Join Affiliate Program</PulsatingButton>;\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/pulsating-button.json b/public/r/pulsating-button.jsonindex 04629175..cc3f6de8 100644--- a/public/r/pulsating-button.json+++ b/public/r/pulsating-button.json@@ -8,7 +8,8 @@{"path": "registry/magicui/pulsating-button.tsx","content": "import React from \"react\";\nimport { cn } from \"@/lib/utils\";\n\ninterface PulsatingButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n pulseColor?: string;\n duration?: string;\n}\n\nexport const PulsatingButton = React.forwardRef<\n HTMLButtonElement,\n PulsatingButtonProps\n>(\n (\n {\n className,\n children,\n pulseColor = \"#0096ff\",\n duration = \"1.5s\",\n ...props\n },\n ref,\n ) => {\n return (\n <button\n ref={ref}\n className={cn(\n \"relative flex cursor-pointer items-center justify-center rounded-lg bg-primary px-4 py-2 text-center text-primary-foreground\",\n className,\n )}\n style={\n {\n \"--pulse-color\": pulseColor,\n \"--duration\": duration,\n } as React.CSSProperties\n }\n {...props}\n >\n <div className=\"relative z-10\">{children}</div>\n <div className=\"absolute left-1/2 top-1/2 size-full -translate-x-1/2 -translate-y-1/2 animate-pulse rounded-lg bg-inherit\" />\n </button>\n );\n },\n);\n\nPulsatingButton.displayName = \"PulsatingButton\";\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}],"tailwind": {diff --git a/public/r/rainbow-button-demo.json b/public/r/rainbow-button-demo.jsonindex 3428b69e..b30ad2cb 100644--- a/public/r/rainbow-button-demo.json+++ b/public/r/rainbow-button-demo.json@@ -11,7 +11,8 @@{"path": "registry/example/rainbow-button-demo.tsx","content": "import { RainbowButton } from \"@/registry/magicui/rainbow-button\";\n\nexport default function RainbowButtonDemo() {\n return <RainbowButton>Get Unlimited Access</RainbowButton>;\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/rainbow-button.json b/public/r/rainbow-button.jsonindex a7deb99f..8a81cba7 100644--- a/public/r/rainbow-button.json+++ b/public/r/rainbow-button.json@@ -8,7 +8,8 @@{"path": "registry/magicui/rainbow-button.tsx","content": "import React from \"react\";\nimport { cn } from \"@/lib/utils\";\n\ninterface RainbowButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement> {}\n\nexport const RainbowButton = React.forwardRef<\n HTMLButtonElement,\n RainbowButtonProps\n>(({ children, className, ...props }, ref) => {\n return (\n <button\n ref={ref}\n className={cn(\n \"group relative inline-flex h-11 animate-rainbow cursor-pointer items-center justify-center rounded-xl border-0 bg-[length:200%] px-8 py-2 font-medium text-primary-foreground transition-colors [background-clip:padding-box,border-box,border-box] [background-origin:border-box] [border:calc(0.08*1rem)_solid_transparent] focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50\",\n // before styles\n \"before:absolute before:bottom-[-20%] before:left-1/2 before:z-0 before:h-1/5 before:w-3/5 before:-translate-x-1/2 before:animate-rainbow before:bg-[linear-gradient(90deg,hsl(var(--color-1)),hsl(var(--color-5)),hsl(var(--color-3)),hsl(var(--color-4)),hsl(var(--color-2)))] before:[filter:blur(calc(0.8*1rem))]\",\n // light mode colors\n \"bg-[linear-gradient(#121213,#121213),linear-gradient(#121213_50%,rgba(18,18,19,0.6)_80%,rgba(18,18,19,0)),linear-gradient(90deg,hsl(var(--color-1)),hsl(var(--color-5)),hsl(var(--color-3)),hsl(var(--color-4)),hsl(var(--color-2)))]\",\n // dark mode colors\n \"dark:bg-[linear-gradient(#fff,#fff),linear-gradient(#fff_50%,rgba(255,255,255,0.6)_80%,rgba(0,0,0,0)),linear-gradient(90deg,hsl(var(--color-1)),hsl(var(--color-5)),hsl(var(--color-3)),hsl(var(--color-4)),hsl(var(--color-2)))]\",\n className,\n )}\n {...props}\n >\n {children}\n </button>\n );\n});\n\nRainbowButton.displayName = \"RainbowButton\";\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}],"tailwind": {diff --git a/public/r/retro-grid-demo.json b/public/r/retro-grid-demo.jsonindex 8c8a5350..62a872d8 100644--- a/public/r/retro-grid-demo.json+++ b/public/r/retro-grid-demo.json@@ -11,7 +11,8 @@{"path": "registry/example/retro-grid-demo.tsx","content": "\"use client\";\n\nimport { RetroGrid } from \"@/registry/magicui/retro-grid\";\n\nexport default function RetroGridDemo() {\n return (\n <div className=\"relative flex h-[500px] w-full flex-col items-center justify-center overflow-hidden rounded-lg border bg-background md:shadow-xl\">\n <span className=\"pointer-events-none z-10 whitespace-pre-wrap bg-gradient-to-b from-[#ffd319] via-[#ff2975] to-[#8c1eff] bg-clip-text text-center text-7xl font-bold leading-none tracking-tighter text-transparent\">\n Retro Grid\n </span>\n\n <RetroGrid />\n </div>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/retro-grid.json b/public/r/retro-grid.jsonindex c4351e89..55ca7544 100644--- a/public/r/retro-grid.json+++ b/public/r/retro-grid.json@@ -8,7 +8,8 @@{"path": "registry/magicui/retro-grid.tsx","content": "import { cn } from \"@/lib/utils\";\n\ninterface RetroGridProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * Additional CSS classes to apply to the grid container\n */\n className?: string;\n /**\n * Rotation angle of the grid in degrees\n * @default 65\n */\n angle?: number;\n /**\n * Grid cell size in pixels\n * @default 60\n */\n cellSize?: number;\n /**\n * Grid opacity value between 0 and 1\n * @default 0.5\n */\n opacity?: number;\n /**\n * Grid line color in light mode\n * @default \"gray\"\n */\n lightLineColor?: string;\n /**\n * Grid line color in dark mode\n * @default \"gray\"\n */\n darkLineColor?: string;\n}\n\nexport function RetroGrid({\n className,\n angle = 65,\n cellSize = 60,\n opacity = 0.5,\n lightLineColor = \"gray\",\n darkLineColor = \"gray\",\n ...props\n}: RetroGridProps) {\n const gridStyles = {\n \"--grid-angle\": `${angle}deg`,\n \"--cell-size\": `${cellSize}px`,\n \"--opacity\": opacity,\n \"--light-line\": lightLineColor,\n \"--dark-line\": darkLineColor,\n } as React.CSSProperties;\n\n return (\n <div\n className={cn(\n \"pointer-events-none absolute size-full overflow-hidden [perspective:200px]\",\n `opacity-[var(--opacity)]`,\n className,\n )}\n style={gridStyles}\n {...props}\n >\n <div className=\"absolute inset-0 [transform:rotateX(var(--grid-angle))]\">\n <div className=\"animate-grid [background-image:linear-gradient(to_right,var(--light-line)_1px,transparent_0),linear-gradient(to_bottom,var(--light-line)_1px,transparent_0)] [background-repeat:repeat] [background-size:var(--cell-size)_var(--cell-size)] [height:300vh] [inset:0%_0px] [margin-left:-200%] [transform-origin:100%_0_0] [width:600vw] dark:[background-image:linear-gradient(to_right,var(--dark-line)_1px,transparent_0),linear-gradient(to_bottom,var(--dark-line)_1px,transparent_0)]\" />\n </div>\n\n <div className=\"absolute inset-0 bg-gradient-to-t from-white to-transparent to-90% dark:from-black\" />\n </div>\n );\n}\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}],"tailwind": {diff --git a/public/r/ripple-button-demo.json b/public/r/ripple-button-demo.jsonindex 9117a03b..2b4860ba 100644--- a/public/r/ripple-button-demo.json+++ b/public/r/ripple-button-demo.json@@ -11,7 +11,8 @@{"path": "registry/example/ripple-button-demo.tsx","content": "import { RippleButton } from \"@/registry/magicui/ripple-button\";\n\nexport default function RippleButtonDemo() {\n return <RippleButton rippleColor=\"#ADD8E6\">Click me</RippleButton>;\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/ripple-button.json b/public/r/ripple-button.jsonindex b47135e4..c811bec0 100644--- a/public/r/ripple-button.json+++ b/public/r/ripple-button.json@@ -8,7 +8,8 @@{"path": "registry/magicui/ripple-button.tsx","content": "\"use client\";\n\nimport { cn } from \"@/lib/utils\";\nimport React, { MouseEvent, useEffect, useState } from \"react\";\n\ninterface RippleButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n rippleColor?: string;\n duration?: string;\n}\n\nexport const RippleButton = React.forwardRef<\n HTMLButtonElement,\n RippleButtonProps\n>(\n (\n {\n className,\n children,\n rippleColor = \"#ffffff\",\n duration = \"600ms\",\n onClick,\n ...props\n },\n ref,\n ) => {\n const [buttonRipples, setButtonRipples] = useState<\n Array<{ x: number; y: number; size: number; key: number }>\n >([]);\n\n const handleClick = (event: MouseEvent<HTMLButtonElement>) => {\n createRipple(event);\n onClick?.(event);\n };\n\n const createRipple = (event: MouseEvent<HTMLButtonElement>) => {\n const button = event.currentTarget;\n const rect = button.getBoundingClientRect();\n const size = Math.max(rect.width, rect.height);\n const x = event.clientX - rect.left - size / 2;\n const y = event.clientY - rect.top - size / 2;\n\n const newRipple = { x, y, size, key: Date.now() };\n setButtonRipples((prevRipples) => [...prevRipples, newRipple]);\n };\n\n useEffect(() => {\n if (buttonRipples.length > 0) {\n const lastRipple = buttonRipples[buttonRipples.length - 1];\n const timeout = setTimeout(() => {\n setButtonRipples((prevRipples) =>\n prevRipples.filter((ripple) => ripple.key !== lastRipple.key),\n );\n }, parseInt(duration));\n return () => clearTimeout(timeout);\n }\n }, [buttonRipples, duration]);\n\n return (\n <button\n className={cn(\n \"relative flex cursor-pointer items-center justify-center overflow-hidden rounded-lg border-2 bg-background px-4 py-2 text-center text-primary\",\n className,\n )}\n onClick={handleClick}\n ref={ref}\n {...props}\n >\n <div className=\"relative z-10\">{children}</div>\n <span className=\"pointer-events-none absolute inset-0\">\n {buttonRipples.map((ripple) => (\n <span\n className=\"absolute animate-rippling rounded-full bg-background opacity-30\"\n key={ripple.key}\n style={{\n width: `${ripple.size}px`,\n height: `${ripple.size}px`,\n top: `${ripple.y}px`,\n left: `${ripple.x}px`,\n backgroundColor: rippleColor,\n transform: `scale(0)`,\n }}\n />\n ))}\n </span>\n </button>\n );\n },\n);\n\nRippleButton.displayName = \"RippleButton\";\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}],"tailwind": {diff --git a/public/r/ripple-demo.json b/public/r/ripple-demo.jsonindex 1ecb5d84..1e14092e 100644--- a/public/r/ripple-demo.json+++ b/public/r/ripple-demo.json@@ -11,7 +11,8 @@{"path": "registry/example/ripple-demo.tsx","content": "import { Ripple } from \"@/registry/magicui/ripple\";\n\nexport default function RippleDemo() {\n return (\n <div className=\"relative flex h-[500px] w-full flex-col items-center justify-center overflow-hidden rounded-lg border bg-background md:shadow-xl\">\n <p className=\"z-10 whitespace-pre-wrap text-center text-5xl font-medium tracking-tighter text-white\">\n Ripple\n </p>\n <Ripple />\n </div>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/ripple.json b/public/r/ripple.jsonindex 780f29a3..900fc80d 100644--- a/public/r/ripple.json+++ b/public/r/ripple.json@@ -8,7 +8,8 @@{"path": "registry/magicui/ripple.tsx","content": "import React, { ComponentPropsWithoutRef, CSSProperties } from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\ninterface RippleProps extends ComponentPropsWithoutRef<\"div\"> {\n mainCircleSize?: number;\n mainCircleOpacity?: number;\n numCircles?: number;\n}\n\nexport const Ripple = React.memo(function Ripple({\n mainCircleSize = 210,\n mainCircleOpacity = 0.24,\n numCircles = 8,\n className,\n ...props\n}: RippleProps) {\n return (\n <div\n className={cn(\n \"pointer-events-none absolute inset-0 select-none [mask-image:linear-gradient(to_bottom,white,transparent)]\",\n className,\n )}\n {...props}\n >\n {Array.from({ length: numCircles }, (_, i) => {\n const size = mainCircleSize + i * 70;\n const opacity = mainCircleOpacity - i * 0.03;\n const animationDelay = `${i * 0.06}s`;\n const borderStyle = i === numCircles - 1 ? \"dashed\" : \"solid\";\n const borderOpacity = 5 + i * 5;\n\n return (\n <div\n key={i}\n className={`[--i: absolute animate-ripple rounded-full border bg-foreground/25 shadow-xl${i}]`}\n style={\n {\n width: `${size}px`,\n height: `${size}px`,\n opacity,\n animationDelay,\n borderStyle,\n borderWidth: \"1px\",\n borderColor: `hsl(var(--foreground), ${borderOpacity / 100})`,\n top: \"50%\",\n left: \"50%\",\n transform: \"translate(-50%, -50%) scale(1)\",\n } as CSSProperties\n }\n />\n );\n })}\n </div>\n );\n});\n\nRipple.displayName = \"Ripple\";\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}],"tailwind": {diff --git a/public/r/safari-demo-2.json b/public/r/safari-demo-2.jsonindex 82813ace..48e4ce49 100644--- a/public/r/safari-demo-2.json+++ b/public/r/safari-demo-2.json@@ -11,7 +11,8 @@{"path": "registry/example/safari-demo-2.tsx","content": "import { Safari } from \"@/registry/magicui/safari\";\n\nexport default function SafariDemo() {\n return (\n <div className=\"relative\">\n <Safari\n url=\"magicui.design\"\n className=\"size-full\"\n imageSrc=\"https://via.placeholder.com/1200x750\"\n />\n </div>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/safari-demo-3.json b/public/r/safari-demo-3.jsonindex 2f06d834..cd767811 100644--- a/public/r/safari-demo-3.json+++ b/public/r/safari-demo-3.json@@ -11,7 +11,8 @@{"path": "registry/example/safari-demo-3.tsx","content": "import { Safari } from \"@/registry/magicui/safari\";\n\nexport default function SafariDemo() {\n return (\n <div className=\"relative\">\n <Safari\n url=\"magicui.design\"\n className=\"size-full\"\n videoSrc=\"https://videos.pexels.com/video-files/27180348/12091515_2560_1440_50fps.mp4\"\n />\n </div>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/safari-demo-4.json b/public/r/safari-demo-4.jsonindex 52ed3b88..6734fcf9 100644--- a/public/r/safari-demo-4.json+++ b/public/r/safari-demo-4.json@@ -11,7 +11,8 @@{"path": "registry/example/safari-demo-4.tsx","content": "import { Safari } from \"@/registry/magicui/safari\";\n\nexport default function SafariDemo() {\n return (\n <div className=\"relative\">\n <Safari url=\"magicui.design\" mode=\"simple\" className=\"size-full\" />\n </div>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/safari-demo.json b/public/r/safari-demo.jsonindex 2ed8abe6..57dd86ce 100644--- a/public/r/safari-demo.json+++ b/public/r/safari-demo.json@@ -11,7 +11,8 @@{"path": "registry/example/safari-demo.tsx","content": "import { Safari } from \"@/registry/magicui/safari\";\n\nexport default function SafariDemo() {\n return (\n <div className=\"relative\">\n <Safari url=\"magicui.design\" className=\"size-full\" />\n </div>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/safari.json b/public/r/safari.jsonindex 90427bba..8ca4fa1b 100644--- a/public/r/safari.json+++ b/public/r/safari.json@@ -8,7 +8,8 @@{"path": "registry/magicui/safari.tsx","content": "import { SVGProps } from \"react\";\n\ntype SafariMode = \"default\" | \"simple\";\n\nexport interface SafariProps extends SVGProps<SVGSVGElement> {\n url?: string;\n imageSrc?: string;\n videoSrc?: string;\n width?: number;\n height?: number;\n mode?: SafariMode;\n}\n\nexport function Safari({\n imageSrc,\n videoSrc,\n url,\n width = 1203,\n height = 753,\n mode = \"default\",\n ...props\n}: SafariProps) {\n return (\n <svg\n width={width}\n height={height}\n viewBox={`0 0 ${width} ${height}`}\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <g clipPath=\"url(#path0)\">\n <path\n d=\"M0 52H1202V741C1202 747.627 1196.63 753 1190 753H12C5.37258 753 0 747.627 0 741V52Z\"\n className=\"fill-[#E5E5E5] dark:fill-[#404040]\"\n />\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M0 12C0 5.37258 5.37258 0 12 0H1190C1196.63 0 1202 5.37258 1202 12V52H0L0 12Z\"\n className=\"fill-[#E5E5E5] dark:fill-[#404040]\"\n />\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M1.06738 12C1.06738 5.92487 5.99225 1 12.0674 1H1189.93C1196.01 1 1200.93 5.92487 1200.93 12V51H1.06738V12Z\"\n className=\"fill-white dark:fill-[#262626]\"\n />\n <circle\n cx=\"27\"\n cy=\"25\"\n r=\"6\"\n className=\"fill-[#E5E5E5] dark:fill-[#404040]\"\n />\n <circle\n cx=\"47\"\n cy=\"25\"\n r=\"6\"\n className=\"fill-[#E5E5E5] dark:fill-[#404040]\"\n />\n <circle\n cx=\"67\"\n cy=\"25\"\n r=\"6\"\n className=\"fill-[#E5E5E5] dark:fill-[#404040]\"\n />\n <path\n d=\"M286 17C286 13.6863 288.686 11 292 11H946C949.314 11 952 13.6863 952 17V35C952 38.3137 949.314 41 946 41H292C288.686 41 286 38.3137 286 35V17Z\"\n className=\"fill-[#E5E5E5] dark:fill-[#404040]\"\n />\n <g className=\"mix-blend-luminosity\">\n <path\n d=\"M566.269 32.0852H572.426C573.277 32.0852 573.696 31.6663 573.696 30.7395V25.9851C573.696 25.1472 573.353 24.7219 572.642 24.6521V23.0842C572.642 20.6721 571.036 19.5105 569.348 19.5105C567.659 19.5105 566.053 20.6721 566.053 23.0842V24.6711C565.393 24.7727 565 25.1917 565 25.9851V30.7395C565 31.6663 565.418 32.0852 566.269 32.0852ZM567.272 22.97C567.272 21.491 568.211 20.6785 569.348 20.6785C570.478 20.6785 571.423 21.491 571.423 22.97V24.6394L567.272 24.6458V22.97Z\"\n fill=\"#A3A3A3\"\n />\n </g>\n <g className=\"mix-blend-luminosity\">\n <text\n x=\"580\"\n y=\"30\"\n fill=\"#A3A3A3\"\n fontSize=\"12\"\n fontFamily=\"Arial, sans-serif\"\n >\n {url}\n </text>\n </g>\n {mode === \"default\" ? (\n <>\n <g className=\"mix-blend-luminosity\">\n <path\n d=\"M265.5 33.8984C265.641 33.8984 265.852 33.8516 266.047 33.7422C270.547 31.2969 272.109 30.1641 272.109 27.3203V21.4219C272.109 20.4844 271.742 20.1484 270.961 19.8125C270.094 19.4453 267.18 18.4297 266.328 18.1406C266.07 18.0547 265.766 18 265.5 18C265.234 18 264.93 18.0703 264.672 18.1406C263.82 18.3828 260.906 19.4531 260.039 19.8125C259.258 20.1406 258.891 20.4844 258.891 21.4219V27.3203C258.891 30.1641 260.461 31.2812 264.945 33.7422C265.148 33.8516 265.359 33.8984 265.5 33.8984ZM265.922 19.5781C266.945 19.9766 269.172 20.7656 270.344 21.1875C270.562 21.2656 270.617 21.3828 270.617 21.6641V27.0234C270.617 29.3125 269.469 29.9375 265.945 32.0625C265.727 32.1875 265.617 32.2344 265.508 32.2344V19.4844C265.617 19.4844 265.734 19.5156 265.922 19.5781Z\"\n fill=\"#A3A3A3\"\n />\n </g>\n <g className=\"mix-blend-luminosity\">\n <path\n d=\"M936.273 24.9766C936.5 24.9766 936.68 24.9062 936.82 24.7578L940.023 21.5312C940.195 21.3594 940.273 21.1719 940.273 20.9531C940.273 20.7422 940.188 20.5391 940.023 20.3828L936.82 17.125C936.68 16.9688 936.5 16.8906 936.273 16.8906C935.852 16.8906 935.516 17.2422 935.516 17.6719C935.516 17.8828 935.594 18.0547 935.727 18.2031L937.594 20.0312C937.227 19.9766 936.852 19.9453 936.477 19.9453C932.609 19.9453 929.516 23.0391 929.516 26.9141C929.516 30.7891 932.633 33.9062 936.5 33.9062C940.375 33.9062 943.484 30.7891 943.484 26.9141C943.484 26.4453 943.156 26.1094 942.688 26.1094C942.234 26.1094 941.93 26.4453 941.93 26.9141C941.93 29.9297 939.516 32.3516 936.5 32.3516C933.492 32.3516 931.07 29.9297 931.07 26.9141C931.07 23.875 933.469 21.4688 936.477 21.4688C936.984 21.4688 937.453 21.5078 937.867 21.5781L935.734 23.6875C935.594 23.8281 935.516 24 935.516 24.2109C935.516 24.6406 935.852 24.9766 936.273 24.9766Z\"\n fill=\"#A3A3A3\"\n />\n </g>\n <g className=\"mix-blend-luminosity\">\n <path\n d=\"M1134 33.0156C1134.49 33.0156 1134.89 32.6094 1134.89 32.1484V27.2578H1139.66C1140.13 27.2578 1140.54 26.8594 1140.54 26.3672C1140.54 25.8828 1140.13 25.4766 1139.66 25.4766H1134.89V20.5859C1134.89 20.1172 1134.49 19.7188 1134 19.7188C1133.52 19.7188 1133.11 20.1172 1133.11 20.5859V25.4766H1128.34C1127.88 25.4766 1127.46 25.8828 1127.46 26.3672C1127.46 26.8594 1127.88 27.2578 1128.34 27.2578H1133.11V32.1484C1133.11 32.6094 1133.52 33.0156 1134 33.0156Z\"\n fill=\"#A3A3A3\"\n />\n </g>\n <g className=\"mix-blend-luminosity\">\n <path\n d=\"M1161.8 31.0703H1163.23V32.375C1163.23 34.0547 1164.12 34.9219 1165.81 34.9219H1174.2C1175.89 34.9219 1176.77 34.0547 1176.77 32.3828V24.0469C1176.77 22.375 1175.89 21.5 1174.2 21.5H1172.77V20.2578C1172.77 18.5859 1171.88 17.7109 1170.19 17.7109H1161.8C1160.1 17.7109 1159.23 18.5781 1159.23 20.2578V28.5234C1159.23 30.1953 1160.1 31.0703 1161.8 31.0703ZM1161.9 29.5078C1161.18 29.5078 1160.78 29.1328 1160.78 28.3828V20.3984C1160.78 19.6406 1161.18 19.2656 1161.9 19.2656H1170.09C1170.8 19.2656 1171.2 19.6406 1171.2 20.3984V21.5H1165.81C1164.12 21.5 1163.23 22.375 1163.23 24.0469V29.5078H1161.9ZM1165.91 33.3672C1165.19 33.3672 1164.8 32.9922 1164.8 32.2422V24.1875C1164.8 23.4297 1165.19 23.0625 1165.91 23.0625H1174.1C1174.81 23.0625 1175.21 23.4297 1175.21 24.1875V32.2422C1175.21 32.9922 1174.81 33.3672 1174.1 33.3672H1165.91Z\"\n fill=\"#A3A3A3\"\n />\n </g>\n <g className=\"mix-blend-luminosity\">\n <path\n d=\"M1099.51 28.4141C1099.91 28.4141 1100.24 28.0859 1100.24 27.6953V19.8359L1100.18 18.6797L1100.66 19.25L1101.75 20.4141C1101.88 20.5547 1102.06 20.625 1102.24 20.625C1102.6 20.625 1102.9 20.3672 1102.9 20C1102.9 19.8047 1102.82 19.6641 1102.69 19.5312L1100.06 17.0078C1099.88 16.8203 1099.7 16.7578 1099.51 16.7578C1099.32 16.7578 1099.14 16.8203 1098.95 17.0078L1096.33 19.5312C1096.2 19.6641 1096.12 19.8047 1096.12 20C1096.12 20.3672 1096.41 20.625 1096.77 20.625C1096.95 20.625 1097.14 20.5547 1097.27 20.4141L1098.35 19.25L1098.84 18.6719L1098.78 19.8359V27.6953C1098.78 28.0859 1099.11 28.4141 1099.51 28.4141ZM1095 34.6562H1104C1105.7 34.6562 1106.57 33.7812 1106.57 32.1094V24.4297C1106.57 22.7578 1105.7 21.8828 1104 21.8828H1101.89V23.4375H1103.9C1104.61 23.4375 1105.02 23.8125 1105.02 24.5625V31.9688C1105.02 32.7188 1104.61 33.0938 1103.9 33.0938H1095.1C1094.38 33.0938 1093.98 32.7188 1093.98 31.9688V24.5625C1093.98 23.8125 1094.38 23.4375 1095.1 23.4375H1097.13V21.8828H1095C1093.31 21.8828 1092.43 22.75 1092.43 24.4297V32.1094C1092.43 33.7812 1093.31 34.6562 1095 34.6562Z\"\n fill=\"#A3A3A3\"\n />\n </g>\n <g className=\"mix-blend-luminosity\">\n <path\n d=\"M99.5703 33.6016H112.938C114.633 33.6016 115.516 32.7266 115.516 31.0547V21.5469C115.516 19.875 114.633 19 112.938 19H99.5703C97.8828 19 97 19.8672 97 21.5469V31.0547C97 32.7266 97.8828 33.6016 99.5703 33.6016ZM99.6719 32.0469C98.9531 32.0469 98.5547 31.6719 98.5547 30.9141V21.6875C98.5547 20.9297 98.9531 20.5547 99.6719 20.5547H103.234V32.0469H99.6719ZM112.836 20.5547C113.555 20.5547 113.953 20.9297 113.953 21.6875V30.9141C113.953 31.6719 113.555 32.0469 112.836 32.0469H104.711V20.5547H112.836ZM101.703 23.4141C101.984 23.4141 102.219 23.1719 102.219 22.9062C102.219 22.6406 101.984 22.4062 101.703 22.4062H100.102C99.8203 22.4062 99.5859 22.6406 99.5859 22.9062C99.5859 23.1719 99.8203 23.4141 100.102 23.4141H101.703ZM101.703 25.5156C101.984 25.5156 102.219 25.2812 102.219 25.0078C102.219 24.7422 101.984 24.5078 101.703 24.5078H100.102C99.8203 24.5078 99.5859 24.7422 99.5859 25.0078C99.5859 25.2812 99.8203 25.5156 100.102 25.5156H101.703ZM101.703 27.6094C101.984 27.6094 102.219 27.3828 102.219 27.1094C102.219 26.8438 101.984 26.6172 101.703 26.6172H100.102C99.8203 26.6172 99.5859 26.8438 99.5859 27.1094C99.5859 27.3828 99.8203 27.6094 100.102 27.6094H101.703Z\"\n fill=\"#A3A3A3\"\n />\n </g>\n <g className=\"mix-blend-luminosity\">\n <path\n d=\"M143.914 32.5938C144.094 32.7656 144.312 32.8594 144.562 32.8594C145.086 32.8594 145.492 32.4531 145.492 31.9375C145.492 31.6797 145.391 31.4453 145.211 31.2656L139.742 25.9219L145.211 20.5938C145.391 20.4141 145.492 20.1719 145.492 19.9219C145.492 19.4062 145.086 19 144.562 19C144.312 19 144.094 19.0938 143.922 19.2656L137.844 25.2031C137.625 25.4062 137.516 25.6562 137.516 25.9297C137.516 26.2031 137.625 26.4375 137.836 26.6484L143.914 32.5938Z\"\n fill=\"#A3A3A3\"\n />\n </g>\n <g className=\"mix-blend-luminosity\">\n <path\n d=\"M168.422 32.8594C168.68 32.8594 168.891 32.7656 169.07 32.5938L175.148 26.6562C175.359 26.4375 175.469 26.2109 175.469 25.9297C175.469 25.6562 175.367 25.4141 175.148 25.2109L169.07 19.2656C168.891 19.0938 168.68 19 168.422 19C167.898 19 167.492 19.4062 167.492 19.9219C167.492 20.1719 167.602 20.4141 167.773 20.5938L173.25 25.9375L167.773 31.2656C167.594 31.4531 167.492 31.6797 167.492 31.9375C167.492 32.4531 167.898 32.8594 168.422 32.8594Z\"\n fill=\"#A3A3A3\"\n />\n </g>\n </>\n ) : null}\n {imageSrc && (\n <image\n href={imageSrc}\n width=\"1200\"\n height=\"700\"\n x=\"1\"\n y=\"52\"\n preserveAspectRatio=\"xMidYMid slice\"\n clipPath=\"url(#roundedBottom)\"\n />\n )}\n {videoSrc && (\n <foreignObject\n x=\"1\"\n y=\"52\"\n width=\"1200\"\n height=\"700\"\n preserveAspectRatio=\"xMidYMid slice\"\n clipPath=\"url(#roundedBottom)\"\n >\n <video\n className=\"size-full overflow-hidden object-cover\"\n src={videoSrc}\n autoPlay\n loop\n muted\n playsInline\n />\n </foreignObject>\n )}\n </g>\n <defs>\n <clipPath id=\"path0\">\n <rect width={width} height={height} fill=\"white\" />\n </clipPath>\n <clipPath id=\"roundedBottom\">\n <path\n d=\"M1 52H1201V741C1201 747.075 1196.08 752 1190 752H12C5.92486 752 1 747.075 1 741V52Z\"\n fill=\"white\"\n />\n </clipPath>\n </defs>\n </svg>\n );\n}\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/scratch-to-reveal-demo.json b/public/r/scratch-to-reveal-demo.jsonindex d080155a..39ce4cec 100644--- a/public/r/scratch-to-reveal-demo.json+++ b/public/r/scratch-to-reveal-demo.json@@ -11,7 +11,8 @@{"path": "registry/example/scratch-to-reveal-demo.tsx","content": "import { ScratchToReveal } from \"@/registry/magicui/scratch-to-reveal\";\n\nexport default function ScratchToRevealDemo() {\n return (\n <ScratchToReveal\n width={250}\n height={250}\n minScratchPercentage={70}\n className=\"flex items-center justify-center overflow-hidden rounded-2xl border-2 bg-gray-100\"\n gradientColors={[\"#A97CF8\", \"#F38CB8\", \"#FDCC92\"]}\n >\n <p className=\"text-9xl\">😎</p>\n </ScratchToReveal>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/scratch-to-reveal.json b/public/r/scratch-to-reveal.jsonindex 478d0bd8..817941af 100644--- a/public/r/scratch-to-reveal.json+++ b/public/r/scratch-to-reveal.json@@ -11,7 +11,8 @@{"path": "registry/magicui/scratch-to-reveal.tsx","content": "\"use client\";\n\nimport { cn } from \"@/lib/utils\";\nimport { motion, useAnimation } from \"motion/react\";\nimport React, { useEffect, useRef, useState } from \"react\";\n\ninterface ScratchToRevealProps {\n children: React.ReactNode;\n width: number;\n height: number;\n minScratchPercentage?: number;\n className?: string;\n onComplete?: () => void;\n gradientColors?: [string, string, string];\n}\n\nexport const ScratchToReveal: React.FC<ScratchToRevealProps> = ({\n width,\n height,\n minScratchPercentage = 50,\n onComplete,\n children,\n className,\n gradientColors = [\"#A97CF8\", \"#F38CB8\", \"#FDCC92\"],\n}) => {\n const canvasRef = useRef<HTMLCanvasElement>(null);\n const [isScratching, setIsScratching] = useState(false);\n const [isComplete, setIsComplete] = useState(false);\n\n const controls = useAnimation();\n\n useEffect(() => {\n const canvas = canvasRef.current;\n const ctx = canvas?.getContext(\"2d\");\n if (canvas && ctx) {\n ctx.fillStyle = \"#ccc\";\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n const gradient = ctx.createLinearGradient(\n 0,\n 0,\n canvas.width,\n canvas.height,\n );\n gradient.addColorStop(0, gradientColors[0]);\n gradient.addColorStop(0.5, gradientColors[1]);\n gradient.addColorStop(1, gradientColors[2]);\n ctx.fillStyle = gradient;\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n }\n }, [gradientColors]);\n\n useEffect(() => {\n const handleDocumentMouseMove = (event: MouseEvent) => {\n if (!isScratching) return;\n scratch(event.clientX, event.clientY);\n };\n\n const handleDocumentTouchMove = (event: TouchEvent) => {\n if (!isScratching) return;\n const touch = event.touches[0];\n scratch(touch.clientX, touch.clientY);\n };\n\n const handleDocumentMouseUp = () => {\n setIsScratching(false);\n checkCompletion();\n };\n\n const handleDocumentTouchEnd = () => {\n setIsScratching(false);\n checkCompletion();\n };\n\n document.addEventListener(\"mousedown\", handleDocumentMouseMove);\n document.addEventListener(\"mousemove\", handleDocumentMouseMove);\n document.addEventListener(\"touchstart\", handleDocumentTouchMove);\n document.addEventListener(\"touchmove\", handleDocumentTouchMove);\n document.addEventListener(\"mouseup\", handleDocumentMouseUp);\n document.addEventListener(\"touchend\", handleDocumentTouchEnd);\n document.addEventListener(\"touchcancel\", handleDocumentTouchEnd);\n\n return () => {\n document.removeEventListener(\"mousedown\", handleDocumentMouseMove);\n document.removeEventListener(\"mousemove\", handleDocumentMouseMove);\n document.removeEventListener(\"touchstart\", handleDocumentTouchMove);\n document.removeEventListener(\"touchmove\", handleDocumentTouchMove);\n document.removeEventListener(\"mouseup\", handleDocumentMouseUp);\n document.removeEventListener(\"touchend\", handleDocumentTouchEnd);\n document.removeEventListener(\"touchcancel\", handleDocumentTouchEnd);\n };\n }, [isScratching]);\n\n const handleMouseDown = () => setIsScratching(true);\n\n const handleTouchStart = () => setIsScratching(true);\n\n const scratch = (clientX: number, clientY: number) => {\n const canvas = canvasRef.current;\n const ctx = canvas?.getContext(\"2d\");\n if (canvas && ctx) {\n const rect = canvas.getBoundingClientRect();\n const x = clientX - rect.left + 16;\n const y = clientY - rect.top + 16;\n ctx.globalCompositeOperation = \"destination-out\";\n ctx.beginPath();\n ctx.arc(x, y, 30, 0, Math.PI * 2);\n ctx.fill();\n }\n };\n\n const startAnimation = async () => {\n await controls.start({\n scale: [1, 1.5, 1],\n rotate: [0, 10, -10, 10, -10, 0],\n transition: { duration: 0.5 },\n });\n\n // Call onComplete after animation finishes\n if (onComplete) {\n onComplete();\n }\n };\n\n const checkCompletion = () => {\n if (isComplete) return;\n\n const canvas = canvasRef.current;\n const ctx = canvas?.getContext(\"2d\");\n if (canvas && ctx) {\n const imageData = ctx.getImageData(0, 0, canvas.width, canvas.height);\n const pixels = imageData.data;\n const totalPixels = pixels.length / 4;\n let clearPixels = 0;\n\n for (let i = 3; i < pixels.length; i += 4) {\n if (pixels[i] === 0) clearPixels++;\n }\n\n const percentage = (clearPixels / totalPixels) * 100;\n\n if (percentage >= minScratchPercentage) {\n setIsComplete(true);\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n startAnimation();\n }\n }\n };\n\n return (\n <motion.div\n className={cn(\"relative select-none\", className)}\n style={{\n width,\n height,\n cursor:\n \"url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgdmlld0JveD0iMCAwIDMyIDMyIj4KICA8Y2lyY2xlIGN4PSIxNiIgY3k9IjE2IiByPSIxNSIgc3R5bGU9ImZpbGw6I2ZmZjtzdHJva2U6IzAwMDtzdHJva2Utd2lkdGg6MXB4OyIgLz4KPC9zdmc+'), auto\",\n }}\n animate={controls}\n >\n <canvas\n ref={canvasRef}\n width={width}\n height={height}\n className=\"absolute left-0 top-0\"\n onMouseDown={handleMouseDown}\n onTouchStart={handleTouchStart}\n ></canvas>\n {children}\n </motion.div>\n );\n};\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/script-copy-btn-demo.json b/public/r/script-copy-btn-demo.jsonindex a3513365..a9e539bd 100644--- a/public/r/script-copy-btn-demo.json+++ b/public/r/script-copy-btn-demo.json@@ -11,7 +11,8 @@{"path": "registry/example/script-copy-btn-demo.tsx","content": "import { ScriptCopyBtn } from \"@/registry/magicui/script-copy-btn\";\n\nexport default function ScriptCopyBtnDemo() {\n const customCommandMap = {\n npm: \"npm run shadcn add button\",\n yarn: \"yarn shadcn add button\",\n pnpm: \"pnpm dlx shadcn@latest add button\",\n bun: \"bun x shadcn@latest add button\",\n };\n return (\n <ScriptCopyBtn\n showMultiplePackageOptions={true}\n codeLanguage=\"shell\"\n lightTheme=\"nord\"\n darkTheme=\"vitesse-dark\"\n commandMap={customCommandMap}\n />\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/script-copy-btn.json b/public/r/script-copy-btn.jsonindex 13c40224..1b204dd5 100644--- a/public/r/script-copy-btn.json+++ b/public/r/script-copy-btn.json@@ -16,7 +16,8 @@{"path": "registry/magicui/script-copy-btn.tsx","content": "\"use client\";\n\nimport { Button } from \"@/components/ui/button\";\nimport { cn } from \"@/lib/utils\";\nimport { Check, Copy } from \"lucide-react\";\nimport { motion } from \"motion/react\";\nimport { useTheme } from \"next-themes\";\nimport { HTMLAttributes, useEffect, useState } from \"react\";\n\ninterface ScriptCopyBtnProps extends HTMLAttributes<HTMLDivElement> {\n showMultiplePackageOptions?: boolean;\n codeLanguage: string;\n lightTheme: string;\n darkTheme: string;\n commandMap: Record<string, string>;\n className?: string;\n}\n\nexport function ScriptCopyBtn({\n showMultiplePackageOptions = true,\n codeLanguage,\n lightTheme,\n darkTheme,\n commandMap,\n className,\n}: ScriptCopyBtnProps) {\n const packageManagers = Object.keys(commandMap);\n const [packageManager, setPackageManager] = useState(packageManagers[0]);\n const [copied, setCopied] = useState(false);\n const [highlightedCode, setHighlightedCode] = useState(\"\");\n const { theme } = useTheme();\n const command = commandMap[packageManager];\n\n useEffect(() => {\n async function loadHighlightedCode() {\n try {\n const { codeToHtml } = await import(\"shiki\");\n const highlighted = await codeToHtml(command, {\n lang: codeLanguage,\n themes: {\n light: lightTheme,\n dark: darkTheme,\n },\n defaultColor: theme === \"dark\" ? \"dark\" : \"light\",\n });\n setHighlightedCode(highlighted);\n } catch (error) {\n console.error(\"Error highlighting code:\", error);\n setHighlightedCode(`<pre>${command}</pre>`);\n }\n }\n\n loadHighlightedCode();\n }, [command, theme, codeLanguage, lightTheme, darkTheme]);\n\n const copyToClipboard = () => {\n navigator.clipboard.writeText(command);\n setCopied(true);\n setTimeout(() => setCopied(false), 2000);\n };\n\n return (\n <div\n className={cn(\n \"mx-auto flex max-w-md items-center justify-center\",\n className,\n )}\n >\n <div className=\"w-full space-y-2\">\n <div className=\"mb-2 flex items-center justify-between\">\n {showMultiplePackageOptions && (\n <div className=\"relative\">\n <div className=\"inline-flex overflow-hidden rounded-md border border-border text-xs\">\n {packageManagers.map((pm, index) => (\n <div key={pm} className=\"flex items-center\">\n {index > 0 && (\n <div className=\"h-4 w-px bg-border\" aria-hidden=\"true\" />\n )}\n <Button\n variant=\"ghost\"\n size=\"sm\"\n className={`relative rounded-none bg-background px-2 py-1 hover:bg-background ${\n packageManager === pm\n ? \"text-primary\"\n : \"text-muted-foreground\"\n }`}\n onClick={() => setPackageManager(pm)}\n >\n {pm}\n {packageManager === pm && (\n <motion.div\n className=\"absolute inset-x-0 bottom-[1px] mx-auto h-0.5 w-[90%] bg-primary\"\n layoutId=\"activeTab\"\n initial={false}\n transition={{\n type: \"spring\",\n stiffness: 500,\n damping: 30,\n }}\n />\n )}\n </Button>\n </div>\n ))}\n </div>\n </div>\n )}\n </div>\n <div className=\"relative flex items-center\">\n <div className=\"min-w-[300px] grow font-mono\">\n {highlightedCode ? (\n <div\n className={`[&>pre]:overflow-x-auto [&>pre]:rounded-md [&>pre]:p-2 [&>pre]:px-4 [&>pre]:font-mono ${\n theme === \"dark\" ? \"dark\" : \"light\"\n }`}\n dangerouslySetInnerHTML={{ __html: highlightedCode }}\n />\n ) : (\n <pre className=\"rounded-md border border-border bg-white p-2 px-4 font-mono dark:bg-black\">\n {command}\n </pre>\n )}\n </div>\n <Button\n variant=\"outline\"\n size=\"icon\"\n className=\"relative ml-2 rounded-md\"\n onClick={copyToClipboard}\n aria-label={copied ? \"Copied\" : \"Copy to clipboard\"}\n >\n <span className=\"sr-only\">{copied ? \"Copied\" : \"Copy\"}</span>\n <Copy\n className={`h-4 w-4 transition-all duration-300 ${\n copied ? \"scale-0\" : \"scale-100\"\n }`}\n />\n <Check\n className={`absolute inset-0 m-auto h-4 w-4 transition-all duration-300 ${\n copied ? \"scale-100\" : \"scale-0\"\n }`}\n />\n </Button>\n </div>\n </div>\n </div>\n );\n}\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/scroll-based-velocity.json b/public/r/scroll-based-velocity.jsonindex a4886605..7c73dd90 100644--- a/public/r/scroll-based-velocity.json+++ b/public/r/scroll-based-velocity.json@@ -11,7 +11,8 @@{"path": "registry/magicui/scroll-based-velocity.tsx","content": "\"use client\";\n\nimport {\n motion,\n useAnimationFrame,\n useMotionValue,\n useScroll,\n useSpring,\n useTransform,\n useVelocity,\n} from \"motion/react\";\nimport React, { useEffect, useRef, useState } from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\ninterface VelocityScrollProps extends React.HTMLAttributes<HTMLDivElement> {\n defaultVelocity?: number;\n className?: string;\n numRows?: number;\n}\n\ninterface ParallaxProps extends React.HTMLAttributes<HTMLDivElement> {\n children: React.ReactNode;\n baseVelocity: number;\n}\n\nexport const wrap = (min: number, max: number, v: number) => {\n const rangeSize = max - min;\n return ((((v - min) % rangeSize) + rangeSize) % rangeSize) + min;\n};\n\nfunction ParallaxText({\n children,\n baseVelocity = 100,\n ...props\n}: ParallaxProps) {\n const baseX = useMotionValue(0);\n const { scrollY } = useScroll();\n const scrollVelocity = useVelocity(scrollY);\n const smoothVelocity = useSpring(scrollVelocity, {\n damping: 50,\n stiffness: 400,\n });\n\n const velocityFactor = useTransform(smoothVelocity, [0, 1000], [0, 5], {\n clamp: false,\n });\n\n const [repetitions, setRepetitions] = useState(1);\n const containerRef = useRef<HTMLDivElement>(null);\n const textRef = useRef<HTMLSpanElement>(null);\n\n useEffect(() => {\n const calculateRepetitions = () => {\n if (containerRef.current && textRef.current) {\n const containerWidth = containerRef.current.offsetWidth;\n const textWidth = textRef.current.offsetWidth;\n const newRepetitions = Math.ceil(containerWidth / textWidth) + 2;\n setRepetitions(newRepetitions);\n }\n };\n\n calculateRepetitions();\n\n window.addEventListener(\"resize\", calculateRepetitions);\n return () => window.removeEventListener(\"resize\", calculateRepetitions);\n }, [children]);\n\n const x = useTransform(baseX, (v) => `${wrap(-100 / repetitions, 0, v)}%`);\n\n const directionFactor = React.useRef<number>(1);\n useAnimationFrame((t, delta) => {\n let moveBy = directionFactor.current * baseVelocity * (delta / 1000);\n\n if (velocityFactor.get() < 0) {\n directionFactor.current = -1;\n } else if (velocityFactor.get() > 0) {\n directionFactor.current = 1;\n }\n\n moveBy += directionFactor.current * moveBy * velocityFactor.get();\n\n baseX.set(baseX.get() + moveBy);\n });\n\n return (\n <div\n ref={containerRef}\n className=\"w-full overflow-hidden whitespace-nowrap\"\n {...props}\n >\n <motion.div className=\"inline-block\" style={{ x }}>\n {Array.from({ length: repetitions }).map((_, i) => (\n <span key={i} ref={i === 0 ? textRef : null}>\n {children}{\" \"}\n </span>\n ))}\n </motion.div>\n </div>\n );\n}\n\nexport function VelocityScroll({\n defaultVelocity = 5,\n numRows = 2,\n children,\n className,\n ...props\n}: VelocityScrollProps) {\n return (\n <div\n className={cn(\n \"relative w-full text-4xl font-bold tracking-[-0.02em] md:text-7xl md:leading-[5rem]\",\n className,\n )}\n {...props}\n >\n {Array.from({ length: numRows }).map((_, i) => (\n <ParallaxText\n key={i}\n baseVelocity={defaultVelocity * (i % 2 === 0 ? 1 : -1)}\n >\n {children}\n </ParallaxText>\n ))}\n </div>\n );\n}\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/scroll-progress-demo.json b/public/r/scroll-progress-demo.jsonindex 21ab99bc..011edee6 100644--- a/public/r/scroll-progress-demo.json+++ b/public/r/scroll-progress-demo.json@@ -11,7 +11,8 @@{"path": "registry/example/scroll-progress-demo.tsx","content": "import { ScrollProgress } from \"@/registry/magicui/scroll-progress\";\n\nexport default function ScrollProgressDemo() {\n return (\n <div className=\"z-10 rounded-lg border border-gray-200 bg-white p-4\">\n <ScrollProgress className=\"top-[65px]\" />\n <h2 className=\"pb-4 font-bold\">\n Note: The scroll progress is shown below the navbar of the page.\n </h2>\n <p className=\"pb-4\">\n Magic UI is a collection of re-usable components that you can copy and\n paste into your web apps. It primarily features components, blocks, and\n templates geared towards creating landing pages and user-facing\n marketing materials.\n </p>\n </div>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/scroll-progress.json b/public/r/scroll-progress.jsonindex 5dce3ec2..063c7494 100644--- a/public/r/scroll-progress.json+++ b/public/r/scroll-progress.json@@ -11,7 +11,8 @@{"path": "registry/magicui/scroll-progress.tsx","content": "\"use client\";\n\nimport { cn } from \"@/lib/utils\";\nimport { motion, MotionProps, useScroll, useSpring } from \"motion/react\";\nimport React from \"react\";\ninterface ScrollProgressProps\n extends Omit<React.HTMLAttributes<HTMLElement>, keyof MotionProps> {}\n\nexport const ScrollProgress = React.forwardRef<\n HTMLDivElement,\n ScrollProgressProps\n>(({ className, ...props }, ref) => {\n const { scrollYProgress } = useScroll();\n\n const scaleX = useSpring(scrollYProgress, {\n stiffness: 200,\n damping: 50,\n restDelta: 0.001,\n });\n\n return (\n <motion.div\n ref={ref}\n className={cn(\n \"fixed inset-x-0 top-0 z-[1000] h-1 origin-left bg-gradient-to-r from-[#A97CF8] via-[#F38CB8] to-[#FDCC92]\",\n className,\n )}\n style={{\n scaleX,\n }}\n {...props}\n />\n );\n});\n\nScrollProgress.displayName = \"ScrollProgress\";\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/shimmer-button-demo.json b/public/r/shimmer-button-demo.jsonindex 8b285a74..a1b3fe6d 100644--- a/public/r/shimmer-button-demo.json+++ b/public/r/shimmer-button-demo.json@@ -11,7 +11,8 @@{"path": "registry/example/shimmer-button-demo.tsx","content": "import { ShimmerButton } from \"@/registry/magicui/shimmer-button\";\n\nexport default function ShimmerButtonDemo() {\n return (\n <ShimmerButton className=\"shadow-2xl\">\n <span className=\"whitespace-pre-wrap text-center text-sm font-medium leading-none tracking-tight text-white dark:from-white dark:to-slate-900/10 lg:text-lg\">\n Shimmer Button\n </span>\n </ShimmerButton>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/shimmer-button.json b/public/r/shimmer-button.jsonindex 55fb459c..6ed22ea8 100644--- a/public/r/shimmer-button.json+++ b/public/r/shimmer-button.json@@ -8,7 +8,8 @@{"path": "registry/magicui/shimmer-button.tsx","content": "import React, { CSSProperties, ComponentPropsWithoutRef } from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nexport interface ShimmerButtonProps extends ComponentPropsWithoutRef<\"button\"> {\n shimmerColor?: string;\n shimmerSize?: string;\n borderRadius?: string;\n shimmerDuration?: string;\n background?: string;\n className?: string;\n children?: React.ReactNode;\n}\n\nexport const ShimmerButton = React.forwardRef<\n HTMLButtonElement,\n ShimmerButtonProps\n>(\n (\n {\n shimmerColor = \"#ffffff\",\n shimmerSize = \"0.05em\",\n shimmerDuration = \"3s\",\n borderRadius = \"100px\",\n background = \"rgba(0, 0, 0, 1)\",\n className,\n children,\n ...props\n },\n ref,\n ) => {\n return (\n <button\n style={\n {\n \"--spread\": \"90deg\",\n \"--shimmer-color\": shimmerColor,\n \"--radius\": borderRadius,\n \"--speed\": shimmerDuration,\n \"--cut\": shimmerSize,\n \"--bg\": background,\n } as CSSProperties\n }\n className={cn(\n \"group relative z-0 flex cursor-pointer items-center justify-center overflow-hidden whitespace-nowrap border border-white/10 px-6 py-3 text-white [background:var(--bg)] [border-radius:var(--radius)] dark:text-black\",\n \"transform-gpu transition-transform duration-300 ease-in-out active:translate-y-px\",\n className,\n )}\n ref={ref}\n {...props}\n >\n {/* spark container */}\n <div\n className={cn(\n \"-z-30 blur-[2px]\",\n \"absolute inset-0 overflow-visible [container-type:size]\",\n )}\n >\n {/* spark */}\n <div className=\"absolute inset-0 h-[100cqh] animate-shimmer-slide [aspect-ratio:1] [border-radius:0] [mask:none]\">\n {/* spark before */}\n <div className=\"absolute -inset-full w-auto rotate-0 animate-spin-around [background:conic-gradient(from_calc(270deg-(var(--spread)*0.5)),transparent_0,var(--shimmer-color)_var(--spread),transparent_var(--spread))] [translate:0_0]\" />\n </div>\n </div>\n {children}\n\n {/* Highlight */}\n <div\n className={cn(\n \"insert-0 absolute size-full\",\n\n \"rounded-2xl px-4 py-1.5 text-sm font-medium shadow-[inset_0_-8px_10px_#ffffff1f]\",\n\n // transition\n \"transform-gpu transition-all duration-300 ease-in-out\",\n\n // on hover\n \"group-hover:shadow-[inset_0_-6px_10px_#ffffff3f]\",\n\n // on click\n \"group-active:shadow-[inset_0_-10px_10px_#ffffff3f]\",\n )}\n />\n\n {/* backdrop */}\n <div\n className={cn(\n \"absolute -z-20 [background:var(--bg)] [border-radius:var(--radius)] [inset:var(--cut)]\",\n )}\n />\n </button>\n );\n },\n);\n\nShimmerButton.displayName = \"ShimmerButton\";\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}],"tailwind": {diff --git a/public/r/shine-border-demo-2.json b/public/r/shine-border-demo-2.jsonindex f2689f4a..2df24bab 100644--- a/public/r/shine-border-demo-2.json+++ b/public/r/shine-border-demo-2.json@@ -11,7 +11,8 @@{"path": "registry/example/shine-border-demo-2.tsx","content": "\"use client\";\n\nimport { useTheme } from \"next-themes\";\n\nimport { ShineBorder } from \"@/registry/magicui/shine-border\";\n\nexport default function ShineBorderDemo() {\n const theme = useTheme();\n return (\n <ShineBorder\n className=\"text-center text-2xl font-bold capitalize\"\n color={theme.theme === \"dark\" ? \"white\" : \"black\"}\n >\n Shine Border\n </ShineBorder>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/shine-border-demo.json b/public/r/shine-border-demo.jsonindex 6e62f82d..d388a104 100644--- a/public/r/shine-border-demo.json+++ b/public/r/shine-border-demo.json@@ -11,7 +11,8 @@{"path": "registry/example/shine-border-demo.tsx","content": "import { ShineBorder } from \"@/registry/magicui/shine-border\";\n\nexport default function ShineBorderDemo() {\n return (\n <ShineBorder\n className=\"relative flex h-[500px] w-full flex-col items-center justify-center overflow-hidden rounded-lg border bg-background md:shadow-xl\"\n color={[\"#A07CFE\", \"#FE8FB5\", \"#FFBE7B\"]}\n >\n <span className=\"pointer-events-none whitespace-pre-wrap bg-gradient-to-b from-black to-gray-300/80 bg-clip-text text-center text-8xl font-semibold leading-none text-transparent dark:from-white dark:to-slate-900/10\">\n Shine Border\n </span>\n </ShineBorder>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/shine-border.json b/public/r/shine-border.jsonindex b8db413c..8e6f72e8 100644--- a/public/r/shine-border.json+++ b/public/r/shine-border.json@@ -8,7 +8,8 @@{"path": "registry/magicui/shine-border.tsx","content": "\"use client\";\n\nimport { cn } from \"@/lib/utils\";\n\ntype TColorProp = string | string[];\n\ninterface ShineBorderProps {\n borderRadius?: number;\n borderWidth?: number;\n duration?: number;\n color?: TColorProp;\n className?: string;\n children: React.ReactNode;\n}\n\n/**\n * @name Shine Border\n * @description It is an animated background border effect component with easy to use and configurable props.\n * @param borderRadius defines the radius of the border.\n * @param borderWidth defines the width of the border.\n * @param duration defines the animation duration to be applied on the shining border\n * @param color a string or string array to define border color.\n * @param className defines the class name to be applied to the component\n * @param children contains react node elements.\n */\nexport function ShineBorder({\n borderRadius = 8,\n borderWidth = 1,\n duration = 14,\n color = \"#000000\",\n className,\n children,\n}: ShineBorderProps) {\n return (\n <div\n style={\n {\n \"--border-radius\": `${borderRadius}px`,\n } as React.CSSProperties\n }\n className={cn(\n \"relative min-h-[60px] w-fit min-w-[300px] place-items-center rounded-[--border-radius] bg-white p-3 text-black dark:bg-black dark:text-white\",\n className,\n )}\n >\n <div\n style={\n {\n \"--border-width\": `${borderWidth}px`,\n \"--border-radius\": `${borderRadius}px`,\n \"--duration\": `${duration}s`,\n \"--mask-linear-gradient\": `linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)`,\n \"--background-radial-gradient\": `radial-gradient(transparent,transparent, ${color instanceof Array ? color.join(\",\") : color},transparent,transparent)`,\n } as React.CSSProperties\n }\n className={`before:bg-shine-size pointer-events-none before:absolute before:inset-0 before:size-full before:rounded-[--border-radius] before:p-[--border-width] before:will-change-[background-position] before:content-[\"\"] before:![-webkit-mask-composite:xor] before:![mask-composite:exclude] before:[background-image:--background-radial-gradient] before:[background-size:300%_300%] before:[mask:--mask-linear-gradient] motion-safe:before:animate-shine`}\n ></div>\n {children}\n </div>\n );\n}\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}],"tailwind": {diff --git a/public/r/shiny-button-demo.json b/public/r/shiny-button-demo.jsonindex 8d72f9e8..964b4b76 100644--- a/public/r/shiny-button-demo.json+++ b/public/r/shiny-button-demo.json@@ -11,7 +11,8 @@{"path": "registry/example/shiny-button-demo.tsx","content": "import { ShinyButton } from \"@/registry/magicui/shiny-button\";\n\nexport default function ShinyButtonDemo() {\n return <ShinyButton>Shiny Button</ShinyButton>;\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/shiny-button.json b/public/r/shiny-button.jsonindex c81b4b9b..2212b419 100644--- a/public/r/shiny-button.json+++ b/public/r/shiny-button.json@@ -11,7 +11,8 @@{"path": "registry/magicui/shiny-button.tsx","content": "\"use client\";\n\nimport { cn } from \"@/lib/utils\";\nimport { motion, MotionProps, type AnimationProps } from \"motion/react\";\nimport React from \"react\";\n\nconst animationProps = {\n initial: { \"--x\": \"100%\", scale: 0.8 },\n animate: { \"--x\": \"-100%\", scale: 1 },\n whileTap: { scale: 0.95 },\n transition: {\n repeat: Infinity,\n repeatType: \"loop\",\n repeatDelay: 1,\n type: \"spring\",\n stiffness: 20,\n damping: 15,\n mass: 2,\n scale: {\n type: \"spring\",\n stiffness: 200,\n damping: 5,\n mass: 0.5,\n },\n },\n} as AnimationProps;\n\ninterface ShinyButtonProps\n extends Omit<React.HTMLAttributes<HTMLElement>, keyof MotionProps>,\n MotionProps {\n children: React.ReactNode;\n className?: string;\n}\n\nexport const ShinyButton = React.forwardRef<\n HTMLButtonElement,\n ShinyButtonProps\n>(({ children, className, ...props }, ref) => {\n return (\n <motion.button\n ref={ref}\n className={cn(\n \"relative rounded-lg px-6 py-2 font-medium backdrop-blur-xl transition-shadow duration-300 ease-in-out hover:shadow dark:bg-[radial-gradient(circle_at_50%_0%,hsl(var(--primary)/10%)_0%,transparent_60%)] dark:hover:shadow-[0_0_20px_hsl(var(--primary)/10%)]\",\n className,\n )}\n {...animationProps}\n {...props}\n >\n <span\n className=\"relative block size-full text-sm uppercase tracking-wide text-[rgb(0,0,0,65%)] dark:font-light dark:text-[rgb(255,255,255,90%)]\"\n style={{\n maskImage:\n \"linear-gradient(-75deg,hsl(var(--primary)) calc(var(--x) + 20%),transparent calc(var(--x) + 30%),hsl(var(--primary)) calc(var(--x) + 100%))\",\n }}\n >\n {children}\n </span>\n <span\n style={{\n mask: \"linear-gradient(rgb(0,0,0), rgb(0,0,0)) content-box,linear-gradient(rgb(0,0,0), rgb(0,0,0))\",\n maskComposite: \"exclude\",\n }}\n className=\"absolute inset-0 z-10 block rounded-[inherit] bg-[linear-gradient(-75deg,hsl(var(--primary)/10%)_calc(var(--x)+20%),hsl(var(--primary)/50%)_calc(var(--x)+25%),hsl(var(--primary)/10%)_calc(var(--x)+100%))] p-px\"\n ></span>\n </motion.button>\n );\n});\n\nShinyButton.displayName = \"ShinyButton\";\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/sparkles-text-demo.json b/public/r/sparkles-text-demo.jsonindex cea3d0ad..a29ad69b 100644--- a/public/r/sparkles-text-demo.json+++ b/public/r/sparkles-text-demo.json@@ -11,7 +11,8 @@{"path": "registry/example/sparkles-text-demo.tsx","content": "import { SparklesText } from \"@/registry/magicui/sparkles-text\";\n\nexport default function SparklesTextDemo() {\n return <SparklesText text=\"Magic UI\" />;\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/sparkles-text.json b/public/r/sparkles-text.jsonindex 796b1ea6..a34c9048 100644--- a/public/r/sparkles-text.json+++ b/public/r/sparkles-text.json@@ -11,7 +11,8 @@{"path": "registry/magicui/sparkles-text.tsx","content": "\"use client\";\n\nimport { motion } from \"motion/react\";\nimport { CSSProperties, ReactElement, useEffect, useState } from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\ninterface Sparkle {\n id: string;\n x: string;\n y: string;\n color: string;\n delay: number;\n scale: number;\n lifespan: number;\n}\n\nconst Sparkle: React.FC<Sparkle> = ({ id, x, y, color, delay, scale }) => {\n return (\n <motion.svg\n key={id}\n className=\"pointer-events-none absolute z-20\"\n initial={{ opacity: 0, left: x, top: y }}\n animate={{\n opacity: [0, 1, 0],\n scale: [0, scale, 0],\n rotate: [75, 120, 150],\n }}\n transition={{ duration: 0.8, repeat: Infinity, delay }}\n width=\"21\"\n height=\"21\"\n viewBox=\"0 0 21 21\"\n >\n <path\n d=\"M9.82531 0.843845C10.0553 0.215178 10.9446 0.215178 11.1746 0.843845L11.8618 2.72026C12.4006 4.19229 12.3916 6.39157 13.5 7.5C14.6084 8.60843 16.8077 8.59935 18.2797 9.13822L20.1561 9.82534C20.7858 10.0553 20.7858 10.9447 20.1561 11.1747L18.2797 11.8618C16.8077 12.4007 14.6084 12.3916 13.5 13.5C12.3916 14.6084 12.4006 16.8077 11.8618 18.2798L11.1746 20.1562C10.9446 20.7858 10.0553 20.7858 9.82531 20.1562L9.13819 18.2798C8.59932 16.8077 8.60843 14.6084 7.5 13.5C6.39157 12.3916 4.19225 12.4007 2.72023 11.8618L0.843814 11.1747C0.215148 10.9447 0.215148 10.0553 0.843814 9.82534L2.72023 9.13822C4.19225 8.59935 6.39157 8.60843 7.5 7.5C8.60843 6.39157 8.59932 4.19229 9.13819 2.72026L9.82531 0.843845Z\"\n fill={color}\n />\n </motion.svg>\n );\n};\n\ninterface SparklesTextProps {\n /**\n * @default <div />\n * @type ReactElement\n * @description\n * The component to be rendered as the text\n * */\n as?: ReactElement;\n\n /**\n * @default \"\"\n * @type string\n * @description\n * The className of the text\n */\n className?: string;\n\n /**\n * @required\n * @type string\n * @description\n * The text to be displayed\n * */\n text: string;\n\n /**\n * @default 10\n * @type number\n * @description\n * The count of sparkles\n * */\n sparklesCount?: number;\n\n /**\n * @default \"{first: '#9E7AFF', second: '#FE8BBB'}\"\n * @type string\n * @description\n * The colors of the sparkles\n * */\n colors?: {\n first: string;\n second: string;\n };\n}\n\nexport const SparklesText: React.FC<SparklesTextProps> = ({\n text,\n colors = { first: \"#9E7AFF\", second: \"#FE8BBB\" },\n className,\n sparklesCount = 10,\n ...props\n}) => {\n const [sparkles, setSparkles] = useState<Sparkle[]>([]);\n\n useEffect(() => {\n const generateStar = (): Sparkle => {\n const starX = `${Math.random() * 100}%`;\n const starY = `${Math.random() * 100}%`;\n const color = Math.random() > 0.5 ? colors.first : colors.second;\n const delay = Math.random() * 2;\n const scale = Math.random() * 1 + 0.3;\n const lifespan = Math.random() * 10 + 5;\n const id = `${starX}-${starY}-${Date.now()}`;\n return { id, x: starX, y: starY, color, delay, scale, lifespan };\n };\n\n const initializeStars = () => {\n const newSparkles = Array.from({ length: sparklesCount }, generateStar);\n setSparkles(newSparkles);\n };\n\n const updateStars = () => {\n setSparkles((currentSparkles) =>\n currentSparkles.map((star) => {\n if (star.lifespan <= 0) {\n return generateStar();\n } else {\n return { ...star, lifespan: star.lifespan - 0.1 };\n }\n }),\n );\n };\n\n initializeStars();\n const interval = setInterval(updateStars, 100);\n\n return () => clearInterval(interval);\n }, [colors.first, colors.second, sparklesCount]);\n\n return (\n <div\n className={cn(\"text-6xl font-bold\", className)}\n {...props}\n style={\n {\n \"--sparkles-first-color\": `${colors.first}`,\n \"--sparkles-second-color\": `${colors.second}`,\n } as CSSProperties\n }\n >\n <span className=\"relative inline-block\">\n {sparkles.map((sparkle) => (\n <Sparkle key={sparkle.id} {...sparkle} />\n ))}\n <strong>{text}</strong>\n </span>\n </div>\n );\n};\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/terminal-demo.json b/public/r/terminal-demo.jsonindex b92cf394..5b8d8af2 100644--- a/public/r/terminal-demo.json+++ b/public/r/terminal-demo.json@@ -11,7 +11,8 @@{"path": "registry/example/terminal-demo.tsx","content": "import {\n AnimatedSpan,\n Terminal,\n TypingAnimation,\n} from \"@/registry/magicui/terminal\";\n\nexport default function TerminalDemo() {\n return (\n <Terminal>\n <TypingAnimation>> pnpm dlx shadcn@latest init</TypingAnimation>\n\n <AnimatedSpan delay={1500} className=\"text-green-500\">\n <span>✔ Preflight checks.</span>\n </AnimatedSpan>\n\n <AnimatedSpan delay={2000} className=\"text-green-500\">\n <span>✔ Verifying framework. Found Next.js.</span>\n </AnimatedSpan>\n\n <AnimatedSpan delay={2500} className=\"text-green-500\">\n <span>✔ Validating Tailwind CSS.</span>\n </AnimatedSpan>\n\n <AnimatedSpan delay={3000} className=\"text-green-500\">\n <span>✔ Validating import alias.</span>\n </AnimatedSpan>\n\n <AnimatedSpan delay={3500} className=\"text-green-500\">\n <span>✔ Writing components.json.</span>\n </AnimatedSpan>\n\n <AnimatedSpan delay={4000} className=\"text-green-500\">\n <span>✔ Checking registry.</span>\n </AnimatedSpan>\n\n <AnimatedSpan delay={4500} className=\"text-green-500\">\n <span>✔ Updating tailwind.config.ts</span>\n </AnimatedSpan>\n\n <AnimatedSpan delay={5000} className=\"text-green-500\">\n <span>✔ Updating app/globals.css</span>\n </AnimatedSpan>\n\n <AnimatedSpan delay={5500} className=\"text-green-500\">\n <span>✔ Installing dependencies.</span>\n </AnimatedSpan>\n\n <AnimatedSpan delay={6000} className=\"text-blue-500\">\n <span>ℹ Updated 1 file:</span>\n <span className=\"pl-2\">- lib/utils.ts</span>\n </AnimatedSpan>\n\n <TypingAnimation delay={6500} className=\"text-muted-foreground\">\n Success! Project initialization completed.\n </TypingAnimation>\n\n <TypingAnimation delay={7000} className=\"text-muted-foreground\">\n You may now add components.\n </TypingAnimation>\n </Terminal>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/terminal.json b/public/r/terminal.jsonindex b0062770..11ed2195 100644--- a/public/r/terminal.json+++ b/public/r/terminal.json@@ -8,7 +8,8 @@{"path": "registry/magicui/terminal.tsx","content": "\"use client\";\n\nimport { cn } from \"@/lib/utils\";\nimport { motion, MotionProps } from \"motion/react\";\nimport { useEffect, useRef, useState } from \"react\";\n\ninterface AnimatedSpanProps extends MotionProps {\n children: React.ReactNode;\n delay?: number;\n className?: string;\n}\n\nexport const AnimatedSpan = ({\n children,\n delay = 0,\n className,\n ...props\n}: AnimatedSpanProps) => (\n <motion.div\n initial={{ opacity: 0, y: -5 }}\n animate={{ opacity: 1, y: 0 }}\n transition={{ duration: 0.3, delay: delay / 1000 }}\n className={cn(\"grid text-sm font-normal tracking-tight\", className)}\n {...props}\n >\n {children}\n </motion.div>\n);\n\ninterface TypingAnimationProps extends MotionProps {\n children: string;\n className?: string;\n duration?: number;\n delay?: number;\n as?: React.ElementType;\n}\n\nexport const TypingAnimation = ({\n children,\n className,\n duration = 60,\n delay = 0,\n as: Component = \"span\",\n ...props\n}: TypingAnimationProps) => {\n if (typeof children !== \"string\") {\n throw new Error(\"TypingAnimation: children must be a string. Received:\");\n }\n\n const MotionComponent = motion.create(Component, {\n forwardMotionProps: true,\n });\n\n const [displayedText, setDisplayedText] = useState<string>(\"\");\n const [started, setStarted] = useState(false);\n const elementRef = useRef<HTMLElement | null>(null);\n\n useEffect(() => {\n const startTimeout = setTimeout(() => {\n setStarted(true);\n }, delay);\n return () => clearTimeout(startTimeout);\n }, [delay]);\n\n useEffect(() => {\n if (!started) return;\n\n let i = 0;\n const typingEffect = setInterval(() => {\n if (i < children.length) {\n setDisplayedText(children.substring(0, i + 1));\n i++;\n } else {\n clearInterval(typingEffect);\n }\n }, duration);\n\n return () => {\n clearInterval(typingEffect);\n };\n }, [children, duration, started]);\n\n return (\n <MotionComponent\n ref={elementRef}\n className={cn(\"text-sm font-normal tracking-tight\", className)}\n {...props}\n >\n {displayedText}\n </MotionComponent>\n );\n};\n\ninterface TerminalProps {\n children: React.ReactNode;\n className?: string;\n}\n\nexport const Terminal = ({ children, className }: TerminalProps) => {\n return (\n <div\n className={cn(\n \"z-0 h-full max-h-[400px] w-full max-w-lg rounded-xl border border-border bg-background\",\n className,\n )}\n >\n <div className=\"flex flex-col gap-y-2 border-b border-border p-4\">\n <div className=\"flex flex-row gap-x-2\">\n <div className=\"h-2 w-2 rounded-full bg-red-500\"></div>\n <div className=\"h-2 w-2 rounded-full bg-yellow-500\"></div>\n <div className=\"h-2 w-2 rounded-full bg-green-500\"></div>\n </div>\n </div>\n <pre className=\"p-4\">\n <code className=\"grid gap-y-1 overflow-auto\">{children}</code>\n </pre>\n </div>\n );\n};\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/text-animate-demo-2.json b/public/r/text-animate-demo-2.jsonindex 12f6ef95..a55027bc 100644--- a/public/r/text-animate-demo-2.json+++ b/public/r/text-animate-demo-2.json@@ -11,7 +11,8 @@{"path": "registry/example/text-animate-demo-2.tsx","content": "import { TextAnimate } from \"@/registry/magicui/text-animate\";\n\nexport default function TextAnimateDemo2() {\n return (\n <TextAnimate animation=\"blurIn\" as=\"h1\">\n Blur in text\n </TextAnimate>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/text-animate-demo-3.json b/public/r/text-animate-demo-3.jsonindex eec7c280..beb6eeac 100644--- a/public/r/text-animate-demo-3.json+++ b/public/r/text-animate-demo-3.json@@ -11,7 +11,8 @@{"path": "registry/example/text-animate-demo-3.tsx","content": "import { TextAnimate } from \"@/registry/magicui/text-animate\";\n\nexport default function TextAnimateDemo3() {\n return (\n <TextAnimate animation=\"slideUp\" by=\"word\">\n Slide up by word\n </TextAnimate>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/text-animate-demo-4.json b/public/r/text-animate-demo-4.jsonindex 0f6b4518..a7cae767 100644--- a/public/r/text-animate-demo-4.json+++ b/public/r/text-animate-demo-4.json@@ -11,7 +11,8 @@{"path": "registry/example/text-animate-demo-4.tsx","content": "import { TextAnimate } from \"@/registry/magicui/text-animate\";\n\nexport default function TextAnimateDemo4() {\n return (\n <TextAnimate animation=\"scaleUp\" by=\"text\">\n Scale up by text\n </TextAnimate>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/text-animate-demo-5.json b/public/r/text-animate-demo-5.jsonindex e4df3ce3..de711279 100644--- a/public/r/text-animate-demo-5.json+++ b/public/r/text-animate-demo-5.json@@ -11,7 +11,8 @@{"path": "registry/example/text-animate-demo-5.tsx","content": "import { TextAnimate } from \"@/registry/magicui/text-animate\";\n\nexport default function TextAnimateDemo5() {\n return (\n <TextAnimate animation=\"fadeIn\" by=\"line\" as=\"p\">\n {`Fade in by line as paragraph\\n\\nFade in by line as paragraph\\n\\nFade in by line as paragraph`}\n </TextAnimate>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/text-animate-demo-6.json b/public/r/text-animate-demo-6.jsonindex febf076e..e7687da5 100644--- a/public/r/text-animate-demo-6.json+++ b/public/r/text-animate-demo-6.json@@ -11,7 +11,8 @@{"path": "registry/example/text-animate-demo-6.tsx","content": "import { TextAnimate } from \"@/registry/magicui/text-animate\";\n\nexport default function TextAnimateDemo6() {\n return (\n <TextAnimate animation=\"slideLeft\" by=\"character\">\n Slide left by character\n </TextAnimate>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/text-animate-demo.json b/public/r/text-animate-demo.jsonindex 12d09c38..d95280f6 100644--- a/public/r/text-animate-demo.json+++ b/public/r/text-animate-demo.json@@ -11,7 +11,8 @@{"path": "registry/example/text-animate-demo.tsx","content": "import { TextAnimate } from \"@/registry/magicui/text-animate\";\n\nexport default function TextAnimateDemo() {\n return (\n <TextAnimate animation=\"blurInUp\" by=\"character\">\n Blur in by character\n </TextAnimate>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/text-animate.json b/public/r/text-animate.jsonindex 19155b4f..6d2b547c 100644--- a/public/r/text-animate.json+++ b/public/r/text-animate.json@@ -11,7 +11,8 @@{"path": "registry/magicui/text-animate.tsx","content": "\"use client\";\n\nimport { cn } from \"@/lib/utils\";\nimport { AnimatePresence, motion, MotionProps, Variants } from \"motion/react\";\nimport { ElementType } from \"react\";\n\ntype AnimationType = \"text\" | \"word\" | \"character\" | \"line\";\ntype AnimationVariant =\n | \"fadeIn\"\n | \"blurIn\"\n | \"blurInUp\"\n | \"blurInDown\"\n | \"slideUp\"\n | \"slideDown\"\n | \"slideLeft\"\n | \"slideRight\"\n | \"scaleUp\"\n | \"scaleDown\";\n\ninterface TextAnimateProps extends MotionProps {\n /**\n * The text content to animate\n */\n children: string;\n /**\n * The class name to be applied to the component\n */\n className?: string;\n /**\n * The class name to be applied to each segment\n */\n segmentClassName?: string;\n /**\n * The delay before the animation starts\n */\n delay?: number;\n /**\n * The duration of the animation\n */\n duration?: number;\n /**\n * Custom motion variants for the animation\n */\n variants?: Variants;\n /**\n * The element type to render\n */\n as?: ElementType;\n /**\n * How to split the text (\"text\", \"word\", \"character\")\n */\n by?: AnimationType;\n /**\n * Whether to start animation when component enters viewport\n */\n startOnView?: boolean;\n /**\n * Whether to animate only once\n */\n once?: boolean;\n /**\n * The animation preset to use\n */\n animation?: AnimationVariant;\n}\n\nconst staggerTimings: Record<AnimationType, number> = {\n text: 0.06,\n word: 0.05,\n character: 0.03,\n line: 0.06,\n};\n\nconst defaultContainerVariants = {\n hidden: { opacity: 1 },\n show: {\n opacity: 1,\n transition: {\n staggerChildren: 0.05,\n },\n },\n exit: {\n opacity: 0,\n transition: {\n staggerChildren: 0.05,\n staggerDirection: -1,\n },\n },\n};\n\nconst defaultItemVariants: Variants = {\n hidden: { opacity: 0 },\n show: {\n opacity: 1,\n },\n exit: {\n opacity: 0,\n },\n};\n\nconst defaultItemAnimationVariants: Record<\n AnimationVariant,\n { container: Variants; item: Variants }\n> = {\n fadeIn: {\n container: defaultContainerVariants,\n item: {\n hidden: { opacity: 0, y: 20 },\n show: (delay: number) => ({\n opacity: 1,\n y: 0,\n transition: {\n delay,\n duration: 0.3,\n },\n }),\n exit: {\n opacity: 0,\n y: 20,\n transition: { duration: 0.3 },\n },\n },\n },\n blurIn: {\n container: defaultContainerVariants,\n item: {\n hidden: { opacity: 0, filter: \"blur(10px)\" },\n show: (i: number) => ({\n opacity: 1,\n filter: \"blur(0px)\",\n transition: {\n delay: i * 0.1,\n duration: 0.3,\n },\n }),\n exit: {\n opacity: 0,\n filter: \"blur(10px)\",\n transition: { duration: 0.3 },\n },\n },\n },\n blurInUp: {\n container: defaultContainerVariants,\n item: {\n hidden: { opacity: 0, filter: \"blur(10px)\", y: 20 },\n show: (delay: number) => ({\n opacity: 1,\n filter: \"blur(0px)\",\n y: 0,\n transition: {\n y: { duration: 0.3 },\n opacity: { duration: 0.4 },\n filter: { duration: 0.3 },\n },\n }),\n exit: {\n opacity: 0,\n filter: \"blur(10px)\",\n y: 20,\n transition: {\n y: { duration: 0.3 },\n opacity: { duration: 0.4 },\n filter: { duration: 0.3 },\n },\n },\n },\n },\n blurInDown: {\n container: defaultContainerVariants,\n item: {\n hidden: { opacity: 0, filter: \"blur(10px)\", y: -20 },\n show: (delay: number) => ({\n opacity: 1,\n filter: \"blur(0px)\",\n y: 0,\n transition: {\n y: { duration: 0.3 },\n opacity: { duration: 0.4 },\n filter: { duration: 0.3 },\n },\n }),\n },\n },\n slideUp: {\n container: defaultContainerVariants,\n item: {\n hidden: { y: 20, opacity: 0 },\n show: (delay: number) => ({\n y: 0,\n opacity: 1,\n transition: {\n delay,\n duration: 0.3,\n },\n }),\n exit: {\n y: -20,\n opacity: 0,\n transition: {\n duration: 0.3,\n },\n },\n },\n },\n slideDown: {\n container: defaultContainerVariants,\n item: {\n hidden: { y: -20, opacity: 0 },\n show: {\n y: 0,\n opacity: 1,\n transition: { duration: 0.3 },\n },\n exit: {\n y: 20,\n opacity: 0,\n transition: { duration: 0.3 },\n },\n },\n },\n slideLeft: {\n container: defaultContainerVariants,\n item: {\n hidden: { x: 20, opacity: 0 },\n show: {\n x: 0,\n opacity: 1,\n transition: { duration: 0.3 },\n },\n exit: {\n x: -20,\n opacity: 0,\n transition: { duration: 0.3 },\n },\n },\n },\n slideRight: {\n container: defaultContainerVariants,\n item: {\n hidden: { x: -20, opacity: 0 },\n show: {\n x: 0,\n opacity: 1,\n transition: { duration: 0.3 },\n },\n exit: {\n x: 20,\n opacity: 0,\n transition: { duration: 0.3 },\n },\n },\n },\n scaleUp: {\n container: defaultContainerVariants,\n item: {\n hidden: { scale: 0.5, opacity: 0 },\n show: {\n scale: 1,\n opacity: 1,\n transition: {\n duration: 0.3,\n scale: {\n type: \"spring\",\n damping: 15,\n stiffness: 300,\n },\n },\n },\n exit: {\n scale: 0.5,\n opacity: 0,\n transition: { duration: 0.3 },\n },\n },\n },\n scaleDown: {\n container: defaultContainerVariants,\n item: {\n hidden: { scale: 1.5, opacity: 0 },\n show: (delay: number) => ({\n scale: 1,\n opacity: 1,\n transition: {\n delay,\n duration: 0.3,\n scale: {\n type: \"spring\",\n damping: 15,\n stiffness: 300,\n },\n },\n }),\n exit: {\n scale: 1.5,\n opacity: 0,\n transition: { duration: 0.3 },\n },\n },\n },\n};\n\nexport function TextAnimate({\n children,\n delay = 0,\n duration = 0.3,\n variants,\n className,\n segmentClassName,\n as: Component = \"p\",\n startOnView = true,\n once = false,\n by = \"word\",\n animation = \"fadeIn\",\n ...props\n}: TextAnimateProps) {\n const MotionComponent = motion.create(Component);\n\n // Use provided variants or default variants based on animation type\n const finalVariants = animation\n ? {\n container: {\n ...defaultItemAnimationVariants[animation].container,\n show: {\n ...defaultItemAnimationVariants[animation].container.show,\n transition: {\n staggerChildren: staggerTimings[by],\n },\n },\n exit: {\n ...defaultItemAnimationVariants[animation].container.exit,\n transition: {\n staggerChildren: staggerTimings[by],\n staggerDirection: -1,\n },\n },\n },\n item: defaultItemAnimationVariants[animation].item,\n }\n : { container: defaultContainerVariants, item: defaultItemVariants };\n\n let segments: string[] = [];\n switch (by) {\n case \"word\":\n segments = children.split(/(\\s+)/);\n break;\n case \"character\":\n segments = children.split(\"\");\n break;\n case \"line\":\n segments = children.split(\"\\n\");\n break;\n case \"text\":\n default:\n segments = [children];\n break;\n }\n\n return (\n <AnimatePresence mode=\"popLayout\">\n <MotionComponent\n variants={finalVariants.container}\n initial=\"hidden\"\n whileInView={startOnView ? \"show\" : undefined}\n animate={startOnView ? undefined : \"show\"}\n exit=\"exit\"\n className={cn(\"whitespace-pre-wrap\", className)}\n {...props}\n >\n {segments.map((segment, i) => (\n <motion.span\n key={`${by}-${segment}-${i}`}\n variants={finalVariants.item}\n custom={i * staggerTimings[by]}\n className={cn(\n by === \"line\" ? \"block\" : \"inline-block whitespace-pre\",\n segmentClassName,\n )}\n >\n {segment}\n </motion.span>\n ))}\n </MotionComponent>\n </AnimatePresence>\n );\n}\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/text-reveal-demo.json b/public/r/text-reveal-demo.jsonindex 65716087..5a09ca06 100644--- a/public/r/text-reveal-demo.json+++ b/public/r/text-reveal-demo.json@@ -11,7 +11,8 @@{"path": "registry/example/text-reveal-demo.tsx","content": "import { TextReveal } from \"@/registry/magicui/text-reveal\";\n\nexport default function TextRevealDemo() {\n return (\n <div className=\"z-10 flex min-h-64 items-center justify-center rounded-lg border bg-white dark:bg-black\">\n <TextReveal text=\"Magic UI will change the way you design.\" />\n </div>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/text-reveal.json b/public/r/text-reveal.jsonindex 7b7babd8..c4b7172a 100644--- a/public/r/text-reveal.json+++ b/public/r/text-reveal.json@@ -11,7 +11,8 @@{"path": "registry/magicui/text-reveal.tsx","content": "\"use client\";\n\nimport { motion, MotionValue, useScroll, useTransform } from \"motion/react\";\nimport { ComponentPropsWithoutRef, FC, ReactNode, useRef } from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nexport interface TextRevealProps extends ComponentPropsWithoutRef<\"div\"> {\n text: string;\n}\n\nexport const TextReveal: FC<TextRevealProps> = ({ text, className }) => {\n const targetRef = useRef<HTMLDivElement | null>(null);\n\n const { scrollYProgress } = useScroll({\n target: targetRef,\n });\n const words = text.split(\" \");\n\n return (\n <div ref={targetRef} className={cn(\"relative z-0 h-[200vh]\", className)}>\n <div\n className={\n \"sticky top-0 mx-auto flex h-[50%] max-w-4xl items-center bg-transparent px-[1rem] py-[5rem]\"\n }\n >\n <p\n ref={targetRef}\n className={\n \"flex flex-wrap p-5 text-2xl font-bold text-black/20 dark:text-white/20 md:p-8 md:text-3xl lg:p-10 lg:text-4xl xl:text-5xl\"\n }\n >\n {words.map((word, i) => {\n const start = i / words.length;\n const end = start + 1 / words.length;\n return (\n <Word key={i} progress={scrollYProgress} range={[start, end]}>\n {word}\n </Word>\n );\n })}\n </p>\n </div>\n </div>\n );\n};\n\ninterface WordProps {\n children: ReactNode;\n progress: MotionValue<number>;\n range: [number, number];\n}\n\nconst Word: FC<WordProps> = ({ children, progress, range }) => {\n const opacity = useTransform(progress, range, [0, 1]);\n return (\n <span className=\"xl:lg-3 relative mx-1 lg:mx-2.5\">\n <span className={\"absolute opacity-30\"}>{children}</span>\n <motion.span\n style={{ opacity: opacity }}\n className={\"text-black dark:text-white\"}\n >\n {children}\n </motion.span>\n </span>\n );\n};\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/tweet-card-demo.json b/public/r/tweet-card-demo.jsonindex 69b4b423..ef2c5f2f 100644--- a/public/r/tweet-card-demo.json+++ b/public/r/tweet-card-demo.json@@ -11,7 +11,8 @@{"path": "registry/example/tweet-card-demo.tsx","content": "import { ClientTweetCard } from \"@/registry/magicui/client-tweet-card\";\n\n/**\n * <TweetCard /> (Server Side Only)\n * <ClientTweetCard /> (Client Side Only)\n */\nexport default function TweetDemo() {\n return <ClientTweetCard id=\"1668408059125702661\" className=\"shadow-2xl\" />;\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/tweet-card-images.json b/public/r/tweet-card-images.jsonindex 802793ff..e8380878 100644--- a/public/r/tweet-card-images.json+++ b/public/r/tweet-card-images.json@@ -11,7 +11,8 @@{"path": "registry/example/tweet-card-images.tsx","content": "import { ClientTweetCard } from \"@/registry/magicui/client-tweet-card\";\n\nexport default function TweetImages() {\n return <ClientTweetCard id=\"1678577280489234432\" className=\"shadow-2xl\" />;\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/tweet-card-meta-preview.json b/public/r/tweet-card-meta-preview.jsonindex 6a020248..97259bf4 100644--- a/public/r/tweet-card-meta-preview.json+++ b/public/r/tweet-card-meta-preview.json@@ -11,7 +11,8 @@{"path": "registry/example/tweet-card-meta-preview.tsx","content": "import { ClientTweetCard } from \"@/registry/magicui/client-tweet-card\";\n\nexport default function TweetMetaPreview() {\n return <ClientTweetCard id=\"1675849118445436929\" className=\"shadow-2xl\" />;\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/tweet-card.json b/public/r/tweet-card.jsonindex c51ca4ef..8d501d57 100644--- a/public/r/tweet-card.json+++ b/public/r/tweet-card.json@@ -11,7 +11,8 @@{"path": "registry/magicui/tweet-card.tsx","content": "/* eslint-disable @next/next/no-img-element */\nimport { Suspense } from \"react\";\nimport {\n enrichTweet,\n type EnrichedTweet,\n type TweetProps,\n type TwitterComponents,\n} from \"react-tweet\";\nimport { getTweet, type Tweet } from \"react-tweet/api\";\n\nimport { cn } from \"@/lib/utils\";\n\ninterface TwitterIconProps {\n className?: string;\n [key: string]: unknown;\n}\nconst Twitter = ({ className, ...props }: TwitterIconProps) => (\n <svg\n stroke=\"currentColor\"\n fill=\"currentColor\"\n strokeWidth=\"0\"\n viewBox=\"0 0 24 24\"\n height=\"1em\"\n width=\"1em\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className={className}\n {...props}\n >\n <g>\n <path fill=\"none\" d=\"M0 0h24v24H0z\"></path>\n <path d=\"M22.162 5.656a8.384 8.384 0 0 1-2.402.658A4.196 4.196 0 0 0 21.6 4c-.82.488-1.719.83-2.656 1.015a4.182 4.182 0 0 0-7.126 3.814 11.874 11.874 0 0 1-8.62-4.37 4.168 4.168 0 0 0-.566 2.103c0 1.45.738 2.731 1.86 3.481a4.168 4.168 0 0 1-1.894-.523v.052a4.185 4.185 0 0 0 3.355 4.101 4.21 4.21 0 0 1-1.89.072A4.185 4.185 0 0 0 7.97 16.65a8.394 8.394 0 0 1-6.191 1.732 11.83 11.83 0 0 0 6.41 1.88c7.693 0 11.9-6.373 11.9-11.9 0-.18-.005-.362-.013-.54a8.496 8.496 0 0 0 2.087-2.165z\"></path>\n </g>\n </svg>\n);\n\nconst Verified = ({ className, ...props }: TwitterIconProps) => (\n <svg\n aria-label=\"Verified Account\"\n viewBox=\"0 0 24 24\"\n className={className}\n {...props}\n >\n <g fill=\"currentColor\">\n <path d=\"M22.5 12.5c0-1.58-.875-2.95-2.148-3.6.154-.435.238-.905.238-1.4 0-2.21-1.71-3.998-3.818-3.998-.47 0-.92.084-1.336.25C14.818 2.415 13.51 1.5 12 1.5s-2.816.917-3.437 2.25c-.415-.165-.866-.25-1.336-.25-2.11 0-3.818 1.79-3.818 4 0 .494.083.964.237 1.4-1.272.65-2.147 2.018-2.147 3.6 0 1.495.782 2.798 1.942 3.486-.02.17-.032.34-.032.514 0 2.21 1.708 4 3.818 4 .47 0 .92-.086 1.335-.25.62 1.334 1.926 2.25 3.437 2.25 1.512 0 2.818-.916 3.437-2.25.415.163.865.248 1.336.248 2.11 0 3.818-1.79 3.818-4 0-.174-.012-.344-.033-.513 1.158-.687 1.943-1.99 1.943-3.484zm-6.616-3.334l-4.334 6.5c-.145.217-.382.334-.625.334-.143 0-.288-.04-.416-.126l-.115-.094-2.415-2.415c-.293-.293-.293-.768 0-1.06s.768-.294 1.06 0l1.77 1.767 3.825-5.74c.23-.345.696-.436 1.04-.207.346.23.44.696.21 1.04z\" />\n </g>\n </svg>\n);\n\nexport const truncate = (str: string | null, length: number) => {\n if (!str || str.length <= length) return str;\n return `${str.slice(0, length - 3)}...`;\n};\n\nconst Skeleton = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => {\n return (\n <div className={cn(\"rounded-md bg-primary/10\", className)} {...props} />\n );\n};\n\nexport const TweetSkeleton = ({\n className,\n ...props\n}: {\n className?: string;\n [key: string]: unknown;\n}) => (\n <div\n className={cn(\n \"flex size-full max-h-max min-w-72 flex-col gap-2 rounded-lg border p-4\",\n className,\n )}\n {...props}\n >\n <div className=\"flex flex-row gap-2\">\n <Skeleton className=\"size-10 shrink-0 rounded-full\" />\n <Skeleton className=\"h-10 w-full\" />\n </div>\n <Skeleton className=\"h-20 w-full\" />\n </div>\n);\n\nexport const TweetNotFound = ({\n className,\n ...props\n}: {\n className?: string;\n [key: string]: unknown;\n}) => (\n <div\n className={cn(\n \"flex size-full flex-col items-center justify-center gap-2 rounded-lg border p-4\",\n className,\n )}\n {...props}\n >\n <h3>Tweet not found</h3>\n </div>\n);\n\nexport const TweetHeader = ({ tweet }: { tweet: EnrichedTweet }) => (\n <div className=\"flex flex-row justify-between tracking-tight\">\n <div className=\"flex items-center space-x-2\">\n <a href={tweet.user.url} target=\"_blank\" rel=\"noreferrer\">\n <img\n title={`Profile picture of ${tweet.user.name}`}\n alt={tweet.user.screen_name}\n height={48}\n width={48}\n src={tweet.user.profile_image_url_https}\n className=\"overflow-hidden rounded-full border border-transparent\"\n />\n </a>\n <div>\n <a\n href={tweet.user.url}\n target=\"_blank\"\n rel=\"noreferrer\"\n className=\"flex items-center whitespace-nowrap font-semibold\"\n >\n {truncate(tweet.user.name, 20)}\n {tweet.user.verified ||\n (tweet.user.is_blue_verified && (\n <Verified className=\"ml-1 inline size-4 text-blue-500\" />\n ))}\n </a>\n <div className=\"flex items-center space-x-1\">\n <a\n href={tweet.user.url}\n target=\"_blank\"\n rel=\"noreferrer\"\n className=\"text-sm text-gray-500 transition-all duration-75\"\n >\n @{truncate(tweet.user.screen_name, 16)}\n </a>\n </div>\n </div>\n </div>\n <a href={tweet.url} target=\"_blank\" rel=\"noreferrer\">\n <span className=\"sr-only\">Link to tweet</span>\n <Twitter className=\"size-5 items-start text-[#3BA9EE] transition-all ease-in-out hover:scale-105\" />\n </a>\n </div>\n);\n\nexport const TweetBody = ({ tweet }: { tweet: EnrichedTweet }) => (\n <div className=\"break-words leading-normal tracking-tighter\">\n {tweet.entities.map((entity, idx) => {\n switch (entity.type) {\n case \"url\":\n case \"symbol\":\n case \"hashtag\":\n case \"mention\":\n return (\n <a\n key={idx}\n href={entity.href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"text-sm font-normal text-gray-500\"\n >\n <span>{entity.text}</span>\n </a>\n );\n case \"text\":\n return (\n <span\n key={idx}\n className=\"text-sm font-normal\"\n dangerouslySetInnerHTML={{ __html: entity.text }}\n />\n );\n }\n })}\n </div>\n);\n\nexport const TweetMedia = ({ tweet }: { tweet: EnrichedTweet }) => (\n <div className=\"flex flex-1 items-center justify-center\">\n {tweet.video && (\n <video\n poster={tweet.video.poster}\n autoPlay\n loop\n muted\n playsInline\n className=\"rounded-xl border shadow-sm\"\n >\n <source src={tweet.video.variants[0].src} type=\"video/mp4\" />\n Your browser does not support the video tag.\n </video>\n )}\n {tweet.photos && (\n <div className=\"relative flex transform-gpu snap-x snap-mandatory gap-4 overflow-x-auto\">\n <div className=\"shrink-0 snap-center sm:w-2\" />\n {tweet.photos.map((photo) => (\n <img\n key={photo.url}\n src={photo.url}\n title={\"Photo by \" + tweet.user.name}\n alt={tweet.text}\n className=\"h-64 w-5/6 shrink-0 snap-center snap-always rounded-xl border object-cover shadow-sm\"\n />\n ))}\n <div className=\"shrink-0 snap-center sm:w-2\" />\n </div>\n )}\n {!tweet.video &&\n !tweet.photos &&\n // @ts-ignore\n tweet?.card?.binding_values?.thumbnail_image_large?.image_value.url && (\n <img\n // @ts-ignore\n src={tweet.card.binding_values.thumbnail_image_large.image_value.url}\n className=\"h-64 rounded-xl border object-cover shadow-sm\"\n alt={tweet.text}\n />\n )}\n </div>\n);\n\nexport const MagicTweet = ({\n tweet,\n components,\n className,\n ...props\n}: {\n tweet: Tweet;\n components?: TwitterComponents;\n className?: string;\n}) => {\n const enrichedTweet = enrichTweet(tweet);\n return (\n <div\n className={cn(\n \"relative flex size-full max-w-lg flex-col gap-2 overflow-hidden rounded-lg border p-4 backdrop-blur-md\",\n className,\n )}\n {...props}\n >\n <TweetHeader tweet={enrichedTweet} />\n <TweetBody tweet={enrichedTweet} />\n <TweetMedia tweet={enrichedTweet} />\n </div>\n );\n};\n\n/**\n * TweetCard (Server Side Only)\n */\nexport const TweetCard = async ({\n id,\n components,\n fallback = <TweetSkeleton />,\n onError,\n ...props\n}: TweetProps & {\n className?: string;\n}) => {\n const tweet = id\n ? await getTweet(id).catch((err) => {\n if (onError) {\n onError(err);\n } else {\n console.error(err);\n }\n })\n : undefined;\n\n if (!tweet) {\n const NotFound = components?.TweetNotFound || TweetNotFound;\n return <NotFound {...props} />;\n }\n\n return (\n <Suspense fallback={fallback}>\n <MagicTweet tweet={tweet} {...props} />\n </Suspense>\n );\n};\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/typing-animation-demo.json b/public/r/typing-animation-demo.jsonindex 466e8ac8..99924830 100644--- a/public/r/typing-animation-demo.json+++ b/public/r/typing-animation-demo.json@@ -11,7 +11,8 @@{"path": "registry/example/typing-animation-demo.tsx","content": "import { TypingAnimation } from \"@/registry/magicui/typing-animation\";\n\nexport default function TypingAnimationDemo() {\n return <TypingAnimation>Typing Animation</TypingAnimation>;\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/typing-animation.json b/public/r/typing-animation.jsonindex eb51ae43..63af420d 100644--- a/public/r/typing-animation.json+++ b/public/r/typing-animation.json@@ -11,7 +11,8 @@{"path": "registry/magicui/typing-animation.tsx","content": "\"use client\";\n\nimport { cn } from \"@/lib/utils\";\nimport { motion, MotionProps } from \"motion/react\";\nimport { useEffect, useRef, useState } from \"react\";\n\ninterface TypingAnimationProps extends MotionProps {\n children: string;\n className?: string;\n duration?: number;\n delay?: number;\n as?: React.ElementType;\n startOnView?: boolean;\n}\n\nexport function TypingAnimation({\n children,\n className,\n duration = 100,\n delay = 0,\n as: Component = \"div\",\n startOnView = false,\n ...props\n}: TypingAnimationProps) {\n const MotionComponent = motion.create(Component, {\n forwardMotionProps: true,\n });\n\n const [displayedText, setDisplayedText] = useState<string>(\"\");\n const [started, setStarted] = useState(false);\n const elementRef = useRef<HTMLElement | null>(null);\n\n useEffect(() => {\n if (!startOnView) {\n const startTimeout = setTimeout(() => {\n setStarted(true);\n }, delay);\n return () => clearTimeout(startTimeout);\n }\n\n const observer = new IntersectionObserver(\n ([entry]) => {\n if (entry.isIntersecting) {\n setTimeout(() => {\n setStarted(true);\n }, delay);\n observer.disconnect();\n }\n },\n { threshold: 0.1 },\n );\n\n if (elementRef.current) {\n observer.observe(elementRef.current);\n }\n\n return () => observer.disconnect();\n }, [delay, startOnView]);\n\n useEffect(() => {\n if (!started) return;\n\n let i = 0;\n const typingEffect = setInterval(() => {\n if (i < children.length) {\n setDisplayedText(children.substring(0, i + 1));\n i++;\n } else {\n clearInterval(typingEffect);\n }\n }, duration);\n\n return () => {\n clearInterval(typingEffect);\n };\n }, [children, duration, started]);\n\n return (\n <MotionComponent\n ref={elementRef}\n className={cn(\n \"text-4xl font-bold leading-[5rem] tracking-[-0.02em]\",\n className,\n )}\n {...props}\n >\n {displayedText}\n </MotionComponent>\n );\n}\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/warp-background-demo.json b/public/r/warp-background-demo.jsonindex 2f2087b9..842dd701 100644--- a/public/r/warp-background-demo.json+++ b/public/r/warp-background-demo.json@@ -11,7 +11,8 @@{"path": "registry/example/warp-background-demo.tsx","content": "import {\n Card,\n CardContent,\n CardDescription,\n CardTitle,\n} from \"@/components/ui/card\";\nimport { WarpBackground } from \"@/registry/magicui/warp-background\";\n\nexport default function ExampleComponentDemo() {\n return (\n <WarpBackground>\n <Card className=\"w-80\">\n <CardContent className=\"flex flex-col gap-2 p-4\">\n <CardTitle>Congratulations on Your Promotion!</CardTitle>\n <CardDescription>\n Your hard work and dedication have paid off. We're thrilled to\n see you take this next step in your career. Keep up the fantastic\n work!\n </CardDescription>\n </CardContent>\n </Card>\n </WarpBackground>\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/warp-background.json b/public/r/warp-background.jsonindex bc3d29f4..6781b495 100644--- a/public/r/warp-background.json+++ b/public/r/warp-background.json@@ -11,7 +11,8 @@{"path": "registry/magicui/warp-background.tsx","content": "\"use client\";\n\nimport { cn } from \"@/lib/utils\";\nimport { motion } from \"motion/react\";\nimport React, { HTMLAttributes, useCallback, useMemo } from \"react\";\n\ninterface WarpBackgroundProps extends HTMLAttributes<HTMLDivElement> {\n children: React.ReactNode;\n perspective?: number;\n beamsPerSide?: number;\n beamSize?: number;\n beamDelayMax?: number;\n beamDelayMin?: number;\n beamDuration?: number;\n gridColor?: string;\n}\n\nconst Beam = ({\n width,\n x,\n delay,\n duration,\n}: {\n width: string | number;\n x: string | number;\n delay: number;\n duration: number;\n}) => {\n const hue = Math.floor(Math.random() * 360);\n const ar = Math.floor(Math.random() * 10) + 1;\n\n return (\n <motion.div\n style={\n {\n \"--x\": `${x}`,\n \"--width\": `${width}`,\n \"--aspect-ratio\": `${ar}`,\n \"--background\": `linear-gradient(hsl(${hue} 80% 60%), transparent)`,\n } as React.CSSProperties\n }\n className={`absolute left-[var(--x)] top-0 [aspect-ratio:1/var(--aspect-ratio)] [background:var(--background)] [width:var(--width)]`}\n initial={{ y: \"100cqmax\", x: \"-50%\" }}\n animate={{ y: \"-100%\", x: \"-50%\" }}\n transition={{\n duration,\n delay,\n repeat: Infinity,\n ease: \"linear\",\n }}\n />\n );\n};\n\nexport const WarpBackground: React.FC<WarpBackgroundProps> = ({\n children,\n perspective = 100,\n className,\n beamsPerSide = 3,\n beamSize = 5,\n beamDelayMax = 3,\n beamDelayMin = 0,\n beamDuration = 3,\n gridColor = \"hsl(var(--border))\",\n ...props\n}) => {\n const generateBeams = useCallback(() => {\n const beams = [];\n const cellsPerSide = Math.floor(100 / beamSize);\n const step = cellsPerSide / beamsPerSide;\n\n for (let i = 0; i < beamsPerSide; i++) {\n const x = Math.floor(i * step);\n const delay =\n Math.random() * (beamDelayMax - beamDelayMin) + beamDelayMin;\n beams.push({ x, delay });\n }\n return beams;\n }, [beamsPerSide, beamSize, beamDelayMax, beamDelayMin]);\n\n const topBeams = useMemo(() => generateBeams(), [generateBeams]);\n const rightBeams = useMemo(() => generateBeams(), [generateBeams]);\n const bottomBeams = useMemo(() => generateBeams(), [generateBeams]);\n const leftBeams = useMemo(() => generateBeams(), [generateBeams]);\n\n return (\n <div className={cn(\"relative rounded border p-20\", className)} {...props}>\n <div\n style={\n {\n \"--perspective\": `${perspective}px`,\n \"--grid-color\": gridColor,\n \"--beam-size\": `${beamSize}%`,\n } as React.CSSProperties\n }\n className={\n \"pointer-events-none absolute left-0 top-0 size-full overflow-hidden [clip-path:inset(0)] [container-type:size] [perspective:var(--perspective)] [transform-style:preserve-3d]\"\n }\n >\n {/* top side */}\n <div className=\"absolute [transform-style:preserve-3d] [background-size:var(--beam-size)_var(--beam-size)] [background:linear-gradient(var(--grid-color)_0_1px,_transparent_1px_var(--beam-size))_50%_-0.5px_/var(--beam-size)_var(--beam-size),linear-gradient(90deg,_var(--grid-color)_0_1px,_transparent_1px_var(--beam-size))_50%_50%_/var(--beam-size)_var(--beam-size)] [container-type:inline-size] [height:100cqmax] [transform-origin:50%_0%] [transform:rotateX(-90deg)] [width:100cqi]\">\n {topBeams.map((beam, index) => (\n <Beam\n key={`top-${index}`}\n width={`${beamSize}%`}\n x={`${beam.x * beamSize}%`}\n delay={beam.delay}\n duration={beamDuration}\n />\n ))}\n </div>\n {/* bottom side */}\n <div className=\"absolute top-full [transform-style:preserve-3d] [background-size:var(--beam-size)_var(--beam-size)] [background:linear-gradient(var(--grid-color)_0_1px,_transparent_1px_var(--beam-size))_50%_-0.5px_/var(--beam-size)_var(--beam-size),linear-gradient(90deg,_var(--grid-color)_0_1px,_transparent_1px_var(--beam-size))_50%_50%_/var(--beam-size)_var(--beam-size)] [container-type:inline-size] [height:100cqmax] [transform-origin:50%_0%] [transform:rotateX(-90deg)] [width:100cqi]\">\n {bottomBeams.map((beam, index) => (\n <Beam\n key={`bottom-${index}`}\n width={`${beamSize}%`}\n x={`${beam.x * beamSize}%`}\n delay={beam.delay}\n duration={beamDuration}\n />\n ))}\n </div>\n {/* left side */}\n <div className=\"absolute left-0 top-0 [transform-style:preserve-3d] [background-size:var(--beam-size)_var(--beam-size)] [background:linear-gradient(var(--grid-color)_0_1px,_transparent_1px_var(--beam-size))_50%_-0.5px_/var(--beam-size)_var(--beam-size),linear-gradient(90deg,_var(--grid-color)_0_1px,_transparent_1px_var(--beam-size))_50%_50%_/var(--beam-size)_var(--beam-size)] [container-type:inline-size] [height:100cqmax] [transform-origin:0%_0%] [transform:rotate(90deg)_rotateX(-90deg)] [width:100cqh]\">\n {leftBeams.map((beam, index) => (\n <Beam\n key={`left-${index}`}\n width={`${beamSize}%`}\n x={`${beam.x * beamSize}%`}\n delay={beam.delay}\n duration={beamDuration}\n />\n ))}\n </div>\n {/* right side */}\n <div className=\"absolute right-0 top-0 [transform-style:preserve-3d] [background-size:var(--beam-size)_var(--beam-size)] [background:linear-gradient(var(--grid-color)_0_1px,_transparent_1px_var(--beam-size))_50%_-0.5px_/var(--beam-size)_var(--beam-size),linear-gradient(90deg,_var(--grid-color)_0_1px,_transparent_1px_var(--beam-size))_50%_50%_/var(--beam-size)_var(--beam-size)] [container-type:inline-size] [height:100cqmax] [width:100cqh] [transform-origin:100%_0%] [transform:rotate(-90deg)_rotateX(-90deg)]\">\n {rightBeams.map((beam, index) => (\n <Beam\n key={`right-${index}`}\n width={`${beamSize}%`}\n x={`${beam.x * beamSize}%`}\n delay={beam.delay}\n duration={beamDuration}\n />\n ))}\n </div>\n </div>\n <div className=\"relative\">{children}</div>\n </div>\n );\n};\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/word-rotate-demo.json b/public/r/word-rotate-demo.jsonindex cac8dd42..a2f96887 100644--- a/public/r/word-rotate-demo.json+++ b/public/r/word-rotate-demo.json@@ -11,7 +11,8 @@{"path": "registry/example/word-rotate-demo.tsx","content": "import { WordRotate } from \"@/registry/magicui/word-rotate\";\n\nexport default function WordRotateDemo() {\n return (\n <WordRotate\n className=\"text-4xl font-bold text-black dark:text-white\"\n words={[\"Word\", \"Rotate\"]}\n />\n );\n}\n",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]}\ No newline at end of filediff --git a/public/r/word-rotate.json b/public/r/word-rotate.jsonindex 3bc8a008..be0f07e8 100644--- a/public/r/word-rotate.json+++ b/public/r/word-rotate.json@@ -11,7 +11,8 @@{"path": "registry/magicui/word-rotate.tsx","content": "\"use client\";\n\nimport { AnimatePresence, motion, MotionProps } from \"motion/react\";\nimport { useEffect, useState } from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\ninterface WordRotateProps {\n words: string[];\n duration?: number;\n motionProps?: MotionProps;\n className?: string;\n}\n\nexport function WordRotate({\n words,\n duration = 2500,\n motionProps = {\n initial: { opacity: 0, y: -50 },\n animate: { opacity: 1, y: 0 },\n exit: { opacity: 0, y: 50 },\n transition: { duration: 0.25, ease: \"easeOut\" },\n },\n className,\n}: WordRotateProps) {\n const [index, setIndex] = useState(0);\n\n useEffect(() => {\n const interval = setInterval(() => {\n setIndex((prevIndex) => (prevIndex + 1) % words.length);\n }, duration);\n\n // Clean up interval on unmount\n return () => clearInterval(interval);\n }, [words, duration]);\n\n return (\n <div className=\"overflow-hidden py-2\">\n <AnimatePresence mode=\"wait\">\n <motion.h1\n key={words[index]}\n className={cn(className)}\n {...motionProps}\n >\n {words[index]}\n </motion.h1>\n </AnimatePresence>\n </div>\n );\n}\n",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]}\ No newline at end of filediff --git a/registry.json b/registry.jsonindex ef741b6d..d1a0af7b 100644--- a/registry.json+++ b/registry.json@@ -34,7 +34,8 @@"files": [{"path": "registry/magicui/magic-card.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]},@@ -46,7 +47,8 @@"files": [{"path": "registry/magicui/android.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]},@@ -61,7 +63,8 @@"files": [{"path": "registry/magicui/warp-background.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]},@@ -76,7 +79,8 @@"files": [{"path": "registry/magicui/line-shadow-text.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]},@@ -91,7 +95,8 @@"files": [{"path": "registry/magicui/aurora-text.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}],"tailwind": {@@ -206,7 +211,8 @@"files": [{"path": "registry/magicui/morphing-text.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]},@@ -221,7 +227,8 @@"files": [{"path": "registry/magicui/scroll-progress.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]},@@ -233,7 +240,8 @@"files": [{"path": "registry/magicui/neon-gradient-card.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}],"tailwind": {@@ -266,7 +274,8 @@"files": [{"path": "registry/magicui/meteors.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}],"tailwind": {@@ -304,7 +313,8 @@"files": [{"path": "registry/magicui/grid-pattern.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]},@@ -328,7 +338,8 @@"files": [{"path": "registry/magicui/dot-pattern.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]},@@ -340,7 +351,8 @@"files": [{"path": "registry/magicui/flickering-grid.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]},@@ -355,7 +367,8 @@"files": [{"path": "registry/magicui/hero-video-dialog.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]},@@ -371,7 +384,8 @@"files": [{"path": "registry/magicui/code-comparison.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]},@@ -391,7 +405,8 @@"files": [{"path": "registry/magicui/script-copy-btn.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]},@@ -403,7 +418,8 @@"files": [{"path": "registry/magicui/marquee.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}],"tailwind": {@@ -448,7 +464,8 @@"files": [{"path": "registry/magicui/globe.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]},@@ -460,7 +477,8 @@"files": [{"path": "registry/magicui/shimmer-button.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}],"tailwind": {@@ -508,7 +526,8 @@"files": [{"path": "registry/magicui/tweet-card.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]},@@ -523,7 +542,8 @@"files": [{"path": "registry/magicui/client-tweet-card.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]},@@ -541,7 +561,8 @@"files": [{"path": "registry/magicui/bento-grid.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]},@@ -553,7 +574,8 @@"files": [{"path": "registry/magicui/particles.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]},@@ -568,7 +590,8 @@"files": [{"path": "registry/magicui/number-ticker.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]},@@ -580,7 +603,8 @@"files": [{"path": "registry/magicui/ripple.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}],"tailwind": {@@ -613,7 +637,8 @@"files": [{"path": "registry/magicui/retro-grid.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}],"tailwind": {@@ -649,7 +674,8 @@"files": [{"path": "registry/magicui/animated-list.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]},@@ -661,7 +687,8 @@"files": [{"path": "registry/magicui/animated-shiny-text.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}],"tailwind": {@@ -697,7 +724,8 @@"files": [{"path": "registry/magicui/animated-grid-pattern.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]},@@ -709,7 +737,8 @@"files": [{"path": "registry/magicui/border-beam.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}],"tailwind": {@@ -742,7 +771,8 @@"files": [{"path": "registry/magicui/animated-beam.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]},@@ -757,7 +787,8 @@"files": [{"path": "registry/magicui/text-reveal.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]},@@ -772,7 +803,8 @@"files": [{"path": "registry/magicui/hyper-text.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]},@@ -814,7 +846,8 @@"files": [{"path": "registry/magicui/orbiting-circles.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}],"tailwind": {@@ -850,7 +883,8 @@"files": [{"path": "registry/magicui/dock.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]},@@ -865,7 +899,8 @@"files": [{"path": "registry/magicui/word-rotate.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]},@@ -877,7 +912,8 @@"files": [{"path": "registry/magicui/avatar-circles.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]},@@ -892,7 +928,8 @@"files": [{"path": "registry/magicui/typing-animation.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]},@@ -907,7 +944,8 @@"files": [{"path": "registry/magicui/sparkles-text.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]},@@ -922,7 +960,8 @@"files": [{"path": "registry/magicui/flip-text.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]},@@ -935,7 +974,8 @@"files": [{"path": "registry/magicui/icon-cloud.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]},@@ -950,7 +990,8 @@"files": [{"path": "registry/magicui/text-animate.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]},@@ -965,7 +1006,8 @@"files": [{"path": "registry/magicui/scroll-based-velocity.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]},@@ -980,7 +1022,8 @@"files": [{"path": "registry/magicui/scratch-to-reveal.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]},@@ -995,7 +1038,8 @@"files": [{"path": "registry/magicui/shiny-button.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]},@@ -1010,7 +1054,8 @@"files": [{"path": "registry/magicui/box-reveal.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]},@@ -1022,7 +1067,8 @@"files": [{"path": "registry/magicui/shine-border.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}],"tailwind": {@@ -1077,7 +1123,8 @@"files": [{"path": "registry/magicui/confetti.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]},@@ -1104,7 +1151,8 @@"files": [{"path": "registry/magicui/cool-mode.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]},@@ -1116,7 +1164,8 @@"files": [{"path": "registry/magicui/pulsating-button.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}],"tailwind": {@@ -1149,7 +1198,8 @@"files": [{"path": "registry/magicui/ripple-button.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}],"tailwind": {@@ -1183,7 +1233,8 @@"files": [{"path": "registry/magicui/file-tree.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]},@@ -1198,7 +1249,8 @@"files": [{"path": "registry/magicui/blur-fade.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]},@@ -1210,7 +1262,8 @@"files": [{"path": "registry/magicui/safari.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]},@@ -1222,7 +1275,8 @@"files": [{"path": "registry/magicui/iphone-15-pro.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]},@@ -1234,7 +1288,8 @@"files": [{"path": "registry/magicui/rainbow-button.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}],"tailwind": {@@ -1300,7 +1355,8 @@"files": [{"path": "registry/magicui/terminal.tsx",- "type": "registry:component"+ "type": "registry:component",+ "target": ""}]},@@ -1315,7 +1371,8 @@"files": [{"path": "registry/example/magic-card-demo.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -1330,7 +1387,8 @@"files": [{"path": "registry/example/android-demo.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -1345,7 +1403,8 @@"files": [{"path": "registry/example/android-demo-2.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -1360,7 +1419,8 @@"files": [{"path": "registry/example/android-demo-3.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -1375,7 +1435,8 @@"files": [{"path": "registry/example/warp-background-demo.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -1390,7 +1451,8 @@"files": [{"path": "registry/example/line-shadow-text-demo.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -1405,7 +1467,8 @@"files": [{"path": "registry/example/aurora-text-demo.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -1420,7 +1483,8 @@"files": [{"path": "registry/example/morphing-text-demo.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -1435,7 +1499,8 @@"files": [{"path": "registry/example/scroll-progress-demo.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -1450,7 +1515,8 @@"files": [{"path": "registry/example/neon-gradient-card-demo.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -1465,7 +1531,8 @@"files": [{"path": "registry/example/meteors-demo.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -1480,7 +1547,8 @@"files": [{"path": "registry/example/grid-pattern-demo.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -1510,7 +1578,8 @@"files": [{"path": "registry/example/grid-pattern-dashed.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -1525,7 +1594,8 @@"files": [{"path": "registry/example/dot-pattern-demo.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -1555,7 +1625,8 @@"files": [{"path": "registry/example/flickering-grid-demo.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -1585,7 +1656,8 @@"files": [{"path": "registry/example/hero-video-dialog-demo.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -1615,7 +1687,8 @@"files": [{"path": "registry/example/code-comparison-demo.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -1630,7 +1703,8 @@"files": [{"path": "registry/example/script-copy-btn-demo.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -1645,7 +1719,8 @@"files": [{"path": "registry/example/marquee-demo.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -1660,7 +1735,8 @@"files": [{"path": "registry/example/marquee-demo-vertical.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -1675,7 +1751,8 @@"files": [{"path": "registry/example/marquee-logos.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -1690,7 +1767,8 @@"files": [{"path": "registry/example/marquee-3d.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -1705,7 +1783,8 @@"files": [{"path": "registry/example/globe-demo.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -1720,7 +1799,8 @@"files": [{"path": "registry/example/tweet-card-demo.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -1735,7 +1815,8 @@"files": [{"path": "registry/example/tweet-card-images.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -1750,7 +1831,8 @@"files": [{"path": "registry/example/tweet-card-meta-preview.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -1765,7 +1847,8 @@"files": [{"path": "registry/example/shimmer-button-demo.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -1788,7 +1871,8 @@"files": [{"path": "registry/example/bento-demo.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -1806,7 +1890,8 @@"files": [{"path": "registry/example/bento-demo-vertical.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -1821,7 +1906,8 @@"files": [{"path": "registry/example/number-ticker-demo.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -1851,7 +1937,8 @@"files": [{"path": "registry/example/ripple-demo.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -1866,7 +1953,8 @@"files": [{"path": "registry/example/retro-grid-demo.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -1881,7 +1969,8 @@"files": [{"path": "registry/example/animated-list-demo.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -1917,7 +2006,8 @@"files": [{"path": "registry/example/particles-demo.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -1977,7 +2067,8 @@"files": [{"path": "registry/example/border-beam-demo.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -1995,7 +2086,8 @@"files": [{"path": "registry/example/animated-beam-demo.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -2070,7 +2162,8 @@"files": [{"path": "registry/example/text-reveal-demo.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -2106,7 +2199,8 @@"files": [{"path": "registry/example/orbiting-circles-demo.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -2121,7 +2215,8 @@"files": [{"path": "registry/example/dock-demo.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -2136,7 +2231,8 @@"files": [{"path": "registry/example/dock-demo-2.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -2151,7 +2247,8 @@"files": [{"path": "registry/example/dock-demo-3.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -2166,7 +2263,8 @@"files": [{"path": "registry/example/word-rotate-demo.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -2181,7 +2279,8 @@"files": [{"path": "registry/example/hyper-text-demo.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -2196,7 +2295,8 @@"files": [{"path": "registry/example/avatar-circles-demo.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -2211,7 +2311,8 @@"files": [{"path": "registry/example/typing-animation-demo.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -2241,7 +2342,8 @@"files": [{"path": "registry/example/scratch-to-reveal-demo.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -2256,7 +2358,8 @@"files": [{"path": "registry/example/flip-text-demo.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -2271,7 +2374,8 @@"files": [{"path": "registry/example/sparkles-text-demo.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -2286,7 +2390,8 @@"files": [{"path": "registry/example/icon-cloud-demo.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -2301,7 +2406,8 @@"files": [{"path": "registry/example/icon-cloud-demo-2.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -2316,7 +2422,8 @@"files": [{"path": "registry/example/icon-cloud-demo-3.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -2331,7 +2438,8 @@"files": [{"path": "registry/example/text-animate-demo.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -2346,7 +2454,8 @@"files": [{"path": "registry/example/text-animate-demo-2.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -2361,7 +2470,8 @@"files": [{"path": "registry/example/text-animate-demo-3.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -2376,7 +2486,8 @@"files": [{"path": "registry/example/text-animate-demo-4.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -2391,7 +2502,8 @@"files": [{"path": "registry/example/text-animate-demo-5.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -2406,7 +2518,8 @@"files": [{"path": "registry/example/text-animate-demo-6.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -2421,7 +2534,8 @@"files": [{"path": "registry/example/shiny-button-demo.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -2436,7 +2550,8 @@"files": [{"path": "registry/example/box-reveal-demo.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -2466,7 +2581,8 @@"files": [{"path": "registry/example/shine-border-demo.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -2481,7 +2597,8 @@"files": [{"path": "registry/example/shine-border-demo-2.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -2496,7 +2613,8 @@"files": [{"path": "registry/example/confetti-demo.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -2511,7 +2629,8 @@"files": [{"path": "registry/example/confetti-basic-cannon.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -2541,7 +2660,8 @@"files": [{"path": "registry/example/confetti-fireworks.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -2556,7 +2676,8 @@"files": [{"path": "registry/example/confetti-stars.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -2571,7 +2692,8 @@"files": [{"path": "registry/example/confetti-side-cannons.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -2586,7 +2708,8 @@"files": [{"path": "registry/example/confetti-custom-shapes.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -2601,7 +2724,8 @@"files": [{"path": "registry/example/confetti-emoji.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -2631,7 +2755,8 @@"files": [{"path": "registry/example/cool-mode-demo.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -2646,7 +2771,8 @@"files": [{"path": "registry/example/cool-mode-custom.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -2661,7 +2787,8 @@"files": [{"path": "registry/example/pulsating-button-demo.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -2676,7 +2803,8 @@"files": [{"path": "registry/example/ripple-button-demo.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -2691,7 +2819,8 @@"files": [{"path": "registry/example/file-tree-demo.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -2706,7 +2835,8 @@"files": [{"path": "registry/example/blur-fade-demo.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -2721,7 +2851,8 @@"files": [{"path": "registry/example/blur-fade-text-demo.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -2736,7 +2867,8 @@"files": [{"path": "registry/example/safari-demo.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -2751,7 +2883,8 @@"files": [{"path": "registry/example/safari-demo-2.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -2766,7 +2899,8 @@"files": [{"path": "registry/example/safari-demo-3.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -2781,7 +2915,8 @@"files": [{"path": "registry/example/safari-demo-4.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -2796,7 +2931,8 @@"files": [{"path": "registry/example/iphone-15-pro-demo.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -2811,7 +2947,8 @@"files": [{"path": "registry/example/iphone-15-pro-demo-2.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -2826,7 +2963,8 @@"files": [{"path": "registry/example/iphone-15-pro-demo-3.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -2841,7 +2979,8 @@"files": [{"path": "registry/example/rainbow-button-demo.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},@@ -2871,7 +3010,8 @@"files": [{"path": "registry/example/terminal-demo.tsx",- "type": "registry:example"+ "type": "registry:example",+ "target": ""}]},diff --git a/registry/registry-examples.ts b/registry/registry-examples.tsindex cbb04eca..c52b3df1 100644--- a/registry/registry-examples.ts+++ b/registry/registry-examples.ts@@ -8,7 +8,13 @@ export const examples: Registry["items"] = [description:"Example showing a spotlight effect that follows your mouse cursor and highlights borders on hover.",registryDependencies: ["https://magicui.design/r/magic-card"],- files: [{ path: "example/magic-card-demo.tsx", type: "registry:example" }],+ files: [+ {+ path: "example/magic-card-demo.tsx",+ type: "registry:example",+ target: "",+ },+ ],},{name: "android-demo",@@ -16,7 +22,13 @@ export const examples: Registry["items"] = [title: "Android Demo",description: "Example showing a mockup of an Android device.",registryDependencies: ["https://magicui.design/r/android"],- files: [{ path: "example/android-demo.tsx", type: "registry:example" }],+ files: [+ {+ path: "example/android-demo.tsx",+ type: "registry:example",+ target: "",+ },+ ],},{name: "android-demo-2",@@ -24,7 +36,13 @@ export const examples: Registry["items"] = [title: "Android Demo 2",description: "Second example showing a mockup of an Android device.",registryDependencies: ["https://magicui.design/r/android"],- files: [{ path: "example/android-demo-2.tsx", type: "registry:example" }],+ files: [+ {+ path: "example/android-demo-2.tsx",+ type: "registry:example",+ target: "",+ },+ ],},{name: "android-demo-3",@@ -32,7 +50,13 @@ export const examples: Registry["items"] = [title: "Android Demo 3",description: "Third example showing a mockup of an Android device.",registryDependencies: ["https://magicui.design/r/android"],- files: [{ path: "example/android-demo-3.tsx", type: "registry:example" }],+ files: [+ {+ path: "example/android-demo-3.tsx",+ type: "registry:example",+ target: "",+ },+ ],},{name: "warp-background-demo",@@ -42,7 +66,11 @@ export const examples: Registry["items"] = ["Example showing a card with a time warping background effect.",registryDependencies: ["https://magicui.design/r/warp-background"],files: [- { path: "example/warp-background-demo.tsx", type: "registry:example" },+ {+ path: "example/warp-background-demo.tsx",+ type: "registry:example",+ target: "",+ },],},{@@ -52,7 +80,11 @@ export const examples: Registry["items"] = [description: "Example showing a text component with a moving line shadow.",registryDependencies: ["https://magicui.design/r/line-shadow-text"],files: [- { path: "example/line-shadow-text-demo.tsx", type: "registry:example" },+ {+ path: "example/line-shadow-text-demo.tsx",+ type: "registry:example",+ target: "",+ },],},{@@ -61,7 +93,13 @@ export const examples: Registry["items"] = [title: "Aurora Text Demo",description: "Example showing a beautiful aurora text effect.",registryDependencies: ["https://magicui.design/r/aurora-text"],- files: [{ path: "example/aurora-text-demo.tsx", type: "registry:example" }],+ files: [+ {+ path: "example/aurora-text-demo.tsx",+ type: "registry:example",+ target: "",+ },+ ],},{name: "morphing-text-demo",@@ -70,7 +108,11 @@ export const examples: Registry["items"] = [description: "Example showing a dynamic text morphing component.",registryDependencies: ["https://magicui.design/r/morphing-text"],files: [- { path: "example/morphing-text-demo.tsx", type: "registry:example" },+ {+ path: "example/morphing-text-demo.tsx",+ type: "registry:example",+ target: "",+ },],},{@@ -80,7 +122,11 @@ export const examples: Registry["items"] = [description: "Example showing animated scroll progress for your pages.",registryDependencies: ["https://magicui.design/r/scroll-progress"],files: [- { path: "example/scroll-progress-demo.tsx", type: "registry:example" },+ {+ path: "example/scroll-progress-demo.tsx",+ type: "registry:example",+ target: "",+ },],},{@@ -90,7 +136,11 @@ export const examples: Registry["items"] = [description: "Example showing a beautiful neon card effect.",registryDependencies: ["https://magicui.design/r/neon-gradient-card"],files: [- { path: "example/neon-gradient-card-demo.tsx", type: "registry:example" },+ {+ path: "example/neon-gradient-card-demo.tsx",+ type: "registry:example",+ target: "",+ },],},{@@ -99,7 +149,13 @@ export const examples: Registry["items"] = [title: "Meteors Demo",description: "Example showing a meteor shower effect.",registryDependencies: ["https://magicui.design/r/meteors"],- files: [{ path: "example/meteors-demo.tsx", type: "registry:example" }],+ files: [+ {+ path: "example/meteors-demo.tsx",+ type: "registry:example",+ target: "",+ },+ ],},{name: "grid-pattern-demo",@@ -108,7 +164,11 @@ export const examples: Registry["items"] = [description: "Example showing a background grid pattern made with SVGs.",registryDependencies: ["https://magicui.design/r/grid-pattern"],files: [- { path: "example/grid-pattern-demo.tsx", type: "registry:example" },+ {+ path: "example/grid-pattern-demo.tsx",+ type: "registry:example",+ target: "",+ },],},{@@ -131,7 +191,11 @@ export const examples: Registry["items"] = [description: "Example showing a dashed grid pattern.",registryDependencies: ["https://magicui.design/r/grid-pattern"],files: [- { path: "example/grid-pattern-dashed.tsx", type: "registry:example" },+ {+ path: "example/grid-pattern-dashed.tsx",+ type: "registry:example",+ target: "",+ },],},{@@ -140,7 +204,13 @@ export const examples: Registry["items"] = [title: "Dot Pattern Demo",description: "Example showing a background dot pattern made with SVGs.",registryDependencies: ["https://magicui.design/r/dot-pattern"],- files: [{ path: "example/dot-pattern-demo.tsx", type: "registry:example" }],+ files: [+ {+ path: "example/dot-pattern-demo.tsx",+ type: "registry:example",+ target: "",+ },+ ],},{name: "dot-pattern-linear-gradient",@@ -162,7 +232,11 @@ export const examples: Registry["items"] = [description: "Example showing a flickering grid background.",registryDependencies: ["https://magicui.design/r/flickering-grid"],files: [- { path: "example/flickering-grid-demo.tsx", type: "registry:example" },+ {+ path: "example/flickering-grid-demo.tsx",+ type: "registry:example",+ target: "",+ },],},{@@ -186,7 +260,11 @@ export const examples: Registry["items"] = [description: "Example showing a hero video dialog component.",registryDependencies: ["https://magicui.design/r/hero-video-dialog"],files: [- { path: "example/hero-video-dialog-demo.tsx", type: "registry:example" },+ {+ path: "example/hero-video-dialog-demo.tsx",+ type: "registry:example",+ target: "",+ },],},{@@ -211,7 +289,11 @@ export const examples: Registry["items"] = ["Example showing a component which compares two code snippets.",registryDependencies: ["https://magicui.design/r/code-comparison"],files: [- { path: "example/code-comparison-demo.tsx", type: "registry:example" },+ {+ path: "example/code-comparison-demo.tsx",+ type: "registry:example",+ target: "",+ },],},{@@ -221,7 +303,11 @@ export const examples: Registry["items"] = [description: "Example showing how to copy code to clipboard.",registryDependencies: ["https://magicui.design/r/script-copy-btn"],files: [- { path: "example/script-copy-btn-demo.tsx", type: "registry:example" },+ {+ path: "example/script-copy-btn-demo.tsx",+ type: "registry:example",+ target: "",+ },],},{@@ -230,7 +316,13 @@ export const examples: Registry["items"] = [title: "Marquee Demo",description: "Example showing an infinite scrolling component.",registryDependencies: ["https://magicui.design/r/marquee"],- files: [{ path: "example/marquee-demo.tsx", type: "registry:example" }],+ files: [+ {+ path: "example/marquee-demo.tsx",+ type: "registry:example",+ target: "",+ },+ ],},{name: "marquee-demo-vertical",@@ -239,7 +331,11 @@ export const examples: Registry["items"] = [description: "Example showing a vertical infinite scrolling component.",registryDependencies: ["https://magicui.design/r/marquee"],files: [- { path: "example/marquee-demo-vertical.tsx", type: "registry:example" },+ {+ path: "example/marquee-demo-vertical.tsx",+ type: "registry:example",+ target: "",+ },],},{@@ -248,7 +344,13 @@ export const examples: Registry["items"] = [title: "Marquee Logos",description: "Example showing an infinite scrolling logo carousel.",registryDependencies: ["https://magicui.design/r/marquee"],- files: [{ path: "example/marquee-logos.tsx", type: "registry:example" }],+ files: [+ {+ path: "example/marquee-logos.tsx",+ type: "registry:example",+ target: "",+ },+ ],},{name: "marquee-3d",@@ -256,7 +358,9 @@ export const examples: Registry["items"] = [title: "Marquee 3D",description: "Example showing a 3D infinite scrolling component.",registryDependencies: ["https://magicui.design/r/marquee"],- files: [{ path: "example/marquee-3d.tsx", type: "registry:example" }],+ files: [+ { path: "example/marquee-3d.tsx", type: "registry:example", target: "" },+ ],},{name: "globe-demo",@@ -264,7 +368,9 @@ export const examples: Registry["items"] = [title: "Globe Demo",description: "Example showing an autorotating, interactive WebGL globe.",registryDependencies: ["https://magicui.design/r/globe"],- files: [{ path: "example/globe-demo.tsx", type: "registry:example" }],+ files: [+ { path: "example/globe-demo.tsx", type: "registry:example", target: "" },+ ],},{name: "tweet-card-demo",@@ -272,7 +378,13 @@ export const examples: Registry["items"] = [title: "Tweet Card Demo",description: "Example showing a tweet card with author info.",registryDependencies: ["https://magicui.design/r/tweet-card"],- files: [{ path: "example/tweet-card-demo.tsx", type: "registry:example" }],+ files: [+ {+ path: "example/tweet-card-demo.tsx",+ type: "registry:example",+ target: "",+ },+ ],},{name: "tweet-card-images",@@ -281,7 +393,11 @@ export const examples: Registry["items"] = [description: "Example showing a tweet card with images.",registryDependencies: ["https://magicui.design/r/tweet-card"],files: [- { path: "example/tweet-card-images.tsx", type: "registry:example" },+ {+ path: "example/tweet-card-images.tsx",+ type: "registry:example",+ target: "",+ },],},{@@ -291,7 +407,11 @@ export const examples: Registry["items"] = [description: "Example showing a tweet card with meta preview.",registryDependencies: ["https://magicui.design/r/tweet-card"],files: [- { path: "example/tweet-card-meta-preview.tsx", type: "registry:example" },+ {+ path: "example/tweet-card-meta-preview.tsx",+ type: "registry:example",+ target: "",+ },],},{@@ -301,7 +421,11 @@ export const examples: Registry["items"] = [description: "Example showing a button with a shimmering light effect.",registryDependencies: ["https://magicui.design/r/shimmer-button"],files: [- { path: "example/shimmer-button-demo.tsx", type: "registry:example" },+ {+ path: "example/shimmer-button-demo.tsx",+ type: "registry:example",+ target: "",+ },],},{@@ -318,7 +442,9 @@ export const examples: Registry["items"] = ["https://magicui.design/r/animated-beam-multiple-outputs",],dependencies: ["@radix-ui/react-icons"],- files: [{ path: "example/bento-demo.tsx", type: "registry:example" }],+ files: [+ { path: "example/bento-demo.tsx", type: "registry:example", target: "" },+ ],},{name: "bento-demo-vertical",@@ -328,7 +454,11 @@ export const examples: Registry["items"] = [registryDependencies: ["https://magicui.design/r/bento-grid"],dependencies: ["@radix-ui/react-icons"],files: [- { path: "example/bento-demo-vertical.tsx", type: "registry:example" },+ {+ path: "example/bento-demo-vertical.tsx",+ type: "registry:example",+ target: "",+ },],},{@@ -338,7 +468,11 @@ export const examples: Registry["items"] = [description: "Example showing animated counting numbers.",registryDependencies: ["https://magicui.design/r/number-ticker"],files: [- { path: "example/number-ticker-demo.tsx", type: "registry:example" },+ {+ path: "example/number-ticker-demo.tsx",+ type: "registry:example",+ target: "",+ },],},{@@ -360,7 +494,9 @@ export const examples: Registry["items"] = [title: "Ripple Demo",description: "Example showing an animated ripple effect.",registryDependencies: ["https://magicui.design/r/ripple"],- files: [{ path: "example/ripple-demo.tsx", type: "registry:example" }],+ files: [+ { path: "example/ripple-demo.tsx", type: "registry:example", target: "" },+ ],},{name: "retro-grid-demo",@@ -368,7 +504,13 @@ export const examples: Registry["items"] = [title: "Retro Grid Demo",description: "Example showing an animated scrolling retro grid effect.",registryDependencies: ["https://magicui.design/r/retro-grid"],- files: [{ path: "example/retro-grid-demo.tsx", type: "registry:example" }],+ files: [+ {+ path: "example/retro-grid-demo.tsx",+ type: "registry:example",+ target: "",+ },+ ],},{name: "animated-list-demo",@@ -377,7 +519,11 @@ export const examples: Registry["items"] = [description: "Example showing a list with sequenced item animations.",registryDependencies: ["https://magicui.design/r/animated-list"],files: [- { path: "example/animated-list-demo.tsx", type: "registry:example" },+ {+ path: "example/animated-list-demo.tsx",+ type: "registry:example",+ target: "",+ },],},{@@ -401,7 +547,13 @@ export const examples: Registry["items"] = [description: "Example showing interactive particle effects.",registryDependencies: ["https://magicui.design/r/particles"],dependencies: ["next-themes"],- files: [{ path: "example/particles-demo.tsx", type: "registry:example" }],+ files: [+ {+ path: "example/particles-demo.tsx",+ type: "registry:example",+ target: "",+ },+ ],},{name: "animated-grid-pattern-demo",@@ -449,7 +601,13 @@ export const examples: Registry["items"] = [title: "Border Beam Demo",description: "Example showing an animated border beam effect.",registryDependencies: ["https://magicui.design/r/border-beam"],- files: [{ path: "example/border-beam-demo.tsx", type: "registry:example" }],+ files: [+ {+ path: "example/border-beam-demo.tsx",+ type: "registry:example",+ target: "",+ },+ ],},{name: "animated-beam-demo",@@ -459,7 +617,11 @@ export const examples: Registry["items"] = [registryDependencies: ["https://magicui.design/r/animated-beam"],dependencies: ["@radix-ui/react-icons"],files: [- { path: "example/animated-beam-demo.tsx", type: "registry:example" },+ {+ path: "example/animated-beam-demo.tsx",+ type: "registry:example",+ target: "",+ },],},{@@ -520,7 +682,13 @@ export const examples: Registry["items"] = [title: "Text Reveal Demo",description: "Example showing text that fades in on scroll.",registryDependencies: ["https://magicui.design/r/text-reveal"],- files: [{ path: "example/text-reveal-demo.tsx", type: "registry:example" }],+ files: [+ {+ path: "example/text-reveal-demo.tsx",+ type: "registry:example",+ target: "",+ },+ ],},{name: "animated-gradient-text-demo",@@ -544,7 +712,11 @@ export const examples: Registry["items"] = [registryDependencies: ["https://magicui.design/r/orbiting-circles"],dependencies: ["@radix-ui/react-icons"],files: [- { path: "example/orbiting-circles-demo.tsx", type: "registry:example" },+ {+ path: "example/orbiting-circles-demo.tsx",+ type: "registry:example",+ target: "",+ },],},{@@ -553,7 +725,9 @@ export const examples: Registry["items"] = [title: "Dock Demo",description: "Example showing a MacOS-style dock implementation.",registryDependencies: ["https://magicui.design/r/dock"],- files: [{ path: "example/dock-demo.tsx", type: "registry:example" }],+ files: [+ { path: "example/dock-demo.tsx", type: "registry:example", target: "" },+ ],},{name: "dock-demo-2",@@ -561,7 +735,9 @@ export const examples: Registry["items"] = [title: "Dock Demo 2",description: "Second example showing a MacOS-style dock implementation.",registryDependencies: ["https://magicui.design/r/dock"],- files: [{ path: "example/dock-demo-2.tsx", type: "registry:example" }],+ files: [+ { path: "example/dock-demo-2.tsx", type: "registry:example", target: "" },+ ],},{name: "dock-demo-3",@@ -569,7 +745,9 @@ export const examples: Registry["items"] = [title: "Dock Demo 3",description: "Third example showing a MacOS-style dock implementation.",registryDependencies: ["https://magicui.design/r/dock"],- files: [{ path: "example/dock-demo-3.tsx", type: "registry:example" }],+ files: [+ { path: "example/dock-demo-3.tsx", type: "registry:example", target: "" },+ ],},{name: "word-rotate-demo",@@ -577,7 +755,13 @@ export const examples: Registry["items"] = [title: "Word Rotate Demo",description: "Example showing vertical word rotation animation.",registryDependencies: ["https://magicui.design/r/word-rotate"],- files: [{ path: "example/word-rotate-demo.tsx", type: "registry:example" }],+ files: [+ {+ path: "example/word-rotate-demo.tsx",+ type: "registry:example",+ target: "",+ },+ ],},{name: "hyper-text-demo",@@ -585,7 +769,13 @@ export const examples: Registry["items"] = [title: "Hyper Text Demo",description: "Example showing text with scrambling letter animations.",registryDependencies: ["https://magicui.design/r/hyper-text"],- files: [{ path: "example/hyper-text-demo.tsx", type: "registry:example" }],+ files: [+ {+ path: "example/hyper-text-demo.tsx",+ type: "registry:example",+ target: "",+ },+ ],},{name: "avatar-circles-demo",@@ -594,7 +784,11 @@ export const examples: Registry["items"] = [description: "Example showing overlapping avatar circles.",registryDependencies: ["https://magicui.design/r/avatar-circles"],files: [- { path: "example/avatar-circles-demo.tsx", type: "registry:example" },+ {+ path: "example/avatar-circles-demo.tsx",+ type: "registry:example",+ target: "",+ },],},{@@ -604,7 +798,11 @@ export const examples: Registry["items"] = [description: "Example showing typed character animations.",registryDependencies: ["https://magicui.design/r/typing-animation"],files: [- { path: "example/typing-animation-demo.tsx", type: "registry:example" },+ {+ path: "example/typing-animation-demo.tsx",+ type: "registry:example",+ target: "",+ },],},{@@ -627,7 +825,11 @@ export const examples: Registry["items"] = [description: "Example showing an interactive scratch-off reveal effect.",registryDependencies: ["https://magicui.design/r/scratch-to-reveal"],files: [- { path: "example/scratch-to-reveal-demo.tsx", type: "registry:example" },+ {+ path: "example/scratch-to-reveal-demo.tsx",+ type: "registry:example",+ target: "",+ },],},{@@ -636,7 +838,13 @@ export const examples: Registry["items"] = [title: "Flip Text Demo",description: "Example showing text with character flip animations.",registryDependencies: ["https://magicui.design/r/flip-text"],- files: [{ path: "example/flip-text-demo.tsx", type: "registry:example" }],+ files: [+ {+ path: "example/flip-text-demo.tsx",+ type: "registry:example",+ target: "",+ },+ ],},{name: "sparkles-text-demo",@@ -645,7 +853,11 @@ export const examples: Registry["items"] = [description: "Example showing text with animated sparkle effects.",registryDependencies: ["https://magicui.design/r/sparkles-text"],files: [- { path: "example/sparkles-text-demo.tsx", type: "registry:example" },+ {+ path: "example/sparkles-text-demo.tsx",+ type: "registry:example",+ target: "",+ },],},{@@ -654,7 +866,13 @@ export const examples: Registry["items"] = [title: "Icon Cloud Demo",description: "Example showing an interactive 3D icon cloud.",registryDependencies: ["https://magicui.design/r/icon-cloud"],- files: [{ path: "example/icon-cloud-demo.tsx", type: "registry:example" }],+ files: [+ {+ path: "example/icon-cloud-demo.tsx",+ type: "registry:example",+ target: "",+ },+ ],},{name: "icon-cloud-demo-2",@@ -663,7 +881,11 @@ export const examples: Registry["items"] = [description: "Second example showing an interactive 3D icon cloud.",registryDependencies: ["https://magicui.design/r/icon-cloud"],files: [- { path: "example/icon-cloud-demo-2.tsx", type: "registry:example" },+ {+ path: "example/icon-cloud-demo-2.tsx",+ type: "registry:example",+ target: "",+ },],},{@@ -673,7 +895,11 @@ export const examples: Registry["items"] = [description: "Third example showing an interactive 3D icon cloud.",registryDependencies: ["https://magicui.design/r/icon-cloud"],files: [- { path: "example/icon-cloud-demo-3.tsx", type: "registry:example" },+ {+ path: "example/icon-cloud-demo-3.tsx",+ type: "registry:example",+ target: "",+ },],},{@@ -683,7 +909,11 @@ export const examples: Registry["items"] = [description: "Example showing various text animations.",registryDependencies: ["https://magicui.design/r/text-animate"],files: [- { path: "example/text-animate-demo.tsx", type: "registry:example" },+ {+ path: "example/text-animate-demo.tsx",+ type: "registry:example",+ target: "",+ },],},{@@ -693,7 +923,11 @@ export const examples: Registry["items"] = [description: "Second example showing various text animations.",registryDependencies: ["https://magicui.design/r/text-animate"],files: [- { path: "example/text-animate-demo-2.tsx", type: "registry:example" },+ {+ path: "example/text-animate-demo-2.tsx",+ type: "registry:example",+ target: "",+ },],},{@@ -703,7 +937,11 @@ export const examples: Registry["items"] = [description: "Third example showing various text animations.",registryDependencies: ["https://magicui.design/r/text-animate"],files: [- { path: "example/text-animate-demo-3.tsx", type: "registry:example" },+ {+ path: "example/text-animate-demo-3.tsx",+ type: "registry:example",+ target: "",+ },],},{@@ -713,7 +951,11 @@ export const examples: Registry["items"] = [description: "Fourth example showing various text animations.",registryDependencies: ["https://magicui.design/r/text-animate"],files: [- { path: "example/text-animate-demo-4.tsx", type: "registry:example" },+ {+ path: "example/text-animate-demo-4.tsx",+ type: "registry:example",+ target: "",+ },],},{@@ -723,7 +965,11 @@ export const examples: Registry["items"] = [description: "Fifth example showing various text animations.",registryDependencies: ["https://magicui.design/r/text-animate"],files: [- { path: "example/text-animate-demo-5.tsx", type: "registry:example" },+ {+ path: "example/text-animate-demo-5.tsx",+ type: "registry:example",+ target: "",+ },],},{@@ -733,7 +979,11 @@ export const examples: Registry["items"] = [description: "Sixth example showing various text animations.",registryDependencies: ["https://magicui.design/r/text-animate"],files: [- { path: "example/text-animate-demo-6.tsx", type: "registry:example" },+ {+ path: "example/text-animate-demo-6.tsx",+ type: "registry:example",+ target: "",+ },],},{@@ -743,7 +993,11 @@ export const examples: Registry["items"] = [description: "Example showing a shiny button with dynamic styles.",registryDependencies: ["https://magicui.design/r/shiny-button"],files: [- { path: "example/shiny-button-demo.tsx", type: "registry:example" },+ {+ path: "example/shiny-button-demo.tsx",+ type: "registry:example",+ target: "",+ },],},{@@ -752,7 +1006,13 @@ export const examples: Registry["items"] = [title: "Box Reveal Demo",description: "Example showing a sliding box text reveal animation.",registryDependencies: ["https://magicui.design/r/box-reveal"],- files: [{ path: "example/box-reveal-demo.tsx", type: "registry:example" }],+ files: [+ {+ path: "example/box-reveal-demo.tsx",+ type: "registry:example",+ target: "",+ },+ ],},{name: "animated-circular-progress-bar-demo",@@ -776,7 +1036,11 @@ export const examples: Registry["items"] = [description: "Example showing an animated shining border effect.",registryDependencies: ["https://magicui.design/r/shine-border"],files: [- { path: "example/shine-border-demo.tsx", type: "registry:example" },+ {+ path: "example/shine-border-demo.tsx",+ type: "registry:example",+ target: "",+ },],},{@@ -786,7 +1050,11 @@ export const examples: Registry["items"] = [description: "Second example showing an animated shining border effect.",registryDependencies: ["https://magicui.design/r/shine-border"],files: [- { path: "example/shine-border-demo-2.tsx", type: "registry:example" },+ {+ path: "example/shine-border-demo-2.tsx",+ type: "registry:example",+ target: "",+ },],},{@@ -795,7 +1063,13 @@ export const examples: Registry["items"] = [title: "Confetti Demo",description: "Example showing confetti animations for celebrations.",registryDependencies: ["https://magicui.design/r/confetti"],- files: [{ path: "example/confetti-demo.tsx", type: "registry:example" }],+ files: [+ {+ path: "example/confetti-demo.tsx",+ type: "registry:example",+ target: "",+ },+ ],},{name: "confetti-basic-cannon",@@ -804,7 +1078,11 @@ export const examples: Registry["items"] = [description: "Example showing basic confetti cannon animation.",registryDependencies: ["https://magicui.design/r/confetti"],files: [- { path: "example/confetti-basic-cannon.tsx", type: "registry:example" },+ {+ path: "example/confetti-basic-cannon.tsx",+ type: "registry:example",+ target: "",+ },],},{@@ -827,7 +1105,11 @@ export const examples: Registry["items"] = [description: "Example showing fireworks-style confetti animation.",registryDependencies: ["https://magicui.design/r/confetti"],files: [- { path: "example/confetti-fireworks.tsx", type: "registry:example" },+ {+ path: "example/confetti-fireworks.tsx",+ type: "registry:example",+ target: "",+ },],},{@@ -836,7 +1118,13 @@ export const examples: Registry["items"] = [title: "Confetti Stars",description: "Example showing star-shaped confetti animation.",registryDependencies: ["https://magicui.design/r/confetti"],- files: [{ path: "example/confetti-stars.tsx", type: "registry:example" }],+ files: [+ {+ path: "example/confetti-stars.tsx",+ type: "registry:example",+ target: "",+ },+ ],},{name: "confetti-side-cannons",@@ -845,7 +1133,11 @@ export const examples: Registry["items"] = [description: "Example showing side-mounted confetti cannons.",registryDependencies: ["https://magicui.design/r/confetti"],files: [- { path: "example/confetti-side-cannons.tsx", type: "registry:example" },+ {+ path: "example/confetti-side-cannons.tsx",+ type: "registry:example",+ target: "",+ },],},{@@ -855,7 +1147,11 @@ export const examples: Registry["items"] = [description: "Example showing confetti with custom shape particles.",registryDependencies: ["https://magicui.design/r/confetti"],files: [- { path: "example/confetti-custom-shapes.tsx", type: "registry:example" },+ {+ path: "example/confetti-custom-shapes.tsx",+ type: "registry:example",+ target: "",+ },],},{@@ -864,7 +1160,13 @@ export const examples: Registry["items"] = [title: "Confetti Emoji",description: "Example showing confetti with emoji particles.",registryDependencies: ["https://magicui.design/r/confetti"],- files: [{ path: "example/confetti-emoji.tsx", type: "registry:example" }],+ files: [+ {+ path: "example/confetti-emoji.tsx",+ type: "registry:example",+ target: "",+ },+ ],},{name: "animated-subscribe-button-demo",@@ -888,7 +1190,13 @@ export const examples: Registry["items"] = [title: "Cool Mode Demo",description: "Example showing cool mode effect for buttons and links.",registryDependencies: ["https://magicui.design/r/cool-mode"],- files: [{ path: "example/cool-mode-demo.tsx", type: "registry:example" }],+ files: [+ {+ path: "example/cool-mode-demo.tsx",+ type: "registry:example",+ target: "",+ },+ ],},{name: "cool-mode-custom",@@ -896,7 +1204,13 @@ export const examples: Registry["items"] = [title: "Cool Mode Custom",description: "Example showing customized cool mode effects.",registryDependencies: ["https://magicui.design/r/cool-mode"],- files: [{ path: "example/cool-mode-custom.tsx", type: "registry:example" }],+ files: [+ {+ path: "example/cool-mode-custom.tsx",+ type: "registry:example",+ target: "",+ },+ ],},{name: "pulsating-button-demo",@@ -905,7 +1219,11 @@ export const examples: Registry["items"] = [description: "Example showing an animated pulsating button.",registryDependencies: ["https://magicui.design/r/pulsating-button"],files: [- { path: "example/pulsating-button-demo.tsx", type: "registry:example" },+ {+ path: "example/pulsating-button-demo.tsx",+ type: "registry:example",+ target: "",+ },],},{@@ -915,7 +1233,11 @@ export const examples: Registry["items"] = [description: "Example showing an animated button with ripple effect.",registryDependencies: ["https://magicui.design/r/ripple-button"],files: [- { path: "example/ripple-button-demo.tsx", type: "registry:example" },+ {+ path: "example/ripple-button-demo.tsx",+ type: "registry:example",+ target: "",+ },],},{@@ -925,7 +1247,13 @@ export const examples: Registry["items"] = [description:"Example showing a component that displays folder and file structure.",registryDependencies: ["https://magicui.design/r/file-tree"],- files: [{ path: "example/file-tree-demo.tsx", type: "registry:example" }],+ files: [+ {+ path: "example/file-tree-demo.tsx",+ type: "registry:example",+ target: "",+ },+ ],},{name: "blur-fade-demo",@@ -933,7 +1261,13 @@ export const examples: Registry["items"] = [title: "Blur Fade Demo",description: "Example showing blur fade in and out animations.",registryDependencies: ["https://magicui.design/r/blur-fade"],- files: [{ path: "example/blur-fade-demo.tsx", type: "registry:example" }],+ files: [+ {+ path: "example/blur-fade-demo.tsx",+ type: "registry:example",+ target: "",+ },+ ],},{name: "blur-fade-text-demo",@@ -942,7 +1276,11 @@ export const examples: Registry["items"] = [description: "Example showing blur fade animations with text.",registryDependencies: ["https://magicui.design/r/blur-fade"],files: [- { path: "example/blur-fade-text-demo.tsx", type: "registry:example" },+ {+ path: "example/blur-fade-text-demo.tsx",+ type: "registry:example",+ target: "",+ },],},{@@ -951,7 +1289,9 @@ export const examples: Registry["items"] = [title: "Safari Demo",description: "Example showing a Safari browser mockup.",registryDependencies: ["https://magicui.design/r/safari"],- files: [{ path: "example/safari-demo.tsx", type: "registry:example" }],+ files: [+ { path: "example/safari-demo.tsx", type: "registry:example", target: "" },+ ],},{name: "safari-demo-2",@@ -959,7 +1299,13 @@ export const examples: Registry["items"] = [title: "Safari Demo 2",description: "Second example showing a Safari browser mockup.",registryDependencies: ["https://magicui.design/r/safari"],- files: [{ path: "example/safari-demo-2.tsx", type: "registry:example" }],+ files: [+ {+ path: "example/safari-demo-2.tsx",+ type: "registry:example",+ target: "",+ },+ ],},{name: "safari-demo-3",@@ -967,7 +1313,13 @@ export const examples: Registry["items"] = [title: "Safari Demo 3",description: "Third example showing a Safari browser mockup.",registryDependencies: ["https://magicui.design/r/safari"],- files: [{ path: "example/safari-demo-3.tsx", type: "registry:example" }],+ files: [+ {+ path: "example/safari-demo-3.tsx",+ type: "registry:example",+ target: "",+ },+ ],},{name: "safari-demo-4",@@ -975,7 +1327,13 @@ export const examples: Registry["items"] = [title: "Safari Demo 4",description: "Fourth example showing a Safari browser mockup.",registryDependencies: ["https://magicui.design/r/safari"],- files: [{ path: "example/safari-demo-4.tsx", type: "registry:example" }],+ files: [+ {+ path: "example/safari-demo-4.tsx",+ type: "registry:example",+ target: "",+ },+ ],},{name: "iphone-15-pro-demo",@@ -984,7 +1342,11 @@ export const examples: Registry["items"] = [description: "Example showing an iPhone 15 Pro mockup.",registryDependencies: ["https://magicui.design/r/iphone-15-pro"],files: [- { path: "example/iphone-15-pro-demo.tsx", type: "registry:example" },+ {+ path: "example/iphone-15-pro-demo.tsx",+ type: "registry:example",+ target: "",+ },],},{@@ -994,7 +1356,11 @@ export const examples: Registry["items"] = [description: "Second example showing an iPhone 15 Pro mockup.",registryDependencies: ["https://magicui.design/r/iphone-15-pro"],files: [- { path: "example/iphone-15-pro-demo-2.tsx", type: "registry:example" },+ {+ path: "example/iphone-15-pro-demo-2.tsx",+ type: "registry:example",+ target: "",+ },],},{@@ -1004,7 +1370,11 @@ export const examples: Registry["items"] = [description: "Third example showing an iPhone 15 Pro mockup.",registryDependencies: ["https://magicui.design/r/iphone-15-pro"],files: [- { path: "example/iphone-15-pro-demo-3.tsx", type: "registry:example" },+ {+ path: "example/iphone-15-pro-demo-3.tsx",+ type: "registry:example",+ target: "",+ },],},{@@ -1014,7 +1384,11 @@ export const examples: Registry["items"] = [description: "Example showing an animated button with rainbow effect.",registryDependencies: ["https://magicui.design/r/rainbow-button"],files: [- { path: "example/rainbow-button-demo.tsx", type: "registry:example" },+ {+ path: "example/rainbow-button-demo.tsx",+ type: "registry:example",+ target: "",+ },],},{@@ -1036,6 +1410,12 @@ export const examples: Registry["items"] = [title: "Terminal Demo",description: "Example showing a terminal with animated text.",registryDependencies: ["https://magicui.design/r/terminal"],- files: [{ path: "example/terminal-demo.tsx", type: "registry:example" }],+ files: [+ {+ path: "example/terminal-demo.tsx",+ type: "registry:example",+ target: "",+ },+ ],},];diff --git a/registry/registry-ui.ts b/registry/registry-ui.tsindex 90365f89..3b540943 100644--- a/registry/registry-ui.ts+++ b/registry/registry-ui.ts@@ -8,14 +8,22 @@ export const ui: Registry["items"] = [description:"A spotlight effect that follows your mouse cursor and highlights borders on hover.",dependencies: ["motion"],- files: [{ path: "magicui/magic-card.tsx", type: "registry:component" }],+ files: [+ {+ path: "magicui/magic-card.tsx",+ type: "registry:component",+ target: "",+ },+ ],},{name: "android",type: "registry:component",title: "Android",description: "A mockup of an Android device.",- files: [{ path: "magicui/android.tsx", type: "registry:component" }],+ files: [+ { path: "magicui/android.tsx", type: "registry:component", target: "" },+ ],},{name: "warp-background",@@ -24,7 +32,11 @@ export const ui: Registry["items"] = [description: "A card with a time warping background effect.",dependencies: ["motion"],files: [- { path: "magicui/warp-background.tsx", type: "registry:component" },+ {+ path: "magicui/warp-background.tsx",+ type: "registry:component",+ target: "",+ },],},{@@ -34,7 +46,11 @@ export const ui: Registry["items"] = [description: "A text component with a moving line shadow.",dependencies: ["motion"],files: [- { path: "magicui/line-shadow-text.tsx", type: "registry:component" },+ {+ path: "magicui/line-shadow-text.tsx",+ type: "registry:component",+ target: "",+ },],},{@@ -43,7 +59,13 @@ export const ui: Registry["items"] = [title: "Aurora Text",description: "A beautiful aurora text effect",dependencies: ["motion"],- files: [{ path: "magicui/aurora-text.tsx", type: "registry:component" }],+ files: [+ {+ path: "magicui/aurora-text.tsx",+ type: "registry:component",+ target: "",+ },+ ],cssVars: {light: {"--color-1": "0 100% 63%",@@ -111,7 +133,13 @@ export const ui: Registry["items"] = [type: "registry:component",title: "Morphing Text",description: "A dynamic text morphing component for Magic UI.",- files: [{ path: "magicui/morphing-text.tsx", type: "registry:component" }],+ files: [+ {+ path: "magicui/morphing-text.tsx",+ type: "registry:component",+ target: "",+ },+ ],},{name: "scroll-progress",@@ -120,7 +148,11 @@ export const ui: Registry["items"] = [description: "Animated Scroll Progress for your pages",dependencies: ["motion"],files: [- { path: "magicui/scroll-progress.tsx", type: "registry:component" },+ {+ path: "magicui/scroll-progress.tsx",+ type: "registry:component",+ target: "",+ },],},{@@ -129,7 +161,11 @@ export const ui: Registry["items"] = [title: "Neon Gradient Card",description: "A beautiful neon card effect",files: [- { path: "magicui/neon-gradient-card.tsx", type: "registry:component" },+ {+ path: "magicui/neon-gradient-card.tsx",+ type: "registry:component",+ target: "",+ },],tailwind: {config: {@@ -155,7 +191,9 @@ export const ui: Registry["items"] = [type: "registry:component",title: "Meteors",description: "A meteor shower effect.",- files: [{ path: "magicui/meteors.tsx", type: "registry:component" }],+ files: [+ { path: "magicui/meteors.tsx", type: "registry:component", target: "" },+ ],tailwind: {config: {theme: {@@ -187,7 +225,13 @@ export const ui: Registry["items"] = [title: "Grid Pattern",description:"A background grid pattern made with SVGs, fully customizable using Tailwind CSS.",- files: [{ path: "magicui/grid-pattern.tsx", type: "registry:component" }],+ files: [+ {+ path: "magicui/grid-pattern.tsx",+ type: "registry:component",+ target: "",+ },+ ],},{name: "interactive-grid-pattern",@@ -208,7 +252,13 @@ export const ui: Registry["items"] = [title: "Dot Pattern",description:"A background dot pattern made with SVGs, fully customizable using Tailwind CSS.",- files: [{ path: "magicui/dot-pattern.tsx", type: "registry:component" }],+ files: [+ {+ path: "magicui/dot-pattern.tsx",+ type: "registry:component",+ target: "",+ },+ ],},{name: "flickering-grid",@@ -217,7 +267,11 @@ export const ui: Registry["items"] = [description:"A flickering grid background made with SVGs, fully customizable using Tailwind CSS.",files: [- { path: "magicui/flickering-grid.tsx", type: "registry:component" },+ {+ path: "magicui/flickering-grid.tsx",+ type: "registry:component",+ target: "",+ },],},{@@ -227,7 +281,11 @@ export const ui: Registry["items"] = [description: "A hero video dialog component.",dependencies: ["motion"],files: [- { path: "magicui/hero-video-dialog.tsx", type: "registry:component" },+ {+ path: "magicui/hero-video-dialog.tsx",+ type: "registry:component",+ target: "",+ },],},{@@ -237,7 +295,11 @@ export const ui: Registry["items"] = [description: "A component which compares two code snippets.",dependencies: ["shiki", "next-themes"],files: [- { path: "magicui/code-comparison.tsx", type: "registry:component" },+ {+ path: "magicui/code-comparison.tsx",+ type: "registry:component",+ target: "",+ },],},{@@ -248,7 +310,11 @@ export const ui: Registry["items"] = [dependencies: ["motion", "shiki", "next-themes"],registryDependencies: ["button"],files: [- { path: "magicui/script-copy-btn.tsx", type: "registry:component" },+ {+ path: "magicui/script-copy-btn.tsx",+ type: "registry:component",+ target: "",+ },],},{@@ -257,7 +323,9 @@ export const ui: Registry["items"] = [title: "Marquee",description:"An infinite scrolling component that can be used to display text, images, or videos.",- files: [{ path: "magicui/marquee.tsx", type: "registry:component" }],+ files: [+ { path: "magicui/marquee.tsx", type: "registry:component", target: "" },+ ],tailwind: {config: {theme: {@@ -289,7 +357,9 @@ export const ui: Registry["items"] = [description:"An autorotating, interactive, and highly performant globe made using WebGL.",dependencies: ["cobe"],- files: [{ path: "magicui/globe.tsx", type: "registry:component" }],+ files: [+ { path: "magicui/globe.tsx", type: "registry:component", target: "" },+ ],},{name: "shimmer-button",@@ -297,7 +367,13 @@ export const ui: Registry["items"] = [title: "Shimmer Button",description:"A button with a shimmering light which travels around the perimeter.",- files: [{ path: "magicui/shimmer-button.tsx", type: "registry:component" }],+ files: [+ {+ path: "magicui/shimmer-button.tsx",+ type: "registry:component",+ target: "",+ },+ ],tailwind: {config: {theme: {@@ -341,7 +417,13 @@ export const ui: Registry["items"] = [description:"A card that displays a tweet with the author's name, handle, and profile picture.",dependencies: ["react-tweet"],- files: [{ path: "magicui/tweet-card.tsx", type: "registry:component" }],+ files: [+ {+ path: "magicui/tweet-card.tsx",+ type: "registry:component",+ target: "",+ },+ ],},{name: "client-tweet-card",@@ -351,7 +433,11 @@ export const ui: Registry["items"] = ["A client-side version of the tweet card that displays a tweet with the author's name, handle, and profile picture.",dependencies: ["react-tweet"],files: [- { path: "magicui/client-tweet-card.tsx", type: "registry:component" },+ {+ path: "magicui/client-tweet-card.tsx",+ type: "registry:component",+ target: "",+ },],},{@@ -362,7 +448,13 @@ export const ui: Registry["items"] = ["Bento grid is a layout used to showcase the features of a product in a simple and elegant way.",dependencies: ["@radix-ui/react-icons"],registryDependencies: ["button"],- files: [{ path: "magicui/bento-grid.tsx", type: "registry:component" }],+ files: [+ {+ path: "magicui/bento-grid.tsx",+ type: "registry:component",+ target: "",+ },+ ],},{name: "particles",@@ -370,7 +462,9 @@ export const ui: Registry["items"] = [title: "Particles",description:"Particles are a fun way to add some visual flair to your website. They can be used to create a sense of depth, movement, and interactivity.",- files: [{ path: "magicui/particles.tsx", type: "registry:component" }],+ files: [+ { path: "magicui/particles.tsx", type: "registry:component", target: "" },+ ],},{name: "number-ticker",@@ -378,7 +472,13 @@ export const ui: Registry["items"] = [title: "Number Ticker",description: "Animate numbers to count up or down to a target number",dependencies: ["motion"],- files: [{ path: "magicui/number-ticker.tsx", type: "registry:component" }],+ files: [+ {+ path: "magicui/number-ticker.tsx",+ type: "registry:component",+ target: "",+ },+ ],},{name: "ripple",@@ -386,7 +486,9 @@ export const ui: Registry["items"] = [title: "Ripple",description:"An animated ripple effect typically used behind elements to emphasize them.",- files: [{ path: "magicui/ripple.tsx", type: "registry:component" }],+ files: [+ { path: "magicui/ripple.tsx", type: "registry:component", target: "" },+ ],tailwind: {config: {theme: {@@ -415,7 +517,13 @@ export const ui: Registry["items"] = [type: "registry:component",title: "Retro Grid",description: "An animated scrolling retro grid effect",- files: [{ path: "magicui/retro-grid.tsx", type: "registry:component" }],+ files: [+ {+ path: "magicui/retro-grid.tsx",+ type: "registry:component",+ target: "",+ },+ ],tailwind: {config: {theme: {@@ -441,7 +549,13 @@ export const ui: Registry["items"] = [description:"A list that animates each item in sequence with a delay. Used to showcase notifications or events on your landing page.",dependencies: ["motion"],- files: [{ path: "magicui/animated-list.tsx", type: "registry:component" }],+ files: [+ {+ path: "magicui/animated-list.tsx",+ type: "registry:component",+ target: "",+ },+ ],},{name: "animated-shiny-text",@@ -450,7 +564,11 @@ export const ui: Registry["items"] = [description:"A light glare effect which pans across text making it appear as if it is shimmering.",files: [- { path: "magicui/animated-shiny-text.tsx", type: "registry:component" },+ {+ path: "magicui/animated-shiny-text.tsx",+ type: "registry:component",+ target: "",+ },],tailwind: {config: {@@ -482,7 +600,11 @@ export const ui: Registry["items"] = ["A animated background grid pattern made with SVGs, fully customizable using Tailwind CSS.",dependencies: ["motion"],files: [- { path: "magicui/animated-grid-pattern.tsx", type: "registry:component" },+ {+ path: "magicui/animated-grid-pattern.tsx",+ type: "registry:component",+ target: "",+ },],},{@@ -491,7 +613,13 @@ export const ui: Registry["items"] = [title: "Border Beam",description:"An animated beam of light which travels along the border of its container.",- files: [{ path: "magicui/border-beam.tsx", type: "registry:component" }],+ files: [+ {+ path: "magicui/border-beam.tsx",+ type: "registry:component",+ target: "",+ },+ ],tailwind: {config: {theme: {@@ -519,7 +647,13 @@ export const ui: Registry["items"] = [description:'An animated beam of light which travels along a path. Useful for showcasing the "integration" features of a website.',dependencies: ["motion"],- files: [{ path: "magicui/animated-beam.tsx", type: "registry:component" }],+ files: [+ {+ path: "magicui/animated-beam.tsx",+ type: "registry:component",+ target: "",+ },+ ],},{name: "text-reveal",@@ -527,7 +661,13 @@ export const ui: Registry["items"] = [title: "Text Reveal",description: "Fade in text as you scroll down the page.",dependencies: ["motion"],- files: [{ path: "magicui/text-reveal.tsx", type: "registry:component" }],+ files: [+ {+ path: "magicui/text-reveal.tsx",+ type: "registry:component",+ target: "",+ },+ ],},{name: "hyper-text",@@ -536,7 +676,13 @@ export const ui: Registry["items"] = [description:"A text animation that scrambles letters before revealing the final text.",dependencies: ["motion"],- files: [{ path: "magicui/hyper-text.tsx", type: "registry:component" }],+ files: [+ {+ path: "magicui/hyper-text.tsx",+ type: "registry:component",+ target: "",+ },+ ],},{name: "animated-gradient-text",@@ -576,7 +722,11 @@ export const ui: Registry["items"] = [description:"A collection of circles which move in orbit along a circular path",files: [- { path: "magicui/orbiting-circles.tsx", type: "registry:component" },+ {+ path: "magicui/orbiting-circles.tsx",+ type: "registry:component",+ target: "",+ },],tailwind: {config: {@@ -609,7 +759,9 @@ export const ui: Registry["items"] = [description:"An implementation of the MacOS dock using react + tailwindcss + framer motion",dependencies: ["motion"],- files: [{ path: "magicui/dock.tsx", type: "registry:component" }],+ files: [+ { path: "magicui/dock.tsx", type: "registry:component", target: "" },+ ],},{name: "word-rotate",@@ -617,14 +769,26 @@ export const ui: Registry["items"] = [title: "Word Rotate",description: "A vertical rotation of words",dependencies: ["motion"],- files: [{ path: "magicui/word-rotate.tsx", type: "registry:component" }],+ files: [+ {+ path: "magicui/word-rotate.tsx",+ type: "registry:component",+ target: "",+ },+ ],},{name: "avatar-circles",type: "registry:component",title: "Avatar Circles",description: "Overlapping circles of avatars.",- files: [{ path: "magicui/avatar-circles.tsx", type: "registry:component" }],+ files: [+ {+ path: "magicui/avatar-circles.tsx",+ type: "registry:component",+ target: "",+ },+ ],},{name: "typing-animation",@@ -633,7 +797,11 @@ export const ui: Registry["items"] = [description: "Characters appearing in typed animation",dependencies: ["motion"],files: [- { path: "magicui/typing-animation.tsx", type: "registry:component" },+ {+ path: "magicui/typing-animation.tsx",+ type: "registry:component",+ target: "",+ },],},{@@ -643,7 +811,13 @@ export const ui: Registry["items"] = [description:"A dynamic text that generates continuous sparkles with smooth transitions, perfect for highlighting text with animated stars.",dependencies: ["motion"],- files: [{ path: "magicui/sparkles-text.tsx", type: "registry:component" }],+ files: [+ {+ path: "magicui/sparkles-text.tsx",+ type: "registry:component",+ target: "",+ },+ ],},{name: "flip-text",@@ -651,7 +825,9 @@ export const ui: Registry["items"] = [title: "Flip Text",description: "Text flipping character animation",dependencies: ["motion"],- files: [{ path: "magicui/flip-text.tsx", type: "registry:component" }],+ files: [+ { path: "magicui/flip-text.tsx", type: "registry:component", target: "" },+ ],},{name: "icon-cloud",@@ -659,7 +835,13 @@ export const ui: Registry["items"] = [title: "Icon Cloud",description: "An interactive 3D tag cloud component",dependencies: [],- files: [{ path: "magicui/icon-cloud.tsx", type: "registry:component" }],+ files: [+ {+ path: "magicui/icon-cloud.tsx",+ type: "registry:component",+ target: "",+ },+ ],},{name: "text-animate",@@ -668,7 +850,13 @@ export const ui: Registry["items"] = [description:"A text animation component that animates text using a variety of different animations.",dependencies: ["motion"],- files: [{ path: "magicui/text-animate.tsx", type: "registry:component" }],+ files: [+ {+ path: "magicui/text-animate.tsx",+ type: "registry:component",+ target: "",+ },+ ],},{name: "scroll-based-velocity",@@ -677,7 +865,11 @@ export const ui: Registry["items"] = [description: "Scrolling text whose speed changes based on scroll speed",dependencies: ["motion"],files: [- { path: "magicui/scroll-based-velocity.tsx", type: "registry:component" },+ {+ path: "magicui/scroll-based-velocity.tsx",+ type: "registry:component",+ target: "",+ },],},{@@ -688,7 +880,11 @@ export const ui: Registry["items"] = ["The ScratchToReveal component creates an interactive scratch-off effect with customizable dimensions and animations, revealing hidden content beneath.",dependencies: ["motion"],files: [- { path: "magicui/scratch-to-reveal.tsx", type: "registry:component" },+ {+ path: "magicui/scratch-to-reveal.tsx",+ type: "registry:component",+ target: "",+ },],},{@@ -698,7 +894,13 @@ export const ui: Registry["items"] = [description:"A shiny button component with dynamic styles in the dark mode or light mode.",dependencies: ["motion"],- files: [{ path: "magicui/shiny-button.tsx", type: "registry:component" }],+ files: [+ {+ path: "magicui/shiny-button.tsx",+ type: "registry:component",+ target: "",+ },+ ],},{name: "box-reveal",@@ -706,14 +908,26 @@ export const ui: Registry["items"] = [title: "Box Reveal Animation",description: "Sliding box animation that reveals text behind it.",dependencies: ["motion"],- files: [{ path: "magicui/box-reveal.tsx", type: "registry:component" }],+ files: [+ {+ path: "magicui/box-reveal.tsx",+ type: "registry:component",+ target: "",+ },+ ],},{name: "shine-border",type: "registry:component",title: "Shine Border",description: "Shine border is an animated background border effect.",- files: [{ path: "magicui/shine-border.tsx", type: "registry:component" }],+ files: [+ {+ path: "magicui/shine-border.tsx",+ type: "registry:component",+ target: "",+ },+ ],tailwind: {config: {theme: {@@ -760,7 +974,9 @@ export const ui: Registry["items"] = ["Confetti animations are best used to delight your users when something special happens",dependencies: ["canvas-confetti", "@types/canvas-confetti"],registryDependencies: ["button"],- files: [{ path: "magicui/confetti.tsx", type: "registry:component" }],+ files: [+ { path: "magicui/confetti.tsx", type: "registry:component", target: "" },+ ],},{name: "animated-subscribe-button",@@ -781,7 +997,9 @@ export const ui: Registry["items"] = [type: "registry:component",title: "Cool Mode",description: "Cool mode effect for buttons, links, and other DOMs",- files: [{ path: "magicui/cool-mode.tsx", type: "registry:component" }],+ files: [+ { path: "magicui/cool-mode.tsx", type: "registry:component", target: "" },+ ],},{name: "pulsating-button",@@ -790,7 +1008,11 @@ export const ui: Registry["items"] = [description:"An animated pulsating button useful for capturing attention of users.",files: [- { path: "magicui/pulsating-button.tsx", type: "registry:component" },+ {+ path: "magicui/pulsating-button.tsx",+ type: "registry:component",+ target: "",+ },],tailwind: {config: {@@ -815,7 +1037,13 @@ export const ui: Registry["items"] = [type: "registry:component",title: "Ripple Button",description: "An animated button with ripple useful for user engagement.",- files: [{ path: "magicui/ripple-button.tsx", type: "registry:component" }],+ files: [+ {+ path: "magicui/ripple-button.tsx",+ type: "registry:component",+ target: "",+ },+ ],tailwind: {config: {theme: {@@ -845,7 +1073,9 @@ export const ui: Registry["items"] = [title: "File Tree",description:"A component used to showcase the folder and file structure of a directory.",- files: [{ path: "magicui/file-tree.tsx", type: "registry:component" }],+ files: [+ { path: "magicui/file-tree.tsx", type: "registry:component", target: "" },+ ],},{name: "blur-fade",@@ -854,28 +1084,44 @@ export const ui: Registry["items"] = [description:"Blur fade in and out animation. Used to smoothly fade in and out content.",dependencies: ["motion"],- files: [{ path: "magicui/blur-fade.tsx", type: "registry:component" }],+ files: [+ { path: "magicui/blur-fade.tsx", type: "registry:component", target: "" },+ ],},{name: "safari",type: "registry:component",title: "Safari",description: "A safari browser mockup to showcase your website.",- files: [{ path: "magicui/safari.tsx", type: "registry:component" }],+ files: [+ { path: "magicui/safari.tsx", type: "registry:component", target: "" },+ ],},{name: "iphone-15-pro",type: "registry:component",title: "iPhone 15 Pro",description: "A mockup of the iPhone 15 Pro",- files: [{ path: "magicui/iphone-15-pro.tsx", type: "registry:component" }],+ files: [+ {+ path: "magicui/iphone-15-pro.tsx",+ type: "registry:component",+ target: "",+ },+ ],},{name: "rainbow-button",type: "registry:component",title: "Rainbow Button",description: "An animated button with a rainbow effect.",- files: [{ path: "magicui/rainbow-button.tsx", type: "registry:component" }],+ files: [+ {+ path: "magicui/rainbow-button.tsx",+ type: "registry:component",+ target: "",+ },+ ],cssVars: {light: {"--color-1": "0 100% 63%",@@ -932,6 +1178,8 @@ export const ui: Registry["items"] = [type: "registry:component",title: "Terminal",description: "A terminal component",- files: [{ path: "magicui/terminal.tsx", type: "registry:component" }],+ files: [+ { path: "magicui/terminal.tsx", type: "registry:component", target: "" },+ ],},];