1 | import { View } from '../core/view';
|
2 | import { CoreTypes } from '../../core-types';
|
3 | import { Color } from '../../color';
|
4 |
|
5 | export declare const ANIMATION_PROPERTIES;
|
6 |
|
7 | interface Keyframe {
|
8 | backgroundColor?: Color;
|
9 | scale?: { x: number; y: number };
|
10 | translate?: { x: number; y: number };
|
11 | rotate?: { x: number; y: number; z: number };
|
12 | opacity?: number;
|
13 | width?: CoreTypes.PercentLengthType;
|
14 | height?: CoreTypes.PercentLengthType;
|
15 | valueSource?: 'keyframe' | 'animation';
|
16 | duration?: number;
|
17 | curve?: any;
|
18 | forceLayer?: boolean;
|
19 | }
|
20 |
|
21 | export interface Keyframes {
|
22 | name: string;
|
23 | keyframes: Array<UnparsedKeyframe>;
|
24 | tag?: string | number;
|
25 | scopedTag?: string;
|
26 | mediaQueryString?: string;
|
27 | }
|
28 |
|
29 | export interface UnparsedKeyframe {
|
30 | values: Array<any>;
|
31 | declarations: Array<KeyframeDeclaration>;
|
32 | }
|
33 |
|
34 | export interface KeyframeDeclaration {
|
35 | property: string;
|
36 | value: any;
|
37 | }
|
38 |
|
39 | export interface KeyframeInfo {
|
40 | duration: number;
|
41 | declarations: Array<KeyframeDeclaration>;
|
42 | curve?: any;
|
43 | }
|
44 |
|
45 |
|
46 |
|
47 |
|
48 | export class KeyframeAnimationInfo {
|
49 | |
50 |
|
51 |
|
52 | keyframes: Array<KeyframeInfo>;
|
53 |
|
54 | |
55 |
|
56 |
|
57 | name?: string;
|
58 |
|
59 | |
60 |
|
61 |
|
62 | duration?: number;
|
63 |
|
64 | |
65 |
|
66 |
|
67 | delay?: number;
|
68 |
|
69 | |
70 |
|
71 |
|
72 |
|
73 |
|
74 | iterations?: number;
|
75 |
|
76 | |
77 |
|
78 |
|
79 |
|
80 | curve?: any;
|
81 |
|
82 | |
83 |
|
84 |
|
85 | isForwards: boolean;
|
86 |
|
87 | |
88 |
|
89 |
|
90 | isReverse?: boolean;
|
91 | }
|
92 |
|
93 | export class KeyframeAnimation {
|
94 | animations: Array<Keyframe>;
|
95 |
|
96 | |
97 |
|
98 |
|
99 | delay: number;
|
100 |
|
101 | |
102 |
|
103 |
|
104 |
|
105 |
|
106 | iterations: number;
|
107 |
|
108 | |
109 |
|
110 |
|
111 | isPlaying: boolean;
|
112 |
|
113 | |
114 |
|
115 |
|
116 | public play: (view: View) => Promise<void>;
|
117 |
|
118 | |
119 |
|
120 |
|
121 | public cancel: () => void;
|
122 |
|
123 | |
124 |
|
125 |
|
126 | public static keyframeAnimationFromInfo(info: KeyframeAnimationInfo): KeyframeAnimation;
|
127 | }
|