@gem-sdk/core 1.33.14 → 1.33.15

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.
@@ -204,8 +204,6 @@ const RenderCustomCode = (item)=>{
204
204
  const appendAnimation = (props, liquid)=>{
205
205
  const { advanced, tag } = props;
206
206
  const { animation } = advanced ?? {};
207
- const enableAnimation = animation?.desktop?.enabled || animation?.tablet?.enabled || animation?.mobile?.enabled;
208
- if (!enableAnimation || !animation?.desktop?.triggerConfig) return liquid;
209
207
  const getAnimationType = (settings, type)=>{
210
208
  return settings?.triggerConfig?.[type]?.animation ?? 'none';
211
209
  };
@@ -215,6 +213,12 @@ const appendAnimation = (props, liquid)=>{
215
213
  else if (device === 'mobile') return animation?.mobile ?? animation?.tablet ?? animation?.desktop;
216
214
  return animation?.desktop;
217
215
  };
216
+ const appearDesktop = getAnimationType(getSettingsByDevice('desktop'), 'appear');
217
+ const hoverDesktop = getAnimationType(getSettingsByDevice('desktop'), 'hover');
218
+ const appearTablet = getAnimationType(getSettingsByDevice('tablet'), 'appear');
219
+ const appearMobile = getAnimationType(getSettingsByDevice('mobile'), 'appear');
220
+ const enableAnimation = animation?.desktop?.enabled && (appearDesktop !== 'none' || hoverDesktop !== 'none') || animation?.tablet?.enabled && appearTablet !== 'none' || animation?.mobile?.enabled && appearMobile !== 'none';
221
+ if (!enableAnimation) return liquid;
218
222
  const getInitOpacity = (device)=>+!(getSettingsByDevice(device)?.enabled && ![
219
223
  'shake',
220
224
  'none'
@@ -200,8 +200,6 @@ const RenderCustomCode = (item)=>{
200
200
  const appendAnimation = (props, liquid)=>{
201
201
  const { advanced, tag } = props;
202
202
  const { animation } = advanced ?? {};
203
- const enableAnimation = animation?.desktop?.enabled || animation?.tablet?.enabled || animation?.mobile?.enabled;
204
- if (!enableAnimation || !animation?.desktop?.triggerConfig) return liquid;
205
203
  const getAnimationType = (settings, type)=>{
206
204
  return settings?.triggerConfig?.[type]?.animation ?? 'none';
207
205
  };
@@ -211,6 +209,12 @@ const appendAnimation = (props, liquid)=>{
211
209
  else if (device === 'mobile') return animation?.mobile ?? animation?.tablet ?? animation?.desktop;
212
210
  return animation?.desktop;
213
211
  };
212
+ const appearDesktop = getAnimationType(getSettingsByDevice('desktop'), 'appear');
213
+ const hoverDesktop = getAnimationType(getSettingsByDevice('desktop'), 'hover');
214
+ const appearTablet = getAnimationType(getSettingsByDevice('tablet'), 'appear');
215
+ const appearMobile = getAnimationType(getSettingsByDevice('mobile'), 'appear');
216
+ const enableAnimation = animation?.desktop?.enabled && (appearDesktop !== 'none' || hoverDesktop !== 'none') || animation?.tablet?.enabled && appearTablet !== 'none' || animation?.mobile?.enabled && appearMobile !== 'none';
217
+ if (!enableAnimation) return liquid;
214
218
  const getInitOpacity = (device)=>+!(getSettingsByDevice(device)?.enabled && ![
215
219
  'shake',
216
220
  'none'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/core",
3
- "version": "1.33.14",
3
+ "version": "1.33.15",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",