1 | import * as React from 'react';
|
2 |
|
3 | export type Easing =
|
4 | 'easeInSine' |
|
5 | 'easeOutSine' |
|
6 | 'easeInOutSine' |
|
7 | 'easeInCirc' |
|
8 | 'easeOutCirc' |
|
9 | 'easeInOutCirc' |
|
10 | 'easeInElastic' |
|
11 | 'easeOutElastic' |
|
12 | 'easeInOutElastic' |
|
13 | 'easeInBack' |
|
14 | 'easeOutBack' |
|
15 | 'easeInOutBack' |
|
16 | 'easeInBounce' |
|
17 | 'easeOutBounce' |
|
18 | 'easeInOutBounce' |
|
19 | 'easeInQuad' |
|
20 | 'easeOutQuad' |
|
21 | 'easeInOutQuad' |
|
22 | 'easeInCubic' |
|
23 | 'easeOutCubic' |
|
24 | 'easeInOutCubic' |
|
25 | 'easeInQuart' |
|
26 | 'easeOutQuart' |
|
27 | 'easeInOutQuart' |
|
28 | 'easeInQuint' |
|
29 | 'easeOutQuint' |
|
30 | 'easeInOutQuint' |
|
31 | 'easeInExpo' |
|
32 | 'easeOutExpo' |
|
33 | 'easeInOutExpo' |
|
34 | 'linear';
|
35 |
|
36 | export type AnimationProp =
|
37 | {
|
38 | value: string | number,
|
39 | delay: ((el: Element, index?: number, len?: number) => number) | number,
|
40 | duration?: ((el: Element, index?: number, len?: number) => number) | number,
|
41 | easing?: Easing
|
42 | } |
|
43 | string |
|
44 | number |
|
45 | (string | number)[] |
|
46 | ((el: Element, index?: number) => string | number);
|
47 |
|
48 | export interface AnimeProps {
|
49 | delay?: ((el: Element, index?: number, len?: number) => number) | number,
|
50 | duration?: ((el: Element, index?: number, len?: number) => number) | number,
|
51 | autoplay?: boolean,
|
52 | loop?: number | boolean,
|
53 | direction?: 'normal' | 'reverse' | 'alternate';
|
54 | easing?: Easing,
|
55 | elasticity?: number,
|
56 | round?: number | boolean,
|
57 | begin?: Function,
|
58 | update?: Function,
|
59 | complete?: Function,
|
60 | // Objects
|
61 | [index: string]: AnimationProp | any
|
62 |
|
63 | }
|
64 |
|
65 | declare class Anime extends React.Component<AnimeProps, any> { }
|
66 |
|
67 | export default Anime;
|
68 |
|
\ | No newline at end of file |