UNPKG

react-native-zoom-toolkit

Version:

Smoothly zoom any image, video or component you want!

28 lines 1.31 kB
import { type SharedValue } from 'react-native-reanimated'; import type { GestureUpdateEvent, PanGestureChangeEventPayload, PanGestureHandlerEventPayload } from 'react-native-gesture-handler'; import { PanMode, type BoundsFuction, type Vector, type SizeVector, type PanGestureEventCallback, type PanGestureEvent, SwipeDirection } from '../types'; type PanCommmonOptions = { container: SizeVector<SharedValue<number>>; translate: Vector<SharedValue<number>>; detectorTranslate: Vector<SharedValue<number>>; offset: Vector<SharedValue<number>>; panMode: PanMode; scale: SharedValue<number>; decay?: boolean; boundFn: BoundsFuction; userCallbacks: Partial<{ onGestureEnd: () => void; onPanStart: PanGestureEventCallback; onPanEnd: PanGestureEventCallback; onSwipe: (direction: SwipeDirection) => void; onOverPanning: (x: number, y: number) => void; }>; }; type PanGestureUpdadeEvent = GestureUpdateEvent<PanGestureHandlerEventPayload & PanGestureChangeEventPayload>; export declare const usePanCommons: (options: PanCommmonOptions) => { onPanStart: (e: PanGestureEvent) => void; onPanChange: (e: PanGestureUpdadeEvent) => void; onPanEnd: (e: PanGestureEvent) => void; }; export {}; //# sourceMappingURL=usePanCommons.d.ts.map