react-native-screens 3.25.0 → 3.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. package/README.md +1 -1
  2. package/RNScreens.podspec +53 -32
  3. package/android/build.gradle +13 -11
  4. package/android/src/main/java/com/swmansion/rnscreens/FragmentHolder.kt +7 -0
  5. package/android/src/main/java/com/swmansion/rnscreens/Screen.kt +41 -10
  6. package/android/src/main/java/com/swmansion/rnscreens/ScreenContainer.kt +35 -36
  7. package/android/src/main/java/com/swmansion/rnscreens/ScreenContainerViewManager.kt +7 -7
  8. package/android/src/main/java/com/swmansion/rnscreens/ScreenEventDispatcher.kt +21 -0
  9. package/android/src/main/java/com/swmansion/rnscreens/ScreenFragment.kt +46 -38
  10. package/android/src/main/java/com/swmansion/rnscreens/ScreenFragmentWrapper.kt +22 -0
  11. package/android/src/main/java/com/swmansion/rnscreens/ScreenStack.kt +40 -39
  12. package/android/src/main/java/com/swmansion/rnscreens/ScreenStackFragment.kt +35 -10
  13. package/android/src/main/java/com/swmansion/rnscreens/ScreenStackFragmentWrapper.kt +15 -0
  14. package/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderConfig.kt +6 -4
  15. package/android/src/main/java/com/swmansion/rnscreens/ScreenViewManager.kt +11 -18
  16. package/android/src/main/java/com/swmansion/rnscreens/ScreenWindowTraits.kt +1 -1
  17. package/android/src/main/java/com/swmansion/rnscreens/ScreensShadowNode.kt +1 -1
  18. package/android/src/main/java/com/swmansion/rnscreens/SearchBarView.kt +23 -7
  19. package/android/src/main/java/com/swmansion/rnscreens/events/HeaderAttachedEvent.kt +3 -5
  20. package/android/src/main/java/com/swmansion/rnscreens/events/HeaderBackButtonClickedEvent.kt +3 -5
  21. package/android/src/main/java/com/swmansion/rnscreens/events/HeaderDetachedEvent.kt +3 -5
  22. package/android/src/main/java/com/swmansion/rnscreens/events/HeaderHeightChangeEvent.kt +26 -0
  23. package/android/src/main/java/com/swmansion/rnscreens/events/ScreenAppearEvent.kt +3 -5
  24. package/android/src/main/java/com/swmansion/rnscreens/events/ScreenDisappearEvent.kt +3 -5
  25. package/android/src/main/java/com/swmansion/rnscreens/events/ScreenDismissedEvent.kt +4 -7
  26. package/android/src/main/java/com/swmansion/rnscreens/events/ScreenTransitionProgressEvent.kt +7 -8
  27. package/android/src/main/java/com/swmansion/rnscreens/events/ScreenWillAppearEvent.kt +3 -5
  28. package/android/src/main/java/com/swmansion/rnscreens/events/ScreenWillDisappearEvent.kt +3 -5
  29. package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarBlurEvent.kt +3 -5
  30. package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarChangeTextEvent.kt +5 -6
  31. package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarCloseEvent.kt +3 -5
  32. package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarFocusEvent.kt +3 -5
  33. package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarOpenEvent.kt +3 -5
  34. package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarSearchButtonPressEvent.kt +4 -6
  35. package/android/src/main/java/com/swmansion/rnscreens/events/StackFinishTransitioningEvent.kt +3 -5
  36. package/android/src/main/java/com/swmansion/rnscreens/utils/DeviceUtils.kt +12 -0
  37. package/ios/RNSScreen.h +5 -0
  38. package/ios/RNSScreen.mm +163 -7
  39. package/ios/RNSScreenStack.mm +18 -0
  40. package/ios/RNSScreenStackHeaderConfig.mm +17 -0
  41. package/ios/events/RNSHeaderHeightChangeEvent.h +8 -0
  42. package/ios/events/RNSHeaderHeightChangeEvent.mm +44 -0
  43. package/lib/commonjs/fabric/ScreenNativeComponent.js.map +1 -1
  44. package/lib/commonjs/index.native.js +11 -11
  45. package/lib/commonjs/index.native.js.map +1 -1
  46. package/lib/commonjs/native-stack/index.js +14 -0
  47. package/lib/commonjs/native-stack/index.js.map +1 -1
  48. package/lib/commonjs/native-stack/navigators/createNativeStackNavigator.js +1 -1
  49. package/lib/commonjs/native-stack/navigators/createNativeStackNavigator.js.map +1 -1
  50. package/lib/commonjs/native-stack/types.js.map +1 -1
  51. package/lib/commonjs/native-stack/utils/AnimatedHeaderHeightContext.js +13 -0
  52. package/lib/commonjs/native-stack/utils/AnimatedHeaderHeightContext.js.map +1 -0
  53. package/lib/commonjs/native-stack/utils/SafeAreaProviderCompat.js.map +1 -1
  54. package/lib/commonjs/native-stack/utils/getStatusBarHeight.js +22 -0
  55. package/lib/commonjs/native-stack/utils/getStatusBarHeight.js.map +1 -0
  56. package/lib/commonjs/native-stack/utils/useAnimatedHeaderHeight.js +19 -0
  57. package/lib/commonjs/native-stack/utils/useAnimatedHeaderHeight.js.map +1 -0
  58. package/lib/commonjs/native-stack/utils/useBackPressSubscription.js +2 -2
  59. package/lib/commonjs/native-stack/utils/useBackPressSubscription.js.map +1 -1
  60. package/lib/commonjs/native-stack/views/HeaderConfig.js +2 -2
  61. package/lib/commonjs/native-stack/views/HeaderConfig.js.map +1 -1
  62. package/lib/commonjs/native-stack/views/NativeStackView.js +39 -21
  63. package/lib/commonjs/native-stack/views/NativeStackView.js.map +1 -1
  64. package/lib/commonjs/reanimated/ReanimatedHeaderHeightContext.js +13 -0
  65. package/lib/commonjs/reanimated/ReanimatedHeaderHeightContext.js.map +1 -0
  66. package/lib/commonjs/reanimated/ReanimatedNativeStackScreen.js +37 -6
  67. package/lib/commonjs/reanimated/ReanimatedNativeStackScreen.js.map +1 -1
  68. package/lib/commonjs/reanimated/ReanimatedScreenProvider.js +2 -2
  69. package/lib/commonjs/reanimated/ReanimatedScreenProvider.js.map +1 -1
  70. package/lib/commonjs/reanimated/index.js +7 -0
  71. package/lib/commonjs/reanimated/index.js.map +1 -1
  72. package/lib/commonjs/reanimated/useReanimatedHeaderHeight.js +19 -0
  73. package/lib/commonjs/reanimated/useReanimatedHeaderHeight.js.map +1 -0
  74. package/lib/commonjs/types.js.map +1 -1
  75. package/lib/module/fabric/ScreenNativeComponent.js.map +1 -1
  76. package/lib/module/index.native.js +12 -12
  77. package/lib/module/index.native.js.map +1 -1
  78. package/lib/module/native-stack/index.js +2 -0
  79. package/lib/module/native-stack/index.js.map +1 -1
  80. package/lib/module/native-stack/navigators/createNativeStackNavigator.js +1 -1
  81. package/lib/module/native-stack/navigators/createNativeStackNavigator.js.map +1 -1
  82. package/lib/module/native-stack/types.js.map +1 -1
  83. package/lib/module/native-stack/utils/AnimatedHeaderHeightContext.js +4 -0
  84. package/lib/module/native-stack/utils/AnimatedHeaderHeightContext.js.map +1 -0
  85. package/lib/module/native-stack/utils/SafeAreaProviderCompat.js.map +1 -1
  86. package/lib/module/native-stack/utils/getStatusBarHeight.js +16 -0
  87. package/lib/module/native-stack/utils/getStatusBarHeight.js.map +1 -0
  88. package/lib/module/native-stack/utils/useAnimatedHeaderHeight.js +10 -0
  89. package/lib/module/native-stack/utils/useAnimatedHeaderHeight.js.map +1 -0
  90. package/lib/module/native-stack/utils/useBackPressSubscription.js +2 -2
  91. package/lib/module/native-stack/utils/useBackPressSubscription.js.map +1 -1
  92. package/lib/module/native-stack/views/HeaderConfig.js +2 -2
  93. package/lib/module/native-stack/views/HeaderConfig.js.map +1 -1
  94. package/lib/module/native-stack/views/NativeStackView.js +40 -22
  95. package/lib/module/native-stack/views/NativeStackView.js.map +1 -1
  96. package/lib/module/reanimated/ReanimatedHeaderHeightContext.js +5 -0
  97. package/lib/module/reanimated/ReanimatedHeaderHeightContext.js.map +1 -0
  98. package/lib/module/reanimated/ReanimatedNativeStackScreen.js +37 -6
  99. package/lib/module/reanimated/ReanimatedNativeStackScreen.js.map +1 -1
  100. package/lib/module/reanimated/ReanimatedScreenProvider.js +2 -2
  101. package/lib/module/reanimated/ReanimatedScreenProvider.js.map +1 -1
  102. package/lib/module/reanimated/index.js +1 -0
  103. package/lib/module/reanimated/index.js.map +1 -1
  104. package/lib/module/reanimated/useReanimatedHeaderHeight.js +10 -0
  105. package/lib/module/reanimated/useReanimatedHeaderHeight.js.map +1 -0
  106. package/lib/module/types.js.map +1 -1
  107. package/lib/typescript/fabric/ScreenNativeComponent.d.ts +4 -0
  108. package/lib/typescript/native-stack/index.d.ts +2 -0
  109. package/lib/typescript/native-stack/types.d.ts +8 -0
  110. package/lib/typescript/native-stack/utils/AnimatedHeaderHeightContext.d.ts +4 -0
  111. package/lib/typescript/native-stack/utils/getStatusBarHeight.d.ts +2 -0
  112. package/lib/typescript/native-stack/utils/useAnimatedHeaderHeight.d.ts +1 -0
  113. package/lib/typescript/reanimated/ReanimatedHeaderHeightContext.d.ts +4 -0
  114. package/lib/typescript/reanimated/index.d.ts +1 -0
  115. package/lib/typescript/reanimated/useReanimatedHeaderHeight.d.ts +3 -0
  116. package/lib/typescript/types.d.ts +11 -0
  117. package/native-stack/README.md +16 -1
  118. package/package.json +36 -38
  119. package/src/fabric/ScreenNativeComponent.ts +5 -0
  120. package/src/index.native.tsx +17 -19
  121. package/src/native-stack/index.tsx +3 -0
  122. package/src/native-stack/types.tsx +10 -1
  123. package/src/native-stack/utils/AnimatedHeaderHeightContext.tsx +8 -0
  124. package/src/native-stack/utils/SafeAreaProviderCompat.tsx +1 -1
  125. package/src/native-stack/utils/getStatusBarHeight.tsx +22 -0
  126. package/src/native-stack/utils/useAnimatedHeaderHeight.tsx +15 -0
  127. package/src/native-stack/views/HeaderConfig.tsx +1 -2
  128. package/src/native-stack/views/NativeStackView.tsx +78 -44
  129. package/src/reanimated/ReanimatedHeaderHeightContext.tsx +7 -0
  130. package/src/reanimated/ReanimatedNativeStackScreen.tsx +58 -11
  131. package/src/reanimated/index.tsx +1 -0
  132. package/src/reanimated/useReanimatedHeaderHeight.tsx +14 -0
  133. package/src/types.tsx +14 -0
  134. package/windows/RNScreens/RNScreens.vcxproj +6 -3
  135. package/windows/RNScreens/ScreenStack.cpp +16 -0
  136. package/windows/RNScreens/ScreenStack.h +1 -0
  137. /package/ios/{RNSScreenViewEvent.h → events/RNSScreenViewEvent.h} +0 -0
  138. /package/ios/{RNSScreenViewEvent.mm → events/RNSScreenViewEvent.mm} +0 -0
@@ -1 +1 @@
1
- {"version":3,"names":["React","_interopRequireWildcard","require","_reactNative","_AppContainer","_interopRequireDefault","_warnOnce","_reactNativeScreens","_native","_reactNativeSafeAreaContext","_HeaderConfig","_SafeAreaProviderCompat","_getDefaultHeaderHeight","_HeaderHeightContext","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_extends","assign","bind","target","i","arguments","length","source","apply","isAndroid","Platform","OS","Container","View","__DEV__","DebugContainer","props","stackPresentation","rest","createElement","MaybeNestedStack","_ref","_options$headerLargeT","options","route","children","colors","useTheme","headerShown","contentStyle","Screen","useContext","ScreenContext","isHeaderInModal","headerShownPreviousRef","useRef","useEffect","warnOnce","current","name","content","style","styles","container","backgroundColor","background","collapsable","dimensions","useSafeAreaFrame","topInset","useSafeAreaInsets","top","statusBarHeight","hasDynamicIsland","isLargeHeader","headerLargeTitle","headerHeight","getDefaultHeaderHeight","ScreenStack","enabled","isNativeStack","StyleSheet","absoluteFill","Provider","value","RouteView","_ref2","_options$headerLargeT2","descriptors","index","navigation","stateKey","render","renderScene","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","HeaderHeightContext","dark","onHeaderBackButtonClicked","dispatch","StackActions","pop","onWillAppear","emit","type","data","closing","onWillDisappear","onAppear","onDisappear","onDismissed","e","dismissCount","nativeEvent","onGestureCancel","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 // This view must *not* be flattened.\n // See https://github.com/software-mansion/react-native-screens/pull/1825\n // for detailed explanation.\n collapsable={false}\n >\n {children}\n </Container>\n );\n\n const dimensions = useSafeAreaFrame();\n const topInset = useSafeAreaInsets().top;\n let statusBarHeight = topInset;\n const hasDynamicIsland = Platform.OS === 'ios' && topInset === 59;\n const isLargeHeader = options.headerLargeTitle ?? false;\n if (hasDynamicIsland) {\n // On models with Dynamic Island the status bar height is smaller than the safe area top inset.\n statusBarHeight = 54;\n }\n const headerHeight = getDefaultHeaderHeight(\n dimensions,\n statusBarHeight,\n stackPresentation,\n isLargeHeader\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 let statusBarHeight = topInset;\n const hasDynamicIsland = Platform.OS === 'ios' && topInset === 59;\n const isLargeHeader = options.headerLargeTitle ?? false;\n\n if (hasDynamicIsland) {\n // On models with Dynamic Island the status bar height is smaller than the safe area top inset.\n statusBarHeight = 54;\n }\n const headerHeight = getDefaultHeaderHeight(\n dimensions,\n statusBarHeight,\n stackPresentation,\n isLargeHeader\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 onGestureCancel={() => {\n navigation.emit({\n type: 'gestureCancel',\n target: route.key,\n });\n }}\n >\n <HeaderHeightContext.Provider\n value={\n isHeaderInPush !== false ? headerHeight : parentHeaderHeight ?? 0\n }\n >\n <MaybeNestedStack\n options={options}\n route={route}\n stackPresentation={stackPresentation}\n >\n {renderScene()}\n </MaybeNestedStack>\n {/* HeaderConfig must not be first child of a Screen. \n See https://github.com/software-mansion/react-native-screens/pull/1825\n for detailed explanation */}\n <HeaderConfig {...options} route={route} headerShown={isHeaderInPush} />\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,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAGA,IAAAE,aAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,SAAA,GAA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ppContainer","_interopRequireDefault","_warnOnce","_reactNativeScreens","_native","_reactNativeSafeAreaContext","_HeaderConfig","_SafeAreaProviderCompat","_getDefaultHeaderHeight","_getStatusBarHeight","_HeaderHeightContext","_AnimatedHeaderHeightContext","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_extends","assign","bind","target","i","arguments","length","source","apply","isAndroid","Platform","OS","Container","View","__DEV__","DebugContainer","props","stackPresentation","rest","createElement","MaybeNestedStack","_ref","_options$statusBarTra","_options$headerLargeT","options","route","children","colors","useTheme","headerShown","contentStyle","Screen","useContext","ScreenContext","isHeaderInModal","headerShownPreviousRef","useRef","useEffect","warnOnce","current","name","content","style","styles","container","backgroundColor","background","collapsable","dimensions","useSafeAreaFrame","topInset","useSafeAreaInsets","top","isStatusBarTranslucent","statusBarTranslucent","statusBarHeight","getStatusBarHeight","hasLargeHeader","headerLargeTitle","headerHeight","getDefaultHeaderHeight","ScreenStack","enabled","isNativeStack","StyleSheet","absoluteFill","Provider","value","RouteView","_ref2","_options$statusBarTra2","_options$headerLargeT2","descriptors","index","navigation","stateKey","render","renderScene","gestureEnabled","hideKeyboardOnSwipe","homeIndicatorHidden","sheetAllowedDetents","sheetLargestUndimmedDetent","sheetGrabberVisible","sheetCornerRadius","sheetExpandsWhenScrolledToEdge","nativeBackButtonDismissalEnabled","navigationBarColor","navigationBarHidden","replaceAnimation","screenOrientation","statusBarAnimation","statusBarColor","statusBarHidden","statusBarStyle","swipeDirection","transitionDuration","freezeOnBlur","customAnimationOnSwipe","fullScreenSwipeEnabled","gestureResponseDistance","stackAnimation","undefined","defaultHeaderHeight","parentHeaderHeight","HeaderHeightContext","isHeaderInPush","staticHeaderHeight","cachedAnimatedHeaderHeight","animatedHeaderHeight","Animated","Value","useNativeDriver","dark","onHeaderBackButtonClicked","dispatch","StackActions","pop","onWillAppear","emit","type","data","closing","onWillDisappear","onAppear","onDisappear","onHeaderHeightChange","e","nativeEvent","setValue","onDismissed","dismissCount","onGestureCancel","NativeStackViewInner","_ref3","state","routes","map","NativeStackView","create","flex"],"sources":["NativeStackView.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Animated, 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';\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 getStatusBarHeight from '../utils/getStatusBarHeight';\nimport HeaderHeightContext from '../utils/HeaderHeightContext';\nimport AnimatedHeaderHeightContext from '../utils/AnimatedHeaderHeightContext';\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 // This view must *not* be flattened.\n // See https://github.com/software-mansion/react-native-screens/pull/1825\n // for detailed explanation.\n collapsable={false}>\n {children}\n </Container>\n );\n\n const dimensions = useSafeAreaFrame();\n const topInset = useSafeAreaInsets().top;\n const isStatusBarTranslucent = options.statusBarTranslucent ?? false;\n const statusBarHeight = getStatusBarHeight(\n topInset,\n dimensions,\n isStatusBarTranslucent\n );\n\n const hasLargeHeader = options.headerLargeTitle ?? false;\n\n const headerHeight = getDefaultHeaderHeight(\n dimensions,\n statusBarHeight,\n stackPresentation,\n hasLargeHeader\n );\n\n if (isHeaderInModal) {\n return (\n <ScreenStack style={styles.container}>\n <Screen\n enabled\n isNativeStack\n hasLargeHeader={hasLargeHeader}\n 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 dimensions = useSafeAreaFrame();\n const topInset = useSafeAreaInsets().top;\n const isStatusBarTranslucent = options.statusBarTranslucent ?? false;\n const statusBarHeight = getStatusBarHeight(\n topInset,\n dimensions,\n isStatusBarTranslucent\n );\n\n const hasLargeHeader = options.headerLargeTitle ?? false;\n\n const defaultHeaderHeight = getDefaultHeaderHeight(\n dimensions,\n statusBarHeight,\n stackPresentation,\n hasLargeHeader\n );\n\n const parentHeaderHeight = React.useContext(HeaderHeightContext);\n const isHeaderInPush = isAndroid\n ? headerShown\n : stackPresentation === 'push' && headerShown !== false;\n\n const staticHeaderHeight =\n isHeaderInPush !== false ? defaultHeaderHeight : parentHeaderHeight ?? 0;\n\n // We need to ensure the first retrieved header height will be cached and set in animatedHeaderHeight.\n // We're caching the header height here, as on iOS native side events are not always coming to the JS on first notify.\n // TODO: Check why first event is not being received once it is cached on the native side.\n const cachedAnimatedHeaderHeight = React.useRef(defaultHeaderHeight);\n const animatedHeaderHeight = React.useRef(\n new Animated.Value(staticHeaderHeight, {\n useNativeDriver: true,\n })\n ).current;\n\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 hasLargeHeader={hasLargeHeader}\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 onHeaderHeightChange={e => {\n const headerHeight = e.nativeEvent.headerHeight;\n\n if (cachedAnimatedHeaderHeight.current !== headerHeight) {\n // Currently, we're setting value by Animated#setValue, because we want to cache animated value.\n // Also, in React Native 0.72 there was a bug on Fabric causing a large delay between the screen transition,\n // which should not occur.\n // TODO: Check if it's possible to replace animated#setValue to Animated#event.\n animatedHeaderHeight.setValue(headerHeight);\n cachedAnimatedHeaderHeight.current = headerHeight;\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 onGestureCancel={() => {\n navigation.emit({\n type: 'gestureCancel',\n target: route.key,\n });\n }}>\n <AnimatedHeaderHeightContext.Provider value={animatedHeaderHeight}>\n <HeaderHeightContext.Provider value={staticHeaderHeight}>\n <MaybeNestedStack\n options={options}\n route={route}\n stackPresentation={stackPresentation}>\n {renderScene()}\n </MaybeNestedStack>\n {/* HeaderConfig must not be first child of a Screen.\n See https://github.com/software-mansion/react-native-screens/pull/1825\n for detailed explanation */}\n <HeaderConfig\n {...options}\n route={route}\n headerShown={isHeaderInPush}\n />\n </HeaderHeightContext.Provider>\n </AnimatedHeaderHeightContext.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,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAGA,IAAAE,aAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,SAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,mBAAA,GAAAL,OAAA;AAKA,IAAAM,OAAA,GAAAN,OAAA;AASA,IAAAO,2BAAA,GAAAP,OAAA;AASA,IAAAQ,aAAA,GAAAL,sBAAA,CAAAH,OAAA;AACA,IAAAS,uBAAA,GAAAN,sBAAA,CAAAH,OAAA;AACA,IAAAU,uBAAA,GAAAP,sBAAA,CAAAH,OAAA;AACA,IAAAW,mBAAA,GAAAR,sBAAA,CAAAH,OAAA;AACA,IAAAY,oBAAA,GAAAT,sBAAA,CAAAH,OAAA;AACA,IAAAa,4BAAA,GAAAV,sBAAA,CAAAH,OAAA;AAA+E,SAAAG,uBAAAW,GAAA,WAAAA,GAAA,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EAAEA,KAAM;IACbC,UAAU,EAAEA,UAAW;IACvBC,QAAQ,EAAEjF;EAAI,CACf,CACF,CACU,CAAC;AAElB;AAEe,SAASgJ,eAAeA,CAAC1H,KAAY,EAAE;EACpD,oBACEtD,KAAA,CAAAyD,aAAA,CAAC9C,uBAAA,CAAAO,OAAsB,qBACrBlB,KAAA,CAAAyD,aAAA,CAACkH,oBAAoB,EAAKrH,KAAQ,CACZ,CAAC;AAE7B;AAEA,MAAM2B,MAAM,GAAGqB,uBAAU,CAAC2E,MAAM,CAAC;EAC/B/F,SAAS,EAAE;IACTgG,IAAI,EAAE;EACR;AACF,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var React = _interopRequireWildcard(require("react"));
8
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
9
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
10
+ // @ts-ignore file to be used only if `react-native-reanimated` available in the project
11
+ var _default = /*#__PURE__*/React.createContext(undefined);
12
+ exports.default = _default;
13
+ //# sourceMappingURL=ReanimatedHeaderHeightContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","_interopRequireWildcard","require","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_default","createContext","undefined","exports"],"sources":["ReanimatedHeaderHeightContext.tsx"],"sourcesContent":["import * as React from 'react';\n// @ts-ignore file to be used only if `react-native-reanimated` available in the project\nimport Animated from 'react-native-reanimated';\n\nexport default React.createContext<Animated.SharedValue<number> | undefined>(\n undefined\n);\n"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA+B,SAAAC,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAH,wBAAAO,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAV,GAAA,EAAAW,GAAA,cAAAI,IAAA,KAAAA,IAAA,CAAAV,GAAA,IAAAU,IAAA,CAAAC,GAAA,KAAAR,MAAA,CAAAC,cAAA,CAAAH,MAAA,EAAAK,GAAA,EAAAI,IAAA,YAAAT,MAAA,CAAAK,GAAA,IAAAX,GAAA,CAAAW,GAAA,SAAAL,MAAA,CAAAJ,OAAA,GAAAF,GAAA,MAAAG,KAAA,IAAAA,KAAA,CAAAa,GAAA,CAAAhB,GAAA,EAAAM,MAAA,YAAAA,MAAA;AAC/B;AAAA,IAAAW,QAAA,gBAGezB,KAAK,CAAC0B,aAAa,CAChCC,SACF,CAAC;AAAAC,OAAA,CAAAlB,OAAA,GAAAe,QAAA"}
@@ -9,6 +9,10 @@ var _reactNative = require("react-native");
9
9
  var _reactNativeScreens = require("react-native-screens");
10
10
  var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
11
11
  var _ReanimatedTransitionProgressContext = _interopRequireDefault(require("./ReanimatedTransitionProgressContext"));
12
+ var _reactNativeSafeAreaContext = require("react-native-safe-area-context");
13
+ var _getDefaultHeaderHeight = _interopRequireDefault(require("../native-stack/utils/getDefaultHeaderHeight"));
14
+ var _getStatusBarHeight = _interopRequireDefault(require("../native-stack/utils/getStatusBarHeight"));
15
+ var _ReanimatedHeaderHeightContext = _interopRequireDefault(require("./ReanimatedHeaderHeightContext"));
12
16
  var _global; // @ts-ignore file to be used only if `react-native-reanimated` available in the project
13
17
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
14
18
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -21,10 +25,25 @@ const AnimatedScreen = _reactNativeReanimated.default.createAnimatedComponent(_r
21
25
  // @ts-expect-error nativeFabricUIManager is not yet included in the RN types
22
26
  const ENABLE_FABRIC = !!((_global = global) !== null && _global !== void 0 && _global._IS_FABRIC);
23
27
  const ReanimatedNativeStackScreen = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
28
+ var _rest$statusBarTransl;
24
29
  const {
25
30
  children,
26
31
  ...rest
27
32
  } = props;
33
+ const {
34
+ stackPresentation = 'push',
35
+ hasLargeHeader
36
+ } = rest;
37
+ const dimensions = (0, _reactNativeSafeAreaContext.useSafeAreaFrame)();
38
+ const topInset = (0, _reactNativeSafeAreaContext.useSafeAreaInsets)().top;
39
+ const isStatusBarTranslucent = (_rest$statusBarTransl = rest.statusBarTranslucent) !== null && _rest$statusBarTransl !== void 0 ? _rest$statusBarTransl : false;
40
+ const statusBarHeight = (0, _getStatusBarHeight.default)(topInset, dimensions, isStatusBarTranslucent);
41
+
42
+ // Default header height, normally used in `useHeaderHeight` hook.
43
+ // Here, it is used for returning a default value for shared value.
44
+ const defaultHeaderHeight = (0, _getDefaultHeaderHeight.default)(dimensions, statusBarHeight, stackPresentation, hasLargeHeader);
45
+ const cachedHeaderHeight = _react.default.useRef(defaultHeaderHeight);
46
+ const headerHeight = (0, _reactNativeReanimated.useSharedValue)(defaultHeaderHeight);
28
47
  const progress = (0, _reactNativeReanimated.useSharedValue)(0);
29
48
  const closing = (0, _reactNativeReanimated.useSharedValue)(0);
30
49
  const goingForward = (0, _reactNativeReanimated.useSharedValue)(0);
@@ -43,14 +62,26 @@ const ReanimatedNativeStackScreen = /*#__PURE__*/_react.default.forwardRef((prop
43
62
  // @ts-ignore wrong type
44
63
  _reactNative.Platform.OS === 'android' ? 'onTransitionProgress' :
45
64
  // for some reason there is a difference in required event name between architectures
46
- ENABLE_FABRIC ? 'onTransitionProgress' : 'topTransitionProgress'])
47
- }, rest), /*#__PURE__*/_react.default.createElement(_ReanimatedTransitionProgressContext.default.Provider, {
65
+ ENABLE_FABRIC ? 'onTransitionProgress' : 'topTransitionProgress']),
66
+ onHeaderHeightChangeReanimated: (0, _reactNativeReanimated.useEvent)(event => {
67
+ 'worklet';
68
+
69
+ if (event.headerHeight !== cachedHeaderHeight.current) {
70
+ headerHeight.value = event.headerHeight;
71
+ cachedHeaderHeight.current = event.headerHeight;
72
+ }
73
+ }, [
74
+ // @ts-ignore wrong type
75
+ _reactNative.Platform.OS === 'android' ? 'onHeaderHeightChange' : ENABLE_FABRIC ? 'onHeaderHeightChange' : 'topHeaderHeightChange'])
76
+ }, rest), /*#__PURE__*/_react.default.createElement(_ReanimatedHeaderHeightContext.default.Provider, {
77
+ value: headerHeight
78
+ }, /*#__PURE__*/_react.default.createElement(_ReanimatedTransitionProgressContext.default.Provider, {
48
79
  value: {
49
- progress: progress,
50
- closing: closing,
51
- goingForward: goingForward
80
+ progress,
81
+ closing,
82
+ goingForward
52
83
  }
53
- }, children));
84
+ }, children)));
54
85
  });
55
86
  ReanimatedNativeStackScreen.displayName = 'ReanimatedNativeStackScreen';
56
87
  var _default = ReanimatedNativeStackScreen;
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_reactNativeScreens","_reactNativeReanimated","_interopRequireWildcard","_ReanimatedTransitionProgressContext","_global","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_extends","assign","bind","target","i","arguments","length","source","apply","AnimatedScreen","Animated","createAnimatedComponent","InnerScreen","ENABLE_FABRIC","global","_IS_FABRIC","ReanimatedNativeStackScreen","React","forwardRef","props","ref","children","rest","progress","useSharedValue","closing","goingForward","createElement","onTransitionProgressReanimated","useEvent","event","value","Platform","OS","Provider","displayName","_default","exports"],"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,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,mBAAA,GAAAF,OAAA;AAOA,IAAAG,sBAAA,GAAAC,uBAAA,CAAAJ,OAAA;AACA,IAAAK,oCAAA,GAAAN,sBAAA,CAAAC,OAAA;AAAwF,IAAAM,OAAA,EAFxF;AAAA,SAAAC,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAJ,wBAAAQ,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAA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E,GAAGC;EAAK,CAAC,GAAGH,KAAK;EAEnC,MAAMI,QAAQ,GAAG,IAAAC,qCAAc,EAAC,CAAC,CAAC;EAClC,MAAMC,OAAO,GAAG,IAAAD,qCAAc,EAAC,CAAC,CAAC;EACjC,MAAME,YAAY,GAAG,IAAAF,qCAAc,EAAC,CAAC,CAAC;EAEtC,oBACEvD,MAAA,CAAAgB,OAAA,CAAA0C,aAAA,CAAClB;EACC;EAAA,EAAAT,QAAA;IACAoB,GAAG,EAAEA,GAAI;IACTQ,8BAA8B,EAAE,IAAAC,+BAAQ,EACrCC,KAAkC,IAAK;MACtC,SAAS;;MACTP,QAAQ,CAACQ,KAAK,GAAGD,KAAK,CAACP,QAAQ;MAC/BE,OAAO,CAACM,KAAK,GAAGD,KAAK,CAACL,OAAO;MAC7BC,YAAY,CAACK,KAAK,GAAGD,KAAK,CAACJ,YAAY;IACzC,CAAC,EACD;IACE;IACA;IACAM,qBAAQ,CAACC,EAAE,KAAK,SAAS,GACrB,sBAAsB;IACtB;IACFpB,aAAa,GACX,sBAAsB,GACtB,uBAAuB,CAE/B;EAAE,GACES,IAAI,gBAERrD,MAAA,CAAAgB,OAAA,CAAA0C,aAAA,CAACnD,oCAAA,CAAAS,OAAmC,CAACiD,QAAQ;IAC3CH,KAAK,EAAE;MACLR,QAAQ,EAAEA,QAAQ;MAClBE,OAAO,EAAEA,OAAO;MAChBC,YAAY,EAAEA;IAChB;EAAE,GAEDL,QAC2C,CAChC,CAAC;AAErB,CAAC,CAAC;AAEFL,2BAA2B,CAACmB,WAAW,GAAG,6BAA6B;AAAC,IAAAC,QAAA,GAEzDpB,2BAA2B;AAAAqB,OAAA,CAAApD,OAAA,GAAAmD,QAAA"}
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_reactNativeScreens","_reactNativeReanimated","_interopRequireWildcard","_ReanimatedTransitionProgressContext","_reactNativeSafeAreaContext","_getDefaultHeaderHeight","_getStatusBarHeight","_ReanimatedHeaderHeightContext","_global","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_extends","assign","bind","target","i","arguments","length","source","apply","AnimatedScreen","Animated","createAnimatedComponent","InnerScreen","ENABLE_FABRIC","global","_IS_FABRIC","ReanimatedNativeStackScreen","React","forwardRef","props","ref","_rest$statusBarTransl","children","rest","stackPresentation","hasLargeHeader","dimensions","useSafeAreaFrame","topInset","useSafeAreaInsets","top","isStatusBarTranslucent","statusBarTranslucent","statusBarHeight","getStatusBarHeight","defaultHeaderHeight","getDefaultHeaderHeight","cachedHeaderHeight","useRef","headerHeight","useSharedValue","progress","closing","goingForward","createElement","onTransitionProgressReanimated","useEvent","event","value","Platform","OS","onHeaderHeightChangeReanimated","current","Provider","displayName","_default","exports"],"sources":["ReanimatedNativeStackScreen.tsx"],"sourcesContent":["import React from 'react';\nimport { Platform } from 'react-native';\nimport {\n HeaderHeightChangeEventType,\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';\nimport {\n useSafeAreaFrame,\n useSafeAreaInsets,\n} from 'react-native-safe-area-context';\nimport getDefaultHeaderHeight from '../native-stack/utils/getDefaultHeaderHeight';\nimport getStatusBarHeight from '../native-stack/utils/getStatusBarHeight';\nimport ReanimatedHeaderHeightContext from './ReanimatedHeaderHeightContext';\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 const { stackPresentation = 'push', hasLargeHeader } = rest;\n\n const dimensions = useSafeAreaFrame();\n const topInset = useSafeAreaInsets().top;\n const isStatusBarTranslucent = rest.statusBarTranslucent ?? false;\n const statusBarHeight = getStatusBarHeight(\n topInset,\n dimensions,\n isStatusBarTranslucent\n );\n\n // Default header height, normally used in `useHeaderHeight` hook.\n // Here, it is used for returning a default value for shared value.\n const defaultHeaderHeight = getDefaultHeaderHeight(\n dimensions,\n statusBarHeight,\n stackPresentation,\n hasLargeHeader\n );\n\n const cachedHeaderHeight = React.useRef(defaultHeaderHeight);\n const headerHeight = useSharedValue(defaultHeaderHeight);\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 onHeaderHeightChangeReanimated={useEvent(\n (event: HeaderHeightChangeEventType) => {\n 'worklet';\n if (event.headerHeight !== cachedHeaderHeight.current) {\n headerHeight.value = event.headerHeight;\n cachedHeaderHeight.current = event.headerHeight;\n }\n },\n [\n // @ts-ignore wrong type\n Platform.OS === 'android'\n ? 'onHeaderHeightChange'\n : ENABLE_FABRIC\n ? 'onHeaderHeightChange'\n : 'topHeaderHeightChange',\n ]\n )}\n {...rest}>\n <ReanimatedHeaderHeightContext.Provider value={headerHeight}>\n <ReanimatedTransitionProgressContext.Provider\n value={{\n progress,\n closing,\n goingForward,\n }}>\n {children}\n </ReanimatedTransitionProgressContext.Provider>\n </ReanimatedHeaderHeightContext.Provider>\n </AnimatedScreen>\n );\n});\n\nReanimatedNativeStackScreen.displayName = 'ReanimatedNativeStackScreen';\n\nexport default ReanimatedNativeStackScreen;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,mBAAA,GAAAF,OAAA;AAQA,IAAAG,sBAAA,GAAAC,uBAAA,CAAAJ,OAAA;AACA,IAAAK,oCAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,2BAAA,GAAAN,OAAA;AAIA,IAAAO,uBAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,mBAAA,GAAAT,sBAAA,CAAAC,OAAA;AACA,IAAAS,8BAAA,GAAAV,sBAAA,CAAAC,OAAA;AAA4E,IAAAU,OAAA,EAT5E;AAAA,SAAAC,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAR,wBAAAY,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAA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,GAAGD,KAAK,CAACN,QAAQ;MAC/BC,OAAO,CAACM,KAAK,GAAGD,KAAK,CAACL,OAAO;MAC7BC,YAAY,CAACK,KAAK,GAAGD,KAAK,CAACJ,YAAY;IACzC,CAAC,EACD;IACE;IACA;IACAM,qBAAQ,CAACC,EAAE,KAAK,SAAS,GACrB,sBAAsB;IACtB;IACFrC,aAAa,GACX,sBAAsB,GACtB,uBAAuB,CAE/B,CAAE;IACFsC,8BAA8B,EAAE,IAAAL,+BAAQ,EACrCC,KAAkC,IAAK;MACtC,SAAS;;MACT,IAAIA,KAAK,CAACR,YAAY,KAAKF,kBAAkB,CAACe,OAAO,EAAE;QACrDb,YAAY,CAACS,KAAK,GAAGD,KAAK,CAACR,YAAY;QACvCF,kBAAkB,CAACe,OAAO,GAAGL,KAAK,CAACR,YAAY;MACjD;IACF,CAAC,EACD;IACE;IACAU,qBAAQ,CAACC,EAAE,KAAK,SAAS,GACrB,sBAAsB,GACtBrC,aAAa,GACb,sBAAsB,GACtB,uBAAuB,CAE/B;EAAE,GACEU,IAAI,gBACR1D,MAAA,CAAAoB,OAAA,CAAA2D,aAAA,CAACpE,8BAAA,CAAAS,OAA6B,CAACoE,QAAQ;IAACL,KAAK,EAAET;EAAa,gBAC1D1E,MAAA,CAAAoB,OAAA,CAAA2D,aAAA,CAACxE,oCAAA,CAAAa,OAAmC,CAACoE,QAAQ;IAC3CL,KAAK,EAAE;MACLP,QAAQ;MACRC,OAAO;MACPC;IACF;EAAE,GACDrB,QAC2C,CACR,CAC1B,CAAC;AAErB,CAAC,CAAC;AAEFN,2BAA2B,CAACsC,WAAW,GAAG,6BAA6B;AAAC,IAAAC,QAAA,GAEzDvC,2BAA2B;AAAAwC,OAAA,CAAAvE,OAAA,GAAAsE,QAAA"}
@@ -20,12 +20,12 @@ class ReanimatedScreenWrapper extends _react.default.Component {
20
20
  _defineProperty(this, "setRef", ref => {
21
21
  var _this$props$onCompone, _this$props;
22
22
  this.ref = ref;
23
- (_this$props$onCompone = (_this$props = this.props).onComponentRef) === null || _this$props$onCompone === void 0 ? void 0 : _this$props$onCompone.call(_this$props, ref);
23
+ (_this$props$onCompone = (_this$props = this.props).onComponentRef) === null || _this$props$onCompone === void 0 || _this$props$onCompone.call(_this$props, ref);
24
24
  });
25
25
  }
26
26
  setNativeProps(props) {
27
27
  var _this$ref;
28
- (_this$ref = this.ref) === null || _this$ref === void 0 ? void 0 : _this$ref.setNativeProps(props);
28
+ (_this$ref = this.ref) === null || _this$ref === void 0 || _this$ref.setNativeProps(props);
29
29
  }
30
30
  render() {
31
31
  const ReanimatedScreen = this.props.isNativeStack ? _ReanimatedNativeStackScreen.default : _ReanimatedScreen.default;
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_reactNativeScreens","_ReanimatedNativeStackScreen","_ReanimatedScreen","obj","__esModule","default","_extends","Object","assign","bind","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","_defineProperty","value","_toPropertyKey","defineProperty","enumerable","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","TypeError","Number","ReanimatedScreenWrapper","React","Component","constructor","ref","_this$props$onCompone","_this$props","props","onComponentRef","setNativeProps","_this$ref","render","ReanimatedScreen","isNativeStack","ReanimatedNativeStackScreen","AnimatedScreen","createElement","setRef","ReanimatedScreenProvider","ScreenContext","Provider","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,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,mBAAA,GAAAD,OAAA;AACA,IAAAE,4BAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,iBAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAAgD,SAAAD,uBAAAK,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,SAAA,IAAAA,QAAA,GAAAC,MAAA,CAAAC,MAAA,GAAAD,MAAA,CAAAC,MAAA,CAAAC,IAAA,eAAAC,MAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAF,CAAA,UAAAG,MAAA,GAAAF,SAAA,CAAAD,CAAA,YAAAI,GAAA,IAAAD,MAAA,QAAAP,MAAA,CAAAS,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAJ,MAAA,EAAAC,GAAA,KAAAL,MAAA,CAAAK,GAAA,IAAAD,MAAA,CAAAC,GAAA,gBAAAL,MAAA,YAAAJ,QAAA,CAAAa,KAAA,OAAAP,SAAA;AAAA,SAAAQ,gBAAAjB,GAAA,EAAAY,GAAA,EAAAM,KAAA,IAAAN,GAAA,GAAAO,cAAA,CAAAP,GAAA,OAAAA,GAAA,IAAAZ,GAAA,IAAAI,MAAA,CAAAgB,cAAA,CAAApB,GAAA,EAAAY,GAAA,IAAAM,KAAA,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A,CAAAQ,OAAA,CAAAkD,aAAA,CAACJ,gBAAgB,EAAA7C,QAAA,KACX,IAAI,CAACwC,KAAK;MACd;MACAH,GAAG,EAAE,IAAI,CAACa;IAAO,EAClB,CAAC;EAEN;AACF;AAEe,SAASC,wBAAwBA,CAC9CX,KAAiC,EACjC;EACA;IAAA;IACE;IACAjD,MAAA,CAAAQ,OAAA,CAAAkD,aAAA,CAACvD,mBAAA,CAAA0D,aAAa,CAACC,QAAQ;MAACtC,KAAK,EAAEkB;IAA+B,GAC3DO,KAAK,CAACc,QACe;EAAC;AAE7B"}
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNativeScreens","_ReanimatedNativeStackScreen","_ReanimatedScreen","obj","__esModule","default","_extends","Object","assign","bind","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","_defineProperty","value","_toPropertyKey","defineProperty","enumerable","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","TypeError","Number","ReanimatedScreenWrapper","React","Component","constructor","ref","_this$props$onCompone","_this$props","props","onComponentRef","setNativeProps","_this$ref","render","ReanimatedScreen","isNativeStack","ReanimatedNativeStackScreen","AnimatedScreen","createElement","setRef","ReanimatedScreenProvider","ScreenContext","Provider","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,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,mBAAA,GAAAD,OAAA;AACA,IAAAE,4BAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,iBAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAAgD,SAAAD,uBAAAK,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,SAAA,IAAAA,QAAA,GAAAC,MAAA,CAAAC,MAAA,GAAAD,MAAA,CAAAC,MAAA,CAAAC,IAAA,eAAAC,MAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAF,CAAA,UAAAG,MAAA,GAAAF,SAAA,CAAAD,CAAA,YAAAI,GAAA,IAAAD,MAAA,QAAAP,MAAA,CAAAS,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAJ,MAAA,EAAAC,GAAA,KAAAL,MAAA,CAAAK,GAAA,IAAAD,MAAA,CAAAC,GAAA,gBAAAL,MAAA,YAAAJ,QAAA,CAAAa,KAAA,OAAAP,SAAA;AAAA,SAAAQ,gBAAAjB,GAAA,EAAAY,GAAA,EAAAM,KAAA,IAAAN,GAAA,GAAAO,cAAA,CAAAP,GAAA,OAAAA,GAAA,IAAAZ,GAAA,IAAAI,MAAA,CAAAgB,cAAA,CAAApB,GAAA,EAAAY,GAAA,IAAAM,KAAA,EAAAA,KAAA,EAAAG,UAAA,QAAAC,YAAA,QAAAC,QAAA,oBAAAvB,GAAA,CAAA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wC,KAAK;MACd;MACAH,GAAG,EAAE,IAAI,CAACa;IAAO,EAClB,CAAC;EAEN;AACF;AAEe,SAASC,wBAAwBA,CAC9CX,KAAiC,EACjC;EACA;IAAA;IACE;IACAjD,MAAA,CAAAQ,OAAA,CAAAkD,aAAA,CAACvD,mBAAA,CAAA0D,aAAa,CAACC,QAAQ;MAACtC,KAAK,EAAEkB;IAA+B,GAC3DO,KAAK,CAACc,QACe;EAAC;AAE7B"}
@@ -9,6 +9,12 @@ Object.defineProperty(exports, "ReanimatedScreenProvider", {
9
9
  return _ReanimatedScreenProvider.default;
10
10
  }
11
11
  });
12
+ Object.defineProperty(exports, "useReanimatedHeaderHeight", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _useReanimatedHeaderHeight.default;
16
+ }
17
+ });
12
18
  Object.defineProperty(exports, "useReanimatedTransitionProgress", {
13
19
  enumerable: true,
14
20
  get: function () {
@@ -17,5 +23,6 @@ Object.defineProperty(exports, "useReanimatedTransitionProgress", {
17
23
  });
18
24
  var _ReanimatedScreenProvider = _interopRequireDefault(require("./ReanimatedScreenProvider"));
19
25
  var _useReanimatedTransitionProgress = _interopRequireDefault(require("./useReanimatedTransitionProgress"));
26
+ var _useReanimatedHeaderHeight = _interopRequireDefault(require("./useReanimatedHeaderHeight"));
20
27
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
28
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_ReanimatedScreenProvider","_interopRequireDefault","require","_useReanimatedTransitionProgress","obj","__esModule","default"],"sources":["index.tsx"],"sourcesContent":["export { default as ReanimatedScreenProvider } from './ReanimatedScreenProvider';\nexport { default as useReanimatedTransitionProgress } from './useReanimatedTransitionProgress';\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,IAAAA,yBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,gCAAA,GAAAF,sBAAA,CAAAC,OAAA;AAA+F,SAAAD,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA"}
1
+ {"version":3,"names":["_ReanimatedScreenProvider","_interopRequireDefault","require","_useReanimatedTransitionProgress","_useReanimatedHeaderHeight","obj","__esModule","default"],"sources":["index.tsx"],"sourcesContent":["export { default as ReanimatedScreenProvider } from './ReanimatedScreenProvider';\nexport { default as useReanimatedTransitionProgress } from './useReanimatedTransitionProgress';\nexport { default as useReanimatedHeaderHeight } from './useReanimatedHeaderHeight';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,yBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,gCAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,0BAAA,GAAAH,sBAAA,CAAAC,OAAA;AAAmF,SAAAD,uBAAAI,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = useReanimatedHeaderHeight;
7
+ var React = _interopRequireWildcard(require("react"));
8
+ var _ReanimatedHeaderHeightContext = _interopRequireDefault(require("./ReanimatedHeaderHeightContext"));
9
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
11
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
12
+ function useReanimatedHeaderHeight() {
13
+ const height = React.useContext(_ReanimatedHeaderHeightContext.default);
14
+ if (height === undefined) {
15
+ throw new Error("Couldn't find the header height using Reanimated. Are you inside a screen in a navigator with a header and your NavigationContainer is wrapped in ReanimatedScreenProvider?");
16
+ }
17
+ return height;
18
+ }
19
+ //# sourceMappingURL=useReanimatedHeaderHeight.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","_interopRequireWildcard","require","_ReanimatedHeaderHeightContext","_interopRequireDefault","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","useReanimatedHeaderHeight","height","useContext","ReanimatedHeaderHeightContext","undefined","Error"],"sources":["useReanimatedHeaderHeight.tsx"],"sourcesContent":["import * as React from 'react';\nimport ReanimatedHeaderHeightContext from './ReanimatedHeaderHeightContext';\n\nexport default function useReanimatedHeaderHeight() {\n const height = React.useContext(ReanimatedHeaderHeightContext);\n\n if (height === undefined) {\n throw new Error(\n \"Couldn't find the header height using Reanimated. Are you inside a screen in a navigator with a header and your NavigationContainer is wrapped in ReanimatedScreenProvider?\"\n );\n }\n\n return height;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,8BAAA,GAAAC,sBAAA,CAAAF,OAAA;AAA4E,SAAAE,uBAAAC,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAA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AACC,sCAA6B,CAAC;EAE9D,IAAIF,MAAM,KAAKG,SAAS,EAAE;IACxB,MAAM,IAAIC,KAAK,CACb,6KACF,CAAC;EACH;EAEA,OAAOJ,MAAM;AACf"}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["types.tsx"],"sourcesContent":["import {\n Animated,\n NativeSyntheticEvent,\n ViewProps,\n View,\n TargetedEvent,\n TextInputFocusEventData,\n ColorValue,\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';\nexport type SearchBarPlacement = 'automatic' | 'inline' | 'stacked';\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?: ColorValue;\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 * A callback that gets called after swipe back is canceled.\n */\n onGestureCancel?: (e: NativeSyntheticEvent<null>) => 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 * @platform ios\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 it 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?: ColorValue;\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?: ColorValue;\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?: ColorValue;\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?: ColorValue;\n /**\n * Customize the color to be used for the large title. By default uses the titleColor property.\n * @platform ios\n */\n largeTitleColor?: ColorValue;\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?: ColorValue;\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?: ColorValue;\n /**\n * The color for the cursor caret and cancel button text.\n *\n * @platform ios\n */\n tintColor?: ColorValue;\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 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 * Position of the search bar\n *\n * Supported values:\n *\n * * `automatic` - the search bar is placed according to current layout\n * * `inline` - the search bar is placed on the trailing edge of navigation bar\n * * `stacked` - the search bar is placed below the other content in navigation bar\n *\n * Defaults to `stacked`\n *\n * @platform iOS (>= 16.0)\n */\n placement?: SearchBarPlacement;\n /**\n * The search field text color\n */\n textColor?: ColorValue;\n /**\n * The search hint text color\n *\n * @plaform android\n */\n hintTextColor?: ColorValue;\n /**\n * The search and close icon color shown in the header\n *\n * @plaform android\n */\n headerIconColor?: ColorValue;\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 ColorValue,\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 HeaderHeightChangeEventType = {\n headerHeight: number;\n};\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';\nexport type SearchBarPlacement = 'automatic' | 'inline' | 'stacked';\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 * Internal boolean used to detect if current header has large title on iOS.\n */\n hasLargeHeader?: 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?: ColorValue;\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 * A callback that gets called when the header height has changed.\n */\n onHeaderHeightChange?: (\n e: NativeSyntheticEvent<HeaderHeightChangeEventType>\n ) => void;\n /**\n * A callback that gets called after swipe back is canceled.\n */\n onGestureCancel?: (e: NativeSyntheticEvent<null>) => 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 * @platform ios\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 it 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?: ColorValue;\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?: ColorValue;\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?: ColorValue;\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?: ColorValue;\n /**\n * Customize the color to be used for the large title. By default uses the titleColor property.\n * @platform ios\n */\n largeTitleColor?: ColorValue;\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?: ColorValue;\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?: ColorValue;\n /**\n * The color for the cursor caret and cancel button text.\n *\n * @platform ios\n */\n tintColor?: ColorValue;\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 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 * Position of the search bar\n *\n * Supported values:\n *\n * * `automatic` - the search bar is placed according to current layout\n * * `inline` - the search bar is placed on the trailing edge of navigation bar\n * * `stacked` - the search bar is placed below the other content in navigation bar\n *\n * Defaults to `stacked`\n *\n * @platform iOS (>= 16.0)\n */\n placement?: SearchBarPlacement;\n /**\n * The search field text color\n */\n textColor?: ColorValue;\n /**\n * The search hint text color\n *\n * @plaform android\n */\n hintTextColor?: ColorValue;\n /**\n * The search and close icon color shown in the header\n *\n * @plaform android\n */\n headerIconColor?: ColorValue;\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":["codegenNativeComponent","interfaceOnly"],"sources":["ScreenNativeComponent.ts"],"sourcesContent":["import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';\nimport type { ViewProps, ColorValue } from 'react-native';\nimport type {\n BubblingEventHandler,\n WithDefault,\n Int32,\n Float,\n Double,\n} from 'react-native/Libraries/Types/CodegenTypes';\n\n// eslint-disable-next-line @typescript-eslint/ban-types\ntype ScreenEvent = Readonly<{}>;\n\ntype ScreenDismissedEvent = Readonly<{\n dismissCount: Int32;\n}>;\n\ntype TransitionProgressEvent = Readonly<{\n progress: Double;\n closing: Int32;\n goingForward: Int32;\n}>;\n\ntype GestureResponseDistanceType = Readonly<{\n start: Float;\n end: Float;\n top: Float;\n bottom: Float;\n}>;\n\ntype StackPresentation =\n | 'push'\n | 'modal'\n | 'transparentModal'\n | 'fullScreenModal'\n | 'formSheet'\n | 'containedModal'\n | 'containedTransparentModal';\n\ntype StackAnimation =\n | 'default'\n | 'flip'\n | 'simple_push'\n | 'none'\n | 'fade'\n | 'slide_from_right'\n | 'slide_from_left'\n | 'slide_from_bottom'\n | 'fade_from_bottom';\n\ntype SwipeDirection = 'vertical' | 'horizontal';\n\ntype ReplaceAnimation = 'pop' | 'push';\n\ntype SheetDetentTypes = 'large' | 'medium' | 'all';\n\nexport interface NativeProps extends ViewProps {\n onAppear?: BubblingEventHandler<ScreenEvent>;\n onDisappear?: BubblingEventHandler<ScreenEvent>;\n onDismissed?: BubblingEventHandler<ScreenDismissedEvent>;\n onNativeDismissCancelled?: BubblingEventHandler<ScreenDismissedEvent>;\n onWillAppear?: BubblingEventHandler<ScreenEvent>;\n onWillDisappear?: BubblingEventHandler<ScreenEvent>;\n onTransitionProgress?: BubblingEventHandler<TransitionProgressEvent>;\n onGestureCancel?: BubblingEventHandler<ScreenEvent>;\n sheetAllowedDetents?: WithDefault<SheetDetentTypes, 'large'>;\n sheetLargestUndimmedDetent?: WithDefault<SheetDetentTypes, 'all'>;\n sheetGrabberVisible?: WithDefault<boolean, false>;\n sheetCornerRadius?: WithDefault<Float, -1.0>;\n sheetExpandsWhenScrolledToEdge?: WithDefault<boolean, false>;\n customAnimationOnSwipe?: boolean;\n fullScreenSwipeEnabled?: boolean;\n homeIndicatorHidden?: boolean;\n preventNativeDismiss?: boolean;\n gestureEnabled?: WithDefault<boolean, true>;\n statusBarColor?: ColorValue;\n statusBarHidden?: boolean;\n screenOrientation?: string;\n statusBarAnimation?: string;\n statusBarStyle?: string;\n statusBarTranslucent?: boolean;\n gestureResponseDistance?: GestureResponseDistanceType;\n stackPresentation?: WithDefault<StackPresentation, 'push'>;\n stackAnimation?: WithDefault<StackAnimation, 'default'>;\n transitionDuration?: WithDefault<Int32, 350>;\n replaceAnimation?: WithDefault<ReplaceAnimation, 'pop'>;\n swipeDirection?: WithDefault<SwipeDirection, 'horizontal'>;\n hideKeyboardOnSwipe?: boolean;\n activityState?: WithDefault<Float, -1.0>;\n navigationBarColor?: ColorValue;\n navigationBarHidden?: boolean;\n nativeBackButtonDismissalEnabled?: boolean;\n onHeaderBackButtonClicked?: BubblingEventHandler<ScreenEvent>;\n}\n\nexport default codegenNativeComponent<NativeProps>('RNSScreen', {\n interfaceOnly: true,\n});\n"],"mappings":"AAAA,OAAOA,sBAAsB,MAAM,yDAAyD;;AAU5F;;AAqFA,eAAeA,sBAAsB,CAAc,WAAW,EAAE;EAC9DC,aAAa,EAAE;AACjB,CAAC,CAAC"}
1
+ {"version":3,"names":["codegenNativeComponent","interfaceOnly"],"sources":["ScreenNativeComponent.ts"],"sourcesContent":["import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';\nimport type { ViewProps, ColorValue } from 'react-native';\nimport type {\n BubblingEventHandler,\n WithDefault,\n Int32,\n Float,\n Double,\n} from 'react-native/Libraries/Types/CodegenTypes';\n\n// eslint-disable-next-line @typescript-eslint/ban-types\ntype ScreenEvent = Readonly<{}>;\n\ntype ScreenDismissedEvent = Readonly<{\n dismissCount: Int32;\n}>;\n\ntype TransitionProgressEvent = Readonly<{\n progress: Double;\n closing: Int32;\n goingForward: Int32;\n}>;\n\ntype HeaderHeightChangeEvent = Readonly<{\n headerHeight: Double;\n}>;\n\ntype GestureResponseDistanceType = Readonly<{\n start: Float;\n end: Float;\n top: Float;\n bottom: Float;\n}>;\n\ntype StackPresentation =\n | 'push'\n | 'modal'\n | 'transparentModal'\n | 'fullScreenModal'\n | 'formSheet'\n | 'containedModal'\n | 'containedTransparentModal';\n\ntype StackAnimation =\n | 'default'\n | 'flip'\n | 'simple_push'\n | 'none'\n | 'fade'\n | 'slide_from_right'\n | 'slide_from_left'\n | 'slide_from_bottom'\n | 'fade_from_bottom';\n\ntype SwipeDirection = 'vertical' | 'horizontal';\n\ntype ReplaceAnimation = 'pop' | 'push';\n\ntype SheetDetentTypes = 'large' | 'medium' | 'all';\n\nexport interface NativeProps extends ViewProps {\n onAppear?: BubblingEventHandler<ScreenEvent>;\n onDisappear?: BubblingEventHandler<ScreenEvent>;\n onDismissed?: BubblingEventHandler<ScreenDismissedEvent>;\n onNativeDismissCancelled?: BubblingEventHandler<ScreenDismissedEvent>;\n onWillAppear?: BubblingEventHandler<ScreenEvent>;\n onWillDisappear?: BubblingEventHandler<ScreenEvent>;\n onHeaderHeightChange?: BubblingEventHandler<HeaderHeightChangeEvent>;\n onTransitionProgress?: BubblingEventHandler<TransitionProgressEvent>;\n onGestureCancel?: BubblingEventHandler<ScreenEvent>;\n sheetAllowedDetents?: WithDefault<SheetDetentTypes, 'large'>;\n sheetLargestUndimmedDetent?: WithDefault<SheetDetentTypes, 'all'>;\n sheetGrabberVisible?: WithDefault<boolean, false>;\n sheetCornerRadius?: WithDefault<Float, -1.0>;\n sheetExpandsWhenScrolledToEdge?: WithDefault<boolean, false>;\n customAnimationOnSwipe?: boolean;\n fullScreenSwipeEnabled?: boolean;\n homeIndicatorHidden?: boolean;\n preventNativeDismiss?: boolean;\n gestureEnabled?: WithDefault<boolean, true>;\n statusBarColor?: ColorValue;\n statusBarHidden?: boolean;\n screenOrientation?: string;\n statusBarAnimation?: string;\n statusBarStyle?: string;\n statusBarTranslucent?: boolean;\n gestureResponseDistance?: GestureResponseDistanceType;\n stackPresentation?: WithDefault<StackPresentation, 'push'>;\n stackAnimation?: WithDefault<StackAnimation, 'default'>;\n transitionDuration?: WithDefault<Int32, 350>;\n replaceAnimation?: WithDefault<ReplaceAnimation, 'pop'>;\n swipeDirection?: WithDefault<SwipeDirection, 'horizontal'>;\n hideKeyboardOnSwipe?: boolean;\n activityState?: WithDefault<Float, -1.0>;\n navigationBarColor?: ColorValue;\n navigationBarHidden?: boolean;\n nativeBackButtonDismissalEnabled?: boolean;\n onHeaderBackButtonClicked?: BubblingEventHandler<ScreenEvent>;\n}\n\nexport default codegenNativeComponent<NativeProps>('RNSScreen', {\n interfaceOnly: true,\n});\n"],"mappings":"AAAA,OAAOA,sBAAsB,MAAM,yDAAyD;;AAU5F;;AA0FA,eAAeA,sBAAsB,CAAc,WAAW,EAAE;EAC9DC,aAAa,EAAE;AACjB,CAAC,CAAC"}