2017-02-22 18:14:49 -05:00
|
|
|
/** @experimental */
|
2017-03-29 12:34:45 -04:00
|
|
|
export declare function animate(timings: string | number, styles?: AnimationStyleMetadata | AnimationKeyframesSequenceMetadata | null): AnimationAnimateMetadata;
|
2017-02-22 18:14:49 -05:00
|
|
|
|
2017-04-26 13:44:28 -04:00
|
|
|
/** @experimental */
|
2017-05-02 18:45:48 -04:00
|
|
|
export declare function animateChild(options?: AnimateChildOptions | null): AnimationAnimateChildMetadata;
|
|
|
|
|
|
|
|
/** @experimental */
|
|
|
|
export interface AnimateChildOptions extends AnimationOptions {
|
|
|
|
duration?: number | string;
|
|
|
|
}
|
2017-04-26 13:44:28 -04:00
|
|
|
|
2017-02-22 18:14:49 -05:00
|
|
|
/** @experimental */
|
|
|
|
export declare type AnimateTimings = {
|
|
|
|
duration: number;
|
|
|
|
delay: number;
|
2017-03-24 12:56:34 -04:00
|
|
|
easing: string | null;
|
2017-02-22 18:14:49 -05:00
|
|
|
};
|
|
|
|
|
2017-04-26 13:44:28 -04:00
|
|
|
/** @experimental */
|
|
|
|
export declare function animation(steps: AnimationMetadata | AnimationMetadata[], options?: AnimationOptions | null): AnimationReferenceMetadata;
|
|
|
|
|
|
|
|
/** @experimental */
|
|
|
|
export interface AnimationAnimateChildMetadata extends AnimationMetadata {
|
|
|
|
options: AnimationOptions | null;
|
|
|
|
}
|
|
|
|
|
2017-02-22 18:14:49 -05:00
|
|
|
/** @experimental */
|
|
|
|
export interface AnimationAnimateMetadata extends AnimationMetadata {
|
2017-03-29 12:34:45 -04:00
|
|
|
styles: AnimationStyleMetadata | AnimationKeyframesSequenceMetadata | null;
|
2017-02-22 18:14:49 -05:00
|
|
|
timings: string | number | AnimateTimings;
|
|
|
|
}
|
|
|
|
|
2017-04-26 13:44:28 -04:00
|
|
|
/** @experimental */
|
|
|
|
export interface AnimationAnimateRefMetadata extends AnimationMetadata {
|
|
|
|
animation: AnimationReferenceMetadata;
|
|
|
|
options: AnimationOptions | null;
|
|
|
|
}
|
|
|
|
|
|
|
|
/** @experimental */
|
|
|
|
export declare abstract class AnimationBuilder {
|
2017-04-25 18:06:31 -04:00
|
|
|
abstract build(animation: AnimationMetadata | AnimationMetadata[]): AnimationFactory;
|
2017-04-26 13:44:28 -04:00
|
|
|
}
|
|
|
|
|
2017-02-22 18:14:49 -05:00
|
|
|
/** @experimental */
|
|
|
|
export interface AnimationEvent {
|
2018-02-14 13:12:10 -05:00
|
|
|
disabled: boolean;
|
2017-02-22 18:14:49 -05:00
|
|
|
element: any;
|
|
|
|
fromState: string;
|
|
|
|
phaseName: string;
|
|
|
|
toState: string;
|
|
|
|
totalTime: number;
|
|
|
|
triggerName: string;
|
|
|
|
}
|
|
|
|
|
2017-04-25 18:06:31 -04:00
|
|
|
/** @experimental */
|
|
|
|
export declare abstract class AnimationFactory {
|
|
|
|
abstract create(element: any, options?: AnimationOptions): AnimationPlayer;
|
|
|
|
}
|
|
|
|
|
2017-02-22 18:14:49 -05:00
|
|
|
/** @experimental */
|
|
|
|
export interface AnimationGroupMetadata extends AnimationMetadata {
|
2017-04-26 13:44:28 -04:00
|
|
|
options: AnimationOptions | null;
|
2017-02-22 18:14:49 -05:00
|
|
|
steps: AnimationMetadata[];
|
|
|
|
}
|
|
|
|
|
|
|
|
/** @experimental */
|
|
|
|
export interface AnimationKeyframesSequenceMetadata extends AnimationMetadata {
|
|
|
|
steps: AnimationStyleMetadata[];
|
|
|
|
}
|
|
|
|
|
|
|
|
/** @experimental */
|
|
|
|
export interface AnimationMetadata {
|
|
|
|
type: AnimationMetadataType;
|
|
|
|
}
|
|
|
|
|
|
|
|
/** @experimental */
|
|
|
|
export declare const enum AnimationMetadataType {
|
|
|
|
State = 0,
|
|
|
|
Transition = 1,
|
|
|
|
Sequence = 2,
|
|
|
|
Group = 3,
|
|
|
|
Animate = 4,
|
2017-04-26 13:44:28 -04:00
|
|
|
Keyframes = 5,
|
2017-02-22 18:14:49 -05:00
|
|
|
Style = 6,
|
2017-04-26 13:44:28 -04:00
|
|
|
Trigger = 7,
|
|
|
|
Reference = 8,
|
|
|
|
AnimateChild = 9,
|
|
|
|
AnimateRef = 10,
|
|
|
|
Query = 11,
|
|
|
|
Stagger = 12,
|
|
|
|
}
|
|
|
|
|
|
|
|
/** @experimental */
|
|
|
|
export interface AnimationOptions {
|
|
|
|
delay?: number | string;
|
|
|
|
params?: {
|
|
|
|
[name: string]: any;
|
|
|
|
};
|
2017-02-22 18:14:49 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
/** @experimental */
|
2017-05-17 17:53:12 -04:00
|
|
|
export interface AnimationPlayer {
|
2017-04-26 13:44:28 -04:00
|
|
|
beforeDestroy?: () => any;
|
2017-03-24 12:56:34 -04:00
|
|
|
parentPlayer: AnimationPlayer | null;
|
2017-04-26 13:44:28 -04:00
|
|
|
readonly totalTime: number;
|
2017-05-17 17:53:12 -04:00
|
|
|
destroy(): void;
|
|
|
|
finish(): void;
|
|
|
|
getPosition(): number;
|
|
|
|
hasStarted(): boolean;
|
|
|
|
init(): void;
|
|
|
|
onDestroy(fn: () => void): void;
|
|
|
|
onDone(fn: () => void): void;
|
|
|
|
onStart(fn: () => void): void;
|
|
|
|
pause(): void;
|
|
|
|
play(): void;
|
|
|
|
reset(): void;
|
|
|
|
restart(): void;
|
|
|
|
setPosition(p: any): void;
|
2017-02-22 18:14:49 -05:00
|
|
|
}
|
|
|
|
|
2017-04-26 13:44:28 -04:00
|
|
|
/** @experimental */
|
|
|
|
export interface AnimationQueryMetadata extends AnimationMetadata {
|
|
|
|
animation: AnimationMetadata | AnimationMetadata[];
|
|
|
|
options: AnimationQueryOptions | null;
|
|
|
|
selector: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
/** @experimental */
|
|
|
|
export interface AnimationQueryOptions extends AnimationOptions {
|
|
|
|
limit?: number;
|
|
|
|
optional?: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
/** @experimental */
|
|
|
|
export interface AnimationReferenceMetadata extends AnimationMetadata {
|
|
|
|
animation: AnimationMetadata | AnimationMetadata[];
|
|
|
|
options: AnimationOptions | null;
|
|
|
|
}
|
|
|
|
|
2017-02-22 18:14:49 -05:00
|
|
|
/** @experimental */
|
|
|
|
export interface AnimationSequenceMetadata extends AnimationMetadata {
|
2017-04-26 13:44:28 -04:00
|
|
|
options: AnimationOptions | null;
|
2017-02-22 18:14:49 -05:00
|
|
|
steps: AnimationMetadata[];
|
|
|
|
}
|
|
|
|
|
2017-04-26 13:44:28 -04:00
|
|
|
/** @experimental */
|
|
|
|
export interface AnimationStaggerMetadata extends AnimationMetadata {
|
|
|
|
animation: AnimationMetadata | AnimationMetadata[];
|
|
|
|
timings: string | number;
|
|
|
|
}
|
|
|
|
|
2017-02-22 18:14:49 -05:00
|
|
|
/** @experimental */
|
|
|
|
export interface AnimationStateMetadata extends AnimationMetadata {
|
|
|
|
name: string;
|
2017-08-07 14:40:04 -04:00
|
|
|
options?: {
|
|
|
|
params: {
|
|
|
|
[name: string]: any;
|
|
|
|
};
|
|
|
|
};
|
2017-02-22 18:14:49 -05:00
|
|
|
styles: AnimationStyleMetadata;
|
|
|
|
}
|
|
|
|
|
|
|
|
/** @experimental */
|
|
|
|
export interface AnimationStyleMetadata extends AnimationMetadata {
|
2017-04-26 13:44:28 -04:00
|
|
|
offset: number | null;
|
|
|
|
styles: '*' | {
|
2017-02-22 18:14:49 -05:00
|
|
|
[key: string]: string | number;
|
2017-04-26 13:44:28 -04:00
|
|
|
} | Array<{
|
2017-03-01 20:13:06 -05:00
|
|
|
[key: string]: string | number;
|
2017-04-26 13:44:28 -04:00
|
|
|
} | '*'>;
|
2017-02-22 18:14:49 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
/** @experimental */
|
|
|
|
export interface AnimationTransitionMetadata extends AnimationMetadata {
|
2017-03-01 20:13:06 -05:00
|
|
|
animation: AnimationMetadata | AnimationMetadata[];
|
2018-03-12 20:21:02 -04:00
|
|
|
expr: string | ((fromState: string, toState: string, element?: any, params?: {
|
|
|
|
[key: string]: any;
|
|
|
|
}) => boolean);
|
2017-04-26 13:44:28 -04:00
|
|
|
options: AnimationOptions | null;
|
2017-02-22 18:14:49 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
/** @experimental */
|
2017-04-26 13:44:28 -04:00
|
|
|
export interface AnimationTriggerMetadata extends AnimationMetadata {
|
2017-02-22 18:14:49 -05:00
|
|
|
definitions: AnimationMetadata[];
|
|
|
|
name: string;
|
2017-04-26 13:44:28 -04:00
|
|
|
options: {
|
|
|
|
params?: {
|
|
|
|
[name: string]: any;
|
|
|
|
};
|
|
|
|
} | null;
|
2017-02-22 18:14:49 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
/** @experimental */
|
|
|
|
export declare const AUTO_STYLE = "*";
|
|
|
|
|
|
|
|
/** @experimental */
|
2017-04-26 13:44:28 -04:00
|
|
|
export declare function group(steps: AnimationMetadata[], options?: AnimationOptions | null): AnimationGroupMetadata;
|
2017-02-22 18:14:49 -05:00
|
|
|
|
|
|
|
/** @experimental */
|
|
|
|
export declare function keyframes(steps: AnimationStyleMetadata[]): AnimationKeyframesSequenceMetadata;
|
|
|
|
|
|
|
|
/** @experimental */
|
2017-02-24 03:32:19 -05:00
|
|
|
export declare class NoopAnimationPlayer implements AnimationPlayer {
|
2017-03-24 12:56:34 -04:00
|
|
|
parentPlayer: AnimationPlayer | null;
|
2018-02-14 13:12:10 -05:00
|
|
|
readonly totalTime: number;
|
|
|
|
constructor(duration?: number, delay?: number);
|
2017-02-22 18:14:49 -05:00
|
|
|
destroy(): void;
|
|
|
|
finish(): void;
|
|
|
|
getPosition(): number;
|
|
|
|
hasStarted(): boolean;
|
|
|
|
init(): void;
|
|
|
|
onDestroy(fn: () => void): void;
|
|
|
|
onDone(fn: () => void): void;
|
|
|
|
onStart(fn: () => void): void;
|
|
|
|
pause(): void;
|
|
|
|
play(): void;
|
|
|
|
reset(): void;
|
|
|
|
restart(): void;
|
|
|
|
setPosition(p: number): void;
|
|
|
|
}
|
|
|
|
|
|
|
|
/** @experimental */
|
2017-04-26 13:44:28 -04:00
|
|
|
export declare function query(selector: string, animation: AnimationMetadata | AnimationMetadata[], options?: AnimationQueryOptions | null): AnimationQueryMetadata;
|
|
|
|
|
|
|
|
/** @experimental */
|
|
|
|
export declare function sequence(steps: AnimationMetadata[], options?: AnimationOptions | null): AnimationSequenceMetadata;
|
|
|
|
|
|
|
|
/** @experimental */
|
|
|
|
export declare function stagger(timings: string | number, animation: AnimationMetadata | AnimationMetadata[]): AnimationStaggerMetadata;
|
2017-02-22 18:14:49 -05:00
|
|
|
|
|
|
|
/** @experimental */
|
2017-08-07 14:40:04 -04:00
|
|
|
export declare function state(name: string, styles: AnimationStyleMetadata, options?: {
|
|
|
|
params: {
|
|
|
|
[name: string]: any;
|
|
|
|
};
|
|
|
|
}): AnimationStateMetadata;
|
2017-02-22 18:14:49 -05:00
|
|
|
|
|
|
|
/** @experimental */
|
2017-04-26 13:44:28 -04:00
|
|
|
export declare function style(tokens: '*' | {
|
2017-02-22 18:14:49 -05:00
|
|
|
[key: string]: string | number;
|
2017-04-26 13:44:28 -04:00
|
|
|
} | Array<'*' | {
|
2017-02-22 18:14:49 -05:00
|
|
|
[key: string]: string | number;
|
|
|
|
}>): AnimationStyleMetadata;
|
|
|
|
|
|
|
|
/** @experimental */
|
2018-03-12 20:21:02 -04:00
|
|
|
export declare function transition(stateChangeExpr: string | ((fromState: string, toState: string, element?: any, params?: {
|
|
|
|
[key: string]: any;
|
|
|
|
}) => boolean), steps: AnimationMetadata | AnimationMetadata[], options?: AnimationOptions | null): AnimationTransitionMetadata;
|
2017-02-22 18:14:49 -05:00
|
|
|
|
|
|
|
/** @experimental */
|
|
|
|
export declare function trigger(name: string, definitions: AnimationMetadata[]): AnimationTriggerMetadata;
|
2017-04-26 13:44:28 -04:00
|
|
|
|
|
|
|
/** @experimental */
|
|
|
|
export declare function useAnimation(animation: AnimationReferenceMetadata, options?: AnimationOptions | null): AnimationAnimateRefMetadata;
|