@aarsteinmedia/dotlottie-player 6.5.4 → 6.5.6
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/CHANGELOG.md +10 -0
- package/custom-elements.json +3 -3
- package/dist/canvas.d.ts +2 -2
- package/dist/canvas.js +2 -2
- package/dist/chunks/{DotLottiePlayerBase-D2f8vWzM.js → DotLottiePlayerBase-z6EhEWjH.js} +18 -27
- package/dist/chunks/{constants.d-D18TmCtN.d.ts → constants.d-t4RBAbwL.d.ts} +13 -10
- package/dist/full.d.ts +2 -2
- package/dist/full.js +2 -2
- package/dist/light.d.ts +2 -2
- package/dist/light.js +2 -2
- package/dist/svg.d.ts +2 -2
- package/dist/svg.js +2 -2
- package/dist/unpkg-canvas.js +3 -3
- package/dist/unpkg-full.js +3 -3
- package/dist/unpkg-light.js +2 -4
- package/dist/unpkg-svg.js +3 -3
- package/package.json +14 -14
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
Changelog was only added since [3.2.3], so it's not exhaustive. [Please report any missing notable changes to us](https://github.com/aarsteinmedia/dotlottie-player/issues), and we'll add them promptly.
|
|
9
9
|
|
|
10
|
+
## [6.5.6] - 06-10-2026
|
|
11
|
+
|
|
12
|
+
- Minor performance improvements to animation engine.
|
|
13
|
+
|
|
14
|
+
## [6.5.5] - 30-09-2026
|
|
15
|
+
|
|
16
|
+
- Fixed bug with circular dependency affecting iife output.
|
|
17
|
+
|
|
10
18
|
## [6.5.2] - 17-09-2026
|
|
11
19
|
|
|
12
20
|
- Change to how Animate On Scroll is handled. From being relative to viewport size and scroll position, progress is now entirely determined by position in viewport. This is to improve useability, and gives a significant performance boost. Listener is moved from `scroll` to `IntersectionObserver`, and for browsers that support this the callback is moved to `ViewTimeline` rather than relying on viewport math.
|
|
@@ -406,6 +414,8 @@ Changelog was only added since [3.2.3], so it's not exhaustive. [Please report a
|
|
|
406
414
|
- Removed dependencies
|
|
407
415
|
- `@lit`
|
|
408
416
|
|
|
417
|
+
[6.5.6]: https://www.npmjs.com/package/@aarsteinmedia/dotlottie-player/v/6.5.6
|
|
418
|
+
[6.5.5]: https://www.npmjs.com/package/@aarsteinmedia/dotlottie-player/v/6.5.5
|
|
409
419
|
[6.5.2]: https://www.npmjs.com/package/@aarsteinmedia/dotlottie-player/v/6.5.2
|
|
410
420
|
[6.3.0]: https://www.npmjs.com/package/@aarsteinmedia/dotlottie-player/v/6.3.0
|
|
411
421
|
[6.0.1]: https://www.npmjs.com/package/@aarsteinmedia/dotlottie-player/v/6.0.1
|
package/custom-elements.json
CHANGED
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
],
|
|
51
51
|
"superclass": {
|
|
52
52
|
"name": "DotLottiePlayerBase",
|
|
53
|
-
"module": "/dist/chunks/DotLottiePlayerBase-
|
|
53
|
+
"module": "/dist/chunks/DotLottiePlayerBase-z6EhEWjH.js"
|
|
54
54
|
},
|
|
55
55
|
"tagName": "tagName",
|
|
56
56
|
"customElement": true
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"name": "MouseOut",
|
|
87
87
|
"declaration": {
|
|
88
88
|
"name": "M",
|
|
89
|
-
"module": "./chunks/DotLottiePlayerBase-
|
|
89
|
+
"module": "./chunks/DotLottiePlayerBase-z6EhEWjH.js"
|
|
90
90
|
}
|
|
91
91
|
},
|
|
92
92
|
{
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
"name": "PlayerState",
|
|
95
95
|
"declaration": {
|
|
96
96
|
"name": "P",
|
|
97
|
-
"module": "./chunks/DotLottiePlayerBase-
|
|
97
|
+
"module": "./chunks/DotLottiePlayerBase-z6EhEWjH.js"
|
|
98
98
|
}
|
|
99
99
|
},
|
|
100
100
|
{
|
package/dist/canvas.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { RendererType, PreserveAspectRatio } from '@aarsteinmedia/lottie-web/uti
|
|
|
2
2
|
export { PlayMode, PlayerEvent, RendererType } from '@aarsteinmedia/lottie-web/utils';
|
|
3
3
|
import * as _aarsteinmedia_lottie_web from '@aarsteinmedia/lottie-web';
|
|
4
4
|
import { AnimationConfiguration, Vector2 } from '@aarsteinmedia/lottie-web';
|
|
5
|
-
import { D as DotLottiePlayerBase } from './chunks/constants.d-
|
|
6
|
-
export { M as MouseOut, P as PlayerState, t as tagName } from './chunks/constants.d-
|
|
5
|
+
import { D as DotLottiePlayerBase } from './chunks/constants.d-t4RBAbwL.js';
|
|
6
|
+
export { M as MouseOut, P as PlayerState, t as tagName } from './chunks/constants.d-t4RBAbwL.js';
|
|
7
7
|
|
|
8
8
|
declare class DotLottiePlayerCanvas extends DotLottiePlayerBase {
|
|
9
9
|
get renderer(): RendererType;
|
package/dist/canvas.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { RendererType, isServer } from '@aarsteinmedia/lottie-web/utils';
|
|
2
2
|
export { PlayMode, PlayerEvent, RendererType } from '@aarsteinmedia/lottie-web/utils';
|
|
3
3
|
import { loadAnimation } from '@aarsteinmedia/lottie-web/canvas';
|
|
4
|
-
import { D as DotLottiePlayerBase, t as tagName } from './chunks/DotLottiePlayerBase-
|
|
5
|
-
export { M as MouseOut, P as PlayerState } from './chunks/DotLottiePlayerBase-
|
|
4
|
+
import { D as DotLottiePlayerBase, t as tagName } from './chunks/DotLottiePlayerBase-z6EhEWjH.js';
|
|
5
|
+
export { M as MouseOut, P as PlayerState } from './chunks/DotLottiePlayerBase-z6EhEWjH.js';
|
|
6
6
|
import '@aarsteinmedia/lottie-web/dotlottie';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -71,7 +71,7 @@ if (isServer) {
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
var css_248z = "*{box-sizing:border-box}:host{--lottie-player-toolbar-height:35px;--lottie-player-toolbar-background-color:#fff;--lottie-player-toolbar-icon-color:#000;--lottie-player-toolbar-icon-hover-color:#000;--lottie-player-toolbar-icon-active-color:#4285f4;--lottie-player-seeker-track-color:#0003;--lottie-player-seeker-thumb-color:#4285f4;--lottie-player-seeker-display:block;height:100%;width:100%;&:not([hidden]){display:block}.main{display:flex;flex-direction:column;height:100%;margin:0;padding:0;width:100%}.animation{contain:content;display:flex;height:100%;margin:0;padding:0;width:100%;& svg g{will-change:transform}}[data-controls=true] .animation{height:calc(100% - 35px)}.animation-container{position:relative}.popover{animation:fade-in .2s ease-in-out;background-color:var(--lottie-player-toolbar-background-color);border:2px solid var(--lottie-player-toolbar-icon-color);border-radius:5px;bottom:40px;padding:10px 15px;position:absolute;right:5px;&:before{border:7px solid #0000;border-top:7px solid var(--lottie-player-toolbar-icon-color);content:\"\";height:0;margin-right:-7px;pointer-events:none;position:absolute;right:10px;top:100%;width:0}}.error{align-items:center;display:flex;height:100%;justify-content:center;margin:auto;& svg{height:auto;width:100%}}.toolbar{background:var(--lottie-player-toolbar-background-color);border-radius:5px;display:flex;gap:5px;height:35px;margin:0;padding:5px;place-items:center center;&.has-error{opacity:.5;pointer-events:none}& button{fill:var(--lottie-player-toolbar-icon-color);align-items:center;background:none;border:0;color:var(--lottie-player-toolbar-icon-color);cursor:pointer;gap:5px;height:100%;margin:0;opacity:.9;outline:0;padding:0;&:not([hidden]){display:flex}&:hover{opacity:1}&[data-active=true]{fill:var(--lottie-player-toolbar-icon-active-color);opacity:1}&:disabled{opacity:.5}&:focus{outline:0}& svg{pointer-events:none;&>*{fill:inherit}}&.disabled svg{display:none}}}.progress-container{position:relative;width:100%;&.simple{margin-right:12px}}& progress{appearance:none;background-color:var(--lottie-player-seeker-track-color);border:0;border-radius:3px;height:5px;left:0;margin:7.5px 0;outline:none;pointer-events:none;position:absolute;top:0;width:100%;&::-webkit-progress-inner-element{border-radius:3px;overflow:hidden}&::-webkit-slider-runnable-track{background-color:initial}&::-webkit-progress-value{background-color:var(--lottie-player-seeker-thumb-color)}}.seeker{appearance:none;background-color:initial;border:0;border-radius:3px;color:var(--lottie-player-seeker-thumb-color);cursor:pointer;display:var(--lottie-player-seeker-display);height:20px;margin:0;outline:none;padding:7.5px 0;position:relative;width:100%;z-index:1;&::-webkit-slider-runnable-track,&::-webkit-slider-thumb{appearance:none;outline:none}&::-webkit-slider-thumb{background-color:var(--lottie-player-seeker-thumb-color);border:0;border-radius:50%;cursor:pointer;height:15px;transform:scale(0);-webkit-transition:transform .2s ease-in-out;transition:transform .2s ease-in-out;width:15px}&:focus::-webkit-slider-thumb,&:hover::-webkit-slider-thumb{transform:scale(1)}&::-moz-range-progress{background-color:var(--lottie-player-seeker-thumb-color);border-radius:3px;height:5px}&::-moz-range-thumb{background-color:var(--lottie-player-seeker-thumb-color);border:0;border-radius:50%;cursor:pointer;height:15px;transform:scale(0);-moz-transition:transform .2s ease-in-out;transition:transform .2s ease-in-out;width:15px}&:focus::-moz-range-thumb,&:hover::-moz-range-thumb{transform:scale(1)}&::-ms-track{background:#0000;border-color:#0000;color:#0000;cursor:pointer;height:5px;width:100%}&::-ms-fill-upper{background:var(--lottie-player-seeker-track-color);border-radius:3px}&::-ms-fill-lower{background-color:var(--lottie-player-seeker-thumb-color);border-radius:3px}&::-ms-thumb{background:var(--lottie-player-seeker-thumb-color);border:0;border-radius:50%;cursor:pointer;height:15px;transform:scale(0);-ms-transition:transform .2s ease-in-out;transition:transform .2s ease-in-out;width:15px}&:hover::-ms-thumb{transform:scale(1)}&:focus{&::-ms-thumb{transform:scale(1)}&::-ms-fill-lower,&::-ms-fill-upper{background:var(--lottie-player-seeker-track-color)}}}& ::-moz-progress-bar{background-color:var(--lottie-player-seeker-thumb-color)}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@media (prefers-color-scheme:dark){:host{--lottie-player-toolbar-background-color:#000;--lottie-player-toolbar-icon-color:#fff;--lottie-player-toolbar-icon-hover-color:#fff;--lottie-player-seeker-track-color:#fff9}}";
|
|
74
|
+
var css_248z = "*{box-sizing:border-box}:host{--lottie-player-toolbar-height:35px;--lottie-player-toolbar-background-color:#fff;--lottie-player-toolbar-icon-color:#000;--lottie-player-toolbar-icon-hover-color:#000;--lottie-player-toolbar-icon-active-color:#4285f4;--lottie-player-seeker-track-color:#0003;--lottie-player-seeker-thumb-color:#4285f4;--lottie-player-seeker-display:block;height:100%;width:100%;&:not([hidden]){display:block}& .main{display:flex;flex-direction:column;height:100%;margin:0;padding:0;width:100%}& .animation{contain:content;display:flex;height:100%;margin:0;padding:0;width:100%;& svg g{will-change:transform}}& [data-controls=true] .animation{height:calc(100% - 35px)}& .animation-container{position:relative}& .popover{animation:fade-in .2s ease-in-out;background-color:var(--lottie-player-toolbar-background-color);border:2px solid var(--lottie-player-toolbar-icon-color);border-radius:5px;bottom:40px;padding:10px 15px;position:absolute;right:5px;&:before{border:7px solid #0000;border-top:7px solid var(--lottie-player-toolbar-icon-color);content:\"\";height:0;margin-right:-7px;pointer-events:none;position:absolute;right:10px;top:100%;width:0}}& .error{align-items:center;display:flex;height:100%;justify-content:center;margin:auto;& svg{height:auto;width:100%}}& .toolbar{background:var(--lottie-player-toolbar-background-color);border-radius:5px;display:flex;gap:5px;height:35px;margin:0;padding:5px;place-items:center center;&.has-error{opacity:.5;pointer-events:none}& button{fill:var(--lottie-player-toolbar-icon-color);align-items:center;background:none;border:0;color:var(--lottie-player-toolbar-icon-color);cursor:pointer;gap:5px;height:100%;margin:0;opacity:.9;outline:0;padding:0;&:not([hidden]){display:flex}&:hover{opacity:1}&[data-active=true]{fill:var(--lottie-player-toolbar-icon-active-color);opacity:1}&:disabled{opacity:.5}&:focus{outline:0}& svg{pointer-events:none;&>*{fill:inherit}}&.disabled svg{display:none}}}& .progress-container{position:relative;width:100%;&.simple{margin-right:12px}}& progress{appearance:none;background-color:var(--lottie-player-seeker-track-color);border:0;border-radius:3px;height:5px;left:0;margin:7.5px 0;outline:none;pointer-events:none;position:absolute;top:0;width:100%;&::-webkit-progress-inner-element{border-radius:3px;overflow:hidden}&::-webkit-slider-runnable-track{background-color:initial}&::-webkit-progress-value{background-color:var(--lottie-player-seeker-thumb-color)}}& .seeker{appearance:none;background-color:initial;border:0;border-radius:3px;color:var(--lottie-player-seeker-thumb-color);cursor:pointer;display:var(--lottie-player-seeker-display);height:20px;margin:0;outline:none;padding:7.5px 0;position:relative;width:100%;z-index:1;&::-webkit-slider-runnable-track,&::-webkit-slider-thumb{appearance:none;outline:none}&::-webkit-slider-thumb{background-color:var(--lottie-player-seeker-thumb-color);border:0;border-radius:50%;cursor:pointer;height:15px;transform:scale(0);-webkit-transition:transform .2s ease-in-out;transition:transform .2s ease-in-out;width:15px}&:focus::-webkit-slider-thumb,&:hover::-webkit-slider-thumb{transform:scale(1)}&::-moz-range-progress{background-color:var(--lottie-player-seeker-thumb-color);border-radius:3px;height:5px}&::-moz-range-thumb{background-color:var(--lottie-player-seeker-thumb-color);border:0;border-radius:50%;cursor:pointer;height:15px;transform:scale(0);-moz-transition:transform .2s ease-in-out;transition:transform .2s ease-in-out;width:15px}&:focus::-moz-range-thumb,&:hover::-moz-range-thumb{transform:scale(1)}&::-ms-track{background:#0000;border-color:#0000;color:#0000;cursor:pointer;height:5px;width:100%}&::-ms-fill-upper{background:var(--lottie-player-seeker-track-color);border-radius:3px}&::-ms-fill-lower{background-color:var(--lottie-player-seeker-thumb-color);border-radius:3px}&::-ms-thumb{background:var(--lottie-player-seeker-thumb-color);border:0;border-radius:50%;cursor:pointer;height:15px;transform:scale(0);-ms-transition:transform .2s ease-in-out;transition:transform .2s ease-in-out;width:15px}&:hover::-ms-thumb{transform:scale(1)}&:focus{&::-ms-thumb{transform:scale(1)}&::-ms-fill-lower,&::-ms-fill-upper{background:var(--lottie-player-seeker-track-color)}}}& ::-moz-progress-bar{background-color:var(--lottie-player-seeker-thumb-color)}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@media (prefers-color-scheme:dark){:host{--lottie-player-toolbar-background-color:#000;--lottie-player-toolbar-icon-color:#fff;--lottie-player-toolbar-icon-hover-color:#fff;--lottie-player-seeker-track-color:#fff9}}";
|
|
75
75
|
|
|
76
76
|
var ObjectFit = /*#__PURE__*/ function(ObjectFit) {
|
|
77
77
|
ObjectFit["Contain"] = "contain";
|
|
@@ -170,7 +170,7 @@ const getStyles = async ()=>{
|
|
|
170
170
|
const styleSheet = new CSSStyleSheet();
|
|
171
171
|
await styleSheet.replace(css_248z);
|
|
172
172
|
return styleSheet;
|
|
173
|
-
}
|
|
173
|
+
};
|
|
174
174
|
class BaseElement extends PropertyCallbackElement {
|
|
175
175
|
/**
|
|
176
176
|
* Return the styles for the component.
|
|
@@ -466,12 +466,6 @@ class BaseElement extends PropertyCallbackElement {
|
|
|
466
466
|
return;
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
|
-
play() {
|
|
470
|
-
throw new Error(notImplemented$1);
|
|
471
|
-
}
|
|
472
|
-
_freeze() {
|
|
473
|
-
throw new Error(notImplemented$1);
|
|
474
|
-
}
|
|
475
469
|
constructor(...args){
|
|
476
470
|
super(...args), /**
|
|
477
471
|
* Player state.
|
|
@@ -549,9 +543,9 @@ class ScrollElement extends BaseElement {
|
|
|
549
543
|
if (this.animateOnScroll && !hasReducedMotion) {
|
|
550
544
|
if (isIntersecting) {
|
|
551
545
|
this.startScrollLoop();
|
|
552
|
-
|
|
553
|
-
this.stopScrollLoop();
|
|
546
|
+
return;
|
|
554
547
|
}
|
|
548
|
+
this.stopScrollLoop();
|
|
555
549
|
return;
|
|
556
550
|
}
|
|
557
551
|
if (!isIntersecting || document.hidden) {
|
|
@@ -574,9 +568,10 @@ class ScrollElement extends BaseElement {
|
|
|
574
568
|
this._playerState.playTimeout = setTimeout(()=>{
|
|
575
569
|
this.play();
|
|
576
570
|
}, this.delay);
|
|
577
|
-
if (this.playerState
|
|
578
|
-
|
|
571
|
+
if (this.playerState !== PlayerState.Playing) {
|
|
572
|
+
return;
|
|
579
573
|
}
|
|
574
|
+
clearTimeout(this._playerState.playTimeout);
|
|
580
575
|
});
|
|
581
576
|
this._observeIntersectionTarget();
|
|
582
577
|
}
|
|
@@ -780,7 +775,7 @@ var controls = /*#__PURE__*/Object.freeze({
|
|
|
780
775
|
|
|
781
776
|
/**
|
|
782
777
|
* Render Player.
|
|
783
|
-
*/
|
|
778
|
+
*/ function renderPlayer() {
|
|
784
779
|
if (!this.shadow || !this.template) {
|
|
785
780
|
throw new Error('No Shadow Element or Template');
|
|
786
781
|
}
|
|
@@ -797,13 +792,9 @@ var controls = /*#__PURE__*/Object.freeze({
|
|
|
797
792
|
langAttribute = `lang="${lang}"`;
|
|
798
793
|
}
|
|
799
794
|
this.template.innerHTML = /* HTML */ `<div class="animation-container main" data-controls="${this.controls ?? false}" ${langAttribute}><figure class="animation" style="background:${this.background}" ${this.description ? `aria-label="${this.description}"` : ''}></figure><slot name="controls"></slot></div>`;
|
|
800
|
-
this.shadow.adoptedStyleSheets = [
|
|
801
|
-
await DotLottiePlayerBase.styles()
|
|
802
|
-
];
|
|
803
795
|
this.shadow.appendChild(this.template.content.cloneNode(true));
|
|
804
796
|
}
|
|
805
797
|
|
|
806
|
-
const notImplemented = 'Method is not implemented';
|
|
807
798
|
/**
|
|
808
799
|
* DotLottie Player Web Component.
|
|
809
800
|
*/ class DotLottiePlayerBase extends ScrollElement {
|
|
@@ -841,7 +832,7 @@ const notImplemented = 'Method is not implemented';
|
|
|
841
832
|
constructor(){
|
|
842
833
|
super(), this.isLight = false, /**
|
|
843
834
|
* Whether settings toolbar is open.
|
|
844
|
-
*/ this._isSettingsOpen = false,
|
|
835
|
+
*/ this._isSettingsOpen = false, /**
|
|
845
836
|
* Seeker.
|
|
846
837
|
*/ this._seeker = 0, this._controlsLoadId = 0, this._errorLoadId = 0, this._isBounce = false, this._isDotLottie = false, /**
|
|
847
838
|
* Multi-animation settings.
|
|
@@ -891,9 +882,6 @@ const notImplemented = 'Method is not implemented';
|
|
|
891
882
|
mode: 'open'
|
|
892
883
|
});
|
|
893
884
|
}
|
|
894
|
-
addAnimation(_params) {
|
|
895
|
-
throw new Error(notImplemented);
|
|
896
|
-
}
|
|
897
885
|
/**
|
|
898
886
|
* Runs when the value of an attribute is changed on the component.
|
|
899
887
|
*/ // eslint-disable-next-line sonarjs/cognitive-complexity
|
|
@@ -1041,9 +1029,6 @@ const notImplemented = 'Method is not implemented';
|
|
|
1041
1029
|
}
|
|
1042
1030
|
})();
|
|
1043
1031
|
}
|
|
1044
|
-
convert(_params) {
|
|
1045
|
-
throw new Error(notImplemented);
|
|
1046
|
-
}
|
|
1047
1032
|
/**
|
|
1048
1033
|
* Destroy animation and element.
|
|
1049
1034
|
*/ destroy() {
|
|
@@ -1165,9 +1150,6 @@ const notImplemented = 'Method is not implemented';
|
|
|
1165
1150
|
await this._handleError(error);
|
|
1166
1151
|
}
|
|
1167
1152
|
}
|
|
1168
|
-
loadAnimation(_config) {
|
|
1169
|
-
throw new Error(notImplemented);
|
|
1170
|
-
}
|
|
1171
1153
|
/**
|
|
1172
1154
|
* Skip to next animation.
|
|
1173
1155
|
*/ next() {
|
|
@@ -1487,6 +1469,15 @@ const notImplemented = 'Method is not implemented';
|
|
|
1487
1469
|
target.focus();
|
|
1488
1470
|
}
|
|
1489
1471
|
}
|
|
1472
|
+
async _render() {
|
|
1473
|
+
if (!this.shadow) {
|
|
1474
|
+
return;
|
|
1475
|
+
}
|
|
1476
|
+
renderPlayer.call(this);
|
|
1477
|
+
this.shadow.adoptedStyleSheets = [
|
|
1478
|
+
await DotLottiePlayerBase.styles()
|
|
1479
|
+
];
|
|
1480
|
+
}
|
|
1490
1481
|
async _showError() {
|
|
1491
1482
|
if (this.playerState !== PlayerState.Error) {
|
|
1492
1483
|
return;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HTMLBooleanAttribute, AnimationData, AnimationDirection, AnimationItem,
|
|
1
|
+
import { HTMLBooleanAttribute, AnimationData, AnimationDirection, AnimationItem, LottieManifest, AnimationSettings, AnimationConfiguration, Vector2 } from '@aarsteinmedia/lottie-web';
|
|
2
2
|
import { PlayMode, PreserveAspectRatio, RendererType } from '@aarsteinmedia/lottie-web/utils';
|
|
3
3
|
|
|
4
4
|
declare abstract class PropertyCallbackElement extends HTMLElement {
|
|
@@ -7,6 +7,13 @@ declare abstract class PropertyCallbackElement extends HTMLElement {
|
|
|
7
7
|
propertyChangedCallback(_name: string, _oldValue: unknown, _value: unknown): void;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
+
declare enum ObjectFit {
|
|
11
|
+
Contain = "contain",
|
|
12
|
+
Cover = "cover",
|
|
13
|
+
Fill = "fill",
|
|
14
|
+
None = "none",
|
|
15
|
+
ScaleDown = "scale-down"
|
|
16
|
+
}
|
|
10
17
|
declare enum MouseOut {
|
|
11
18
|
Pause = "pause",
|
|
12
19
|
Reverse = "reverse",
|
|
@@ -58,7 +65,7 @@ declare abstract class BaseElement extends PropertyCallbackElement {
|
|
|
58
65
|
set mouseout(value: MouseOut);
|
|
59
66
|
get mouseout(): MouseOut;
|
|
60
67
|
set objectfit(value: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down');
|
|
61
|
-
get objectfit():
|
|
68
|
+
get objectfit(): ObjectFit;
|
|
62
69
|
set once(value: HTMLBooleanAttribute);
|
|
63
70
|
get once(): HTMLBooleanAttribute;
|
|
64
71
|
set playOnClick(value: HTMLBooleanAttribute);
|
|
@@ -98,8 +105,8 @@ declare abstract class BaseElement extends PropertyCallbackElement {
|
|
|
98
105
|
private _toLog;
|
|
99
106
|
clearDevLog(): void;
|
|
100
107
|
devLog(toLog: unknown, type?: 'error' | 'info' | 'warn'): void;
|
|
101
|
-
play(): void;
|
|
102
|
-
protected _freeze(): void;
|
|
108
|
+
abstract play(): void;
|
|
109
|
+
protected abstract _freeze(): void;
|
|
103
110
|
}
|
|
104
111
|
|
|
105
112
|
declare abstract class ScrollElement extends BaseElement {
|
|
@@ -119,8 +126,6 @@ declare abstract class ScrollElement extends BaseElement {
|
|
|
119
126
|
private _observeIntersectionTarget;
|
|
120
127
|
}
|
|
121
128
|
|
|
122
|
-
declare function renderPlayer(this: DotLottiePlayerBase): Promise<void>;
|
|
123
|
-
|
|
124
129
|
declare abstract class DotLottiePlayerBase extends ScrollElement {
|
|
125
130
|
static get observedAttributes(): readonly ["animateOnScroll", "autoplay", "controls", "direction", "hover", "loop", "mode", "playOnClick", "playOnVisible", "selector", "speed", "src", "subframe"];
|
|
126
131
|
static get observedProperties(): readonly ["playerState", "_isSettingsOpen", "_seeker", "_currentAnimation", "_animations"];
|
|
@@ -130,7 +135,6 @@ declare abstract class DotLottiePlayerBase extends ScrollElement {
|
|
|
130
135
|
template?: HTMLTemplateElement;
|
|
131
136
|
get isDotLottie(): boolean;
|
|
132
137
|
protected _isSettingsOpen: boolean;
|
|
133
|
-
protected _render: typeof renderPlayer;
|
|
134
138
|
protected _seeker: number;
|
|
135
139
|
private _controlsLoadId;
|
|
136
140
|
private _errorLoadId;
|
|
@@ -140,10 +144,8 @@ declare abstract class DotLottiePlayerBase extends ScrollElement {
|
|
|
140
144
|
private _multiAnimationSettings;
|
|
141
145
|
private _segment?;
|
|
142
146
|
constructor();
|
|
143
|
-
addAnimation(_params: AddAnimationParams): Promise<Result>;
|
|
144
147
|
attributeChangedCallback(name: typeof DotLottiePlayerBase.observedAttributes[number], _oldValue: unknown, value: string): Promise<void>;
|
|
145
148
|
connectedCallback(): void;
|
|
146
|
-
convert(_params: ConvertParams): Promise<Result>;
|
|
147
149
|
destroy(): void;
|
|
148
150
|
disconnectedCallback(): void;
|
|
149
151
|
getLottie(): AnimationItem | null;
|
|
@@ -151,7 +153,7 @@ declare abstract class DotLottiePlayerBase extends ScrollElement {
|
|
|
151
153
|
getMultiAnimationSettings(): AnimationSettings[];
|
|
152
154
|
getSegment(): [number, number] | undefined;
|
|
153
155
|
load(src: string | null): Promise<void>;
|
|
154
|
-
loadAnimation(_config: AnimationConfiguration): AnimationItem;
|
|
156
|
+
abstract loadAnimation(_config: AnimationConfiguration): AnimationItem;
|
|
155
157
|
next(): void;
|
|
156
158
|
pause(): void;
|
|
157
159
|
play(): void;
|
|
@@ -176,6 +178,7 @@ declare abstract class DotLottiePlayerBase extends ScrollElement {
|
|
|
176
178
|
protected _handleClick(): void;
|
|
177
179
|
protected _handleSeekChange({ target }: Event): void;
|
|
178
180
|
protected _handleSettingsClick({ target }: Event): void;
|
|
181
|
+
protected _render(): Promise<void>;
|
|
179
182
|
protected _renderControls: () => Promise<void>;
|
|
180
183
|
protected _showError(): Promise<void>;
|
|
181
184
|
protected setOptions(_options: {
|
package/dist/full.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { RendererType, PreserveAspectRatio } from '@aarsteinmedia/lottie-web/uti
|
|
|
2
2
|
export { PlayMode, PlayerEvent, RendererType } from '@aarsteinmedia/lottie-web/utils';
|
|
3
3
|
import * as _aarsteinmedia_lottie_web from '@aarsteinmedia/lottie-web';
|
|
4
4
|
import { AddAnimationParams, ConvertParams, AnimationConfiguration, Vector2 } from '@aarsteinmedia/lottie-web';
|
|
5
|
-
import { D as DotLottiePlayerBase } from './chunks/constants.d-
|
|
6
|
-
export { M as MouseOut, P as PlayerState, t as tagName } from './chunks/constants.d-
|
|
5
|
+
import { D as DotLottiePlayerBase } from './chunks/constants.d-t4RBAbwL.js';
|
|
6
|
+
export { M as MouseOut, P as PlayerState, t as tagName } from './chunks/constants.d-t4RBAbwL.js';
|
|
7
7
|
|
|
8
8
|
declare class DotLottiePlayer extends DotLottiePlayerBase {
|
|
9
9
|
addAnimation(params: AddAnimationParams): Promise<_aarsteinmedia_lottie_web.Result>;
|
package/dist/full.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { RendererType, isServer } from '@aarsteinmedia/lottie-web/utils';
|
|
2
2
|
export { PlayMode, PlayerEvent, RendererType } from '@aarsteinmedia/lottie-web/utils';
|
|
3
3
|
import { loadAnimation } from '@aarsteinmedia/lottie-web';
|
|
4
|
-
import { D as DotLottiePlayerBase, l as loadDotLottieTools, t as tagName } from './chunks/DotLottiePlayerBase-
|
|
5
|
-
export { M as MouseOut, P as PlayerState } from './chunks/DotLottiePlayerBase-
|
|
4
|
+
import { D as DotLottiePlayerBase, l as loadDotLottieTools, t as tagName } from './chunks/DotLottiePlayerBase-z6EhEWjH.js';
|
|
5
|
+
export { M as MouseOut, P as PlayerState } from './chunks/DotLottiePlayerBase-z6EhEWjH.js';
|
|
6
6
|
import '@aarsteinmedia/lottie-web/dotlottie';
|
|
7
7
|
|
|
8
8
|
/**
|
package/dist/light.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { RendererType, PreserveAspectRatio } from '@aarsteinmedia/lottie-web/uti
|
|
|
2
2
|
export { PlayMode, PlayerEvent, RendererType } from '@aarsteinmedia/lottie-web/utils';
|
|
3
3
|
import * as _aarsteinmedia_lottie_web from '@aarsteinmedia/lottie-web';
|
|
4
4
|
import { AnimationConfiguration, Vector2 } from '@aarsteinmedia/lottie-web';
|
|
5
|
-
import { D as DotLottiePlayerBase } from './chunks/constants.d-
|
|
6
|
-
export { M as MouseOut, P as PlayerState, t as tagName } from './chunks/constants.d-
|
|
5
|
+
import { D as DotLottiePlayerBase } from './chunks/constants.d-t4RBAbwL.js';
|
|
6
|
+
export { M as MouseOut, P as PlayerState, t as tagName } from './chunks/constants.d-t4RBAbwL.js';
|
|
7
7
|
|
|
8
8
|
declare class DotLottiePlayerLight extends DotLottiePlayerBase {
|
|
9
9
|
get renderer(): RendererType;
|
package/dist/light.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { RendererType, isServer } from '@aarsteinmedia/lottie-web/utils';
|
|
2
2
|
export { PlayMode, PlayerEvent, RendererType } from '@aarsteinmedia/lottie-web/utils';
|
|
3
3
|
import { loadAnimation } from '@aarsteinmedia/lottie-web/light';
|
|
4
|
-
import { D as DotLottiePlayerBase, t as tagName } from './chunks/DotLottiePlayerBase-
|
|
5
|
-
export { M as MouseOut, P as PlayerState } from './chunks/DotLottiePlayerBase-
|
|
4
|
+
import { D as DotLottiePlayerBase, t as tagName } from './chunks/DotLottiePlayerBase-z6EhEWjH.js';
|
|
5
|
+
export { M as MouseOut, P as PlayerState } from './chunks/DotLottiePlayerBase-z6EhEWjH.js';
|
|
6
6
|
import '@aarsteinmedia/lottie-web/dotlottie';
|
|
7
7
|
|
|
8
8
|
/**
|
package/dist/svg.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { RendererType, PreserveAspectRatio } from '@aarsteinmedia/lottie-web/uti
|
|
|
2
2
|
export { PlayMode, PlayerEvent, RendererType } from '@aarsteinmedia/lottie-web/utils';
|
|
3
3
|
import * as _aarsteinmedia_lottie_web from '@aarsteinmedia/lottie-web';
|
|
4
4
|
import { AnimationConfiguration, Vector2 } from '@aarsteinmedia/lottie-web';
|
|
5
|
-
import { D as DotLottiePlayerBase } from './chunks/constants.d-
|
|
6
|
-
export { M as MouseOut, P as PlayerState, t as tagName } from './chunks/constants.d-
|
|
5
|
+
import { D as DotLottiePlayerBase } from './chunks/constants.d-t4RBAbwL.js';
|
|
6
|
+
export { M as MouseOut, P as PlayerState, t as tagName } from './chunks/constants.d-t4RBAbwL.js';
|
|
7
7
|
|
|
8
8
|
declare class DotLottiePlayerSVG extends DotLottiePlayerBase {
|
|
9
9
|
get renderer(): RendererType;
|
package/dist/svg.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { RendererType, isServer } from '@aarsteinmedia/lottie-web/utils';
|
|
2
2
|
export { PlayMode, PlayerEvent, RendererType } from '@aarsteinmedia/lottie-web/utils';
|
|
3
3
|
import { loadAnimation } from '@aarsteinmedia/lottie-web/svg';
|
|
4
|
-
import { D as DotLottiePlayerBase, t as tagName } from './chunks/DotLottiePlayerBase-
|
|
5
|
-
export { M as MouseOut, P as PlayerState } from './chunks/DotLottiePlayerBase-
|
|
4
|
+
import { D as DotLottiePlayerBase, t as tagName } from './chunks/DotLottiePlayerBase-z6EhEWjH.js';
|
|
5
|
+
export { M as MouseOut, P as PlayerState } from './chunks/DotLottiePlayerBase-z6EhEWjH.js';
|
|
6
6
|
import '@aarsteinmedia/lottie-web/dotlottie';
|
|
7
7
|
|
|
8
8
|
/**
|