Skip to content

Commit

Permalink
feat(web): 馃幐 add activeThemeId property (#173)
Browse files Browse the repository at this point in the history
* feat(web): 馃幐 add activeThemeId property

* chore: 馃 update changelog

* chore: 馃 ignore dotlottie-viewer from changesets
  • Loading branch information
theashraf committed Apr 12, 2024
1 parent d6a2e60 commit aa102b0
Show file tree
Hide file tree
Showing 9 changed files with 176 additions and 563 deletions.
7 changes: 7 additions & 0 deletions .changeset/beige-pots-yawn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@lottiefiles/dotlottie-web': patch
---

fix(web): Resolve out-of-bounds table index error caused by invalid image asset embedding in WASM module

Resolves: [#170](https://github.com/LottieFiles/dotlottie-web/issues/170)
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": ["*-example"]
"ignore": ["*-example", "dotlottie-viewer"]
}
5 changes: 5 additions & 0 deletions .changeset/rich-jeans-jam.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@lottiefiles/dotlottie-web': minor
---

feat(web): 馃幐 add activeThemeId property
20 changes: 5 additions & 15 deletions packages/web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* [Setup](#setup)
* [Dev](#dev)
* [Build](#build)
* [Build WASM (Optional)](#build-wasm-optional)
* [Test](#test)

## Introduction

Expand Down Expand Up @@ -175,6 +175,8 @@ The `renderConfig` object accepts the following properties:
| `manifest` | [Manifest](#manifest) \| null | The manifest of the loaded dotLottie file. |
| `marker` | string | The lottie named marker to play. |
| `layout` | [Layout](#layout) | The animation layout configuration. |
| `activeThemeId` | string | The loaded theme id from the .lottie file. |
| `activeAnimationId` | string | The loaded animation id from the .lottie file. |

#### Manifest

Expand Down Expand Up @@ -257,20 +259,8 @@ pnpm dev
pnpm build
```

### Build WASM (Optional)

> **Note:** This step is necessary only if you wish to update the src/renderer.cpp file or the thorvg version being used. If not, you can skip this step.
**Using Docker (Recommended):**

```bash
pnpm build:wasm:docker
```

**Using Emscripten SDK:**

Ensure [Emscripten SDK](https://emscripten.org/docs/getting_started/downloads.html) is installed.
### Test

```bash
pnpm build:wasm /path/to/emsdk/
pnpm test
```

0 comments on commit aa102b0

Please sign in to comment.