From d6354a9368383b72e56261f8d3be312c49b20c63 Mon Sep 17 00:00:00 2001 From: lottiefiles-bot <74151895+lottiefiles-bot@users.noreply.github.com> Date: Fri, 28 Jun 2024 16:33:27 +0800 Subject: [PATCH] chore: update versions (#263) Co-authored-by: github-actions[bot] --- .changeset/chatty-ravens-do.md | 13 ----- .changeset/fast-ghosts-teach.md | 6 -- .changeset/mighty-tips-impress.md | 67 ---------------------- .changeset/thin-humans-run.md | 9 --- .changeset/tricky-clocks-repeat.md | 5 -- packages/react/CHANGELOG.md | 90 ++++++++++++++++++++++++++++++ packages/react/package.json | 2 +- packages/solid/CHANGELOG.md | 8 +++ packages/solid/package.json | 2 +- packages/svelte/CHANGELOG.md | 8 +++ packages/svelte/package.json | 2 +- packages/vue/CHANGELOG.md | 13 +++++ packages/vue/package.json | 2 +- packages/wc/CHANGELOG.md | 8 +++ packages/wc/package.json | 2 +- packages/web/CHANGELOG.md | 21 +++++++ packages/web/package.json | 2 +- 17 files changed, 154 insertions(+), 106 deletions(-) delete mode 100644 .changeset/chatty-ravens-do.md delete mode 100644 .changeset/fast-ghosts-teach.md delete mode 100644 .changeset/mighty-tips-impress.md delete mode 100644 .changeset/thin-humans-run.md delete mode 100644 .changeset/tricky-clocks-repeat.md diff --git a/.changeset/chatty-ravens-do.md b/.changeset/chatty-ravens-do.md deleted file mode 100644 index 1f6107cb..00000000 --- a/.changeset/chatty-ravens-do.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -'@lottiefiles/dotlottie-web': minor ---- - -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. diff --git a/.changeset/fast-ghosts-teach.md b/.changeset/fast-ghosts-teach.md deleted file mode 100644 index 306fb460..00000000 --- a/.changeset/fast-ghosts-teach.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@lottiefiles/dotlottie-vue': minor ---- - -feat(vue): 🎸 added markers, animationId, themeId, themeData, autoResizeCanvas and playOnHover props -perf(vue): ⚡️ added setViewport to render visible canvas diff --git a/.changeset/mighty-tips-impress.md b/.changeset/mighty-tips-impress.md deleted file mode 100644 index b1ef0a1f..00000000 --- a/.changeset/mighty-tips-impress.md +++ /dev/null @@ -1,67 +0,0 @@ ---- -'@lottiefiles/dotlottie-react': minor ---- - -**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 ( -
- - - {currentThemeId && ( - - )} - - {currentAnimationId && ( - - )} -
- ); -}; -``` diff --git a/.changeset/thin-humans-run.md b/.changeset/thin-humans-run.md deleted file mode 100644 index 857b6ade..00000000 --- a/.changeset/thin-humans-run.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'@lottiefiles/dotlottie-react': minor ---- - -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. diff --git a/.changeset/tricky-clocks-repeat.md b/.changeset/tricky-clocks-repeat.md deleted file mode 100644 index 750bbddb..00000000 --- a/.changeset/tricky-clocks-repeat.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@lottiefiles/dotlottie-web': patch ---- - -fix(web): 🐛 skip triggering LoadEvent for already loaded animations diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index 31e2558b..62f0f17e 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -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 ( +
+ + + {currentThemeId && ( + + )} + + {currentAnimationId && ( + + )} +
+ ); + }; + ``` + +- 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/dotlottie-web@0.26.0 + ## 0.6.5 ### Patch Changes diff --git a/packages/react/package.json b/packages/react/package.json index 792ab79c..a267a370 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -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": { diff --git a/packages/solid/CHANGELOG.md b/packages/solid/CHANGELOG.md index b61a0bad..e6d58e7f 100644 --- a/packages/solid/CHANGELOG.md +++ b/packages/solid/CHANGELOG.md @@ -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 diff --git a/packages/solid/package.json b/packages/solid/package.json index 27ad49b1..4747cf03 100644 --- a/packages/solid/package.json +++ b/packages/solid/package.json @@ -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": { diff --git a/packages/svelte/CHANGELOG.md b/packages/svelte/CHANGELOG.md index 3ba86b81..2b81a35a 100644 --- a/packages/svelte/CHANGELOG.md +++ b/packages/svelte/CHANGELOG.md @@ -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 diff --git a/packages/svelte/package.json b/packages/svelte/package.json index 69a9f399..0904eb4e 100644 --- a/packages/svelte/package.json +++ b/packages/svelte/package.json @@ -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": { diff --git a/packages/vue/CHANGELOG.md b/packages/vue/CHANGELOG.md index a6021dc2..93eb1d32 100644 --- a/packages/vue/CHANGELOG.md +++ b/packages/vue/CHANGELOG.md @@ -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 diff --git a/packages/vue/package.json b/packages/vue/package.json index 12a1d5a5..dd6d5f42 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -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": { diff --git a/packages/wc/CHANGELOG.md b/packages/wc/CHANGELOG.md index 7013e31d..4a762b6c 100644 --- a/packages/wc/CHANGELOG.md +++ b/packages/wc/CHANGELOG.md @@ -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 diff --git a/packages/wc/package.json b/packages/wc/package.json index 3b5031e4..037a3851 100644 --- a/packages/wc/package.json +++ b/packages/wc/package.json @@ -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": { diff --git a/packages/web/CHANGELOG.md b/packages/web/CHANGELOG.md index 45212f32..ff3177d0 100644 --- a/packages/web/CHANGELOG.md +++ b/packages/web/CHANGELOG.md @@ -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 diff --git a/packages/web/package.json b/packages/web/package.json index 00b44e94..86305010 100644 --- a/packages/web/package.json +++ b/packages/web/package.json @@ -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": {