@aarsteinmedia/dotlottie-player 6.3.6 → 6.3.9
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/custom-elements.json +23 -15
- package/dist/canvas.d.ts +3 -3
- package/dist/canvas.js +3 -3
- package/dist/chunks/{DotLottiePlayerBase-BBHa6yP8.js → DotLottiePlayerBase-B4yJibwF.js} +139 -96
- package/dist/chunks/{DotLottiePlayerBase.d-BSagzEPB.d.ts → DotLottiePlayerBase.d-DaXI0b6M.d.ts} +4 -3
- package/dist/chunks/errorScreen-CN8UGB0n.js +7 -0
- package/dist/full.d.ts +6 -7
- package/dist/full.js +14 -10
- package/dist/light.d.ts +3 -3
- package/dist/light.js +5 -5
- package/dist/svg.d.ts +3 -3
- package/dist/svg.js +5 -5
- package/dist/unpkg-canvas.js +23 -23
- package/dist/unpkg-full.js +23 -23
- package/dist/unpkg-light.js +22 -22
- package/dist/unpkg-svg.js +23 -23
- package/package.json +25 -24
package/dist/chunks/{DotLottiePlayerBase.d-BSagzEPB.d.ts → DotLottiePlayerBase.d-DaXI0b6M.d.ts}
RENAMED
|
@@ -7,8 +7,6 @@ declare abstract class PropertyCallbackElement extends HTMLElement {
|
|
|
7
7
|
propertyChangedCallback(_name: string, _oldValue: unknown, _value: unknown): void;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
declare function renderControls(this: DotLottiePlayerBase): void;
|
|
11
|
-
|
|
12
10
|
declare function renderPlayer(this: DotLottiePlayerBase): Promise<void>;
|
|
13
11
|
|
|
14
12
|
declare enum MouseOut {
|
|
@@ -105,10 +103,11 @@ declare abstract class DotLottiePlayerBase extends PropertyCallbackElement {
|
|
|
105
103
|
scrollTimeout: NodeJS.Timeout | null;
|
|
106
104
|
};
|
|
107
105
|
protected _render: typeof renderPlayer;
|
|
108
|
-
protected _renderControls: typeof renderControls;
|
|
109
106
|
protected _seeker: number;
|
|
110
107
|
private _animations;
|
|
108
|
+
private _controlsLoadId;
|
|
111
109
|
private _currentAnimation;
|
|
110
|
+
private _errorLoadId;
|
|
112
111
|
private _intersectionObserver?;
|
|
113
112
|
private _isBounce;
|
|
114
113
|
private _isDotLottie;
|
|
@@ -153,6 +152,8 @@ declare abstract class DotLottiePlayerBase extends PropertyCallbackElement {
|
|
|
153
152
|
protected _handleClick(): void;
|
|
154
153
|
protected _handleSeekChange({ target }: Event): void;
|
|
155
154
|
protected _handleSettingsClick({ target }: Event): void;
|
|
155
|
+
protected _renderControls: () => Promise<void>;
|
|
156
|
+
protected _showError(): Promise<void>;
|
|
156
157
|
protected setOptions(_options: {
|
|
157
158
|
container?: undefined | HTMLElement;
|
|
158
159
|
rendererType: RendererType;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PreserveAspectRatio, namespaceSVG } from '@aarsteinmedia/lottie-web/utils';
|
|
2
|
+
|
|
3
|
+
function errorScreen(message) {
|
|
4
|
+
return /* HTML */ `<div class="error"><svg preserveAspectRatio="${PreserveAspectRatio.Cover}" xmlns="${namespaceSVG}" width="1920" height="1080" viewBox="0 0 1920 1080" style="white-space:preserve"><path fill="#fff" d="M0 0h1920v1080H0z"/><path fill="#3a6d8b" d="M1190.2 531 1007 212.4c-22-38.2-77.2-38-98.8.5L729.5 531.3c-21.3 37.9 6.1 84.6 49.5 84.6l361.9.3c43.7 0 71.1-47.3 49.3-85.2zM937.3 288.7c.2-7.5 3.3-23.9 23.2-23.9 16.3 0 23 16.1 23 23.5 0 55.3-10.7 197.2-12.2 214.5-.1 1-.9 1.7-1.9 1.7h-18.3c-1 0-1.8-.7-1.9-1.7-1.4-17.5-13.4-162.9-11.9-214.1zm24.2 283.8c-13.1 0-23.7-10.6-23.7-23.7s10.6-23.7 23.7-23.7 23.7 10.6 23.7 23.7-10.6 23.7-23.7 23.7zM722.1 644h112.6v34.4h-70.4V698h58.8v31.7h-58.8v22.6h72.4v36.2H722.1V644zm162 57.1h.6c8.3-12.9 18.2-17.8 31.3-17.8 3 0 5.1.4 6.3 1v32.6h-.8c-22.4-3.8-35.6 6.3-35.6 29.5v42.3h-38.2V685.5h36.4v15.6zm78.9 0h.6c8.3-12.9 18.2-17.8 31.3-17.8 3 0 5.1.4 6.3 1v32.6h-.8c-22.4-3.8-35.6 6.3-35.6 29.5v42.3h-38.2V685.5H963v15.6zm39.5 36.2c0-31.3 22.2-54.8 56.6-54.8 34.4 0 56.2 23.5 56.2 54.8s-21.8 54.6-56.2 54.6c-34.4-.1-56.6-23.3-56.6-54.6zm74 0c0-17.4-6.1-29.1-17.8-29.1-11.7 0-17.4 11.7-17.4 29.1 0 17.4 5.7 29.1 17.4 29.1s17.8-11.8 17.8-29.1zm83.1-36.2h.6c8.3-12.9 18.2-17.8 31.3-17.8 3 0 5.1.4 6.3 1v32.6h-.8c-22.4-3.8-35.6 6.3-35.6 29.5v42.3h-38.2V685.5h36.4v15.6z"/><path fill="none" d="M718.9 807.7h645v285.4h-645z"/><text fill="#3a6d8b" style="text-align:center;position:absolute;left:100%;font-size:47px;font-family:system-ui,-apple-system,BlinkMacSystemFont,'.SFNSText-Regular',sans-serif" x="50%" y="848.017" text-anchor="middle">${message}</text></svg></div>`;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export { errorScreen as default };
|
package/dist/full.d.ts
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { RendererType, PreserveAspectRatio } from '@aarsteinmedia/lottie-web/utils';
|
|
2
|
-
export { PlayMode,
|
|
2
|
+
export { PlayMode, PlayerEvent, RendererType } from '@aarsteinmedia/lottie-web/utils';
|
|
3
3
|
import * as _aarsteinmedia_lottie_web from '@aarsteinmedia/lottie-web';
|
|
4
|
-
import { AnimationConfiguration, Vector2 } from '@aarsteinmedia/lottie-web';
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
export { M as MouseOut, P as PlayerState, t as tagName } from './chunks/DotLottiePlayerBase.d-BSagzEPB.js';
|
|
4
|
+
import { AddAnimationParams, ConvertParams, AnimationConfiguration, Vector2 } from '@aarsteinmedia/lottie-web';
|
|
5
|
+
import { D as DotLottiePlayerBase } from './chunks/DotLottiePlayerBase.d-DaXI0b6M.js';
|
|
6
|
+
export { M as MouseOut, P as PlayerState, t as tagName } from './chunks/DotLottiePlayerBase.d-DaXI0b6M.js';
|
|
8
7
|
|
|
9
8
|
declare class DotLottiePlayer extends DotLottiePlayerBase {
|
|
10
|
-
addAnimation:
|
|
11
|
-
convert:
|
|
9
|
+
addAnimation(params: AddAnimationParams): Promise<_aarsteinmedia_lottie_web.Result>;
|
|
10
|
+
convert(params: ConvertParams): Promise<_aarsteinmedia_lottie_web.Result>;
|
|
12
11
|
loadAnimation(config: AnimationConfiguration): _aarsteinmedia_lottie_web.AnimationItem;
|
|
13
12
|
protected setOptions({ container, hasAutoplay, hasLoop, initialSegment, preserveAspectRatio, rendererType }: {
|
|
14
13
|
container?: undefined | HTMLElement;
|
package/dist/full.js
CHANGED
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
import { RendererType, isServer } from '@aarsteinmedia/lottie-web/utils';
|
|
2
|
-
export { PlayMode,
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
export { PlayMode, PlayerEvent, RendererType } from '@aarsteinmedia/lottie-web/utils';
|
|
3
|
+
import { loadAnimation } from '@aarsteinmedia/lottie-web';
|
|
4
|
+
import { D as DotLottiePlayerBase, l as loadDotLottieTools, t as tagName } from './chunks/DotLottiePlayerBase-B4yJibwF.js';
|
|
5
|
+
export { M as MouseOut, P as PlayerState } from './chunks/DotLottiePlayerBase-B4yJibwF.js';
|
|
6
|
+
import '@aarsteinmedia/lottie-web/dotlottie';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* DotLottie Player Web Component.
|
|
10
10
|
*/ class DotLottiePlayer extends DotLottiePlayerBase {
|
|
11
|
+
async addAnimation(params) {
|
|
12
|
+
const { addAnimation } = await loadDotLottieTools();
|
|
13
|
+
return await addAnimation(params);
|
|
14
|
+
}
|
|
15
|
+
async convert(params) {
|
|
16
|
+
const { convert } = await loadDotLottieTools();
|
|
17
|
+
return await convert(params);
|
|
18
|
+
}
|
|
11
19
|
loadAnimation(config) {
|
|
12
|
-
return
|
|
20
|
+
return loadAnimation(config);
|
|
13
21
|
}
|
|
14
22
|
setOptions({ container, hasAutoplay, hasLoop, initialSegment, preserveAspectRatio, rendererType }) {
|
|
15
23
|
const options = {
|
|
@@ -38,7 +46,6 @@ export { M as MouseOut, P as PlayerState } from './chunks/DotLottiePlayerBase-BB
|
|
|
38
46
|
{
|
|
39
47
|
options.rendererSettings = {
|
|
40
48
|
...options.rendererSettings,
|
|
41
|
-
// clearCanvas: true,
|
|
42
49
|
preserveAspectRatio,
|
|
43
50
|
progressiveLoad: true
|
|
44
51
|
};
|
|
@@ -47,9 +54,6 @@ export { M as MouseOut, P as PlayerState } from './chunks/DotLottiePlayerBase-BB
|
|
|
47
54
|
}
|
|
48
55
|
return options;
|
|
49
56
|
}
|
|
50
|
-
constructor(...args){
|
|
51
|
-
super(...args), this.addAnimation = addAnimation, this.convert = convert;
|
|
52
|
-
}
|
|
53
57
|
}
|
|
54
58
|
|
|
55
59
|
/**
|
package/dist/light.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { RendererType, PreserveAspectRatio } from '@aarsteinmedia/lottie-web/utils';
|
|
2
|
-
export { PlayMode,
|
|
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/DotLottiePlayerBase.d-
|
|
6
|
-
export { M as MouseOut, P as PlayerState, t as tagName } from './chunks/DotLottiePlayerBase.d-
|
|
5
|
+
import { D as DotLottiePlayerBase } from './chunks/DotLottiePlayerBase.d-DaXI0b6M.js';
|
|
6
|
+
export { M as MouseOut, P as PlayerState, t as tagName } from './chunks/DotLottiePlayerBase.d-DaXI0b6M.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
|
-
export { PlayMode,
|
|
3
|
-
import
|
|
4
|
-
import { D as DotLottiePlayerBase, t as tagName } from './chunks/DotLottiePlayerBase-
|
|
5
|
-
export { M as MouseOut, P as PlayerState } from './chunks/DotLottiePlayerBase-
|
|
2
|
+
export { PlayMode, PlayerEvent, RendererType } from '@aarsteinmedia/lottie-web/utils';
|
|
3
|
+
import { loadAnimation } from '@aarsteinmedia/lottie-web/light';
|
|
4
|
+
import { D as DotLottiePlayerBase, t as tagName } from './chunks/DotLottiePlayerBase-B4yJibwF.js';
|
|
5
|
+
export { M as MouseOut, P as PlayerState } from './chunks/DotLottiePlayerBase-B4yJibwF.js';
|
|
6
6
|
import '@aarsteinmedia/lottie-web/dotlottie';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -16,7 +16,7 @@ import '@aarsteinmedia/lottie-web/dotlottie';
|
|
|
16
16
|
this.isLight = true;
|
|
17
17
|
}
|
|
18
18
|
loadAnimation(config) {
|
|
19
|
-
return
|
|
19
|
+
return loadAnimation(config);
|
|
20
20
|
}
|
|
21
21
|
setOptions({ container, hasAutoplay, hasLoop, initialSegment, preserveAspectRatio }) {
|
|
22
22
|
const options = {
|
package/dist/svg.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { RendererType, PreserveAspectRatio } from '@aarsteinmedia/lottie-web/utils';
|
|
2
|
-
export { PlayMode,
|
|
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/DotLottiePlayerBase.d-
|
|
6
|
-
export { M as MouseOut, P as PlayerState, t as tagName } from './chunks/DotLottiePlayerBase.d-
|
|
5
|
+
import { D as DotLottiePlayerBase } from './chunks/DotLottiePlayerBase.d-DaXI0b6M.js';
|
|
6
|
+
export { M as MouseOut, P as PlayerState, t as tagName } from './chunks/DotLottiePlayerBase.d-DaXI0b6M.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
|
-
export { PlayMode,
|
|
3
|
-
import
|
|
4
|
-
import { D as DotLottiePlayerBase, t as tagName } from './chunks/DotLottiePlayerBase-
|
|
5
|
-
export { M as MouseOut, P as PlayerState } from './chunks/DotLottiePlayerBase-
|
|
2
|
+
export { PlayMode, PlayerEvent, RendererType } from '@aarsteinmedia/lottie-web/utils';
|
|
3
|
+
import { loadAnimation } from '@aarsteinmedia/lottie-web/svg';
|
|
4
|
+
import { D as DotLottiePlayerBase, t as tagName } from './chunks/DotLottiePlayerBase-B4yJibwF.js';
|
|
5
|
+
export { M as MouseOut, P as PlayerState } from './chunks/DotLottiePlayerBase-B4yJibwF.js';
|
|
6
6
|
import '@aarsteinmedia/lottie-web/dotlottie';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -16,7 +16,7 @@ import '@aarsteinmedia/lottie-web/dotlottie';
|
|
|
16
16
|
this.isLight = true;
|
|
17
17
|
}
|
|
18
18
|
loadAnimation(config) {
|
|
19
|
-
return
|
|
19
|
+
return loadAnimation(config);
|
|
20
20
|
}
|
|
21
21
|
setOptions({ container, hasAutoplay, hasLoop, initialSegment, preserveAspectRatio }) {
|
|
22
22
|
const options = {
|