1 | import type { MeasuredDimensions, ShadowNodeWrapper, SharedValue } from '../commonTypes';
|
2 | export 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 | };
|
12 | export type AnimatedScreenTransition = {
|
13 | topScreenStyle: (event: PanGestureHandlerEventPayload, screenDimensions: MeasuredDimensions) => Record<string, unknown>;
|
14 | belowTopScreenStyle: (event: PanGestureHandlerEventPayload, screenDimensions: MeasuredDimensions) => Record<string, unknown>;
|
15 | };
|
16 | export type GoBackGesture = 'swipeRight' | 'swipeLeft' | 'swipeUp' | 'swipeDown' | 'verticalSwipe' | 'horizontalSwipe' | 'twoDimensionalSwipe';
|
17 | export 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 | };
|
29 | export 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 | };
|
38 | export type LockAxis = 'x' | 'y' | undefined;
|
39 |
|
\ | No newline at end of file |