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.
Files changed (319) hide show
  1. package/ReactNativeNavigation.podspec +13 -12
  2. package/lib/android/app/src/main/java/com/reactnativenavigation/NavigationApplication.java +1 -1
  3. package/lib/android/app/src/main/java/com/reactnativenavigation/options/LayoutFactory.java +13 -14
  4. package/lib/android/app/src/main/java/com/reactnativenavigation/react/NavigationModule.java +4 -6
  5. package/lib/android/app/src/main/java/com/reactnativenavigation/react/NavigationPackage.kt +5 -4
  6. package/lib/android/app/src/main/java/com/reactnativenavigation/react/NavigationReactInitializer.java +20 -21
  7. package/lib/android/app/src/main/java/com/reactnativenavigation/react/ReactComponentViewCreator.java +1 -7
  8. package/lib/android/app/src/main/java/com/reactnativenavigation/react/ReactView.java +38 -28
  9. package/lib/android/app/src/main/java/com/reactnativenavigation/react/modal/ModalFrameLayout.kt +1 -1
  10. package/lib/android/app/src/main/java/com/reactnativenavigation/react/modal/ModalLayoutController.kt +4 -6
  11. package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/externalcomponent/ExternalComponentCreator.java +1 -1
  12. package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/externalcomponent/ExternalComponentViewController.java +2 -4
  13. package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/navigator/Navigator.java +2 -2
  14. package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/viewcontroller/RootPresenter.java +1 -1
  15. package/lib/android/app/src/main/java/com/reactnativenavigation/views/component/ComponentViewCreator.java +1 -8
  16. package/lib/android/app/src/main/java/com/reactnativenavigation/views/stack/topbar/TopBarBackgroundView.java +2 -2
  17. package/lib/android/app/src/main/java/com/reactnativenavigation/views/stack/topbar/TopBarBackgroundViewCreator.java +1 -7
  18. package/lib/android/app/src/main/java/com/reactnativenavigation/views/stack/topbar/titlebar/TitleBarButtonCreator.java +1 -8
  19. package/lib/android/app/src/main/java/com/reactnativenavigation/views/stack/topbar/titlebar/TitleBarReactButtonView.java +3 -3
  20. package/lib/android/app/src/main/java/com/reactnativenavigation/views/stack/topbar/titlebar/TitleBarReactViewCreator.java +1 -7
  21. package/lib/android/app/src/reactNative71/java/com/reactnativenavigation/react/ReactGateway.java +10 -11
  22. package/lib/android/app/src/reactNative71/java/com/reactnativenavigation/react/modal/ModalContentLayout.kt +8 -42
  23. package/lib/android/app/src/reactNative71/java/com/reactnativenavigation/views/stack/topbar/titlebar/TitleBarReactView.kt +2 -2
  24. package/lib/dist/src/adapters/NativeCommandsSender.js +3 -2
  25. package/lib/dist/src/adapters/NativeEventsReceiver.js +4 -2
  26. package/lib/dist/src/adapters/NativeRNNTurboEventEmitter.d.ts +7 -0
  27. package/lib/dist/src/adapters/NativeRNNTurboEventEmitter.js +13 -0
  28. package/lib/dist/src/adapters/NativeRNNTurboModule.d.ts +28 -0
  29. package/lib/dist/src/adapters/NativeRNNTurboModule.js +16 -0
  30. package/lib/dist/src/commands/Deprecations.js +2 -2
  31. package/lib/dist/src/components/Modal.js +11 -2
  32. package/lib/ios/{AnimatedImageView.m → AnimatedImageView.mm} +1 -1
  33. package/lib/ios/{AnimatedReactView.m → AnimatedReactView.mm} +8 -1
  34. package/lib/ios/{AnimatedTextView.m → AnimatedTextView.mm} +21 -1
  35. package/lib/ios/BoolParser.h +1 -1
  36. package/lib/ios/{BottomTabsBasePresenter.m → BottomTabsBasePresenter.mm} +1 -1
  37. package/lib/ios/ColorParser.h +1 -1
  38. package/lib/ios/Constants.h +8 -0
  39. package/lib/ios/{Constants.m → Constants.mm} +12 -0
  40. package/lib/ios/NumberParser.h +1 -1
  41. package/lib/ios/RNNAppDelegate.h +8 -15
  42. package/lib/ios/RNNAppDelegate.mm +78 -81
  43. package/lib/ios/{RNNBottomTabsController.m → RNNBottomTabsController.mm} +1 -1
  44. package/lib/ios/RNNBridgeEventEmitter.h +4 -0
  45. package/lib/ios/RNNBridgeEventEmitter.mm +7 -0
  46. package/lib/ios/RNNBridgeManager.mm +71 -71
  47. package/lib/ios/{RNNButtonBuilder.m → RNNButtonBuilder.mm} +2 -2
  48. package/lib/ios/{RNNButtonOptions.m → RNNButtonOptions.mm} +2 -2
  49. package/lib/ios/{RNNButtonsParser.m → RNNButtonsParser.mm} +1 -1
  50. package/lib/ios/RNNCommandsHandler.h +8 -2
  51. package/lib/ios/{RNNCommandsHandler.m → RNNCommandsHandler.mm} +29 -10
  52. package/lib/ios/{RNNComponentOptions.m → RNNComponentOptions.mm} +3 -2
  53. package/lib/ios/{RNNComponentPresenter.m → RNNComponentPresenter.mm} +1 -1
  54. package/lib/ios/{RNNComponentViewController.m → RNNComponentViewController.mm} +0 -4
  55. package/lib/ios/RNNCustomTitleView.h +14 -4
  56. package/lib/ios/{RNNCustomTitleView.m → RNNCustomTitleView.mm} +8 -2
  57. package/lib/ios/RNNDotIndicatorPresenter.h +1 -1
  58. package/lib/ios/RNNElementFinder.h +2 -0
  59. package/lib/ios/RNNElementFinder.mm +44 -0
  60. package/lib/ios/RNNEventEmitter.h +1 -2
  61. package/lib/ios/{RNNEventEmitter.m → RNNEventEmitter.mm} +1 -5
  62. package/lib/ios/RNNExternalComponentStore.h +5 -0
  63. package/lib/ios/{RNNExternalComponentStore.m → RNNExternalComponentStore.mm} +12 -0
  64. package/lib/ios/{RNNFontAttributesCreator.m → RNNFontAttributesCreator.mm} +1 -1
  65. package/lib/ios/{RNNIconBackgroundOptions.m → RNNIconBackgroundOptions.mm} +1 -1
  66. package/lib/ios/{RNNInsetsOptions.m → RNNInsetsOptions.mm} +2 -2
  67. package/lib/ios/RNNModalManager.h +6 -0
  68. package/lib/ios/{RNNModalManager.m → RNNModalManager.mm} +71 -2
  69. package/lib/ios/{RNNNavigationOptions.m → RNNNavigationOptions.mm} +1 -1
  70. package/lib/ios/{RNNPushAnimation.m → RNNPushAnimation.mm} +1 -1
  71. package/lib/ios/RNNReactButtonView.h +4 -0
  72. package/lib/ios/RNNReactButtonView.mm +29 -0
  73. package/lib/ios/RNNReactRootViewCreator.h +4 -0
  74. package/lib/ios/{RNNReactRootViewCreator.m → RNNReactRootViewCreator.mm} +31 -8
  75. package/lib/ios/RNNReactView.h +64 -12
  76. package/lib/ios/RNNReactView.mm +119 -15
  77. package/lib/ios/{RNNScreenTransition.m → RNNScreenTransition.mm} +3 -2
  78. package/lib/ios/RNNSideMenu/MMDrawerController/{MMDrawerController.m → MMDrawerController.mm} +1 -1
  79. package/lib/ios/{RNNSideMenuChildVC.h → RNNSideMenuChildViewController.h} +1 -1
  80. package/lib/ios/{RNNSideMenuChildVC.m → RNNSideMenuChildViewController.mm} +4 -3
  81. package/lib/ios/{RNNSideMenuPresenter.m → RNNSideMenuPresenter.mm} +3 -3
  82. package/lib/ios/{RNNSideMenuController.h → RNNSideMenuViewController.h} +5 -5
  83. package/lib/ios/{RNNSideMenuController.m → RNNSideMenuViewController.mm} +8 -8
  84. package/lib/ios/{RNNSplashScreen.h → RNNSplashScreenViewController.h} +1 -1
  85. package/lib/ios/{RNNSplashScreen.m → RNNSplashScreenViewController.mm} +5 -5
  86. package/lib/ios/RNNSplitViewController.h +0 -1
  87. package/lib/ios/{RNNStackPresenter.m → RNNStackPresenter.mm} +2 -1
  88. package/lib/ios/RNNUIBarButtonItem.h +7 -1
  89. package/lib/ios/{RNNUIBarButtonItem.m → RNNUIBarButtonItem.mm} +17 -25
  90. package/lib/ios/RNNUtils.h +1 -0
  91. package/lib/ios/{RNNUtils.m → RNNUtils.mm} +8 -0
  92. package/lib/ios/{RNNControllerFactory.h → RNNViewControllerFactory.h} +10 -1
  93. package/lib/ios/{RNNControllerFactory.m → RNNViewControllerFactory.mm} +37 -7
  94. package/lib/ios/ReactNativeNavigation.h +13 -6
  95. package/lib/ios/ReactNativeNavigation.mm +117 -0
  96. package/lib/ios/ReactNativeNavigation.xcodeproj/project.pbxproj +976 -1166
  97. package/lib/ios/ScreenAnimationController.h +27 -9
  98. package/lib/ios/ScreenAnimationController.mm +180 -0
  99. package/lib/ios/SharedElementAnimator.mm +98 -0
  100. package/lib/ios/SideMenuOpenMode.h +1 -1
  101. package/lib/ios/StackControllerDelegate.h +10 -0
  102. package/lib/ios/{StackControllerDelegate.m → StackControllerDelegate.mm} +45 -1
  103. package/lib/ios/{TopBarTitlePresenter.m → TopBarTitlePresenter.mm} +2 -3
  104. package/lib/ios/{TransitionOptions.m → TransitionOptions.mm} +3 -2
  105. package/lib/ios/TurboModules/RNNTurboCommandsHandler.h +13 -0
  106. package/lib/ios/TurboModules/RNNTurboCommandsHandler.mm +16 -0
  107. package/lib/ios/TurboModules/RNNTurboEventEmitter.h +14 -0
  108. package/lib/ios/TurboModules/RNNTurboEventEmitter.mm +22 -0
  109. package/lib/ios/TurboModules/RNNTurboManager.h +23 -0
  110. package/lib/ios/TurboModules/RNNTurboManager.mm +114 -0
  111. package/lib/ios/TurboModules/RNNTurboModule.h +8 -0
  112. package/lib/ios/TurboModules/RNNTurboModule.mm +177 -0
  113. package/lib/ios/UISplitViewController+RNNOptions.h +1 -1
  114. package/lib/ios/{UISplitViewController+RNNOptions.m → UISplitViewController+RNNOptions.mm} +0 -1
  115. package/lib/ios/UIViewController+SideMenuController.h +2 -2
  116. package/lib/ios/{UIViewController+SideMenuController.m → UIViewController+SideMenuController.mm} +3 -3
  117. package/lib/ios/UIViewController+SideMenuViewController.h +8 -0
  118. package/lib/ios/Utils/{UIView+Utils.m → UIView+Utils.mm} +14 -0
  119. package/lib/src/adapters/NativeCommandsSender.ts +4 -2
  120. package/lib/src/adapters/NativeEventsReceiver.ts +6 -5
  121. package/lib/src/adapters/NativeRNNTurboEventEmitter.ts +18 -0
  122. package/lib/src/adapters/NativeRNNTurboModule.ts +47 -0
  123. package/lib/src/commands/Deprecations.ts +1 -1
  124. package/lib/src/components/Modal.tsx +23 -4
  125. package/metro.config.js +0 -1
  126. package/package.json +34 -6
  127. package/lib/ios/RNNElementFinder.m +0 -12
  128. package/lib/ios/RNNReactButtonView.m +0 -41
  129. package/lib/ios/RNNSwizzles.h +0 -13
  130. package/lib/ios/RNNSwizzles.m +0 -97
  131. package/lib/ios/ReactNativeNavigation.m +0 -85
  132. package/lib/ios/ScreenAnimationController.m +0 -139
  133. package/lib/ios/SharedElementAnimator.m +0 -83
  134. /package/lib/ios/{AnchorTransition.m → AnchorTransition.mm} +0 -0
  135. /package/lib/ios/{AnimatedUIImageView.m → AnimatedUIImageView.mm} +0 -0
  136. /package/lib/ios/{AnimatedViewFactory.m → AnimatedViewFactory.mm} +0 -0
  137. /package/lib/ios/{AnimationObserver.m → AnimationObserver.mm} +0 -0
  138. /package/lib/ios/{BaseAnimator.m → BaseAnimator.mm} +0 -0
  139. /package/lib/ios/{Bool.m → Bool.mm} +0 -0
  140. /package/lib/ios/{BoolParser.m → BoolParser.mm} +0 -0
  141. /package/lib/ios/{BottomTabPresenter.m → BottomTabPresenter.mm} +0 -0
  142. /package/lib/ios/{BottomTabPresenterCreator.m → BottomTabPresenterCreator.mm} +0 -0
  143. /package/lib/ios/{BottomTabsAfterInitialTabAttacher.m → BottomTabsAfterInitialTabAttacher.mm} +0 -0
  144. /package/lib/ios/{BottomTabsAppearancePresenter.m → BottomTabsAppearancePresenter.mm} +0 -0
  145. /package/lib/ios/{BottomTabsAttachMode.m → BottomTabsAttachMode.mm} +0 -0
  146. /package/lib/ios/{BottomTabsAttachModeFactory.m → BottomTabsAttachModeFactory.mm} +0 -0
  147. /package/lib/ios/{BottomTabsBaseAttacher.m → BottomTabsBaseAttacher.mm} +0 -0
  148. /package/lib/ios/{BottomTabsOnSwitchToTabAttacher.m → BottomTabsOnSwitchToTabAttacher.mm} +0 -0
  149. /package/lib/ios/{BottomTabsPresenterCreator.m → BottomTabsPresenterCreator.mm} +0 -0
  150. /package/lib/ios/{BottomTabsTogetherAttacher.m → BottomTabsTogetherAttacher.mm} +0 -0
  151. /package/lib/ios/{BoundsTransition.m → BoundsTransition.mm} +0 -0
  152. /package/lib/ios/{CenterTransition.m → CenterTransition.mm} +0 -0
  153. /package/lib/ios/{Color+Interpolation.m → Color+Interpolation.mm} +0 -0
  154. /package/lib/ios/{Color.m → Color.mm} +0 -0
  155. /package/lib/ios/{ColorParser.m → ColorParser.mm} +0 -0
  156. /package/lib/ios/{ColorTransition.m → ColorTransition.mm} +0 -0
  157. /package/lib/ios/{CornerRadiusTransition.m → CornerRadiusTransition.mm} +0 -0
  158. /package/lib/ios/{DeprecationOptions.m → DeprecationOptions.mm} +0 -0
  159. /package/lib/ios/{DictionaryParser.m → DictionaryParser.mm} +0 -0
  160. /package/lib/ios/{DisplayLinkAnimator.m → DisplayLinkAnimator.mm} +0 -0
  161. /package/lib/ios/{DotIndicatorOptions.m → DotIndicatorOptions.mm} +0 -0
  162. /package/lib/ios/{DotIndicatorParser.m → DotIndicatorParser.mm} +0 -0
  163. /package/lib/ios/{Double.m → Double.mm} +0 -0
  164. /package/lib/ios/{DoubleParser.m → DoubleParser.mm} +0 -0
  165. /package/lib/ios/{ElementAlphaTransition.m → ElementAlphaTransition.mm} +0 -0
  166. /package/lib/ios/{ElementAnimator.m → ElementAnimator.mm} +0 -0
  167. /package/lib/ios/{ElementBaseTransition.m → ElementBaseTransition.mm} +0 -0
  168. /package/lib/ios/{ElementFrameTransition.m → ElementFrameTransition.mm} +0 -0
  169. /package/lib/ios/{ElementHorizontalTransition.m → ElementHorizontalTransition.mm} +0 -0
  170. /package/lib/ios/{ElementTransitionOptions.m → ElementTransitionOptions.mm} +0 -0
  171. /package/lib/ios/{ElementTransitionsCreator.m → ElementTransitionsCreator.mm} +0 -0
  172. /package/lib/ios/{ElementVerticalTransition.m → ElementVerticalTransition.mm} +0 -0
  173. /package/lib/ios/{Enum.m → Enum.mm} +0 -0
  174. /package/lib/ios/{EnumParser.m → EnumParser.mm} +0 -0
  175. /package/lib/ios/{FloatTransition.m → FloatTransition.mm} +0 -0
  176. /package/lib/ios/{HorizontalScaleTransition.m → HorizontalScaleTransition.mm} +0 -0
  177. /package/lib/ios/{HorizontalTranslationTransition.m → HorizontalTranslationTransition.mm} +0 -0
  178. /package/lib/ios/{Image.m → Image.mm} +0 -0
  179. /package/lib/ios/{ImageParser.m → ImageParser.mm} +0 -0
  180. /package/lib/ios/{IntNumber.m → IntNumber.mm} +0 -0
  181. /package/lib/ios/{IntNumberParser.m → IntNumberParser.mm} +0 -0
  182. /package/lib/ios/{InteractivePopGestureDelegate.m → InteractivePopGestureDelegate.mm} +0 -0
  183. /package/lib/ios/Interpolators/{AccelerateDecelerateInterpolator.m → AccelerateDecelerateInterpolator.mm} +0 -0
  184. /package/lib/ios/Interpolators/{AccelerateInterpolator.m → AccelerateInterpolator.mm} +0 -0
  185. /package/lib/ios/Interpolators/{DecelerateAccelerateInterpolator.m → DecelerateAccelerateInterpolator.mm} +0 -0
  186. /package/lib/ios/Interpolators/{DecelerateInterpolator.m → DecelerateInterpolator.mm} +0 -0
  187. /package/lib/ios/Interpolators/{FastOutSlowIn.m → FastOutSlowIn.mm} +0 -0
  188. /package/lib/ios/Interpolators/{LinearInterpolator.m → LinearInterpolator.mm} +0 -0
  189. /package/lib/ios/Interpolators/{OvershootInterpolator.m → OvershootInterpolator.mm} +0 -0
  190. /package/lib/ios/Interpolators/{SpringInterpolator.m → SpringInterpolator.mm} +0 -0
  191. /package/lib/ios/{LNInterpolable.m → LNInterpolable.mm} +0 -0
  192. /package/lib/ios/{NSArray+utils.m → NSArray+utils.mm} +0 -0
  193. /package/lib/ios/{NoColor.m → NoColor.mm} +0 -0
  194. /package/lib/ios/{NullBool.m → NullBool.mm} +0 -0
  195. /package/lib/ios/{NullColor.m → NullColor.mm} +0 -0
  196. /package/lib/ios/{NullDictionary.m → NullDictionary.mm} +0 -0
  197. /package/lib/ios/{NullDouble.m → NullDouble.mm} +0 -0
  198. /package/lib/ios/{NullEnum.m → NullEnum.mm} +0 -0
  199. /package/lib/ios/{NullImage.m → NullImage.mm} +0 -0
  200. /package/lib/ios/{NullIntNumber.m → NullIntNumber.mm} +0 -0
  201. /package/lib/ios/{NullNumber.m → NullNumber.mm} +0 -0
  202. /package/lib/ios/{NullText.m → NullText.mm} +0 -0
  203. /package/lib/ios/{Number.m → Number.mm} +0 -0
  204. /package/lib/ios/{NumberParser.m → NumberParser.mm} +0 -0
  205. /package/lib/ios/{OptionsArrayParser.m → OptionsArrayParser.mm} +0 -0
  206. /package/lib/ios/{Param.m → Param.mm} +0 -0
  207. /package/lib/ios/{PathTransition.m → PathTransition.mm} +0 -0
  208. /package/lib/ios/{RCTConvert+Interpolation.m → RCTConvert+Interpolation.mm} +0 -0
  209. /package/lib/ios/{RCTConvert+SideMenuOpenGestureMode.m → RCTConvert+SideMenuOpenGestureMode.mm} +0 -0
  210. /package/lib/ios/{RCTConvert+UIBarButtonSystemItem.m → RCTConvert+UIBarButtonSystemItem.mm} +0 -0
  211. /package/lib/ios/{RCTConvert+UIFontWeight.m → RCTConvert+UIFontWeight.mm} +0 -0
  212. /package/lib/ios/{RCTHelpers.m → RCTHelpers.mm} +0 -0
  213. /package/lib/ios/{RNNAnimationsOptions.m → RNNAnimationsOptions.mm} +0 -0
  214. /package/lib/ios/{RNNBackButtonOptions.m → RNNBackButtonOptions.mm} +0 -0
  215. /package/lib/ios/{RNNBackgroundOptions.m → RNNBackgroundOptions.mm} +0 -0
  216. /package/lib/ios/{RNNBaseIconCreator.m → RNNBaseIconCreator.mm} +0 -0
  217. /package/lib/ios/{RNNBasePresenter.m → RNNBasePresenter.mm} +0 -0
  218. /package/lib/ios/{RNNBottomTabOptions.m → RNNBottomTabOptions.mm} +0 -0
  219. /package/lib/ios/{RNNBottomTabsOptions.m → RNNBottomTabsOptions.mm} +0 -0
  220. /package/lib/ios/{RNNBottomTabsPresenter.m → RNNBottomTabsPresenter.mm} +0 -0
  221. /package/lib/ios/{RNNBridgeModule.m → RNNBridgeModule.mm} +0 -0
  222. /package/lib/ios/{RNNButtonsPresenter.m → RNNButtonsPresenter.mm} +0 -0
  223. /package/lib/ios/{RNNComponentRootView.m → RNNComponentRootView.mm} +0 -0
  224. /package/lib/ios/{RNNComponentView.m → RNNComponentView.mm} +0 -0
  225. /package/lib/ios/{RNNConvert.m → RNNConvert.mm} +0 -0
  226. /package/lib/ios/{RNNDefaultOptionsHelper.m → RNNDefaultOptionsHelper.mm} +0 -0
  227. /package/lib/ios/{RNNDictionary.m → RNNDictionary.mm} +0 -0
  228. /package/lib/ios/{RNNDotIndicatorPresenter.m → RNNDotIndicatorPresenter.mm} +0 -0
  229. /package/lib/ios/{RNNDynamicIconCreator.m → RNNDynamicIconCreator.mm} +0 -0
  230. /package/lib/ios/{RNNElement.m → RNNElement.mm} +0 -0
  231. /package/lib/ios/{RNNElementView.m → RNNElementView.mm} +0 -0
  232. /package/lib/ios/{RNNEnterExitAnimation.m → RNNEnterExitAnimation.mm} +0 -0
  233. /package/lib/ios/{RNNErrorHandler.m → RNNErrorHandler.mm} +0 -0
  234. /package/lib/ios/{RNNExternalViewController.m → RNNExternalViewController.mm} +0 -0
  235. /package/lib/ios/{RNNIconCreator.m → RNNIconCreator.mm} +0 -0
  236. /package/lib/ios/{RNNIconDrawer.m → RNNIconDrawer.mm} +0 -0
  237. /package/lib/ios/{RNNInterpolator.m → RNNInterpolator.mm} +0 -0
  238. /package/lib/ios/{RNNLargeTitleOptions.m → RNNLargeTitleOptions.mm} +0 -0
  239. /package/lib/ios/{RNNLayoutInfo.m → RNNLayoutInfo.mm} +0 -0
  240. /package/lib/ios/{RNNLayoutManager.m → RNNLayoutManager.mm} +0 -0
  241. /package/lib/ios/{RNNLayoutNode.m → RNNLayoutNode.mm} +0 -0
  242. /package/lib/ios/{RNNLayoutOptions.m → RNNLayoutOptions.mm} +0 -0
  243. /package/lib/ios/{RNNModalHostViewManagerHandler.m → RNNModalHostViewManagerHandler.mm} +0 -0
  244. /package/lib/ios/{RNNModalManagerEventHandler.m → RNNModalManagerEventHandler.mm} +0 -0
  245. /package/lib/ios/{RNNModalOptions.m → RNNModalOptions.mm} +0 -0
  246. /package/lib/ios/{RNNOptions.m → RNNOptions.mm} +0 -0
  247. /package/lib/ios/{RNNOverlayManager.m → RNNOverlayManager.mm} +0 -0
  248. /package/lib/ios/{RNNOverlayOptions.m → RNNOverlayOptions.mm} +0 -0
  249. /package/lib/ios/{RNNOverlayWindow.m → RNNOverlayWindow.mm} +0 -0
  250. /package/lib/ios/{RNNPreviewOptions.m → RNNPreviewOptions.mm} +0 -0
  251. /package/lib/ios/{RNNReactBackgroundView.m → RNNReactBackgroundView.mm} +0 -0
  252. /package/lib/ios/{RNNReactComponentRegistry.m → RNNReactComponentRegistry.mm} +0 -0
  253. /package/lib/ios/{RNNReactTitleView.m → RNNReactTitleView.mm} +0 -0
  254. /package/lib/ios/{RNNScreenTransitionsCreator.m → RNNScreenTransitionsCreator.mm} +0 -0
  255. /package/lib/ios/{RNNScrollEdgeAppearanceBackgroundOptions.m → RNNScrollEdgeAppearanceBackgroundOptions.mm} +0 -0
  256. /package/lib/ios/{RNNScrollEdgeAppearanceOptions.m → RNNScrollEdgeAppearanceOptions.mm} +0 -0
  257. /package/lib/ios/{RNNSearchBarOptions.m → RNNSearchBarOptions.mm} +0 -0
  258. /package/lib/ios/{RNNSegmentedControl.m → RNNSegmentedControl.mm} +0 -0
  259. /package/lib/ios/{RNNSetRootAnimator.m → RNNSetRootAnimator.mm} +0 -0
  260. /package/lib/ios/{RNNShadowOptions.m → RNNShadowOptions.mm} +0 -0
  261. /package/lib/ios/{RNNSharedElementAnimationOptions.m → RNNSharedElementAnimationOptions.mm} +0 -0
  262. /package/lib/ios/RNNSideMenu/MMDrawerController/{MMDrawerBarButtonItem.m → MMDrawerBarButtonItem.mm} +0 -0
  263. /package/lib/ios/RNNSideMenu/MMDrawerController/{MMDrawerVisualState.m → MMDrawerVisualState.mm} +0 -0
  264. /package/lib/ios/RNNSideMenu/MMDrawerController/{MMExampleDrawerVisualStateManager.m → MMExampleDrawerVisualStateManager.mm} +0 -0
  265. /package/lib/ios/RNNSideMenu/MMDrawerController/{UIViewController+MMDrawerController.m → UIViewController+MMDrawerController.mm} +0 -0
  266. /package/lib/ios/{RNNSideMenuOptions.m → RNNSideMenuOptions.mm} +0 -0
  267. /package/lib/ios/{RNNSideMenuSideOptions.m → RNNSideMenuSideOptions.mm} +0 -0
  268. /package/lib/ios/{RNNSplitViewController.m → RNNSplitViewController.mm} +0 -0
  269. /package/lib/ios/{RNNSplitViewControllerPresenter.m → RNNSplitViewControllerPresenter.mm} +0 -0
  270. /package/lib/ios/{RNNSplitViewOptions.m → RNNSplitViewOptions.mm} +0 -0
  271. /package/lib/ios/{RNNStackController.m → RNNStackController.mm} +0 -0
  272. /package/lib/ios/{RNNStatusBarOptions.m → RNNStatusBarOptions.mm} +0 -0
  273. /package/lib/ios/{RNNSubtitleOptions.m → RNNSubtitleOptions.mm} +0 -0
  274. /package/lib/ios/{RNNTabBarItemCreator.m → RNNTabBarItemCreator.mm} +0 -0
  275. /package/lib/ios/{RNNTitleOptions.m → RNNTitleOptions.mm} +0 -0
  276. /package/lib/ios/{RNNTitleViewHelper.m → RNNTitleViewHelper.mm} +0 -0
  277. /package/lib/ios/{RNNTopBarOptions.m → RNNTopBarOptions.mm} +0 -0
  278. /package/lib/ios/{RNNTopTabOptions.m → RNNTopTabOptions.mm} +0 -0
  279. /package/lib/ios/{RNNTopTabsOptions.m → RNNTopTabsOptions.mm} +0 -0
  280. /package/lib/ios/{RNNTopTabsViewController.m → RNNTopTabsViewController.mm} +0 -0
  281. /package/lib/ios/{RNNTransitionStateHolder.m → RNNTransitionStateHolder.mm} +0 -0
  282. /package/lib/ios/{RNNUIBarBackButtonItem.m → RNNUIBarBackButtonItem.mm} +0 -0
  283. /package/lib/ios/{RNNViewLocation.m → RNNViewLocation.mm} +0 -0
  284. /package/lib/ios/{RectTransition.m → RectTransition.mm} +0 -0
  285. /package/lib/ios/{RotationTransition.m → RotationTransition.mm} +0 -0
  286. /package/lib/ios/{ScreenReversedAnimationController.m → ScreenReversedAnimationController.mm} +0 -0
  287. /package/lib/ios/{SharedElementTransition.m → SharedElementTransition.mm} +0 -0
  288. /package/lib/ios/{SharedElementTransitionOptions.m → SharedElementTransitionOptions.mm} +0 -0
  289. /package/lib/ios/{SideMenuOpenGestureModeParser.m → SideMenuOpenGestureModeParser.mm} +0 -0
  290. /package/lib/ios/{SideMenuOpenMode.m → SideMenuOpenMode.mm} +0 -0
  291. /package/lib/ios/{TabBarItemAppearanceCreator.m → TabBarItemAppearanceCreator.mm} +0 -0
  292. /package/lib/ios/{TabBarItemIOS15Creator.m → TabBarItemIOS15Creator.mm} +0 -0
  293. /package/lib/ios/{Text.m → Text.mm} +0 -0
  294. /package/lib/ios/{TextParser.m → TextParser.mm} +0 -0
  295. /package/lib/ios/{TextStorageTransition.m → TextStorageTransition.mm} +0 -0
  296. /package/lib/ios/{TimeInterval.m → TimeInterval.mm} +0 -0
  297. /package/lib/ios/{TimeIntervalParser.m → TimeIntervalParser.mm} +0 -0
  298. /package/lib/ios/{TopBarAppearancePresenter.m → TopBarAppearancePresenter.mm} +0 -0
  299. /package/lib/ios/{TopBarPresenter.m → TopBarPresenter.mm} +0 -0
  300. /package/lib/ios/{TopBarPresenterCreator.m → TopBarPresenterCreator.mm} +0 -0
  301. /package/lib/ios/{TransformRectTransition.m → TransformRectTransition.mm} +0 -0
  302. /package/lib/ios/{Transition.m → Transition.mm} +0 -0
  303. /package/lib/ios/{TransitionDetailsOptions.m → TransitionDetailsOptions.mm} +0 -0
  304. /package/lib/ios/{UIImage+utils.m → UIImage+utils.mm} +0 -0
  305. /package/lib/ios/{UIImageView+Transition.m → UIImageView+Transition.mm} +0 -0
  306. /package/lib/ios/{UINavigationController+RNNCommands.m → UINavigationController+RNNCommands.mm} +0 -0
  307. /package/lib/ios/{UINavigationController+RNNOptions.m → UINavigationController+RNNOptions.mm} +0 -0
  308. /package/lib/ios/{UITabBar+utils.m → UITabBar+utils.mm} +0 -0
  309. /package/lib/ios/{UITabBarController+RNNOptions.m → UITabBarController+RNNOptions.mm} +0 -0
  310. /package/lib/ios/{UIViewController+LayoutProtocol.m → UIViewController+LayoutProtocol.mm} +0 -0
  311. /package/lib/ios/{UIViewController+RNNOptions.m → UIViewController+RNNOptions.mm} +0 -0
  312. /package/lib/ios/Utils/{UIColor+RNNUtils.m → UIColor+RNNUtils.mm} +0 -0
  313. /package/lib/ios/Utils/{UITabBarController+RNNUtils.m → UITabBarController+RNNUtils.mm} +0 -0
  314. /package/lib/ios/Utils/{UIViewController+Utils.m → UIViewController+Utils.mm} +0 -0
  315. /package/lib/ios/{VICMAImageView.m → VICMAImageView.mm} +0 -0
  316. /package/lib/ios/{VerticalRotationTransition.m → VerticalRotationTransition.mm} +0 -0
  317. /package/lib/ios/{VerticalScaleTransition.m → VerticalScaleTransition.mm} +0 -0
  318. /package/lib/ios/{VerticalTranslationTransition.m → VerticalTranslationTransition.mm} +0 -0
  319. /package/lib/ios/{WindowOptions.m → WindowOptions.mm} +0 -0
@@ -0,0 +1,114 @@
1
+ #ifdef RCT_NEW_ARCH_ENABLED
2
+ #import <Foundation/Foundation.h>
3
+ #import "RNNTurboManager.h"
4
+ #import "RNNCommandsHandler.h"
5
+ #import "RNNComponentViewCreator.h"
6
+ #import "RNNTurboEventEmitter.h"
7
+ #import "RNNLayoutManager.h"
8
+ #import "RNNModalHostViewManagerHandler.h"
9
+ #import "RNNReactComponentRegistry.h"
10
+ #import "RNNReactRootViewCreator.h"
11
+ #import "RNNTurboCommandsHandler.h"
12
+ #import <React-RuntimeApple/ReactCommon/RCTHost.h>
13
+
14
+ @interface RNNTurboManager ()
15
+
16
+ @property(nonatomic, strong, readwrite) RNNExternalComponentStore *store;
17
+ @property(nonatomic, strong, readwrite) RNNReactComponentRegistry *componentRegistry;
18
+ @property(nonatomic, strong, readonly) RNNLayoutManager *layoutManager;
19
+ @property(nonatomic, strong, readonly) RNNOverlayManager *overlayManager;
20
+ @property(nonatomic, strong, readonly) RNNModalManager *modalManager;
21
+ @property(nonatomic, strong, readonly) RNNModalHostViewManagerHandler *modalHostViewHandler;
22
+ @property(nonatomic, strong, readonly) RNNCommandsHandler *commandsHandler;
23
+ @property(nonatomic, strong, readonly) RNNTurboEventEmitter *eventEmitter;
24
+
25
+ @end
26
+
27
+ @implementation RNNTurboManager {
28
+ UIWindow *_mainWindow;
29
+ }
30
+
31
+ - (instancetype)initWithHost:(RCTHost *)host mainWindow:(UIWindow *)mainWindow {
32
+ if (self = [super init]) {
33
+ _host = host;
34
+ _mainWindow = mainWindow;
35
+ _overlayManager = [RNNOverlayManager new];
36
+ _store = [RNNExternalComponentStore new];
37
+
38
+ [[NSNotificationCenter defaultCenter] addObserver:self
39
+ selector:@selector(onJavaScriptLoaded)
40
+ name:@"RCTInstanceDidLoadBundle"
41
+ object:nil];
42
+
43
+ // TODO: investigate which new event is fired
44
+ [[NSNotificationCenter defaultCenter] addObserver:self
45
+ selector:@selector(onJavaScriptWillLoad)
46
+ name:RCTJavaScriptWillStartLoadingNotification
47
+ object:nil];
48
+
49
+ _eventEmitter = [[_host moduleRegistry] moduleForName:"RNNTurboEventEmitter"];
50
+ _eventEmitter.host = _host;
51
+
52
+ RNNModalManagerEventHandler *modalManagerEventHandler =
53
+ [[RNNModalManagerEventHandler alloc] initWithEventEmitter:_eventEmitter];
54
+
55
+ _modalManager = [[RNNModalManager alloc] initWithHost:_host
56
+ eventHandler:modalManagerEventHandler];
57
+ _modalHostViewHandler =
58
+ [[RNNModalHostViewManagerHandler alloc] initWithModalManager:_modalManager];
59
+ _layoutManager = [[RNNLayoutManager alloc] init];
60
+
61
+ id<RNNComponentViewCreator> rootViewCreator =
62
+ [[RNNReactRootViewCreator alloc] initWithHost:_host eventEmitter:_eventEmitter];
63
+
64
+ _componentRegistry = [[RNNReactComponentRegistry alloc] initWithCreator:rootViewCreator];
65
+
66
+ RNNViewControllerFactory *controllerFactory =
67
+ [[RNNViewControllerFactory alloc] initWithRootViewCreator:rootViewCreator
68
+ eventEmitter:_eventEmitter
69
+ store:_store
70
+ componentRegistry:_componentRegistry
71
+ andHost:_host
72
+ bottomTabsAttachModeFactory:[BottomTabsAttachModeFactory new]];
73
+
74
+ RNNSetRootAnimator *setRootAnimator = [RNNSetRootAnimator new];
75
+ _commandsHandler = [[RNNCommandsHandler alloc] initWithViewControllerFactory:controllerFactory
76
+ layoutManager:_layoutManager
77
+ eventEmitter:_eventEmitter
78
+ modalManager:_modalManager
79
+ overlayManager:_overlayManager
80
+ setRootAnimator:setRootAnimator
81
+ mainWindow:_mainWindow];
82
+
83
+ [RNNTurboCommandsHandler setSharedInstance:_commandsHandler];
84
+ }
85
+
86
+ return self;
87
+ }
88
+
89
+ - (void)registerExternalComponent:(NSString *)name callback:(RNNExternalHostViewCreator)callback {
90
+ [_store registerExternalHostComponent:name callback:callback];
91
+ }
92
+
93
+ - (UIViewController *)findComponentForId:(NSString *)componentId {
94
+ return [_layoutManager findComponentForId:componentId];
95
+ }
96
+
97
+ - (void)onJavaScriptWillLoad {
98
+ [_componentRegistry clear];
99
+ }
100
+
101
+ - (void)onJavaScriptLoaded {
102
+ [_commandsHandler setReadyToReceiveCommands:true];
103
+ // TODO: Refactor
104
+ // [_modalHostViewHandler
105
+ // connectModalHostViewManager:[[_host moduleRegistry] moduleForName:"RCTModalHostViewManager"]];
106
+ // TODO: Possibly will cause crashes in events with previous copy of emitter, need to test
107
+ _eventEmitter = [[_host moduleRegistry] moduleForName:"RNNTurboEventEmitter"];
108
+ _eventEmitter.host = _host;
109
+
110
+ [_eventEmitter sendOnAppLaunched];
111
+ }
112
+
113
+ @end
114
+ #endif
@@ -0,0 +1,8 @@
1
+ #pragma once
2
+ #ifdef RCT_NEW_ARCH_ENABLED
3
+ #import "RNNCommandsHandler.h"
4
+ #import <rnnavigation/rnnavigation.h>
5
+
6
+ @interface RNNTurboModule : NSObject<NativeRNNTurboModuleSpec>
7
+ @end
8
+ #endif
@@ -0,0 +1,177 @@
1
+ #ifdef RCT_NEW_ARCH_ENABLED
2
+ #import "RNNTurboModule.h"
3
+ #import "Constants.h"
4
+ #import "RNNTurboCommandsHandler.h"
5
+ #import <ReactCommon/RCTTurboModule.h>
6
+
7
+ @implementation RNNTurboModule
8
+
9
+ RCT_EXPORT_MODULE()
10
+
11
+ - (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
12
+ (const facebook::react::ObjCTurboModule::InitParams &)params
13
+ {
14
+ return std::make_shared<facebook::react::NativeRNNTurboModuleSpecJSI>(params);
15
+ }
16
+
17
+ - (facebook::react::ModuleConstants<JS::NativeRNNTurboModule::Constants>)constantsToExport {
18
+ return facebook::react::typedConstants<JS::NativeRNNTurboModule::Constants>([Constants getTurboConstants]);
19
+ }
20
+
21
+ - (facebook::react::ModuleConstants<JS::NativeRNNTurboModule::Constants::Builder>)getConstants {
22
+ return [self constantsToExport];
23
+ }
24
+
25
+ - (void)dismissAllModals:(NSString *)commandId options:(NSDictionary *)options resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject {
26
+ RCTExecuteOnMainQueue(^{
27
+ [[RNNTurboCommandsHandler sharedInstance] dismissAllModals:options
28
+ commandId:commandId
29
+ completion:^{
30
+ resolve(nil);
31
+ }];
32
+ });
33
+ }
34
+
35
+ - (void)dismissAllOverlays:(NSString *)commandId resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject {
36
+ RCTExecuteOnMainQueue(^{
37
+ [[RNNTurboCommandsHandler sharedInstance] dismissAllOverlays:commandId];
38
+ resolve(nil);
39
+ });
40
+ }
41
+
42
+ - (void)dismissModal:(NSString *)commandId componentId:(NSString *)componentId options:(NSDictionary *)options resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject {
43
+ RCTExecuteOnMainQueue(^{
44
+ [[RNNTurboCommandsHandler sharedInstance] dismissModal:componentId
45
+ commandId:commandId
46
+ mergeOptions:options
47
+ completion:^(NSString *componentId) {
48
+ resolve(componentId);
49
+ }
50
+ rejection:reject];
51
+ });
52
+ }
53
+
54
+ - (void)dismissOverlay:(NSString *)commandId componentId:(NSString *)componentId resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject {
55
+ RCTExecuteOnMainQueue(^{
56
+ [[RNNTurboCommandsHandler sharedInstance] dismissOverlay:componentId
57
+ commandId:commandId
58
+ completion:^{
59
+ resolve(@(1));
60
+ }
61
+ rejection:reject];
62
+ });
63
+ }
64
+
65
+ - (void)getLaunchArgs:(NSString *)commandId resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject {
66
+ NSArray *args = [[NSProcessInfo processInfo] arguments];
67
+ resolve(args);
68
+ }
69
+
70
+
71
+ - (void)pop:(NSString *)commandId componentId:(NSString *)componentId options:(NSDictionary *)options resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject {
72
+ RCTExecuteOnMainQueue(^{
73
+ [[RNNTurboCommandsHandler sharedInstance] pop:componentId
74
+ commandId:commandId
75
+ mergeOptions:(NSDictionary *)options
76
+ completion:^{
77
+ resolve(componentId);
78
+ }
79
+ rejection:reject];
80
+ });
81
+ }
82
+
83
+ - (void)popTo:(NSString *)commandId componentId:(NSString *)componentId options:(NSDictionary *)options resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject {
84
+ RCTExecuteOnMainQueue(^{
85
+ [[RNNTurboCommandsHandler sharedInstance] popTo:componentId
86
+ commandId:commandId
87
+ mergeOptions:options
88
+ completion:^{
89
+ resolve(componentId);
90
+ }
91
+ rejection:reject];
92
+ });
93
+ }
94
+
95
+ - (void)popToRoot:(NSString *)commandId componentId:(NSString *)componentId options:(NSDictionary *)options resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject {
96
+ RCTExecuteOnMainQueue(^{
97
+ [[RNNTurboCommandsHandler sharedInstance] popToRoot:componentId
98
+ commandId:commandId
99
+ mergeOptions:options
100
+ completion:^{
101
+ resolve(componentId);
102
+ }
103
+ rejection:reject];
104
+ });
105
+ }
106
+
107
+ - (void)push:(NSString *)commandId componentId:(NSString *)componentId layout:(NSDictionary *)layout resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject {
108
+ RCTExecuteOnMainQueue(^{
109
+ [[RNNTurboCommandsHandler sharedInstance] push:componentId
110
+ commandId:commandId
111
+ layout:layout
112
+ completion:^(NSString *pushedComponentId) {
113
+ resolve(pushedComponentId);
114
+ }
115
+ rejection:reject];
116
+ });
117
+ }
118
+
119
+ - (void)setRoot:(NSString *)commandId layout:(NSDictionary *)layout resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject {
120
+ RCTExecuteOnMainQueue(^{
121
+ [[RNNTurboCommandsHandler sharedInstance] setRoot:layout
122
+ commandId:commandId
123
+ completion:^(NSString *componentId) {
124
+ resolve(componentId);
125
+ }];
126
+ });
127
+ }
128
+
129
+ - (void)setStackRoot:(NSString *)commandId componentId:(NSString *)componentId layout:(NSDictionary *)layout resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject {
130
+ RCTExecuteOnMainQueue(^{
131
+ [[RNNTurboCommandsHandler sharedInstance] setStackRoot:componentId
132
+ commandId:commandId
133
+ children:(NSArray *)layout
134
+ completion:^{
135
+ resolve(componentId);
136
+ }
137
+ rejection:reject];
138
+ });
139
+ }
140
+
141
+ - (void)showModal:(NSString *)commandId layout:(NSDictionary *)layout resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject {
142
+ RCTExecuteOnMainQueue(^{
143
+ [[RNNTurboCommandsHandler sharedInstance] showModal:layout
144
+ commandId:commandId
145
+ completion:^(NSString *componentId) {
146
+ resolve(componentId);
147
+ }];
148
+ });
149
+ }
150
+
151
+ - (void)showOverlay:(NSString *)commandId layout:(NSDictionary *)layout resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject {
152
+ RCTExecuteOnMainQueue(^{
153
+ [[RNNTurboCommandsHandler sharedInstance] showOverlay:layout
154
+ commandId:commandId
155
+ completion:^(NSString *_Nonnull componentId) {
156
+ resolve(componentId);
157
+ }];
158
+ });
159
+ }
160
+
161
+ - (void)mergeOptions:(NSString *)componentId options:(NSDictionary *)options {
162
+ RCTExecuteOnMainQueue(^{
163
+ [[RNNTurboCommandsHandler sharedInstance] mergeOptions:componentId
164
+ options:options
165
+ completion:^{}];
166
+ });
167
+ }
168
+
169
+
170
+ - (void)setDefaultOptions:(NSDictionary *)options {
171
+ RCTExecuteOnMainQueue(^{
172
+ [[RNNTurboCommandsHandler sharedInstance] setDefaultOptions:options completion: ^() {}];
173
+ });
174
+ }
175
+
176
+ @end
177
+ #endif
@@ -1,4 +1,4 @@
1
- #import "Number.h"
1
+ #import "ReactNativeNavigation/Number.h"
2
2
  #import <UIKit/UIKit.h>
3
3
 
4
4
  @interface UISplitViewController (RNNOptions)
@@ -1,4 +1,3 @@
1
- #import "RNNSplitViewController.h"
2
1
  #import "UISplitViewController+RNNOptions.h"
3
2
 
4
3
  @implementation UISplitViewController (RNNOptions)
@@ -1,8 +1,8 @@
1
- #import "RNNSideMenuController.h"
1
+ #import "RNNSideMenuViewController.h"
2
2
  #import <UIKit/UIKit.h>
3
3
 
4
4
  @interface UIViewController (SideMenuController)
5
5
 
6
- - (RNNSideMenuController *)sideMenuController;
6
+ - (RNNSideMenuViewController *)sideMenuController;
7
7
 
8
8
  @end
@@ -2,11 +2,11 @@
2
2
 
3
3
  @implementation UIViewController (SideMenuController)
4
4
 
5
- - (RNNSideMenuController *)sideMenuController {
5
+ - (RNNSideMenuViewController *)sideMenuController {
6
6
  UIViewController *vc = self;
7
7
  while (vc) {
8
- if ([vc isKindOfClass:[RNNSideMenuController class]]) {
9
- return (RNNSideMenuController *)vc;
8
+ if ([vc isKindOfClass:[RNNSideMenuViewController class]]) {
9
+ return (RNNSideMenuViewController *)vc;
10
10
  }
11
11
 
12
12
  vc = vc.parentViewController;
@@ -0,0 +1,8 @@
1
+ #import "RNNSideMenuViewController.h"
2
+ #import <UIKit/UIKit.h>
3
+
4
+ @interface UIViewController (RNNSideMenuViewController)
5
+
6
+ - (RNNSideMenuViewController *)sideMenuController;
7
+
8
+ @end
@@ -1,6 +1,12 @@
1
1
  #import "UIView+Utils.h"
2
+
3
+ #ifdef RCT_NEW_ARCH_ENABLED
4
+ #import <React/RCTImageComponentView.h>
5
+ #import <React/RCTParagraphComponentView.h>
6
+ #else
2
7
  #import <React/RCTImageView.h>
3
8
  #import <React/RCTTextView.h>
9
+ #endif
4
10
 
5
11
  @implementation UIView (Utils)
6
12
 
@@ -13,9 +19,17 @@
13
19
  }
14
20
 
15
21
  - (ViewType)viewType {
22
+ #ifdef RCT_NEW_ARCH_ENABLED
23
+ if ([self isKindOfClass:[RCTImageComponentView class]]) {
24
+ #else
16
25
  if ([self isKindOfClass:[RCTImageView class]]) {
26
+ #endif
17
27
  return ViewTypeImage;
28
+ #ifdef RCT_NEW_ARCH_ENABLED
29
+ } else if ([self isKindOfClass:[RCTParagraphComponentView class]]) {
30
+ #else
18
31
  } else if ([self isKindOfClass:[RCTTextView class]]) {
32
+ #endif
19
33
  return ViewTypeText;
20
34
  } else if ([self isKindOfClass:[UIImageView class]]) {
21
35
  return ViewTypeUIImage;
@@ -1,5 +1,5 @@
1
- import { NativeModules } from 'react-native';
2
1
  import { NavigationConstants } from './Constants';
2
+ import RNNCommandsModule from './NativeRNNTurboModule';
3
3
 
4
4
  interface NativeCommandsModule {
5
5
  setRoot(commandId: string, layout: { root: any; modals: any[]; overlays: any[] }): Promise<any>;
@@ -19,12 +19,14 @@ interface NativeCommandsModule {
19
19
  getLaunchArgs(commandId: string): Promise<any>;
20
20
  getNavigationConstants(): Promise<NavigationConstants>;
21
21
  getNavigationConstantsSync(): NavigationConstants;
22
+ // Turbo
23
+ getConstants?: () => NavigationConstants;
22
24
  }
23
25
 
24
26
  export class NativeCommandsSender {
25
27
  private readonly nativeCommandsModule: NativeCommandsModule;
26
28
  constructor() {
27
- this.nativeCommandsModule = NativeModules.RNNBridgeModule;
29
+ this.nativeCommandsModule = RNNCommandsModule;
28
30
  }
29
31
 
30
32
  setRoot(commandId: string, layout: { root: any; modals: any[]; overlays: any[] }) {
@@ -1,4 +1,4 @@
1
- import { NativeModules, NativeEventEmitter, EmitterSubscription } from 'react-native';
1
+ import { NativeEventEmitter, EmitterSubscription } from 'react-native';
2
2
  import {
3
3
  ComponentWillAppearEvent,
4
4
  ComponentDidAppearEvent,
@@ -17,20 +17,21 @@ import {
17
17
  BottomTabLongPressedEvent,
18
18
  BottomTabPressedEvent,
19
19
  } from '../interfaces/Events';
20
+ import RNNEventEmitter from './NativeRNNTurboEventEmitter';
20
21
 
21
22
  export class NativeEventsReceiver {
22
23
  private emitter: NativeEventEmitter;
23
24
  constructor() {
24
25
  try {
25
- this.emitter = new NativeEventEmitter(NativeModules.RNNEventEmitter);
26
- } catch {
27
- this.emitter = {
26
+ this.emitter = new NativeEventEmitter(RNNEventEmitter);
27
+ } catch (e) {
28
+ this.emitter = ({
28
29
  addListener: () => {
29
30
  return {
30
31
  remove: () => undefined,
31
32
  };
32
33
  },
33
- } as any as NativeEventEmitter;
34
+ } as any) as NativeEventEmitter;
34
35
  }
35
36
  }
36
37
 
@@ -0,0 +1,18 @@
1
+ import { TurboModule, TurboModuleRegistry, NativeModules, NativeModule } from 'react-native';
2
+
3
+ export interface Spec extends TurboModule {
4
+ addListener: (eventType: string) => void;
5
+ removeListeners: (count: number) => void;
6
+ }
7
+
8
+ let eventEmitter: Spec | null = null;
9
+
10
+ try {
11
+ // Running in bridge mode
12
+ eventEmitter = NativeModules.RNNBridgeEventEmitter;
13
+ } catch (e) {
14
+ // Running in bridgeless, access to NativeModules is prohibited
15
+ eventEmitter = TurboModuleRegistry.get<Spec>('RNNTurboEventEmitter');
16
+ }
17
+
18
+ export default eventEmitter as NativeModule;
@@ -0,0 +1,47 @@
1
+ import { TurboModule, TurboModuleRegistry, NativeModules, Platform } from 'react-native';
2
+ import { UnsafeObject, Double } from 'react-native/Libraries/Types/CodegenTypes';
3
+
4
+ export interface Spec extends TurboModule {
5
+ readonly getConstants: () => {
6
+ topBarHeight: Double;
7
+ statusBarHeight: Double;
8
+ bottomTabsHeight: Double;
9
+ };
10
+
11
+ setRoot(commandId: string, layout: UnsafeObject): Promise<string>;
12
+ setDefaultOptions(options: UnsafeObject): void;
13
+ mergeOptions(componentId: string, options: UnsafeObject): void;
14
+ push(commandId: string, componentId: string, layout: UnsafeObject): Promise<string>;
15
+ pop(commandId: string, componentId: string, options: UnsafeObject): Promise<string>;
16
+ popTo(commandId: string, componentId: string, options: UnsafeObject): Promise<string>;
17
+ popToRoot(commandId: string, componentId: string, options: UnsafeObject): Promise<string>;
18
+ setStackRoot(
19
+ commandId: string,
20
+ componentId: string,
21
+ layout: Array<UnsafeObject>
22
+ ): Promise<string>;
23
+ showModal(commandId: string, layout: UnsafeObject): Promise<string>;
24
+ dismissModal(commandId: string, componentId: string, options: UnsafeObject): Promise<string>;
25
+ dismissAllModals(commandId: string, options: UnsafeObject): Promise<void>;
26
+ showOverlay(commandId: string, layout: UnsafeObject): Promise<string>;
27
+ dismissOverlay(commandId: string, componentId: string): Promise<void>;
28
+ dismissAllOverlays(commandId: string): Promise<void>;
29
+ getLaunchArgs(commandId: string): Promise<Array<string>>;
30
+ }
31
+
32
+ const isTurboModuleEnabled = (globalThis as any).__turboModuleProxy != null;
33
+
34
+ const commands =
35
+ isTurboModuleEnabled && Platform.OS === 'ios'
36
+ ? TurboModuleRegistry.get<Spec>('RNNTurboModule')
37
+ : NativeModules.RNNBridgeModule;
38
+
39
+ const isNewArchWithBridgeless = isTurboModuleEnabled;
40
+
41
+ export const RCTAssertNewArchEnabled = () => {
42
+ if (!isNewArchWithBridgeless)
43
+ throw new Error('Allowed only in New Architecture with Bridgeless!');
44
+ };
45
+
46
+ export const isRNNTurboModuleAvailable = isNewArchWithBridgeless;
47
+ export default commands;
@@ -1,6 +1,6 @@
1
1
  import once from 'lodash/once';
2
2
  import get from 'lodash/get';
3
- import each from 'lodash/each';
3
+ import { each } from 'lodash';
4
4
  import { Platform } from 'react-native';
5
5
 
6
6
  export class Deprecations {
@@ -1,6 +1,7 @@
1
- import React from 'react';
1
+ import React, { useLayoutEffect, useRef } from 'react';
2
2
  import { requireNativeComponent, View, ViewProps, StyleSheet, Dimensions } from 'react-native';
3
3
  import { AnimationOptions, ViewAnimationOptions } from 'react-native-navigation/interfaces/Options';
4
+
4
5
  export interface RNNModalProps extends ViewProps {
5
6
  visible: boolean;
6
7
  transparent: boolean;
@@ -9,28 +10,46 @@ export interface RNNModalProps extends ViewProps {
9
10
  onShow?: () => any;
10
11
  onRequestClose: () => any;
11
12
  }
13
+
12
14
  interface AnimatedModalProps extends RNNModalProps {
13
15
  animation?: AnimationOptions;
14
16
  }
17
+
15
18
  const RNNModalViewManager = requireNativeComponent('RNNModalViewManager');
16
19
 
20
+ const Container = (rnnProps: RNNModalProps) => {
21
+ const viewRef = useRef<View>(null);
22
+
23
+ useLayoutEffect(() => {
24
+ const windowWidth = Dimensions.get('window').width;
25
+ const windowHeight = Dimensions.get('window').height;
26
+ viewRef?.current?.setNativeProps({ width: windowWidth, height: windowHeight });
27
+ }, []);
28
+
29
+ return (
30
+ <View ref={viewRef} style={styles.container} collapsable={false}>
31
+ {rnnProps.children}
32
+ </View>
33
+ );
34
+ };
35
+
17
36
  export class Modal extends React.Component<RNNModalProps> {
18
37
  static defaultProps = {
19
38
  transparent: false,
20
39
  blurOnUnmount: false,
21
40
  animationType: 'slide',
22
41
  };
42
+
23
43
  constructor(props: RNNModalProps) {
24
44
  super(props);
25
45
  }
46
+
26
47
  render() {
27
48
  const processed = this.proccessProps();
28
49
  if (this.props.visible) {
29
50
  return (
30
51
  <RNNModalViewManager {...processed}>
31
- <View style={styles.container} collapsable={false}>
32
- {this.props.children}
33
- </View>
52
+ <Container {...this.props} />
34
53
  </RNNModalViewManager>
35
54
  );
36
55
  } else {
package/metro.config.js CHANGED
@@ -1,4 +1,3 @@
1
- const path = require('node:path');
2
1
  const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config');
3
2
 
4
3
  const config = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-navigation",
3
- "version": "8.0.0",
3
+ "version": "8.1.0-alpha01",
4
4
  "description": "React Native Navigation - truly native navigation for iOS and Android",
5
5
  "license": "MIT",
6
6
  "nativePackage": true,
@@ -19,8 +19,7 @@
19
19
  "bin": {
20
20
  "rnn-link": "./autolink/postlink/run.js"
21
21
  },
22
- "main": "lib/dist/src/index.js",
23
- "typings": "lib/dist/src/index.d.ts",
22
+ "main": "lib/src/index.ts",
24
23
  "scripts": {
25
24
  "build": "node ./scripts/build",
26
25
  "watch": "node ./scripts/watch",
@@ -65,6 +64,9 @@
65
64
  "lodash": "4.17.x",
66
65
  "prop-types": "15.x.x",
67
66
  "react-lifecycles-compat": "^3.0.4",
67
+ "react-native-redash": "^12.6.1",
68
+ "reanimated-color-picker": "^3.0.6",
69
+ "ssim.js": "^3.5.0",
68
70
  "tslib": "1.9.3"
69
71
  },
70
72
  "devDependencies": {
@@ -96,7 +98,7 @@
96
98
  "@typescript-eslint/parser": "8.21.0",
97
99
  "babel-jest": "^27.0.0",
98
100
  "clang-format": "^1.4.0",
99
- "detox": "20.32.0",
101
+ "detox": "20.33.0-prerelease.0",
100
102
  "detox-testing-library-rnn-adapter": "^2.0.3",
101
103
  "eslint": "^8.19.0",
102
104
  "eslint-config-prettier": "6.11.0",
@@ -116,7 +118,6 @@
116
118
  "react-native-fast-image": "^8.6.3",
117
119
  "react-native-gesture-handler": "^2.22.1",
118
120
  "react-native-reanimated": "3.16.7",
119
- "react-native-ui-lib": "7.3.6",
120
121
  "react-redux": "5.x.x",
121
122
  "react-test-renderer": "18.3.1",
122
123
  "redux": "3.x.x",
@@ -165,7 +166,7 @@
165
166
  "genymotion.emulator.name": {
166
167
  "type": "android.genycloud",
167
168
  "device": {
168
- "recipeUUID": "a50a71d6-da90-4c67-bdfa-5b602b0bbd15"
169
+ "recipeUUID": "9baf12f9-a645-4ffa-a688-0e92584d6194"
169
170
  }
170
171
  },
171
172
  "emulator": {
@@ -224,6 +225,25 @@
224
225
  "app": "android.debug",
225
226
  "device": "emulator"
226
227
  },
228
+ "android.manual": {
229
+ "device": "emulator",
230
+ "app": "android.debug",
231
+ "behavior": {
232
+ "launchApp": "manual"
233
+ },
234
+ "session": {
235
+ "autoStart": true,
236
+ "debugSynchronization": 0,
237
+ "server": "ws://localhost:8099",
238
+ "sessionId": "test"
239
+ },
240
+ "testRunner": {
241
+ "args": {
242
+ "testTimeout": 999999
243
+ }
244
+ },
245
+ "artifacts": false
246
+ },
227
247
  "android.emu.release": {
228
248
  "app": "android.release",
229
249
  "device": "emulator"
@@ -233,5 +253,13 @@
233
253
  "device": "genymotion.emulator.name"
234
254
  }
235
255
  }
256
+ },
257
+ "codegenConfig": {
258
+ "name": "rnnavigation",
259
+ "type": "all",
260
+ "jsSrcsDir": "./lib/src",
261
+ "android": {
262
+ "javaPackageName": "wix.rnn.specs"
263
+ }
236
264
  }
237
265
  }