{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "align-horizontal-justify-end",
  "type": "registry:ui",
  "title": "align-horizontal-justify-end",
  "description": "Animated align horizontal justify end icon for Vue",
  "dependencies": [
    "motion-v"
  ],
  "files": [
    {
      "path": "components/ui/align-horizontal-justify-end.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: 'AlignHorizontalJustifyEndIcon' })\n\nwithDefaults(\n  defineProps<{\n    size?: number\n  }>(),\n  { size: 28 },\n)\n\n// both columns pack right until they rest against the end guide\n// authored from scripts/authored\nconst guideVariants: Variants = {\n  normal: { pathLength: 1, pathOffset: 0, visibility: 'visible' },\n  animate: {\n    pathLength: [1, 1, 0.12, 0, 0, 0.12, 1, 1],\n    pathOffset: [0, 0, 0.88, 1, 0, 0, 0, 0],\n    visibility: ['visible', 'visible', 'hidden', 'hidden', 'hidden', 'hidden', 'visible', 'visible'],\n    transition: {\n      duration: 0.7,\n      delay: 0.1,\n      times: [0, 0.06, 0.25, 0.28, 0.35, 0.39, 0.84, 1],\n      ease: [\n        'linear',\n        [0.77, 0, 0.175, 1],\n        'linear',\n        'linear',\n        'linear',\n        [0.77, 0, 0.175, 1],\n        'linear',\n      ],\n    },\n  },\n};\n\nconst tallVariants: Variants = {\n  normal: { transform: 'translate(0px, 0px)' },\n  animate: {\n    transform: [\n      'translate(0px, 0px)',\n      'translate(-2.6px, 0px)',\n      'translate(0.36400000000000005px, 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(-2.6px, 0px)',\n      'translate(0.36400000000000005px, 0px)',\n      'translate(0px, 0px)',\n    ],\n    transition: {\n      duration: 0.54,\n      delay: 0.08,\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=\"M21 2V22\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"guideVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '12px 12px' }\" />\n            <motion.path d=\"M17 7.5V16.497C17 16.9617 17 17.194 16.9616 17.3872C16.8038 18.1806 16.1836 18.8008 15.3902 18.9586C15.197 18.997 14.9647 18.997 14.5 18.997C14.0353 18.997 13.803 18.997 13.6098 18.9586C12.8164 18.8008 12.1962 18.1806 12.0384 17.3872C12 17.194 12 16.9617 12 16.497V7.5C12 7.03534 12 6.80302 12.0384 6.60982C12.1962 5.81644 12.8164 5.19624 13.6098 5.03843C13.803 5 14.0353 5 14.5 5C14.9647 5 15.197 5 15.3902 5.03843C16.1836 5.19624 16.8038 5.81644 16.9616 6.60982C17 6.80302 17 7.03534 17 7.5Z\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"tallVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '17px 12px' }\" />\n            <motion.path d=\"M8 10.5V13.497C8 13.9617 8 14.194 7.96157 14.3872C7.80376 15.1806 7.18356 15.8008 6.39018 15.9586C6.19698 15.997 5.96466 15.997 5.5 15.997C5.03534 15.997 4.80302 15.997 4.60982 15.9586C3.81644 15.8008 3.19624 15.1806 3.03843 14.3872C3 14.194 3 13.9617 3 13.497V10.5C3 10.0353 3 9.80302 3.03843 9.60982C3.19624 8.81644 3.81644 8.19624 4.60982 8.03843C4.80302 8 5.03534 8 5.5 8C5.96466 8 6.19698 8 6.39018 8.03843C7.18356 8.19624 7.80376 8.81644 7.96157 9.60982C8 9.80302 8 10.0353 8 10.5Z\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"shortVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '8px 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"
    }
  ]
}
