UNPKG

1.9 kBTypeScriptView Raw
1import type { IObject as IObj } from 'tween-one/lib/typings';
2import type { IEaseType as IEase } from 'tween-one/lib/typings/IAnimObject';
3import type React from 'react';
4export declare type IObject = IObj;
5export declare type IKeys = (string | number)[];
6export declare type IQueueType = 'alpha' | 'left' | 'right' | 'top' | 'bottom' | 'scale' | 'scaleBig' | 'scaleX' | 'scaleY';
7export declare type INumberOrArrayOrFunc = number | [number, number] | ((e: {
8 key: string;
9 index: number;
10}) => number | number[]);
11export declare type IEaseType = IEase | [number, number, number, number];
12export declare type IQueueTypeOrArrayOrFunc = IQueueType | [IQueueType, IQueueType] | ((e: {
13 key: string;
14 index: number;
15}) => IQueueType | [IQueueType, IQueueType]);
16export declare type IEaseTypeOrArrayOrFunc = IEaseType | IEaseType[] | ((e: {
17 key: string;
18 index: number;
19}) => IEaseType | IEaseType[]);
20export declare type IAnimConfigOrArrayOrFunc = {} | [{}] | ((e: {
21 key: string;
22 index: number;
23}) => {} | {}[]);
24interface AllHTMLAttributes extends Omit<React.SVGAttributes<any>, 'crossOrigin'>, React.AllHTMLAttributes<any> {
25}
26export interface IProps extends Omit<AllHTMLAttributes, 'type'> {
27 type?: IQueueTypeOrArrayOrFunc;
28 animConfig?: IAnimConfigOrArrayOrFunc;
29 delay?: INumberOrArrayOrFunc;
30 duration?: INumberOrArrayOrFunc;
31 interval?: INumberOrArrayOrFunc;
32 leaveReverse?: boolean;
33 ease?: IEaseTypeOrArrayOrFunc;
34 appear?: boolean;
35 component?: string | React.ClassType<any, React.Component, React.ComponentClass<any>> | React.ForwardRefExoticComponent<IProps & {
36 ref?: React.Ref<any>;
37 }> | undefined;
38 componentProps?: IObject;
39 animatingClassName?: string[];
40 forcedReplay?: boolean;
41 onEnd?: (e: {
42 key: string | number;
43 type: string;
44 target: HTMLElement;
45 }) => void;
46}
47export {};