react-native 0.84.0-nightly-20251229-2b74f985f → 0.84.0-nightly-20251231-50f310dab
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/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Renderer/implementations/ReactFabric-dev.js +3 -3
- package/Libraries/Renderer/implementations/ReactFabric-prod.js +3 -3
- package/Libraries/Renderer/implementations/ReactFabric-profiling.js +3 -3
- package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +11 -4
- package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +11 -4
- package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +11 -4
- package/Libraries/Renderer/shims/ReactFabric.js +3 -1
- package/Libraries/Renderer/shims/ReactFeatureFlags.js +3 -1
- package/Libraries/Renderer/shims/ReactNative.js +2 -2
- package/Libraries/Renderer/shims/ReactNativeTypes.js +3 -1
- package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +3 -1
- package/Libraries/Renderer/shims/createReactNativeComponentClass.js +3 -1
- package/React/Base/RCTConvert.h +2 -0
- package/React/Base/RCTConvert.mm +2 -0
- package/React/Base/RCTUtils.h +2 -0
- package/React/Base/RCTUtils.mm +2 -0
- package/React/Base/RCTVersion.m +1 -1
- package/React/CoreModules/RCTDevLoadingView.mm +2 -0
- package/React/Views/RCTModalHostView.h +2 -0
- package/React/Views/RCTModalHostView.m +8 -0
- package/React/Views/RCTModalHostViewController.h +2 -0
- package/ReactAndroid/api/ReactAndroid.api +0 -1
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/ReactActivity.java +3 -0
- package/ReactAndroid/src/main/java/com/facebook/react/ReactPackageTurboModuleManagerDelegate.kt +2 -4
- package/ReactAndroid/src/main/java/com/facebook/react/internal/turbomodule/core/TurboModuleManager.kt +3 -8
- package/ReactAndroid/src/main/java/com/facebook/react/internal/turbomodule/core/TurboModuleManagerDelegate.kt +0 -3
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostView.kt +1 -1
- package/ReactAndroid/src/main/jni/react/turbomodule/ReactCommon/TurboModuleManager.cpp +27 -20
- package/ReactAndroid/src/main/jni/react/turbomodule/ReactCommon/TurboModuleManager.h +5 -7
- package/ReactAndroid/src/main/res/views/uimanager/values-ne/strings.xml +1 -0
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/ReactCommon/react/nativemodule/core/ReactCommon/TurboModule.h +7 -1
- package/ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleBinding.cpp +30 -10
- package/ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleBinding.h +15 -4
- package/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModuleManager.mm +5 -4
- package/package.json +9 -9
|
@@ -29,7 +29,7 @@ export default class ReactNativeVersion {
|
|
|
29
29
|
static major: number = 0;
|
|
30
30
|
static minor: number = 84;
|
|
31
31
|
static patch: number = 0;
|
|
32
|
-
static prerelease: string | null = 'nightly-
|
|
32
|
+
static prerelease: string | null = 'nightly-20251231-50f310dab';
|
|
33
33
|
|
|
34
34
|
static getVersionString(): string {
|
|
35
35
|
return `${this.major}.${this.minor}.${this.patch}${this.prerelease != null ? `-${this.prerelease}` : ''}`;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @noflow
|
|
8
8
|
* @nolint
|
|
9
9
|
* @preventMunge
|
|
10
|
-
* @generated SignedSource<<
|
|
10
|
+
* @generated SignedSource<<e7f6759bcc8955193867c6ab42bd07ad>>
|
|
11
11
|
*
|
|
12
12
|
* This file was sync'd from the facebook/react repository.
|
|
13
13
|
*/
|
|
@@ -18901,10 +18901,10 @@ __DEV__ &&
|
|
|
18901
18901
|
(function () {
|
|
18902
18902
|
var internals = {
|
|
18903
18903
|
bundleType: 1,
|
|
18904
|
-
version: "19.2.
|
|
18904
|
+
version: "19.2.3",
|
|
18905
18905
|
rendererPackageName: "react-native-renderer",
|
|
18906
18906
|
currentDispatcherRef: ReactSharedInternals,
|
|
18907
|
-
reconcilerVersion: "19.2.
|
|
18907
|
+
reconcilerVersion: "19.2.3"
|
|
18908
18908
|
};
|
|
18909
18909
|
null !== extraDevToolsConfig &&
|
|
18910
18910
|
(internals.rendererConfig = extraDevToolsConfig);
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @noflow
|
|
8
8
|
* @nolint
|
|
9
9
|
* @preventMunge
|
|
10
|
-
* @generated SignedSource<<
|
|
10
|
+
* @generated SignedSource<<8d29d23a1c540d7502dd188e691eb725>>
|
|
11
11
|
*
|
|
12
12
|
* This file was sync'd from the facebook/react repository.
|
|
13
13
|
*/
|
|
@@ -10495,10 +10495,10 @@ batchedUpdatesImpl = function (fn, a) {
|
|
|
10495
10495
|
var roots = new Map(),
|
|
10496
10496
|
internals$jscomp$inline_1245 = {
|
|
10497
10497
|
bundleType: 0,
|
|
10498
|
-
version: "19.2.
|
|
10498
|
+
version: "19.2.3",
|
|
10499
10499
|
rendererPackageName: "react-native-renderer",
|
|
10500
10500
|
currentDispatcherRef: ReactSharedInternals,
|
|
10501
|
-
reconcilerVersion: "19.2.
|
|
10501
|
+
reconcilerVersion: "19.2.3"
|
|
10502
10502
|
};
|
|
10503
10503
|
null !== extraDevToolsConfig &&
|
|
10504
10504
|
(internals$jscomp$inline_1245.rendererConfig = extraDevToolsConfig);
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @noflow
|
|
8
8
|
* @nolint
|
|
9
9
|
* @preventMunge
|
|
10
|
-
* @generated SignedSource<<
|
|
10
|
+
* @generated SignedSource<<c4dae0f7dbb88147f400089cab897268>>
|
|
11
11
|
*
|
|
12
12
|
* This file was sync'd from the facebook/react repository.
|
|
13
13
|
*/
|
|
@@ -12298,10 +12298,10 @@ batchedUpdatesImpl = function (fn, a) {
|
|
|
12298
12298
|
var roots = new Map(),
|
|
12299
12299
|
internals$jscomp$inline_1537 = {
|
|
12300
12300
|
bundleType: 0,
|
|
12301
|
-
version: "19.2.
|
|
12301
|
+
version: "19.2.3",
|
|
12302
12302
|
rendererPackageName: "react-native-renderer",
|
|
12303
12303
|
currentDispatcherRef: ReactSharedInternals,
|
|
12304
|
-
reconcilerVersion: "19.2.
|
|
12304
|
+
reconcilerVersion: "19.2.3"
|
|
12305
12305
|
};
|
|
12306
12306
|
null !== extraDevToolsConfig &&
|
|
12307
12307
|
(internals$jscomp$inline_1537.rendererConfig = extraDevToolsConfig);
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
* @noflow
|
|
8
8
|
* @nolint
|
|
9
9
|
* @preventMunge
|
|
10
|
+
* @generated SignedSource<<22737380b5e4280ce3563ac009164f56>>
|
|
10
11
|
*
|
|
11
|
-
* This file
|
|
12
|
-
* The version compatability check is removed. Use at your own risk.
|
|
12
|
+
* This file was sync'd from the facebook/react repository.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
"use strict";
|
|
@@ -19455,6 +19455,13 @@ __DEV__ &&
|
|
|
19455
19455
|
setSuspenseHandler = function (newShouldSuspendImpl) {
|
|
19456
19456
|
shouldSuspendImpl = newShouldSuspendImpl;
|
|
19457
19457
|
};
|
|
19458
|
+
var isomorphicReactPackageVersion = React.version;
|
|
19459
|
+
if ("19.2.3" !== isomorphicReactPackageVersion)
|
|
19460
|
+
throw Error(
|
|
19461
|
+
'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' +
|
|
19462
|
+
(isomorphicReactPackageVersion +
|
|
19463
|
+
"\n - react-native-renderer: 19.2.3\nLearn more: https://react.dev/warnings/version-mismatch")
|
|
19464
|
+
);
|
|
19458
19465
|
if (
|
|
19459
19466
|
"function" !==
|
|
19460
19467
|
typeof ReactNativePrivateInterface.ReactFiberErrorDialog.showErrorDialog
|
|
@@ -19479,10 +19486,10 @@ __DEV__ &&
|
|
|
19479
19486
|
(function () {
|
|
19480
19487
|
var internals = {
|
|
19481
19488
|
bundleType: 1,
|
|
19482
|
-
version: "19.2.
|
|
19489
|
+
version: "19.2.3",
|
|
19483
19490
|
rendererPackageName: "react-native-renderer",
|
|
19484
19491
|
currentDispatcherRef: ReactSharedInternals,
|
|
19485
|
-
reconcilerVersion: "19.2.
|
|
19492
|
+
reconcilerVersion: "19.2.3"
|
|
19486
19493
|
};
|
|
19487
19494
|
null !== extraDevToolsConfig &&
|
|
19488
19495
|
(internals.rendererConfig = extraDevToolsConfig);
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
* @noflow
|
|
8
8
|
* @nolint
|
|
9
9
|
* @preventMunge
|
|
10
|
+
* @generated SignedSource<<232209f5a157745637191195f25907c7>>
|
|
10
11
|
*
|
|
11
|
-
* This file
|
|
12
|
-
* The version compatability check is removed. Use at your own risk.
|
|
12
|
+
* This file was sync'd from the facebook/react repository.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
"use strict";
|
|
@@ -10918,6 +10918,13 @@ function updateContainer(element, container, parentComponent, callback) {
|
|
|
10918
10918
|
entangleTransitions(element, parentComponent, lane));
|
|
10919
10919
|
return lane;
|
|
10920
10920
|
}
|
|
10921
|
+
var isomorphicReactPackageVersion = React.version;
|
|
10922
|
+
if ("19.2.3" !== isomorphicReactPackageVersion)
|
|
10923
|
+
throw Error(
|
|
10924
|
+
'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' +
|
|
10925
|
+
(isomorphicReactPackageVersion +
|
|
10926
|
+
"\n - react-native-renderer: 19.2.3\nLearn more: https://react.dev/warnings/version-mismatch")
|
|
10927
|
+
);
|
|
10921
10928
|
if (
|
|
10922
10929
|
"function" !==
|
|
10923
10930
|
typeof ReactNativePrivateInterface.ReactFiberErrorDialog.showErrorDialog
|
|
@@ -10966,10 +10973,10 @@ batchedUpdatesImpl = function (fn, a) {
|
|
|
10966
10973
|
var roots = new Map(),
|
|
10967
10974
|
internals$jscomp$inline_1296 = {
|
|
10968
10975
|
bundleType: 0,
|
|
10969
|
-
version: "19.2.
|
|
10976
|
+
version: "19.2.3",
|
|
10970
10977
|
rendererPackageName: "react-native-renderer",
|
|
10971
10978
|
currentDispatcherRef: ReactSharedInternals,
|
|
10972
|
-
reconcilerVersion: "19.2.
|
|
10979
|
+
reconcilerVersion: "19.2.3"
|
|
10973
10980
|
};
|
|
10974
10981
|
null !== extraDevToolsConfig &&
|
|
10975
10982
|
(internals$jscomp$inline_1296.rendererConfig = extraDevToolsConfig);
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
* @noflow
|
|
8
8
|
* @nolint
|
|
9
9
|
* @preventMunge
|
|
10
|
+
* @generated SignedSource<<9b111e8265a6b1d86607277dbe91d200>>
|
|
10
11
|
*
|
|
11
|
-
* This file
|
|
12
|
-
* The version compatability check is removed. Use at your own risk.
|
|
12
|
+
* This file was sync'd from the facebook/react repository.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
"use strict";
|
|
@@ -12713,6 +12713,13 @@ function updateContainer(element, container, parentComponent, callback) {
|
|
|
12713
12713
|
entangleTransitions(element, parentComponent, lane));
|
|
12714
12714
|
return lane;
|
|
12715
12715
|
}
|
|
12716
|
+
var isomorphicReactPackageVersion = React.version;
|
|
12717
|
+
if ("19.2.3" !== isomorphicReactPackageVersion)
|
|
12718
|
+
throw Error(
|
|
12719
|
+
'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' +
|
|
12720
|
+
(isomorphicReactPackageVersion +
|
|
12721
|
+
"\n - react-native-renderer: 19.2.3\nLearn more: https://react.dev/warnings/version-mismatch")
|
|
12722
|
+
);
|
|
12716
12723
|
if (
|
|
12717
12724
|
"function" !==
|
|
12718
12725
|
typeof ReactNativePrivateInterface.ReactFiberErrorDialog.showErrorDialog
|
|
@@ -12761,10 +12768,10 @@ batchedUpdatesImpl = function (fn, a) {
|
|
|
12761
12768
|
var roots = new Map(),
|
|
12762
12769
|
internals$jscomp$inline_1588 = {
|
|
12763
12770
|
bundleType: 0,
|
|
12764
|
-
version: "19.2.
|
|
12771
|
+
version: "19.2.3",
|
|
12765
12772
|
rendererPackageName: "react-native-renderer",
|
|
12766
12773
|
currentDispatcherRef: ReactSharedInternals,
|
|
12767
|
-
reconcilerVersion: "19.2.
|
|
12774
|
+
reconcilerVersion: "19.2.3"
|
|
12768
12775
|
};
|
|
12769
12776
|
null !== extraDevToolsConfig &&
|
|
12770
12777
|
(internals$jscomp$inline_1588.rendererConfig = extraDevToolsConfig);
|
|
@@ -7,7 +7,9 @@
|
|
|
7
7
|
* @noformat
|
|
8
8
|
* @nolint
|
|
9
9
|
* @flow strict-local
|
|
10
|
-
* @generated SignedSource<<
|
|
10
|
+
* @generated SignedSource<<1dd9e9c3f20e37ae14e485fc6ee3d9e9>>
|
|
11
|
+
*
|
|
12
|
+
* This file was sync'd from the facebook/react repository.
|
|
11
13
|
*/
|
|
12
14
|
|
|
13
15
|
'use strict';
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
* @noformat
|
|
8
8
|
* @nolint
|
|
9
9
|
* @flow
|
|
10
|
+
* @generated SignedSource<<e2c46705ed927302dbe9332dafba459d>>
|
|
10
11
|
*
|
|
11
|
-
* This file
|
|
12
|
-
* The version compatability check is removed. Use at your own risk.
|
|
12
|
+
* This file was sync'd from the facebook/react repository.
|
|
13
13
|
*/
|
|
14
14
|
'use strict';
|
|
15
15
|
|
|
@@ -7,7 +7,9 @@
|
|
|
7
7
|
* @noformat
|
|
8
8
|
* @nolint
|
|
9
9
|
* @flow strict
|
|
10
|
-
* @generated SignedSource<<
|
|
10
|
+
* @generated SignedSource<<989e6e2e860dc2af7ba983849111bda8>>
|
|
11
|
+
*
|
|
12
|
+
* This file was sync'd from the facebook/react repository.
|
|
11
13
|
*/
|
|
12
14
|
|
|
13
15
|
import type {
|
|
@@ -7,7 +7,9 @@
|
|
|
7
7
|
* @noformat
|
|
8
8
|
* @nolint
|
|
9
9
|
* @flow strict-local
|
|
10
|
-
* @generated SignedSource<<
|
|
10
|
+
* @generated SignedSource<<67d18226984338ab9301147ce0a7d414>>
|
|
11
|
+
*
|
|
12
|
+
* This file was sync'd from the facebook/react repository.
|
|
11
13
|
*/
|
|
12
14
|
|
|
13
15
|
'use strict';
|
|
@@ -7,7 +7,9 @@
|
|
|
7
7
|
* @noformat
|
|
8
8
|
* @nolint
|
|
9
9
|
* @flow strict-local
|
|
10
|
-
* @generated SignedSource<<
|
|
10
|
+
* @generated SignedSource<<556d1487de0b9e4a09cbc67dd130a884>>
|
|
11
|
+
*
|
|
12
|
+
* This file was sync'd from the facebook/react repository.
|
|
11
13
|
*/
|
|
12
14
|
|
|
13
15
|
'use strict';
|
package/React/Base/RCTConvert.h
CHANGED
|
@@ -79,7 +79,9 @@ typedef NSURL RCTFileURL;
|
|
|
79
79
|
+ (UIKeyboardAppearance)UIKeyboardAppearance:(id)json;
|
|
80
80
|
+ (UIReturnKeyType)UIReturnKeyType:(id)json;
|
|
81
81
|
+ (UIUserInterfaceStyle)UIUserInterfaceStyle:(id)json API_AVAILABLE(ios(12));
|
|
82
|
+
#if !TARGET_OS_TV
|
|
82
83
|
+ (UIInterfaceOrientationMask)UIInterfaceOrientationMask:(NSString *)orientation;
|
|
84
|
+
#endif
|
|
83
85
|
+ (UIModalPresentationStyle)UIModalPresentationStyle:(id)json;
|
|
84
86
|
|
|
85
87
|
#if !TARGET_OS_TV
|
package/React/Base/RCTConvert.mm
CHANGED
|
@@ -499,6 +499,7 @@ RCT_ENUM_CONVERTER(
|
|
|
499
499
|
UIUserInterfaceStyleUnspecified,
|
|
500
500
|
integerValue)
|
|
501
501
|
|
|
502
|
+
#if !TARGET_OS_TV
|
|
502
503
|
RCT_ENUM_CONVERTER(
|
|
503
504
|
UIInterfaceOrientationMask,
|
|
504
505
|
(@{
|
|
@@ -510,6 +511,7 @@ RCT_ENUM_CONVERTER(
|
|
|
510
511
|
}),
|
|
511
512
|
NSNotFound,
|
|
512
513
|
unsignedIntegerValue)
|
|
514
|
+
#endif
|
|
513
515
|
|
|
514
516
|
RCT_ENUM_CONVERTER(
|
|
515
517
|
UIModalPresentationStyle,
|
package/React/Base/RCTUtils.h
CHANGED
|
@@ -101,7 +101,9 @@ RCT_EXTERN UIWindow *__nullable RCTKeyWindow(void);
|
|
|
101
101
|
RCT_EXTERN UIViewController *__nullable RCTPresentedViewController(void);
|
|
102
102
|
|
|
103
103
|
// Retrieve current window UIStatusBarManager
|
|
104
|
+
#if !TARGET_OS_TV
|
|
104
105
|
RCT_EXTERN UIStatusBarManager *__nullable RCTUIStatusBarManager(void) API_AVAILABLE(ios(13));
|
|
106
|
+
#endif
|
|
105
107
|
|
|
106
108
|
// Does this device support force touch (aka 3D Touch)?
|
|
107
109
|
RCT_EXTERN BOOL RCTForceTouchAvailable(void);
|
package/React/Base/RCTUtils.mm
CHANGED
|
@@ -635,10 +635,12 @@ UIWindow *__nullable RCTKeyWindow(void)
|
|
|
635
635
|
return nil;
|
|
636
636
|
}
|
|
637
637
|
|
|
638
|
+
#if !TARGET_OS_TV
|
|
638
639
|
UIStatusBarManager *__nullable RCTUIStatusBarManager(void)
|
|
639
640
|
{
|
|
640
641
|
return RCTKeyWindow().windowScene.statusBarManager;
|
|
641
642
|
}
|
|
643
|
+
#endif
|
|
642
644
|
|
|
643
645
|
UIViewController *__nullable RCTPresentedViewController(void)
|
|
644
646
|
{
|
package/React/Base/RCTVersion.m
CHANGED
|
@@ -24,7 +24,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
|
|
|
24
24
|
RCTVersionMajor: @(0),
|
|
25
25
|
RCTVersionMinor: @(84),
|
|
26
26
|
RCTVersionPatch: @(0),
|
|
27
|
-
RCTVersionPrerelease: @"nightly-
|
|
27
|
+
RCTVersionPrerelease: @"nightly-20251231-50f310dab",
|
|
28
28
|
};
|
|
29
29
|
});
|
|
30
30
|
return __rnVersion;
|
|
@@ -183,7 +183,9 @@ RCT_EXPORT_MODULE()
|
|
|
183
183
|
} else {
|
|
184
184
|
self->_window = [[UIWindow alloc] init];
|
|
185
185
|
}
|
|
186
|
+
#if !TARGET_OS_TV
|
|
186
187
|
self->_window.windowLevel = UIWindowLevelStatusBar + 1;
|
|
188
|
+
#endif
|
|
187
189
|
self->_window.rootViewController = [UIViewController new];
|
|
188
190
|
[self->_window.rootViewController.view addSubview:self->_container];
|
|
189
191
|
}
|
|
@@ -38,8 +38,10 @@ __attribute__((deprecated("This API will be removed along with the legacy archit
|
|
|
38
38
|
|
|
39
39
|
@property (nonatomic, weak) id<RCTModalHostViewInteractor> delegate;
|
|
40
40
|
|
|
41
|
+
#if !TARGET_OS_TV
|
|
41
42
|
@property (nonatomic, copy) NSArray<NSString *> *supportedOrientations;
|
|
42
43
|
@property (nonatomic, copy) RCTDirectEventBlock onOrientationChange;
|
|
44
|
+
#endif
|
|
43
45
|
|
|
44
46
|
// Fabric only
|
|
45
47
|
@property (nonatomic, copy) RCTDirectEventBlock onDismiss;
|
|
@@ -25,7 +25,9 @@
|
|
|
25
25
|
RCTModalHostViewController *_modalViewController;
|
|
26
26
|
RCTTouchHandler *_touchHandler;
|
|
27
27
|
UIView *_reactSubview;
|
|
28
|
+
#if !TARGET_OS_TV
|
|
28
29
|
UIInterfaceOrientation _lastKnownOrientation;
|
|
30
|
+
#endif
|
|
29
31
|
RCTDirectEventBlock _onRequestClose;
|
|
30
32
|
}
|
|
31
33
|
|
|
@@ -90,6 +92,7 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithCoder : coder)
|
|
|
90
92
|
|
|
91
93
|
- (void)notifyForOrientationChange
|
|
92
94
|
{
|
|
95
|
+
#if !TARGET_OS_TV
|
|
93
96
|
if (!_onOrientationChange) {
|
|
94
97
|
return;
|
|
95
98
|
}
|
|
@@ -106,6 +109,7 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithCoder : coder)
|
|
|
106
109
|
@"orientation" : isPortrait ? @"portrait" : @"landscape",
|
|
107
110
|
};
|
|
108
111
|
_onOrientationChange(eventPayload);
|
|
112
|
+
#endif
|
|
109
113
|
}
|
|
110
114
|
|
|
111
115
|
- (void)insertReactSubview:(UIView *)subview atIndex:(NSInteger)atIndex
|
|
@@ -191,7 +195,9 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithCoder : coder)
|
|
|
191
195
|
if (shouldBePresented) {
|
|
192
196
|
RCTAssert(self.reactViewController, @"Can't present modal view controller without a presenting view controller");
|
|
193
197
|
|
|
198
|
+
#if !TARGET_OS_TV
|
|
194
199
|
_modalViewController.supportedInterfaceOrientations = [self supportedOrientationsMask];
|
|
200
|
+
#endif
|
|
195
201
|
|
|
196
202
|
if ([self.animationType isEqualToString:@"fade"]) {
|
|
197
203
|
_modalViewController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
|
|
@@ -224,6 +230,7 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithCoder : coder)
|
|
|
224
230
|
transparent ? UIModalPresentationOverFullScreen : UIModalPresentationFullScreen;
|
|
225
231
|
}
|
|
226
232
|
|
|
233
|
+
#if !TARGET_OS_TV
|
|
227
234
|
- (UIInterfaceOrientationMask)supportedOrientationsMask
|
|
228
235
|
{
|
|
229
236
|
if (_supportedOrientations.count == 0) {
|
|
@@ -250,6 +257,7 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithCoder : coder)
|
|
|
250
257
|
}
|
|
251
258
|
return supportedOrientations;
|
|
252
259
|
}
|
|
260
|
+
#endif
|
|
253
261
|
|
|
254
262
|
@end
|
|
255
263
|
|
|
@@ -14,7 +14,9 @@ __attribute__((deprecated("This API will be removed along with the legacy archit
|
|
|
14
14
|
|
|
15
15
|
@property (nonatomic, copy) void (^boundsDidChangeBlock)(CGRect newBounds);
|
|
16
16
|
|
|
17
|
+
#if !TARGET_OS_TV
|
|
17
18
|
@property (nonatomic, assign) UIInterfaceOrientationMask supportedInterfaceOrientations;
|
|
19
|
+
#endif
|
|
18
20
|
|
|
19
21
|
@end
|
|
20
22
|
|
|
@@ -354,7 +354,6 @@ public abstract class com/facebook/react/ReactPackageTurboModuleManagerDelegate
|
|
|
354
354
|
public fun getModule (Ljava/lang/String;)Lcom/facebook/react/turbomodule/core/interfaces/TurboModule;
|
|
355
355
|
public fun unstable_isLegacyModuleRegistered (Ljava/lang/String;)Z
|
|
356
356
|
public fun unstable_isModuleRegistered (Ljava/lang/String;)Z
|
|
357
|
-
public fun unstable_shouldEnableLegacyModuleInterop ()Z
|
|
358
357
|
}
|
|
359
358
|
|
|
360
359
|
public abstract class com/facebook/react/ReactPackageTurboModuleManagerDelegate$Builder {
|
|
@@ -124,6 +124,9 @@ public abstract class ReactActivity extends AppCompatActivity
|
|
|
124
124
|
// as super.onBackPressed() will call all enabled callbacks in the dispatcher.
|
|
125
125
|
mBackPressedCallback.setEnabled(false);
|
|
126
126
|
super.onBackPressed();
|
|
127
|
+
// Re-enable callback to ensure custom back handling works after activity resume
|
|
128
|
+
// Without this, the callback remains disabled when the app returns from background
|
|
129
|
+
mBackPressedCallback.setEnabled(true);
|
|
127
130
|
}
|
|
128
131
|
|
|
129
132
|
@Override
|
package/ReactAndroid/src/main/java/com/facebook/react/ReactPackageTurboModuleManagerDelegate.kt
CHANGED
|
@@ -105,8 +105,6 @@ public abstract class ReactPackageTurboModuleManagerDelegate : TurboModuleManage
|
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
override fun unstable_shouldEnableLegacyModuleInterop(): Boolean = shouldEnableLegacyModuleInterop
|
|
109
|
-
|
|
110
108
|
override fun getModule(moduleName: String): TurboModule? {
|
|
111
109
|
var resolvedModule: NativeModule? = null
|
|
112
110
|
|
|
@@ -153,7 +151,7 @@ public abstract class ReactPackageTurboModuleManagerDelegate : TurboModuleManage
|
|
|
153
151
|
}
|
|
154
152
|
|
|
155
153
|
override fun getLegacyModule(moduleName: String): NativeModule? {
|
|
156
|
-
if (!
|
|
154
|
+
if (!shouldEnableLegacyModuleInterop) {
|
|
157
155
|
return null
|
|
158
156
|
}
|
|
159
157
|
|
|
@@ -191,7 +189,7 @@ public abstract class ReactPackageTurboModuleManagerDelegate : TurboModuleManage
|
|
|
191
189
|
}
|
|
192
190
|
}
|
|
193
191
|
|
|
194
|
-
private fun shouldSupportLegacyPackages(): Boolean =
|
|
192
|
+
private fun shouldSupportLegacyPackages(): Boolean = shouldEnableLegacyModuleInterop
|
|
195
193
|
|
|
196
194
|
public abstract class Builder {
|
|
197
195
|
private var packages: List<ReactPackage>? = null
|
|
@@ -52,7 +52,6 @@ public class TurboModuleManager(
|
|
|
52
52
|
@DoNotStrip
|
|
53
53
|
private val mHybridData: HybridData =
|
|
54
54
|
initHybrid(
|
|
55
|
-
runtimeExecutor,
|
|
56
55
|
jsCallInvokerHolder as CallInvokerHolderImpl,
|
|
57
56
|
nativeMethodCallInvokerHolder as NativeMethodCallInvokerHolderImpl,
|
|
58
57
|
delegate,
|
|
@@ -60,7 +59,7 @@ public class TurboModuleManager(
|
|
|
60
59
|
|
|
61
60
|
init {
|
|
62
61
|
|
|
63
|
-
installJSIBindings(
|
|
62
|
+
installJSIBindings(runtimeExecutor)
|
|
64
63
|
|
|
65
64
|
eagerInitModuleNames = delegate?.getEagerInitModuleNames() ?: emptyList()
|
|
66
65
|
|
|
@@ -72,7 +71,7 @@ public class TurboModuleManager(
|
|
|
72
71
|
ModuleProvider { moduleName: String -> delegate.getModule(moduleName) as NativeModule? }
|
|
73
72
|
|
|
74
73
|
legacyModuleProvider =
|
|
75
|
-
if (delegate == null
|
|
74
|
+
if (delegate == null) nullProvider
|
|
76
75
|
else
|
|
77
76
|
ModuleProvider { moduleName: String ->
|
|
78
77
|
val nativeModule = delegate.getLegacyModule(moduleName)
|
|
@@ -93,9 +92,6 @@ public class TurboModuleManager(
|
|
|
93
92
|
private fun isLegacyModule(moduleName: String): Boolean =
|
|
94
93
|
delegate?.unstable_isLegacyModuleRegistered(moduleName) == true
|
|
95
94
|
|
|
96
|
-
private fun shouldEnableLegacyModuleInterop(): Boolean =
|
|
97
|
-
delegate?.unstable_shouldEnableLegacyModuleInterop() == true
|
|
98
|
-
|
|
99
95
|
// used from TurboModuleManager.cpp
|
|
100
96
|
@Suppress("unused")
|
|
101
97
|
@DoNotStrip
|
|
@@ -281,13 +277,12 @@ public class TurboModuleManager(
|
|
|
281
277
|
}
|
|
282
278
|
|
|
283
279
|
private external fun initHybrid(
|
|
284
|
-
runtimeExecutor: RuntimeExecutor,
|
|
285
280
|
jsCallInvokerHolder: CallInvokerHolderImpl,
|
|
286
281
|
nativeMethodCallInvoker: NativeMethodCallInvokerHolderImpl,
|
|
287
282
|
tmmDelegate: TurboModuleManagerDelegate?,
|
|
288
283
|
): HybridData
|
|
289
284
|
|
|
290
|
-
private external fun installJSIBindings(
|
|
285
|
+
private external fun installJSIBindings(runtimeExecutor: RuntimeExecutor)
|
|
291
286
|
|
|
292
287
|
override fun invalidate() {
|
|
293
288
|
/*
|
|
@@ -48,9 +48,6 @@ public abstract class TurboModuleManagerDelegate {
|
|
|
48
48
|
|
|
49
49
|
public open fun getEagerInitModuleNames(): List<String> = emptyList()
|
|
50
50
|
|
|
51
|
-
/** Can the TurboModule system create legacy modules? */
|
|
52
|
-
public open fun unstable_shouldEnableLegacyModuleInterop(): Boolean = false
|
|
53
|
-
|
|
54
51
|
// TODO(T171231381): Consider removing this method: could we just use the static initializer
|
|
55
52
|
// of derived classes instead?
|
|
56
53
|
@Synchronized protected fun maybeLoadOtherSoLibraries(): Unit = Unit
|
|
@@ -593,7 +593,7 @@ public class ReactModalHostView(context: ThemedReactContext) :
|
|
|
593
593
|
|
|
594
594
|
override fun onInterceptHoverEvent(event: MotionEvent): Boolean {
|
|
595
595
|
eventDispatcher?.let { jSPointerDispatcher?.handleMotionEvent(event, it, true) }
|
|
596
|
-
return super.
|
|
596
|
+
return super.onInterceptHoverEvent(event)
|
|
597
597
|
}
|
|
598
598
|
|
|
599
599
|
override fun onHoverEvent(event: MotionEvent): Boolean {
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
#include <ReactCommon/JavaInteropTurboModule.h>
|
|
20
20
|
#include <ReactCommon/TurboModuleBinding.h>
|
|
21
21
|
#include <ReactCommon/TurboModulePerfLogger.h>
|
|
22
|
+
#include <react/featureflags/ReactNativeFeatureFlags.h>
|
|
22
23
|
#include <react/jni/CxxModuleWrapperBase.h>
|
|
23
24
|
|
|
24
25
|
namespace facebook::react {
|
|
@@ -94,24 +95,20 @@ class JMethodDescriptor : public jni::JavaClass<JMethodDescriptor> {
|
|
|
94
95
|
} // namespace
|
|
95
96
|
|
|
96
97
|
TurboModuleManager::TurboModuleManager(
|
|
97
|
-
RuntimeExecutor runtimeExecutor,
|
|
98
98
|
std::shared_ptr<CallInvoker> jsCallInvoker,
|
|
99
99
|
std::shared_ptr<NativeMethodCallInvoker> nativeMethodCallInvoker,
|
|
100
100
|
jni::alias_ref<TurboModuleManagerDelegate::javaobject> delegate)
|
|
101
|
-
:
|
|
102
|
-
jsCallInvoker_(std::move(jsCallInvoker)),
|
|
101
|
+
: jsCallInvoker_(std::move(jsCallInvoker)),
|
|
103
102
|
nativeMethodCallInvoker_(std::move(nativeMethodCallInvoker)),
|
|
104
103
|
delegate_(jni::make_global(delegate)) {}
|
|
105
104
|
|
|
106
105
|
jni::local_ref<TurboModuleManager::jhybriddata> TurboModuleManager::initHybrid(
|
|
107
106
|
jni::alias_ref<jhybridobject> /* unused */,
|
|
108
|
-
jni::alias_ref<JRuntimeExecutor::javaobject> runtimeExecutor,
|
|
109
107
|
jni::alias_ref<CallInvokerHolder::javaobject> jsCallInvokerHolder,
|
|
110
108
|
jni::alias_ref<NativeMethodCallInvokerHolder::javaobject>
|
|
111
109
|
nativeMethodCallInvokerHolder,
|
|
112
110
|
jni::alias_ref<TurboModuleManagerDelegate::javaobject> delegate) {
|
|
113
111
|
return makeCxxInstance(
|
|
114
|
-
runtimeExecutor->cthis()->get(),
|
|
115
112
|
jsCallInvokerHolder->cthis()->getCallInvoker(),
|
|
116
113
|
nativeMethodCallInvokerHolder->cthis()->getNativeMethodCallInvoker(),
|
|
117
114
|
delegate);
|
|
@@ -125,10 +122,11 @@ void TurboModuleManager::registerNatives() {
|
|
|
125
122
|
});
|
|
126
123
|
}
|
|
127
124
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
return [
|
|
125
|
+
TurboModuleProviderFunctionTypeWithRuntime
|
|
126
|
+
TurboModuleManager::createTurboModuleProvider(
|
|
127
|
+
jni::alias_ref<jhybridobject> javaPart) {
|
|
128
|
+
return [weakJavaPart = jni::make_weak(javaPart)](
|
|
129
|
+
jsi::Runtime& runtime,
|
|
132
130
|
const std::string& name) -> std::shared_ptr<TurboModule> {
|
|
133
131
|
auto javaPart = weakJavaPart.lockLocal();
|
|
134
132
|
if (!javaPart) {
|
|
@@ -140,7 +138,7 @@ TurboModuleProviderFunctionType TurboModuleManager::createTurboModuleProvider(
|
|
|
140
138
|
return nullptr;
|
|
141
139
|
}
|
|
142
140
|
|
|
143
|
-
return cxxPart->getTurboModule(javaPart, name,
|
|
141
|
+
return cxxPart->getTurboModule(javaPart, name, runtime);
|
|
144
142
|
};
|
|
145
143
|
}
|
|
146
144
|
|
|
@@ -223,9 +221,19 @@ std::shared_ptr<TurboModule> TurboModuleManager::getTurboModule(
|
|
|
223
221
|
return nullptr;
|
|
224
222
|
}
|
|
225
223
|
|
|
226
|
-
|
|
224
|
+
TurboModuleProviderFunctionTypeWithRuntime
|
|
225
|
+
TurboModuleManager::createLegacyModuleProvider(
|
|
227
226
|
jni::alias_ref<jhybridobject> javaPart) {
|
|
227
|
+
bool shouldCreateLegacyModules =
|
|
228
|
+
ReactNativeFeatureFlags::enableBridgelessArchitecture() &&
|
|
229
|
+
ReactNativeFeatureFlags::useTurboModuleInterop();
|
|
230
|
+
|
|
231
|
+
if (!shouldCreateLegacyModules) {
|
|
232
|
+
return nullptr;
|
|
233
|
+
}
|
|
234
|
+
|
|
228
235
|
return [weakJavaPart = jni::make_weak(javaPart)](
|
|
236
|
+
jsi::Runtime& /*runtime*/,
|
|
229
237
|
const std::string& name) -> std::shared_ptr<TurboModule> {
|
|
230
238
|
auto javaPart = weakJavaPart.lockLocal();
|
|
231
239
|
if (!javaPart) {
|
|
@@ -312,20 +320,19 @@ std::shared_ptr<TurboModule> TurboModuleManager::getLegacyModule(
|
|
|
312
320
|
|
|
313
321
|
void TurboModuleManager::installJSIBindings(
|
|
314
322
|
jni::alias_ref<jhybridobject> javaPart,
|
|
315
|
-
|
|
323
|
+
jni::alias_ref<JRuntimeExecutor::javaobject> runtimeExecutor) {
|
|
316
324
|
auto cxxPart = javaPart->cthis();
|
|
317
325
|
if (cxxPart == nullptr || !cxxPart->jsCallInvoker_) {
|
|
318
326
|
return; // Runtime doesn't exist when attached to Chrome debugger.
|
|
319
327
|
}
|
|
320
328
|
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
});
|
|
329
|
+
runtimeExecutor->cthis()->get()(
|
|
330
|
+
[javaPart = jni::make_global(javaPart)](jsi::Runtime& runtime) {
|
|
331
|
+
TurboModuleBinding::install(
|
|
332
|
+
runtime,
|
|
333
|
+
createTurboModuleProvider(javaPart),
|
|
334
|
+
createLegacyModuleProvider(javaPart));
|
|
335
|
+
});
|
|
329
336
|
}
|
|
330
337
|
|
|
331
338
|
} // namespace facebook::react
|
|
@@ -27,7 +27,6 @@ class TurboModuleManager : public jni::HybridClass<TurboModuleManager> {
|
|
|
27
27
|
static auto constexpr kJavaDescriptor = "Lcom/facebook/react/internal/turbomodule/core/TurboModuleManager;";
|
|
28
28
|
static jni::local_ref<jhybriddata> initHybrid(
|
|
29
29
|
jni::alias_ref<jhybridobject> /* unused */,
|
|
30
|
-
jni::alias_ref<JRuntimeExecutor::javaobject> runtimeExecutor,
|
|
31
30
|
jni::alias_ref<CallInvokerHolder::javaobject> jsCallInvokerHolder,
|
|
32
31
|
jni::alias_ref<NativeMethodCallInvokerHolder::javaobject> nativeMethodCallInvokerHolder,
|
|
33
32
|
jni::alias_ref<TurboModuleManagerDelegate::javaobject> delegate);
|
|
@@ -52,20 +51,19 @@ class TurboModuleManager : public jni::HybridClass<TurboModuleManager> {
|
|
|
52
51
|
ModuleCache legacyModuleCache_;
|
|
53
52
|
|
|
54
53
|
explicit TurboModuleManager(
|
|
55
|
-
RuntimeExecutor runtimeExecutor,
|
|
56
54
|
std::shared_ptr<CallInvoker> jsCallInvoker,
|
|
57
55
|
std::shared_ptr<NativeMethodCallInvoker> nativeMethodCallInvoker,
|
|
58
56
|
jni::alias_ref<TurboModuleManagerDelegate::javaobject> delegate);
|
|
59
57
|
|
|
60
|
-
static void installJSIBindings(
|
|
61
|
-
|
|
62
|
-
static TurboModuleProviderFunctionType createTurboModuleProvider(
|
|
58
|
+
static void installJSIBindings(
|
|
63
59
|
jni::alias_ref<jhybridobject> javaPart,
|
|
64
|
-
|
|
60
|
+
jni::alias_ref<JRuntimeExecutor::javaobject> runtimeExecutor);
|
|
61
|
+
|
|
62
|
+
static TurboModuleProviderFunctionTypeWithRuntime createTurboModuleProvider(jni::alias_ref<jhybridobject> javaPart);
|
|
65
63
|
std::shared_ptr<TurboModule>
|
|
66
64
|
getTurboModule(jni::alias_ref<jhybridobject> javaPart, const std::string &name, jsi::Runtime &runtime);
|
|
67
65
|
|
|
68
|
-
static
|
|
66
|
+
static TurboModuleProviderFunctionTypeWithRuntime createLegacyModuleProvider(jni::alias_ref<jhybridobject> javaPart);
|
|
69
67
|
std::shared_ptr<TurboModule> getLegacyModule(jni::alias_ref<jhybridobject> javaPart, const std::string &name);
|
|
70
68
|
};
|
|
71
69
|
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
<string name="menu_description" gender="unknown">मेनु</string>
|
|
12
12
|
<string name="menubar_description" gender="unknown">मेनु बार</string>
|
|
13
13
|
<string name="menuitem_description" gender="unknown">मेनु वस्तु</string>
|
|
14
|
+
<string name="progressbar_description" gender="unknown">प्रोगेस बार</string>
|
|
14
15
|
<string name="scrollbar_description" gender="unknown">स्क्रोल बार</string>
|
|
15
16
|
<string name="spinbutton_description" gender="unknown">स्पिन बटन</string>
|
|
16
17
|
<string name="rn_tab_description" gender="unknown">टयाब</string>
|
|
@@ -22,7 +22,7 @@ constexpr struct {
|
|
|
22
22
|
int32_t Major = 0;
|
|
23
23
|
int32_t Minor = 84;
|
|
24
24
|
int32_t Patch = 0;
|
|
25
|
-
std::string_view Prerelease = "nightly-
|
|
25
|
+
std::string_view Prerelease = "nightly-20251231-50f310dab";
|
|
26
26
|
} ReactNativeVersion;
|
|
27
27
|
|
|
28
28
|
} // namespace facebook::react
|
|
@@ -143,7 +143,13 @@ class JSI_EXPORT TurboModule : public jsi::HostObject {
|
|
|
143
143
|
/**
|
|
144
144
|
* An app/platform-specific provider function to get an instance of a module
|
|
145
145
|
* given a name.
|
|
146
|
+
*
|
|
147
|
+
* @deprecated Use TurboModuleProviderFunctionTypeWithRuntime instead.
|
|
148
|
+
* Remove after React Native 0.84 is released.
|
|
146
149
|
*/
|
|
147
|
-
using TurboModuleProviderFunctionType
|
|
150
|
+
using TurboModuleProviderFunctionType [[deprecated("Use TurboModuleProviderFunctionTypeWithRuntime instead")]] =
|
|
151
|
+
std::function<std::shared_ptr<TurboModule>(const std::string &name)>;
|
|
152
|
+
using TurboModuleProviderFunctionTypeWithRuntime =
|
|
153
|
+
std::function<std::shared_ptr<TurboModule>(jsi::Runtime &runtime, const std::string &name)>;
|
|
148
154
|
|
|
149
155
|
} // namespace facebook::react
|
|
@@ -19,24 +19,25 @@ namespace facebook::react {
|
|
|
19
19
|
|
|
20
20
|
class BridgelessNativeModuleProxy : public jsi::HostObject {
|
|
21
21
|
TurboModuleBinding turboBinding_;
|
|
22
|
-
std::
|
|
22
|
+
std::optional<TurboModuleBinding> legacyBinding_;
|
|
23
23
|
|
|
24
24
|
public:
|
|
25
25
|
BridgelessNativeModuleProxy(
|
|
26
26
|
jsi::Runtime& runtime,
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
TurboModuleProviderFunctionTypeWithRuntime&& moduleProvider,
|
|
28
|
+
TurboModuleProviderFunctionTypeWithRuntime&& legacyModuleProvider,
|
|
29
29
|
std::shared_ptr<LongLivedObjectCollection> longLivedObjectCollection)
|
|
30
30
|
: turboBinding_(
|
|
31
31
|
runtime,
|
|
32
32
|
std::move(moduleProvider),
|
|
33
33
|
longLivedObjectCollection),
|
|
34
34
|
legacyBinding_(
|
|
35
|
-
legacyModuleProvider
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
legacyModuleProvider
|
|
36
|
+
? std::make_optional<TurboModuleBinding>(TurboModuleBinding(
|
|
37
|
+
runtime,
|
|
38
|
+
std::move(legacyModuleProvider),
|
|
39
|
+
longLivedObjectCollection))
|
|
40
|
+
: std::nullopt) {}
|
|
40
41
|
|
|
41
42
|
jsi::Value get(jsi::Runtime& runtime, const jsi::PropNameID& name) override {
|
|
42
43
|
/**
|
|
@@ -88,7 +89,7 @@ class BridgelessNativeModuleProxy : public jsi::HostObject {
|
|
|
88
89
|
|
|
89
90
|
TurboModuleBinding::TurboModuleBinding(
|
|
90
91
|
jsi::Runtime& runtime,
|
|
91
|
-
|
|
92
|
+
TurboModuleProviderFunctionTypeWithRuntime&& moduleProvider,
|
|
92
93
|
std::shared_ptr<LongLivedObjectCollection> longLivedObjectCollection)
|
|
93
94
|
: runtime_(runtime),
|
|
94
95
|
moduleProvider_(std::move(moduleProvider)),
|
|
@@ -99,6 +100,25 @@ void TurboModuleBinding::install(
|
|
|
99
100
|
TurboModuleProviderFunctionType&& moduleProvider,
|
|
100
101
|
TurboModuleProviderFunctionType&& legacyModuleProvider,
|
|
101
102
|
std::shared_ptr<LongLivedObjectCollection> longLivedObjectCollection) {
|
|
103
|
+
install(
|
|
104
|
+
runtime,
|
|
105
|
+
[moduleProvider = std::move(moduleProvider)](
|
|
106
|
+
jsi::Runtime& runtime, const std::string& name) {
|
|
107
|
+
return moduleProvider(name);
|
|
108
|
+
},
|
|
109
|
+
legacyModuleProvider == nullptr
|
|
110
|
+
? (TurboModuleProviderFunctionTypeWithRuntime) nullptr
|
|
111
|
+
: [legacyModuleProvider = std::move(legacyModuleProvider)](
|
|
112
|
+
jsi::Runtime& runtime,
|
|
113
|
+
const std::string& name) { return legacyModuleProvider(name); },
|
|
114
|
+
longLivedObjectCollection);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
void TurboModuleBinding::install(
|
|
118
|
+
jsi::Runtime& runtime,
|
|
119
|
+
TurboModuleProviderFunctionTypeWithRuntime&& moduleProvider,
|
|
120
|
+
TurboModuleProviderFunctionTypeWithRuntime&& legacyModuleProvider,
|
|
121
|
+
std::shared_ptr<LongLivedObjectCollection> longLivedObjectCollection) {
|
|
102
122
|
// TODO(T208105802): We can get this information from the native side!
|
|
103
123
|
auto isBridgeless = runtime.global().hasProperty(runtime, "RN$Bridgeless");
|
|
104
124
|
|
|
@@ -153,7 +173,7 @@ jsi::Value TurboModuleBinding::getModule(
|
|
|
153
173
|
std::shared_ptr<TurboModule> module;
|
|
154
174
|
{
|
|
155
175
|
TraceSection s("TurboModuleBinding::moduleProvider", "module", moduleName);
|
|
156
|
-
module = moduleProvider_(moduleName);
|
|
176
|
+
module = moduleProvider_(runtime, moduleName);
|
|
157
177
|
}
|
|
158
178
|
if (module) {
|
|
159
179
|
TurboModuleWithJSIBindings::installJSIBindings(module, runtime);
|
|
@@ -26,23 +26,34 @@ class TurboModuleBinding final {
|
|
|
26
26
|
/*
|
|
27
27
|
* Installs TurboModuleBinding into JavaScript runtime.
|
|
28
28
|
* Thread synchronization must be enforced externally.
|
|
29
|
+
*
|
|
30
|
+
* @deprecated Use the overload that takes
|
|
31
|
+
* TurboModuleProviderFunctionTypeWithRuntime instead.
|
|
32
|
+
* Remove after React Native 0.84 is released.
|
|
29
33
|
*/
|
|
34
|
+
[[deprecated("Use the overload that takes TurboModuleProviderFunctionTypeWithRuntime instead")]]
|
|
30
35
|
static void install(
|
|
31
36
|
jsi::Runtime &runtime,
|
|
32
37
|
TurboModuleProviderFunctionType &&moduleProvider,
|
|
33
38
|
TurboModuleProviderFunctionType &&legacyModuleProvider = nullptr,
|
|
34
39
|
std::shared_ptr<LongLivedObjectCollection> longLivedObjectCollection = nullptr);
|
|
35
40
|
|
|
36
|
-
|
|
41
|
+
static void install(
|
|
37
42
|
jsi::Runtime &runtime,
|
|
38
|
-
|
|
39
|
-
|
|
43
|
+
TurboModuleProviderFunctionTypeWithRuntime &&moduleProvider,
|
|
44
|
+
TurboModuleProviderFunctionTypeWithRuntime &&legacyModuleProvider = nullptr,
|
|
45
|
+
std::shared_ptr<LongLivedObjectCollection> longLivedObjectCollection = nullptr);
|
|
40
46
|
|
|
41
47
|
~TurboModuleBinding();
|
|
42
48
|
|
|
43
49
|
private:
|
|
44
50
|
friend BridgelessNativeModuleProxy;
|
|
45
51
|
|
|
52
|
+
TurboModuleBinding(
|
|
53
|
+
jsi::Runtime &runtime,
|
|
54
|
+
TurboModuleProviderFunctionTypeWithRuntime &&moduleProvider,
|
|
55
|
+
std::shared_ptr<LongLivedObjectCollection> longLivedObjectCollection);
|
|
56
|
+
|
|
46
57
|
/**
|
|
47
58
|
* A lookup function exposed to JS to get an instance of a TurboModule
|
|
48
59
|
* for the given name.
|
|
@@ -50,7 +61,7 @@ class TurboModuleBinding final {
|
|
|
50
61
|
jsi::Value getModule(jsi::Runtime &runtime, const std::string &moduleName) const;
|
|
51
62
|
|
|
52
63
|
jsi::Runtime &runtime_;
|
|
53
|
-
|
|
64
|
+
TurboModuleProviderFunctionTypeWithRuntime moduleProvider_;
|
|
54
65
|
std::shared_ptr<LongLivedObjectCollection> longLivedObjectCollection_;
|
|
55
66
|
};
|
|
56
67
|
|
package/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModuleManager.mm
CHANGED
|
@@ -916,8 +916,8 @@ typedef struct {
|
|
|
916
916
|
* aren't any strong references to it in ObjC. Hence, we give
|
|
917
917
|
* __turboModuleProxy a strong reference to TurboModuleManager.
|
|
918
918
|
*/
|
|
919
|
-
auto turboModuleProvider =
|
|
920
|
-
|
|
919
|
+
auto turboModuleProvider =
|
|
920
|
+
[self](jsi::Runtime &runtime, const std::string &name) -> std::shared_ptr<react::TurboModule> {
|
|
921
921
|
auto moduleName = name.c_str();
|
|
922
922
|
|
|
923
923
|
TurboModulePerfLogger::moduleJSRequireBeginningStart(moduleName);
|
|
@@ -931,7 +931,7 @@ typedef struct {
|
|
|
931
931
|
* Additionally, if a TurboModule with the name `name` isn't found, then we
|
|
932
932
|
* trigger an assertion failure.
|
|
933
933
|
*/
|
|
934
|
-
auto turboModule = [self provideTurboModule:moduleName runtime
|
|
934
|
+
auto turboModule = [self provideTurboModule:moduleName runtime:&runtime];
|
|
935
935
|
|
|
936
936
|
if (moduleWasNotInitialized && [self moduleIsInitialized:moduleName]) {
|
|
937
937
|
[self->_bridge.performanceLogger markStopForTag:RCTPLTurboModuleSetup];
|
|
@@ -946,7 +946,8 @@ typedef struct {
|
|
|
946
946
|
};
|
|
947
947
|
|
|
948
948
|
if (RCTTurboModuleInteropEnabled()) {
|
|
949
|
-
auto legacyModuleProvider =
|
|
949
|
+
auto legacyModuleProvider =
|
|
950
|
+
[self](jsi::Runtime & /*runtime*/, const std::string &name) -> std::shared_ptr<react::TurboModule> {
|
|
950
951
|
auto moduleName = name.c_str();
|
|
951
952
|
|
|
952
953
|
TurboModulePerfLogger::moduleJSRequireBeginningStart(moduleName);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native",
|
|
3
|
-
"version": "0.84.0-nightly-
|
|
3
|
+
"version": "0.84.0-nightly-20251231-50f310dab",
|
|
4
4
|
"description": "A framework for building native apps using React",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
},
|
|
152
152
|
"peerDependencies": {
|
|
153
153
|
"@types/react": "^19.1.1",
|
|
154
|
-
"react": "^19.2.
|
|
154
|
+
"react": "^19.2.3"
|
|
155
155
|
},
|
|
156
156
|
"peerDependenciesMeta": {
|
|
157
157
|
"@types/react": {
|
|
@@ -160,13 +160,13 @@
|
|
|
160
160
|
},
|
|
161
161
|
"dependencies": {
|
|
162
162
|
"@jest/create-cache-key-function": "^29.7.0",
|
|
163
|
-
"@react-native/assets-registry": "0.84.0-nightly-
|
|
164
|
-
"@react-native/codegen": "0.84.0-nightly-
|
|
165
|
-
"@react-native/community-cli-plugin": "0.84.0-nightly-
|
|
166
|
-
"@react-native/gradle-plugin": "0.84.0-nightly-
|
|
167
|
-
"@react-native/js-polyfills": "0.84.0-nightly-
|
|
168
|
-
"@react-native/normalize-colors": "0.84.0-nightly-
|
|
169
|
-
"@react-native/virtualized-lists": "0.84.0-nightly-
|
|
163
|
+
"@react-native/assets-registry": "0.84.0-nightly-20251231-50f310dab",
|
|
164
|
+
"@react-native/codegen": "0.84.0-nightly-20251231-50f310dab",
|
|
165
|
+
"@react-native/community-cli-plugin": "0.84.0-nightly-20251231-50f310dab",
|
|
166
|
+
"@react-native/gradle-plugin": "0.84.0-nightly-20251231-50f310dab",
|
|
167
|
+
"@react-native/js-polyfills": "0.84.0-nightly-20251231-50f310dab",
|
|
168
|
+
"@react-native/normalize-colors": "0.84.0-nightly-20251231-50f310dab",
|
|
169
|
+
"@react-native/virtualized-lists": "0.84.0-nightly-20251231-50f310dab",
|
|
170
170
|
"abort-controller": "^3.0.0",
|
|
171
171
|
"anser": "^1.4.9",
|
|
172
172
|
"ansi-regex": "^5.0.0",
|