@gem-sdk/core 1.8.31 → 1.8.32

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 })=>{
@@ -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.32",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",