@react-navigation/native-stack 8.0.0-alpha.4 → 8.0.0-alpha.40
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.
- package/lib/module/index.js.map +1 -1
- package/lib/module/navigators/createNativeStackNavigator.js +4 -8
- package/lib/module/navigators/createNativeStackNavigator.js.map +1 -1
- package/lib/module/utils/useAnimatedHeaderHeight.js +1 -1
- package/lib/module/utils/useAnimatedHeaderHeight.js.map +1 -1
- package/lib/module/utils/useInvalidPreventRemoveError.js +1 -1
- package/lib/module/utils/useInvalidPreventRemoveError.js.map +1 -1
- package/lib/module/views/NativeStackView.js +39 -25
- package/lib/module/views/NativeStackView.js.map +1 -1
- package/lib/module/views/NativeStackView.native.js +99 -68
- package/lib/module/views/NativeStackView.native.js.map +1 -1
- package/lib/module/views/useHeaderConfigProps.js +71 -21
- package/lib/module/views/useHeaderConfigProps.js.map +1 -1
- package/lib/typescript/src/index.d.ts +3 -3
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/navigators/createNativeStackNavigator.d.ts +10 -15
- package/lib/typescript/src/navigators/createNativeStackNavigator.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +145 -148
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/lib/typescript/src/utils/getModalRoutesKeys.d.ts +1 -1
- package/lib/typescript/src/utils/getModalRoutesKeys.d.ts.map +1 -1
- package/lib/typescript/src/utils/useInvalidPreventRemoveError.d.ts +1 -1
- package/lib/typescript/src/utils/useInvalidPreventRemoveError.d.ts.map +1 -1
- package/lib/typescript/src/views/FooterComponent.d.ts +1 -1
- package/lib/typescript/src/views/FooterComponent.d.ts.map +1 -1
- package/lib/typescript/src/views/NativeStackView.d.ts +3 -2
- package/lib/typescript/src/views/NativeStackView.d.ts.map +1 -1
- package/lib/typescript/src/views/NativeStackView.native.d.ts +3 -2
- package/lib/typescript/src/views/NativeStackView.native.d.ts.map +1 -1
- package/lib/typescript/src/views/useHeaderConfigProps.d.ts +1 -1
- package/lib/typescript/src/views/useHeaderConfigProps.d.ts.map +1 -1
- package/package.json +18 -19
- package/src/index.tsx +1 -0
- package/src/navigators/createNativeStackNavigator.tsx +11 -47
- package/src/types.tsx +206 -186
- package/src/utils/useAnimatedHeaderHeight.tsx +1 -1
- package/src/utils/useInvalidPreventRemoveError.tsx +2 -1
- package/src/views/NativeStackView.native.tsx +148 -89
- package/src/views/NativeStackView.tsx +61 -41
- package/src/views/useHeaderConfigProps.tsx +100 -36
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { Icon } from '@react-navigation/elements';
|
|
1
2
|
import type { DefaultNavigatorOptions, Descriptor, NavigationHelpers, NavigationProp, ParamListBase, Route, RouteProp, StackActionHelpers, StackNavigationState, StackRouterOptions, Theme } from '@react-navigation/native';
|
|
2
|
-
import
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import type { ColorValue, StyleProp, TextStyle, ViewStyle } from 'react-native';
|
|
3
5
|
import type { ScreenProps, ScreenStackHeaderConfigProps, ScrollEdgeEffect, SearchBarProps } from 'react-native-screens';
|
|
4
|
-
import type { SFSymbol } from 'sf-symbols-typescript';
|
|
5
6
|
export type NativeStackNavigationEventMap = {
|
|
6
7
|
/**
|
|
7
8
|
* Event which fires when a transition animation starts.
|
|
@@ -63,7 +64,7 @@ export type NativeStackHeaderProps = {
|
|
|
63
64
|
* The `href` to use for the anchor tag on web
|
|
64
65
|
*/
|
|
65
66
|
href: string | undefined;
|
|
66
|
-
};
|
|
67
|
+
} | undefined;
|
|
67
68
|
/**
|
|
68
69
|
* Options for the current screen.
|
|
69
70
|
*/
|
|
@@ -81,22 +82,22 @@ export type NativeStackHeaderItemProps = {
|
|
|
81
82
|
/**
|
|
82
83
|
* Tint color for the header.
|
|
83
84
|
*/
|
|
84
|
-
tintColor?: ColorValue;
|
|
85
|
+
tintColor?: ColorValue | undefined;
|
|
85
86
|
/**
|
|
86
87
|
* Whether it's possible to navigate back in stack.
|
|
87
88
|
*/
|
|
88
|
-
canGoBack?: boolean;
|
|
89
|
+
canGoBack?: boolean | undefined;
|
|
89
90
|
};
|
|
90
91
|
export type NativeStackHeaderBackProps = NativeStackHeaderItemProps & {
|
|
91
92
|
/**
|
|
92
93
|
* Label text for the button. Usually the title of the previous screen.
|
|
93
94
|
* By default, this is only shown on iOS 18.
|
|
94
95
|
*/
|
|
95
|
-
label?: string;
|
|
96
|
+
label?: string | undefined;
|
|
96
97
|
/**
|
|
97
98
|
* The `href` to use for the anchor tag on web
|
|
98
99
|
*/
|
|
99
|
-
href?: string;
|
|
100
|
+
href?: string | undefined;
|
|
100
101
|
};
|
|
101
102
|
/**
|
|
102
103
|
* @deprecated Use `NativeStackHeaderBackProps` instead.
|
|
@@ -110,18 +111,18 @@ export type NativeStackNavigationOptions = {
|
|
|
110
111
|
/**
|
|
111
112
|
* String that can be displayed in the header as a fallback for `headerTitle`.
|
|
112
113
|
*/
|
|
113
|
-
title?: string;
|
|
114
|
+
title?: string | undefined;
|
|
114
115
|
/**
|
|
115
116
|
* Function that given `HeaderProps` returns a React Element to display as a header.
|
|
116
117
|
*/
|
|
117
|
-
header?: (props: NativeStackHeaderProps) => React.ReactNode;
|
|
118
|
+
header?: ((props: NativeStackHeaderProps) => React.ReactNode) | undefined;
|
|
118
119
|
/**
|
|
119
120
|
* Whether the back button is visible in the header.
|
|
120
121
|
* You can use it to show a back button alongside `headerLeft` if you have specified it.
|
|
121
122
|
*
|
|
122
123
|
* This will have no effect on the first screen in the stack.
|
|
123
124
|
*/
|
|
124
|
-
headerBackVisible?: boolean;
|
|
125
|
+
headerBackVisible?: boolean | undefined;
|
|
125
126
|
/**
|
|
126
127
|
* Title string used by the back button on iOS.
|
|
127
128
|
* Defaults to the previous scene's title.
|
|
@@ -133,7 +134,7 @@ export type NativeStackNavigationOptions = {
|
|
|
133
134
|
*
|
|
134
135
|
* @platform ios, web
|
|
135
136
|
*/
|
|
136
|
-
headerBackTitle?: string;
|
|
137
|
+
headerBackTitle?: string | undefined;
|
|
137
138
|
/**
|
|
138
139
|
* Style object for header back title. Supported properties:
|
|
139
140
|
* - fontFamily
|
|
@@ -144,11 +145,17 @@ export type NativeStackNavigationOptions = {
|
|
|
144
145
|
* @platform ios, web
|
|
145
146
|
*/
|
|
146
147
|
headerBackTitleStyle?: StyleProp<{
|
|
147
|
-
fontFamily?: string;
|
|
148
|
-
fontSize?: number;
|
|
149
|
-
}
|
|
148
|
+
fontFamily?: string | undefined;
|
|
149
|
+
fontSize?: number | undefined;
|
|
150
|
+
}> | undefined;
|
|
150
151
|
/**
|
|
151
|
-
* Icon to display in the header
|
|
152
|
+
* Icon to display in the header in the back button.
|
|
153
|
+
*
|
|
154
|
+
* Supported types:
|
|
155
|
+
* - image: custom image source
|
|
156
|
+
* - sfSymbol: SF Symbol icon (iOS only - when using custom header)
|
|
157
|
+
* - materialSymbol: material symbol icon (Android only)
|
|
158
|
+
*
|
|
152
159
|
* Defaults to back icon image for the platform
|
|
153
160
|
* - A chevron on iOS
|
|
154
161
|
* - An arrow on Android
|
|
@@ -161,10 +168,7 @@ export type NativeStackNavigationOptions = {
|
|
|
161
168
|
* }
|
|
162
169
|
* ```
|
|
163
170
|
*/
|
|
164
|
-
headerBackIcon?:
|
|
165
|
-
type: 'image';
|
|
166
|
-
source: ImageSourcePropType;
|
|
167
|
-
};
|
|
171
|
+
headerBackIcon?: Icon | undefined;
|
|
168
172
|
/**
|
|
169
173
|
* Style of the header when a large title is shown.
|
|
170
174
|
* The large title is shown if `headerLargeTitleEnabled` is `true` and
|
|
@@ -178,8 +182,8 @@ export type NativeStackNavigationOptions = {
|
|
|
178
182
|
* @platform ios
|
|
179
183
|
*/
|
|
180
184
|
headerLargeStyle?: StyleProp<{
|
|
181
|
-
backgroundColor?: ColorValue;
|
|
182
|
-
}
|
|
185
|
+
backgroundColor?: ColorValue | undefined;
|
|
186
|
+
}> | undefined;
|
|
183
187
|
/**
|
|
184
188
|
* Whether to enable header with large title which collapses to regular header on scroll.
|
|
185
189
|
*
|
|
@@ -191,7 +195,7 @@ export type NativeStackNavigationOptions = {
|
|
|
191
195
|
*
|
|
192
196
|
* @platform ios
|
|
193
197
|
*/
|
|
194
|
-
headerLargeTitleEnabled?: boolean;
|
|
198
|
+
headerLargeTitleEnabled?: boolean | undefined;
|
|
195
199
|
/**
|
|
196
200
|
* Whether drop shadow of header is visible when a large title is shown.
|
|
197
201
|
*
|
|
@@ -199,7 +203,7 @@ export type NativeStackNavigationOptions = {
|
|
|
199
203
|
*
|
|
200
204
|
* @platform ios
|
|
201
205
|
*/
|
|
202
|
-
headerLargeTitleShadowVisible?: boolean;
|
|
206
|
+
headerLargeTitleShadowVisible?: boolean | undefined;
|
|
203
207
|
/**
|
|
204
208
|
* Style object for large title in header. Supported properties:
|
|
205
209
|
* - fontFamily
|
|
@@ -212,33 +216,33 @@ export type NativeStackNavigationOptions = {
|
|
|
212
216
|
* @platform ios
|
|
213
217
|
*/
|
|
214
218
|
headerLargeTitleStyle?: StyleProp<{
|
|
215
|
-
fontFamily?: string;
|
|
216
|
-
fontSize?: number;
|
|
217
|
-
fontWeight?: string;
|
|
218
|
-
color?: ColorValue;
|
|
219
|
-
}
|
|
219
|
+
fontFamily?: string | undefined;
|
|
220
|
+
fontSize?: number | undefined;
|
|
221
|
+
fontWeight?: string | undefined;
|
|
222
|
+
color?: ColorValue | undefined;
|
|
223
|
+
}> | undefined;
|
|
220
224
|
/**
|
|
221
225
|
* Whether to show the header. The header is shown by default.
|
|
222
226
|
* Setting this to `false` hides the header.
|
|
223
227
|
*/
|
|
224
|
-
headerShown?: boolean;
|
|
228
|
+
headerShown?: boolean | undefined;
|
|
225
229
|
/**
|
|
226
230
|
* Style object for header. Supported properties:
|
|
227
231
|
* - backgroundColor
|
|
228
232
|
*/
|
|
229
233
|
headerStyle?: StyleProp<{
|
|
230
|
-
backgroundColor?: ColorValue;
|
|
231
|
-
}
|
|
234
|
+
backgroundColor?: ColorValue | undefined;
|
|
235
|
+
}> | undefined;
|
|
232
236
|
/**
|
|
233
237
|
* Whether to hide the elevation shadow (Android) or the bottom border (iOS) on the header.
|
|
234
238
|
*/
|
|
235
|
-
headerShadowVisible?: boolean;
|
|
239
|
+
headerShadowVisible?: boolean | undefined;
|
|
236
240
|
/**
|
|
237
241
|
* Boolean indicating whether the navigation bar is translucent.
|
|
238
242
|
* Setting this to `true` makes the header absolutely positioned,
|
|
239
243
|
* and changes the background color to `transparent` unless specified in `headerStyle`.
|
|
240
244
|
*/
|
|
241
|
-
headerTransparent?: boolean;
|
|
245
|
+
headerTransparent?: boolean | undefined;
|
|
242
246
|
/**
|
|
243
247
|
* Blur effect for the translucent header.
|
|
244
248
|
* The `headerTransparent` option needs to be set to `true` for this to work.
|
|
@@ -249,23 +253,23 @@ export type NativeStackNavigationOptions = {
|
|
|
249
253
|
*
|
|
250
254
|
* @platform ios
|
|
251
255
|
*/
|
|
252
|
-
headerBlurEffect?: ScreenStackHeaderConfigProps['blurEffect'];
|
|
256
|
+
headerBlurEffect?: ScreenStackHeaderConfigProps['blurEffect'] | undefined;
|
|
253
257
|
/**
|
|
254
258
|
* Tint color for the header. Changes the color of back button and title.
|
|
255
259
|
*/
|
|
256
|
-
headerTintColor?: ColorValue;
|
|
260
|
+
headerTintColor?: ColorValue | undefined;
|
|
257
261
|
/**
|
|
258
262
|
* Function which returns a React Element to render as the background of the header.
|
|
259
263
|
* This is useful for using backgrounds such as an image, a gradient, blur effect etc.
|
|
260
264
|
* You can use this with `headerTransparent` to render content underneath a translucent header.
|
|
261
265
|
*/
|
|
262
|
-
headerBackground?: () => React.ReactNode;
|
|
266
|
+
headerBackground?: (() => React.ReactNode) | undefined;
|
|
263
267
|
/**
|
|
264
268
|
* Function which returns a React Element to display on the left side of the header.
|
|
265
269
|
* This replaces the back button. See `headerBackVisible` to show the back button along side left element.
|
|
266
270
|
* Will be overriden by `headerLeftItems` on iOS.
|
|
267
271
|
*/
|
|
268
|
-
headerLeft?: (props: NativeStackHeaderBackProps) => React.ReactNode;
|
|
272
|
+
headerLeft?: ((props: NativeStackHeaderBackProps) => React.ReactNode) | undefined;
|
|
269
273
|
/**
|
|
270
274
|
* Whether the liquid glass background is visible for the item.
|
|
271
275
|
*
|
|
@@ -274,12 +278,12 @@ export type NativeStackNavigationOptions = {
|
|
|
274
278
|
*
|
|
275
279
|
* Defaults to `true`.
|
|
276
280
|
*/
|
|
277
|
-
headerLeftBackgroundVisible?: boolean;
|
|
281
|
+
headerLeftBackgroundVisible?: boolean | undefined;
|
|
278
282
|
/**
|
|
279
283
|
* Function which returns a React Element to display on the right side of the header.
|
|
280
284
|
* Will be overriden by `headerRightItems` on iOS.
|
|
281
285
|
*/
|
|
282
|
-
headerRight?: (props: NativeStackHeaderItemProps) => React.ReactNode;
|
|
286
|
+
headerRight?: ((props: NativeStackHeaderItemProps) => React.ReactNode) | undefined;
|
|
283
287
|
/**
|
|
284
288
|
* Whether the liquid glass background is visible for the item.
|
|
285
289
|
*
|
|
@@ -288,7 +292,7 @@ export type NativeStackNavigationOptions = {
|
|
|
288
292
|
*
|
|
289
293
|
* Defaults to `true`.
|
|
290
294
|
*/
|
|
291
|
-
headerRightBackgroundVisible?: boolean;
|
|
295
|
+
headerRightBackgroundVisible?: boolean | undefined;
|
|
292
296
|
/**
|
|
293
297
|
* Function which returns an array of items to display as on the left side of the header.
|
|
294
298
|
* Overrides `headerLeft`.
|
|
@@ -297,7 +301,7 @@ export type NativeStackNavigationOptions = {
|
|
|
297
301
|
*
|
|
298
302
|
* @platform ios
|
|
299
303
|
*/
|
|
300
|
-
unstable_headerLeftItems?: (props: NativeStackHeaderItemProps) => NativeStackHeaderItem[];
|
|
304
|
+
unstable_headerLeftItems?: ((props: NativeStackHeaderItemProps) => NativeStackHeaderItem[]) | undefined;
|
|
301
305
|
/**
|
|
302
306
|
* Function which returns an array of items to display as on the right side of the header.
|
|
303
307
|
* Overrides `headerRight`.
|
|
@@ -306,7 +310,7 @@ export type NativeStackNavigationOptions = {
|
|
|
306
310
|
*
|
|
307
311
|
* @platform ios
|
|
308
312
|
*/
|
|
309
|
-
unstable_headerRightItems?: (props: NativeStackHeaderItemProps) => NativeStackHeaderItem[];
|
|
313
|
+
unstable_headerRightItems?: ((props: NativeStackHeaderItemProps) => NativeStackHeaderItem[]) | undefined;
|
|
310
314
|
/**
|
|
311
315
|
* String or a function that returns a React Element to be used by the header.
|
|
312
316
|
* Defaults to screen `title` or route name.
|
|
@@ -324,15 +328,15 @@ export type NativeStackNavigationOptions = {
|
|
|
324
328
|
/**
|
|
325
329
|
* Tint color for the header.
|
|
326
330
|
*/
|
|
327
|
-
tintColor?: ColorValue;
|
|
328
|
-
}) => React.ReactNode);
|
|
331
|
+
tintColor?: ColorValue | undefined;
|
|
332
|
+
}) => React.ReactNode) | undefined;
|
|
329
333
|
/**
|
|
330
334
|
* How to align the the header title.
|
|
331
335
|
* Defaults to `left` on platforms other than iOS.
|
|
332
336
|
*
|
|
333
337
|
* Not supported on iOS. It's always `center` on iOS and cannot be changed.
|
|
334
338
|
*/
|
|
335
|
-
headerTitleAlign?: 'left' | 'center';
|
|
339
|
+
headerTitleAlign?: 'left' | 'center' | undefined;
|
|
336
340
|
/**
|
|
337
341
|
* Style object for header title. Supported properties:
|
|
338
342
|
* - fontFamily
|
|
@@ -341,16 +345,16 @@ export type NativeStackNavigationOptions = {
|
|
|
341
345
|
* - color
|
|
342
346
|
*/
|
|
343
347
|
headerTitleStyle?: StyleProp<Pick<TextStyle, 'fontFamily' | 'fontSize' | 'fontWeight'> & {
|
|
344
|
-
color?: ColorValue;
|
|
345
|
-
}
|
|
348
|
+
color?: ColorValue | undefined;
|
|
349
|
+
}> | undefined;
|
|
346
350
|
/**
|
|
347
351
|
* Options to render a native search bar.
|
|
348
352
|
* You also need to specify `contentInsetAdjustmentBehavior="automatic"` in your `ScrollView`, `FlatList` etc.
|
|
349
353
|
* If you don't have a `ScrollView`, specify `headerTransparent: false`.
|
|
350
354
|
*/
|
|
351
|
-
headerSearchBarOptions?: Omit<SearchBarProps, 'onChangeText'> & {
|
|
352
|
-
onChange?: SearchBarProps['onChangeText'];
|
|
353
|
-
};
|
|
355
|
+
headerSearchBarOptions?: (Omit<SearchBarProps, 'onChangeText'> & {
|
|
356
|
+
onChange?: SearchBarProps['onChangeText'] | undefined;
|
|
357
|
+
}) | undefined;
|
|
354
358
|
/**
|
|
355
359
|
* Boolean indicating whether to show the menu on longPress of iOS >= 14 back button. Defaults to `true`.
|
|
356
360
|
* Requires `react-native-screens` version >=3.3.0.
|
|
@@ -359,7 +363,7 @@ export type NativeStackNavigationOptions = {
|
|
|
359
363
|
*
|
|
360
364
|
* @platform ios
|
|
361
365
|
*/
|
|
362
|
-
headerBackButtonMenuEnabled?: boolean;
|
|
366
|
+
headerBackButtonMenuEnabled?: boolean | undefined;
|
|
363
367
|
/**
|
|
364
368
|
* How the back button displays icon and title.
|
|
365
369
|
*
|
|
@@ -381,25 +385,25 @@ export type NativeStackNavigationOptions = {
|
|
|
381
385
|
*
|
|
382
386
|
* @platform ios, web
|
|
383
387
|
*/
|
|
384
|
-
headerBackButtonDisplayMode?: ScreenStackHeaderConfigProps['backButtonDisplayMode'];
|
|
388
|
+
headerBackButtonDisplayMode?: ScreenStackHeaderConfigProps['backButtonDisplayMode'] | undefined;
|
|
385
389
|
/**
|
|
386
390
|
* Whether the home indicator should prefer to stay hidden on this screen. Defaults to `false`.
|
|
387
391
|
*
|
|
388
392
|
* @platform ios
|
|
389
393
|
*/
|
|
390
|
-
autoHideHomeIndicator?: boolean;
|
|
394
|
+
autoHideHomeIndicator?: boolean | undefined;
|
|
391
395
|
/**
|
|
392
396
|
* Whether the keyboard should hide when swiping to the previous screen. Defaults to `false`.
|
|
393
397
|
*
|
|
394
398
|
* @platform ios
|
|
395
399
|
*/
|
|
396
|
-
keyboardHandlingEnabled?: boolean;
|
|
400
|
+
keyboardHandlingEnabled?: boolean | undefined;
|
|
397
401
|
/**
|
|
398
402
|
* Sets the visibility of the navigation bar. Defaults to `false`.
|
|
399
403
|
*
|
|
400
404
|
* @platform android
|
|
401
405
|
*/
|
|
402
|
-
navigationBarHidden?: boolean;
|
|
406
|
+
navigationBarHidden?: boolean | undefined;
|
|
403
407
|
/**
|
|
404
408
|
* Sets the status bar animation (similar to the `StatusBar` component).
|
|
405
409
|
* On Android, setting either `fade` or `slide` will set the transition of status bar color. On iOS, this option applies to appereance animation of the status bar.
|
|
@@ -411,7 +415,7 @@ export type NativeStackNavigationOptions = {
|
|
|
411
415
|
*
|
|
412
416
|
* @platform android, ios
|
|
413
417
|
*/
|
|
414
|
-
statusBarAnimation?: ScreenProps['statusBarAnimation'];
|
|
418
|
+
statusBarAnimation?: ScreenProps['statusBarAnimation'] | undefined;
|
|
415
419
|
/**
|
|
416
420
|
* Whether the status bar should be hidden on this screen.
|
|
417
421
|
* Requires setting `View controller-based status bar appearance -> YES` in your Info.plist file.
|
|
@@ -420,7 +424,7 @@ export type NativeStackNavigationOptions = {
|
|
|
420
424
|
*
|
|
421
425
|
* @platform android, ios
|
|
422
426
|
*/
|
|
423
|
-
statusBarHidden?: boolean;
|
|
427
|
+
statusBarHidden?: boolean | undefined;
|
|
424
428
|
/**
|
|
425
429
|
* Sets the status bar color (similar to the `StatusBar` component).
|
|
426
430
|
* Requires setting `View controller-based status bar appearance -> YES` (or removing the config) in your `Info.plist` file.
|
|
@@ -432,7 +436,7 @@ export type NativeStackNavigationOptions = {
|
|
|
432
436
|
*
|
|
433
437
|
* @platform android, ios
|
|
434
438
|
*/
|
|
435
|
-
statusBarStyle?: ScreenProps['statusBarStyle'];
|
|
439
|
+
statusBarStyle?: ScreenProps['statusBarStyle'] | undefined;
|
|
436
440
|
/**
|
|
437
441
|
* Sets the direction in which you should swipe to dismiss the screen.
|
|
438
442
|
* When using `vertical` option, options `fullScreenGestureEnabled: true`, `animationMatchesGesture: true` and `animation: 'slide_from_bottom'` are set by default.
|
|
@@ -443,11 +447,11 @@ export type NativeStackNavigationOptions = {
|
|
|
443
447
|
*
|
|
444
448
|
* @platform ios
|
|
445
449
|
*/
|
|
446
|
-
gestureDirection?: ScreenProps['swipeDirection'];
|
|
450
|
+
gestureDirection?: ScreenProps['swipeDirection'] | undefined;
|
|
447
451
|
/**
|
|
448
452
|
* Style object for the scene content.
|
|
449
453
|
*/
|
|
450
|
-
contentStyle?: StyleProp<ViewStyle
|
|
454
|
+
contentStyle?: StyleProp<ViewStyle> | undefined;
|
|
451
455
|
/**
|
|
452
456
|
* Whether the gesture to dismiss should use animation provided to `animation` prop. Defaults to `false`.
|
|
453
457
|
*
|
|
@@ -455,7 +459,7 @@ export type NativeStackNavigationOptions = {
|
|
|
455
459
|
*
|
|
456
460
|
* @platform ios
|
|
457
461
|
*/
|
|
458
|
-
animationMatchesGesture?: boolean;
|
|
462
|
+
animationMatchesGesture?: boolean | undefined;
|
|
459
463
|
/**
|
|
460
464
|
* Whether the gesture to dismiss should work on the whole screen. The behavior depends on iOS version.
|
|
461
465
|
*
|
|
@@ -470,7 +474,7 @@ export type NativeStackNavigationOptions = {
|
|
|
470
474
|
*
|
|
471
475
|
* @platform ios
|
|
472
476
|
*/
|
|
473
|
-
fullScreenGestureEnabled?: boolean;
|
|
477
|
+
fullScreenGestureEnabled?: boolean | undefined;
|
|
474
478
|
/**
|
|
475
479
|
* iOS 18 and below. Controls whether the full screen dismiss gesture has shadow under view during transition.
|
|
476
480
|
* The gesture uses custom transition and thus doesn't have a shadow by default. When enabled, a custom shadow view
|
|
@@ -482,7 +486,7 @@ export type NativeStackNavigationOptions = {
|
|
|
482
486
|
*
|
|
483
487
|
* @platform ios
|
|
484
488
|
*/
|
|
485
|
-
fullScreenGestureShadowEnabled?: boolean;
|
|
489
|
+
fullScreenGestureShadowEnabled?: boolean | undefined;
|
|
486
490
|
/**
|
|
487
491
|
* Whether you can use gestures to dismiss this screen. Defaults to `true`.
|
|
488
492
|
*
|
|
@@ -490,13 +494,13 @@ export type NativeStackNavigationOptions = {
|
|
|
490
494
|
*
|
|
491
495
|
* @platform ios
|
|
492
496
|
*/
|
|
493
|
-
gestureEnabled?: boolean;
|
|
497
|
+
gestureEnabled?: boolean | undefined;
|
|
494
498
|
/**
|
|
495
499
|
* Use it to restrict the distance from the edges of screen in which the gesture should be recognized. To be used alongside `fullScreenGestureEnabled`.
|
|
496
500
|
*
|
|
497
501
|
* @platform ios
|
|
498
502
|
*/
|
|
499
|
-
gestureResponseDistance?: ScreenProps['gestureResponseDistance'];
|
|
503
|
+
gestureResponseDistance?: ScreenProps['gestureResponseDistance'] | undefined;
|
|
500
504
|
/**
|
|
501
505
|
* The type of animation to use when this screen replaces another screen. Defaults to `pop`.
|
|
502
506
|
*
|
|
@@ -506,7 +510,7 @@ export type NativeStackNavigationOptions = {
|
|
|
506
510
|
*
|
|
507
511
|
* Only supported on iOS and Android.
|
|
508
512
|
*/
|
|
509
|
-
animationTypeForReplace?: ScreenProps['replaceAnimation'];
|
|
513
|
+
animationTypeForReplace?: ScreenProps['replaceAnimation'] | undefined;
|
|
510
514
|
/**
|
|
511
515
|
* How the screen should animate when pushed or popped.
|
|
512
516
|
*
|
|
@@ -525,7 +529,7 @@ export type NativeStackNavigationOptions = {
|
|
|
525
529
|
*
|
|
526
530
|
* Only supported on iOS and Android.
|
|
527
531
|
*/
|
|
528
|
-
animation?: ScreenProps['stackAnimation'];
|
|
532
|
+
animation?: ScreenProps['stackAnimation'] | undefined;
|
|
529
533
|
/**
|
|
530
534
|
* Duration (in milliseconds) for the following transition animations on iOS:
|
|
531
535
|
* - `slide_from_bottom`
|
|
@@ -541,7 +545,7 @@ export type NativeStackNavigationOptions = {
|
|
|
541
545
|
*
|
|
542
546
|
* @platform ios
|
|
543
547
|
*/
|
|
544
|
-
animationDuration?: number;
|
|
548
|
+
animationDuration?: number | undefined;
|
|
545
549
|
/**
|
|
546
550
|
* How should the screen be presented.
|
|
547
551
|
*
|
|
@@ -557,7 +561,7 @@ export type NativeStackNavigationOptions = {
|
|
|
557
561
|
*
|
|
558
562
|
* Only supported on iOS and Android.
|
|
559
563
|
*/
|
|
560
|
-
presentation?: Exclude<ScreenProps['stackPresentation'], 'push'> | 'card';
|
|
564
|
+
presentation?: Exclude<ScreenProps['stackPresentation'], 'push'> | 'card' | undefined;
|
|
561
565
|
/**
|
|
562
566
|
* Describes heights where a sheet can rest.
|
|
563
567
|
* Works only when `presentation` is set to `formSheet`.
|
|
@@ -576,7 +580,7 @@ export type NativeStackNavigationOptions = {
|
|
|
576
580
|
*
|
|
577
581
|
* Defaults to `[1.0]`.
|
|
578
582
|
*/
|
|
579
|
-
sheetAllowedDetents?: number[] | 'fitToContents';
|
|
583
|
+
sheetAllowedDetents?: number[] | 'fitToContents' | undefined;
|
|
580
584
|
/**
|
|
581
585
|
* Integer value describing elevation of the sheet, impacting shadow on the top edge of the sheet.
|
|
582
586
|
*
|
|
@@ -586,7 +590,7 @@ export type NativeStackNavigationOptions = {
|
|
|
586
590
|
*
|
|
587
591
|
* @platform Android
|
|
588
592
|
*/
|
|
589
|
-
sheetElevation?: number;
|
|
593
|
+
sheetElevation?: number | undefined;
|
|
590
594
|
/**
|
|
591
595
|
* Whether the sheet should expand to larger detent when scrolling.
|
|
592
596
|
* Works only when `presentation` is set to `formSheet`.
|
|
@@ -594,7 +598,7 @@ export type NativeStackNavigationOptions = {
|
|
|
594
598
|
*
|
|
595
599
|
* @platform ios
|
|
596
600
|
*/
|
|
597
|
-
sheetExpandsWhenScrolledToEdge?: boolean;
|
|
601
|
+
sheetExpandsWhenScrolledToEdge?: boolean | undefined;
|
|
598
602
|
/**
|
|
599
603
|
* The corner radius that the sheet will try to render with.
|
|
600
604
|
* Works only when `presentation` is set to `formSheet`.
|
|
@@ -603,7 +607,7 @@ export type NativeStackNavigationOptions = {
|
|
|
603
607
|
*
|
|
604
608
|
* If left unset system default is used.
|
|
605
609
|
*/
|
|
606
|
-
sheetCornerRadius?: number;
|
|
610
|
+
sheetCornerRadius?: number | undefined;
|
|
607
611
|
/**
|
|
608
612
|
* Index of the detent the sheet should expand to after being opened.
|
|
609
613
|
* Works only when `stackPresentation` is set to `formSheet`.
|
|
@@ -615,7 +619,7 @@ export type NativeStackNavigationOptions = {
|
|
|
615
619
|
*
|
|
616
620
|
* Defaults to `0` - which represents first detent in the detents array.
|
|
617
621
|
*/
|
|
618
|
-
sheetInitialDetentIndex?: number | 'last';
|
|
622
|
+
sheetInitialDetentIndex?: number | 'last' | undefined;
|
|
619
623
|
/**
|
|
620
624
|
* Boolean indicating whether the sheet shows a grabber at the top.
|
|
621
625
|
* Works only when `presentation` is set to `formSheet`.
|
|
@@ -623,7 +627,7 @@ export type NativeStackNavigationOptions = {
|
|
|
623
627
|
*
|
|
624
628
|
* @platform ios
|
|
625
629
|
*/
|
|
626
|
-
sheetGrabberVisible?: boolean;
|
|
630
|
+
sheetGrabberVisible?: boolean | undefined;
|
|
627
631
|
/**
|
|
628
632
|
* The largest sheet detent for which a view underneath won't be dimmed.
|
|
629
633
|
* Works only when `presentation` is set to `formSheet`.
|
|
@@ -643,7 +647,7 @@ export type NativeStackNavigationOptions = {
|
|
|
643
647
|
*
|
|
644
648
|
* Defaults to `none`, indicating that the dimming view should be always present.
|
|
645
649
|
*/
|
|
646
|
-
sheetLargestUndimmedDetentIndex?: number | 'none' | 'last';
|
|
650
|
+
sheetLargestUndimmedDetentIndex?: number | 'none' | 'last' | undefined;
|
|
647
651
|
/**
|
|
648
652
|
* Whether the sheet content should be rendered behind the Status Bar or display cutouts.
|
|
649
653
|
*
|
|
@@ -659,7 +663,7 @@ export type NativeStackNavigationOptions = {
|
|
|
659
663
|
*
|
|
660
664
|
* @platform android
|
|
661
665
|
*/
|
|
662
|
-
sheetShouldOverflowTopInset?: boolean;
|
|
666
|
+
sheetShouldOverflowTopInset?: boolean | undefined;
|
|
663
667
|
/**
|
|
664
668
|
* Whether the default native animation should be used when the sheet's with
|
|
665
669
|
* `fitToContents` content size changes.
|
|
@@ -676,7 +680,7 @@ export type NativeStackNavigationOptions = {
|
|
|
676
680
|
*
|
|
677
681
|
* @platform android
|
|
678
682
|
*/
|
|
679
|
-
sheetResizeAnimationEnabled?: boolean;
|
|
683
|
+
sheetResizeAnimationEnabled?: boolean | undefined;
|
|
680
684
|
/**
|
|
681
685
|
* The display orientation to use for the screen.
|
|
682
686
|
*
|
|
@@ -692,15 +696,7 @@ export type NativeStackNavigationOptions = {
|
|
|
692
696
|
*
|
|
693
697
|
* Only supported on iOS and Android.
|
|
694
698
|
*/
|
|
695
|
-
orientation?: ScreenProps['screenOrientation'];
|
|
696
|
-
/**
|
|
697
|
-
* Whether inactive screens should be suspended from re-rendering. Defaults to `false`.
|
|
698
|
-
* Defaults to `true` when `enableFreeze()` is run at the top of the application.
|
|
699
|
-
* Requires `react-native-screens` version >=3.16.0.
|
|
700
|
-
*
|
|
701
|
-
* Only supported on iOS and Android.
|
|
702
|
-
*/
|
|
703
|
-
freezeOnBlur?: boolean;
|
|
699
|
+
orientation?: ScreenProps['screenOrientation'] | undefined;
|
|
704
700
|
/**
|
|
705
701
|
* Configures the scroll edge effect for the _content ScrollView_ (the ScrollView that is present in first descendants chain of the Screen).
|
|
706
702
|
* Depending on values set, it will blur the scrolling content below certain UI elements (header items, search bar)
|
|
@@ -725,11 +721,11 @@ export type NativeStackNavigationOptions = {
|
|
|
725
721
|
* @supported iOS 26 or higher
|
|
726
722
|
*/
|
|
727
723
|
scrollEdgeEffects?: {
|
|
728
|
-
bottom?: ScrollEdgeEffect;
|
|
729
|
-
left?: ScrollEdgeEffect;
|
|
730
|
-
right?: ScrollEdgeEffect;
|
|
731
|
-
top?: ScrollEdgeEffect;
|
|
732
|
-
};
|
|
724
|
+
bottom?: ScrollEdgeEffect | undefined;
|
|
725
|
+
left?: ScrollEdgeEffect | undefined;
|
|
726
|
+
right?: ScrollEdgeEffect | undefined;
|
|
727
|
+
top?: ScrollEdgeEffect | undefined;
|
|
728
|
+
} | undefined;
|
|
733
729
|
/**
|
|
734
730
|
* Footer component that can be used alongside formSheet stack presentation style.
|
|
735
731
|
*
|
|
@@ -742,24 +738,25 @@ export type NativeStackNavigationOptions = {
|
|
|
742
738
|
*
|
|
743
739
|
* @platform android
|
|
744
740
|
*/
|
|
745
|
-
unstable_sheetFooter?: () => React.ReactNode;
|
|
746
|
-
};
|
|
747
|
-
type PlatformIconShared = {
|
|
748
|
-
type: 'image';
|
|
749
|
-
source: ImageSourcePropType;
|
|
741
|
+
unstable_sheetFooter?: (() => React.ReactNode) | undefined;
|
|
750
742
|
/**
|
|
751
|
-
*
|
|
752
|
-
*
|
|
743
|
+
* What should happen when screens become inactive.
|
|
744
|
+
* - `pause`: Effects are cleaned up.
|
|
745
|
+
* - `unmount`: Screen is unmounted
|
|
746
|
+
* - `none`: Screen renders normally
|
|
753
747
|
*
|
|
754
|
-
*
|
|
748
|
+
* Defaults to `pause`.
|
|
749
|
+
*
|
|
750
|
+
* Preloaded screens won't be paused until after navigated to.
|
|
751
|
+
* This makes sure that effects are run to initialize the screen.
|
|
752
|
+
*
|
|
753
|
+
* Screens with nested navigators and last 2 screens won't be unmounted.
|
|
755
754
|
*/
|
|
756
|
-
|
|
755
|
+
inactiveBehavior?: 'pause' | 'unmount' | 'none' | undefined;
|
|
757
756
|
};
|
|
758
|
-
type
|
|
759
|
-
type: 'sfSymbol';
|
|
760
|
-
|
|
761
|
-
};
|
|
762
|
-
type PlatformIconIOS = PlatformIconIOSSfSymbol | PlatformIconShared;
|
|
757
|
+
type IconIOS = Extract<Icon, {
|
|
758
|
+
type: 'image' | 'sfSymbol';
|
|
759
|
+
}>;
|
|
763
760
|
type SharedHeaderItem = {
|
|
764
761
|
/**
|
|
765
762
|
* Label of the item.
|
|
@@ -769,59 +766,59 @@ type SharedHeaderItem = {
|
|
|
769
766
|
* Style for the item label.
|
|
770
767
|
*/
|
|
771
768
|
labelStyle?: {
|
|
772
|
-
fontFamily?: string;
|
|
773
|
-
fontSize?: number;
|
|
774
|
-
fontWeight?: string;
|
|
775
|
-
color?: ColorValue;
|
|
776
|
-
};
|
|
769
|
+
fontFamily?: string | undefined;
|
|
770
|
+
fontSize?: number | undefined;
|
|
771
|
+
fontWeight?: string | undefined;
|
|
772
|
+
color?: ColorValue | undefined;
|
|
773
|
+
} | undefined;
|
|
777
774
|
/**
|
|
778
775
|
* Icon for the item
|
|
779
776
|
*/
|
|
780
|
-
icon?:
|
|
777
|
+
icon?: IconIOS | undefined;
|
|
781
778
|
/**
|
|
782
779
|
* The variant of the item.
|
|
783
780
|
* "prominent" only available from iOS 26.0 and later.
|
|
784
781
|
*
|
|
785
782
|
* Read more: https://developer.apple.com/documentation/uikit/uibarbuttonitem/style-swift.property
|
|
786
783
|
*/
|
|
787
|
-
variant?: 'plain' | 'done' | 'prominent';
|
|
784
|
+
variant?: 'plain' | 'done' | 'prominent' | undefined;
|
|
788
785
|
/**
|
|
789
786
|
* The tint color to apply to the item.
|
|
790
787
|
*
|
|
791
788
|
* Read more: https://developer.apple.com/documentation/uikit/uibarbuttonitem/tintcolor
|
|
792
789
|
*/
|
|
793
|
-
tintColor?: ColorValue;
|
|
790
|
+
tintColor?: ColorValue | undefined;
|
|
794
791
|
/**
|
|
795
792
|
* Whether the item is in a disabled state.
|
|
796
793
|
*/
|
|
797
|
-
disabled?: boolean;
|
|
794
|
+
disabled?: boolean | undefined;
|
|
798
795
|
/**
|
|
799
796
|
* The width of the item.
|
|
800
797
|
*
|
|
801
798
|
* Read more: https://developer.apple.com/documentation/uikit/uibarbuttonitem/width
|
|
802
799
|
*/
|
|
803
|
-
width?: number;
|
|
800
|
+
width?: number | undefined;
|
|
804
801
|
/**
|
|
805
802
|
* Whether the background this item may share with other items in the bar should be hidden.
|
|
806
803
|
* Only available from iOS 26.0 and later.
|
|
807
804
|
*
|
|
808
805
|
* Read more: https://developer.apple.com/documentation/uikit/uibarbuttonitem/hidessharedbackground
|
|
809
806
|
*/
|
|
810
|
-
hidesSharedBackground?: boolean;
|
|
807
|
+
hidesSharedBackground?: boolean | undefined;
|
|
811
808
|
/**
|
|
812
809
|
* Whether this item can share a background with other items.
|
|
813
810
|
* Only available from iOS 26.0 and later.
|
|
814
811
|
*
|
|
815
812
|
* Read more: https://developer.apple.com/documentation/uikit/uibarbuttonitem/sharesbackground
|
|
816
813
|
*/
|
|
817
|
-
sharesBackground?: boolean;
|
|
814
|
+
sharesBackground?: boolean | undefined;
|
|
818
815
|
/**
|
|
819
816
|
* An identifier used to match items across transitions.
|
|
820
817
|
* Only available from iOS 26.0 and later.
|
|
821
818
|
*
|
|
822
819
|
* Read more: https://developer.apple.com/documentation/uikit/uibarbuttonitem/identifier
|
|
823
820
|
*/
|
|
824
|
-
identifier?: string;
|
|
821
|
+
identifier?: string | undefined;
|
|
825
822
|
/**
|
|
826
823
|
* A badge to display on a item.
|
|
827
824
|
* Only available from iOS 26.0 and later.
|
|
@@ -837,21 +834,21 @@ type SharedHeaderItem = {
|
|
|
837
834
|
* Style of the badge.
|
|
838
835
|
*/
|
|
839
836
|
style?: {
|
|
840
|
-
color?: ColorValue;
|
|
841
|
-
backgroundColor?: ColorValue;
|
|
842
|
-
fontFamily?: string;
|
|
843
|
-
fontSize?: number;
|
|
844
|
-
fontWeight?: string;
|
|
845
|
-
};
|
|
846
|
-
};
|
|
837
|
+
color?: ColorValue | undefined;
|
|
838
|
+
backgroundColor?: ColorValue | undefined;
|
|
839
|
+
fontFamily?: string | undefined;
|
|
840
|
+
fontSize?: number | undefined;
|
|
841
|
+
fontWeight?: string | undefined;
|
|
842
|
+
} | undefined;
|
|
843
|
+
} | undefined;
|
|
847
844
|
/**
|
|
848
845
|
* Accessibility label for the item.
|
|
849
846
|
*/
|
|
850
|
-
accessibilityLabel?: string;
|
|
847
|
+
accessibilityLabel?: string | undefined;
|
|
851
848
|
/**
|
|
852
849
|
* Accessibility hint for the item.
|
|
853
850
|
*/
|
|
854
|
-
accessibilityHint?: string;
|
|
851
|
+
accessibilityHint?: string | undefined;
|
|
855
852
|
};
|
|
856
853
|
/**
|
|
857
854
|
* A button item in the header.
|
|
@@ -870,7 +867,7 @@ export type NativeStackHeaderItemButton = SharedHeaderItem & {
|
|
|
870
867
|
*
|
|
871
868
|
* Read more: https://developer.apple.com/documentation/uikit/uibarbuttonitem/isselected
|
|
872
869
|
*/
|
|
873
|
-
selected?: boolean;
|
|
870
|
+
selected?: boolean | undefined;
|
|
874
871
|
};
|
|
875
872
|
/**
|
|
876
873
|
* An action item in a menu.
|
|
@@ -884,11 +881,11 @@ export type NativeStackHeaderItemMenuAction = {
|
|
|
884
881
|
/**
|
|
885
882
|
* The secondary text displayed alongside the label of the menu item.
|
|
886
883
|
*/
|
|
887
|
-
description?: string;
|
|
884
|
+
description?: string | undefined;
|
|
888
885
|
/**
|
|
889
886
|
* Icon for the menu item.
|
|
890
887
|
*/
|
|
891
|
-
icon?:
|
|
888
|
+
icon?: IconIOS | undefined;
|
|
892
889
|
/**
|
|
893
890
|
* Function to call when the menu item is pressed.
|
|
894
891
|
*/
|
|
@@ -898,31 +895,31 @@ export type NativeStackHeaderItemMenuAction = {
|
|
|
898
895
|
*
|
|
899
896
|
* Read more: https://developer.apple.com/documentation/uikit/uimenuelement/state
|
|
900
897
|
*/
|
|
901
|
-
state?: 'on' | 'off' | 'mixed';
|
|
898
|
+
state?: 'on' | 'off' | 'mixed' | undefined;
|
|
902
899
|
/**
|
|
903
900
|
* Whether to apply disabled style to the item.
|
|
904
901
|
*
|
|
905
902
|
* Read more: https://developer.apple.com/documentation/uikit/uimenuelement/attributes/disabled
|
|
906
903
|
*/
|
|
907
|
-
disabled?: boolean;
|
|
904
|
+
disabled?: boolean | undefined;
|
|
908
905
|
/**
|
|
909
906
|
* Whether to apply destructive style to the item.
|
|
910
907
|
*
|
|
911
908
|
* Read more: https://developer.apple.com/documentation/uikit/uimenuelement/attributes/destructive
|
|
912
909
|
*/
|
|
913
|
-
destructive?: boolean;
|
|
910
|
+
destructive?: boolean | undefined;
|
|
914
911
|
/**
|
|
915
912
|
* Whether to apply hidden style to the item.
|
|
916
913
|
*
|
|
917
914
|
* Read more: https://developer.apple.com/documentation/uikit/uimenuelement/attributes/hidden
|
|
918
915
|
*/
|
|
919
|
-
hidden?: boolean;
|
|
916
|
+
hidden?: boolean | undefined;
|
|
920
917
|
/**
|
|
921
|
-
* Whether to keep the menu presented after firing the element
|
|
918
|
+
* Whether to keep the menu presented after firing the element's action.
|
|
922
919
|
*
|
|
923
920
|
* Read more: https://developer.apple.com/documentation/uikit/uimenuelement/attributes/keepsmenupresented
|
|
924
921
|
*/
|
|
925
|
-
keepsMenuPresented?: boolean;
|
|
922
|
+
keepsMenuPresented?: boolean | undefined;
|
|
926
923
|
/**
|
|
927
924
|
* An elaborated title that explains the purpose of the action.
|
|
928
925
|
*
|
|
@@ -931,7 +928,7 @@ export type NativeStackHeaderItemMenuAction = {
|
|
|
931
928
|
*
|
|
932
929
|
* Read more: https://developer.apple.com/documentation/uikit/uiaction/discoverabilitytitle
|
|
933
930
|
*/
|
|
934
|
-
discoverabilityLabel?: string;
|
|
931
|
+
discoverabilityLabel?: string | undefined;
|
|
935
932
|
};
|
|
936
933
|
/**
|
|
937
934
|
* A submenu item that contains other menu items.
|
|
@@ -945,7 +942,7 @@ export type NativeStackHeaderItemMenuSubmenu = {
|
|
|
945
942
|
/**
|
|
946
943
|
* Icon for the submenu item.
|
|
947
944
|
*/
|
|
948
|
-
icon?:
|
|
945
|
+
icon?: IconIOS | undefined;
|
|
949
946
|
/**
|
|
950
947
|
* Whether the menu is displayed inline with the parent menu.
|
|
951
948
|
* By default, submenus are displayed after expanding the parent menu item.
|
|
@@ -955,7 +952,7 @@ export type NativeStackHeaderItemMenuSubmenu = {
|
|
|
955
952
|
*
|
|
956
953
|
* Read more: https://developer.apple.com/documentation/uikit/uimenu/options-swift.struct/displayinline
|
|
957
954
|
*/
|
|
958
|
-
inline?: boolean;
|
|
955
|
+
inline?: boolean | undefined;
|
|
959
956
|
/**
|
|
960
957
|
* How the submenu items are displayed.
|
|
961
958
|
* - `default`: menu items are displayed normally.
|
|
@@ -965,13 +962,13 @@ export type NativeStackHeaderItemMenuSubmenu = {
|
|
|
965
962
|
*
|
|
966
963
|
* Read more: https://developer.apple.com/documentation/uikit/uimenu/options-swift.struct/displayaspalette
|
|
967
964
|
*/
|
|
968
|
-
layout?: 'default' | 'palette';
|
|
965
|
+
layout?: 'default' | 'palette' | undefined;
|
|
969
966
|
/**
|
|
970
967
|
* Whether to apply destructive style to the menu item.
|
|
971
968
|
*
|
|
972
969
|
* Read more: https://developer.apple.com/documentation/uikit/uimenuelement/attributes/destructive
|
|
973
970
|
*/
|
|
974
|
-
destructive?: boolean;
|
|
971
|
+
destructive?: boolean | undefined;
|
|
975
972
|
/**
|
|
976
973
|
* Whether multiple items in the submenu can be selected, i.e. in "on" state.
|
|
977
974
|
*
|
|
@@ -979,7 +976,7 @@ export type NativeStackHeaderItemMenuSubmenu = {
|
|
|
979
976
|
*
|
|
980
977
|
* Read more: https://developer.apple.com/documentation/uikit/uimenu/options-swift.struct/singleselection
|
|
981
978
|
*/
|
|
982
|
-
multiselectable?: boolean;
|
|
979
|
+
multiselectable?: boolean | undefined;
|
|
983
980
|
/**
|
|
984
981
|
* Array of menu items (actions or submenus).
|
|
985
982
|
*/
|
|
@@ -996,7 +993,7 @@ export type NativeStackHeaderItemMenu = SharedHeaderItem & {
|
|
|
996
993
|
*
|
|
997
994
|
* Read more: https://developer.apple.com/documentation/uikit/uibarbuttonitem/changesselectionasprimaryaction
|
|
998
995
|
*/
|
|
999
|
-
changesSelectionAsPrimaryAction?: boolean;
|
|
996
|
+
changesSelectionAsPrimaryAction?: boolean | undefined;
|
|
1000
997
|
/**
|
|
1001
998
|
* Menu for the item.
|
|
1002
999
|
*/
|
|
@@ -1004,7 +1001,7 @@ export type NativeStackHeaderItemMenu = SharedHeaderItem & {
|
|
|
1004
1001
|
/**
|
|
1005
1002
|
* Optional title to show on top of the menu.
|
|
1006
1003
|
*/
|
|
1007
|
-
title?: string;
|
|
1004
|
+
title?: string | undefined;
|
|
1008
1005
|
/**
|
|
1009
1006
|
* Whether multiple items in the submenu can be selected, i.e. in "on" state.
|
|
1010
1007
|
*
|
|
@@ -1012,7 +1009,7 @@ export type NativeStackHeaderItemMenu = SharedHeaderItem & {
|
|
|
1012
1009
|
*
|
|
1013
1010
|
* Read more: https://developer.apple.com/documentation/uikit/uimenu/options-swift.struct/singleselection
|
|
1014
1011
|
*/
|
|
1015
|
-
multiselectable?: boolean;
|
|
1012
|
+
multiselectable?: boolean | undefined;
|
|
1016
1013
|
/**
|
|
1017
1014
|
* How the submenu items are displayed.
|
|
1018
1015
|
* - `default`: menu items are displayed normally.
|
|
@@ -1022,7 +1019,7 @@ export type NativeStackHeaderItemMenu = SharedHeaderItem & {
|
|
|
1022
1019
|
*
|
|
1023
1020
|
* Read more: https://developer.apple.com/documentation/uikit/uimenu/options-swift.struct/displayaspalette
|
|
1024
1021
|
*/
|
|
1025
|
-
layout?: 'default' | 'palette';
|
|
1022
|
+
layout?: 'default' | 'palette' | undefined;
|
|
1026
1023
|
/**
|
|
1027
1024
|
* Array of menu items (actions or submenus).
|
|
1028
1025
|
*/
|
|
@@ -1054,7 +1051,7 @@ export type NativeStackHeaderItemCustom = {
|
|
|
1054
1051
|
*
|
|
1055
1052
|
* Read more: https://developer.apple.com/documentation/uikit/uibarbuttonitem/hidessharedbackground
|
|
1056
1053
|
*/
|
|
1057
|
-
hidesSharedBackground?: boolean;
|
|
1054
|
+
hidesSharedBackground?: boolean | undefined;
|
|
1058
1055
|
};
|
|
1059
1056
|
/**
|
|
1060
1057
|
* An item that can be displayed in the header.
|