@gem-sdk/core 2.0.0-dev.837 → 2.0.0-dev.843
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.
- package/dist/cjs/components/Render.js +1 -1
- package/dist/cjs/components/ai-generator/AIContentGenerator.js +1 -1
- package/dist/cjs/components/ai-generator/AIGenContentLoading.js +1 -1
- package/dist/cjs/components/ai-generator/components/PickProduct.js +1 -1
- package/dist/cjs/components/ai-generator/components/ToneAndVoice.js +1 -1
- package/dist/cjs/contexts/BuilderContext.js +1 -1
- package/dist/cjs/graphql-app-api/queries/ThemePage.generated.js +11 -4
- package/dist/cjs/helpers/make-style.js +1 -1
- package/dist/esm/components/Render.js +1 -1
- package/dist/esm/components/ai-generator/AIContentGenerator.js +1 -1
- package/dist/esm/components/ai-generator/AIGenContentLoading.js +1 -1
- package/dist/esm/components/ai-generator/components/PickProduct.js +1 -1
- package/dist/esm/components/ai-generator/components/ToneAndVoice.js +1 -1
- package/dist/esm/contexts/BuilderContext.js +1 -1
- package/dist/esm/graphql-app-api/queries/ThemePage.generated.js +11 -4
- package/dist/esm/helpers/make-style.js +1 -1
- package/dist/types/index.d.ts +14 -3
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),react=require("react"),reactErrorBoundary=require("react-error-boundary"),BuilderComponent=require("../contexts/BuilderComponent.js"),BuilderContext=require("../contexts/BuilderContext.js"),ComponentWrapper=require("./ComponentWrapper.js"),RenderSection=require("./RenderSection.js");const Render=({uid:e,...r})=>{let t=BuilderContext.useBuilderStore(r=>r.getItem(e)),n=BuilderComponent.useBuilderComponent(t?.tag),s=BuilderContext.useBuilderStore(e=>e.getIsPostPurchase()),i=react.useMemo(()=>s?"POST_PURCHASE":void 0,[s]);return t?t?.type==="section"?jsxRuntime.jsx(RenderSection.default,{sectionId:t.uid}):jsxRuntime.jsx(reactErrorBoundary.ErrorBoundary,{fallbackRender:({error:e,resetErrorBoundary:r})=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("span",{"aria-label":"Error message",children:e.message}),jsxRuntime.jsx("button",{type:"button",onClick:r,children:"Try again"})]}),children:jsxRuntime.jsx(ComponentWrapper.default,{...t,pageType:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),react=require("react"),reactErrorBoundary=require("react-error-boundary"),BuilderComponent=require("../contexts/BuilderComponent.js"),BuilderContext=require("../contexts/BuilderContext.js"),ComponentWrapper=require("./ComponentWrapper.js"),RenderSection=require("./RenderSection.js");const Render=({uid:e,...r})=>{let t=BuilderContext.useBuilderStore(r=>r.getItem(e)),n=BuilderComponent.useBuilderComponent(t?.tag),s=BuilderContext.useBuilderStore(e=>e.getIsPostPurchase()),i=BuilderContext.useBuilderStore(e=>e.getIsPreview()),u=react.useMemo(()=>s?"POST_PURCHASE":void 0,[s]);return t?t?.type==="section"?jsxRuntime.jsx(RenderSection.default,{sectionId:t.uid}):jsxRuntime.jsx(reactErrorBoundary.ErrorBoundary,{fallbackRender:({error:e,resetErrorBoundary:r})=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("span",{"aria-label":"Error message",children:e.message}),jsxRuntime.jsx("button",{type:"button",onClick:r,children:"Try again"})]}),children:jsxRuntime.jsx(ComponentWrapper.default,{...t,pageType:u,children:t?.childrens?.length?jsxRuntime.jsx(n,{builderProps:{uid:e,builderData:t,isPreview:i},styles:t.styles,setting:t.settings,...r,children:t.childrens.map(e=>jsxRuntime.jsx(RenderMemo,{uid:e},e))}):jsxRuntime.jsx(n,{builderProps:{uid:e,builderData:t,isPreview:i},styles:t.styles,setting:t.settings,...r})})},t.uid):null},RenderMemo=react.memo(Render);RenderMemo.displayName="RenderMemo",exports.default=RenderMemo;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var jsxRuntime=require("react/jsx-runtime"),react=require("react"),AIIcon=require("./icons/AIIcon.js"),CloseIcon=require("./icons/CloseIcon.js"),ShowMoreIcon=require("./icons/ShowMoreIcon.js"),PickProduct=require("./components/PickProduct.js"),ToneAndVoice=require("./components/ToneAndVoice.js"),classNames=require("classnames"),useListenEventGenerate=require("./hooks/useListenEventGenerate.js"),useGettingGenerateRequest=require("./hooks/useGettingGenerateRequest.js");const AIContentGenerator=({...e})=>{let[t,s]=react.useState(!1),[n,
|
|
1
|
+
"use strict";var jsxRuntime=require("react/jsx-runtime"),react=require("react"),AIIcon=require("./icons/AIIcon.js"),CloseIcon=require("./icons/CloseIcon.js"),ShowMoreIcon=require("./icons/ShowMoreIcon.js"),PickProduct=require("./components/PickProduct.js"),ToneAndVoice=require("./components/ToneAndVoice.js"),classNames=require("classnames"),useListenEventGenerate=require("./hooks/useListenEventGenerate.js"),useGettingGenerateRequest=require("./hooks/useGettingGenerateRequest.js");const AIContentGenerator=({...e})=>{let[t,s]=react.useState(!1),[n,i]=react.useState(!1),[r,o]=react.useState(!1),{isGenerating:a,onGenerate:c}=useListenEventGenerate.useListenEventGenerate(e.uid),{getRequestBody:p,prompt:g,changeProductName:u,changePrompt:l}=useGettingGenerateRequest.useGettingGenerateRequest(),m=()=>{s(!t)},d=()=>{s(!1)},x=e=>{l(e.target.value)},j=react.useCallback(t=>{let s=t.detail;s?.componentUid!==e.uid?(i(!1),d()):i(!0)},[e.uid]),h=()=>{o(!r)},R=()=>{let e=p();c(e)};return react.useEffect(()=>{a||d()},[a]),react.useEffect(()=>(window.addEventListener("editor:active-component",j),()=>{window.removeEventListener("editor:active-component",j)}),[j]),jsxRuntime.jsxs("div",{className:`gp-relative ${!n&&"gp-hidden"}`,children:[jsxRuntime.jsx("div",{className:"gp-border-r-[#6a6a6a] gp-border-r gp-pr-1 gp-mr-1",children:jsxRuntime.jsxs("button",{className:"gp-p-1 gp-text-xs gp-flex gp-gap-1 gp-items-center gp-rounded-md hover:gp-bg-[#3B3B3B] gp-font-medium",onClick:m,children:[jsxRuntime.jsx(AIIcon.AIIcon,{}),"AI Content"]})}),jsxRuntime.jsxs("div",{className:classNames({"gp-hidden":!t},"gp-absolute gp-top-8 gp-right-0 gp-rounded-lg gp-bg-[#151515] gp-p-4 gp-w-[312px] !gp-max-w-[312px] !gp-cursor-default"),children:[jsxRuntime.jsxs("div",{className:"gp-flex gp-items-center gp-justify-between gp-mb-4",children:[jsxRuntime.jsx("span",{className:"gp-font-medium gp-text-sm",children:"Write with GemAI"}),jsxRuntime.jsx("button",{className:"gp-p-2 gp-cursor-pointer hover:gp-bg-[#3B3B3B] gp-rounded-md",onClick:d,children:jsxRuntime.jsx(CloseIcon.CloseIcon,{})})]}),jsxRuntime.jsxs("div",{className:"gp-mt-2",children:[jsxRuntime.jsx("div",{className:"gp-mb-4",children:jsxRuntime.jsx("span",{className:"gp-text-xs",children:"What would you like to describe here?"})}),jsxRuntime.jsx("div",{className:"gp-mb-4 gp-flex",children:jsxRuntime.jsx("textarea",{className:"gp-p-2 gp-bg-[#333333] gp-rounded-lg gp-w-full gp-text-xs gp-text-white placeholder:gp-text-[#AAAAAA] gp-resize-none focus-visible:gp-outline-none",placeholder:"e.g: Generate feature benefits",rows:4,value:g,onChange:x})}),jsxRuntime.jsx("div",{className:"gp-mb-4",children:jsxRuntime.jsxs("button",{className:"gp-flex gp-justify-center gp-items-center gp-w-full gp-bg-[#333333] gp-py-2 gp-rounded-lg gp-gap-2 gp-text-xs gp-font-medium",onClick:h,children:["Show more",jsxRuntime.jsx("span",{className:classNames({"gp-rotate-180":r}),children:jsxRuntime.jsx(ShowMoreIcon.ShowMoreIcon,{})})]})}),jsxRuntime.jsxs("div",{className:classNames({"gp-hidden":!r},"gp-mb-4 gp-gap-4 gp-flex gp-flex-col"),children:[jsxRuntime.jsx(ToneAndVoice.ToneAndVoice,{}),jsxRuntime.jsx(PickProduct.PickProduct,{changeProductName:u})]}),jsxRuntime.jsx("button",{className:"gp-rounded-lg gp-w-full gp-text-xs gp-font-medium gp-bg-gradient-to-tl gp-from-[#3C38E1] gp-to-[#874CFD] gp-py-2",onClick:R,children:a?"Generating...":"Generate"})]})]})]})};exports.AIContentGenerator=AIContentGenerator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var jsxRuntime=require("react/jsx-runtime"),react=require("react");const AIGenContentLoading=({...e})=>{let[t,n]=react.useState(!1),[r,
|
|
1
|
+
"use strict";var jsxRuntime=require("react/jsx-runtime"),react=require("react");const AIGenContentLoading=({...e})=>{let[t,n]=react.useState(!1),[r,s]=react.useState(1),a=react.useRef(null),i=react.useCallback(t=>{let r=t.detail;if(r?.sectionUid===e.uid){if("loading"===r.status){n(!0);return}if("success"===r.status){n(!1);return}}},[e.uid]);return react.useEffect(()=>{if(t){a.current=setInterval(()=>{s(e=>3===e?1:e+1)},500);return}a.current&&clearInterval(a.current)},[t]),react.useEffect(()=>(window.addEventListener("editor:ai-generate-content-status",i),()=>{window.removeEventListener("editor:ai-generate-content-status",i)}),[i]),t?jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx("div",{className:"gp-absolute gp-top-0 gp-left-0 gp-w-full gp-h-full gp-bg-white gp-bg-opacity-70 gp-flex gp-justify-center gp-items-center",children:jsxRuntime.jsxs("span",{className:"gp-font-medium",children:["Generating Content",Array.from(Array(r).keys()).map(()=>".")]})})}):null};exports.AIGenContentLoading=AIGenContentLoading;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var jsxRuntime=require("react/jsx-runtime"),react=require("react");require("zustand"),require("swr"),require("@gem-sdk/adapter-shopify"),require("swr/mutation");var useProductsQuery=require("../../../hooks/shop/use-products-query.js");require("vanilla-lazyload"),require("../../../hooks/useCartUI.js"),require("react-transition-group"),require("@gem-sdk/core"),require("classnames"),require("../../../helpers/convert.js");const PickProduct=e=>{let{data:s,isLoading:r}=useProductsQuery.useProductsQuery([]),[t,
|
|
1
|
+
"use strict";var jsxRuntime=require("react/jsx-runtime"),react=require("react");require("zustand"),require("swr"),require("@gem-sdk/adapter-shopify"),require("swr/mutation");var useProductsQuery=require("../../../hooks/shop/use-products-query.js");require("vanilla-lazyload"),require("../../../hooks/useCartUI.js"),require("react-transition-group"),require("@gem-sdk/core"),require("classnames"),require("../../../helpers/convert.js");const PickProduct=e=>{let{data:s,isLoading:r}=useProductsQuery.useProductsQuery([]),[t,a]=react.useState(),[i,u]=react.useState(!1),g=()=>{u(!i)},p=e=>{a(e),u(!1)};return react.useEffect(()=>{if(s?.products?.edges.length&&!t){let e=s.products.edges[0]?.node;e&&a({id:e?.id,name:e?.title,image:e.featuredImage?.src})}},[s,t]),react.useEffect(()=>{t&&t.name&&e.changeProductName(t.name)},[t,e]),jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs("div",{className:"gp-flex gp-flex-col gp-gap-2",children:[jsxRuntime.jsx("p",{className:"gp-py-2 gp-text-xs",children:"Product"}),jsxRuntime.jsxs("div",{className:"gp-relative",children:[r?jsxRuntime.jsx("div",{children:jsxRuntime.jsx("span",{className:"gp-text-xs",children:"Getting products..."})}):jsxRuntime.jsxs("button",{className:"gp-flex gp-gap-2 gp-items-center gp-w-full gp-p-2 gp-rounded-lg gp-bg-[#333333] gp-text-xs",onClick:g,children:[jsxRuntime.jsx("img",{className:"gp-rounded-lg gp-w-10 gp-h-10",src:t?.image,alt:"product_image"}),jsxRuntime.jsx("span",{className:"gp-truncate gp-max-w-[210px]",children:t?.name})]}),i&&jsxRuntime.jsx("div",{className:"gp-absolute gp-w-full gp-top-16 gp-left-0 gp-rounded-lg gp-bg-[#333333] gp-p-2 gp-flex gp-flex-col gp-gap-2 gp-z-10",children:s?.products?.edges.map(e=>jsxRuntime.jsxs("button",{className:"gp-flex gp-p-2 hover:gp-bg-[#3B3B3B] gp-rounded-lg gp-cursor-pointer gp-gap-2 gp-items-center",onClick:()=>{p({id:e.node?.id,name:e.node?.title,image:e.node?.featuredImage?.src})},children:[jsxRuntime.jsx("img",{className:"gp-rounded-lg gp-w-10 gp-h-10",src:e.node?.featuredImage?.src,alt:"product_image"}),jsxRuntime.jsx("span",{className:"gp-truncate gp-max-w-[210px] gp-text-xs",children:e.node?.title})]},e.node?.id))})]})]})})};exports.PickProduct=PickProduct;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var jsxRuntime=require("react/jsx-runtime"),react=require("react"),DropdownIcon=require("../icons/DropdownIcon.js"),classNames=require("classnames");const ToneAndVoice=()=>{let e=["Persuasive","Friendly","Professional","Casual"],[s,
|
|
1
|
+
"use strict";var jsxRuntime=require("react/jsx-runtime"),react=require("react"),DropdownIcon=require("../icons/DropdownIcon.js"),classNames=require("classnames");const ToneAndVoice=()=>{let e=["Persuasive","Friendly","Professional","Casual"],[s,n]=react.useState(e[0]),[p,i]=react.useState(!1),t=()=>{i(!p)},l=e=>{n(e),i(!1)};return jsxRuntime.jsx("div",{children:jsxRuntime.jsxs("div",{className:"gp-flex gp-flex-col gp-gap-2",children:[jsxRuntime.jsx("p",{className:"gp-py-2 gp-text-xs",children:"Tone and Voice"}),jsxRuntime.jsxs("div",{className:"gp-relative",children:[jsxRuntime.jsxs("button",{className:"gp-flex gp-justify-between gp-items-center gp-w-full gp-p-2 gp-rounded-lg gp-bg-[#333333] gp-text-xs",onClick:t,children:[s,jsxRuntime.jsx(DropdownIcon.DropdownIcon,{})]}),p?jsxRuntime.jsx("div",{className:"gp-absolute gp-w-full gp-top-10 gp-left-0 gp-rounded-lg gp-bg-[#333333] gp-p-2 gp-flex gp-flex-col gp-gap-2 gp-z-10",children:e.map(e=>jsxRuntime.jsxs("button",{className:"gp-flex gp-p-2 hover:gp-bg-[#3B3B3B] gp-rounded-lg gp-cursor-pointer gp-gap-3 gp-items-center",onClick:()=>l(e),children:[jsxRuntime.jsx("div",{className:classNames({"gp-invisible":s!==e}),children:jsxRuntime.jsx(DropdownIcon.TickIcon,{})}),jsxRuntime.jsx("span",{className:"gp-text-xs",children:e})]},e))}):null]})]})})};exports.ToneAndVoice=ToneAndVoice;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var jsxRuntime=require("react/jsx-runtime"),react=require("react"),zustand=require("zustand");const BuilderContext=react.createContext(null),createBuilderProvider=(e,r)=>zustand.createStore((
|
|
1
|
+
"use strict";var jsxRuntime=require("react/jsx-runtime"),react=require("react"),zustand=require("zustand");const BuilderContext=react.createContext(null),createBuilderProvider=(e,r,t)=>zustand.createStore((u,i)=>({state:e,isPostPurchase:r,isPreview:t,getItem:e=>i().state[e],getIsPostPurchase:()=>i().isPostPurchase,getIsPreview:()=>i().isPreview})),BuilderProvider=({children:e,state:r,isPostPurchase:t,isPreview:u,lazy:i,priority:s,...d})=>{let o=i?react.Suspense:react.Fragment,a=createBuilderProvider(r,t,u);return jsxRuntime.jsx(o,{children:jsxRuntime.jsx(BuilderContext.Provider,{...d,value:a,children:e})})},useBuilderStore=(e,r)=>{let t=react.useContext(BuilderContext);if(!t)throw Error("useBuilderStore must be used within a BuilderProvider");return zustand.useStore(t,e,r)};exports.BuilderProvider=BuilderProvider,exports.useBuilderStore=useBuilderStore;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";const ThemePageDocument=`
|
|
2
|
-
query ThemePage($themePageId: ID
|
|
2
|
+
query ThemePage($themePageId: ID!, $first: Int, $where: ThemeStyleWhereInput) {
|
|
3
3
|
themePage(id: $themePageId) {
|
|
4
4
|
id
|
|
5
5
|
name
|
|
@@ -12,10 +12,17 @@
|
|
|
12
12
|
id
|
|
13
13
|
deletedAt
|
|
14
14
|
}
|
|
15
|
-
|
|
15
|
+
theme {
|
|
16
16
|
id
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
themeStyles(first: $first, where: $where) {
|
|
18
|
+
edges {
|
|
19
|
+
node {
|
|
20
|
+
data
|
|
21
|
+
id
|
|
22
|
+
name
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
19
26
|
}
|
|
20
27
|
}
|
|
21
28
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var getResonsiveValue=require("./get-resonsive-value.js");const removeNullUndefined=e=>Object.entries(e).reduce((e,[t,o])=>null==o?e:{...e,[t]:o},{}),makeStyleKey=e=>[e,`hvr-${e}`,`focus-${e}`,`${e}-tablet`,`hvr-${e}-tablet`,`focus-${e}-tablet`,`${e}-mobile`,`hvr-${e}-mobile`,`focus-${e}-mobile`].map(e=>`--${e}`),makeStyle=e=>removeNullUndefined(Object.fromEntries(Object.entries(e).map(([e,t])=>[`--${e}`,t]))),makeStyleState=(e,t)=>t?{[`--${e}`]:t?.normal,[`--hvr-${e}`]:t?.hover,[`--focus-${e}`]:t?.focus}:{},makeStyleResponsiveState=(e,t)=>t?{[`--${e}`]:t?.desktop?.normal,[`--hvr-${e}`]:t?.desktop?.hover,[`--focus-${e}`]:t?.desktop?.focus,[`--${e}-tablet`]:t?.tablet?.normal,[`--hvr-${e}-tablet`]:t?.tablet?.hover,[`--focus-${e}-tablet`]:t?.tablet?.focus,[`--${e}-mobile`]:t?.mobile?.normal,[`--hvr-${e}-mobile`]:t?.mobile?.hover,[`--focus-${e}-mobile`]:t?.mobile?.focus}:{},makeStyleResponsive=(e,t,o)=>({[`--${e}`]:o?`${t?.desktop}${o}`:t?.desktop,[`--${e}-tablet`]:o?`${t?.tablet}${o}`:t?.tablet,[`--${e}-mobile`]:o?`${t?.mobile}${o}`:t?.mobile}),makeStyleResponsiveByScreen=(e,t,o)=>({[`--${e}`]:o?`${getResonsiveValue.getResponsiveValueByScreen(t,"desktop")}${o}`:getResonsiveValue.getResponsiveValueByScreen(t,"desktop"),[`--${e}-tablet`]:o?`${getResonsiveValue.getResponsiveValueByScreen(t,"tablet")}${o}`:getResonsiveValue.getResponsiveValueByScreen(t,"tablet"),[`--${e}-mobile`]:o?`${getResonsiveValue.getResponsiveValueByScreen(t,"mobile")}${o}`:getResonsiveValue.getResponsiveValueByScreen(t,"mobile")}),makeWidth=(e,t)=>{let o=(e,t,o)=>{let s=getResonsiveValue.getResponsiveValueByScreen(t,e),l=o?.[e]===void 0?o?.desktop:o?.[e];return l?"100%":!1===l?s??s:s||"auto"};return{desktop:o("desktop",e,t),tablet:o("tablet",e,t),mobile:o("mobile",e,t)}},makeGlobalSizeWidthResponsive=e=>({"--w":e?.desktop?.width,"--w-tablet":e?.tablet?.width,"--w-mobile":e?.mobile?.width}),makeGlobalSizeHeightResponsive=e=>({"--h":e?.desktop?.height,"--h-tablet":e?.tablet?.height,"--h-mobile":e?.mobile?.height}),makeHeight=(e,t)=>{let o=(e,t,o)=>{let s=t?.[e],l=o?.[e];return l?"auto":!1===l?s??s:s};return{desktop:o("desktop",e,t),tablet:o("tablet",e,t),mobile:o("mobile",e,t)}},makeAspectRatio=(e,t,o)=>{let s={},l=["desktop","mobile","tablet"];return l.forEach(l=>{let a=getResonsiveValue.getResponsiveValueByScreen(e,l);"none"!==a&&(s={...s,[l]:"custom"!==a?a:`${getResonsiveValue.getResponsiveValueByScreen(t,"desktop")}/${getResonsiveValue.getResponsiveValueByScreen(o,"desktop")}`})}),s},makeLineClamp=(e,t)=>{let o=(e,t,o)=>{let s=t
|
|
1
|
+
"use strict";var getResonsiveValue=require("./get-resonsive-value.js");const removeNullUndefined=e=>Object.entries(e).reduce((e,[t,o])=>null==o?e:{...e,[t]:o},{}),makeStyleKey=e=>[e,`hvr-${e}`,`focus-${e}`,`${e}-tablet`,`hvr-${e}-tablet`,`focus-${e}-tablet`,`${e}-mobile`,`hvr-${e}-mobile`,`focus-${e}-mobile`].map(e=>`--${e}`),makeStyle=e=>removeNullUndefined(Object.fromEntries(Object.entries(e).map(([e,t])=>[`--${e}`,t]))),makeStyleState=(e,t)=>t?{[`--${e}`]:t?.normal,[`--hvr-${e}`]:t?.hover,[`--focus-${e}`]:t?.focus}:{},makeStyleResponsiveState=(e,t)=>t?{[`--${e}`]:t?.desktop?.normal,[`--hvr-${e}`]:t?.desktop?.hover,[`--focus-${e}`]:t?.desktop?.focus,[`--${e}-tablet`]:t?.tablet?.normal,[`--hvr-${e}-tablet`]:t?.tablet?.hover,[`--focus-${e}-tablet`]:t?.tablet?.focus,[`--${e}-mobile`]:t?.mobile?.normal,[`--hvr-${e}-mobile`]:t?.mobile?.hover,[`--focus-${e}-mobile`]:t?.mobile?.focus}:{},makeStyleResponsive=(e,t,o)=>({[`--${e}`]:o?`${t?.desktop}${o}`:t?.desktop,[`--${e}-tablet`]:o?`${t?.tablet}${o}`:t?.tablet,[`--${e}-mobile`]:o?`${t?.mobile}${o}`:t?.mobile}),makeStyleResponsiveByScreen=(e,t,o)=>({[`--${e}`]:o?`${getResonsiveValue.getResponsiveValueByScreen(t,"desktop")}${o}`:getResonsiveValue.getResponsiveValueByScreen(t,"desktop"),[`--${e}-tablet`]:o?`${getResonsiveValue.getResponsiveValueByScreen(t,"tablet")}${o}`:getResonsiveValue.getResponsiveValueByScreen(t,"tablet"),[`--${e}-mobile`]:o?`${getResonsiveValue.getResponsiveValueByScreen(t,"mobile")}${o}`:getResonsiveValue.getResponsiveValueByScreen(t,"mobile")}),makeWidth=(e,t)=>{let o=(e,t,o)=>{let s=getResonsiveValue.getResponsiveValueByScreen(t,e),l=o?.[e]===void 0?o?.desktop:o?.[e];return l?"100%":!1===l?s??s:s||"auto"};return{desktop:o("desktop",e,t),tablet:o("tablet",e,t),mobile:o("mobile",e,t)}},makeGlobalSizeWidthResponsive=e=>({"--w":e?.desktop?.width,"--w-tablet":e?.tablet?.width,"--w-mobile":e?.mobile?.width}),makeGlobalSizeHeightResponsive=e=>({"--h":e?.desktop?.height,"--h-tablet":e?.tablet?.height,"--h-mobile":e?.mobile?.height}),makeHeight=(e,t)=>{let o=(e,t,o)=>{let s=t?.[e],l=o?.[e];return l?"auto":!1===l?s??s:s};return{desktop:o("desktop",e,t),tablet:o("tablet",e,t),mobile:o("mobile",e,t)}},makeAspectRatio=(e,t,o)=>{let s={},l=["desktop","mobile","tablet"];return l.forEach(l=>{let a=getResonsiveValue.getResponsiveValueByScreen(e,l);"none"!==a&&(s={...s,[l]:"custom"!==a?a:`${getResonsiveValue.getResponsiveValueByScreen(t,"desktop")}/${getResonsiveValue.getResponsiveValueByScreen(o,"desktop")}`})}),s},makeLineClamp=(e,t)=>{let o=(e,t,o)=>{let s=getResonsiveValue.getResponsiveValueByScreen(t,e),l=getResonsiveValue.getResponsiveValueByScreen(o,e);return l||void 0===l?s:"unset"};return{desktop:o("desktop",e,t),tablet:o("tablet",e,t),mobile:o("mobile",e,t)}};exports.makeAspectRatio=makeAspectRatio,exports.makeGlobalSizeHeightResponsive=makeGlobalSizeHeightResponsive,exports.makeGlobalSizeWidthResponsive=makeGlobalSizeWidthResponsive,exports.makeHeight=makeHeight,exports.makeLineClamp=makeLineClamp,exports.makeStyle=makeStyle,exports.makeStyleKey=makeStyleKey,exports.makeStyleResponsive=makeStyleResponsive,exports.makeStyleResponsiveByScreen=makeStyleResponsiveByScreen,exports.makeStyleResponsiveState=makeStyleResponsiveState,exports.makeStyleState=makeStyleState,exports.makeWidth=makeWidth,exports.removeNullUndefined=removeNullUndefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as r,Fragment as t}from"react/jsx-runtime";import{memo as n,useMemo as o}from"react";import{ErrorBoundary as i}from"react-error-boundary";import{useBuilderComponent as s}from"../contexts/BuilderComponent.js";import{useBuilderStore as d}from"../contexts/BuilderContext.js";import l from"./ComponentWrapper.js";import a from"./RenderSection.js";let Render=({uid:n,...m})=>{let p=d(e=>e.getItem(n)),c=s(p?.tag),u=d(e=>e.getIsPostPurchase()),g=o(()=>u?"POST_PURCHASE":void 0,[u]);return p?p?.type==="section"?e(a,{sectionId:p.uid}):e(i,{fallbackRender:({error:n,resetErrorBoundary:o})=>r(t,{children:[e("span",{"aria-label":"Error message",children:n.message}),e("button",{type:"button",onClick:o,children:"Try again"})]}),children:e(l,{...p,pageType:
|
|
1
|
+
import{jsx as e,jsxs as r,Fragment as t}from"react/jsx-runtime";import{memo as n,useMemo as o}from"react";import{ErrorBoundary as i}from"react-error-boundary";import{useBuilderComponent as s}from"../contexts/BuilderComponent.js";import{useBuilderStore as d}from"../contexts/BuilderContext.js";import l from"./ComponentWrapper.js";import a from"./RenderSection.js";let Render=({uid:n,...m})=>{let p=d(e=>e.getItem(n)),c=s(p?.tag),u=d(e=>e.getIsPostPurchase()),g=d(e=>e.getIsPreview()),h=o(()=>u?"POST_PURCHASE":void 0,[u]);return p?p?.type==="section"?e(a,{sectionId:p.uid}):e(i,{fallbackRender:({error:n,resetErrorBoundary:o})=>r(t,{children:[e("span",{"aria-label":"Error message",children:n.message}),e("button",{type:"button",onClick:o,children:"Try again"})]}),children:e(l,{...p,pageType:h,children:p?.childrens?.length?e(c,{builderProps:{uid:n,builderData:p,isPreview:g},styles:p.styles,setting:p.settings,...m,children:p.childrens.map(r=>e(RenderMemo,{uid:r},r))}):e(c,{builderProps:{uid:n,builderData:p,isPreview:g},styles:p.styles,setting:p.settings,...m})})},p.uid):null},RenderMemo=n(Render);RenderMemo.displayName="RenderMemo";export{RenderMemo as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as
|
|
1
|
+
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as p,useCallback as o,useEffect as n}from"react";import{AIIcon as r}from"./icons/AIIcon.js";import{CloseIcon as g}from"./icons/CloseIcon.js";import{ShowMoreIcon as i}from"./icons/ShowMoreIcon.js";import{PickProduct as s}from"./components/PickProduct.js";import{ToneAndVoice as a}from"./components/ToneAndVoice.js";import l from"classnames";import{useListenEventGenerate as d}from"./hooks/useListenEventGenerate.js";import{useGettingGenerateRequest as m}from"./hooks/useGettingGenerateRequest.js";let AIContentGenerator=({...c})=>{let[u,h]=p(!1),[f,x]=p(!1),[b,v]=p(!1),{isGenerating:N,onGenerate:w}=d(c.uid),{getRequestBody:A,prompt:C,changeProductName:j,changePrompt:G}=m(),k=()=>{h(!u)},I=()=>{h(!1)},B=e=>{G(e.target.value)},y=o(e=>{let t=e.detail;t?.componentUid!==c.uid?(x(!1),I()):x(!0)},[c.uid]),E=()=>{v(!b)},L=()=>{let e=A();w(e)};return n(()=>{N||I()},[N]),n(()=>(window.addEventListener("editor:active-component",y),()=>{window.removeEventListener("editor:active-component",y)}),[y]),e("div",{className:`gp-relative ${!f&&"gp-hidden"}`,children:[t("div",{className:"gp-border-r-[#6a6a6a] gp-border-r gp-pr-1 gp-mr-1",children:e("button",{className:"gp-p-1 gp-text-xs gp-flex gp-gap-1 gp-items-center gp-rounded-md hover:gp-bg-[#3B3B3B] gp-font-medium",onClick:k,children:[t(r,{}),"AI Content"]})}),e("div",{className:l({"gp-hidden":!u},"gp-absolute gp-top-8 gp-right-0 gp-rounded-lg gp-bg-[#151515] gp-p-4 gp-w-[312px] !gp-max-w-[312px] !gp-cursor-default"),children:[e("div",{className:"gp-flex gp-items-center gp-justify-between gp-mb-4",children:[t("span",{className:"gp-font-medium gp-text-sm",children:"Write with GemAI"}),t("button",{className:"gp-p-2 gp-cursor-pointer hover:gp-bg-[#3B3B3B] gp-rounded-md",onClick:I,children:t(g,{})})]}),e("div",{className:"gp-mt-2",children:[t("div",{className:"gp-mb-4",children:t("span",{className:"gp-text-xs",children:"What would you like to describe here?"})}),t("div",{className:"gp-mb-4 gp-flex",children:t("textarea",{className:"gp-p-2 gp-bg-[#333333] gp-rounded-lg gp-w-full gp-text-xs gp-text-white placeholder:gp-text-[#AAAAAA] gp-resize-none focus-visible:gp-outline-none",placeholder:"e.g: Generate feature benefits",rows:4,value:C,onChange:B})}),t("div",{className:"gp-mb-4",children:e("button",{className:"gp-flex gp-justify-center gp-items-center gp-w-full gp-bg-[#333333] gp-py-2 gp-rounded-lg gp-gap-2 gp-text-xs gp-font-medium",onClick:E,children:["Show more",t("span",{className:l({"gp-rotate-180":b}),children:t(i,{})})]})}),e("div",{className:l({"gp-hidden":!b},"gp-mb-4 gp-gap-4 gp-flex gp-flex-col"),children:[t(a,{}),t(s,{changeProductName:j})]}),t("button",{className:"gp-rounded-lg gp-w-full gp-text-xs gp-font-medium gp-bg-gradient-to-tl gp-from-[#3C38E1] gp-to-[#874CFD] gp-py-2",onClick:L,children:N?"Generating...":"Generate"})]})]})]})};export{AIContentGenerator};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as
|
|
1
|
+
import{jsx as e,Fragment as t,jsxs as n}from"react/jsx-runtime";import{useState as r,useRef as i,useCallback as a,useEffect as s}from"react";let AIGenContentLoading=({...l})=>{let[o,u]=r(!1),[c,g]=r(1),d=i(null),p=a(e=>{let t=e.detail;if(t?.sectionUid===l.uid){if("loading"===t.status){u(!0);return}if("success"===t.status){u(!1);return}}},[l.uid]);return s(()=>{if(o){d.current=setInterval(()=>{g(e=>3===e?1:e+1)},500);return}d.current&&clearInterval(d.current)},[o]),s(()=>(window.addEventListener("editor:ai-generate-content-status",p),()=>{window.removeEventListener("editor:ai-generate-content-status",p)}),[p]),o?e(t,{children:e("div",{className:"gp-absolute gp-top-0 gp-left-0 gp-w-full gp-h-full gp-bg-white gp-bg-opacity-70 gp-flex gp-justify-center gp-items-center",children:n("span",{className:"gp-font-medium",children:["Generating Content",Array.from(Array(c).keys()).map(()=>".")]})})}):null};export{AIGenContentLoading};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{jsx as e,Fragment as p,jsxs as t}from"react/jsx-runtime";import{useState as r,useEffect as g}from"react";import"zustand";import"swr";import"@gem-sdk/adapter-shopify";import"swr/mutation";import{useProductsQuery as a}from"../../../hooks/shop/use-products-query.js";import"vanilla-lazyload";import"../../../hooks/useCartUI.js";import"react-transition-group";import"@gem-sdk/core";import"classnames";import"../../../helpers/convert.js";let PickProduct=s=>{let{data:o,isLoading:d}=a([]),[i,l]=r(),[c,m]=r(!1),n=()=>{m(!c)},u=e=>{l(e),m(!1)};return g(()=>{if(o?.products?.edges.length&&!i){let e=o.products.edges[0]?.node;e&&l({id:e?.id,name:e?.title,image:e.featuredImage?.src})}},[o,i]),g(()=>{i&&i.name&&s.changeProductName(i.name)},[i,s]),e(p,{children:t("div",{className:"gp-flex gp-flex-col gp-gap-2",children:[e("p",{className:"gp-py-2 gp-text-xs",children:"Product"}),t("div",{className:"gp-relative",children:[d?e("div",{children:e("span",{className:"gp-text-xs",children:"Getting products..."})}):t("button",{className:"gp-flex gp-gap-2 gp-items-center gp-w-full gp-p-2 gp-rounded-lg gp-bg-[#333333] gp-text-xs",onClick:n,children:[e("img",{className:"gp-rounded-lg gp-w-10 gp-h-10",src:i?.image,alt:"product_image"}),e("span",{className:"gp-truncate gp-max-w-[210px]",children:i?.name})]}),c&&e("div",{className:"gp-absolute gp-w-full gp-top-16 gp-left-0 gp-rounded-lg gp-bg-[#333333] gp-p-2 gp-flex gp-flex-col gp-gap-2 gp-z-10",children:o?.products?.edges.map(p=>t("button",{className:"gp-flex gp-p-2 hover:gp-bg-[#3B3B3B] gp-rounded-lg gp-cursor-pointer gp-gap-2 gp-items-center",onClick:()=>{u({id:p.node?.id,name:p.node?.title,image:p.node?.featuredImage?.src})},children:[e("img",{className:"gp-rounded-lg gp-w-10 gp-h-10",src:p.node?.featuredImage?.src,alt:"product_image"}),e("span",{className:"gp-truncate gp-max-w-[210px] gp-text-xs",children:p.node?.title})]},p.node?.id))})]})]})})};export{PickProduct};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as e,jsxs as p}from"react/jsx-runtime";import{useState as l}from"react";import{DropdownIcon as g,TickIcon as n}from"../icons/DropdownIcon.js";import r from"classnames";let ToneAndVoice=()=>{let s=["Persuasive","Friendly","Professional","Casual"],[i,o]=l(s[0]),[a,c]=l(!1),t=()=>{c(!a)},d=e=>{o(e),c(!1)};return e("div",{children:p("div",{className:"gp-flex gp-flex-col gp-gap-2",children:[e("p",{className:"gp-py-2 gp-text-xs",children:"Tone and Voice"}),p("div",{className:"gp-relative",children:[p("button",{className:"gp-flex gp-justify-between gp-items-center gp-w-full gp-p-2 gp-rounded-lg gp-bg-[#333333] gp-text-xs",onClick:t,children:[i,e(g,{})]}),a?e("div",{className:"gp-absolute gp-w-full gp-top-10 gp-left-0 gp-rounded-lg gp-bg-[#333333] gp-p-2 gp-flex gp-flex-col gp-gap-2 gp-z-10",children:s.map(l=>p("button",{className:"gp-flex gp-p-2 hover:gp-bg-[#3B3B3B] gp-rounded-lg gp-cursor-pointer gp-gap-3 gp-items-center",onClick:()=>d(l),children:[e("div",{className:r({"gp-invisible":i!==l}),children:e(n,{})}),e("span",{className:"gp-text-xs",children:l})]},l))}):null]})]})})};export{ToneAndVoice};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{useContext as r,createContext as t,Suspense as i,Fragment as u}from"react";import{useStore as o,createStore as d}from"zustand";let BuilderContext=t(null),createBuilderProvider=(e,r)=>d((
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{useContext as r,createContext as t,Suspense as i,Fragment as u}from"react";import{useStore as o,createStore as d}from"zustand";let BuilderContext=t(null),createBuilderProvider=(e,r,t)=>d((i,u)=>({state:e,isPostPurchase:r,isPreview:t,getItem:e=>u().state[e],getIsPostPurchase:()=>u().isPostPurchase,getIsPreview:()=>u().isPreview})),BuilderProvider=({children:r,state:t,isPostPurchase:o,isPreview:d,lazy:s,priority:l,...P})=>{let a=s?i:u,n=createBuilderProvider(t,o,d);return e(a,{children:e(BuilderContext.Provider,{...P,value:n,children:r})})},useBuilderStore=(e,t)=>{let i=r(BuilderContext);if(!i)throw Error("useBuilderStore must be used within a BuilderProvider");return o(i,e,t)};export{BuilderProvider,useBuilderStore};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
let ThemePageDocument=`
|
|
2
|
-
query ThemePage($themePageId: ID
|
|
2
|
+
query ThemePage($themePageId: ID!, $first: Int, $where: ThemeStyleWhereInput) {
|
|
3
3
|
themePage(id: $themePageId) {
|
|
4
4
|
id
|
|
5
5
|
name
|
|
@@ -12,10 +12,17 @@ let ThemePageDocument=`
|
|
|
12
12
|
id
|
|
13
13
|
deletedAt
|
|
14
14
|
}
|
|
15
|
-
|
|
15
|
+
theme {
|
|
16
16
|
id
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
themeStyles(first: $first, where: $where) {
|
|
18
|
+
edges {
|
|
19
|
+
node {
|
|
20
|
+
data
|
|
21
|
+
id
|
|
22
|
+
name
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
19
26
|
}
|
|
20
27
|
}
|
|
21
28
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getResponsiveValueByScreen as e}from"./get-resonsive-value.js";let removeNullUndefined=e=>Object.entries(e).reduce((e,[t,l])=>null==l?e:{...e,[t]:l},{}),makeStyleKey=e=>[e,`hvr-${e}`,`focus-${e}`,`${e}-tablet`,`hvr-${e}-tablet`,`focus-${e}-tablet`,`${e}-mobile`,`hvr-${e}-mobile`,`focus-${e}-mobile`].map(e=>`--${e}`),makeStyle=e=>removeNullUndefined(Object.fromEntries(Object.entries(e).map(([e,t])=>[`--${e}`,t]))),makeStyleState=(e,t)=>t?{[`--${e}`]:t?.normal,[`--hvr-${e}`]:t?.hover,[`--focus-${e}`]:t?.focus}:{},makeStyleResponsiveState=(e,t)=>t?{[`--${e}`]:t?.desktop?.normal,[`--hvr-${e}`]:t?.desktop?.hover,[`--focus-${e}`]:t?.desktop?.focus,[`--${e}-tablet`]:t?.tablet?.normal,[`--hvr-${e}-tablet`]:t?.tablet?.hover,[`--focus-${e}-tablet`]:t?.tablet?.focus,[`--${e}-mobile`]:t?.mobile?.normal,[`--hvr-${e}-mobile`]:t?.mobile?.hover,[`--focus-${e}-mobile`]:t?.mobile?.focus}:{},makeStyleResponsive=(e,t,l)=>({[`--${e}`]:l?`${t?.desktop}${l}`:t?.desktop,[`--${e}-tablet`]:l?`${t?.tablet}${l}`:t?.tablet,[`--${e}-mobile`]:l?`${t?.mobile}${l}`:t?.mobile}),makeStyleResponsiveByScreen=(t,l,o)=>({[`--${t}`]:o?`${e(l,"desktop")}${o}`:e(l,"desktop"),[`--${t}-tablet`]:o?`${e(l,"tablet")}${o}`:e(l,"tablet"),[`--${t}-mobile`]:o?`${e(l,"mobile")}${o}`:e(l,"mobile")}),makeWidth=(t,l)=>{let o=(t,l,o)=>{let a=e(l,t),i=o?.[t]===void 0?o?.desktop:o?.[t];return i?"100%":!1===i?a??a:a||"auto"};return{desktop:o("desktop",t,l),tablet:o("tablet",t,l),mobile:o("mobile",t,l)}},makeGlobalSizeWidthResponsive=e=>({"--w":e?.desktop?.width,"--w-tablet":e?.tablet?.width,"--w-mobile":e?.mobile?.width}),makeGlobalSizeHeightResponsive=e=>({"--h":e?.desktop?.height,"--h-tablet":e?.tablet?.height,"--h-mobile":e?.mobile?.height}),makeHeight=(e,t)=>{let l=(e,t,l)=>{let o=t?.[e],a=l?.[e];return a?"auto":!1===a?o??o:o};return{desktop:l("desktop",e,t),tablet:l("tablet",e,t),mobile:l("mobile",e,t)}},makeAspectRatio=(t,l,o)=>{let a={},i=["desktop","mobile","tablet"];return i.forEach(i=>{let m=e(t,i);"none"!==m&&(a={...a,[i]:"custom"!==m?m:`${e(l,"desktop")}/${e(o,"desktop")}`})}),a},makeLineClamp=(
|
|
1
|
+
import{getResponsiveValueByScreen as e}from"./get-resonsive-value.js";let removeNullUndefined=e=>Object.entries(e).reduce((e,[t,l])=>null==l?e:{...e,[t]:l},{}),makeStyleKey=e=>[e,`hvr-${e}`,`focus-${e}`,`${e}-tablet`,`hvr-${e}-tablet`,`focus-${e}-tablet`,`${e}-mobile`,`hvr-${e}-mobile`,`focus-${e}-mobile`].map(e=>`--${e}`),makeStyle=e=>removeNullUndefined(Object.fromEntries(Object.entries(e).map(([e,t])=>[`--${e}`,t]))),makeStyleState=(e,t)=>t?{[`--${e}`]:t?.normal,[`--hvr-${e}`]:t?.hover,[`--focus-${e}`]:t?.focus}:{},makeStyleResponsiveState=(e,t)=>t?{[`--${e}`]:t?.desktop?.normal,[`--hvr-${e}`]:t?.desktop?.hover,[`--focus-${e}`]:t?.desktop?.focus,[`--${e}-tablet`]:t?.tablet?.normal,[`--hvr-${e}-tablet`]:t?.tablet?.hover,[`--focus-${e}-tablet`]:t?.tablet?.focus,[`--${e}-mobile`]:t?.mobile?.normal,[`--hvr-${e}-mobile`]:t?.mobile?.hover,[`--focus-${e}-mobile`]:t?.mobile?.focus}:{},makeStyleResponsive=(e,t,l)=>({[`--${e}`]:l?`${t?.desktop}${l}`:t?.desktop,[`--${e}-tablet`]:l?`${t?.tablet}${l}`:t?.tablet,[`--${e}-mobile`]:l?`${t?.mobile}${l}`:t?.mobile}),makeStyleResponsiveByScreen=(t,l,o)=>({[`--${t}`]:o?`${e(l,"desktop")}${o}`:e(l,"desktop"),[`--${t}-tablet`]:o?`${e(l,"tablet")}${o}`:e(l,"tablet"),[`--${t}-mobile`]:o?`${e(l,"mobile")}${o}`:e(l,"mobile")}),makeWidth=(t,l)=>{let o=(t,l,o)=>{let a=e(l,t),i=o?.[t]===void 0?o?.desktop:o?.[t];return i?"100%":!1===i?a??a:a||"auto"};return{desktop:o("desktop",t,l),tablet:o("tablet",t,l),mobile:o("mobile",t,l)}},makeGlobalSizeWidthResponsive=e=>({"--w":e?.desktop?.width,"--w-tablet":e?.tablet?.width,"--w-mobile":e?.mobile?.width}),makeGlobalSizeHeightResponsive=e=>({"--h":e?.desktop?.height,"--h-tablet":e?.tablet?.height,"--h-mobile":e?.mobile?.height}),makeHeight=(e,t)=>{let l=(e,t,l)=>{let o=t?.[e],a=l?.[e];return a?"auto":!1===a?o??o:o};return{desktop:l("desktop",e,t),tablet:l("tablet",e,t),mobile:l("mobile",e,t)}},makeAspectRatio=(t,l,o)=>{let a={},i=["desktop","mobile","tablet"];return i.forEach(i=>{let m=e(t,i);"none"!==m&&(a={...a,[i]:"custom"!==m?m:`${e(l,"desktop")}/${e(o,"desktop")}`})}),a},makeLineClamp=(t,l)=>{let o=(t,l,o)=>{let a=e(l,t),i=e(o,t);return i||void 0===i?a:"unset"};return{desktop:o("desktop",t,l),tablet:o("tablet",t,l),mobile:o("mobile",t,l)}};export{makeAspectRatio,makeGlobalSizeHeightResponsive,makeGlobalSizeWidthResponsive,makeHeight,makeLineClamp,makeStyle,makeStyleKey,makeStyleResponsive,makeStyleResponsiveByScreen,makeStyleResponsiveState,makeStyleState,makeWidth,removeNullUndefined};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -6590,6 +6590,7 @@ type BaseProps<Setting = unknown, Style = unknown, Advanced = AdvancedType> = {
|
|
|
6590
6590
|
/** Unique id of component */
|
|
6591
6591
|
uid?: string;
|
|
6592
6592
|
builderData?: BlockEntity;
|
|
6593
|
+
isPreview?: boolean;
|
|
6593
6594
|
};
|
|
6594
6595
|
styles?: Style;
|
|
6595
6596
|
setting?: Setting;
|
|
@@ -27258,8 +27259,10 @@ type BuilderContextProps = {
|
|
|
27258
27259
|
getItem: (id: string) => BuilderEntity | undefined;
|
|
27259
27260
|
isPostPurchase?: boolean;
|
|
27260
27261
|
getIsPostPurchase: () => boolean | undefined;
|
|
27262
|
+
isPreview?: boolean;
|
|
27263
|
+
getIsPreview: () => boolean | undefined;
|
|
27261
27264
|
};
|
|
27262
|
-
type BuilderProviderProps = Pick<BuilderContextProps, 'state' | 'isPostPurchase'> & {
|
|
27265
|
+
type BuilderProviderProps = Pick<BuilderContextProps, 'state' | 'isPostPurchase' | 'isPreview'> & {
|
|
27263
27266
|
children: React.ReactNode;
|
|
27264
27267
|
lazy?: boolean;
|
|
27265
27268
|
priority?: boolean;
|
|
@@ -27812,14 +27815,22 @@ declare const LibraryTemplateDocument = "\n query LibraryTemplate($libraryTem
|
|
|
27812
27815
|
|
|
27813
27816
|
type ThemePageQueryVariables = Exact<{
|
|
27814
27817
|
themePageId: Scalars['ID'];
|
|
27818
|
+
first?: InputMaybe<Scalars['Int']>;
|
|
27819
|
+
where?: InputMaybe<ThemeStyleWhereInput>;
|
|
27815
27820
|
}>;
|
|
27816
27821
|
type ThemePageQueryResponse = {
|
|
27817
27822
|
themePage?: Maybe<Pick<ThemePage, 'id' | 'name' | 'handle' | 'isMobile' | 'sectionPosition'> & {
|
|
27818
27823
|
pageSections?: Maybe<Array<Maybe<Pick<PageSection, 'cid' | 'component' | 'id' | 'deletedAt'>>>>;
|
|
27819
|
-
|
|
27824
|
+
theme?: Maybe<Pick<Theme, 'id'> & {
|
|
27825
|
+
themeStyles?: Maybe<{
|
|
27826
|
+
edges?: Maybe<Array<Maybe<{
|
|
27827
|
+
node?: Maybe<Pick<ThemeStyle, 'data' | 'id' | 'name'>>;
|
|
27828
|
+
}>>>;
|
|
27829
|
+
}>;
|
|
27830
|
+
}>;
|
|
27820
27831
|
}>;
|
|
27821
27832
|
};
|
|
27822
|
-
declare const ThemePageDocument = "\n query ThemePage($themePageId: ID
|
|
27833
|
+
declare const ThemePageDocument = "\n query ThemePage($themePageId: ID!, $first: Int, $where: ThemeStyleWhereInput) {\n themePage(id: $themePageId) {\n id\n name\n handle\n isMobile\n sectionPosition\n pageSections {\n cid\n component\n id\n deletedAt\n }\n theme {\n id\n themeStyles(first: $first, where: $where) {\n edges {\n node {\n data\n id\n name\n }\n }\n }\n }\n }\n}\n ";
|
|
27823
27834
|
|
|
27824
27835
|
type SaleFunnelDiscountsQueryVariables = Exact<{
|
|
27825
27836
|
where?: InputMaybe<SaleFunnelDiscountWhereInput>;
|