{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "setting-done-02",
  "type": "registry:ui",
  "title": "setting-done-02",
  "description": "Animated setting done icon for Vue",
  "dependencies": [
    "motion-v"
  ],
  "files": [
    {
      "path": "components/ui/setting-done-02.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: 'SettingDone02Icon' })\n\nwithDefaults(\n  defineProps<{\n    size?: number\n  }>(),\n  { size: 28 },\n)\n\n// after circle-check: the confirmation stroke writes from tail to tip and lands once\n// generated from @hugeicons/core-free-icons\nconst frameVariants: Variants = {\n  normal: {\n    transform: 'translateY(0px) rotate(0deg) scale(1)',\n  },\n  animate: {\n    transform: ['translateY(0px) rotate(0deg) scale(1)', 'translateY(0px) rotate(0deg) scale(1)', 'translateY(-0.35px) rotate(0.8deg) scale(1.08)', 'translateY(0px) rotate(0deg) scale(1)'],\n    transition: {\n      duration: 0.81,\n      ease: [\n        'linear',\n        [0.23, 1, 0.32, 1],\n        [0.23, 1, 0.32, 1],\n      ],\n      times: [0, 0.78, 0.9, 1],\n    },\n  },\n}\n\nconst markVariants: Variants = {\n  normal: {\n    pathLength: 1,\n    pathOffset: 0,\n    visibility: 'visible',\n  },\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.77,\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      times: [0, 0.06, 0.25, 0.28, 0.35, 0.39, 0.84, 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=\"M9.588 19.68C9.192 20.04 8.7831 20.4841 8.616 20.5066C8.4489 20.5291 8.2745 20.4234 7.9023 20.2121L6 19.14C5.52 18.9 5.496 18.72 5.496 18.66C5.496 18.6 5.496 18.346 5.652 17.8244C6.15179 15.9 4.98 13.86 2.989 13.3399C2.4671 13.1992 2.2062 13.1288 2.1031 12.9942C2 12.8597 2 12.6432 2 12.2103V10.2868C2 9.85391 2 9.63741 2.1031 9.50281C2.2062 9.36831 2.4671 9.29791 2.989 9.15721C4.9397 8.63124 6.1614 6.64936 5.6582 4.71166C5.5199 4.17873 5.4507 3.91226 5.5168 3.75601C5.5829 3.59977 5.7725 3.49209 6.1518 3.27673L7.8765 2.29749C8.2488 2.08615 8.4349 1.98048 8.6019 2.00298C8.769 2.02549 8.9574 2.21349 9.3343 2.5895C10.7936 4.04528 13.208 4.04534 14.6672 2.58959C15.0442 2.21359 15.2326 2.02558 15.3996 2.00308C15.5667 1.98058 15.7528 2.08625 16.1251 2.29759L17.8498 3.27682C18.2291 3.4922 18.4187 3.59988 18.4848 3.75615C18.5509 3.91242 18.4817 4.17885 18.3433 4.71173C17.8399 6.64937 19.0606 8.64201 21.011 9.168C21.5329 9.30872 21.7938 9.3814 21.8969 9.516C22 9.6505 22 10.0791 22 10.512\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"1.5\" :variants=\"frameVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '12px 11.25px' }\" />\n            <motion.path d=\"M15 17.22C15 17.22 16 17.504 16.5 18.504C16.5 18.504 17.5962 16.004 19.008 15.504\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"markVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '17px 17px' }\" />\n            <motion.path d=\"M22 17C22 19.7614 19.7614 22 17 22C14.2386 22 12 19.7614 12 17C12 14.2386 14.2386 12 17 12C19.7614 12 22 14.2386 22 17Z\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"1.5\" :variants=\"frameVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '17px 17px' }\" />\n            <motion.path d=\"M14.8795 9.2998C14.0995 8.2198 12.9235 7.7998 11.9635 7.7998C10.1635 7.82381 8.51953 9.3108 8.51953 11.2438C8.51953 12.3095 8.81953 13.0798 9.65953 13.9198\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"1.5\" :variants=\"frameVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '11.7px 10.86px' }\" />\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"
    }
  ]
}
