{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "soup",
  "type": "registry:ui",
  "registryDependencies": [],
  "dependencies": ["motion"],
  "devDependencies": [],
  "files": [
    {
      "path": "soup.tsx",
      "content": "\"use client\";\n\nimport { motion, useAnimation, type Variants } from \"motion/react\";\nimport type { HTMLAttributes } from \"react\";\nimport { forwardRef, useCallback, useImperativeHandle, useRef } from \"react\";\nimport { cn } from \"@/lib/utils\";\n\nexport interface SoupIconHandle {\n  startAnimation: () => void;\n  stopAnimation: () => void;\n}\n\ninterface SoupIconProps extends HTMLAttributes<HTMLDivElement> {\n  size?: number;\n}\n\nconst SOUP_PATH_VARIANTS: Variants = {\n  normal: {\n    y: 0,\n    opacity: 1,\n  },\n  animate: (custom: number) => ({\n    y: -3,\n    opacity: [0, 1, 0],\n    transition: {\n      repeat: Number.POSITIVE_INFINITY,\n      duration: 1.5,\n      ease: \"easeInOut\",\n      delay: 0.2 * custom,\n    },\n  }),\n};\n\nconst SoupIcon = forwardRef<SoupIconHandle, SoupIconProps>(\n  ({ onMouseEnter, onMouseLeave, className, size = 28, ...props }, ref) => {\n    const controls = useAnimation();\n    const isControlledRef = useRef(false);\n\n    useImperativeHandle(ref, () => {\n      isControlledRef.current = true;\n      return {\n        startAnimation: () => controls.start(\"animate\"),\n        stopAnimation: () => controls.start(\"normal\"),\n      };\n    });\n\n    const handleMouseEnter = useCallback(\n      (e: React.MouseEvent<HTMLDivElement>) => {\n        if (isControlledRef.current) {\n          onMouseEnter?.(e);\n        } else {\n          controls.start(\"animate\");\n        }\n      },\n      [controls, onMouseEnter]\n    );\n\n    const handleMouseLeave = useCallback(\n      (e: React.MouseEvent<HTMLDivElement>) => {\n        if (isControlledRef.current) {\n          onMouseLeave?.(e);\n        } else {\n          controls.start(\"normal\");\n        }\n      },\n      [controls, onMouseLeave]\n    );\n\n    return (\n      <div\n        className={cn(className)}\n        onMouseEnter={handleMouseEnter}\n        onMouseLeave={handleMouseLeave}\n        {...props}\n      >\n        <motion.svg\n          fill=\"none\"\n          height=\"24\"\n          stroke=\"currentColor\"\n          strokeLinecap=\"round\"\n          strokeLinejoin=\"round\"\n          strokeWidth=\"2\"\n          style={{ overflow: \"visible\" }}\n          viewBox=\"0 0 24 24\"\n          width=\"24\"\n          xmlns=\"http://www.w3.org/2000/svg\"\n        >\n          <path d=\"M12 21a9 9 0 0 0 9-9H3a9 9 0 0 0 9 9Z\" />\n          <path d=\"M7 21h10\" />\n          <path d=\"M19.5 12 22 6\" />\n          <motion.path\n            animate={controls}\n            custom={0}\n            d=\"M16.25 3c.27.1.8.53.75 1.36-.06.83-.93 1.2-1 2.02-.05.78.34 1.24.73 1.62\"\n            initial=\"normal\"\n            variants={SOUP_PATH_VARIANTS}\n          />\n          <motion.path\n            animate={controls}\n            custom={0.2}\n            d=\"M11.25 3c.27.1.8.53.74 1.36-.05.83-.93 1.2-.98 2.02-.06.78.33 1.24.72 1.62\"\n            initial=\"normal\"\n            variants={SOUP_PATH_VARIANTS}\n          />\n          <motion.path\n            animate={controls}\n            custom={0.4}\n            d=\"M6.25 3c.27.1.8.53.75 1.36-.06.83-.93 1.2-1 2.02-.05.78.34 1.24.74 1.62\"\n            initial=\"normal\"\n            variants={SOUP_PATH_VARIANTS}\n          />\n        </motion.svg>\n      </div>\n    );\n  }\n);\n\nSoupIcon.displayName = \"SoupIcon\";\n\nexport { SoupIcon };\n",
      "type": "registry:ui"
    }
  ]
}
