1 | {"version":3,"names":["_tools","require","_react","_interopRequireWildcard","_reactNative","_configureMotion","_Constants","_MotionPressable","_useTransformOrigin","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_extends","assign","target","i","arguments","length","source","apply","TransformKeys","x","y","scale","scaleX","scaleY","skewX","skewY","perspective","rotate","rotateX","rotateY","rotateZ","matrix","OtherNativeKeys","opacity","DefaultValues","DefaultTransition","type","duration","DefaultTransitionTime","Eases","linear","Easing","easeIn","ease","easeInOut","inOut","easeOut","out","circIn","circle","circInOut","circOut","backIn","back","backInOut","backOut","addKeysToSet","Set","undefined","keys","add","createMotionComponent","Component","forwardRef","MotionComponent","_ref","ref","animate","animateProps","initial","initialProps","exit","transition","transformOrigin","style","styleProp","onLayout","onLayoutProp","whileTap","whileHover","onAnimationComplete","rest","refAnims","useRef","animKeysSet","values","pressed","hovered","useContext","ContextPressable","animKeys","animValues","map","update","anims","current","useNativeDriver","every","_ref2","_ref3","isProp","value","valueInitial","isStr","isString","isArr","isArray","startValue","animValue","Animated","Value","valueInterp","toValue","fromInterp","from","interpolation","interpolate","inputRange","outputRange","transitionForKey","config","timing","isNumber","easing","animOptions","requestAnimationFrame","callback","loop","animation","spring","iterations","start","useMemo","animProps","transforms","entries","forEach","_ref4","push","transform","_ref5","useTransformOrigin","createElement","createMotionAnimatedComponent","component","createAnimatedComponent"],"sources":["createMotionComponent.tsx"],"sourcesContent":["import { isArray, isNumber, isString } from '@legendapp/tools';\nimport React, { ComponentPropsWithRef, ComponentType, forwardRef, ReactElement, Ref, useContext, useMemo, useRef } from 'react';\nimport { Animated, Easing, StyleProp, TransformsStyle } from 'react-native';\nimport { config } from './configureMotion';\nimport { DefaultTransitionTime } from './Constants';\nimport type {\n ComponentStyle,\n EaseFunction,\n MotionComponentProps,\n MotionTransition,\n MotionTransitionTween,\n PropsTransforms,\n UnionToIntersection,\n} from './Interfaces';\nimport { ContextPressable } from './MotionPressable';\nimport { useTransformOrigin } from './useTransformOrigin';\n\ninterface AnimInfo {\n animValue: Animated.Value;\n value: any;\n valueInterp?: number;\n interpolation?: any;\n}\n\nconst TransformKeys: Record<keyof PropsTransforms, keyof UnionToIntersection<TransformsStyle['transform'][number]>> = {\n x: 'translateX',\n y: 'translateY',\n scale: 'scale',\n scaleX: 'scaleX',\n scaleY: 'scaleY',\n skewX: 'skewX',\n skewY: 'skewY',\n perspective: 'perspective',\n rotate: 'rotate',\n rotateX: 'rotateX',\n rotateY: 'rotateY',\n rotateZ: 'rotateZ',\n matrix: 'matrix',\n};\n\nconst OtherNativeKeys = {\n opacity: 'opacity',\n} as const;\n\nconst DefaultValues: Record<keyof PropsTransforms | keyof typeof OtherNativeKeys, any> = {\n x: 0,\n y: 0,\n scale: 1,\n scaleX: 1,\n scaleY: 1,\n skewX: '0deg',\n skewY: '0deg',\n perspective: 0,\n rotate: '0deg',\n rotateX: '0deg',\n rotateY: '0deg',\n rotateZ: '0deg',\n matrix: [],\n opacity: 1,\n};\n\nconst DefaultTransition: MotionTransition = { type: 'tween', duration: DefaultTransitionTime };\nconst Eases: Record<EaseFunction, (value: number) => number> = {\n linear: Easing.linear,\n easeIn: Easing.ease,\n easeInOut: Easing.inOut(Easing.ease),\n easeOut: Easing.out(Easing.ease),\n circIn: Easing.circle,\n circInOut: Easing.inOut(Easing.circle),\n circOut: Easing.out(Easing.circle),\n backIn: Easing.back(2),\n backInOut: Easing.inOut(Easing.back(2)),\n backOut: Easing.out(Easing.back(2)),\n};\n\nfunction addKeysToSet(...objs: Record<string, any>[]) {\n const set = new Set<string>();\n for (let i = 0; i < objs.length; i++) {\n const obj = objs[i];\n if (obj) {\n const keys = Object.keys(obj);\n for (let i = 0; i < keys.length; i++) {\n set.add(keys[i]);\n }\n }\n }\n return set;\n}\n\nexport function createMotionComponent<T extends ComponentType<any>, TExtraProps = {}>(Component: Animated.AnimatedComponent<T> | T) {\n return forwardRef(function MotionComponent<TAnimate, TAnimateProps>(\n {\n animate,\n animateProps,\n initial,\n initialProps,\n exit,\n transition,\n transformOrigin,\n style: styleProp,\n onLayout: onLayoutProp,\n whileTap,\n whileHover,\n onAnimationComplete,\n ...rest\n }: Animated.AnimatedProps<ComponentPropsWithRef<T & TExtraProps>> &\n MotionComponentProps<T, ComponentStyle<T>, TAnimate, TAnimateProps>,\n // @ts-ignore\n ref: Ref<InstanceType<T>>\n ) {\n const refAnims = useRef<Partial<Record<string, AnimInfo>>>({});\n\n // Generate the arrays of keys and values for transitioning. These are used as deps of useMemo\n // so that it will update whenever a key or value changes.\n const animKeysSet = addKeysToSet(initial, animate, animateProps, whileTap, whileHover, exit);\n const values = Object.assign({}, animate);\n\n if (animateProps) {\n addKeysToSet(animKeysSet, animateProps);\n Object.assign(values, animateProps);\n }\n\n if (whileTap || whileHover) {\n const { pressed, hovered } = useContext(ContextPressable);\n\n if (whileHover) {\n addKeysToSet(animKeysSet, whileHover);\n if (hovered) {\n Object.assign(values, whileHover);\n }\n }\n if (whileTap) {\n addKeysToSet(animKeysSet, whileTap);\n if (pressed) {\n Object.assign(values, whileTap);\n }\n }\n }\n\n if (exit) {\n addKeysToSet(animKeysSet, exit);\n }\n\n const animKeys = [...animKeysSet];\n const animValues = animKeys.map((key) => values[key]);\n\n const update = () => {\n const anims = refAnims.current;\n\n const useNativeDriver = !animateProps && animKeys.every((key) => !!OtherNativeKeys[key] || !!TransformKeys[key]);\n\n for (let i = 0; i < animKeys.length; i++) {\n const key = animKeys[i];\n const isProp = animateProps?.[key] !== undefined;\n let value = values[key];\n const valueInitial = (isProp ? initialProps?.[key] : initial?.[key]) ?? value ?? DefaultValues[key];\n if (value === undefined) {\n value = valueInitial ?? DefaultValues[key];\n }\n\n if (!anims[key] || anims[key].value !== value) {\n const isStr = isString(valueInitial);\n const isArr = isArray(valueInitial);\n\n // If this is the first run or it's a new key, create the Animated.Value\n if (!anims[key]) {\n const startValue = isStr || isArr ? 1 : (valueInitial as number);\n const animValue = new Animated.Value(startValue);\n anims[key] = {\n value: valueInitial,\n animValue,\n valueInterp: isStr ? 1 : undefined,\n };\n }\n\n let toValue: number;\n // If string or array it needs to interpolate, so toggle back and forth between 0 and 1,\n // interpolating from current value to target value\n if (isStr || isArr) {\n const fromInterp = anims[key].valueInterp;\n const from = anims[key].value;\n anims[key].interpolation = anims[key].animValue.interpolate({\n inputRange: [0, 1],\n outputRange: fromInterp === 1 ? [value, from] : [from, value],\n });\n anims[key].valueInterp = toValue = 1 - fromInterp;\n anims[key].value = value;\n } else {\n anims[key].value = toValue = value as number;\n }\n\n // Get the transition for this key, the 'default' key, the root transition, or default transition if no transition prop\n const transitionForKey: MotionTransition =\n transition?.[key] || transition?.['default'] || transition || DefaultTransition;\n\n if (\n config.timing === 's' &&\n transitionForKey !== DefaultTransition &&\n isNumber((transitionForKey as MotionTransitionTween).duration)\n ) {\n (transitionForKey as MotionTransitionTween).duration *= 1000;\n }\n\n if (isString((transitionForKey as MotionTransitionTween).easing)) {\n (transitionForKey as MotionTransitionTween).easing =\n Eases[(transitionForKey as MotionTransitionTween).easing as unknown as EaseFunction];\n }\n if (isString((transitionForKey as MotionTransitionTween).ease)) {\n (transitionForKey as MotionTransitionTween).ease =\n Eases[(transitionForKey as MotionTransitionTween).ease as unknown as EaseFunction];\n }\n\n const animOptions = Object.assign(\n {\n toValue,\n useNativeDriver,\n },\n transitionForKey\n );\n\n // This typeof check is to make it work when rendered server-side like in Next.js\n if (typeof requestAnimationFrame !== 'undefined') {\n requestAnimationFrame(() => {\n const callback = onAnimationComplete ? () => onAnimationComplete(key) : undefined;\n const { loop, type } = transitionForKey;\n\n let animation: Animated.CompositeAnimation;\n\n // Spring or timing based on the transition prop\n if (type === 'spring') {\n animation = Animated.spring(anims[key].animValue, animOptions);\n } else {\n animation = Animated.timing(anims[key].animValue, animOptions as Animated.TimingAnimationConfig);\n }\n\n // Loop based on the transition prop\n if (loop !== undefined) {\n animation = Animated.loop(animation, { iterations: loop });\n }\n\n animation.start(callback);\n });\n }\n }\n }\n };\n\n useMemo(update, animValues); // eslint-disable-line react-hooks/exhaustive-deps\n\n // Apply the animations to the style object\n const style: StyleProp<any> = {};\n const animProps = {};\n const transforms: { key: string; value: AnimInfo }[] = [];\n Object.entries(refAnims.current).forEach(([key, value]) => {\n if (animateProps?.[key] !== undefined) {\n animProps[key] = value.interpolation || value.animValue;\n } else if (TransformKeys[key]) {\n transforms.push({ key, value });\n } else {\n style[key] = value.interpolation || value.animValue;\n }\n });\n\n // Map the transforms into an Animated transforms array\n if (transforms.length) {\n style.transform = transforms.map(({ key, value }) => ({\n [TransformKeys[key]]: value.interpolation || value.animValue,\n }));\n }\n\n const onLayout = transformOrigin ? useTransformOrigin(transformOrigin, style.transform, onLayoutProp) : onLayoutProp;\n\n // @ts-ignore\n return <Component style={[styleProp, style]} onLayout={onLayout} {...rest} {...animProps} ref={ref} />;\n }) as <TAnimate, TAnimateProps>(\n p: Animated.AnimatedProps<ComponentPropsWithRef<T>> &\n TExtraProps &\n MotionComponentProps<T, ComponentStyle<T>, TAnimate, TAnimateProps>,\n // @ts-ignore\n ref: Ref<InstanceType<T>>\n ) => ReactElement;\n}\nexport function createMotionAnimatedComponent<T extends ComponentType<any>>(component: T) {\n return createMotionComponent(Animated.createAnimatedComponent(component));\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,gBAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AAUA,IAAAM,gBAAA,GAAAN,OAAA;AACA,IAAAO,mBAAA,GAAAP,OAAA;AAA0D,SAAAQ,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAA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