funnel-gfx-wc 0.1.107 → 0.1.109

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.
@@ -398,7 +398,7 @@ var consts = {};
398
398
 
399
399
  /**
400
400
  * Anime.js - core - CJS
401
- * @version v4.2.0
401
+ * @version v4.2.1
402
402
  * @license MIT
403
403
  * @copyright 2025 - Julian Garnier
404
404
  */
@@ -568,7 +568,7 @@ var globals = {};
568
568
 
569
569
  /**
570
570
  * Anime.js - core - CJS
571
- * @version v4.2.0
571
+ * @version v4.2.1
572
572
  * @license MIT
573
573
  * @copyright 2025 - Julian Garnier
574
574
  */
@@ -637,7 +637,7 @@ function requireGlobals () {
637
637
  tickThreshold: 200,
638
638
  };
639
639
 
640
- const globalVersions = { version: '4.2.0', engine: null };
640
+ const globalVersions = { version: '4.2.1', engine: null };
641
641
 
642
642
  if (consts.isBrowser) {
643
643
  if (!consts.win.AnimeJS) consts.win.AnimeJS = [];
@@ -653,7 +653,7 @@ function requireGlobals () {
653
653
 
654
654
  /**
655
655
  * Anime.js - core - CJS
656
- * @version v4.2.0
656
+ * @version v4.2.1
657
657
  * @license MIT
658
658
  * @copyright 2025 - Julian Garnier
659
659
  */
@@ -968,7 +968,7 @@ var transforms = {};
968
968
 
969
969
  /**
970
970
  * Anime.js - core - CJS
971
- * @version v4.2.0
971
+ * @version v4.2.1
972
972
  * @license MIT
973
973
  * @copyright 2025 - Julian Garnier
974
974
  */
@@ -1026,7 +1026,7 @@ var colors = {};
1026
1026
 
1027
1027
  /**
1028
1028
  * Anime.js - core - CJS
1029
- * @version v4.2.0
1029
+ * @version v4.2.1
1030
1030
  * @license MIT
1031
1031
  * @copyright 2025 - Julian Garnier
1032
1032
  */
@@ -1135,7 +1135,7 @@ function requireColors () {
1135
1135
 
1136
1136
  /**
1137
1137
  * Anime.js - core - CJS
1138
- * @version v4.2.0
1138
+ * @version v4.2.1
1139
1139
  * @license MIT
1140
1140
  * @copyright 2025 - Julian Garnier
1141
1141
  */
@@ -1370,7 +1370,7 @@ var render = {};
1370
1370
 
1371
1371
  /**
1372
1372
  * Anime.js - core - CJS
1373
- * @version v4.2.0
1373
+ * @version v4.2.1
1374
1374
  * @license MIT
1375
1375
  * @copyright 2025 - Julian Garnier
1376
1376
  */
@@ -1772,7 +1772,7 @@ var styles = {};
1772
1772
 
1773
1773
  /**
1774
1774
  * Anime.js - core - CJS
1775
- * @version v4.2.0
1775
+ * @version v4.2.1
1776
1776
  * @license MIT
1777
1777
  * @copyright 2025 - Julian Garnier
1778
1778
  */
@@ -1899,7 +1899,7 @@ var clock = {};
1899
1899
 
1900
1900
  /**
1901
1901
  * Anime.js - core - CJS
1902
- * @version v4.2.0
1902
+ * @version v4.2.1
1903
1903
  * @license MIT
1904
1904
  * @copyright 2025 - Julian Garnier
1905
1905
  */
@@ -2018,7 +2018,7 @@ var additive = {};
2018
2018
 
2019
2019
  /**
2020
2020
  * Anime.js - animation - CJS
2021
- * @version v4.2.0
2021
+ * @version v4.2.1
2022
2022
  * @license MIT
2023
2023
  * @copyright 2025 - Julian Garnier
2024
2024
  */
@@ -2107,7 +2107,7 @@ function requireAdditive () {
2107
2107
 
2108
2108
  /**
2109
2109
  * Anime.js - engine - CJS
2110
- * @version v4.2.0
2110
+ * @version v4.2.1
2111
2111
  * @license MIT
2112
2112
  * @copyright 2025 - Julian Garnier
2113
2113
  */
@@ -2282,7 +2282,7 @@ function requireEngine () {
2282
2282
 
2283
2283
  /**
2284
2284
  * Anime.js - animation - CJS
2285
- * @version v4.2.0
2285
+ * @version v4.2.1
2286
2286
  * @license MIT
2287
2287
  * @copyright 2025 - Julian Garnier
2288
2288
  */
@@ -2672,7 +2672,7 @@ function requireComposition$1 () {
2672
2672
 
2673
2673
  /**
2674
2674
  * Anime.js - timer - CJS
2675
- * @version v4.2.0
2675
+ * @version v4.2.1
2676
2676
  * @license MIT
2677
2677
  * @copyright 2025 - Julian Garnier
2678
2678
  */
@@ -2733,7 +2733,7 @@ function requireTimer () {
2733
2733
  if (timer._hasChildren) {
2734
2734
  helpers.forEachChildren(timer, reviveTimer);
2735
2735
  } else {
2736
- helpers.forEachChildren(timer, (/** @type {Tween} tween*/tween) => {
2736
+ helpers.forEachChildren(timer, (/** @type {Tween} tween */tween) => {
2737
2737
  if (tween._composition !== consts.compositionTypes.none) {
2738
2738
  composition.composeTween(tween, composition.getTweenSiblings(tween.target, tween.property));
2739
2739
  }
@@ -2790,7 +2790,6 @@ function requireTimer () {
2790
2790
  /** @type {Number} */(timerLoop) < 0 ? Infinity :
2791
2791
  /** @type {Number} */(timerLoop) + 1;
2792
2792
 
2793
-
2794
2793
  let offsetPosition = 0;
2795
2794
 
2796
2795
  if (parent) {
@@ -2880,7 +2879,7 @@ function requireTimer () {
2880
2879
  }
2881
2880
 
2882
2881
  set cancelled(cancelled) {
2883
- cancelled ? this.cancel() : this.reset(1).play();
2882
+ cancelled ? this.cancel() : this.reset(true).play();
2884
2883
  }
2885
2884
 
2886
2885
  get currentTime() {
@@ -2945,10 +2944,10 @@ function requireTimer () {
2945
2944
  }
2946
2945
 
2947
2946
  /**
2948
- * @param {Number} internalRender
2947
+ * @param {Boolean} [softReset]
2949
2948
  * @return {this}
2950
2949
  */
2951
- reset(internalRender = 0) {
2950
+ reset(softReset = false) {
2952
2951
  // If cancelled, revive the timer before rendering in order to have propertly composed tweens siblings
2953
2952
  reviveTimer(this);
2954
2953
  if (this._reversed && !this._reverse) this.reversed = false;
@@ -2957,7 +2956,7 @@ function requireTimer () {
2957
2956
  // NOTE: This is only required for Timelines and might be better to move to the Timeline class?
2958
2957
  this._iterationTime = this.iterationDuration;
2959
2958
  // Set tickMode to tickModes.FORCE to force rendering
2960
- render.tick(this, 0, 1, internalRender, consts.tickModes.FORCE);
2959
+ render.tick(this, 0, 1, ~~softReset, consts.tickModes.FORCE);
2961
2960
  // Reset timer properties after revive / render to make sure the props are not updated again
2962
2961
  resetTimerProperties(this);
2963
2962
  // Also reset children properties
@@ -2968,16 +2967,16 @@ function requireTimer () {
2968
2967
  }
2969
2968
 
2970
2969
  /**
2971
- * @param {Number} internalRender
2970
+ * @param {Boolean} internalRender
2972
2971
  * @return {this}
2973
2972
  */
2974
- init(internalRender = 0) {
2973
+ init(internalRender = false) {
2975
2974
  this.fps = this._fps;
2976
2975
  this.speed = this._speed;
2977
2976
  // Manually calling .init() on timelines should render all children intial state
2978
2977
  // Forces all children to render once then render to 0 when reseted
2979
2978
  if (!internalRender && this._hasChildren) {
2980
- render.tick(this, this.duration, 1, internalRender, consts.tickModes.FORCE);
2979
+ render.tick(this, this.duration, 1, ~~internalRender, consts.tickModes.FORCE);
2981
2980
  }
2982
2981
  this.reset(internalRender);
2983
2982
  // Make sure to set autoplay to false to child timers so it doesn't attempt to autoplay / link
@@ -3031,7 +3030,7 @@ function requireTimer () {
3031
3030
 
3032
3031
  /** @return {this} */
3033
3032
  restart() {
3034
- return this.reset(0).resume();
3033
+ return this.reset().resume();
3035
3034
  }
3036
3035
 
3037
3036
  /**
@@ -3134,8 +3133,12 @@ function requireTimer () {
3134
3133
  }
3135
3134
 
3136
3135
  /**
3137
- * @param {Callback<this>} [callback]
3138
- * @return {Promise}
3136
+ * @typedef {this & {then: null}} ResolvedTimer
3137
+ */
3138
+
3139
+ /**
3140
+ * @param {Callback<ResolvedTimer>} [callback]
3141
+ * @return Promise<this>
3139
3142
  */
3140
3143
  then(callback = consts.noop) {
3141
3144
  const then = this.then;
@@ -3143,7 +3146,7 @@ function requireTimer () {
3143
3146
  // this.then = null prevents infinite recursion if returned by an async function
3144
3147
  // https://github.com/juliangarnierorg/anime-beta/issues/26
3145
3148
  this.then = null;
3146
- callback(this);
3149
+ callback(/** @type {ResolvedTimer} */(this));
3147
3150
  this.then = then;
3148
3151
  this._resolve = consts.noop;
3149
3152
  };
@@ -3174,7 +3177,7 @@ var targets = {};
3174
3177
 
3175
3178
  /**
3176
3179
  * Anime.js - core - CJS
3177
- * @version v4.2.0
3180
+ * @version v4.2.1
3178
3181
  * @license MIT
3179
3182
  * @copyright 2025 - Julian Garnier
3180
3183
  */
@@ -3319,7 +3322,7 @@ var units = {};
3319
3322
 
3320
3323
  /**
3321
3324
  * Anime.js - core - CJS
3322
- * @version v4.2.0
3325
+ * @version v4.2.1
3323
3326
  * @license MIT
3324
3327
  * @copyright 2025 - Julian Garnier
3325
3328
  */
@@ -3396,7 +3399,7 @@ var none = {};
3396
3399
 
3397
3400
  /**
3398
3401
  * Anime.js - easings - CJS
3399
- * @version v4.2.0
3402
+ * @version v4.2.1
3400
3403
  * @license MIT
3401
3404
  * @copyright 2025 - Julian Garnier
3402
3405
  */
@@ -3422,7 +3425,7 @@ function requireNone () {
3422
3425
 
3423
3426
  /**
3424
3427
  * Anime.js - easings - CJS
3425
- * @version v4.2.0
3428
+ * @version v4.2.1
3426
3429
  * @license MIT
3427
3430
  * @copyright 2025 - Julian Garnier
3428
3431
  */
@@ -3620,7 +3623,7 @@ function requireParser () {
3620
3623
 
3621
3624
  /**
3622
3625
  * Anime.js - animation - CJS
3623
- * @version v4.2.0
3626
+ * @version v4.2.1
3624
3627
  * @license MIT
3625
3628
  * @copyright 2025 - Julian Garnier
3626
3629
  */
@@ -4271,8 +4274,12 @@ function requireAnimation () {
4271
4274
  }
4272
4275
 
4273
4276
  /**
4274
- * @param {Callback<this>} [callback]
4275
- * @return {Promise}
4277
+ * @typedef {this & {then: null}} ResolvedJSAnimation
4278
+ */
4279
+
4280
+ /**
4281
+ * @param {Callback<ResolvedJSAnimation>} [callback]
4282
+ * @return Promise<this>
4276
4283
  */
4277
4284
  then(callback) {
4278
4285
  return super.then(callback);
@@ -4298,7 +4305,7 @@ var position = {};
4298
4305
 
4299
4306
  /**
4300
4307
  * Anime.js - timeline - CJS
4301
- * @version v4.2.0
4308
+ * @version v4.2.1
4302
4309
  * @license MIT
4303
4310
  * @copyright 2025 - Julian Garnier
4304
4311
  */
@@ -4377,7 +4384,7 @@ function requirePosition () {
4377
4384
 
4378
4385
  /**
4379
4386
  * Anime.js - timeline - CJS
4380
- * @version v4.2.0
4387
+ * @version v4.2.1
4381
4388
  * @license MIT
4382
4389
  * @copyright 2025 - Julian Garnier
4383
4390
  */
@@ -4462,7 +4469,7 @@ function requireTimeline () {
4462
4469
  const tlChild = targets ?
4463
4470
  new animation.JSAnimation(targets,/** @type {AnimationParams} */(childParams), tl, adjustedPosition, false, index, length) :
4464
4471
  new timer.Timer(/** @type {TimerParams} */(childParams), tl, adjustedPosition);
4465
- tlChild.init(1);
4472
+ tlChild.init(true);
4466
4473
  // TODO: Might be better to insert at a position relative to startTime?
4467
4474
  helpers.addChild(tl, tlChild);
4468
4475
  helpers.forEachChildren(tl, (/** @type {Renderable} */child) => {
@@ -4566,7 +4573,7 @@ function requireTimeline () {
4566
4573
  position.parseTimelinePosition(this,a2),
4567
4574
  );
4568
4575
  }
4569
- return this.init(1); // 1 = internalRender
4576
+ return this.init(true);
4570
4577
  }
4571
4578
  }
4572
4579
 
@@ -4675,8 +4682,12 @@ function requireTimeline () {
4675
4682
  }
4676
4683
 
4677
4684
  /**
4678
- * @param {Callback<this>} [callback]
4679
- * @return {Promise}
4685
+ * @typedef {this & {then: null}} ResolvedTimeline
4686
+ */
4687
+
4688
+ /**
4689
+ * @param {Callback<ResolvedTimeline>} [callback]
4690
+ * @return Promise<this>
4680
4691
  */
4681
4692
  then(callback) {
4682
4693
  return super.then(callback);
@@ -4698,7 +4709,7 @@ var animatable = {};
4698
4709
 
4699
4710
  /**
4700
4711
  * Anime.js - animatable - CJS
4701
- * @version v4.2.0
4712
+ * @version v4.2.1
4702
4713
  * @license MIT
4703
4714
  * @copyright 2025 - Julian Garnier
4704
4715
  */
@@ -4822,7 +4833,7 @@ function requireAnimatable () {
4822
4833
  tween._currentTime = 0;
4823
4834
  });
4824
4835
  if (!helpers.isUnd(duration)) animation$1.stretch(duration);
4825
- animation$1.reset(1).resume();
4836
+ animation$1.reset(true).resume();
4826
4837
  return this;
4827
4838
  }
4828
4839
  };
@@ -4859,7 +4870,7 @@ var number = {};
4859
4870
 
4860
4871
  /**
4861
4872
  * Anime.js - utils - CJS
4862
- * @version v4.2.0
4873
+ * @version v4.2.1
4863
4874
  * @license MIT
4864
4875
  * @copyright 2025 - Julian Garnier
4865
4876
  */
@@ -4965,7 +4976,7 @@ var spring = {};
4965
4976
 
4966
4977
  /**
4967
4978
  * Anime.js - easings - CJS
4968
- * @version v4.2.0
4979
+ * @version v4.2.1
4969
4980
  * @license MIT
4970
4981
  * @copyright 2025 - Julian Garnier
4971
4982
  */
@@ -5231,7 +5242,7 @@ var composition = {};
5231
5242
 
5232
5243
  /**
5233
5244
  * Anime.js - waapi - CJS
5234
- * @version v4.2.0
5245
+ * @version v4.2.1
5235
5246
  * @license MIT
5236
5247
  * @copyright 2025 - Julian Garnier
5237
5248
  */
@@ -5333,7 +5344,7 @@ function requireComposition () {
5333
5344
 
5334
5345
  /**
5335
5346
  * Anime.js - utils - CJS
5336
- * @version v4.2.0
5347
+ * @version v4.2.1
5337
5348
  * @license MIT
5338
5349
  * @copyright 2025 - Julian Garnier
5339
5350
  */
@@ -5470,7 +5481,7 @@ function requireTarget () {
5470
5481
 
5471
5482
  /**
5472
5483
  * Anime.js - draggable - CJS
5473
- * @version v4.2.0
5484
+ * @version v4.2.1
5474
5485
  * @license MIT
5475
5486
  * @copyright 2025 - Julian Garnier
5476
5487
  */
@@ -5500,6 +5511,7 @@ function requireDraggable () {
5500
5511
  * DOMTarget,
5501
5512
  * DOMTargetSelector,
5502
5513
  * DraggableCursorParams,
5514
+ * DraggableDragThresholdParams,
5503
5515
  * TargetsParam,
5504
5516
  * DraggableParams,
5505
5517
  * EasingFunction,
@@ -5630,7 +5642,7 @@ function requireDraggable () {
5630
5642
  }
5631
5643
 
5632
5644
  /**
5633
- * @template {Array<Number>|DOMTargetSelector|String|Number|Boolean|Function|DraggableCursorParams} T
5645
+ * @template {Array<Number>|DOMTargetSelector|String|Number|Boolean|Function|DraggableCursorParams|DraggableDragThresholdParams} T
5634
5646
  * @param {T | ((draggable: Draggable) => T)} value
5635
5647
  * @param {Draggable} draggable
5636
5648
  * @return {T}
@@ -5684,6 +5696,8 @@ function requireDraggable () {
5684
5696
  /** @type {Number} */
5685
5697
  this.dragSpeed = 0;
5686
5698
  /** @type {Number} */
5699
+ this.dragThreshold = 3;
5700
+ /** @type {Number} */
5687
5701
  this.maxVelocity = 0;
5688
5702
  /** @type {Number} */
5689
5703
  this.minVelocity = 0;
@@ -6101,6 +6115,16 @@ function requireDraggable () {
6101
6115
  if (onHover) cursorStyles.onHover = onHover;
6102
6116
  if (onGrab) cursorStyles.onGrab = onGrab;
6103
6117
  }
6118
+ const parsedDragThreshold = parseDraggableFunctionParameter(params.dragThreshold, this);
6119
+ const dragThreshold = { mouse: 3, touch: 7 };
6120
+ if (helpers.isNum(parsedDragThreshold)) {
6121
+ dragThreshold.mouse = parsedDragThreshold;
6122
+ dragThreshold.touch = parsedDragThreshold;
6123
+ } else if (parsedDragThreshold) {
6124
+ const { mouse, touch } = parsedDragThreshold;
6125
+ if (!helpers.isUnd(mouse)) dragThreshold.mouse = mouse;
6126
+ if (!helpers.isUnd(touch)) dragThreshold.touch = touch;
6127
+ }
6104
6128
  this.containerArray = helpers.isArr(container) ? container : null;
6105
6129
  this.$container = /** @type {HTMLElement} */(container && !this.containerArray ? targets.parseTargets(/** @type {DOMTarget} */(container))[0] : consts.doc.body);
6106
6130
  this.useWin = this.$container === consts.doc.body;
@@ -6115,6 +6139,7 @@ function requireDraggable () {
6115
6139
  this.scrollSpeed = values.setValue(parseDraggableFunctionParameter(params.scrollSpeed, this), 1.5);
6116
6140
  this.scrollThreshold = values.setValue(parseDraggableFunctionParameter(params.scrollThreshold, this), 20);
6117
6141
  this.dragSpeed = values.setValue(parseDraggableFunctionParameter(params.dragSpeed, this), 1);
6142
+ this.dragThreshold = this.isFinePointer ? dragThreshold.mouse : dragThreshold.touch;
6118
6143
  this.minVelocity = values.setValue(parseDraggableFunctionParameter(params.minVelocity, this), 0);
6119
6144
  this.maxVelocity = values.setValue(parseDraggableFunctionParameter(params.maxVelocity, this), 50);
6120
6145
  this.velocityMultiplier = values.setValue(parseDraggableFunctionParameter(params.velocityMultiplier, this), 1);
@@ -6416,8 +6441,7 @@ function requireDraggable () {
6416
6441
  this.$trigger.addEventListener('touchend', preventDefault);
6417
6442
 
6418
6443
  // Don't check for a miminim distance move if already dragging
6419
- if (this.dragged || (!this.disabled[0] && helpers.abs(movedX) > 3) || (!this.disabled[1] && helpers.abs(movedY) > 3)) {
6420
-
6444
+ if (this.dragged || (!this.disabled[0] && helpers.abs(movedX) > this.dragThreshold) || (!this.disabled[1] && helpers.abs(movedY) > this.dragThreshold)) {
6421
6445
  this.updateTicker.resume();
6422
6446
  this.pointer[2] = this.pointer[0];
6423
6447
  this.pointer[3] = this.pointer[1];
@@ -6707,7 +6731,7 @@ var time = {};
6707
6731
 
6708
6732
  /**
6709
6733
  * Anime.js - utils - CJS
6710
- * @version v4.2.0
6734
+ * @version v4.2.1
6711
6735
  * @license MIT
6712
6736
  * @copyright 2025 - Julian Garnier
6713
6737
  */
@@ -6771,7 +6795,7 @@ function requireTime () {
6771
6795
 
6772
6796
  /**
6773
6797
  * Anime.js - scope - CJS
6774
- * @version v4.2.0
6798
+ * @version v4.2.1
6775
6799
  * @license MIT
6776
6800
  * @copyright 2025 - Julian Garnier
6777
6801
  */
@@ -7034,7 +7058,7 @@ var scroll = {};
7034
7058
 
7035
7059
  /**
7036
7060
  * Anime.js - events - CJS
7037
- * @version v4.2.0
7061
+ * @version v4.2.1
7038
7062
  * @license MIT
7039
7063
  * @copyright 2025 - Julian Garnier
7040
7064
  */
@@ -7133,6 +7157,8 @@ function requireScroll () {
7133
7157
  /** @type {Number} */
7134
7158
  this.top = 0;
7135
7159
  /** @type {Number} */
7160
+ this.scale = 1;
7161
+ /** @type {Number} */
7136
7162
  this.zIndex = 0;
7137
7163
  /** @type {Number} */
7138
7164
  this.scrollX = 0;
@@ -7244,6 +7270,7 @@ function requireScroll () {
7244
7270
  height = $el.clientHeight;
7245
7271
  this.top = elRect.top;
7246
7272
  this.left = elRect.left;
7273
+ this.scale = elRect.width ? width / elRect.width : (elRect.height ? height / elRect.height : 1);
7247
7274
  }
7248
7275
  this.width = width;
7249
7276
  this.height = height;
@@ -7757,8 +7784,9 @@ function requireScroll () {
7757
7784
  }
7758
7785
  }
7759
7786
  const rect = $target.getBoundingClientRect();
7760
- const offset = isHori ? rect.left + container.scrollX - container.left : rect.top + container.scrollY - container.top;
7761
- const targetSize = isHori ? rect.width : rect.height;
7787
+ const scale = container.scale;
7788
+ const offset = (isHori ? rect.left + container.scrollX - container.left : rect.top + container.scrollY - container.top) * scale;
7789
+ const targetSize = (isHori ? rect.width : rect.height) * scale;
7762
7790
  const containerSize = isHori ? container.width : container.height;
7763
7791
  const scrollSize = isHori ? container.scrollWidth : container.scrollHeight;
7764
7792
  const maxScroll = scrollSize - containerSize;
@@ -7973,7 +8001,7 @@ var cubicBezier = {};
7973
8001
 
7974
8002
  /**
7975
8003
  * Anime.js - easings - CJS
7976
- * @version v4.2.0
8004
+ * @version v4.2.1
7977
8005
  * @license MIT
7978
8006
  * @copyright 2025 - Julian Garnier
7979
8007
  */
@@ -8046,7 +8074,7 @@ var steps = {};
8046
8074
 
8047
8075
  /**
8048
8076
  * Anime.js - easings - CJS
8049
- * @version v4.2.0
8077
+ * @version v4.2.1
8050
8078
  * @license MIT
8051
8079
  * @copyright 2025 - Julian Garnier
8052
8080
  */
@@ -8085,7 +8113,7 @@ var linear = {};
8085
8113
 
8086
8114
  /**
8087
8115
  * Anime.js - easings - CJS
8088
- * @version v4.2.0
8116
+ * @version v4.2.1
8089
8117
  * @license MIT
8090
8118
  * @copyright 2025 - Julian Garnier
8091
8119
  */
@@ -8153,7 +8181,7 @@ var irregular = {};
8153
8181
 
8154
8182
  /**
8155
8183
  * Anime.js - easings - CJS
8156
- * @version v4.2.0
8184
+ * @version v4.2.1
8157
8185
  * @license MIT
8158
8186
  * @copyright 2025 - Julian Garnier
8159
8187
  */
@@ -8201,7 +8229,7 @@ function requireIrregular () {
8201
8229
 
8202
8230
  /**
8203
8231
  * Anime.js - easings - CJS
8204
- * @version v4.2.0
8232
+ * @version v4.2.1
8205
8233
  * @license MIT
8206
8234
  * @copyright 2025 - Julian Garnier
8207
8235
  */
@@ -8238,7 +8266,7 @@ var chainable = {};
8238
8266
 
8239
8267
  /**
8240
8268
  * Anime.js - utils - CJS
8241
- * @version v4.2.0
8269
+ * @version v4.2.1
8242
8270
  * @license MIT
8243
8271
  * @copyright 2025 - Julian Garnier
8244
8272
  */
@@ -8437,7 +8465,7 @@ var random = {};
8437
8465
 
8438
8466
  /**
8439
8467
  * Anime.js - utils - CJS
8440
- * @version v4.2.0
8468
+ * @version v4.2.1
8441
8469
  * @license MIT
8442
8470
  * @copyright 2025 - Julian Garnier
8443
8471
  */
@@ -8523,7 +8551,7 @@ var stagger = {};
8523
8551
 
8524
8552
  /**
8525
8553
  * Anime.js - utils - CJS
8526
- * @version v4.2.0
8554
+ * @version v4.2.1
8527
8555
  * @license MIT
8528
8556
  * @copyright 2025 - Julian Garnier
8529
8557
  */
@@ -8652,7 +8680,7 @@ function requireStagger () {
8652
8680
 
8653
8681
  /**
8654
8682
  * Anime.js - utils - CJS
8655
- * @version v4.2.0
8683
+ * @version v4.2.1
8656
8684
  * @license MIT
8657
8685
  * @copyright 2025 - Julian Garnier
8658
8686
  */
@@ -8708,7 +8736,7 @@ var helpers = {};
8708
8736
 
8709
8737
  /**
8710
8738
  * Anime.js - svg - CJS
8711
- * @version v4.2.0
8739
+ * @version v4.2.1
8712
8740
  * @license MIT
8713
8741
  * @copyright 2025 - Julian Garnier
8714
8742
  */
@@ -8745,7 +8773,7 @@ function requireHelpers () {
8745
8773
 
8746
8774
  /**
8747
8775
  * Anime.js - svg - CJS
8748
- * @version v4.2.0
8776
+ * @version v4.2.1
8749
8777
  * @license MIT
8750
8778
  * @copyright 2025 - Julian Garnier
8751
8779
  */
@@ -8773,20 +8801,24 @@ function requireMotionpath () {
8773
8801
 
8774
8802
  /**
8775
8803
  * @param {SVGGeometryElement} $path
8804
+ * @param {Number} totalLength
8776
8805
  * @param {Number} progress
8777
8806
  * @param {Number}lookup
8778
8807
  * @return {DOMPoint}
8779
8808
  */
8780
- const getPathPoint = ($path, progress, lookup = 0) => {
8781
- return $path.getPointAtLength(progress + lookup >= 1 ? progress + lookup : 0);
8809
+ const getPathPoint = ($path, totalLength, progress, lookup = 0) => {
8810
+ const point = progress + lookup;
8811
+ const pointOnPath = (point % totalLength + totalLength) % totalLength;
8812
+ return $path.getPointAtLength(pointOnPath);
8782
8813
  };
8783
8814
 
8784
8815
  /**
8785
8816
  * @param {SVGGeometryElement} $path
8786
8817
  * @param {String} pathProperty
8818
+ * @param {Number} [offset=0]
8787
8819
  * @return {FunctionValue}
8788
8820
  */
8789
- const getPathProgess = ($path, pathProperty) => {
8821
+ const getPathProgess = ($path, pathProperty, offset = 0) => {
8790
8822
  return $el => {
8791
8823
  const totalLength = +($path.getTotalLength());
8792
8824
  const inSvg = $el[consts.isSvgSymbol];
@@ -8797,12 +8829,14 @@ function requireMotionpath () {
8797
8829
  to: totalLength,
8798
8830
  /** @type {TweenModifier} */
8799
8831
  modifier: progress => {
8832
+ const offsetLength = offset * totalLength;
8833
+ const newProgress = progress + offsetLength;
8800
8834
  if (pathProperty === 'a') {
8801
- const p0 = getPathPoint($path, progress, -1);
8802
- const p1 = getPathPoint($path, progress, 1);
8835
+ const p0 = getPathPoint($path, totalLength, newProgress, -1);
8836
+ const p1 = getPathPoint($path, totalLength, newProgress, 1);
8803
8837
  return helpers$1.atan2(p1.y - p0.y, p1.x - p0.x) * 180 / helpers$1.PI;
8804
8838
  } else {
8805
- const p = getPathPoint($path, progress, 0);
8839
+ const p = getPathPoint($path, totalLength, newProgress, 0);
8806
8840
  return pathProperty === 'x' ?
8807
8841
  inSvg || !ctm ? p.x : p.x * ctm.a + p.y * ctm.c + ctm.e :
8808
8842
  inSvg || !ctm ? p.y : p.x * ctm.b + p.y * ctm.d + ctm.f
@@ -8814,14 +8848,15 @@ function requireMotionpath () {
8814
8848
 
8815
8849
  /**
8816
8850
  * @param {TargetsParam} path
8851
+ * @param {Number} [offset=0]
8817
8852
  */
8818
- const createMotionPath = path => {
8853
+ const createMotionPath = (path, offset = 0) => {
8819
8854
  const $path = helpers.getPath(path);
8820
8855
  if (!$path) return;
8821
8856
  return {
8822
- translateX: getPathProgess($path, 'x'),
8823
- translateY: getPathProgess($path, 'y'),
8824
- rotate: getPathProgess($path, 'a'),
8857
+ translateX: getPathProgess($path, 'x', offset),
8858
+ translateY: getPathProgess($path, 'y', offset),
8859
+ rotate: getPathProgess($path, 'a', offset),
8825
8860
  }
8826
8861
  };
8827
8862
 
@@ -8833,7 +8868,7 @@ var drawable = {};
8833
8868
 
8834
8869
  /**
8835
8870
  * Anime.js - svg - CJS
8836
- * @version v4.2.0
8871
+ * @version v4.2.1
8837
8872
  * @license MIT
8838
8873
  * @copyright 2025 - Julian Garnier
8839
8874
  */
@@ -8961,7 +8996,7 @@ var morphto = {};
8961
8996
 
8962
8997
  /**
8963
8998
  * Anime.js - svg - CJS
8964
- * @version v4.2.0
8999
+ * @version v4.2.1
8965
9000
  * @license MIT
8966
9001
  * @copyright 2025 - Julian Garnier
8967
9002
  */
@@ -8989,8 +9024,18 @@ function requireMorphto () {
8989
9024
  * @return {FunctionValue}
8990
9025
  */
8991
9026
  const morphTo = (path2, precision = .33) => ($path1) => {
9027
+ const tagName1 = ($path1.tagName || '').toLowerCase();
9028
+ if (!tagName1.match(/^(path|polygon|polyline)$/)) {
9029
+ throw new Error(`Can't morph a <${$path1.tagName}> SVG element. Use <path>, <polygon> or <polyline>.`);
9030
+ }
8992
9031
  const $path2 = /** @type {SVGGeometryElement} */(helpers.getPath(path2));
8993
- if (!$path2) return;
9032
+ if (!$path2) {
9033
+ throw new Error("Can't morph to an invalid target. 'path2' must resolve to an existing <path>, <polygon> or <polyline> SVG element.");
9034
+ }
9035
+ const tagName2 = ($path2.tagName || '').toLowerCase();
9036
+ if (!tagName2.match(/^(path|polygon|polyline)$/)) {
9037
+ throw new Error(`Can't morph a <${$path2.tagName}> SVG element. Use <path>, <polygon> or <polyline>.`);
9038
+ }
8994
9039
  const isPath = $path1.tagName === 'path';
8995
9040
  const separator = isPath ? ' ' : ',';
8996
9041
  const previousPoints = $path1[consts.morphPointsSymbol];
@@ -9026,7 +9071,7 @@ function requireMorphto () {
9026
9071
 
9027
9072
  /**
9028
9073
  * Anime.js - svg - CJS
9029
- * @version v4.2.0
9074
+ * @version v4.2.1
9030
9075
  * @license MIT
9031
9076
  * @copyright 2025 - Julian Garnier
9032
9077
  */
@@ -9055,7 +9100,7 @@ var split = {};
9055
9100
 
9056
9101
  /**
9057
9102
  * Anime.js - text - CJS
9058
- * @version v4.2.0
9103
+ * @version v4.2.1
9059
9104
  * @license MIT
9060
9105
  * @copyright 2025 - Julian Garnier
9061
9106
  */
@@ -9550,7 +9595,7 @@ function requireSplit () {
9550
9595
 
9551
9596
  /**
9552
9597
  * Anime.js - text - CJS
9553
- * @version v4.2.0
9598
+ * @version v4.2.1
9554
9599
  * @license MIT
9555
9600
  * @copyright 2025 - Julian Garnier
9556
9601
  */
@@ -9575,7 +9620,7 @@ var waapi = {};
9575
9620
 
9576
9621
  /**
9577
9622
  * Anime.js - waapi - CJS
9578
- * @version v4.2.0
9623
+ * @version v4.2.1
9579
9624
  * @license MIT
9580
9625
  * @copyright 2025 - Julian Garnier
9581
9626
  */
@@ -9606,7 +9651,6 @@ function requireWaapi () {
9606
9651
  * WAAPIAnimationParams,
9607
9652
  * WAAPITweenOptions,
9608
9653
  * WAAPIKeyframeValue,
9609
- * WAAPICallback,
9610
9654
  * WAAPITweenValue
9611
9655
  * } from '../types/index.js'
9612
9656
  */
@@ -10038,14 +10082,18 @@ function requireWaapi () {
10038
10082
  }
10039
10083
 
10040
10084
  /**
10041
- * @param {WAAPICallback} [callback]
10042
- * @return {Promise}
10085
+ * @typedef {this & {then: null}} ResolvedWAAPIAnimation
10086
+ */
10087
+
10088
+ /**
10089
+ * @param {Callback<ResolvedWAAPIAnimation>} [callback]
10090
+ * @return Promise<this>
10043
10091
  */
10044
10092
  then(callback = consts.noop) {
10045
10093
  const then = this.then;
10046
10094
  const onResolve = () => {
10047
10095
  this.then = null;
10048
- callback(this);
10096
+ callback(/** @type {ResolvedWAAPIAnimation} */(this));
10049
10097
  this.then = then;
10050
10098
  this._resolve = consts.noop;
10051
10099
  };
@@ -10074,7 +10122,7 @@ function requireWaapi () {
10074
10122
 
10075
10123
  /**
10076
10124
  * Anime.js - CJS
10077
- * @version v4.2.0
10125
+ * @version v4.2.1
10078
10126
  * @license MIT
10079
10127
  * @copyright 2025 - Julian Garnier
10080
10128
  */