{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "house-plug",
  "type": "registry:ui",
  "title": "house-plug",
  "description": "Animated house plug icon for Vue",
  "dependencies": [
    "motion-v"
  ],
  "files": [
    {
      "path": "components/ui/house-plug.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: 'HousePlugIcon' })\n\nwithDefaults(\n  defineProps<{\n    size?: number\n  }>(),\n  { size: 28 },\n)\n\n// after home-01: the house gives a welcoming hop and lands on its foundation\n// generated from @hugeicons/core-free-icons\nconst iconVariants: Variants = {\n  normal: {\n    transform: 'translateY(0px)',\n  },\n  animate: {\n    transform: ['translateY(0px)', 'translateY(-2.14px)', 'translateY(0px)'],\n    transition: {\n      duration: 0.52,\n      ease: 'easeInOut',\n      times: [0, 0.35, 1],\n    },\n  },\n}\n\nconst markVariants: Variants = {\n  normal: {\n    pathLength: 1,\n    visibility: 'visible',\n  },\n  animate: {\n    pathLength: [0, 1],\n    visibility: ['hidden', 'visible'],\n    transition: {\n      duration: 0.38,\n      ease: 'easeOut',\n      delay: 0.2,\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=\"M9.99915 10.3495V12.3495\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"iconVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '12px 21.35px' }\" />\n            <motion.path d=\"M13.9991 10.3495V12.3495\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"iconVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '12px 21.35px' }\" />\n            <motion.path d=\"M13.8325 12.3495H10.1658C10.011 12.3495 9.93365 12.3495 9.86841 12.3552C9.14324 12.4186 8.5683 12.9936 8.50485 13.7188C8.49915 13.784 8.49915 13.8614 8.49915 14.0162C8.49915 14.3257 8.49915 14.4805 8.51056 14.611C8.63745 16.0613 9.78734 17.2112 11.2377 17.3381C11.3682 17.3495 11.5229 17.3495 11.8325 17.3495H12.1658C12.4754 17.3495 12.6301 17.3495 12.7606 17.3381C14.211 17.2112 15.3608 16.0613 15.4877 14.611C15.4991 14.4805 15.4991 14.3257 15.4991 14.0162C15.4991 13.8614 15.4991 13.784 15.4934 13.7188C15.43 12.9936 14.855 12.4186 14.1299 12.3552C14.0646 12.3495 13.9873 12.3495 13.8325 12.3495Z\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"iconVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '12px 21.35px' }\" />\n            <motion.path d=\"M11.9991 17.3495V21.3495\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"markVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '12px 19.35px' }\" />\n            <motion.path d=\"M15.9991 21.3495C17.8684 21.3495 18.803 21.3495 19.4991 20.9476C19.9552 20.6843 20.3339 20.3056 20.5972 19.8495C20.9991 19.1533 20.9991 18.2187 20.9991 16.3495V11.784C20.9991 10.3429 20.9991 9.62242 20.6941 8.9987C20.389 8.37497 19.8203 7.93261 18.6828 7.04789L15.6828 4.71456C13.9132 3.33824 13.0285 2.65009 11.9991 2.65009C10.9698 2.65009 10.085 3.33824 8.3155 4.71456L5.3155 7.04789C4.178 7.93261 3.60925 8.37497 3.3042 8.9987C2.99915 9.62242 2.99915 10.3429 2.99915 11.784V16.3495C2.99915 18.2187 2.99915 19.1533 3.40107 19.8495C3.66437 20.3056 4.04309 20.6843 4.49915 20.9476C5.1953 21.3495 6.12991 21.3495 7.99915 21.3495\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"iconVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '12px 21.35px' }\" />\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"
    }
  ]
}
