@aarsteinmedia/dotlottie-player 6.5.0 → 6.5.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 +9 -7
- package/README.md +1 -1
- package/custom-elements.json +3 -3
- package/dist/canvas.d.ts +2 -2
- package/dist/canvas.js +2 -2
- package/dist/chunks/{DotLottiePlayerBase-Dq0onB9o.js → DotLottiePlayerBase-BfEbTiu6.js} +24 -85
- package/dist/chunks/{DotLottiePlayerBase.d-C-GBbp4e.d.ts → constants.d-D4NjmiZl.d.ts} +2 -1
- package/dist/full.d.ts +2 -2
- package/dist/full.js +2 -2
- package/dist/light.d.ts +2 -2
- package/dist/light.js +2 -2
- package/dist/svg.d.ts +2 -2
- package/dist/svg.js +2 -2
- package/dist/unpkg-canvas.js +3 -71
- package/dist/unpkg-full.js +3 -71
- package/dist/unpkg-light.js +2 -70
- package/dist/unpkg-svg.js +3 -71
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -5,11 +5,12 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
-
Changelog was only added since [3.2.3], so it's not exhaustive. [Please report any missing
|
|
8
|
+
Changelog was only added since [3.2.3], so it's not exhaustive. [Please report any missing notable changes to us](https://github.com/aarsteinmedia/dotlottie-player/issues), and we'll add them promptly.
|
|
9
9
|
|
|
10
|
-
## [6.5.
|
|
10
|
+
## [6.5.1] - 17-09-2026
|
|
11
11
|
|
|
12
12
|
- Change to how Animate On Scroll is handled. From being relative to viewport size and scroll position, progress is now entirely determined by position in viewport. This is to improve useability, and gives a significant performance boost. Listener is moved from `scroll` to `IntersectionObserver`, and for browsers that support this the callback is moved to `ViewTimeline` rather than relying on viewport math.
|
|
13
|
+
- Added accessibility check for `prefers-reduced-motion: reduce`. This overrides and disables `autoplay`, `animateOnScroll`, `playOnVisible`, and `mouseOver`/`mouseLeave`.
|
|
13
14
|
|
|
14
15
|
## [6.4.6] - 28-08-2026
|
|
15
16
|
|
|
@@ -41,7 +42,7 @@ Changelog was only added since [3.2.3], so it's not exhaustive. [Please report a
|
|
|
41
42
|
### Changed
|
|
42
43
|
|
|
43
44
|
- Fixed error causing beziers to be dropped from keyframes.
|
|
44
|
-
- Minor
|
|
45
|
+
- Minor bugfixes.
|
|
45
46
|
|
|
46
47
|
## [6.3.11] - 20-07-2026
|
|
47
48
|
|
|
@@ -82,7 +83,7 @@ Changelog was only added since [3.2.3], so it's not exhaustive. [Please report a
|
|
|
82
83
|
### Changed
|
|
83
84
|
|
|
84
85
|
- Added attributes:
|
|
85
|
-
- `delay` – Delay playback on playOnVisible, in
|
|
86
|
+
- `delay` – Delay playback on playOnVisible, in milliseconds
|
|
86
87
|
- `mouseout` – Action on mouseout
|
|
87
88
|
- `once` – Whether, if playOnVisible is true, to play once or anytime animation is in view
|
|
88
89
|
- `playOnClick` – Whether to toggle play on click
|
|
@@ -128,7 +129,7 @@ Changelog was only added since [3.2.3], so it's not exhaustive. [Please report a
|
|
|
128
129
|
### Changed
|
|
129
130
|
|
|
130
131
|
- Optimization to animation engine:
|
|
131
|
-
- Prevented needless function calls to check for rendering context, when only one is
|
|
132
|
+
- Prevented needless function calls to check for rendering context, when only one is sufficient.
|
|
132
133
|
- Swapped deprecated attributes like xml:href and xml:space for modern equivalents.
|
|
133
134
|
|
|
134
135
|
## [5.2.1] - 08-06-2025
|
|
@@ -138,7 +139,7 @@ Changelog was only added since [3.2.3], so it's not exhaustive. [Please report a
|
|
|
138
139
|
### Changed
|
|
139
140
|
|
|
140
141
|
- Fixed several issues with Canvas renderer.
|
|
141
|
-
- Removed Hybrid
|
|
142
|
+
- Removed Hybrid renderer
|
|
142
143
|
|
|
143
144
|
## [5.2.0] - 07-06-2025
|
|
144
145
|
|
|
@@ -266,7 +267,7 @@ Changelog was only added since [3.2.3], so it's not exhaustive. [Please report a
|
|
|
266
267
|
|
|
267
268
|
- Made download optional for snapshot
|
|
268
269
|
|
|
269
|
-
- Made snapshot work for
|
|
270
|
+
- Made snapshot work for programmatically set instances
|
|
270
271
|
|
|
271
272
|
- Changed CSS to respect hidden-attribute
|
|
272
273
|
|
|
@@ -405,6 +406,7 @@ Changelog was only added since [3.2.3], so it's not exhaustive. [Please report a
|
|
|
405
406
|
- Removed dependencies
|
|
406
407
|
- `@lit`
|
|
407
408
|
|
|
409
|
+
[6.5.1]: https://www.npmjs.com/package/@aarsteinmedia/dotlottie-player/v/6.5.1
|
|
408
410
|
[6.3.0]: https://www.npmjs.com/package/@aarsteinmedia/dotlottie-player/v/6.3.0
|
|
409
411
|
[6.0.1]: https://www.npmjs.com/package/@aarsteinmedia/dotlottie-player/v/6.0.1
|
|
410
412
|
[5.3.2]: https://www.npmjs.com/package/@aarsteinmedia/dotlottie-player/v/5.3.2
|
package/README.md
CHANGED
|
@@ -61,7 +61,7 @@ Here is [a demo](https://www.aarstein.media/en/dotlottie-player), running on Nex
|
|
|
61
61
|
|
|
62
62
|
Because this is a Web Component, you're adding it to the global scope of your web app. Unlike modular components, it should only be imported once – preferably early in your app lifecycle.
|
|
63
63
|
|
|
64
|
-
If you're using TypeScript and want to import the component type, do it
|
|
64
|
+
If you're using TypeScript and want to import the component type, do it modular in addition to the global import:
|
|
65
65
|
|
|
66
66
|
```ts
|
|
67
67
|
import '@aarsteinmedia/dotlottie-player' // Do this once globally.
|
package/custom-elements.json
CHANGED
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
],
|
|
51
51
|
"superclass": {
|
|
52
52
|
"name": "DotLottiePlayerBase",
|
|
53
|
-
"module": "/dist/chunks/DotLottiePlayerBase-
|
|
53
|
+
"module": "/dist/chunks/DotLottiePlayerBase-BfEbTiu6.js"
|
|
54
54
|
},
|
|
55
55
|
"tagName": "tagName",
|
|
56
56
|
"customElement": true
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"name": "MouseOut",
|
|
87
87
|
"declaration": {
|
|
88
88
|
"name": "M",
|
|
89
|
-
"module": "./chunks/DotLottiePlayerBase-
|
|
89
|
+
"module": "./chunks/DotLottiePlayerBase-BfEbTiu6.js"
|
|
90
90
|
}
|
|
91
91
|
},
|
|
92
92
|
{
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
"name": "PlayerState",
|
|
95
95
|
"declaration": {
|
|
96
96
|
"name": "P",
|
|
97
|
-
"module": "./chunks/DotLottiePlayerBase-
|
|
97
|
+
"module": "./chunks/DotLottiePlayerBase-BfEbTiu6.js"
|
|
98
98
|
}
|
|
99
99
|
},
|
|
100
100
|
{
|
package/dist/canvas.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { RendererType, PreserveAspectRatio } from '@aarsteinmedia/lottie-web/uti
|
|
|
2
2
|
export { PlayMode, PlayerEvent, RendererType } from '@aarsteinmedia/lottie-web/utils';
|
|
3
3
|
import * as _aarsteinmedia_lottie_web from '@aarsteinmedia/lottie-web';
|
|
4
4
|
import { AnimationConfiguration, Vector2 } from '@aarsteinmedia/lottie-web';
|
|
5
|
-
import { D as DotLottiePlayerBase } from './chunks/
|
|
6
|
-
export { M as MouseOut, P as PlayerState, t as tagName } from './chunks/
|
|
5
|
+
import { D as DotLottiePlayerBase } from './chunks/constants.d-D4NjmiZl.js';
|
|
6
|
+
export { M as MouseOut, P as PlayerState, t as tagName } from './chunks/constants.d-D4NjmiZl.js';
|
|
7
7
|
|
|
8
8
|
declare class DotLottiePlayerCanvas extends DotLottiePlayerBase {
|
|
9
9
|
get renderer(): RendererType;
|
package/dist/canvas.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { RendererType, isServer } from '@aarsteinmedia/lottie-web/utils';
|
|
2
2
|
export { PlayMode, PlayerEvent, RendererType } from '@aarsteinmedia/lottie-web/utils';
|
|
3
3
|
import { loadAnimation } from '@aarsteinmedia/lottie-web/canvas';
|
|
4
|
-
import { D as DotLottiePlayerBase, t as tagName } from './chunks/DotLottiePlayerBase-
|
|
5
|
-
export { M as MouseOut, P as PlayerState } from './chunks/DotLottiePlayerBase-
|
|
4
|
+
import { D as DotLottiePlayerBase, t as tagName } from './chunks/DotLottiePlayerBase-BfEbTiu6.js';
|
|
5
|
+
export { M as MouseOut, P as PlayerState } from './chunks/DotLottiePlayerBase-BfEbTiu6.js';
|
|
6
6
|
import '@aarsteinmedia/lottie-web/dotlottie';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -71,7 +71,7 @@ if (isServer) {
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
var css_248z = "*
|
|
74
|
+
var css_248z = "*{box-sizing:border-box}:host{--lottie-player-toolbar-height:35px;--lottie-player-toolbar-background-color:#fff;--lottie-player-toolbar-icon-color:#000;--lottie-player-toolbar-icon-hover-color:#000;--lottie-player-toolbar-icon-active-color:#4285f4;--lottie-player-seeker-track-color:#0003;--lottie-player-seeker-thumb-color:#4285f4;--lottie-player-seeker-display:block;height:100%;width:100%;&:not([hidden]){display:block}.main{display:flex;flex-direction:column;height:100%;margin:0;padding:0;width:100%}.animation{contain:content;display:flex;height:100%;margin:0;padding:0;width:100%;& svg g{will-change:transform}}[data-controls=true] .animation{height:calc(100% - 35px)}.animation-container{position:relative}.popover{animation:fade-in .2s ease-in-out;background-color:var(--lottie-player-toolbar-background-color);border:2px solid var(--lottie-player-toolbar-icon-color);border-radius:5px;bottom:40px;padding:10px 15px;position:absolute;right:5px;&:before{border:7px solid #0000;border-top:7px solid var(--lottie-player-toolbar-icon-color);content:\"\";height:0;margin-right:-7px;pointer-events:none;position:absolute;right:10px;top:100%;width:0}}.error{align-items:center;display:flex;height:100%;justify-content:center;margin:auto;& svg{height:auto;width:100%}}.toolbar{background:var(--lottie-player-toolbar-background-color);border-radius:5px;display:flex;gap:5px;height:35px;margin:0;padding:5px;place-items:center center;&.has-error{opacity:.5;pointer-events:none}& button{fill:var(--lottie-player-toolbar-icon-color);align-items:center;background:none;border:0;color:var(--lottie-player-toolbar-icon-color);cursor:pointer;gap:5px;height:100%;margin:0;opacity:.9;outline:0;padding:0;&:not([hidden]){display:flex}&:hover{opacity:1}&[data-active=true]{fill:var(--lottie-player-toolbar-icon-active-color);opacity:1}&:disabled{opacity:.5}&:focus{outline:0}& svg{pointer-events:none;&>*{fill:inherit}}&.disabled svg{display:none}}}.progress-container{position:relative;width:100%;&.simple{margin-right:12px}}& progress{appearance:none;background-color:var(--lottie-player-seeker-track-color);border:0;border-radius:3px;height:5px;left:0;margin:7.5px 0;outline:none;pointer-events:none;position:absolute;top:0;width:100%;&::-webkit-progress-inner-element{border-radius:3px;overflow:hidden}&::-webkit-slider-runnable-track{background-color:initial}&::-webkit-progress-value{background-color:var(--lottie-player-seeker-thumb-color)}}.seeker{appearance:none;background-color:initial;border:0;border-radius:3px;color:var(--lottie-player-seeker-thumb-color);cursor:pointer;display:var(--lottie-player-seeker-display);height:20px;margin:0;outline:none;padding:7.5px 0;position:relative;width:100%;z-index:1;&::-webkit-slider-runnable-track,&::-webkit-slider-thumb{appearance:none;outline:none}&::-webkit-slider-thumb{background-color:var(--lottie-player-seeker-thumb-color);border:0;border-radius:50%;cursor:pointer;height:15px;transform:scale(0);-webkit-transition:transform .2s ease-in-out;transition:transform .2s ease-in-out;width:15px}&:focus::-webkit-slider-thumb,&:hover::-webkit-slider-thumb{transform:scale(1)}&::-moz-range-progress{background-color:var(--lottie-player-seeker-thumb-color);border-radius:3px;height:5px}&::-moz-range-thumb{background-color:var(--lottie-player-seeker-thumb-color);border:0;border-radius:50%;cursor:pointer;height:15px;transform:scale(0);-moz-transition:transform .2s ease-in-out;transition:transform .2s ease-in-out;width:15px}&:focus::-moz-range-thumb,&:hover::-moz-range-thumb{transform:scale(1)}&::-ms-track{background:#0000;border-color:#0000;color:#0000;cursor:pointer;height:5px;width:100%}&::-ms-fill-upper{background:var(--lottie-player-seeker-track-color);border-radius:3px}&::-ms-fill-lower{background-color:var(--lottie-player-seeker-thumb-color);border-radius:3px}&::-ms-thumb{background:var(--lottie-player-seeker-thumb-color);border:0;border-radius:50%;cursor:pointer;height:15px;transform:scale(0);-ms-transition:transform .2s ease-in-out;transition:transform .2s ease-in-out;width:15px}&:hover::-ms-thumb{transform:scale(1)}&:focus{&::-ms-thumb{transform:scale(1)}&::-ms-fill-lower,&::-ms-fill-upper{background:var(--lottie-player-seeker-track-color)}}}& ::-moz-progress-bar{background-color:var(--lottie-player-seeker-thumb-color)}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@media (prefers-color-scheme:dark){:host{--lottie-player-toolbar-background-color:#000;--lottie-player-toolbar-icon-color:#fff;--lottie-player-toolbar-icon-hover-color:#fff;--lottie-player-seeker-track-color:#fff9}}";
|
|
75
75
|
|
|
76
76
|
let dotlottieTools = null, loadPromise = null;
|
|
77
77
|
function loadDotLottieTools() {
|
|
@@ -92,87 +92,25 @@ function loadDotLottieTools() {
|
|
|
92
92
|
return loadPromise;
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
const boomerangIcon = /* HTML */
|
|
96
|
-
<svg width="24" height="24" aria-hidden="true" focusable="false">
|
|
97
|
-
<path
|
|
98
|
-
d="m11.8 13.2-.3.3c-.5.5-1.1 1.1-1.7 1.5-.5.4-1 .6-1.5.8-.5.2-1.1.3-1.6.3s-1-.1-1.5-.3c-.6-.2-1-.5-1.4-1-.5-.6-.8-1.2-.9-1.9-.2-.9-.1-1.8.3-2.6.3-.7.8-1.2 1.3-1.6.3-.2.6-.4 1-.5.2-.2.5-.2.8-.3.3 0 .7-.1 1 0 .3 0 .6.1.9.2.9.3 1.7.9 2.4 1.5.4.4.8.7 1.1 1.1l.1.1.4-.4c.6-.6 1.2-1.2 1.9-1.6.5-.3 1-.6 1.5-.7.4-.1.7-.2 1-.2h.9c1 .1 1.9.5 2.6 1.4.4.5.7 1.1.8 1.8.2.9.1 1.7-.2 2.5-.4.9-1 1.5-1.8 2-.4.2-.7.4-1.1.4-.4.1-.8.1-1.2.1-.5 0-.9-.1-1.3-.3-.8-.3-1.5-.9-2.1-1.5-.4-.4-.8-.7-1.1-1.1h-.3zm-1.1-1.1c-.1-.1-.1-.1 0 0-.3-.3-.6-.6-.8-.9-.5-.5-1-.9-1.6-1.2-.4-.3-.8-.4-1.3-.4-.4 0-.8 0-1.1.2-.5.2-.9.6-1.1 1-.2.3-.3.7-.3 1.1 0 .3 0 .6.1.9.1.5.4.9.8 1.2.5.4 1.1.5 1.7.5.5 0 1-.2 1.5-.5.6-.4 1.1-.8 1.6-1.3.1-.3.3-.5.5-.6zM13 12c.5.5 1 1 1.5 1.4.5.5 1.1.9 1.9 1 .4.1.8 0 1.2-.1.3-.1.6-.3.9-.5.4-.4.7-.9.8-1.4.1-.5 0-.9-.1-1.4-.3-.8-.8-1.2-1.7-1.4-.4-.1-.8-.1-1.2 0-.5.1-1 .4-1.4.7-.5.4-1 .8-1.4 1.2-.2.2-.4.3-.5.5z"
|
|
99
|
-
/>
|
|
100
|
-
</svg>
|
|
101
|
-
`;
|
|
95
|
+
const boomerangIcon = /* HTML */ `<svg width="24" height="24" aria-hidden="true" focusable="false"><path d="m11.8 13.2-.3.3c-.5.5-1.1 1.1-1.7 1.5-.5.4-1 .6-1.5.8-.5.2-1.1.3-1.6.3s-1-.1-1.5-.3c-.6-.2-1-.5-1.4-1-.5-.6-.8-1.2-.9-1.9-.2-.9-.1-1.8.3-2.6.3-.7.8-1.2 1.3-1.6.3-.2.6-.4 1-.5.2-.2.5-.2.8-.3.3 0 .7-.1 1 0 .3 0 .6.1.9.2.9.3 1.7.9 2.4 1.5.4.4.8.7 1.1 1.1l.1.1.4-.4c.6-.6 1.2-1.2 1.9-1.6.5-.3 1-.6 1.5-.7.4-.1.7-.2 1-.2h.9c1 .1 1.9.5 2.6 1.4.4.5.7 1.1.8 1.8.2.9.1 1.7-.2 2.5-.4.9-1 1.5-1.8 2-.4.2-.7.4-1.1.4-.4.1-.8.1-1.2.1-.5 0-.9-.1-1.3-.3-.8-.3-1.5-.9-2.1-1.5-.4-.4-.8-.7-1.1-1.1h-.3zm-1.1-1.1c-.1-.1-.1-.1 0 0-.3-.3-.6-.6-.8-.9-.5-.5-1-.9-1.6-1.2-.4-.3-.8-.4-1.3-.4-.4 0-.8 0-1.1.2-.5.2-.9.6-1.1 1-.2.3-.3.7-.3 1.1 0 .3 0 .6.1.9.1.5.4.9.8 1.2.5.4 1.1.5 1.7.5.5 0 1-.2 1.5-.5.6-.4 1.1-.8 1.6-1.3.1-.3.3-.5.5-.6zM13 12c.5.5 1 1 1.5 1.4.5.5 1.1.9 1.9 1 .4.1.8 0 1.2-.1.3-.1.6-.3.9-.5.4-.4.7-.9.8-1.4.1-.5 0-.9-.1-1.4-.3-.8-.8-1.2-1.7-1.4-.4-.1-.8-.1-1.2 0-.5.1-1 .4-1.4.7-.5.4-1 .8-1.4 1.2-.2.2-.4.3-.5.5z"/></svg>`;
|
|
102
96
|
|
|
103
|
-
const convertIcon = /* HTML */
|
|
104
|
-
<svg
|
|
105
|
-
width="24"
|
|
106
|
-
height="24"
|
|
107
|
-
aria-hidden="true"
|
|
108
|
-
focusable="false"
|
|
109
|
-
>
|
|
110
|
-
<path
|
|
111
|
-
d="M17.016 17.016v-4.031h1.969v6h-12v3l-3.984-3.984 3.984-3.984v3h10.031zM6.984 6.984v4.031H5.015v-6h12v-3l3.984 3.984-3.984 3.984v-3H6.984z"
|
|
112
|
-
/>
|
|
113
|
-
</svg>
|
|
114
|
-
`;
|
|
97
|
+
const convertIcon = /* HTML */ `<svg width="24" height="24" aria-hidden="true" focusable="false"><path d="M17.016 17.016v-4.031h1.969v6h-12v3l-3.984-3.984 3.984-3.984v3h10.031zM6.984 6.984v4.031H5.015v-6h12v-3l3.984 3.984-3.984 3.984v-3H6.984z"/></svg>`;
|
|
115
98
|
|
|
116
|
-
const downloadIcon = /* HTML */
|
|
117
|
-
<svg
|
|
118
|
-
width="24"
|
|
119
|
-
height="24"
|
|
120
|
-
aria-hidden="true"
|
|
121
|
-
focusable="false"
|
|
122
|
-
>
|
|
123
|
-
<path
|
|
124
|
-
d="M16.8 10.8 12 15.6l-4.8-4.8h3V3.6h3.6v7.2h3zM12 15.6H3v4.8h18v-4.8h-9zm7.8 2.4h-2.4v-1.2h2.4V18z"
|
|
125
|
-
/>
|
|
126
|
-
</svg>
|
|
127
|
-
`;
|
|
99
|
+
const downloadIcon = /* HTML */ `<svg width="24" height="24" aria-hidden="true" focusable="false"><path d="M16.8 10.8 12 15.6l-4.8-4.8h3V3.6h3.6v7.2h3zM12 15.6H3v4.8h18v-4.8h-9zm7.8 2.4h-2.4v-1.2h2.4V18z"/></svg>`;
|
|
128
100
|
|
|
129
|
-
const loopIcon = /* HTML */
|
|
130
|
-
<svg width="24" height="24" aria-hidden="true" focusable="false">
|
|
131
|
-
<path
|
|
132
|
-
d="M17.016 17.016v-4.031h1.969v6h-12v3l-3.984-3.984 3.984-3.984v3h10.031zM6.984 6.984v4.031H5.015v-6h12v-3l3.984 3.984-3.984 3.984v-3H6.984z"
|
|
133
|
-
/>
|
|
134
|
-
</svg>
|
|
135
|
-
`;
|
|
101
|
+
const loopIcon = /* HTML */ `<svg width="24" height="24" aria-hidden="true" focusable="false"><path d="M17.016 17.016v-4.031h1.969v6h-12v3l-3.984-3.984 3.984-3.984v3h10.031zM6.984 6.984v4.031H5.015v-6h12v-3l3.984 3.984-3.984 3.984v-3H6.984z"/></svg>`;
|
|
136
102
|
|
|
137
|
-
const nextIcon = /* HTML */
|
|
138
|
-
<svg width="24" height="24" aria-hidden="true" focusable="false">
|
|
139
|
-
<path d="m6.1 5.8 9.8 6.2-9.8 6.2V5.8zM16.4 5.8h1.5v12.4h-1.5z" />
|
|
140
|
-
</svg>
|
|
141
|
-
`;
|
|
103
|
+
const nextIcon = /* HTML */ `<svg width="24" height="24" aria-hidden="true" focusable="false"><path d="m6.1 5.8 9.8 6.2-9.8 6.2V5.8zM16.4 5.8h1.5v12.4h-1.5z"/></svg>`;
|
|
142
104
|
|
|
143
|
-
const pauseIcon = /* HTML */
|
|
144
|
-
<svg width="24" height="24" aria-hidden="true" focusable="false">
|
|
145
|
-
<path
|
|
146
|
-
d="M14.016 5.016H18v13.969h-3.984V5.016zM6 18.984V5.015h3.984v13.969H6z"
|
|
147
|
-
/>
|
|
148
|
-
</svg>
|
|
149
|
-
`;
|
|
105
|
+
const pauseIcon = /* HTML */ `<svg width="24" height="24" aria-hidden="true" focusable="false"><path d="M14.016 5.016H18v13.969h-3.984V5.016zM6 18.984V5.015h3.984v13.969H6z"/></svg>`;
|
|
150
106
|
|
|
151
|
-
const playIcon = /* HTML */
|
|
152
|
-
<svg width="24" height="24" aria-hidden="true" focusable="false">
|
|
153
|
-
<path d="M8.016 5.016L18.985 12 8.016 18.984V5.015z" />
|
|
154
|
-
</svg>
|
|
155
|
-
`;
|
|
107
|
+
const playIcon = /* HTML */ `<svg width="24" height="24" aria-hidden="true" focusable="false"><path d="M8.016 5.016L18.985 12 8.016 18.984V5.015z"/></svg>`;
|
|
156
108
|
|
|
157
|
-
const prevIcon = /* HTML */
|
|
158
|
-
<svg width="24" height="24" aria-hidden="true" focusable="false">
|
|
159
|
-
<path d="M17.9 18.2 8.1 12l9.8-6.2v12.4zm-10.3 0H6.1V5.8h1.5v12.4z" />
|
|
160
|
-
</svg>
|
|
161
|
-
`;
|
|
109
|
+
const prevIcon = /* HTML */ `<svg width="24" height="24" aria-hidden="true" focusable="false"><path d="M17.9 18.2 8.1 12l9.8-6.2v12.4zm-10.3 0H6.1V5.8h1.5v12.4z"/></svg>`;
|
|
162
110
|
|
|
163
|
-
const settingsIcon = /* HTML */
|
|
164
|
-
<svg width="24" height="24" aria-hidden="true" focusable="false">
|
|
165
|
-
<circle cx="12" cy="5.4" r="2.5" />
|
|
166
|
-
<circle cx="12" cy="12" r="2.5" />
|
|
167
|
-
<circle cx="12" cy="18.6" r="2.5" />
|
|
168
|
-
</svg>
|
|
169
|
-
`;
|
|
111
|
+
const settingsIcon = /* HTML */ `<svg width="24" height="24" aria-hidden="true" focusable="false"><circle cx="12" cy="5.4" r="2.5"/><circle cx="12" cy="12" r="2.5"/><circle cx="12" cy="18.6" r="2.5"/></svg>`;
|
|
170
112
|
|
|
171
|
-
const stopIcon = /* HTML */
|
|
172
|
-
<svg width="24" height="24" aria-hidden="true" focusable="false">
|
|
173
|
-
<path d="M6 6h12v12H6V6z" />
|
|
174
|
-
</svg>
|
|
175
|
-
`;
|
|
113
|
+
const stopIcon = /* HTML */ `<svg width="24" height="24" aria-hidden="true" focusable="false"><path d="M6 6h12v12H6V6z"/></svg>`;
|
|
176
114
|
|
|
177
115
|
var ObjectFit = /*#__PURE__*/ function(ObjectFit) {
|
|
178
116
|
ObjectFit["Contain"] = "contain";
|
|
@@ -200,7 +138,6 @@ var PlayerState = /*#__PURE__*/ function(PlayerState) {
|
|
|
200
138
|
PlayerState["Stopped"] = "stopped";
|
|
201
139
|
return PlayerState;
|
|
202
140
|
}({});
|
|
203
|
-
const tagName = 'dotlottie-player';
|
|
204
141
|
|
|
205
142
|
function advancedButtons() {
|
|
206
143
|
if (!this.shadow) {
|
|
@@ -324,9 +261,7 @@ var controls = /*#__PURE__*/Object.freeze({
|
|
|
324
261
|
const lang = this.description ? document.documentElement.lang : 'en';
|
|
325
262
|
langAttribute = `lang="${lang}"`;
|
|
326
263
|
}
|
|
327
|
-
this.template.innerHTML = /* HTML */ `<div class="animation-container main" data-controls="${this.controls ?? false}" ${langAttribute}><figure class="animation" style="background:${this.background}" ${this.description ?
|
|
328
|
-
aria-label="${this.description}"
|
|
329
|
-
` : ''}></figure><slot name="controls"></slot></div>`;
|
|
264
|
+
this.template.innerHTML = /* HTML */ `<div class="animation-container main" data-controls="${this.controls ?? false}" ${langAttribute}><figure class="animation" style="background:${this.background}" ${this.description ? `aria-label="${this.description}"` : ''}></figure><slot name="controls"></slot></div>`;
|
|
330
265
|
this.shadow.adoptedStyleSheets = [
|
|
331
266
|
await DotLottiePlayerBase.styles()
|
|
332
267
|
];
|
|
@@ -397,6 +332,8 @@ var controls = /*#__PURE__*/Object.freeze({
|
|
|
397
332
|
'1'
|
|
398
333
|
].includes(val);
|
|
399
334
|
|
|
335
|
+
const tagName = 'dotlottie-player', hasReducedMotion = !isServer && matchMedia('(prefers-reduced-motion: reduce)').matches, hasIOSupport = !isServer && 'IntersectionObserver' in window, hasVTSupport = !isServer && 'ViewTimeline' in window;
|
|
336
|
+
|
|
400
337
|
const notImplemented = 'Method is not implemented', getStyles = async ()=>{
|
|
401
338
|
const styleSheet = new CSSStyleSheet();
|
|
402
339
|
await styleSheet.replace(css_248z);
|
|
@@ -815,7 +752,7 @@ const notImplemented = 'Method is not implemented', getStyles = async ()=>{
|
|
|
815
752
|
}
|
|
816
753
|
case 'autoplay':
|
|
817
754
|
{
|
|
818
|
-
if (this.animateOnScroll || this.playOnVisible) {
|
|
755
|
+
if (this.animateOnScroll || this.playOnVisible || hasReducedMotion) {
|
|
819
756
|
return;
|
|
820
757
|
}
|
|
821
758
|
if (value === '' || Boolean(value)) {
|
|
@@ -1416,12 +1353,13 @@ const notImplemented = 'Method is not implemented', getStyles = async ()=>{
|
|
|
1416
1353
|
/**
|
|
1417
1354
|
* Add IntersectionObserver.
|
|
1418
1355
|
*/ _addIntersectionObserver() {
|
|
1419
|
-
if (!this._container || this._intersectionObserver) {
|
|
1356
|
+
if (!this._container || this._intersectionObserver || !hasIOSupport) {
|
|
1420
1357
|
return;
|
|
1421
1358
|
}
|
|
1422
1359
|
this._intersectionObserver = new IntersectionObserver(([{ isIntersecting }])=>{
|
|
1423
1360
|
this._isIntersecting = isIntersecting;
|
|
1424
|
-
|
|
1361
|
+
// Prevent animate on scroll for users with who prefers reduces motion.
|
|
1362
|
+
if (this.animateOnScroll && !hasReducedMotion) {
|
|
1425
1363
|
if (isIntersecting) {
|
|
1426
1364
|
this._startScrollLoop();
|
|
1427
1365
|
} else {
|
|
@@ -1438,7 +1376,7 @@ const notImplemented = 'Method is not implemented', getStyles = async ()=>{
|
|
|
1438
1376
|
if (!this.playOnVisible && this.playerState === PlayerState.Frozen) {
|
|
1439
1377
|
this.play();
|
|
1440
1378
|
}
|
|
1441
|
-
if (!this.playOnVisible) {
|
|
1379
|
+
if (!this.playOnVisible || hasReducedMotion) {
|
|
1442
1380
|
return;
|
|
1443
1381
|
}
|
|
1444
1382
|
if (this.playerState === PlayerState.Completed && !this.once) {
|
|
@@ -1552,7 +1490,8 @@ const notImplemented = 'Method is not implemented', getStyles = async ()=>{
|
|
|
1552
1490
|
if (currentAnimationSettings?.autoplay !== undefined) {
|
|
1553
1491
|
hasAutoplay = Boolean(currentAnimationSettings.autoplay);
|
|
1554
1492
|
}
|
|
1555
|
-
|
|
1493
|
+
// Disable autoplay on reduced-motion.
|
|
1494
|
+
if (this.animateOnScroll || hasReducedMotion) {
|
|
1556
1495
|
hasAutoplay = false;
|
|
1557
1496
|
}
|
|
1558
1497
|
// Segment
|
|
@@ -1579,7 +1518,7 @@ const notImplemented = 'Method is not implemented', getStyles = async ()=>{
|
|
|
1579
1518
|
if (!this._container) {
|
|
1580
1519
|
return null;
|
|
1581
1520
|
}
|
|
1582
|
-
if (
|
|
1521
|
+
if (hasVTSupport) {
|
|
1583
1522
|
this._scrollProbe ??= this._container.animate({
|
|
1584
1523
|
'--dotlottie-scroll': [
|
|
1585
1524
|
0,
|
|
@@ -1690,7 +1629,7 @@ const notImplemented = 'Method is not implemented', getStyles = async ()=>{
|
|
|
1690
1629
|
/**
|
|
1691
1630
|
* Handle MouseEnter.
|
|
1692
1631
|
*/ _mouseEnter() {
|
|
1693
|
-
if (!this.hover || !this._lottieInstance || isTouch()) {
|
|
1632
|
+
if (!this.hover || !this._lottieInstance || isTouch() || hasReducedMotion) {
|
|
1694
1633
|
return;
|
|
1695
1634
|
}
|
|
1696
1635
|
if (this.mouseout === MouseOut.Reverse) {
|
|
@@ -1708,7 +1647,7 @@ const notImplemented = 'Method is not implemented', getStyles = async ()=>{
|
|
|
1708
1647
|
/**
|
|
1709
1648
|
* Handle MouseLeave.
|
|
1710
1649
|
*/ _mouseLeave() {
|
|
1711
|
-
if (!this.hover || !this._lottieInstance || isTouch()) {
|
|
1650
|
+
if (!this.hover || !this._lottieInstance || isTouch() || hasReducedMotion) {
|
|
1712
1651
|
return;
|
|
1713
1652
|
}
|
|
1714
1653
|
switch(this.mouseout){
|
|
@@ -25,7 +25,6 @@ declare enum PlayerState {
|
|
|
25
25
|
Playing = "playing",
|
|
26
26
|
Stopped = "stopped"
|
|
27
27
|
}
|
|
28
|
-
declare const tagName = "dotlottie-player";
|
|
29
28
|
|
|
30
29
|
declare abstract class DotLottiePlayerBase extends PropertyCallbackElement {
|
|
31
30
|
static get observedAttributes(): readonly ["animateOnScroll", "autoplay", "controls", "direction", "hover", "loop", "mode", "playOnClick", "playOnVisible", "selector", "speed", "src", "subframe"];
|
|
@@ -194,4 +193,6 @@ declare abstract class DotLottiePlayerBase extends PropertyCallbackElement {
|
|
|
194
193
|
private _toggleSettings;
|
|
195
194
|
}
|
|
196
195
|
|
|
196
|
+
declare const tagName = "dotlottie-player";
|
|
197
|
+
|
|
197
198
|
export { DotLottiePlayerBase as D, MouseOut as M, PlayerState as P, tagName as t };
|
package/dist/full.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { RendererType, PreserveAspectRatio } from '@aarsteinmedia/lottie-web/uti
|
|
|
2
2
|
export { PlayMode, PlayerEvent, RendererType } from '@aarsteinmedia/lottie-web/utils';
|
|
3
3
|
import * as _aarsteinmedia_lottie_web from '@aarsteinmedia/lottie-web';
|
|
4
4
|
import { AddAnimationParams, ConvertParams, AnimationConfiguration, Vector2 } from '@aarsteinmedia/lottie-web';
|
|
5
|
-
import { D as DotLottiePlayerBase } from './chunks/
|
|
6
|
-
export { M as MouseOut, P as PlayerState, t as tagName } from './chunks/
|
|
5
|
+
import { D as DotLottiePlayerBase } from './chunks/constants.d-D4NjmiZl.js';
|
|
6
|
+
export { M as MouseOut, P as PlayerState, t as tagName } from './chunks/constants.d-D4NjmiZl.js';
|
|
7
7
|
|
|
8
8
|
declare class DotLottiePlayer extends DotLottiePlayerBase {
|
|
9
9
|
addAnimation(params: AddAnimationParams): Promise<_aarsteinmedia_lottie_web.Result>;
|
package/dist/full.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { RendererType, isServer } from '@aarsteinmedia/lottie-web/utils';
|
|
2
2
|
export { PlayMode, PlayerEvent, RendererType } from '@aarsteinmedia/lottie-web/utils';
|
|
3
3
|
import { loadAnimation } from '@aarsteinmedia/lottie-web';
|
|
4
|
-
import { D as DotLottiePlayerBase, l as loadDotLottieTools, t as tagName } from './chunks/DotLottiePlayerBase-
|
|
5
|
-
export { M as MouseOut, P as PlayerState } from './chunks/DotLottiePlayerBase-
|
|
4
|
+
import { D as DotLottiePlayerBase, l as loadDotLottieTools, t as tagName } from './chunks/DotLottiePlayerBase-BfEbTiu6.js';
|
|
5
|
+
export { M as MouseOut, P as PlayerState } from './chunks/DotLottiePlayerBase-BfEbTiu6.js';
|
|
6
6
|
import '@aarsteinmedia/lottie-web/dotlottie';
|
|
7
7
|
|
|
8
8
|
/**
|
package/dist/light.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { RendererType, PreserveAspectRatio } from '@aarsteinmedia/lottie-web/uti
|
|
|
2
2
|
export { PlayMode, PlayerEvent, RendererType } from '@aarsteinmedia/lottie-web/utils';
|
|
3
3
|
import * as _aarsteinmedia_lottie_web from '@aarsteinmedia/lottie-web';
|
|
4
4
|
import { AnimationConfiguration, Vector2 } from '@aarsteinmedia/lottie-web';
|
|
5
|
-
import { D as DotLottiePlayerBase } from './chunks/
|
|
6
|
-
export { M as MouseOut, P as PlayerState, t as tagName } from './chunks/
|
|
5
|
+
import { D as DotLottiePlayerBase } from './chunks/constants.d-D4NjmiZl.js';
|
|
6
|
+
export { M as MouseOut, P as PlayerState, t as tagName } from './chunks/constants.d-D4NjmiZl.js';
|
|
7
7
|
|
|
8
8
|
declare class DotLottiePlayerLight extends DotLottiePlayerBase {
|
|
9
9
|
get renderer(): RendererType;
|
package/dist/light.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { RendererType, isServer } from '@aarsteinmedia/lottie-web/utils';
|
|
2
2
|
export { PlayMode, PlayerEvent, RendererType } from '@aarsteinmedia/lottie-web/utils';
|
|
3
3
|
import { loadAnimation } from '@aarsteinmedia/lottie-web/light';
|
|
4
|
-
import { D as DotLottiePlayerBase, t as tagName } from './chunks/DotLottiePlayerBase-
|
|
5
|
-
export { M as MouseOut, P as PlayerState } from './chunks/DotLottiePlayerBase-
|
|
4
|
+
import { D as DotLottiePlayerBase, t as tagName } from './chunks/DotLottiePlayerBase-BfEbTiu6.js';
|
|
5
|
+
export { M as MouseOut, P as PlayerState } from './chunks/DotLottiePlayerBase-BfEbTiu6.js';
|
|
6
6
|
import '@aarsteinmedia/lottie-web/dotlottie';
|
|
7
7
|
|
|
8
8
|
/**
|
package/dist/svg.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { RendererType, PreserveAspectRatio } from '@aarsteinmedia/lottie-web/uti
|
|
|
2
2
|
export { PlayMode, PlayerEvent, RendererType } from '@aarsteinmedia/lottie-web/utils';
|
|
3
3
|
import * as _aarsteinmedia_lottie_web from '@aarsteinmedia/lottie-web';
|
|
4
4
|
import { AnimationConfiguration, Vector2 } from '@aarsteinmedia/lottie-web';
|
|
5
|
-
import { D as DotLottiePlayerBase } from './chunks/
|
|
6
|
-
export { M as MouseOut, P as PlayerState, t as tagName } from './chunks/
|
|
5
|
+
import { D as DotLottiePlayerBase } from './chunks/constants.d-D4NjmiZl.js';
|
|
6
|
+
export { M as MouseOut, P as PlayerState, t as tagName } from './chunks/constants.d-D4NjmiZl.js';
|
|
7
7
|
|
|
8
8
|
declare class DotLottiePlayerSVG extends DotLottiePlayerBase {
|
|
9
9
|
get renderer(): RendererType;
|
package/dist/svg.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { RendererType, isServer } from '@aarsteinmedia/lottie-web/utils';
|
|
2
2
|
export { PlayMode, PlayerEvent, RendererType } from '@aarsteinmedia/lottie-web/utils';
|
|
3
3
|
import { loadAnimation } from '@aarsteinmedia/lottie-web/svg';
|
|
4
|
-
import { D as DotLottiePlayerBase, t as tagName } from './chunks/DotLottiePlayerBase-
|
|
5
|
-
export { M as MouseOut, P as PlayerState } from './chunks/DotLottiePlayerBase-
|
|
4
|
+
import { D as DotLottiePlayerBase, t as tagName } from './chunks/DotLottiePlayerBase-BfEbTiu6.js';
|
|
5
|
+
export { M as MouseOut, P as PlayerState } from './chunks/DotLottiePlayerBase-BfEbTiu6.js';
|
|
6
6
|
import '@aarsteinmedia/lottie-web/dotlottie';
|
|
7
7
|
|
|
8
8
|
/**
|