diff --git a/.changeset/late-shirts-mix.md b/.changeset/late-shirts-mix.md new file mode 100644 index 0000000..b0c1180 --- /dev/null +++ b/.changeset/late-shirts-mix.md @@ -0,0 +1,5 @@ +--- +"@dotlottie/dotlottie-js": patch +--- + +added after and enter state diff --git a/.changeset/pre.json b/.changeset/pre.json index ada0be4..53e395a 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -8,6 +8,7 @@ "four-plums-obey", "friendly-windows-rush", "great-actors-arrive", + "late-shirts-mix", "many-chicken-hear", "orange-bobcats-allow", "shy-laws-taste", diff --git a/packages/dotlottie-js/CHANGELOG.md b/packages/dotlottie-js/CHANGELOG.md index 81d474f..0960466 100644 --- a/packages/dotlottie-js/CHANGELOG.md +++ b/packages/dotlottie-js/CHANGELOG.md @@ -1,5 +1,11 @@ # @dotlottie/dotlottie-js +## 0.4.0-beta.7 + +### Patch Changes + +- added after and enter state + ## 0.4.0-beta.6 ### Patch Changes diff --git a/packages/dotlottie-js/package.json b/packages/dotlottie-js/package.json index c05aa1b..b519ae2 100644 --- a/packages/dotlottie-js/package.json +++ b/packages/dotlottie-js/package.json @@ -1,6 +1,6 @@ { "name": "@dotlottie/dotlottie-js", - "version": "0.4.0-beta.6", + "version": "0.4.0-beta.7", "type": "module", "description": "This library helps in creating and modifying .lottie files.", "repository": { diff --git a/packages/dotlottie-js/src/common/dotlottie-state.ts b/packages/dotlottie-js/src/common/dotlottie-state.ts index f263339..f937f1d 100644 --- a/packages/dotlottie-js/src/common/dotlottie-state.ts +++ b/packages/dotlottie-js/src/common/dotlottie-state.ts @@ -40,6 +40,8 @@ export const EVENT_MAP = { mouseenter: 'onMouseEnter', mouseleave: 'onMouseLeave', complete: 'onComplete', + after: 'onAfter', + enter: 'onEnter', }; export const DotLottieStateEvents = Object.values(EVENT_MAP); @@ -77,6 +79,7 @@ export interface XStateTargetEvent { } export interface XState { + after: Record; entry?: () => void; exit?: () => void; meta: StateAnimationSettings;