UNPKG

@dvcol/svelte-utils

Version:

Svelte library for common utility functions and constants

16 lines (15 loc) 506 B
import { type SwipeHooks, type SwipeNodeTolerances } from './touch.svelte.js'; import type { ScrollState } from '@dvcol/common-utils/common/touch'; import type { Action } from 'svelte/action'; export type SwipeOptions = { onSwipe: SwipeHooks['onSwipe']; tolerances?: SwipeNodeTolerances; scroll?: ScrollState; }; /** * Register touch events handler for swipe detection. * * @param node * @param options */ export declare const swipe: Action<Element, SwipeOptions | SwipeHooks['onSwipe']>;