@aarsteinmedia/dotlottie-player 6.5.3 → 6.5.5
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 +5 -0
- package/custom-elements.json +3 -3
- package/dist/canvas.d.ts +2 -2
- package/dist/canvas.js +2 -2
- package/dist/chunks/{DotLottiePlayerBase-B9TsipSe.js → DotLottiePlayerBase-O43LyqdS.js} +466 -400
- package/dist/chunks/{constants.d-D4NjmiZl.d.ts → constants.d-DFJt3bbF.d.ts} +47 -27
- 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 -2
- package/dist/unpkg-svg.js +3 -3
- package/package.json +15 -13
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HTMLBooleanAttribute, AnimationData, AnimationDirection, AddAnimationParams, Result, ConvertParams,
|
|
1
|
+
import { HTMLBooleanAttribute, AnimationData, AnimationDirection, AnimationItem, AddAnimationParams, Result, ConvertParams, 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,8 +7,13 @@ declare abstract class PropertyCallbackElement extends HTMLElement {
|
|
|
7
7
|
propertyChangedCallback(_name: string, _oldValue: unknown, _value: unknown): void;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
declare
|
|
11
|
-
|
|
10
|
+
declare enum ObjectFit {
|
|
11
|
+
Contain = "contain",
|
|
12
|
+
Cover = "cover",
|
|
13
|
+
Fill = "fill",
|
|
14
|
+
None = "none",
|
|
15
|
+
ScaleDown = "scale-down"
|
|
16
|
+
}
|
|
12
17
|
declare enum MouseOut {
|
|
13
18
|
Pause = "pause",
|
|
14
19
|
Reverse = "reverse",
|
|
@@ -26,15 +31,9 @@ declare enum PlayerState {
|
|
|
26
31
|
Stopped = "stopped"
|
|
27
32
|
}
|
|
28
33
|
|
|
29
|
-
declare abstract class
|
|
30
|
-
static get observedAttributes(): readonly ["animateOnScroll", "autoplay", "controls", "direction", "hover", "loop", "mode", "playOnClick", "playOnVisible", "selector", "speed", "src", "subframe"];
|
|
31
|
-
static get observedProperties(): readonly ["playerState", "_isSettingsOpen", "_seeker", "_currentAnimation", "_animations"];
|
|
34
|
+
declare abstract class BaseElement extends PropertyCallbackElement {
|
|
32
35
|
static get styles(): () => Promise<CSSStyleSheet>;
|
|
33
|
-
isLight: boolean;
|
|
34
36
|
playerState: PlayerState;
|
|
35
|
-
shadow: ShadowRoot | undefined;
|
|
36
|
-
source?: string;
|
|
37
|
-
template?: HTMLTemplateElement;
|
|
38
37
|
set animateOnScroll(value: HTMLBooleanAttribute);
|
|
39
38
|
get animateOnScroll(): HTMLBooleanAttribute;
|
|
40
39
|
get animations(): AnimationData[];
|
|
@@ -59,7 +58,6 @@ declare abstract class DotLottiePlayerBase extends PropertyCallbackElement {
|
|
|
59
58
|
get hover(): HTMLBooleanAttribute;
|
|
60
59
|
set intermission(value: number);
|
|
61
60
|
get intermission(): number;
|
|
62
|
-
get isDotLottie(): boolean;
|
|
63
61
|
set loop(value: HTMLBooleanAttribute);
|
|
64
62
|
get loop(): HTMLBooleanAttribute;
|
|
65
63
|
set mode(value: PlayMode);
|
|
@@ -67,7 +65,7 @@ declare abstract class DotLottiePlayerBase extends PropertyCallbackElement {
|
|
|
67
65
|
set mouseout(value: MouseOut);
|
|
68
66
|
get mouseout(): MouseOut;
|
|
69
67
|
set objectfit(value: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down');
|
|
70
|
-
get objectfit():
|
|
68
|
+
get objectfit(): ObjectFit;
|
|
71
69
|
set once(value: HTMLBooleanAttribute);
|
|
72
70
|
get once(): HTMLBooleanAttribute;
|
|
73
71
|
set playOnClick(value: HTMLBooleanAttribute);
|
|
@@ -90,10 +88,12 @@ declare abstract class DotLottiePlayerBase extends PropertyCallbackElement {
|
|
|
90
88
|
get src(): string | null;
|
|
91
89
|
set subframe(value: HTMLBooleanAttribute);
|
|
92
90
|
get subframe(): HTMLBooleanAttribute;
|
|
91
|
+
protected _animations: AnimationData[];
|
|
93
92
|
protected _container: HTMLElement | null;
|
|
93
|
+
protected _currentAnimation: number;
|
|
94
94
|
protected _errorMessage: string;
|
|
95
95
|
protected _identifier: string;
|
|
96
|
-
protected
|
|
96
|
+
protected _lottieInstance: AnimationItem | null;
|
|
97
97
|
protected _playerState: {
|
|
98
98
|
prev: PlayerState;
|
|
99
99
|
count: number;
|
|
@@ -102,20 +102,46 @@ declare abstract class DotLottiePlayerBase extends PropertyCallbackElement {
|
|
|
102
102
|
frame: number;
|
|
103
103
|
playTimeout: ReturnType<typeof setTimeout> | null;
|
|
104
104
|
};
|
|
105
|
-
|
|
105
|
+
private _toLog;
|
|
106
|
+
clearDevLog(): void;
|
|
107
|
+
devLog(toLog: unknown, type?: 'error' | 'info' | 'warn'): void;
|
|
108
|
+
play(): void;
|
|
109
|
+
protected _freeze(): void;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
declare abstract class ScrollElement extends BaseElement {
|
|
113
|
+
isIntersecting: boolean;
|
|
114
|
+
private _intersectionObserver?;
|
|
115
|
+
private _scrollProbe?;
|
|
116
|
+
applyScrollProgress(): void;
|
|
117
|
+
cancelIntersectionObserver(): void;
|
|
118
|
+
cancelScrollProbe(): void;
|
|
119
|
+
scrollLoop(): void;
|
|
120
|
+
startScrollLoop(): void;
|
|
121
|
+
stopScrollLoop(): void;
|
|
122
|
+
protected _addIntersectionObserver(): void;
|
|
123
|
+
private _canDriveTimeline;
|
|
124
|
+
private _getGeometricScrollProgress;
|
|
125
|
+
private _getScrollProgress;
|
|
126
|
+
private _observeIntersectionTarget;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
declare abstract class DotLottiePlayerBase extends ScrollElement {
|
|
130
|
+
static get observedAttributes(): readonly ["animateOnScroll", "autoplay", "controls", "direction", "hover", "loop", "mode", "playOnClick", "playOnVisible", "selector", "speed", "src", "subframe"];
|
|
131
|
+
static get observedProperties(): readonly ["playerState", "_isSettingsOpen", "_seeker", "_currentAnimation", "_animations"];
|
|
132
|
+
isLight: boolean;
|
|
133
|
+
shadow: ShadowRoot | undefined;
|
|
134
|
+
source?: string;
|
|
135
|
+
template?: HTMLTemplateElement;
|
|
136
|
+
get isDotLottie(): boolean;
|
|
137
|
+
protected _isSettingsOpen: boolean;
|
|
106
138
|
protected _seeker: number;
|
|
107
|
-
private _animations;
|
|
108
139
|
private _controlsLoadId;
|
|
109
|
-
private _currentAnimation;
|
|
110
140
|
private _errorLoadId;
|
|
111
|
-
private _intersectionObserver?;
|
|
112
141
|
private _isBounce;
|
|
113
142
|
private _isDotLottie;
|
|
114
|
-
private _isIntersecting;
|
|
115
|
-
private _lottieInstance;
|
|
116
143
|
private _manifest?;
|
|
117
144
|
private _multiAnimationSettings;
|
|
118
|
-
private _scrollProbe?;
|
|
119
145
|
private _segment?;
|
|
120
146
|
constructor();
|
|
121
147
|
addAnimation(_params: AddAnimationParams): Promise<Result>;
|
|
@@ -154,6 +180,7 @@ declare abstract class DotLottiePlayerBase extends PropertyCallbackElement {
|
|
|
154
180
|
protected _handleClick(): void;
|
|
155
181
|
protected _handleSeekChange({ target }: Event): void;
|
|
156
182
|
protected _handleSettingsClick({ target }: Event): void;
|
|
183
|
+
protected _render(): Promise<void>;
|
|
157
184
|
protected _renderControls: () => Promise<void>;
|
|
158
185
|
protected _showError(): Promise<void>;
|
|
159
186
|
protected setOptions(_options: {
|
|
@@ -165,9 +192,6 @@ declare abstract class DotLottiePlayerBase extends PropertyCallbackElement {
|
|
|
165
192
|
preserveAspectRatio: PreserveAspectRatio;
|
|
166
193
|
}): AnimationConfiguration;
|
|
167
194
|
private _addEventListeners;
|
|
168
|
-
private _addIntersectionObserver;
|
|
169
|
-
private _applyScrollProgress;
|
|
170
|
-
private _cancelScrollProbe;
|
|
171
195
|
private _clearPrevious;
|
|
172
196
|
private _complete;
|
|
173
197
|
private _dataFailed;
|
|
@@ -175,7 +199,6 @@ declare abstract class DotLottiePlayerBase extends PropertyCallbackElement {
|
|
|
175
199
|
private _DOMLoaded;
|
|
176
200
|
private _enterFrame;
|
|
177
201
|
private _getOptions;
|
|
178
|
-
private _getScrollProgress;
|
|
179
202
|
private _handleError;
|
|
180
203
|
private _handleLdScript;
|
|
181
204
|
private _handleSelector;
|
|
@@ -185,9 +208,6 @@ declare abstract class DotLottiePlayerBase extends PropertyCallbackElement {
|
|
|
185
208
|
private _mouseLeave;
|
|
186
209
|
private _onVisibilityChange;
|
|
187
210
|
private _removeEventListeners;
|
|
188
|
-
private _scrollLoop;
|
|
189
|
-
private _startScrollLoop;
|
|
190
|
-
private _stopScrollLoop;
|
|
191
211
|
private _switchInstance;
|
|
192
212
|
private _toggleEventListeners;
|
|
193
213
|
private _toggleSettings;
|
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-DFJt3bbF.js';
|
|
6
|
+
export { M as MouseOut, P as PlayerState, t as tagName } from './chunks/constants.d-DFJt3bbF.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-O43LyqdS.js';
|
|
5
|
+
export { M as MouseOut, P as PlayerState } from './chunks/DotLottiePlayerBase-O43LyqdS.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-DFJt3bbF.js';
|
|
6
|
+
export { M as MouseOut, P as PlayerState, t as tagName } from './chunks/constants.d-DFJt3bbF.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-O43LyqdS.js';
|
|
5
|
+
export { M as MouseOut, P as PlayerState } from './chunks/DotLottiePlayerBase-O43LyqdS.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-DFJt3bbF.js';
|
|
6
|
+
export { M as MouseOut, P as PlayerState, t as tagName } from './chunks/constants.d-DFJt3bbF.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-O43LyqdS.js';
|
|
5
|
+
export { M as MouseOut, P as PlayerState } from './chunks/DotLottiePlayerBase-O43LyqdS.js';
|
|
6
6
|
import '@aarsteinmedia/lottie-web/dotlottie';
|
|
7
7
|
|
|
8
8
|
/**
|