lwa 0.1.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 sutras
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,73 @@
1
+ # lwa
2
+
3
+ 轻量级的动画库。
4
+
5
+ - 按需加载
6
+ - 摇树优化
7
+
8
+ ## 文档与演示
9
+
10
+ [https://sutras.github.io/lwa-docs](https://sutras.github.io/lwa-docs)
11
+
12
+ ## 安装
13
+
14
+ ```bash
15
+ npm install lwa
16
+ ```
17
+
18
+ ## 注册插件
19
+
20
+ ```js
21
+ import {
22
+ use,
23
+ cssPlugin,
24
+ colorPlugin,
25
+ relativePlugin,
26
+ svgPlugin,
27
+ interpPlugin,
28
+ } from "lwa";
29
+
30
+ use([cssPlugin, colorPlugin, relativePlugin, svgPlugin, interpPlugin]);
31
+ ```
32
+
33
+ ## 使用
34
+
35
+ ```js
36
+ import { createAnimation } from "lwa";
37
+
38
+ createAnimation("#el", {
39
+ translateX: 200,
40
+ });
41
+ ```
42
+
43
+ ## 维护
44
+
45
+ ### 下载
46
+
47
+ ```bash
48
+ git clone https://github.com/sutras/lwa.git
49
+ ```
50
+
51
+ ### 安装依赖
52
+
53
+ ```bash
54
+ pnpm install
55
+ ```
56
+
57
+ ### 启动开发环境
58
+
59
+ ```bash
60
+ npm run dev
61
+ ```
62
+
63
+ ### 打包案例文档和部署
64
+
65
+ ```bash
66
+ npm run buildDocsAndDeploy
67
+ ```
68
+
69
+ ### 打包库
70
+
71
+ ```bash
72
+ npm run build:lib
73
+ ```
package/dist/lwa.d.ts ADDED
@@ -0,0 +1,293 @@
1
+ declare function add(tick: () => void): void;
2
+
3
+ export declare interface AnimatedTarget {
4
+ target: object;
5
+ index: number;
6
+ total: number;
7
+ }
8
+
9
+ export declare type BaseValue = number | string;
10
+
11
+ export declare interface Between {
12
+ from: number;
13
+ to: number;
14
+ round: number;
15
+ }
16
+
17
+ export declare const colorPlugin: Plugin_2< {
18
+ color: {};
19
+ }, any>;
20
+
21
+ export declare function createAnimation(target: string | unknown[] | object, keyframes: Properties | Properties[], options?: TweenOptions & TimelineOptions): {
22
+ play: () => void;
23
+ pause: () => void;
24
+ finish: () => void;
25
+ restart: () => void;
26
+ seek: (nextPosition: number) => void;
27
+ progress: (p: number) => void;
28
+ tick: () => void;
29
+ getPosition(): number;
30
+ getDuration(): number;
31
+ getProgress(): number;
32
+ isReverse(): boolean;
33
+ add: {
34
+ (target: string | unknown[] | object, keyframes: Properties | Properties[], options?: TweenOptions, position?: number | string): any;
35
+ (target: string | unknown[] | object, keyframes: Properties | Properties[], position?: number | string): any;
36
+ (target: TimelineEventTarget, position?: number | string): any;
37
+ };
38
+ remove: (target: TimelineEventTarget) => void;
39
+ clear: () => void;
40
+ events: TimelineEvent[];
41
+ on: <U extends "pause" | "play" | "complete" | "update" | "begin" | "loopBegin" | "loopComplete">(type: U, callback: {
42
+ begin: () => void;
43
+ loopBegin: () => void;
44
+ complete: () => void;
45
+ loopComplete: () => void;
46
+ pause: () => void;
47
+ play: () => void;
48
+ update: (position: number, progress: number) => void;
49
+ }[U]) => void;
50
+ off: <U extends "pause" | "play" | "complete" | "update" | "begin" | "loopBegin" | "loopComplete">(type: U, callback?: {
51
+ begin: () => void;
52
+ loopBegin: () => void;
53
+ complete: () => void;
54
+ loopComplete: () => void;
55
+ pause: () => void;
56
+ play: () => void;
57
+ update: (position: number, progress: number) => void;
58
+ }[U] | undefined) => void;
59
+ once: <U extends "pause" | "play" | "complete" | "update" | "begin" | "loopBegin" | "loopComplete">(type: U, callback: {
60
+ begin: () => void;
61
+ loopBegin: () => void;
62
+ complete: () => void;
63
+ loopComplete: () => void;
64
+ pause: () => void;
65
+ play: () => void;
66
+ update: (position: number, progress: number) => void;
67
+ }[U]) => void;
68
+ };
69
+
70
+ export declare function createTimeline(options?: TimelineOptions): {
71
+ play: () => void;
72
+ pause: () => void;
73
+ finish: () => void;
74
+ restart: () => void;
75
+ seek: (nextPosition: number) => void;
76
+ progress: (p: number) => void;
77
+ tick: () => void;
78
+ getPosition(): number;
79
+ getDuration(): number;
80
+ getProgress(): number;
81
+ isReverse(): boolean;
82
+ add: {
83
+ (target: string | unknown[] | object, keyframes: Properties | Properties[], options?: TweenOptions, position?: number | string): any;
84
+ (target: string | unknown[] | object, keyframes: Properties | Properties[], position?: number | string): any;
85
+ (target: TimelineEventTarget, position?: number | string): any;
86
+ };
87
+ remove: (target: TimelineEventTarget) => void;
88
+ clear: () => void;
89
+ events: TimelineEvent[];
90
+ on: <U extends "pause" | "play" | "complete" | "update" | "begin" | "loopBegin" | "loopComplete">(type: U, callback: {
91
+ begin: () => void;
92
+ loopBegin: () => void;
93
+ complete: () => void;
94
+ loopComplete: () => void;
95
+ pause: () => void;
96
+ play: () => void;
97
+ update: (position: number, progress: number) => void;
98
+ }[U]) => void;
99
+ off: <U extends "pause" | "play" | "complete" | "update" | "begin" | "loopBegin" | "loopComplete">(type: U, callback?: {
100
+ begin: () => void;
101
+ loopBegin: () => void;
102
+ complete: () => void;
103
+ loopComplete: () => void;
104
+ pause: () => void;
105
+ play: () => void;
106
+ update: (position: number, progress: number) => void;
107
+ }[U] | undefined) => void;
108
+ once: <U extends "pause" | "play" | "complete" | "update" | "begin" | "loopBegin" | "loopComplete">(type: U, callback: {
109
+ begin: () => void;
110
+ loopBegin: () => void;
111
+ complete: () => void;
112
+ loopComplete: () => void;
113
+ pause: () => void;
114
+ play: () => void;
115
+ update: (position: number, progress: number) => void;
116
+ }[U]) => void;
117
+ };
118
+
119
+ export declare function css(elem: HTMLElement | SVGElement, prop: CSSStyleDeclarationKeys): string;
120
+
121
+ export declare function css(elem: HTMLElement | SVGElement, prop: keyof HTMLElement | keyof SVGElement): number;
122
+
123
+ export declare function css(elem: HTMLElement | SVGElement, prop: CSSStyleDeclarationKeys | keyof HTMLElement | keyof SVGElement, value: string | number): void;
124
+
125
+ export declare function css(elem: HTMLElement | SVGElement, prop: Record<CSSStyleDeclarationKeys | keyof HTMLElement | keyof SVGElement, string | number>): void;
126
+
127
+ export declare const cssPlugin: Plugin_2< {
128
+ css: "attr" | "css" | "trans";
129
+ }, {
130
+ transforms: {
131
+ map: Map<string, string>;
132
+ };
133
+ }>;
134
+
135
+ declare type CSSStyleDeclarationKeys = keyof Omit<PickStringKey<CSSStyleDeclaration>, "length" | "parentRule">;
136
+
137
+ export declare type Direction = "normal" | "reverse" | "alternate" | "alternate-reverse";
138
+
139
+ export declare type Easing = keyof typeof easings | FunctionalValue<(k: number) => number>;
140
+
141
+ export declare type Easings = {
142
+ linear: (...args: any[]) => (p: number) => number;
143
+ } & {
144
+ [p in EasingStuffNames as `${"easeIn" | "easeOut" | "easeInOut"}${p}`]: (...args: any[]) => (p: number) => number;
145
+ };
146
+
147
+ export declare const easings: Easings;
148
+
149
+ declare type EasingStuffNames = "Quad" | "Cubic" | "Quart" | "Quint" | "Sine" | "Expo" | "Circ" | "Elastic" | "Back" | "Bounce";
150
+
151
+ export declare type FunctionalValue<T> = (target: object, index: number, total: number) => T;
152
+
153
+ export declare function geometry(elem: string | SVGGeometryElement, percent?: number): (prop: string) => SVGValue;
154
+
155
+ export declare function getPrefixedCssProp(name: CSSStyleDeclarationKeys, host?: object): "filter" | "fill" | "stroke" | "animationName" | "flex" | "all" | "offset" | "height" | "width" | "left" | "top" | "cssText" | "item" | "accentColor" | "alignContent" | "alignItems" | "alignSelf" | "alignmentBaseline" | "animation" | "animationComposition" | "animationDelay" | "animationDirection" | "animationDuration" | "animationFillMode" | "animationIterationCount" | "animationPlayState" | "animationTimingFunction" | "appearance" | "aspectRatio" | "backdropFilter" | "backfaceVisibility" | "background" | "backgroundAttachment" | "backgroundBlendMode" | "backgroundClip" | "backgroundColor" | "backgroundImage" | "backgroundOrigin" | "backgroundPosition" | "backgroundPositionX" | "backgroundPositionY" | "backgroundRepeat" | "backgroundSize" | "baselineShift" | "baselineSource" | "blockSize" | "border" | "borderBlock" | "borderBlockColor" | "borderBlockEnd" | "borderBlockEndColor" | "borderBlockEndStyle" | "borderBlockEndWidth" | "borderBlockStart" | "borderBlockStartColor" | "borderBlockStartStyle" | "borderBlockStartWidth" | "borderBlockStyle" | "borderBlockWidth" | "borderBottom" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderCollapse" | "borderColor" | "borderEndEndRadius" | "borderEndStartRadius" | "borderImage" | "borderImageOutset" | "borderImageRepeat" | "borderImageSlice" | "borderImageSource" | "borderImageWidth" | "borderInline" | "borderInlineColor" | "borderInlineEnd" | "borderInlineEndColor" | "borderInlineEndStyle" | "borderInlineEndWidth" | "borderInlineStart" | "borderInlineStartColor" | "borderInlineStartStyle" | "borderInlineStartWidth" | "borderInlineStyle" | "borderInlineWidth" | "borderLeft" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRadius" | "borderRight" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderSpacing" | "borderStartEndRadius" | "borderStartStartRadius" | "borderStyle" | "borderTop" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "borderWidth" | "bottom" | "boxShadow" | "boxSizing" | "breakAfter" | "breakBefore" | "breakInside" | "captionSide" | "caretColor" | "clear" | "clip" | "clipPath" | "clipRule" | "color" | "colorInterpolation" | "colorInterpolationFilters" | "colorScheme" | "columnCount" | "columnFill" | "columnGap" | "columnRule" | "columnRuleColor" | "columnRuleStyle" | "columnRuleWidth" | "columnSpan" | "columnWidth" | "columns" | "contain" | "containIntrinsicBlockSize" | "containIntrinsicHeight" | "containIntrinsicInlineSize" | "containIntrinsicSize" | "containIntrinsicWidth" | "container" | "containerName" | "containerType" | "content" | "contentVisibility" | "counterIncrement" | "counterReset" | "counterSet" | "cssFloat" | "cursor" | "cx" | "cy" | "d" | "direction" | "display" | "dominantBaseline" | "emptyCells" | "fillOpacity" | "fillRule" | "flexBasis" | "flexDirection" | "flexFlow" | "flexGrow" | "flexShrink" | "flexWrap" | "float" | "floodColor" | "floodOpacity" | "font" | "fontFamily" | "fontFeatureSettings" | "fontKerning" | "fontOpticalSizing" | "fontPalette" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontSynthesis" | "fontSynthesisSmallCaps" | "fontSynthesisStyle" | "fontSynthesisWeight" | "fontVariant" | "fontVariantAlternates" | "fontVariantCaps" | "fontVariantEastAsian" | "fontVariantLigatures" | "fontVariantNumeric" | "fontVariantPosition" | "fontVariationSettings" | "fontWeight" | "forcedColorAdjust" | "gap" | "grid" | "gridArea" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridColumn" | "gridColumnEnd" | "gridColumnGap" | "gridColumnStart" | "gridGap" | "gridRow" | "gridRowEnd" | "gridRowGap" | "gridRowStart" | "gridTemplate" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "hyphenateCharacter" | "hyphens" | "imageOrientation" | "imageRendering" | "inlineSize" | "inset" | "insetBlock" | "insetBlockEnd" | "insetBlockStart" | "insetInline" | "insetInlineEnd" | "insetInlineStart" | "isolation" | "justifyContent" | "justifyItems" | "justifySelf" | "letterSpacing" | "lightingColor" | "lineBreak" | "lineHeight" | "listStyle" | "listStyleImage" | "listStylePosition" | "listStyleType" | "margin" | "marginBlock" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInline" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "marker" | "markerEnd" | "markerMid" | "markerStart" | "mask" | "maskClip" | "maskComposite" | "maskImage" | "maskMode" | "maskOrigin" | "maskPosition" | "maskRepeat" | "maskSize" | "maskType" | "mathDepth" | "mathStyle" | "maxBlockSize" | "maxHeight" | "maxInlineSize" | "maxWidth" | "minBlockSize" | "minHeight" | "minInlineSize" | "minWidth" | "mixBlendMode" | "objectFit" | "objectPosition" | "offsetAnchor" | "offsetDistance" | "offsetPath" | "offsetPosition" | "offsetRotate" | "opacity" | "order" | "orphans" | "outline" | "outlineColor" | "outlineOffset" | "outlineStyle" | "outlineWidth" | "overflow" | "overflowAnchor" | "overflowClipMargin" | "overflowWrap" | "overflowX" | "overflowY" | "overscrollBehavior" | "overscrollBehaviorBlock" | "overscrollBehaviorInline" | "overscrollBehaviorX" | "overscrollBehaviorY" | "padding" | "paddingBlock" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInline" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "page" | "pageBreakAfter" | "pageBreakBefore" | "pageBreakInside" | "paintOrder" | "perspective" | "perspectiveOrigin" | "placeContent" | "placeItems" | "placeSelf" | "pointerEvents" | "position" | "printColorAdjust" | "quotes" | "r" | "resize" | "right" | "rotate" | "rowGap" | "rubyPosition" | "rx" | "ry" | "scale" | "scrollBehavior" | "scrollMargin" | "scrollMarginBlock" | "scrollMarginBlockEnd" | "scrollMarginBlockStart" | "scrollMarginBottom" | "scrollMarginInline" | "scrollMarginInlineEnd" | "scrollMarginInlineStart" | "scrollMarginLeft" | "scrollMarginRight" | "scrollMarginTop" | "scrollPadding" | "scrollPaddingBlock" | "scrollPaddingBlockEnd" | "scrollPaddingBlockStart" | "scrollPaddingBottom" | "scrollPaddingInline" | "scrollPaddingInlineEnd" | "scrollPaddingInlineStart" | "scrollPaddingLeft" | "scrollPaddingRight" | "scrollPaddingTop" | "scrollSnapAlign" | "scrollSnapStop" | "scrollSnapType" | "scrollbarColor" | "scrollbarGutter" | "scrollbarWidth" | "shapeImageThreshold" | "shapeMargin" | "shapeOutside" | "shapeRendering" | "stopColor" | "stopOpacity" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "tabSize" | "tableLayout" | "textAlign" | "textAlignLast" | "textAnchor" | "textCombineUpright" | "textDecoration" | "textDecorationColor" | "textDecorationLine" | "textDecorationSkipInk" | "textDecorationStyle" | "textDecorationThickness" | "textEmphasis" | "textEmphasisColor" | "textEmphasisPosition" | "textEmphasisStyle" | "textIndent" | "textOrientation" | "textOverflow" | "textRendering" | "textShadow" | "textTransform" | "textUnderlineOffset" | "textUnderlinePosition" | "textWrap" | "textWrapMode" | "textWrapStyle" | "touchAction" | "transform" | "transformBox" | "transformOrigin" | "transformStyle" | "transition" | "transitionBehavior" | "transitionDelay" | "transitionDuration" | "transitionProperty" | "transitionTimingFunction" | "translate" | "unicodeBidi" | "userSelect" | "vectorEffect" | "verticalAlign" | "visibility" | "webkitAlignContent" | "webkitAlignItems" | "webkitAlignSelf" | "webkitAnimation" | "webkitAnimationDelay" | "webkitAnimationDirection" | "webkitAnimationDuration" | "webkitAnimationFillMode" | "webkitAnimationIterationCount" | "webkitAnimationName" | "webkitAnimationPlayState" | "webkitAnimationTimingFunction" | "webkitAppearance" | "webkitBackfaceVisibility" | "webkitBackgroundClip" | "webkitBackgroundOrigin" | "webkitBackgroundSize" | "webkitBorderBottomLeftRadius" | "webkitBorderBottomRightRadius" | "webkitBorderRadius" | "webkitBorderTopLeftRadius" | "webkitBorderTopRightRadius" | "webkitBoxAlign" | "webkitBoxFlex" | "webkitBoxOrdinalGroup" | "webkitBoxOrient" | "webkitBoxPack" | "webkitBoxShadow" | "webkitBoxSizing" | "webkitFilter" | "webkitFlex" | "webkitFlexBasis" | "webkitFlexDirection" | "webkitFlexFlow" | "webkitFlexGrow" | "webkitFlexShrink" | "webkitFlexWrap" | "webkitJustifyContent" | "webkitLineClamp" | "webkitMask" | "webkitMaskBoxImage" | "webkitMaskBoxImageOutset" | "webkitMaskBoxImageRepeat" | "webkitMaskBoxImageSlice" | "webkitMaskBoxImageSource" | "webkitMaskBoxImageWidth" | "webkitMaskClip" | "webkitMaskComposite" | "webkitMaskImage" | "webkitMaskOrigin" | "webkitMaskPosition" | "webkitMaskRepeat" | "webkitMaskSize" | "webkitOrder" | "webkitPerspective" | "webkitPerspectiveOrigin" | "webkitTextFillColor" | "webkitTextSizeAdjust" | "webkitTextStroke" | "webkitTextStrokeColor" | "webkitTextStrokeWidth" | "webkitTransform" | "webkitTransformOrigin" | "webkitTransformStyle" | "webkitTransition" | "webkitTransitionDelay" | "webkitTransitionDuration" | "webkitTransitionProperty" | "webkitTransitionTimingFunction" | "webkitUserSelect" | "whiteSpace" | "whiteSpaceCollapse" | "widows" | "willChange" | "wordBreak" | "wordSpacing" | "wordWrap" | "writingMode" | "x" | "y" | "zIndex" | "zoom" | "getPropertyPriority" | "getPropertyValue" | "removeProperty" | "setProperty";
156
+
157
+ export declare const interpPlugin: Plugin_2< {
158
+ interp: string[];
159
+ }, any>;
160
+
161
+ export declare type MayFunctionValue<T> = T | FunctionalValue<T>;
162
+
163
+ export declare interface ObjectValue extends TweenOptions {
164
+ value: BaseValue | SpecialValue;
165
+ }
166
+
167
+ declare type PickStringKey<T> = {
168
+ [K in keyof T as K extends string ? K : never]: T[K];
169
+ };
170
+
171
+ declare interface Plugin_2<T extends Record<string, unknown> = any, U extends Record<string, unknown> = any> {
172
+ order: number;
173
+ init?: (tween: Tween<T, U>, terminate: typeof TERMINATE) => void | undefined | typeof TERMINATE;
174
+ update?: (tween: Tween<T, U>, value: string | number[], terminate: typeof TERMINATE) => string | number[] | void | undefined | typeof TERMINATE;
175
+ }
176
+
177
+ export declare interface Properties {
178
+ [p: string]: Value;
179
+ }
180
+
181
+ export declare function random(min: number, max: number): number;
182
+
183
+ export declare const relativePlugin: Plugin_2<any, any>;
184
+
185
+ declare function remove(tick: () => void): void;
186
+
187
+ export declare const setDashoffset: FunctionalValue<number>;
188
+
189
+ export declare type SingleValue = BaseValue | SpecialValue | ObjectValue;
190
+
191
+ export declare class SpecialValue {
192
+ }
193
+
194
+ export declare function stagger(value: number | [number, number], options?: StaggerOptions): (el: object, index: number, total: number) => number;
195
+
196
+ export declare interface StaggerOptions {
197
+ start?: number;
198
+ from?: number | "first" | "center" | "last";
199
+ direction?: "normal" | "reverse";
200
+ easing?: Easing;
201
+ grid?: [number, number] | null;
202
+ axis?: "x" | "y" | null;
203
+ }
204
+
205
+ export declare const svgPlugin: Plugin_2< {
206
+ svg: SVGValue;
207
+ }, any>;
208
+
209
+ export declare class SVGValue extends SpecialValue {
210
+ el: SVGGeometryElement;
211
+ prop: string;
212
+ totalLength: number;
213
+ constructor(el: SVGGeometryElement, prop: string, totalLength: number);
214
+ }
215
+
216
+ declare const TERMINATE: unique symbol;
217
+
218
+ export declare const ticker: {
219
+ add: typeof add;
220
+ remove: typeof remove;
221
+ };
222
+
223
+ export declare interface TimelineCallbackOptions {
224
+ begin?: () => void;
225
+ loopBegin?: () => void;
226
+ complete?: () => void;
227
+ loopComplete?: () => void;
228
+ pause?: () => void;
229
+ play?: () => void;
230
+ update?: (position: number, progress: number) => void;
231
+ }
232
+
233
+ export declare interface TimelineEvent {
234
+ target: TimelineEventTarget;
235
+ position: number | string;
236
+ begin: number;
237
+ end: number;
238
+ }
239
+
240
+ export declare interface TimelineEventTarget {
241
+ getDuration: () => number;
242
+ seek: (position: number) => void;
243
+ tweens?: Tween[];
244
+ events?: TimelineEvent[];
245
+ }
246
+
247
+ export declare interface TimelineOptions extends TimelineCallbackOptions {
248
+ externalTicker?: boolean;
249
+ autoplay?: boolean;
250
+ direction?: Direction;
251
+ loop?: number;
252
+ }
253
+
254
+ export declare interface Tween<T extends {} = {}, U = {}> {
255
+ animatedTarget: AnimatedTarget & U;
256
+ prop: string;
257
+ duration: number;
258
+ delay: number;
259
+ endDelay: number;
260
+ begin: number;
261
+ end: number;
262
+ easing: (k: number) => number;
263
+ data: T;
264
+ from: unknown;
265
+ to: unknown;
266
+ withoutFrom: boolean;
267
+ round: number;
268
+ unit: string;
269
+ operator: string;
270
+ between: Between[];
271
+ }
272
+
273
+ export declare interface TweenOptions {
274
+ duration?: number | FunctionalValue<number>;
275
+ delay?: number | FunctionalValue<number>;
276
+ endDelay?: number | FunctionalValue<number>;
277
+ easing?: Easing;
278
+ round?: number | FunctionalValue<number>;
279
+ }
280
+
281
+ export declare function use(plugin: Plugin_2 | Plugin_2[]): void;
282
+
283
+ export declare type Value = MayFunctionValue<SingleValue | SingleValue[]>;
284
+
285
+ export declare function withFrom(from: MayFunctionValue<BaseValue>, to: MayFunctionValue<BaseValue>): WithFromValue;
286
+
287
+ export declare class WithFromValue extends SpecialValue {
288
+ from: MayFunctionValue<BaseValue>;
289
+ to: MayFunctionValue<BaseValue>;
290
+ constructor(from: MayFunctionValue<BaseValue>, to: MayFunctionValue<BaseValue>);
291
+ }
292
+
293
+ export { }