animejs 4.1.2 → 4.2.0-beta.0

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.
Files changed (191) hide show
  1. package/README.md +18 -8
  2. package/{lib → dist/bundles}/anime.esm.js +6549 -6265
  3. package/dist/bundles/anime.esm.min.js +7 -0
  4. package/dist/bundles/anime.umd.js +8621 -0
  5. package/dist/bundles/anime.umd.min.js +7 -0
  6. package/dist/modules/animatable/animatable.cjs +150 -0
  7. package/dist/modules/animatable/animatable.d.ts +28 -0
  8. package/dist/modules/animatable/animatable.js +147 -0
  9. package/dist/modules/animatable/index.cjs +15 -0
  10. package/dist/modules/animatable/index.d.ts +1 -0
  11. package/dist/modules/animatable/index.js +8 -0
  12. package/dist/modules/animation/additive.cjs +82 -0
  13. package/dist/modules/animation/additive.d.ts +15 -0
  14. package/dist/modules/animation/additive.js +79 -0
  15. package/dist/modules/animation/animation.cjs +660 -0
  16. package/dist/modules/animation/animation.d.ts +47 -0
  17. package/dist/modules/animation/animation.js +657 -0
  18. package/dist/modules/animation/composition.cjs +383 -0
  19. package/dist/modules/animation/composition.d.ts +10 -0
  20. package/dist/modules/animation/composition.js +377 -0
  21. package/dist/modules/animation/index.cjs +15 -0
  22. package/dist/modules/animation/index.d.ts +1 -0
  23. package/dist/modules/animation/index.js +8 -0
  24. package/dist/modules/core/clock.cjs +110 -0
  25. package/dist/modules/core/clock.d.ts +51 -0
  26. package/dist/modules/core/clock.js +108 -0
  27. package/dist/modules/core/colors.cjs +102 -0
  28. package/dist/modules/core/colors.d.ts +2 -0
  29. package/dist/modules/core/colors.js +100 -0
  30. package/dist/modules/core/consts.cjs +154 -0
  31. package/dist/modules/core/consts.d.ts +59 -0
  32. package/dist/modules/core/consts.js +121 -0
  33. package/dist/modules/core/globals.cjs +77 -0
  34. package/dist/modules/core/globals.d.ts +29 -0
  35. package/dist/modules/core/globals.js +72 -0
  36. package/dist/modules/core/helpers.cjs +304 -0
  37. package/dist/modules/core/helpers.d.ts +43 -0
  38. package/dist/modules/core/helpers.js +261 -0
  39. package/dist/modules/core/render.cjs +389 -0
  40. package/dist/modules/core/render.d.ts +4 -0
  41. package/dist/modules/core/render.js +386 -0
  42. package/dist/modules/core/styles.cjs +116 -0
  43. package/dist/modules/core/styles.d.ts +5 -0
  44. package/dist/modules/core/styles.js +113 -0
  45. package/dist/modules/core/targets.cjs +136 -0
  46. package/dist/modules/core/targets.d.ts +118 -0
  47. package/dist/modules/core/targets.js +132 -0
  48. package/dist/modules/core/transforms.cjs +49 -0
  49. package/dist/modules/core/transforms.d.ts +2 -0
  50. package/dist/modules/core/transforms.js +47 -0
  51. package/dist/modules/core/units.cjs +67 -0
  52. package/dist/modules/core/units.d.ts +3 -0
  53. package/dist/modules/core/units.js +65 -0
  54. package/dist/modules/core/values.cjs +215 -0
  55. package/dist/modules/core/values.d.ts +14 -0
  56. package/dist/modules/core/values.js +205 -0
  57. package/dist/modules/draggable/draggable.cjs +1226 -0
  58. package/dist/modules/draggable/draggable.d.ts +272 -0
  59. package/dist/modules/draggable/draggable.js +1223 -0
  60. package/dist/modules/draggable/index.cjs +15 -0
  61. package/dist/modules/draggable/index.d.ts +1 -0
  62. package/dist/modules/draggable/index.js +8 -0
  63. package/dist/modules/easings/cubic-bezier.cjs +64 -0
  64. package/dist/modules/easings/cubic-bezier.d.ts +2 -0
  65. package/dist/modules/easings/cubic-bezier.js +62 -0
  66. package/dist/modules/easings/eases.cjs +149 -0
  67. package/dist/modules/easings/eases.d.ts +111 -0
  68. package/dist/modules/easings/eases.js +146 -0
  69. package/dist/modules/easings/index.cjs +24 -0
  70. package/dist/modules/easings/index.d.ts +6 -0
  71. package/dist/modules/easings/index.js +13 -0
  72. package/dist/modules/easings/irregular.cjs +41 -0
  73. package/dist/modules/easings/irregular.d.ts +2 -0
  74. package/dist/modules/easings/irregular.js +39 -0
  75. package/dist/modules/easings/linear.cjs +59 -0
  76. package/dist/modules/easings/linear.d.ts +2 -0
  77. package/dist/modules/easings/linear.js +57 -0
  78. package/dist/modules/easings/none.cjs +19 -0
  79. package/dist/modules/easings/none.d.ts +8 -0
  80. package/dist/modules/easings/none.js +17 -0
  81. package/dist/modules/easings/parser.cjs +59 -0
  82. package/dist/modules/easings/parser.d.ts +21 -0
  83. package/dist/modules/easings/parser.js +55 -0
  84. package/dist/modules/easings/steps.cjs +30 -0
  85. package/dist/modules/easings/steps.d.ts +2 -0
  86. package/dist/modules/easings/steps.js +28 -0
  87. package/dist/modules/engine/engine.cjs +168 -0
  88. package/dist/modules/engine/engine.d.ts +21 -0
  89. package/dist/modules/engine/engine.js +166 -0
  90. package/dist/modules/engine/index.cjs +14 -0
  91. package/dist/modules/engine/index.d.ts +1 -0
  92. package/dist/modules/engine/index.js +8 -0
  93. package/dist/modules/events/index.cjs +16 -0
  94. package/dist/modules/events/index.d.ts +1 -0
  95. package/dist/modules/events/index.js +8 -0
  96. package/dist/modules/events/scroll.cjs +936 -0
  97. package/dist/modules/events/scroll.d.ts +189 -0
  98. package/dist/modules/events/scroll.js +932 -0
  99. package/dist/modules/index.cjs +103 -0
  100. package/dist/modules/index.d.ts +19 -0
  101. package/dist/modules/index.js +42 -0
  102. package/dist/modules/scope/index.cjs +15 -0
  103. package/dist/modules/scope/index.d.ts +1 -0
  104. package/dist/modules/scope/index.js +8 -0
  105. package/dist/modules/scope/scope.cjs +254 -0
  106. package/dist/modules/scope/scope.d.ts +115 -0
  107. package/dist/modules/scope/scope.js +251 -0
  108. package/dist/modules/spring/index.cjs +15 -0
  109. package/dist/modules/spring/index.d.ts +1 -0
  110. package/dist/modules/spring/index.js +8 -0
  111. package/dist/modules/spring/spring.cjs +133 -0
  112. package/dist/modules/spring/spring.d.ts +37 -0
  113. package/dist/modules/spring/spring.js +130 -0
  114. package/dist/modules/svg/drawable.cjs +119 -0
  115. package/dist/modules/svg/drawable.d.ts +3 -0
  116. package/dist/modules/svg/drawable.js +117 -0
  117. package/dist/modules/svg/helpers.cjs +30 -0
  118. package/dist/modules/svg/helpers.d.ts +2 -0
  119. package/dist/modules/svg/helpers.js +28 -0
  120. package/dist/modules/svg/index.cjs +18 -0
  121. package/dist/modules/svg/index.d.ts +3 -0
  122. package/dist/modules/svg/index.js +10 -0
  123. package/dist/modules/svg/morphto.cjs +58 -0
  124. package/dist/modules/svg/morphto.d.ts +3 -0
  125. package/dist/modules/svg/morphto.js +56 -0
  126. package/dist/modules/svg/motionpath.cjs +79 -0
  127. package/dist/modules/svg/motionpath.d.ts +7 -0
  128. package/dist/modules/svg/motionpath.js +77 -0
  129. package/dist/modules/text/index.cjs +16 -0
  130. package/dist/modules/text/index.d.ts +1 -0
  131. package/dist/modules/text/index.js +8 -0
  132. package/dist/modules/text/split.cjs +488 -0
  133. package/dist/modules/text/split.d.ts +62 -0
  134. package/dist/modules/text/split.js +484 -0
  135. package/dist/modules/timeline/index.cjs +15 -0
  136. package/dist/modules/timeline/index.d.ts +1 -0
  137. package/dist/modules/timeline/index.js +8 -0
  138. package/dist/modules/timeline/position.cjs +72 -0
  139. package/dist/modules/timeline/position.d.ts +3 -0
  140. package/dist/modules/timeline/position.js +70 -0
  141. package/dist/modules/timeline/timeline.cjs +312 -0
  142. package/dist/modules/timeline/timeline.d.ts +163 -0
  143. package/dist/modules/timeline/timeline.js +309 -0
  144. package/dist/modules/timer/index.cjs +15 -0
  145. package/dist/modules/timer/index.d.ts +1 -0
  146. package/dist/modules/timer/index.js +8 -0
  147. package/dist/modules/timer/timer.cjs +491 -0
  148. package/dist/modules/timer/timer.d.ts +141 -0
  149. package/dist/modules/timer/timer.js +488 -0
  150. package/dist/modules/types/index.d.ts +387 -0
  151. package/dist/modules/utils/chainable.cjs +190 -0
  152. package/dist/modules/utils/chainable.d.ts +135 -0
  153. package/dist/modules/utils/chainable.js +177 -0
  154. package/dist/modules/utils/index.cjs +43 -0
  155. package/dist/modules/utils/index.d.ts +5 -0
  156. package/dist/modules/utils/index.js +14 -0
  157. package/dist/modules/utils/number.cjs +97 -0
  158. package/dist/modules/utils/number.d.ts +9 -0
  159. package/dist/modules/utils/number.js +85 -0
  160. package/dist/modules/utils/random.cjs +77 -0
  161. package/dist/modules/utils/random.d.ts +22 -0
  162. package/dist/modules/utils/random.js +72 -0
  163. package/dist/modules/utils/stagger.cjs +122 -0
  164. package/dist/modules/utils/stagger.d.ts +30 -0
  165. package/dist/modules/utils/stagger.js +120 -0
  166. package/dist/modules/utils/target.cjs +130 -0
  167. package/dist/modules/utils/target.d.ts +126 -0
  168. package/dist/modules/utils/target.js +125 -0
  169. package/dist/modules/utils/time.cjs +57 -0
  170. package/dist/modules/utils/time.d.ts +5 -0
  171. package/dist/modules/utils/time.js +54 -0
  172. package/dist/modules/waapi/composition.cjs +89 -0
  173. package/dist/modules/waapi/composition.d.ts +4 -0
  174. package/dist/modules/waapi/composition.js +86 -0
  175. package/dist/modules/waapi/index.cjs +15 -0
  176. package/dist/modules/waapi/index.d.ts +1 -0
  177. package/dist/modules/waapi/index.js +8 -0
  178. package/dist/modules/waapi/waapi.cjs +473 -0
  179. package/dist/modules/waapi/waapi.d.ts +114 -0
  180. package/dist/modules/waapi/waapi.js +470 -0
  181. package/package.json +130 -33
  182. package/lib/anime.cjs +0 -9
  183. package/lib/anime.esm.min.js +0 -9
  184. package/lib/anime.iife.js +0 -9
  185. package/lib/anime.iife.min.js +0 -9
  186. package/lib/anime.min.cjs +0 -9
  187. package/lib/anime.umd.js +0 -9
  188. package/lib/anime.umd.min.js +0 -9
  189. package/lib/gui/index.js +0 -6341
  190. package/types/index.d.ts +0 -1081
  191. package/types/index.js +0 -7407
@@ -0,0 +1,312 @@
1
+ /**
2
+ * Anime.js - timeline - CJS
3
+ * @version v4.2.0
4
+ * @license MIT
5
+ * @copyright 2025 - Julian Garnier
6
+ */
7
+
8
+ 'use strict';
9
+
10
+ var globals = require('../core/globals.cjs');
11
+ var consts = require('../core/consts.cjs');
12
+ var helpers = require('../core/helpers.cjs');
13
+ var values = require('../core/values.cjs');
14
+ var targets = require('../core/targets.cjs');
15
+ var render = require('../core/render.cjs');
16
+ var styles = require('../core/styles.cjs');
17
+ var composition = require('../animation/composition.cjs');
18
+ var animation = require('../animation/animation.cjs');
19
+ var timer = require('../timer/timer.cjs');
20
+ var eases = require('../easings/eases.cjs');
21
+ var position = require('./position.cjs');
22
+
23
+ /**
24
+ * @import {
25
+ * TargetsParam,
26
+ * Callback,
27
+ * Tickable,
28
+ * TimerParams,
29
+ * AnimationParams,
30
+ * Target,
31
+ * Renderable,
32
+ * TimelineParams,
33
+ * DefaultsParams,
34
+ * TimelinePosition,
35
+ * StaggerFunction,
36
+ * } from '../types/index.js'
37
+ */
38
+
39
+ /**
40
+ * @import {
41
+ * WAAPIAnimation,
42
+ * } from '../waapi/waapi.js'
43
+ */
44
+
45
+ /**
46
+ * @param {Timeline} tl
47
+ * @return {Number}
48
+ */
49
+ function getTimelineTotalDuration(tl) {
50
+ return helpers.clampInfinity(((tl.iterationDuration + tl._loopDelay) * tl.iterationCount) - tl._loopDelay) || consts.minValue;
51
+ }
52
+
53
+ /**
54
+ * @overload
55
+ * @param {TimerParams} childParams
56
+ * @param {Timeline} tl
57
+ * @param {Number} timePosition
58
+ * @return {Timeline}
59
+ *
60
+ * @overload
61
+ * @param {AnimationParams} childParams
62
+ * @param {Timeline} tl
63
+ * @param {Number} timePosition
64
+ * @param {TargetsParam} targets
65
+ * @param {Number} [index]
66
+ * @param {Number} [length]
67
+ * @return {Timeline}
68
+ *
69
+ * @param {TimerParams|AnimationParams} childParams
70
+ * @param {Timeline} tl
71
+ * @param {Number} timePosition
72
+ * @param {TargetsParam} [targets]
73
+ * @param {Number} [index]
74
+ * @param {Number} [length]
75
+ */
76
+ function addTlChild(childParams, tl, timePosition, targets, index, length) {
77
+ const isSetter = helpers.isNum(childParams.duration) && /** @type {Number} */(childParams.duration) <= consts.minValue;
78
+ // Offset the tl position with -minValue for 0 duration animations or .set() calls in order to align their end value with the defined position
79
+ const adjustedPosition = isSetter ? timePosition - consts.minValue : timePosition;
80
+ render.tick(tl, adjustedPosition, 1, 1, consts.tickModes.AUTO);
81
+ const tlChild = targets ?
82
+ new animation.JSAnimation(targets,/** @type {AnimationParams} */(childParams), tl, adjustedPosition, false, index, length) :
83
+ new timer.Timer(/** @type {TimerParams} */(childParams), tl, adjustedPosition);
84
+ tlChild.init(1);
85
+ // TODO: Might be better to insert at a position relative to startTime?
86
+ helpers.addChild(tl, tlChild);
87
+ helpers.forEachChildren(tl, (/** @type {Renderable} */child) => {
88
+ const childTLOffset = child._offset + child._delay;
89
+ const childDur = childTLOffset + child.duration;
90
+ if (childDur > tl.iterationDuration) tl.iterationDuration = childDur;
91
+ });
92
+ tl.duration = getTimelineTotalDuration(tl);
93
+ return tl;
94
+ }
95
+
96
+ class Timeline extends timer.Timer {
97
+
98
+ /**
99
+ * @param {TimelineParams} [parameters]
100
+ */
101
+ constructor(parameters = {}) {
102
+ super(/** @type {TimerParams&TimelineParams} */(parameters), null, 0);
103
+ /** @type {Number} */
104
+ this.duration = 0; // TL duration starts at 0 and grows when adding children
105
+ /** @type {Record<String, Number>} */
106
+ this.labels = {};
107
+ const defaultsParams = parameters.defaults;
108
+ const globalDefaults = globals.globals.defaults;
109
+ /** @type {DefaultsParams} */
110
+ this.defaults = defaultsParams ? helpers.mergeObjects(defaultsParams, globalDefaults) : globalDefaults;
111
+ /** @type {Callback<this>} */
112
+ this.onRender = parameters.onRender || globalDefaults.onRender;
113
+ const tlPlaybackEase = values.setValue(parameters.playbackEase, globalDefaults.playbackEase);
114
+ this._ease = tlPlaybackEase ? eases.parseEase(tlPlaybackEase) : null;
115
+ /** @type {Number} */
116
+ this.iterationDuration = 0;
117
+ }
118
+
119
+ /**
120
+ * @overload
121
+ * @param {TargetsParam} a1
122
+ * @param {AnimationParams} a2
123
+ * @param {TimelinePosition|StaggerFunction<Number|String>} [a3]
124
+ * @return {this}
125
+ *
126
+ * @overload
127
+ * @param {TimerParams} a1
128
+ * @param {TimelinePosition} [a2]
129
+ * @return {this}
130
+ *
131
+ * @param {TargetsParam|TimerParams} a1
132
+ * @param {TimelinePosition|AnimationParams} a2
133
+ * @param {TimelinePosition|StaggerFunction<Number|String>} [a3]
134
+ */
135
+ add(a1, a2, a3) {
136
+ const isAnim = helpers.isObj(a2);
137
+ const isTimer = helpers.isObj(a1);
138
+ if (isAnim || isTimer) {
139
+ this._hasChildren = true;
140
+ if (isAnim) {
141
+ const childParams = /** @type {AnimationParams} */(a2);
142
+ // Check for function for children stagger positions
143
+ if (helpers.isFnc(a3)) {
144
+ const staggeredPosition = a3;
145
+ const parsedTargetsArray = targets.parseTargets(/** @type {TargetsParam} */(a1));
146
+ // Store initial duration before adding new children that will change the duration
147
+ const tlDuration = this.duration;
148
+ // Store initial _iterationDuration before adding new children that will change the duration
149
+ const tlIterationDuration = this.iterationDuration;
150
+ // Store the original id in order to add specific indexes to the new animations ids
151
+ const id = childParams.id;
152
+ let i = 0;
153
+ /** @type {Number} */
154
+ const parsedLength = (parsedTargetsArray.length);
155
+ parsedTargetsArray.forEach((/** @type {Target} */target) => {
156
+ // Create a new parameter object for each staggered children
157
+ const staggeredChildParams = { ...childParams };
158
+ // Reset the duration of the timeline iteration before each stagger to prevent wrong start value calculation
159
+ this.duration = tlDuration;
160
+ this.iterationDuration = tlIterationDuration;
161
+ if (!helpers.isUnd(id)) staggeredChildParams.id = id + '-' + i;
162
+ addTlChild(
163
+ staggeredChildParams,
164
+ this,
165
+ position.parseTimelinePosition(this, staggeredPosition(target, i, parsedLength, this)),
166
+ target,
167
+ i,
168
+ parsedLength
169
+ );
170
+ i++;
171
+ });
172
+ } else {
173
+ addTlChild(
174
+ childParams,
175
+ this,
176
+ position.parseTimelinePosition(this, a3),
177
+ /** @type {TargetsParam} */(a1),
178
+ );
179
+ }
180
+ } else {
181
+ // It's a Timer
182
+ addTlChild(
183
+ /** @type TimerParams */(a1),
184
+ this,
185
+ position.parseTimelinePosition(this,a2),
186
+ );
187
+ }
188
+ return this.init(1); // 1 = internalRender
189
+ }
190
+ }
191
+
192
+ /**
193
+ * @overload
194
+ * @param {Tickable} [synced]
195
+ * @param {TimelinePosition} [position]
196
+ * @return {this}
197
+ *
198
+ * @overload
199
+ * @param {globalThis.Animation} [synced]
200
+ * @param {TimelinePosition} [position]
201
+ * @return {this}
202
+ *
203
+ * @overload
204
+ * @param {WAAPIAnimation} [synced]
205
+ * @param {TimelinePosition} [position]
206
+ * @return {this}
207
+ *
208
+ * @param {Tickable|WAAPIAnimation|globalThis.Animation} [synced]
209
+ * @param {TimelinePosition} [position]
210
+ */
211
+ sync(synced, position) {
212
+ if (helpers.isUnd(synced) || synced && helpers.isUnd(synced.pause)) return this;
213
+ synced.pause();
214
+ const duration = +(/** @type {globalThis.Animation} */(synced).effect ? /** @type {globalThis.Animation} */(synced).effect.getTiming().duration : /** @type {Tickable} */(synced).duration);
215
+ return this.add(synced, { currentTime: [0, duration], duration, ease: 'linear' }, position);
216
+ }
217
+
218
+ /**
219
+ * @param {TargetsParam} targets
220
+ * @param {AnimationParams} parameters
221
+ * @param {TimelinePosition} [position]
222
+ * @return {this}
223
+ */
224
+ set(targets, parameters, position) {
225
+ if (helpers.isUnd(parameters)) return this;
226
+ parameters.duration = consts.minValue;
227
+ parameters.composition = consts.compositionTypes.replace;
228
+ return this.add(targets, parameters, position);
229
+ }
230
+
231
+ /**
232
+ * @param {Callback<Timer>} callback
233
+ * @param {TimelinePosition} [position]
234
+ * @return {this}
235
+ */
236
+ call(callback, position) {
237
+ if (helpers.isUnd(callback) || callback && !helpers.isFnc(callback)) return this;
238
+ return this.add({ duration: 0, onComplete: () => callback(this) }, position);
239
+ }
240
+
241
+ /**
242
+ * @param {String} labelName
243
+ * @param {TimelinePosition} [position]
244
+ * @return {this}
245
+ *
246
+ */
247
+ label(labelName, position$1) {
248
+ if (helpers.isUnd(labelName) || labelName && !helpers.isStr(labelName)) return this;
249
+ this.labels[labelName] = position.parseTimelinePosition(this, position$1);
250
+ return this;
251
+ }
252
+
253
+ /**
254
+ * @param {TargetsParam} targets
255
+ * @param {String} [propertyName]
256
+ * @return {this}
257
+ */
258
+ remove(targets$1, propertyName) {
259
+ composition.removeTargetsFromRenderable(targets.parseTargets(targets$1), this, propertyName);
260
+ return this;
261
+ }
262
+
263
+ /**
264
+ * @param {Number} newDuration
265
+ * @return {this}
266
+ */
267
+ stretch(newDuration) {
268
+ const currentDuration = this.duration;
269
+ if (currentDuration === helpers.normalizeTime(newDuration)) return this;
270
+ const timeScale = newDuration / currentDuration;
271
+ const labels = this.labels;
272
+ helpers.forEachChildren(this, (/** @type {JSAnimation} */child) => child.stretch(child.duration * timeScale));
273
+ for (let labelName in labels) labels[labelName] *= timeScale;
274
+ return super.stretch(newDuration);
275
+ }
276
+
277
+ /**
278
+ * @return {this}
279
+ */
280
+ refresh() {
281
+ helpers.forEachChildren(this, (/** @type {JSAnimation} */child) => {
282
+ if (child.refresh) child.refresh();
283
+ });
284
+ return this;
285
+ }
286
+
287
+ /**
288
+ * @return {this}
289
+ */
290
+ revert() {
291
+ super.revert();
292
+ helpers.forEachChildren(this, (/** @type {JSAnimation} */child) => child.revert, true);
293
+ return styles.cleanInlineStyles(this);
294
+ }
295
+
296
+ /**
297
+ * @param {Callback<this>} [callback]
298
+ * @return {Promise}
299
+ */
300
+ then(callback) {
301
+ return super.then(callback);
302
+ }
303
+ }
304
+
305
+ /**
306
+ * @param {TimelineParams} [parameters]
307
+ * @return {Timeline}
308
+ */
309
+ const createTimeline = parameters => new Timeline(parameters).init();
310
+
311
+ exports.Timeline = Timeline;
312
+ exports.createTimeline = createTimeline;
@@ -0,0 +1,163 @@
1
+ export class Timeline extends Timer {
2
+ /**
3
+ * @param {TimelineParams} [parameters]
4
+ */
5
+ constructor(parameters?: TimelineParams);
6
+ /** @type {Record<String, Number>} */
7
+ labels: Record<string, number>;
8
+ /** @type {DefaultsParams} */
9
+ defaults: DefaultsParams;
10
+ /** @type {Callback<this>} */
11
+ onRender: Callback<this>;
12
+ _ease: import("../types/index.js").EasingFunction;
13
+ /**
14
+ * @overload
15
+ * @param {TargetsParam} a1
16
+ * @param {AnimationParams} a2
17
+ * @param {TimelinePosition|StaggerFunction<Number|String>} [a3]
18
+ * @return {this}
19
+ *
20
+ * @overload
21
+ * @param {TimerParams} a1
22
+ * @param {TimelinePosition} [a2]
23
+ * @return {this}
24
+ *
25
+ * @param {TargetsParam|TimerParams} a1
26
+ * @param {TimelinePosition|AnimationParams} a2
27
+ * @param {TimelinePosition|StaggerFunction<Number|String>} [a3]
28
+ */
29
+ add(a1: TargetsParam, a2: AnimationParams, a3?: TimelinePosition | StaggerFunction<number | string>): this;
30
+ /**
31
+ * @overload
32
+ * @param {TargetsParam} a1
33
+ * @param {AnimationParams} a2
34
+ * @param {TimelinePosition|StaggerFunction<Number|String>} [a3]
35
+ * @return {this}
36
+ *
37
+ * @overload
38
+ * @param {TimerParams} a1
39
+ * @param {TimelinePosition} [a2]
40
+ * @return {this}
41
+ *
42
+ * @param {TargetsParam|TimerParams} a1
43
+ * @param {TimelinePosition|AnimationParams} a2
44
+ * @param {TimelinePosition|StaggerFunction<Number|String>} [a3]
45
+ */
46
+ add(a1: TimerParams, a2?: TimelinePosition): this;
47
+ /**
48
+ * @overload
49
+ * @param {Tickable} [synced]
50
+ * @param {TimelinePosition} [position]
51
+ * @return {this}
52
+ *
53
+ * @overload
54
+ * @param {globalThis.Animation} [synced]
55
+ * @param {TimelinePosition} [position]
56
+ * @return {this}
57
+ *
58
+ * @overload
59
+ * @param {WAAPIAnimation} [synced]
60
+ * @param {TimelinePosition} [position]
61
+ * @return {this}
62
+ *
63
+ * @param {Tickable|WAAPIAnimation|globalThis.Animation} [synced]
64
+ * @param {TimelinePosition} [position]
65
+ */
66
+ sync(synced?: Tickable, position?: TimelinePosition): this;
67
+ /**
68
+ * @overload
69
+ * @param {Tickable} [synced]
70
+ * @param {TimelinePosition} [position]
71
+ * @return {this}
72
+ *
73
+ * @overload
74
+ * @param {globalThis.Animation} [synced]
75
+ * @param {TimelinePosition} [position]
76
+ * @return {this}
77
+ *
78
+ * @overload
79
+ * @param {WAAPIAnimation} [synced]
80
+ * @param {TimelinePosition} [position]
81
+ * @return {this}
82
+ *
83
+ * @param {Tickable|WAAPIAnimation|globalThis.Animation} [synced]
84
+ * @param {TimelinePosition} [position]
85
+ */
86
+ sync(synced?: globalThis.Animation, position?: TimelinePosition): this;
87
+ /**
88
+ * @overload
89
+ * @param {Tickable} [synced]
90
+ * @param {TimelinePosition} [position]
91
+ * @return {this}
92
+ *
93
+ * @overload
94
+ * @param {globalThis.Animation} [synced]
95
+ * @param {TimelinePosition} [position]
96
+ * @return {this}
97
+ *
98
+ * @overload
99
+ * @param {WAAPIAnimation} [synced]
100
+ * @param {TimelinePosition} [position]
101
+ * @return {this}
102
+ *
103
+ * @param {Tickable|WAAPIAnimation|globalThis.Animation} [synced]
104
+ * @param {TimelinePosition} [position]
105
+ */
106
+ sync(synced?: WAAPIAnimation, position?: TimelinePosition): this;
107
+ /**
108
+ * @param {TargetsParam} targets
109
+ * @param {AnimationParams} parameters
110
+ * @param {TimelinePosition} [position]
111
+ * @return {this}
112
+ */
113
+ set(targets: TargetsParam, parameters: AnimationParams, position?: TimelinePosition): this;
114
+ /**
115
+ * @param {Callback<Timer>} callback
116
+ * @param {TimelinePosition} [position]
117
+ * @return {this}
118
+ */
119
+ call(callback: Callback<Timer>, position?: TimelinePosition): this;
120
+ /**
121
+ * @param {String} labelName
122
+ * @param {TimelinePosition} [position]
123
+ * @return {this}
124
+ *
125
+ */
126
+ label(labelName: string, position?: TimelinePosition): this;
127
+ /**
128
+ * @param {TargetsParam} targets
129
+ * @param {String} [propertyName]
130
+ * @return {this}
131
+ */
132
+ remove(targets: TargetsParam, propertyName?: string): this;
133
+ /**
134
+ * @param {Number} newDuration
135
+ * @return {this}
136
+ */
137
+ stretch(newDuration: number): this;
138
+ /**
139
+ * @return {this}
140
+ */
141
+ refresh(): this;
142
+ /**
143
+ * @return {this}
144
+ */
145
+ revert(): this;
146
+ /**
147
+ * @param {Callback<this>} [callback]
148
+ * @return {Promise}
149
+ */
150
+ then(callback?: Callback<this>): Promise<any>;
151
+ }
152
+ export function createTimeline(parameters?: TimelineParams): Timeline;
153
+ import { Timer } from '../timer/timer.js';
154
+ import type { DefaultsParams } from '../types/index.js';
155
+ import type { Callback } from '../types/index.js';
156
+ import type { TargetsParam } from '../types/index.js';
157
+ import type { AnimationParams } from '../types/index.js';
158
+ import type { TimelinePosition } from '../types/index.js';
159
+ import type { StaggerFunction } from '../types/index.js';
160
+ import type { TimerParams } from '../types/index.js';
161
+ import type { Tickable } from '../types/index.js';
162
+ import type { WAAPIAnimation } from '../waapi/waapi.js';
163
+ import type { TimelineParams } from '../types/index.js';