react-native-reanimated 2.6.0 → 3.0.0-rc.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.cpp +128 -0
- package/Common/cpp/Fabric/ReanimatedUIManagerBinding.cpp +197 -0
- package/Common/cpp/NativeModules/NativeReanimatedModule.cpp +311 -6
- package/Common/cpp/Registries/EventHandlerRegistry.cpp +14 -1
- package/Common/cpp/Registries/NewestShadowNodesRegistry.cpp +68 -0
- package/Common/cpp/SharedItems/ShareableValue.cpp +20 -2
- package/Common/cpp/Tools/Mapper.cpp +23 -4
- package/Common/cpp/Tools/RuntimeDecorator.cpp +92 -46
- package/Common/cpp/Tools/Scheduler.cpp +4 -0
- package/Common/cpp/headers/Fabric/FabricUtils.h +78 -0
- package/Common/cpp/headers/Fabric/ReanimatedUIManagerBinding.h +46 -0
- package/Common/cpp/headers/NativeModules/NativeReanimatedModule.h +72 -2
- package/Common/cpp/headers/Registries/EventHandlerRegistry.h +8 -0
- package/Common/cpp/headers/Registries/NewestShadowNodesRegistry.h +41 -0
- package/Common/cpp/headers/SharedItems/SharedParent.h +3 -0
- package/Common/cpp/headers/SharedItems/ValueWrapper.h +25 -0
- package/Common/cpp/headers/SpecTools/ErrorHandler.h +5 -0
- package/Common/cpp/headers/Tools/Mapper.h +1 -1
- package/Common/cpp/headers/Tools/PlatformDepMethodsHolder.h +43 -8
- package/Common/cpp/headers/Tools/RuntimeDecorator.h +8 -3
- package/README.md +4 -0
- package/RNReanimated.podspec +22 -11
- package/android/CMakeLists.txt +139 -27
- package/android/build.gradle +86 -209
- package/android/local.properties +1 -0
- package/android/src/fabric/java/com/swmansion/reanimated/NativeProxy.java +310 -0
- package/android/src/fabric/java/com/swmansion/reanimated/ReaCompatibility.java +25 -0
- package/android/src/main/cpp/NativeProxy.cpp +196 -41
- package/android/src/main/cpp/headers/NativeProxy.h +45 -7
- package/android/src/main/java/com/swmansion/reanimated/NodesManager.java +13 -245
- package/android/src/main/java/com/swmansion/reanimated/ReanimatedModule.java +0 -125
- package/android/src/main/java/com/swmansion/reanimated/layoutReanimation/AnimationsManager.java +13 -6
- package/android/src/main/java/com/swmansion/reanimated/layoutReanimation/LayoutAnimations.java +2 -1
- package/android/src/{main → paper}/java/com/swmansion/reanimated/NativeProxy.java +26 -10
- package/android/src/paper/java/com/swmansion/reanimated/ReaCompatibility.java +17 -0
- package/ios/Fabric/REAInitializerRCTFabricSurface.h +12 -0
- package/ios/Fabric/REAInitializerRCTFabricSurface.mm +73 -0
- package/ios/LayoutReanimation/REAAnimationsManager.h +1 -1
- package/ios/LayoutReanimation/REAAnimationsManager.m +2 -2
- package/ios/LayoutReanimation/REASnapshot.m +1 -1
- package/ios/LayoutReanimation/REAUIManager.h +1 -1
- package/ios/LayoutReanimation/REAUIManager.mm +4 -5
- package/ios/REAEventDispatcher.m +1 -2
- package/ios/REAModule.h +10 -1
- package/ios/REAModule.mm +284 -0
- package/ios/REANodesManager.h +27 -52
- package/ios/{REANodesManager.m → REANodesManager.mm} +92 -226
- package/ios/native/NativeMethods.h +1 -3
- package/ios/native/NativeMethods.mm +1 -1
- package/ios/native/NativeProxy.h +2 -2
- package/ios/native/NativeProxy.mm +162 -32
- package/ios/native/REAIOSErrorHandler.h +2 -4
- package/ios/native/REAIOSErrorHandler.mm +1 -1
- package/ios/native/REAIOSLogger.h +1 -3
- package/ios/native/REAIOSLogger.mm +1 -1
- package/ios/native/REAIOSScheduler.h +1 -3
- package/ios/native/REAIOSScheduler.mm +2 -2
- package/ios/native/REAInitializer.h +0 -7
- package/ios/native/REAInitializer.mm +14 -6
- package/ios/native/UIResponder+Reanimated.h +3 -1
- package/ios/native/UIResponder+Reanimated.mm +6 -4
- package/ios/sensor/ReanimatedSensor.h +1 -1
- package/ios/sensor/ReanimatedSensor.m +1 -1
- package/ios/sensor/ReanimatedSensorContainer.h +1 -1
- package/ios/sensor/ReanimatedSensorContainer.m +2 -2
- package/lib/Animated.js +0 -13
- package/lib/ConfigHelper.js +0 -1
- package/lib/createAnimatedComponent.js +30 -169
- package/lib/index.js +0 -13
- package/lib/reanimated2/Easing.js +8 -44
- package/lib/reanimated2/NativeMethods.js +20 -3
- package/lib/reanimated2/UpdateProps.js +25 -10
- package/lib/reanimated2/core.js +4 -37
- package/lib/reanimated2/fabricUtils.js +18 -0
- package/lib/reanimated2/globals.d.ts +18 -3
- package/lib/reanimated2/hook/useAnimatedRef.js +6 -2
- package/lib/reanimated2/hook/utils.js +0 -5
- package/lib/reanimated2/interpolateColor.js +5 -2
- package/lib/reanimated2/interpolation.js +0 -15
- package/lib/reanimated2/js-reanimated/index.js +3 -0
- package/lib/types/{lib/ConfigHelper.d.ts → ConfigHelper.d.ts} +0 -0
- package/lib/types/{lib/ReanimatedEventEmitter.d.ts → ReanimatedEventEmitter.d.ts} +0 -0
- package/lib/types/{lib/ReanimatedModule.d.ts → ReanimatedModule.d.ts} +0 -0
- package/lib/types/{lib/ReanimatedModule.macos.d.ts → ReanimatedModule.macos.d.ts} +0 -0
- package/lib/types/{lib/ReanimatedModule.native.d.ts → ReanimatedModule.native.d.ts} +0 -0
- package/lib/types/{lib/ReanimatedModule.windows.d.ts → ReanimatedModule.windows.d.ts} +0 -0
- package/lib/types/{lib/ReanimatedModuleCompat.d.ts → ReanimatedModuleCompat.d.ts} +0 -0
- package/lib/types/{lib/createAnimatedComponent.d.ts → createAnimatedComponent.d.ts} +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/Bezier.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/Colors.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/Easing.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/NativeMethods.d.ts +2 -1
- package/lib/types/{lib/reanimated2 → reanimated2}/NativeReanimated/NativeReanimated.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/NativeReanimated/index.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/PlatformChecker.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/PropAdapters.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/UpdateProps.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/ViewDescriptorsSet.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/WorkletEventHandler.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/__mocks__/MutableValue.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/__mocks__/NativeReanimated.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/__mocks__/NativeReanimated.native.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/animation/commonTypes.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/animation/decay.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/animation/delay.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/animation/index.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/animation/repeat.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/animation/sequence.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/animation/spring.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/animation/styleAnimation.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/animation/timing.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/animation/util.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/commonTypes.d.ts +2 -2
- package/lib/types/{lib/reanimated2 → reanimated2}/component/FlatList.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/component/WrappedComponents.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/component/index.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/core.d.ts +0 -0
- package/lib/types/reanimated2/fabricUtils.d.ts +4 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/hook/Hooks.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/hook/commonTypes.d.ts +2 -1
- package/lib/types/{lib/reanimated2 → reanimated2}/hook/index.d.ts +1 -1
- package/lib/types/{lib/reanimated2 → reanimated2}/hook/useAnimatedGestureHandler.d.ts +2 -2
- package/lib/types/{lib/reanimated2 → reanimated2}/hook/useAnimatedReaction.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/hook/useAnimatedRef.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/hook/useAnimatedScrollHandler.d.ts +2 -2
- package/lib/types/{lib/reanimated2 → reanimated2}/hook/useAnimatedSensor.d.ts +1 -3
- package/lib/types/{lib/reanimated2 → reanimated2}/hook/useAnimatedStyle.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/hook/useDerivedValue.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/hook/useSharedValue.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/hook/utils.d.ts +2 -2
- package/lib/types/{lib/reanimated2 → reanimated2}/index.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/interpolateColor.d.ts +5 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/interpolation.d.ts +1 -4
- package/lib/types/{lib/reanimated2 → reanimated2}/jestUtils.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/js-reanimated/JSReanimated.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/js-reanimated/Mapper.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/js-reanimated/MapperRegistry.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/js-reanimated/MutableValue.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/js-reanimated/commonTypes.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/js-reanimated/index.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/LayoutAnimationRepository.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/animationBuilder/BaseAnimationBuilder.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/animationBuilder/ComplexAnimationBuilder.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/animationBuilder/Keyframe.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/animationBuilder/commonTypes.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/animationBuilder/index.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Bounce.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Default.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Fade.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Flip.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Lightspeed.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Pinwheel.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Roll.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Rotate.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Slide.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Stretch.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/Zoom.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultAnimations/index.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultTransitions/CurvedTransition.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultTransitions/EntryExitTransition.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultTransitions/FadingTransition.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultTransitions/JumpingTransition.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultTransitions/LinearTransition.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultTransitions/SequencedTransition.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/defaultTransitions/index.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/layoutReanimation/index.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/mock.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/platform-specific/RNRenderer.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/platform-specific/RNRenderer.web.d.ts +0 -0
- package/lib/types/{lib/reanimated2 → reanimated2}/utils.d.ts +0 -0
- package/lib/types/{lib/setAndForwardRef.d.ts → setAndForwardRef.d.ts} +0 -0
- package/package.json +10 -10
- package/plugin.js +29 -33
- package/react-native-reanimated.d.ts +15 -3
- package/src/Animated.js +0 -13
- package/src/ConfigHelper.ts +0 -1
- package/src/createAnimatedComponent.tsx +37 -197
- package/src/reanimated2/Easing.ts +8 -55
- package/src/reanimated2/NativeMethods.ts +39 -7
- package/src/reanimated2/UpdateProps.ts +38 -19
- package/src/reanimated2/commonTypes.ts +4 -2
- package/src/reanimated2/component/FlatList.tsx +8 -5
- package/src/reanimated2/core.ts +7 -48
- package/src/reanimated2/fabricUtils.ts +27 -0
- package/src/reanimated2/globals.d.ts +18 -3
- package/src/reanimated2/hook/commonTypes.ts +4 -2
- package/src/reanimated2/hook/index.ts +1 -1
- package/src/reanimated2/hook/useAnimatedGestureHandler.ts +2 -2
- package/src/reanimated2/hook/useAnimatedRef.ts +8 -3
- package/src/reanimated2/hook/useAnimatedScrollHandler.ts +2 -2
- package/src/reanimated2/hook/useAnimatedSensor.ts +1 -3
- package/src/reanimated2/hook/utils.ts +2 -11
- package/src/reanimated2/interpolateColor.ts +6 -2
- package/src/reanimated2/interpolation.ts +1 -26
- package/src/reanimated2/js-reanimated/index.ts +5 -0
- package/android/.gradle/7.2/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/android/.gradle/7.2/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/7.2/executionHistory/executionHistory.bin +0 -0
- package/android/.gradle/7.2/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/7.2/fileChanges/last-build.bin +0 -0
- package/android/.gradle/7.2/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/7.2/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/7.2/fileHashes/resourceHashesCache.bin +0 -0
- package/android/.gradle/7.2/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
- package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
- package/android/.gradle/checksums/checksums.lock +0 -0
- package/android/.gradle/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/react-native-reanimated-64-hermes.aar +0 -0
- package/android/react-native-reanimated-64-jsc.aar +0 -0
- package/android/react-native-reanimated-65-hermes.aar +0 -0
- package/android/react-native-reanimated-65-jsc.aar +0 -0
- package/android/react-native-reanimated-66-hermes.aar +0 -0
- package/android/react-native-reanimated-66-jsc.aar +0 -0
- package/android/react-native-reanimated-67-hermes.aar +0 -0
- package/android/react-native-reanimated-67-jsc.aar +0 -0
- package/android/react-native-reanimated-68-hermes.aar +0 -0
- package/android/react-native-reanimated-68-jsc.aar +0 -0
- package/android/src/main/java/com/swmansion/reanimated/UpdateContext.java +0 -11
- package/android/src/main/java/com/swmansion/reanimated/nodes/AlwaysNode.java +0 -29
- package/android/src/main/java/com/swmansion/reanimated/nodes/BezierNode.java +0 -87
- package/android/src/main/java/com/swmansion/reanimated/nodes/BlockNode.java +0 -24
- package/android/src/main/java/com/swmansion/reanimated/nodes/CallFuncNode.java +0 -49
- package/android/src/main/java/com/swmansion/reanimated/nodes/ClockNode.java +0 -38
- package/android/src/main/java/com/swmansion/reanimated/nodes/ClockOpNode.java +0 -73
- package/android/src/main/java/com/swmansion/reanimated/nodes/ConcatNode.java +0 -36
- package/android/src/main/java/com/swmansion/reanimated/nodes/CondNode.java +0 -41
- package/android/src/main/java/com/swmansion/reanimated/nodes/DebugNode.java +0 -33
- package/android/src/main/java/com/swmansion/reanimated/nodes/EventNode.java +0 -83
- package/android/src/main/java/com/swmansion/reanimated/nodes/FinalNode.java +0 -5
- package/android/src/main/java/com/swmansion/reanimated/nodes/FunctionNode.java +0 -20
- package/android/src/main/java/com/swmansion/reanimated/nodes/JSCallNode.java +0 -41
- package/android/src/main/java/com/swmansion/reanimated/nodes/Node.java +0 -139
- package/android/src/main/java/com/swmansion/reanimated/nodes/NoopNode.java +0 -37
- package/android/src/main/java/com/swmansion/reanimated/nodes/OperatorNode.java +0 -377
- package/android/src/main/java/com/swmansion/reanimated/nodes/ParamNode.java +0 -71
- package/android/src/main/java/com/swmansion/reanimated/nodes/PropsNode.java +0 -153
- package/android/src/main/java/com/swmansion/reanimated/nodes/SetNode.java +0 -32
- package/android/src/main/java/com/swmansion/reanimated/nodes/StyleNode.java +0 -40
- package/android/src/main/java/com/swmansion/reanimated/nodes/TransformNode.java +0 -84
- package/android/src/main/java/com/swmansion/reanimated/nodes/ValueNode.java +0 -40
- package/android/src/main/java/com/swmansion/reanimated/transitions/ChangeTransition.java +0 -84
- package/android/src/main/java/com/swmansion/reanimated/transitions/SaneSidePropagation.java +0 -25
- package/android/src/main/java/com/swmansion/reanimated/transitions/Scale.java +0 -86
- package/android/src/main/java/com/swmansion/reanimated/transitions/TransitionModule.java +0 -41
- package/android/src/main/java/com/swmansion/reanimated/transitions/TransitionUtils.java +0 -161
- package/ios/Nodes/REAAlwaysNode.h +0 -4
- package/ios/Nodes/REAAlwaysNode.m +0 -35
- package/ios/Nodes/REABezierNode.h +0 -5
- package/ios/Nodes/REABezierNode.m +0 -104
- package/ios/Nodes/REABlockNode.h +0 -5
- package/ios/Nodes/REABlockNode.m +0 -25
- package/ios/Nodes/REACallFuncNode.h +0 -6
- package/ios/Nodes/REACallFuncNode.m +0 -69
- package/ios/Nodes/REAClockNodes.h +0 -19
- package/ios/Nodes/REAClockNodes.m +0 -118
- package/ios/Nodes/REAConcatNode.h +0 -5
- package/ios/Nodes/REAConcatNode.m +0 -32
- package/ios/Nodes/REACondNode.h +0 -5
- package/ios/Nodes/REACondNode.m +0 -36
- package/ios/Nodes/READebugNode.h +0 -5
- package/ios/Nodes/READebugNode.m +0 -30
- package/ios/Nodes/REAEventNode.h +0 -9
- package/ios/Nodes/REAEventNode.m +0 -35
- package/ios/Nodes/REAFunctionNode.h +0 -6
- package/ios/Nodes/REAFunctionNode.m +0 -24
- package/ios/Nodes/REAJSCallNode.h +0 -5
- package/ios/Nodes/REAJSCallNode.m +0 -30
- package/ios/Nodes/REANode.h +0 -40
- package/ios/Nodes/REANode.m +0 -155
- package/ios/Nodes/REAOperatorNode.h +0 -5
- package/ios/Nodes/REAOperatorNode.m +0 -115
- package/ios/Nodes/REAParamNode.h +0 -10
- package/ios/Nodes/REAParamNode.m +0 -79
- package/ios/Nodes/REAPropsNode.h +0 -9
- package/ios/Nodes/REAPropsNode.m +0 -98
- package/ios/Nodes/REASetNode.h +0 -5
- package/ios/Nodes/REASetNode.m +0 -34
- package/ios/Nodes/REAStyleNode.h +0 -5
- package/ios/Nodes/REAStyleNode.m +0 -28
- package/ios/Nodes/REATransformNode.h +0 -5
- package/ios/Nodes/REATransformNode.m +0 -36
- package/ios/Nodes/REAValueNode.h +0 -11
- package/ios/Nodes/REAValueNode.m +0 -26
- package/ios/REAModule.m +0 -185
- package/ios/Transitioning/RCTConvert+REATransition.h +0 -12
- package/ios/Transitioning/RCTConvert+REATransition.m +0 -53
- package/ios/Transitioning/REAAllTransitions.h +0 -26
- package/ios/Transitioning/REAAllTransitions.m +0 -297
- package/ios/Transitioning/REATransition.h +0 -65
- package/ios/Transitioning/REATransition.m +0 -211
- package/ios/Transitioning/REATransitionAnimation.h +0 -17
- package/ios/Transitioning/REATransitionAnimation.m +0 -80
- package/ios/Transitioning/REATransitionManager.h +0 -9
- package/ios/Transitioning/REATransitionManager.m +0 -62
- package/ios/Transitioning/REATransitionValues.h +0 -15
- package/ios/Transitioning/REATransitionValues.m +0 -26
- package/lib/reanimated1/Easing.js +0 -231
- package/lib/reanimated1/SpringConfig.js +0 -79
- package/lib/reanimated1/Transitioning.js +0 -158
- package/lib/reanimated1/animations/Animation.js +0 -32
- package/lib/reanimated1/animations/SpringUtils.js +0 -199
- package/lib/reanimated1/animations/backwardCompatibleAnimWrapper.js +0 -117
- package/lib/reanimated1/animations/decay.js +0 -54
- package/lib/reanimated1/animations/spring.js +0 -198
- package/lib/reanimated1/animations/timing.js +0 -74
- package/lib/reanimated1/base.js +0 -13
- package/lib/reanimated1/core/AnimatedAlways.js +0 -33
- package/lib/reanimated1/core/AnimatedBezier.js +0 -150
- package/lib/reanimated1/core/AnimatedBlock.js +0 -52
- package/lib/reanimated1/core/AnimatedCall.js +0 -55
- package/lib/reanimated1/core/AnimatedCallFunc.js +0 -72
- package/lib/reanimated1/core/AnimatedClock.js +0 -90
- package/lib/reanimated1/core/AnimatedClockTest.js +0 -22
- package/lib/reanimated1/core/AnimatedCode.js +0 -32
- package/lib/reanimated1/core/AnimatedConcat.js +0 -32
- package/lib/reanimated1/core/AnimatedCond.js +0 -57
- package/lib/reanimated1/core/AnimatedDebug.js +0 -62
- package/lib/reanimated1/core/AnimatedEvent.js +0 -126
- package/lib/reanimated1/core/AnimatedFunction.js +0 -55
- package/lib/reanimated1/core/AnimatedNode.js +0 -223
- package/lib/reanimated1/core/AnimatedOperator.js +0 -103
- package/lib/reanimated1/core/AnimatedParam.js +0 -88
- package/lib/reanimated1/core/AnimatedProps.js +0 -108
- package/lib/reanimated1/core/AnimatedSet.js +0 -38
- package/lib/reanimated1/core/AnimatedStartClock.js +0 -30
- package/lib/reanimated1/core/AnimatedStopClock.js +0 -30
- package/lib/reanimated1/core/AnimatedStyle.js +0 -78
- package/lib/reanimated1/core/AnimatedTransform.js +0 -78
- package/lib/reanimated1/core/AnimatedValue.js +0 -38
- package/lib/reanimated1/core/Core.test.js +0 -30
- package/lib/reanimated1/core/InternalAnimatedValue.js +0 -87
- package/lib/reanimated1/core/__mocks__/AnimatedProps.js +0 -86
- package/lib/reanimated1/core/createEventObjectProxyPolyfill.js +0 -44
- package/lib/reanimated1/derived/__mocks__/evaluateOnce.js +0 -14
- package/lib/reanimated1/derived/acc.js +0 -11
- package/lib/reanimated1/derived/color.js +0 -47
- package/lib/reanimated1/derived/diff.js +0 -16
- package/lib/reanimated1/derived/diffClamp.js +0 -11
- package/lib/reanimated1/derived/evaluateOnce.js +0 -35
- package/lib/reanimated1/derived/index.js +0 -8
- package/lib/reanimated1/derived/interpolate.js +0 -152
- package/lib/reanimated1/derived/interpolateColors.js +0 -62
- package/lib/reanimated1/derived/onChange.js +0 -14
- package/lib/reanimated1/derived/useCode.js +0 -41
- package/lib/reanimated1/index.js +0 -53
- package/lib/reanimated1/operators.js +0 -35
- package/lib/reanimated1/useValue.js +0 -10
- package/lib/reanimated1/val.js +0 -3
- package/lib/types/react-native-reanimated-tests.d.ts +0 -1
- package/src/reanimated1/Easing.js +0 -231
- package/src/reanimated1/SpringConfig.js +0 -79
- package/src/reanimated1/Transitioning.js +0 -158
- package/src/reanimated1/animations/Animation.js +0 -32
- package/src/reanimated1/animations/SpringUtils.js +0 -199
- package/src/reanimated1/animations/backwardCompatibleAnimWrapper.js +0 -117
- package/src/reanimated1/animations/decay.js +0 -54
- package/src/reanimated1/animations/spring.js +0 -198
- package/src/reanimated1/animations/timing.js +0 -74
- package/src/reanimated1/base.js +0 -13
- package/src/reanimated1/core/AnimatedAlways.js +0 -33
- package/src/reanimated1/core/AnimatedBezier.js +0 -150
- package/src/reanimated1/core/AnimatedBlock.js +0 -52
- package/src/reanimated1/core/AnimatedCall.js +0 -55
- package/src/reanimated1/core/AnimatedCallFunc.js +0 -72
- package/src/reanimated1/core/AnimatedClock.js +0 -90
- package/src/reanimated1/core/AnimatedClockTest.js +0 -22
- package/src/reanimated1/core/AnimatedCode.js +0 -32
- package/src/reanimated1/core/AnimatedConcat.js +0 -32
- package/src/reanimated1/core/AnimatedCond.js +0 -57
- package/src/reanimated1/core/AnimatedDebug.js +0 -62
- package/src/reanimated1/core/AnimatedEvent.js +0 -126
- package/src/reanimated1/core/AnimatedFunction.js +0 -55
- package/src/reanimated1/core/AnimatedNode.js +0 -223
- package/src/reanimated1/core/AnimatedOperator.js +0 -103
- package/src/reanimated1/core/AnimatedParam.js +0 -88
- package/src/reanimated1/core/AnimatedProps.js +0 -108
- package/src/reanimated1/core/AnimatedSet.js +0 -38
- package/src/reanimated1/core/AnimatedStartClock.js +0 -30
- package/src/reanimated1/core/AnimatedStopClock.js +0 -30
- package/src/reanimated1/core/AnimatedStyle.js +0 -78
- package/src/reanimated1/core/AnimatedTransform.js +0 -78
- package/src/reanimated1/core/AnimatedValue.js +0 -38
- package/src/reanimated1/core/Core.test.js +0 -30
- package/src/reanimated1/core/InternalAnimatedValue.js +0 -87
- package/src/reanimated1/core/__mocks__/AnimatedProps.js +0 -86
- package/src/reanimated1/core/createEventObjectProxyPolyfill.js +0 -44
- package/src/reanimated1/derived/__mocks__/evaluateOnce.js +0 -14
- package/src/reanimated1/derived/acc.js +0 -11
- package/src/reanimated1/derived/color.js +0 -47
- package/src/reanimated1/derived/diff.js +0 -16
- package/src/reanimated1/derived/diffClamp.js +0 -11
- package/src/reanimated1/derived/evaluateOnce.js +0 -35
- package/src/reanimated1/derived/index.js +0 -8
- package/src/reanimated1/derived/interpolate.js +0 -152
- package/src/reanimated1/derived/interpolateColors.js +0 -62
- package/src/reanimated1/derived/onChange.js +0 -14
- package/src/reanimated1/derived/useCode.js +0 -41
- package/src/reanimated1/index.js +0 -53
- package/src/reanimated1/operators.js +0 -35
- package/src/reanimated1/useValue.js +0 -10
- package/src/reanimated1/val.js +0 -3
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
3
|
+
|
|
4
|
+
#include <react/renderer/core/ShadowNode.h>
|
|
5
|
+
#include <memory>
|
|
6
|
+
#include <unordered_map>
|
|
7
|
+
#include <utility>
|
|
8
|
+
|
|
9
|
+
using namespace facebook::react;
|
|
10
|
+
|
|
11
|
+
namespace reanimated {
|
|
12
|
+
|
|
13
|
+
class NewestShadowNodesRegistry {
|
|
14
|
+
public:
|
|
15
|
+
std::lock_guard<std::mutex> createLock() const;
|
|
16
|
+
// returns a lock you need to hold when calling any of the methods below
|
|
17
|
+
|
|
18
|
+
void set(ShadowNode::Shared shadowNode, Tag parentTag);
|
|
19
|
+
// updates ShadowNode and sets parent tag, to be called from Reanimated
|
|
20
|
+
|
|
21
|
+
bool has(const ShadowNode::Shared &shadowNode) const;
|
|
22
|
+
// checks if ShadowNode exists in the registry
|
|
23
|
+
|
|
24
|
+
ShadowNode::Shared get(Tag tag) const;
|
|
25
|
+
// returns the most recent version of ShadowNode or nullptr if not found
|
|
26
|
+
|
|
27
|
+
void update(ShadowNode::Shared shadowNode);
|
|
28
|
+
// updates ShadowNode that already exists in registry, to be called from RN
|
|
29
|
+
|
|
30
|
+
void remove(Tag tag);
|
|
31
|
+
// removes ShadowNode from map along with its ancestors
|
|
32
|
+
|
|
33
|
+
private:
|
|
34
|
+
std::unordered_map<Tag, std::pair<ShadowNode::Shared, Tag>> map_;
|
|
35
|
+
// tag -> (most recent clone of shadow node, parent tag)
|
|
36
|
+
mutable std::mutex mutex_; // Protects `map_`.
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
} // namespace reanimated
|
|
40
|
+
|
|
41
|
+
#endif // RCT_NEW_ARCH_ENABLED
|
|
@@ -17,6 +17,9 @@ enum class ValueType {
|
|
|
17
17
|
WorkletFunctionType, // function that gets run on the UI thread
|
|
18
18
|
FrozenObjectType, // frozen object, can only be set and never modified
|
|
19
19
|
FrozenArrayType, // frozen array, can only be set and never modified
|
|
20
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
21
|
+
ShadowNodeType, // ShadowNode::Shared
|
|
22
|
+
#endif // RCT_NEW_ARCH_ENABLED
|
|
20
23
|
};
|
|
21
24
|
|
|
22
25
|
class ShareableValue;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
#pragma once
|
|
2
2
|
|
|
3
3
|
#include <jsi/jsi.h>
|
|
4
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
5
|
+
#include <react/renderer/core/ShadowNode.h>
|
|
6
|
+
#endif
|
|
4
7
|
#include <memory>
|
|
5
8
|
#include <string>
|
|
6
9
|
#include <vector>
|
|
@@ -9,6 +12,8 @@
|
|
|
9
12
|
#include "SharedParent.h"
|
|
10
13
|
#include "WorkletsCache.h"
|
|
11
14
|
|
|
15
|
+
using namespace facebook::react;
|
|
16
|
+
|
|
12
17
|
namespace reanimated {
|
|
13
18
|
|
|
14
19
|
class HostFunctionWrapper;
|
|
@@ -42,6 +47,10 @@ class ValueWrapper {
|
|
|
42
47
|
const std::unique_ptr<ValueWrapper> &valueContainer);
|
|
43
48
|
static inline const std::shared_ptr<MutableValue> &asMutableValue(
|
|
44
49
|
const std::unique_ptr<ValueWrapper> &valueContainer);
|
|
50
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
51
|
+
static inline const ShadowNode::Shared &asShadowNode(
|
|
52
|
+
const std::unique_ptr<ValueWrapper> &valueContainer);
|
|
53
|
+
#endif
|
|
45
54
|
|
|
46
55
|
static const HostFunctionWrapper *asHostFunctionWrapper(
|
|
47
56
|
const std::unique_ptr<ValueWrapper> &valueContainer);
|
|
@@ -109,6 +118,15 @@ class MutableValueWrapper : public ValueWrapper {
|
|
|
109
118
|
std::shared_ptr<MutableValue> value;
|
|
110
119
|
};
|
|
111
120
|
|
|
121
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
122
|
+
class ShadowNodeValueWrapper : public ValueWrapper {
|
|
123
|
+
public:
|
|
124
|
+
explicit ShadowNodeValueWrapper(const ShadowNode::Shared &_value)
|
|
125
|
+
: ValueWrapper(ValueType::ShadowNodeType), value(_value) {}
|
|
126
|
+
ShadowNode::Shared value;
|
|
127
|
+
};
|
|
128
|
+
#endif
|
|
129
|
+
|
|
112
130
|
inline bool ValueWrapper::asBoolean(
|
|
113
131
|
const std::unique_ptr<ValueWrapper> &valueContainer) {
|
|
114
132
|
return static_cast<BooleanValueWrapper *>(valueContainer.get())->value;
|
|
@@ -150,6 +168,13 @@ inline const std::shared_ptr<MutableValue> &ValueWrapper::asMutableValue(
|
|
|
150
168
|
return static_cast<MutableValueWrapper *>(valueContainer.get())->value;
|
|
151
169
|
}
|
|
152
170
|
|
|
171
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
172
|
+
inline const ShadowNode::Shared &ValueWrapper::asShadowNode(
|
|
173
|
+
const std::unique_ptr<ValueWrapper> &valueContainer) {
|
|
174
|
+
return static_cast<ShadowNodeValueWrapper *>(valueContainer.get())->value;
|
|
175
|
+
}
|
|
176
|
+
#endif
|
|
177
|
+
|
|
153
178
|
inline const HostFunctionWrapper *ValueWrapper::asHostFunctionWrapper(
|
|
154
179
|
const std::unique_ptr<ValueWrapper> &valueContainer) {
|
|
155
180
|
return static_cast<HostFunctionWrapper *>(valueContainer.get());
|
|
@@ -29,7 +29,7 @@ class Mapper : public std::enable_shared_from_this<Mapper> {
|
|
|
29
29
|
std::vector<std::shared_ptr<MutableValue>> outputs;
|
|
30
30
|
bool dirty = true;
|
|
31
31
|
std::shared_ptr<jsi::Function> userUpdater;
|
|
32
|
-
|
|
32
|
+
UpdatePropsFunction updateProps;
|
|
33
33
|
int optimalizationLvl = 0;
|
|
34
34
|
std::shared_ptr<ShareableValue> viewDescriptors;
|
|
35
35
|
|
|
@@ -1,25 +1,56 @@
|
|
|
1
1
|
#pragma once
|
|
2
2
|
|
|
3
3
|
#include <jsi/jsi.h>
|
|
4
|
-
|
|
4
|
+
|
|
5
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
6
|
+
#include <react/renderer/core/ReactPrimitives.h>
|
|
7
|
+
#endif
|
|
8
|
+
|
|
5
9
|
#include <string>
|
|
6
10
|
#include <utility>
|
|
7
11
|
#include <vector>
|
|
8
12
|
|
|
9
13
|
using namespace facebook;
|
|
10
14
|
|
|
15
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
16
|
+
using namespace react;
|
|
17
|
+
#endif
|
|
18
|
+
|
|
11
19
|
namespace reanimated {
|
|
12
20
|
|
|
13
|
-
|
|
21
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
22
|
+
|
|
23
|
+
using SynchronouslyUpdateUIPropsFunction =
|
|
24
|
+
std::function<void(jsi::Runtime &rt, Tag tag, const jsi::Value &props)>;
|
|
25
|
+
using UpdatePropsFunction = std::function<void(
|
|
26
|
+
jsi::Runtime &rt,
|
|
27
|
+
const jsi::Value &shadowNodeValue,
|
|
28
|
+
const jsi::Value &props)>;
|
|
29
|
+
using RemoveShadowNodeFromRegistryFunction =
|
|
30
|
+
std::function<void(jsi::Runtime &rt, const jsi::Value &shadowNodeValue)>;
|
|
31
|
+
using DispatchCommandFunction = std::function<void(
|
|
32
|
+
jsi::Runtime &rt,
|
|
33
|
+
const jsi::Value &shadowNodeValue,
|
|
34
|
+
const jsi::Value &commandNameValue,
|
|
35
|
+
const jsi::Value &argsValue)>;
|
|
36
|
+
using MeasureFunction = std::function<
|
|
37
|
+
jsi::Value(jsi::Runtime &rt, const jsi::Value &shadowNodeValue)>;
|
|
38
|
+
|
|
39
|
+
#else
|
|
40
|
+
|
|
41
|
+
using UpdatePropsFunction = std::function<void(
|
|
14
42
|
jsi::Runtime &rt,
|
|
15
43
|
int viewTag,
|
|
16
44
|
const jsi::Value &viewName,
|
|
17
45
|
const jsi::Object &object)>;
|
|
18
|
-
using RequestRender =
|
|
19
|
-
std::function<void(std::function<void(double)>, jsi::Runtime &rt)>;
|
|
20
46
|
using ScrollToFunction = std::function<void(int, double, double, bool)>;
|
|
21
|
-
using
|
|
47
|
+
using MeasureFunction =
|
|
22
48
|
std::function<std::vector<std::pair<std::string, double>>(int)>;
|
|
49
|
+
|
|
50
|
+
#endif // RCT_NEW_ARCH_ENABLED
|
|
51
|
+
|
|
52
|
+
using RequestRender =
|
|
53
|
+
std::function<void(std::function<void(double)>, jsi::Runtime &rt)>;
|
|
23
54
|
using TimeProviderFunction = std::function<double(void)>;
|
|
24
55
|
|
|
25
56
|
using RegisterSensorFunction =
|
|
@@ -33,14 +64,18 @@ using ConfigurePropsFunction = std::function<void(
|
|
|
33
64
|
|
|
34
65
|
struct PlatformDepMethodsHolder {
|
|
35
66
|
RequestRender requestRender;
|
|
36
|
-
|
|
67
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
68
|
+
SynchronouslyUpdateUIPropsFunction synchronouslyUpdateUIPropsFunction;
|
|
69
|
+
#else
|
|
70
|
+
UpdatePropsFunction updatePropsFunction;
|
|
37
71
|
ScrollToFunction scrollToFunction;
|
|
38
|
-
|
|
72
|
+
MeasureFunction measureFunction;
|
|
73
|
+
ConfigurePropsFunction configurePropsFunction;
|
|
74
|
+
#endif
|
|
39
75
|
TimeProviderFunction getCurrentTime;
|
|
40
76
|
RegisterSensorFunction registerSensor;
|
|
41
77
|
UnregisterSensorFunction unregisterSensor;
|
|
42
78
|
SetGestureStateFunction setGestureStateFunction;
|
|
43
|
-
ConfigurePropsFunction configurePropsFunction;
|
|
44
79
|
};
|
|
45
80
|
|
|
46
81
|
} // namespace reanimated
|
|
@@ -31,10 +31,15 @@ class RuntimeDecorator {
|
|
|
31
31
|
static void decorateRuntime(jsi::Runtime &rt, const std::string &label);
|
|
32
32
|
static void decorateUIRuntime(
|
|
33
33
|
jsi::Runtime &rt,
|
|
34
|
-
const
|
|
35
|
-
const
|
|
34
|
+
const UpdatePropsFunction updateProps,
|
|
35
|
+
const MeasureFunction measure,
|
|
36
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
37
|
+
const RemoveShadowNodeFromRegistryFunction removeShadowNodeFromRegistry,
|
|
38
|
+
const DispatchCommandFunction dispatchCommand,
|
|
39
|
+
#else
|
|
36
40
|
const ScrollToFunction scrollTo,
|
|
37
|
-
|
|
41
|
+
#endif
|
|
42
|
+
const RequestFrameFunction requestFrame,
|
|
38
43
|
const TimeProviderFunction getCurrentTime,
|
|
39
44
|
const RegisterSensorFunction registerSensor,
|
|
40
45
|
const UnregisterSensorFunction unregisterSensor,
|
package/README.md
CHANGED
|
@@ -13,6 +13,10 @@ comes to gesture based interactions.
|
|
|
13
13
|
|
|
14
14
|
Check out the [installation](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/installation) section of our docs for the detailed installation instructions.
|
|
15
15
|
|
|
16
|
+
## Fabric
|
|
17
|
+
|
|
18
|
+
To learn how to use `react-native-reanimated` with Fabric architecture, head over to [Fabric README](README-Fabric.md). Instructions on how to run Fabric Example within this repo can be found in the [FabricExample README](FabricExample/README.md).
|
|
19
|
+
|
|
16
20
|
## Documentation
|
|
17
21
|
|
|
18
22
|
Check out our dedicated documentation page for info about this library, API reference and more: [https://docs.swmansion.com/react-native-reanimated/docs/](https://docs.swmansion.com/react-native-reanimated/docs/)
|
package/RNReanimated.podspec
CHANGED
|
@@ -38,16 +38,21 @@ end
|
|
|
38
38
|
|
|
39
39
|
rnVersion = reactVersion.split('.')[1]
|
|
40
40
|
|
|
41
|
+
fabric_enabled = ENV['RCT_NEW_ARCH_ENABLED'] == '1'
|
|
42
|
+
|
|
41
43
|
folly_prefix = ""
|
|
42
44
|
if rnVersion.to_i >= 64
|
|
43
45
|
folly_prefix = "RCT-"
|
|
44
46
|
end
|
|
45
47
|
|
|
46
|
-
|
|
47
|
-
folly_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DRNVERSION=' + rnVersion
|
|
48
|
+
folly_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32 -DRNVERSION=' + rnVersion
|
|
48
49
|
folly_compiler_flags = folly_flags + ' ' + '-Wno-comma -Wno-shorten-64-to-32'
|
|
49
|
-
folly_version = '2021.
|
|
50
|
+
folly_version = '2021.06.28.00-v2'
|
|
50
51
|
boost_compiler_flags = '-Wno-documentation'
|
|
52
|
+
fabric_flags = ''
|
|
53
|
+
if fabric_enabled
|
|
54
|
+
fabric_flags = '-DRN_FABRIC_ENABLED -DRCT_NEW_ARCH_ENABLED'
|
|
55
|
+
end
|
|
51
56
|
|
|
52
57
|
Pod::Spec.new do |s|
|
|
53
58
|
s.name = "RNReanimated"
|
|
@@ -75,21 +80,29 @@ Pod::Spec.new do |s|
|
|
|
75
80
|
|
|
76
81
|
s.pod_target_xcconfig = {
|
|
77
82
|
"USE_HEADERMAP" => "YES",
|
|
78
|
-
"HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_TARGET_SRCROOT)\" \"$(PODS_ROOT)/#{folly_prefix}Folly\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/Headers/Private/React-Core\"
|
|
83
|
+
"HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_TARGET_SRCROOT)\" \"$(PODS_ROOT)/#{folly_prefix}Folly\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/Headers/Private/React-Core\"",
|
|
84
|
+
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
|
|
79
85
|
}
|
|
80
86
|
s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
|
|
81
87
|
s.xcconfig = {
|
|
82
|
-
"
|
|
83
|
-
|
|
84
|
-
"OTHER_CFLAGS" => "$(inherited)" + " " + folly_flags }
|
|
88
|
+
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/glog\" \"$(PODS_ROOT)/#{folly_prefix}Folly\" \"$(PODS_ROOT)/RCT-Folly\" \"${PODS_ROOT}/Headers/Public/React-hermes\" \"${PODS_ROOT}/Headers/Public/hermes-engine\"",
|
|
89
|
+
"OTHER_CFLAGS" => "$(inherited)" + " " + folly_flags + " " + fabric_flags }
|
|
85
90
|
|
|
86
91
|
s.requires_arc = true
|
|
87
92
|
|
|
88
93
|
s.dependency "React-Core"
|
|
94
|
+
if fabric_enabled
|
|
95
|
+
s.dependency "React-RCTFabric"
|
|
96
|
+
s.dependency "React-Codegen"
|
|
97
|
+
s.dependency "RCT-Folly", folly_version
|
|
98
|
+
else
|
|
99
|
+
s.dependency "#{folly_prefix}Folly"
|
|
100
|
+
end
|
|
101
|
+
s.dependency "RCTRequired"
|
|
102
|
+
s.dependency "RCTTypeSafety"
|
|
103
|
+
s.dependency "ReactCommon/turbomodule/core"
|
|
89
104
|
s.dependency 'FBLazyVector'
|
|
90
105
|
s.dependency 'FBReactNativeSpec'
|
|
91
|
-
s.dependency 'RCTRequired'
|
|
92
|
-
s.dependency 'RCTTypeSafety'
|
|
93
106
|
s.dependency 'React-Core'
|
|
94
107
|
s.dependency 'React-CoreModules'
|
|
95
108
|
s.dependency 'React-Core/DevSupport'
|
|
@@ -108,7 +121,6 @@ Pod::Spec.new do |s|
|
|
|
108
121
|
s.dependency 'React-jsi'
|
|
109
122
|
s.dependency 'React-jsiexecutor'
|
|
110
123
|
s.dependency 'React-jsinspector'
|
|
111
|
-
s.dependency 'ReactCommon/turbomodule/core'
|
|
112
124
|
s.dependency 'Yoga'
|
|
113
125
|
s.dependency 'DoubleConversion'
|
|
114
126
|
s.dependency 'glog'
|
|
@@ -119,7 +131,6 @@ Pod::Spec.new do |s|
|
|
|
119
131
|
s.dependency 'React-callinvoker'
|
|
120
132
|
end
|
|
121
133
|
|
|
122
|
-
s.dependency "#{folly_prefix}Folly"
|
|
123
134
|
|
|
124
135
|
end
|
|
125
136
|
|
package/android/CMakeLists.txt
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
cmake_minimum_required(VERSION 3.5.1)
|
|
2
2
|
|
|
3
3
|
set (CMAKE_VERBOSE_MAKEFILE ON)
|
|
4
|
-
set (CMAKE_CXX_STANDARD
|
|
5
|
-
set (
|
|
4
|
+
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 -DFOR_HERMES=${FOR_HERMES} -fexceptions -fno-omit-frame-pointer -frtti -Wno-sign-compare -std=c++17 -Wall")
|
|
6
|
+
if(${IS_NEW_ARCHITECTURE_ENABLED})
|
|
7
|
+
set (ALL_FLAGS "${DEFAULT_FLAGS} -DRCT_NEW_ARCH_ENABLED")
|
|
8
|
+
else()
|
|
9
|
+
set (ALL_FLAGS ${DEFAULT_FLAGS})
|
|
10
|
+
endif()
|
|
11
|
+
set (CMAKE_CXX_FLAGS ${ALL_FLAGS})
|
|
6
12
|
|
|
7
13
|
if(${NATIVE_DEBUG})
|
|
8
14
|
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g")
|
|
@@ -13,20 +19,32 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
|
|
13
19
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE INTERNAL "")
|
|
14
20
|
|
|
15
21
|
set (PACKAGE_NAME "reanimated")
|
|
22
|
+
set (BUILD_DIR ${CMAKE_SOURCE_DIR}/build)
|
|
16
23
|
set (SRC_DIR ${CMAKE_SOURCE_DIR}/src)
|
|
17
24
|
|
|
18
25
|
if(${CLIENT_SIDE_BUILD})
|
|
19
26
|
set (NODE_MODULES_DIR "${CMAKE_SOURCE_DIR}/../../")
|
|
20
27
|
set (COMMON_SRC_DIR "${CMAKE_SOURCE_DIR}/../Common")
|
|
21
28
|
else()
|
|
22
|
-
set (NODE_MODULES_DIR "
|
|
29
|
+
set (NODE_MODULES_DIR "../${PLAYGROUND_APP_NAME}/node_modules")
|
|
23
30
|
set (COMMON_SRC_DIR "${SRC_DIR}/main/Common")
|
|
24
31
|
endif()
|
|
25
32
|
|
|
26
|
-
|
|
27
|
-
|
|
33
|
+
if(${IS_NEW_ARCHITECTURE_ENABLED})
|
|
34
|
+
if(${CLIENT_SIDE_BUILD})
|
|
35
|
+
set (RN_SO_DIR "${CMAKE_SOURCE_DIR}/../../../android/app/build/react-ndk/exported")
|
|
36
|
+
set (FBJNI_HEADERS_DIR "${CMAKE_SOURCE_DIR}/../../react-native/ReactAndroid/src/main/jni/first-party/fbjni/headers")
|
|
37
|
+
else()
|
|
38
|
+
set (RN_SO_DIR "${CMAKE_SOURCE_DIR}/../${PLAYGROUND_APP_NAME}/android/app/build/react-ndk/exported")
|
|
39
|
+
set (FBJNI_HEADERS_DIR "${CMAKE_SOURCE_DIR}/../${PLAYGROUND_APP_NAME}/node_modules/react-native/ReactAndroid/src/main/jni/first-party/fbjni/headers")
|
|
40
|
+
endif()
|
|
41
|
+
else()
|
|
42
|
+
set (RN_SO_DIR ${NODE_MODULES_DIR}/react-native/ReactAndroid/src/main/jni/first-party/react/jni)
|
|
43
|
+
set (FBJNI_HEADERS_DIR "${NODE_MODULES_DIR}/react-native/ReactAndroid/src/main/jni/first-party/fbjni/headers")
|
|
44
|
+
endif()
|
|
28
45
|
|
|
29
|
-
|
|
46
|
+
file (GLOB LIBRN_DIR "${RN_SO_DIR}/${ANDROID_ABI}")
|
|
47
|
+
file (GLOB HERMES_DIR "${BUILD_DIR}/third-party-ndk/hermes/jni/${ANDROID_ABI}")
|
|
30
48
|
|
|
31
49
|
file(GLOB sources_tools "${COMMON_SRC_DIR}/cpp/Tools/*.cpp")
|
|
32
50
|
file(GLOB sources_native_modules "${COMMON_SRC_DIR}/cpp/NativeModules/*.cpp")
|
|
@@ -45,6 +63,17 @@ if(${REACT_NATIVE_TARGET_VERSION} LESS 66)
|
|
|
45
63
|
)
|
|
46
64
|
endif()
|
|
47
65
|
|
|
66
|
+
if(${IS_NEW_ARCHITECTURE_ENABLED})
|
|
67
|
+
set(
|
|
68
|
+
FABRIC_UTILS_CPP
|
|
69
|
+
"${COMMON_SRC_DIR}/cpp/Fabric/FabricUtils.cpp"
|
|
70
|
+
)
|
|
71
|
+
set(
|
|
72
|
+
REANIMATED_UI_MANAGER_BINDING_CPP
|
|
73
|
+
"${COMMON_SRC_DIR}/cpp/Fabric/ReanimatedUIManagerBinding.cpp"
|
|
74
|
+
)
|
|
75
|
+
endif()
|
|
76
|
+
|
|
48
77
|
add_library(
|
|
49
78
|
${PACKAGE_NAME}
|
|
50
79
|
SHARED
|
|
@@ -63,6 +92,8 @@ add_library(
|
|
|
63
92
|
"${COMMON_SRC_DIR}/cpp/Tools/FeaturesConfig.cpp"
|
|
64
93
|
"${COMMON_SRC_DIR}/cpp/LayoutAnimations/LayoutAnimationsProxy.cpp"
|
|
65
94
|
"${COMMON_SRC_DIR}/cpp/AnimatedSensor/AnimatedSensorModule.cpp"
|
|
95
|
+
${FABRIC_UTILS_CPP}
|
|
96
|
+
${REANIMATED_UI_MANAGER_BINDING_CPP}
|
|
66
97
|
)
|
|
67
98
|
|
|
68
99
|
# includes
|
|
@@ -81,11 +112,15 @@ target_include_directories(
|
|
|
81
112
|
"${NODE_MODULES_DIR}/react-native/React/Base"
|
|
82
113
|
"${NODE_MODULES_DIR}/react-native/ReactAndroid/src/main/jni"
|
|
83
114
|
"${NODE_MODULES_DIR}/react-native/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/jni"
|
|
115
|
+
"${NODE_MODULES_DIR}/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/jni"
|
|
84
116
|
"${NODE_MODULES_DIR}/react-native/ReactCommon"
|
|
85
117
|
"${NODE_MODULES_DIR}/react-native/ReactCommon/callinvoker"
|
|
86
118
|
"${NODE_MODULES_DIR}/react-native/ReactCommon/jsi"
|
|
119
|
+
"${NODE_MODULES_DIR}/react-native/ReactCommon/react/renderer/graphics/platform/cxx"
|
|
120
|
+
"${NODE_MODULES_DIR}/react-native/ReactCommon/runtimeexecutor"
|
|
87
121
|
"${NODE_MODULES_DIR}/react-native/ReactCommon/turbomodule/core"
|
|
88
122
|
"${NODE_MODULES_DIR}/react-native/ReactCommon/turbomodule"
|
|
123
|
+
"${NODE_MODULES_DIR}/react-native/ReactCommon/yoga"
|
|
89
124
|
"${NODE_MODULES_DIR}/hermes-engine/android/include/"
|
|
90
125
|
"${COMMON_SRC_DIR}/cpp/headers/Tools"
|
|
91
126
|
"${COMMON_SRC_DIR}/cpp/headers/SpecTools"
|
|
@@ -94,15 +129,11 @@ target_include_directories(
|
|
|
94
129
|
"${COMMON_SRC_DIR}/cpp/headers/Registries"
|
|
95
130
|
"${COMMON_SRC_DIR}/cpp/headers/LayoutAnimations"
|
|
96
131
|
"${COMMON_SRC_DIR}/cpp/headers/AnimatedSensor"
|
|
132
|
+
"${COMMON_SRC_DIR}/cpp/headers/Fabric"
|
|
97
133
|
"${COMMON_SRC_DIR}/cpp/hidden_headers"
|
|
98
134
|
"${SRC_DIR}/main/cpp/headers"
|
|
99
135
|
)
|
|
100
136
|
|
|
101
|
-
# find libraries
|
|
102
|
-
|
|
103
|
-
file (GLOB LIBRN_DIR "${RN_SO_DIR}/${ANDROID_ABI}")
|
|
104
|
-
file (GLOB HERMES_DIR "${BUILD_DIR}/third-party-ndk/hermes/jni/${ANDROID_ABI}")
|
|
105
|
-
|
|
106
137
|
find_library(
|
|
107
138
|
LOG_LIB
|
|
108
139
|
log
|
|
@@ -119,26 +150,18 @@ find_library(
|
|
|
119
150
|
PATHS ${LIBRN_DIR}
|
|
120
151
|
NO_CMAKE_FIND_ROOT_PATH
|
|
121
152
|
)
|
|
122
|
-
find_library(
|
|
123
|
-
FOLLY_JSON_LIB
|
|
124
|
-
folly_json
|
|
125
|
-
PATHS ${LIBRN_DIR}
|
|
126
|
-
NO_CMAKE_FIND_ROOT_PATH
|
|
127
|
-
)
|
|
128
153
|
find_library(
|
|
129
154
|
REACT_NATIVE_JNI_LIB
|
|
130
155
|
reactnativejni
|
|
131
156
|
PATHS ${LIBRN_DIR}
|
|
132
157
|
NO_CMAKE_FIND_ROOT_PATH
|
|
133
158
|
)
|
|
134
|
-
|
|
135
159
|
find_library(
|
|
136
160
|
GLOG_LIB
|
|
137
161
|
glog
|
|
138
162
|
PATHS ${LIBRN_DIR}
|
|
139
163
|
NO_CMAKE_FIND_ROOT_PATH
|
|
140
164
|
)
|
|
141
|
-
|
|
142
165
|
find_library(
|
|
143
166
|
FBJNI_LIB
|
|
144
167
|
fbjni
|
|
@@ -146,15 +169,88 @@ find_library(
|
|
|
146
169
|
NO_CMAKE_FIND_ROOT_PATH
|
|
147
170
|
)
|
|
148
171
|
|
|
172
|
+
if(${REACT_NATIVE_TARGET_VERSION} LESS 69)
|
|
173
|
+
find_library(
|
|
174
|
+
FOLLY_LIB
|
|
175
|
+
folly_json
|
|
176
|
+
PATHS ${LIBRN_DIR}
|
|
177
|
+
NO_CMAKE_FIND_ROOT_PATH
|
|
178
|
+
)
|
|
179
|
+
else()
|
|
180
|
+
find_library(
|
|
181
|
+
FOLLY_LIB
|
|
182
|
+
folly_runtime
|
|
183
|
+
PATHS ${LIBRN_DIR}
|
|
184
|
+
NO_CMAKE_FIND_ROOT_PATH
|
|
185
|
+
)
|
|
186
|
+
endif()
|
|
187
|
+
|
|
149
188
|
if(${REACT_NATIVE_TARGET_VERSION} LESS 66)
|
|
150
|
-
|
|
189
|
+
set (JSI_LIB "")
|
|
151
190
|
else()
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
191
|
+
find_library(
|
|
192
|
+
JSI_LIB
|
|
193
|
+
jsi
|
|
194
|
+
PATHS ${LIBRN_DIR}
|
|
195
|
+
NO_CMAKE_FIND_ROOT_PATH
|
|
196
|
+
)
|
|
197
|
+
endif()
|
|
198
|
+
|
|
199
|
+
if(${IS_NEW_ARCHITECTURE_ENABLED})
|
|
200
|
+
find_library(
|
|
201
|
+
REACT_RENDER_UIMANAGER
|
|
202
|
+
react_render_uimanager
|
|
203
|
+
PATHS ${LIBRN_DIR}
|
|
204
|
+
NO_CMAKE_FIND_ROOT_PATH
|
|
205
|
+
)
|
|
206
|
+
find_library(
|
|
207
|
+
REACT_RENDER_MOUNTING
|
|
208
|
+
react_render_mounting
|
|
209
|
+
PATHS ${LIBRN_DIR}
|
|
210
|
+
NO_CMAKE_FIND_ROOT_PATH
|
|
211
|
+
)
|
|
212
|
+
find_library(
|
|
213
|
+
REACT_RENDER_COMPONENTREGISTRY
|
|
214
|
+
react_render_componentregistry
|
|
215
|
+
PATHS ${LIBRN_DIR}
|
|
216
|
+
NO_CMAKE_FIND_ROOT_PATH
|
|
217
|
+
)
|
|
218
|
+
find_library(
|
|
219
|
+
REACT_RENDER_CORE
|
|
220
|
+
react_render_core
|
|
221
|
+
PATHS ${LIBRN_DIR}
|
|
222
|
+
NO_CMAKE_FIND_ROOT_PATH
|
|
223
|
+
)
|
|
224
|
+
find_library(
|
|
225
|
+
REACT_DEBUG
|
|
226
|
+
react_debug
|
|
227
|
+
PATHS ${LIBRN_DIR}
|
|
228
|
+
NO_CMAKE_FIND_ROOT_PATH
|
|
229
|
+
)
|
|
230
|
+
find_library(
|
|
231
|
+
REACT_RENDER_DEBUG
|
|
232
|
+
react_render_debug
|
|
233
|
+
PATHS ${LIBRN_DIR}
|
|
234
|
+
NO_CMAKE_FIND_ROOT_PATH
|
|
235
|
+
)
|
|
236
|
+
find_library(
|
|
237
|
+
RRC_ROOT
|
|
238
|
+
rrc_root
|
|
239
|
+
PATHS ${LIBRN_DIR}
|
|
240
|
+
NO_CMAKE_FIND_ROOT_PATH
|
|
241
|
+
)
|
|
242
|
+
find_library(
|
|
243
|
+
REACT_RENDER_SCHEDULER
|
|
244
|
+
react_render_scheduler
|
|
245
|
+
PATHS ${LIBRN_DIR}
|
|
246
|
+
NO_CMAKE_FIND_ROOT_PATH
|
|
247
|
+
)
|
|
248
|
+
find_library(
|
|
249
|
+
FABRICJNI
|
|
250
|
+
fabricjni
|
|
251
|
+
PATHS ${LIBRN_DIR}
|
|
252
|
+
NO_CMAKE_FIND_ROOT_PATH
|
|
253
|
+
)
|
|
158
254
|
endif()
|
|
159
255
|
|
|
160
256
|
# build shared lib
|
|
@@ -169,7 +265,7 @@ if(${FOR_HERMES})
|
|
|
169
265
|
${HERMES_LIB}
|
|
170
266
|
${GLOG_LIB}
|
|
171
267
|
${FBJNI_LIB}
|
|
172
|
-
${
|
|
268
|
+
${FOLLY_LIB}
|
|
173
269
|
${REACT_NATIVE_JNI_LIB}
|
|
174
270
|
android
|
|
175
271
|
)
|
|
@@ -178,6 +274,7 @@ else()
|
|
|
178
274
|
${PACKAGE_NAME}
|
|
179
275
|
${LOG_LIB}
|
|
180
276
|
${JSI_LIB}
|
|
277
|
+
${FOLLY_LIB}
|
|
181
278
|
${JSEXECUTOR_LIB}
|
|
182
279
|
${GLOG_LIB}
|
|
183
280
|
${FBJNI_LIB}
|
|
@@ -187,6 +284,21 @@ else()
|
|
|
187
284
|
)
|
|
188
285
|
endif()
|
|
189
286
|
|
|
287
|
+
if(${IS_NEW_ARCHITECTURE_ENABLED})
|
|
288
|
+
target_link_libraries(
|
|
289
|
+
${PACKAGE_NAME}
|
|
290
|
+
${REACT_RENDER_UIMANAGER}
|
|
291
|
+
${REACT_RENDER_MOUNTING}
|
|
292
|
+
${REACT_RENDER_COMPONENTREGISTRY}
|
|
293
|
+
${REACT_RENDER_CORE}
|
|
294
|
+
${REACT_DEBUG}
|
|
295
|
+
${REACT_RENDER_DEBUG}
|
|
296
|
+
${RRC_ROOT}
|
|
297
|
+
${FABRICJNI}
|
|
298
|
+
${REACT_RENDER_SCHEDULER}
|
|
299
|
+
)
|
|
300
|
+
endif()
|
|
301
|
+
|
|
190
302
|
if(${REACT_NATIVE_TARGET_VERSION} LESS 64)
|
|
191
303
|
add_library(
|
|
192
304
|
turbomodulejsijni
|