react-native-navigation 8.7.5-snapshot.2316 → 8.7.5-snapshot.2330
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/android/src/main/java/com/reactnativenavigation/react/NavigationModule.java +2 -2
- package/android/src/main/java/com/reactnativenavigation/views/stack/topbar/titlebar/ButtonBar.kt +2 -0
- package/android/src/main/java/com/reactnativenavigation/views/stack/topbar/titlebar/TitleAndButtonsMeasurer.kt +2 -1
- package/android/src/main/java/com/reactnativenavigation/views/stack/topbar/titlebar/TitleBarReactView.kt +7 -10
- package/android/src/main/res/values/styles.xml +2 -0
- package/ios/RCTHelpers.h +0 -4
- package/ios/RCTHelpers.mm +0 -4
- package/ios/RNNAppDelegate.mm +15 -13
- package/ios/RNNBridgeManager.h +0 -2
- package/ios/RNNBridgeManager.mm +0 -2
- package/ios/RNNCommandsHandler.mm +10 -13
- package/ios/RNNCustomTitleView.h +1 -2
- package/ios/RNNElementFinder.mm +1 -2
- package/ios/RNNExternalComponentStore.h +3 -3
- package/ios/RNNExternalComponentStore.mm +10 -9
- package/ios/RNNModalHostViewManagerHandler.h +0 -4
- package/ios/RNNModalHostViewManagerHandler.mm +0 -2
- package/ios/RNNOverlayOptions.mm +1 -0
- package/ios/RNNOverlayWindow.mm +3 -10
- package/ios/RNNReactTitleView.h +1 -4
- package/ios/RNNReactTitleView.mm +0 -2
- package/ios/RNNReactView.h +0 -2
- package/ios/RNNReactView.mm +1 -0
- package/ios/RNNUIBarButtonItem.h +0 -4
- package/ios/ReactNativeNavigation.h +5 -5
- package/ios/ReactNativeNavigation.mm +7 -9
- package/ios/UIViewController+RNNOptions.mm +1 -0
- package/package.json +11 -11
|
@@ -232,11 +232,11 @@ public class NavigationModule extends ReactContextBaseJavaModule {
|
|
|
232
232
|
}
|
|
233
233
|
|
|
234
234
|
@Override
|
|
235
|
-
public void
|
|
235
|
+
public void onCatalystInstanceDestroy() {
|
|
236
236
|
final NavigationActivity navigationActivity = activity();
|
|
237
237
|
if (navigationActivity != null) {
|
|
238
238
|
navigationActivity.onCatalystInstanceDestroy();
|
|
239
239
|
}
|
|
240
|
-
super.
|
|
240
|
+
super.onCatalystInstanceDestroy();
|
|
241
241
|
}
|
|
242
242
|
}
|
package/android/src/main/java/com/reactnativenavigation/views/stack/topbar/titlebar/ButtonBar.kt
CHANGED
|
@@ -11,6 +11,7 @@ import android.view.View
|
|
|
11
11
|
import android.view.ViewGroup
|
|
12
12
|
import androidx.appcompat.widget.ActionMenuView
|
|
13
13
|
import androidx.appcompat.widget.Toolbar
|
|
14
|
+
import com.reactnativenavigation.R
|
|
14
15
|
import com.reactnativenavigation.utils.ObjectUtils
|
|
15
16
|
import com.reactnativenavigation.utils.ViewUtils
|
|
16
17
|
import com.reactnativenavigation.viewcontrollers.stack.topbar.button.ButtonController
|
|
@@ -21,6 +22,7 @@ open class ButtonBar internal constructor(context: Context) : Toolbar(context) {
|
|
|
21
22
|
init {
|
|
22
23
|
super.setContentInsetsAbsolute(0, 0)
|
|
23
24
|
this.contentInsetStartWithNavigation = 0
|
|
25
|
+
setPopupTheme(R.style.TopBarOverflowPopup)
|
|
24
26
|
}
|
|
25
27
|
|
|
26
28
|
override fun onViewAdded(child: View) {
|
|
@@ -17,7 +17,8 @@ typealias TitleBottom = Int
|
|
|
17
17
|
|
|
18
18
|
fun makeTitleAtMostWidthMeasureSpec(containerWidth: Int, rightBarWidth: Int, leftBarWidth: Int, isCenter: Boolean, isFill: Boolean = false): Int {
|
|
19
19
|
return if (isCenter) {
|
|
20
|
-
|
|
20
|
+
val availableWidth = containerWidth - rightBarWidth - leftBarWidth
|
|
21
|
+
View.MeasureSpec.makeMeasureSpec(availableWidth, View.MeasureSpec.AT_MOST)
|
|
21
22
|
} else {
|
|
22
23
|
val availableWidth = containerWidth - rightBarWidth - leftBarWidth - 2 * DEFAULT_LEFT_MARGIN_PX
|
|
23
24
|
View.MeasureSpec.makeMeasureSpec(
|
|
@@ -3,25 +3,22 @@ package com.reactnativenavigation.views.stack.topbar.titlebar
|
|
|
3
3
|
import android.annotation.SuppressLint
|
|
4
4
|
import android.content.Context
|
|
5
5
|
import android.view.View
|
|
6
|
-
import android.view.ViewGroup
|
|
7
|
-
import androidx.core.view.children
|
|
8
|
-
import com.facebook.react.ReactInstanceManager
|
|
9
6
|
import com.reactnativenavigation.react.ReactView
|
|
10
7
|
|
|
11
8
|
@SuppressLint("ViewConstructor")
|
|
12
9
|
class TitleBarReactView(context: Context?, componentId: String?,
|
|
13
10
|
componentName: String?) : ReactView(context, componentId, componentName) {
|
|
14
11
|
var centered: Boolean = false
|
|
12
|
+
|
|
15
13
|
override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
|
|
16
|
-
var titleHeightMeasureSpec: Int
|
|
17
|
-
var titleWidthMeasureSpec: Int
|
|
18
14
|
if (centered) {
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
val availableWidth = MeasureSpec.getSize(widthMeasureSpec)
|
|
16
|
+
super.onMeasure(
|
|
17
|
+
MeasureSpec.makeMeasureSpec(availableWidth, MeasureSpec.AT_MOST),
|
|
18
|
+
heightMeasureSpec
|
|
19
|
+
)
|
|
21
20
|
} else {
|
|
22
|
-
|
|
23
|
-
titleWidthMeasureSpec = widthMeasureSpec
|
|
21
|
+
super.onMeasure(widthMeasureSpec, heightMeasureSpec)
|
|
24
22
|
}
|
|
25
|
-
super.onMeasure(titleWidthMeasureSpec, titleHeightMeasureSpec)
|
|
26
23
|
}
|
|
27
24
|
}
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
<item name="elevation">0dp</item>
|
|
5
5
|
</style>
|
|
6
6
|
|
|
7
|
+
<style name="TopBarOverflowPopup" parent="ThemeOverlay.AppCompat.Light" />
|
|
8
|
+
|
|
7
9
|
<!--The following is a workaround needed to run unit tests in command line-->
|
|
8
10
|
<style name="Widget.Support.CoordinatorLayout" parent="android:Widget">
|
|
9
11
|
@null
|
package/ios/RCTHelpers.h
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
#import <Foundation/Foundation.h>
|
|
2
|
-
#ifndef RCT_NEW_ARCH_ENABLED
|
|
3
2
|
#import <React/RCTRootView.h>
|
|
4
|
-
#endif
|
|
5
3
|
|
|
6
4
|
@interface RCTHelpers : NSObject
|
|
7
5
|
+ (NSMutableDictionary *)textAttributesFromDictionary:(NSDictionary *)dictionary
|
|
@@ -10,7 +8,5 @@
|
|
|
10
8
|
withPrefix:(NSString *)prefix
|
|
11
9
|
baseFont:(UIFont *)font;
|
|
12
10
|
+ (NSString *)getTimestampString;
|
|
13
|
-
#ifndef RCT_NEW_ARCH_ENABLED
|
|
14
11
|
+ (BOOL)removeYellowBox:(RCTRootView *)reactRootView;
|
|
15
|
-
#endif
|
|
16
12
|
@end
|
package/ios/RCTHelpers.mm
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
#import "RCTHelpers.h"
|
|
2
2
|
#import <React/RCTFont.h>
|
|
3
|
-
#ifndef RCT_NEW_ARCH_ENABLED
|
|
4
3
|
#import <React/RCTScrollView.h>
|
|
5
|
-
#endif
|
|
6
4
|
#import <React/RCTView.h>
|
|
7
5
|
|
|
8
6
|
@implementation RCTHelpers
|
|
@@ -184,7 +182,6 @@
|
|
|
184
182
|
not clickable if placed at the bottom part of the view
|
|
185
183
|
*/
|
|
186
184
|
|
|
187
|
-
#ifndef RCT_NEW_ARCH_ENABLED
|
|
188
185
|
+ (BOOL)removeYellowBox:(RCTRootView *)reactRootView {
|
|
189
186
|
#ifndef DEBUG
|
|
190
187
|
return YES;
|
|
@@ -223,6 +220,5 @@
|
|
|
223
220
|
|
|
224
221
|
return removed;
|
|
225
222
|
}
|
|
226
|
-
#endif
|
|
227
223
|
|
|
228
224
|
@end
|
package/ios/RNNAppDelegate.mm
CHANGED
|
@@ -1,32 +1,34 @@
|
|
|
1
1
|
#import "RNNAppDelegate.h"
|
|
2
2
|
#import <ReactNativeNavigation/ReactNativeNavigation.h>
|
|
3
|
+
#import <react/featureflags/ReactNativeFeatureFlags.h>
|
|
4
|
+
#import <react/featureflags/ReactNativeFeatureFlagsDefaults.h>
|
|
3
5
|
|
|
4
6
|
#import "RCTAppSetupUtils.h"
|
|
5
|
-
|
|
6
|
-
#if !RNN_RN_VERSION_79_OR_NEWER
|
|
7
|
-
// Legacy path (RN < 0.79) — needs bridge, turbo module manager, feature flags
|
|
8
7
|
#import <React/CoreModulesPlugins.h>
|
|
9
|
-
#import <React/RCTBridge+Private.h>
|
|
10
|
-
#import <React/RCTBridgeProxy.h>
|
|
11
|
-
#import <React/RCTComponentViewFactory.h>
|
|
12
8
|
#import <React/RCTCxxBridgeDelegate.h>
|
|
13
|
-
#import <React/RCTImageLoader.h>
|
|
14
9
|
#import <React/RCTLegacyViewManagerInteropComponentView.h>
|
|
15
10
|
#import <React/RCTSurfacePresenter.h>
|
|
16
|
-
#import <React/RCTSurfacePresenterBridgeAdapter.h>
|
|
17
11
|
#import <React/RCTSurfacePresenterStub.h>
|
|
12
|
+
#import <React/RCTSurfacePresenterBridgeAdapter.h>
|
|
18
13
|
#import <ReactCommon/RCTTurboModuleManager.h>
|
|
19
|
-
|
|
20
|
-
#import <react/featureflags/ReactNativeFeatureFlagsDefaults.h>
|
|
14
|
+
|
|
21
15
|
#if __has_include(<react/config/ReactNativeConfig.h>)
|
|
22
16
|
#import <react/config/ReactNativeConfig.h>
|
|
23
17
|
#endif
|
|
18
|
+
|
|
24
19
|
#import <react/renderer/runtimescheduler/RuntimeScheduler.h>
|
|
25
20
|
#import <react/renderer/runtimescheduler/RuntimeSchedulerCallInvoker.h>
|
|
21
|
+
#import <React/RCTSurfacePresenter.h>
|
|
22
|
+
#import <React/RCTBridge+Private.h>
|
|
23
|
+
#import <React/RCTImageLoader.h>
|
|
24
|
+
#import <React/RCTBridgeProxy.h>
|
|
25
|
+
#import <React/RCTSurfacePresenter.h>
|
|
26
26
|
#import <react/utils/ManagedObjectWrapper.h>
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
|
|
28
|
+
#import <React/RCTComponentViewFactory.h>
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
static NSString *const kRNConcurrentRoot = @"concurrentRoot";
|
|
30
32
|
|
|
31
33
|
#if !RNN_RN_VERSION_79_OR_NEWER
|
|
32
34
|
@interface RNNAppDelegate () <RCTTurboModuleManagerDelegate,
|
package/ios/RNNBridgeManager.h
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
#ifndef RCT_NEW_ARCH_ENABLED
|
|
2
1
|
#import <Foundation/Foundation.h>
|
|
3
2
|
#import <React/RCTBridge.h>
|
|
4
3
|
|
|
@@ -17,4 +16,3 @@ typedef UIViewController * (^RNNExternalViewCreator)(NSDictionary *props, RCTBri
|
|
|
17
16
|
- (UIViewController *)findComponentForId:(NSString *)componentId;
|
|
18
17
|
|
|
19
18
|
@end
|
|
20
|
-
#endif
|
package/ios/RNNBridgeManager.mm
CHANGED
|
@@ -200,23 +200,20 @@ static NSString *const setDefaultOptions = @"setDefaultOptions";
|
|
|
200
200
|
RCTExecuteOnMainQueue(^{
|
|
201
201
|
UIView *view = nil;
|
|
202
202
|
#ifdef RCT_NEW_ARCH_ENABLED
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
203
|
+
RCTHost *host = [ReactNativeNavigation getHost];
|
|
204
|
+
|
|
205
|
+
if (host != nil) {
|
|
206
|
+
view = [host.surfacePresenter.mountingManager.componentViewRegistry
|
|
207
|
+
findComponentViewWithTag: [optionsWithDefault.preview.reactTag.get integerValue]];
|
|
208
|
+
} else {
|
|
209
|
+
view = [[ReactNativeNavigation getBridge].uiManager
|
|
210
|
+
viewForReactTag:optionsWithDefault.preview.reactTag.get];
|
|
211
|
+
}
|
|
211
212
|
#else
|
|
212
213
|
view = [[ReactNativeNavigation getBridge].uiManager
|
|
213
214
|
viewForReactTag:optionsWithDefault.preview.reactTag.get];
|
|
214
215
|
#endif
|
|
215
|
-
|
|
216
|
-
return;
|
|
217
|
-
}
|
|
218
|
-
[rootVc registerForPreviewingWithDelegate:(id)rootVc
|
|
219
|
-
sourceView:view];
|
|
216
|
+
[rootVc registerForPreviewingWithDelegate:(id)rootVc sourceView:view];
|
|
220
217
|
});
|
|
221
218
|
}
|
|
222
219
|
} else {
|
package/ios/RNNCustomTitleView.h
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
+
#import <React/RCTRootViewDelegate.h>
|
|
1
2
|
#import <UIKit/UIKit.h>
|
|
2
3
|
#import "RNNReactView.h"
|
|
3
4
|
|
|
4
5
|
#ifdef RCT_NEW_ARCH_ENABLED
|
|
5
6
|
#import <React/RCTSurfaceDelegate.h>
|
|
6
7
|
#import <React/RCTSurface.h>
|
|
7
|
-
#else
|
|
8
|
-
#import <React/RCTRootViewDelegate.h>
|
|
9
8
|
#endif
|
|
10
9
|
|
|
11
10
|
@interface RNNCustomTitleView : UIView <
|
package/ios/RNNElementFinder.mm
CHANGED
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
#import "RNNReactView.h"
|
|
3
3
|
#import <React/RCTSurfaceView.h>
|
|
4
4
|
#import <React/RCTUIManager.h>
|
|
5
|
-
#ifndef RCT_NEW_ARCH_ENABLED
|
|
6
5
|
#import <React/RCTRootView.h>
|
|
7
|
-
#
|
|
6
|
+
#import <React/RCTUIManager.h>
|
|
8
7
|
|
|
9
8
|
#ifdef RCT_NEW_ARCH_ENABLED
|
|
10
9
|
#import <React/RCTViewComponentView.h>
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
|
|
7
7
|
@interface RNNExternalComponentStore : NSObject
|
|
8
8
|
|
|
9
|
+
- (void)registerExternalComponent:(NSString *)name callback:(RNNExternalViewCreator)callback;
|
|
10
|
+
- (UIViewController *)getExternalComponent:(RNNLayoutInfo *)layoutInfo bridge:(RCTBridge *)bridge;
|
|
11
|
+
|
|
9
12
|
#ifdef RCT_NEW_ARCH_ENABLED
|
|
10
13
|
- (void)registerExternalHostComponent:(NSString *)name callback:(RNNExternalHostViewCreator)callback;
|
|
11
14
|
- (UIViewController *)getExternalHostComponent:(RNNLayoutInfo *)layoutInfo host:(RCTHost *)host;
|
|
12
|
-
#else
|
|
13
|
-
- (void)registerExternalComponent:(NSString *)name callback:(RNNExternalViewCreator)callback;
|
|
14
|
-
- (UIViewController *)getExternalComponent:(RNNLayoutInfo *)layoutInfo bridge:(RCTBridge *)bridge;
|
|
15
15
|
#endif
|
|
16
16
|
|
|
17
17
|
@end
|
|
@@ -14,6 +14,16 @@
|
|
|
14
14
|
return self;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
- (void)registerExternalComponent:(NSString *)name callback:(RNNExternalViewCreator)callback {
|
|
18
|
+
[_externalComponentCreators setObject:[callback copy] forKey:name];
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
- (UIViewController *)getExternalComponent:(RNNLayoutInfo *)layoutInfo bridge:(RCTBridge *)bridge {
|
|
22
|
+
RNNExternalViewCreator creator = [_externalComponentCreators objectForKey:layoutInfo.name];
|
|
23
|
+
return creator(layoutInfo.props, bridge);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
|
|
17
27
|
#ifdef RCT_NEW_ARCH_ENABLED
|
|
18
28
|
- (void)registerExternalHostComponent:(NSString *)name callback:(RNNExternalHostViewCreator)callback {
|
|
19
29
|
[_externalComponentCreators setObject:[callback copy] forKey:name];
|
|
@@ -23,15 +33,6 @@
|
|
|
23
33
|
RNNExternalHostViewCreator creator = [_externalComponentCreators objectForKey:layoutInfo.name];
|
|
24
34
|
return creator(layoutInfo.props, host);
|
|
25
35
|
}
|
|
26
|
-
#else
|
|
27
|
-
- (void)registerExternalComponent:(NSString *)name callback:(RNNExternalViewCreator)callback {
|
|
28
|
-
[_externalComponentCreators setObject:[callback copy] forKey:name];
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
- (UIViewController *)getExternalComponent:(RNNLayoutInfo *)layoutInfo bridge:(RCTBridge *)bridge {
|
|
32
|
-
RNNExternalViewCreator creator = [_externalComponentCreators objectForKey:layoutInfo.name];
|
|
33
|
-
return creator(layoutInfo.props, bridge);
|
|
34
|
-
}
|
|
35
36
|
#endif
|
|
36
37
|
|
|
37
38
|
@end
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
#import "RNNModalManager.h"
|
|
2
2
|
#import <Foundation/Foundation.h>
|
|
3
|
-
#ifndef RCT_NEW_ARCH_ENABLED
|
|
4
3
|
#import <React/RCTModalHostViewManager.h>
|
|
5
|
-
#endif
|
|
6
4
|
|
|
7
5
|
@interface RNNModalHostViewManagerHandler : NSObject
|
|
8
6
|
|
|
9
7
|
- (instancetype)initWithModalManager:(RNNModalManager *)modalManager;
|
|
10
8
|
|
|
11
|
-
#ifndef RCT_NEW_ARCH_ENABLED
|
|
12
9
|
- (void)connectModalHostViewManager:(RCTModalHostViewManager *)modalHostViewManager;
|
|
13
|
-
#endif
|
|
14
10
|
|
|
15
11
|
@end
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
return self;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
#ifndef RCT_NEW_ARCH_ENABLED
|
|
14
13
|
- (void)connectModalHostViewManager:(RCTModalHostViewManager *)modalHostViewManager {
|
|
15
14
|
modalHostViewManager.presentationBlock =
|
|
16
15
|
^(UIViewController *reactViewController, UIViewController *viewController, BOOL animated,
|
|
@@ -37,6 +36,5 @@
|
|
|
37
36
|
}];
|
|
38
37
|
};
|
|
39
38
|
}
|
|
40
|
-
#endif
|
|
41
39
|
|
|
42
40
|
@end
|
package/ios/RNNOverlayOptions.mm
CHANGED
package/ios/RNNOverlayWindow.mm
CHANGED
|
@@ -1,23 +1,16 @@
|
|
|
1
1
|
#import "RNNOverlayWindow.h"
|
|
2
2
|
#import "RNNReactView.h"
|
|
3
|
+
#import <React/RCTModalHostView.h>
|
|
3
4
|
|
|
4
5
|
@implementation RNNOverlayWindow
|
|
5
6
|
|
|
6
7
|
- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event {
|
|
7
|
-
static Class modalHostViewClass;
|
|
8
|
-
static Class rootComponentViewClass;
|
|
9
|
-
static dispatch_once_t onceToken;
|
|
10
|
-
dispatch_once(&onceToken, ^{
|
|
11
|
-
modalHostViewClass = NSClassFromString(@"RCTModalHostView");
|
|
12
|
-
rootComponentViewClass = NSClassFromString(@"RCTRootComponentView");
|
|
13
|
-
});
|
|
14
|
-
|
|
15
8
|
UIView *hitTestResult = [super hitTest:point withEvent:event];
|
|
16
9
|
|
|
17
10
|
if ([hitTestResult isKindOfClass:[UIWindow class]] ||
|
|
18
11
|
[hitTestResult.subviews.firstObject isKindOfClass:RNNReactView.class] ||
|
|
19
|
-
[hitTestResult isKindOfClass:
|
|
20
|
-
[hitTestResult isKindOfClass:
|
|
12
|
+
[hitTestResult isKindOfClass:[RCTModalHostView class]] ||
|
|
13
|
+
[hitTestResult isKindOfClass:NSClassFromString(@"RCTRootComponentView")]) {
|
|
21
14
|
return nil;
|
|
22
15
|
}
|
|
23
16
|
|
package/ios/RNNReactTitleView.h
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
#import "RNNComponentView.h"
|
|
2
2
|
|
|
3
|
-
@interface RNNReactTitleView : RNNComponentView
|
|
4
|
-
#ifndef RCT_NEW_ARCH_ENABLED
|
|
5
|
-
<RCTRootViewDelegate>
|
|
6
|
-
#endif
|
|
3
|
+
@interface RNNReactTitleView : RNNComponentView <RCTRootViewDelegate>
|
|
7
4
|
|
|
8
5
|
- (void)setAlignment:(NSString *)alignment inFrame:(CGRect)frame;
|
|
9
6
|
|
package/ios/RNNReactTitleView.mm
CHANGED
|
@@ -37,12 +37,10 @@
|
|
|
37
37
|
self.delegate = self;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
#ifndef RCT_NEW_ARCH_ENABLED
|
|
41
40
|
- (void)rootViewDidChangeIntrinsicSize:(RCTRootView *)rootView {
|
|
42
41
|
if (_rootViewDidChangeIntrinsicSize) {
|
|
43
42
|
_rootViewDidChangeIntrinsicSize(rootView.intrinsicContentSize);
|
|
44
43
|
}
|
|
45
44
|
}
|
|
46
|
-
#endif
|
|
47
45
|
|
|
48
46
|
@end
|
package/ios/RNNReactView.h
CHANGED
package/ios/RNNReactView.mm
CHANGED
package/ios/RNNUIBarButtonItem.h
CHANGED
|
@@ -2,12 +2,8 @@
|
|
|
2
2
|
#import "RNNIconCreator.h"
|
|
3
3
|
#import "RNNReactComponentRegistry.h"
|
|
4
4
|
#import <Foundation/Foundation.h>
|
|
5
|
-
#ifdef RCT_NEW_ARCH_ENABLED
|
|
6
|
-
#import <React/RCTSurfaceDelegate.h>
|
|
7
|
-
#else
|
|
8
5
|
#import <React/RCTRootView.h>
|
|
9
6
|
#import <React/RCTRootViewDelegate.h>
|
|
10
|
-
#endif
|
|
11
7
|
|
|
12
8
|
typedef void (^RNNButtonPressCallback)(NSString *buttonId);
|
|
13
9
|
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
#import <Foundation/Foundation.h>
|
|
2
|
+
#import <React/RCTBridge.h>
|
|
2
3
|
#import <React/RCTUIManager.h>
|
|
3
4
|
#import <UIKit/UIKit.h>
|
|
4
5
|
|
|
5
6
|
#ifdef RCT_NEW_ARCH_ENABLED
|
|
6
7
|
#import <React-RuntimeApple/ReactCommon/RCTHost.h>
|
|
7
8
|
#import "RNNTurboManager.h"
|
|
8
|
-
#else
|
|
9
|
-
#import <React/RCTBridge.h>
|
|
10
|
-
typedef UIViewController * (^RNNExternalViewCreator)(NSDictionary *props, RCTBridge *bridge);
|
|
11
9
|
#endif
|
|
12
10
|
|
|
11
|
+
typedef UIViewController * (^RNNExternalViewCreator)(NSDictionary *props, RCTBridge *bridge);
|
|
12
|
+
|
|
13
13
|
@interface ReactNativeNavigation : NSObject
|
|
14
14
|
|
|
15
15
|
#ifdef RCT_NEW_ARCH_ENABLED
|
|
16
16
|
+ (void)bootstrapWithHost:(RCTHost *)host;
|
|
17
17
|
+ (void)registerExternalHostComponent:(NSString *)name callback:(RNNExternalHostViewCreator)callback;
|
|
18
18
|
+ (RCTHost *)getHost;
|
|
19
|
-
#
|
|
19
|
+
#endif
|
|
20
|
+
|
|
20
21
|
+ (void)bootstrapWithBridge:(RCTBridge *)bridge;
|
|
21
22
|
|
|
22
23
|
+ (NSArray<id<RCTBridgeModule>> *)extraModulesForBridge:(RCTBridge *)bridge;
|
|
@@ -24,7 +25,6 @@ typedef UIViewController * (^RNNExternalViewCreator)(NSDictionary *props, RCTBri
|
|
|
24
25
|
+ (RCTBridge *)getBridge;
|
|
25
26
|
|
|
26
27
|
+ (void)registerExternalComponent:(NSString *)name callback:(RNNExternalViewCreator)callback;
|
|
27
|
-
#endif
|
|
28
28
|
|
|
29
29
|
+ (UIViewController *)findViewController:(NSString *)componentId;
|
|
30
30
|
|
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
#import <React/RCTUIManager.h>
|
|
4
4
|
|
|
5
|
-
#ifndef RCT_NEW_ARCH_ENABLED
|
|
6
5
|
#import "RNNBridgeManager.h"
|
|
7
|
-
#endif
|
|
8
6
|
#import "RNNLayoutManager.h"
|
|
9
7
|
#import "RNNSplashScreenViewController.h"
|
|
10
8
|
|
|
@@ -12,26 +10,28 @@
|
|
|
12
10
|
|
|
13
11
|
#ifdef RCT_NEW_ARCH_ENABLED
|
|
14
12
|
@property(nonatomic, strong) RNNTurboManager *turboManager;
|
|
15
|
-
#else
|
|
16
|
-
@property(nonatomic, strong) RNNBridgeManager *bridgeManager;
|
|
17
13
|
#endif
|
|
18
14
|
|
|
15
|
+
@property(nonatomic, strong) RNNBridgeManager *bridgeManager;
|
|
16
|
+
|
|
19
17
|
@end
|
|
20
18
|
|
|
21
19
|
@implementation ReactNativeNavigation
|
|
22
20
|
|
|
23
21
|
#pragma mark - public API
|
|
24
22
|
|
|
25
|
-
#ifndef RCT_NEW_ARCH_ENABLED
|
|
26
23
|
+ (void)registerExternalComponent:(NSString *)name callback:(RNNExternalViewCreator)callback {
|
|
27
24
|
[[ReactNativeNavigation sharedInstance].bridgeManager registerExternalComponent:name
|
|
28
25
|
callback:callback];
|
|
29
26
|
}
|
|
30
|
-
#endif
|
|
31
27
|
|
|
32
28
|
+ (UIViewController *)findViewController:(NSString *)componentId {
|
|
33
29
|
#ifdef RCT_NEW_ARCH_ENABLED
|
|
34
|
-
|
|
30
|
+
if ([ReactNativeNavigation sharedInstance].turboManager == nil) {
|
|
31
|
+
return [[ReactNativeNavigation sharedInstance].bridgeManager findComponentForId:componentId];
|
|
32
|
+
} else {
|
|
33
|
+
return [[ReactNativeNavigation sharedInstance].turboManager findComponentForId:componentId];
|
|
34
|
+
}
|
|
35
35
|
#else
|
|
36
36
|
return [[ReactNativeNavigation sharedInstance].bridgeManager findComponentForId:componentId];
|
|
37
37
|
#endif
|
|
@@ -63,7 +63,6 @@
|
|
|
63
63
|
}
|
|
64
64
|
#endif
|
|
65
65
|
|
|
66
|
-
#ifndef RCT_NEW_ARCH_ENABLED
|
|
67
66
|
#pragma mark - bridge
|
|
68
67
|
|
|
69
68
|
+ (void)bootstrapWithBridge:(RCTBridge *)bridge {
|
|
@@ -91,7 +90,6 @@
|
|
|
91
90
|
- (void)bootstrapWithBridge:(RCTBridge *)bridge {
|
|
92
91
|
[RNNSplashScreenViewController showOnWindow:[self mainWindow]];
|
|
93
92
|
}
|
|
94
|
-
#endif
|
|
95
93
|
|
|
96
94
|
#pragma mark - instance
|
|
97
95
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-navigation",
|
|
3
|
-
"version": "8.7.5-snapshot.
|
|
3
|
+
"version": "8.7.5-snapshot.2330",
|
|
4
4
|
"description": "React Native Navigation - truly native navigation for iOS and Android",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"nativePackage": true,
|
|
@@ -94,15 +94,15 @@
|
|
|
94
94
|
"@babel/preset-env": "^7.25.3",
|
|
95
95
|
"@babel/runtime": "^7.25.0",
|
|
96
96
|
"@babel/types": "7.25.0",
|
|
97
|
-
"@react-native-community/cli": "20.
|
|
98
|
-
"@react-native-community/cli-platform-android": "20.
|
|
99
|
-
"@react-native-community/cli-platform-ios": "20.
|
|
97
|
+
"@react-native-community/cli": "20.0.0",
|
|
98
|
+
"@react-native-community/cli-platform-android": "20.0.0",
|
|
99
|
+
"@react-native-community/cli-platform-ios": "20.0.0",
|
|
100
100
|
"@react-native-community/datetimepicker": "^8.2.0",
|
|
101
101
|
"@react-native-community/netinfo": "^11.4.1",
|
|
102
|
-
"@react-native/babel-preset": "0.
|
|
103
|
-
"@react-native/eslint-config": "0.
|
|
104
|
-
"@react-native/metro-config": "0.
|
|
105
|
-
"@react-native/typescript-config": "0.
|
|
102
|
+
"@react-native/babel-preset": "0.83.0",
|
|
103
|
+
"@react-native/eslint-config": "0.83.0",
|
|
104
|
+
"@react-native/metro-config": "0.83.0",
|
|
105
|
+
"@react-native/typescript-config": "0.83.0",
|
|
106
106
|
"@testing-library/jest-native": "^5.4.2",
|
|
107
107
|
"@testing-library/react-native": "^13.0.1",
|
|
108
108
|
"@types/hoist-non-react-statics": "^3.3.6",
|
|
@@ -130,15 +130,15 @@
|
|
|
130
130
|
"pixelmatch": "^5.2.1",
|
|
131
131
|
"pngjs": "^6.0.0",
|
|
132
132
|
"prettier": "2.8.8",
|
|
133
|
-
"react": "19.2.
|
|
134
|
-
"react-native": "0.
|
|
133
|
+
"react": "19.2.0",
|
|
134
|
+
"react-native": "0.83.0",
|
|
135
135
|
"react-native-builder-bob": "^0.40.13",
|
|
136
136
|
"react-native-fast-image": "^8.6.3",
|
|
137
137
|
"react-native-gesture-handler": "^2.29.1",
|
|
138
138
|
"react-native-reanimated": "4.1.5",
|
|
139
139
|
"react-native-worklets": "0.5.0",
|
|
140
140
|
"react-redux": "9.1.2",
|
|
141
|
-
"react-test-renderer": "19.2.
|
|
141
|
+
"react-test-renderer": "19.2.0",
|
|
142
142
|
"redux": "^5.0.1",
|
|
143
143
|
"remx": "3.x.x",
|
|
144
144
|
"semver": "5.x.x",
|