UNPKG

1.11 kBTypeScriptView Raw
1import type { ComponentPublicInstance, ComputedRef } from 'vue';
2import type { SwipeProps } from './Swipe';
3export type SwipeState = {
4 rect: {
5 width: number;
6 height: number;
7 } | null;
8 width: number;
9 height: number;
10 offset: number;
11 active: number;
12 swiping: boolean;
13};
14export type SwipeToOptions = {
15 immediate?: boolean;
16};
17export type SwipeExpose = {
18 prev: () => void;
19 next: () => void;
20 resize: () => void;
21 swipeTo: (index: number, options?: SwipeToOptions) => void;
22 /** @private */
23 state: SwipeState;
24};
25export type SwipeProvide = {
26 props: SwipeProps;
27 size: ComputedRef<number>;
28 count: ComputedRef<number>;
29 activeIndicator: ComputedRef<number>;
30};
31export type SwipeInstance = ComponentPublicInstance<SwipeProps, SwipeExpose>;
32export type SwipeThemeVars = {
33 swipeIndicatorSize?: string;
34 swipeIndicatorMargin?: string;
35 swipeIndicatorActiveOpacity?: number | string;
36 swipeIndicatorInactiveOpacity?: number | string;
37 swipeIndicatorActiveBackground?: string;
38 swipeIndicatorInactiveBackground?: string;
39};