react-native-reanimated 3.16.3 → 3.16.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.
@@ -205,6 +205,9 @@ NativeReanimatedModule::~NativeReanimatedModule() {
205
205
  // runtime, so they have to go away before we tear down the runtime
206
206
  eventHandlerRegistry_.reset();
207
207
  frameCallbacks_.clear();
208
+ #ifdef RCT_NEW_ARCH_ENABLED
209
+ operationsInBatch_.clear();
210
+ #endif // RCT_NEW_ARCH_ENABLED
208
211
  uiWorkletRuntime_.reset();
209
212
  }
210
213
 
@@ -302,7 +302,12 @@ jsi::Value ShareableHandle::toJSValue(jsi::Runtime &rt) {
302
302
  remoteRuntime_ = &rt;
303
303
  }
304
304
  }
305
- return jsi::Value(rt, *remoteValue_);
305
+ if (&rt == remoteRuntime_) {
306
+ return jsi::Value(rt, *remoteValue_);
307
+ }
308
+ auto initObj = initializer_->toJSValue(rt);
309
+ return getValueUnpacker(rt).call(
310
+ rt, initObj, jsi::String::createFromAscii(rt, "Handle"));
306
311
  }
307
312
 
308
313
  jsi::Value ShareableString::toJSValue(jsi::Runtime &rt) {
@@ -5,7 +5,7 @@
5
5
 
6
6
  @interface REAInitializerRCTFabricSurface : RCTFabricSurface
7
7
 
8
- @property REAModule *reaModule;
8
+ @property __weak REAModule *reaModule;
9
9
 
10
10
  @end
11
11
 
@@ -576,10 +576,26 @@ static BOOL _isConfigured = NO;
576
576
  return;
577
577
  }
578
578
 
579
+ // Add safety check for disappearing screens
580
+ if ([_disappearingScreens count] == 0) {
581
+ return;
582
+ }
583
+
579
584
  REAUIView *navTabScreen = _disappearingScreens[0];
580
585
  REAUIView *sourceScreen = _disappearingScreens[[_disappearingScreens count] - 1];
586
+
587
+ // Add null checks
588
+ if (!navTabScreen || !navTabScreen.reactSuperview) {
589
+ return;
590
+ }
591
+
581
592
  REAUIView *targetTabScreen = [REAScreensHelper getActiveTabForTabNavigator:navTabScreen.reactSuperview];
582
593
  REAUIView *targetScreen = [REAScreensHelper findTopScreenInChildren:targetTabScreen];
594
+
595
+ if (!targetScreen) {
596
+ return;
597
+ }
598
+
583
599
  if (!layoutedScreen && _isTabNavigator) {
584
600
  // just wait for the next layout computation for your screen
585
601
  return;
@@ -195,9 +195,10 @@ RCT_EXPORT_MODULE(ReanimatedModule);
195
195
 
196
196
  - (void)setReaSurfacePresenter
197
197
  {
198
- if (reaSurface == nil) {
199
- // we need only one instance because SurfacePresenter is the same during the application lifetime
200
- reaSurface = [[REAInitializerRCTFabricSurface alloc] init];
198
+ if (_surfacePresenter && ![_surfacePresenter surfaceForRootTag:reaSurface.rootTag]) {
199
+ if (!reaSurface) {
200
+ reaSurface = [[REAInitializerRCTFabricSurface alloc] init];
201
+ }
201
202
  [_surfacePresenter registerSurface:reaSurface];
202
203
  }
203
204
  reaSurface.reaModule = self;
@@ -5,5 +5,5 @@
5
5
  * version used to build the native part of the library in runtime. Remember to
6
6
  * keep this in sync with the version declared in `package.json`
7
7
  */
8
- export const jsVersion = '3.16.3';
8
+ export const jsVersion = '3.16.4';
9
9
  //# sourceMappingURL=jsVersion.js.map
@@ -3,5 +3,5 @@
3
3
  * version used to build the native part of the library in runtime. Remember to
4
4
  * keep this in sync with the version declared in `package.json`
5
5
  */
6
- export declare const jsVersion = "3.16.3";
6
+ export declare const jsVersion = "3.16.4";
7
7
  //# sourceMappingURL=jsVersion.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-reanimated",
3
- "version": "3.16.3",
3
+ "version": "3.16.4",
4
4
  "description": "More powerful alternative to Animated library for React Native.",
5
5
  "scripts": {
6
6
  "test": "jest",
@@ -4,4 +4,4 @@
4
4
  * version used to build the native part of the library in runtime. Remember to
5
5
  * keep this in sync with the version declared in `package.json`
6
6
  */
7
- export const jsVersion = '3.16.3';
7
+ export const jsVersion = '3.16.4';