├── .eslintrc.js ├── .github ├── FUNDING.yml └── workflows │ ├── build.yml │ └── release.yml ├── .gitignore ├── .gitmodules ├── .npmrc ├── .prettierignore ├── .prettierrc.js ├── .yarnrc.yml ├── CHANGELOG.md ├── LICENSE.md ├── README.md ├── build.gradle ├── config.json ├── demo-snippets ├── assets │ ├── LottieLogo1.json │ └── Mobilo │ │ └── A.json ├── ng │ ├── basic │ │ ├── basic.component.html │ │ └── basic.component.ts │ ├── install.module.ts │ └── styles.scss ├── package.json └── vue │ ├── Basic.vue │ └── install.ts ├── docs ├── .nojekyll ├── assets │ ├── hierarchy.js │ ├── highlight.css │ ├── icons.js │ ├── icons.svg │ ├── main.js │ ├── navigation.js │ ├── search.js │ └── style.css ├── classes │ └── LottieView.html ├── enums │ └── RenderMode.html ├── index.html ├── interfaces │ └── KeyPathColors.html └── modules.html ├── lerna.json ├── package.json ├── packages └── lottie │ ├── .npmignore │ ├── CHANGELOG.md │ ├── README.md │ ├── blueprint.md │ ├── package.json │ ├── platforms │ ├── android │ │ ├── include.gradle │ │ ├── java │ │ │ └── com │ │ │ │ └── nativescript │ │ │ │ └── lottie │ │ │ │ └── LottieAnimationView.java │ │ └── native-api-usage.json │ └── ios │ │ └── Podfile │ └── tsconfig.json ├── pnpm-workspace.yaml ├── references.d.ts ├── sample-effects ├── 9squares-AlBoardman.json ├── EmptyState.json ├── HamburgerArrow.json ├── LightBulb.json ├── LottieLogo1.json ├── LottieLogo2.json ├── Mobilo │ ├── A.json │ ├── B.json │ ├── D.json │ ├── N.json │ ├── R.json │ └── S.json ├── TwitterHeart.json ├── WalkThrough.json ├── motioncorpse.json └── pinjump.json ├── screens ├── android_assets.png ├── ios_assets.png └── lottieDemo.gif ├── src └── lottie │ ├── angular │ ├── index.ts │ ├── ng-package.json │ ├── package.json │ └── tsconfig.json │ ├── index.android.ts │ ├── index.common.ts │ ├── index.d.ts │ ├── index.ios.ts │ ├── typings │ ├── android.d.ts │ ├── android.nativescript.d.ts │ ├── dotlottie.ios.d.ts │ └── ios.d.ts │ ├── utils.ts │ └── vue │ └── index.ts ├── svelte.config.js ├── tsconfig.json ├── tsconfig.vue3.json └── yarn.lock /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: './tools/.eslintrc.js' 3 | }; 4 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: [farfromrefug] 2 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Build CI 2 | 3 | # Trigger the workflow on push or pull request 4 | on: [push] 5 | 6 | jobs: 7 | build: 8 | name: Build 9 | 10 | runs-on: macos-latest 11 | steps: 12 | - uses: actions/checkout@v1 13 | 14 | - name: Set Node.js 10.x 15 | uses: actions/setup-node@v1 16 | with: 17 | node-version: "10.x" 18 | 19 | - name: Build Plugin Source 20 | run: cd src && npm i && npm i -g typescript && tsc 21 | 22 | - name: Lint 23 | run: cd src && npm run tslint 24 | 25 | - name: Setup JDK 1.8 26 | uses: actions/setup-java@v1 27 | with: 28 | java-version: 1.8 29 | 30 | - name: Install PIP 31 | run: | 32 | sudo pip install --upgrade pip 33 | sudo pip install six 34 | 35 | - name: Setup NativeScript CLI 36 | run: | 37 | echo no | npm i -g nativescript 38 | tns usage-reporting disable 39 | tns error-reporting disable 40 | 41 | - name: Build Android Demo App 42 | run: | 43 | cd demo 44 | tns build android --env.uglify 45 | - name: Build iOS Demo App 46 | run: | 47 | cd demo 48 | tns build ios --env.uglify 49 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: 'release' 2 | 3 | on: 4 | workflow_dispatch: 5 | inputs: 6 | release_type: 7 | type: choice 8 | default: auto 9 | description: What kind of version upgrade 10 | options: 11 | - auto 12 | - patch 13 | - minor 14 | - major 15 | 16 | jobs: 17 | release: 18 | runs-on: ubuntu-latest 19 | steps: 20 | - name: Checkout repository 21 | uses: actions/checkout@v4 22 | with: 23 | fetch-depth: "0" 24 | submodules: true 25 | 26 | - name: setup node 27 | uses: actions/setup-node@v4 28 | with: 29 | node-version: lts/* 30 | registry-url: 'https://registry.npmjs.org' 31 | 32 | 33 | - uses: oNaiPs/secrets-to-env-action@v1 34 | with: 35 | secrets: ${{ toJSON(secrets) }} 36 | 37 | 38 | - uses: oleksiyrudenko/gha-git-credentials@v2-latest 39 | with: 40 | token: '${{ secrets.GITHUB_TOKEN }}' 41 | name: Martin Guillon 42 | email: dev@akylas.fr 43 | 44 | - name: install jq 45 | run: sudo apt install jq 46 | 47 | - name: Enable CorePack 48 | run: | 49 | corepack enable 50 | yarn config get globalFolder # the yarn command will ensure the correct yarn version is downloaded and installed 51 | 52 | - name: Get yarn cache directory path 53 | id: yarn-cache-dir-path 54 | run: echo "::set-output name=dir::$(yarn config get globalFolder)" 55 | 56 | - name: Remove package.json resolutions 57 | run: echo "`jq 'delpaths([["resolutions"]])' package.json`" > package.json 58 | 59 | - uses: actions/cache@v4 60 | name: Handle node_modules Cache 61 | id: yarn-node_modules # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) 62 | with: 63 | path: node_modules 64 | key: ${{ runner.os }}-yarn-node_modules-${{ hashFiles('**/yarn.lock') }} 65 | restore-keys: | 66 | ${{ runner.os }}-node_modules- 67 | 68 | - uses: actions/cache@v4 69 | if: steps.yarn-node_modules.outputs.cache-hit != 'true' 70 | name: Handle Yarn cache 71 | id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) 72 | with: 73 | path: ${{ steps.yarn-cache-dir-path.outputs.dir }} 74 | key: ${{ runner.os }}-yarn-cache-${{ hashFiles('**/yarn.lock') }} 75 | restore-keys: | 76 | ${{ runner.os }}-yarn- 77 | 78 | - name: Install deps 79 | if: steps.yarn-node_modules.outputs.cache-hit != 'true' 80 | uses: bahmutov/npm-install@v1 81 | with: 82 | install-command: yarn install --silent 83 | env: 84 | YARN_ENABLE_IMMUTABLE_INSTALLS: false 85 | 86 | - name: run setup 87 | run: | 88 | npm run setup 89 | 90 | - name: "NPM Identity" 91 | env: 92 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }} 93 | run: | 94 | echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc 95 | 96 | - name: publish auto 97 | if: github.event.inputs.release_type == 'auto' 98 | run: | 99 | npm run publish -- --force-publish --no-verify-access --no-private --no-commit-hooks --yes 100 | env: 101 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }} 102 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} 103 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 104 | 105 | - name: publish 106 | if: github.event.inputs.release_type != 'auto' 107 | run: | 108 | npm run publish -- --force-publish --no-verify-access --no-private --no-commit-hooks --yes --bump ${{ github.event.inputs.release_type }} 109 | env: 110 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }} 111 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} 112 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # NativeScript 2 | hooks/ 3 | node_modules/ 4 | platforms 5 | 6 | # NativeScript Template 7 | *.js.map 8 | !ngcc.config.js 9 | !webpack.config.js 10 | 11 | # Logs 12 | logs 13 | *.log 14 | npm-debug.log* 15 | yarn-debug.log* 16 | yarn-error.log* 17 | 18 | # General 19 | .DS_Store 20 | .AppleDouble 21 | .LSOverride 22 | .idea 23 | .cloud 24 | .gradle 25 | .project 26 | .yarn 27 | .cxx 28 | tmp/ 29 | 30 | !.eslintrc.js 31 | !.prettierrc.js 32 | 33 | !e2e/*.js 34 | !detox.config.js 35 | devices.js 36 | 37 | *.framework 38 | *.xcframework 39 | **/*.js.map 40 | src/**/*.js 41 | packages/**/*.js 42 | packages/**/*.d.ts 43 | bin 44 | build 45 | Pods 46 | !packages/*/platforms 47 | /packages/**/*.aar 48 | /packages/**/*.framework 49 | /packages/**/*.xcframework 50 | /demo-snippets/**/*.aar 51 | *.xcuserdatad 52 | /packages/README.md 53 | packages/**/*js.map 54 | packages/**/*js 55 | packages/angular 56 | packages/typings 57 | packages/**/angular/*.json 58 | packages/**/*.ngsummary.json 59 | packages/**/*.metadata.json 60 | 61 | .vscode/settings.json 62 | 63 | /blueprint.md -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "demo-vue"] 2 | path = demo-vue 3 | url = https://github.com/nativescript-community/plugin-seed-demo-vue.git 4 | [submodule "tools"] 5 | path = tools 6 | url = https://github.com/nativescript-community/plugin-seed-tools.git 7 | [submodule "demo-ng"] 8 | path = demo-ng 9 | url = https://github.com/nativescript-community/plugin-seed-demo-ng.git 10 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | shamefully-hoist=true 2 | public-hoist-pattern[]=*eslint* 3 | public-hoist-pattern[]=source-map-support 4 | public-hoist-pattern[]=ts-patch 5 | public-hoist-pattern[]=typescript 6 | public-hoist-pattern[]=cpy-cli 7 | strict-peer-dependencies=false 8 | shell-emulator=true 9 | auto-install-peers=false 10 | loglevel=error 11 | engine-strict=true 12 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | package-lock.json 2 | node_modules/ 3 | plugin/ 4 | docs/ 5 | -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | printWidth: 200, 3 | semi: true, 4 | tabWidth: 4, 5 | trailingComma: 'none', 6 | singleQuote: true 7 | }; 8 | -------------------------------------------------------------------------------- /.yarnrc.yml: -------------------------------------------------------------------------------- 1 | compressionLevel: mixed 2 | 3 | nmHoistingLimits: workspaces 4 | 5 | nodeLinker: node-modules 6 | 7 | yarnPath: tools/.yarn/releases/yarn-4.0.1.cjs 8 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | All notable changes to this project will be documented in this file. 4 | See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. 5 | 6 | # [6.0.0](https://github.com/farfromrefug/nativescript-lottie/compare/v5.0.11...v6.0.0) (2024-03-21) 7 | 8 | ### Bug Fixes 9 | 10 | - **ios:** updated native SDK ([b1d9f73](https://github.com/farfromrefug/nativescript-lottie/commit/b1d9f734988658a30838944923563bcac16a78ab)) 11 | 12 | ### BREAKING CHANGES 13 | 14 | - **ios:** min deployment target has been raised to 13.0 15 | 16 | ## [5.0.11](https://github.com/farfromrefug/nativescript-lottie/compare/v5.0.10...v5.0.11) (2024-03-15) 17 | 18 | ### Bug Fixes 19 | 20 | - **ios:** ensure animation start playing on src change with autoPlay ([80ea818](https://github.com/farfromrefug/nativescript-lottie/commit/80ea81853d8ac225a37c623809c7383498ea68ee)) 21 | 22 | ## [5.0.10](https://github.com/farfromrefug/nativescript-lottie/compare/v5.0.9...v5.0.10) (2023-11-21) 23 | 24 | ### Bug Fixes 25 | 26 | - **ios:** multiple iOS fixes ([c0fcda6](https://github.com/farfromrefug/nativescript-lottie/commit/c0fcda6acffd03c7c97c2c033f20c14adc8e190e)) 27 | 28 | ## [5.0.9](https://github.com/farfromrefug/nativescript-lottie/compare/v5.0.8...v5.0.9) (2023-11-21) 29 | 30 | ### Bug Fixes 31 | 32 | - **ios:** update to latest sdk ([5cee6cb](https://github.com/farfromrefug/nativescript-lottie/commit/5cee6cb1380f1b4396f5b1a43ff392ccbab1468a)) 33 | 34 | ## [5.0.8](https://github.com/farfromrefug/nativescript-lottie/compare/v5.0.7...v5.0.8) (2023-11-20) 35 | 36 | ### Features 37 | 38 | - keyPathColors property (`setColor` as a property) ([fed5025](https://github.com/farfromrefug/nativescript-lottie/commit/fed50251d67f217900b796882edb34eb6d509dcf)) 39 | 40 | ## [5.0.7](https://github.com/farfromrefug/nativescript-lottie/compare/v5.0.6...v5.0.7) (2023-11-19) 41 | 42 | ### Bug Fixes 43 | 44 | - **android:** src is now loaded sync. You can change the behavior with the new `async` property ([7b28195](https://github.com/farfromrefug/nativescript-lottie/commit/7b281956afc0d31702ae12f8eada54796c09c798)) 45 | - BREAKING CHANGE renamed `setOpacityValueDelegateForKeyPath` to `setOpacity` and `setColorValueDelegateForKeyPath` to `setColor` ([927a64f](https://github.com/farfromrefug/nativescript-lottie/commit/927a64fbeb21c2151f6647cb0360e4a79e0d4b11)) 46 | 47 | ## [5.0.6](https://github.com/farfromrefug/nativescript-lottie/compare/v5.0.5...v5.0.6) (2023-03-11) 48 | 49 | ### Bug Fixes 50 | 51 | - use color filter to set color on android ([af275e4](https://github.com/farfromrefug/nativescript-lottie/commit/af275e4f6e51a98845a7bc85d2dcf1201218f16c)) 52 | 53 | ## [5.0.5](https://github.com/farfromrefug/nativescript-lottie/compare/v5.0.4...v5.0.5) (2023-01-24) 54 | 55 | ### Bug Fixes 56 | 57 | - **android:** native-api-usage fix ([ad3a299](https://github.com/farfromrefug/nativescript-lottie/commit/ad3a29994b033b9cb0786d7ff99e5c218a51603f)) 58 | 59 | ## [5.0.4](https://github.com/farfromrefug/nativescript-lottie/compare/v5.0.3...v5.0.4) (2023-01-13) 60 | 61 | ### Bug Fixes 62 | 63 | - **android:** lottie does not support clearing animation (src=null) ([024b7d5](https://github.com/farfromrefug/nativescript-lottie/commit/024b7d5a9de23bcc2fd0a754188cf5026fe3e031)) 64 | 65 | ## [5.0.3](https://github.com/farfromrefug/nativescript-lottie/compare/v5.0.2...v5.0.3) (2022-12-21) 66 | 67 | **Note:** Version bump only for package @nativescript-community/ui-lottie 68 | 69 | ## [5.0.2](https://github.com/farfromrefug/nativescript-lottie/compare/v5.0.1...v5.0.2) (2022-12-21) 70 | 71 | ### Bug Fixes 72 | 73 | - **ios:** try to fix animation not playing after navigation ([bbed469](https://github.com/farfromrefug/nativescript-lottie/commit/bbed4690b957174d0b850bc4800c799c1b17d3b1)) 74 | 75 | ## [5.0.1](https://github.com/farfromrefug/nativescript-lottie/compare/v5.0.0...v5.0.1) (2022-12-01) 76 | 77 | **Note:** Version bump only for package @nativescript-community/ui-lottie 78 | 79 | # [5.0.0](https://github.com/farfromrefug/nativescript-lottie/compare/v4.4.5...v5.0.0) (2022-08-19) 80 | 81 | **Note:** Version bump only for package @nativescript-community/ui-lottie 82 | 83 | ## [4.4.5](https://github.com/farfromrefug/nativescript-lottie/compare/v4.4.4...v4.4.5) (2022-08-19) 84 | 85 | ### Bug Fixes 86 | 87 | - **ios:** for now rollback to old lottie which supports ios < 12 ([54f318b](https://github.com/farfromrefug/nativescript-lottie/commit/54f318b273bb04183d381fd8c53d63fb23ef9a20)) 88 | 89 | ## [4.4.4](https://github.com/farfromrefug/nativescript-lottie/compare/v4.4.3...v4.4.4) (2022-08-15) 90 | 91 | ### Bug Fixes 92 | 93 | - **ios:** wrong podfile ([f17dc1f](https://github.com/farfromrefug/nativescript-lottie/commit/f17dc1fd0bfe26b9e4f715ec259c147c78812649)) 94 | 95 | ## [4.4.3](https://github.com/farfromrefug/nativescript-lottie/compare/v4.4.2...v4.4.3) (2022-08-14) 96 | 97 | ### Bug Fixes 98 | 99 | - **android:** upgrade native lib version ([3ac5059](https://github.com/farfromrefug/nativescript-lottie/commit/3ac50592b3ae997579e2f6235bfb53f77da5bb76)) 100 | - **ios:** use branch for pod repo to prevent future errors ([1ffbc38](https://github.com/farfromrefug/nativescript-lottie/commit/1ffbc38a68d38692a6cade0049553606e05f6a2c)) 101 | 102 | ## [4.4.2](https://github.com/farfromrefug/nativescript-lottie/compare/v4.4.1...v4.4.2) (2022-08-14) 103 | 104 | **Note:** Version bump only for package @nativescript-community/ui-lottie 105 | 106 | ## [4.4.1](https://github.com/farfromrefug/nativescript-lottie/compare/v4.4.0...v4.4.1) (2022-02-16) 107 | 108 | ### Bug Fixes 109 | 110 | - **android:** revert broken change ([ee1da5b](https://github.com/farfromrefug/nativescript-lottie/commit/ee1da5b77a603cc5957b39d4632f3f38d3660427)) 111 | 112 | # [4.4.0](https://github.com/farfromrefug/nativescript-lottie/compare/v4.3.3...v4.4.0) (2022-02-15) 113 | 114 | ### Bug Fixes 115 | 116 | - **android:** dont include appCompat to try and prevent users issues ([c8e6963](https://github.com/farfromrefug/nativescript-lottie/commit/c8e696351440d1cf3e4bcfd538ce86cc3936f2a3)) 117 | 118 | ### Features 119 | 120 | - angular module & vue element ([1b6d0cf](https://github.com/farfromrefug/nativescript-lottie/commit/1b6d0cfdb37df9056e7b70b1da456db20e9c5b3f)) 121 | 122 | ## [4.3.3](https://github.com/farfromrefug/nativescript-lottie/compare/v4.3.2...v4.3.3) (2022-01-06) 123 | 124 | ### Bug Fixes 125 | 126 | - **android:** bump native lib version to fix build issue with bintray ([7a55d70](https://github.com/farfromrefug/nativescript-lottie/commit/7a55d70d665f7ea4e52bd64b2cd9c743167c2afe)) 127 | 128 | ## [4.3.2](https://github.com/farfromrefug/nativescript-lottie/compare/v4.3.1...v4.3.2) (2021-11-14) 129 | 130 | ### Bug Fixes 131 | 132 | - added strech property. Sizing now behaves like N Image ([0a91948](https://github.com/farfromrefug/nativescript-lottie/commit/0a919484894ce05cddb76407f88ac788745a7a9a)) 133 | 134 | ## [4.3.1](https://github.com/farfromrefug/nativescript-lottie/compare/v4.3.0...v4.3.1) (2021-11-03) 135 | 136 | ### Bug Fixes 137 | 138 | - loading files like `MyFile.json` should be seen as res ([b1f892b](https://github.com/farfromrefug/nativescript-lottie/commit/b1f892b6a17bb96c263c9d93fe49e6e224eab342)) 139 | 140 | # [4.3.0](https://github.com/farfromrefug/nativescript-lottie/compare/v4.1.0...v4.3.0) (2021-10-29) 141 | 142 | ### Bug Fixes 143 | 144 | - **android:** correctly allow override of appcompat version ([0f866ac](https://github.com/farfromrefug/nativescript-lottie/commit/0f866ac84366f2b98382b7a494db2c48d5609bc4)) 145 | - **ios:** working dotLottie files ([c4d7871](https://github.com/farfromrefug/nativescript-lottie/commit/c4d787110a9c02eced3e655472f5ddfc8900db00)) 146 | - quick fix after merge ([d560f81](https://github.com/farfromrefug/nativescript-lottie/commit/d560f81139379b20b1048b3f411cfd453d67603d)) 147 | - update deps and support dotLottie files ([749210e](https://github.com/farfromrefug/nativescript-lottie/commit/749210e16698b863df928deb531243f7e75a2aeb)) 148 | 149 | ### Features 150 | 151 | - **android:** native-api-usage ([50d4019](https://github.com/farfromrefug/nativescript-lottie/commit/50d40197c799baa3906754a970329af094ed77fb)) 152 | 153 | # [4.2.0](https://github.com/farfromrefug/nativescript-lottie/compare/v4.1.3...v4.2.0) (2021-10-21) 154 | 155 | ### Features 156 | 157 | - **android:** native-api-usage ([735118f](https://github.com/farfromrefug/nativescript-lottie/commit/735118f0072e92d96b62c3666bea3d50e70b8d2b)) 158 | 159 | ## [4.1.3](https://github.com/farfromrefug/nativescript-lottie/compare/v4.1.2...v4.1.3) (2021-10-02) 160 | 161 | ### Bug Fixes 162 | 163 | - **android:** correctly allow override of appcompat version ([5675f09](https://github.com/farfromrefug/nativescript-lottie/commit/5675f09c48f578602291b4fbc03f4f4c7ed18da8)) 164 | 165 | ## [4.1.2](https://github.com/farfromrefug/nativescript-lottie/compare/v4.1.1...v4.1.2) (2021-07-07) 166 | 167 | ### Bug Fixes 168 | 169 | - quick fix after merge ([d84ad97](https://github.com/farfromrefug/nativescript-lottie/commit/d84ad9735c79adf45f13baf0a850253fc805849e)) 170 | 171 | ## [4.1.1](https://github.com/farfromrefug/nativescript-lottie/compare/v4.1.0...v4.1.1) (2021-07-07) 172 | 173 | **Note:** Version bump only for package @nativescript-community/ui-lottie 174 | 175 | # [4.1.0](https://github.com/farfromrefug/nativescript-lottie/compare/v4.0.14...v4.1.0) (2020-09-07) 176 | 177 | ### Features 178 | 179 | - N 7 and new plugin name ([33c0f1c](https://github.com/farfromrefug/nativescript-lottie/commit/33c0f1cea3737e782f26d96cade311177e9b5d4b)) 180 | 181 | ## [4.0.14](https://github.com/farfromrefug/nativescript-lottie/compare/v4.0.13...v4.0.14) (2020-05-21) 182 | 183 | **Note:** Version bump only for package @nativescript-community/ui-lottie 184 | 185 | ## [4.0.13](https://github.com/farfromrefug/nativescript-lottie/compare/v4.0.12...v4.0.13) (2020-05-21) 186 | 187 | ### Bug Fixes 188 | 189 | - sideEffects for tree shacking ([d66adf8](https://github.com/farfromrefug/nativescript-lottie/commit/d66adf866f805baf25e8b3060976ed74cdd5ad3a)) 190 | 191 | ## [4.0.12](https://github.com/farfromrefug/nativescript-lottie/compare/v4.0.11...v4.0.12) (2020-05-21) 192 | 193 | ### Bug Fixes 194 | 195 | - esm using import for tree shaking ([a9c6a5d](https://github.com/farfromrefug/nativescript-lottie/commit/a9c6a5dbc766213be2fc459edbdd2c3ecf8696cf)) 196 | 197 | ## [4.0.11](https://github.com/farfromrefug/nativescript-lottie/compare/v4.0.10...v4.0.11) (2020-05-21) 198 | 199 | ### Bug Fixes 200 | 201 | - full esm support ([73fdff0](https://github.com/farfromrefug/nativescript-lottie/commit/73fdff026394911436bd71b0b8f237a5a4edbfba)) 202 | 203 | ## [4.0.10](https://github.com/farfromrefug/nativescript-lottie/compare/v4.0.9...v4.0.10) (2020-05-01) 204 | 205 | ### Bug Fixes 206 | 207 | - **android:** better loading ([1f49748](https://github.com/farfromrefug/nativescript-lottie/commit/1f497489588a81d9592d2d1a163e5cfecd617ad3)) 208 | 209 | ## [4.0.9](https://github.com/farfromrefug/nativescript-lottie/compare/v4.0.8...v4.0.9) (2020-05-01) 210 | 211 | ### Bug Fixes 212 | 213 | - src not being loaded ([dfd1c17](https://github.com/farfromrefug/nativescript-lottie/commit/dfd1c175305dccdeb5e67674370f10fdc016229a)) 214 | 215 | ## [4.0.8](https://github.com/farfromrefug/nativescript-lottie/compare/v4.0.7...v4.0.8) (2020-04-29) 216 | 217 | ### Bug Fixes 218 | 219 | - clear animation on null src ([1d908e9](https://github.com/farfromrefug/nativescript-lottie/commit/1d908e9e07f3ba1ad472a67017a11b6a8d6fa7d5)) 220 | 221 | ## [4.0.7](https://github.com/farfromrefug/nativescript-lottie/compare/v4.0.6...v4.0.7) (2020-02-26) 222 | 223 | ### Bug Fixes 224 | 225 | - **android:** cleanup and profilling ([6088040](https://github.com/farfromrefug/nativescript-lottie/commit/60880408382cf6a3c4d25cc123017292afe42f3e)) 226 | 227 | ## [4.0.6](https://github.com/farfromrefug/nativescript-lottie/compare/v4.0.5...v4.0.6) (2020-02-24) 228 | 229 | ### Bug Fixes 230 | 231 | - **android:** for now isAnimating does not seem to work ([5fd9727](https://github.com/farfromrefug/nativescript-lottie/commit/5fd97271a698c5e29e4b9e7a53c8a2d2fa6f34f4)) 232 | 233 | ## [4.0.5](https://github.com/farfromrefug/nativescript-lottie/compare/v4.0.4...v4.0.5) (2020-02-18) 234 | 235 | ### Bug Fixes 236 | 237 | - make progress a property ([caf6d5c](https://github.com/farfromrefug/nativescript-lottie/commit/caf6d5c7279211c75e49958d631720b4dcc7ffd4)) 238 | 239 | ## [4.0.4](https://github.com/farfromrefug/nativescript-lottie/compare/v4.0.3...v4.0.4) (2020-02-14) 240 | 241 | ### Bug Fixes 242 | 243 | - better handle of completion block ([021cfad](https://github.com/farfromrefug/nativescript-lottie/commit/021cfad0326a1c1de1c5b0194e249ba35da3c822)) 244 | 245 | ## [4.0.3](https://github.com/farfromrefug/nativescript-lottie/compare/v4.0.2...v4.0.3) (2020-02-13) 246 | 247 | **Note:** Version bump only for package @nativescript-community/ui-lottie 248 | 249 | ## 4.0.2 (2020-02-13) 250 | 251 | ## 3.0.2 (2019-03-06) 252 | 253 | # 3.0.0 (2019-01-22) 254 | 255 | ## 2.1.2 (2018-12-12) 256 | 257 | ### Bug Fixes 258 | 259 | - **iOS:** unhandled transient rejection ([d07e7d5](https://github.com/farfromrefug/nativescript-lottie/commit/d07e7d5057dd62401b3be493046d118b597c3433)) 260 | 261 | ### Features 262 | 263 | - adjust dynamic properties - color ([dbeeae0](https://github.com/farfromrefug/nativescript-lottie/commit/dbeeae04478ef3b84ca4f95988c14f573eed52fe)) 264 | 265 | # 2.0.0 (2018-04-23) 266 | 267 | ### Bug Fixes 268 | 269 | - **iOS:** update to reflect rename of swift class ([b11123c](https://github.com/farfromrefug/nativescript-lottie/commit/b11123cb524b2007cd9066d3b2072fc1796b7450)) 270 | 271 | ### Features 272 | 273 | - **iOS:** animations rendering now ([29bb703](https://github.com/farfromrefug/nativescript-lottie/commit/29bb703d74ed9065ff0b4596daa8218976e0b68e)) 274 | - **iOS:** fixed up onLoaded to fire event ([5558094](https://github.com/farfromrefug/nativescript-lottie/commit/5558094c21d3a38c3d3d5e0aac1fec924addf11c)) 275 | - **iOS:** play action working ([99f63e6](https://github.com/farfromrefug/nativescript-lottie/commit/99f63e63c28dde25df74094ee5a29b42e3e20de9)) 276 | - **iOS:** wip ([6c63391](https://github.com/farfromrefug/nativescript-lottie/commit/6c633915af5b50ac03aadecf895de55eda8a2de9)) 277 | - **iOS:** wip ([033e315](https://github.com/farfromrefug/nativescript-lottie/commit/033e3156b57710643cdafbcae78d83bb21149d9d)) 278 | - **iOS:** working ([92d2170](https://github.com/farfromrefug/nativescript-lottie/commit/92d21703a2d925344f340baee7b6e2086561acd9)) 279 | 280 | # Changelog 281 | 282 | All notable changes to this project from 2019-01-21 will be documented in this file. 283 | 284 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 285 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 286 | 287 | ## [3.0.2] - 2019-03-05 288 | 289 | ### Added 290 | 291 | - Fixed [#37](https://github.com/farfromrefug/nativescript-lottie/issues/37) allowing Android lottie `src` to be set without the `.json` file extension. Thanks to [@mudlabs](https://github.com/mudlabs) PR. 292 | 293 | ## [3.0.1] - 2019-03-01 294 | 295 | ### Added 296 | 297 | - NativeScript Vue demo 298 | - Enabled Travis CI builds for demo projects 299 | - Republished to correct missing README from npm. 300 | 301 | ## [3.0.0] - 2019-01-22 302 | 303 | ### Added 304 | 305 | - Added documentation to the interface. 306 | - Added the `completionBlock` property for executing work upon completion of the animation. 307 | - Added the `playAnimationFromProgressToProgress` function for playing the animation from the specified start and end progress values. 308 | - Added the `setColorValueDelegateForKeyPath` function for setting the provided color value on each property that matches the specified keyPath. 309 | - Added the `setOpacityValueDelegateForKeyPath` function for setting the provided opacity value on each property that matches the specified keyPath. 310 | 311 | ### Changed 312 | 313 | - Changed the iOS implementation to remove unnecessary layout and measurement logic. 314 | - Changed both the android and iOS implementations to align them where possible. 315 | - Changed both the Angular and plan demos to align them, and to demonstrate the newly added apis. 316 | 317 | ### Removed 318 | 319 | - Removed exposed properties with no backing implementation have been removed. 320 | - Removed the `theme` property removed in favour of `setColorValueDelegateForKeyPath`. 321 | - Removed the LottieHelper jar. 322 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | nativescript-lottie 4 | Copyright (c) 2017, Brad Martin 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | this software and associated documentation files (the "Software"), to deal in 8 | the Software without restriction, including without limitation the rights to 9 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | the Software, and to permit persons to whom the Software is furnished to do so, 11 | subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'java' 2 | 3 | // Use maven repository 4 | repositories { 5 | mavenCentral() 6 | google() 7 | } 8 | 9 | apply from: 'plugin/platforms/android/include.gradle' 10 | dependencies { 11 | implementation files('/Volumes/dev/androidSDK/platforms/android-28/android.jar') 12 | } 13 | sourceSets { 14 | main { 15 | java { 16 | srcDirs = ["plugin/platforms/android/java"] 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /config.json: -------------------------------------------------------------------------------- 1 | { 2 | "readme": true, 3 | "angular": true, 4 | "demos": [ 5 | "vue", 6 | "ng" 7 | ] 8 | } -------------------------------------------------------------------------------- /demo-snippets/ng/basic/basic.component.html: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 13 | 18 | 19 | 24 | 29 | 30 | 31 | 36 | 41 | 42 | 48 | 54 | 60 | 66 | 72 | 78 | 84 | 90 | 96 | 102 | 103 | 108 | 109 | 110 | 115 | 120 | 121 | 126 | 127 | 128 | 133 | 138 | 143 | 144 | 145 | 146 | -------------------------------------------------------------------------------- /demo-snippets/ng/basic/basic.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { LottieView } from '@nativescript-community/ui-lottie'; 3 | import { Color } from '@nativescript/core'; 4 | 5 | const ANDROID_WAVE_KEYPATHS = [ 6 | ['Shirt', 'Group 5', 'Fill 1'], 7 | ['LeftArmWave', 'LeftArm', 'Group 6', 'Fill 1'], 8 | ['RightArm', 'Group 6', 'Fill 1'] 9 | ]; 10 | 11 | @Component({ 12 | selector: 'ns-home', 13 | templateUrl: './basic.component.html', 14 | moduleId: module.id 15 | }) 16 | export class BasicComponent { 17 | public animationIndex: number = 0; 18 | public animations: string[] = [ 19 | 'Mobilo/B.json', 20 | 'Mobilo/A.json', 21 | 'Mobilo/D.json', 22 | 'Mobilo/N.json', 23 | 'Mobilo/R.json', 24 | 'Mobilo/S.json' 25 | ]; 26 | public thirdLottieProgressTo: string = 'Try it!'; 27 | 28 | /** 29 | * For demoing cycling through the sample animations. 30 | */ 31 | private _lottieViewOne: LottieView; 32 | 33 | /** 34 | * For demoing changing colors and opacity dynamically at runtime. 35 | */ 36 | private _lottieViewTwo: LottieView; 37 | 38 | /** 39 | * For demoing partially animating a composition. 40 | */ 41 | private _lottieViewThree: LottieView; 42 | 43 | /** 44 | * For demoing the completion block (i.e for async work). 45 | */ 46 | private _lottieViewFour: LottieView; 47 | 48 | public firstLottieLoaded(event) { 49 | this._lottieViewOne = event.object as LottieView; 50 | this._lottieViewOne.autoPlay = true; 51 | this._lottieViewOne.loop = true; 52 | this._lottieViewOne.src = this.animations[this.animationIndex]; 53 | } 54 | 55 | public secondLottieLoaded(event) { 56 | this._lottieViewTwo = event.object as LottieView; 57 | this._lottieViewTwo.autoPlay = true; 58 | this._lottieViewTwo.loop = true; 59 | this._lottieViewTwo.src = 'AndroidWave.json'; 60 | } 61 | 62 | public thirdLottieLoaded(event) { 63 | this._lottieViewThree = event.object as LottieView; 64 | this._lottieViewThree.autoPlay = true; 65 | this._lottieViewThree.loop = false; 66 | this._lottieViewThree.src = 'Mobilo/N.json'; 67 | } 68 | 69 | public fourthLottieLoaded(event) { 70 | this._lottieViewFour = event.object as LottieView; 71 | this._lottieViewFour.autoPlay = false; 72 | this._lottieViewFour.src = 'doughnut.json'; 73 | 74 | this.setFourthLottieToLoadingState(); 75 | } 76 | 77 | public next() { 78 | this.animationIndex++; 79 | if (this.animationIndex >= this.animations.length) { 80 | this.animationIndex = 0; 81 | } 82 | this._lottieViewOne.src = this.animations[this.animationIndex]; 83 | } 84 | 85 | public toggleAnimation() { 86 | if (this._lottieViewOne.isAnimating()) { 87 | this._lottieViewOne.cancelAnimation(); 88 | } else { 89 | this._lottieViewOne.playAnimation(); 90 | } 91 | } 92 | 93 | public toggleLoop() { 94 | this._lottieViewOne.loop = !this._lottieViewOne.loop; 95 | } 96 | 97 | public setTheme(value) { 98 | const color = new Color(value); 99 | ANDROID_WAVE_KEYPATHS.forEach(keyPath => { 100 | this._lottieViewTwo.setColor(color, [...keyPath]); 101 | }); 102 | } 103 | 104 | public setSecondLottieRandomOpacity() { 105 | const opacity = getRandomWithPrecision(2); 106 | ANDROID_WAVE_KEYPATHS.forEach(keyPath => { 107 | this._lottieViewTwo.setOpacity(opacity, [ 108 | ...keyPath 109 | ]); 110 | }); 111 | } 112 | 113 | public setThirdLottieRandomProgress() { 114 | const progress = getRandomWithPrecision(2); 115 | this.thirdLottieProgressTo = `Animated to ${progress}`; 116 | this._lottieViewThree.playAnimationFromProgressToProgress(0, progress); 117 | } 118 | 119 | public setFourthLottieToLoadingState() { 120 | this._lottieViewFour.loop = true; 121 | this._lottieViewFour.playAnimationFromProgressToProgress(0, 0.5); 122 | } 123 | 124 | public setFourthLottieToLoadedState() { 125 | this._lottieViewFour.completionBlock = (animationFinished: boolean) => { 126 | console.log( 127 | `lottieViewFour completionBlock animationFinished: ${animationFinished}` 128 | ); 129 | 130 | this._lottieViewFour.playAnimationFromProgressToProgress(0.5, 0.85); 131 | this._lottieViewFour.completionBlock = null; 132 | }; 133 | 134 | // Trigger the completion block by disabling looping and allowing the final loop to lapse. 135 | this._lottieViewFour.loop = false; 136 | } 137 | } 138 | 139 | function getRandomWithPrecision(precision?: number): number { 140 | const multiplier = Math.pow(10, precision || 0); 141 | return Math.round(Math.random() * multiplier) / multiplier; 142 | } 143 | -------------------------------------------------------------------------------- /demo-snippets/ng/install.module.ts: -------------------------------------------------------------------------------- 1 | import { NO_ERRORS_SCHEMA, NgModule } from '@angular/core'; 2 | 3 | import { BasicComponent } from './basic/basic.component'; 4 | 5 | export const COMPONENTS = [BasicComponent]; 6 | @NgModule({ 7 | schemas: [NO_ERRORS_SCHEMA] 8 | }) 9 | export class InstallModule {} 10 | 11 | export function installPlugin() { 12 | } 13 | 14 | export const demos = [ 15 | { name: 'Basic', path: 'basic', component: BasicComponent } 16 | ]; 17 | -------------------------------------------------------------------------------- /demo-snippets/ng/styles.scss: -------------------------------------------------------------------------------- 1 | .item { 2 | padding: 10; 3 | color: white; 4 | 5 | .title { 6 | font-size: 17; 7 | font-weight: bold; 8 | } 9 | 10 | .subtitle { 11 | font-size: 14; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /demo-snippets/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@nativescript-community/template-snippet", 3 | "version": "0.0.1", 4 | "private": true, 5 | "dependencies": { 6 | "@nativescript-community/ui-lottie": "*" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /demo-snippets/vue/Basic.vue: -------------------------------------------------------------------------------- 1 | 21 | 22 | 44 | 45 | 59 | -------------------------------------------------------------------------------- /demo-snippets/vue/install.ts: -------------------------------------------------------------------------------- 1 | import Vue from 'nativescript-vue'; 2 | import Basic from './Basic.vue'; 3 | import LottieView from '@nativescript-community/ui-lottie/vue'; 4 | 5 | export function installPlugin() { 6 | Vue.use(LottieView); 7 | 8 | } 9 | 10 | export const demos = [{ name: 'Basic', path: 'basic', component: Basic }]; 11 | -------------------------------------------------------------------------------- /docs/.nojekyll: -------------------------------------------------------------------------------- 1 | TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false. -------------------------------------------------------------------------------- /docs/assets/hierarchy.js: -------------------------------------------------------------------------------- 1 | window.hierarchyData = "data:application/octet-stream;base64,H4sIAAAAAAAAA6tWKsrPLylWsoqO1VEqSk3LSU0uyczPK1ayqq6tBQAWeT+5HQAAAA==" -------------------------------------------------------------------------------- /docs/assets/highlight.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --light-hl-0: #AF00DB; 3 | --dark-hl-0: #C586C0; 4 | --light-hl-1: #000000; 5 | --dark-hl-1: #D4D4D4; 6 | --light-hl-2: #001080; 7 | --dark-hl-2: #9CDCFE; 8 | --light-hl-3: #A31515; 9 | --dark-hl-3: #CE9178; 10 | --light-hl-4: #795E26; 11 | --dark-hl-4: #DCDCAA; 12 | --light-hl-5: #0000FF; 13 | --dark-hl-5: #569CD6; 14 | --light-hl-6: #267F99; 15 | --dark-hl-6: #4EC9B0; 16 | --light-hl-7: #008000; 17 | --dark-hl-7: #6A9955; 18 | --light-hl-8: #098658; 19 | --dark-hl-8: #B5CEA8; 20 | --light-hl-9: #000000; 21 | --dark-hl-9: #C8C8C8; 22 | --light-code-background: #FFFFFF; 23 | --dark-code-background: #1E1E1E; 24 | } 25 | 26 | @media (prefers-color-scheme: light) { :root { 27 | --hl-0: var(--light-hl-0); 28 | --hl-1: var(--light-hl-1); 29 | --hl-2: var(--light-hl-2); 30 | --hl-3: var(--light-hl-3); 31 | --hl-4: var(--light-hl-4); 32 | --hl-5: var(--light-hl-5); 33 | --hl-6: var(--light-hl-6); 34 | --hl-7: var(--light-hl-7); 35 | --hl-8: var(--light-hl-8); 36 | --hl-9: var(--light-hl-9); 37 | --code-background: var(--light-code-background); 38 | } } 39 | 40 | @media (prefers-color-scheme: dark) { :root { 41 | --hl-0: var(--dark-hl-0); 42 | --hl-1: var(--dark-hl-1); 43 | --hl-2: var(--dark-hl-2); 44 | --hl-3: var(--dark-hl-3); 45 | --hl-4: var(--dark-hl-4); 46 | --hl-5: var(--dark-hl-5); 47 | --hl-6: var(--dark-hl-6); 48 | --hl-7: var(--dark-hl-7); 49 | --hl-8: var(--dark-hl-8); 50 | --hl-9: var(--dark-hl-9); 51 | --code-background: var(--dark-code-background); 52 | } } 53 | 54 | :root[data-theme='light'] { 55 | --hl-0: var(--light-hl-0); 56 | --hl-1: var(--light-hl-1); 57 | --hl-2: var(--light-hl-2); 58 | --hl-3: var(--light-hl-3); 59 | --hl-4: var(--light-hl-4); 60 | --hl-5: var(--light-hl-5); 61 | --hl-6: var(--light-hl-6); 62 | --hl-7: var(--light-hl-7); 63 | --hl-8: var(--light-hl-8); 64 | --hl-9: var(--light-hl-9); 65 | --code-background: var(--light-code-background); 66 | } 67 | 68 | :root[data-theme='dark'] { 69 | --hl-0: var(--dark-hl-0); 70 | --hl-1: var(--dark-hl-1); 71 | --hl-2: var(--dark-hl-2); 72 | --hl-3: var(--dark-hl-3); 73 | --hl-4: var(--dark-hl-4); 74 | --hl-5: var(--dark-hl-5); 75 | --hl-6: var(--dark-hl-6); 76 | --hl-7: var(--dark-hl-7); 77 | --hl-8: var(--dark-hl-8); 78 | --hl-9: var(--dark-hl-9); 79 | --code-background: var(--dark-code-background); 80 | } 81 | 82 | .hl-0 { color: var(--hl-0); } 83 | .hl-1 { color: var(--hl-1); } 84 | .hl-2 { color: var(--hl-2); } 85 | .hl-3 { color: var(--hl-3); } 86 | .hl-4 { color: var(--hl-4); } 87 | .hl-5 { color: var(--hl-5); } 88 | .hl-6 { color: var(--hl-6); } 89 | .hl-7 { color: var(--hl-7); } 90 | .hl-8 { color: var(--hl-8); } 91 | .hl-9 { color: var(--hl-9); } 92 | pre, code { background: var(--code-background); } 93 | -------------------------------------------------------------------------------- /docs/assets/icons.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | addIcons(); 3 | function addIcons() { 4 | if (document.readyState === "loading") return document.addEventListener("DOMContentLoaded", addIcons); 5 | const svg = document.body.appendChild(document.createElementNS("http://www.w3.org/2000/svg", "svg")); 6 | svg.innerHTML = `MMNEPVFCICPMFPCPTTAAATR`; 7 | svg.style.display = "none"; 8 | if (location.protocol === "file:") updateUseElements(); 9 | } 10 | 11 | function updateUseElements() { 12 | document.querySelectorAll("use").forEach(el => { 13 | if (el.getAttribute("href").includes("#icon-")) { 14 | el.setAttribute("href", el.getAttribute("href").replace(/.*#/, "#")); 15 | } 16 | }); 17 | } 18 | })() -------------------------------------------------------------------------------- /docs/assets/icons.svg: -------------------------------------------------------------------------------- 1 | MMNEPVFCICPMFPCPTTAAATR -------------------------------------------------------------------------------- /docs/assets/navigation.js: -------------------------------------------------------------------------------- 1 | window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAAA1WMuwrCMBSG3+XMwWBBkayOKoiDS3EIzS8JpknJOVJF+u5uxszfpf+Q4CVk6ILkUE7ZgRRNVjwZQnqOrCtZeRkjKXqE5MjsFvWrj1kk4Bow13qIlhmsK2v7dfd/OOB9tuL3OebCdRKSoNztANaN0a66zXa5fQFNTarxzAAAAA==" -------------------------------------------------------------------------------- /docs/assets/search.js: -------------------------------------------------------------------------------- 1 | window.searchData = "data:application/octet-stream;base64,H4sIAAAAAAAAA62YX2/bNhTFvwv7Sji+tOV/b163YsVWJMiy7kEwAlViGiGSKFB0ssDwdx8oy+KlyUaMujfDuuccSvzxitSBSPHSkE18IE95lZHNipIqKTnZkFteZVx+ERknlOxlQTaEV/uyuTIXJo+qLAglaZE0DW/IhpAjPTvBorfa/n13/WV79/nj204fkr0SZaLy1PakpE4kr5Q9KG/S79vbX//Z3v42EPSYyOwlkXx0zl/Xn+4CchrxoN6fwyIT9Ad/vUnU40dRCNn0aXmluHxIUt5cWQVvTwgzk/unUCrnX3P+0nt2mitz6U23CFjvloqqUXKfKiGH7D7Ytf6ngkaHhj9l8z4xqTIp8mwwzdSNTcpFM5hyqhl9L3slborkdfhm9krUp8KxWako64KrXFS/FCJ9Cpitc/23rv4dyYsomhmS7+/Va83fm9irhnInl7f2wydQKV4pq6+9waquLU+1Y595tpeJHtZgHCocm1UIUQ/mdEVjM2opvkveDC8LVDg2q6k5H17l56rRKTIdzpA/fit5E9h0bvptmlQpL7ZVXoahcKpPUP3Y5LzpUqvvw32sSVDt2MSGq/ZtNPxIuUq7wp/Iuq6TNFfD3bPhSvSlY/N0+w2fRV39f8yhlfpJivKmW1l34iZ4MeKxPEhRnlenEu9apztK8irj/5LNgTxz2eg72xA2mU3WhJKHnBeZ3k+ehk71C6fUJpRkIt23P3dd2VeuNwG6+FR9NSU0nlK2msBsvtvR+CxuL7R/nD3MP60QCI3BJwRHCJaQERozn5A5QmYJZ4TGM59w5ghnlnBOaDz3CeeOcG4JI0LjyCeMHGFkCReExgufcOEIF5ZwSWi89AmXjnBpCVeExiufcOUIV5ZwTWi89gnXjnBtA6B5AC874MIDF/S0+Pj58QBkEwSaC/AyBC5EYFMEmg3wcgQuSGCTBJoP8LIELkxg0wSaEfDyBC5QYBMFmhPwMgUuVGBTBZoV8HIFLlhgkwWaF/CyBS5cYNMFmhnw8gUuYGATxjQzzEsYcwljNmFMM8O8hDGXMHbRo9om5e9SnjZlE8Y0M8xLGHMJ6/5qW/wzl4pnn0+tPo777fuB3Hf9H+D8gjoQALI5HI+m328OR9Ty9TWd1B/HjMvSmCzDPMxHAjQWNJRgl9NZypisjck6yMTZpaEBrdCIVmFul2ct5DZFbtNAN3TONk4LY7QI9TFnIDQihkbEgpzM8QbZzJDNLMjGfLsxNmgwYWNpT+xGjyYrbK6snTK6HYQQhDH0xF/rRD2m3Qce4zU3VvMgp9OxDg0GOUCohd7oPbefhYxRZHyiIJuLfS+aJzxRYTMVtG9FCQgoFgaUzwbQPUPYTcv2U97lOkELN2zdmkMRuinkwoJt+tMOMkJ9koU1SvMJ09igZxz2iLsDOnq+qA9BWCNqD+DIAb04IODNsaOkzmte5BUnm3h3PP4HZ4rS5vsWAAA="; -------------------------------------------------------------------------------- /docs/enums/RenderMode.html: -------------------------------------------------------------------------------- 1 | RenderMode | @nativescript-community/ui-lottie

Enumeration Members

Enumeration Members

AUTOMATIC: number
HARDWARE: number
SOFTWARE: number
5 | -------------------------------------------------------------------------------- /docs/interfaces/KeyPathColors.html: -------------------------------------------------------------------------------- 1 | KeyPathColors | @nativescript-community/ui-lottie

Indexable

  • [k: string]: string | Color
2 | -------------------------------------------------------------------------------- /docs/modules.html: -------------------------------------------------------------------------------- 1 | @nativescript-community/ui-lottie

@nativescript-community/ui-lottie

Enumerations

RenderMode

Classes

LottieView

Interfaces

KeyPathColors
2 | -------------------------------------------------------------------------------- /lerna.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "6.0.0", 3 | "$schema": "node_modules/@lerna-lite/cli/schemas/lerna-schema.json", 4 | "packages": [ 5 | "packages/*" 6 | ], 7 | "npmClient": "yarn", 8 | "useWorkspaces": true, 9 | "command": { 10 | "publish": { 11 | "cleanupTempFiles": true 12 | } 13 | }, 14 | "npmClientArgs": [ 15 | "--no-package-lock" 16 | ], 17 | "commitHooks": false, 18 | "createRelease": "github", 19 | "conventionalCommits": true, 20 | "private": false, 21 | "message": "chore(release): publish new version %v", 22 | "changelogPreset": "conventional-changelog-conventionalcommits", 23 | "ignoreChanges": [ 24 | "**/__fixtures__/**", 25 | "**/__tests__/**", 26 | "**/*.md" 27 | ] 28 | } 29 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "repository": { 3 | "type": "git", 4 | "url": "https://github.com/farfromrefug/nativescript-lottie.git" 5 | }, 6 | "keywords": [ 7 | "NativeScript", 8 | "nativescript-lottie", 9 | "Lottie", 10 | "Android", 11 | "Animation", 12 | "iOS", 13 | "TypeScript", 14 | "bradmartin" 15 | ], 16 | "author": { 17 | "name": "Brad Martin", 18 | "email": "bradwaynemartin@gmail.com" 19 | }, 20 | "contributors": [ 21 | { 22 | "name": "Nathan Walker", 23 | "email": "walkerrunpdx@gmail.com" 24 | }, 25 | { 26 | "name": "JB", 27 | "url": "https://github.com/rhanb" 28 | }, 29 | { 30 | "name": "Dirk Rudolph", 31 | "url": "https://github.com/Buuhuu" 32 | }, 33 | { 34 | "name": "Hamdi Wanis", 35 | "url": "https://github.com/hamdiwanis" 36 | }, 37 | { 38 | "name": "itstheceo", 39 | "url": "https://github.com/itstheceo" 40 | } 41 | ], 42 | "license": "MIT", 43 | "bugs": { 44 | "url": "https://github.com/farfromrefug/nativescript-lottie/issues" 45 | }, 46 | "homepage": "https://github.com/farfromrefug/nativescript-lottie", 47 | "readmeFilename": "README.md", 48 | "scripts": { 49 | "setup": "npm run submodules && ts-patch install", 50 | "prepare": "npm run setup", 51 | "tsc": "cpy '**/*.d.ts' '../plugin' --parents --cwd=src && tsc -skipLibCheck -d", 52 | "clean": "rimraf 'packages/**/*.d.ts' 'packages/**/*.js' 'packages/**/*.js.map' 'packages/**/*.metada' 'packages/**/angular/ng-package.json'", 53 | "build.plugin": "cp README.md plugin/ && rm -f .tsbuildinfo && npm run tsc", 54 | "build.android": "bash src-native/android/build.sh", 55 | "build.ios": "bash src-native/ios/build.sh", 56 | "build.native": "npm run build.android && npm run build.ios", 57 | "build": "lerna run build", 58 | "publish": "npm run setup && npm run clean && npm run build.all && npm run readme && npm run doc && npm run commit_readme_doc_changes && lerna publish", 59 | "demo.ios": "npm i && npm run tsc && cd demo && tns run ios", 60 | "demo.android": "npm i && npm run tsc && cd demo && tns run android", 61 | "clean.demo": "rimraf demo/hooks demo/node_modules demo/platforms", 62 | "plugin.watch.tsc": "npm run tsc -- -w", 63 | "plugin.watch.android": "npm i && npm-watch build.android", 64 | "plugin.watch.ios": "npm i && npm-watch build.ios", 65 | "plugin.watch": "npm run plugin.watch.tsc & npm run plugin.watch.android & npm run plugin.watch.ios", 66 | "commitmsg": "commitlint -e $GIT_PARAMS", 67 | "sync": "node ./tools/sync.js", 68 | "generate.typings.ios": "cd ../demo && TNS_DEBUG_METADATA_PATH=\"$(pwd)/metadata\" tns build ios && TNS_TYPESCRIPT_DECLARATIONS_PATH=\"$(pwd)/typings\" tns build ios && echo 'Now look for your library typings in demo/typings!'", 69 | "precommit": "lint-staged", 70 | "build.all": "lerna run build.all", 71 | "fullclean": "npm run clean && rimraf 'packages/**/node_modules' 'demo-*/hooks' 'demo-*/node_modules' 'package-lock.json' 'pnpm-lock.yaml' 'node_modules'", 72 | "demo.ng.android": "cd ./demo-ng && ns run android --no-hmr --env.watchNodeModules", 73 | "demo.ng.clean": "cd ./demo-ng && ns clean", 74 | "demo.ng.ios": "cd ./demo-ng && ns run ios --no-hmr --env.watchNodeModules", 75 | "demo.vue.android": "cd ./demo-vue && ns run android --no-hmr --env.watchNodeModules", 76 | "demo.vue.clean": "cd ./demo-vue && ns clean", 77 | "demo.vue.ios": "cd ./demo-vue && ns run ios --no-hmr --env.watchNodeModules", 78 | "doc": "node tools/builddoc.mjs", 79 | "commit_readme_doc_changes": "git add docs/** *.md ; git commit -m \"readme/doc\" ; echo \"commit readme doc done\"", 80 | "postinstall": "npm run setup", 81 | "readme": "lerna run readme && node ./tools/readme.js", 82 | "start": "./node_modules/.bin/ntl -A -s 15 -o", 83 | "submodules": "git submodule update --init", 84 | "update": "node ./tools/update.js", 85 | "build.angular": "lerna run build.angular" 86 | }, 87 | "dependencies": { 88 | "@nativescript-community/plugin-seed-tools": "file:tools" 89 | }, 90 | "ntl": { 91 | "descriptions": { 92 | "build": "Build the plugin", 93 | "build.angular": "Build the plugin for Angular", 94 | "build.all": "Build the plugin for all platforms", 95 | "clean": "Clean the local environment.", 96 | "demo.ng.android": "Runs the Angular demo on Android.", 97 | "demo.ng.ios": "Runs the Angular demo on iOS.", 98 | "demo.vue.android": "Runs the Vue demo on Android.", 99 | "demo.vue.ios": "Runs the Vue demo on iOS.", 100 | "watch": "Watch for changes in the plugin source and re-build." 101 | } 102 | }, 103 | "workspaces": [ 104 | "packages/*", 105 | "demo*" 106 | ], 107 | "engines": { 108 | "npm": "please use yarn or pnpm", 109 | "yarn": ">=1.19.1", 110 | "pnpm": ">=7.0.0", 111 | "node": "^14.20.0 || ^16.13.0 || >=18.10.0" 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /packages/lottie/.npmignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | tsconfig.json 3 | node_modules/ 4 | pnpm-global/ 5 | CHANGELOG.md 6 | blueprint.md 7 | *.aar 8 | *.jar -------------------------------------------------------------------------------- /packages/lottie/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | All notable changes to this project will be documented in this file. 4 | See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. 5 | 6 | # [6.0.0](https://github.com/farfromrefug/nativescript-lottie/compare/v5.0.11...v6.0.0) (2024-03-21) 7 | 8 | ### Bug Fixes 9 | 10 | - **ios:** updated native SDK ([b1d9f73](https://github.com/farfromrefug/nativescript-lottie/commit/b1d9f734988658a30838944923563bcac16a78ab)) 11 | 12 | ### BREAKING CHANGES 13 | 14 | - **ios:** min deployment target has been raised to 13.0 15 | 16 | ## [5.0.11](https://github.com/farfromrefug/nativescript-lottie/compare/v5.0.10...v5.0.11) (2024-03-15) 17 | 18 | **Note:** Version bump only for package @nativescript-community/ui-lottie 19 | 20 | ## [5.0.10](https://github.com/farfromrefug/nativescript-lottie/compare/v5.0.9...v5.0.10) (2023-11-21) 21 | 22 | **Note:** Version bump only for package @nativescript-community/ui-lottie 23 | 24 | ## [5.0.9](https://github.com/farfromrefug/nativescript-lottie/compare/v5.0.8...v5.0.9) (2023-11-21) 25 | 26 | ### Bug Fixes 27 | 28 | - **ios:** update to latest sdk ([5cee6cb](https://github.com/farfromrefug/nativescript-lottie/commit/5cee6cb1380f1b4396f5b1a43ff392ccbab1468a)) 29 | 30 | ## [5.0.8](https://github.com/farfromrefug/nativescript-lottie/compare/v5.0.7...v5.0.8) (2023-11-20) 31 | 32 | **Note:** Version bump only for package @nativescript-community/ui-lottie 33 | 34 | ## [5.0.7](https://github.com/farfromrefug/nativescript-lottie/compare/v5.0.6...v5.0.7) (2023-11-19) 35 | 36 | ### Bug Fixes 37 | 38 | - **android:** src is now loaded sync. You can change the behavior with the new `async` property ([7b28195](https://github.com/farfromrefug/nativescript-lottie/commit/7b281956afc0d31702ae12f8eada54796c09c798)) 39 | 40 | ## [5.0.6](https://github.com/farfromrefug/nativescript-lottie/compare/v5.0.5...v5.0.6) (2023-03-11) 41 | 42 | **Note:** Version bump only for package @nativescript-community/ui-lottie 43 | 44 | ## [5.0.5](https://github.com/farfromrefug/nativescript-lottie/compare/v5.0.4...v5.0.5) (2023-01-24) 45 | 46 | ### Bug Fixes 47 | 48 | - **android:** native-api-usage fix ([ad3a299](https://github.com/farfromrefug/nativescript-lottie/commit/ad3a29994b033b9cb0786d7ff99e5c218a51603f)) 49 | 50 | ## [5.0.4](https://github.com/farfromrefug/nativescript-lottie/compare/v5.0.3...v5.0.4) (2023-01-13) 51 | 52 | **Note:** Version bump only for package @nativescript-community/ui-lottie 53 | 54 | ## [5.0.3](https://github.com/farfromrefug/nativescript-lottie/compare/v5.0.2...v5.0.3) (2022-12-21) 55 | 56 | **Note:** Version bump only for package @nativescript-community/ui-lottie 57 | 58 | ## [5.0.2](https://github.com/farfromrefug/nativescript-lottie/compare/v5.0.1...v5.0.2) (2022-12-21) 59 | 60 | **Note:** Version bump only for package @nativescript-community/ui-lottie 61 | 62 | ## [5.0.1](https://github.com/farfromrefug/nativescript-lottie/compare/v5.0.0...v5.0.1) (2022-12-01) 63 | 64 | **Note:** Version bump only for package @nativescript-community/ui-lottie 65 | 66 | # [5.0.0](https://github.com/farfromrefug/nativescript-lottie/compare/v4.4.5...v5.0.0) (2022-08-19) 67 | 68 | **Note:** Version bump only for package @nativescript-community/ui-lottie 69 | 70 | ## [4.4.5](https://github.com/farfromrefug/nativescript-lottie/compare/v4.4.4...v4.4.5) (2022-08-19) 71 | 72 | ### Bug Fixes 73 | 74 | - **ios:** for now rollback to old lottie which supports ios < 12 ([54f318b](https://github.com/farfromrefug/nativescript-lottie/commit/54f318b273bb04183d381fd8c53d63fb23ef9a20)) 75 | 76 | ## [4.4.4](https://github.com/farfromrefug/nativescript-lottie/compare/v4.4.3...v4.4.4) (2022-08-15) 77 | 78 | ### Bug Fixes 79 | 80 | - **ios:** wrong podfile ([f17dc1f](https://github.com/farfromrefug/nativescript-lottie/commit/f17dc1fd0bfe26b9e4f715ec259c147c78812649)) 81 | 82 | ## [4.4.3](https://github.com/farfromrefug/nativescript-lottie/compare/v4.4.2...v4.4.3) (2022-08-14) 83 | 84 | ### Bug Fixes 85 | 86 | - **android:** upgrade native lib version ([3ac5059](https://github.com/farfromrefug/nativescript-lottie/commit/3ac50592b3ae997579e2f6235bfb53f77da5bb76)) 87 | - **ios:** use branch for pod repo to prevent future errors ([1ffbc38](https://github.com/farfromrefug/nativescript-lottie/commit/1ffbc38a68d38692a6cade0049553606e05f6a2c)) 88 | 89 | ## [4.4.2](https://github.com/farfromrefug/nativescript-lottie/compare/v4.4.1...v4.4.2) (2022-08-14) 90 | 91 | **Note:** Version bump only for package @nativescript-community/ui-lottie 92 | 93 | ## [4.4.1](https://github.com/farfromrefug/nativescript-lottie/compare/v4.4.0...v4.4.1) (2022-02-16) 94 | 95 | ### Bug Fixes 96 | 97 | - **android:** revert broken change ([ee1da5b](https://github.com/farfromrefug/nativescript-lottie/commit/ee1da5b77a603cc5957b39d4632f3f38d3660427)) 98 | 99 | # [4.4.0](https://github.com/farfromrefug/nativescript-lottie/compare/v4.3.3...v4.4.0) (2022-02-15) 100 | 101 | ### Bug Fixes 102 | 103 | - **android:** dont include appCompat to try and prevent users issues ([c8e6963](https://github.com/farfromrefug/nativescript-lottie/commit/c8e696351440d1cf3e4bcfd538ce86cc3936f2a3)) 104 | 105 | ### Features 106 | 107 | - angular module & vue element ([1b6d0cf](https://github.com/farfromrefug/nativescript-lottie/commit/1b6d0cfdb37df9056e7b70b1da456db20e9c5b3f)) 108 | 109 | ## [4.3.3](https://github.com/farfromrefug/nativescript-lottie/compare/v4.3.2...v4.3.3) (2022-01-06) 110 | 111 | ### Bug Fixes 112 | 113 | - **android:** bump native lib version to fix build issue with bintray ([7a55d70](https://github.com/farfromrefug/nativescript-lottie/commit/7a55d70d665f7ea4e52bd64b2cd9c743167c2afe)) 114 | 115 | ## [4.3.2](https://github.com/farfromrefug/nativescript-lottie/compare/v4.3.1...v4.3.2) (2021-11-14) 116 | 117 | ### Bug Fixes 118 | 119 | - added strech property. Sizing now behaves like N Image ([0a91948](https://github.com/farfromrefug/nativescript-lottie/commit/0a919484894ce05cddb76407f88ac788745a7a9a)) 120 | 121 | ## [4.3.1](https://github.com/farfromrefug/nativescript-lottie/compare/v4.3.0...v4.3.1) (2021-11-03) 122 | 123 | **Note:** Version bump only for package @nativescript-community/ui-lottie 124 | 125 | # [4.3.0](https://github.com/farfromrefug/nativescript-lottie/compare/v4.1.0...v4.3.0) (2021-10-29) 126 | 127 | ### Bug Fixes 128 | 129 | - **android:** correctly allow override of appcompat version ([0f866ac](https://github.com/farfromrefug/nativescript-lottie/commit/0f866ac84366f2b98382b7a494db2c48d5609bc4)) 130 | - **ios:** working dotLottie files ([c4d7871](https://github.com/farfromrefug/nativescript-lottie/commit/c4d787110a9c02eced3e655472f5ddfc8900db00)) 131 | - update deps and support dotLottie files ([749210e](https://github.com/farfromrefug/nativescript-lottie/commit/749210e16698b863df928deb531243f7e75a2aeb)) 132 | 133 | ### Features 134 | 135 | - **android:** native-api-usage ([50d4019](https://github.com/farfromrefug/nativescript-lottie/commit/50d40197c799baa3906754a970329af094ed77fb)) 136 | 137 | # [4.2.0](https://github.com/farfromrefug/nativescript-lottie/compare/v4.1.3...v4.2.0) (2021-10-21) 138 | 139 | ### Features 140 | 141 | - **android:** native-api-usage ([735118f](https://github.com/farfromrefug/nativescript-lottie/commit/735118f0072e92d96b62c3666bea3d50e70b8d2b)) 142 | 143 | ## [4.1.3](https://github.com/farfromrefug/nativescript-lottie/compare/v4.1.2...v4.1.3) (2021-10-02) 144 | 145 | ### Bug Fixes 146 | 147 | - **android:** correctly allow override of appcompat version ([5675f09](https://github.com/farfromrefug/nativescript-lottie/commit/5675f09c48f578602291b4fbc03f4f4c7ed18da8)) 148 | 149 | ## [4.1.2](https://github.com/farfromrefug/nativescript-lottie/compare/v4.1.1...v4.1.2) (2021-07-07) 150 | 151 | **Note:** Version bump only for package @nativescript-community/ui-lottie 152 | 153 | ## [4.1.1](https://github.com/farfromrefug/nativescript-lottie/compare/v4.1.0...v4.1.1) (2021-07-07) 154 | 155 | **Note:** Version bump only for package @nativescript-community/ui-lottie 156 | 157 | # [4.1.0](https://github.com/farfromrefug/nativescript-lottie/compare/v4.0.14...v4.1.0) (2020-09-07) 158 | 159 | ### Features 160 | 161 | - N 7 and new plugin name ([33c0f1c](https://github.com/farfromrefug/nativescript-lottie/commit/33c0f1cea3737e782f26d96cade311177e9b5d4b)) 162 | 163 | ## [4.0.14](https://github.com/farfromrefug/nativescript-lottie/compare/v4.0.13...v4.0.14) (2020-05-21) 164 | 165 | **Note:** Version bump only for package @nativescript-community/ui-lottie 166 | 167 | ## [4.0.13](https://github.com/farfromrefug/nativescript-lottie/compare/v4.0.12...v4.0.13) (2020-05-21) 168 | 169 | ### Bug Fixes 170 | 171 | - sideEffects for tree shacking ([d66adf8](https://github.com/farfromrefug/nativescript-lottie/commit/d66adf866f805baf25e8b3060976ed74cdd5ad3a)) 172 | 173 | ## [4.0.12](https://github.com/farfromrefug/nativescript-lottie/compare/v4.0.11...v4.0.12) (2020-05-21) 174 | 175 | **Note:** Version bump only for package @nativescript-community/ui-lottie 176 | 177 | ## [4.0.11](https://github.com/farfromrefug/nativescript-lottie/compare/v4.0.10...v4.0.11) (2020-05-21) 178 | 179 | ### Bug Fixes 180 | 181 | - full esm support ([73fdff0](https://github.com/farfromrefug/nativescript-lottie/commit/73fdff026394911436bd71b0b8f237a5a4edbfba)) 182 | 183 | ## [4.0.10](https://github.com/farfromrefug/nativescript-lottie/compare/v4.0.9...v4.0.10) (2020-05-01) 184 | 185 | **Note:** Version bump only for package @nativescript-community/ui-lottie 186 | 187 | ## [4.0.9](https://github.com/farfromrefug/nativescript-lottie/compare/v4.0.8...v4.0.9) (2020-05-01) 188 | 189 | **Note:** Version bump only for package @nativescript-community/ui-lottie 190 | 191 | ## [4.0.8](https://github.com/farfromrefug/nativescript-lottie/compare/v4.0.7...v4.0.8) (2020-04-29) 192 | 193 | **Note:** Version bump only for package @nativescript-community/ui-lottie 194 | 195 | ## [4.0.7](https://github.com/farfromrefug/nativescript-lottie/compare/v4.0.6...v4.0.7) (2020-02-26) 196 | 197 | **Note:** Version bump only for package @nativescript-community/ui-lottie 198 | 199 | ## [4.0.6](https://github.com/farfromrefug/nativescript-lottie/compare/v4.0.5...v4.0.6) (2020-02-24) 200 | 201 | **Note:** Version bump only for package @nativescript-community/ui-lottie 202 | 203 | ## [4.0.5](https://github.com/farfromrefug/nativescript-lottie/compare/v4.0.4...v4.0.5) (2020-02-18) 204 | 205 | **Note:** Version bump only for package @nativescript-community/ui-lottie 206 | 207 | ## [4.0.4](https://github.com/farfromrefug/nativescript-lottie/compare/v4.0.3...v4.0.4) (2020-02-14) 208 | 209 | **Note:** Version bump only for package @nativescript-community/ui-lottie 210 | 211 | ## [4.0.3](https://github.com/farfromrefug/nativescript-lottie/compare/v4.0.2...v4.0.3) (2020-02-13) 212 | 213 | **Note:** Version bump only for package @nativescript-community/ui-lottie 214 | 215 | ## 4.0.2 (2020-02-13) 216 | 217 | **Note:** Version bump only for package @nativescript-community/ui-lottie 218 | -------------------------------------------------------------------------------- /packages/lottie/README.md: -------------------------------------------------------------------------------- 1 | 2 | 21 |

@nativescript-community/ui-lottie

22 |

23 | Downloads per month 24 | NPM Version 25 |

26 | 27 |

28 | NativeScript plugin to expose AirBnB Lottie library
29 | 30 |

31 | 32 |
33 | 34 | 35 | | | 36 | | --- | ----------- | 37 | | iOS Demo | Android Demo | 38 | 39 | 40 | [](#table-of-contents) 41 | 42 | ## Table of Contents 43 | 44 | * [Installation](#installation) 45 | * [Usage](#usage) 46 | * [NativeScript (Core)](#nativescript-core) 47 | * [XML](#xml) 48 | * [TS](#ts) 49 | * [NativeScript Angular](#nativescript-angular) 50 | * [Module](#module) 51 | * [XML](#xml-1) 52 | * [Component](#component) 53 | * [NativeScript Vue](#nativescript-vue) 54 | * [Bootstrap](#bootstrap) 55 | * [Component](#component-1) 56 | * [Assets](#assets) 57 | * [Android](#android) 58 | * [iOS](#ios) 59 | * [Properties (bindable)](#properties-bindable) 60 | * [Properties](#properties) 61 | * [Methods](#methods) 62 | * [Contributors](#contributors) 63 | * [Demos and Development](#demos-and-development) 64 | * [Repo Setup](#repo-setup) 65 | * [Build](#build) 66 | * [Demos](#demos) 67 | * [Contributing](#contributing) 68 | * [Update repo ](#update-repo-) 69 | * [Update readme ](#update-readme-) 70 | * [Update doc ](#update-doc-) 71 | * [Publish](#publish) 72 | * [modifying submodules](#modifying-submodules) 73 | * [Questions](#questions) 74 | 75 | 76 | [](#installation) 77 | 78 | ## Installation 79 | Run the following command from the root of your project: 80 | 81 | `ns plugin add @nativescript-community/ui-lottie` 82 | 83 | 84 | [](#usage) 85 | 86 | ## Usage 87 | 88 | ### NativeScript (Core) 89 | 90 | #### XML 91 | 92 | ```xml 93 | 96 | 97 | 98 | 99 | 100 | ``` 101 | 102 | #### TS 103 | 104 | ```typescript 105 | import { LottieView } from "@nativescript-community/ui-lottie"; 106 | 107 | public yourLoadedEvent(args) { 108 | this._myLottie = args.object as LottieView; /// this is the instance of the LottieAnimationView 109 | } 110 | ``` 111 | 112 | --- 113 | 114 | ### NativeScript Angular 115 | 116 | #### Module 117 | 118 | First you need to include the `NativeScriptLottieModule` in your `app.module.ts` 119 | 120 | ```typescript 121 | import { NativeScriptLottieModule} from '@nativescript-community/ui-lottie/angular'; 122 | 123 | @NgModule({ 124 | imports: [ 125 | NativeScriptLottieModule 126 | ], 127 | ... 128 | }) 129 | ``` 130 | 131 | #### XML 132 | 133 | ```xml 134 | 135 | 136 | 137 | ``` 138 | 139 | #### Component 140 | 141 | ```typescript 142 | import { Component } from '@angular/core'; 143 | import { LottieView } from '@nativescript-community/ui-lottie'; 144 | 145 | @Component({ 146 | templateUrl: 'home.component.html', 147 | moduleId: module.id 148 | }) 149 | export class HomeComponent { 150 | public loop: boolean = true; 151 | public src: string; 152 | public autoPlay: boolean = true; 153 | public animations: Array; 154 | 155 | private _lottieView: LottieView; 156 | 157 | constructor() { 158 | this.animations = [ 159 | 'Mobilo/A.json', 160 | 'Mobilo/D.json', 161 | 'Mobilo/N.json', 162 | 'Mobilo/S.json' 163 | ]; 164 | this.src = this.animations[0]; 165 | } 166 | 167 | lottieViewLoaded(event) { 168 | this._lottieView = event.object; 169 | } 170 | } 171 | ``` 172 | 173 | --- 174 | 175 | 176 | [](#nativescript-vue) 177 | 178 | ## NativeScript Vue 179 | 180 | ### Bootstrap 181 | 182 | If you want to use this plugin with Vue, do this in your `app.js` or `main.js`: 183 | 184 | ```javascript 185 | import LottieView from '@nativescript-community/ui-lottie/vue'; 186 | 187 | Vue.use(LottieView); 188 | ``` 189 | 190 | This will install and register `LottieView` component to your `Vue` instance and now you can use the plugin. 191 | 192 | ### Component 193 | 194 | ```xml 195 |