{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "case-sensitive",
  "type": "registry:ui",
  "title": "case-sensitive",
  "description": "Animated case sensitive icon for Vue",
  "dependencies": [
    "motion-v"
  ],
  "files": [
    {
      "path": "components/ui/case-sensitive.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: 'CaseSensitiveIcon' })\n\nwithDefaults(\n  defineProps<{\n    size?: number\n  }>(),\n  { size: 28 },\n)\n\n// after copy-01: the nested parts of the case sensitive separate in depth and stack again\n// generated from @hugeicons/core-free-icons\nconst frontVariants: Variants = {\n  normal: {\n    transform: 'translate(0px, 0px)',\n  },\n  animate: {\n    transform: ['translate(0px, 0px)', 'translate(1.34px, -1.15px)', 'translate(0.19px, -0.19px)', 'translate(0px, 0px)'],\n    transition: {\n      duration: 0.49,\n      ease: [0.23, 1, 0.32, 1],\n    },\n  },\n}\n\nconst fileVariants: Variants = {\n  normal: {\n    transform: 'translateY(0px) rotate(0deg)',\n  },\n  animate: {\n    transform: ['translateY(0px) rotate(0deg)', 'translateY(-0.76px) rotate(-0.95deg)', 'translateY(0.43px) rotate(0.48deg)', 'translateY(0px) rotate(0deg)'],\n    transition: {\n      duration: 0.55,\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=\"M21.5 10V17M21.5 13.5C21.5 15.433 19.933 17 18 17C16.067 17 14.5 15.433 14.5 13.5C14.5 11.567 16.067 10 18 10C19.933 10 21.5 11.567 21.5 13.5Z\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"frontVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '18px 13.5px' }\" />\n            <motion.path d=\"M5.12734 10.0987L5.82827 10.3655V10.3655L5.12734 10.0987ZM1.79908 16.7332C1.6517 17.1203 1.84605 17.5536 2.23316 17.7009C2.62027 17.8483 3.05355 17.654 3.20092 17.2668L2.5 17L1.79908 16.7332ZM10.7991 17.2668C10.9464 17.654 11.3797 17.8483 11.7668 17.7009C12.154 17.5536 12.3483 17.1203 12.2009 16.7332L11.5 17L10.7991 17.2668ZM8.87266 10.0987L8.17173 10.3655V10.3655L8.87266 10.0987ZM4 13.25C3.58579 13.25 3.25 13.5858 3.25 14C3.25 14.4142 3.58579 14.75 4 14.75V14V13.25ZM10 14.75C10.4142 14.75 10.75 14.4142 10.75 14C10.75 13.5858 10.4142 13.25 10 13.25V14V14.75ZM5.12734 10.0987L4.42642 9.83181L1.79908 16.7332L2.5 17L3.20092 17.2668L5.82827 10.3655L5.12734 10.0987ZM11.5 17L12.2009 16.7332L9.57358 9.83181L8.87266 10.0987L8.17173 10.3655L10.7991 17.2668L11.5 17ZM5.12734 10.0987L5.82827 10.3655C6.23034 9.30935 6.50423 8.59494 6.75631 8.13531C7.02854 7.63894 7.10953 7.75 7 7.75V7V6.25C6.19747 6.25 5.73535 6.87751 5.44111 7.41402C5.12672 7.98727 4.81078 8.8222 4.42642 9.83181L5.12734 10.0987ZM8.87266 10.0987L9.57358 9.83181C9.18922 8.82219 8.87328 7.98727 8.55889 7.41402C8.26465 6.87751 7.80253 6.25 7 6.25V7V7.75C6.89047 7.75 6.97146 7.63894 7.24369 8.13531C7.49577 8.59494 7.76966 9.30934 8.17173 10.3655L8.87266 10.0987ZM4 14V14.75H10V14V13.25H4V14Z\" fill=\"currentColor\" :variants=\"fileVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '7px 12.05px' }\" />\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"
    }
  ]
}
