react-native-navigation 8.0.0 → 8.1.0-alpha01
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/ReactNativeNavigation.podspec +13 -12
- package/lib/android/app/src/main/java/com/reactnativenavigation/NavigationApplication.java +1 -1
- package/lib/android/app/src/main/java/com/reactnativenavigation/options/LayoutFactory.java +13 -14
- package/lib/android/app/src/main/java/com/reactnativenavigation/react/NavigationModule.java +4 -6
- package/lib/android/app/src/main/java/com/reactnativenavigation/react/NavigationPackage.kt +5 -4
- package/lib/android/app/src/main/java/com/reactnativenavigation/react/NavigationReactInitializer.java +20 -21
- package/lib/android/app/src/main/java/com/reactnativenavigation/react/ReactComponentViewCreator.java +1 -7
- package/lib/android/app/src/main/java/com/reactnativenavigation/react/ReactView.java +38 -28
- package/lib/android/app/src/main/java/com/reactnativenavigation/react/modal/ModalFrameLayout.kt +1 -1
- package/lib/android/app/src/main/java/com/reactnativenavigation/react/modal/ModalLayoutController.kt +4 -6
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/externalcomponent/ExternalComponentCreator.java +1 -1
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/externalcomponent/ExternalComponentViewController.java +2 -4
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/navigator/Navigator.java +2 -2
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/viewcontroller/RootPresenter.java +1 -1
- package/lib/android/app/src/main/java/com/reactnativenavigation/views/component/ComponentViewCreator.java +1 -8
- package/lib/android/app/src/main/java/com/reactnativenavigation/views/stack/topbar/TopBarBackgroundView.java +2 -2
- package/lib/android/app/src/main/java/com/reactnativenavigation/views/stack/topbar/TopBarBackgroundViewCreator.java +1 -7
- package/lib/android/app/src/main/java/com/reactnativenavigation/views/stack/topbar/titlebar/TitleBarButtonCreator.java +1 -8
- package/lib/android/app/src/main/java/com/reactnativenavigation/views/stack/topbar/titlebar/TitleBarReactButtonView.java +3 -3
- package/lib/android/app/src/main/java/com/reactnativenavigation/views/stack/topbar/titlebar/TitleBarReactViewCreator.java +1 -7
- package/lib/android/app/src/reactNative71/java/com/reactnativenavigation/react/ReactGateway.java +10 -11
- package/lib/android/app/src/reactNative71/java/com/reactnativenavigation/react/modal/ModalContentLayout.kt +8 -42
- package/lib/android/app/src/reactNative71/java/com/reactnativenavigation/views/stack/topbar/titlebar/TitleBarReactView.kt +2 -2
- package/lib/dist/src/adapters/NativeCommandsSender.js +3 -2
- package/lib/dist/src/adapters/NativeEventsReceiver.js +4 -2
- package/lib/dist/src/adapters/NativeRNNTurboEventEmitter.d.ts +7 -0
- package/lib/dist/src/adapters/NativeRNNTurboEventEmitter.js +13 -0
- package/lib/dist/src/adapters/NativeRNNTurboModule.d.ts +28 -0
- package/lib/dist/src/adapters/NativeRNNTurboModule.js +16 -0
- package/lib/dist/src/commands/Deprecations.js +2 -2
- package/lib/dist/src/components/Modal.js +11 -2
- package/lib/ios/{AnimatedImageView.m → AnimatedImageView.mm} +1 -1
- package/lib/ios/{AnimatedReactView.m → AnimatedReactView.mm} +8 -1
- package/lib/ios/{AnimatedTextView.m → AnimatedTextView.mm} +21 -1
- package/lib/ios/BoolParser.h +1 -1
- package/lib/ios/{BottomTabsBasePresenter.m → BottomTabsBasePresenter.mm} +1 -1
- package/lib/ios/ColorParser.h +1 -1
- package/lib/ios/Constants.h +8 -0
- package/lib/ios/{Constants.m → Constants.mm} +12 -0
- package/lib/ios/NumberParser.h +1 -1
- package/lib/ios/RNNAppDelegate.h +8 -15
- package/lib/ios/RNNAppDelegate.mm +78 -81
- package/lib/ios/{RNNBottomTabsController.m → RNNBottomTabsController.mm} +1 -1
- package/lib/ios/RNNBridgeEventEmitter.h +4 -0
- package/lib/ios/RNNBridgeEventEmitter.mm +7 -0
- package/lib/ios/RNNBridgeManager.mm +71 -71
- package/lib/ios/{RNNButtonBuilder.m → RNNButtonBuilder.mm} +2 -2
- package/lib/ios/{RNNButtonOptions.m → RNNButtonOptions.mm} +2 -2
- package/lib/ios/{RNNButtonsParser.m → RNNButtonsParser.mm} +1 -1
- package/lib/ios/RNNCommandsHandler.h +8 -2
- package/lib/ios/{RNNCommandsHandler.m → RNNCommandsHandler.mm} +29 -10
- package/lib/ios/{RNNComponentOptions.m → RNNComponentOptions.mm} +3 -2
- package/lib/ios/{RNNComponentPresenter.m → RNNComponentPresenter.mm} +1 -1
- package/lib/ios/{RNNComponentViewController.m → RNNComponentViewController.mm} +0 -4
- package/lib/ios/RNNCustomTitleView.h +14 -4
- package/lib/ios/{RNNCustomTitleView.m → RNNCustomTitleView.mm} +8 -2
- package/lib/ios/RNNDotIndicatorPresenter.h +1 -1
- package/lib/ios/RNNElementFinder.h +2 -0
- package/lib/ios/RNNElementFinder.mm +44 -0
- package/lib/ios/RNNEventEmitter.h +1 -2
- package/lib/ios/{RNNEventEmitter.m → RNNEventEmitter.mm} +1 -5
- package/lib/ios/RNNExternalComponentStore.h +5 -0
- package/lib/ios/{RNNExternalComponentStore.m → RNNExternalComponentStore.mm} +12 -0
- package/lib/ios/{RNNFontAttributesCreator.m → RNNFontAttributesCreator.mm} +1 -1
- package/lib/ios/{RNNIconBackgroundOptions.m → RNNIconBackgroundOptions.mm} +1 -1
- package/lib/ios/{RNNInsetsOptions.m → RNNInsetsOptions.mm} +2 -2
- package/lib/ios/RNNModalManager.h +6 -0
- package/lib/ios/{RNNModalManager.m → RNNModalManager.mm} +71 -2
- package/lib/ios/{RNNNavigationOptions.m → RNNNavigationOptions.mm} +1 -1
- package/lib/ios/{RNNPushAnimation.m → RNNPushAnimation.mm} +1 -1
- package/lib/ios/RNNReactButtonView.h +4 -0
- package/lib/ios/RNNReactButtonView.mm +29 -0
- package/lib/ios/RNNReactRootViewCreator.h +4 -0
- package/lib/ios/{RNNReactRootViewCreator.m → RNNReactRootViewCreator.mm} +31 -8
- package/lib/ios/RNNReactView.h +64 -12
- package/lib/ios/RNNReactView.mm +119 -15
- package/lib/ios/{RNNScreenTransition.m → RNNScreenTransition.mm} +3 -2
- package/lib/ios/RNNSideMenu/MMDrawerController/{MMDrawerController.m → MMDrawerController.mm} +1 -1
- package/lib/ios/{RNNSideMenuChildVC.h → RNNSideMenuChildViewController.h} +1 -1
- package/lib/ios/{RNNSideMenuChildVC.m → RNNSideMenuChildViewController.mm} +4 -3
- package/lib/ios/{RNNSideMenuPresenter.m → RNNSideMenuPresenter.mm} +3 -3
- package/lib/ios/{RNNSideMenuController.h → RNNSideMenuViewController.h} +5 -5
- package/lib/ios/{RNNSideMenuController.m → RNNSideMenuViewController.mm} +8 -8
- package/lib/ios/{RNNSplashScreen.h → RNNSplashScreenViewController.h} +1 -1
- package/lib/ios/{RNNSplashScreen.m → RNNSplashScreenViewController.mm} +5 -5
- package/lib/ios/RNNSplitViewController.h +0 -1
- package/lib/ios/{RNNStackPresenter.m → RNNStackPresenter.mm} +2 -1
- package/lib/ios/RNNUIBarButtonItem.h +7 -1
- package/lib/ios/{RNNUIBarButtonItem.m → RNNUIBarButtonItem.mm} +17 -25
- package/lib/ios/RNNUtils.h +1 -0
- package/lib/ios/{RNNUtils.m → RNNUtils.mm} +8 -0
- package/lib/ios/{RNNControllerFactory.h → RNNViewControllerFactory.h} +10 -1
- package/lib/ios/{RNNControllerFactory.m → RNNViewControllerFactory.mm} +37 -7
- package/lib/ios/ReactNativeNavigation.h +13 -6
- package/lib/ios/ReactNativeNavigation.mm +117 -0
- package/lib/ios/ReactNativeNavigation.xcodeproj/project.pbxproj +976 -1166
- package/lib/ios/ScreenAnimationController.h +27 -9
- package/lib/ios/ScreenAnimationController.mm +180 -0
- package/lib/ios/SharedElementAnimator.mm +98 -0
- package/lib/ios/SideMenuOpenMode.h +1 -1
- package/lib/ios/StackControllerDelegate.h +10 -0
- package/lib/ios/{StackControllerDelegate.m → StackControllerDelegate.mm} +45 -1
- package/lib/ios/{TopBarTitlePresenter.m → TopBarTitlePresenter.mm} +2 -3
- package/lib/ios/{TransitionOptions.m → TransitionOptions.mm} +3 -2
- package/lib/ios/TurboModules/RNNTurboCommandsHandler.h +13 -0
- package/lib/ios/TurboModules/RNNTurboCommandsHandler.mm +16 -0
- package/lib/ios/TurboModules/RNNTurboEventEmitter.h +14 -0
- package/lib/ios/TurboModules/RNNTurboEventEmitter.mm +22 -0
- package/lib/ios/TurboModules/RNNTurboManager.h +23 -0
- package/lib/ios/TurboModules/RNNTurboManager.mm +114 -0
- package/lib/ios/TurboModules/RNNTurboModule.h +8 -0
- package/lib/ios/TurboModules/RNNTurboModule.mm +177 -0
- package/lib/ios/UISplitViewController+RNNOptions.h +1 -1
- package/lib/ios/{UISplitViewController+RNNOptions.m → UISplitViewController+RNNOptions.mm} +0 -1
- package/lib/ios/UIViewController+SideMenuController.h +2 -2
- package/lib/ios/{UIViewController+SideMenuController.m → UIViewController+SideMenuController.mm} +3 -3
- package/lib/ios/UIViewController+SideMenuViewController.h +8 -0
- package/lib/ios/Utils/{UIView+Utils.m → UIView+Utils.mm} +14 -0
- package/lib/src/adapters/NativeCommandsSender.ts +4 -2
- package/lib/src/adapters/NativeEventsReceiver.ts +6 -5
- package/lib/src/adapters/NativeRNNTurboEventEmitter.ts +18 -0
- package/lib/src/adapters/NativeRNNTurboModule.ts +47 -0
- package/lib/src/commands/Deprecations.ts +1 -1
- package/lib/src/components/Modal.tsx +23 -4
- package/metro.config.js +0 -1
- package/package.json +34 -6
- package/lib/ios/RNNElementFinder.m +0 -12
- package/lib/ios/RNNReactButtonView.m +0 -41
- package/lib/ios/RNNSwizzles.h +0 -13
- package/lib/ios/RNNSwizzles.m +0 -97
- package/lib/ios/ReactNativeNavigation.m +0 -85
- package/lib/ios/ScreenAnimationController.m +0 -139
- package/lib/ios/SharedElementAnimator.m +0 -83
- /package/lib/ios/{AnchorTransition.m → AnchorTransition.mm} +0 -0
- /package/lib/ios/{AnimatedUIImageView.m → AnimatedUIImageView.mm} +0 -0
- /package/lib/ios/{AnimatedViewFactory.m → AnimatedViewFactory.mm} +0 -0
- /package/lib/ios/{AnimationObserver.m → AnimationObserver.mm} +0 -0
- /package/lib/ios/{BaseAnimator.m → BaseAnimator.mm} +0 -0
- /package/lib/ios/{Bool.m → Bool.mm} +0 -0
- /package/lib/ios/{BoolParser.m → BoolParser.mm} +0 -0
- /package/lib/ios/{BottomTabPresenter.m → BottomTabPresenter.mm} +0 -0
- /package/lib/ios/{BottomTabPresenterCreator.m → BottomTabPresenterCreator.mm} +0 -0
- /package/lib/ios/{BottomTabsAfterInitialTabAttacher.m → BottomTabsAfterInitialTabAttacher.mm} +0 -0
- /package/lib/ios/{BottomTabsAppearancePresenter.m → BottomTabsAppearancePresenter.mm} +0 -0
- /package/lib/ios/{BottomTabsAttachMode.m → BottomTabsAttachMode.mm} +0 -0
- /package/lib/ios/{BottomTabsAttachModeFactory.m → BottomTabsAttachModeFactory.mm} +0 -0
- /package/lib/ios/{BottomTabsBaseAttacher.m → BottomTabsBaseAttacher.mm} +0 -0
- /package/lib/ios/{BottomTabsOnSwitchToTabAttacher.m → BottomTabsOnSwitchToTabAttacher.mm} +0 -0
- /package/lib/ios/{BottomTabsPresenterCreator.m → BottomTabsPresenterCreator.mm} +0 -0
- /package/lib/ios/{BottomTabsTogetherAttacher.m → BottomTabsTogetherAttacher.mm} +0 -0
- /package/lib/ios/{BoundsTransition.m → BoundsTransition.mm} +0 -0
- /package/lib/ios/{CenterTransition.m → CenterTransition.mm} +0 -0
- /package/lib/ios/{Color+Interpolation.m → Color+Interpolation.mm} +0 -0
- /package/lib/ios/{Color.m → Color.mm} +0 -0
- /package/lib/ios/{ColorParser.m → ColorParser.mm} +0 -0
- /package/lib/ios/{ColorTransition.m → ColorTransition.mm} +0 -0
- /package/lib/ios/{CornerRadiusTransition.m → CornerRadiusTransition.mm} +0 -0
- /package/lib/ios/{DeprecationOptions.m → DeprecationOptions.mm} +0 -0
- /package/lib/ios/{DictionaryParser.m → DictionaryParser.mm} +0 -0
- /package/lib/ios/{DisplayLinkAnimator.m → DisplayLinkAnimator.mm} +0 -0
- /package/lib/ios/{DotIndicatorOptions.m → DotIndicatorOptions.mm} +0 -0
- /package/lib/ios/{DotIndicatorParser.m → DotIndicatorParser.mm} +0 -0
- /package/lib/ios/{Double.m → Double.mm} +0 -0
- /package/lib/ios/{DoubleParser.m → DoubleParser.mm} +0 -0
- /package/lib/ios/{ElementAlphaTransition.m → ElementAlphaTransition.mm} +0 -0
- /package/lib/ios/{ElementAnimator.m → ElementAnimator.mm} +0 -0
- /package/lib/ios/{ElementBaseTransition.m → ElementBaseTransition.mm} +0 -0
- /package/lib/ios/{ElementFrameTransition.m → ElementFrameTransition.mm} +0 -0
- /package/lib/ios/{ElementHorizontalTransition.m → ElementHorizontalTransition.mm} +0 -0
- /package/lib/ios/{ElementTransitionOptions.m → ElementTransitionOptions.mm} +0 -0
- /package/lib/ios/{ElementTransitionsCreator.m → ElementTransitionsCreator.mm} +0 -0
- /package/lib/ios/{ElementVerticalTransition.m → ElementVerticalTransition.mm} +0 -0
- /package/lib/ios/{Enum.m → Enum.mm} +0 -0
- /package/lib/ios/{EnumParser.m → EnumParser.mm} +0 -0
- /package/lib/ios/{FloatTransition.m → FloatTransition.mm} +0 -0
- /package/lib/ios/{HorizontalScaleTransition.m → HorizontalScaleTransition.mm} +0 -0
- /package/lib/ios/{HorizontalTranslationTransition.m → HorizontalTranslationTransition.mm} +0 -0
- /package/lib/ios/{Image.m → Image.mm} +0 -0
- /package/lib/ios/{ImageParser.m → ImageParser.mm} +0 -0
- /package/lib/ios/{IntNumber.m → IntNumber.mm} +0 -0
- /package/lib/ios/{IntNumberParser.m → IntNumberParser.mm} +0 -0
- /package/lib/ios/{InteractivePopGestureDelegate.m → InteractivePopGestureDelegate.mm} +0 -0
- /package/lib/ios/Interpolators/{AccelerateDecelerateInterpolator.m → AccelerateDecelerateInterpolator.mm} +0 -0
- /package/lib/ios/Interpolators/{AccelerateInterpolator.m → AccelerateInterpolator.mm} +0 -0
- /package/lib/ios/Interpolators/{DecelerateAccelerateInterpolator.m → DecelerateAccelerateInterpolator.mm} +0 -0
- /package/lib/ios/Interpolators/{DecelerateInterpolator.m → DecelerateInterpolator.mm} +0 -0
- /package/lib/ios/Interpolators/{FastOutSlowIn.m → FastOutSlowIn.mm} +0 -0
- /package/lib/ios/Interpolators/{LinearInterpolator.m → LinearInterpolator.mm} +0 -0
- /package/lib/ios/Interpolators/{OvershootInterpolator.m → OvershootInterpolator.mm} +0 -0
- /package/lib/ios/Interpolators/{SpringInterpolator.m → SpringInterpolator.mm} +0 -0
- /package/lib/ios/{LNInterpolable.m → LNInterpolable.mm} +0 -0
- /package/lib/ios/{NSArray+utils.m → NSArray+utils.mm} +0 -0
- /package/lib/ios/{NoColor.m → NoColor.mm} +0 -0
- /package/lib/ios/{NullBool.m → NullBool.mm} +0 -0
- /package/lib/ios/{NullColor.m → NullColor.mm} +0 -0
- /package/lib/ios/{NullDictionary.m → NullDictionary.mm} +0 -0
- /package/lib/ios/{NullDouble.m → NullDouble.mm} +0 -0
- /package/lib/ios/{NullEnum.m → NullEnum.mm} +0 -0
- /package/lib/ios/{NullImage.m → NullImage.mm} +0 -0
- /package/lib/ios/{NullIntNumber.m → NullIntNumber.mm} +0 -0
- /package/lib/ios/{NullNumber.m → NullNumber.mm} +0 -0
- /package/lib/ios/{NullText.m → NullText.mm} +0 -0
- /package/lib/ios/{Number.m → Number.mm} +0 -0
- /package/lib/ios/{NumberParser.m → NumberParser.mm} +0 -0
- /package/lib/ios/{OptionsArrayParser.m → OptionsArrayParser.mm} +0 -0
- /package/lib/ios/{Param.m → Param.mm} +0 -0
- /package/lib/ios/{PathTransition.m → PathTransition.mm} +0 -0
- /package/lib/ios/{RCTConvert+Interpolation.m → RCTConvert+Interpolation.mm} +0 -0
- /package/lib/ios/{RCTConvert+SideMenuOpenGestureMode.m → RCTConvert+SideMenuOpenGestureMode.mm} +0 -0
- /package/lib/ios/{RCTConvert+UIBarButtonSystemItem.m → RCTConvert+UIBarButtonSystemItem.mm} +0 -0
- /package/lib/ios/{RCTConvert+UIFontWeight.m → RCTConvert+UIFontWeight.mm} +0 -0
- /package/lib/ios/{RCTHelpers.m → RCTHelpers.mm} +0 -0
- /package/lib/ios/{RNNAnimationsOptions.m → RNNAnimationsOptions.mm} +0 -0
- /package/lib/ios/{RNNBackButtonOptions.m → RNNBackButtonOptions.mm} +0 -0
- /package/lib/ios/{RNNBackgroundOptions.m → RNNBackgroundOptions.mm} +0 -0
- /package/lib/ios/{RNNBaseIconCreator.m → RNNBaseIconCreator.mm} +0 -0
- /package/lib/ios/{RNNBasePresenter.m → RNNBasePresenter.mm} +0 -0
- /package/lib/ios/{RNNBottomTabOptions.m → RNNBottomTabOptions.mm} +0 -0
- /package/lib/ios/{RNNBottomTabsOptions.m → RNNBottomTabsOptions.mm} +0 -0
- /package/lib/ios/{RNNBottomTabsPresenter.m → RNNBottomTabsPresenter.mm} +0 -0
- /package/lib/ios/{RNNBridgeModule.m → RNNBridgeModule.mm} +0 -0
- /package/lib/ios/{RNNButtonsPresenter.m → RNNButtonsPresenter.mm} +0 -0
- /package/lib/ios/{RNNComponentRootView.m → RNNComponentRootView.mm} +0 -0
- /package/lib/ios/{RNNComponentView.m → RNNComponentView.mm} +0 -0
- /package/lib/ios/{RNNConvert.m → RNNConvert.mm} +0 -0
- /package/lib/ios/{RNNDefaultOptionsHelper.m → RNNDefaultOptionsHelper.mm} +0 -0
- /package/lib/ios/{RNNDictionary.m → RNNDictionary.mm} +0 -0
- /package/lib/ios/{RNNDotIndicatorPresenter.m → RNNDotIndicatorPresenter.mm} +0 -0
- /package/lib/ios/{RNNDynamicIconCreator.m → RNNDynamicIconCreator.mm} +0 -0
- /package/lib/ios/{RNNElement.m → RNNElement.mm} +0 -0
- /package/lib/ios/{RNNElementView.m → RNNElementView.mm} +0 -0
- /package/lib/ios/{RNNEnterExitAnimation.m → RNNEnterExitAnimation.mm} +0 -0
- /package/lib/ios/{RNNErrorHandler.m → RNNErrorHandler.mm} +0 -0
- /package/lib/ios/{RNNExternalViewController.m → RNNExternalViewController.mm} +0 -0
- /package/lib/ios/{RNNIconCreator.m → RNNIconCreator.mm} +0 -0
- /package/lib/ios/{RNNIconDrawer.m → RNNIconDrawer.mm} +0 -0
- /package/lib/ios/{RNNInterpolator.m → RNNInterpolator.mm} +0 -0
- /package/lib/ios/{RNNLargeTitleOptions.m → RNNLargeTitleOptions.mm} +0 -0
- /package/lib/ios/{RNNLayoutInfo.m → RNNLayoutInfo.mm} +0 -0
- /package/lib/ios/{RNNLayoutManager.m → RNNLayoutManager.mm} +0 -0
- /package/lib/ios/{RNNLayoutNode.m → RNNLayoutNode.mm} +0 -0
- /package/lib/ios/{RNNLayoutOptions.m → RNNLayoutOptions.mm} +0 -0
- /package/lib/ios/{RNNModalHostViewManagerHandler.m → RNNModalHostViewManagerHandler.mm} +0 -0
- /package/lib/ios/{RNNModalManagerEventHandler.m → RNNModalManagerEventHandler.mm} +0 -0
- /package/lib/ios/{RNNModalOptions.m → RNNModalOptions.mm} +0 -0
- /package/lib/ios/{RNNOptions.m → RNNOptions.mm} +0 -0
- /package/lib/ios/{RNNOverlayManager.m → RNNOverlayManager.mm} +0 -0
- /package/lib/ios/{RNNOverlayOptions.m → RNNOverlayOptions.mm} +0 -0
- /package/lib/ios/{RNNOverlayWindow.m → RNNOverlayWindow.mm} +0 -0
- /package/lib/ios/{RNNPreviewOptions.m → RNNPreviewOptions.mm} +0 -0
- /package/lib/ios/{RNNReactBackgroundView.m → RNNReactBackgroundView.mm} +0 -0
- /package/lib/ios/{RNNReactComponentRegistry.m → RNNReactComponentRegistry.mm} +0 -0
- /package/lib/ios/{RNNReactTitleView.m → RNNReactTitleView.mm} +0 -0
- /package/lib/ios/{RNNScreenTransitionsCreator.m → RNNScreenTransitionsCreator.mm} +0 -0
- /package/lib/ios/{RNNScrollEdgeAppearanceBackgroundOptions.m → RNNScrollEdgeAppearanceBackgroundOptions.mm} +0 -0
- /package/lib/ios/{RNNScrollEdgeAppearanceOptions.m → RNNScrollEdgeAppearanceOptions.mm} +0 -0
- /package/lib/ios/{RNNSearchBarOptions.m → RNNSearchBarOptions.mm} +0 -0
- /package/lib/ios/{RNNSegmentedControl.m → RNNSegmentedControl.mm} +0 -0
- /package/lib/ios/{RNNSetRootAnimator.m → RNNSetRootAnimator.mm} +0 -0
- /package/lib/ios/{RNNShadowOptions.m → RNNShadowOptions.mm} +0 -0
- /package/lib/ios/{RNNSharedElementAnimationOptions.m → RNNSharedElementAnimationOptions.mm} +0 -0
- /package/lib/ios/RNNSideMenu/MMDrawerController/{MMDrawerBarButtonItem.m → MMDrawerBarButtonItem.mm} +0 -0
- /package/lib/ios/RNNSideMenu/MMDrawerController/{MMDrawerVisualState.m → MMDrawerVisualState.mm} +0 -0
- /package/lib/ios/RNNSideMenu/MMDrawerController/{MMExampleDrawerVisualStateManager.m → MMExampleDrawerVisualStateManager.mm} +0 -0
- /package/lib/ios/RNNSideMenu/MMDrawerController/{UIViewController+MMDrawerController.m → UIViewController+MMDrawerController.mm} +0 -0
- /package/lib/ios/{RNNSideMenuOptions.m → RNNSideMenuOptions.mm} +0 -0
- /package/lib/ios/{RNNSideMenuSideOptions.m → RNNSideMenuSideOptions.mm} +0 -0
- /package/lib/ios/{RNNSplitViewController.m → RNNSplitViewController.mm} +0 -0
- /package/lib/ios/{RNNSplitViewControllerPresenter.m → RNNSplitViewControllerPresenter.mm} +0 -0
- /package/lib/ios/{RNNSplitViewOptions.m → RNNSplitViewOptions.mm} +0 -0
- /package/lib/ios/{RNNStackController.m → RNNStackController.mm} +0 -0
- /package/lib/ios/{RNNStatusBarOptions.m → RNNStatusBarOptions.mm} +0 -0
- /package/lib/ios/{RNNSubtitleOptions.m → RNNSubtitleOptions.mm} +0 -0
- /package/lib/ios/{RNNTabBarItemCreator.m → RNNTabBarItemCreator.mm} +0 -0
- /package/lib/ios/{RNNTitleOptions.m → RNNTitleOptions.mm} +0 -0
- /package/lib/ios/{RNNTitleViewHelper.m → RNNTitleViewHelper.mm} +0 -0
- /package/lib/ios/{RNNTopBarOptions.m → RNNTopBarOptions.mm} +0 -0
- /package/lib/ios/{RNNTopTabOptions.m → RNNTopTabOptions.mm} +0 -0
- /package/lib/ios/{RNNTopTabsOptions.m → RNNTopTabsOptions.mm} +0 -0
- /package/lib/ios/{RNNTopTabsViewController.m → RNNTopTabsViewController.mm} +0 -0
- /package/lib/ios/{RNNTransitionStateHolder.m → RNNTransitionStateHolder.mm} +0 -0
- /package/lib/ios/{RNNUIBarBackButtonItem.m → RNNUIBarBackButtonItem.mm} +0 -0
- /package/lib/ios/{RNNViewLocation.m → RNNViewLocation.mm} +0 -0
- /package/lib/ios/{RectTransition.m → RectTransition.mm} +0 -0
- /package/lib/ios/{RotationTransition.m → RotationTransition.mm} +0 -0
- /package/lib/ios/{ScreenReversedAnimationController.m → ScreenReversedAnimationController.mm} +0 -0
- /package/lib/ios/{SharedElementTransition.m → SharedElementTransition.mm} +0 -0
- /package/lib/ios/{SharedElementTransitionOptions.m → SharedElementTransitionOptions.mm} +0 -0
- /package/lib/ios/{SideMenuOpenGestureModeParser.m → SideMenuOpenGestureModeParser.mm} +0 -0
- /package/lib/ios/{SideMenuOpenMode.m → SideMenuOpenMode.mm} +0 -0
- /package/lib/ios/{TabBarItemAppearanceCreator.m → TabBarItemAppearanceCreator.mm} +0 -0
- /package/lib/ios/{TabBarItemIOS15Creator.m → TabBarItemIOS15Creator.mm} +0 -0
- /package/lib/ios/{Text.m → Text.mm} +0 -0
- /package/lib/ios/{TextParser.m → TextParser.mm} +0 -0
- /package/lib/ios/{TextStorageTransition.m → TextStorageTransition.mm} +0 -0
- /package/lib/ios/{TimeInterval.m → TimeInterval.mm} +0 -0
- /package/lib/ios/{TimeIntervalParser.m → TimeIntervalParser.mm} +0 -0
- /package/lib/ios/{TopBarAppearancePresenter.m → TopBarAppearancePresenter.mm} +0 -0
- /package/lib/ios/{TopBarPresenter.m → TopBarPresenter.mm} +0 -0
- /package/lib/ios/{TopBarPresenterCreator.m → TopBarPresenterCreator.mm} +0 -0
- /package/lib/ios/{TransformRectTransition.m → TransformRectTransition.mm} +0 -0
- /package/lib/ios/{Transition.m → Transition.mm} +0 -0
- /package/lib/ios/{TransitionDetailsOptions.m → TransitionDetailsOptions.mm} +0 -0
- /package/lib/ios/{UIImage+utils.m → UIImage+utils.mm} +0 -0
- /package/lib/ios/{UIImageView+Transition.m → UIImageView+Transition.mm} +0 -0
- /package/lib/ios/{UINavigationController+RNNCommands.m → UINavigationController+RNNCommands.mm} +0 -0
- /package/lib/ios/{UINavigationController+RNNOptions.m → UINavigationController+RNNOptions.mm} +0 -0
- /package/lib/ios/{UITabBar+utils.m → UITabBar+utils.mm} +0 -0
- /package/lib/ios/{UITabBarController+RNNOptions.m → UITabBarController+RNNOptions.mm} +0 -0
- /package/lib/ios/{UIViewController+LayoutProtocol.m → UIViewController+LayoutProtocol.mm} +0 -0
- /package/lib/ios/{UIViewController+RNNOptions.m → UIViewController+RNNOptions.mm} +0 -0
- /package/lib/ios/Utils/{UIColor+RNNUtils.m → UIColor+RNNUtils.mm} +0 -0
- /package/lib/ios/Utils/{UITabBarController+RNNUtils.m → UITabBarController+RNNUtils.mm} +0 -0
- /package/lib/ios/Utils/{UIViewController+Utils.m → UIViewController+Utils.mm} +0 -0
- /package/lib/ios/{VICMAImageView.m → VICMAImageView.mm} +0 -0
- /package/lib/ios/{VerticalRotationTransition.m → VerticalRotationTransition.mm} +0 -0
- /package/lib/ios/{VerticalScaleTransition.m → VerticalScaleTransition.mm} +0 -0
- /package/lib/ios/{VerticalTranslationTransition.m → VerticalTranslationTransition.mm} +0 -0
- /package/lib/ios/{WindowOptions.m → WindowOptions.mm} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#import "RNNAppDelegate.h"
|
|
2
2
|
#import <ReactNativeNavigation/ReactNativeNavigation.h>
|
|
3
3
|
|
|
4
|
-
#
|
|
5
|
-
|
|
4
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
5
|
+
#import "RCTAppSetupUtils.h"
|
|
6
6
|
#import <React/CoreModulesPlugins.h>
|
|
7
7
|
#import <React/RCTCxxBridgeDelegate.h>
|
|
8
8
|
#import <React/RCTLegacyViewManagerInteropComponentView.h>
|
|
@@ -13,121 +13,118 @@
|
|
|
13
13
|
#import <react/config/ReactNativeConfig.h>
|
|
14
14
|
#import <react/renderer/runtimescheduler/RuntimeScheduler.h>
|
|
15
15
|
#import <react/renderer/runtimescheduler/RuntimeSchedulerCallInvoker.h>
|
|
16
|
+
#import <React/RCTSurfacePresenter.h>
|
|
17
|
+
#import <React/RCTBridge+Private.h>
|
|
18
|
+
#import <React/RCTImageLoader.h>
|
|
19
|
+
#import <React/RCTBridgeProxy.h>
|
|
20
|
+
#import <React/RCTSurfacePresenter.h>
|
|
21
|
+
#import <react/utils/ManagedObjectWrapper.h>
|
|
16
22
|
|
|
17
23
|
static NSString *const kRNConcurrentRoot = @"concurrentRoot";
|
|
18
24
|
|
|
19
|
-
@interface RNNAppDelegate () <RCTTurboModuleManagerDelegate, RCTCxxBridgeDelegate> {
|
|
20
|
-
std::shared_ptr<const facebook::react::ReactNativeConfig> _reactNativeConfig;
|
|
21
|
-
facebook::react::ContextContainer::Shared _contextContainer;
|
|
22
|
-
std::shared_ptr<facebook::react::RuntimeScheduler> _runtimeScheduler;
|
|
23
|
-
}
|
|
25
|
+
@interface RNNAppDelegate () <RCTTurboModuleManagerDelegate, RCTCxxBridgeDelegate> {}
|
|
24
26
|
@end
|
|
25
27
|
|
|
26
28
|
#endif
|
|
27
29
|
|
|
28
30
|
@implementation RNNAppDelegate
|
|
29
31
|
|
|
30
|
-
#if RCT_NEW_ARCH_ENABLED
|
|
31
|
-
- (instancetype)init {
|
|
32
|
-
if (self = [super init]) {
|
|
33
|
-
_contextContainer = std::make_shared<facebook::react::ContextContainer const>();
|
|
34
|
-
_reactNativeConfig = std::make_shared<facebook::react::EmptyReactNativeConfig const>();
|
|
35
|
-
_contextContainer->insert("ReactNativeConfig", _reactNativeConfig);
|
|
36
|
-
}
|
|
37
|
-
return self;
|
|
38
|
-
}
|
|
39
|
-
#endif
|
|
40
|
-
|
|
41
32
|
- (BOOL)application:(UIApplication *)application
|
|
42
|
-
|
|
43
|
-
#if RCT_NEW_ARCH_ENABLED
|
|
44
|
-
RCTEnableTurboModule(true);
|
|
45
|
-
#endif
|
|
46
|
-
RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
|
|
47
|
-
#if RCT_NEW_ARCH_ENABLED
|
|
48
|
-
self.bridgeAdapter =
|
|
49
|
-
[[RCTSurfacePresenterBridgeAdapter alloc] initWithBridge:bridge
|
|
50
|
-
contextContainer:_contextContainer];
|
|
51
|
-
bridge.surfacePresenter = self.bridgeAdapter.surfacePresenter;
|
|
52
|
-
|
|
53
|
-
[self unstable_registerLegacyComponents];
|
|
54
|
-
#endif
|
|
33
|
+
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
|
|
55
34
|
|
|
56
|
-
|
|
35
|
+
// Copied from RCTAppDelegate, it private inside it
|
|
36
|
+
self.rootViewFactory = [self createRCTRootViewFactory];
|
|
57
37
|
|
|
58
|
-
|
|
59
|
-
|
|
38
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
39
|
+
RCTAppSetupPrepareApp(application, self.turboModuleEnabled);
|
|
40
|
+
RCTSetNewArchEnabled(TRUE);
|
|
41
|
+
|
|
42
|
+
if (self.bridgelessEnabled) {
|
|
43
|
+
// Creating host instead of bridge
|
|
44
|
+
self.rootViewFactory.reactHost = [self.rootViewFactory createReactHost:launchOptions];
|
|
45
|
+
|
|
46
|
+
[ReactNativeNavigation bootstrapWithHost:self.rootViewFactory.reactHost];
|
|
60
47
|
|
|
61
|
-
|
|
62
|
-
|
|
48
|
+
return YES;
|
|
49
|
+
}
|
|
50
|
+
#endif
|
|
51
|
+
// Force RN to init all necessary modules instead of copy-pasting code (ex. bridge)
|
|
52
|
+
[self.rootViewFactory viewWithModuleName:@""];
|
|
53
|
+
|
|
54
|
+
[ReactNativeNavigation bootstrapWithBridge:self.bridge];
|
|
55
|
+
|
|
56
|
+
return YES;
|
|
63
57
|
}
|
|
64
58
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
59
|
+
- (RCTRootViewFactory *)createRCTRootViewFactory
|
|
60
|
+
{
|
|
61
|
+
__weak __typeof(self) weakSelf = self;
|
|
62
|
+
RCTBundleURLBlock bundleUrlBlock = ^{
|
|
63
|
+
RCTAppDelegate *strongSelf = weakSelf;
|
|
64
|
+
return strongSelf.bundleURL;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
RCTRootViewFactoryConfiguration *configuration =
|
|
68
|
+
[[RCTRootViewFactoryConfiguration alloc] initWithBundleURLBlock:bundleUrlBlock
|
|
69
|
+
newArchEnabled:self.fabricEnabled
|
|
70
|
+
turboModuleEnabled:self.turboModuleEnabled
|
|
71
|
+
bridgelessEnabled:self.bridgelessEnabled];
|
|
72
|
+
|
|
73
|
+
if (!self.bridgelessEnabled) {
|
|
74
|
+
configuration.extraModulesForBridge = ^NSArray<id<RCTBridgeModule>> * _Nonnull(RCTBridge * _Nonnull bridge) {
|
|
75
|
+
return [ReactNativeNavigation extraModulesForBridge:bridge];
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
configuration.createRootViewWithBridge = ^UIView *(RCTBridge *bridge, NSString *moduleName, NSDictionary *initProps)
|
|
80
|
+
{
|
|
81
|
+
// Ignoring creation of default view, will initialize our custom UIViewController later
|
|
82
|
+
return nil;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
configuration.createBridgeWithDelegate = ^RCTBridge *(id<RCTBridgeDelegate> delegate, NSDictionary *launchOptions)
|
|
86
|
+
{
|
|
87
|
+
return [weakSelf createBridgeWithDelegate:delegate launchOptions:launchOptions];
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
#ifndef RCT_NEW_ARCH_ENABLED
|
|
91
|
+
return [[RCTRootViewFactory alloc] initWithConfiguration:configuration];
|
|
92
|
+
}
|
|
93
|
+
#else
|
|
94
|
+
return [[RCTRootViewFactory alloc] initWithConfiguration:configuration andTurboModuleManagerDelegate:self];
|
|
79
95
|
}
|
|
80
96
|
|
|
81
97
|
#pragma mark RCTTurboModuleManagerDelegate
|
|
82
98
|
|
|
83
99
|
- (Class)getModuleClassFromName:(const char *)name {
|
|
84
|
-
|
|
100
|
+
return RCTCoreModulesClassProvider(name);
|
|
85
101
|
}
|
|
86
102
|
|
|
87
103
|
- (std::shared_ptr<facebook::react::TurboModule>)
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
104
|
+
getTurboModule:(const std::string &)name
|
|
105
|
+
jsInvoker:(std::shared_ptr<facebook::react::CallInvoker>)jsInvoker {
|
|
106
|
+
return nullptr;
|
|
91
107
|
}
|
|
92
108
|
|
|
93
109
|
- (std::shared_ptr<facebook::react::TurboModule>)
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
110
|
+
getTurboModule:(const std::string &)name
|
|
111
|
+
initParams:(const facebook::react::ObjCTurboModule::InitParams &)params {
|
|
112
|
+
return nullptr;
|
|
97
113
|
}
|
|
98
114
|
|
|
99
115
|
- (id<RCTTurboModule>)getModuleInstanceFromClass:(Class)moduleClass {
|
|
100
|
-
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
#pragma mark - New Arch Enabled settings
|
|
104
|
-
|
|
105
|
-
- (BOOL)turboModuleEnabled {
|
|
106
|
-
return YES;
|
|
116
|
+
return RCTAppSetupDefaultModuleFromClass(moduleClass);
|
|
107
117
|
}
|
|
108
|
-
|
|
109
|
-
- (BOOL)fabricEnabled {
|
|
110
|
-
return YES;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
#pragma mark - New Arch Utilities
|
|
114
|
-
|
|
115
|
-
- (void)unstable_registerLegacyComponents {
|
|
116
|
-
for (NSString *legacyComponent in [RCTLegacyInteropComponents legacyInteropComponents]) {
|
|
117
|
-
[RCTLegacyViewManagerInteropComponentView supportLegacyViewManagerWithName:legacyComponent];
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
118
|
#endif
|
|
122
119
|
|
|
123
120
|
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
121
|
+
[NSException raise:@"RCTBridgeDelegate::sourceURLForBridge not implemented"
|
|
122
|
+
format:@"Subclasses must implement a valid sourceURLForBridge method"];
|
|
123
|
+
return nil;
|
|
127
124
|
}
|
|
128
125
|
|
|
129
126
|
- (BOOL)concurrentRootEnabled {
|
|
130
|
-
|
|
127
|
+
return true;
|
|
131
128
|
}
|
|
132
129
|
|
|
133
130
|
@end
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
UINavigationController *selectedChild = self.selectedViewController;
|
|
75
75
|
if ([selectedChild isKindOfClass:UINavigationController.class] &&
|
|
76
76
|
selectedChild.hidesBottomBarWhenPushed) {
|
|
77
|
-
[selectedChild pushViewController:UIViewController
|
|
77
|
+
[selectedChild pushViewController: [UIViewController new] animated:NO];
|
|
78
78
|
[selectedChild popViewControllerAnimated:NO];
|
|
79
79
|
}
|
|
80
80
|
}
|
|
@@ -2,12 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
#import "RNNBridgeModule.h"
|
|
4
4
|
#import "RNNComponentViewCreator.h"
|
|
5
|
-
#import "
|
|
5
|
+
#import "RNNBridgeEventEmitter.h"
|
|
6
6
|
#import "RNNLayoutManager.h"
|
|
7
7
|
#import "RNNModalHostViewManagerHandler.h"
|
|
8
8
|
#import "RNNReactComponentRegistry.h"
|
|
9
9
|
#import "RNNReactRootViewCreator.h"
|
|
10
|
-
#import "RNNSplashScreen.h"
|
|
11
10
|
#import <React/RCTBridge.h>
|
|
12
11
|
#import <React/RCTUIManager.h>
|
|
13
12
|
|
|
@@ -24,100 +23,101 @@
|
|
|
24
23
|
@end
|
|
25
24
|
|
|
26
25
|
@implementation RNNBridgeManager {
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
RCTBridge *_bridge;
|
|
27
|
+
UIWindow *_mainWindow;
|
|
29
28
|
|
|
30
|
-
|
|
29
|
+
RNNExternalComponentStore *_store;
|
|
31
30
|
|
|
32
|
-
|
|
31
|
+
RNNCommandsHandler *_commandsHandler;
|
|
33
32
|
}
|
|
34
33
|
|
|
35
34
|
- (instancetype)initWithBridge:(RCTBridge *)bridge mainWindow:(UIWindow *)mainWindow {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
35
|
+
if (self = [super init]) {
|
|
36
|
+
_bridge = bridge;
|
|
37
|
+
_mainWindow = mainWindow;
|
|
38
|
+
|
|
39
|
+
_overlayManager = [RNNOverlayManager new];
|
|
40
|
+
|
|
41
|
+
_store = [RNNExternalComponentStore new];
|
|
42
|
+
|
|
43
|
+
[[NSNotificationCenter defaultCenter] addObserver:self
|
|
44
|
+
selector:@selector(onJavaScriptLoaded)
|
|
45
|
+
name:RCTJavaScriptDidLoadNotification
|
|
46
|
+
object:nil];
|
|
47
|
+
[[NSNotificationCenter defaultCenter] addObserver:self
|
|
48
|
+
selector:@selector(onJavaScriptWillLoad)
|
|
49
|
+
name:RCTJavaScriptWillStartLoadingNotification
|
|
50
|
+
object:nil];
|
|
51
|
+
[[NSNotificationCenter defaultCenter] addObserver:self
|
|
52
|
+
selector:@selector(onBridgeWillReload)
|
|
53
|
+
name:RCTBridgeWillReloadNotification
|
|
54
|
+
object:nil];
|
|
55
|
+
}
|
|
56
|
+
return self;
|
|
58
57
|
}
|
|
59
58
|
|
|
60
59
|
- (void)registerExternalComponent:(NSString *)name callback:(RNNExternalViewCreator)callback {
|
|
61
|
-
|
|
60
|
+
[_store registerExternalComponent:name callback:callback];
|
|
62
61
|
}
|
|
63
62
|
|
|
64
63
|
- (NSArray<id<RCTBridgeModule>> *)extraModulesForBridge:(RCTBridge *)bridge {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
64
|
+
RNNEventEmitter * eventEmitter = [[RNNBridgeEventEmitter alloc] init];
|
|
65
|
+
|
|
66
|
+
RNNModalManagerEventHandler *modalManagerEventHandler =
|
|
67
|
+
[[RNNModalManagerEventHandler alloc] initWithEventEmitter:eventEmitter];
|
|
68
|
+
_modalManager = [[RNNModalManager alloc] initWithBridge:bridge
|
|
69
|
+
eventHandler:modalManagerEventHandler];
|
|
70
|
+
_modalHostViewHandler =
|
|
71
|
+
[[RNNModalHostViewManagerHandler alloc] initWithModalManager:_modalManager];
|
|
72
|
+
_layoutManager = [[RNNLayoutManager alloc] init];
|
|
73
|
+
|
|
74
|
+
id<RNNComponentViewCreator> rootViewCreator =
|
|
75
|
+
[[RNNReactRootViewCreator alloc] initWithBridge:bridge eventEmitter:eventEmitter];
|
|
76
|
+
_componentRegistry = [[RNNReactComponentRegistry alloc] initWithCreator:rootViewCreator];
|
|
77
|
+
RNNViewControllerFactory *controllerFactory =
|
|
78
|
+
[[RNNViewControllerFactory alloc] initWithRootViewCreator:rootViewCreator
|
|
79
|
+
eventEmitter:eventEmitter
|
|
80
|
+
store:_store
|
|
81
|
+
componentRegistry:_componentRegistry
|
|
82
|
+
andBridge:bridge
|
|
83
|
+
bottomTabsAttachModeFactory:[BottomTabsAttachModeFactory new]];
|
|
84
|
+
RNNSetRootAnimator *setRootAnimator = [RNNSetRootAnimator new];
|
|
85
|
+
_commandsHandler = [[RNNCommandsHandler alloc] initWithViewControllerFactory:controllerFactory
|
|
86
|
+
layoutManager:_layoutManager
|
|
87
|
+
eventEmitter:eventEmitter
|
|
88
|
+
modalManager:_modalManager
|
|
89
|
+
overlayManager:_overlayManager
|
|
90
|
+
setRootAnimator:setRootAnimator
|
|
91
|
+
mainWindow:_mainWindow];
|
|
92
|
+
RNNBridgeModule *bridgeModule =
|
|
93
|
+
[[RNNBridgeModule alloc] initWithCommandsHandler:_commandsHandler];
|
|
94
|
+
|
|
95
|
+
return @[ bridgeModule, eventEmitter ];
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
- (UIViewController *)findComponentForId:(NSString *)componentId {
|
|
99
|
-
|
|
99
|
+
return [_layoutManager findComponentForId:componentId];
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
#pragma mark - JavaScript & Bridge Notifications
|
|
103
103
|
|
|
104
104
|
- (void)onJavaScriptWillLoad {
|
|
105
|
-
|
|
105
|
+
[_componentRegistry clear];
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
- (void)onJavaScriptLoaded {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
109
|
+
[_commandsHandler setReadyToReceiveCommands:true];
|
|
110
|
+
[_modalHostViewHandler
|
|
111
|
+
connectModalHostViewManager:[self.bridge moduleForClass:RCTModalHostViewManager.class]];
|
|
112
|
+
[[_bridge moduleForClass:[RNNBridgeEventEmitter class]] sendOnAppLaunched];
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
- (void)onBridgeWillReload {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
116
|
+
dispatch_async(dispatch_get_main_queue(), ^{
|
|
117
|
+
[self->_overlayManager dismissAllOverlays];
|
|
118
|
+
[self->_componentRegistry clear];
|
|
119
|
+
UIApplication.sharedApplication.delegate.window.rootViewController = nil;
|
|
120
|
+
});
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
@end
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
self = [super init];
|
|
12
12
|
_componentRegistry = componentRegistry;
|
|
13
13
|
if (@available(iOS 13.0, *)) {
|
|
14
|
-
_iconCreator = [[RNNDynamicIconCreator alloc] initWithIconDrawer:RNNIconDrawer
|
|
14
|
+
_iconCreator = [[RNNDynamicIconCreator alloc] initWithIconDrawer:[RNNIconDrawer new]];
|
|
15
15
|
} else {
|
|
16
|
-
_iconCreator = [[RNNIconCreator alloc] initWithIconDrawer:RNNIconDrawer
|
|
16
|
+
_iconCreator = [[RNNIconCreator alloc] initWithIconDrawer:[RNNIconDrawer new]];
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
return self;
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
- (RNNButtonOptions *)copy {
|
|
33
|
-
RNNButtonOptions *newOptions = RNNButtonOptions
|
|
33
|
+
RNNButtonOptions *newOptions = [RNNButtonOptions new];
|
|
34
34
|
newOptions.identifier = self.identifier.copy;
|
|
35
35
|
newOptions.component = self.component.copy;
|
|
36
36
|
newOptions.fontFamily = self.fontFamily.copy;
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
|
|
101
101
|
- (UIColor *)resolveColor {
|
|
102
102
|
if ([_disableIconTint withDefault:NO])
|
|
103
|
-
return NullColor
|
|
103
|
+
return [NullColor new].get;
|
|
104
104
|
if (![_enabled withDefault:YES] && _disabledColor.hasValue)
|
|
105
105
|
return _disabledColor.get;
|
|
106
106
|
else
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
if (!buttons)
|
|
7
7
|
return nil;
|
|
8
8
|
if ([buttons isKindOfClass:[NSArray class]]) {
|
|
9
|
-
NSMutableArray *buttonsArray = NSMutableArray
|
|
9
|
+
NSMutableArray *buttonsArray = [NSMutableArray new];
|
|
10
10
|
for (NSDictionary *buttonDict in buttons) {
|
|
11
11
|
[buttonsArray addObject:[self parseButton:buttonDict]];
|
|
12
12
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#import "
|
|
1
|
+
#import "RNNViewControllerFactory.h"
|
|
2
2
|
#import "RNNLayoutManager.h"
|
|
3
3
|
#import "RNNModalManager.h"
|
|
4
4
|
#import "RNNOverlayManager.h"
|
|
@@ -6,9 +6,15 @@
|
|
|
6
6
|
#import <Foundation/Foundation.h>
|
|
7
7
|
#import <UIKit/UIKit.h>
|
|
8
8
|
|
|
9
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
10
|
+
#import <React/RCTSurfacePresenter.h>
|
|
11
|
+
#import <React/RCTMountingManager.h>
|
|
12
|
+
#import <React/RCTComponentViewRegistry.h>
|
|
13
|
+
#endif
|
|
14
|
+
|
|
9
15
|
@interface RNNCommandsHandler : NSObject
|
|
10
16
|
|
|
11
|
-
- (instancetype)
|
|
17
|
+
- (instancetype)initWithViewControllerFactory:(RNNViewControllerFactory *)controllerFactory
|
|
12
18
|
layoutManager:(RNNLayoutManager *)layoutManager
|
|
13
19
|
eventEmitter:(RNNEventEmitter *)eventEmitter
|
|
14
20
|
modalManager:(RNNModalManager *)modalManager
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
#import "React/RCTI18nUtil.h"
|
|
9
9
|
#import "UINavigationController+RNNCommands.h"
|
|
10
10
|
#import "UIViewController+RNNOptions.h"
|
|
11
|
+
#import "RNNUtils.h"
|
|
11
12
|
|
|
12
13
|
static NSString *const setRoot = @"setRoot";
|
|
13
14
|
static NSString *const setStackRoot = @"setStackRoot";
|
|
@@ -30,7 +31,7 @@ static NSString *const setDefaultOptions = @"setDefaultOptions";
|
|
|
30
31
|
@end
|
|
31
32
|
|
|
32
33
|
@implementation RNNCommandsHandler {
|
|
33
|
-
|
|
34
|
+
RNNViewControllerFactory *_controllerFactory;
|
|
34
35
|
RNNLayoutManager *_layoutManager;
|
|
35
36
|
RNNModalManager *_modalManager;
|
|
36
37
|
RNNOverlayManager *_overlayManager;
|
|
@@ -39,7 +40,7 @@ static NSString *const setDefaultOptions = @"setDefaultOptions";
|
|
|
39
40
|
RNNSetRootAnimator *_setRootAnimator;
|
|
40
41
|
}
|
|
41
42
|
|
|
42
|
-
- (instancetype)
|
|
43
|
+
- (instancetype)initWithViewControllerFactory:(RNNViewControllerFactory *)controllerFactory
|
|
43
44
|
layoutManager:(RNNLayoutManager *)layoutManager
|
|
44
45
|
eventEmitter:(RNNEventEmitter *)eventEmitter
|
|
45
46
|
modalManager:(RNNModalManager *)modalManager
|
|
@@ -89,7 +90,7 @@ static NSString *const setDefaultOptions = @"setDefaultOptions";
|
|
|
89
90
|
[_layoutManager addPendingViewController:vc];
|
|
90
91
|
|
|
91
92
|
RNNNavigationOptions *optionsWithDefault = vc.resolveOptionsWithDefault;
|
|
92
|
-
vc.waitForRender = [optionsWithDefault.animations.setRoot.waitForRender withDefault:
|
|
93
|
+
vc.waitForRender = [optionsWithDefault.animations.setRoot.waitForRender withDefault: [RNNUtils getDefaultWaitForRender]];
|
|
93
94
|
|
|
94
95
|
__weak UIViewController *weakVC = vc;
|
|
95
96
|
[vc setReactViewReadyCallback:^{
|
|
@@ -140,7 +141,9 @@ static NSString *const setDefaultOptions = @"setDefaultOptions";
|
|
|
140
141
|
[RNNDefaultOptionsHelper recursivelySetDefaultOptions:defaultOptions
|
|
141
142
|
onRootViewController:rootViewController];
|
|
142
143
|
|
|
143
|
-
|
|
144
|
+
if (completion != nil) {
|
|
145
|
+
completion();
|
|
146
|
+
}
|
|
144
147
|
}
|
|
145
148
|
|
|
146
149
|
- (void)push:(NSString *)componentId
|
|
@@ -195,9 +198,22 @@ static NSString *const setDefaultOptions = @"setDefaultOptions";
|
|
|
195
198
|
newVc.preferredContentSize = size;
|
|
196
199
|
}
|
|
197
200
|
RCTExecuteOnMainQueue(^{
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
+
UIView *view = nil;
|
|
202
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
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
|
+
}
|
|
212
|
+
#else
|
|
213
|
+
view = [[ReactNativeNavigation getBridge].uiManager
|
|
214
|
+
viewForReactTag:optionsWithDefault.preview.reactTag.get];
|
|
215
|
+
#endif
|
|
216
|
+
[rootVc registerForPreviewingWithDelegate:(id)rootVc sourceView:view];
|
|
201
217
|
});
|
|
202
218
|
}
|
|
203
219
|
} else {
|
|
@@ -246,14 +262,14 @@ static NSString *const setDefaultOptions = @"setDefaultOptions";
|
|
|
246
262
|
UIViewController *fromVC = [_layoutManager findComponentForId:componentId];
|
|
247
263
|
|
|
248
264
|
RNNNavigationOptions *options = newVC.resolveOptionsWithDefault;
|
|
249
|
-
newVC.waitForRender = ([options.animations.setStackRoot.waitForRender withDefault:
|
|
265
|
+
newVC.waitForRender = ([options.animations.setStackRoot.waitForRender withDefault: [RNNUtils getDefaultWaitForRender]]);
|
|
250
266
|
|
|
251
|
-
__weak
|
|
267
|
+
__weak RNNEventEmitter *weakEventEmitter = _eventEmitter;
|
|
252
268
|
__weak UIViewController *weakNewVC = newVC;
|
|
253
269
|
[newVC setReactViewReadyCallback:^{
|
|
254
270
|
[fromVC.stack setStackChildren:childViewControllers
|
|
255
271
|
fromViewController:fromVC
|
|
256
|
-
animated:[options.animations.setStackRoot.enable withDefault:
|
|
272
|
+
animated:[options.animations.setStackRoot.enable withDefault: [RNNUtils getDefaultWaitForRender]]
|
|
257
273
|
completion:^{
|
|
258
274
|
[self->_layoutManager removePendingViewController:weakNewVC];
|
|
259
275
|
[weakEventEmitter sendOnNavigationCommandCompletion:setStackRoot
|
|
@@ -502,12 +518,15 @@ static NSString *const setDefaultOptions = @"setDefaultOptions";
|
|
|
502
518
|
#pragma mark - private
|
|
503
519
|
|
|
504
520
|
- (void)assertReady {
|
|
521
|
+
#ifndef RCT_NEW_ARCH_ENABLED
|
|
505
522
|
if (!self.readyToReceiveCommands) {
|
|
506
523
|
[[NSException exceptionWithName:@"BridgeNotLoadedError"
|
|
507
524
|
reason:@"Bridge not yet loaded! Send commands after "
|
|
508
525
|
@"Navigation.events().onAppLaunched() has been called."
|
|
509
526
|
userInfo:nil] raise];
|
|
510
527
|
}
|
|
528
|
+
#endif
|
|
529
|
+
return;
|
|
511
530
|
}
|
|
512
531
|
|
|
513
532
|
@end
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#import "RNNComponentOptions.h"
|
|
2
|
+
#import "RNNUtils.h"
|
|
2
3
|
|
|
3
4
|
@implementation RNNComponentOptions
|
|
4
5
|
|
|
@@ -8,13 +9,13 @@
|
|
|
8
9
|
self.name = [TextParser parse:dict key:@"name"];
|
|
9
10
|
self.componentId = [TextParser parse:dict key:@"componentId"];
|
|
10
11
|
self.alignment = [TextParser parse:dict key:@"alignment"];
|
|
11
|
-
|
|
12
|
+
self.waitForRender = [Bool withValue:[[BoolParser parse:dict key:@"waitForRender"] withDefault:[RNNUtils getDefaultWaitForRender]]];
|
|
12
13
|
|
|
13
14
|
return self;
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
- (id)copyWithZone:(NSZone *)zone {
|
|
17
|
-
RNNComponentOptions *newOptions = RNNComponentOptions
|
|
18
|
+
RNNComponentOptions *newOptions = [RNNComponentOptions new];
|
|
18
19
|
newOptions.name = self.name.copy;
|
|
19
20
|
newOptions.componentId = self.componentId.copy;
|
|
20
21
|
newOptions.alignment = self.alignment.copy;
|
|
@@ -237,7 +237,7 @@
|
|
|
237
237
|
- (void)renderComponents:(RNNNavigationOptions *)options
|
|
238
238
|
perform:(RNNReactViewReadyCompletionBlock)readyBlock {
|
|
239
239
|
RNNNavigationOptions *withDefault = [options withDefault:[self defaultOptions]];
|
|
240
|
-
|
|
240
|
+
[_topBarTitlePresenter renderComponents:(RNNNavigationOptions *)withDefault.topBar perform:readyBlock];
|
|
241
241
|
}
|
|
242
242
|
|
|
243
243
|
- (void)dealloc {
|
|
@@ -1,11 +1,21 @@
|
|
|
1
|
-
#import <React/RCTRootView.h>
|
|
2
1
|
#import <React/RCTRootViewDelegate.h>
|
|
3
2
|
#import <UIKit/UIKit.h>
|
|
3
|
+
#import "RNNReactView.h"
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
6
|
+
#import <React/RCTSurfaceDelegate.h>
|
|
7
|
+
#endif
|
|
8
|
+
|
|
9
|
+
@interface RNNCustomTitleView : UIView <
|
|
10
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
11
|
+
RCTSurfaceDelegate
|
|
12
|
+
#else
|
|
13
|
+
RCTRootViewDelegate
|
|
14
|
+
#endif
|
|
15
|
+
>
|
|
6
16
|
|
|
7
17
|
- (instancetype)initWithFrame:(CGRect)frame
|
|
8
|
-
|
|
9
|
-
|
|
18
|
+
subView:(RNNReactView *)subView
|
|
19
|
+
alignment:(NSString *)alignment;
|
|
10
20
|
|
|
11
21
|
@end
|