@gem-sdk/core 2.0.0-dev.621 → 2.0.0-dev.625
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.
|
@@ -24,23 +24,26 @@ const getStyleBgImageSource = (backgroundImage, options)=>{
|
|
|
24
24
|
normal: getBgImageSourceByDevice(backgroundImage, 'desktop', 'normal', options),
|
|
25
25
|
hover: getBgImageSourceByDevice(backgroundImage, 'desktop', 'hover', options)
|
|
26
26
|
},
|
|
27
|
-
tablet
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
...backgroundImage?.tablet && {
|
|
28
|
+
tablet: {
|
|
29
|
+
normal: getBgImageSourceByDevice(backgroundImage, 'tablet', 'normal', options),
|
|
30
|
+
hover: getBgImageSourceByDevice(backgroundImage, 'tablet', 'hover', options)
|
|
31
|
+
}
|
|
30
32
|
},
|
|
31
|
-
mobile
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
...backgroundImage?.mobile && {
|
|
34
|
+
mobile: {
|
|
35
|
+
normal: getBgImageSourceByDevice(backgroundImage, 'mobile', 'normal', options),
|
|
36
|
+
hover: getBgImageSourceByDevice(backgroundImage, 'mobile', 'hover', options)
|
|
37
|
+
}
|
|
34
38
|
}
|
|
35
39
|
};
|
|
36
40
|
return makeStyle.makeStyleResponsiveState('bgi', bgImage);
|
|
37
41
|
};
|
|
38
42
|
const getBgImageSourceByDevice = (backgroundImage, device, state, options)=>{
|
|
39
43
|
const stateValue = backgroundImage?.[device]?.[state];
|
|
40
|
-
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
let imageByDevice = stateValue.image.src;
|
|
44
|
+
const backupFileKey = stateValue?.image?.backupFileKey;
|
|
45
|
+
const storage = stateValue?.image?.storage;
|
|
46
|
+
let imageByDevice = stateValue?.image?.src;
|
|
44
47
|
let newBackupFilekey = backupFileKey;
|
|
45
48
|
const shopifyHandleName = imageByDevice?.match(// eslint-disable-next-line
|
|
46
49
|
/\/files\/([^\/]+\.(jpg|jpeg|gif|png|webp|svg))/)?.[1];
|
|
@@ -22,23 +22,26 @@ const getStyleBgImageSource = (backgroundImage, options)=>{
|
|
|
22
22
|
normal: getBgImageSourceByDevice(backgroundImage, 'desktop', 'normal', options),
|
|
23
23
|
hover: getBgImageSourceByDevice(backgroundImage, 'desktop', 'hover', options)
|
|
24
24
|
},
|
|
25
|
-
tablet
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
...backgroundImage?.tablet && {
|
|
26
|
+
tablet: {
|
|
27
|
+
normal: getBgImageSourceByDevice(backgroundImage, 'tablet', 'normal', options),
|
|
28
|
+
hover: getBgImageSourceByDevice(backgroundImage, 'tablet', 'hover', options)
|
|
29
|
+
}
|
|
28
30
|
},
|
|
29
|
-
mobile
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
...backgroundImage?.mobile && {
|
|
32
|
+
mobile: {
|
|
33
|
+
normal: getBgImageSourceByDevice(backgroundImage, 'mobile', 'normal', options),
|
|
34
|
+
hover: getBgImageSourceByDevice(backgroundImage, 'mobile', 'hover', options)
|
|
35
|
+
}
|
|
32
36
|
}
|
|
33
37
|
};
|
|
34
38
|
return makeStyleResponsiveState('bgi', bgImage);
|
|
35
39
|
};
|
|
36
40
|
const getBgImageSourceByDevice = (backgroundImage, device, state, options)=>{
|
|
37
41
|
const stateValue = backgroundImage?.[device]?.[state];
|
|
38
|
-
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
let imageByDevice = stateValue.image.src;
|
|
42
|
+
const backupFileKey = stateValue?.image?.backupFileKey;
|
|
43
|
+
const storage = stateValue?.image?.storage;
|
|
44
|
+
let imageByDevice = stateValue?.image?.src;
|
|
42
45
|
let newBackupFilekey = backupFileKey;
|
|
43
46
|
const shopifyHandleName = imageByDevice?.match(// eslint-disable-next-line
|
|
44
47
|
/\/files\/([^\/]+\.(jpg|jpeg|gif|png|webp|svg))/)?.[1];
|
package/dist/types/index.d.ts
CHANGED
|
@@ -37693,7 +37693,7 @@ type Options = {
|
|
|
37693
37693
|
};
|
|
37694
37694
|
declare const getStyleBackgroundImageByDevice: (backgroundImage?: ObjectDevices<StateProp<BackgroundImageValue>>, options?: Options) => {};
|
|
37695
37695
|
declare const getStyleBgImageSource: (backgroundImage: ObjectDevices<StateProp<BackgroundImageValue>>, options?: Options) => {};
|
|
37696
|
-
declare const getBgImageSourceByDevice: (backgroundImage: ObjectDevices<StateProp<BackgroundImageValue>>, device: Devices, state: StateType, options?: Options) => string
|
|
37696
|
+
declare const getBgImageSourceByDevice: (backgroundImage: ObjectDevices<StateProp<BackgroundImageValue>>, device: Devices, state: StateType, options?: Options) => string;
|
|
37697
37697
|
declare const composeBackgroundImageCss: (config?: ObjectDevices<StateProp<BackgroundImageValue>>, options?: {
|
|
37698
37698
|
useLiquid?: boolean;
|
|
37699
37699
|
device?: 'desktop' | 'tablet' | 'mobile';
|