@gem-sdk/core 1.53.0-dev.58 → 1.53.0-dev.62

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.
@@ -66,19 +66,17 @@ const ComponentToolbarPreview = (props)=>{
66
66
  interactionData?.settingType
67
67
  ]);
68
68
  const isShowIconInteractionTarget = react.useMemo(()=>{
69
- return interactionData?.item?.targets?.find((t)=>t.uid === props.uid && t?.type !== 'PAGE') && isSelectOnPage && settingType === 'TARGET';
69
+ return interactionData?.item?.targets?.find((t)=>t.uid === props.uid && t?.type !== 'PAGE') && settingType === 'TARGET';
70
70
  }, [
71
71
  interactionData?.item?.targets,
72
- isSelectOnPage,
73
72
  props.uid,
74
73
  settingType
75
74
  ]);
76
75
  const isShowIconInteractionTrigger = react.useMemo(()=>{
77
- return interactionData?.item?.self?.uid === props.uid && interactionData?.item?.self.type !== 'PAGE' && isSelectOnPage && settingType === 'TRIGGER';
76
+ return interactionData?.item?.self?.uid === props.uid && interactionData?.item?.self.type !== 'PAGE' && settingType === 'TRIGGER';
78
77
  }, [
79
78
  interactionData?.item?.self?.type,
80
79
  interactionData?.item?.self?.uid,
81
- isSelectOnPage,
82
80
  props.uid,
83
81
  settingType
84
82
  ]);
@@ -53,10 +53,16 @@ const animations = ()=>{
53
53
  'left',
54
54
  'right'
55
55
  ].includes(direction ?? '') ? 'X' : 'Y';
56
- const isNeg = [
56
+ let isNeg = [
57
57
  'left',
58
58
  'down'
59
59
  ].includes(direction ?? '') ? '-' : '';
60
+ if (reverse) {
61
+ isNeg = [
62
+ 'left',
63
+ 'down'
64
+ ].includes(direction ?? '') ? '' : '-';
65
+ }
60
66
  const preset = [
61
67
  {
62
68
  opacity: 0,
@@ -126,7 +132,10 @@ const animations = ()=>{
126
132
  opacity: 1
127
133
  }
128
134
  ];
129
- const zoomPreset = zoomDirection === 'in' ? zoomInPreset : zoomOutPreset;
135
+ let zoomPreset = zoomDirection === 'in' ? zoomInPreset : zoomOutPreset;
136
+ if (reverse) {
137
+ zoomPreset = zoomDirection === 'in' ? zoomOutPreset : zoomInPreset;
138
+ }
130
139
  return generateAnimationInstance(target, reverse ? zoomPreset.reverse() : zoomPreset, {
131
140
  ...generateOptions(normalizedOptions, 700)
132
141
  });
@@ -62,19 +62,17 @@ const ComponentToolbarPreview = (props)=>{
62
62
  interactionData?.settingType
63
63
  ]);
64
64
  const isShowIconInteractionTarget = useMemo(()=>{
65
- return interactionData?.item?.targets?.find((t)=>t.uid === props.uid && t?.type !== 'PAGE') && isSelectOnPage && settingType === 'TARGET';
65
+ return interactionData?.item?.targets?.find((t)=>t.uid === props.uid && t?.type !== 'PAGE') && settingType === 'TARGET';
66
66
  }, [
67
67
  interactionData?.item?.targets,
68
- isSelectOnPage,
69
68
  props.uid,
70
69
  settingType
71
70
  ]);
72
71
  const isShowIconInteractionTrigger = useMemo(()=>{
73
- return interactionData?.item?.self?.uid === props.uid && interactionData?.item?.self.type !== 'PAGE' && isSelectOnPage && settingType === 'TRIGGER';
72
+ return interactionData?.item?.self?.uid === props.uid && interactionData?.item?.self.type !== 'PAGE' && settingType === 'TRIGGER';
74
73
  }, [
75
74
  interactionData?.item?.self?.type,
76
75
  interactionData?.item?.self?.uid,
77
- isSelectOnPage,
78
76
  props.uid,
79
77
  settingType
80
78
  ]);
@@ -51,10 +51,16 @@ const animations = ()=>{
51
51
  'left',
52
52
  'right'
53
53
  ].includes(direction ?? '') ? 'X' : 'Y';
54
- const isNeg = [
54
+ let isNeg = [
55
55
  'left',
56
56
  'down'
57
57
  ].includes(direction ?? '') ? '-' : '';
58
+ if (reverse) {
59
+ isNeg = [
60
+ 'left',
61
+ 'down'
62
+ ].includes(direction ?? '') ? '' : '-';
63
+ }
58
64
  const preset = [
59
65
  {
60
66
  opacity: 0,
@@ -124,7 +130,10 @@ const animations = ()=>{
124
130
  opacity: 1
125
131
  }
126
132
  ];
127
- const zoomPreset = zoomDirection === 'in' ? zoomInPreset : zoomOutPreset;
133
+ let zoomPreset = zoomDirection === 'in' ? zoomInPreset : zoomOutPreset;
134
+ if (reverse) {
135
+ zoomPreset = zoomDirection === 'in' ? zoomOutPreset : zoomInPreset;
136
+ }
128
137
  return generateAnimationInstance(target, reverse ? zoomPreset.reverse() : zoomPreset, {
129
138
  ...generateOptions(normalizedOptions, 700)
130
139
  });
@@ -31400,7 +31400,7 @@ type PageContextProps = {
31400
31400
  setInteractionItem: (item: Interaction) => void;
31401
31401
  setInteractionIsSelectOnPage: (value: boolean) => void;
31402
31402
  setInteractionSelectType: (selectType: 'ELEMENT' | 'PAGE') => void;
31403
- setInteractionSettingType: (settingType: 'TRIGGER' | 'TARGET') => void;
31403
+ setInteractionSettingType: (settingType?: 'TRIGGER' | 'TARGET') => void;
31404
31404
  };
31405
31405
  type PageProviderProps = Pick<PageContextProps, 'dynamicProduct' | 'dynamicCollection' | 'productOffers'> & {
31406
31406
  children: React.ReactNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/core",
3
- "version": "1.53.0-dev.58",
3
+ "version": "1.53.0-dev.62",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",