{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "ampersands",
  "type": "registry:ui",
  "title": "ampersands",
  "description": "Animated ampersands icon for Vue",
  "dependencies": [
    "motion-v"
  ],
  "files": [
    {
      "path": "components/ui/ampersands.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: 'AmpersandsIcon' })\n\nwithDefaults(\n  defineProps<{\n    size?: number\n  }>(),\n  { size: 28 },\n)\n\n// the left mark tightens first, then the right one answers\n// authored from scripts/authored\nconst leftVariants: Variants = {\n  normal: { transform: 'scale(1) rotate(0deg)' },\n  animate: {\n    transform: [\n      'scale(1) rotate(0deg)',\n      'scale(0.88) rotate(-8deg)',\n      'scale(1.06) rotate(2deg)',\n      'scale(1) rotate(0deg)',\n    ],\n    transition: { duration: 0.6, times: [0, 0.34, 0.7, 1], ease: [0.23, 1, 0.32, 1] },\n  },\n};\n\nconst rightVariants: Variants = {\n  normal: { transform: 'scale(1) rotate(0deg)' },\n  animate: {\n    transform: [\n      'scale(1) rotate(0deg)',\n      'scale(0.88) rotate(8deg)',\n      'scale(1.06) rotate(-2deg)',\n      'scale(1) rotate(0deg)',\n    ],\n    transition: { duration: 0.6, delay: 0.12, times: [0, 0.34, 0.7, 1], ease: [0.23, 1, 0.32, 1] },\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=\"M8.34419 17.5472C8.64637 17.8305 9.121 17.8151 9.4043 17.513C9.68759 17.2108 9.67228 16.7361 9.3701 16.4528L8.85714 17L8.34419 17.5472ZM10 12.75C10.4142 12.75 10.75 12.4142 10.75 12C10.75 11.5858 10.4142 11.25 10 11.25V12V12.75ZM8.74055 13.135L8.00597 12.9837L8.74055 13.135ZM8.83427 12.7037L9.55059 12.9259L8.83427 12.7037ZM9.69182 12.0048L9.76497 12.7512L9.69182 12.0048ZM8.85714 17C9.3701 16.4528 9.37014 16.4529 9.37015 16.4529C9.37012 16.4529 9.37011 16.4529 9.37006 16.4528C9.36996 16.4527 9.36977 16.4525 9.36948 16.4523C9.36892 16.4517 9.36799 16.4509 9.36671 16.4497C9.36415 16.4473 9.36018 16.4435 9.35483 16.4385C9.34415 16.4284 9.32799 16.4131 9.30672 16.3928C9.26418 16.3524 9.20122 16.2922 9.12076 16.2143C8.95981 16.0587 8.72906 15.8327 8.45181 15.5535C7.89655 14.9944 7.15839 14.2254 6.42221 13.3818C5.68329 12.5352 4.96032 11.6293 4.42635 10.7949C4.15948 10.3779 3.94896 9.99292 3.80708 9.65301C3.66221 9.30592 3.60714 9.04867 3.60714 8.875H2.85714H2.10714C2.10714 9.32633 2.23957 9.79174 2.42283 10.2308C2.60907 10.677 2.86731 11.1416 3.16294 11.6035C3.75397 12.527 4.531 13.4961 5.29207 14.3682C6.0559 15.2434 6.81773 16.0368 7.38748 16.6105C7.67273 16.8978 7.91072 17.1308 8.0779 17.2925C8.1615 17.3734 8.22745 17.4364 8.2728 17.4796C8.29548 17.5012 8.31301 17.5178 8.32503 17.5291C8.33104 17.5348 8.33567 17.5391 8.33888 17.5422C8.34048 17.5437 8.34173 17.5448 8.34262 17.5457C8.34306 17.5461 8.34341 17.5464 8.34368 17.5467C8.34381 17.5468 8.34394 17.5469 8.344 17.547C8.34411 17.5471 8.34419 17.5472 8.85714 17ZM2.85714 8.875H3.60714C3.60714 8.189 4.10071 7.75 4.57143 7.75V7V6.25C3.1486 6.25 2.10714 7.48993 2.10714 8.875H2.85714ZM4.57143 7V7.75C5.04215 7.75 5.53571 8.189 5.53571 8.875H6.28571H7.03571C7.03571 7.48993 5.99426 6.25 4.57143 6.25V7ZM6.28571 8.875H5.53571C5.53571 9.13299 5.35498 9.4067 4.98669 9.67524C4.8182 9.79811 4.64494 9.89337 4.51139 9.95829C4.44561 9.99026 4.39195 10.0137 4.35663 10.0284C4.33903 10.0357 4.32617 10.0408 4.31885 10.0437C4.31519 10.0451 4.31293 10.0459 4.31218 10.0462C4.3118 10.0464 4.3118 10.0464 4.31219 10.0462C4.31238 10.0462 4.31267 10.0461 4.31306 10.0459C4.31326 10.0458 4.31348 10.0458 4.31372 10.0457C4.31384 10.0456 4.31405 10.0455 4.31411 10.0455C4.31432 10.0454 4.31453 10.0454 4.57143 10.75C4.82833 11.4546 4.82855 11.4545 4.82879 11.4545C4.82888 11.4544 4.82912 11.4543 4.82929 11.4543C4.82964 11.4541 4.83002 11.454 4.83042 11.4539C4.83123 11.4536 4.83214 11.4532 4.83316 11.4529C4.83519 11.4521 4.83765 11.4512 4.84052 11.4501C4.84625 11.4479 4.85362 11.4451 4.86252 11.4417C4.8803 11.4348 4.90428 11.4252 4.93355 11.413C4.99198 11.3887 5.07225 11.3535 5.16718 11.3073C5.35506 11.216 5.61037 11.0769 5.87045 10.8873C6.35931 10.5308 7.03571 9.86701 7.03571 8.875H6.28571ZM8.74055 13.135L8.00597 12.9837C7.62531 14.8317 6.27928 16.25 4.57143 16.25V17V17.75C7.22206 17.75 9.00326 15.5771 9.47513 13.2863L8.74055 13.135ZM4.57143 17V16.25C3.62733 16.25 2.75 15.3913 2.75 14.1875H2H1.25C1.25 16.0903 2.67521 17.75 4.57143 17.75V17ZM2 14.1875H2.75C2.75 13.2275 3.23436 12.5596 3.77168 12.1025C4.04106 11.8734 4.31349 11.7074 4.51911 11.5992C4.6211 11.5454 4.70439 11.5071 4.75955 11.4832C4.78706 11.4712 4.80737 11.4629 4.81928 11.4582C4.82523 11.4559 4.82907 11.4544 4.83063 11.4538C4.83141 11.4535 4.83162 11.4534 4.83124 11.4536C4.83105 11.4536 4.83072 11.4538 4.83023 11.4539C4.82999 11.454 4.82971 11.4541 4.82939 11.4542C4.82923 11.4543 4.82897 11.4544 4.82889 11.4544C4.82861 11.4545 4.82833 11.4546 4.57143 10.75C4.31453 10.0454 4.31423 10.0455 4.31391 10.0456C4.31379 10.0456 4.31347 10.0458 4.31323 10.0458C4.31276 10.046 4.31224 10.0462 4.31169 10.0464C4.31058 10.0468 4.30931 10.0473 4.30789 10.0478C4.30504 10.0489 4.30156 10.0502 4.29748 10.0517C4.28931 10.0548 4.2787 10.0589 4.26582 10.0641C4.24006 10.0743 4.20513 10.0886 4.16233 10.1072C4.07686 10.1443 3.95926 10.1987 3.82017 10.2719C3.54365 10.4176 3.17323 10.6423 2.79975 10.96C2.05136 11.5966 1.25 12.6475 1.25 14.1875H2ZM8.74055 13.135L9.47513 13.2863C9.50183 13.1567 9.52088 13.0643 9.53508 12.9981C9.54215 12.9652 9.54723 12.9425 9.55084 12.9272C9.55521 12.9087 9.55484 12.9122 9.55059 12.9259L8.83427 12.7037L8.11795 12.4814C8.08919 12.5741 8.05215 12.7595 8.00597 12.9837L8.74055 13.135ZM10 12V11.25C9.8532 11.25 9.71449 11.249 9.61867 11.2583L9.69182 12.0048L9.76497 12.7512C9.75447 12.7522 9.76012 12.7511 9.80833 12.7505C9.85205 12.75 9.91152 12.75 10 12.75V12ZM8.83427 12.7037L9.55059 12.9259C9.59117 12.7951 9.62408 12.7778 9.61459 12.7856C9.60509 12.7933 9.62867 12.7645 9.76497 12.7512L9.69182 12.0048L9.61867 11.2583C9.29065 11.2905 8.95457 11.3884 8.66694 11.6228C8.37932 11.8572 8.21562 12.1667 8.11795 12.4814L8.83427 12.7037Z\" fill=\"currentColor\" :variants=\"leftVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '6px 12px' }\" />\n            <motion.path d=\"M20.3442 17.5472C20.6464 17.8305 21.121 17.8151 21.4043 17.513C21.6876 17.2108 21.6723 16.7361 21.3701 16.4528L20.8571 17L20.3442 17.5472ZM22 12.75C22.4142 12.75 22.75 12.4142 22.75 12C22.75 11.5858 22.4142 11.25 22 11.25V12V12.75ZM20.7406 13.135L20.006 12.9837L20.7406 13.135ZM20.8343 12.7037L21.5506 12.9259L20.8343 12.7037ZM21.6918 12.0048L21.765 12.7512L21.6918 12.0048ZM20.8571 17C21.3701 16.4528 21.3701 16.4529 21.3701 16.4529C21.3701 16.4529 21.3701 16.4529 21.3701 16.4528C21.37 16.4527 21.3698 16.4525 21.3695 16.4523C21.3689 16.4517 21.368 16.4509 21.3667 16.4497C21.3642 16.4473 21.3602 16.4435 21.3548 16.4385C21.3441 16.4284 21.328 16.4131 21.3067 16.3928C21.2642 16.3524 21.2012 16.2922 21.1208 16.2143C20.9598 16.0587 20.7291 15.8327 20.4518 15.5535C19.8966 14.9944 19.1584 14.2254 18.4222 13.3818C17.6833 12.5352 16.9603 11.6293 16.4263 10.7949C16.1595 10.3779 15.949 9.99292 15.8071 9.65301C15.6622 9.30592 15.6071 9.04867 15.6071 8.875H14.8571H14.1071C14.1071 9.32633 14.2396 9.79174 14.4228 10.2308C14.6091 10.677 14.8673 11.1416 15.1629 11.6035C15.754 12.527 16.531 13.4961 17.2921 14.3682C18.0559 15.2434 18.8177 16.0368 19.3875 16.6105C19.6727 16.8978 19.9107 17.1308 20.0779 17.2925C20.1615 17.3734 20.2275 17.4364 20.2728 17.4796C20.2955 17.5012 20.313 17.5178 20.325 17.5291C20.331 17.5348 20.3357 17.5391 20.3389 17.5422C20.3405 17.5437 20.3417 17.5448 20.3426 17.5457C20.3431 17.5461 20.3434 17.5464 20.3437 17.5467C20.3438 17.5468 20.3439 17.5469 20.344 17.547C20.3441 17.5471 20.3442 17.5472 20.8571 17ZM14.8571 8.875H15.6071C15.6071 8.189 16.1007 7.75 16.5714 7.75V7V6.25C15.1486 6.25 14.1071 7.48993 14.1071 8.875H14.8571ZM16.5714 7V7.75C17.0421 7.75 17.5357 8.189 17.5357 8.875H18.2857H19.0357C19.0357 7.48993 17.9943 6.25 16.5714 6.25V7ZM18.2857 8.875H17.5357C17.5357 9.13299 17.355 9.4067 16.9867 9.67524C16.8182 9.79811 16.6449 9.89337 16.5114 9.95829C16.4456 9.99026 16.3919 10.0137 16.3566 10.0284C16.339 10.0357 16.3262 10.0408 16.3188 10.0437C16.3152 10.0451 16.3129 10.0459 16.3122 10.0462C16.3118 10.0464 16.3118 10.0464 16.3122 10.0462C16.3124 10.0462 16.3127 10.0461 16.3131 10.0459C16.3133 10.0458 16.3135 10.0458 16.3137 10.0457C16.3138 10.0456 16.314 10.0455 16.3141 10.0455C16.3143 10.0454 16.3145 10.0454 16.5714 10.75C16.8283 11.4546 16.8286 11.4545 16.8288 11.4545C16.8289 11.4544 16.8291 11.4543 16.8293 11.4543C16.8296 11.4541 16.83 11.454 16.8304 11.4539C16.8312 11.4536 16.8321 11.4532 16.8332 11.4529C16.8352 11.4521 16.8377 11.4512 16.8405 11.4501C16.8462 11.4479 16.8536 11.4451 16.8625 11.4417C16.8803 11.4348 16.9043 11.4252 16.9336 11.413C16.992 11.3887 17.0722 11.3535 17.1672 11.3073C17.3551 11.216 17.6104 11.0769 17.8705 10.8873C18.3593 10.5308 19.0357 9.86701 19.0357 8.875H18.2857ZM20.7406 13.135L20.006 12.9837C19.6253 14.8317 18.2793 16.25 16.5714 16.25V17V17.75C19.2221 17.75 21.0033 15.5771 21.4751 13.2863L20.7406 13.135ZM16.5714 17V16.25C15.6273 16.25 14.75 15.3913 14.75 14.1875H14H13.25C13.25 16.0903 14.6752 17.75 16.5714 17.75V17ZM14 14.1875H14.75C14.75 13.2275 15.2344 12.5596 15.7717 12.1025C16.0411 11.8734 16.3135 11.7074 16.5191 11.5992C16.6211 11.5454 16.7044 11.5071 16.7595 11.4832C16.7871 11.4712 16.8074 11.4629 16.8193 11.4582C16.8252 11.4559 16.8291 11.4544 16.8306 11.4538C16.8314 11.4535 16.8316 11.4534 16.8312 11.4536C16.8311 11.4536 16.8307 11.4538 16.8302 11.4539C16.83 11.454 16.8297 11.4541 16.8294 11.4542C16.8292 11.4543 16.829 11.4544 16.8289 11.4544C16.8286 11.4545 16.8283 11.4546 16.5714 10.75C16.3145 10.0454 16.3142 10.0455 16.3139 10.0456C16.3138 10.0456 16.3135 10.0458 16.3132 10.0458C16.3128 10.046 16.3122 10.0462 16.3117 10.0464C16.3106 10.0468 16.3093 10.0473 16.3079 10.0478C16.305 10.0489 16.3016 10.0502 16.2975 10.0517C16.2893 10.0548 16.2787 10.0589 16.2658 10.0641C16.2401 10.0743 16.2051 10.0886 16.1623 10.1072C16.0769 10.1443 15.9593 10.1987 15.8202 10.2719C15.5437 10.4176 15.1732 10.6423 14.7997 10.96C14.0514 11.5966 13.25 12.6475 13.25 14.1875H14ZM20.7406 13.135L21.4751 13.2863C21.5018 13.1567 21.5209 13.0643 21.5351 12.9981C21.5422 12.9652 21.5472 12.9425 21.5508 12.9272C21.5552 12.9087 21.5548 12.9122 21.5506 12.9259L20.8343 12.7037L20.118 12.4814C20.0892 12.5741 20.0522 12.7595 20.006 12.9837L20.7406 13.135ZM22 12V11.25C21.8532 11.25 21.7145 11.249 21.6187 11.2583L21.6918 12.0048L21.765 12.7512C21.7545 12.7522 21.7601 12.7511 21.8083 12.7505C21.852 12.75 21.9115 12.75 22 12.75V12ZM20.8343 12.7037L21.5506 12.9259C21.5912 12.7951 21.6241 12.7778 21.6146 12.7856C21.6051 12.7933 21.6287 12.7645 21.765 12.7512L21.6918 12.0048L21.6187 11.2583C21.2906 11.2905 20.9546 11.3884 20.6669 11.6228C20.3793 11.8572 20.2156 12.1667 20.118 12.4814L20.8343 12.7037Z\" fill=\"currentColor\" :variants=\"rightVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '18px 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"
    }
  ]
}
