react-native-reanimated 2.3.0-alpha.3 → 2.3.0-beta.4
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/LayoutAnimations/LayoutAnimationsProxy.cpp +15 -8
- package/Common/cpp/NativeModules/NativeReanimatedModule.cpp +176 -154
- package/Common/cpp/NativeModules/NativeReanimatedModuleSpec.cpp +49 -33
- package/Common/cpp/Registries/EventHandlerRegistry.cpp +14 -7
- package/Common/cpp/Registries/MapperRegistry.cpp +24 -20
- package/Common/cpp/Registries/WorkletsCache.cpp +19 -9
- package/Common/cpp/SharedItems/FrozenObject.cpp +17 -8
- package/Common/cpp/SharedItems/MutableValue.cpp +38 -25
- package/Common/cpp/SharedItems/MutableValueSetterProxy.cpp +11 -7
- package/Common/cpp/SharedItems/RemoteObject.cpp +9 -5
- package/Common/cpp/SharedItems/ShareableValue.cpp +211 -160
- package/Common/cpp/Tools/FeaturesConfig.cpp +5 -0
- package/Common/cpp/Tools/JSIStoreValueUser.cpp +25 -6
- package/Common/cpp/Tools/Mapper.cpp +30 -30
- package/Common/cpp/Tools/RuntimeDecorator.cpp +124 -86
- package/Common/cpp/Tools/Scheduler.cpp +6 -5
- package/Common/cpp/Tools/WorkletEventHandler.cpp +4 -2
- package/Common/cpp/headers/LayoutAnimations/LayoutAnimationsProxy.h +12 -11
- package/Common/cpp/headers/NativeModules/NativeReanimatedModule.h +50 -31
- package/Common/cpp/headers/NativeModules/NativeReanimatedModuleSpec.h +34 -16
- package/Common/cpp/headers/Registries/EventHandlerRegistry.h +15 -8
- package/Common/cpp/headers/Registries/MapperRegistry.h +5 -4
- package/Common/cpp/headers/Registries/WorkletsCache.h +9 -7
- package/Common/cpp/headers/SharedItems/FrozenObject.h +19 -11
- package/Common/cpp/headers/SharedItems/HostFunctionHandler.h +8 -4
- package/Common/cpp/headers/SharedItems/MutableValue.h +23 -12
- package/Common/cpp/headers/SharedItems/MutableValueSetterProxy.h +12 -7
- package/Common/cpp/headers/SharedItems/RemoteObject.h +19 -8
- package/Common/cpp/headers/SharedItems/RuntimeManager.h +26 -25
- package/Common/cpp/headers/SharedItems/ShareableValue.h +32 -27
- package/Common/cpp/headers/SharedItems/SharedParent.h +10 -7
- package/Common/cpp/headers/SharedItems/ValueWrapper.h +95 -72
- package/Common/cpp/headers/SpecTools/ErrorHandler.h +18 -19
- package/Common/cpp/headers/Tools/FeaturesConfig.h +19 -0
- package/Common/cpp/headers/Tools/JSIStoreValueUser.h +13 -16
- package/Common/cpp/headers/Tools/Mapper.h +19 -16
- package/Common/cpp/headers/Tools/PlatformDepMethodsHolder.h +17 -7
- package/Common/cpp/headers/Tools/ReanimatedHiddenHeaders.h +7 -11
- package/Common/cpp/headers/Tools/RuntimeDecorator.h +36 -27
- package/Common/cpp/headers/Tools/Scheduler.h +30 -35
- package/Common/cpp/headers/Tools/WorkletEventHandler.h +11 -8
- package/Common/cpp/hidden_headers/Logger.h +14 -14
- package/Common/cpp/hidden_headers/LoggerInterface.h +8 -9
- package/Common/cpp/hidden_headers/SpeedChecker.h +7 -8
- package/README.md +1 -1
- package/RNReanimated.podspec +24 -6
- package/android/build.gradle +38 -29
- package/android/react-native-reanimated-63-hermes.aar +0 -0
- package/android/react-native-reanimated-63-jsc.aar +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/ios/LayoutReanimation/REAAnimationsManager.h +10 -8
- package/ios/LayoutReanimation/REAAnimationsManager.m +91 -87
- package/ios/LayoutReanimation/REASnapshot.h +2 -2
- package/ios/LayoutReanimation/REASnapshot.m +8 -7
- package/ios/LayoutReanimation/REAUIManager.h +4 -4
- package/ios/LayoutReanimation/REAUIManager.mm +116 -70
- package/ios/Nodes/REAAlwaysNode.m +14 -15
- package/ios/Nodes/REABezierNode.m +8 -7
- package/ios/Nodes/REABlockNode.m +1 -1
- package/ios/Nodes/REACallFuncNode.h +0 -1
- package/ios/Nodes/REACallFuncNode.m +10 -8
- package/ios/Nodes/REAClockNodes.m +22 -20
- package/ios/Nodes/REAConcatNode.h +0 -1
- package/ios/Nodes/REAConcatNode.m +2 -2
- package/ios/Nodes/REACondNode.m +7 -5
- package/ios/Nodes/READebugNode.m +5 -4
- package/ios/Nodes/REAEventNode.m +1 -1
- package/ios/Nodes/REAFunctionNode.h +0 -1
- package/ios/Nodes/REAFunctionNode.m +2 -2
- package/ios/Nodes/REAJSCallNode.m +4 -5
- package/ios/Nodes/REANode.h +3 -4
- package/ios/Nodes/REANode.m +9 -11
- package/ios/Nodes/REAOperatorNode.m +68 -67
- package/ios/Nodes/REAParamNode.h +1 -3
- package/ios/Nodes/REAParamNode.m +15 -17
- package/ios/Nodes/REAPropsNode.h +1 -3
- package/ios/Nodes/REAPropsNode.m +19 -22
- package/ios/Nodes/REASetNode.h +0 -1
- package/ios/Nodes/REASetNode.m +7 -5
- package/ios/Nodes/REAStyleNode.h +0 -1
- package/ios/Nodes/REAStyleNode.m +2 -4
- package/ios/Nodes/REATransformNode.h +0 -1
- package/ios/Nodes/REATransformNode.m +3 -5
- package/ios/Nodes/REAValueNode.m +5 -7
- package/ios/REAEventDispatcher.m +4 -4
- package/ios/REAModule.h +0 -2
- package/ios/REAModule.m +29 -38
- package/ios/REANodesManager.h +11 -19
- package/ios/REANodesManager.m +106 -130
- package/ios/REAUtils.h +5 -3
- package/ios/RNGestureHandlerStateManager.h +5 -0
- package/ios/Transitioning/RCTConvert+REATransition.m +45 -29
- package/ios/Transitioning/REAAllTransitions.h +2 -2
- package/ios/Transitioning/REAAllTransitions.m +14 -25
- package/ios/Transitioning/REATransition.h +8 -7
- package/ios/Transitioning/REATransition.m +19 -16
- package/ios/Transitioning/REATransitionAnimation.h +1 -1
- package/ios/Transitioning/REATransitionAnimation.m +2 -3
- package/ios/Transitioning/REATransitionManager.m +3 -3
- package/ios/native/NativeMethods.h +20 -5
- package/ios/native/NativeMethods.mm +14 -6
- package/ios/native/NativeProxy.h +4 -2
- package/ios/native/NativeProxy.mm +84 -63
- package/ios/native/REAIOSErrorHandler.h +13 -10
- package/ios/native/REAIOSErrorHandler.mm +19 -15
- package/ios/native/REAIOSLogger.h +8 -8
- package/ios/native/REAIOSLogger.mm +10 -6
- package/ios/native/REAIOSScheduler.h +5 -5
- package/ios/native/REAIOSScheduler.mm +17 -10
- package/ios/native/REAInitializer.h +5 -7
- package/ios/native/REAInitializer.mm +43 -31
- package/ios/native/UIResponder+Reanimated.mm +2 -2
- package/lib/Animated.js +9 -1
- package/lib/ConfigHelper.js +121 -138
- package/lib/ReanimatedEventEmitter.js +0 -1
- package/lib/ReanimatedModule.js +0 -1
- package/lib/ReanimatedModule.macos.js +0 -1
- package/lib/ReanimatedModule.native.js +5 -6
- package/lib/ReanimatedModule.windows.js +0 -1
- package/lib/ReanimatedModuleCompat.js +64 -35
- package/lib/createAnimatedComponent.js +468 -487
- package/lib/index.js +9 -1
- package/lib/reanimated2/NativeMethods.js +7 -12
- package/lib/reanimated2/NativeReanimated/NativeReanimated.js +37 -0
- package/lib/reanimated2/NativeReanimated/index.js +15 -0
- package/lib/reanimated2/PropAdapters.js +0 -1
- package/lib/reanimated2/UpdateProps.js +6 -7
- package/lib/reanimated2/ViewDescriptorsSet.js +4 -4
- package/lib/reanimated2/WorkletEventHandler.js +15 -13
- package/lib/reanimated2/animation/delay.js +8 -2
- package/lib/reanimated2/animation/spring.js +2 -0
- package/lib/reanimated2/animation/styleAnimation.js +7 -3
- package/lib/reanimated2/animation/util.js +25 -2
- package/lib/reanimated2/core.js +41 -17
- package/lib/reanimated2/globals.d.ts +21 -1
- package/lib/reanimated2/hook/useAnimatedRef.js +1 -1
- package/lib/reanimated2/hook/useAnimatedStyle.js +3 -3
- package/lib/reanimated2/index.js +1 -0
- package/lib/reanimated2/interpolation.js +95 -87
- package/lib/reanimated2/js-reanimated/JSReanimated.js +13 -10
- package/lib/reanimated2/js-reanimated/Mapper.js +4 -3
- package/lib/reanimated2/js-reanimated/MapperRegistry.js +3 -6
- package/lib/reanimated2/js-reanimated/MutableValue.js +0 -2
- package/lib/reanimated2/js-reanimated/index.js +10 -8
- package/lib/reanimated2/layoutReanimation/LayoutAnimationRepository.js +33 -2
- package/lib/reanimated2/layoutReanimation/animationBuilder/BaseAnimationBuilder.js +27 -124
- package/lib/reanimated2/layoutReanimation/animationBuilder/ComplexAnimationBuilder.js +125 -0
- package/lib/reanimated2/layoutReanimation/animationBuilder/index.js +1 -2
- package/lib/reanimated2/layoutReanimation/defaultAnimations/Bounce.js +115 -45
- package/lib/reanimated2/layoutReanimation/defaultAnimations/Default.js +7 -2
- package/lib/reanimated2/layoutReanimation/defaultAnimations/Fade.js +21 -21
- package/lib/reanimated2/layoutReanimation/defaultAnimations/Flip.js +25 -25
- package/lib/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.js +19 -17
- package/lib/reanimated2/layoutReanimation/defaultAnimations/Pinwheel.js +5 -5
- package/lib/reanimated2/layoutReanimation/defaultAnimations/Roll.js +9 -9
- package/lib/reanimated2/layoutReanimation/defaultAnimations/Rotate.js +17 -17
- package/lib/reanimated2/layoutReanimation/defaultAnimations/Slide.js +19 -19
- package/lib/reanimated2/layoutReanimation/defaultAnimations/Stretch.js +9 -9
- package/lib/reanimated2/layoutReanimation/defaultAnimations/Zoom.js +33 -33
- package/lib/reanimated2/layoutReanimation/defaultTransitions/CurvedTransition.js +78 -0
- package/lib/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.js +128 -0
- package/lib/reanimated2/layoutReanimation/defaultTransitions/FadingTransition.js +37 -0
- package/lib/reanimated2/layoutReanimation/defaultTransitions/JumpingTransition.js +41 -0
- package/lib/reanimated2/layoutReanimation/defaultTransitions/LinearTransition.js +34 -0
- package/lib/reanimated2/layoutReanimation/defaultTransitions/SequencedTransition.js +46 -0
- package/lib/reanimated2/layoutReanimation/defaultTransitions/index.js +6 -0
- package/lib/reanimated2/layoutReanimation/index.js +1 -0
- package/lib/reanimated2/mock.js +3 -1
- package/lib/reanimated2/utils.js +9 -0
- package/lib/setAndForwardRef.js +14 -48
- package/libSo/fbjni/jni/arm64-v8a/libfbjni.so +0 -0
- package/libSo/fbjni/jni/armeabi-v7a/libfbjni.so +0 -0
- package/libSo/fbjni/jni/x86/libfbjni.so +0 -0
- package/libSo/fbjni/jni/x86_64/libfbjni.so +0 -0
- package/mock.js +1 -1
- package/package.json +28 -17
- package/plugin.js +220 -39
- package/react-native-reanimated.d.ts +542 -547
- package/src/Animated.js +9 -1
- package/src/{ConfigHelper.js → ConfigHelper.ts} +15 -7
- package/src/{ReanimatedEventEmitter.js → ReanimatedEventEmitter.ts} +0 -0
- package/src/{ReanimatedModule.js → ReanimatedModule.macos.ts} +0 -0
- package/src/{ReanimatedModule.native.js → ReanimatedModule.native.ts} +0 -0
- package/src/{ReanimatedModule.macos.js → ReanimatedModule.ts} +0 -0
- package/src/{ReanimatedModule.windows.js → ReanimatedModule.windows.ts} +0 -0
- package/src/ReanimatedModuleCompat.ts +51 -0
- package/src/{createAnimatedComponent.js → createAnimatedComponent.tsx} +285 -126
- package/src/reanimated2/NativeMethods.ts +34 -13
- package/src/reanimated2/NativeReanimated/NativeReanimated.ts +72 -0
- package/src/reanimated2/NativeReanimated/index.ts +18 -0
- package/src/reanimated2/PropAdapters.ts +0 -1
- package/src/reanimated2/UpdateProps.ts +31 -15
- package/src/reanimated2/ViewDescriptorsSet.ts +15 -12
- package/src/reanimated2/WorkletEventHandler.ts +41 -23
- package/src/reanimated2/animation/commonTypes.ts +4 -4
- package/src/reanimated2/animation/decay.ts +2 -2
- package/src/reanimated2/animation/delay.ts +11 -5
- package/src/reanimated2/animation/index.ts +7 -7
- package/src/reanimated2/animation/repeat.ts +4 -4
- package/src/reanimated2/animation/sequence.ts +2 -2
- package/src/reanimated2/animation/spring.ts +6 -5
- package/src/reanimated2/animation/styleAnimation.ts +27 -15
- package/src/reanimated2/animation/timing.ts +5 -5
- package/src/reanimated2/animation/util.ts +47 -8
- package/src/reanimated2/commonTypes.ts +3 -0
- package/src/reanimated2/core.ts +80 -34
- package/src/reanimated2/globals.d.ts +21 -1
- package/src/reanimated2/hook/useAnimatedGestureHandler.ts +1 -1
- package/src/reanimated2/hook/useAnimatedRef.ts +13 -15
- package/src/reanimated2/hook/useAnimatedScrollHandler.ts +3 -3
- package/src/reanimated2/hook/useAnimatedStyle.ts +7 -7
- package/src/reanimated2/hook/utils.ts +4 -3
- package/src/reanimated2/index.ts +1 -0
- package/src/reanimated2/interpolation.ts +170 -103
- package/src/reanimated2/js-reanimated/JSReanimated.ts +37 -23
- package/src/reanimated2/js-reanimated/Mapper.ts +22 -9
- package/src/reanimated2/js-reanimated/MapperRegistry.ts +22 -19
- package/src/reanimated2/js-reanimated/MutableValue.ts +11 -11
- package/src/reanimated2/js-reanimated/index.ts +31 -14
- package/src/reanimated2/layoutReanimation/LayoutAnimationRepository.ts +75 -0
- package/src/reanimated2/layoutReanimation/animationBuilder/BaseAnimationBuilder.ts +29 -159
- package/src/reanimated2/layoutReanimation/animationBuilder/ComplexAnimationBuilder.ts +169 -0
- package/src/reanimated2/layoutReanimation/animationBuilder/Keyframe.ts +2 -2
- package/src/reanimated2/layoutReanimation/animationBuilder/commonTypes.ts +3 -9
- package/src/reanimated2/layoutReanimation/animationBuilder/index.ts +1 -5
- package/src/reanimated2/layoutReanimation/defaultAnimations/Bounce.ts +162 -82
- package/src/reanimated2/layoutReanimation/defaultAnimations/Default.ts +7 -2
- package/src/reanimated2/layoutReanimation/defaultAnimations/Fade.ts +32 -32
- package/src/reanimated2/layoutReanimation/defaultAnimations/Flip.ts +38 -38
- package/src/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.ts +34 -32
- package/src/reanimated2/layoutReanimation/defaultAnimations/Pinwheel.ts +8 -8
- package/src/reanimated2/layoutReanimation/defaultAnimations/Roll.ts +14 -14
- package/src/reanimated2/layoutReanimation/defaultAnimations/Rotate.ts +26 -26
- package/src/reanimated2/layoutReanimation/defaultAnimations/Slide.ts +28 -28
- package/src/reanimated2/layoutReanimation/defaultAnimations/Stretch.ts +14 -14
- package/src/reanimated2/layoutReanimation/defaultAnimations/Zoom.ts +50 -50
- package/src/reanimated2/layoutReanimation/defaultTransitions/CurvedTransition.ts +104 -0
- package/src/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.ts +213 -0
- package/src/reanimated2/layoutReanimation/defaultTransitions/FadingTransition.ts +60 -0
- package/src/reanimated2/layoutReanimation/defaultTransitions/JumpingTransition.ts +58 -0
- package/src/reanimated2/layoutReanimation/defaultTransitions/LinearTransition.ts +41 -0
- package/src/reanimated2/layoutReanimation/defaultTransitions/SequencedTransition.ts +78 -0
- package/src/reanimated2/layoutReanimation/defaultTransitions/index.ts +6 -0
- package/src/reanimated2/layoutReanimation/index.ts +1 -0
- package/src/reanimated2/mock.ts +3 -1
- package/src/reanimated2/utils.ts +21 -0
- package/src/{setAndForwardRef.js → setAndForwardRef.ts} +12 -2
- package/android/react-native-reanimated-62-hermes.aar +0 -0
- package/android/react-native-reanimated-62-jsc.aar +0 -0
- package/lib/reanimated2/NativeReanimated.js +0 -48
- package/lib/reanimated2/layoutReanimation/animationBuilder/BaseBounceAnimationBuilder.js +0 -55
- package/lib/reanimated2/layoutReanimation/animationBuilder/LayoutAnimationBuilder.js +0 -165
- package/src/ReanimatedModuleCompat.js +0 -37
- package/src/reanimated2/NativeReanimated.ts +0 -70
- package/src/reanimated2/layoutReanimation/LayoutAnimationRepository.tsx +0 -41
- package/src/reanimated2/layoutReanimation/animationBuilder/BaseBounceAnimationBuilder.ts +0 -82
- package/src/reanimated2/layoutReanimation/animationBuilder/LayoutAnimationBuilder.ts +0 -217
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
#pragma once
|
|
2
2
|
|
|
3
|
-
#include
|
|
3
|
+
#include <jsi/jsi.h>
|
|
4
4
|
#include <stdio.h>
|
|
5
|
+
#include <memory>
|
|
6
|
+
#include <string>
|
|
5
7
|
#include <unordered_map>
|
|
6
|
-
#include <jsi/jsi.h>
|
|
7
8
|
#include "LayoutAnimationsProxy.h"
|
|
9
|
+
#include "PlatformDepMethodsHolder.h"
|
|
8
10
|
|
|
9
11
|
using namespace facebook;
|
|
10
12
|
|
|
@@ -22,25 +24,28 @@ enum RuntimeType {
|
|
|
22
24
|
*/
|
|
23
25
|
UI
|
|
24
26
|
};
|
|
25
|
-
typedef jsi::Runtime*
|
|
27
|
+
typedef jsi::Runtime *RuntimePointer;
|
|
26
28
|
|
|
27
29
|
class RuntimeDecorator {
|
|
28
|
-
public:
|
|
30
|
+
public:
|
|
29
31
|
static void decorateRuntime(jsi::Runtime &rt, const std::string &label);
|
|
30
|
-
static void decorateUIRuntime(
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
32
|
+
static void decorateUIRuntime(
|
|
33
|
+
jsi::Runtime &rt,
|
|
34
|
+
const UpdaterFunction updater,
|
|
35
|
+
const RequestFrameFunction requestFrame,
|
|
36
|
+
const ScrollToFunction scrollTo,
|
|
37
|
+
const MeasuringFunction measure,
|
|
38
|
+
const TimeProviderFunction getCurrentTime,
|
|
39
|
+
const SetGestureStateFunction setGestureState,
|
|
40
|
+
std::shared_ptr<LayoutAnimationsProxy> layoutAnimationsProxy);
|
|
41
|
+
|
|
38
42
|
/**
|
|
39
43
|
Returns true if the given Runtime is the Reanimated UI-Thread Runtime.
|
|
40
44
|
*/
|
|
41
45
|
inline static bool isUIRuntime(jsi::Runtime &rt);
|
|
42
46
|
/**
|
|
43
|
-
Returns true if the given Runtime is a Runtime that supports the concept of
|
|
47
|
+
Returns true if the given Runtime is a Runtime that supports the concept of
|
|
48
|
+
Workletization. (REA, Vision, ...)
|
|
44
49
|
*/
|
|
45
50
|
inline static bool isWorkletRuntime(jsi::Runtime &rt);
|
|
46
51
|
/**
|
|
@@ -48,31 +53,35 @@ public:
|
|
|
48
53
|
*/
|
|
49
54
|
inline static bool isReactRuntime(jsi::Runtime &rt);
|
|
50
55
|
/**
|
|
51
|
-
Register the given Runtime. This function is required for every
|
|
56
|
+
Register the given Runtime. This function is required for every
|
|
57
|
+
RuntimeManager, otherwise future runtime checks will fail.
|
|
52
58
|
*/
|
|
53
|
-
static void registerRuntime(jsi::Runtime*
|
|
59
|
+
static void registerRuntime(jsi::Runtime *runtime, RuntimeType runtimeType);
|
|
54
60
|
|
|
55
|
-
private:
|
|
56
|
-
static std::unordered_map<RuntimePointer, RuntimeType> runtimeRegistry;
|
|
61
|
+
private:
|
|
62
|
+
static std::unordered_map<RuntimePointer, RuntimeType> &runtimeRegistry();
|
|
57
63
|
};
|
|
58
64
|
|
|
59
|
-
inline bool RuntimeDecorator::isUIRuntime(jsi::Runtime&
|
|
60
|
-
auto iterator = runtimeRegistry.find(&rt);
|
|
61
|
-
if (iterator == runtimeRegistry.end())
|
|
65
|
+
inline bool RuntimeDecorator::isUIRuntime(jsi::Runtime &rt) {
|
|
66
|
+
auto iterator = runtimeRegistry().find(&rt);
|
|
67
|
+
if (iterator == runtimeRegistry().end())
|
|
68
|
+
return false;
|
|
62
69
|
return iterator->second == RuntimeType::UI;
|
|
63
70
|
}
|
|
64
71
|
|
|
65
|
-
inline bool RuntimeDecorator::isWorkletRuntime(jsi::Runtime&
|
|
66
|
-
auto iterator = runtimeRegistry.find(&rt);
|
|
67
|
-
if (iterator == runtimeRegistry.end())
|
|
72
|
+
inline bool RuntimeDecorator::isWorkletRuntime(jsi::Runtime &rt) {
|
|
73
|
+
auto iterator = runtimeRegistry().find(&rt);
|
|
74
|
+
if (iterator == runtimeRegistry().end())
|
|
75
|
+
return false;
|
|
68
76
|
auto type = iterator->second;
|
|
69
77
|
return type == RuntimeType::UI || type == RuntimeType::Worklet;
|
|
70
78
|
}
|
|
71
79
|
|
|
72
|
-
inline bool RuntimeDecorator::isReactRuntime(jsi::Runtime&
|
|
73
|
-
auto iterator = runtimeRegistry.find(&rt);
|
|
74
|
-
if (iterator == runtimeRegistry.end())
|
|
80
|
+
inline bool RuntimeDecorator::isReactRuntime(jsi::Runtime &rt) {
|
|
81
|
+
auto iterator = runtimeRegistry().find(&rt);
|
|
82
|
+
if (iterator == runtimeRegistry().end())
|
|
83
|
+
return true;
|
|
75
84
|
return false;
|
|
76
85
|
}
|
|
77
86
|
|
|
78
|
-
}
|
|
87
|
+
} // namespace reanimated
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
#pragma once
|
|
2
2
|
|
|
3
|
-
#include <
|
|
4
|
-
#include <thread>
|
|
5
|
-
#include <mutex>
|
|
3
|
+
#include <ReactCommon/CallInvoker.h>
|
|
6
4
|
#include <condition_variable>
|
|
7
5
|
#include <functional>
|
|
8
|
-
#include <
|
|
6
|
+
#include <memory>
|
|
7
|
+
#include <mutex>
|
|
8
|
+
#include <queue>
|
|
9
|
+
#include <thread>
|
|
10
|
+
#include <utility>
|
|
9
11
|
|
|
10
|
-
namespace reanimated
|
|
11
|
-
{
|
|
12
|
+
namespace reanimated {
|
|
12
13
|
|
|
13
14
|
//
|
|
14
15
|
// Copyright (c) 2013 Juan Palacios juan.palacios.puyana@gmail.com
|
|
@@ -16,15 +17,11 @@ namespace reanimated
|
|
|
16
17
|
// - see < http://opensource.org/licenses/BSD-2-Clause>
|
|
17
18
|
//
|
|
18
19
|
template <typename T>
|
|
19
|
-
class Queue
|
|
20
|
-
{
|
|
20
|
+
class Queue {
|
|
21
21
|
public:
|
|
22
|
-
|
|
23
|
-
T pop()
|
|
24
|
-
{
|
|
22
|
+
T pop() {
|
|
25
23
|
std::unique_lock<std::mutex> mlock(mutex_);
|
|
26
|
-
while (queue_.empty())
|
|
27
|
-
{
|
|
24
|
+
while (queue_.empty()) {
|
|
28
25
|
cond_.wait(mlock);
|
|
29
26
|
}
|
|
30
27
|
auto item = queue_.front();
|
|
@@ -32,27 +29,23 @@ class Queue
|
|
|
32
29
|
return item;
|
|
33
30
|
}
|
|
34
31
|
|
|
35
|
-
void pop(T&
|
|
36
|
-
{
|
|
32
|
+
void pop(T &item) {
|
|
37
33
|
std::unique_lock<std::mutex> mlock(mutex_);
|
|
38
|
-
while (queue_.empty())
|
|
39
|
-
{
|
|
34
|
+
while (queue_.empty()) {
|
|
40
35
|
cond_.wait(mlock);
|
|
41
36
|
}
|
|
42
37
|
item = queue_.front();
|
|
43
38
|
queue_.pop();
|
|
44
39
|
}
|
|
45
40
|
|
|
46
|
-
void push(const T&
|
|
47
|
-
{
|
|
41
|
+
void push(const T &item) {
|
|
48
42
|
std::unique_lock<std::mutex> mlock(mutex_);
|
|
49
43
|
queue_.push(item);
|
|
50
44
|
mlock.unlock();
|
|
51
45
|
cond_.notify_one();
|
|
52
46
|
}
|
|
53
47
|
|
|
54
|
-
void push(T&&
|
|
55
|
-
{
|
|
48
|
+
void push(T &&item) {
|
|
56
49
|
std::unique_lock<std::mutex> mlock(mutex_);
|
|
57
50
|
queue_.push(std::move(item));
|
|
58
51
|
mlock.unlock();
|
|
@@ -76,19 +69,21 @@ class Queue
|
|
|
76
69
|
class RuntimeManager;
|
|
77
70
|
|
|
78
71
|
class Scheduler {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
72
|
+
public:
|
|
73
|
+
Scheduler();
|
|
74
|
+
void scheduleOnJS(std::function<void()> job);
|
|
75
|
+
void setJSCallInvoker(
|
|
76
|
+
std::shared_ptr<facebook::react::CallInvoker> jsCallInvoker);
|
|
77
|
+
void setRuntimeManager(std::shared_ptr<RuntimeManager> runtimeManager);
|
|
78
|
+
virtual void scheduleOnUI(std::function<void()> job);
|
|
79
|
+
virtual void triggerUI();
|
|
80
|
+
virtual ~Scheduler();
|
|
81
|
+
|
|
82
|
+
protected:
|
|
83
|
+
std::atomic<bool> scheduledOnUI{};
|
|
84
|
+
Queue<std::function<void()>> uiJobs;
|
|
85
|
+
std::shared_ptr<facebook::react::CallInvoker> jsCallInvoker_;
|
|
86
|
+
std::weak_ptr<RuntimeManager> runtimeManager;
|
|
92
87
|
};
|
|
93
88
|
|
|
94
|
-
}
|
|
89
|
+
} // namespace reanimated
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
#pragma once
|
|
2
2
|
|
|
3
|
-
#include <string>
|
|
4
3
|
#include <jsi/jsi.h>
|
|
4
|
+
#include <string>
|
|
5
|
+
#include <utility>
|
|
5
6
|
|
|
6
7
|
using namespace facebook;
|
|
7
8
|
|
|
@@ -12,16 +13,18 @@ class EventHandlerRegistry;
|
|
|
12
13
|
class WorkletEventHandler {
|
|
13
14
|
friend EventHandlerRegistry;
|
|
14
15
|
|
|
15
|
-
private:
|
|
16
|
+
private:
|
|
16
17
|
unsigned long id;
|
|
17
18
|
std::string eventName;
|
|
18
19
|
jsi::Function handler;
|
|
19
20
|
|
|
20
|
-
public:
|
|
21
|
-
WorkletEventHandler(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
public:
|
|
22
|
+
WorkletEventHandler(
|
|
23
|
+
unsigned long id,
|
|
24
|
+
std::string eventName,
|
|
25
|
+
jsi::Function &&handler)
|
|
26
|
+
: id(id), eventName(eventName), handler(std::move(handler)) {}
|
|
27
|
+
void process(jsi::Runtime &rt, const jsi::Value &eventValue);
|
|
25
28
|
};
|
|
26
29
|
|
|
27
|
-
}
|
|
30
|
+
} // namespace reanimated
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
#pragma once
|
|
2
2
|
|
|
3
|
-
#include "./LoggerInterface.h"
|
|
4
3
|
#include <memory>
|
|
4
|
+
#include "./LoggerInterface.h"
|
|
5
5
|
|
|
6
|
-
namespace reanimated
|
|
7
|
-
{
|
|
6
|
+
namespace reanimated {
|
|
8
7
|
|
|
9
8
|
class Logger {
|
|
10
|
-
|
|
11
|
-
template<typename T>
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
9
|
+
public:
|
|
10
|
+
template <typename T>
|
|
11
|
+
static void log(T value) {
|
|
12
|
+
if (instance == nullptr) {
|
|
13
|
+
throw std::runtime_error("no logger specified");
|
|
14
|
+
}
|
|
15
|
+
instance->log(value);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
private:
|
|
19
|
+
static std::unique_ptr<LoggerInterface> instance;
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
}
|
|
22
|
+
} // namespace reanimated
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
#pragma once
|
|
2
2
|
|
|
3
|
-
namespace reanimated
|
|
4
|
-
{
|
|
3
|
+
namespace reanimated {
|
|
5
4
|
|
|
6
5
|
class LoggerInterface {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
public:
|
|
7
|
+
virtual void log(const char *str) = 0;
|
|
8
|
+
virtual void log(double d) = 0;
|
|
9
|
+
virtual void log(int i) = 0;
|
|
10
|
+
virtual void log(bool b) = 0;
|
|
11
|
+
virtual ~LoggerInterface() {}
|
|
13
12
|
};
|
|
14
13
|
|
|
15
|
-
}
|
|
14
|
+
} // namespace reanimated
|
|
@@ -2,17 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
#define CHECK_SPEED 1
|
|
4
4
|
|
|
5
|
-
#include
|
|
6
|
-
#include <memory>
|
|
5
|
+
#include <chrono>
|
|
7
6
|
#include <functional>
|
|
7
|
+
#include <memory>
|
|
8
8
|
#include <string>
|
|
9
|
-
#include
|
|
9
|
+
#include "./Logger.h"
|
|
10
10
|
|
|
11
|
-
namespace reanimated
|
|
12
|
-
{
|
|
11
|
+
namespace reanimated {
|
|
13
12
|
|
|
14
13
|
class SpeedChecker {
|
|
15
|
-
public:
|
|
14
|
+
public:
|
|
16
15
|
static void checkSpeed(std::string tag, std::function<void()> fun) {
|
|
17
16
|
#if CHECK_SPEED
|
|
18
17
|
auto start = std::chrono::system_clock::now();
|
|
@@ -20,11 +19,11 @@ public:
|
|
|
20
19
|
fun();
|
|
21
20
|
#if CHECK_SPEED
|
|
22
21
|
auto end = std::chrono::system_clock::now();
|
|
23
|
-
std::chrono::duration<double> elapsed_seconds = end-start;
|
|
22
|
+
std::chrono::duration<double> elapsed_seconds = end - start;
|
|
24
23
|
tag += " " + std::to_string(elapsed_seconds.count()) + "s";
|
|
25
24
|
Logger::log(tag.c_str());
|
|
26
25
|
#endif
|
|
27
26
|
}
|
|
28
27
|
};
|
|
29
28
|
|
|
30
|
-
}
|
|
29
|
+
} // namespace reanimated
|
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ comes to gesture based interactions.
|
|
|
11
11
|
|
|
12
12
|
## Installation
|
|
13
13
|
|
|
14
|
-
Check out [installation](https://docs.swmansion.com/react-native-reanimated/docs/installation) section of our docs for the detailed installation instructions.
|
|
14
|
+
Check out [installation](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/installation) section of our docs for the detailed installation instructions.
|
|
15
15
|
|
|
16
16
|
## Documentation
|
|
17
17
|
|
package/RNReanimated.podspec
CHANGED
|
@@ -5,9 +5,28 @@ package = JSON.parse(File.read(File.join(__dir__, "package.json")))
|
|
|
5
5
|
reactVersion = '0.0.0'
|
|
6
6
|
|
|
7
7
|
begin
|
|
8
|
-
|
|
8
|
+
# standard app
|
|
9
|
+
# /appName/node_modules/react-native-reanimated/RNReanimated.podspec
|
|
10
|
+
# /appName/node_modules/react-native/package.json
|
|
11
|
+
reactVersion = JSON.parse(File.read(File.join(__dir__, "..", "..", "node_modules", "react-native", "package.json")))["version"]
|
|
9
12
|
rescue
|
|
10
|
-
|
|
13
|
+
begin
|
|
14
|
+
# monorepo
|
|
15
|
+
# /monorepo/packages/appName/node_modules/react-native-reanimated/RNReanimated.podspec
|
|
16
|
+
# /monorepo/node_modules/react-native/package.json
|
|
17
|
+
reactVersion = JSON.parse(File.read(File.join(__dir__, "..", "..", "..", "..", "node_modules", "react-native", "package.json")))["version"]
|
|
18
|
+
rescue
|
|
19
|
+
begin
|
|
20
|
+
# Example app in reanimated repo
|
|
21
|
+
# /react-native-reanimated/RNReanimated.podspec
|
|
22
|
+
# /react-native-reanimated/node_modules/react-native/package.json
|
|
23
|
+
reactVersion = JSON.parse(File.read(File.join(__dir__, "node_modules", "react-native", "package.json")))["version"]
|
|
24
|
+
rescue
|
|
25
|
+
# should never happen
|
|
26
|
+
reactVersion = '0.66.0'
|
|
27
|
+
puts "[RNReanimated] Unable to recognized your `react-native` version! Default `react-native` version: " + reactVersion
|
|
28
|
+
end
|
|
29
|
+
end
|
|
11
30
|
end
|
|
12
31
|
|
|
13
32
|
rnVersion = reactVersion.split('.')[1]
|
|
@@ -20,7 +39,7 @@ end
|
|
|
20
39
|
|
|
21
40
|
folly_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DRNVERSION=' + rnVersion
|
|
22
41
|
folly_compiler_flags = folly_flags + ' ' + '-Wno-comma -Wno-shorten-64-to-32'
|
|
23
|
-
folly_version = '
|
|
42
|
+
folly_version = '2021.04.26.00'
|
|
24
43
|
boost_compiler_flags = '-Wno-documentation'
|
|
25
44
|
|
|
26
45
|
Pod::Spec.new do |s|
|
|
@@ -49,12 +68,12 @@ Pod::Spec.new do |s|
|
|
|
49
68
|
|
|
50
69
|
s.pod_target_xcconfig = {
|
|
51
70
|
"USE_HEADERMAP" => "YES",
|
|
52
|
-
"HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_TARGET_SRCROOT)\" \"$(PODS_ROOT)/#{folly_prefix}Folly\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/Headers/Private/React-Core\" "
|
|
71
|
+
"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\" "
|
|
53
72
|
}
|
|
54
73
|
s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
|
|
55
74
|
s.xcconfig = {
|
|
56
75
|
"CLANG_CXX_LANGUAGE_STANDARD" => "c++14",
|
|
57
|
-
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/glog\" \"$(PODS_ROOT)/#{folly_prefix}Folly\" \"${PODS_ROOT}/Headers/Public/React-hermes\" \"${PODS_ROOT}/Headers/Public/hermes-engine\"",
|
|
76
|
+
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/glog\" \"$(PODS_ROOT)/#{folly_prefix}Folly\" \"${PODS_ROOT}/Headers/Public/React-hermes\" \"${PODS_ROOT}/Headers/Public/hermes-engine\"",
|
|
58
77
|
"OTHER_CFLAGS" => "$(inherited)" + " " + folly_flags }
|
|
59
78
|
|
|
60
79
|
s.requires_arc = true
|
|
@@ -74,7 +93,6 @@ Pod::Spec.new do |s|
|
|
|
74
93
|
s.dependency 'React-RCTBlob'
|
|
75
94
|
s.dependency 'React-RCTSettings'
|
|
76
95
|
s.dependency 'React-RCTText'
|
|
77
|
-
s.dependency 'React-RCTVibration'
|
|
78
96
|
s.dependency 'React-RCTImage'
|
|
79
97
|
s.dependency 'React-Core/RCTWebSocket'
|
|
80
98
|
s.dependency 'React-cxxreact'
|
package/android/build.gradle
CHANGED
|
@@ -13,21 +13,15 @@ def engine = "jsc"
|
|
|
13
13
|
abstract class replaceSoTask extends DefaultTask {
|
|
14
14
|
public static String appName = ":app"
|
|
15
15
|
public static String buildDir = "../../../android/app/build"
|
|
16
|
-
public static String engine = "jsc"
|
|
17
|
-
public static String reactVersion = "64"
|
|
18
16
|
|
|
19
17
|
@TaskAction
|
|
20
18
|
def run() {
|
|
21
|
-
ant.unzip(
|
|
22
|
-
src: "./react-native-reanimated-${reactVersion}-${engine}.aar",
|
|
23
|
-
dest: "./tmp"
|
|
24
|
-
)
|
|
25
19
|
for(def abiVersion in ["x86", "x86_64", "armeabi-v7a", "arm64-v8a"]) {
|
|
26
20
|
ant.sequential {
|
|
27
21
|
copy(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
22
|
+
tofile: "${buildDir}/intermediates/merged_native_libs/debug/out/lib/${abiVersion}/libfbjni.so",
|
|
23
|
+
file: "../libSo/fbjni/jni/${abiVersion}/libfbjni.so",
|
|
24
|
+
overwrite: true
|
|
31
25
|
)
|
|
32
26
|
}
|
|
33
27
|
}
|
|
@@ -37,20 +31,14 @@ abstract class replaceSoTask extends DefaultTask {
|
|
|
37
31
|
def getCurrentFlavor() {
|
|
38
32
|
Gradle gradle = getGradle()
|
|
39
33
|
String taskRequestName = gradle.getStartParameter().getTaskRequests().toString()
|
|
40
|
-
Pattern pattern
|
|
41
|
-
|
|
42
|
-
if(taskRequestName.contains("assemble")) {
|
|
43
|
-
pattern = Pattern.compile("assemble(\\w+)(Release|Debug)")
|
|
44
|
-
}
|
|
45
|
-
else {
|
|
46
|
-
pattern = Pattern.compile("generate(\\w+)(Release|Debug)")
|
|
47
|
-
}
|
|
34
|
+
Pattern pattern = Pattern.compile("(assemble|bundle|install|generate)(\\w*)(Release|Debug)")
|
|
48
35
|
Matcher matcher = pattern.matcher(taskRequestName)
|
|
49
36
|
|
|
50
37
|
if(matcher.find()) {
|
|
51
|
-
return matcher.group(
|
|
38
|
+
return matcher.group(2)
|
|
52
39
|
}
|
|
53
|
-
|
|
40
|
+
|
|
41
|
+
return "NOT-FOUND"
|
|
54
42
|
}
|
|
55
43
|
|
|
56
44
|
def replaceSoTaskDebug
|
|
@@ -70,26 +58,24 @@ rootProject.getSubprojects().forEach({project ->
|
|
|
70
58
|
|
|
71
59
|
if(project.getProperties().get("android") && Integer.parseInt(minor) < 65) {
|
|
72
60
|
def projectProperties = project.getProperties()
|
|
73
|
-
|
|
74
|
-
|
|
61
|
+
final NOTFOUND = "NOT-FOUND"
|
|
62
|
+
if(!NOTFOUND.equals(getCurrentFlavor()) && (!projectProperties.get("reanimated")
|
|
63
|
+
|| (projectProperties.get("reanimated") && projectProperties.get("reanimated").get("enablePackagingOptions")))
|
|
75
64
|
) {
|
|
76
65
|
def flavorString = getCurrentFlavor()
|
|
77
66
|
replaceSoTask.appName = project.getProperties().path
|
|
78
67
|
replaceSoTask.buildDir = project.getProperties().buildDir
|
|
79
|
-
replaceSoTask.engine = engine
|
|
80
|
-
replaceSoTask.reactVersion = minor
|
|
81
68
|
def appName = project.getProperties().path
|
|
82
|
-
project.getProperties().android.packagingOptions.pickFirst("lib/**/libfbjni.so")
|
|
83
69
|
|
|
84
70
|
replaceSoTaskDebug.dependsOn(
|
|
85
|
-
|
|
86
|
-
|
|
71
|
+
project.getTasks().getByPath("${appName}:merge${flavorString}DebugNativeLibs"),
|
|
72
|
+
project.getTasks().getByPath("${appName}:strip${flavorString}DebugDebugSymbols")
|
|
87
73
|
)
|
|
88
74
|
project.getTasks().getByPath("${appName}:package${flavorString}Debug").dependsOn(replaceSoTaskDebug)
|
|
89
75
|
|
|
90
76
|
replaceSoTaskRelease.dependsOn(
|
|
91
|
-
|
|
92
|
-
|
|
77
|
+
project.getTasks().getByPath("${appName}:merge${flavorString}ReleaseNativeLibs"),
|
|
78
|
+
project.getTasks().getByPath("${appName}:strip${flavorString}ReleaseDebugSymbols")
|
|
93
79
|
)
|
|
94
80
|
project.getTasks().getByPath("${appName}:package${flavorString}Release").dependsOn(replaceSoTaskRelease)
|
|
95
81
|
}
|
|
@@ -97,4 +83,27 @@ rootProject.getSubprojects().forEach({project ->
|
|
|
97
83
|
}
|
|
98
84
|
})
|
|
99
85
|
|
|
100
|
-
|
|
86
|
+
def minorCopy = Integer.parseInt(minor)
|
|
87
|
+
def aar = file("react-native-reanimated-${minorCopy}-${engine}.aar")
|
|
88
|
+
|
|
89
|
+
while (!aar.exists()) {
|
|
90
|
+
minorCopy -= 1
|
|
91
|
+
aar = file("react-native-reanimated-${minorCopy}-${engine}.aar")
|
|
92
|
+
if (minorCopy < 63) {
|
|
93
|
+
throw new GradleException('No aar for react-native-reanimated found.')
|
|
94
|
+
}
|
|
95
|
+
if (aar.exists()) {
|
|
96
|
+
println "\n\n\n"
|
|
97
|
+
println "****************************************************************************************"
|
|
98
|
+
println "\n\n\n"
|
|
99
|
+
println "WARNING reanimated - no version-specific reanimated AAR for react-native version " . minor . " found."
|
|
100
|
+
println "Falling back to AAR for react-native version " . minorCopy
|
|
101
|
+
println "The react-native JSI interface is not ABI-safe yet, this may result in crashes."
|
|
102
|
+
println "Please post a pull request to implement support for react-native version " . minor . " to the reanimated repo."
|
|
103
|
+
println "Thanks!"
|
|
104
|
+
println "\n\n\n"
|
|
105
|
+
println "****************************************************************************************"
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
artifacts.add("default", aar)
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -14,16 +14,18 @@ typedef NS_ENUM(NSInteger, ViewState) {
|
|
|
14
14
|
|
|
15
15
|
@interface REAAnimationsManager : NSObject
|
|
16
16
|
|
|
17
|
-
- (instancetype)initWithUIManager:(RCTUIManager*)uiManager;
|
|
17
|
+
- (instancetype)initWithUIManager:(RCTUIManager *)uiManager;
|
|
18
18
|
- (void)setRemovingConfigBlock:(void (^)(NSNumber *tag))block;
|
|
19
|
-
- (void)setAnimationStartingBlock:
|
|
20
|
-
|
|
21
|
-
- (void)
|
|
19
|
+
- (void)setAnimationStartingBlock:
|
|
20
|
+
(void (^)(NSNumber *tag, NSString *type, NSDictionary *target, NSNumber *depth))startAnimation;
|
|
21
|
+
- (void)notifyAboutProgress:(NSDictionary *)newStyle tag:(NSNumber *)tag;
|
|
22
|
+
- (void)notifyAboutEnd:(NSNumber *)tag cancelled:(BOOL)cancelled;
|
|
22
23
|
- (void)invalidate;
|
|
23
|
-
- (void)
|
|
24
|
-
- (void)
|
|
25
|
-
- (void)
|
|
26
|
-
- (void)
|
|
24
|
+
- (void)onViewRemoval:(UIView *)view before:(REASnapshot *)before;
|
|
25
|
+
- (void)onViewCreate:(UIView *)view after:(REASnapshot *)after;
|
|
26
|
+
- (void)onViewUpdate:(UIView *)view before:(REASnapshot *)before after:(REASnapshot *)after;
|
|
27
|
+
- (void)setToBeRemovedRegistry:(NSMutableDictionary<NSNumber *, NSMutableSet<id<RCTComponent>> *> *)toBeRemovedRegister;
|
|
28
|
+
- (void)removeLeftovers;
|
|
27
29
|
|
|
28
30
|
@end
|
|
29
31
|
|