@wix/editor-react-components 1.2464.0 → 1.2466.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -88,17 +88,20 @@ const useAnimationState = (animationConfigMap, initialAnimationState) => {
88
88
  const isInitPhase = animationState.phase === AnimationPhase.Enter || animationState.phase === AnimationPhase.Exit;
89
89
  const isActivePhase = animationState.phase === AnimationPhase.EnterActive || animationState.phase === AnimationPhase.ExitActive;
90
90
  if (isInitPhase) {
91
- window.requestAnimationFrame(() => {
91
+ const frameId = window.requestAnimationFrame(() => {
92
92
  var _a;
93
93
  (_a = afterAnimationInitRef.current) == null ? void 0 : _a.call(afterAnimationInitRef);
94
94
  afterAnimationInitRef.current = null;
95
95
  });
96
- } else if (isActivePhase) {
97
- setTimeout(() => {
96
+ return () => window.cancelAnimationFrame(frameId);
97
+ }
98
+ if (isActivePhase) {
99
+ const timeoutId = setTimeout(() => {
98
100
  var _a;
99
101
  (_a = afterAnimationActiveRef.current) == null ? void 0 : _a.call(afterAnimationActiveRef);
100
102
  afterAnimationActiveRef.current = null;
101
103
  }, animationDuration);
104
+ return () => clearTimeout(timeoutId);
102
105
  }
103
106
  }, [animationState.phase]);
104
107
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/editor-react-components",
3
- "version": "1.2464.0",
3
+ "version": "1.2466.0",
4
4
  "description": "React components for the Wix Editor",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -82,7 +82,7 @@
82
82
  "@wix/sdk": "^1.21.14",
83
83
  "@wix/services-manager-react": "^0.1.27",
84
84
  "@wix/site-service-rendering-context": "^1.0.1",
85
- "@wix/site-ui": "1.205.0",
85
+ "@wix/site-ui": "1.206.0",
86
86
  "@wix/video": "^1.85.0",
87
87
  "@wix/viewer-service-consent-policy": "^1.0.100",
88
88
  "@wix/web-bi-logger": "^2.1.29",
@@ -125,7 +125,7 @@
125
125
  "@wix/editor-elements-test-utils": "^1.0.0",
126
126
  "@wix/editor-react-types": "^1.0.77",
127
127
  "@wix/essentials": "^0.1.28",
128
- "@wix/fed-cli-sled": "^1.0.28",
128
+ "@wix/fed-cli-sled": "^1.0.31",
129
129
  "@wix/image": "^1.437.0",
130
130
  "@wix/image-kit": "^1.118.0",
131
131
  "@wix/janet-build": "^1.0.10",
@@ -197,5 +197,5 @@
197
197
  "registry": "https://registry.npmjs.org/",
198
198
  "access": "public"
199
199
  },
200
- "falconPackageHash": "caa7f49131d35e8cffddc315dcf86966a73a6839b72ecd89658f5b48"
200
+ "falconPackageHash": "ffe7f6cf5f0ac3b556de5cc4be7417b71a316bcec2d456c7259d2736"
201
201
  }