react-native-screens 3.28.0 → 3.30.0

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 (448) hide show
  1. package/README.md +7 -7
  2. package/RNScreens.podspec +3 -3
  3. package/android/CMakeLists.txt +27 -0
  4. package/android/build.gradle +21 -2
  5. package/android/src/fabric/java/com/swmansion/rnscreens/FabricEnabledViewGroup.kt +17 -14
  6. package/android/src/main/cpp/jni-adapter.cpp +110 -0
  7. package/android/src/main/java/com/swmansion/rnscreens/CustomSearchView.kt +13 -8
  8. package/android/src/main/java/com/swmansion/rnscreens/FragmentBackPressOverrider.kt +8 -8
  9. package/android/src/main/java/com/swmansion/rnscreens/ModalScreenViewManager.kt +12 -0
  10. package/android/src/main/java/com/swmansion/rnscreens/RNScreensPackage.kt +38 -5
  11. package/android/src/main/java/com/swmansion/rnscreens/Screen.kt +32 -42
  12. package/android/src/main/java/com/swmansion/rnscreens/ScreenContainer.kt +76 -48
  13. package/android/src/main/java/com/swmansion/rnscreens/ScreenFragment.kt +38 -35
  14. package/android/src/main/java/com/swmansion/rnscreens/ScreenStack.kt +43 -37
  15. package/android/src/main/java/com/swmansion/rnscreens/ScreenStackFragment.kt +23 -23
  16. package/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderConfig.kt +73 -71
  17. package/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderConfigViewManager.kt +3 -3
  18. package/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderSubview.kt +5 -5
  19. package/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderSubviewManager.kt +3 -3
  20. package/android/src/main/java/com/swmansion/rnscreens/ScreenStackViewManager.kt +3 -3
  21. package/android/src/main/java/com/swmansion/rnscreens/ScreenViewManager.kt +4 -4
  22. package/android/src/main/java/com/swmansion/rnscreens/ScreenWindowTraits.kt +13 -16
  23. package/android/src/main/java/com/swmansion/rnscreens/ScreensModule.kt +105 -0
  24. package/android/src/main/java/com/swmansion/rnscreens/ScreensShadowNode.kt +2 -2
  25. package/android/src/main/java/com/swmansion/rnscreens/SearchBarManager.kt +1 -0
  26. package/android/src/main/java/com/swmansion/rnscreens/SearchBarView.kt +14 -10
  27. package/android/src/main/java/com/swmansion/rnscreens/SearchViewFormatter.kt +8 -8
  28. package/android/src/main/java/com/swmansion/rnscreens/events/HeaderAttachedEvent.kt +3 -7
  29. package/android/src/main/java/com/swmansion/rnscreens/events/HeaderBackButtonClickedEvent.kt +4 -8
  30. package/android/src/main/java/com/swmansion/rnscreens/events/HeaderDetachedEvent.kt +3 -7
  31. package/android/src/main/java/com/swmansion/rnscreens/events/HeaderHeightChangeEvent.kt +3 -3
  32. package/android/src/main/java/com/swmansion/rnscreens/events/ScreenTransitionProgressEvent.kt +9 -13
  33. package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarBlurEvent.kt +3 -7
  34. package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarChangeTextEvent.kt +3 -7
  35. package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarCloseEvent.kt +3 -7
  36. package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarFocusEvent.kt +3 -7
  37. package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarOpenEvent.kt +3 -7
  38. package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarSearchButtonPressEvent.kt +3 -7
  39. package/android/src/main/jni/rnscreens.h +1 -0
  40. package/android/src/main/res/v33/anim-v33/rns_default_enter_in.xml +0 -1
  41. package/android/src/main/res/v33/anim-v33/rns_default_enter_out.xml +2 -2
  42. package/android/src/paper/java/com/swmansion/rnscreens/FabricEnabledViewGroup.kt +1 -1
  43. package/android/src/paper/java/com/swmansion/rnscreens/NativeScreensModuleSpec.java +32 -0
  44. package/common/cpp/react/renderer/components/rnscreens/RNSModalScreenComponentDescriptor.h +41 -0
  45. package/common/cpp/react/renderer/components/rnscreens/RNSModalScreenShadowNode.cpp +15 -0
  46. package/common/cpp/react/renderer/components/rnscreens/RNSModalScreenShadowNode.h +31 -0
  47. package/common/cpp/react/renderer/components/rnscreens/RNSScreenShadowNode.cpp +6 -0
  48. package/common/cpp/react/renderer/components/rnscreens/RNSScreenShadowNode.h +1 -5
  49. package/common/cpp/react/renderer/components/rnscreens/RNSScreenState.cpp +1 -1
  50. package/common/cpp/react/renderer/components/rnscreens/RNSScreenState.h +8 -3
  51. package/cpp/RNScreensTurboModule.cpp +107 -0
  52. package/cpp/RNScreensTurboModule.h +43 -0
  53. package/gesture-handler/package.json +6 -0
  54. package/ios/RNSConvert.h +2 -0
  55. package/ios/RNSConvert.mm +5 -2
  56. package/ios/RNSEnums.h +1 -0
  57. package/ios/RNSModalScreen.h +8 -0
  58. package/ios/RNSModalScreen.mm +36 -0
  59. package/ios/RNSModule.h +19 -0
  60. package/ios/RNSModule.mm +174 -0
  61. package/ios/RNSScreen.h +4 -1
  62. package/ios/RNSScreen.mm +48 -26
  63. package/ios/RNSScreenStack.h +6 -0
  64. package/ios/RNSScreenStack.mm +150 -23
  65. package/ios/RNSScreenStackAnimator.mm +89 -1
  66. package/ios/RNSScreenStackHeaderConfig.mm +7 -1
  67. package/ios/RNSScreenWindowTraits.h +1 -1
  68. package/ios/RNSScreenWindowTraits.mm +24 -50
  69. package/ios/RNSSearchBar.mm +24 -0
  70. package/ios/utils/RNSUIBarButtonItem.h +2 -0
  71. package/lib/commonjs/TransitionProgressContext.js +3 -4
  72. package/lib/commonjs/TransitionProgressContext.js.map +1 -1
  73. package/lib/commonjs/components/FullWindowOverlay.js +28 -0
  74. package/lib/commonjs/components/FullWindowOverlay.js.map +1 -0
  75. package/lib/commonjs/components/FullWindowOverlay.web.js +9 -0
  76. package/lib/commonjs/components/FullWindowOverlay.web.js.map +1 -0
  77. package/lib/commonjs/components/Screen.js +161 -0
  78. package/lib/commonjs/components/Screen.js.map +1 -0
  79. package/lib/commonjs/components/Screen.web.js +46 -0
  80. package/lib/commonjs/components/Screen.web.js.map +1 -0
  81. package/lib/commonjs/components/ScreenContainer.js +33 -0
  82. package/lib/commonjs/components/ScreenContainer.js.map +1 -0
  83. package/lib/commonjs/components/ScreenContainer.web.js +11 -0
  84. package/lib/commonjs/components/ScreenContainer.web.js.map +1 -0
  85. package/lib/commonjs/components/ScreenStack.js +45 -0
  86. package/lib/commonjs/components/ScreenStack.js.map +1 -0
  87. package/lib/commonjs/components/ScreenStack.web.js +9 -0
  88. package/lib/commonjs/components/ScreenStack.web.js.map +1 -0
  89. package/lib/commonjs/components/ScreenStackHeaderConfig.js +53 -0
  90. package/lib/commonjs/components/ScreenStackHeaderConfig.js.map +1 -0
  91. package/lib/commonjs/components/ScreenStackHeaderConfig.web.js +27 -0
  92. package/lib/commonjs/components/ScreenStackHeaderConfig.web.js.map +1 -0
  93. package/lib/commonjs/components/SearchBar.js +59 -0
  94. package/lib/commonjs/components/SearchBar.js.map +1 -0
  95. package/lib/commonjs/components/SearchBar.web.js +11 -0
  96. package/lib/commonjs/components/SearchBar.web.js.map +1 -0
  97. package/lib/commonjs/components/helpers/DelayedFreeze.js +32 -0
  98. package/lib/commonjs/components/helpers/DelayedFreeze.js.map +1 -0
  99. package/lib/commonjs/core.js +41 -0
  100. package/lib/commonjs/core.js.map +1 -0
  101. package/lib/commonjs/fabric/FullWindowOverlayNativeComponent.js +1 -2
  102. package/lib/commonjs/fabric/FullWindowOverlayNativeComponent.js.map +1 -1
  103. package/lib/commonjs/fabric/ModalScreenNativeComponent.js +13 -0
  104. package/lib/commonjs/fabric/ModalScreenNativeComponent.js.map +1 -0
  105. package/lib/commonjs/fabric/NativeScreensModule.js +10 -0
  106. package/lib/commonjs/fabric/NativeScreensModule.js.map +1 -0
  107. package/lib/commonjs/fabric/NativeScreensModule.web.js +8 -0
  108. package/lib/commonjs/fabric/NativeScreensModule.web.js.map +1 -0
  109. package/lib/commonjs/fabric/ScreenContainerNativeComponent.js +1 -2
  110. package/lib/commonjs/fabric/ScreenContainerNativeComponent.js.map +1 -1
  111. package/lib/commonjs/fabric/ScreenNativeComponent.js +1 -2
  112. package/lib/commonjs/fabric/ScreenNativeComponent.js.map +1 -1
  113. package/lib/commonjs/fabric/ScreenNavigationContainerNativeComponent.js +1 -2
  114. package/lib/commonjs/fabric/ScreenNavigationContainerNativeComponent.js.map +1 -1
  115. package/lib/commonjs/fabric/ScreenStackHeaderConfigNativeComponent.js +1 -2
  116. package/lib/commonjs/fabric/ScreenStackHeaderConfigNativeComponent.js.map +1 -1
  117. package/lib/commonjs/fabric/ScreenStackHeaderSubviewNativeComponent.js +1 -2
  118. package/lib/commonjs/fabric/ScreenStackHeaderSubviewNativeComponent.js.map +1 -1
  119. package/lib/commonjs/fabric/ScreenStackNativeComponent.js +1 -2
  120. package/lib/commonjs/fabric/ScreenStackNativeComponent.js.map +1 -1
  121. package/lib/commonjs/fabric/SearchBarNativeComponent.js +3 -5
  122. package/lib/commonjs/fabric/SearchBarNativeComponent.js.map +1 -1
  123. package/lib/commonjs/gesture-handler/GestureDetectorProvider.js +19 -0
  124. package/lib/commonjs/gesture-handler/GestureDetectorProvider.js.map +1 -0
  125. package/lib/commonjs/gesture-handler/RNScreensTurboModule.js +8 -0
  126. package/lib/commonjs/gesture-handler/RNScreensTurboModule.js.map +1 -0
  127. package/lib/commonjs/gesture-handler/ScreenGestureDetector.js +202 -0
  128. package/lib/commonjs/gesture-handler/ScreenGestureDetector.js.map +1 -0
  129. package/lib/commonjs/gesture-handler/constraints.js +64 -0
  130. package/lib/commonjs/gesture-handler/constraints.js.map +1 -0
  131. package/lib/commonjs/gesture-handler/defaults.js +38 -0
  132. package/lib/commonjs/gesture-handler/defaults.js.map +1 -0
  133. package/lib/commonjs/gesture-handler/fabricUtils.js +30 -0
  134. package/lib/commonjs/gesture-handler/fabricUtils.js.map +1 -0
  135. package/lib/commonjs/gesture-handler/fabricUtils.web.js +17 -0
  136. package/lib/commonjs/gesture-handler/fabricUtils.web.js.map +1 -0
  137. package/lib/commonjs/gesture-handler/index.js +14 -0
  138. package/lib/commonjs/gesture-handler/index.js.map +1 -0
  139. package/lib/commonjs/index.js +183 -100
  140. package/lib/commonjs/index.js.map +1 -1
  141. package/lib/commonjs/native-stack/contexts/GHContext.js +11 -0
  142. package/lib/commonjs/native-stack/contexts/GHContext.js.map +1 -0
  143. package/lib/commonjs/native-stack/index.js.map +1 -1
  144. package/lib/commonjs/native-stack/navigators/createNativeStackNavigator.js +20 -24
  145. package/lib/commonjs/native-stack/navigators/createNativeStackNavigator.js.map +1 -1
  146. package/lib/commonjs/native-stack/types.js.map +1 -1
  147. package/lib/commonjs/native-stack/utils/AnimatedHeaderHeightContext.js +3 -4
  148. package/lib/commonjs/native-stack/utils/AnimatedHeaderHeightContext.js.map +1 -1
  149. package/lib/commonjs/native-stack/utils/HeaderHeightContext.js +3 -4
  150. package/lib/commonjs/native-stack/utils/HeaderHeightContext.js.map +1 -1
  151. package/lib/commonjs/native-stack/utils/SafeAreaProviderCompat.js +2 -2
  152. package/lib/commonjs/native-stack/utils/SafeAreaProviderCompat.js.map +1 -1
  153. package/lib/commonjs/native-stack/utils/getDefaultHeaderHeight.js.map +1 -1
  154. package/lib/commonjs/native-stack/utils/getStatusBarHeight.js.map +1 -1
  155. package/lib/commonjs/native-stack/utils/useAnimatedHeaderHeight.js +2 -2
  156. package/lib/commonjs/native-stack/utils/useAnimatedHeaderHeight.js.map +1 -1
  157. package/lib/commonjs/native-stack/utils/useBackPressSubscription.js +2 -4
  158. package/lib/commonjs/native-stack/utils/useBackPressSubscription.js.map +1 -1
  159. package/lib/commonjs/native-stack/utils/useHeaderHeight.js +2 -2
  160. package/lib/commonjs/native-stack/utils/useHeaderHeight.js.map +1 -1
  161. package/lib/commonjs/native-stack/views/FontProcessor.js +1 -2
  162. package/lib/commonjs/native-stack/views/FontProcessor.js.map +1 -1
  163. package/lib/commonjs/native-stack/views/HeaderConfig.js +11 -7
  164. package/lib/commonjs/native-stack/views/HeaderConfig.js.map +1 -1
  165. package/lib/commonjs/native-stack/views/NativeStackView.js +50 -15
  166. package/lib/commonjs/native-stack/views/NativeStackView.js.map +1 -1
  167. package/lib/commonjs/reanimated/ReanimatedHeaderHeightContext.js +3 -4
  168. package/lib/commonjs/reanimated/ReanimatedHeaderHeightContext.js.map +1 -1
  169. package/lib/commonjs/reanimated/ReanimatedNativeStackScreen.js +6 -9
  170. package/lib/commonjs/reanimated/ReanimatedNativeStackScreen.js.map +1 -1
  171. package/lib/commonjs/reanimated/ReanimatedScreen.js +1 -2
  172. package/lib/commonjs/reanimated/ReanimatedScreen.js.map +1 -1
  173. package/lib/commonjs/reanimated/ReanimatedScreenProvider.js +6 -14
  174. package/lib/commonjs/reanimated/ReanimatedScreenProvider.js.map +1 -1
  175. package/lib/commonjs/reanimated/ReanimatedTransitionProgressContext.js +3 -4
  176. package/lib/commonjs/reanimated/ReanimatedTransitionProgressContext.js.map +1 -1
  177. package/lib/commonjs/reanimated/index.js.map +1 -1
  178. package/lib/commonjs/reanimated/useReanimatedHeaderHeight.js +2 -2
  179. package/lib/commonjs/reanimated/useReanimatedHeaderHeight.js.map +1 -1
  180. package/lib/commonjs/reanimated/useReanimatedTransitionProgress.js +2 -2
  181. package/lib/commonjs/reanimated/useReanimatedTransitionProgress.js.map +1 -1
  182. package/lib/commonjs/types.js.map +1 -1
  183. package/lib/commonjs/useTransitionProgress.js +2 -2
  184. package/lib/commonjs/useTransitionProgress.js.map +1 -1
  185. package/lib/commonjs/utils.js +2 -4
  186. package/lib/commonjs/utils.js.map +1 -1
  187. package/lib/module/TransitionProgressContext.js.map +1 -1
  188. package/lib/module/components/FullWindowOverlay.js +21 -0
  189. package/lib/module/components/FullWindowOverlay.js.map +1 -0
  190. package/lib/module/components/FullWindowOverlay.web.js +3 -0
  191. package/lib/module/components/FullWindowOverlay.web.js.map +1 -0
  192. package/lib/module/components/Screen.js +156 -0
  193. package/lib/module/components/Screen.js.map +1 -0
  194. package/lib/module/components/Screen.web.js +38 -0
  195. package/lib/module/components/Screen.web.js.map +1 -0
  196. package/lib/module/components/ScreenContainer.js +26 -0
  197. package/lib/module/components/ScreenContainer.js.map +1 -0
  198. package/lib/module/components/ScreenContainer.web.js +5 -0
  199. package/lib/module/components/ScreenContainer.web.js.map +1 -0
  200. package/lib/module/components/ScreenStack.js +40 -0
  201. package/lib/module/components/ScreenStack.js.map +1 -0
  202. package/lib/module/components/ScreenStack.web.js +3 -0
  203. package/lib/module/components/ScreenStack.web.js.map +1 -0
  204. package/lib/module/components/ScreenStackHeaderConfig.js +43 -0
  205. package/lib/module/components/ScreenStackHeaderConfig.js.map +1 -0
  206. package/lib/module/components/ScreenStackHeaderConfig.web.js +14 -0
  207. package/lib/module/components/ScreenStackHeaderConfig.web.js.map +1 -0
  208. package/lib/module/components/SearchBar.js +52 -0
  209. package/lib/module/components/SearchBar.js.map +1 -0
  210. package/lib/module/components/SearchBar.web.js +5 -0
  211. package/lib/module/components/SearchBar.web.js.map +1 -0
  212. package/lib/module/components/helpers/DelayedFreeze.js +25 -0
  213. package/lib/module/components/helpers/DelayedFreeze.js.map +1 -0
  214. package/lib/module/core.js +31 -0
  215. package/lib/module/core.js.map +1 -0
  216. package/lib/module/fabric/FullWindowOverlayNativeComponent.js.map +1 -1
  217. package/lib/module/fabric/ModalScreenNativeComponent.js +8 -0
  218. package/lib/module/fabric/ModalScreenNativeComponent.js.map +1 -0
  219. package/lib/module/fabric/NativeScreensModule.js +5 -0
  220. package/lib/module/fabric/NativeScreensModule.js.map +1 -0
  221. package/lib/module/fabric/NativeScreensModule.web.js +2 -0
  222. package/lib/module/fabric/NativeScreensModule.web.js.map +1 -0
  223. package/lib/module/fabric/ScreenContainerNativeComponent.js.map +1 -1
  224. package/lib/module/fabric/ScreenNativeComponent.js.map +1 -1
  225. package/lib/module/fabric/ScreenNavigationContainerNativeComponent.js.map +1 -1
  226. package/lib/module/fabric/ScreenStackHeaderConfigNativeComponent.js.map +1 -1
  227. package/lib/module/fabric/ScreenStackHeaderSubviewNativeComponent.js.map +1 -1
  228. package/lib/module/fabric/ScreenStackNativeComponent.js.map +1 -1
  229. package/lib/module/fabric/SearchBarNativeComponent.js +1 -1
  230. package/lib/module/fabric/SearchBarNativeComponent.js.map +1 -1
  231. package/lib/module/gesture-handler/GestureDetectorProvider.js +12 -0
  232. package/lib/module/gesture-handler/GestureDetectorProvider.js.map +1 -0
  233. package/lib/module/gesture-handler/RNScreensTurboModule.js +2 -0
  234. package/lib/module/gesture-handler/RNScreensTurboModule.js.map +1 -0
  235. package/lib/module/gesture-handler/ScreenGestureDetector.js +194 -0
  236. package/lib/module/gesture-handler/ScreenGestureDetector.js.map +1 -0
  237. package/lib/module/gesture-handler/constraints.js +56 -0
  238. package/lib/module/gesture-handler/constraints.js.map +1 -0
  239. package/lib/module/gesture-handler/defaults.js +32 -0
  240. package/lib/module/gesture-handler/defaults.js.map +1 -0
  241. package/lib/module/gesture-handler/fabricUtils.js +23 -0
  242. package/lib/module/gesture-handler/fabricUtils.js.map +1 -0
  243. package/lib/module/gesture-handler/fabricUtils.web.js +10 -0
  244. package/lib/module/gesture-handler/fabricUtils.web.js.map +1 -0
  245. package/lib/module/gesture-handler/index.js +5 -0
  246. package/lib/module/gesture-handler/index.js.map +1 -0
  247. package/lib/module/index.js +31 -64
  248. package/lib/module/index.js.map +1 -1
  249. package/lib/module/native-stack/contexts/GHContext.js +4 -0
  250. package/lib/module/native-stack/contexts/GHContext.js.map +1 -0
  251. package/lib/module/native-stack/index.js.map +1 -1
  252. package/lib/module/native-stack/navigators/createNativeStackNavigator.js +17 -20
  253. package/lib/module/native-stack/navigators/createNativeStackNavigator.js.map +1 -1
  254. package/lib/module/native-stack/types.js.map +1 -1
  255. package/lib/module/native-stack/utils/AnimatedHeaderHeightContext.js.map +1 -1
  256. package/lib/module/native-stack/utils/HeaderHeightContext.js.map +1 -1
  257. package/lib/module/native-stack/utils/SafeAreaProviderCompat.js.map +1 -1
  258. package/lib/module/native-stack/utils/getDefaultHeaderHeight.js.map +1 -1
  259. package/lib/module/native-stack/utils/getStatusBarHeight.js.map +1 -1
  260. package/lib/module/native-stack/utils/useAnimatedHeaderHeight.js.map +1 -1
  261. package/lib/module/native-stack/utils/useBackPressSubscription.js +2 -4
  262. package/lib/module/native-stack/utils/useBackPressSubscription.js.map +1 -1
  263. package/lib/module/native-stack/utils/useHeaderHeight.js.map +1 -1
  264. package/lib/module/native-stack/views/FontProcessor.js +1 -2
  265. package/lib/module/native-stack/views/FontProcessor.js.map +1 -1
  266. package/lib/module/native-stack/views/HeaderConfig.js +8 -5
  267. package/lib/module/native-stack/views/HeaderConfig.js.map +1 -1
  268. package/lib/module/native-stack/views/NativeStackView.js +49 -14
  269. package/lib/module/native-stack/views/NativeStackView.js.map +1 -1
  270. package/lib/module/reanimated/ReanimatedHeaderHeightContext.js.map +1 -1
  271. package/lib/module/reanimated/ReanimatedNativeStackScreen.js +2 -4
  272. package/lib/module/reanimated/ReanimatedNativeStackScreen.js.map +1 -1
  273. package/lib/module/reanimated/ReanimatedScreen.js.map +1 -1
  274. package/lib/module/reanimated/ReanimatedScreenProvider.js +6 -14
  275. package/lib/module/reanimated/ReanimatedScreenProvider.js.map +1 -1
  276. package/lib/module/reanimated/ReanimatedTransitionProgressContext.js.map +1 -1
  277. package/lib/module/reanimated/index.js.map +1 -1
  278. package/lib/module/reanimated/useReanimatedHeaderHeight.js.map +1 -1
  279. package/lib/module/reanimated/useReanimatedTransitionProgress.js.map +1 -1
  280. package/lib/module/types.js.map +1 -1
  281. package/lib/module/useTransitionProgress.js.map +1 -1
  282. package/lib/module/utils.js.map +1 -1
  283. package/lib/typescript/TransitionProgressContext.d.ts +1 -0
  284. package/lib/typescript/TransitionProgressContext.d.ts.map +1 -0
  285. package/lib/typescript/components/FullWindowOverlay.d.ts +6 -0
  286. package/lib/typescript/components/FullWindowOverlay.d.ts.map +1 -0
  287. package/lib/typescript/components/FullWindowOverlay.web.d.ts +6 -0
  288. package/lib/typescript/components/FullWindowOverlay.web.d.ts.map +1 -0
  289. package/lib/typescript/components/Screen.d.ts +20 -0
  290. package/lib/typescript/components/Screen.d.ts.map +1 -0
  291. package/lib/typescript/components/Screen.web.d.ts +11 -0
  292. package/lib/typescript/components/Screen.web.d.ts.map +1 -0
  293. package/lib/typescript/components/ScreenContainer.d.ts +7 -0
  294. package/lib/typescript/components/ScreenContainer.d.ts.map +1 -0
  295. package/lib/typescript/components/ScreenContainer.web.d.ts +5 -0
  296. package/lib/typescript/components/ScreenContainer.web.d.ts.map +1 -0
  297. package/lib/typescript/components/ScreenStack.d.ts +5 -0
  298. package/lib/typescript/components/ScreenStack.d.ts.map +1 -0
  299. package/lib/typescript/components/ScreenStack.web.d.ts +3 -0
  300. package/lib/typescript/components/ScreenStack.web.d.ts.map +1 -0
  301. package/lib/typescript/components/ScreenStackHeaderConfig.d.ts +13 -0
  302. package/lib/typescript/components/ScreenStackHeaderConfig.d.ts.map +1 -0
  303. package/lib/typescript/components/ScreenStackHeaderConfig.web.d.ts +13 -0
  304. package/lib/typescript/components/ScreenStackHeaderConfig.web.d.ts.map +1 -0
  305. package/lib/typescript/components/SearchBar.d.ts +26 -0
  306. package/lib/typescript/components/SearchBar.d.ts.map +1 -0
  307. package/lib/typescript/components/SearchBar.web.d.ts +5 -0
  308. package/lib/typescript/components/SearchBar.web.d.ts.map +1 -0
  309. package/lib/typescript/components/helpers/DelayedFreeze.d.ts +8 -0
  310. package/lib/typescript/components/helpers/DelayedFreeze.d.ts.map +1 -0
  311. package/lib/typescript/core.d.ts +7 -0
  312. package/lib/typescript/core.d.ts.map +1 -0
  313. package/lib/typescript/fabric/FullWindowOverlayNativeComponent.d.ts +1 -0
  314. package/lib/typescript/fabric/FullWindowOverlayNativeComponent.d.ts.map +1 -0
  315. package/lib/typescript/fabric/ModalScreenNativeComponent.d.ts +68 -0
  316. package/lib/typescript/fabric/ModalScreenNativeComponent.d.ts.map +1 -0
  317. package/lib/typescript/fabric/NativeScreensModule.d.ts +6 -0
  318. package/lib/typescript/fabric/NativeScreensModule.d.ts.map +1 -0
  319. package/lib/typescript/fabric/NativeScreensModule.web.d.ts +3 -0
  320. package/lib/typescript/fabric/NativeScreensModule.web.d.ts.map +1 -0
  321. package/lib/typescript/fabric/ScreenContainerNativeComponent.d.ts +1 -0
  322. package/lib/typescript/fabric/ScreenContainerNativeComponent.d.ts.map +1 -0
  323. package/lib/typescript/fabric/ScreenNativeComponent.d.ts +2 -1
  324. package/lib/typescript/fabric/ScreenNativeComponent.d.ts.map +1 -0
  325. package/lib/typescript/fabric/ScreenNavigationContainerNativeComponent.d.ts +1 -0
  326. package/lib/typescript/fabric/ScreenNavigationContainerNativeComponent.d.ts.map +1 -0
  327. package/lib/typescript/fabric/ScreenStackHeaderConfigNativeComponent.d.ts +1 -0
  328. package/lib/typescript/fabric/ScreenStackHeaderConfigNativeComponent.d.ts.map +1 -0
  329. package/lib/typescript/fabric/ScreenStackHeaderSubviewNativeComponent.d.ts +1 -0
  330. package/lib/typescript/fabric/ScreenStackHeaderSubviewNativeComponent.d.ts.map +1 -0
  331. package/lib/typescript/fabric/ScreenStackNativeComponent.d.ts +1 -0
  332. package/lib/typescript/fabric/ScreenStackNativeComponent.d.ts.map +1 -0
  333. package/lib/typescript/fabric/SearchBarNativeComponent.d.ts +3 -1
  334. package/lib/typescript/fabric/SearchBarNativeComponent.d.ts.map +1 -0
  335. package/lib/typescript/gesture-handler/GestureDetectorProvider.d.ts +5 -0
  336. package/lib/typescript/gesture-handler/GestureDetectorProvider.d.ts.map +1 -0
  337. package/lib/typescript/gesture-handler/RNScreensTurboModule.d.ts +13 -0
  338. package/lib/typescript/gesture-handler/RNScreensTurboModule.d.ts.map +1 -0
  339. package/lib/typescript/gesture-handler/ScreenGestureDetector.d.ts +5 -0
  340. package/lib/typescript/gesture-handler/ScreenGestureDetector.d.ts.map +1 -0
  341. package/lib/typescript/gesture-handler/constraints.d.ts +6 -0
  342. package/lib/typescript/gesture-handler/constraints.d.ts.map +1 -0
  343. package/lib/typescript/gesture-handler/defaults.d.ts +20 -0
  344. package/lib/typescript/gesture-handler/defaults.d.ts.map +1 -0
  345. package/lib/typescript/gesture-handler/fabricUtils.d.ts +8 -0
  346. package/lib/typescript/gesture-handler/fabricUtils.d.ts.map +1 -0
  347. package/lib/typescript/gesture-handler/fabricUtils.web.d.ts +6 -0
  348. package/lib/typescript/gesture-handler/fabricUtils.web.d.ts.map +1 -0
  349. package/lib/typescript/gesture-handler/index.d.ts +2 -0
  350. package/lib/typescript/gesture-handler/index.d.ts.map +1 -0
  351. package/lib/typescript/index.d.ts +11 -31
  352. package/lib/typescript/index.d.ts.map +1 -0
  353. package/lib/typescript/native-stack/contexts/GHContext.d.ts +4 -0
  354. package/lib/typescript/native-stack/contexts/GHContext.d.ts.map +1 -0
  355. package/lib/typescript/native-stack/index.d.ts +1 -0
  356. package/lib/typescript/native-stack/index.d.ts.map +1 -0
  357. package/lib/typescript/native-stack/navigators/createNativeStackNavigator.d.ts +1 -0
  358. package/lib/typescript/native-stack/navigators/createNativeStackNavigator.d.ts.map +1 -0
  359. package/lib/typescript/native-stack/types.d.ts +39 -2
  360. package/lib/typescript/native-stack/types.d.ts.map +1 -0
  361. package/lib/typescript/native-stack/utils/AnimatedHeaderHeightContext.d.ts +1 -0
  362. package/lib/typescript/native-stack/utils/AnimatedHeaderHeightContext.d.ts.map +1 -0
  363. package/lib/typescript/native-stack/utils/HeaderHeightContext.d.ts +1 -0
  364. package/lib/typescript/native-stack/utils/HeaderHeightContext.d.ts.map +1 -0
  365. package/lib/typescript/native-stack/utils/SafeAreaProviderCompat.d.ts +1 -0
  366. package/lib/typescript/native-stack/utils/SafeAreaProviderCompat.d.ts.map +1 -0
  367. package/lib/typescript/native-stack/utils/getDefaultHeaderHeight.d.ts +1 -0
  368. package/lib/typescript/native-stack/utils/getDefaultHeaderHeight.d.ts.map +1 -0
  369. package/lib/typescript/native-stack/utils/getStatusBarHeight.d.ts +1 -0
  370. package/lib/typescript/native-stack/utils/getStatusBarHeight.d.ts.map +1 -0
  371. package/lib/typescript/native-stack/utils/useAnimatedHeaderHeight.d.ts +1 -0
  372. package/lib/typescript/native-stack/utils/useAnimatedHeaderHeight.d.ts.map +1 -0
  373. package/lib/typescript/native-stack/utils/useBackPressSubscription.d.ts +1 -0
  374. package/lib/typescript/native-stack/utils/useBackPressSubscription.d.ts.map +1 -0
  375. package/lib/typescript/native-stack/utils/useHeaderHeight.d.ts +1 -0
  376. package/lib/typescript/native-stack/utils/useHeaderHeight.d.ts.map +1 -0
  377. package/lib/typescript/native-stack/views/FontProcessor.d.ts +1 -0
  378. package/lib/typescript/native-stack/views/FontProcessor.d.ts.map +1 -0
  379. package/lib/typescript/native-stack/views/HeaderConfig.d.ts +1 -0
  380. package/lib/typescript/native-stack/views/HeaderConfig.d.ts.map +1 -0
  381. package/lib/typescript/native-stack/views/NativeStackView.d.ts +1 -0
  382. package/lib/typescript/native-stack/views/NativeStackView.d.ts.map +1 -0
  383. package/lib/typescript/reanimated/ReanimatedHeaderHeightContext.d.ts +1 -0
  384. package/lib/typescript/reanimated/ReanimatedHeaderHeightContext.d.ts.map +1 -0
  385. package/lib/typescript/reanimated/ReanimatedNativeStackScreen.d.ts +2 -2
  386. package/lib/typescript/reanimated/ReanimatedNativeStackScreen.d.ts.map +1 -0
  387. package/lib/typescript/reanimated/ReanimatedScreen.d.ts +2 -2
  388. package/lib/typescript/reanimated/ReanimatedScreen.d.ts.map +1 -0
  389. package/lib/typescript/reanimated/ReanimatedScreenProvider.d.ts +1 -0
  390. package/lib/typescript/reanimated/ReanimatedScreenProvider.d.ts.map +1 -0
  391. package/lib/typescript/reanimated/ReanimatedTransitionProgressContext.d.ts +1 -0
  392. package/lib/typescript/reanimated/ReanimatedTransitionProgressContext.d.ts.map +1 -0
  393. package/lib/typescript/reanimated/index.d.ts +1 -0
  394. package/lib/typescript/reanimated/index.d.ts.map +1 -0
  395. package/lib/typescript/reanimated/useReanimatedHeaderHeight.d.ts +2 -3
  396. package/lib/typescript/reanimated/useReanimatedHeaderHeight.d.ts.map +1 -0
  397. package/lib/typescript/reanimated/useReanimatedTransitionProgress.d.ts +4 -9
  398. package/lib/typescript/reanimated/useReanimatedTransitionProgress.d.ts.map +1 -0
  399. package/lib/typescript/types.d.ts +11 -2
  400. package/lib/typescript/types.d.ts.map +1 -0
  401. package/lib/typescript/useTransitionProgress.d.ts +1 -0
  402. package/lib/typescript/useTransitionProgress.d.ts.map +1 -0
  403. package/lib/typescript/utils.d.ts +1 -0
  404. package/lib/typescript/utils.d.ts.map +1 -0
  405. package/native-stack/README.md +2 -1
  406. package/native-stack/package.json +1 -1
  407. package/package.json +18 -11
  408. package/react-native.config.js +2 -1
  409. package/reanimated/package.json +1 -1
  410. package/src/components/FullWindowOverlay.tsx +25 -0
  411. package/src/components/FullWindowOverlay.web.tsx +6 -0
  412. package/src/components/Screen.tsx +218 -0
  413. package/src/components/Screen.web.tsx +43 -0
  414. package/src/components/ScreenContainer.tsx +33 -0
  415. package/src/components/ScreenContainer.web.tsx +6 -0
  416. package/src/components/ScreenStack.tsx +41 -0
  417. package/src/components/ScreenStack.web.tsx +3 -0
  418. package/src/components/ScreenStackHeaderConfig.tsx +76 -0
  419. package/src/components/ScreenStackHeaderConfig.web.tsx +39 -0
  420. package/src/components/SearchBar.tsx +91 -0
  421. package/src/components/SearchBar.web.tsx +6 -0
  422. package/src/components/helpers/DelayedFreeze.tsx +27 -0
  423. package/src/core.ts +43 -0
  424. package/src/fabric/ModalScreenNativeComponent.ts +104 -0
  425. package/src/fabric/NativeScreensModule.ts +7 -0
  426. package/src/fabric/NativeScreensModule.web.ts +1 -0
  427. package/src/fabric/ScreenNativeComponent.ts +1 -1
  428. package/src/fabric/SearchBarNativeComponent.ts +2 -0
  429. package/src/gesture-handler/GestureDetectorProvider.tsx +16 -0
  430. package/src/gesture-handler/RNScreensTurboModule.ts +13 -0
  431. package/src/gesture-handler/ScreenGestureDetector.tsx +241 -0
  432. package/src/gesture-handler/constraints.ts +87 -0
  433. package/src/gesture-handler/defaults.ts +38 -0
  434. package/src/gesture-handler/fabricUtils.ts +39 -0
  435. package/src/gesture-handler/fabricUtils.web.ts +10 -0
  436. package/src/gesture-handler/index.tsx +4 -0
  437. package/src/index.tsx +65 -112
  438. package/src/native-stack/contexts/GHContext.tsx +7 -0
  439. package/src/native-stack/types.tsx +62 -1
  440. package/src/native-stack/views/HeaderConfig.tsx +11 -0
  441. package/src/native-stack/views/NativeStackView.tsx +65 -13
  442. package/src/types.tsx +13 -1
  443. package/lib/commonjs/index.native.js +0 -418
  444. package/lib/commonjs/index.native.js.map +0 -1
  445. package/lib/module/index.native.js +0 -415
  446. package/lib/module/index.native.js.map +0 -1
  447. package/lib/typescript/index.native.d.ts +0 -2
  448. package/src/index.native.tsx +0 -619
@@ -92,7 +92,7 @@ namespace react = facebook::react;
92
92
 
93
93
  @end
94
94
 
95
- #if !TARGET_OS_TV
95
+ #if !TARGET_OS_TV && !TARGET_OS_VISION
96
96
  @interface RNSScreenEdgeGestureRecognizer : UIScreenEdgePanGestureRecognizer
97
97
  @end
98
98
 
@@ -150,7 +150,7 @@ namespace react = facebook::react;
150
150
  _presentedModals = [NSMutableArray new];
151
151
  _controller = [RNSNavigationController new];
152
152
  _controller.delegate = self;
153
- #if !TARGET_OS_TV
153
+ #if !TARGET_OS_TV && !TARGET_OS_VISION
154
154
  [self setupGestureHandlers];
155
155
  #endif
156
156
  // we have to initialize viewControllers with a non empty array for
@@ -323,6 +323,38 @@ namespace react = facebook::react;
323
323
  }
324
324
  }
325
325
 
326
+ + (UIViewController *)findTopMostPresentedViewControllerFromViewController:(UIViewController *)controller
327
+ {
328
+ auto presentedVc = controller;
329
+ while (presentedVc.presentedViewController != nil) {
330
+ presentedVc = presentedVc.presentedViewController;
331
+ }
332
+ return presentedVc;
333
+ }
334
+
335
+ - (UIViewController *)findReactRootViewController
336
+ {
337
+ UIView *parent = self;
338
+ while (parent) {
339
+ parent = parent.reactSuperview;
340
+ if (parent.isReactRootView) {
341
+ return parent.reactViewController;
342
+ }
343
+ }
344
+ return nil;
345
+ }
346
+
347
+ - (UIViewController *)lastFromPresentedViewControllerChainStartingFrom:(UIViewController *)vc
348
+ {
349
+ UIViewController *lastNonNullVc = vc;
350
+ UIViewController *lastVc = vc.presentedViewController;
351
+ while (lastVc != nil) {
352
+ lastNonNullVc = lastVc;
353
+ lastVc = lastVc.presentedViewController;
354
+ }
355
+ return lastNonNullVc;
356
+ }
357
+
326
358
  - (void)setModalViewControllers:(NSArray<UIViewController *> *)controllers
327
359
  {
328
360
  // prevent re-entry
@@ -349,9 +381,15 @@ namespace react = facebook::react;
349
381
  NSMutableArray<UIViewController *> *newControllers = [NSMutableArray arrayWithArray:controllers];
350
382
  [newControllers removeObjectsInArray:_presentedModals];
351
383
 
352
- // find bottom-most controller that should stay on the stack for the duration of transition
384
+ // We need to find bottom-most view controller that should stay on the stack
385
+ // for the duration of transition. There are couple of scenarios:
386
+ // (1) No modals are presented or all modals were presented by this RNSNavigationController,
387
+ // (2) There are modals presented by other RNSNavigationControllers (nested/outer)
388
+
389
+ // Last controller that is common for both _presentedModals & controllers
390
+ __block UIViewController *changeRootController = _controller;
391
+ // Last common controller index + 1
353
392
  NSUInteger changeRootIndex = 0;
354
- UIViewController *changeRootController = _controller;
355
393
  for (NSUInteger i = 0; i < MIN(_presentedModals.count, controllers.count); i++) {
356
394
  if (_presentedModals[i] == controllers[i]) {
357
395
  changeRootController = controllers[i];
@@ -403,6 +441,7 @@ namespace react = facebook::react;
403
441
  return;
404
442
  } else {
405
443
  UIViewController *previous = changeRootController;
444
+
406
445
  for (NSUInteger i = changeRootIndex; i < controllers.count; i++) {
407
446
  UIViewController *next = controllers[i];
408
447
  BOOL lastModal = (i == controllers.count - 1);
@@ -440,16 +479,50 @@ namespace react = facebook::react;
440
479
  }
441
480
  };
442
481
 
443
- if (changeRootController.presentedViewController != nil &&
444
- [_presentedModals containsObject:changeRootController.presentedViewController]) {
482
+ UIViewController *firstModalToBeDismissed = changeRootController.presentedViewController;
483
+ if (firstModalToBeDismissed != nil) {
445
484
  BOOL shouldAnimate = changeRootIndex == controllers.count &&
446
- [changeRootController.presentedViewController isKindOfClass:[RNSScreen class]] &&
447
- ((RNSScreen *)changeRootController.presentedViewController).screenView.stackAnimation !=
448
- RNSScreenStackAnimationNone;
449
- [changeRootController dismissViewControllerAnimated:shouldAnimate completion:finish];
450
- } else {
451
- finish();
485
+ [firstModalToBeDismissed isKindOfClass:[RNSScreen class]] &&
486
+ ((RNSScreen *)firstModalToBeDismissed).screenView.stackAnimation != RNSScreenStackAnimationNone;
487
+
488
+ if ([_presentedModals containsObject:firstModalToBeDismissed]) {
489
+ // We dismiss every VC that was presented by changeRootController VC or its descendant.
490
+ // After the series of dismissals is completed we run completion block in which
491
+ // we present modals on top of changeRootController (which may be the this stack VC)
492
+ [changeRootController dismissViewControllerAnimated:shouldAnimate completion:finish];
493
+ return;
494
+ }
495
+
496
+ UIViewController *lastModalVc = [self lastFromPresentedViewControllerChainStartingFrom:firstModalToBeDismissed];
497
+
498
+ if (lastModalVc != firstModalToBeDismissed) {
499
+ [lastModalVc dismissViewControllerAnimated:shouldAnimate completion:finish];
500
+ return;
501
+ }
452
502
  }
503
+
504
+ // changeRootController does not have presentedViewController but it does not mean that no modals are in presentation;
505
+ // modals could be presented by another stack (nested / outer), third-party view controller or they could be using
506
+ // UIModalPresentationCurrentContext / UIModalPresentationOverCurrentContext presentation styles; in the last case
507
+ // for some reason system asks top-level (react root) vc to present instead of our stack, despite the fact that
508
+ // `definesPresentationContext` returns `YES` for UINavigationController.
509
+ // So we first need to find top-level controller manually:
510
+ UIViewController *reactRootVc = [self findReactRootViewController];
511
+ UIViewController *topMostVc = [RNSScreenStackView findTopMostPresentedViewControllerFromViewController:reactRootVc];
512
+
513
+ if (topMostVc != reactRootVc) {
514
+ changeRootController = topMostVc;
515
+
516
+ // Here we handle just the simplest case where the top level VC was dismissed. In any more complex
517
+ // scenario we will still have problems, see: https://github.com/software-mansion/react-native-screens/issues/1813
518
+ if ([_presentedModals containsObject:topMostVc] && ![controllers containsObject:topMostVc]) {
519
+ [changeRootController dismissViewControllerAnimated:YES completion:finish];
520
+ return;
521
+ }
522
+ }
523
+
524
+ // We didn't detect any controllers for dismissal, thus we start presenting new VCs
525
+ finish();
453
526
  }
454
527
 
455
528
  - (void)setPushViewControllers:(NSArray<UIViewController *> *)controllers
@@ -573,6 +646,22 @@ namespace react = facebook::react;
573
646
  {
574
647
  [super layoutSubviews];
575
648
  _controller.view.frame = self.bounds;
649
+
650
+ // We need to update the bounds of the modal views here, since
651
+ // for contained modals they are not updated by modals themselves.
652
+ for (UIViewController *modal in _presentedModals) {
653
+ // Because `layoutSubviews` method is also called on grabbing the modal,
654
+ // we don't want to update the frame when modal is being dismissed.
655
+ // We also want to get the frame in correct position. In the best case, it
656
+ // should be modal's superview (UITransitionView), which frame is being changed correctly.
657
+ // Otherwise, when superview is nil, we will fallback to the bounds of the ScreenStack.
658
+ BOOL isModalBeingDismissed = [modal isKindOfClass:[RNSScreen class]] && ((RNSScreen *)modal).isBeingDismissed;
659
+ CGRect correctFrame = modal.view.superview != nil ? modal.view.superview.frame : self.bounds;
660
+
661
+ if (!CGRectEqualToRect(modal.view.frame, correctFrame) && !isModalBeingDismissed) {
662
+ modal.view.frame = correctFrame;
663
+ }
664
+ }
576
665
  }
577
666
 
578
667
  - (void)dismissOnReload
@@ -608,7 +697,7 @@ namespace react = facebook::react;
608
697
  // Also, we need to return the animator when full width swiping even if the animation is not custom,
609
698
  // otherwise the screen will be just popped immediately due to no animation
610
699
  ((operation == UINavigationControllerOperationPop && shouldCancelDismiss) || _isFullWidthSwiping ||
611
- [RNSScreenStackAnimator isCustomAnimation:screen.stackAnimation])) {
700
+ [RNSScreenStackAnimator isCustomAnimation:screen.stackAnimation] || _customAnimation)) {
612
701
  return [[RNSScreenStackAnimator alloc] initWithOperation:operation];
613
702
  }
614
703
  return nil;
@@ -637,9 +726,12 @@ namespace react = facebook::react;
637
726
 
638
727
  - (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer
639
728
  {
729
+ if (_disableSwipeBack) {
730
+ return NO;
731
+ }
640
732
  RNSScreenView *topScreen = _reactSubviews.lastObject;
641
733
 
642
- #if TARGET_OS_TV
734
+ #if TARGET_OS_TV || TARGET_OS_VISION
643
735
  [self cancelTouchesInParent];
644
736
  return YES;
645
737
  #else
@@ -657,12 +749,14 @@ namespace react = facebook::react;
657
749
  // Now we're dealing with RNSScreenEdgeGestureRecognizer (or _UIParallaxTransitionPanGestureRecognizer)
658
750
  if (topScreen.customAnimationOnSwipe && [RNSScreenStackAnimator isCustomAnimation:topScreen.stackAnimation]) {
659
751
  if ([gestureRecognizer isKindOfClass:[RNSScreenEdgeGestureRecognizer class]]) {
752
+ UIRectEdge edges = ((RNSScreenEdgeGestureRecognizer *)gestureRecognizer).edges;
753
+ BOOL isRTL = _controller.view.semanticContentAttribute == UISemanticContentAttributeForceRightToLeft;
754
+ BOOL isSlideFromLeft = topScreen.stackAnimation == RNSScreenStackAnimationSlideFromLeft;
660
755
  // if we do not set any explicit `semanticContentAttribute`, it is `UISemanticContentAttributeUnspecified` instead
661
756
  // of `UISemanticContentAttributeForceLeftToRight`, so we just check if it is RTL or not
662
- BOOL isCorrectEdge = (_controller.view.semanticContentAttribute == UISemanticContentAttributeForceRightToLeft &&
663
- ((RNSScreenEdgeGestureRecognizer *)gestureRecognizer).edges == UIRectEdgeRight) ||
664
- (_controller.view.semanticContentAttribute != UISemanticContentAttributeForceRightToLeft &&
665
- ((RNSScreenEdgeGestureRecognizer *)gestureRecognizer).edges == UIRectEdgeLeft);
757
+ BOOL isCorrectEdge = (isRTL && edges == UIRectEdgeRight) ||
758
+ (!isRTL && isSlideFromLeft && edges == UIRectEdgeRight) ||
759
+ (isRTL && isSlideFromLeft && edges == UIRectEdgeLeft) || (!isRTL && edges == UIRectEdgeLeft);
666
760
  if (isCorrectEdge) {
667
761
  [self cancelTouchesInParent];
668
762
  return YES;
@@ -682,7 +776,7 @@ namespace react = facebook::react;
682
776
  #endif // TARGET_OS_TV
683
777
  }
684
778
 
685
- #if !TARGET_OS_TV
779
+ #if !TARGET_OS_TV && !TARGET_OS_VISION
686
780
  - (void)setupGestureHandlers
687
781
  {
688
782
  // gesture recognizers for custom stack animations
@@ -726,7 +820,10 @@ namespace react = facebook::react;
726
820
  }
727
821
  }
728
822
 
823
+ bool isInverted = topScreen.stackAnimation == RNSScreenStackAnimationSlideFromLeft;
824
+
729
825
  float transitionProgress = (translation / distance);
826
+ transitionProgress = isInverted ? transitionProgress * -1 : transitionProgress;
730
827
 
731
828
  switch (gestureRecognizer.state) {
732
829
  case UIGestureRecognizerStateBegan: {
@@ -748,7 +845,10 @@ namespace react = facebook::react;
748
845
  case UIGestureRecognizerStateEnded: {
749
846
  // values taken from
750
847
  // https://github.com/react-navigation/react-navigation/blob/54739828598d7072c1bf7b369659e3682db3edc5/packages/stack/src/views/Stack/Card.tsx#L316
751
- BOOL shouldFinishTransition = (translation + velocity * 0.3) > (distance / 2);
848
+ float snapPoint = distance / 2;
849
+ float gestureDistance = translation + velocity * 0.3;
850
+ gestureDistance = isInverted ? gestureDistance * -1 : gestureDistance;
851
+ BOOL shouldFinishTransition = gestureDistance > snapPoint;
752
852
  if (shouldFinishTransition) {
753
853
  [_interactionController finishInteractiveTransition];
754
854
  } else {
@@ -847,8 +947,8 @@ namespace react = facebook::react;
847
947
  - (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event
848
948
  {
849
949
  if (CGRectContainsPoint(_controller.navigationBar.frame, point)) {
850
- // headerConfig should be the first subview of the topmost screen
851
- UIView *headerConfig = [[_reactSubviews.lastObject reactSubviews] firstObject];
950
+ RNSScreenView *topMostScreen = (RNSScreenView *)_reactSubviews.lastObject;
951
+ UIView *headerConfig = topMostScreen.findHeaderConfig;
852
952
  if ([headerConfig isKindOfClass:[RNSScreenStackHeaderConfig class]]) {
853
953
  UIView *headerHitTestResult = [headerConfig hitTest:point withEvent:event];
854
954
  if (headerHitTestResult != nil) {
@@ -859,7 +959,7 @@ namespace react = facebook::react;
859
959
  return [super hitTest:point withEvent:event];
860
960
  }
861
961
 
862
- #if !TARGET_OS_TV
962
+ #if !TARGET_OS_TV && !TARGET_OS_VISION
863
963
 
864
964
  - (BOOL)isScrollViewPanGestureRecognizer:(UIGestureRecognizer *)gestureRecognizer
865
965
  {
@@ -960,6 +1060,33 @@ namespace react = facebook::react;
960
1060
  });
961
1061
  }
962
1062
 
1063
+ - (void)startScreenTransition
1064
+ {
1065
+ if (_interactionController == nil) {
1066
+ _customAnimation = YES;
1067
+ _interactionController = [UIPercentDrivenInteractiveTransition new];
1068
+ [_controller popViewControllerAnimated:YES];
1069
+ }
1070
+ }
1071
+
1072
+ - (void)updateScreenTransition:(double)progress
1073
+ {
1074
+ [_interactionController updateInteractiveTransition:progress];
1075
+ }
1076
+
1077
+ - (void)finishScreenTransition:(BOOL)canceled
1078
+ {
1079
+ _customAnimation = NO;
1080
+ if (canceled) {
1081
+ [_interactionController updateInteractiveTransition:0.0];
1082
+ [_interactionController cancelInteractiveTransition];
1083
+ } else {
1084
+ [_interactionController updateInteractiveTransition:1.0];
1085
+ [_interactionController finishInteractiveTransition];
1086
+ }
1087
+ _interactionController = nil;
1088
+ }
1089
+
963
1090
  #ifdef RCT_NEW_ARCH_ENABLED
964
1091
  #pragma mark - Fabric specific
965
1092
 
@@ -64,7 +64,10 @@ static const float RNSFadeCloseDelayTransitionDurationProportion = 0.1 / 0.35;
64
64
  }
65
65
 
66
66
  if (screen != nil) {
67
- if (screen.fullScreenSwipeEnabled && transitionContext.isInteractive) {
67
+ if ([screen.reactSuperview isKindOfClass:[RNSScreenStackView class]] &&
68
+ ((RNSScreenStackView *)(screen.reactSuperview)).customAnimation) {
69
+ [self animateWithNoAnimation:transitionContext toVC:toViewController fromVC:fromViewController];
70
+ } else if (screen.fullScreenSwipeEnabled && transitionContext.isInteractive) {
68
71
  // we are swiping with full width gesture
69
72
  if (screen.customAnimationOnSwipe) {
70
73
  [self animateTransitionWithStackAnimation:screen.stackAnimation
@@ -144,6 +147,64 @@ static const float RNSFadeCloseDelayTransitionDurationProportion = 0.1 / 0.35;
144
147
  }
145
148
  }
146
149
 
150
+ - (void)animateSlideFromLeftWithTransitionContext:(id<UIViewControllerContextTransitioning>)transitionContext
151
+ toVC:(UIViewController *)toViewController
152
+ fromVC:(UIViewController *)fromViewController
153
+ {
154
+ float containerWidth = transitionContext.containerView.bounds.size.width;
155
+ float belowViewWidth = containerWidth * 0.3;
156
+
157
+ CGAffineTransform rightTransform = CGAffineTransformMakeTranslation(-containerWidth, 0);
158
+ CGAffineTransform leftTransform = CGAffineTransformMakeTranslation(belowViewWidth, 0);
159
+
160
+ if (toViewController.navigationController.view.semanticContentAttribute ==
161
+ UISemanticContentAttributeForceRightToLeft) {
162
+ rightTransform = CGAffineTransformMakeTranslation(containerWidth, 0);
163
+ leftTransform = CGAffineTransformMakeTranslation(-belowViewWidth, 0);
164
+ }
165
+
166
+ if (_operation == UINavigationControllerOperationPush) {
167
+ toViewController.view.transform = rightTransform;
168
+ [[transitionContext containerView] addSubview:toViewController.view];
169
+ [UIView animateWithDuration:[self transitionDuration:transitionContext]
170
+ animations:^{
171
+ fromViewController.view.transform = leftTransform;
172
+ toViewController.view.transform = CGAffineTransformIdentity;
173
+ }
174
+ completion:^(BOOL finished) {
175
+ fromViewController.view.transform = CGAffineTransformIdentity;
176
+ toViewController.view.transform = CGAffineTransformIdentity;
177
+ [transitionContext completeTransition:![transitionContext transitionWasCancelled]];
178
+ }];
179
+ } else if (_operation == UINavigationControllerOperationPop) {
180
+ toViewController.view.transform = leftTransform;
181
+ [[transitionContext containerView] insertSubview:toViewController.view belowSubview:fromViewController.view];
182
+
183
+ void (^animationBlock)(void) = ^{
184
+ toViewController.view.transform = CGAffineTransformIdentity;
185
+ fromViewController.view.transform = rightTransform;
186
+ };
187
+ void (^completionBlock)(BOOL) = ^(BOOL finished) {
188
+ fromViewController.view.transform = CGAffineTransformIdentity;
189
+ toViewController.view.transform = CGAffineTransformIdentity;
190
+ [transitionContext completeTransition:![transitionContext transitionWasCancelled]];
191
+ };
192
+
193
+ if (!transitionContext.isInteractive) {
194
+ [UIView animateWithDuration:[self transitionDuration:transitionContext]
195
+ animations:animationBlock
196
+ completion:completionBlock];
197
+ } else {
198
+ // we don't want the EaseInOut option when swiping to dismiss the view, it is the same in default animation option
199
+ [UIView animateWithDuration:[self transitionDuration:transitionContext]
200
+ delay:0.0
201
+ options:UIViewAnimationOptionCurveLinear
202
+ animations:animationBlock
203
+ completion:completionBlock];
204
+ }
205
+ }
206
+ }
207
+
147
208
  - (void)animateFadeWithTransitionContext:(id<UIViewControllerContextTransitioning>)transitionContext
148
209
  toVC:(UIViewController *)toViewController
149
210
  fromVC:(UIViewController *)fromViewController
@@ -290,6 +351,30 @@ static const float RNSFadeCloseDelayTransitionDurationProportion = 0.1 / 0.35;
290
351
  }
291
352
  }
292
353
 
354
+ - (void)animateWithNoAnimation:(id<UIViewControllerContextTransitioning>)transitionContext
355
+ toVC:(UIViewController *)toViewController
356
+ fromVC:(UIViewController *)fromViewController
357
+ {
358
+ if (_operation == UINavigationControllerOperationPush) {
359
+ [[transitionContext containerView] addSubview:toViewController.view];
360
+ [UIView animateWithDuration:[self transitionDuration:transitionContext]
361
+ animations:^{
362
+ }
363
+ completion:^(BOOL finished) {
364
+ [transitionContext completeTransition:![transitionContext transitionWasCancelled]];
365
+ }];
366
+ } else if (_operation == UINavigationControllerOperationPop) {
367
+ [[transitionContext containerView] insertSubview:toViewController.view belowSubview:fromViewController.view];
368
+
369
+ [UIView animateWithDuration:[self transitionDuration:transitionContext]
370
+ animations:^{
371
+ }
372
+ completion:^(BOOL finished) {
373
+ [transitionContext completeTransition:![transitionContext transitionWasCancelled]];
374
+ }];
375
+ }
376
+ }
377
+
293
378
  + (BOOL)isCustomAnimation:(RNSScreenStackAnimation)animation
294
379
  {
295
380
  return (animation != RNSScreenStackAnimationFlip && animation != RNSScreenStackAnimationDefault);
@@ -303,6 +388,9 @@ static const float RNSFadeCloseDelayTransitionDurationProportion = 0.1 / 0.35;
303
388
  if (animation == RNSScreenStackAnimationSimplePush) {
304
389
  [self animateSimplePushWithTransitionContext:transitionContext toVC:toVC fromVC:fromVC];
305
390
  return;
391
+ } else if (animation == RNSScreenStackAnimationSlideFromLeft) {
392
+ [self animateSlideFromLeftWithTransitionContext:transitionContext toVC:toVC fromVC:fromVC];
393
+ return;
306
394
  } else if (animation == RNSScreenStackAnimationFade || animation == RNSScreenStackAnimationNone) {
307
395
  [self animateFadeWithTransitionContext:transitionContext toVC:toVC fromVC:fromVC];
308
396
  return;
@@ -227,7 +227,7 @@ namespace react = facebook::react;
227
227
  [navbar setTitleTextAttributes:attrs];
228
228
  }
229
229
 
230
- #if !TARGET_OS_TV
230
+ #if !TARGET_OS_TV && !TARGET_OS_VISION
231
231
  if (@available(iOS 11.0, *)) {
232
232
  if (config.largeTitle &&
233
233
  (config.largeTitleFontFamily || config.largeTitleFontSize || config.largeTitleFontWeight ||
@@ -397,9 +397,12 @@ namespace react = facebook::react;
397
397
  if (config.titleFontFamily || config.titleFontSize || config.titleFontWeight || config.titleColor) {
398
398
  NSMutableDictionary *attrs = [NSMutableDictionary new];
399
399
 
400
+ // Ignore changing header title color on visionOS
401
+ #if !TARGET_OS_VISION
400
402
  if (config.titleColor) {
401
403
  attrs[NSForegroundColorAttributeName] = config.titleColor;
402
404
  }
405
+ #endif
403
406
 
404
407
  NSString *family = config.titleFontFamily ?: nil;
405
408
  NSNumber *size = config.titleFontSize ?: @17;
@@ -422,9 +425,12 @@ namespace react = facebook::react;
422
425
  config.largeTitleColor || config.titleColor) {
423
426
  NSMutableDictionary *largeAttrs = [NSMutableDictionary new];
424
427
 
428
+ // Ignore changing header title color on visionOS
429
+ #if !TARGET_OS_VISION
425
430
  if (config.largeTitleColor || config.titleColor) {
426
431
  largeAttrs[NSForegroundColorAttributeName] = config.largeTitleColor ? config.largeTitleColor : config.titleColor;
427
432
  }
433
+ #endif
428
434
 
429
435
  NSString *largeFamily = config.largeTitleFontFamily ?: nil;
430
436
  NSNumber *largeSize = config.largeTitleFontSize ?: @34;
@@ -4,7 +4,7 @@
4
4
 
5
5
  + (void)updateWindowTraits;
6
6
 
7
- #if !TARGET_OS_TV
7
+ #if !TARGET_OS_TV && !TARGET_OS_VISION
8
8
  + (void)assertViewControllerBasedStatusBarAppearenceSet;
9
9
  #endif
10
10
  + (void)updateStatusBarAppearance;
@@ -4,7 +4,7 @@
4
4
 
5
5
  @implementation RNSScreenWindowTraits
6
6
 
7
- #if !TARGET_OS_TV
7
+ #if !TARGET_OS_TV && !TARGET_OS_VISION
8
8
  + (void)assertViewControllerBasedStatusBarAppearenceSet
9
9
  {
10
10
  static dispatch_once_t once;
@@ -22,21 +22,10 @@
22
22
 
23
23
  + (void)updateStatusBarAppearance
24
24
  {
25
- #if !TARGET_OS_TV
25
+ #if !TARGET_OS_TV && !TARGET_OS_VISION
26
26
  [UIView animateWithDuration:0.4
27
27
  animations:^{ // duration based on "Programming iOS 13" p. 311 implementation
28
- #if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && defined(__IPHONE_13_0) && \
29
- __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_13_0
30
- if (@available(iOS 13, *)) {
31
- UIWindow *firstWindow = [[[UIApplication sharedApplication] windows] firstObject];
32
- if (firstWindow != nil) {
33
- [[firstWindow rootViewController] setNeedsStatusBarAppearanceUpdate];
34
- }
35
- } else
36
- #endif
37
- {
38
- [UIApplication.sharedApplication.keyWindow.rootViewController setNeedsStatusBarAppearanceUpdate];
39
- }
28
+ [RCTKeyWindow().rootViewController setNeedsStatusBarAppearanceUpdate];
40
29
  }];
41
30
  #endif
42
31
  }
@@ -44,21 +33,7 @@
44
33
  + (void)updateHomeIndicatorAutoHidden
45
34
  {
46
35
  #if !TARGET_OS_TV
47
-
48
- #if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && defined(__IPHONE_13_0) && \
49
- __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_13_0
50
- if (@available(iOS 13, *)) {
51
- UIWindow *firstWindow = [[[UIApplication sharedApplication] windows] firstObject];
52
- if (firstWindow != nil) {
53
- [[firstWindow rootViewController] setNeedsUpdateOfHomeIndicatorAutoHidden];
54
- }
55
- } else
56
- #endif
57
- {
58
- if (@available(iOS 11.0, *)) {
59
- [UIApplication.sharedApplication.keyWindow.rootViewController setNeedsUpdateOfHomeIndicatorAutoHidden];
60
- }
61
- }
36
+ [RCTKeyWindow().rootViewController setNeedsUpdateOfHomeIndicatorAutoHidden];
62
37
  #endif
63
38
  }
64
39
 
@@ -134,21 +109,10 @@
134
109
 
135
110
  + (void)enforceDesiredDeviceOrientation
136
111
  {
137
- #if !TARGET_OS_TV
112
+ #if !TARGET_OS_TV && !TARGET_OS_VISION
138
113
  dispatch_async(dispatch_get_main_queue(), ^{
139
- UIInterfaceOrientationMask orientationMask = UIInterfaceOrientationMaskAllButUpsideDown;
140
- #if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && defined(__IPHONE_13_0) && \
141
- __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_13_0
142
- if (@available(iOS 13, *)) {
143
- UIWindow *firstWindow = [[[UIApplication sharedApplication] windows] firstObject];
144
- if (firstWindow != nil) {
145
- orientationMask = [firstWindow rootViewController].supportedInterfaceOrientations;
146
- }
147
- } else
148
- #endif
149
- {
150
- orientationMask = UIApplication.sharedApplication.keyWindow.rootViewController.supportedInterfaceOrientations;
151
- }
114
+ UIInterfaceOrientationMask orientationMask = [RCTKeyWindow().rootViewController supportedInterfaceOrientations];
115
+
152
116
  UIInterfaceOrientation currentDeviceOrientation =
153
117
  [RNSScreenWindowTraits interfaceOrientationFromDeviceOrientation:[[UIDevice currentDevice] orientation]];
154
118
  UIInterfaceOrientation currentInterfaceOrientation = [RNSScreenWindowTraits interfaceOrientation];
@@ -178,7 +142,21 @@
178
142
  __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_16_0
179
143
  if (@available(iOS 16.0, *)) {
180
144
  NSArray *array = [[[UIApplication sharedApplication] connectedScenes] allObjects];
181
- UIWindowScene *scene = (UIWindowScene *)array[0];
145
+
146
+ // when an app supports multiple scenes (e.g. CarPlay), it is possible that
147
+ // UIWindowScene is not the first scene, or it may not be present at all
148
+ UIWindowScene *scene = nil;
149
+ for (id connectedScene in array) {
150
+ if ([connectedScene isKindOfClass:[UIWindowScene class]]) {
151
+ scene = connectedScene;
152
+ break;
153
+ }
154
+ }
155
+
156
+ if (scene == nil) {
157
+ return;
158
+ }
159
+
182
160
  UIWindowSceneGeometryPreferencesIOS *geometryPreferences =
183
161
  [[UIWindowSceneGeometryPreferencesIOS alloc] initWithInterfaceOrientations:orientationMask];
184
162
  [scene requestGeometryUpdateWithPreferences:geometryPreferences
@@ -211,7 +189,7 @@
211
189
  [RNSScreenWindowTraits updateHomeIndicatorAutoHidden];
212
190
  }
213
191
 
214
- #if !TARGET_OS_TV
192
+ #if !TARGET_OS_TV && !TARGET_OS_VISION
215
193
  // based on
216
194
  // https://stackoverflow.com/questions/57965701/statusbarorientation-was-deprecated-in-ios-13-0-when-attempting-to-get-app-ori/61249908#61249908
217
195
  + (UIInterfaceOrientation)interfaceOrientation
@@ -219,11 +197,7 @@
219
197
  #if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && defined(__IPHONE_13_0) && \
220
198
  __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_13_0
221
199
  if (@available(iOS 13.0, *)) {
222
- UIWindow *firstWindow = [[[UIApplication sharedApplication] windows] firstObject];
223
- if (firstWindow == nil) {
224
- return UIInterfaceOrientationUnknown;
225
- }
226
- UIWindowScene *windowScene = firstWindow.windowScene;
200
+ UIWindowScene *windowScene = RCTKeyWindow().windowScene;
227
201
  if (windowScene == nil) {
228
202
  return UIInterfaceOrientationUnknown;
229
203
  }
@@ -50,7 +50,13 @@ namespace react = facebook::react;
50
50
 
51
51
  - (void)initCommonProps
52
52
  {
53
+ #if !TARGET_OS_TV
53
54
  _controller = [[UISearchController alloc] initWithSearchResultsController:nil];
55
+ #else
56
+ // on TVOS UISearchController must contain searchResultsController.
57
+ _controller = [[UISearchController alloc] initWithSearchResultsController:[UIViewController new]];
58
+ #endif
59
+
54
60
  _controller.searchBar.delegate = self;
55
61
  _hideWhenScrolling = YES;
56
62
  _placement = RNSSearchBarPlacementStacked;
@@ -304,6 +310,14 @@ namespace react = facebook::react;
304
310
  [_controller.searchBar setText:text];
305
311
  }
306
312
 
313
+ - (void)cancelSearch
314
+ {
315
+ #if !TARGET_OS_TV
316
+ [self searchBarCancelButtonClicked:_controller.searchBar];
317
+ _controller.active = NO;
318
+ #endif
319
+ }
320
+
307
321
  #pragma mark-- Fabric specific
308
322
 
309
323
  #ifdef RCT_NEW_ARCH_ENABLED
@@ -330,9 +344,11 @@ namespace react = facebook::react;
330
344
  [self setPlaceholder:RCTNSStringFromStringNilIfEmpty(newScreenProps.placeholder)];
331
345
  }
332
346
 
347
+ #if !TARGET_OS_VISION
333
348
  if (oldScreenProps.autoCapitalize != newScreenProps.autoCapitalize) {
334
349
  [self setAutoCapitalize:[RNSConvert UITextAutocapitalizationTypeFromCppEquivalent:newScreenProps.autoCapitalize]];
335
350
  }
351
+ #endif
336
352
 
337
353
  if (oldScreenProps.tintColor != newScreenProps.tintColor) {
338
354
  [self setTintColor:RCTUIColorFromSharedColor(newScreenProps.tintColor)];
@@ -446,6 +462,14 @@ RCT_EXPORT_METHOD(setText : (NSNumber *_Nonnull)reactTag text : (NSString *)text
446
462
  }];
447
463
  }
448
464
 
465
+ RCT_EXPORT_METHOD(cancelSearch : (NSNumber *_Nonnull)reactTag)
466
+ {
467
+ [self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *uiManager, NSDictionary *viewRegistry) {
468
+ RNSSearchBar *searchBar = viewRegistry[reactTag];
469
+ [searchBar cancelSearch];
470
+ }];
471
+ }
472
+
449
473
  #endif /* !RCT_NEW_ARCH_ENABLED */
450
474
 
451
475
  @end
@@ -1,3 +1,5 @@
1
+ #import <UIKit/UIKit.h>
2
+
1
3
  @interface RNSUIBarButtonItem : UIBarButtonItem
2
4
 
3
5
  @property (nonatomic) BOOL menuHidden;
@@ -5,8 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  var React = _interopRequireWildcard(require("react"));
8
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
9
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
10
- var _default = /*#__PURE__*/React.createContext(undefined);
11
- exports.default = _default;
8
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
9
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
10
+ var _default = exports.default = /*#__PURE__*/React.createContext(undefined);
12
11
  //# sourceMappingURL=TransitionProgressContext.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","_interopRequireWildcard","require","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_default","createContext","undefined","exports"],"sources":["TransitionProgressContext.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Animated } from 'react-native';\n\ntype TransitionProgressContextBody = {\n progress: Animated.Value;\n closing: Animated.Value;\n goingForward: Animated.Value;\n};\n\nexport default React.createContext<TransitionProgressContextBody | undefined>(\n undefined\n);\n"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA+B,SAAAC,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAH,wBAAAO,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAV,GAAA,EAAAW,GAAA,cAAAI,IAAA,KAAAA,IAAA,CAAAV,GAAA,IAAAU,IAAA,CAAAC,GAAA,KAAAR,MAAA,CAAAC,cAAA,CAAAH,MAAA,EAAAK,GAAA,EAAAI,IAAA,YAAAT,MAAA,CAAAK,GAAA,IAAAX,GAAA,CAAAW,GAAA,SAAAL,MAAA,CAAAJ,OAAA,GAAAF,GAAA,MAAAG,KAAA,IAAAA,KAAA,CAAAa,GAAA,CAAAhB,GAAA,EAAAM,MAAA,YAAAA,MAAA;AAAA,IAAAW,QAAA,gBAShBzB,KAAK,CAAC0B,aAAa,CAChCC,SACF,CAAC;AAAAC,OAAA,CAAAlB,OAAA,GAAAe,QAAA"}
1
+ {"version":3,"names":["React","_interopRequireWildcard","require","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","_default","exports","createContext","undefined"],"sourceRoot":"../../src","sources":["TransitionProgressContext.tsx"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA+B,SAAAC,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAH,wBAAAG,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAjB,CAAA,EAAAc,CAAA,SAAAI,CAAA,GAAAR,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,EAAAc,CAAA,UAAAI,CAAA,KAAAA,CAAA,CAAAX,GAAA,IAAAW,CAAA,CAAAC,GAAA,IAAAR,MAAA,CAAAC,cAAA,CAAAJ,CAAA,EAAAM,CAAA,EAAAI,CAAA,IAAAV,CAAA,CAAAM,CAAA,IAAAd,CAAA,CAAAc,CAAA,YAAAN,CAAA,CAAAH,OAAA,GAAAL,CAAA,EAAAG,CAAA,IAAAA,CAAA,CAAAgB,GAAA,CAAAnB,CAAA,EAAAQ,CAAA,GAAAA,CAAA;AAAA,IAAAY,QAAA,GAAAC,OAAA,CAAAhB,OAAA,gBAShBT,KAAK,CAAC0B,aAAa,CAChCC,SACF,CAAC"}