@gem-sdk/core 1.43.0-staging.9 → 1.43.0

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.
@@ -28,10 +28,11 @@ const root = {
28
28
  label: 'Root',
29
29
  childrens: []
30
30
  };
31
- const createBuilderPreviewProvider = (args, isThemeSectionEditor)=>zustand.createStore((set, get)=>({
31
+ const createBuilderPreviewProvider = (args, pageName, isThemeSectionEditor)=>zustand.createStore((set, get)=>({
32
32
  state: args,
33
33
  loaded: false,
34
34
  isThemeSectionEditor: !!isThemeSectionEditor,
35
+ pageName: pageName,
35
36
  dynamicProduct: null,
36
37
  dynamicCollection: null,
37
38
  addItem: (args)=>{
@@ -450,13 +451,14 @@ const createBuilderPreviewProvider = (args, isThemeSectionEditor)=>zustand.creat
450
451
  }
451
452
  }
452
453
  }));
453
- const BuilderPreviewProvider = ({ children, state, isThemeSectionEditor, lazy, ...passProps })=>{
454
+ const BuilderPreviewProvider = ({ children, state, isThemeSectionEditor, pageName, lazy, ...passProps })=>{
454
455
  const Component = lazy ? react.Suspense : react.Fragment;
455
456
  const value = react.useMemo(()=>{
456
- return createBuilderPreviewProvider(state, isThemeSectionEditor);
457
+ return createBuilderPreviewProvider(state, pageName, isThemeSectionEditor);
457
458
  }, [
458
459
  state,
459
- isThemeSectionEditor
460
+ isThemeSectionEditor,
461
+ pageName
460
462
  ]);
461
463
  return /*#__PURE__*/ jsxRuntime.jsx(Component, {
462
464
  children: /*#__PURE__*/ jsxRuntime.jsx(BuilderPreviewContext.Provider, {
@@ -2,24 +2,21 @@
2
2
 
3
3
  var getResonsiveValue = require('./get-resonsive-value.js');
4
4
 
5
- const getCarouselContainerHeight = (dotStyle, dotSize, dotGapToCarousel)=>{
6
- const getVal = (dotStyle, dotSize, dotGapToCarousel)=>{
7
- if (dotStyle === 'outside') {
8
- return `calc(100% - ${dotSize ?? '0'}px - ${!dotGapToCarousel || dotGapToCarousel === 'Auto' ? '0' : dotGapToCarousel}px)`;
9
- }
10
- return '100%';
5
+ const getCarouselContainerHeight = (dotStyle)=>{
6
+ const getVal = (dotStyle)=>{
7
+ return dotStyle === 'outside' ? 'auto' : '100%';
11
8
  };
12
9
  return {
13
- desktop: getVal(getResonsiveValue.getResponsiveValueByScreen(dotStyle, 'desktop'), getResonsiveValue.getResponsiveValueByScreen(dotSize, 'desktop'), getResonsiveValue.getResponsiveValueByScreen(dotGapToCarousel, 'desktop')),
14
- tablet: getVal(getResonsiveValue.getResponsiveValueByScreen(dotStyle, 'tablet'), getResonsiveValue.getResponsiveValueByScreen(dotSize, 'tablet'), getResonsiveValue.getResponsiveValueByScreen(dotGapToCarousel, 'tablet')),
15
- mobile: getVal(getResonsiveValue.getResponsiveValueByScreen(dotStyle, 'mobile'), getResonsiveValue.getResponsiveValueByScreen(dotSize, 'mobile'), getResonsiveValue.getResponsiveValueByScreen(dotGapToCarousel, 'mobile'))
10
+ desktop: getVal(getResonsiveValue.getResponsiveValueByScreen(dotStyle, 'desktop')),
11
+ tablet: getVal(getResonsiveValue.getResponsiveValueByScreen(dotStyle, 'tablet')),
12
+ mobile: getVal(getResonsiveValue.getResponsiveValueByScreen(dotStyle, 'mobile'))
16
13
  };
17
14
  };
18
15
  const makeContainerWidthOrHeight = (setting)=>{
19
16
  const getStyleName = (vertical)=>{
20
17
  return vertical ? 'w' : 'h';
21
18
  };
22
- const result = getCarouselContainerHeight(setting.dotStyle, setting.dotSize, setting.dotGapToCarousel);
19
+ const result = getCarouselContainerHeight(setting.dotStyle);
23
20
  return {
24
21
  [`--${getStyleName(getResonsiveValue.getResponsiveValueByScreen(setting?.vertical, 'desktop'))}`]: result.desktop,
25
22
  [`--${getStyleName(getResonsiveValue.getResponsiveValueByScreen(setting?.vertical, 'tablet'))}-tablet`]: result.tablet,
@@ -26,10 +26,11 @@ const root = {
26
26
  label: 'Root',
27
27
  childrens: []
28
28
  };
29
- const createBuilderPreviewProvider = (args, isThemeSectionEditor)=>createStore((set, get)=>({
29
+ const createBuilderPreviewProvider = (args, pageName, isThemeSectionEditor)=>createStore((set, get)=>({
30
30
  state: args,
31
31
  loaded: false,
32
32
  isThemeSectionEditor: !!isThemeSectionEditor,
33
+ pageName: pageName,
33
34
  dynamicProduct: null,
34
35
  dynamicCollection: null,
35
36
  addItem: (args)=>{
@@ -448,13 +449,14 @@ const createBuilderPreviewProvider = (args, isThemeSectionEditor)=>createStore((
448
449
  }
449
450
  }
450
451
  }));
451
- const BuilderPreviewProvider = ({ children, state, isThemeSectionEditor, lazy, ...passProps })=>{
452
+ const BuilderPreviewProvider = ({ children, state, isThemeSectionEditor, pageName, lazy, ...passProps })=>{
452
453
  const Component = lazy ? Suspense : Fragment;
453
454
  const value = useMemo(()=>{
454
- return createBuilderPreviewProvider(state, isThemeSectionEditor);
455
+ return createBuilderPreviewProvider(state, pageName, isThemeSectionEditor);
455
456
  }, [
456
457
  state,
457
- isThemeSectionEditor
458
+ isThemeSectionEditor,
459
+ pageName
458
460
  ]);
459
461
  return /*#__PURE__*/ jsx(Component, {
460
462
  children: /*#__PURE__*/ jsx(BuilderPreviewContext.Provider, {
@@ -1,23 +1,20 @@
1
1
  import { getResponsiveValueByScreen } from './get-resonsive-value.js';
2
2
 
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%';
3
+ const getCarouselContainerHeight = (dotStyle)=>{
4
+ const getVal = (dotStyle)=>{
5
+ return dotStyle === 'outside' ? 'auto' : '100%';
9
6
  };
10
7
  return {
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'))
8
+ desktop: getVal(getResponsiveValueByScreen(dotStyle, 'desktop')),
9
+ tablet: getVal(getResponsiveValueByScreen(dotStyle, 'tablet')),
10
+ mobile: getVal(getResponsiveValueByScreen(dotStyle, 'mobile'))
14
11
  };
15
12
  };
16
13
  const makeContainerWidthOrHeight = (setting)=>{
17
14
  const getStyleName = (vertical)=>{
18
15
  return vertical ? 'w' : 'h';
19
16
  };
20
- const result = getCarouselContainerHeight(setting.dotStyle, setting.dotSize, setting.dotGapToCarousel);
17
+ const result = getCarouselContainerHeight(setting.dotStyle);
21
18
  return {
22
19
  [`--${getStyleName(getResponsiveValueByScreen(setting?.vertical, 'desktop'))}`]: result.desktop,
23
20
  [`--${getStyleName(getResponsiveValueByScreen(setting?.vertical, 'tablet'))}-tablet`]: result.tablet,
@@ -7697,6 +7697,7 @@ type ProductOffersControlType<T> = SharedControlType<T> & {
7697
7697
 
7698
7698
  type DiscountAndShippingFee<T> = SharedControlType<T> & {
7699
7699
  type: 'discount-and-shipping-fee-product-offer';
7700
+ multiple: boolean;
7700
7701
  };
7701
7702
 
7702
7703
  type PostPurchaseTextareaControlType<T> = SharedControlType<T> & {
@@ -27307,6 +27308,7 @@ declare const useBuilderStore: <U>(selector: (state: ExtractState<StoreApi<Build
27307
27308
  type BuilderPreviewContextProps = {
27308
27309
  state: BuilderState;
27309
27310
  loaded?: boolean;
27311
+ pageName?: string;
27310
27312
  isThemeSectionEditor?: boolean;
27311
27313
  addItem: (args: {
27312
27314
  data: BuilderEntityNested | BuilderEntityNested[];
@@ -27337,6 +27339,7 @@ type BuilderPreviewProviderProps = Pick<BuilderPreviewContextProps, 'state'> & {
27337
27339
  lazy?: boolean;
27338
27340
  priority?: boolean;
27339
27341
  isThemeSectionEditor?: boolean;
27342
+ pageName?: string;
27340
27343
  };
27341
27344
  declare const BuilderPreviewProvider: React.FC<BuilderPreviewProviderProps>;
27342
27345
  declare const useBuilderPreviewStore: <U>(selector: (state: ExtractState<StoreApi<BuilderPreviewContextProps>>) => U, equalityFn?: ((a: U, b: U) => boolean) | undefined) => U;
@@ -27908,15 +27911,13 @@ declare const handleConvertClassColorDynamicBtn: (value?: BorderStyle) => string
27908
27911
  declare const composeBorderCss: (borderV?: Border | undefined) => string;
27909
27912
 
27910
27913
  type DotStyle = 'none' | 'inside' | 'outside';
27911
- declare const getCarouselContainerHeight: <T>(dotStyle?: Partial<Record<NameDevices$1, T>> | undefined, dotSize?: ObjectDevices<number>, dotGapToCarousel?: ObjectDevices<number>) => {
27914
+ declare const getCarouselContainerHeight: <T>(dotStyle?: Partial<Record<NameDevices$1, T>> | undefined) => {
27912
27915
  desktop: string | undefined;
27913
27916
  tablet: string | undefined;
27914
27917
  mobile: string | undefined;
27915
27918
  };
27916
27919
  declare const makeContainerWidthOrHeight: <T extends ShortHandProperty>(setting: {
27917
27920
  dotStyle?: ObjectDevices<DotStyle>;
27918
- dotSize?: ObjectDevices<number>;
27919
- dotGapToCarousel?: ObjectDevices<number>;
27920
27921
  vertical?: ObjectDevices<boolean>;
27921
27922
  }) => {
27922
27923
  [x: string]: string | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/core",
3
- "version": "1.43.0-staging.9",
3
+ "version": "1.43.0",
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.43.0-staging.9",
31
- "@gem-sdk/styles": "1.43.0-staging.9"
30
+ "@gem-sdk/adapter-shopify": "1.40.0",
31
+ "@gem-sdk/styles": "1.41.8"
32
32
  },
33
33
  "dependencies": {
34
34
  "react-error-boundary": "4.0.10",