{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "engine-slash",
  "type": "registry:ui",
  "title": "engine-slash",
  "description": "Animated engine slash icon for Vue",
  "dependencies": [
    "motion-v"
  ],
  "files": [
    {
      "path": "components/ui/engine-slash.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: 'EngineSlashIcon' })\n\nwithDefaults(\n  defineProps<{\n    size?: number\n  }>(),\n  { size: 28 },\n)\n\n// after notification-off-01: the slash cuts through and the rest of the glyph recoils\n// generated from @hugeicons/core-free-icons\nconst iconVariants: Variants = {\n  normal: {\n    transform: 'rotate(0deg) translateY(0px)',\n    opacity: 1,\n  },\n  animate: {\n    transform: ['rotate(0deg) translateY(0px)', 'rotate(-7.75deg) translateY(0.39px)', 'rotate(0deg) translateY(1.16px)', 'rotate(0deg) translateY(0px)'],\n    opacity: [1, 1, 0.55, 1],\n    transition: {\n      duration: 0.67,\n      ease: [0.77, 0, 0.175, 1],\n    },\n  },\n}\n\nconst markVariants: Variants = {\n  normal: {\n    transform: 'scale(1) rotate(0deg)',\n  },\n  animate: {\n    transform: ['scale(1) rotate(0deg)', 'scale(0.86) rotate(-2.11deg)', 'scale(1.08) rotate(0.85deg)', 'scale(1) rotate(0deg)'],\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=\"M2 9V15\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"iconVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '2px 12px' }\" />\n            <motion.path d=\"M10.5 8H13C13.9319 8 14.3978 8 14.7654 8.15224C15.2554 8.35523 15.6448 8.74458 15.8478 9.23463C16 9.60218 16 10.0681 16 11H19V9.5C19 9.03406 19 8.80109 19.0761 8.61732C19.1776 8.37229 19.3723 8.17761 19.6173 8.07612C19.8011 8 20.0341 8 20.5 8C20.9659 8 21.1989 8 21.3827 8.07612C21.6277 8.17761 21.8224 8.37229 21.9239 8.61732C22 8.80109 22 9.03406 22 9.5V16.5C22 16.9659 22 17.1989 21.9239 17.3827C21.8224 17.6277 21.6277 17.8224 21.3827 17.9239C21.2794 17.9667 21.1606 17.9854 20.9936 17.9936M17 14H19V16M7.04635 8.04635C6.37065 8.10797 5.92008 8.25149 5.58579 8.58579C5 9.17157 5 10.1144 5 12V13.8593C5 14.9072 5 15.4312 5.23665 15.8733C5.4733 16.3155 5.90927 16.6062 6.7812 17.1875L6.9923 17.3282C7.49247 17.6616 7.74255 17.8284 8.02598 17.9142C8.30941 18 8.60998 18 9.2111 18H12C13.8856 18 14.8284 18 15.4142 17.4142C15.5858 17.2426 15.7071 17.0404 15.7929 16.7929\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"iconVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '13.5px 13px' }\" />\n            <motion.path d=\"M5 12H2\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"iconVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '3.5px 12px' }\" />\n            <motion.path d=\"M10.5 8V5\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"iconVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '10.5px 6.5px' }\" />\n            <motion.path d=\"M8 5H14\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"iconVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '11px 5px' }\" />\n            <motion.path d=\"M2 3L22 23\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"markVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '12px 13px' }\" />\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"
    }
  ]
}
