@react-navigation/drawer 8.0.0-alpha.54 → 8.0.0-alpha.56

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,43 +1,34 @@
1
1
  import type { HeaderOptions, Icon } from '@react-navigation/elements';
2
2
  import type { Screen } from '@react-navigation/elements/internal';
3
- import type { DefaultNavigatorOptions, Descriptor, DrawerActionHelpers, DrawerNavigationState, DrawerRouterOptions, NavigationHelpers, NavigationProp, ParamListBase, Route, RouteProp, Theme } from '@react-navigation/native';
3
+ import type { DefaultNavigatorOptions, Descriptor, DrawerActionHelpers, DrawerNavigationState, DrawerRouterOptions, NavigationHelpers, NavigationProp, ParamListBase, RouteProp, Theme } from '@react-navigation/native';
4
4
  import type { ColorValue, StyleProp, TextStyle, ViewStyle } from 'react-native';
5
5
  import type { PanGestureConfig } from 'react-native-gesture-handler';
6
- export type Scene = {
7
- route: Route<string>;
8
- focused: boolean;
9
- color?: ColorValue;
10
- };
11
- export type Layout = {
12
- width: number;
13
- height: number;
14
- };
15
6
  export type DrawerNavigationConfig = {
16
7
  /**
17
8
  * Function that returns React element to render as the content of the drawer, for example, navigation items.
18
9
  * Defaults to `DrawerContent`.
19
10
  */
20
- drawerContent?: (props: DrawerContentComponentProps) => React.ReactNode;
11
+ drawerContent?: ((props: DrawerContentComponentProps) => React.ReactNode) | undefined;
21
12
  };
22
13
  export type DrawerNavigationOptions = HeaderOptions & {
23
14
  /**
24
15
  * Title text for the screen.
25
16
  */
26
- title?: string;
17
+ title?: string | undefined;
27
18
  /**
28
19
  * Whether this screens should render the first time it's accessed. Defaults to `true`.
29
20
  * Set it to `false` if you want to render the screen on initial render.
30
21
  */
31
- lazy?: boolean;
22
+ lazy?: boolean | undefined;
32
23
  /**
33
24
  * Function that returns a React Element to display as a header.
34
25
  */
35
- header?: (props: DrawerHeaderProps) => React.ReactNode;
26
+ header?: ((props: DrawerHeaderProps) => React.ReactNode) | undefined;
36
27
  /**
37
28
  * Whether to show the header. Setting this to `false` hides the header.
38
29
  * Defaults to `true`.
39
30
  */
40
- headerShown?: boolean;
31
+ headerShown?: boolean | undefined;
41
32
  /**
42
33
  * Title string of a screen displayed in the drawer
43
34
  * or a function that given { focused: boolean, color: ColorValue } returns a React.Node
@@ -46,7 +37,7 @@ export type DrawerNavigationOptions = HeaderOptions & {
46
37
  drawerLabel?: string | ((props: {
47
38
  color: ColorValue;
48
39
  focused: boolean;
49
- }) => React.ReactNode);
40
+ }) => React.ReactNode) | undefined;
50
41
  /**
51
42
  * Icon to display for the drawer item.
52
43
  */
@@ -54,27 +45,27 @@ export type DrawerNavigationOptions = HeaderOptions & {
54
45
  color: ColorValue;
55
46
  size: number;
56
47
  focused: boolean;
57
- }) => Icon | React.ReactNode);
48
+ }) => Icon | React.ReactNode) | undefined;
58
49
  /**
59
50
  * Color for the icon and label in the active item in the drawer.
60
51
  */
61
- drawerActiveTintColor?: ColorValue;
52
+ drawerActiveTintColor?: ColorValue | undefined;
62
53
  /**
63
54
  * Background color for the active item in the drawer.
64
55
  */
65
- drawerActiveBackgroundColor?: ColorValue;
56
+ drawerActiveBackgroundColor?: ColorValue | undefined;
66
57
  /**
67
58
  * Color for the icon and label in the inactive items in the drawer.
68
59
  */
69
- drawerInactiveTintColor?: ColorValue;
60
+ drawerInactiveTintColor?: ColorValue | undefined;
70
61
  /**
71
62
  * Background color for the inactive items in the drawer.
72
63
  */
73
- drawerInactiveBackgroundColor?: ColorValue;
64
+ drawerInactiveBackgroundColor?: ColorValue | undefined;
74
65
  /**
75
66
  * Whether label font should scale to respect Text Size accessibility settings.
76
67
  */
77
- drawerAllowFontScaling?: boolean;
68
+ drawerAllowFontScaling?: boolean | undefined;
78
69
  /**
79
70
  * Style object for the single item, which can contain an icon and/or a label.
80
71
  */
@@ -82,7 +73,7 @@ export type DrawerNavigationOptions = HeaderOptions & {
82
73
  /**
83
74
  * ID to locate this drawer item in tests.
84
75
  */
85
- drawerItemTestID?: string;
76
+ drawerItemTestID?: string | undefined;
86
77
  /**
87
78
  * Style object to apply to the `Text` inside content section which renders a label.
88
79
  */
@@ -103,7 +94,7 @@ export type DrawerNavigationOptions = HeaderOptions & {
103
94
  /**
104
95
  * Position of the drawer on the screen. Defaults to `left`.
105
96
  */
106
- drawerPosition?: 'left' | 'right';
97
+ drawerPosition?: 'left' | 'right' | undefined;
107
98
  /**
108
99
  * Type of the drawer. It determines how the drawer looks and animates.
109
100
  * - `front`: Traditional drawer which covers the screen with a overlay behind it.
@@ -117,11 +108,11 @@ export type DrawerNavigationOptions = HeaderOptions & {
117
108
  /**
118
109
  * Whether the statusbar should be hidden when the drawer is pulled or opens,
119
110
  */
120
- drawerHideStatusBarOnOpen?: boolean;
111
+ drawerHideStatusBarOnOpen?: boolean | undefined;
121
112
  /**
122
113
  * Animation of the statusbar when hiding it. use in combination with `drawerHideStatusBarOnOpen`.
123
114
  */
124
- drawerStatusBarAnimation?: 'slide' | 'none' | 'fade';
115
+ drawerStatusBarAnimation?: 'slide' | 'none' | 'fade' | undefined;
125
116
  /**
126
117
  * Color of the overlay to be displayed on top of the content view when drawer gets open.
127
118
  * The opacity is animated from `0` to `1` when the drawer opens.
@@ -131,7 +122,7 @@ export type DrawerNavigationOptions = HeaderOptions & {
131
122
  * Accessibility label for the overlay. This is read by the screen reader when the user taps the overlay.
132
123
  * Defaults to "Close drawer".
133
124
  */
134
- overlayAccessibilityLabel?: string;
125
+ overlayAccessibilityLabel?: string | undefined;
135
126
  /**
136
127
  * Style object for the component wrapping the screen content.
137
128
  */
@@ -139,32 +130,32 @@ export type DrawerNavigationOptions = HeaderOptions & {
139
130
  /**
140
131
  * Function to modify the pan gesture config.
141
132
  */
142
- configureGestureHandler?: (gesture: PanGestureConfig) => PanGestureConfig;
133
+ configureGestureHandler?: ((gesture: PanGestureConfig) => PanGestureConfig) | undefined;
143
134
  /**
144
135
  * Whether you can use swipe gestures to open or close the drawer.
145
136
  * Defaults to `true`.
146
137
  * Not supported on Web.
147
138
  */
148
- swipeEnabled?: boolean;
139
+ swipeEnabled?: boolean | undefined;
149
140
  /**
150
141
  * How far from the edge of the screen the swipe gesture should activate.
151
142
  * Not supported on Web.
152
143
  */
153
- swipeEdgeWidth?: number;
144
+ swipeEdgeWidth?: number | undefined;
154
145
  /**
155
146
  * Minimum swipe distance threshold that should activate opening the drawer.
156
147
  */
157
- swipeMinDistance?: number;
148
+ swipeMinDistance?: number | undefined;
158
149
  /**
159
150
  * Whether the keyboard should be dismissed when the swipe gesture begins.
160
151
  * Defaults to `'on-drag'`. Set to `'none'` to disable keyboard handling.
161
152
  */
162
- keyboardDismissMode?: 'on-drag' | 'none';
153
+ keyboardDismissMode?: 'on-drag' | 'none' | undefined;
163
154
  /**
164
155
  * Whether any nested stack should be popped to top when navigating away from the tab.
165
156
  * Defaults to `false`.
166
157
  */
167
- popToTopOnBlur?: boolean;
158
+ popToTopOnBlur?: boolean | undefined;
168
159
  /**
169
160
  * What should happen when screens become inactive.
170
161
  * - `pause`: Effects are cleaned up.
@@ -176,7 +167,7 @@ export type DrawerNavigationOptions = HeaderOptions & {
176
167
  * It won't be paused until after the first time it becomes focused.
177
168
  * This makes sure that effects are run to initialize the screen.
178
169
  */
179
- inactiveBehavior?: 'pause' | 'none';
170
+ inactiveBehavior?: 'pause' | 'none' | undefined;
180
171
  };
181
172
  export type DrawerContentComponentProps = {
182
173
  state: DrawerNavigationState<ParamListBase>;
@@ -240,7 +231,7 @@ export type DrawerNavigationEventMap = {
240
231
  data: undefined;
241
232
  };
242
233
  };
243
- export type DrawerNavigationHelpers = NavigationHelpers<ParamListBase, DrawerNavigationEventMap> & DrawerActionHelpers<ParamListBase>;
234
+ export type DrawerNavigationHelpers = NavigationHelpers<ParamListBase, DrawerNavigationState<ParamListBase>, DrawerNavigationEventMap> & DrawerActionHelpers<ParamListBase>;
244
235
  export type DrawerNavigationProp<ParamList extends ParamListBase, RouteName extends keyof ParamList = keyof ParamList> = NavigationProp<ParamList, RouteName, DrawerNavigationState<ParamList>, DrawerNavigationOptions, DrawerNavigationEventMap, DrawerActionHelpers<ParamList>>;
245
236
  export type DrawerScreenProps<ParamList extends ParamListBase, RouteName extends keyof ParamList = keyof ParamList> = {
246
237
  navigation: DrawerNavigationProp<ParamList, RouteName>;
@@ -251,25 +242,5 @@ export type DrawerOptionsArgs<ParamList extends ParamListBase, RouteName extends
251
242
  };
252
243
  export type DrawerDescriptor = Descriptor<DrawerNavigationOptions, DrawerNavigationProp<ParamListBase>, RouteProp<ParamListBase>>;
253
244
  export type DrawerDescriptorMap = Record<string, DrawerDescriptor>;
254
- export type DrawerProps = {
255
- drawerPosition: 'left' | 'right';
256
- drawerStyle?: StyleProp<ViewStyle>;
257
- drawerType: 'front' | 'back' | 'slide' | 'permanent';
258
- configureGestureHandler?: (gesture: PanGestureConfig) => PanGestureConfig;
259
- hideStatusBarOnOpen: boolean;
260
- keyboardDismissMode: 'none' | 'on-drag';
261
- onClose: () => void;
262
- onOpen: () => void;
263
- open: boolean;
264
- overlayStyle?: StyleProp<ViewStyle>;
265
- renderDrawerContent: () => React.ReactNode;
266
- renderSceneContent: () => React.ReactNode;
267
- statusBarAnimation: 'slide' | 'none' | 'fade';
268
- swipeDistanceThreshold: number;
269
- swipeEdgeWidth: number;
270
- swipeEnabled: boolean;
271
- swipeVelocityThreshold: number;
272
- overlayAccessibilityLabel?: string;
273
- };
274
245
  export type DrawerNavigatorProps = DefaultNavigatorOptions<ParamListBase, DrawerNavigationState<ParamListBase>, DrawerNavigationOptions, DrawerNavigationEventMap, DrawerNavigationProp<ParamListBase>> & DrawerRouterOptions & DrawerNavigationConfig;
275
246
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qCAAqC,C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ACnC,SAAS,CAAC,aAAa,CAAC,CACzB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;AAEnE,MAAM,MAAM,oBAAoB,GAAG,uBAAuB,CACxD,aAAa,EACb,qBAAqB,CAAC,aAAa,CAAC,EACpC,uBAAuB,EACvB,wBAAwB,EACxB,oBAAoB,CAAC,aAAa,CAAC,CACpC,GACC,mBAAmB,GACnB,sBAAsB,CAAC"}
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import { ScrollView, type ScrollViewProps } from 'react-native';
3
3
  type Props = ScrollViewProps & {
4
4
  children: React.ReactNode;
5
- ref?: React.Ref<React.ComponentRef<typeof ScrollView>>;
5
+ ref?: React.Ref<React.ComponentRef<typeof ScrollView>> | undefined;
6
6
  };
7
7
  export declare function DrawerContentScrollView({ contentInsetAdjustmentBehavior, contentContainerStyle, style, children, ref, ...rest }: Props): React.JSX.Element;
8
8
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"DrawerContentScrollView.d.ts","sourceRoot":"","sources":["../../../../src/views/DrawerContentScrollView.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAEL,UAAU,EACV,KAAK,eAAe,EAErB,MAAM,cAAc,CAAC;AAKtB,KAAK,KAAK,GAAG,eAAe,GAAG;IAC7B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,YAAY,CAAC,OAAO,UAAU,CAAC,CAAC,CAAC;CACxD,CAAC;AAIF,wBAAgB,uBAAuB,CAAC,EACtC,8BAA4C,EAC5C,qBAAqB,EACrB,KAAK,EACL,QAAQ,EACR,GAAG,EACH,GAAG,IAAI,EACR,EAAE,KAAK,qBAsCP"}
1
+ {"version":3,"file":"DrawerContentScrollView.d.ts","sourceRoot":"","sources":["../../../../src/views/DrawerContentScrollView.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAEL,UAAU,EACV,KAAK,eAAe,EAErB,MAAM,cAAc,CAAC;AAKtB,KAAK,KAAK,GAAG,eAAe,GAAG;IAC7B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,YAAY,CAAC,OAAO,UAAU,CAAC,CAAC,GAAG,SAAS,CAAC;CACpE,CAAC;AAIF,wBAAgB,uBAAuB,CAAC,EACtC,8BAA4C,EAC5C,qBAAqB,EACrB,KAAK,EACL,QAAQ,EACR,GAAG,EACH,GAAG,IAAI,EACR,EAAE,KAAK,qBAsCP"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@react-navigation/drawer",
3
3
  "description": "Integration for the drawer component from react-native-drawer-layout",
4
- "version": "8.0.0-alpha.54",
4
+ "version": "8.0.0-alpha.56",
5
5
  "keywords": [
6
6
  "react-native-component",
7
7
  "react-component",
@@ -46,13 +46,13 @@
46
46
  "clean": "del lib"
47
47
  },
48
48
  "dependencies": {
49
- "@react-navigation/elements": "^3.0.0-alpha.51",
49
+ "@react-navigation/elements": "^3.0.0-alpha.53",
50
50
  "react-native-drawer-layout": "^5.0.0-alpha.19",
51
51
  "use-latest-callback": "^0.3.5"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@jest/globals": "^30.4.1",
55
- "@react-navigation/native": "^8.0.0-alpha.47",
55
+ "@react-navigation/native": "^8.0.0-alpha.49",
56
56
  "@testing-library/react-native": "^14.0.0",
57
57
  "@types/react": "~19.2.17",
58
58
  "del-cli": "^7.0.0",
@@ -68,7 +68,7 @@
68
68
  "typescript": "^6.0.3"
69
69
  },
70
70
  "peerDependencies": {
71
- "@react-navigation/native": "^8.0.0-alpha.47",
71
+ "@react-navigation/native": "^8.0.0-alpha.49",
72
72
  "react": ">= 19.2.0",
73
73
  "react-native": "*",
74
74
  "react-native-gesture-handler": ">= 3.0.0",
@@ -95,5 +95,5 @@
95
95
  ]
96
96
  ]
97
97
  },
98
- "gitHead": "e83cb9a88ab92d24caad272442c338de046cfac2"
98
+ "gitHead": "110f8e897f476977b7227e5f0326996106a742f0"
99
99
  }
package/src/types.tsx CHANGED
@@ -9,51 +9,44 @@ import type {
9
9
  NavigationHelpers,
10
10
  NavigationProp,
11
11
  ParamListBase,
12
- Route,
13
12
  RouteProp,
14
13
  Theme,
15
14
  } from '@react-navigation/native';
16
15
  import type { ColorValue, StyleProp, TextStyle, ViewStyle } from 'react-native';
17
16
  import type { PanGestureConfig } from 'react-native-gesture-handler';
18
17
 
19
- export type Scene = {
20
- route: Route<string>;
21
- focused: boolean;
22
- color?: ColorValue;
23
- };
24
-
25
- export type Layout = { width: number; height: number };
26
-
27
18
  export type DrawerNavigationConfig = {
28
19
  /**
29
20
  * Function that returns React element to render as the content of the drawer, for example, navigation items.
30
21
  * Defaults to `DrawerContent`.
31
22
  */
32
- drawerContent?: (props: DrawerContentComponentProps) => React.ReactNode;
23
+ drawerContent?:
24
+ | ((props: DrawerContentComponentProps) => React.ReactNode)
25
+ | undefined;
33
26
  };
34
27
 
35
28
  export type DrawerNavigationOptions = HeaderOptions & {
36
29
  /**
37
30
  * Title text for the screen.
38
31
  */
39
- title?: string;
32
+ title?: string | undefined;
40
33
 
41
34
  /**
42
35
  * Whether this screens should render the first time it's accessed. Defaults to `true`.
43
36
  * Set it to `false` if you want to render the screen on initial render.
44
37
  */
45
- lazy?: boolean;
38
+ lazy?: boolean | undefined;
46
39
 
47
40
  /**
48
41
  * Function that returns a React Element to display as a header.
49
42
  */
50
- header?: (props: DrawerHeaderProps) => React.ReactNode;
43
+ header?: ((props: DrawerHeaderProps) => React.ReactNode) | undefined;
51
44
 
52
45
  /**
53
46
  * Whether to show the header. Setting this to `false` hides the header.
54
47
  * Defaults to `true`.
55
48
  */
56
- headerShown?: boolean;
49
+ headerShown?: boolean | undefined;
57
50
 
58
51
  /**
59
52
  * Title string of a screen displayed in the drawer
@@ -62,7 +55,8 @@ export type DrawerNavigationOptions = HeaderOptions & {
62
55
  */
63
56
  drawerLabel?:
64
57
  | string
65
- | ((props: { color: ColorValue; focused: boolean }) => React.ReactNode);
58
+ | ((props: { color: ColorValue; focused: boolean }) => React.ReactNode)
59
+ | undefined;
66
60
 
67
61
  /**
68
62
  * Icon to display for the drawer item.
@@ -73,32 +67,33 @@ export type DrawerNavigationOptions = HeaderOptions & {
73
67
  color: ColorValue;
74
68
  size: number;
75
69
  focused: boolean;
76
- }) => Icon | React.ReactNode);
70
+ }) => Icon | React.ReactNode)
71
+ | undefined;
77
72
 
78
73
  /**
79
74
  * Color for the icon and label in the active item in the drawer.
80
75
  */
81
- drawerActiveTintColor?: ColorValue;
76
+ drawerActiveTintColor?: ColorValue | undefined;
82
77
 
83
78
  /**
84
79
  * Background color for the active item in the drawer.
85
80
  */
86
- drawerActiveBackgroundColor?: ColorValue;
81
+ drawerActiveBackgroundColor?: ColorValue | undefined;
87
82
 
88
83
  /**
89
84
  * Color for the icon and label in the inactive items in the drawer.
90
85
  */
91
- drawerInactiveTintColor?: ColorValue;
86
+ drawerInactiveTintColor?: ColorValue | undefined;
92
87
 
93
88
  /**
94
89
  * Background color for the inactive items in the drawer.
95
90
  */
96
- drawerInactiveBackgroundColor?: ColorValue;
91
+ drawerInactiveBackgroundColor?: ColorValue | undefined;
97
92
 
98
93
  /**
99
94
  * Whether label font should scale to respect Text Size accessibility settings.
100
95
  */
101
- drawerAllowFontScaling?: boolean;
96
+ drawerAllowFontScaling?: boolean | undefined;
102
97
 
103
98
  /**
104
99
  * Style object for the single item, which can contain an icon and/or a label.
@@ -108,7 +103,7 @@ export type DrawerNavigationOptions = HeaderOptions & {
108
103
  /**
109
104
  * ID to locate this drawer item in tests.
110
105
  */
111
- drawerItemTestID?: string;
106
+ drawerItemTestID?: string | undefined;
112
107
 
113
108
  /**
114
109
  * Style object to apply to the `Text` inside content section which renders a label.
@@ -134,7 +129,7 @@ export type DrawerNavigationOptions = HeaderOptions & {
134
129
  /**
135
130
  * Position of the drawer on the screen. Defaults to `left`.
136
131
  */
137
- drawerPosition?: 'left' | 'right';
132
+ drawerPosition?: 'left' | 'right' | undefined;
138
133
 
139
134
  /**
140
135
  * Type of the drawer. It determines how the drawer looks and animates.
@@ -150,12 +145,12 @@ export type DrawerNavigationOptions = HeaderOptions & {
150
145
  /**
151
146
  * Whether the statusbar should be hidden when the drawer is pulled or opens,
152
147
  */
153
- drawerHideStatusBarOnOpen?: boolean;
148
+ drawerHideStatusBarOnOpen?: boolean | undefined;
154
149
 
155
150
  /**
156
151
  * Animation of the statusbar when hiding it. use in combination with `drawerHideStatusBarOnOpen`.
157
152
  */
158
- drawerStatusBarAnimation?: 'slide' | 'none' | 'fade';
153
+ drawerStatusBarAnimation?: 'slide' | 'none' | 'fade' | undefined;
159
154
 
160
155
  /**
161
156
  * Color of the overlay to be displayed on top of the content view when drawer gets open.
@@ -167,7 +162,7 @@ export type DrawerNavigationOptions = HeaderOptions & {
167
162
  * Accessibility label for the overlay. This is read by the screen reader when the user taps the overlay.
168
163
  * Defaults to "Close drawer".
169
164
  */
170
- overlayAccessibilityLabel?: string;
165
+ overlayAccessibilityLabel?: string | undefined;
171
166
 
172
167
  /**
173
168
  * Style object for the component wrapping the screen content.
@@ -177,37 +172,39 @@ export type DrawerNavigationOptions = HeaderOptions & {
177
172
  /**
178
173
  * Function to modify the pan gesture config.
179
174
  */
180
- configureGestureHandler?: (gesture: PanGestureConfig) => PanGestureConfig;
175
+ configureGestureHandler?:
176
+ | ((gesture: PanGestureConfig) => PanGestureConfig)
177
+ | undefined;
181
178
 
182
179
  /**
183
180
  * Whether you can use swipe gestures to open or close the drawer.
184
181
  * Defaults to `true`.
185
182
  * Not supported on Web.
186
183
  */
187
- swipeEnabled?: boolean;
184
+ swipeEnabled?: boolean | undefined;
188
185
 
189
186
  /**
190
187
  * How far from the edge of the screen the swipe gesture should activate.
191
188
  * Not supported on Web.
192
189
  */
193
- swipeEdgeWidth?: number;
190
+ swipeEdgeWidth?: number | undefined;
194
191
 
195
192
  /**
196
193
  * Minimum swipe distance threshold that should activate opening the drawer.
197
194
  */
198
- swipeMinDistance?: number;
195
+ swipeMinDistance?: number | undefined;
199
196
 
200
197
  /**
201
198
  * Whether the keyboard should be dismissed when the swipe gesture begins.
202
199
  * Defaults to `'on-drag'`. Set to `'none'` to disable keyboard handling.
203
200
  */
204
- keyboardDismissMode?: 'on-drag' | 'none';
201
+ keyboardDismissMode?: 'on-drag' | 'none' | undefined;
205
202
 
206
203
  /**
207
204
  * Whether any nested stack should be popped to top when navigating away from the tab.
208
205
  * Defaults to `false`.
209
206
  */
210
- popToTopOnBlur?: boolean;
207
+ popToTopOnBlur?: boolean | undefined;
211
208
 
212
209
  /**
213
210
  * What should happen when screens become inactive.
@@ -220,7 +217,7 @@ export type DrawerNavigationOptions = HeaderOptions & {
220
217
  * It won't be paused until after the first time it becomes focused.
221
218
  * This makes sure that effects are run to initialize the screen.
222
219
  */
223
- inactiveBehavior?: 'pause' | 'none';
220
+ inactiveBehavior?: 'pause' | 'none' | undefined;
224
221
  };
225
222
 
226
223
  export type DrawerContentComponentProps = {
@@ -273,6 +270,7 @@ export type DrawerNavigationEventMap = {
273
270
 
274
271
  export type DrawerNavigationHelpers = NavigationHelpers<
275
272
  ParamListBase,
273
+ DrawerNavigationState<ParamListBase>,
276
274
  DrawerNavigationEventMap
277
275
  > &
278
276
  DrawerActionHelpers<ParamListBase>;
@@ -312,27 +310,6 @@ export type DrawerDescriptor = Descriptor<
312
310
 
313
311
  export type DrawerDescriptorMap = Record<string, DrawerDescriptor>;
314
312
 
315
- export type DrawerProps = {
316
- drawerPosition: 'left' | 'right';
317
- drawerStyle?: StyleProp<ViewStyle>;
318
- drawerType: 'front' | 'back' | 'slide' | 'permanent';
319
- configureGestureHandler?: (gesture: PanGestureConfig) => PanGestureConfig;
320
- hideStatusBarOnOpen: boolean;
321
- keyboardDismissMode: 'none' | 'on-drag';
322
- onClose: () => void;
323
- onOpen: () => void;
324
- open: boolean;
325
- overlayStyle?: StyleProp<ViewStyle>;
326
- renderDrawerContent: () => React.ReactNode;
327
- renderSceneContent: () => React.ReactNode;
328
- statusBarAnimation: 'slide' | 'none' | 'fade';
329
- swipeDistanceThreshold: number;
330
- swipeEdgeWidth: number;
331
- swipeEnabled: boolean;
332
- swipeVelocityThreshold: number;
333
- overlayAccessibilityLabel?: string;
334
- };
335
-
336
313
  export type DrawerNavigatorProps = DefaultNavigatorOptions<
337
314
  ParamListBase,
338
315
  DrawerNavigationState<ParamListBase>,
@@ -12,7 +12,7 @@ import { DrawerPositionContext } from '../utils/DrawerPositionContext';
12
12
 
13
13
  type Props = ScrollViewProps & {
14
14
  children: React.ReactNode;
15
- ref?: React.Ref<React.ComponentRef<typeof ScrollView>>;
15
+ ref?: React.Ref<React.ComponentRef<typeof ScrollView>> | undefined;
16
16
  };
17
17
 
18
18
  const SPACING = 12;