@gem-sdk/core 17.0.0-dev.69 → 17.0.0-dev.71

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"),r=require("react"),t=require("zustand");const s=r.createContext(null),i=(e,r,s)=>t.createStore((t,i)=>({state:e,isPostPurchase:r,isPreview:s,getItem:e=>i().state[e],getIsPostPurchase:()=>i().isPostPurchase,getIsPreview:()=>i().isPreview}));exports.BuilderProvider=({children:t,state:u,isPostPurchase:o,isPreview:a,lazy:n,priority:P,...c})=>{let d=n?r.Suspense:r.Fragment,l=i(u,o,a);return e.jsx(d,{children:e.jsx(s.Provider,{...c,value:l,children:t})})},exports.useBuilderStore=(e,i)=>{let u=r.useContext(s);if(!u)throw Error("useBuilderStore must be used within a BuilderProvider");return t.useStore(u,e,i)};
2
+ "use strict";var e=require("react/jsx-runtime"),r=require("react"),t=require("zustand");const s=r.createContext(null),i=(e,r,s,i)=>t.createStore((t,u)=>({state:e,isPostPurchase:r,isPreview:s,priority:i,getItem:e=>u().state[e],getIsPostPurchase:()=>u().isPostPurchase,getIsPreview:()=>u().isPreview,getIsPriority:()=>u().priority}));exports.BuilderProvider=({children:t,state:u,isPostPurchase:o,isPreview:a,lazy:n,priority:P,...c})=>{let d=n?r.Suspense:r.Fragment,l=i(u,o,a,P);return e.jsx(d,{children:e.jsx(s.Provider,{...c,value:l,children:t})})},exports.useBuilderStore=(e,i)=>{let u=r.useContext(s);if(!u)throw Error("useBuilderStore must be used within a BuilderProvider");return t.useStore(u,e,i)};
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsx as e}from"react/jsx-runtime";import{useContext as r,createContext as t,Suspense as i,Fragment as s}from"react";import{useStore as o,createStore as u}from"zustand";let l=t(null),P=(e,r,t)=>u((i,s)=>({state:e,isPostPurchase:r,isPreview:t,getItem:e=>s().state[e],getIsPostPurchase:()=>s().isPostPurchase,getIsPreview:()=>s().isPreview})),d=({children:r,state:t,isPostPurchase:o,isPreview:u,lazy:d,priority:a,...m})=>{let n=d?i:s,c=P(t,o,u);return e(n,{children:e(l.Provider,{...m,value:c,children:r})})},a=(e,t)=>{let i=r(l);if(!i)throw Error("useBuilderStore must be used within a BuilderProvider");return o(i,e,t)};export{d as BuilderProvider,a as useBuilderStore};
2
+ import{jsx as r}from"react/jsx-runtime";import{useContext as e,createContext as t,Suspense as i,Fragment as s}from"react";import{useStore as o,createStore as u}from"zustand";let P=t(null),l=(r,e,t,i)=>u((s,o)=>({state:r,isPostPurchase:e,isPreview:t,priority:i,getItem:r=>o().state[r],getIsPostPurchase:()=>o().isPostPurchase,getIsPreview:()=>o().isPreview,getIsPriority:()=>o().priority})),d=({children:e,state:t,isPostPurchase:o,isPreview:u,lazy:d,priority:a,...m})=>{let n=d?i:s,c=l(t,o,u,a);return r(n,{children:r(P.Provider,{...m,value:c,children:e})})},a=(r,t)=>{let i=e(P);if(!i)throw Error("useBuilderStore must be used within a BuilderProvider");return o(i,r,t)};export{d as BuilderProvider,a as useBuilderStore};
@@ -42773,9 +42773,9 @@ type AddonProviderProps = Pick<AddonContextProps, 'components'> & {
42773
42773
 
42774
42774
  declare const AddonProvider: React.FC<AddonProviderProps>;
42775
42775
  declare const useAddons: () => Record<string, React.ComponentType<any>>;
42776
- declare const useAddon: (id?: string) => React.ComponentType<any> | React.FC<BaseProps & {
42776
+ declare const useAddon: (id?: string) => React.FC<BaseProps & {
42777
42777
  children?: React.ReactNode;
42778
- }>;
42778
+ }> | React.ComponentType<any>;
42779
42779
 
42780
42780
  type BuilderComponentProps = {
42781
42781
  components: Record<string, React.ComponentType<any>>;
@@ -42787,9 +42787,9 @@ type BuilderComponentProviderProps = Pick<BuilderComponentProps, 'components'> &
42787
42787
  };
42788
42788
 
42789
42789
  declare const BuilderComponentProvider: React.FC<BuilderComponentProviderProps>;
42790
- declare const useBuilderComponent: (id?: string) => React.FC<BaseProps & {
42790
+ declare const useBuilderComponent: (id?: string) => React.ComponentType<BaseProps> | React.FC<BaseProps & {
42791
42791
  children?: React.ReactNode;
42792
- }> | React.ComponentType<BaseProps>;
42792
+ }>;
42793
42793
 
42794
42794
  type BuilderContextProps = {
42795
42795
  state: BuilderState | SectionData;
@@ -42798,6 +42798,8 @@ type BuilderContextProps = {
42798
42798
  getIsPostPurchase: () => boolean | undefined;
42799
42799
  isPreview?: boolean;
42800
42800
  getIsPreview: () => boolean | undefined;
42801
+ priority?: boolean;
42802
+ getIsPriority: () => boolean | undefined;
42801
42803
  };
42802
42804
  type BuilderProviderProps = Pick<BuilderContextProps, 'state' | 'isPostPurchase' | 'isPreview'> & {
42803
42805
  children: React.ReactNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/core",
3
- "version": "17.0.0-dev.69",
3
+ "version": "17.0.0-dev.71",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",
@@ -28,8 +28,8 @@
28
28
  "type-check": "yarn tsc --noEmit"
29
29
  },
30
30
  "devDependencies": {
31
- "@gem-sdk/adapter-shopify": "17.0.0-dev.38",
32
- "@gem-sdk/styles": "17.0.0-dev.62",
31
+ "@gem-sdk/adapter-shopify": "17.0.0-dev.71",
32
+ "@gem-sdk/styles": "17.0.0-dev.71",
33
33
  "@types/classnames": "^2.3.1"
34
34
  },
35
35
  "dependencies": {