@gem-sdk/core 1.14.0-dev.671 → 1.14.0-dev.672

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 +1 @@
1
- "use strict";var jsxRuntime=require("react/jsx-runtime"),react=require("react"),zustand=require("zustand");const PageContext=react.createContext(null),createPageStoreProvider=e=>zustand.createStore(r=>({...e,setDynamicProduct:e=>{r({dynamicProduct:e})},setDynamicCollection:e=>{r({dynamicCollection:e})}})),PageProvider=({children:e,dynamicProduct:r,dynamicCollection:t,...a})=>{let o=react.useMemo(()=>createPageStoreProvider({dynamicProduct:r,dynamicCollection:t}),[r,t]);return jsxRuntime.jsx(PageContext.Provider,{...a,value:o,children:e})},usePageStore=(e,r)=>{let t=react.useContext(PageContext);if(!t)throw Error("usePageStore must be used within a PageProvider");return zustand.useStore(t,e,r)};exports.PageProvider=PageProvider,exports.usePageStore=usePageStore;
1
+ "use strict";var jsxRuntime=require("react/jsx-runtime"),react=require("react"),zustand=require("zustand");const PageContext=react.createContext(null),createPageStoreProvider=e=>zustand.createStore(r=>({...e,setDynamicProduct:e=>{r({dynamicProduct:e})},setDynamicCollection:e=>{r({dynamicCollection:e})},setPostPurchaseProductOfferIds:e=>{r({postPurchaseProductOfferIds:e})},setSalePageProductId:e=>{r({salePageProductId:e})}})),PageProvider=({children:e,dynamicProduct:r,dynamicCollection:t,...a})=>{let o=react.useMemo(()=>createPageStoreProvider({dynamicProduct:r,dynamicCollection:t}),[r,t]);return jsxRuntime.jsx(PageContext.Provider,{...a,value:o,children:e})},usePageStore=(e,r)=>{let t=react.useContext(PageContext);if(!t)throw Error("usePageStore must be used within a PageProvider");return zustand.useStore(t,e,r)};exports.PageProvider=PageProvider,exports.usePageStore=usePageStore;
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{useMemo as r,useContext as t,createContext as o}from"react";import{useStore as a,createStore as i}from"zustand";let PageContext=o(null),createPageStoreProvider=e=>i(r=>({...e,setDynamicProduct:e=>{r({dynamicProduct:e})},setDynamicCollection:e=>{r({dynamicCollection:e})}})),PageProvider=({children:t,dynamicProduct:o,dynamicCollection:a,...i})=>{let P=r(()=>createPageStoreProvider({dynamicProduct:o,dynamicCollection:a}),[o,a]);return e(PageContext.Provider,{...i,value:P,children:t})},usePageStore=(e,r)=>{let o=t(PageContext);if(!o)throw Error("usePageStore must be used within a PageProvider");return a(o,e,r)};export{PageProvider,usePageStore};
1
+ import{jsx as e}from"react/jsx-runtime";import{useMemo as r,useContext as t,createContext as o}from"react";import{useStore as a,createStore as P}from"zustand";let PageContext=o(null),createPageStoreProvider=e=>P(r=>({...e,setDynamicProduct:e=>{r({dynamicProduct:e})},setDynamicCollection:e=>{r({dynamicCollection:e})},setPostPurchaseProductOfferIds:e=>{r({postPurchaseProductOfferIds:e})},setSalePageProductId:e=>{r({salePageProductId:e})}})),PageProvider=({children:t,dynamicProduct:o,dynamicCollection:a,...P})=>{let d=r(()=>createPageStoreProvider({dynamicProduct:o,dynamicCollection:a}),[o,a]);return e(PageContext.Provider,{...P,value:d,children:t})},usePageStore=(e,r)=>{let o=t(PageContext);if(!o)throw Error("usePageStore must be used within a PageProvider");return a(o,e,r)};export{PageProvider,usePageStore};
@@ -1164,7 +1164,16 @@ type ProductInputCurrencyUnitControlType<T> = SharedControlType<T> & {
1164
1164
  useOnlyUnitInit?: boolean;
1165
1165
  };
1166
1166
 
1167
- 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> | PlayPauseControlType<T> | LayoutCustomSegmentControlType<T> | SneakPeakRange<T> | SneakPeakTypeControlType<T> | BackgroundColorPickerType<T> | ProductInputCurrencyUnitControlType<T>;
1167
+ type ProductOffersControlType<T> = SharedControlType<T> & {
1168
+ type: 'product-offers';
1169
+ isMultiple?: boolean;
1170
+ };
1171
+
1172
+ type DiscountAndShippingFee<T> = SharedControlType<T> & {
1173
+ type: 'discount-and-shipping-fee-product-offer';
1174
+ };
1175
+
1176
+ 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> | PlayPauseControlType<T> | LayoutCustomSegmentControlType<T> | SneakPeakRange<T> | SneakPeakTypeControlType<T> | BackgroundColorPickerType<T> | ProductInputCurrencyUnitControlType<T> | ProductOffersControlType<T> | DiscountAndShippingFee<T>;
1168
1177
  type ControlTriggerAction = {
1169
1178
  controlId: string;
1170
1179
  newValue?: any;
@@ -7926,8 +7935,12 @@ declare const useShopStore: <U>(selector: (state: ExtractState<StoreApi<ShopCont
7926
7935
  type PageContextProps = {
7927
7936
  dynamicProduct?: DynamicProduct;
7928
7937
  dynamicCollection?: DynamicCollection;
7938
+ postPurchaseProductOfferIds?: string[];
7939
+ salePageProductId?: string;
7929
7940
  setDynamicProduct: (data: DynamicProduct) => void;
7930
7941
  setDynamicCollection: (data: DynamicCollection) => void;
7942
+ setPostPurchaseProductOfferIds: (ids: string[]) => void;
7943
+ setSalePageProductId: (id: string) => void;
7931
7944
  };
7932
7945
  type PageProviderProps = Pick<PageContextProps, 'dynamicProduct' | 'dynamicCollection'> & {
7933
7946
  children: React.ReactNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/core",
3
- "version": "1.14.0-dev.671",
3
+ "version": "1.14.0-dev.672",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",