@gem-sdk/core 2.0.0-dev.725 → 2.0.0-dev.733

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.
@@ -95,7 +95,7 @@ const getBgImageByDevice = (background, device, options)=>{
95
95
  };
96
96
  const getStyleBgPosition = (background)=>{
97
97
  const bgPosition = {
98
- desktop: getBgPositionByDevice(background, 'desktop'),
98
+ desktop: getBgPositionByDevice(background, 'desktop') || '50% 50%',
99
99
  tablet: getBgPositionByDevice(background, 'tablet'),
100
100
  mobile: getBgPositionByDevice(background, 'mobile')
101
101
  };
@@ -107,7 +107,7 @@ const getBgPositionByDevice = (background, device)=>{
107
107
  };
108
108
  const getStyleBgSize = (background)=>{
109
109
  const bgSize = {
110
- desktop: getBgSizeByDevice(background, 'desktop'),
110
+ desktop: getBgSizeByDevice(background, 'desktop') || 'cover',
111
111
  tablet: getBgSizeByDevice(background, 'tablet'),
112
112
  mobile: getBgSizeByDevice(background, 'mobile')
113
113
  };
@@ -118,7 +118,7 @@ const getBgSizeByDevice = (background, device)=>{
118
118
  };
119
119
  const getStyleBgRepeat = (background)=>{
120
120
  const bgRepeat = {
121
- desktop: getBgRepeatByDevice(background, 'desktop'),
121
+ desktop: getBgRepeatByDevice(background, 'desktop') || 'no-repeat',
122
122
  tablet: getBgRepeatByDevice(background, 'tablet'),
123
123
  mobile: getBgRepeatByDevice(background, 'mobile')
124
124
  };
@@ -269,7 +269,12 @@ const getBgByDevice = (data)=>{
269
269
  });
270
270
  }
271
271
  });
272
- return bgrStyle;
272
+ return {
273
+ ...bgrStyle,
274
+ ...getStyleBgPosition(backgroundImage),
275
+ ...getStyleBgSize(backgroundImage),
276
+ ...getStyleBgRepeat(backgroundImage)
277
+ };
273
278
  };
274
279
 
275
280
  exports.GRADIENT_BGR_KEY = GRADIENT_BGR_KEY;
@@ -93,7 +93,7 @@ const getBgImageByDevice = (background, device, options)=>{
93
93
  };
94
94
  const getStyleBgPosition = (background)=>{
95
95
  const bgPosition = {
96
- desktop: getBgPositionByDevice(background, 'desktop'),
96
+ desktop: getBgPositionByDevice(background, 'desktop') || '50% 50%',
97
97
  tablet: getBgPositionByDevice(background, 'tablet'),
98
98
  mobile: getBgPositionByDevice(background, 'mobile')
99
99
  };
@@ -105,7 +105,7 @@ const getBgPositionByDevice = (background, device)=>{
105
105
  };
106
106
  const getStyleBgSize = (background)=>{
107
107
  const bgSize = {
108
- desktop: getBgSizeByDevice(background, 'desktop'),
108
+ desktop: getBgSizeByDevice(background, 'desktop') || 'cover',
109
109
  tablet: getBgSizeByDevice(background, 'tablet'),
110
110
  mobile: getBgSizeByDevice(background, 'mobile')
111
111
  };
@@ -116,7 +116,7 @@ const getBgSizeByDevice = (background, device)=>{
116
116
  };
117
117
  const getStyleBgRepeat = (background)=>{
118
118
  const bgRepeat = {
119
- desktop: getBgRepeatByDevice(background, 'desktop'),
119
+ desktop: getBgRepeatByDevice(background, 'desktop') || 'no-repeat',
120
120
  tablet: getBgRepeatByDevice(background, 'tablet'),
121
121
  mobile: getBgRepeatByDevice(background, 'mobile')
122
122
  };
@@ -267,7 +267,12 @@ const getBgByDevice = (data)=>{
267
267
  });
268
268
  }
269
269
  });
270
- return bgrStyle;
270
+ return {
271
+ ...bgrStyle,
272
+ ...getStyleBgPosition(backgroundImage),
273
+ ...getStyleBgSize(backgroundImage),
274
+ ...getStyleBgRepeat(backgroundImage)
275
+ };
271
276
  };
272
277
 
273
278
  export { GRADIENT_BGR_KEY, composeBackgroundCss, getBgByDevice, getBgImageByDevice, getBgVideoByDevice, getColor, getGradientBgrStyleByDevice, getGradientBgrStyleForButton, getStyleBackgroundByDevice, getStyleBgColor, makeFixedBgAttachment };
@@ -5934,6 +5934,8 @@ type PublishedThemePage$1 = {
5934
5934
  themePageOnlineStoreData?: Maybe$1<Array<Maybe$1<PublishedThemePageOnlineStoreData$1>>>;
5935
5935
  type: PublishedThemePageType$1;
5936
5936
  updatedAt?: Maybe$1<Scalars$2['Time']>;
5937
+ isPlatformDefault: boolean;
5938
+ preloadSections?: Maybe$1<Array<Scalars$2['String']>>;
5937
5939
  };
5938
5940
  type PublishedThemePageCustomSection$1 = {
5939
5941
  id: Scalars$2['ID'];
@@ -37693,7 +37695,17 @@ declare const getGradientBgrStyleByDevice: (backgroundStyle: Partial<Record<Devi
37693
37695
  declare const getBgByDevice: (data: {
37694
37696
  backgroundColor: Partial<Record<Devices, string>> | undefined;
37695
37697
  backgroundImage: Partial<Record<Devices, BackgroundImageValue>> | undefined;
37696
- }) => {} | undefined;
37698
+ }) => {
37699
+ "--bgr": string;
37700
+ "--bgr-tablet": string;
37701
+ "--bgr-mobile": string;
37702
+ "--bgs": string;
37703
+ "--bgs-tablet": string;
37704
+ "--bgs-mobile": string;
37705
+ "--bgp": string;
37706
+ "--bgp-tablet": string;
37707
+ "--bgp-mobile": string;
37708
+ } | undefined;
37697
37709
 
37698
37710
  type Options = {
37699
37711
  liquid?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/core",
3
- "version": "2.0.0-dev.725",
3
+ "version": "2.0.0-dev.733",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",