react-native-navigation 8.0.0 → 8.1.0-alpha-snapshot.1625
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/FeatureToggles.kt +4 -2
- package/lib/android/app/src/main/java/com/reactnativenavigation/NavigationActivity.java +2 -2
- 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 +13 -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/utils/ColorUtils.java +11 -0
- package/lib/android/app/src/main/java/com/reactnativenavigation/utils/SystemUiUtils.kt +12 -17
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/bottomtabs/BottomTabPresenter.java +0 -1
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/bottomtabs/BottomTabsController.java +4 -9
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/component/ComponentPresenter.java +18 -0
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/component/ComponentViewController.java +5 -17
- 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/stack/StackController.java +28 -13
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/StackPresenter.java +13 -6
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/topbar/TopBarController.kt +35 -2
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/statusbar/StatusBarPresenter.kt +212 -0
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/viewcontroller/Presenter.java +10 -178
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/viewcontroller/RootPresenter.java +1 -1
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/viewcontroller/StatusBarColorAnimator.kt +28 -0
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/viewcontroller/ViewController.java +34 -7
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/viewcontroller/ViewControllerVisibilityInfo.kt +5 -0
- 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 +29 -30
- 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 +33 -4
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/statusbar/StatusBarController.kt +0 -9
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/statusbar/StatusBarPresenter.kt +0 -9
- 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
|
@@ -19,23 +19,21 @@ Pod::Spec.new do |s|
|
|
|
19
19
|
|
|
20
20
|
s.subspec 'Core' do |ss|
|
|
21
21
|
s.source = { :git => "https://github.com/wix/react-native-navigation.git", :tag => "#{s.version}" }
|
|
22
|
-
s.source_files
|
|
22
|
+
s.source_files = 'lib/ios/**/*.{h,m,mm,cpp}'
|
|
23
23
|
s.exclude_files = "lib/ios/ReactNativeNavigationTests/**/*.*", "lib/ios/OCMock/**/*.*"
|
|
24
24
|
end
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
|
|
30
|
-
fabric_flags = fabric_enabled ? '-DRCT_NEW_ARCH_ENABLED' : ''
|
|
31
|
-
|
|
32
|
-
s.pod_target_xcconfig = {
|
|
26
|
+
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32 -DFOLLY_CFG_NO_COROUTINES=1'
|
|
27
|
+
s.pod_target_xcconfig = {
|
|
33
28
|
'HEADER_SEARCH_PATHS' => '"$(PODS_ROOT)/boost" "$(PODS_ROOT)/boost-for-react-native" "$(PODS_ROOT)/RCT-Folly" "$(PODS_ROOT)/Headers/Private/React-Core" "$(PODS_ROOT)/Headers/Private/Yoga"',
|
|
34
|
-
"CLANG_CXX_LANGUAGE_STANDARD" => "c++
|
|
29
|
+
"CLANG_CXX_LANGUAGE_STANDARD" => "c++20",
|
|
35
30
|
"OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
|
|
36
|
-
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
if fabric_enabled
|
|
34
|
+
install_modules_dependencies(s)
|
|
37
35
|
|
|
38
|
-
s.compiler_flags = folly_compiler_flags + ' ' + '-DRCT_NEW_ARCH_ENABLED'
|
|
36
|
+
s.compiler_flags = folly_compiler_flags + ' ' + '-DRCT_NEW_ARCH_ENABLED' + ' ' + '-DUSE_HERMES=1'
|
|
39
37
|
s.requires_arc = true
|
|
40
38
|
|
|
41
39
|
s.dependency "React"
|
|
@@ -46,9 +44,12 @@ Pod::Spec.new do |s|
|
|
|
46
44
|
s.dependency "RCT-Folly"
|
|
47
45
|
s.dependency "RCTRequired"
|
|
48
46
|
s.dependency "RCTTypeSafety"
|
|
49
|
-
s.dependency "ReactCommon
|
|
47
|
+
s.dependency "ReactCommon"
|
|
50
48
|
s.dependency "React-runtimeexecutor"
|
|
51
49
|
s.dependency "React-rncore"
|
|
50
|
+
s.dependency "React-RuntimeCore"
|
|
51
|
+
else
|
|
52
|
+
s.compiler_flags = folly_compiler_flags
|
|
52
53
|
end
|
|
53
54
|
|
|
54
55
|
s.dependency 'React-Core'
|
|
@@ -3,11 +3,13 @@ package com.reactnativenavigation
|
|
|
3
3
|
import androidx.annotation.VisibleForTesting
|
|
4
4
|
|
|
5
5
|
enum class RNNToggles {
|
|
6
|
-
|
|
6
|
+
TOP_BAR_COLOR_ANIMATION__PUSH,
|
|
7
|
+
TOP_BAR_COLOR_ANIMATION__TABS,
|
|
7
8
|
}
|
|
8
9
|
|
|
9
10
|
private val ToggleDefaults = mapOf(
|
|
10
|
-
RNNToggles.
|
|
11
|
+
RNNToggles.TOP_BAR_COLOR_ANIMATION__PUSH to false,
|
|
12
|
+
RNNToggles.TOP_BAR_COLOR_ANIMATION__TABS to false,
|
|
11
13
|
)
|
|
12
14
|
|
|
13
15
|
object RNNFeatureToggles {
|
|
@@ -3,7 +3,6 @@ package com.reactnativenavigation;
|
|
|
3
3
|
import android.annotation.TargetApi;
|
|
4
4
|
import android.content.Intent;
|
|
5
5
|
import android.content.res.Configuration;
|
|
6
|
-
import android.graphics.Color;
|
|
7
6
|
import android.os.Build;
|
|
8
7
|
import android.os.Bundle;
|
|
9
8
|
import android.view.KeyEvent;
|
|
@@ -12,8 +11,8 @@ import android.view.View;
|
|
|
12
11
|
import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler;
|
|
13
12
|
import com.facebook.react.modules.core.PermissionAwareActivity;
|
|
14
13
|
import com.facebook.react.modules.core.PermissionListener;
|
|
15
|
-
import com.reactnativenavigation.options.Options;
|
|
16
14
|
import com.reactnativenavigation.viewcontrollers.overlay.OverlayManager;
|
|
15
|
+
import com.reactnativenavigation.viewcontrollers.statusbar.StatusBarPresenter;
|
|
17
16
|
import com.reactnativenavigation.viewcontrollers.viewcontroller.RootPresenter;
|
|
18
17
|
import com.reactnativenavigation.react.JsDevReloadHandler;
|
|
19
18
|
import com.reactnativenavigation.react.ReactGateway;
|
|
@@ -51,6 +50,7 @@ public class NavigationActivity extends AppCompatActivity implements DefaultHard
|
|
|
51
50
|
navigator.bindViews();
|
|
52
51
|
getReactGateway().onActivityCreated(this);
|
|
53
52
|
setBackPressedCallback();
|
|
53
|
+
StatusBarPresenter.Companion.init(this);
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
@Override
|
|
@@ -53,7 +53,7 @@ public abstract class NavigationApplication extends Application implements React
|
|
|
53
53
|
* @return a singleton {@link ReactGateway}
|
|
54
54
|
*/
|
|
55
55
|
protected ReactGateway createReactGateway() {
|
|
56
|
-
return new ReactGateway(getReactNativeHost());
|
|
56
|
+
return new ReactGateway(getReactHost(), getReactNativeHost());
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
public ReactGateway getReactGateway() {
|
|
@@ -3,6 +3,7 @@ package com.reactnativenavigation.options;
|
|
|
3
3
|
import android.app.Activity;
|
|
4
4
|
import android.content.Context;
|
|
5
5
|
|
|
6
|
+
import com.facebook.react.ReactHost;
|
|
6
7
|
import com.facebook.react.ReactInstanceManager;
|
|
7
8
|
import com.facebook.react.bridge.ReactContext;
|
|
8
9
|
import com.reactnativenavigation.NavigationApplication;
|
|
@@ -50,23 +51,22 @@ import static com.reactnativenavigation.utils.CollectionUtils.*;
|
|
|
50
51
|
import org.json.JSONObject;
|
|
51
52
|
|
|
52
53
|
public class LayoutFactory {
|
|
53
|
-
|
|
54
|
+
private final ReactHost reactHost;
|
|
55
|
+
private Activity activity;
|
|
54
56
|
private ChildControllersRegistry childRegistry;
|
|
55
|
-
private final ReactInstanceManager reactInstanceManager;
|
|
56
57
|
private EventEmitter eventEmitter;
|
|
57
58
|
private Map<String, ExternalComponentCreator> externalComponentCreators;
|
|
58
59
|
private @NonNull Options defaultOptions = new Options();
|
|
59
60
|
private TypefaceLoader typefaceManager;
|
|
61
|
+
|
|
62
|
+
public LayoutFactory(ReactHost reactHost) {
|
|
63
|
+
this.reactHost = reactHost;
|
|
64
|
+
}
|
|
60
65
|
|
|
61
66
|
public void setDefaultOptions(@NonNull Options defaultOptions) {
|
|
62
67
|
Assertions.assertNotNull(defaultOptions);
|
|
63
68
|
this.defaultOptions = defaultOptions;
|
|
64
69
|
}
|
|
65
|
-
|
|
66
|
-
public LayoutFactory(final ReactInstanceManager reactInstanceManager) {
|
|
67
|
-
this.reactInstanceManager = reactInstanceManager;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
70
|
public void init(Activity activity, EventEmitter eventEmitter, ChildControllersRegistry childRegistry, Map<String, ExternalComponentCreator> externalComponentCreators) {
|
|
71
71
|
this.activity = activity;
|
|
72
72
|
this.eventEmitter = eventEmitter;
|
|
@@ -76,7 +76,7 @@ public class LayoutFactory {
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
public ViewController<?> create(final LayoutNode node) {
|
|
79
|
-
final ReactContext context =
|
|
79
|
+
final ReactContext context = reactHost.getCurrentReactContext();
|
|
80
80
|
switch (node.type) {
|
|
81
81
|
case Component:
|
|
82
82
|
return createComponent(node);
|
|
@@ -164,7 +164,7 @@ public class LayoutFactory {
|
|
|
164
164
|
childRegistry,
|
|
165
165
|
id,
|
|
166
166
|
name,
|
|
167
|
-
new ComponentViewCreator(
|
|
167
|
+
new ComponentViewCreator(),
|
|
168
168
|
parseOptions(node.getOptions()),
|
|
169
169
|
new Presenter(activity, defaultOptions),
|
|
170
170
|
new ComponentPresenter(defaultOptions)
|
|
@@ -179,7 +179,6 @@ public class LayoutFactory {
|
|
|
179
179
|
new Presenter(activity, defaultOptions),
|
|
180
180
|
externalComponent,
|
|
181
181
|
externalComponentCreators.get(externalComponent.name.get()),
|
|
182
|
-
reactInstanceManager,
|
|
183
182
|
new EventEmitter(context),
|
|
184
183
|
new ExternalComponentPresenter(),
|
|
185
184
|
parseOptions(node.getOptions())
|
|
@@ -194,9 +193,9 @@ public class LayoutFactory {
|
|
|
194
193
|
.setId(node.id)
|
|
195
194
|
.setInitialOptions(parseOptions(node.getOptions()))
|
|
196
195
|
.setStackPresenter(new StackPresenter(activity,
|
|
197
|
-
new TitleBarReactViewCreator(
|
|
198
|
-
new TopBarBackgroundViewCreator(
|
|
199
|
-
new TitleBarButtonCreator(
|
|
196
|
+
new TitleBarReactViewCreator(),
|
|
197
|
+
new TopBarBackgroundViewCreator(),
|
|
198
|
+
new TitleBarButtonCreator(),
|
|
200
199
|
new IconResolver(activity, new ImageLoader()),
|
|
201
200
|
new TypefaceLoader(activity),
|
|
202
201
|
new RenderChecker(),
|
|
@@ -243,7 +242,7 @@ public class LayoutFactory {
|
|
|
243
242
|
}
|
|
244
243
|
|
|
245
244
|
private Options parseOptions(JSONObject jsonOptions) {
|
|
246
|
-
Context context =
|
|
245
|
+
Context context = reactHost.getCurrentReactContext();
|
|
247
246
|
if (context == null) {
|
|
248
247
|
context = activity == null ? NavigationApplication.instance : activity;
|
|
249
248
|
}
|
|
@@ -40,19 +40,17 @@ public class NavigationModule extends ReactContextBaseJavaModule {
|
|
|
40
40
|
private static final String NAME = "RNNBridgeModule";
|
|
41
41
|
|
|
42
42
|
private final Now now = new Now();
|
|
43
|
-
private final ReactInstanceManager reactInstanceManager;
|
|
44
43
|
private final JSONParser jsonParser;
|
|
45
44
|
private final LayoutFactory layoutFactory;
|
|
46
45
|
private EventEmitter eventEmitter;
|
|
47
46
|
|
|
48
47
|
@SuppressWarnings("WeakerAccess")
|
|
49
|
-
public NavigationModule(ReactApplicationContext reactContext,
|
|
50
|
-
this(reactContext,
|
|
48
|
+
public NavigationModule(ReactApplicationContext reactContext, LayoutFactory layoutFactory) {
|
|
49
|
+
this(reactContext, new JSONParser(), layoutFactory);
|
|
51
50
|
}
|
|
52
51
|
|
|
53
|
-
public NavigationModule(ReactApplicationContext reactContext,
|
|
52
|
+
public NavigationModule(ReactApplicationContext reactContext, JSONParser jsonParser, LayoutFactory layoutFactory) {
|
|
54
53
|
super(reactContext);
|
|
55
|
-
this.reactInstanceManager = reactInstanceManager;
|
|
56
54
|
this.jsonParser = jsonParser;
|
|
57
55
|
this.layoutFactory = layoutFactory;
|
|
58
56
|
reactContext.addLifecycleEventListener(new LifecycleEventListenerAdapter() {
|
|
@@ -116,7 +114,7 @@ public class NavigationModule extends ReactContextBaseJavaModule {
|
|
|
116
114
|
final LayoutNode layoutTree = LayoutNodeParser.parse(Objects.requireNonNull(jsonParser.parse(rawLayoutTree).optJSONObject("root")));
|
|
117
115
|
handle(() -> {
|
|
118
116
|
final ViewController<?> viewController = layoutFactory.create(layoutTree);
|
|
119
|
-
navigator().setRoot(viewController, new NativeCommandListener("setRoot", commandId, promise, eventEmitter, now)
|
|
117
|
+
navigator().setRoot(viewController, new NativeCommandListener("setRoot", commandId, promise, eventEmitter, now));
|
|
120
118
|
});
|
|
121
119
|
}
|
|
122
120
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
package com.reactnativenavigation.react
|
|
2
2
|
|
|
3
|
-
import com.facebook.react.
|
|
3
|
+
import com.facebook.react.ReactApplication
|
|
4
|
+
import com.facebook.react.ReactHost
|
|
4
5
|
import com.facebook.react.ReactPackage
|
|
5
6
|
import com.facebook.react.bridge.NativeModule
|
|
6
7
|
import com.facebook.react.bridge.ReactApplicationContext
|
|
@@ -8,13 +9,13 @@ import com.facebook.react.uimanager.ViewManager
|
|
|
8
9
|
import com.reactnativenavigation.options.LayoutFactory
|
|
9
10
|
import com.reactnativenavigation.react.modal.ModalViewManager
|
|
10
11
|
|
|
11
|
-
class NavigationPackage(
|
|
12
|
+
class NavigationPackage() : ReactPackage {
|
|
12
13
|
override fun createNativeModules(reactContext: ReactApplicationContext): List<NativeModule> {
|
|
14
|
+
val reactApp = reactContext.applicationContext as ReactApplication
|
|
13
15
|
return listOf(
|
|
14
16
|
NavigationModule(
|
|
15
17
|
reactContext,
|
|
16
|
-
|
|
17
|
-
LayoutFactory(reactNativeHost.reactInstanceManager)
|
|
18
|
+
LayoutFactory(reactApp.reactHost)
|
|
18
19
|
)
|
|
19
20
|
)
|
|
20
21
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
package com.reactnativenavigation.react;
|
|
2
2
|
|
|
3
|
+
import com.facebook.react.ReactHost;
|
|
3
4
|
import com.facebook.react.ReactInstanceManager;
|
|
4
5
|
import com.facebook.react.bridge.ReactContext;
|
|
5
6
|
import com.reactnativenavigation.NavigationActivity;
|
|
@@ -9,18 +10,18 @@ import androidx.annotation.NonNull;
|
|
|
9
10
|
|
|
10
11
|
public class NavigationReactInitializer implements ReactInstanceManager.ReactInstanceEventListener {
|
|
11
12
|
|
|
12
|
-
private final
|
|
13
|
+
private final ReactHost reactHost;
|
|
13
14
|
private final DevPermissionRequest devPermissionRequest;
|
|
14
15
|
private boolean waitingForAppLaunchEvent = true;
|
|
15
16
|
private boolean isActivityReadyForUi = false;
|
|
16
17
|
|
|
17
|
-
NavigationReactInitializer(
|
|
18
|
-
this.
|
|
18
|
+
NavigationReactInitializer(ReactHost reactHost, boolean isDebug) {
|
|
19
|
+
this.reactHost = reactHost;
|
|
19
20
|
this.devPermissionRequest = new DevPermissionRequest(isDebug);
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
void onActivityCreated() {
|
|
23
|
-
|
|
24
|
+
reactHost.addReactInstanceEventListener(this);
|
|
24
25
|
waitingForAppLaunchEvent = true;
|
|
25
26
|
}
|
|
26
27
|
|
|
@@ -28,7 +29,7 @@ public class NavigationReactInitializer implements ReactInstanceManager.ReactIns
|
|
|
28
29
|
if (devPermissionRequest.shouldAskPermission(activity)) {
|
|
29
30
|
devPermissionRequest.askPermission(activity);
|
|
30
31
|
} else {
|
|
31
|
-
|
|
32
|
+
reactHost.onHostResume(activity, activity);
|
|
32
33
|
isActivityReadyForUi = true;
|
|
33
34
|
prepareReactApp();
|
|
34
35
|
}
|
|
@@ -36,24 +37,19 @@ public class NavigationReactInitializer implements ReactInstanceManager.ReactIns
|
|
|
36
37
|
|
|
37
38
|
void onActivityPaused(NavigationActivity activity) {
|
|
38
39
|
isActivityReadyForUi = false;
|
|
39
|
-
|
|
40
|
-
reactInstanceManager.onHostPause(activity);
|
|
41
|
-
}
|
|
40
|
+
reactHost.onHostPause(activity);
|
|
42
41
|
}
|
|
43
42
|
|
|
44
43
|
void onActivityDestroyed(NavigationActivity activity) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
reactInstanceManager.onHostDestroy(activity);
|
|
48
|
-
}
|
|
44
|
+
reactHost.removeReactInstanceEventListener(this);
|
|
45
|
+
reactHost.onHostDestroy(activity);
|
|
49
46
|
}
|
|
50
47
|
|
|
51
48
|
private void prepareReactApp() {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
emitAppLaunched(reactInstanceManager.getCurrentReactContext());
|
|
49
|
+
reactHost.start();
|
|
50
|
+
if (waitingForAppLaunchEvent) {
|
|
51
|
+
if (reactHost.getCurrentReactContext() != null) {
|
|
52
|
+
emitAppLaunched(reactHost.getCurrentReactContext());
|
|
57
53
|
}
|
|
58
54
|
}
|
|
59
55
|
}
|
|
@@ -64,10 +60,6 @@ public class NavigationReactInitializer implements ReactInstanceManager.ReactIns
|
|
|
64
60
|
new EventEmitter(context).appLaunched();
|
|
65
61
|
}
|
|
66
62
|
|
|
67
|
-
private boolean shouldCreateContext() {
|
|
68
|
-
return !reactInstanceManager.hasStartedCreatingInitialContext();
|
|
69
|
-
}
|
|
70
|
-
|
|
71
63
|
@Override
|
|
72
64
|
public void onReactContextInitialized(final ReactContext context) {
|
|
73
65
|
emitAppLaunched(context);
|
package/lib/android/app/src/main/java/com/reactnativenavigation/react/ReactComponentViewCreator.java
CHANGED
|
@@ -6,14 +6,8 @@ import com.facebook.react.ReactInstanceManager;
|
|
|
6
6
|
import com.reactnativenavigation.viewcontrollers.viewcontroller.ReactViewCreator;
|
|
7
7
|
|
|
8
8
|
public class ReactComponentViewCreator implements ReactViewCreator {
|
|
9
|
-
private ReactInstanceManager reactInstanceManager;
|
|
10
|
-
|
|
11
|
-
public ReactComponentViewCreator(final ReactInstanceManager reactInstanceManager) {
|
|
12
|
-
this.reactInstanceManager = reactInstanceManager;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
9
|
@Override
|
|
16
10
|
public ReactView create(final Activity activity, final String componentId, final String componentName) {
|
|
17
|
-
return new ReactView(activity,
|
|
11
|
+
return new ReactView(activity, componentId, componentName);
|
|
18
12
|
}
|
|
19
13
|
}
|
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
package com.reactnativenavigation.react;
|
|
2
2
|
|
|
3
|
+
import static com.reactnativenavigation.utils.CoordinatorLayoutUtils.matchParentLP;
|
|
4
|
+
|
|
3
5
|
import android.annotation.SuppressLint;
|
|
4
6
|
import android.content.Context;
|
|
5
7
|
import android.os.Bundle;
|
|
6
8
|
import android.view.MotionEvent;
|
|
9
|
+
import android.view.View;
|
|
10
|
+
import android.widget.FrameLayout;
|
|
7
11
|
|
|
8
12
|
import androidx.annotation.RestrictTo;
|
|
9
13
|
|
|
10
|
-
import com.facebook.react.
|
|
11
|
-
import com.facebook.react.
|
|
14
|
+
import com.facebook.react.ReactApplication;
|
|
15
|
+
import com.facebook.react.ReactHost;
|
|
12
16
|
import com.facebook.react.bridge.ReactContext;
|
|
13
|
-
import com.facebook.react.
|
|
14
|
-
import com.facebook.react.uimanager.
|
|
15
|
-
import com.facebook.react.uimanager.
|
|
17
|
+
import com.facebook.react.interfaces.fabric.ReactSurface;
|
|
18
|
+
import com.facebook.react.uimanager.UIManagerHelper;
|
|
19
|
+
import com.facebook.react.uimanager.common.UIManagerType;
|
|
16
20
|
import com.facebook.react.uimanager.events.EventDispatcher;
|
|
17
21
|
import com.reactnativenavigation.react.events.ComponentType;
|
|
18
22
|
import com.reactnativenavigation.react.events.EventEmitter;
|
|
@@ -21,21 +25,22 @@ import com.reactnativenavigation.viewcontrollers.viewcontroller.ScrollEventListe
|
|
|
21
25
|
import com.reactnativenavigation.views.component.Renderable;
|
|
22
26
|
|
|
23
27
|
@SuppressLint("ViewConstructor")
|
|
24
|
-
public class ReactView extends
|
|
25
|
-
|
|
26
|
-
private final ReactInstanceManager reactInstanceManager;
|
|
28
|
+
public class ReactView extends FrameLayout implements IReactView, Renderable {
|
|
27
29
|
private final String componentId;
|
|
28
30
|
private final String componentName;
|
|
29
31
|
private boolean isAttachedToReactInstance = false;
|
|
30
|
-
private final JSTouchDispatcher jsTouchDispatcher;
|
|
31
32
|
|
|
32
|
-
|
|
33
|
+
private final ReactSurface reactSurface;
|
|
34
|
+
|
|
35
|
+
public ReactView(final Context context, String componentId, String componentName) {
|
|
33
36
|
super(context);
|
|
34
|
-
this.reactInstanceManager = reactInstanceManager;
|
|
35
37
|
this.componentId = componentId;
|
|
36
38
|
this.componentName = componentName;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
+
|
|
40
|
+
final Bundle opts = new Bundle();
|
|
41
|
+
opts.putString("componentId", componentId);
|
|
42
|
+
reactSurface = getReactHost().createSurface(context, componentName, opts);
|
|
43
|
+
addView(reactSurface.getView(), matchParentLP());
|
|
39
44
|
}
|
|
40
45
|
|
|
41
46
|
@Override
|
|
@@ -47,9 +52,7 @@ public class ReactView extends ReactRootView implements IReactView, Renderable {
|
|
|
47
52
|
public void start() {
|
|
48
53
|
if (isAttachedToReactInstance) return;
|
|
49
54
|
isAttachedToReactInstance = true;
|
|
50
|
-
|
|
51
|
-
opts.putString("componentId", componentId);
|
|
52
|
-
startReactApplication(reactInstanceManager, componentName, opts);
|
|
55
|
+
reactSurface.start();
|
|
53
56
|
}
|
|
54
57
|
|
|
55
58
|
@Override
|
|
@@ -64,13 +67,12 @@ public class ReactView extends ReactRootView implements IReactView, Renderable {
|
|
|
64
67
|
|
|
65
68
|
@Override
|
|
66
69
|
public void destroy() {
|
|
67
|
-
|
|
70
|
+
reactSurface.stop();
|
|
68
71
|
}
|
|
69
72
|
|
|
70
73
|
public void sendComponentWillStart(ComponentType type) {
|
|
71
74
|
this.post(()->{
|
|
72
|
-
|
|
73
|
-
ReactContext currentReactContext = reactInstanceManager.getCurrentReactContext();
|
|
75
|
+
ReactContext currentReactContext = getReactContext();
|
|
74
76
|
if (currentReactContext != null)
|
|
75
77
|
new EventEmitter(currentReactContext).emitComponentWillAppear(componentId, componentName, type);
|
|
76
78
|
});
|
|
@@ -78,8 +80,7 @@ public class ReactView extends ReactRootView implements IReactView, Renderable {
|
|
|
78
80
|
|
|
79
81
|
public void sendComponentStart(ComponentType type) {
|
|
80
82
|
this.post(()->{
|
|
81
|
-
|
|
82
|
-
ReactContext currentReactContext = reactInstanceManager.getCurrentReactContext();
|
|
83
|
+
ReactContext currentReactContext = getReactContext();
|
|
83
84
|
if (currentReactContext != null) {
|
|
84
85
|
new EventEmitter(currentReactContext).emitComponentDidAppear(componentId, componentName, type);
|
|
85
86
|
}
|
|
@@ -87,8 +88,7 @@ public class ReactView extends ReactRootView implements IReactView, Renderable {
|
|
|
87
88
|
}
|
|
88
89
|
|
|
89
90
|
public void sendComponentStop(ComponentType type) {
|
|
90
|
-
|
|
91
|
-
ReactContext currentReactContext = reactInstanceManager.getCurrentReactContext();
|
|
91
|
+
ReactContext currentReactContext = getReactContext();
|
|
92
92
|
if (currentReactContext != null) {
|
|
93
93
|
new EventEmitter(currentReactContext).emitComponentDidDisappear(componentId, componentName, type);
|
|
94
94
|
}
|
|
@@ -96,8 +96,7 @@ public class ReactView extends ReactRootView implements IReactView, Renderable {
|
|
|
96
96
|
|
|
97
97
|
@Override
|
|
98
98
|
public void sendOnNavigationButtonPressed(String buttonId) {
|
|
99
|
-
|
|
100
|
-
ReactContext currentReactContext = reactInstanceManager.getCurrentReactContext();
|
|
99
|
+
ReactContext currentReactContext = getReactContext();
|
|
101
100
|
if (currentReactContext != null) {
|
|
102
101
|
new EventEmitter(currentReactContext).emitOnNavigationButtonPressed(componentId, buttonId);
|
|
103
102
|
}
|
|
@@ -110,7 +109,10 @@ public class ReactView extends ReactRootView implements IReactView, Renderable {
|
|
|
110
109
|
|
|
111
110
|
@Override
|
|
112
111
|
public void dispatchTouchEventToJs(MotionEvent event) {
|
|
113
|
-
|
|
112
|
+
View view = reactSurface.getView();
|
|
113
|
+
if (view != null) {
|
|
114
|
+
view.onTouchEvent(event);
|
|
115
|
+
}
|
|
114
116
|
}
|
|
115
117
|
|
|
116
118
|
@Override
|
|
@@ -119,12 +121,20 @@ public class ReactView extends ReactRootView implements IReactView, Renderable {
|
|
|
119
121
|
}
|
|
120
122
|
|
|
121
123
|
public EventDispatcher getEventDispatcher() {
|
|
122
|
-
ReactContext reactContext =
|
|
123
|
-
return reactContext == null ? null :
|
|
124
|
+
ReactContext reactContext = getReactContext();
|
|
125
|
+
return reactContext == null ? null : UIManagerHelper.getEventDispatcher(reactContext, UIManagerType.FABRIC);
|
|
124
126
|
}
|
|
125
127
|
|
|
126
128
|
@RestrictTo(RestrictTo.Scope.TESTS)
|
|
127
129
|
public String getComponentName() {
|
|
128
130
|
return componentName;
|
|
129
131
|
}
|
|
132
|
+
|
|
133
|
+
private ReactHost getReactHost() {
|
|
134
|
+
return ((ReactApplication)getContext().getApplicationContext()).getReactHost();
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
private ReactContext getReactContext() {
|
|
138
|
+
return getReactHost().getCurrentReactContext();
|
|
139
|
+
}
|
|
130
140
|
}
|
package/lib/android/app/src/main/java/com/reactnativenavigation/react/modal/ModalFrameLayout.kt
CHANGED
|
@@ -8,7 +8,7 @@ class ModalFrameLayout(context: ReactContext) : FrameLayout(context) {
|
|
|
8
8
|
val modalContentLayout = ModalContentLayout(context)
|
|
9
9
|
|
|
10
10
|
init {
|
|
11
|
-
addView(modalContentLayout, MarginLayoutParams(MarginLayoutParams.
|
|
11
|
+
addView(modalContentLayout, MarginLayoutParams(MarginLayoutParams.MATCH_PARENT, MarginLayoutParams.MATCH_PARENT)
|
|
12
12
|
.apply {
|
|
13
13
|
val translucent = context.currentActivity?.window?.let {
|
|
14
14
|
SystemUiUtils.isTranslucent(it)
|
package/lib/android/app/src/main/java/com/reactnativenavigation/react/modal/ModalLayoutController.kt
CHANGED
|
@@ -2,7 +2,9 @@ package com.reactnativenavigation.react.modal
|
|
|
2
2
|
|
|
3
3
|
import android.app.Activity
|
|
4
4
|
import com.facebook.react.bridge.ReactContext
|
|
5
|
+
import com.facebook.react.uimanager.UIManagerHelper
|
|
5
6
|
import com.facebook.react.uimanager.UIManagerModule
|
|
7
|
+
import com.facebook.react.uimanager.common.UIManagerType
|
|
6
8
|
import com.reactnativenavigation.options.Options
|
|
7
9
|
import com.reactnativenavigation.react.Constants
|
|
8
10
|
import com.reactnativenavigation.viewcontrollers.viewcontroller.ViewController
|
|
@@ -35,17 +37,13 @@ class ModalLayoutController(
|
|
|
35
37
|
|
|
36
38
|
override fun sendOnNavigationButtonPressed(buttonId: String?) {
|
|
37
39
|
if (buttonId == Constants.HARDWARE_BACK_BUTTON_ID) {
|
|
38
|
-
val dispatcher = reactContext.
|
|
39
|
-
UIManagerModule::class.java
|
|
40
|
-
)?.eventDispatcher
|
|
40
|
+
val dispatcher = UIManagerHelper.getEventDispatcher(reactContext, UIManagerType.FABRIC)
|
|
41
41
|
dispatcher?.dispatchEvent(RequestCloseModalEvent(getHostId()))
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
fun sendShowEvent() {
|
|
46
|
-
val dispatcher = reactContext.
|
|
47
|
-
UIManagerModule::class.java
|
|
48
|
-
)?.eventDispatcher
|
|
46
|
+
val dispatcher = UIManagerHelper.getEventDispatcher(reactContext, UIManagerType.FABRIC)
|
|
49
47
|
dispatcher?.dispatchEvent(ShowModalEvent(getHostId()))
|
|
50
48
|
}
|
|
51
49
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
package com.reactnativenavigation.utils;
|
|
2
2
|
|
|
3
|
+
import android.graphics.Color;
|
|
4
|
+
|
|
3
5
|
public class ColorUtils {
|
|
4
6
|
public static double[] colorToLAB(int color) {
|
|
5
7
|
final double[] result = new double[3];
|
|
@@ -10,4 +12,13 @@ public class ColorUtils {
|
|
|
10
12
|
public static int labToColor(double[] lab) {
|
|
11
13
|
return androidx.core.graphics.ColorUtils.LABToColor(lab[0], lab[1], lab[2]);
|
|
12
14
|
}
|
|
15
|
+
|
|
16
|
+
public static boolean isColorLight(int color) {
|
|
17
|
+
double darkness = 1 - (0.299 * Color.red(color) + 0.587 * Color.green(color) + 0.114 * Color.blue(color)) / 255;
|
|
18
|
+
return darkness < 0.5;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
public static int setAlpha(int color, int alpha) {
|
|
22
|
+
return (color & 0x00FFFFFF) | (alpha << 24);
|
|
23
|
+
}
|
|
13
24
|
}
|
|
@@ -3,7 +3,6 @@ package com.reactnativenavigation.utils
|
|
|
3
3
|
import android.app.Activity
|
|
4
4
|
import android.graphics.Color
|
|
5
5
|
import android.graphics.Rect
|
|
6
|
-
import android.os.Build
|
|
7
6
|
import android.view.View
|
|
8
7
|
import android.view.Window
|
|
9
8
|
import androidx.annotation.ColorInt
|
|
@@ -16,7 +15,6 @@ import kotlin.math.ceil
|
|
|
16
15
|
|
|
17
16
|
object SystemUiUtils {
|
|
18
17
|
private const val STATUS_BAR_HEIGHT_M = 24
|
|
19
|
-
private const val STATUS_BAR_HEIGHT_L = 25
|
|
20
18
|
internal const val STATUS_BAR_HEIGHT_TRANSLUCENCY = 0.65f
|
|
21
19
|
private var statusBarHeight = -1
|
|
22
20
|
var navigationBarDefaultColor = -1
|
|
@@ -38,7 +36,7 @@ object SystemUiUtils {
|
|
|
38
36
|
val contentViewTop = contentView.top
|
|
39
37
|
abs(contentViewTop - statusBarHeight)
|
|
40
38
|
}
|
|
41
|
-
} ?:
|
|
39
|
+
} ?: STATUS_BAR_HEIGHT_M
|
|
42
40
|
statusBarHeight
|
|
43
41
|
}
|
|
44
42
|
return res
|
|
@@ -77,8 +75,6 @@ object SystemUiUtils {
|
|
|
77
75
|
|
|
78
76
|
@JvmStatic
|
|
79
77
|
fun setStatusBarColorScheme(window: Window?, view: View, isDark: Boolean) {
|
|
80
|
-
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) return
|
|
81
|
-
|
|
82
78
|
window?.let {
|
|
83
79
|
WindowInsetsControllerCompat(window, view).isAppearanceLightStatusBars = isDark
|
|
84
80
|
// Workaround: on devices with api 30 status bar icons flickers or get hidden when removing view
|
|
@@ -121,18 +117,17 @@ object SystemUiUtils {
|
|
|
121
117
|
@ColorInt color: Int,
|
|
122
118
|
translucent: Boolean
|
|
123
119
|
) {
|
|
124
|
-
val
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
window?.statusBarColor = opaqueColor
|
|
120
|
+
val colorAlpha = Color.alpha(color)
|
|
121
|
+
val alpha = if (translucent && colorAlpha == 255) STATUS_BAR_HEIGHT_TRANSLUCENCY else colorAlpha/255.0f
|
|
122
|
+
val red: Int = Color.red(color)
|
|
123
|
+
val green: Int = Color.green(color)
|
|
124
|
+
val blue: Int = Color.blue(color)
|
|
125
|
+
val opaqueColor = Color.argb(ceil(alpha * 255).toInt(), red, green, blue)
|
|
126
|
+
setStatusBarColor(window, opaqueColor)
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
fun setStatusBarColor(window: Window?, color: Int) {
|
|
130
|
+
window?.statusBarColor = color
|
|
136
131
|
}
|
|
137
132
|
|
|
138
133
|
@JvmStatic
|
|
@@ -9,7 +9,6 @@ import android.graphics.drawable.Drawable;
|
|
|
9
9
|
|
|
10
10
|
import androidx.annotation.NonNull;
|
|
11
11
|
|
|
12
|
-
import com.aurelhubert.ahbottomnavigation.AHTextView;
|
|
13
12
|
import com.aurelhubert.ahbottomnavigation.notification.AHNotification;
|
|
14
13
|
import com.reactnativenavigation.options.BottomTabOptions;
|
|
15
14
|
import com.reactnativenavigation.options.DotIndicatorOptions;
|
|
@@ -271,11 +271,11 @@ public class BottomTabsController extends ParentController<BottomTabsLayout> imp
|
|
|
271
271
|
private void selectTab(int newIndex, boolean enableSelectionHistory) {
|
|
272
272
|
saveTabSelection(newIndex, enableSelectionHistory);
|
|
273
273
|
tabsAttacher.onTabSelected(tabs.get(newIndex));
|
|
274
|
-
|
|
274
|
+
getCurrentChild().onDeselected();
|
|
275
|
+
|
|
276
|
+
ViewController<?> previouslyVisible = getCurrentChild();
|
|
275
277
|
bottomTabs.setCurrentItem(newIndex, false);
|
|
276
|
-
|
|
277
|
-
getCurrentChild().onViewWillAppear();
|
|
278
|
-
getCurrentChild().onViewDidAppear();
|
|
278
|
+
getCurrentChild().onSelected(previouslyVisible);
|
|
279
279
|
}
|
|
280
280
|
|
|
281
281
|
private void saveTabSelection(int newIndex, boolean enableSelectionHistory) {
|
|
@@ -287,11 +287,6 @@ public class BottomTabsController extends ParentController<BottomTabsLayout> imp
|
|
|
287
287
|
}
|
|
288
288
|
}
|
|
289
289
|
|
|
290
|
-
@NonNull
|
|
291
|
-
private ViewGroup getCurrentView() {
|
|
292
|
-
return tabs.get(bottomTabs.getCurrentItem()).getView();
|
|
293
|
-
}
|
|
294
|
-
|
|
295
290
|
public Animator getPushAnimation(Options appearingOptions) {
|
|
296
291
|
return presenter.getPushAnimation(appearingOptions);
|
|
297
292
|
}
|