{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "lamp-wall-up",
  "type": "registry:ui",
  "title": "lamp-wall-up",
  "description": "Animated lamp wall up icon for Vue",
  "dependencies": [
    "motion-v"
  ],
  "files": [
    {
      "path": "components/ui/lamp-wall-up.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: 'LampWallUpIcon' })\n\nwithDefaults(\n  defineProps<{\n    size?: number\n  }>(),\n  { size: 28 },\n)\n\n// after fire: the filament comes up to brightness and holds\n// generated from @hugeicons/core-free-icons\nconst iconVariants: Variants = {\n  normal: {\n    transform: 'scale(1) rotate(0deg)',\n  },\n  animate: {\n    transform: ['scale(1) rotate(0deg)', 'scale(1.08) rotate(-2.82deg)', 'scale(0.96) rotate(1.88deg)', 'scale(1.04) rotate(-0.94deg)', 'scale(1) rotate(0deg)'],\n    transition: {\n      duration: 0.53,\n      ease: [0.77, 0, 0.175, 1],\n    },\n  },\n}\n\nconst controls = useAnimationControls()\nconst { onMouseEnter, onMouseLeave, startAnimation, stopAnimation } = useIconAnimation({\n  controls,\n  loops: true,\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 7H19\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"iconVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '14px 12px' }\" />\n            <motion.path d=\"M8.65943 12H19.3406C20.2571 12 21 11.2571 21 10.3406C21 10.1159 20.9544 9.89349 20.8659 9.68694L19.039 5.42433C18.5351 4.24853 18.2832 3.66064 17.7822 3.33032C17.2813 3 16.6417 3 15.3624 3H12.6376C11.3584 3 10.7188 3 10.2178 3.33032C9.7169 3.66064 9.46495 4.24853 8.96104 5.42432L7.1342 9.68694C7.04568 9.89349 7.00003 10.1159 7.00003 10.3406C7.00003 11.2571 7.74297 12 8.65943 12Z\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"iconVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '14px 12px' }\" />\n            <motion.path d=\"M3.00003 19.6667V16.3333C3.00003 16.0233 3.00003 15.8683 3.0341 15.7412C3.12657 15.3961 3.39612 15.1265 3.74121 15.0341C3.86838 15 4.02337 15 4.33336 15C4.95334 15 5.26334 15 5.51767 15.0681C6.20785 15.2531 6.74695 15.7922 6.93188 16.4824C7.00003 16.7367 7.00003 17.0467 7.00003 17.6667V18.3333C7.00003 18.9533 7.00003 19.2633 6.93188 19.5176C6.74695 20.2078 6.20785 20.7469 5.51767 20.9319C5.26334 21 4.95334 21 4.33336 21C4.02337 21 3.86838 21 3.74121 20.9659C3.39612 20.8735 3.12657 20.6039 3.0341 20.2588C3.00003 20.1317 3.00003 19.9767 3.00003 19.6667Z\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"iconVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '14px 12px' }\" />\n            <motion.path d=\"M7.00003 18H8.00003C10.8285 18 12.2427 18 13.1214 17.1213C14 16.2426 14 14.8284 14 12\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"iconVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '14px 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"
    }
  ]
}
