@aarsteinmedia/dotlottie-player 5.2.3 → 5.3.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/CHANGELOG.md CHANGED
@@ -7,7 +7,15 @@ 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.2.3] - 11-06-2025
10
+ ## [5.3.0] - 20-06-2025
11
+
12
+ - Fixed bug causing some elements to have wrong placement.
13
+ - Fixed bug with toggling boomerang
14
+ - Minor optimizations
15
+
16
+ ### Changed
17
+
18
+ ## [5.2.4] - 11-06-2025
11
19
 
12
20
  ### Changed
13
21
 
@@ -289,7 +297,7 @@ Changelog was only added since [3.2.3], so it's not exhaustive. [Please report a
289
297
  - Removed dependencies
290
298
  - `@lit`
291
299
 
292
- [5.2.3]: https://www.npmjs.com/package/@aarsteinmedia/dotlottie-player/v/5.2.3
300
+ [5.2.4]: https://www.npmjs.com/package/@aarsteinmedia/dotlottie-player/v/5.2.4
293
301
  [5.2.0]: https://www.npmjs.com/package/@aarsteinmedia/dotlottie-player/v/5.2.0
294
302
  [5.1.13]: https://www.npmjs.com/package/@aarsteinmedia/dotlottie-player/v/5.1.13
295
303
  [5.1.11]: https://www.npmjs.com/package/@aarsteinmedia/dotlottie-player/v/5.1.11
@@ -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",
@@ -368,6 +343,16 @@
368
343
  ],
369
344
  "description": "Handles click and drag actions on the progress track."
370
345
  },
346
+ {
347
+ "kind": "method",
348
+ "name": "_handleSettingsClick",
349
+ "parameters": [
350
+ {
351
+ "name": "{ target }"
352
+ }
353
+ ],
354
+ "description": "Handle settings click event."
355
+ },
371
356
  {
372
357
  "kind": "method",
373
358
  "name": "_addEventListeners",
@@ -480,6 +465,16 @@
480
465
  ],
481
466
  "description": "Toggle show Settings."
482
467
  },
468
+ {
469
+ "kind": "field",
470
+ "name": "addAnimation",
471
+ "default": "addAnimation"
472
+ },
473
+ {
474
+ "kind": "field",
475
+ "name": "convert",
476
+ "default": "convert"
477
+ },
483
478
  {
484
479
  "kind": "field",
485
480
  "name": "playerState"
@@ -586,10 +581,6 @@
586
581
  },
587
582
  "default": "[]"
588
583
  },
589
- {
590
- "kind": "field",
591
- "name": "_handleSettingsClick"
592
- },
593
584
  {
594
585
  "kind": "field",
595
586
  "name": "template"
@@ -655,6 +646,14 @@
655
646
  }
656
647
  ],
657
648
  "exports": [
649
+ {
650
+ "kind": "js",
651
+ "name": "PlayMode",
652
+ "declaration": {
653
+ "name": "PlayMode",
654
+ "package": "@aarsteinmedia/lottie-web/utils"
655
+ }
656
+ },
658
657
  {
659
658
  "kind": "js",
660
659
  "name": "PlayerEvents",
@@ -671,14 +670,6 @@
671
670
  "module": "dist/index.js"
672
671
  }
673
672
  },
674
- {
675
- "kind": "js",
676
- "name": "PlayMode",
677
- "declaration": {
678
- "name": "PlayMode",
679
- "module": "dist/index.js"
680
- }
681
- },
682
673
  {
683
674
  "kind": "js",
684
675
  "name": "PlayerState",
package/dist/index.d.ts CHANGED
@@ -1,20 +1,8 @@
1
- export { PlayerEvents } from '@aarsteinmedia/lottie-web/utils';
2
- import { AnimationSettings, AnimationData, LottieManifest, AnimationDirection, AnimationItem, Vector2 } from '@aarsteinmedia/lottie-web';
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';
3
5
 
4
- interface Animation extends AnimationSettings {
5
- id: string;
6
- }
7
- interface AnimationAttributes extends Animation {
8
- url: string;
9
- }
10
- interface ConvertParams {
11
- animations?: AnimationData[];
12
- fileName?: string;
13
- manifest?: LottieManifest;
14
- shouldDownload?: boolean;
15
- src?: string;
16
- typeCheck?: boolean;
17
- }
18
6
  type AnimateOnScroll = boolean | '' | null;
19
7
  type Autoplay = boolean | '' | 'autoplay' | null;
20
8
  type Controls = boolean | '' | 'controls' | null;
@@ -56,7 +44,7 @@ declare module 'react/jsx-dev-runtime' {
56
44
 
57
45
  declare abstract class PropertyCallbackElement extends HTMLElement {
58
46
  constructor();
59
- connectedCallback(): Promise<void>;
47
+ connectedCallback(): void;
60
48
  propertyChangedCallback(_name: string, _oldValue: unknown, _value: unknown): void;
61
49
  }
62
50
 
@@ -74,26 +62,13 @@ declare enum PlayerState {
74
62
  Playing = "playing",
75
63
  Stopped = "stopped"
76
64
  }
77
- declare enum PlayMode {
78
- Bounce = "bounce",
79
- Normal = "normal"
80
- }
81
- declare enum PreserveAspectRatio {
82
- Contain = "xMidYMid meet",
83
- Cover = "xMidYMid slice",
84
- Initial = "none",
85
- None = "xMinYMin slice"
86
- }
87
- declare enum RendererType {
88
- Canvas = "canvas",
89
- HTML = "html",
90
- SVG = "svg"
91
- }
92
65
 
93
66
  declare class DotLottiePlayer extends PropertyCallbackElement {
94
67
  static get observedAttributes(): string[];
95
68
  static get observedProperties(): string[];
96
69
  static get styles(): () => Promise<CSSStyleSheet>;
70
+ addAnimation: typeof addAnimation;
71
+ convert: typeof convert;
97
72
  playerState: PlayerState;
98
73
  shadow: ShadowRoot | undefined;
99
74
  source?: string;
@@ -116,6 +91,7 @@ declare class DotLottiePlayer extends PropertyCallbackElement {
116
91
  get hover(): boolean;
117
92
  set intermission(value: number);
118
93
  get intermission(): number;
94
+ get isDotLottie(): boolean;
119
95
  set loop(value: Loop);
120
96
  get loop(): Loop;
121
97
  set mode(value: PlayMode);
@@ -159,14 +135,8 @@ declare class DotLottiePlayer extends PropertyCallbackElement {
159
135
  private _multiAnimationSettings;
160
136
  private _segment?;
161
137
  constructor();
162
- addAnimation(configs: AnimationAttributes[], fileName?: string, shouldDownload?: boolean): Promise<{
163
- result?: null | ArrayBuffer;
164
- success: boolean;
165
- error?: string;
166
- }>;
167
138
  attributeChangedCallback(name: string, _oldValue: unknown, value: string): Promise<void>;
168
- connectedCallback(): Promise<void>;
169
- convert({ animations: animationsFromProps, fileName, manifest, shouldDownload, src: srcFromProps, typeCheck, }: ConvertParams): Promise<string | ArrayBuffer | null>;
139
+ connectedCallback(): void;
170
140
  destroy(): void;
171
141
  disconnectedCallback(): void;
172
142
  getLottie(): AnimationItem | null;
@@ -196,7 +166,7 @@ declare class DotLottiePlayer extends PropertyCallbackElement {
196
166
  protected _freeze(): void;
197
167
  protected _handleBlur(): void;
198
168
  protected _handleSeekChange({ target }: Event): void;
199
- protected _handleSettingsClick: ({ target }: Event) => void;
169
+ protected _handleSettingsClick({ target }: Event): void;
200
170
  private _addEventListeners;
201
171
  private _addIntersectionObserver;
202
172
  private _complete;
@@ -220,4 +190,4 @@ declare class DotLottiePlayer extends PropertyCallbackElement {
220
190
 
221
191
  declare const tagName = "dotlottie-player";
222
192
 
223
- export { PlayMode, PlayerState, DotLottiePlayer as default, tagName };
193
+ export { PlayerState, DotLottiePlayer as default, tagName };