{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "full-signal",
  "type": "registry:ui",
  "title": "full-signal",
  "description": "Animated full signal icon for Vue",
  "dependencies": [
    "motion-v"
  ],
  "files": [
    {
      "path": "components/ui/full-signal.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: 'FullSignalIcon' })\n\nwithDefaults(\n  defineProps<{\n    size?: number\n  }>(),\n  { size: 28 },\n)\n\n// after wifi-01: the signal travels from its source toward the strongest bar\n// generated from @hugeicons/core-free-icons\nconst arcVariants: Variants = {\n  normal: {\n    transform: 'translateY(0px) scale(1)',\n  },\n  animate: (i: number) => ({\n    transform: ['translateY(0.79px) scale(0.82)', 'translateY(0px) scale(1.06)', 'translateY(0px) scale(1)'],\n    transition: { duration: 0.93, ease: [0.23, 1, 0.32, 1], delay: i * 0.12 },\n  }),\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            <motion.path d=\"M18.5 19C18.9659 19 19.1989 19 19.3827 18.9239C19.6277 18.8224 19.8224 18.6277 19.9239 18.3827C20 18.1989 20 17.9659 20 17.5V6.5C20 6.03406 20 5.80109 19.9239 5.61732C19.8224 5.37229 19.6277 5.17761 19.3827 5.07612C19.1989 5 18.9659 5 18.5 5M18.5 19C18.0341 19 17.8011 19 17.6173 18.9239C17.3723 18.8224 17.1776 18.6277 17.0761 18.3827C17 18.1989 17 17.9659 17 17.5V6.5C17 6.03406 17 5.80109 17.0761 5.61732C17.1776 5.37229 17.3723 5.17761 17.6173 5.07612C17.8011 5 18.0341 5 18.5 5M18.5 19V5\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"arcVariants\" :custom=\"2\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '12px 18px' }\" />\n            <motion.path d=\"M12 19C12.4659 19 12.6989 19 12.8827 18.9239C13.1277 18.8224 13.3224 18.6277 13.4239 18.3827C13.5 18.1989 13.5 17.9659 13.5 17.5V9.5C13.5 9.03406 13.5 8.80109 13.4239 8.61732C13.3224 8.37229 13.1277 8.17761 12.8827 8.07612C12.6989 8 12.4659 8 12 8M12 19C11.5341 19 11.3011 19 11.1173 18.9239C10.8723 18.8224 10.6776 18.6277 10.5761 18.3827C10.5 18.1989 10.5 17.9659 10.5 17.5V9.5C10.5 9.03406 10.5 8.80109 10.5761 8.61732C10.6776 8.37229 10.8723 8.17761 11.1173 8.07612C11.3011 8 11.5341 8 12 8M12 19V8\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"arcVariants\" :custom=\"1\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '12px 18px' }\" />\n            <motion.path d=\"M5.5 19C5.96594 19 6.19891 19 6.38268 18.9239C6.62771 18.8224 6.82239 18.6277 6.92388 18.3827C7 18.1989 7 17.9659 7 17.5V13.5C7 13.0341 7 12.8011 6.92388 12.6173C6.82239 12.3723 6.62771 12.1776 6.38268 12.0761C6.19891 12 5.96594 12 5.5 12M5.5 19C5.03406 19 4.80109 19 4.61732 18.9239C4.37229 18.8224 4.17761 18.6277 4.07612 18.3827C4 18.1989 4 17.9659 4 17.5V13.5C4 13.0341 4 12.8011 4.07612 12.6173C4.17761 12.3723 4.37229 12.1776 4.61732 12.0761C4.80109 12 5.03406 12 5.5 12M5.5 19V12\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"arcVariants\" :custom=\"0\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '12px 18px' }\" />\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"
    }
  ]
}
