Skip to content

Commit 9a792b0

Browse files
committed
feat: added getVersions, updated lottie-player version
1 parent db7fc91 commit 9a792b0

File tree

6 files changed

+58
-14
lines changed

6 files changed

+58
-14
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## 1.1.0
4+
5+
### Minor Changes
6+
7+
- added getVersions(), updated lottie-player
8+
- added getVersions(), updated player version
9+
310
## 1.0.9
411

512
### Patch Changes

example/components/Methods.vue

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
<template>
22
<div>
3-
<div style="display: flex; justify-content: center; align-content: center"></div>
4-
<div style="display: flex; justify-content: center; align-content: center"></div>
3+
<div
4+
style="display: flex; justify-content: center; align-content: center"
5+
></div>
6+
<div
7+
style="display: flex; justify-content: center; align-content: center"
8+
></div>
59
<br />
610
<lottie-vue-player
711
ref="playerOne"
@@ -114,6 +118,8 @@ export default {
114118
}, 2000);
115119
116120
this.playerFour.setBackgroundColor("#00ff6b");
121+
122+
console.log(this.playerOne.getVersions());
117123
},
118124
};
119125
</script>

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
{
22
"name": "@lottiefiles/vue-lottie-player",
3-
"version": "1.0.9",
3+
"version": "1.1.0",
44
"description": "Lottie player wrapper for Vue.js by LottieFiles",
55
"scripts": {
6+
"prebuild": "node -p \"'<script>export const LOTTIE_VUE_PLAYER_VERSION = ' + JSON.stringify(require('./package.json').version) + ';</script>'\" > src/versions.vue",
67
"build": "vue-cli-service build --target lib --name vue-lottie-player ./src/index.js && rm ./dist/demo.html",
78
"build:dev": "vue-cli-service build --watch --inline-vue --target lib --name vue-lottie-player ./src/index.js && rm ./dist/demo.html",
89
"build-with-coverage": "CODE_COVERAGE=true vue-cli-service build --target lib --name vue-lottie-player ./src/index.js && rm ./dist/demo.html",
@@ -23,7 +24,7 @@
2324
"dist"
2425
],
2526
"dependencies": {
26-
"@lottiefiles/lottie-player": "^1.5.7",
27+
"@lottiefiles/lottie-player": "^1.6.2",
2728
"vue": "^2.6.12"
2829
},
2930
"devDependencies": {
@@ -78,4 +79,4 @@
7879
"lottiefiles"
7980
],
8081
"license": "MIT"
81-
}
82+
}

src/Player.vue

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
<script>
4444
import "@lottiefiles/lottie-player";
4545
import Controls from "./Controls.vue";
46+
import { LOTTIE_VUE_PLAYER_VERSION } from "./versions";
4647
4748
export default {
4849
components: {
@@ -136,6 +137,12 @@ export default {
136137
this.options.playing = true;
137138
}
138139
},
140+
getVersions() {
141+
let obj = this.player.getVersions();
142+
obj.lottieVuePlayerVersion = LOTTIE_VUE_PLAYER_VERSION;
143+
144+
return obj;
145+
},
139146
toggleLoop() {
140147
if (this.options.loop) {
141148
this.player.setLooping(false);

src/versions.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<script>export const LOTTIE_VUE_PLAYER_VERSION = "1.0.9";</script>

yarn.lock

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1485,17 +1485,39 @@
14851485
resolved "https://registry.yarnpkg.com/@lit/reactive-element/-/reactive-element-1.3.1.tgz#3021ad0fa30a75a41212c5e7f1f169c5762ef8bb"
14861486
integrity sha512-nOJARIr3pReqK3hfFCSW2Zg/kFcFsSAlIE7z4a0C9D2dPrgD/YSn3ZP2ET/rxKB65SXyG7jJbkynBRm+tGlacw==
14871487

1488-
"@lottiefiles/lottie-player@^1.5.7":
1489-
version "1.5.7"
1490-
resolved "https://registry.yarnpkg.com/@lottiefiles/lottie-player/-/lottie-player-1.5.7.tgz#15f2a5d95d46103fb269c65cf0523cbe8fdf35a7"
1491-
integrity sha512-G9rBnH3GJv7ADPLGhwvauWf5IhHja5615N9ROjVE7O384nkHccJ2C/v0AZ9ybx63QTGojN7NaKYdTKq6NMcNrg==
1488+
"@lottiefiles/lottie-player@^1.6.2":
1489+
version "1.6.2"
1490+
resolved "https://registry.yarnpkg.com/@lottiefiles/lottie-player/-/lottie-player-1.6.2.tgz#a6da2972439199c6cf3b755e5592e1cef090f87d"
1491+
integrity sha512-MKsiTBE86ut0SgKCZDCr6bnxeSUz6rtwO28qu14Vfsp3pOjmFXh3yGdxZjrIE1pV067D6SjaB6JlIwIwWqgYSw==
14921492
dependencies:
14931493
"@types/pako" "^1.0.1"
14941494
lit "^2.1.2"
1495-
lottie-web "^5.8.1"
1495+
lottie-web "^5.10.0"
14961496
pako "^2.0.4"
14971497
resize-observer-polyfill "^1.5.1"
14981498

1499+
"@manypkg/find-root@^1.1.0":
1500+
version "1.1.0"
1501+
resolved "https://registry.yarnpkg.com/@manypkg/find-root/-/find-root-1.1.0.tgz#a62d8ed1cd7e7d4c11d9d52a8397460b5d4ad29f"
1502+
integrity sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==
1503+
dependencies:
1504+
"@babel/runtime" "^7.5.5"
1505+
"@types/node" "^12.7.1"
1506+
find-up "^4.1.0"
1507+
fs-extra "^8.1.0"
1508+
1509+
"@manypkg/get-packages@^1.1.3":
1510+
version "1.1.3"
1511+
resolved "https://registry.yarnpkg.com/@manypkg/get-packages/-/get-packages-1.1.3.tgz#e184db9bba792fa4693de4658cfb1463ac2c9c47"
1512+
integrity sha512-fo+QhuU3qE/2TQMQmbVMqaQ6EWbMhi4ABWP+O4AM1NqPBuy0OrApV5LO6BrrgnhtAHS2NH6RrVk9OL181tTi8A==
1513+
dependencies:
1514+
"@babel/runtime" "^7.5.5"
1515+
"@changesets/types" "^4.0.1"
1516+
"@manypkg/find-root" "^1.1.0"
1517+
fs-extra "^8.1.0"
1518+
globby "^11.0.0"
1519+
read-yaml-file "^1.1.0"
1520+
14991521
"@mrmlnc/readdir-enhanced@^2.2.1":
15001522
version "2.2.1"
15011523
resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde"
@@ -8067,10 +8089,10 @@ loose-envify@^1.2.0:
80678089
dependencies:
80688090
js-tokens "^3.0.0 || ^4.0.0"
80698091

8070-
lottie-web@^5.8.1:
8071-
version "5.8.1"
8072-
resolved "https://registry.yarnpkg.com/lottie-web/-/lottie-web-5.8.1.tgz#807e0af0ad22b59bf867d964eb684cb3368da0ef"
8073-
integrity sha512-9gIizWADlaHC2GCt+D+yNpk5l2clZQFqnVWWIVdY0LnxC/uLa39dYltAe3fcmC/hrZ2IUQ8dLlY0O934Npjs7Q==
8092+
lottie-web@^5.10.0:
8093+
version "5.10.0"
8094+
resolved "https://registry.yarnpkg.com/lottie-web/-/lottie-web-5.10.0.tgz#72563f22efdcf2b8f7e8359743514930ebaf5f8c"
8095+
integrity sha512-q2hfqKrGXNkwjSSZjKxf3fWMi0e3ZBc03qBkVWoGbwUJ7BcG+9YXjMPtmmhitzk8Nc6VQ5PRnh9yInPdfq0PZg==
80748096

80758097
lower-case@^1.1.1:
80768098
version "1.1.4"

0 commit comments

Comments
 (0)