react-native-reanimated 3.0.0-rc.0 → 3.0.0-rc.1
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/AnimatedSensor/AnimatedSensorModule.cpp +4 -4
- package/Common/cpp/Fabric/FabricUtils.cpp +7 -2
- package/Common/cpp/Fabric/ReanimatedUIManagerBinding.cpp +32 -9
- package/Common/cpp/Fabric/ShadowTreeCloner.cpp +92 -0
- package/Common/cpp/NativeModules/NativeReanimatedModule.cpp +60 -35
- package/Common/cpp/NativeModules/NativeReanimatedModuleSpec.cpp +23 -0
- package/Common/cpp/Tools/RuntimeDecorator.cpp +17 -11
- package/Common/cpp/headers/Fabric/FabricUtils.h +3 -2
- package/Common/cpp/headers/Fabric/ReanimatedUIManagerBinding.h +1 -0
- package/Common/cpp/headers/Fabric/ShadowTreeCloner.h +41 -0
- package/Common/cpp/headers/NativeModules/NativeReanimatedModule.h +9 -0
- package/Common/cpp/headers/NativeModules/NativeReanimatedModuleSpec.h +8 -0
- package/Common/cpp/headers/Tools/PlatformDepMethodsHolder.h +5 -0
- package/RNReanimated.podspec +28 -6
- package/android/CMakeLists.txt +73 -53
- package/android/build.gradle +178 -34
- package/android/src/fabric/java/com/swmansion/reanimated/NativeProxy.java +25 -0
- package/android/src/main/cpp/NativeProxy.cpp +48 -13
- package/android/src/main/cpp/OnLoad.cpp +1 -0
- package/android/src/main/cpp/headers/NativeProxy.h +29 -0
- package/android/src/main/java/com/swmansion/reanimated/NodesManager.java +3 -1
- package/android/src/main/java/com/swmansion/reanimated/keyboardObserver/ReanimatedKeyboardEventListener.java +165 -0
- package/android/src/main/java/com/swmansion/reanimated/layoutReanimation/AnimationsManager.java +19 -16
- package/android/src/main/java/com/swmansion/reanimated/sensor/ReanimatedSensor.java +5 -1
- package/android/src/main/java/com/swmansion/reanimated/sensor/ReanimatedSensorListener.java +24 -1
- package/android/src/main/java/com/swmansion/reanimated/sensor/ReanimatedSensorType.java +7 -5
- package/android/src/paper/java/com/swmansion/reanimated/NativeProxy.java +25 -0
- package/ios/REAModule.mm +1 -1
- package/ios/REANodesManager.mm +31 -8
- package/ios/keyboardObserver/REAKeyboardEventObserver.h +17 -0
- package/ios/keyboardObserver/REAKeyboardEventObserver.m +198 -0
- package/ios/native/NativeProxy.mm +19 -68
- package/ios/native/REAJSIUtils.h +66 -0
- package/ios/sensor/ReanimatedSensor.m +27 -18
- package/lib/commonjs/Animated.js +70 -0
- package/lib/commonjs/Animated.js.map +1 -0
- package/lib/commonjs/ConfigHelper.js +173 -0
- package/lib/commonjs/ConfigHelper.js.map +1 -0
- package/lib/commonjs/createAnimatedComponent.js +474 -0
- package/lib/commonjs/createAnimatedComponent.js.map +1 -0
- package/lib/commonjs/index.js +44 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/index.web.js +32 -0
- package/lib/commonjs/index.web.js.map +1 -0
- package/lib/commonjs/reanimated2/Bezier.js +166 -0
- package/lib/commonjs/reanimated2/Bezier.js.map +1 -0
- package/lib/commonjs/reanimated2/Colors.js +673 -0
- package/lib/commonjs/reanimated2/Colors.js.map +1 -0
- package/lib/{reanimated2 → commonjs/reanimated2}/Easing.js +151 -83
- package/lib/commonjs/reanimated2/Easing.js.map +1 -0
- package/lib/commonjs/reanimated2/NativeMethods.js +100 -0
- package/lib/commonjs/reanimated2/NativeMethods.js.map +1 -0
- package/lib/commonjs/reanimated2/NativeReanimated/NativeReanimated.js +99 -0
- package/lib/commonjs/reanimated2/NativeReanimated/NativeReanimated.js.map +1 -0
- package/lib/commonjs/reanimated2/NativeReanimated/index.js +26 -0
- package/lib/commonjs/reanimated2/NativeReanimated/index.js.map +1 -0
- package/lib/commonjs/reanimated2/PlatformChecker.js +33 -0
- package/lib/commonjs/reanimated2/PlatformChecker.js.map +1 -0
- package/lib/commonjs/reanimated2/PropAdapters.js +68 -0
- package/lib/commonjs/reanimated2/PropAdapters.js.map +1 -0
- package/lib/commonjs/reanimated2/UpdateProps.js +82 -0
- package/lib/commonjs/reanimated2/UpdateProps.js.map +1 -0
- package/lib/commonjs/reanimated2/ViewDescriptorsSet.js +96 -0
- package/lib/commonjs/reanimated2/ViewDescriptorsSet.js.map +1 -0
- package/lib/commonjs/reanimated2/WorkletEventHandler.js +75 -0
- package/lib/commonjs/reanimated2/WorkletEventHandler.js.map +1 -0
- package/lib/commonjs/reanimated2/animation/commonTypes.js +6 -0
- package/lib/commonjs/reanimated2/animation/commonTypes.js.map +1 -0
- package/lib/commonjs/reanimated2/animation/decay.js +132 -0
- package/lib/commonjs/reanimated2/animation/decay.js.map +1 -0
- package/lib/commonjs/reanimated2/animation/delay.js +89 -0
- package/lib/commonjs/reanimated2/animation/delay.js.map +1 -0
- package/lib/commonjs/reanimated2/animation/index.js +82 -0
- package/lib/commonjs/reanimated2/animation/index.js.map +1 -0
- package/lib/commonjs/reanimated2/animation/repeat.js +107 -0
- package/lib/commonjs/reanimated2/animation/repeat.js.map +1 -0
- package/lib/commonjs/reanimated2/animation/sequence.js +103 -0
- package/lib/commonjs/reanimated2/animation/sequence.js.map +1 -0
- package/lib/commonjs/reanimated2/animation/spring.js +121 -0
- package/lib/commonjs/reanimated2/animation/spring.js.map +1 -0
- package/lib/commonjs/reanimated2/animation/styleAnimation.js +206 -0
- package/lib/commonjs/reanimated2/animation/styleAnimation.js.map +1 -0
- package/lib/commonjs/reanimated2/animation/timing.js +82 -0
- package/lib/commonjs/reanimated2/animation/timing.js.map +1 -0
- package/lib/commonjs/reanimated2/animation/util.js +233 -0
- package/lib/commonjs/reanimated2/animation/util.js.map +1 -0
- package/lib/commonjs/reanimated2/commonTypes.js +17 -0
- package/lib/commonjs/reanimated2/commonTypes.js.map +1 -0
- package/lib/commonjs/reanimated2/component/FlatList.js +53 -0
- package/lib/commonjs/reanimated2/component/FlatList.js.map +1 -0
- package/lib/commonjs/reanimated2/component/Image.js +17 -0
- package/lib/commonjs/reanimated2/component/Image.js.map +1 -0
- package/lib/commonjs/reanimated2/component/ScrollView.js +17 -0
- package/lib/commonjs/reanimated2/component/ScrollView.js.map +1 -0
- package/lib/commonjs/reanimated2/component/Text.js +17 -0
- package/lib/commonjs/reanimated2/component/Text.js.map +1 -0
- package/lib/commonjs/reanimated2/component/View.js +17 -0
- package/lib/commonjs/reanimated2/component/View.js.map +1 -0
- package/lib/commonjs/reanimated2/core.js +360 -0
- package/lib/commonjs/reanimated2/core.js.map +1 -0
- package/lib/commonjs/reanimated2/fabricUtils.js +27 -0
- package/lib/commonjs/reanimated2/fabricUtils.js.map +1 -0
- package/lib/commonjs/reanimated2/fabricUtils.web.js +21 -0
- package/lib/commonjs/reanimated2/fabricUtils.web.js.map +1 -0
- package/lib/commonjs/reanimated2/frameCallback/FrameCallbackRegistryJS.js +55 -0
- package/lib/commonjs/reanimated2/frameCallback/FrameCallbackRegistryJS.js.map +1 -0
- package/lib/commonjs/reanimated2/frameCallback/FrameCallbackRegistryUI.js +64 -0
- package/lib/commonjs/reanimated2/frameCallback/FrameCallbackRegistryUI.js.map +1 -0
- package/lib/commonjs/reanimated2/globals.d.js +6 -0
- package/lib/commonjs/reanimated2/globals.d.js.map +1 -0
- package/lib/commonjs/reanimated2/hook/Hooks.js +35 -0
- package/lib/commonjs/reanimated2/hook/Hooks.js.map +1 -0
- package/lib/commonjs/reanimated2/hook/commonTypes.js +6 -0
- package/lib/commonjs/reanimated2/hook/commonTypes.js.map +1 -0
- package/lib/commonjs/reanimated2/hook/index.js +118 -0
- package/lib/commonjs/reanimated2/hook/index.js.map +1 -0
- package/lib/commonjs/reanimated2/hook/useAnimatedGestureHandler.js +66 -0
- package/lib/commonjs/reanimated2/hook/useAnimatedGestureHandler.js.map +1 -0
- package/lib/commonjs/reanimated2/hook/useAnimatedKeyboard.js +48 -0
- package/lib/commonjs/reanimated2/hook/useAnimatedKeyboard.js.map +1 -0
- package/lib/commonjs/reanimated2/hook/useAnimatedReaction.js +44 -0
- package/lib/commonjs/reanimated2/hook/useAnimatedReaction.js.map +1 -0
- package/lib/commonjs/reanimated2/hook/useAnimatedRef.js +43 -0
- package/lib/commonjs/reanimated2/hook/useAnimatedRef.js.map +1 -0
- package/lib/commonjs/reanimated2/hook/useAnimatedScrollHandler.js +62 -0
- package/lib/commonjs/reanimated2/hook/useAnimatedScrollHandler.js.map +1 -0
- package/lib/commonjs/reanimated2/hook/useAnimatedSensor.js +94 -0
- package/lib/commonjs/reanimated2/hook/useAnimatedSensor.js.map +1 -0
- package/lib/commonjs/reanimated2/hook/useAnimatedStyle.js +471 -0
- package/lib/commonjs/reanimated2/hook/useAnimatedStyle.js.map +1 -0
- package/lib/commonjs/reanimated2/hook/useDerivedValue.js +49 -0
- package/lib/commonjs/reanimated2/hook/useDerivedValue.js.map +1 -0
- package/lib/commonjs/reanimated2/hook/useFrameCallback.js +36 -0
- package/lib/commonjs/reanimated2/hook/useFrameCallback.js.map +1 -0
- package/lib/commonjs/reanimated2/hook/useSharedValue.js +30 -0
- package/lib/commonjs/reanimated2/hook/useSharedValue.js.map +1 -0
- package/lib/commonjs/reanimated2/hook/utils.js +247 -0
- package/lib/commonjs/reanimated2/hook/utils.js.map +1 -0
- package/lib/commonjs/reanimated2/index.js +162 -0
- package/lib/commonjs/reanimated2/index.js.map +1 -0
- package/lib/commonjs/reanimated2/interpolateColor.js +154 -0
- package/lib/commonjs/reanimated2/interpolateColor.js.map +1 -0
- package/lib/commonjs/reanimated2/interpolation.js +143 -0
- package/lib/commonjs/reanimated2/interpolation.js.map +1 -0
- package/lib/commonjs/reanimated2/jestUtils.js +239 -0
- package/lib/commonjs/reanimated2/jestUtils.js.map +1 -0
- package/lib/commonjs/reanimated2/js-reanimated/JSReanimated.js +160 -0
- package/lib/commonjs/reanimated2/js-reanimated/JSReanimated.js.map +1 -0
- package/lib/commonjs/reanimated2/js-reanimated/Mapper.js +74 -0
- package/lib/commonjs/reanimated2/js-reanimated/Mapper.js.map +1 -0
- package/lib/commonjs/reanimated2/js-reanimated/MapperRegistry.js +146 -0
- package/lib/commonjs/reanimated2/js-reanimated/MapperRegistry.js.map +1 -0
- package/lib/commonjs/reanimated2/js-reanimated/MutableValue.js +57 -0
- package/lib/commonjs/reanimated2/js-reanimated/MutableValue.js.map +1 -0
- package/lib/commonjs/reanimated2/js-reanimated/commonTypes.js +6 -0
- package/lib/commonjs/reanimated2/js-reanimated/commonTypes.js.map +1 -0
- package/lib/commonjs/reanimated2/js-reanimated/global.js +57 -0
- package/lib/commonjs/reanimated2/js-reanimated/global.js.map +1 -0
- package/lib/commonjs/reanimated2/js-reanimated/index.js +57 -0
- package/lib/commonjs/reanimated2/js-reanimated/index.js.map +1 -0
- package/lib/commonjs/reanimated2/layoutReanimation/LayoutAnimationRepository.js +97 -0
- package/lib/commonjs/reanimated2/layoutReanimation/LayoutAnimationRepository.js.map +1 -0
- package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/BaseAnimationBuilder.js +100 -0
- package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/BaseAnimationBuilder.js.map +1 -0
- package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/ComplexAnimationBuilder.js +203 -0
- package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/ComplexAnimationBuilder.js.map +1 -0
- package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/Keyframe.js +244 -0
- package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/Keyframe.js.map +1 -0
- package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/commonTypes.js +6 -0
- package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/commonTypes.js.map +1 -0
- package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/index.js +30 -0
- package/lib/commonjs/reanimated2/layoutReanimation/animationBuilder/index.js.map +1 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Bounce.js +570 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Bounce.js.map +1 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Default.js +55 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Default.js.map +1 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Fade.js +409 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Fade.js.map +1 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Flip.js +559 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Flip.js.map +1 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.js +221 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.js.map +1 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Pinwheel.js +101 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Pinwheel.js.map +1 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Roll.js +189 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Roll.js.map +1 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Rotate.js +403 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Rotate.js.map +1 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Slide.js +298 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Slide.js.map +1 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Stretch.js +167 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Stretch.js.map +1 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Zoom.js +700 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/Zoom.js.map +1 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/index.js +136 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultAnimations/index.js.map +1 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/CurvedTransition.js +120 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/CurvedTransition.js.map +1 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.js +180 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.js.map +1 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/FadingTransition.js +66 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/FadingTransition.js.map +1 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/JumpingTransition.js +64 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/JumpingTransition.js.map +1 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/LinearTransition.js +52 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/LinearTransition.js.map +1 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/SequencedTransition.js +68 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/SequencedTransition.js.map +1 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/index.js +84 -0
- package/lib/commonjs/reanimated2/layoutReanimation/defaultTransitions/index.js.map +1 -0
- package/lib/commonjs/reanimated2/layoutReanimation/index.js +47 -0
- package/lib/commonjs/reanimated2/layoutReanimation/index.js.map +1 -0
- package/lib/commonjs/reanimated2/mock.js +88 -0
- package/lib/commonjs/reanimated2/mock.js.map +1 -0
- package/lib/commonjs/reanimated2/platform-specific/RNRenderer.js +16 -0
- package/lib/commonjs/reanimated2/platform-specific/RNRenderer.js.map +1 -0
- package/lib/{reanimated2 → commonjs/reanimated2}/platform-specific/RNRenderer.web.js +2 -0
- package/lib/commonjs/reanimated2/platform-specific/RNRenderer.web.js.map +1 -0
- package/lib/commonjs/reanimated2/utils.js +19 -0
- package/lib/commonjs/reanimated2/utils.js.map +1 -0
- package/lib/commonjs/setAndForwardRef.js +63 -0
- package/lib/commonjs/setAndForwardRef.js.map +1 -0
- package/lib/module/Animated.js +8 -0
- package/lib/module/Animated.js.map +1 -0
- package/lib/module/ConfigHelper.js +161 -0
- package/lib/module/ConfigHelper.js.map +1 -0
- package/lib/module/createAnimatedComponent.js +452 -0
- package/lib/module/createAnimatedComponent.js.map +1 -0
- package/lib/module/index.js +15 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/index.web.js +6 -0
- package/lib/module/index.web.js.map +1 -0
- package/lib/module/reanimated2/Bezier.js +159 -0
- package/lib/module/reanimated2/Bezier.js.map +1 -0
- package/lib/module/reanimated2/Colors.js +632 -0
- package/lib/module/reanimated2/Colors.js.map +1 -0
- package/lib/{types/reanimated2/Easing.d.ts → module/reanimated2/Easing.js} +179 -40
- package/lib/module/reanimated2/Easing.js.map +1 -0
- package/lib/module/reanimated2/NativeMethods.js +82 -0
- package/lib/module/reanimated2/NativeMethods.js.map +1 -0
- package/lib/module/reanimated2/NativeReanimated/NativeReanimated.js +89 -0
- package/lib/module/reanimated2/NativeReanimated/NativeReanimated.js.map +1 -0
- package/lib/{reanimated2 → module/reanimated2}/NativeReanimated/index.js +6 -4
- package/lib/module/reanimated2/NativeReanimated/index.js.map +1 -0
- package/lib/module/reanimated2/PlatformChecker.js +17 -0
- package/lib/module/reanimated2/PlatformChecker.js.map +1 -0
- package/lib/module/reanimated2/PropAdapters.js +56 -0
- package/lib/module/reanimated2/PropAdapters.js.map +1 -0
- package/lib/module/reanimated2/UpdateProps.js +64 -0
- package/lib/module/reanimated2/UpdateProps.js.map +1 -0
- package/lib/module/reanimated2/ViewDescriptorsSet.js +83 -0
- package/lib/module/reanimated2/ViewDescriptorsSet.js.map +1 -0
- package/lib/module/reanimated2/WorkletEventHandler.js +64 -0
- package/lib/module/reanimated2/WorkletEventHandler.js.map +1 -0
- package/lib/module/reanimated2/animation/commonTypes.js +2 -0
- package/lib/module/reanimated2/animation/commonTypes.js.map +1 -0
- package/lib/module/reanimated2/animation/decay.js +123 -0
- package/lib/module/reanimated2/animation/decay.js.map +1 -0
- package/lib/module/reanimated2/animation/delay.js +79 -0
- package/lib/module/reanimated2/animation/delay.js.map +1 -0
- package/lib/{reanimated2 → module/reanimated2}/animation/index.js +1 -0
- package/lib/module/reanimated2/animation/index.js.map +1 -0
- package/lib/module/reanimated2/animation/repeat.js +95 -0
- package/lib/module/reanimated2/animation/repeat.js.map +1 -0
- package/lib/module/reanimated2/animation/sequence.js +93 -0
- package/lib/module/reanimated2/animation/sequence.js.map +1 -0
- package/lib/module/reanimated2/animation/spring.js +113 -0
- package/lib/module/reanimated2/animation/spring.js.map +1 -0
- package/lib/module/reanimated2/animation/styleAnimation.js +191 -0
- package/lib/module/reanimated2/animation/styleAnimation.js.map +1 -0
- package/lib/module/reanimated2/animation/timing.js +73 -0
- package/lib/module/reanimated2/animation/timing.js.map +1 -0
- package/lib/module/reanimated2/animation/util.js +216 -0
- package/lib/module/reanimated2/animation/util.js.map +1 -0
- package/lib/module/reanimated2/commonTypes.js +10 -0
- package/lib/module/reanimated2/commonTypes.js.map +1 -0
- package/lib/module/reanimated2/component/FlatList.js +33 -0
- package/lib/module/reanimated2/component/FlatList.js.map +1 -0
- package/lib/module/reanimated2/component/Image.js +5 -0
- package/lib/module/reanimated2/component/Image.js.map +1 -0
- package/lib/module/reanimated2/component/ScrollView.js +5 -0
- package/lib/module/reanimated2/component/ScrollView.js.map +1 -0
- package/lib/module/reanimated2/component/Text.js +5 -0
- package/lib/module/reanimated2/component/Text.js.map +1 -0
- package/lib/module/reanimated2/component/View.js +5 -0
- package/lib/module/reanimated2/component/View.js.map +1 -0
- package/lib/module/reanimated2/core.js +314 -0
- package/lib/module/reanimated2/core.js.map +1 -0
- package/lib/module/reanimated2/fabricUtils.js +18 -0
- package/lib/module/reanimated2/fabricUtils.js.map +1 -0
- package/lib/module/reanimated2/fabricUtils.web.js +12 -0
- package/lib/module/reanimated2/fabricUtils.web.js.map +1 -0
- package/lib/module/reanimated2/frameCallback/FrameCallbackRegistryJS.js +44 -0
- package/lib/module/reanimated2/frameCallback/FrameCallbackRegistryJS.js.map +1 -0
- package/lib/module/reanimated2/frameCallback/FrameCallbackRegistryUI.js +55 -0
- package/lib/module/reanimated2/frameCallback/FrameCallbackRegistryUI.js.map +1 -0
- package/lib/module/reanimated2/globals.d.js +2 -0
- package/lib/module/reanimated2/globals.d.js.map +1 -0
- package/lib/{reanimated2 → module/reanimated2}/hook/Hooks.js +4 -3
- package/lib/module/reanimated2/hook/Hooks.js.map +1 -0
- package/lib/module/reanimated2/hook/commonTypes.js +2 -0
- package/lib/module/reanimated2/hook/commonTypes.js.map +1 -0
- package/lib/module/reanimated2/hook/index.js +12 -0
- package/lib/module/reanimated2/hook/index.js.map +1 -0
- package/lib/module/reanimated2/hook/useAnimatedGestureHandler.js +56 -0
- package/lib/module/reanimated2/hook/useAnimatedGestureHandler.js.map +1 -0
- package/lib/module/reanimated2/hook/useAnimatedKeyboard.js +34 -0
- package/lib/module/reanimated2/hook/useAnimatedKeyboard.js.map +1 -0
- package/lib/module/reanimated2/hook/useAnimatedReaction.js +35 -0
- package/lib/module/reanimated2/hook/useAnimatedReaction.js.map +1 -0
- package/lib/module/reanimated2/hook/useAnimatedRef.js +32 -0
- package/lib/module/reanimated2/hook/useAnimatedRef.js.map +1 -0
- package/lib/module/reanimated2/hook/useAnimatedScrollHandler.js +54 -0
- package/lib/module/reanimated2/hook/useAnimatedScrollHandler.js.map +1 -0
- package/lib/module/reanimated2/hook/useAnimatedSensor.js +79 -0
- package/lib/module/reanimated2/hook/useAnimatedSensor.js.map +1 -0
- package/lib/module/reanimated2/hook/useAnimatedStyle.js +450 -0
- package/lib/module/reanimated2/hook/useAnimatedStyle.js.map +1 -0
- package/lib/module/reanimated2/hook/useDerivedValue.js +39 -0
- package/lib/module/reanimated2/hook/useDerivedValue.js.map +1 -0
- package/lib/module/reanimated2/hook/useFrameCallback.js +24 -0
- package/lib/module/reanimated2/hook/useFrameCallback.js.map +1 -0
- package/lib/module/reanimated2/hook/useSharedValue.js +20 -0
- package/lib/module/reanimated2/hook/useSharedValue.js.map +1 -0
- package/lib/module/reanimated2/hook/utils.js +208 -0
- package/lib/module/reanimated2/hook/utils.js.map +1 -0
- package/lib/{reanimated2 → module/reanimated2}/index.js +1 -0
- package/lib/module/reanimated2/index.js.map +1 -0
- package/lib/module/reanimated2/interpolateColor.js +135 -0
- package/lib/module/reanimated2/interpolateColor.js.map +1 -0
- package/lib/module/reanimated2/interpolation.js +135 -0
- package/lib/module/reanimated2/interpolation.js.map +1 -0
- package/lib/module/reanimated2/jestUtils.js +217 -0
- package/lib/module/reanimated2/jestUtils.js.map +1 -0
- package/lib/module/reanimated2/js-reanimated/JSReanimated.js +144 -0
- package/lib/module/reanimated2/js-reanimated/JSReanimated.js.map +1 -0
- package/lib/module/reanimated2/js-reanimated/Mapper.js +62 -0
- package/lib/module/reanimated2/js-reanimated/Mapper.js.map +1 -0
- package/lib/module/reanimated2/js-reanimated/MapperRegistry.js +137 -0
- package/lib/module/reanimated2/js-reanimated/MapperRegistry.js.map +1 -0
- package/lib/module/reanimated2/js-reanimated/MutableValue.js +48 -0
- package/lib/module/reanimated2/js-reanimated/MutableValue.js.map +1 -0
- package/lib/module/reanimated2/js-reanimated/commonTypes.js +2 -0
- package/lib/module/reanimated2/js-reanimated/commonTypes.js.map +1 -0
- package/lib/module/reanimated2/js-reanimated/global.js +48 -0
- package/lib/module/reanimated2/js-reanimated/global.js.map +1 -0
- package/lib/module/reanimated2/js-reanimated/index.js +43 -0
- package/lib/module/reanimated2/js-reanimated/index.js.map +1 -0
- package/lib/module/reanimated2/layoutReanimation/LayoutAnimationRepository.js +91 -0
- package/lib/module/reanimated2/layoutReanimation/LayoutAnimationRepository.js.map +1 -0
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/BaseAnimationBuilder.js +90 -0
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/BaseAnimationBuilder.js.map +1 -0
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/ComplexAnimationBuilder.js +192 -0
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/ComplexAnimationBuilder.js.map +1 -0
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/Keyframe.js +233 -0
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/Keyframe.js.map +1 -0
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/commonTypes.js +2 -0
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/commonTypes.js.map +1 -0
- package/lib/{reanimated2 → module/reanimated2}/layoutReanimation/animationBuilder/index.js +1 -0
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/index.js.map +1 -0
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Bounce.js +530 -0
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Bounce.js.map +1 -0
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Default.js +40 -0
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Default.js.map +1 -0
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Fade.js +372 -0
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Fade.js.map +1 -0
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Flip.js +516 -0
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Flip.js.map +1 -0
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.js +199 -0
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.js.map +1 -0
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Pinwheel.js +88 -0
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Pinwheel.js.map +1 -0
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Roll.js +168 -0
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Roll.js.map +1 -0
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Rotate.js +372 -0
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Rotate.js.map +1 -0
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Slide.js +265 -0
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Slide.js.map +1 -0
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Stretch.js +148 -0
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Stretch.js.map +1 -0
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Zoom.js +643 -0
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Zoom.js.map +1 -0
- package/lib/{reanimated2 → module/reanimated2}/layoutReanimation/defaultAnimations/index.js +1 -0
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/index.js.map +1 -0
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/CurvedTransition.js +108 -0
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/CurvedTransition.js.map +1 -0
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.js +166 -0
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.js.map +1 -0
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/FadingTransition.js +55 -0
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/FadingTransition.js.map +1 -0
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/JumpingTransition.js +52 -0
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/JumpingTransition.js.map +1 -0
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/LinearTransition.js +41 -0
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/LinearTransition.js.map +1 -0
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/SequencedTransition.js +57 -0
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/SequencedTransition.js.map +1 -0
- package/lib/{reanimated2 → module/reanimated2}/layoutReanimation/defaultTransitions/index.js +1 -0
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/index.js.map +1 -0
- package/lib/{reanimated2 → module/reanimated2}/layoutReanimation/index.js +1 -0
- package/lib/module/reanimated2/layoutReanimation/index.js.map +1 -0
- package/lib/module/reanimated2/mock.js +86 -0
- package/lib/module/reanimated2/mock.js.map +1 -0
- package/lib/{reanimated2 → module/reanimated2}/platform-specific/RNRenderer.js +1 -0
- package/lib/module/reanimated2/platform-specific/RNRenderer.js.map +1 -0
- package/lib/module/reanimated2/platform-specific/RNRenderer.web.js +3 -0
- package/lib/module/reanimated2/platform-specific/RNRenderer.web.js.map +1 -0
- package/lib/module/reanimated2/utils.js +11 -0
- package/lib/module/reanimated2/utils.js.map +1 -0
- package/lib/{types/setAndForwardRef.d.ts → module/setAndForwardRef.js} +21 -6
- package/lib/module/setAndForwardRef.js.map +1 -0
- package/mock.js +1 -0
- package/package.json +28 -21
- package/plugin.js +7 -6
- package/src/Animated.ts +11 -0
- package/src/index.ts +13 -0
- package/src/index.web.ts +5 -0
- package/src/reanimated2/Colors.ts +1 -1
- package/src/reanimated2/NativeMethods.ts +5 -0
- package/src/reanimated2/NativeReanimated/NativeReanimated.ts +10 -1
- package/src/reanimated2/animation/decay.ts +79 -30
- package/src/reanimated2/animation/index.ts +7 -4
- package/src/reanimated2/animation/sequence.ts +0 -5
- package/src/reanimated2/animation/util.ts +8 -1
- package/src/reanimated2/commonTypes.ts +13 -0
- package/src/reanimated2/component/FlatList.tsx +25 -21
- package/src/reanimated2/component/Image.ts +6 -0
- package/src/reanimated2/component/ScrollView.ts +6 -0
- package/src/reanimated2/component/Text.ts +6 -0
- package/src/reanimated2/component/View.ts +6 -0
- package/src/reanimated2/core.ts +8 -13
- package/src/reanimated2/fabricUtils.web.ts +19 -0
- package/src/reanimated2/frameCallback/FrameCallbackRegistryJS.ts +43 -0
- package/src/reanimated2/frameCallback/FrameCallbackRegistryUI.ts +64 -0
- package/src/reanimated2/globals.d.ts +3 -0
- package/src/reanimated2/hook/index.ts +14 -14
- package/src/reanimated2/hook/useAnimatedKeyboard.ts +35 -0
- package/src/reanimated2/hook/useAnimatedSensor.ts +5 -5
- package/src/reanimated2/hook/useFrameCallback.ts +39 -0
- package/src/reanimated2/jestUtils.ts +11 -3
- package/src/reanimated2/js-reanimated/JSReanimated.ts +16 -1
- package/src/reanimated2/js-reanimated/global.ts +50 -0
- package/src/reanimated2/js-reanimated/index.ts +0 -36
- package/src/reanimated2/layoutReanimation/LayoutAnimationRepository.ts +1 -1
- package/src/reanimated2/layoutReanimation/animationBuilder/index.ts +1 -1
- package/src/reanimated2/mock.ts +6 -0
- package/android/local.properties +0 -1
- package/lib/Animated.js +0 -18
- package/lib/ConfigHelper.js +0 -145
- package/lib/ReanimatedEventEmitter.js +0 -3
- package/lib/ReanimatedModule.js +0 -2
- package/lib/ReanimatedModule.macos.js +0 -2
- package/lib/ReanimatedModule.native.js +0 -12
- package/lib/ReanimatedModule.windows.js +0 -2
- package/lib/ReanimatedModuleCompat.js +0 -66
- package/lib/__mocks__/ReanimatedEventEmitter.js +0 -8
- package/lib/__mocks__/ReanimatedModule.native.js +0 -11
- package/lib/createAnimatedComponent.js +0 -375
- package/lib/index.js +0 -18
- package/lib/reanimated2/Bezier.js +0 -126
- package/lib/reanimated2/Colors.js +0 -522
- package/lib/reanimated2/NativeMethods.js +0 -59
- package/lib/reanimated2/NativeReanimated/NativeReanimated.js +0 -50
- package/lib/reanimated2/PlatformChecker.js +0 -16
- package/lib/reanimated2/PropAdapters.js +0 -55
- package/lib/reanimated2/UpdateProps.js +0 -70
- package/lib/reanimated2/ViewDescriptorsSet.js +0 -75
- package/lib/reanimated2/WorkletEventHandler.js +0 -37
- package/lib/reanimated2/__mocks__/MutableValue.js +0 -13
- package/lib/reanimated2/__mocks__/NativeReanimated.js +0 -20
- package/lib/reanimated2/__mocks__/NativeReanimated.native.js +0 -20
- package/lib/reanimated2/animation/commonTypes.js +0 -1
- package/lib/reanimated2/animation/decay.js +0 -71
- package/lib/reanimated2/animation/delay.js +0 -64
- package/lib/reanimated2/animation/repeat.js +0 -69
- package/lib/reanimated2/animation/sequence.js +0 -72
- package/lib/reanimated2/animation/spring.js +0 -103
- package/lib/reanimated2/animation/styleAnimation.js +0 -171
- package/lib/reanimated2/animation/timing.js +0 -64
- package/lib/reanimated2/animation/util.js +0 -180
- package/lib/reanimated2/commonTypes.js +0 -1
- package/lib/reanimated2/component/FlatList.js +0 -30
- package/lib/reanimated2/component/WrappedComponents.js +0 -9
- package/lib/reanimated2/component/index.js +0 -4
- package/lib/reanimated2/core.js +0 -276
- package/lib/reanimated2/fabricUtils.js +0 -18
- package/lib/reanimated2/globals.d.ts +0 -76
- package/lib/reanimated2/hook/commonTypes.js +0 -1
- package/lib/reanimated2/hook/index.js +0 -9
- package/lib/reanimated2/hook/useAnimatedGestureHandler.js +0 -49
- package/lib/reanimated2/hook/useAnimatedReaction.js +0 -37
- package/lib/reanimated2/hook/useAnimatedRef.js +0 -29
- package/lib/reanimated2/hook/useAnimatedScrollHandler.js +0 -41
- package/lib/reanimated2/hook/useAnimatedSensor.js +0 -66
- package/lib/reanimated2/hook/useAnimatedStyle.js +0 -393
- package/lib/reanimated2/hook/useDerivedValue.js +0 -36
- package/lib/reanimated2/hook/useSharedValue.js +0 -17
- package/lib/reanimated2/hook/utils.js +0 -173
- package/lib/reanimated2/interpolateColor.js +0 -101
- package/lib/reanimated2/interpolation.js +0 -112
- package/lib/reanimated2/jestUtils.js +0 -160
- package/lib/reanimated2/js-reanimated/JSReanimated.js +0 -99
- package/lib/reanimated2/js-reanimated/Mapper.js +0 -43
- package/lib/reanimated2/js-reanimated/MapperRegistry.js +0 -101
- package/lib/reanimated2/js-reanimated/MutableValue.js +0 -29
- package/lib/reanimated2/js-reanimated/commonTypes.js +0 -1
- package/lib/reanimated2/js-reanimated/index.js +0 -62
- package/lib/reanimated2/layoutReanimation/LayoutAnimationRepository.js +0 -67
- package/lib/reanimated2/layoutReanimation/animationBuilder/BaseAnimationBuilder.js +0 -69
- package/lib/reanimated2/layoutReanimation/animationBuilder/ComplexAnimationBuilder.js +0 -133
- package/lib/reanimated2/layoutReanimation/animationBuilder/Keyframe.js +0 -194
- package/lib/reanimated2/layoutReanimation/animationBuilder/commonTypes.js +0 -1
- package/lib/reanimated2/layoutReanimation/defaultAnimations/Bounce.js +0 -376
- package/lib/reanimated2/layoutReanimation/defaultAnimations/Default.js +0 -36
- package/lib/reanimated2/layoutReanimation/defaultAnimations/Fade.js +0 -275
- package/lib/reanimated2/layoutReanimation/defaultAnimations/Flip.js +0 -385
- package/lib/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.js +0 -138
- package/lib/reanimated2/layoutReanimation/defaultAnimations/Pinwheel.js +0 -81
- package/lib/reanimated2/layoutReanimation/defaultAnimations/Roll.js +0 -115
- package/lib/reanimated2/layoutReanimation/defaultAnimations/Rotate.js +0 -273
- package/lib/reanimated2/layoutReanimation/defaultAnimations/Slide.js +0 -203
- package/lib/reanimated2/layoutReanimation/defaultAnimations/Stretch.js +0 -101
- package/lib/reanimated2/layoutReanimation/defaultAnimations/Zoom.js +0 -451
- package/lib/reanimated2/layoutReanimation/defaultTransitions/CurvedTransition.js +0 -90
- package/lib/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.js +0 -132
- package/lib/reanimated2/layoutReanimation/defaultTransitions/FadingTransition.js +0 -37
- package/lib/reanimated2/layoutReanimation/defaultTransitions/JumpingTransition.js +0 -41
- package/lib/reanimated2/layoutReanimation/defaultTransitions/LinearTransition.js +0 -34
- package/lib/reanimated2/layoutReanimation/defaultTransitions/SequencedTransition.js +0 -46
- package/lib/reanimated2/mock.js +0 -69
- package/lib/reanimated2/utils.js +0 -9
- package/lib/setAndForwardRef.js +0 -19
- package/lib/types/ConfigHelper.d.ts +0 -12
- package/lib/types/ReanimatedEventEmitter.d.ts +0 -3
- package/lib/types/ReanimatedModule.d.ts +0 -2
- package/lib/types/ReanimatedModule.macos.d.ts +0 -2
- package/lib/types/ReanimatedModule.native.d.ts +0 -2
- package/lib/types/ReanimatedModule.windows.d.ts +0 -2
- package/lib/types/ReanimatedModuleCompat.d.ts +0 -14
- package/lib/types/createAnimatedComponent.d.ts +0 -33
- package/lib/types/reanimated2/Bezier.d.ts +0 -6
- package/lib/types/reanimated2/Colors.d.ts +0 -31
- package/lib/types/reanimated2/NativeMethods.d.ts +0 -15
- package/lib/types/reanimated2/NativeReanimated/NativeReanimated.d.ts +0 -20
- package/lib/types/reanimated2/NativeReanimated/index.d.ts +0 -3
- package/lib/types/reanimated2/PlatformChecker.d.ts +0 -5
- package/lib/types/reanimated2/PropAdapters.d.ts +0 -4
- package/lib/types/reanimated2/UpdateProps.d.ts +0 -9
- package/lib/types/reanimated2/ViewDescriptorsSet.d.ts +0 -20
- package/lib/types/reanimated2/WorkletEventHandler.d.ts +0 -13
- package/lib/types/reanimated2/__mocks__/MutableValue.d.ts +0 -5
- package/lib/types/reanimated2/__mocks__/NativeReanimated.d.ts +0 -13
- package/lib/types/reanimated2/__mocks__/NativeReanimated.native.d.ts +0 -13
- package/lib/types/reanimated2/animation/commonTypes.d.ts +0 -27
- package/lib/types/reanimated2/animation/decay.d.ts +0 -19
- package/lib/types/reanimated2/animation/delay.d.ts +0 -7
- package/lib/types/reanimated2/animation/index.d.ts +0 -9
- package/lib/types/reanimated2/animation/repeat.d.ts +0 -12
- package/lib/types/reanimated2/animation/sequence.d.ts +0 -7
- package/lib/types/reanimated2/animation/spring.d.ts +0 -22
- package/lib/types/reanimated2/animation/styleAnimation.d.ts +0 -7
- package/lib/types/reanimated2/animation/timing.d.ts +0 -21
- package/lib/types/reanimated2/animation/util.d.ts +0 -9
- package/lib/types/reanimated2/commonTypes.d.ts +0 -80
- package/lib/types/reanimated2/component/FlatList.d.ts +0 -9
- package/lib/types/reanimated2/component/WrappedComponents.d.ts +0 -8
- package/lib/types/reanimated2/component/index.d.ts +0 -9
- package/lib/types/reanimated2/core.d.ts +0 -24
- package/lib/types/reanimated2/fabricUtils.d.ts +0 -4
- package/lib/types/reanimated2/hook/Hooks.d.ts +0 -5
- package/lib/types/reanimated2/hook/commonTypes.d.ts +0 -15
- package/lib/types/reanimated2/hook/index.d.ts +0 -10
- package/lib/types/reanimated2/hook/useAnimatedGestureHandler.d.ts +0 -35
- package/lib/types/reanimated2/hook/useAnimatedReaction.d.ts +0 -12
- package/lib/types/reanimated2/hook/useAnimatedRef.d.ts +0 -3
- package/lib/types/reanimated2/hook/useAnimatedScrollHandler.d.ts +0 -21
- package/lib/types/reanimated2/hook/useAnimatedSensor.d.ts +0 -18
- package/lib/types/reanimated2/hook/useAnimatedStyle.d.ts +0 -11
- package/lib/types/reanimated2/hook/useDerivedValue.d.ts +0 -4
- package/lib/types/reanimated2/hook/useSharedValue.d.ts +0 -2
- package/lib/types/reanimated2/hook/utils.d.ts +0 -28
- package/lib/types/reanimated2/index.d.ts +0 -12
- package/lib/types/reanimated2/interpolateColor.d.ts +0 -31
- package/lib/types/reanimated2/interpolation.d.ts +0 -11
- package/lib/types/reanimated2/jestUtils.d.ts +0 -12
- package/lib/types/reanimated2/js-reanimated/JSReanimated.d.ts +0 -30
- package/lib/types/reanimated2/js-reanimated/Mapper.d.ts +0 -14
- package/lib/types/reanimated2/js-reanimated/MapperRegistry.d.ts +0 -14
- package/lib/types/reanimated2/js-reanimated/MutableValue.d.ts +0 -14
- package/lib/types/reanimated2/js-reanimated/commonTypes.d.ts +0 -44
- package/lib/types/reanimated2/js-reanimated/index.d.ts +0 -15
- package/lib/types/reanimated2/layoutReanimation/LayoutAnimationRepository.d.ts +0 -1
- package/lib/types/reanimated2/layoutReanimation/animationBuilder/BaseAnimationBuilder.d.ts +0 -22
- package/lib/types/reanimated2/layoutReanimation/animationBuilder/ComplexAnimationBuilder.d.ts +0 -38
- package/lib/types/reanimated2/layoutReanimation/animationBuilder/Keyframe.d.ts +0 -25
- package/lib/types/reanimated2/layoutReanimation/animationBuilder/commonTypes.d.ts +0 -77
- package/lib/types/reanimated2/layoutReanimation/animationBuilder/index.d.ts +0 -4
- package/lib/types/reanimated2/layoutReanimation/defaultAnimations/Bounce.d.ts +0 -62
- package/lib/types/reanimated2/layoutReanimation/defaultAnimations/Default.d.ts +0 -4
- package/lib/types/reanimated2/layoutReanimation/defaultAnimations/Fade.d.ts +0 -42
- package/lib/types/reanimated2/layoutReanimation/defaultAnimations/Flip.d.ts +0 -50
- package/lib/types/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.d.ts +0 -18
- package/lib/types/reanimated2/layoutReanimation/defaultAnimations/Pinwheel.d.ts +0 -10
- package/lib/types/reanimated2/layoutReanimation/defaultAnimations/Roll.d.ts +0 -18
- package/lib/types/reanimated2/layoutReanimation/defaultAnimations/Rotate.d.ts +0 -34
- package/lib/types/reanimated2/layoutReanimation/defaultAnimations/Slide.d.ts +0 -34
- package/lib/types/reanimated2/layoutReanimation/defaultAnimations/Stretch.d.ts +0 -18
- package/lib/types/reanimated2/layoutReanimation/defaultAnimations/Zoom.d.ts +0 -66
- package/lib/types/reanimated2/layoutReanimation/defaultAnimations/index.d.ts +0 -10
- package/lib/types/reanimated2/layoutReanimation/defaultTransitions/CurvedTransition.d.ts +0 -19
- package/lib/types/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.d.ts +0 -13
- package/lib/types/reanimated2/layoutReanimation/defaultTransitions/FadingTransition.d.ts +0 -6
- package/lib/types/reanimated2/layoutReanimation/defaultTransitions/JumpingTransition.d.ts +0 -6
- package/lib/types/reanimated2/layoutReanimation/defaultTransitions/LinearTransition.d.ts +0 -7
- package/lib/types/reanimated2/layoutReanimation/defaultTransitions/SequencedTransition.d.ts +0 -9
- package/lib/types/reanimated2/layoutReanimation/defaultTransitions/index.d.ts +0 -6
- package/lib/types/reanimated2/layoutReanimation/index.d.ts +0 -4
- package/lib/types/reanimated2/mock.d.ts +0 -55
- package/lib/types/reanimated2/platform-specific/RNRenderer.d.ts +0 -1
- package/lib/types/reanimated2/platform-specific/RNRenderer.web.d.ts +0 -0
- package/lib/types/reanimated2/utils.d.ts +0 -7
- package/react-native-reanimated.d.ts +0 -1187
- package/src/Animated.js +0 -18
- package/src/ReanimatedEventEmitter.ts +0 -4
- package/src/ReanimatedModule.macos.ts +0 -3
- package/src/ReanimatedModule.native.ts +0 -13
- package/src/ReanimatedModule.ts +0 -3
- package/src/ReanimatedModule.windows.ts +0 -3
- package/src/ReanimatedModuleCompat.ts +0 -51
- package/src/__mocks__/ReanimatedEventEmitter.js +0 -8
- package/src/__mocks__/ReanimatedModule.native.js +0 -11
- package/src/reanimated2/__mocks__/MutableValue.ts +0 -15
- package/src/reanimated2/__mocks__/NativeReanimated.ts +0 -23
- package/src/reanimated2/component/WrappedComponents.ts +0 -11
- package/src/reanimated2/component/index.ts +0 -9
package/android/CMakeLists.txt
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
project(Reanimated)
|
|
2
|
+
cmake_minimum_required(VERSION 3.12.0)
|
|
2
3
|
|
|
3
4
|
set (CMAKE_VERBOSE_MAKEFILE ON)
|
|
4
5
|
set (CMAKE_CXX_STANDARD 17)
|
|
5
|
-
set (DEFAULT_FLAGS "-DFOLLY_NO_CONFIG=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -DFOLLY_HAVE_MEMRCHR=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_MOBILE=1 -DFOLLY_HAVE_RECVMMSG=1 -DFOLLY_HAVE_PTHREAD=1 -DON_ANDROID -DONANDROID -DANDROID -
|
|
6
|
+
set (DEFAULT_FLAGS "-DFOLLY_NO_CONFIG=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -DFOLLY_HAVE_MEMRCHR=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_MOBILE=1 -DFOLLY_HAVE_RECVMMSG=1 -DFOLLY_HAVE_PTHREAD=1 -DON_ANDROID -DONANDROID -DANDROID -DRNVERSION=${RNVERSION} -fexceptions -fno-omit-frame-pointer -frtti -Wno-sign-compare -std=c++17 -Wall")
|
|
6
7
|
if(${IS_NEW_ARCHITECTURE_ENABLED})
|
|
7
8
|
set (ALL_FLAGS "${DEFAULT_FLAGS} -DRCT_NEW_ARCH_ENABLED")
|
|
8
9
|
else()
|
|
@@ -22,11 +23,11 @@ set (PACKAGE_NAME "reanimated")
|
|
|
22
23
|
set (BUILD_DIR ${CMAKE_SOURCE_DIR}/build)
|
|
23
24
|
set (SRC_DIR ${CMAKE_SOURCE_DIR}/src)
|
|
24
25
|
|
|
26
|
+
set (ignoreMe "${PLAYGROUND_APP_NAME}")
|
|
27
|
+
|
|
25
28
|
if(${CLIENT_SIDE_BUILD})
|
|
26
|
-
set (NODE_MODULES_DIR "${CMAKE_SOURCE_DIR}/../../")
|
|
27
29
|
set (COMMON_SRC_DIR "${CMAKE_SOURCE_DIR}/../Common")
|
|
28
30
|
else()
|
|
29
|
-
set (NODE_MODULES_DIR "../${PLAYGROUND_APP_NAME}/node_modules")
|
|
30
31
|
set (COMMON_SRC_DIR "${SRC_DIR}/main/Common")
|
|
31
32
|
endif()
|
|
32
33
|
|
|
@@ -44,13 +45,9 @@ else()
|
|
|
44
45
|
endif()
|
|
45
46
|
|
|
46
47
|
file (GLOB LIBRN_DIR "${RN_SO_DIR}/${ANDROID_ABI}")
|
|
47
|
-
file (GLOB HERMES_DIR "${BUILD_DIR}/third-party-ndk/hermes/jni/${ANDROID_ABI}")
|
|
48
48
|
|
|
49
|
-
file(
|
|
50
|
-
file(
|
|
51
|
-
file(GLOB sources_shared_items "${COMMON_SRC_DIR}/cpp/SharedItems/*.cpp")
|
|
52
|
-
file(GLOB sources_registries "${COMMON_SRC_DIR}/cpp/Registries/*.cpp")
|
|
53
|
-
file(GLOB sources_android "${SRC_DIR}/main/cpp/*.cpp")
|
|
49
|
+
file(GLOB_RECURSE SOURCES_COMMON CONFIGURE_DEPENDS "${COMMON_SRC_DIR}/cpp/**.cpp")
|
|
50
|
+
file(GLOB_RECURSE SOURCES_ANDROID CONFIGURE_DEPENDS "${SRC_DIR}/main/cpp/**.cpp")
|
|
54
51
|
|
|
55
52
|
if(${REACT_NATIVE_TARGET_VERSION} LESS 66)
|
|
56
53
|
set (
|
|
@@ -77,21 +74,10 @@ endif()
|
|
|
77
74
|
add_library(
|
|
78
75
|
${PACKAGE_NAME}
|
|
79
76
|
SHARED
|
|
80
|
-
${
|
|
81
|
-
${
|
|
82
|
-
${sources_registries}
|
|
83
|
-
${sources_android}
|
|
84
|
-
${source_tools}
|
|
77
|
+
${SOURCES_COMMON}
|
|
78
|
+
${SOURCES_ANDROID}
|
|
85
79
|
${INCLUDE_JSI_CPP}
|
|
86
80
|
${INCLUDE_JSIDYNAMIC_CPP}
|
|
87
|
-
"${COMMON_SRC_DIR}/cpp/Tools/JSIStoreValueUser.cpp"
|
|
88
|
-
"${COMMON_SRC_DIR}/cpp/Tools/Mapper.cpp"
|
|
89
|
-
"${COMMON_SRC_DIR}/cpp/Tools/RuntimeDecorator.cpp"
|
|
90
|
-
"${COMMON_SRC_DIR}/cpp/Tools/Scheduler.cpp"
|
|
91
|
-
"${COMMON_SRC_DIR}/cpp/Tools/WorkletEventHandler.cpp"
|
|
92
|
-
"${COMMON_SRC_DIR}/cpp/Tools/FeaturesConfig.cpp"
|
|
93
|
-
"${COMMON_SRC_DIR}/cpp/LayoutAnimations/LayoutAnimationsProxy.cpp"
|
|
94
|
-
"${COMMON_SRC_DIR}/cpp/AnimatedSensor/AnimatedSensorModule.cpp"
|
|
95
81
|
${FABRIC_UTILS_CPP}
|
|
96
82
|
${REANIMATED_UI_MANAGER_BINDING_CPP}
|
|
97
83
|
)
|
|
@@ -121,7 +107,6 @@ target_include_directories(
|
|
|
121
107
|
"${NODE_MODULES_DIR}/react-native/ReactCommon/turbomodule/core"
|
|
122
108
|
"${NODE_MODULES_DIR}/react-native/ReactCommon/turbomodule"
|
|
123
109
|
"${NODE_MODULES_DIR}/react-native/ReactCommon/yoga"
|
|
124
|
-
"${NODE_MODULES_DIR}/hermes-engine/android/include/"
|
|
125
110
|
"${COMMON_SRC_DIR}/cpp/headers/Tools"
|
|
126
111
|
"${COMMON_SRC_DIR}/cpp/headers/SpecTools"
|
|
127
112
|
"${COMMON_SRC_DIR}/cpp/headers/NativeModules"
|
|
@@ -138,18 +123,6 @@ find_library(
|
|
|
138
123
|
LOG_LIB
|
|
139
124
|
log
|
|
140
125
|
)
|
|
141
|
-
find_library(
|
|
142
|
-
HERMES_LIB
|
|
143
|
-
hermes
|
|
144
|
-
PATHS ${HERMES_DIR}
|
|
145
|
-
NO_CMAKE_FIND_ROOT_PATH
|
|
146
|
-
)
|
|
147
|
-
find_library(
|
|
148
|
-
JSEXECUTOR_LIB
|
|
149
|
-
jscexecutor
|
|
150
|
-
PATHS ${LIBRN_DIR}
|
|
151
|
-
NO_CMAKE_FIND_ROOT_PATH
|
|
152
|
-
)
|
|
153
126
|
find_library(
|
|
154
127
|
REACT_NATIVE_JNI_LIB
|
|
155
128
|
reactnativejni
|
|
@@ -239,6 +212,12 @@ if(${IS_NEW_ARCHITECTURE_ENABLED})
|
|
|
239
212
|
PATHS ${LIBRN_DIR}
|
|
240
213
|
NO_CMAKE_FIND_ROOT_PATH
|
|
241
214
|
)
|
|
215
|
+
find_library(
|
|
216
|
+
RRC_VIEW
|
|
217
|
+
rrc_view
|
|
218
|
+
PATHS ${LIBRN_DIR}
|
|
219
|
+
NO_CMAKE_FIND_ROOT_PATH
|
|
220
|
+
)
|
|
242
221
|
find_library(
|
|
243
222
|
REACT_RENDER_SCHEDULER
|
|
244
223
|
react_render_scheduler
|
|
@@ -257,30 +236,70 @@ endif()
|
|
|
257
236
|
|
|
258
237
|
set_target_properties(${PACKAGE_NAME} PROPERTIES LINKER_LANGUAGE CXX)
|
|
259
238
|
|
|
260
|
-
|
|
239
|
+
|
|
240
|
+
target_link_libraries(
|
|
241
|
+
${PACKAGE_NAME}
|
|
242
|
+
${LOG_LIB}
|
|
243
|
+
${JSI_LIB}
|
|
244
|
+
${GLOG_LIB}
|
|
245
|
+
${FBJNI_LIB}
|
|
246
|
+
${FOLLY_LIB}
|
|
247
|
+
${REACT_NATIVE_JNI_LIB}
|
|
248
|
+
android
|
|
249
|
+
)
|
|
250
|
+
|
|
251
|
+
if(${JS_RUNTIME} STREQUAL "hermes")
|
|
252
|
+
string(APPEND CMAKE_CXX_FLAGS " -DJS_RUNTIME_HERMES=1")
|
|
253
|
+
if(${REACT_NATIVE_TARGET_VERSION} LESS 69)
|
|
254
|
+
# From `hermes-engine` npm package
|
|
255
|
+
target_include_directories(
|
|
256
|
+
${PACKAGE_NAME}
|
|
257
|
+
PRIVATE
|
|
258
|
+
"${JS_RUNTIME_DIR}/android/include"
|
|
259
|
+
)
|
|
260
|
+
else()
|
|
261
|
+
# Bundled Hermes from module `com.facebook.react:hermes-engine` or project `:ReactAndroid:hermes-engine`
|
|
262
|
+
target_include_directories(
|
|
263
|
+
${PACKAGE_NAME}
|
|
264
|
+
PRIVATE
|
|
265
|
+
"${JS_RUNTIME_DIR}/API"
|
|
266
|
+
"${JS_RUNTIME_DIR}/public"
|
|
267
|
+
)
|
|
268
|
+
endif()
|
|
269
|
+
target_link_libraries(
|
|
270
|
+
${PACKAGE_NAME}
|
|
271
|
+
"${BUILD_DIR}/third-party-ndk/hermes/jni/${ANDROID_ABI}/libhermes.so"
|
|
272
|
+
)
|
|
273
|
+
elseif(${JS_RUNTIME} STREQUAL "v8")
|
|
274
|
+
string(APPEND CMAKE_CXX_FLAGS " -DJS_RUNTIME_V8=1")
|
|
275
|
+
target_include_directories(
|
|
276
|
+
${PACKAGE_NAME}
|
|
277
|
+
PRIVATE
|
|
278
|
+
"${JS_RUNTIME_DIR}/src"
|
|
279
|
+
)
|
|
280
|
+
file (GLOB V8_SO_DIR "${JS_RUNTIME_DIR}/android/build/intermediates/library_jni/*/jni/${ANDROID_ABI}")
|
|
281
|
+
find_library(
|
|
282
|
+
V8EXECUTOR_LIB
|
|
283
|
+
v8executor
|
|
284
|
+
PATHS ${V8_SO_DIR}
|
|
285
|
+
NO_CMAKE_FIND_ROOT_PATH
|
|
286
|
+
)
|
|
261
287
|
target_link_libraries(
|
|
262
288
|
${PACKAGE_NAME}
|
|
263
|
-
${
|
|
264
|
-
${JSI_LIB}
|
|
265
|
-
${HERMES_LIB}
|
|
266
|
-
${GLOG_LIB}
|
|
267
|
-
${FBJNI_LIB}
|
|
268
|
-
${FOLLY_LIB}
|
|
269
|
-
${REACT_NATIVE_JNI_LIB}
|
|
270
|
-
android
|
|
289
|
+
${V8EXECUTOR_LIB}
|
|
271
290
|
)
|
|
272
291
|
else()
|
|
292
|
+
set (ignoreMe "${JS_RUNTIME_DIR}")
|
|
293
|
+
string(APPEND CMAKE_CXX_FLAGS " -DJS_RUNTIME_JSC=1")
|
|
294
|
+
find_library(
|
|
295
|
+
JSEXECUTOR_LIB
|
|
296
|
+
jscexecutor
|
|
297
|
+
PATHS ${LIBRN_DIR}
|
|
298
|
+
NO_CMAKE_FIND_ROOT_PATH
|
|
299
|
+
)
|
|
273
300
|
target_link_libraries(
|
|
274
301
|
${PACKAGE_NAME}
|
|
275
|
-
${LOG_LIB}
|
|
276
|
-
${JSI_LIB}
|
|
277
|
-
${FOLLY_LIB}
|
|
278
302
|
${JSEXECUTOR_LIB}
|
|
279
|
-
${GLOG_LIB}
|
|
280
|
-
${FBJNI_LIB}
|
|
281
|
-
${FOLLY_JSON_LIB}
|
|
282
|
-
${REACT_NATIVE_JNI_LIB}
|
|
283
|
-
android
|
|
284
303
|
)
|
|
285
304
|
endif()
|
|
286
305
|
|
|
@@ -294,6 +313,7 @@ if(${IS_NEW_ARCHITECTURE_ENABLED})
|
|
|
294
313
|
${REACT_DEBUG}
|
|
295
314
|
${REACT_RENDER_DEBUG}
|
|
296
315
|
${RRC_ROOT}
|
|
316
|
+
${RRC_VIEW}
|
|
297
317
|
${FABRICJNI}
|
|
298
318
|
${REACT_RENDER_SCHEDULER}
|
|
299
319
|
)
|
package/android/build.gradle
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import com.android.Version
|
|
2
2
|
|
|
3
|
+
import java.nio.file.Files
|
|
3
4
|
import java.nio.file.Paths
|
|
5
|
+
import java.nio.file.Path
|
|
4
6
|
import org.apache.tools.ant.filters.ReplaceTokens
|
|
5
7
|
import groovy.json.JsonSlurper
|
|
8
|
+
import java.util.stream.Stream
|
|
6
9
|
|
|
7
10
|
/**
|
|
8
11
|
* Finds the path of the installed npm package with the given name using Node's
|
|
@@ -44,9 +47,19 @@ def safeExtGet(prop, fallback) {
|
|
|
44
47
|
}
|
|
45
48
|
|
|
46
49
|
def resolveBuildType() {
|
|
47
|
-
def buildType =
|
|
48
|
-
|
|
49
|
-
|
|
50
|
+
def buildType = "debug"
|
|
51
|
+
tasks.all({ task ->
|
|
52
|
+
if (task.name == "buildCMakeRelease") {
|
|
53
|
+
buildType = "release"
|
|
54
|
+
}
|
|
55
|
+
})
|
|
56
|
+
return buildType
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
def resolveClientSideBuild() {
|
|
60
|
+
def clientSideBuild = System.getenv("CLIENT_SIDE_BUILD")
|
|
61
|
+
if (clientSideBuild != null) {
|
|
62
|
+
return clientSideBuild == "True"
|
|
50
63
|
}
|
|
51
64
|
|
|
52
65
|
if (hasProperty("clientSideBuild")) {
|
|
@@ -96,9 +109,26 @@ def getPlaygroundAppName() { // only for the development
|
|
|
96
109
|
return playgroundAppName
|
|
97
110
|
}
|
|
98
111
|
|
|
99
|
-
boolean CLIENT_SIDE_BUILD =
|
|
112
|
+
boolean CLIENT_SIDE_BUILD = resolveClientSideBuild()
|
|
100
113
|
if (CLIENT_SIDE_BUILD) {
|
|
101
114
|
configurations.maybeCreate("default")
|
|
115
|
+
|
|
116
|
+
Stream<Path> pathStream = Files.find(
|
|
117
|
+
Paths.get(rootDir.parent),
|
|
118
|
+
Integer.MAX_VALUE,
|
|
119
|
+
(path, basicFileAttributes) -> { path.toString().endsWith("/react-native-reanimated/package.json") }
|
|
120
|
+
)
|
|
121
|
+
|
|
122
|
+
String parsedLocation = ""
|
|
123
|
+
def libInstancesCount = 0
|
|
124
|
+
pathStream.forEach(path -> {
|
|
125
|
+
parsedLocation += "- " + path.toString().replace("/package.json", "\n")
|
|
126
|
+
libInstancesCount++
|
|
127
|
+
})
|
|
128
|
+
if (libInstancesCount > 1) {
|
|
129
|
+
String exceptionMessage = "\nMultiple versions of Reanimated were detected. Only one instance of react-native-reanimated can be installed in a project. You need to resolve the conflict manually. Check out the documentation: https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/troubleshooting#multiple-versions-of-reanimated-were-detected \n\nConflict between: \n" + parsedLocation + "\n";
|
|
130
|
+
throw new Exception(exceptionMessage)
|
|
131
|
+
}
|
|
102
132
|
}
|
|
103
133
|
def reactNative = resolveReactNativeDirectory()
|
|
104
134
|
def reactNativeManifest = file("$reactNative/package.json")
|
|
@@ -134,13 +164,40 @@ def thirdPartyNdkDir = new File("$buildDir/third-party-ndk")
|
|
|
134
164
|
def reactNativeThirdParty = new File("$reactNative/ReactAndroid/src/main/jni/third-party")
|
|
135
165
|
|
|
136
166
|
def _stackProtectorFlag = true
|
|
137
|
-
def FOR_HERMES = ""
|
|
138
167
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
168
|
+
def CMAKE_NODE_MODULES_DIR = CLIENT_SIDE_BUILD
|
|
169
|
+
? project.getProjectDir().getParentFile().getParent()
|
|
170
|
+
: Paths.get(project.getProjectDir().getParent(), getPlaygroundAppName(), "node_modules").toString()
|
|
171
|
+
|
|
172
|
+
def JS_RUNTIME = {
|
|
173
|
+
// Returns the js runtime explicitly requested in the environment variable
|
|
174
|
+
if (System.getenv("JS_RUNTIME")) {
|
|
175
|
+
return System.getenv("JS_RUNTIME")
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// Detect js runtime from project setup
|
|
179
|
+
def defaultRuntimeType = "jsc";
|
|
180
|
+
def v8Project = rootProject.getSubprojects().find { project -> project.name == "react-native-v8" }
|
|
181
|
+
if (v8Project != null) {
|
|
182
|
+
return "v8"
|
|
183
|
+
}
|
|
184
|
+
def appProject = findProject(":app") ? project(":app") : null
|
|
185
|
+
return appProject?.ext?.react?.enableHermes ? "hermes" : defaultRuntimeType
|
|
186
|
+
}.call()
|
|
187
|
+
|
|
188
|
+
def jsRuntimeDir = {
|
|
189
|
+
if (JS_RUNTIME == "hermes") {
|
|
190
|
+
if (rnMinorVersion >= 69) {
|
|
191
|
+
return Paths.get(CMAKE_NODE_MODULES_DIR, "react-native", "sdks", "hermes")
|
|
192
|
+
} else {
|
|
193
|
+
return Paths.get(CMAKE_NODE_MODULES_DIR, "hermes-engine")
|
|
194
|
+
}
|
|
195
|
+
} else if (JS_RUNTIME == "v8") {
|
|
196
|
+
return findProject(":react-native-v8").getProjectDir().getParent()
|
|
197
|
+
} else {
|
|
198
|
+
return Paths.get(CMAKE_NODE_MODULES_DIR, "react-native", "ReactCommon", "jsi")
|
|
199
|
+
}
|
|
200
|
+
}.call()
|
|
144
201
|
|
|
145
202
|
def reactNativeArchitectures() {
|
|
146
203
|
def value = project.getProperties().get("reactNativeArchitectures")
|
|
@@ -205,10 +262,13 @@ android {
|
|
|
205
262
|
"-DREACT_NATIVE_TARGET_VERSION=${REACT_VERSION}",
|
|
206
263
|
"-DANDROID_TOOLCHAIN=clang",
|
|
207
264
|
"-DBOOST_VERSION=${BOOST_VERSION}",
|
|
208
|
-
"-
|
|
265
|
+
"-DNODE_MODULES_DIR=${CMAKE_NODE_MODULES_DIR}",
|
|
266
|
+
"-DJS_RUNTIME=${JS_RUNTIME}",
|
|
267
|
+
"-DJS_RUNTIME_DIR=${jsRuntimeDir}",
|
|
209
268
|
"-DCLIENT_SIDE_BUILD=${CLIENT_SIDE_BUILD}",
|
|
210
269
|
"-DIS_NEW_ARCHITECTURE_ENABLED=${isNewArchitectureEnabled()}",
|
|
211
|
-
"-DPLAYGROUND_APP_NAME=${getPlaygroundAppName()}"
|
|
270
|
+
"-DPLAYGROUND_APP_NAME=${getPlaygroundAppName()}",
|
|
271
|
+
"-DRNVERSION=${rnMinorVersion}"
|
|
212
272
|
abiFilters (*reactNativeArchitectures())
|
|
213
273
|
_stackProtectorFlag ? (cppFlags("-fstack-protector-all")) : null
|
|
214
274
|
}
|
|
@@ -216,10 +276,12 @@ android {
|
|
|
216
276
|
|
|
217
277
|
buildConfigField("boolean", "IS_INTERNAL_BUILD", "false")
|
|
218
278
|
buildConfigField("int", "EXOPACKAGE_FLAGS", "0")
|
|
279
|
+
buildConfigField("int", "REACT_NATIVE_VERSION", rnMinorVersion.toString())
|
|
219
280
|
}
|
|
220
281
|
externalNativeBuild {
|
|
221
282
|
cmake {
|
|
222
283
|
path "CMakeLists.txt"
|
|
284
|
+
version "3.18.1"
|
|
223
285
|
}
|
|
224
286
|
}
|
|
225
287
|
lintOptions {
|
|
@@ -233,10 +295,12 @@ android {
|
|
|
233
295
|
"**/libfbjni.so",
|
|
234
296
|
"**/libjsi.so",
|
|
235
297
|
"**/libfolly_json.so",
|
|
298
|
+
"**/libfolly_runtime.so",
|
|
236
299
|
"**/libglog.so",
|
|
237
300
|
"**/libhermes.so",
|
|
238
301
|
"**/libreactnativejni.so",
|
|
239
302
|
"**/libjscexecutor.so",
|
|
303
|
+
"**/libv8executor.so",
|
|
240
304
|
]
|
|
241
305
|
}
|
|
242
306
|
tasks.withType(JavaCompile) {
|
|
@@ -252,11 +316,12 @@ android {
|
|
|
252
316
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
253
317
|
}
|
|
254
318
|
packagingOptions {
|
|
255
|
-
// For some reason gradle only complains about the duplicated version of libreact_render libraries
|
|
256
|
-
// while there are more libraries copied in intermediates folder of the lib build directory, we
|
|
257
|
-
// only the ones that make the build fail (ideally we should only include
|
|
319
|
+
// For some reason gradle only complains about the duplicated version of librrc_root and libreact_render libraries
|
|
320
|
+
// while there are more libraries copied in intermediates folder of the lib build directory, we exclude
|
|
321
|
+
// only the ones that make the build fail (ideally we should only include libreanimated but we
|
|
258
322
|
// are only allowed to specify exlude patterns)
|
|
259
323
|
exclude "**/libreact_render*.so"
|
|
324
|
+
exclude "**/librrc_root.so"
|
|
260
325
|
}
|
|
261
326
|
sourceSets.main {
|
|
262
327
|
java {
|
|
@@ -408,23 +473,94 @@ task prepareGlog(dependsOn: dependenciesPath ? [] : [downloadGlog], type: Copy)
|
|
|
408
473
|
}
|
|
409
474
|
}
|
|
410
475
|
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
476
|
+
/*
|
|
477
|
+
Reanimated includes "hermes/hermes.h" header file in `NativeProxy.cpp`.
|
|
478
|
+
Previously, we used header files from `hermes-engine` package in `node_modules`.
|
|
479
|
+
Starting from React Native 0.69, Hermes is no longer distributed as package on NPM.
|
|
480
|
+
On the new architecture, Hermes is downloaded from GitHub and then compiled from sources.
|
|
481
|
+
However, on the old architecture, we need to download Hermes header files on our own
|
|
482
|
+
as well as unzip Hermes AAR in order to obtain `libhermes.so` shared library.
|
|
483
|
+
For more details, see https://reactnative.dev/architecture/bundled-hermes
|
|
484
|
+
or https://github.com/reactwg/react-native-new-architecture/discussions/4
|
|
485
|
+
*/
|
|
486
|
+
if (rnMinorVersion >= 69 && !isNewArchitectureEnabled()) {
|
|
487
|
+
// copied from `react-native/ReactAndroid/hermes-engine/build.gradle`
|
|
488
|
+
|
|
489
|
+
def reactNativeRootDir = resolveReactNativeDirectory()
|
|
490
|
+
def customDownloadDir = System.getenv("REACT_NATIVE_DOWNLOADS_DIR")
|
|
491
|
+
def downloadDir = customDownloadDir ? new File(customDownloadDir) : new File(reactNativeRootDir, "sdks/download")
|
|
492
|
+
|
|
493
|
+
// By default we are going to download and unzip hermes inside the /sdks/hermes folder
|
|
494
|
+
// but you can provide an override for where the hermes source code is located.
|
|
495
|
+
def hermesDir = System.getenv("REACT_NATIVE_OVERRIDE_HERMES_DIR") ?: new File(reactNativeRootDir, "sdks/hermes")
|
|
496
|
+
|
|
497
|
+
def hermesVersion = "main"
|
|
498
|
+
def hermesVersionFile = new File(reactNativeRootDir, "sdks/.hermesversion")
|
|
499
|
+
if (hermesVersionFile.exists()) {
|
|
500
|
+
hermesVersion = hermesVersionFile.text
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
task downloadHermes(type: Download) {
|
|
504
|
+
src("https://github.com/facebook/hermes/tarball/${hermesVersion}")
|
|
505
|
+
onlyIfNewer(true)
|
|
506
|
+
overwrite(false)
|
|
507
|
+
dest(new File(downloadDir, "hermes.tar.gz"))
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
task unzipHermes(dependsOn: downloadHermes, type: Copy) {
|
|
511
|
+
from(tarTree(downloadHermes.dest)) {
|
|
512
|
+
eachFile { file ->
|
|
513
|
+
// We flatten the unzip as the tarball contains a `facebook-hermes-<SHA>`
|
|
514
|
+
// folder at the top level.
|
|
515
|
+
if (file.relativePath.segments.size() > 1) {
|
|
516
|
+
file.relativePath = new org.gradle.api.file.RelativePath(!file.isDirectory(), file.relativePath.segments.drop(1))
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
into(hermesDir)
|
|
415
521
|
}
|
|
522
|
+
}
|
|
416
523
|
|
|
417
|
-
|
|
418
|
-
if (
|
|
419
|
-
|
|
420
|
-
|
|
524
|
+
task prepareHermes() {
|
|
525
|
+
if (rnMinorVersion >= 69) {
|
|
526
|
+
if (!isNewArchitectureEnabled()) {
|
|
527
|
+
dependsOn(unzipHermes)
|
|
528
|
+
}
|
|
421
529
|
|
|
422
|
-
|
|
530
|
+
doLast {
|
|
531
|
+
def hermesAAR = file("$reactNative/android/com/facebook/react/hermes-engine/$reactNativeVersion/hermes-engine-$reactNativeVersion-${resolveBuildType()}.aar") // e.g. hermes-engine-0.70.0-rc.1-debug.aar
|
|
532
|
+
if (!hermesAAR.exists()) {
|
|
533
|
+
throw new GradleScriptException("Could not find hermes-engine AAR", null)
|
|
534
|
+
}
|
|
423
535
|
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
536
|
+
def soFiles = zipTree(hermesAAR).matching({ it.include "**/*.so" })
|
|
537
|
+
|
|
538
|
+
copy {
|
|
539
|
+
from soFiles
|
|
540
|
+
from "$reactNative/ReactAndroid/src/main/jni/first-party/hermes/Android.mk"
|
|
541
|
+
into "$thirdPartyNdkDir/hermes"
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
} else {
|
|
545
|
+
doLast {
|
|
546
|
+
def hermesPackagePath = findNodeModulePath(projectDir, "hermes-engine")
|
|
547
|
+
if (!hermesPackagePath) {
|
|
548
|
+
throw new GradleScriptException("Could not find the hermes-engine npm package", null)
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
def hermesAAR = file("$hermesPackagePath/android/hermes-debug.aar")
|
|
552
|
+
if (!hermesAAR.exists()) {
|
|
553
|
+
throw new GradleScriptException("The hermes-engine npm package is missing \"android/hermes-debug.aar\"", null)
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
def soFiles = zipTree(hermesAAR).matching({ it.include "**/*.so" })
|
|
557
|
+
|
|
558
|
+
copy {
|
|
559
|
+
from soFiles
|
|
560
|
+
from "$reactNative/ReactAndroid/src/main/jni/first-party/hermes/Android.mk"
|
|
561
|
+
into "$thirdPartyNdkDir/hermes"
|
|
562
|
+
}
|
|
563
|
+
}
|
|
428
564
|
}
|
|
429
565
|
}
|
|
430
566
|
|
|
@@ -520,6 +656,7 @@ dependencies {
|
|
|
520
656
|
}
|
|
521
657
|
implementation "com.facebook.react:react-native:+" // From node_modules
|
|
522
658
|
implementation "androidx.transition:transition:1.1.0"
|
|
659
|
+
implementation "androidx.core:core:1.7.0"
|
|
523
660
|
extractHeaders("com.facebook.fbjni:fbjni:" + FBJNI_VERSION + ":headers")
|
|
524
661
|
extractSO("com.facebook.fbjni:fbjni:" + FBJNI_VERSION)
|
|
525
662
|
|
|
@@ -528,12 +665,7 @@ dependencies {
|
|
|
528
665
|
}
|
|
529
666
|
|
|
530
667
|
task unpackReactNativeAAR {
|
|
531
|
-
def buildType =
|
|
532
|
-
tasks.all({ task ->
|
|
533
|
-
if (task.name == "buildCMakeRelease") {
|
|
534
|
-
buildType = "release"
|
|
535
|
-
}
|
|
536
|
-
})
|
|
668
|
+
def buildType = resolveBuildType()
|
|
537
669
|
def rnAarMatcher = "**/react-native/**/*${buildType}.aar"
|
|
538
670
|
if (rnMinorVersion < 69) {
|
|
539
671
|
rnAarMatcher = "**/**/*.aar"
|
|
@@ -579,6 +711,18 @@ afterEvaluate {
|
|
|
579
711
|
task.dependsOn(packageNdkLibs)
|
|
580
712
|
}
|
|
581
713
|
})
|
|
714
|
+
|
|
715
|
+
if (JS_RUNTIME == "hermes") {
|
|
716
|
+
extractAARHeaders.dependsOn(prepareHermes)
|
|
717
|
+
extractSOFiles.dependsOn(prepareHermes)
|
|
718
|
+
} else if (JS_RUNTIME == "v8") {
|
|
719
|
+
def buildTasks = tasks.findAll({ task ->
|
|
720
|
+
!task.name.contains("Clean") && (task.name.contains("externalNative") || task.name.contains("CMake") || task.name.startsWith("generateJsonModel")) })
|
|
721
|
+
buildTasks.forEach { task ->
|
|
722
|
+
def buildType = task.name.endsWith('Debug') ? 'Debug' : 'Release'
|
|
723
|
+
task.dependsOn(":react-native-v8:copy${buildType}JniLibsProjectOnly")
|
|
724
|
+
}
|
|
725
|
+
}
|
|
582
726
|
}
|
|
583
727
|
|
|
584
728
|
if (CLIENT_SIDE_BUILD) {
|
|
@@ -21,6 +21,7 @@ import com.facebook.react.uimanager.common.UIManagerType;
|
|
|
21
21
|
import com.facebook.react.uimanager.events.RCTEventEmitter;
|
|
22
22
|
import com.facebook.soloader.SoLoader;
|
|
23
23
|
import com.swmansion.common.GestureHandlerStateManager;
|
|
24
|
+
import com.swmansion.reanimated.keyboardObserver.ReanimatedKeyboardEventListener;
|
|
24
25
|
import com.swmansion.reanimated.layoutReanimation.AnimationsManager;
|
|
25
26
|
import com.swmansion.reanimated.layoutReanimation.LayoutAnimations;
|
|
26
27
|
import com.swmansion.reanimated.layoutReanimation.NativeMethodsHolder;
|
|
@@ -92,6 +93,18 @@ public class NativeProxy {
|
|
|
92
93
|
public native void sensorSetter(float[] value);
|
|
93
94
|
}
|
|
94
95
|
|
|
96
|
+
@DoNotStrip
|
|
97
|
+
public static class KeyboardEventDataUpdater {
|
|
98
|
+
@DoNotStrip private final HybridData mHybridData;
|
|
99
|
+
|
|
100
|
+
@DoNotStrip
|
|
101
|
+
private KeyboardEventDataUpdater(HybridData hybridData) {
|
|
102
|
+
mHybridData = hybridData;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
public native void keyboardEventDataUpdater(int keyboardState, int height);
|
|
106
|
+
}
|
|
107
|
+
|
|
95
108
|
@DoNotStrip
|
|
96
109
|
@SuppressWarnings("unused")
|
|
97
110
|
private final HybridData mHybridData;
|
|
@@ -101,6 +114,7 @@ public class NativeProxy {
|
|
|
101
114
|
private Scheduler mScheduler = null;
|
|
102
115
|
private ReanimatedSensorContainer reanimatedSensorContainer;
|
|
103
116
|
private final GestureHandlerStateManager gestureHandlerStateManager;
|
|
117
|
+
private ReanimatedKeyboardEventListener reanimatedKeyboardEventListener;
|
|
104
118
|
private Long firstUptime = SystemClock.uptimeMillis();
|
|
105
119
|
private boolean slowAnimationsEnabled = false;
|
|
106
120
|
|
|
@@ -122,6 +136,7 @@ public class NativeProxy {
|
|
|
122
136
|
mContext = new WeakReference<>(context);
|
|
123
137
|
prepare(LayoutAnimations);
|
|
124
138
|
reanimatedSensorContainer = new ReanimatedSensorContainer(mContext);
|
|
139
|
+
reanimatedKeyboardEventListener = new ReanimatedKeyboardEventListener(mContext);
|
|
125
140
|
addDevMenuOption();
|
|
126
141
|
|
|
127
142
|
GestureHandlerStateManager tempHandlerStateManager;
|
|
@@ -257,6 +272,16 @@ public class NativeProxy {
|
|
|
257
272
|
reanimatedSensorContainer.unregisterSensor(sensorId);
|
|
258
273
|
}
|
|
259
274
|
|
|
275
|
+
@DoNotStrip
|
|
276
|
+
private int subscribeForKeyboardEvents(KeyboardEventDataUpdater keyboardEventDataUpdater) {
|
|
277
|
+
return reanimatedKeyboardEventListener.subscribeForKeyboardEvents(keyboardEventDataUpdater);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
@DoNotStrip
|
|
281
|
+
private void unsubscribeFromKeyboardEvents(int listenerId) {
|
|
282
|
+
reanimatedKeyboardEventListener.unsubscribeFromKeyboardEvents(listenerId);
|
|
283
|
+
}
|
|
284
|
+
|
|
260
285
|
public void onCatalystInstanceDestroy() {
|
|
261
286
|
mScheduler.deactivate();
|
|
262
287
|
mHybridData.resetNative();
|
|
@@ -7,8 +7,10 @@
|
|
|
7
7
|
#include <memory>
|
|
8
8
|
#include <string>
|
|
9
9
|
|
|
10
|
-
#if
|
|
10
|
+
#if JS_RUNTIME_HERMES
|
|
11
11
|
#include <hermes/hermes.h>
|
|
12
|
+
#elif JS_RUNTIME_V8
|
|
13
|
+
#include <v8runtime/V8RuntimeFactory.h>
|
|
12
14
|
#else
|
|
13
15
|
#include <jsi/JSCRuntime.h>
|
|
14
16
|
#endif
|
|
@@ -65,10 +67,6 @@ NativeProxy::NativeProxy(
|
|
|
65
67
|
}
|
|
66
68
|
|
|
67
69
|
NativeProxy::~NativeProxy() {
|
|
68
|
-
runtime_->global().setProperty(
|
|
69
|
-
*runtime_,
|
|
70
|
-
jsi::PropNameID::forAscii(*runtime_, "__reanimatedModuleProxy"),
|
|
71
|
-
jsi::Value::undefined());
|
|
72
70
|
// removed temporary, new event listener mechanism need fix on the RN side
|
|
73
71
|
// reactScheduler_->removeEventListener(eventListener_);
|
|
74
72
|
}
|
|
@@ -178,6 +176,12 @@ void NativeProxy::installJSIBindings(
|
|
|
178
176
|
std::string str = result->toStdString();
|
|
179
177
|
return jsi::Value(rt, jsi::String::createFromAscii(rt, str.c_str()));
|
|
180
178
|
};
|
|
179
|
+
|
|
180
|
+
auto configurePropsFunction = [=](jsi::Runtime &rt,
|
|
181
|
+
const jsi::Value &uiProps,
|
|
182
|
+
const jsi::Value &nativeProps) {
|
|
183
|
+
this->configureProps(rt, uiProps, nativeProps);
|
|
184
|
+
};
|
|
181
185
|
#endif
|
|
182
186
|
|
|
183
187
|
auto registerSensorFunction =
|
|
@@ -192,11 +196,27 @@ void NativeProxy::installJSIBindings(
|
|
|
192
196
|
auto setGestureStateFunction = [this](int handlerTag, int newState) -> void {
|
|
193
197
|
setGestureState(handlerTag, newState);
|
|
194
198
|
};
|
|
195
|
-
|
|
199
|
+
|
|
200
|
+
auto subscribeForKeyboardEventsFunction =
|
|
201
|
+
[this](std::function<void(int, int)> keyboardEventDataUpdater) -> int {
|
|
202
|
+
return subscribeForKeyboardEvents(std::move(keyboardEventDataUpdater));
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
auto unsubscribeFromKeyboardEventsFunction = [this](int listenerId) -> void {
|
|
206
|
+
unsubscribeFromKeyboardEvents(listenerId);
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
#if JS_RUNTIME_HERMES
|
|
196
210
|
auto config =
|
|
197
211
|
::hermes::vm::RuntimeConfig::Builder().withEnableSampleProfiling(false);
|
|
198
212
|
std::shared_ptr<jsi::Runtime> animatedRuntime =
|
|
199
213
|
facebook::hermes::makeHermesRuntime(config.build());
|
|
214
|
+
#elif JS_RUNTIME_V8
|
|
215
|
+
auto config = std::make_unique<rnv8::V8RuntimeConfig>();
|
|
216
|
+
config->enableInspector = false;
|
|
217
|
+
config->appName = "reanimated";
|
|
218
|
+
std::shared_ptr<jsi::Runtime> animatedRuntime =
|
|
219
|
+
rnv8::createSharedV8Runtime(runtime_, std::move(config));
|
|
200
220
|
#else
|
|
201
221
|
std::shared_ptr<jsi::Runtime> animatedRuntime =
|
|
202
222
|
facebook::jsc::makeJSCRuntime();
|
|
@@ -234,12 +254,6 @@ void NativeProxy::installJSIBindings(
|
|
|
234
254
|
this->layoutAnimations->cthis()->notifyAboutEnd(tag, (isCancelled) ? 1 : 0);
|
|
235
255
|
};
|
|
236
256
|
|
|
237
|
-
auto configurePropsFunction = [=](jsi::Runtime &rt,
|
|
238
|
-
const jsi::Value &uiProps,
|
|
239
|
-
const jsi::Value &nativeProps) {
|
|
240
|
-
this->configureProps(rt, uiProps, nativeProps);
|
|
241
|
-
};
|
|
242
|
-
|
|
243
257
|
std::shared_ptr<LayoutAnimationsProxy> layoutAnimationsProxy =
|
|
244
258
|
std::make_shared<LayoutAnimationsProxy>(
|
|
245
259
|
notifyAboutProgress, notifyAboutEnd);
|
|
@@ -261,7 +275,10 @@ void NativeProxy::installJSIBindings(
|
|
|
261
275
|
getCurrentTime,
|
|
262
276
|
registerSensorFunction,
|
|
263
277
|
unregisterSensorFunction,
|
|
264
|
-
setGestureStateFunction
|
|
278
|
+
setGestureStateFunction,
|
|
279
|
+
subscribeForKeyboardEventsFunction,
|
|
280
|
+
unsubscribeFromKeyboardEventsFunction,
|
|
281
|
+
};
|
|
265
282
|
|
|
266
283
|
auto module = std::make_shared<NativeReanimatedModule>(
|
|
267
284
|
jsCallInvoker_,
|
|
@@ -479,4 +496,22 @@ void NativeProxy::configureProps(
|
|
|
479
496
|
.get());
|
|
480
497
|
}
|
|
481
498
|
|
|
499
|
+
int NativeProxy::subscribeForKeyboardEvents(
|
|
500
|
+
std::function<void(int, int)> keyboardEventDataUpdater) {
|
|
501
|
+
auto method = javaPart_->getClass()
|
|
502
|
+
->getMethod<int(KeyboardEventDataUpdater::javaobject)>(
|
|
503
|
+
"subscribeForKeyboardEvents");
|
|
504
|
+
return method(
|
|
505
|
+
javaPart_.get(),
|
|
506
|
+
KeyboardEventDataUpdater::newObjectCxxArgs(
|
|
507
|
+
std::move(keyboardEventDataUpdater))
|
|
508
|
+
.get());
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
void NativeProxy::unsubscribeFromKeyboardEvents(int listenerId) {
|
|
512
|
+
auto method = javaPart_->getClass()->getMethod<void(int)>(
|
|
513
|
+
"unsubscribeFromKeyboardEvents");
|
|
514
|
+
method(javaPart_.get(), listenerId);
|
|
515
|
+
}
|
|
516
|
+
|
|
482
517
|
} // namespace reanimated
|