UI Library for Design Engineers. Animated components and effects you can copy and paste into your apps. Free. Open Source.
fix: update registry component types
Dillion Verma8b9789d68246
diff --git a/__registry__/index.tsx b/__registry__/index.tsxindex 0840e36c..a6823dbe 100644--- a/__registry__/index.tsx+++ b/__registry__/index.tsx@@ -19,12 +19,12 @@ export const Index: Record<string, any> = {name: "magic-card",description:"A spotlight effect that follows your mouse cursor and highlights borders on hover.",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/magic-card.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -42,12 +42,12 @@ export const Index: Record<string, any> = {android: {name: "android",description: "A mockup of an Android device.",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/android.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -65,12 +65,12 @@ export const Index: Record<string, any> = {"warp-background": {name: "warp-background",description: "A card with a time warping background effect.",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/warp-background.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -88,12 +88,12 @@ export const Index: Record<string, any> = {"line-shadow-text": {name: "line-shadow-text",description: "A text component with a moving line shadow.",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/line-shadow-text.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -111,12 +111,12 @@ export const Index: Record<string, any> = {"aurora-text": {name: "aurora-text",description: "A beautiful aurora text effect",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/aurora-text.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -134,12 +134,12 @@ export const Index: Record<string, any> = {"morphing-text": {name: "morphing-text",description: "A dynamic text morphing component for Magic UI.",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/morphing-text.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -157,12 +157,12 @@ export const Index: Record<string, any> = {"scroll-progress": {name: "scroll-progress",description: "Animated Scroll Progress for your pages",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/scroll-progress.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -180,12 +180,12 @@ export const Index: Record<string, any> = {"neon-gradient-card": {name: "neon-gradient-card",description: "A beautiful neon card effect",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/neon-gradient-card.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -203,12 +203,12 @@ export const Index: Record<string, any> = {meteors: {name: "meteors",description: "A meteor shower effect.",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/meteors.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -227,12 +227,12 @@ export const Index: Record<string, any> = {name: "grid-pattern",description:"A background grid pattern made with SVGs, fully customizable using Tailwind CSS.",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/grid-pattern.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -251,12 +251,12 @@ export const Index: Record<string, any> = {name: "interactive-grid-pattern",description:"A interactive background grid pattern made with SVGs, fully customizable using Tailwind CSS.",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/interactive-grid-pattern.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -277,12 +277,12 @@ export const Index: Record<string, any> = {name: "dot-pattern",description:"A background dot pattern made with SVGs, fully customizable using Tailwind CSS.",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/dot-pattern.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -301,12 +301,12 @@ export const Index: Record<string, any> = {name: "flickering-grid",description:"A flickering grid background made with SVGs, fully customizable using Tailwind CSS.",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/flickering-grid.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -324,12 +324,12 @@ export const Index: Record<string, any> = {"hero-video-dialog": {name: "hero-video-dialog",description: "A hero video dialog component.",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/hero-video-dialog.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -347,12 +347,12 @@ export const Index: Record<string, any> = {"code-comparison": {name: "code-comparison",description: "A component which compares two code snippets.",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/code-comparison.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -370,12 +370,12 @@ export const Index: Record<string, any> = {"script-copy-btn": {name: "script-copy-btn",description: "Copy code to clipboard",- type: "registry:ui",+ type: "registry:component",registryDependencies: ["button"],files: [{path: "registry/magicui/script-copy-btn.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -394,12 +394,12 @@ export const Index: Record<string, any> = {name: "marquee",description:"An infinite scrolling component that can be used to display text, images, or videos.",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/marquee.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -418,12 +418,12 @@ export const Index: Record<string, any> = {name: "globe",description:"An autorotating, interactive, and highly performant globe made using WebGL.",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/globe.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -442,12 +442,12 @@ export const Index: Record<string, any> = {name: "shimmer-button",description:"A button with a shimmering light which travels around the perimeter.",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/shimmer-button.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -466,12 +466,12 @@ export const Index: Record<string, any> = {name: "tweet-card",description:"A card that displays a tweet with the author's name, handle, and profile picture.",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/tweet-card.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -490,12 +490,12 @@ export const Index: Record<string, any> = {name: "client-tweet-card",description:"A client-side version of the tweet card that displays a tweet with the author's name, handle, and profile picture.",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/client-tweet-card.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -514,12 +514,12 @@ export const Index: Record<string, any> = {name: "bento-grid",description:"Bento grid is a layout used to showcase the features of a product in a simple and elegant way.",- type: "registry:ui",+ type: "registry:component",registryDependencies: ["button"],files: [{path: "registry/magicui/bento-grid.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -538,12 +538,12 @@ export const Index: Record<string, any> = {name: "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.",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/particles.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -561,12 +561,12 @@ export const Index: Record<string, any> = {"number-ticker": {name: "number-ticker",description: "Animate numbers to count up or down to a target number",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/number-ticker.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -585,12 +585,12 @@ export const Index: Record<string, any> = {name: "ripple",description:"An animated ripple effect typically used behind elements to emphasize them.",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/ripple.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -608,12 +608,12 @@ export const Index: Record<string, any> = {"retro-grid": {name: "retro-grid",description: "An animated scrolling retro grid effect",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/retro-grid.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -632,12 +632,12 @@ export const Index: Record<string, any> = {name: "animated-list",description:"A list that animates each item in sequence with a delay. Used to showcase notifications or events on your landing page.",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/animated-list.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -656,12 +656,12 @@ export const Index: Record<string, any> = {name: "animated-shiny-text",description:"A light glare effect which pans across text making it appear as if it is shimmering.",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/animated-shiny-text.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -680,12 +680,12 @@ export const Index: Record<string, any> = {name: "animated-grid-pattern",description:"A animated background grid pattern made with SVGs, fully customizable using Tailwind CSS.",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/animated-grid-pattern.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -704,12 +704,12 @@ export const Index: Record<string, any> = {name: "border-beam",description:"An animated beam of light which travels along the border of its container.",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/border-beam.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -728,12 +728,12 @@ export const Index: Record<string, any> = {name: "animated-beam",description:'An animated beam of light which travels along a path. Useful for showcasing the "integration" features of a website.',- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/animated-beam.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -751,12 +751,12 @@ export const Index: Record<string, any> = {"text-reveal": {name: "text-reveal",description: "Fade in text as you scroll down the page.",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/text-reveal.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -775,12 +775,12 @@ export const Index: Record<string, any> = {name: "hyper-text",description:"A text animation that scrambles letters before revealing the final text.",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/hyper-text.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -799,12 +799,12 @@ export const Index: Record<string, any> = {name: "animated-gradient-text",description:"An animated gradient background which transitions between colors for text.",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/animated-gradient-text.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -823,12 +823,12 @@ export const Index: Record<string, any> = {name: "orbiting-circles",description:"A collection of circles which move in orbit along a circular path",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/orbiting-circles.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -847,12 +847,12 @@ export const Index: Record<string, any> = {name: "dock",description:"An implementation of the MacOS dock using react + tailwindcss + framer motion",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/dock.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -870,12 +870,12 @@ export const Index: Record<string, any> = {"word-rotate": {name: "word-rotate",description: "A vertical rotation of words",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/word-rotate.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -893,12 +893,12 @@ export const Index: Record<string, any> = {"avatar-circles": {name: "avatar-circles",description: "Overlapping circles of avatars.",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/avatar-circles.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -916,12 +916,12 @@ export const Index: Record<string, any> = {"typing-animation": {name: "typing-animation",description: "Characters appearing in typed animation",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/typing-animation.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -940,12 +940,12 @@ export const Index: Record<string, any> = {name: "sparkles-text",description:"A dynamic text that generates continuous sparkles with smooth transitions, perfect for highlighting text with animated stars.",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/sparkles-text.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -963,12 +963,12 @@ export const Index: Record<string, any> = {"flip-text": {name: "flip-text",description: "Text flipping character animation",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/flip-text.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -986,12 +986,12 @@ export const Index: Record<string, any> = {"icon-cloud": {name: "icon-cloud",description: "An interactive 3D tag cloud component",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/icon-cloud.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -1010,12 +1010,12 @@ export const Index: Record<string, any> = {name: "text-animate",description:"A text animation component that animates text using a variety of different animations.",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/text-animate.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -1033,12 +1033,12 @@ export const Index: Record<string, any> = {"scroll-based-velocity": {name: "scroll-based-velocity",description: "Scrolling text whose speed changes based on scroll speed",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/scroll-based-velocity.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -1057,12 +1057,12 @@ export const Index: Record<string, any> = {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",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/scratch-to-reveal.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -1081,12 +1081,12 @@ export const Index: Record<string, any> = {name: "shiny-button",description:"A shiny button component with dynamic styles in the dark mode or light mode.",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/shiny-button.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -1104,12 +1104,12 @@ export const Index: Record<string, any> = {"box-reveal": {name: "box-reveal",description: "Sliding box animation that reveals text behind it.",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/box-reveal.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -1127,12 +1127,12 @@ export const Index: Record<string, any> = {"shine-border": {name: "shine-border",description: "Shine border is an animated background border effect.",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/shine-border.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -1151,12 +1151,12 @@ export const Index: Record<string, any> = {name: "animated-circular-progress-bar",description:"Animated Circular Progress Bar is a component that displays a circular gauge with a percentage value.",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/animated-circular-progress-bar.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -1177,12 +1177,12 @@ export const Index: Record<string, any> = {name: "confetti",description:"Confetti animations are best used to delight your users when something special happens",- type: "registry:ui",+ type: "registry:component",registryDependencies: ["button"],files: [{path: "registry/magicui/confetti.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -1201,12 +1201,12 @@ export const Index: Record<string, any> = {name: "animated-subscribe-button",description:"An animated subscribe button useful for showing a micro animation from intial to final result.",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/animated-subscribe-button.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -1226,12 +1226,12 @@ export const Index: Record<string, any> = {"cool-mode": {name: "cool-mode",description: "Cool mode effect for buttons, links, and other DOMs",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/cool-mode.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -1250,12 +1250,12 @@ export const Index: Record<string, any> = {name: "pulsating-button",description:"An animated pulsating button useful for capturing attention of users.",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/pulsating-button.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -1273,12 +1273,12 @@ export const Index: Record<string, any> = {"ripple-button": {name: "ripple-button",description: "An animated button with ripple useful for user engagement.",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/ripple-button.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -1297,12 +1297,12 @@ export const Index: Record<string, any> = {name: "file-tree",description:"A component used to showcase the folder and file structure of a directory.",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/file-tree.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -1321,12 +1321,12 @@ export const Index: Record<string, any> = {name: "blur-fade",description:"Blur fade in and out animation. Used to smoothly fade in and out content.",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/blur-fade.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -1344,12 +1344,12 @@ export const Index: Record<string, any> = {safari: {name: "safari",description: "A safari browser mockup to showcase your website.",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/safari.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -1367,12 +1367,12 @@ export const Index: Record<string, any> = {"iphone-15-pro": {name: "iphone-15-pro",description: "A mockup of the iPhone 15 Pro",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/iphone-15-pro.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -1390,12 +1390,12 @@ export const Index: Record<string, any> = {"rainbow-button": {name: "rainbow-button",description: "An animated button with a rainbow effect.",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/rainbow-button.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -1413,12 +1413,12 @@ export const Index: Record<string, any> = {"interactive-hover-button": {name: "interactive-hover-button",description: "",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/interactive-hover-button.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],@@ -1438,12 +1438,12 @@ export const Index: Record<string, any> = {terminal: {name: "terminal",description: "A terminal component",- type: "registry:ui",+ type: "registry:component",registryDependencies: undefined,files: [{path: "registry/magicui/terminal.tsx",- type: "registry:ui",+ type: "registry:component",target: "",},],diff --git a/package.json b/package.jsonindex 3ab2559e..12212314 100644--- a/package.json+++ b/package.json@@ -66,7 +66,7 @@"postcss": "8.4.39","posthog-js": "^1.144.2","react": "18.3.1",- "react-day-picker": "^8.9.1",+ "react-day-picker": "^8.10.1","react-dom": "18.3.1","react-hook-form": "^7.50.1","react-tweet": "^3.2.1",diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex b6f97f52..44201523 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -135,8 +135,8 @@ importers:specifier: 18.3.1version: 18.3.1react-day-picker:- specifier: ^8.9.1- version: 8.10.0([email protected])([email protected])+ specifier: ^8.10.1+ version: 8.10.1([email protected])([email protected])react-dom:specifier: 18.3.1version: 18.3.1([email protected])@@ -4811,8 +4811,8 @@ packages:resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==}- resolution: {integrity: sha512-mz+qeyrOM7++1NCb1ARXmkjMkzWVh2GL9YiPbRjKe0zHccvekk4HE+0MPOZOrosn8r8zTHIIeOUXTmXRqmkRmg==}+ resolution: {integrity: sha512-TMx7fNbhLk15eqcMt+7Z7S2KF7mfTId/XJDjKE8f+IUcFn0l08/kI4FiYTL/0yuOLmEcbR4Fwe3GJf/NiiMnPA==}peerDependencies:date-fns: ^2.28.0 || ^3.0.0react: ^16.8.0 || ^17.0.0 || ^18.0.0@@ -11118,7 +11118,7 @@ snapshots:dependencies:safe-buffer: 5.2.1dependencies:date-fns: 2.30.0react: 18.3.1diff --git a/public/r/android.json b/public/r/android.jsonindex 0620634f..43ed9903 100644--- a/public/r/android.json+++ b/public/r/android.json@@ -1,14 +1,14 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "android",- "type": "registry:ui",+ "type": "registry:component","title": "Android","description": "A mockup of an Android device.","files": [{"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:ui"+ "type": "registry:component"}]}\ No newline at end of filediff --git a/public/r/animated-beam.json b/public/r/animated-beam.jsonindex f12074ae..0dba1c2a 100644--- a/public/r/animated-beam.json+++ b/public/r/animated-beam.json@@ -1,7 +1,7 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "animated-beam",- "type": "registry:ui",+ "type": "registry:component","title": "Animated Beam","description": "An animated beam of light which travels along a path. Useful for showcasing the \"integration\" features of a website.","dependencies": [@@ -11,7 +11,7 @@{"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:ui"+ "type": "registry:component"}]}\ No newline at end of filediff --git a/public/r/animated-circular-progress-bar.json b/public/r/animated-circular-progress-bar.jsonindex 9ab5532d..ae84ddce 100644--- a/public/r/animated-circular-progress-bar.json+++ b/public/r/animated-circular-progress-bar.json@@ -1,14 +1,14 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "animated-circular-progress-bar",- "type": "registry:ui",+ "type": "registry:component","title": "Animated Circular Progress Bar","description": "Animated Circular Progress Bar is a component that displays a circular gauge with a percentage value.","files": [{"path": "registry/magicui/animated-circular-progress-bar.tsx","content": "import { cn } from \"@/lib/utils\";\n\ninterface AnimatedCircularProgressBarProps {\n max: number;\n value: number;\n min: number;\n gaugePrimaryColor: string;\n gaugeSecondaryColor: string;\n className?: string;\n}\n\nexport function AnimatedCircularProgressBar({\n max = 100,\n min = 0,\n value = 0,\n gaugePrimaryColor,\n gaugeSecondaryColor,\n className,\n}: AnimatedCircularProgressBarProps) {\n const circumference = 2 * Math.PI * 45;\n const percentPx = circumference / 100;\n const currentPercent = Math.round(((value - min) / (max - min)) * 100);\n\n return (\n <div\n className={cn(\"relative size-40 text-2xl font-semibold\", className)}\n style={\n {\n \"--circle-size\": \"100px\",\n \"--circumference\": circumference,\n \"--percent-to-px\": `${percentPx}px`,\n \"--gap-percent\": \"5\",\n \"--offset-factor\": \"0\",\n \"--transition-length\": \"1s\",\n \"--transition-step\": \"200ms\",\n \"--delay\": \"0s\",\n \"--percent-to-deg\": \"3.6deg\",\n transform: \"translateZ(0)\",\n } as React.CSSProperties\n }\n >\n <svg\n fill=\"none\"\n className=\"size-full\"\n strokeWidth=\"2\"\n viewBox=\"0 0 100 100\"\n >\n {currentPercent <= 90 && currentPercent >= 0 && (\n <circle\n cx=\"50\"\n cy=\"50\"\n r=\"45\"\n strokeWidth=\"10\"\n strokeDashoffset=\"0\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className=\" opacity-100\"\n style={\n {\n stroke: gaugeSecondaryColor,\n \"--stroke-percent\": 90 - currentPercent,\n \"--offset-factor-secondary\": \"calc(1 - var(--offset-factor))\",\n strokeDasharray:\n \"calc(var(--stroke-percent) * var(--percent-to-px)) var(--circumference)\",\n transform:\n \"rotate(calc(1turn - 90deg - (var(--gap-percent) * var(--percent-to-deg) * var(--offset-factor-secondary)))) scaleY(-1)\",\n transition: \"all var(--transition-length) ease var(--delay)\",\n transformOrigin:\n \"calc(var(--circle-size) / 2) calc(var(--circle-size) / 2)\",\n } as React.CSSProperties\n }\n />\n )}\n <circle\n cx=\"50\"\n cy=\"50\"\n r=\"45\"\n strokeWidth=\"10\"\n strokeDashoffset=\"0\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className=\"opacity-100\"\n style={\n {\n stroke: gaugePrimaryColor,\n \"--stroke-percent\": currentPercent,\n strokeDasharray:\n \"calc(var(--stroke-percent) * var(--percent-to-px)) var(--circumference)\",\n transition:\n \"var(--transition-length) ease var(--delay),stroke var(--transition-length) ease var(--delay)\",\n transitionProperty: \"stroke-dasharray,transform\",\n transform:\n \"rotate(calc(-90deg + var(--gap-percent) * var(--offset-factor) * var(--percent-to-deg)))\",\n transformOrigin:\n \"calc(var(--circle-size) / 2) calc(var(--circle-size) / 2)\",\n } as React.CSSProperties\n }\n />\n </svg>\n <span\n data-current-value={currentPercent}\n className=\"duration-[var(--transition-length)] delay-[var(--delay)] absolute inset-0 m-auto size-fit ease-linear animate-in fade-in\"\n >\n {currentPercent}\n </span>\n </div>\n );\n}\n",- "type": "registry:ui"+ "type": "registry:component"}]}\ No newline at end of filediff --git a/public/r/animated-gradient-text.json b/public/r/animated-gradient-text.jsonindex a3a6fd00..62c25a21 100644--- a/public/r/animated-gradient-text.json+++ b/public/r/animated-gradient-text.json@@ -1,14 +1,14 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "animated-gradient-text",- "type": "registry:ui",+ "type": "registry:component","title": "Animated Gradient Text","description": "An animated gradient background which transitions between colors for text.","files": [{"path": "registry/magicui/animated-gradient-text.tsx","content": "import { ComponentPropsWithoutRef, ReactNode } from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nexport interface AnimatedGradientTextProps\n extends ComponentPropsWithoutRef<\"div\"> {\n children: ReactNode;\n}\n\nexport function AnimatedGradientText({\n children,\n className,\n ...props\n}: AnimatedGradientTextProps) {\n return (\n <div\n className={cn(\n \"group relative mx-auto flex max-w-fit flex-row items-center justify-center rounded-2xl bg-white/40 px-4 py-1.5 text-sm font-medium shadow-[inset_0_-8px_10px_#8fdfff1f] backdrop-blur-sm transition-shadow duration-500 ease-out [--bg-size:300%] hover:shadow-[inset_0_-5px_10px_#8fdfff3f] dark:bg-black/40\",\n className,\n )}\n {...props}\n >\n <div\n className={`absolute inset-0 block h-full w-full animate-gradient bg-gradient-to-r from-[#ffaa40]/50 via-[#9c40ff]/50 to-[#ffaa40]/50 bg-[length:var(--bg-size)_100%] p-[1px] ![mask-composite:subtract] [border-radius:inherit] [mask:linear-gradient(#fff_0_0)_content-box,linear-gradient(#fff_0_0)]`}\n />\n\n {children}\n </div>\n );\n}\n",- "type": "registry:ui"+ "type": "registry:component"}],"tailwind": {diff --git a/public/r/animated-grid-pattern.json b/public/r/animated-grid-pattern.jsonindex 309a1407..6d3fcb85 100644--- a/public/r/animated-grid-pattern.json+++ b/public/r/animated-grid-pattern.json@@ -1,7 +1,7 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "animated-grid-pattern",- "type": "registry:ui",+ "type": "registry:component","title": "Animated Grid Pattern","description": "A animated background grid pattern made with SVGs, fully customizable using Tailwind CSS.","dependencies": [@@ -11,7 +11,7 @@{"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:ui"+ "type": "registry:component"}]}\ No newline at end of filediff --git a/public/r/animated-list.json b/public/r/animated-list.jsonindex 2b66af78..c80773de 100644--- a/public/r/animated-list.json+++ b/public/r/animated-list.json@@ -1,7 +1,7 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "animated-list",- "type": "registry:ui",+ "type": "registry:component","title": "Animated List","description": "A list that animates each item in sequence with a delay. Used to showcase notifications or events on your landing page.","dependencies": [@@ -11,7 +11,7 @@{"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:ui"+ "type": "registry:component"}]}\ No newline at end of filediff --git a/public/r/animated-shiny-text.json b/public/r/animated-shiny-text.jsonindex a6cad52f..6aa8296d 100644--- a/public/r/animated-shiny-text.json+++ b/public/r/animated-shiny-text.json@@ -1,14 +1,14 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "animated-shiny-text",- "type": "registry:ui",+ "type": "registry:component","title": "Animated Shiny Text","description": "A light glare effect which pans across text making it appear as if it is shimmering.","files": [{"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:ui"+ "type": "registry:component"}],"tailwind": {diff --git a/public/r/animated-subscribe-button.json b/public/r/animated-subscribe-button.jsonindex db4f1a95..50baf550 100644--- a/public/r/animated-subscribe-button.json+++ b/public/r/animated-subscribe-button.json@@ -1,7 +1,7 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "animated-subscribe-button",- "type": "registry:ui",+ "type": "registry:component","title": "Animated Subscribe Button","description": "An animated subscribe button useful for showing a micro animation from intial to final result.","dependencies": [@@ -11,7 +11,7 @@{"path": "registry/magicui/animated-subscribe-button.tsx","content": "\"use client\";\n\nimport { cn } from \"@/lib/utils\";\nimport { HTMLMotionProps } from \"motion/react\";\nimport { AnimatePresence, motion } from \"motion/react\";\nimport React, { useState } from \"react\";\n\ninterface AnimatedSubscribeButtonProps\n extends Omit<HTMLMotionProps<\"button\">, \"ref\"> {\n subscribeStatus?: boolean;\n children: React.ReactNode;\n className?: string;\n}\n\nexport const AnimatedSubscribeButton = React.forwardRef<\n HTMLButtonElement,\n AnimatedSubscribeButtonProps\n>(\n (\n { subscribeStatus = false, onClick, className, children, ...props },\n ref,\n ) => {\n const [isSubscribed, setIsSubscribed] = useState<boolean>(subscribeStatus);\n\n if (\n React.Children.count(children) !== 2 ||\n !React.Children.toArray(children).every(\n (child) => React.isValidElement(child) && child.type === \"span\",\n )\n ) {\n throw new Error(\n \"AnimatedSubscribeButton expects two children, both of which must be <span> elements.\",\n );\n }\n\n const childrenArray = React.Children.toArray(children);\n const initialChild = childrenArray[0];\n const changeChild = childrenArray[1];\n\n return (\n <AnimatePresence mode=\"wait\">\n {isSubscribed ? (\n <motion.button\n ref={ref}\n className={cn(\n \"relative flex h-10 w-fit items-center justify-center overflow-hidden rounded-lg bg-primary px-6 text-primary-foreground\",\n className,\n )}\n onClick={(e: React.MouseEvent<HTMLButtonElement>) => {\n setIsSubscribed(false);\n onClick?.(e);\n }}\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n exit={{ opacity: 0 }}\n {...props}\n >\n <motion.span\n key=\"action\"\n className=\"relative flex h-full w-full items-center justify-center font-semibold\"\n initial={{ y: -50 }}\n animate={{ y: 0 }}\n >\n {changeChild} {/* Use children for subscribed state */}\n </motion.span>\n </motion.button>\n ) : (\n <motion.button\n ref={ref}\n className={cn(\n \"relative flex h-10 w-fit cursor-pointer items-center justify-center rounded-lg border-none bg-primary px-6 text-primary-foreground\",\n className,\n )}\n onClick={(e) => {\n setIsSubscribed(true);\n onClick?.(e);\n }}\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n exit={{ opacity: 0 }}\n {...props}\n >\n <motion.span\n key=\"reaction\"\n className=\"relative flex items-center justify-center font-semibold\"\n initial={{ x: 0 }}\n exit={{ x: 50, transition: { duration: 0.1 } }}\n >\n {initialChild} {/* Use children for unsubscribed state */}\n </motion.span>\n </motion.button>\n )}\n </AnimatePresence>\n );\n },\n);\n\nAnimatedSubscribeButton.displayName = \"AnimatedSubscribeButton\";\n",- "type": "registry:ui"+ "type": "registry:component"}]}\ No newline at end of filediff --git a/public/r/aurora-text.json b/public/r/aurora-text.jsonindex 36453ed9..95d5925e 100644--- a/public/r/aurora-text.json+++ b/public/r/aurora-text.json@@ -1,7 +1,7 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "aurora-text",- "type": "registry:ui",+ "type": "registry:component","title": "Aurora Text","description": "A beautiful aurora text effect","dependencies": [@@ -11,7 +11,7 @@{"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:ui"+ "type": "registry:component"}],"tailwind": {diff --git a/public/r/avatar-circles.json b/public/r/avatar-circles.jsonindex 42e958e9..2c2c8670 100644--- a/public/r/avatar-circles.json+++ b/public/r/avatar-circles.json@@ -1,14 +1,14 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "avatar-circles",- "type": "registry:ui",+ "type": "registry:component","title": "Avatar Circles","description": "Overlapping circles of avatars.","files": [{"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:ui"+ "type": "registry:component"}]}\ No newline at end of filediff --git a/public/r/bento-grid.json b/public/r/bento-grid.jsonindex cd1c8d11..d866cc8f 100644--- a/public/r/bento-grid.json+++ b/public/r/bento-grid.json@@ -1,7 +1,7 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "bento-grid",- "type": "registry:ui",+ "type": "registry:component","title": "Bento Grid","description": "Bento grid is a layout used to showcase the features of a product in a simple and elegant way.","dependencies": [@@ -14,7 +14,7 @@{"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:ui"+ "type": "registry:component"}]}\ No newline at end of filediff --git a/public/r/blur-fade.json b/public/r/blur-fade.jsonindex 3eb90926..d58c4e1d 100644--- a/public/r/blur-fade.json+++ b/public/r/blur-fade.json@@ -1,7 +1,7 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "blur-fade",- "type": "registry:ui",+ "type": "registry:component","title": "Blur Fade","description": "Blur fade in and out animation. Used to smoothly fade in and out content.","dependencies": [@@ -11,7 +11,7 @@{"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:ui"+ "type": "registry:component"}]}\ No newline at end of filediff --git a/public/r/border-beam.json b/public/r/border-beam.jsonindex cc21cd69..d60c014d 100644--- a/public/r/border-beam.json+++ b/public/r/border-beam.json@@ -1,14 +1,14 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "border-beam",- "type": "registry:ui",+ "type": "registry:component","title": "Border Beam","description": "An animated beam of light which travels along the border of its container.","files": [{"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:ui"+ "type": "registry:component"}],"tailwind": {diff --git a/public/r/box-reveal.json b/public/r/box-reveal.jsonindex 9b59e4fd..2ba1c46a 100644--- a/public/r/box-reveal.json+++ b/public/r/box-reveal.json@@ -1,7 +1,7 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "box-reveal",- "type": "registry:ui",+ "type": "registry:component","title": "Box Reveal Animation","description": "Sliding box animation that reveals text behind it.","dependencies": [@@ -11,7 +11,7 @@{"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:ui"+ "type": "registry:component"}]}\ No newline at end of filediff --git a/public/r/client-tweet-card.json b/public/r/client-tweet-card.jsonindex dbd754af..eea43394 100644--- a/public/r/client-tweet-card.json+++ b/public/r/client-tweet-card.json@@ -1,7 +1,7 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "client-tweet-card",- "type": "registry:ui",+ "type": "registry:component","title": "Client Tweet Card","description": "A client-side version of the tweet card that displays a tweet with the author's name, handle, and profile picture.","dependencies": [@@ -11,7 +11,7 @@{"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:ui"+ "type": "registry:component"}]}\ No newline at end of filediff --git a/public/r/code-comparison.json b/public/r/code-comparison.jsonindex 6928683b..e720dc66 100644--- a/public/r/code-comparison.json+++ b/public/r/code-comparison.json@@ -1,7 +1,7 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "code-comparison",- "type": "registry:ui",+ "type": "registry:component","title": "Code Comparison","description": "A component which compares two code snippets.","dependencies": [@@ -12,7 +12,7 @@{"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:ui"+ "type": "registry:component"}]}\ No newline at end of filediff --git a/public/r/confetti.json b/public/r/confetti.jsonindex cb021eeb..dbaf631d 100644--- a/public/r/confetti.json+++ b/public/r/confetti.json@@ -1,7 +1,7 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "confetti",- "type": "registry:ui",+ "type": "registry:component","title": "Confetti","description": "Confetti animations are best used to delight your users when something special happens","dependencies": [@@ -15,7 +15,7 @@{"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:ui"+ "type": "registry:component"}]}\ No newline at end of filediff --git a/public/r/cool-mode.json b/public/r/cool-mode.jsonindex dc9ec144..a0cb94a6 100644--- a/public/r/cool-mode.json+++ b/public/r/cool-mode.json@@ -1,14 +1,14 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "cool-mode",- "type": "registry:ui",+ "type": "registry:component","title": "Cool Mode","description": "Cool mode effect for buttons, links, and other DOMs","files": [{"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:ui"+ "type": "registry:component"}]}\ No newline at end of filediff --git a/public/r/dock.json b/public/r/dock.jsonindex 68d8546c..e2bf7df7 100644--- a/public/r/dock.json+++ b/public/r/dock.json@@ -1,7 +1,7 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "dock",- "type": "registry:ui",+ "type": "registry:component","title": "Dock","description": "An implementation of the MacOS dock using react + tailwindcss + framer motion","dependencies": [@@ -11,7 +11,7 @@{"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:ui"+ "type": "registry:component"}]}\ No newline at end of filediff --git a/public/r/dot-pattern.json b/public/r/dot-pattern.jsonindex d482ef99..a06a3f0c 100644--- a/public/r/dot-pattern.json+++ b/public/r/dot-pattern.json@@ -1,14 +1,14 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "dot-pattern",- "type": "registry:ui",+ "type": "registry:component","title": "Dot Pattern","description": "A background dot pattern made with SVGs, fully customizable using Tailwind CSS.","files": [{"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:ui"+ "type": "registry:component"}]}\ No newline at end of filediff --git a/public/r/file-tree.json b/public/r/file-tree.jsonindex 14640d0a..71cce05f 100644--- a/public/r/file-tree.json+++ b/public/r/file-tree.json@@ -1,14 +1,14 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "file-tree",- "type": "registry:ui",+ "type": "registry:component","title": "File Tree","description": "A component used to showcase the folder and file structure of a directory.","files": [{"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:ui"+ "type": "registry:component"}]}\ No newline at end of filediff --git a/public/r/flickering-grid.json b/public/r/flickering-grid.jsonindex a2dbcab5..be6caef2 100644--- a/public/r/flickering-grid.json+++ b/public/r/flickering-grid.json@@ -1,14 +1,14 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "flickering-grid",- "type": "registry:ui",+ "type": "registry:component","title": "Flickering Grid","description": "A flickering grid background made with SVGs, fully customizable using Tailwind CSS.","files": [{"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:ui"+ "type": "registry:component"}]}\ No newline at end of filediff --git a/public/r/flip-text.json b/public/r/flip-text.jsonindex 0c5627ee..372f0bfb 100644--- a/public/r/flip-text.json+++ b/public/r/flip-text.json@@ -1,7 +1,7 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "flip-text",- "type": "registry:ui",+ "type": "registry:component","title": "Flip Text","description": "Text flipping character animation","dependencies": [@@ -11,7 +11,7 @@{"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:ui"+ "type": "registry:component"}]}\ No newline at end of filediff --git a/public/r/globe.json b/public/r/globe.jsonindex 59b6c112..b3bc0a8b 100644--- a/public/r/globe.json+++ b/public/r/globe.json@@ -1,7 +1,7 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "globe",- "type": "registry:ui",+ "type": "registry:component","title": "Globe","description": "An autorotating, interactive, and highly performant globe made using WebGL.","dependencies": [@@ -11,7 +11,7 @@{"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:ui"+ "type": "registry:component"}]}\ No newline at end of filediff --git a/public/r/grid-pattern.json b/public/r/grid-pattern.jsonindex 2eecb1a0..9cbdab8b 100644--- a/public/r/grid-pattern.json+++ b/public/r/grid-pattern.json@@ -1,14 +1,14 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "grid-pattern",- "type": "registry:ui",+ "type": "registry:component","title": "Grid Pattern","description": "A background grid pattern made with SVGs, fully customizable using Tailwind CSS.","files": [{"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:ui"+ "type": "registry:component"}]}\ No newline at end of filediff --git a/public/r/hero-video-dialog.json b/public/r/hero-video-dialog.jsonindex 1012fa2d..59682f52 100644--- a/public/r/hero-video-dialog.json+++ b/public/r/hero-video-dialog.json@@ -1,7 +1,7 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "hero-video-dialog",- "type": "registry:ui",+ "type": "registry:component","title": "Hero Video Dialog","description": "A hero video dialog component.","dependencies": [@@ -11,7 +11,7 @@{"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:ui"+ "type": "registry:component"}]}\ No newline at end of filediff --git a/public/r/hyper-text.json b/public/r/hyper-text.jsonindex 4b64f60e..250e2066 100644--- a/public/r/hyper-text.json+++ b/public/r/hyper-text.json@@ -1,7 +1,7 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "hyper-text",- "type": "registry:ui",+ "type": "registry:component","title": "Hyper Text","description": "A text animation that scrambles letters before revealing the final text.","dependencies": [@@ -11,7 +11,7 @@{"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:ui"+ "type": "registry:component"}]}\ No newline at end of filediff --git a/public/r/icon-cloud.json b/public/r/icon-cloud.jsonindex dc19c62a..edda983e 100644--- a/public/r/icon-cloud.json+++ b/public/r/icon-cloud.json@@ -1,7 +1,7 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "icon-cloud",- "type": "registry:ui",+ "type": "registry:component","title": "Icon Cloud","description": "An interactive 3D tag cloud component","dependencies": [],@@ -9,7 +9,7 @@{"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:ui"+ "type": "registry:component"}]}\ No newline at end of filediff --git a/public/r/interactive-grid-pattern.json b/public/r/interactive-grid-pattern.jsonindex 8f3dca6d..69da6a03 100644--- a/public/r/interactive-grid-pattern.json+++ b/public/r/interactive-grid-pattern.json@@ -1,14 +1,14 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "interactive-grid-pattern",- "type": "registry:ui",+ "type": "registry:component","title": "Interactive Grid Pattern","description": "A interactive background grid pattern made with SVGs, fully customizable using Tailwind CSS.","files": [{"path": "registry/magicui/interactive-grid-pattern.tsx","content": "\"use client\";\n\nimport { cn } from \"@/lib/utils\";\nimport React, { useState } from \"react\";\n\n/**\n * InteractiveGridPattern is a component that renders a grid pattern with interactive squares.\n *\n * @param width - The width of each square.\n * @param height - The height of each square.\n * @param squares - The number of squares in the grid. The first element is the number of horizontal squares, and the second element is the number of vertical squares.\n * @param className - The class name of the grid.\n * @param squaresClassName - The class name of the squares.\n */\ninterface InteractiveGridPatternProps extends React.SVGProps<SVGSVGElement> {\n width?: number;\n height?: number;\n squares?: [number, number]; // [horizontal, vertical]\n className?: string;\n squaresClassName?: string;\n}\n\n/**\n * The InteractiveGridPattern component.\n *\n * @see InteractiveGridPatternProps for the props interface.\n * @returns A React component.\n */\nexport function InteractiveGridPattern({\n width = 40,\n height = 40,\n squares = [24, 24],\n className,\n squaresClassName,\n ...props\n}: InteractiveGridPatternProps) {\n const [horizontal, vertical] = squares;\n const [hoveredSquare, setHoveredSquare] = useState<number | null>(null);\n\n return (\n <svg\n width={width * horizontal}\n height={height * vertical}\n className={cn(\n \"absolute inset-0 h-full w-full border border-gray-400/30\",\n className,\n )}\n {...props}\n >\n {Array.from({ length: horizontal * vertical }).map((_, index) => {\n const x = (index % horizontal) * width;\n const y = Math.floor(index / horizontal) * height;\n return (\n <rect\n key={index}\n x={x}\n y={y}\n width={width}\n height={height}\n className={cn(\n \"stroke-gray-400/30 transition-all duration-100 ease-in-out [&:not(:hover)]:duration-1000\",\n hoveredSquare === index ? \"fill-gray-300/30\" : \"fill-transparent\",\n squaresClassName,\n )}\n onMouseEnter={() => setHoveredSquare(index)}\n onMouseLeave={() => setHoveredSquare(null)}\n />\n );\n })}\n </svg>\n );\n}\n",- "type": "registry:ui"+ "type": "registry:component"}]}\ No newline at end of filediff --git a/public/r/interactive-hover-button.json b/public/r/interactive-hover-button.jsonindex 3df877f0..cceefe06 100644--- a/public/r/interactive-hover-button.json+++ b/public/r/interactive-hover-button.json@@ -1,12 +1,12 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "interactive-hover-button",- "type": "registry:ui",+ "type": "registry:component","files": [{"path": "registry/magicui/interactive-hover-button.tsx","content": "import React from \"react\";\nimport { ArrowRight } from \"lucide-react\";\nimport { cn } from \"@/lib/utils\";\n\ninterface InteractiveHoverButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement> {}\n\nexport const InteractiveHoverButton = React.forwardRef<\n HTMLButtonElement,\n InteractiveHoverButtonProps\n>(({ children, className, ...props }, ref) => {\n return (\n <button\n ref={ref}\n className={cn(\n \"group relative w-auto cursor-pointer overflow-hidden rounded-full border bg-background p-2 px-6 text-center font-semibold\",\n className,\n )}\n {...props}\n >\n <div className=\"flex items-center gap-2\">\n <div className=\"h-2 w-2 rounded-full bg-primary transition-all duration-300 group-hover:scale-[100.8]\"></div>\n <span className=\"inline-block transition-all duration-300 group-hover:translate-x-12 group-hover:opacity-0\">\n {children}\n </span>\n </div>\n <div className=\"absolute top-0 z-10 flex h-full w-full translate-x-12 items-center justify-center gap-2 text-primary-foreground opacity-0 transition-all duration-300 group-hover:-translate-x-5 group-hover:opacity-100\">\n <span>{children}</span>\n <ArrowRight />\n </div>\n </button>\n );\n});\n\nInteractiveHoverButton.displayName = \"InteractiveHoverButton\";\n",- "type": "registry:ui"+ "type": "registry:component"}]}\ No newline at end of filediff --git a/public/r/iphone-15-pro.json b/public/r/iphone-15-pro.jsonindex 731e7bf3..3151a5e6 100644--- a/public/r/iphone-15-pro.json+++ b/public/r/iphone-15-pro.json@@ -1,14 +1,14 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "iphone-15-pro",- "type": "registry:ui",+ "type": "registry:component","title": "iPhone 15 Pro","description": "A mockup of the iPhone 15 Pro","files": [{"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:ui"+ "type": "registry:component"}]}\ No newline at end of filediff --git a/public/r/line-shadow-text.json b/public/r/line-shadow-text.jsonindex 614e62c9..4b19993e 100644--- a/public/r/line-shadow-text.json+++ b/public/r/line-shadow-text.json@@ -1,7 +1,7 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "line-shadow-text",- "type": "registry:ui",+ "type": "registry:component","title": "Line Shadow Text","description": "A text component with a moving line shadow.","dependencies": [@@ -11,7 +11,7 @@{"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:ui"+ "type": "registry:component"}]}\ No newline at end of filediff --git a/public/r/magic-card.json b/public/r/magic-card.jsonindex be9f7708..cf7ff470 100644--- a/public/r/magic-card.json+++ b/public/r/magic-card.json@@ -1,7 +1,7 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "magic-card",- "type": "registry:ui",+ "type": "registry:component","title": "Magic Card","description": "A spotlight effect that follows your mouse cursor and highlights borders on hover.","dependencies": [@@ -11,7 +11,7 @@{"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:ui"+ "type": "registry:component"}]}\ No newline at end of filediff --git a/public/r/marquee.json b/public/r/marquee.jsonindex 0c24e4c7..d59e6da1 100644--- a/public/r/marquee.json+++ b/public/r/marquee.json@@ -1,14 +1,14 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "marquee",- "type": "registry:ui",+ "type": "registry:component","title": "Marquee","description": "An infinite scrolling component that can be used to display text, images, or videos.","files": [{"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:ui"+ "type": "registry:component"}],"tailwind": {diff --git a/public/r/meteors.json b/public/r/meteors.jsonindex f03df070..2d312f29 100644--- a/public/r/meteors.json+++ b/public/r/meteors.json@@ -1,14 +1,14 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "meteors",- "type": "registry:ui",+ "type": "registry:component","title": "Meteors","description": "A meteor shower effect.","files": [{"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:ui"+ "type": "registry:component"}],"tailwind": {diff --git a/public/r/morphing-text.json b/public/r/morphing-text.jsonindex de74020e..2845dd90 100644--- a/public/r/morphing-text.json+++ b/public/r/morphing-text.json@@ -1,14 +1,14 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "morphing-text",- "type": "registry:ui",+ "type": "registry:component","title": "Morphing Text","description": "A dynamic text morphing component for Magic UI.","files": [{"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:ui"+ "type": "registry:component"}]}\ No newline at end of filediff --git a/public/r/neon-gradient-card.json b/public/r/neon-gradient-card.jsonindex eddb4b39..f68c8807 100644--- a/public/r/neon-gradient-card.json+++ b/public/r/neon-gradient-card.json@@ -1,14 +1,14 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "neon-gradient-card",- "type": "registry:ui",+ "type": "registry:component","title": "Neon Gradient Card","description": "A beautiful neon card effect","files": [{"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:ui"+ "type": "registry:component"}],"tailwind": {diff --git a/public/r/number-ticker.json b/public/r/number-ticker.jsonindex cf9b1192..38e07437 100644--- a/public/r/number-ticker.json+++ b/public/r/number-ticker.json@@ -1,7 +1,7 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "number-ticker",- "type": "registry:ui",+ "type": "registry:component","title": "Number Ticker","description": "Animate numbers to count up or down to a target number","dependencies": [@@ -11,7 +11,7 @@{"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:ui"+ "type": "registry:component"}]}\ No newline at end of filediff --git a/public/r/orbiting-circles.json b/public/r/orbiting-circles.jsonindex 587ef920..6ca6fb56 100644--- a/public/r/orbiting-circles.json+++ b/public/r/orbiting-circles.json@@ -1,14 +1,14 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "orbiting-circles",- "type": "registry:ui",+ "type": "registry:component","title": "Orbiting Circles","description": "A collection of circles which move in orbit along a circular path","files": [{"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:ui"+ "type": "registry:component"}],"tailwind": {diff --git a/public/r/particles.json b/public/r/particles.jsonindex a4dc36dc..0ee51c0a 100644--- a/public/r/particles.json+++ b/public/r/particles.json@@ -1,14 +1,14 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "particles",- "type": "registry:ui",+ "type": "registry:component","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": "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:ui"+ "type": "registry:component"}]}\ No newline at end of filediff --git a/public/r/pulsating-button.json b/public/r/pulsating-button.jsonindex dfc885b4..04629175 100644--- a/public/r/pulsating-button.json+++ b/public/r/pulsating-button.json@@ -1,14 +1,14 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "pulsating-button",- "type": "registry:ui",+ "type": "registry:component","title": "Pulsating Button","description": "An animated pulsating button useful for capturing attention of users.","files": [{"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:ui"+ "type": "registry:component"}],"tailwind": {diff --git a/public/r/rainbow-button.json b/public/r/rainbow-button.jsonindex 3d7a4030..a7deb99f 100644--- a/public/r/rainbow-button.json+++ b/public/r/rainbow-button.json@@ -1,14 +1,14 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "rainbow-button",- "type": "registry:ui",+ "type": "registry:component","title": "Rainbow Button","description": "An animated button with a rainbow effect.","files": [{"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:ui"+ "type": "registry:component"}],"tailwind": {diff --git a/public/r/retro-grid.json b/public/r/retro-grid.jsonindex 4543e19e..c4351e89 100644--- a/public/r/retro-grid.json+++ b/public/r/retro-grid.json@@ -1,14 +1,14 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "retro-grid",- "type": "registry:ui",+ "type": "registry:component","title": "Retro Grid","description": "An animated scrolling retro grid effect","files": [{"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:ui"+ "type": "registry:component"}],"tailwind": {diff --git a/public/r/ripple-button.json b/public/r/ripple-button.jsonindex de32b900..b47135e4 100644--- a/public/r/ripple-button.json+++ b/public/r/ripple-button.json@@ -1,14 +1,14 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "ripple-button",- "type": "registry:ui",+ "type": "registry:component","title": "Ripple Button","description": "An animated button with ripple useful for user engagement.","files": [{"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:ui"+ "type": "registry:component"}],"tailwind": {diff --git a/public/r/ripple.json b/public/r/ripple.jsonindex 9b1d1b8f..780f29a3 100644--- a/public/r/ripple.json+++ b/public/r/ripple.json@@ -1,14 +1,14 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "ripple",- "type": "registry:ui",+ "type": "registry:component","title": "Ripple","description": "An animated ripple effect typically used behind elements to emphasize them.","files": [{"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:ui"+ "type": "registry:component"}],"tailwind": {diff --git a/public/r/safari.json b/public/r/safari.jsonindex 1d0edab5..90427bba 100644--- a/public/r/safari.json+++ b/public/r/safari.json@@ -1,14 +1,14 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "safari",- "type": "registry:ui",+ "type": "registry:component","title": "Safari","description": "A safari browser mockup to showcase your website.","files": [{"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:ui"+ "type": "registry:component"}]}\ No newline at end of filediff --git a/public/r/scratch-to-reveal.json b/public/r/scratch-to-reveal.jsonindex aca66d86..478d0bd8 100644--- a/public/r/scratch-to-reveal.json+++ b/public/r/scratch-to-reveal.json@@ -1,7 +1,7 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "scratch-to-reveal",- "type": "registry:ui",+ "type": "registry:component","title": "Scratch To Reveal","description": "The ScratchToReveal component creates an interactive scratch-off effect with customizable dimensions and animations, revealing hidden content beneath.","dependencies": [@@ -11,7 +11,7 @@{"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:ui"+ "type": "registry:component"}]}\ No newline at end of filediff --git a/public/r/script-copy-btn.json b/public/r/script-copy-btn.jsonindex e604d803..13c40224 100644--- a/public/r/script-copy-btn.json+++ b/public/r/script-copy-btn.json@@ -1,7 +1,7 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "script-copy-btn",- "type": "registry:ui",+ "type": "registry:component","title": "Script Copy Button","description": "Copy code to clipboard","dependencies": [@@ -16,7 +16,7 @@{"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:ui"+ "type": "registry:component"}]}\ No newline at end of filediff --git a/public/r/scroll-based-velocity.json b/public/r/scroll-based-velocity.jsonindex 5690b0cd..a4886605 100644--- a/public/r/scroll-based-velocity.json+++ b/public/r/scroll-based-velocity.json@@ -1,7 +1,7 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "scroll-based-velocity",- "type": "registry:ui",+ "type": "registry:component","title": "Scroll Based Velocity","description": "Scrolling text whose speed changes based on scroll speed","dependencies": [@@ -11,7 +11,7 @@{"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:ui"+ "type": "registry:component"}]}\ No newline at end of filediff --git a/public/r/scroll-progress.json b/public/r/scroll-progress.jsonindex 525d0cd3..5dce3ec2 100644--- a/public/r/scroll-progress.json+++ b/public/r/scroll-progress.json@@ -1,7 +1,7 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "scroll-progress",- "type": "registry:ui",+ "type": "registry:component","title": "Scroll Progress","description": "Animated Scroll Progress for your pages","dependencies": [@@ -11,7 +11,7 @@{"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:ui"+ "type": "registry:component"}]}\ No newline at end of filediff --git a/public/r/shimmer-button.json b/public/r/shimmer-button.jsonindex 833053e3..55fb459c 100644--- a/public/r/shimmer-button.json+++ b/public/r/shimmer-button.json@@ -1,14 +1,14 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "shimmer-button",- "type": "registry:ui",+ "type": "registry:component","title": "Shimmer Button","description": "A button with a shimmering light which travels around the perimeter.","files": [{"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:ui"+ "type": "registry:component"}],"tailwind": {diff --git a/public/r/shine-border.json b/public/r/shine-border.jsonindex a8b22e7b..b8db413c 100644--- a/public/r/shine-border.json+++ b/public/r/shine-border.json@@ -1,14 +1,14 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "shine-border",- "type": "registry:ui",+ "type": "registry:component","title": "Shine Border","description": "Shine border is an animated background border effect.","files": [{"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:ui"+ "type": "registry:component"}],"tailwind": {diff --git a/public/r/shiny-button.json b/public/r/shiny-button.jsonindex 301a3a62..c81b4b9b 100644--- a/public/r/shiny-button.json+++ b/public/r/shiny-button.json@@ -1,7 +1,7 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "shiny-button",- "type": "registry:ui",+ "type": "registry:component","title": "Shiny Button","description": "A shiny button component with dynamic styles in the dark mode or light mode.","dependencies": [@@ -11,7 +11,7 @@{"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:ui"+ "type": "registry:component"}]}\ No newline at end of filediff --git a/public/r/sparkles-text.json b/public/r/sparkles-text.jsonindex fa59dbcd..796b1ea6 100644--- a/public/r/sparkles-text.json+++ b/public/r/sparkles-text.json@@ -1,7 +1,7 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "sparkles-text",- "type": "registry:ui",+ "type": "registry:component","title": "Sparkles Text","description": "A dynamic text that generates continuous sparkles with smooth transitions, perfect for highlighting text with animated stars.","dependencies": [@@ -11,7 +11,7 @@{"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:ui"+ "type": "registry:component"}]}\ No newline at end of filediff --git a/public/r/terminal.json b/public/r/terminal.jsonindex 078fe561..b0062770 100644--- a/public/r/terminal.json+++ b/public/r/terminal.json@@ -1,14 +1,14 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "terminal",- "type": "registry:ui",+ "type": "registry:component","title": "Terminal","description": "A terminal component","files": [{"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:ui"+ "type": "registry:component"}]}\ No newline at end of filediff --git a/public/r/text-animate.json b/public/r/text-animate.jsonindex 09d09754..19155b4f 100644--- a/public/r/text-animate.json+++ b/public/r/text-animate.json@@ -1,7 +1,7 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "text-animate",- "type": "registry:ui",+ "type": "registry:component","title": "Text Animate","description": "A text animation component that animates text using a variety of different animations.","dependencies": [@@ -11,7 +11,7 @@{"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:ui"+ "type": "registry:component"}]}\ No newline at end of filediff --git a/public/r/text-reveal.json b/public/r/text-reveal.jsonindex edcc8d55..7b7babd8 100644--- a/public/r/text-reveal.json+++ b/public/r/text-reveal.json@@ -1,7 +1,7 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "text-reveal",- "type": "registry:ui",+ "type": "registry:component","title": "Text Reveal","description": "Fade in text as you scroll down the page.","dependencies": [@@ -11,7 +11,7 @@{"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:ui"+ "type": "registry:component"}]}\ No newline at end of filediff --git a/public/r/tweet-card.json b/public/r/tweet-card.jsonindex b197c262..c51ca4ef 100644--- a/public/r/tweet-card.json+++ b/public/r/tweet-card.json@@ -1,7 +1,7 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "tweet-card",- "type": "registry:ui",+ "type": "registry:component","title": "Tweet Card","description": "A card that displays a tweet with the author's name, handle, and profile picture.","dependencies": [@@ -11,7 +11,7 @@{"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:ui"+ "type": "registry:component"}]}\ No newline at end of filediff --git a/public/r/typing-animation.json b/public/r/typing-animation.jsonindex 7df8c92c..eb51ae43 100644--- a/public/r/typing-animation.json+++ b/public/r/typing-animation.json@@ -1,7 +1,7 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "typing-animation",- "type": "registry:ui",+ "type": "registry:component","title": "Typing Animation","description": "Characters appearing in typed animation","dependencies": [@@ -11,7 +11,7 @@{"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:ui"+ "type": "registry:component"}]}\ No newline at end of filediff --git a/public/r/warp-background.json b/public/r/warp-background.jsonindex aa184a97..bc3d29f4 100644--- a/public/r/warp-background.json+++ b/public/r/warp-background.json@@ -1,7 +1,7 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "warp-background",- "type": "registry:ui",+ "type": "registry:component","title": "Warp Background","description": "A card with a time warping background effect.","dependencies": [@@ -11,7 +11,7 @@{"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:ui"+ "type": "registry:component"}]}\ No newline at end of filediff --git a/public/r/word-rotate.json b/public/r/word-rotate.jsonindex a111d8cf..3bc8a008 100644--- a/public/r/word-rotate.json+++ b/public/r/word-rotate.json@@ -1,7 +1,7 @@{"$schema": "https://ui.shadcn.com/schema/registry-item.json","name": "word-rotate",- "type": "registry:ui",+ "type": "registry:component","title": "Word Rotate","description": "A vertical rotation of words","dependencies": [@@ -11,7 +11,7 @@{"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:ui"+ "type": "registry:component"}]}\ No newline at end of filediff --git a/registry.json b/registry.jsonindex 37258faa..ef741b6d 100644--- a/registry.json+++ b/registry.json@@ -25,7 +25,7 @@},{"name": "magic-card",- "type": "registry:ui",+ "type": "registry:component","title": "Magic Card","description": "A spotlight effect that follows your mouse cursor and highlights borders on hover.","dependencies": [@@ -34,25 +34,25 @@"files": [{"path": "registry/magicui/magic-card.tsx",- "type": "registry:ui"+ "type": "registry:component"}]},{"name": "android",- "type": "registry:ui",+ "type": "registry:component","title": "Android","description": "A mockup of an Android device.","files": [{"path": "registry/magicui/android.tsx",- "type": "registry:ui"+ "type": "registry:component"}]},{"name": "warp-background",- "type": "registry:ui",+ "type": "registry:component","title": "Warp Background","description": "A card with a time warping background effect.","dependencies": [@@ -61,13 +61,13 @@"files": [{"path": "registry/magicui/warp-background.tsx",- "type": "registry:ui"+ "type": "registry:component"}]},{"name": "line-shadow-text",- "type": "registry:ui",+ "type": "registry:component","title": "Line Shadow Text","description": "A text component with a moving line shadow.","dependencies": [@@ -76,13 +76,13 @@"files": [{"path": "registry/magicui/line-shadow-text.tsx",- "type": "registry:ui"+ "type": "registry:component"}]},{"name": "aurora-text",- "type": "registry:ui",+ "type": "registry:component","title": "Aurora Text","description": "A beautiful aurora text effect","dependencies": [@@ -91,7 +91,7 @@"files": [{"path": "registry/magicui/aurora-text.tsx",- "type": "registry:ui"+ "type": "registry:component"}],"tailwind": {@@ -200,19 +200,19 @@},{"name": "morphing-text",- "type": "registry:ui",+ "type": "registry:component","title": "Morphing Text","description": "A dynamic text morphing component for Magic UI.","files": [{"path": "registry/magicui/morphing-text.tsx",- "type": "registry:ui"+ "type": "registry:component"}]},{"name": "scroll-progress",- "type": "registry:ui",+ "type": "registry:component","title": "Scroll Progress","description": "Animated Scroll Progress for your pages","dependencies": [@@ -221,19 +221,19 @@"files": [{"path": "registry/magicui/scroll-progress.tsx",- "type": "registry:ui"+ "type": "registry:component"}]},{"name": "neon-gradient-card",- "type": "registry:ui",+ "type": "registry:component","title": "Neon Gradient Card","description": "A beautiful neon card effect","files": [{"path": "registry/magicui/neon-gradient-card.tsx",- "type": "registry:ui"+ "type": "registry:component"}],"tailwind": {@@ -260,13 +260,13 @@},{"name": "meteors",- "type": "registry:ui",+ "type": "registry:component","title": "Meteors","description": "A meteor shower effect.","files": [{"path": "registry/magicui/meteors.tsx",- "type": "registry:ui"+ "type": "registry:component"}],"tailwind": {@@ -298,55 +298,55 @@},{"name": "grid-pattern",- "type": "registry:ui",+ "type": "registry:component","title": "Grid Pattern","description": "A background grid pattern made with SVGs, fully customizable using Tailwind CSS.","files": [{"path": "registry/magicui/grid-pattern.tsx",- "type": "registry:ui"+ "type": "registry:component"}]},{"name": "interactive-grid-pattern",- "type": "registry:ui",+ "type": "registry:component","title": "Interactive Grid Pattern","description": "A interactive background grid pattern made with SVGs, fully customizable using Tailwind CSS.","files": [{"path": "registry/magicui/interactive-grid-pattern.tsx",- "type": "registry:ui"+ "type": "registry:component"}]},{"name": "dot-pattern",- "type": "registry:ui",+ "type": "registry:component","title": "Dot Pattern","description": "A background dot pattern made with SVGs, fully customizable using Tailwind CSS.","files": [{"path": "registry/magicui/dot-pattern.tsx",- "type": "registry:ui"+ "type": "registry:component"}]},{"name": "flickering-grid",- "type": "registry:ui",+ "type": "registry:component","title": "Flickering Grid","description": "A flickering grid background made with SVGs, fully customizable using Tailwind CSS.","files": [{"path": "registry/magicui/flickering-grid.tsx",- "type": "registry:ui"+ "type": "registry:component"}]},{"name": "hero-video-dialog",- "type": "registry:ui",+ "type": "registry:component","title": "Hero Video Dialog","description": "A hero video dialog component.","dependencies": [@@ -355,13 +355,13 @@"files": [{"path": "registry/magicui/hero-video-dialog.tsx",- "type": "registry:ui"+ "type": "registry:component"}]},{"name": "code-comparison",- "type": "registry:ui",+ "type": "registry:component","title": "Code Comparison","description": "A component which compares two code snippets.","dependencies": [@@ -371,13 +371,13 @@"files": [{"path": "registry/magicui/code-comparison.tsx",- "type": "registry:ui"+ "type": "registry:component"}]},{"name": "script-copy-btn",- "type": "registry:ui",+ "type": "registry:component","title": "Script Copy Button","description": "Copy code to clipboard","dependencies": [@@ -391,19 +391,19 @@"files": [{"path": "registry/magicui/script-copy-btn.tsx",- "type": "registry:ui"+ "type": "registry:component"}]},{"name": "marquee",- "type": "registry:ui",+ "type": "registry:component","title": "Marquee","description": "An infinite scrolling component that can be used to display text, images, or videos.","files": [{"path": "registry/magicui/marquee.tsx",- "type": "registry:ui"+ "type": "registry:component"}],"tailwind": {@@ -439,7 +439,7 @@},{"name": "globe",- "type": "registry:ui",+ "type": "registry:component","title": "Globe","description": "An autorotating, interactive, and highly performant globe made using WebGL.","dependencies": [@@ -448,19 +448,19 @@"files": [{"path": "registry/magicui/globe.tsx",- "type": "registry:ui"+ "type": "registry:component"}]},{"name": "shimmer-button",- "type": "registry:ui",+ "type": "registry:component","title": "Shimmer Button","description": "A button with a shimmering light which travels around the perimeter.","files": [{"path": "registry/magicui/shimmer-button.tsx",- "type": "registry:ui"+ "type": "registry:component"}],"tailwind": {@@ -499,7 +499,7 @@},{"name": "tweet-card",- "type": "registry:ui",+ "type": "registry:component","title": "Tweet Card","description": "A card that displays a tweet with the author's name, handle, and profile picture.","dependencies": [@@ -508,13 +508,13 @@"files": [{"path": "registry/magicui/tweet-card.tsx",- "type": "registry:ui"+ "type": "registry:component"}]},{"name": "client-tweet-card",- "type": "registry:ui",+ "type": "registry:component","title": "Client Tweet Card","description": "A client-side version of the tweet card that displays a tweet with the author's name, handle, and profile picture.","dependencies": [@@ -523,13 +523,13 @@"files": [{"path": "registry/magicui/client-tweet-card.tsx",- "type": "registry:ui"+ "type": "registry:component"}]},{"name": "bento-grid",- "type": "registry:ui",+ "type": "registry:component","title": "Bento Grid","description": "Bento grid is a layout used to showcase the features of a product in a simple and elegant way.","dependencies": [@@ -541,25 +541,25 @@"files": [{"path": "registry/magicui/bento-grid.tsx",- "type": "registry:ui"+ "type": "registry:component"}]},{"name": "particles",- "type": "registry:ui",+ "type": "registry:component","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": "registry/magicui/particles.tsx",- "type": "registry:ui"+ "type": "registry:component"}]},{"name": "number-ticker",- "type": "registry:ui",+ "type": "registry:component","title": "Number Ticker","description": "Animate numbers to count up or down to a target number","dependencies": [@@ -568,19 +568,19 @@"files": [{"path": "registry/magicui/number-ticker.tsx",- "type": "registry:ui"+ "type": "registry:component"}]},{"name": "ripple",- "type": "registry:ui",+ "type": "registry:component","title": "Ripple","description": "An animated ripple effect typically used behind elements to emphasize them.","files": [{"path": "registry/magicui/ripple.tsx",- "type": "registry:ui"+ "type": "registry:component"}],"tailwind": {@@ -607,13 +607,13 @@},{"name": "retro-grid",- "type": "registry:ui",+ "type": "registry:component","title": "Retro Grid","description": "An animated scrolling retro grid effect","files": [{"path": "registry/magicui/retro-grid.tsx",- "type": "registry:ui"+ "type": "registry:component"}],"tailwind": {@@ -640,7 +640,7 @@},{"name": "animated-list",- "type": "registry:ui",+ "type": "registry:component","title": "Animated List","description": "A list that animates each item in sequence with a delay. Used to showcase notifications or events on your landing page.","dependencies": [@@ -649,19 +649,19 @@"files": [{"path": "registry/magicui/animated-list.tsx",- "type": "registry:ui"+ "type": "registry:component"}]},{"name": "animated-shiny-text",- "type": "registry:ui",+ "type": "registry:component","title": "Animated Shiny Text","description": "A light glare effect which pans across text making it appear as if it is shimmering.","files": [{"path": "registry/magicui/animated-shiny-text.tsx",- "type": "registry:ui"+ "type": "registry:component"}],"tailwind": {@@ -688,7 +688,7 @@},{"name": "animated-grid-pattern",- "type": "registry:ui",+ "type": "registry:component","title": "Animated Grid Pattern","description": "A animated background grid pattern made with SVGs, fully customizable using Tailwind CSS.","dependencies": [@@ -697,19 +697,19 @@"files": [{"path": "registry/magicui/animated-grid-pattern.tsx",- "type": "registry:ui"+ "type": "registry:component"}]},{"name": "border-beam",- "type": "registry:ui",+ "type": "registry:component","title": "Border Beam","description": "An animated beam of light which travels along the border of its container.","files": [{"path": "registry/magicui/border-beam.tsx",- "type": "registry:ui"+ "type": "registry:component"}],"tailwind": {@@ -733,7 +733,7 @@},{"name": "animated-beam",- "type": "registry:ui",+ "type": "registry:component","title": "Animated Beam","description": "An animated beam of light which travels along a path. Useful for showcasing the \"integration\" features of a website.","dependencies": [@@ -742,13 +742,13 @@"files": [{"path": "registry/magicui/animated-beam.tsx",- "type": "registry:ui"+ "type": "registry:component"}]},{"name": "text-reveal",- "type": "registry:ui",+ "type": "registry:component","title": "Text Reveal","description": "Fade in text as you scroll down the page.","dependencies": [@@ -757,13 +757,13 @@"files": [{"path": "registry/magicui/text-reveal.tsx",- "type": "registry:ui"+ "type": "registry:component"}]},{"name": "hyper-text",- "type": "registry:ui",+ "type": "registry:component","title": "Hyper Text","description": "A text animation that scrambles letters before revealing the final text.","dependencies": [@@ -772,19 +772,19 @@"files": [{"path": "registry/magicui/hyper-text.tsx",- "type": "registry:ui"+ "type": "registry:component"}]},{"name": "animated-gradient-text",- "type": "registry:ui",+ "type": "registry:component","title": "Animated Gradient Text","description": "An animated gradient background which transitions between colors for text.","files": [{"path": "registry/magicui/animated-gradient-text.tsx",- "type": "registry:ui"+ "type": "registry:component"}],"tailwind": {@@ -808,13 +808,13 @@},{"name": "orbiting-circles",- "type": "registry:ui",+ "type": "registry:component","title": "Orbiting Circles","description": "A collection of circles which move in orbit along a circular path","files": [{"path": "registry/magicui/orbiting-circles.tsx",- "type": "registry:ui"+ "type": "registry:component"}],"tailwind": {@@ -841,7 +841,7 @@},{"name": "dock",- "type": "registry:ui",+ "type": "registry:component","title": "Dock","description": "An implementation of the MacOS dock using react + tailwindcss + framer motion","dependencies": [@@ -850,13 +850,13 @@"files": [{"path": "registry/magicui/dock.tsx",- "type": "registry:ui"+ "type": "registry:component"}]},{"name": "word-rotate",- "type": "registry:ui",+ "type": "registry:component","title": "Word Rotate","description": "A vertical rotation of words","dependencies": [@@ -865,25 +865,25 @@"files": [{"path": "registry/magicui/word-rotate.tsx",- "type": "registry:ui"+ "type": "registry:component"}]},{"name": "avatar-circles",- "type": "registry:ui",+ "type": "registry:component","title": "Avatar Circles","description": "Overlapping circles of avatars.","files": [{"path": "registry/magicui/avatar-circles.tsx",- "type": "registry:ui"+ "type": "registry:component"}]},{"name": "typing-animation",- "type": "registry:ui",+ "type": "registry:component","title": "Typing Animation","description": "Characters appearing in typed animation","dependencies": [@@ -892,13 +892,13 @@"files": [{"path": "registry/magicui/typing-animation.tsx",- "type": "registry:ui"+ "type": "registry:component"}]},{"name": "sparkles-text",- "type": "registry:ui",+ "type": "registry:component","title": "Sparkles Text","description": "A dynamic text that generates continuous sparkles with smooth transitions, perfect for highlighting text with animated stars.","dependencies": [@@ -907,13 +907,13 @@"files": [{"path": "registry/magicui/sparkles-text.tsx",- "type": "registry:ui"+ "type": "registry:component"}]},{"name": "flip-text",- "type": "registry:ui",+ "type": "registry:component","title": "Flip Text","description": "Text flipping character animation","dependencies": [@@ -922,26 +922,26 @@"files": [{"path": "registry/magicui/flip-text.tsx",- "type": "registry:ui"+ "type": "registry:component"}]},{"name": "icon-cloud",- "type": "registry:ui",+ "type": "registry:component","title": "Icon Cloud","description": "An interactive 3D tag cloud component","dependencies": [],"files": [{"path": "registry/magicui/icon-cloud.tsx",- "type": "registry:ui"+ "type": "registry:component"}]},{"name": "text-animate",- "type": "registry:ui",+ "type": "registry:component","title": "Text Animate","description": "A text animation component that animates text using a variety of different animations.","dependencies": [@@ -950,13 +950,13 @@"files": [{"path": "registry/magicui/text-animate.tsx",- "type": "registry:ui"+ "type": "registry:component"}]},{"name": "scroll-based-velocity",- "type": "registry:ui",+ "type": "registry:component","title": "Scroll Based Velocity","description": "Scrolling text whose speed changes based on scroll speed","dependencies": [@@ -965,13 +965,13 @@"files": [{"path": "registry/magicui/scroll-based-velocity.tsx",- "type": "registry:ui"+ "type": "registry:component"}]},{"name": "scratch-to-reveal",- "type": "registry:ui",+ "type": "registry:component","title": "Scratch To Reveal","description": "The ScratchToReveal component creates an interactive scratch-off effect with customizable dimensions and animations, revealing hidden content beneath.","dependencies": [@@ -980,13 +980,13 @@"files": [{"path": "registry/magicui/scratch-to-reveal.tsx",- "type": "registry:ui"+ "type": "registry:component"}]},{"name": "shiny-button",- "type": "registry:ui",+ "type": "registry:component","title": "Shiny Button","description": "A shiny button component with dynamic styles in the dark mode or light mode.","dependencies": [@@ -995,13 +995,13 @@"files": [{"path": "registry/magicui/shiny-button.tsx",- "type": "registry:ui"+ "type": "registry:component"}]},{"name": "box-reveal",- "type": "registry:ui",+ "type": "registry:component","title": "Box Reveal Animation","description": "Sliding box animation that reveals text behind it.","dependencies": [@@ -1010,19 +1010,19 @@"files": [{"path": "registry/magicui/box-reveal.tsx",- "type": "registry:ui"+ "type": "registry:component"}]},{"name": "shine-border",- "type": "registry:ui",+ "type": "registry:component","title": "Shine Border","description": "Shine border is an animated background border effect.","files": [{"path": "registry/magicui/shine-border.tsx",- "type": "registry:ui"+ "type": "registry:component"}],"tailwind": {@@ -1052,19 +1052,19 @@},{"name": "animated-circular-progress-bar",- "type": "registry:ui",+ "type": "registry:component","title": "Animated Circular Progress Bar","description": "Animated Circular Progress Bar is a component that displays a circular gauge with a percentage value.","files": [{"path": "registry/magicui/animated-circular-progress-bar.tsx",- "type": "registry:ui"+ "type": "registry:component"}]},{"name": "confetti",- "type": "registry:ui",+ "type": "registry:component","title": "Confetti","description": "Confetti animations are best used to delight your users when something special happens","dependencies": [@@ -1077,13 +1077,13 @@"files": [{"path": "registry/magicui/confetti.tsx",- "type": "registry:ui"+ "type": "registry:component"}]},{"name": "animated-subscribe-button",- "type": "registry:ui",+ "type": "registry:component","title": "Animated Subscribe Button","description": "An animated subscribe button useful for showing a micro animation from intial to final result.","dependencies": [@@ -1092,31 +1092,31 @@"files": [{"path": "registry/magicui/animated-subscribe-button.tsx",- "type": "registry:ui"+ "type": "registry:component"}]},{"name": "cool-mode",- "type": "registry:ui",+ "type": "registry:component","title": "Cool Mode","description": "Cool mode effect for buttons, links, and other DOMs","files": [{"path": "registry/magicui/cool-mode.tsx",- "type": "registry:ui"+ "type": "registry:component"}]},{"name": "pulsating-button",- "type": "registry:ui",+ "type": "registry:component","title": "Pulsating Button","description": "An animated pulsating button useful for capturing attention of users.","files": [{"path": "registry/magicui/pulsating-button.tsx",- "type": "registry:ui"+ "type": "registry:component"}],"tailwind": {@@ -1143,13 +1143,13 @@},{"name": "ripple-button",- "type": "registry:ui",+ "type": "registry:component","title": "Ripple Button","description": "An animated button with ripple useful for user engagement.","files": [{"path": "registry/magicui/ripple-button.tsx",- "type": "registry:ui"+ "type": "registry:component"}],"tailwind": {@@ -1177,19 +1177,19 @@},{"name": "file-tree",- "type": "registry:ui",+ "type": "registry:component","title": "File Tree","description": "A component used to showcase the folder and file structure of a directory.","files": [{"path": "registry/magicui/file-tree.tsx",- "type": "registry:ui"+ "type": "registry:component"}]},{"name": "blur-fade",- "type": "registry:ui",+ "type": "registry:component","title": "Blur Fade","description": "Blur fade in and out animation. Used to smoothly fade in and out content.","dependencies": [@@ -1198,43 +1198,43 @@"files": [{"path": "registry/magicui/blur-fade.tsx",- "type": "registry:ui"+ "type": "registry:component"}]},{"name": "safari",- "type": "registry:ui",+ "type": "registry:component","title": "Safari","description": "A safari browser mockup to showcase your website.","files": [{"path": "registry/magicui/safari.tsx",- "type": "registry:ui"+ "type": "registry:component"}]},{"name": "iphone-15-pro",- "type": "registry:ui",+ "type": "registry:component","title": "iPhone 15 Pro","description": "A mockup of the iPhone 15 Pro","files": [{"path": "registry/magicui/iphone-15-pro.tsx",- "type": "registry:ui"+ "type": "registry:component"}]},{"name": "rainbow-button",- "type": "registry:ui",+ "type": "registry:component","title": "Rainbow Button","description": "An animated button with a rainbow effect.","files": [{"path": "registry/magicui/rainbow-button.tsx",- "type": "registry:ui"+ "type": "registry:component"}],"tailwind": {@@ -1284,23 +1284,23 @@},{"name": "interactive-hover-button",- "type": "registry:ui",+ "type": "registry:component","files": [{"path": "registry/magicui/interactive-hover-button.tsx",- "type": "registry:ui"+ "type": "registry:component"}]},{"name": "terminal",- "type": "registry:ui",+ "type": "registry:component","title": "Terminal","description": "A terminal component","files": [{"path": "registry/magicui/terminal.tsx",- "type": "registry:ui"+ "type": "registry:component"}]},diff --git a/registry/registry-ui.ts b/registry/registry-ui.tsindex 5b091197..90365f89 100644--- a/registry/registry-ui.ts+++ b/registry/registry-ui.ts@@ -3,43 +3,47 @@ import { type Registry } from "shadcn/registry";export const ui: Registry["items"] = [{name: "magic-card",- type: "registry:ui",+ type: "registry:component",title: "Magic Card",description:"A spotlight effect that follows your mouse cursor and highlights borders on hover.",dependencies: ["motion"],- files: [{ path: "magicui/magic-card.tsx", type: "registry:ui" }],+ files: [{ path: "magicui/magic-card.tsx", type: "registry:component" }],},{name: "android",- type: "registry:ui",+ type: "registry:component",title: "Android",description: "A mockup of an Android device.",- files: [{ path: "magicui/android.tsx", type: "registry:ui" }],+ files: [{ path: "magicui/android.tsx", type: "registry:component" }],},{name: "warp-background",- type: "registry:ui",+ type: "registry:component",title: "Warp Background",description: "A card with a time warping background effect.",dependencies: ["motion"],- files: [{ path: "magicui/warp-background.tsx", type: "registry:ui" }],+ files: [+ { path: "magicui/warp-background.tsx", type: "registry:component" },+ ],},{name: "line-shadow-text",- type: "registry:ui",+ type: "registry:component",title: "Line Shadow Text",description: "A text component with a moving line shadow.",dependencies: ["motion"],- files: [{ path: "magicui/line-shadow-text.tsx", type: "registry:ui" }],+ files: [+ { path: "magicui/line-shadow-text.tsx", type: "registry:component" },+ ],},{name: "aurora-text",- type: "registry:ui",+ type: "registry:component",title: "Aurora Text",description: "A beautiful aurora text effect",dependencies: ["motion"],- files: [{ path: "magicui/aurora-text.tsx", type: "registry:ui" }],+ files: [{ path: "magicui/aurora-text.tsx", type: "registry:component" }],cssVars: {light: {"--color-1": "0 100% 63%",@@ -104,25 +108,29 @@ export const ui: Registry["items"] = [},{name: "morphing-text",- type: "registry:ui",+ type: "registry:component",title: "Morphing Text",description: "A dynamic text morphing component for Magic UI.",- files: [{ path: "magicui/morphing-text.tsx", type: "registry:ui" }],+ files: [{ path: "magicui/morphing-text.tsx", type: "registry:component" }],},{name: "scroll-progress",- type: "registry:ui",+ type: "registry:component",title: "Scroll Progress",description: "Animated Scroll Progress for your pages",dependencies: ["motion"],- files: [{ path: "magicui/scroll-progress.tsx", type: "registry:ui" }],+ files: [+ { path: "magicui/scroll-progress.tsx", type: "registry:component" },+ ],},{name: "neon-gradient-card",- type: "registry:ui",+ type: "registry:component",title: "Neon Gradient Card",description: "A beautiful neon card effect",- files: [{ path: "magicui/neon-gradient-card.tsx", type: "registry:ui" }],+ files: [+ { path: "magicui/neon-gradient-card.tsx", type: "registry:component" },+ ],tailwind: {config: {theme: {@@ -144,10 +152,10 @@ export const ui: Registry["items"] = [},{name: "meteors",- type: "registry:ui",+ type: "registry:component",title: "Meteors",description: "A meteor shower effect.",- files: [{ path: "magicui/meteors.tsx", type: "registry:ui" }],+ files: [{ path: "magicui/meteors.tsx", type: "registry:component" }],tailwind: {config: {theme: {@@ -175,70 +183,81 @@ export const ui: Registry["items"] = [},{name: "grid-pattern",- type: "registry:ui",+ type: "registry:component",title: "Grid Pattern",description:"A background grid pattern made with SVGs, fully customizable using Tailwind CSS.",- files: [{ path: "magicui/grid-pattern.tsx", type: "registry:ui" }],+ files: [{ path: "magicui/grid-pattern.tsx", type: "registry:component" }],},{name: "interactive-grid-pattern",- type: "registry:ui",+ type: "registry:component",title: "Interactive Grid Pattern",description:"A interactive background grid pattern made with SVGs, fully customizable using Tailwind CSS.",files: [- { path: "magicui/interactive-grid-pattern.tsx", type: "registry:ui" },+ {+ path: "magicui/interactive-grid-pattern.tsx",+ type: "registry:component",+ },],},{name: "dot-pattern",- type: "registry:ui",+ type: "registry:component",title: "Dot Pattern",description:"A background dot pattern made with SVGs, fully customizable using Tailwind CSS.",- files: [{ path: "magicui/dot-pattern.tsx", type: "registry:ui" }],+ files: [{ path: "magicui/dot-pattern.tsx", type: "registry:component" }],},{name: "flickering-grid",- type: "registry:ui",+ type: "registry:component",title: "Flickering Grid",description:"A flickering grid background made with SVGs, fully customizable using Tailwind CSS.",- files: [{ path: "magicui/flickering-grid.tsx", type: "registry:ui" }],+ files: [+ { path: "magicui/flickering-grid.tsx", type: "registry:component" },+ ],},{name: "hero-video-dialog",- type: "registry:ui",+ type: "registry:component",title: "Hero Video Dialog",description: "A hero video dialog component.",dependencies: ["motion"],- files: [{ path: "magicui/hero-video-dialog.tsx", type: "registry:ui" }],+ files: [+ { path: "magicui/hero-video-dialog.tsx", type: "registry:component" },+ ],},{name: "code-comparison",- type: "registry:ui",+ type: "registry:component",title: "Code Comparison",description: "A component which compares two code snippets.",dependencies: ["shiki", "next-themes"],- files: [{ path: "magicui/code-comparison.tsx", type: "registry:ui" }],+ files: [+ { path: "magicui/code-comparison.tsx", type: "registry:component" },+ ],},{name: "script-copy-btn",- type: "registry:ui",+ type: "registry:component",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" }],+ files: [+ { path: "magicui/script-copy-btn.tsx", type: "registry:component" },+ ],},{name: "marquee",- type: "registry:ui",+ type: "registry:component",title: "Marquee",description:"An infinite scrolling component that can be used to display text, images, or videos.",- files: [{ path: "magicui/marquee.tsx", type: "registry:ui" }],+ files: [{ path: "magicui/marquee.tsx", type: "registry:component" }],tailwind: {config: {theme: {@@ -265,20 +284,20 @@ export const ui: Registry["items"] = [},{name: "globe",- type: "registry:ui",+ type: "registry:component",title: "Globe",description:"An autorotating, interactive, and highly performant globe made using WebGL.",dependencies: ["cobe"],- files: [{ path: "magicui/globe.tsx", type: "registry:ui" }],+ files: [{ path: "magicui/globe.tsx", type: "registry:component" }],},{name: "shimmer-button",- type: "registry:ui",+ type: "registry:component",title: "Shimmer Button",description:"A button with a shimmering light which travels around the perimeter.",- files: [{ path: "magicui/shimmer-button.tsx", type: "registry:ui" }],+ files: [{ path: "magicui/shimmer-button.tsx", type: "registry:component" }],tailwind: {config: {theme: {@@ -317,55 +336,57 @@ export const ui: Registry["items"] = [},{name: "tweet-card",- type: "registry:ui",+ type: "registry:component",title: "Tweet Card",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:ui" }],+ files: [{ path: "magicui/tweet-card.tsx", type: "registry:component" }],},{name: "client-tweet-card",- type: "registry:ui",+ type: "registry:component",title: "Client Tweet Card",description:"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:ui" }],+ files: [+ { path: "magicui/client-tweet-card.tsx", type: "registry:component" },+ ],},{name: "bento-grid",- type: "registry:ui",+ type: "registry:component",title: "Bento Grid",description:"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:ui" }],+ files: [{ path: "magicui/bento-grid.tsx", type: "registry:component" }],},{name: "particles",- type: "registry:ui",+ type: "registry:component",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:ui" }],+ files: [{ path: "magicui/particles.tsx", type: "registry:component" }],},{name: "number-ticker",- type: "registry:ui",+ type: "registry:component",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:ui" }],+ files: [{ path: "magicui/number-ticker.tsx", type: "registry:component" }],},{name: "ripple",- type: "registry:ui",+ type: "registry:component",title: "Ripple",description:"An animated ripple effect typically used behind elements to emphasize them.",- files: [{ path: "magicui/ripple.tsx", type: "registry:ui" }],+ files: [{ path: "magicui/ripple.tsx", type: "registry:component" }],tailwind: {config: {theme: {@@ -391,10 +412,10 @@ export const ui: Registry["items"] = [},{name: "retro-grid",- type: "registry:ui",+ type: "registry:component",title: "Retro Grid",description: "An animated scrolling retro grid effect",- files: [{ path: "magicui/retro-grid.tsx", type: "registry:ui" }],+ files: [{ path: "magicui/retro-grid.tsx", type: "registry:component" }],tailwind: {config: {theme: {@@ -415,20 +436,22 @@ export const ui: Registry["items"] = [},{name: "animated-list",- type: "registry:ui",+ type: "registry:component",title: "Animated List",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:ui" }],+ files: [{ path: "magicui/animated-list.tsx", type: "registry:component" }],},{name: "animated-shiny-text",- type: "registry:ui",+ type: "registry:component",title: "Animated Shiny Text",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:ui" }],+ files: [+ { path: "magicui/animated-shiny-text.tsx", type: "registry:component" },+ ],tailwind: {config: {theme: {@@ -453,20 +476,22 @@ export const ui: Registry["items"] = [},{name: "animated-grid-pattern",- type: "registry:ui",+ type: "registry:component",title: "Animated Grid Pattern",description:"A animated background grid pattern made with SVGs, fully customizable using Tailwind CSS.",dependencies: ["motion"],- files: [{ path: "magicui/animated-grid-pattern.tsx", type: "registry:ui" }],+ files: [+ { path: "magicui/animated-grid-pattern.tsx", type: "registry:component" },+ ],},{name: "border-beam",- type: "registry:ui",+ type: "registry:component",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:ui" }],+ files: [{ path: "magicui/border-beam.tsx", type: "registry:component" }],tailwind: {config: {theme: {@@ -489,38 +514,41 @@ export const ui: Registry["items"] = [},{name: "animated-beam",- type: "registry:ui",+ type: "registry:component",title: "Animated Beam",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:ui" }],+ files: [{ path: "magicui/animated-beam.tsx", type: "registry:component" }],},{name: "text-reveal",- type: "registry:ui",+ type: "registry:component",title: "Text Reveal",description: "Fade in text as you scroll down the page.",dependencies: ["motion"],- files: [{ path: "magicui/text-reveal.tsx", type: "registry:ui" }],+ files: [{ path: "magicui/text-reveal.tsx", type: "registry:component" }],},{name: "hyper-text",- type: "registry:ui",+ type: "registry:component",title: "Hyper Text",description:"A text animation that scrambles letters before revealing the final text.",dependencies: ["motion"],- files: [{ path: "magicui/hyper-text.tsx", type: "registry:ui" }],+ files: [{ path: "magicui/hyper-text.tsx", type: "registry:component" }],},{name: "animated-gradient-text",- type: "registry:ui",+ type: "registry:component",title: "Animated Gradient Text",description:"An animated gradient background which transitions between colors for text.",files: [- { path: "magicui/animated-gradient-text.tsx", type: "registry:ui" },+ {+ path: "magicui/animated-gradient-text.tsx",+ type: "registry:component",+ },],tailwind: {config: {@@ -543,11 +571,13 @@ export const ui: Registry["items"] = [},{name: "orbiting-circles",- type: "registry:ui",+ type: "registry:component",title: "Orbiting Circles",description:"A collection of circles which move in orbit along a circular path",- files: [{ path: "magicui/orbiting-circles.tsx", type: "registry:ui" }],+ files: [+ { path: "magicui/orbiting-circles.tsx", type: "registry:component" },+ ],tailwind: {config: {theme: {@@ -574,110 +604,116 @@ export const ui: Registry["items"] = [},{name: "dock",- type: "registry:ui",+ type: "registry:component",title: "Dock",description:"An implementation of the MacOS dock using react + tailwindcss + framer motion",dependencies: ["motion"],- files: [{ path: "magicui/dock.tsx", type: "registry:ui" }],+ files: [{ path: "magicui/dock.tsx", type: "registry:component" }],},{name: "word-rotate",- type: "registry:ui",+ type: "registry:component",title: "Word Rotate",description: "A vertical rotation of words",dependencies: ["motion"],- files: [{ path: "magicui/word-rotate.tsx", type: "registry:ui" }],+ files: [{ path: "magicui/word-rotate.tsx", type: "registry:component" }],},{name: "avatar-circles",- type: "registry:ui",+ type: "registry:component",title: "Avatar Circles",description: "Overlapping circles of avatars.",- files: [{ path: "magicui/avatar-circles.tsx", type: "registry:ui" }],+ files: [{ path: "magicui/avatar-circles.tsx", type: "registry:component" }],},{name: "typing-animation",- type: "registry:ui",+ type: "registry:component",title: "Typing Animation",description: "Characters appearing in typed animation",dependencies: ["motion"],- files: [{ path: "magicui/typing-animation.tsx", type: "registry:ui" }],+ files: [+ { path: "magicui/typing-animation.tsx", type: "registry:component" },+ ],},{name: "sparkles-text",- type: "registry:ui",+ type: "registry:component",title: "Sparkles Text",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:ui" }],+ files: [{ path: "magicui/sparkles-text.tsx", type: "registry:component" }],},{name: "flip-text",- type: "registry:ui",+ type: "registry:component",title: "Flip Text",description: "Text flipping character animation",dependencies: ["motion"],- files: [{ path: "magicui/flip-text.tsx", type: "registry:ui" }],+ files: [{ path: "magicui/flip-text.tsx", type: "registry:component" }],},{name: "icon-cloud",- type: "registry:ui",+ type: "registry:component",title: "Icon Cloud",description: "An interactive 3D tag cloud component",dependencies: [],- files: [{ path: "magicui/icon-cloud.tsx", type: "registry:ui" }],+ files: [{ path: "magicui/icon-cloud.tsx", type: "registry:component" }],},{name: "text-animate",- type: "registry:ui",+ type: "registry:component",title: "Text Animate",description:"A text animation component that animates text using a variety of different animations.",dependencies: ["motion"],- files: [{ path: "magicui/text-animate.tsx", type: "registry:ui" }],+ files: [{ path: "magicui/text-animate.tsx", type: "registry:component" }],},{name: "scroll-based-velocity",- type: "registry:ui",+ type: "registry:component",title: "Scroll Based Velocity",description: "Scrolling text whose speed changes based on scroll speed",dependencies: ["motion"],- files: [{ path: "magicui/scroll-based-velocity.tsx", type: "registry:ui" }],+ files: [+ { path: "magicui/scroll-based-velocity.tsx", type: "registry:component" },+ ],},{name: "scratch-to-reveal",- type: "registry:ui",+ type: "registry:component",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" }],+ files: [+ { path: "magicui/scratch-to-reveal.tsx", type: "registry:component" },+ ],},{name: "shiny-button",- type: "registry:ui",+ type: "registry:component",title: "Shiny Button",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:ui" }],+ files: [{ path: "magicui/shiny-button.tsx", type: "registry:component" }],},{name: "box-reveal",- type: "registry:ui",+ type: "registry:component",title: "Box Reveal Animation",description: "Sliding box animation that reveals text behind it.",dependencies: ["motion"],- files: [{ path: "magicui/box-reveal.tsx", type: "registry:ui" }],+ files: [{ path: "magicui/box-reveal.tsx", type: "registry:component" }],},{name: "shine-border",- type: "registry:ui",+ type: "registry:component",title: "Shine Border",description: "Shine border is an animated background border effect.",- files: [{ path: "magicui/shine-border.tsx", type: "registry:ui" }],+ files: [{ path: "magicui/shine-border.tsx", type: "registry:component" }],tailwind: {config: {theme: {@@ -705,52 +741,57 @@ export const ui: Registry["items"] = [},{name: "animated-circular-progress-bar",- type: "registry:ui",+ type: "registry:component",title: "Animated Circular Progress Bar",description:"Animated Circular Progress Bar is a component that displays a circular gauge with a percentage value.",files: [{path: "magicui/animated-circular-progress-bar.tsx",- type: "registry:ui",+ type: "registry:component",},],},{name: "confetti",- type: "registry:ui",+ type: "registry:component",title: "Confetti",description:"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:ui" }],+ files: [{ path: "magicui/confetti.tsx", type: "registry:component" }],},{name: "animated-subscribe-button",- type: "registry:ui",+ type: "registry:component",title: "Animated Subscribe Button",description:"An animated subscribe button useful for showing a micro animation from intial to final result.",dependencies: ["motion"],files: [- { path: "magicui/animated-subscribe-button.tsx", type: "registry:ui" },+ {+ path: "magicui/animated-subscribe-button.tsx",+ type: "registry:component",+ },],},{name: "cool-mode",- type: "registry:ui",+ type: "registry:component",title: "Cool Mode",description: "Cool mode effect for buttons, links, and other DOMs",- files: [{ path: "magicui/cool-mode.tsx", type: "registry:ui" }],+ files: [{ path: "magicui/cool-mode.tsx", type: "registry:component" }],},{name: "pulsating-button",- type: "registry:ui",+ type: "registry:component",title: "Pulsating Button",description:"An animated pulsating button useful for capturing attention of users.",- files: [{ path: "magicui/pulsating-button.tsx", type: "registry:ui" }],+ files: [+ { path: "magicui/pulsating-button.tsx", type: "registry:component" },+ ],tailwind: {config: {theme: {@@ -771,10 +812,10 @@ export const ui: Registry["items"] = [},{name: "ripple-button",- type: "registry:ui",+ type: "registry:component",title: "Ripple Button",description: "An animated button with ripple useful for user engagement.",- files: [{ path: "magicui/ripple-button.tsx", type: "registry:ui" }],+ files: [{ path: "magicui/ripple-button.tsx", type: "registry:component" }],tailwind: {config: {theme: {@@ -800,41 +841,41 @@ export const ui: Registry["items"] = [},{name: "file-tree",- type: "registry:ui",+ type: "registry:component",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:ui" }],+ files: [{ path: "magicui/file-tree.tsx", type: "registry:component" }],},{name: "blur-fade",- type: "registry:ui",+ type: "registry:component",title: "Blur Fade",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:ui" }],+ files: [{ path: "magicui/blur-fade.tsx", type: "registry:component" }],},{name: "safari",- type: "registry:ui",+ type: "registry:component",title: "Safari",description: "A safari browser mockup to showcase your website.",- files: [{ path: "magicui/safari.tsx", type: "registry:ui" }],+ files: [{ path: "magicui/safari.tsx", type: "registry:component" }],},{name: "iphone-15-pro",- type: "registry:ui",+ type: "registry:component",title: "iPhone 15 Pro",description: "A mockup of the iPhone 15 Pro",- files: [{ path: "magicui/iphone-15-pro.tsx", type: "registry:ui" }],+ files: [{ path: "magicui/iphone-15-pro.tsx", type: "registry:component" }],},{name: "rainbow-button",- type: "registry:ui",+ type: "registry:component",title: "Rainbow Button",description: "An animated button with a rainbow effect.",- files: [{ path: "magicui/rainbow-button.tsx", type: "registry:ui" }],+ files: [{ path: "magicui/rainbow-button.tsx", type: "registry:component" }],cssVars: {light: {"--color-1": "0 100% 63%",@@ -878,16 +919,19 @@ export const ui: Registry["items"] = [},{name: "interactive-hover-button",- type: "registry:ui",+ type: "registry:component",files: [- { path: "magicui/interactive-hover-button.tsx", type: "registry:ui" },+ {+ path: "magicui/interactive-hover-button.tsx",+ type: "registry:component",+ },],},{name: "terminal",- type: "registry:ui",+ type: "registry:component",title: "Terminal",description: "A terminal component",- files: [{ path: "magicui/terminal.tsx", type: "registry:ui" }],+ files: [{ path: "magicui/terminal.tsx", type: "registry:component" }],},];