react-native-reanimated 3.0.2 → 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 +1 -0
- 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
package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/SequencedTransition.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["SequencedTransition","BaseAnimationBuilder","delayFunction","getDelayFunction","callback","callbackV","delay","getDelay","sequenceDuration","durationV","config","duration","reverse","reversed","values","initialValues","originX","currentOriginX","originY","currentOriginY","width","currentWidth","height","currentHeight","animations","withSequence","withTiming","targetOriginX","targetOriginY","targetWidth","targetHeight","createInstance","instance"],"sources":["SequencedTransition.ts"],"sourcesContent":["import { withSequence, withTiming } from '../../animation';\nimport {\n ILayoutAnimationBuilder,\n LayoutAnimationFunction,\n} from '../animationBuilder/commonTypes';\nimport { BaseAnimationBuilder } from '../animationBuilder';\n\nexport class SequencedTransition\n extends BaseAnimationBuilder\n implements ILayoutAnimationBuilder\n{\n reversed = false;\n\n static createInstance(): SequencedTransition {\n return new SequencedTransition();\n }\n\n static reverse(): SequencedTransition {\n const instance = SequencedTransition.createInstance();\n return instance.reverse();\n }\n\n reverse(): SequencedTransition {\n this.reversed = !this.reversed;\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 sequenceDuration = (this.durationV ?? 500) / 2;\n const config = { duration: sequenceDuration };\n const reverse = this.reversed;\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 withSequence(\n withTiming(\n reverse ? values.currentOriginX : values.targetOriginX,\n config\n ),\n withTiming(values.targetOriginX, config)\n )\n ),\n originY: delayFunction(\n delay,\n withSequence(\n withTiming(\n reverse ? values.targetOriginY : values.currentOriginY,\n config\n ),\n withTiming(values.targetOriginY, config)\n )\n ),\n width: delayFunction(\n delay,\n withSequence(\n withTiming(\n reverse ? values.currentWidth : values.targetWidth,\n config\n ),\n withTiming(values.targetWidth, config)\n )\n ),\n height: delayFunction(\n delay,\n withSequence(\n withTiming(\n reverse ? values.targetHeight : values.currentHeight,\n config\n ),\n withTiming(values.targetHeight, config)\n )\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","SequencedTransition","BaseAnimationBuilder","constructor","arguments","delayFunction","getDelayFunction","callback","callbackV","delay","getDelay","sequenceDuration","durationV","config","duration","reverse","reversed","values","initialValues","originX","currentOriginX","originY","currentOriginY","width","currentWidth","height","currentHeight","animations","withSequence","withTiming","targetOriginX","targetOriginY","targetWidth","targetHeight","createInstance","instance","exports"],"sources":["SequencedTransition.ts"],"sourcesContent":["import { withSequence, withTiming } from '../../animation';\nimport {\n ILayoutAnimationBuilder,\n LayoutAnimationFunction,\n} from '../animationBuilder/commonTypes';\nimport { BaseAnimationBuilder } from '../animationBuilder';\n\nexport class SequencedTransition\n extends BaseAnimationBuilder\n implements ILayoutAnimationBuilder\n{\n reversed = false;\n\n static createInstance(): SequencedTransition {\n return new SequencedTransition();\n }\n\n static reverse(): SequencedTransition {\n const instance = SequencedTransition.createInstance();\n return instance.reverse();\n }\n\n reverse(): SequencedTransition {\n this.reversed = !this.reversed;\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 sequenceDuration = (this.durationV ?? 500) / 2;\n const config = { duration: sequenceDuration };\n const reverse = this.reversed;\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 withSequence(\n withTiming(\n reverse ? values.currentOriginX : values.targetOriginX,\n config\n ),\n withTiming(values.targetOriginX, config)\n )\n ),\n originY: delayFunction(\n delay,\n withSequence(\n withTiming(\n reverse ? values.targetOriginY : values.currentOriginY,\n config\n ),\n withTiming(values.targetOriginY, config)\n )\n ),\n width: delayFunction(\n delay,\n withSequence(\n withTiming(\n reverse ? values.currentWidth : values.targetWidth,\n config\n ),\n withTiming(values.targetWidth, config)\n )\n ),\n height: delayFunction(\n delay,\n withSequence(\n withTiming(\n reverse ? values.targetHeight : values.currentHeight,\n config\n ),\n withTiming(values.targetHeight, config)\n )\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,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IAC3C,OAAO,IAAIjC,mBAAmB,EAAE;EAClC;EAEA,OAAOc,OAAOA,CAAA,EAAwB;IACpC,MAAMoB,QAAQ,GAAGlC,mBAAmB,CAACiC,cAAc,EAAE;IACrD,OAAOC,QAAQ,CAACpB,OAAO,EAAE;EAC3B;EAEAA,OAAOA,CAAA,EAAwB;IAC7B,IAAI,CAACC,QAAQ,GAAG,CAAC,IAAI,CAACA,QAAQ;IAC9B,OAAO,IAAI;EACb;AAiEF;AAACoB,OAAA,CAAAnC,mBAAA,GAAAA,mBAAA"}
|
|
@@ -3,9 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
|
|
7
6
|
var _LinearTransition = require("./LinearTransition");
|
|
8
|
-
|
|
9
7
|
Object.keys(_LinearTransition).forEach(function (key) {
|
|
10
8
|
if (key === "default" || key === "__esModule") return;
|
|
11
9
|
if (key in exports && exports[key] === _LinearTransition[key]) return;
|
|
@@ -16,9 +14,7 @@ Object.keys(_LinearTransition).forEach(function (key) {
|
|
|
16
14
|
}
|
|
17
15
|
});
|
|
18
16
|
});
|
|
19
|
-
|
|
20
17
|
var _FadingTransition = require("./FadingTransition");
|
|
21
|
-
|
|
22
18
|
Object.keys(_FadingTransition).forEach(function (key) {
|
|
23
19
|
if (key === "default" || key === "__esModule") return;
|
|
24
20
|
if (key in exports && exports[key] === _FadingTransition[key]) return;
|
|
@@ -29,9 +25,7 @@ Object.keys(_FadingTransition).forEach(function (key) {
|
|
|
29
25
|
}
|
|
30
26
|
});
|
|
31
27
|
});
|
|
32
|
-
|
|
33
28
|
var _SequencedTransition = require("./SequencedTransition");
|
|
34
|
-
|
|
35
29
|
Object.keys(_SequencedTransition).forEach(function (key) {
|
|
36
30
|
if (key === "default" || key === "__esModule") return;
|
|
37
31
|
if (key in exports && exports[key] === _SequencedTransition[key]) return;
|
|
@@ -42,9 +36,7 @@ Object.keys(_SequencedTransition).forEach(function (key) {
|
|
|
42
36
|
}
|
|
43
37
|
});
|
|
44
38
|
});
|
|
45
|
-
|
|
46
39
|
var _JumpingTransition = require("./JumpingTransition");
|
|
47
|
-
|
|
48
40
|
Object.keys(_JumpingTransition).forEach(function (key) {
|
|
49
41
|
if (key === "default" || key === "__esModule") return;
|
|
50
42
|
if (key in exports && exports[key] === _JumpingTransition[key]) return;
|
|
@@ -55,9 +47,7 @@ Object.keys(_JumpingTransition).forEach(function (key) {
|
|
|
55
47
|
}
|
|
56
48
|
});
|
|
57
49
|
});
|
|
58
|
-
|
|
59
50
|
var _CurvedTransition = require("./CurvedTransition");
|
|
60
|
-
|
|
61
51
|
Object.keys(_CurvedTransition).forEach(function (key) {
|
|
62
52
|
if (key === "default" || key === "__esModule") return;
|
|
63
53
|
if (key in exports && exports[key] === _CurvedTransition[key]) return;
|
|
@@ -68,9 +58,7 @@ Object.keys(_CurvedTransition).forEach(function (key) {
|
|
|
68
58
|
}
|
|
69
59
|
});
|
|
70
60
|
});
|
|
71
|
-
|
|
72
61
|
var _EntryExitTransition = require("./EntryExitTransition");
|
|
73
|
-
|
|
74
62
|
Object.keys(_EntryExitTransition).forEach(function (key) {
|
|
75
63
|
if (key === "default" || key === "__esModule") return;
|
|
76
64
|
if (key in exports && exports[key] === _EntryExitTransition[key]) return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from './LinearTransition';\nexport * from './FadingTransition';\nexport * from './SequencedTransition';\nexport * from './JumpingTransition';\nexport * from './CurvedTransition';\nexport * from './EntryExitTransition';\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_LinearTransition","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_FadingTransition","_SequencedTransition","_JumpingTransition","_CurvedTransition","_EntryExitTransition"],"sources":["index.ts"],"sourcesContent":["export * from './LinearTransition';\nexport * from './FadingTransition';\nexport * from './SequencedTransition';\nexport * from './JumpingTransition';\nexport * from './CurvedTransition';\n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AA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAO,kBAAA,CAAAP,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAG,kBAAA,CAAAP,GAAA;IAAA;EAAA;AAAA;AACA,IAAAQ,iBAAA,GAAAZ,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAU,iBAAA,EAAAT,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAQ,iBAAA,CAAAR,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAI,iBAAA,CAAAR,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,oBAAA,GAAAb,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAW,oBAAA,EAAAV,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAS,oBAAA,CAAAT,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAK,oBAAA,CAAAT,GAAA;IAAA;EAAA;AAAA"}
|
|
@@ -3,11 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
|
|
7
6
|
require("./animationsManager");
|
|
8
|
-
|
|
9
7
|
var _animationBuilder = require("./animationBuilder");
|
|
10
|
-
|
|
11
8
|
Object.keys(_animationBuilder).forEach(function (key) {
|
|
12
9
|
if (key === "default" || key === "__esModule") return;
|
|
13
10
|
if (key in exports && exports[key] === _animationBuilder[key]) return;
|
|
@@ -18,9 +15,7 @@ Object.keys(_animationBuilder).forEach(function (key) {
|
|
|
18
15
|
}
|
|
19
16
|
});
|
|
20
17
|
});
|
|
21
|
-
|
|
22
18
|
var _defaultAnimations = require("./defaultAnimations");
|
|
23
|
-
|
|
24
19
|
Object.keys(_defaultAnimations).forEach(function (key) {
|
|
25
20
|
if (key === "default" || key === "__esModule") return;
|
|
26
21
|
if (key in exports && exports[key] === _defaultAnimations[key]) return;
|
|
@@ -31,9 +26,7 @@ Object.keys(_defaultAnimations).forEach(function (key) {
|
|
|
31
26
|
}
|
|
32
27
|
});
|
|
33
28
|
});
|
|
34
|
-
|
|
35
29
|
var _defaultTransitions = require("./defaultTransitions");
|
|
36
|
-
|
|
37
30
|
Object.keys(_defaultTransitions).forEach(function (key) {
|
|
38
31
|
if (key === "default" || key === "__esModule") return;
|
|
39
32
|
if (key in exports && exports[key] === _defaultTransitions[key]) return;
|
|
@@ -44,9 +37,7 @@ Object.keys(_defaultTransitions).forEach(function (key) {
|
|
|
44
37
|
}
|
|
45
38
|
});
|
|
46
39
|
});
|
|
47
|
-
|
|
48
40
|
var _sharedTransitions = require("./sharedTransitions");
|
|
49
|
-
|
|
50
41
|
Object.keys(_sharedTransitions).forEach(function (key) {
|
|
51
42
|
if (key === "default" || key === "__esModule") return;
|
|
52
43
|
if (key in exports && exports[key] === _sharedTransitions[key]) return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["import './animationsManager';\nexport * from './animationBuilder';\nexport * from './defaultAnimations';\nexport * from './defaultTransitions';\nexport * from './sharedTransitions';\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["require","_animationBuilder","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_defaultAnimations","_defaultTransitions","_sharedTransitions"],"sources":["index.ts"],"sourcesContent":["import './animationsManager';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AAAE,MAAA,CAAAC,IAAA,CAAAS,kBAAA,EAAAR,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAO,kBAAA,CAAAP,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAG,kBAAA,CAAAP,GAAA;IAAA;EAAA;AAAA"}
|
|
@@ -4,37 +4,29 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.SharedTransition = exports.DefaultSharedTransition = void 0;
|
|
7
|
-
|
|
8
7
|
var _animation = require("../../animation");
|
|
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
|
const supportedProps = ['width', 'height', 'originX', 'originY', 'transform'];
|
|
13
|
-
|
|
14
12
|
class SharedTransition {
|
|
15
13
|
constructor() {
|
|
16
14
|
_defineProperty(this, "animationFactory", null);
|
|
17
|
-
|
|
18
15
|
_defineProperty(this, "defaultDuration", 500);
|
|
19
16
|
}
|
|
20
|
-
|
|
21
17
|
static createInstance() {
|
|
22
18
|
return new SharedTransition();
|
|
23
19
|
}
|
|
24
|
-
|
|
25
20
|
static custom(animationFactory) {
|
|
26
21
|
return this.createInstance().custom(animationFactory);
|
|
27
22
|
}
|
|
28
|
-
|
|
29
23
|
custom(animationFactory) {
|
|
30
24
|
this.animationFactory = animationFactory;
|
|
31
25
|
return this;
|
|
32
26
|
}
|
|
33
|
-
|
|
34
27
|
static build() {
|
|
35
28
|
return this.createInstance().build();
|
|
36
29
|
}
|
|
37
|
-
|
|
38
30
|
build() {
|
|
39
31
|
const animationFactory = this.animationFactory;
|
|
40
32
|
const animationDuration = this.defaultDuration;
|
|
@@ -43,10 +35,8 @@ class SharedTransition {
|
|
|
43
35
|
|
|
44
36
|
let animations = {};
|
|
45
37
|
const initialValues = {};
|
|
46
|
-
|
|
47
38
|
if (animationFactory) {
|
|
48
39
|
animations = animationFactory(values);
|
|
49
|
-
|
|
50
40
|
for (const key in animations) {
|
|
51
41
|
if (!supportedProps.includes(key)) {
|
|
52
42
|
throw Error(`The prop '${key}' is not supported yet.`);
|
|
@@ -69,7 +59,6 @@ class SharedTransition {
|
|
|
69
59
|
}
|
|
70
60
|
}
|
|
71
61
|
}
|
|
72
|
-
|
|
73
62
|
for (const propName in animations) {
|
|
74
63
|
if (propName === 'transform') {
|
|
75
64
|
initialValues.transformMatrix = values.currentTransformMatrix;
|
|
@@ -78,16 +67,13 @@ class SharedTransition {
|
|
|
78
67
|
initialValues[propName] = values[keyToCurrentValue];
|
|
79
68
|
}
|
|
80
69
|
}
|
|
81
|
-
|
|
82
70
|
return {
|
|
83
71
|
initialValues,
|
|
84
72
|
animations
|
|
85
73
|
};
|
|
86
74
|
};
|
|
87
75
|
}
|
|
88
|
-
|
|
89
76
|
}
|
|
90
|
-
|
|
91
77
|
exports.SharedTransition = SharedTransition;
|
|
92
78
|
const DefaultSharedTransition = SharedTransition;
|
|
93
79
|
exports.DefaultSharedTransition = DefaultSharedTransition;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["supportedProps","SharedTransition","createInstance","custom","animationFactory","build","animationDuration","defaultDuration","values","animations","initialValues","
|
|
1
|
+
{"version":3,"names":["_animation","require","_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","supportedProps","SharedTransition","constructor","createInstance","custom","animationFactory","build","animationDuration","defaultDuration","values","animations","initialValues","includes","Error","propName","matrix","targetTransformMatrix","transformMatrix","withTiming","duration","keyToTargetValue","charAt","toUpperCase","slice","currentTransformMatrix","keyToCurrentValue","exports","DefaultSharedTransition"],"sources":["index.ts"],"sourcesContent":["import { withTiming } from '../../animation';\nimport {\n ILayoutAnimationBuilder,\n LayoutAnimationFunction,\n LayoutAnimationsValues,\n} from '../animationBuilder/commonTypes';\nimport { StyleProps } from '../../commonTypes';\n\nconst supportedProps = ['width', 'height', 'originX', 'originY', 'transform'];\n\ntype AnimationFactoryType = (values: LayoutAnimationsValues) => StyleProps;\n\nexport class SharedTransition implements ILayoutAnimationBuilder {\n animationFactory: AnimationFactoryType | null = null;\n defaultDuration = 500;\n\n static createInstance(): SharedTransition {\n return new SharedTransition();\n }\n\n static custom(animationFactory: AnimationFactoryType): SharedTransition {\n return this.createInstance().custom(animationFactory);\n }\n\n custom(animationFactory: AnimationFactoryType): SharedTransition {\n this.animationFactory = animationFactory;\n return this;\n }\n\n static build(): LayoutAnimationFunction {\n return this.createInstance().build();\n }\n\n build(): LayoutAnimationFunction {\n const animationFactory = this.animationFactory;\n const animationDuration = this.defaultDuration;\n return (values: LayoutAnimationsValues) => {\n 'worklet';\n let animations: {\n [key: string]: any;\n } = {};\n const initialValues: {\n [key: string]: any;\n } = {};\n\n if (animationFactory) {\n animations = animationFactory(values);\n for (const key in animations) {\n if (!supportedProps.includes(key)) {\n throw Error(`The prop '${key}' is not supported yet.`);\n }\n }\n } else {\n for (const propName of supportedProps) {\n if (propName === 'transform') {\n const matrix = values.targetTransformMatrix;\n animations.transformMatrix = withTiming(matrix, {\n // native screen transition takes around 500ms\n duration: animationDuration,\n });\n } else {\n const keyToTargetValue =\n 'target' + propName.charAt(0).toUpperCase() + propName.slice(1);\n animations[propName] = withTiming(values[keyToTargetValue], {\n // native screen transition takes around 500ms\n duration: animationDuration,\n });\n }\n }\n }\n\n for (const propName in animations) {\n if (propName === 'transform') {\n initialValues.transformMatrix = values.currentTransformMatrix;\n } else {\n const keyToCurrentValue =\n 'current' + propName.charAt(0).toUpperCase() + propName.slice(1);\n initialValues[propName] = values[keyToCurrentValue];\n }\n }\n\n return { initialValues, animations };\n };\n }\n}\n\nexport const DefaultSharedTransition = SharedTransition;\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAA6C,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,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;AAQ7C,MAAMU,cAAc,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,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ACZ,CAAC,CAAC;UACJ,CAAC,MAAM;YACL,MAAMa,gBAAgB,GACpB,QAAQ,GAAGN,QAAQ,CAACO,MAAM,CAAC,CAAC,CAAC,CAACC,WAAW,EAAE,GAAGR,QAAQ,CAACS,KAAK,CAAC,CAAC,CAAC;YACjEb,UAAU,CAACI,QAAQ,CAAC,GAAG,IAAAI,qBAAU,EAACT,MAAM,CAACW,gBAAgB,CAAC,EAAE;cAC1D;cACAD,QAAQ,EAAEZ;YACZ,CAAC,CAAC;UACJ;QACF;MACF;MAEA,KAAK,MAAMO,QAAQ,IAAIJ,UAAU,EAAE;QACjC,IAAII,QAAQ,KAAK,WAAW,EAAE;UAC5BH,aAAa,CAACM,eAAe,GAAGR,MAAM,CAACe,sBAAsB;QAC/D,CAAC,MAAM;UACL,MAAMC,iBAAiB,GACrB,SAAS,GAAGX,QAAQ,CAACO,MAAM,CAAC,CAAC,CAAC,CAACC,WAAW,EAAE,GAAGR,QAAQ,CAACS,KAAK,CAAC,CAAC,CAAC;UAClEZ,aAAa,CAACG,QAAQ,CAAC,GAAGL,MAAM,CAACgB,iBAAiB,CAAC;QACrD;MACF;MAEA,OAAO;QAAEd,aAAa;QAAED;MAAW,CAAC;IACtC,CAAC;EACH;AACF;AAACgB,OAAA,CAAAzB,gBAAA,GAAAA,gBAAA;AAEM,MAAM0B,uBAAuB,GAAG1B,gBAAgB;AAACyB,OAAA,CAAAC,uBAAA,GAAAA,uBAAA"}
|
|
@@ -6,20 +6,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.createMapperRegistry = createMapperRegistry;
|
|
7
7
|
exports.startMapper = startMapper;
|
|
8
8
|
exports.stopMapper = stopMapper;
|
|
9
|
-
|
|
10
9
|
var _PlatformChecker = require("./PlatformChecker");
|
|
11
|
-
|
|
12
10
|
var _threads = require("./threads");
|
|
13
|
-
|
|
11
|
+
var _utils = require("./utils");
|
|
14
12
|
const IS_JEST = (0, _PlatformChecker.isJest)();
|
|
15
|
-
|
|
16
13
|
function createMapperRegistry() {
|
|
17
14
|
'worklet';
|
|
18
15
|
|
|
19
16
|
const mappers = new Map();
|
|
20
17
|
let sortedMappers = [];
|
|
21
18
|
let runRequested = false;
|
|
22
|
-
|
|
19
|
+
let processingMappers = false;
|
|
23
20
|
function updateMappersOrder() {
|
|
24
21
|
// sort mappers topologically
|
|
25
22
|
// the algorithm here takes adventage of a fact that the topological order
|
|
@@ -42,12 +39,10 @@ function createMapperRegistry() {
|
|
|
42
39
|
// instead of reversing that order we can use a normal array and push processed
|
|
43
40
|
// mappers to the end. There is no need to reverse that array after we are done.
|
|
44
41
|
const pre = new Map(); // map from sv -> mapper that outputs that sv
|
|
45
|
-
|
|
46
42
|
mappers.forEach(mapper => {
|
|
47
43
|
if (mapper.outputs) {
|
|
48
44
|
for (const output of mapper.outputs) {
|
|
49
45
|
const preMappers = pre.get(output);
|
|
50
|
-
|
|
51
46
|
if (preMappers === undefined) {
|
|
52
47
|
pre.set(output, [mapper]);
|
|
53
48
|
} else {
|
|
@@ -58,13 +53,10 @@ function createMapperRegistry() {
|
|
|
58
53
|
});
|
|
59
54
|
const visited = new Set();
|
|
60
55
|
const newOrder = [];
|
|
61
|
-
|
|
62
56
|
function dfs(mapper) {
|
|
63
57
|
visited.add(mapper);
|
|
64
|
-
|
|
65
58
|
for (const input of mapper.inputs) {
|
|
66
59
|
const preMappers = pre.get(input);
|
|
67
|
-
|
|
68
60
|
if (preMappers) {
|
|
69
61
|
for (const preMapper of preMappers) {
|
|
70
62
|
if (!visited.has(preMapper)) {
|
|
@@ -73,10 +65,8 @@ function createMapperRegistry() {
|
|
|
73
65
|
}
|
|
74
66
|
}
|
|
75
67
|
}
|
|
76
|
-
|
|
77
68
|
newOrder.push(mapper);
|
|
78
69
|
}
|
|
79
|
-
|
|
80
70
|
mappers.forEach(mapper => {
|
|
81
71
|
if (!visited.has(mapper)) {
|
|
82
72
|
dfs(mapper);
|
|
@@ -84,25 +74,23 @@ function createMapperRegistry() {
|
|
|
84
74
|
});
|
|
85
75
|
sortedMappers = newOrder;
|
|
86
76
|
}
|
|
87
|
-
|
|
88
77
|
function mapperRun() {
|
|
78
|
+
processingMappers = true;
|
|
89
79
|
runRequested = false;
|
|
90
|
-
|
|
91
80
|
if (mappers.size !== sortedMappers.length) {
|
|
92
81
|
updateMappersOrder();
|
|
93
82
|
}
|
|
94
|
-
|
|
95
83
|
for (const mapper of sortedMappers) {
|
|
96
84
|
if (mapper.dirty) {
|
|
97
85
|
mapper.dirty = false;
|
|
98
86
|
mapper.worklet();
|
|
99
87
|
}
|
|
100
88
|
}
|
|
89
|
+
processingMappers = false;
|
|
101
90
|
}
|
|
102
|
-
|
|
103
91
|
function maybeRequestUpdates() {
|
|
104
92
|
if (IS_JEST) {
|
|
105
|
-
// On Jest environment we avoid using
|
|
93
|
+
// On Jest environment we avoid using queueMicrotask as that'd require test
|
|
106
94
|
// to advance the clock manually. This on other hand would require tests
|
|
107
95
|
// to know how many times mappers need to run. As we don't want tests to
|
|
108
96
|
// make any assumptions on that number it is easier to execute mappers
|
|
@@ -110,27 +98,42 @@ function createMapperRegistry() {
|
|
|
110
98
|
// if they want to make any assertions on the effects of animations being run.
|
|
111
99
|
mapperRun();
|
|
112
100
|
} else if (!runRequested) {
|
|
113
|
-
|
|
101
|
+
if (processingMappers) {
|
|
102
|
+
// In general, we should avoid having mappers trigger updates as this may
|
|
103
|
+
// result in unpredictable behavior. Specifically, the updated value can
|
|
104
|
+
// be read by mappers that run later in the same frame but previous mappers
|
|
105
|
+
// would access the old value. Updating mappers during the mapper-run phase
|
|
106
|
+
// breaks the order in which we should execute the mappers. However, doing
|
|
107
|
+
// that is still a possibility and there are some instances where people use
|
|
108
|
+
// the API in that way, hence we need to prevent mapper-run phase falling into
|
|
109
|
+
// an infinite loop. We do that by detecting when mapper-run is requested while
|
|
110
|
+
// we are already in mapper-run phase, and in that case we use `requestAnimationFrame`
|
|
111
|
+
// instead of `queueMicrotask` which will schedule mapper run for the next
|
|
112
|
+
// frame instead of queuing another set of updates in the same frame.
|
|
113
|
+
requestAnimationFrame(mapperRun);
|
|
114
|
+
} else {
|
|
115
|
+
queueMicrotask(mapperRun);
|
|
116
|
+
}
|
|
114
117
|
runRequested = true;
|
|
115
118
|
}
|
|
116
119
|
}
|
|
117
|
-
|
|
118
120
|
function extractInputs(inputs, resultArray) {
|
|
119
121
|
if (Array.isArray(inputs)) {
|
|
120
122
|
for (const input of inputs) {
|
|
121
123
|
input && extractInputs(input, resultArray);
|
|
122
124
|
}
|
|
123
|
-
} else if (
|
|
125
|
+
} else if ((0, _utils.isSharedValue)(inputs)) {
|
|
124
126
|
resultArray.push(inputs);
|
|
125
|
-
} else if (
|
|
127
|
+
} else if (Object.getPrototypeOf(inputs) === Object.prototype) {
|
|
128
|
+
// we only extract inputs recursively from "plain" objects here, if object
|
|
129
|
+
// is of a derivative class (e.g. HostObject on web, or Map) we don't scan
|
|
130
|
+
// it recursively
|
|
126
131
|
for (const element of Object.values(inputs)) {
|
|
127
132
|
element && extractInputs(element, resultArray);
|
|
128
133
|
}
|
|
129
134
|
}
|
|
130
|
-
|
|
131
135
|
return resultArray;
|
|
132
136
|
}
|
|
133
|
-
|
|
134
137
|
return {
|
|
135
138
|
start: (mapperID, worklet, inputs, outputs) => {
|
|
136
139
|
const mapper = {
|
|
@@ -142,23 +145,19 @@ function createMapperRegistry() {
|
|
|
142
145
|
};
|
|
143
146
|
mappers.set(mapper.id, mapper);
|
|
144
147
|
sortedMappers = [];
|
|
145
|
-
|
|
146
148
|
for (const sv of mapper.inputs) {
|
|
147
149
|
sv.addListener(mapper.id, () => {
|
|
148
150
|
mapper.dirty = true;
|
|
149
151
|
maybeRequestUpdates();
|
|
150
152
|
});
|
|
151
153
|
}
|
|
152
|
-
|
|
153
154
|
maybeRequestUpdates();
|
|
154
155
|
},
|
|
155
156
|
stop: mapperID => {
|
|
156
157
|
const mapper = mappers.get(mapperID);
|
|
157
|
-
|
|
158
158
|
if (mapper) {
|
|
159
159
|
mappers.delete(mapper.id);
|
|
160
160
|
sortedMappers = [];
|
|
161
|
-
|
|
162
161
|
for (const sv of mapper.inputs) {
|
|
163
162
|
sv.removeListener(mapper.id);
|
|
164
163
|
}
|
|
@@ -166,9 +165,7 @@ function createMapperRegistry() {
|
|
|
166
165
|
}
|
|
167
166
|
};
|
|
168
167
|
}
|
|
169
|
-
|
|
170
168
|
let MAPPER_ID = 9999;
|
|
171
|
-
|
|
172
169
|
function startMapper(worklet) {
|
|
173
170
|
let inputs = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
174
171
|
let outputs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
@@ -177,16 +174,13 @@ function startMapper(worklet) {
|
|
|
177
174
|
'worklet';
|
|
178
175
|
|
|
179
176
|
let mapperRegistry = global.__mapperRegistry;
|
|
180
|
-
|
|
181
177
|
if (mapperRegistry === undefined) {
|
|
182
178
|
mapperRegistry = global.__mapperRegistry = createMapperRegistry();
|
|
183
179
|
}
|
|
184
|
-
|
|
185
180
|
mapperRegistry.start(mapperID, worklet, inputs, outputs);
|
|
186
181
|
})();
|
|
187
182
|
return mapperID;
|
|
188
183
|
}
|
|
189
|
-
|
|
190
184
|
function stopMapper(mapperID) {
|
|
191
185
|
(0, _threads.runOnUI)(() => {
|
|
192
186
|
'worklet';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["IS_JEST","isJest","createMapperRegistry","mappers","Map","sortedMappers","runRequested","updateMappersOrder","pre","forEach","mapper","outputs","output","preMappers","get","undefined","set","push","visited","Set","newOrder","dfs","add","input","inputs","preMapper","has","mapperRun","size","length","dirty","worklet","maybeRequestUpdates","setImmediate","extractInputs","resultArray","Array","isArray","addListener","element","Object","values","start","mapperID","id","sv","stop","delete","removeListener","MAPPER_ID","startMapper","runOnUI","mapperRegistry","global","__mapperRegistry","stopMapper"],"sources":["mappers.ts"],"sourcesContent":["import { SharedValue } from './commonTypes';\nimport { isJest } from './PlatformChecker';\nimport { runOnUI } from './threads';\n\nconst IS_JEST = isJest();\n\nexport type Mapper = {\n id: number;\n dirty: boolean;\n worklet: () => void;\n inputs: SharedValue<any>[];\n outputs?: SharedValue<any>[];\n};\n\nexport function createMapperRegistry() {\n 'worklet';\n const mappers = new Map();\n let sortedMappers: Mapper[] = [];\n\n let runRequested = false;\n\n function updateMappersOrder() {\n // sort mappers topologically\n // the algorithm here takes adventage of a fact that the topological order\n // of a transposed graph is a reverse topological order of the original graph\n // The graph in our case consists of mappers and an edge between two mappers\n // A and B exists if there is a shared value that's on A's output lists and on\n // B's input list.\n //\n // We don't need however to calculate that graph as it is easier to work with\n // the transposed version of it that can be calculated ad-hoc. For the transposed\n // version to be traversed we use \"pre\" map that maps share value to mappers that\n // output that shared value. Then we can infer all the outgoing edges for a given\n // mapper simply by scanning it's input list and checking if any of the shared values\n // from that list exists in the \"pre\" map. If they do, then we have an edge between\n // that mapper and the mappers from the \"pre\" list for the given shared value.\n //\n // For topological sorting we use a dfs-based approach that requires the graph to\n // be traversed in dfs order and each node after being processed lands at the\n // beginning of the topological order list. Since we traverse a transposed graph,\n // instead of reversing that order we can use a normal array and push processed\n // mappers to the end. There is no need to reverse that array after we are done.\n const pre = new Map(); // map from sv -> mapper that outputs that sv\n mappers.forEach((mapper) => {\n if (mapper.outputs) {\n for (const output of mapper.outputs) {\n const preMappers = pre.get(output);\n if (preMappers === undefined) {\n pre.set(output, [mapper]);\n } else {\n preMappers.push(mapper);\n }\n }\n }\n });\n const visited = new Set();\n const newOrder: Mapper[] = [];\n function dfs(mapper: Mapper) {\n visited.add(mapper);\n for (const input of mapper.inputs) {\n const preMappers = pre.get(input);\n if (preMappers) {\n for (const preMapper of preMappers) {\n if (!visited.has(preMapper)) {\n dfs(preMapper);\n }\n }\n }\n }\n newOrder.push(mapper);\n }\n mappers.forEach((mapper) => {\n if (!visited.has(mapper)) {\n dfs(mapper);\n }\n });\n sortedMappers = newOrder;\n }\n\n function mapperRun() {\n runRequested = false;\n if (mappers.size !== sortedMappers.length) {\n updateMappersOrder();\n }\n for (const mapper of sortedMappers) {\n if (mapper.dirty) {\n mapper.dirty = false;\n mapper.worklet();\n }\n }\n }\n\n function maybeRequestUpdates() {\n if (IS_JEST) {\n // On Jest environment we avoid using setImmediate as that'd require test\n // to advance the clock manually. This on other hand would require tests\n // to know how many times mappers need to run. As we don't want tests to\n // make any assumptions on that number it is easier to execute mappers\n // immediately for testing purposes and only expect test to advance timers\n // if they want to make any assertions on the effects of animations being run.\n mapperRun();\n } else if (!runRequested) {\n setImmediate(mapperRun);\n runRequested = true;\n }\n }\n\n function extractInputs(\n inputs: any,\n resultArray: SharedValue<any>[]\n ): SharedValue<any>[] {\n if (Array.isArray(inputs)) {\n for (const input of inputs) {\n input && extractInputs(input, resultArray);\n }\n } else if (inputs.addListener) {\n resultArray.push(inputs);\n } else if (typeof inputs === 'object') {\n for (const element of Object.values(inputs)) {\n element && extractInputs(element, resultArray);\n }\n }\n return resultArray;\n }\n\n return {\n start: (\n mapperID: number,\n worklet: () => void,\n inputs: SharedValue<any>[],\n outputs?: SharedValue<any>[]\n ) => {\n const mapper = {\n id: mapperID,\n dirty: true,\n worklet,\n inputs: extractInputs(inputs, []),\n outputs,\n };\n mappers.set(mapper.id, mapper);\n sortedMappers = [];\n for (const sv of mapper.inputs) {\n sv.addListener(mapper.id, () => {\n mapper.dirty = true;\n maybeRequestUpdates();\n });\n }\n maybeRequestUpdates();\n },\n stop: (mapperID: number) => {\n const mapper = mappers.get(mapperID);\n if (mapper) {\n mappers.delete(mapper.id);\n sortedMappers = [];\n for (const sv of mapper.inputs) {\n sv.removeListener(mapper.id);\n }\n }\n },\n };\n}\n\nlet MAPPER_ID = 9999;\n\nexport function startMapper(\n worklet: () => void,\n inputs: any[] = [],\n outputs: any[] = []\n): number {\n const mapperID = (MAPPER_ID += 1);\n\n runOnUI(() => {\n 'worklet';\n let mapperRegistry = global.__mapperRegistry;\n if (mapperRegistry === undefined) {\n mapperRegistry = global.__mapperRegistry = createMapperRegistry();\n }\n mapperRegistry.start(mapperID, worklet, inputs, outputs);\n })();\n\n return mapperID;\n}\n\nexport function stopMapper(mapperID: number): void {\n runOnUI(() => {\n 'worklet';\n const mapperRegistry = global.__mapperRegistry;\n mapperRegistry?.stop(mapperID);\n })();\n}\n"],"mappings":";;;;;;;;;AACA;;AACA;;AAEA,MAAMA,OAAO,GAAG,IAAAC,uBAAA,GAAhB;;AAUO,SAASC,oBAAT,GAAgC;EACrC;;EACA,MAAMC,OAAO,GAAG,IAAIC,GAAJ,EAAhB;EACA,IAAIC,aAAuB,GAAG,EAA9B;EAEA,IAAIC,YAAY,GAAG,KAAnB;;EAEA,SAASC,kBAAT,GAA8B;IAC5B;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,MAAMC,GAAG,GAAG,IAAIJ,GAAJ,EAAZ,CArB4B,CAqBL;;IACvBD,OAAO,CAACM,OAAR,CAAiBC,MAAD,IAAY;MAC1B,IAAIA,MAAM,CAACC,OAAX,EAAoB;QAClB,KAAK,MAAMC,MAAX,IAAqBF,MAAM,CAACC,OAA5B,EAAqC;UACnC,MAAME,UAAU,GAAGL,GAAG,CAACM,GAAJ,CAAQF,MAAR,CAAnB;;UACA,IAAIC,UAAU,KAAKE,SAAnB,EAA8B;YAC5BP,GAAG,CAACQ,GAAJ,CAAQJ,MAAR,EAAgB,CAACF,MAAD,CAAhB;UACD,CAFD,MAEO;YACLG,UAAU,CAACI,IAAX,CAAgBP,MAAhB;UACD;QACF;MACF;IACF,CAXD;IAYA,MAAMQ,OAAO,GAAG,IAAIC,GAAJ,EAAhB;IACA,MAAMC,QAAkB,GAAG,EAA3B;;IACA,SAASC,GAAT,CAAaX,MAAb,EAA6B;MAC3BQ,OAAO,CAACI,GAAR,CAAYZ,MAAZ;;MACA,KAAK,MAAMa,KAAX,IAAoBb,MAAM,CAACc,MAA3B,EAAmC;QACjC,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zB;QACD;MACF;IACF;EAjCI,CAAP;AAmCD;;AAED,IAAIK,SAAS,GAAG,IAAhB;;AAEO,SAASC,WAAT,CACLnB,OADK,EAIG;EAAA,IAFRP,MAEQ,uEAFQ,EAER;EAAA,IADRb,OACQ,uEADS,EACT;EACR,MAAMgC,QAAQ,GAAIM,SAAS,IAAI,CAA/B;EAEA,IAAAE,gBAAA,EAAQ,MAAM;IACZ;;IACA,IAAIC,cAAc,GAAGC,MAAM,CAACC,gBAA5B;;IACA,IAAIF,cAAc,KAAKrC,SAAvB,EAAkC;MAChCqC,cAAc,GAAGC,MAAM,CAACC,gBAAP,GAA0BpD,oBAAoB,EAA/D;IACD;;IACDkD,cAAc,CAACV,KAAf,CAAqBC,QAArB,EAA+BZ,OAA/B,EAAwCP,MAAxC,EAAgDb,OAAhD;EACD,CAPD;EASA,OAAOgC,QAAP;AACD;;AAEM,SAASY,UAAT,CAAoBZ,QAApB,EAA4C;EACjD,IAAAQ,gBAAA,EAAQ,MAAM;IACZ;;IACA,MAAMC,cAAc,GAAGC,MAAM,CAACC,gBAA9B;IACAF,cAAc,SAAd,IAAAA,cAAc,WAAd,YAAAA,cAAc,CAAEN,IAAhB,CAAqBH,QAArB;EACD,CAJD;AAKD"}
|
|
1
|
+
{"version":3,"names":["_PlatformChecker","require","_threads","_utils","IS_JEST","isJest","createMapperRegistry","mappers","Map","sortedMappers","runRequested","processingMappers","updateMappersOrder","pre","forEach","mapper","outputs","output","preMappers","get","undefined","set","push","visited","Set","newOrder","dfs","add","input","inputs","preMapper","has","mapperRun","size","length","dirty","worklet","maybeRequestUpdates","requestAnimationFrame","queueMicrotask","extractInputs","resultArray","Array","isArray","isSharedValue","Object","getPrototypeOf","prototype","element","values","start","mapperID","id","sv","addListener","stop","delete","removeListener","MAPPER_ID","startMapper","arguments","runOnUI","mapperRegistry","global","__mapperRegistry","stopMapper"],"sources":["mappers.ts"],"sourcesContent":["import { SharedValue } from './commonTypes';\nimport { isJest } from './PlatformChecker';\nimport { runOnUI } from './threads';\nimport { isSharedValue } from './utils';\n\nconst IS_JEST = isJest();\n\nexport type Mapper = {\n id: number;\n dirty: boolean;\n worklet: () => void;\n inputs: SharedValue<any>[];\n outputs?: SharedValue<any>[];\n};\n\nexport function createMapperRegistry() {\n 'worklet';\n const mappers = new Map();\n let sortedMappers: Mapper[] = [];\n\n let runRequested = false;\n let processingMappers = false;\n\n function updateMappersOrder() {\n // sort mappers topologically\n // the algorithm here takes adventage of a fact that the topological order\n // of a transposed graph is a reverse topological order of the original graph\n // The graph in our case consists of mappers and an edge between two mappers\n // A and B exists if there is a shared value that's on A's output lists and on\n // B's input list.\n //\n // We don't need however to calculate that graph as it is easier to work with\n // the transposed version of it that can be calculated ad-hoc. For the transposed\n // version to be traversed we use \"pre\" map that maps share value to mappers that\n // output that shared value. Then we can infer all the outgoing edges for a given\n // mapper simply by scanning it's input list and checking if any of the shared values\n // from that list exists in the \"pre\" map. If they do, then we have an edge between\n // that mapper and the mappers from the \"pre\" list for the given shared value.\n //\n // For topological sorting we use a dfs-based approach that requires the graph to\n // be traversed in dfs order and each node after being processed lands at the\n // beginning of the topological order list. Since we traverse a transposed graph,\n // instead of reversing that order we can use a normal array and push processed\n // mappers to the end. There is no need to reverse that array after we are done.\n const pre = new Map(); // map from sv -> mapper that outputs that sv\n mappers.forEach((mapper) => {\n if (mapper.outputs) {\n for (const output of mapper.outputs) {\n const preMappers = pre.get(output);\n if (preMappers === undefined) {\n pre.set(output, [mapper]);\n } else {\n preMappers.push(mapper);\n }\n }\n }\n });\n const visited = new Set();\n const newOrder: Mapper[] = [];\n function dfs(mapper: Mapper) {\n visited.add(mapper);\n for (const input of mapper.inputs) {\n const preMappers = pre.get(input);\n if (preMappers) {\n for (const preMapper of preMappers) {\n if (!visited.has(preMapper)) {\n dfs(preMapper);\n }\n }\n }\n }\n newOrder.push(mapper);\n }\n mappers.forEach((mapper) => {\n if (!visited.has(mapper)) {\n dfs(mapper);\n }\n });\n sortedMappers = newOrder;\n }\n\n function mapperRun() {\n processingMappers = true;\n runRequested = false;\n if (mappers.size !== sortedMappers.length) {\n updateMappersOrder();\n }\n for (const mapper of sortedMappers) {\n if (mapper.dirty) {\n mapper.dirty = false;\n mapper.worklet();\n }\n }\n processingMappers = false;\n }\n\n function maybeRequestUpdates() {\n if (IS_JEST) {\n // On Jest environment we avoid using queueMicrotask as that'd require test\n // to advance the clock manually. This on other hand would require tests\n // to know how many times mappers need to run. As we don't want tests to\n // make any assumptions on that number it is easier to execute mappers\n // immediately for testing purposes and only expect test to advance timers\n // if they want to make any assertions on the effects of animations being run.\n mapperRun();\n } else if (!runRequested) {\n if (processingMappers) {\n // In general, we should avoid having mappers trigger updates as this may\n // result in unpredictable behavior. Specifically, the updated value can\n // be read by mappers that run later in the same frame but previous mappers\n // would access the old value. Updating mappers during the mapper-run phase\n // breaks the order in which we should execute the mappers. However, doing\n // that is still a possibility and there are some instances where people use\n // the API in that way, hence we need to prevent mapper-run phase falling into\n // an infinite loop. We do that by detecting when mapper-run is requested while\n // we are already in mapper-run phase, and in that case we use `requestAnimationFrame`\n // instead of `queueMicrotask` which will schedule mapper run for the next\n // frame instead of queuing another set of updates in the same frame.\n requestAnimationFrame(mapperRun);\n } else {\n queueMicrotask(mapperRun);\n }\n runRequested = true;\n }\n }\n\n function extractInputs(\n inputs: any,\n resultArray: SharedValue<any>[]\n ): SharedValue<any>[] {\n if (Array.isArray(inputs)) {\n for (const input of inputs) {\n input && extractInputs(input, resultArray);\n }\n } else if (isSharedValue(inputs)) {\n resultArray.push(inputs);\n } else if (Object.getPrototypeOf(inputs) === Object.prototype) {\n // we only extract inputs recursively from \"plain\" objects here, if object\n // is of a derivative class (e.g. HostObject on web, or Map) we don't scan\n // it recursively\n for (const element of Object.values(inputs)) {\n element && extractInputs(element, resultArray);\n }\n }\n return resultArray;\n }\n\n return {\n start: (\n mapperID: number,\n worklet: () => void,\n inputs: SharedValue<any>[],\n outputs?: SharedValue<any>[]\n ) => {\n const mapper = {\n id: mapperID,\n dirty: true,\n worklet,\n inputs: extractInputs(inputs, []),\n outputs,\n };\n mappers.set(mapper.id, mapper);\n sortedMappers = [];\n for (const sv of mapper.inputs) {\n sv.addListener(mapper.id, () => {\n mapper.dirty = true;\n maybeRequestUpdates();\n });\n }\n maybeRequestUpdates();\n },\n stop: (mapperID: number) => {\n const mapper = mappers.get(mapperID);\n if (mapper) {\n mappers.delete(mapper.id);\n sortedMappers = [];\n for (const sv of mapper.inputs) {\n sv.removeListener(mapper.id);\n }\n }\n },\n };\n}\n\nlet MAPPER_ID = 9999;\n\nexport function startMapper(\n worklet: () => void,\n inputs: any[] = [],\n outputs: any[] = []\n): number {\n const mapperID = (MAPPER_ID += 1);\n\n runOnUI(() => {\n 'worklet';\n let mapperRegistry = global.__mapperRegistry;\n if (mapperRegistry === undefined) {\n mapperRegistry = global.__mapperRegistry = createMapperRegistry();\n }\n mapperRegistry.start(mapperID, worklet, inputs, outputs);\n })();\n\n return mapperID;\n}\n\nexport function stopMapper(mapperID: number): void {\n runOnUI(() => {\n 'worklet';\n const mapperRegistry = global.__mapperRegistry;\n mapperRegistry?.stop(mapperID);\n })();\n}\n"],"mappings":";;;;;;;;AACA,IAAAA,gBAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAEA,MAAMG,OAAO,GAAG,IAAAC,uBAAM,GAAE;AAUjB,SAASC,oBAAoBA,CAAA,EAAG;EACrC,SAAS;;EACT,MAAMC,OAAO,GAAG,IAAIC,GAAG,EAAE;EACzB,IAAIC,aAAuB,GAAG,EAAE;EAEhC,IAAIC,YAAY,GAAG,KAAK;EACxB,IAAIC,iBAAiB,GAAG,KAAK;EAE7B,SAASC,kBAAkBA,CAAA,EAAG;IAC5B;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,MAAMC,GAAG,GAAG,IAAIL,GAAG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,SAAA,GAAAwC,SAAA,MAAG,EAAE;EAEnB,MAAMT,QAAQ,GAAIO,SAAS,IAAI,CAAE;EAEjC,IAAAG,gBAAO,EAAC,MAAM;IACZ,SAAS;;IACT,IAAIC,cAAc,GAAGC,MAAM,CAACC,gBAAgB;IAC5C,IAAIF,cAAc,KAAK1C,SAAS,EAAE;MAChC0C,cAAc,GAAGC,MAAM,CAACC,gBAAgB,GAAG1D,oBAAoB,EAAE;IACnE;IACAwD,cAAc,CAACZ,KAAK,CAACC,QAAQ,EAAEf,OAAO,EAAEP,MAAM,EAAEb,OAAO,CAAC;EAC1D,CAAC,CAAC,EAAE;EAEJ,OAAOmC,QAAQ;AACjB;AAEO,SAASc,UAAUA,CAACd,QAAgB,EAAQ;EACjD,IAAAU,gBAAO,EAAC,MAAM;IACZ,SAAS;;IACT,MAAMC,cAAc,GAAGC,MAAM,CAACC,gBAAgB;IAC9CF,cAAc,aAAdA,cAAc,uBAAdA,cAAc,CAAEP,IAAI,CAACJ,QAAQ,CAAC;EAChC,CAAC,CAAC,EAAE;AACN"}
|
|
@@ -3,55 +3,43 @@
|
|
|
3
3
|
/* eslint-disable node/no-callback-literal */
|
|
4
4
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
5
5
|
// @ts-nocheck
|
|
6
|
-
const NOOP = () => {
|
|
6
|
+
const NOOP = () => {
|
|
7
|
+
// noop
|
|
7
8
|
};
|
|
8
|
-
|
|
9
9
|
const ID = t => t;
|
|
10
|
-
|
|
11
10
|
const IMMEDIATE_CB_INVOCATION = cb => cb();
|
|
12
|
-
|
|
13
11
|
class BaseAnimationMock {
|
|
14
12
|
duration(_) {
|
|
15
13
|
return this;
|
|
16
14
|
}
|
|
17
|
-
|
|
18
15
|
delay(_) {
|
|
19
16
|
return this;
|
|
20
17
|
}
|
|
21
|
-
|
|
22
18
|
springify(_) {
|
|
23
19
|
return this;
|
|
24
20
|
}
|
|
25
|
-
|
|
26
21
|
damping(_) {
|
|
27
22
|
return this;
|
|
28
23
|
}
|
|
29
|
-
|
|
30
24
|
stiffness(_) {
|
|
31
25
|
return this;
|
|
32
26
|
}
|
|
33
|
-
|
|
34
27
|
withCallback(_) {
|
|
35
28
|
return this;
|
|
36
29
|
}
|
|
37
|
-
|
|
38
30
|
randomDelay() {
|
|
39
31
|
return this;
|
|
40
32
|
}
|
|
41
|
-
|
|
42
33
|
withInitialValues() {
|
|
43
34
|
return this;
|
|
44
35
|
}
|
|
45
|
-
|
|
46
36
|
build() {
|
|
47
37
|
return () => ({
|
|
48
38
|
initialValues: {},
|
|
49
39
|
animations: {}
|
|
50
40
|
});
|
|
51
41
|
}
|
|
52
|
-
|
|
53
42
|
}
|
|
54
|
-
|
|
55
43
|
const ReanimatedV2 = {
|
|
56
44
|
useSharedValue: v => ({
|
|
57
45
|
value: v
|
|
@@ -113,6 +101,7 @@ const ReanimatedV2 = {
|
|
|
113
101
|
factory: ID
|
|
114
102
|
}),
|
|
115
103
|
bezierFn: ID,
|
|
104
|
+
steps: ID,
|
|
116
105
|
in: ID,
|
|
117
106
|
out: ID,
|
|
118
107
|
inOut: ID
|
|
@@ -128,6 +117,7 @@ const ReanimatedV2 = {
|
|
|
128
117
|
['FadeIn', 'FadeInRight', 'FadeInLeft', 'FadeInUp', 'FadeInDown', 'FadeOut', 'FadeOutRight', 'FadeOutLeft', 'FadeOutUp', 'FadeOutDown', 'FlipInYLeft', 'FlipInXDown', 'FlipInYRight', 'FlipInEasyX', 'FlipInEasyY', 'FlipOutXUp', 'FlipOutYLeft', 'FlipOutXDown', 'FlipOutYRight', 'FlipOutEasyX', 'FlipOutEasyY', 'StretchInY', 'StretchOutX', 'StretchOutY', 'SlideInLeft', 'SlideOutRight', 'SlideOutLeft', 'SlideInUp', 'SlideInDown', 'SlideOutUp', 'ZoomInRotate', 'ZoomInLeft', 'ZoomInRight', 'ZoomInUp', 'ZoomInDown', 'ZoomInEasyUp', 'ZoomInEasyDown', 'ZoomOut', 'ZoomOutRotate', 'ZoomOutLeft', 'ZoomOutRight', 'ZoomOutUp', 'ZoomOutDown', 'ZoomOutEasyUp', 'ZoomOutEasyDown', 'BounceInDown', 'BounceInUp', 'BounceInLeft', 'BounceInRight', 'BounceOut', 'BounceOutDown', 'BounceOutUp', 'BounceOutLeft', 'BounceOutRight', 'LightSpeedInLeft', 'LightSpeedOutRight', 'LightSpeedOutLeft', 'PinwheelOut', 'RotateInDownRight', 'RotateInUpLeft', 'RotateInUpRight', 'RotateOutDownLeft', 'RotateOutDownRight', 'RotateOutUpLeft', 'RotateOutUpRight', 'RollInRight', 'RollOutLeft', 'RollOutRight', 'Layout', 'CurvedTransition', 'JumpingTransition', 'SequencedTransition', 'FadingTransition', 'EntryExitTransition'].forEach(k => Object.assign(ReanimatedV2, {
|
|
129
118
|
[k]: new BaseAnimationMock()
|
|
130
119
|
}));
|
|
131
|
-
module.exports = {
|
|
120
|
+
module.exports = {
|
|
121
|
+
...ReanimatedV2
|
|
132
122
|
};
|
|
133
123
|
//# sourceMappingURL=mock.js.map
|