@aarsteinmedia/dotlottie-player 5.2.3 → 5.2.4
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 +2 -2
- package/custom-elements.json +10 -4
- package/dist/index.d.ts +2 -6
- package/dist/index.js +12 -18
- package/dist/unpkg.js +7 -7
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -7,7 +7,7 @@ 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 noteable changes to us](https://github.com/aarsteinmedia/dotlottie-player/issues), and we'll add them promptly.
|
|
9
9
|
|
|
10
|
-
## [5.2.
|
|
10
|
+
## [5.2.4] - 11-06-2025
|
|
11
11
|
|
|
12
12
|
### Changed
|
|
13
13
|
|
|
@@ -289,7 +289,7 @@ Changelog was only added since [3.2.3], so it's not exhaustive. [Please report a
|
|
|
289
289
|
- Removed dependencies
|
|
290
290
|
- `@lit`
|
|
291
291
|
|
|
292
|
-
[5.2.
|
|
292
|
+
[5.2.4]: https://www.npmjs.com/package/@aarsteinmedia/dotlottie-player/v/5.2.4
|
|
293
293
|
[5.2.0]: https://www.npmjs.com/package/@aarsteinmedia/dotlottie-player/v/5.2.0
|
|
294
294
|
[5.1.13]: https://www.npmjs.com/package/@aarsteinmedia/dotlottie-player/v/5.1.13
|
|
295
295
|
[5.1.11]: https://www.npmjs.com/package/@aarsteinmedia/dotlottie-player/v/5.1.11
|
package/custom-elements.json
CHANGED
|
@@ -368,6 +368,16 @@
|
|
|
368
368
|
],
|
|
369
369
|
"description": "Handles click and drag actions on the progress track."
|
|
370
370
|
},
|
|
371
|
+
{
|
|
372
|
+
"kind": "method",
|
|
373
|
+
"name": "_handleSettingsClick",
|
|
374
|
+
"parameters": [
|
|
375
|
+
{
|
|
376
|
+
"name": "{ target }"
|
|
377
|
+
}
|
|
378
|
+
],
|
|
379
|
+
"description": "Handle settings click event."
|
|
380
|
+
},
|
|
371
381
|
{
|
|
372
382
|
"kind": "method",
|
|
373
383
|
"name": "_addEventListeners",
|
|
@@ -586,10 +596,6 @@
|
|
|
586
596
|
},
|
|
587
597
|
"default": "[]"
|
|
588
598
|
},
|
|
589
|
-
{
|
|
590
|
-
"kind": "field",
|
|
591
|
-
"name": "_handleSettingsClick"
|
|
592
|
-
},
|
|
593
599
|
{
|
|
594
600
|
"kind": "field",
|
|
595
601
|
"name": "template"
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { RendererType } from '@aarsteinmedia/lottie-web/utils';
|
|
1
2
|
export { PlayerEvents } from '@aarsteinmedia/lottie-web/utils';
|
|
2
3
|
import { AnimationSettings, AnimationData, LottieManifest, AnimationDirection, AnimationItem, Vector2 } from '@aarsteinmedia/lottie-web';
|
|
3
4
|
|
|
@@ -84,11 +85,6 @@ declare enum PreserveAspectRatio {
|
|
|
84
85
|
Initial = "none",
|
|
85
86
|
None = "xMinYMin slice"
|
|
86
87
|
}
|
|
87
|
-
declare enum RendererType {
|
|
88
|
-
Canvas = "canvas",
|
|
89
|
-
HTML = "html",
|
|
90
|
-
SVG = "svg"
|
|
91
|
-
}
|
|
92
88
|
|
|
93
89
|
declare class DotLottiePlayer extends PropertyCallbackElement {
|
|
94
90
|
static get observedAttributes(): string[];
|
|
@@ -196,7 +192,7 @@ declare class DotLottiePlayer extends PropertyCallbackElement {
|
|
|
196
192
|
protected _freeze(): void;
|
|
197
193
|
protected _handleBlur(): void;
|
|
198
194
|
protected _handleSeekChange({ target }: Event): void;
|
|
199
|
-
protected _handleSettingsClick
|
|
195
|
+
protected _handleSettingsClick({ target }: Event): void;
|
|
200
196
|
private _addEventListeners;
|
|
201
197
|
private _addIntersectionObserver;
|
|
202
198
|
private _complete;
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isServer, createElementID, PreserveAspectRatio as PreserveAspectRatio$1, PlayerEvents } from '@aarsteinmedia/lottie-web/utils';
|
|
1
|
+
import { isServer, createElementID, PreserveAspectRatio as PreserveAspectRatio$1, RendererType, PlayerEvents } from '@aarsteinmedia/lottie-web/utils';
|
|
2
2
|
export { PlayerEvents } from '@aarsteinmedia/lottie-web/utils';
|
|
3
3
|
import Lottie from '@aarsteinmedia/lottie-web';
|
|
4
4
|
import { strToU8, zip, strFromU8, unzip as unzip$1 } from 'fflate';
|
|
@@ -95,12 +95,6 @@ var PreserveAspectRatio = /*#__PURE__*/ function(PreserveAspectRatio) {
|
|
|
95
95
|
PreserveAspectRatio["None"] = "xMinYMin slice";
|
|
96
96
|
return PreserveAspectRatio;
|
|
97
97
|
}({});
|
|
98
|
-
var RendererType = /*#__PURE__*/ function(RendererType) {
|
|
99
|
-
RendererType["Canvas"] = "canvas";
|
|
100
|
-
RendererType["HTML"] = "html";
|
|
101
|
-
RendererType["SVG"] = "svg";
|
|
102
|
-
return RendererType;
|
|
103
|
-
}({});
|
|
104
98
|
|
|
105
99
|
/**
|
|
106
100
|
* Render Controls.
|
|
@@ -875,15 +869,7 @@ const generator = '@aarsteinmedia/dotlottie-player';
|
|
|
875
869
|
* Which animation to show, if several.
|
|
876
870
|
*/ this._currentAnimation = 0, this._isBounce = false, this._isDotLottie = false, this._lottieInstance = null, /**
|
|
877
871
|
* Multi-animation settings.
|
|
878
|
-
*/ this._multiAnimationSettings = []
|
|
879
|
-
* Handle settings click event.
|
|
880
|
-
*/ this._handleSettingsClick = ({ target })=>{
|
|
881
|
-
this._toggleSettings();
|
|
882
|
-
// Because Safari does not add focus on click, we need to add it manually, so the onblur event will fire
|
|
883
|
-
if (target instanceof HTMLElement) {
|
|
884
|
-
target.focus();
|
|
885
|
-
}
|
|
886
|
-
};
|
|
872
|
+
*/ this._multiAnimationSettings = [];
|
|
887
873
|
this._complete = this._complete.bind(this);
|
|
888
874
|
this._dataFailed = this._dataFailed.bind(this);
|
|
889
875
|
this._dataReady = this._dataReady.bind(this);
|
|
@@ -899,6 +885,7 @@ const generator = '@aarsteinmedia/dotlottie-player';
|
|
|
899
885
|
this._mouseLeave = this._mouseLeave.bind(this);
|
|
900
886
|
this._onVisibilityChange = this._onVisibilityChange.bind(this);
|
|
901
887
|
this._switchInstance = this._switchInstance.bind(this);
|
|
888
|
+
this._handleSettingsClick = this._handleSettingsClick.bind(this);
|
|
902
889
|
this.togglePlay = this.togglePlay.bind(this);
|
|
903
890
|
this.stop = this.stop.bind(this);
|
|
904
891
|
this.prev = this.prev.bind(this);
|
|
@@ -1123,13 +1110,11 @@ const generator = '@aarsteinmedia/dotlottie-player';
|
|
|
1123
1110
|
}
|
|
1124
1111
|
/**
|
|
1125
1112
|
* Get Multi-animation settings.
|
|
1126
|
-
*
|
|
1127
1113
|
*/ getMultiAnimationSettings() {
|
|
1128
1114
|
return this._multiAnimationSettings;
|
|
1129
1115
|
}
|
|
1130
1116
|
/**
|
|
1131
1117
|
* Get playback segment.
|
|
1132
|
-
*
|
|
1133
1118
|
*/ getSegment() {
|
|
1134
1119
|
return this._segment;
|
|
1135
1120
|
}
|
|
@@ -1512,6 +1497,15 @@ const generator = '@aarsteinmedia/dotlottie-player';
|
|
|
1512
1497
|
this.seek(Math.round(Number(target.value) / 100 * this._lottieInstance.totalFrames));
|
|
1513
1498
|
}
|
|
1514
1499
|
/**
|
|
1500
|
+
* Handle settings click event.
|
|
1501
|
+
*/ _handleSettingsClick({ target }) {
|
|
1502
|
+
this._toggleSettings();
|
|
1503
|
+
// Because Safari does not add focus on click, we need to add it manually, so the onblur event will fire
|
|
1504
|
+
if (target instanceof HTMLElement) {
|
|
1505
|
+
target.focus();
|
|
1506
|
+
}
|
|
1507
|
+
}
|
|
1508
|
+
/**
|
|
1515
1509
|
* Add event listeners.
|
|
1516
1510
|
*/ _addEventListeners() {
|
|
1517
1511
|
this._toggleEventListeners('add');
|