react-native-screens 3.23.0 → 3.24.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.
@@ -25,7 +25,7 @@
25
25
  #import "RNSUIBarButtonItem.h"
26
26
 
27
27
  #ifdef RCT_NEW_ARCH_ENABLED
28
- namespace rct = facebook::react;
28
+ namespace react = facebook::react;
29
29
  #endif // RCT_NEW_ARCH_ENABLED
30
30
 
31
31
  #ifndef RCT_NEW_ARCH_ENABLED
@@ -64,7 +64,7 @@ namespace rct = facebook::react;
64
64
  - (instancetype)initWithFrame:(CGRect)frame
65
65
  {
66
66
  if (self = [super initWithFrame:frame]) {
67
- static const auto defaultProps = std::make_shared<const rct::RNSScreenStackHeaderConfigProps>();
67
+ static const auto defaultProps = std::make_shared<const react::RNSScreenStackHeaderConfigProps>();
68
68
  _props = defaultProps;
69
69
  _show = YES;
70
70
  _translucent = NO;
@@ -315,7 +315,7 @@ namespace rct = facebook::react;
315
315
  scale:imageSource.scale
316
316
  #ifdef RCT_NEW_ARCH_ENABLED
317
317
  resizeMode:resizeModeFromCppEquiv(
318
- std::static_pointer_cast<const rct::ImageProps>(imageView.props)->resizeMode)];
318
+ std::static_pointer_cast<const react::ImageProps>(imageView.props)->resizeMode)];
319
319
  #else
320
320
  resizeMode:imageView.resizeMode];
321
321
  #endif // RCT_NEW_ARCH_ENABLED
@@ -704,18 +704,18 @@ namespace rct = facebook::react;
704
704
  [childComponentView removeFromSuperview];
705
705
  }
706
706
 
707
- static RCTResizeMode resizeModeFromCppEquiv(rct::ImageResizeMode resizeMode)
707
+ static RCTResizeMode resizeModeFromCppEquiv(react::ImageResizeMode resizeMode)
708
708
  {
709
709
  switch (resizeMode) {
710
- case rct::ImageResizeMode::Cover:
710
+ case react::ImageResizeMode::Cover:
711
711
  return RCTResizeModeCover;
712
- case rct::ImageResizeMode::Contain:
712
+ case react::ImageResizeMode::Contain:
713
713
  return RCTResizeModeContain;
714
- case rct::ImageResizeMode::Stretch:
714
+ case react::ImageResizeMode::Stretch:
715
715
  return RCTResizeModeStretch;
716
- case rct::ImageResizeMode::Center:
716
+ case react::ImageResizeMode::Center:
717
717
  return RCTResizeModeCenter;
718
- case rct::ImageResizeMode::Repeat:
718
+ case react::ImageResizeMode::Repeat:
719
719
  return RCTResizeModeRepeat;
720
720
  }
721
721
  }
@@ -726,8 +726,8 @@ static RCTResizeMode resizeModeFromCppEquiv(rct::ImageResizeMode resizeMode)
726
726
  */
727
727
  + (RCTImageSource *)imageSourceFromImageView:(RCTImageComponentView *)view
728
728
  {
729
- auto const imageProps = *std::static_pointer_cast<const rct::ImageProps>(view.props);
730
- rct::ImageSource cppImageSource = imageProps.sources.at(0);
729
+ auto const imageProps = *std::static_pointer_cast<const react::ImageProps>(view.props);
730
+ react::ImageSource cppImageSource = imageProps.sources.at(0);
731
731
  auto imageSize = CGSize{cppImageSource.size.width, cppImageSource.size.height};
732
732
  NSURLRequest *request =
733
733
  [NSURLRequest requestWithURL:[NSURL URLWithString:RCTNSStringFromStringNilIfEmpty(cppImageSource.uri)]];
@@ -745,9 +745,9 @@ static RCTResizeMode resizeModeFromCppEquiv(rct::ImageResizeMode resizeMode)
745
745
  _initialPropsSet = NO;
746
746
  }
747
747
 
748
- + (rct::ComponentDescriptorProvider)componentDescriptorProvider
748
+ + (react::ComponentDescriptorProvider)componentDescriptorProvider
749
749
  {
750
- return rct::concreteComponentDescriptorProvider<rct::RNSScreenStackHeaderConfigComponentDescriptor>();
750
+ return react::concreteComponentDescriptorProvider<react::RNSScreenStackHeaderConfigComponentDescriptor>();
751
751
  }
752
752
 
753
753
  - (NSNumber *)getFontSizePropValue:(int)value
@@ -757,20 +757,20 @@ static RCTResizeMode resizeModeFromCppEquiv(rct::ImageResizeMode resizeMode)
757
757
  return nil;
758
758
  }
759
759
 
760
- - (UISemanticContentAttribute)getDirectionPropValue:(rct::RNSScreenStackHeaderConfigDirection)direction
760
+ - (UISemanticContentAttribute)getDirectionPropValue:(react::RNSScreenStackHeaderConfigDirection)direction
761
761
  {
762
762
  switch (direction) {
763
- case rct::RNSScreenStackHeaderConfigDirection::Rtl:
763
+ case react::RNSScreenStackHeaderConfigDirection::Rtl:
764
764
  return UISemanticContentAttributeForceRightToLeft;
765
- case rct::RNSScreenStackHeaderConfigDirection::Ltr:
765
+ case react::RNSScreenStackHeaderConfigDirection::Ltr:
766
766
  return UISemanticContentAttributeForceLeftToRight;
767
767
  }
768
768
  }
769
769
 
770
- - (void)updateProps:(rct::Props::Shared const &)props oldProps:(rct::Props::Shared const &)oldProps
770
+ - (void)updateProps:(react::Props::Shared const &)props oldProps:(react::Props::Shared const &)oldProps
771
771
  {
772
- const auto &oldScreenProps = *std::static_pointer_cast<const rct::RNSScreenStackHeaderConfigProps>(_props);
773
- const auto &newScreenProps = *std::static_pointer_cast<const rct::RNSScreenStackHeaderConfigProps>(props);
772
+ const auto &oldScreenProps = *std::static_pointer_cast<const react::RNSScreenStackHeaderConfigProps>(_props);
773
+ const auto &newScreenProps = *std::static_pointer_cast<const react::RNSScreenStackHeaderConfigProps>(props);
774
774
 
775
775
  BOOL needsNavigationControllerLayout = !_initialPropsSet;
776
776
 
@@ -832,7 +832,7 @@ static RCTResizeMode resizeModeFromCppEquiv(rct::ImageResizeMode resizeMode)
832
832
  }
833
833
 
834
834
  _initialPropsSet = YES;
835
- _props = std::static_pointer_cast<rct::RNSScreenStackHeaderConfigProps const>(props);
835
+ _props = std::static_pointer_cast<react::RNSScreenStackHeaderConfigProps const>(props);
836
836
 
837
837
  [super updateProps:props oldProps:oldProps];
838
838
  }
@@ -8,7 +8,11 @@
8
8
 
9
9
  #import <React/RCTConversions.h>
10
10
  #import <React/RCTFabricComponentsPlugins.h>
11
- #endif
11
+ #endif // RCT_NEW_ARCH_ENABLED
12
+
13
+ #ifdef RCT_NEW_ARCH_ENABLED
14
+ namespace react = facebook::react;
15
+ #endif // RCT_NEW_ARCH_ENABLED
12
16
 
13
17
  @interface RCTBridge (Private)
14
18
  + (RCTBridge *)currentBridge;
@@ -25,7 +29,7 @@
25
29
  - (instancetype)initWithFrame:(CGRect)frame
26
30
  {
27
31
  if (self = [super initWithFrame:frame]) {
28
- static const auto defaultProps = std::make_shared<const facebook::react::RNSScreenStackHeaderSubviewProps>();
32
+ static const auto defaultProps = std::make_shared<const react::RNSScreenStackHeaderSubviewProps>();
29
33
  _props = defaultProps;
30
34
  }
31
35
 
@@ -39,24 +43,21 @@
39
43
  [super prepareForRecycle];
40
44
  }
41
45
 
42
- - (void)updateProps:(facebook::react::Props::Shared const &)props
43
- oldProps:(facebook::react::Props::Shared const &)oldProps
46
+ - (void)updateProps:(react::Props::Shared const &)props oldProps:(react::Props::Shared const &)oldProps
44
47
  {
45
- const auto &newHeaderSubviewProps =
46
- *std::static_pointer_cast<const facebook::react::RNSScreenStackHeaderSubviewProps>(props);
48
+ const auto &newHeaderSubviewProps = *std::static_pointer_cast<const react::RNSScreenStackHeaderSubviewProps>(props);
47
49
 
48
50
  [self setType:[RNSConvert RNSScreenStackHeaderSubviewTypeFromCppEquivalent:newHeaderSubviewProps.type]];
49
51
  [super updateProps:props oldProps:oldProps];
50
52
  }
51
53
 
52
- + (facebook::react::ComponentDescriptorProvider)componentDescriptorProvider
54
+ + (react::ComponentDescriptorProvider)componentDescriptorProvider
53
55
  {
54
- return facebook::react::concreteComponentDescriptorProvider<
55
- facebook::react::RNSScreenStackHeaderSubviewComponentDescriptor>();
56
+ return react::concreteComponentDescriptorProvider<react::RNSScreenStackHeaderSubviewComponentDescriptor>();
56
57
  }
57
58
 
58
- - (void)updateLayoutMetrics:(const facebook::react::LayoutMetrics &)layoutMetrics
59
- oldLayoutMetrics:(const facebook::react::LayoutMetrics &)oldLayoutMetrics
59
+ - (void)updateLayoutMetrics:(const react::LayoutMetrics &)layoutMetrics
60
+ oldLayoutMetrics:(const react::LayoutMetrics &)oldLayoutMetrics
60
61
  {
61
62
  CGRect frame = RCTCGRectFromRect(layoutMetrics.frame);
62
63
  // CALayer will crash if we pass NaN or Inf values.
@@ -21,8 +21,11 @@
21
21
  @property (nonatomic) RNSSearchBarPlacement placement;
22
22
  @property (nonatomic, retain) UISearchController *controller;
23
23
 
24
+ #if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && defined(__IPHONE_16_0) && \
25
+ __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_16_0 && !TARGET_OS_TV
24
26
  - (UINavigationItemSearchBarPlacement)placementAsUINavigationItemSearchBarPlacement API_AVAILABLE(ios(16.0))
25
27
  API_UNAVAILABLE(tvos, watchos);
28
+ #endif // Check for iOS >= 16 && !TARGET_OS_TV
26
29
 
27
30
  #ifdef RCT_NEW_ARCH_ENABLED
28
31
  #else
@@ -13,7 +13,11 @@
13
13
  #import <react/renderer/components/rnscreens/EventEmitters.h>
14
14
  #import <react/renderer/components/rnscreens/Props.h>
15
15
  #import "RNSConvert.h"
16
- #endif
16
+ #endif // RCT_NEW_ARCH_ENABLED
17
+
18
+ #ifdef RCT_NEW_ARCH_ENABLED
19
+ namespace react = facebook::react;
20
+ #endif // RCT_NEW_ARCH_ENABLED
17
21
 
18
22
  @implementation RNSSearchBar {
19
23
  __weak RCTBridge *_bridge;
@@ -36,7 +40,7 @@
36
40
  - (instancetype)init
37
41
  {
38
42
  if (self = [super init]) {
39
- static const auto defaultProps = std::make_shared<const facebook::react::RNSSearchBarProps>();
43
+ static const auto defaultProps = std::make_shared<const react::RNSSearchBarProps>();
40
44
  _props = defaultProps;
41
45
  [self initCommonProps];
42
46
  }
@@ -56,8 +60,8 @@
56
60
  {
57
61
  #ifdef RCT_NEW_ARCH_ENABLED
58
62
  if (_eventEmitter != nullptr) {
59
- std::dynamic_pointer_cast<const facebook::react::RNSSearchBarEventEmitter>(_eventEmitter)
60
- ->onFocus(facebook::react::RNSSearchBarEventEmitter::OnFocus{});
63
+ std::dynamic_pointer_cast<const react::RNSSearchBarEventEmitter>(_eventEmitter)
64
+ ->onFocus(react::RNSSearchBarEventEmitter::OnFocus{});
61
65
  }
62
66
  #else
63
67
  if (self.onFocus) {
@@ -70,8 +74,8 @@
70
74
  {
71
75
  #ifdef RCT_NEW_ARCH_ENABLED
72
76
  if (_eventEmitter != nullptr) {
73
- std::dynamic_pointer_cast<const facebook::react::RNSSearchBarEventEmitter>(_eventEmitter)
74
- ->onBlur(facebook::react::RNSSearchBarEventEmitter::OnBlur{});
77
+ std::dynamic_pointer_cast<const react::RNSSearchBarEventEmitter>(_eventEmitter)
78
+ ->onBlur(react::RNSSearchBarEventEmitter::OnBlur{});
75
79
  }
76
80
  #else
77
81
  if (self.onBlur) {
@@ -84,9 +88,9 @@
84
88
  {
85
89
  #ifdef RCT_NEW_ARCH_ENABLED
86
90
  if (_eventEmitter != nullptr) {
87
- std::dynamic_pointer_cast<const facebook::react::RNSSearchBarEventEmitter>(_eventEmitter)
91
+ std::dynamic_pointer_cast<const react::RNSSearchBarEventEmitter>(_eventEmitter)
88
92
  ->onSearchButtonPress(
89
- facebook::react::RNSSearchBarEventEmitter::OnSearchButtonPress{.text = RCTStringFromNSString(text)});
93
+ react::RNSSearchBarEventEmitter::OnSearchButtonPress{.text = RCTStringFromNSString(text)});
90
94
  }
91
95
  #else
92
96
  if (self.onSearchButtonPress) {
@@ -101,8 +105,8 @@
101
105
  {
102
106
  #ifdef RCT_NEW_ARCH_ENABLED
103
107
  if (_eventEmitter != nullptr) {
104
- std::dynamic_pointer_cast<const facebook::react::RNSSearchBarEventEmitter>(_eventEmitter)
105
- ->onCancelButtonPress(facebook::react::RNSSearchBarEventEmitter::OnCancelButtonPress{});
108
+ std::dynamic_pointer_cast<const react::RNSSearchBarEventEmitter>(_eventEmitter)
109
+ ->onCancelButtonPress(react::RNSSearchBarEventEmitter::OnCancelButtonPress{});
106
110
  }
107
111
  #else
108
112
  if (self.onCancelButtonPress) {
@@ -115,8 +119,8 @@
115
119
  {
116
120
  #ifdef RCT_NEW_ARCH_ENABLED
117
121
  if (_eventEmitter != nullptr) {
118
- std::dynamic_pointer_cast<const facebook::react::RNSSearchBarEventEmitter>(_eventEmitter)
119
- ->onChangeText(facebook::react::RNSSearchBarEventEmitter::OnChangeText{.text = RCTStringFromNSString(text)});
122
+ std::dynamic_pointer_cast<const react::RNSSearchBarEventEmitter>(_eventEmitter)
123
+ ->onChangeText(react::RNSSearchBarEventEmitter::OnChangeText{.text = RCTStringFromNSString(text)});
120
124
  }
121
125
  #else
122
126
  if (self.onChangeText) {
@@ -209,7 +213,10 @@
209
213
  #endif
210
214
  }
211
215
 
212
- - (UINavigationItemSearchBarPlacement)placementAsUINavigationItemSearchBarPlacement
216
+ #if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && defined(__IPHONE_16_0) && \
217
+ __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_16_0 && !TARGET_OS_TV
218
+ - (UINavigationItemSearchBarPlacement)placementAsUINavigationItemSearchBarPlacement API_AVAILABLE(ios(16.0))
219
+ API_UNAVAILABLE(tvos, watchos)
213
220
  {
214
221
  switch (_placement) {
215
222
  case RNSSearchBarPlacementStacked:
@@ -220,6 +227,7 @@
220
227
  return UINavigationItemSearchBarPlacementInline;
221
228
  }
222
229
  }
230
+ #endif // Check for iOS >= 16 && !TARGET_OS_TV
223
231
 
224
232
  #pragma mark delegate methods
225
233
 
@@ -299,11 +307,10 @@
299
307
  #pragma mark-- Fabric specific
300
308
 
301
309
  #ifdef RCT_NEW_ARCH_ENABLED
302
- - (void)updateProps:(facebook::react::Props::Shared const &)props
303
- oldProps:(facebook::react::Props::Shared const &)oldProps
310
+ - (void)updateProps:(react::Props::Shared const &)props oldProps:(react::Props::Shared const &)oldProps
304
311
  {
305
- const auto &oldScreenProps = *std::static_pointer_cast<const facebook::react::RNSSearchBarProps>(_props);
306
- const auto &newScreenProps = *std::static_pointer_cast<const facebook::react::RNSSearchBarProps>(props);
312
+ const auto &oldScreenProps = *std::static_pointer_cast<const react::RNSSearchBarProps>(_props);
313
+ const auto &newScreenProps = *std::static_pointer_cast<const react::RNSSearchBarProps>(props);
307
314
 
308
315
  [self setHideWhenScrolling:newScreenProps.hideWhenScrolling];
309
316
 
@@ -346,9 +353,9 @@
346
353
  [super updateProps:props oldProps:oldProps];
347
354
  }
348
355
 
349
- + (facebook::react::ComponentDescriptorProvider)componentDescriptorProvider
356
+ + (react::ComponentDescriptorProvider)componentDescriptorProvider
350
357
  {
351
- return facebook::react::concreteComponentDescriptorProvider<facebook::react::RNSSearchBarComponentDescriptor>();
358
+ return react::concreteComponentDescriptorProvider<react::RNSSearchBarComponentDescriptor>();
352
359
  }
353
360
 
354
361
  - (void)handleCommand:(const NSString *)commandName args:(const NSArray *)args
@@ -423,7 +430,7 @@ RCT_EXPORT_METHOD(clearText : (NSNumber *_Nonnull)reactTag)
423
430
  }];
424
431
  }
425
432
 
426
- RCT_EXPORT_METHOD(toggleCancelButton : (NSNumber *_Nonnull)reactTag flag : (BOOL *)flag)
433
+ RCT_EXPORT_METHOD(toggleCancelButton : (NSNumber *_Nonnull)reactTag flag : (BOOL)flag)
427
434
  {
428
435
  [self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *uiManager, NSDictionary *viewRegistry) {
429
436
  RNSSearchBar *searchBar = viewRegistry[reactTag];
@@ -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 } 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 * @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 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 +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} 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 * @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 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 +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 } 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 * @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 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":""}