{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "archive-off-03",
  "type": "registry:ui",
  "title": "archive-off-03",
  "description": "Animated archive off icon for Vue",
  "dependencies": [
    "motion-v"
  ],
  "files": [
    {
      "path": "components/ui/archive-off-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: 'ArchiveOff03Icon' })\n\nwithDefaults(\n  defineProps<{\n    size?: number\n  }>(),\n  { size: 28 },\n)\n\n// the slash cuts the box, and the lid and body go dim\n// authored from scripts/authored\nconst barVariants: Variants = {\n  normal: { pathLength: 1, pathOffset: 0, visibility: 'visible' },\n  animate: {\n    pathLength: [1, 0.001, 0.001, 1],\n    visibility: ['visible', 'hidden', 'hidden', 'visible'],\n    transition: {\n      duration: 0.82,\n      times: [0, 0.16, 0.24, 1],\n      ease: [\n        'linear',\n        'linear',\n        [0.23, 1, 0.32, 1],\n      ],\n    },\n  },\n};\n\nconst boxVariants: Variants = {\n  normal: { transform: 'scale(1)', opacity: 1 },\n  animate: {\n    transform: ['scale(1)', 'scale(1)', 'scale(0.96)', 'scale(1)'],\n    opacity: [1, 1, 0.38, 1],\n    transition: {\n      duration: 0.82,\n      delay: 0.04,\n      times: [0, 0.28, 0.54, 1],\n      ease: [\n        [0.23, 1, 0.32, 1],\n        [0.23, 1, 0.32, 1],\n        [0.77, 0, 0.175, 1],\n      ],\n    },\n  },\n};\n\nconst lidVariants: Variants = {\n  normal: { transform: 'scale(1)', opacity: 1 },\n  animate: {\n    transform: ['scale(1)', 'scale(1)', 'scale(0.94)', 'scale(1)'],\n    opacity: [1, 1, 0.32, 1],\n    transition: {\n      duration: 0.82,\n      delay: 0.08,\n      times: [0, 0.28, 0.54, 1],\n      ease: [\n        [0.23, 1, 0.32, 1],\n        [0.23, 1, 0.32, 1],\n        [0.77, 0, 0.175, 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=\"visible\">\n            <motion.path d=\"M2 2L22 22\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"barVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '12px 12px' }\" />\n            <motion.path d=\"M20 9V16M4 9V16C4 18.8284 4 20.2426 4.87868 21.1213C5.75736 22 7.17157 22 10 22H14C16.8284 22 18.2426 22 19.1213 21.1213C19.4634 20.7793 19.6723 20.3561 19.7999 19.7999\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"boxVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '12px 15.5px' }\" />\n            <motion.path d=\"M8 4H19.5C20.4346 4 20.9019 4 21.25 4.20096C21.478 4.33261 21.6674 4.52197 21.799 4.75C22 5.09808 22 5.56538 22 6.5C22 7.43462 22 7.90192 21.799 8.25C21.6674 8.47803 21.478 8.66739 21.25 8.79904C20.9019 9 20.4346 9 19.5 9H13M9 9H4.5C3.56538 9 3.09808 9 2.75 8.79904C2.52197 8.66739 2.33261 8.47803 2.20096 8.25C2 7.90192 2 7.43462 2 6.5C2 5.56538 2 5.09808 2.20096 4.75C2.33261 4.52197 2.52197 4.33261 2.75 4.20096C3.0296 4.03954 3.38613 4.00778 4 4.00153\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"lidVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '12px 6.5px' }\" />\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"
    }
  ]
}
