@aarsteinmedia/dotlottie-player 6.6.2 → 6.6.3

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.
@@ -58,7 +58,7 @@
58
58
  ],
59
59
  "superclass": {
60
60
  "name": "DotLottiePlayerBase",
61
- "module": "/dist/chunks/DotLottiePlayerBase-1cqXX2jB.js"
61
+ "module": "/dist/chunks/DotLottiePlayerBase-Cjk0_f2y.js"
62
62
  },
63
63
  "tagName": "tagName",
64
64
  "customElement": true
package/dist/canvas.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { D as DotLottiePlayerCanvas } from './chunks/DotLottiePlayerCanvas.d-BuQAVERW.js';
2
- export { a as DotLottiePlayerBase } from './chunks/DotLottiePlayerCanvas.d-BuQAVERW.js';
1
+ import { D as DotLottiePlayerCanvas } from './chunks/DotLottiePlayerCanvas.d-Bgw-biRK.js';
2
+ export { a as DotLottiePlayerBase } from './chunks/DotLottiePlayerCanvas.d-Bgw-biRK.js';
3
3
  import '@aarsteinmedia/lottie-web';
4
4
  import '@aarsteinmedia/lottie-web/utils';
5
5
  import './utilities.js';
package/dist/canvas.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { RendererType, isServer } from '@aarsteinmedia/lottie-web/utils';
2
2
  import { loadAnimation } from '@aarsteinmedia/lottie-web/canvas';
3
- import { D as DotLottiePlayerBase } from './chunks/DotLottiePlayerBase-1cqXX2jB.js';
3
+ import { D as DotLottiePlayerBase } from './chunks/DotLottiePlayerBase-Cjk0_f2y.js';
4
4
  import { t as tagName } from './chunks/utilities-CC4oA5Yh.js';
5
5
  import '@aarsteinmedia/lottie-web/dotlottie';
6
6
 
@@ -10,7 +10,7 @@ function loadControlsModule() {
10
10
 
11
11
  let modulePromise = null;
12
12
  function loadErrorModule() {
13
- modulePromise = modulePromise ?? import('./errorScreen-DcJ2haCJ.js');
13
+ modulePromise = modulePromise ?? import('./errorScreen-Do0IgwBv.js');
14
14
  return modulePromise;
15
15
  }
16
16
 
@@ -512,21 +512,7 @@ class ScrollElement extends BaseElement {
512
512
  if (!this.playOnVisible && this.playerState === PlayerState.Frozen && !(this.autoplay && reducedMotionQuery?.matches)) {
513
513
  this.play();
514
514
  }
515
- if (!this.playOnVisible || reducedMotionQuery?.matches) {
516
- return;
517
- }
518
- if (this.playerState === PlayerState.Completed && !this.once) {
519
- this.playerState = PlayerState.Playing;
520
- this._lottieInstance?.goToAndPlay(this.direction === 1 ? 0 : this._lottieInstance.totalFrames);
521
- return;
522
- }
523
- this._playerState.playTimeout = setTimeout(()=>{
524
- this.play();
525
- }, this.delay);
526
- if (this.playerState !== PlayerState.Playing) {
527
- return;
528
- }
529
- clearTimeout(this._playerState.playTimeout);
515
+ this._playOnVisible();
530
516
  });
531
517
  this._observeIntersectionTarget();
532
518
  }
@@ -583,6 +569,23 @@ class ScrollElement extends BaseElement {
583
569
  // use overflow-* (IO / layout interaction quirks).
584
570
  this._intersectionObserver.observe(this._container);
585
571
  }
572
+ _playOnVisible() {
573
+ if (!this.playOnVisible || reducedMotionQuery?.matches) {
574
+ return;
575
+ }
576
+ if (this.playerState === PlayerState.Completed && !this.once) {
577
+ this.playerState = PlayerState.Playing;
578
+ this._lottieInstance?.goToAndPlay(this.direction === 1 ? 0 : this._lottieInstance.totalFrames);
579
+ return;
580
+ }
581
+ this._playerState.playTimeout = setTimeout(()=>{
582
+ this.play();
583
+ }, this.delay);
584
+ if (this.playerState !== PlayerState.Playing) {
585
+ return;
586
+ }
587
+ clearTimeout(this._playerState.playTimeout);
588
+ }
586
589
  constructor(...args){
587
590
  super(...args), this.isIntersecting = false, this._useGeometricScroll = false;
588
591
  }
@@ -1602,7 +1605,7 @@ var controls = /*#__PURE__*/Object.freeze({
1602
1605
  this.devLog(error);
1603
1606
  }
1604
1607
  _handleInlineScript() {
1605
- const inlineScript = this.parentElement?.querySelector(':scope > script#aamd_inline_script');
1608
+ const inlineScript = this.parentElement?.querySelector(':scope > script.aamd_inline_script');
1606
1609
  if (!inlineScript) {
1607
1610
  return;
1608
1611
  }
@@ -102,6 +102,7 @@ declare abstract class ScrollElement extends BaseElement {
102
102
  private _getGeometricScrollProgress;
103
103
  private _getScrollProgress;
104
104
  private _observeIntersectionTarget;
105
+ private _playOnVisible;
105
106
  }
106
107
 
107
108
  declare abstract class DotLottiePlayerBase extends ScrollElement {
@@ -1,5 +1,5 @@
1
1
  import { PreserveAspectRatio, namespaceSVG } from '@aarsteinmedia/lottie-web/utils';
2
- import { e as escapeHTML } from './DotLottiePlayerBase-1cqXX2jB.js';
2
+ import { e as escapeHTML } from './DotLottiePlayerBase-Cjk0_f2y.js';
3
3
  import '@aarsteinmedia/lottie-web/dotlottie';
4
4
  import './utilities-CC4oA5Yh.js';
5
5
 
package/dist/full.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { b as DotLottiePlayer } from './chunks/DotLottiePlayerCanvas.d-BuQAVERW.js';
2
- export { a as DotLottiePlayerBase } from './chunks/DotLottiePlayerCanvas.d-BuQAVERW.js';
1
+ import { b as DotLottiePlayer } from './chunks/DotLottiePlayerCanvas.d-Bgw-biRK.js';
2
+ export { a as DotLottiePlayerBase } from './chunks/DotLottiePlayerCanvas.d-Bgw-biRK.js';
3
3
  import '@aarsteinmedia/lottie-web';
4
4
  import '@aarsteinmedia/lottie-web/utils';
5
5
  import './utilities.js';
package/dist/full.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { RendererType, isServer } from '@aarsteinmedia/lottie-web/utils';
2
2
  import { loadAnimation } from '@aarsteinmedia/lottie-web';
3
- import { D as DotLottiePlayerBase, l as loadDotLottieTools } from './chunks/DotLottiePlayerBase-1cqXX2jB.js';
3
+ import { D as DotLottiePlayerBase, l as loadDotLottieTools } from './chunks/DotLottiePlayerBase-Cjk0_f2y.js';
4
4
  import { t as tagName } from './chunks/utilities-CC4oA5Yh.js';
5
5
  import '@aarsteinmedia/lottie-web/dotlottie';
6
6
 
package/dist/light.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { c as DotLottiePlayerLight } from './chunks/DotLottiePlayerCanvas.d-BuQAVERW.js';
2
- export { a as DotLottiePlayerBase } from './chunks/DotLottiePlayerCanvas.d-BuQAVERW.js';
1
+ import { c as DotLottiePlayerLight } from './chunks/DotLottiePlayerCanvas.d-Bgw-biRK.js';
2
+ export { a as DotLottiePlayerBase } from './chunks/DotLottiePlayerCanvas.d-Bgw-biRK.js';
3
3
  import '@aarsteinmedia/lottie-web';
4
4
  import '@aarsteinmedia/lottie-web/utils';
5
5
  import './utilities.js';
package/dist/light.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { RendererType, isServer } from '@aarsteinmedia/lottie-web/utils';
2
2
  import { loadAnimation } from '@aarsteinmedia/lottie-web/light';
3
- import { D as DotLottiePlayerBase } from './chunks/DotLottiePlayerBase-1cqXX2jB.js';
3
+ import { D as DotLottiePlayerBase } from './chunks/DotLottiePlayerBase-Cjk0_f2y.js';
4
4
  import { t as tagName } from './chunks/utilities-CC4oA5Yh.js';
5
5
  import '@aarsteinmedia/lottie-web/dotlottie';
6
6
 
package/dist/svg.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { d as DotLottiePlayerSVG } from './chunks/DotLottiePlayerCanvas.d-BuQAVERW.js';
2
- export { a as DotLottiePlayerBase } from './chunks/DotLottiePlayerCanvas.d-BuQAVERW.js';
1
+ import { d as DotLottiePlayerSVG } from './chunks/DotLottiePlayerCanvas.d-Bgw-biRK.js';
2
+ export { a as DotLottiePlayerBase } from './chunks/DotLottiePlayerCanvas.d-Bgw-biRK.js';
3
3
  import '@aarsteinmedia/lottie-web';
4
4
  import '@aarsteinmedia/lottie-web/utils';
5
5
  import './utilities.js';
package/dist/svg.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { RendererType, isServer } from '@aarsteinmedia/lottie-web/utils';
2
2
  import { loadAnimation } from '@aarsteinmedia/lottie-web/svg';
3
- import { D as DotLottiePlayerBase } from './chunks/DotLottiePlayerBase-1cqXX2jB.js';
3
+ import { D as DotLottiePlayerBase } from './chunks/DotLottiePlayerBase-Cjk0_f2y.js';
4
4
  import { t as tagName } from './chunks/utilities-CC4oA5Yh.js';
5
5
  import '@aarsteinmedia/lottie-web/dotlottie';
6
6