@gem-sdk/core 1.5.22 → 1.5.24

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.
@@ -25,6 +25,11 @@ const createShopStoreProvider = (data)=>zustand.createStore((set)=>({
25
25
  swatches
26
26
  });
27
27
  },
28
+ changeLayoutSettings: (layoutSettings)=>{
29
+ set({
30
+ layoutSettings
31
+ });
32
+ },
28
33
  changeStorefrontInfo: ({ url , token })=>{
29
34
  set({
30
35
  storefrontUrl: url,
@@ -23,6 +23,11 @@ const createShopStoreProvider = (data)=>createStore((set)=>({
23
23
  swatches
24
24
  });
25
25
  },
26
+ changeLayoutSettings: (layoutSettings)=>{
27
+ set({
28
+ layoutSettings
29
+ });
30
+ },
26
31
  changeStorefrontInfo: ({ url , token })=>{
27
32
  set({
28
33
  storefrontUrl: url,
@@ -6899,7 +6899,12 @@ declare const SectionProvider: React.FC<SectionProviderProps>;
6899
6899
  declare const useSectionStore: <U>(selector: (state: ExtractState<StoreApi<SectionContextProps>>) => U, equalityFn?: ((a: U, b: U) => boolean) | undefined) => U;
6900
6900
  declare const useSection: (id: string) => SectionData | undefined;
6901
6901
 
6902
+ type LayoutSettings = {
6903
+ showHeader: boolean;
6904
+ showFooter: boolean;
6905
+ };
6902
6906
  type ShopContextProps = {
6907
+ layoutSettings?: LayoutSettings;
6903
6908
  mode?: RenderMode;
6904
6909
  locale?: string;
6905
6910
  pageType?: PublishedThemePageType;
@@ -6917,12 +6922,13 @@ type ShopContextProps = {
6917
6922
  }) => void;
6918
6923
  changeCurrency: (currency: string) => void;
6919
6924
  changeSwatches: (swatches: GlobalSwatchesData[]) => void;
6925
+ changeLayoutSettings: (layoutSettings: LayoutSettings) => void;
6920
6926
  };
6921
6927
  type ShopProviderProps = {
6922
6928
  children: React.ReactNode;
6923
6929
  key?: React.Key;
6924
6930
  addons: AddonContextProps['components'];
6925
- storeOption: Omit<ShopContextProps, 'changeLocale' | 'changeCurrency' | 'changeSwatches' | 'changeStorefrontInfo'>;
6931
+ storeOption: Omit<ShopContextProps, 'changeLocale' | 'changeCurrency' | 'changeSwatches' | 'changeLayoutSettings' | 'changeStorefrontInfo'>;
6926
6932
  queryOption?: React.ComponentProps<typeof SWRConfig>['value'];
6927
6933
  };
6928
6934
  declare const ShopProvider: React.FC<ShopProviderProps>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/core",
3
- "version": "1.5.22",
3
+ "version": "1.5.24",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",