@gem-sdk/core 17.0.0-dev.11 → 17.0.0-dev.12

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.
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- "use strict";var e=require("react/jsx-runtime"),t=require("react"),r=require("zustand");const i=t.createContext(null),n=e=>r.createStore((t,r)=>({...e,setAssignedProductIds:e=>{t({assignedProductIds:e})},setIsApplyAllProducts:e=>{t({isApplyAllProducts:e})},setDynamicProduct:e=>{t({dynamicProduct:e})},setDynamicCollection:e=>{t({dynamicCollection:e})},setPostPurchaseProductOffers:e=>{t({productOffers:e})},setDynamicDiscountOffer:e=>{t({dynamicDiscountOffer:e})},setSalePageProductId:e=>{t({salePageProductId:e})},setPublicStoreFrontData:e=>{t({publicStoreFrontData:e})},setInteractionIsSelectOnPage:e=>{t(t=>({interactionData:{...t.interactionData,isSelectOnPage:e}}))},setInteractionItem:e=>{t(t=>({interactionData:{...t.interactionData,item:e,isSelectOnPage:t.interactionData?.isSelectOnPage||!1}}))},setInteractionSelectType:e=>{t(t=>({interactionData:{...t.interactionData,selectType:e}}))},setInteractionSettingType:e=>{t(t=>({interactionData:{...t.interactionData,settingType:e}}))},setSidebarMode:e=>{t(()=>({sidebarMode:e}))},setSellingPlanMeta:e=>{t({sellingPlanMeta:e})},setBuyerConsentChecked:e=>{t({buyerConsentChecked:e})},getBuyerConsentChecked:()=>r().buyerConsentChecked,setSubscriptionVisible:e=>{t({subscriptionVisible:e})},getSubscriptionVisible:()=>r().subscriptionVisible}));exports.PageProvider=({children:r,dynamicProduct:a,dynamicCollection:s,productOffers:o,dynamicDiscountOffer:c,publicStoreFrontData:u,assignedProductIds:l,isApplyAllProducts:d,sellingPlanMeta:P,buyerConsentChecked:g,...D})=>{let S=t.useMemo(()=>n({dynamicProduct:a,dynamicCollection:s,productOffers:o,assignedProductIds:l,isApplyAllProducts:d,dynamicDiscountOffer:c,publicStoreFrontData:u,interactionData:{selectType:"ELEMENT"},sellingPlanMeta:P,buyerConsentChecked:g}),[a,s,o,c,u,l,d,P,g]);return e.jsx(i.Provider,{...D,value:S,children:r})},exports.usePageStore=(e,n)=>{let a=t.useContext(i);if(!a)throw Error("usePageStore must be used within a PageProvider");return r.useStore(a,e,n)};
2
+ "use strict";var e=require("react/jsx-runtime"),t=require("react"),a=require("zustand");const i=t.createContext(null),n=e=>a.createStore((t,a)=>({...e,lazyloadSectionMeta:e.lazyloadSectionMeta??!0,setAssignedProductIds:e=>{t({assignedProductIds:e})},setIsApplyAllProducts:e=>{t({isApplyAllProducts:e})},setDynamicProduct:e=>{t({dynamicProduct:e})},setDynamicCollection:e=>{t({dynamicCollection:e})},setPostPurchaseProductOffers:e=>{t({productOffers:e})},setDynamicDiscountOffer:e=>{t({dynamicDiscountOffer:e})},setSalePageProductId:e=>{t({salePageProductId:e})},setPublicStoreFrontData:e=>{t({publicStoreFrontData:e})},setInteractionIsSelectOnPage:e=>{t(t=>({interactionData:{...t.interactionData,isSelectOnPage:e}}))},setInteractionItem:e=>{t(t=>({interactionData:{...t.interactionData,item:e,isSelectOnPage:t.interactionData?.isSelectOnPage||!1}}))},setInteractionSelectType:e=>{t(t=>({interactionData:{...t.interactionData,selectType:e}}))},setInteractionSettingType:e=>{t(t=>({interactionData:{...t.interactionData,settingType:e}}))},setSidebarMode:e=>{t(()=>({sidebarMode:e}))},setSellingPlanMeta:e=>{t({sellingPlanMeta:e})},setLazyloadSectionMeta:e=>{t({lazyloadSectionMeta:e})},setBuyerConsentChecked:e=>{t({buyerConsentChecked:e})},getBuyerConsentChecked:()=>a().buyerConsentChecked,setSubscriptionVisible:e=>{t({subscriptionVisible:e})},getSubscriptionVisible:()=>a().subscriptionVisible}));exports.PageProvider=({children:a,dynamicProduct:r,dynamicCollection:s,productOffers:o,dynamicDiscountOffer:c,publicStoreFrontData:l,assignedProductIds:u,isApplyAllProducts:d,sellingPlanMeta:P,lazyloadSectionMeta:S,buyerConsentChecked:y,...g})=>{let D=t.useMemo(()=>n({dynamicProduct:r,dynamicCollection:s,productOffers:o,assignedProductIds:u,isApplyAllProducts:d,dynamicDiscountOffer:c,publicStoreFrontData:l,interactionData:{selectType:"ELEMENT"},sellingPlanMeta:P,lazyloadSectionMeta:S,buyerConsentChecked:y}),[r,s,o,c,l,u,d,P,S,y]);return e.jsx(i.Provider,{...g,value:D,children:a})},exports.usePageStore=(e,n)=>{let r=t.useContext(i);if(!r)throw Error("usePageStore must be used within a PageProvider");return a.useStore(r,e,n)};
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsx as e}from"react/jsx-runtime";import{useContext as t,createContext as i,useMemo as n}from"react";import{useStore as r,createStore as a}from"zustand";let s=i(null),o=e=>a((t,i)=>({...e,setAssignedProductIds:e=>{t({assignedProductIds:e})},setIsApplyAllProducts:e=>{t({isApplyAllProducts:e})},setDynamicProduct:e=>{t({dynamicProduct:e})},setDynamicCollection:e=>{t({dynamicCollection:e})},setPostPurchaseProductOffers:e=>{t({productOffers:e})},setDynamicDiscountOffer:e=>{t({dynamicDiscountOffer:e})},setSalePageProductId:e=>{t({salePageProductId:e})},setPublicStoreFrontData:e=>{t({publicStoreFrontData:e})},setInteractionIsSelectOnPage:e=>{t(t=>({interactionData:{...t.interactionData,isSelectOnPage:e}}))},setInteractionItem:e=>{t(t=>({interactionData:{...t.interactionData,item:e,isSelectOnPage:t.interactionData?.isSelectOnPage||!1}}))},setInteractionSelectType:e=>{t(t=>({interactionData:{...t.interactionData,selectType:e}}))},setInteractionSettingType:e=>{t(t=>({interactionData:{...t.interactionData,settingType:e}}))},setSidebarMode:e=>{t(()=>({sidebarMode:e}))},setSellingPlanMeta:e=>{t({sellingPlanMeta:e})},setBuyerConsentChecked:e=>{t({buyerConsentChecked:e})},getBuyerConsentChecked:()=>i().buyerConsentChecked,setSubscriptionVisible:e=>{t({subscriptionVisible:e})},getSubscriptionVisible:()=>i().subscriptionVisible})),c=({children:t,dynamicProduct:i,dynamicCollection:r,productOffers:a,dynamicDiscountOffer:c,publicStoreFrontData:l,assignedProductIds:d,isApplyAllProducts:u,sellingPlanMeta:P,buyerConsentChecked:g,...p})=>{let D=n(()=>o({dynamicProduct:i,dynamicCollection:r,productOffers:a,assignedProductIds:d,isApplyAllProducts:u,dynamicDiscountOffer:c,publicStoreFrontData:l,interactionData:{selectType:"ELEMENT"},sellingPlanMeta:P,buyerConsentChecked:g}),[i,r,a,c,l,d,u,P,g]);return e(s.Provider,{...p,value:D,children:t})},l=(e,i)=>{let n=t(s);if(!n)throw Error("usePageStore must be used within a PageProvider");return r(n,e,i)};export{c as PageProvider,l as usePageStore};
2
+ import{jsx as e}from"react/jsx-runtime";import{useContext as t,createContext as a,useMemo as i}from"react";import{useStore as n,createStore as r}from"zustand";let o=a(null),s=e=>r((t,a)=>({...e,lazyloadSectionMeta:e.lazyloadSectionMeta??!0,setAssignedProductIds:e=>{t({assignedProductIds:e})},setIsApplyAllProducts:e=>{t({isApplyAllProducts:e})},setDynamicProduct:e=>{t({dynamicProduct:e})},setDynamicCollection:e=>{t({dynamicCollection:e})},setPostPurchaseProductOffers:e=>{t({productOffers:e})},setDynamicDiscountOffer:e=>{t({dynamicDiscountOffer:e})},setSalePageProductId:e=>{t({salePageProductId:e})},setPublicStoreFrontData:e=>{t({publicStoreFrontData:e})},setInteractionIsSelectOnPage:e=>{t(t=>({interactionData:{...t.interactionData,isSelectOnPage:e}}))},setInteractionItem:e=>{t(t=>({interactionData:{...t.interactionData,item:e,isSelectOnPage:t.interactionData?.isSelectOnPage||!1}}))},setInteractionSelectType:e=>{t(t=>({interactionData:{...t.interactionData,selectType:e}}))},setInteractionSettingType:e=>{t(t=>({interactionData:{...t.interactionData,settingType:e}}))},setSidebarMode:e=>{t(()=>({sidebarMode:e}))},setSellingPlanMeta:e=>{t({sellingPlanMeta:e})},setLazyloadSectionMeta:e=>{t({lazyloadSectionMeta:e})},setBuyerConsentChecked:e=>{t({buyerConsentChecked:e})},getBuyerConsentChecked:()=>a().buyerConsentChecked,setSubscriptionVisible:e=>{t({subscriptionVisible:e})},getSubscriptionVisible:()=>a().subscriptionVisible})),c=({children:t,dynamicProduct:a,dynamicCollection:n,productOffers:r,dynamicDiscountOffer:c,publicStoreFrontData:l,assignedProductIds:d,isApplyAllProducts:u,sellingPlanMeta:P,lazyloadSectionMeta:y,buyerConsentChecked:S,...g})=>{let p=i(()=>s({dynamicProduct:a,dynamicCollection:n,productOffers:r,assignedProductIds:d,isApplyAllProducts:u,dynamicDiscountOffer:c,publicStoreFrontData:l,interactionData:{selectType:"ELEMENT"},sellingPlanMeta:P,lazyloadSectionMeta:y,buyerConsentChecked:S}),[a,n,r,c,l,d,u,P,y,S]);return e(o.Provider,{...g,value:p,children:t})},l=(e,a)=>{let i=t(o);if(!i)throw Error("usePageStore must be used within a PageProvider");return n(i,e,a)};export{c as PageProvider,l as usePageStore};
@@ -42762,9 +42762,9 @@ type AddonProviderProps = Pick<AddonContextProps, 'components'> & {
42762
42762
 
42763
42763
  declare const AddonProvider: React.FC<AddonProviderProps>;
42764
42764
  declare const useAddons: () => Record<string, React.ComponentType<any>>;
42765
- declare const useAddon: (id?: string) => React.ComponentType<any> | React.FC<BaseProps & {
42765
+ declare const useAddon: (id?: string) => React.FC<BaseProps & {
42766
42766
  children?: React.ReactNode;
42767
- }>;
42767
+ }> | React.ComponentType<any>;
42768
42768
 
42769
42769
  type BuilderComponentProps = {
42770
42770
  components: Record<string, React.ComponentType<any>>;
@@ -42776,9 +42776,9 @@ type BuilderComponentProviderProps = Pick<BuilderComponentProps, 'components'> &
42776
42776
  };
42777
42777
 
42778
42778
  declare const BuilderComponentProvider: React.FC<BuilderComponentProviderProps>;
42779
- declare const useBuilderComponent: (id?: string) => React.FC<BaseProps & {
42779
+ declare const useBuilderComponent: (id?: string) => React.ComponentType<BaseProps> | React.FC<BaseProps & {
42780
42780
  children?: React.ReactNode;
42781
- }> | React.ComponentType<BaseProps>;
42781
+ }>;
42782
42782
 
42783
42783
  type BuilderContextProps = {
42784
42784
  state: BuilderState | SectionData;
@@ -43170,6 +43170,7 @@ type PageContextProps = {
43170
43170
  };
43171
43171
  sidebarMode?: string;
43172
43172
  sellingPlanMeta?: any;
43173
+ lazyloadSectionMeta?: boolean;
43173
43174
  buyerConsentChecked?: Record<string, boolean>;
43174
43175
  subscriptionVisible?: Record<string, string[]>;
43175
43176
  setDynamicProduct: (data: DynamicProduct) => void;
@@ -43186,12 +43187,13 @@ type PageContextProps = {
43186
43187
  setInteractionSettingType: (settingType?: 'TRIGGER' | 'TARGET') => void;
43187
43188
  setSidebarMode: (mode: string) => void;
43188
43189
  setSellingPlanMeta: (value: any) => void;
43190
+ setLazyloadSectionMeta: (value: boolean) => void;
43189
43191
  setBuyerConsentChecked: (value: Record<string, boolean>) => void;
43190
43192
  getBuyerConsentChecked: () => Record<string, boolean> | undefined;
43191
43193
  setSubscriptionVisible: (value: Record<string, string[]>) => void;
43192
43194
  getSubscriptionVisible: () => Record<string, string[]> | undefined;
43193
43195
  };
43194
- type PageProviderProps = Pick<PageContextProps, 'dynamicProduct' | 'dynamicCollection' | 'productOffers' | 'dynamicDiscountOffer' | 'assignedProductIds' | 'isApplyAllProducts' | 'sellingPlanMeta' | 'buyerConsentChecked'> & {
43196
+ type PageProviderProps = Pick<PageContextProps, 'dynamicProduct' | 'dynamicCollection' | 'productOffers' | 'dynamicDiscountOffer' | 'assignedProductIds' | 'isApplyAllProducts' | 'sellingPlanMeta' | 'lazyloadSectionMeta' | 'buyerConsentChecked'> & {
43195
43197
  children: React.ReactNode;
43196
43198
  key?: React.Key;
43197
43199
  publicStoreFrontData?: PublicStoreFrontData | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/core",
3
- "version": "17.0.0-dev.11",
3
+ "version": "17.0.0-dev.12",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",