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
|
@@ -4,68 +4,45 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = createAnimatedComponent;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _reactNative = require("react-native");
|
|
11
|
-
|
|
12
9
|
var _WorkletEventHandler = _interopRequireDefault(require("./reanimated2/WorkletEventHandler"));
|
|
13
|
-
|
|
14
10
|
var _setAndForwardRef = _interopRequireDefault(require("./setAndForwardRef"));
|
|
15
|
-
|
|
16
11
|
require("./reanimated2/layoutReanimation/animationsManager");
|
|
17
|
-
|
|
18
12
|
var _invariant = _interopRequireDefault(require("invariant"));
|
|
19
|
-
|
|
20
13
|
var _ConfigHelper = require("./ConfigHelper");
|
|
21
|
-
|
|
22
14
|
var _RNRenderer = require("./reanimated2/platform-specific/RNRenderer");
|
|
23
|
-
|
|
24
15
|
var _core = require("./reanimated2/core");
|
|
25
|
-
|
|
26
16
|
var _PlatformChecker = require("./reanimated2/PlatformChecker");
|
|
27
|
-
|
|
28
17
|
var _animation = require("./reanimated2/animation");
|
|
29
|
-
|
|
30
18
|
var _layoutReanimation = require("./reanimated2/layoutReanimation");
|
|
31
|
-
|
|
32
19
|
var _ViewDescriptorsSet = require("./reanimated2/ViewDescriptorsSet");
|
|
33
|
-
|
|
34
20
|
var _fabricUtils = require("./reanimated2/fabricUtils");
|
|
35
|
-
|
|
36
21
|
var _UpdateProps = _interopRequireDefault(require("./reanimated2/UpdateProps"));
|
|
37
|
-
|
|
38
22
|
var _NativeReanimated = _interopRequireDefault(require("./reanimated2/NativeReanimated"));
|
|
39
|
-
|
|
40
23
|
var _reanimated = require("./reanimated2");
|
|
41
|
-
|
|
42
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
43
|
-
|
|
44
25
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
45
|
-
|
|
46
|
-
function
|
|
47
|
-
|
|
48
|
-
function dummyListener() {
|
|
26
|
+
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; }
|
|
27
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
28
|
+
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); }
|
|
29
|
+
function dummyListener() {
|
|
30
|
+
// empty listener we use to assign to listener properties for which animated
|
|
49
31
|
// event is used.
|
|
50
32
|
}
|
|
51
|
-
|
|
52
33
|
function maybeBuild(layoutAnimationOrBuilder) {
|
|
53
34
|
const isAnimationBuilder = value => 'build' in layoutAnimationOrBuilder && typeof layoutAnimationOrBuilder.build === 'function';
|
|
54
|
-
|
|
55
35
|
if (isAnimationBuilder(layoutAnimationOrBuilder)) {
|
|
56
36
|
return layoutAnimationOrBuilder.build();
|
|
57
37
|
} else {
|
|
58
38
|
return layoutAnimationOrBuilder;
|
|
59
39
|
}
|
|
60
40
|
}
|
|
61
|
-
|
|
62
41
|
function flattenArray(array) {
|
|
63
42
|
if (!Array.isArray(array)) {
|
|
64
43
|
return [array];
|
|
65
44
|
}
|
|
66
|
-
|
|
67
45
|
const resultArr = [];
|
|
68
|
-
|
|
69
46
|
const _flattenArray = arr => {
|
|
70
47
|
arr.forEach(item => {
|
|
71
48
|
if (Array.isArray(item)) {
|
|
@@ -75,24 +52,18 @@ function flattenArray(array) {
|
|
|
75
52
|
}
|
|
76
53
|
});
|
|
77
54
|
};
|
|
78
|
-
|
|
79
55
|
_flattenArray(array);
|
|
80
|
-
|
|
81
56
|
return resultArr;
|
|
82
57
|
}
|
|
83
|
-
|
|
84
58
|
function onlyAnimatedStyles(styles) {
|
|
85
59
|
return styles.filter(style => style === null || style === void 0 ? void 0 : style.viewDescriptors);
|
|
86
60
|
}
|
|
87
|
-
|
|
88
61
|
function isSameAnimatedStyle(style1, style2) {
|
|
89
62
|
// We cannot use equality check to compare useAnimatedStyle outputs directly.
|
|
90
63
|
// Instead, we can compare its viewsRefs.
|
|
91
64
|
return (style1 === null || style1 === void 0 ? void 0 : style1.viewsRef) === (style2 === null || style2 === void 0 ? void 0 : style2.viewsRef);
|
|
92
65
|
}
|
|
93
|
-
|
|
94
66
|
const isSameAnimatedProps = isSameAnimatedStyle;
|
|
95
|
-
|
|
96
67
|
const has = (key, x) => {
|
|
97
68
|
if (typeof x === 'function' || typeof x === 'object') {
|
|
98
69
|
if (x === null || x === undefined) {
|
|
@@ -101,42 +72,33 @@ const has = (key, x) => {
|
|
|
101
72
|
return key in x;
|
|
102
73
|
}
|
|
103
74
|
}
|
|
104
|
-
|
|
105
75
|
return false;
|
|
106
76
|
};
|
|
107
|
-
|
|
108
77
|
function isInlineStyleTransform(transform) {
|
|
109
78
|
if (!transform) {
|
|
110
79
|
return false;
|
|
111
80
|
}
|
|
112
|
-
|
|
113
81
|
return transform.some(t => hasInlineStyles(t));
|
|
114
82
|
}
|
|
115
|
-
|
|
116
83
|
function hasInlineStyles(style) {
|
|
117
84
|
if (!style) {
|
|
118
85
|
return false;
|
|
119
86
|
}
|
|
120
|
-
|
|
121
87
|
return Object.keys(style).some(key => {
|
|
122
88
|
const styleValue = style[key];
|
|
123
89
|
return (0, _reanimated.isSharedValue)(styleValue) || key === 'transform' && isInlineStyleTransform(styleValue);
|
|
124
90
|
});
|
|
125
91
|
}
|
|
126
|
-
|
|
127
92
|
function extractSharedValuesMapFromProps(props) {
|
|
128
93
|
const inlineProps = {};
|
|
129
|
-
|
|
130
94
|
for (const key in props) {
|
|
131
95
|
const value = props[key];
|
|
132
|
-
|
|
133
96
|
if (key === 'style') {
|
|
134
97
|
const styles = flattenArray(props.style ?? []);
|
|
135
98
|
styles.forEach(style => {
|
|
136
99
|
if (!style) {
|
|
137
100
|
return;
|
|
138
101
|
}
|
|
139
|
-
|
|
140
102
|
for (const [key, styleValue] of Object.entries(style)) {
|
|
141
103
|
if ((0, _reanimated.isSharedValue)(styleValue)) {
|
|
142
104
|
inlineProps[key] = styleValue;
|
|
@@ -149,27 +111,21 @@ function extractSharedValuesMapFromProps(props) {
|
|
|
149
111
|
inlineProps[key] = value;
|
|
150
112
|
}
|
|
151
113
|
}
|
|
152
|
-
|
|
153
114
|
return inlineProps;
|
|
154
115
|
}
|
|
155
|
-
|
|
156
116
|
function inlinePropsHasChanged(styles1, styles2) {
|
|
157
117
|
if (Object.keys(styles1).length !== Object.keys(styles2).length) {
|
|
158
118
|
return true;
|
|
159
119
|
}
|
|
160
|
-
|
|
161
120
|
for (const key of Object.keys(styles1)) {
|
|
162
121
|
if (styles1[key] !== styles2[key]) return true;
|
|
163
122
|
}
|
|
164
|
-
|
|
165
123
|
return false;
|
|
166
124
|
}
|
|
167
|
-
|
|
168
125
|
function getInlinePropsUpdate(inlineProps) {
|
|
169
126
|
'worklet';
|
|
170
127
|
|
|
171
128
|
const update = {};
|
|
172
|
-
|
|
173
129
|
for (const [key, styleValue] of Object.entries(inlineProps)) {
|
|
174
130
|
if (key === 'transform') {
|
|
175
131
|
update[key] = styleValue.map(transform => {
|
|
@@ -181,39 +137,25 @@ function getInlinePropsUpdate(inlineProps) {
|
|
|
181
137
|
update[key] = styleValue;
|
|
182
138
|
}
|
|
183
139
|
}
|
|
184
|
-
|
|
185
140
|
return update;
|
|
186
141
|
}
|
|
187
|
-
|
|
188
142
|
function createAnimatedComponent(Component, options) {
|
|
189
|
-
(0, _invariant.default)(typeof Component !== 'function' || Component.prototype && Component.prototype.isReactComponent, '
|
|
190
|
-
|
|
143
|
+
(0, _invariant.default)(typeof Component !== 'function' || Component.prototype && Component.prototype.isReactComponent, `Looks like you're passing a function component \`${Component.name}\` to \`createAnimatedComponent\` function which supports only class components. Please wrap your function component with \`React.forwardRef()\` or use a class component instead.`);
|
|
191
144
|
class AnimatedComponent extends _react.default.Component {
|
|
192
145
|
constructor(props) {
|
|
193
146
|
super(props);
|
|
194
|
-
|
|
195
147
|
_defineProperty(this, "_styles", null);
|
|
196
|
-
|
|
197
148
|
_defineProperty(this, "_animatedProps", void 0);
|
|
198
|
-
|
|
199
149
|
_defineProperty(this, "_viewTag", -1);
|
|
200
|
-
|
|
201
150
|
_defineProperty(this, "_isFirstRender", true);
|
|
202
|
-
|
|
203
151
|
_defineProperty(this, "animatedStyle", {
|
|
204
152
|
value: {}
|
|
205
153
|
});
|
|
206
|
-
|
|
207
154
|
_defineProperty(this, "initialStyle", {});
|
|
208
|
-
|
|
209
155
|
_defineProperty(this, "_component", null);
|
|
210
|
-
|
|
211
156
|
_defineProperty(this, "_inlinePropsViewDescriptors", null);
|
|
212
|
-
|
|
213
157
|
_defineProperty(this, "_inlinePropsMapperId", null);
|
|
214
|
-
|
|
215
158
|
_defineProperty(this, "_inlineProps", {});
|
|
216
|
-
|
|
217
159
|
_defineProperty(this, "_setComponentRef", (0, _setAndForwardRef.default)({
|
|
218
160
|
getForwardedRef: () => this.props.forwardedRef,
|
|
219
161
|
setLocalRef: ref => {
|
|
@@ -225,91 +167,69 @@ function createAnimatedComponent(Component, options) {
|
|
|
225
167
|
exiting,
|
|
226
168
|
sharedTransitionTag
|
|
227
169
|
} = this.props;
|
|
228
|
-
|
|
229
170
|
if ((layout || entering || exiting || sharedTransitionTag) && tag != null) {
|
|
230
171
|
if (!(0, _PlatformChecker.shouldBeUseWeb)()) {
|
|
231
172
|
(0, _core.enableLayoutAnimations)(true, false);
|
|
232
173
|
}
|
|
233
|
-
|
|
234
174
|
if (layout) {
|
|
235
175
|
(0, _core.configureLayoutAnimations)(tag, _layoutReanimation.LayoutAnimationType.LAYOUT, maybeBuild(layout));
|
|
236
176
|
}
|
|
237
|
-
|
|
238
177
|
if (entering) {
|
|
239
178
|
(0, _core.configureLayoutAnimations)(tag, _layoutReanimation.LayoutAnimationType.ENTERING, maybeBuild(entering));
|
|
240
179
|
}
|
|
241
|
-
|
|
242
180
|
if (exiting) {
|
|
243
181
|
(0, _core.configureLayoutAnimations)(tag, _layoutReanimation.LayoutAnimationType.EXITING, maybeBuild(exiting));
|
|
244
182
|
}
|
|
245
|
-
|
|
246
183
|
if (sharedTransitionTag) {
|
|
247
184
|
const sharedElementTransition = this.props.sharedTransitionStyle ?? _layoutReanimation.DefaultSharedTransition;
|
|
248
185
|
(0, _core.configureLayoutAnimations)(tag, _layoutReanimation.LayoutAnimationType.SHARED_ELEMENT_TRANSITION, maybeBuild(sharedElementTransition), sharedTransitionTag);
|
|
249
186
|
}
|
|
250
187
|
}
|
|
251
|
-
|
|
252
188
|
if (ref !== this._component) {
|
|
253
189
|
this._component = ref;
|
|
254
190
|
}
|
|
255
191
|
}
|
|
256
192
|
}));
|
|
257
|
-
|
|
258
193
|
if ((0, _PlatformChecker.isJest)()) {
|
|
259
194
|
this.animatedStyle = {
|
|
260
195
|
value: {}
|
|
261
196
|
};
|
|
262
197
|
}
|
|
263
198
|
}
|
|
264
|
-
|
|
265
199
|
componentWillUnmount() {
|
|
266
200
|
this._detachNativeEvents();
|
|
267
|
-
|
|
268
201
|
this._detachStyles();
|
|
269
|
-
|
|
270
202
|
this._detachInlineProps();
|
|
271
203
|
}
|
|
272
|
-
|
|
273
204
|
componentDidMount() {
|
|
274
205
|
this._attachNativeEvents();
|
|
275
|
-
|
|
276
206
|
this._attachAnimatedStyles();
|
|
277
|
-
|
|
278
207
|
this._attachInlineProps();
|
|
279
208
|
}
|
|
280
|
-
|
|
281
209
|
_getEventViewRef() {
|
|
282
210
|
var _this$_component;
|
|
283
|
-
|
|
284
211
|
// Make sure to get the scrollable node for components that implement
|
|
285
212
|
// `ScrollResponder.Mixin`.
|
|
286
213
|
return (_this$_component = this._component) !== null && _this$_component !== void 0 && _this$_component.getScrollableNode ? this._component.getScrollableNode() : this._component;
|
|
287
214
|
}
|
|
288
|
-
|
|
289
215
|
_attachNativeEvents() {
|
|
290
216
|
const node = this._getEventViewRef();
|
|
291
|
-
|
|
292
217
|
const viewTag = (0, _reactNative.findNodeHandle)(options !== null && options !== void 0 && options.setNativeProps ? this : node);
|
|
293
|
-
|
|
294
218
|
for (const key in this.props) {
|
|
295
219
|
const prop = this.props[key];
|
|
296
|
-
|
|
297
220
|
if (has('current', prop) && prop.current instanceof _WorkletEventHandler.default) {
|
|
298
221
|
prop.current.registerForEvents(viewTag, key);
|
|
299
222
|
}
|
|
300
223
|
}
|
|
301
224
|
}
|
|
302
|
-
|
|
303
225
|
_detachNativeEvents() {
|
|
304
226
|
for (const key in this.props) {
|
|
305
227
|
const prop = this.props[key];
|
|
306
|
-
|
|
307
228
|
if (has('current', prop) && prop.current instanceof _WorkletEventHandler.default) {
|
|
308
229
|
prop.current.unregisterFromEvents();
|
|
309
230
|
}
|
|
310
231
|
}
|
|
311
232
|
}
|
|
312
|
-
|
|
313
233
|
_detachStyles() {
|
|
314
234
|
if (_reactNative.Platform.OS === 'web' && this._styles !== null) {
|
|
315
235
|
for (const style of this._styles) {
|
|
@@ -319,15 +239,12 @@ function createAnimatedComponent(Component, options) {
|
|
|
319
239
|
}
|
|
320
240
|
} else if (this._viewTag !== -1 && this._styles !== null) {
|
|
321
241
|
var _this$props$animatedP;
|
|
322
|
-
|
|
323
242
|
for (const style of this._styles) {
|
|
324
243
|
style.viewDescriptors.remove(this._viewTag);
|
|
325
244
|
}
|
|
326
|
-
|
|
327
245
|
if ((_this$props$animatedP = this.props.animatedProps) !== null && _this$props$animatedP !== void 0 && _this$props$animatedP.viewDescriptors) {
|
|
328
246
|
this.props.animatedProps.viewDescriptors.remove(this._viewTag);
|
|
329
247
|
}
|
|
330
|
-
|
|
331
248
|
if (global._IS_FABRIC) {
|
|
332
249
|
const viewTag = this._viewTag;
|
|
333
250
|
(0, _core.runOnUI)(() => {
|
|
@@ -338,31 +255,24 @@ function createAnimatedComponent(Component, options) {
|
|
|
338
255
|
}
|
|
339
256
|
}
|
|
340
257
|
}
|
|
341
|
-
|
|
342
258
|
_reattachNativeEvents(prevProps) {
|
|
343
259
|
let viewTag;
|
|
344
|
-
|
|
345
260
|
for (const key in this.props) {
|
|
346
261
|
const prop = this.props[key];
|
|
347
|
-
|
|
348
262
|
if (has('current', prop) && prop.current instanceof _WorkletEventHandler.default) {
|
|
349
263
|
if (viewTag === undefined) {
|
|
350
264
|
viewTag = prop.current.viewTag;
|
|
351
265
|
}
|
|
352
266
|
}
|
|
353
267
|
}
|
|
354
|
-
|
|
355
268
|
for (const key in prevProps) {
|
|
356
269
|
const prop = this.props[key];
|
|
357
|
-
|
|
358
270
|
if (has('current', prop) && prop.current instanceof _WorkletEventHandler.default && prop.current.reattachNeeded) {
|
|
359
271
|
prop.current.unregisterFromEvents();
|
|
360
272
|
}
|
|
361
273
|
}
|
|
362
|
-
|
|
363
274
|
for (const key in this.props) {
|
|
364
275
|
const prop = this.props[key];
|
|
365
|
-
|
|
366
276
|
if (has('current', prop) && prop.current instanceof _WorkletEventHandler.default && prop.current.reattachNeeded) {
|
|
367
277
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
368
278
|
prop.current.registerForEvents(viewTag, key);
|
|
@@ -370,25 +280,21 @@ function createAnimatedComponent(Component, options) {
|
|
|
370
280
|
}
|
|
371
281
|
}
|
|
372
282
|
}
|
|
373
|
-
|
|
374
283
|
_updateFromNative(props) {
|
|
375
284
|
if (options !== null && options !== void 0 && options.setNativeProps) {
|
|
376
285
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
377
286
|
options.setNativeProps(this._component, props);
|
|
378
287
|
} else {
|
|
379
288
|
var _this$_component2, _this$_component2$set;
|
|
380
|
-
|
|
381
289
|
// eslint-disable-next-line no-unused-expressions
|
|
382
290
|
(_this$_component2 = this._component) === null || _this$_component2 === void 0 ? void 0 : (_this$_component2$set = _this$_component2.setNativeProps) === null || _this$_component2$set === void 0 ? void 0 : _this$_component2$set.call(_this$_component2, props);
|
|
383
291
|
}
|
|
384
292
|
}
|
|
385
|
-
|
|
386
293
|
_getViewInfo() {
|
|
387
294
|
let viewTag;
|
|
388
295
|
let viewName;
|
|
389
296
|
let shadowNodeWrapper = null;
|
|
390
297
|
let viewConfig;
|
|
391
|
-
|
|
392
298
|
if (_reactNative.Platform.OS === 'web') {
|
|
393
299
|
viewTag = (0, _reactNative.findNodeHandle)(this);
|
|
394
300
|
viewName = null;
|
|
@@ -396,29 +302,23 @@ function createAnimatedComponent(Component, options) {
|
|
|
396
302
|
viewConfig = null;
|
|
397
303
|
} else {
|
|
398
304
|
var _hostInstance$viewCon;
|
|
399
|
-
|
|
400
305
|
// hostInstance can be null for a component that doesn't render anything (render function returns null). Example: svg Stop: https://github.com/react-native-svg/react-native-svg/blob/develop/src/elements/Stop.tsx
|
|
401
306
|
const hostInstance = _RNRenderer.RNRenderer.findHostInstance_DEPRECATED(this);
|
|
402
|
-
|
|
403
307
|
if (!hostInstance) {
|
|
404
308
|
throw new Error('Cannot find host instance for this component. Maybe it renders nothing?');
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
|
|
309
|
+
}
|
|
310
|
+
// we can access view tag in the same way it's accessed here https://github.com/facebook/react/blob/e3f4eb7272d4ca0ee49f27577156b57eeb07cf73/packages/react-native-renderer/src/ReactFabric.js#L146
|
|
408
311
|
viewTag = hostInstance === null || hostInstance === void 0 ? void 0 : hostInstance._nativeTag;
|
|
409
312
|
/**
|
|
410
313
|
* RN uses viewConfig for components for storing different properties of the component(example: https://github.com/facebook/react-native/blob/master/Libraries/Components/ScrollView/ScrollViewViewConfig.js#L16).
|
|
411
314
|
* The name we're looking for is in the field named uiViewClassName.
|
|
412
315
|
*/
|
|
413
|
-
|
|
414
316
|
viewName = hostInstance === null || hostInstance === void 0 ? void 0 : (_hostInstance$viewCon = hostInstance.viewConfig) === null || _hostInstance$viewCon === void 0 ? void 0 : _hostInstance$viewCon.uiViewClassName;
|
|
415
317
|
viewConfig = hostInstance === null || hostInstance === void 0 ? void 0 : hostInstance.viewConfig;
|
|
416
|
-
|
|
417
318
|
if (global._IS_FABRIC) {
|
|
418
319
|
shadowNodeWrapper = (0, _fabricUtils.getShadowNodeWrapperFromRef)(this);
|
|
419
320
|
}
|
|
420
321
|
}
|
|
421
|
-
|
|
422
322
|
return {
|
|
423
323
|
viewTag,
|
|
424
324
|
viewName,
|
|
@@ -426,55 +326,47 @@ function createAnimatedComponent(Component, options) {
|
|
|
426
326
|
viewConfig
|
|
427
327
|
};
|
|
428
328
|
}
|
|
429
|
-
|
|
430
329
|
_attachAnimatedStyles() {
|
|
431
330
|
var _this$props$animatedP2, _this$props$animatedP3;
|
|
432
|
-
|
|
433
331
|
const styles = this.props.style ? onlyAnimatedStyles(flattenArray(this.props.style)) : [];
|
|
434
332
|
const prevStyles = this._styles;
|
|
435
333
|
this._styles = styles;
|
|
436
334
|
const prevAnimatedProps = this._animatedProps;
|
|
437
335
|
this._animatedProps = this.props.animatedProps;
|
|
438
|
-
|
|
439
336
|
const {
|
|
440
337
|
viewTag,
|
|
441
338
|
viewName,
|
|
442
339
|
shadowNodeWrapper,
|
|
443
340
|
viewConfig
|
|
444
|
-
} = this._getViewInfo();
|
|
445
|
-
|
|
341
|
+
} = this._getViewInfo();
|
|
446
342
|
|
|
343
|
+
// update UI props whitelist for this view
|
|
447
344
|
const hasReanimated2Props = ((_this$props$animatedP2 = this.props.animatedProps) === null || _this$props$animatedP2 === void 0 ? void 0 : _this$props$animatedP2.viewDescriptors) || styles.length;
|
|
448
|
-
|
|
449
345
|
if (hasReanimated2Props && viewConfig) {
|
|
450
346
|
(0, _ConfigHelper.adaptViewConfig)(viewConfig);
|
|
451
347
|
}
|
|
348
|
+
this._viewTag = viewTag;
|
|
452
349
|
|
|
453
|
-
|
|
454
|
-
|
|
350
|
+
// remove old styles
|
|
455
351
|
if (prevStyles) {
|
|
456
352
|
// in most of the cases, views have only a single animated style and it remains unchanged
|
|
457
353
|
const hasOneSameStyle = styles.length === 1 && prevStyles.length === 1 && isSameAnimatedStyle(styles[0], prevStyles[0]);
|
|
458
|
-
|
|
459
354
|
if (!hasOneSameStyle) {
|
|
460
355
|
// otherwise, remove each style that is not present in new styles
|
|
461
356
|
for (const prevStyle of prevStyles) {
|
|
462
357
|
const isPresent = styles.some(style => isSameAnimatedStyle(style, prevStyle));
|
|
463
|
-
|
|
464
358
|
if (!isPresent) {
|
|
465
359
|
prevStyle.viewDescriptors.remove(viewTag);
|
|
466
360
|
}
|
|
467
361
|
}
|
|
468
362
|
}
|
|
469
363
|
}
|
|
470
|
-
|
|
471
364
|
styles.forEach(style => {
|
|
472
365
|
style.viewDescriptors.add({
|
|
473
366
|
tag: viewTag,
|
|
474
367
|
name: viewName,
|
|
475
368
|
shadowNodeWrapper
|
|
476
369
|
});
|
|
477
|
-
|
|
478
370
|
if ((0, _PlatformChecker.isJest)()) {
|
|
479
371
|
/**
|
|
480
372
|
* We need to connect Jest's TestObject instance whose contains just props object
|
|
@@ -482,18 +374,20 @@ function createAnimatedComponent(Component, options) {
|
|
|
482
374
|
* We can't update props object directly because TestObject contains a copy of props - look at render function:
|
|
483
375
|
* const props = this._filterNonAnimatedProps(this.props);
|
|
484
376
|
*/
|
|
485
|
-
this.animatedStyle.value = {
|
|
377
|
+
this.animatedStyle.value = {
|
|
378
|
+
...this.animatedStyle.value,
|
|
486
379
|
...style.initial.value
|
|
487
380
|
};
|
|
488
381
|
style.animatedStyle.current = this.animatedStyle;
|
|
489
382
|
}
|
|
490
|
-
});
|
|
383
|
+
});
|
|
491
384
|
|
|
385
|
+
// detach old animatedProps
|
|
492
386
|
if (prevAnimatedProps && !isSameAnimatedProps(prevAnimatedProps, this.props.animatedProps)) {
|
|
493
387
|
prevAnimatedProps.viewDescriptors.remove(viewTag);
|
|
494
|
-
}
|
|
495
|
-
|
|
388
|
+
}
|
|
496
389
|
|
|
390
|
+
// attach animatedProps property
|
|
497
391
|
if ((_this$props$animatedP3 = this.props.animatedProps) !== null && _this$props$animatedP3 !== void 0 && _this$props$animatedP3.viewDescriptors) {
|
|
498
392
|
this.props.animatedProps.viewDescriptors.add({
|
|
499
393
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
@@ -505,26 +399,21 @@ function createAnimatedComponent(Component, options) {
|
|
|
505
399
|
});
|
|
506
400
|
}
|
|
507
401
|
}
|
|
508
|
-
|
|
509
402
|
_attachInlineProps() {
|
|
510
403
|
const newInlineProps = extractSharedValuesMapFromProps(this.props);
|
|
511
404
|
const hasChanged = inlinePropsHasChanged(newInlineProps, this._inlineProps);
|
|
512
|
-
|
|
513
405
|
if (hasChanged) {
|
|
514
406
|
if (!this._inlinePropsViewDescriptors) {
|
|
515
407
|
this._inlinePropsViewDescriptors = (0, _ViewDescriptorsSet.makeViewDescriptorsSet)();
|
|
516
|
-
|
|
517
408
|
const {
|
|
518
409
|
viewTag,
|
|
519
410
|
viewName,
|
|
520
411
|
shadowNodeWrapper,
|
|
521
412
|
viewConfig
|
|
522
413
|
} = this._getViewInfo();
|
|
523
|
-
|
|
524
414
|
if (Object.keys(newInlineProps).length && viewConfig) {
|
|
525
415
|
(0, _ConfigHelper.adaptViewConfig)(viewConfig);
|
|
526
416
|
}
|
|
527
|
-
|
|
528
417
|
this._inlinePropsViewDescriptors.add({
|
|
529
418
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
530
419
|
tag: viewTag,
|
|
@@ -534,7 +423,6 @@ function createAnimatedComponent(Component, options) {
|
|
|
534
423
|
shadowNodeWrapper: shadowNodeWrapper
|
|
535
424
|
});
|
|
536
425
|
}
|
|
537
|
-
|
|
538
426
|
const sharableViewDescriptors = this._inlinePropsViewDescriptors.sharableViewDescriptors;
|
|
539
427
|
const maybeViewRef = _NativeReanimated.default.native ? undefined : {
|
|
540
428
|
items: new Set([this])
|
|
@@ -546,41 +434,30 @@ function createAnimatedComponent(Component, options) {
|
|
|
546
434
|
const update = getInlinePropsUpdate(newInlineProps);
|
|
547
435
|
(0, _UpdateProps.default)(sharableViewDescriptors, update, maybeViewRef);
|
|
548
436
|
};
|
|
549
|
-
|
|
550
437
|
this._inlineProps = newInlineProps;
|
|
551
|
-
|
|
552
438
|
if (this._inlinePropsMapperId) {
|
|
553
439
|
(0, _core.stopMapper)(this._inlinePropsMapperId);
|
|
554
440
|
}
|
|
555
|
-
|
|
556
441
|
this._inlinePropsMapperId = null;
|
|
557
|
-
|
|
558
442
|
if (Object.keys(newInlineProps).length) {
|
|
559
443
|
this._inlinePropsMapperId = (0, _core.startMapper)(updaterFunction, Object.values(newInlineProps));
|
|
560
444
|
}
|
|
561
445
|
}
|
|
562
446
|
}
|
|
563
|
-
|
|
564
447
|
_detachInlineProps() {
|
|
565
448
|
if (this._inlinePropsMapperId) {
|
|
566
449
|
(0, _core.stopMapper)(this._inlinePropsMapperId);
|
|
567
450
|
}
|
|
568
451
|
}
|
|
569
|
-
|
|
570
452
|
componentDidUpdate(prevProps) {
|
|
571
453
|
this._reattachNativeEvents(prevProps);
|
|
572
|
-
|
|
573
454
|
this._attachAnimatedStyles();
|
|
574
|
-
|
|
575
455
|
this._attachInlineProps();
|
|
576
456
|
}
|
|
577
|
-
|
|
578
457
|
_filterNonAnimatedProps(inputProps) {
|
|
579
458
|
const props = {};
|
|
580
|
-
|
|
581
459
|
for (const key in inputProps) {
|
|
582
460
|
const value = inputProps[key];
|
|
583
|
-
|
|
584
461
|
if (key === 'style') {
|
|
585
462
|
const styleProp = inputProps.style;
|
|
586
463
|
const styles = flattenArray(styleProp ?? []);
|
|
@@ -588,27 +465,23 @@ function createAnimatedComponent(Component, options) {
|
|
|
588
465
|
if (style && style.viewDescriptors) {
|
|
589
466
|
// this is how we recognize styles returned by useAnimatedStyle
|
|
590
467
|
style.viewsRef.add(this);
|
|
591
|
-
|
|
592
468
|
if (this._isFirstRender) {
|
|
593
|
-
this.initialStyle = {
|
|
469
|
+
this.initialStyle = {
|
|
470
|
+
...style.initial.value,
|
|
594
471
|
...(0, _animation.initialUpdaterRun)(style.initial.updater)
|
|
595
472
|
};
|
|
596
473
|
}
|
|
597
|
-
|
|
598
474
|
return this.initialStyle;
|
|
599
475
|
} else if (hasInlineStyles(style)) {
|
|
600
476
|
if (this._isFirstRender) {
|
|
601
477
|
return getInlinePropsUpdate(style);
|
|
602
478
|
}
|
|
603
|
-
|
|
604
479
|
const newStyle = {};
|
|
605
|
-
|
|
606
480
|
for (const [key, styleValue] of Object.entries(style)) {
|
|
607
481
|
if (!(0, _reanimated.isSharedValue)(styleValue) && !(key === 'transform' && isInlineStyleTransform(styleValue))) {
|
|
608
482
|
newStyle[key] = styleValue;
|
|
609
483
|
}
|
|
610
484
|
}
|
|
611
|
-
|
|
612
485
|
return newStyle;
|
|
613
486
|
} else {
|
|
614
487
|
return style;
|
|
@@ -617,11 +490,9 @@ function createAnimatedComponent(Component, options) {
|
|
|
617
490
|
props[key] = _reactNative.StyleSheet.flatten(processedStyle);
|
|
618
491
|
} else if (key === 'animatedProps') {
|
|
619
492
|
const animatedProp = inputProps.animatedProps;
|
|
620
|
-
|
|
621
493
|
if (animatedProp.initial !== undefined) {
|
|
622
494
|
Object.keys(animatedProp.initial.value).forEach(key => {
|
|
623
495
|
var _animatedProp$initial, _animatedProp$viewsRe;
|
|
624
|
-
|
|
625
496
|
props[key] = (_animatedProp$initial = animatedProp.initial) === null || _animatedProp$initial === void 0 ? void 0 : _animatedProp$initial.value[key];
|
|
626
497
|
(_animatedProp$viewsRe = animatedProp.viewsRef) === null || _animatedProp$viewsRe === void 0 ? void 0 : _animatedProp$viewsRe.add(this);
|
|
627
498
|
});
|
|
@@ -642,37 +513,28 @@ function createAnimatedComponent(Component, options) {
|
|
|
642
513
|
props[key] = value;
|
|
643
514
|
}
|
|
644
515
|
}
|
|
645
|
-
|
|
646
516
|
return props;
|
|
647
517
|
}
|
|
648
|
-
|
|
649
518
|
render() {
|
|
650
519
|
const props = this._filterNonAnimatedProps(this.props);
|
|
651
|
-
|
|
652
520
|
if ((0, _PlatformChecker.isJest)()) {
|
|
653
521
|
props.animatedStyle = this.animatedStyle;
|
|
654
522
|
}
|
|
655
|
-
|
|
656
523
|
if (this._isFirstRender) {
|
|
657
524
|
this._isFirstRender = false;
|
|
658
525
|
}
|
|
659
|
-
|
|
660
526
|
const platformProps = _reactNative.Platform.select({
|
|
661
527
|
web: {},
|
|
662
528
|
default: {
|
|
663
529
|
collapsable: false
|
|
664
530
|
}
|
|
665
531
|
});
|
|
666
|
-
|
|
667
532
|
return /*#__PURE__*/_react.default.createElement(Component, _extends({}, props, {
|
|
668
533
|
ref: this._setComponentRef
|
|
669
534
|
}, platformProps));
|
|
670
535
|
}
|
|
671
|
-
|
|
672
536
|
}
|
|
673
|
-
|
|
674
537
|
_defineProperty(AnimatedComponent, "displayName", void 0);
|
|
675
|
-
|
|
676
538
|
AnimatedComponent.displayName = `AnimatedComponent(${Component.displayName || Component.name || 'Component'})`;
|
|
677
539
|
return /*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
678
540
|
return /*#__PURE__*/_react.default.createElement(AnimatedComponent, _extends({}, props, ref === null ? null : {
|