@gem-sdk/core 1.53.0-dev.33 → 1.53.0-dev.34

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.
@@ -14,7 +14,8 @@ const useAnimationConfig = (props)=>{
14
14
  const { animation, setting } = triggerConfig[trigger];
15
15
  return {
16
16
  type: animation,
17
- setting: setting[animation]
17
+ setting: setting[animation],
18
+ reverse: trigger === "hidden"
18
19
  };
19
20
  }, [
20
21
  configByDevices
@@ -25,13 +25,13 @@ const useApplyAnimation = ({ props })=>{
25
25
  setAnimationOnFinish,
26
26
  setToolbarActive
27
27
  });
28
- const generateAnimation = react.useCallback(({ target, setting, type })=>{
29
- return animation[type](target, setting);
28
+ const generateAnimation = react.useCallback(({ target, setting, type, reverse })=>{
29
+ return animation[type](target, setting, reverse);
30
30
  }, [
31
31
  animation
32
32
  ]);
33
33
  const initListAnimations = react.useCallback(()=>{
34
- const { type, setting } = getAnimationConfig();
34
+ const { type, setting, reverse } = getAnimationConfig();
35
35
  if (!type || type === animations.AnimationType.None || !targetObjects.current.length) {
36
36
  cancelAnimation();
37
37
  return;
@@ -39,9 +39,9 @@ const useApplyAnimation = ({ props })=>{
39
39
  const listAnimations = targetObjects.current.map((item)=>generateAnimation({
40
40
  type,
41
41
  setting,
42
- target: item.target
42
+ target: item.target,
43
+ reverse
43
44
  }));
44
- console.log('listAnimations', listAnimations);
45
45
  cancelAnimation();
46
46
  setAnimation(listAnimations);
47
47
  }, [
@@ -12,7 +12,8 @@ const useAnimationConfig = (props)=>{
12
12
  const { animation, setting } = triggerConfig[trigger];
13
13
  return {
14
14
  type: animation,
15
- setting: setting[animation]
15
+ setting: setting[animation],
16
+ reverse: trigger === "hidden"
16
17
  };
17
18
  }, [
18
19
  configByDevices
@@ -21,13 +21,13 @@ const useApplyAnimation = ({ props })=>{
21
21
  setAnimationOnFinish,
22
22
  setToolbarActive
23
23
  });
24
- const generateAnimation = useCallback(({ target, setting, type })=>{
25
- return animation[type](target, setting);
24
+ const generateAnimation = useCallback(({ target, setting, type, reverse })=>{
25
+ return animation[type](target, setting, reverse);
26
26
  }, [
27
27
  animation
28
28
  ]);
29
29
  const initListAnimations = useCallback(()=>{
30
- const { type, setting } = getAnimationConfig();
30
+ const { type, setting, reverse } = getAnimationConfig();
31
31
  if (!type || type === AnimationType.None || !targetObjects.current.length) {
32
32
  cancelAnimation();
33
33
  return;
@@ -35,9 +35,9 @@ const useApplyAnimation = ({ props })=>{
35
35
  const listAnimations = targetObjects.current.map((item)=>generateAnimation({
36
36
  type,
37
37
  setting,
38
- target: item.target
38
+ target: item.target,
39
+ reverse
39
40
  }));
40
- console.log('listAnimations', listAnimations);
41
41
  cancelAnimation();
42
42
  setAnimation(listAnimations);
43
43
  }, [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/core",
3
- "version": "1.53.0-dev.33",
3
+ "version": "1.53.0-dev.34",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",