@amazon-devices/react-native-screens 2.0.1759135970 → 3.0.9000000000

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 (672) hide show
  1. package/README.md +57 -18
  2. package/RNScreens.podspec +12 -30
  3. package/SystemBundles/31d5b6b69618249f6233b73a1de7c4d890c86be7ccb031ce7cf2dcc41783f9f7.bundle +45301 -0
  4. package/SystemBundles/31d5b6b69618249f6233b73a1de7c4d890c86be7ccb031ce7cf2dcc41783f9f7.map +13711 -0
  5. package/SystemModules/amzn__react-native-screens-3.modules.txt +158 -0
  6. package/SystemModules/amzn__react-native-screens-3.private.modules.txt +377 -0
  7. package/SystemModules/keplerscript-system-bundle-config.json +4 -4
  8. package/android/CMakeLists.txt +80 -0
  9. package/android/build.gradle +96 -17
  10. package/android/src/fabric/java/com/swmansion/rnscreens/FabricEnabledHeaderConfigViewGroup.kt +61 -0
  11. package/android/src/fabric/java/com/swmansion/rnscreens/FabricEnabledViewGroup.kt +38 -25
  12. package/android/src/fabric/java/com/swmansion/rnscreens/NativeProxy.kt +53 -0
  13. package/android/src/main/cpp/NativeProxy.cpp +51 -0
  14. package/android/src/main/cpp/NativeProxy.h +35 -0
  15. package/android/src/main/cpp/OnLoad.cpp +8 -0
  16. package/android/src/main/cpp/jni-adapter.cpp +106 -0
  17. package/android/src/main/java/com/swmansion/rnscreens/CustomSearchView.kt +20 -10
  18. package/android/src/main/java/com/swmansion/rnscreens/CustomToolbar.kt +69 -1
  19. package/android/src/main/java/com/swmansion/rnscreens/FragmentBackPressOverrider.kt +8 -8
  20. package/android/src/main/java/com/swmansion/rnscreens/InsetsObserverProxy.kt +104 -0
  21. package/android/src/main/java/com/swmansion/rnscreens/ModalScreenViewManager.kt +12 -0
  22. package/android/src/main/java/com/swmansion/rnscreens/NativeDismissalObserver.kt +12 -0
  23. package/android/src/main/java/com/swmansion/rnscreens/RNScreensPackage.kt +65 -7
  24. package/android/src/main/java/com/swmansion/rnscreens/Screen.kt +327 -84
  25. package/android/src/main/java/com/swmansion/rnscreens/ScreenContainer.kt +122 -72
  26. package/android/src/main/java/com/swmansion/rnscreens/ScreenContainerViewManager.kt +27 -4
  27. package/android/src/main/java/com/swmansion/rnscreens/ScreenContentWrapper.kt +38 -0
  28. package/android/src/main/java/com/swmansion/rnscreens/ScreenContentWrapperManager.kt +25 -0
  29. package/android/src/main/java/com/swmansion/rnscreens/ScreenEventDispatcher.kt +10 -2
  30. package/android/src/main/java/com/swmansion/rnscreens/ScreenFooter.kt +299 -0
  31. package/android/src/main/java/com/swmansion/rnscreens/ScreenFooterManager.kt +25 -0
  32. package/android/src/main/java/com/swmansion/rnscreens/ScreenFragment.kt +91 -67
  33. package/android/src/main/java/com/swmansion/rnscreens/ScreenFragmentWrapper.kt +12 -1
  34. package/android/src/main/java/com/swmansion/rnscreens/ScreenModalFragment.kt +281 -0
  35. package/android/src/main/java/com/swmansion/rnscreens/ScreenStack.kt +184 -81
  36. package/android/src/main/java/com/swmansion/rnscreens/ScreenStackFragment.kt +467 -80
  37. package/android/src/main/java/com/swmansion/rnscreens/ScreenStackFragmentWrapper.kt +8 -1
  38. package/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderConfig.kt +156 -124
  39. package/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderConfigShadowNode.kt +25 -0
  40. package/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderConfigViewManager.kt +159 -39
  41. package/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderSubview.kt +24 -9
  42. package/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderSubviewManager.kt +19 -13
  43. package/android/src/main/java/com/swmansion/rnscreens/ScreenStackViewManager.kt +31 -28
  44. package/android/src/main/java/com/swmansion/rnscreens/ScreenViewManager.kt +276 -71
  45. package/android/src/main/java/com/swmansion/rnscreens/ScreenWindowTraits.kt +124 -64
  46. package/android/src/main/java/com/swmansion/rnscreens/ScreensModule.kt +127 -0
  47. package/android/src/main/java/com/swmansion/rnscreens/ScreensShadowNode.kt +4 -2
  48. package/android/src/main/java/com/swmansion/rnscreens/SearchBarManager.kt +160 -53
  49. package/android/src/main/java/com/swmansion/rnscreens/SearchBarView.kt +57 -32
  50. package/android/src/main/java/com/swmansion/rnscreens/SearchViewFormatter.kt +15 -10
  51. package/android/src/main/java/com/swmansion/rnscreens/bottomsheet/BottomSheetBehaviorExt.kt +42 -0
  52. package/android/src/main/java/com/swmansion/rnscreens/bottomsheet/BottomSheetDialogRootView.kt +104 -0
  53. package/android/src/main/java/com/swmansion/rnscreens/bottomsheet/BottomSheetDialogScreen.kt +26 -0
  54. package/android/src/main/java/com/swmansion/rnscreens/bottomsheet/DimmingFragment.kt +493 -0
  55. package/android/src/main/java/com/swmansion/rnscreens/bottomsheet/DimmingView.kt +66 -0
  56. package/android/src/main/java/com/swmansion/rnscreens/bottomsheet/GestureTransparentViewGroup.kt +24 -0
  57. package/android/src/main/java/com/swmansion/rnscreens/bottomsheet/SheetUtils.kt +135 -0
  58. package/android/src/main/java/com/swmansion/rnscreens/events/HeaderAttachedEvent.kt +7 -8
  59. package/android/src/main/java/com/swmansion/rnscreens/events/HeaderBackButtonClickedEvent.kt +8 -9
  60. package/android/src/main/java/com/swmansion/rnscreens/events/HeaderDetachedEvent.kt +7 -8
  61. package/android/src/main/java/com/swmansion/rnscreens/events/HeaderHeightChangeEvent.kt +9 -10
  62. package/android/src/main/java/com/swmansion/rnscreens/events/ScreenAppearEvent.kt +4 -1
  63. package/android/src/main/java/com/swmansion/rnscreens/events/ScreenDisappearEvent.kt +4 -1
  64. package/android/src/main/java/com/swmansion/rnscreens/events/ScreenDismissedEvent.kt +8 -4
  65. package/android/src/main/java/com/swmansion/rnscreens/events/ScreenTransitionProgressEvent.kt +13 -16
  66. package/android/src/main/java/com/swmansion/rnscreens/events/ScreenWillAppearEvent.kt +4 -1
  67. package/android/src/main/java/com/swmansion/rnscreens/events/ScreenWillDisappearEvent.kt +4 -1
  68. package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarBlurEvent.kt +8 -9
  69. package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarChangeTextEvent.kt +8 -11
  70. package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarCloseEvent.kt +7 -8
  71. package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarFocusEvent.kt +8 -9
  72. package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarOpenEvent.kt +7 -8
  73. package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarSearchButtonPressEvent.kt +12 -11
  74. package/android/src/main/java/com/swmansion/rnscreens/events/SheetDetentChangedEvent.kt +27 -0
  75. package/android/src/main/java/com/swmansion/rnscreens/events/StackFinishTransitioningEvent.kt +4 -1
  76. package/android/src/main/java/com/swmansion/rnscreens/ext/NumericExt.kt +12 -0
  77. package/android/src/main/java/com/swmansion/rnscreens/ext/ViewExt.kt +32 -0
  78. package/android/src/main/java/com/swmansion/rnscreens/utils/DeviceUtils.kt +1 -5
  79. package/android/src/main/java/com/swmansion/rnscreens/utils/PaddingBundle.kt +8 -0
  80. package/android/src/main/java/com/swmansion/rnscreens/utils/ScreenDummyLayoutHelper.kt +282 -0
  81. package/android/src/main/jni/CMakeLists.txt +35 -23
  82. package/android/src/main/jni/rnscreens.h +3 -0
  83. package/android/src/main/res/base/anim/rns_ios_from_left_background_close.xml +5 -0
  84. package/android/src/main/res/base/anim/rns_ios_from_left_background_open.xml +5 -0
  85. package/android/src/main/res/base/anim/rns_ios_from_left_foreground_close.xml +6 -0
  86. package/android/src/main/res/base/anim/rns_ios_from_left_foreground_open.xml +6 -0
  87. package/android/src/main/res/base/anim/rns_ios_from_right_background_close.xml +5 -0
  88. package/android/src/main/res/base/anim/rns_ios_from_right_background_open.xml +5 -0
  89. package/android/src/main/res/base/anim/rns_ios_from_right_foreground_close.xml +6 -0
  90. package/android/src/main/res/base/anim/rns_ios_from_right_foreground_open.xml +6 -0
  91. package/android/src/main/res/base/drawable/rns_rounder_top_corners_shape.xml +8 -0
  92. package/android/src/main/res/v33/anim-v33/rns_default_enter_in.xml +0 -1
  93. package/android/src/main/res/v33/anim-v33/rns_default_enter_out.xml +2 -2
  94. package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenContainerManagerDelegate.java +25 -0
  95. package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenContainerManagerInterface.java +16 -0
  96. package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenContentWrapperManagerDelegate.java +25 -0
  97. package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenContentWrapperManagerInterface.java +16 -0
  98. package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenFooterManagerDelegate.java +25 -0
  99. package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenFooterManagerInterface.java +16 -0
  100. package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenManagerDelegate.java +16 -3
  101. package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenManagerInterface.java +7 -2
  102. package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenStackHeaderConfigManagerDelegate.java +6 -0
  103. package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenStackHeaderConfigManagerInterface.java +2 -0
  104. package/android/src/paper/java/com/facebook/react/viewmanagers/RNSSearchBarManagerDelegate.java +99 -0
  105. package/android/src/paper/java/com/facebook/react/viewmanagers/RNSSearchBarManagerInterface.java +37 -0
  106. package/android/src/paper/java/com/swmansion/rnscreens/FabricEnabledHeaderConfigViewGroup.kt +39 -0
  107. package/android/src/paper/java/com/swmansion/rnscreens/FabricEnabledViewGroup.kt +11 -2
  108. package/android/src/paper/java/com/swmansion/rnscreens/NativeProxy.kt +19 -0
  109. package/android/src/paper/java/com/swmansion/rnscreens/NativeScreensModuleSpec.java +36 -0
  110. package/common/cpp/react/renderer/components/rnscreens/FrameCorrectionModes.h +51 -0
  111. package/common/cpp/react/renderer/components/rnscreens/RNSModalScreenComponentDescriptor.h +40 -0
  112. package/common/cpp/react/renderer/components/rnscreens/RNSModalScreenShadowNode.cpp +16 -0
  113. package/common/cpp/react/renderer/components/rnscreens/RNSModalScreenShadowNode.h +32 -0
  114. package/common/cpp/react/renderer/components/rnscreens/RNSScreenComponentDescriptor.h +55 -12
  115. package/common/cpp/react/renderer/components/rnscreens/RNSScreenShadowNode.cpp +157 -0
  116. package/common/cpp/react/renderer/components/rnscreens/RNSScreenShadowNode.h +31 -11
  117. package/common/cpp/react/renderer/components/rnscreens/RNSScreenStackHeaderConfigComponentDescriptor.h +49 -0
  118. package/common/cpp/react/renderer/components/rnscreens/RNSScreenStackHeaderConfigShadowNode.cpp +22 -0
  119. package/common/cpp/react/renderer/components/rnscreens/RNSScreenStackHeaderConfigShadowNode.h +40 -0
  120. package/common/cpp/react/renderer/components/rnscreens/RNSScreenStackHeaderConfigState.cpp +34 -0
  121. package/common/cpp/react/renderer/components/rnscreens/RNSScreenStackHeaderConfigState.h +57 -0
  122. package/common/cpp/react/renderer/components/rnscreens/RNSScreenStackHeaderSubviewComponentDescriptor.h +27 -0
  123. package/common/cpp/react/renderer/components/rnscreens/RNSScreenStackHeaderSubviewShadowNode.cpp +8 -0
  124. package/common/cpp/react/renderer/components/rnscreens/RNSScreenStackHeaderSubviewShadowNode.h +31 -0
  125. package/common/cpp/react/renderer/components/rnscreens/RNSScreenStackHeaderSubviewState.cpp +15 -0
  126. package/common/cpp/react/renderer/components/rnscreens/RNSScreenStackHeaderSubviewState.h +39 -0
  127. package/common/cpp/react/renderer/components/rnscreens/RNSScreenState.cpp +23 -2
  128. package/common/cpp/react/renderer/components/rnscreens/RNSScreenState.h +33 -8
  129. package/common/cpp/react/renderer/components/rnscreens/utils/RectUtil.h +36 -0
  130. package/cpp/RNSScreenRemovalListener.cpp +25 -0
  131. package/cpp/RNSScreenRemovalListener.h +20 -0
  132. package/cpp/RNScreensTurboModule.cpp +115 -0
  133. package/cpp/RNScreensTurboModule.h +40 -0
  134. package/gesture-handler/package.json +6 -0
  135. package/ios/RNSConvert.h +24 -4
  136. package/ios/RNSConvert.mm +180 -55
  137. package/ios/RNSEnums.h +48 -0
  138. package/ios/RNSFullWindowOverlay.mm +12 -2
  139. package/ios/RNSModalScreen.h +8 -0
  140. package/ios/RNSModalScreen.mm +65 -0
  141. package/ios/RNSModule.h +19 -0
  142. package/ios/RNSModule.mm +173 -0
  143. package/ios/RNSPercentDrivenInteractiveTransition.h +12 -0
  144. package/ios/RNSPercentDrivenInteractiveTransition.mm +69 -0
  145. package/ios/RNSScreen.h +24 -5
  146. package/ios/RNSScreen.mm +652 -173
  147. package/ios/RNSScreenContainer.mm +12 -1
  148. package/ios/RNSScreenContentWrapper.h +44 -0
  149. package/ios/RNSScreenContentWrapper.mm +67 -0
  150. package/ios/RNSScreenFooter.h +30 -0
  151. package/ios/RNSScreenFooter.mm +142 -0
  152. package/ios/RNSScreenNavigationContainer.mm +7 -0
  153. package/ios/RNSScreenStack.h +6 -0
  154. package/ios/RNSScreenStack.mm +333 -109
  155. package/ios/RNSScreenStackAnimator.h +15 -1
  156. package/ios/RNSScreenStackAnimator.mm +380 -115
  157. package/ios/RNSScreenStackHeaderConfig.h +74 -6
  158. package/ios/RNSScreenStackHeaderConfig.mm +338 -69
  159. package/ios/RNSScreenStackHeaderSubview.h +0 -7
  160. package/ios/RNSScreenStackHeaderSubview.mm +61 -24
  161. package/ios/RNSScreenWindowTraits.h +1 -1
  162. package/ios/RNSScreenWindowTraits.mm +24 -50
  163. package/ios/RNSSearchBar.h +5 -5
  164. package/ios/RNSSearchBar.mm +42 -11
  165. package/ios/events/RNSHeaderHeightChangeEvent.h +0 -1
  166. package/ios/events/RNSHeaderHeightChangeEvent.mm +15 -0
  167. package/ios/events/RNSScreenViewEvent.h +0 -1
  168. package/ios/utils/RCTSurfaceTouchHandler+RNSUtility.h +15 -0
  169. package/ios/utils/RCTSurfaceTouchHandler+RNSUtility.mm +14 -0
  170. package/ios/utils/RCTTouchHandler+RNSUtility.h +15 -0
  171. package/ios/utils/RCTTouchHandler+RNSUtility.mm +15 -0
  172. package/ios/utils/RNSDefines.h +7 -0
  173. package/ios/utils/RNSUIBarButtonItem.h +2 -0
  174. package/ios/utils/UINavigationBar+RNSUtility.h +37 -0
  175. package/ios/utils/UINavigationBar+RNSUtility.mm +44 -0
  176. package/ios/utils/UIView+RNSUtility.h +23 -0
  177. package/ios/utils/UIView+RNSUtility.mm +54 -0
  178. package/kepler-compatibility.json +2 -2
  179. package/lib/commonjs/TransitionProgressContext.js +1 -0
  180. package/lib/commonjs/TransitionProgressContext.js.map +1 -1
  181. package/lib/commonjs/components/DebugContainer.js +39 -0
  182. package/lib/commonjs/components/DebugContainer.js.map +1 -0
  183. package/lib/commonjs/components/DebugContainer.web.js +15 -0
  184. package/lib/commonjs/components/DebugContainer.web.js.map +1 -0
  185. package/lib/commonjs/components/FullWindowOverlay.js +31 -0
  186. package/lib/commonjs/components/FullWindowOverlay.js.map +1 -0
  187. package/lib/commonjs/components/FullWindowOverlay.web.js +9 -0
  188. package/lib/commonjs/components/FullWindowOverlay.web.js.map +1 -0
  189. package/lib/commonjs/components/Screen.js +286 -0
  190. package/lib/commonjs/components/Screen.js.map +1 -0
  191. package/lib/commonjs/components/Screen.web.js +47 -0
  192. package/lib/commonjs/components/Screen.web.js.map +1 -0
  193. package/lib/commonjs/components/ScreenContainer.js +32 -0
  194. package/lib/commonjs/components/ScreenContainer.js.map +1 -0
  195. package/lib/commonjs/components/ScreenContainer.web.js +10 -0
  196. package/lib/commonjs/components/ScreenContainer.web.js.map +1 -0
  197. package/lib/commonjs/components/ScreenContentWrapper.js +17 -0
  198. package/lib/commonjs/components/ScreenContentWrapper.js.map +1 -0
  199. package/lib/commonjs/components/ScreenContentWrapper.web.js +10 -0
  200. package/lib/commonjs/components/ScreenContentWrapper.web.js.map +1 -0
  201. package/lib/commonjs/components/ScreenFooter.js +25 -0
  202. package/lib/commonjs/components/ScreenFooter.js.map +1 -0
  203. package/lib/commonjs/components/ScreenFooter.web.js +11 -0
  204. package/lib/commonjs/components/ScreenFooter.web.js.map +1 -0
  205. package/lib/commonjs/components/ScreenStack.js +67 -0
  206. package/lib/commonjs/components/ScreenStack.js.map +1 -0
  207. package/lib/commonjs/components/ScreenStack.web.js +10 -0
  208. package/lib/commonjs/components/ScreenStack.web.js.map +1 -0
  209. package/lib/commonjs/components/ScreenStackHeaderConfig.js +90 -0
  210. package/lib/commonjs/components/ScreenStackHeaderConfig.js.map +1 -0
  211. package/lib/commonjs/components/ScreenStackHeaderConfig.web.js +27 -0
  212. package/lib/commonjs/components/ScreenStackHeaderConfig.web.js.map +1 -0
  213. package/lib/commonjs/components/ScreenStackItem.js +107 -0
  214. package/lib/commonjs/components/ScreenStackItem.js.map +1 -0
  215. package/lib/commonjs/components/SearchBar.js +63 -0
  216. package/lib/commonjs/components/SearchBar.js.map +1 -0
  217. package/lib/commonjs/components/SearchBar.web.js +10 -0
  218. package/lib/commonjs/components/SearchBar.web.js.map +1 -0
  219. package/lib/commonjs/components/helpers/DelayedFreeze.js +31 -0
  220. package/lib/commonjs/components/helpers/DelayedFreeze.js.map +1 -0
  221. package/lib/commonjs/components/helpers/usePrevious.js +15 -0
  222. package/lib/commonjs/components/helpers/usePrevious.js.map +1 -0
  223. package/lib/commonjs/contexts.js +11 -0
  224. package/lib/commonjs/contexts.js.map +1 -0
  225. package/lib/commonjs/core.js +40 -0
  226. package/lib/commonjs/core.js.map +1 -0
  227. package/lib/commonjs/fabric/FullWindowOverlayNativeComponent.js +16 -1
  228. package/lib/commonjs/fabric/FullWindowOverlayNativeComponent.js.map +1 -1
  229. package/lib/commonjs/fabric/ModalScreenNativeComponent.js +14 -0
  230. package/lib/commonjs/fabric/ModalScreenNativeComponent.js.map +1 -0
  231. package/lib/commonjs/fabric/NativeScreensModule.js +10 -0
  232. package/lib/commonjs/fabric/NativeScreensModule.js.map +1 -0
  233. package/lib/commonjs/fabric/NativeScreensModule.web.js +8 -0
  234. package/lib/commonjs/fabric/NativeScreensModule.web.js.map +1 -0
  235. package/lib/commonjs/fabric/ScreenContainerNativeComponent.js +8 -11
  236. package/lib/commonjs/fabric/ScreenContainerNativeComponent.js.map +1 -1
  237. package/lib/commonjs/fabric/ScreenContentWrapperNativeComponent.js +18 -0
  238. package/lib/commonjs/fabric/ScreenContentWrapperNativeComponent.js.map +1 -0
  239. package/lib/commonjs/fabric/ScreenFooterNativeComponent.js +10 -0
  240. package/lib/commonjs/fabric/ScreenFooterNativeComponent.js.map +1 -0
  241. package/lib/commonjs/fabric/ScreenNativeComponent.js +13 -15
  242. package/lib/commonjs/fabric/ScreenNativeComponent.js.map +1 -1
  243. package/lib/commonjs/fabric/ScreenNavigationContainerNativeComponent.js +2 -1
  244. package/lib/commonjs/fabric/ScreenNavigationContainerNativeComponent.js.map +1 -1
  245. package/lib/commonjs/fabric/ScreenStackHeaderConfigNativeComponent.js +10 -9
  246. package/lib/commonjs/fabric/ScreenStackHeaderConfigNativeComponent.js.map +1 -1
  247. package/lib/commonjs/fabric/ScreenStackHeaderSubviewNativeComponent.js +5 -2
  248. package/lib/commonjs/fabric/ScreenStackHeaderSubviewNativeComponent.js.map +1 -1
  249. package/lib/commonjs/fabric/ScreenStackNativeComponent.js +8 -11
  250. package/lib/commonjs/fabric/ScreenStackNativeComponent.js.map +1 -1
  251. package/lib/commonjs/fabric/SearchBarNativeComponent.js +4 -5
  252. package/lib/commonjs/fabric/SearchBarNativeComponent.js.map +1 -1
  253. package/lib/commonjs/gesture-handler/GestureDetectorProvider.js +19 -0
  254. package/lib/commonjs/gesture-handler/GestureDetectorProvider.js.map +1 -0
  255. package/lib/commonjs/gesture-handler/RNScreensTurboModule.js +8 -0
  256. package/lib/commonjs/gesture-handler/RNScreensTurboModule.js.map +1 -0
  257. package/lib/commonjs/gesture-handler/ScreenGestureDetector.js +201 -0
  258. package/lib/commonjs/gesture-handler/ScreenGestureDetector.js.map +1 -0
  259. package/lib/commonjs/gesture-handler/constraints.js +64 -0
  260. package/lib/commonjs/gesture-handler/constraints.js.map +1 -0
  261. package/lib/commonjs/gesture-handler/defaults.js +45 -0
  262. package/lib/commonjs/gesture-handler/defaults.js.map +1 -0
  263. package/lib/commonjs/gesture-handler/fabricUtils.js +66 -0
  264. package/lib/commonjs/gesture-handler/fabricUtils.js.map +1 -0
  265. package/lib/commonjs/gesture-handler/fabricUtils.web.js +17 -0
  266. package/lib/commonjs/gesture-handler/fabricUtils.web.js.map +1 -0
  267. package/lib/commonjs/gesture-handler/index.js +14 -0
  268. package/lib/commonjs/gesture-handler/index.js.map +1 -0
  269. package/lib/commonjs/index.js +157 -94
  270. package/lib/commonjs/index.js.map +1 -1
  271. package/lib/commonjs/native-stack/contexts/GHContext.js +12 -0
  272. package/lib/commonjs/native-stack/contexts/GHContext.js.map +1 -0
  273. package/lib/commonjs/native-stack/index.js.map +1 -1
  274. package/lib/commonjs/native-stack/navigators/createNativeStackNavigator.js +21 -20
  275. package/lib/commonjs/native-stack/navigators/createNativeStackNavigator.js.map +1 -1
  276. package/lib/commonjs/native-stack/types.js.map +1 -1
  277. package/lib/commonjs/native-stack/utils/AnimatedHeaderHeightContext.js.map +1 -1
  278. package/lib/commonjs/native-stack/utils/HeaderHeightContext.js.map +1 -1
  279. package/lib/commonjs/native-stack/utils/SafeAreaProviderCompat.js.map +1 -1
  280. package/lib/commonjs/native-stack/utils/getDefaultHeaderHeight.js.map +1 -1
  281. package/lib/commonjs/native-stack/utils/getStatusBarHeight.js +22 -0
  282. package/lib/commonjs/native-stack/utils/getStatusBarHeight.js.map +1 -0
  283. package/lib/commonjs/native-stack/utils/useAnimatedHeaderHeight.js.map +1 -1
  284. package/lib/commonjs/native-stack/utils/useBackPressSubscription.js +2 -4
  285. package/lib/commonjs/native-stack/utils/useBackPressSubscription.js.map +1 -1
  286. package/lib/commonjs/native-stack/utils/useHeaderHeight.js.map +1 -1
  287. package/lib/commonjs/native-stack/views/FontProcessor.js +1 -3
  288. package/lib/commonjs/native-stack/views/FontProcessor.js.map +1 -1
  289. package/lib/commonjs/native-stack/views/FooterComponent.js +17 -0
  290. package/lib/commonjs/native-stack/views/FooterComponent.js.map +1 -0
  291. package/lib/commonjs/native-stack/views/HeaderConfig.js +21 -13
  292. package/lib/commonjs/native-stack/views/HeaderConfig.js.map +1 -1
  293. package/lib/commonjs/native-stack/views/NativeStackView.js +118 -52
  294. package/lib/commonjs/native-stack/views/NativeStackView.js.map +1 -1
  295. package/lib/commonjs/reanimated/ReanimatedHeaderHeightContext.js.map +1 -1
  296. package/lib/commonjs/reanimated/ReanimatedNativeStackScreen.js +15 -21
  297. package/lib/commonjs/reanimated/ReanimatedNativeStackScreen.js.map +1 -1
  298. package/lib/commonjs/reanimated/ReanimatedScreen.js +2 -2
  299. package/lib/commonjs/reanimated/ReanimatedScreen.js.map +1 -1
  300. package/lib/commonjs/reanimated/ReanimatedScreenProvider.js +8 -16
  301. package/lib/commonjs/reanimated/ReanimatedScreenProvider.js.map +1 -1
  302. package/lib/commonjs/reanimated/ReanimatedTransitionProgressContext.js.map +1 -1
  303. package/lib/commonjs/reanimated/index.js.map +1 -1
  304. package/lib/commonjs/reanimated/useReanimatedHeaderHeight.js +2 -2
  305. package/lib/commonjs/reanimated/useReanimatedHeaderHeight.js.map +1 -1
  306. package/lib/commonjs/reanimated/useReanimatedTransitionProgress.js.map +1 -1
  307. package/lib/commonjs/types.js.map +1 -1
  308. package/lib/commonjs/useTransitionProgress.js.map +1 -1
  309. package/lib/commonjs/utils.js +28 -6
  310. package/lib/commonjs/utils.js.map +1 -1
  311. package/lib/module/TransitionProgressContext.js +2 -0
  312. package/lib/module/TransitionProgressContext.js.map +1 -1
  313. package/lib/module/components/DebugContainer.js +30 -0
  314. package/lib/module/components/DebugContainer.js.map +1 -0
  315. package/lib/module/components/DebugContainer.web.js +6 -0
  316. package/lib/module/components/DebugContainer.web.js.map +1 -0
  317. package/lib/module/components/FullWindowOverlay.js +24 -0
  318. package/lib/module/components/FullWindowOverlay.js.map +1 -0
  319. package/lib/module/components/FullWindowOverlay.web.js +3 -0
  320. package/lib/module/components/FullWindowOverlay.web.js.map +1 -0
  321. package/lib/module/components/Screen.js +282 -0
  322. package/lib/module/components/Screen.js.map +1 -0
  323. package/lib/module/components/Screen.web.js +40 -0
  324. package/lib/module/components/Screen.web.js.map +1 -0
  325. package/lib/module/components/ScreenContainer.js +26 -0
  326. package/lib/module/components/ScreenContainer.js.map +1 -0
  327. package/lib/module/components/ScreenContainer.web.js +4 -0
  328. package/lib/module/components/ScreenContainer.web.js.map +1 -0
  329. package/lib/module/components/ScreenContentWrapper.js +10 -0
  330. package/lib/module/components/ScreenContentWrapper.js.map +1 -0
  331. package/lib/module/components/ScreenContentWrapper.web.js +4 -0
  332. package/lib/module/components/ScreenContentWrapper.web.js.map +1 -0
  333. package/lib/module/components/ScreenFooter.js +18 -0
  334. package/lib/module/components/ScreenFooter.js.map +1 -0
  335. package/lib/module/components/ScreenFooter.web.js +6 -0
  336. package/lib/module/components/ScreenFooter.web.js.map +1 -0
  337. package/lib/module/components/ScreenStack.js +63 -0
  338. package/lib/module/components/ScreenStack.js.map +1 -0
  339. package/lib/module/components/ScreenStack.web.js +4 -0
  340. package/lib/module/components/ScreenStack.web.js.map +1 -0
  341. package/lib/module/components/ScreenStackHeaderConfig.js +81 -0
  342. package/lib/module/components/ScreenStackHeaderConfig.js.map +1 -0
  343. package/lib/module/components/ScreenStackHeaderConfig.web.js +14 -0
  344. package/lib/module/components/ScreenStackHeaderConfig.web.js.map +1 -0
  345. package/lib/module/components/ScreenStackItem.js +98 -0
  346. package/lib/module/components/ScreenStackItem.js.map +1 -0
  347. package/lib/module/components/SearchBar.js +57 -0
  348. package/lib/module/components/SearchBar.js.map +1 -0
  349. package/lib/module/components/SearchBar.web.js +4 -0
  350. package/lib/module/components/SearchBar.web.js.map +1 -0
  351. package/lib/module/components/helpers/DelayedFreeze.js +24 -0
  352. package/lib/module/components/helpers/DelayedFreeze.js.map +1 -0
  353. package/lib/module/components/helpers/usePrevious.js +9 -0
  354. package/lib/module/components/helpers/usePrevious.js.map +1 -0
  355. package/lib/module/contexts.js +4 -0
  356. package/lib/module/contexts.js.map +1 -0
  357. package/lib/module/core.js +31 -0
  358. package/lib/module/core.js.map +1 -0
  359. package/lib/module/fabric/FullWindowOverlayNativeComponent.js +16 -0
  360. package/lib/module/fabric/FullWindowOverlayNativeComponent.js.map +1 -1
  361. package/lib/module/fabric/ModalScreenNativeComponent.js +10 -0
  362. package/lib/module/fabric/ModalScreenNativeComponent.js.map +1 -0
  363. package/lib/module/fabric/NativeScreensModule.js +5 -0
  364. package/lib/module/fabric/NativeScreensModule.js.map +1 -0
  365. package/lib/module/fabric/NativeScreensModule.web.js +2 -0
  366. package/lib/module/fabric/NativeScreensModule.web.js.map +1 -0
  367. package/lib/module/fabric/ScreenContainerNativeComponent.js +3 -4
  368. package/lib/module/fabric/ScreenContainerNativeComponent.js.map +1 -1
  369. package/lib/module/fabric/ScreenContentWrapperNativeComponent.js +10 -0
  370. package/lib/module/fabric/ScreenContentWrapperNativeComponent.js.map +1 -0
  371. package/lib/module/fabric/ScreenFooterNativeComponent.js +3 -0
  372. package/lib/module/fabric/ScreenFooterNativeComponent.js.map +1 -0
  373. package/lib/module/fabric/ScreenNativeComponent.js +8 -7
  374. package/lib/module/fabric/ScreenNativeComponent.js.map +1 -1
  375. package/lib/module/fabric/ScreenNavigationContainerNativeComponent.js +2 -0
  376. package/lib/module/fabric/ScreenNavigationContainerNativeComponent.js.map +1 -1
  377. package/lib/module/fabric/ScreenStackHeaderConfigNativeComponent.js +8 -2
  378. package/lib/module/fabric/ScreenStackHeaderConfigNativeComponent.js.map +1 -1
  379. package/lib/module/fabric/ScreenStackHeaderSubviewNativeComponent.js +5 -1
  380. package/lib/module/fabric/ScreenStackHeaderSubviewNativeComponent.js.map +1 -1
  381. package/lib/module/fabric/ScreenStackNativeComponent.js +3 -3
  382. package/lib/module/fabric/ScreenStackNativeComponent.js.map +1 -1
  383. package/lib/module/fabric/SearchBarNativeComponent.js +3 -1
  384. package/lib/module/fabric/SearchBarNativeComponent.js.map +1 -1
  385. package/lib/module/gesture-handler/GestureDetectorProvider.js +12 -0
  386. package/lib/module/gesture-handler/GestureDetectorProvider.js.map +1 -0
  387. package/lib/module/gesture-handler/RNScreensTurboModule.js +2 -0
  388. package/lib/module/gesture-handler/RNScreensTurboModule.js.map +1 -0
  389. package/lib/module/gesture-handler/ScreenGestureDetector.js +193 -0
  390. package/lib/module/gesture-handler/ScreenGestureDetector.js.map +1 -0
  391. package/lib/module/gesture-handler/constraints.js +56 -0
  392. package/lib/module/gesture-handler/constraints.js.map +1 -0
  393. package/lib/module/gesture-handler/defaults.js +39 -0
  394. package/lib/module/gesture-handler/defaults.js.map +1 -0
  395. package/lib/module/gesture-handler/fabricUtils.js +61 -0
  396. package/lib/module/gesture-handler/fabricUtils.js.map +1 -0
  397. package/lib/module/gesture-handler/fabricUtils.web.js +10 -0
  398. package/lib/module/gesture-handler/fabricUtils.web.js.map +1 -0
  399. package/lib/module/gesture-handler/index.js +5 -0
  400. package/lib/module/gesture-handler/index.js.map +1 -0
  401. package/lib/module/index.js +29 -64
  402. package/lib/module/index.js.map +1 -1
  403. package/lib/module/native-stack/contexts/GHContext.js +6 -0
  404. package/lib/module/native-stack/contexts/GHContext.js.map +1 -0
  405. package/lib/module/native-stack/index.js.map +1 -1
  406. package/lib/module/native-stack/navigators/createNativeStackNavigator.js +21 -20
  407. package/lib/module/native-stack/navigators/createNativeStackNavigator.js.map +1 -1
  408. package/lib/module/native-stack/types.js.map +1 -1
  409. package/lib/module/native-stack/utils/AnimatedHeaderHeightContext.js.map +1 -1
  410. package/lib/module/native-stack/utils/HeaderHeightContext.js.map +1 -1
  411. package/lib/module/native-stack/utils/SafeAreaProviderCompat.js.map +1 -1
  412. package/lib/module/native-stack/utils/getDefaultHeaderHeight.js.map +1 -1
  413. package/lib/module/native-stack/utils/getStatusBarHeight.js +16 -0
  414. package/lib/module/native-stack/utils/getStatusBarHeight.js.map +1 -0
  415. package/lib/module/native-stack/utils/useAnimatedHeaderHeight.js.map +1 -1
  416. package/lib/module/native-stack/utils/useBackPressSubscription.js +2 -4
  417. package/lib/module/native-stack/utils/useBackPressSubscription.js.map +1 -1
  418. package/lib/module/native-stack/utils/useHeaderHeight.js.map +1 -1
  419. package/lib/module/native-stack/views/FontProcessor.js +2 -3
  420. package/lib/module/native-stack/views/FontProcessor.js.map +1 -1
  421. package/lib/module/native-stack/views/FooterComponent.js +10 -0
  422. package/lib/module/native-stack/views/FooterComponent.js.map +1 -0
  423. package/lib/module/native-stack/views/HeaderConfig.js +13 -6
  424. package/lib/module/native-stack/views/HeaderConfig.js.map +1 -1
  425. package/lib/module/native-stack/views/NativeStackView.js +114 -46
  426. package/lib/module/native-stack/views/NativeStackView.js.map +1 -1
  427. package/lib/module/reanimated/ReanimatedHeaderHeightContext.js.map +1 -1
  428. package/lib/module/reanimated/ReanimatedNativeStackScreen.js +8 -12
  429. package/lib/module/reanimated/ReanimatedNativeStackScreen.js.map +1 -1
  430. package/lib/module/reanimated/ReanimatedScreen.js +1 -2
  431. package/lib/module/reanimated/ReanimatedScreen.js.map +1 -1
  432. package/lib/module/reanimated/ReanimatedScreenProvider.js +7 -15
  433. package/lib/module/reanimated/ReanimatedScreenProvider.js.map +1 -1
  434. package/lib/module/reanimated/ReanimatedTransitionProgressContext.js.map +1 -1
  435. package/lib/module/reanimated/index.js.map +1 -1
  436. package/lib/module/reanimated/useReanimatedHeaderHeight.js +1 -1
  437. package/lib/module/reanimated/useReanimatedHeaderHeight.js.map +1 -1
  438. package/lib/module/reanimated/useReanimatedTransitionProgress.js.map +1 -1
  439. package/lib/module/types.js.map +1 -1
  440. package/lib/module/useTransitionProgress.js.map +1 -1
  441. package/lib/module/utils.js +26 -5
  442. package/lib/module/utils.js.map +1 -1
  443. package/lib/typescript/TransitionProgressContext.d.ts +2 -1
  444. package/lib/typescript/TransitionProgressContext.d.ts.map +1 -0
  445. package/lib/typescript/components/DebugContainer.d.ts +15 -0
  446. package/lib/typescript/components/DebugContainer.d.ts.map +1 -0
  447. package/lib/typescript/components/DebugContainer.web.d.ts +4 -0
  448. package/lib/typescript/components/DebugContainer.web.d.ts.map +1 -0
  449. package/lib/typescript/components/FullWindowOverlay.d.ts +6 -0
  450. package/lib/typescript/components/FullWindowOverlay.d.ts.map +1 -0
  451. package/lib/typescript/components/FullWindowOverlay.web.d.ts +6 -0
  452. package/lib/typescript/components/FullWindowOverlay.web.d.ts.map +1 -0
  453. package/lib/typescript/components/Screen.d.ts +8 -0
  454. package/lib/typescript/components/Screen.d.ts.map +1 -0
  455. package/lib/typescript/components/Screen.web.d.ts +11 -0
  456. package/lib/typescript/components/Screen.web.d.ts.map +1 -0
  457. package/lib/typescript/components/ScreenContainer.d.ts +5 -0
  458. package/lib/typescript/components/ScreenContainer.d.ts.map +1 -0
  459. package/lib/typescript/components/ScreenContainer.web.d.ts +4 -0
  460. package/lib/typescript/components/ScreenContainer.web.d.ts.map +1 -0
  461. package/lib/typescript/components/ScreenContentWrapper.d.ts +5 -0
  462. package/lib/typescript/components/ScreenContentWrapper.d.ts.map +1 -0
  463. package/lib/typescript/components/ScreenContentWrapper.web.d.ts +4 -0
  464. package/lib/typescript/components/ScreenContentWrapper.web.d.ts.map +1 -0
  465. package/lib/typescript/components/ScreenFooter.d.ts +12 -0
  466. package/lib/typescript/components/ScreenFooter.d.ts.map +1 -0
  467. package/lib/typescript/components/ScreenFooter.web.d.ts +6 -0
  468. package/lib/typescript/components/ScreenFooter.web.d.ts.map +1 -0
  469. package/lib/typescript/components/ScreenStack.d.ts +5 -0
  470. package/lib/typescript/components/ScreenStack.d.ts.map +1 -0
  471. package/lib/typescript/components/ScreenStack.web.d.ts +4 -0
  472. package/lib/typescript/components/ScreenStack.web.d.ts.map +1 -0
  473. package/lib/typescript/components/ScreenStackHeaderConfig.d.ts +13 -0
  474. package/lib/typescript/components/ScreenStackHeaderConfig.d.ts.map +1 -0
  475. package/lib/typescript/components/ScreenStackHeaderConfig.web.d.ts +13 -0
  476. package/lib/typescript/components/ScreenStackHeaderConfig.web.d.ts.map +1 -0
  477. package/lib/typescript/components/ScreenStackItem.d.ts +11 -0
  478. package/lib/typescript/components/ScreenStackItem.d.ts.map +1 -0
  479. package/lib/typescript/components/SearchBar.d.ts +5 -0
  480. package/lib/typescript/components/SearchBar.d.ts.map +1 -0
  481. package/lib/typescript/components/SearchBar.web.d.ts +4 -0
  482. package/lib/typescript/components/SearchBar.web.d.ts.map +1 -0
  483. package/lib/typescript/components/helpers/DelayedFreeze.d.ts +8 -0
  484. package/lib/typescript/components/helpers/DelayedFreeze.d.ts.map +1 -0
  485. package/lib/typescript/components/helpers/usePrevious.d.ts +2 -0
  486. package/lib/typescript/components/helpers/usePrevious.d.ts.map +1 -0
  487. package/lib/typescript/contexts.d.ts +5 -0
  488. package/lib/typescript/contexts.d.ts.map +1 -0
  489. package/lib/typescript/core.d.ts +6 -0
  490. package/lib/typescript/core.d.ts.map +1 -0
  491. package/lib/typescript/fabric/FullWindowOverlayNativeComponent.d.ts +1 -1
  492. package/lib/typescript/fabric/FullWindowOverlayNativeComponent.d.ts.map +1 -0
  493. package/lib/typescript/fabric/ModalScreenNativeComponent.d.ts +76 -0
  494. package/lib/typescript/fabric/ModalScreenNativeComponent.d.ts.map +1 -0
  495. package/lib/typescript/fabric/NativeScreensModule.d.ts +6 -0
  496. package/lib/typescript/fabric/NativeScreensModule.d.ts.map +1 -0
  497. package/lib/typescript/fabric/NativeScreensModule.web.d.ts +3 -0
  498. package/lib/typescript/fabric/NativeScreensModule.web.d.ts.map +1 -0
  499. package/lib/typescript/fabric/ScreenContainerNativeComponent.d.ts +1 -0
  500. package/lib/typescript/fabric/ScreenContainerNativeComponent.d.ts.map +1 -0
  501. package/lib/typescript/fabric/ScreenContentWrapperNativeComponent.d.ts +6 -0
  502. package/lib/typescript/fabric/ScreenContentWrapperNativeComponent.d.ts.map +1 -0
  503. package/lib/typescript/fabric/ScreenFooterNativeComponent.d.ts +7 -0
  504. package/lib/typescript/fabric/ScreenFooterNativeComponent.d.ts.map +1 -0
  505. package/lib/typescript/fabric/ScreenNativeComponent.d.ts +34 -24
  506. package/lib/typescript/fabric/ScreenNativeComponent.d.ts.map +1 -0
  507. package/lib/typescript/fabric/ScreenNavigationContainerNativeComponent.d.ts +1 -1
  508. package/lib/typescript/fabric/ScreenNavigationContainerNativeComponent.d.ts.map +1 -0
  509. package/lib/typescript/fabric/ScreenStackHeaderConfigNativeComponent.d.ts +12 -2
  510. package/lib/typescript/fabric/ScreenStackHeaderConfigNativeComponent.d.ts.map +1 -0
  511. package/lib/typescript/fabric/ScreenStackHeaderSubviewNativeComponent.d.ts +2 -2
  512. package/lib/typescript/fabric/ScreenStackHeaderSubviewNativeComponent.d.ts.map +1 -0
  513. package/lib/typescript/fabric/ScreenStackNativeComponent.d.ts +4 -2
  514. package/lib/typescript/fabric/ScreenStackNativeComponent.d.ts.map +1 -0
  515. package/lib/typescript/fabric/SearchBarNativeComponent.d.ts +17 -16
  516. package/lib/typescript/fabric/SearchBarNativeComponent.d.ts.map +1 -0
  517. package/lib/typescript/gesture-handler/GestureDetectorProvider.d.ts +5 -0
  518. package/lib/typescript/gesture-handler/GestureDetectorProvider.d.ts.map +1 -0
  519. package/lib/typescript/gesture-handler/RNScreensTurboModule.d.ts +13 -0
  520. package/lib/typescript/gesture-handler/RNScreensTurboModule.d.ts.map +1 -0
  521. package/lib/typescript/gesture-handler/ScreenGestureDetector.d.ts +5 -0
  522. package/lib/typescript/gesture-handler/ScreenGestureDetector.d.ts.map +1 -0
  523. package/lib/typescript/gesture-handler/constraints.d.ts +6 -0
  524. package/lib/typescript/gesture-handler/constraints.d.ts.map +1 -0
  525. package/lib/typescript/gesture-handler/defaults.d.ts +20 -0
  526. package/lib/typescript/gesture-handler/defaults.d.ts.map +1 -0
  527. package/lib/typescript/gesture-handler/fabricUtils.d.ts +10 -0
  528. package/lib/typescript/gesture-handler/fabricUtils.d.ts.map +1 -0
  529. package/lib/typescript/gesture-handler/fabricUtils.web.d.ts +6 -0
  530. package/lib/typescript/gesture-handler/fabricUtils.web.d.ts.map +1 -0
  531. package/lib/typescript/gesture-handler/index.d.ts +2 -0
  532. package/lib/typescript/gesture-handler/index.d.ts.map +1 -0
  533. package/lib/typescript/index.d.ts +25 -31
  534. package/lib/typescript/index.d.ts.map +1 -0
  535. package/lib/typescript/native-stack/contexts/GHContext.d.ts +4 -0
  536. package/lib/typescript/native-stack/contexts/GHContext.d.ts.map +1 -0
  537. package/lib/typescript/native-stack/index.d.ts +1 -0
  538. package/lib/typescript/native-stack/index.d.ts.map +1 -0
  539. package/lib/typescript/native-stack/navigators/createNativeStackNavigator.d.ts +4 -0
  540. package/lib/typescript/native-stack/navigators/createNativeStackNavigator.d.ts.map +1 -0
  541. package/lib/typescript/native-stack/types.d.ts +191 -33
  542. package/lib/typescript/native-stack/types.d.ts.map +1 -0
  543. package/lib/typescript/native-stack/utils/AnimatedHeaderHeightContext.d.ts +1 -0
  544. package/lib/typescript/native-stack/utils/AnimatedHeaderHeightContext.d.ts.map +1 -0
  545. package/lib/typescript/native-stack/utils/HeaderHeightContext.d.ts +1 -0
  546. package/lib/typescript/native-stack/utils/HeaderHeightContext.d.ts.map +1 -0
  547. package/lib/typescript/native-stack/utils/SafeAreaProviderCompat.d.ts +2 -1
  548. package/lib/typescript/native-stack/utils/SafeAreaProviderCompat.d.ts.map +1 -0
  549. package/lib/typescript/native-stack/utils/getDefaultHeaderHeight.d.ts +3 -2
  550. package/lib/typescript/native-stack/utils/getDefaultHeaderHeight.d.ts.map +1 -0
  551. package/lib/typescript/native-stack/utils/getStatusBarHeight.d.ts +3 -0
  552. package/lib/typescript/native-stack/utils/getStatusBarHeight.d.ts.map +1 -0
  553. package/lib/typescript/native-stack/utils/useAnimatedHeaderHeight.d.ts +2 -1
  554. package/lib/typescript/native-stack/utils/useAnimatedHeaderHeight.d.ts.map +1 -0
  555. package/lib/typescript/native-stack/utils/useBackPressSubscription.d.ts +1 -0
  556. package/lib/typescript/native-stack/utils/useBackPressSubscription.d.ts.map +1 -0
  557. package/lib/typescript/native-stack/utils/useHeaderHeight.d.ts +1 -0
  558. package/lib/typescript/native-stack/utils/useHeaderHeight.d.ts.map +1 -0
  559. package/lib/typescript/native-stack/views/FontProcessor.d.ts +1 -0
  560. package/lib/typescript/native-stack/views/FontProcessor.d.ts.map +1 -0
  561. package/lib/typescript/native-stack/views/FooterComponent.d.ts +7 -0
  562. package/lib/typescript/native-stack/views/FooterComponent.d.ts.map +1 -0
  563. package/lib/typescript/native-stack/views/HeaderConfig.d.ts +3 -2
  564. package/lib/typescript/native-stack/views/HeaderConfig.d.ts.map +1 -0
  565. package/lib/typescript/native-stack/views/NativeStackView.d.ts +2 -1
  566. package/lib/typescript/native-stack/views/NativeStackView.d.ts.map +1 -0
  567. package/lib/typescript/reanimated/ReanimatedHeaderHeightContext.d.ts +1 -0
  568. package/lib/typescript/reanimated/ReanimatedHeaderHeightContext.d.ts.map +1 -0
  569. package/lib/typescript/reanimated/ReanimatedNativeStackScreen.d.ts +3 -3
  570. package/lib/typescript/reanimated/ReanimatedNativeStackScreen.d.ts.map +1 -0
  571. package/lib/typescript/reanimated/ReanimatedScreen.d.ts +3 -3
  572. package/lib/typescript/reanimated/ReanimatedScreen.d.ts.map +1 -0
  573. package/lib/typescript/reanimated/ReanimatedScreenProvider.d.ts +1 -0
  574. package/lib/typescript/reanimated/ReanimatedScreenProvider.d.ts.map +1 -0
  575. package/lib/typescript/reanimated/ReanimatedTransitionProgressContext.d.ts +2 -1
  576. package/lib/typescript/reanimated/ReanimatedTransitionProgressContext.d.ts.map +1 -0
  577. package/lib/typescript/reanimated/index.d.ts +1 -0
  578. package/lib/typescript/reanimated/index.d.ts.map +1 -0
  579. package/lib/typescript/reanimated/useReanimatedHeaderHeight.d.ts +2 -3
  580. package/lib/typescript/reanimated/useReanimatedHeaderHeight.d.ts.map +1 -0
  581. package/lib/typescript/reanimated/useReanimatedTransitionProgress.d.ts +4 -9
  582. package/lib/typescript/reanimated/useReanimatedTransitionProgress.d.ts.map +1 -0
  583. package/lib/typescript/types.d.ts +186 -36
  584. package/lib/typescript/types.d.ts.map +1 -0
  585. package/lib/typescript/useTransitionProgress.d.ts +4 -3
  586. package/lib/typescript/useTransitionProgress.d.ts.map +1 -0
  587. package/lib/typescript/utils.d.ts +27 -1
  588. package/lib/typescript/utils.d.ts.map +1 -0
  589. package/native-stack/README.md +156 -108
  590. package/native-stack/package.json +4 -4
  591. package/package.json +1 -1
  592. package/react-native.config.js +19 -16
  593. package/reanimated/package.json +1 -1
  594. package/src/TransitionProgressContext.tsx +3 -1
  595. package/src/components/DebugContainer.tsx +46 -0
  596. package/src/components/DebugContainer.web.tsx +7 -0
  597. package/src/components/FullWindowOverlay.tsx +33 -0
  598. package/src/components/FullWindowOverlay.web.tsx +6 -0
  599. package/src/components/Screen.tsx +392 -0
  600. package/src/components/Screen.web.tsx +46 -0
  601. package/src/components/ScreenContainer.tsx +28 -0
  602. package/src/components/ScreenContainer.web.tsx +5 -0
  603. package/src/components/ScreenContentWrapper.tsx +9 -0
  604. package/src/components/ScreenContentWrapper.web.tsx +5 -0
  605. package/src/components/ScreenFooter.tsx +20 -0
  606. package/src/components/ScreenFooter.web.tsx +7 -0
  607. package/src/components/ScreenStack.tsx +112 -0
  608. package/src/components/ScreenStack.web.tsx +5 -0
  609. package/src/components/ScreenStackHeaderConfig.tsx +122 -0
  610. package/src/components/ScreenStackHeaderConfig.web.tsx +39 -0
  611. package/src/components/ScreenStackItem.tsx +174 -0
  612. package/src/components/SearchBar.tsx +102 -0
  613. package/src/components/SearchBar.web.tsx +5 -0
  614. package/src/components/helpers/DelayedFreeze.tsx +27 -0
  615. package/src/components/helpers/usePrevious.tsx +11 -0
  616. package/src/contexts.tsx +9 -0
  617. package/src/core.ts +45 -0
  618. package/src/fabric/FullWindowOverlayNativeComponent.ts +16 -0
  619. package/src/fabric/ModalScreenNativeComponent.ts +115 -0
  620. package/src/fabric/NativeScreensModule.ts +8 -0
  621. package/src/fabric/NativeScreensModule.web.ts +1 -0
  622. package/src/fabric/ScreenContainerNativeComponent.ts +3 -3
  623. package/src/fabric/ScreenContentWrapperNativeComponent.ts +14 -0
  624. package/src/fabric/ScreenFooterNativeComponent.ts +6 -0
  625. package/src/fabric/ScreenNativeComponent.ts +34 -23
  626. package/src/fabric/ScreenNavigationContainerNativeComponent.ts +3 -1
  627. package/src/fabric/ScreenStackHeaderConfigNativeComponent.ts +38 -2
  628. package/src/fabric/ScreenStackHeaderSubviewNativeComponent.ts +5 -1
  629. package/src/fabric/ScreenStackNativeComponent.ts +3 -2
  630. package/src/fabric/SearchBarNativeComponent.ts +17 -13
  631. package/src/gesture-handler/GestureDetectorProvider.tsx +16 -0
  632. package/src/gesture-handler/RNScreensTurboModule.ts +13 -0
  633. package/src/gesture-handler/ScreenGestureDetector.tsx +241 -0
  634. package/src/gesture-handler/constraints.ts +87 -0
  635. package/src/gesture-handler/defaults.ts +46 -0
  636. package/src/gesture-handler/fabricUtils.ts +86 -0
  637. package/src/gesture-handler/fabricUtils.web.ts +10 -0
  638. package/src/gesture-handler/index.tsx +4 -0
  639. package/src/index.tsx +49 -113
  640. package/src/native-stack/contexts/GHContext.tsx +9 -0
  641. package/src/native-stack/navigators/createNativeStackNavigator.tsx +6 -3
  642. package/src/native-stack/types.tsx +204 -31
  643. package/src/native-stack/utils/getDefaultHeaderHeight.tsx +2 -2
  644. package/src/native-stack/utils/getStatusBarHeight.tsx +22 -0
  645. package/src/native-stack/utils/useAnimatedHeaderHeight.tsx +1 -1
  646. package/src/native-stack/utils/useBackPressSubscription.tsx +1 -1
  647. package/src/native-stack/utils/useHeaderHeight.tsx +1 -1
  648. package/src/native-stack/views/FontProcessor.tsx +2 -2
  649. package/src/native-stack/views/FooterComponent.tsx +10 -0
  650. package/src/native-stack/views/HeaderConfig.tsx +20 -5
  651. package/src/native-stack/views/NativeStackView.tsx +137 -53
  652. package/src/reanimated/ReanimatedHeaderHeightContext.tsx +1 -1
  653. package/src/reanimated/ReanimatedNativeStackScreen.tsx +15 -13
  654. package/src/reanimated/ReanimatedScreen.tsx +4 -3
  655. package/src/reanimated/ReanimatedScreenProvider.tsx +3 -2
  656. package/src/reanimated/useReanimatedHeaderHeight.tsx +2 -2
  657. package/src/reanimated/useReanimatedTransitionProgress.tsx +1 -1
  658. package/src/types.tsx +210 -40
  659. package/src/useTransitionProgress.tsx +1 -1
  660. package/src/utils.ts +27 -5
  661. package/windows/README.md +4 -1
  662. package/windows/RNScreens/Screen.h +3 -1
  663. package/SystemBundles/4a5c11b5bb8dfc0553e927a2c8678e1dbd4a75220fe24dfbdba59b5550215de6.bundle +0 -33681
  664. package/SystemBundles/4a5c11b5bb8dfc0553e927a2c8678e1dbd4a75220fe24dfbdba59b5550215de6.map +0 -1
  665. package/SystemModules/amzn__react-native-screens.modules.txt +0 -101
  666. package/SystemModules/amzn__react-native-screens.private.modules.txt +0 -244
  667. package/lib/commonjs/index.native.js +0 -409
  668. package/lib/commonjs/index.native.js.map +0 -1
  669. package/lib/module/index.native.js +0 -412
  670. package/lib/module/index.native.js.map +0 -1
  671. package/lib/typescript/index.native.d.ts +0 -2
  672. package/src/index.native.tsx +0 -601
@@ -24,6 +24,7 @@ import {
24
24
  // amznmod_react - change imports to kepler packages
25
25
  } from '@amazon-devices/react-navigation__native';
26
26
  import * as React from 'react';
27
+ import { PropsWithChildren } from 'react';
27
28
  import {
28
29
  ImageSourcePropType,
29
30
  StyleProp,
@@ -31,12 +32,15 @@ import {
31
32
  ColorValue,
32
33
  } from 'react-native';
33
34
  import {
35
+ GestureDetectorBridge,
34
36
  ScreenProps,
35
37
  ScreenStackHeaderConfigProps,
36
38
  SearchBarProps,
37
- SheetDetentTypes,
38
- } from '@amazon-devices/react-native-screens';
39
+ } from '../types';
39
40
 
41
+ /**
42
+ * @deprecated NativeStack has been moved from react-native-screens/native-stack to @react-navigation/native since version v6. With react-native-screens v4 native stack v5 (react-native-screens/native-stack) is deprecated and marked for removal in the upcoming minor release, react-native-screens v4 will support only @react-navigation/native-stack v7.
43
+ */
40
44
  export type NativeStackNavigationEventMap = {
41
45
  /**
42
46
  * Event which fires when the screen appears.
@@ -64,11 +68,23 @@ export type NativeStackNavigationEventMap = {
64
68
  * Event which fires when a header height gets changed.
65
69
  */
66
70
  headerHeightChange: { data: { headerHeight: number } };
71
+ /**
72
+ * Event which fires when screen is in sheet presentation & it's detent changes.
73
+ *
74
+ * In payload it caries two fields:
75
+ *
76
+ * * index - current detent index in the `sheetAllowedDetents` array,
77
+ * * isStable - on Android `false` value means that the user is dragging the sheet or it is settling; on iOS it is always `true`.
78
+ */
79
+ sheetDetentChange: { data: { index: number; isStable: boolean } };
67
80
  };
68
81
 
82
+ /**
83
+ * @deprecated NativeStack has been moved from react-native-screens/native-stack to @react-navigation/native since version v6. With react-native-screens v4 native stack v5 (react-native-screens/native-stack) is deprecated and marked for removal in the upcoming minor release, react-native-screens v4 will support only @react-navigation/native-stack v7.
84
+ */
69
85
  export type NativeStackNavigationProp<
70
86
  ParamList extends ParamListBase,
71
- RouteName extends keyof ParamList = string
87
+ RouteName extends keyof ParamList = string,
72
88
  > = NavigationProp<
73
89
  ParamList,
74
90
  RouteName,
@@ -79,23 +95,34 @@ export type NativeStackNavigationProp<
79
95
  > &
80
96
  StackActionHelpers<ParamList>;
81
97
 
98
+ /**
99
+ * @deprecated NativeStack has been moved from react-native-screens/native-stack to @react-navigation/native since version v6. With react-native-screens v4 native stack v5 (react-native-screens/native-stack) is deprecated and marked for removal in the upcoming minor release, react-native-screens v4 will support only @react-navigation/native-stack v7.
100
+ */
82
101
  export type NativeStackScreenProps<
83
102
  ParamList extends ParamListBase,
84
- RouteName extends keyof ParamList = string
103
+ RouteName extends keyof ParamList = string,
85
104
  > = {
86
105
  navigation: NativeStackNavigationProp<ParamList, RouteName>;
87
106
  route: RouteProp<ParamList, RouteName>;
88
107
  };
89
108
 
109
+ /**
110
+ * @deprecated NativeStack has been moved from react-native-screens/native-stack to @react-navigation/native since version v6. With react-native-screens v4 native stack v5 (react-native-screens/native-stack) is deprecated and marked for removal in the upcoming minor release, react-native-screens v4 will support only @react-navigation/native-stack v7.
111
+ */
90
112
  export type NativeStackNavigationHelpers = NavigationHelpers<
91
113
  ParamListBase,
92
114
  NativeStackNavigationEventMap
93
115
  >;
94
116
 
95
- // We want it to be an empty object beacuse navigator does not have any additional config
96
- // eslint-disable-next-line @typescript-eslint/ban-types
97
- export type NativeStackNavigationConfig = {};
117
+ /**
118
+ * We want it to be an empty object beacuse navigator does not have any additional config
119
+ * @deprecated NativeStack has been moved from react-native-screens/native-stack to @react-navigation/native since version v6. With react-native-screens v4 native stack v5 (react-native-screens/native-stack) is deprecated and marked for removal in the upcoming minor release, react-native-screens v4 will support only @react-navigation/native-stack v7.
120
+ */
121
+ export type NativeStackNavigationConfig = {}; // eslint-disable-line @typescript-eslint/ban-types
98
122
 
123
+ /**
124
+ * @deprecated NativeStack has been moved from react-native-screens/native-stack to @react-navigation/native since version v6. With react-native-screens v4 native stack v5 (react-native-screens/native-stack) is deprecated and marked for removal in the upcoming minor release, react-native-screens v4 will support only @react-navigation/native-stack v7.
125
+ */
99
126
  export type NativeStackNavigationOptions = {
100
127
  /**
101
128
  * Image to display in the header as the back button.
@@ -108,6 +135,8 @@ export type NativeStackNavigationOptions = {
108
135
  backButtonInCustomView?: boolean;
109
136
  /**
110
137
  * Style object for the scene content.
138
+ *
139
+ * As a workaround to truncated sheet content, formSheet uses backgroundColor from contentStyle and applies it on Screen.
111
140
  */
112
141
  contentStyle?: StyleProp<ViewStyle>;
113
142
  /**
@@ -125,6 +154,15 @@ export type NativeStackNavigationOptions = {
125
154
  * @platform ios
126
155
  */
127
156
  disableBackButtonMenu?: boolean;
157
+ /**
158
+ * How the back button behaves by default (when not customized). Available on iOS>=14, and is used only when none of: `backTitleFontFamily`, `backTitleFontSize`, `disableBackButtonMenu` or `backTitle` is set.
159
+ * The following values are currently supported (they correspond to https://developer.apple.com/documentation/uikit/uinavigationitembackbuttondisplaymode?language=objc):
160
+ * - "default" – show given back button previous controller title, system generic or just icon based on available space
161
+ * - "generic" – show given system generic or just icon based on available space
162
+ * - "minimal" – show just an icon
163
+ * @platform ios
164
+ */
165
+ backButtonDisplayMode?: ScreenStackHeaderConfigProps['backButtonDisplayMode'];
128
166
  /**
129
167
  * Whether inactive screens should be suspended from re-rendering. Defaults to `false`.
130
168
  * Defaults to `true` when `enableFreeze()` is run at the top of the application.
@@ -138,6 +176,16 @@ export type NativeStackNavigationOptions = {
138
176
  * @platform ios
139
177
  */
140
178
  fullScreenSwipeEnabled?: boolean;
179
+ /**
180
+ * Whether the full screen dismiss gesture has shadow under view during transition. The gesture uses custom transition and thus
181
+ * doesn't have a shadow by default. When enabled, a custom shadow view is added during the transition which tries to mimic the
182
+ * default iOS shadow. Defaults to `true`.
183
+ *
184
+ * This does not affect the behavior of transitions that don't use gestures, enabled by `fullScreenGestureEnabled` prop.
185
+ *
186
+ * @platform ios
187
+ */
188
+ fullScreenSwipeShadowEnabled?: boolean;
141
189
  /**
142
190
  * Whether you can use gestures to dismiss this screen. Defaults to `true`.
143
191
  * Only supported on iOS.
@@ -309,6 +357,12 @@ export type NativeStackNavigationOptions = {
309
357
  * @platform android
310
358
  */
311
359
  navigationBarColor?: ColorValue;
360
+ /**
361
+ * Boolean indicating whether the content should be visible behind the navigation bar. Defaults to `false`.
362
+ *
363
+ * @platform android
364
+ */
365
+ navigationBarTranslucent?: boolean;
312
366
  /**
313
367
  * Sets the visibility of the navigation bar. Defaults to `false`.
314
368
  *
@@ -342,17 +396,24 @@ export type NativeStackNavigationOptions = {
342
396
  /**
343
397
  * Describes heights where a sheet can rest.
344
398
  * Works only when `stackPresentation` is set to `formSheet`.
345
- * Defaults to `large`.
346
399
  *
347
- * Available values:
400
+ * Heights should be described as fraction (a number from [0, 1] interval) of screen height / maximum detent height.
348
401
  *
349
- * - `large` - only large detent level will be allowed
350
- * - `medium` - only medium detent level will be allowed
351
- * - `all` - all detent levels will be allowed
402
+ * Please note that the array **must** be sorted in ascending order.
352
403
  *
353
- * @platform ios
404
+ * Defaults to `[1.0]` literal.
405
+ */
406
+ sheetAllowedDetents?: ScreenProps['sheetAllowedDetents'] | 'fitToContents';
407
+ /**
408
+ * Integer value describing elevation of the sheet, impacting shadow on the top edge of the sheet.
409
+ *
410
+ * Not dynamic.
411
+ *
412
+ * Defaults to `24`.
413
+ *
414
+ * @platform Android
354
415
  */
355
- sheetAllowedDetents?: SheetDetentTypes;
416
+ sheetElevation?: ScreenProps['sheetElevation'];
356
417
  /**
357
418
  * Whether the sheet should expand to larger detent when scrolling.
358
419
  * Works only when `stackPresentation` is set to `formSheet`.
@@ -360,7 +421,7 @@ export type NativeStackNavigationOptions = {
360
421
  *
361
422
  * @platform ios
362
423
  */
363
- sheetExpandsWhenScrolledToEdge?: boolean;
424
+ sheetExpandsWhenScrolledToEdge?: ScreenProps['sheetExpandsWhenScrolledToEdge'];
364
425
  /**
365
426
  * The corner radius that the sheet will try to render with.
366
427
  * Works only when `stackPresentation` is set to `formSheet`.
@@ -368,10 +429,8 @@ export type NativeStackNavigationOptions = {
368
429
  * If set to non-negative value it will try to render sheet with provided radius, else it will apply system default.
369
430
  *
370
431
  * If left unset system default is used.
371
- *
372
- * @platform ios
373
432
  */
374
- sheetCornerRadius?: number;
433
+ sheetCornerRadius?: ScreenProps['sheetCornerRadius'];
375
434
  /**
376
435
  * Boolean indicating whether the sheet shows a grabber at the top.
377
436
  * Works only when `stackPresentation` is set to `formSheet`.
@@ -379,22 +438,32 @@ export type NativeStackNavigationOptions = {
379
438
  *
380
439
  * @platform ios
381
440
  */
382
- sheetGrabberVisible?: boolean;
441
+ sheetGrabberVisible?: ScreenProps['sheetGrabberVisible'];
442
+ /**
443
+ * Index of the detent the sheet should expand to after being opened.
444
+ * Works only when `stackPresentation` is set to `formSheet`.
445
+ *
446
+ * Defaults to `0` - which represents first detent in the detents array.
447
+ */
448
+ sheetInitialDetentIndex?: ScreenProps['sheetInitialDetentIndex'];
383
449
  /**
384
450
  * The largest sheet detent for which a view underneath won't be dimmed.
385
- * Works only when `stackPresentation` is se tto `formSheet`.
451
+ * Works only when `stackPresentation` is set to `formSheet`.
386
452
  *
387
- * If this prop is set to:
453
+ * This prop can be set to an number, which indicates index of detent in `sheetAllowedDetents` array for which
454
+ * there won't be a dimming view beneath the sheet.
388
455
  *
389
- * - `large` - the view underneath won't be dimmed at any detent level
390
- * - `medium` - the view underneath will be dimmed only when detent level is `large`
391
- * - `all` - the view underneath will be dimmed for any detent level
456
+ * Additionaly there are following options available:
392
457
  *
393
- * Defaults to `all`.
458
+ * * `none` - there will be dimming view for all detents levels,
459
+ * * `largest` - there won't be a dimming view for any detent level.
394
460
  *
395
- * @platform ios
461
+ * There also legacy & **deprecated** prop values available: `medium`, `large` (don't confuse with `largest`), `all`, which work in tandem with
462
+ * corresponding legacy prop values for `sheetAllowedDetents` prop.
463
+ *
464
+ * Defaults to `none`, indicating that the dimming view should be always present.
396
465
  */
397
- sheetLargestUndimmedDetent?: SheetDetentTypes;
466
+ sheetLargestUndimmedDetentIndex?: ScreenProps['sheetLargestUndimmedDetentIndex'];
398
467
  /**
399
468
  * How the screen should appear/disappear when pushed or popped at the top of the stack.
400
469
  * The following values are currently supported:
@@ -402,10 +471,12 @@ export type NativeStackNavigationOptions = {
402
471
  * - "fade" – fades screen in or out
403
472
  * - "fade_from_bottom" – performs a fade from bottom animation
404
473
  * - "flip" – flips the screen, requires stackPresentation: "modal" (iOS only)
405
- * - "simple_push" – performs a default animation, but without shadow and native header transition (iOS only)
474
+ * - "simple_push" – performs a default animation, but without native header transition (iOS only)
406
475
  * - "slide_from_bottom" – performs a slide from bottom animation
407
476
  * - "slide_from_right" - slide in the new screen from right to left (Android only, resolves to default transition on iOS)
408
- * - "slide_from_left" - slide in the new screen from left to right (Android only, resolves to default transition on iOS)
477
+ * - "slide_from_left" - slide in the new screen from left to right
478
+ * - "ios_from_right" - iOS like slide in animation. pushes in the new screen from right to left (Android only, resolves to default transition on iOS)
479
+ * - "ios_from_left" - iOS like slide in animation. pushes in the new screen from left to right (Android only, resolves to default transition on iOS)
409
480
  * - "none" – the screen appears/dissapears without an animation
410
481
  */
411
482
  stackAnimation?: ScreenProps['stackAnimation'];
@@ -459,21 +530,43 @@ export type NativeStackNavigationOptions = {
459
530
  */
460
531
  title?: string;
461
532
  /**
462
- * Changes the duration (in milliseconds) of `slide_from_bottom`, `fade_from_bottom`, `fade` and `simple_push` transitions on iOS. Defaults to `350`.
533
+ * Changes the duration (in milliseconds) of `slide_from_bottom`, `fade_from_bottom`, `fade` and `simple_push` transitions on iOS. Defaults to `500`.
463
534
  * The duration of `default` and `flip` transitions isn't customizable.
464
535
  *
465
536
  * @platform ios
466
537
  */
467
538
  transitionDuration?: number;
539
+
540
+ goBackGesture?: GoBackGesture;
541
+ transitionAnimation?: AnimatedScreenTransition;
542
+ screenEdgeGesture?: boolean;
543
+ /**
544
+ * Footer component that can be used alongside form sheet stack presentation style.
545
+ *
546
+ * This option is provided, because due to implementation details it might be problematic
547
+ * to implement such layout with JS-only code.
548
+ *
549
+ * Please note that this prop is marked as unstable and might be subject of breaking changes,
550
+ * even removal.
551
+ *
552
+ * @platform android
553
+ */
554
+ unstable_sheetFooter?: () => React.ReactNode;
468
555
  };
469
556
 
557
+ /**
558
+ * @deprecated NativeStack has been moved from react-native-screens/native-stack to @react-navigation/native since version v6. With react-native-screens v4 native stack v5 (react-native-screens/native-stack) is deprecated and marked for removal in the upcoming minor release, react-native-screens v4 will support only @react-navigation/native-stack v7.
559
+ */
470
560
  export type NativeStackNavigatorProps =
471
561
  //@ts-ignore
472
562
  DefaultNavigatorOptions<NativeStackNavigationOptions> &
473
563
  StackRouterOptions &
474
564
  NativeStackNavigationConfig;
475
565
 
476
- //@ts-ignore
566
+ /**
567
+ * @deprecated NativeStack has been moved from react-native-screens/native-stack to @react-navigation/native since version v6. With react-native-screens v4 native stack v5 (react-native-screens/native-stack) is deprecated and marked for removal in the upcoming minor release, react-native-screens v4 will support only @react-navigation/native-stack v7.
568
+ */
569
+ //@ts-ignore
477
570
  export type NativeStackDescriptor = Descriptor<
478
571
  ParamListBase,
479
572
  string,
@@ -481,6 +574,86 @@ export type NativeStackDescriptor = Descriptor<
481
574
  NativeStackNavigationOptions
482
575
  >;
483
576
 
577
+ /**
578
+ * @deprecated NativeStack has been moved from react-native-screens/native-stack to @react-navigation/native since version v6. With react-native-screens v4 native stack v5 (react-native-screens/native-stack) is deprecated and marked for removal in the upcoming minor release, react-native-screens v4 will support only @react-navigation/native-stack v7.
579
+ */
484
580
  export type NativeStackDescriptorMap = {
485
581
  [key: string]: NativeStackDescriptor;
486
582
  };
583
+
584
+ /**
585
+ * Those below copied to src/types.ts should be removed with next minor and native-stack v5 removal
586
+ */
587
+
588
+ /**
589
+ * copy from GestureHandler to avoid strong dependency
590
+ * @deprecated NativeStack has been moved from react-native-screens/native-stack to @react-navigation/native since version v6. With react-native-screens v4 native stack v5 (react-native-screens/native-stack) is deprecated and marked for removal in the upcoming minor release, react-native-screens v4 will support only @react-navigation/native-stack v7.
591
+ */
592
+ export type PanGestureHandlerEventPayload = {
593
+ x: number;
594
+ y: number;
595
+ absoluteX: number;
596
+ absoluteY: number;
597
+ translationX: number;
598
+ translationY: number;
599
+ velocityX: number;
600
+ velocityY: number;
601
+ };
602
+
603
+ /**
604
+ * copy from Reanimated to avoid strong dependency
605
+ * @deprecated NativeStack has been moved from react-native-screens/native-stack to @react-navigation/native since version v6. With react-native-screens v4 native stack v5 (react-native-screens/native-stack) is deprecated and marked for removal in the upcoming minor release, react-native-screens v4 will support only @react-navigation/native-stack v7.
606
+ */
607
+ export type GoBackGesture =
608
+ | 'swipeRight'
609
+ | 'swipeLeft'
610
+ | 'swipeUp'
611
+ | 'swipeDown'
612
+ | 'verticalSwipe'
613
+ | 'horizontalSwipe'
614
+ | 'twoDimensionalSwipe';
615
+
616
+ /**
617
+ * @deprecated NativeStack has been moved from react-native-screens/native-stack to @react-navigation/native since version v6. With react-native-screens v4 native stack v5 (react-native-screens/native-stack) is deprecated and marked for removal in the upcoming minor release, react-native-screens v4 will support only @react-navigation/native-stack v7.
618
+ */
619
+ export interface MeasuredDimensions {
620
+ x: number;
621
+ y: number;
622
+ width: number;
623
+ height: number;
624
+ pageX: number;
625
+ pageY: number;
626
+ }
627
+
628
+ /**
629
+ * @deprecated NativeStack has been moved from react-native-screens/native-stack to @react-navigation/native since version v6. With react-native-screens v4 native stack v5 (react-native-screens/native-stack) is deprecated and marked for removal in the upcoming minor release, react-native-screens v4 will support only @react-navigation/native-stack v7.
630
+ */
631
+ export type AnimatedScreenTransition = {
632
+ topScreenStyle: (
633
+ event: PanGestureHandlerEventPayload,
634
+ screenSize: MeasuredDimensions,
635
+ ) => Record<string, unknown>;
636
+ belowTopScreenStyle: (
637
+ event: PanGestureHandlerEventPayload,
638
+ screenSize: MeasuredDimensions,
639
+ ) => Record<string, unknown>;
640
+ };
641
+
642
+ /**
643
+ * @deprecated NativeStack has been moved from react-native-screens/native-stack to @react-navigation/native since version v6. With react-native-screens v4 native stack v5 (react-native-screens/native-stack) is deprecated and marked for removal in the upcoming minor release, react-native-screens v4 will support only @react-navigation/native-stack v7.
644
+ */
645
+ export type ScreensRefsHolder = React.MutableRefObject<
646
+ Record<string, React.MutableRefObject<React.Ref<React.Component>>>
647
+ >;
648
+
649
+ /**
650
+ * @deprecated NativeStack has been moved from react-native-screens/native-stack to @react-navigation/native since version v6. With react-native-screens v4 native stack v5 (react-native-screens/native-stack) is deprecated and marked for removal in the upcoming minor release, react-native-screens v4 will support only @react-navigation/native-stack v7.
651
+ */
652
+ export type GestureProviderProps = PropsWithChildren<{
653
+ gestureDetectorBridge: React.MutableRefObject<GestureDetectorBridge>;
654
+ screensRefs: ScreensRefsHolder;
655
+ currentRouteKey: string;
656
+ goBackGesture: GoBackGesture | undefined;
657
+ transitionAnimation: AnimatedScreenTransition | undefined;
658
+ screenEdgeGesture: boolean | undefined;
659
+ }>;
@@ -1,5 +1,5 @@
1
1
  import { Platform } from 'react-native';
2
- import { StackPresentationTypes } from '@amazon-devices/react-native-screens';
2
+ import { StackPresentationTypes } from '../../types';
3
3
  type Layout = { width: number; height: number };
4
4
 
5
5
  const formSheetModalHeight = 56;
@@ -8,7 +8,7 @@ export default function getDefaultHeaderHeight(
8
8
  layout: Layout,
9
9
  statusBarHeight: number,
10
10
  stackPresentation: StackPresentationTypes,
11
- isLargeHeader = false
11
+ isLargeHeader = false,
12
12
  ): number {
13
13
  // default header heights
14
14
  let headerHeight = Platform.OS === 'android' ? 56 : 64;
@@ -0,0 +1,22 @@
1
+ import { Rect } from 'react-native-safe-area-context';
2
+ import { Platform } from 'react-native';
3
+
4
+ export default function getStatusBarHeight(
5
+ topInset: number,
6
+ dimensions: Rect,
7
+ isStatusBarTranslucent: boolean,
8
+ ) {
9
+ if (Platform.OS === 'ios') {
10
+ // It looks like some iOS devices don't have strictly set status bar height to 44.
11
+ // Thus, if the top inset is higher than 50, then the device should have a dynamic island.
12
+ // On models with Dynamic Island the status bar height is smaller than the safe area top inset by 5 pixels.
13
+ // See https://developer.apple.com/forums/thread/662466 for more details about status bar height.
14
+ const hasDynamicIsland = topInset > 50;
15
+ return hasDynamicIsland ? topInset - 5 : topInset;
16
+ } else if (Platform.OS === 'android') {
17
+ // On Android we should also rely on frame's y-axis position, as topInset is 0 on visible status bar.
18
+ return isStatusBarTranslucent ? topInset : dimensions.y;
19
+ }
20
+
21
+ return topInset;
22
+ }
@@ -7,7 +7,7 @@ export default function useAnimatedHeaderHeight() {
7
7
 
8
8
  if (animatedValue === undefined) {
9
9
  throw new Error(
10
- "Couldn't find the header height. Are you inside a screen in a navigator with a header?"
10
+ "Couldn't find the header height. Are you inside a screen in a navigator with a header?",
11
11
  );
12
12
  }
13
13
 
@@ -35,7 +35,7 @@ export function useBackPressSubscription({
35
35
  subscription.current?.remove();
36
36
  subscription.current = BackHandler.addEventListener(
37
37
  'hardwareBackPress',
38
- onBackPress
38
+ onBackPress,
39
39
  );
40
40
  setIsActive(true);
41
41
  }
@@ -7,7 +7,7 @@ export default function useHeaderHeight() {
7
7
 
8
8
  if (height === undefined) {
9
9
  throw new Error(
10
- "Couldn't find the header height. Are you inside a screen in a navigator with a header?"
10
+ "Couldn't find the header height. Are you inside a screen in a navigator with a header?",
11
11
  );
12
12
  }
13
13
 
@@ -1,9 +1,9 @@
1
1
  // @ts-ignore: No declaration available
2
- // eslint-disable-next-line import/no-named-as-default, import/default, import/no-named-as-default-member, import/namespace
2
+
3
3
  import ReactNativeStyleAttributes from 'react-native/Libraries/Components/View/ReactNativeStyleAttributes';
4
4
 
5
5
  export function processFonts(
6
- fontFamilies: (string | undefined)[]
6
+ fontFamilies: (string | undefined)[],
7
7
  ): (string | undefined)[] {
8
8
  // @ts-ignore: React Native types are incorrect here and don't consider fontFamily a style value
9
9
  const fontFamilyProcessor = ReactNativeStyleAttributes.fontFamily?.process;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import ScreenFooter from '../../components/ScreenFooter';
3
+
4
+ type FooterProps = {
5
+ children?: React.ReactNode;
6
+ };
7
+
8
+ export default function FooterComponent({ children }: FooterProps) {
9
+ return <ScreenFooter collapsable={false}>{children}</ScreenFooter>;
10
+ }
@@ -15,6 +15,11 @@
15
15
  import { Route, useTheme } from '@amazon-devices/react-navigation__native';
16
16
  import * as React from 'react';
17
17
  import { Platform } from 'react-native';
18
+ import { SearchBarProps } from '../../types';
19
+ import {
20
+ isSearchBarAvailableForCurrentPlatform,
21
+ executeNativeBackPress,
22
+ } from '../../utils';
18
23
  import {
19
24
  ScreenStackHeaderBackButtonImage,
20
25
  ScreenStackHeaderCenterView,
@@ -22,14 +27,12 @@ import {
22
27
  ScreenStackHeaderLeftView,
23
28
  ScreenStackHeaderRightView,
24
29
  ScreenStackHeaderSearchBarView,
25
- SearchBar,
26
- SearchBarProps,
27
- isSearchBarAvailableForCurrentPlatform,
28
- executeNativeBackPress,
29
- } from '@amazon-devices/react-native-screens';
30
+ } from '../../components/ScreenStackHeaderConfig';
31
+ import SearchBar from '../../components/SearchBar';
30
32
  import { NativeStackNavigationOptions } from '../types';
31
33
  import { useBackPressSubscription } from '../utils/useBackPressSubscription';
32
34
  import { processFonts } from './FontProcessor';
35
+ import warnOnce from 'warn-once';
33
36
 
34
37
  type Props = NativeStackNavigationOptions & {
35
38
  route: Route<string>;
@@ -40,6 +43,7 @@ export default function HeaderConfig({
40
43
  backButtonInCustomView,
41
44
  direction,
42
45
  disableBackButtonMenu,
46
+ backButtonDisplayMode = 'default',
43
47
  headerBackTitle,
44
48
  headerBackTitleStyle = {},
45
49
  headerBackTitleVisible = true,
@@ -110,6 +114,15 @@ export default function HeaderConfig({
110
114
  return searchBar;
111
115
  }, [searchBar, createSubscription, clearSubscription]);
112
116
 
117
+ // @ts-ignore isVision is not yet in the type definitions (RN 0.74+)
118
+ const isVisionOS = Platform?.isVision;
119
+
120
+ warnOnce(
121
+ isVisionOS &&
122
+ (headerTitleStyle.color !== undefined || headerTintColor !== undefined),
123
+ 'headerTitleStyle.color and headerTintColor are not supported on visionOS.',
124
+ );
125
+
113
126
  return (
114
127
  <ScreenStackHeaderConfig
115
128
  backButtonInCustomView={backButtonInCustomView}
@@ -124,6 +137,7 @@ export default function HeaderConfig({
124
137
  color={tintColor}
125
138
  direction={direction}
126
139
  disableBackButtonMenu={disableBackButtonMenu}
140
+ backButtonDisplayMode={backButtonDisplayMode}
127
141
  hidden={headerShown === false}
128
142
  hideBackButton={headerHideBackButton}
129
143
  hideShadow={headerHideShadow}
@@ -179,6 +193,7 @@ export default function HeaderConfig({
179
193
  {isSearchBarAvailableForCurrentPlatform &&
180
194
  processedSearchBarOptions !== undefined ? (
181
195
  <ScreenStackHeaderSearchBarView>
196
+ {/* @ts-ignore Skip incorrect error about incompatible ref types */}
182
197
  <SearchBar {...processedSearchBarOptions} />
183
198
  </ScreenStackHeaderSearchBarView>
184
199
  ) : null}