react-native 0.74.0-rc.2 → 0.74.0-rc.3
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/AppDelegate/RCTAppDelegate.h +5 -8
- package/Libraries/AppDelegate/RCTAppDelegate.mm +56 -130
- package/Libraries/AppDelegate/RCTRootViewFactory.h +123 -0
- package/Libraries/AppDelegate/RCTRootViewFactory.mm +253 -0
- package/Libraries/Components/View/ReactNativeStyleAttributes.js +1 -0
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/LogBox/Data/parseLogBoxLog.js +1 -1
- package/Libraries/StyleSheet/StyleSheetTypes.d.ts +4 -0
- package/Libraries/StyleSheet/StyleSheetTypes.js +3 -0
- package/React/Base/RCTConvert.h +3 -0
- package/React/Base/RCTConvert.mm +9 -0
- package/React/Base/RCTVersion.m +1 -1
- package/React/CoreModules/RCTRedBox.mm +7 -1
- package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +32 -0
- package/React/Views/RCTCursor.h +13 -0
- package/React/Views/RCTView.h +3 -0
- package/React/Views/RCTView.m +30 -0
- package/React/Views/RCTViewManager.m +2 -0
- package/ReactAndroid/api/ReactAndroid.api +2 -0
- package/ReactAndroid/build.gradle.kts +26 -0
- package/ReactAndroid/cmake-utils/ReactNative-application.cmake +6 -0
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/ReactDelegate.java +1 -2
- package/ReactAndroid/src/main/java/com/facebook/react/ReactHost.kt +9 -0
- package/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java +5 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/queue/MessageQueueThreadHandler.java +0 -11
- package/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultReactHostDelegate.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultReactNativeHost.kt +11 -6
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostImpl.java +32 -0
- package/ReactAndroid/src/main/jni/react/jni/JMessageQueueThread.cpp +0 -1
- package/ReactAndroid/src/main/jni/react/jni/JMessageQueueThread.h +0 -4
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/ReactCommon/react/renderer/components/view/BaseViewProps.cpp +9 -0
- package/ReactCommon/react/renderer/components/view/BaseViewProps.h +2 -0
- package/ReactCommon/react/renderer/components/view/ViewShadowNode.cpp +1 -1
- package/ReactCommon/react/renderer/components/view/conversions.h +22 -0
- package/ReactCommon/react/renderer/components/view/primitives.h +2 -0
- package/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTInstance.mm +37 -6
- package/package.json +2 -2
- package/sdks/hermesc/osx-bin/hermes +0 -0
- package/sdks/hermesc/osx-bin/hermesc +0 -0
- package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
- package/template/package.json +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultBindingsInstaller.kt +0 -20
|
@@ -28,6 +28,8 @@
|
|
|
28
28
|
#import <React/RCTLogBox.h>
|
|
29
29
|
#import <React/RCTModuleData.h>
|
|
30
30
|
#import <React/RCTPerformanceLogger.h>
|
|
31
|
+
#import <React/RCTRedBox.h>
|
|
32
|
+
#import <React/RCTReloadCommand.h>
|
|
31
33
|
#import <React/RCTSurfacePresenter.h>
|
|
32
34
|
#import <ReactCommon/RCTTurboModuleManager.h>
|
|
33
35
|
#import <ReactCommon/RuntimeExecutor.h>
|
|
@@ -122,10 +124,17 @@ void RCTInstanceSetRuntimeDiagnosticFlags(NSString *flags)
|
|
|
122
124
|
}];
|
|
123
125
|
}
|
|
124
126
|
|
|
125
|
-
[
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
127
|
+
NSNotificationCenter *defaultCenter = [NSNotificationCenter defaultCenter];
|
|
128
|
+
|
|
129
|
+
[defaultCenter addObserver:self
|
|
130
|
+
selector:@selector(_notifyEventDispatcherObserversOfEvent_DEPRECATED:)
|
|
131
|
+
name:@"RCTNotifyEventDispatcherObserversOfEvent_DEPRECATED"
|
|
132
|
+
object:nil];
|
|
133
|
+
|
|
134
|
+
[defaultCenter addObserver:self
|
|
135
|
+
selector:@selector(didReceiveReloadCommand)
|
|
136
|
+
name:RCTTriggerReloadCommandNotification
|
|
137
|
+
object:nil];
|
|
129
138
|
|
|
130
139
|
[self _start];
|
|
131
140
|
}
|
|
@@ -389,6 +398,24 @@ void RCTInstanceSetRuntimeDiagnosticFlags(NSString *flags)
|
|
|
389
398
|
}
|
|
390
399
|
}
|
|
391
400
|
|
|
401
|
+
- (void)handleBundleLoadingError:(NSError *)error
|
|
402
|
+
{
|
|
403
|
+
if (!_valid) {
|
|
404
|
+
return;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
RCTRedBox *redBox = [_turboModuleManager moduleForName:"RedBox"];
|
|
408
|
+
|
|
409
|
+
RCTExecuteOnMainQueue(^{
|
|
410
|
+
[[NSNotificationCenter defaultCenter] postNotificationName:RCTJavaScriptDidFailToLoadNotification
|
|
411
|
+
object:self
|
|
412
|
+
userInfo:@{@"error" : error}];
|
|
413
|
+
[redBox showErrorMessage:[error localizedDescription]];
|
|
414
|
+
|
|
415
|
+
RCTFatal(error);
|
|
416
|
+
});
|
|
417
|
+
}
|
|
418
|
+
|
|
392
419
|
- (void)_loadJSBundle:(NSURL *)sourceURL
|
|
393
420
|
{
|
|
394
421
|
#if RCT_DEV_MENU && __has_include(<React/RCTDevLoadingViewProtocol.h>)
|
|
@@ -420,8 +447,7 @@ void RCTInstanceSetRuntimeDiagnosticFlags(NSString *flags)
|
|
|
420
447
|
}
|
|
421
448
|
|
|
422
449
|
if (error) {
|
|
423
|
-
|
|
424
|
-
RCTLogError(@"RCTInstance: Error while loading bundle: %@", error);
|
|
450
|
+
[strongSelf handleBundleLoadingError:error];
|
|
425
451
|
[strongSelf invalidate];
|
|
426
452
|
return;
|
|
427
453
|
}
|
|
@@ -490,4 +516,9 @@ void RCTInstanceSetRuntimeDiagnosticFlags(NSString *flags)
|
|
|
490
516
|
isFatal:errorMap.getBool(JSErrorHandlerKey::kIsFatal)];
|
|
491
517
|
}
|
|
492
518
|
|
|
519
|
+
- (void)didReceiveReloadCommand
|
|
520
|
+
{
|
|
521
|
+
[self _loadJSBundle:[_bridgeModuleDecorator.bundleManager bundleURL]];
|
|
522
|
+
}
|
|
523
|
+
|
|
493
524
|
@end
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native",
|
|
3
|
-
"version": "0.74.0-rc.
|
|
3
|
+
"version": "0.74.0-rc.3",
|
|
4
4
|
"description": "A framework for building native apps using React",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"@react-native-community/cli-platform-ios": "13.6.1",
|
|
104
104
|
"@react-native/assets-registry": "0.74.0",
|
|
105
105
|
"@react-native/codegen": "0.74.2",
|
|
106
|
-
"@react-native/community-cli-plugin": "0.74.
|
|
106
|
+
"@react-native/community-cli-plugin": "0.74.5",
|
|
107
107
|
"@react-native/gradle-plugin": "0.74.1",
|
|
108
108
|
"@react-native/js-polyfills": "0.74.0",
|
|
109
109
|
"@react-native/normalize-colors": "0.74.1",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/template/package.json
CHANGED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
package com.facebook.react.defaults
|
|
9
|
-
|
|
10
|
-
import com.facebook.jni.annotations.DoNotStrip
|
|
11
|
-
import com.facebook.react.common.annotations.UnstableReactNativeAPI
|
|
12
|
-
import com.facebook.react.runtime.BindingsInstaller
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* A utility class that provides users a default [BindingsInstaller] class that's used to initialize
|
|
16
|
-
* [ReactHostDelegate]
|
|
17
|
-
*/
|
|
18
|
-
@DoNotStrip
|
|
19
|
-
@UnstableReactNativeAPI
|
|
20
|
-
public class DefaultBindingsInstaller : BindingsInstaller(null) {}
|