framer-motion
Version:
A simple and powerful JavaScript animation library
1 lines • 1.08 kB
Source Map (JSON)
{"version":3,"file":"is-controlling-variants.mjs","sources":["../../../../src/render/utils/is-controlling-variants.ts"],"sourcesContent":["import { isAnimationControls } from \"../../animation/utils/is-animation-controls\"\nimport { MotionProps } from \"../../motion/types\"\nimport { isVariantLabel } from \"./is-variant-label\"\nimport { variantProps } from \"./variant-props\"\n\nexport function isControllingVariants(props: MotionProps) {\n return (\n isAnimationControls(props.animate) ||\n variantProps.some((name) =>\n isVariantLabel(props[name as keyof typeof props])\n )\n )\n}\n\nexport function isVariantNode(props: MotionProps) {\n return Boolean(isControllingVariants(props) || props.variants)\n}\n"],"names":[],"mappings":";;;;AAKM,SAAU,qBAAqB,CAAC,KAAkB,EAAA;AACpD,IAAA,QACI,mBAAmB,CAAC,KAAK,CAAC,OAAO,CAAC;AAClC,QAAA,YAAY,CAAC,IAAI,CAAC,CAAC,IAAI,KACnB,cAAc,CAAC,KAAK,CAAC,IAA0B,CAAC,CAAC,CACpD,EACJ;AACL,CAAC;AAEK,SAAU,aAAa,CAAC,KAAkB,EAAA;IAC5C,OAAO,OAAO,CAAC,qBAAqB,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,CAAA;AAClE;;;;"}