Skip to content

Commit

Permalink
chore: update versions (#263)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
lottiefiles-bot and github-actions[bot] authored Jun 28, 2024
1 parent ba46fd1 commit d6354a9
Show file tree
Hide file tree
Showing 17 changed files with 154 additions and 106 deletions.
13 changes: 0 additions & 13 deletions .changeset/chatty-ravens-do.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/fast-ghosts-teach.md

This file was deleted.

67 changes: 0 additions & 67 deletions .changeset/mighty-tips-impress.md

This file was deleted.

9 changes: 0 additions & 9 deletions .changeset/thin-humans-run.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/tricky-clocks-repeat.md

This file was deleted.

90 changes: 90 additions & 0 deletions packages/react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,95 @@
# @lottiefiles/dotlottie-react

## 0.7.0

### Minor Changes

- f0226ec: **Feature Update: 🎸 Add optional `animationId`, `themeId`, and `themeData` props to `DotLottieReact`
component**

We are excited to introduce new optional props to the `DotLottieReact` component: `animationId`, `themeId`, and
`themeData`.

**New Features:**

- **`animationId`**: Allows you to specify and render a particular animation from a `.lottie` file containing multiple
animations.
- **`themeId`**: Enables the application of a particular theme from the loaded `.lottie` file to the currently active
animation.
- **`themeData`**: Allows you to pass custom theme data to the currently active animation.

**Usage Example:**

```jsx
import { DotLottieReact } from '@lottiefiles/dotlottie-react';
import React, { useState, useEffect } from 'react';

const App = () => {
const [dotLottie, setDotLottie] = useState(null);
const [animations, setAnimations] = useState([]);
const [themes, setThemes] = useState([]);
const [currentThemeId, setCurrentThemeId] = useState('');
const [currentAnimationId, setCurrentAnimationId] = useState('');

useEffect(() => {
const onLoad = () => {
if (dotLottie) {
setAnimations(dotLottie.manifest.animations || []);
setThemes(dotLottie.manifest.themes || []);
setCurrentAnimationId(dotLottie.activeAnimationId);
setCurrentThemeId(dotLottie.activeThemeId);
}
};

dotLottie?.addEventListener('load', onLoad);

return () => {
dotLottie?.removeEventListener('load', onLoad);
};
}, [dotLottie]);

return (
<div>
<DotLottieReact dotLottieRefCallback={setDotLottie} animationId={currentAnimationId} />
<label>Theme:</label>
{currentThemeId && (
<select value={currentThemeId} onChange={(e) => setCurrentThemeId(e.target.value)}>
{themes.map((theme) => (
<option key={theme.id} value={theme.id}>
{theme.id}
</option>
))}
</select>
)}
<label>Animation:</label>
{currentAnimationId && (
<select value={currentAnimationId} onChange={(e) => setCurrentAnimationId(e.target.value)}>
{animations.map((animation) => (
<option key={animation.id} value={animation.id}>
{animation.id}
</option>
))}
</select>
)}
</div>
);
};
```
- a564ff0: perf(react): ⚡️ render only visible canvas area
This update optimizes the rendering performance by ensuring that only the visible portion of the canvas is rendered,
utilizing the dotlottie-web `setViewport` API.
> Note: No changes are required for existing usage. The optimization is applied internally within the `DotLottieReact`
> component.
### Patch Changes
- Updated dependencies [ba46fd1]
- Updated dependencies [d7c2c20]
- @lottiefiles/[email protected]
## 0.6.5
### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lottiefiles/dotlottie-react",
"version": "0.6.5",
"version": "0.7.0",
"type": "module",
"description": "React wrapper around the dotlottie-web library",
"repository": {
Expand Down
8 changes: 8 additions & 0 deletions packages/solid/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @lottiefiles/dotlottie-solid

## 0.0.3

### Patch Changes

- Updated dependencies [ba46fd1]
- Updated dependencies [d7c2c20]
- @lottiefiles/dotlottie-web@0.26.0

## 0.0.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/solid/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lottiefiles/dotlottie-solid",
"version": "0.0.2",
"version": "0.0.3",
"type": "module",
"description": "Solid wrapper around the dotlottie-web library",
"repository": {
Expand Down
8 changes: 8 additions & 0 deletions packages/svelte/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @lottiefiles/dotlottie-svelte

## 0.3.5

### Patch Changes

- Updated dependencies [ba46fd1]
- Updated dependencies [d7c2c20]
- @lottiefiles/dotlottie-web@0.26.0

## 0.3.4

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/svelte/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lottiefiles/dotlottie-svelte",
"version": "0.3.4",
"version": "0.3.5",
"type": "module",
"description": "Svelte component wrapper around the dotlottie-web library to render Lottie and dotLottie animations",
"repository": {
Expand Down
13 changes: 13 additions & 0 deletions packages/vue/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# @lottiefiles/dotlottie-vue

## 0.4.0

### Minor Changes

- e292df8: feat(vue): 🎸 added markers, animationId, themeId, themeData, autoResizeCanvas and playOnHover props
perf(vue): ⚡️ added setViewport to render visible canvas

### Patch Changes

- Updated dependencies [ba46fd1]
- Updated dependencies [d7c2c20]
- @lottiefiles/dotlottie-web@0.26.0

## 0.3.6

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/vue/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lottiefiles/dotlottie-vue",
"version": "0.3.6",
"version": "0.4.0",
"type": "module",
"description": "Vue wrapper around the dotlottie-web library",
"repository": {
Expand Down
8 changes: 8 additions & 0 deletions packages/wc/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @lottiefiles/dotlottie-wc

## 0.2.6

### Patch Changes

- Updated dependencies [ba46fd1]
- Updated dependencies [d7c2c20]
- @lottiefiles/dotlottie-web@0.26.0

## 0.2.5

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/wc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lottiefiles/dotlottie-wc",
"version": "0.2.5",
"version": "0.2.6",
"type": "module",
"description": "Web component wrapper around the dotlottie-web library",
"repository": {
Expand Down
21 changes: 21 additions & 0 deletions packages/web/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# @lottiefiles/dotlottie-web

## 0.26.0

### Minor Changes

- ba46fd1: feat(web): 🎸 added `loadStateMachineData` & `animationSize` & state machine context related methods

- Integrated [dotlottie-rs v0.1.24](https://github.com/LottieFiles/dotlottie-rs/releases/tag/v0.1.24) WASM bindings.
- New methods added to `DotLottie`:
- `loadStateMachineData(stateMachineData: string): boolean`: Loads the state machine data as a json string.
- `animationSize(): {width: number, height: number}`: Retrieves the original lottie animation size.
- `setStateMachineBooleanContext(name: string, value: boolean): boolean`: Sets the state machine context with a
boolean value.
- `setStateMachineStringContext(name: string, value: string): boolean`: Sets the state machine context with a string
value.
- `setStateMachineNumericContext(name: string, value: number): boolean`: Sets the state machine context with a
numeric value.

### Patch Changes

- d7c2c20: fix(web): 🐛 skip triggering LoadEvent for already loaded animations

## 0.25.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lottiefiles/dotlottie-web",
"version": "0.25.0",
"version": "0.26.0",
"type": "module",
"description": "Lottie and DotLottie player for the web",
"repository": {
Expand Down

0 comments on commit d6354a9

Please sign in to comment.