{
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
"name": "flip-fade-text",
"type": "registry:ui",
"dependencies": [
"framer-motion"
],
"files": [
{
"path": "components/ui/flip-fade-text.tsx",
"content": "\"use client\"\r\n\r\nimport { useEffect, useState, useMemo, useCallback, memo } from \"react\"\r\nimport { motion, AnimatePresence } from \"framer-motion\"\r\nimport { cn } from \"@/lib/utils\"\r\n\r\ninterface FlipFadeTextProps {\r\n /**\r\n * Array of words to cycle through\r\n * @default [\"LOADING\", \"COMPUTING\", \"SEARCHING\", \"RETRIEVING\", \"ASSEMBLING\"]\r\n */\r\n words?: string[]\r\n /**\r\n * Interval between word changes in milliseconds\r\n * @default 2500\r\n */\r\n interval?: number\r\n /**\r\n * Additional CSS classes for the container\r\n */\r\n className?: string\r\n /**\r\n * Additional CSS classes for the text\r\n */\r\n textClassName?: string\r\n /**\r\n * Animation duration for each letter in seconds\r\n * @default 0.6\r\n */\r\n letterDuration?: number\r\n /**\r\n * Stagger delay between letters on enter in seconds\r\n * @default 0.1\r\n */\r\n staggerDelay?: number\r\n /**\r\n * Stagger delay between letters on exit in seconds\r\n * @default 0.05\r\n */\r\n exitStaggerDelay?: number\r\n}\r\n\r\nconst defaultWords = [\"LOADING\", \"COMPUTING\", \"SEARCHING\", \"RETRIEVING\", \"ASSEMBLING\"]\r\n\r\n// Memoized Letter component for performance\r\nconst Letter = memo(function Letter({\r\n char,\r\n letterDuration\r\n}: {\r\n char: string\r\n letterDuration: number\r\n}) {\r\n return (\r\n