{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "robot-01",
  "title": "robot-01",
  "description": "Animated robot icon",
  "dependencies": [
    "motion"
  ],
  "files": [
    {
      "path": "icons/robot-01.tsx",
      "content": "'use client';\n\nimport type { Variants } from 'motion/react';\nimport { motion, useAnimation } from 'motion/react';\nimport type { HTMLAttributes } from 'react';\nimport { forwardRef } from 'react';\nimport { useIconAnimation } from '@/lib/use-icon-animation';\nimport { cn } from '@/lib/utils';\n\nexport interface Robot01IconHandle {\n  startAnimation: () => void;\n  stopAnimation: () => void;\n}\n\ninterface Robot01IconProps extends HTMLAttributes<HTMLDivElement> {\n  size?: number;\n}\n\n// the antenna tunes in, the face tilts, and a segmented status display responds\nconst robotHeadVariants: Variants = {\n  normal: { rotate: 0, translateY: 0, transition: { type: 'spring', duration: 0.45, bounce: 0 } },\n  animate: {\n    rotate: [0, -5, 4, 0],\n    translateY: [0, -0.6, 0],\n    transition: { duration: 1, times: [0, 0.3, 0.7, 1], ease: 'easeInOut' },\n  },\n};\n\nconst robotEyeVariants: Variants = {\n  normal: { scaleY: 1 },\n  animate: (i: number) => ({\n    scaleY: [1, 0.1, 1, 1, 0.1, 1],\n    transition: { duration: 0.9, times: [0, 0.12, 0.24, 0.58, 0.7, 0.82], delay: i * 0.03 },\n  }),\n};\n\nconst antennaVariants: Variants = {\n  normal: { rotate: 0 },\n  animate: {\n    rotate: [0, -15, 12, -5, 0],\n    transition: { duration: 0.8, ease: 'easeInOut' },\n  },\n};\n\nconst robotDisplayVariants: Variants = {\n  normal: { pathLength: 0 },\n  animate: {\n    pathLength: [0, 0, 1, 1, 0],\n    transition: {\n      duration: 1,\n      times: [0, 0.2, 0.38, 0.86, 1],\n      ease: [0.23, 1, 0.32, 1],\n    },\n  },\n};\n\nconst generatedGeometryVariants: Variants = {\n  normal: { visibility: 'hidden', transition: { duration: 0.08 } },\n  animate: {\n    visibility: ['hidden', 'hidden', 'visible', 'visible', 'hidden'],\n    transition: {\n      duration: 1,\n      times: [0, 0.2, 0.24, 0.86, 1],\n      ease: 'easeInOut',\n    },\n  },\n};\n\nconst Robot01Icon = forwardRef<Robot01IconHandle, Robot01IconProps>(\n  ({ onMouseEnter, onMouseLeave, className, size = 28, ...props }, ref) => {\n    const controls = useAnimation();\n    const { handleMouseEnter, handleMouseLeave } = useIconAnimation({\n      controls,\n      loops: false,\n      onMouseEnter,\n      onMouseLeave,\n      ref,\n    });\n\n    return (\n      <div\n        className={cn(className)}\n        onMouseEnter={handleMouseEnter}\n        onMouseLeave={handleMouseLeave}\n        {...props}\n      >\n        <svg\n          xmlns=\"http://www.w3.org/2000/svg\"\n          width={size}\n          height={size}\n          viewBox=\"0 0 24 24\"\n          fill=\"none\"\n          overflow=\"visible\"\n        >\n          <motion.path\n            d=\"M12 4V2\"\n            stroke=\"currentColor\"\n            strokeLinecap=\"round\"\n            strokeLinejoin=\"round\"\n            strokeWidth=\"1.5\"\n            variants={antennaVariants}\n            animate={controls}\n            initial=\"normal\"\n            style={{ transformOrigin: '12px 4px' }}\n          />\n          <path\n            d=\"M20 22C20 17.5817 16.4183 14 12 14C7.58172 14 4 17.5817 4 22\"\n            stroke=\"currentColor\"\n            strokeLinecap=\"round\"\n            strokeLinejoin=\"round\"\n            strokeWidth=\"1.5\"\n          />\n          <motion.path\n            d=\"M9.375 8.25H9.25M9.5 8.25C9.5 8.38807 9.38807 8.5 9.25 8.5C9.11193 8.5 9 8.38807 9 8.25C9 8.11193 9.11193 8 9.25 8C9.38807 8 9.5 8.11193 9.5 8.25Z\"\n            stroke=\"currentColor\"\n            strokeLinecap=\"round\"\n            strokeLinejoin=\"round\"\n            strokeWidth=\"1.5\"\n            variants={robotEyeVariants}\n            custom={0}\n            animate={controls}\n            initial=\"normal\"\n            style={{ transformOrigin: '9.25px 8.25px' }}\n          />\n          <motion.path\n            d=\"M14.875 8.25H14.75M15 8.25C15 8.38807 14.8881 8.5 14.75 8.5C14.6119 8.5 14.5 8.38807 14.5 8.25C14.5 8.11193 14.6119 8 14.75 8C14.8881 8 15 8.11193 15 8.25Z\"\n            stroke=\"currentColor\"\n            strokeLinecap=\"round\"\n            strokeLinejoin=\"round\"\n            strokeWidth=\"1.5\"\n            variants={robotEyeVariants}\n            custom={1}\n            animate={controls}\n            initial=\"normal\"\n            style={{ transformOrigin: '14.75px 8.25px' }}\n          />\n          <motion.path\n            d=\"M15.1538 4H8.84615C7.59095 4 6.96334 4 6.47397 4.22025C5.91693 4.47095 5.47095 4.91693 5.22025 5.47397C5 5.96334 5 6.59095 5 7.84615C5 9.85448 5 10.8586 5.3524 11.6417C5.75353 12.5329 6.46709 13.2465 7.35835 13.6476C8.14135 14 9.14552 14 11.1538 14H12.8462C14.8545 14 15.8586 14 16.6417 13.6476C17.5329 13.2465 18.2465 12.5329 18.6476 11.6417C19 10.8586 19 9.85448 19 7.84615C19 6.59095 19 5.96334 18.7797 5.47397C18.529 4.91693 18.0831 4.47095 17.526 4.22025C17.0367 4 16.4091 4 15.1538 4Z\"\n            stroke=\"currentColor\"\n            strokeLinecap=\"round\"\n            strokeLinejoin=\"round\"\n            strokeWidth=\"1.5\"\n            variants={robotHeadVariants}\n            animate={controls}\n            initial=\"normal\"\n            style={{ transformOrigin: '12px 9px' }}\n          />\n          <motion.g\n            variants={generatedGeometryVariants}\n            animate={controls}\n            initial=\"normal\"\n          >\n            <motion.path\n              d=\"M9 11.5H10.5M11.25 11.5H12.75M13.5 11.5H15\"\n              stroke=\"currentColor\"\n              strokeLinecap=\"butt\"\n              strokeWidth=\"1.6\"\n              variants={robotDisplayVariants}\n              animate={controls}\n              initial=\"normal\"\n            />\n          </motion.g>\n        </svg>\n      </div>\n    );\n  }\n);\n\nRobot01Icon.displayName = 'Robot01Icon';\n\nexport { Robot01Icon };\n",
      "type": "registry:ui"
    },
    {
      "path": "lib/use-icon-animation.ts",
      "content": "'use client';\n\nimport type { LegacyAnimationControls } from 'motion/react';\nimport { useReducedMotion } from 'motion/react';\nimport type {\n  ForwardedRef,\n  MouseEventHandler,\n} from 'react';\nimport { useCallback, useImperativeHandle, useRef } from 'react';\n\nexport interface AnimatedIconHandle {\n  startAnimation: () => void;\n  stopAnimation: () => void;\n}\n\ninterface UseIconAnimationOptions {\n  controls: LegacyAnimationControls;\n  loops?: boolean;\n  onMouseEnter?: MouseEventHandler<HTMLDivElement>;\n  onMouseLeave?: MouseEventHandler<HTMLDivElement>;\n  ref: ForwardedRef<AnimatedIconHandle>;\n}\n\nexport function useIconAnimation({\n  controls,\n  loops = false,\n  onMouseEnter,\n  onMouseLeave,\n  ref,\n}: UseIconAnimationOptions) {\n  const shouldReduceMotion = useReducedMotion();\n  const isControlledRef = useRef(false);\n  const isPlayingRef = useRef(false);\n  const runRef = useRef(0);\n\n  const startAnimation = useCallback(() => {\n    if (shouldReduceMotion || isPlayingRef.current) return;\n\n    isPlayingRef.current = true;\n    const run = ++runRef.current;\n    controls.set('normal');\n    void controls.start('animate').then(() => {\n      if (runRef.current === run) isPlayingRef.current = false;\n    });\n  }, [controls, shouldReduceMotion]);\n\n  const stopAnimation = useCallback(() => {\n    if (!loops) return;\n\n    runRef.current++;\n    isPlayingRef.current = false;\n    void controls.start('normal');\n  }, [controls, loops]);\n\n  useImperativeHandle(\n    ref,\n    () => {\n      isControlledRef.current = true;\n      return { startAnimation, stopAnimation };\n    },\n    [startAnimation, stopAnimation]\n  );\n\n  const handleMouseEnter = useCallback<MouseEventHandler<HTMLDivElement>>(\n    (event) => {\n      onMouseEnter?.(event);\n      if (!isControlledRef.current) startAnimation();\n    },\n    [onMouseEnter, startAnimation]\n  );\n\n  const handleMouseLeave = useCallback<MouseEventHandler<HTMLDivElement>>(\n    (event) => {\n      onMouseLeave?.(event);\n      if (!isControlledRef.current) stopAnimation();\n    },\n    [onMouseLeave, stopAnimation]\n  );\n\n  return { handleMouseEnter, handleMouseLeave };\n}\n",
      "type": "registry:lib"
    }
  ],
  "type": "registry:ui"
}