@aarsteinmedia/dotlottie-player 2.5.11 → 2.5.13

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/dist/cjs/index.js CHANGED
@@ -5,8 +5,6 @@ var decorators_js = require('lit/decorators.js');
5
5
  var Lottie = require('lottie-web');
6
6
  var fflate = require('fflate');
7
7
 
8
- var name="@aarsteinmedia/dotlottie-player";var version="2.5.11";var description="Web Component for playing Lottie animations in your web app. Previously @johanaarstein/dotlottie-player";var exports$1={".":{"import":"./dist/esm/index.js",node:"./dist/esm/index.js",require:"./dist/cjs/index.js",types:"./dist/index.d.ts"}};var main="./dist/esm/index.js";var unpkg="./dist/index.js";var module$1="./dist/esm/index.js";var types="./dist/index.d.ts";var type="module";var homepage="https://www.aarstein.media/en/dotlottie-player";var repository={url:"https://github.com/aarsteinmedia/dotlottie-player.git",type:"git"};var bugs="https://github.com/aarsteinmedia/dotlottie-player/issues";var author={name:"Johan Martin Aarstein",email:"johan@aarstein.media",url:"https://www.aarstein.media",organization:"Aarstein Media"};var license="GPL-2.0-or-later";var scripts={build:"rimraf ./dist && rollup -c","build:types":"rimraf ./types && tsc","build:cem":"npx cem analyze --config cem.config.mjs",prod:"pnpm build:types && pnpm build && pnpm build:cem",dev:"rollup -c -w --environment NODE_ENV:development",lint:"tsc && eslint . --ext .ts","lint:fix":"eslint . --ext .ts --fix"};var dependencies={fflate:"^0.8.2",lit:"^3.1.3","lottie-web":"^5.12.2"};var peerDependencies={"@types/react":">= 16.0.0"};var devDependencies={"@custom-elements-manifest/analyzer":"^0.9.9","@rollup/plugin-commonjs":"^25.0.8","@rollup/plugin-json":"^6.1.0","@rollup/plugin-node-resolve":"^15.2.3","@rollup/plugin-replace":"^5.0.5","@swc/core":"^1.5.24","@types/node":"^20.14.1","@typescript-eslint/eslint-plugin":"^7.12.0","@typescript-eslint/parser":"^7.12.0",autoprefixer:"^10.4.19","esbuild-sass-plugin":"^3.3.0",eslint:"^8.57.0","eslint-import-resolver-typescript":"^3.6.1","eslint-plugin-import":"^2.29.1","eslint-plugin-jsdoc":"^48.2.7","eslint-plugin-lit":"^1.14.0","postcss-flexbugs-fixes":"^5.0.2",rimraf:"^5.0.7",rollup:"^4.18.0","rollup-plugin-dts":"^6.1.1","rollup-plugin-html-literals":"^1.1.8","rollup-plugin-livereload":"^2.0.5","rollup-plugin-postcss":"^4.0.2","rollup-plugin-postcss-lit":"^2.1.0","rollup-plugin-serve":"^1.1.1","rollup-plugin-summary":"^2.0.1","rollup-plugin-swc3":"^0.11.2",sass:"^1.77.4","ts-lit-plugin":"^2.0.2",typescript:"^5.4.5"};var customElements="dist/custom-elements.json";var files=["dist","README.md"];var keywords=["lottie","dotlottie","animation","web component","component","lit-element","svg","vector","player"];var publishConfig={access:"public"};var engines={node:">= 8.17.0"};var funding={type:"paypal",url:"https://www.paypal.com/donate/?hosted_button_id=E7C7DMN8KSQ6A"};var pkg = {name:name,version:version,description:description,exports:exports$1,main:main,unpkg:unpkg,module:module$1,types:types,type:type,homepage:homepage,repository:repository,bugs:bugs,author:author,license:license,scripts:scripts,dependencies:dependencies,peerDependencies:peerDependencies,devDependencies:devDependencies,customElements:customElements,files:files,keywords:keywords,publishConfig:publishConfig,engines:engines,funding:funding};
9
-
10
8
  exports.PlayerState = void 0;
11
9
  (function(PlayerState) {
12
10
  PlayerState["Completed"] = "completed";
@@ -239,15 +237,9 @@ const addExt = (ext, str)=>{
239
237
  return;
240
238
  }
241
239
  const ext = str.split('.').pop()?.toLowerCase();
242
- if (ext === 'jpeg') {
243
- return 'jpg';
244
- }
245
240
  return ext;
246
241
  }, getExtFromB64 = (str)=>{
247
242
  const mime = str.split(':')[1].split(';')[0], ext = mime.split('/')[1].split('+')[0];
248
- if (ext === 'jpeg') {
249
- return 'jpg';
250
- }
251
243
  return ext;
252
244
  }, getFilename = (src, keepExt)=>{
253
245
  getExt(src);
@@ -357,6 +349,8 @@ const addExt = (ext, str)=>{
357
349
 
358
350
  var css_248z = lit.css`*{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:rgba(0, 0, 0, 0.2);--lottie-player-seeker-thumb-color:#4285f4;--lottie-player-seeker-display:block;display:block;width:100%;height:100%}@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:rgba(255, 255, 255, 0.6)}}.main{display:flex;flex-direction:column;height:100%;width:100%;margin:0;padding:0}.animation{width:100%;height:100%;display:flex}[data-controls=true] .animation{height:calc(100% - 35px)}.animation-container{position:relative}.popover{position:absolute;right:5px;bottom:40px;background-color:var(--lottie-player-toolbar-background-color);border-radius:5px;padding:10px 15px;border:solid 2px var(--lottie-player-toolbar-icon-color);animation:fadeIn .2s ease-in-out}.popover::before{content:"";right:10px;border:7px solid transparent;border-top-color:transparent;margin-right:-7px;height:0;width:0;position:absolute;pointer-events:none;top:100%;border-top-color:var(--lottie-player-toolbar-icon-color)}.toolbar{display:flex;align-items:center;justify-items:center;background:var(--lottie-player-toolbar-background-color);margin:0;height:35px;padding:5px;border-radius:5px;gap:5px}.toolbar.has-error{pointer-events:none;opacity:.5}.toolbar button{cursor:pointer;fill:var(--lottie-player-toolbar-icon-color);color:var(--lottie-player-toolbar-icon-color);display:flex;background:0 0;border:0;padding:0;outline:0;height:100%;margin:0;align-items:center;gap:5px;opacity:.9}.toolbar button:hover{opacity:1}.toolbar button[data-active=true]{opacity:1;fill:var(--lottie-player-toolbar-icon-active-color)}.toolbar button:disabled{opacity:.5}.toolbar button:focus{outline:0}.toolbar button svg{pointer-events:none}.toolbar button svg>*{fill:inherit}.toolbar button.disabled svg{display:none}.progress-container{position:relative;width:100%}.progress-container.simple{margin-right:12px}.seeker{-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:0}.seeker::-webkit-slider-runnable-track,.seeker::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;outline:0}progress{-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:0}.seeker{width:100%;height:20px;border-radius:3px;border:0;cursor:pointer;background-color:transparent;display:var(--lottie-player-seeker-display);color:var(--lottie-player-seeker-thumb-color);margin:0;padding:7.5px 0;position:relative;z-index:1}progress{position:absolute;width:100%;height:5px;border-radius:3px;border:0;top:0;left:0;margin:7.5px 0;background-color:var(--lottie-player-seeker-track-color);pointer-events:none}::-moz-progress-bar{background-color:var(--lottie-player-seeker-thumb-color)}::-webkit-progress-inner-element{border-radius:3px;overflow:hidden}::-webkit-slider-runnable-track{background-color:transparent}::-webkit-progress-value{background-color:var(--lottie-player-seeker-thumb-color)}.seeker::-webkit-slider-thumb{height:15px;width:15px;border-radius:50%;border:0;background-color:var(--lottie-player-seeker-thumb-color);cursor:pointer;-webkit-transition:transform .2s ease-in-out;transition:transform .2s ease-in-out;transform:scale(0)}.seeker:focus::-webkit-slider-thumb,.seeker:hover::-webkit-slider-thumb{transform:scale(1)}.seeker::-moz-range-progress{background-color:var(--lottie-player-seeker-thumb-color);height:5px;border-radius:3px}.seeker::-moz-range-thumb{height:15px;width:15px;border-radius:50%;background-color:var(--lottie-player-seeker-thumb-color);border:0;cursor:pointer;-moz-transition:transform .2s ease-in-out;transition:transform .2s ease-in-out;transform:scale(0)}.seeker:focus::-moz-range-thumb,.seeker:hover::-moz-range-thumb{transform:scale(1)}.seeker::-ms-track{width:100%;height:5px;cursor:pointer;background:0 0;border-color:transparent;color:transparent}.seeker::-ms-fill-upper{background:var(--lottie-player-seeker-track-color);border-radius:3px}.seeker::-ms-fill-lower{background-color:var(--lottie-player-seeker-thumb-color);border-radius:3px}.seeker::-ms-thumb{border:0;height:15px;width:15px;border-radius:50%;background:var(--lottie-player-seeker-thumb-color);cursor:pointer;-ms-transition:transform .2s ease-in-out;transition:transform .2s ease-in-out;transform:scale(0)}.seeker:hover::-ms-thumb{transform:scale(1)}.seeker:focus::-ms-thumb{transform:scale(1)}.seeker:focus::-ms-fill-lower,.seeker:focus::-ms-fill-upper{background:var(--lottie-player-seeker-track-color)}.error{display:flex;margin:auto;justify-content:center;height:100%;align-items:center}.error svg{width:100%;height:auto}@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}`;
359
351
 
352
+ var name="@aarsteinmedia/dotlottie-player";var version="2.5.12";var description="Web Component for playing Lottie animations in your web app. Previously @johanaarstein/dotlottie-player";var exports$1={".":{"import":"./dist/esm/index.js",node:"./dist/esm/index.js",require:"./dist/cjs/index.js",types:"./dist/index.d.ts"}};var main="./dist/esm/index.js";var unpkg="./dist/index.js";var module$1="./dist/esm/index.js";var types="./dist/index.d.ts";var type="module";var homepage="https://www.aarstein.media/en/dotlottie-player";var repository={url:"https://github.com/aarsteinmedia/dotlottie-player.git",type:"git"};var bugs="https://github.com/aarsteinmedia/dotlottie-player/issues";var author={name:"Johan Martin Aarstein",email:"johan@aarstein.media",url:"https://www.aarstein.media",organization:"Aarstein Media"};var license="GPL-2.0-or-later";var scripts={build:"rimraf ./dist && rollup -c","build:types":"rimraf ./types && tsc","build:cem":"npx cem analyze --config cem.config.mjs",prod:"pnpm build:types && pnpm build && pnpm build:cem",dev:"rollup -c -w --environment NODE_ENV:development",lint:"tsc && eslint . --ext .ts","lint:fix":"eslint . --ext .ts --fix"};var dependencies={fflate:"^0.8.2",lit:"^3.1.4","lottie-web":"^5.12.2"};var peerDependencies={"@types/react":">= 16.0.0"};var devDependencies={"@custom-elements-manifest/analyzer":"^0.9.9","@rollup/plugin-commonjs":"^25.0.8","@rollup/plugin-json":"^6.1.0","@rollup/plugin-node-resolve":"^15.2.3","@rollup/plugin-replace":"^5.0.7","@rollup/plugin-typescript":"^11.1.6","@swc/core":"^1.5.28","@types/node":"^20.14.2","@typescript-eslint/eslint-plugin":"^7.13.0","@typescript-eslint/parser":"^7.13.0",autoprefixer:"^10.4.19","esbuild-sass-plugin":"^3.3.1",eslint:"^8.57.0","eslint-import-resolver-typescript":"^3.6.1","eslint-plugin-import":"^2.29.1","eslint-plugin-jsdoc":"^48.2.9","eslint-plugin-lit":"^1.14.0","postcss-flexbugs-fixes":"^5.0.2",rimraf:"^5.0.7",rollup:"^4.18.0","rollup-plugin-dts":"^6.1.1","rollup-plugin-html-literals":"^1.1.8","rollup-plugin-livereload":"^2.0.5","rollup-plugin-postcss":"^4.0.2","rollup-plugin-postcss-lit":"^2.1.0","rollup-plugin-serve":"^1.1.1","rollup-plugin-summary":"^2.0.1","rollup-plugin-swc3":"^0.11.2",sass:"^1.77.5","ts-lit-plugin":"^2.0.2",tslib:"^2.6.3",typescript:"^5.4.5"};var customElements="dist/custom-elements.json";var files=["dist","README.md"];var keywords=["lottie","dotlottie","animation","web component","component","lit-element","svg","vector","player"];var publishConfig={access:"public"};var engines={node:">= 8.17.0"};var funding={type:"paypal",url:"https://www.paypal.com/donate/?hosted_button_id=E7C7DMN8KSQ6A"};var pkg = {name:name,version:version,description:description,exports:exports$1,main:main,unpkg:unpkg,module:module$1,types:types,type:type,homepage:homepage,repository:repository,bugs:bugs,author:author,license:license,scripts:scripts,dependencies:dependencies,peerDependencies:peerDependencies,devDependencies:devDependencies,customElements:customElements,files:files,keywords:keywords,publishConfig:publishConfig,engines:engines,funding:funding};
353
+
360
354
  function _ts_decorate(decorators, target, key, desc) {
361
355
  var c = arguments.length, r = c < 3 ? target : desc, d;
362
356
  if (typeof Reflect === "object" && typeof undefined === "function") r = undefined(decorators, target, key, desc);
@@ -532,11 +526,11 @@ class DotLottiePlayer extends lit.LitElement {
532
526
  }
533
527
  addEventListener('focus', this._handleWindowBlur, {
534
528
  passive: true,
535
- capture: true
529
+ capture: false
536
530
  });
537
531
  addEventListener('blur', this._handleWindowBlur, {
538
532
  passive: true,
539
- capture: true
533
+ capture: false
540
534
  });
541
535
  if (this.animateOnScroll) {
542
536
  addEventListener('scroll', this._handleScroll, {
@@ -4,46 +4,7 @@
4
4
  "modules": [
5
5
  {
6
6
  "kind": "javascript-module",
7
- "path": "src/index.ts",
8
- "declarations": [],
9
- "exports": [
10
- {
11
- "kind": "js",
12
- "name": "DotLottiePlayer",
13
- "declaration": {
14
- "name": "DotLottiePlayer",
15
- "module": "src/index.ts"
16
- }
17
- },
18
- {
19
- "kind": "js",
20
- "name": "PlayMode",
21
- "declaration": {
22
- "name": "PlayMode",
23
- "module": "./component/utils"
24
- }
25
- },
26
- {
27
- "kind": "js",
28
- "name": "PlayerEvents",
29
- "declaration": {
30
- "name": "PlayerEvents",
31
- "module": "./component/utils"
32
- }
33
- },
34
- {
35
- "kind": "js",
36
- "name": "PlayerState",
37
- "declaration": {
38
- "name": "PlayerState",
39
- "module": "./component/utils"
40
- }
41
- }
42
- ]
43
- },
44
- {
45
- "kind": "javascript-module",
46
- "path": "src/component/index.ts",
7
+ "path": "src/component.ts",
47
8
  "declarations": [
48
9
  {
49
10
  "kind": "class",
@@ -988,7 +949,7 @@
988
949
  "name": "DotLottiePlayer",
989
950
  "declaration": {
990
951
  "name": "DotLottiePlayer",
991
- "module": "src/component/index.ts"
952
+ "module": "src/component.ts"
992
953
  }
993
954
  },
994
955
  {
@@ -996,20 +957,59 @@
996
957
  "name": "dotlottie-player",
997
958
  "declaration": {
998
959
  "name": "DotLottiePlayer",
999
- "module": "src/component/index.ts"
960
+ "module": "src/component.ts"
961
+ }
962
+ }
963
+ ]
964
+ },
965
+ {
966
+ "kind": "javascript-module",
967
+ "path": "src/index.ts",
968
+ "declarations": [],
969
+ "exports": [
970
+ {
971
+ "kind": "js",
972
+ "name": "DotLottiePlayer",
973
+ "declaration": {
974
+ "name": "DotLottiePlayer",
975
+ "module": "src/index.ts"
976
+ }
977
+ },
978
+ {
979
+ "kind": "js",
980
+ "name": "PlayMode",
981
+ "declaration": {
982
+ "name": "PlayMode",
983
+ "module": "./utils"
984
+ }
985
+ },
986
+ {
987
+ "kind": "js",
988
+ "name": "PlayerEvents",
989
+ "declaration": {
990
+ "name": "PlayerEvents",
991
+ "module": "./utils"
992
+ }
993
+ },
994
+ {
995
+ "kind": "js",
996
+ "name": "PlayerState",
997
+ "declaration": {
998
+ "name": "PlayerState",
999
+ "module": "./utils"
1000
1000
  }
1001
1001
  }
1002
1002
  ]
1003
1003
  },
1004
1004
  {
1005
1005
  "kind": "javascript-module",
1006
- "path": "src/component/types.ts",
1006
+ "path": "src/types.ts",
1007
1007
  "declarations": [],
1008
1008
  "exports": []
1009
1009
  },
1010
1010
  {
1011
1011
  "kind": "javascript-module",
1012
- "path": "src/component/utils.ts",
1012
+ "path": "src/utils.ts",
1013
1013
  "declarations": [
1014
1014
  {
1015
1015
  "kind": "class",
@@ -1026,7 +1026,7 @@
1026
1026
  ],
1027
1027
  "superclass": {
1028
1028
  "name": "Error",
1029
- "module": "src/component/utils.ts"
1029
+ "module": "src/utils.ts"
1030
1030
  }
1031
1031
  },
1032
1032
  {
@@ -1159,7 +1159,7 @@
1159
1159
  "name": "CustomError",
1160
1160
  "declaration": {
1161
1161
  "name": "CustomError",
1162
- "module": "src/component/utils.ts"
1162
+ "module": "src/utils.ts"
1163
1163
  }
1164
1164
  },
1165
1165
  {
@@ -1167,7 +1167,7 @@
1167
1167
  "name": "addExt",
1168
1168
  "declaration": {
1169
1169
  "name": "addExt",
1170
- "module": "src/component/utils.ts"
1170
+ "module": "src/utils.ts"
1171
1171
  }
1172
1172
  },
1173
1173
  {
@@ -1175,7 +1175,7 @@
1175
1175
  "name": "aspectRatio",
1176
1176
  "declaration": {
1177
1177
  "name": "aspectRatio",
1178
- "module": "src/component/utils.ts"
1178
+ "module": "src/utils.ts"
1179
1179
  }
1180
1180
  },
1181
1181
  {
@@ -1183,7 +1183,7 @@
1183
1183
  "name": "base64ToU8",
1184
1184
  "declaration": {
1185
1185
  "name": "base64ToU8",
1186
- "module": "src/component/utils.ts"
1186
+ "module": "src/utils.ts"
1187
1187
  }
1188
1188
  },
1189
1189
  {
@@ -1191,7 +1191,7 @@
1191
1191
  "name": "createDotLottie",
1192
1192
  "declaration": {
1193
1193
  "name": "createDotLottie",
1194
- "module": "src/component/utils.ts"
1194
+ "module": "src/utils.ts"
1195
1195
  }
1196
1196
  },
1197
1197
  {
@@ -1199,7 +1199,7 @@
1199
1199
  "name": "createJSON",
1200
1200
  "declaration": {
1201
1201
  "name": "createJSON",
1202
- "module": "src/component/utils.ts"
1202
+ "module": "src/utils.ts"
1203
1203
  }
1204
1204
  },
1205
1205
  {
@@ -1207,7 +1207,7 @@
1207
1207
  "name": "download",
1208
1208
  "declaration": {
1209
1209
  "name": "download",
1210
- "module": "src/component/utils.ts"
1210
+ "module": "src/utils.ts"
1211
1211
  }
1212
1212
  },
1213
1213
  {
@@ -1215,7 +1215,7 @@
1215
1215
  "name": "fileToBase64",
1216
1216
  "declaration": {
1217
1217
  "name": "fileToBase64",
1218
- "module": "src/component/utils.ts"
1218
+ "module": "src/utils.ts"
1219
1219
  }
1220
1220
  },
1221
1221
  {
@@ -1223,7 +1223,7 @@
1223
1223
  "name": "frameOutput",
1224
1224
  "declaration": {
1225
1225
  "name": "frameOutput",
1226
- "module": "src/component/utils.ts"
1226
+ "module": "src/utils.ts"
1227
1227
  }
1228
1228
  },
1229
1229
  {
@@ -1231,7 +1231,7 @@
1231
1231
  "name": "getAnimationData",
1232
1232
  "declaration": {
1233
1233
  "name": "getAnimationData",
1234
- "module": "src/component/utils.ts"
1234
+ "module": "src/utils.ts"
1235
1235
  }
1236
1236
  },
1237
1237
  {
@@ -1239,7 +1239,7 @@
1239
1239
  "name": "getArrayBuffer",
1240
1240
  "declaration": {
1241
1241
  "name": "getArrayBuffer",
1242
- "module": "src/component/utils.ts"
1242
+ "module": "src/utils.ts"
1243
1243
  }
1244
1244
  },
1245
1245
  {
@@ -1247,7 +1247,7 @@
1247
1247
  "name": "getExt",
1248
1248
  "declaration": {
1249
1249
  "name": "getExt",
1250
- "module": "src/component/utils.ts"
1250
+ "module": "src/utils.ts"
1251
1251
  }
1252
1252
  },
1253
1253
  {
@@ -1255,7 +1255,7 @@
1255
1255
  "name": "getExtFromB64",
1256
1256
  "declaration": {
1257
1257
  "name": "getExtFromB64",
1258
- "module": "src/component/utils.ts"
1258
+ "module": "src/utils.ts"
1259
1259
  }
1260
1260
  },
1261
1261
  {
@@ -1263,7 +1263,7 @@
1263
1263
  "name": "getFilename",
1264
1264
  "declaration": {
1265
1265
  "name": "getFilename",
1266
- "module": "src/component/utils.ts"
1266
+ "module": "src/utils.ts"
1267
1267
  }
1268
1268
  },
1269
1269
  {
@@ -1271,7 +1271,7 @@
1271
1271
  "name": "getLottieJSON",
1272
1272
  "declaration": {
1273
1273
  "name": "getLottieJSON",
1274
- "module": "src/component/utils.ts"
1274
+ "module": "src/utils.ts"
1275
1275
  }
1276
1276
  },
1277
1277
  {
@@ -1279,7 +1279,7 @@
1279
1279
  "name": "getManifest",
1280
1280
  "declaration": {
1281
1281
  "name": "getManifest",
1282
- "module": "src/component/utils.ts"
1282
+ "module": "src/utils.ts"
1283
1283
  }
1284
1284
  },
1285
1285
  {
@@ -1287,7 +1287,7 @@
1287
1287
  "name": "getMimeFromExt",
1288
1288
  "declaration": {
1289
1289
  "name": "getMimeFromExt",
1290
- "module": "src/component/utils.ts"
1290
+ "module": "src/utils.ts"
1291
1291
  }
1292
1292
  },
1293
1293
  {
@@ -1295,7 +1295,7 @@
1295
1295
  "name": "handleErrors",
1296
1296
  "declaration": {
1297
1297
  "name": "handleErrors",
1298
- "module": "src/component/utils.ts"
1298
+ "module": "src/utils.ts"
1299
1299
  }
1300
1300
  },
1301
1301
  {
@@ -1303,7 +1303,7 @@
1303
1303
  "name": "hasExt",
1304
1304
  "declaration": {
1305
1305
  "name": "hasExt",
1306
- "module": "src/component/utils.ts"
1306
+ "module": "src/utils.ts"
1307
1307
  }
1308
1308
  },
1309
1309
  {
@@ -1311,7 +1311,7 @@
1311
1311
  "name": "isAudio",
1312
1312
  "declaration": {
1313
1313
  "name": "isAudio",
1314
- "module": "src/component/utils.ts"
1314
+ "module": "src/utils.ts"
1315
1315
  }
1316
1316
  },
1317
1317
  {
@@ -1319,7 +1319,7 @@
1319
1319
  "name": "isBase64",
1320
1320
  "declaration": {
1321
1321
  "name": "isBase64",
1322
- "module": "src/component/utils.ts"
1322
+ "module": "src/utils.ts"
1323
1323
  }
1324
1324
  },
1325
1325
  {
@@ -1327,7 +1327,7 @@
1327
1327
  "name": "isImage",
1328
1328
  "declaration": {
1329
1329
  "name": "isImage",
1330
- "module": "src/component/utils.ts"
1330
+ "module": "src/utils.ts"
1331
1331
  }
1332
1332
  },
1333
1333
  {
@@ -1335,7 +1335,7 @@
1335
1335
  "name": "isServer",
1336
1336
  "declaration": {
1337
1337
  "name": "isServer",
1338
- "module": "src/component/utils.ts"
1338
+ "module": "src/utils.ts"
1339
1339
  }
1340
1340
  },
1341
1341
  {
@@ -1343,7 +1343,7 @@
1343
1343
  "name": "parseBase64",
1344
1344
  "declaration": {
1345
1345
  "name": "parseBase64",
1346
- "module": "src/component/utils.ts"
1346
+ "module": "src/utils.ts"
1347
1347
  }
1348
1348
  },
1349
1349
  {
@@ -1351,7 +1351,7 @@
1351
1351
  "name": "prepareString",
1352
1352
  "declaration": {
1353
1353
  "name": "prepareString",
1354
- "module": "src/component/utils.ts"
1354
+ "module": "src/utils.ts"
1355
1355
  }
1356
1356
  },
1357
1357
  {
@@ -1359,7 +1359,7 @@
1359
1359
  "name": "resolveAssets",
1360
1360
  "declaration": {
1361
1361
  "name": "resolveAssets",
1362
- "module": "src/component/utils.ts"
1362
+ "module": "src/utils.ts"
1363
1363
  }
1364
1364
  },
1365
1365
  {
@@ -1367,7 +1367,7 @@
1367
1367
  "name": "unzip",
1368
1368
  "declaration": {
1369
1369
  "name": "unzip",
1370
- "module": "src/component/utils.ts"
1370
+ "module": "src/utils.ts"
1371
1371
  }
1372
1372
  },
1373
1373
  {
@@ -1375,7 +1375,7 @@
1375
1375
  "name": "useId",
1376
1376
  "declaration": {
1377
1377
  "name": "useId",
1378
- "module": "src/component/utils.ts"
1378
+ "module": "src/utils.ts"
1379
1379
  }
1380
1380
  }
1381
1381
  ]
package/dist/esm/index.js CHANGED
@@ -3,8 +3,6 @@ import { property, query, state, customElement } from 'lit/decorators.js';
3
3
  import Lottie from 'lottie-web';
4
4
  import { strToU8, zip, strFromU8, unzip as unzip$1 } from 'fflate';
5
5
 
6
- var name="@aarsteinmedia/dotlottie-player";var version="2.5.11";var description="Web Component for playing Lottie animations in your web app. Previously @johanaarstein/dotlottie-player";var exports={".":{"import":"./dist/esm/index.js",node:"./dist/esm/index.js",require:"./dist/cjs/index.js",types:"./dist/index.d.ts"}};var main="./dist/esm/index.js";var unpkg="./dist/index.js";var module="./dist/esm/index.js";var types="./dist/index.d.ts";var type="module";var homepage="https://www.aarstein.media/en/dotlottie-player";var repository={url:"https://github.com/aarsteinmedia/dotlottie-player.git",type:"git"};var bugs="https://github.com/aarsteinmedia/dotlottie-player/issues";var author={name:"Johan Martin Aarstein",email:"johan@aarstein.media",url:"https://www.aarstein.media",organization:"Aarstein Media"};var license="GPL-2.0-or-later";var scripts={build:"rimraf ./dist && rollup -c","build:types":"rimraf ./types && tsc","build:cem":"npx cem analyze --config cem.config.mjs",prod:"pnpm build:types && pnpm build && pnpm build:cem",dev:"rollup -c -w --environment NODE_ENV:development",lint:"tsc && eslint . --ext .ts","lint:fix":"eslint . --ext .ts --fix"};var dependencies={fflate:"^0.8.2",lit:"^3.1.3","lottie-web":"^5.12.2"};var peerDependencies={"@types/react":">= 16.0.0"};var devDependencies={"@custom-elements-manifest/analyzer":"^0.9.9","@rollup/plugin-commonjs":"^25.0.8","@rollup/plugin-json":"^6.1.0","@rollup/plugin-node-resolve":"^15.2.3","@rollup/plugin-replace":"^5.0.5","@swc/core":"^1.5.24","@types/node":"^20.14.1","@typescript-eslint/eslint-plugin":"^7.12.0","@typescript-eslint/parser":"^7.12.0",autoprefixer:"^10.4.19","esbuild-sass-plugin":"^3.3.0",eslint:"^8.57.0","eslint-import-resolver-typescript":"^3.6.1","eslint-plugin-import":"^2.29.1","eslint-plugin-jsdoc":"^48.2.7","eslint-plugin-lit":"^1.14.0","postcss-flexbugs-fixes":"^5.0.2",rimraf:"^5.0.7",rollup:"^4.18.0","rollup-plugin-dts":"^6.1.1","rollup-plugin-html-literals":"^1.1.8","rollup-plugin-livereload":"^2.0.5","rollup-plugin-postcss":"^4.0.2","rollup-plugin-postcss-lit":"^2.1.0","rollup-plugin-serve":"^1.1.1","rollup-plugin-summary":"^2.0.1","rollup-plugin-swc3":"^0.11.2",sass:"^1.77.4","ts-lit-plugin":"^2.0.2",typescript:"^5.4.5"};var customElements="dist/custom-elements.json";var files=["dist","README.md"];var keywords=["lottie","dotlottie","animation","web component","component","lit-element","svg","vector","player"];var publishConfig={access:"public"};var engines={node:">= 8.17.0"};var funding={type:"paypal",url:"https://www.paypal.com/donate/?hosted_button_id=E7C7DMN8KSQ6A"};var pkg = {name:name,version:version,description:description,exports:exports,main:main,unpkg:unpkg,module:module,types:types,type:type,homepage:homepage,repository:repository,bugs:bugs,author:author,license:license,scripts:scripts,dependencies:dependencies,peerDependencies:peerDependencies,devDependencies:devDependencies,customElements:customElements,files:files,keywords:keywords,publishConfig:publishConfig,engines:engines,funding:funding};
7
-
8
6
  var PlayerState;
9
7
  (function(PlayerState) {
10
8
  PlayerState["Completed"] = "completed";
@@ -237,15 +235,9 @@ const addExt = (ext, str)=>{
237
235
  return;
238
236
  }
239
237
  const ext = str.split('.').pop()?.toLowerCase();
240
- if (ext === 'jpeg') {
241
- return 'jpg';
242
- }
243
238
  return ext;
244
239
  }, getExtFromB64 = (str)=>{
245
240
  const mime = str.split(':')[1].split(';')[0], ext = mime.split('/')[1].split('+')[0];
246
- if (ext === 'jpeg') {
247
- return 'jpg';
248
- }
249
241
  return ext;
250
242
  }, getFilename = (src, keepExt)=>{
251
243
  getExt(src);
@@ -355,6 +347,8 @@ const addExt = (ext, str)=>{
355
347
 
356
348
  var css_248z = css`*{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:rgba(0, 0, 0, 0.2);--lottie-player-seeker-thumb-color:#4285f4;--lottie-player-seeker-display:block;display:block;width:100%;height:100%}@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:rgba(255, 255, 255, 0.6)}}.main{display:flex;flex-direction:column;height:100%;width:100%;margin:0;padding:0}.animation{width:100%;height:100%;display:flex}[data-controls=true] .animation{height:calc(100% - 35px)}.animation-container{position:relative}.popover{position:absolute;right:5px;bottom:40px;background-color:var(--lottie-player-toolbar-background-color);border-radius:5px;padding:10px 15px;border:solid 2px var(--lottie-player-toolbar-icon-color);animation:fadeIn .2s ease-in-out}.popover::before{content:"";right:10px;border:7px solid transparent;border-top-color:transparent;margin-right:-7px;height:0;width:0;position:absolute;pointer-events:none;top:100%;border-top-color:var(--lottie-player-toolbar-icon-color)}.toolbar{display:flex;align-items:center;justify-items:center;background:var(--lottie-player-toolbar-background-color);margin:0;height:35px;padding:5px;border-radius:5px;gap:5px}.toolbar.has-error{pointer-events:none;opacity:.5}.toolbar button{cursor:pointer;fill:var(--lottie-player-toolbar-icon-color);color:var(--lottie-player-toolbar-icon-color);display:flex;background:0 0;border:0;padding:0;outline:0;height:100%;margin:0;align-items:center;gap:5px;opacity:.9}.toolbar button:hover{opacity:1}.toolbar button[data-active=true]{opacity:1;fill:var(--lottie-player-toolbar-icon-active-color)}.toolbar button:disabled{opacity:.5}.toolbar button:focus{outline:0}.toolbar button svg{pointer-events:none}.toolbar button svg>*{fill:inherit}.toolbar button.disabled svg{display:none}.progress-container{position:relative;width:100%}.progress-container.simple{margin-right:12px}.seeker{-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:0}.seeker::-webkit-slider-runnable-track,.seeker::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;outline:0}progress{-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:0}.seeker{width:100%;height:20px;border-radius:3px;border:0;cursor:pointer;background-color:transparent;display:var(--lottie-player-seeker-display);color:var(--lottie-player-seeker-thumb-color);margin:0;padding:7.5px 0;position:relative;z-index:1}progress{position:absolute;width:100%;height:5px;border-radius:3px;border:0;top:0;left:0;margin:7.5px 0;background-color:var(--lottie-player-seeker-track-color);pointer-events:none}::-moz-progress-bar{background-color:var(--lottie-player-seeker-thumb-color)}::-webkit-progress-inner-element{border-radius:3px;overflow:hidden}::-webkit-slider-runnable-track{background-color:transparent}::-webkit-progress-value{background-color:var(--lottie-player-seeker-thumb-color)}.seeker::-webkit-slider-thumb{height:15px;width:15px;border-radius:50%;border:0;background-color:var(--lottie-player-seeker-thumb-color);cursor:pointer;-webkit-transition:transform .2s ease-in-out;transition:transform .2s ease-in-out;transform:scale(0)}.seeker:focus::-webkit-slider-thumb,.seeker:hover::-webkit-slider-thumb{transform:scale(1)}.seeker::-moz-range-progress{background-color:var(--lottie-player-seeker-thumb-color);height:5px;border-radius:3px}.seeker::-moz-range-thumb{height:15px;width:15px;border-radius:50%;background-color:var(--lottie-player-seeker-thumb-color);border:0;cursor:pointer;-moz-transition:transform .2s ease-in-out;transition:transform .2s ease-in-out;transform:scale(0)}.seeker:focus::-moz-range-thumb,.seeker:hover::-moz-range-thumb{transform:scale(1)}.seeker::-ms-track{width:100%;height:5px;cursor:pointer;background:0 0;border-color:transparent;color:transparent}.seeker::-ms-fill-upper{background:var(--lottie-player-seeker-track-color);border-radius:3px}.seeker::-ms-fill-lower{background-color:var(--lottie-player-seeker-thumb-color);border-radius:3px}.seeker::-ms-thumb{border:0;height:15px;width:15px;border-radius:50%;background:var(--lottie-player-seeker-thumb-color);cursor:pointer;-ms-transition:transform .2s ease-in-out;transition:transform .2s ease-in-out;transform:scale(0)}.seeker:hover::-ms-thumb{transform:scale(1)}.seeker:focus::-ms-thumb{transform:scale(1)}.seeker:focus::-ms-fill-lower,.seeker:focus::-ms-fill-upper{background:var(--lottie-player-seeker-track-color)}.error{display:flex;margin:auto;justify-content:center;height:100%;align-items:center}.error svg{width:100%;height:auto}@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}`;
357
349
 
350
+ var name="@aarsteinmedia/dotlottie-player";var version="2.5.12";var description="Web Component for playing Lottie animations in your web app. Previously @johanaarstein/dotlottie-player";var exports={".":{"import":"./dist/esm/index.js",node:"./dist/esm/index.js",require:"./dist/cjs/index.js",types:"./dist/index.d.ts"}};var main="./dist/esm/index.js";var unpkg="./dist/index.js";var module="./dist/esm/index.js";var types="./dist/index.d.ts";var type="module";var homepage="https://www.aarstein.media/en/dotlottie-player";var repository={url:"https://github.com/aarsteinmedia/dotlottie-player.git",type:"git"};var bugs="https://github.com/aarsteinmedia/dotlottie-player/issues";var author={name:"Johan Martin Aarstein",email:"johan@aarstein.media",url:"https://www.aarstein.media",organization:"Aarstein Media"};var license="GPL-2.0-or-later";var scripts={build:"rimraf ./dist && rollup -c","build:types":"rimraf ./types && tsc","build:cem":"npx cem analyze --config cem.config.mjs",prod:"pnpm build:types && pnpm build && pnpm build:cem",dev:"rollup -c -w --environment NODE_ENV:development",lint:"tsc && eslint . --ext .ts","lint:fix":"eslint . --ext .ts --fix"};var dependencies={fflate:"^0.8.2",lit:"^3.1.4","lottie-web":"^5.12.2"};var peerDependencies={"@types/react":">= 16.0.0"};var devDependencies={"@custom-elements-manifest/analyzer":"^0.9.9","@rollup/plugin-commonjs":"^25.0.8","@rollup/plugin-json":"^6.1.0","@rollup/plugin-node-resolve":"^15.2.3","@rollup/plugin-replace":"^5.0.7","@rollup/plugin-typescript":"^11.1.6","@swc/core":"^1.5.28","@types/node":"^20.14.2","@typescript-eslint/eslint-plugin":"^7.13.0","@typescript-eslint/parser":"^7.13.0",autoprefixer:"^10.4.19","esbuild-sass-plugin":"^3.3.1",eslint:"^8.57.0","eslint-import-resolver-typescript":"^3.6.1","eslint-plugin-import":"^2.29.1","eslint-plugin-jsdoc":"^48.2.9","eslint-plugin-lit":"^1.14.0","postcss-flexbugs-fixes":"^5.0.2",rimraf:"^5.0.7",rollup:"^4.18.0","rollup-plugin-dts":"^6.1.1","rollup-plugin-html-literals":"^1.1.8","rollup-plugin-livereload":"^2.0.5","rollup-plugin-postcss":"^4.0.2","rollup-plugin-postcss-lit":"^2.1.0","rollup-plugin-serve":"^1.1.1","rollup-plugin-summary":"^2.0.1","rollup-plugin-swc3":"^0.11.2",sass:"^1.77.5","ts-lit-plugin":"^2.0.2",tslib:"^2.6.3",typescript:"^5.4.5"};var customElements="dist/custom-elements.json";var files=["dist","README.md"];var keywords=["lottie","dotlottie","animation","web component","component","lit-element","svg","vector","player"];var publishConfig={access:"public"};var engines={node:">= 8.17.0"};var funding={type:"paypal",url:"https://www.paypal.com/donate/?hosted_button_id=E7C7DMN8KSQ6A"};var pkg = {name:name,version:version,description:description,exports:exports,main:main,unpkg:unpkg,module:module,types:types,type:type,homepage:homepage,repository:repository,bugs:bugs,author:author,license:license,scripts:scripts,dependencies:dependencies,peerDependencies:peerDependencies,devDependencies:devDependencies,customElements:customElements,files:files,keywords:keywords,publishConfig:publishConfig,engines:engines,funding:funding};
351
+
358
352
  function _ts_decorate(decorators, target, key, desc) {
359
353
  var c = arguments.length, r = c < 3 ? target : desc, d;
360
354
  if (typeof Reflect === "object" && typeof undefined === "function") r = undefined(decorators, target, key, desc);
@@ -530,11 +524,11 @@ class DotLottiePlayer extends LitElement {
530
524
  }
531
525
  addEventListener('focus', this._handleWindowBlur, {
532
526
  passive: true,
533
- capture: true
527
+ capture: false
534
528
  });
535
529
  addEventListener('blur', this._handleWindowBlur, {
536
530
  passive: true,
537
- capture: true
531
+ capture: false
538
532
  });
539
533
  if (this.animateOnScroll) {
540
534
  addEventListener('scroll', this._handleScroll, {