react-native-reanimated 3.13.0-rc.1 → 3.13.0-rc.2
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/LayoutAnimationsManager.cpp +19 -0
- package/Common/cpp/LayoutAnimations/LayoutAnimationsManager.h +6 -0
- package/Common/cpp/LayoutAnimations/LayoutAnimationsProxy.cpp +717 -0
- package/Common/cpp/LayoutAnimations/LayoutAnimationsProxy.h +128 -0
- package/Common/cpp/LayoutAnimations/LayoutAnimationsUtils.cpp +81 -0
- package/Common/cpp/LayoutAnimations/LayoutAnimationsUtils.h +164 -0
- package/Common/cpp/NativeModules/NativeReanimatedModule.cpp +63 -3
- package/Common/cpp/NativeModules/NativeReanimatedModule.h +6 -2
- package/android/CMakeLists.txt +3 -0
- package/android/src/main/java/com/swmansion/reanimated/NodesManager.java +20 -2
- package/android/src/main/java/com/swmansion/reanimated/keyboard/Keyboard.java +1 -1
- package/android/src/main/java/com/swmansion/reanimated/nativeProxy/NativeProxyCommon.java +2 -1
- package/apple/LayoutReanimation/REASharedTransitionManager.m +8 -1
- package/lib/module/Colors.js +6 -2
- package/lib/module/Colors.js.map +1 -1
- package/lib/module/UpdateLayoutAnimations.js +2 -2
- package/lib/module/UpdateLayoutAnimations.js.map +1 -1
- package/lib/module/createAnimatedComponent/NativeEventsManager.js +91 -0
- package/lib/module/createAnimatedComponent/NativeEventsManager.js.map +1 -0
- package/lib/module/createAnimatedComponent/commonTypes.js.map +1 -1
- package/lib/module/createAnimatedComponent/createAnimatedComponent.js +46 -68
- package/lib/module/createAnimatedComponent/createAnimatedComponent.js.map +1 -1
- package/lib/module/js-reanimated/index.js +1 -1
- package/lib/module/js-reanimated/index.js.map +1 -1
- package/lib/module/layoutReanimation/web/animationsManager.js +15 -0
- package/lib/module/layoutReanimation/web/animationsManager.js.map +1 -1
- package/lib/module/platform-specific/jsVersion.js +1 -1
- package/lib/module/platform-specific/jsVersion.js.map +1 -1
- package/lib/typescript/createAnimatedComponent/NativeEventsManager.d.ts +15 -0
- package/lib/typescript/createAnimatedComponent/commonTypes.d.ts +12 -1
- package/lib/typescript/js-reanimated/index.d.ts +3 -1
- package/lib/typescript/platform-specific/jsVersion.d.ts +1 -1
- package/package.json +1 -1
- package/src/Colors.ts +5 -2
- package/src/UpdateLayoutAnimations.ts +2 -2
- package/src/createAnimatedComponent/NativeEventsManager.ts +138 -0
- package/src/createAnimatedComponent/commonTypes.ts +13 -1
- package/src/createAnimatedComponent/createAnimatedComponent.tsx +58 -94
- package/src/js-reanimated/index.ts +8 -2
- package/src/layoutReanimation/web/animationsManager.ts +35 -0
- package/src/platform-specific/jsVersion.ts +1 -1
|
@@ -20,6 +20,12 @@ void LayoutAnimationsManager::configureAnimationBatch(
|
|
|
20
20
|
clearSharedTransitionConfig(tag);
|
|
21
21
|
sharedTransitionConfigs.push_back(std::move(layoutAnimationConfig));
|
|
22
22
|
} else {
|
|
23
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
24
|
+
if (type == ENTERING){
|
|
25
|
+
enteringAnimationsForNativeID_[tag] = config;
|
|
26
|
+
continue;
|
|
27
|
+
}
|
|
28
|
+
#endif
|
|
23
29
|
if (config == nullptr) {
|
|
24
30
|
getConfigsForType(type).erase(tag);
|
|
25
31
|
} else {
|
|
@@ -159,6 +165,19 @@ int LayoutAnimationsManager::findPrecedingViewTagForTransition(const int tag) {
|
|
|
159
165
|
return -1;
|
|
160
166
|
}
|
|
161
167
|
|
|
168
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
169
|
+
void LayoutAnimationsManager::transferConfigFromNativeID(
|
|
170
|
+
const int nativeId,
|
|
171
|
+
const int tag) {
|
|
172
|
+
auto lock = std::unique_lock<std::recursive_mutex>(animationsMutex_);
|
|
173
|
+
auto config = enteringAnimationsForNativeID_[nativeId];
|
|
174
|
+
if (config) {
|
|
175
|
+
enteringAnimations_.insert_or_assign(tag, config);
|
|
176
|
+
}
|
|
177
|
+
enteringAnimationsForNativeID_.erase(nativeId);
|
|
178
|
+
}
|
|
179
|
+
#endif
|
|
180
|
+
|
|
162
181
|
#ifndef NDEBUG
|
|
163
182
|
std::string LayoutAnimationsManager::getScreenSharedTagPairString(
|
|
164
183
|
const int screenTag,
|
|
@@ -42,6 +42,9 @@ class LayoutAnimationsManager {
|
|
|
42
42
|
void clearLayoutAnimationConfig(const int tag);
|
|
43
43
|
void clearSharedTransitionConfig(const int tag);
|
|
44
44
|
void cancelLayoutAnimation(jsi::Runtime &rt, const int tag) const;
|
|
45
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
46
|
+
void transferConfigFromNativeID(const int nativeId, const int tag);
|
|
47
|
+
#endif
|
|
45
48
|
int findPrecedingViewTagForTransition(const int tag);
|
|
46
49
|
#ifndef NDEBUG
|
|
47
50
|
std::string getScreenSharedTagPairString(
|
|
@@ -63,6 +66,9 @@ class LayoutAnimationsManager {
|
|
|
63
66
|
std::unordered_map<int, std::string> viewsScreenSharedTagMap_;
|
|
64
67
|
#endif
|
|
65
68
|
|
|
69
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
70
|
+
std::unordered_map<int, std::shared_ptr<Shareable>> enteringAnimationsForNativeID_;
|
|
71
|
+
#endif
|
|
66
72
|
std::unordered_map<int, std::shared_ptr<Shareable>> enteringAnimations_;
|
|
67
73
|
std::unordered_map<int, std::shared_ptr<Shareable>> exitingAnimations_;
|
|
68
74
|
std::unordered_map<int, std::shared_ptr<Shareable>> layoutAnimations_;
|