{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "align-vertical-distribute-center",
  "type": "registry:ui",
  "title": "align-vertical-distribute-center",
  "description": "Animated align vertical distribute center icon for Vue",
  "dependencies": [
    "motion-v"
  ],
  "files": [
    {
      "path": "components/ui/align-vertical-distribute-center.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: 'AlignVerticalDistributeCenterIcon' })\n\nwithDefaults(\n  defineProps<{\n    size?: number\n  }>(),\n  { size: 28 },\n)\n\n// the two rows push apart until their centre-ticks line up\n// authored from scripts/authored\nconst tickTopVariants: Variants = {\n  normal: { transform: 'scaleX(1)' },\n  animate: {\n    transform: ['scaleX(1)', 'scaleX(0.4)', 'scaleX(1.06)', 'scaleX(1)'],\n    transition: { duration: 0.5, delay: 0.1, times: [0, 0.14, 0.56, 1], ease: [0.23, 1, 0.32, 1] },\n  },\n};\n\nconst tickBottomVariants: Variants = {\n  normal: { transform: 'scaleX(1)' },\n  animate: {\n    transform: ['scaleX(1)', 'scaleX(0.4)', 'scaleX(1.06)', 'scaleX(1)'],\n    transition: { duration: 0.5, delay: 0.16, times: [0, 0.14, 0.56, 1], ease: [0.23, 1, 0.32, 1] },\n  },\n};\n\nconst wideVariants: Variants = {\n  normal: { transform: 'translate(0px, 0px)' },\n  animate: {\n    transform: [\n      'translate(0px, 0px)',\n      'translate(0px, -1.8px)',\n      'translate(0px, 0.25200000000000006px)',\n      'translate(0px, 0px)',\n    ],\n    transition: {\n      duration: 0.54,\n      delay: 0.06,\n      times: [0, 0.12, 0.62, 1],\n      ease: [\n        [0.23, 1, 0.32, 1],\n        [0.23, 1, 0.32, 1],\n        [0.23, 1, 0.32, 1],\n      ],\n    },\n  },\n};\n\nconst narrowVariants: Variants = {\n  normal: { transform: 'translate(0px, 0px)' },\n  animate: {\n    transform: [\n      'translate(0px, 0px)',\n      'translate(0px, 1.8px)',\n      'translate(0px, -0.25200000000000006px)',\n      'translate(0px, 0px)',\n    ],\n    transition: {\n      duration: 0.54,\n      times: [0, 0.12, 0.62, 1],\n      ease: [\n        [0.23, 1, 0.32, 1],\n        [0.23, 1, 0.32, 1],\n        [0.23, 1, 0.32, 1],\n      ],\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=\"M22 7.5L16 7.5M8 7.5L2 7.5\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"tickTopVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '12px 7.5px' }\" />\n            <motion.path d=\"M22 16.5L19 16.5M5 16.5L2 16.5\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"tickBottomVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '12px 16.5px' }\" />\n            <motion.path d=\"M7.5 19L16.497 19C16.9617 19 17.194 19 17.3872 18.9616C18.1806 18.8038 18.8008 18.1836 18.9586 17.3902C18.997 17.197 18.997 16.9647 18.997 16.5C18.997 16.0353 18.997 15.803 18.9586 15.6098C18.8008 14.8164 18.1806 14.1962 17.3872 14.0384C17.194 14 16.9617 14 16.497 14L7.5 14C7.03534 14 6.80302 14 6.60982 14.0384C5.81644 14.1962 5.19624 14.8164 5.03843 15.6098C5 15.803 5 16.0353 5 16.5C5 16.9647 5 17.197 5.03843 17.3902C5.19624 18.1836 5.81644 18.8038 6.60982 18.9616C6.80302 19 7.03534 19 7.5 19Z\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"wideVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '12px 16.5px' }\" />\n            <motion.path d=\"M10.5 10H13.497C13.9617 10 14.194 10 14.3872 9.96157C15.1806 9.80376 15.8008 9.18356 15.9586 8.39018C15.997 8.19698 15.997 7.96466 15.997 7.5C15.997 7.03534 15.997 6.80302 15.9586 6.60982C15.8008 5.81644 15.1806 5.19624 14.3872 5.03843C14.194 5 13.9617 5 13.497 5L10.5 5C10.0353 5 9.80302 5 9.60982 5.03843C8.81644 5.19624 8.19624 5.81644 8.03843 6.60982C8 6.80302 8 7.03535 8 7.5C8 7.96466 8 8.19698 8.03843 8.39018C8.19624 9.18356 8.81644 9.80376 9.60982 9.96157C9.80302 10 10.0353 10 10.5 10Z\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"narrowVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '12px 7.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"
    }
  ]
}
