@aarsteinmedia/dotlottie-player 5.3.2 → 6.0.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 +7 -0
- package/README.md +24 -11
- package/custom-elements.json +1 -706
- package/dist/{index.d.ts → full.d.ts} +62 -24
- package/dist/{index.js → full.js} +92 -69
- package/dist/light.d.ts +233 -0
- package/dist/light.js +1484 -0
- package/dist/unpkg-full.js +70 -0
- package/dist/unpkg-light.js +68 -0
- package/package.json +17 -11
- package/dist/unpkg.js +0 -70
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,12 @@ 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
|
+
## [6.0.1] - 22-06-2025
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- Refactored code to export both full and light version from this package, thereby deprecating `@aarsteinmedia/dotlottie-player-light`. To import light version use `@aarsteinmedia/dotlottie-player/light`.
|
|
15
|
+
|
|
10
16
|
## [5.3.2] - 21-06-2025
|
|
11
17
|
|
|
12
18
|
### Changed
|
|
@@ -299,6 +305,7 @@ Changelog was only added since [3.2.3], so it's not exhaustive. [Please report a
|
|
|
299
305
|
- Removed dependencies
|
|
300
306
|
- `@lit`
|
|
301
307
|
|
|
308
|
+
[6.0.1]: https://www.npmjs.com/package/@aarsteinmedia/dotlottie-player/v/6.0.1
|
|
302
309
|
[5.3.2]: https://www.npmjs.com/package/@aarsteinmedia/dotlottie-player/v/5.3.2
|
|
303
310
|
[5.2.4]: https://www.npmjs.com/package/@aarsteinmedia/dotlottie-player/v/5.2.4
|
|
304
311
|
[5.2.0]: https://www.npmjs.com/package/@aarsteinmedia/dotlottie-player/v/5.2.0
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
We proudly claim this to be the most versatile, lightweight and efficient Lottie Player Web Component available. It's compatible with server side rendering, and completely framework agnostic.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
If you only need to render animations as SVGs, don't use any SVG effects like blur or drop shadow, don't use [Expressions](https://helpx.adobe.com/after-effects/using/expression-basics.html), and don't need to be able convert or combine animations on the fly – you can access a light version of this package by importing `@aarsteinmedia/dotlottie-player/light`.
|
|
8
8
|
|
|
9
9
|
## Demo
|
|
10
10
|
|
|
@@ -15,16 +15,22 @@ Here is [a demo](https://www.aarstein.media/en/dotlottie-player), running on Nex
|
|
|
15
15
|
### In HTML
|
|
16
16
|
|
|
17
17
|
- Import from CDN:
|
|
18
|
-
|
|
19
|
-
```
|
|
20
|
-
<script src="https://unpkg.com/@aarsteinmedia/dotlottie-player@latest/dist/
|
|
21
|
-
```
|
|
18
|
+
- Full version:
|
|
19
|
+
```html
|
|
20
|
+
<script src="https://unpkg.com/@aarsteinmedia/dotlottie-player@latest/dist/unpkg-full.js"></script>
|
|
21
|
+
```
|
|
22
|
+
- Light version:
|
|
23
|
+
```html
|
|
24
|
+
<script src="https://unpkg.com/@aarsteinmedia/dotlottie-player@latest/dist/unpkg-light.js"></script>
|
|
25
|
+
```
|
|
22
26
|
|
|
23
27
|
- Import from node_modules directory:
|
|
24
|
-
|
|
25
|
-
```
|
|
26
|
-
<script src="/node_modules/@aarsteinmedia/dotlottie-player/dist/
|
|
27
|
-
```
|
|
28
|
+
- Full version:
|
|
29
|
+
```html
|
|
30
|
+
<script src="/node_modules/@aarsteinmedia/dotlottie-player/dist/unpkg-full.js"></script>
|
|
31
|
+
```
|
|
32
|
+
- Light Version:
|
|
33
|
+
<script src="/node_modules/@aarsteinmedia/dotlottie-player/dist/unpkg-light.js"></script>
|
|
28
34
|
|
|
29
35
|
### In JavaScript or TypeScript
|
|
30
36
|
|
|
@@ -40,6 +46,12 @@ npm install --save @aarsteinmedia/dotlottie-player
|
|
|
40
46
|
import '@aarsteinmedia/dotlottie-player'
|
|
41
47
|
```
|
|
42
48
|
|
|
49
|
+
or:
|
|
50
|
+
|
|
51
|
+
```javascript
|
|
52
|
+
import '@aarsteinmedia/dotlottie-player/light'
|
|
53
|
+
```
|
|
54
|
+
|
|
43
55
|
## Usage
|
|
44
56
|
|
|
45
57
|
Add the element `dotlottie-player` to your markup and point `src` to a Lottie animation of your choice.
|
|
@@ -272,6 +284,7 @@ export default defineNuxtPlugin(({ vueApp }) => {
|
|
|
272
284
|
|
|
273
285
|
| Property / Attribute | Description | Type | Default |
|
|
274
286
|
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- | ----------------- |
|
|
287
|
+
| `animateOnScroll` | Animate by scrolling | `boolean` | `false` |
|
|
275
288
|
| `autoplay` | Play animation on load | `boolean` | `false` |
|
|
276
289
|
| `background` | Background color | `string` | `undefined` |
|
|
277
290
|
| `controls` | Show controls | `boolean` | `false` |
|
|
@@ -290,8 +303,8 @@ export default defineNuxtPlugin(({ vueApp }) => {
|
|
|
290
303
|
|
|
291
304
|
| Method | Function
|
|
292
305
|
| --------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
|
|
293
|
-
| `addAnimation(
|
|
294
|
-
| `convert() =>
|
|
306
|
+
| `addAnimation(params: AddAnimationParams) => Promise<Result>` | Add animation. Triggers download of new dotLottie file. |
|
|
307
|
+
| `convert(params: ConvertParams) => Promise<Result>` | If the current animation is in JSON format – convert it to dotLottie. Triggers a download in the browser. |
|
|
295
308
|
| `destroy() => void` | Nullify animation and remove element from the DOM. |
|
|
296
309
|
| `getLottie() => AnimationItem \| null` | Returns the lottie-web instance used in the component |
|
|
297
310
|
| `load(src: string) => void` | Load animation by URL or JSON object |
|