@gem-sdk/core 1.42.3-dev.64 → 1.42.7

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.
Files changed (72) hide show
  1. package/dist/cjs/components/ComponentToolbarPreview.js +6 -120
  2. package/dist/cjs/components/ComponentWrapperPreview.js +1 -44
  3. package/dist/cjs/components/Render.liquid.js +0 -2
  4. package/dist/cjs/components/RenderCustomCode.js +0 -2
  5. package/dist/cjs/components/constant.js +2 -19
  6. package/dist/cjs/components/resize/Spacing.js +0 -2
  7. package/dist/cjs/components/theme-section/CreateThemeSection.js +0 -2
  8. package/dist/cjs/contexts/BuilderPreviewContext.js +6 -11
  9. package/dist/cjs/contexts/SectionContext.js +0 -1
  10. package/dist/cjs/helpers/carousel.js +10 -7
  11. package/dist/cjs/helpers/colors.js +1 -1
  12. package/dist/cjs/helpers/queries/get-products.js +0 -23
  13. package/dist/cjs/helpers/typography.js +4 -4
  14. package/dist/cjs/hooks/shop/use-products-query.js +0 -29
  15. package/dist/cjs/hooks/useAnimations.js +0 -2
  16. package/dist/cjs/hooks/useInitialSwatchesOptions.js +0 -2
  17. package/dist/cjs/hooks/useProduct.js +0 -2
  18. package/dist/cjs/index.js +15 -26
  19. package/dist/esm/components/ComponentToolbarPreview.js +6 -120
  20. package/dist/esm/components/ComponentWrapperPreview.js +1 -44
  21. package/dist/esm/components/Render.liquid.js +0 -2
  22. package/dist/esm/components/RenderCustomCode.js +0 -2
  23. package/dist/esm/components/constant.js +3 -19
  24. package/dist/esm/components/resize/Spacing.js +0 -2
  25. package/dist/esm/components/theme-section/CreateThemeSection.js +0 -2
  26. package/dist/esm/contexts/BuilderPreviewContext.js +6 -11
  27. package/dist/esm/contexts/SectionContext.js +0 -1
  28. package/dist/esm/helpers/carousel.js +10 -7
  29. package/dist/esm/helpers/colors.js +1 -1
  30. package/dist/esm/helpers/queries/get-products.js +1 -23
  31. package/dist/esm/helpers/typography.js +4 -4
  32. package/dist/esm/hooks/shop/use-products-query.js +2 -30
  33. package/dist/esm/hooks/useAnimations.js +0 -2
  34. package/dist/esm/hooks/useInitialSwatchesOptions.js +0 -2
  35. package/dist/esm/hooks/useProduct.js +0 -2
  36. package/dist/esm/index.js +10 -14
  37. package/dist/types/index.d.ts +86 -227
  38. package/package.json +3 -5
  39. package/dist/cjs/components/ai-generator/AIContentGenerator.js +0 -205
  40. package/dist/cjs/components/ai-generator/AIGenContentLoading.js +0 -85
  41. package/dist/cjs/components/ai-generator/components/PickProduct.js +0 -218
  42. package/dist/cjs/components/ai-generator/components/ToneAndVoice.js +0 -77
  43. package/dist/cjs/components/ai-generator/hooks/useCheckingProductInside.js +0 -47
  44. package/dist/cjs/components/ai-generator/hooks/useFlipPopup.js +0 -110
  45. package/dist/cjs/components/ai-generator/hooks/useGettingGenerateRequest.js +0 -37
  46. package/dist/cjs/components/ai-generator/hooks/useListenEventGenerate.js +0 -63
  47. package/dist/cjs/components/ai-generator/icons/AIIcon.js +0 -67
  48. package/dist/cjs/components/ai-generator/icons/CloseIcon.js +0 -19
  49. package/dist/cjs/components/ai-generator/icons/DropdownIcon.js +0 -37
  50. package/dist/cjs/components/ai-generator/icons/SearchIcon.js +0 -21
  51. package/dist/cjs/components/ai-generator/icons/ShowMoreIcon.js +0 -21
  52. package/dist/cjs/contexts/ArticleContext.js +0 -39
  53. package/dist/cjs/contexts/ArticleListContext.js +0 -32
  54. package/dist/cjs/helpers/align.js +0 -19
  55. package/dist/cjs/hooks/articles/useArticlesQuery.js +0 -152
  56. package/dist/esm/components/ai-generator/AIContentGenerator.js +0 -203
  57. package/dist/esm/components/ai-generator/AIGenContentLoading.js +0 -83
  58. package/dist/esm/components/ai-generator/components/PickProduct.js +0 -216
  59. package/dist/esm/components/ai-generator/components/ToneAndVoice.js +0 -75
  60. package/dist/esm/components/ai-generator/hooks/useCheckingProductInside.js +0 -45
  61. package/dist/esm/components/ai-generator/hooks/useFlipPopup.js +0 -108
  62. package/dist/esm/components/ai-generator/hooks/useGettingGenerateRequest.js +0 -35
  63. package/dist/esm/components/ai-generator/hooks/useListenEventGenerate.js +0 -61
  64. package/dist/esm/components/ai-generator/icons/AIIcon.js +0 -65
  65. package/dist/esm/components/ai-generator/icons/CloseIcon.js +0 -17
  66. package/dist/esm/components/ai-generator/icons/DropdownIcon.js +0 -34
  67. package/dist/esm/components/ai-generator/icons/SearchIcon.js +0 -19
  68. package/dist/esm/components/ai-generator/icons/ShowMoreIcon.js +0 -19
  69. package/dist/esm/contexts/ArticleContext.js +0 -36
  70. package/dist/esm/contexts/ArticleListContext.js +0 -28
  71. package/dist/esm/helpers/align.js +0 -17
  72. package/dist/esm/hooks/articles/useArticlesQuery.js +0 -149
@@ -8,13 +8,11 @@ require('swr');
8
8
  var PageContext = require('../contexts/PageContext.js');
9
9
  require('@gem-sdk/adapter-shopify');
10
10
  require('swr/mutation');
11
- require('swr/infinite');
12
11
  require('vanilla-lazyload');
13
12
  require('./useCartUI.js');
14
13
  var variant = require('../helpers/variant.js');
15
14
  require('react-transition-group');
16
15
  require('@gem-sdk/core');
17
- require('classnames');
18
16
  var flattenConnection = require('../helpers/flatten-connection.js');
19
17
  require('../helpers/convert.js');
20
18
  var product = require('../helpers/product.js');
package/dist/cjs/index.js CHANGED
@@ -16,8 +16,6 @@ var ShopContext = require('./contexts/ShopContext.js');
16
16
  var PageContext = require('./contexts/PageContext.js');
17
17
  var CollectionContext = require('./contexts/CollectionContext.js');
18
18
  var ModalContext = require('./contexts/ModalContext.js');
19
- var ArticleListContext = require('./contexts/ArticleListContext.js');
20
- var ArticleContext = require('./contexts/ArticleContext.js');
21
19
  var pageViewUp_generated = require('./graphql/mutations/page-view-up.generated.js');
22
20
  var collectionDetailFilter_generated = require('./graphql/queries/collection-detail-filter.generated.js');
23
21
  var collection_generated = require('./graphql/queries/collection.generated.js');
@@ -44,6 +42,13 @@ var isEmptyChildren = require('./helpers/is-empty-children.js');
44
42
  var isSafari = require('./helpers/is-safari.js');
45
43
  var normalizeBuilderData = require('./helpers/normalize-builder-data.js');
46
44
  var prefetchQueries = require('./helpers/prefetch-queries.js');
45
+ var email = require('./helpers/email.js');
46
+ var loadScript = require('./helpers/load-script.js');
47
+ var spacing = require('./helpers/spacing.js');
48
+ var cssVariable = require('./helpers/css-variable.js');
49
+ var fpixel = require('./helpers/tracking/fpixel.js');
50
+ var gtag = require('./helpers/tracking/gtag.js');
51
+ var tiktokpixel = require('./helpers/tracking/tiktokpixel.js');
47
52
  var background = require('./helpers/background.js');
48
53
  var colors = require('./helpers/colors.js');
49
54
  var composeAdvanceStyle = require('./helpers/compose-advance-style.js');
@@ -53,7 +58,6 @@ var iconList = require('./helpers/icon-list.js');
53
58
  var isDefined = require('./helpers/is-defined.js');
54
59
  var layout = require('./helpers/layout.js');
55
60
  var makeStyle = require('./helpers/make-style.js');
56
- var align = require('./helpers/align.js');
57
61
  var product = require('./helpers/product.js');
58
62
  var query = require('./helpers/query.js');
59
63
  var radius = require('./helpers/radius.js');
@@ -61,13 +65,6 @@ var render = require('./helpers/render.js');
61
65
  var shadow = require('./helpers/shadow.js');
62
66
  var size = require('./helpers/size.js');
63
67
  var typography = require('./helpers/typography.js');
64
- var email = require('./helpers/email.js');
65
- var loadScript = require('./helpers/load-script.js');
66
- var spacing = require('./helpers/spacing.js');
67
- var cssVariable = require('./helpers/css-variable.js');
68
- var fpixel = require('./helpers/tracking/fpixel.js');
69
- var gtag = require('./helpers/tracking/gtag.js');
70
- var tiktokpixel = require('./helpers/tracking/tiktokpixel.js');
71
68
  var useAddToCart = require('./hooks/cart/use-add-to-cart.js');
72
69
  var useCartData = require('./hooks/cart/use-cart-data.js');
73
70
  var useCartDiscountCodesUpdate = require('./hooks/cart/use-cart-discount-codes-update.js');
@@ -92,7 +89,6 @@ var useIsomorphicLayoutEffect = require('./hooks/useIsomorphicLayoutEffect.js');
92
89
  var useLoadScript = require('./hooks/useLoadScript.js');
93
90
  var useMoney = require('./hooks/useMoney.js');
94
91
  var usePrevious = require('./hooks/usePrevious.js');
95
- var useArticlesQuery = require('./hooks/articles/useArticlesQuery.js');
96
92
  var useProduct = require('./hooks/useProduct.js');
97
93
  var useProductList = require('./hooks/useProductList.js');
98
94
  var useSuspenseFetch = require('./hooks/useSuspenseFetch.js');
@@ -140,10 +136,6 @@ exports.CollectionProvider = CollectionContext.CollectionProvider;
140
136
  exports.useCollectionStore = CollectionContext.useCollectionStore;
141
137
  exports.ModalProvider = ModalContext.ModalProvider;
142
138
  exports.useModalStore = ModalContext.useModalStore;
143
- exports.ArticleListProvider = ArticleListContext.ArticleListProvider;
144
- exports.useArticleListStore = ArticleListContext.useArticleListStore;
145
- exports.ArticleProvider = ArticleContext.ArticleProvider;
146
- exports.useArticleStore = ArticleContext.useArticleStore;
147
139
  exports.PageViewUpDocument = pageViewUp_generated.PageViewUpDocument;
148
140
  exports.CollectionDetailFilterDocument = collectionDetailFilter_generated.CollectionDetailFilterDocument;
149
141
  exports.CollectionDocument = collection_generated.CollectionDocument;
@@ -181,6 +173,14 @@ exports.isEmptyChildren = isEmptyChildren.isEmptyChildren;
181
173
  exports.isSafari = isSafari.default;
182
174
  exports.normalizeBuilderData = normalizeBuilderData.normalizeBuilderData;
183
175
  exports.prefetchQueries = prefetchQueries.prefetchQueries;
176
+ exports.validateEmail = email.validateEmail;
177
+ exports.loadScript = loadScript.loadScript;
178
+ exports.composeSpacing = spacing.composeSpacing;
179
+ exports.getSpacingVariable = spacing.getSpacingVariable;
180
+ exports.genVariable = cssVariable.genVariable;
181
+ exports.fpixel = fpixel;
182
+ exports.gtag = gtag;
183
+ exports.tiktokpixel = tiktokpixel;
184
184
  exports.GRADIENT_BGR_KEY = background.GRADIENT_BGR_KEY;
185
185
  exports.composeBackgroundCss = background.composeBackgroundCss;
186
186
  exports.getBgImageByDevice = background.getBgImageByDevice;
@@ -232,7 +232,6 @@ exports.makeStyleResponsiveState = makeStyle.makeStyleResponsiveState;
232
232
  exports.makeStyleState = makeStyle.makeStyleState;
233
233
  exports.makeWidth = makeStyle.makeWidth;
234
234
  exports.removeNullUndefined = makeStyle.removeNullUndefined;
235
- exports.convertTextAlignToJustify = align.convertTextAlignToJustify;
236
235
  exports.checkAvailableVariantInStock = product.checkAvailableVariantInStock;
237
236
  exports.getSelectedVariant = product.getSelectedVariant;
238
237
  exports.parseSelectedOption = product.parseSelectedOption;
@@ -278,14 +277,6 @@ exports.composeTypographyStyle = typography.composeTypographyStyle;
278
277
  exports.composeTypographyV2 = typography.composeTypographyV2;
279
278
  exports.composeTypographyV2Css = typography.composeTypographyV2Css;
280
279
  exports.genTypoClass = typography.genTypoClass;
281
- exports.validateEmail = email.validateEmail;
282
- exports.loadScript = loadScript.loadScript;
283
- exports.composeSpacing = spacing.composeSpacing;
284
- exports.getSpacingVariable = spacing.getSpacingVariable;
285
- exports.genVariable = cssVariable.genVariable;
286
- exports.fpixel = fpixel;
287
- exports.gtag = gtag;
288
- exports.tiktokpixel = tiktokpixel;
289
280
  exports.useAddToCart = useAddToCart.useAddToCart;
290
281
  exports.useCartData = useCartData.useCartData;
291
282
  exports.useCartDiscountCodesUpdate = useCartDiscountCodesUpdate.useCartDiscountCodesUpdate;
@@ -328,8 +319,6 @@ exports.useIsomorphicLayoutEffect = useIsomorphicLayoutEffect.default;
328
319
  exports.useLoadScript = useLoadScript.default;
329
320
  exports.useMoney = useMoney.default;
330
321
  exports.usePrevious = usePrevious.usePrevious;
331
- exports.useArticlesQuery = useArticlesQuery.useArticlesQuery;
332
- exports.useBlogsQuery = useArticlesQuery.useBlogsQuery;
333
322
  exports.useCheckAvailableVariantInStock = useProduct.useCheckAvailableVariantInStock;
334
323
  exports.useCurrentVariant = useProduct.useCurrentVariant;
335
324
  exports.useCurrentVariantInStock = useProduct.useCurrentVariantInStock;
@@ -6,7 +6,6 @@ import { useShopStore } from '../contexts/ShopContext.js';
6
6
  import '@gem-sdk/adapter-shopify';
7
7
  import 'swr';
8
8
  import 'swr/mutation';
9
- import 'swr/infinite';
10
9
  import 'vanilla-lazyload';
11
10
  import '../hooks/useCartUI.js';
12
11
  import { CreateThemeSection } from './theme-section/CreateThemeSection.js';
@@ -14,9 +13,6 @@ import Tooltip from './toolbar/Tooltip.js';
14
13
  import { ThemeSectionStatus } from './theme-section/ThemeSectionStatus.js';
15
14
  import Resize from './resize/Resize.js';
16
15
  import { usePostPurchase } from '../hooks/useToolbarPostPurchase.js';
17
- import { ableGenerateContentElements } from './constant.js';
18
- import { AIContentGenerator } from './ai-generator/AIContentGenerator.js';
19
- import { AIGenContentLoading } from './ai-generator/AIGenContentLoading.js';
20
16
  import '../helpers/convert.js';
21
17
 
22
18
  const SECTION_LIMIT = 25;
@@ -30,8 +26,6 @@ const isSection = (el)=>{
30
26
  };
31
27
  const ComponentToolbarPreview = (props)=>{
32
28
  const isThemeSection = props.isThemeSection;
33
- const isShopifySection = props.isShopifySection;
34
- const storefrontUrl = useShopStore((s)=>s.storefrontUrl);
35
29
  const editingPageType = useShopStore((s)=>s.pageType);
36
30
  const getParents = useBuilderPreviewStore((s)=>s.getParents);
37
31
  const root = useBuilderPreviewStore((s)=>s.getItem('ROOT'));
@@ -42,7 +36,6 @@ const ComponentToolbarPreview = (props)=>{
42
36
  const [parents, setParents] = useState([]);
43
37
  const [deleteTooltipPosition, setDeleteTooltipPosition] = useState('top');
44
38
  const [isDisableDelete, setIsUnableDelete] = useState(false);
45
- const [parentProductUid, setParentProductUid] = useState('');
46
39
  const [tooltipText, setTooltipText] = useState({
47
40
  width: '',
48
41
  text: ''
@@ -82,27 +75,6 @@ const ComponentToolbarPreview = (props)=>{
82
75
  }, [
83
76
  props.tag
84
77
  ]);
85
- const productId = useMemo(()=>{
86
- const ele = document.querySelector(`[data-uid="${parentProductUid}"]`);
87
- return ele?.getAttribute('data-product-id');
88
- }, [
89
- parentProductUid
90
- ]);
91
- const shopName = useMemo(()=>{
92
- const pattern = /^(?:https?:\/\/)?([^/]+)\.myshopify\.com/;
93
- if (storefrontUrl) {
94
- return storefrontUrl.match(pattern)?.[1];
95
- }
96
- return '';
97
- }, [
98
- storefrontUrl
99
- ]);
100
- const shopifyEditLink = useMemo(()=>{
101
- return productId ? `https://admin.shopify.com/store/${shopName}/products/${productId}` : '';
102
- }, [
103
- productId,
104
- shopName
105
- ]);
106
78
  // Get parents
107
79
  const onActiveComponent = useCallback((e)=>{
108
80
  const detail = e.detail;
@@ -121,10 +93,6 @@ const ComponentToolbarPreview = (props)=>{
121
93
  return true;
122
94
  }).slice(0, 3);
123
95
  setParents(currentParents);
124
- const parentFindUid = currentParents.find((item)=>item.tag === 'Product')?.uid;
125
- if (parentFindUid) {
126
- setParentProductUid(parentFindUid);
127
- }
128
96
  } else {
129
97
  setParents([]);
130
98
  setIsShowParent(false);
@@ -196,9 +164,6 @@ const ComponentToolbarPreview = (props)=>{
196
164
  });
197
165
  window.dispatchEvent(event);
198
166
  };
199
- const goToShopifyEditLink = ()=>{
200
- window.open(shopifyEditLink, '_blank');
201
- };
202
167
  const onDelete = (e)=>{
203
168
  e.preventDefault();
204
169
  e.stopPropagation();
@@ -206,8 +171,7 @@ const ComponentToolbarPreview = (props)=>{
206
171
  bubbles: true,
207
172
  detail: {
208
173
  componentUid: props.uid,
209
- isThemeSection,
210
- isShopifySection
174
+ isThemeSection: isThemeSection
211
175
  }
212
176
  });
213
177
  window.dispatchEvent(event);
@@ -223,8 +187,7 @@ const ComponentToolbarPreview = (props)=>{
223
187
  bubbles: true,
224
188
  detail: {
225
189
  componentUid: props.uid,
226
- isThemeSection,
227
- isShopifySection
190
+ isThemeSection: isThemeSection
228
191
  }
229
192
  });
230
193
  window.dispatchEvent(event);
@@ -273,9 +236,6 @@ const ComponentToolbarPreview = (props)=>{
273
236
  return false;
274
237
  };
275
238
  const getSectionName = ()=>{
276
- if (isShopifySection) {
277
- return `Shopify section: ${props.name}`;
278
- }
279
239
  const checkRenamedSection = props.name && props.name === `Section ${props.uid}`;
280
240
  if (getSectionNumber() >= SECTION_LIMIT - 5) {
281
241
  return `${checkRenamedSection ? 'Section' : props?.name} ${getIndexSection() + 1}/${SECTION_LIMIT}`;
@@ -292,7 +252,6 @@ const ComponentToolbarPreview = (props)=>{
292
252
  "data-toolbar": true,
293
253
  "data-toolbar-section": props.tag == 'Section',
294
254
  "data-toolbar-theme-section": props.tag == 'Section' && !!isThemeSection || isThemeSectionEditor,
295
- "data-toolbar-shopify-section": props.tag == 'Section' && !!isShopifySection,
296
255
  "data-toolbar-limit": getIndexSection() >= SECTION_LIMIT,
297
256
  children: [
298
257
  /*#__PURE__*/ jsxs("div", {
@@ -335,39 +294,9 @@ const ComponentToolbarPreview = (props)=>{
335
294
  ]
336
295
  })
337
296
  }),
338
- props.tag == 'Section' ? /*#__PURE__*/ jsxs("div", {
297
+ props.tag == 'Section' ? /*#__PURE__*/ jsx("div", {
339
298
  "data-toolbar-name": true,
340
- children: [
341
- getSectionName(),
342
- props.isShopifySection && !props.isShopifyVisibility && /*#__PURE__*/ jsxs("svg", {
343
- "data-toolbar-visibility": true,
344
- width: "20",
345
- height: "20",
346
- viewBox: "0 0 20 20",
347
- fill: "none",
348
- xmlns: "http://www.w3.org/2000/svg",
349
- children: [
350
- /*#__PURE__*/ jsx("path", {
351
- fillRule: "evenodd",
352
- clipRule: "evenodd",
353
- 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",
354
- fill: "#F9F9F9"
355
- }),
356
- /*#__PURE__*/ jsx("path", {
357
- fillRule: "evenodd",
358
- clipRule: "evenodd",
359
- 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",
360
- fill: "#F9F9F9"
361
- }),
362
- /*#__PURE__*/ jsx("path", {
363
- fillRule: "evenodd",
364
- clipRule: "evenodd",
365
- 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",
366
- fill: "#F9F9F9"
367
- })
368
- ]
369
- })
370
- ]
299
+ children: getSectionName()
371
300
  }) : /*#__PURE__*/ jsx("div", {
372
301
  "data-toolbar-name": true,
373
302
  children: toolbarName()
@@ -447,10 +376,7 @@ const ComponentToolbarPreview = (props)=>{
447
376
  ]
448
377
  }, parent.uid);
449
378
  }),
450
- props.tag === 'Section' && !props.isThemeSection && isEnableCreateThemeSection() && !props.isShopifySection && getIndexSection() < SECTION_LIMIT && /*#__PURE__*/ jsx(CreateThemeSection, {
451
- ...props
452
- }),
453
- !props.isShopifySection && ableGenerateContentElements.includes(props.tag) && /*#__PURE__*/ jsx(AIContentGenerator, {
379
+ props.tag === 'Section' && !props.isThemeSection && isEnableCreateThemeSection() && getIndexSection() < SECTION_LIMIT && /*#__PURE__*/ jsx(CreateThemeSection, {
454
380
  ...props
455
381
  }),
456
382
  props.tag == 'Sticky' && /*#__PURE__*/ jsx("div", {
@@ -471,42 +397,6 @@ const ComponentToolbarPreview = (props)=>{
471
397
  })
472
398
  })
473
399
  }),
474
- toolbarName() === 'Product Title' && /*#__PURE__*/ jsx(Tooltip, {
475
- "data-toolbar-title": true,
476
- enable: true,
477
- "data-toolbar-disable": false,
478
- text: "Edit content in Shopify",
479
- position: "top",
480
- onClick: goToShopifyEditLink,
481
- "aria-hidden": "true",
482
- children: /*#__PURE__*/ jsxs("svg", {
483
- width: "16",
484
- height: "16",
485
- viewBox: "0 0 16 16",
486
- fill: "none",
487
- xmlns: "http://www.w3.org/2000/svg",
488
- children: [
489
- /*#__PURE__*/ jsx("path", {
490
- fillRule: "evenodd",
491
- clipRule: "evenodd",
492
- d: "M8.61129 2.47348C8.61129 2.47348 8.47099 2.51557 8.23248 2.59274C8.19039 2.46647 8.13427 2.30512 8.05009 2.15079C7.78352 1.6387 7.39068 1.37212 6.91366 1.36511C6.87858 1.36511 6.85052 1.36511 6.81545 1.37212C6.80843 1.36511 6.80142 1.35634 6.7944 1.34757C6.78739 1.3388 6.78037 1.33003 6.77336 1.32302C6.56992 1.09854 6.30335 0.993314 5.98768 1.00033C5.37737 1.02137 4.76706 1.46332 4.269 2.249C3.91825 2.80319 3.65869 3.49767 3.58153 4.03082C3.38823 4.09074 3.21092 4.14586 3.05516 4.19429C2.64595 4.32151 2.3851 4.40261 2.37494 4.40261C2.01718 4.51485 2.01016 4.52888 1.96106 4.85859C1.92598 5.11113 1 12.2945 1 12.2945L7.14764 13.3583C7.18955 13.118 7.30454 12.8953 7.47848 12.7214L8.70249 11.4974V2.45945C8.66741 2.45945 8.63234 2.46647 8.61129 2.47348ZM6.82948 3.02767L6.62554 3.09101C6.27515 3.19989 5.90094 3.31617 5.5317 3.42752C5.65797 2.94349 5.89648 2.46647 6.19111 2.15079C6.30335 2.03154 6.45067 1.90527 6.63306 1.8281C6.80142 2.18587 6.83649 2.68393 6.82948 3.02767ZM5.99469 1.4072C6.13499 1.4072 6.26126 1.43526 6.36649 1.50541C6.19813 1.58959 6.0438 1.71586 5.88947 1.87721C5.50364 2.29109 5.202 2.94349 5.08274 3.56783C4.74459 3.66991 4.41804 3.77199 4.10838 3.8688L4.01646 3.89753C4.22691 2.90841 5.05468 1.43526 5.99469 1.4072ZM4.80214 7.0122C4.81874 7.26957 5.09737 7.44833 5.43473 7.66478C5.95252 7.99699 6.60867 8.41798 6.66813 9.3482C6.7453 10.5548 6.02977 11.3826 4.99154 11.4457C3.7569 11.5229 3.06943 10.7933 3.06943 10.7933L3.32899 9.67791C3.32899 9.67791 4.01646 10.197 4.56363 10.1619C4.92139 10.1409 5.04767 9.84627 5.04065 9.64283C5.01607 9.26796 4.73308 9.06671 4.41569 8.84101C4.00848 8.55142 3.54465 8.22157 3.49735 7.4331C3.42018 6.24756 4.19885 5.05501 5.91051 4.94277C6.57694 4.90068 6.91366 5.06904 6.91366 5.06904L6.52082 6.53518C6.52082 6.53518 6.08589 6.33876 5.56678 6.36682C4.80915 6.41592 4.79512 6.89294 4.80214 7.0122ZM7.23635 2.9014C7.22934 2.59274 7.19426 2.15781 7.04695 1.78601C7.50994 1.87721 7.74143 2.39632 7.83964 2.71199C7.70008 2.75665 7.54275 2.80575 7.37118 2.8593L7.23635 2.9014Z",
493
- fill: "currentColor"
494
- }),
495
- /*#__PURE__*/ jsx("path", {
496
- d: "M10.7719 3.44156C10.7757 3.47543 11.1733 6.16931 11.541 8.65883L8.95503 11.2448V2.57871C9.16548 2.78214 9.71265 3.31528 9.71265 3.31528C9.71265 3.31528 10.6106 3.32931 10.6597 3.33633C10.7088 3.34334 10.7649 3.37842 10.7719 3.44156Z",
497
- fill: "currentColor"
498
- }),
499
- /*#__PURE__*/ jsx("path", {
500
- d: "M14.8056 8.644L14.0424 7.88088C13.7832 7.62163 13.3629 7.62163 13.1036 7.88088L12.1519 8.83258L13.8539 10.5345L14.8056 9.58282C15.0648 9.32357 15.0648 8.90325 14.8056 8.644Z",
501
- fill: "currentColor"
502
- }),
503
- /*#__PURE__*/ jsx("path", {
504
- d: "M7.85018 13.0942L11.6419 9.30246L13.3438 11.0044L9.55212 14.7961C9.43782 14.9104 9.28573 14.9791 9.1244 14.9892L7.93427 15.0641C7.73484 15.0767 7.56961 14.9114 7.58216 14.712L7.65706 13.5219C7.66721 13.3606 7.73588 13.2085 7.85018 13.0942Z",
505
- fill: "currentColor"
506
- })
507
- ]
508
- })
509
- }),
510
400
  /*#__PURE__*/ jsx(Tooltip, {
511
401
  enable: props.tag == 'Section' && getSectionNumber() >= SECTION_LIMIT,
512
402
  text: "Page has reached Shopify’s 25 section-limit",
@@ -560,7 +450,6 @@ const ComponentToolbarPreview = (props)=>{
560
450
  "data-outline": true,
561
451
  "data-outline-section": props.tag == 'Section',
562
452
  "data-outline-theme-section": props.tag == 'Section' && !!isThemeSection || isThemeSectionEditor,
563
- "data-outline-shopify-section": props.tag == 'Section' && !!isShopifySection,
564
453
  "data-outline-limit": getIndexSection() >= SECTION_LIMIT
565
454
  }, 'outline-' + props.uid),
566
455
  props.tag == 'Section' && !isThemeSectionEditor && /*#__PURE__*/ jsxs(Fragment, {
@@ -607,15 +496,12 @@ const ComponentToolbarPreview = (props)=>{
607
496
  })
608
497
  ]
609
498
  }),
610
- ableGenerateContentElements.includes(props.tag) && /*#__PURE__*/ jsx(AIGenContentLoading, {
611
- ...props
612
- }),
613
499
  /*#__PURE__*/ jsx(Resize, {
614
500
  ...props
615
501
  })
616
502
  ]
617
503
  });
618
504
  };
619
- var ComponentToolbarPreview$1 = /*#__PURE__*/ memo(ComponentToolbarPreview); /* gem-lint/disallow-import-from-package-path */
505
+ var ComponentToolbarPreview$1 = /*#__PURE__*/ memo(ComponentToolbarPreview);
620
506
 
621
507
  export { ComponentToolbarPreview$1 as default };
@@ -10,10 +10,8 @@ import 'swr';
10
10
  import '@gem-sdk/adapter-shopify';
11
11
  import 'swr/mutation';
12
12
  import { usePageType } from '../hooks/shop.js';
13
- import 'swr/infinite';
14
13
  import 'vanilla-lazyload';
15
14
  import '../hooks/useCartUI.js';
16
- import { cls } from '../helpers/cls.js';
17
15
  import '../helpers/convert.js';
18
16
 
19
17
  const ComponentWrapperPreview = ({ children, ...props })=>{
@@ -39,10 +37,6 @@ const ComponentWrapperPreview = ({ children, ...props })=>{
39
37
  if (props.tag === 'Section' && props.isThemeSection) {
40
38
  customProps['data-theme-section'] = true;
41
39
  }
42
- if (props.tag === 'Section' && props.isShopifySection) {
43
- customProps['data-shopify-section'] = true;
44
- customProps['data-toolbar-wrap'] = true;
45
- }
46
40
  // Build editor configs
47
41
  if (props.editorConfigs) {
48
42
  const editorConfigs = props.editorConfigs;
@@ -97,40 +91,6 @@ const ComponentWrapperPreview = ({ children, ...props })=>{
97
91
  'data-component-label': props.label,
98
92
  'data-not-droppable': isNotDroppable(props.tag)
99
93
  };
100
- const ShopifySection = ({ name, visibility })=>{
101
- return /*#__PURE__*/ jsxs("div", {
102
- className: cls('gp-flex gp-items-center gp-justify-center gp-gap-[8px] gp-bg-[#F4F4F4] gp-p-[16px] gp-border gp-border-[#D6D6D6]', {
103
- 'gp-opacity-60': !visibility
104
- }),
105
- children: [
106
- /*#__PURE__*/ jsxs("svg", {
107
- width: "24",
108
- height: "24",
109
- viewBox: "0 0 24 24",
110
- fill: "none",
111
- xmlns: "http://www.w3.org/2000/svg",
112
- children: [
113
- /*#__PURE__*/ jsx("path", {
114
- 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",
115
- fill: "#95BF47"
116
- }),
117
- /*#__PURE__*/ jsx("path", {
118
- 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",
119
- fill: "#5E8E3E"
120
- }),
121
- /*#__PURE__*/ jsx("path", {
122
- 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",
123
- fill: "white"
124
- })
125
- ]
126
- }),
127
- /*#__PURE__*/ jsx("span", {
128
- className: "gp-text-[#212121] gp-text-[14px] gp-leading-[24px] gp-font-medium",
129
- children: name
130
- })
131
- ]
132
- });
133
- };
134
94
  if (disableWrap.includes(props.tag) && /*#__PURE__*/ isValidElement(children)) {
135
95
  return /*#__PURE__*/ jsxs(Fragment, {
136
96
  children: [
@@ -145,10 +105,7 @@ const ComponentWrapperPreview = ({ children, ...props })=>{
145
105
  builderAttrs,
146
106
  advanced,
147
107
  children: [
148
- props.isShopifySection ? /*#__PURE__*/ jsx(ShopifySection, {
149
- name: props.name ?? '',
150
- visibility: !!props.isShopifyVisibility
151
- }) : children.props['children'],
108
+ children.props['children'],
152
109
  /*#__PURE__*/ jsx(ComponentToolbarPreview, {
153
110
  ...props
154
111
  })
@@ -5,13 +5,11 @@ import 'zustand';
5
5
  import 'swr';
6
6
  import '@gem-sdk/adapter-shopify';
7
7
  import 'swr/mutation';
8
- import 'swr/infinite';
9
8
  import 'vanilla-lazyload';
10
9
  import '../hooks/useCartUI.js';
11
10
  import 'react-transition-group';
12
11
  import '@gem-sdk/core';
13
12
  import { disableWrap, customRenderChildren } from './constant.js';
14
- import 'classnames';
15
13
  import { composeAdvanceStyle } from '../helpers/compose-advance-style.js';
16
14
  import { baseAssetURL, isLocalEnv } from '../helpers/convert.js';
17
15
  import { RenderIf, template } from '../helpers/render.js';
@@ -7,12 +7,10 @@ import 'swr';
7
7
  import '@gem-sdk/adapter-shopify';
8
8
  import 'swr/mutation';
9
9
  import { useEditorMode } from '../hooks/shop.js';
10
- import 'swr/infinite';
11
10
  import 'vanilla-lazyload';
12
11
  import '../hooks/useCartUI.js';
13
12
  import 'react-transition-group';
14
13
  import '@gem-sdk/core';
15
- import 'classnames';
16
14
  import '../helpers/convert.js';
17
15
 
18
16
  const RenderCustomCode = ({ uid, advanced })=>{
@@ -34,10 +34,7 @@ const disableWrap = [
34
34
  'ProductImagesV2',
35
35
  'PostPurchaseProductImages',
36
36
  'Sticky',
37
- 'Heading',
38
- 'ProductBadge',
39
- 'Marquee',
40
- 'MarqueeItem'
37
+ 'Heading'
41
38
  ];
42
39
  const customRenderChildren = [
43
40
  'Accordion',
@@ -48,8 +45,7 @@ const customRenderChildren = [
48
45
  ];
49
46
  const excludeApplyStyle = [
50
47
  'IconListV2',
51
- 'IconList',
52
- 'ProductBadge'
48
+ 'IconList'
53
49
  ];
54
50
  const postPurchaseRequiredElements = [
55
51
  'PostPurchaseProductOffer',
@@ -68,17 +64,5 @@ const postPurchaseWrapElements = [
68
64
  'PostPurchaseCalloutBox',
69
65
  'PostPurchaseProductOffer'
70
66
  ];
71
- const ableGenerateContentElements = [
72
- 'Section',
73
- 'Row',
74
- 'Text',
75
- 'Heading',
76
- 'Accordion',
77
- 'Product',
78
- 'HeroBanner',
79
- 'IconList',
80
- 'IconListV2',
81
- 'AdvancedList'
82
- ];
83
67
 
84
- export { ableGenerateContentElements, customRenderChildren, disableWrap, excludeApplyStyle, postPurchaseRequiredElements, postPurchaseWrapElements };
68
+ export { customRenderChildren, disableWrap, excludeApplyStyle, postPurchaseRequiredElements, postPurchaseWrapElements };
@@ -6,12 +6,10 @@ import 'swr';
6
6
  import '@gem-sdk/adapter-shopify';
7
7
  import 'swr/mutation';
8
8
  import { usePageType } from '../../hooks/shop.js';
9
- import 'swr/infinite';
10
9
  import 'vanilla-lazyload';
11
10
  import '../../hooks/useCartUI.js';
12
11
  import 'react-transition-group';
13
12
  import '@gem-sdk/core';
14
- import 'classnames';
15
13
  import '../../helpers/convert.js';
16
14
 
17
15
  function Spacing(props) {
@@ -6,10 +6,8 @@ import { useShopStore } from '../../contexts/ShopContext.js';
6
6
  import '@gem-sdk/adapter-shopify';
7
7
  import 'swr';
8
8
  import 'swr/mutation';
9
- import 'swr/infinite';
10
9
  import 'vanilla-lazyload';
11
10
  import '../../hooks/useCartUI.js';
12
- import 'classnames';
13
11
  import '../../helpers/convert.js';
14
12
 
15
13
  const SHOW_TOOLTIP_TIMEOUT = 600;
@@ -251,11 +251,7 @@ const createBuilderPreviewProvider = (args, isThemeSectionEditor)=>createStore((
251
251
  }
252
252
  },
253
253
  getItem: (id)=>{
254
- const item = get().state[id];
255
- return {
256
- ...item,
257
- rawChildrens: item?.childrens?.map((v)=>get().state[v])
258
- };
254
+ return get().state[id];
259
255
  },
260
256
  removeItem: (id)=>{
261
257
  if (id === 'ROOT') {
@@ -430,16 +426,15 @@ const createBuilderPreviewProvider = (args, isThemeSectionEditor)=>createStore((
430
426
  updateItemAttribute: (id, value, attr)=>{
431
427
  if (!attr || ![
432
428
  'label',
433
- 'customLabel',
434
- 'isShopifyVisibility'
429
+ 'customLabel'
435
430
  ].includes(attr)) return;
436
431
  const state = get().state;
437
432
  const item = state[id];
433
+ // Ignore section
434
+ if (item?.type === 'section') return;
438
435
  if (item) {
439
- if (item.type !== 'section') {
440
- const dateModified = Date.now();
441
- item.dateModified = dateModified;
442
- }
436
+ const dateModified = Date.now();
437
+ item.dateModified = dateModified;
443
438
  const updatedItem = {
444
439
  ...item,
445
440
  [attr]: value
@@ -8,7 +8,6 @@ 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);
12
11
  const section = get().data[id];
13
12
  return section ?? undefined;
14
13
  },
@@ -1,20 +1,23 @@
1
1
  import { getResponsiveValueByScreen } from './get-resonsive-value.js';
2
2
 
3
- const getCarouselContainerHeight = (dotStyle)=>{
4
- const getVal = (dotStyle)=>{
5
- return dotStyle === 'outside' ? 'auto' : '100%';
3
+ const getCarouselContainerHeight = (dotStyle, dotSize, dotGapToCarousel)=>{
4
+ const getVal = (dotStyle, dotSize, dotGapToCarousel)=>{
5
+ if (dotStyle === 'outside') {
6
+ return `calc(100% - ${dotSize ?? '0'}px - ${!dotGapToCarousel || dotGapToCarousel === 'Auto' ? '0' : dotGapToCarousel}px)`;
7
+ }
8
+ return '100%';
6
9
  };
7
10
  return {
8
- desktop: getVal(getResponsiveValueByScreen(dotStyle, 'desktop')),
9
- tablet: getVal(getResponsiveValueByScreen(dotStyle, 'tablet')),
10
- mobile: getVal(getResponsiveValueByScreen(dotStyle, 'mobile'))
11
+ desktop: getVal(getResponsiveValueByScreen(dotStyle, 'desktop'), getResponsiveValueByScreen(dotSize, 'desktop'), getResponsiveValueByScreen(dotGapToCarousel, 'desktop')),
12
+ tablet: getVal(getResponsiveValueByScreen(dotStyle, 'tablet'), getResponsiveValueByScreen(dotSize, 'tablet'), getResponsiveValueByScreen(dotGapToCarousel, 'tablet')),
13
+ mobile: getVal(getResponsiveValueByScreen(dotStyle, 'mobile'), getResponsiveValueByScreen(dotSize, 'mobile'), getResponsiveValueByScreen(dotGapToCarousel, 'mobile'))
11
14
  };
12
15
  };
13
16
  const makeContainerWidthOrHeight = (setting)=>{
14
17
  const getStyleName = (vertical)=>{
15
18
  return vertical ? 'w' : 'h';
16
19
  };
17
- const result = getCarouselContainerHeight(setting.dotStyle);
20
+ const result = getCarouselContainerHeight(setting.dotStyle, setting.dotSize, setting.dotGapToCarousel);
18
21
  return {
19
22
  [`--${getStyleName(getResponsiveValueByScreen(setting?.vertical, 'desktop'))}`]: result.desktop,
20
23
  [`--${getStyleName(getResponsiveValueByScreen(setting?.vertical, 'tablet'))}-tablet`]: result.tablet,
@@ -154,7 +154,7 @@ const getSingleColorVariable = (color)=>{
154
154
  };
155
155
  function isColor(color) {
156
156
  if (!color || typeof color !== 'string') return false;
157
- return color?.startsWith('#') || color?.startsWith('rgb') || color?.startsWith('hsl') || color?.startsWith('transparent') || color?.startsWith('linear-gradient');
157
+ return color?.startsWith('#') || color?.startsWith('rgb') || color?.startsWith('hsl') || color?.startsWith('transparent');
158
158
  }
159
159
  const getGlobalColorStyle = (data)=>{
160
160
  if (!data) return {};