{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "align-horizontal-distribute-center",
  "type": "registry:ui",
  "title": "align-horizontal-distribute-center",
  "description": "Animated align horizontal distribute center icon for Vue",
  "dependencies": [
    "motion-v"
  ],
  "files": [
    {
      "path": "components/ui/align-horizontal-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: 'AlignHorizontalDistributeCenterIcon' })\n\nwithDefaults(\n  defineProps<{\n    size?: number\n  }>(),\n  { size: 28 },\n)\n\n// the two columns push apart from the middle until their centre-ticks line up\n// authored from scripts/authored\nconst tickRightVariants: Variants = {\n  normal: { transform: 'scaleY(1)' },\n  animate: {\n    transform: ['scaleY(1)', 'scaleY(0.4)', 'scaleY(1.08)', 'scaleY(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 tickLeftVariants: Variants = {\n  normal: { transform: 'scaleY(1)' },\n  animate: {\n    transform: ['scaleY(1)', 'scaleY(0.4)', 'scaleY(1.08)', 'scaleY(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 tallVariants: Variants = {\n  normal: { transform: 'translate(0px, 0px)' },\n  animate: {\n    transform: [\n      'translate(0px, 0px)',\n      'translate(1.8px, 0px)',\n      'translate(-0.25200000000000006px, 0px)',\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 shortVariants: Variants = {\n  normal: { transform: 'translate(0px, 0px)' },\n  animate: {\n    transform: [\n      'translate(0px, 0px)',\n      'translate(-1.8px, 0px)',\n      'translate(0.25200000000000006px, 0px)',\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 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=\"M16.5 8V3M16.5 16.5V21\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"tickRightVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '16.5px 12px' }\" />\n            <motion.path d=\"M7.5 6V3M7.5 18.5V21\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"tickLeftVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '7.5px 12px' }\" />\n            <motion.path d=\"M7.5 6.00036C8.34389 6.00036 9.31789 5.91699 9.79904 6.75036C10 7.09844 10 7.56575 10 8.50036L10 15.5004C10 16.435 10 16.9023 9.79904 17.2504C9.31789 18.0837 8.34389 18.0004 7.5 18.0004C6.65611 18.0004 5.68211 18.0837 5.20096 17.2504C5 16.9023 5 16.435 5 15.5004L5 8.50036C5 7.56575 5 7.09844 5.20096 6.75036C5.68211 5.91699 6.65611 6.00036 7.5 6.00036Z\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"tallVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '7.5px 12px' }\" />\n            <motion.path d=\"M16.5 8.00036C17.3439 8.00036 18.3179 7.91699 18.799 8.75036C19 9.09844 19 9.56575 19 10.5004L19 13.5004C19 14.435 19 14.9023 18.799 15.2504C18.3179 16.0837 17.3439 16.0004 16.5 16.0004C15.6561 16.0004 14.6821 16.0837 14.201 15.2504C14 14.9023 14 14.435 14 13.5004L14 10.5004C14 9.56575 14 9.09844 14.201 8.75036C14.6821 7.91699 15.6561 8.00036 16.5 8.00036Z\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"shortVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '16.5px 12px' }\" />\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"
    }
  ]
}
