@lottiefiles/lottie-player 1.3.1 → 1.4.3
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +21 -0
- package/README.md +1 -1
- package/dist/lottie-player.d.ts +47 -34
- package/dist/lottie-player.d.ts.map +1 -1
- package/dist/lottie-player.esm.js +4 -4
- package/dist/lottie-player.esm.js.map +1 -1
- package/dist/lottie-player.js +4 -4
- package/dist/lottie-player.js.map +1 -1
- package/dist/lottie-player.styles.d.ts +3 -0
- package/dist/lottie-player.styles.d.ts.map +1 -1
- package/dist/tgs-player.esm.js +3 -3
- package/dist/tgs-player.esm.js.map +1 -1
- package/dist/tgs-player.js +1 -1
- package/dist/tgs-player.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,27 @@ All notable changes to this project will be documented in this file.
|
|
3
3
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), enforced with [semantic-release](https://github.com/semantic-release/semantic-release).
|
4
4
|
|
5
5
|
|
6
|
+
## [1.2.1](https://github.com/LottieFiles/lottie-player/compare/v1.2.0...v1.2.1) (2021-09-30)
|
7
|
+
|
8
|
+
|
9
|
+
### Bug Fixes
|
10
|
+
|
11
|
+
* **safari fix:** safari height width inherit to container, eslint error fixes ([8c96be5](https://github.com/LottieFiles/lottie-player/commit/8c96be586d3128833d264f2c75511b4d03e95289))
|
12
|
+
|
13
|
+
# [1.2.0](https://github.com/LottieFiles/lottie-player/compare/v1.1.4...v1.2.0) (2021-09-21)
|
14
|
+
|
15
|
+
|
16
|
+
### Features
|
17
|
+
|
18
|
+
* **events and cleanup:** added event listeners before json error check and added a destroy method for cleanup ([646d63b](https://github.com/LottieFiles/lottie-player/commit/646d63b14e89a2c0079ddc9224fc8d8e97d84806))
|
19
|
+
|
20
|
+
## [1.1.4](https://github.com/LottieFiles/lottie-player/compare/v1.1.3...v1.1.4) (2021-09-02)
|
21
|
+
|
22
|
+
|
23
|
+
### Bug Fixes
|
24
|
+
|
25
|
+
* **rollback:** rollback due to race condition issues ([556307f](https://github.com/LottieFiles/lottie-player/commit/556307fc57a807c03ad1b3639c3e464d73cd87be))
|
26
|
+
|
6
27
|
## [1.1.3](https://github.com/LottieFiles/lottie-player/compare/v1.1.2...v1.1.3) (2021-09-02)
|
7
28
|
|
8
29
|
|
package/README.md
CHANGED
@@ -254,7 +254,7 @@ declare namespace JSX {
|
|
254
254
|
| `loop` | `loop` | Whether to loop animation. | `boolean` | `false` |
|
255
255
|
| `mode` | `mode` | Play mode. | `PlayMode.Bounce \| PlayMode.Normal` | `PlayMode.Normal` |
|
256
256
|
| `preserveAspectRatio` | `preserveAspectRatio` | Valid preserve aspect ratio value. | `string` | `'xMidYMid meet'` |
|
257
|
-
| `renderer` | `renderer` | Renderer to use. | `"svg"
|
257
|
+
| `renderer` | `renderer` | Renderer to use. | `"svg" \| "canvas"` | `"svg"` |
|
258
258
|
| `speed` | `speed` | Animation speed. | `number` | `1` |
|
259
259
|
| `src` _(required)_ | `src` | Bodymovin JSON data or URL to JSON. | `string` | `undefined` |
|
260
260
|
|
package/dist/lottie-player.d.ts
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
import { LitElement, TemplateResult } from "lit-element";
|
2
2
|
export declare enum PlayerState {
|
3
|
+
Destroyed = "destroyed",
|
3
4
|
Error = "error",
|
4
5
|
Frozen = "frozen",
|
5
6
|
Loading = "loading",
|
@@ -13,6 +14,7 @@ export declare enum PlayMode {
|
|
13
14
|
}
|
14
15
|
export declare enum PlayerEvents {
|
15
16
|
Complete = "complete",
|
17
|
+
Destroyed = "destroyed",
|
16
18
|
Error = "error",
|
17
19
|
Frame = "frame",
|
18
20
|
Freeze = "freeze",
|
@@ -36,14 +38,6 @@ export declare function parseSrc(src: string | object): string | object;
|
|
36
38
|
* @extends {LitElement}
|
37
39
|
*/
|
38
40
|
export declare class LottiePlayer extends LitElement {
|
39
|
-
/**
|
40
|
-
* Animation container.
|
41
|
-
*/
|
42
|
-
protected container: HTMLElement;
|
43
|
-
/**
|
44
|
-
* Play mode.
|
45
|
-
*/
|
46
|
-
mode: PlayMode;
|
47
41
|
/**
|
48
42
|
* Autoplay animation on load.
|
49
43
|
*/
|
@@ -60,6 +54,14 @@ export declare class LottiePlayer extends LitElement {
|
|
60
54
|
* Number of times to loop animation.
|
61
55
|
*/
|
62
56
|
count?: number;
|
57
|
+
/**
|
58
|
+
* Player state.
|
59
|
+
*/
|
60
|
+
currentState: PlayerState;
|
61
|
+
/**
|
62
|
+
* Animation speed.
|
63
|
+
*/
|
64
|
+
description: string;
|
63
65
|
/**
|
64
66
|
* Direction of animation.
|
65
67
|
*/
|
@@ -68,10 +70,18 @@ export declare class LottiePlayer extends LitElement {
|
|
68
70
|
* Whether to play on mouse hover
|
69
71
|
*/
|
70
72
|
hover: boolean;
|
73
|
+
/**
|
74
|
+
* Intermission
|
75
|
+
*/
|
76
|
+
intermission: number;
|
71
77
|
/**
|
72
78
|
* Whether to loop animation.
|
73
79
|
*/
|
74
80
|
loop: boolean;
|
81
|
+
/**
|
82
|
+
* Play mode.
|
83
|
+
*/
|
84
|
+
mode: PlayMode;
|
75
85
|
/**
|
76
86
|
* Aspect ratio to pass to lottie-web.
|
77
87
|
*/
|
@@ -80,6 +90,10 @@ export declare class LottiePlayer extends LitElement {
|
|
80
90
|
* Renderer to use.
|
81
91
|
*/
|
82
92
|
renderer: "svg";
|
93
|
+
/**
|
94
|
+
* seeker
|
95
|
+
*/
|
96
|
+
seeker: any;
|
83
97
|
/**
|
84
98
|
* Animation speed.
|
85
99
|
*/
|
@@ -89,27 +103,13 @@ export declare class LottiePlayer extends LitElement {
|
|
89
103
|
*/
|
90
104
|
src?: string;
|
91
105
|
/**
|
92
|
-
*
|
93
|
-
*/
|
94
|
-
currentState: PlayerState;
|
95
|
-
seeker: any;
|
96
|
-
intermission: number;
|
97
|
-
/**
|
98
|
-
* Animation speed.
|
106
|
+
* Animation container.
|
99
107
|
*/
|
100
|
-
|
108
|
+
protected container: HTMLElement;
|
101
109
|
private _io;
|
102
110
|
private _lottie?;
|
103
111
|
private _prevState?;
|
104
112
|
private _counter;
|
105
|
-
/**
|
106
|
-
* Handle visibility change events.
|
107
|
-
*/
|
108
|
-
private _onVisibilityChange;
|
109
|
-
/**
|
110
|
-
* Handles click and drag actions on the progress track.
|
111
|
-
*/
|
112
|
-
private _handleSeekChange;
|
113
113
|
/**
|
114
114
|
* Configure and initialize lottie-web player instance.
|
115
115
|
*/
|
@@ -130,6 +130,10 @@ export declare class LottiePlayer extends LitElement {
|
|
130
130
|
* Stops animation play.
|
131
131
|
*/
|
132
132
|
stop(): void;
|
133
|
+
/**
|
134
|
+
* Destroy animation and lottie-player element.
|
135
|
+
*/
|
136
|
+
destroy(): void;
|
133
137
|
/**
|
134
138
|
* Seek to a given frame.
|
135
139
|
*/
|
@@ -140,12 +144,6 @@ export declare class LottiePlayer extends LitElement {
|
|
140
144
|
* If 'download' argument is boolean true, then a download is triggered in browser.
|
141
145
|
*/
|
142
146
|
snapshot(download?: boolean): string | void;
|
143
|
-
/**
|
144
|
-
* Freeze animation play.
|
145
|
-
* This internal state pauses animation and is used to differentiate between
|
146
|
-
* user requested pauses and component instigated pauses.
|
147
|
-
*/
|
148
|
-
private freeze;
|
149
147
|
/**
|
150
148
|
* Sets animation play speed.
|
151
149
|
*
|
@@ -180,15 +178,30 @@ export declare class LottiePlayer extends LitElement {
|
|
180
178
|
* Returns the styles for the component.
|
181
179
|
*/
|
182
180
|
static get styles(): import("lit-element").CSSResult;
|
181
|
+
/**
|
182
|
+
* Cleanup on component destroy.
|
183
|
+
*/
|
184
|
+
disconnectedCallback(): void;
|
185
|
+
render(): TemplateResult | void;
|
183
186
|
/**
|
184
187
|
* Initialize everything on component first render.
|
185
188
|
*/
|
186
189
|
protected firstUpdated(): void;
|
190
|
+
protected renderControls(): TemplateResult;
|
187
191
|
/**
|
188
|
-
*
|
192
|
+
* Handle visibility change events.
|
189
193
|
*/
|
190
|
-
|
191
|
-
|
192
|
-
|
194
|
+
private _onVisibilityChange;
|
195
|
+
/**
|
196
|
+
* Handles click and drag actions on the progress track.
|
197
|
+
*/
|
198
|
+
private _handleSeekChange;
|
199
|
+
private _attachEventListeners;
|
200
|
+
/**
|
201
|
+
* Freeze animation play.
|
202
|
+
* This internal state pauses animation and is used to differentiate between
|
203
|
+
* user requested pauses and component instigated pauses.
|
204
|
+
*/
|
205
|
+
private freeze;
|
193
206
|
}
|
194
207
|
//# sourceMappingURL=lottie-player.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"lottie-player.d.ts","sourceRoot":"","sources":["src/lottie-player.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,UAAU,EAIV,cAAc,EACf,MAAM,aAAa,CAAC;AAOrB,oBAAY,WAAW;IACrB,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,OAAO,YAAY;CACpB;AAGD,oBAAY,QAAQ;IAClB,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB;AAGD,oBAAY,YAAY;IACtB,QAAQ,aAAa;IACrB,KAAK,UAAU;IACf,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,IAAI,SAAS;IACb,KAAK,UAAU;IACf,IAAI,SAAS;IACb,KAAK,UAAU;IACf,QAAQ,aAAa;IACrB,IAAI,SAAS;CACd;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAa9D;AAiCD;;;;;;GAMG;AACH,qBACa,YAAa,SAAQ,UAAU;IAC1C;;OAEG;
|
1
|
+
{"version":3,"file":"lottie-player.d.ts","sourceRoot":"","sources":["src/lottie-player.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,UAAU,EAIV,cAAc,EACf,MAAM,aAAa,CAAC;AAOrB,oBAAY,WAAW;IACrB,SAAS,c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