{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "cloud-backup",
  "type": "registry:ui",
  "title": "cloud-backup",
  "description": "Animated cloud backup icon for Vue",
  "dependencies": [
    "motion-v"
  ],
  "files": [
    {
      "path": "components/ui/cloud-backup.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: 'CloudBackupIcon' })\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.11px)', 'translateY(0.28px)', 'translateY(0px)'],\n    transition: {\n      duration: 0.74,\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 8.50005C17.485 8.50002 17.4925 8.5 17.5 8.5C19.9853 8.5 22 10.5147 22 13C22 14.7415 21.0108 16.2519 19.5636 17M16.9003 10.5C17.2119 9.89038 17.4131 9.21494 17.4776 8.50005C17.4924 8.33536 17.5 8.16856 17.5 8C17.5 4.96243 15.0376 2.5 12 2.5C9.12324 2.5 6.76233 4.70862 6.52042 7.5227M6.52042 7.5227C3.98398 7.76407 2 9.90034 2 12.5C2 14.4791 3.14985 16.1896 4.81794 17M6.52042 7.5227C6.67826 7.50768 6.83823 7.5 7 7.5C7.7111 7.5 8.38754 7.64845 9 7.91604\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"iconVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '12px 9.75px' }\" />\n            <motion.path d=\"M7.82918 15.6646C7.64394 16.0351 7.79411 16.4856 8.16459 16.6708C8.53507 16.8561 8.98558 16.7059 9.17082 16.3354L8.5 16L7.82918 15.6646ZM9.5623 19.6495C9.28821 19.339 8.81425 19.3094 8.5037 19.5835C8.19315 19.8576 8.1636 20.3316 8.4377 20.6421L9 20.1458L9.5623 19.6495ZM8.93511 13.1125C8.99726 12.703 8.71565 12.3206 8.30612 12.2585C7.8966 12.1963 7.51423 12.478 7.45209 12.8875L8.1936 13L8.93511 13.1125ZM11.6125 17.0479C12.0221 16.9857 12.3037 16.6034 12.2415 16.1938C12.1794 15.7843 11.797 15.5027 11.3875 15.5649L11.5 16.3064L11.6125 17.0479ZM16 17.5H16.75C16.75 14.8766 14.6234 12.75 12 12.75V13.5V14.25C13.7949 14.25 15.25 15.7051 15.25 17.5H16ZM12 21.5V22.25C14.6234 22.25 16.75 20.1234 16.75 17.5H16H15.25C15.25 19.2949 13.7949 20.75 12 20.75V21.5ZM12 13.5V12.75C9.5419 12.75 8.35298 14.617 7.82918 15.6646L8.5 16L9.17082 16.3354C9.64702 15.383 10.4581 14.25 12 14.25V13.5ZM9 20.1458L8.4377 20.6421C9.30697 21.627 10.5812 22.25 12 22.25V21.5V20.75C11.0294 20.75 10.1589 20.3255 9.5623 19.6495L9 20.1458ZM8.19363 16.3064L8.72396 15.7761C8.8172 15.8693 8.81693 15.9411 8.79653 15.8588C8.78192 15.7999 8.76719 15.7017 8.75841 15.5597C8.74099 15.2779 8.75204 14.9163 8.77839 14.5426C8.80439 14.1738 8.84365 13.8152 8.8767 13.5472C8.89317 13.4136 8.90796 13.3038 8.91855 13.2277C8.92385 13.1898 8.92808 13.1603 8.93095 13.1407C8.93239 13.1308 8.93348 13.1235 8.93418 13.1187C8.93454 13.1164 8.93479 13.1146 8.93495 13.1136C8.93503 13.1131 8.93508 13.1127 8.93511 13.1125C8.93512 13.1125 8.93513 13.1124 8.93513 13.1124C8.93513 13.1124 8.93513 13.1124 8.93513 13.1124C8.93512 13.1125 8.93511 13.1125 8.1936 13C7.45209 12.8875 7.45208 12.8876 7.45207 12.8876C7.45206 12.8877 7.45204 12.8878 7.45203 12.8879C7.45201 12.888 7.45197 12.8882 7.45193 12.8885C7.45186 12.889 7.45175 12.8897 7.45162 12.8906C7.45136 12.8923 7.451 12.8947 7.45055 12.8978C7.44963 12.9039 7.44833 12.9127 7.44668 12.924C7.44338 12.9467 7.43868 12.9793 7.43292 13.0207C7.42139 13.1033 7.40555 13.2211 7.38798 13.3636C7.35297 13.6474 7.31055 14.0337 7.2821 14.4371C7.25401 14.8355 7.23784 15.2732 7.26126 15.6522C7.27291 15.8406 7.29561 16.0382 7.34056 16.2196C7.37973 16.3777 7.46115 16.6346 7.66329 16.8367L8.19363 16.3064ZM11.5 16.3064C11.3875 15.5649 11.3875 15.5649 11.3876 15.5648C11.3876 15.5648 11.3876 15.5648 11.3876 15.5648C11.3876 15.5648 11.3875 15.5648 11.3874 15.5649C11.3873 15.5649 11.3869 15.5649 11.3864 15.565C11.3853 15.5652 11.3836 15.5654 11.3813 15.5658C11.3765 15.5665 11.3692 15.5676 11.3593 15.569C11.3397 15.5719 11.3102 15.5761 11.2722 15.5814C11.1962 15.592 11.0863 15.6068 10.9528 15.6233C10.6848 15.6563 10.3262 15.6956 9.95741 15.7216C9.58373 15.748 9.22207 15.759 8.9403 15.7416C8.79827 15.7328 8.70012 15.7181 8.64115 15.7035C8.55886 15.6831 8.63072 15.6828 8.72396 15.7761L8.19363 16.3064L7.66329 16.8367C7.86544 17.0389 8.12231 17.1203 8.28039 17.1594C8.46181 17.2044 8.6594 17.2271 8.84777 17.2387C9.22678 17.2622 9.66449 17.246 10.0629 17.2179C10.4663 17.1894 10.8526 17.147 11.1365 17.112C11.2789 17.0944 11.3967 17.0786 11.4794 17.0671C11.5207 17.0613 11.5534 17.0566 11.576 17.0533C11.5873 17.0516 11.5961 17.0503 11.6022 17.0494C11.6053 17.049 11.6077 17.0486 11.6094 17.0483C11.6103 17.0482 11.611 17.0481 11.6115 17.048C11.6118 17.048 11.612 17.048 11.6122 17.0479C11.6122 17.0479 11.6123 17.0479 11.6124 17.0479C11.6125 17.0479 11.6125 17.0479 11.5 16.3064Z\" fill=\"currentColor\" :variants=\"iconVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '12px 9.75px' }\" />\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"
    }
  ]
}
