1 | export interface Animation {
|
2 | parentAnimation: Animation | undefined;
|
3 | elements: HTMLElement[];
|
4 | childAnimations: Animation[];
|
5 | id: string | undefined;
|
6 | |
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 | play(opts?: AnimationPlayOptions): Promise<void>;
|
14 | |
15 |
|
16 |
|
17 | pause(): void;
|
18 | |
19 |
|
20 |
|
21 |
|
22 | stop(): void;
|
23 | |
24 |
|
25 |
|
26 | destroy(clearStyleSheets?: boolean): void;
|
27 | progressStart(forceLinearEasing?: boolean, step?: number): Animation;
|
28 | progressStep(step: number): Animation;
|
29 | progressEnd(playTo: 0 | 1 | undefined, step: number, dur?: number): Animation;
|
30 | from(property: string, value: any): Animation;
|
31 | to(property: string, value: any): Animation;
|
32 | fromTo(property: string, fromValue: any, toValue: any): Animation;
|
33 | |
34 |
|
35 |
|
36 | keyframes(keyframes: AnimationKeyFrames): Animation;
|
37 | |
38 |
|
39 |
|
40 | addAnimation(animationToAdd: Animation | Animation[]): Animation;
|
41 | |
42 |
|
43 |
|
44 | addElement(el: Element | Element[] | Node | Node[] | NodeList): Animation;
|
45 | |
46 |
|
47 |
|
48 |
|
49 | iterations(iterations: number): Animation;
|
50 | |
51 |
|
52 |
|
53 |
|
54 | fill(fill: AnimationFill | undefined): Animation;
|
55 | |
56 |
|
57 |
|
58 |
|
59 | direction(direction: AnimationDirection | undefined): Animation;
|
60 | |
61 |
|
62 |
|
63 |
|
64 | duration(duration: number | undefined): Animation;
|
65 | |
66 |
|
67 |
|
68 |
|
69 | easing(easing: string | undefined): Animation;
|
70 | |
71 |
|
72 |
|
73 | delay(delay: number | undefined): Animation;
|
74 | |
75 |
|
76 |
|
77 | getKeyframes(): AnimationKeyFrames;
|
78 | |
79 |
|
80 |
|
81 | getDirection(): AnimationDirection;
|
82 | |
83 |
|
84 |
|
85 | getFill(): AnimationFill;
|
86 | |
87 |
|
88 |
|
89 | getDelay(): number;
|
90 | |
91 |
|
92 |
|
93 | getIterations(): number;
|
94 | |
95 |
|
96 |
|
97 | getEasing(): string;
|
98 | |
99 |
|
100 |
|
101 | getDuration(): number;
|
102 | |
103 |
|
104 |
|
105 |
|
106 |
|
107 |
|
108 |
|
109 | getWebAnimations(): any[];
|
110 | |
111 |
|
112 |
|
113 |
|
114 |
|
115 | afterAddRead(readFn: () => void): Animation;
|
116 | |
117 |
|
118 |
|
119 |
|
120 |
|
121 | afterAddWrite(writeFn: () => void): Animation;
|
122 | |
123 |
|
124 |
|
125 |
|
126 | afterClearStyles(propertyNames: string[]): Animation;
|
127 | |
128 |
|
129 |
|
130 |
|
131 | afterStyles(styles: {
|
132 | [property: string]: any;
|
133 | }): Animation;
|
134 | |
135 |
|
136 |
|
137 |
|
138 | afterAddClass(className: string | string[]): Animation;
|
139 | |
140 |
|
141 |
|
142 |
|
143 | afterRemoveClass(className: string | string[]): Animation;
|
144 | |
145 |
|
146 |
|
147 |
|
148 |
|
149 | beforeAddRead(readFn: () => void): Animation;
|
150 | |
151 |
|
152 |
|
153 |
|
154 |
|
155 | beforeAddWrite(writeFn: () => void): Animation;
|
156 | |
157 |
|
158 |
|
159 |
|
160 | beforeClearStyles(propertyNames: string[]): Animation;
|
161 | |
162 |
|
163 |
|
164 |
|
165 | beforeStyles(styles: {
|
166 | [property: string]: any;
|
167 | }): Animation;
|
168 | |
169 |
|
170 |
|
171 |
|
172 | beforeAddClass(className: string | string[]): Animation;
|
173 | |
174 |
|
175 |
|
176 |
|
177 | beforeRemoveClass(className: string | string[]): Animation;
|
178 | |
179 |
|
180 |
|
181 |
|
182 | onFinish(callback: AnimationLifecycle, opts?: AnimationCallbackOptions): Animation;
|
183 | }
|
184 | export declare type AnimationLifecycle = (currentStep: 0 | 1, animation: Animation) => void;
|
185 | export declare type AnimationKeyFrames = [AnimationKeyFrameEdge, AnimationKeyFrameEdge] | AnimationKeyFrame[];
|
186 | export declare type AnimationStyles = Record<string, any>;
|
187 | export interface AnimationCallbackOptions {
|
188 | oneTimeCallback: boolean;
|
189 | }
|
190 | export interface AnimationKeyFrame extends AnimationStyles {
|
191 | offset: number;
|
192 | }
|
193 | export interface AnimationKeyFrameEdge extends AnimationStyles {
|
194 | offset?: number;
|
195 | }
|
196 | export interface AnimationPlayOptions {
|
197 | sync: boolean;
|
198 | }
|
199 | export declare type AnimationPlayTo = 'start' | 'end';
|
200 | export declare type AnimationDirection = 'normal' | 'reverse' | 'alternate' | 'alternate-reverse';
|
201 | export declare type AnimationFill = 'auto' | 'none' | 'forwards' | 'backwards' | 'both';
|
202 | export declare type AnimationBuilder = (baseEl: any, opts?: any) => Animation;
|