{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "airplane-landing",
  "type": "registry:ui",
  "title": "airplane-landing",
  "description": "Animated airplane landing icon for Vue",
  "dependencies": [
    "motion-v"
  ],
  "files": [
    {
      "path": "components/ui/airplane-landing.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: 'AirplaneLandingIcon' })\n\nwithDefaults(\n  defineProps<{\n    size?: number\n  }>(),\n  { size: 28 },\n)\n\n// a long approach, a float in the flare, then a firm touchdown that ripples the strip twice\n// authored from scripts/authored\nconst runwayVariants: Variants = {\n  normal: { transform: 'scaleX(1)' },\n  animate: {\n    transform: ['scaleX(1)', 'scaleX(1)', 'scaleX(0.92)', 'scaleX(1.03)', 'scaleX(0.97)', 'scaleX(1)'],\n    transition: { duration: 1.24, times: [0, 0.7, 0.8, 0.87, 0.94, 1], ease: [0.23, 1, 0.32, 1] },\n  },\n};\n\nconst airlinerVariants: Variants = {\n  normal: { transform: 'translate(0%, 0%) rotate(0deg)' },\n  animate: {\n    transform: [\n      'translate(0%, 0%) rotate(0deg)',\n      'translate(-10%, -16%) rotate(5.5deg)',\n      'translate(-10%, -16%) rotate(5.5deg)',\n      'translate(-3%, -5%) rotate(2deg)',\n      'translate(-1.6%, -1.4%) rotate(0.6deg)',\n      'translate(0%, 0%) rotate(0deg)',\n    ],\n    transition: {\n      duration: 1.24,\n      times: [0, 0.26, 0.34, 0.6, 0.8, 1],\n      ease: [\n        [0.23, 1, 0.32, 1],\n        'linear',\n        [0.77, 0, 0.175, 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=\"hidden\">\n            <motion.path d=\"M6.00146 19.9982H22.0015\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"runwayVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '14px 20px' }\" />\n            <motion.path d=\"M3.69749 4.0419C3.07958 4.21042 3.00748 4.9179 2.82748 5.5179C2.67702 6.08216 2.3591 7.33035 2.14285 8.1831C1.98148 8.9379 1.95988 9.2379 2.05588 9.7179C2.28148 10.6179 3.06148 10.9719 4.74148 11.4399C5.58616 11.6559 6.18148 11.8371 7.08148 12.0771C7.23596 12.1265 7.71601 12.2476 8.10148 12.3519C8.46148 12.4779 8.76148 12.4419 8.69428 12.7179C8.64746 12.8276 8.10388 13.4379 7.59988 13.9779C7.26148 14.3979 7.03348 14.4998 7.03348 14.8179C7.03348 14.8179 7.02148 15.2979 7.69425 15.3579C7.80148 15.4179 9.24148 15.7779 9.78148 15.9339C10.5015 16.1139 11.0415 15.8979 11.4855 15.5979L13.6815 14.1579C14.1615 13.9419 14.2815 14.0331 14.8215 14.1771L19.6215 15.4779C20.4615 15.7779 21.1815 15.0579 20.9703 14.2179C20.7015 12.7179 20.2215 11.8179 19.4415 10.8579C18.1815 9.3579 16.6453 8.7727 15.5415 8.5779C15.0378 8.48901 13.144 8.33923 11.3415 8.2059C9.49393 8.06924 7.74222 7.94901 7.68148 7.8579C6.36148 7.5579 6.76948 5.6199 6.20548 4.7739C5.98148 4.4379 5.58148 4.3779 4.98148 4.1979C4.47299 4.06773 4.09616 3.93317 3.69749 4.0419Z\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"1.5\" :variants=\"airlinerVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '11.6px 10px' }\" />\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"
    }
  ]
}
