UI Library for Design Engineers. Animated components and effects you can copy and paste into your apps. Free. Open Source.
fix: remove old components
Dillion Verma648889d32f9f
diff --git a/apps/www/content/docs/components/box-reveal.mdx b/apps/www/content/docs/components/box-reveal.mdxdeleted file mode 100644index 2072dc56..00000000--- a/apps/www/content/docs/components/box-reveal.mdx+++ /dev/null@@ -1,59 +0,0 @@-----title: Box Reveal Animation-date: 2024-05-23-description: Sliding box animation that reveals text behind it.-author: tomonarifeehan-published: true------<ComponentPreview name="box-reveal-demo" />--## Installation--<Tabs defaultValue="cli">--<TabsList>- <TabsTrigger value="cli">CLI</TabsTrigger>- <TabsTrigger value="manual">Manual</TabsTrigger>-</TabsList>-<TabsContent value="cli">--```bash-npx shadcn@latest add @magicui/box-reveal-```--</TabsContent>--<TabsContent value="manual">--<Steps>--<Step>Copy and paste the following code into your project.</Step>--<ComponentSource name="box-reveal" />--<Step>Update the import paths to match your project setup.</Step>--</Steps>--</TabsContent>--</Tabs>--## Usage--```tsx showLineNumbers-import { BoxReveal } from "@/components/magicui/box-reveal"-```--```tsx showLineNumbers-<BoxReveal>Box Reveal</BoxReveal>-```--## Props--| Prop | Type | Default | Description |-| ----------- | -------- | --------- | --------------------------------------------- |-| `className` | `string` | `-` | The class name to be applied to the component |-| `boxColor` | `string` | `#5046e6` | Color of the box overlaying the text |-| `duration` | `number` | `0.5` | Durations (seconds) of the animation |diff --git a/apps/www/content/docs/components/flip-text.mdx b/apps/www/content/docs/components/flip-text.mdxdeleted file mode 100644index eb0339a8..00000000--- a/apps/www/content/docs/components/flip-text.mdx+++ /dev/null@@ -1,62 +0,0 @@-----title: Flip Text-date: 2024-05-23-description: Text flipping character animation-author: wellitsabhi-published: true------<ComponentPreview name="flip-text-demo" />--## Installation--<Tabs defaultValue="cli">--<TabsList>- <TabsTrigger value="cli">CLI</TabsTrigger>- <TabsTrigger value="manual">Manual</TabsTrigger>-</TabsList>-<TabsContent value="cli">--```bash-npx shadcn@latest add @magicui/flip-text-```--</TabsContent>--<TabsContent value="manual">--<Steps>--<Step>Copy and paste the following code into your project.</Step>--<ComponentSource name="flip-text" />--<Step>Update the import paths to match your project setup.</Step>--</Steps>--</TabsContent>--</Tabs>--## Usage--```tsx showLineNumbers-import { FlipText } from "@/components/magicui/flip-text"-```--```tsx showLineNumbers-<FlipText>Flip Text</FlipText>-```--## Props--| Prop | Type | Default | Description |-| --------------- | ----------------- | ---------- | --------------------------------------------- |-| `className` | `string` | `-` | The class name to be applied to the component |-| `duration` | `number` | `0.5` | Duration of the animation |-| `delayMultiple` | `number` | `0.08` | Transition delay multiplier. |-| `variants` | `Variants` | `{}` | An object containing motion variants |-| `as` | `ElementType` | `span` | The element type of the component |-| `children` | `React.ReactNode` | `required` | The children of the component |diff --git a/apps/www/content/docs/components/scratch-to-reveal.mdx b/apps/www/content/docs/components/scratch-to-reveal.mdxdeleted file mode 100644index b2b6c410..00000000--- a/apps/www/content/docs/components/scratch-to-reveal.mdx+++ /dev/null@@ -1,67 +0,0 @@-----title: Scratch To Reveal-date: 2024-06-28-description: The ScratchToReveal component creates an interactive scratch-off effect with customizable dimensions and animations, revealing hidden content beneath.-author: dipesh_the_dev-published: true------<ComponentPreview name="scratch-to-reveal-demo" />--## Installation--<Tabs defaultValue="cli">--<TabsList>- <TabsTrigger value="cli">CLI</TabsTrigger>- <TabsTrigger value="manual">Manual</TabsTrigger>-</TabsList>-<TabsContent value="cli">--```bash-npx shadcn@latest add @magicui/scratch-to-reveal-```--</TabsContent>--<TabsContent value="manual">--<Steps>--<Step>Copy and paste the following code into your project.</Step>--<ComponentSource name="scratch-to-reveal" />--</Steps>--</TabsContent>--</Tabs>--## Usage--```tsx showLineNumbers-import { ScratchToReveal } from "@/components/magicui/scratch-to-reveal"-```--```tsx showLineNumbers-<ScratchToReveal width={300} height={300} minScratchPercentage={50}>- Scratch To Reveal-</ScratchToReveal>-```--## Props--| Prop | Type | Default | Description |-| ---------------------- | ---------- | ------- | --------------------------------------------------------------------------------------------- |-| `className` | `string` | `-` | The class name to apply to the component. |-| `width` | `number` | `-` | Width of the scratch container. |-| `height` | `number` | `-` | Height of the scratch container. |-| `minScratchPercentage` | `number` | `50` | Minimum percentage of scratched area to be considered as completed (Value between 0 and 100). |-| `children` | `node` | `-` | The content to display in the marquee. |-| `onComplete` | `function` | `-` | Callback function called when scratch is completed |-| `gradientColors` | `string[]` | `-` | Gradient colors for the scratch effect. |--## Credits--- Credit to [dipesh_the_dev](https://www.x.com/dipesh_the_dev)diff --git a/apps/www/content/docs/components/script-copy-btn.mdx b/apps/www/content/docs/components/script-copy-btn.mdxdeleted file mode 100644index 5ea048e7..00000000--- a/apps/www/content/docs/components/script-copy-btn.mdx+++ /dev/null@@ -1,60 +0,0 @@-----title: Script Copy Button-date: 2023-11-18-description: Copy code to clipboard-author: dillionverma-published: true------<ComponentPreview name="script-copy-btn-demo" />--## Installation--<Tabs defaultValue="cli">--<TabsList>- <TabsTrigger value="cli">CLI</TabsTrigger>- <TabsTrigger value="manual">Manual</TabsTrigger>-</TabsList>-<TabsContent value="cli">--```bash-npx shadcn@latest add @magicui/script-copy-btn-```--</TabsContent>--<TabsContent value="manual">--<Steps>--<Step>Copy and paste the following code into your project.</Step>--<ComponentSource name="script-copy-btn" />--</Steps>--</TabsContent>--</Tabs>--## Usage--```tsx showLineNumbers-import { ScriptCopyBtn } from "@/components/magicui/script-copy-btn"-```--```tsx showLineNumbers-<ScriptCopyBtn />-```--## Props--| Prop | Type | Default | Description |-| ---------------------------- | ------------------------ | ------- | ----------------------------------------------------------- |-| `className` | `string` | `-` | The class name to be applied to the component |-| `showMultiplePackageOptions` | `boolean` | `true` | Whether to show options for multiple package managers |-| `codeLanguage` | `string` | `-` | The language of the code snippet (e.g., "shell") |-| `lightTheme` | `string` | `-` | The theme to use for light mode |-| `darkTheme` | `string` | `-` | The theme to use for dark mode |-| `commandMap` | `Record<string, string>` | `-` | A map of package manager names to their respective commands |diff --git a/apps/www/public/llms-full.txt b/apps/www/public/llms-full.txtindex 450c756a..1094ebf9 100644--- a/apps/www/public/llms-full.txt+++ b/apps/www/public/llms-full.txt@@ -243,18 +243,6 @@ Title: Border Beam Demo 4-===== COMPONENT: box-reveal =====-Title: Box Reveal Animation-Description: Sliding box animation that reveals text behind it.----===== EXAMPLE: box-reveal-demo =====-Title: Box Reveal Demo----===== COMPONENT: client-tweet-card =====Title: Client Tweet CardDescription: A client-side version of the tweet card that displays a tweet with the author's name, handle, and profile picture.@@ -423,18 +411,6 @@ Title: Flickering Grid Rounded Demo-===== COMPONENT: flip-text =====-Title: Flip Text-Description: Text flipping character animation----===== EXAMPLE: flip-text-demo =====-Title: Flip Text Demo----===== COMPONENT: globe =====Title: GlobeDescription: An autorotating, interactive, and highly performant globe made using WebGL.@@ -883,30 +859,6 @@ Title: Safari Demo 4-===== COMPONENT: scratch-to-reveal =====-Title: Scratch To Reveal-Description: The ScratchToReveal component creates an interactive scratch-off effect with customizable dimensions and animations, revealing hidden content beneath.----===== EXAMPLE: scratch-to-reveal-demo =====-Title: Scratch To Reveal Demo-----===== COMPONENT: script-copy-btn =====-Title: Script Copy Button-Description: Copy code to clipboard----===== EXAMPLE: script-copy-btn-demo =====-Title: Script Copy Button Demo----===== COMPONENT: scroll-based-velocity =====Title: Scroll Based VelocityDescription: Scrolling text whose speed changes based on scroll speeddiff --git a/apps/www/public/llms.txt b/apps/www/public/llms.txtindex 3974d226..c892086f 100644--- a/apps/www/public/llms.txt+++ b/apps/www/public/llms.txt@@ -21,7 +21,6 @@ This file provides LLM-friendly entry points to documentation and examples.- [Bento Grid](https://magicui.design/docs/components/bento-grid): Bento grid is a layout used to showcase the features of a product in a simple and elegant way.- [Blur Fade](https://magicui.design/docs/components/blur-fade): Blur fade in and out animation. Used to smoothly fade in and out content.- [Border Beam](https://magicui.design/docs/components/border-beam): An animated beam of light which travels along the border of its container.-- [Box Reveal Animation](https://magicui.design/docs/components/box-reveal): Sliding box animation that reveals text behind it.- [Client Tweet Card](https://magicui.design/docs/components/client-tweet-card): A client-side version of the tweet card that displays a tweet with the author's name, handle, and profile picture.- [Code Comparison](https://magicui.design/docs/components/code-comparison): A component which compares two code snippets.- [Comic Text](https://magicui.design/docs/components/comic-text): Comic text animation@@ -31,7 +30,6 @@ This file provides LLM-friendly entry points to documentation and examples.- [Dot Pattern](https://magicui.design/docs/components/dot-pattern): A background dot pattern made with SVGs, fully customizable using Tailwind CSS.- [File Tree](https://magicui.design/docs/components/file-tree): A component used to showcase the folder and file structure of a directory.- [Flickering Grid](https://magicui.design/docs/components/flickering-grid): A flickering grid background made with SVGs, fully customizable using Tailwind CSS.-- [Flip Text](https://magicui.design/docs/components/flip-text): Text flipping character animation- [Globe](https://magicui.design/docs/components/globe): An autorotating, interactive, and highly performant globe made using WebGL.- [Grid Pattern](https://magicui.design/docs/components/grid-pattern): A background grid pattern made with SVGs, fully customizable using Tailwind CSS.- [Hero Video Dialog](https://magicui.design/docs/components/hero-video-dialog): A hero video dialog component.@@ -61,8 +59,6 @@ This file provides LLM-friendly entry points to documentation and examples.- [Ripple](https://magicui.design/docs/components/ripple): An animated ripple effect typically used behind elements to emphasize them.- [Ripple Button](https://magicui.design/docs/components/ripple-button): An animated button with ripple useful for user engagement.- [Safari](https://magicui.design/docs/components/safari): A safari browser mockup to showcase your website.-- [Scratch To Reveal](https://magicui.design/docs/components/scratch-to-reveal): The ScratchToReveal component creates an interactive scratch-off effect with customizable dimensions and animations, revealing hidden content beneath.-- [Script Copy Button](https://magicui.design/docs/components/script-copy-btn): Copy code to clipboard- [Scroll Based Velocity](https://magicui.design/docs/components/scroll-based-velocity): Scrolling text whose speed changes based on scroll speed- [Scroll Progress](https://magicui.design/docs/components/scroll-progress): Animated Scroll Progress for your pages- [Shimmer Button](https://magicui.design/docs/components/shimmer-button): A button with a shimmering light which travels around the perimeter.@@ -110,7 +106,6 @@ This file provides LLM-friendly entry points to documentation and examples.- [Hero Video Dialog Demo](https://github.com/magicuidesign/magicui/blob/main/example/hero-video-dialog-demo.tsx): Example usage- [Hero Video Dialog Top In Bottom Out Demo](https://github.com/magicuidesign/magicui/blob/main/example/hero-video-dialog-demo-top-in-bottom-out.tsx): Example usage- [Code Comparison Demo](https://github.com/magicuidesign/magicui/blob/main/example/code-comparison-demo.tsx): Example usage-- [Script Copy Button Demo](https://github.com/magicuidesign/magicui/blob/main/example/script-copy-btn-demo.tsx): Example usage- [Marquee Demo](https://github.com/magicuidesign/magicui/blob/main/example/marquee-demo.tsx): Example usage- [Marquee Vertical Demo](https://github.com/magicuidesign/magicui/blob/main/example/marquee-demo-vertical.tsx): Example usage- [Marquee Logos](https://github.com/magicuidesign/magicui/blob/main/example/marquee-logos.tsx): Example usage@@ -155,8 +150,6 @@ This file provides LLM-friendly entry points to documentation and examples.- [Typing Animation Demo](https://github.com/magicuidesign/magicui/blob/main/example/typing-animation-demo.tsx): Example usage- [Scroll Based Velocity Demo](https://github.com/magicuidesign/magicui/blob/main/example/scroll-based-velocity-demo.tsx): Example usage- [Scroll Based Velocity Images](https://github.com/magicuidesign/magicui/blob/main/example/scroll-based-velocity-images-demo.tsx): Example usage-- [Scratch To Reveal Demo](https://github.com/magicuidesign/magicui/blob/main/example/scratch-to-reveal-demo.tsx): Example usage-- [Flip Text Demo](https://github.com/magicuidesign/magicui/blob/main/example/flip-text-demo.tsx): Example usage- [Sparkles Text Demo](https://github.com/magicuidesign/magicui/blob/main/example/sparkles-text-demo.tsx): Example usage- [Spinning Text Demo](https://github.com/magicuidesign/magicui/blob/main/example/spinning-text-demo.tsx): Example usage- [Spinning Text Demo 2](https://github.com/magicuidesign/magicui/blob/main/example/spinning-text-demo-2.tsx): Example usage@@ -174,7 +167,6 @@ This file provides LLM-friendly entry points to documentation and examples.- [Text Animate Demo 8](https://github.com/magicuidesign/magicui/blob/main/example/text-animate-demo-8.tsx): Example usage- [Text Animate Demo 9](https://github.com/magicuidesign/magicui/blob/main/example/text-animate-demo-9.tsx): Example usage- [Shiny Button Demo](https://github.com/magicuidesign/magicui/blob/main/example/shiny-button-demo.tsx): Example usage-- [Box Reveal Demo](https://github.com/magicuidesign/magicui/blob/main/example/box-reveal-demo.tsx): Example usage- [Animated Circular Progress Bar Demo](https://github.com/magicuidesign/magicui/blob/main/example/animated-circular-progress-bar-demo.tsx): Example usage- [Shine Border Demo](https://github.com/magicuidesign/magicui/blob/main/example/shine-border-demo.tsx): Example usage- [Shine Border Demo 2](https://github.com/magicuidesign/magicui/blob/main/example/shine-border-demo-2.tsx): Example usagediff --git a/apps/www/public/r/box-reveal-demo.json b/apps/www/public/r/box-reveal-demo.jsondeleted file mode 100644index 82f6f0cf..00000000--- a/apps/www/public/r/box-reveal-demo.json+++ /dev/null@@ -1,17 +0,0 @@-{- "$schema": "https://ui.shadcn.com/schema/registry-item.json",- "name": "box-reveal-demo",- "type": "registry:example",- "title": "Box Reveal Demo",- "description": "Example showing a sliding box text reveal animation.",- "registryDependencies": [- "@magicui/box-reveal"- ],- "files": [- {- "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]\">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"- }- ]-}\ No newline at end of filediff --git a/apps/www/public/r/box-reveal.json b/apps/www/public/r/box-reveal.jsondeleted file mode 100644index 6001a769..00000000--- a/apps/www/public/r/box-reveal.json+++ /dev/null@@ -1,17 +0,0 @@-{- "$schema": "https://ui.shadcn.com/schema/registry-item.json",- "name": "box-reveal",- "type": "registry:ui",- "title": "Box Reveal Animation",- "description": "Sliding box animation that reveals text behind it.",- "dependencies": [- "motion"- ],- "files": [- {- "path": "registry/magicui/box-reveal.tsx",- "content": "\"use client\"\n\nimport { useEffect, useRef } from \"react\"\nimport { motion, useAnimation, useInView } from \"motion/react\"\n\nexport interface BoxRevealProps {\n children: React.ReactNode\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:ui"- }- ]-}\ No newline at end of filediff --git a/apps/www/public/r/flip-text-demo.json b/apps/www/public/r/flip-text-demo.jsondeleted file mode 100644index f5ead515..00000000--- a/apps/www/public/r/flip-text-demo.json+++ /dev/null@@ -1,17 +0,0 @@-{- "$schema": "https://ui.shadcn.com/schema/registry-item.json",- "name": "flip-text-demo",- "type": "registry:example",- "title": "Flip Text Demo",- "description": "Example showing text with character flip animations.",- "registryDependencies": [- "@magicui/flip-text"- ],- "files": [- {- "path": "registry/example/flip-text-demo.tsx",- "content": "import { FlipText } from \"@/registry/magicui/flip-text\"\n\nexport default function FlipTextDemo() {\n return (\n <FlipText className=\"text-4xl font-bold -tracking-widest text-black md:text-7xl md:leading-[5rem] dark:text-white\">\n Flip Text\n </FlipText>\n )\n}\n",- "type": "registry:example"- }- ]-}\ No newline at end of filediff --git a/apps/www/public/r/flip-text.json b/apps/www/public/r/flip-text.jsondeleted file mode 100644index b45d9909..00000000--- a/apps/www/public/r/flip-text.json+++ /dev/null@@ -1,17 +0,0 @@-{- "$schema": "https://ui.shadcn.com/schema/registry-item.json",- "name": "flip-text",- "type": "registry:ui",- "title": "Flip Text",- "description": "Text flipping character animation",- "dependencies": [- "motion"- ],- "files": [- {- "path": "registry/magicui/flip-text.tsx",- "content": "\"use client\"\n\nimport React, { ElementType } from \"react\"\nimport { AnimatePresence, motion, MotionProps, Variants } from \"motion/react\"\n\nimport { cn } from \"@/lib/utils\"\n\ninterface FlipTextProps extends MotionProps {\n /** The duration of the animation */\n duration?: number\n /** The delay between each character */\n delayMultiple?: number\n /** The variants of the animation */\n framerProps?: Variants\n /** The class name of the component */\n className?: string\n /** The element type of the component */\n as?: ElementType\n /** The children of the component */\n children: React.ReactNode\n /** The variants of the animation */\n variants?: Variants\n}\n\nconst defaultVariants: Variants = {\n hidden: { rotateX: -90, opacity: 0 },\n visible: { rotateX: 0, opacity: 1 },\n}\n\nexport function FlipText({\n children,\n duration = 0.5,\n delayMultiple = 0.08,\n\n className,\n as: Component = \"span\",\n variants,\n ...props\n}: FlipTextProps) {\n const MotionComponent = motion.create(Component)\n const characters = React.Children.toArray(children).join(\"\").split(\"\")\n\n return (\n <div className=\"flex justify-center space-x-2\">\n <AnimatePresence mode=\"wait\">\n {characters.map((char, i) => (\n <MotionComponent\n key={i}\n initial=\"hidden\"\n animate=\"visible\"\n exit=\"hidden\"\n variants={variants || defaultVariants}\n transition={{ duration, delay: i * delayMultiple }}\n className={cn(\"origin-center drop-shadow-sm\", className)}\n {...props}\n >\n {char}\n </MotionComponent>\n ))}\n </AnimatePresence>\n </div>\n )\n}\n",- "type": "registry:ui"- }- ]-}\ No newline at end of filediff --git a/apps/www/public/r/registry.json b/apps/www/public/r/registry.jsonindex 0203135c..9907c247 100644--- a/apps/www/public/r/registry.json+++ b/apps/www/public/r/registry.json@@ -352,26 +352,6 @@}]},- {- "name": "script-copy-btn",- "type": "registry:ui",- "title": "Script Copy Button",- "description": "Copy code to clipboard",- "dependencies": [- "motion",- "shiki",- "next-themes"- ],- "registryDependencies": [- "button"- ],- "files": [- {- "path": "registry/magicui/script-copy-btn.tsx",- "type": "registry:ui"- }- ]- },{"name": "marquee","type": "registry:ui",@@ -847,21 +827,6 @@}]},- {- "name": "flip-text",- "type": "registry:ui",- "title": "Flip Text",- "description": "Text flipping character animation",- "dependencies": [- "motion"- ],- "files": [- {- "path": "registry/magicui/flip-text.tsx",- "type": "registry:ui"- }- ]- },{"name": "comic-text","type": "registry:ui",@@ -920,21 +885,6 @@}]},- {- "name": "scratch-to-reveal",- "type": "registry:ui",- "title": "Scratch To Reveal",- "description": "The ScratchToReveal component creates an interactive scratch-off effect with customizable dimensions and animations, revealing hidden content beneath.",- "dependencies": [- "motion"- ],- "files": [- {- "path": "registry/magicui/scratch-to-reveal.tsx",- "type": "registry:ui"- }- ]- },{"name": "shiny-button","type": "registry:ui",@@ -950,21 +900,6 @@}]},- {- "name": "box-reveal",- "type": "registry:ui",- "title": "Box Reveal Animation",- "description": "Sliding box animation that reveals text behind it.",- "dependencies": [- "motion"- ],- "files": [- {- "path": "registry/magicui/box-reveal.tsx",- "type": "registry:ui"- }- ]- },{"name": "shine-border","type": "registry:ui",@@ -1734,21 +1669,6 @@}]},- {- "name": "script-copy-btn-demo",- "type": "registry:example",- "title": "Script Copy Button Demo",- "description": "Example showing how to copy code to clipboard.",- "registryDependencies": [- "@magicui/script-copy-btn"- ],- "files": [- {- "path": "registry/example/script-copy-btn-demo.tsx",- "type": "registry:example"- }- ]- },{"name": "marquee-demo","type": "registry:example",@@ -2446,36 +2366,6 @@}]},- {- "name": "scratch-to-reveal-demo",- "type": "registry:example",- "title": "Scratch To Reveal Demo",- "description": "Example showing an interactive scratch-off reveal effect.",- "registryDependencies": [- "@magicui/scratch-to-reveal"- ],- "files": [- {- "path": "registry/example/scratch-to-reveal-demo.tsx",- "type": "registry:example"- }- ]- },- {- "name": "flip-text-demo",- "type": "registry:example",- "title": "Flip Text Demo",- "description": "Example showing text with character flip animations.",- "registryDependencies": [- "@magicui/flip-text"- ],- "files": [- {- "path": "registry/example/flip-text-demo.tsx",- "type": "registry:example"- }- ]- },{"name": "sparkles-text-demo","type": "registry:example",@@ -2731,21 +2621,6 @@}]},- {- "name": "box-reveal-demo",- "type": "registry:example",- "title": "Box Reveal Demo",- "description": "Example showing a sliding box text reveal animation.",- "registryDependencies": [- "@magicui/box-reveal"- ],- "files": [- {- "path": "registry/example/box-reveal-demo.tsx",- "type": "registry:example"- }- ]- },{"name": "animated-circular-progress-bar-demo","type": "registry:example",diff --git a/apps/www/public/r/scratch-to-reveal-demo.json b/apps/www/public/r/scratch-to-reveal-demo.jsondeleted file mode 100644index dba2edd3..00000000--- a/apps/www/public/r/scratch-to-reveal-demo.json+++ /dev/null@@ -1,17 +0,0 @@-{- "$schema": "https://ui.shadcn.com/schema/registry-item.json",- "name": "scratch-to-reveal-demo",- "type": "registry:example",- "title": "Scratch To Reveal Demo",- "description": "Example showing an interactive scratch-off reveal effect.",- "registryDependencies": [- "@magicui/scratch-to-reveal"- ],- "files": [- {- "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"- }- ]-}\ No newline at end of filediff --git a/apps/www/public/r/scratch-to-reveal.json b/apps/www/public/r/scratch-to-reveal.jsondeleted file mode 100644index cef31150..00000000--- a/apps/www/public/r/scratch-to-reveal.json+++ /dev/null@@ -1,17 +0,0 @@-{- "$schema": "https://ui.shadcn.com/schema/registry-item.json",- "name": "scratch-to-reveal",- "type": "registry:ui",- "title": "Scratch To Reveal",- "description": "The ScratchToReveal component creates an interactive scratch-off effect with customizable dimensions and animations, revealing hidden content beneath.",- "dependencies": [- "motion"- ],- "files": [- {- "path": "registry/magicui/scratch-to-reveal.tsx",- "content": "\"use client\"\n\nimport React, { useEffect, useRef, useState } from \"react\"\nimport { motion, useAnimation } from \"motion/react\"\n\nimport { cn } from \"@/lib/utils\"\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 top-0 left-0\"\n onMouseDown={handleMouseDown}\n onTouchStart={handleTouchStart}\n ></canvas>\n {children}\n </motion.div>\n )\n}\n",- "type": "registry:ui"- }- ]-}\ No newline at end of filediff --git a/apps/www/public/r/script-copy-btn-demo.json b/apps/www/public/r/script-copy-btn-demo.jsondeleted file mode 100644index df06e355..00000000--- a/apps/www/public/r/script-copy-btn-demo.json+++ /dev/null@@ -1,17 +0,0 @@-{- "$schema": "https://ui.shadcn.com/schema/registry-item.json",- "name": "script-copy-btn-demo",- "type": "registry:example",- "title": "Script Copy Button Demo",- "description": "Example showing how to copy code to clipboard.",- "registryDependencies": [- "@magicui/script-copy-btn"- ],- "files": [- {- "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"- }- ]-}\ No newline at end of filediff --git a/apps/www/public/r/script-copy-btn.json b/apps/www/public/r/script-copy-btn.jsondeleted file mode 100644index f6121a23..00000000--- a/apps/www/public/r/script-copy-btn.json+++ /dev/null@@ -1,22 +0,0 @@-{- "$schema": "https://ui.shadcn.com/schema/registry-item.json",- "name": "script-copy-btn",- "type": "registry:ui",- "title": "Script Copy Button",- "description": "Copy code to clipboard",- "dependencies": [- "motion",- "shiki",- "next-themes"- ],- "registryDependencies": [- "button"- ],- "files": [- {- "path": "registry/magicui/script-copy-btn.tsx",- "content": "\"use client\"\n\nimport { HTMLAttributes, useEffect, useState } from \"react\"\nimport { Check, Copy } from \"lucide-react\"\nimport { motion } from \"motion/react\"\nimport { useTheme } from \"next-themes\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\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=\"border-border inline-flex overflow-hidden rounded-md border text-xs\">\n {packageManagers.map((pm, index) => (\n <div key={pm} className=\"flex items-center\">\n {index > 0 && (\n <div className=\"bg-border h-4 w-px\" aria-hidden=\"true\" />\n )}\n <Button\n variant=\"ghost\"\n size=\"sm\"\n className={`bg-background hover:bg-background relative rounded-none px-2 py-1 ${\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=\"bg-primary absolute inset-x-0 bottom-[1px] mx-auto h-0.5 w-[90%]\"\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=\"border-border rounded-md 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:ui"- }- ]-}\ No newline at end of filediff --git a/apps/www/registry.json b/apps/www/registry.jsonindex 0203135c..9907c247 100644--- a/apps/www/registry.json+++ b/apps/www/registry.json@@ -352,26 +352,6 @@}]},- {- "name": "script-copy-btn",- "type": "registry:ui",- "title": "Script Copy Button",- "description": "Copy code to clipboard",- "dependencies": [- "motion",- "shiki",- "next-themes"- ],- "registryDependencies": [- "button"- ],- "files": [- {- "path": "registry/magicui/script-copy-btn.tsx",- "type": "registry:ui"- }- ]- },{"name": "marquee","type": "registry:ui",@@ -847,21 +827,6 @@}]},- {- "name": "flip-text",- "type": "registry:ui",- "title": "Flip Text",- "description": "Text flipping character animation",- "dependencies": [- "motion"- ],- "files": [- {- "path": "registry/magicui/flip-text.tsx",- "type": "registry:ui"- }- ]- },{"name": "comic-text","type": "registry:ui",@@ -920,21 +885,6 @@}]},- {- "name": "scratch-to-reveal",- "type": "registry:ui",- "title": "Scratch To Reveal",- "description": "The ScratchToReveal component creates an interactive scratch-off effect with customizable dimensions and animations, revealing hidden content beneath.",- "dependencies": [- "motion"- ],- "files": [- {- "path": "registry/magicui/scratch-to-reveal.tsx",- "type": "registry:ui"- }- ]- },{"name": "shiny-button","type": "registry:ui",@@ -950,21 +900,6 @@}]},- {- "name": "box-reveal",- "type": "registry:ui",- "title": "Box Reveal Animation",- "description": "Sliding box animation that reveals text behind it.",- "dependencies": [- "motion"- ],- "files": [- {- "path": "registry/magicui/box-reveal.tsx",- "type": "registry:ui"- }- ]- },{"name": "shine-border","type": "registry:ui",@@ -1734,21 +1669,6 @@}]},- {- "name": "script-copy-btn-demo",- "type": "registry:example",- "title": "Script Copy Button Demo",- "description": "Example showing how to copy code to clipboard.",- "registryDependencies": [- "@magicui/script-copy-btn"- ],- "files": [- {- "path": "registry/example/script-copy-btn-demo.tsx",- "type": "registry:example"- }- ]- },{"name": "marquee-demo","type": "registry:example",@@ -2446,36 +2366,6 @@}]},- {- "name": "scratch-to-reveal-demo",- "type": "registry:example",- "title": "Scratch To Reveal Demo",- "description": "Example showing an interactive scratch-off reveal effect.",- "registryDependencies": [- "@magicui/scratch-to-reveal"- ],- "files": [- {- "path": "registry/example/scratch-to-reveal-demo.tsx",- "type": "registry:example"- }- ]- },- {- "name": "flip-text-demo",- "type": "registry:example",- "title": "Flip Text Demo",- "description": "Example showing text with character flip animations.",- "registryDependencies": [- "@magicui/flip-text"- ],- "files": [- {- "path": "registry/example/flip-text-demo.tsx",- "type": "registry:example"- }- ]- },{"name": "sparkles-text-demo","type": "registry:example",@@ -2731,21 +2621,6 @@}]},- {- "name": "box-reveal-demo",- "type": "registry:example",- "title": "Box Reveal Demo",- "description": "Example showing a sliding box text reveal animation.",- "registryDependencies": [- "@magicui/box-reveal"- ],- "files": [- {- "path": "registry/example/box-reveal-demo.tsx",- "type": "registry:example"- }- ]- },{"name": "animated-circular-progress-bar-demo","type": "registry:example",diff --git a/apps/www/registry/__index__.tsx b/apps/www/registry/__index__.tsxindex 5bcb991f..b90d6283 100644--- a/apps/www/registry/__index__.tsx+++ b/apps/www/registry/__index__.tsx@@ -338,23 +338,6 @@ export const Index: Record<string, any> = {}),meta: undefined,},- "script-copy-btn": {- name: "script-copy-btn",- description: "Copy code to clipboard",- type: "registry:ui",- registryDependencies: ["button"],- files: [{- path: "registry/magicui/script-copy-btn.tsx",- type: "registry:ui",- target: ""- }],- component: React.lazy(async () => {- const mod = await import("@/registry/magicui/script-copy-btn.tsx")- const exportName = Object.keys(mod).find(key => typeof mod[key] === 'function' || typeof mod[key] === 'object') || item.name- return { default: mod.default || mod[exportName] }- }),- meta: undefined,- },"marquee": {name: "marquee",description: "An infinite scrolling component that can be used to display text, images, or videos.",@@ -780,23 +763,6 @@ export const Index: Record<string, any> = {}),meta: undefined,},- "flip-text": {- name: "flip-text",- description: "Text flipping character animation",- type: "registry:ui",- registryDependencies: undefined,- files: [{- path: "registry/magicui/flip-text.tsx",- type: "registry:ui",- target: ""- }],- component: React.lazy(async () => {- const mod = await import("@/registry/magicui/flip-text.tsx")- const exportName = Object.keys(mod).find(key => typeof mod[key] === 'function' || typeof mod[key] === 'object') || item.name- return { default: mod.default || mod[exportName] }- }),- meta: undefined,- },"comic-text": {name: "comic-text",description: "Comic text animation",@@ -865,23 +831,6 @@ export const Index: Record<string, any> = {}),meta: undefined,},- "scratch-to-reveal": {- name: "scratch-to-reveal",- description: "The ScratchToReveal component creates an interactive scratch-off effect with customizable dimensions and animations, revealing hidden content beneath.",- type: "registry:ui",- registryDependencies: undefined,- files: [{- path: "registry/magicui/scratch-to-reveal.tsx",- type: "registry:ui",- target: ""- }],- component: React.lazy(async () => {- const mod = await import("@/registry/magicui/scratch-to-reveal.tsx")- const exportName = Object.keys(mod).find(key => typeof mod[key] === 'function' || typeof mod[key] === 'object') || item.name- return { default: mod.default || mod[exportName] }- }),- meta: undefined,- },"shiny-button": {name: "shiny-button",description: "A shiny button component with dynamic styles in the dark mode or light mode.",@@ -899,23 +848,6 @@ export const Index: Record<string, any> = {}),meta: undefined,},- "box-reveal": {- name: "box-reveal",- description: "Sliding box animation that reveals text behind it.",- type: "registry:ui",- registryDependencies: undefined,- files: [{- path: "registry/magicui/box-reveal.tsx",- type: "registry:ui",- target: ""- }],- component: React.lazy(async () => {- const mod = await import("@/registry/magicui/box-reveal.tsx")- const exportName = Object.keys(mod).find(key => typeof mod[key] === 'function' || typeof mod[key] === 'object') || item.name- return { default: mod.default || mod[exportName] }- }),- meta: undefined,- },"shine-border": {name: "shine-border",description: "Shine border is an animated background border effect.",@@ -1732,23 +1664,6 @@ export const Index: Record<string, any> = {}),meta: undefined,},- "script-copy-btn-demo": {- name: "script-copy-btn-demo",- description: "Example showing how to copy code to clipboard.",- type: "registry:example",- registryDependencies: ["@magicui/script-copy-btn"],- files: [{- path: "registry/example/script-copy-btn-demo.tsx",- type: "registry:example",- target: ""- }],- component: React.lazy(async () => {- const mod = await import("@/registry/example/script-copy-btn-demo.tsx")- const exportName = Object.keys(mod).find(key => typeof mod[key] === 'function' || typeof mod[key] === 'object') || item.name- return { default: mod.default || mod[exportName] }- }),- meta: undefined,- },"marquee-demo": {name: "marquee-demo",description: "Example showing an infinite scrolling component.",@@ -2497,40 +2412,6 @@ export const Index: Record<string, any> = {}),meta: undefined,},- "scratch-to-reveal-demo": {- name: "scratch-to-reveal-demo",- description: "Example showing an interactive scratch-off reveal effect.",- type: "registry:example",- registryDependencies: ["@magicui/scratch-to-reveal"],- files: [{- path: "registry/example/scratch-to-reveal-demo.tsx",- type: "registry:example",- target: ""- }],- component: React.lazy(async () => {- const mod = await import("@/registry/example/scratch-to-reveal-demo.tsx")- const exportName = Object.keys(mod).find(key => typeof mod[key] === 'function' || typeof mod[key] === 'object') || item.name- return { default: mod.default || mod[exportName] }- }),- meta: undefined,- },- "flip-text-demo": {- name: "flip-text-demo",- description: "Example showing text with character flip animations.",- type: "registry:example",- registryDependencies: ["@magicui/flip-text"],- files: [{- path: "registry/example/flip-text-demo.tsx",- type: "registry:example",- target: ""- }],- component: React.lazy(async () => {- const mod = await import("@/registry/example/flip-text-demo.tsx")- const exportName = Object.keys(mod).find(key => typeof mod[key] === 'function' || typeof mod[key] === 'object') || item.name- return { default: mod.default || mod[exportName] }- }),- meta: undefined,- },"sparkles-text-demo": {name: "sparkles-text-demo",description: "Example showing text with animated sparkle effects.",@@ -2820,23 +2701,6 @@ export const Index: Record<string, any> = {}),meta: undefined,},- "box-reveal-demo": {- name: "box-reveal-demo",- description: "Example showing a sliding box text reveal animation.",- type: "registry:example",- registryDependencies: ["@magicui/box-reveal"],- files: [{- path: "registry/example/box-reveal-demo.tsx",- type: "registry:example",- target: ""- }],- component: React.lazy(async () => {- const mod = await import("@/registry/example/box-reveal-demo.tsx")- const exportName = Object.keys(mod).find(key => typeof mod[key] === 'function' || typeof mod[key] === 'object') || item.name- return { default: mod.default || mod[exportName] }- }),- meta: undefined,- },"animated-circular-progress-bar-demo": {name: "animated-circular-progress-bar-demo",description: "Example showing an animated circular progress gauge.",diff --git a/apps/www/registry/example/box-reveal-demo.tsx b/apps/www/registry/example/box-reveal-demo.tsxdeleted file mode 100644index 145fc6fb..00000000--- a/apps/www/registry/example/box-reveal-demo.tsx+++ /dev/null@@ -1,40 +0,0 @@-import { Button } from "@/components/ui/button"-import { BoxReveal } from "@/registry/magicui/box-reveal"--export default function BoxRevealDemo() {- return (- <div className="size-full max-w-lg items-center justify-center overflow-hidden pt-8">- <BoxReveal boxColor={"#5046e6"} duration={0.5}>- <p className="text-[3.5rem] font-semibold">- Magic UI<span className="text-[#5046e6]">.</span>- </p>- </BoxReveal>-- <BoxReveal boxColor={"#5046e6"} duration={0.5}>- <h2 className="mt-[.5rem] text-[1rem]">- UI library for{" "}- <span className="text-[#5046e6]">Design Engineers</span>- </h2>- </BoxReveal>-- <BoxReveal boxColor={"#5046e6"} duration={0.5}>- <div className="mt-6">- <p>- -> 20+ free and open-source animated components built with- <span className="font-semibold text-[#5046e6]">React</span>,- <span className="font-semibold text-[#5046e6]">Typescript</span>,- <span className="font-semibold text-[#5046e6]">Tailwind CSS</span>,- and- <span className="font-semibold text-[#5046e6]">Motion</span>- . <br />- -> 100% open-source, and customizable. <br />- </p>- </div>- </BoxReveal>-- <BoxReveal boxColor={"#5046e6"} duration={0.5}>- <Button className="mt-[1.6rem] bg-[#5046e6]">Explore</Button>- </BoxReveal>- </div>- )-}diff --git a/apps/www/registry/example/flip-text-demo.tsx b/apps/www/registry/example/flip-text-demo.tsxdeleted file mode 100644index 42eace1d..00000000--- a/apps/www/registry/example/flip-text-demo.tsx+++ /dev/null@@ -1,9 +0,0 @@-import { FlipText } from "@/registry/magicui/flip-text"--export default function FlipTextDemo() {- return (- <FlipText className="text-4xl font-bold -tracking-widest text-black md:text-7xl md:leading-[5rem] dark:text-white">- Flip Text- </FlipText>- )-}diff --git a/apps/www/registry/example/scratch-to-reveal-demo.tsx b/apps/www/registry/example/scratch-to-reveal-demo.tsxdeleted file mode 100644index 13e7fe5f..00000000--- a/apps/www/registry/example/scratch-to-reveal-demo.tsx+++ /dev/null@@ -1,15 +0,0 @@-import { ScratchToReveal } from "@/registry/magicui/scratch-to-reveal"--export default function ScratchToRevealDemo() {- return (- <ScratchToReveal- width={250}- height={250}- minScratchPercentage={70}- className="flex items-center justify-center overflow-hidden rounded-2xl border-2 bg-gray-100"- gradientColors={["#A97CF8", "#F38CB8", "#FDCC92"]}- >- <p className="text-9xl">😎</p>- </ScratchToReveal>- )-}diff --git a/apps/www/registry/example/script-copy-btn-demo.tsx b/apps/www/registry/example/script-copy-btn-demo.tsxdeleted file mode 100644index ab2ae0d1..00000000--- a/apps/www/registry/example/script-copy-btn-demo.tsx+++ /dev/null@@ -1,19 +0,0 @@-import { ScriptCopyBtn } from "@/registry/magicui/script-copy-btn"--export default function ScriptCopyBtnDemo() {- const customCommandMap = {- npm: "npm run shadcn add button",- yarn: "yarn shadcn add button",- pnpm: "pnpm dlx shadcn@latest add button",- bun: "bun x shadcn@latest add button",- }- return (- <ScriptCopyBtn- showMultiplePackageOptions={true}- codeLanguage="shell"- lightTheme="nord"- darkTheme="vitesse-dark"- commandMap={customCommandMap}- />- )-}diff --git a/apps/www/registry/magicui/box-reveal.tsx b/apps/www/registry/magicui/box-reveal.tsxdeleted file mode 100644index 8a1ebc50..00000000--- a/apps/www/registry/magicui/box-reveal.tsx+++ /dev/null@@ -1,69 +0,0 @@-"use client"--import { useEffect, useRef } from "react"-import { motion, useAnimation, useInView } from "motion/react"--export interface BoxRevealProps {- children: React.ReactNode- width?: "fit-content" | "100%"- boxColor?: string- duration?: number-}--export const BoxReveal = ({- children,- width = "fit-content",- boxColor = "#5046e6",- duration,-}: BoxRevealProps) => {- const mainControls = useAnimation()- const slideControls = useAnimation()-- const ref = useRef(null)- const isInView = useInView(ref, { once: true })-- useEffect(() => {- if (isInView) {- slideControls.start("visible")- mainControls.start("visible")- } else {- slideControls.start("hidden")- mainControls.start("hidden")- }- }, [isInView, mainControls, slideControls])-- return (- <div ref={ref} style={{ position: "relative", width, overflow: "hidden" }}>- <motion.div- variants={{- hidden: { opacity: 0, y: 75 },- visible: { opacity: 1, y: 0 },- }}- initial="hidden"- animate={mainControls}- transition={{ duration: duration ? duration : 0.5, delay: 0.25 }}- >- {children}- </motion.div>-- <motion.div- variants={{- hidden: { left: 0 },- visible: { left: "100%" },- }}- initial="hidden"- animate={slideControls}- transition={{ duration: duration ? duration : 0.5, ease: "easeIn" }}- style={{- position: "absolute",- top: 4,- bottom: 4,- left: 0,- right: 0,- zIndex: 20,- background: boxColor,- }}- />- </div>- )-}diff --git a/apps/www/registry/magicui/flip-text.tsx b/apps/www/registry/magicui/flip-text.tsxdeleted file mode 100644index dd2a5449..00000000--- a/apps/www/registry/magicui/flip-text.tsx+++ /dev/null@@ -1,63 +0,0 @@-"use client"--import React, { ElementType } from "react"-import { AnimatePresence, motion, MotionProps, Variants } from "motion/react"--import { cn } from "@/lib/utils"--interface FlipTextProps extends MotionProps {- /** The duration of the animation */- duration?: number- /** The delay between each character */- delayMultiple?: number- /** The variants of the animation */- framerProps?: Variants- /** The class name of the component */- className?: string- /** The element type of the component */- as?: ElementType- /** The children of the component */- children: React.ReactNode- /** The variants of the animation */- variants?: Variants-}--const defaultVariants: Variants = {- hidden: { rotateX: -90, opacity: 0 },- visible: { rotateX: 0, opacity: 1 },-}--export function FlipText({- children,- duration = 0.5,- delayMultiple = 0.08,-- className,- as: Component = "span",- variants,- ...props-}: FlipTextProps) {- const MotionComponent = motion.create(Component)- const characters = React.Children.toArray(children).join("").split("")-- return (- <div className="flex justify-center space-x-2">- <AnimatePresence mode="wait">- {characters.map((char, i) => (- <MotionComponent- key={i}- initial="hidden"- animate="visible"- exit="hidden"- variants={variants || defaultVariants}- transition={{ duration, delay: i * delayMultiple }}- className={cn("origin-center drop-shadow-sm", className)}- {...props}- >- {char}- </MotionComponent>- ))}- </AnimatePresence>- </div>- )-}diff --git a/apps/www/registry/magicui/scratch-to-reveal.tsx b/apps/www/registry/magicui/scratch-to-reveal.tsxdeleted file mode 100644index 2b6718a8..00000000--- a/apps/www/registry/magicui/scratch-to-reveal.tsx+++ /dev/null@@ -1,172 +0,0 @@-"use client"--import React, { useEffect, useRef, useState } from "react"-import { motion, useAnimation } from "motion/react"--import { cn } from "@/lib/utils"--interface ScratchToRevealProps {- children: React.ReactNode- width: number- height: number- minScratchPercentage?: number- className?: string- onComplete?: () => void- gradientColors?: [string, string, string]-}--export const ScratchToReveal: React.FC<ScratchToRevealProps> = ({- width,- height,- minScratchPercentage = 50,- onComplete,- children,- className,- gradientColors = ["#A97CF8", "#F38CB8", "#FDCC92"],-}) => {- const canvasRef = useRef<HTMLCanvasElement>(null)- const [isScratching, setIsScratching] = useState(false)- const [isComplete, setIsComplete] = useState(false)-- const controls = useAnimation()-- useEffect(() => {- const canvas = canvasRef.current- const ctx = canvas?.getContext("2d")- if (canvas && ctx) {- ctx.fillStyle = "#ccc"- ctx.fillRect(0, 0, canvas.width, canvas.height)- const gradient = ctx.createLinearGradient(- 0,- 0,- canvas.width,- canvas.height- )- gradient.addColorStop(0, gradientColors[0])- gradient.addColorStop(0.5, gradientColors[1])- gradient.addColorStop(1, gradientColors[2])- ctx.fillStyle = gradient- ctx.fillRect(0, 0, canvas.width, canvas.height)- }- }, [gradientColors])-- useEffect(() => {- const handleDocumentMouseMove = (event: MouseEvent) => {- if (!isScratching) return- scratch(event.clientX, event.clientY)- }-- const handleDocumentTouchMove = (event: TouchEvent) => {- if (!isScratching) return- const touch = event.touches[0]- scratch(touch.clientX, touch.clientY)- }-- const handleDocumentMouseUp = () => {- setIsScratching(false)- checkCompletion()- }-- const handleDocumentTouchEnd = () => {- setIsScratching(false)- checkCompletion()- }-- document.addEventListener("mousedown", handleDocumentMouseMove)- document.addEventListener("mousemove", handleDocumentMouseMove)- document.addEventListener("touchstart", handleDocumentTouchMove)- document.addEventListener("touchmove", handleDocumentTouchMove)- document.addEventListener("mouseup", handleDocumentMouseUp)- document.addEventListener("touchend", handleDocumentTouchEnd)- document.addEventListener("touchcancel", handleDocumentTouchEnd)-- return () => {- document.removeEventListener("mousedown", handleDocumentMouseMove)- document.removeEventListener("mousemove", handleDocumentMouseMove)- document.removeEventListener("touchstart", handleDocumentTouchMove)- document.removeEventListener("touchmove", handleDocumentTouchMove)- document.removeEventListener("mouseup", handleDocumentMouseUp)- document.removeEventListener("touchend", handleDocumentTouchEnd)- document.removeEventListener("touchcancel", handleDocumentTouchEnd)- }- }, [isScratching])-- const handleMouseDown = () => setIsScratching(true)-- const handleTouchStart = () => setIsScratching(true)-- const scratch = (clientX: number, clientY: number) => {- const canvas = canvasRef.current- const ctx = canvas?.getContext("2d")- if (canvas && ctx) {- const rect = canvas.getBoundingClientRect()- const x = clientX - rect.left + 16- const y = clientY - rect.top + 16- ctx.globalCompositeOperation = "destination-out"- ctx.beginPath()- ctx.arc(x, y, 30, 0, Math.PI * 2)- ctx.fill()- }- }-- const startAnimation = async () => {- await controls.start({- scale: [1, 1.5, 1],- rotate: [0, 10, -10, 10, -10, 0],- transition: { duration: 0.5 },- })-- // Call onComplete after animation finishes- if (onComplete) {- onComplete()- }- }-- const checkCompletion = () => {- if (isComplete) return-- const canvas = canvasRef.current- const ctx = canvas?.getContext("2d")- if (canvas && ctx) {- const imageData = ctx.getImageData(0, 0, canvas.width, canvas.height)- const pixels = imageData.data- const totalPixels = pixels.length / 4- let clearPixels = 0-- for (let i = 3; i < pixels.length; i += 4) {- if (pixels[i] === 0) clearPixels++- }-- const percentage = (clearPixels / totalPixels) * 100-- if (percentage >= minScratchPercentage) {- setIsComplete(true)- ctx.clearRect(0, 0, canvas.width, canvas.height)- startAnimation()- }- }- }-- return (- <motion.div- className={cn("relative select-none", className)}- style={{- width,- height,- cursor:- "url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgdmlld0JveD0iMCAwIDMyIDMyIj4KICA8Y2lyY2xlIGN4PSIxNiIgY3k9IjE2IiByPSIxNSIgc3R5bGU9ImZpbGw6I2ZmZjtzdHJva2U6IzAwMDtzdHJva2Utd2lkdGg6MXB4OyIgLz4KPC9zdmc+'), auto",- }}- animate={controls}- >- <canvas- ref={canvasRef}- width={width}- height={height}- className="absolute top-0 left-0"- onMouseDown={handleMouseDown}- onTouchStart={handleTouchStart}- ></canvas>- {children}- </motion.div>- )-}diff --git a/apps/www/registry/magicui/script-copy-btn.tsx b/apps/www/registry/magicui/script-copy-btn.tsxdeleted file mode 100644index bf208cd4..00000000--- a/apps/www/registry/magicui/script-copy-btn.tsx+++ /dev/null@@ -1,148 +0,0 @@-"use client"--import { HTMLAttributes, useEffect, useState } from "react"-import { Check, Copy } from "lucide-react"-import { motion } from "motion/react"-import { useTheme } from "next-themes"--import { cn } from "@/lib/utils"-import { Button } from "@/components/ui/button"--interface ScriptCopyBtnProps extends HTMLAttributes<HTMLDivElement> {- showMultiplePackageOptions?: boolean- codeLanguage: string- lightTheme: string- darkTheme: string- commandMap: Record<string, string>- className?: string-}--export function ScriptCopyBtn({- showMultiplePackageOptions = true,- codeLanguage,- lightTheme,- darkTheme,- commandMap,- className,-}: ScriptCopyBtnProps) {- const packageManagers = Object.keys(commandMap)- const [packageManager, setPackageManager] = useState(packageManagers[0])- const [copied, setCopied] = useState(false)- const [highlightedCode, setHighlightedCode] = useState("")- const { theme } = useTheme()- const command = commandMap[packageManager]-- useEffect(() => {- async function loadHighlightedCode() {- try {- const { codeToHtml } = await import("shiki")- const highlighted = await codeToHtml(command, {- lang: codeLanguage,- themes: {- light: lightTheme,- dark: darkTheme,- },- defaultColor: theme === "dark" ? "dark" : "light",- })- setHighlightedCode(highlighted)- } catch (error) {- console.error("Error highlighting code:", error)- setHighlightedCode(`<pre>${command}</pre>`)- }- }-- loadHighlightedCode()- }, [command, theme, codeLanguage, lightTheme, darkTheme])-- const copyToClipboard = () => {- navigator.clipboard.writeText(command)- setCopied(true)- setTimeout(() => setCopied(false), 2000)- }-- return (- <div- className={cn(- "mx-auto flex max-w-md items-center justify-center",- className- )}- >- <div className="w-full space-y-2">- <div className="mb-2 flex items-center justify-between">- {showMultiplePackageOptions && (- <div className="relative">- <div className="border-border inline-flex overflow-hidden rounded-md border text-xs">- {packageManagers.map((pm, index) => (- <div key={pm} className="flex items-center">- {index > 0 && (- <div className="bg-border h-4 w-px" aria-hidden="true" />- )}- <Button- variant="ghost"- size="sm"- className={`bg-background hover:bg-background relative rounded-none px-2 py-1 ${- packageManager === pm- ? "text-primary"- : "text-muted-foreground"- }`}- onClick={() => setPackageManager(pm)}- >- {pm}- {packageManager === pm && (- <motion.div- className="bg-primary absolute inset-x-0 bottom-[1px] mx-auto h-0.5 w-[90%]"- layoutId="activeTab"- initial={false}- transition={{- type: "spring",- stiffness: 500,- damping: 30,- }}- />- )}- </Button>- </div>- ))}- </div>- </div>- )}- </div>- <div className="relative flex items-center">- <div className="min-w-[300px] grow font-mono">- {highlightedCode ? (- <div- className={`[&>pre]:overflow-x-auto [&>pre]:rounded-md [&>pre]:p-2 [&>pre]:px-4 [&>pre]:font-mono ${- theme === "dark" ? "dark" : "light"- }`}- dangerouslySetInnerHTML={{ __html: highlightedCode }}- />- ) : (- <pre className="border-border rounded-md border bg-white p-2 px-4 font-mono dark:bg-black">- {command}- </pre>- )}- </div>- <Button- variant="outline"- size="icon"- className="relative ml-2 rounded-md"- onClick={copyToClipboard}- aria-label={copied ? "Copied" : "Copy to clipboard"}- >- <span className="sr-only">{copied ? "Copied" : "Copy"}</span>- <Copy- className={`h-4 w-4 transition-all duration-300 ${- copied ? "scale-0" : "scale-100"- }`}- />- <Check- className={`absolute inset-0 m-auto h-4 w-4 transition-all duration-300 ${- copied ? "scale-100" : "scale-0"- }`}- />- </Button>- </div>- </div>- </div>- )-}diff --git a/apps/www/registry/registry-examples.ts b/apps/www/registry/registry-examples.tsindex 5f5a7ed9..bc9e2585 100644--- a/apps/www/registry/registry-examples.ts+++ b/apps/www/registry/registry-examples.ts@@ -370,19 +370,6 @@ export const examples: Registry["items"] = [},],},- {- name: "script-copy-btn-demo",- type: "registry:example",- title: "Script Copy Button Demo",- description: "Example showing how to copy code to clipboard.",- registryDependencies: ["@magicui/script-copy-btn"],- files: [- {- path: "example/script-copy-btn-demo.tsx",- type: "registry:example",- },- ],- },{name: "marquee-demo",type: "registry:example",@@ -979,32 +966,6 @@ export const examples: Registry["items"] = [},],},- {- name: "scratch-to-reveal-demo",- type: "registry:example",- title: "Scratch To Reveal Demo",- description: "Example showing an interactive scratch-off reveal effect.",- registryDependencies: ["@magicui/scratch-to-reveal"],- files: [- {- path: "example/scratch-to-reveal-demo.tsx",- type: "registry:example",- },- ],- },- {- name: "flip-text-demo",- type: "registry:example",- title: "Flip Text Demo",- description: "Example showing text with character flip animations.",- registryDependencies: ["@magicui/flip-text"],- files: [- {- path: "example/flip-text-demo.tsx",- type: "registry:example",- },- ],- },{name: "sparkles-text-demo",type: "registry:example",@@ -1226,19 +1187,6 @@ export const examples: Registry["items"] = [},],},- {- name: "box-reveal-demo",- type: "registry:example",- title: "Box Reveal Demo",- description: "Example showing a sliding box text reveal animation.",- registryDependencies: ["@magicui/box-reveal"],- files: [- {- path: "example/box-reveal-demo.tsx",- type: "registry:example",- },- ],- },{name: "animated-circular-progress-bar-demo",type: "registry:example",diff --git a/apps/www/registry/registry-ui.ts b/apps/www/registry/registry-ui.tsindex 280913a5..6a2109e1 100644--- a/apps/www/registry/registry-ui.ts+++ b/apps/www/registry/registry-ui.ts@@ -320,20 +320,6 @@ export const ui: Registry["items"] = [},],},- {- name: "script-copy-btn",- type: "registry:ui",- title: "Script Copy Button",- description: "Copy code to clipboard",- dependencies: ["motion", "shiki", "next-themes"],- registryDependencies: ["button"],- files: [- {- path: "magicui/script-copy-btn.tsx",- type: "registry:ui",- },- ],- },{name: "marquee",type: "registry:ui",@@ -796,19 +782,6 @@ export const ui: Registry["items"] = [},],},- {- name: "flip-text",- type: "registry:ui",- title: "Flip Text",- description: "Text flipping character animation",- dependencies: ["motion"],- files: [- {- path: "magicui/flip-text.tsx",- type: "registry:ui",- },- ],- },{name: "comic-text",type: "registry:ui",@@ -862,20 +835,6 @@ export const ui: Registry["items"] = [},],},- {- name: "scratch-to-reveal",- type: "registry:ui",- title: "Scratch To Reveal",- description:- "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:ui",- },- ],- },{name: "shiny-button",type: "registry:ui",@@ -890,19 +849,6 @@ export const ui: Registry["items"] = [},],},- {- name: "box-reveal",- type: "registry:ui",- title: "Box Reveal Animation",- description: "Sliding box animation that reveals text behind it.",- dependencies: ["motion"],- files: [- {- path: "magicui/box-reveal.tsx",- type: "registry:ui",- },- ],- },{name: "shine-border",type: "registry:ui",