{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "hand-fist",
  "type": "registry:ui",
  "title": "hand-fist",
  "description": "Animated hand fist icon for Vue",
  "dependencies": [
    "motion-v"
  ],
  "files": [
    {
      "path": "components/ui/hand-fist.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: 'HandFistIcon' })\n\nwithDefaults(\n  defineProps<{\n    size?: number\n  }>(),\n  { size: 28 },\n)\n\n// after thumbs-up: the wrist leads one readable hand gesture\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.56px) rotate(-3.91deg)', 'translateY(0.29px) rotate(0.98deg)', 'translateY(0px) rotate(0deg)'],\n    transition: {\n      duration: 0.54,\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=\"M20.9434 8.5V5.5C20.9434 4.39543 20.0479 3.5 18.9434 3.5C17.8388 3.5 16.9434 4.39543 16.9434 5.5V8.5C16.9434 9.60457 17.8388 10.5 18.9434 10.5C20.0479 10.5 20.9434 9.60457 20.9434 8.5Z\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"iconVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '11.98px 21.5px' }\" />\n            <motion.path d=\"M16.9434 8.5V4.5C16.9434 3.39543 16.0479 2.5 14.9434 2.5C13.8388 2.5 12.9434 3.39543 12.9434 4.5V8.5C12.9434 9.60457 13.8388 10.5 14.9434 10.5C16.0479 10.5 16.9434 9.60457 16.9434 8.5Z\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"iconVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '11.98px 21.5px' }\" />\n            <motion.path d=\"M12.9434 8.5V4.5C12.9434 3.39543 12.0479 2.5 10.9434 2.5C9.83879 2.5 8.94336 3.39543 8.94336 4.5V7\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"iconVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '11.98px 21.5px' }\" />\n            <motion.path d=\"M8.94336 7V5.5C8.94336 4.39543 8.04793 3.5 6.94336 3.5C5.83879 3.5 4.94336 4.39543 4.94336 5.5V8.5C4.94336 8.67265 4.96524 8.84019 5.00637 9\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"iconVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '11.98px 21.5px' }\" />\n            <motion.path d=\"M20.9432 7.4987V12.6011C20.9432 14.3648 20.9432 15.2467 20.7852 15.9779C20.2047 18.6629 18.1074 20.7602 15.4224 21.3406C14.6912 21.4987 13.8094 21.4987 12.0456 21.4987C10.6084 21.4987 9.88985 21.4987 9.25954 21.3823C6.95975 20.9576 5.02399 19.4124 4.10014 17.2639C3.84694 16.6751 3.6847 15.9612 3.36022 14.5335C3.16624 13.68 3.06926 13.2533 3.05681 12.8704C3.01394 11.5518 3.62394 10.297 4.6873 9.51618C4.99611 9.28943 5.38455 9.10543 6.16143 8.73744L10.9969 6.44694C11.5228 6.19785 12.1513 6.41481 12.4115 6.93523C13.0042 8.12075 12.6391 9.56159 11.5532 10.3217L8.44322 12.4987C9.60988 12.9987 11.9432 14.4987 11.9432 16.4987\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"iconVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '11.98px 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"
    }
  ]
}
