@gem-sdk/core 12.0.0-dev.86 → 12.0.0-dev.98
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 jsxRuntime=require("react/jsx-runtime");const SECTION_SIZE_GUIDE_URL="https://www.google.com/",SectionErrorBanner=({errorSectionInfo:e,onDismiss:i})=>e.isDismissed?null:jsxRuntime.jsx("div",{"data-toolbar-error-banner":!0,className:"gp-flex gp-items-center gp-px-2 gp-top-0 gp-w-full gp-absolute gp-bg-[#FEE4E3] gp-border-t gp-border-t-[#C3362B] gp-text-xs gp-text-[#C3362B] gp-leading-5",children:jsxRuntime.jsxs("div",{className:"gp-flex gp-
|
|
2
|
+
"use strict";var jsxRuntime=require("react/jsx-runtime");const SECTION_SIZE_GUIDE_URL="https://www.google.com/",SectionErrorBanner=({errorSectionInfo:e,onDismiss:i})=>e.isDismissed?null:jsxRuntime.jsx("div",{"data-toolbar-error-banner":!0,className:"gp-flex gp-items-center gp-px-2 gp-top-0 gp-w-full gp-absolute gp-bg-[#FEE4E3] gp-border-t gp-border-t-[#C3362B] gp-text-xs gp-text-[#C3362B] gp-leading-5",children:jsxRuntime.jsxs("div",{className:"gp-flex gp-gap-1.5 gp-w-full",children:[jsxRuntime.jsxs("svg",{className:"gp-flex-shrink-0 gp-mt-2.5",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("path",{d:"M11 13.5C11 14.0523 10.5523 14.5 10 14.5C9.44772 14.5 9 14.0523 9 13.5C9 12.9477 9.44772 12.5 10 12.5C10.5523 12.5 11 12.9477 11 13.5Z",fill:"#C3362B"}),jsxRuntime.jsx("path",{d:"M10.75 6.25001C10.75 5.8358 10.4142 5.50001 10 5.5C9.5858 5.49999 9.25001 5.83578 9.25 6.24999L9.24994 10.75C9.24993 11.1642 9.58572 11.5 9.99993 11.5C10.4141 11.5 10.7499 11.1642 10.7499 10.75L10.75 6.25001Z",fill:"#C3362B"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 17C13.866 17 17 13.866 17 10C17 6.13401 13.866 3 10 3C6.13401 3 3 6.13401 3 10C3 13.866 6.13401 17 10 17ZM10 15.5C13.0376 15.5 15.5 13.0376 15.5 10C15.5 6.96243 13.0376 4.5 10 4.5C6.96243 4.5 4.5 6.96243 4.5 10C4.5 13.0376 6.96243 15.5 10 15.5Z",fill:"#C3362B"})]}),jsxRuntime.jsxs("div",{className:"gp-w-full gp-py-2.5",children:["LIQUID_SYNTAX_ERROR"===e.type&&"This section contains a syntax error in the code. Please review and fix it, then try verifying again.","SECTION_SIZE_EXCEED_256KB"===e.type&&jsxRuntime.jsxs("div",{children:["This section is over Shopify's 256KB limit. Please follow ",jsxRuntime.jsx("a",{target:"_blank",href:SECTION_SIZE_GUIDE_URL,className:"gp-underline gp-cursor-pointer",onClick:e=>{e.preventDefault(),e.stopPropagation(),window.open(SECTION_SIZE_GUIDE_URL,"_blank")},rel:"noreferrer",children:"our guide"})," ","to optimize, then try verifying again."]}),"MISSING_SECTION_IN_THEME"===e.type&&"This section was deleted from your live theme. Please delete it from this page, or restore all sections by Force publish."]}),jsxRuntime.jsx("button",{className:"gp-p-1.5 gp-flex-shrink-0 gp-mt-1 gp-h-7",onClick:i,type:"button",children:jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:jsxRuntime.jsx("path",{d:"M11.1755 12.0243C11.4099 12.2586 11.7898 12.2586 12.0241 12.0243C12.2584 11.79 12.2584 11.4101 12.0241 11.1758L8.84833 8.00005L12.0241 4.82431C12.2584 4.59 12.2584 4.2101 12.0241 3.97579C11.7898 3.74147 11.4099 3.74147 11.1755 3.97579L7.9998 7.15152L4.82407 3.97578C4.58975 3.74147 4.20986 3.74147 3.97554 3.97578C3.74123 4.2101 3.74123 4.59 3.97554 4.82431L7.15128 8.00005L3.97554 11.1758C3.74123 11.4101 3.74123 11.79 3.97554 12.0243C4.20986 12.2586 4.58975 12.2586 4.82407 12.0243L7.9998 8.84858L11.1755 12.0243Z",fill:"#212121"})})})]})});exports.SectionErrorBanner=SectionErrorBanner;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
"use strict";var jsxRuntime=require("react/jsx-runtime"),react=require("react"),zustand=require("zustand");const PageContext=react.createContext(null),createPageStoreProvider=e=>zustand.createStore(t=>({...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})},
|
|
2
|
+
"use strict";var jsxRuntime=require("react/jsx-runtime"),react=require("react"),zustand=require("zustand");const PageContext=react.createContext(null),createPageStoreProvider=e=>zustand.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})),PageProvider=({children:e,dynamicProduct:t,dynamicCollection:r,productOffers:a,dynamicDiscountOffer:i,publicStoreFrontData:n,assignedProductIds:s,isApplyAllProducts:o,sellingPlanMeta:c,buyerConsentChecked:u,...d})=>{let P=react.useMemo(()=>createPageStoreProvider({dynamicProduct:t,dynamicCollection:r,productOffers:a,assignedProductIds:s,isApplyAllProducts:o,dynamicDiscountOffer:i,publicStoreFrontData:n,interactionData:{selectType:"ELEMENT"},sellingPlanMeta:c,buyerConsentChecked:u}),[t,r,a,i,n,s,o,c,u]);return jsxRuntime.jsx(PageContext.Provider,{...d,value:P,children:e})},usePageStore=(e,t)=>{let r=react.useContext(PageContext);if(!r)throw Error("usePageStore must be used within a PageProvider");return zustand.useStore(r,e,t)};exports.PageProvider=PageProvider,exports.usePageStore=usePageStore;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsx as e,jsxs as i}from"react/jsx-runtime";let SECTION_SIZE_GUIDE_URL="https://www.google.com/",SectionErrorBanner=({errorSectionInfo:t,onDismiss:l})=>t.isDismissed?null:e("div",{"data-toolbar-error-banner":!0,className:"gp-flex gp-items-center gp-px-2 gp-top-0 gp-w-full gp-absolute gp-bg-[#FEE4E3] gp-border-t gp-border-t-[#C3362B] gp-text-xs gp-text-[#C3362B] gp-leading-5",children:i("div",{className:"gp-flex gp-
|
|
2
|
+
import{jsx as e,jsxs as i}from"react/jsx-runtime";let SECTION_SIZE_GUIDE_URL="https://www.google.com/",SectionErrorBanner=({errorSectionInfo:t,onDismiss:l})=>t.isDismissed?null:e("div",{"data-toolbar-error-banner":!0,className:"gp-flex gp-items-center gp-px-2 gp-top-0 gp-w-full gp-absolute gp-bg-[#FEE4E3] gp-border-t gp-border-t-[#C3362B] gp-text-xs gp-text-[#C3362B] gp-leading-5",children:i("div",{className:"gp-flex gp-gap-1.5 gp-w-full",children:[i("svg",{className:"gp-flex-shrink-0 gp-mt-2.5",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e("path",{d:"M11 13.5C11 14.0523 10.5523 14.5 10 14.5C9.44772 14.5 9 14.0523 9 13.5C9 12.9477 9.44772 12.5 10 12.5C10.5523 12.5 11 12.9477 11 13.5Z",fill:"#C3362B"}),e("path",{d:"M10.75 6.25001C10.75 5.8358 10.4142 5.50001 10 5.5C9.5858 5.49999 9.25001 5.83578 9.25 6.24999L9.24994 10.75C9.24993 11.1642 9.58572 11.5 9.99993 11.5C10.4141 11.5 10.7499 11.1642 10.7499 10.75L10.75 6.25001Z",fill:"#C3362B"}),e("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 17C13.866 17 17 13.866 17 10C17 6.13401 13.866 3 10 3C6.13401 3 3 6.13401 3 10C3 13.866 6.13401 17 10 17ZM10 15.5C13.0376 15.5 15.5 13.0376 15.5 10C15.5 6.96243 13.0376 4.5 10 4.5C6.96243 4.5 4.5 6.96243 4.5 10C4.5 13.0376 6.96243 15.5 10 15.5Z",fill:"#C3362B"})]}),i("div",{className:"gp-w-full gp-py-2.5",children:["LIQUID_SYNTAX_ERROR"===t.type&&"This section contains a syntax error in the code. Please review and fix it, then try verifying again.","SECTION_SIZE_EXCEED_256KB"===t.type&&i("div",{children:["This section is over Shopify's 256KB limit. Please follow ",e("a",{target:"_blank",href:SECTION_SIZE_GUIDE_URL,className:"gp-underline gp-cursor-pointer",onClick:e=>{e.preventDefault(),e.stopPropagation(),window.open(SECTION_SIZE_GUIDE_URL,"_blank")},rel:"noreferrer",children:"our guide"})," ","to optimize, then try verifying again."]}),"MISSING_SECTION_IN_THEME"===t.type&&"This section was deleted from your live theme. Please delete it from this page, or restore all sections by Force publish."]}),e("button",{className:"gp-p-1.5 gp-flex-shrink-0 gp-mt-1 gp-h-7",onClick:l,type:"button",children:e("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:e("path",{d:"M11.1755 12.0243C11.4099 12.2586 11.7898 12.2586 12.0241 12.0243C12.2584 11.79 12.2584 11.4101 12.0241 11.1758L8.84833 8.00005L12.0241 4.82431C12.2584 4.59 12.2584 4.2101 12.0241 3.97579C11.7898 3.74147 11.4099 3.74147 11.1755 3.97579L7.9998 7.15152L4.82407 3.97578C4.58975 3.74147 4.20986 3.74147 3.97554 3.97578C3.74123 4.2101 3.74123 4.59 3.97554 4.82431L7.15128 8.00005L3.97554 11.1758C3.74123 11.4101 3.74123 11.79 3.97554 12.0243C4.20986 12.2586 4.58975 12.2586 4.82407 12.0243L7.9998 8.84858L11.1755 12.0243Z",fill:"#212121"})})})]})});export{SectionErrorBanner};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsx as e}from"react/jsx-runtime";import{useMemo as t,useContext as
|
|
2
|
+
import{jsx as e}from"react/jsx-runtime";import{useMemo as t,useContext as r,createContext as a}from"react";import{useStore as i,createStore as n}from"zustand";let PageContext=a(null),createPageStoreProvider=e=>n((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})),PageProvider=({children:r,dynamicProduct:a,dynamicCollection:i,productOffers:n,dynamicDiscountOffer:o,publicStoreFrontData:s,assignedProductIds:c,isApplyAllProducts:l,sellingPlanMeta:P,buyerConsentChecked:d,...u})=>{let g=t(()=>createPageStoreProvider({dynamicProduct:a,dynamicCollection:i,productOffers:n,assignedProductIds:c,isApplyAllProducts:l,dynamicDiscountOffer:o,publicStoreFrontData:s,interactionData:{selectType:"ELEMENT"},sellingPlanMeta:P,buyerConsentChecked:d}),[a,i,n,o,s,c,l,P,d]);return e(PageContext.Provider,{...u,value:g,children:r})},usePageStore=(e,t)=>{let a=r(PageContext);if(!a)throw Error("usePageStore must be used within a PageProvider");return i(a,e,t)};export{PageProvider,usePageStore};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -43184,7 +43184,7 @@ type PageContextProps = {
|
|
|
43184
43184
|
sidebarMode?: string;
|
|
43185
43185
|
sellingPlanMeta?: any;
|
|
43186
43186
|
buyerConsentChecked?: Record<string, boolean>;
|
|
43187
|
-
subscriptionVisible?: Record<string,
|
|
43187
|
+
subscriptionVisible?: Record<string, string[]>;
|
|
43188
43188
|
setDynamicProduct: (data: DynamicProduct) => void;
|
|
43189
43189
|
setAssignedProductIds: (assignedIds: string[]) => void;
|
|
43190
43190
|
setIsApplyAllProducts: (isApplyAllProducts: boolean) => void;
|
|
@@ -43200,10 +43200,9 @@ type PageContextProps = {
|
|
|
43200
43200
|
setSidebarMode: (mode: string) => void;
|
|
43201
43201
|
setSellingPlanMeta: (value: any) => void;
|
|
43202
43202
|
setBuyerConsentChecked: (value: Record<string, boolean>) => void;
|
|
43203
|
-
|
|
43204
|
-
|
|
43205
|
-
|
|
43206
|
-
}) => void;
|
|
43203
|
+
getBuyerConsentChecked: () => Record<string, boolean> | undefined;
|
|
43204
|
+
setSubscriptionVisible: (value: Record<string, string[]>) => void;
|
|
43205
|
+
getSubscriptionVisible: () => Record<string, string[]> | undefined;
|
|
43207
43206
|
};
|
|
43208
43207
|
type PageProviderProps = Pick<PageContextProps, 'dynamicProduct' | 'dynamicCollection' | 'productOffers' | 'dynamicDiscountOffer' | 'assignedProductIds' | 'isApplyAllProducts' | 'sellingPlanMeta' | 'buyerConsentChecked'> & {
|
|
43209
43208
|
children: React.ReactNode;
|