1 | import type { ComponentPublicInstance, ComputedRef } from 'vue';
|
2 | import type { SwipeProps } from './Swipe';
|
3 | export 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 | };
|
14 | export type SwipeToOptions = {
|
15 | immediate?: boolean;
|
16 | };
|
17 | export type SwipeExpose = {
|
18 | prev: () => void;
|
19 | next: () => void;
|
20 | resize: () => void;
|
21 | swipeTo: (index: number, options?: SwipeToOptions) => void;
|
22 |
|
23 | state: SwipeState;
|
24 | };
|
25 | export type SwipeProvide = {
|
26 | props: SwipeProps;
|
27 | size: ComputedRef<number>;
|
28 | count: ComputedRef<number>;
|
29 | activeIndicator: ComputedRef<number>;
|
30 | };
|
31 | export type SwipeInstance = ComponentPublicInstance<SwipeProps, SwipeExpose>;
|
32 | export type SwipeThemeVars = {
|
33 | swipeIndicatorSize?: string;
|
34 | swipeIndicatorMargin?: string;
|
35 | swipeIndicatorActiveOpacity?: number | string;
|
36 | swipeIndicatorInactiveOpacity?: number | string;
|
37 | swipeIndicatorActiveBackground?: string;
|
38 | swipeIndicatorInactiveBackground?: string;
|
39 | };
|