@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.
@@ -43,7 +43,10 @@ const disableWrap = [
43
43
  'Marquee',
44
44
  'MarqueeItem',
45
45
  'Newsletter',
46
- 'ContactForm'
46
+ 'ContactForm',
47
+ 'SwiperCarousel',
48
+ 'SwiperCarouselItem',
49
+ 'ProductImagesV3'
47
50
  ];
48
51
  const customRenderChildren = [
49
52
  'Accordion',
@@ -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
- normal: getBgImageSourceByDevice(backgroundImage, 'tablet', 'normal', options) ?? getBgImageSourceByDevice(backgroundImage, 'desktop', 'normal', options),
29
- hover: getBgImageSourceByDevice(backgroundImage, 'tablet', 'hover', options) ?? getBgImageSourceByDevice(backgroundImage, 'desktop', 'hover', options)
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
- normal: getBgImageSourceByDevice(backgroundImage, 'mobile', 'normal', options) ?? getBgImageSourceByDevice(backgroundImage, 'tablet', 'normal', options) ?? getBgImageSourceByDevice(backgroundImage, 'desktop', 'normal', options),
33
- hover: getBgImageSourceByDevice(backgroundImage, 'mobile', 'hover', options) ?? getBgImageSourceByDevice(backgroundImage, 'tablet', 'hover', options) ?? getBgImageSourceByDevice(backgroundImage, 'desktop', 'hover', options)
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
- if (!stateValue?.image?.src) return;
41
- const backupFileKey = stateValue.image.backupFileKey;
42
- const storage = stateValue.image.storage;
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];
@@ -41,7 +41,10 @@ const disableWrap = [
41
41
  'Marquee',
42
42
  'MarqueeItem',
43
43
  'Newsletter',
44
- 'ContactForm'
44
+ 'ContactForm',
45
+ 'SwiperCarousel',
46
+ 'SwiperCarouselItem',
47
+ 'ProductImagesV3'
45
48
  ];
46
49
  const customRenderChildren = [
47
50
  'Accordion',
@@ -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
- normal: getBgImageSourceByDevice(backgroundImage, 'tablet', 'normal', options) ?? getBgImageSourceByDevice(backgroundImage, 'desktop', 'normal', options),
27
- hover: getBgImageSourceByDevice(backgroundImage, 'tablet', 'hover', options) ?? getBgImageSourceByDevice(backgroundImage, 'desktop', 'hover', options)
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
- normal: getBgImageSourceByDevice(backgroundImage, 'mobile', 'normal', options) ?? getBgImageSourceByDevice(backgroundImage, 'tablet', 'normal', options) ?? getBgImageSourceByDevice(backgroundImage, 'desktop', 'normal', options),
31
- hover: getBgImageSourceByDevice(backgroundImage, 'mobile', 'hover', options) ?? getBgImageSourceByDevice(backgroundImage, 'tablet', 'hover', options) ?? getBgImageSourceByDevice(backgroundImage, 'desktop', 'hover', options)
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
- if (!stateValue?.image?.src) return;
39
- const backupFileKey = stateValue.image.backupFileKey;
40
- const storage = stateValue.image.storage;
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];
@@ -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 | undefined;
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';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/core",
3
- "version": "2.0.0-dev.621",
3
+ "version": "2.0.0-dev.625",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",