{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "coffee-02",
  "type": "registry:ui",
  "title": "coffee-02",
  "description": "Animated coffee icon for Vue",
  "dependencies": [
    "motion-v"
  ],
  "files": [
    {
      "path": "components/ui/coffee-02.vue",
      "type": "registry:ui",
      "content": "<script setup lang=\"ts\">\nimport { motion, useAnimationControls } from 'motion-v'\nimport type { Variants } from 'motion-v'\nimport { useIconAnimation } from '../composables/useIconAnimation'\nimport type { AnimatedIconHandle } from '../types'\n\ndefineOptions({ inheritAttrs: false, name: 'Coffee02Icon' })\n\nwithDefaults(\n  defineProps<{\n    size?: number\n  }>(),\n  { size: 28 },\n)\n\ninterface SteamMotion {\n  duration: number;\n  delay: number;\n}\n\nconst createSteamVariants = ({\n  duration,\n  delay,\n}: SteamMotion): Variants => ({\n  normal: {\n    visibility: 'visible',\n    pathLength: 1,\n    pathOffset: 0,\n    transform: 'translateY(0px)',\n    transition: { duration: 0.14, ease: [0.23, 1, 0.32, 1] },\n  },\n  animate: {\n    pathLength: [1, 0.58, 0.22, 0, 0.14, 0.14, 0.34, 0.6, 1],\n    pathOffset: [0, 0, 0, 0, 0.86, 0.86, 0.54, 0.2, 0],\n    visibility: ['visible', 'visible', 'visible', 'hidden', 'hidden', 'visible', 'visible', 'visible', 'visible'],\n    transform: [\n      'translateY(0px)',\n      'translateY(-0.35px)',\n      'translateY(-0.9px)',\n      'translateY(-1.4px)',\n      'translateY(0px)',\n      'translateY(0px)',\n      'translateY(0px)',\n      'translateY(0px)',\n      'translateY(0px)',\n    ],\n    transition: {\n      duration,\n      delay,\n      ease: 'linear',\n      times: [0, 0.18, 0.32, 0.42, 0.48, 0.54, 0.68, 0.82, 1],\n      repeat: Infinity,\n    },\n  },\n});\n\n// rest-parity: split-source-path\n// The original combined Hugeicons steam path is split into its three exact\n// subpaths so each full resting stroke can rise and taper toward the top,\n// evaporate, reappear small at the cup, and grow into the full stroke again.\nconst leftSteamVariants = createSteamVariants({\n  duration: 1.08,\n  delay: 0,\n});\n\nconst centerSteamVariants = createSteamVariants({\n  duration: 1.2,\n  delay: 0.08,\n});\n\nconst rightSteamVariants = createSteamVariants({\n  duration: 1.12,\n  delay: 0.16,\n});\n\nconst controls = useAnimationControls()\nconst { onMouseEnter, onMouseLeave, startAnimation, stopAnimation } = useIconAnimation({\n  controls,\n  loops: true,\n})\n\ndefineExpose<AnimatedIconHandle>({ startAnimation, stopAnimation })\n</script>\n\n<template>\n  <div class=\"hia-icon\" @mouseenter=\"onMouseEnter\" @mouseleave=\"onMouseLeave\" v-bind=\"$attrs\">\n          <svg xmlns=\"http://www.w3.org/2000/svg\" :width=\"size\" :height=\"size\" viewBox=\"0 0 24 24\" fill=\"none\" overflow=\"visible\">\n            <path d=\"M18.2505 10.5H19.6403C21.4918 10.5 22.0421 10.7655 21.9975 12.0838C21.9237 14.2674 20.939 16.8047 17 17.5\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"1.5\" />\n            <path d=\"M5.94627 20.6145C2.57185 18.02 2.07468 14.3401 2.00143 10.5001C1.96979 8.8413 2.45126 8.5 4.65919 8.5H15.3408C17.5487 8.5 18.0302 8.8413 17.9986 10.5001C17.9253 14.3401 17.4281 18.02 14.0537 20.6145C13.0934 21.3528 12.2831 21.5 10.9194 21.5H9.08064C7.71686 21.5 6.90658 21.3528 5.94627 20.6145Z\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"1.5\" />\n            <motion.path d=\"M7.53971 4C7.53971 4 7.47974 4.05556 7.39979 4.16667C7.31983 4.27778 7.21988 4.44444 7.13992 4.66667C7.05997 4.88889 7 5.16667 7 5.5\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"leftSteamVariants\" :animate=\"controls\" initial=\"normal\" />\n            <motion.path d=\"M11.3089 2.5C11.12667 2.61287 10.92062 2.81716 10.72689 3.09494C10.53316 3.37272 10.35173 3.72398 10.21874 4.1308C10.08576 4.53762 10.0012 5 10.0012 5.5\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"centerSteamVariants\" :animate=\"controls\" initial=\"normal\" />\n            <motion.path d=\"M14.0012 4C13.9101 4.05643 13.82404 4.18636 13.74979 4.35302C13.67554 4.51969 13.61309 4.7231 13.56921 4.92651C13.52532 5.12992 13.5 5.33333 13.5 5.5\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"rightSteamVariants\" :animate=\"controls\" initial=\"normal\" />\n          </svg>\n        </div>\n</template>\n"
    },
    {
      "path": "composables/useIconAnimation.ts",
      "type": "registry:lib",
      "content": "import { ref, toValue, type MaybeRefOrGetter } from 'vue'\nimport type { AnimatedIconHandle } from '../types'\n\nexport type IconPose = 'normal' | 'animate'\n\ntype AnimationControls = {\n  set: (variant: IconPose | Record<string, unknown>) => void\n  start: (variant: IconPose | Record<string, unknown>) => Promise<unknown>\n}\n\nexport function useReducedMotionFlag(\n  reduced?: MaybeRefOrGetter<boolean | undefined>,\n) {\n  if (typeof window === 'undefined') return () => false\n  return () => {\n    const override = reduced === undefined ? undefined : toValue(reduced)\n    if (override !== undefined) return override\n    return window.matchMedia('(prefers-reduced-motion: reduce)').matches\n  }\n}\n\nexport function useIconAnimation(options: {\n  controls: AnimationControls\n  loops?: boolean\n}): AnimatedIconHandle & {\n  onMouseEnter: () => void\n  onMouseLeave: () => void\n} {\n  const { controls, loops = false } = options\n  const isPlaying = ref(false)\n  let run = 0\n\n  const prefersReduced = () =>\n    typeof window !== 'undefined' &&\n    window.matchMedia('(prefers-reduced-motion: reduce)').matches\n\n  async function startAnimation() {\n    if (prefersReduced() || isPlaying.value) return\n\n    isPlaying.value = true\n    const current = ++run\n    controls.set('normal')\n    await controls.start('animate')\n    if (run === current) isPlaying.value = false\n  }\n\n  function stopAnimation() {\n    if (!loops) return\n    run += 1\n    isPlaying.value = false\n    void controls.start('normal')\n  }\n\n  return {\n    startAnimation,\n    stopAnimation,\n    onMouseEnter: () => {\n      void startAnimation()\n    },\n    onMouseLeave: () => {\n      stopAnimation()\n    },\n  }\n}\n"
    },
    {
      "path": "types/animated-icon.ts",
      "type": "registry:lib",
      "content": "export interface AnimatedIconHandle {\n  startAnimation: () => void\n  stopAnimation: () => void\n}\n\nexport interface AnimatedIconProps {\n  size?: number\n}\n"
    }
  ]
}
