diff --git a/native/flow-typed/npm/@react-navigation/bottom-tabs_v6.x.x.js b/native/flow-typed/npm/@react-navigation/bottom-tabs_v6.x.x.js --- a/native/flow-typed/npm/@react-navigation/bottom-tabs_v6.x.x.js +++ b/native/flow-typed/npm/@react-navigation/bottom-tabs_v6.x.x.js @@ -742,7 +742,7 @@ declare export type DrawerRouterOptions = {| ...TabRouterOptions, - +openByDefault?: boolean, + +defaultStatus?: 'open' | 'closed', |}; /** @@ -1971,29 +1971,45 @@ */ declare export type DrawerOptions = $Partial<{| - title: string, - drawerLabel: + +title: string, + +lazy: boolean, + +drawerLabel: | string | ({| +color: string, +focused: boolean |}) => React$Node, - drawerIcon: ({| + +drawerIcon: ({| +color: string, +size: number, +focused: boolean, |}) => React$Node, - gestureEnabled: boolean, - swipeEnabled: boolean, - unmountOnBlur: boolean, + +drawerActiveTintColor: string, + +drawerActiveBackgroundColor: string, + +drawerInactiveTintColor: string, + +drawerInactiveBackgroundColor: string, + +drawerItemStyle: ViewStyleProp, + +drawerLabelStyle: TextStyleProp, + +drawerContentContainerStyle: ViewStyleProp, + +drawerContentStyle: ViewStyleProp, + +drawerStyle: ViewStyleProp, + +drawerPosition: 'left' | 'right', + +drawerType: 'front' | 'back' | 'slide' | 'permanent', + +drawerHideStatusBarOnOpen: boolean, + +drawerStatusBarAnimation: 'slide' | 'none' | 'fade', + +overlayColor: string, + +sceneContainerStyle: ViewStyleProp, + +gestureHandlerProps: PanGestureHandlerProps, + +swipeEnabled: boolean, + +swipeEdgeWidth: number, + +swipeMinDistance: number, + +keyboardDismissMode: 'on-drag' | 'none', + +unmountOnBlur: boolean, |}>; /** * Drawer navigation prop */ - declare export type DrawerNavigationEventMap = {| - ...EventMapCore, - +drawerOpen: {| +data: void, +canPreventDefault: false |}, - +drawerClose: {| +data: void, +canPreventDefault: false |}, - |}; + declare export type DrawerNavigationEventMap = + EventMapCore; declare type DrawerExtraNavigationHelpers< ParamList: ParamListBase = ParamListBase, @@ -2042,49 +2058,16 @@ DrawerOptions, >; - declare export type DrawerItemListBaseOptions = $Partial<{| - +activeTintColor: string, - +activeBackgroundColor: string, - +inactiveTintColor: string, - +inactiveBackgroundColor: string, - +itemStyle: ViewStyleProp, - +labelStyle: TextStyleProp, - |}>; - - declare export type DrawerContentOptions = $Partial<{| - ...DrawerItemListBaseOptions, - +contentContainerStyle: ViewStyleProp, - +style: ViewStyleProp, - |}>; - declare type DrawerNavigationBuilderResult = {| +state: DrawerNavigationState, +navigation: DrawerNavigationHelpers<>, +descriptors: {| +[key: string]: DrawerDescriptor |}, |}; - declare export type DrawerContentProps = {| - ...DrawerContentOptions, - ...DrawerNavigationBuilderResult, - +progress: any, // Reanimated.Node - |}; - declare export type DrawerNavigationConfig = {| - +drawerPosition?: 'left' | 'right', - +drawerType?: 'front' | 'back' | 'slide' | 'permanent', - +edgeWidth?: number, - +hideStatusBar?: boolean, - +keyboardDismissMode?: 'on-drag' | 'none', - +minSwipeDistance?: number, - +overlayColor?: string, - +statusBarAnimation?: 'slide' | 'none' | 'fade', - +gestureHandlerProps?: PanGestureHandlerProps, - +lazy?: boolean, - +drawerContent?: DrawerContentProps => React$Node, - +drawerContentOptions?: DrawerContentOptions, - +sceneContainerStyle?: ViewStyleProp, - +drawerStyle?: ViewStyleProp, + +drawerContent?: DrawerNavigationBuilderResult => React$Node, +detachInactiveScreens?: boolean, + +useLegacyImplementation?: boolean, |}; declare export type ExtraDrawerNavigatorProps = {| diff --git a/native/flow-typed/npm/@react-navigation/devtools_v6.x.x.js b/native/flow-typed/npm/@react-navigation/devtools_v6.x.x.js --- a/native/flow-typed/npm/@react-navigation/devtools_v6.x.x.js +++ b/native/flow-typed/npm/@react-navigation/devtools_v6.x.x.js @@ -742,7 +742,7 @@ declare export type DrawerRouterOptions = {| ...TabRouterOptions, - +openByDefault?: boolean, + +defaultStatus?: 'open' | 'closed', |}; /** @@ -1971,29 +1971,45 @@ */ declare export type DrawerOptions = $Partial<{| - title: string, - drawerLabel: + +title: string, + +lazy: boolean, + +drawerLabel: | string | ({| +color: string, +focused: boolean |}) => React$Node, - drawerIcon: ({| + +drawerIcon: ({| +color: string, +size: number, +focused: boolean, |}) => React$Node, - gestureEnabled: boolean, - swipeEnabled: boolean, - unmountOnBlur: boolean, + +drawerActiveTintColor: string, + +drawerActiveBackgroundColor: string, + +drawerInactiveTintColor: string, + +drawerInactiveBackgroundColor: string, + +drawerItemStyle: ViewStyleProp, + +drawerLabelStyle: TextStyleProp, + +drawerContentContainerStyle: ViewStyleProp, + +drawerContentStyle: ViewStyleProp, + +drawerStyle: ViewStyleProp, + +drawerPosition: 'left' | 'right', + +drawerType: 'front' | 'back' | 'slide' | 'permanent', + +drawerHideStatusBarOnOpen: boolean, + +drawerStatusBarAnimation: 'slide' | 'none' | 'fade', + +overlayColor: string, + +sceneContainerStyle: ViewStyleProp, + +gestureHandlerProps: PanGestureHandlerProps, + +swipeEnabled: boolean, + +swipeEdgeWidth: number, + +swipeMinDistance: number, + +keyboardDismissMode: 'on-drag' | 'none', + +unmountOnBlur: boolean, |}>; /** * Drawer navigation prop */ - declare export type DrawerNavigationEventMap = {| - ...EventMapCore, - +drawerOpen: {| +data: void, +canPreventDefault: false |}, - +drawerClose: {| +data: void, +canPreventDefault: false |}, - |}; + declare export type DrawerNavigationEventMap = + EventMapCore; declare type DrawerExtraNavigationHelpers< ParamList: ParamListBase = ParamListBase, @@ -2042,49 +2058,16 @@ DrawerOptions, >; - declare export type DrawerItemListBaseOptions = $Partial<{| - +activeTintColor: string, - +activeBackgroundColor: string, - +inactiveTintColor: string, - +inactiveBackgroundColor: string, - +itemStyle: ViewStyleProp, - +labelStyle: TextStyleProp, - |}>; - - declare export type DrawerContentOptions = $Partial<{| - ...DrawerItemListBaseOptions, - +contentContainerStyle: ViewStyleProp, - +style: ViewStyleProp, - |}>; - declare type DrawerNavigationBuilderResult = {| +state: DrawerNavigationState, +navigation: DrawerNavigationHelpers<>, +descriptors: {| +[key: string]: DrawerDescriptor |}, |}; - declare export type DrawerContentProps = {| - ...DrawerContentOptions, - ...DrawerNavigationBuilderResult, - +progress: any, // Reanimated.Node - |}; - declare export type DrawerNavigationConfig = {| - +drawerPosition?: 'left' | 'right', - +drawerType?: 'front' | 'back' | 'slide' | 'permanent', - +edgeWidth?: number, - +hideStatusBar?: boolean, - +keyboardDismissMode?: 'on-drag' | 'none', - +minSwipeDistance?: number, - +overlayColor?: string, - +statusBarAnimation?: 'slide' | 'none' | 'fade', - +gestureHandlerProps?: PanGestureHandlerProps, - +lazy?: boolean, - +drawerContent?: DrawerContentProps => React$Node, - +drawerContentOptions?: DrawerContentOptions, - +sceneContainerStyle?: ViewStyleProp, - +drawerStyle?: ViewStyleProp, + +drawerContent?: DrawerNavigationBuilderResult => React$Node, +detachInactiveScreens?: boolean, + +useLegacyImplementation?: boolean, |}; declare export type ExtraDrawerNavigatorProps = {| diff --git a/native/flow-typed/npm/@react-navigation/drawer_v6.x.x.js b/native/flow-typed/npm/@react-navigation/drawer_v6.x.x.js --- a/native/flow-typed/npm/@react-navigation/drawer_v6.x.x.js +++ b/native/flow-typed/npm/@react-navigation/drawer_v6.x.x.js @@ -742,7 +742,7 @@ declare export type DrawerRouterOptions = {| ...TabRouterOptions, - +openByDefault?: boolean, + +defaultStatus?: 'open' | 'closed', |}; /** @@ -1971,29 +1971,45 @@ */ declare export type DrawerOptions = $Partial<{| - title: string, - drawerLabel: + +title: string, + +lazy: boolean, + +drawerLabel: | string | ({| +color: string, +focused: boolean |}) => React$Node, - drawerIcon: ({| + +drawerIcon: ({| +color: string, +size: number, +focused: boolean, |}) => React$Node, - gestureEnabled: boolean, - swipeEnabled: boolean, - unmountOnBlur: boolean, + +drawerActiveTintColor: string, + +drawerActiveBackgroundColor: string, + +drawerInactiveTintColor: string, + +drawerInactiveBackgroundColor: string, + +drawerItemStyle: ViewStyleProp, + +drawerLabelStyle: TextStyleProp, + +drawerContentContainerStyle: ViewStyleProp, + +drawerContentStyle: ViewStyleProp, + +drawerStyle: ViewStyleProp, + +drawerPosition: 'left' | 'right', + +drawerType: 'front' | 'back' | 'slide' | 'permanent', + +drawerHideStatusBarOnOpen: boolean, + +drawerStatusBarAnimation: 'slide' | 'none' | 'fade', + +overlayColor: string, + +sceneContainerStyle: ViewStyleProp, + +gestureHandlerProps: PanGestureHandlerProps, + +swipeEnabled: boolean, + +swipeEdgeWidth: number, + +swipeMinDistance: number, + +keyboardDismissMode: 'on-drag' | 'none', + +unmountOnBlur: boolean, |}>; /** * Drawer navigation prop */ - declare export type DrawerNavigationEventMap = {| - ...EventMapCore, - +drawerOpen: {| +data: void, +canPreventDefault: false |}, - +drawerClose: {| +data: void, +canPreventDefault: false |}, - |}; + declare export type DrawerNavigationEventMap = + EventMapCore; declare type DrawerExtraNavigationHelpers< ParamList: ParamListBase = ParamListBase, @@ -2042,49 +2058,16 @@ DrawerOptions, >; - declare export type DrawerItemListBaseOptions = $Partial<{| - +activeTintColor: string, - +activeBackgroundColor: string, - +inactiveTintColor: string, - +inactiveBackgroundColor: string, - +itemStyle: ViewStyleProp, - +labelStyle: TextStyleProp, - |}>; - - declare export type DrawerContentOptions = $Partial<{| - ...DrawerItemListBaseOptions, - +contentContainerStyle: ViewStyleProp, - +style: ViewStyleProp, - |}>; - declare type DrawerNavigationBuilderResult = {| +state: DrawerNavigationState, +navigation: DrawerNavigationHelpers<>, +descriptors: {| +[key: string]: DrawerDescriptor |}, |}; - declare export type DrawerContentProps = {| - ...DrawerContentOptions, - ...DrawerNavigationBuilderResult, - +progress: any, // Reanimated.Node - |}; - declare export type DrawerNavigationConfig = {| - +drawerPosition?: 'left' | 'right', - +drawerType?: 'front' | 'back' | 'slide' | 'permanent', - +edgeWidth?: number, - +hideStatusBar?: boolean, - +keyboardDismissMode?: 'on-drag' | 'none', - +minSwipeDistance?: number, - +overlayColor?: string, - +statusBarAnimation?: 'slide' | 'none' | 'fade', - +gestureHandlerProps?: PanGestureHandlerProps, - +lazy?: boolean, - +drawerContent?: DrawerContentProps => React$Node, - +drawerContentOptions?: DrawerContentOptions, - +sceneContainerStyle?: ViewStyleProp, - +drawerStyle?: ViewStyleProp, + +drawerContent?: DrawerNavigationBuilderResult => React$Node, +detachInactiveScreens?: boolean, + +useLegacyImplementation?: boolean, |}; declare export type ExtraDrawerNavigatorProps = {| @@ -2276,17 +2259,17 @@ * DrawerItemList */ - declare export type DrawerItemListProps = {| - ...DrawerItemListBaseOptions, - ...DrawerNavigationBuilderResult, - |}; - declare export var DrawerItemList: React$ComponentType; + declare export var DrawerItemList: React$ComponentType< + DrawerNavigationBuilderResult, + >; /** * DrawerContent */ - declare export var DrawerContent: React$ComponentType; + declare export var DrawerContent: React$ComponentType< + DrawerNavigationBuilderResult, + >; /** * DrawerContentScrollView @@ -2310,6 +2293,6 @@ * useIsDrawerOpen */ - declare export function useIsDrawerOpen(): boolean; + declare export function useDrawerStatus(): 'open' | 'closed'; } diff --git a/native/flow-typed/npm/@react-navigation/elements_v1.x.x.js b/native/flow-typed/npm/@react-navigation/elements_v1.x.x.js --- a/native/flow-typed/npm/@react-navigation/elements_v1.x.x.js +++ b/native/flow-typed/npm/@react-navigation/elements_v1.x.x.js @@ -739,7 +739,7 @@ declare export type DrawerRouterOptions = {| ...TabRouterOptions, - +openByDefault?: boolean, + +defaultStatus?: 'open' | 'closed', |}; /** @@ -1968,29 +1968,45 @@ */ declare export type DrawerOptions = $Partial<{| - title: string, - drawerLabel: + +title: string, + +lazy: boolean, + +drawerLabel: | string | ({| +color: string, +focused: boolean |}) => React$Node, - drawerIcon: ({| + +drawerIcon: ({| +color: string, +size: number, +focused: boolean, |}) => React$Node, - gestureEnabled: boolean, - swipeEnabled: boolean, - unmountOnBlur: boolean, + +drawerActiveTintColor: string, + +drawerActiveBackgroundColor: string, + +drawerInactiveTintColor: string, + +drawerInactiveBackgroundColor: string, + +drawerItemStyle: ViewStyleProp, + +drawerLabelStyle: TextStyleProp, + +drawerContentContainerStyle: ViewStyleProp, + +drawerContentStyle: ViewStyleProp, + +drawerStyle: ViewStyleProp, + +drawerPosition: 'left' | 'right', + +drawerType: 'front' | 'back' | 'slide' | 'permanent', + +drawerHideStatusBarOnOpen: boolean, + +drawerStatusBarAnimation: 'slide' | 'none' | 'fade', + +overlayColor: string, + +sceneContainerStyle: ViewStyleProp, + +gestureHandlerProps: PanGestureHandlerProps, + +swipeEnabled: boolean, + +swipeEdgeWidth: number, + +swipeMinDistance: number, + +keyboardDismissMode: 'on-drag' | 'none', + +unmountOnBlur: boolean, |}>; /** * Drawer navigation prop */ - declare export type DrawerNavigationEventMap = {| - ...EventMapCore, - +drawerOpen: {| +data: void, +canPreventDefault: false |}, - +drawerClose: {| +data: void, +canPreventDefault: false |}, - |}; + declare export type DrawerNavigationEventMap = + EventMapCore; declare type DrawerExtraNavigationHelpers< ParamList: ParamListBase = ParamListBase, @@ -2039,49 +2055,16 @@ DrawerOptions, >; - declare export type DrawerItemListBaseOptions = $Partial<{| - +activeTintColor: string, - +activeBackgroundColor: string, - +inactiveTintColor: string, - +inactiveBackgroundColor: string, - +itemStyle: ViewStyleProp, - +labelStyle: TextStyleProp, - |}>; - - declare export type DrawerContentOptions = $Partial<{| - ...DrawerItemListBaseOptions, - +contentContainerStyle: ViewStyleProp, - +style: ViewStyleProp, - |}>; - declare type DrawerNavigationBuilderResult = {| +state: DrawerNavigationState, +navigation: DrawerNavigationHelpers<>, +descriptors: {| +[key: string]: DrawerDescriptor |}, |}; - declare export type DrawerContentProps = {| - ...DrawerContentOptions, - ...DrawerNavigationBuilderResult, - +progress: any, // Reanimated.Node - |}; - declare export type DrawerNavigationConfig = {| - +drawerPosition?: 'left' | 'right', - +drawerType?: 'front' | 'back' | 'slide' | 'permanent', - +edgeWidth?: number, - +hideStatusBar?: boolean, - +keyboardDismissMode?: 'on-drag' | 'none', - +minSwipeDistance?: number, - +overlayColor?: string, - +statusBarAnimation?: 'slide' | 'none' | 'fade', - +gestureHandlerProps?: PanGestureHandlerProps, - +lazy?: boolean, - +drawerContent?: DrawerContentProps => React$Node, - +drawerContentOptions?: DrawerContentOptions, - +sceneContainerStyle?: ViewStyleProp, - +drawerStyle?: ViewStyleProp, + +drawerContent?: DrawerNavigationBuilderResult => React$Node, +detachInactiveScreens?: boolean, + +useLegacyImplementation?: boolean, |}; declare export type ExtraDrawerNavigatorProps = {| diff --git a/native/flow-typed/npm/@react-navigation/material-top-tabs_v6.x.x.js b/native/flow-typed/npm/@react-navigation/material-top-tabs_v6.x.x.js --- a/native/flow-typed/npm/@react-navigation/material-top-tabs_v6.x.x.js +++ b/native/flow-typed/npm/@react-navigation/material-top-tabs_v6.x.x.js @@ -742,7 +742,7 @@ declare export type DrawerRouterOptions = {| ...TabRouterOptions, - +openByDefault?: boolean, + +defaultStatus?: 'open' | 'closed', |}; /** @@ -1971,29 +1971,45 @@ */ declare export type DrawerOptions = $Partial<{| - title: string, - drawerLabel: + +title: string, + +lazy: boolean, + +drawerLabel: | string | ({| +color: string, +focused: boolean |}) => React$Node, - drawerIcon: ({| + +drawerIcon: ({| +color: string, +size: number, +focused: boolean, |}) => React$Node, - gestureEnabled: boolean, - swipeEnabled: boolean, - unmountOnBlur: boolean, + +drawerActiveTintColor: string, + +drawerActiveBackgroundColor: string, + +drawerInactiveTintColor: string, + +drawerInactiveBackgroundColor: string, + +drawerItemStyle: ViewStyleProp, + +drawerLabelStyle: TextStyleProp, + +drawerContentContainerStyle: ViewStyleProp, + +drawerContentStyle: ViewStyleProp, + +drawerStyle: ViewStyleProp, + +drawerPosition: 'left' | 'right', + +drawerType: 'front' | 'back' | 'slide' | 'permanent', + +drawerHideStatusBarOnOpen: boolean, + +drawerStatusBarAnimation: 'slide' | 'none' | 'fade', + +overlayColor: string, + +sceneContainerStyle: ViewStyleProp, + +gestureHandlerProps: PanGestureHandlerProps, + +swipeEnabled: boolean, + +swipeEdgeWidth: number, + +swipeMinDistance: number, + +keyboardDismissMode: 'on-drag' | 'none', + +unmountOnBlur: boolean, |}>; /** * Drawer navigation prop */ - declare export type DrawerNavigationEventMap = {| - ...EventMapCore, - +drawerOpen: {| +data: void, +canPreventDefault: false |}, - +drawerClose: {| +data: void, +canPreventDefault: false |}, - |}; + declare export type DrawerNavigationEventMap = + EventMapCore; declare type DrawerExtraNavigationHelpers< ParamList: ParamListBase = ParamListBase, @@ -2042,49 +2058,16 @@ DrawerOptions, >; - declare export type DrawerItemListBaseOptions = $Partial<{| - +activeTintColor: string, - +activeBackgroundColor: string, - +inactiveTintColor: string, - +inactiveBackgroundColor: string, - +itemStyle: ViewStyleProp, - +labelStyle: TextStyleProp, - |}>; - - declare export type DrawerContentOptions = $Partial<{| - ...DrawerItemListBaseOptions, - +contentContainerStyle: ViewStyleProp, - +style: ViewStyleProp, - |}>; - declare type DrawerNavigationBuilderResult = {| +state: DrawerNavigationState, +navigation: DrawerNavigationHelpers<>, +descriptors: {| +[key: string]: DrawerDescriptor |}, |}; - declare export type DrawerContentProps = {| - ...DrawerContentOptions, - ...DrawerNavigationBuilderResult, - +progress: any, // Reanimated.Node - |}; - declare export type DrawerNavigationConfig = {| - +drawerPosition?: 'left' | 'right', - +drawerType?: 'front' | 'back' | 'slide' | 'permanent', - +edgeWidth?: number, - +hideStatusBar?: boolean, - +keyboardDismissMode?: 'on-drag' | 'none', - +minSwipeDistance?: number, - +overlayColor?: string, - +statusBarAnimation?: 'slide' | 'none' | 'fade', - +gestureHandlerProps?: PanGestureHandlerProps, - +lazy?: boolean, - +drawerContent?: DrawerContentProps => React$Node, - +drawerContentOptions?: DrawerContentOptions, - +sceneContainerStyle?: ViewStyleProp, - +drawerStyle?: ViewStyleProp, + +drawerContent?: DrawerNavigationBuilderResult => React$Node, +detachInactiveScreens?: boolean, + +useLegacyImplementation?: boolean, |}; declare export type ExtraDrawerNavigatorProps = {| diff --git a/native/flow-typed/npm/@react-navigation/native_v6.x.x.js b/native/flow-typed/npm/@react-navigation/native_v6.x.x.js --- a/native/flow-typed/npm/@react-navigation/native_v6.x.x.js +++ b/native/flow-typed/npm/@react-navigation/native_v6.x.x.js @@ -742,7 +742,7 @@ declare export type DrawerRouterOptions = {| ...TabRouterOptions, - +openByDefault?: boolean, + +defaultStatus?: 'open' | 'closed', |}; /** @@ -1971,29 +1971,45 @@ */ declare export type DrawerOptions = $Partial<{| - title: string, - drawerLabel: + +title: string, + +lazy: boolean, + +drawerLabel: | string | ({| +color: string, +focused: boolean |}) => React$Node, - drawerIcon: ({| + +drawerIcon: ({| +color: string, +size: number, +focused: boolean, |}) => React$Node, - gestureEnabled: boolean, - swipeEnabled: boolean, - unmountOnBlur: boolean, + +drawerActiveTintColor: string, + +drawerActiveBackgroundColor: string, + +drawerInactiveTintColor: string, + +drawerInactiveBackgroundColor: string, + +drawerItemStyle: ViewStyleProp, + +drawerLabelStyle: TextStyleProp, + +drawerContentContainerStyle: ViewStyleProp, + +drawerContentStyle: ViewStyleProp, + +drawerStyle: ViewStyleProp, + +drawerPosition: 'left' | 'right', + +drawerType: 'front' | 'back' | 'slide' | 'permanent', + +drawerHideStatusBarOnOpen: boolean, + +drawerStatusBarAnimation: 'slide' | 'none' | 'fade', + +overlayColor: string, + +sceneContainerStyle: ViewStyleProp, + +gestureHandlerProps: PanGestureHandlerProps, + +swipeEnabled: boolean, + +swipeEdgeWidth: number, + +swipeMinDistance: number, + +keyboardDismissMode: 'on-drag' | 'none', + +unmountOnBlur: boolean, |}>; /** * Drawer navigation prop */ - declare export type DrawerNavigationEventMap = {| - ...EventMapCore, - +drawerOpen: {| +data: void, +canPreventDefault: false |}, - +drawerClose: {| +data: void, +canPreventDefault: false |}, - |}; + declare export type DrawerNavigationEventMap = + EventMapCore; declare type DrawerExtraNavigationHelpers< ParamList: ParamListBase = ParamListBase, @@ -2042,49 +2058,16 @@ DrawerOptions, >; - declare export type DrawerItemListBaseOptions = $Partial<{| - +activeTintColor: string, - +activeBackgroundColor: string, - +inactiveTintColor: string, - +inactiveBackgroundColor: string, - +itemStyle: ViewStyleProp, - +labelStyle: TextStyleProp, - |}>; - - declare export type DrawerContentOptions = $Partial<{| - ...DrawerItemListBaseOptions, - +contentContainerStyle: ViewStyleProp, - +style: ViewStyleProp, - |}>; - declare type DrawerNavigationBuilderResult = {| +state: DrawerNavigationState, +navigation: DrawerNavigationHelpers<>, +descriptors: {| +[key: string]: DrawerDescriptor |}, |}; - declare export type DrawerContentProps = {| - ...DrawerContentOptions, - ...DrawerNavigationBuilderResult, - +progress: any, // Reanimated.Node - |}; - declare export type DrawerNavigationConfig = {| - +drawerPosition?: 'left' | 'right', - +drawerType?: 'front' | 'back' | 'slide' | 'permanent', - +edgeWidth?: number, - +hideStatusBar?: boolean, - +keyboardDismissMode?: 'on-drag' | 'none', - +minSwipeDistance?: number, - +overlayColor?: string, - +statusBarAnimation?: 'slide' | 'none' | 'fade', - +gestureHandlerProps?: PanGestureHandlerProps, - +lazy?: boolean, - +drawerContent?: DrawerContentProps => React$Node, - +drawerContentOptions?: DrawerContentOptions, - +sceneContainerStyle?: ViewStyleProp, - +drawerStyle?: ViewStyleProp, + +drawerContent?: DrawerNavigationBuilderResult => React$Node, +detachInactiveScreens?: boolean, + +useLegacyImplementation?: boolean, |}; declare export type ExtraDrawerNavigatorProps = {| diff --git a/native/flow-typed/npm/@react-navigation/stack_v6.x.x.js b/native/flow-typed/npm/@react-navigation/stack_v6.x.x.js --- a/native/flow-typed/npm/@react-navigation/stack_v6.x.x.js +++ b/native/flow-typed/npm/@react-navigation/stack_v6.x.x.js @@ -742,7 +742,7 @@ declare export type DrawerRouterOptions = {| ...TabRouterOptions, - +openByDefault?: boolean, + +defaultStatus?: 'open' | 'closed', |}; /** @@ -1971,29 +1971,45 @@ */ declare export type DrawerOptions = $Partial<{| - title: string, - drawerLabel: + +title: string, + +lazy: boolean, + +drawerLabel: | string | ({| +color: string, +focused: boolean |}) => React$Node, - drawerIcon: ({| + +drawerIcon: ({| +color: string, +size: number, +focused: boolean, |}) => React$Node, - gestureEnabled: boolean, - swipeEnabled: boolean, - unmountOnBlur: boolean, + +drawerActiveTintColor: string, + +drawerActiveBackgroundColor: string, + +drawerInactiveTintColor: string, + +drawerInactiveBackgroundColor: string, + +drawerItemStyle: ViewStyleProp, + +drawerLabelStyle: TextStyleProp, + +drawerContentContainerStyle: ViewStyleProp, + +drawerContentStyle: ViewStyleProp, + +drawerStyle: ViewStyleProp, + +drawerPosition: 'left' | 'right', + +drawerType: 'front' | 'back' | 'slide' | 'permanent', + +drawerHideStatusBarOnOpen: boolean, + +drawerStatusBarAnimation: 'slide' | 'none' | 'fade', + +overlayColor: string, + +sceneContainerStyle: ViewStyleProp, + +gestureHandlerProps: PanGestureHandlerProps, + +swipeEnabled: boolean, + +swipeEdgeWidth: number, + +swipeMinDistance: number, + +keyboardDismissMode: 'on-drag' | 'none', + +unmountOnBlur: boolean, |}>; /** * Drawer navigation prop */ - declare export type DrawerNavigationEventMap = {| - ...EventMapCore, - +drawerOpen: {| +data: void, +canPreventDefault: false |}, - +drawerClose: {| +data: void, +canPreventDefault: false |}, - |}; + declare export type DrawerNavigationEventMap = + EventMapCore; declare type DrawerExtraNavigationHelpers< ParamList: ParamListBase = ParamListBase, @@ -2042,49 +2058,16 @@ DrawerOptions, >; - declare export type DrawerItemListBaseOptions = $Partial<{| - +activeTintColor: string, - +activeBackgroundColor: string, - +inactiveTintColor: string, - +inactiveBackgroundColor: string, - +itemStyle: ViewStyleProp, - +labelStyle: TextStyleProp, - |}>; - - declare export type DrawerContentOptions = $Partial<{| - ...DrawerItemListBaseOptions, - +contentContainerStyle: ViewStyleProp, - +style: ViewStyleProp, - |}>; - declare type DrawerNavigationBuilderResult = {| +state: DrawerNavigationState, +navigation: DrawerNavigationHelpers<>, +descriptors: {| +[key: string]: DrawerDescriptor |}, |}; - declare export type DrawerContentProps = {| - ...DrawerContentOptions, - ...DrawerNavigationBuilderResult, - +progress: any, // Reanimated.Node - |}; - declare export type DrawerNavigationConfig = {| - +drawerPosition?: 'left' | 'right', - +drawerType?: 'front' | 'back' | 'slide' | 'permanent', - +edgeWidth?: number, - +hideStatusBar?: boolean, - +keyboardDismissMode?: 'on-drag' | 'none', - +minSwipeDistance?: number, - +overlayColor?: string, - +statusBarAnimation?: 'slide' | 'none' | 'fade', - +gestureHandlerProps?: PanGestureHandlerProps, - +lazy?: boolean, - +drawerContent?: DrawerContentProps => React$Node, - +drawerContentOptions?: DrawerContentOptions, - +sceneContainerStyle?: ViewStyleProp, - +drawerStyle?: ViewStyleProp, + +drawerContent?: DrawerNavigationBuilderResult => React$Node, +detachInactiveScreens?: boolean, + +useLegacyImplementation?: boolean, |}; declare export type ExtraDrawerNavigatorProps = {|