@aarsteinmedia/dotlottie-player 5.2.4 → 5.3.1
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 +10 -0
- package/custom-elements.json +23 -38
- package/dist/index.d.ts +10 -36
- package/dist/index.js +169 -579
- package/dist/unpkg.js +69 -7
- package/package.json +11 -13
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
Changelog was only added since [3.2.3], so it's not exhaustive. [Please report any missing noteable changes to us](https://github.com/aarsteinmedia/dotlottie-player/issues), and we'll add them promptly.
|
|
9
9
|
|
|
10
|
+
## [5.3.1] - 20-06-2025
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- Fixed bug causing some elements to have wrong placement.
|
|
15
|
+
- Fixed bug with toggling boomerang
|
|
16
|
+
- Minor optimizations
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
10
20
|
## [5.2.4] - 11-06-2025
|
|
11
21
|
|
|
12
22
|
### Changed
|
package/custom-elements.json
CHANGED
|
@@ -10,10 +10,6 @@
|
|
|
10
10
|
"kind": "variable",
|
|
11
11
|
"name": "PlayerState"
|
|
12
12
|
},
|
|
13
|
-
{
|
|
14
|
-
"kind": "variable",
|
|
15
|
-
"name": "PlayMode"
|
|
16
|
-
},
|
|
17
13
|
{
|
|
18
14
|
"kind": "class",
|
|
19
15
|
"description": "DotLottie Player Web Component.",
|
|
@@ -77,6 +73,11 @@
|
|
|
77
73
|
"name": "intermission",
|
|
78
74
|
"description": "Pause between loop intrations, in miliseconds."
|
|
79
75
|
},
|
|
76
|
+
{
|
|
77
|
+
"kind": "field",
|
|
78
|
+
"name": "isDotLottie",
|
|
79
|
+
"readonly": true
|
|
80
|
+
},
|
|
80
81
|
{
|
|
81
82
|
"kind": "field",
|
|
82
83
|
"name": "loop",
|
|
@@ -122,32 +123,6 @@
|
|
|
122
123
|
"name": "subframe",
|
|
123
124
|
"description": "Subframe."
|
|
124
125
|
},
|
|
125
|
-
{
|
|
126
|
-
"kind": "method",
|
|
127
|
-
"name": "addAnimation",
|
|
128
|
-
"parameters": [
|
|
129
|
-
{
|
|
130
|
-
"name": "configs"
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
"name": "fileName"
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
"name": "shouldDownload",
|
|
137
|
-
"default": "true"
|
|
138
|
-
}
|
|
139
|
-
],
|
|
140
|
-
"description": "Creates a new dotLottie file, by combinig several animations.\nIf set to false the function returns an ArrayBuffer. Defaults to true."
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
"kind": "method",
|
|
144
|
-
"name": "convert",
|
|
145
|
-
"parameters": [
|
|
146
|
-
{
|
|
147
|
-
"name": "{ animations: animationsFromProps, fileName, manifest, shouldDownload = true, src: srcFromProps, typeCheck }"
|
|
148
|
-
}
|
|
149
|
-
]
|
|
150
|
-
},
|
|
151
126
|
{
|
|
152
127
|
"kind": "method",
|
|
153
128
|
"name": "destroy",
|
|
@@ -490,6 +465,16 @@
|
|
|
490
465
|
],
|
|
491
466
|
"description": "Toggle show Settings."
|
|
492
467
|
},
|
|
468
|
+
{
|
|
469
|
+
"kind": "field",
|
|
470
|
+
"name": "addAnimation",
|
|
471
|
+
"default": "addAnimation"
|
|
472
|
+
},
|
|
473
|
+
{
|
|
474
|
+
"kind": "field",
|
|
475
|
+
"name": "convert",
|
|
476
|
+
"default": "convert"
|
|
477
|
+
},
|
|
493
478
|
{
|
|
494
479
|
"kind": "field",
|
|
495
480
|
"name": "playerState"
|
|
@@ -661,6 +646,14 @@
|
|
|
661
646
|
}
|
|
662
647
|
],
|
|
663
648
|
"exports": [
|
|
649
|
+
{
|
|
650
|
+
"kind": "js",
|
|
651
|
+
"name": "PlayMode",
|
|
652
|
+
"declaration": {
|
|
653
|
+
"name": "PlayMode",
|
|
654
|
+
"package": "@aarsteinmedia/lottie-web/utils"
|
|
655
|
+
}
|
|
656
|
+
},
|
|
664
657
|
{
|
|
665
658
|
"kind": "js",
|
|
666
659
|
"name": "PlayerEvents",
|
|
@@ -677,14 +670,6 @@
|
|
|
677
670
|
"module": "dist/index.js"
|
|
678
671
|
}
|
|
679
672
|
},
|
|
680
|
-
{
|
|
681
|
-
"kind": "js",
|
|
682
|
-
"name": "PlayMode",
|
|
683
|
-
"declaration": {
|
|
684
|
-
"name": "PlayMode",
|
|
685
|
-
"module": "dist/index.js"
|
|
686
|
-
}
|
|
687
|
-
},
|
|
688
673
|
{
|
|
689
674
|
"kind": "js",
|
|
690
675
|
"name": "PlayerState",
|
package/dist/index.d.ts
CHANGED
|
@@ -1,21 +1,8 @@
|
|
|
1
|
-
import { RendererType } from '@aarsteinmedia/lottie-web/utils';
|
|
2
|
-
export { PlayerEvents } from '@aarsteinmedia/lottie-web/utils';
|
|
3
|
-
import {
|
|
1
|
+
import { PlayMode, PreserveAspectRatio, RendererType } from '@aarsteinmedia/lottie-web/utils';
|
|
2
|
+
export { PlayMode, PlayerEvents } from '@aarsteinmedia/lottie-web/utils';
|
|
3
|
+
import { AnimationDirection, AnimationItem, LottieManifest, AnimationSettings, Vector2 } from '@aarsteinmedia/lottie-web';
|
|
4
|
+
import { addAnimation, convert } from '@aarsteinmedia/lottie-web/dotlottie';
|
|
4
5
|
|
|
5
|
-
interface Animation extends AnimationSettings {
|
|
6
|
-
id: string;
|
|
7
|
-
}
|
|
8
|
-
interface AnimationAttributes extends Animation {
|
|
9
|
-
url: string;
|
|
10
|
-
}
|
|
11
|
-
interface ConvertParams {
|
|
12
|
-
animations?: AnimationData[];
|
|
13
|
-
fileName?: string;
|
|
14
|
-
manifest?: LottieManifest;
|
|
15
|
-
shouldDownload?: boolean;
|
|
16
|
-
src?: string;
|
|
17
|
-
typeCheck?: boolean;
|
|
18
|
-
}
|
|
19
6
|
type AnimateOnScroll = boolean | '' | null;
|
|
20
7
|
type Autoplay = boolean | '' | 'autoplay' | null;
|
|
21
8
|
type Controls = boolean | '' | 'controls' | null;
|
|
@@ -57,7 +44,7 @@ declare module 'react/jsx-dev-runtime' {
|
|
|
57
44
|
|
|
58
45
|
declare abstract class PropertyCallbackElement extends HTMLElement {
|
|
59
46
|
constructor();
|
|
60
|
-
connectedCallback():
|
|
47
|
+
connectedCallback(): void;
|
|
61
48
|
propertyChangedCallback(_name: string, _oldValue: unknown, _value: unknown): void;
|
|
62
49
|
}
|
|
63
50
|
|
|
@@ -75,21 +62,13 @@ declare enum PlayerState {
|
|
|
75
62
|
Playing = "playing",
|
|
76
63
|
Stopped = "stopped"
|
|
77
64
|
}
|
|
78
|
-
declare enum PlayMode {
|
|
79
|
-
Bounce = "bounce",
|
|
80
|
-
Normal = "normal"
|
|
81
|
-
}
|
|
82
|
-
declare enum PreserveAspectRatio {
|
|
83
|
-
Contain = "xMidYMid meet",
|
|
84
|
-
Cover = "xMidYMid slice",
|
|
85
|
-
Initial = "none",
|
|
86
|
-
None = "xMinYMin slice"
|
|
87
|
-
}
|
|
88
65
|
|
|
89
66
|
declare class DotLottiePlayer extends PropertyCallbackElement {
|
|
90
67
|
static get observedAttributes(): string[];
|
|
91
68
|
static get observedProperties(): string[];
|
|
92
69
|
static get styles(): () => Promise<CSSStyleSheet>;
|
|
70
|
+
addAnimation: typeof addAnimation;
|
|
71
|
+
convert: typeof convert;
|
|
93
72
|
playerState: PlayerState;
|
|
94
73
|
shadow: ShadowRoot | undefined;
|
|
95
74
|
source?: string;
|
|
@@ -112,6 +91,7 @@ declare class DotLottiePlayer extends PropertyCallbackElement {
|
|
|
112
91
|
get hover(): boolean;
|
|
113
92
|
set intermission(value: number);
|
|
114
93
|
get intermission(): number;
|
|
94
|
+
get isDotLottie(): boolean;
|
|
115
95
|
set loop(value: Loop);
|
|
116
96
|
get loop(): Loop;
|
|
117
97
|
set mode(value: PlayMode);
|
|
@@ -155,14 +135,8 @@ declare class DotLottiePlayer extends PropertyCallbackElement {
|
|
|
155
135
|
private _multiAnimationSettings;
|
|
156
136
|
private _segment?;
|
|
157
137
|
constructor();
|
|
158
|
-
addAnimation(configs: AnimationAttributes[], fileName?: string, shouldDownload?: boolean): Promise<{
|
|
159
|
-
result?: null | ArrayBuffer;
|
|
160
|
-
success: boolean;
|
|
161
|
-
error?: string;
|
|
162
|
-
}>;
|
|
163
138
|
attributeChangedCallback(name: string, _oldValue: unknown, value: string): Promise<void>;
|
|
164
|
-
connectedCallback():
|
|
165
|
-
convert({ animations: animationsFromProps, fileName, manifest, shouldDownload, src: srcFromProps, typeCheck, }: ConvertParams): Promise<string | ArrayBuffer | null>;
|
|
139
|
+
connectedCallback(): void;
|
|
166
140
|
destroy(): void;
|
|
167
141
|
disconnectedCallback(): void;
|
|
168
142
|
getLottie(): AnimationItem | null;
|
|
@@ -216,4 +190,4 @@ declare class DotLottiePlayer extends PropertyCallbackElement {
|
|
|
216
190
|
|
|
217
191
|
declare const tagName = "dotlottie-player";
|
|
218
192
|
|
|
219
|
-
export {
|
|
193
|
+
export { PlayerState, DotLottiePlayer as default, tagName };
|