1 | import { View } from '../core/view';
|
2 | import { CoreTypes } from '../../core-types';
|
3 | import { Color } from '../../color';
|
4 | export type Transformation = {
|
5 | property: TransformationType;
|
6 | value: TransformationValue;
|
7 | };
|
8 | export type TransformationType = 'rotate' | 'translate' | 'translateX' | 'translateY' | 'scale' | 'scaleX' | 'scaleY';
|
9 | export type TransformationValue = Pair | number;
|
10 | export type TransformFunctionsInfo = {
|
11 | translate: Pair;
|
12 | rotate: number;
|
13 | scale: Pair;
|
14 | };
|
15 | export interface AnimationPromise extends Promise<any>, Cancelable {
|
16 | then(...args: any[]): AnimationPromise;
|
17 | catch(...args: any[]): AnimationPromise;
|
18 | }
|
19 | export interface Pair {
|
20 | x: number;
|
21 | y: number;
|
22 | }
|
23 | export interface Cancelable {
|
24 | cancel(): void;
|
25 | }
|
26 | export interface PropertyAnimation {
|
27 | target: View;
|
28 | property: string;
|
29 | value: any;
|
30 | duration?: number;
|
31 | delay?: number;
|
32 | iterations?: number;
|
33 | curve?: any;
|
34 | }
|
35 | export interface PropertyAnimationInfo extends PropertyAnimation {
|
36 | _propertyResetCallback?: any;
|
37 | _originalValue?: any;
|
38 | }
|
39 | export interface AnimationDefinition {
|
40 | target?: View;
|
41 | opacity?: number;
|
42 | backgroundColor?: Color;
|
43 | translate?: Pair;
|
44 | scale?: Pair;
|
45 | height?: CoreTypes.PercentLengthType | string;
|
46 | width?: CoreTypes.PercentLengthType | string;
|
47 | rotate?: number;
|
48 | duration?: number;
|
49 | delay?: number;
|
50 | iterations?: number;
|
51 | curve?: any;
|
52 | }
|
53 | export interface AnimationDefinitionInternal extends AnimationDefinition {
|
54 | valueSource?: 'animation' | 'keyframe';
|
55 | }
|
56 | export interface IOSView extends View {
|
57 | _suspendPresentationLayerUpdates(): any;
|
58 | _resumePresentationLayerUpdates(): any;
|
59 | _isPresentationLayerUpdateSuspended(): any;
|
60 | }
|