{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "maximize-03",
  "type": "registry:ui",
  "title": "maximize-03",
  "description": "Animated maximize icon for Vue",
  "dependencies": [
    "motion-v"
  ],
  "files": [
    {
      "path": "components/ui/maximize-03.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: 'Maximize03Icon' })\n\nwithDefaults(\n  defineProps<{\n    size?: number\n  }>(),\n  { size: 28 },\n)\n\n// after maximize-screen: the corners drive outward to occupy the larger frame\n// generated from @hugeicons/core-free-icons\nconst iconVariants: Variants = {\n  normal: {\n    transform: 'scale(1)',\n  },\n  animate: {\n    transform: ['scale(1)', 'scale(0.9)', 'scale(1.08)', 'scale(1)'],\n    transition: {\n      duration: 0.53,\n      ease: [0.23, 1, 0.32, 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=\"M14.9237 7.78146L15.8142 8.02144C16.7977 8.28651 17.3815 9.30336 17.1179 10.2926M17.1179 10.2926L16.8793 11.1882M17.1179 10.2926C17.2497 9.798 17.7552 9.50446 18.247 9.63699C19.2306 9.90207 19.8143 10.9189 19.5508 11.9082M19.5508 11.9082L19.3121 12.8038M19.5508 11.9082C19.6757 11.4394 20.1892 11.1955 20.6285 11.3965L20.9198 11.5298C21.7401 11.9052 22.1705 12.8221 21.9373 13.6977L21.5855 15.0165C21.067 16.963 20.8076 17.9362 20.3064 18.6316C20.0157 19.035 19.4118 19.4866 18.9408 19.8036C18.5333 20.0778 18.221 20.4807 18.0941 20.957L17.8162 22M14.4462 9.57264L15.9972 3.75113C16.1949 3.00918 15.7571 2.24654 15.0194 2.04774C14.2817 1.84893 13.5234 2.28924 13.3258 3.03119L10.9485 11.9537L9.89349 10.1091C9.43058 9.29977 8.37226 9.07701 7.62507 9.63163C7.05334 10.056 6.83812 10.8163 7.10185 11.48L9.21015 16.4621C9.61353 17.4153 9.6232 18.7195 9.35662 19.7202\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"iconVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '12px 12px' }\" />\n            <motion.path d=\"M9.87528 4.63991C9.87528 4.63991 10.121 2.41922 9.87528 2.17714M9.87528 2.17714C9.55651 1.86316 7.33465 2.12746 7.33465 2.12746M9.87528 2.17714L6.90286 5.11918M2.10921 7.36943C2.10921 7.36943 1.86349 9.59012 2.10921 9.8322M2.10921 9.8322C2.42797 10.1462 4.64983 9.88188 4.64983 9.88188M2.10921 9.8322L5.08162 6.89017\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"iconVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '12px 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"
    }
  ]
}
