@gem-sdk/core 1.40.4 → 1.41.0-dev.16

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.
@@ -30,6 +30,7 @@ const isSection = (el)=>{
30
30
  };
31
31
  const ComponentToolbarPreview = (props)=>{
32
32
  const isThemeSection = props.isThemeSection;
33
+ const isShopifySection = props.isShopifySection;
33
34
  const editingPageType = ShopContext.useShopStore((s)=>s.pageType);
34
35
  const getParents = BuilderPreviewContext.useBuilderPreviewStore((s)=>s.getParents);
35
36
  const root = BuilderPreviewContext.useBuilderPreviewStore((s)=>s.getItem('ROOT'));
@@ -175,7 +176,8 @@ const ComponentToolbarPreview = (props)=>{
175
176
  bubbles: true,
176
177
  detail: {
177
178
  componentUid: props.uid,
178
- isThemeSection: isThemeSection
179
+ isThemeSection,
180
+ isShopifySection
179
181
  }
180
182
  });
181
183
  window.dispatchEvent(event);
@@ -191,7 +193,8 @@ const ComponentToolbarPreview = (props)=>{
191
193
  bubbles: true,
192
194
  detail: {
193
195
  componentUid: props.uid,
194
- isThemeSection: isThemeSection
196
+ isThemeSection,
197
+ isShopifySection
195
198
  }
196
199
  });
197
200
  window.dispatchEvent(event);
@@ -240,6 +243,9 @@ const ComponentToolbarPreview = (props)=>{
240
243
  return false;
241
244
  };
242
245
  const getSectionName = ()=>{
246
+ if (isShopifySection) {
247
+ return `Shopify section: ${props.name}`;
248
+ }
243
249
  const checkRenamedSection = props.name && props.name === `Section ${props.uid}`;
244
250
  if (getSectionNumber() >= SECTION_LIMIT - 5) {
245
251
  return `${checkRenamedSection ? 'Section' : props?.name} ${getIndexSection() + 1}/${SECTION_LIMIT}`;
@@ -256,6 +262,7 @@ const ComponentToolbarPreview = (props)=>{
256
262
  "data-toolbar": true,
257
263
  "data-toolbar-section": props.tag == 'Section',
258
264
  "data-toolbar-theme-section": props.tag == 'Section' && !!isThemeSection || isThemeSectionEditor,
265
+ "data-toolbar-shopify-section": props.tag == 'Section' && !!isShopifySection,
259
266
  "data-toolbar-limit": getIndexSection() >= SECTION_LIMIT,
260
267
  children: [
261
268
  /*#__PURE__*/ jsxRuntime.jsxs("div", {
@@ -298,9 +305,39 @@ const ComponentToolbarPreview = (props)=>{
298
305
  ]
299
306
  })
300
307
  }),
301
- props.tag == 'Section' ? /*#__PURE__*/ jsxRuntime.jsx("div", {
308
+ props.tag == 'Section' ? /*#__PURE__*/ jsxRuntime.jsxs("div", {
302
309
  "data-toolbar-name": true,
303
- children: getSectionName()
310
+ children: [
311
+ getSectionName(),
312
+ props.isShopifySection && !props.isShopifyVisibility && /*#__PURE__*/ jsxRuntime.jsxs("svg", {
313
+ "data-toolbar-visibility": true,
314
+ width: "20",
315
+ height: "20",
316
+ viewBox: "0 0 20 20",
317
+ fill: "none",
318
+ xmlns: "http://www.w3.org/2000/svg",
319
+ children: [
320
+ /*#__PURE__*/ jsxRuntime.jsx("path", {
321
+ fillRule: "evenodd",
322
+ clipRule: "evenodd",
323
+ d: "M13.1252 9.99773C13.1243 8.27226 11.7248 6.87423 9.99935 6.87506C8.27386 6.87561 6.87518 8.27455 6.87518 10.0001C6.87518 11.7259 8.27429 13.1251 10.0002 13.1251C11.7257 13.1251 13.125 11.727 13.1252 10.0011V9.99773ZM9.99985 8.12506C11.035 8.12451 11.8746 8.96322 11.8752 9.99839V10.0004C11.8752 11.0357 11.0359 11.8751 10.0002 11.8751C8.96465 11.8751 8.12518 11.0356 8.12518 10.0001C8.12518 8.96472 8.96451 8.12533 9.99985 8.12506Z",
324
+ fill: "#F9F9F9"
325
+ }),
326
+ /*#__PURE__*/ jsxRuntime.jsx("path", {
327
+ fillRule: "evenodd",
328
+ clipRule: "evenodd",
329
+ d: "M9.99885 4.37593C5.66421 4.37604 2.80603 7.64523 1.79548 9.00983C1.35636 9.60279 1.35918 10.4 1.80012 10.9902C2.81706 12.3514 5.69374 15.6241 9.99886 15.6241C14.3806 15.6241 17.2194 12.3452 18.2168 10.9808C18.6473 10.392 18.6442 9.60472 18.211 9.01902C17.2056 7.65938 14.3429 4.37583 9.99885 4.37593ZM2.80002 9.75374C3.77049 8.44326 6.30207 5.62602 9.99888 5.62593C13.7041 5.62585 16.24 8.45598 17.206 9.76225C17.3146 9.9091 17.3149 10.0965 17.2077 10.2431C16.254 11.5477 13.7416 14.3741 9.99886 14.3741C6.33149 14.3741 3.78173 11.5541 2.80152 10.242C2.69021 10.0931 2.69001 9.90229 2.80002 9.75374Z",
330
+ fill: "#F9F9F9"
331
+ }),
332
+ /*#__PURE__*/ jsxRuntime.jsx("path", {
333
+ fillRule: "evenodd",
334
+ clipRule: "evenodd",
335
+ d: "M18.0763 3.26988C18.3415 3.58809 18.2985 4.06101 17.9803 4.32619L2.98032 16.8262C2.66211 17.0914 2.18919 17.0484 1.92402 16.7302C1.65884 16.412 1.70184 15.939 2.02004 15.6739L17.02 3.17385C17.3383 2.90868 17.8112 2.95167 18.0763 3.26988Z",
336
+ fill: "#F9F9F9"
337
+ })
338
+ ]
339
+ })
340
+ ]
304
341
  }) : /*#__PURE__*/ jsxRuntime.jsx("div", {
305
342
  "data-toolbar-name": true,
306
343
  children: toolbarName()
@@ -380,7 +417,7 @@ const ComponentToolbarPreview = (props)=>{
380
417
  ]
381
418
  }, parent.uid);
382
419
  }),
383
- props.tag === 'Section' && !props.isThemeSection && isEnableCreateThemeSection() && getIndexSection() < SECTION_LIMIT && /*#__PURE__*/ jsxRuntime.jsx(CreateThemeSection.CreateThemeSection, {
420
+ props.tag === 'Section' && !props.isThemeSection && isEnableCreateThemeSection() && !props.isShopifySection && getIndexSection() < SECTION_LIMIT && /*#__PURE__*/ jsxRuntime.jsx(CreateThemeSection.CreateThemeSection, {
384
421
  ...props
385
422
  }),
386
423
  props.tag == 'Sticky' && /*#__PURE__*/ jsxRuntime.jsx("div", {
@@ -454,6 +491,7 @@ const ComponentToolbarPreview = (props)=>{
454
491
  "data-outline": true,
455
492
  "data-outline-section": props.tag == 'Section',
456
493
  "data-outline-theme-section": props.tag == 'Section' && !!isThemeSection || isThemeSectionEditor,
494
+ "data-outline-shopify-section": props.tag == 'Section' && !!isShopifySection,
457
495
  "data-outline-limit": getIndexSection() >= SECTION_LIMIT
458
496
  }, 'outline-' + props.uid),
459
497
  props.tag == 'Section' && !isThemeSectionEditor && /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
@@ -506,6 +544,6 @@ const ComponentToolbarPreview = (props)=>{
506
544
  ]
507
545
  });
508
546
  };
509
- var ComponentToolbarPreview$1 = /*#__PURE__*/ react.memo(ComponentToolbarPreview);
547
+ var ComponentToolbarPreview$1 = /*#__PURE__*/ react.memo(ComponentToolbarPreview); /* gem-lint/disallow-import-from-package-path */
510
548
 
511
549
  exports.default = ComponentToolbarPreview$1;
@@ -16,6 +16,7 @@ require('swr/mutation');
16
16
  var shop = require('../hooks/shop.js');
17
17
  require('vanilla-lazyload');
18
18
  require('../hooks/useCartUI.js');
19
+ var cls = require('../helpers/cls.js');
19
20
  require('../helpers/convert.js');
20
21
 
21
22
  const ComponentWrapperPreview = ({ children, ...props })=>{
@@ -41,6 +42,10 @@ const ComponentWrapperPreview = ({ children, ...props })=>{
41
42
  if (props.tag === 'Section' && props.isThemeSection) {
42
43
  customProps['data-theme-section'] = true;
43
44
  }
45
+ if (props.tag === 'Section' && props.isShopifySection) {
46
+ customProps['data-shopify-section'] = true;
47
+ customProps['data-toolbar-wrap'] = true;
48
+ }
44
49
  // Build editor configs
45
50
  if (props.editorConfigs) {
46
51
  const editorConfigs = props.editorConfigs;
@@ -95,6 +100,40 @@ const ComponentWrapperPreview = ({ children, ...props })=>{
95
100
  'data-component-label': props.label,
96
101
  'data-not-droppable': isNotDroppable(props.tag)
97
102
  };
103
+ const ShopifySection = ({ name, visibility })=>{
104
+ return /*#__PURE__*/ jsxRuntime.jsxs("div", {
105
+ className: cls.cls('gp-flex gp-items-center gp-justify-center gp-gap-[8px] gp-bg-[#F4F4F4] gp-p-[16px] gp-border gp-border-[#D6D6D6]', {
106
+ 'gp-opacity-60': !visibility
107
+ }),
108
+ children: [
109
+ /*#__PURE__*/ jsxRuntime.jsxs("svg", {
110
+ width: "24",
111
+ height: "24",
112
+ viewBox: "0 0 24 24",
113
+ fill: "none",
114
+ xmlns: "http://www.w3.org/2000/svg",
115
+ children: [
116
+ /*#__PURE__*/ jsxRuntime.jsx("path", {
117
+ d: "M19.1475 5.16194C19.1416 5.1148 19.1197 5.0713 19.0857 5.03911C19.0516 5.00692 19.0076 4.9881 18.9614 4.98597C18.8835 4.98597 17.3469 4.95397 17.3469 4.95397C17.3469 4.95397 16.0588 3.67419 15.9342 3.5311C15.8104 3.40312 15.5619 3.43512 15.4684 3.46711L14.8166 3.67508C14.7361 3.40491 14.6323 3.14259 14.5067 2.89121C14.0566 1.99536 13.3727 1.51544 12.5659 1.51544C12.5044 1.51544 12.4577 1.51544 12.3954 1.53144C12.3642 1.49945 12.3486 1.46745 12.3175 1.45145C11.9608 1.06752 11.5107 0.875552 10.967 0.891549C9.92824 0.923543 8.88772 1.70741 8.03419 3.08318C7.44467 4.05901 6.99453 5.27392 6.8543 6.21776C5.65969 6.6017 4.82087 6.87365 4.79057 6.87365C4.18461 7.06562 4.16903 7.08161 4.09199 7.67351C4.06082 8.12144 2.47754 20.7415 2.47754 20.7415L15.7636 23.1091L21.522 21.6374C21.5064 21.6374 19.1631 5.27392 19.1475 5.16194ZM14.1492 3.89904C13.8062 4.00572 13.4648 4.11772 13.1251 4.23498C13.1251 3.69108 13.0472 2.92321 12.8143 2.28331C13.6064 2.41129 13.9942 3.33914 14.1492 3.89904ZM12.4265 4.44206C11.7279 4.66602 10.9679 4.90598 10.207 5.14594C10.4243 4.29808 10.8277 3.46623 11.3245 2.90632C11.533 2.66965 11.7863 2.47913 12.069 2.34641C12.3806 2.9712 12.4421 3.85105 12.4265 4.44206ZM10.9982 1.61143C11.2466 1.61143 11.4483 1.65942 11.6197 1.7874C11.3127 1.95192 11.0387 2.17444 10.8121 2.44329C10.1455 3.17916 9.63305 4.31408 9.43135 5.4179C8.79423 5.62586 8.17356 5.81783 7.61521 5.9938C7.98744 4.25009 9.39933 1.65942 10.9982 1.61143Z",
118
+ fill: "#95BF47"
119
+ }),
120
+ /*#__PURE__*/ jsxRuntime.jsx("path", {
121
+ d: "M18.9647 4.94709C18.8851 4.94709 17.3155 4.91503 17.3155 4.91503C17.3155 4.91503 15.9981 3.63242 15.8716 3.48812C15.8261 3.43951 15.7635 3.41074 15.6973 3.40796V23.1094L21.5828 21.6344L19.1709 5.12345C19.1399 5.01122 19.0444 4.94709 18.9647 4.94709Z",
122
+ fill: "#5E8E3E"
123
+ }),
124
+ /*#__PURE__*/ jsxRuntime.jsx("path", {
125
+ d: "M13.0575 8.51577L12.3029 10.8908C12.3029 10.8908 11.4602 10.5663 10.4599 10.6253C8.98595 10.6991 8.98595 11.4809 8.98595 11.6727C9.07404 12.7348 12.39 12.9709 12.5828 15.4631C12.7238 17.4251 11.3545 18.7675 9.35396 18.8708C6.96778 18.9733 5.65137 17.7939 5.65137 17.7939L6.16032 15.9794C6.16032 15.9794 7.49435 16.8203 8.5465 16.7613C9.23162 16.7318 9.4949 16.245 9.45967 15.9204C9.35396 14.5337 6.65165 14.6223 6.47645 12.3365C6.33551 10.4188 7.82712 8.48626 11.1265 8.30924C12.4076 8.23548 13.0575 8.51577 13.0575 8.51577Z",
126
+ fill: "white"
127
+ })
128
+ ]
129
+ }),
130
+ /*#__PURE__*/ jsxRuntime.jsx("span", {
131
+ className: "gp-text-[#212121] gp-text-[14px] gp-leading-[24px] gp-font-medium",
132
+ children: name
133
+ })
134
+ ]
135
+ });
136
+ };
98
137
  if (constant.disableWrap.includes(props.tag) && /*#__PURE__*/ react.isValidElement(children)) {
99
138
  return /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
100
139
  children: [
@@ -109,7 +148,10 @@ const ComponentWrapperPreview = ({ children, ...props })=>{
109
148
  builderAttrs,
110
149
  advanced,
111
150
  children: [
112
- children.props['children'],
151
+ props.isShopifySection ? /*#__PURE__*/ jsxRuntime.jsx(ShopifySection, {
152
+ name: props.name ?? '',
153
+ visibility: !!props.isShopifyVisibility
154
+ }) : children.props['children'],
113
155
  /*#__PURE__*/ jsxRuntime.jsx(ComponentToolbarPreview.default, {
114
156
  ...props
115
157
  })
@@ -36,7 +36,9 @@ const disableWrap = [
36
36
  'ProductImagesV2',
37
37
  'PostPurchaseProductImages',
38
38
  'Sticky',
39
- 'Heading'
39
+ 'Heading',
40
+ 'ProductBadge',
41
+ 'Marquee'
40
42
  ];
41
43
  const customRenderChildren = [
42
44
  'Accordion',
@@ -47,7 +49,8 @@ const customRenderChildren = [
47
49
  ];
48
50
  const excludeApplyStyle = [
49
51
  'IconListV2',
50
- 'IconList'
52
+ 'IconList',
53
+ 'ProductBadge'
51
54
  ];
52
55
  const postPurchaseRequiredElements = [
53
56
  'PostPurchaseProductOffer',
@@ -253,7 +253,11 @@ const createBuilderPreviewProvider = (args, isThemeSectionEditor)=>zustand.creat
253
253
  }
254
254
  },
255
255
  getItem: (id)=>{
256
- return get().state[id];
256
+ const item = get().state[id];
257
+ return {
258
+ ...item,
259
+ rawChildrens: item?.childrens?.map((v)=>get().state[v])
260
+ };
257
261
  },
258
262
  removeItem: (id)=>{
259
263
  if (id === 'ROOT') {
@@ -428,15 +432,16 @@ const createBuilderPreviewProvider = (args, isThemeSectionEditor)=>zustand.creat
428
432
  updateItemAttribute: (id, value, attr)=>{
429
433
  if (!attr || ![
430
434
  'label',
431
- 'customLabel'
435
+ 'customLabel',
436
+ 'isShopifyVisibility'
432
437
  ].includes(attr)) return;
433
438
  const state = get().state;
434
439
  const item = state[id];
435
- // Ignore section
436
- if (item?.type === 'section') return;
437
440
  if (item) {
438
- const dateModified = Date.now();
439
- item.dateModified = dateModified;
441
+ if (item.type !== 'section') {
442
+ const dateModified = Date.now();
443
+ item.dateModified = dateModified;
444
+ }
440
445
  const updatedItem = {
441
446
  ...item,
442
447
  [attr]: value
@@ -10,6 +10,7 @@ const SectionContext = /*#__PURE__*/ react.createContext(null);
10
10
  const createSectionProvider = (data)=>zustand.createStore((set, get)=>({
11
11
  data: data ?? {},
12
12
  getSection: (id)=>{
13
+ console.log('get().data', get().data);
13
14
  const section = get().data[id];
14
15
  return section ?? undefined;
15
16
  },
@@ -19,6 +19,15 @@
19
19
  featuredImage {
20
20
  ...MediaSelect
21
21
  }
22
+ collections {
23
+ edges {
24
+ node {
25
+ id
26
+ title
27
+ }
28
+ }
29
+ }
30
+ tags
22
31
  }
23
32
  `;
24
33
 
@@ -3,6 +3,15 @@
3
3
  /* eslint-disable */ const ProductSelect = `
4
4
  fragment ProductSelect on Product {
5
5
  ...ProductLittleSelect
6
+ collections {
7
+ edges {
8
+ node {
9
+ id
10
+ title
11
+ }
12
+ }
13
+ }
14
+ tags
6
15
  medias(first: $firstMedia, after: $afterMedia, orderBy: $orderByMedia) {
7
16
  edges {
8
17
  cursor
@@ -13,6 +13,15 @@ const ProductsEdgeDetail = `
13
13
  cursor
14
14
  node {
15
15
  ...ProductSelect
16
+ tags
17
+ collections {
18
+ edges {
19
+ node {
20
+ id
21
+ title
22
+ }
23
+ }
24
+ }
16
25
  }
17
26
  }
18
27
  `;
@@ -3,16 +3,16 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const globalEvent = {
6
- subscribe (callback) {
7
- document.addEventListener('onDispatch', (e)=>callback(e.detail));
6
+ subscribe (eventName, callback) {
7
+ document.addEventListener(eventName, (e)=>callback(e.detail));
8
8
  },
9
- dispatch (data) {
10
- document.dispatchEvent(new CustomEvent('onDispatch', {
11
- detail: data
9
+ dispatch (eventName, detail) {
10
+ document.dispatchEvent(new CustomEvent(eventName, {
11
+ detail
12
12
  }));
13
13
  },
14
- remove (callback) {
15
- document.removeEventListener('onDispatch', callback);
14
+ remove (eventName, callback) {
15
+ document.removeEventListener(eventName, callback);
16
16
  }
17
17
  };
18
18
 
@@ -57,6 +57,29 @@ const getProducts = async (fetcher, { ids, isSample, isStorefront, defaultSelect
57
57
  }
58
58
  };
59
59
  };
60
+ const getProductQueryAll = async (fetcher, arg)=>{
61
+ const limit = arg?.limit || 4;
62
+ delete arg.limit;
63
+ const variables = {
64
+ first: limit,
65
+ firstMedia: 1,
66
+ firstVariant: 1,
67
+ orderBy: {
68
+ field: 'PLATFORM_CREATED_AT',
69
+ direction: 'DESC'
70
+ },
71
+ orderByMedia: {
72
+ field: 'POSITION',
73
+ direction: 'ASC'
74
+ },
75
+ where: {
76
+ status: 'ACTIVE',
77
+ ...arg
78
+ }
79
+ };
80
+ const pageData = await fetchProducts(fetcher, variables);
81
+ return pageData;
82
+ };
60
83
  const fetchProducts = async (fetcher, variables)=>{
61
84
  return fetcher([
62
85
  products_generated.ProductsDocument,
@@ -164,4 +187,5 @@ const mergeMediasToProducts = async ({ fetcher, products, isSample, isStorefront
164
187
  // );
165
188
  // };
166
189
 
190
+ exports.getProductQueryAll = getProductQueryAll;
167
191
  exports.getProducts = getProducts;
@@ -43,6 +43,18 @@ const makeGlobalSize = (globalSize)=>{
43
43
  gap: getGlobalSizeGap(globalSize)
44
44
  };
45
45
  };
46
+ const makeGlobalSizeIcon = (globalSize)=>{
47
+ return {
48
+ width: makeStyleWithDefault('w', getWidthHeightGlobalSize('width', globalSize), {
49
+ desktop: '--g-ct-w',
50
+ tablet: '--g-ct-w',
51
+ mobile: '--g-ct-w'
52
+ }),
53
+ height: makeStyle.makeStyleResponsive('h', getWidthHeightGlobalSize('width', globalSize)),
54
+ minWidth: makeStyle.makeStyleResponsive('minw', getWidthHeightGlobalSize('width', globalSize)),
55
+ padding: getPaddingGlobalSize(globalSize)
56
+ };
57
+ };
46
58
  const getGlobalSizeGap = (globalSize)=>{
47
59
  return {
48
60
  '--gg': globalSize?.desktop?.gap,
@@ -180,4 +192,5 @@ exports.getPaddingGlobalSize = getPaddingGlobalSize;
180
192
  exports.getWidthByShapeGlobalSize = getWidthByShapeGlobalSize;
181
193
  exports.getWidthHeightGlobalSize = getWidthHeightGlobalSize;
182
194
  exports.makeGlobalSize = makeGlobalSize;
195
+ exports.makeGlobalSizeIcon = makeGlobalSizeIcon;
183
196
  exports.makeStyleWithDefault = makeStyleWithDefault;
@@ -20,5 +20,15 @@ const useProductsQuery = (ids, options, params)=>{
20
20
  return getProducts.getProducts(params?.fetcher || fetcher, arg);
21
21
  }, options);
22
22
  };
23
+ const useProductsQueryAll = (variable, options)=>{
24
+ const fetcher = useFetchHandle.useFetchHandle();
25
+ return useSWR(variable ? [
26
+ 'query/products',
27
+ variable
28
+ ] : null, async ([, arg])=>{
29
+ return getProducts.getProductQueryAll(fetcher, arg);
30
+ }, options);
31
+ };
23
32
 
24
33
  exports.useProductsQuery = useProductsQuery;
34
+ exports.useProductsQueryAll = useProductsQueryAll;
package/dist/cjs/index.js CHANGED
@@ -258,6 +258,7 @@ exports.getPaddingGlobalSize = size.getPaddingGlobalSize;
258
258
  exports.getWidthByShapeGlobalSize = size.getWidthByShapeGlobalSize;
259
259
  exports.getWidthHeightGlobalSize = size.getWidthHeightGlobalSize;
260
260
  exports.makeGlobalSize = size.makeGlobalSize;
261
+ exports.makeGlobalSizeIcon = size.makeGlobalSizeIcon;
261
262
  exports.makeStyleWithDefault = size.makeStyleWithDefault;
262
263
  exports.composeFallbackTypographyStyle = typography.composeFallbackTypographyStyle;
263
264
  exports.composeTypography = typography.composeTypography;
@@ -301,6 +302,7 @@ exports.useCollectionQuery = useCollectionQuery.useCollectionQuery;
301
302
  exports.useCollectionsQuery = useCollectionsQuery.useCollectionsQuery;
302
303
  exports.useProductQuery = useProductQuery.useProductQuery;
303
304
  exports.useProductsQuery = useProductsQuery.useProductsQuery;
305
+ exports.useProductsQueryAll = useProductsQuery.useProductsQueryAll;
304
306
  exports.useCurrentDevice = useCurrentDevice.useCurrentDevice;
305
307
  exports.shopifyPriceRounding = useFormatMoney.shopifyPriceRounding;
306
308
  exports.useFormatMoney = useFormatMoney.useFormatMoney;
@@ -26,6 +26,7 @@ const isSection = (el)=>{
26
26
  };
27
27
  const ComponentToolbarPreview = (props)=>{
28
28
  const isThemeSection = props.isThemeSection;
29
+ const isShopifySection = props.isShopifySection;
29
30
  const editingPageType = useShopStore((s)=>s.pageType);
30
31
  const getParents = useBuilderPreviewStore((s)=>s.getParents);
31
32
  const root = useBuilderPreviewStore((s)=>s.getItem('ROOT'));
@@ -171,7 +172,8 @@ const ComponentToolbarPreview = (props)=>{
171
172
  bubbles: true,
172
173
  detail: {
173
174
  componentUid: props.uid,
174
- isThemeSection: isThemeSection
175
+ isThemeSection,
176
+ isShopifySection
175
177
  }
176
178
  });
177
179
  window.dispatchEvent(event);
@@ -187,7 +189,8 @@ const ComponentToolbarPreview = (props)=>{
187
189
  bubbles: true,
188
190
  detail: {
189
191
  componentUid: props.uid,
190
- isThemeSection: isThemeSection
192
+ isThemeSection,
193
+ isShopifySection
191
194
  }
192
195
  });
193
196
  window.dispatchEvent(event);
@@ -236,6 +239,9 @@ const ComponentToolbarPreview = (props)=>{
236
239
  return false;
237
240
  };
238
241
  const getSectionName = ()=>{
242
+ if (isShopifySection) {
243
+ return `Shopify section: ${props.name}`;
244
+ }
239
245
  const checkRenamedSection = props.name && props.name === `Section ${props.uid}`;
240
246
  if (getSectionNumber() >= SECTION_LIMIT - 5) {
241
247
  return `${checkRenamedSection ? 'Section' : props?.name} ${getIndexSection() + 1}/${SECTION_LIMIT}`;
@@ -252,6 +258,7 @@ const ComponentToolbarPreview = (props)=>{
252
258
  "data-toolbar": true,
253
259
  "data-toolbar-section": props.tag == 'Section',
254
260
  "data-toolbar-theme-section": props.tag == 'Section' && !!isThemeSection || isThemeSectionEditor,
261
+ "data-toolbar-shopify-section": props.tag == 'Section' && !!isShopifySection,
255
262
  "data-toolbar-limit": getIndexSection() >= SECTION_LIMIT,
256
263
  children: [
257
264
  /*#__PURE__*/ jsxs("div", {
@@ -294,9 +301,39 @@ const ComponentToolbarPreview = (props)=>{
294
301
  ]
295
302
  })
296
303
  }),
297
- props.tag == 'Section' ? /*#__PURE__*/ jsx("div", {
304
+ props.tag == 'Section' ? /*#__PURE__*/ jsxs("div", {
298
305
  "data-toolbar-name": true,
299
- children: getSectionName()
306
+ children: [
307
+ getSectionName(),
308
+ props.isShopifySection && !props.isShopifyVisibility && /*#__PURE__*/ jsxs("svg", {
309
+ "data-toolbar-visibility": true,
310
+ width: "20",
311
+ height: "20",
312
+ viewBox: "0 0 20 20",
313
+ fill: "none",
314
+ xmlns: "http://www.w3.org/2000/svg",
315
+ children: [
316
+ /*#__PURE__*/ jsx("path", {
317
+ fillRule: "evenodd",
318
+ clipRule: "evenodd",
319
+ d: "M13.1252 9.99773C13.1243 8.27226 11.7248 6.87423 9.99935 6.87506C8.27386 6.87561 6.87518 8.27455 6.87518 10.0001C6.87518 11.7259 8.27429 13.1251 10.0002 13.1251C11.7257 13.1251 13.125 11.727 13.1252 10.0011V9.99773ZM9.99985 8.12506C11.035 8.12451 11.8746 8.96322 11.8752 9.99839V10.0004C11.8752 11.0357 11.0359 11.8751 10.0002 11.8751C8.96465 11.8751 8.12518 11.0356 8.12518 10.0001C8.12518 8.96472 8.96451 8.12533 9.99985 8.12506Z",
320
+ fill: "#F9F9F9"
321
+ }),
322
+ /*#__PURE__*/ jsx("path", {
323
+ fillRule: "evenodd",
324
+ clipRule: "evenodd",
325
+ d: "M9.99885 4.37593C5.66421 4.37604 2.80603 7.64523 1.79548 9.00983C1.35636 9.60279 1.35918 10.4 1.80012 10.9902C2.81706 12.3514 5.69374 15.6241 9.99886 15.6241C14.3806 15.6241 17.2194 12.3452 18.2168 10.9808C18.6473 10.392 18.6442 9.60472 18.211 9.01902C17.2056 7.65938 14.3429 4.37583 9.99885 4.37593ZM2.80002 9.75374C3.77049 8.44326 6.30207 5.62602 9.99888 5.62593C13.7041 5.62585 16.24 8.45598 17.206 9.76225C17.3146 9.9091 17.3149 10.0965 17.2077 10.2431C16.254 11.5477 13.7416 14.3741 9.99886 14.3741C6.33149 14.3741 3.78173 11.5541 2.80152 10.242C2.69021 10.0931 2.69001 9.90229 2.80002 9.75374Z",
326
+ fill: "#F9F9F9"
327
+ }),
328
+ /*#__PURE__*/ jsx("path", {
329
+ fillRule: "evenodd",
330
+ clipRule: "evenodd",
331
+ d: "M18.0763 3.26988C18.3415 3.58809 18.2985 4.06101 17.9803 4.32619L2.98032 16.8262C2.66211 17.0914 2.18919 17.0484 1.92402 16.7302C1.65884 16.412 1.70184 15.939 2.02004 15.6739L17.02 3.17385C17.3383 2.90868 17.8112 2.95167 18.0763 3.26988Z",
332
+ fill: "#F9F9F9"
333
+ })
334
+ ]
335
+ })
336
+ ]
300
337
  }) : /*#__PURE__*/ jsx("div", {
301
338
  "data-toolbar-name": true,
302
339
  children: toolbarName()
@@ -376,7 +413,7 @@ const ComponentToolbarPreview = (props)=>{
376
413
  ]
377
414
  }, parent.uid);
378
415
  }),
379
- props.tag === 'Section' && !props.isThemeSection && isEnableCreateThemeSection() && getIndexSection() < SECTION_LIMIT && /*#__PURE__*/ jsx(CreateThemeSection, {
416
+ props.tag === 'Section' && !props.isThemeSection && isEnableCreateThemeSection() && !props.isShopifySection && getIndexSection() < SECTION_LIMIT && /*#__PURE__*/ jsx(CreateThemeSection, {
380
417
  ...props
381
418
  }),
382
419
  props.tag == 'Sticky' && /*#__PURE__*/ jsx("div", {
@@ -450,6 +487,7 @@ const ComponentToolbarPreview = (props)=>{
450
487
  "data-outline": true,
451
488
  "data-outline-section": props.tag == 'Section',
452
489
  "data-outline-theme-section": props.tag == 'Section' && !!isThemeSection || isThemeSectionEditor,
490
+ "data-outline-shopify-section": props.tag == 'Section' && !!isShopifySection,
453
491
  "data-outline-limit": getIndexSection() >= SECTION_LIMIT
454
492
  }, 'outline-' + props.uid),
455
493
  props.tag == 'Section' && !isThemeSectionEditor && /*#__PURE__*/ jsxs(Fragment, {
@@ -502,6 +540,6 @@ const ComponentToolbarPreview = (props)=>{
502
540
  ]
503
541
  });
504
542
  };
505
- var ComponentToolbarPreview$1 = /*#__PURE__*/ memo(ComponentToolbarPreview);
543
+ var ComponentToolbarPreview$1 = /*#__PURE__*/ memo(ComponentToolbarPreview); /* gem-lint/disallow-import-from-package-path */
506
544
 
507
545
  export { ComponentToolbarPreview$1 as default };
@@ -12,6 +12,7 @@ import 'swr/mutation';
12
12
  import { usePageType } from '../hooks/shop.js';
13
13
  import 'vanilla-lazyload';
14
14
  import '../hooks/useCartUI.js';
15
+ import { cls } from '../helpers/cls.js';
15
16
  import '../helpers/convert.js';
16
17
 
17
18
  const ComponentWrapperPreview = ({ children, ...props })=>{
@@ -37,6 +38,10 @@ const ComponentWrapperPreview = ({ children, ...props })=>{
37
38
  if (props.tag === 'Section' && props.isThemeSection) {
38
39
  customProps['data-theme-section'] = true;
39
40
  }
41
+ if (props.tag === 'Section' && props.isShopifySection) {
42
+ customProps['data-shopify-section'] = true;
43
+ customProps['data-toolbar-wrap'] = true;
44
+ }
40
45
  // Build editor configs
41
46
  if (props.editorConfigs) {
42
47
  const editorConfigs = props.editorConfigs;
@@ -91,6 +96,40 @@ const ComponentWrapperPreview = ({ children, ...props })=>{
91
96
  'data-component-label': props.label,
92
97
  'data-not-droppable': isNotDroppable(props.tag)
93
98
  };
99
+ const ShopifySection = ({ name, visibility })=>{
100
+ return /*#__PURE__*/ jsxs("div", {
101
+ className: cls('gp-flex gp-items-center gp-justify-center gp-gap-[8px] gp-bg-[#F4F4F4] gp-p-[16px] gp-border gp-border-[#D6D6D6]', {
102
+ 'gp-opacity-60': !visibility
103
+ }),
104
+ children: [
105
+ /*#__PURE__*/ jsxs("svg", {
106
+ width: "24",
107
+ height: "24",
108
+ viewBox: "0 0 24 24",
109
+ fill: "none",
110
+ xmlns: "http://www.w3.org/2000/svg",
111
+ children: [
112
+ /*#__PURE__*/ jsx("path", {
113
+ d: "M19.1475 5.16194C19.1416 5.1148 19.1197 5.0713 19.0857 5.03911C19.0516 5.00692 19.0076 4.9881 18.9614 4.98597C18.8835 4.98597 17.3469 4.95397 17.3469 4.95397C17.3469 4.95397 16.0588 3.67419 15.9342 3.5311C15.8104 3.40312 15.5619 3.43512 15.4684 3.46711L14.8166 3.67508C14.7361 3.40491 14.6323 3.14259 14.5067 2.89121C14.0566 1.99536 13.3727 1.51544 12.5659 1.51544C12.5044 1.51544 12.4577 1.51544 12.3954 1.53144C12.3642 1.49945 12.3486 1.46745 12.3175 1.45145C11.9608 1.06752 11.5107 0.875552 10.967 0.891549C9.92824 0.923543 8.88772 1.70741 8.03419 3.08318C7.44467 4.05901 6.99453 5.27392 6.8543 6.21776C5.65969 6.6017 4.82087 6.87365 4.79057 6.87365C4.18461 7.06562 4.16903 7.08161 4.09199 7.67351C4.06082 8.12144 2.47754 20.7415 2.47754 20.7415L15.7636 23.1091L21.522 21.6374C21.5064 21.6374 19.1631 5.27392 19.1475 5.16194ZM14.1492 3.89904C13.8062 4.00572 13.4648 4.11772 13.1251 4.23498C13.1251 3.69108 13.0472 2.92321 12.8143 2.28331C13.6064 2.41129 13.9942 3.33914 14.1492 3.89904ZM12.4265 4.44206C11.7279 4.66602 10.9679 4.90598 10.207 5.14594C10.4243 4.29808 10.8277 3.46623 11.3245 2.90632C11.533 2.66965 11.7863 2.47913 12.069 2.34641C12.3806 2.9712 12.4421 3.85105 12.4265 4.44206ZM10.9982 1.61143C11.2466 1.61143 11.4483 1.65942 11.6197 1.7874C11.3127 1.95192 11.0387 2.17444 10.8121 2.44329C10.1455 3.17916 9.63305 4.31408 9.43135 5.4179C8.79423 5.62586 8.17356 5.81783 7.61521 5.9938C7.98744 4.25009 9.39933 1.65942 10.9982 1.61143Z",
114
+ fill: "#95BF47"
115
+ }),
116
+ /*#__PURE__*/ jsx("path", {
117
+ d: "M18.9647 4.94709C18.8851 4.94709 17.3155 4.91503 17.3155 4.91503C17.3155 4.91503 15.9981 3.63242 15.8716 3.48812C15.8261 3.43951 15.7635 3.41074 15.6973 3.40796V23.1094L21.5828 21.6344L19.1709 5.12345C19.1399 5.01122 19.0444 4.94709 18.9647 4.94709Z",
118
+ fill: "#5E8E3E"
119
+ }),
120
+ /*#__PURE__*/ jsx("path", {
121
+ d: "M13.0575 8.51577L12.3029 10.8908C12.3029 10.8908 11.4602 10.5663 10.4599 10.6253C8.98595 10.6991 8.98595 11.4809 8.98595 11.6727C9.07404 12.7348 12.39 12.9709 12.5828 15.4631C12.7238 17.4251 11.3545 18.7675 9.35396 18.8708C6.96778 18.9733 5.65137 17.7939 5.65137 17.7939L6.16032 15.9794C6.16032 15.9794 7.49435 16.8203 8.5465 16.7613C9.23162 16.7318 9.4949 16.245 9.45967 15.9204C9.35396 14.5337 6.65165 14.6223 6.47645 12.3365C6.33551 10.4188 7.82712 8.48626 11.1265 8.30924C12.4076 8.23548 13.0575 8.51577 13.0575 8.51577Z",
122
+ fill: "white"
123
+ })
124
+ ]
125
+ }),
126
+ /*#__PURE__*/ jsx("span", {
127
+ className: "gp-text-[#212121] gp-text-[14px] gp-leading-[24px] gp-font-medium",
128
+ children: name
129
+ })
130
+ ]
131
+ });
132
+ };
94
133
  if (disableWrap.includes(props.tag) && /*#__PURE__*/ isValidElement(children)) {
95
134
  return /*#__PURE__*/ jsxs(Fragment, {
96
135
  children: [
@@ -105,7 +144,10 @@ const ComponentWrapperPreview = ({ children, ...props })=>{
105
144
  builderAttrs,
106
145
  advanced,
107
146
  children: [
108
- children.props['children'],
147
+ props.isShopifySection ? /*#__PURE__*/ jsx(ShopifySection, {
148
+ name: props.name ?? '',
149
+ visibility: !!props.isShopifyVisibility
150
+ }) : children.props['children'],
109
151
  /*#__PURE__*/ jsx(ComponentToolbarPreview, {
110
152
  ...props
111
153
  })
@@ -34,7 +34,9 @@ const disableWrap = [
34
34
  'ProductImagesV2',
35
35
  'PostPurchaseProductImages',
36
36
  'Sticky',
37
- 'Heading'
37
+ 'Heading',
38
+ 'ProductBadge',
39
+ 'Marquee'
38
40
  ];
39
41
  const customRenderChildren = [
40
42
  'Accordion',
@@ -45,7 +47,8 @@ const customRenderChildren = [
45
47
  ];
46
48
  const excludeApplyStyle = [
47
49
  'IconListV2',
48
- 'IconList'
50
+ 'IconList',
51
+ 'ProductBadge'
49
52
  ];
50
53
  const postPurchaseRequiredElements = [
51
54
  'PostPurchaseProductOffer',
@@ -251,7 +251,11 @@ const createBuilderPreviewProvider = (args, isThemeSectionEditor)=>createStore((
251
251
  }
252
252
  },
253
253
  getItem: (id)=>{
254
- return get().state[id];
254
+ const item = get().state[id];
255
+ return {
256
+ ...item,
257
+ rawChildrens: item?.childrens?.map((v)=>get().state[v])
258
+ };
255
259
  },
256
260
  removeItem: (id)=>{
257
261
  if (id === 'ROOT') {
@@ -426,15 +430,16 @@ const createBuilderPreviewProvider = (args, isThemeSectionEditor)=>createStore((
426
430
  updateItemAttribute: (id, value, attr)=>{
427
431
  if (!attr || ![
428
432
  'label',
429
- 'customLabel'
433
+ 'customLabel',
434
+ 'isShopifyVisibility'
430
435
  ].includes(attr)) return;
431
436
  const state = get().state;
432
437
  const item = state[id];
433
- // Ignore section
434
- if (item?.type === 'section') return;
435
438
  if (item) {
436
- const dateModified = Date.now();
437
- item.dateModified = dateModified;
439
+ if (item.type !== 'section') {
440
+ const dateModified = Date.now();
441
+ item.dateModified = dateModified;
442
+ }
438
443
  const updatedItem = {
439
444
  ...item,
440
445
  [attr]: value
@@ -8,6 +8,7 @@ const SectionContext = /*#__PURE__*/ createContext(null);
8
8
  const createSectionProvider = (data)=>createStore((set, get)=>({
9
9
  data: data ?? {},
10
10
  getSection: (id)=>{
11
+ console.log('get().data', get().data);
11
12
  const section = get().data[id];
12
13
  return section ?? undefined;
13
14
  },
@@ -17,6 +17,15 @@
17
17
  featuredImage {
18
18
  ...MediaSelect
19
19
  }
20
+ collections {
21
+ edges {
22
+ node {
23
+ id
24
+ title
25
+ }
26
+ }
27
+ }
28
+ tags
20
29
  }
21
30
  `;
22
31
 
@@ -1,6 +1,15 @@
1
1
  /* eslint-disable */ const ProductSelect = `
2
2
  fragment ProductSelect on Product {
3
3
  ...ProductLittleSelect
4
+ collections {
5
+ edges {
6
+ node {
7
+ id
8
+ title
9
+ }
10
+ }
11
+ }
12
+ tags
4
13
  medias(first: $firstMedia, after: $afterMedia, orderBy: $orderByMedia) {
5
14
  edges {
6
15
  cursor
@@ -11,6 +11,15 @@ const ProductsEdgeDetail = `
11
11
  cursor
12
12
  node {
13
13
  ...ProductSelect
14
+ tags
15
+ collections {
16
+ edges {
17
+ node {
18
+ id
19
+ title
20
+ }
21
+ }
22
+ }
14
23
  }
15
24
  }
16
25
  `;
@@ -1,14 +1,14 @@
1
1
  const globalEvent = {
2
- subscribe (callback) {
3
- document.addEventListener('onDispatch', (e)=>callback(e.detail));
2
+ subscribe (eventName, callback) {
3
+ document.addEventListener(eventName, (e)=>callback(e.detail));
4
4
  },
5
- dispatch (data) {
6
- document.dispatchEvent(new CustomEvent('onDispatch', {
7
- detail: data
5
+ dispatch (eventName, detail) {
6
+ document.dispatchEvent(new CustomEvent(eventName, {
7
+ detail
8
8
  }));
9
9
  },
10
- remove (callback) {
11
- document.removeEventListener('onDispatch', callback);
10
+ remove (eventName, callback) {
11
+ document.removeEventListener(eventName, callback);
12
12
  }
13
13
  };
14
14
 
@@ -55,6 +55,29 @@ const getProducts = async (fetcher, { ids, isSample, isStorefront, defaultSelect
55
55
  }
56
56
  };
57
57
  };
58
+ const getProductQueryAll = async (fetcher, arg)=>{
59
+ const limit = arg?.limit || 4;
60
+ delete arg.limit;
61
+ const variables = {
62
+ first: limit,
63
+ firstMedia: 1,
64
+ firstVariant: 1,
65
+ orderBy: {
66
+ field: 'PLATFORM_CREATED_AT',
67
+ direction: 'DESC'
68
+ },
69
+ orderByMedia: {
70
+ field: 'POSITION',
71
+ direction: 'ASC'
72
+ },
73
+ where: {
74
+ status: 'ACTIVE',
75
+ ...arg
76
+ }
77
+ };
78
+ const pageData = await fetchProducts(fetcher, variables);
79
+ return pageData;
80
+ };
58
81
  const fetchProducts = async (fetcher, variables)=>{
59
82
  return fetcher([
60
83
  ProductsDocument,
@@ -162,4 +185,4 @@ const mergeMediasToProducts = async ({ fetcher, products, isSample, isStorefront
162
185
  // );
163
186
  // };
164
187
 
165
- export { getProducts };
188
+ export { getProductQueryAll, getProducts };
@@ -41,6 +41,18 @@ const makeGlobalSize = (globalSize)=>{
41
41
  gap: getGlobalSizeGap(globalSize)
42
42
  };
43
43
  };
44
+ const makeGlobalSizeIcon = (globalSize)=>{
45
+ return {
46
+ width: makeStyleWithDefault('w', getWidthHeightGlobalSize('width', globalSize), {
47
+ desktop: '--g-ct-w',
48
+ tablet: '--g-ct-w',
49
+ mobile: '--g-ct-w'
50
+ }),
51
+ height: makeStyleResponsive('h', getWidthHeightGlobalSize('width', globalSize)),
52
+ minWidth: makeStyleResponsive('minw', getWidthHeightGlobalSize('width', globalSize)),
53
+ padding: getPaddingGlobalSize(globalSize)
54
+ };
55
+ };
44
56
  const getGlobalSizeGap = (globalSize)=>{
45
57
  return {
46
58
  '--gg': globalSize?.desktop?.gap,
@@ -168,4 +180,4 @@ const getPaddingGlobalSize = (globalSize)=>{
168
180
  return Object.assign({}, getCustomPaddingSizeCSSByDevice(globalSize, 'desktop'), getCustomPaddingSizeCSSByDevice(globalSize, 'tablet'), getCustomPaddingSizeCSSByDevice(globalSize, 'mobile'));
169
181
  };
170
182
 
171
- export { composeSize, composeSizeCss, genSizeClass, getAspectRatioGlobalSize, getGlobalSizeGap, getHeightByShapeGlobalSize, getPaddingGlobalSize, getWidthByShapeGlobalSize, getWidthHeightGlobalSize, makeGlobalSize, makeStyleWithDefault };
183
+ export { composeSize, composeSizeCss, genSizeClass, getAspectRatioGlobalSize, getGlobalSizeGap, getHeightByShapeGlobalSize, getPaddingGlobalSize, getWidthByShapeGlobalSize, getWidthHeightGlobalSize, makeGlobalSize, makeGlobalSizeIcon, makeStyleWithDefault };
@@ -1,5 +1,5 @@
1
1
  import useSWR from 'swr';
2
- import { getProducts } from '../../helpers/queries/get-products.js';
2
+ import { getProducts, getProductQueryAll } from '../../helpers/queries/get-products.js';
3
3
  import { generateProductsQueryKey } from '../../helpers/query.js';
4
4
  import { useIsSampleProduct, useIsStorefrontProduct } from '../shop.js';
5
5
  import { useFetchHandle } from '../useFetchHandle.js';
@@ -18,5 +18,14 @@ const useProductsQuery = (ids, options, params)=>{
18
18
  return getProducts(params?.fetcher || fetcher, arg);
19
19
  }, options);
20
20
  };
21
+ const useProductsQueryAll = (variable, options)=>{
22
+ const fetcher = useFetchHandle();
23
+ return useSWR(variable ? [
24
+ 'query/products',
25
+ variable
26
+ ] : null, async ([, arg])=>{
27
+ return getProductQueryAll(fetcher, arg);
28
+ }, options);
29
+ };
21
30
 
22
- export { useProductsQuery };
31
+ export { useProductsQuery, useProductsQueryAll };
package/dist/esm/index.js CHANGED
@@ -54,7 +54,7 @@ export { generateCollectionQueryKey, generateProductQueryKey, generateProductsQu
54
54
  export { composeCornerCss, composeRadius, composeRadiusResponsive, getCornerCSSFromGlobal, getCustomRadius, getRadiusCSSFromGlobal, getRadiusStyleActiveState } from './helpers/radius.js';
55
55
  export { RenderIf, composeMemo, dataStringify, props, removeUndefinedValuesFromObject, styles, template } from './helpers/render.js';
56
56
  export { composeShadowCss, getStyleShadow, getStyleShadowState, parseValueWithUnit } from './helpers/shadow.js';
57
- export { composeSize, composeSizeCss, genSizeClass, getAspectRatioGlobalSize, getGlobalSizeGap, getHeightByShapeGlobalSize, getPaddingGlobalSize, getWidthByShapeGlobalSize, getWidthHeightGlobalSize, makeGlobalSize, makeStyleWithDefault } from './helpers/size.js';
57
+ export { composeSize, composeSizeCss, genSizeClass, getAspectRatioGlobalSize, getGlobalSizeGap, getHeightByShapeGlobalSize, getPaddingGlobalSize, getWidthByShapeGlobalSize, getWidthHeightGlobalSize, makeGlobalSize, makeGlobalSizeIcon, makeStyleWithDefault } from './helpers/size.js';
58
58
  export { composeFallbackTypographyStyle, composeTypography, composeTypographyAttr, composeTypographyClassName, composeTypographyCss, composeTypographyStyle, composeTypographyV2, composeTypographyV2Css, genTypoClass } from './helpers/typography.js';
59
59
  export { validateEmail } from './helpers/email.js';
60
60
  export { loadScript } from './helpers/load-script.js';
@@ -77,7 +77,7 @@ export { useCheckoutUrl, useConnectedShopify, useCurrency, useEditorMode, useIsS
77
77
  export { useCollectionQuery } from './hooks/shop/use-collection-query.js';
78
78
  export { useCollectionsQuery } from './hooks/shop/use-collections-query.js';
79
79
  export { useProductQuery } from './hooks/shop/use-product-query.js';
80
- export { useProductsQuery } from './hooks/shop/use-products-query.js';
80
+ export { useProductsQuery, useProductsQueryAll } from './hooks/shop/use-products-query.js';
81
81
  export { useCurrentDevice } from './hooks/use-current-device.js';
82
82
  export { shopifyPriceRounding, useFormatMoney } from './hooks/useFormatMoney.js';
83
83
  export { useLazyVideo } from './hooks/use-lazy-video.js';
@@ -5183,6 +5183,7 @@ type PublishedThemePage$1 = {
5183
5183
  themePageOnlineStoreData?: Maybe$1<Array<Maybe$1<PublishedThemePageOnlineStoreData$1>>>;
5184
5184
  type: PublishedThemePageType$1;
5185
5185
  updatedAt?: Maybe$1<Scalars$2['Time']>;
5186
+ publishedAt?: Maybe$1<Scalars$2['Time']>;
5186
5187
  };
5187
5188
  type PublishedThemePageCustomSection$1 = {
5188
5189
  id: Scalars$2['ID'];
@@ -6470,6 +6471,7 @@ type BlockEntity = {
6470
6471
  name?: string;
6471
6472
  dateModified?: string | number;
6472
6473
  childrens?: string[];
6474
+ rawChildrens?: BlockEntity[];
6473
6475
  settings?: Record<string, any>;
6474
6476
  advanced?: Record<string, any>;
6475
6477
  styles?: Record<string, any>;
@@ -6477,6 +6479,8 @@ type BlockEntity = {
6477
6479
  type?: 'component';
6478
6480
  isThemeSection?: boolean;
6479
6481
  needPublishing?: boolean;
6482
+ isShopifySection?: boolean;
6483
+ isShopifyVisibility?: boolean;
6480
6484
  };
6481
6485
  type SectionEntity = {
6482
6486
  uid: string;
@@ -6486,6 +6490,8 @@ type SectionEntity = {
6486
6490
  name?: string;
6487
6491
  isThemeSection?: boolean;
6488
6492
  needPublishing?: boolean;
6493
+ isShopifySection?: boolean;
6494
+ isShopifyVisibility?: boolean;
6489
6495
  };
6490
6496
  type BuilderEntity = BlockEntity | SectionEntity;
6491
6497
  type BuilderEntityNested = Omit<BlockEntity, 'childrens'> & {
@@ -6536,9 +6542,15 @@ type SaleFunnelDiscountEdge$1 = {
6536
6542
  cursor: Scalars$1['Cursor'];
6537
6543
  node?: Maybe$1<SaleFunnelDiscount$1>;
6538
6544
  };
6539
- type ProductOffer = Maybe$1<Pick<SaleFunnelDiscountEdge$1, "cursor"> & {
6540
- node?: Maybe$1<Pick<SaleFunnelDiscount$1, "id" | "value" | "type" | "position" | "objectBaseID" | "objectType" | "title" | "valueType" | "isEnabled">>;
6545
+ type ProductOffer = Maybe$1<Pick<SaleFunnelDiscountEdge$1, 'cursor'> & {
6546
+ node?: Maybe$1<Pick<SaleFunnelDiscount$1, 'id' | 'value' | 'type' | 'position' | 'objectBaseID' | 'objectType' | 'title' | 'valueType' | 'isEnabled'>>;
6541
6547
  }>;
6548
+ type RawChild = {
6549
+ uid: string;
6550
+ builder: Record<string, any>;
6551
+ components: Record<string, any>;
6552
+ [key: string]: any;
6553
+ };
6542
6554
 
6543
6555
  type InitComponentType<T = any> = {
6544
6556
  [K in keyof T]-?: {
@@ -6604,7 +6616,7 @@ type Component = InitComponentType & {
6604
6616
  };
6605
6617
  type NameDevices$1 = 'desktop' | 'tablet' | 'mobile';
6606
6618
  type ObjectDevices<T> = Partial<Record<NameDevices$1, T>>;
6607
- type StateType = 'normal' | 'hover' | 'focus' | 'active';
6619
+ type StateType = 'normal' | 'hover' | 'focus' | 'active' | 'price' | 'compareAtPrice';
6608
6620
  type StateProp<T> = Partial<Record<StateType, T>>;
6609
6621
  type ResponsiveStateProp<T> = ObjectDevices<StateProp<T>>;
6610
6622
  type AlignItemProp = 'left' | 'center' | 'right';
@@ -6725,6 +6737,8 @@ type Mapped$7<K, T> = NonNullable<T> extends ObjectDevices<infer U> ? {
6725
6737
  hover?: boolean;
6726
6738
  focus?: boolean;
6727
6739
  active?: boolean;
6740
+ price?: boolean;
6741
+ compareAtPrice?: boolean;
6728
6742
  };
6729
6743
  emptyOnClear?: boolean;
6730
6744
  showVideo?: boolean;
@@ -6956,6 +6970,7 @@ type PositionControlType<T> = SharedControlType<T> & {
6956
6970
 
6957
6971
  type PositionSquareControlType<T> = SharedControlType<T> & {
6958
6972
  type: 'position:square';
6973
+ ignoreValue?: string[];
6959
6974
  };
6960
6975
 
6961
6976
  type RadioGroupControlType = {
@@ -6976,6 +6991,7 @@ type RangeControlType<T> = SharedControlType<T> & {
6976
6991
  disableOnChange?: boolean;
6977
6992
  useOnlyUnitInit?: boolean;
6978
6993
  hideUnit?: boolean;
6994
+ hideInput?: boolean;
6979
6995
  };
6980
6996
 
6981
6997
  type Option$3<T> = {
@@ -7378,6 +7394,10 @@ type VariantSwatchesPresetControlType<T> = SharedControlType<T> & {
7378
7394
  id?: string;
7379
7395
  type: 'variant:presets';
7380
7396
  };
7397
+ type VariantSwatchesOnlyDefaultVariantControlType<T> = SharedControlType<T> & {
7398
+ id?: string;
7399
+ type: 'variant:default';
7400
+ };
7381
7401
 
7382
7402
  type LayoutControlType<T> = SharedControlType<T> & {
7383
7403
  type: 'layout';
@@ -7439,6 +7459,7 @@ type TypographyV2ControlType<T> = SharedControlType<T> & {
7439
7459
  color?: boolean;
7440
7460
  transform?: boolean;
7441
7461
  };
7462
+ disableCollapse?: boolean;
7442
7463
  };
7443
7464
 
7444
7465
  type StickyDisplayControlType<T> = SharedControlType<T> & {
@@ -7681,6 +7702,7 @@ type ProductOffersControlType<T> = SharedControlType<T> & {
7681
7702
 
7682
7703
  type DiscountAndShippingFee<T> = SharedControlType<T> & {
7683
7704
  type: 'discount-and-shipping-fee-product-offer';
7705
+ multiple: boolean;
7684
7706
  };
7685
7707
 
7686
7708
  type PostPurchaseTextareaControlType<T> = SharedControlType<T> & {
@@ -7698,7 +7720,16 @@ type PostPurchaseTextareaControlType<T> = SharedControlType<T> & {
7698
7720
  }[];
7699
7721
  };
7700
7722
 
7701
- 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> | LayoutBannerControlType<T> | SwatchesLinkControlType<T> | VariantSwatchesPresetControlType<T> | ProductListControlType<T> | CollectionBannerControlType<T> | Ratio<T> | StickyDisplayControlType<T> | SyncProductPropertiesControlType<T> | StepsGuide<T> | ImageShape<T> | GridArrange<T> | SizeSetting$1<T> | ChildIconType<T> | DropdownInput<T> | Dropdown<T> | AliPickSectionControlType<T> | ParallaxScrollingType<T> | BackgroundColorPickerType<T> | PlayPauseControlType<T> | LayoutCustomSegmentControlType<T> | SneakPeakRange<T> | SneakPeakTypeControlType<T> | SneakPeakControlType<T> | BackgroundColorPickerType<T> | ProductInputCurrencyUnitControlType<T> | TypographyPostPurchaseControlType<T> | ProductOffersControlType<T> | DiscountAndShippingFee<T> | SneakPeakControlType<T> | PostPurchaseTextareaControlType<T>;
7723
+ type NotesControlType<T> = SharedControlType<T> & {
7724
+ type: 'notes';
7725
+ value?: string;
7726
+ };
7727
+
7728
+ type ButtonLayoutType<T> = SharedControlType<T> & {
7729
+ type: 'button-layout';
7730
+ };
7731
+
7732
+ 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> | LayoutBannerControlType<T> | SwatchesLinkControlType<T> | VariantSwatchesPresetControlType<T> | VariantSwatchesOnlyDefaultVariantControlType<T> | ProductListControlType<T> | CollectionBannerControlType<T> | Ratio<T> | StickyDisplayControlType<T> | SyncProductPropertiesControlType<T> | StepsGuide<T> | ImageShape<T> | GridArrange<T> | SizeSetting$1<T> | ChildIconType<T> | DropdownInput<T> | Dropdown<T> | AliPickSectionControlType<T> | ParallaxScrollingType<T> | BackgroundColorPickerType<T> | PlayPauseControlType<T> | LayoutCustomSegmentControlType<T> | SneakPeakRange<T> | SneakPeakTypeControlType<T> | SneakPeakControlType<T> | BackgroundColorPickerType<T> | ProductInputCurrencyUnitControlType<T> | TypographyPostPurchaseControlType<T> | ProductOffersControlType<T> | DiscountAndShippingFee<T> | SneakPeakControlType<T> | PostPurchaseTextareaControlType<T> | NotesControlType<T> | NotesControlType<T> | ButtonLayoutType<T>;
7702
7733
  type ControlTriggerAction = {
7703
7734
  controlId: string;
7704
7735
  newValue?: any;
@@ -7833,6 +7864,7 @@ type ComponentPreset = {
7833
7864
  };
7834
7865
  components: InitComponentType[];
7835
7866
  hideTextContent?: boolean;
7867
+ flowTagComponents?: Record<string, InitComponentType[]>;
7836
7868
  };
7837
7869
 
7838
7870
  type PageContext = {
@@ -27319,7 +27351,12 @@ declare const useCartLineStore: <U>(selector: (state: ExtractState<StoreApi<Cart
27319
27351
  type CollectionProductSelectFragment = Pick<Collection$1, 'id' | 'createdAt' | 'updatedAt' | 'deletedAt' | 'title' | 'handle' | 'description' | 'descriptionHtml' | 'templateSuffix' | 'titleMeta' | 'descriptionMeta' | 'baseID' | 'platform' | 'tags' | 'isStorefront' | 'isSample'> & {
27320
27352
  products?: Maybe$1<{
27321
27353
  edges: Array<Pick<ProductEdge$1, 'cursor'> & {
27322
- node?: Maybe$1<Pick<Product$1, 'id' | 'title' | 'description' | 'descriptionHtml' | 'handle' | 'averageRating' | 'isStorefront' | 'isSample' | 'baseID' | 'sku' | 'vendor'> & {
27354
+ node?: Maybe$1<Pick<Product$1, 'tags' | 'id' | 'title' | 'description' | 'descriptionHtml' | 'handle' | 'averageRating' | 'isStorefront' | 'isSample' | 'baseID' | 'sku' | 'vendor'> & {
27355
+ collections?: Maybe$1<{
27356
+ edges: Array<{
27357
+ node?: Maybe$1<Pick<Collection$1, 'id' | 'title'>>;
27358
+ }>;
27359
+ }>;
27323
27360
  medias?: Maybe$1<{
27324
27361
  edges: Array<Pick<MediaEdge$1, 'cursor'> & {
27325
27362
  node?: Maybe$1<Pick<Media$1, 'id' | 'contentType' | 'previewImage' | 'src' | 'width' | 'height' | 'alt'>>;
@@ -27392,7 +27429,12 @@ type ProductListProviderProps = ProductListContextProps & {
27392
27429
  declare const ProductListProvider: React.FC<ProductListProviderProps>;
27393
27430
  declare const useProductListStore: <U>(selector: (state: ExtractState<StoreApi<ProductListContextProps>>) => U, equalityFn?: ((a: U, b: U) => boolean) | undefined) => U;
27394
27431
 
27395
- type ProductSelectFragment = Pick<Product$1, 'id' | 'title' | 'description' | 'descriptionHtml' | 'handle' | 'averageRating' | 'isStorefront' | 'isSample' | 'baseID' | 'sku' | 'vendor'> & {
27432
+ type ProductSelectFragment = Pick<Product$1, 'tags' | 'id' | 'title' | 'description' | 'descriptionHtml' | 'handle' | 'averageRating' | 'isStorefront' | 'isSample' | 'baseID' | 'sku' | 'vendor'> & {
27433
+ collections?: Maybe$1<{
27434
+ edges: Array<{
27435
+ node?: Maybe$1<Pick<Collection$1, 'id' | 'title'>>;
27436
+ }>;
27437
+ }>;
27396
27438
  medias?: Maybe$1<{
27397
27439
  edges: Array<Pick<MediaEdge$1, 'cursor'> & {
27398
27440
  node?: Maybe$1<Pick<Media$1, 'id' | 'contentType' | 'previewImage' | 'src' | 'width' | 'height' | 'alt'>>;
@@ -27590,7 +27632,12 @@ type CollectionDetailFilterQueryResponse = {
27590
27632
  node?: Maybe$1<Pick<Collection$1, 'id' | 'createdAt' | 'updatedAt' | 'deletedAt' | 'title' | 'handle' | 'description' | 'descriptionHtml' | 'templateSuffix' | 'titleMeta' | 'descriptionMeta' | 'baseID' | 'platform' | 'tags' | 'isStorefront' | 'isSample'> & {
27591
27633
  products?: Maybe$1<{
27592
27634
  edges: Array<Pick<ProductEdge$1, 'cursor'> & {
27593
- node?: Maybe$1<Pick<Product$1, 'id' | 'title' | 'description' | 'descriptionHtml' | 'handle' | 'averageRating' | 'isStorefront' | 'isSample' | 'baseID' | 'sku' | 'vendor'> & {
27635
+ node?: Maybe$1<Pick<Product$1, 'tags' | 'id' | 'title' | 'description' | 'descriptionHtml' | 'handle' | 'averageRating' | 'isStorefront' | 'isSample' | 'baseID' | 'sku' | 'vendor'> & {
27636
+ collections?: Maybe$1<{
27637
+ edges: Array<{
27638
+ node?: Maybe$1<Pick<Collection$1, 'id' | 'title'>>;
27639
+ }>;
27640
+ }>;
27594
27641
  medias?: Maybe$1<{
27595
27642
  edges: Array<Pick<MediaEdge$1, 'cursor'> & {
27596
27643
  node?: Maybe$1<Pick<Media$1, 'id' | 'contentType' | 'previewImage' | 'src' | 'width' | 'height' | 'alt'>>;
@@ -27720,7 +27767,12 @@ type ProductsQueryVariables = Exact$1<{
27720
27767
  type ProductsQueryResponse = {
27721
27768
  products?: Maybe$1<{
27722
27769
  edges: Array<Pick<ProductEdge$1, 'cursor'> & {
27723
- node?: Maybe$1<Pick<Product$1, 'id' | 'title' | 'description' | 'descriptionHtml' | 'handle' | 'averageRating' | 'isStorefront' | 'isSample' | 'baseID' | 'sku' | 'vendor'> & {
27770
+ node?: Maybe$1<Pick<Product$1, 'tags' | 'id' | 'title' | 'description' | 'descriptionHtml' | 'handle' | 'averageRating' | 'isStorefront' | 'isSample' | 'baseID' | 'sku' | 'vendor'> & {
27771
+ collections?: Maybe$1<{
27772
+ edges: Array<{
27773
+ node?: Maybe$1<Pick<Collection$1, 'id' | 'title'>>;
27774
+ }>;
27775
+ }>;
27724
27776
  medias?: Maybe$1<{
27725
27777
  edges: Array<Pick<MediaEdge$1, 'cursor'> & {
27726
27778
  node?: Maybe$1<Pick<Media$1, 'id' | 'contentType' | 'previewImage' | 'src' | 'width' | 'height' | 'alt'>>;
@@ -27745,6 +27797,13 @@ type ProductsQueryResponse = {
27745
27797
  pageInfo?: Maybe$1<Pick<PageInfo$1, 'endCursor' | 'hasNextPage'>>;
27746
27798
  }>;
27747
27799
  };
27800
+ type VariableRelatedStyles = {
27801
+ limit?: number | undefined;
27802
+ vendor?: string;
27803
+ idNEQ?: string;
27804
+ hasProductTagsWith?: InputMaybe$1<ProductTagWhereInput$1[]>;
27805
+ hasCollectionProductsWith?: InputMaybe$1<CollectionProductWhereInput$1[]>;
27806
+ };
27748
27807
  declare const ProductsDocument: string;
27749
27808
 
27750
27809
  type StorePropertyQueryVariables = Exact$1<{
@@ -27890,9 +27949,9 @@ declare const isColumnDirectionExist: (layout: ObjectDevices<ObjectLayoutValue>,
27890
27949
  declare function getShortName(name: string): string;
27891
27950
 
27892
27951
  declare const globalEvent: {
27893
- subscribe(callback: (detail: any) => void): void;
27894
- dispatch(data: any): void;
27895
- remove(callback: (val?: any) => void): void;
27952
+ subscribe(eventName: string, callback: (detail: any) => void): void;
27953
+ dispatch(eventName: string, detail: any): void;
27954
+ remove(eventName: string, callback: (detail: any) => void): void;
27896
27955
  };
27897
27956
 
27898
27957
  declare function isBrowser(): boolean;
@@ -34074,6 +34133,12 @@ declare const makeGlobalSize: (globalSize?: ObjectDevices<SizeSettingGlobal>) =>
34074
34133
  '--gg-mobile': string | undefined;
34075
34134
  };
34076
34135
  };
34136
+ declare const makeGlobalSizeIcon: (globalSize?: ObjectDevices<SizeSettingGlobal>) => {
34137
+ width: Record<ResponsiveKey<"w">, string | number>;
34138
+ height: Record<ResponsiveKey<"h">, string | number>;
34139
+ minWidth: Record<ResponsiveKey<"minw">, string | number>;
34140
+ padding: React.CSSProperties;
34141
+ };
34077
34142
  declare const getGlobalSizeGap: (globalSize?: ObjectDevices<SizeSettingGlobal>) => {
34078
34143
  '--gg': string | undefined;
34079
34144
  '--gg-tablet': string | undefined;
@@ -35740,6 +35805,7 @@ declare const useProductsQuery: (ids?: string[], options?: SWRConfiguration<Prod
35740
35805
  allStatus?: boolean;
35741
35806
  fetcher?: FetchFunc;
35742
35807
  }) => swr__internal.SWRResponse<ProductsQueryResponse, any, Partial<swr__internal.PublicConfiguration<ProductsQueryResponse, any, (arg: ["query/products", FetchProductsParams]) => swr__internal.FetcherResponse<ProductsQueryResponse>>> | undefined>;
35808
+ declare const useProductsQueryAll: (variable?: VariableRelatedStyles | undefined, options?: SWRConfiguration<ProductsQueryResponse>) => swr__internal.SWRResponse<ProductsQueryResponse, any, Partial<swr__internal.PublicConfiguration<ProductsQueryResponse, any, (arg: ["query/products", any]) => swr__internal.FetcherResponse<ProductsQueryResponse>>> | undefined>;
35743
35809
 
35744
35810
  declare const useCurrentDevice: () => NameDevices$1;
35745
35811
 
@@ -35843,11 +35909,11 @@ declare const useSelectedOption: () => {
35843
35909
  setSelectedOption: (optionId?: Maybe$1<string>, optionValue?: Maybe$1<string>, productId?: Maybe$1<string>, noEmit?: boolean) => void;
35844
35910
  forceSelectedOption: (selectedOption?: Record<string, string>, productId?: Maybe$1<string>, noEmit?: boolean) => void;
35845
35911
  };
35846
- declare const useVariants: () => Maybe$1<Pick<ProductVariant$1, "id" | "title" | "width" | "height" | "length" | "weight" | "baseID" | "platform" | "sku" | "barcode" | "costPrice" | "inventoryPolicy" | "inventoryQuantity" | "inventoryStatus" | "isDigital" | "lowInventoryAmount" | "manageInventory" | "mediaId" | "price" | "salePrice" | "soldIndividually"> & {
35912
+ declare const useVariants: () => Maybe$1<Pick<ProductVariant$1, "id" | "title" | "price" | "width" | "height" | "length" | "weight" | "baseID" | "platform" | "sku" | "barcode" | "costPrice" | "inventoryPolicy" | "inventoryQuantity" | "inventoryStatus" | "isDigital" | "lowInventoryAmount" | "manageInventory" | "mediaId" | "salePrice" | "soldIndividually"> & {
35847
35913
  selectedOptions: Pick<SelectedOption$1, "name" | "value" | "optionType">[];
35848
35914
  media?: Maybe$1<Pick<Media$1, "id" | "width" | "height" | "src" | "alt" | "contentType" | "previewImage">>;
35849
35915
  }>[];
35850
- declare const useVariant: (id: string) => Maybe$1<Pick<ProductVariant$1, "id" | "title" | "width" | "height" | "length" | "weight" | "baseID" | "platform" | "sku" | "barcode" | "costPrice" | "inventoryPolicy" | "inventoryQuantity" | "inventoryStatus" | "isDigital" | "lowInventoryAmount" | "manageInventory" | "mediaId" | "price" | "salePrice" | "soldIndividually"> & {
35916
+ declare const useVariant: (id: string) => Maybe$1<Pick<ProductVariant$1, "id" | "title" | "price" | "width" | "height" | "length" | "weight" | "baseID" | "platform" | "sku" | "barcode" | "costPrice" | "inventoryPolicy" | "inventoryQuantity" | "inventoryStatus" | "isDigital" | "lowInventoryAmount" | "manageInventory" | "mediaId" | "salePrice" | "soldIndividually"> & {
35851
35917
  selectedOptions: Pick<SelectedOption$1, "name" | "value" | "optionType">[];
35852
35918
  media?: Maybe$1<Pick<Media$1, "id" | "width" | "height" | "src" | "alt" | "contentType" | "previewImage">>;
35853
35919
  }>;
@@ -35902,4 +35968,4 @@ type PublishedThemePageSelectFragment = Pick<PublishedThemePage$1, 'id' | 'name'
35902
35968
 
35903
35969
  declare const getProductBySlug: (fetcher: FetchFunc, slug?: string) => Promise<ProductSelectFragment>;
35904
35970
 
35905
- export { AddOn, AddonProvider, AddonProviderProps, AdvancedType, AliReviewsWidgetType, AlignItemProp, AlignProp, AnimationBaseSetting, AnimationConfig, AnimationDirectionType, AnimationEasingType, AnimationFadeSettingType, AnimationSetting, AnimationSettingType, AnimationShakeSettingType, AnimationSlideSettingType, AnimationTrigger, AnimationTriggerType, AnimationType, AnimationZoomDirectionType, AnimationZoomSettingType, appAPI as AppAPIType, Background, BaseProps, BasePropsWrap, BlockEntity, BogosWidgetType, 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, ControlTriggerAction, ControlUI, CornerRadius, CornerRadiusType, CustomComponentConfig, DeepPartial, DynamicCollection, DynamicProduct, ExtractState, FeraReviewsV3WidgetType, FeraReviewsWidgetType, FetchCollectionArgs, FetchFunc, FetchProductParams, FlexDirectionProp, FontName, GRADIENT_BGR_KEY, GlobalStyleConfig, GlobalStyleResponsiveConfig, GlobalSwatchesData, GraphQLConnection, GroupPropType, GrowaveWidgetType, HSLAColorType, HSLColorType, HexColorType, ImageShape$1 as ImageShape, InitComponentType, InstantJudgeMeReviewsWidgetType, InstantKlaviyoWidgetType, InstantLooxReviewsWidgetType, JudgeMeReviewsWidgetType, KlaviyoWidgetType, LaiProductReviewsAdvancedWidgetType, LaiProductReviewsWidgetType, LibrarySaleFunnelDocument, LibrarySaleFunnelQueryResponse, LibrarySaleFunnelQueryVariables, LibraryTemplateDocument, LibraryTemplateQueryResponse, LibraryTemplateQueryVariables, LooxReviewsWidgetType, ModalProvider, ModalProviderProps, NameDevices$1 as NameDevices, NestedKeys, ObjectDeviceGlobalType, ObjectDevices, ObjectLayoutValue, OmnisendWidgetType, OpinewDesignWidgetType, OpinewWidgetType, OptionNormalStyle, OptionSpecialStyle, Options, PageContext, PageProvider, PageProviderProps, PageType, PageViewUpDocument, PageViewUpMutationResponse, PageViewUpMutationVariables, PickyStoryWidgetType, PostPurchaseTypo, PreviewPageDocument, PreviewPageQueryResponse, PreviewPageQueryVariables, Primitive, ProductInputAnalytic, ProductListProvider, ProductListProviderProps, ProductOffer, ProductProvider, ProductProviderProps, ProductReviewsWidgetType, ProductSelectFragment, ProductsDocument, ProductsQueryResponse, ProductsQueryVariables, PublicStoreFrontData, PublishedThemePageSelectFragment, PublishedThemePagesDocument, PublishedThemePagesQueryResponse, PublishedThemePagesQueryVariables, RGBAColorType, RGBColorType, Ratio$1 as Ratio, RenderMemo as Render, RenderChildren, RenderIf, Render as RenderLiquid, RenderMode, RenderPreviewMemo as RenderPreview, RequiredCursorEdge, ResponsiveKey, ResponsiveStateProp, RivyoWidgetType, RoundedSize, RyviuWidgetType, SaleFunnelDiscount$1 as SaleFunnelDiscount, SaleFunnelDiscountEdge$1 as SaleFunnelDiscountEdge, SaleFunnelDiscountObjectType$1 as SaleFunnelDiscountObjectType, SaleFunnelDiscountType$1 as SaleFunnelDiscountType, SaleFunnelDiscountValueType$1 as SaleFunnelDiscountValueType, SaleFunnelDiscountsDocument, SaleFunnelDiscountsQueryResponse, SaleFunnelDiscountsQueryVariables, Scalars$1 as Scalars, ScaleByDirection, SectionData, SectionEntity, SectionProvider, SectionProviderProps, SettingByAnimationType, SettingByAnimationValues, ShadowProps, ShadowStyle, ShadowStyleApplied, ShadowType, ShopProvider, ShopProviderProps, shop as ShopType, SizeProps, SizeSetting, SizeSettingGlobal, SizeType, SpacingType, StampedWidgetType, StateProp, StateSelector, StateType, StoreConfig, StorePropertyDocument, StorePropertyQueryResponse, StorePropertyQueryVariables, SwatchesOptionType, SwatchesOptionValue, ThemePageDocument, ThemePageQueryResponse, ThemePageQueryVariables, TransformProp, TriggerConfig, TrustooWidgetType, TypographyProps, TypographySetting, TypographySettingV2, TypographyType, TypographyV2Attrs, TypographyV2Props, UltimateSalesBoostWidgetType, VariantSelectFragment, VitalsWidgetType, WiserV2WidgetType, WiserWidgetType, WrapRenderChildren, YotpoReviewsWidgetType, animations, baseAssetURL, calculateFirstProduct, checkAvailableVariantInStock, cls, composeAdvanceStyle, composeAdvanceStyleForPostPurchase, composeBackgroundCss, composeBorderCss, composeCornerCss, composeFallbackTypographyStyle, composeGridLayout, composeMemo, composePositionLineHeight, composePostionIconList, composeRadius, composeRadiusResponsive, composeShadowCss, composeSize, composeSizeCss, composeSpacing, composeTextColorCss, composeTypography, composeTypographyAttr, composeTypographyClassName, composeTypographyCss, composeTypographyStyle, composeTypographyV2, composeTypographyV2Css, convertHTML, convertOldLayout, dataStringify, fetchMedias, fetchVariants, filterAttrInStyle, filterCornerInStyle, filterToolbarPreview, flattenConnection, fpixel, genSizeClass, genTypoClass, genVariable, generateCollectionQueryKey, generateProductQueryKey, generateProductsQueryKey, getAspectRatioGlobalSize, getBgImageByDevice, getBorderStyle, getCarouselContainerHeight, getCollection, getCornerCSSFromGlobal, getCustomRadius, getGlobalColorCSSProp, getGlobalColorClass, getGlobalColorResponsiveClass, getGlobalColorResponsiveStyle, getGlobalColorStateClass, getGlobalColorStateClassDynamicBtn, getGlobalColorStateResponsiveClass, getGlobalColorStateResponsiveClassDynamicBtn, getGlobalColorStateResponsiveStyle, getGlobalColorStateStyle, getGlobalColorStyle, getGlobalSizeGap, getGradientBgrStyleByDevice, getGradientBgrStyleForButton, getHeightByShapeGlobalSize, getPaddingGlobalSize, getProduct, getProductBySlug, getRadiusCSSFromGlobal, getRadiusStyleActiveState, getResponsiveStateValue, getResponsiveValue, getResponsiveValueByScreen, getSelectedVariant, getShortName, getSingleColorVariable, getSpacingVariable, getStyleBackgroundByDevice, getStyleShadow, getStyleShadowState, getWidthByShapeGlobalSize, getWidthHeightGlobalSize, globalEvent, gridToArrayRegex, gtag, handleConvertBorderColor, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertClassColor, handleConvertClassColorDynamicBtn, isBrowser, isColor, isColumnDirectionExist, isDefined, isEmptyChildren, isLocalEnv, isSafari, loadScript, makeAspectRatio, makeContainerWidthOrHeight, makeDotGapToCarouselStyle, makeFixedBgAttachment, makeGlobalSize, makeGlobalSizeHeightResponsive, makeGlobalSizeWidthResponsive, makeHeight, makeLineClamp, makeStyle, makeStyleKey, makeStyleResponsive, makeStyleResponsiveByScreen, makeStyleResponsiveState, makeStyleState, makeStyleWithDefault, makeWidth, normalizeBuilderData, optionLayoutStyle, parseSelectedOption, parseValueWithUnit, prefetchQueries, props, removeAttrInStyle, removeNullUndefined, removePaddingYInStyle, removeUndefinedValuesFromObject, shopifyPriceRounding, 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, useInitialSwatchesOptions, useIsSampleProduct, useIsStorefrontProduct, useIsSyncProduct, useIsomorphicLayoutEffect, useLazyVideo, useLoadScript, useLocale, useMatchMutate, useMobileOnly, useModalStore, useMoney, useMoneyFormat, usePageStore, usePageType, usePluginEnable, usePrevious, useProduct, useProductList, useProductListProducts, useProductListSettings, useProductListStore, useProductListStyles, useProductOfferDiscount, useProductProperties, useProductQuery, useProductStore, useProductsQuery, useQuantity, useRemoveCartItem, useSection, useSectionStore, useSelectedOption, useShopStore, useStoreFront, useSuspenseFetch, useSwatches, useSwatchesOptions, useUniqProductID, useUpdateCartItem, useVariant, useVariantOutStock, useVariants, validateEmail };
35971
+ export { AddOn, AddonProvider, AddonProviderProps, AdvancedType, AliReviewsWidgetType, AlignItemProp, AlignProp, AnimationBaseSetting, AnimationConfig, AnimationDirectionType, AnimationEasingType, AnimationFadeSettingType, AnimationSetting, AnimationSettingType, AnimationShakeSettingType, AnimationSlideSettingType, AnimationTrigger, AnimationTriggerType, AnimationType, AnimationZoomDirectionType, AnimationZoomSettingType, appAPI as AppAPIType, Background, BaseProps, BasePropsWrap, BlockEntity, BogosWidgetType, 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, ControlTriggerAction, ControlUI, CornerRadius, CornerRadiusType, CustomComponentConfig, DeepPartial, DynamicCollection, DynamicProduct, ExtractState, FeraReviewsV3WidgetType, FeraReviewsWidgetType, FetchCollectionArgs, FetchFunc, FetchProductParams, FlexDirectionProp, FontName, GRADIENT_BGR_KEY, GlobalStyleConfig, GlobalStyleResponsiveConfig, GlobalSwatchesData, GraphQLConnection, GroupPropType, GrowaveWidgetType, HSLAColorType, HSLColorType, HexColorType, ImageShape$1 as ImageShape, InitComponentType, InstantJudgeMeReviewsWidgetType, InstantKlaviyoWidgetType, InstantLooxReviewsWidgetType, JudgeMeReviewsWidgetType, KlaviyoWidgetType, LaiProductReviewsAdvancedWidgetType, LaiProductReviewsWidgetType, LibrarySaleFunnelDocument, LibrarySaleFunnelQueryResponse, LibrarySaleFunnelQueryVariables, LibraryTemplateDocument, LibraryTemplateQueryResponse, LibraryTemplateQueryVariables, LooxReviewsWidgetType, ModalProvider, ModalProviderProps, NameDevices$1 as NameDevices, NestedKeys, ObjectDeviceGlobalType, ObjectDevices, ObjectLayoutValue, OmnisendWidgetType, OpinewDesignWidgetType, OpinewWidgetType, OptionNormalStyle, OptionSpecialStyle, Options, PageContext, PageProvider, PageProviderProps, PageType, PageViewUpDocument, PageViewUpMutationResponse, PageViewUpMutationVariables, PickyStoryWidgetType, PostPurchaseTypo, PreviewPageDocument, PreviewPageQueryResponse, PreviewPageQueryVariables, Primitive, ProductInputAnalytic, ProductListProvider, ProductListProviderProps, ProductOffer, ProductProvider, ProductProviderProps, ProductReviewsWidgetType, ProductSelectFragment, ProductsDocument, ProductsQueryResponse, ProductsQueryVariables, PublicStoreFrontData, PublishedThemePageSelectFragment, PublishedThemePagesDocument, PublishedThemePagesQueryResponse, PublishedThemePagesQueryVariables, RGBAColorType, RGBColorType, Ratio$1 as Ratio, RawChild, RenderMemo as Render, RenderChildren, RenderIf, Render as RenderLiquid, RenderMode, RenderPreviewMemo as RenderPreview, RequiredCursorEdge, ResponsiveKey, ResponsiveStateProp, RivyoWidgetType, RoundedSize, RyviuWidgetType, SaleFunnelDiscount$1 as SaleFunnelDiscount, SaleFunnelDiscountEdge$1 as SaleFunnelDiscountEdge, SaleFunnelDiscountObjectType$1 as SaleFunnelDiscountObjectType, SaleFunnelDiscountType$1 as SaleFunnelDiscountType, SaleFunnelDiscountValueType$1 as SaleFunnelDiscountValueType, SaleFunnelDiscountsDocument, SaleFunnelDiscountsQueryResponse, SaleFunnelDiscountsQueryVariables, Scalars$1 as Scalars, ScaleByDirection, SectionData, SectionEntity, SectionProvider, SectionProviderProps, SettingByAnimationType, SettingByAnimationValues, ShadowProps, ShadowStyle, ShadowStyleApplied, ShadowType, ShopProvider, ShopProviderProps, shop as ShopType, SizeProps, SizeSetting, SizeSettingGlobal, SizeType, SpacingType, StampedWidgetType, StateProp, StateSelector, StateType, StoreConfig, StorePropertyDocument, StorePropertyQueryResponse, StorePropertyQueryVariables, SwatchesOptionType, SwatchesOptionValue, ThemePageDocument, ThemePageQueryResponse, ThemePageQueryVariables, TransformProp, TriggerConfig, TrustooWidgetType, TypographyProps, TypographySetting, TypographySettingV2, TypographyType, TypographyV2Attrs, TypographyV2Props, UltimateSalesBoostWidgetType, VariantSelectFragment, VitalsWidgetType, WiserV2WidgetType, WiserWidgetType, WrapRenderChildren, YotpoReviewsWidgetType, animations, baseAssetURL, calculateFirstProduct, checkAvailableVariantInStock, cls, composeAdvanceStyle, composeAdvanceStyleForPostPurchase, composeBackgroundCss, composeBorderCss, composeCornerCss, composeFallbackTypographyStyle, composeGridLayout, composeMemo, composePositionLineHeight, composePostionIconList, composeRadius, composeRadiusResponsive, composeShadowCss, composeSize, composeSizeCss, composeSpacing, composeTextColorCss, composeTypography, composeTypographyAttr, composeTypographyClassName, composeTypographyCss, composeTypographyStyle, composeTypographyV2, composeTypographyV2Css, convertHTML, convertOldLayout, dataStringify, fetchMedias, fetchVariants, filterAttrInStyle, filterCornerInStyle, filterToolbarPreview, flattenConnection, fpixel, genSizeClass, genTypoClass, genVariable, generateCollectionQueryKey, generateProductQueryKey, generateProductsQueryKey, getAspectRatioGlobalSize, getBgImageByDevice, getBorderStyle, getCarouselContainerHeight, getCollection, getCornerCSSFromGlobal, getCustomRadius, getGlobalColorCSSProp, getGlobalColorClass, getGlobalColorResponsiveClass, getGlobalColorResponsiveStyle, getGlobalColorStateClass, getGlobalColorStateClassDynamicBtn, getGlobalColorStateResponsiveClass, getGlobalColorStateResponsiveClassDynamicBtn, getGlobalColorStateResponsiveStyle, getGlobalColorStateStyle, getGlobalColorStyle, getGlobalSizeGap, getGradientBgrStyleByDevice, getGradientBgrStyleForButton, getHeightByShapeGlobalSize, getPaddingGlobalSize, getProduct, getProductBySlug, getRadiusCSSFromGlobal, getRadiusStyleActiveState, getResponsiveStateValue, getResponsiveValue, getResponsiveValueByScreen, getSelectedVariant, getShortName, getSingleColorVariable, getSpacingVariable, getStyleBackgroundByDevice, getStyleShadow, getStyleShadowState, getWidthByShapeGlobalSize, getWidthHeightGlobalSize, globalEvent, gridToArrayRegex, gtag, handleConvertBorderColor, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertClassColor, handleConvertClassColorDynamicBtn, isBrowser, isColor, isColumnDirectionExist, isDefined, isEmptyChildren, isLocalEnv, isSafari, loadScript, makeAspectRatio, makeContainerWidthOrHeight, makeDotGapToCarouselStyle, makeFixedBgAttachment, makeGlobalSize, makeGlobalSizeHeightResponsive, makeGlobalSizeIcon, makeGlobalSizeWidthResponsive, makeHeight, makeLineClamp, makeStyle, makeStyleKey, makeStyleResponsive, makeStyleResponsiveByScreen, makeStyleResponsiveState, makeStyleState, makeStyleWithDefault, makeWidth, normalizeBuilderData, optionLayoutStyle, parseSelectedOption, parseValueWithUnit, prefetchQueries, props, removeAttrInStyle, removeNullUndefined, removePaddingYInStyle, removeUndefinedValuesFromObject, shopifyPriceRounding, 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, useInitialSwatchesOptions, useIsSampleProduct, useIsStorefrontProduct, useIsSyncProduct, useIsomorphicLayoutEffect, useLazyVideo, useLoadScript, useLocale, useMatchMutate, useMobileOnly, useModalStore, useMoney, useMoneyFormat, usePageStore, usePageType, usePluginEnable, usePrevious, useProduct, useProductList, useProductListProducts, useProductListSettings, useProductListStore, useProductListStyles, useProductOfferDiscount, useProductProperties, useProductQuery, useProductStore, useProductsQuery, useProductsQueryAll, 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.40.4",
3
+ "version": "1.41.0-dev.16",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",
@@ -27,8 +27,8 @@
27
27
  "type-check": "yarn tsc --noEmit"
28
28
  },
29
29
  "devDependencies": {
30
- "@gem-sdk/adapter-shopify": "1.40.0",
31
- "@gem-sdk/styles": "1.40.0"
30
+ "@gem-sdk/adapter-shopify": "1.41.0-staging.13",
31
+ "@gem-sdk/styles": "1.41.0-dev.16"
32
32
  },
33
33
  "dependencies": {
34
34
  "react-error-boundary": "4.0.10",