react-native-navigation 8.3.2 → 8.4.0-snapshot.1889

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.
@@ -16,7 +16,7 @@ class ModalContentLayout(context: Context?) : ReactViewGroup(context), RootView{
16
16
 
17
17
  private val mJSTouchDispatcher = JSTouchDispatcher(this)
18
18
 
19
- override fun onChildStartedNativeGesture(child: View, androidEvent: MotionEvent) {
19
+ override fun onChildStartedNativeGesture(child: View?, androidEvent: MotionEvent) {
20
20
  mJSTouchDispatcher.onChildStartedNativeGesture(androidEvent, this.getEventDispatcher())
21
21
  }
22
22
  override fun onChildStartedNativeGesture(androidEvent: MotionEvent) {
@@ -31,7 +31,7 @@ class ModalContentLayout(context: Context?) : ReactViewGroup(context), RootView{
31
31
  return UIManagerHelper.getEventDispatcher(reactContext, UIManagerType.FABRIC) ?: throw IllegalStateException("EventDispatcher for Fabric UI Manager is not found")
32
32
  }
33
33
 
34
- override fun handleException(t: Throwable?) {
34
+ override fun handleException(t: Throwable) {
35
35
  getReactContext().handleException(RuntimeException(t))
36
36
  }
37
37
 
@@ -13,7 +13,21 @@
13
13
  #import <React/RCTSurfacePresenterStub.h>
14
14
  #import <React/RCTSurfacePresenterBridgeAdapter.h>
15
15
  #import <ReactCommon/RCTTurboModuleManager.h>
16
+
17
+
18
+
19
+ #if __has_include(<React-RCTAppDelegate/RCTReactNativeFactory.h>)
20
+ #import <React-RCTAppDelegate/RCTAppDelegate.h>
21
+ #import <React-RCTAppDelegate/RCTReactNativeFactory.h>
22
+ #elif __has_include(<React_RCTAppDelegate/RCTReactNativeFactory.h>)
23
+ #import <React_RCTAppDelegate/RCTAppDelegate.h>
24
+ #import <React_RCTAppDelegate/RCTReactNativeFactory.h>
25
+ #else
26
+ // RN 0.77 support
27
+ #define RN077
16
28
  #import <react/config/ReactNativeConfig.h>
29
+ #endif
30
+
17
31
  #import <react/renderer/runtimescheduler/RuntimeScheduler.h>
18
32
  #import <react/renderer/runtimescheduler/RuntimeSchedulerCallInvoker.h>
19
33
  #import <React/RCTSurfacePresenter.h>
@@ -37,15 +51,17 @@ static NSString *const kRNConcurrentRoot = @"concurrentRoot";
37
51
  - (BOOL)application:(UIApplication *)application
38
52
  didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
39
53
 
54
+ #ifdef RN077
40
55
  [self _setUpFeatureFlags];
41
-
42
- // Copied from RCTAppDelegate, it private inside it
43
56
  self.rootViewFactory = [self createRCTRootViewFactory];
44
-
45
57
  [RCTComponentViewFactory currentComponentViewFactory].thirdPartyFabricComponentsProvider = self;
46
-
47
58
  RCTAppSetupPrepareApp(application, self.newArchEnabled);
48
59
  RCTSetNewArchEnabled(TRUE);
60
+ #else
61
+ self.reactNativeFactory = [RCTReactNativeFactory new];
62
+ self.reactNativeFactory = [self.reactNativeFactory initWithDelegate:self];
63
+ #endif
64
+
49
65
  RCTEnableTurboModuleInterop(YES);
50
66
  RCTEnableTurboModuleInteropBridgeProxy(YES);
51
67
 
@@ -56,34 +72,37 @@ static NSString *const kRNConcurrentRoot = @"concurrentRoot";
56
72
  return YES;
57
73
  }
58
74
 
75
+ - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge {
76
+ [NSException raise:@"RCTBridgeDelegate::sourceURLForBridge not implemented"
77
+ format:@"Subclasses must implement a valid sourceURLForBridge method"];
78
+ return nil;
79
+ }
80
+
81
+ - (BOOL)concurrentRootEnabled {
82
+ return true;
83
+ }
84
+
85
+
86
+
87
+ #ifdef RN077
59
88
  - (RCTRootViewFactory *)createRCTRootViewFactory
60
89
  {
61
90
  __weak __typeof(self) weakSelf = self;
62
91
  RCTBundleURLBlock bundleUrlBlock = ^{
63
- RCTAppDelegate *strongSelf = weakSelf;
64
- return strongSelf.bundleURL;
92
+ RCTAppDelegate *strongSelf = weakSelf;
93
+ return strongSelf.bundleURL;
65
94
  };
66
95
 
67
96
  RCTRootViewFactoryConfiguration *configuration =
68
- [[RCTRootViewFactoryConfiguration alloc] initWithBundleURLBlock:bundleUrlBlock
69
- newArchEnabled:self.newArchEnabled];
97
+ [[RCTRootViewFactoryConfiguration alloc] initWithBundleURLBlock:bundleUrlBlock
98
+ newArchEnabled:self.newArchEnabled];
70
99
 
71
100
 
72
101
  return [[RCTRootViewFactory alloc] initWithConfiguration:configuration andTurboModuleManagerDelegate:self];
73
102
  }
74
103
 
75
- - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge {
76
- [NSException raise:@"RCTBridgeDelegate::sourceURLForBridge not implemented"
77
- format:@"Subclasses must implement a valid sourceURLForBridge method"];
78
- return nil;
79
- }
80
-
81
- - (BOOL)concurrentRootEnabled {
82
- return true;
83
- }
84
104
 
85
105
  #pragma mark - Feature Flags
86
-
87
106
  class RCTAppDelegateBridgelessFeatureFlags : public facebook::react::ReactNativeFeatureFlagsDefaults {
88
107
  public:
89
108
  bool enableBridgelessArchitecture() override
@@ -113,6 +132,7 @@ class RCTAppDelegateBridgelessFeatureFlags : public facebook::react::ReactNative
113
132
  facebook::react::ReactNativeFeatureFlags::override(
114
133
  std::make_unique<RCTAppDelegateBridgelessFeatureFlags>());
115
134
  }
135
+ #endif
116
136
 
117
137
  @end
118
138
 
@@ -4,5 +4,5 @@
4
4
  @interface RNNSplashScreenViewController : UIViewController
5
5
 
6
6
  + (void)showOnWindow:(UIWindow *)window;
7
-
7
+ + (UIViewController*)getSplashScreenVC;
8
8
  @end
@@ -5,6 +5,15 @@
5
5
  @implementation RNNSplashScreenViewController
6
6
 
7
7
  + (void)showOnWindow:(UIWindow *)window {
8
+ UIViewController *viewController = [self getSplashScreenVC];
9
+ if (viewController != nil) {
10
+ id<UIApplicationDelegate> appDelegate = [UIApplication sharedApplication].delegate;
11
+ appDelegate.window.rootViewController = viewController;
12
+ [appDelegate.window makeKeyAndVisible];
13
+ }
14
+ }
15
+
16
+ + (UIViewController*)getSplashScreenVC {
8
17
  CGRect screenBounds = [UIScreen mainScreen].bounds;
9
18
  CGFloat screenScale = [UIScreen mainScreen].scale;
10
19
  UIViewController *viewController = nil;
@@ -82,11 +91,7 @@
82
91
  }
83
92
  }
84
93
 
85
- if (viewController != nil) {
86
- id<UIApplicationDelegate> appDelegate = [UIApplication sharedApplication].delegate;
87
- appDelegate.window.rootViewController = viewController;
88
- [appDelegate.window makeKeyAndVisible];
89
- }
94
+ return viewController;
90
95
  }
91
96
 
92
97
  - (UIStatusBarStyle)preferredStatusBarStyle {
@@ -10,9 +10,9 @@
10
10
  #import "RNNReactRootViewCreator.h"
11
11
  #import "RNNTurboCommandsHandler.h"
12
12
  #import <React-RuntimeApple/ReactCommon/RCTHost.h>
13
+ #import "RNNSplashScreenViewController.h"
13
14
 
14
15
  @interface RNNTurboManager ()
15
-
16
16
  @property(nonatomic, strong, readwrite) RNNExternalComponentStore *store;
17
17
  @property(nonatomic, strong, readwrite) RNNReactComponentRegistry *componentRegistry;
18
18
  @property(nonatomic, strong, readonly) RNNLayoutManager *layoutManager;
@@ -21,7 +21,6 @@
21
21
  @property(nonatomic, strong, readonly) RNNModalHostViewManagerHandler *modalHostViewHandler;
22
22
  @property(nonatomic, strong, readonly) RNNCommandsHandler *commandsHandler;
23
23
  @property(nonatomic, strong, readonly) RNNEventEmitter *eventEmitter;
24
-
25
24
  @end
26
25
 
27
26
  @implementation RNNTurboManager {
@@ -30,7 +29,7 @@
30
29
 
31
30
  - (instancetype)initWithHost:(RCTHost *)host mainWindow:(UIWindow *)mainWindow {
32
31
  if (self = [super init]) {
33
- _host = host;
32
+ _host = host;
34
33
  _mainWindow = mainWindow;
35
34
  _overlayManager = [RNNOverlayManager new];
36
35
  _store = [RNNExternalComponentStore new];
@@ -40,7 +39,7 @@
40
39
  name:@"RCTInstanceDidLoadBundle"
41
40
  object:nil];
42
41
 
43
- // TODO: investigate which new event is fired
42
+ // TODO: investigate which new event is fired
44
43
  [[NSNotificationCenter defaultCenter] addObserver:self
45
44
  selector:@selector(onJavaScriptWillLoad)
46
45
  name:RCTJavaScriptWillStartLoadingNotification
@@ -99,16 +98,16 @@
99
98
  }
100
99
 
101
100
  - (void)onJavaScriptLoaded {
102
- RCTExecuteOnMainQueue(^{
103
- UIApplication.sharedApplication.delegate.window.rootViewController = nil;
104
-
105
- [self->_commandsHandler setReadyToReceiveCommands:true];
106
- // TODO: Refactor
107
- // [_modalHostViewHandler
108
- // connectModalHostViewManager:[[_host moduleRegistry] moduleForName:"RCTModalHostViewManager"]];
109
-
110
- [self->_eventEmitter sendOnAppLaunched];
111
- });
101
+ RCTExecuteOnMainQueue(^{
102
+ UIApplication.sharedApplication.delegate.window.rootViewController = [RNNSplashScreenViewController getSplashScreenVC];
103
+
104
+ [self->_commandsHandler setReadyToReceiveCommands:true];
105
+ // TODO: Refactor
106
+ // [_modalHostViewHandler
107
+ // connectModalHostViewManager:[[_host moduleRegistry] moduleForName:"RCTModalHostViewManager"]];
108
+
109
+ [self->_eventEmitter sendOnAppLaunched];
110
+ });
112
111
  }
113
112
 
114
113
  @end
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-navigation",
3
- "version": "8.3.2",
3
+ "version": "8.4.0-snapshot.1889",
4
4
  "description": "React Native Navigation - truly native navigation for iOS and Android",
5
5
  "license": "MIT",
6
6
  "nativePackage": true,
@@ -77,15 +77,15 @@
77
77
  "@babel/preset-env": "^7.25.3",
78
78
  "@babel/runtime": "^7.25.0",
79
79
  "@babel/types": "7.25.0",
80
- "@react-native-community/cli": "15.0.1",
81
- "@react-native-community/cli-platform-android": "15.0.1",
82
- "@react-native-community/cli-platform-ios": "15.0.1",
80
+ "@react-native-community/cli": "15.1.0",
81
+ "@react-native-community/cli-platform-android": "15.1.0",
82
+ "@react-native-community/cli-platform-ios": "15.1.0",
83
83
  "@react-native-community/datetimepicker": "^8.2.0",
84
84
  "@react-native-community/netinfo": "^11.4.1",
85
- "@react-native/babel-preset": "0.77.2",
86
- "@react-native/eslint-config": "0.77.2",
87
- "@react-native/metro-config": "0.77.2",
88
- "@react-native/typescript-config": "0.77.2",
85
+ "@react-native/babel-preset": "0.78.3",
86
+ "@react-native/eslint-config": "0.78.3",
87
+ "@react-native/metro-config": "0.78.3",
88
+ "@react-native/typescript-config": "0.78.3",
89
89
  "@testing-library/jest-native": "^5.4.2",
90
90
  "@testing-library/react-native": "^13.0.1",
91
91
  "@types/hoist-non-react-statics": "^3.3.6",
@@ -102,8 +102,8 @@
102
102
  "eslint": "^8.19.0",
103
103
  "eslint-config-prettier": "6.11.0",
104
104
  "eslint-formatter-codeframe": "^7.32.1",
105
- "eslint-plugin-prettier": "3.1.4",
106
105
  "eslint-plugin-jest": "^28.11.0",
106
+ "eslint-plugin-prettier": "3.1.4",
107
107
  "github-release-notes": "https://github.com/yogevbd/github-release-notes/tarball/e601b3dba72dcd6cba323c1286ea6dd0c0110b58",
108
108
  "husky": "4.2.5",
109
109
  "identity-obj-proxy": "3.0.0",
@@ -112,14 +112,14 @@
112
112
  "pixelmatch": "^5.2.1",
113
113
  "pngjs": "^6.0.0",
114
114
  "prettier": "2.8.8",
115
- "react": "18.3.1",
116
- "react-native": "0.77.2",
115
+ "react": "19.0.0",
116
+ "react-native": "0.78.3",
117
117
  "react-native-fast-image": "^8.6.3",
118
118
  "react-native-gesture-handler": "^2.22.1",
119
- "react-native-reanimated": "3.16.7",
120
- "react-redux": "5.x.x",
121
- "react-test-renderer": "18.3.1",
122
- "redux": "3.x.x",
119
+ "react-native-reanimated": "3.18.0",
120
+ "react-redux": "9.1.2",
121
+ "react-test-renderer": "19.0.0",
122
+ "redux": "^5.0.1",
123
123
  "remx": "3.x.x",
124
124
  "semver": "5.x.x",
125
125
  "shell-utils": "1.x.x",