react-native-screens 3.23.0 → 3.25.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.
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["types.tsx"],"sourcesContent":["import {\n DefaultNavigatorOptions,\n Descriptor,\n NavigationHelpers,\n NavigationProp,\n ParamListBase,\n StackNavigationState,\n StackRouterOptions,\n StackActionHelpers,\n RouteProp,\n} from '@react-navigation/native';\nimport * as React from 'react';\nimport { ImageSourcePropType, StyleProp, ViewStyle } from 'react-native';\nimport {\n ScreenProps,\n ScreenStackHeaderConfigProps,\n SearchBarProps,\n SheetDetentTypes,\n} from 'react-native-screens';\n\nexport type NativeStackNavigationEventMap = {\n /**\n * Event which fires when the screen appears.\n *\n * @deprecated Use `transitionEnd` event with `data.closing: false` instead.\n */\n appear: { data: undefined };\n /**\n * Event which fires when the current screen is dismissed by hardware back (on Android) or dismiss gesture (swipe back or down).\n */\n dismiss: { data: undefined };\n /**\n * Event which fires when a transition animation starts.\n */\n transitionStart: { data: { closing: boolean } };\n /**\n * Event which fires when a transition animation ends.\n */\n transitionEnd: { data: { closing: boolean } };\n /**\n * Event which fires when a swipe back is canceled on iOS.\n */\n gestureCancel: { data: undefined };\n};\n\nexport type NativeStackNavigationProp<\n ParamList extends ParamListBase,\n RouteName extends keyof ParamList = string\n> = NavigationProp<\n ParamList,\n RouteName,\n StackNavigationState<ParamList>,\n NativeStackNavigationOptions,\n NativeStackNavigationEventMap\n> &\n StackActionHelpers<ParamList>;\n\nexport type NativeStackScreenProps<\n ParamList extends ParamListBase,\n RouteName extends keyof ParamList = string\n> = {\n navigation: NativeStackNavigationProp<ParamList, RouteName>;\n route: RouteProp<ParamList, RouteName>;\n};\n\nexport type NativeStackNavigationHelpers = NavigationHelpers<\n ParamListBase,\n NativeStackNavigationEventMap\n>;\n\n// We want it to be an empty object beacuse navigator does not have any additional config\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport type NativeStackNavigationConfig = {};\n\nexport type NativeStackNavigationOptions = {\n /**\n * Image to display in the header as the back button.\n * Defaults to back icon image for the platform (a chevron on iOS and an arrow on Android).\n */\n backButtonImage?: ImageSourcePropType;\n /**\n * Whether to show the back button with custom left side of the header.\n */\n backButtonInCustomView?: boolean;\n /**\n * Style object for the scene content.\n */\n contentStyle?: StyleProp<ViewStyle>;\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 * 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 * Whether inactive screens should be suspended from re-rendering. Defaults to `false`.\n * Defaults to `true` when `enableFreeze()` is run at the top of the application.\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 * Only supported on iOS.\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?: ScreenProps['gestureResponseDistance'];\n /**\n * Title to display in the back button.\n * Only supported on iOS.\n *\n * @platform ios\n */\n headerBackTitle?: string;\n /**\n * Style object for header back title. Supported properties:\n * - fontFamily\n * - fontSize\n *\n * Only supported on iOS.\n *\n * @platform ios\n */\n headerBackTitleStyle?: {\n fontFamily?: string;\n fontSize?: number;\n };\n /**\n * Whether the back button title should be visible or not. Defaults to `true`.\n * Only supported on iOS.\n *\n * @platform ios\n */\n headerBackTitleVisible?: boolean;\n /**\n * Function which returns a React Element to display in the center of the header.\n */\n headerCenter?: (props: { tintColor?: string }) => React.ReactNode;\n /**\n * Boolean indicating whether to hide the back button in header.\n */\n headerHideBackButton?: boolean;\n /**\n * Boolean indicating whether to hide the elevation shadow or the bottom border on the header.\n */\n headerHideShadow?: boolean;\n /**\n * Controls the style of the navigation header when the edge of any scrollable content reaches the matching edge of the navigation bar. Supported properties:\n * - backgroundColor\n *\n * @platform ios\n */\n headerLargeStyle?: {\n backgroundColor?: string;\n };\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 headerLargeTitle?: boolean;\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 headerLargeTitleHideShadow?: boolean;\n /**\n * Style object for header large title. Supported properties:\n * - fontFamily\n * - fontSize\n * - color\n *\n * Only supported on iOS.\n *\n * @platform ios\n */\n headerLargeTitleStyle?: {\n fontFamily?: string;\n fontSize?: number;\n fontWeight?: string;\n color?: string;\n };\n /**\n * Function which returns a React Element to display on the left side of the header.\n */\n headerLeft?: (props: { tintColor?: string }) => React.ReactNode;\n /**\n * Function which returns a React Element to display on the right side of the header.\n */\n headerRight?: (props: { tintColor?: string }) => React.ReactNode;\n /**\n * Whether to show the header.\n */\n headerShown?: boolean;\n /**\n * Style object for header title. Supported properties:\n * - backgroundColor\n * - blurEffect\n */\n headerStyle?: {\n backgroundColor?: string;\n blurEffect?: ScreenStackHeaderConfigProps['blurEffect'];\n };\n /**\n * Tint color for the header. Changes the color of back button and title.\n */\n headerTintColor?: string;\n /**\n * String to display in the header as title. Defaults to scene `title`.\n */\n headerTitle?: string;\n /**\n * Style object for header title. Supported properties:\n * - fontFamily\n * - fontSize\n * - fontWeight\n * - color\n */\n headerTitleStyle?: {\n fontFamily?: string;\n fontSize?: number;\n fontWeight?: string;\n color?: string;\n };\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 headerTopInsetEnabled?: boolean;\n /**\n * Boolean indicating whether the navigation bar is translucent.\n */\n headerTranslucent?: boolean;\n /**\n * Whether the home indicator should be hidden on this screen. Defaults to `false`.\n *\n * @platform ios\n */\n homeIndicatorHidden?: boolean;\n /**\n * Whether the keyboard should hide when swiping to the previous screen. Defaults to `false`.\n *\n * @platform ios\n */\n hideKeyboardOnSwipe?: boolean;\n /**\n * Boolean indicating whether, when the Android default back button is clicked, the `pop` action should be performed on the native side or on the JS side to be able to prevent it.\n * Unfortunately the same behavior is not available on iOS since the behavior of native back button cannot be changed there.\n * Defaults to `false`.\n *\n * @platform android\n */\n nativeBackButtonDismissalEnabled?: boolean;\n /**\n * Sets the navigation bar color. Defaults to initial status bar color.\n *\n * @platform android\n */\n navigationBarColor?: string;\n /**\n * Sets the visibility of the navigation bar. Defaults to `false`.\n *\n * @platform android\n */\n navigationBarHidden?: boolean;\n /**\n * 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?: ScreenProps['replaceAnimation'];\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?: ScreenProps['screenOrientation'];\n /**\n * Object in which you should pass props in order to render native iOS searchBar.\n */\n searchBar?: SearchBarProps;\n /**\n * Describes heights where a sheet can rest.\n * Works only when `stackPresentation` is set to `formSheet`.\n * Defaults to `large`.\n *\n * Available values:\n *\n * - `large` - only large detent level will be allowed\n * - `medium` - only medium detent level will be allowed\n * - `all` - all detent levels will be allowed\n *\n * @platform ios\n */\n sheetAllowedDetents?: SheetDetentTypes;\n /**\n * Whether the sheet should expand to larger detent when scrolling.\n * Works only when `stackPresentation` is set to `formSheet`.\n * Defaults to `true`.\n */\n sheetExpandsWhenScrolledToEdge?: boolean;\n /**\n * The corner radius that the sheet will try to render with.\n * Works only when `stackPresentation` is set to `formSheet`.\n *\n * If set to non-negative value it will try to render sheet with provided radius, else ti will apply system default.\n *\n * If left unset system default is used.\n *\n * @platform ios\n */\n sheetCornerRadius?: number;\n /**\n * Boolean indicating whether the sheet shows a grabber at the top.\n * Works only when `stackPresentation` is set to `formSheet`.\n * Defaults to `false`.\n *\n * @platform ios\n */\n sheetGrabberVisible?: boolean;\n /**\n * The largest sheet detent for which a view underneath won't be dimmed.\n * Works only when `stackPresentation` is se tto `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?: ScreenProps['stackAnimation'];\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?: ScreenProps['stackPresentation'];\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?: ScreenProps['statusBarAnimation'];\n /**\n * Sets the status bar color (similar to the `StatusBar` component). Defaults to initial status bar color.\n *\n * @platform android\n */\n statusBarColor?: string;\n /**\n * Whether the status bar should be hidden on this screen. Requires enabling (or deleting) `View controller-based status bar appearance` in your Info.plist file on iOS. Defaults to `false`.\n */\n statusBarHidden?: boolean;\n /**\n * Sets the status bar color (similar to the `StatusBar` component). Requires enabling (or deleting) `View controller-based status bar appearance` in your Info.plist file on iOS. Defaults to `auto`.\n */\n statusBarStyle?: ScreenProps['statusBarStyle'];\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 * @platform ios\n */\n swipeDirection?: ScreenProps['swipeDirection'];\n /**\n * String that can be displayed in the header as a fallback for `headerTitle`.\n */\n title?: string;\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 type NativeStackNavigatorProps =\n DefaultNavigatorOptions<NativeStackNavigationOptions> &\n StackRouterOptions &\n NativeStackNavigationConfig;\n\nexport type NativeStackDescriptor = Descriptor<\n ParamListBase,\n string,\n StackNavigationState<ParamListBase>,\n NativeStackNavigationOptions\n>;\n\nexport type NativeStackDescriptorMap = {\n [key: string]: NativeStackDescriptor;\n};\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["types.tsx"],"sourcesContent":["import {\n DefaultNavigatorOptions,\n Descriptor,\n NavigationHelpers,\n NavigationProp,\n ParamListBase,\n StackNavigationState,\n StackRouterOptions,\n StackActionHelpers,\n RouteProp,\n} from '@react-navigation/native';\nimport * as React from 'react';\nimport { ImageSourcePropType, StyleProp, ViewStyle, ColorValue } from 'react-native';\nimport {\n ScreenProps,\n ScreenStackHeaderConfigProps,\n SearchBarProps,\n SheetDetentTypes,\n} from 'react-native-screens';\n\nexport type NativeStackNavigationEventMap = {\n /**\n * Event which fires when the screen appears.\n *\n * @deprecated Use `transitionEnd` event with `data.closing: false` instead.\n */\n appear: { data: undefined };\n /**\n * Event which fires when the current screen is dismissed by hardware back (on Android) or dismiss gesture (swipe back or down).\n */\n dismiss: { data: undefined };\n /**\n * Event which fires when a transition animation starts.\n */\n transitionStart: { data: { closing: boolean } };\n /**\n * Event which fires when a transition animation ends.\n */\n transitionEnd: { data: { closing: boolean } };\n /**\n * Event which fires when a swipe back is canceled on iOS.\n */\n gestureCancel: { data: undefined };\n};\n\nexport type NativeStackNavigationProp<\n ParamList extends ParamListBase,\n RouteName extends keyof ParamList = string\n> = NavigationProp<\n ParamList,\n RouteName,\n StackNavigationState<ParamList>,\n NativeStackNavigationOptions,\n NativeStackNavigationEventMap\n> &\n StackActionHelpers<ParamList>;\n\nexport type NativeStackScreenProps<\n ParamList extends ParamListBase,\n RouteName extends keyof ParamList = string\n> = {\n navigation: NativeStackNavigationProp<ParamList, RouteName>;\n route: RouteProp<ParamList, RouteName>;\n};\n\nexport type NativeStackNavigationHelpers = NavigationHelpers<\n ParamListBase,\n NativeStackNavigationEventMap\n>;\n\n// We want it to be an empty object beacuse navigator does not have any additional config\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport type NativeStackNavigationConfig = {};\n\nexport type NativeStackNavigationOptions = {\n /**\n * Image to display in the header as the back button.\n * Defaults to back icon image for the platform (a chevron on iOS and an arrow on Android).\n */\n backButtonImage?: ImageSourcePropType;\n /**\n * Whether to show the back button with custom left side of the header.\n */\n backButtonInCustomView?: boolean;\n /**\n * Style object for the scene content.\n */\n contentStyle?: StyleProp<ViewStyle>;\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 * 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 * Whether inactive screens should be suspended from re-rendering. Defaults to `false`.\n * Defaults to `true` when `enableFreeze()` is run at the top of the application.\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 * Only supported on iOS.\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?: ScreenProps['gestureResponseDistance'];\n /**\n * Title to display in the back button.\n * Only supported on iOS.\n *\n * @platform ios\n */\n headerBackTitle?: string;\n /**\n * Style object for header back title. Supported properties:\n * - fontFamily\n * - fontSize\n *\n * Only supported on iOS.\n *\n * @platform ios\n */\n headerBackTitleStyle?: {\n fontFamily?: string;\n fontSize?: number;\n };\n /**\n * Whether the back button title should be visible or not. Defaults to `true`.\n * Only supported on iOS.\n *\n * @platform ios\n */\n headerBackTitleVisible?: boolean;\n /**\n * Function which returns a React Element to display in the center of the header.\n */\n headerCenter?: (props: { tintColor?: ColorValue }) => React.ReactNode;\n /**\n * Boolean indicating whether to hide the back button in header.\n */\n headerHideBackButton?: boolean;\n /**\n * Boolean indicating whether to hide the elevation shadow or the bottom border on the header.\n */\n headerHideShadow?: boolean;\n /**\n * Controls the style of the navigation header when the edge of any scrollable content reaches the matching edge of the navigation bar. Supported properties:\n * - backgroundColor\n *\n * @platform ios\n */\n headerLargeStyle?: {\n backgroundColor?: ColorValue;\n };\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 headerLargeTitle?: boolean;\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 headerLargeTitleHideShadow?: boolean;\n /**\n * Style object for header large title. Supported properties:\n * - fontFamily\n * - fontSize\n * - color\n *\n * Only supported on iOS.\n *\n * @platform ios\n */\n headerLargeTitleStyle?: {\n fontFamily?: string;\n fontSize?: number;\n fontWeight?: string;\n color?: ColorValue;\n };\n /**\n * Function which returns a React Element to display on the left side of the header.\n */\n headerLeft?: (props: { tintColor?: ColorValue }) => React.ReactNode;\n /**\n * Function which returns a React Element to display on the right side of the header.\n */\n headerRight?: (props: { tintColor?: ColorValue }) => React.ReactNode;\n /**\n * Whether to show the header.\n */\n headerShown?: boolean;\n /**\n * Style object for header title. Supported properties:\n * - backgroundColor\n * - blurEffect\n */\n headerStyle?: {\n backgroundColor?: ColorValue;\n blurEffect?: ScreenStackHeaderConfigProps['blurEffect'];\n };\n /**\n * Tint color for the header. Changes the color of back button and title.\n */\n headerTintColor?: ColorValue;\n /**\n * String to display in the header as title. Defaults to scene `title`.\n */\n headerTitle?: string;\n /**\n * Style object for header title. Supported properties:\n * - fontFamily\n * - fontSize\n * - fontWeight\n * - color\n */\n headerTitleStyle?: {\n fontFamily?: string;\n fontSize?: number;\n fontWeight?: string;\n color?: ColorValue;\n };\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 headerTopInsetEnabled?: boolean;\n /**\n * Boolean indicating whether the navigation bar is translucent.\n */\n headerTranslucent?: boolean;\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 * 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?: ScreenProps['replaceAnimation'];\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?: ScreenProps['screenOrientation'];\n /**\n * Object in which you should pass props in order to render native iOS searchBar.\n */\n searchBar?: SearchBarProps;\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 se tto `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?: ScreenProps['stackAnimation'];\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?: ScreenProps['stackPresentation'];\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?: ScreenProps['statusBarAnimation'];\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?: ScreenProps['statusBarStyle'];\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 * @platform ios\n */\n swipeDirection?: ScreenProps['swipeDirection'];\n /**\n * String that can be displayed in the header as a fallback for `headerTitle`.\n */\n title?: string;\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 type NativeStackNavigatorProps =\n DefaultNavigatorOptions<NativeStackNavigationOptions> &\n StackRouterOptions &\n NativeStackNavigationConfig;\n\nexport type NativeStackDescriptor = Descriptor<\n ParamListBase,\n string,\n StackNavigationState<ParamListBase>,\n NativeStackNavigationOptions\n>;\n\nexport type NativeStackDescriptorMap = {\n [key: string]: NativeStackDescriptor;\n};\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["types.tsx"],"sourcesContent":["import {\n Animated,\n NativeSyntheticEvent,\n ViewProps,\n View,\n TargetedEvent,\n TextInputFocusEventData,\n} from 'react-native';\n\nexport type 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?: string;\n /**\n * Sets the visibility of the navigation bar. Defaults to `false`.\n *\n * @platform android\n */\n navigationBarHidden?: boolean;\n /**\n * A callback that gets called when the current screen appears.\n */\n onAppear?: (e: NativeSyntheticEvent<TargetedEvent>) => void;\n onComponentRef?: (view: unknown) => void;\n /**\n * A callback that gets called when the current screen disappears.\n */\n onDisappear?: (e: NativeSyntheticEvent<TargetedEvent>) => void;\n /**\n * A callback that gets called when the current screen is dismissed by hardware back (on Android) or dismiss gesture (swipe back or down).\n * The callback takes the number of dismissed screens as an argument since iOS 14 native header back button can pop more than 1 screen at a time.\n */\n onDismissed?: (e: NativeSyntheticEvent<{ dismissCount: number }>) => void;\n /**\n * 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 sheetExpandsWhenScrolledToEdge?: boolean;\n /**\n * The corner radius that the sheet will try to render with.\n * Works only when `stackPresentation` is set to `formSheet`.\n *\n * If set to non-negative value it will try to render sheet with provided radius, else ti will apply system default.\n *\n * If left unset system default is used.\n *\n * @platform ios\n */\n sheetCornerRadius?: number;\n /**\n * Boolean indicating whether the sheet shows a grabber at the top.\n * Works only when `stackPresentation` is set to `formSheet`.\n * Defaults to `false`.\n *\n * @platform ios\n */\n sheetGrabberVisible?: boolean;\n /**\n * The largest sheet detent for which a view underneath won't be dimmed.\n * Works only when `stackPresentation` is set to `formSheet`.\n *\n * If this prop is set to:\n *\n * - `large` - the view underneath won't be dimmed at any detent level\n * - `medium` - the view underneath will be dimmed only when detent level is `large`\n * - `all` - the view underneath will be dimmed for any detent level\n *\n * Defaults to `all`.\n *\n * @platform ios\n */\n sheetLargestUndimmedDetent?: SheetDetentTypes;\n /**\n * How the screen should appear/disappear when pushed or popped at the top of the stack.\n * The following values are currently supported:\n * - \"default\" – uses a platform default animation\n * - \"fade\" – fades screen in or out\n * - \"fade_from_bottom\" – performs a fade from bottom animation\n * - \"flip\" – flips the screen, requires stackPresentation: \"modal\" (iOS only)\n * - \"simple_push\" – performs a default animation, but without shadow and native header transition (iOS only)\n * - `slide_from_bottom` – performs a slide from bottom animation\n * - \"slide_from_right\" - slide in the new screen from right to left (Android only, resolves to default transition on iOS)\n * - \"slide_from_left\" - slide in the new screen from left to right (Android only, resolves to default transition on iOS)\n * - \"none\" – the screen appears/dissapears without an animation\n */\n stackAnimation?: StackAnimationTypes;\n /**\n * How should the screen be presented.\n * The following values are currently supported:\n * - \"push\" – the new screen will be pushed onto a stack which on iOS means that the default animation will be slide from the side, the animation on Android may vary depending on the OS version and theme.\n * - \"modal\" – the new screen will be presented modally. In addition this allow for a nested stack to be rendered inside such screens.\n * - \"transparentModal\" – the new screen will be presented modally but in addition the second to last screen will remain attached to the stack container such that if the top screen is non opaque the content below can still be seen. If \"modal\" is used instead the below screen will get unmounted as soon as the transition ends.\n * - \"containedModal\" – will use \"UIModalPresentationCurrentContext\" modal style on iOS and will fallback to \"modal\" on Android.\n * - \"containedTransparentModal\" – will use \"UIModalPresentationOverCurrentContext\" modal style on iOS and will fallback to \"transparentModal\" on Android.\n * - \"fullScreenModal\" – will use \"UIModalPresentationFullScreen\" modal style on iOS and will fallback to \"modal\" on Android.\n * - \"formSheet\" – will use \"UIModalPresentationFormSheet\" modal style on iOS and will fallback to \"modal\" on Android.\n */\n stackPresentation?: StackPresentationTypes;\n /**\n * Sets the status bar animation (similar to the `StatusBar` component). Requires enabling (or deleting) `View controller-based status bar appearance` in your Info.plist file on iOS.\n */\n statusBarAnimation?: 'none' | 'fade' | 'slide';\n /**\n * Sets the status bar color (similar to the `StatusBar` component). Defaults to initial status bar color.\n *\n * @platform android\n */\n statusBarColor?: string;\n /**\n * Whether the status bar should be hidden on this screen. Requires enabling (or deleting) `View controller-based status bar appearance` in your Info.plist file on iOS. Defaults to `false`.\n */\n statusBarHidden?: boolean;\n /**\n * Sets the status bar color (similar to the `StatusBar` component). Requires enabling (or deleting) `View controller-based status bar appearance` in your Info.plist file on iOS. Defaults to `auto`.\n */\n statusBarStyle?: 'inverted' | 'auto' | 'light' | 'dark';\n /**\n * Sets the translucency of the status bar. Defaults to `false`.\n *\n * @platform android\n */\n statusBarTranslucent?: boolean;\n /**\n * Sets the direction in which you should swipe to dismiss the screen.\n * When using `vertical` option, options `fullScreenSwipeEnabled: true`, `customAnimationOnSwipe: true` and `stackAnimation: 'slide_from_bottom'` are set by default.\n * The following values are supported:\n * - `vertical` – dismiss screen vertically\n * - `horizontal` – dismiss screen horizontally (default)\n *\n * @platform ios\n */\n swipeDirection?: SwipeDirectionTypes;\n /**\n * Changes the duration (in milliseconds) of `slide_from_bottom`, `fade_from_bottom`, `fade` and `simple_push` transitions on iOS. Defaults to `350`.\n * The duration of `default` and `flip` transitions isn't customizable.\n *\n * @platform ios\n */\n transitionDuration?: number;\n}\n\nexport interface ScreenContainerProps extends ViewProps {\n children?: React.ReactNode;\n /**\n * A prop that gives users an option to switch between using Screens for the navigator (container). All children screens should have the same value of their \"enabled\" prop as their container.\n */\n enabled?: boolean;\n /**\n * A prop to be used in navigators always showing only one screen (providing only `0` or `2` `activityState` values) for better implementation of `ScreenContainer` on iOS.\n */\n hasTwoStates?: boolean;\n}\n\nexport interface ScreenStackProps extends ViewProps {\n children?: React.ReactNode;\n /**\n * A callback that gets called when the current screen finishes its transition.\n */\n onFinishTransitioning?: (e: NativeSyntheticEvent<TargetedEvent>) => void;\n}\n\nexport interface ScreenStackHeaderConfigProps extends ViewProps {\n /**\n * Whether to show the back button with custom left side of the header.\n */\n backButtonInCustomView?: boolean;\n /**\n * Controls the color of the navigation header.\n */\n backgroundColor?: string;\n /**\n * Title to display in the back button.\n * @platform ios.\n */\n backTitle?: string;\n /**\n * Allows for customizing font family to be used for back button title on iOS.\n * @platform ios\n */\n backTitleFontFamily?: string;\n /**\n * Allows for customizing font size to be used for back button title on iOS.\n * @platform ios\n */\n backTitleFontSize?: number;\n /**\n * Whether the back button title should be visible or not. Defaults to `true`.\n * @platform ios\n */\n backTitleVisible?: boolean;\n /**\n * Blur effect to be applied to the header. Works with backgroundColor's alpha < 1.\n * @platform ios\n */\n blurEffect?: BlurEffectTypes;\n /**\n * Pass HeaderLeft, HeaderRight and HeaderTitle\n */\n children?: React.ReactNode;\n /**\n * Controls the color of items rendered on the header. This includes back icon, back text (iOS only) and title text. If you want the title to have different color use titleColor property.\n */\n color?: string;\n /**\n * Whether the stack should be in rtl or ltr form.\n */\n direction?: 'rtl' | 'ltr';\n /**\n * Boolean indicating whether to show the menu on longPress of iOS >= 14 back button.\n * @platform ios\n */\n disableBackButtonMenu?: boolean;\n /**\n * When set to true the header will be hidden while the parent Screen is on the top of the stack. The default value is false.\n */\n hidden?: boolean;\n /**\n * Boolean indicating whether to hide the back button in header.\n */\n hideBackButton?: boolean;\n /**\n * Boolean indicating whether to hide the elevation shadow or the bottom border on the header.\n */\n hideShadow?: boolean;\n /**\n * Boolean to set native property to prefer large title header (like in iOS setting).\n * For large title to collapse on scroll, the content of the screen should be wrapped in a scrollable view such as `ScrollView` or `FlatList`.\n * If the scrollable area doesn't fill the screen, the large title won't collapse on scroll.\n * Only supported on iOS.\n *\n * @platform ios\n */\n largeTitle?: boolean;\n /**\n * Controls the color of the navigation header when the edge of any scrollable content reaches the matching edge of the navigation bar.\n */\n largeTitleBackgroundColor?: string;\n /**\n * Customize the color to be used for the large title. By default uses the titleColor property.\n * @platform ios\n */\n largeTitleColor?: string;\n /**\n * Customize font family to be used for the large title.\n * @platform ios\n */\n largeTitleFontFamily?: string;\n /**\n * Customize the size of the font to be used for the large title.\n * @platform ios\n */\n largeTitleFontSize?: number;\n /**\n * Customize the weight of the font to be used for the large title.\n * @platform ios\n */\n largeTitleFontWeight?: string;\n /**\n * Boolean that allows for disabling drop shadow under navigation header when the edge of any scrollable content reaches the matching edge of the navigation bar.\n */\n largeTitleHideShadow?: boolean;\n /**\n * Callback which is executed when screen header is attached\n */\n onAttached?: () => void;\n /**\n * Callback which is executed when screen header is detached\n */\n onDetached?: () => void;\n /**\n * String that can be displayed in the header as a fallback for `headerTitle`.\n */\n title?: string;\n /**\n * Allows for setting text color of the title.\n */\n titleColor?: string;\n /**\n * Customize font family to be used for the title.\n */\n titleFontFamily?: string;\n /**\n * Customize the size of the font to be used for the title.\n */\n titleFontSize?: number;\n /**\n * Customize the weight of the font to be used for the title.\n */\n titleFontWeight?: string;\n /**\n * A flag to that lets you opt out of insetting the header. You may want to\n * set this to `false` if you use an opaque status bar. Defaults to `true`.\n * Only supported on Android. Insets are always applied on iOS because the\n * header cannot be opaque.\n *\n * @platform android\n */\n topInsetEnabled?: boolean;\n /**\n * Boolean indicating whether the navigation bar is translucent.\n */\n translucent?: boolean;\n}\n\nexport interface SearchBarProps {\n /**\n * Reference to imperatively modify search bar.\n *\n * Currently supported operations are:\n *\n * * `focus` - focuses the search bar\n * * `blur` - removes focus from the search bar\n * * `clearText` - removes any text present in the search bar input field\n * * `setText` - sets the search bar's content to given value\n * * `toggleCancelButton` - depending on passed boolean value, hides or shows cancel button (iOS only)\n */\n ref?: React.RefObject<SearchBarCommands>;\n\n /**\n * The auto-capitalization behavior\n */\n autoCapitalize?: 'none' | 'words' | 'sentences' | 'characters';\n /**\n * Automatically focuses search bar on mount\n *\n * @platform android\n */\n autoFocus?: boolean;\n /**\n * The search field background color\n */\n barTintColor?: string;\n /**\n * The color for the cursor caret and cancel button text.\n *\n * @platform ios\n */\n tintColor?: string;\n /**\n * The text to be used instead of default `Cancel` button text\n *\n * @platform ios\n */\n cancelButtonText?: string;\n /**\n * Specifies whether the back button should close search bar's text input or not.\n *\n * @platform android\n */\n disableBackButtonOverride?: boolean;\n /**\n * Indicates whether to hide the navigation bar\n *\n * @platform ios\n */\n hideNavigationBar?: boolean;\n /**\n * Indicates whether to hide the search bar when scrolling\n *\n * @platform ios\n */\n hideWhenScrolling?: boolean;\n\n /**\n * Sets type of the input. Defaults to `text`.\n *\n * @platform android\n */\n inputType?: 'text' | 'phone' | 'number' | 'email';\n /**\n * Indicates whether to to obscure the underlying content\n */\n obscureBackground?: boolean;\n /**\n * A callback that gets called when search bar has lost focus\n */\n onBlur?: (e: NativeSyntheticEvent<TargetedEvent>) => void;\n /**\n * A callback that gets called when the cancel button is pressed\n *\n * @platform ios\n */\n onCancelButtonPress?: (e: NativeSyntheticEvent<TargetedEvent>) => void;\n\n /**\n * A callback that gets called when the text changes. It receives the current text value of the search bar.\n */\n onChangeText?: (e: NativeSyntheticEvent<TextInputFocusEventData>) => void;\n\n /**\n * A callback that gets called when search bar is closed\n *\n * @platform android\n */\n onClose?: () => void;\n /**\n * A callback that gets called when search bar has received focus\n */\n onFocus?: (e: NativeSyntheticEvent<TargetedEvent>) => void;\n /**\n * A callback that gets called when search bar is opened\n *\n * @platform android\n */\n onOpen?: () => void;\n /**\n * A callback that gets called when the search button is pressed. It receives the current text value of the search bar.\n */\n onSearchButtonPress?: (\n e: NativeSyntheticEvent<TextInputFocusEventData>\n ) => void;\n /**\n * Text displayed when search field is empty\n */\n placeholder?: string;\n /**\n * 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?: string;\n /**\n * The search hint text color\n *\n * @plaform android\n */\n hintTextColor?: string;\n /**\n * The search and close icon color shown in the header\n *\n * @plaform android\n */\n headerIconColor?: string;\n /**\n * Show the search hint icon when search bar is focused\n *\n * @plaform android\n * @default true\n */\n shouldShowHintSearchIcon?: boolean;\n}\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["types.tsx"],"sourcesContent":["import {\n Animated,\n NativeSyntheticEvent,\n ViewProps,\n View,\n TargetedEvent,\n TextInputFocusEventData,\n 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,6 +1,6 @@
1
1
  import { DefaultNavigatorOptions, Descriptor, NavigationHelpers, NavigationProp, ParamListBase, StackNavigationState, StackRouterOptions, StackActionHelpers, RouteProp } from '@react-navigation/native';
2
2
  import * as React from 'react';
3
- import { ImageSourcePropType, StyleProp, ViewStyle } from 'react-native';
3
+ import { ImageSourcePropType, StyleProp, ViewStyle, ColorValue } from 'react-native';
4
4
  import { ScreenProps, ScreenStackHeaderConfigProps, SearchBarProps, SheetDetentTypes } from 'react-native-screens';
5
5
  export declare type NativeStackNavigationEventMap = {
6
6
  /**
@@ -133,7 +133,7 @@ export declare type NativeStackNavigationOptions = {
133
133
  * Function which returns a React Element to display in the center of the header.
134
134
  */
135
135
  headerCenter?: (props: {
136
- tintColor?: string;
136
+ tintColor?: ColorValue;
137
137
  }) => React.ReactNode;
138
138
  /**
139
139
  * Boolean indicating whether to hide the back button in header.
@@ -150,7 +150,7 @@ export declare type NativeStackNavigationOptions = {
150
150
  * @platform ios
151
151
  */
152
152
  headerLargeStyle?: {
153
- backgroundColor?: string;
153
+ backgroundColor?: ColorValue;
154
154
  };
155
155
  /**
156
156
  * Boolean to set native property to prefer large title header (like in iOS setting).
@@ -179,19 +179,19 @@ export declare type NativeStackNavigationOptions = {
179
179
  fontFamily?: string;
180
180
  fontSize?: number;
181
181
  fontWeight?: string;
182
- color?: string;
182
+ color?: ColorValue;
183
183
  };
184
184
  /**
185
185
  * Function which returns a React Element to display on the left side of the header.
186
186
  */
187
187
  headerLeft?: (props: {
188
- tintColor?: string;
188
+ tintColor?: ColorValue;
189
189
  }) => React.ReactNode;
190
190
  /**
191
191
  * Function which returns a React Element to display on the right side of the header.
192
192
  */
193
193
  headerRight?: (props: {
194
- tintColor?: string;
194
+ tintColor?: ColorValue;
195
195
  }) => React.ReactNode;
196
196
  /**
197
197
  * Whether to show the header.
@@ -203,13 +203,13 @@ export declare type NativeStackNavigationOptions = {
203
203
  * - blurEffect
204
204
  */
205
205
  headerStyle?: {
206
- backgroundColor?: string;
206
+ backgroundColor?: ColorValue;
207
207
  blurEffect?: ScreenStackHeaderConfigProps['blurEffect'];
208
208
  };
209
209
  /**
210
210
  * Tint color for the header. Changes the color of back button and title.
211
211
  */
212
- headerTintColor?: string;
212
+ headerTintColor?: ColorValue;
213
213
  /**
214
214
  * String to display in the header as title. Defaults to scene `title`.
215
215
  */
@@ -225,7 +225,7 @@ export declare type NativeStackNavigationOptions = {
225
225
  fontFamily?: string;
226
226
  fontSize?: number;
227
227
  fontWeight?: string;
228
- color?: string;
228
+ color?: ColorValue;
229
229
  };
230
230
  /**
231
231
  * A flag to that lets you opt out of insetting the header. You may want to
@@ -265,7 +265,7 @@ export declare type NativeStackNavigationOptions = {
265
265
  *
266
266
  * @platform android
267
267
  */
268
- navigationBarColor?: string;
268
+ navigationBarColor?: ColorValue;
269
269
  /**
270
270
  * Sets the visibility of the navigation bar. Defaults to `false`.
271
271
  *
@@ -314,13 +314,15 @@ export declare type NativeStackNavigationOptions = {
314
314
  * Whether the sheet should expand to larger detent when scrolling.
315
315
  * Works only when `stackPresentation` is set to `formSheet`.
316
316
  * Defaults to `true`.
317
+ *
318
+ * @platform ios
317
319
  */
318
320
  sheetExpandsWhenScrolledToEdge?: boolean;
319
321
  /**
320
322
  * The corner radius that the sheet will try to render with.
321
323
  * Works only when `stackPresentation` is set to `formSheet`.
322
324
  *
323
- * If set to non-negative value it will try to render sheet with provided radius, else ti will apply system default.
325
+ * If set to non-negative value it will try to render sheet with provided radius, else it will apply system default.
324
326
  *
325
327
  * If left unset system default is used.
326
328
  *
@@ -385,7 +387,7 @@ export declare type NativeStackNavigationOptions = {
385
387
  *
386
388
  * @platform android
387
389
  */
388
- statusBarColor?: string;
390
+ statusBarColor?: ColorValue;
389
391
  /**
390
392
  * 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`.
391
393
  */
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { Animated, NativeSyntheticEvent, ViewProps, View, TargetedEvent, TextInputFocusEventData } from 'react-native';
2
+ import { Animated, NativeSyntheticEvent, ViewProps, View, TargetedEvent, TextInputFocusEventData, ColorValue } from 'react-native';
3
3
  export declare type SearchBarCommands = {
4
4
  focus: () => void;
5
5
  blur: () => void;
@@ -95,7 +95,7 @@ export interface ScreenProps extends ViewProps {
95
95
  *
96
96
  * @platform android
97
97
  */
98
- navigationBarColor?: string;
98
+ navigationBarColor?: ColorValue;
99
99
  /**
100
100
  * Sets the visibility of the navigation bar. Defaults to `false`.
101
101
  *
@@ -194,13 +194,15 @@ export interface ScreenProps extends ViewProps {
194
194
  * Whether the sheet should expand to larger detent when scrolling.
195
195
  * Works only when `stackPresentation` is set to `formSheet`.
196
196
  * Defaults to `true`.
197
+ *
198
+ * @platform ios
197
199
  */
198
200
  sheetExpandsWhenScrolledToEdge?: boolean;
199
201
  /**
200
202
  * The corner radius that the sheet will try to render with.
201
203
  * Works only when `stackPresentation` is set to `formSheet`.
202
204
  *
203
- * If set to non-negative value it will try to render sheet with provided radius, else ti will apply system default.
205
+ * If set to non-negative value it will try to render sheet with provided radius, else it will apply system default.
204
206
  *
205
207
  * If left unset system default is used.
206
208
  *
@@ -265,7 +267,7 @@ export interface ScreenProps extends ViewProps {
265
267
  *
266
268
  * @platform android
267
269
  */
268
- statusBarColor?: string;
270
+ statusBarColor?: ColorValue;
269
271
  /**
270
272
  * 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`.
271
273
  */
@@ -324,7 +326,7 @@ export interface ScreenStackHeaderConfigProps extends ViewProps {
324
326
  /**
325
327
  * Controls the color of the navigation header.
326
328
  */
327
- backgroundColor?: string;
329
+ backgroundColor?: ColorValue;
328
330
  /**
329
331
  * Title to display in the back button.
330
332
  * @platform ios.
@@ -357,7 +359,7 @@ export interface ScreenStackHeaderConfigProps extends ViewProps {
357
359
  /**
358
360
  * 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.
359
361
  */
360
- color?: string;
362
+ color?: ColorValue;
361
363
  /**
362
364
  * Whether the stack should be in rtl or ltr form.
363
365
  */
@@ -391,12 +393,12 @@ export interface ScreenStackHeaderConfigProps extends ViewProps {
391
393
  /**
392
394
  * Controls the color of the navigation header when the edge of any scrollable content reaches the matching edge of the navigation bar.
393
395
  */
394
- largeTitleBackgroundColor?: string;
396
+ largeTitleBackgroundColor?: ColorValue;
395
397
  /**
396
398
  * Customize the color to be used for the large title. By default uses the titleColor property.
397
399
  * @platform ios
398
400
  */
399
- largeTitleColor?: string;
401
+ largeTitleColor?: ColorValue;
400
402
  /**
401
403
  * Customize font family to be used for the large title.
402
404
  * @platform ios
@@ -431,7 +433,7 @@ export interface ScreenStackHeaderConfigProps extends ViewProps {
431
433
  /**
432
434
  * Allows for setting text color of the title.
433
435
  */
434
- titleColor?: string;
436
+ titleColor?: ColorValue;
435
437
  /**
436
438
  * Customize font family to be used for the title.
437
439
  */
@@ -484,13 +486,13 @@ export interface SearchBarProps {
484
486
  /**
485
487
  * The search field background color
486
488
  */
487
- barTintColor?: string;
489
+ barTintColor?: ColorValue;
488
490
  /**
489
491
  * The color for the cursor caret and cancel button text.
490
492
  *
491
493
  * @platform ios
492
494
  */
493
- tintColor?: string;
495
+ tintColor?: ColorValue;
494
496
  /**
495
497
  * The text to be used instead of default `Cancel` button text
496
498
  *
@@ -522,7 +524,7 @@ export interface SearchBarProps {
522
524
  */
523
525
  inputType?: 'text' | 'phone' | 'number' | 'email';
524
526
  /**
525
- * Indicates whether to to obscure the underlying content
527
+ * Indicates whether to obscure the underlying content
526
528
  */
527
529
  obscureBackground?: boolean;
528
530
  /**
@@ -580,19 +582,19 @@ export interface SearchBarProps {
580
582
  /**
581
583
  * The search field text color
582
584
  */
583
- textColor?: string;
585
+ textColor?: ColorValue;
584
586
  /**
585
587
  * The search hint text color
586
588
  *
587
589
  * @plaform android
588
590
  */
589
- hintTextColor?: string;
591
+ hintTextColor?: ColorValue;
590
592
  /**
591
593
  * The search and close icon color shown in the header
592
594
  *
593
595
  * @plaform android
594
596
  */
595
- headerIconColor?: string;
597
+ headerIconColor?: ColorValue;
596
598
  /**
597
599
  * Show the search hint icon when search bar is focused
598
600
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-screens",
3
- "version": "3.23.0",
3
+ "version": "3.25.0",
4
4
  "description": "Native navigation primitives for your React Native app.",
5
5
  "scripts": {
6
6
  "check-types": "tsc --noEmit",
@@ -10,7 +10,7 @@ import {
10
10
  RouteProp,
11
11
  } from '@react-navigation/native';
12
12
  import * as React from 'react';
13
- import { ImageSourcePropType, StyleProp, ViewStyle } from 'react-native';
13
+ import { ImageSourcePropType, StyleProp, ViewStyle, ColorValue } from 'react-native';
14
14
  import {
15
15
  ScreenProps,
16
16
  ScreenStackHeaderConfigProps,
@@ -157,7 +157,7 @@ export type NativeStackNavigationOptions = {
157
157
  /**
158
158
  * Function which returns a React Element to display in the center of the header.
159
159
  */
160
- headerCenter?: (props: { tintColor?: string }) => React.ReactNode;
160
+ headerCenter?: (props: { tintColor?: ColorValue }) => React.ReactNode;
161
161
  /**
162
162
  * Boolean indicating whether to hide the back button in header.
163
163
  */
@@ -173,7 +173,7 @@ export type NativeStackNavigationOptions = {
173
173
  * @platform ios
174
174
  */
175
175
  headerLargeStyle?: {
176
- backgroundColor?: string;
176
+ backgroundColor?: ColorValue;
177
177
  };
178
178
  /**
179
179
  * Boolean to set native property to prefer large title header (like in iOS setting).
@@ -202,16 +202,16 @@ export type NativeStackNavigationOptions = {
202
202
  fontFamily?: string;
203
203
  fontSize?: number;
204
204
  fontWeight?: string;
205
- color?: string;
205
+ color?: ColorValue;
206
206
  };
207
207
  /**
208
208
  * Function which returns a React Element to display on the left side of the header.
209
209
  */
210
- headerLeft?: (props: { tintColor?: string }) => React.ReactNode;
210
+ headerLeft?: (props: { tintColor?: ColorValue }) => React.ReactNode;
211
211
  /**
212
212
  * Function which returns a React Element to display on the right side of the header.
213
213
  */
214
- headerRight?: (props: { tintColor?: string }) => React.ReactNode;
214
+ headerRight?: (props: { tintColor?: ColorValue }) => React.ReactNode;
215
215
  /**
216
216
  * Whether to show the header.
217
217
  */
@@ -222,13 +222,13 @@ export type NativeStackNavigationOptions = {
222
222
  * - blurEffect
223
223
  */
224
224
  headerStyle?: {
225
- backgroundColor?: string;
225
+ backgroundColor?: ColorValue;
226
226
  blurEffect?: ScreenStackHeaderConfigProps['blurEffect'];
227
227
  };
228
228
  /**
229
229
  * Tint color for the header. Changes the color of back button and title.
230
230
  */
231
- headerTintColor?: string;
231
+ headerTintColor?: ColorValue;
232
232
  /**
233
233
  * String to display in the header as title. Defaults to scene `title`.
234
234
  */
@@ -244,7 +244,7 @@ export type NativeStackNavigationOptions = {
244
244
  fontFamily?: string;
245
245
  fontSize?: number;
246
246
  fontWeight?: string;
247
- color?: string;
247
+ color?: ColorValue;
248
248
  };
249
249
  /**
250
250
  * A flag to that lets you opt out of insetting the header. You may want to
@@ -284,7 +284,7 @@ export type NativeStackNavigationOptions = {
284
284
  *
285
285
  * @platform android
286
286
  */
287
- navigationBarColor?: string;
287
+ navigationBarColor?: ColorValue;
288
288
  /**
289
289
  * Sets the visibility of the navigation bar. Defaults to `false`.
290
290
  *
@@ -333,13 +333,15 @@ export type NativeStackNavigationOptions = {
333
333
  * Whether the sheet should expand to larger detent when scrolling.
334
334
  * Works only when `stackPresentation` is set to `formSheet`.
335
335
  * Defaults to `true`.
336
+ *
337
+ * @platform ios
336
338
  */
337
339
  sheetExpandsWhenScrolledToEdge?: boolean;
338
340
  /**
339
341
  * The corner radius that the sheet will try to render with.
340
342
  * Works only when `stackPresentation` is set to `formSheet`.
341
343
  *
342
- * If set to non-negative value it will try to render sheet with provided radius, else ti will apply system default.
344
+ * If set to non-negative value it will try to render sheet with provided radius, else it will apply system default.
343
345
  *
344
346
  * If left unset system default is used.
345
347
  *
@@ -404,7 +406,7 @@ export type NativeStackNavigationOptions = {
404
406
  *
405
407
  * @platform android
406
408
  */
407
- statusBarColor?: string;
409
+ statusBarColor?: ColorValue;
408
410
  /**
409
411
  * 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`.
410
412
  */