react-native-screens 3.20.0 → 3.21.1

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 (210) hide show
  1. package/README.md +4 -1
  2. package/RNScreens.podspec +1 -1
  3. package/android/build.gradle +24 -6
  4. package/android/src/main/java/com/swmansion/rnscreens/CustomSearchView.kt +4 -0
  5. package/android/src/main/java/com/swmansion/rnscreens/LifecycleHelper.kt +60 -0
  6. package/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderConfig.kt +7 -9
  7. package/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderConfigViewManager.kt +12 -4
  8. package/android/src/main/java/com/swmansion/rnscreens/ScreenViewManager.kt +10 -0
  9. package/android/src/main/java/com/swmansion/rnscreens/SearchBarManager.kt +32 -8
  10. package/android/src/main/java/com/swmansion/rnscreens/SearchBarView.kt +36 -15
  11. package/android/src/main/java/com/swmansion/rnscreens/events/HeaderAttachedEvent.kt +24 -0
  12. package/android/src/main/java/com/swmansion/rnscreens/events/HeaderDetachedEvent.kt +24 -0
  13. package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarBlurEvent.kt +24 -0
  14. package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarChangeTextEvent.kt +29 -0
  15. package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarCloseEvent.kt +24 -0
  16. package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarFocusEvent.kt +24 -0
  17. package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarOpenEvent.kt +24 -0
  18. package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarSearchButtonPressEvent.kt +26 -0
  19. package/android/src/main/res/base/anim/rns_standard_accelerate_interpolator.xml +6 -0
  20. package/android/src/main/res/v33/anim-v33/rns_default_enter_in.xml +38 -0
  21. package/android/src/main/res/v33/anim-v33/rns_default_enter_out.xml +38 -0
  22. package/android/src/main/res/v33/anim-v33/rns_default_exit_in.xml +38 -0
  23. package/android/src/main/res/v33/anim-v33/rns_default_exit_out.xml +38 -0
  24. package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenManagerDelegate.java +15 -0
  25. package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenManagerInterface.java +5 -0
  26. package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenStackHeaderConfigManagerDelegate.java +3 -0
  27. package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenStackHeaderConfigManagerInterface.java +1 -0
  28. package/common/cpp/react/renderer/components/rnscreens/RNSScreenState.h +1 -2
  29. package/ios/RCTImageComponentView+RNSScreenStackHeaderConfig.h +11 -0
  30. package/ios/RCTImageComponentView+RNSScreenStackHeaderConfig.mm +14 -0
  31. package/ios/RNSConvert.h +8 -2
  32. package/ios/RNSConvert.mm +28 -2
  33. package/ios/RNSEnums.h +6 -0
  34. package/ios/RNSFullWindowOverlay.h +5 -5
  35. package/ios/RNSFullWindowOverlay.mm +13 -13
  36. package/ios/RNSScreen.h +14 -6
  37. package/ios/RNSScreen.mm +129 -28
  38. package/ios/RNSScreenContainer.h +2 -2
  39. package/ios/RNSScreenContainer.mm +5 -5
  40. package/ios/RNSScreenNavigationContainer.mm +3 -3
  41. package/ios/RNSScreenStack.h +4 -4
  42. package/ios/RNSScreenStack.mm +62 -23
  43. package/ios/RNSScreenStackHeaderConfig.h +10 -3
  44. package/ios/RNSScreenStackHeaderConfig.mm +138 -81
  45. package/ios/RNSScreenStackHeaderSubview.h +5 -6
  46. package/ios/RNSScreenStackHeaderSubview.mm +20 -11
  47. package/ios/RNSScreenWindowTraits.mm +21 -2
  48. package/ios/RNSSearchBar.h +5 -4
  49. package/ios/RNSSearchBar.mm +87 -12
  50. package/lib/commonjs/TransitionProgressContext.js.map +1 -1
  51. package/lib/commonjs/fabric/FullWindowOverlayNativeComponent.js +0 -5
  52. package/lib/commonjs/fabric/FullWindowOverlayNativeComponent.js.map +1 -1
  53. package/lib/commonjs/fabric/ScreenContainerNativeComponent.js +0 -5
  54. package/lib/commonjs/fabric/ScreenContainerNativeComponent.js.map +1 -1
  55. package/lib/commonjs/fabric/ScreenNativeComponent.js +0 -5
  56. package/lib/commonjs/fabric/ScreenNativeComponent.js.map +1 -1
  57. package/lib/commonjs/fabric/ScreenNavigationContainerNativeComponent.js +0 -5
  58. package/lib/commonjs/fabric/ScreenNavigationContainerNativeComponent.js.map +1 -1
  59. package/lib/commonjs/fabric/ScreenStackHeaderConfigNativeComponent.js +0 -8
  60. package/lib/commonjs/fabric/ScreenStackHeaderConfigNativeComponent.js.map +1 -1
  61. package/lib/commonjs/fabric/ScreenStackHeaderSubviewNativeComponent.js +0 -8
  62. package/lib/commonjs/fabric/ScreenStackHeaderSubviewNativeComponent.js.map +1 -1
  63. package/lib/commonjs/fabric/ScreenStackNativeComponent.js +0 -5
  64. package/lib/commonjs/fabric/ScreenStackNativeComponent.js.map +1 -1
  65. package/lib/commonjs/fabric/SearchBarNativeComponent.js +7 -7
  66. package/lib/commonjs/fabric/SearchBarNativeComponent.js.map +1 -1
  67. package/lib/commonjs/index.js +8 -1
  68. package/lib/commonjs/index.js.map +1 -1
  69. package/lib/commonjs/index.native.js +51 -10
  70. package/lib/commonjs/index.native.js.map +1 -1
  71. package/lib/commonjs/native-stack/index.js.map +1 -1
  72. package/lib/commonjs/native-stack/navigators/createNativeStackNavigator.js +18 -16
  73. package/lib/commonjs/native-stack/navigators/createNativeStackNavigator.js.map +1 -1
  74. package/lib/commonjs/native-stack/types.js.map +1 -1
  75. package/lib/commonjs/native-stack/utils/HeaderHeightContext.js.map +1 -1
  76. package/lib/commonjs/native-stack/utils/SafeAreaProviderCompat.js.map +1 -1
  77. package/lib/commonjs/native-stack/utils/getDefaultHeaderHeight.js.map +1 -1
  78. package/lib/commonjs/native-stack/utils/useBackPressSubscription.js.map +1 -1
  79. package/lib/commonjs/native-stack/utils/useHeaderHeight.js.map +1 -1
  80. package/lib/commonjs/native-stack/views/FontProcessor.js +1 -0
  81. package/lib/commonjs/native-stack/views/FontProcessor.js.map +1 -1
  82. package/lib/commonjs/native-stack/views/HeaderConfig.js +3 -1
  83. package/lib/commonjs/native-stack/views/HeaderConfig.js.map +1 -1
  84. package/lib/commonjs/native-stack/views/NativeStackView.js +14 -1
  85. package/lib/commonjs/native-stack/views/NativeStackView.js.map +1 -1
  86. package/lib/commonjs/reanimated/ReanimatedNativeStackScreen.js.map +1 -1
  87. package/lib/commonjs/reanimated/ReanimatedScreen.js.map +1 -1
  88. package/lib/commonjs/reanimated/ReanimatedScreenProvider.js.map +1 -1
  89. package/lib/commonjs/reanimated/ReanimatedTransitionProgressContext.js.map +1 -1
  90. package/lib/commonjs/reanimated/index.js.map +1 -1
  91. package/lib/commonjs/reanimated/useReanimatedTransitionProgress.js.map +1 -1
  92. package/lib/commonjs/types.js.map +1 -1
  93. package/lib/commonjs/useTransitionProgress.js.map +1 -1
  94. package/lib/commonjs/utils.js +8 -1
  95. package/lib/commonjs/utils.js.map +1 -1
  96. package/lib/module/fabric/FullWindowOverlayNativeComponent.js +0 -5
  97. package/lib/module/fabric/FullWindowOverlayNativeComponent.js.map +1 -1
  98. package/lib/module/fabric/ScreenContainerNativeComponent.js +0 -5
  99. package/lib/module/fabric/ScreenContainerNativeComponent.js.map +1 -1
  100. package/lib/module/fabric/ScreenNativeComponent.js +0 -5
  101. package/lib/module/fabric/ScreenNativeComponent.js.map +1 -1
  102. package/lib/module/fabric/ScreenNavigationContainerNativeComponent.js +0 -5
  103. package/lib/module/fabric/ScreenNavigationContainerNativeComponent.js.map +1 -1
  104. package/lib/module/fabric/ScreenStackHeaderConfigNativeComponent.js +0 -6
  105. package/lib/module/fabric/ScreenStackHeaderConfigNativeComponent.js.map +1 -1
  106. package/lib/module/fabric/ScreenStackHeaderSubviewNativeComponent.js +0 -6
  107. package/lib/module/fabric/ScreenStackHeaderSubviewNativeComponent.js.map +1 -1
  108. package/lib/module/fabric/ScreenStackNativeComponent.js +0 -5
  109. package/lib/module/fabric/ScreenStackNativeComponent.js.map +1 -1
  110. package/lib/module/fabric/SearchBarNativeComponent.js +4 -6
  111. package/lib/module/fabric/SearchBarNativeComponent.js.map +1 -1
  112. package/lib/module/index.js +2 -2
  113. package/lib/module/index.js.map +1 -1
  114. package/lib/module/index.native.js +53 -11
  115. package/lib/module/index.native.js.map +1 -1
  116. package/lib/module/native-stack/navigators/createNativeStackNavigator.js +18 -16
  117. package/lib/module/native-stack/navigators/createNativeStackNavigator.js.map +1 -1
  118. package/lib/module/native-stack/types.js.map +1 -1
  119. package/lib/module/native-stack/utils/SafeAreaProviderCompat.js.map +1 -1
  120. package/lib/module/native-stack/utils/getDefaultHeaderHeight.js.map +1 -1
  121. package/lib/module/native-stack/utils/useBackPressSubscription.js.map +1 -1
  122. package/lib/module/native-stack/utils/useHeaderHeight.js.map +1 -1
  123. package/lib/module/native-stack/views/FontProcessor.js +1 -0
  124. package/lib/module/native-stack/views/FontProcessor.js.map +1 -1
  125. package/lib/module/native-stack/views/HeaderConfig.js +3 -1
  126. package/lib/module/native-stack/views/HeaderConfig.js.map +1 -1
  127. package/lib/module/native-stack/views/NativeStackView.js +15 -1
  128. package/lib/module/native-stack/views/NativeStackView.js.map +1 -1
  129. package/lib/module/reanimated/ReanimatedNativeStackScreen.js.map +1 -1
  130. package/lib/module/reanimated/ReanimatedScreen.js.map +1 -1
  131. package/lib/module/reanimated/ReanimatedScreenProvider.js.map +1 -1
  132. package/lib/module/reanimated/useReanimatedTransitionProgress.js.map +1 -1
  133. package/lib/module/types.js.map +1 -1
  134. package/lib/module/useTransitionProgress.js.map +1 -1
  135. package/lib/module/utils.js +6 -0
  136. package/lib/module/utils.js.map +1 -1
  137. package/lib/typescript/TransitionProgressContext.d.ts +1 -1
  138. package/lib/typescript/fabric/FullWindowOverlayNativeComponent.d.ts +6 -0
  139. package/lib/typescript/fabric/ScreenContainerNativeComponent.d.ts +6 -0
  140. package/lib/typescript/fabric/ScreenNativeComponent.d.ts +62 -0
  141. package/lib/typescript/fabric/ScreenNavigationContainerNativeComponent.d.ts +6 -0
  142. package/lib/typescript/fabric/ScreenStackHeaderConfigNativeComponent.d.ts +34 -0
  143. package/lib/typescript/fabric/ScreenStackHeaderSubviewNativeComponent.d.ts +9 -0
  144. package/lib/typescript/fabric/ScreenStackNativeComponent.d.ts +9 -0
  145. package/lib/typescript/fabric/SearchBarNativeComponent.d.ts +46 -0
  146. package/lib/typescript/index.d.ts +3 -3
  147. package/lib/typescript/native-stack/types.d.ts +64 -10
  148. package/lib/typescript/native-stack/utils/SafeAreaProviderCompat.d.ts +1 -1
  149. package/lib/typescript/native-stack/utils/getDefaultHeaderHeight.d.ts +1 -1
  150. package/lib/typescript/native-stack/views/HeaderConfig.d.ts +1 -1
  151. package/lib/typescript/native-stack/views/NativeStackView.d.ts +1 -1
  152. package/lib/typescript/reanimated/ReanimatedNativeStackScreen.d.ts +1 -1
  153. package/lib/typescript/reanimated/ReanimatedScreen.d.ts +1 -1
  154. package/lib/typescript/reanimated/ReanimatedTransitionProgressContext.d.ts +1 -1
  155. package/lib/typescript/types.d.ts +90 -11
  156. package/lib/typescript/useTransitionProgress.d.ts +3 -3
  157. package/lib/typescript/utils.d.ts +1 -0
  158. package/native-stack/README.md +59 -1
  159. package/package.json +11 -14
  160. package/src/fabric/FullWindowOverlayNativeComponent.ts +6 -0
  161. package/src/fabric/ScreenContainerNativeComponent.ts +6 -0
  162. package/src/fabric/ScreenNativeComponent.ts +97 -0
  163. package/src/fabric/ScreenNavigationContainerNativeComponent.ts +9 -0
  164. package/src/fabric/ScreenStackHeaderConfigNativeComponent.ts +43 -0
  165. package/src/fabric/ScreenStackHeaderSubviewNativeComponent.ts +20 -0
  166. package/src/fabric/ScreenStackNativeComponent.ts +12 -0
  167. package/src/fabric/SearchBarNativeComponent.ts +73 -0
  168. package/src/index.native.tsx +109 -14
  169. package/src/index.tsx +5 -3
  170. package/src/native-stack/navigators/createNativeStackNavigator.tsx +23 -19
  171. package/src/native-stack/types.tsx +55 -0
  172. package/src/native-stack/views/FontProcessor.tsx +1 -0
  173. package/src/native-stack/views/HeaderConfig.tsx +3 -1
  174. package/src/native-stack/views/NativeStackView.tsx +14 -2
  175. package/src/types.tsx +84 -2
  176. package/src/utils.ts +6 -0
  177. package/createNativeStackNavigator/README.md +0 -522
  178. package/createNativeStackNavigator/package.json +0 -6
  179. package/lib/commonjs/createNativeStackNavigator.js +0 -374
  180. package/lib/commonjs/createNativeStackNavigator.js.map +0 -1
  181. package/lib/module/createNativeStackNavigator.js +0 -366
  182. package/lib/module/createNativeStackNavigator.js.map +0 -1
  183. package/lib/typescript/createNativeStackNavigator.d.ts +0 -51
  184. package/src/createNativeStackNavigator.tsx +0 -594
  185. package/src/fabric/FullWindowOverlayNativeComponent.js +0 -19
  186. package/src/fabric/ScreenContainerNativeComponent.js +0 -19
  187. package/src/fabric/ScreenNativeComponent.js +0 -97
  188. package/src/fabric/ScreenNavigationContainerNativeComponent.js +0 -19
  189. package/src/fabric/ScreenStackHeaderConfigNativeComponent.js +0 -54
  190. package/src/fabric/ScreenStackHeaderSubviewNativeComponent.js +0 -31
  191. package/src/fabric/ScreenStackNativeComponent.js +0 -23
  192. package/src/fabric/SearchBarNativeComponent.js +0 -62
  193. /package/android/src/main/res/{anim → base/anim}/rns_default_enter_in.xml +0 -0
  194. /package/android/src/main/res/{anim → base/anim}/rns_default_enter_out.xml +0 -0
  195. /package/android/src/main/res/{anim → base/anim}/rns_default_exit_in.xml +0 -0
  196. /package/android/src/main/res/{anim → base/anim}/rns_default_exit_out.xml +0 -0
  197. /package/android/src/main/res/{anim → base/anim}/rns_fade_from_bottom.xml +0 -0
  198. /package/android/src/main/res/{anim → base/anim}/rns_fade_in.xml +0 -0
  199. /package/android/src/main/res/{anim → base/anim}/rns_fade_out.xml +0 -0
  200. /package/android/src/main/res/{anim → base/anim}/rns_fade_to_bottom.xml +0 -0
  201. /package/android/src/main/res/{anim → base/anim}/rns_no_animation_20.xml +0 -0
  202. /package/android/src/main/res/{anim → base/anim}/rns_no_animation_250.xml +0 -0
  203. /package/android/src/main/res/{anim → base/anim}/rns_no_animation_350.xml +0 -0
  204. /package/android/src/main/res/{anim → base/anim}/rns_no_animation_medium.xml +0 -0
  205. /package/android/src/main/res/{anim → base/anim}/rns_slide_in_from_bottom.xml +0 -0
  206. /package/android/src/main/res/{anim → base/anim}/rns_slide_in_from_left.xml +0 -0
  207. /package/android/src/main/res/{anim → base/anim}/rns_slide_in_from_right.xml +0 -0
  208. /package/android/src/main/res/{anim → base/anim}/rns_slide_out_to_bottom.xml +0 -0
  209. /package/android/src/main/res/{anim → base/anim}/rns_slide_out_to_left.xml +0 -0
  210. /package/android/src/main/res/{anim → base/anim}/rns_slide_out_to_right.xml +0 -0
@@ -1 +1 @@
1
- {"version":3,"names":["useTheme","React","Platform","ScreenStackHeaderBackButtonImage","ScreenStackHeaderCenterView","ScreenStackHeaderConfig","ScreenStackHeaderLeftView","ScreenStackHeaderRightView","ScreenStackHeaderSearchBarView","SearchBar","isSearchBarAvailableForCurrentPlatform","executeNativeBackPress","useBackPressSubscription","processFonts","HeaderConfig","backButtonImage","backButtonInCustomView","direction","disableBackButtonMenu","headerBackTitle","headerBackTitleStyle","headerBackTitleVisible","headerCenter","headerHideBackButton","headerHideShadow","headerLargeStyle","headerLargeTitle","headerLargeTitleHideShadow","headerLargeTitleStyle","headerLeft","headerRight","headerShown","headerStyle","headerTintColor","headerTitle","headerTitleStyle","headerTopInsetEnabled","headerTranslucent","route","searchBar","title","colors","tintColor","primary","handleAttached","handleDetached","clearSubscription","createSubscription","onBackPress","isDisabled","disableBackButtonOverride","backTitleFontFamily","largeTitleFontFamily","titleFontFamily","fontFamily","useEffect","processedSearchBarOptions","useMemo","OS","onFocus","args","onClose","backgroundColor","card","fontSize","blurEffect","color","fontWeight","undefined","name","text"],"sources":["HeaderConfig.tsx"],"sourcesContent":["import { Route, useTheme } from '@react-navigation/native';\nimport * as React from 'react';\nimport { Platform } from 'react-native';\nimport {\n ScreenStackHeaderBackButtonImage,\n ScreenStackHeaderCenterView,\n ScreenStackHeaderConfig,\n ScreenStackHeaderLeftView,\n ScreenStackHeaderRightView,\n ScreenStackHeaderSearchBarView,\n SearchBar,\n SearchBarProps,\n isSearchBarAvailableForCurrentPlatform,\n executeNativeBackPress,\n} from 'react-native-screens';\nimport { NativeStackNavigationOptions } from '../types';\nimport { useBackPressSubscription } from '../utils/useBackPressSubscription';\nimport { processFonts } from './FontProcessor';\n\ntype Props = NativeStackNavigationOptions & {\n route: Route<string>;\n};\n\nexport default function HeaderConfig({\n backButtonImage,\n backButtonInCustomView,\n direction,\n disableBackButtonMenu,\n headerBackTitle,\n headerBackTitleStyle = {},\n headerBackTitleVisible = true,\n headerCenter,\n headerHideBackButton,\n headerHideShadow,\n headerLargeStyle = {},\n headerLargeTitle,\n headerLargeTitleHideShadow,\n headerLargeTitleStyle = {},\n headerLeft,\n headerRight,\n headerShown,\n headerStyle = {},\n headerTintColor,\n headerTitle,\n headerTitleStyle = {},\n headerTopInsetEnabled = true,\n headerTranslucent,\n route,\n searchBar,\n title,\n}: Props): JSX.Element {\n const { colors } = useTheme();\n const tintColor = headerTintColor ?? colors.primary;\n\n // We need to use back press subscription here to override back button behavior on JS side.\n // Because screens are usually used with react-navigation and this library overrides back button\n // we need to handle it first in case when search bar is open\n const {\n handleAttached,\n handleDetached,\n clearSubscription,\n createSubscription,\n } = useBackPressSubscription({\n onBackPress: executeNativeBackPress,\n isDisabled: !searchBar || !!searchBar.disableBackButtonOverride,\n });\n\n const [backTitleFontFamily, largeTitleFontFamily, titleFontFamily] =\n processFonts([\n headerBackTitleStyle.fontFamily,\n headerLargeTitleStyle.fontFamily,\n headerTitleStyle.fontFamily,\n ]);\n\n // We want to clear clearSubscription only when components unmounts or search bar changes\n React.useEffect(() => clearSubscription, [searchBar]);\n\n const processedSearchBarOptions = React.useMemo(() => {\n if (\n Platform.OS === 'android' &&\n searchBar &&\n !searchBar.disableBackButtonOverride\n ) {\n const onFocus: SearchBarProps['onFocus'] = (...args) => {\n createSubscription();\n searchBar.onFocus?.(...args);\n };\n const onClose: SearchBarProps['onClose'] = (...args) => {\n clearSubscription();\n searchBar.onClose?.(...args);\n };\n\n return { ...searchBar, onFocus, onClose };\n }\n return searchBar;\n }, [searchBar, createSubscription, clearSubscription]);\n\n return (\n <ScreenStackHeaderConfig\n backButtonInCustomView={backButtonInCustomView}\n backgroundColor={\n headerStyle.backgroundColor ? headerStyle.backgroundColor : colors.card\n }\n backTitle={headerBackTitleVisible ? headerBackTitle : ' '}\n backTitleFontFamily={backTitleFontFamily}\n backTitleFontSize={headerBackTitleStyle.fontSize}\n blurEffect={headerStyle.blurEffect}\n color={tintColor}\n direction={direction}\n disableBackButtonMenu={disableBackButtonMenu}\n hidden={headerShown === false}\n hideBackButton={headerHideBackButton}\n hideShadow={headerHideShadow}\n largeTitle={headerLargeTitle}\n largeTitleBackgroundColor={headerLargeStyle.backgroundColor}\n largeTitleColor={headerLargeTitleStyle.color}\n largeTitleFontFamily={largeTitleFontFamily}\n largeTitleFontSize={headerLargeTitleStyle.fontSize}\n largeTitleFontWeight={headerLargeTitleStyle.fontWeight}\n largeTitleHideShadow={headerLargeTitleHideShadow}\n title={\n headerTitle !== undefined\n ? headerTitle\n : title !== undefined\n ? title\n : route.name\n }\n titleColor={\n headerTitleStyle.color !== undefined\n ? headerTitleStyle.color\n : headerTintColor !== undefined\n ? headerTintColor\n : colors.text\n }\n titleFontFamily={titleFontFamily}\n titleFontSize={headerTitleStyle.fontSize}\n titleFontWeight={headerTitleStyle.fontWeight}\n topInsetEnabled={headerTopInsetEnabled}\n translucent={headerTranslucent === true}\n onAttached={handleAttached}\n onDetached={handleDetached}\n >\n {headerRight !== undefined ? (\n <ScreenStackHeaderRightView>\n {headerRight({ tintColor })}\n </ScreenStackHeaderRightView>\n ) : null}\n {backButtonImage !== undefined ? (\n <ScreenStackHeaderBackButtonImage\n key=\"backImage\"\n source={backButtonImage}\n />\n ) : null}\n {headerLeft !== undefined ? (\n <ScreenStackHeaderLeftView>\n {headerLeft({ tintColor })}\n </ScreenStackHeaderLeftView>\n ) : null}\n {headerCenter !== undefined ? (\n <ScreenStackHeaderCenterView>\n {headerCenter({ tintColor })}\n </ScreenStackHeaderCenterView>\n ) : null}\n {isSearchBarAvailableForCurrentPlatform &&\n processedSearchBarOptions !== undefined ? (\n <ScreenStackHeaderSearchBarView>\n <SearchBar {...processedSearchBarOptions} />\n </ScreenStackHeaderSearchBarView>\n ) : null}\n </ScreenStackHeaderConfig>\n );\n}\n"],"mappings":"AAAA,SAAgBA,QAAQ,QAAQ,0BAA0B;AAC1D,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,cAAc;AACvC,SACEC,gCAAgC,EAChCC,2BAA2B,EAC3BC,uBAAuB,EACvBC,yBAAyB,EACzBC,0BAA0B,EAC1BC,8BAA8B,EAC9BC,SAAS,EAETC,sCAAsC,EACtCC,sBAAsB,QACjB,sBAAsB;AAE7B,SAASC,wBAAwB,QAAQ,mCAAmC;AAC5E,SAASC,YAAY,QAAQ,iBAAiB;AAM9C,eAAe,SAASC,YAAY,OA2Bb;EAAA,IA3Bc;IACnCC,eAAe;IACfC,sBAAsB;IACtBC,SAAS;IACTC,qBAAqB;IACrBC,eAAe;IACfC,oBAAoB,GAAG,CAAC,CAAC;IACzBC,sBAAsB,GAAG,IAAI;IAC7BC,YAAY;IACZC,oBAAoB;IACpBC,gBAAgB;IAChBC,gBAAgB,GAAG,CAAC,CAAC;IACrBC,gBAAgB;IAChBC,0BAA0B;IAC1BC,qBAAqB,GAAG,CAAC,CAAC;IAC1BC,UAAU;IACVC,WAAW;IACXC,WAAW;IACXC,WAAW,GAAG,CAAC,CAAC;IAChBC,eAAe;IACfC,WAAW;IACXC,gBAAgB,GAAG,CAAC,CAAC;IACrBC,qBAAqB,GAAG,IAAI;IAC5BC,iBAAiB;IACjBC,KAAK;IACLC,SAAS;IACTC;EACK,CAAC;EACN,MAAM;IAAEC;EAAO,CAAC,GAAGzC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,UAAW;IAC7C,eAAe,EAAE/B,qBAAsB;IACvC,WAAW,EAAEC,iBAAiB,KAAK,IAAK;IACxC,UAAU,EAAEO,cAAe;IAC3B,UAAU,EAAEC;EAAe,GAE1Bf,WAAW,KAAKsC,SAAS,gBACxB,oBAAC,0BAA0B,QACxBtC,WAAW,CAAC;IAAEY;EAAU,CAAC,CAAC,CACA,GAC3B,IAAI,EACP3B,eAAe,KAAKqD,SAAS,gBAC5B,oBAAC,gCAAgC;IAC/B,GAAG,EAAC,WAAW;IACf,MAAM,EAAErD;EAAgB,EACxB,GACA,IAAI,EACPc,UAAU,KAAKuC,SAAS,gBACvB,oBAAC,yBAAyB,QACvBvC,UAAU,CAAC;IAAEa;EAAU,CAAC,CAAC,CACA,GAC1B,IAAI,EACPpB,YAAY,KAAK8C,SAAS,gBACzB,oBAAC,2BAA2B,QACzB9C,YAAY,CAAC;IAAEoB;EAAU,CAAC,CAAC,CACA,GAC5B,IAAI,EACPhC,sCAAsC,IACvC8C,yBAAyB,KAAKY,SAAS,gBACrC,oBAAC,8BAA8B,qBAC7B,oBAAC,SAAS,EAAKZ,yBAAyB,CAAI,CACb,GAC/B,IAAI,CACgB;AAE9B"}
1
+ {"version":3,"names":["useTheme","React","Platform","ScreenStackHeaderBackButtonImage","ScreenStackHeaderCenterView","ScreenStackHeaderConfig","ScreenStackHeaderLeftView","ScreenStackHeaderRightView","ScreenStackHeaderSearchBarView","SearchBar","isSearchBarAvailableForCurrentPlatform","executeNativeBackPress","useBackPressSubscription","processFonts","HeaderConfig","_ref","backButtonImage","backButtonInCustomView","direction","disableBackButtonMenu","headerBackTitle","headerBackTitleStyle","headerBackTitleVisible","headerCenter","headerHideBackButton","headerHideShadow","headerLargeStyle","headerLargeTitle","headerLargeTitleHideShadow","headerLargeTitleStyle","headerLeft","headerRight","headerShown","headerStyle","headerTintColor","headerTitle","headerTitleStyle","headerTopInsetEnabled","headerTranslucent","route","searchBar","title","colors","tintColor","primary","handleAttached","handleDetached","clearSubscription","createSubscription","onBackPress","isDisabled","disableBackButtonOverride","backTitleFontFamily","largeTitleFontFamily","titleFontFamily","fontFamily","useEffect","processedSearchBarOptions","useMemo","OS","onFocus","_searchBar$onFocus","_len","arguments","length","args","Array","_key","call","onClose","_searchBar$onClose","_len2","_key2","createElement","backgroundColor","card","backTitle","backTitleFontSize","fontSize","backTitleVisible","blurEffect","color","hidden","hideBackButton","hideShadow","largeTitle","largeTitleBackgroundColor","largeTitleColor","largeTitleFontSize","largeTitleFontWeight","fontWeight","largeTitleHideShadow","undefined","name","titleColor","text","titleFontSize","titleFontWeight","topInsetEnabled","translucent","onAttached","onDetached","key","source"],"sources":["HeaderConfig.tsx"],"sourcesContent":["import { Route, useTheme } from '@react-navigation/native';\nimport * as React from 'react';\nimport { Platform } from 'react-native';\nimport {\n ScreenStackHeaderBackButtonImage,\n ScreenStackHeaderCenterView,\n ScreenStackHeaderConfig,\n ScreenStackHeaderLeftView,\n ScreenStackHeaderRightView,\n ScreenStackHeaderSearchBarView,\n SearchBar,\n SearchBarProps,\n isSearchBarAvailableForCurrentPlatform,\n executeNativeBackPress,\n} from 'react-native-screens';\nimport { NativeStackNavigationOptions } from '../types';\nimport { useBackPressSubscription } from '../utils/useBackPressSubscription';\nimport { processFonts } from './FontProcessor';\n\ntype Props = NativeStackNavigationOptions & {\n route: Route<string>;\n};\n\nexport default function HeaderConfig({\n backButtonImage,\n backButtonInCustomView,\n direction,\n disableBackButtonMenu,\n headerBackTitle,\n headerBackTitleStyle = {},\n headerBackTitleVisible = true,\n headerCenter,\n headerHideBackButton,\n headerHideShadow,\n headerLargeStyle = {},\n headerLargeTitle,\n headerLargeTitleHideShadow,\n headerLargeTitleStyle = {},\n headerLeft,\n headerRight,\n headerShown,\n headerStyle = {},\n headerTintColor,\n headerTitle,\n headerTitleStyle = {},\n headerTopInsetEnabled = true,\n headerTranslucent,\n route,\n searchBar,\n title,\n}: Props): JSX.Element {\n const { colors } = useTheme();\n const tintColor = headerTintColor ?? colors.primary;\n\n // We need to use back press subscription here to override back button behavior on JS side.\n // Because screens are usually used with react-navigation and this library overrides back button\n // we need to handle it first in case when search bar is open\n const {\n handleAttached,\n handleDetached,\n clearSubscription,\n createSubscription,\n } = useBackPressSubscription({\n onBackPress: executeNativeBackPress,\n isDisabled: !searchBar || !!searchBar.disableBackButtonOverride,\n });\n\n const [backTitleFontFamily, largeTitleFontFamily, titleFontFamily] =\n processFonts([\n headerBackTitleStyle.fontFamily,\n headerLargeTitleStyle.fontFamily,\n headerTitleStyle.fontFamily,\n ]);\n\n // We want to clear clearSubscription only when components unmounts or search bar changes\n // eslint-disable-next-line react-hooks/exhaustive-deps\n React.useEffect(() => clearSubscription, [searchBar]);\n\n const processedSearchBarOptions = React.useMemo(() => {\n if (\n Platform.OS === 'android' &&\n searchBar &&\n !searchBar.disableBackButtonOverride\n ) {\n const onFocus: SearchBarProps['onFocus'] = (...args) => {\n createSubscription();\n searchBar.onFocus?.(...args);\n };\n const onClose: SearchBarProps['onClose'] = (...args) => {\n clearSubscription();\n searchBar.onClose?.(...args);\n };\n\n return { ...searchBar, onFocus, onClose };\n }\n return searchBar;\n }, [searchBar, createSubscription, clearSubscription]);\n\n return (\n <ScreenStackHeaderConfig\n backButtonInCustomView={backButtonInCustomView}\n backgroundColor={\n headerStyle.backgroundColor ? headerStyle.backgroundColor : colors.card\n }\n backTitle={headerBackTitle}\n backTitleFontFamily={backTitleFontFamily}\n backTitleFontSize={headerBackTitleStyle.fontSize}\n backTitleVisible={headerBackTitleVisible}\n blurEffect={headerStyle.blurEffect}\n color={tintColor}\n direction={direction}\n disableBackButtonMenu={disableBackButtonMenu}\n hidden={headerShown === false}\n hideBackButton={headerHideBackButton}\n hideShadow={headerHideShadow}\n largeTitle={headerLargeTitle}\n largeTitleBackgroundColor={headerLargeStyle.backgroundColor}\n largeTitleColor={headerLargeTitleStyle.color}\n largeTitleFontFamily={largeTitleFontFamily}\n largeTitleFontSize={headerLargeTitleStyle.fontSize}\n largeTitleFontWeight={headerLargeTitleStyle.fontWeight}\n largeTitleHideShadow={headerLargeTitleHideShadow}\n title={\n headerTitle !== undefined\n ? headerTitle\n : title !== undefined\n ? title\n : route.name\n }\n titleColor={\n headerTitleStyle.color !== undefined\n ? headerTitleStyle.color\n : headerTintColor !== undefined\n ? headerTintColor\n : colors.text\n }\n titleFontFamily={titleFontFamily}\n titleFontSize={headerTitleStyle.fontSize}\n titleFontWeight={headerTitleStyle.fontWeight}\n topInsetEnabled={headerTopInsetEnabled}\n translucent={headerTranslucent === true}\n onAttached={handleAttached}\n onDetached={handleDetached}\n >\n {headerRight !== undefined ? (\n <ScreenStackHeaderRightView>\n {headerRight({ tintColor })}\n </ScreenStackHeaderRightView>\n ) : null}\n {backButtonImage !== undefined ? (\n <ScreenStackHeaderBackButtonImage\n key=\"backImage\"\n source={backButtonImage}\n />\n ) : null}\n {headerLeft !== undefined ? (\n <ScreenStackHeaderLeftView>\n {headerLeft({ tintColor })}\n </ScreenStackHeaderLeftView>\n ) : null}\n {headerCenter !== undefined ? (\n <ScreenStackHeaderCenterView>\n {headerCenter({ tintColor })}\n </ScreenStackHeaderCenterView>\n ) : null}\n {isSearchBarAvailableForCurrentPlatform &&\n processedSearchBarOptions !== undefined ? (\n <ScreenStackHeaderSearchBarView>\n <SearchBar {...processedSearchBarOptions} />\n </ScreenStackHeaderSearchBarView>\n ) : null}\n </ScreenStackHeaderConfig>\n );\n}\n"],"mappings":"AAAA,SAAgBA,QAAQ,QAAQ,0BAA0B;AAC1D,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,cAAc;AACvC,SACEC,gCAAgC,EAChCC,2BAA2B,EAC3BC,uBAAuB,EACvBC,yBAAyB,EACzBC,0BAA0B,EAC1BC,8BAA8B,EAC9BC,SAAS,EAETC,sCAAsC,EACtCC,sBAAsB,QACjB,sBAAsB;AAE7B,SAASC,wBAAwB,QAAQ,mCAAmC;AAC5E,SAASC,YAAY,QAAQ,iBAAiB;AA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K,IAAK;IACxC8D,UAAU,EAAEvD,cAAe;IAC3BwD,UAAU,EAAEvD;EAAe,GAE1Bf,WAAW,KAAK6D,SAAS,gBACxB3F,KAAA,CAAAwE,aAAA,CAAClE,0BAA0B,QACxBwB,WAAW,CAAC;IAAEY;EAAU,CAAC,CAAC,CACA,GAC3B,IAAI,EACP3B,eAAe,KAAK4E,SAAS,gBAC5B3F,KAAA,CAAAwE,aAAA,CAACtE,gCAAgC;IAC/BmG,GAAG,EAAC,WAAW;IACfC,MAAM,EAAEvF;EAAgB,EACxB,GACA,IAAI,EACPc,UAAU,KAAK8D,SAAS,gBACvB3F,KAAA,CAAAwE,aAAA,CAACnE,yBAAyB,QACvBwB,UAAU,CAAC;IAAEa;EAAU,CAAC,CAAC,CACA,GAC1B,IAAI,EACPpB,YAAY,KAAKqE,SAAS,gBACzB3F,KAAA,CAAAwE,aAAA,CAACrE,2BAA2B,QACzBmB,YAAY,CAAC;IAAEoB;EAAU,CAAC,CAAC,CACA,GAC5B,IAAI,EACPjC,sCAAsC,IACvC+C,yBAAyB,KAAKmC,SAAS,gBACrC3F,KAAA,CAAAwE,aAAA,CAACjE,8BAA8B,qBAC7BP,KAAA,CAAAwE,aAAA,CAAChE,SAAS,EAAKgD,yBAAyB,CAAI,CACb,GAC/B,IAAI,CACgB;AAE9B"}
@@ -2,6 +2,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
2
2
  import * as React from 'react';
3
3
  import { Platform, StyleSheet, View } from 'react-native';
4
4
  // @ts-ignore Getting private component
5
+ // eslint-disable-next-line import/no-named-as-default, import/default, import/no-named-as-default-member, import/namespace
5
6
  import AppContainer from 'react-native/Libraries/ReactNative/AppContainer';
6
7
  import warnOnce from 'warn-once';
7
8
  import { ScreenStack, ScreenContext } from 'react-native-screens';
@@ -91,6 +92,11 @@ const RouteView = _ref2 => {
91
92
  headerShown,
92
93
  hideKeyboardOnSwipe,
93
94
  homeIndicatorHidden,
95
+ sheetAllowedDetents = 'large',
96
+ sheetLargestUndimmedDetent = 'all',
97
+ sheetGrabberVisible = false,
98
+ sheetCornerRadius = -1.0,
99
+ sheetExpandsWhenScrolledToEdge = true,
94
100
  nativeBackButtonDismissalEnabled = false,
95
101
  navigationBarColor,
96
102
  navigationBarHidden,
@@ -139,11 +145,19 @@ const RouteView = _ref2 => {
139
145
  const headerHeight = getDefaultHeaderHeight(dimensions, topInset, stackPresentation);
140
146
  const parentHeaderHeight = React.useContext(HeaderHeightContext);
141
147
  const Screen = React.useContext(ScreenContext);
148
+ const {
149
+ dark
150
+ } = useTheme();
142
151
  return /*#__PURE__*/React.createElement(Screen, {
143
152
  key: route.key,
144
153
  enabled: true,
145
154
  isNativeStack: true,
146
155
  style: StyleSheet.absoluteFill,
156
+ sheetAllowedDetents: sheetAllowedDetents,
157
+ sheetLargestUndimmedDetent: sheetLargestUndimmedDetent,
158
+ sheetGrabberVisible: sheetGrabberVisible,
159
+ sheetCornerRadius: sheetCornerRadius,
160
+ sheetExpandsWhenScrolledToEdge: sheetExpandsWhenScrolledToEdge,
147
161
  customAnimationOnSwipe: customAnimationOnSwipe,
148
162
  freezeOnBlur: freezeOnBlur,
149
163
  fullScreenSwipeEnabled: fullScreenSwipeEnabled,
@@ -161,7 +175,7 @@ const RouteView = _ref2 => {
161
175
  statusBarAnimation: statusBarAnimation,
162
176
  statusBarColor: statusBarColor,
163
177
  statusBarHidden: statusBarHidden,
164
- statusBarStyle: statusBarStyle,
178
+ statusBarStyle: statusBarStyle !== null && statusBarStyle !== void 0 ? statusBarStyle : dark ? 'light' : 'dark',
165
179
  statusBarTranslucent: statusBarTranslucent,
166
180
  swipeDirection: swipeDirection,
167
181
  transitionDuration: transitionDuration,
@@ -1 +1 @@
1
- {"version":3,"names":["React","Platform","StyleSheet","View","AppContainer","warnOnce","ScreenStack","ScreenContext","StackActions","useTheme","useSafeAreaFrame","useSafeAreaInsets","HeaderConfig","SafeAreaProviderCompat","getDefaultHeaderHeight","HeaderHeightContext","isAndroid","OS","Container","__DEV__","DebugContainer","props","stackPresentation","rest","MaybeNestedStack","options","route","children","colors","headerShown","contentStyle","Screen","useContext","isHeaderInModal","headerShownPreviousRef","useRef","useEffect","current","name","content","styles","container","backgroundColor","background","topInset","top","dimensions","headerHeight","absoluteFill","RouteView","descriptors","index","navigation","stateKey","render","renderScene","key","gestureEnabled","hideKeyboardOnSwipe","homeIndicatorHidden","nativeBackButtonDismissalEnabled","navigationBarColor","navigationBarHidden","replaceAnimation","screenOrientation","statusBarAnimation","statusBarColor","statusBarHidden","statusBarStyle","statusBarTranslucent","swipeDirection","transitionDuration","freezeOnBlur","customAnimationOnSwipe","fullScreenSwipeEnabled","gestureResponseDistance","stackAnimation","undefined","isHeaderInPush","parentHeaderHeight","dispatch","pop","source","target","emit","type","data","closing","e","dismissCount","nativeEvent","NativeStackViewInner","state","routes","map","NativeStackView","create","flex"],"sources":["NativeStackView.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Platform, StyleSheet, View, ViewProps } from 'react-native';\n// @ts-ignore Getting private component\nimport AppContainer from 'react-native/Libraries/ReactNative/AppContainer';\nimport warnOnce from 'warn-once';\nimport {\n ScreenStack,\n StackPresentationTypes,\n ScreenContext,\n} from 'react-native-screens';\nimport {\n ParamListBase,\n StackActions,\n StackNavigationState,\n useTheme,\n Route,\n NavigationState,\n PartialState,\n} from '@react-navigation/native';\nimport {\n useSafeAreaFrame,\n useSafeAreaInsets,\n} from 'react-native-safe-area-context';\n\nimport {\n NativeStackDescriptorMap,\n NativeStackNavigationHelpers,\n NativeStackNavigationOptions,\n} from '../types';\nimport HeaderConfig from './HeaderConfig';\nimport SafeAreaProviderCompat from '../utils/SafeAreaProviderCompat';\nimport getDefaultHeaderHeight from '../utils/getDefaultHeaderHeight';\nimport HeaderHeightContext from '../utils/HeaderHeightContext';\n\nconst isAndroid = Platform.OS === 'android';\n\nlet Container = View;\n\nif (__DEV__) {\n const DebugContainer = (\n props: ViewProps & { stackPresentation: StackPresentationTypes }\n ) => {\n const { stackPresentation, ...rest } = props;\n if (Platform.OS === 'ios' && stackPresentation !== 'push') {\n return (\n <AppContainer>\n <View {...rest} />\n </AppContainer>\n );\n }\n return <View {...rest} />;\n };\n // @ts-ignore Wrong props\n Container = DebugContainer;\n}\n\nconst MaybeNestedStack = ({\n options,\n route,\n stackPresentation,\n children,\n}: {\n options: NativeStackNavigationOptions;\n route: Route<string>;\n stackPresentation: StackPresentationTypes;\n children: React.ReactNode;\n}) => {\n const { colors } = useTheme();\n const { headerShown = true, contentStyle } = options;\n\n const Screen = React.useContext(ScreenContext);\n\n const isHeaderInModal = isAndroid\n ? false\n : stackPresentation !== 'push' && headerShown === true;\n\n const headerShownPreviousRef = React.useRef(headerShown);\n\n React.useEffect(() => {\n warnOnce(\n !isAndroid &&\n stackPresentation !== 'push' &&\n headerShownPreviousRef.current !== headerShown,\n `Dynamically changing 'headerShown' in modals will result in remounting the screen and losing all local state. See options for the screen '${route.name}'.`\n );\n\n headerShownPreviousRef.current = headerShown;\n }, [headerShown, stackPresentation, route.name]);\n\n const content = (\n <Container\n style={[\n styles.container,\n stackPresentation !== 'transparentModal' &&\n stackPresentation !== 'containedTransparentModal' && {\n backgroundColor: colors.background,\n },\n contentStyle,\n ]}\n // @ts-ignore Wrong props passed to View\n stackPresentation={stackPresentation}\n >\n {children}\n </Container>\n );\n\n const topInset = useSafeAreaInsets().top;\n const dimensions = useSafeAreaFrame();\n const headerHeight = getDefaultHeaderHeight(\n dimensions,\n topInset,\n stackPresentation\n );\n\n if (isHeaderInModal) {\n return (\n <ScreenStack style={styles.container}>\n <Screen enabled isNativeStack style={StyleSheet.absoluteFill}>\n <HeaderHeightContext.Provider value={headerHeight}>\n <HeaderConfig {...options} route={route} />\n {content}\n </HeaderHeightContext.Provider>\n </Screen>\n </ScreenStack>\n );\n }\n\n return content;\n};\n\ntype NavigationRoute<\n ParamList extends ParamListBase,\n RouteName extends keyof ParamList\n> = Route<Extract<RouteName, string>, ParamList[RouteName]> & {\n state?: NavigationState | PartialState<NavigationState>;\n};\n\nconst RouteView = ({\n descriptors,\n route,\n index,\n navigation,\n stateKey,\n}: {\n descriptors: NativeStackDescriptorMap;\n route: NavigationRoute<ParamListBase, string>;\n index: number;\n navigation: NativeStackNavigationHelpers;\n stateKey: string;\n}) => {\n const { options, render: renderScene } = descriptors[route.key];\n const {\n gestureEnabled,\n headerShown,\n hideKeyboardOnSwipe,\n homeIndicatorHidden,\n nativeBackButtonDismissalEnabled = false,\n navigationBarColor,\n navigationBarHidden,\n replaceAnimation = 'pop',\n screenOrientation,\n statusBarAnimation,\n statusBarColor,\n statusBarHidden,\n statusBarStyle,\n statusBarTranslucent,\n swipeDirection = 'horizontal',\n transitionDuration,\n freezeOnBlur,\n } = options;\n\n let {\n customAnimationOnSwipe,\n fullScreenSwipeEnabled,\n gestureResponseDistance,\n stackAnimation,\n stackPresentation = 'push',\n } = options;\n\n if (swipeDirection === 'vertical') {\n // for `vertical` direction to work, we need to set `fullScreenSwipeEnabled` to `true`\n // so the screen can be dismissed from any point on screen.\n // `customAnimationOnSwipe` needs to be set to `true` so the `stackAnimation` set by user can be used,\n // otherwise `simple_push` will be used.\n // Also, the default animation for this direction seems to be `slide_from_bottom`.\n if (fullScreenSwipeEnabled === undefined) {\n fullScreenSwipeEnabled = true;\n }\n if (customAnimationOnSwipe === undefined) {\n customAnimationOnSwipe = true;\n }\n if (stackAnimation === undefined) {\n stackAnimation = 'slide_from_bottom';\n }\n }\n\n if (index === 0) {\n // first screen should always be treated as `push`, it resolves problems with no header animation\n // for navigator with first screen as `modal` and the next as `push`\n stackPresentation = 'push';\n }\n\n const isHeaderInPush = isAndroid\n ? headerShown\n : stackPresentation === 'push' && headerShown !== false;\n\n const dimensions = useSafeAreaFrame();\n const topInset = useSafeAreaInsets().top;\n const headerHeight = getDefaultHeaderHeight(\n dimensions,\n topInset,\n stackPresentation\n );\n const parentHeaderHeight = React.useContext(HeaderHeightContext);\n const Screen = React.useContext(ScreenContext);\n\n return (\n <Screen\n key={route.key}\n enabled\n isNativeStack\n style={StyleSheet.absoluteFill}\n customAnimationOnSwipe={customAnimationOnSwipe}\n freezeOnBlur={freezeOnBlur}\n fullScreenSwipeEnabled={fullScreenSwipeEnabled}\n hideKeyboardOnSwipe={hideKeyboardOnSwipe}\n homeIndicatorHidden={homeIndicatorHidden}\n gestureEnabled={isAndroid ? false : gestureEnabled}\n gestureResponseDistance={gestureResponseDistance}\n nativeBackButtonDismissalEnabled={nativeBackButtonDismissalEnabled}\n navigationBarColor={navigationBarColor}\n navigationBarHidden={navigationBarHidden}\n replaceAnimation={replaceAnimation}\n screenOrientation={screenOrientation}\n stackAnimation={stackAnimation}\n stackPresentation={stackPresentation}\n statusBarAnimation={statusBarAnimation}\n statusBarColor={statusBarColor}\n statusBarHidden={statusBarHidden}\n statusBarStyle={statusBarStyle}\n statusBarTranslucent={statusBarTranslucent}\n swipeDirection={swipeDirection}\n transitionDuration={transitionDuration}\n onHeaderBackButtonClicked={() => {\n navigation.dispatch({\n ...StackActions.pop(),\n source: route.key,\n target: stateKey,\n });\n }}\n onWillAppear={() => {\n navigation.emit({\n type: 'transitionStart',\n data: { closing: false },\n target: route.key,\n });\n }}\n onWillDisappear={() => {\n navigation.emit({\n type: 'transitionStart',\n data: { closing: true },\n target: route.key,\n });\n }}\n onAppear={() => {\n navigation.emit({\n type: 'appear',\n target: route.key,\n });\n navigation.emit({\n type: 'transitionEnd',\n data: { closing: false },\n target: route.key,\n });\n }}\n onDisappear={() => {\n navigation.emit({\n type: 'transitionEnd',\n data: { closing: true },\n target: route.key,\n });\n }}\n onDismissed={(e) => {\n navigation.emit({\n type: 'dismiss',\n target: route.key,\n });\n\n const dismissCount =\n e.nativeEvent.dismissCount > 0 ? e.nativeEvent.dismissCount : 1;\n\n navigation.dispatch({\n ...StackActions.pop(dismissCount),\n source: route.key,\n target: stateKey,\n });\n }}\n >\n <HeaderHeightContext.Provider\n value={\n isHeaderInPush !== false ? headerHeight : parentHeaderHeight ?? 0\n }\n >\n <HeaderConfig {...options} route={route} headerShown={isHeaderInPush} />\n <MaybeNestedStack\n options={options}\n route={route}\n stackPresentation={stackPresentation}\n >\n {renderScene()}\n </MaybeNestedStack>\n </HeaderHeightContext.Provider>\n </Screen>\n );\n};\n\ntype Props = {\n state: StackNavigationState<ParamListBase>;\n navigation: NativeStackNavigationHelpers;\n descriptors: NativeStackDescriptorMap;\n};\n\nfunction NativeStackViewInner({\n state,\n navigation,\n descriptors,\n}: Props): JSX.Element {\n const { key, routes } = state;\n\n return (\n <ScreenStack style={styles.container}>\n {routes.map((route, index) => (\n <RouteView\n key={route.key}\n descriptors={descriptors}\n route={route}\n index={index}\n navigation={navigation}\n stateKey={key}\n />\n ))}\n </ScreenStack>\n );\n}\n\nexport default function NativeStackView(props: Props) {\n return (\n <SafeAreaProviderCompat>\n <NativeStackViewInner {...props} />\n </SafeAreaProviderCompat>\n );\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n },\n});\n"],"mappings":";AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,EAAEC,UAAU,EAAEC,IAAI,QAAmB,cAAc;AACpE;AACA,OAAOC,YAAY,MAAM,iDAAiD;AAC1E,OAAOC,QAAQ,MAAM,WAAW;AAChC,SACEC,WAAW,EAEXC,aAAa,QACR,sBAAsB;AAC7B,SAEEC,YAAY,EAEZC,QAAQ,QAIH,0BAA0B;AACjC,SACEC,gBAAgB,EAChBC,iBAAiB,QACZ,gCAAgC;AAOvC,OAAOC,YAAY,MAAM,gBAAgB;AACzC,OAAOC,sBAAsB,MAAM,iCAAiC;AACpE,OAAOC,sBAAsB,MAAM,iCAAiC;AACpE,OAAOC,mBAAmB,MAAM,8BAA8B;AAE9D,MAAMC,SAAS,GAAGf,QAAQ,CAACgB,EAAE,KAAK,SAAS;AAE3C,IAAIC,SAAS,GAAGf,IAAI;AAEpB,IAAIgB,OAAO,EAAE;EACX,MAAMC,cAAc,GAClBC,KAAgE,IAC7D;IACH,M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C;EACN,MAAM;IAAEM,GAAG;IAAEqC;EAAO,CAAC,GAAGD,KAAK;EAE7B,oBACE,oBAAC,WAAW;IAAC,KAAK,EAAEpD,MAAM,CAACC;EAAU,GAClCoD,MAAM,CAACC,GAAG,CAAC,CAACpE,KAAK,EAAEyB,KAAK,kBACvB,oBAAC,SAAS;IACR,GAAG,EAAEzB,KAAK,CAAC8B,GAAI;IACf,WAAW,EAAEN,WAAY;IACzB,KAAK,EAAExB,KAAM;IACb,KAAK,EAAEyB,KAAM;IACb,UAAU,EAAEC,UAAW;IACvB,QAAQ,EAAEI;EAAI,EAEjB,CAAC,CACU;AAElB;AAEA,eAAe,SAASuC,eAAe,CAAC1E,KAAY,EAAE;EACpD,oBACE,oBAAC,sBAAsB,qBACrB,oBAAC,oBAAoB,EAAKA,KAAK,CAAI,CACZ;AAE7B;AAEA,MAAMmB,MAAM,GAAGtC,UAAU,CAAC8F,MAAM,CAAC;EAC/BvD,SAAS,EAAE;IACTwD,IAAI,EAAE;EACR;AACF,CAAC,CAAC"}
1
+ {"version":3,"names":["React","Platform","StyleSheet","View","AppContainer","warnOnce","ScreenStack","ScreenContext","StackActions","useTheme","useSafeAreaFrame","useSafeAreaInsets","HeaderConfig","SafeAreaProviderCompat","getDefaultHeaderHeight","HeaderHeightContext","isAndroid","OS","Container","__DEV__","DebugContainer","props","stackPresentation","rest","createElement","MaybeNestedStack","_ref","options","route","children","colors","headerShown","contentStyle","Screen","useContext","isHeaderInModal","headerShownPreviousRef","useRef","useEffect","current","name","content","style","styles","container","backgroundColor","background","topInset","top","dimensions","headerHeight","enabled","isNativeStack","absoluteFill","Provider","value","_extends","RouteView","_ref2","descriptors","index","navigation","stateKey","render","renderScene","key","gestureEnabled","hideKeyboardOnSwipe","homeIndicatorHidden","sheetAllowedDetents","sheetLargestUndimmedDetent","sheetGrabberVisible","sheetCornerRadius","sheetExpandsWhenScrolledToEdge","nativeBackButtonDismissalEnabled","navigationBarColor","navigationBarHidden","replaceAnimation","screenOrientation","statusBarAnimation","statusBarColor","statusBarHidden","statusBarStyle","statusBarTranslucent","swipeDirection","transitionDuration","freezeOnBlur","customAnimationOnSwipe","fullScreenSwipeEnabled","gestureResponseDistance","stackAnimation","undefined","isHeaderInPush","parentHeaderHeight","dark","onHeaderBackButtonClicked","dispatch","pop","source","target","onWillAppear","emit","type","data","closing","onWillDisappear","onAppear","onDisappear","onDismissed","e","dismissCount","nativeEvent","NativeStackViewInner","_ref3","state","routes","map","NativeStackView","create","flex"],"sources":["NativeStackView.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Platform, StyleSheet, View, ViewProps } from 'react-native';\n// @ts-ignore Getting private component\n// eslint-disable-next-line import/no-named-as-default, import/default, import/no-named-as-default-member, import/namespace\nimport AppContainer from 'react-native/Libraries/ReactNative/AppContainer';\nimport warnOnce from 'warn-once';\nimport {\n ScreenStack,\n StackPresentationTypes,\n ScreenContext,\n} from 'react-native-screens';\nimport {\n ParamListBase,\n StackActions,\n StackNavigationState,\n useTheme,\n Route,\n NavigationState,\n PartialState,\n} from '@react-navigation/native';\nimport {\n useSafeAreaFrame,\n useSafeAreaInsets,\n} from 'react-native-safe-area-context';\n\nimport {\n NativeStackDescriptorMap,\n NativeStackNavigationHelpers,\n NativeStackNavigationOptions,\n} from '../types';\nimport HeaderConfig from './HeaderConfig';\nimport SafeAreaProviderCompat from '../utils/SafeAreaProviderCompat';\nimport getDefaultHeaderHeight from '../utils/getDefaultHeaderHeight';\nimport HeaderHeightContext from '../utils/HeaderHeightContext';\n\nconst isAndroid = Platform.OS === 'android';\n\nlet Container = View;\n\nif (__DEV__) {\n const DebugContainer = (\n props: ViewProps & { stackPresentation: StackPresentationTypes }\n ) => {\n const { stackPresentation, ...rest } = props;\n if (Platform.OS === 'ios' && stackPresentation !== 'push') {\n return (\n <AppContainer>\n <View {...rest} />\n </AppContainer>\n );\n }\n return <View {...rest} />;\n };\n // @ts-ignore Wrong props\n Container = DebugContainer;\n}\n\nconst MaybeNestedStack = ({\n options,\n route,\n stackPresentation,\n children,\n}: {\n options: NativeStackNavigationOptions;\n route: Route<string>;\n stackPresentation: StackPresentationTypes;\n children: React.ReactNode;\n}) => {\n const { colors } = useTheme();\n const { headerShown = true, contentStyle } = options;\n\n const Screen = React.useContext(ScreenContext);\n\n const isHeaderInModal = isAndroid\n ? false\n : stackPresentation !== 'push' && headerShown === true;\n\n const headerShownPreviousRef = React.useRef(headerShown);\n\n React.useEffect(() => {\n warnOnce(\n !isAndroid &&\n stackPresentation !== 'push' &&\n headerShownPreviousRef.current !== headerShown,\n `Dynamically changing 'headerShown' in modals will result in remounting the screen and losing all local state. See options for the screen '${route.name}'.`\n );\n\n headerShownPreviousRef.current = headerShown;\n }, [headerShown, stackPresentation, route.name]);\n\n const content = (\n <Container\n style={[\n styles.container,\n stackPresentation !== 'transparentModal' &&\n stackPresentation !== 'containedTransparentModal' && {\n backgroundColor: colors.background,\n },\n contentStyle,\n ]}\n // @ts-ignore Wrong props passed to View\n stackPresentation={stackPresentation}\n >\n {children}\n </Container>\n );\n\n const topInset = useSafeAreaInsets().top;\n const dimensions = useSafeAreaFrame();\n const headerHeight = getDefaultHeaderHeight(\n dimensions,\n topInset,\n stackPresentation\n );\n\n if (isHeaderInModal) {\n return (\n <ScreenStack style={styles.container}>\n <Screen enabled isNativeStack style={StyleSheet.absoluteFill}>\n <HeaderHeightContext.Provider value={headerHeight}>\n <HeaderConfig {...options} route={route} />\n {content}\n </HeaderHeightContext.Provider>\n </Screen>\n </ScreenStack>\n );\n }\n return content;\n};\n\ntype NavigationRoute<\n ParamList extends ParamListBase,\n RouteName extends keyof ParamList\n> = Route<Extract<RouteName, string>, ParamList[RouteName]> & {\n state?: NavigationState | PartialState<NavigationState>;\n};\n\nconst RouteView = ({\n descriptors,\n route,\n index,\n navigation,\n stateKey,\n}: {\n descriptors: NativeStackDescriptorMap;\n route: NavigationRoute<ParamListBase, string>;\n index: number;\n navigation: NativeStackNavigationHelpers;\n stateKey: string;\n}) => {\n const { options, render: renderScene } = descriptors[route.key];\n const {\n gestureEnabled,\n headerShown,\n hideKeyboardOnSwipe,\n homeIndicatorHidden,\n sheetAllowedDetents = 'large',\n sheetLargestUndimmedDetent = 'all',\n sheetGrabberVisible = false,\n sheetCornerRadius = -1.0,\n sheetExpandsWhenScrolledToEdge = true,\n nativeBackButtonDismissalEnabled = false,\n navigationBarColor,\n navigationBarHidden,\n replaceAnimation = 'pop',\n screenOrientation,\n statusBarAnimation,\n statusBarColor,\n statusBarHidden,\n statusBarStyle,\n statusBarTranslucent,\n swipeDirection = 'horizontal',\n transitionDuration,\n freezeOnBlur,\n } = options;\n\n let {\n customAnimationOnSwipe,\n fullScreenSwipeEnabled,\n gestureResponseDistance,\n stackAnimation,\n stackPresentation = 'push',\n } = options;\n\n if (swipeDirection === 'vertical') {\n // for `vertical` direction to work, we need to set `fullScreenSwipeEnabled` to `true`\n // so the screen can be dismissed from any point on screen.\n // `customAnimationOnSwipe` needs to be set to `true` so the `stackAnimation` set by user can be used,\n // otherwise `simple_push` will be used.\n // Also, the default animation for this direction seems to be `slide_from_bottom`.\n if (fullScreenSwipeEnabled === undefined) {\n fullScreenSwipeEnabled = true;\n }\n if (customAnimationOnSwipe === undefined) {\n customAnimationOnSwipe = true;\n }\n if (stackAnimation === undefined) {\n stackAnimation = 'slide_from_bottom';\n }\n }\n\n if (index === 0) {\n // first screen should always be treated as `push`, it resolves problems with no header animation\n // for navigator with first screen as `modal` and the next as `push`\n stackPresentation = 'push';\n }\n\n const isHeaderInPush = isAndroid\n ? headerShown\n : stackPresentation === 'push' && headerShown !== false;\n\n const dimensions = useSafeAreaFrame();\n const topInset = useSafeAreaInsets().top;\n const headerHeight = getDefaultHeaderHeight(\n dimensions,\n topInset,\n stackPresentation\n );\n const parentHeaderHeight = React.useContext(HeaderHeightContext);\n const Screen = React.useContext(ScreenContext);\n\n const { dark } = useTheme();\n\n return (\n <Screen\n key={route.key}\n enabled\n isNativeStack\n style={StyleSheet.absoluteFill}\n sheetAllowedDetents={sheetAllowedDetents}\n sheetLargestUndimmedDetent={sheetLargestUndimmedDetent}\n sheetGrabberVisible={sheetGrabberVisible}\n sheetCornerRadius={sheetCornerRadius}\n sheetExpandsWhenScrolledToEdge={sheetExpandsWhenScrolledToEdge}\n customAnimationOnSwipe={customAnimationOnSwipe}\n freezeOnBlur={freezeOnBlur}\n fullScreenSwipeEnabled={fullScreenSwipeEnabled}\n hideKeyboardOnSwipe={hideKeyboardOnSwipe}\n homeIndicatorHidden={homeIndicatorHidden}\n gestureEnabled={isAndroid ? false : gestureEnabled}\n gestureResponseDistance={gestureResponseDistance}\n nativeBackButtonDismissalEnabled={nativeBackButtonDismissalEnabled}\n navigationBarColor={navigationBarColor}\n navigationBarHidden={navigationBarHidden}\n replaceAnimation={replaceAnimation}\n screenOrientation={screenOrientation}\n stackAnimation={stackAnimation}\n stackPresentation={stackPresentation}\n statusBarAnimation={statusBarAnimation}\n statusBarColor={statusBarColor}\n statusBarHidden={statusBarHidden}\n statusBarStyle={statusBarStyle ?? (dark ? 'light' : 'dark')}\n statusBarTranslucent={statusBarTranslucent}\n swipeDirection={swipeDirection}\n transitionDuration={transitionDuration}\n onHeaderBackButtonClicked={() => {\n navigation.dispatch({\n ...StackActions.pop(),\n source: route.key,\n target: stateKey,\n });\n }}\n onWillAppear={() => {\n navigation.emit({\n type: 'transitionStart',\n data: { closing: false },\n target: route.key,\n });\n }}\n onWillDisappear={() => {\n navigation.emit({\n type: 'transitionStart',\n data: { closing: true },\n target: route.key,\n });\n }}\n onAppear={() => {\n navigation.emit({\n type: 'appear',\n target: route.key,\n });\n navigation.emit({\n type: 'transitionEnd',\n data: { closing: false },\n target: route.key,\n });\n }}\n onDisappear={() => {\n navigation.emit({\n type: 'transitionEnd',\n data: { closing: true },\n target: route.key,\n });\n }}\n onDismissed={(e) => {\n navigation.emit({\n type: 'dismiss',\n target: route.key,\n });\n\n const dismissCount =\n e.nativeEvent.dismissCount > 0 ? e.nativeEvent.dismissCount : 1;\n\n navigation.dispatch({\n ...StackActions.pop(dismissCount),\n source: route.key,\n target: stateKey,\n });\n }}\n >\n <HeaderHeightContext.Provider\n value={\n isHeaderInPush !== false ? headerHeight : parentHeaderHeight ?? 0\n }\n >\n <HeaderConfig {...options} route={route} headerShown={isHeaderInPush} />\n <MaybeNestedStack\n options={options}\n route={route}\n stackPresentation={stackPresentation}\n >\n {renderScene()}\n </MaybeNestedStack>\n </HeaderHeightContext.Provider>\n </Screen>\n );\n};\n\ntype Props = {\n state: StackNavigationState<ParamListBase>;\n navigation: NativeStackNavigationHelpers;\n descriptors: NativeStackDescriptorMap;\n};\n\nfunction NativeStackViewInner({\n state,\n navigation,\n descriptors,\n}: Props): JSX.Element {\n const { key, routes } = state;\n\n return (\n <ScreenStack style={styles.container}>\n {routes.map((route, index) => (\n <RouteView\n key={route.key}\n descriptors={descriptors}\n route={route}\n index={index}\n navigation={navigation}\n stateKey={key}\n />\n ))}\n </ScreenStack>\n );\n}\n\nexport default function NativeStackView(props: Props) {\n return (\n <SafeAreaProviderCompat>\n <NativeStackViewInner {...props} />\n </SafeAreaProviderCompat>\n );\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n },\n});\n"],"mappings":";AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,EAAEC,UAAU,EAAEC,IAAI,QAAmB,cAAc;AACpE;AACA;AACA,OAAOC,YAAY,MAAM,iDAAiD;AAC1E,OAAOC,QAAQ,MAAM,WAAW;AAChC,SACEC,WAAW,EAEXC,aAAa,QACR,sBAAsB;AAC7B,SAEEC,YAAY,EAEZC,QAAQ,QAIH,0BAA0B;AACjC,SACEC,gBAAgB,EAChBC,iBAAiB,QACZ,gCAAgC;AAOvC,OAAOC,YAAY,MAAM,gBAAgB;AACzC,OAAOC,sBAAsB,MAAM,iCAAiC;AACpE,OAAOC,sBAAsB,MAAM,iCAAiC;AACpE,OAAOC,mBAAmB,MAAM,8BAA8B;AAE9D,MAAMC,SAAS,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,KAAA,CAAAwB,aAAA,CAACiC,SAAS;IACRQ,GAAG,EAAErC,KAAK,CAACqC,GAAI;IACfN,WAAW,EAAEA,WAAY;IACzB/B,KAAK,EAAEA,KAAM;IACbgC,KAAK,EAAEA,KAAM;IACbC,UAAU,EAAEA,UAAW;IACvBC,QAAQ,EAAEG;EAAI,EAEjB,CAAC,CACU;AAElB;AAEA,eAAe,SAASoD,eAAeA,CAAChG,KAAY,EAAE;EACpD,oBACErB,KAAA,CAAAwB,aAAA,CAACX,sBAAsB,qBACrBb,KAAA,CAAAwB,aAAA,CAACwF,oBAAoB,EAAK3F,KAAK,CAAI,CACZ;AAE7B;AAEA,MAAMsB,MAAM,GAAGzC,UAAU,CAACoH,MAAM,CAAC;EAC/B1E,SAAS,EAAE;IACT2E,IAAI,EAAE;EACR;AACF,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"names":["React","Platform","InnerScreen","Animated","useEvent","useSharedValue","ReanimatedTransitionProgressContext","AnimatedScreen","createAnimatedComponent","ENABLE_FABRIC","global","_IS_FABRIC","ReanimatedNativeStackScreen","forwardRef","props","ref","children","rest","progress","closing","goingForward","event","value","OS","displayName"],"sources":["ReanimatedNativeStackScreen.tsx"],"sourcesContent":["import React from 'react';\nimport { Platform } from 'react-native';\nimport {\n InnerScreen,\n ScreenProps,\n TransitionProgressEventType,\n} from 'react-native-screens';\n\n// @ts-ignore file to be used only if `react-native-reanimated` available in the project\nimport Animated, { useEvent, useSharedValue } from 'react-native-reanimated';\nimport ReanimatedTransitionProgressContext from './ReanimatedTransitionProgressContext';\n\nconst AnimatedScreen = Animated.createAnimatedComponent(\n InnerScreen as unknown as React.ComponentClass\n);\n\n// We use prop added to global by reanimated since it seems safer than the one from RN. See:\n// https://github.com/software-mansion/react-native-reanimated/blob/3fe8b35b05e82b2f2aefda1fb97799cf81e4b7bb/src/reanimated2/UpdateProps.ts#L46\n// @ts-expect-error nativeFabricUIManager is not yet included in the RN types\nconst ENABLE_FABRIC = !!global?._IS_FABRIC;\n\nconst ReanimatedNativeStackScreen = React.forwardRef<\n typeof AnimatedScreen,\n ScreenProps\n>((props, ref) => {\n const { children, ...rest } = props;\n\n const progress = useSharedValue(0);\n const closing = useSharedValue(0);\n const goingForward = useSharedValue(0);\n\n return (\n <AnimatedScreen\n // @ts-ignore some problems with ref and onTransitionProgressReanimated being \"fake\" prop for parsing of `useEvent` return value\n ref={ref}\n onTransitionProgressReanimated={useEvent(\n (event: TransitionProgressEventType) => {\n 'worklet';\n progress.value = event.progress;\n closing.value = event.closing;\n goingForward.value = event.goingForward;\n },\n [\n // This should not be necessary, but is not properly managed by `react-native-reanimated`\n // @ts-ignore wrong type\n Platform.OS === 'android'\n ? 'onTransitionProgress'\n : // for some reason there is a difference in required event name between architectures\n ENABLE_FABRIC\n ? 'onTransitionProgress'\n : 'topTransitionProgress',\n ]\n )}\n {...rest}\n >\n <ReanimatedTransitionProgressContext.Provider\n value={{\n progress: progress,\n closing: closing,\n goingForward: goingForward,\n }}\n >\n {children}\n </ReanimatedTransitionProgressContext.Provider>\n </AnimatedScreen>\n );\n});\n\nReanimatedNativeStackScreen.displayName = 'ReanimatedNativeStackScreen';\n\nexport default ReanimatedNativeStackScreen;\n"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,QAAQ,cAAc;AACvC,SACEC,WAAW,QAGN,sBAAsB;;AAE7B;AACA,OAAOC,QAAQ,IAAIC,QAAQ,EAAEC,cAAc,QAAQ,yBAAyB;AAC5E,OAAOC,mCAAmC,MAAM,uCAAuC;AAEvF,MAAMC,cAAc,GAAGJ,QAAQ,CAACK,uBAAuB,CACrDN,WAAW,CACZ;;AAED;AACA;AACA;AACA,MAAMO,aAAa,GAAG,CAAC,aAACC,MAAM,oCAAN,QAAQC,UAAU;AAE1C,MAAMC,2BAA2B,gBAAGZ,KAAK,CAACa,UAAU,CAGlD,CAACC,KAAK,EAAEC,GAAG,KAAK;EAChB,MAAM;IAAEC,QAAQ;IAAE,GAAGC;EAAK,CAAC,GAAGH,KAAK;EAEnC,MAAMI,QAAQ,GAAGb,cAAc,CAAC,CAAC,CAAC;EAClC,MAAMc,OAAO,GAAGd,cAAc,CAAC,CAAC,CAAC;EACjC,MAAMe,YAAY,GAAGf,cAAc,CAAC,CAAC,CAAC;EAEtC,oBACE,oBAAC;EACC;EAAA;IACA,GAAG,EAAEU,GAAI;IACT,8BAA8B,EAAEX,QAAQ,CACrCiB,KAAkC,IAAK;MACtC,SAAS;;MACTH,QAAQ,CAACI,KAAK,GAAGD,KAAK,CAACH,QAAQ;MAC/BC,OAAO,CAACG,KAAK,GAAGD,KAAK,CAACF,OAAO;MAC7BC,YAAY,CAACE,KAAK,GAAGD,KAAK,CAACD,YAAY;IACzC,CAAC,EACD;IACE;IACA;IACAnB,QAAQ,CAACsB,EAAE,KAAK,SAAS,GACrB,sBAAsB;IACtB;IACFd,aAAa,GACX,sBAAsB,GACtB,uBAAuB,CAC5B;EACD,GACEQ,IAAI,gBAER,oBAAC,mCAAmC,CAAC,QAAQ;IAC3C,KAAK,EAAE;MACLC,QAAQ,EAAEA,QAAQ;MAClBC,OAAO,EAAEA,OAAO;MAChBC,YAAY,EAAEA;IAChB;EAAE,GAEDJ,QAAQ,CACoC,CAChC;AAErB,CAAC,CAAC;AAEFJ,2BAA2B,CAACY,WAAW,GAAG,6BAA6B;AAEvE,eAAeZ,2BAA2B"}
1
+ {"version":3,"names":["React","Platform","InnerScreen","Animated","useEvent","useSharedValue","ReanimatedTransitionProgressContext","AnimatedScreen","createAnimatedComponent","ENABLE_FABRIC","_global","global","_IS_FABRIC","ReanimatedNativeStackScreen","forwardRef","props","ref","children","rest","progress","closing","goingForward","createElement","_extends","onTransitionProgressReanimated","event","value","OS","Provider","displayName"],"sources":["ReanimatedNativeStackScreen.tsx"],"sourcesContent":["import React from 'react';\nimport { Platform } from 'react-native';\nimport {\n InnerScreen,\n ScreenProps,\n TransitionProgressEventType,\n} from 'react-native-screens';\n\n// @ts-ignore file to be used only if `react-native-reanimated` available in the project\nimport Animated, { useEvent, useSharedValue } from 'react-native-reanimated';\nimport ReanimatedTransitionProgressContext from './ReanimatedTransitionProgressContext';\n\nconst AnimatedScreen = Animated.createAnimatedComponent(\n InnerScreen as unknown as React.ComponentClass\n);\n\n// We use prop added to global by reanimated since it seems safer than the one from RN. See:\n// https://github.com/software-mansion/react-native-reanimated/blob/3fe8b35b05e82b2f2aefda1fb97799cf81e4b7bb/src/reanimated2/UpdateProps.ts#L46\n// @ts-expect-error nativeFabricUIManager is not yet included in the RN types\nconst ENABLE_FABRIC = !!global?._IS_FABRIC;\n\nconst ReanimatedNativeStackScreen = React.forwardRef<\n typeof AnimatedScreen,\n ScreenProps\n>((props, ref) => {\n const { children, ...rest } = props;\n\n const progress = useSharedValue(0);\n const closing = useSharedValue(0);\n const goingForward = useSharedValue(0);\n\n return (\n <AnimatedScreen\n // @ts-ignore some problems with ref and onTransitionProgressReanimated being \"fake\" prop for parsing of `useEvent` return value\n ref={ref}\n onTransitionProgressReanimated={useEvent(\n (event: TransitionProgressEventType) => {\n 'worklet';\n progress.value = event.progress;\n closing.value = event.closing;\n goingForward.value = event.goingForward;\n },\n [\n // This should not be necessary, but is not properly managed by `react-native-reanimated`\n // @ts-ignore wrong type\n Platform.OS === 'android'\n ? 'onTransitionProgress'\n : // for some reason there is a difference in required event name between architectures\n ENABLE_FABRIC\n ? 'onTransitionProgress'\n : 'topTransitionProgress',\n ]\n )}\n {...rest}\n >\n <ReanimatedTransitionProgressContext.Provider\n value={{\n progress: progress,\n closing: closing,\n goingForward: goingForward,\n }}\n >\n {children}\n </ReanimatedTransitionProgressContext.Provider>\n </AnimatedScreen>\n );\n});\n\nReanimatedNativeStackScreen.displayName = 'ReanimatedNativeStackScreen';\n\nexport default ReanimatedNativeStackScreen;\n"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,QAAQ,cAAc;AACvC,SACEC,WAAW,QAGN,sBAAsB;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J,QAAQ,CACoC,CAChC;AAErB,CAAC,CAAC;AAEFJ,2BAA2B,CAACgB,WAAW,GAAG,6BAA6B;AAEvE,eAAehB,2BAA2B"}
@@ -1 +1 @@
1
- {"version":3,"names":["React","InnerScreen","Animated","AnimatedScreen","createAnimatedComponent","ReanimatedScreen","forwardRef","props","ref","displayName"],"sources":["ReanimatedScreen.tsx"],"sourcesContent":["import React from 'react';\nimport { InnerScreen, ScreenProps } from 'react-native-screens';\n\n// @ts-ignore file to be used only if `react-native-reanimated` available in the project\nimport Animated from 'react-native-reanimated';\n\nconst AnimatedScreen = Animated.createAnimatedComponent(\n InnerScreen as unknown as React.ComponentClass\n);\n\nconst ReanimatedScreen = React.forwardRef<typeof AnimatedScreen, ScreenProps>(\n (props, ref) => {\n return (\n <AnimatedScreen\n // @ts-ignore some problems with ref and onTransitionProgressReanimated being \"fake\" prop for parsing of `useEvent` return value\n ref={ref}\n {...props}\n />\n );\n }\n);\n\nReanimatedScreen.displayName = 'ReanimatedScreen';\n\nexport default ReanimatedScreen;\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,WAAW,QAAqB,sBAAsB;;AAE/D;AACA,OAAOC,QAAQ,MAAM,yBAAyB;AAE9C,MAAMC,cAAc,GAAGD,QAAQ,CAACE,uBAAuB,CACrDH,WAAW,CACZ;AAED,MAAMI,gBAAgB,gBAAGL,KAAK,CAACM,UAAU,CACvC,CAACC,KAAK,EAAEC,GAAG,KAAK;EACd,oBACE,oBAAC;EACC;EAAA;IACA,GAAG,EAAEA;EAAI,GACLD,KAAK,EACT;AAEN,CAAC,CACF;AAEDF,gBAAgB,CAACI,WAAW,GAAG,kBAAkB;AAEjD,eAAeJ,gBAAgB"}
1
+ {"version":3,"names":["React","InnerScreen","Animated","AnimatedScreen","createAnimatedComponent","ReanimatedScreen","forwardRef","props","ref","createElement","_extends","displayName"],"sources":["ReanimatedScreen.tsx"],"sourcesContent":["import React from 'react';\nimport { InnerScreen, ScreenProps } from 'react-native-screens';\n\n// @ts-ignore file to be used only if `react-native-reanimated` available in the project\nimport Animated from 'react-native-reanimated';\n\nconst AnimatedScreen = Animated.createAnimatedComponent(\n InnerScreen as unknown as React.ComponentClass\n);\n\nconst ReanimatedScreen = React.forwardRef<typeof AnimatedScreen, ScreenProps>(\n (props, ref) => {\n return (\n <AnimatedScreen\n // @ts-ignore some problems with ref and onTransitionProgressReanimated being \"fake\" prop for parsing of `useEvent` return value\n ref={ref}\n {...props}\n />\n );\n }\n);\n\nReanimatedScreen.displayName = 'ReanimatedScreen';\n\nexport default ReanimatedScreen;\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,WAAW,QAAqB,sBAAsB;;AAE/D;AACA,OAAOC,QAAQ,MAAM,yBAAyB;AAE9C,MAAMC,cAAc,GAAGD,QAAQ,CAACE,uBAAuB,CACrDH,WAAW,CACZ;AAED,MAAMI,gBAAgB,gBAAGL,KAAK,CAACM,UAAU,CACvC,CAACC,KAAK,EAAEC,GAAG,KAAK;EACd,oBACER,KAAA,CAAAS,aAAA,CAACN;EACC;EAAA,EAAAO,QAAA;IACAF,GAAG,EAAEA;EAAI,GACLD,KAAK,EACT;AAEN,CAAC,CACF;AAEDF,gBAAgB,CAACM,WAAW,GAAG,kBAAkB;AAEjD,eAAeN,gBAAgB"}
@@ -1 +1 @@
1
- {"version":3,"names":["React","ScreenContext","ReanimatedNativeStackScreen","AnimatedScreen","ReanimatedScreenWrapper","Component","ref","props","onComponentRef","setNativeProps","render","ReanimatedScreen","isNativeStack","setRef","ReanimatedScreenProvider","children"],"sources":["ReanimatedScreenProvider.tsx"],"sourcesContent":["import React, { PropsWithChildren } from 'react';\nimport { View } from 'react-native';\nimport { ScreenProps, ScreenContext } from 'react-native-screens';\nimport ReanimatedNativeStackScreen from './ReanimatedNativeStackScreen';\nimport AnimatedScreen from './ReanimatedScreen';\n\nclass ReanimatedScreenWrapper extends React.Component<ScreenProps> {\n private ref: React.ElementRef<typeof View> | null = null;\n\n setNativeProps(props: ScreenProps): void {\n this.ref?.setNativeProps(props);\n }\n\n setRef = (ref: React.ElementRef<typeof View> | null): void => {\n this.ref = ref;\n this.props.onComponentRef?.(ref);\n };\n\n render() {\n const ReanimatedScreen = this.props.isNativeStack\n ? ReanimatedNativeStackScreen\n : AnimatedScreen;\n return (\n <ReanimatedScreen\n {...this.props}\n // @ts-ignore some problems with ref\n ref={this.setRef}\n />\n );\n }\n}\n\nexport default function ReanimatedScreenProvider(\n props: PropsWithChildren<unknown>\n) {\n return (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n <ScreenContext.Provider value={ReanimatedScreenWrapper as any}>\n {props.children}\n </ScreenContext.Provider>\n );\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAA6B,OAAO;AAEhD,SAAsBC,aAAa,QAAQ,sBAAsB;AACjE,OAAOC,2BAA2B,MAAM,+BAA+B;AACvE,OAAOC,cAAc,MAAM,oBAAoB;AAE/C,MAAMC,uBAAuB,SAASJ,KAAK,CAACK,SAAS,CAAc;EAAA;IAAA;IAAA,6BACb,IAAI;IAAA,gCAM9CC,GAAyC,IAAW;MAAA;MAC5D,IAAI,CAACA,GAAG,GAAGA,GAAG;MACd,4CAAI,CAACC,KAAK,EAACC,cAAc,0DAAzB,wCAA4BF,GAAG,CAAC;IAClC,CAAC;EAAA;EAPDG,cAAc,CAACF,KAAkB,EAAQ;IAAA;IACvC,iBAAI,CAACD,GAAG,8CAAR,UAAUG,cAAc,CAACF,KAAK,CAAC;EACjC;EAOAG,MAAM,GAAG;IACP,MAAMC,gBAAgB,GAAG,IAAI,CAACJ,KAAK,CAACK,aAAa,GAC7CV,2BAA2B,GAC3BC,cAAc;IAClB,oBACE,oBAAC,gBAAgB,eACX,IAAI,CAACI,KAAK;MACd;MACA,GAAG,EAAE,IAAI,CAACM;IAAO,GACjB;EAEN;AACF;AAEA,eAAe,SAASC,wBAAwB,CAC9CP,KAAiC,EACjC;EACA;IAAA;IACE;IACA,oBAAC,aAAa,CAAC,QAAQ;MAAC,KAAK,EAAEH;IAA+B,GAC3DG,KAAK,CAACQ,QAAQ;EACQ;AAE7B"}
1
+ {"version":3,"names":["React","ScreenContext","ReanimatedNativeStackScreen","AnimatedScreen","ReanimatedScreenWrapper","Component","constructor","arguments","_defineProperty","ref","_this$props$onCompone","_this$props","props","onComponentRef","call","setNativeProps","_this$ref","render","ReanimatedScreen","isNativeStack","createElement","_extends","setRef","ReanimatedScreenProvider","Provider","value","children"],"sources":["ReanimatedScreenProvider.tsx"],"sourcesContent":["import React, { PropsWithChildren } from 'react';\nimport { View } from 'react-native';\nimport { ScreenProps, ScreenContext } from 'react-native-screens';\nimport ReanimatedNativeStackScreen from './ReanimatedNativeStackScreen';\nimport AnimatedScreen from './ReanimatedScreen';\n\nclass ReanimatedScreenWrapper extends React.Component<ScreenProps> {\n private ref: React.ElementRef<typeof View> | null = null;\n\n setNativeProps(props: ScreenProps): void {\n this.ref?.setNativeProps(props);\n }\n\n setRef = (ref: React.ElementRef<typeof View> | null): void => {\n this.ref = ref;\n this.props.onComponentRef?.(ref);\n };\n\n render() {\n const ReanimatedScreen = this.props.isNativeStack\n ? ReanimatedNativeStackScreen\n : AnimatedScreen;\n return (\n <ReanimatedScreen\n {...this.props}\n // @ts-ignore some problems with ref\n ref={this.setRef}\n />\n );\n }\n}\n\nexport default function ReanimatedScreenProvider(\n props: PropsWithChildren<unknown>\n) {\n return (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n <ScreenContext.Provider value={ReanimatedScreenWrapper as any}>\n {props.children}\n </ScreenContext.Provider>\n );\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAA6B,OAAO;AAEhD,SAAsBC,aAAa,QAAQ,sBAAsB;AACjE,OAAOC,2BAA2B,MAAM,+BAA+B;AACvE,OAAOC,cAAc,MAAM,oBAAoB;AAE/C,MAAMC,uBAAuB,SAASJ,KAAK,CAACK,SAAS,CAAc;EAAAC,YAAA;IAAA,SAAAC,SAAA;IAAAC,eAAA,cACb,IAAI;IAAAA,eAAA,iBAM9CC,GAAyC,IAAW;MAAA,IAAAC,qBAAA,EAAAC,WAAA;MAC5D,IAAI,CAACF,GAAG,GAAGA,GAAG;MACd,CAAAC,qBAAA,IAAAC,WAAA,OAAI,CAACC,KAAK,EAACC,cAAc,cAAAH,qBAAA,uBAAzBA,qBAAA,CAAAI,IAAA,CAAAH,WAAA,EAA4BF,GAAG,CAAC;IAClC,CAAC;EAAA;EAPDM,cAAcA,CAACH,KAAkB,EAAQ;IAAA,IAAAI,SAAA;IACvC,CAAAA,SAAA,OAAI,CAACP,GAAG,cAAAO,SAAA,uBAARA,SAAA,CAAUD,cAAc,CAACH,KAAK,CAAC;EACjC;EAOAK,MAAMA,CAAA,EAAG;IACP,MAAMC,gBAAgB,GAAG,IAAI,CAACN,KAAK,CAACO,aAAa,GAC7CjB,2BAA2B,GAC3BC,cAAc;IAClB,oBACEH,KAAA,CAAAoB,aAAA,CAACF,gBAAgB,EAAAG,QAAA,KACX,IAAI,CAACT,KAAK;MACd;MACAH,GAAG,EAAE,IAAI,CAACa;IAAO,GACjB;EAEN;AACF;AAEA,eAAe,SAASC,wBAAwBA,CAC9CX,KAAiC,EACjC;EACA;IAAA;IACE;IACAZ,KAAA,CAAAoB,aAAA,CAACnB,aAAa,CAACuB,QAAQ;MAACC,KAAK,EAAErB;IAA+B,GAC3DQ,KAAK,CAACc,QAAQ;EACQ;AAE7B"}
@@ -1 +1 @@
1
- {"version":3,"names":["React","ReanimatedTransitionProgressContext","useReanimatedTransitionProgress","progress","useContext","undefined","Error"],"sources":["useReanimatedTransitionProgress.tsx"],"sourcesContent":["import * as React from 'react';\nimport ReanimatedTransitionProgressContext from './ReanimatedTransitionProgressContext';\n\nexport default function useReanimatedTransitionProgress() {\n const progress = React.useContext(ReanimatedTransitionProgressContext);\n\n if (progress === undefined) {\n throw new Error(\n \"Couldn't find values for reanimated transition progress. Are you inside a screen in Native Stack?\"\n );\n }\n\n return progress;\n}\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,mCAAmC,MAAM,uCAAuC;AAEvF,eAAe,SAASC,+BAA+B,GAAG;EACxD,MAAMC,QAAQ,GAAGH,KAAK,CAACI,UAAU,CAACH,mCAAmC,CAAC;EAEtE,IAAIE,QAAQ,KAAKE,SAAS,EAAE;IAC1B,MAAM,IAAIC,KAAK,CACb,mGAAmG,CACpG;EACH;EAEA,OAAOH,QAAQ;AACjB"}
1
+ {"version":3,"names":["React","ReanimatedTransitionProgressContext","useReanimatedTransitionProgress","progress","useContext","undefined","Error"],"sources":["useReanimatedTransitionProgress.tsx"],"sourcesContent":["import * as React from 'react';\nimport ReanimatedTransitionProgressContext from './ReanimatedTransitionProgressContext';\n\nexport default function useReanimatedTransitionProgress() {\n const progress = React.useContext(ReanimatedTransitionProgressContext);\n\n if (progress === undefined) {\n throw new Error(\n \"Couldn't find values for reanimated transition progress. Are you inside a screen in Native Stack?\"\n );\n }\n\n return progress;\n}\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,mCAAmC,MAAM,uCAAuC;AAEvF,eAAe,SAASC,+BAA+BA,CAAA,EAAG;EACxD,MAAMC,QAAQ,GAAGH,KAAK,CAACI,UAAU,CAACH,mCAAmC,CAAC;EAEtE,IAAIE,QAAQ,KAAKE,SAAS,EAAE;IAC1B,MAAM,IAAIC,KAAK,CACb,mGAAmG,CACpG;EACH;EAEA,OAAOH,QAAQ;AACjB"}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["types.tsx"],"sourcesContent":["import {\n Animated,\n NativeSyntheticEvent,\n ViewProps,\n View,\n TargetedEvent,\n TextInputFocusEventData,\n} from 'react-native';\n\nexport type StackPresentationTypes =\n | 'push'\n | 'modal'\n | 'transparentModal'\n | 'containedModal'\n | 'containedTransparentModal'\n | 'fullScreenModal'\n | 'formSheet';\nexport type StackAnimationTypes =\n | 'default'\n | 'fade'\n | 'fade_from_bottom'\n | 'flip'\n | 'none'\n | 'simple_push'\n | 'slide_from_bottom'\n | 'slide_from_right'\n | 'slide_from_left';\nexport type BlurEffectTypes =\n | 'extraLight'\n | 'light'\n | 'dark'\n | 'regular'\n | 'prominent'\n | 'systemUltraThinMaterial'\n | 'systemThinMaterial'\n | 'systemMaterial'\n | 'systemThickMaterial'\n | 'systemChromeMaterial'\n | 'systemUltraThinMaterialLight'\n | 'systemThinMaterialLight'\n | 'systemMaterialLight'\n | 'systemThickMaterialLight'\n | 'systemChromeMaterialLight'\n | 'systemUltraThinMaterialDark'\n | 'systemThinMaterialDark'\n | 'systemMaterialDark'\n | 'systemThickMaterialDark'\n | 'systemChromeMaterialDark';\nexport type ScreenReplaceTypes = 'push' | 'pop';\nexport type SwipeDirectionTypes = 'vertical' | 'horizontal';\nexport type ScreenOrientationTypes =\n | 'default'\n | 'all'\n | 'portrait'\n | 'portrait_up'\n | 'portrait_down'\n | 'landscape'\n | 'landscape_left'\n | 'landscape_right';\nexport type HeaderSubviewTypes =\n | 'back'\n | 'right'\n | 'left'\n | 'center'\n | 'searchBar';\n\nexport type TransitionProgressEventType = {\n progress: number;\n closing: number;\n goingForward: number;\n};\n\nexport type GestureResponseDistanceType = {\n start?: number;\n end?: number;\n top?: number;\n bottom?: number;\n};\n\nexport interface ScreenProps extends ViewProps {\n active?: 0 | 1 | Animated.AnimatedInterpolation;\n activityState?: 0 | 1 | 2 | Animated.AnimatedInterpolation;\n children?: React.ReactNode;\n /**\n * Boolean indicating that swipe dismissal should trigger animation provided by `stackAnimation`. Defaults to `false`.\n *\n * @platform ios\n */\n customAnimationOnSwipe?: boolean;\n /**\n * All children screens should have the same value of their \"enabled\" prop as their container.\n */\n enabled?: boolean;\n /**\n * Internal boolean used to not attach events used only by native-stack. It prevents non native-stack navigators from sending transition progress from their Screen components.\n */\n isNativeStack?: boolean;\n /**\n * Whether inactive screens should be suspended from re-rendering. Defaults to `false`.\n * When `enableFreeze()` is run at the top of the application defaults to `true`.\n */\n freezeOnBlur?: boolean;\n /**\n * Boolean indicating whether the swipe gesture should work on whole screen. Swiping with this option results in the same transition animation as `simple_push` by default.\n * It can be changed to other custom animations with `customAnimationOnSwipe` prop, but default iOS swipe animation is not achievable due to usage of custom recognizer.\n * Defaults to `false`.\n *\n * @platform ios\n */\n fullScreenSwipeEnabled?: boolean;\n /**\n * Whether you can use gestures to dismiss this screen. Defaults to `true`.\n *\n * @platform ios\n */\n gestureEnabled?: boolean;\n /**\n * Use it to restrict the distance from the edges of screen in which the gesture should be recognized. To be used alongside `fullScreenSwipeEnabled`.\n *\n * @platform ios\n */\n gestureResponseDistance?: GestureResponseDistanceType;\n /**\n * Whether the home indicator should be hidden on this screen. Defaults to `false`.\n *\n * @platform ios\n */\n homeIndicatorHidden?: boolean;\n /**\n * Whether the keyboard should hide when swiping to the previous screen. Defaults to `false`.\n *\n * @platform ios\n */\n hideKeyboardOnSwipe?: boolean;\n /**\n * Boolean indicating whether, when the Android default back button is clicked, the `pop` action should be performed on the native side or on the JS side to be able to prevent it.\n * Unfortunately the same behavior is not available on iOS since the behavior of native back button cannot be changed there.\n * Defaults to `false`.\n *\n * @platform android\n */\n nativeBackButtonDismissalEnabled?: boolean;\n /**\n * Sets the navigation bar color. Defaults to initial status bar color.\n *\n * @platform android\n */\n navigationBarColor?: string;\n /**\n * Sets the visibility of the navigation bar. Defaults to `false`.\n *\n * @platform android\n */\n navigationBarHidden?: boolean;\n /**\n * A callback that gets called when the current screen appears.\n */\n onAppear?: (e: NativeSyntheticEvent<TargetedEvent>) => void;\n onComponentRef?: (view: unknown) => void;\n /**\n * A callback that gets called when the current screen disappears.\n */\n onDisappear?: (e: NativeSyntheticEvent<TargetedEvent>) => void;\n /**\n * A callback that gets called when the current screen is dismissed by hardware back (on Android) or dismiss gesture (swipe back or down).\n * The callback takes the number of dismissed screens as an argument since iOS 14 native header back button can pop more than 1 screen at a time.\n */\n onDismissed?: (e: NativeSyntheticEvent<{ dismissCount: number }>) => void;\n /**\n * An internal callback that gets called when the native header back button is clicked on Android and `enableNativeBackButtonDismissal` is set to `false`. It dismises the screen using `navigation.pop()`.\n *\n * @platform android\n */\n onHeaderBackButtonClicked?: () => void;\n /**\n * An internal callback called when screen is dismissed by gesture or by native header back button and `preventNativeDismiss` is set to `true`.\n *\n * @platform ios\n */\n onNativeDismissCancelled?: (\n e: NativeSyntheticEvent<{ dismissCount: number }>\n ) => void;\n /**\n * An internal callback called every frame during the transition of screens of `native-stack`, used to feed transition context.\n */\n onTransitionProgress?: (\n e: NativeSyntheticEvent<TransitionProgressEventType>\n ) => void;\n /**\n * A callback that gets called when the current screen will appear. This is called as soon as the transition begins.\n */\n onWillAppear?: (e: NativeSyntheticEvent<TargetedEvent>) => void;\n /**\n * A callback that gets called when the current screen will disappear. This is called as soon as the transition begins.\n */\n onWillDisappear?: (e: NativeSyntheticEvent<TargetedEvent>) => void;\n /**\n * Boolean indicating whether to prevent current screen from being dismissed.\n * Defaults to `false`.\n *\n * @platform ios\n */\n preventNativeDismiss?: boolean;\n ref?: React.Ref<View>;\n /**\n * How should the screen replacing another screen animate. Defaults to `pop`.\n * The following values are currently supported:\n * - \"push\" – the new screen will perform push animation.\n * - \"pop\" – the new screen will perform pop animation.\n */\n replaceAnimation?: ScreenReplaceTypes;\n /**\n * In which orientation should the screen appear.\n * The following values are currently supported:\n * - \"default\" - resolves to \"all\" without \"portrait_down\" on iOS. On Android, this lets the system decide the best orientation.\n * - \"all\" – all orientations are permitted\n * - \"portrait\" – portrait orientations are permitted\n * - \"portrait_up\" – right-side portrait orientation is permitted\n * - \"portrait_down\" – upside-down portrait orientation is permitted\n * - \"landscape\" – landscape orientations are permitted\n * - \"landscape_left\" – landscape-left orientation is permitted\n * - \"landscape_right\" – landscape-right orientation is permitted\n */\n screenOrientation?: ScreenOrientationTypes;\n /**\n * How the screen should appear/disappear when pushed or popped at the top of the stack.\n * The following values are currently supported:\n * - \"default\" – uses a platform default animation\n * - \"fade\" – fades screen in or out\n * - \"fade_from_bottom\" – performs a fade from bottom animation\n * - \"flip\" – flips the screen, requires stackPresentation: \"modal\" (iOS only)\n * - \"simple_push\" – performs a default animation, but without shadow and native header transition (iOS only)\n * - `slide_from_bottom` – performs a slide from bottom animation\n * - \"slide_from_right\" - slide in the new screen from right to left (Android only, resolves to default transition on iOS)\n * - \"slide_from_left\" - slide in the new screen from left to right (Android only, resolves to default transition on iOS)\n * - \"none\" – the screen appears/dissapears without an animation\n */\n stackAnimation?: StackAnimationTypes;\n /**\n * How should the screen be presented.\n * The following values are currently supported:\n * - \"push\" – the new screen will be pushed onto a stack which on iOS means that the default animation will be slide from the side, the animation on Android may vary depending on the OS version and theme.\n * - \"modal\" – the new screen will be presented modally. In addition this allow for a nested stack to be rendered inside such screens.\n * - \"transparentModal\" – the new screen will be presented modally but in addition the second to last screen will remain attached to the stack container such that if the top screen is non opaque the content below can still be seen. If \"modal\" is used instead the below screen will get unmounted as soon as the transition ends.\n * - \"containedModal\" – will use \"UIModalPresentationCurrentContext\" modal style on iOS and will fallback to \"modal\" on Android.\n * - \"containedTransparentModal\" – will use \"UIModalPresentationOverCurrentContext\" modal style on iOS and will fallback to \"transparentModal\" on Android.\n * - \"fullScreenModal\" – will use \"UIModalPresentationFullScreen\" modal style on iOS and will fallback to \"modal\" on Android.\n * - \"formSheet\" – will use \"UIModalPresentationFormSheet\" modal style on iOS and will fallback to \"modal\" on Android.\n */\n stackPresentation?: StackPresentationTypes;\n /**\n * Sets the status bar animation (similar to the `StatusBar` component). Requires enabling (or deleting) `View controller-based status bar appearance` in your Info.plist file on iOS.\n */\n statusBarAnimation?: 'none' | 'fade' | 'slide';\n /**\n * Sets the status bar color (similar to the `StatusBar` component). Defaults to initial status bar color.\n *\n * @platform android\n */\n statusBarColor?: string;\n /**\n * Whether the status bar should be hidden on this screen. Requires enabling (or deleting) `View controller-based status bar appearance` in your Info.plist file on iOS. Defaults to `false`.\n */\n statusBarHidden?: boolean;\n /**\n * Sets the status bar color (similar to the `StatusBar` component). Requires enabling (or deleting) `View controller-based status bar appearance` in your Info.plist file on iOS. Defaults to `auto`.\n */\n statusBarStyle?: 'inverted' | 'auto' | 'light' | 'dark';\n /**\n * Sets the translucency of the status bar. Defaults to `false`.\n *\n * @platform android\n */\n statusBarTranslucent?: boolean;\n /**\n * Sets the direction in which you should swipe to dismiss the screen.\n * When using `vertical` option, options `fullScreenSwipeEnabled: true`, `customAnimationOnSwipe: true` and `stackAnimation: 'slide_from_bottom'` are set by default.\n * The following values are supported:\n * - `vertical` – dismiss screen vertically\n * - `horizontal` – dismiss screen horizontally (default)\n *\n * @platform ios\n */\n swipeDirection?: SwipeDirectionTypes;\n /**\n * Changes the duration (in milliseconds) of `slide_from_bottom`, `fade_from_bottom`, `fade` and `simple_push` transitions on iOS. Defaults to `350`.\n * The duration of `default` and `flip` transitions isn't customizable.\n *\n * @platform ios\n */\n transitionDuration?: number;\n}\n\nexport interface ScreenContainerProps extends ViewProps {\n children?: React.ReactNode;\n /**\n * A prop that gives users an option to switch between using Screens for the navigator (container). All children screens should have the same value of their \"enabled\" prop as their container.\n */\n enabled?: boolean;\n /**\n * A prop to be used in navigators always showing only one screen (providing only `0` or `2` `activityState` values) for better implementation of `ScreenContainer` on iOS.\n */\n hasTwoStates?: boolean;\n}\n\nexport interface ScreenStackProps extends ViewProps {\n children?: React.ReactNode;\n /**\n * A callback that gets called when the current screen finishes its transition.\n */\n onFinishTransitioning?: (e: NativeSyntheticEvent<TargetedEvent>) => void;\n}\n\nexport interface ScreenStackHeaderConfigProps extends ViewProps {\n /**\n * Whether to show the back button with custom left side of the header.\n */\n backButtonInCustomView?: boolean;\n /**\n * Controls the color of the navigation header.\n */\n backgroundColor?: string;\n /**\n * Title to display in the back button.\n * @platform ios.\n */\n backTitle?: string;\n /**\n * Allows for customizing font family to be used for back button title on iOS.\n * @platform ios\n */\n backTitleFontFamily?: string;\n /**\n * Allows for customizing font size to be used for back button title on iOS.\n * @platform ios\n */\n backTitleFontSize?: number;\n /**\n * Blur effect to be applied to the header. Works with backgroundColor's alpha < 1.\n * @platform ios\n */\n blurEffect?: BlurEffectTypes;\n /**\n * Pass HeaderLeft, HeaderRight and HeaderTitle\n */\n children?: React.ReactNode;\n /**\n * Controls the color of items rendered on the header. This includes back icon, back text (iOS only) and title text. If you want the title to have different color use titleColor property.\n */\n color?: string;\n /**\n * Whether the stack should be in rtl or ltr form.\n */\n direction?: 'rtl' | 'ltr';\n /**\n * Boolean indicating whether to show the menu on longPress of iOS >= 14 back button.\n * @platform ios\n */\n disableBackButtonMenu?: boolean;\n /**\n * When set to true the header will be hidden while the parent Screen is on the top of the stack. The default value is false.\n */\n hidden?: boolean;\n /**\n * Boolean indicating whether to hide the back button in header.\n */\n hideBackButton?: boolean;\n /**\n * Boolean indicating whether to hide the elevation shadow or the bottom border on the header.\n */\n hideShadow?: boolean;\n /**\n * Boolean to set native property to prefer large title header (like in iOS setting).\n * For large title to collapse on scroll, the content of the screen should be wrapped in a scrollable view such as `ScrollView` or `FlatList`.\n * If the scrollable area doesn't fill the screen, the large title won't collapse on scroll.\n * Only supported on iOS.\n *\n * @platform ios\n */\n largeTitle?: boolean;\n /**\n * Controls the color of the navigation header when the edge of any scrollable content reaches the matching edge of the navigation bar.\n */\n largeTitleBackgroundColor?: string;\n /**\n * Customize the color to be used for the large title. By default uses the titleColor property.\n * @platform ios\n */\n largeTitleColor?: string;\n /**\n * Customize font family to be used for the large title.\n * @platform ios\n */\n largeTitleFontFamily?: string;\n /**\n * Customize the size of the font to be used for the large title.\n * @platform ios\n */\n largeTitleFontSize?: number;\n /**\n * Customize the weight of the font to be used for the large title.\n * @platform ios\n */\n largeTitleFontWeight?: string;\n /**\n * Boolean that allows for disabling drop shadow under navigation header when the edge of any scrollable content reaches the matching edge of the navigation bar.\n */\n largeTitleHideShadow?: boolean;\n /**\n * Callback which is executed when screen header is attached\n */\n onAttached?: () => void;\n /**\n * Callback which is executed when screen header is detached\n */\n onDetached?: () => void;\n /**\n * String that can be displayed in the header as a fallback for `headerTitle`.\n */\n title?: string;\n /**\n * Allows for setting text color of the title.\n */\n titleColor?: string;\n /**\n * Customize font family to be used for the title.\n */\n titleFontFamily?: string;\n /**\n * Customize the size of the font to be used for the title.\n */\n titleFontSize?: number;\n /**\n * Customize the weight of the font to be used for the title.\n */\n titleFontWeight?: string;\n /**\n * A flag to that lets you opt out of insetting the header. You may want to\n * set this to `false` if you use an opaque status bar. Defaults to `true`.\n * Only supported on Android. Insets are always applied on iOS because the\n * header cannot be opaque.\n *\n * @platform android\n */\n topInsetEnabled?: boolean;\n /**\n * Boolean indicating whether the navigation bar is translucent.\n */\n translucent?: boolean;\n}\n\nexport interface SearchBarProps {\n /**\n * The auto-capitalization behavior\n */\n autoCapitalize?: 'none' | 'words' | 'sentences' | 'characters';\n /**\n * Automatically focuses search bar on mount\n *\n * @platform android\n */\n autoFocus?: boolean;\n /**\n * The search field background color\n */\n barTintColor?: string;\n /**\n * The color for the cursor caret and cancel button text.\n *\n * @platform ios\n */\n tintColor?: string;\n /**\n * The text to be used instead of default `Cancel` button text\n *\n * @platform ios\n */\n cancelButtonText?: string;\n /**\n * Specifies whether the back button should close search bar's text input or not.\n *\n * @platform android\n */\n disableBackButtonOverride?: boolean;\n /**\n * Indicates whether to hide the navigation bar\n *\n * @platform ios\n */\n hideNavigationBar?: boolean;\n /**\n * Indicates whether to hide the search bar when scrolling\n *\n * @platform ios\n */\n hideWhenScrolling?: boolean;\n\n /**\n * Sets type of the input. Defaults to `text`.\n *\n * @platform android\n */\n inputType?: 'text' | 'phone' | 'number' | 'email';\n /**\n * Indicates whether to to obscure the underlying content\n */\n obscureBackground?: boolean;\n /**\n * A callback that gets called when search bar has lost focus\n */\n onBlur?: (e: NativeSyntheticEvent<TargetedEvent>) => void;\n /**\n * A callback that gets called when the cancel button is pressed\n *\n * @platform ios\n */\n onCancelButtonPress?: (e: NativeSyntheticEvent<TargetedEvent>) => void;\n\n /**\n * A callback that gets called when the text changes. It receives the current text value of the search bar.\n */\n onChangeText?: (e: NativeSyntheticEvent<TextInputFocusEventData>) => void;\n\n /**\n * A callback that gets called when search bar is closed\n *\n * @platform android\n */\n onClose?: () => void;\n /**\n * A callback that gets called when search bar has received focus\n */\n onFocus?: (e: NativeSyntheticEvent<TargetedEvent>) => void;\n /**\n * A callback that gets called when search bar is opened\n *\n * @platform android\n */\n onOpen?: () => void;\n /**\n * A callback that gets called when the search button is pressed. It receives the current text value of the search bar.\n */\n onSearchButtonPress?: (\n e: NativeSyntheticEvent<TextInputFocusEventData>\n ) => void;\n /**\n * Text displayed when search field is empty\n */\n placeholder?: string;\n /**\n * The search field text color\n */\n textColor?: string;\n /**\n * The search hint text color\n *\n * @plaform android\n */\n hintTextColor?: string;\n /**\n * The search and close icon color shown in the header\n *\n * @plaform android\n */\n headerIconColor?: string;\n /**\n * Show the search hint icon when search bar is focused\n *\n * @plaform android\n * @default true\n */\n shouldShowHintSearchIcon?: boolean;\n}\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["types.tsx"],"sourcesContent":["import {\n Animated,\n NativeSyntheticEvent,\n ViewProps,\n View,\n TargetedEvent,\n TextInputFocusEventData,\n} from 'react-native';\n\nexport type SearchBarCommands = {\n focus: () => void;\n blur: () => void;\n clearText: () => void;\n toggleCancelButton: (show: boolean) => void;\n setText: (text: string) => void;\n};\n\nexport type StackPresentationTypes =\n | 'push'\n | 'modal'\n | 'transparentModal'\n | 'containedModal'\n | 'containedTransparentModal'\n | 'fullScreenModal'\n | 'formSheet';\nexport type StackAnimationTypes =\n | 'default'\n | 'fade'\n | 'fade_from_bottom'\n | 'flip'\n | 'none'\n | 'simple_push'\n | 'slide_from_bottom'\n | 'slide_from_right'\n | 'slide_from_left';\nexport type BlurEffectTypes =\n | 'extraLight'\n | 'light'\n | 'dark'\n | 'regular'\n | 'prominent'\n | 'systemUltraThinMaterial'\n | 'systemThinMaterial'\n | 'systemMaterial'\n | 'systemThickMaterial'\n | 'systemChromeMaterial'\n | 'systemUltraThinMaterialLight'\n | 'systemThinMaterialLight'\n | 'systemMaterialLight'\n | 'systemThickMaterialLight'\n | 'systemChromeMaterialLight'\n | 'systemUltraThinMaterialDark'\n | 'systemThinMaterialDark'\n | 'systemMaterialDark'\n | 'systemThickMaterialDark'\n | 'systemChromeMaterialDark';\nexport type ScreenReplaceTypes = 'push' | 'pop';\nexport type SwipeDirectionTypes = 'vertical' | 'horizontal';\nexport type ScreenOrientationTypes =\n | 'default'\n | 'all'\n | 'portrait'\n | 'portrait_up'\n | 'portrait_down'\n | 'landscape'\n | 'landscape_left'\n | 'landscape_right';\nexport type HeaderSubviewTypes =\n | 'back'\n | 'right'\n | 'left'\n | 'center'\n | 'searchBar';\n\nexport type TransitionProgressEventType = {\n progress: number;\n closing: number;\n goingForward: number;\n};\n\nexport type GestureResponseDistanceType = {\n start?: number;\n end?: number;\n top?: number;\n bottom?: number;\n};\n\nexport type SheetDetentTypes = 'medium' | 'large' | 'all';\n\nexport interface ScreenProps extends ViewProps {\n active?: 0 | 1 | Animated.AnimatedInterpolation<number>;\n activityState?: 0 | 1 | 2 | Animated.AnimatedInterpolation<number>;\n children?: React.ReactNode;\n /**\n * Boolean indicating that swipe dismissal should trigger animation provided by `stackAnimation`. Defaults to `false`.\n *\n * @platform ios\n */\n customAnimationOnSwipe?: boolean;\n /**\n * All children screens should have the same value of their \"enabled\" prop as their container.\n */\n enabled?: boolean;\n /**\n * Internal boolean used to not attach events used only by native-stack. It prevents non native-stack navigators from sending transition progress from their Screen components.\n */\n isNativeStack?: boolean;\n /**\n * Whether inactive screens should be suspended from re-rendering. Defaults to `false`.\n * When `enableFreeze()` is run at the top of the application defaults to `true`.\n */\n freezeOnBlur?: boolean;\n /**\n * Boolean indicating whether the swipe gesture should work on whole screen. Swiping with this option results in the same transition animation as `simple_push` by default.\n * It can be changed to other custom animations with `customAnimationOnSwipe` prop, but default iOS swipe animation is not achievable due to usage of custom recognizer.\n * Defaults to `false`.\n *\n * @platform ios\n */\n fullScreenSwipeEnabled?: boolean;\n /**\n * Whether you can use gestures to dismiss this screen. Defaults to `true`.\n *\n * @platform ios\n */\n gestureEnabled?: boolean;\n /**\n * Use it to restrict the distance from the edges of screen in which the gesture should be recognized. To be used alongside `fullScreenSwipeEnabled`.\n *\n * @platform ios\n */\n gestureResponseDistance?: GestureResponseDistanceType;\n /**\n * Whether the home indicator should be hidden on this screen. Defaults to `false`.\n *\n * @platform ios\n */\n homeIndicatorHidden?: boolean;\n /**\n * Whether the keyboard should hide when swiping to the previous screen. Defaults to `false`.\n *\n * @platform ios\n */\n hideKeyboardOnSwipe?: boolean;\n /**\n * Boolean indicating whether, when the Android default back button is clicked, the `pop` action should be performed on the native side or on the JS side to be able to prevent it.\n * Unfortunately the same behavior is not available on iOS since the behavior of native back button cannot be changed there.\n * Defaults to `false`.\n *\n * @platform android\n */\n nativeBackButtonDismissalEnabled?: boolean;\n /**\n * Sets the navigation bar color. Defaults to initial status bar color.\n *\n * @platform android\n */\n navigationBarColor?: string;\n /**\n * Sets the visibility of the navigation bar. Defaults to `false`.\n *\n * @platform android\n */\n navigationBarHidden?: boolean;\n /**\n * A callback that gets called when the current screen appears.\n */\n onAppear?: (e: NativeSyntheticEvent<TargetedEvent>) => void;\n onComponentRef?: (view: unknown) => void;\n /**\n * A callback that gets called when the current screen disappears.\n */\n onDisappear?: (e: NativeSyntheticEvent<TargetedEvent>) => void;\n /**\n * A callback that gets called when the current screen is dismissed by hardware back (on Android) or dismiss gesture (swipe back or down).\n * The callback takes the number of dismissed screens as an argument since iOS 14 native header back button can pop more than 1 screen at a time.\n */\n onDismissed?: (e: NativeSyntheticEvent<{ dismissCount: number }>) => void;\n /**\n * An internal callback that gets called when the native header back button is clicked on Android and `enableNativeBackButtonDismissal` is set to `false`. It dismises the screen using `navigation.pop()`.\n *\n * @platform android\n */\n onHeaderBackButtonClicked?: () => void;\n /**\n * An internal callback called when screen is dismissed by gesture or by native header back button and `preventNativeDismiss` is set to `true`.\n *\n * @platform ios\n */\n onNativeDismissCancelled?: (\n e: NativeSyntheticEvent<{ dismissCount: number }>\n ) => void;\n /**\n * An internal callback called every frame during the transition of screens of `native-stack`, used to feed transition context.\n */\n onTransitionProgress?: (\n e: NativeSyntheticEvent<TransitionProgressEventType>\n ) => void;\n /**\n * A callback that gets called when the current screen will appear. This is called as soon as the transition begins.\n */\n onWillAppear?: (e: NativeSyntheticEvent<TargetedEvent>) => void;\n /**\n * A callback that gets called when the current screen will disappear. This is called as soon as the transition begins.\n */\n onWillDisappear?: (e: NativeSyntheticEvent<TargetedEvent>) => void;\n /**\n * Boolean indicating whether to prevent current screen from being dismissed.\n * Defaults to `false`.\n *\n * @platform ios\n */\n preventNativeDismiss?: boolean;\n ref?: React.Ref<View>;\n /**\n * How should the screen replacing another screen animate. Defaults to `pop`.\n * The following values are currently supported:\n * - \"push\" – the new screen will perform push animation.\n * - \"pop\" – the new screen will perform pop animation.\n */\n replaceAnimation?: ScreenReplaceTypes;\n /**\n * In which orientation should the screen appear.\n * The following values are currently supported:\n * - \"default\" - resolves to \"all\" without \"portrait_down\" on iOS. On Android, this lets the system decide the best orientation.\n * - \"all\" – all orientations are permitted\n * - \"portrait\" – portrait orientations are permitted\n * - \"portrait_up\" – right-side portrait orientation is permitted\n * - \"portrait_down\" – upside-down portrait orientation is permitted\n * - \"landscape\" – landscape orientations are permitted\n * - \"landscape_left\" – landscape-left orientation is permitted\n * - \"landscape_right\" – landscape-right orientation is permitted\n */\n screenOrientation?: ScreenOrientationTypes;\n /**\n * Describes heights where a sheet can rest.\n * Works only when `stackPresentation` is set to `formSheet`.\n * Defaults to `large`.\n *\n * Available values:\n *\n * - `large` - only large detent level will be allowed\n * - `medium` - only medium detent level will be allowed\n * - `all` - all detent levels will be allowed\n *\n * @platform ios\n */\n sheetAllowedDetents?: SheetDetentTypes;\n /**\n * Whether the sheet should expand to larger detent when scrolling.\n * Works only when `stackPresentation` is set to `formSheet`.\n * Defaults to `true`.\n */\n sheetExpandsWhenScrolledToEdge?: boolean;\n /**\n * The corner radius that the sheet will try to render with.\n * Works only when `stackPresentation` is set to `formSheet`.\n *\n * If set to non-negative value it will try to render sheet with provided radius, else ti will apply system default.\n *\n * If left unset system default is used.\n *\n * @platform ios\n */\n sheetCornerRadius?: number;\n /**\n * Boolean indicating whether the sheet shows a grabber at the top.\n * Works only when `stackPresentation` is set to `formSheet`.\n * Defaults to `false`.\n *\n * @platform ios\n */\n sheetGrabberVisible?: boolean;\n /**\n * The largest sheet detent for which a view underneath won't be dimmed.\n * Works only when `stackPresentation` is set to `formSheet`.\n *\n * If this prop is set to:\n *\n * - `large` - the view underneath won't be dimmed at any detent level\n * - `medium` - the view underneath will be dimmed only when detent level is `large`\n * - `all` - the view underneath will be dimmed for any detent level\n *\n * Defaults to `all`.\n *\n * @platform ios\n */\n sheetLargestUndimmedDetent?: SheetDetentTypes;\n /**\n * How the screen should appear/disappear when pushed or popped at the top of the stack.\n * The following values are currently supported:\n * - \"default\" – uses a platform default animation\n * - \"fade\" – fades screen in or out\n * - \"fade_from_bottom\" – performs a fade from bottom animation\n * - \"flip\" – flips the screen, requires stackPresentation: \"modal\" (iOS only)\n * - \"simple_push\" – performs a default animation, but without shadow and native header transition (iOS only)\n * - `slide_from_bottom` – performs a slide from bottom animation\n * - \"slide_from_right\" - slide in the new screen from right to left (Android only, resolves to default transition on iOS)\n * - \"slide_from_left\" - slide in the new screen from left to right (Android only, resolves to default transition on iOS)\n * - \"none\" – the screen appears/dissapears without an animation\n */\n stackAnimation?: StackAnimationTypes;\n /**\n * How should the screen be presented.\n * The following values are currently supported:\n * - \"push\" – the new screen will be pushed onto a stack which on iOS means that the default animation will be slide from the side, the animation on Android may vary depending on the OS version and theme.\n * - \"modal\" – the new screen will be presented modally. In addition this allow for a nested stack to be rendered inside such screens.\n * - \"transparentModal\" – the new screen will be presented modally but in addition the second to last screen will remain attached to the stack container such that if the top screen is non opaque the content below can still be seen. If \"modal\" is used instead the below screen will get unmounted as soon as the transition ends.\n * - \"containedModal\" – will use \"UIModalPresentationCurrentContext\" modal style on iOS and will fallback to \"modal\" on Android.\n * - \"containedTransparentModal\" – will use \"UIModalPresentationOverCurrentContext\" modal style on iOS and will fallback to \"transparentModal\" on Android.\n * - \"fullScreenModal\" – will use \"UIModalPresentationFullScreen\" modal style on iOS and will fallback to \"modal\" on Android.\n * - \"formSheet\" – will use \"UIModalPresentationFormSheet\" modal style on iOS and will fallback to \"modal\" on Android.\n */\n stackPresentation?: StackPresentationTypes;\n /**\n * Sets the status bar animation (similar to the `StatusBar` component). Requires enabling (or deleting) `View controller-based status bar appearance` in your Info.plist file on iOS.\n */\n statusBarAnimation?: 'none' | 'fade' | 'slide';\n /**\n * Sets the status bar color (similar to the `StatusBar` component). Defaults to initial status bar color.\n *\n * @platform android\n */\n statusBarColor?: string;\n /**\n * Whether the status bar should be hidden on this screen. Requires enabling (or deleting) `View controller-based status bar appearance` in your Info.plist file on iOS. Defaults to `false`.\n */\n statusBarHidden?: boolean;\n /**\n * Sets the status bar color (similar to the `StatusBar` component). Requires enabling (or deleting) `View controller-based status bar appearance` in your Info.plist file on iOS. Defaults to `auto`.\n */\n statusBarStyle?: 'inverted' | 'auto' | 'light' | 'dark';\n /**\n * Sets the translucency of the status bar. Defaults to `false`.\n *\n * @platform android\n */\n statusBarTranslucent?: boolean;\n /**\n * Sets the direction in which you should swipe to dismiss the screen.\n * When using `vertical` option, options `fullScreenSwipeEnabled: true`, `customAnimationOnSwipe: true` and `stackAnimation: 'slide_from_bottom'` are set by default.\n * The following values are supported:\n * - `vertical` – dismiss screen vertically\n * - `horizontal` – dismiss screen horizontally (default)\n *\n * @platform ios\n */\n swipeDirection?: SwipeDirectionTypes;\n /**\n * Changes the duration (in milliseconds) of `slide_from_bottom`, `fade_from_bottom`, `fade` and `simple_push` transitions on iOS. Defaults to `350`.\n * The duration of `default` and `flip` transitions isn't customizable.\n *\n * @platform ios\n */\n transitionDuration?: number;\n}\n\nexport interface ScreenContainerProps extends ViewProps {\n children?: React.ReactNode;\n /**\n * A prop that gives users an option to switch between using Screens for the navigator (container). All children screens should have the same value of their \"enabled\" prop as their container.\n */\n enabled?: boolean;\n /**\n * A prop to be used in navigators always showing only one screen (providing only `0` or `2` `activityState` values) for better implementation of `ScreenContainer` on iOS.\n */\n hasTwoStates?: boolean;\n}\n\nexport interface ScreenStackProps extends ViewProps {\n children?: React.ReactNode;\n /**\n * A callback that gets called when the current screen finishes its transition.\n */\n onFinishTransitioning?: (e: NativeSyntheticEvent<TargetedEvent>) => void;\n}\n\nexport interface ScreenStackHeaderConfigProps extends ViewProps {\n /**\n * Whether to show the back button with custom left side of the header.\n */\n backButtonInCustomView?: boolean;\n /**\n * Controls the color of the navigation header.\n */\n backgroundColor?: string;\n /**\n * Title to display in the back button.\n * @platform ios.\n */\n backTitle?: string;\n /**\n * Allows for customizing font family to be used for back button title on iOS.\n * @platform ios\n */\n backTitleFontFamily?: string;\n /**\n * Allows for customizing font size to be used for back button title on iOS.\n * @platform ios\n */\n backTitleFontSize?: number;\n /**\n * Whether the back button title should be visible or not. Defaults to `true`.\n * @platform ios\n */\n backTitleVisible?: boolean;\n /**\n * Blur effect to be applied to the header. Works with backgroundColor's alpha < 1.\n * @platform ios\n */\n blurEffect?: BlurEffectTypes;\n /**\n * Pass HeaderLeft, HeaderRight and HeaderTitle\n */\n children?: React.ReactNode;\n /**\n * Controls the color of items rendered on the header. This includes back icon, back text (iOS only) and title text. If you want the title to have different color use titleColor property.\n */\n color?: string;\n /**\n * Whether the stack should be in rtl or ltr form.\n */\n direction?: 'rtl' | 'ltr';\n /**\n * Boolean indicating whether to show the menu on longPress of iOS >= 14 back button.\n * @platform ios\n */\n disableBackButtonMenu?: boolean;\n /**\n * When set to true the header will be hidden while the parent Screen is on the top of the stack. The default value is false.\n */\n hidden?: boolean;\n /**\n * Boolean indicating whether to hide the back button in header.\n */\n hideBackButton?: boolean;\n /**\n * Boolean indicating whether to hide the elevation shadow or the bottom border on the header.\n */\n hideShadow?: boolean;\n /**\n * Boolean to set native property to prefer large title header (like in iOS setting).\n * For large title to collapse on scroll, the content of the screen should be wrapped in a scrollable view such as `ScrollView` or `FlatList`.\n * If the scrollable area doesn't fill the screen, the large title won't collapse on scroll.\n * Only supported on iOS.\n *\n * @platform ios\n */\n largeTitle?: boolean;\n /**\n * Controls the color of the navigation header when the edge of any scrollable content reaches the matching edge of the navigation bar.\n */\n largeTitleBackgroundColor?: string;\n /**\n * Customize the color to be used for the large title. By default uses the titleColor property.\n * @platform ios\n */\n largeTitleColor?: string;\n /**\n * Customize font family to be used for the large title.\n * @platform ios\n */\n largeTitleFontFamily?: string;\n /**\n * Customize the size of the font to be used for the large title.\n * @platform ios\n */\n largeTitleFontSize?: number;\n /**\n * Customize the weight of the font to be used for the large title.\n * @platform ios\n */\n largeTitleFontWeight?: string;\n /**\n * Boolean that allows for disabling drop shadow under navigation header when the edge of any scrollable content reaches the matching edge of the navigation bar.\n */\n largeTitleHideShadow?: boolean;\n /**\n * Callback which is executed when screen header is attached\n */\n onAttached?: () => void;\n /**\n * Callback which is executed when screen header is detached\n */\n onDetached?: () => void;\n /**\n * String that can be displayed in the header as a fallback for `headerTitle`.\n */\n title?: string;\n /**\n * Allows for setting text color of the title.\n */\n titleColor?: string;\n /**\n * Customize font family to be used for the title.\n */\n titleFontFamily?: string;\n /**\n * Customize the size of the font to be used for the title.\n */\n titleFontSize?: number;\n /**\n * Customize the weight of the font to be used for the title.\n */\n titleFontWeight?: string;\n /**\n * A flag to that lets you opt out of insetting the header. You may want to\n * set this to `false` if you use an opaque status bar. Defaults to `true`.\n * Only supported on Android. Insets are always applied on iOS because the\n * header cannot be opaque.\n *\n * @platform android\n */\n topInsetEnabled?: boolean;\n /**\n * Boolean indicating whether the navigation bar is translucent.\n */\n translucent?: boolean;\n}\n\nexport interface SearchBarProps {\n /**\n * Reference to imperatively modify search bar.\n *\n * Currently supported operations are:\n *\n * * `focus` - focuses the search bar\n * * `blur` - removes focus from the search bar\n * * `clearText` - removes any text present in the search bar input field\n * * `setText` - sets the search bar's content to given value\n * * `toggleCancelButton` - depending on passed boolean value, hides or shows cancel button (iOS only)\n */\n ref?: React.RefObject<SearchBarCommands>;\n\n /**\n * The auto-capitalization behavior\n */\n autoCapitalize?: 'none' | 'words' | 'sentences' | 'characters';\n /**\n * Automatically focuses search bar on mount\n *\n * @platform android\n */\n autoFocus?: boolean;\n /**\n * The search field background color\n */\n barTintColor?: string;\n /**\n * The color for the cursor caret and cancel button text.\n *\n * @platform ios\n */\n tintColor?: string;\n /**\n * The text to be used instead of default `Cancel` button text\n *\n * @platform ios\n */\n cancelButtonText?: string;\n /**\n * Specifies whether the back button should close search bar's text input or not.\n *\n * @platform android\n */\n disableBackButtonOverride?: boolean;\n /**\n * Indicates whether to hide the navigation bar\n *\n * @platform ios\n */\n hideNavigationBar?: boolean;\n /**\n * Indicates whether to hide the search bar when scrolling\n *\n * @platform ios\n */\n hideWhenScrolling?: boolean;\n\n /**\n * Sets type of the input. Defaults to `text`.\n *\n * @platform android\n */\n inputType?: 'text' | 'phone' | 'number' | 'email';\n /**\n * Indicates whether to to obscure the underlying content\n */\n obscureBackground?: boolean;\n /**\n * A callback that gets called when search bar has lost focus\n */\n onBlur?: (e: NativeSyntheticEvent<TargetedEvent>) => void;\n /**\n * A callback that gets called when the cancel button is pressed\n *\n * @platform ios\n */\n onCancelButtonPress?: (e: NativeSyntheticEvent<TargetedEvent>) => void;\n\n /**\n * A callback that gets called when the text changes. It receives the current text value of the search bar.\n */\n onChangeText?: (e: NativeSyntheticEvent<TextInputFocusEventData>) => void;\n\n /**\n * A callback that gets called when search bar is closed\n *\n * @platform android\n */\n onClose?: () => void;\n /**\n * A callback that gets called when search bar has received focus\n */\n onFocus?: (e: NativeSyntheticEvent<TargetedEvent>) => void;\n /**\n * A callback that gets called when search bar is opened\n *\n * @platform android\n */\n onOpen?: () => void;\n /**\n * A callback that gets called when the search button is pressed. It receives the current text value of the search bar.\n */\n onSearchButtonPress?: (\n e: NativeSyntheticEvent<TextInputFocusEventData>\n ) => void;\n /**\n * Text displayed when search field is empty\n */\n placeholder?: string;\n /**\n * The search field text color\n */\n textColor?: string;\n /**\n * The search hint text color\n *\n * @plaform android\n */\n hintTextColor?: string;\n /**\n * The search and close icon color shown in the header\n *\n * @plaform android\n */\n headerIconColor?: string;\n /**\n * Show the search hint icon when search bar is focused\n *\n * @plaform android\n * @default true\n */\n shouldShowHintSearchIcon?: boolean;\n}\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"names":["React","TransitionProgressContext","useTransitionProgress","progress","useContext","undefined","Error"],"sources":["useTransitionProgress.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport TransitionProgressContext from './TransitionProgressContext';\n\nexport default function useTransitionProgress() {\n const progress = React.useContext(TransitionProgressContext);\n\n if (progress === undefined) {\n throw new Error(\n \"Couldn't find values for transition progress. Are you inside a screen in Native Stack?\"\n );\n }\n\n return progress;\n}\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,OAAOC,yBAAyB,MAAM,6BAA6B;AAEnE,eAAe,SAASC,qBAAqB,GAAG;EAC9C,MAAMC,QAAQ,GAAGH,KAAK,CAACI,UAAU,CAACH,yBAAyB,CAAC;EAE5D,IAAIE,QAAQ,KAAKE,SAAS,EAAE;IAC1B,MAAM,IAAIC,KAAK,CACb,wFAAwF,CACzF;EACH;EAEA,OAAOH,QAAQ;AACjB"}
1
+ {"version":3,"names":["React","TransitionProgressContext","useTransitionProgress","progress","useContext","undefined","Error"],"sources":["useTransitionProgress.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport TransitionProgressContext from './TransitionProgressContext';\n\nexport default function useTransitionProgress() {\n const progress = React.useContext(TransitionProgressContext);\n\n if (progress === undefined) {\n throw new Error(\n \"Couldn't find values for transition progress. Are you inside a screen in Native Stack?\"\n );\n }\n\n return progress;\n}\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,OAAOC,yBAAyB,MAAM,6BAA6B;AAEnE,eAAe,SAASC,qBAAqBA,CAAA,EAAG;EAC9C,MAAMC,QAAQ,GAAGH,KAAK,CAACI,UAAU,CAACH,yBAAyB,CAAC;EAE5D,IAAIE,QAAQ,KAAKE,SAAS,EAAE;IAC1B,MAAM,IAAIC,KAAK,CACb,wFAAwF,CACzF;EACH;EAEA,OAAOH,QAAQ;AACjB"}
@@ -5,4 +5,10 @@ export function executeNativeBackPress() {
5
5
  BackHandler.exitApp();
6
6
  return true;
7
7
  }
8
+
9
+ // Because of a bug introduced in https://github.com/software-mansion/react-native-screens/pull/1646
10
+ // react-native-screens v3.21 changed how header's backTitle handles whitespace strings in https://github.com/software-mansion/react-native-screens/pull/1726
11
+ // To allow for backwards compatibility in @react-navigation/native-stack we need a way to check if this version or newer is used.
12
+ // See https://github.com/react-navigation/react-navigation/pull/11423 for more context.
13
+ export const isNewBackTitleImplementation = true;
8
14
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["BackHandler","Platform","isSearchBarAvailableForCurrentPlatform","includes","OS","executeNativeBackPress","exitApp"],"sources":["utils.ts"],"sourcesContent":["import { BackHandler, Platform } from 'react-native';\n\nexport const isSearchBarAvailableForCurrentPlatform = [\n 'ios',\n 'android',\n].includes(Platform.OS);\n\nexport function executeNativeBackPress() {\n // This function invokes the native back press event\n BackHandler.exitApp();\n return true;\n}\n"],"mappings":"AAAA,SAASA,WAAW,EAAEC,QAAQ,QAAQ,cAAc;AAEpD,OAAO,MAAMC,sCAAsC,GAAG,CACpD,KAAK,EACL,SAAS,CACV,CAACC,QAAQ,CAACF,QAAQ,CAACG,EAAE,CAAC;AAEvB,OAAO,SAASC,sBAAsB,GAAG;EACvC;EACAL,WAAW,CAACM,OAAO,EAAE;EACrB,OAAO,IAAI;AACb"}
1
+ {"version":3,"names":["BackHandler","Platform","isSearchBarAvailableForCurrentPlatform","includes","OS","executeNativeBackPress","exitApp","isNewBackTitleImplementation"],"sources":["utils.ts"],"sourcesContent":["import { BackHandler, Platform } from 'react-native';\n\nexport const isSearchBarAvailableForCurrentPlatform = [\n 'ios',\n 'android',\n].includes(Platform.OS);\n\nexport function executeNativeBackPress() {\n // This function invokes the native back press event\n BackHandler.exitApp();\n return true;\n}\n\n// Because of a bug introduced in https://github.com/software-mansion/react-native-screens/pull/1646\n// react-native-screens v3.21 changed how header's backTitle handles whitespace strings in https://github.com/software-mansion/react-native-screens/pull/1726\n// To allow for backwards compatibility in @react-navigation/native-stack we need a way to check if this version or newer is used.\n// See https://github.com/react-navigation/react-navigation/pull/11423 for more context.\nexport const isNewBackTitleImplementation = true;\n"],"mappings":"AAAA,SAASA,WAAW,EAAEC,QAAQ,QAAQ,cAAc;AAEpD,OAAO,MAAMC,sCAAsC,GAAG,CACpD,KAAK,EACL,SAAS,CACV,CAACC,QAAQ,CAACF,QAAQ,CAACG,EAAE,CAAC;AAEvB,OAAO,SAASC,sBAAsBA,CAAA,EAAG;EACvC;EACAL,WAAW,CAACM,OAAO,EAAE;EACrB,OAAO,IAAI;AACb;;AAEA;AACA;AACA;AACA;AACA,OAAO,MAAMC,4BAA4B,GAAG,IAAI"}
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { Animated } from 'react-native';
3
- type TransitionProgressContextBody = {
3
+ declare type TransitionProgressContextBody = {
4
4
  progress: Animated.Value;
5
5
  closing: Animated.Value;
6
6
  goingForward: Animated.Value;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react-native/types/modules/codegen" />
2
+ import type { ViewProps } from 'react-native';
3
+ interface NativeProps extends ViewProps {
4
+ }
5
+ declare const _default: import("react-native/Libraries/Utilities/codegenNativeComponent").NativeComponentType<NativeProps>;
6
+ export default _default;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react-native/types/modules/codegen" />
2
+ import type { ViewProps } from 'react-native';
3
+ interface NativeProps extends ViewProps {
4
+ }
5
+ declare const _default: import("react-native/Libraries/Utilities/codegenNativeComponent").NativeComponentType<NativeProps>;
6
+ export default _default;
@@ -0,0 +1,62 @@
1
+ /// <reference types="react-native/types/modules/codegen" />
2
+ import type { ViewProps, ColorValue } from 'react-native';
3
+ import type { BubblingEventHandler, WithDefault, Int32, Float, Double } from 'react-native/Libraries/Types/CodegenTypes';
4
+ declare type ScreenEvent = Readonly<{}>;
5
+ declare type ScreenDismissedEvent = Readonly<{
6
+ dismissCount: Int32;
7
+ }>;
8
+ declare type TransitionProgressEvent = Readonly<{
9
+ progress: Double;
10
+ closing: Int32;
11
+ goingForward: Int32;
12
+ }>;
13
+ declare type GestureResponseDistanceType = Readonly<{
14
+ start: Float;
15
+ end: Float;
16
+ top: Float;
17
+ bottom: Float;
18
+ }>;
19
+ declare type StackPresentation = 'push' | 'modal' | 'transparentModal' | 'fullScreenModal' | 'formSheet' | 'containedModal' | 'containedTransparentModal';
20
+ declare type StackAnimation = 'default' | 'flip' | 'simple_push' | 'none' | 'fade' | 'slide_from_right' | 'slide_from_left' | 'slide_from_bottom' | 'fade_from_bottom';
21
+ declare type SwipeDirection = 'vertical' | 'horizontal';
22
+ declare type ReplaceAnimation = 'pop' | 'push';
23
+ declare type SheetDetentTypes = 'large' | 'medium' | 'all';
24
+ export interface NativeProps extends ViewProps {
25
+ onAppear?: BubblingEventHandler<ScreenEvent>;
26
+ onDisappear?: BubblingEventHandler<ScreenEvent>;
27
+ onDismissed?: BubblingEventHandler<ScreenDismissedEvent>;
28
+ onNativeDismissCancelled?: BubblingEventHandler<ScreenDismissedEvent>;
29
+ onWillAppear?: BubblingEventHandler<ScreenEvent>;
30
+ onWillDisappear?: BubblingEventHandler<ScreenEvent>;
31
+ onTransitionProgress?: BubblingEventHandler<TransitionProgressEvent>;
32
+ sheetAllowedDetents?: WithDefault<SheetDetentTypes, 'large'>;
33
+ sheetLargestUndimmedDetent?: WithDefault<SheetDetentTypes, 'all'>;
34
+ sheetGrabberVisible?: WithDefault<boolean, false>;
35
+ sheetCornerRadius?: WithDefault<Float, -1.0>;
36
+ sheetExpandsWhenScrolledToEdge?: WithDefault<boolean, false>;
37
+ customAnimationOnSwipe?: boolean;
38
+ fullScreenSwipeEnabled?: boolean;
39
+ homeIndicatorHidden?: boolean;
40
+ preventNativeDismiss?: boolean;
41
+ gestureEnabled?: WithDefault<boolean, true>;
42
+ statusBarColor?: ColorValue;
43
+ statusBarHidden?: boolean;
44
+ screenOrientation?: string;
45
+ statusBarAnimation?: string;
46
+ statusBarStyle?: string;
47
+ statusBarTranslucent?: boolean;
48
+ gestureResponseDistance?: GestureResponseDistanceType;
49
+ stackPresentation?: WithDefault<StackPresentation, 'push'>;
50
+ stackAnimation?: WithDefault<StackAnimation, 'default'>;
51
+ transitionDuration?: WithDefault<Int32, 350>;
52
+ replaceAnimation?: WithDefault<ReplaceAnimation, 'pop'>;
53
+ swipeDirection?: WithDefault<SwipeDirection, 'horizontal'>;
54
+ hideKeyboardOnSwipe?: boolean;
55
+ activityState?: WithDefault<Float, -1.0>;
56
+ navigationBarColor?: ColorValue;
57
+ navigationBarHidden?: boolean;
58
+ nativeBackButtonDismissalEnabled?: boolean;
59
+ onHeaderBackButtonClicked?: BubblingEventHandler<ScreenEvent>;
60
+ }
61
+ declare const _default: import("react-native/Libraries/Utilities/codegenNativeComponent").NativeComponentType<NativeProps>;
62
+ export default _default;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react-native/types/modules/codegen" />
2
+ import type { ViewProps } from 'react-native';
3
+ interface NativeProps extends ViewProps {
4
+ }
5
+ declare const _default: import("react-native/Libraries/Utilities/codegenNativeComponent").NativeComponentType<NativeProps>;
6
+ export default _default;
@@ -0,0 +1,34 @@
1
+ /// <reference types="react-native/types/modules/codegen" />
2
+ import type { ViewProps, ColorValue } from 'react-native';
3
+ import type { Int32, WithDefault } from 'react-native/Libraries/Types/CodegenTypes';
4
+ declare type DirectionType = 'rtl' | 'ltr';
5
+ export interface NativeProps extends ViewProps {
6
+ backgroundColor?: ColorValue;
7
+ backTitle?: string;
8
+ backTitleFontFamily?: string;
9
+ backTitleFontSize?: Int32;
10
+ backTitleVisible?: WithDefault<boolean, 'true'>;
11
+ color?: ColorValue;
12
+ direction?: WithDefault<DirectionType, 'ltr'>;
13
+ hidden?: boolean;
14
+ hideShadow?: boolean;
15
+ largeTitle?: boolean;
16
+ largeTitleFontFamily?: string;
17
+ largeTitleFontSize?: Int32;
18
+ largeTitleFontWeight?: string;
19
+ largeTitleBackgroundColor?: ColorValue;
20
+ largeTitleHideShadow?: boolean;
21
+ largeTitleColor?: ColorValue;
22
+ translucent?: boolean;
23
+ title?: string;
24
+ titleFontFamily?: string;
25
+ titleFontSize?: Int32;
26
+ titleFontWeight?: string;
27
+ titleColor?: ColorValue;
28
+ disableBackButtonMenu?: boolean;
29
+ hideBackButton?: boolean;
30
+ backButtonInCustomView?: boolean;
31
+ topInsetEnabled?: boolean;
32
+ }
33
+ declare const _default: import("react-native/Libraries/Utilities/codegenNativeComponent").NativeComponentType<NativeProps>;
34
+ export default _default;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react-native/types/modules/codegen" />
2
+ import type { ViewProps } from 'react-native';
3
+ import type { WithDefault } from 'react-native/Libraries/Types/CodegenTypes';
4
+ export declare type HeaderSubviewTypes = 'back' | 'right' | 'left' | 'title' | 'center' | 'searchBar';
5
+ export interface NativeProps extends ViewProps {
6
+ type?: WithDefault<HeaderSubviewTypes, 'left'>;
7
+ }
8
+ declare const _default: import("react-native/Libraries/Utilities/codegenNativeComponent").NativeComponentType<NativeProps>;
9
+ export default _default;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react-native/types/modules/codegen" />
2
+ import type { ViewProps } from 'react-native';
3
+ import type { DirectEventHandler } from 'react-native/Libraries/Types/CodegenTypes';
4
+ declare type FinishTransitioningEvent = Readonly<{}>;
5
+ interface NativeProps extends ViewProps {
6
+ onFinishTransitioning?: DirectEventHandler<FinishTransitioningEvent>;
7
+ }
8
+ declare const _default: import("react-native/Libraries/Utilities/codegenNativeComponent").NativeComponentType<NativeProps>;
9
+ export default _default;