react-native 0.83.0-rc.0 → 0.84.0-nightly-20251105-5ec5cc3a3

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.
Files changed (82) hide show
  1. package/Libraries/AppDelegate/RCTReactNativeFactory.h +3 -0
  2. package/Libraries/AppDelegate/RCTReactNativeFactory.mm +12 -0
  3. package/Libraries/AppDelegate/RCTRootViewFactory.h +10 -4
  4. package/Libraries/AppDelegate/RCTRootViewFactory.mm +21 -5
  5. package/Libraries/Core/ReactNativeVersion.js +2 -2
  6. package/Libraries/StyleSheet/StyleSheetTypes.d.ts +2 -2
  7. package/Libraries/Text/TextInput/RCTBaseTextInputView.mm +3 -0
  8. package/React/Base/RCTBundleManager.h +59 -7
  9. package/React/Base/RCTBundleManager.m +98 -0
  10. package/React/Base/RCTBundleURLProvider.h +24 -0
  11. package/React/Base/RCTBundleURLProvider.mm +49 -4
  12. package/React/Base/RCTVersion.m +2 -2
  13. package/React/CoreModules/RCTPlatform.mm +3 -2
  14. package/React/CxxBridge/RCTCxxBridge.mm +1 -2
  15. package/React/CxxModule/RCTCxxUtils.mm +1 -11
  16. package/React/FBReactNativeSpec/FBReactNativeSpecJSI.h +127 -135
  17. package/ReactAndroid/gradle.properties +1 -1
  18. package/ReactAndroid/src/main/java/com/facebook/react/ReactDelegate.kt +7 -7
  19. package/ReactAndroid/src/main/java/com/facebook/react/ViewManagerOnDemandReactPackage.kt +53 -4
  20. package/ReactAndroid/src/main/java/com/facebook/react/devsupport/CxxInspectorPackagerConnection.kt +99 -9
  21. package/ReactAndroid/src/main/java/com/facebook/react/devsupport/inspector/InspectorNetworkHelper.kt +1 -1
  22. package/ReactAndroid/src/main/java/com/facebook/react/devsupport/perfmonitor/PerfMonitorOverlayManager.kt +22 -1
  23. package/ReactAndroid/src/main/java/com/facebook/react/devsupport/perfmonitor/PerfMonitorOverlayView.kt +4 -3
  24. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt +2 -8
  25. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt +1 -11
  26. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt +1 -3
  27. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +1 -3
  28. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt +1 -12
  29. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt +1 -3
  30. package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.kt +2 -2
  31. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/JSTouchDispatcher.kt +1 -2
  32. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactAxOrderHelper.kt +47 -0
  33. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/PointerEvent.kt +5 -4
  34. package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollView.java +23 -3
  35. package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java +7 -2
  36. package/ReactAndroid/src/main/jni/react/devsupport/JCxxInspectorPackagerConnectionWebSocket.cpp +29 -2
  37. package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp +1 -15
  38. package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h +1 -4
  39. package/ReactAndroid/src/main/jni/react/jni/JSLoader.cpp +1 -1
  40. package/ReactAndroid/src/main/jni/react/jni/JSLoader.h +2 -1
  41. package/ReactAndroid/src/main/res/devsupport/drawable/ic_perf_issue.xml +10 -0
  42. package/ReactCommon/cxxreact/JSBigString.h +14 -5
  43. package/ReactCommon/cxxreact/JSIndexedRAMBundle.cpp +4 -5
  44. package/ReactCommon/cxxreact/ReactNativeVersion.h +3 -3
  45. package/ReactCommon/jsiexecutor/jsireact/JSIExecutor.cpp +2 -3
  46. package/ReactCommon/jsiexecutor/jsireact/JSIExecutor.h +2 -2
  47. package/ReactCommon/jsinspector-modern/PerfMonitorV2.cpp +9 -1
  48. package/ReactCommon/jsinspector-modern/PerfMonitorV2.h +4 -1
  49. package/ReactCommon/jsinspector-modern/TracingAgent.cpp +1 -7
  50. package/ReactCommon/jsinspector-modern/tests/NetworkReporterTest.cpp +3 -55
  51. package/ReactCommon/jsinspector-modern/tests/TracingTest.h +82 -0
  52. package/ReactCommon/jsinspector-modern/tracing/PerformanceTracer.cpp +99 -0
  53. package/ReactCommon/jsinspector-modern/tracing/PerformanceTracer.h +47 -1
  54. package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp +1 -5
  55. package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h +2 -7
  56. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp +18 -36
  57. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h +2 -4
  58. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +1 -5
  59. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h +1 -10
  60. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h +1 -2
  61. package/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModuleManager.mm +4 -27
  62. package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp +1 -6
  63. package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h +1 -3
  64. package/ReactCommon/react/performance/cdpmetrics/CdpPerfIssuesReporter.cpp +4 -2
  65. package/ReactCommon/react/renderer/css/CSSSyntaxParser.h +7 -0
  66. package/ReactCommon/react/runtime/ReactInstance.cpp +4 -4
  67. package/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTHost.h +3 -2
  68. package/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTHost.mm +10 -6
  69. package/ReactCommon/yoga/yoga/style/StyleLength.h +7 -0
  70. package/ReactCommon/yoga/yoga/style/StyleSizeLength.h +7 -0
  71. package/package.json +9 -9
  72. package/sdks/hermes-engine/version.properties +1 -1
  73. package/src/private/components/virtualview/VirtualView.js +16 -9
  74. package/src/private/components/virtualview/logger/VirtualViewLogger.js +21 -0
  75. package/src/private/components/virtualview/logger/VirtualViewLoggerTypes.js +24 -0
  76. package/src/private/featureflags/ReactNativeFeatureFlags.js +2 -7
  77. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +1 -2
  78. package/src/private/webapis/intersectionobserver/IntersectionObserver.js +48 -0
  79. package/types_generated/src/private/components/virtualview/VirtualView.d.ts +3 -1
  80. package/React/CxxModule/RCTCxxModule.h +0 -29
  81. package/React/CxxModule/RCTCxxModule.mm +0 -87
  82. package/sdks/.hermesversion +0 -1
@@ -24,6 +24,7 @@
24
24
  @class RCTBridge;
25
25
  @protocol RCTComponentViewProtocol;
26
26
  @class RCTSurfacePresenterBridgeAdapter;
27
+ @class RCTBundleConfiguration;
27
28
  @class RCTDevMenuConfiguration;
28
29
 
29
30
  NS_ASSUME_NONNULL_BEGIN
@@ -117,6 +118,8 @@ typedef NS_ENUM(NSInteger, RCTReleaseLevel) { Canary, Experimental, Stable };
117
118
 
118
119
  @property (nonatomic, weak) id<RCTReactNativeFactoryDelegate> delegate;
119
120
 
121
+ @property (nonatomic, strong, nonnull) RCTBundleConfiguration *bundleConfiguration;
122
+
120
123
  @property (nonatomic, nullable) RCTDevMenuConfiguration *devMenuConfiguration;
121
124
 
122
125
  @end
@@ -6,6 +6,7 @@
6
6
  */
7
7
 
8
8
  #import "RCTReactNativeFactory.h"
9
+ #import <React/RCTBundleManager.h>
9
10
  #import <React/RCTColorSpaceUtils.h>
10
11
  #import <React/RCTDevMenu.h>
11
12
  #import <React/RCTLog.h>
@@ -42,6 +43,8 @@ using namespace facebook::react;
42
43
 
43
44
  @implementation RCTReactNativeFactory
44
45
 
46
+ @synthesize bundleConfiguration = _bundleConfiguration;
47
+
45
48
  - (instancetype)initWithDelegate:(id<RCTReactNativeFactoryDelegate>)delegate
46
49
  {
47
50
  return [self initWithDelegate:delegate releaseLevel:Stable];
@@ -84,6 +87,7 @@ using namespace facebook::react;
84
87
  UIView *rootView = [self.rootViewFactory viewWithModuleName:moduleName
85
88
  initialProperties:initialProperties
86
89
  launchOptions:launchOptions
90
+ bundleConfiguration:self.bundleConfiguration
87
91
  devMenuConfiguration:self.devMenuConfiguration];
88
92
  UIViewController *rootViewController = [_delegate createRootViewController];
89
93
  [_delegate setRootView:rootView toRootViewController:rootViewController];
@@ -112,6 +116,14 @@ using namespace facebook::react;
112
116
  return _delegate.bundleURL;
113
117
  }
114
118
 
119
+ - (RCTBundleConfiguration *)bundleConfiguration
120
+ {
121
+ if (_bundleConfiguration == nullptr) {
122
+ _bundleConfiguration = [RCTBundleConfiguration defaultConfiguration];
123
+ }
124
+ return _bundleConfiguration;
125
+ }
126
+
115
127
  #pragma mark - RCTJSRuntimeConfiguratorProtocol
116
128
 
117
129
  - (JSRuntimeFactoryRef)createJSRuntimeFactory
@@ -18,6 +18,7 @@
18
18
  @class RCTHost;
19
19
  @class RCTRootView;
20
20
  @class RCTSurfacePresenterBridgeAdapter;
21
+ @class RCTBundleConfiguration;
21
22
  @class RCTDevMenuConfiguration;
22
23
 
23
24
  NS_ASSUME_NONNULL_BEGIN
@@ -202,12 +203,14 @@ typedef void (^RCTLoadSourceForBridgeBlock)(RCTBridge *bridge, RCTSourceLoadBloc
202
203
  * @parameter: moduleName - the name of the app, used by Metro to resolve the module.
203
204
  * @parameter: initialProperties - a set of initial properties.
204
205
  * @parameter: launchOptions - a dictionary with a set of options.
206
+ * @parameter: bundleConfiguration - a configuration for custom bundle source URL.
205
207
  * @parameter: devMenuConfiguration - a configuration for enabling/disabling dev menu.
206
208
  */
207
209
  - (UIView *_Nonnull)viewWithModuleName:(NSString *)moduleName
208
210
  initialProperties:(NSDictionary *__nullable)initialProperties
209
211
  launchOptions:(NSDictionary *__nullable)launchOptions
210
- devMenuConfiguration:(RCTDevMenuConfiguration *__nullable)devMenuConfiguration;
212
+ bundleConfiguration:(RCTBundleConfiguration *)bundleConfiguration
213
+ devMenuConfiguration:(RCTDevMenuConfiguration *)devMenuConfiguration;
211
214
 
212
215
  - (UIView *_Nonnull)viewWithModuleName:(NSString *)moduleName
213
216
  initialProperties:(NSDictionary *__nullable)initialProperties
@@ -226,15 +229,18 @@ typedef void (^RCTLoadSourceForBridgeBlock)(RCTBridge *bridge, RCTSourceLoadBloc
226
229
  * Use it to speed up later viewWithModuleName: calls.
227
230
  *
228
231
  * @parameter: launchOptions - a dictionary with a set of options.
232
+ * @parameter: bundleConfiguration - a configuration for custom bundle source URL.
229
233
  * @parameter: devMenuConfiguration - a configuration for enabling/disabling dev menu.
230
234
  */
231
235
  - (void)initializeReactHostWithLaunchOptions:(NSDictionary *__nullable)launchOptions
236
+ bundleConfiguration:(RCTBundleConfiguration *)bundleConfiguration
232
237
  devMenuConfiguration:(RCTDevMenuConfiguration *)devMenuConfiguration;
233
238
 
234
- - (RCTHost *)createReactHost:(NSDictionary *__nullable)launchOptions;
235
-
236
239
  - (RCTHost *)createReactHost:(NSDictionary *__nullable)launchOptions
237
- devMenuConfiguration:(RCTDevMenuConfiguration *__nullable)devMenuConfiguration;
240
+ bundleConfiguration:(RCTBundleConfiguration *)bundleConfiguration
241
+ devMenuConfiguration:(RCTDevMenuConfiguration *)devMenuConfiguration;
242
+
243
+ - (RCTHost *)createReactHost:(NSDictionary *__nullable)launchOptions;
238
244
 
239
245
  @end
240
246
 
@@ -21,7 +21,6 @@
21
21
  #else
22
22
  #import <React/CoreModulesPlugins.h>
23
23
  #endif
24
- #import <React/RCTBundleURLProvider.h>
25
24
  #import <React/RCTComponentViewFactory.h>
26
25
  #import <React/RCTComponentViewProtocol.h>
27
26
  #import <React/RCTFabricSurface.h>
@@ -137,6 +136,7 @@
137
136
  return [self viewWithModuleName:moduleName
138
137
  initialProperties:initialProperties
139
138
  launchOptions:nil
139
+ bundleConfiguration:[RCTBundleConfiguration defaultConfiguration]
140
140
  devMenuConfiguration:[RCTDevMenuConfiguration defaultConfiguration]];
141
141
  }
142
142
 
@@ -145,17 +145,21 @@
145
145
  return [self viewWithModuleName:moduleName
146
146
  initialProperties:nil
147
147
  launchOptions:nil
148
+ bundleConfiguration:[RCTBundleConfiguration defaultConfiguration]
148
149
  devMenuConfiguration:[RCTDevMenuConfiguration defaultConfiguration]];
149
150
  }
150
151
 
151
152
  - (void)initializeReactHostWithLaunchOptions:(NSDictionary *)launchOptions
153
+ bundleConfiguration:(RCTBundleConfiguration *)bundleConfiguration
152
154
  devMenuConfiguration:(RCTDevMenuConfiguration *)devMenuConfiguration
153
155
  {
154
156
  // Enable TurboModule interop by default in Bridgeless mode
155
157
  RCTEnableTurboModuleInterop(YES);
156
158
  RCTEnableTurboModuleInteropBridgeProxy(YES);
157
159
 
158
- [self createReactHostIfNeeded:launchOptions devMenuConfiguration:devMenuConfiguration];
160
+ [self createReactHostIfNeeded:launchOptions
161
+ bundleConfiguration:bundleConfiguration
162
+ devMenuConfiguration:devMenuConfiguration];
159
163
  return;
160
164
  }
161
165
 
@@ -166,15 +170,19 @@
166
170
  return [self viewWithModuleName:moduleName
167
171
  initialProperties:initialProperties
168
172
  launchOptions:launchOptions
173
+ bundleConfiguration:[RCTBundleConfiguration defaultConfiguration]
169
174
  devMenuConfiguration:[RCTDevMenuConfiguration defaultConfiguration]];
170
175
  }
171
176
 
172
177
  - (UIView *)viewWithModuleName:(NSString *)moduleName
173
178
  initialProperties:(NSDictionary *)initProps
174
179
  launchOptions:(NSDictionary *)launchOptions
180
+ bundleConfiguration:(RCTBundleConfiguration *)bundleConfiguration
175
181
  devMenuConfiguration:(RCTDevMenuConfiguration *)devMenuConfiguration
176
182
  {
177
- [self initializeReactHostWithLaunchOptions:launchOptions devMenuConfiguration:devMenuConfiguration];
183
+ [self initializeReactHostWithLaunchOptions:launchOptions
184
+ bundleConfiguration:bundleConfiguration
185
+ devMenuConfiguration:devMenuConfiguration];
178
186
 
179
187
  RCTFabricSurface *surface = [self.reactHost createSurfaceWithModuleName:moduleName
180
188
  initialProperties:initProps ? initProps : @{}];
@@ -245,20 +253,27 @@
245
253
  #pragma mark - New Arch Utilities
246
254
 
247
255
  - (void)createReactHostIfNeeded:(NSDictionary *)launchOptions
256
+ bundleConfiguration:(RCTBundleConfiguration *)bundleConfiguration
248
257
  devMenuConfiguration:(RCTDevMenuConfiguration *)devMenuConfiguration
249
258
  {
250
259
  if (self.reactHost) {
251
260
  return;
252
261
  }
253
- self.reactHost = [self createReactHost:launchOptions devMenuConfiguration:devMenuConfiguration];
262
+
263
+ self.reactHost = [self createReactHost:launchOptions
264
+ bundleConfiguration:bundleConfiguration
265
+ devMenuConfiguration:devMenuConfiguration];
254
266
  }
255
267
 
256
268
  - (RCTHost *)createReactHost:(NSDictionary *)launchOptions
257
269
  {
258
- return [self createReactHost:launchOptions devMenuConfiguration:[RCTDevMenuConfiguration defaultConfiguration]];
270
+ return [self createReactHost:launchOptions
271
+ bundleConfiguration:[RCTBundleConfiguration defaultConfiguration]
272
+ devMenuConfiguration:[RCTDevMenuConfiguration defaultConfiguration]];
259
273
  }
260
274
 
261
275
  - (RCTHost *)createReactHost:(NSDictionary *)launchOptions
276
+ bundleConfiguration:(RCTBundleConfiguration *)bundleConfiguration
262
277
  devMenuConfiguration:(RCTDevMenuConfiguration *)devMenuConfiguration
263
278
  {
264
279
  __weak __typeof(self) weakSelf = self;
@@ -270,6 +285,7 @@
270
285
  return [weakSelf createJSRuntimeFactory];
271
286
  }
272
287
  launchOptions:launchOptions
288
+ bundleConfiguration:bundleConfiguration
273
289
  devMenuConfiguration:devMenuConfiguration];
274
290
  [reactHost setBundleURLProvider:^NSURL *() {
275
291
  return [weakSelf bundleURL];
@@ -27,9 +27,9 @@
27
27
  */
28
28
  export default class ReactNativeVersion {
29
29
  static major: number = 0;
30
- static minor: number = 83;
30
+ static minor: number = 84;
31
31
  static patch: number = 0;
32
- static prerelease: string | null = 'rc.0';
32
+ static prerelease: string | null = 'nightly-20251105-5ec5cc3a3';
33
33
 
34
34
  static getVersionString(): string {
35
35
  return `${this.major}.${this.minor}.${this.patch}${this.prerelease != null ? `-${this.prerelease}` : ''}`;
@@ -343,8 +343,8 @@ export type DropShadowValue = {
343
343
  export type BoxShadowValue = {
344
344
  offsetX: number | string;
345
345
  offsetY: number | string;
346
- color?: string | undefined;
347
- blurRadius?: ColorValue | number | undefined;
346
+ color?: ColorValue | undefined;
347
+ blurRadius?: string | number | undefined;
348
348
  spreadDistance?: number | string | undefined;
349
349
  inset?: boolean | undefined;
350
350
  };
@@ -727,6 +727,9 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithFrame : (CGRect)frame)
727
727
  return @"Join";
728
728
  case UIReturnKeyEmergencyCall:
729
729
  return @"Emergency Call";
730
+ case UIReturnKeyDefault:
731
+ case UIReturnKeyContinue:
732
+ case UIReturnKeyDone:
730
733
  default:
731
734
  return @"Done";
732
735
  }
@@ -9,19 +9,71 @@
9
9
 
10
10
  @class RCTBridge;
11
11
 
12
- typedef NSURL * (^RCTBridgelessBundleURLGetter)(void);
13
- typedef void (^RCTBridgelessBundleURLSetter)(NSURL *bundleURL);
12
+ typedef NSURL *_Nullable (^RCTBridgelessBundleURLGetter)(void);
13
+ typedef void (^RCTBridgelessBundleURLSetter)(NSURL *_Nullable bundleURL);
14
+ typedef NSMutableArray<NSURLQueryItem *> *_Nullable (^RCTPackagerOptionsUpdater)(
15
+ NSMutableArray<NSURLQueryItem *> *_Nullable options);
16
+
17
+ /**
18
+ * Configuration class for setting up custom bundle locations
19
+ */
20
+ @interface RCTBundleConfiguration : NSObject
21
+
22
+ + (nonnull instancetype)defaultConfiguration;
23
+
24
+ /**
25
+ * The URL of the bundle to load from the file system
26
+ */
27
+ @property (nonatomic, readonly, nullable) NSURL *bundleFilePath;
28
+
29
+ /**
30
+ * The server scheme (e.g. http or https) to use when loading from the packager
31
+ */
32
+ @property (nonatomic, readonly, nullable) NSString *packagerServerScheme;
33
+
34
+ /**
35
+ * The server host (e.g. localhost) to use when loading from the packager
36
+ */
37
+ @property (nonatomic, readonly, nullable) NSString *packagerServerHost;
38
+
39
+ /**
40
+ * A block that modifies the packager options when loading from the packager
41
+ */
42
+ @property (nonatomic, copy, nullable) RCTPackagerOptionsUpdater packagerOptionsUpdater;
43
+
44
+ /**
45
+ * The relative path to the bundle.
46
+ */
47
+ @property (nonatomic, readonly, nullable) NSString *bundlePath;
48
+
49
+ - (nonnull instancetype)initWithBundleFilePath:(nullable NSURL *)bundleFilePath;
50
+
51
+ - (nonnull instancetype)initWithPackagerServerScheme:(nullable NSString *)packagerServerScheme
52
+ packagerServerHost:(nullable NSString *)packagerServerHost
53
+ bundlePath:(nullable NSString *)bundlePath;
54
+
55
+ - (nullable NSURL *)getBundleURL;
56
+
57
+ - (nullable NSString *)getPackagerServerScheme;
58
+
59
+ - (nullable NSString *)getPackagerServerHost;
60
+
61
+ @end
14
62
 
15
63
  /**
16
64
  * A class that allows NativeModules/TurboModules to read/write the bundleURL, with or without the bridge.
17
65
  */
18
66
  @interface RCTBundleManager : NSObject
67
+
68
+ - (nullable instancetype)initWithBundleConfig:(nullable RCTBundleConfiguration *)bundleConfig;
69
+
19
70
  #ifndef RCT_REMOVE_LEGACY_ARCH
20
- - (void)setBridge:(RCTBridge *)bridge;
71
+ - (void)setBridge:(nullable RCTBridge *)bridge;
21
72
  #endif // RCT_REMOVE_LEGACY_ARCH
22
- - (void)setBridgelessBundleURLGetter:(RCTBridgelessBundleURLGetter)getter
23
- andSetter:(RCTBridgelessBundleURLSetter)setter
24
- andDefaultGetter:(RCTBridgelessBundleURLGetter)defaultGetter;
73
+ - (void)setBridgelessBundleURLGetter:(nullable RCTBridgelessBundleURLGetter)getter
74
+ andSetter:(nullable RCTBridgelessBundleURLSetter)setter
75
+ andDefaultGetter:(nullable RCTBridgelessBundleURLGetter)defaultGetter;
25
76
  - (void)resetBundleURL;
26
- @property NSURL *bundleURL;
77
+ @property (nonatomic, nullable) NSURL *bundleURL;
78
+ @property (nonatomic, nonnull) RCTBundleConfiguration *bundleConfig;
27
79
  @end
@@ -6,9 +6,93 @@
6
6
  */
7
7
 
8
8
  #import "RCTBundleManager.h"
9
+ #import <React/RCTBundleURLProvider.h>
9
10
  #import "RCTAssert.h"
10
11
  #import "RCTBridge+Private.h"
11
12
  #import "RCTBridge.h"
13
+ #import "RCTLog.h"
14
+
15
+ @implementation RCTBundleConfiguration
16
+
17
+ + (instancetype)defaultConfiguration
18
+ {
19
+ return [[self alloc] initWithBundleFilePath:nil packagerServerScheme:nil packagerServerHost:nil bundlePath:nil];
20
+ }
21
+
22
+ - (instancetype)initWithBundleFilePath:(NSURL *)bundleFilePath
23
+ {
24
+ return [self initWithBundleFilePath:bundleFilePath packagerServerScheme:nil packagerServerHost:nil bundlePath:nil];
25
+ }
26
+
27
+ - (instancetype)initWithPackagerServerScheme:(NSString *)packagerServerScheme
28
+ packagerServerHost:(NSString *)packagerServerHost
29
+ bundlePath:(NSString *)bundlePath
30
+ {
31
+ return [self initWithBundleFilePath:nil
32
+ packagerServerScheme:packagerServerScheme
33
+ packagerServerHost:packagerServerHost
34
+ bundlePath:bundlePath];
35
+ }
36
+
37
+ - (instancetype)initWithBundleFilePath:(NSURL *)bundleFilePath
38
+ packagerServerScheme:(NSString *)packagerServerScheme
39
+ packagerServerHost:(NSString *)packagerServerHost
40
+ bundlePath:(NSString *)bundlePath
41
+ {
42
+ if (self = [super init]) {
43
+ _bundleFilePath = bundleFilePath;
44
+ _packagerServerScheme = packagerServerScheme;
45
+ _packagerServerHost = packagerServerHost;
46
+ _bundlePath = bundlePath;
47
+ _packagerOptionsUpdater = ^NSMutableArray<NSURLQueryItem *> *(NSMutableArray<NSURLQueryItem *> *options)
48
+ {
49
+ return options;
50
+ };
51
+ }
52
+
53
+ return self;
54
+ }
55
+
56
+ - (NSString *)getPackagerServerScheme
57
+ {
58
+ if (!_packagerServerScheme) {
59
+ return [[RCTBundleURLProvider sharedSettings] packagerScheme];
60
+ }
61
+
62
+ return _packagerServerScheme;
63
+ }
64
+
65
+ - (NSString *)getPackagerServerHost
66
+ {
67
+ if (!_packagerServerHost) {
68
+ return [[RCTBundleURLProvider sharedSettings] packagerServerHostPort];
69
+ }
70
+
71
+ return _packagerServerHost;
72
+ }
73
+
74
+ - (NSURL *)getBundleURL
75
+ {
76
+ if (_packagerServerScheme && _packagerServerHost) {
77
+ return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:_bundlePath
78
+ packagerServerScheme:_packagerServerScheme
79
+ packagerServerHost:_packagerServerHost
80
+ packagerOptionsUpdater:_packagerOptionsUpdater];
81
+ }
82
+
83
+ if (_bundleFilePath) {
84
+ if (!_bundleFilePath.fileURL) {
85
+ RCTLogError(@"Bundle file path must be a file URL");
86
+ return nil;
87
+ }
88
+
89
+ return _bundleFilePath;
90
+ }
91
+
92
+ return nil;
93
+ }
94
+
95
+ @end
12
96
 
13
97
  @implementation RCTBundleManager {
14
98
  #ifndef RCT_REMOVE_LEGACY_ARCH
@@ -19,6 +103,20 @@
19
103
  RCTBridgelessBundleURLGetter _bridgelessBundleURLDefaultGetter;
20
104
  }
21
105
 
106
+ - (instancetype)initWithBundleConfig:(RCTBundleConfiguration *)bundleConfig
107
+ {
108
+ if (self = [super init]) {
109
+ self.bundleConfig = bundleConfig ? bundleConfig : [RCTBundleConfiguration defaultConfiguration];
110
+ }
111
+
112
+ return self;
113
+ }
114
+
115
+ - (instancetype)init
116
+ {
117
+ return [self initWithBundleConfig:[RCTBundleConfiguration defaultConfiguration]];
118
+ }
119
+
22
120
  #ifndef RCT_REMOVE_LEGACY_ARCH
23
121
  - (void)setBridge:(RCTBridge *)bridge
24
122
  {
@@ -7,6 +7,7 @@
7
7
 
8
8
  #import <Foundation/Foundation.h>
9
9
 
10
+ #import "RCTBundleManager.h"
10
11
  #import "RCTDefines.h"
11
12
 
12
13
  RCT_EXTERN NSString *_Nonnull const RCTBundleURLProviderUpdatedNotification;
@@ -88,6 +89,16 @@ NS_ASSUME_NONNULL_BEGIN
88
89
  */
89
90
  - (NSURL *__nullable)jsBundleURLForFallbackExtension:(NSString *__nullable)extension;
90
91
 
92
+ /**
93
+ * Returns the jsBundleURL for a given bundle entrypoint,
94
+ * the packager scheme, server host and options updater
95
+ * for modifying default packager options.
96
+ */
97
+ - (NSURL *__nullable)jsBundleURLForBundleRoot:(NSString *)bundleRoot
98
+ packagerServerScheme:(NSString *)packagerServerScheme
99
+ packagerServerHost:(NSString *)packagerServerHost
100
+ packagerOptionsUpdater:(RCTPackagerOptionsUpdater)packagerOptionsUpdater;
101
+
91
102
  /**
92
103
  * Returns the resourceURL for a given bundle entrypoint and
93
104
  * the fallback offline resource file if the packager is not running.
@@ -97,6 +108,19 @@ NS_ASSUME_NONNULL_BEGIN
97
108
  resourceExtension:(NSString *)extension
98
109
  offlineBundle:(NSBundle *)offlineBundle;
99
110
 
111
+ /**
112
+ * Returns the query items for given options used to create the jsBundleURL.
113
+ */
114
+ + (NSArray<NSURLQueryItem *> *)createJSBundleURLQuery:(NSString *)packagerHost
115
+ packagerScheme:(NSString *__nullable)scheme
116
+ enableDev:(BOOL)enableDev
117
+ enableMinification:(BOOL)enableMinification
118
+ inlineSourceMap:(BOOL)inlineSourceMap
119
+ modulesOnly:(BOOL)modulesOnly
120
+ runModule:(BOOL)runModule
121
+ additionalOptions:
122
+ (NSDictionary<NSString *, NSString *> *__nullable)additionalOptions;
123
+
100
124
  /**
101
125
  * The IP address or hostname of the packager.
102
126
  */
@@ -313,6 +313,54 @@ static NSURL *serverRootWithHostPort(NSString *hostPort, NSString *scheme)
313
313
  additionalOptions:(NSDictionary<NSString *, NSString *> *__nullable)additionalOptions
314
314
  {
315
315
  NSString *path = [NSString stringWithFormat:@"/%@.bundle", bundleRoot];
316
+ NSArray<NSURLQueryItem *> *queryItems = [self createJSBundleURLQuery:packagerHost
317
+ packagerScheme:scheme
318
+ enableDev:enableDev
319
+ enableMinification:enableMinification
320
+ inlineSourceMap:inlineSourceMap
321
+ modulesOnly:modulesOnly
322
+ runModule:runModule
323
+ additionalOptions:additionalOptions];
324
+
325
+ return [RCTBundleURLProvider resourceURLForResourcePath:path
326
+ packagerHost:packagerHost
327
+ scheme:scheme
328
+ queryItems:[queryItems copy]];
329
+ }
330
+
331
+ - (NSURL *)jsBundleURLForBundleRoot:(NSString *)bundleRoot
332
+ packagerServerScheme:(NSString *)packagerServerScheme
333
+ packagerServerHost:(NSString *)packagerServerHost
334
+ packagerOptionsUpdater:(RCTPackagerOptionsUpdater)packagerOptionsUpdater
335
+ {
336
+ NSArray<NSURLQueryItem *> *queryItems = [RCTBundleURLProvider createJSBundleURLQuery:packagerServerHost
337
+ packagerScheme:packagerServerScheme
338
+ enableDev:[self enableDev]
339
+ enableMinification:[self enableMinification]
340
+ inlineSourceMap:[self inlineSourceMap]
341
+ modulesOnly:NO
342
+ runModule:YES
343
+ additionalOptions:nil];
344
+
345
+ NSArray<NSURLQueryItem *> *updatedQueryItems = packagerOptionsUpdater((NSMutableArray *)queryItems);
346
+ NSString *path = [NSString stringWithFormat:@"/%@.bundle", bundleRoot];
347
+
348
+ return [RCTBundleURLProvider resourceURLForResourcePath:path
349
+ packagerHost:packagerServerHost
350
+ scheme:packagerServerScheme
351
+ queryItems:updatedQueryItems];
352
+ }
353
+
354
+ + (NSArray<NSURLQueryItem *> *)createJSBundleURLQuery:(NSString *)packagerHost
355
+ packagerScheme:(NSString *__nullable)scheme
356
+ enableDev:(BOOL)enableDev
357
+ enableMinification:(BOOL)enableMinification
358
+ inlineSourceMap:(BOOL)inlineSourceMap
359
+ modulesOnly:(BOOL)modulesOnly
360
+ runModule:(BOOL)runModule
361
+ additionalOptions:
362
+ (NSDictionary<NSString *, NSString *> *__nullable)additionalOptions
363
+ {
316
364
  BOOL lazy = enableDev;
317
365
  NSMutableArray<NSURLQueryItem *> *queryItems = [[NSMutableArray alloc] initWithArray:@[
318
366
  [[NSURLQueryItem alloc] initWithName:@"platform" value:RCTPlatformName],
@@ -345,10 +393,7 @@ static NSURL *serverRootWithHostPort(NSString *hostPort, NSString *scheme)
345
393
  }
346
394
  }
347
395
 
348
- return [[self class] resourceURLForResourcePath:path
349
- packagerHost:packagerHost
350
- scheme:scheme
351
- queryItems:[queryItems copy]];
396
+ return queryItems;
352
397
  }
353
398
 
354
399
  + (NSURL *)resourceURLForResourcePath:(NSString *)path
@@ -22,9 +22,9 @@ NSDictionary* RCTGetReactNativeVersion(void)
22
22
  dispatch_once(&onceToken, ^(void){
23
23
  __rnVersion = @{
24
24
  RCTVersionMajor: @(0),
25
- RCTVersionMinor: @(83),
25
+ RCTVersionMinor: @(84),
26
26
  RCTVersionPatch: @(0),
27
- RCTVersionPrerelease: @"rc.0",
27
+ RCTVersionPrerelease: @"nightly-20251105-5ec5cc3a3",
28
28
  };
29
29
  });
30
30
  return __rnVersion;
@@ -31,10 +31,11 @@ static NSString *interfaceIdiom(UIUserInterfaceIdiom idiom)
31
31
  return @"tv";
32
32
  case UIUserInterfaceIdiomCarPlay:
33
33
  return @"carplay";
34
- #if TARGET_OS_VISION
35
34
  case UIUserInterfaceIdiomVision:
36
35
  return @"vision";
37
- #endif
36
+ case UIUserInterfaceIdiomMac:
37
+ return @"mac";
38
+ case UIUserInterfaceIdiomUnspecified:
38
39
  default:
39
40
  return @"unknown";
40
41
  }
@@ -19,7 +19,6 @@
19
19
  #import <React/RCTConstants.h>
20
20
  #import <React/RCTConvert.h>
21
21
  #import <React/RCTCxxBridgeDelegate.h>
22
- #import <React/RCTCxxModule.h>
23
22
  #import <React/RCTCxxUtils.h>
24
23
  #import <React/RCTDevSettings.h>
25
24
  #import <React/RCTDisplayLink.h>
@@ -992,7 +991,7 @@ struct RCTInstanceCallback : public InstanceCallback {
992
991
  // modules on the main thread in parallel with loading the JS code, so
993
992
  // they will already be available before they are ever required.
994
993
  dispatch_block_t block = ^{
995
- if (self.valid && ![moduleData.moduleClass isSubclassOfClass:[RCTCxxModule class]]) {
994
+ if (self.valid) {
996
995
  [self->_performanceLogger appendStartForTag:RCTPLNativeModuleMainThread];
997
996
  (void)[moduleData instance];
998
997
  [moduleData gatherConstants];
@@ -13,7 +13,6 @@
13
13
  #import <jsi/jsi.h>
14
14
 
15
15
  #import "DispatchMessageQueueThread.h"
16
- #import "RCTCxxModule.h"
17
16
  #import "RCTNativeModule.h"
18
17
 
19
18
  namespace facebook::react {
@@ -27,16 +26,7 @@ createNativeModules(NSArray<RCTModuleData *> *modules, RCTBridge *bridge, const
27
26
  {
28
27
  std::vector<std::unique_ptr<NativeModule>> nativeModules;
29
28
  for (RCTModuleData *moduleData in modules) {
30
- if ([moduleData.moduleClass isSubclassOfClass:[RCTCxxModule class]]) {
31
- nativeModules.emplace_back(
32
- std::make_unique<CxxNativeModule>(
33
- instance,
34
- [moduleData.name UTF8String],
35
- [moduleData] { return [(RCTCxxModule *)(moduleData.instance) createModule]; },
36
- std::make_shared<DispatchMessageQueueThread>(moduleData)));
37
- } else {
38
- nativeModules.emplace_back(std::make_unique<RCTNativeModule>(bridge, moduleData));
39
- }
29
+ nativeModules.emplace_back(std::make_unique<RCTNativeModule>(bridge, moduleData));
40
30
  }
41
31
  return nativeModules;
42
32
  }