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,20 +1,28 @@
|
|
|
1
1
|
#include "JSIStoreValueUser.h"
|
|
2
2
|
#include "RuntimeManager.h"
|
|
3
|
+
#ifdef ONANDROID
|
|
4
|
+
#include <AndroidScheduler.h>
|
|
5
|
+
#endif
|
|
3
6
|
|
|
4
7
|
namespace reanimated {
|
|
5
8
|
|
|
6
9
|
std::weak_ptr<jsi::Value> StoreUser::getWeakRef(jsi::Runtime &rt) {
|
|
7
10
|
const std::lock_guard<std::recursive_mutex> lock(storeUserData->storeMutex);
|
|
8
11
|
if (storeUserData->store.count(identifier) == 0) {
|
|
9
|
-
storeUserData->store[identifier] =
|
|
12
|
+
storeUserData->store[identifier] =
|
|
13
|
+
std::vector<std::shared_ptr<jsi::Value>>();
|
|
10
14
|
}
|
|
11
|
-
std::shared_ptr<jsi::Value> sv =
|
|
15
|
+
std::shared_ptr<jsi::Value> sv =
|
|
16
|
+
std::make_shared<jsi::Value>(rt, jsi::Value::undefined());
|
|
12
17
|
storeUserData->store[identifier].push_back(sv);
|
|
13
|
-
|
|
18
|
+
|
|
14
19
|
return sv;
|
|
15
20
|
}
|
|
16
21
|
|
|
17
|
-
StoreUser::StoreUser(
|
|
22
|
+
StoreUser::StoreUser(
|
|
23
|
+
std::shared_ptr<Scheduler> s,
|
|
24
|
+
const RuntimeManager &runtimeManager)
|
|
25
|
+
: scheduler(s) {
|
|
18
26
|
storeUserData = runtimeManager.storeUserData;
|
|
19
27
|
identifier = storeUserData->ctr++;
|
|
20
28
|
}
|
|
@@ -24,13 +32,24 @@ StoreUser::~StoreUser() {
|
|
|
24
32
|
std::shared_ptr<Scheduler> strongScheduler = scheduler.lock();
|
|
25
33
|
if (strongScheduler != nullptr) {
|
|
26
34
|
std::shared_ptr<StaticStoreUser> sud = storeUserData;
|
|
35
|
+
#ifdef ONANDROID
|
|
36
|
+
jni::ThreadScope::WithClassLoader([&] {
|
|
37
|
+
strongScheduler->scheduleOnUI([id, sud]() {
|
|
38
|
+
const std::lock_guard<std::recursive_mutex> lock(sud->storeMutex);
|
|
39
|
+
if (sud->store.count(id) > 0) {
|
|
40
|
+
sud->store.erase(id);
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
#else
|
|
27
45
|
strongScheduler->scheduleOnUI([id, sud]() {
|
|
28
46
|
const std::lock_guard<std::recursive_mutex> lock(sud->storeMutex);
|
|
29
47
|
if (sud->store.count(id) > 0) {
|
|
30
|
-
|
|
48
|
+
sud->store.erase(id);
|
|
31
49
|
}
|
|
32
50
|
});
|
|
51
|
+
#endif
|
|
33
52
|
}
|
|
34
53
|
}
|
|
35
54
|
|
|
36
|
-
}
|
|
55
|
+
} // namespace reanimated
|
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
#include "Mapper.h"
|
|
2
|
-
#include "SharedParent.h"
|
|
3
2
|
#include "MutableValue.h"
|
|
3
|
+
#include "SharedParent.h"
|
|
4
4
|
|
|
5
5
|
namespace reanimated {
|
|
6
6
|
|
|
7
|
-
Mapper::Mapper(
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
module(module),
|
|
14
|
-
mapper(mapper),
|
|
15
|
-
inputs(inputs),
|
|
16
|
-
outputs(outputs)
|
|
17
|
-
{
|
|
7
|
+
Mapper::Mapper(
|
|
8
|
+
NativeReanimatedModule *module,
|
|
9
|
+
unsigned long id,
|
|
10
|
+
std::shared_ptr<jsi::Function> mapper,
|
|
11
|
+
std::vector<std::shared_ptr<MutableValue>> inputs,
|
|
12
|
+
std::vector<std::shared_ptr<MutableValue>> outputs)
|
|
13
|
+
: id(id), module(module), mapper(mapper), inputs(inputs), outputs(outputs) {
|
|
18
14
|
auto markDirty = [this, module]() {
|
|
19
15
|
this->dirty = true;
|
|
20
16
|
module->maybeRequestRender();
|
|
@@ -26,36 +22,40 @@ outputs(outputs)
|
|
|
26
22
|
|
|
27
23
|
void Mapper::execute(jsi::Runtime &rt) {
|
|
28
24
|
dirty = false;
|
|
29
|
-
if(optimalizationLvl == 0) {
|
|
25
|
+
if (optimalizationLvl == 0) {
|
|
30
26
|
mapper->callWithThis(rt, *mapper); // call styleUpdater
|
|
31
|
-
}
|
|
32
|
-
else {
|
|
27
|
+
} else {
|
|
33
28
|
jsi::Object newStyle = userUpdater->call(rt).asObject(rt);
|
|
34
29
|
auto jsViewDescriptorArray = viewDescriptors->getValue(rt)
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
for(int i = 0; i < jsViewDescriptorArray.length(rt); ++i) {
|
|
40
|
-
auto jsViewDescriptor =
|
|
41
|
-
|
|
30
|
+
.getObject(rt)
|
|
31
|
+
.getProperty(rt, "value")
|
|
32
|
+
.asObject(rt)
|
|
33
|
+
.getArray(rt);
|
|
34
|
+
for (int i = 0; i < jsViewDescriptorArray.length(rt); ++i) {
|
|
35
|
+
auto jsViewDescriptor =
|
|
36
|
+
jsViewDescriptorArray.getValueAtIndex(rt, i).getObject(rt);
|
|
37
|
+
(*updateProps)(
|
|
38
|
+
rt,
|
|
39
|
+
static_cast<int>(jsViewDescriptor.getProperty(rt, "tag").asNumber()),
|
|
40
|
+
jsViewDescriptor.getProperty(rt, "name"),
|
|
41
|
+
newStyle);
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
void Mapper::enableFastMode(
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
) {
|
|
51
|
-
if(optimalizationLvl == 0) {
|
|
47
|
+
const int optimalizationLvl,
|
|
48
|
+
const std::shared_ptr<ShareableValue> &updater,
|
|
49
|
+
const std::shared_ptr<ShareableValue> &jsViewDescriptors) {
|
|
50
|
+
if (optimalizationLvl == 0) {
|
|
52
51
|
return;
|
|
53
52
|
}
|
|
54
53
|
viewDescriptors = jsViewDescriptors;
|
|
55
54
|
this->optimalizationLvl = optimalizationLvl;
|
|
56
55
|
updateProps = &module->updaterFunction;
|
|
57
|
-
jsi::Runtime*
|
|
58
|
-
userUpdater = std::make_shared<jsi::Function>(
|
|
56
|
+
jsi::Runtime *rt = module->runtime.get();
|
|
57
|
+
userUpdater = std::make_shared<jsi::Function>(
|
|
58
|
+
updater->getValue(*rt).asObject(*rt).asFunction(*rt));
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
Mapper::~Mapper() {
|
|
@@ -64,4 +64,4 @@ Mapper::~Mapper() {
|
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
}
|
|
67
|
+
} // namespace reanimated
|
|
@@ -1,45 +1,57 @@
|
|
|
1
1
|
#include "RuntimeDecorator.h"
|
|
2
|
-
#include "ReanimatedHiddenHeaders.h"
|
|
3
|
-
#include <unordered_map>
|
|
4
2
|
#include <memory>
|
|
5
|
-
#include
|
|
3
|
+
#include <unordered_map>
|
|
6
4
|
#include "LayoutAnimationsProxy.h"
|
|
5
|
+
#include "MutableValue.h"
|
|
6
|
+
#include "ReanimatedHiddenHeaders.h"
|
|
7
7
|
|
|
8
8
|
namespace reanimated {
|
|
9
9
|
|
|
10
|
-
std::unordered_map<RuntimePointer, RuntimeType>
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
std::unordered_map<RuntimePointer, RuntimeType>
|
|
11
|
+
&RuntimeDecorator::runtimeRegistry() {
|
|
12
|
+
static std::unordered_map<RuntimePointer, RuntimeType> runtimeRegistry;
|
|
13
|
+
return runtimeRegistry;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
void RuntimeDecorator::registerRuntime(
|
|
17
|
+
jsi::Runtime *runtime,
|
|
18
|
+
RuntimeType runtimeType) {
|
|
19
|
+
runtimeRegistry().insert({runtime, runtimeType});
|
|
13
20
|
}
|
|
14
21
|
|
|
15
|
-
void RuntimeDecorator::decorateRuntime(
|
|
16
|
-
|
|
22
|
+
void RuntimeDecorator::decorateRuntime(
|
|
23
|
+
jsi::Runtime &rt,
|
|
24
|
+
const std::string &label) {
|
|
25
|
+
// This property will be used to find out if a runtime is a custom worklet
|
|
26
|
+
// runtime (e.g. UI, VisionCamera frame processor, ...)
|
|
17
27
|
rt.global().setProperty(rt, "_WORKLET", jsi::Value(true));
|
|
18
28
|
// This property will be used for debugging
|
|
19
|
-
rt.global().setProperty(
|
|
29
|
+
rt.global().setProperty(
|
|
30
|
+
rt, "_LABEL", jsi::String::createFromAscii(rt, label));
|
|
20
31
|
|
|
21
32
|
jsi::Object dummyGlobal(rt);
|
|
22
|
-
auto dummyFunction = [](
|
|
23
|
-
jsi::Runtime &rt,
|
|
33
|
+
auto dummyFunction = [](jsi::Runtime &rt,
|
|
24
34
|
const jsi::Value &thisValue,
|
|
25
35
|
const jsi::Value *args,
|
|
26
|
-
size_t count
|
|
27
|
-
) -> jsi::Value {
|
|
36
|
+
size_t count) -> jsi::Value {
|
|
28
37
|
return jsi::Value::undefined();
|
|
29
38
|
};
|
|
30
|
-
jsi::Function __reanimatedWorkletInit = jsi::Function::createFromHostFunction(
|
|
31
|
-
|
|
32
|
-
|
|
39
|
+
jsi::Function __reanimatedWorkletInit = jsi::Function::createFromHostFunction(
|
|
40
|
+
rt,
|
|
41
|
+
jsi::PropNameID::forAscii(rt, "__reanimatedWorkletInit"),
|
|
42
|
+
1,
|
|
43
|
+
dummyFunction);
|
|
44
|
+
|
|
45
|
+
dummyGlobal.setProperty(
|
|
46
|
+
rt, "__reanimatedWorkletInit", __reanimatedWorkletInit);
|
|
33
47
|
rt.global().setProperty(rt, "global", dummyGlobal);
|
|
34
48
|
|
|
35
49
|
rt.global().setProperty(rt, "jsThis", jsi::Value::undefined());
|
|
36
50
|
|
|
37
|
-
auto callback = [](
|
|
38
|
-
jsi::Runtime &rt,
|
|
51
|
+
auto callback = [](jsi::Runtime &rt,
|
|
39
52
|
const jsi::Value &thisValue,
|
|
40
53
|
const jsi::Value *args,
|
|
41
|
-
size_t count
|
|
42
|
-
) -> jsi::Value {
|
|
54
|
+
size_t count) -> jsi::Value {
|
|
43
55
|
const jsi::Value *value = &args[0];
|
|
44
56
|
if (value->isString()) {
|
|
45
57
|
Logger::log(value->getString(rt).utf8(rt).c_str());
|
|
@@ -52,133 +64,144 @@ void RuntimeDecorator::decorateRuntime(jsi::Runtime &rt, const std::string &labe
|
|
|
52
64
|
}
|
|
53
65
|
return jsi::Value::undefined();
|
|
54
66
|
};
|
|
55
|
-
jsi::Value log = jsi::Function::createFromHostFunction(
|
|
67
|
+
jsi::Value log = jsi::Function::createFromHostFunction(
|
|
68
|
+
rt, jsi::PropNameID::forAscii(rt, "_log"), 1, callback);
|
|
56
69
|
rt.global().setProperty(rt, "_log", log);
|
|
57
70
|
|
|
58
|
-
auto setGlobalConsole = [](
|
|
59
|
-
jsi::Runtime &rt,
|
|
71
|
+
auto setGlobalConsole = [](jsi::Runtime &rt,
|
|
60
72
|
const jsi::Value &thisValue,
|
|
61
73
|
const jsi::Value *args,
|
|
62
|
-
size_t count
|
|
63
|
-
) -> jsi::Value {
|
|
74
|
+
size_t count) -> jsi::Value {
|
|
64
75
|
rt.global().setProperty(rt, "console", args[0]);
|
|
65
76
|
return jsi::Value::undefined();
|
|
66
77
|
};
|
|
67
|
-
rt.global().setProperty(
|
|
78
|
+
rt.global().setProperty(
|
|
79
|
+
rt,
|
|
80
|
+
"_setGlobalConsole",
|
|
81
|
+
jsi::Function::createFromHostFunction(
|
|
82
|
+
rt,
|
|
83
|
+
jsi::PropNameID::forAscii(rt, "_setGlobalConsole"),
|
|
84
|
+
1,
|
|
85
|
+
setGlobalConsole));
|
|
68
86
|
}
|
|
69
87
|
|
|
70
|
-
void RuntimeDecorator::decorateUIRuntime(
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
88
|
+
void RuntimeDecorator::decorateUIRuntime(
|
|
89
|
+
jsi::Runtime &rt,
|
|
90
|
+
const UpdaterFunction updater,
|
|
91
|
+
const RequestFrameFunction requestFrame,
|
|
92
|
+
const ScrollToFunction scrollTo,
|
|
93
|
+
const MeasuringFunction measure,
|
|
94
|
+
const TimeProviderFunction getCurrentTime,
|
|
95
|
+
const SetGestureStateFunction setGestureState,
|
|
96
|
+
std::shared_ptr<LayoutAnimationsProxy> layoutAnimationsProxy) {
|
|
77
97
|
RuntimeDecorator::decorateRuntime(rt, "UI");
|
|
78
98
|
rt.global().setProperty(rt, "_UI", jsi::Value(true));
|
|
79
99
|
|
|
80
100
|
auto clb = [updater](
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
) -> jsi::Value {
|
|
101
|
+
jsi::Runtime &rt,
|
|
102
|
+
const jsi::Value &thisValue,
|
|
103
|
+
const jsi::Value *args,
|
|
104
|
+
const size_t count) -> jsi::Value {
|
|
86
105
|
const auto viewTag = args[0].asNumber();
|
|
87
|
-
const jsi::Value*
|
|
106
|
+
const jsi::Value *viewName = &args[1];
|
|
88
107
|
const auto params = args[2].asObject(rt);
|
|
89
108
|
updater(rt, viewTag, *viewName, params);
|
|
90
109
|
return jsi::Value::undefined();
|
|
91
110
|
};
|
|
92
|
-
jsi::Value updateProps = jsi::Function::createFromHostFunction(
|
|
111
|
+
jsi::Value updateProps = jsi::Function::createFromHostFunction(
|
|
112
|
+
rt, jsi::PropNameID::forAscii(rt, "_updateProps"), 2, clb);
|
|
93
113
|
rt.global().setProperty(rt, "_updateProps", updateProps);
|
|
94
114
|
|
|
95
|
-
|
|
96
115
|
auto clb2 = [requestFrame](
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
116
|
+
jsi::Runtime &rt,
|
|
117
|
+
const jsi::Value &thisValue,
|
|
118
|
+
const jsi::Value *args,
|
|
119
|
+
const size_t count) -> jsi::Value {
|
|
120
|
+
auto fun =
|
|
121
|
+
std::make_shared<jsi::Function>(args[0].asObject(rt).asFunction(rt));
|
|
103
122
|
requestFrame([&rt, fun](double timestampMs) {
|
|
104
123
|
fun->call(rt, jsi::Value(timestampMs));
|
|
105
124
|
});
|
|
106
125
|
return jsi::Value::undefined();
|
|
107
126
|
};
|
|
108
|
-
jsi::Value requestAnimationFrame = jsi::Function::createFromHostFunction(
|
|
127
|
+
jsi::Value requestAnimationFrame = jsi::Function::createFromHostFunction(
|
|
128
|
+
rt, jsi::PropNameID::forAscii(rt, "requestAnimationFrame"), 1, clb2);
|
|
109
129
|
rt.global().setProperty(rt, "requestAnimationFrame", requestAnimationFrame);
|
|
110
130
|
|
|
111
131
|
auto clb3 = [scrollTo](
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
int viewTag = (int)args[0].asNumber();
|
|
132
|
+
jsi::Runtime &rt,
|
|
133
|
+
const jsi::Value &thisValue,
|
|
134
|
+
const jsi::Value *args,
|
|
135
|
+
const size_t count) -> jsi::Value {
|
|
136
|
+
int viewTag = static_cast<int>(args[0].asNumber());
|
|
118
137
|
double x = args[1].asNumber();
|
|
119
138
|
double y = args[2].asNumber();
|
|
120
139
|
bool animated = args[3].getBool();
|
|
121
140
|
scrollTo(viewTag, x, y, animated);
|
|
122
141
|
return jsi::Value::undefined();
|
|
123
142
|
};
|
|
124
|
-
jsi::Value scrollToFunction = jsi::Function::createFromHostFunction(
|
|
143
|
+
jsi::Value scrollToFunction = jsi::Function::createFromHostFunction(
|
|
144
|
+
rt, jsi::PropNameID::forAscii(rt, "_scrollTo"), 4, clb3);
|
|
125
145
|
rt.global().setProperty(rt, "_scrollTo", scrollToFunction);
|
|
126
146
|
|
|
127
147
|
auto clb4 = [measure](
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
int viewTag = (int)args[0].asNumber();
|
|
148
|
+
jsi::Runtime &rt,
|
|
149
|
+
const jsi::Value &thisValue,
|
|
150
|
+
const jsi::Value *args,
|
|
151
|
+
const size_t count) -> jsi::Value {
|
|
152
|
+
int viewTag = static_cast<int>(args[0].asNumber());
|
|
134
153
|
auto result = measure(viewTag);
|
|
135
154
|
jsi::Object resultObject(rt);
|
|
136
|
-
for (auto &i:result) {
|
|
155
|
+
for (auto &i : result) {
|
|
137
156
|
resultObject.setProperty(rt, i.first.c_str(), i.second);
|
|
138
157
|
}
|
|
139
158
|
return resultObject;
|
|
140
159
|
};
|
|
141
|
-
jsi::Value measureFunction = jsi::Function::createFromHostFunction(
|
|
160
|
+
jsi::Value measureFunction = jsi::Function::createFromHostFunction(
|
|
161
|
+
rt, jsi::PropNameID::forAscii(rt, "_measure"), 1, clb4);
|
|
142
162
|
rt.global().setProperty(rt, "_measure", measureFunction);
|
|
143
163
|
|
|
144
164
|
auto clb6 = [getCurrentTime](
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
) -> jsi::Value {
|
|
165
|
+
jsi::Runtime &rt,
|
|
166
|
+
const jsi::Value &thisValue,
|
|
167
|
+
const jsi::Value *args,
|
|
168
|
+
const size_t count) -> jsi::Value {
|
|
150
169
|
return getCurrentTime();
|
|
151
170
|
};
|
|
152
|
-
jsi::Value timeFun = jsi::Function::createFromHostFunction(
|
|
171
|
+
jsi::Value timeFun = jsi::Function::createFromHostFunction(
|
|
172
|
+
rt, jsi::PropNameID::forAscii(rt, "_getCurrentTime"), 0, clb6);
|
|
153
173
|
rt.global().setProperty(rt, "_getCurrentTime", timeFun);
|
|
154
174
|
|
|
155
175
|
rt.global().setProperty(rt, "_frameTimestamp", jsi::Value::undefined());
|
|
156
176
|
rt.global().setProperty(rt, "_eventTimestamp", jsi::Value::undefined());
|
|
157
|
-
|
|
177
|
+
|
|
158
178
|
// layout animation
|
|
159
179
|
std::weak_ptr<LayoutAnimationsProxy> layoutProxy = layoutAnimationsProxy;
|
|
160
180
|
auto clb7 = [layoutProxy](
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
) -> jsi::Value {
|
|
181
|
+
jsi::Runtime &rt,
|
|
182
|
+
const jsi::Value &thisValue,
|
|
183
|
+
const jsi::Value *args,
|
|
184
|
+
size_t count) -> jsi::Value {
|
|
166
185
|
std::shared_ptr<LayoutAnimationsProxy> proxy = layoutProxy.lock();
|
|
167
186
|
if (layoutProxy.expired()) {
|
|
168
187
|
return jsi::Value::undefined();
|
|
169
188
|
}
|
|
170
|
-
proxy->startObserving(
|
|
189
|
+
proxy->startObserving(
|
|
190
|
+
args[0].asNumber(),
|
|
191
|
+
args[1].asObject(rt).getHostObject<MutableValue>(rt),
|
|
192
|
+
rt);
|
|
171
193
|
return jsi::Value::undefined();
|
|
172
194
|
};
|
|
173
|
-
jsi::Value _startObservingProgress = jsi::Function::createFromHostFunction(
|
|
174
|
-
|
|
175
|
-
|
|
195
|
+
jsi::Value _startObservingProgress = jsi::Function::createFromHostFunction(
|
|
196
|
+
rt, jsi::PropNameID::forAscii(rt, "_startObservingProgress"), 0, clb7);
|
|
197
|
+
rt.global().setProperty(
|
|
198
|
+
rt, "_startObservingProgress", _startObservingProgress);
|
|
199
|
+
|
|
176
200
|
auto clb8 = [layoutProxy](
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
) -> jsi::Value {
|
|
201
|
+
jsi::Runtime &rt,
|
|
202
|
+
const jsi::Value &thisValue,
|
|
203
|
+
const jsi::Value *args,
|
|
204
|
+
size_t count) -> jsi::Value {
|
|
182
205
|
std::shared_ptr<LayoutAnimationsProxy> proxy = layoutProxy.lock();
|
|
183
206
|
if (layoutProxy.expired()) {
|
|
184
207
|
return jsi::Value::undefined();
|
|
@@ -186,8 +209,23 @@ void RuntimeDecorator::decorateUIRuntime(jsi::Runtime &rt,
|
|
|
186
209
|
proxy->stopObserving(args[0].asNumber(), args[1].getBool());
|
|
187
210
|
return jsi::Value::undefined();
|
|
188
211
|
};
|
|
189
|
-
jsi::Value _stopObservingProgress = jsi::Function::createFromHostFunction(
|
|
212
|
+
jsi::Value _stopObservingProgress = jsi::Function::createFromHostFunction(
|
|
213
|
+
rt, jsi::PropNameID::forAscii(rt, "_stopObservingProgress"), 0, clb8);
|
|
190
214
|
rt.global().setProperty(rt, "_stopObservingProgress", _stopObservingProgress);
|
|
191
|
-
}
|
|
192
215
|
|
|
216
|
+
auto clb9 = [setGestureState](
|
|
217
|
+
jsi::Runtime &rt,
|
|
218
|
+
const jsi::Value &thisValue,
|
|
219
|
+
const jsi::Value *args,
|
|
220
|
+
size_t count) -> jsi::Value {
|
|
221
|
+
int handlerTag = static_cast<int>(args[0].asNumber());
|
|
222
|
+
int newState = static_cast<int>(args[1].asNumber());
|
|
223
|
+
setGestureState(handlerTag, newState);
|
|
224
|
+
return jsi::Value::undefined();
|
|
225
|
+
};
|
|
226
|
+
jsi::Value setGestureStateFunction = jsi::Function::createFromHostFunction(
|
|
227
|
+
rt, jsi::PropNameID::forAscii(rt, "_setGestureState"), 2, clb9);
|
|
228
|
+
rt.global().setProperty(rt, "_setGestureState", setGestureStateFunction);
|
|
193
229
|
}
|
|
230
|
+
|
|
231
|
+
} // namespace reanimated
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
#include "Scheduler.h"
|
|
2
2
|
|
|
3
|
-
namespace reanimated
|
|
4
|
-
{
|
|
3
|
+
namespace reanimated {
|
|
5
4
|
|
|
6
5
|
void Scheduler::scheduleOnUI(std::function<void()> job) {
|
|
7
6
|
uiJobs.push(std::move(job));
|
|
@@ -19,11 +18,13 @@ void Scheduler::triggerUI() {
|
|
|
19
18
|
}
|
|
20
19
|
}
|
|
21
20
|
|
|
22
|
-
void Scheduler::setJSCallInvoker(
|
|
21
|
+
void Scheduler::setJSCallInvoker(
|
|
22
|
+
std::shared_ptr<facebook::react::CallInvoker> jsCallInvoker) {
|
|
23
23
|
jsCallInvoker_ = jsCallInvoker;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
void Scheduler::setRuntimeManager(
|
|
26
|
+
void Scheduler::setRuntimeManager(
|
|
27
|
+
std::shared_ptr<RuntimeManager> runtimeManager) {
|
|
27
28
|
this->runtimeManager = runtimeManager;
|
|
28
29
|
}
|
|
29
30
|
|
|
@@ -33,4 +34,4 @@ Scheduler::Scheduler() {
|
|
|
33
34
|
this->scheduledOnUI = false;
|
|
34
35
|
}
|
|
35
36
|
|
|
36
|
-
}
|
|
37
|
+
} // namespace reanimated
|
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
namespace reanimated {
|
|
4
4
|
|
|
5
|
-
void WorkletEventHandler::process(
|
|
5
|
+
void WorkletEventHandler::process(
|
|
6
|
+
jsi::Runtime &rt,
|
|
7
|
+
const jsi::Value &eventValue) {
|
|
6
8
|
handler.callWithThis(rt, handler, eventValue);
|
|
7
9
|
}
|
|
8
10
|
|
|
9
|
-
}
|
|
11
|
+
} // namespace reanimated
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#pragma once
|
|
2
2
|
|
|
3
|
+
#include <jsi/jsi.h>
|
|
3
4
|
#include <stdio.h>
|
|
4
|
-
#include <memory>
|
|
5
5
|
#include <functional>
|
|
6
6
|
#include <map>
|
|
7
|
-
#include <
|
|
7
|
+
#include <memory>
|
|
8
8
|
|
|
9
9
|
namespace reanimated {
|
|
10
10
|
|
|
@@ -13,19 +13,20 @@ using namespace facebook;
|
|
|
13
13
|
class MutableValue;
|
|
14
14
|
|
|
15
15
|
class LayoutAnimationsProxy {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
public:
|
|
17
|
+
LayoutAnimationsProxy(
|
|
18
|
+
std::function<void(int, jsi::Object newProps)> _notifyAboutProgress,
|
|
19
|
+
std::function<void(int, bool)> _notifyAboutEnd);
|
|
20
|
+
|
|
21
|
+
void
|
|
22
|
+
startObserving(int tag, std::shared_ptr<MutableValue> sv, jsi::Runtime &rt);
|
|
21
23
|
void stopObserving(int tag, bool finished);
|
|
22
24
|
void notifyAboutCancellation(int tag);
|
|
23
|
-
|
|
24
|
-
private:
|
|
25
|
+
|
|
26
|
+
private:
|
|
25
27
|
std::function<void(int, jsi::Object newProps)> notifyAboutProgress;
|
|
26
28
|
std::function<void(int, bool)> notifyAboutEnd;
|
|
27
29
|
std::map<int, std::shared_ptr<MutableValue>> observedValues;
|
|
28
30
|
};
|
|
29
31
|
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
+
} // namespace reanimated
|