@react-navigation/stack 8.0.0-alpha.6 → 8.0.0-alpha.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/module/TransitionConfigs/CardStyleInterpolators.js +280 -84
- package/lib/module/TransitionConfigs/CardStyleInterpolators.js.map +1 -1
- package/lib/module/TransitionConfigs/HeaderStyleInterpolators.js +11 -44
- package/lib/module/TransitionConfigs/HeaderStyleInterpolators.js.map +1 -1
- package/lib/module/TransitionConfigs/TransitionEasings.js +71 -0
- package/lib/module/TransitionConfigs/TransitionEasings.js.map +1 -0
- package/lib/module/TransitionConfigs/TransitionPresets.js +50 -10
- package/lib/module/TransitionConfigs/TransitionPresets.js.map +1 -1
- package/lib/module/TransitionConfigs/TransitionSpecs.js +69 -34
- package/lib/module/TransitionConfigs/TransitionSpecs.js.map +1 -1
- package/lib/module/index.js +2 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/navigators/createStackNavigator.js +37 -33
- package/lib/module/navigators/createStackNavigator.js.map +1 -1
- package/lib/module/utils/GestureHandlerContext.js +5 -0
- package/lib/module/utils/GestureHandlerContext.js.map +1 -0
- package/lib/module/utils/gestureActivationCriteria.js +10 -8
- package/lib/module/utils/gestureActivationCriteria.js.map +1 -1
- package/lib/module/utils/useCardAnimation.js +1 -1
- package/lib/module/utils/useCardAnimation.js.map +1 -1
- package/lib/module/utils/useGestureHandler.js +9 -0
- package/lib/module/utils/useGestureHandler.js.map +1 -0
- package/lib/module/utils/useKeyboardManager.js +71 -26
- package/lib/module/utils/useKeyboardManager.js.map +1 -1
- package/lib/module/views/GestureHandler.js +15 -14
- package/lib/module/views/GestureHandler.js.map +1 -1
- package/lib/module/views/GestureHandlerNative.js +16 -10
- package/lib/module/views/GestureHandlerNative.js.map +1 -1
- package/lib/module/views/Header/Header.js +4 -2
- package/lib/module/views/Header/Header.js.map +1 -1
- package/lib/module/views/Header/HeaderContainer.js +60 -21
- package/lib/module/views/Header/HeaderContainer.js.map +1 -1
- package/lib/module/views/Header/HeaderSegment.js +6 -9
- package/lib/module/views/Header/HeaderSegment.js.map +1 -1
- package/lib/module/views/Stack/Card.js +170 -123
- package/lib/module/views/Stack/Card.js.map +1 -1
- package/lib/module/views/Stack/CardContainer.js +96 -98
- package/lib/module/views/Stack/CardContainer.js.map +1 -1
- package/lib/module/views/Stack/CardContent.js +10 -37
- package/lib/module/views/Stack/CardContent.js.map +1 -1
- package/lib/module/views/Stack/CardStack.js +211 -147
- package/lib/module/views/Stack/CardStack.js.map +1 -1
- package/lib/module/views/Stack/StackView.js +106 -57
- package/lib/module/views/Stack/StackView.js.map +1 -1
- package/lib/typescript/src/TransitionConfigs/CardStyleInterpolators.d.ts +20 -12
- package/lib/typescript/src/TransitionConfigs/CardStyleInterpolators.d.ts.map +1 -1
- package/lib/typescript/src/TransitionConfigs/HeaderStyleInterpolators.d.ts +4 -4
- package/lib/typescript/src/TransitionConfigs/HeaderStyleInterpolators.d.ts.map +1 -1
- package/lib/typescript/src/TransitionConfigs/TransitionEasings.d.ts +38 -0
- package/lib/typescript/src/TransitionConfigs/TransitionEasings.d.ts.map +1 -0
- package/lib/typescript/src/TransitionConfigs/TransitionPresets.d.ts +15 -3
- package/lib/typescript/src/TransitionConfigs/TransitionPresets.d.ts.map +1 -1
- package/lib/typescript/src/TransitionConfigs/TransitionSpecs.d.ts +44 -15
- package/lib/typescript/src/TransitionConfigs/TransitionSpecs.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +12 -12
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/navigators/createStackNavigator.d.ts +10 -15
- package/lib/typescript/src/navigators/createStackNavigator.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +120 -108
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/lib/typescript/src/utils/CardAnimationContext.d.ts +1 -1
- package/lib/typescript/src/utils/CardAnimationContext.d.ts.map +1 -1
- package/lib/typescript/src/utils/GestureHandlerContext.d.ts +3 -0
- package/lib/typescript/src/utils/GestureHandlerContext.d.ts.map +1 -0
- package/lib/typescript/src/utils/gestureActivationCriteria.d.ts +4 -51
- package/lib/typescript/src/utils/gestureActivationCriteria.d.ts.map +1 -1
- package/lib/typescript/src/utils/getDistanceForDirection.d.ts +1 -1
- package/lib/typescript/src/utils/getDistanceForDirection.d.ts.map +1 -1
- package/lib/typescript/src/utils/getInvertedMultiplier.d.ts +1 -1
- package/lib/typescript/src/utils/getInvertedMultiplier.d.ts.map +1 -1
- package/lib/typescript/src/utils/getModalRoutesKeys.d.ts +1 -1
- package/lib/typescript/src/utils/getModalRoutesKeys.d.ts.map +1 -1
- package/lib/typescript/src/utils/getShadowStyle.d.ts +5 -5
- package/lib/typescript/src/utils/useCardAnimation.d.ts +1 -1
- package/lib/typescript/src/utils/useCardAnimation.d.ts.map +1 -1
- package/lib/typescript/src/utils/useGestureHandler.d.ts +2 -0
- package/lib/typescript/src/utils/useGestureHandler.d.ts.map +1 -0
- package/lib/typescript/src/utils/useKeyboardManager.d.ts +12 -2
- package/lib/typescript/src/utils/useKeyboardManager.d.ts.map +1 -1
- package/lib/typescript/src/views/GestureHandler.android.d.ts +1 -1
- package/lib/typescript/src/views/GestureHandler.android.d.ts.map +1 -1
- package/lib/typescript/src/views/GestureHandler.d.ts +7 -11
- package/lib/typescript/src/views/GestureHandler.d.ts.map +1 -1
- package/lib/typescript/src/views/GestureHandler.ios.d.ts +1 -1
- package/lib/typescript/src/views/GestureHandler.ios.d.ts.map +1 -1
- package/lib/typescript/src/views/GestureHandlerNative.d.ts +9 -4
- package/lib/typescript/src/views/GestureHandlerNative.d.ts.map +1 -1
- package/lib/typescript/src/views/Header/Header.d.ts +2 -2
- package/lib/typescript/src/views/Header/Header.d.ts.map +1 -1
- package/lib/typescript/src/views/Header/HeaderContainer.d.ts +9 -3
- package/lib/typescript/src/views/Header/HeaderContainer.d.ts.map +1 -1
- package/lib/typescript/src/views/Header/HeaderSegment.d.ts +6 -4
- package/lib/typescript/src/views/Header/HeaderSegment.d.ts.map +1 -1
- package/lib/typescript/src/views/Stack/Card.d.ts +14 -8
- package/lib/typescript/src/views/Stack/Card.d.ts.map +1 -1
- package/lib/typescript/src/views/Stack/CardContainer.d.ts +7 -7
- package/lib/typescript/src/views/Stack/CardContainer.d.ts.map +1 -1
- package/lib/typescript/src/views/Stack/CardContent.d.ts +1 -1
- package/lib/typescript/src/views/Stack/CardContent.d.ts.map +1 -1
- package/lib/typescript/src/views/Stack/CardStack.d.ts +10 -6
- package/lib/typescript/src/views/Stack/CardStack.d.ts.map +1 -1
- package/lib/typescript/src/views/Stack/StackView.d.ts +14 -17
- package/lib/typescript/src/views/Stack/StackView.d.ts.map +1 -1
- package/package.json +23 -24
- package/src/TransitionConfigs/CardStyleInterpolators.tsx +399 -100
- package/src/TransitionConfigs/HeaderStyleInterpolators.tsx +15 -46
- package/src/TransitionConfigs/TransitionEasings.tsx +90 -0
- package/src/TransitionConfigs/TransitionPresets.tsx +56 -10
- package/src/TransitionConfigs/TransitionSpecs.tsx +68 -34
- package/src/index.tsx +3 -2
- package/src/navigators/createStackNavigator.tsx +74 -91
- package/src/types.tsx +149 -123
- package/src/utils/GestureHandlerContext.tsx +5 -0
- package/src/utils/gestureActivationCriteria.tsx +14 -10
- package/src/utils/useCardAnimation.tsx +1 -1
- package/src/utils/useGestureHandler.tsx +9 -0
- package/src/utils/useKeyboardManager.tsx +96 -33
- package/src/views/GestureHandler.tsx +24 -16
- package/src/views/GestureHandlerNative.tsx +24 -13
- package/src/views/Header/Header.tsx +4 -2
- package/src/views/Header/HeaderContainer.tsx +79 -37
- package/src/views/Header/HeaderSegment.tsx +10 -11
- package/src/views/Stack/Card.tsx +241 -154
- package/src/views/Stack/CardContainer.tsx +111 -127
- package/src/views/Stack/CardContent.tsx +13 -51
- package/src/views/Stack/CardStack.tsx +478 -335
- package/src/views/Stack/StackView.tsx +181 -82
- package/lib/module/utils/GestureHandlerRefContext.js +0 -5
- package/lib/module/utils/GestureHandlerRefContext.js.map +0 -1
- package/lib/module/utils/findLastIndex.js +0 -11
- package/lib/module/utils/findLastIndex.js.map +0 -1
- package/lib/module/utils/useGestureHandlerRef.js +0 -12
- package/lib/module/utils/useGestureHandlerRef.js.map +0 -1
- package/lib/module/views/Stack/CardA11yWrapper.js +0 -43
- package/lib/module/views/Stack/CardA11yWrapper.js.map +0 -1
- package/lib/typescript/src/utils/GestureHandlerRefContext.d.ts +0 -3
- package/lib/typescript/src/utils/GestureHandlerRefContext.d.ts.map +0 -1
- package/lib/typescript/src/utils/findLastIndex.d.ts +0 -2
- package/lib/typescript/src/utils/findLastIndex.d.ts.map +0 -1
- package/lib/typescript/src/utils/useGestureHandlerRef.d.ts +0 -3
- package/lib/typescript/src/utils/useGestureHandlerRef.d.ts.map +0 -1
- package/lib/typescript/src/views/Stack/CardA11yWrapper.d.ts +0 -15
- package/lib/typescript/src/views/Stack/CardA11yWrapper.d.ts.map +0 -1
- package/src/utils/GestureHandlerRefContext.tsx +0 -5
- package/src/utils/findLastIndex.tsx +0 -9
- package/src/utils/useGestureHandlerRef.tsx +0 -15
- package/src/views/Stack/CardA11yWrapper.tsx +0 -67
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { DefaultNavigatorOptions, Descriptor,
|
|
1
|
+
import type { HeaderBackButtonDisplayMode, HeaderBackButtonProps, HeaderOptions, HeaderTitleProps, Icon } from '@react-navigation/elements';
|
|
2
|
+
import type { DefaultNavigatorOptions, Descriptor, NavigationHelpers, NavigationProp, ParamListBase, Route, RouteProp, StackActionHelpers, StackNavigationState, StackRouterOptions, Theme } from '@react-navigation/native';
|
|
3
3
|
import type * as React from 'react';
|
|
4
4
|
import type { Animated, ColorValue, StyleProp, TextStyle, ViewStyle } from 'react-native';
|
|
5
5
|
export type StackNavigationEventMap = {
|
|
@@ -38,7 +38,7 @@ export type StackNavigationEventMap = {
|
|
|
38
38
|
data: undefined;
|
|
39
39
|
};
|
|
40
40
|
};
|
|
41
|
-
export type StackNavigationHelpers = NavigationHelpers<ParamListBase, StackNavigationEventMap> & StackActionHelpers<ParamListBase>;
|
|
41
|
+
export type StackNavigationHelpers = NavigationHelpers<ParamListBase, StackNavigationState<ParamListBase>, StackNavigationEventMap> & StackActionHelpers<ParamListBase>;
|
|
42
42
|
export type StackNavigationProp<ParamList extends ParamListBase, RouteName extends keyof ParamList = keyof ParamList> = NavigationProp<ParamList, RouteName, StackNavigationState<ParamList>, StackNavigationOptions, StackNavigationEventMap, StackActionHelpers<ParamList>>;
|
|
43
43
|
export type StackScreenProps<ParamList extends ParamListBase, RouteName extends keyof ParamList = keyof ParamList> = {
|
|
44
44
|
navigation: StackNavigationProp<ParamList, RouteName>;
|
|
@@ -52,11 +52,12 @@ export type Layout = {
|
|
|
52
52
|
height: number;
|
|
53
53
|
};
|
|
54
54
|
export type GestureDirection = 'horizontal' | 'horizontal-inverted' | 'vertical' | 'vertical-inverted';
|
|
55
|
-
export type StackAnimationName = 'default' | 'fade' | 'fade_from_bottom' | 'fade_from_right' | 'none' | 'reveal_from_bottom' | 'scale_from_center' | 'slide_from_bottom' | 'slide_from_right' | 'slide_from_left';
|
|
55
|
+
export type StackAnimationName = 'default' | 'fade' | 'fade_from_bottom' | 'fade_from_right' | 'flip' | 'ios_from_left' | 'ios_from_right' | 'none' | 'reveal_from_bottom' | 'scale_from_center' | 'slide_from_bottom' | 'slide_from_right' | 'slide_from_left';
|
|
56
56
|
type SceneOptionsDefaults = TransitionPreset & {
|
|
57
57
|
animation: StackAnimationName;
|
|
58
58
|
gestureEnabled: boolean;
|
|
59
|
-
cardOverlayEnabled: boolean;
|
|
59
|
+
cardOverlayEnabled: boolean | undefined;
|
|
60
|
+
cardShadowEnabled: boolean | undefined;
|
|
60
61
|
headerMode: StackHeaderMode;
|
|
61
62
|
};
|
|
62
63
|
export type Scene = {
|
|
@@ -74,6 +75,10 @@ export type Scene = {
|
|
|
74
75
|
* Animated nodes representing the progress of the animation.
|
|
75
76
|
*/
|
|
76
77
|
progress: SceneProgress;
|
|
78
|
+
/**
|
|
79
|
+
* Animated node representing whether the screen is closing.
|
|
80
|
+
*/
|
|
81
|
+
closing: Animated.Value;
|
|
77
82
|
};
|
|
78
83
|
export type SceneProgress = {
|
|
79
84
|
/**
|
|
@@ -84,15 +89,14 @@ export type SceneProgress = {
|
|
|
84
89
|
* Progress value for the screen after this one in the stack.
|
|
85
90
|
* This can be `undefined` in case the screen animating is the last one.
|
|
86
91
|
*/
|
|
87
|
-
next?: Animated.AnimatedInterpolation<number
|
|
92
|
+
next?: Animated.AnimatedInterpolation<number> | undefined;
|
|
88
93
|
/**
|
|
89
94
|
* Progress value for the screen before this one in the stack.
|
|
90
95
|
* This can be `undefined` in case the screen animating is the first one.
|
|
91
96
|
*/
|
|
92
|
-
previous?: Animated.AnimatedInterpolation<number
|
|
97
|
+
previous?: Animated.AnimatedInterpolation<number> | undefined;
|
|
93
98
|
};
|
|
94
99
|
export type StackHeaderMode = 'float' | 'screen';
|
|
95
|
-
export type StackPresentationMode = 'card' | 'modal';
|
|
96
100
|
export type StackHeaderOptions = Omit<HeaderOptions, 'headerLeft' | 'headerTitle' | 'headerRight'> & {
|
|
97
101
|
/**
|
|
98
102
|
* String or a function that returns a React Element to be used by the header.
|
|
@@ -101,40 +105,40 @@ export type StackHeaderOptions = Omit<HeaderOptions, 'headerLeft' | 'headerTitle
|
|
|
101
105
|
* It receives `allowFontScaling`, `tintColor`, `style` and `children` in the options object as an argument.
|
|
102
106
|
* The title string is passed in `children`.
|
|
103
107
|
*/
|
|
104
|
-
headerTitle?: string | ((props: HeaderTitleProps) => React.ReactNode);
|
|
108
|
+
headerTitle?: string | ((props: HeaderTitleProps) => React.ReactNode) | undefined;
|
|
105
109
|
/**
|
|
106
110
|
* Function which returns a React Element to display on the left side of the header.
|
|
107
111
|
*/
|
|
108
|
-
headerLeft?: (props: StackHeaderLeftProps) => React.ReactNode;
|
|
112
|
+
headerLeft?: ((props: StackHeaderLeftProps) => React.ReactNode) | undefined;
|
|
109
113
|
/**
|
|
110
114
|
* Function which returns a React Element to display on the right side of the header.
|
|
111
115
|
*/
|
|
112
|
-
headerRight?: (props: StackHeaderRightProps) => React.ReactNode;
|
|
116
|
+
headerRight?: ((props: StackHeaderRightProps) => React.ReactNode) | undefined;
|
|
113
117
|
/**
|
|
114
118
|
* Whether back button title font should scale to respect Text Size accessibility settings. Defaults to `false`.
|
|
115
119
|
*/
|
|
116
|
-
headerBackAllowFontScaling?: boolean;
|
|
120
|
+
headerBackAllowFontScaling?: boolean | undefined;
|
|
117
121
|
/**
|
|
118
122
|
* Accessibility label for the header back button.
|
|
119
123
|
*/
|
|
120
|
-
headerBackAccessibilityLabel?: string;
|
|
124
|
+
headerBackAccessibilityLabel?: string | undefined;
|
|
121
125
|
/**
|
|
122
126
|
* ID to locate this back button in tests.
|
|
123
127
|
*/
|
|
124
|
-
headerBackTestID?: string;
|
|
128
|
+
headerBackTestID?: string | undefined;
|
|
125
129
|
/**
|
|
126
130
|
* Title string used by the back button on iOS.
|
|
127
131
|
* Defaults to the previous screen's title, or "Back" if there's not enough space.
|
|
128
132
|
* Use `headerBackButtonDisplayMode` to customize the behavior.
|
|
129
133
|
*/
|
|
130
|
-
headerBackTitle?: string;
|
|
134
|
+
headerBackTitle?: string | undefined;
|
|
131
135
|
/**
|
|
132
136
|
* Title string used by the back button when `headerBackTitle` doesn't fit on the screen.
|
|
133
137
|
* Use `headerBackButtonDisplayMode` to customize the behavior.
|
|
134
138
|
*
|
|
135
139
|
* Defaults to "Back".
|
|
136
140
|
*/
|
|
137
|
-
headerBackTruncatedTitle?: string;
|
|
141
|
+
headerBackTruncatedTitle?: string | undefined;
|
|
138
142
|
/**
|
|
139
143
|
* How the back button displays icon and title.
|
|
140
144
|
*
|
|
@@ -145,17 +149,35 @@ export type StackHeaderOptions = Omit<HeaderOptions, 'headerLeft' | 'headerTitle
|
|
|
145
149
|
*
|
|
146
150
|
* Defaults to "default" on iOS, and "minimal" on other platforms.
|
|
147
151
|
*/
|
|
148
|
-
headerBackButtonDisplayMode?: HeaderBackButtonDisplayMode;
|
|
152
|
+
headerBackButtonDisplayMode?: HeaderBackButtonDisplayMode | undefined;
|
|
149
153
|
/**
|
|
150
154
|
* Style object for the back title.
|
|
151
155
|
*/
|
|
152
156
|
headerBackTitleStyle?: StyleProp<TextStyle>;
|
|
153
157
|
/**
|
|
154
|
-
*
|
|
155
|
-
*
|
|
156
|
-
*
|
|
157
|
-
|
|
158
|
-
|
|
158
|
+
* Icon to display in the header in the back button.
|
|
159
|
+
*
|
|
160
|
+
* Supported types:
|
|
161
|
+
* - image: custom image source
|
|
162
|
+
* - sfSymbol: SF Symbol icon (iOS only)
|
|
163
|
+
* - materialSymbol: material symbol icon (Android only)
|
|
164
|
+
* - React Node: function that returns a React Element
|
|
165
|
+
*
|
|
166
|
+
* Defaults to back icon image for the platform
|
|
167
|
+
* - A chevron on iOS
|
|
168
|
+
* - An arrow on Android
|
|
169
|
+
*
|
|
170
|
+
* @example
|
|
171
|
+
* ```js
|
|
172
|
+
* headerBackIcon: {
|
|
173
|
+
* type: 'image',
|
|
174
|
+
* source: require('./back-icon.png'),
|
|
175
|
+
* }
|
|
176
|
+
* ```
|
|
177
|
+
*/
|
|
178
|
+
headerBackIcon?: Icon | ((props: {
|
|
179
|
+
tintColor: ColorValue | undefined;
|
|
180
|
+
}) => React.ReactNode) | undefined;
|
|
159
181
|
};
|
|
160
182
|
export type StackHeaderProps = {
|
|
161
183
|
/**
|
|
@@ -170,11 +192,15 @@ export type StackHeaderProps = {
|
|
|
170
192
|
* The `href` to use for the anchor tag on web
|
|
171
193
|
*/
|
|
172
194
|
href: string | undefined;
|
|
173
|
-
};
|
|
195
|
+
} | undefined;
|
|
174
196
|
/**
|
|
175
197
|
* Animated nodes representing the progress of the animation.
|
|
176
198
|
*/
|
|
177
199
|
progress: SceneProgress;
|
|
200
|
+
/**
|
|
201
|
+
* Direction multiplier for the transition.
|
|
202
|
+
*/
|
|
203
|
+
inverted: 1 | -1;
|
|
178
204
|
/**
|
|
179
205
|
* Options for the current screen.
|
|
180
206
|
*/
|
|
@@ -196,25 +222,25 @@ export type StackHeaderRightProps = {
|
|
|
196
222
|
/**
|
|
197
223
|
* Tint color for the header button.
|
|
198
224
|
*/
|
|
199
|
-
tintColor?: ColorValue;
|
|
225
|
+
tintColor?: ColorValue | undefined;
|
|
200
226
|
/**
|
|
201
227
|
* Color for material ripple (Android >= 5.0 only).
|
|
202
228
|
*/
|
|
203
|
-
pressColor?: ColorValue;
|
|
229
|
+
pressColor?: ColorValue | undefined;
|
|
204
230
|
/**
|
|
205
231
|
* Opacity when the button is pressed, used when ripple is not supported.
|
|
206
232
|
*/
|
|
207
|
-
pressOpacity?: number;
|
|
233
|
+
pressOpacity?: number | undefined;
|
|
208
234
|
/**
|
|
209
235
|
* Whether it's possible to navigate back in stack.
|
|
210
236
|
*/
|
|
211
|
-
canGoBack?: boolean;
|
|
237
|
+
canGoBack?: boolean | undefined;
|
|
212
238
|
};
|
|
213
239
|
export type StackHeaderLeftProps = HeaderBackButtonProps & {
|
|
214
240
|
/**
|
|
215
241
|
* Whether it's possible to navigate back in stack.
|
|
216
242
|
*/
|
|
217
|
-
canGoBack?: boolean;
|
|
243
|
+
canGoBack?: boolean | undefined;
|
|
218
244
|
};
|
|
219
245
|
export type StackDescriptor = Descriptor<StackNavigationOptions, StackNavigationProp<ParamListBase>, RouteProp<ParamListBase>>;
|
|
220
246
|
export type StackDescriptorMap = Record<string, StackDescriptor>;
|
|
@@ -222,48 +248,43 @@ export type StackNavigationOptions = StackHeaderOptions & Partial<TransitionPres
|
|
|
222
248
|
/**
|
|
223
249
|
* String that can be displayed in the header as a fallback for `headerTitle`.
|
|
224
250
|
*/
|
|
225
|
-
title?: string;
|
|
251
|
+
title?: string | undefined;
|
|
226
252
|
/**
|
|
227
253
|
* Function that given `HeaderProps` returns a React Element to display as a header.
|
|
228
254
|
*/
|
|
229
|
-
header?: (props: StackHeaderProps) => React.ReactNode;
|
|
255
|
+
header?: ((props: StackHeaderProps) => React.ReactNode) | undefined;
|
|
230
256
|
/**
|
|
231
257
|
* Whether the header floats above the screen or part of the screen.
|
|
232
|
-
* Defaults to `float` on iOS for
|
|
258
|
+
* Defaults to `float` on iOS for animations where the header transitions
|
|
259
|
+
* separately, and `screen` otherwise.
|
|
233
260
|
*/
|
|
234
|
-
headerMode?: StackHeaderMode;
|
|
261
|
+
headerMode?: StackHeaderMode | undefined;
|
|
235
262
|
/**
|
|
236
263
|
* Whether to show the header. The header is shown by default.
|
|
237
264
|
* Setting this to `false` hides the header.
|
|
238
265
|
*/
|
|
239
|
-
headerShown?: boolean;
|
|
266
|
+
headerShown?: boolean | undefined;
|
|
240
267
|
/**
|
|
241
|
-
* Whether a shadow is visible for the card during transitions.
|
|
268
|
+
* Whether a shadow is visible for the card during transitions.
|
|
269
|
+
* Defaults to whether `cardStyleInterpolator` returns a `shadowStyle`.
|
|
270
|
+
* Setting this overrides the default behavior.
|
|
242
271
|
*/
|
|
243
|
-
cardShadowEnabled?: boolean;
|
|
272
|
+
cardShadowEnabled?: boolean | undefined;
|
|
244
273
|
/**
|
|
245
274
|
* Whether to have a semi-transparent dark overlay visible under the card during transitions.
|
|
246
|
-
* Defaults to `
|
|
275
|
+
* Defaults to whether `cardStyleInterpolator` returns an `overlayStyle`.
|
|
276
|
+
* Setting this overrides the default behavior.
|
|
247
277
|
*/
|
|
248
|
-
cardOverlayEnabled?: boolean;
|
|
278
|
+
cardOverlayEnabled?: boolean | undefined;
|
|
249
279
|
/**
|
|
250
280
|
* Function that returns a React Element to display as a overlay for the card.
|
|
251
281
|
*/
|
|
252
|
-
cardOverlay?: (props: {
|
|
282
|
+
cardOverlay?: ((props: {
|
|
253
283
|
style: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;
|
|
254
|
-
}) => React.ReactNode;
|
|
284
|
+
}) => React.ReactNode) | undefined;
|
|
255
285
|
/**
|
|
256
286
|
* Style object for the card in stack.
|
|
257
287
|
* You can provide a custom background color to use instead of the default background here.
|
|
258
|
-
*
|
|
259
|
-
* You can also specify `{ backgroundColor: 'transparent' }` to make the previous screen visible underneath.
|
|
260
|
-
* This is useful to implement things like modal dialogs.
|
|
261
|
-
*
|
|
262
|
-
* You should also specify `detachPreviousScreen: false` in options when using a transparent background
|
|
263
|
-
* so that the previous screen isn't detached and stays below the current screen.
|
|
264
|
-
*
|
|
265
|
-
* You might also need to change the animation of the screen using `cardStyleInterpolator`
|
|
266
|
-
* so that the previous screen isn't transformed or invisible.
|
|
267
288
|
*/
|
|
268
289
|
cardStyle?: StyleProp<ViewStyle>;
|
|
269
290
|
/**
|
|
@@ -277,119 +298,106 @@ export type StackNavigationOptions = StackHeaderOptions & Partial<TransitionPres
|
|
|
277
298
|
* - `transparentModal`: Similar to `modal`. This changes following things:
|
|
278
299
|
* - Sets `headerMode` to `screen` for the screen unless specified otherwise.
|
|
279
300
|
* - Sets background color of the screen to transparent, so previous screen is visible
|
|
280
|
-
* - Adjusts the `detachPreviousScreen` option so that the previous screen stays rendered.
|
|
281
301
|
* - Prevents the previous screen from animating from its last position.
|
|
282
302
|
* - Changes the screen animation to a vertical slide animation.
|
|
283
303
|
*
|
|
284
304
|
* Defaults to 'card'.
|
|
285
305
|
*/
|
|
286
|
-
presentation?: 'card' | 'modal' | 'transparentModal';
|
|
306
|
+
presentation?: 'card' | 'modal' | 'transparentModal' | undefined;
|
|
287
307
|
/**
|
|
288
308
|
* How the screen should animate when pushed or popped.
|
|
289
309
|
*
|
|
290
310
|
* Supported values:
|
|
291
311
|
* - 'none': don't animate the screen
|
|
292
312
|
* - 'default': use the platform default animation
|
|
293
|
-
* - 'fade': fade
|
|
313
|
+
* - 'fade': fade between screens
|
|
294
314
|
* - 'fade_from_bottom': fade screen in or out from bottom
|
|
315
|
+
* - 'fade_from_right': fade screen in from the right
|
|
316
|
+
* - 'flip': flip the screen horizontally
|
|
317
|
+
* - 'ios_from_left': use the iOS-style slide from left
|
|
318
|
+
* - 'ios_from_right': use the iOS-style slide from right
|
|
295
319
|
* - 'slide_from_bottom': slide in the new screen from bottom
|
|
296
320
|
* - 'slide_from_right': slide in the new screen from right
|
|
297
321
|
* - 'slide_from_left': slide in the new screen from left
|
|
298
322
|
* - 'reveal_from_bottom': reveal screen in from bottom to top
|
|
299
323
|
* - 'scale_from_center': scale screen in from center
|
|
300
324
|
*/
|
|
301
|
-
animation?: StackAnimationName;
|
|
325
|
+
animation?: StackAnimationName | undefined;
|
|
302
326
|
/**
|
|
303
327
|
* The type of animation to use when this screen replaces another screen. Defaults to `push`.
|
|
304
328
|
* When `pop` is used, the `pop` animation is applied to the screen being replaced.
|
|
305
329
|
*/
|
|
306
|
-
animationTypeForReplace?: 'push' | 'pop';
|
|
330
|
+
animationTypeForReplace?: 'push' | 'pop' | undefined;
|
|
307
331
|
/**
|
|
308
|
-
* Whether you can use gestures to dismiss this screen. Defaults to `true`
|
|
332
|
+
* Whether you can use gestures to dismiss this screen. Defaults to `true`
|
|
333
|
+
* on iOS for navigation-style transitions with an interactive dismissal,
|
|
334
|
+
* and `false` otherwise.
|
|
309
335
|
* Not supported on Web.
|
|
310
336
|
*/
|
|
311
|
-
gestureEnabled?: boolean;
|
|
337
|
+
gestureEnabled?: boolean | undefined;
|
|
312
338
|
/**
|
|
313
339
|
* Distance of touch start from the edge of the screen to recognize gestures.
|
|
314
340
|
* Not supported on Web.
|
|
315
341
|
*/
|
|
316
|
-
gestureResponseDistance?: number;
|
|
342
|
+
gestureResponseDistance?: number | undefined;
|
|
317
343
|
/**
|
|
318
344
|
* Number which determines the relevance of velocity for the gesture. Defaults to 0.3.
|
|
319
345
|
* Not supported on Web.
|
|
320
346
|
*/
|
|
321
|
-
gestureVelocityImpact?: number;
|
|
322
|
-
/**
|
|
323
|
-
* Whether to detach the previous screen from the view hierarchy to save memory.
|
|
324
|
-
* Set it to `false` if you need the previous screen to be seen through the active screen.
|
|
325
|
-
* Only applicable if `detachInactiveScreens` isn't set to `false`.
|
|
326
|
-
* Defaults to `false` for the last screen for modals, otherwise `true`.
|
|
327
|
-
*/
|
|
328
|
-
detachPreviousScreen?: boolean;
|
|
347
|
+
gestureVelocityImpact?: number | undefined;
|
|
329
348
|
/**
|
|
330
349
|
* If `false`, the keyboard will NOT automatically dismiss when navigating to a new screen from this screen.
|
|
331
350
|
* Defaults to `true`.
|
|
332
351
|
*/
|
|
333
|
-
keyboardHandlingEnabled?: boolean;
|
|
352
|
+
keyboardHandlingEnabled?: boolean | undefined;
|
|
334
353
|
/**
|
|
335
|
-
*
|
|
336
|
-
*
|
|
337
|
-
*
|
|
354
|
+
* What should happen when screens become inactive.
|
|
355
|
+
* - `pause`: Effects are cleaned up
|
|
356
|
+
* - `unmount`: Screen is unmounted
|
|
357
|
+
* - `none`: Screen renders normally
|
|
338
358
|
*
|
|
339
|
-
*
|
|
340
|
-
*/
|
|
341
|
-
freezeOnBlur?: boolean;
|
|
342
|
-
/**
|
|
343
|
-
* Whether the home indicator should prefer to stay hidden on this screen. Defaults to `false`.
|
|
359
|
+
* Defaults to `pause`.
|
|
344
360
|
*
|
|
345
|
-
*
|
|
346
|
-
|
|
347
|
-
autoHideHomeIndicator?: boolean;
|
|
348
|
-
};
|
|
349
|
-
export type StackNavigationConfig = {
|
|
350
|
-
/**
|
|
351
|
-
* Whether inactive screens should be detached from the view hierarchy to save memory.
|
|
352
|
-
* This will have no effect if you disable `react-native-screens`.
|
|
361
|
+
* Preloaded screens won't be paused until after navigated to.
|
|
362
|
+
* This makes sure that effects are run to initialize the screen.
|
|
353
363
|
*
|
|
354
|
-
*
|
|
364
|
+
* Screens with nested navigators and last 2 screens won't be unmounted.
|
|
355
365
|
*/
|
|
356
|
-
|
|
366
|
+
inactiveBehavior?: 'pause' | 'unmount' | 'none' | undefined;
|
|
357
367
|
};
|
|
368
|
+
export type StackNavigationConfig = {};
|
|
358
369
|
export type TransitionSpec = {
|
|
359
370
|
animation: 'spring';
|
|
360
|
-
config: Omit<Animated.SpringAnimationConfig, 'toValue' |
|
|
371
|
+
config: Omit<Animated.SpringAnimationConfig, 'toValue' | 'useNativeDriver' | 'isInteraction' | 'velocity'>;
|
|
361
372
|
} | {
|
|
362
373
|
animation: 'timing';
|
|
363
|
-
config: Omit<Animated.TimingAnimationConfig, 'toValue' |
|
|
374
|
+
config: Omit<Animated.TimingAnimationConfig, 'toValue' | 'useNativeDriver' | 'isInteraction'>;
|
|
375
|
+
};
|
|
376
|
+
type StackCardInterpolationState = {
|
|
377
|
+
/**
|
|
378
|
+
* Animated node representing the progress value of the screen.
|
|
379
|
+
*/
|
|
380
|
+
progress: Animated.AnimatedInterpolation<number>;
|
|
381
|
+
/**
|
|
382
|
+
* Animated node representing whether the screen is using the closing or
|
|
383
|
+
* opening animation (1 - closing, 0 - opening).
|
|
384
|
+
*/
|
|
385
|
+
closing: Animated.AnimatedInterpolation<0 | 1>;
|
|
364
386
|
};
|
|
365
387
|
export type StackCardInterpolationProps = {
|
|
366
388
|
/**
|
|
367
389
|
* Values for the current screen.
|
|
368
390
|
*/
|
|
369
|
-
current:
|
|
370
|
-
/**
|
|
371
|
-
* Animated node representing the progress value of the current screen.
|
|
372
|
-
*/
|
|
373
|
-
progress: Animated.AnimatedInterpolation<number>;
|
|
374
|
-
};
|
|
391
|
+
current: StackCardInterpolationState;
|
|
375
392
|
/**
|
|
376
393
|
* Values for the screen after this one in the stack.
|
|
377
394
|
* This can be `undefined` in case the screen animating is the last one.
|
|
378
395
|
*/
|
|
379
|
-
next?:
|
|
380
|
-
/**
|
|
381
|
-
* Animated node representing the progress value of the next screen.
|
|
382
|
-
*/
|
|
383
|
-
progress: Animated.AnimatedInterpolation<number>;
|
|
384
|
-
};
|
|
396
|
+
next?: StackCardInterpolationState | undefined;
|
|
385
397
|
/**
|
|
386
398
|
* The index of the card with this interpolation in the stack.
|
|
387
399
|
*/
|
|
388
400
|
index: number;
|
|
389
|
-
/**
|
|
390
|
-
* Animated node representing whether the card is closing (1 - closing, 0 - not closing).
|
|
391
|
-
*/
|
|
392
|
-
closing: Animated.AnimatedInterpolation<0 | 1>;
|
|
393
401
|
/**
|
|
394
402
|
* Animated node representing whether the card is being swiped (1 - swiping, 0 - not swiping).
|
|
395
403
|
*/
|
|
@@ -430,6 +438,10 @@ export type StackCardInterpolatedStyle = {
|
|
|
430
438
|
* Interpolated style for the view representing the semi-transparent overlay below the card.
|
|
431
439
|
*/
|
|
432
440
|
overlayStyle?: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;
|
|
441
|
+
/**
|
|
442
|
+
* Interpolated style for dim on top of the card content.
|
|
443
|
+
*/
|
|
444
|
+
dimStyle?: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;
|
|
433
445
|
/**
|
|
434
446
|
* Interpolated style representing the card shadow.
|
|
435
447
|
*/
|
|
@@ -455,11 +467,11 @@ export type StackHeaderInterpolationProps = {
|
|
|
455
467
|
* Animated node representing the progress value of the next screen.
|
|
456
468
|
*/
|
|
457
469
|
progress: Animated.AnimatedInterpolation<number>;
|
|
458
|
-
};
|
|
470
|
+
} | undefined;
|
|
459
471
|
/**
|
|
460
|
-
*
|
|
472
|
+
* Direction multiplier for the transition.
|
|
461
473
|
*/
|
|
462
|
-
|
|
474
|
+
inverted: 1 | -1;
|
|
463
475
|
/**
|
|
464
476
|
* Layout measurements for various items we use for animation.
|
|
465
477
|
*/
|
|
@@ -478,19 +490,19 @@ export type StackHeaderInterpolatedStyle = {
|
|
|
478
490
|
/**
|
|
479
491
|
* Interpolated style for the left button (usually the back button).
|
|
480
492
|
*/
|
|
481
|
-
leftButtonStyle?: Animated.WithAnimatedValue<ViewStyle
|
|
493
|
+
leftButtonStyle?: Animated.WithAnimatedValue<ViewStyle> | undefined;
|
|
482
494
|
/**
|
|
483
495
|
* Interpolated style for the right button.
|
|
484
496
|
*/
|
|
485
|
-
rightButtonStyle?: Animated.WithAnimatedValue<ViewStyle
|
|
497
|
+
rightButtonStyle?: Animated.WithAnimatedValue<ViewStyle> | undefined;
|
|
486
498
|
/**
|
|
487
499
|
* Interpolated style for the header title text.
|
|
488
500
|
*/
|
|
489
|
-
titleStyle?: Animated.WithAnimatedValue<TextStyle
|
|
501
|
+
titleStyle?: Animated.WithAnimatedValue<TextStyle> | undefined;
|
|
490
502
|
/**
|
|
491
503
|
* Interpolated style for the header background.
|
|
492
504
|
*/
|
|
493
|
-
backgroundStyle?: Animated.WithAnimatedValue<ViewStyle
|
|
505
|
+
backgroundStyle?: Animated.WithAnimatedValue<ViewStyle> | undefined;
|
|
494
506
|
};
|
|
495
507
|
export type StackHeaderStyleInterpolator = (props: StackHeaderInterpolationProps) => StackHeaderInterpolatedStyle;
|
|
496
508
|
export type TransitionPreset = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,2BAA2B,EAC3B,qBAAqB,EACrB,aAAa,EACb,gBAAgB,EAChB,IAAI,EACL,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EACV,uBAAuB,EACvB,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,KAAK,EACL,SAAS,EACT,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,EAClB,KAAK,EACN,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EACV,QAAQ,EACR,UAAU,EACV,SAAS,EACT,SAAS,EACT,SAAS,EACV,MAAM,cAAc,CAAC;AAEtB,MAAM,MAAM,uBAAuB,GAAG;IACpC;;OAEG;IACH,eAAe,EAAE;QAAE,IAAI,EAAE;YAAE,OAAO,EAAE,OAAO,CAAA;SAAE,CAAA;KAAE,CAAC;IAChD;;OAEG;IACH,aAAa,EAAE;QAAE,IAAI,EA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,EAAE,QAAQ,CAAC,iBAAiB,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;IACrE;;OAEG;IACH,UAAU,CAAC,EAAE,QAAQ,CAAC,iBAAiB,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;IAC/D;;OAEG;IACH,eAAe,CAAC,EAAE,QAAQ,CAAC,iBAAiB,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;CACrE,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG,CACzC,KAAK,EAAE,6BAA6B,KACjC,4BAA4B,CAAC;AAElC,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;OAEG;IACH,gBAAgB,EAAE,gBAAgB,CAAC;IACnC;;OAEG;IACH,cAAc,EAAE;QACd;;WAEG;QACH,IAAI,EAAE,cAAc,CAAC;QACrB;;WAEG;QACH,KAAK,EAAE,cAAc,CAAC;KACvB,CAAC;IACF;;OAEG;IACH,qBAAqB,EAAE,0BAA0B,CAAC;IAClD;;OAEG;IACH,uBAAuB,EAAE,4BAA4B,CAAC;CACvD,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,uBAAuB,CACvD,aAAa,EACb,oBAAoB,CAAC,aAAa,CAAC,EACnC,sBAAsB,EACtB,uBAAuB,EACvB,mBAAmB,CAAC,aAAa,CAAC,CACnC,GACC,kBAAkB,GAClB,qBAAqB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import type { StackCardInterpolationProps } from '../types';
|
|
2
|
+
import type { StackCardInterpolationProps } from '../types.js';
|
|
3
3
|
export declare const CardAnimationContext: React.Context<StackCardInterpolationProps | undefined>;
|
|
4
4
|
//# sourceMappingURL=CardAnimationContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardAnimationContext.d.ts","sourceRoot":"","sources":["../../../../src/utils/CardAnimationContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"CardAnimationContext.d.ts","sourceRoot":"","sources":["../../../../src/utils/CardAnimationContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,aAAU,CAAC;AAE5D,eAAO,MAAM,oBAAoB,wDAErB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GestureHandlerContext.d.ts","sourceRoot":"","sources":["../../../../src/utils/GestureHandlerContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,eAAO,MAAM,qBAAqB,yEAE3B,CAAC"}
|
|
@@ -1,57 +1,10 @@
|
|
|
1
1
|
import type { LocaleDirection } from '@react-navigation/native';
|
|
2
|
-
import type {
|
|
2
|
+
import type { PanGestureConfig } from 'react-native-gesture-handler';
|
|
3
|
+
import type { GestureDirection, Layout } from '../types.js';
|
|
3
4
|
export declare const gestureActivationCriteria: ({ direction, gestureDirection, gestureResponseDistance, layout, }: {
|
|
4
5
|
direction: LocaleDirection;
|
|
5
6
|
gestureDirection: GestureDirection;
|
|
6
|
-
gestureResponseDistance?: number;
|
|
7
|
+
gestureResponseDistance?: number | undefined;
|
|
7
8
|
layout: Layout;
|
|
8
|
-
}) =>
|
|
9
|
-
maxDeltaX: number;
|
|
10
|
-
minOffsetY: number;
|
|
11
|
-
hitSlop: {
|
|
12
|
-
bottom: number;
|
|
13
|
-
top?: undefined;
|
|
14
|
-
right?: undefined;
|
|
15
|
-
left?: undefined;
|
|
16
|
-
};
|
|
17
|
-
enableTrackpadTwoFingerGesture: boolean;
|
|
18
|
-
minOffsetX?: undefined;
|
|
19
|
-
maxDeltaY?: undefined;
|
|
20
|
-
} | {
|
|
21
|
-
maxDeltaX: number;
|
|
22
|
-
minOffsetY: number;
|
|
23
|
-
hitSlop: {
|
|
24
|
-
top: number;
|
|
25
|
-
bottom?: undefined;
|
|
26
|
-
right?: undefined;
|
|
27
|
-
left?: undefined;
|
|
28
|
-
};
|
|
29
|
-
enableTrackpadTwoFingerGesture: boolean;
|
|
30
|
-
minOffsetX?: undefined;
|
|
31
|
-
maxDeltaY?: undefined;
|
|
32
|
-
} | {
|
|
33
|
-
minOffsetX: number;
|
|
34
|
-
maxDeltaY: number;
|
|
35
|
-
hitSlop: {
|
|
36
|
-
right: number;
|
|
37
|
-
bottom?: undefined;
|
|
38
|
-
top?: undefined;
|
|
39
|
-
left?: undefined;
|
|
40
|
-
};
|
|
41
|
-
enableTrackpadTwoFingerGesture: boolean;
|
|
42
|
-
maxDeltaX?: undefined;
|
|
43
|
-
minOffsetY?: undefined;
|
|
44
|
-
} | {
|
|
45
|
-
minOffsetX: number;
|
|
46
|
-
maxDeltaY: number;
|
|
47
|
-
hitSlop: {
|
|
48
|
-
left: number;
|
|
49
|
-
bottom?: undefined;
|
|
50
|
-
top?: undefined;
|
|
51
|
-
right?: undefined;
|
|
52
|
-
};
|
|
53
|
-
enableTrackpadTwoFingerGesture: boolean;
|
|
54
|
-
maxDeltaX?: undefined;
|
|
55
|
-
minOffsetY?: undefined;
|
|
56
|
-
};
|
|
9
|
+
}) => PanGestureConfig;
|
|
57
10
|
//# sourceMappingURL=gestureActivationCriteria.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gestureActivationCriteria.d.ts","sourceRoot":"","sources":["../../../../src/utils/gestureActivationCriteria.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"gestureActivationCriteria.d.ts","sourceRoot":"","sources":["../../../../src/utils/gestureActivationCriteria.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAErE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,aAAU,CAAC;AASzD,eAAO,MAAM,yBAAyB,GAAI,mEAKvC;IACD,SAAS,EAAE,eAAe,CAAC;IAC3B,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,uBAAuB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7C,MAAM,EAAE,MAAM,CAAC;CAChB,KAAG,gBAmDH,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { GestureDirection, Layout } from '../types';
|
|
1
|
+
import type { GestureDirection, Layout } from '../types.js';
|
|
2
2
|
export declare function getDistanceForDirection(layout: Layout, gestureDirection: GestureDirection, isRTL: boolean): number;
|
|
3
3
|
//# sourceMappingURL=getDistanceForDirection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDistanceForDirection.d.ts","sourceRoot":"","sources":["../../../../src/utils/getDistanceForDirection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"getDistanceForDirection.d.ts","sourceRoot":"","sources":["../../../../src/utils/getDistanceForDirection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,aAAU,CAAC;AAGzD,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,MAAM,EACd,gBAAgB,EAAE,gBAAgB,EAClC,KAAK,EAAE,OAAO,GACb,MAAM,CAWR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getInvertedMultiplier.d.ts","sourceRoot":"","sources":["../../../../src/utils/getInvertedMultiplier.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"getInvertedMultiplier.d.ts","sourceRoot":"","sources":["../../../../src/utils/getInvertedMultiplier.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAU,CAAC;AAEjD,wBAAgB,qBAAqB,CACnC,gBAAgB,EAAE,gBAAgB,EAClC,KAAK,EAAE,OAAO,GACb,CAAC,GAAG,CAAC,CAAC,CAWR"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { Route } from '@react-navigation/native';
|
|
2
|
-
import type { StackDescriptorMap } from '../types';
|
|
2
|
+
import type { StackDescriptorMap } from '../types.js';
|
|
3
3
|
export declare const getModalRouteKeys: (routes: Route<string>[], descriptors: StackDescriptorMap) => string[];
|
|
4
4
|
//# sourceMappingURL=getModalRoutesKeys.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getModalRoutesKeys.d.ts","sourceRoot":"","sources":["../../../../src/utils/getModalRoutesKeys.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAEtD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"getModalRoutesKeys.d.ts","sourceRoot":"","sources":["../../../../src/utils/getModalRoutesKeys.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAEtD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAU,CAAC;AAEnD,eAAO,MAAM,iBAAiB,GAC5B,QAAQ,KAAK,CAAC,MAAM,CAAC,EAAE,EACvB,aAAa,kBAAkB,aAczB,CAAC"}
|