{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "cloud-sync",
  "type": "registry:ui",
  "title": "cloud-sync",
  "description": "Animated cloud sync icon for Vue",
  "dependencies": [
    "motion-v"
  ],
  "files": [
    {
      "path": "components/ui/cloud-sync.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: 'CloudSyncIcon' })\n\nwithDefaults(\n  defineProps<{\n    size?: number\n  }>(),\n  { size: 28 },\n)\n\n// after cloud: a soft swell travels through the cloud while its baseline holds\n// generated from @hugeicons/core-free-icons\nconst iconVariants: Variants = {\n  normal: {\n    transform: 'translateY(0px)',\n  },\n  animate: {\n    transform: ['translateY(0px)', 'translateY(-1.23px)', 'translateY(0.31px)', 'translateY(0px)'],\n    transition: {\n      duration: 0.7,\n      ease: [0.77, 0, 0.175, 1],\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=\"M17.4776 9.00005C17.485 9.00002 17.4925 9 17.5 9C19.9853 9 22 11.0147 22 13.5C22 15.0602 21.206 16.435 20 17.2422M17.4776 9.00005C17.4924 8.83536 17.5 8.66856 17.5 8.5C17.5 5.46243 15.0376 3 12 3C9.12324 3 6.76233 5.20862 6.52042 8.0227M17.4776 9.00005C17.4466 9.34345 17.3841 9.67773 17.293 10M6.52042 8.0227C3.98398 8.26407 2 10.4003 2 13C2 14.7891 2.93963 16.3587 4.35232 17.2422M6.52042 8.0227C6.67826 8.00768 6.83823 8 7 8C7.7111 8 8.38754 8.14845 9 8.41604\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"iconVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '12px 10.12px' }\" />\n            <motion.path d=\"M15.4643 14.5C14.7727 13.3044 13.48 12.5 11.9994 12.5C10.472 12.5 9.14453 13.3561 8.4707 14.6147M8.53456 18.5C9.22618 19.6956 10.5189 20.5 11.9994 20.5C13.5221 20.5 14.8461 19.6492 15.5219 18.397\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"iconVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '12px 10.12px' }\" />\n            <motion.path d=\"M8.90745 12.1125C8.9696 11.703 8.68799 11.3206 8.27846 11.2585C7.86894 11.1963 7.48658 11.478 7.42443 11.8875L8.16594 12L8.90745 12.1125ZM11.1125 15.5755C11.5221 15.5134 11.8037 15.131 11.7415 14.7215C11.6794 14.312 11.297 14.0304 10.8875 14.0925L11 14.834L11.1125 15.5755ZM8.16597 14.834L8.6963 14.3037C8.79731 14.4047 8.80288 14.4898 8.78674 14.4247C8.77638 14.3829 8.76432 14.3058 8.757 14.1874C8.7425 13.9528 8.75161 13.6483 8.77407 13.3297C8.79618 13.0161 8.8296 12.7107 8.8578 12.4821C8.87183 12.3683 8.88443 12.2747 8.89345 12.21C8.89795 12.1777 8.90155 12.1527 8.90398 12.136C8.90519 12.1277 8.90611 12.1215 8.9067 12.1176C8.907 12.1156 8.90721 12.1141 8.90734 12.1133C8.9074 12.1129 8.90744 12.1126 8.90746 12.1125C8.90747 12.1124 8.90748 12.1124 8.90748 12.1124C8.90747 12.1124 8.90747 12.1124 8.90747 12.1124C8.90746 12.1125 8.90745 12.1125 8.16594 12C7.42443 11.8875 7.42442 11.8876 7.42441 11.8876C7.4244 11.8877 7.42439 11.8878 7.42438 11.8878C7.42435 11.888 7.42432 11.8882 7.42429 11.8884C7.42422 11.8889 7.42413 11.8895 7.42401 11.8903C7.42378 11.8918 7.42347 11.8939 7.42307 11.8966C7.42227 11.902 7.42113 11.9096 7.4197 11.9194C7.41684 11.939 7.41279 11.9672 7.40781 12.0029C7.39787 12.0743 7.38421 12.1758 7.36908 12.2985C7.33893 12.5429 7.30234 12.876 7.27778 13.2242C7.25358 13.5675 7.23935 13.9481 7.25986 14.28C7.27004 14.4447 7.29007 14.6212 7.33077 14.7854C7.36569 14.9263 7.44126 15.17 7.63563 15.3644L8.16597 14.834ZM11 14.834C10.8875 14.0925 10.8875 14.0925 10.8876 14.0925C10.8876 14.0925 10.8876 14.0925 10.8876 14.0925C10.8876 14.0925 10.8876 14.0925 10.8875 14.0925C10.8874 14.0925 10.8871 14.0926 10.8867 14.0926C10.8858 14.0928 10.8844 14.093 10.8824 14.0933C10.8785 14.0939 10.8723 14.0948 10.864 14.096C10.8473 14.0984 10.8223 14.102 10.79 14.1065C10.7253 14.1155 10.6317 14.1281 10.5179 14.1422C10.2893 14.1704 9.98385 14.2038 9.67024 14.2259C9.35171 14.2484 9.04716 14.2575 8.81258 14.243C8.69415 14.2357 8.61713 14.2236 8.57533 14.2133C8.5102 14.1971 8.59528 14.2027 8.6963 14.3037L8.16597 14.834L7.63563 15.3644C7.83 15.5587 8.07366 15.6343 8.21457 15.6692C8.37881 15.7099 8.55529 15.73 8.72005 15.7401C9.05186 15.7607 9.43248 15.7464 9.77578 15.7222C10.124 15.6976 10.4571 15.6611 10.7015 15.6309C10.8242 15.6158 10.9257 15.6021 10.9971 15.5922C11.0328 15.5872 11.061 15.5831 11.0806 15.5803C11.0904 15.5788 11.0981 15.5777 11.1034 15.5769C11.1061 15.5765 11.1082 15.5762 11.1097 15.576C11.1105 15.5758 11.1111 15.5758 11.1116 15.5757C11.1118 15.5756 11.112 15.5756 11.1122 15.5756C11.1123 15.5756 11.1123 15.5756 11.1124 15.5756C11.1125 15.5756 11.1125 15.5755 11 14.834Z\" fill=\"currentColor\" :variants=\"iconVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '12px 10.12px' }\" />\n            <motion.path d=\"M15.0925 20.8875C15.0304 21.297 15.312 21.6794 15.7215 21.7415C16.1311 21.8037 16.5134 21.522 16.5756 21.1125L15.8341 21L15.0925 20.8875ZM12.8875 17.4245C12.4779 17.4866 12.1963 17.869 12.2585 18.2785C12.3206 18.688 12.703 18.9696 13.1125 18.9075L13 18.166L12.8875 17.4245ZM15.834 18.166L15.3037 18.6963C15.2027 18.5953 15.1971 18.5102 15.2133 18.5753C15.2236 18.6171 15.2357 18.6942 15.243 18.8126C15.2575 19.0472 15.2484 19.3517 15.2259 19.6703C15.2038 19.9839 15.1704 20.2893 15.1422 20.5179C15.1282 20.6317 15.1156 20.7253 15.1066 20.79C15.102 20.8223 15.0984 20.8473 15.096 20.864C15.0948 20.8723 15.0939 20.8785 15.0933 20.8824C15.093 20.8844 15.0928 20.8859 15.0927 20.8867C15.0926 20.8871 15.0926 20.8874 15.0925 20.8875C15.0925 20.8876 15.0925 20.8876 15.0925 20.8876C15.0925 20.8876 15.0925 20.8876 15.0925 20.8876C15.0925 20.8875 15.0925 20.8875 15.8341 21C16.5756 21.1125 16.5756 21.1124 16.5756 21.1124C16.5756 21.1123 16.5756 21.1122 16.5756 21.1122C16.5756 21.112 16.5757 21.1118 16.5757 21.1116C16.5758 21.1111 16.5759 21.1105 16.576 21.1097C16.5762 21.1082 16.5765 21.1061 16.5769 21.1034C16.5777 21.098 16.5789 21.0904 16.5803 21.0806C16.5832 21.061 16.5872 21.0328 16.5922 20.9971C16.6021 20.9257 16.6158 20.8242 16.6309 20.7015C16.6611 20.4571 16.6977 20.124 16.7222 19.7758C16.7464 19.4325 16.7607 19.0519 16.7401 18.72C16.73 18.5553 16.7099 18.3788 16.6692 18.2146C16.6343 18.0737 16.5587 17.83 16.3644 17.6356L15.834 18.166ZM13 18.166C13.1125 18.9075 13.1125 18.9075 13.1124 18.9075C13.1124 18.9075 13.1124 18.9075 13.1124 18.9075C13.1124 18.9075 13.1124 18.9075 13.1125 18.9075C13.1126 18.9075 13.1129 18.9074 13.1133 18.9074C13.1142 18.9072 13.1156 18.907 13.1176 18.9067C13.1215 18.9061 13.1277 18.9052 13.1361 18.904C13.1527 18.9016 13.1777 18.898 13.21 18.8935C13.2747 18.8845 13.3683 18.8719 13.4821 18.8578C13.7107 18.8296 14.0161 18.7962 14.3298 18.7741C14.6483 18.7516 14.9528 18.7425 15.1874 18.757C15.3058 18.7643 15.3829 18.7764 15.4247 18.7867C15.4898 18.8029 15.4047 18.7973 15.3037 18.6963L15.834 18.166L16.3644 17.6356C16.17 17.4413 15.9263 17.3657 15.7854 17.3308C15.6212 17.2901 15.4447 17.27 15.28 17.2599C14.9481 17.2393 14.5675 17.2536 14.2242 17.2778C13.876 17.3024 13.5429 17.3389 13.2985 17.3691C13.1758 17.3842 13.0743 17.3979 13.0029 17.4078C12.9672 17.4128 12.939 17.4169 12.9194 17.4197C12.9096 17.4212 12.9019 17.4223 12.8966 17.4231C12.8939 17.4235 12.8918 17.4238 12.8903 17.424C12.8895 17.4242 12.8889 17.4242 12.8884 17.4243C12.8882 17.4244 12.888 17.4244 12.8878 17.4244C12.8878 17.4244 12.8877 17.4244 12.8876 17.4244C12.8875 17.4244 12.8875 17.4245 13 18.166Z\" fill=\"currentColor\" :variants=\"iconVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '12px 10.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"
    }
  ]
}
