@gem-sdk/core 1.33.7 → 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'
|
|
@@ -240,7 +244,7 @@ const appendAnimation = (props, liquid)=>{
|
|
|
240
244
|
...inheritParentStyle
|
|
241
245
|
}}"
|
|
242
246
|
>
|
|
243
|
-
<div style="${{
|
|
247
|
+
<div class="overflow-x-hidden" style="${{
|
|
244
248
|
...makeStyle.makeStyleResponsive('op', opacityObject)
|
|
245
249
|
}}">${liquid}</div>
|
|
246
250
|
</gp-animation>
|
|
@@ -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'
|
|
@@ -236,7 +240,7 @@ const appendAnimation = (props, liquid)=>{
|
|
|
236
240
|
...inheritParentStyle
|
|
237
241
|
}}"
|
|
238
242
|
>
|
|
239
|
-
<div style="${{
|
|
243
|
+
<div class="overflow-x-hidden" style="${{
|
|
240
244
|
...makeStyleResponsive('op', opacityObject)
|
|
241
245
|
}}">${liquid}</div>
|
|
242
246
|
</gp-animation>
|