Skip to content

Commit

Permalink
feat: added after and enter state types
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelOsborne committed Jul 27, 2023
1 parent 83751c6 commit 21063a2
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/late-shirts-mix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@dotlottie/dotlottie-js": patch
---

added after and enter state
1 change: 1 addition & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 6 additions & 0 deletions packages/dotlottie-js/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/dotlottie-js/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
3 changes: 3 additions & 0 deletions packages/dotlottie-js/src/common/dotlottie-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -77,6 +79,7 @@ export interface XStateTargetEvent {
}

export interface XState {
after: Record<number, XStateTargetEvent>;
entry?: () => void;
exit?: () => void;
meta: StateAnimationSettings;
Expand Down

0 comments on commit 21063a2

Please sign in to comment.