react-native-reanimated 3.0.1 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Common/cpp/Fabric/FabricUtils.h +1 -1
- package/Common/cpp/NativeModules/NativeReanimatedModule.cpp +38 -27
- package/Common/cpp/SharedItems/Shareables.h +22 -0
- package/Common/cpp/Tools/PlatformDepMethodsHolder.h +2 -0
- package/Common/cpp/Tools/RuntimeDecorator.cpp +4 -1
- package/Common/cpp/Tools/RuntimeDecorator.h +2 -1
- package/Common/cpp/Tools/SingleInstanceChecker.h +14 -2
- package/RNReanimated.podspec +5 -2
- package/android/CMakeLists.txt +4 -0
- package/android/build.gradle +18 -10
- package/android/src/main/cpp/NativeProxy.cpp +316 -337
- package/android/src/main/cpp/NativeProxy.h +53 -11
- package/android/src/main/java/com/swmansion/reanimated/NativeMethodsHelper.java +7 -12
- package/android/src/main/java/com/swmansion/reanimated/NodesManager.java +11 -8
- package/android/src/main/java/com/swmansion/reanimated/nativeProxy/NativeProxyCommon.java +21 -14
- package/android/src/paper/java/com/swmansion/reanimated/NativeProxy.java +0 -3
- package/ios/Fabric/REAInitializerRCTFabricSurface.mm +1 -0
- package/ios/REANodesManager.h +1 -0
- package/ios/REANodesManager.mm +30 -4
- package/ios/keyboardObserver/REAKeyboardEventObserver.m +51 -130
- package/ios/native/NativeMethods.mm +1 -1
- package/ios/native/NativeProxy.mm +4 -1
- package/ios/native/REAIOSErrorHandler.mm +1 -1
- package/ios/native/REAIOSLogger.mm +1 -1
- package/ios/native/REAIOSScheduler.mm +1 -1
- package/ios/native/REAInitializer.mm +1 -1
- package/ios/native/REAMessageThread.mm +2 -2
- package/lib/commonjs/Animated.js +0 -8
- package/lib/commonjs/Animated.js.map +1 -1
- package/lib/commonjs/ConfigHelper.js +8 -19
- package/lib/commonjs/ConfigHelper.js.map +1 -1
- package/lib/commonjs/createAnimatedComponent.js +20 -158
- package/lib/commonjs/createAnimatedComponent.js.map +1 -1
- package/lib/commonjs/index.js +0 -9
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/index.web.js +0 -7
- package/lib/commonjs/index.web.js.map +1 -1
- package/lib/commonjs/reanimated2/Bezier.js +14 -34
- package/lib/commonjs/reanimated2/Bezier.js.map +1 -1
- package/lib/commonjs/reanimated2/Colors.js +60 -132
- package/lib/commonjs/reanimated2/Colors.js.map +1 -1
- package/lib/commonjs/reanimated2/Easing.js +81 -34
- package/lib/commonjs/reanimated2/Easing.js.map +1 -1
- package/lib/commonjs/reanimated2/NativeMethods.js +8 -20
- package/lib/commonjs/reanimated2/NativeMethods.js.map +1 -1
- package/lib/commonjs/reanimated2/NativeReanimated/NativeReanimated.js +5 -31
- package/lib/commonjs/reanimated2/NativeReanimated/NativeReanimated.js.map +1 -1
- package/lib/commonjs/reanimated2/NativeReanimated/index.js +0 -7
- package/lib/commonjs/reanimated2/NativeReanimated/index.js.map +1 -1
- package/lib/commonjs/reanimated2/PlatformChecker.js +0 -6
- package/lib/commonjs/reanimated2/PlatformChecker.js.map +1 -1
- package/lib/commonjs/reanimated2/PropAdapters.js +10 -12
- package/lib/commonjs/reanimated2/PropAdapters.js.map +1 -1
- package/lib/commonjs/reanimated2/UpdateProps.js +3 -12
- package/lib/commonjs/reanimated2/UpdateProps.js.map +1 -1
- package/lib/commonjs/reanimated2/ViewDescriptorsSet.js +0 -10
- package/lib/commonjs/reanimated2/ViewDescriptorsSet.js.map +1 -1
- package/lib/commonjs/reanimated2/WorkletEventHandler.js +5 -22
- package/lib/commonjs/reanimated2/WorkletEventHandler.js.map +1 -1
- package/lib/commonjs/reanimated2/animation/decay.js +7 -18
- package/lib/commonjs/reanimated2/animation/decay.js.map +1 -1
- package/lib/commonjs/reanimated2/animation/delay.js +0 -11
- package/lib/commonjs/reanimated2/animation/delay.js.map +1 -1
- package/lib/commonjs/reanimated2/animation/index.js +0 -8
- package/lib/commonjs/reanimated2/animation/index.js.map +1 -1
- package/lib/commonjs/reanimated2/animation/repeat.js +6 -22
- package/lib/commonjs/reanimated2/animation/repeat.js.map +1 -1
- package/lib/commonjs/reanimated2/animation/sequence.js +3 -20
- package/lib/commonjs/reanimated2/animation/sequence.js.map +1 -1
- package/lib/commonjs/reanimated2/animation/spring.js +11 -23
- package/lib/commonjs/reanimated2/animation/spring.js.map +1 -1
- package/lib/commonjs/reanimated2/animation/styleAnimation.js +3 -35
- package/lib/commonjs/reanimated2/animation/styleAnimation.js.map +1 -1
- package/lib/commonjs/reanimated2/animation/timing.js +0 -11
- package/lib/commonjs/reanimated2/animation/timing.js.map +1 -1
- package/lib/commonjs/reanimated2/animation/util.js +11 -41
- package/lib/commonjs/reanimated2/animation/util.js.map +1 -1
- package/lib/commonjs/reanimated2/commonTypes.js +16 -23
- package/lib/commonjs/reanimated2/commonTypes.js.map +1 -1
- package/lib/commonjs/reanimated2/component/FlatList.js +0 -16
- package/lib/commonjs/reanimated2/component/FlatList.js.map +1 -1
- package/lib/commonjs/reanimated2/component/Image.js +0 -4
- package/lib/commonjs/reanimated2/component/Image.js.map +1 -1
- package/lib/commonjs/reanimated2/component/ScrollView.js +0 -4
- package/lib/commonjs/reanimated2/component/ScrollView.js.map +1 -1
- package/lib/commonjs/reanimated2/component/Text.js +0 -4
- package/lib/commonjs/reanimated2/component/Text.js.map +1 -1
- package/lib/commonjs/reanimated2/component/View.js +0 -4
- package/lib/commonjs/reanimated2/component/View.js.map +1 -1
- package/lib/commonjs/reanimated2/core.js +6 -48
- package/lib/commonjs/reanimated2/core.js.map +1 -1
- package/lib/commonjs/reanimated2/errors.js +3 -14
- package/lib/commonjs/reanimated2/errors.js.map +1 -1
- package/lib/commonjs/reanimated2/fabricUtils.js +3 -5
- package/lib/commonjs/reanimated2/fabricUtils.js.map +1 -1
- package/lib/commonjs/reanimated2/fabricUtils.web.js +1 -3
- package/lib/commonjs/reanimated2/fabricUtils.web.js.map +1 -1
- package/lib/commonjs/reanimated2/frameCallback/FrameCallbackRegistryJS.js +3 -12
- package/lib/commonjs/reanimated2/frameCallback/FrameCallbackRegistryJS.js.map +1 -1
- package/lib/commonjs/reanimated2/frameCallback/FrameCallbackRegistryUI.js +13 -17
- package/lib/commonjs/reanimated2/frameCallback/FrameCallbackRegistryUI.js.map +1 -1
- package/lib/commonjs/reanimated2/globals.d.js.map +1 -1
- package/lib/commonjs/reanimated2/hook/Hooks.js +0 -5
- package/lib/commonjs/reanimated2/hook/Hooks.js.map +1 -1
- package/lib/commonjs/reanimated2/hook/commonTypes.js.map +1 -1
- package/lib/commonjs/reanimated2/hook/index.js +0 -12
- package/lib/commonjs/reanimated2/hook/index.js.map +1 -1
- package/lib/commonjs/reanimated2/hook/useAnimatedGestureHandler.js +4 -17
- package/lib/commonjs/reanimated2/hook/useAnimatedGestureHandler.js.map +1 -1
- package/lib/commonjs/reanimated2/hook/useAnimatedKeyboard.js +2 -9
- package/lib/commonjs/reanimated2/hook/useAnimatedKeyboard.js.map +1 -1
- package/lib/commonjs/reanimated2/hook/useAnimatedReaction.js +1 -11
- package/lib/commonjs/reanimated2/hook/useAnimatedReaction.js.map +1 -1
- package/lib/commonjs/reanimated2/hook/useAnimatedRef.js +0 -12
- package/lib/commonjs/reanimated2/hook/useAnimatedRef.js.map +1 -1
- package/lib/commonjs/reanimated2/hook/useAnimatedScrollHandler.js +2 -9
- package/lib/commonjs/reanimated2/hook/useAnimatedScrollHandler.js.map +1 -1
- package/lib/commonjs/reanimated2/hook/useAnimatedSensor.js +8 -23
- package/lib/commonjs/reanimated2/hook/useAnimatedSensor.js.map +1 -1
- package/lib/commonjs/reanimated2/hook/useAnimatedStyle.js +13 -71
- package/lib/commonjs/reanimated2/hook/useAnimatedStyle.js.map +1 -1
- package/lib/commonjs/reanimated2/hook/useDerivedValue.js +4 -13
- package/lib/commonjs/reanimated2/hook/useDerivedValue.js.map +1 -1
- package/lib/commonjs/reanimated2/hook/useFrameCallback.js +0 -5
- package/lib/commonjs/reanimated2/hook/useFrameCallback.js.map +1 -1
- package/lib/commonjs/reanimated2/hook/useScrollViewOffset.js +0 -7
- package/lib/commonjs/reanimated2/hook/useScrollViewOffset.js.map +1 -1
- package/lib/commonjs/reanimated2/hook/useSharedValue.js +2 -7
- package/lib/commonjs/reanimated2/hook/useSharedValue.js.map +1 -1
- package/lib/commonjs/reanimated2/hook/utils.js +8 -39
- package/lib/commonjs/reanimated2/hook/utils.js.map +1 -1
- package/lib/commonjs/reanimated2/index.js +0 -26
- package/lib/commonjs/reanimated2/index.js.map +1 -1
- package/lib/commonjs/reanimated2/initializers.js +21 -43
- package/lib/commonjs/reanimated2/initializers.js.map +1 -1
- package/lib/commonjs/reanimated2/interpolateColor.js +6 -43
- package/lib/commonjs/reanimated2/interpolateColor.js.map +1 -1
- package/lib/commonjs/reanimated2/interpolation.js +14 -29
- package/lib/commonjs/reanimated2/interpolation.js.map +1 -1
- package/lib/commonjs/reanimated2/jestUtils.js +11 -44
- package/lib/commonjs/reanimated2/jestUtils.js.map +1 -1
- package/lib/commonjs/reanimated2/js-reanimated/JSReanimated.js +15 -39
- package/lib/commonjs/reanimated2/js-reanimated/JSReanimated.js.map +1 -1
- package/lib/commonjs/reanimated2/js-reanimated/Mapper.js +9 -28
- package/lib/commonjs/reanimated2/js-reanimated/Mapper.js.map +1 -1
- package/lib/commonjs/reanimated2/js-reanimated/MapperRegistry.js +7 -37
- package/lib/commonjs/reanimated2/js-reanimated/MapperRegistry.js.map +1 -1
- package/lib/commonjs/reanimated2/js-reanimated/MutableValue.js +5 -18
- package/lib/commonjs/reanimated2/js-reanimated/MutableValue.js.map +1 -1
- package/lib/commonjs/reanimated2/js-reanimated/global.js +2 -9
- package/lib/commonjs/reanimated2/js-reanimated/global.js.map +1 -1
- package/lib/commonjs/reanimated2/js-reanimated/index.js +3 -14
- package/lib/commonjs/reanimated2/js-reanimated/index.js.map +1 -1
- package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/BaseAnimationBuilder.js +7 -26
- package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/BaseAnimationBuilder.js.map +1 -1
- package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/ComplexAnimationBuilder.js +3 -49
- package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/ComplexAnimationBuilder.js.map +1 -1
- package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/Keyframe.js +7 -43
- package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/Keyframe.js.map +1 -1
- package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/commonTypes.js +4 -5
- package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/commonTypes.js.map +1 -1
- package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/index.js +0 -4
- package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/index.js.map +1 -1
- package/lib/commonjs/reanimated2/layoutReanimation/animationsManager.js +4 -23
- package/lib/commonjs/reanimated2/layoutReanimation/animationsManager.js.map +1 -1
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Bounce.js +3 -74
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Bounce.js.map +1 -1
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Fade.js +3 -53
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Fade.js.map +1 -1
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Flip.js +3 -63
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Flip.js.map +1 -1
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.js +7 -26
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.js.map +1 -1
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Pinwheel.js +3 -13
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Pinwheel.js.map +1 -1
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Roll.js +3 -23
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Roll.js.map +1 -1
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Rotate.js +3 -43
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Rotate.js.map +1 -1
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Slide.js +3 -43
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Slide.js.map +1 -1
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Stretch.js +3 -23
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Stretch.js.map +1 -1
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Zoom.js +3 -83
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Zoom.js.map +1 -1
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/index.js +0 -20
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/index.js.map +1 -1
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/CurvedTransition.js +3 -22
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/CurvedTransition.js.map +1 -1
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.js +5 -29
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.js.map +1 -1
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/FadingTransition.js +3 -9
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/FadingTransition.js.map +1 -1
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/JumpingTransition.js +5 -11
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/JumpingTransition.js.map +1 -1
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/LinearTransition.js +3 -8
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/LinearTransition.js.map +1 -1
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/SequencedTransition.js +3 -12
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/SequencedTransition.js.map +1 -1
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/index.js +0 -12
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/index.js.map +1 -1
- package/lib/commonjs/reanimated2/layoutReanimation/index.js +0 -9
- package/lib/commonjs/reanimated2/layoutReanimation/index.js.map +1 -1
- package/lib/commonjs/reanimated2/layoutReanimation/sharedTransitions/index.js +3 -17
- package/lib/commonjs/reanimated2/layoutReanimation/sharedTransitions/index.js.map +1 -1
- package/lib/commonjs/reanimated2/mappers.js +26 -32
- package/lib/commonjs/reanimated2/mappers.js.map +1 -1
- package/lib/commonjs/reanimated2/mock.js +5 -15
- package/lib/commonjs/reanimated2/mock.js.map +1 -1
- package/lib/commonjs/reanimated2/mutables.js +2 -28
- package/lib/commonjs/reanimated2/mutables.js.map +1 -1
- package/lib/commonjs/reanimated2/platform-specific/RNRenderer.js +0 -2
- package/lib/commonjs/reanimated2/platform-specific/RNRenderer.js.map +1 -1
- package/lib/commonjs/reanimated2/platform-specific/RNRenderer.web.js.map +1 -1
- package/lib/commonjs/reanimated2/platform-specific/checkCppVersion.js +31 -0
- package/lib/commonjs/reanimated2/platform-specific/checkCppVersion.js.map +1 -0
- package/lib/commonjs/reanimated2/platform-specific/checkVersion.web.js +0 -2
- package/lib/commonjs/reanimated2/platform-specific/checkVersion.web.js.map +1 -1
- package/lib/commonjs/reanimated2/platform-specific/jsVersion.js +14 -0
- package/lib/commonjs/reanimated2/platform-specific/jsVersion.js.map +1 -0
- package/lib/commonjs/reanimated2/pluginUtils.js +0 -1
- package/lib/commonjs/reanimated2/pluginUtils.js.map +1 -1
- package/lib/commonjs/reanimated2/shareables.js +92 -49
- package/lib/commonjs/reanimated2/shareables.js.map +1 -1
- package/lib/commonjs/reanimated2/threads.js +42 -46
- package/lib/commonjs/reanimated2/threads.js.map +1 -1
- package/lib/commonjs/reanimated2/utils.js +0 -5
- package/lib/commonjs/reanimated2/utils.js.map +1 -1
- package/lib/commonjs/reanimated2/valueSetter.js +6 -21
- package/lib/commonjs/reanimated2/valueSetter.js.map +1 -1
- package/lib/commonjs/setAndForwardRef.js +3 -3
- package/lib/commonjs/setAndForwardRef.js.map +1 -1
- package/lib/module/Animated.js.map +1 -1
- package/lib/module/ConfigHelper.js +9 -15
- package/lib/module/ConfigHelper.js.map +1 -1
- package/lib/module/createAnimatedComponent.js +20 -139
- package/lib/module/createAnimatedComponent.js.map +1 -1
- package/lib/module/index.js +0 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/index.web.js.map +1 -1
- package/lib/module/reanimated2/Bezier.js +14 -33
- package/lib/module/reanimated2/Bezier.js.map +1 -1
- package/lib/module/reanimated2/Colors.js +59 -109
- package/lib/module/reanimated2/Colors.js.map +1 -1
- package/lib/module/reanimated2/Easing.js +37 -33
- package/lib/module/reanimated2/Easing.js.map +1 -1
- package/lib/module/reanimated2/NativeMethods.js +8 -15
- package/lib/module/reanimated2/NativeMethods.js.map +1 -1
- package/lib/module/reanimated2/NativeReanimated/NativeReanimated.js +5 -27
- package/lib/module/reanimated2/NativeReanimated/NativeReanimated.js.map +1 -1
- package/lib/module/reanimated2/NativeReanimated/index.js +0 -2
- package/lib/module/reanimated2/NativeReanimated/index.js.map +1 -1
- package/lib/module/reanimated2/PlatformChecker.js.map +1 -1
- package/lib/module/reanimated2/PropAdapters.js +12 -10
- package/lib/module/reanimated2/PropAdapters.js.map +1 -1
- package/lib/module/reanimated2/UpdateProps.js +3 -5
- package/lib/module/reanimated2/UpdateProps.js.map +1 -1
- package/lib/module/reanimated2/ViewDescriptorsSet.js +0 -6
- package/lib/module/reanimated2/ViewDescriptorsSet.js.map +1 -1
- package/lib/module/reanimated2/WorkletEventHandler.js +5 -18
- package/lib/module/reanimated2/WorkletEventHandler.js.map +1 -1
- package/lib/module/reanimated2/animation/decay.js +7 -15
- package/lib/module/reanimated2/animation/decay.js.map +1 -1
- package/lib/module/reanimated2/animation/delay.js +0 -9
- package/lib/module/reanimated2/animation/delay.js.map +1 -1
- package/lib/module/reanimated2/animation/index.js.map +1 -1
- package/lib/module/reanimated2/animation/repeat.js +6 -20
- package/lib/module/reanimated2/animation/repeat.js.map +1 -1
- package/lib/module/reanimated2/animation/sequence.js +3 -18
- package/lib/module/reanimated2/animation/sequence.js.map +1 -1
- package/lib/module/reanimated2/animation/spring.js +11 -21
- package/lib/module/reanimated2/animation/spring.js.map +1 -1
- package/lib/module/reanimated2/animation/styleAnimation.js +7 -31
- package/lib/module/reanimated2/animation/styleAnimation.js.map +1 -1
- package/lib/module/reanimated2/animation/timing.js +0 -8
- package/lib/module/reanimated2/animation/timing.js.map +1 -1
- package/lib/module/reanimated2/animation/util.js +10 -33
- package/lib/module/reanimated2/animation/util.js.map +1 -1
- package/lib/module/reanimated2/commonTypes.js +12 -19
- package/lib/module/reanimated2/commonTypes.js.map +1 -1
- package/lib/module/reanimated2/component/FlatList.js +0 -4
- package/lib/module/reanimated2/component/FlatList.js.map +1 -1
- package/lib/module/reanimated2/component/Image.js.map +1 -1
- package/lib/module/reanimated2/component/ScrollView.js.map +1 -1
- package/lib/module/reanimated2/component/Text.js.map +1 -1
- package/lib/module/reanimated2/component/View.js.map +1 -1
- package/lib/module/reanimated2/core.js +6 -22
- package/lib/module/reanimated2/core.js.map +1 -1
- package/lib/module/reanimated2/errors.js +3 -13
- package/lib/module/reanimated2/errors.js.map +1 -1
- package/lib/module/reanimated2/fabricUtils.js +3 -3
- package/lib/module/reanimated2/fabricUtils.js.map +1 -1
- package/lib/module/reanimated2/fabricUtils.web.js +1 -1
- package/lib/module/reanimated2/fabricUtils.web.js.map +1 -1
- package/lib/module/reanimated2/frameCallback/FrameCallbackRegistryJS.js +3 -8
- package/lib/module/reanimated2/frameCallback/FrameCallbackRegistryJS.js.map +1 -1
- package/lib/module/reanimated2/frameCallback/FrameCallbackRegistryUI.js +13 -15
- package/lib/module/reanimated2/frameCallback/FrameCallbackRegistryUI.js.map +1 -1
- package/lib/module/reanimated2/globals.d.js.map +1 -1
- package/lib/module/reanimated2/hook/Hooks.js +3 -2
- package/lib/module/reanimated2/hook/Hooks.js.map +1 -1
- package/lib/module/reanimated2/hook/commonTypes.js.map +1 -1
- package/lib/module/reanimated2/hook/index.js.map +1 -1
- package/lib/module/reanimated2/hook/useAnimatedGestureHandler.js +3 -14
- package/lib/module/reanimated2/hook/useAnimatedGestureHandler.js.map +1 -1
- package/lib/module/reanimated2/hook/useAnimatedKeyboard.js +2 -5
- package/lib/module/reanimated2/hook/useAnimatedKeyboard.js.map +1 -1
- package/lib/module/reanimated2/hook/useAnimatedReaction.js +1 -7
- package/lib/module/reanimated2/hook/useAnimatedReaction.js.map +1 -1
- package/lib/module/reanimated2/hook/useAnimatedRef.js +0 -6
- package/lib/module/reanimated2/hook/useAnimatedRef.js.map +1 -1
- package/lib/module/reanimated2/hook/useAnimatedScrollHandler.js +2 -7
- package/lib/module/reanimated2/hook/useAnimatedScrollHandler.js.map +1 -1
- package/lib/module/reanimated2/hook/useAnimatedSensor.js +9 -20
- package/lib/module/reanimated2/hook/useAnimatedSensor.js.map +1 -1
- package/lib/module/reanimated2/hook/useAnimatedStyle.js +13 -59
- package/lib/module/reanimated2/hook/useAnimatedStyle.js.map +1 -1
- package/lib/module/reanimated2/hook/useDerivedValue.js +4 -8
- package/lib/module/reanimated2/hook/useDerivedValue.js.map +1 -1
- package/lib/module/reanimated2/hook/useFrameCallback.js.map +1 -1
- package/lib/module/reanimated2/hook/useScrollViewOffset.js +0 -1
- package/lib/module/reanimated2/hook/useScrollViewOffset.js.map +1 -1
- package/lib/module/reanimated2/hook/useSharedValue.js +2 -3
- package/lib/module/reanimated2/hook/useSharedValue.js.map +1 -1
- package/lib/module/reanimated2/hook/utils.js +8 -21
- package/lib/module/reanimated2/hook/utils.js.map +1 -1
- package/lib/module/reanimated2/index.js.map +1 -1
- package/lib/module/reanimated2/initializers.js +23 -37
- package/lib/module/reanimated2/initializers.js.map +1 -1
- package/lib/module/reanimated2/interpolateColor.js +5 -34
- package/lib/module/reanimated2/interpolateColor.js.map +1 -1
- package/lib/module/reanimated2/interpolation.js +13 -28
- package/lib/module/reanimated2/interpolation.js.map +1 -1
- package/lib/module/reanimated2/jestUtils.js +11 -35
- package/lib/module/reanimated2/jestUtils.js.map +1 -1
- package/lib/module/reanimated2/js-reanimated/JSReanimated.js +15 -35
- package/lib/module/reanimated2/js-reanimated/JSReanimated.js.map +1 -1
- package/lib/module/reanimated2/js-reanimated/Mapper.js +9 -23
- package/lib/module/reanimated2/js-reanimated/Mapper.js.map +1 -1
- package/lib/module/reanimated2/js-reanimated/MapperRegistry.js +7 -35
- package/lib/module/reanimated2/js-reanimated/MapperRegistry.js.map +1 -1
- package/lib/module/reanimated2/js-reanimated/MutableValue.js +5 -16
- package/lib/module/reanimated2/js-reanimated/MutableValue.js.map +1 -1
- package/lib/module/reanimated2/js-reanimated/global.js +2 -6
- package/lib/module/reanimated2/js-reanimated/global.js.map +1 -1
- package/lib/module/reanimated2/js-reanimated/index.js +3 -9
- package/lib/module/reanimated2/js-reanimated/index.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/BaseAnimationBuilder.js +7 -23
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/BaseAnimationBuilder.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/ComplexAnimationBuilder.js +3 -45
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/ComplexAnimationBuilder.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/Keyframe.js +7 -39
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/Keyframe.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/commonTypes.js +3 -3
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/commonTypes.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/index.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/animationsManager.js +4 -19
- package/lib/module/reanimated2/layoutReanimation/animationsManager.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Bounce.js +3 -52
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Bounce.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Fade.js +3 -32
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Fade.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Flip.js +3 -38
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Flip.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.js +7 -16
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Pinwheel.js +3 -8
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Pinwheel.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Roll.js +3 -14
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Roll.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Rotate.js +3 -26
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Rotate.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Slide.js +3 -26
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Slide.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Stretch.js +3 -14
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Stretch.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Zoom.js +3 -50
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Zoom.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/index.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/CurvedTransition.js +3 -17
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/CurvedTransition.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.js +5 -23
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/FadingTransition.js +3 -5
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/FadingTransition.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/JumpingTransition.js +5 -6
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/JumpingTransition.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/LinearTransition.js +3 -5
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/LinearTransition.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/SequencedTransition.js +3 -8
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/SequencedTransition.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/index.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/index.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/sharedTransitions/index.js +3 -13
- package/lib/module/reanimated2/layoutReanimation/sharedTransitions/index.js.map +1 -1
- package/lib/module/reanimated2/mappers.js +26 -25
- package/lib/module/reanimated2/mappers.js.map +1 -1
- package/lib/module/reanimated2/mock.js +5 -15
- package/lib/module/reanimated2/mock.js.map +1 -1
- package/lib/module/reanimated2/mutables.js +2 -19
- package/lib/module/reanimated2/mutables.js.map +1 -1
- package/lib/module/reanimated2/platform-specific/RNRenderer.js.map +1 -1
- package/lib/module/reanimated2/platform-specific/RNRenderer.web.js.map +1 -1
- package/lib/module/reanimated2/platform-specific/checkCppVersion.js +24 -0
- package/lib/module/reanimated2/platform-specific/checkCppVersion.js.map +1 -0
- package/lib/module/reanimated2/platform-specific/checkVersion.web.js +0 -1
- package/lib/module/reanimated2/platform-specific/checkVersion.web.js.map +1 -1
- package/lib/module/reanimated2/platform-specific/jsVersion.js +7 -0
- package/lib/module/reanimated2/platform-specific/jsVersion.js.map +1 -0
- package/lib/module/reanimated2/pluginUtils.js.map +1 -1
- package/lib/module/reanimated2/shareables.js +96 -44
- package/lib/module/reanimated2/shareables.js.map +1 -1
- package/lib/module/reanimated2/threads.js +39 -33
- package/lib/module/reanimated2/threads.js.map +1 -1
- package/lib/module/reanimated2/utils.js +0 -3
- package/lib/module/reanimated2/utils.js.map +1 -1
- package/lib/module/reanimated2/valueSetter.js +6 -19
- package/lib/module/reanimated2/valueSetter.js.map +1 -1
- package/lib/module/setAndForwardRef.js +3 -2
- package/lib/module/setAndForwardRef.js.map +1 -1
- package/package.json +46 -40
- package/plugin/.eslintrc.js +7 -0
- package/plugin/README.md +241 -0
- package/plugin/build/plugin.js +714 -0
- package/plugin/build/plugin.js.map +7 -0
- package/plugin/index.js +1 -807
- package/plugin/package.json +23 -0
- package/plugin/src/buildWorkletString.ts +213 -0
- package/plugin/src/commonObjects.ts +60 -0
- package/plugin/src/injectVersion.ts +37 -0
- package/plugin/src/makeWorklet.ts +375 -0
- package/plugin/src/plugin.ts +49 -0
- package/plugin/src/processForCalleesWorklets.ts +106 -0
- package/plugin/src/processIfGestureHandlerEventCallbackFunctionNode.ts +156 -0
- package/plugin/src/processIfWorkletFunction.ts +55 -0
- package/plugin/src/processIfWorkletNode.ts +44 -0
- package/plugin/src/processInlineStylesWarning.ts +129 -0
- package/plugin/src/processWorkletObjectMethod.ts +31 -0
- package/plugin/src/types.ts +15 -0
- package/plugin/src/utils.ts +6 -0
- package/plugin/tsconfig.json +15 -0
- package/plugin/yarn.lock +2193 -0
- package/react-native-reanimated.d.ts +11 -18
- package/scripts/reanimated_utils.rb +2 -2
- package/src/createAnimatedComponent.tsx +2 -3
- package/src/reanimated2/Easing.ts +19 -0
- package/src/reanimated2/NativeMethods.ts +9 -4
- package/src/reanimated2/NativeReanimated/NativeReanimated.ts +2 -2
- package/src/reanimated2/UpdateProps.ts +2 -2
- package/src/reanimated2/animation/decay.ts +7 -1
- package/src/reanimated2/animation/styleAnimation.ts +5 -1
- package/src/reanimated2/core.ts +4 -4
- package/src/reanimated2/errors.ts +1 -0
- package/src/reanimated2/frameCallback/FrameCallbackRegistryUI.ts +12 -4
- package/src/reanimated2/globals.d.ts +71 -112
- package/src/reanimated2/hook/commonTypes.ts +1 -1
- package/src/reanimated2/hook/useAnimatedReaction.ts +2 -2
- package/src/reanimated2/hook/useAnimatedSensor.ts +2 -2
- package/src/reanimated2/initializers.ts +11 -8
- package/src/reanimated2/jestUtils.ts +0 -1
- package/src/reanimated2/js-reanimated/JSReanimated.ts +5 -1
- package/src/reanimated2/js-reanimated/index.ts +1 -1
- package/src/reanimated2/mappers.ts +26 -4
- package/src/reanimated2/mock.ts +1 -0
- package/src/reanimated2/platform-specific/checkCppVersion.ts +29 -0
- package/src/reanimated2/platform-specific/jsVersion.ts +6 -0
- package/src/reanimated2/shareables.ts +107 -8
- package/src/reanimated2/threads.ts +36 -17
- package/lib/commonjs/reanimated2/platform-specific/checkVersion.js +0 -42
- package/lib/commonjs/reanimated2/platform-specific/checkVersion.js.map +0 -1
- package/lib/module/reanimated2/platform-specific/checkVersion.js +0 -35
- package/lib/module/reanimated2/platform-specific/checkVersion.js.map +0 -1
- package/src/reanimated2/platform-specific/checkVersion.ts +0 -39
|
@@ -4,27 +4,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.CurvedTransition = void 0;
|
|
7
|
-
|
|
8
7
|
var _animationBuilder = require("../animationBuilder");
|
|
9
|
-
|
|
10
8
|
var _Easing = require("../../Easing");
|
|
11
|
-
|
|
12
9
|
var _animation = require("../../animation");
|
|
13
|
-
|
|
14
|
-
function
|
|
15
|
-
|
|
10
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
11
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
12
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
16
13
|
class CurvedTransition extends _animationBuilder.BaseAnimationBuilder {
|
|
17
14
|
constructor() {
|
|
18
15
|
super(...arguments);
|
|
19
|
-
|
|
20
16
|
_defineProperty(this, "easingXV", _Easing.Easing.in(_Easing.Easing.ease));
|
|
21
|
-
|
|
22
17
|
_defineProperty(this, "easingYV", _Easing.Easing.out(_Easing.Easing.ease));
|
|
23
|
-
|
|
24
18
|
_defineProperty(this, "easingWidthV", _Easing.Easing.in(_Easing.Easing.exp));
|
|
25
|
-
|
|
26
19
|
_defineProperty(this, "easingHeightV", _Easing.Easing.out(_Easing.Easing.exp));
|
|
27
|
-
|
|
28
20
|
_defineProperty(this, "build", () => {
|
|
29
21
|
const delayFunction = this.getDelayFunction();
|
|
30
22
|
const callback = this.callbackV;
|
|
@@ -69,52 +61,41 @@ class CurvedTransition extends _animationBuilder.BaseAnimationBuilder {
|
|
|
69
61
|
};
|
|
70
62
|
});
|
|
71
63
|
}
|
|
72
|
-
|
|
73
64
|
static createInstance() {
|
|
74
65
|
return new CurvedTransition();
|
|
75
66
|
}
|
|
76
|
-
|
|
77
67
|
static easingX(easing) {
|
|
78
68
|
const instance = this.createInstance();
|
|
79
69
|
return instance.easingX(easing);
|
|
80
70
|
}
|
|
81
|
-
|
|
82
71
|
easingX(easing) {
|
|
83
72
|
this.easingXV = easing;
|
|
84
73
|
return this;
|
|
85
74
|
}
|
|
86
|
-
|
|
87
75
|
static easingY(easing) {
|
|
88
76
|
const instance = this.createInstance();
|
|
89
77
|
return instance.easingY(easing);
|
|
90
78
|
}
|
|
91
|
-
|
|
92
79
|
easingY(easing) {
|
|
93
80
|
this.easingYV = easing;
|
|
94
81
|
return this;
|
|
95
82
|
}
|
|
96
|
-
|
|
97
83
|
static easingWidth(easing) {
|
|
98
84
|
const instance = this.createInstance();
|
|
99
85
|
return instance.easingWidth(easing);
|
|
100
86
|
}
|
|
101
|
-
|
|
102
87
|
easingWidth(easing) {
|
|
103
88
|
this.easingWidthV = easing;
|
|
104
89
|
return this;
|
|
105
90
|
}
|
|
106
|
-
|
|
107
91
|
static easingHeight(easing) {
|
|
108
92
|
const instance = this.createInstance();
|
|
109
93
|
return instance.easingHeight(easing);
|
|
110
94
|
}
|
|
111
|
-
|
|
112
95
|
easingHeight(easing) {
|
|
113
96
|
this.easingHeightV = easing;
|
|
114
97
|
return this;
|
|
115
98
|
}
|
|
116
|
-
|
|
117
99
|
}
|
|
118
|
-
|
|
119
100
|
exports.CurvedTransition = CurvedTransition;
|
|
120
101
|
//# sourceMappingURL=CurvedTransition.js.map
|
package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/CurvedTransition.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CurvedTransition","BaseAnimationBuilder","Easing","in","ease","out","exp","delayFunction","getDelayFunction","callback","callbackV","delay","getDelay","duration","durationV","easing","easingX","easingXV","easingY","easingYV","easingWidth","easingWidthV","easingHeight","easingHeightV","values","initialValues","originX","currentOriginX","originY","currentOriginY","width","currentWidth","height","currentHeight","animations","withTiming","targetOriginX","targetOriginY","targetWidth","targetHeight","createInstance","instance"],"sources":["CurvedTransition.ts"],"sourcesContent":["import {\n ILayoutAnimationBuilder,\n LayoutAnimationFunction,\n} from '../animationBuilder/commonTypes';\nimport { BaseAnimationBuilder } from '../animationBuilder';\nimport { EasingFn, Easing } from '../../Easing';\nimport { withTiming } from '../../animation';\n\nexport class CurvedTransition\n extends BaseAnimationBuilder\n implements ILayoutAnimationBuilder\n{\n easingXV: EasingFn = Easing.in(Easing.ease);\n easingYV: EasingFn = Easing.out(Easing.ease);\n easingWidthV: EasingFn = Easing.in(Easing.exp);\n easingHeightV: EasingFn = Easing.out(Easing.exp);\n static createInstance(): CurvedTransition {\n return new CurvedTransition();\n }\n\n static easingX(easing: EasingFn): CurvedTransition {\n const instance = this.createInstance();\n return instance.easingX(easing);\n }\n\n easingX(easing: EasingFn): CurvedTransition {\n this.easingXV = easing;\n return this;\n }\n\n static easingY(easing: EasingFn): CurvedTransition {\n const instance = this.createInstance();\n return instance.easingY(easing);\n }\n\n easingY(easing: EasingFn): CurvedTransition {\n this.easingYV = easing;\n return this;\n }\n\n static easingWidth(easing: EasingFn): CurvedTransition {\n const instance = this.createInstance();\n return instance.easingWidth(easing);\n }\n\n easingWidth(easing: EasingFn): CurvedTransition {\n this.easingWidthV = easing;\n return this;\n }\n\n static easingHeight(easing: EasingFn): CurvedTransition {\n const instance = this.createInstance();\n return instance.easingHeight(easing);\n }\n\n easingHeight(easing: EasingFn): CurvedTransition {\n this.easingHeightV = easing;\n return this;\n }\n\n build = (): LayoutAnimationFunction => {\n const delayFunction = this.getDelayFunction();\n const callback = this.callbackV;\n const delay = this.getDelay();\n const duration = this.durationV ?? 300;\n const easing = {\n easingX: this.easingXV,\n easingY: this.easingYV,\n easingWidth: this.easingWidthV,\n easingHeight: this.easingHeightV,\n };\n\n return (values) => {\n 'worklet';\n\n return {\n initialValues: {\n originX: values.currentOriginX,\n originY: values.currentOriginY,\n width: values.currentWidth,\n height: values.currentHeight,\n },\n animations: {\n originX: delayFunction(\n delay,\n withTiming(values.targetOriginX, {\n duration,\n easing: easing.easingX,\n })\n ),\n originY: delayFunction(\n delay,\n withTiming(values.targetOriginY, {\n duration,\n easing: easing.easingY,\n })\n ),\n width: delayFunction(\n delay,\n withTiming(values.targetWidth, {\n duration,\n easing: easing.easingWidth,\n })\n ),\n height: delayFunction(\n delay,\n withTiming(values.targetHeight, {\n duration,\n easing: easing.easingHeight,\n })\n ),\n },\n callback: callback,\n };\n };\n };\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_animationBuilder","require","_Easing","_animation","_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","CurvedTransition","BaseAnimationBuilder","constructor","arguments","Easing","in","ease","out","exp","delayFunction","getDelayFunction","callback","callbackV","delay","getDelay","duration","durationV","easing","easingX","easingXV","easingY","easingYV","easingWidth","easingWidthV","easingHeight","easingHeightV","values","initialValues","originX","currentOriginX","originY","currentOriginY","width","currentWidth","height","currentHeight","animations","withTiming","targetOriginX","targetOriginY","targetWidth","targetHeight","createInstance","instance","exports"],"sources":["CurvedTransition.ts"],"sourcesContent":["import {\n ILayoutAnimationBuilder,\n LayoutAnimationFunction,\n} from '../animationBuilder/commonTypes';\nimport { BaseAnimationBuilder } from '../animationBuilder';\nimport { EasingFn, Easing } from '../../Easing';\nimport { withTiming } from '../../animation';\n\nexport class CurvedTransition\n extends BaseAnimationBuilder\n implements ILayoutAnimationBuilder\n{\n easingXV: EasingFn = Easing.in(Easing.ease);\n easingYV: EasingFn = Easing.out(Easing.ease);\n easingWidthV: EasingFn = Easing.in(Easing.exp);\n easingHeightV: EasingFn = Easing.out(Easing.exp);\n static createInstance(): CurvedTransition {\n return new CurvedTransition();\n }\n\n static easingX(easing: EasingFn): CurvedTransition {\n const instance = this.createInstance();\n return instance.easingX(easing);\n }\n\n easingX(easing: EasingFn): CurvedTransition {\n this.easingXV = easing;\n return this;\n }\n\n static easingY(easing: EasingFn): CurvedTransition {\n const instance = this.createInstance();\n return instance.easingY(easing);\n }\n\n easingY(easing: EasingFn): CurvedTransition {\n this.easingYV = easing;\n return this;\n }\n\n static easingWidth(easing: EasingFn): CurvedTransition {\n const instance = this.createInstance();\n return instance.easingWidth(easing);\n }\n\n easingWidth(easing: EasingFn): CurvedTransition {\n this.easingWidthV = easing;\n return this;\n }\n\n static easingHeight(easing: EasingFn): CurvedTransition {\n const instance = this.createInstance();\n return instance.easingHeight(easing);\n }\n\n easingHeight(easing: EasingFn): CurvedTransition {\n this.easingHeightV = easing;\n return this;\n }\n\n build = (): LayoutAnimationFunction => {\n const delayFunction = this.getDelayFunction();\n const callback = this.callbackV;\n const delay = this.getDelay();\n const duration = this.durationV ?? 300;\n const easing = {\n easingX: this.easingXV,\n easingY: this.easingYV,\n easingWidth: this.easingWidthV,\n easingHeight: this.easingHeightV,\n };\n\n return (values) => {\n 'worklet';\n\n return {\n initialValues: {\n originX: values.currentOriginX,\n originY: values.currentOriginY,\n width: values.currentWidth,\n height: values.currentHeight,\n },\n animations: {\n originX: delayFunction(\n delay,\n withTiming(values.targetOriginX, {\n duration,\n easing: easing.easingX,\n })\n ),\n originY: delayFunction(\n delay,\n withTiming(values.targetOriginY, {\n duration,\n easing: easing.easingY,\n })\n ),\n width: delayFunction(\n delay,\n withTiming(values.targetWidth, {\n duration,\n easing: easing.easingWidth,\n })\n ),\n height: delayFunction(\n delay,\n withTiming(values.targetHeight, {\n duration,\n easing: easing.easingHeight,\n })\n ),\n },\n callback: callback,\n };\n };\n };\n}\n"],"mappings":";;;;;;AAIA,IAAAA,iBAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AAA6C,SAAAG,gBAAAC,GAAA,EAAAC,GAAA,EAAAC,KAAA,IAAAD,GAAA,GAAAE,cAAA,CAAAF,GAAA,OAAAA,GAAA,IAAAD,GAAA,IAAAI,MAAA,CAAAC,cAAA,CAAAL,GAAA,EAAAC,GAAA,IAAAC,KAAA,EAAAA,KAAA,EAAAI,UAAA,QAAAC,YAAA,QAAAC,QAAA,oBAAAR,GAAA,CAAAC,GAAA,IAAAC,KAAA,WAAAF,GAAA;AAAA,SAAAG,eAAAM,GAAA,QAAAR,GAAA,GAAAS,YAAA,CAAAD,GAAA,2BAAAR,GAAA,gBAAAA,GAAA,GAAAU,MAAA,CAAAV,GAAA;AAAA,SAAAS,aAAAE,KAAA,EAAAC,IAAA,eAAAD,KAAA,iBAAAA,KAAA,kBAAAA,KAAA,MAAAE,IA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G,OAAOA,CAACH,MAAgB,EAAoB;IAC1C,IAAI,CAACI,QAAQ,GAAGJ,MAAM;IACtB,OAAO,IAAI;EACb;EAEA,OAAOK,WAAWA,CAACL,MAAgB,EAAoB;IACrD,MAAM0B,QAAQ,GAAG,IAAI,CAACD,cAAc,EAAE;IACtC,OAAOC,QAAQ,CAACrB,WAAW,CAACL,MAAM,CAAC;EACrC;EAEAK,WAAWA,CAACL,MAAgB,EAAoB;IAC9C,IAAI,CAACM,YAAY,GAAGN,MAAM;IAC1B,OAAO,IAAI;EACb;EAEA,OAAOO,YAAYA,CAACP,MAAgB,EAAoB;IACtD,MAAM0B,QAAQ,GAAG,IAAI,CAACD,cAAc,EAAE;IACtC,OAAOC,QAAQ,CAACnB,YAAY,CAACP,MAAM,CAAC;EACtC;EAEAO,YAAYA,CAACP,MAAgB,EAAoB;IAC/C,IAAI,CAACQ,aAAa,GAAGR,MAAM;IAC3B,OAAO,IAAI;EACb;AA0DF;AAAC2B,OAAA,CAAA5C,gBAAA,GAAAA,gBAAA"}
|
package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.js
CHANGED
|
@@ -5,23 +5,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.EntryExitTransition = void 0;
|
|
7
7
|
exports.combineTransition = combineTransition;
|
|
8
|
-
|
|
9
8
|
var _animationBuilder = require("../animationBuilder");
|
|
10
|
-
|
|
11
9
|
var _animation = require("../../animation");
|
|
12
|
-
|
|
13
10
|
var _Fade = require("../defaultAnimations/Fade");
|
|
14
|
-
|
|
15
|
-
function
|
|
16
|
-
|
|
11
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
12
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
13
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
17
14
|
class EntryExitTransition extends _animationBuilder.BaseAnimationBuilder {
|
|
18
15
|
constructor() {
|
|
19
16
|
super(...arguments);
|
|
20
|
-
|
|
21
17
|
_defineProperty(this, "enteringV", _Fade.FadeIn);
|
|
22
|
-
|
|
23
18
|
_defineProperty(this, "exitingV", _Fade.FadeOut);
|
|
24
|
-
|
|
25
19
|
_defineProperty(this, "build", () => {
|
|
26
20
|
const delayFunction = this.getDelayFunction();
|
|
27
21
|
const callback = this.callbackV;
|
|
@@ -37,15 +31,12 @@ class EntryExitTransition extends _animationBuilder.BaseAnimationBuilder {
|
|
|
37
31
|
const animations = {
|
|
38
32
|
transform: []
|
|
39
33
|
};
|
|
40
|
-
|
|
41
34
|
for (const prop of Object.keys(exitingValues.animations)) {
|
|
42
35
|
if (prop === 'transform') {
|
|
43
36
|
var _exitingValues$animat;
|
|
44
|
-
|
|
45
37
|
(_exitingValues$animat = exitingValues.animations[prop]) === null || _exitingValues$animat === void 0 ? void 0 : _exitingValues$animat.forEach((value, index) => {
|
|
46
38
|
for (const transformProp of Object.keys(value)) {
|
|
47
39
|
var _animations$transform;
|
|
48
|
-
|
|
49
40
|
(_animations$transform = animations.transform) === null || _animations$transform === void 0 ? void 0 : _animations$transform.push({
|
|
50
41
|
[transformProp]: delayFunction(delay, (0, _animation.withSequence)(value[transformProp], (0, _animation.withTiming)(exitingValues.initialValues.transform ? exitingValues.initialValues.transform[index][transformProp] : 0, {
|
|
51
42
|
duration: 0
|
|
@@ -62,15 +53,12 @@ class EntryExitTransition extends _animationBuilder.BaseAnimationBuilder {
|
|
|
62
53
|
animations[prop] = delayFunction(delay, (0, _animation.withSequence)(...sequence));
|
|
63
54
|
}
|
|
64
55
|
}
|
|
65
|
-
|
|
66
56
|
for (const prop of Object.keys(enteringValues.animations)) {
|
|
67
57
|
if (prop === 'transform') {
|
|
68
58
|
var _enteringValues$anima;
|
|
69
|
-
|
|
70
59
|
(_enteringValues$anima = enteringValues.animations[prop]) === null || _enteringValues$anima === void 0 ? void 0 : _enteringValues$anima.forEach((value, index) => {
|
|
71
60
|
for (const transformProp of Object.keys(value)) {
|
|
72
61
|
var _animations$transform2;
|
|
73
|
-
|
|
74
62
|
(_animations$transform2 = animations.transform) === null || _animations$transform2 === void 0 ? void 0 : _animations$transform2.push({
|
|
75
63
|
[transformProp]: delayFunction(delay + exitingDuration, (0, _animation.withSequence)((0, _animation.withTiming)(enteringValues.initialValues.transform ? enteringValues.initialValues.transform[index][transformProp] : 0, {
|
|
76
64
|
duration: exitingDuration
|
|
@@ -87,18 +75,14 @@ class EntryExitTransition extends _animationBuilder.BaseAnimationBuilder {
|
|
|
87
75
|
}), enteringValues.animations[prop]));
|
|
88
76
|
}
|
|
89
77
|
}
|
|
90
|
-
|
|
91
78
|
const mergedTransform = (exitingValues.initialValues.transform ?? []).concat((enteringValues.animations.transform ?? []).map(value => {
|
|
92
79
|
const objectKeys = Object.keys(value);
|
|
93
|
-
|
|
94
80
|
if ((objectKeys === null || objectKeys === void 0 ? void 0 : objectKeys.length) < 1) {
|
|
95
81
|
console.error(`[Reanimated]: \${value} is not a valid Transform object`);
|
|
96
82
|
return value;
|
|
97
83
|
}
|
|
98
|
-
|
|
99
84
|
const transformProp = objectKeys[0];
|
|
100
85
|
const current = value[transformProp].current;
|
|
101
|
-
|
|
102
86
|
if (typeof current === 'string') {
|
|
103
87
|
if (current.includes('deg')) return {
|
|
104
88
|
[transformProp]: '0deg'
|
|
@@ -114,11 +98,11 @@ class EntryExitTransition extends _animationBuilder.BaseAnimationBuilder {
|
|
|
114
98
|
[transformProp]: 1
|
|
115
99
|
};
|
|
116
100
|
}
|
|
117
|
-
|
|
118
101
|
return value;
|
|
119
102
|
}));
|
|
120
103
|
return {
|
|
121
|
-
initialValues: {
|
|
104
|
+
initialValues: {
|
|
105
|
+
...exitingValues.initialValues,
|
|
122
106
|
originX: values.currentOriginX,
|
|
123
107
|
originY: values.currentOriginY,
|
|
124
108
|
width: values.currentWidth,
|
|
@@ -145,35 +129,27 @@ class EntryExitTransition extends _animationBuilder.BaseAnimationBuilder {
|
|
|
145
129
|
};
|
|
146
130
|
});
|
|
147
131
|
}
|
|
148
|
-
|
|
149
132
|
static createInstance() {
|
|
150
133
|
return new EntryExitTransition();
|
|
151
134
|
}
|
|
152
|
-
|
|
153
135
|
static entering(animation) {
|
|
154
136
|
const instance = this.createInstance();
|
|
155
137
|
return instance.entering(animation);
|
|
156
138
|
}
|
|
157
|
-
|
|
158
139
|
entering(animation) {
|
|
159
140
|
this.enteringV = animation;
|
|
160
141
|
return this;
|
|
161
142
|
}
|
|
162
|
-
|
|
163
143
|
static exiting(animation) {
|
|
164
144
|
const instance = this.createInstance();
|
|
165
145
|
return instance.exiting(animation);
|
|
166
146
|
}
|
|
167
|
-
|
|
168
147
|
exiting(animation) {
|
|
169
148
|
this.exitingV = animation;
|
|
170
149
|
return this;
|
|
171
150
|
}
|
|
172
|
-
|
|
173
151
|
}
|
|
174
|
-
|
|
175
152
|
exports.EntryExitTransition = EntryExitTransition;
|
|
176
|
-
|
|
177
153
|
function combineTransition(exiting, entering) {
|
|
178
154
|
return EntryExitTransition.entering(entering).exiting(exiting);
|
|
179
155
|
}
|
package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["EntryExitTransition","BaseAnimationBuilder","FadeIn","FadeOut","delayFunction","getDelayFunction","callback","callbackV","delay","getDelay","enteringAnimation","enteringV","build","exitingAnimation","exitingV","exitingDuration","getDuration","values","enteringValues","exitingValues","animations","transform","prop","Object","keys","forEach","value","index","transformProp","push","withSequence","withTiming","initialValues","duration","sequence","undefined","includes","mergedTransform","concat","map","objectKeys","length","console","error","current","originX","currentOriginX","originY","currentOriginY","width","currentWidth","height","currentHeight","targetOriginX","targetOriginY","targetWidth","targetHeight","createInstance","entering","animation","instance","exiting","combineTransition"],"sources":["EntryExitTransition.ts"],"sourcesContent":["import {\n ILayoutAnimationBuilder,\n LayoutAnimationsValues,\n LayoutAnimationFunction,\n} from '../animationBuilder/commonTypes';\nimport { BaseAnimationBuilder } from '../animationBuilder';\nimport { withSequence, withTiming } from '../../animation';\nimport { FadeIn, FadeOut } from '../defaultAnimations/Fade';\nimport {\n StyleProps,\n TransformProperty,\n AnimationObject,\n} from '../../commonTypes';\n\nexport class EntryExitTransition\n extends BaseAnimationBuilder\n implements ILayoutAnimationBuilder\n{\n enteringV: BaseAnimationBuilder | typeof BaseAnimationBuilder = FadeIn;\n\n exitingV: BaseAnimationBuilder | typeof BaseAnimationBuilder = FadeOut;\n\n static createInstance(): EntryExitTransition {\n return new EntryExitTransition();\n }\n\n static entering(\n animation: BaseAnimationBuilder | typeof BaseAnimationBuilder\n ): EntryExitTransition {\n const instance = this.createInstance();\n return instance.entering(animation);\n }\n\n entering(\n animation: BaseAnimationBuilder | typeof BaseAnimationBuilder\n ): EntryExitTransition {\n this.enteringV = animation;\n return this;\n }\n\n static exiting(\n animation: BaseAnimationBuilder | typeof BaseAnimationBuilder\n ): EntryExitTransition {\n const instance = this.createInstance();\n return instance.exiting(animation);\n }\n\n exiting(\n animation: BaseAnimationBuilder | typeof BaseAnimationBuilder\n ): EntryExitTransition {\n this.exitingV = animation;\n return this;\n }\n\n build = (): LayoutAnimationFunction => {\n const delayFunction = this.getDelayFunction();\n const callback = this.callbackV;\n const delay = this.getDelay();\n const enteringAnimation = this.enteringV.build();\n const exitingAnimation = this.exitingV.build();\n const exitingDuration = this.exitingV.getDuration();\n\n return (values) => {\n 'worklet';\n const enteringValues = enteringAnimation(values);\n const exitingValues = exitingAnimation(values);\n const animations: StyleProps = {\n transform: [],\n };\n\n for (const prop of Object.keys(exitingValues.animations)) {\n if (prop === 'transform') {\n exitingValues.animations[prop]?.forEach((value, index) => {\n for (const transformProp of Object.keys(value)) {\n animations.transform?.push({\n [transformProp]: delayFunction(\n delay,\n withSequence(\n value[transformProp as keyof TransformProperty],\n withTiming(\n exitingValues.initialValues.transform\n ? exitingValues.initialValues.transform[index][\n transformProp as keyof TransformProperty\n ]\n : 0,\n { duration: 0 }\n )\n )\n ),\n } as TransformProperty);\n }\n });\n } else {\n const sequence =\n enteringValues.animations[prop] !== undefined\n ? [\n exitingValues.animations[prop],\n withTiming(enteringValues.initialValues[prop], {\n duration: 0,\n }),\n enteringValues.animations[prop],\n ]\n : [\n exitingValues.animations[prop],\n withTiming(\n Object.keys(values).includes(prop)\n ? values[prop as keyof LayoutAnimationsValues]\n : exitingValues.initialValues[prop],\n { duration: 0 }\n ),\n ];\n\n animations[prop] = delayFunction(delay, withSequence(...sequence));\n }\n }\n for (const prop of Object.keys(enteringValues.animations)) {\n if (prop === 'transform') {\n enteringValues.animations[prop]?.forEach((value, index) => {\n for (const transformProp of Object.keys(value)) {\n animations.transform?.push({\n [transformProp]: delayFunction(\n delay + exitingDuration,\n withSequence(\n withTiming(\n enteringValues.initialValues.transform\n ? enteringValues.initialValues.transform[index][\n transformProp as keyof TransformProperty\n ]\n : 0,\n { duration: exitingDuration }\n ),\n value[transformProp as keyof TransformProperty]\n )\n ),\n } as TransformProperty);\n }\n });\n } else if (animations[prop] !== undefined) {\n // it was already added in the previous loop\n continue;\n } else {\n animations[prop] = delayFunction(\n delay,\n withSequence(\n withTiming(enteringValues.initialValues[prop], { duration: 0 }),\n enteringValues.animations[prop]\n )\n );\n }\n }\n\n const mergedTransform = (\n exitingValues.initialValues.transform ?? []\n ).concat(\n (enteringValues.animations.transform ?? []).map((value) => {\n const objectKeys = Object.keys(value);\n if (objectKeys?.length < 1) {\n console.error(\n `[Reanimated]: \\${value} is not a valid Transform object`\n );\n return value;\n }\n const transformProp = objectKeys[0];\n const current = (\n value[transformProp as keyof TransformProperty] as AnimationObject\n ).current;\n if (typeof current === 'string') {\n if (current.includes('deg'))\n return {\n [transformProp]: '0deg',\n } as unknown as TransformProperty;\n else\n return {\n [transformProp]: '0',\n } as unknown as TransformProperty;\n } else if (transformProp.includes('translate')) {\n return { [transformProp]: 0 } as unknown as TransformProperty;\n } else {\n return { [transformProp]: 1 } as unknown as TransformProperty;\n }\n return value;\n })\n );\n\n return {\n initialValues: {\n ...exitingValues.initialValues,\n originX: values.currentOriginX,\n originY: values.currentOriginY,\n width: values.currentWidth,\n height: values.currentHeight,\n transform: mergedTransform,\n },\n animations: {\n originX: delayFunction(\n delay + exitingDuration,\n withTiming(values.targetOriginX, { duration: exitingDuration })\n ),\n originY: delayFunction(\n delay + exitingDuration,\n withTiming(values.targetOriginY, { duration: exitingDuration })\n ),\n width: delayFunction(\n delay + exitingDuration,\n withTiming(values.targetWidth, { duration: exitingDuration })\n ),\n height: delayFunction(\n delay + exitingDuration,\n withTiming(values.targetHeight, { duration: exitingDuration })\n ),\n ...animations,\n },\n callback: callback,\n };\n };\n };\n}\n\nexport function combineTransition(\n exiting: BaseAnimationBuilder | typeof BaseAnimationBuilder,\n entering: BaseAnimationBuilder | typeof BaseAnimationBuilder\n): EntryExitTransition {\n return EntryExitTransition.entering(entering).exiting(exiting);\n}\n"],"mappings":";;;;;;;;AAKA;;AACA;;AACA;;;;AAOO,MAAMA,mBAAN,SACGC,sCADH,CAGP;EAAA;IAAA;;IAAA,mCACkEC,YADlE;;IAAA,kCAGiEC,aAHjE;;IAAA,+BAqCU,MAA+B;MACrC,MAAMC,aAAa,GAAG,KAAKC,gBAAL,EAAtB;MACA,MAAMC,QAAQ,GAAG,KAAKC,SAAtB;MACA,MAAMC,KAAK,GAAG,KAAKC,QAAL,EAAd;MACA,MAAMC,iBAAiB,GAAG,KAAKC,SAAL,CAAeC,KAAf,EAA1B;MACA,MAAMC,gBAAgB,GAAG,KAAKC,QAAL,CAAcF,KAAd,EAAzB;MACA,MAAMG,eAAe,GAAG,KAAKD,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,QAAQ,CAACF,QAAT,CAAkBC,SAAlB,CAAP;EACD;;EAEDD,QAAQ,CACNC,SADM,EAEe;IACrB,KAAKhD,SAAL,GAAiBgD,SAAjB;IACA,OAAO,IAAP;EACD;;EAEa,OAAPE,OAAO,CACZF,SADY,EAES;IACrB,MAAMC,QAAQ,GAAG,KAAKH,cAAL,EAAjB;IACA,OAAOG,QAAQ,CAACC,OAAT,CAAiBF,SAAjB,CAAP;EACD;;EAEDE,OAAO,CACLF,SADK,EAEgB;IACrB,KAAK7C,QAAL,GAAgB6C,SAAhB;IACA,OAAO,IAAP;EACD;;AAnCH;;;;AAyMO,SAASG,iBAAT,CACLD,OADK,EAELH,QAFK,EAGgB;EACrB,OAAO1D,mBAAmB,CAAC0D,QAApB,CAA6BA,QAA7B,EAAuCG,OAAvC,CAA+CA,OAA/C,CAAP;AACD"}
|
|
1
|
+
{"version":3,"names":["_animationBuilder","require","_animation","_Fade","_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","EntryExitTransition","BaseAnimationBuilder","constructor","arguments","FadeIn","FadeOut","delayFunction","getDelayFunction","callback","callbackV","delay","getDelay","enteringAnimation","enteringV","build","exitingAnimation","exitingV","exitingDuration","getDuration","values","enteringValues","exitingValues","animations","transform","prop","keys","_exitingValues$animat","forEach","index","transformProp","_animations$transform","push","withSequence","withTiming","initialValues","duration","sequence","includes","_enteringValues$anima","_animations$transform2","mergedTransform","concat","map","objectKeys","length","console","error","current","originX","currentOriginX","originY","currentOriginY","width","currentWidth","height","currentHeight","targetOriginX","targetOriginY","targetWidth","targetHeight","createInstance","entering","animation","instance","exiting","exports","combineTransition"],"sources":["EntryExitTransition.ts"],"sourcesContent":["import {\n ILayoutAnimationBuilder,\n LayoutAnimationsValues,\n LayoutAnimationFunction,\n} from '../animationBuilder/commonTypes';\nimport { BaseAnimationBuilder } from '../animationBuilder';\nimport { withSequence, withTiming } from '../../animation';\nimport { FadeIn, FadeOut } from '../defaultAnimations/Fade';\nimport {\n StyleProps,\n TransformProperty,\n AnimationObject,\n} from '../../commonTypes';\n\nexport class EntryExitTransition\n extends BaseAnimationBuilder\n implements ILayoutAnimationBuilder\n{\n enteringV: BaseAnimationBuilder | typeof BaseAnimationBuilder = FadeIn;\n\n exitingV: BaseAnimationBuilder | typeof BaseAnimationBuilder = FadeOut;\n\n static createInstance(): EntryExitTransition {\n return new EntryExitTransition();\n }\n\n static entering(\n animation: BaseAnimationBuilder | typeof BaseAnimationBuilder\n ): EntryExitTransition {\n const instance = this.createInstance();\n return instance.entering(animation);\n }\n\n entering(\n animation: BaseAnimationBuilder | typeof BaseAnimationBuilder\n ): EntryExitTransition {\n this.enteringV = animation;\n return this;\n }\n\n static exiting(\n animation: BaseAnimationBuilder | typeof BaseAnimationBuilder\n ): EntryExitTransition {\n const instance = this.createInstance();\n return instance.exiting(animation);\n }\n\n exiting(\n animation: BaseAnimationBuilder | typeof BaseAnimationBuilder\n ): EntryExitTransition {\n this.exitingV = animation;\n return this;\n }\n\n build = (): LayoutAnimationFunction => {\n const delayFunction = this.getDelayFunction();\n const callback = this.callbackV;\n const delay = this.getDelay();\n const enteringAnimation = this.enteringV.build();\n const exitingAnimation = this.exitingV.build();\n const exitingDuration = this.exitingV.getDuration();\n\n return (values) => {\n 'worklet';\n const enteringValues = enteringAnimation(values);\n const exitingValues = exitingAnimation(values);\n const animations: StyleProps = {\n transform: [],\n };\n\n for (const prop of Object.keys(exitingValues.animations)) {\n if (prop === 'transform') {\n exitingValues.animations[prop]?.forEach((value, index) => {\n for (const transformProp of Object.keys(value)) {\n animations.transform?.push({\n [transformProp]: delayFunction(\n delay,\n withSequence(\n value[transformProp as keyof TransformProperty],\n withTiming(\n exitingValues.initialValues.transform\n ? exitingValues.initialValues.transform[index][\n transformProp as keyof TransformProperty\n ]\n : 0,\n { duration: 0 }\n )\n )\n ),\n } as TransformProperty);\n }\n });\n } else {\n const sequence =\n enteringValues.animations[prop] !== undefined\n ? [\n exitingValues.animations[prop],\n withTiming(enteringValues.initialValues[prop], {\n duration: 0,\n }),\n enteringValues.animations[prop],\n ]\n : [\n exitingValues.animations[prop],\n withTiming(\n Object.keys(values).includes(prop)\n ? values[prop as keyof LayoutAnimationsValues]\n : exitingValues.initialValues[prop],\n { duration: 0 }\n ),\n ];\n\n animations[prop] = delayFunction(delay, withSequence(...sequence));\n }\n }\n for (const prop of Object.keys(enteringValues.animations)) {\n if (prop === 'transform') {\n enteringValues.animations[prop]?.forEach((value, index) => {\n for (const transformProp of Object.keys(value)) {\n animations.transform?.push({\n [transformProp]: delayFunction(\n delay + exitingDuration,\n withSequence(\n withTiming(\n enteringValues.initialValues.transform\n ? enteringValues.initialValues.transform[index][\n transformProp as keyof TransformProperty\n ]\n : 0,\n { duration: exitingDuration }\n ),\n value[transformProp as keyof TransformProperty]\n )\n ),\n } as TransformProperty);\n }\n });\n } else if (animations[prop] !== undefined) {\n // it was already added in the previous loop\n continue;\n } else {\n animations[prop] = delayFunction(\n delay,\n withSequence(\n withTiming(enteringValues.initialValues[prop], { duration: 0 }),\n enteringValues.animations[prop]\n )\n );\n }\n }\n\n const mergedTransform = (\n exitingValues.initialValues.transform ?? []\n ).concat(\n (enteringValues.animations.transform ?? []).map((value) => {\n const objectKeys = Object.keys(value);\n if (objectKeys?.length < 1) {\n console.error(\n `[Reanimated]: \\${value} is not a valid Transform object`\n );\n return value;\n }\n const transformProp = objectKeys[0];\n const current = (\n value[transformProp as keyof TransformProperty] as AnimationObject\n ).current;\n if (typeof current === 'string') {\n if (current.includes('deg'))\n return {\n [transformProp]: '0deg',\n } as unknown as TransformProperty;\n else\n return {\n [transformProp]: '0',\n } as unknown as TransformProperty;\n } else if (transformProp.includes('translate')) {\n return { [transformProp]: 0 } as unknown as TransformProperty;\n } else {\n return { [transformProp]: 1 } as unknown as TransformProperty;\n }\n return value;\n })\n );\n\n return {\n initialValues: {\n ...exitingValues.initialValues,\n originX: values.currentOriginX,\n originY: values.currentOriginY,\n width: values.currentWidth,\n height: values.currentHeight,\n transform: mergedTransform,\n },\n animations: {\n originX: delayFunction(\n delay + exitingDuration,\n withTiming(values.targetOriginX, { duration: exitingDuration })\n ),\n originY: delayFunction(\n delay + exitingDuration,\n withTiming(values.targetOriginY, { duration: exitingDuration })\n ),\n width: delayFunction(\n delay + exitingDuration,\n withTiming(values.targetWidth, { duration: exitingDuration })\n ),\n height: delayFunction(\n delay + exitingDuration,\n withTiming(values.targetHeight, { duration: exitingDuration })\n ),\n ...animations,\n },\n callback: callback,\n };\n };\n };\n}\n\nexport function combineTransition(\n exiting: BaseAnimationBuilder | typeof BaseAnimationBuilder,\n entering: BaseAnimationBuilder | typeof BaseAnimationBuilder\n): EntryExitTransition {\n return EntryExitTransition.entering(entering).exiting(exiting);\n}\n"],"mappings":";;;;;;;AAKA,IAAAA,iBAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAA4D,SAAAG,gBAAAC,GAAA,EAAAC,GAAA,EAAAC,KAAA,IAAAD,GAAA,GAAAE,cAAA,CAAAF,GAAA,OAAAA,GAAA,IAAAD,GAAA,IAAAI,MAAA,CAAAC,cAAA,CAAAL,GAAA,EAAAC,GAAA,IAAAC,KAAA,EAAAA,KAAA,EAAAI,UAAA,QAAAC,YAAA,QAAAC,QAAA,oBAAAR,GAAA,CAAAC,GAAA,IAAAC,KAAA,WAAAF,GAAA;AAAA,SAAAG,eAAAM,GAAA,QAAAR,GAAA,GAAAS,YAAA,CAAAD,GAAA,2BAAAR,GAAA,gBAAAA,GAAA,GAAAU,MAAA,CAAAV,GAAA;AAAA,SAAAS,aAAAE,KAAA,EAAAC,IAAA,eAAAD,KAAA,iBAAAA,KAAA,kBAAAA,KAAA,MAAAE,IAAA,GAAAF,KAAA,CAAAG,MAAA,CAAAC,WAAA,OAAAF,IAAA,KAAAG,SAAA,QAAAC,GAAA,GA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A,GAAAA,mBAAA;AAEM,SAASkE,iBAAiBA,CAC/BF,OAA2D,EAC3DH,QAA4D,EACvC;EACrB,OAAO7D,mBAAmB,CAAC6D,QAAQ,CAACA,QAAQ,CAAC,CAACG,OAAO,CAACA,OAAO,CAAC;AAChE"}
|
|
@@ -4,17 +4,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.FadingTransition = void 0;
|
|
7
|
-
|
|
8
7
|
var _animation = require("../../animation");
|
|
9
|
-
|
|
10
8
|
var _animationBuilder = require("../animationBuilder");
|
|
11
|
-
|
|
12
|
-
function
|
|
13
|
-
|
|
9
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
10
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
11
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
14
12
|
class FadingTransition extends _animationBuilder.BaseAnimationBuilder {
|
|
15
13
|
constructor() {
|
|
16
14
|
super(...arguments);
|
|
17
|
-
|
|
18
15
|
_defineProperty(this, "build", () => {
|
|
19
16
|
const delayFunction = this.getDelayFunction();
|
|
20
17
|
const callback = this.callbackV;
|
|
@@ -55,12 +52,9 @@ class FadingTransition extends _animationBuilder.BaseAnimationBuilder {
|
|
|
55
52
|
};
|
|
56
53
|
});
|
|
57
54
|
}
|
|
58
|
-
|
|
59
55
|
static createInstance() {
|
|
60
56
|
return new FadingTransition();
|
|
61
57
|
}
|
|
62
|
-
|
|
63
58
|
}
|
|
64
|
-
|
|
65
59
|
exports.FadingTransition = FadingTransition;
|
|
66
60
|
//# sourceMappingURL=FadingTransition.js.map
|
package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/FadingTransition.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["FadingTransition","BaseAnimationBuilder","delayFunction","getDelayFunction","callback","callbackV","delay","getDelay","duration","durationV","values","initialValues","opacity","originX","currentOriginX","originY","currentOriginY","width","currentWidth","height","currentHeight","animations","withSequence","withTiming","targetOriginX","targetOriginY","targetWidth","targetHeight","createInstance"],"sources":["FadingTransition.ts"],"sourcesContent":["import { withSequence, withTiming } from '../../animation';\nimport {\n ILayoutAnimationBuilder,\n LayoutAnimationFunction,\n} from '../animationBuilder/commonTypes';\nimport { BaseAnimationBuilder } from '../animationBuilder';\n\nexport class FadingTransition\n extends BaseAnimationBuilder\n implements ILayoutAnimationBuilder\n{\n static createInstance(): FadingTransition {\n return new FadingTransition();\n }\n\n build = (): LayoutAnimationFunction => {\n const delayFunction = this.getDelayFunction();\n const callback = this.callbackV;\n const delay = this.getDelay();\n const duration = this.durationV ?? 500;\n\n return (values) => {\n 'worklet';\n return {\n initialValues: {\n opacity: 1,\n originX: values.currentOriginX,\n originY: values.currentOriginY,\n width: values.currentWidth,\n height: values.currentHeight,\n },\n animations: {\n opacity: delayFunction(\n delay,\n withSequence(\n withTiming(0, { duration: duration }),\n withTiming(1, { duration: duration })\n )\n ),\n originX: delayFunction(\n delay + duration,\n withTiming(values.targetOriginX, { duration: 50 })\n ),\n originY: delayFunction(\n delay + duration,\n withTiming(values.targetOriginY, { duration: 50 })\n ),\n width: delayFunction(\n delay + duration,\n withTiming(values.targetWidth, { duration: 50 })\n ),\n height: delayFunction(\n delay + duration,\n withTiming(values.targetHeight, { duration: 50 })\n ),\n },\n callback: callback,\n };\n };\n };\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_animation","require","_animationBuilder","_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","FadingTransition","BaseAnimationBuilder","constructor","arguments","delayFunction","getDelayFunction","callback","callbackV","delay","getDelay","duration","durationV","values","initialValues","opacity","originX","currentOriginX","originY","currentOriginY","width","currentWidth","height","currentHeight","animations","withSequence","withTiming","targetOriginX","targetOriginY","targetWidth","targetHeight","createInstance","exports"],"sources":["FadingTransition.ts"],"sourcesContent":["import { withSequence, withTiming } from '../../animation';\nimport {\n ILayoutAnimationBuilder,\n LayoutAnimationFunction,\n} from '../animationBuilder/commonTypes';\nimport { BaseAnimationBuilder } from '../animationBuilder';\n\nexport class FadingTransition\n extends BaseAnimationBuilder\n implements ILayoutAnimationBuilder\n{\n static createInstance(): FadingTransition {\n return new FadingTransition();\n }\n\n build = (): LayoutAnimationFunction => {\n const delayFunction = this.getDelayFunction();\n const callback = this.callbackV;\n const delay = this.getDelay();\n const duration = this.durationV ?? 500;\n\n return (values) => {\n 'worklet';\n return {\n initialValues: {\n opacity: 1,\n originX: values.currentOriginX,\n originY: values.currentOriginY,\n width: values.currentWidth,\n height: values.currentHeight,\n },\n animations: {\n opacity: delayFunction(\n delay,\n withSequence(\n withTiming(0, { duration: duration }),\n withTiming(1, { duration: duration })\n )\n ),\n originX: delayFunction(\n delay + duration,\n withTiming(values.targetOriginX, { duration: 50 })\n ),\n originY: delayFunction(\n delay + duration,\n withTiming(values.targetOriginY, { duration: 50 })\n ),\n width: delayFunction(\n delay + duration,\n withTiming(values.targetWidth, { duration: 50 })\n ),\n height: delayFunction(\n delay + duration,\n withTiming(values.targetHeight, { duration: 50 })\n ),\n },\n callback: callback,\n };\n };\n };\n}\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAKA,IAAAC,iBAAA,GAAAD,OAAA;AAA2D,SAAAE,gBAAAC,GAAA,EAAAC,GAAA,EAAAC,KAAA,IAAAD,GAAA,GAAAE,cAAA,CAAAF,GAAA,OAAAA,GAAA,IAAAD,G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,aAAa,CACpBI,KAAK,EACL,IAAAgB,uBAAY,EACV,IAAAC,qBAAU,EAAC,CAAC,EAAE;cAAEf,QAAQ,EAAEA;YAAS,CAAC,CAAC,EACrC,IAAAe,qBAAU,EAAC,CAAC,EAAE;cAAEf,QAAQ,EAAEA;YAAS,CAAC,CAAC,CACtC,CACF;YACDK,OAAO,EAAEX,aAAa,CACpBI,KAAK,GAAGE,QAAQ,EAChB,IAAAe,qBAAU,EAACb,MAAM,CAACc,aAAa,EAAE;cAAEhB,QAAQ,EAAE;YAAG,CAAC,CAAC,CACnD;YACDO,OAAO,EAAEb,aAAa,CACpBI,KAAK,GAAGE,QAAQ,EAChB,IAAAe,qBAAU,EAACb,MAAM,CAACe,aAAa,EAAE;cAAEjB,QAAQ,EAAE;YAAG,CAAC,CAAC,CACnD;YACDS,KAAK,EAAEf,aAAa,CAClBI,KAAK,GAAGE,QAAQ,EAChB,IAAAe,qBAAU,EAACb,MAAM,CAACgB,WAAW,EAAE;cAAElB,QAAQ,EAAE;YAAG,CAAC,CAAC,CACjD;YACDW,MAAM,EAAEjB,aAAa,CACnBI,KAAK,GAAGE,QAAQ,EAChB,IAAAe,qBAAU,EAACb,MAAM,CAACiB,YAAY,EAAE;cAAEnB,QAAQ,EAAE;YAAG,CAAC,CAAC;UAErD,CAAC;UACDJ,QAAQ,EAAEA;QACZ,CAAC;MACH,CAAC;IACH,CAAC;EAAA;EAhDD,OAAOwB,cAAcA,CAAA,EAAqB;IACxC,OAAO,IAAI9B,gBAAgB,EAAE;EAC/B;AA+CF;AAAC+B,OAAA,CAAA/B,gBAAA,GAAAA,gBAAA"}
|
|
@@ -4,19 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.JumpingTransition = void 0;
|
|
7
|
-
|
|
8
7
|
var _animation = require("../../animation");
|
|
9
|
-
|
|
10
8
|
var _Easing = require("../../Easing");
|
|
11
|
-
|
|
12
9
|
var _animationBuilder = require("../animationBuilder");
|
|
13
|
-
|
|
14
|
-
function
|
|
15
|
-
|
|
10
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
11
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
12
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
16
13
|
class JumpingTransition extends _animationBuilder.BaseAnimationBuilder {
|
|
17
14
|
constructor() {
|
|
18
15
|
super(...arguments);
|
|
19
|
-
|
|
20
16
|
_defineProperty(this, "build", () => {
|
|
21
17
|
const delayFunction = this.getDelayFunction();
|
|
22
18
|
const callback = this.callbackV;
|
|
@@ -41,7 +37,8 @@ class JumpingTransition extends _animationBuilder.BaseAnimationBuilder {
|
|
|
41
37
|
originY: delayFunction(delay, (0, _animation.withSequence)((0, _animation.withTiming)(Math.min(values.targetOriginY, values.currentOriginY) - d, {
|
|
42
38
|
duration,
|
|
43
39
|
easing: _Easing.Easing.out(_Easing.Easing.exp)
|
|
44
|
-
}), (0, _animation.withTiming)(values.targetOriginY, {
|
|
40
|
+
}), (0, _animation.withTiming)(values.targetOriginY, {
|
|
41
|
+
...config,
|
|
45
42
|
duration,
|
|
46
43
|
easing: _Easing.Easing.bounce
|
|
47
44
|
}))),
|
|
@@ -53,12 +50,9 @@ class JumpingTransition extends _animationBuilder.BaseAnimationBuilder {
|
|
|
53
50
|
};
|
|
54
51
|
});
|
|
55
52
|
}
|
|
56
|
-
|
|
57
53
|
static createInstance() {
|
|
58
54
|
return new JumpingTransition();
|
|
59
55
|
}
|
|
60
|
-
|
|
61
56
|
}
|
|
62
|
-
|
|
63
57
|
exports.JumpingTransition = JumpingTransition;
|
|
64
58
|
//# sourceMappingURL=JumpingTransition.js.map
|
package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/JumpingTransition.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["JumpingTransition","BaseAnimationBuilder","delayFunction","getDelayFunction","callback","callbackV","delay","getDelay","duration","durationV","config","values","d","Math","max","abs","targetOriginX","currentOriginX","targetOriginY","currentOriginY","initialValues","originX","originY","width","currentWidth","height","currentHeight","animations","withTiming","withSequence","min","easing","Easing","out","exp","bounce","targetWidth","targetHeight","createInstance"],"sources":["JumpingTransition.ts"],"sourcesContent":["import {\n ILayoutAnimationBuilder,\n LayoutAnimationFunction,\n} from '../animationBuilder/commonTypes';\nimport { withSequence, withTiming } from '../../animation';\nimport { Easing } from '../../Easing';\nimport { BaseAnimationBuilder } from '../animationBuilder';\nexport class JumpingTransition\n extends BaseAnimationBuilder\n implements ILayoutAnimationBuilder\n{\n static createInstance(): JumpingTransition {\n return new JumpingTransition();\n }\n\n build = (): LayoutAnimationFunction => {\n const delayFunction = this.getDelayFunction();\n const callback = this.callbackV;\n const delay = this.getDelay();\n const duration = (this.durationV ?? 300) / 2;\n const config = { duration: duration * 2 };\n\n return (values) => {\n 'worklet';\n const d = Math.max(\n Math.abs(values.targetOriginX - values.currentOriginX),\n Math.abs(values.targetOriginY - values.currentOriginY)\n );\n return {\n initialValues: {\n originX: values.currentOriginX,\n originY: values.currentOriginY,\n width: values.currentWidth,\n height: values.currentHeight,\n },\n animations: {\n originX: delayFunction(\n delay,\n withTiming(values.targetOriginX, config)\n ),\n originY: delayFunction(\n delay,\n withSequence(\n withTiming(\n Math.min(values.targetOriginY, values.currentOriginY) - d,\n {\n duration,\n easing: Easing.out(Easing.exp),\n }\n ),\n withTiming(values.targetOriginY, {\n ...config,\n duration,\n easing: Easing.bounce,\n })\n )\n ),\n width: delayFunction(delay, withTiming(values.targetWidth, config)),\n height: delayFunction(delay, withTiming(values.targetHeight, config)),\n },\n callback: callback,\n };\n };\n };\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_animation","require","_Easing","_animationBuilder","_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","JumpingTransition","BaseAnimationBuilder","constructor","arguments","delayFunction","getDelayFunction","callback","callbackV","delay","getDelay","duration","durationV","config","values","d","Math","max","abs","targetOriginX","currentOriginX","targetOriginY","currentOriginY","initialValues","originX","originY","width","currentWidth","height","currentHeight","animations","withTiming","withSequence","min","easing","Easing","out","exp","bounce","targetWidth","targetHeight","createInstance","exports"],"sources":["JumpingTransition.ts"],"sourcesContent":["import {\n ILayoutAnimationBuilder,\n LayoutAnimationFunction,\n} from '../animationBuilder/commonTypes';\nimport { withSequence, withTiming } from '../../animation';\nimport { Easing } from '../../Easing';\nimport { BaseAnimationBuilder } from '../animationBuilder';\nexport class JumpingTransition\n extends BaseAnimationBuilder\n implements ILayoutAnimationBuilder\n{\n static createInstance(): JumpingTransition {\n return new JumpingTransition();\n }\n\n build = (): LayoutAnimationFunction => {\n const delayFunction = this.getDelayFunction();\n const callback = this.callbackV;\n const delay = this.getDelay();\n const duration = (this.durationV ?? 300) / 2;\n const config = { duration: duration * 2 };\n\n return (values) => {\n 'worklet';\n const d = Math.max(\n Math.abs(values.targetOriginX - values.currentOriginX),\n Math.abs(values.targetOriginY - values.currentOriginY)\n );\n return {\n initialValues: {\n originX: values.currentOriginX,\n originY: values.currentOriginY,\n width: values.currentWidth,\n height: values.currentHeight,\n },\n animations: {\n originX: delayFunction(\n delay,\n withTiming(values.targetOriginX, config)\n ),\n originY: delayFunction(\n delay,\n withSequence(\n withTiming(\n Math.min(values.targetOriginY, values.currentOriginY) - d,\n {\n duration,\n easing: Easing.out(Easing.exp),\n }\n ),\n withTiming(values.targetOriginY, {\n ...config,\n duration,\n easing: Easing.bounce,\n })\n )\n ),\n width: delayFunction(delay, withTiming(values.targetWidth, config)),\n height: delayFunction(delay, withTiming(values.targetHeight, config)),\n },\n callback: callback,\n };\n };\n };\n}\n"],"mappings":";;;;;;AAIA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,iBAAA,GAAAF,OAAA;AAA2D,SAAAG,gBAAAC,GAAA,EAAAC,GAAA,EAAAC,KAAA,IAAAD,GAAA,GAAAE,cAAA,CAAAF,GAAA,OAAAA,GAAA,IAAAD,GAAA,IAAAI,MAAA,CAAAC,cAAA,CAAAL,GAAA,EAAAC,GAAA,IAAAC,KAAA,EAAAA,KAAA,EAAAI,UAAA,QAAAC,YAAA,QAAAC,QAAA,oBAAAR,GAAA,CAAAC,GAAA,IAAAC,KAAA,WAAAF,GAAA;AAAA,SAAAG,eAAAM,GAAA,QAAAR,GAAA,GAAAS,YAAA,CAAAD,GAAA,2BAAAR,GAAA,gBAAAA,GAAA,GAAAU,MAAA,CAAAV,GAAA;AAAA,SAAAS,aAAAE,KAAA,EAAAC,IAAA,eAAAD,KAAA,iBAAAA,KAAA,kBAAAA,KAAA,MAAAE,IAAA,GAAAF,KAAA,CAAAG,MAAA,CAAAC,WAAA,OAAAF,IAAA,KAAAG,SAAA,QAAAC,GAAA,GAAAJ,IAAA,CAAAK,IAAA,CAAAP,KAAA,EAAAC,IAAA,2BAAAK,GAAA,sBAAAA,GAAA,YAAAE,SAAA,4DAAAP,IAAA,gBAAAF,MAAA,GAAAU,MAAA,EAAAT,KAAA;AACpD,MAAMU,iBAAiB,SACpBC,sCAAoB,CAE9B;EAAAC,YAAA;IAAA,SAAAC,SAAA;IAAA1B,eAAA,gBAKU,MAA+B;MACrC,MAAM2B,aAAa,GAAG,IAAI,CAACC,gBAAgB,EAAE;MAC7C,MAAMC,QAAQ,GAAG,IAAI,CAACC,SAAS;MAC/B,MAAMC,KAAK,GAAG,IAAI,CAACC,QAAQ,EAAE;MAC7B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E1B,MAAM,CAAC,CAAC;YACnEe,MAAM,EAAEvB,aAAa,CAACI,KAAK,EAAE,IAAAsB,qBAAU,EAACjB,MAAM,CAAC0B,YAAY,EAAE3B,MAAM,CAAC;UACtE,CAAC;UACDN,QAAQ,EAAEA;QACZ,CAAC;MACH,CAAC;IACH,CAAC;EAAA;EApDD,OAAOkC,cAAcA,CAAA,EAAsB;IACzC,OAAO,IAAIxC,iBAAiB,EAAE;EAChC;AAmDF;AAACyC,OAAA,CAAAzC,iBAAA,GAAAA,iBAAA"}
|
|
@@ -4,15 +4,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.LinearTransition = exports.Layout = void 0;
|
|
7
|
-
|
|
8
7
|
var _ComplexAnimationBuilder = require("../animationBuilder/ComplexAnimationBuilder");
|
|
9
|
-
|
|
10
|
-
function
|
|
11
|
-
|
|
8
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
9
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
10
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
12
11
|
class LinearTransition extends _ComplexAnimationBuilder.ComplexAnimationBuilder {
|
|
13
12
|
constructor() {
|
|
14
13
|
super(...arguments);
|
|
15
|
-
|
|
16
14
|
_defineProperty(this, "build", () => {
|
|
17
15
|
const delayFunction = this.getDelayFunction();
|
|
18
16
|
const [animation, config] = this.getAnimationAndConfig();
|
|
@@ -39,13 +37,10 @@ class LinearTransition extends _ComplexAnimationBuilder.ComplexAnimationBuilder
|
|
|
39
37
|
};
|
|
40
38
|
});
|
|
41
39
|
}
|
|
42
|
-
|
|
43
40
|
static createInstance() {
|
|
44
41
|
return new LinearTransition();
|
|
45
42
|
}
|
|
46
|
-
|
|
47
43
|
}
|
|
48
|
-
|
|
49
44
|
exports.LinearTransition = LinearTransition;
|
|
50
45
|
const Layout = LinearTransition;
|
|
51
46
|
exports.Layout = Layout;
|
package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/LinearTransition.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["LinearTransition","ComplexAnimationBuilder","delayFunction","getDelayFunction","animation","config","getAnimationAndConfig","callback","callbackV","delay","getDelay","values","initialValues","originX","currentOriginX","originY","currentOriginY","width","currentWidth","height","currentHeight","animations","targetOriginX","targetOriginY","targetWidth","targetHeight","createInstance","Layout"],"sources":["LinearTransition.ts"],"sourcesContent":["import { ComplexAnimationBuilder } from '../animationBuilder/ComplexAnimationBuilder';\nimport {\n ILayoutAnimationBuilder,\n LayoutAnimationFunction,\n} from '../animationBuilder/commonTypes';\n\nexport class LinearTransition\n extends ComplexAnimationBuilder\n implements ILayoutAnimationBuilder\n{\n static createInstance(): LinearTransition {\n return new LinearTransition();\n }\n\n build = (): LayoutAnimationFunction => {\n const delayFunction = this.getDelayFunction();\n const [animation, config] = this.getAnimationAndConfig();\n const callback = this.callbackV;\n const delay = this.getDelay();\n\n return (values) => {\n 'worklet';\n return {\n initialValues: {\n originX: values.currentOriginX,\n originY: values.currentOriginY,\n width: values.currentWidth,\n height: values.currentHeight,\n },\n animations: {\n originX: delayFunction(\n delay,\n animation(values.targetOriginX, config)\n ),\n originY: delayFunction(\n delay,\n animation(values.targetOriginY, config)\n ),\n width: delayFunction(delay, animation(values.targetWidth, config)),\n height: delayFunction(delay, animation(values.targetHeight, config)),\n },\n callback: callback,\n };\n };\n };\n}\n\nexport const Layout = LinearTransition;\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_ComplexAnimationBuilder","require","_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","LinearTransition","ComplexAnimationBuilder","constructor","arguments","delayFunction","getDelayFunction","animation","config","getAnimationAndConfig","callback","callbackV","delay","getDelay","values","initialValues","originX","currentOriginX","originY","currentOriginY","width","currentWidth","height","currentHeight","animations","targetOriginX","targetOriginY","targetWidth","targetHeight","createInstance","exports","Layout"],"sources":["LinearTransition.ts"],"sourcesContent":["import { ComplexAnimationBuilder } from '../animationBuilder/ComplexAnimationBuilder';\nimport {\n ILayoutAnimationBuilder,\n LayoutAnimationFunction,\n} from '../animationBuilder/commonTypes';\n\nexport class LinearTransition\n extends ComplexAnimationBuilder\n implements ILayoutAnimationBuilder\n{\n static createInstance(): LinearTransition {\n return new LinearTransition();\n }\n\n build = (): LayoutAnimationFunction => {\n const delayFunction = this.getDelayFunction();\n const [animation, config] = this.getAnimationAndConfig();\n const callback = this.callbackV;\n const delay = this.getDelay();\n\n return (values) => {\n 'worklet';\n return {\n initialValues: {\n originX: values.currentOriginX,\n originY: values.currentOriginY,\n width: values.currentWidth,\n height: values.currentHeight,\n },\n animations: {\n originX: delayFunction(\n delay,\n animation(values.targetOriginX, config)\n ),\n originY: delayFunction(\n delay,\n animation(values.targetOriginY, config)\n ),\n width: delayFunction(delay, animation(values.targetWidth, config)),\n height: delayFunction(delay, animation(values.targetHeight, config)),\n },\n callback: callback,\n };\n };\n };\n}\n\nexport const Layout = LinearTransition;\n"],"mappings":";;;;;;AAAA,IAAAA,wBAAA,GAAAC,OAAA;AAAsF,SAAAC,gBAAAC,GAAA,EAAAC,GAAA,EAAAC,KAAA,IAAAD,GAAA,GAAAE,cAAA,CAAAF,GAAA,OAAAA,GAAA,IAAAD,GAAA,IAAAI,MAAA,CAAAC,cAAA,CAAAL,GAAA,EAAAC,GAAA,IAAAC,KAAA,EAAAA,KAAA,EAAAI,UAAA,QAAAC,YAAA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KAAK,EACLL,SAAS,CAACO,MAAM,CAACY,aAAa,EAAElB,MAAM,CAAC,CACxC;YACDY,KAAK,EAAEf,aAAa,CAACO,KAAK,EAAEL,SAAS,CAACO,MAAM,CAACa,WAAW,EAAEnB,MAAM,CAAC,CAAC;YAClEc,MAAM,EAAEjB,aAAa,CAACO,KAAK,EAAEL,SAAS,CAACO,MAAM,CAACc,YAAY,EAAEpB,MAAM,CAAC;UACrE,CAAC;UACDE,QAAQ,EAAEA;QACZ,CAAC;MACH,CAAC;IACH,CAAC;EAAA;EAlCD,OAAOmB,cAAcA,CAAA,EAAqB;IACxC,OAAO,IAAI5B,gBAAgB,EAAE;EAC/B;AAiCF;AAAC6B,OAAA,CAAA7B,gBAAA,GAAAA,gBAAA;AAEM,MAAM8B,MAAM,GAAG9B,gBAAgB;AAAC6B,OAAA,CAAAC,MAAA,GAAAA,MAAA"}
|
package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/SequencedTransition.js
CHANGED
|
@@ -4,19 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.SequencedTransition = void 0;
|
|
7
|
-
|
|
8
7
|
var _animation = require("../../animation");
|
|
9
|
-
|
|
10
8
|
var _animationBuilder = require("../animationBuilder");
|
|
11
|
-
|
|
12
|
-
function
|
|
13
|
-
|
|
9
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
10
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
11
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
14
12
|
class SequencedTransition extends _animationBuilder.BaseAnimationBuilder {
|
|
15
13
|
constructor() {
|
|
16
14
|
super(...arguments);
|
|
17
|
-
|
|
18
15
|
_defineProperty(this, "reversed", false);
|
|
19
|
-
|
|
20
16
|
_defineProperty(this, "build", () => {
|
|
21
17
|
const delayFunction = this.getDelayFunction();
|
|
22
18
|
const callback = this.callbackV;
|
|
@@ -47,22 +43,17 @@ class SequencedTransition extends _animationBuilder.BaseAnimationBuilder {
|
|
|
47
43
|
};
|
|
48
44
|
});
|
|
49
45
|
}
|
|
50
|
-
|
|
51
46
|
static createInstance() {
|
|
52
47
|
return new SequencedTransition();
|
|
53
48
|
}
|
|
54
|
-
|
|
55
49
|
static reverse() {
|
|
56
50
|
const instance = SequencedTransition.createInstance();
|
|
57
51
|
return instance.reverse();
|
|
58
52
|
}
|
|
59
|
-
|
|
60
53
|
reverse() {
|
|
61
54
|
this.reversed = !this.reversed;
|
|
62
55
|
return this;
|
|
63
56
|
}
|
|
64
|
-
|
|
65
57
|
}
|
|
66
|
-
|
|
67
58
|
exports.SequencedTransition = SequencedTransition;
|
|
68
59
|
//# sourceMappingURL=SequencedTransition.js.map
|