{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "shaka-04",
  "type": "registry:ui",
  "title": "shaka-04",
  "description": "Animated shaka icon for Vue",
  "dependencies": [
    "motion-v"
  ],
  "files": [
    {
      "path": "components/ui/shaka-04.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: 'Shaka04Icon' })\n\nwithDefaults(\n  defineProps<{\n    size?: number\n  }>(),\n  { size: 28 },\n)\n\n// after thumbs-up: the hand rocks once from the wrist and returns\n// generated from @hugeicons/core-free-icons\nconst iconVariants: Variants = {\n  normal: {\n    transform: 'translateY(0px) rotate(0deg)',\n  },\n  animate: {\n    transform: ['translateY(0px) rotate(0deg)', 'translateY(-1.52px) rotate(-3.79deg)', 'translateY(0.28px) rotate(0.95deg)', 'translateY(0px) rotate(0deg)'],\n    transition: {\n      duration: 0.53,\n      ease: [0.23, 1, 0.32, 1],\n    },\n  },\n}\n\nconst controls = useAnimationControls()\nconst { onMouseEnter, onMouseLeave, startAnimation, stopAnimation } = useIconAnimation({\n  controls,\n  loops: false,\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            <motion.path d=\"M7.51147 10C7.51147 9.17162 8.18247 8.50004 9.01019 8.50004C9.83792 8.50004 10.5089 9.17162 10.5089 10M7.51147 10L6.2653 3.88298C6.1371 3.08598 5.44981 2.5 4.64324 2.5C3.64488 2.5 2.87728 3.38384 3.01631 4.37332L4.51402 13.1669C4.51402 13.1669 4.8418 16.1847 5.17257 17.0498C5.57664 18.6894 6.51232 19.7414 6.51232 21.5002M7.51147 10V12C7.51147 12.8285 8.18247 13.5 9.01019 13.5C9.83792 13.5 10.5089 12.8285 10.5089 12V11.5001M13.5062 11L13.5064 9.00004C13.5067 8.17191 14.1776 7.50068 15.0051 7.50068C15.8328 7.50068 16.5038 8.17226 16.5038 9.00068L16.5036 11C16.5036 11.8285 15.8326 12.5 15.0049 12.5C14.1772 12.5 13.5062 11.8285 13.5062 11ZM13.5064 9.00004V9.50004C13.5064 8.67162 12.8354 8.00004 12.0076 8.00004C11.1799 8.00004 10.5089 8.67162 10.5089 9.50004V11.5001M13.5062 11L13.5062 11.5C13.5063 12.3284 12.8353 13 12.0076 13C11.1799 13 10.5089 12.3285 10.5089 11.5001M16.5038 12.9625L18.1227 11.3371C18.8331 10.6239 20.0031 10.689 20.6307 11.4765C21.1108 12.0791 21.1241 12.9316 20.6629 13.549L17.0663 18.1472C16.3781 19.0269 16.0042 20.3829 16.0042 21.5002\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"iconVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '12px 21.5px' }\" />\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"
    }
  ]
}
