1 | import type React from 'react';
|
2 | import type { IAnimObject as Anim, IMode, ITimelineCallBack as TimelineCallBack } from 'tween-one';
|
3 | export declare type IObject = Record<string, any>;
|
4 | export declare type ITimelineCallBack = TimelineCallBack;
|
5 | export interface ICallBack {
|
6 | mode?: IMode;
|
7 | moment?: number;
|
8 | ratio?: number;
|
9 | index: number;
|
10 | repeat?: number;
|
11 | timelineMoment?: number;
|
12 | vars?: IObject | IObject[];
|
13 | targets?: IObject | IObject[];
|
14 | }
|
15 | interface AnimObject extends Anim {
|
16 | Children?: {
|
17 | value?: number;
|
18 | floatLength?: number;
|
19 | formatMoney?: true | {
|
20 | thousand?: string;
|
21 | decimal?: string;
|
22 | };
|
23 | };
|
24 | }
|
25 | export declare type AnimObjectOrArray = AnimObject | AnimObject[];
|
26 | export declare type IAnimObject = AnimObjectOrArray | ((e: {
|
27 | key: string;
|
28 | index: number;
|
29 | }) => AnimObject);
|
30 | interface AllHTMLAttributes extends Omit<React.SVGAttributes<any>, 'crossOrigin'>, React.AllHTMLAttributes<any> {
|
31 | }
|
32 | export interface IAnimProps extends Omit<AllHTMLAttributes, 'onChange'> {
|
33 | style?: React.CSSProperties;
|
34 | children?: any;
|
35 | animation?: AnimObjectOrArray;
|
36 | paused?: boolean;
|
37 | delay?: number;
|
38 | reverse?: boolean;
|
39 | repeatDelay?: number;
|
40 | repeat?: number;
|
41 | yoyo?: boolean;
|
42 | ref?: React.Ref<any>;
|
43 | onChange?: (v: ICallBack) => void;
|
44 | onChangeTimeline?: (v: ITimelineCallBack) => void;
|
45 | moment?: number;
|
46 | attr?: boolean;
|
47 | resetStyle?: boolean;
|
48 | component?: string | null | React.FC<any> | React.ComponentClass<any>;
|
49 | componentProps?: IObject;
|
50 | forcedJudg?: IObject;
|
51 | killPrevAnim?: boolean;
|
52 | regionStartTime?: number;
|
53 | regionEndTime?: number;
|
54 | }
|
55 | export interface IEndCallback {
|
56 | key?: string | React.ReactText;
|
57 | type?: string;
|
58 | target?: HTMLElement | HTMLElement[];
|
59 | }
|
60 | export interface IGroupProps extends Omit<AllHTMLAttributes, 'onChange'> {
|
61 | ref?: React.Ref<any>;
|
62 | appear?: boolean;
|
63 | enter?: IAnimObject;
|
64 | leave?: IAnimObject;
|
65 | animatingClassName?: string[];
|
66 | exclusive?: boolean;
|
67 | resetStyle?: boolean;
|
68 | onEnd?: (e: IEndCallback) => void;
|
69 | component?: string | null | React.FC<any> | React.ComponentClass<any>;
|
70 | componentProps?: IObject;
|
71 | }
|
72 | export interface TweenOneRef extends React.ForwardRefExoticComponent<IAnimProps> {
|
73 | isTweenOne?: boolean;
|
74 | plugins?: any;
|
75 | ticker?: any;
|
76 | easing?: any;
|
77 | }
|
78 | export interface TweenOneGroupRef extends React.ForwardRefExoticComponent<IGroupProps> {
|
79 | isTweenOneGroup?: boolean;
|
80 | }
|
81 | export {};
|