@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/chunk-2AFALI5O.min.js +1 -0
- package/dist/{chunk-QE7KJWAN.js → chunk-ZBGGXE5W.js} +143 -83
- package/dist/chunk-ZBGGXE5W.js.map +1 -0
- package/dist/index.cjs +144 -85
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.prerendered-waapi.umd.js +107 -72
- package/dist/index.prerendered-waapi.umd.js.map +1 -1
- package/dist/index.prerendered-waapi.umd.min.js +1 -1
- package/dist/index.prerendered.umd.js +111 -77
- package/dist/index.prerendered.umd.js.map +1 -1
- package/dist/index.prerendered.umd.min.js +1 -1
- package/dist/internal.cjs +104 -69
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.js +1 -1
- package/dist/internal.min.cjs +1 -1
- package/dist/internal.min.js +1 -1
- package/dist/pixodesk-svg-animator.umd.js +143 -84
- package/dist/pixodesk-svg-animator.umd.js.map +1 -1
- package/dist/pixodesk-svg-animator.umd.min.js +1 -1
- package/mangle-reserved.json +2 -0
- package/package.json +2 -2
- package/dist/chunk-QE7KJWAN.js.map +0 -1
- package/dist/chunk-RQ5KZXDT.min.js +0 -1
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-
|
|
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 :
|
|
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 :
|
|
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 :
|
|
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 :
|
|
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;
|