@gem-sdk/core 1.8.31 → 1.8.33

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.
@@ -15,6 +15,15 @@ const createModalProvider = (data)=>zustand.createStore((set)=>({
15
15
  set({
16
16
  activeId: id
17
17
  });
18
+ },
19
+ clearModal: ()=>{
20
+ window?.parent?.postMessage?.(JSON.stringify({
21
+ type: 'active-element',
22
+ uid: null
23
+ }), '*');
24
+ set({
25
+ activeId: undefined
26
+ });
18
27
  }
19
28
  }));
20
29
  const ModalProvider = ({ children , activeId , ...passProps })=>{
@@ -13,6 +13,15 @@ const createModalProvider = (data)=>createStore((set)=>({
13
13
  set({
14
14
  activeId: id
15
15
  });
16
+ },
17
+ clearModal: ()=>{
18
+ window?.parent?.postMessage?.(JSON.stringify({
19
+ type: 'active-element',
20
+ uid: null
21
+ }), '*');
22
+ set({
23
+ activeId: undefined
24
+ });
16
25
  }
17
26
  }));
18
27
  const ModalProvider = ({ children , activeId , ...passProps })=>{
@@ -124,7 +124,7 @@ type StateProp<T> = Partial<Record<StateType, T>>;
124
124
  type ResponsiveStateProp<T> = ObjectDevices<StateProp<T>>;
125
125
  type AlignItemProp = 'left' | 'center' | 'right';
126
126
  type JudgeMeReviewsWidgetType = 'single_product_preview_badge' | 'review_widget' | 'reviews_carousel' | 'floating_reviews_tab' | 'all_reviews_widget' | 'verified_reviews_count_badge' | 'medals' | 'media_grid' | 'all_reviews_text';
127
- type LooxReviewsWidgetType = 'product_reviews_widget' | 'reviews_widget_all_stores' | 'product_star_ratings_widget' | 'carousel_widget';
127
+ type LooxReviewsWidgetType = 'reviews_widget' | 'rating_widget' | 'carousel_widget';
128
128
  type KlaviyoWidgetType = 'popup_widget' | 'flyout_widget' | 'embed_widget' | 'full_page_widget';
129
129
 
130
130
  type ResponsiveConfig<T> = {
@@ -7051,6 +7051,7 @@ declare const useCollectionStore: <U>(selector: (state: ExtractState<StoreApi<Co
7051
7051
  type ModalContextProps = {
7052
7052
  activeId?: string;
7053
7053
  setModalActive: (id?: string) => void;
7054
+ clearModal: () => void;
7054
7055
  };
7055
7056
  type ModalProviderProps = Pick<ModalContextProps, 'activeId'> & {
7056
7057
  children: React.ReactNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/core",
3
- "version": "1.8.31",
3
+ "version": "1.8.33",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",