UNPKG

1.71 kBTypeScriptView Raw
1import type { MeasuredDimensions, ShadowNodeWrapper, SharedValue } from '../commonTypes';
2export type PanGestureHandlerEventPayload = {
3 x: number;
4 y: number;
5 absoluteX: number;
6 absoluteY: number;
7 translationX: number;
8 translationY: number;
9 velocityX: number;
10 velocityY: number;
11};
12export type AnimatedScreenTransition = {
13 topScreenStyle: (event: PanGestureHandlerEventPayload, screenDimensions: MeasuredDimensions) => Record<string, unknown>;
14 belowTopScreenStyle: (event: PanGestureHandlerEventPayload, screenDimensions: MeasuredDimensions) => Record<string, unknown>;
15};
16export type GoBackGesture = 'swipeRight' | 'swipeLeft' | 'swipeUp' | 'swipeDown' | 'verticalSwipe' | 'horizontalSwipe' | 'twoDimensionalSwipe';
17export type ScreenTransitionConfig = {
18 stackTag: number;
19 belowTopScreenId: number | ShadowNodeWrapper;
20 topScreenId: number | ShadowNodeWrapper;
21 screenTransition: AnimatedScreenTransition;
22 sharedEvent: SharedValue<PanGestureHandlerEventPayload>;
23 startingGesturePosition: SharedValue<PanGestureHandlerEventPayload>;
24 onFinishAnimation?: () => void;
25 isTransitionCanceled: boolean;
26 goBackGesture: GoBackGesture;
27 screenDimensions: MeasuredDimensions;
28};
29export type RNScreensTurboModuleType = {
30 startTransition: (stackTag: number) => {
31 topScreenId: number | ShadowNodeWrapper;
32 belowTopScreenId: number | ShadowNodeWrapper;
33 canStartTransition: boolean;
34 };
35 updateTransition: (stackTag: number, progress: number) => void;
36 finishTransition: (stackTag: number, isCanceled: boolean) => void;
37};
38export type LockAxis = 'x' | 'y' | undefined;
39//# sourceMappingURL=commonTypes.d.ts.map
\No newline at end of file