@aarsteinmedia/dotlottie-player 6.2.2 → 6.2.3
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 +1 -1
- package/dist/canvas.d.ts +27 -112
- package/dist/canvas.js +4 -4
- package/dist/full.d.ts +27 -111
- package/dist/full.js +4 -4
- package/dist/light.d.ts +28 -113
- package/dist/light.js +4 -4
- package/dist/svg.d.ts +27 -112
- package/dist/svg.js +4 -4
- package/dist/unpkg-canvas.js +4 -4
- package/dist/unpkg-full.js +4 -4
- package/dist/unpkg-light.js +1 -1
- package/dist/unpkg-svg.js +3 -3
- package/package.json +2 -2
package/dist/light.js
CHANGED
|
@@ -531,7 +531,7 @@ const notImplemented = 'Method is not implemented';
|
|
|
531
531
|
* Whether to play once or reset,
|
|
532
532
|
* if playOnVisible is true.
|
|
533
533
|
*/ set once(value) {
|
|
534
|
-
this.setAttribute('once', value.toString());
|
|
534
|
+
this.setAttribute('once', Boolean(value).toString());
|
|
535
535
|
}
|
|
536
536
|
get once() {
|
|
537
537
|
const val = this.getAttribute('once');
|
|
@@ -540,7 +540,7 @@ const notImplemented = 'Method is not implemented';
|
|
|
540
540
|
/**
|
|
541
541
|
* Whether to toggle play on click.
|
|
542
542
|
*/ set playOnClick(value) {
|
|
543
|
-
this.setAttribute('playOnClick', value.toString());
|
|
543
|
+
this.setAttribute('playOnClick', Boolean(value).toString());
|
|
544
544
|
}
|
|
545
545
|
get playOnClick() {
|
|
546
546
|
const val = this.getAttribute('playOnClick');
|
|
@@ -549,7 +549,7 @@ const notImplemented = 'Method is not implemented';
|
|
|
549
549
|
/**
|
|
550
550
|
* Play when visible.
|
|
551
551
|
*/ set playOnVisible(value) {
|
|
552
|
-
this.setAttribute('playOnVisible', value.toString());
|
|
552
|
+
this.setAttribute('playOnVisible', Boolean(value).toString());
|
|
553
553
|
}
|
|
554
554
|
get playOnVisible() {
|
|
555
555
|
const val = this.getAttribute('playOnVisible');
|
|
@@ -594,7 +594,7 @@ const notImplemented = 'Method is not implemented';
|
|
|
594
594
|
/**
|
|
595
595
|
* Hide advanced controls.
|
|
596
596
|
*/ set simple(value) {
|
|
597
|
-
this.setAttribute('simple', value.toString());
|
|
597
|
+
this.setAttribute('simple', Boolean(value).toString());
|
|
598
598
|
}
|
|
599
599
|
get simple() {
|
|
600
600
|
const val = this.getAttribute('simple');
|
package/dist/svg.d.ts
CHANGED
|
@@ -1,40 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PlayMode, PreserveAspectRatio, RendererType } from '@aarsteinmedia/lottie-web/utils';
|
|
2
2
|
export { PlayMode, PlayerEvents } from '@aarsteinmedia/lottie-web/utils';
|
|
3
3
|
import * as _aarsteinmedia_lottie_web_svg from '@aarsteinmedia/lottie-web/svg';
|
|
4
|
-
import
|
|
5
|
-
import { Vector2, AnimationConfiguration, AnimationData, AnimationDirection, AddAnimationParams, Result, ConvertParams, AnimationItem, LottieManifest, AnimationSettings } from '@aarsteinmedia/lottie-web';
|
|
6
|
-
import { addAnimation, convert } from '@aarsteinmedia/lottie-web/dotlottie';
|
|
7
|
-
import * as _aarsteinmedia_lottie_web_light from '@aarsteinmedia/lottie-web/light';
|
|
8
|
-
import * as _aarsteinmedia_lottie_web_canvas from '@aarsteinmedia/lottie-web/canvas';
|
|
4
|
+
import { HTMLBooleanAttribute, AnimationData, AnimationDirection, AddAnimationParams, Result, ConvertParams, AnimationItem, LottieManifest, AnimationSettings, Vector2, AnimationConfiguration } from '@aarsteinmedia/lottie-web';
|
|
9
5
|
|
|
10
|
-
declare class
|
|
11
|
-
addAnimation: typeof addAnimation;
|
|
12
|
-
convert: typeof convert;
|
|
13
|
-
loadAnimation: typeof _aarsteinmedia_lottie_web.loadAnimation;
|
|
14
|
-
protected setOptions({ container, hasAutoplay, hasLoop, initialSegment, preserveAspectRatio, rendererType }: {
|
|
15
|
-
container?: HTMLElement;
|
|
16
|
-
rendererType: RendererType;
|
|
17
|
-
initialSegment?: Vector2;
|
|
18
|
-
hasAutoplay: boolean;
|
|
19
|
-
hasLoop: boolean;
|
|
20
|
-
preserveAspectRatio: PreserveAspectRatio;
|
|
21
|
-
}): AnimationConfiguration<RendererType>;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
declare class DotLottiePlayerLight extends DotLottiePlayerBase {
|
|
25
|
-
loadAnimation: typeof _aarsteinmedia_lottie_web_light.loadAnimation;
|
|
26
|
-
get renderer(): RendererType;
|
|
6
|
+
declare abstract class PropertyCallbackElement extends HTMLElement {
|
|
27
7
|
constructor();
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
rendererType: RendererType;
|
|
31
|
-
initialSegment?: Vector2;
|
|
32
|
-
hasAutoplay: boolean;
|
|
33
|
-
hasLoop: boolean;
|
|
34
|
-
preserveAspectRatio: PreserveAspectRatio;
|
|
35
|
-
}): AnimationConfiguration<RendererType.SVG>;
|
|
8
|
+
connectedCallback(): void;
|
|
9
|
+
propertyChangedCallback(_name: string, _oldValue: unknown, _value: unknown): void;
|
|
36
10
|
}
|
|
37
11
|
|
|
12
|
+
declare function renderControls(this: DotLottiePlayerBase): void;
|
|
13
|
+
|
|
14
|
+
declare function renderPlayer(this: DotLottiePlayerBase): Promise<void>;
|
|
15
|
+
|
|
38
16
|
declare enum MouseOut {
|
|
39
17
|
Pause = "pause",
|
|
40
18
|
Reverse = "reverse",
|
|
@@ -53,69 +31,6 @@ declare enum PlayerState {
|
|
|
53
31
|
}
|
|
54
32
|
declare const tagName = "dotlottie-player";
|
|
55
33
|
|
|
56
|
-
declare class DotLottiePlayerCanvas extends DotLottiePlayerBase {
|
|
57
|
-
loadAnimation: typeof _aarsteinmedia_lottie_web_canvas.loadAnimation;
|
|
58
|
-
get renderer(): RendererType;
|
|
59
|
-
constructor();
|
|
60
|
-
protected setOptions({ container, hasAutoplay, hasLoop, initialSegment, preserveAspectRatio, }: {
|
|
61
|
-
container?: HTMLElement;
|
|
62
|
-
rendererType: RendererType;
|
|
63
|
-
initialSegment?: Vector2;
|
|
64
|
-
hasAutoplay: boolean;
|
|
65
|
-
hasLoop: boolean;
|
|
66
|
-
preserveAspectRatio: PreserveAspectRatio;
|
|
67
|
-
}): AnimationConfiguration<RendererType.Canvas>;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
type AnimateOnScroll = boolean | '' | null;
|
|
71
|
-
type Autoplay = boolean | '' | 'autoplay' | null;
|
|
72
|
-
type Controls = boolean | '' | 'controls' | null;
|
|
73
|
-
type Loop = boolean | '' | 'loop' | null;
|
|
74
|
-
type Subframe = boolean | '' | null;
|
|
75
|
-
declare global {
|
|
76
|
-
interface HTMLElementTagNameMap {
|
|
77
|
-
[tagName]: DotLottiePlayer | DotLottiePlayerLight;
|
|
78
|
-
}
|
|
79
|
-
function dotLottiePlayer(): DotLottiePlayer | DotLottiePlayerLight | DotLottiePlayerSVG | DotLottiePlayerCanvas;
|
|
80
|
-
}
|
|
81
|
-
type JSXLottiePlayer = Omit<Partial<DotLottiePlayer | DotLottiePlayerLight>, 'style'> & {
|
|
82
|
-
class?: string;
|
|
83
|
-
ref?: React.RefObject<unknown>;
|
|
84
|
-
style?: React.CSSProperties;
|
|
85
|
-
src: string;
|
|
86
|
-
};
|
|
87
|
-
declare module 'react' {
|
|
88
|
-
namespace JSX {
|
|
89
|
-
interface IntrinsicElements {
|
|
90
|
-
[tagName]: JSXLottiePlayer;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
declare module 'react/jsx-runtime' {
|
|
95
|
-
namespace JSX {
|
|
96
|
-
interface IntrinsicElements {
|
|
97
|
-
[tagName]: JSXLottiePlayer;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
declare module 'react/jsx-dev-runtime' {
|
|
102
|
-
namespace JSX {
|
|
103
|
-
interface IntrinsicElements {
|
|
104
|
-
[tagName]: JSXLottiePlayer;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
declare abstract class PropertyCallbackElement extends HTMLElement {
|
|
110
|
-
constructor();
|
|
111
|
-
connectedCallback(): void;
|
|
112
|
-
propertyChangedCallback(_name: string, _oldValue: unknown, _value: unknown): void;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
declare function renderControls(this: DotLottiePlayerBase): void;
|
|
116
|
-
|
|
117
|
-
declare function renderPlayer(this: DotLottiePlayerBase): Promise<void>;
|
|
118
|
-
|
|
119
34
|
declare abstract class DotLottiePlayerBase extends PropertyCallbackElement {
|
|
120
35
|
static get observedAttributes(): readonly ["animateOnScroll", "autoplay", "controls", "direction", "hover", "loop", "mode", "playOnClick", "playOnVisible", "selector", "speed", "src", "subframe"];
|
|
121
36
|
static get observedProperties(): string[];
|
|
@@ -125,15 +40,15 @@ declare abstract class DotLottiePlayerBase extends PropertyCallbackElement {
|
|
|
125
40
|
shadow: ShadowRoot | undefined;
|
|
126
41
|
source?: string;
|
|
127
42
|
template?: HTMLTemplateElement;
|
|
128
|
-
set animateOnScroll(value:
|
|
129
|
-
get animateOnScroll():
|
|
43
|
+
set animateOnScroll(value: HTMLBooleanAttribute);
|
|
44
|
+
get animateOnScroll(): HTMLBooleanAttribute;
|
|
130
45
|
get animations(): AnimationData[];
|
|
131
|
-
set autoplay(value:
|
|
132
|
-
get autoplay():
|
|
46
|
+
set autoplay(value: HTMLBooleanAttribute);
|
|
47
|
+
get autoplay(): HTMLBooleanAttribute;
|
|
133
48
|
set background(value: string);
|
|
134
49
|
get background(): string;
|
|
135
|
-
set controls(value:
|
|
136
|
-
get controls():
|
|
50
|
+
set controls(value: HTMLBooleanAttribute);
|
|
51
|
+
get controls(): HTMLBooleanAttribute;
|
|
137
52
|
set count(value: number);
|
|
138
53
|
get count(): number;
|
|
139
54
|
get currentAnimation(): number;
|
|
@@ -150,34 +65,34 @@ declare abstract class DotLottiePlayerBase extends PropertyCallbackElement {
|
|
|
150
65
|
set intermission(value: number);
|
|
151
66
|
get intermission(): number;
|
|
152
67
|
get isDotLottie(): boolean;
|
|
153
|
-
set loop(value:
|
|
154
|
-
get loop():
|
|
68
|
+
set loop(value: HTMLBooleanAttribute);
|
|
69
|
+
get loop(): HTMLBooleanAttribute;
|
|
155
70
|
set mode(value: PlayMode);
|
|
156
71
|
get mode(): PlayMode;
|
|
157
72
|
set mouseout(value: MouseOut);
|
|
158
73
|
get mouseout(): MouseOut;
|
|
159
74
|
set objectfit(value: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down');
|
|
160
75
|
get objectfit(): "contain" | "cover" | "fill" | "none" | "scale-down";
|
|
161
|
-
set once(value:
|
|
162
|
-
get once():
|
|
163
|
-
set playOnClick(value:
|
|
164
|
-
get playOnClick():
|
|
165
|
-
set playOnVisible(value:
|
|
166
|
-
get playOnVisible():
|
|
76
|
+
set once(value: HTMLBooleanAttribute);
|
|
77
|
+
get once(): HTMLBooleanAttribute;
|
|
78
|
+
set playOnClick(value: HTMLBooleanAttribute);
|
|
79
|
+
get playOnClick(): HTMLBooleanAttribute;
|
|
80
|
+
set playOnVisible(value: HTMLBooleanAttribute);
|
|
81
|
+
get playOnVisible(): HTMLBooleanAttribute;
|
|
167
82
|
set preserveAspectRatio(value: PreserveAspectRatio | null);
|
|
168
83
|
get preserveAspectRatio(): PreserveAspectRatio | null;
|
|
169
84
|
set renderer(value: RendererType);
|
|
170
85
|
get renderer(): RendererType;
|
|
171
86
|
set selector(value: string | null);
|
|
172
87
|
get selector(): string | null;
|
|
173
|
-
set simple(value:
|
|
174
|
-
get simple():
|
|
88
|
+
set simple(value: HTMLBooleanAttribute);
|
|
89
|
+
get simple(): HTMLBooleanAttribute;
|
|
175
90
|
set speed(value: number);
|
|
176
91
|
get speed(): number;
|
|
177
92
|
set src(value: string | null);
|
|
178
93
|
get src(): string | null;
|
|
179
|
-
set subframe(value:
|
|
180
|
-
get subframe():
|
|
94
|
+
set subframe(value: HTMLBooleanAttribute);
|
|
95
|
+
get subframe(): HTMLBooleanAttribute;
|
|
181
96
|
protected _container: HTMLElement | null;
|
|
182
97
|
protected _errorMessage: string;
|
|
183
98
|
protected _identifier: string;
|
package/dist/svg.js
CHANGED
|
@@ -531,7 +531,7 @@ const notImplemented = 'Method is not implemented';
|
|
|
531
531
|
* Whether to play once or reset,
|
|
532
532
|
* if playOnVisible is true.
|
|
533
533
|
*/ set once(value) {
|
|
534
|
-
this.setAttribute('once', value.toString());
|
|
534
|
+
this.setAttribute('once', Boolean(value).toString());
|
|
535
535
|
}
|
|
536
536
|
get once() {
|
|
537
537
|
const val = this.getAttribute('once');
|
|
@@ -540,7 +540,7 @@ const notImplemented = 'Method is not implemented';
|
|
|
540
540
|
/**
|
|
541
541
|
* Whether to toggle play on click.
|
|
542
542
|
*/ set playOnClick(value) {
|
|
543
|
-
this.setAttribute('playOnClick', value.toString());
|
|
543
|
+
this.setAttribute('playOnClick', Boolean(value).toString());
|
|
544
544
|
}
|
|
545
545
|
get playOnClick() {
|
|
546
546
|
const val = this.getAttribute('playOnClick');
|
|
@@ -549,7 +549,7 @@ const notImplemented = 'Method is not implemented';
|
|
|
549
549
|
/**
|
|
550
550
|
* Play when visible.
|
|
551
551
|
*/ set playOnVisible(value) {
|
|
552
|
-
this.setAttribute('playOnVisible', value.toString());
|
|
552
|
+
this.setAttribute('playOnVisible', Boolean(value).toString());
|
|
553
553
|
}
|
|
554
554
|
get playOnVisible() {
|
|
555
555
|
const val = this.getAttribute('playOnVisible');
|
|
@@ -594,7 +594,7 @@ const notImplemented = 'Method is not implemented';
|
|
|
594
594
|
/**
|
|
595
595
|
* Hide advanced controls.
|
|
596
596
|
*/ set simple(value) {
|
|
597
|
-
this.setAttribute('simple', value.toString());
|
|
597
|
+
this.setAttribute('simple', Boolean(value).toString());
|
|
598
598
|
}
|
|
599
599
|
get simple() {
|
|
600
600
|
const val = this.getAttribute('simple');
|