@aarsteinmedia/dotlottie-player 6.5.7 → 6.6.0
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 +9 -49
- package/dist/canvas.d.ts +7 -20
- package/dist/canvas.js +5 -10
- package/dist/chunks/{DotLottiePlayerBase-CsIB0VNt.js → DotLottiePlayerBase-BDutF_6O.js} +144 -151
- package/dist/chunks/{constants.d-t4RBAbwL.d.ts → DotLottiePlayerCanvas.d-CBwsqsPc.d.ts} +95 -39
- package/dist/chunks/{errorScreen-BPvA3AoR.js → errorScreen-B5U8u-AX.js} +4 -1
- package/dist/chunks/utilities-CC4oA5Yh.js +33 -0
- package/dist/chunks/utilities.d-BCeerq0j.d.ts +29 -0
- package/dist/full.d.ts +7 -20
- package/dist/full.js +8 -5
- package/dist/light.d.ts +7 -20
- package/dist/light.js +4 -9
- package/dist/svg.d.ts +7 -20
- package/dist/svg.js +4 -9
- package/dist/unpkg-canvas.js +3 -3
- package/dist/unpkg-full.js +3 -3
- package/dist/unpkg-light.js +2 -2
- package/dist/unpkg-svg.js +3 -3
- package/dist/utilities.d.ts +2 -0
- package/dist/utilities.js +2 -0
- package/package.json +17 -2
|
@@ -1,38 +1,15 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as _aarsteinmedia_lottie_web from '@aarsteinmedia/lottie-web';
|
|
2
|
+
import { HTMLBooleanAttribute, AnimationData, AnimationDirection, AnimationItem, LottieManifest, AnimationSettings, AnimationConfiguration, Vector2, AddAnimationParams, ConvertParams } from '@aarsteinmedia/lottie-web';
|
|
2
3
|
import { PlayMode, PreserveAspectRatio, RendererType } from '@aarsteinmedia/lottie-web/utils';
|
|
4
|
+
import { P as PlayerState, M as MouseOut, O as ObjectFit, t as tagName } from './utilities.d-BCeerq0j.js';
|
|
3
5
|
|
|
4
6
|
declare abstract class PropertyCallbackElement extends HTMLElement {
|
|
5
7
|
constructor();
|
|
6
|
-
connectedCallback(): void;
|
|
7
8
|
propertyChangedCallback(_name: string, _oldValue: unknown, _value: unknown): void;
|
|
8
9
|
}
|
|
9
10
|
|
|
10
|
-
declare enum ObjectFit {
|
|
11
|
-
Contain = "contain",
|
|
12
|
-
Cover = "cover",
|
|
13
|
-
Fill = "fill",
|
|
14
|
-
None = "none",
|
|
15
|
-
ScaleDown = "scale-down"
|
|
16
|
-
}
|
|
17
|
-
declare enum MouseOut {
|
|
18
|
-
Pause = "pause",
|
|
19
|
-
Reverse = "reverse",
|
|
20
|
-
Stop = "stop",
|
|
21
|
-
Void = "void"
|
|
22
|
-
}
|
|
23
|
-
declare enum PlayerState {
|
|
24
|
-
Completed = "completed",
|
|
25
|
-
Destroyed = "destroyed",
|
|
26
|
-
Error = "error",
|
|
27
|
-
Frozen = "frozen",
|
|
28
|
-
Loading = "loading",
|
|
29
|
-
Paused = "paused",
|
|
30
|
-
Playing = "playing",
|
|
31
|
-
Stopped = "stopped"
|
|
32
|
-
}
|
|
33
|
-
|
|
34
11
|
declare abstract class BaseElement extends PropertyCallbackElement {
|
|
35
|
-
static get styles():
|
|
12
|
+
static get styles(): Promise<CSSStyleSheet>;
|
|
36
13
|
playerState: PlayerState;
|
|
37
14
|
set animateOnScroll(value: HTMLBooleanAttribute);
|
|
38
15
|
get animateOnScroll(): HTMLBooleanAttribute;
|
|
@@ -113,6 +90,7 @@ declare abstract class ScrollElement extends BaseElement {
|
|
|
113
90
|
isIntersecting: boolean;
|
|
114
91
|
private _intersectionObserver?;
|
|
115
92
|
private _scrollProbe?;
|
|
93
|
+
private _useGeometricScroll;
|
|
116
94
|
applyScrollProgress(): void;
|
|
117
95
|
cancelIntersectionObserver(): void;
|
|
118
96
|
cancelScrollProbe(): void;
|
|
@@ -127,19 +105,31 @@ declare abstract class ScrollElement extends BaseElement {
|
|
|
127
105
|
}
|
|
128
106
|
|
|
129
107
|
declare abstract class DotLottiePlayerBase extends ScrollElement {
|
|
130
|
-
static get observedAttributes(): readonly ["
|
|
108
|
+
static get observedAttributes(): readonly ["animateonscroll", "autoplay", "controls", "direction", "hover", "loop", "mode", "playonclick", "playonvisible", "selector", "speed", "src", "subframe"];
|
|
131
109
|
static get observedProperties(): readonly ["playerState", "_isSettingsOpen", "_seeker", "_currentAnimation", "_animations"];
|
|
132
|
-
|
|
110
|
+
canConvert: boolean;
|
|
133
111
|
shadow: ShadowRoot | undefined;
|
|
134
112
|
source?: string;
|
|
135
113
|
template?: HTMLTemplateElement;
|
|
136
114
|
get isDotLottie(): boolean;
|
|
115
|
+
protected _controlElements: {
|
|
116
|
+
togglePlay: HTMLButtonElement;
|
|
117
|
+
stop: HTMLButtonElement;
|
|
118
|
+
prev: HTMLButtonElement;
|
|
119
|
+
next: HTMLButtonElement;
|
|
120
|
+
seeker: HTMLInputElement;
|
|
121
|
+
progress: HTMLProgressElement;
|
|
122
|
+
popover: HTMLDivElement | null;
|
|
123
|
+
convert: HTMLButtonElement | null;
|
|
124
|
+
snapshot: HTMLButtonElement | null;
|
|
125
|
+
} | null;
|
|
137
126
|
protected _isSettingsOpen: boolean;
|
|
138
127
|
protected _seeker: number;
|
|
139
128
|
private _controlsLoadId;
|
|
140
129
|
private _errorLoadId;
|
|
141
130
|
private _isBounce;
|
|
142
131
|
private _isDotLottie;
|
|
132
|
+
private _loadId;
|
|
143
133
|
private _manifest?;
|
|
144
134
|
private _multiAnimationSettings;
|
|
145
135
|
private _segment?;
|
|
@@ -181,14 +171,7 @@ declare abstract class DotLottiePlayerBase extends ScrollElement {
|
|
|
181
171
|
protected _render(): Promise<void>;
|
|
182
172
|
protected _renderControls: () => Promise<void>;
|
|
183
173
|
protected _showError(): Promise<void>;
|
|
184
|
-
protected setOptions(
|
|
185
|
-
container?: undefined | HTMLElement;
|
|
186
|
-
rendererType: RendererType;
|
|
187
|
-
initialSegment?: undefined | Vector2;
|
|
188
|
-
hasAutoplay: boolean;
|
|
189
|
-
hasLoop: boolean;
|
|
190
|
-
preserveAspectRatio: PreserveAspectRatio;
|
|
191
|
-
}): AnimationConfiguration;
|
|
174
|
+
protected abstract setOptions(options: Options): AnimationConfiguration;
|
|
192
175
|
private _addEventListeners;
|
|
193
176
|
private _clearPrevious;
|
|
194
177
|
private _complete;
|
|
@@ -211,6 +194,79 @@ declare abstract class DotLottiePlayerBase extends ScrollElement {
|
|
|
211
194
|
private _toggleSettings;
|
|
212
195
|
}
|
|
213
196
|
|
|
214
|
-
declare
|
|
197
|
+
declare class DotLottiePlayer extends DotLottiePlayerBase {
|
|
198
|
+
constructor();
|
|
199
|
+
addAnimation(params: AddAnimationParams): Promise<_aarsteinmedia_lottie_web.Result>;
|
|
200
|
+
convert(params: ConvertParams): Promise<_aarsteinmedia_lottie_web.Result>;
|
|
201
|
+
loadAnimation(config: AnimationConfiguration): _aarsteinmedia_lottie_web.AnimationItem;
|
|
202
|
+
protected setOptions({ container, hasAutoplay, hasLoop, initialSegment, preserveAspectRatio, rendererType }: {
|
|
203
|
+
container?: undefined | HTMLElement;
|
|
204
|
+
rendererType: RendererType;
|
|
205
|
+
initialSegment?: undefined | Vector2;
|
|
206
|
+
hasAutoplay: boolean;
|
|
207
|
+
hasLoop: boolean;
|
|
208
|
+
preserveAspectRatio: PreserveAspectRatio;
|
|
209
|
+
}): AnimationConfiguration;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
declare class DotLottiePlayerLight extends DotLottiePlayerBase {
|
|
213
|
+
get renderer(): RendererType;
|
|
214
|
+
loadAnimation(config: AnimationConfiguration): _aarsteinmedia_lottie_web.AnimationItem;
|
|
215
|
+
protected setOptions({ container, hasAutoplay, hasLoop, initialSegment, preserveAspectRatio, }: Options): AnimationConfiguration<RendererType.SVG>;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
declare class DotLottiePlayerSVG extends DotLottiePlayerBase {
|
|
219
|
+
get renderer(): RendererType;
|
|
220
|
+
loadAnimation(config: AnimationConfiguration): _aarsteinmedia_lottie_web.AnimationItem;
|
|
221
|
+
protected setOptions({ container, hasAutoplay, hasLoop, initialSegment, preserveAspectRatio, }: Options): AnimationConfiguration<RendererType.SVG>;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
interface Options {
|
|
225
|
+
container?: undefined | HTMLElement;
|
|
226
|
+
hasAutoplay: boolean;
|
|
227
|
+
hasLoop: boolean;
|
|
228
|
+
initialSegment?: undefined | Vector2;
|
|
229
|
+
preserveAspectRatio: PreserveAspectRatio;
|
|
230
|
+
rendererType: RendererType;
|
|
231
|
+
}
|
|
232
|
+
declare global {
|
|
233
|
+
interface HTMLElementTagNameMap {
|
|
234
|
+
[tagName]: DotLottiePlayer | DotLottiePlayerLight;
|
|
235
|
+
}
|
|
236
|
+
var dotLottiePlayer: () => DotLottiePlayer | DotLottiePlayerLight | DotLottiePlayerSVG | DotLottiePlayerCanvas;
|
|
237
|
+
}
|
|
238
|
+
type JSXLottiePlayer = Omit<Partial<DotLottiePlayer | DotLottiePlayerLight>, 'style'> & {
|
|
239
|
+
class?: string;
|
|
240
|
+
ref?: React.RefObject<unknown>;
|
|
241
|
+
style?: React.CSSProperties;
|
|
242
|
+
src: string;
|
|
243
|
+
};
|
|
244
|
+
declare module 'react' {
|
|
245
|
+
namespace JSX {
|
|
246
|
+
interface IntrinsicElements {
|
|
247
|
+
[tagName]: JSXLottiePlayer;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
declare module 'react/jsx-runtime' {
|
|
252
|
+
namespace JSX {
|
|
253
|
+
interface IntrinsicElements {
|
|
254
|
+
[tagName]: JSXLottiePlayer;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
declare module 'react/jsx-dev-runtime' {
|
|
259
|
+
namespace JSX {
|
|
260
|
+
interface IntrinsicElements {
|
|
261
|
+
[tagName]: JSXLottiePlayer;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
declare class DotLottiePlayerCanvas extends DotLottiePlayerBase {
|
|
267
|
+
get renderer(): RendererType;
|
|
268
|
+
loadAnimation(config: AnimationConfiguration): _aarsteinmedia_lottie_web.AnimationItem;
|
|
269
|
+
protected setOptions({ container, hasAutoplay, hasLoop, initialSegment, preserveAspectRatio, }: Options): AnimationConfiguration<RendererType.Canvas>;
|
|
270
|
+
}
|
|
215
271
|
|
|
216
|
-
export {
|
|
272
|
+
export { DotLottiePlayerCanvas as D, DotLottiePlayerBase as a, DotLottiePlayer as b, DotLottiePlayerLight as c, DotLottiePlayerSVG as d };
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { PreserveAspectRatio, namespaceSVG } from '@aarsteinmedia/lottie-web/utils';
|
|
2
|
+
import { e as escapeHTML } from './DotLottiePlayerBase-BDutF_6O.js';
|
|
3
|
+
import '@aarsteinmedia/lottie-web/dotlottie';
|
|
4
|
+
import './utilities-CC4oA5Yh.js';
|
|
2
5
|
|
|
3
6
|
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>`;
|
|
7
|
+
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">${escapeHTML(message)}</text></svg></div>`;
|
|
5
8
|
}
|
|
6
9
|
|
|
7
10
|
export { errorScreen };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { isServer } from '@aarsteinmedia/lottie-web/utils';
|
|
2
|
+
|
|
3
|
+
var ObjectFit = /*#__PURE__*/ function(ObjectFit) {
|
|
4
|
+
ObjectFit["Contain"] = "contain";
|
|
5
|
+
ObjectFit["Cover"] = "cover";
|
|
6
|
+
ObjectFit["Fill"] = "fill";
|
|
7
|
+
ObjectFit["None"] = "none";
|
|
8
|
+
ObjectFit["ScaleDown"] = "scale-down";
|
|
9
|
+
return ObjectFit;
|
|
10
|
+
}({});
|
|
11
|
+
var MouseOut = /*#__PURE__*/ function(MouseOut) {
|
|
12
|
+
MouseOut["Pause"] = "pause";
|
|
13
|
+
MouseOut["Reverse"] = "reverse";
|
|
14
|
+
MouseOut["Stop"] = "stop";
|
|
15
|
+
MouseOut["Void"] = "void";
|
|
16
|
+
return MouseOut;
|
|
17
|
+
}({});
|
|
18
|
+
var PlayerState = /*#__PURE__*/ function(PlayerState) {
|
|
19
|
+
PlayerState["Completed"] = "completed";
|
|
20
|
+
PlayerState["Destroyed"] = "destroyed";
|
|
21
|
+
PlayerState["Error"] = "error";
|
|
22
|
+
PlayerState["Frozen"] = "frozen";
|
|
23
|
+
PlayerState["Loading"] = "loading";
|
|
24
|
+
PlayerState["Paused"] = "paused";
|
|
25
|
+
PlayerState["Playing"] = "playing";
|
|
26
|
+
PlayerState["Stopped"] = "stopped";
|
|
27
|
+
return PlayerState;
|
|
28
|
+
}({});
|
|
29
|
+
|
|
30
|
+
const hoverQuery = isServer ? null : matchMedia('(any-hover: hover)');
|
|
31
|
+
const tagName = 'dotlottie-player', reducedMotionQuery = isServer ? null : matchMedia('(prefers-reduced-motion: reduce)'), hasIOSupport = !isServer && 'IntersectionObserver' in window, hasVTSupport = !isServer && 'ViewTimeline' in window, hasHover = hoverQuery?.matches;
|
|
32
|
+
|
|
33
|
+
export { MouseOut as M, ObjectFit as O, PlayerState as P, hasVTSupport as a, hasHover as b, hasIOSupport as h, reducedMotionQuery as r, tagName as t };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import '@aarsteinmedia/lottie-web/utils';
|
|
2
|
+
|
|
3
|
+
declare enum ObjectFit {
|
|
4
|
+
Contain = "contain",
|
|
5
|
+
Cover = "cover",
|
|
6
|
+
Fill = "fill",
|
|
7
|
+
None = "none",
|
|
8
|
+
ScaleDown = "scale-down"
|
|
9
|
+
}
|
|
10
|
+
declare enum MouseOut {
|
|
11
|
+
Pause = "pause",
|
|
12
|
+
Reverse = "reverse",
|
|
13
|
+
Stop = "stop",
|
|
14
|
+
Void = "void"
|
|
15
|
+
}
|
|
16
|
+
declare enum PlayerState {
|
|
17
|
+
Completed = "completed",
|
|
18
|
+
Destroyed = "destroyed",
|
|
19
|
+
Error = "error",
|
|
20
|
+
Frozen = "frozen",
|
|
21
|
+
Loading = "loading",
|
|
22
|
+
Paused = "paused",
|
|
23
|
+
Playing = "playing",
|
|
24
|
+
Stopped = "stopped"
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
declare const tagName = "dotlottie-player";
|
|
28
|
+
|
|
29
|
+
export { MouseOut as M, ObjectFit as O, PlayerState as P, tagName as t };
|
package/dist/full.d.ts
CHANGED
|
@@ -1,22 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
export { M as MouseOut, P as PlayerState, t as tagName } from './chunks/constants.d-t4RBAbwL.js';
|
|
1
|
+
import { b as DotLottiePlayer } from './chunks/DotLottiePlayerCanvas.d-CBwsqsPc.js';
|
|
2
|
+
export { a as DotLottiePlayerBase } from './chunks/DotLottiePlayerCanvas.d-CBwsqsPc.js';
|
|
3
|
+
import '@aarsteinmedia/lottie-web';
|
|
4
|
+
import '@aarsteinmedia/lottie-web/utils';
|
|
5
|
+
import './chunks/utilities.d-BCeerq0j.js';
|
|
7
6
|
|
|
8
|
-
declare class DotLottiePlayer extends DotLottiePlayerBase {
|
|
9
|
-
addAnimation(params: AddAnimationParams): Promise<_aarsteinmedia_lottie_web.Result>;
|
|
10
|
-
convert(params: ConvertParams): Promise<_aarsteinmedia_lottie_web.Result>;
|
|
11
|
-
loadAnimation(config: AnimationConfiguration): _aarsteinmedia_lottie_web.AnimationItem;
|
|
12
|
-
protected setOptions({ container, hasAutoplay, hasLoop, initialSegment, preserveAspectRatio, rendererType }: {
|
|
13
|
-
container?: undefined | HTMLElement;
|
|
14
|
-
rendererType: RendererType;
|
|
15
|
-
initialSegment?: undefined | Vector2;
|
|
16
|
-
hasAutoplay: boolean;
|
|
17
|
-
hasLoop: boolean;
|
|
18
|
-
preserveAspectRatio: PreserveAspectRatio;
|
|
19
|
-
}): AnimationConfiguration;
|
|
20
|
-
}
|
|
21
7
|
|
|
22
|
-
|
|
8
|
+
|
|
9
|
+
export { DotLottiePlayer as default };
|
package/dist/full.js
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { RendererType, isServer } from '@aarsteinmedia/lottie-web/utils';
|
|
2
|
-
export { PlayMode, PlayerEvent, RendererType } from '@aarsteinmedia/lottie-web/utils';
|
|
3
2
|
import { loadAnimation } from '@aarsteinmedia/lottie-web';
|
|
4
|
-
import { D as DotLottiePlayerBase, l as loadDotLottieTools
|
|
5
|
-
|
|
3
|
+
import { D as DotLottiePlayerBase, l as loadDotLottieTools } from './chunks/DotLottiePlayerBase-BDutF_6O.js';
|
|
4
|
+
import { t as tagName } from './chunks/utilities-CC4oA5Yh.js';
|
|
6
5
|
import '@aarsteinmedia/lottie-web/dotlottie';
|
|
7
6
|
|
|
8
7
|
/**
|
|
9
8
|
* DotLottie Player Web Component.
|
|
10
9
|
*/ class DotLottiePlayer extends DotLottiePlayerBase {
|
|
10
|
+
constructor(){
|
|
11
|
+
super();
|
|
12
|
+
this.canConvert = true;
|
|
13
|
+
}
|
|
11
14
|
async addAnimation(params) {
|
|
12
15
|
const { addAnimation } = await loadDotLottieTools();
|
|
13
16
|
return await addAnimation(params);
|
|
@@ -58,8 +61,8 @@ import '@aarsteinmedia/lottie-web/dotlottie';
|
|
|
58
61
|
/**
|
|
59
62
|
* Expose DotLottiePlayer class as global variable.
|
|
60
63
|
*/ globalThis.dotLottiePlayer = ()=>new DotLottiePlayer();
|
|
61
|
-
if (!isServer) {
|
|
64
|
+
if (!isServer && !customElements.get(tagName)) {
|
|
62
65
|
customElements.define(tagName, DotLottiePlayer);
|
|
63
66
|
}
|
|
64
67
|
|
|
65
|
-
export { DotLottiePlayerBase, DotLottiePlayer as default
|
|
68
|
+
export { DotLottiePlayerBase, DotLottiePlayer as default };
|
package/dist/light.d.ts
CHANGED
|
@@ -1,22 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
export { M as MouseOut, P as PlayerState, t as tagName } from './chunks/constants.d-t4RBAbwL.js';
|
|
1
|
+
import { c as DotLottiePlayerLight } from './chunks/DotLottiePlayerCanvas.d-CBwsqsPc.js';
|
|
2
|
+
export { a as DotLottiePlayerBase } from './chunks/DotLottiePlayerCanvas.d-CBwsqsPc.js';
|
|
3
|
+
import '@aarsteinmedia/lottie-web';
|
|
4
|
+
import '@aarsteinmedia/lottie-web/utils';
|
|
5
|
+
import './chunks/utilities.d-BCeerq0j.js';
|
|
7
6
|
|
|
8
|
-
declare class DotLottiePlayerLight extends DotLottiePlayerBase {
|
|
9
|
-
get renderer(): RendererType;
|
|
10
|
-
constructor();
|
|
11
|
-
loadAnimation(config: AnimationConfiguration): _aarsteinmedia_lottie_web.AnimationItem;
|
|
12
|
-
protected setOptions({ container, hasAutoplay, hasLoop, initialSegment, preserveAspectRatio, }: {
|
|
13
|
-
container?: HTMLElement;
|
|
14
|
-
rendererType: RendererType;
|
|
15
|
-
initialSegment?: Vector2;
|
|
16
|
-
hasAutoplay: boolean;
|
|
17
|
-
hasLoop: boolean;
|
|
18
|
-
preserveAspectRatio: PreserveAspectRatio;
|
|
19
|
-
}): AnimationConfiguration<RendererType.SVG>;
|
|
20
|
-
}
|
|
21
7
|
|
|
22
|
-
|
|
8
|
+
|
|
9
|
+
export { DotLottiePlayerLight as default };
|
package/dist/light.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { RendererType, isServer } from '@aarsteinmedia/lottie-web/utils';
|
|
2
|
-
export { PlayMode, PlayerEvent, RendererType } from '@aarsteinmedia/lottie-web/utils';
|
|
3
2
|
import { loadAnimation } from '@aarsteinmedia/lottie-web/light';
|
|
4
|
-
import { D as DotLottiePlayerBase
|
|
5
|
-
|
|
3
|
+
import { D as DotLottiePlayerBase } from './chunks/DotLottiePlayerBase-BDutF_6O.js';
|
|
4
|
+
import { t as tagName } from './chunks/utilities-CC4oA5Yh.js';
|
|
6
5
|
import '@aarsteinmedia/lottie-web/dotlottie';
|
|
7
6
|
|
|
8
7
|
/**
|
|
@@ -11,10 +10,6 @@ import '@aarsteinmedia/lottie-web/dotlottie';
|
|
|
11
10
|
get renderer() {
|
|
12
11
|
return RendererType.SVG;
|
|
13
12
|
}
|
|
14
|
-
constructor(){
|
|
15
|
-
super();
|
|
16
|
-
this.isLight = true;
|
|
17
|
-
}
|
|
18
13
|
loadAnimation(config) {
|
|
19
14
|
return loadAnimation(config);
|
|
20
15
|
}
|
|
@@ -39,8 +34,8 @@ import '@aarsteinmedia/lottie-web/dotlottie';
|
|
|
39
34
|
/**
|
|
40
35
|
* Expose DotLottiePlayer class as global variable.
|
|
41
36
|
*/ globalThis.dotLottiePlayer = ()=>new DotLottiePlayerLight();
|
|
42
|
-
if (!isServer) {
|
|
37
|
+
if (!isServer && !customElements.get(tagName)) {
|
|
43
38
|
customElements.define(tagName, DotLottiePlayerLight);
|
|
44
39
|
}
|
|
45
40
|
|
|
46
|
-
export { DotLottiePlayerBase, DotLottiePlayerLight as default
|
|
41
|
+
export { DotLottiePlayerBase, DotLottiePlayerLight as default };
|
package/dist/svg.d.ts
CHANGED
|
@@ -1,22 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
export { M as MouseOut, P as PlayerState, t as tagName } from './chunks/constants.d-t4RBAbwL.js';
|
|
1
|
+
import { d as DotLottiePlayerSVG } from './chunks/DotLottiePlayerCanvas.d-CBwsqsPc.js';
|
|
2
|
+
export { a as DotLottiePlayerBase } from './chunks/DotLottiePlayerCanvas.d-CBwsqsPc.js';
|
|
3
|
+
import '@aarsteinmedia/lottie-web';
|
|
4
|
+
import '@aarsteinmedia/lottie-web/utils';
|
|
5
|
+
import './chunks/utilities.d-BCeerq0j.js';
|
|
7
6
|
|
|
8
|
-
declare class DotLottiePlayerSVG extends DotLottiePlayerBase {
|
|
9
|
-
get renderer(): RendererType;
|
|
10
|
-
constructor();
|
|
11
|
-
loadAnimation(config: AnimationConfiguration): _aarsteinmedia_lottie_web.AnimationItem;
|
|
12
|
-
protected setOptions({ container, hasAutoplay, hasLoop, initialSegment, preserveAspectRatio, }: {
|
|
13
|
-
container?: undefined | HTMLElement;
|
|
14
|
-
rendererType: RendererType;
|
|
15
|
-
initialSegment?: undefined | Vector2;
|
|
16
|
-
hasAutoplay: boolean;
|
|
17
|
-
hasLoop: boolean;
|
|
18
|
-
preserveAspectRatio: PreserveAspectRatio;
|
|
19
|
-
}): AnimationConfiguration<RendererType.SVG>;
|
|
20
|
-
}
|
|
21
7
|
|
|
22
|
-
|
|
8
|
+
|
|
9
|
+
export { DotLottiePlayerSVG as default };
|
package/dist/svg.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { RendererType, isServer } from '@aarsteinmedia/lottie-web/utils';
|
|
2
|
-
export { PlayMode, PlayerEvent, RendererType } from '@aarsteinmedia/lottie-web/utils';
|
|
3
2
|
import { loadAnimation } from '@aarsteinmedia/lottie-web/svg';
|
|
4
|
-
import { D as DotLottiePlayerBase
|
|
5
|
-
|
|
3
|
+
import { D as DotLottiePlayerBase } from './chunks/DotLottiePlayerBase-BDutF_6O.js';
|
|
4
|
+
import { t as tagName } from './chunks/utilities-CC4oA5Yh.js';
|
|
6
5
|
import '@aarsteinmedia/lottie-web/dotlottie';
|
|
7
6
|
|
|
8
7
|
/**
|
|
@@ -11,10 +10,6 @@ import '@aarsteinmedia/lottie-web/dotlottie';
|
|
|
11
10
|
get renderer() {
|
|
12
11
|
return RendererType.SVG;
|
|
13
12
|
}
|
|
14
|
-
constructor(){
|
|
15
|
-
super();
|
|
16
|
-
this.isLight = true;
|
|
17
|
-
}
|
|
18
13
|
loadAnimation(config) {
|
|
19
14
|
return loadAnimation(config);
|
|
20
15
|
}
|
|
@@ -39,8 +34,8 @@ import '@aarsteinmedia/lottie-web/dotlottie';
|
|
|
39
34
|
/**
|
|
40
35
|
* Expose DotLottiePlayer class as global variable.
|
|
41
36
|
*/ globalThis.dotLottiePlayer = ()=>new DotLottiePlayerSVG();
|
|
42
|
-
if (!isServer) {
|
|
37
|
+
if (!isServer && !customElements.get(tagName)) {
|
|
43
38
|
customElements.define(tagName, DotLottiePlayerSVG);
|
|
44
39
|
}
|
|
45
40
|
|
|
46
|
-
export { DotLottiePlayerBase, DotLottiePlayerSVG as default
|
|
41
|
+
export { DotLottiePlayerBase, DotLottiePlayerSVG as default };
|