@gem-sdk/core 1.22.1 → 1.22.3

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.
@@ -61,6 +61,7 @@ const ComponentWrapperPreview = ({ children, ...props })=>{
61
61
  advanced: advanced
62
62
  }),
63
63
  /*#__PURE__*/ jsxRuntime.jsx(children.type, {
64
+ className: advanced?.cssClass,
64
65
  ...children.props,
65
66
  style,
66
67
  builderAttrs,
@@ -78,7 +79,7 @@ const ComponentWrapperPreview = ({ children, ...props })=>{
78
79
  }),
79
80
  /*#__PURE__*/ jsxRuntime.jsx("div", {
80
81
  style: style,
81
- className: `${props.uid}`,
82
+ className: `${props.uid} ${props.advanced?.cssClass ? props.advanced?.cssClass : ''}`,
82
83
  ...builderAttrs,
83
84
  children: children
84
85
  })
@@ -16,7 +16,7 @@ const componentTexts = [
16
16
  'Text',
17
17
  'Heading'
18
18
  ];
19
- const Render = ({ uid, builder, components, parentId, extraFiles = {}, ...passProps })=>{
19
+ const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageContext, ...passProps })=>{
20
20
  const item = builder[uid];
21
21
  const Component = components[item?.tag];
22
22
  if (!Component) {
@@ -55,6 +55,7 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, ...passPr
55
55
  style,
56
56
  advanced: item.advanced,
57
57
  parentId: componentsRenderWithParentId.includes(item.tag) ? parentId : null,
58
+ pageContext,
58
59
  ...passProps,
59
60
  rawChildren: item.childrens.map((id)=>{
60
61
  return {
@@ -62,7 +63,8 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, ...passPr
62
63
  uid: id,
63
64
  builder,
64
65
  components,
65
- customProps
66
+ customProps,
67
+ pageContext
66
68
  };
67
69
  }),
68
70
  children: !constant.customRenderChildren.includes(item.tag) ? WrapRenderChildren({
@@ -73,7 +75,8 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, ...passPr
73
75
  builder,
74
76
  components,
75
77
  customProps,
76
- parentTag: item.tag
78
+ parentTag: item.tag,
79
+ pageContext
77
80
  }))) : ''
78
81
  });
79
82
  }, ()=>{
@@ -88,6 +91,7 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, ...passPr
88
91
  style,
89
92
  isText: componentTexts.includes(item.tag) ? true : null,
90
93
  parentId: componentsRenderWithParentId.includes(item.tag) ? parentId : null,
94
+ pageContext,
91
95
  ...passProps
92
96
  });
93
97
  });
@@ -101,6 +105,10 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, ...passPr
101
105
  },
102
106
  styles: item.styles,
103
107
  setting: item.settings,
108
+ advanced: {
109
+ cssClass: item?.advanced?.cssClass
110
+ },
111
+ pageContext,
104
112
  ...passProps,
105
113
  rawChildren: item.childrens.map((id)=>{
106
114
  return {
@@ -108,7 +116,8 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, ...passPr
108
116
  uid: id,
109
117
  builder,
110
118
  components,
111
- customProps
119
+ customProps,
120
+ pageContext
112
121
  };
113
122
  }),
114
123
  children: !constant.customRenderChildren.includes(item.tag) ? WrapRenderChildren({
@@ -119,7 +128,8 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, ...passPr
119
128
  builder,
120
129
  components,
121
130
  customProps,
122
- parentTag: item.tag
131
+ parentTag: item.tag,
132
+ pageContext
123
133
  }))) : ''
124
134
  });
125
135
  }, ()=>{
@@ -130,6 +140,10 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, ...passPr
130
140
  },
131
141
  styles: item.styles,
132
142
  setting: item.settings,
143
+ advanced: {
144
+ cssClass: item?.advanced?.cssClass
145
+ },
146
+ pageContext,
133
147
  isText: componentTexts.includes(item.tag) ? true : null,
134
148
  ...passProps
135
149
  });
@@ -183,7 +197,7 @@ const RenderChildren = (props)=>{
183
197
  if (Math.ceil(size / 1024) >= 180) {
184
198
  const fileName = `gp-section-snippet-${props.uid}`;
185
199
  props.customProps.extraFiles[fileName] = data.liquid;
186
- return `{% render '${fileName}', product: product, variant: variant, product_form_id: product_form_id %}`;
200
+ return `{% render '${fileName}', product: product, variant: variant, product_form_id: product_form_id, productSelectedVariant: productSelectedVariant %}`;
187
201
  }
188
202
  return data.liquid;
189
203
  };
@@ -200,7 +214,7 @@ const WrapRenderChildren = ({ uid, customProps }, codes)=>{
200
214
  if (Math.ceil(size / 1024) >= 180) {
201
215
  const fileName = `gp-section-snippet-${uid + i}`;
202
216
  customProps.extraFiles[fileName] = code;
203
- liquid += `{% render '${fileName}', product: product, variant: variant, product_form_id: product_form_id %}`;
217
+ liquid += `{% render '${fileName}', product: product, variant: variant, product_form_id: product_form_id, productSelectedVariant: productSelectedVariant %}`;
204
218
  } else {
205
219
  liquid += code;
206
220
  }
@@ -34,14 +34,15 @@ const disableWrap = [
34
34
  'ProductPrice',
35
35
  'Product',
36
36
  'ProductImages',
37
+ 'ProductImagesV2',
37
38
  'Sticky'
38
39
  ];
39
40
  const customRenderChildren = [
40
- "Accordion",
41
- "AccordionItem",
42
- "Row",
43
- "IconList",
44
- "Tabs"
41
+ 'Accordion',
42
+ 'AccordionItem',
43
+ 'Row',
44
+ 'IconList',
45
+ 'Tabs'
45
46
  ];
46
47
 
47
48
  exports.customRenderChildren = customRenderChildren;
@@ -58,6 +58,7 @@ function composeAdvanceStyle(data, tag) {
58
58
  ];
59
59
  Object.keys(data).forEach((attr)=>{
60
60
  const value = data[attr];
61
+ if (attr === 'cssClass') return;
61
62
  if (value === undefined || value === null) return;
62
63
  const hasBoxShadow = data.hasBoxShadow ? data.hasBoxShadow : {};
63
64
  if (typeof value === 'object') {
@@ -94,11 +94,22 @@ const makeHeight = (heighValue, autoHeight)=>{
94
94
  };
95
95
  };
96
96
  const makeAspectRatio = (aspectRatio, aspectWidth, aspectHeight)=>{
97
- return {
98
- desktop: aspectRatio?.desktop === 'custom' ? `${getResonsiveValue.getResponsiveValueByScreen(aspectWidth, 'desktop')}/${getResonsiveValue.getResponsiveValueByScreen(aspectHeight, 'desktop')}` : aspectRatio?.desktop,
99
- tablet: aspectRatio?.tablet === 'custom' ? `${getResonsiveValue.getResponsiveValueByScreen(aspectWidth, 'tablet')}/${getResonsiveValue.getResponsiveValueByScreen(aspectHeight, 'tablet')}` : aspectRatio?.tablet,
100
- mobile: aspectRatio?.mobile === 'custom' ? `${getResonsiveValue.getResponsiveValueByScreen(aspectWidth, 'mobile')}/${getResonsiveValue.getResponsiveValueByScreen(aspectHeight, 'mobile')}` : aspectRatio?.mobile
101
- };
97
+ let result = {};
98
+ const DEVICES = [
99
+ 'desktop',
100
+ 'mobile',
101
+ 'tablet'
102
+ ];
103
+ DEVICES.forEach((device)=>{
104
+ const aspectRatioDevice = getResonsiveValue.getResponsiveValueByScreen(aspectRatio, device);
105
+ if (aspectRatioDevice !== 'none') {
106
+ result = {
107
+ ...result,
108
+ [device]: aspectRatioDevice !== 'custom' ? aspectRatioDevice : `${getResonsiveValue.getResponsiveValueByScreen(aspectWidth, 'desktop')}/${getResonsiveValue.getResponsiveValueByScreen(aspectHeight, 'desktop')}`
109
+ };
110
+ }
111
+ });
112
+ return result;
102
113
  };
103
114
  const makeLineClamp = (lineClampValue, hasLineClampValue)=>{
104
115
  const getVal = (deviceValue, lineClampValue, hasLineClampValue)=>{
@@ -4,11 +4,12 @@ var products_generated = require('../../graphql/queries/products.generated.js');
4
4
  var getCollection = require('./get-collection.js');
5
5
  var getProduct = require('./get-product.js');
6
6
 
7
- const getProducts = async (fetcher, { ids, isSample, isStorefront })=>{
7
+ const getProducts = async (fetcher, { ids, isSample, isStorefront, defaultSelectedProductCount })=>{
8
8
  const products = await loopFetchProducts(fetcher, {
9
9
  ids,
10
10
  isSample,
11
- isStorefront
11
+ isStorefront,
12
+ defaultSelectedProductCount
12
13
  });
13
14
  if (!products) {
14
15
  throw new Error('Product not found');
@@ -61,8 +62,9 @@ const fetchProducts = async (fetcher, variables)=>{
61
62
  variables
62
63
  ]);
63
64
  };
64
- const loopFetchProducts = async (fetcher, { ids, isSample, isStorefront })=>{
65
- const numberOfProducts = (ids?.length == 0 ? 4 : ids?.length) ?? 4;
65
+ const loopFetchProducts = async (fetcher, { ids, isSample, isStorefront, defaultSelectedProductCount })=>{
66
+ const defaultNumberOfProducts = defaultSelectedProductCount || 4;
67
+ const numberOfProducts = (ids?.length == 0 ? defaultNumberOfProducts : ids?.length) ?? defaultNumberOfProducts;
66
68
  const productsPerPage = 8; // number of products per page
67
69
  let variables; // variables of collection query
68
70
  let productAfterFetcher; // product after of collection query
@@ -44,6 +44,13 @@ const composeRadius = (value)=>{
44
44
  }
45
45
  return composeRadiusState(value);
46
46
  };
47
+ const composeRadiusResponsive = (radiusValue)=>{
48
+ const style = {};
49
+ Object.assign(style, getCustomRadius('normal', radiusValue?.desktop, 'desktop'));
50
+ Object.assign(style, getCustomRadius('normal', radiusValue?.tablet, 'tablet'));
51
+ Object.assign(style, getCustomRadius('normal', radiusValue?.mobile, 'mobile'));
52
+ return style;
53
+ };
47
54
  const composeRadiusState = (radiusValue, device)=>{
48
55
  const style = {};
49
56
  switch(radiusValue?.normal?.radiusType){
@@ -126,6 +133,7 @@ const composeCornerCss = (value, important = false)=>{
126
133
 
127
134
  exports.composeCornerCss = composeCornerCss;
128
135
  exports.composeRadius = composeRadius;
136
+ exports.composeRadiusResponsive = composeRadiusResponsive;
129
137
  exports.getCornerCSSFromGlobal = getCornerCSSFromGlobal;
130
138
  exports.getCustomRadius = getCustomRadius;
131
139
  exports.getRadiusCSSFromGlobal = getRadiusCSSFromGlobal;
@@ -6,14 +6,15 @@ var query = require('../../helpers/query.js');
6
6
  var shop = require('../shop.js');
7
7
  var useFetchHandle = require('../useFetchHandle.js');
8
8
 
9
- const useProductsQuery = (ids, options)=>{
9
+ const useProductsQuery = (ids, options, defaultSelectedProductCount)=>{
10
10
  const fetcher = useFetchHandle.useFetchHandle();
11
11
  const isSample = shop.useIsSampleProduct();
12
12
  const isStorefront = shop.useIsStorefrontProduct();
13
13
  return useSWR(ids ? query.generateProductsQueryKey({
14
14
  ids,
15
15
  isSample,
16
- isStorefront
16
+ isStorefront,
17
+ defaultSelectedProductCount
17
18
  }) : null, async ([, arg])=>{
18
19
  return getProducts.getProducts(fetcher, arg);
19
20
  }, options);
package/dist/cjs/index.js CHANGED
@@ -192,6 +192,7 @@ exports.composeTypographyV2Css = typography.composeTypographyV2Css;
192
192
  exports.genTypoClass = typography.genTypoClass;
193
193
  exports.composeCornerCss = radius.composeCornerCss;
194
194
  exports.composeRadius = radius.composeRadius;
195
+ exports.composeRadiusResponsive = radius.composeRadiusResponsive;
195
196
  exports.getCornerCSSFromGlobal = radius.getCornerCSSFromGlobal;
196
197
  exports.getCustomRadius = radius.getCustomRadius;
197
198
  exports.getRadiusCSSFromGlobal = radius.getRadiusCSSFromGlobal;
@@ -57,6 +57,7 @@ const ComponentWrapperPreview = ({ children, ...props })=>{
57
57
  advanced: advanced
58
58
  }),
59
59
  /*#__PURE__*/ jsx(children.type, {
60
+ className: advanced?.cssClass,
60
61
  ...children.props,
61
62
  style,
62
63
  builderAttrs,
@@ -74,7 +75,7 @@ const ComponentWrapperPreview = ({ children, ...props })=>{
74
75
  }),
75
76
  /*#__PURE__*/ jsx("div", {
76
77
  style: style,
77
- className: `${props.uid}`,
78
+ className: `${props.uid} ${props.advanced?.cssClass ? props.advanced?.cssClass : ''}`,
78
79
  ...builderAttrs,
79
80
  children: children
80
81
  })
@@ -12,7 +12,7 @@ const componentTexts = [
12
12
  'Text',
13
13
  'Heading'
14
14
  ];
15
- const Render = ({ uid, builder, components, parentId, extraFiles = {}, ...passProps })=>{
15
+ const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageContext, ...passProps })=>{
16
16
  const item = builder[uid];
17
17
  const Component = components[item?.tag];
18
18
  if (!Component) {
@@ -51,6 +51,7 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, ...passPr
51
51
  style,
52
52
  advanced: item.advanced,
53
53
  parentId: componentsRenderWithParentId.includes(item.tag) ? parentId : null,
54
+ pageContext,
54
55
  ...passProps,
55
56
  rawChildren: item.childrens.map((id)=>{
56
57
  return {
@@ -58,7 +59,8 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, ...passPr
58
59
  uid: id,
59
60
  builder,
60
61
  components,
61
- customProps
62
+ customProps,
63
+ pageContext
62
64
  };
63
65
  }),
64
66
  children: !customRenderChildren.includes(item.tag) ? WrapRenderChildren({
@@ -69,7 +71,8 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, ...passPr
69
71
  builder,
70
72
  components,
71
73
  customProps,
72
- parentTag: item.tag
74
+ parentTag: item.tag,
75
+ pageContext
73
76
  }))) : ''
74
77
  });
75
78
  }, ()=>{
@@ -84,6 +87,7 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, ...passPr
84
87
  style,
85
88
  isText: componentTexts.includes(item.tag) ? true : null,
86
89
  parentId: componentsRenderWithParentId.includes(item.tag) ? parentId : null,
90
+ pageContext,
87
91
  ...passProps
88
92
  });
89
93
  });
@@ -97,6 +101,10 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, ...passPr
97
101
  },
98
102
  styles: item.styles,
99
103
  setting: item.settings,
104
+ advanced: {
105
+ cssClass: item?.advanced?.cssClass
106
+ },
107
+ pageContext,
100
108
  ...passProps,
101
109
  rawChildren: item.childrens.map((id)=>{
102
110
  return {
@@ -104,7 +112,8 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, ...passPr
104
112
  uid: id,
105
113
  builder,
106
114
  components,
107
- customProps
115
+ customProps,
116
+ pageContext
108
117
  };
109
118
  }),
110
119
  children: !customRenderChildren.includes(item.tag) ? WrapRenderChildren({
@@ -115,7 +124,8 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, ...passPr
115
124
  builder,
116
125
  components,
117
126
  customProps,
118
- parentTag: item.tag
127
+ parentTag: item.tag,
128
+ pageContext
119
129
  }))) : ''
120
130
  });
121
131
  }, ()=>{
@@ -126,6 +136,10 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, ...passPr
126
136
  },
127
137
  styles: item.styles,
128
138
  setting: item.settings,
139
+ advanced: {
140
+ cssClass: item?.advanced?.cssClass
141
+ },
142
+ pageContext,
129
143
  isText: componentTexts.includes(item.tag) ? true : null,
130
144
  ...passProps
131
145
  });
@@ -179,7 +193,7 @@ const RenderChildren = (props)=>{
179
193
  if (Math.ceil(size / 1024) >= 180) {
180
194
  const fileName = `gp-section-snippet-${props.uid}`;
181
195
  props.customProps.extraFiles[fileName] = data.liquid;
182
- return `{% render '${fileName}', product: product, variant: variant, product_form_id: product_form_id %}`;
196
+ return `{% render '${fileName}', product: product, variant: variant, product_form_id: product_form_id, productSelectedVariant: productSelectedVariant %}`;
183
197
  }
184
198
  return data.liquid;
185
199
  };
@@ -196,7 +210,7 @@ const WrapRenderChildren = ({ uid, customProps }, codes)=>{
196
210
  if (Math.ceil(size / 1024) >= 180) {
197
211
  const fileName = `gp-section-snippet-${uid + i}`;
198
212
  customProps.extraFiles[fileName] = code;
199
- liquid += `{% render '${fileName}', product: product, variant: variant, product_form_id: product_form_id %}`;
213
+ liquid += `{% render '${fileName}', product: product, variant: variant, product_form_id: product_form_id, productSelectedVariant: productSelectedVariant %}`;
200
214
  } else {
201
215
  liquid += code;
202
216
  }
@@ -32,14 +32,15 @@ const disableWrap = [
32
32
  'ProductPrice',
33
33
  'Product',
34
34
  'ProductImages',
35
+ 'ProductImagesV2',
35
36
  'Sticky'
36
37
  ];
37
38
  const customRenderChildren = [
38
- "Accordion",
39
- "AccordionItem",
40
- "Row",
41
- "IconList",
42
- "Tabs"
39
+ 'Accordion',
40
+ 'AccordionItem',
41
+ 'Row',
42
+ 'IconList',
43
+ 'Tabs'
43
44
  ];
44
45
 
45
46
  export { customRenderChildren, disableWrap };
@@ -56,6 +56,7 @@ function composeAdvanceStyle(data, tag) {
56
56
  ];
57
57
  Object.keys(data).forEach((attr)=>{
58
58
  const value = data[attr];
59
+ if (attr === 'cssClass') return;
59
60
  if (value === undefined || value === null) return;
60
61
  const hasBoxShadow = data.hasBoxShadow ? data.hasBoxShadow : {};
61
62
  if (typeof value === 'object') {
@@ -92,11 +92,22 @@ const makeHeight = (heighValue, autoHeight)=>{
92
92
  };
93
93
  };
94
94
  const makeAspectRatio = (aspectRatio, aspectWidth, aspectHeight)=>{
95
- return {
96
- desktop: aspectRatio?.desktop === 'custom' ? `${getResponsiveValueByScreen(aspectWidth, 'desktop')}/${getResponsiveValueByScreen(aspectHeight, 'desktop')}` : aspectRatio?.desktop,
97
- tablet: aspectRatio?.tablet === 'custom' ? `${getResponsiveValueByScreen(aspectWidth, 'tablet')}/${getResponsiveValueByScreen(aspectHeight, 'tablet')}` : aspectRatio?.tablet,
98
- mobile: aspectRatio?.mobile === 'custom' ? `${getResponsiveValueByScreen(aspectWidth, 'mobile')}/${getResponsiveValueByScreen(aspectHeight, 'mobile')}` : aspectRatio?.mobile
99
- };
95
+ let result = {};
96
+ const DEVICES = [
97
+ 'desktop',
98
+ 'mobile',
99
+ 'tablet'
100
+ ];
101
+ DEVICES.forEach((device)=>{
102
+ const aspectRatioDevice = getResponsiveValueByScreen(aspectRatio, device);
103
+ if (aspectRatioDevice !== 'none') {
104
+ result = {
105
+ ...result,
106
+ [device]: aspectRatioDevice !== 'custom' ? aspectRatioDevice : `${getResponsiveValueByScreen(aspectWidth, 'desktop')}/${getResponsiveValueByScreen(aspectHeight, 'desktop')}`
107
+ };
108
+ }
109
+ });
110
+ return result;
100
111
  };
101
112
  const makeLineClamp = (lineClampValue, hasLineClampValue)=>{
102
113
  const getVal = (deviceValue, lineClampValue, hasLineClampValue)=>{
@@ -2,11 +2,12 @@ import { ProductsDocument } from '../../graphql/queries/products.generated.js';
2
2
  import { calculateFirstProduct } from './get-collection.js';
3
3
  import { fetchVariants, fetchMedias } from './get-product.js';
4
4
 
5
- const getProducts = async (fetcher, { ids, isSample, isStorefront })=>{
5
+ const getProducts = async (fetcher, { ids, isSample, isStorefront, defaultSelectedProductCount })=>{
6
6
  const products = await loopFetchProducts(fetcher, {
7
7
  ids,
8
8
  isSample,
9
- isStorefront
9
+ isStorefront,
10
+ defaultSelectedProductCount
10
11
  });
11
12
  if (!products) {
12
13
  throw new Error('Product not found');
@@ -59,8 +60,9 @@ const fetchProducts = async (fetcher, variables)=>{
59
60
  variables
60
61
  ]);
61
62
  };
62
- const loopFetchProducts = async (fetcher, { ids, isSample, isStorefront })=>{
63
- const numberOfProducts = (ids?.length == 0 ? 4 : ids?.length) ?? 4;
63
+ const loopFetchProducts = async (fetcher, { ids, isSample, isStorefront, defaultSelectedProductCount })=>{
64
+ const defaultNumberOfProducts = defaultSelectedProductCount || 4;
65
+ const numberOfProducts = (ids?.length == 0 ? defaultNumberOfProducts : ids?.length) ?? defaultNumberOfProducts;
64
66
  const productsPerPage = 8; // number of products per page
65
67
  let variables; // variables of collection query
66
68
  let productAfterFetcher; // product after of collection query
@@ -42,6 +42,13 @@ const composeRadius = (value)=>{
42
42
  }
43
43
  return composeRadiusState(value);
44
44
  };
45
+ const composeRadiusResponsive = (radiusValue)=>{
46
+ const style = {};
47
+ Object.assign(style, getCustomRadius('normal', radiusValue?.desktop, 'desktop'));
48
+ Object.assign(style, getCustomRadius('normal', radiusValue?.tablet, 'tablet'));
49
+ Object.assign(style, getCustomRadius('normal', radiusValue?.mobile, 'mobile'));
50
+ return style;
51
+ };
45
52
  const composeRadiusState = (radiusValue, device)=>{
46
53
  const style = {};
47
54
  switch(radiusValue?.normal?.radiusType){
@@ -122,4 +129,4 @@ const composeCornerCss = (value, important = false)=>{
122
129
  return radiusValue;
123
130
  };
124
131
 
125
- export { composeCornerCss, composeRadius, getCornerCSSFromGlobal, getCustomRadius, getRadiusCSSFromGlobal, getRadiusStyleActiveState };
132
+ export { composeCornerCss, composeRadius, composeRadiusResponsive, getCornerCSSFromGlobal, getCustomRadius, getRadiusCSSFromGlobal, getRadiusStyleActiveState };
@@ -4,14 +4,15 @@ import { generateProductsQueryKey } from '../../helpers/query.js';
4
4
  import { useIsSampleProduct, useIsStorefrontProduct } from '../shop.js';
5
5
  import { useFetchHandle } from '../useFetchHandle.js';
6
6
 
7
- const useProductsQuery = (ids, options)=>{
7
+ const useProductsQuery = (ids, options, defaultSelectedProductCount)=>{
8
8
  const fetcher = useFetchHandle();
9
9
  const isSample = useIsSampleProduct();
10
10
  const isStorefront = useIsStorefrontProduct();
11
11
  return useSWR(ids ? generateProductsQueryKey({
12
12
  ids,
13
13
  isSample,
14
- isStorefront
14
+ isStorefront,
15
+ defaultSelectedProductCount
15
16
  }) : null, async ([, arg])=>{
16
17
  return getProducts(fetcher, arg);
17
18
  }, options);
package/dist/esm/index.js CHANGED
@@ -41,7 +41,7 @@ export { composeGridLayout, convertOldLayout, gridToArrayRegex, optionLayoutStyl
41
41
  export { isDefined } from './helpers/is-defined.js';
42
42
  export { composeTextColorCss, getGlobalColorCSSProp, getGlobalColorClass, getGlobalColorResponsiveClass, getGlobalColorResponsiveStyle, getGlobalColorStateClass, getGlobalColorStateClassDynamicBtn, getGlobalColorStateResponsiveClass, getGlobalColorStateResponsiveClassDynamicBtn, getGlobalColorStateResponsiveStyle, getGlobalColorStateStyle, getGlobalColorStyle, getSingleColorVariable, isColor } from './helpers/colors.js';
43
43
  export { composeTypography, composeTypographyAttr, composeTypographyClassName, composeTypographyCss, composeTypographyStyle, composeTypographyV2, composeTypographyV2Css, genTypoClass } from './helpers/typography.js';
44
- export { composeCornerCss, composeRadius, getCornerCSSFromGlobal, getCustomRadius, getRadiusCSSFromGlobal, getRadiusStyleActiveState } from './helpers/radius.js';
44
+ export { composeCornerCss, composeRadius, composeRadiusResponsive, getCornerCSSFromGlobal, getCustomRadius, getRadiusCSSFromGlobal, getRadiusStyleActiveState } from './helpers/radius.js';
45
45
  export { checkAvailableVariantInStock, getSelectedVariant, parseSelectedOption } from './helpers/product.js';
46
46
  import * as fpixel from './helpers/tracking/fpixel.js';
47
47
  export { fpixel };
@@ -26,39 +26,6 @@ type Props$1 = {
26
26
  };
27
27
  declare const RenderPreviewMemo: React.NamedExoticComponent<Props$1>;
28
28
 
29
- type ExtraFiles = Record<string, string>;
30
- type Props = {
31
- uid: string;
32
- builder: Record<string, any>;
33
- components: Record<string, any>;
34
- extraFiles?: ExtraFiles;
35
- [key: string]: any;
36
- };
37
- declare const Render: ({ uid, builder, components, parentId, extraFiles, ...passProps }: Props) => {
38
- liquid: string;
39
- extraFiles: ExtraFiles;
40
- };
41
- declare const RenderChildren: (props: Props) => string;
42
- declare const WrapRenderChildren: ({ uid, customProps, }: {
43
- uid: string;
44
- customProps: {
45
- extraFiles: ExtraFiles;
46
- };
47
- }, codes?: (string | undefined)[]) => string;
48
-
49
- type AddonContextProps = {
50
- components: Record<string, React.ComponentType<any>>;
51
- };
52
- type AddonProviderProps = Pick<AddonContextProps, 'components'> & {
53
- children: React.ReactNode;
54
- key?: React.Key;
55
- };
56
- declare const AddonProvider: React.FC<AddonProviderProps>;
57
- declare const useAddons: () => Record<string, React.ComponentType<any>>;
58
- declare const useAddon: (id?: string) => React.ComponentType<any> | React.FC<BaseProps & {
59
- children?: React.ReactNode;
60
- }>;
61
-
62
29
  type BlockEntity = {
63
30
  uid: string;
64
31
  tag: string;
@@ -105,9 +72,14 @@ type Ratio$1 = {
105
72
  width?: string;
106
73
  height?: string;
107
74
  };
75
+ type ImageShape$1 = {
76
+ shape?: 'square' | 'vertical' | 'horizontal' | 'custom';
77
+ width?: string;
78
+ height?: string;
79
+ };
108
80
  type FlexDirectionProp = 'row' | 'column' | 'row-reverse' | 'column-reverse';
109
81
  type TransformProp = 'default' | 'capitalize' | 'uppercase' | 'lowercase' | 'none';
110
- type BaseProps<Setting = unknown, Style = unknown, Advanced = unknown> = {
82
+ type BaseProps<Setting = unknown, Style = unknown, Advanced = Record<string, any>> = {
111
83
  builderProps?: {
112
84
  /** Unique id of component */
113
85
  uid?: string;
@@ -117,7 +89,7 @@ type BaseProps<Setting = unknown, Style = unknown, Advanced = unknown> = {
117
89
  setting?: Setting;
118
90
  advanced?: Advanced;
119
91
  };
120
- type BasePropsWrap<S = unknown, Style = unknown, A = unknown> = BaseProps<S, Style, A> & {
92
+ type BasePropsWrap<S = unknown, Style = unknown, A = Record<string, any>> = BaseProps<S, Style, A> & {
121
93
  builderAttrs?: Record<string, any>;
122
94
  style?: React.CSSProperties;
123
95
  };
@@ -203,6 +175,7 @@ type Mapped$5<K, T> = NonNullable<T> extends ObjectDevices<infer U> ? {
203
175
  };
204
176
  devices?: ResponsiveConfig<U>;
205
177
  emptyOnClear?: boolean;
178
+ showVideo?: boolean;
206
179
  } : {
207
180
  id: K;
208
181
  label?: string;
@@ -234,6 +207,7 @@ type Mapped$5<K, T> = NonNullable<T> extends ObjectDevices<infer U> ? {
234
207
  active?: boolean;
235
208
  };
236
209
  emptyOnClear?: boolean;
210
+ showVideo?: boolean;
237
211
  default?: T;
238
212
  };
239
213
  type SharedControlType<T> = {
@@ -641,7 +615,7 @@ type BackgroundControlType<T> = SharedControlType<T> & {
641
615
  value?: Background;
642
616
  };
643
617
  type Background = {
644
- type: 'color' | 'image';
618
+ type: 'color' | 'image' | 'video';
645
619
  color?: string;
646
620
  image?: {
647
621
  src?: string;
@@ -653,6 +627,9 @@ type Background = {
653
627
  position?: BgPosition;
654
628
  repeat?: BgRepeat;
655
629
  attachment?: BgAttachment;
630
+ video?: string;
631
+ loop?: boolean;
632
+ lazyLoad?: boolean;
656
633
  };
657
634
  type BgSize = 'cover' | 'contain';
658
635
  type BgRepeat = 'repeat' | 'repeat-x' | 'repeat-y' | 'no-repeat';
@@ -728,6 +705,7 @@ type Option<T> = {
728
705
  label?: string | number;
729
706
  type?: string;
730
707
  icon?: string;
708
+ isTextIcon?: boolean;
731
709
  };
732
710
  type Mapped$1<K, T> = NonNullable<T> extends ObjectDevices<infer U> ? {
733
711
  id: K;
@@ -751,6 +729,9 @@ type Mapped$1<K, T> = NonNullable<T> extends ObjectDevices<infer U> ? {
751
729
  devices?: ResponsiveConfig<U>;
752
730
  iconViewBox?: string;
753
731
  enableItemBackground?: boolean;
732
+ itemPerRow?: number;
733
+ itemSpacing?: 'large' | 'small';
734
+ enableTooltip?: boolean;
754
735
  } : {
755
736
  id: K;
756
737
  label: string;
@@ -793,6 +774,10 @@ type SwatchesLinkControlType<T> = SharedControlType<T> & {
793
774
  id?: string;
794
775
  type: 'swatchesLink';
795
776
  };
777
+ type VariantSwatchesPresetControlType<T> = SharedControlType<T> & {
778
+ id?: string;
779
+ type: 'variant:presets';
780
+ };
796
781
 
797
782
  type LayoutControlType<T> = SharedControlType<T> & {
798
783
  type: 'layout';
@@ -887,7 +872,19 @@ type StepsGuide<T> = {
887
872
  [K in keyof T]-?: Mapped<K, T[K]>;
888
873
  }[keyof T];
889
874
 
890
- type ControlProp<T> = AngleControlType<T> | CheckboxControlType<T> | ColorPickerControlType<T> | GroupControlType<T> | IconControlType<T> | InputFixContentControlType<T> | InputNumberControlType<T> | InputUnitControlType<T> | InputUnitSpacingControlType<T> | InputUnitWidthControlType<T> | InputControlType<T> | MarginControlType<T> | PaddingControlType<T> | PositionControlType<T> | RadioGroupControlType | RangeControlType<T> | SegmentControlType<T> | SelectControlType<T> | TextareaControlType<T> | ToggleControlType<T> | ImageControlType<T> | ChildrensControlType | GridControlType<T> | FlexControlType<T> | TextEditorControlType<T> | ProductControlType<T> | TypographyControlType<T> | TypographyV2ControlType<T> | MenuControlType<T> | BehaviorStateControlType<T> | PickLinkControlType<T> | BoxShadowControlType<T> | TextShadowControlType<T> | BorderControlType<T> | BorderRadiusControlType<T> | RadiusPresetControlType<T> | SizeControlType<T> | ChildItemType<T> | PickMultiProductControlType<T> | CollectionControlType<T> | BackgroundControlType<T> | VisibilityControlType<T> | SelectVariantControlType | CountdownEvergreenType | Timezone<T> | CustomContentControlType<T> | DateTimePickerControlType | CountdownDailyType | KlaviyoCodes | YotpoLoyaltyCodes | InputWidthControlType<T> | LayoutSegmentControlType<T> | InputSpacing<T> | UniqueIdControlType<T> | PositionSquareControlType<T> | CustomCodeEditor | LayoutControlType<T> | SwatchesLinkControlType<T> | ProductListControlType<T> | CollectionBannerControlType<T> | Ratio<T> | StickyDisplayControlType<T> | SyncProductPropertiesControlType<T> | StepsGuide<T>;
875
+ type ImageShape<T> = SharedControlType<T> & {
876
+ type: 'image-shape';
877
+ placeholder?: string;
878
+ readonly?: boolean;
879
+ };
880
+
881
+ type GridArrange<T> = SharedControlType<T> & {
882
+ type: 'grid-arrange';
883
+ placeholder?: string;
884
+ readonly?: boolean;
885
+ };
886
+
887
+ type ControlProp<T> = AngleControlType<T> | CheckboxControlType<T> | ColorPickerControlType<T> | GroupControlType<T> | IconControlType<T> | InputFixContentControlType<T> | InputNumberControlType<T> | InputUnitControlType<T> | InputUnitSpacingControlType<T> | InputUnitWidthControlType<T> | InputControlType<T> | MarginControlType<T> | PaddingControlType<T> | PositionControlType<T> | RadioGroupControlType | RangeControlType<T> | SegmentControlType<T> | SelectControlType<T> | TextareaControlType<T> | ToggleControlType<T> | ImageControlType<T> | ChildrensControlType | GridControlType<T> | FlexControlType<T> | TextEditorControlType<T> | ProductControlType<T> | TypographyControlType<T> | TypographyV2ControlType<T> | MenuControlType<T> | BehaviorStateControlType<T> | PickLinkControlType<T> | BoxShadowControlType<T> | TextShadowControlType<T> | BorderControlType<T> | BorderRadiusControlType<T> | RadiusPresetControlType<T> | SizeControlType<T> | ChildItemType<T> | PickMultiProductControlType<T> | CollectionControlType<T> | BackgroundControlType<T> | VisibilityControlType<T> | SelectVariantControlType | CountdownEvergreenType | Timezone<T> | CustomContentControlType<T> | DateTimePickerControlType | CountdownDailyType | KlaviyoCodes | YotpoLoyaltyCodes | InputWidthControlType<T> | LayoutSegmentControlType<T> | InputSpacing<T> | UniqueIdControlType<T> | PositionSquareControlType<T> | CustomCodeEditor | LayoutControlType<T> | SwatchesLinkControlType<T> | VariantSwatchesPresetControlType<T> | ProductListControlType<T> | CollectionBannerControlType<T> | Ratio<T> | StickyDisplayControlType<T> | SyncProductPropertiesControlType<T> | StepsGuide<T> | ImageShape<T> | GridArrange<T>;
891
888
  type Setting<P extends BaseProps> = {
892
889
  id: 'setting';
893
890
  note?: string;
@@ -991,6 +988,7 @@ type ComponentPreset = {
991
988
  mobile?: string;
992
989
  };
993
990
  components: InitComponentType[];
991
+ hideTextContent?: boolean;
994
992
  };
995
993
 
996
994
  type Maybe<T> = T | undefined;
@@ -7054,6 +7052,9 @@ declare namespace shop {
7054
7052
  };
7055
7053
  }
7056
7054
 
7055
+ type PageContext = {
7056
+ numberOfProductOfProductList: number;
7057
+ };
7057
7058
  type DeepPartial<T> = {
7058
7059
  [P in keyof T]?: DeepPartial<T[P]>;
7059
7060
  };
@@ -7242,6 +7243,40 @@ type ProductInputAnalytic = {
7242
7243
  currency?: string;
7243
7244
  };
7244
7245
 
7246
+ type ExtraFiles = Record<string, string>;
7247
+ type Props = {
7248
+ uid: string;
7249
+ builder: Record<string, any>;
7250
+ components: Record<string, any>;
7251
+ extraFiles?: ExtraFiles;
7252
+ pageContext?: PageContext;
7253
+ [key: string]: any;
7254
+ };
7255
+ declare const Render: ({ uid, builder, components, parentId, extraFiles, pageContext, ...passProps }: Props) => {
7256
+ liquid: string;
7257
+ extraFiles: ExtraFiles;
7258
+ };
7259
+ declare const RenderChildren: (props: Props) => string;
7260
+ declare const WrapRenderChildren: ({ uid, customProps, }: {
7261
+ uid: string;
7262
+ customProps: {
7263
+ extraFiles: ExtraFiles;
7264
+ };
7265
+ }, codes?: (string | undefined)[]) => string;
7266
+
7267
+ type AddonContextProps = {
7268
+ components: Record<string, React.ComponentType<any>>;
7269
+ };
7270
+ type AddonProviderProps = Pick<AddonContextProps, 'components'> & {
7271
+ children: React.ReactNode;
7272
+ key?: React.Key;
7273
+ };
7274
+ declare const AddonProvider: React.FC<AddonProviderProps>;
7275
+ declare const useAddons: () => Record<string, React.ComponentType<any>>;
7276
+ declare const useAddon: (id?: string) => React.ComponentType<any> | React.FC<BaseProps & {
7277
+ children?: React.ReactNode;
7278
+ }>;
7279
+
7245
7280
  type BuilderComponentProps = {
7246
7281
  components: Record<string, React.ComponentType<any>>;
7247
7282
  getItem: (id: string) => React.ComponentType<BaseProps> | undefined;
@@ -9342,6 +9377,7 @@ declare const getCornerCSSFromGlobal: (corner?: CornerRadius) => React.CSSProper
9342
9377
  declare const getRadiusCSSFromGlobal: (state: StateType, key?: RoundedSize, device?: NameDevices) => React.CSSProperties;
9343
9378
  declare const getCustomRadius: (state: StateType, radius?: CornerRadius, device?: NameDevices) => React.CSSProperties;
9344
9379
  declare const composeRadius: (value?: StateProp<CornerRadius> | ResponsiveStateProp<CornerRadius>) => React.CSSProperties;
9380
+ declare const composeRadiusResponsive: (radiusValue?: ObjectDevices<CornerRadius>) => React.CSSProperties;
9345
9381
  declare const getRadiusStyleActiveState: (radiusValue?: StateProp<CornerRadius>) => React.CSSProperties;
9346
9382
  declare const composeCornerCss: (value?: CornerRadius | undefined, important?: boolean) => string | undefined;
9347
9383
 
@@ -9465,6 +9501,7 @@ type FetchProductsParams = {
9465
9501
  ids: string[];
9466
9502
  isSample?: boolean;
9467
9503
  isStorefront?: boolean;
9504
+ defaultSelectedProductCount?: number;
9468
9505
  };
9469
9506
 
9470
9507
  declare const generateProductQueryKey: (args: FetchProductParams) => ['query/product', FetchProductParams];
@@ -9553,7 +9590,7 @@ declare const useCollectionsQuery: (variable: CollectionsQueryVariables, options
9553
9590
 
9554
9591
  declare const useProductQuery: (productId?: string, options?: SWRConfiguration<ProductSelectFragment>) => swr__internal.SWRResponse<ProductSelectFragment, any, Partial<swr__internal.PublicConfiguration<ProductSelectFragment, any, (arg: ["query/product", FetchProductParams]) => swr__internal.FetcherResponse<ProductSelectFragment>>> | undefined>;
9555
9592
 
9556
- declare const useProductsQuery: (ids?: string[], options?: SWRConfiguration<ProductsQueryResponse>) => swr__internal.SWRResponse<ProductsQueryResponse, any, Partial<swr__internal.PublicConfiguration<ProductsQueryResponse, any, (arg: ["query/products", FetchProductsParams]) => swr__internal.FetcherResponse<ProductsQueryResponse>>> | undefined>;
9593
+ declare const useProductsQuery: (ids?: string[], options?: SWRConfiguration<ProductsQueryResponse>, defaultSelectedProductCount?: number) => swr__internal.SWRResponse<ProductsQueryResponse, any, Partial<swr__internal.PublicConfiguration<ProductsQueryResponse, any, (arg: ["query/products", FetchProductsParams]) => swr__internal.FetcherResponse<ProductsQueryResponse>>> | undefined>;
9557
9594
 
9558
9595
  declare const useCurrentDevice: () => NameDevices;
9559
9596
 
@@ -9706,4 +9743,4 @@ type PublishedThemePageSelectFragment = Pick<PublishedThemePage, 'id' | 'name' |
9706
9743
 
9707
9744
  declare const getProductBySlug: (fetcher: FetchFunc, slug?: string) => Promise<ProductSelectFragment>;
9708
9745
 
9709
- export { AddOn, AddonProvider, AddonProviderProps, AlignItemProp, AlignProp, Background, BaseProps, BasePropsWrap, BlockEntity, BoldSubscriptionsWidgetType, Border, BorderStyle, BuilderComponentProvider, BuilderComponentProviderProps, BuilderEntity, BuilderEntityNested, BuilderPreviewProvider, BuilderPreviewProviderProps, BuilderProvider, BuilderProviderProps, BuilderState, Builtin, CartLineProvider, CartLineProviderProps, CollectionDetailFilterDocument, CollectionDetailFilterQueryResponse, CollectionDetailFilterQueryVariables, CollectionDocument, CollectionProvider, CollectionProviderProps, CollectionQueryResponse, CollectionQueryVariables, CollectionSelectFragment, CollectionsDocument, CollectionsQueryResponse, CollectionsQueryVariables, ColorKey, ColorType$1 as ColorType, ColorValueType, Component, ComponentPreset, ComponentSetting, ContainerProp, ControlProp, ControlUI, CornerRadius, CornerRadiusType, CustomComponentConfig, DeepPartial, ExtractState, FetchCollectionArgs, FetchFunc, FetchProductParams, FlexDirectionProp, FontName, GlobalStyleConfig, GlobalStyleResponsiveConfig, GlobalSwatchesData, GraphQLConnection, GroupPropType, HSLAColorType, HSLColorType, HexColorType, InitComponentType, InstantJudgeMeReviewsWidgetType, InstantKlaviyoWidgetType, InstantLooxReviewsWidgetType, JudgeMeReviewsWidgetType, KlaviyoWidgetType, LaiProductReviewsWidgetType, LooxReviewsWidgetType, ModalProvider, ModalProviderProps, NameDevices, NestedKeys, ObjectDeviceGlobalType, ObjectDevices, ObjectLayoutValue, OptionNormalStyle, OptionSpecialStyle, PageType, PageViewUpDocument, PageViewUpMutationResponse, PageViewUpMutationVariables, PickyStoryWidgetType, PreviewPageDocument, PreviewPageQueryResponse, PreviewPageQueryVariables, Primitive, ProductInputAnalytic, ProductListProvider, ProductListProviderProps, ProductProvider, ProductProviderProps, ProductReviewsWidgetType, ProductSelectFragment, ProductsDocument, ProductsQueryResponse, ProductsQueryVariables, PublishedThemePageSelectFragment, PublishedThemePagesDocument, PublishedThemePagesQueryResponse, PublishedThemePagesQueryVariables, RGBAColorType, RGBColorType, Ratio$1 as Ratio, RenderMemo as Render, RenderChildren, RenderIf, Render as RenderLiquid, RenderMode, RenderPreviewMemo as RenderPreview, RequiredCursorEdge, ResponsiveStateProp, RivyoWidgetType, RoundedSize, RyviuWidgetType, SectionData, SectionEntity, SectionProvider, SectionProviderProps, ShadowProps, ShadowStyle, ShadowStyleApplied, ShadowType, ShopProvider, ShopProviderProps, shop as ShopType, SizeProps, SizeSetting, SizeType, SpacingType, StampedWidgetType, StateProp, StateSelector, StateType, StoreConfig, StorePropertyDocument, StorePropertyQueryResponse, StorePropertyQueryVariables, SwatchesOptionType, SwatchesOptionValue, TransformProp, TypographyProps, TypographySetting, TypographySettingV2, TypographyType, TypographyV2Attrs, TypographyV2Props, VariantSelectFragment, VitalsWidgetType, WiserWidgetType, WrapRenderChildren, baseAssetURL, calculateFirstProduct, checkAvailableVariantInStock, cls, composeAdvanceStyle, composeBackgroundCss, composeBorderCss, composeCornerCss, composeGridLayout, composeMemo, composeRadius, composeShadowCss, composeSize, composeSizeCss, composeSpacing, composeTextColorCss, composeTypography, composeTypographyAttr, composeTypographyClassName, composeTypographyCss, composeTypographyStyle, composeTypographyV2, composeTypographyV2Css, convertOldLayout, dataStringify, fetchMedias, fetchVariants, flattenConnection, fpixel, genSizeClass, genTypoClass, genVariable, generateCollectionQueryKey, generateProductQueryKey, generateProductsQueryKey, getBorderStyle, getCollection, getCornerCSSFromGlobal, getCustomRadius, getGlobalColorCSSProp, getGlobalColorClass, getGlobalColorResponsiveClass, getGlobalColorResponsiveStyle, getGlobalColorStateClass, getGlobalColorStateClassDynamicBtn, getGlobalColorStateResponsiveClass, getGlobalColorStateResponsiveClassDynamicBtn, getGlobalColorStateResponsiveStyle, getGlobalColorStateStyle, getGlobalColorStyle, getProduct, getProductBySlug, getRadiusCSSFromGlobal, getRadiusStyleActiveState, getResponsiveStateValue, getResponsiveValue, getResponsiveValueByScreen, getSelectedVariant, getShortName, getSingleColorVariable, getSpacingVariable, getStyleBackgroundByDevice, getStyleShadow, getStyleShadowState, globalEvent, gridToArrayRegex, gtag, handleConvertBorderColor, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertClassColor, handleConvertClassColorDynamicBtn, isBrowser, isColor, isColumnDirectionExist, isDefined, isEmptyChildren, isLocalEnv, isSafari, loadScript, makeAspectRatio, makeHeight, makeLineClamp, makeStyle, makeStyleResponsive, makeStyleResponsiveState, makeStyleState, makeWidth, normalizeBuilderData, optionLayoutStyle, parseSelectedOption, parseValueWithUnit, prefetchQueries, props, removeNullUndefined, splitStyle, styles, template, tiktokpixel, useAddToCart, useAddon, useAddons, useBuilderComponent, useBuilderPreviewStore, useBuilderStore, useCartData, useCartDiscountCodesUpdate, useCartId, useCartLine, useCartLineStore, useCartNoteUpdate, useCartUI, useCheckAvailableVariantInStock, useCheckoutUrl, useCollection, useCollectionQuery, useCollectionStore, useCollectionsQuery, useConnectedShopify, useCreateCart, useCurrency, useCurrentDevice, useCurrentVariant, useCurrentVariantInStock, useEditorMode, useFeaturedImageGlobal, useFormatMoney, useIsSampleProduct, useIsStorefrontProduct, useIsSyncProduct, useIsomorphicLayoutEffect, useLazyVideo, useLoadScript, useLocale, useMatchMutate, useMobileOnly, useModalStore, useMoney, useMoneyFormat, usePageType, usePluginEnable, usePrevious, useProduct, useProductList, useProductListProducts, useProductListSettings, useProductListStore, useProductListStyles, useProductProperties, useProductQuery, useProductStore, useProductsQuery, useQuantity, useRemoveCartItem, useSection, useSectionStore, useSelectedOption, useShopStore, useStoreFront, useSuspenseFetch, useSwatches, useSwatchesOptions, useUniqProductID, useUpdateCartItem, useVariant, useVariantOutStock, useVariants, validateEmail };
9746
+ export { AddOn, AddonProvider, AddonProviderProps, AlignItemProp, AlignProp, Background, BaseProps, BasePropsWrap, BlockEntity, BoldSubscriptionsWidgetType, Border, BorderStyle, BuilderComponentProvider, BuilderComponentProviderProps, BuilderEntity, BuilderEntityNested, BuilderPreviewProvider, BuilderPreviewProviderProps, BuilderProvider, BuilderProviderProps, BuilderState, Builtin, CartLineProvider, CartLineProviderProps, CollectionDetailFilterDocument, CollectionDetailFilterQueryResponse, CollectionDetailFilterQueryVariables, CollectionDocument, CollectionProvider, CollectionProviderProps, CollectionQueryResponse, CollectionQueryVariables, CollectionSelectFragment, CollectionsDocument, CollectionsQueryResponse, CollectionsQueryVariables, ColorKey, ColorType$1 as ColorType, ColorValueType, Component, ComponentPreset, ComponentSetting, ContainerProp, ControlProp, ControlUI, CornerRadius, CornerRadiusType, CustomComponentConfig, DeepPartial, ExtractState, FetchCollectionArgs, FetchFunc, FetchProductParams, FlexDirectionProp, FontName, GlobalStyleConfig, GlobalStyleResponsiveConfig, GlobalSwatchesData, GraphQLConnection, GroupPropType, HSLAColorType, HSLColorType, HexColorType, ImageShape$1 as ImageShape, InitComponentType, InstantJudgeMeReviewsWidgetType, InstantKlaviyoWidgetType, InstantLooxReviewsWidgetType, JudgeMeReviewsWidgetType, KlaviyoWidgetType, LaiProductReviewsWidgetType, LooxReviewsWidgetType, ModalProvider, ModalProviderProps, NameDevices, NestedKeys, ObjectDeviceGlobalType, ObjectDevices, ObjectLayoutValue, OptionNormalStyle, OptionSpecialStyle, PageContext, PageType, PageViewUpDocument, PageViewUpMutationResponse, PageViewUpMutationVariables, PickyStoryWidgetType, PreviewPageDocument, PreviewPageQueryResponse, PreviewPageQueryVariables, Primitive, ProductInputAnalytic, ProductListProvider, ProductListProviderProps, ProductProvider, ProductProviderProps, ProductReviewsWidgetType, ProductSelectFragment, ProductsDocument, ProductsQueryResponse, ProductsQueryVariables, PublishedThemePageSelectFragment, PublishedThemePagesDocument, PublishedThemePagesQueryResponse, PublishedThemePagesQueryVariables, RGBAColorType, RGBColorType, Ratio$1 as Ratio, RenderMemo as Render, RenderChildren, RenderIf, Render as RenderLiquid, RenderMode, RenderPreviewMemo as RenderPreview, RequiredCursorEdge, ResponsiveStateProp, RivyoWidgetType, RoundedSize, RyviuWidgetType, SectionData, SectionEntity, SectionProvider, SectionProviderProps, ShadowProps, ShadowStyle, ShadowStyleApplied, ShadowType, ShopProvider, ShopProviderProps, shop as ShopType, SizeProps, SizeSetting, SizeType, SpacingType, StampedWidgetType, StateProp, StateSelector, StateType, StoreConfig, StorePropertyDocument, StorePropertyQueryResponse, StorePropertyQueryVariables, SwatchesOptionType, SwatchesOptionValue, TransformProp, TypographyProps, TypographySetting, TypographySettingV2, TypographyType, TypographyV2Attrs, TypographyV2Props, VariantSelectFragment, VitalsWidgetType, WiserWidgetType, WrapRenderChildren, baseAssetURL, calculateFirstProduct, checkAvailableVariantInStock, cls, composeAdvanceStyle, composeBackgroundCss, composeBorderCss, composeCornerCss, composeGridLayout, composeMemo, composeRadius, composeRadiusResponsive, composeShadowCss, composeSize, composeSizeCss, composeSpacing, composeTextColorCss, composeTypography, composeTypographyAttr, composeTypographyClassName, composeTypographyCss, composeTypographyStyle, composeTypographyV2, composeTypographyV2Css, convertOldLayout, dataStringify, fetchMedias, fetchVariants, flattenConnection, fpixel, genSizeClass, genTypoClass, genVariable, generateCollectionQueryKey, generateProductQueryKey, generateProductsQueryKey, getBorderStyle, getCollection, getCornerCSSFromGlobal, getCustomRadius, getGlobalColorCSSProp, getGlobalColorClass, getGlobalColorResponsiveClass, getGlobalColorResponsiveStyle, getGlobalColorStateClass, getGlobalColorStateClassDynamicBtn, getGlobalColorStateResponsiveClass, getGlobalColorStateResponsiveClassDynamicBtn, getGlobalColorStateResponsiveStyle, getGlobalColorStateStyle, getGlobalColorStyle, getProduct, getProductBySlug, getRadiusCSSFromGlobal, getRadiusStyleActiveState, getResponsiveStateValue, getResponsiveValue, getResponsiveValueByScreen, getSelectedVariant, getShortName, getSingleColorVariable, getSpacingVariable, getStyleBackgroundByDevice, getStyleShadow, getStyleShadowState, globalEvent, gridToArrayRegex, gtag, handleConvertBorderColor, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertClassColor, handleConvertClassColorDynamicBtn, isBrowser, isColor, isColumnDirectionExist, isDefined, isEmptyChildren, isLocalEnv, isSafari, loadScript, makeAspectRatio, makeHeight, makeLineClamp, makeStyle, makeStyleResponsive, makeStyleResponsiveState, makeStyleState, makeWidth, normalizeBuilderData, optionLayoutStyle, parseSelectedOption, parseValueWithUnit, prefetchQueries, props, removeNullUndefined, splitStyle, styles, template, tiktokpixel, useAddToCart, useAddon, useAddons, useBuilderComponent, useBuilderPreviewStore, useBuilderStore, useCartData, useCartDiscountCodesUpdate, useCartId, useCartLine, useCartLineStore, useCartNoteUpdate, useCartUI, useCheckAvailableVariantInStock, useCheckoutUrl, useCollection, useCollectionQuery, useCollectionStore, useCollectionsQuery, useConnectedShopify, useCreateCart, useCurrency, useCurrentDevice, useCurrentVariant, useCurrentVariantInStock, useEditorMode, useFeaturedImageGlobal, useFormatMoney, useIsSampleProduct, useIsStorefrontProduct, useIsSyncProduct, useIsomorphicLayoutEffect, useLazyVideo, useLoadScript, useLocale, useMatchMutate, useMobileOnly, useModalStore, useMoney, useMoneyFormat, usePageType, usePluginEnable, usePrevious, useProduct, useProductList, useProductListProducts, useProductListSettings, useProductListStore, useProductListStyles, useProductProperties, useProductQuery, useProductStore, useProductsQuery, useQuantity, useRemoveCartItem, useSection, useSectionStore, useSelectedOption, useShopStore, useStoreFront, useSuspenseFetch, useSwatches, useSwatchesOptions, useUniqProductID, useUpdateCartItem, useVariant, useVariantOutStock, useVariants, validateEmail };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/core",
3
- "version": "1.22.1",
3
+ "version": "1.22.3",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",
@@ -24,8 +24,8 @@
24
24
  "type-check": "yarn tsc --noEmit"
25
25
  },
26
26
  "devDependencies": {
27
- "@gem-sdk/adapter-shopify": "1.12.0",
28
- "@gem-sdk/styles": "1.21.8"
27
+ "@gem-sdk/adapter-shopify": "1.22.0",
28
+ "@gem-sdk/styles": "1.22.0"
29
29
  },
30
30
  "dependencies": {
31
31
  "react-error-boundary": "4.0.10",