{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "blockchain-07",
  "type": "registry:ui",
  "title": "blockchain-07",
  "description": "Animated blockchain icon for Vue",
  "dependencies": [
    "motion-v"
  ],
  "files": [
    {
      "path": "components/ui/blockchain-07.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: 'Blockchain07Icon' })\n\nwithDefaults(\n  defineProps<{\n    size?: number\n  }>(),\n  { size: 28 },\n)\n\n// after share-08: the transaction travels block by block through the chain\n// generated from @hugeicons/core-free-icons\nconst nodeVariants: Variants = {\n  normal: {\n    transform: 'scale(1)',\n  },\n  animate: (i: number) => ({\n    transform: ['scale(1)', 'scale(1.25)', 'scale(1)'],\n    transition: { duration: 0.46, ease: 'easeInOut', delay: i * 0.12 },\n  }),\n}\n\nconst wireVariants: Variants = {\n  normal: {\n    pathLength: 1,\n    visibility: 'visible',\n  },\n  animate: {\n    pathLength: [0, 1],\n    visibility: 'visible',\n    transition: {\n      duration: 0.46,\n      ease: 'easeOut',\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=\"M5.49992 10.5C5.62208 10.5 5.73564 10.4435 5.96275 10.3304L7.78824 9.42162C8.59603 9.01948 8.99992 8.81841 8.99992 8.5V4.5M5.49992 10.5C5.37777 10.5 5.26421 10.4435 5.0371 10.3304L3.21161 9.42162C2.40382 9.01948 1.99992 8.81841 1.99992 8.5V4.5M5.49992 10.5V6.5M1.99992 4.5C1.99992 4.81841 2.40382 5.01948 3.21161 5.42162L5.0371 6.33041C5.26421 6.44347 5.37777 6.5 5.49992 6.5C5.62208 6.5 5.73563 6.44347 5.96275 6.33041L7.78824 5.42162C8.59603 5.01948 8.99992 4.81841 8.99992 4.5C8.99992 4.18159 8.59603 3.98052 7.78824 3.57838L5.96275 2.66959C5.73563 2.55653 5.62208 2.5 5.49992 2.5C5.37777 2.5 5.26421 2.55653 5.0371 2.66959L3.21161 3.57838C2.40382 3.98052 1.99992 4.18159 1.99992 4.5Z\" stroke=\"currentColor\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"nodeVariants\" :custom=\"0\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '5.5px 6.5px' }\" />\n            <motion.path d=\"M18.4999 10.5C18.6221 10.5 18.7356 10.4435 18.9627 10.3304L20.7882 9.42162C21.596 9.01948 21.9999 8.81841 21.9999 8.5V4.5M18.4999 10.5C18.3778 10.5 18.2642 10.4435 18.0371 10.3304L16.2116 9.42162C15.4038 9.01948 14.9999 8.81841 14.9999 8.5V4.5M18.4999 10.5V6.5M14.9999 4.5C14.9999 4.81841 15.4038 5.01948 16.2116 5.42162L18.0371 6.33041C18.2642 6.44347 18.3778 6.5 18.4999 6.5C18.6221 6.5 18.7356 6.44347 18.9627 6.33041L20.7882 5.42162C21.596 5.01948 21.9999 4.81841 21.9999 4.5C21.9999 4.18159 21.596 3.98052 20.7882 3.57838L18.9627 2.66959C18.7356 2.55653 18.6221 2.5 18.4999 2.5C18.3778 2.5 18.2642 2.55653 18.0371 2.66959L16.2116 3.57838C15.4038 3.98052 14.9999 4.18159 14.9999 4.5Z\" stroke=\"currentColor\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"nodeVariants\" :custom=\"1\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '18.5px 6.5px' }\" />\n            <motion.path d=\"M11.4999 6.5H12.4999\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"1.5\" :variants=\"wireVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '12px 6.5px' }\" />\n            <motion.path d=\"M1.99992 12.5V16C1.99992 17.4045 1.99992 18.1067 2.33698 18.6111C2.4829 18.8295 2.6704 19.017 2.88878 19.1629C3.39323 19.5 4.09546 19.5 5.49992 19.5\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"1.5\" :variants=\"wireVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '3.75px 16px' }\" />\n            <motion.path d=\"M22.0001 12.5V16C22.0001 17.4045 22.0001 18.1067 21.663 18.6111C21.5171 18.8295 21.3296 19.017 21.1112 19.1629C20.6068 19.5 19.9044 19.5 18.4999 19.5\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"1.5\" :variants=\"wireVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '20.25px 16px' }\" />\n            <motion.path d=\"M13.7499 16.9311C14.4731 16.9413 14.8831 16.9939 15.1582 17.2633C15.4999 17.598 15.4999 18.1368 15.4999 19.2143C15.4999 20.2918 15.4999 20.8305 15.1582 21.1653C14.8165 21.5 14.2665 21.5 13.1666 21.5H10.8333C9.73331 21.5 9.18334 21.5 8.84163 21.1653C8.49992 20.8305 8.49992 20.2918 8.49992 19.2143C8.49992 18.1368 8.49992 17.598 8.84163 17.2633C9.1167 16.9939 9.52672 16.9413 10.2499 16.9311C10.4251 16.9286 10.6187 16.9286 10.8333 16.9286H13.1666C13.3811 16.9286 13.5747 16.9286 13.7499 16.9311ZM10.2499 16.9311V15.2143C10.2499 14.2675 11.0334 13.5 11.9999 13.5C12.9664 13.5 13.7499 14.2675 13.7499 15.2143V16.9311\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"1.5\" :variants=\"nodeVariants\" :custom=\"2\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '12px 17.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"
    }
  ]
}
