@pixodesk/svg-animator-web 1.0.45 → 1.0.47

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/dist/index.js CHANGED
@@ -4,6 +4,7 @@ import {
4
4
  PX_COLOR_ATTR_NAMES,
5
5
  PX_CSS_ONLY_STYLE_PROPS,
6
6
  PX_DEFAULT_DURATION_MS,
7
+ PX_DEFAULT_ITERATIONS,
7
8
  PX_DISALLOWED_SVG_TAGS_LOWER,
8
9
  PX_PCT_BASED_ATTR_NAMES,
9
10
  PX_STYLE_ATTR_NAMES,
@@ -60,7 +61,7 @@ import {
60
61
  toRGBA,
61
62
  validateDocument,
62
63
  validateNodeEffects
63
- } from "./chunk-QE7KJWAN.js";
64
+ } from "./chunk-ZBGGXE5W.js";
64
65
 
65
66
  // ../svg-animator-core/dist/internal.js
66
67
  var CLASS_NAME_KEY = "className";
@@ -564,7 +565,7 @@ function createWebApiAnimator(doc, callbacks, rootElement, forceEvenIfHasUnsuppo
564
565
  let seekPosition;
565
566
  if (config.delay && config.delay < 0 && config.duration) {
566
567
  const rawSeek = -config.delay;
567
- seekPosition = iterations === Infinity ? rawSeek % config.duration : Math.min(rawSeek, config.duration * (iterations != null ? iterations : 1));
568
+ seekPosition = iterations === Infinity ? rawSeek % config.duration : Math.min(rawSeek, config.duration * (iterations != null ? iterations : PX_DEFAULT_ITERATIONS));
568
569
  }
569
570
  const effectOptions = {
570
571
  duration: config.duration,
@@ -671,7 +672,7 @@ function createWebApiAnimator(doc, callbacks, rootElement, forceEvenIfHasUnsuppo
671
672
  },
672
673
  "setCurrentTime": (time) => {
673
674
  var _a2;
674
- const ceiling = seekCeilingMs((_a2 = config.duration) != null ? _a2 : 0, iterations != null ? iterations : 1);
675
+ const ceiling = seekCeilingMs((_a2 = config.duration) != null ? _a2 : 0, iterations != null ? iterations : PX_DEFAULT_ITERATIONS);
675
676
  const seek = ceiling > 0 ? clampSeekMs(time, ceiling) : Math.max(0, time);
676
677
  finishNotified = false;
677
678
  animations.forEach((a) => {
@@ -681,11 +682,11 @@ function createWebApiAnimator(doc, callbacks, rootElement, forceEvenIfHasUnsuppo
681
682
  "getCurrentProgress": () => {
682
683
  var _a2;
683
684
  const t = api.getCurrentTime();
684
- return t === null ? null : timeToProgress(t, (_a2 = config.duration) != null ? _a2 : 0, iterations != null ? iterations : 1);
685
+ return t === null ? null : timeToProgress(t, (_a2 = config.duration) != null ? _a2 : 0, iterations != null ? iterations : PX_DEFAULT_ITERATIONS);
685
686
  },
686
687
  "setCurrentProgress": (progress) => {
687
688
  var _a2;
688
- api.setCurrentTime(progressToTimeMs(progress, (_a2 = config.duration) != null ? _a2 : 0, iterations != null ? iterations : 1));
689
+ api.setCurrentTime(progressToTimeMs(progress, (_a2 = config.duration) != null ? _a2 : 0, iterations != null ? iterations : PX_DEFAULT_ITERATIONS));
689
690
  },
690
691
  "destroy": () => {
691
692
  var _a2;