{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "prayer-rug-01",
  "type": "registry:ui",
  "title": "prayer-rug-01",
  "description": "Animated prayer rug icon for Vue",
  "dependencies": [
    "motion-v"
  ],
  "files": [
    {
      "path": "components/ui/prayer-rug-01.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: 'PrayerRug01Icon' })\n\nwithDefaults(\n  defineProps<{\n    size?: number\n  }>(),\n  { size: 28 },\n)\n\n// after home-01: the posture settles into a slow held breath\n// generated from @hugeicons/core-free-icons\nconst seatVariants: Variants = {\n  normal: {\n    transform: 'translateY(0px) scaleY(1)',\n  },\n  animate: {\n    transform: ['translateY(0px) scaleY(1)', 'translateY(-0.56px) scaleY(1.04)', 'translateY(1.31px) scaleY(0.86)', 'translateY(-0.14px) scaleY(1.02)', 'translateY(0px) scaleY(1)'],\n    transition: {\n      duration: 0.66,\n      times: [0, 0.18, 0.48, 0.78, 1],\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=\"M5 21L16 21C17.8856 21 18.8284 21 19.4142 20.4142C20 19.8284 20 18.8856 20 17L20 11C20 9.11438 20 8.17157 19.4142 7.58579C18.8284 7 17.8856 7 16 7L8 7\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"seatVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '12.5px 21px' }\" />\n            <motion.path d=\"M8 21H4C2.89543 21 2 20.1046 2 19M2 19C2 17.8954 2.89543 17 4 17C5.88562 17 6.82843 17 7.41421 16.4142C8 15.8284 8 14.8856 8 13V8C8 6.11438 8 5.17157 7.41421 4.58579C6.82843 4 5.88562 4 4 4C2.89543 4 2 4.89543 2 6V19Z\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"1.5\" :variants=\"seatVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '12.5px 21px' }\" />\n            <motion.path d=\"M11 16.3569H11.331C11.6209 16.3569 11.7658 16.3569 11.888 16.3856C12.0102 16.4144 12.2427 16.5307 12.7077 16.7634C14.3103 17.5655 15.3792 16.1625 16.3037 15.0273C16.7679 14.4572 17 14.1722 17 13.9999C17 13.8277 16.7679 13.5427 16.3036 12.9726C15.3792 11.8374 14.3103 10.4345 12.7077 11.2366C12.2427 11.4693 12.0102 11.5856 11.888 11.6144C11.7658 11.6431 11.6209 11.6431 11.331 11.6431L11 11.6431\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"seatVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '12.5px 21px' }\" />\n            <motion.path d=\"M20 16L22 16\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"seatVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '12.5px 21px' }\" />\n            <motion.path d=\"M20 20L22 20\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"seatVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '12.5px 21px' }\" />\n            <motion.path d=\"M20 12L22 12\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"seatVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '12.5px 21px' }\" />\n            <motion.path d=\"M20 8L22 8\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"seatVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '12.5px 21px' }\" />\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"
    }
  ]
}
