@gem-sdk/core 12.0.0-dev.100 → 12.0.0-dev.103
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/ComponentToolbarPreview.js +1 -1
- package/dist/cjs/helpers/make-style.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/esm/components/ComponentToolbarPreview.js +1 -1
- package/dist/esm/helpers/make-style.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/types/index.d.ts +3 -12
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),react=require("react");require("zustand");var BuilderPreviewContext=require("../contexts/BuilderPreviewContext.js"),PageContext=require("../contexts/PageContext.js"),CreateThemeSection=require("./theme-section/CreateThemeSection.js"),Tooltip=require("./toolbar/Tooltip.js"),SectionErrorBanner=require("./toolbar/SectionErrorBanner.js"),ThemeSectionStatus=require("./theme-section/ThemeSectionStatus.js"),Resize=require("./resize/Resize.js"),useToolbarPostPurchase=require("../hooks/useToolbarPostPurchase.js"),constant=require("./constant.js"),AIContentGenerator=require("./ai-generator/AIContentGenerator.js"),AIGenContentLoading=require("./ai-generator/AIGenContentLoading.js"),InteractionSuffix=require("./InteractionSuffix.js"),core=require("@gem-sdk/core");require("swr"),require("../helpers/convert.js");var ShopContext=require("../contexts/ShopContext.js");require("@gem-sdk/adapter-shopify"),require("swr/mutation"),require("swr/infinite"),require("vanilla-lazyload"),require("../hooks/useCartUI.js"),require("../hooks/useStickyStore.js"),require("../types/builder.js"),require("../types/custom.js"),require("../types/animations.js");const SECTION_LIMIT=25,notVisible=e=>{let t=getComputedStyle(e).overflow;return"visible"!==t},isSection=e=>{let t=e.getAttribute("data-component-tag");return"Section"===t},ComponentToolbarPreview=e=>{let{t}=core.useI18nStore(),i=e.isThemeSection,o=!!e.isShopifySection,n=ShopContext.useShopStore(e=>e.storefrontUrl),r=ShopContext.useShopStore(e=>e.pageType),l=BuilderPreviewContext.useBuilderPreviewStore(e=>e.getParents),a=BuilderPreviewContext.useBuilderPreviewStore(e=>e.getItem("ROOT")),s=BuilderPreviewContext.useBuilderPreviewStore(e=>e.isThemeSectionEditor),[d,u]=react.useState(null),[C,c]=react.useState(!1),[m,h]=react.useState(!1),[x,p]=react.useState([]),[j,g]=react.useState("top"),[f,v]=react.useState(!1),[b,w]=react.useState(!1),[R,S]=react.useState(""),[M,L]=react.useState(""),[P,T]=react.useState({width:"",text:""}),[y,Z]=react.useState(!1),E=BuilderPreviewContext.useBuilderPreviewStore(e=>e.errorSectionList),B=react.useMemo(()=>{if(!E)return null;let t=E?.find(t=>t.uid===e.uid);return t},[E,e.uid]),H=PageContext.usePageStore(e=>e.interactionData),V=react.useMemo(()=>"POST_PURCHASE"===r,[r]),{checkDisableDelete:q,getTooltipText:I,checkDisableDuplicate:A}=useToolbarPostPurchase.usePostPurchase(e.uid,e.tag||""),k=["ProductTitle","ProductDescription","ProductPrice"],F=["ArticleTitle","ArticleContent","ArticleImage","ArticleAuthor","ArticleCategory","ArticleDate","ArticleExcerpt","ArticleTags"],G=[...k,...F],$=(e,t)=>{let i=x.length,o=e.getBoundingClientRect(),n=t.getBoundingClientRect();return o.top-n.top<36*i},O=(e,t)=>{let i=t||e;if(e&&!isSection(e))return notVisible(e)&&$(t,e)?e:e.parentElement?O(e.parentElement,i):void 0},D=react.useCallback(()=>a?.childrens?.length||0,[a?.childrens?.length]),U=react.useCallback(()=>{if("Section"==e.tag)return"bottom";let t=document.body.querySelector("#storefront")?.querySelector('[data-toolbar-active="true"]');if(t){let e=t.getBoundingClientRect();e.top<60?g("bottom"):g("top")}},[e.tag]),N=react.useMemo(()=>{let e=/^(?:https?:\/\/)?([^/]+)\.myshopify\.com/;return n?n.match(e)?.[1]:""},[n]),_=react.useMemo(()=>`https://admin.shopify.com/store/${N}`,[N]),z=react.useMemo(()=>R?`${_}/products/${R}`:"",[_,R]),W=react.useMemo(()=>M?`${_}/articles/${M.replace("gid://shopify/Article/","")}`:"",[M,_]),J=react.useMemo(()=>H?.isSelectOnPage,[H?.isSelectOnPage]),K=react.useMemo(()=>H?.settingType,[H?.settingType]),Q=react.useMemo(()=>H?.item?.targets?.find(t=>t.uid===e.uid&&t?.type!=="PAGE")&&"TARGET"===K,[H?.item?.targets,e.uid,K]),X=react.useMemo(()=>H?.item?.self?.uid===e.uid&&H?.item?.self.type!=="PAGE"&&"TRIGGER"===K,[H?.item?.self?.type,H?.item?.self?.uid,e.uid,K]),Y=react.useMemo(()=>!Q&&!X,[Q,X]),ee=react.useMemo(()=>f||o,[f,o]),et=react.useMemo(()=>y||o||D()>25&&"Section"===e.tag||!!B,[D,y,o,e.tag,B]),ei=react.useCallback(t=>{let i=t.detail;if(i?.articleId&&L(i.articleId),i?.productId&&S(i.productId),i?.componentUid==e.uid){w(!0),U(),V&&(v(q()),T(I()),Z(A()));let t=l(e.uid).filter(e=>!("ROOT"===e.uid||"Section"===e.tag&&s||e.editorConfigs?.toolbar?.hide||e.editorConfigs?.component?.noSetting)).slice(0,3);p(t)}else w(!1),p([]),c(!1)},[e.uid,V,l,q,I,A,s,U]),eo=BuilderPreviewContext.useBuilderPreviewStore(e=>e.dismissPublishError),en=react.useCallback(()=>{eo(e.uid)},[eo,e.uid]),er=react.useCallback(()=>"Section"!==e.tag?-1:a?.childrens?.length?a.childrens.findIndex(t=>t==e.uid):-1,[a?.childrens,e.uid,e.tag]),el=react.useMemo(()=>er()>=25,[er]),ea=react.useMemo(()=>!!B||el,[B,el]);if(react.useEffect(()=>(window.addEventListener("editor:active-component",ei),()=>{window.removeEventListener("editor:active-component",ei)}),[ei]),"section"===e.type||e.editorConfigs?.toolbar?.hide)return null;let es=e=>{let i=e?.childrens?.length??0;if("Row"===e.label){let e=1===i?t("Row {colNumber} col",{colNumber:i}):t("Row {colNumber} cols",{colNumber:i});return e}return t(e.label)},ed=e=>{if(!x.length)return;let t=e?.target||null,i=t.closest("[data-toolbar-active]");if(!t||!i)return;if(C)h(!1),c(!1);else{let e=O(i,i);if(e)h(!0);else{let e=i.getBoundingClientRect();e.top<36*x.length?h(!0):h(!1)}c(!0)}let o=new CustomEvent("editor:toolbar:show-parents",{bubbles:!0,detail:{value:!C}});window.dispatchEvent(o)},eu=()=>{if(F.includes(e.tag)){window.open(W,"_blank");return}if(k.includes(e.tag)){window.open(z,"_blank");return}window.open(_,"_blank")},eC=t=>{t.preventDefault(),t.stopPropagation();let n=new CustomEvent("editor:toolbar:delete-component",{bubbles:!0,detail:{componentUid:e.uid,isThemeSection:i,isShopifySection:o}});return window.dispatchEvent(n),!1},ec=t=>{t.preventDefault(),t.stopPropagation();let n=new CustomEvent("editor:toolbar:duplicate-component",{bubbles:!0,detail:{componentUid:e.uid,isThemeSection:i,isShopifySection:o}});return window.dispatchEvent(n),!1},em=()=>e.customLabel||e.label,eh=t=>{t.preventDefault(),t.stopPropagation();let i=new CustomEvent("editor:toolbar:zoom-out-component",{bubbles:!0,detail:{componentUid:e.uid}});return window.dispatchEvent(i),!1},ex=()=>{u(null),window.removeEventListener("editor:close-add-section-popup",ex)},ep=(t,i)=>{if(t.preventDefault(),t.stopPropagation(),D()>=25)return!1;let o=t.target;if(o){u(i);let t=o.getBoundingClientRect(),n=new CustomEvent("editor:toolbar:add-section",{bubbles:!0,detail:{componentUid:e.uid,position:i,top:t.top+t.height/2}});window.dispatchEvent(n),window.addEventListener("editor:close-add-section-popup",ex)}return!1},ej=()=>{if(o)return e.name?.includes("Shopify section:")?e.name:`Shopify section: ${e.name}`;let i=e.name&&e.name===`Section ${e.uid}`;return D()>=20?`${i?"Section":e?.name} ${er()+1}/25`:i?`${t("Section")} ${er()+1}`:e?.name},eg=()=>{let{isShopifySection:t,tag:o}=e;return!t&&(!i||!!s)&&constant.ableGenerateContentElements.includes(o)&&!B},ef="Section"===e.tag&&!e.isThemeSection&&"STATIC"!==r&&"POST_PURCHASE"!==r&&!e.isShopifySection&&25>er()&&!B;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[!("Section"==e.tag&&s)&&jsxRuntime.jsxs("div",{"data-toolbar":!0,"data-toolbar-section":"Section"==e.tag,"data-toolbar-theme-section":"Section"==e.tag&&!!i||s,"data-toolbar-shopify-section":"Section"==e.tag&&!!o,"data-toolbar-limit":er()>=25||!!B,children:[jsxRuntime.jsxs("div",{"data-toolbar-show-parent":!0,onClick:e=>ed(e),"aria-hidden":"true",children:[X&&jsxRuntime.jsx("div",{className:"gp-hidden gp-w-[12px] interaction-use-custom-element",children:jsxRuntime.jsx("svg",{width:"12",height:"13",viewBox:"0 0 12 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.36799 0.430523C4.51596 0.205675 4.76709 0.0703125 5.03626 0.0703125H9.88576C10.2042 0.0703125 10.395 0.424378 10.2198 0.69034L8.36968 3.4992C8.28209 3.63218 8.37747 3.80922 8.53671 3.80922H10.749C11.1111 3.80922 11.2869 4.25204 11.0233 4.50036L3.03971 12.0217C2.7572 12.2878 2.29932 12.0361 2.37262 11.655L3.27994 6.93698C3.30366 6.81364 3.20915 6.69921 3.08354 6.69921H0.984651C0.66625 6.69921 0.475479 6.34529 0.650515 6.07932L4.36799 0.430523Z",fill:"#F9F9F9"})})}),Q&&jsxRuntime.jsx("div",{className:"gp-hidden gp-w-[14px] interaction-use-custom-element",children:jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.32785 3.66159C7.87459 3.58351 8.25451 3.077 8.17643 2.53026C8.09836 1.98353 7.59184 1.6036 7.0451 1.68168C3.92866 2.12673 1.5332 4.80488 1.5332 8.04424C1.5332 11.594 4.41085 14.4716 7.9606 14.4716C11.1706 14.4716 13.8294 12.1194 14.3105 9.04446C14.3959 8.49881 14.0227 7.98727 13.4771 7.9019C12.9314 7.81654 12.4199 8.18967 12.3345 8.73531C12.0034 10.852 10.1702 12.4716 7.9606 12.4716C5.51541 12.4716 3.5332 10.4894 3.5332 8.04424C3.5332 5.81431 5.18273 3.96793 7.32785 3.66159ZM10.3432 1.97548C10.6232 1.69551 11.102 1.83654 11.1855 2.22355L11.6106 4.19339C11.6313 4.28936 11.7063 4.36432 11.8023 4.38503L13.7721 4.81013C14.1591 4.89365 14.3001 5.37247 14.0202 5.65243L12.3432 7.32945C12.1244 7.54819 11.8168 7.65338 11.5099 7.61436L10.1528 7.44178C9.84592 7.40276 9.53827 7.50795 9.31953 7.72669L8.66719 8.37903C8.35477 8.69145 7.86633 8.70954 7.57623 8.41943C7.28613 8.12933 7.30421 7.64089 7.61663 7.32847L8.26898 6.67613C8.48771 6.45739 8.5929 6.14974 8.55388 5.84287L8.38131 4.48575C8.34228 4.17888 8.44748 3.87123 8.66621 3.6525L10.3432 1.97548ZM8.19853 5.1916C8.35319 5.72179 8.04877 6.27697 7.51858 6.43163C6.83078 6.63226 6.32988 7.2683 6.32988 8.01873C6.32988 8.9316 7.06991 9.67164 7.98279 9.67164C8.73014 9.67164 9.36406 9.17486 9.56743 8.49131C9.72492 7.96195 10.2817 7.6605 10.8111 7.81799C11.3404 7.97548 11.6419 8.53227 11.4844 9.06163C11.0356 10.57 9.63916 11.6716 7.98279 11.6716C5.96535 11.6716 4.32988 10.0362 4.32988 8.01873C4.32988 6.35558 5.44054 4.95445 6.95851 4.51165C7.4887 4.35699 8.04387 4.66141 8.19853 5.1916Z",fill:"#F9F9F9"})})}),b&&Y&&jsxRuntime.jsx("div",{"data-toolbar-icon-drag":!0,children:jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[jsxRuntime.jsx("path",{d:"M5.5 4.5C6.32843 4.5 7 3.82843 7 3C7 2.17157 6.32843 1.5 5.5 1.5C4.67157 1.5 4 2.17157 4 3C4 3.82843 4.67157 4.5 5.5 4.5Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M5.5 9.5C6.32843 9.5 7 8.82843 7 8C7 7.17157 6.32843 6.5 5.5 6.5C4.67157 6.5 4 7.17157 4 8C4 8.82843 4.67157 9.5 5.5 9.5Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M7 13C7 13.8284 6.32843 14.5 5.5 14.5C4.67157 14.5 4 13.8284 4 13C4 12.1716 4.67157 11.5 5.5 11.5C6.32843 11.5 7 12.1716 7 13Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M10.5 4.5C11.3284 4.5 12 3.82843 12 3C12 2.17157 11.3284 1.5 10.5 1.5C9.67157 1.5 9 2.17157 9 3C9 3.82843 9.67157 4.5 10.5 4.5Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M12 8C12 8.82843 11.3284 9.5 10.5 9.5C9.67157 9.5 9 8.82843 9 8C9 7.17157 9.67157 6.5 10.5 6.5C11.3284 6.5 12 7.17157 12 8Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M10.5 14.5C11.3284 14.5 12 13.8284 12 13C12 12.1716 11.3284 11.5 10.5 11.5C9.67157 11.5 9 12.1716 9 13C9 13.8284 9.67157 14.5 10.5 14.5Z",fill:"currentColor"})]})}),"Section"==e.tag?jsxRuntime.jsxs("div",{"data-toolbar-name":!0,children:[ej(),b&&o&&!e.isShopifyVisibility&&jsxRuntime.jsxs("svg",{"data-toolbar-visibility":!0,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.1252 9.99773C13.1243 8.27226 11.7248 6.87423 9.99935 6.87506C8.27386 6.87561 6.87518 8.27455 6.87518 10.0001C6.87518 11.7259 8.27429 13.1251 10.0002 13.1251C11.7257 13.1251 13.125 11.727 13.1252 10.0011V9.99773ZM9.99985 8.12506C11.035 8.12451 11.8746 8.96322 11.8752 9.99839V10.0004C11.8752 11.0357 11.0359 11.8751 10.0002 11.8751C8.96465 11.8751 8.12518 11.0356 8.12518 10.0001C8.12518 8.96472 8.96451 8.12533 9.99985 8.12506Z",fill:"#F9F9F9"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.99885 4.37593C5.66421 4.37604 2.80603 7.64523 1.79548 9.00983C1.35636 9.60279 1.35918 10.4 1.80012 10.9902C2.81706 12.3514 5.69374 15.6241 9.99886 15.6241C14.3806 15.6241 17.2194 12.3452 18.2168 10.9808C18.6473 10.392 18.6442 9.60472 18.211 9.01902C17.2056 7.65938 14.3429 4.37583 9.99885 4.37593ZM2.80002 9.75374C3.77049 8.44326 6.30207 5.62602 9.99888 5.62593C13.7041 5.62585 16.24 8.45598 17.206 9.76225C17.3146 9.9091 17.3149 10.0965 17.2077 10.2431C16.254 11.5477 13.7416 14.3741 9.99886 14.3741C6.33149 14.3741 3.78173 11.5541 2.80152 10.242C2.69021 10.0931 2.69001 9.90229 2.80002 9.75374Z",fill:"#F9F9F9"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.0763 3.26988C18.3415 3.58809 18.2985 4.06101 17.9803 4.32619L2.98032 16.8262C2.66211 17.0914 2.18919 17.0484 1.92402 16.7302C1.65884 16.412 1.70184 15.939 2.02004 15.6739L17.02 3.17385C17.3383 2.90868 17.8112 2.95167 18.0763 3.26988Z",fill:"#F9F9F9"})]})]}):jsxRuntime.jsx("div",{"data-toolbar-name":!0,children:t(em())}),b&&"Section"!==e.tag&&x.length>0&&jsxRuntime.jsx("div",{"data-toolbar-icon-parent":!0,"data-toolbar-icon-parent-open":C,children:jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:jsxRuntime.jsx("path",{d:"M5.65522 10C5.07265 10 4.7809 9.22865 5.19284 8.77753L7.53762 6.20974C7.79298 5.93009 8.20702 5.93009 8.46238 6.20974L10.8072 8.77754C11.2191 9.22866 10.9274 10 10.3448 10H5.65522Z",fill:"currentColor"})})})]}),b&&C&&x.map((e,t)=>jsxRuntime.jsxs("div",{"data-toolbar-parent":!0,"data-component-tag":e.tag,"data-parent-uid":e.uid,"data-toolbar-theme-section":s,"data-toolbar-parent-revert":m,style:{top:m?`${36*(t+1)}px`:`${-36*(t+1)}px`},children:[jsxRuntime.jsx("div",{"data-toolbar-icon-drag":!0,children:jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[jsxRuntime.jsx("path",{d:"M5.5 4.5C6.32843 4.5 7 3.82843 7 3C7 2.17157 6.32843 1.5 5.5 1.5C4.67157 1.5 4 2.17157 4 3C4 3.82843 4.67157 4.5 5.5 4.5Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M5.5 9.5C6.32843 9.5 7 8.82843 7 8C7 7.17157 6.32843 6.5 5.5 6.5C4.67157 6.5 4 7.17157 4 8C4 8.82843 4.67157 9.5 5.5 9.5Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M7 13C7 13.8284 6.32843 14.5 5.5 14.5C4.67157 14.5 4 13.8284 4 13C4 12.1716 4.67157 11.5 5.5 11.5C6.32843 11.5 7 12.1716 7 13Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M10.5 4.5C11.3284 4.5 12 3.82843 12 3C12 2.17157 11.3284 1.5 10.5 1.5C9.67157 1.5 9 2.17157 9 3C9 3.82843 9.67157 4.5 10.5 4.5Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M12 8C12 8.82843 11.3284 9.5 10.5 9.5C9.67157 9.5 9 8.82843 9 8C9 7.17157 9.67157 6.5 10.5 6.5C11.3284 6.5 12 7.17157 12 8Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M10.5 14.5C11.3284 14.5 12 13.8284 12 13C12 12.1716 11.3284 11.5 10.5 11.5C9.67157 11.5 9 12.1716 9 13C9 13.8284 9.67157 14.5 10.5 14.5Z",fill:"currentColor"})]})}),jsxRuntime.jsx("div",{"data-toolbar-name":!0,children:es(e)})]},e.uid)),b&&!J&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[" ",ef&&jsxRuntime.jsx(CreateThemeSection.CreateThemeSection,{...e}),eg()&&jsxRuntime.jsx(AIContentGenerator.AIContentGenerator,{...e}),"Sticky"==e.tag&&jsxRuntime.jsx("div",{"data-toolbar-zoom-out":!0,onClick:e=>eh(e),"aria-hidden":"true",children:jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.5 7C14.7761 7 15 6.77614 15 6.5C15 6.22386 14.7761 6 14.5 6L10.7072 6L14.8536 1.85355C15.0489 1.65829 15.0489 1.34171 14.8536 1.14645C14.6584 0.951186 14.3418 0.951185 14.1465 1.14645L10 5.29297L10 1.5C10 1.22386 9.77614 1 9.5 1C9.22386 1 9 1.22386 9 1.5L9 6.5C9 6.77614 9.22386 7 9.5 7L14.5 7ZM6 10.7073L6 14.5C6 14.7761 6.22386 15 6.5 15C6.77614 15 7 14.7761 7 14.5L7 9.5C7 9.22386 6.77614 9 6.5 9H1.5C1.22386 9 1 9.22386 1 9.5C1 9.77614 1.22386 10 1.5 10H5.29306L1.14662 14.1464C0.951353 14.3417 0.951353 14.6583 1.14662 14.8536C1.34188 15.0488 1.65846 15.0488 1.85372 14.8536L6 10.7073Z",fill:"currentColor"})})}),G.includes(e.tag)&&jsxRuntime.jsx(Tooltip.default,{"data-toolbar-title":!0,enable:!0,"data-toolbar-disable":!1,text:t("Edit content in Shopify"),position:"top",onClick:eu,"aria-hidden":"true",children:jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.61129 2.47348C8.61129 2.47348 8.47099 2.51557 8.23248 2.59274C8.19039 2.46647 8.13427 2.30512 8.05009 2.15079C7.78352 1.6387 7.39068 1.37212 6.91366 1.36511C6.87858 1.36511 6.85052 1.36511 6.81545 1.37212C6.80843 1.36511 6.80142 1.35634 6.7944 1.34757C6.78739 1.3388 6.78037 1.33003 6.77336 1.32302C6.56992 1.09854 6.30335 0.993314 5.98768 1.00033C5.37737 1.02137 4.76706 1.46332 4.269 2.249C3.91825 2.80319 3.65869 3.49767 3.58153 4.03082C3.38823 4.09074 3.21092 4.14586 3.05516 4.19429C2.64595 4.32151 2.3851 4.40261 2.37494 4.40261C2.01718 4.51485 2.01016 4.52888 1.96106 4.85859C1.92598 5.11113 1 12.2945 1 12.2945L7.14764 13.3583C7.18955 13.118 7.30454 12.8953 7.47848 12.7214L8.70249 11.4974V2.45945C8.66741 2.45945 8.63234 2.46647 8.61129 2.47348ZM6.82948 3.02767L6.62554 3.09101C6.27515 3.19989 5.90094 3.31617 5.5317 3.42752C5.65797 2.94349 5.89648 2.46647 6.19111 2.15079C6.30335 2.03154 6.45067 1.90527 6.63306 1.8281C6.80142 2.18587 6.83649 2.68393 6.82948 3.02767ZM5.99469 1.4072C6.13499 1.4072 6.26126 1.43526 6.36649 1.50541C6.19813 1.58959 6.0438 1.71586 5.88947 1.87721C5.50364 2.29109 5.202 2.94349 5.08274 3.56783C4.74459 3.66991 4.41804 3.77199 4.10838 3.8688L4.01646 3.89753C4.22691 2.90841 5.05468 1.43526 5.99469 1.4072ZM4.80214 7.0122C4.81874 7.26957 5.09737 7.44833 5.43473 7.66478C5.95252 7.99699 6.60867 8.41798 6.66813 9.3482C6.7453 10.5548 6.02977 11.3826 4.99154 11.4457C3.7569 11.5229 3.06943 10.7933 3.06943 10.7933L3.32899 9.67791C3.32899 9.67791 4.01646 10.197 4.56363 10.1619C4.92139 10.1409 5.04767 9.84627 5.04065 9.64283C5.01607 9.26796 4.73308 9.06671 4.41569 8.84101C4.00848 8.55142 3.54465 8.22157 3.49735 7.4331C3.42018 6.24756 4.19885 5.05501 5.91051 4.94277C6.57694 4.90068 6.91366 5.06904 6.91366 5.06904L6.52082 6.53518C6.52082 6.53518 6.08589 6.33876 5.56678 6.36682C4.80915 6.41592 4.79512 6.89294 4.80214 7.0122ZM7.23635 2.9014C7.22934 2.59274 7.19426 2.15781 7.04695 1.78601C7.50994 1.87721 7.74143 2.39632 7.83964 2.71199C7.70008 2.75665 7.54275 2.80575 7.37118 2.8593L7.23635 2.9014Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M10.7719 3.44156C10.7757 3.47543 11.1733 6.16931 11.541 8.65883L8.95503 11.2448V2.57871C9.16548 2.78214 9.71265 3.31528 9.71265 3.31528C9.71265 3.31528 10.6106 3.32931 10.6597 3.33633C10.7088 3.34334 10.7649 3.37842 10.7719 3.44156Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M14.8056 8.644L14.0424 7.88088C13.7832 7.62163 13.3629 7.62163 13.1036 7.88088L12.1519 8.83258L13.8539 10.5345L14.8056 9.58282C15.0648 9.32357 15.0648 8.90325 14.8056 8.644Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M7.85018 13.0942L11.6419 9.30246L13.3438 11.0044L9.55212 14.7961C9.43782 14.9104 9.28573 14.9791 9.1244 14.9892L7.93427 15.0641C7.73484 15.0767 7.56961 14.9114 7.58216 14.712L7.65706 13.5219C7.66721 13.3606 7.73588 13.2085 7.85018 13.0942Z",fill:"currentColor"})]})}),jsxRuntime.jsx(Tooltip.default,{enable:"Section"==e.tag&&D()>=25||o,text:o?t("Disabled. Please edit in Shopify Editor"):t("Page has reached Shopify’s 25 section-limit"),position:"bottom",width:"200px","data-toolbar-duplicate":!0,"data-toolbar-disable":et,onClick:et?void 0:e=>ec(e),"aria-hidden":"true",className:et?"!gp-cursor-not-allowed":"",children:jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.08423 1.21289C5.53194 1.21289 5.08423 1.66061 5.08423 2.21289V3.78711H4.26172C3.43329 3.78711 2.76172 4.45868 2.76172 5.28711V13.2871C2.76172 14.1155 3.43329 14.7871 4.26172 14.7871H10.2617C11.0901 14.7871 11.7617 14.1155 11.7617 13.2871V12.4629H13.0842C13.6365 12.4629 14.0842 12.0152 14.0842 11.4629V2.21289C14.0842 1.66061 13.6365 1.21289 13.0842 1.21289H6.08423ZM10.7617 12.4629H6.08423C5.53194 12.4629 5.08423 12.0152 5.08423 11.4629V4.78711H4.26172C3.98558 4.78711 3.76172 5.01097 3.76172 5.28711V13.2871C3.76172 13.5633 3.98558 13.7871 4.26172 13.7871H10.2617C10.5379 13.7871 10.7617 13.5633 10.7617 13.2871V12.4629Z",fill:"currentColor"})})}),jsxRuntime.jsx(Tooltip.default,{"data-toolbar-delete":!0,onClick:e=>ee?null:eC(e),enable:ee,"data-toolbar-disable":ee,text:o?t("Disabled. Please edit in Shopify Editor"):P.text,width:P.width,position:o?"bottom":j,"aria-hidden":"true",className:ee?"!gp-cursor-not-allowed":"",children:jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 2.88965V2.38965C11 1.56122 10.3284 0.889648 9.5 0.889648H6.5C5.67157 0.889648 5 1.56122 5 2.38965V2.88965H2C1.72386 2.88965 1.5 3.11351 1.5 3.38965C1.5 3.66579 1.72386 3.88965 2 3.88965H3.21997V13.1099C3.21997 14.2144 4.1154 15.1099 5.21997 15.1099H11.22C12.3245 15.1099 13.22 14.2144 13.22 13.1099V3.88965H14C14.2761 3.88965 14.5 3.66579 14.5 3.38965C14.5 3.11351 14.2761 2.88965 14 2.88965H11ZM6 2.88965H10V2.38965C10 2.11351 9.77614 1.88965 9.5 1.88965H6.5C6.22386 1.88965 6 2.11351 6 2.38965V2.88965ZM6.24976 6.13965C6.66397 6.13965 6.99976 6.47543 6.99976 6.88965V11.3896C6.99976 11.8039 6.66397 12.1396 6.24976 12.1396C5.83554 12.1396 5.49976 11.8039 5.49976 11.3896V6.88965C5.49976 6.47543 5.83554 6.13965 6.24976 6.13965ZM10.4998 6.88965C10.4998 6.47543 10.164 6.13965 9.74976 6.13965C9.33554 6.13965 8.99976 6.47543 8.99976 6.88965V11.3896C8.99976 11.8039 9.33554 12.1396 9.74976 12.1396C10.164 12.1396 10.4998 11.8039 10.4998 11.3896V6.88965Z",fill:"currentColor"})})})]}),jsxRuntime.jsx(InteractionSuffix.InteractionSuffix,{uid:e.uid})]},e.uid),"STATIC"!==r&&"POST_PURCHASE"!==r&&25>er()&&jsxRuntime.jsx(ThemeSectionStatus.ThemeSectionStatusWrapper,{...e}),jsxRuntime.jsx("div",{"data-outline":!0,"data-outline-section":"Section"==e.tag,"data-outline-theme-section":"Section"==e.tag&&!!i||s,"data-outline-shopify-section":"Section"==e.tag&&!!o,"data-outline-limit":ea,"data-outline-error":!!B},"outline-"+e.uid),"Section"==e.tag&&!s&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Tooltip.default,{enable:D()>=25,text:t("Page has reached Shopify’s 25 section-limit"),position:"top","data-toolbar-add-top":!0,"data-toolbar-disable":D()>=25,"data-toolbar-add-open":"above"==d,onClick:e=>ep(e,"above"),"aria-hidden":"true",children:jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:jsxRuntime.jsx("path",{d:"M8.45 3.95C8.45 3.70147 8.24853 3.5 8 3.5C7.75147 3.5 7.55 3.70147 7.55 3.95V7.55H3.95C3.70147 7.55 3.5 7.75147 3.5 8C3.5 8.24853 3.70147 8.45 3.95 8.45H7.55V12.05C7.55 12.2985 7.75147 12.5 8 12.5C8.24853 12.5 8.45 12.2985 8.45 12.05V8.45H12.05C12.2985 8.45 12.5 8.24853 12.5 8C12.5 7.75147 12.2985 7.55 12.05 7.55H8.45V3.95Z",fill:"#212121"})})}),B&&jsxRuntime.jsx(SectionErrorBanner.SectionErrorBanner,{errorSectionInfo:B,onDismiss:en}),jsxRuntime.jsx(Tooltip.default,{enable:D()>=25,text:t("Page has reached Shopify’s 25 section-limit"),position:"top","data-toolbar-add-bottom":!0,"data-toolbar-disable":D()>=25,"data-toolbar-add-open":"below"==d,onClick:e=>ep(e,"below"),"aria-hidden":"true",children:jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:jsxRuntime.jsx("path",{d:"M8.45 3.95C8.45 3.70147 8.24853 3.5 8 3.5C7.75147 3.5 7.55 3.70147 7.55 3.95V7.55H3.95C3.70147 7.55 3.5 7.75147 3.5 8C3.5 8.24853 3.70147 8.45 3.95 8.45H7.55V12.05C7.55 12.2985 7.75147 12.5 8 12.5C8.24853 12.5 8.45 12.2985 8.45 12.05V8.45H12.05C12.2985 8.45 12.5 8.24853 12.5 8C12.5 7.75147 12.2985 7.55 12.05 7.55H8.45V3.95Z",fill:"#212121"})})})]}),constant.ableGenerateContentElements.includes(e.tag)&&b&&jsxRuntime.jsx(AIGenContentLoading.AIGenContentLoading,{...e}),b&&jsxRuntime.jsx(Resize.default,{...e})]})};var ComponentToolbarPreview$1=react.memo(ComponentToolbarPreview);exports.default=ComponentToolbarPreview$1;
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),react=require("react");require("zustand");var BuilderPreviewContext=require("../contexts/BuilderPreviewContext.js"),PageContext=require("../contexts/PageContext.js"),CreateThemeSection=require("./theme-section/CreateThemeSection.js"),Tooltip=require("./toolbar/Tooltip.js"),SectionErrorBanner=require("./toolbar/SectionErrorBanner.js"),ThemeSectionStatus=require("./theme-section/ThemeSectionStatus.js"),Resize=require("./resize/Resize.js"),useToolbarPostPurchase=require("../hooks/useToolbarPostPurchase.js"),constant=require("./constant.js"),AIContentGenerator=require("./ai-generator/AIContentGenerator.js"),AIGenContentLoading=require("./ai-generator/AIGenContentLoading.js"),InteractionSuffix=require("./InteractionSuffix.js"),core=require("@gem-sdk/core");require("swr"),require("../helpers/convert.js");var ShopContext=require("../contexts/ShopContext.js");require("@gem-sdk/adapter-shopify"),require("swr/mutation"),require("swr/infinite"),require("vanilla-lazyload"),require("../hooks/useCartUI.js"),require("../hooks/useStickyStore.js"),require("../types/builder.js"),require("../types/custom.js"),require("../types/animations.js");const SECTION_LIMIT=25,notVisible=e=>{let t=getComputedStyle(e).overflow;return"visible"!==t},isSection=e=>{let t=e.getAttribute("data-component-tag");return"Section"===t},ComponentToolbarPreview=e=>{let{t}=core.useI18nStore(),i=e.isThemeSection,o=!!e.isShopifySection,n=ShopContext.useShopStore(e=>e.storefrontUrl),r=ShopContext.useShopStore(e=>e.pageType),l=BuilderPreviewContext.useBuilderPreviewStore(e=>e.getParents),a=BuilderPreviewContext.useBuilderPreviewStore(e=>e.getItem("ROOT")),s=BuilderPreviewContext.useBuilderPreviewStore(e=>e.isThemeSectionEditor),[d,u]=react.useState(null),[C,c]=react.useState(!1),[m,h]=react.useState(!1),[x,p]=react.useState([]),[j,g]=react.useState("top"),[f,v]=react.useState(!1),[b,w]=react.useState(!1),[R,S]=react.useState(""),[M,L]=react.useState(""),[P,T]=react.useState({width:"",text:""}),[y,Z]=react.useState(!1),E=BuilderPreviewContext.useBuilderPreviewStore(e=>e.errorSectionList),B=react.useMemo(()=>{if(!E)return null;let t=E?.find(t=>t.uid===e.uid);return t},[E,e.uid]),H=PageContext.usePageStore(e=>e.interactionData),V=react.useMemo(()=>"POST_PURCHASE"===r,[r]),{checkDisableDelete:q,getTooltipText:I,checkDisableDuplicate:A}=useToolbarPostPurchase.usePostPurchase(e.uid,e.tag||""),k=["ProductTitle","ProductDescription","ProductPrice"],F=["ArticleTitle","ArticleContent","ArticleImage","ArticleAuthor","ArticleCategory","ArticleDate","ArticleExcerpt","ArticleTags"],G=[...k,...F],$=(e,t)=>{let i=x.length,o=e.getBoundingClientRect(),n=t.getBoundingClientRect();return o.top-n.top<36*i},O=(e,t)=>{let i=t||e;if(e&&!isSection(e))return notVisible(e)&&$(t,e)?e:e.parentElement?O(e.parentElement,i):void 0},D=react.useCallback(()=>a?.childrens?.length||0,[a?.childrens?.length]),U=react.useCallback(()=>{if("Section"==e.tag)return"bottom";let t=document.body.querySelector("#storefront")?.querySelector('[data-toolbar-active="true"]');if(t){let e=t.getBoundingClientRect();e.top<60?g("bottom"):g("top")}},[e.tag]),N=react.useMemo(()=>{let e=/^(?:https?:\/\/)?([^/]+)\.myshopify\.com/;return n?n.match(e)?.[1]:""},[n]),_=react.useMemo(()=>`https://admin.shopify.com/store/${N}`,[N]),z=react.useMemo(()=>R?`${_}/products/${R}`:"",[_,R]),W=react.useMemo(()=>M?`${_}/articles/${M.replace("gid://shopify/Article/","")}`:"",[M,_]),J=react.useMemo(()=>H?.isSelectOnPage,[H?.isSelectOnPage]),K=react.useMemo(()=>H?.settingType,[H?.settingType]),Q=react.useMemo(()=>H?.item?.targets?.find(t=>t.uid===e.uid&&t?.type!=="PAGE")&&"TARGET"===K,[H?.item?.targets,e.uid,K]),X=react.useMemo(()=>H?.item?.self?.uid===e.uid&&H?.item?.self.type!=="PAGE"&&"TRIGGER"===K,[H?.item?.self?.type,H?.item?.self?.uid,e.uid,K]),Y=react.useMemo(()=>!Q&&!X,[Q,X]),ee=react.useMemo(()=>f||o,[f,o]),et=react.useMemo(()=>y||o||D()>25&&"Section"===e.tag||!!B,[D,y,o,e.tag,B]),ei=react.useCallback(t=>{let i=t.detail;if(i?.articleId&&L(i.articleId),i?.productId&&S(i.productId),i?.componentUid==e.uid){w(!0),U(),V&&(v(q()),T(I()),Z(A()));let t=l(e.uid).filter(e=>!("ROOT"===e.uid||"Section"===e.tag&&s||e.editorConfigs?.toolbar?.hide||e.editorConfigs?.component?.noSetting)).slice(0,3);p(t)}else w(!1),p([]),c(!1)},[e.uid,V,l,q,I,A,s,U]),eo=BuilderPreviewContext.useBuilderPreviewStore(e=>e.dismissPublishError),en=react.useCallback(()=>{eo(e.uid)},[eo,e.uid]),er=react.useCallback(()=>"Section"!==e.tag?-1:a?.childrens?.length?a.childrens.findIndex(t=>t==e.uid):-1,[a?.childrens,e.uid,e.tag]),el=react.useMemo(()=>er()>=25,[er]),ea=react.useMemo(()=>!!B||el,[B,el]);if(react.useEffect(()=>(window.addEventListener("editor:active-component",ei),()=>{window.removeEventListener("editor:active-component",ei)}),[ei]),"section"===e.type||e.editorConfigs?.toolbar?.hide)return null;let es=e=>{let i=e?.childrens?.length??0;if("Row"===e.label){let e=1===i?t("Row {colNumber} col",{colNumber:i}):t("Row {colNumber} cols",{colNumber:i});return e}return t(e.label)},ed=e=>{if(!x.length)return;let t=e?.target||null,i=t.closest("[data-toolbar-active]");if(!t||!i)return;if(C)h(!1),c(!1);else{let e=O(i,i);if(e)h(!0);else{let e=i.getBoundingClientRect();e.top<36*x.length?h(!0):h(!1)}c(!0)}let o=new CustomEvent("editor:toolbar:show-parents",{bubbles:!0,detail:{value:!C}});window.dispatchEvent(o)},eu=()=>{if(F.includes(e.tag)){window.open(W,"_blank");return}if(k.includes(e.tag)){window.open(z,"_blank");return}window.open(_,"_blank")},eC=t=>{t.preventDefault(),t.stopPropagation();let n=new CustomEvent("editor:toolbar:delete-component",{bubbles:!0,detail:{componentUid:e.uid,isThemeSection:i,isShopifySection:o}});return window.dispatchEvent(n),!1},ec=t=>{t.preventDefault(),t.stopPropagation();let n=new CustomEvent("editor:toolbar:duplicate-component",{bubbles:!0,detail:{componentUid:e.uid,isThemeSection:i,isShopifySection:o}});return window.dispatchEvent(n),!1},em=()=>e.customLabel||e.label,eh=t=>{t.preventDefault(),t.stopPropagation();let i=new CustomEvent("editor:toolbar:zoom-out-component",{bubbles:!0,detail:{componentUid:e.uid}});return window.dispatchEvent(i),!1},ex=()=>{u(null),window.removeEventListener("editor:close-add-section-popup",ex)},ep=(t,i)=>{if(t.preventDefault(),t.stopPropagation(),D()>=25)return!1;let o=t.target;if(o){u(i);let t=o.getBoundingClientRect(),n=new CustomEvent("editor:toolbar:add-section",{bubbles:!0,detail:{componentUid:e.uid,position:i,top:t.top+t.height/2}});window.dispatchEvent(n),window.addEventListener("editor:close-add-section-popup",ex)}return!1},ej=()=>{if(o)return e.name?.includes("Shopify section:")?e.name:`Shopify section: ${e.name}`;let i=e.name&&e.name===`Section ${e.uid}`;return D()>=20?`${i?"Section":e?.name} ${er()+1}/25`:i?`${t("Section")} ${er()+1}`:e?.name},eg=()=>{let{isShopifySection:t,tag:o}=e;return!t&&(!i||!!s)&&constant.ableGenerateContentElements.includes(o)&&!B},ef="Section"===e.tag&&!e.isThemeSection&&"STATIC"!==r&&"POST_PURCHASE"!==r&&!e.isShopifySection&&25>er()&&!B;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[!("Section"==e.tag&&s)&&jsxRuntime.jsxs("div",{"data-toolbar":!0,"data-toolbar-section":"Section"==e.tag,"data-toolbar-theme-section":"Section"==e.tag&&!!i||s,"data-toolbar-shopify-section":"Section"==e.tag&&!!o,"data-toolbar-limit":er()>=25||!!B,children:[jsxRuntime.jsxs("div",{"data-toolbar-show-parent":!0,onClick:e=>ed(e),"aria-hidden":"true",children:[X&&jsxRuntime.jsx("div",{className:"gp-hidden gp-w-[12px] interaction-use-custom-element",children:jsxRuntime.jsx("svg",{width:"12",height:"13",viewBox:"0 0 12 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.36799 0.430523C4.51596 0.205675 4.76709 0.0703125 5.03626 0.0703125H9.88576C10.2042 0.0703125 10.395 0.424378 10.2198 0.69034L8.36968 3.4992C8.28209 3.63218 8.37747 3.80922 8.53671 3.80922H10.749C11.1111 3.80922 11.2869 4.25204 11.0233 4.50036L3.03971 12.0217C2.7572 12.2878 2.29932 12.0361 2.37262 11.655L3.27994 6.93698C3.30366 6.81364 3.20915 6.69921 3.08354 6.69921H0.984651C0.66625 6.69921 0.475479 6.34529 0.650515 6.07932L4.36799 0.430523Z",fill:"#F9F9F9"})})}),Q&&jsxRuntime.jsx("div",{className:"gp-hidden gp-w-[14px] interaction-use-custom-element",children:jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.32785 3.66159C7.87459 3.58351 8.25451 3.077 8.17643 2.53026C8.09836 1.98353 7.59184 1.6036 7.0451 1.68168C3.92866 2.12673 1.5332 4.80488 1.5332 8.04424C1.5332 11.594 4.41085 14.4716 7.9606 14.4716C11.1706 14.4716 13.8294 12.1194 14.3105 9.04446C14.3959 8.49881 14.0227 7.98727 13.4771 7.9019C12.9314 7.81654 12.4199 8.18967 12.3345 8.73531C12.0034 10.852 10.1702 12.4716 7.9606 12.4716C5.51541 12.4716 3.5332 10.4894 3.5332 8.04424C3.5332 5.81431 5.18273 3.96793 7.32785 3.66159ZM10.3432 1.97548C10.6232 1.69551 11.102 1.83654 11.1855 2.22355L11.6106 4.19339C11.6313 4.28936 11.7063 4.36432 11.8023 4.38503L13.7721 4.81013C14.1591 4.89365 14.3001 5.37247 14.0202 5.65243L12.3432 7.32945C12.1244 7.54819 11.8168 7.65338 11.5099 7.61436L10.1528 7.44178C9.84592 7.40276 9.53827 7.50795 9.31953 7.72669L8.66719 8.37903C8.35477 8.69145 7.86633 8.70954 7.57623 8.41943C7.28613 8.12933 7.30421 7.64089 7.61663 7.32847L8.26898 6.67613C8.48771 6.45739 8.5929 6.14974 8.55388 5.84287L8.38131 4.48575C8.34228 4.17888 8.44748 3.87123 8.66621 3.6525L10.3432 1.97548ZM8.19853 5.1916C8.35319 5.72179 8.04877 6.27697 7.51858 6.43163C6.83078 6.63226 6.32988 7.2683 6.32988 8.01873C6.32988 8.9316 7.06991 9.67164 7.98279 9.67164C8.73014 9.67164 9.36406 9.17486 9.56743 8.49131C9.72492 7.96195 10.2817 7.6605 10.8111 7.81799C11.3404 7.97548 11.6419 8.53227 11.4844 9.06163C11.0356 10.57 9.63916 11.6716 7.98279 11.6716C5.96535 11.6716 4.32988 10.0362 4.32988 8.01873C4.32988 6.35558 5.44054 4.95445 6.95851 4.51165C7.4887 4.35699 8.04387 4.66141 8.19853 5.1916Z",fill:"#F9F9F9"})})}),b&&Y&&jsxRuntime.jsx("div",{"data-toolbar-icon-drag":!0,children:jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[jsxRuntime.jsx("path",{d:"M5.5 4.5C6.32843 4.5 7 3.82843 7 3C7 2.17157 6.32843 1.5 5.5 1.5C4.67157 1.5 4 2.17157 4 3C4 3.82843 4.67157 4.5 5.5 4.5Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M5.5 9.5C6.32843 9.5 7 8.82843 7 8C7 7.17157 6.32843 6.5 5.5 6.5C4.67157 6.5 4 7.17157 4 8C4 8.82843 4.67157 9.5 5.5 9.5Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M7 13C7 13.8284 6.32843 14.5 5.5 14.5C4.67157 14.5 4 13.8284 4 13C4 12.1716 4.67157 11.5 5.5 11.5C6.32843 11.5 7 12.1716 7 13Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M10.5 4.5C11.3284 4.5 12 3.82843 12 3C12 2.17157 11.3284 1.5 10.5 1.5C9.67157 1.5 9 2.17157 9 3C9 3.82843 9.67157 4.5 10.5 4.5Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M12 8C12 8.82843 11.3284 9.5 10.5 9.5C9.67157 9.5 9 8.82843 9 8C9 7.17157 9.67157 6.5 10.5 6.5C11.3284 6.5 12 7.17157 12 8Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M10.5 14.5C11.3284 14.5 12 13.8284 12 13C12 12.1716 11.3284 11.5 10.5 11.5C9.67157 11.5 9 12.1716 9 13C9 13.8284 9.67157 14.5 10.5 14.5Z",fill:"currentColor"})]})}),"Section"==e.tag?jsxRuntime.jsxs("div",{"data-toolbar-name":!0,children:[ej(),b&&o&&!e.isShopifyVisibility&&jsxRuntime.jsxs("svg",{"data-toolbar-visibility":!0,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.1252 9.99773C13.1243 8.27226 11.7248 6.87423 9.99935 6.87506C8.27386 6.87561 6.87518 8.27455 6.87518 10.0001C6.87518 11.7259 8.27429 13.1251 10.0002 13.1251C11.7257 13.1251 13.125 11.727 13.1252 10.0011V9.99773ZM9.99985 8.12506C11.035 8.12451 11.8746 8.96322 11.8752 9.99839V10.0004C11.8752 11.0357 11.0359 11.8751 10.0002 11.8751C8.96465 11.8751 8.12518 11.0356 8.12518 10.0001C8.12518 8.96472 8.96451 8.12533 9.99985 8.12506Z",fill:"#F9F9F9"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.99885 4.37593C5.66421 4.37604 2.80603 7.64523 1.79548 9.00983C1.35636 9.60279 1.35918 10.4 1.80012 10.9902C2.81706 12.3514 5.69374 15.6241 9.99886 15.6241C14.3806 15.6241 17.2194 12.3452 18.2168 10.9808C18.6473 10.392 18.6442 9.60472 18.211 9.01902C17.2056 7.65938 14.3429 4.37583 9.99885 4.37593ZM2.80002 9.75374C3.77049 8.44326 6.30207 5.62602 9.99888 5.62593C13.7041 5.62585 16.24 8.45598 17.206 9.76225C17.3146 9.9091 17.3149 10.0965 17.2077 10.2431C16.254 11.5477 13.7416 14.3741 9.99886 14.3741C6.33149 14.3741 3.78173 11.5541 2.80152 10.242C2.69021 10.0931 2.69001 9.90229 2.80002 9.75374Z",fill:"#F9F9F9"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.0763 3.26988C18.3415 3.58809 18.2985 4.06101 17.9803 4.32619L2.98032 16.8262C2.66211 17.0914 2.18919 17.0484 1.92402 16.7302C1.65884 16.412 1.70184 15.939 2.02004 15.6739L17.02 3.17385C17.3383 2.90868 17.8112 2.95167 18.0763 3.26988Z",fill:"#F9F9F9"})]})]}):jsxRuntime.jsx("div",{"data-toolbar-name":!0,children:t(em())}),b&&"Section"!==e.tag&&x.length>0&&jsxRuntime.jsx("div",{"data-toolbar-icon-parent":!0,"data-toolbar-icon-parent-open":C,children:jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:jsxRuntime.jsx("path",{d:"M5.65522 10C5.07265 10 4.7809 9.22865 5.19284 8.77753L7.53762 6.20974C7.79298 5.93009 8.20702 5.93009 8.46238 6.20974L10.8072 8.77754C11.2191 9.22866 10.9274 10 10.3448 10H5.65522Z",fill:"currentColor"})})})]}),b&&C&&x.map((e,t)=>jsxRuntime.jsxs("div",{"data-toolbar-parent":!0,"data-component-tag":e.tag,"data-parent-uid":e.uid,"data-toolbar-theme-section":s,"data-toolbar-parent-revert":m,style:{top:m?`${36*(t+1)}px`:`${-36*(t+1)}px`},children:[jsxRuntime.jsx("div",{"data-toolbar-icon-drag":!0,children:jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[jsxRuntime.jsx("path",{d:"M5.5 4.5C6.32843 4.5 7 3.82843 7 3C7 2.17157 6.32843 1.5 5.5 1.5C4.67157 1.5 4 2.17157 4 3C4 3.82843 4.67157 4.5 5.5 4.5Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M5.5 9.5C6.32843 9.5 7 8.82843 7 8C7 7.17157 6.32843 6.5 5.5 6.5C4.67157 6.5 4 7.17157 4 8C4 8.82843 4.67157 9.5 5.5 9.5Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M7 13C7 13.8284 6.32843 14.5 5.5 14.5C4.67157 14.5 4 13.8284 4 13C4 12.1716 4.67157 11.5 5.5 11.5C6.32843 11.5 7 12.1716 7 13Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M10.5 4.5C11.3284 4.5 12 3.82843 12 3C12 2.17157 11.3284 1.5 10.5 1.5C9.67157 1.5 9 2.17157 9 3C9 3.82843 9.67157 4.5 10.5 4.5Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M12 8C12 8.82843 11.3284 9.5 10.5 9.5C9.67157 9.5 9 8.82843 9 8C9 7.17157 9.67157 6.5 10.5 6.5C11.3284 6.5 12 7.17157 12 8Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M10.5 14.5C11.3284 14.5 12 13.8284 12 13C12 12.1716 11.3284 11.5 10.5 11.5C9.67157 11.5 9 12.1716 9 13C9 13.8284 9.67157 14.5 10.5 14.5Z",fill:"currentColor"})]})}),jsxRuntime.jsx("div",{"data-toolbar-name":!0,children:es(e)})]},e.uid)),b&&!J&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[" ",ef&&jsxRuntime.jsx(CreateThemeSection.CreateThemeSection,{...e}),eg()&&jsxRuntime.jsx(AIContentGenerator.AIContentGenerator,{...e}),"Sticky"==e.tag&&jsxRuntime.jsx("div",{"data-toolbar-zoom-out":!0,onClick:e=>eh(e),"aria-hidden":"true",children:jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.5 7C14.7761 7 15 6.77614 15 6.5C15 6.22386 14.7761 6 14.5 6L10.7072 6L14.8536 1.85355C15.0489 1.65829 15.0489 1.34171 14.8536 1.14645C14.6584 0.951186 14.3418 0.951185 14.1465 1.14645L10 5.29297L10 1.5C10 1.22386 9.77614 1 9.5 1C9.22386 1 9 1.22386 9 1.5L9 6.5C9 6.77614 9.22386 7 9.5 7L14.5 7ZM6 10.7073L6 14.5C6 14.7761 6.22386 15 6.5 15C6.77614 15 7 14.7761 7 14.5L7 9.5C7 9.22386 6.77614 9 6.5 9H1.5C1.22386 9 1 9.22386 1 9.5C1 9.77614 1.22386 10 1.5 10H5.29306L1.14662 14.1464C0.951353 14.3417 0.951353 14.6583 1.14662 14.8536C1.34188 15.0488 1.65846 15.0488 1.85372 14.8536L6 10.7073Z",fill:"currentColor"})})}),G.includes(e.tag)&&jsxRuntime.jsx(Tooltip.default,{"data-toolbar-title":!0,enable:!0,"data-toolbar-disable":!1,text:t("Edit content in Shopify"),position:"top",onClick:eu,"aria-hidden":"true",children:jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.61129 2.47348C8.61129 2.47348 8.47099 2.51557 8.23248 2.59274C8.19039 2.46647 8.13427 2.30512 8.05009 2.15079C7.78352 1.6387 7.39068 1.37212 6.91366 1.36511C6.87858 1.36511 6.85052 1.36511 6.81545 1.37212C6.80843 1.36511 6.80142 1.35634 6.7944 1.34757C6.78739 1.3388 6.78037 1.33003 6.77336 1.32302C6.56992 1.09854 6.30335 0.993314 5.98768 1.00033C5.37737 1.02137 4.76706 1.46332 4.269 2.249C3.91825 2.80319 3.65869 3.49767 3.58153 4.03082C3.38823 4.09074 3.21092 4.14586 3.05516 4.19429C2.64595 4.32151 2.3851 4.40261 2.37494 4.40261C2.01718 4.51485 2.01016 4.52888 1.96106 4.85859C1.92598 5.11113 1 12.2945 1 12.2945L7.14764 13.3583C7.18955 13.118 7.30454 12.8953 7.47848 12.7214L8.70249 11.4974V2.45945C8.66741 2.45945 8.63234 2.46647 8.61129 2.47348ZM6.82948 3.02767L6.62554 3.09101C6.27515 3.19989 5.90094 3.31617 5.5317 3.42752C5.65797 2.94349 5.89648 2.46647 6.19111 2.15079C6.30335 2.03154 6.45067 1.90527 6.63306 1.8281C6.80142 2.18587 6.83649 2.68393 6.82948 3.02767ZM5.99469 1.4072C6.13499 1.4072 6.26126 1.43526 6.36649 1.50541C6.19813 1.58959 6.0438 1.71586 5.88947 1.87721C5.50364 2.29109 5.202 2.94349 5.08274 3.56783C4.74459 3.66991 4.41804 3.77199 4.10838 3.8688L4.01646 3.89753C4.22691 2.90841 5.05468 1.43526 5.99469 1.4072ZM4.80214 7.0122C4.81874 7.26957 5.09737 7.44833 5.43473 7.66478C5.95252 7.99699 6.60867 8.41798 6.66813 9.3482C6.7453 10.5548 6.02977 11.3826 4.99154 11.4457C3.7569 11.5229 3.06943 10.7933 3.06943 10.7933L3.32899 9.67791C3.32899 9.67791 4.01646 10.197 4.56363 10.1619C4.92139 10.1409 5.04767 9.84627 5.04065 9.64283C5.01607 9.26796 4.73308 9.06671 4.41569 8.84101C4.00848 8.55142 3.54465 8.22157 3.49735 7.4331C3.42018 6.24756 4.19885 5.05501 5.91051 4.94277C6.57694 4.90068 6.91366 5.06904 6.91366 5.06904L6.52082 6.53518C6.52082 6.53518 6.08589 6.33876 5.56678 6.36682C4.80915 6.41592 4.79512 6.89294 4.80214 7.0122ZM7.23635 2.9014C7.22934 2.59274 7.19426 2.15781 7.04695 1.78601C7.50994 1.87721 7.74143 2.39632 7.83964 2.71199C7.70008 2.75665 7.54275 2.80575 7.37118 2.8593L7.23635 2.9014Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M10.7719 3.44156C10.7757 3.47543 11.1733 6.16931 11.541 8.65883L8.95503 11.2448V2.57871C9.16548 2.78214 9.71265 3.31528 9.71265 3.31528C9.71265 3.31528 10.6106 3.32931 10.6597 3.33633C10.7088 3.34334 10.7649 3.37842 10.7719 3.44156Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M14.8056 8.644L14.0424 7.88088C13.7832 7.62163 13.3629 7.62163 13.1036 7.88088L12.1519 8.83258L13.8539 10.5345L14.8056 9.58282C15.0648 9.32357 15.0648 8.90325 14.8056 8.644Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M7.85018 13.0942L11.6419 9.30246L13.3438 11.0044L9.55212 14.7961C9.43782 14.9104 9.28573 14.9791 9.1244 14.9892L7.93427 15.0641C7.73484 15.0767 7.56961 14.9114 7.58216 14.712L7.65706 13.5219C7.66721 13.3606 7.73588 13.2085 7.85018 13.0942Z",fill:"currentColor"})]})}),jsxRuntime.jsx(Tooltip.default,{enable:"Section"==e.tag&&D()>=25||o,text:o?t("Disabled. Please edit in Shopify Editor"):t("Page has reached Shopify’s 25 section-limit"),position:"bottom",width:"200px","data-toolbar-duplicate":!0,"data-toolbar-disable":et,onClick:et?void 0:e=>ec(e),"aria-hidden":"true",className:et?"!gp-cursor-not-allowed":"",children:jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.08423 1.21289C5.53194 1.21289 5.08423 1.66061 5.08423 2.21289V3.78711H4.26172C3.43329 3.78711 2.76172 4.45868 2.76172 5.28711V13.2871C2.76172 14.1155 3.43329 14.7871 4.26172 14.7871H10.2617C11.0901 14.7871 11.7617 14.1155 11.7617 13.2871V12.4629H13.0842C13.6365 12.4629 14.0842 12.0152 14.0842 11.4629V2.21289C14.0842 1.66061 13.6365 1.21289 13.0842 1.21289H6.08423ZM10.7617 12.4629H6.08423C5.53194 12.4629 5.08423 12.0152 5.08423 11.4629V4.78711H4.26172C3.98558 4.78711 3.76172 5.01097 3.76172 5.28711V13.2871C3.76172 13.5633 3.98558 13.7871 4.26172 13.7871H10.2617C10.5379 13.7871 10.7617 13.5633 10.7617 13.2871V12.4629Z",fill:"currentColor"})})}),jsxRuntime.jsx(Tooltip.default,{"data-toolbar-delete":!0,onClick:e=>ee?null:eC(e),enable:ee,"data-toolbar-disable":ee,text:o?t("Disabled. Please edit in Shopify Editor"):P.text,width:P.width,position:o?"bottom":j,"aria-hidden":"true",className:ee?"!gp-cursor-not-allowed":"",children:jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 2.88965V2.38965C11 1.56122 10.3284 0.889648 9.5 0.889648H6.5C5.67157 0.889648 5 1.56122 5 2.38965V2.88965H2C1.72386 2.88965 1.5 3.11351 1.5 3.38965C1.5 3.66579 1.72386 3.88965 2 3.88965H3.21997V13.1099C3.21997 14.2144 4.1154 15.1099 5.21997 15.1099H11.22C12.3245 15.1099 13.22 14.2144 13.22 13.1099V3.88965H14C14.2761 3.88965 14.5 3.66579 14.5 3.38965C14.5 3.11351 14.2761 2.88965 14 2.88965H11ZM6 2.88965H10V2.38965C10 2.11351 9.77614 1.88965 9.5 1.88965H6.5C6.22386 1.88965 6 2.11351 6 2.38965V2.88965ZM6.24976 6.13965C6.66397 6.13965 6.99976 6.47543 6.99976 6.88965V11.3896C6.99976 11.8039 6.66397 12.1396 6.24976 12.1396C5.83554 12.1396 5.49976 11.8039 5.49976 11.3896V6.88965C5.49976 6.47543 5.83554 6.13965 6.24976 6.13965ZM10.4998 6.88965C10.4998 6.47543 10.164 6.13965 9.74976 6.13965C9.33554 6.13965 8.99976 6.47543 8.99976 6.88965V11.3896C8.99976 11.8039 9.33554 12.1396 9.74976 12.1396C10.164 12.1396 10.4998 11.8039 10.4998 11.3896V6.88965Z",fill:"currentColor"})})})]}),jsxRuntime.jsx(InteractionSuffix.InteractionSuffix,{uid:e.uid})]},e.uid),"STATIC"!==r&&"POST_PURCHASE"!==r&&25>er()&&jsxRuntime.jsx(ThemeSectionStatus.ThemeSectionStatusWrapper,{...e}),jsxRuntime.jsx("div",{"data-outline":!0,"data-outline-section":"Section"==e.tag,"data-outline-theme-section":"Section"==e.tag&&!!i||s,"data-outline-shopify-section":"Section"==e.tag&&!!o,"data-outline-limit":ea,"data-outline-error":!!B},"outline-"+e.uid),"Section"==e.tag&&!s&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Tooltip.default,{enable:D()>=25,text:t("Page has reached Shopify’s 25 section-limit"),position:"top","data-toolbar-add-top":!0,"data-toolbar-disable":D()>=25,"data-toolbar-add-open":"above"==d,onClick:e=>ep(e,"above"),"aria-hidden":"true",children:jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:jsxRuntime.jsx("path",{d:"M8.45 3.95C8.45 3.70147 8.24853 3.5 8 3.5C7.75147 3.5 7.55 3.70147 7.55 3.95V7.55H3.95C3.70147 7.55 3.5 7.75147 3.5 8C3.5 8.24853 3.70147 8.45 3.95 8.45H7.55V12.05C7.55 12.2985 7.75147 12.5 8 12.5C8.24853 12.5 8.45 12.2985 8.45 12.05V8.45H12.05C12.2985 8.45 12.5 8.24853 12.5 8C12.5 7.75147 12.2985 7.55 12.05 7.55H8.45V3.95Z",fill:"#212121"})})}),jsxRuntime.jsx(Tooltip.default,{enable:D()>=25,text:t("Page has reached Shopify’s 25 section-limit"),position:"top","data-toolbar-add-bottom":!0,"data-toolbar-disable":D()>=25,"data-toolbar-add-open":"below"==d,onClick:e=>ep(e,"below"),"aria-hidden":"true",children:jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:jsxRuntime.jsx("path",{d:"M8.45 3.95C8.45 3.70147 8.24853 3.5 8 3.5C7.75147 3.5 7.55 3.70147 7.55 3.95V7.55H3.95C3.70147 7.55 3.5 7.75147 3.5 8C3.5 8.24853 3.70147 8.45 3.95 8.45H7.55V12.05C7.55 12.2985 7.75147 12.5 8 12.5C8.24853 12.5 8.45 12.2985 8.45 12.05V8.45H12.05C12.2985 8.45 12.5 8.24853 12.5 8C12.5 7.75147 12.2985 7.55 12.05 7.55H8.45V3.95Z",fill:"#212121"})})})]}),B&&jsxRuntime.jsx(SectionErrorBanner.SectionErrorBanner,{errorSectionInfo:B,onDismiss:en}),constant.ableGenerateContentElements.includes(e.tag)&&b&&jsxRuntime.jsx(AIGenContentLoading.AIGenContentLoading,{...e}),b&&jsxRuntime.jsx(Resize.default,{...e})]})};var ComponentToolbarPreview$1=react.memo(ComponentToolbarPreview);exports.default=ComponentToolbarPreview$1;
|
|
@@ -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)=>{let
|
|
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)=>{let l=o?`${t?.desktop}${o}`:t?.desktop,s=o?`${t?.tablet}${o}`:t?.tablet,i=o?`${t?.mobile}${o}`:t?.mobile,a={};return l&&(a[`--${e}`]=l),s&&s!==l&&(a[`--${e}-tablet`]=s),i&&i!==s&&(a[`--${e}-mobile`]=i),a},makeWidth=(e,t)=>{let o=(e,t,o)=>{let l=getResonsiveValue.getResponsiveValueByScreen(t,e),s=o?.[e]===void 0?o?.desktop:o?.[e];return s?"100%":!1===s?l??l:l||"auto"},l=o("desktop",e,t),s=o("tablet",e,t),i=o("mobile",e,t),a={};return l&&(a.desktop=l),s&&s!==l&&(a.tablet=s),i&&i!==s&&(a.mobile=i),a},makeGlobalSizeWidthResponsive=e=>{let t=e?.desktop?.width,o=e?.tablet?.width,l=e?.mobile?.width,s={};return t&&(s["--w"]=t),o&&o!==t&&(s["--w-tablet"]=o),l&&l!==o&&(s["--w-mobile"]=l),s},makeGlobalSizeHeightResponsive=e=>{let t=e?.desktop?.height,o=e?.tablet?.height,l=e?.mobile?.height,s={};return t&&(s["--h"]=t),o&&o!==t&&(s["--h-tablet"]=o),l&&l!==o&&(s["--h-mobile"]=l),s},makeHeight=(e,t)=>{let o=(e,t,o)=>{let l=t?.[e],s=o?.[e];return s?"auto":!1===s?l??l:l},l=o("desktop",e,t),s=o("tablet",e,t),i=o("mobile",e,t),a={};return l&&(a.desktop=l),s&&s!==l&&(a.tablet=s),i&&i!==s&&(a.mobile=i),a},makeAspectRatio=(e,t,o)=>{let l={},s=["desktop","mobile","tablet"];return s.forEach(s=>{let i=getResonsiveValue.getResponsiveValueByScreen(e,s);"none"!==i&&(l={...l,[s]:"custom"!==i?i:`${getResonsiveValue.getResponsiveValueByScreen(t,"desktop")}/${getResonsiveValue.getResponsiveValueByScreen(o,"desktop")}`})}),l},makeLineClamp=(e,t)=>{let o=(e,t,o)=>{let l=getResonsiveValue.getResponsiveValueByScreen(t,e),s=getResonsiveValue.getResponsiveValueByScreen(o,e);return 0===l?"0":s||void 0===s?l:"unset"},l=o("desktop",e,t),s=o("tablet",e,t),i=o("mobile",e,t),a={};return l&&(a.desktop=l),s&&s!==l&&(a.tablet=s),i&&i!==s&&(a.mobile=i),a},getResponsiveWidthValue=(e,t,o)=>o?`${t?.[e]}${o}`:t?.[e]==="default"?"1200px":t?.[e],makeStyleResponsiveWidth=(e,t)=>{let o=getResponsiveWidthValue("desktop",e,t),l=getResponsiveWidthValue("tablet",e,t),s=getResponsiveWidthValue("mobile",e,t),i={};return o&&(i["--w"]=o),l&&l!==o&&(i["--w-tablet"]=l),s&&s!==l&&(i["--w-mobile"]=s),i},getResponsiveWidthValueWithoutAuto=(e,t,o)=>{if(o)return`${t?.[e]}${o}`;switch(t?.[e]){case"default":return"1200px";case"Auto":return"100%";default:return t?.[e]}},makeStyleResponsiveWidthWithoutAuto=(e,t)=>{let o=getResponsiveWidthValueWithoutAuto("desktop",e,t),l=getResponsiveWidthValueWithoutAuto("tablet",e,t),s=getResponsiveWidthValueWithoutAuto("mobile",e,t),i={};return o&&(i["--w"]=o),l&&l!==o&&(i["--w-tablet"]=l),s&&s!==l&&(i["--w-mobile"]=s),i};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.makeStyleResponsiveState=makeStyleResponsiveState,exports.makeStyleResponsiveWidth=makeStyleResponsiveWidth,exports.makeStyleResponsiveWidthWithoutAuto=makeStyleResponsiveWidthWithoutAuto,exports.makeStyleState=makeStyleState,exports.makeWidth=makeWidth,exports.removeNullUndefined=removeNullUndefined;
|
package/dist/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var AddOn=require("./components/AddOn.js"),Render=require("./components/Render.js"),RenderPreview=require("./components/RenderPreview.js"),Render_liquid=require("./components/Render.liquid.js"),AddonContext=require("./contexts/AddonContext.js"),BuilderComponent=require("./contexts/BuilderComponent.js"),BuilderContext=require("./contexts/BuilderContext.js"),BuilderPreviewContext=require("./contexts/BuilderPreviewContext.js"),CartLineContext=require("./contexts/CartLineContext.js"),ProductListContext=require("./contexts/ProductListContext.js"),ProductContext=require("./contexts/ProductContext.js"),SectionContext=require("./contexts/SectionContext.js"),ShopContext=require("./contexts/ShopContext.js"),PageContext=require("./contexts/PageContext.js"),CollectionContext=require("./contexts/CollectionContext.js"),ModalContext=require("./contexts/ModalContext.js"),ArticleListContext=require("./contexts/ArticleListContext.js"),ArticleContext=require("./contexts/ArticleContext.js"),I18nContext=require("./contexts/I18nContext.js"),pageViewUp_generated=require("./graphql/mutations/page-view-up.generated.js"),collectionDetailFilter_generated=require("./graphql/queries/collection-detail-filter.generated.js"),collection_generated=require("./graphql/queries/collection.generated.js"),collections_generated=require("./graphql/queries/collections.generated.js"),publishedThemePages_generated=require("./graphql/queries/published-theme-pages.generated.js"),products_generated=require("./graphql/queries/products.generated.js"),storeProperty_generated=require("./graphql/queries/store-property.generated.js"),previewPage_generated=require("./graphql/queries/preview-page.generated.js"),publishedShopMetas_generated=require("./graphql/queries/published-shop-metas.generated.js"),shopShopify_generated=require("./graphql/queries/shop-shopify.generated.js"),articles_generated=require("./graphql/queries/articles.generated.js"),blogs_generated=require("./graphql/queries/blogs.generated.js"),productsWithSellingPlans_generated=require("./graphql/queries/products-with-selling-plans.generated.js"),productVariantWithSellingPlans_generated=require("./graphql/queries/product-variant-with-selling-plans.generated.js"),LibraryTemplate_generated=require("./graphql-app-api/queries/LibraryTemplate.generated.js"),ThemePage_generated=require("./graphql-app-api/queries/ThemePage.generated.js"),SaleFunnelDiscounts_generated=require("./graphql-app-api/queries/SaleFunnelDiscounts.generated.js"),LibrarySaleFunnelDiscount_generated=require("./graphql-app-api/queries/LibrarySaleFunnelDiscount.generated.js"),ShopLibraryPage_generated=require("./graphql-app-api/queries/ShopLibraryPage.generated.js"),SaleFunnelOffer_generated=require("./graphql-app-api/queries/SaleFunnelOffer.generated.js"),ThemePageMeta_generated=require("./graphql-app-api/queries/ThemePageMeta.generated.js"),borders=require("./helpers/borders.js"),carousel=require("./helpers/carousel.js"),cls=require("./helpers/cls.js"),animations=require("./helpers/animations.js"),filterToolbarPreview=require("./helpers/filter-toolbar-preview.js"),flattenConnection=require("./helpers/flatten-connection.js"),getResonsiveValue=require("./helpers/get-resonsive-value.js"),getShortname=require("./helpers/get-shortname.js"),GlobalEvent=require("./helpers/GlobalEvent.js"),isBrowser=require("./helpers/is-browser.js"),isEmptyChildren=require("./helpers/is-empty-children.js"),isSafari=require("./helpers/is-safari.js"),normalizeBuilderData=require("./helpers/normalize-builder-data.js"),prefetchQueries=require("./helpers/prefetch-queries.js"),email=require("./helpers/email.js"),loadScript=require("./helpers/load-script.js"),spacing=require("./helpers/spacing.js"),cssVariable=require("./helpers/css-variable.js"),fpixel=require("./helpers/tracking/fpixel.js"),gtag=require("./helpers/tracking/gtag.js"),tiktokpixel=require("./helpers/tracking/tiktokpixel.js"),background=require("./helpers/background.js"),backgroundImage=require("./helpers/backgroundImage.js"),colors=require("./helpers/colors.js"),composeAdvanceStyle=require("./helpers/compose-advance-style.js"),composeClasses=require("./helpers/composeClasses.js"),convert=require("./helpers/convert.js"),covertEntitiesHtml=require("./helpers/covert-entities-html.js"),iconList=require("./helpers/icon-list.js"),isDefined=require("./helpers/is-defined.js"),layout=require("./helpers/layout.js"),makeStyle=require("./helpers/make-style.js"),align=require("./helpers/align.js"),filterStyles=require("./helpers/filter-styles.js"),cloneDeep=require("./helpers/clone-deep.js"),liquid=require("./helpers/liquid.js"),variant=require("./helpers/variant.js"),product=require("./helpers/product.js"),query=require("./helpers/query.js"),radius=require("./helpers/radius.js"),render=require("./helpers/render.js"),shadow=require("./helpers/shadow.js"),size=require("./helpers/size.js"),typography=require("./helpers/typography.js"),useArticlesQuery=require("./hooks/articles/useArticlesQuery.js"),useAddToCart=require("./hooks/cart/use-add-to-cart.js"),useCartData=require("./hooks/cart/use-cart-data.js"),useCartDiscountCodesUpdate=require("./hooks/cart/use-cart-discount-codes-update.js"),useCartNoteUpdate=require("./hooks/cart/use-cart-note-update.js"),useCreateCart=require("./hooks/cart/use-create-cart.js"),useRemoveCartItem=require("./hooks/cart/use-remove-cart-item.js"),useUpdateCartItem=require("./hooks/cart/use-update-cart-item.js"),shop=require("./hooks/shop.js"),useCollectionQuery=require("./hooks/shop/use-collection-query.js"),useCollectionsQuery=require("./hooks/shop/use-collections-query.js"),useProductQuery=require("./hooks/shop/use-product-query.js"),useProductOffersQuery=require("./hooks/shop/useProductOffersQuery.js"),useFetchHandle=require("./hooks/useFetchHandle.js"),useProductsQuery=require("./hooks/shop/use-products-query.js"),useCurrentDevice=require("./hooks/use-current-device.js"),useLazyVideo=require("./hooks/use-lazy-video.js"),useCartId=require("./hooks/useCartId.js"),useCartLine=require("./hooks/useCartLine.js"),useCartUI=require("./hooks/useCartUI.js"),useCollection=require("./hooks/useCollection.js"),useFormatMoney=require("./hooks/useFormatMoney.js"),react=require("react"),useInitialSwatchesOptions=require("./hooks/useInitialSwatchesOptions.js"),useIsomorphicLayoutEffect=require("./hooks/useIsomorphicLayoutEffect.js"),useLoadScript=require("./hooks/useLoadScript.js"),useMoney=require("./hooks/useMoney.js"),usePrevious=require("./hooks/usePrevious.js"),useI18n=require("./hooks/useI18n.js"),useStickyStore=require("./hooks/useStickyStore.js"),useProduct=require("./hooks/useProduct.js"),useShopifyLink=require("./hooks/shop/useShopifyLink.js"),useProductList=require("./hooks/useProductList.js"),useSuspenseFetch=require("./hooks/useSuspenseFetch.js"),useSwatchesOptions=require("./hooks/useSwatchesOptions.js"),useRenderMode=require("./hooks/useRenderMode.js"),usePreviewSharePage=require("./hooks/usePreviewSharePage.js"),builder=require("./types/builder.js"),custom=require("./types/custom.js"),shop$1=require("./types/shop.js"),appAPI=require("./types/appAPI.js"),globalStyle=require("./types/global-style.js"),animations$1=require("./types/animations.js"),getCollection=require("./helpers/queries/get-collection.js"),getProduct=require("./helpers/queries/get-product.js"),getProductBySlug=require("./helpers/queries/get-product-by-slug.js"),getAppBlocks=require("./helpers/third-party/getAppBlocks.js"),addAppBlockId=require("./helpers/third-party/addAppBlockId.js"),index=require("./helpers/interaction/index.js"),createStoreFrontFetcher=require("./helpers/create-store-front-fetcher.js"),device=require("./constants/device.js");exports.AddOn=AddOn.default,exports.Render=Render.default,exports.RenderPreview=RenderPreview.default,exports.RenderChildren=Render_liquid.RenderChildren,exports.RenderLiquid=Render_liquid.default,exports.WrapRenderChildren=Render_liquid.WrapRenderChildren,exports.AddonProvider=AddonContext.AddonProvider,exports.useAddon=AddonContext.useAddon,exports.useAddons=AddonContext.useAddons,exports.BuilderComponentProvider=BuilderComponent.BuilderComponentProvider,exports.useBuilderComponent=BuilderComponent.useBuilderComponent,exports.BuilderProvider=BuilderContext.BuilderProvider,exports.useBuilderStore=BuilderContext.useBuilderStore,exports.BuilderPreviewProvider=BuilderPreviewContext.BuilderPreviewProvider,exports.useBuilderPreviewStore=BuilderPreviewContext.useBuilderPreviewStore,exports.CartLineProvider=CartLineContext.CartLineProvider,exports.useCartLineStore=CartLineContext.useCartLineStore,exports.ProductListProvider=ProductListContext.ProductListProvider,exports.useProductListStore=ProductListContext.useProductListStore,exports.ProductProvider=ProductContext.ProductProvider,exports.useProductStore=ProductContext.useProductStore,exports.SectionProvider=SectionContext.SectionProvider,exports.useSection=SectionContext.useSection,exports.useSectionStore=SectionContext.useSectionStore,exports.ShopProvider=ShopContext.ShopProvider,exports.useShopStore=ShopContext.useShopStore,exports.PageProvider=PageContext.PageProvider,exports.usePageStore=PageContext.usePageStore,exports.CollectionProvider=CollectionContext.CollectionProvider,exports.useCollectionStore=CollectionContext.useCollectionStore,exports.ModalProvider=ModalContext.ModalProvider,exports.useModalStore=ModalContext.useModalStore,exports.ArticleListProvider=ArticleListContext.ArticleListProvider,exports.useArticleListStore=ArticleListContext.useArticleListStore,exports.ArticleProvider=ArticleContext.ArticleProvider,exports.useArticleStore=ArticleContext.useArticleStore,exports.I18nProvider=I18nContext.I18nProvider,exports.useI18nStore=I18nContext.useI18nStore,exports.PageViewUpDocument=pageViewUp_generated.PageViewUpDocument,exports.CollectionDetailFilterDocument=collectionDetailFilter_generated.CollectionDetailFilterDocument,exports.CollectionDocument=collection_generated.CollectionDocument,exports.CollectionsDocument=collections_generated.CollectionsDocument,exports.PublishedThemePagesDocument=publishedThemePages_generated.PublishedThemePagesDocument,exports.ProductsDocument=products_generated.ProductsDocument,exports.StorePropertyDocument=storeProperty_generated.StorePropertyDocument,exports.PreviewThemePageDocument=previewPage_generated.PreviewThemePageDocument,exports.PublishedShopMetasDocument=publishedShopMetas_generated.PublishedShopMetasDocument,exports.ShopShopifyDocument=shopShopify_generated.ShopShopifyDocument,exports.ArticlesDocument=articles_generated.ArticlesDocument,exports.BlogsDocument=blogs_generated.BlogsDocument,exports.ProductWithSellingPlansSelectFragment=productsWithSellingPlans_generated.ProductWithSellingPlansSelectFragment,exports.ProductsWithSellingPlansDocument=productsWithSellingPlans_generated.ProductsWithSellingPlansDocument,exports.ProductVariantsWithSellingPlansDocument=productVariantWithSellingPlans_generated.ProductVariantsWithSellingPlansDocument,exports.LibraryTemplateDocument=LibraryTemplate_generated.LibraryTemplateDocument,exports.ThemePageDocument=ThemePage_generated.ThemePageDocument,exports.SaleFunnelDiscountsDocument=SaleFunnelDiscounts_generated.SaleFunnelDiscountsDocument,exports.LibrarySaleFunnelDocument=LibrarySaleFunnelDiscount_generated.LibrarySaleFunnelDocument,exports.ShopLibraryPageDocument=ShopLibraryPage_generated.ShopLibraryPageDocument,exports.SaleFunnelOfferDocument=SaleFunnelOffer_generated.SaleFunnelOfferDocument,exports.ThemePageMetaDocument=ThemePageMeta_generated.ThemePageMetaDocument,exports.composeBorderCss=borders.composeBorderCss,exports.composeBorderResponsive=borders.composeBorderResponsive,exports.getBorderRadiusStyle=borders.getBorderRadiusStyle,exports.getBorderStyle=borders.getBorderStyle,exports.handleConvertBorderColor=borders.handleConvertBorderColor,exports.handleConvertBorderStyle=borders.handleConvertBorderStyle,exports.handleConvertBorderWidth=borders.handleConvertBorderWidth,exports.handleConvertClassColor=borders.handleConvertClassColor,exports.handleConvertClassColorDynamicBtn=borders.handleConvertClassColorDynamicBtn,exports.handleConvertInputBorderColor=borders.handleConvertInputBorderColor,exports.getCarouselContainerHeight=carousel.getCarouselContainerHeight,exports.makeContainerWidthOrHeight=carousel.makeContainerWidthOrHeight,exports.makeDotGapToCarouselStyle=carousel.makeDotGapToCarouselStyle,exports.cls=cls.cls,exports.animations=animations.animations,exports.filterToolbarPreview=filterToolbarPreview.filterToolbarPreview,exports.flattenConnection=flattenConnection.flattenConnection,exports.getResponsiveStateValue=getResonsiveValue.getResponsiveStateValue,exports.getResponsiveValue=getResonsiveValue.getResponsiveValue,exports.getResponsiveValueByScreen=getResonsiveValue.getResponsiveValueByScreen,exports.isColumnDirectionExist=getResonsiveValue.isColumnDirectionExist,exports.getShortName=getShortname.getShortName,exports.globalEvent=GlobalEvent.default,exports.isBrowser=isBrowser.default,exports.isEmptyChildren=isEmptyChildren.isEmptyChildren,exports.isSafari=isSafari.default,exports.normalizeBuilderData=normalizeBuilderData.normalizeBuilderData,exports.prefetchQueries=prefetchQueries.prefetchQueries,exports.validateEmail=email.validateEmail,exports.loadScript=loadScript.loadScript,exports.composeSpacing=spacing.composeSpacing,exports.getSpacingVariable=spacing.getSpacingVariable,exports.genVariable=cssVariable.genVariable,exports.fpixel=fpixel,exports.gtag=gtag,exports.tiktokpixel=tiktokpixel,exports.GRADIENT_BGR_KEY=background.GRADIENT_BGR_KEY,exports.composeBackgroundCss=background.composeBackgroundCss,exports.getBgByDevice=background.getBgByDevice,exports.getBgImageByDevice=background.getBgImageByDevice,exports.getBgVideoByDevice=background.getBgVideoByDevice,exports.getColor=background.getColor,exports.getCombinedBackgroundImage=background.getCombinedBackgroundImage,exports.getGradientBgrStyleByDevice=background.getGradientBgrStyleByDevice,exports.getGradientBgrStyleForButton=background.getGradientBgrStyleForButton,exports.getGradientImageBgrStyleByDevice=background.getGradientImageBgrStyleByDevice,exports.getStyleBackgroundByDevice=background.getStyleBackgroundByDevice,exports.getStyleBgColor=background.getStyleBgColor,exports.makeFixedBgAttachment=background.makeFixedBgAttachment,exports.composeBackgroundImageCss=backgroundImage.composeBackgroundImageCss,exports.getBgImageSourceByDevice=backgroundImage.getBgImageSourceByDevice,exports.getStyleBackgroundImage=backgroundImage.getStyleBackgroundImage,exports.getStyleBgImageSource=backgroundImage.getStyleBgImageSource,exports.composeTextColorCss=colors.composeTextColorCss,exports.getGlobalColorCSSProp=colors.getGlobalColorCSSProp,exports.getGlobalColorClass=colors.getGlobalColorClass,exports.getGlobalColorResponsiveClass=colors.getGlobalColorResponsiveClass,exports.getGlobalColorResponsiveStyle=colors.getGlobalColorResponsiveStyle,exports.getGlobalColorStateClass=colors.getGlobalColorStateClass,exports.getGlobalColorStateClassDynamicBtn=colors.getGlobalColorStateClassDynamicBtn,exports.getGlobalColorStateResponsiveClass=colors.getGlobalColorStateResponsiveClass,exports.getGlobalColorStateResponsiveClassDynamicBtn=colors.getGlobalColorStateResponsiveClassDynamicBtn,exports.getGlobalColorStateResponsiveStyle=colors.getGlobalColorStateResponsiveStyle,exports.getGlobalColorStateStyle=colors.getGlobalColorStateStyle,exports.getGlobalColorStyle=colors.getGlobalColorStyle,exports.getSingleColorVariable=colors.getSingleColorVariable,exports.isColor=colors.isColor,exports.composeAdvanceStyle=composeAdvanceStyle.composeAdvanceStyle,exports.composeAdvanceStyleForPostPurchase=composeAdvanceStyle.composeAdvanceStyleForPostPurchase,exports.convertBoxShadowV1ToV2=composeAdvanceStyle.convertBoxShadowV1ToV2,exports.filterAttrInStyle=composeAdvanceStyle.filterAttrInStyle,exports.getCornerStyle=composeAdvanceStyle.getCornerStyle,exports.removeAttrInStyle=composeAdvanceStyle.removeAttrInStyle,exports.removePaddingYInStyle=composeAdvanceStyle.removePaddingYInStyle,exports.splitStyle=composeAdvanceStyle.splitStyle,exports.composeClasses=composeClasses.composeClasses,exports.baseAssetURL=convert.baseAssetURL,exports.isLocalEnv=convert.isLocalEnv,exports.convertHTML=covertEntitiesHtml.convertHTML,exports.composePositionLineHeight=iconList.composePositionLineHeight,exports.composePostionIconList=iconList.composePostionIconList,exports.isDefined=isDefined.isDefined,exports.composeGridLayout=layout.composeGridLayout,exports.convertOldLayout=layout.convertOldLayout,exports.getLayoutClasses=layout.getLayoutClasses,exports.gridToArrayRegex=layout.gridToArrayRegex,exports.optionLayoutStyle=layout.optionLayoutStyle,exports.makeAspectRatio=makeStyle.makeAspectRatio,exports.makeGlobalSizeHeightResponsive=makeStyle.makeGlobalSizeHeightResponsive,exports.makeGlobalSizeWidthResponsive=makeStyle.makeGlobalSizeWidthResponsive,exports.makeHeight=makeStyle.makeHeight,exports.makeLineClamp=makeStyle.makeLineClamp,exports.makeStyle=makeStyle.makeStyle,exports.makeStyleKey=makeStyle.makeStyleKey,exports.makeStyleResponsive=makeStyle.makeStyleResponsive,exports.makeStyleResponsiveByScreen=makeStyle.makeStyleResponsiveByScreen,exports.makeStyleResponsiveState=makeStyle.makeStyleResponsiveState,exports.makeStyleResponsiveWidth=makeStyle.makeStyleResponsiveWidth,exports.makeStyleResponsiveWidthWithoutAuto=makeStyle.makeStyleResponsiveWidthWithoutAuto,exports.makeStyleState=makeStyle.makeStyleState,exports.makeWidth=makeStyle.makeWidth,exports.removeNullUndefined=makeStyle.removeNullUndefined,exports.convertTextAlignToJustify=align.convertTextAlignToJustify,exports.getAlignmentClasses=align.getAlignmentClasses,exports.filterHoverVariables=filterStyles.filterHoverVariables,exports.filterTruthyStyles=filterStyles.filterTruthyStyles,exports.cloneDeep=cloneDeep.cloneDeep,exports.hasTranslatedLiquid=liquid.hasTranslatedLiquid,exports.checkInStock=variant.checkInStock,exports.checkAvailableVariantInStock=product.checkAvailableVariantInStock,exports.getSelectedVariant=product.getSelectedVariant,exports.parseSelectedOption=product.parseSelectedOption,exports.generateCollectionQueryKey=query.generateCollectionQueryKey,exports.generateProductQueryKey=query.generateProductQueryKey,exports.generateProductsQueryKey=query.generateProductsQueryKey,exports.composeCornerCss=radius.composeCornerCss,exports.composeRadius=radius.composeRadius,exports.composeRadiusResponsive=radius.composeRadiusResponsive,exports.getCornerCSSFromGlobal=radius.getCornerCSSFromGlobal,exports.getCustomRadius=radius.getCustomRadius,exports.getRadiusCSSFromGlobal=radius.getRadiusCSSFromGlobal,exports.getRadiusStyleActiveState=radius.getRadiusStyleActiveState,exports.RenderIf=render.RenderIf,exports.composeMemo=render.composeMemo,exports.dataStringify=render.dataStringify,exports.props=render.props,exports.removeUndefinedValuesFromObject=render.removeUndefinedValuesFromObject,exports.sanitizeLiquid=render.sanitizeLiquid,exports.styles=render.styles,exports.template=render.template,exports.composeShadow=shadow.composeShadow,exports.composeShadowCss=shadow.composeShadowCss,exports.getResponsiveStyleShadow=shadow.getResponsiveStyleShadow,exports.getResponsiveStyleShadowWithoutState=shadow.getResponsiveStyleShadowWithoutState,exports.getStyleShadow=shadow.getStyleShadow,exports.getStyleShadowState=shadow.getStyleShadowState,exports.parseValueWithUnit=shadow.parseValueWithUnit,exports.composeSize=size.composeSize,exports.composeSizeCss=size.composeSizeCss,exports.genSizeClass=size.genSizeClass,exports.getAspectRatioGlobalSize=size.getAspectRatioGlobalSize,exports.getFlexGrowClassByShapeGlobalSize=size.getFlexGrowClassByShapeGlobalSize,exports.getGlobalSizeGap=size.getGlobalSizeGap,exports.getHeightByShapeGlobalSize=size.getHeightByShapeGlobalSize,exports.getPaddingGlobalSize=size.getPaddingGlobalSize,exports.getPaddingStyleByDevice=size.getPaddingStyleByDevice,exports.getResponsiveStylePadding=size.getResponsiveStylePadding,exports.getValueByDevice=size.getValueByDevice,exports.getWidthByShapeGlobalSize=size.getWidthByShapeGlobalSize,exports.getWidthHeightGlobalSize=size.getWidthHeightGlobalSize,exports.makeGlobalSize=size.makeGlobalSize,exports.makeGlobalSizeIcon=size.makeGlobalSizeIcon,exports.makeStyleWithDefault=size.makeStyleWithDefault,exports.composeFallbackTypographyStyle=typography.composeFallbackTypographyStyle,exports.composeFontFamilyTypographyV2=typography.composeFontFamilyTypographyV2,exports.composeTextHoverColorCss=typography.composeTextHoverColorCss,exports.composeTypography=typography.composeTypography,exports.composeTypographyAttr=typography.composeTypographyAttr,exports.composeTypographyClassName=typography.composeTypographyClassName,exports.composeTypographyCss=typography.composeTypographyCss,exports.composeTypographyStyle=typography.composeTypographyStyle,exports.composeTypographyV2=typography.composeTypographyV2,exports.composeTypographyV2Css=typography.composeTypographyV2Css,exports.genTypoClass=typography.genTypoClass,exports.useArticlesQuery=useArticlesQuery.useArticlesQuery,exports.useBlogsQuery=useArticlesQuery.useBlogsQuery,exports.useAddToCart=useAddToCart.useAddToCart,exports.useCartData=useCartData.useCartData,exports.useCartDiscountCodesUpdate=useCartDiscountCodesUpdate.useCartDiscountCodesUpdate,exports.useCartNoteUpdate=useCartNoteUpdate.useCartNoteUpdate,exports.useCreateCart=useCreateCart.useCreateCart,exports.useRemoveCartItem=useRemoveCartItem.useRemoveCartItem,exports.useUpdateCartItem=useUpdateCartItem.useUpdateCartItem,exports.useCheckoutUrl=shop.useCheckoutUrl,exports.useConnectedShopify=shop.useConnectedShopify,exports.useCurrency=shop.useCurrency,exports.useEditorMode=shop.useEditorMode,exports.useIsSampleProduct=shop.useIsSampleProduct,exports.useIsStorefrontProduct=shop.useIsStorefrontProduct,exports.useLocale=shop.useLocale,exports.useMatchMutate=shop.useMatchMutate,exports.useMobileOnly=shop.useMobileOnly,exports.useMoneyFormat=shop.useMoneyFormat,exports.usePageType=shop.usePageType,exports.usePluginEnable=shop.usePluginEnable,exports.useStoreFront=shop.useStoreFront,exports.useSwatches=shop.useSwatches,exports.useTimezone=shop.useTimezone,exports.useCollectionQuery=useCollectionQuery.useCollectionQuery,exports.useCollectionsQuery=useCollectionsQuery.useCollectionsQuery,exports.useProductQuery=useProductQuery.useProductQuery,exports.useProductOffersQuery=useProductOffersQuery.useProductOffersQuery,exports.useFetchHandle=useFetchHandle.useFetchHandle,exports.useProductsQuery=useProductsQuery.useProductsQuery,exports.useProductsQueryAll=useProductsQuery.useProductsQueryAll,exports.useCurrentDevice=useCurrentDevice.useCurrentDevice,exports.useLazyVideo=useLazyVideo.useLazyVideo,exports.useCartId=useCartId.default,exports.useCartLine=useCartLine.default,exports.useCartUI=useCartUI.default,exports.useCollection=useCollection.useCollection,exports.convertDecimalToNumber=useFormatMoney.convertDecimalToNumber,exports.formatMoney=useFormatMoney.formatMoney,exports.shopifyPriceRounding=useFormatMoney.shopifyPriceRounding,exports.useFormatMoney=useFormatMoney.useFormatMoney,Object.defineProperty(exports,"useId",{enumerable:!0,get:function(){return react.useId}}),exports.useInitialSwatchesOptions=useInitialSwatchesOptions.default,exports.useIsomorphicLayoutEffect=useIsomorphicLayoutEffect.default,exports.useLoadScript=useLoadScript.default,exports.useMoney=useMoney.default,exports.usePrevious=usePrevious.usePrevious,Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return useI18n.tGlobal}}),exports.useI18n=useI18n.useI18n,exports.useStickyStore=useStickyStore.useStickyStore,exports.useCheckAvailableVariantInStock=useProduct.useCheckAvailableVariantInStock,exports.useCurrentVariant=useProduct.useCurrentVariant,exports.useCurrentVariantInStock=useProduct.useCurrentVariantInStock,exports.useFeaturedImageGlobal=useProduct.useFeaturedImageGlobal,exports.useHasPreSelected=useProduct.useHasPreSelected,exports.useIsSyncProduct=useProduct.useIsSyncProduct,exports.useProduct=useProduct.useProduct,exports.useProductBundleDiscount=useProduct.useProductBundleDiscount,exports.useProductOfferDiscount=useProduct.useProductOfferDiscount,exports.useProductProperties=useProduct.useProductProperties,exports.useProductShopifyEditLink=useProduct.useProductShopifyEditLink,exports.useQuantity=useProduct.useQuantity,exports.useSelectedOption=useProduct.useSelectedOption,exports.useUniqProductID=useProduct.useUniqProductID,exports.useVariant=useProduct.useVariant,exports.useVariantOutStock=useProduct.useVariantOutStock,exports.useVariants=useProduct.useVariants,exports.useShopifyLink=useShopifyLink.useShopifyLink,exports.useProductList=useProductList.useProductList,exports.useProductListProducts=useProductList.useProductListProducts,exports.useProductListSettings=useProductList.useProductListSettings,exports.useProductListStyles=useProductList.useProductListStyles,exports.useSuspenseFetch=useSuspenseFetch.default,exports.useSwatchesOptions=useSwatchesOptions.default,exports.useRenderMode=useRenderMode.useRenderMode,exports.usePreviewSharePage=usePreviewSharePage.usePreviewSharePage,Object.defineProperty(exports,"RenderModeEnv",{enumerable:!0,get:function(){return builder.RenderModeEnv}}),Object.defineProperty(exports,"InteractionTargetEvent",{enumerable:!0,get:function(){return custom.InteractionTargetEvent}}),Object.defineProperty(exports,"InteractionTriggerEvent",{enumerable:!0,get:function(){return custom.InteractionTriggerEvent}}),exports.ShopType=shop$1,exports.AppAPIType=appAPI,exports.OptionNormalStyle=globalStyle.OptionNormalStyle,exports.OptionSpecialStyle=globalStyle.OptionSpecialStyle,Object.defineProperty(exports,"AnimationDirectionType",{enumerable:!0,get:function(){return animations$1.AnimationDirectionType}}),Object.defineProperty(exports,"AnimationEasingType",{enumerable:!0,get:function(){return animations$1.AnimationEasingType}}),Object.defineProperty(exports,"AnimationSetting",{enumerable:!0,get:function(){return animations$1.AnimationSetting}}),Object.defineProperty(exports,"AnimationTriggerType",{enumerable:!0,get:function(){return animations$1.AnimationTriggerType}}),Object.defineProperty(exports,"AnimationType",{enumerable:!0,get:function(){return animations$1.AnimationType}}),Object.defineProperty(exports,"AnimationZoomDirectionType",{enumerable:!0,get:function(){return animations$1.AnimationZoomDirectionType}}),exports.calculateFirstProduct=getCollection.calculateFirstProduct,exports.getCollection=getCollection.getCollection,exports.fetchMedias=getProduct.fetchMedias,exports.fetchVariants=getProduct.fetchVariants,exports.getProduct=getProduct.getProduct,exports.getProductBySlug=getProductBySlug.getProductBySlug,exports.getAppBlocks=getAppBlocks.getAppBlocks,exports.addAppBlockId=addAppBlockId.addAppBlockId,exports.useInteraction=index.useInteraction,exports.createStoreFrontFetcher=createStoreFrontFetcher.createStoreFrontFetcher,exports.hasPublicStoreFrontData=createStoreFrontFetcher.hasPublicStoreFrontData,exports.DEVICES=device.DEVICES,exports.EMPTY_DEVICE_VALUE=device.EMPTY_DEVICE_VALUE;
|
|
1
|
+
"use strict";var AddOn=require("./components/AddOn.js"),Render=require("./components/Render.js"),RenderPreview=require("./components/RenderPreview.js"),Render_liquid=require("./components/Render.liquid.js"),AddonContext=require("./contexts/AddonContext.js"),BuilderComponent=require("./contexts/BuilderComponent.js"),BuilderContext=require("./contexts/BuilderContext.js"),BuilderPreviewContext=require("./contexts/BuilderPreviewContext.js"),CartLineContext=require("./contexts/CartLineContext.js"),ProductListContext=require("./contexts/ProductListContext.js"),ProductContext=require("./contexts/ProductContext.js"),SectionContext=require("./contexts/SectionContext.js"),ShopContext=require("./contexts/ShopContext.js"),PageContext=require("./contexts/PageContext.js"),CollectionContext=require("./contexts/CollectionContext.js"),ModalContext=require("./contexts/ModalContext.js"),ArticleListContext=require("./contexts/ArticleListContext.js"),ArticleContext=require("./contexts/ArticleContext.js"),I18nContext=require("./contexts/I18nContext.js"),pageViewUp_generated=require("./graphql/mutations/page-view-up.generated.js"),collectionDetailFilter_generated=require("./graphql/queries/collection-detail-filter.generated.js"),collection_generated=require("./graphql/queries/collection.generated.js"),collections_generated=require("./graphql/queries/collections.generated.js"),publishedThemePages_generated=require("./graphql/queries/published-theme-pages.generated.js"),products_generated=require("./graphql/queries/products.generated.js"),storeProperty_generated=require("./graphql/queries/store-property.generated.js"),previewPage_generated=require("./graphql/queries/preview-page.generated.js"),publishedShopMetas_generated=require("./graphql/queries/published-shop-metas.generated.js"),shopShopify_generated=require("./graphql/queries/shop-shopify.generated.js"),articles_generated=require("./graphql/queries/articles.generated.js"),blogs_generated=require("./graphql/queries/blogs.generated.js"),productsWithSellingPlans_generated=require("./graphql/queries/products-with-selling-plans.generated.js"),productVariantWithSellingPlans_generated=require("./graphql/queries/product-variant-with-selling-plans.generated.js"),LibraryTemplate_generated=require("./graphql-app-api/queries/LibraryTemplate.generated.js"),ThemePage_generated=require("./graphql-app-api/queries/ThemePage.generated.js"),SaleFunnelDiscounts_generated=require("./graphql-app-api/queries/SaleFunnelDiscounts.generated.js"),LibrarySaleFunnelDiscount_generated=require("./graphql-app-api/queries/LibrarySaleFunnelDiscount.generated.js"),ShopLibraryPage_generated=require("./graphql-app-api/queries/ShopLibraryPage.generated.js"),SaleFunnelOffer_generated=require("./graphql-app-api/queries/SaleFunnelOffer.generated.js"),ThemePageMeta_generated=require("./graphql-app-api/queries/ThemePageMeta.generated.js"),borders=require("./helpers/borders.js"),carousel=require("./helpers/carousel.js"),cls=require("./helpers/cls.js"),animations=require("./helpers/animations.js"),filterToolbarPreview=require("./helpers/filter-toolbar-preview.js"),flattenConnection=require("./helpers/flatten-connection.js"),getResonsiveValue=require("./helpers/get-resonsive-value.js"),getShortname=require("./helpers/get-shortname.js"),GlobalEvent=require("./helpers/GlobalEvent.js"),isBrowser=require("./helpers/is-browser.js"),isEmptyChildren=require("./helpers/is-empty-children.js"),isSafari=require("./helpers/is-safari.js"),normalizeBuilderData=require("./helpers/normalize-builder-data.js"),prefetchQueries=require("./helpers/prefetch-queries.js"),email=require("./helpers/email.js"),loadScript=require("./helpers/load-script.js"),spacing=require("./helpers/spacing.js"),cssVariable=require("./helpers/css-variable.js"),fpixel=require("./helpers/tracking/fpixel.js"),gtag=require("./helpers/tracking/gtag.js"),tiktokpixel=require("./helpers/tracking/tiktokpixel.js"),background=require("./helpers/background.js"),backgroundImage=require("./helpers/backgroundImage.js"),colors=require("./helpers/colors.js"),composeAdvanceStyle=require("./helpers/compose-advance-style.js"),composeClasses=require("./helpers/composeClasses.js"),convert=require("./helpers/convert.js"),covertEntitiesHtml=require("./helpers/covert-entities-html.js"),iconList=require("./helpers/icon-list.js"),isDefined=require("./helpers/is-defined.js"),layout=require("./helpers/layout.js"),makeStyle=require("./helpers/make-style.js"),align=require("./helpers/align.js"),filterStyles=require("./helpers/filter-styles.js"),cloneDeep=require("./helpers/clone-deep.js"),liquid=require("./helpers/liquid.js"),variant=require("./helpers/variant.js"),product=require("./helpers/product.js"),query=require("./helpers/query.js"),radius=require("./helpers/radius.js"),render=require("./helpers/render.js"),shadow=require("./helpers/shadow.js"),size=require("./helpers/size.js"),typography=require("./helpers/typography.js"),useArticlesQuery=require("./hooks/articles/useArticlesQuery.js"),useAddToCart=require("./hooks/cart/use-add-to-cart.js"),useCartData=require("./hooks/cart/use-cart-data.js"),useCartDiscountCodesUpdate=require("./hooks/cart/use-cart-discount-codes-update.js"),useCartNoteUpdate=require("./hooks/cart/use-cart-note-update.js"),useCreateCart=require("./hooks/cart/use-create-cart.js"),useRemoveCartItem=require("./hooks/cart/use-remove-cart-item.js"),useUpdateCartItem=require("./hooks/cart/use-update-cart-item.js"),shop=require("./hooks/shop.js"),useCollectionQuery=require("./hooks/shop/use-collection-query.js"),useCollectionsQuery=require("./hooks/shop/use-collections-query.js"),useProductQuery=require("./hooks/shop/use-product-query.js"),useProductOffersQuery=require("./hooks/shop/useProductOffersQuery.js"),useFetchHandle=require("./hooks/useFetchHandle.js"),useProductsQuery=require("./hooks/shop/use-products-query.js"),useCurrentDevice=require("./hooks/use-current-device.js"),useLazyVideo=require("./hooks/use-lazy-video.js"),useCartId=require("./hooks/useCartId.js"),useCartLine=require("./hooks/useCartLine.js"),useCartUI=require("./hooks/useCartUI.js"),useCollection=require("./hooks/useCollection.js"),useFormatMoney=require("./hooks/useFormatMoney.js"),react=require("react"),useInitialSwatchesOptions=require("./hooks/useInitialSwatchesOptions.js"),useIsomorphicLayoutEffect=require("./hooks/useIsomorphicLayoutEffect.js"),useLoadScript=require("./hooks/useLoadScript.js"),useMoney=require("./hooks/useMoney.js"),usePrevious=require("./hooks/usePrevious.js"),useI18n=require("./hooks/useI18n.js"),useStickyStore=require("./hooks/useStickyStore.js"),useProduct=require("./hooks/useProduct.js"),useShopifyLink=require("./hooks/shop/useShopifyLink.js"),useProductList=require("./hooks/useProductList.js"),useSuspenseFetch=require("./hooks/useSuspenseFetch.js"),useSwatchesOptions=require("./hooks/useSwatchesOptions.js"),useRenderMode=require("./hooks/useRenderMode.js"),usePreviewSharePage=require("./hooks/usePreviewSharePage.js"),builder=require("./types/builder.js"),custom=require("./types/custom.js"),shop$1=require("./types/shop.js"),appAPI=require("./types/appAPI.js"),globalStyle=require("./types/global-style.js"),animations$1=require("./types/animations.js"),getCollection=require("./helpers/queries/get-collection.js"),getProduct=require("./helpers/queries/get-product.js"),getProductBySlug=require("./helpers/queries/get-product-by-slug.js"),getAppBlocks=require("./helpers/third-party/getAppBlocks.js"),addAppBlockId=require("./helpers/third-party/addAppBlockId.js"),index=require("./helpers/interaction/index.js"),createStoreFrontFetcher=require("./helpers/create-store-front-fetcher.js"),device=require("./constants/device.js");exports.AddOn=AddOn.default,exports.Render=Render.default,exports.RenderPreview=RenderPreview.default,exports.RenderChildren=Render_liquid.RenderChildren,exports.RenderLiquid=Render_liquid.default,exports.WrapRenderChildren=Render_liquid.WrapRenderChildren,exports.AddonProvider=AddonContext.AddonProvider,exports.useAddon=AddonContext.useAddon,exports.useAddons=AddonContext.useAddons,exports.BuilderComponentProvider=BuilderComponent.BuilderComponentProvider,exports.useBuilderComponent=BuilderComponent.useBuilderComponent,exports.BuilderProvider=BuilderContext.BuilderProvider,exports.useBuilderStore=BuilderContext.useBuilderStore,exports.BuilderPreviewProvider=BuilderPreviewContext.BuilderPreviewProvider,exports.useBuilderPreviewStore=BuilderPreviewContext.useBuilderPreviewStore,exports.CartLineProvider=CartLineContext.CartLineProvider,exports.useCartLineStore=CartLineContext.useCartLineStore,exports.ProductListProvider=ProductListContext.ProductListProvider,exports.useProductListStore=ProductListContext.useProductListStore,exports.ProductProvider=ProductContext.ProductProvider,exports.useProductStore=ProductContext.useProductStore,exports.SectionProvider=SectionContext.SectionProvider,exports.useSection=SectionContext.useSection,exports.useSectionStore=SectionContext.useSectionStore,exports.ShopProvider=ShopContext.ShopProvider,exports.useShopStore=ShopContext.useShopStore,exports.PageProvider=PageContext.PageProvider,exports.usePageStore=PageContext.usePageStore,exports.CollectionProvider=CollectionContext.CollectionProvider,exports.useCollectionStore=CollectionContext.useCollectionStore,exports.ModalProvider=ModalContext.ModalProvider,exports.useModalStore=ModalContext.useModalStore,exports.ArticleListProvider=ArticleListContext.ArticleListProvider,exports.useArticleListStore=ArticleListContext.useArticleListStore,exports.ArticleProvider=ArticleContext.ArticleProvider,exports.useArticleStore=ArticleContext.useArticleStore,exports.I18nProvider=I18nContext.I18nProvider,exports.useI18nStore=I18nContext.useI18nStore,exports.PageViewUpDocument=pageViewUp_generated.PageViewUpDocument,exports.CollectionDetailFilterDocument=collectionDetailFilter_generated.CollectionDetailFilterDocument,exports.CollectionDocument=collection_generated.CollectionDocument,exports.CollectionsDocument=collections_generated.CollectionsDocument,exports.PublishedThemePagesDocument=publishedThemePages_generated.PublishedThemePagesDocument,exports.ProductsDocument=products_generated.ProductsDocument,exports.StorePropertyDocument=storeProperty_generated.StorePropertyDocument,exports.PreviewThemePageDocument=previewPage_generated.PreviewThemePageDocument,exports.PublishedShopMetasDocument=publishedShopMetas_generated.PublishedShopMetasDocument,exports.ShopShopifyDocument=shopShopify_generated.ShopShopifyDocument,exports.ArticlesDocument=articles_generated.ArticlesDocument,exports.BlogsDocument=blogs_generated.BlogsDocument,exports.ProductWithSellingPlansSelectFragment=productsWithSellingPlans_generated.ProductWithSellingPlansSelectFragment,exports.ProductsWithSellingPlansDocument=productsWithSellingPlans_generated.ProductsWithSellingPlansDocument,exports.ProductVariantsWithSellingPlansDocument=productVariantWithSellingPlans_generated.ProductVariantsWithSellingPlansDocument,exports.LibraryTemplateDocument=LibraryTemplate_generated.LibraryTemplateDocument,exports.ThemePageDocument=ThemePage_generated.ThemePageDocument,exports.SaleFunnelDiscountsDocument=SaleFunnelDiscounts_generated.SaleFunnelDiscountsDocument,exports.LibrarySaleFunnelDocument=LibrarySaleFunnelDiscount_generated.LibrarySaleFunnelDocument,exports.ShopLibraryPageDocument=ShopLibraryPage_generated.ShopLibraryPageDocument,exports.SaleFunnelOfferDocument=SaleFunnelOffer_generated.SaleFunnelOfferDocument,exports.ThemePageMetaDocument=ThemePageMeta_generated.ThemePageMetaDocument,exports.composeBorderCss=borders.composeBorderCss,exports.composeBorderResponsive=borders.composeBorderResponsive,exports.getBorderRadiusStyle=borders.getBorderRadiusStyle,exports.getBorderStyle=borders.getBorderStyle,exports.handleConvertBorderColor=borders.handleConvertBorderColor,exports.handleConvertBorderStyle=borders.handleConvertBorderStyle,exports.handleConvertBorderWidth=borders.handleConvertBorderWidth,exports.handleConvertClassColor=borders.handleConvertClassColor,exports.handleConvertClassColorDynamicBtn=borders.handleConvertClassColorDynamicBtn,exports.handleConvertInputBorderColor=borders.handleConvertInputBorderColor,exports.getCarouselContainerHeight=carousel.getCarouselContainerHeight,exports.makeContainerWidthOrHeight=carousel.makeContainerWidthOrHeight,exports.makeDotGapToCarouselStyle=carousel.makeDotGapToCarouselStyle,exports.cls=cls.cls,exports.animations=animations.animations,exports.filterToolbarPreview=filterToolbarPreview.filterToolbarPreview,exports.flattenConnection=flattenConnection.flattenConnection,exports.getResponsiveStateValue=getResonsiveValue.getResponsiveStateValue,exports.getResponsiveValue=getResonsiveValue.getResponsiveValue,exports.getResponsiveValueByScreen=getResonsiveValue.getResponsiveValueByScreen,exports.isColumnDirectionExist=getResonsiveValue.isColumnDirectionExist,exports.getShortName=getShortname.getShortName,exports.globalEvent=GlobalEvent.default,exports.isBrowser=isBrowser.default,exports.isEmptyChildren=isEmptyChildren.isEmptyChildren,exports.isSafari=isSafari.default,exports.normalizeBuilderData=normalizeBuilderData.normalizeBuilderData,exports.prefetchQueries=prefetchQueries.prefetchQueries,exports.validateEmail=email.validateEmail,exports.loadScript=loadScript.loadScript,exports.composeSpacing=spacing.composeSpacing,exports.getSpacingVariable=spacing.getSpacingVariable,exports.genVariable=cssVariable.genVariable,exports.fpixel=fpixel,exports.gtag=gtag,exports.tiktokpixel=tiktokpixel,exports.GRADIENT_BGR_KEY=background.GRADIENT_BGR_KEY,exports.composeBackgroundCss=background.composeBackgroundCss,exports.getBgByDevice=background.getBgByDevice,exports.getBgImageByDevice=background.getBgImageByDevice,exports.getBgVideoByDevice=background.getBgVideoByDevice,exports.getColor=background.getColor,exports.getCombinedBackgroundImage=background.getCombinedBackgroundImage,exports.getGradientBgrStyleByDevice=background.getGradientBgrStyleByDevice,exports.getGradientBgrStyleForButton=background.getGradientBgrStyleForButton,exports.getGradientImageBgrStyleByDevice=background.getGradientImageBgrStyleByDevice,exports.getStyleBackgroundByDevice=background.getStyleBackgroundByDevice,exports.getStyleBgColor=background.getStyleBgColor,exports.makeFixedBgAttachment=background.makeFixedBgAttachment,exports.composeBackgroundImageCss=backgroundImage.composeBackgroundImageCss,exports.getBgImageSourceByDevice=backgroundImage.getBgImageSourceByDevice,exports.getStyleBackgroundImage=backgroundImage.getStyleBackgroundImage,exports.getStyleBgImageSource=backgroundImage.getStyleBgImageSource,exports.composeTextColorCss=colors.composeTextColorCss,exports.getGlobalColorCSSProp=colors.getGlobalColorCSSProp,exports.getGlobalColorClass=colors.getGlobalColorClass,exports.getGlobalColorResponsiveClass=colors.getGlobalColorResponsiveClass,exports.getGlobalColorResponsiveStyle=colors.getGlobalColorResponsiveStyle,exports.getGlobalColorStateClass=colors.getGlobalColorStateClass,exports.getGlobalColorStateClassDynamicBtn=colors.getGlobalColorStateClassDynamicBtn,exports.getGlobalColorStateResponsiveClass=colors.getGlobalColorStateResponsiveClass,exports.getGlobalColorStateResponsiveClassDynamicBtn=colors.getGlobalColorStateResponsiveClassDynamicBtn,exports.getGlobalColorStateResponsiveStyle=colors.getGlobalColorStateResponsiveStyle,exports.getGlobalColorStateStyle=colors.getGlobalColorStateStyle,exports.getGlobalColorStyle=colors.getGlobalColorStyle,exports.getSingleColorVariable=colors.getSingleColorVariable,exports.isColor=colors.isColor,exports.composeAdvanceStyle=composeAdvanceStyle.composeAdvanceStyle,exports.composeAdvanceStyleForPostPurchase=composeAdvanceStyle.composeAdvanceStyleForPostPurchase,exports.convertBoxShadowV1ToV2=composeAdvanceStyle.convertBoxShadowV1ToV2,exports.filterAttrInStyle=composeAdvanceStyle.filterAttrInStyle,exports.getCornerStyle=composeAdvanceStyle.getCornerStyle,exports.removeAttrInStyle=composeAdvanceStyle.removeAttrInStyle,exports.removePaddingYInStyle=composeAdvanceStyle.removePaddingYInStyle,exports.splitStyle=composeAdvanceStyle.splitStyle,exports.composeClasses=composeClasses.composeClasses,exports.baseAssetURL=convert.baseAssetURL,exports.isLocalEnv=convert.isLocalEnv,exports.convertHTML=covertEntitiesHtml.convertHTML,exports.composePositionLineHeight=iconList.composePositionLineHeight,exports.composePostionIconList=iconList.composePostionIconList,exports.isDefined=isDefined.isDefined,exports.composeGridLayout=layout.composeGridLayout,exports.convertOldLayout=layout.convertOldLayout,exports.getLayoutClasses=layout.getLayoutClasses,exports.gridToArrayRegex=layout.gridToArrayRegex,exports.optionLayoutStyle=layout.optionLayoutStyle,exports.makeAspectRatio=makeStyle.makeAspectRatio,exports.makeGlobalSizeHeightResponsive=makeStyle.makeGlobalSizeHeightResponsive,exports.makeGlobalSizeWidthResponsive=makeStyle.makeGlobalSizeWidthResponsive,exports.makeHeight=makeStyle.makeHeight,exports.makeLineClamp=makeStyle.makeLineClamp,exports.makeStyle=makeStyle.makeStyle,exports.makeStyleKey=makeStyle.makeStyleKey,exports.makeStyleResponsive=makeStyle.makeStyleResponsive,exports.makeStyleResponsiveState=makeStyle.makeStyleResponsiveState,exports.makeStyleResponsiveWidth=makeStyle.makeStyleResponsiveWidth,exports.makeStyleResponsiveWidthWithoutAuto=makeStyle.makeStyleResponsiveWidthWithoutAuto,exports.makeStyleState=makeStyle.makeStyleState,exports.makeWidth=makeStyle.makeWidth,exports.removeNullUndefined=makeStyle.removeNullUndefined,exports.convertTextAlignToJustify=align.convertTextAlignToJustify,exports.getAlignmentClasses=align.getAlignmentClasses,exports.filterHoverVariables=filterStyles.filterHoverVariables,exports.filterTruthyStyles=filterStyles.filterTruthyStyles,exports.cloneDeep=cloneDeep.cloneDeep,exports.hasTranslatedLiquid=liquid.hasTranslatedLiquid,exports.checkInStock=variant.checkInStock,exports.checkAvailableVariantInStock=product.checkAvailableVariantInStock,exports.getSelectedVariant=product.getSelectedVariant,exports.parseSelectedOption=product.parseSelectedOption,exports.generateCollectionQueryKey=query.generateCollectionQueryKey,exports.generateProductQueryKey=query.generateProductQueryKey,exports.generateProductsQueryKey=query.generateProductsQueryKey,exports.composeCornerCss=radius.composeCornerCss,exports.composeRadius=radius.composeRadius,exports.composeRadiusResponsive=radius.composeRadiusResponsive,exports.getCornerCSSFromGlobal=radius.getCornerCSSFromGlobal,exports.getCustomRadius=radius.getCustomRadius,exports.getRadiusCSSFromGlobal=radius.getRadiusCSSFromGlobal,exports.getRadiusStyleActiveState=radius.getRadiusStyleActiveState,exports.RenderIf=render.RenderIf,exports.composeMemo=render.composeMemo,exports.dataStringify=render.dataStringify,exports.props=render.props,exports.removeUndefinedValuesFromObject=render.removeUndefinedValuesFromObject,exports.sanitizeLiquid=render.sanitizeLiquid,exports.styles=render.styles,exports.template=render.template,exports.composeShadow=shadow.composeShadow,exports.composeShadowCss=shadow.composeShadowCss,exports.getResponsiveStyleShadow=shadow.getResponsiveStyleShadow,exports.getResponsiveStyleShadowWithoutState=shadow.getResponsiveStyleShadowWithoutState,exports.getStyleShadow=shadow.getStyleShadow,exports.getStyleShadowState=shadow.getStyleShadowState,exports.parseValueWithUnit=shadow.parseValueWithUnit,exports.composeSize=size.composeSize,exports.composeSizeCss=size.composeSizeCss,exports.genSizeClass=size.genSizeClass,exports.getAspectRatioGlobalSize=size.getAspectRatioGlobalSize,exports.getFlexGrowClassByShapeGlobalSize=size.getFlexGrowClassByShapeGlobalSize,exports.getGlobalSizeGap=size.getGlobalSizeGap,exports.getHeightByShapeGlobalSize=size.getHeightByShapeGlobalSize,exports.getPaddingGlobalSize=size.getPaddingGlobalSize,exports.getPaddingStyleByDevice=size.getPaddingStyleByDevice,exports.getResponsiveStylePadding=size.getResponsiveStylePadding,exports.getValueByDevice=size.getValueByDevice,exports.getWidthByShapeGlobalSize=size.getWidthByShapeGlobalSize,exports.getWidthHeightGlobalSize=size.getWidthHeightGlobalSize,exports.makeGlobalSize=size.makeGlobalSize,exports.makeGlobalSizeIcon=size.makeGlobalSizeIcon,exports.makeStyleWithDefault=size.makeStyleWithDefault,exports.composeFallbackTypographyStyle=typography.composeFallbackTypographyStyle,exports.composeFontFamilyTypographyV2=typography.composeFontFamilyTypographyV2,exports.composeTextHoverColorCss=typography.composeTextHoverColorCss,exports.composeTypography=typography.composeTypography,exports.composeTypographyAttr=typography.composeTypographyAttr,exports.composeTypographyClassName=typography.composeTypographyClassName,exports.composeTypographyCss=typography.composeTypographyCss,exports.composeTypographyStyle=typography.composeTypographyStyle,exports.composeTypographyV2=typography.composeTypographyV2,exports.composeTypographyV2Css=typography.composeTypographyV2Css,exports.genTypoClass=typography.genTypoClass,exports.useArticlesQuery=useArticlesQuery.useArticlesQuery,exports.useBlogsQuery=useArticlesQuery.useBlogsQuery,exports.useAddToCart=useAddToCart.useAddToCart,exports.useCartData=useCartData.useCartData,exports.useCartDiscountCodesUpdate=useCartDiscountCodesUpdate.useCartDiscountCodesUpdate,exports.useCartNoteUpdate=useCartNoteUpdate.useCartNoteUpdate,exports.useCreateCart=useCreateCart.useCreateCart,exports.useRemoveCartItem=useRemoveCartItem.useRemoveCartItem,exports.useUpdateCartItem=useUpdateCartItem.useUpdateCartItem,exports.useCheckoutUrl=shop.useCheckoutUrl,exports.useConnectedShopify=shop.useConnectedShopify,exports.useCurrency=shop.useCurrency,exports.useEditorMode=shop.useEditorMode,exports.useIsSampleProduct=shop.useIsSampleProduct,exports.useIsStorefrontProduct=shop.useIsStorefrontProduct,exports.useLocale=shop.useLocale,exports.useMatchMutate=shop.useMatchMutate,exports.useMobileOnly=shop.useMobileOnly,exports.useMoneyFormat=shop.useMoneyFormat,exports.usePageType=shop.usePageType,exports.usePluginEnable=shop.usePluginEnable,exports.useStoreFront=shop.useStoreFront,exports.useSwatches=shop.useSwatches,exports.useTimezone=shop.useTimezone,exports.useCollectionQuery=useCollectionQuery.useCollectionQuery,exports.useCollectionsQuery=useCollectionsQuery.useCollectionsQuery,exports.useProductQuery=useProductQuery.useProductQuery,exports.useProductOffersQuery=useProductOffersQuery.useProductOffersQuery,exports.useFetchHandle=useFetchHandle.useFetchHandle,exports.useProductsQuery=useProductsQuery.useProductsQuery,exports.useProductsQueryAll=useProductsQuery.useProductsQueryAll,exports.useCurrentDevice=useCurrentDevice.useCurrentDevice,exports.useLazyVideo=useLazyVideo.useLazyVideo,exports.useCartId=useCartId.default,exports.useCartLine=useCartLine.default,exports.useCartUI=useCartUI.default,exports.useCollection=useCollection.useCollection,exports.convertDecimalToNumber=useFormatMoney.convertDecimalToNumber,exports.formatMoney=useFormatMoney.formatMoney,exports.shopifyPriceRounding=useFormatMoney.shopifyPriceRounding,exports.useFormatMoney=useFormatMoney.useFormatMoney,Object.defineProperty(exports,"useId",{enumerable:!0,get:function(){return react.useId}}),exports.useInitialSwatchesOptions=useInitialSwatchesOptions.default,exports.useIsomorphicLayoutEffect=useIsomorphicLayoutEffect.default,exports.useLoadScript=useLoadScript.default,exports.useMoney=useMoney.default,exports.usePrevious=usePrevious.usePrevious,Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return useI18n.tGlobal}}),exports.useI18n=useI18n.useI18n,exports.useStickyStore=useStickyStore.useStickyStore,exports.useCheckAvailableVariantInStock=useProduct.useCheckAvailableVariantInStock,exports.useCurrentVariant=useProduct.useCurrentVariant,exports.useCurrentVariantInStock=useProduct.useCurrentVariantInStock,exports.useFeaturedImageGlobal=useProduct.useFeaturedImageGlobal,exports.useHasPreSelected=useProduct.useHasPreSelected,exports.useIsSyncProduct=useProduct.useIsSyncProduct,exports.useProduct=useProduct.useProduct,exports.useProductBundleDiscount=useProduct.useProductBundleDiscount,exports.useProductOfferDiscount=useProduct.useProductOfferDiscount,exports.useProductProperties=useProduct.useProductProperties,exports.useProductShopifyEditLink=useProduct.useProductShopifyEditLink,exports.useQuantity=useProduct.useQuantity,exports.useSelectedOption=useProduct.useSelectedOption,exports.useUniqProductID=useProduct.useUniqProductID,exports.useVariant=useProduct.useVariant,exports.useVariantOutStock=useProduct.useVariantOutStock,exports.useVariants=useProduct.useVariants,exports.useShopifyLink=useShopifyLink.useShopifyLink,exports.useProductList=useProductList.useProductList,exports.useProductListProducts=useProductList.useProductListProducts,exports.useProductListSettings=useProductList.useProductListSettings,exports.useProductListStyles=useProductList.useProductListStyles,exports.useSuspenseFetch=useSuspenseFetch.default,exports.useSwatchesOptions=useSwatchesOptions.default,exports.useRenderMode=useRenderMode.useRenderMode,exports.usePreviewSharePage=usePreviewSharePage.usePreviewSharePage,Object.defineProperty(exports,"RenderModeEnv",{enumerable:!0,get:function(){return builder.RenderModeEnv}}),Object.defineProperty(exports,"InteractionTargetEvent",{enumerable:!0,get:function(){return custom.InteractionTargetEvent}}),Object.defineProperty(exports,"InteractionTriggerEvent",{enumerable:!0,get:function(){return custom.InteractionTriggerEvent}}),exports.ShopType=shop$1,exports.AppAPIType=appAPI,exports.OptionNormalStyle=globalStyle.OptionNormalStyle,exports.OptionSpecialStyle=globalStyle.OptionSpecialStyle,Object.defineProperty(exports,"AnimationDirectionType",{enumerable:!0,get:function(){return animations$1.AnimationDirectionType}}),Object.defineProperty(exports,"AnimationEasingType",{enumerable:!0,get:function(){return animations$1.AnimationEasingType}}),Object.defineProperty(exports,"AnimationSetting",{enumerable:!0,get:function(){return animations$1.AnimationSetting}}),Object.defineProperty(exports,"AnimationTriggerType",{enumerable:!0,get:function(){return animations$1.AnimationTriggerType}}),Object.defineProperty(exports,"AnimationType",{enumerable:!0,get:function(){return animations$1.AnimationType}}),Object.defineProperty(exports,"AnimationZoomDirectionType",{enumerable:!0,get:function(){return animations$1.AnimationZoomDirectionType}}),exports.calculateFirstProduct=getCollection.calculateFirstProduct,exports.getCollection=getCollection.getCollection,exports.fetchMedias=getProduct.fetchMedias,exports.fetchVariants=getProduct.fetchVariants,exports.getProduct=getProduct.getProduct,exports.getProductBySlug=getProductBySlug.getProductBySlug,exports.getAppBlocks=getAppBlocks.getAppBlocks,exports.addAppBlockId=addAppBlockId.addAppBlockId,exports.useInteraction=index.useInteraction,exports.createStoreFrontFetcher=createStoreFrontFetcher.createStoreFrontFetcher,exports.hasPublicStoreFrontData=createStoreFrontFetcher.hasPublicStoreFrontData,exports.DEVICES=device.DEVICES,exports.EMPTY_DEVICE_VALUE=device.EMPTY_DEVICE_VALUE;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsxs as t,Fragment as e,jsx as o}from"react/jsx-runtime";import{memo as i,useState as n,useMemo as l,useCallback as r,useEffect as a}from"react";import"zustand";import{useBuilderPreviewStore as d}from"../contexts/BuilderPreviewContext.js";import{usePageStore as C}from"../contexts/PageContext.js";import{CreateThemeSection as c}from"./theme-section/CreateThemeSection.js";import s from"./toolbar/Tooltip.js";import{SectionErrorBanner as p}from"./toolbar/SectionErrorBanner.js";import{ThemeSectionStatusWrapper as u}from"./theme-section/ThemeSectionStatus.js";import h from"./resize/Resize.js";import{usePostPurchase as m}from"../hooks/useToolbarPostPurchase.js";import{ableGenerateContentElements as g}from"./constant.js";import{AIContentGenerator as f}from"./ai-generator/AIContentGenerator.js";import{AIGenContentLoading as b}from"./ai-generator/AIGenContentLoading.js";import{InteractionSuffix as v}from"./InteractionSuffix.js";import{useI18nStore as w}from"@gem-sdk/core";import"swr";import"../helpers/convert.js";import{useShopStore as S}from"../contexts/ShopContext.js";import"@gem-sdk/adapter-shopify";import"swr/mutation";import"swr/infinite";import"vanilla-lazyload";import"../hooks/useCartUI.js";import"../hooks/useStickyStore.js";import"../types/builder.js";import"../types/custom.js";import"../types/animations.js";let SECTION_LIMIT=25,notVisible=t=>{let e=getComputedStyle(t).overflow;return"visible"!==e},isSection=t=>{let e=t.getAttribute("data-component-tag");return"Section"===e},ComponentToolbarPreview=i=>{let{t:L}=w(),M=i.isThemeSection,x=!!i.isShopifySection,Z=S(t=>t.storefrontUrl),y=S(t=>t.pageType),R=d(t=>t.getParents),P=d(t=>t.getItem("ROOT")),H=d(t=>t.isThemeSectionEditor),[V,E]=n(null),[T,A]=n(!1),[j,B]=n(!1),[I,k]=n([]),[F,$]=n("top"),[D,O]=n(!1),[U,N]=n(!1),[G,_]=n(""),[z,q]=n(""),[J,K]=n({width:"",text:""}),[Q,W]=n(!1),X=d(t=>t.errorSectionList),Y=l(()=>{if(!X)return null;let t=X?.find(t=>t.uid===i.uid);return t},[X,i.uid]),tt=C(t=>t.interactionData),te=l(()=>"POST_PURCHASE"===y,[y]),{checkDisableDelete:to,getTooltipText:ti,checkDisableDuplicate:tn}=m(i.uid,i.tag||""),tl=["ProductTitle","ProductDescription","ProductPrice"],tr=["ArticleTitle","ArticleContent","ArticleImage","ArticleAuthor","ArticleCategory","ArticleDate","ArticleExcerpt","ArticleTags"],ta=[...tl,...tr],td=(t,e)=>{let o=I.length,i=t.getBoundingClientRect(),n=e.getBoundingClientRect();return i.top-n.top<36*o},tC=(t,e)=>{let o=e||t;if(t&&!isSection(t))return notVisible(t)&&td(e,t)?t:t.parentElement?tC(t.parentElement,o):void 0},tc=r(()=>P?.childrens?.length||0,[P?.childrens?.length]),ts=r(()=>{if("Section"==i.tag)return"bottom";let t=document.body.querySelector("#storefront")?.querySelector('[data-toolbar-active="true"]');if(t){let e=t.getBoundingClientRect();e.top<60?$("bottom"):$("top")}},[i.tag]),tp=l(()=>{let t=/^(?:https?:\/\/)?([^/]+)\.myshopify\.com/;return Z?Z.match(t)?.[1]:""},[Z]),tu=l(()=>`https://admin.shopify.com/store/${tp}`,[tp]),th=l(()=>G?`${tu}/products/${G}`:"",[tu,G]),tm=l(()=>z?`${tu}/articles/${z.replace("gid://shopify/Article/","")}`:"",[z,tu]),tg=l(()=>tt?.isSelectOnPage,[tt?.isSelectOnPage]),tf=l(()=>tt?.settingType,[tt?.settingType]),tb=l(()=>tt?.item?.targets?.find(t=>t.uid===i.uid&&t?.type!=="PAGE")&&"TARGET"===tf,[tt?.item?.targets,i.uid,tf]),tv=l(()=>tt?.item?.self?.uid===i.uid&&tt?.item?.self.type!=="PAGE"&&"TRIGGER"===tf,[tt?.item?.self?.type,tt?.item?.self?.uid,i.uid,tf]),tw=l(()=>!tb&&!tv,[tb,tv]),tS=l(()=>D||x,[D,x]),tL=l(()=>Q||x||tc()>25&&"Section"===i.tag||!!Y,[tc,Q,x,i.tag,Y]),tM=r(t=>{let e=t.detail;if(e?.articleId&&q(e.articleId),e?.productId&&_(e.productId),e?.componentUid==i.uid){N(!0),ts(),te&&(O(to()),K(ti()),W(tn()));let t=R(i.uid).filter(t=>!("ROOT"===t.uid||"Section"===t.tag&&H||t.editorConfigs?.toolbar?.hide||t.editorConfigs?.component?.noSetting)).slice(0,3);k(t)}else N(!1),k([]),A(!1)},[i.uid,te,R,to,ti,tn,H,ts]),tx=d(t=>t.dismissPublishError),tZ=r(()=>{tx(i.uid)},[tx,i.uid]),ty=r(()=>"Section"!==i.tag?-1:P?.childrens?.length?P.childrens.findIndex(t=>t==i.uid):-1,[P?.childrens,i.uid,i.tag]),tR=l(()=>ty()>=25,[ty]),tP=l(()=>!!Y||tR,[Y,tR]);if(a(()=>(window.addEventListener("editor:active-component",tM),()=>{window.removeEventListener("editor:active-component",tM)}),[tM]),"section"===i.type||i.editorConfigs?.toolbar?.hide)return null;let tH=t=>{let e=t?.childrens?.length??0;if("Row"===t.label){let t=1===e?L("Row {colNumber} col",{colNumber:e}):L("Row {colNumber} cols",{colNumber:e});return t}return L(t.label)},tV=t=>{if(!I.length)return;let e=t?.target||null,o=e.closest("[data-toolbar-active]");if(!e||!o)return;if(T)B(!1),A(!1);else{let t=tC(o,o);if(t)B(!0);else{let t=o.getBoundingClientRect();t.top<36*I.length?B(!0):B(!1)}A(!0)}let i=new CustomEvent("editor:toolbar:show-parents",{bubbles:!0,detail:{value:!T}});window.dispatchEvent(i)},tE=()=>{if(tr.includes(i.tag)){window.open(tm,"_blank");return}if(tl.includes(i.tag)){window.open(th,"_blank");return}window.open(tu,"_blank")},tT=t=>{t.preventDefault(),t.stopPropagation();let e=new CustomEvent("editor:toolbar:delete-component",{bubbles:!0,detail:{componentUid:i.uid,isThemeSection:M,isShopifySection:x}});return window.dispatchEvent(e),!1},tA=t=>{t.preventDefault(),t.stopPropagation();let e=new CustomEvent("editor:toolbar:duplicate-component",{bubbles:!0,detail:{componentUid:i.uid,isThemeSection:M,isShopifySection:x}});return window.dispatchEvent(e),!1},tj=()=>i.customLabel||i.label,tB=t=>{t.preventDefault(),t.stopPropagation();let e=new CustomEvent("editor:toolbar:zoom-out-component",{bubbles:!0,detail:{componentUid:i.uid}});return window.dispatchEvent(e),!1},tI=()=>{E(null),window.removeEventListener("editor:close-add-section-popup",tI)},tk=(t,e)=>{if(t.preventDefault(),t.stopPropagation(),tc()>=25)return!1;let o=t.target;if(o){E(e);let t=o.getBoundingClientRect(),n=new CustomEvent("editor:toolbar:add-section",{bubbles:!0,detail:{componentUid:i.uid,position:e,top:t.top+t.height/2}});window.dispatchEvent(n),window.addEventListener("editor:close-add-section-popup",tI)}return!1},tF=()=>{if(x)return i.name?.includes("Shopify section:")?i.name:`Shopify section: ${i.name}`;let t=i.name&&i.name===`Section ${i.uid}`;return tc()>=20?`${t?"Section":i?.name} ${ty()+1}/25`:t?`${L("Section")} ${ty()+1}`:i?.name},t$=()=>{let{isShopifySection:t,tag:e}=i;return!t&&(!M||!!H)&&g.includes(e)&&!Y},tD="Section"===i.tag&&!i.isThemeSection&&"STATIC"!==y&&"POST_PURCHASE"!==y&&!i.isShopifySection&&25>ty()&&!Y;return t(e,{children:[!("Section"==i.tag&&H)&&t("div",{"data-toolbar":!0,"data-toolbar-section":"Section"==i.tag,"data-toolbar-theme-section":"Section"==i.tag&&!!M||H,"data-toolbar-shopify-section":"Section"==i.tag&&!!x,"data-toolbar-limit":ty()>=25||!!Y,children:[t("div",{"data-toolbar-show-parent":!0,onClick:t=>tV(t),"aria-hidden":"true",children:[tv&&o("div",{className:"gp-hidden gp-w-[12px] interaction-use-custom-element",children:o("svg",{width:"12",height:"13",viewBox:"0 0 12 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.36799 0.430523C4.51596 0.205675 4.76709 0.0703125 5.03626 0.0703125H9.88576C10.2042 0.0703125 10.395 0.424378 10.2198 0.69034L8.36968 3.4992C8.28209 3.63218 8.37747 3.80922 8.53671 3.80922H10.749C11.1111 3.80922 11.2869 4.25204 11.0233 4.50036L3.03971 12.0217C2.7572 12.2878 2.29932 12.0361 2.37262 11.655L3.27994 6.93698C3.30366 6.81364 3.20915 6.69921 3.08354 6.69921H0.984651C0.66625 6.69921 0.475479 6.34529 0.650515 6.07932L4.36799 0.430523Z",fill:"#F9F9F9"})})}),tb&&o("div",{className:"gp-hidden gp-w-[14px] interaction-use-custom-element",children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.32785 3.66159C7.87459 3.58351 8.25451 3.077 8.17643 2.53026C8.09836 1.98353 7.59184 1.6036 7.0451 1.68168C3.92866 2.12673 1.5332 4.80488 1.5332 8.04424C1.5332 11.594 4.41085 14.4716 7.9606 14.4716C11.1706 14.4716 13.8294 12.1194 14.3105 9.04446C14.3959 8.49881 14.0227 7.98727 13.4771 7.9019C12.9314 7.81654 12.4199 8.18967 12.3345 8.73531C12.0034 10.852 10.1702 12.4716 7.9606 12.4716C5.51541 12.4716 3.5332 10.4894 3.5332 8.04424C3.5332 5.81431 5.18273 3.96793 7.32785 3.66159ZM10.3432 1.97548C10.6232 1.69551 11.102 1.83654 11.1855 2.22355L11.6106 4.19339C11.6313 4.28936 11.7063 4.36432 11.8023 4.38503L13.7721 4.81013C14.1591 4.89365 14.3001 5.37247 14.0202 5.65243L12.3432 7.32945C12.1244 7.54819 11.8168 7.65338 11.5099 7.61436L10.1528 7.44178C9.84592 7.40276 9.53827 7.50795 9.31953 7.72669L8.66719 8.37903C8.35477 8.69145 7.86633 8.70954 7.57623 8.41943C7.28613 8.12933 7.30421 7.64089 7.61663 7.32847L8.26898 6.67613C8.48771 6.45739 8.5929 6.14974 8.55388 5.84287L8.38131 4.48575C8.34228 4.17888 8.44748 3.87123 8.66621 3.6525L10.3432 1.97548ZM8.19853 5.1916C8.35319 5.72179 8.04877 6.27697 7.51858 6.43163C6.83078 6.63226 6.32988 7.2683 6.32988 8.01873C6.32988 8.9316 7.06991 9.67164 7.98279 9.67164C8.73014 9.67164 9.36406 9.17486 9.56743 8.49131C9.72492 7.96195 10.2817 7.6605 10.8111 7.81799C11.3404 7.97548 11.6419 8.53227 11.4844 9.06163C11.0356 10.57 9.63916 11.6716 7.98279 11.6716C5.96535 11.6716 4.32988 10.0362 4.32988 8.01873C4.32988 6.35558 5.44054 4.95445 6.95851 4.51165C7.4887 4.35699 8.04387 4.66141 8.19853 5.1916Z",fill:"#F9F9F9"})})}),U&&tw&&o("div",{"data-toolbar-icon-drag":!0,children:t("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[o("path",{d:"M5.5 4.5C6.32843 4.5 7 3.82843 7 3C7 2.17157 6.32843 1.5 5.5 1.5C4.67157 1.5 4 2.17157 4 3C4 3.82843 4.67157 4.5 5.5 4.5Z",fill:"currentColor"}),o("path",{d:"M5.5 9.5C6.32843 9.5 7 8.82843 7 8C7 7.17157 6.32843 6.5 5.5 6.5C4.67157 6.5 4 7.17157 4 8C4 8.82843 4.67157 9.5 5.5 9.5Z",fill:"currentColor"}),o("path",{d:"M7 13C7 13.8284 6.32843 14.5 5.5 14.5C4.67157 14.5 4 13.8284 4 13C4 12.1716 4.67157 11.5 5.5 11.5C6.32843 11.5 7 12.1716 7 13Z",fill:"currentColor"}),o("path",{d:"M10.5 4.5C11.3284 4.5 12 3.82843 12 3C12 2.17157 11.3284 1.5 10.5 1.5C9.67157 1.5 9 2.17157 9 3C9 3.82843 9.67157 4.5 10.5 4.5Z",fill:"currentColor"}),o("path",{d:"M12 8C12 8.82843 11.3284 9.5 10.5 9.5C9.67157 9.5 9 8.82843 9 8C9 7.17157 9.67157 6.5 10.5 6.5C11.3284 6.5 12 7.17157 12 8Z",fill:"currentColor"}),o("path",{d:"M10.5 14.5C11.3284 14.5 12 13.8284 12 13C12 12.1716 11.3284 11.5 10.5 11.5C9.67157 11.5 9 12.1716 9 13C9 13.8284 9.67157 14.5 10.5 14.5Z",fill:"currentColor"})]})}),"Section"==i.tag?t("div",{"data-toolbar-name":!0,children:[tF(),U&&x&&!i.isShopifyVisibility&&t("svg",{"data-toolbar-visibility":!0,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.1252 9.99773C13.1243 8.27226 11.7248 6.87423 9.99935 6.87506C8.27386 6.87561 6.87518 8.27455 6.87518 10.0001C6.87518 11.7259 8.27429 13.1251 10.0002 13.1251C11.7257 13.1251 13.125 11.727 13.1252 10.0011V9.99773ZM9.99985 8.12506C11.035 8.12451 11.8746 8.96322 11.8752 9.99839V10.0004C11.8752 11.0357 11.0359 11.8751 10.0002 11.8751C8.96465 11.8751 8.12518 11.0356 8.12518 10.0001C8.12518 8.96472 8.96451 8.12533 9.99985 8.12506Z",fill:"#F9F9F9"}),o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.99885 4.37593C5.66421 4.37604 2.80603 7.64523 1.79548 9.00983C1.35636 9.60279 1.35918 10.4 1.80012 10.9902C2.81706 12.3514 5.69374 15.6241 9.99886 15.6241C14.3806 15.6241 17.2194 12.3452 18.2168 10.9808C18.6473 10.392 18.6442 9.60472 18.211 9.01902C17.2056 7.65938 14.3429 4.37583 9.99885 4.37593ZM2.80002 9.75374C3.77049 8.44326 6.30207 5.62602 9.99888 5.62593C13.7041 5.62585 16.24 8.45598 17.206 9.76225C17.3146 9.9091 17.3149 10.0965 17.2077 10.2431C16.254 11.5477 13.7416 14.3741 9.99886 14.3741C6.33149 14.3741 3.78173 11.5541 2.80152 10.242C2.69021 10.0931 2.69001 9.90229 2.80002 9.75374Z",fill:"#F9F9F9"}),o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.0763 3.26988C18.3415 3.58809 18.2985 4.06101 17.9803 4.32619L2.98032 16.8262C2.66211 17.0914 2.18919 17.0484 1.92402 16.7302C1.65884 16.412 1.70184 15.939 2.02004 15.6739L17.02 3.17385C17.3383 2.90868 17.8112 2.95167 18.0763 3.26988Z",fill:"#F9F9F9"})]})]}):o("div",{"data-toolbar-name":!0,children:L(tj())}),U&&"Section"!==i.tag&&I.length>0&&o("div",{"data-toolbar-icon-parent":!0,"data-toolbar-icon-parent-open":T,children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:o("path",{d:"M5.65522 10C5.07265 10 4.7809 9.22865 5.19284 8.77753L7.53762 6.20974C7.79298 5.93009 8.20702 5.93009 8.46238 6.20974L10.8072 8.77754C11.2191 9.22866 10.9274 10 10.3448 10H5.65522Z",fill:"currentColor"})})})]}),U&&T&&I.map((e,i)=>t("div",{"data-toolbar-parent":!0,"data-component-tag":e.tag,"data-parent-uid":e.uid,"data-toolbar-theme-section":H,"data-toolbar-parent-revert":j,style:{top:j?`${36*(i+1)}px`:`${-36*(i+1)}px`},children:[o("div",{"data-toolbar-icon-drag":!0,children:t("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[o("path",{d:"M5.5 4.5C6.32843 4.5 7 3.82843 7 3C7 2.17157 6.32843 1.5 5.5 1.5C4.67157 1.5 4 2.17157 4 3C4 3.82843 4.67157 4.5 5.5 4.5Z",fill:"currentColor"}),o("path",{d:"M5.5 9.5C6.32843 9.5 7 8.82843 7 8C7 7.17157 6.32843 6.5 5.5 6.5C4.67157 6.5 4 7.17157 4 8C4 8.82843 4.67157 9.5 5.5 9.5Z",fill:"currentColor"}),o("path",{d:"M7 13C7 13.8284 6.32843 14.5 5.5 14.5C4.67157 14.5 4 13.8284 4 13C4 12.1716 4.67157 11.5 5.5 11.5C6.32843 11.5 7 12.1716 7 13Z",fill:"currentColor"}),o("path",{d:"M10.5 4.5C11.3284 4.5 12 3.82843 12 3C12 2.17157 11.3284 1.5 10.5 1.5C9.67157 1.5 9 2.17157 9 3C9 3.82843 9.67157 4.5 10.5 4.5Z",fill:"currentColor"}),o("path",{d:"M12 8C12 8.82843 11.3284 9.5 10.5 9.5C9.67157 9.5 9 8.82843 9 8C9 7.17157 9.67157 6.5 10.5 6.5C11.3284 6.5 12 7.17157 12 8Z",fill:"currentColor"}),o("path",{d:"M10.5 14.5C11.3284 14.5 12 13.8284 12 13C12 12.1716 11.3284 11.5 10.5 11.5C9.67157 11.5 9 12.1716 9 13C9 13.8284 9.67157 14.5 10.5 14.5Z",fill:"currentColor"})]})}),o("div",{"data-toolbar-name":!0,children:tH(e)})]},e.uid)),U&&!tg&&t(e,{children:[" ",tD&&o(c,{...i}),t$()&&o(f,{...i}),"Sticky"==i.tag&&o("div",{"data-toolbar-zoom-out":!0,onClick:t=>tB(t),"aria-hidden":"true",children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.5 7C14.7761 7 15 6.77614 15 6.5C15 6.22386 14.7761 6 14.5 6L10.7072 6L14.8536 1.85355C15.0489 1.65829 15.0489 1.34171 14.8536 1.14645C14.6584 0.951186 14.3418 0.951185 14.1465 1.14645L10 5.29297L10 1.5C10 1.22386 9.77614 1 9.5 1C9.22386 1 9 1.22386 9 1.5L9 6.5C9 6.77614 9.22386 7 9.5 7L14.5 7ZM6 10.7073L6 14.5C6 14.7761 6.22386 15 6.5 15C6.77614 15 7 14.7761 7 14.5L7 9.5C7 9.22386 6.77614 9 6.5 9H1.5C1.22386 9 1 9.22386 1 9.5C1 9.77614 1.22386 10 1.5 10H5.29306L1.14662 14.1464C0.951353 14.3417 0.951353 14.6583 1.14662 14.8536C1.34188 15.0488 1.65846 15.0488 1.85372 14.8536L6 10.7073Z",fill:"currentColor"})})}),ta.includes(i.tag)&&o(s,{"data-toolbar-title":!0,enable:!0,"data-toolbar-disable":!1,text:L("Edit content in Shopify"),position:"top",onClick:tE,"aria-hidden":"true",children:t("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.61129 2.47348C8.61129 2.47348 8.47099 2.51557 8.23248 2.59274C8.19039 2.46647 8.13427 2.30512 8.05009 2.15079C7.78352 1.6387 7.39068 1.37212 6.91366 1.36511C6.87858 1.36511 6.85052 1.36511 6.81545 1.37212C6.80843 1.36511 6.80142 1.35634 6.7944 1.34757C6.78739 1.3388 6.78037 1.33003 6.77336 1.32302C6.56992 1.09854 6.30335 0.993314 5.98768 1.00033C5.37737 1.02137 4.76706 1.46332 4.269 2.249C3.91825 2.80319 3.65869 3.49767 3.58153 4.03082C3.38823 4.09074 3.21092 4.14586 3.05516 4.19429C2.64595 4.32151 2.3851 4.40261 2.37494 4.40261C2.01718 4.51485 2.01016 4.52888 1.96106 4.85859C1.92598 5.11113 1 12.2945 1 12.2945L7.14764 13.3583C7.18955 13.118 7.30454 12.8953 7.47848 12.7214L8.70249 11.4974V2.45945C8.66741 2.45945 8.63234 2.46647 8.61129 2.47348ZM6.82948 3.02767L6.62554 3.09101C6.27515 3.19989 5.90094 3.31617 5.5317 3.42752C5.65797 2.94349 5.89648 2.46647 6.19111 2.15079C6.30335 2.03154 6.45067 1.90527 6.63306 1.8281C6.80142 2.18587 6.83649 2.68393 6.82948 3.02767ZM5.99469 1.4072C6.13499 1.4072 6.26126 1.43526 6.36649 1.50541C6.19813 1.58959 6.0438 1.71586 5.88947 1.87721C5.50364 2.29109 5.202 2.94349 5.08274 3.56783C4.74459 3.66991 4.41804 3.77199 4.10838 3.8688L4.01646 3.89753C4.22691 2.90841 5.05468 1.43526 5.99469 1.4072ZM4.80214 7.0122C4.81874 7.26957 5.09737 7.44833 5.43473 7.66478C5.95252 7.99699 6.60867 8.41798 6.66813 9.3482C6.7453 10.5548 6.02977 11.3826 4.99154 11.4457C3.7569 11.5229 3.06943 10.7933 3.06943 10.7933L3.32899 9.67791C3.32899 9.67791 4.01646 10.197 4.56363 10.1619C4.92139 10.1409 5.04767 9.84627 5.04065 9.64283C5.01607 9.26796 4.73308 9.06671 4.41569 8.84101C4.00848 8.55142 3.54465 8.22157 3.49735 7.4331C3.42018 6.24756 4.19885 5.05501 5.91051 4.94277C6.57694 4.90068 6.91366 5.06904 6.91366 5.06904L6.52082 6.53518C6.52082 6.53518 6.08589 6.33876 5.56678 6.36682C4.80915 6.41592 4.79512 6.89294 4.80214 7.0122ZM7.23635 2.9014C7.22934 2.59274 7.19426 2.15781 7.04695 1.78601C7.50994 1.87721 7.74143 2.39632 7.83964 2.71199C7.70008 2.75665 7.54275 2.80575 7.37118 2.8593L7.23635 2.9014Z",fill:"currentColor"}),o("path",{d:"M10.7719 3.44156C10.7757 3.47543 11.1733 6.16931 11.541 8.65883L8.95503 11.2448V2.57871C9.16548 2.78214 9.71265 3.31528 9.71265 3.31528C9.71265 3.31528 10.6106 3.32931 10.6597 3.33633C10.7088 3.34334 10.7649 3.37842 10.7719 3.44156Z",fill:"currentColor"}),o("path",{d:"M14.8056 8.644L14.0424 7.88088C13.7832 7.62163 13.3629 7.62163 13.1036 7.88088L12.1519 8.83258L13.8539 10.5345L14.8056 9.58282C15.0648 9.32357 15.0648 8.90325 14.8056 8.644Z",fill:"currentColor"}),o("path",{d:"M7.85018 13.0942L11.6419 9.30246L13.3438 11.0044L9.55212 14.7961C9.43782 14.9104 9.28573 14.9791 9.1244 14.9892L7.93427 15.0641C7.73484 15.0767 7.56961 14.9114 7.58216 14.712L7.65706 13.5219C7.66721 13.3606 7.73588 13.2085 7.85018 13.0942Z",fill:"currentColor"})]})}),o(s,{enable:"Section"==i.tag&&tc()>=25||x,text:x?L("Disabled. Please edit in Shopify Editor"):L("Page has reached Shopify’s 25 section-limit"),position:"bottom",width:"200px","data-toolbar-duplicate":!0,"data-toolbar-disable":tL,onClick:tL?void 0:t=>tA(t),"aria-hidden":"true",className:tL?"!gp-cursor-not-allowed":"",children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.08423 1.21289C5.53194 1.21289 5.08423 1.66061 5.08423 2.21289V3.78711H4.26172C3.43329 3.78711 2.76172 4.45868 2.76172 5.28711V13.2871C2.76172 14.1155 3.43329 14.7871 4.26172 14.7871H10.2617C11.0901 14.7871 11.7617 14.1155 11.7617 13.2871V12.4629H13.0842C13.6365 12.4629 14.0842 12.0152 14.0842 11.4629V2.21289C14.0842 1.66061 13.6365 1.21289 13.0842 1.21289H6.08423ZM10.7617 12.4629H6.08423C5.53194 12.4629 5.08423 12.0152 5.08423 11.4629V4.78711H4.26172C3.98558 4.78711 3.76172 5.01097 3.76172 5.28711V13.2871C3.76172 13.5633 3.98558 13.7871 4.26172 13.7871H10.2617C10.5379 13.7871 10.7617 13.5633 10.7617 13.2871V12.4629Z",fill:"currentColor"})})}),o(s,{"data-toolbar-delete":!0,onClick:t=>tS?null:tT(t),enable:tS,"data-toolbar-disable":tS,text:x?L("Disabled. Please edit in Shopify Editor"):J.text,width:J.width,position:x?"bottom":F,"aria-hidden":"true",className:tS?"!gp-cursor-not-allowed":"",children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 2.88965V2.38965C11 1.56122 10.3284 0.889648 9.5 0.889648H6.5C5.67157 0.889648 5 1.56122 5 2.38965V2.88965H2C1.72386 2.88965 1.5 3.11351 1.5 3.38965C1.5 3.66579 1.72386 3.88965 2 3.88965H3.21997V13.1099C3.21997 14.2144 4.1154 15.1099 5.21997 15.1099H11.22C12.3245 15.1099 13.22 14.2144 13.22 13.1099V3.88965H14C14.2761 3.88965 14.5 3.66579 14.5 3.38965C14.5 3.11351 14.2761 2.88965 14 2.88965H11ZM6 2.88965H10V2.38965C10 2.11351 9.77614 1.88965 9.5 1.88965H6.5C6.22386 1.88965 6 2.11351 6 2.38965V2.88965ZM6.24976 6.13965C6.66397 6.13965 6.99976 6.47543 6.99976 6.88965V11.3896C6.99976 11.8039 6.66397 12.1396 6.24976 12.1396C5.83554 12.1396 5.49976 11.8039 5.49976 11.3896V6.88965C5.49976 6.47543 5.83554 6.13965 6.24976 6.13965ZM10.4998 6.88965C10.4998 6.47543 10.164 6.13965 9.74976 6.13965C9.33554 6.13965 8.99976 6.47543 8.99976 6.88965V11.3896C8.99976 11.8039 9.33554 12.1396 9.74976 12.1396C10.164 12.1396 10.4998 11.8039 10.4998 11.3896V6.88965Z",fill:"currentColor"})})})]}),o(v,{uid:i.uid})]},i.uid),"STATIC"!==y&&"POST_PURCHASE"!==y&&25>ty()&&o(u,{...i}),o("div",{"data-outline":!0,"data-outline-section":"Section"==i.tag,"data-outline-theme-section":"Section"==i.tag&&!!M||H,"data-outline-shopify-section":"Section"==i.tag&&!!x,"data-outline-limit":tP,"data-outline-error":!!Y},"outline-"+i.uid),"Section"==i.tag&&!H&&t(e,{children:[o(s,{enable:tc()>=25,text:L("Page has reached Shopify’s 25 section-limit"),position:"top","data-toolbar-add-top":!0,"data-toolbar-disable":tc()>=25,"data-toolbar-add-open":"above"==V,onClick:t=>tk(t,"above"),"aria-hidden":"true",children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:o("path",{d:"M8.45 3.95C8.45 3.70147 8.24853 3.5 8 3.5C7.75147 3.5 7.55 3.70147 7.55 3.95V7.55H3.95C3.70147 7.55 3.5 7.75147 3.5 8C3.5 8.24853 3.70147 8.45 3.95 8.45H7.55V12.05C7.55 12.2985 7.75147 12.5 8 12.5C8.24853 12.5 8.45 12.2985 8.45 12.05V8.45H12.05C12.2985 8.45 12.5 8.24853 12.5 8C12.5 7.75147 12.2985 7.55 12.05 7.55H8.45V3.95Z",fill:"#212121"})})}),Y&&o(p,{errorSectionInfo:Y,onDismiss:tZ}),o(s,{enable:tc()>=25,text:L("Page has reached Shopify’s 25 section-limit"),position:"top","data-toolbar-add-bottom":!0,"data-toolbar-disable":tc()>=25,"data-toolbar-add-open":"below"==V,onClick:t=>tk(t,"below"),"aria-hidden":"true",children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:o("path",{d:"M8.45 3.95C8.45 3.70147 8.24853 3.5 8 3.5C7.75147 3.5 7.55 3.70147 7.55 3.95V7.55H3.95C3.70147 7.55 3.5 7.75147 3.5 8C3.5 8.24853 3.70147 8.45 3.95 8.45H7.55V12.05C7.55 12.2985 7.75147 12.5 8 12.5C8.24853 12.5 8.45 12.2985 8.45 12.05V8.45H12.05C12.2985 8.45 12.5 8.24853 12.5 8C12.5 7.75147 12.2985 7.55 12.05 7.55H8.45V3.95Z",fill:"#212121"})})})]}),g.includes(i.tag)&&U&&o(b,{...i}),U&&o(h,{...i})]})};var ComponentToolbarPreview$1=i(ComponentToolbarPreview);export{ComponentToolbarPreview$1 as default};
|
|
2
|
+
import{jsxs as t,Fragment as e,jsx as o}from"react/jsx-runtime";import{memo as i,useState as n,useMemo as l,useCallback as r,useEffect as a}from"react";import"zustand";import{useBuilderPreviewStore as d}from"../contexts/BuilderPreviewContext.js";import{usePageStore as C}from"../contexts/PageContext.js";import{CreateThemeSection as c}from"./theme-section/CreateThemeSection.js";import s from"./toolbar/Tooltip.js";import{SectionErrorBanner as p}from"./toolbar/SectionErrorBanner.js";import{ThemeSectionStatusWrapper as u}from"./theme-section/ThemeSectionStatus.js";import h from"./resize/Resize.js";import{usePostPurchase as m}from"../hooks/useToolbarPostPurchase.js";import{ableGenerateContentElements as g}from"./constant.js";import{AIContentGenerator as f}from"./ai-generator/AIContentGenerator.js";import{AIGenContentLoading as b}from"./ai-generator/AIGenContentLoading.js";import{InteractionSuffix as v}from"./InteractionSuffix.js";import{useI18nStore as w}from"@gem-sdk/core";import"swr";import"../helpers/convert.js";import{useShopStore as S}from"../contexts/ShopContext.js";import"@gem-sdk/adapter-shopify";import"swr/mutation";import"swr/infinite";import"vanilla-lazyload";import"../hooks/useCartUI.js";import"../hooks/useStickyStore.js";import"../types/builder.js";import"../types/custom.js";import"../types/animations.js";let SECTION_LIMIT=25,notVisible=t=>{let e=getComputedStyle(t).overflow;return"visible"!==e},isSection=t=>{let e=t.getAttribute("data-component-tag");return"Section"===e},ComponentToolbarPreview=i=>{let{t:L}=w(),M=i.isThemeSection,x=!!i.isShopifySection,Z=S(t=>t.storefrontUrl),y=S(t=>t.pageType),R=d(t=>t.getParents),P=d(t=>t.getItem("ROOT")),H=d(t=>t.isThemeSectionEditor),[V,E]=n(null),[T,A]=n(!1),[j,B]=n(!1),[I,k]=n([]),[F,$]=n("top"),[D,O]=n(!1),[U,N]=n(!1),[G,_]=n(""),[z,q]=n(""),[J,K]=n({width:"",text:""}),[Q,W]=n(!1),X=d(t=>t.errorSectionList),Y=l(()=>{if(!X)return null;let t=X?.find(t=>t.uid===i.uid);return t},[X,i.uid]),tt=C(t=>t.interactionData),te=l(()=>"POST_PURCHASE"===y,[y]),{checkDisableDelete:to,getTooltipText:ti,checkDisableDuplicate:tn}=m(i.uid,i.tag||""),tl=["ProductTitle","ProductDescription","ProductPrice"],tr=["ArticleTitle","ArticleContent","ArticleImage","ArticleAuthor","ArticleCategory","ArticleDate","ArticleExcerpt","ArticleTags"],ta=[...tl,...tr],td=(t,e)=>{let o=I.length,i=t.getBoundingClientRect(),n=e.getBoundingClientRect();return i.top-n.top<36*o},tC=(t,e)=>{let o=e||t;if(t&&!isSection(t))return notVisible(t)&&td(e,t)?t:t.parentElement?tC(t.parentElement,o):void 0},tc=r(()=>P?.childrens?.length||0,[P?.childrens?.length]),ts=r(()=>{if("Section"==i.tag)return"bottom";let t=document.body.querySelector("#storefront")?.querySelector('[data-toolbar-active="true"]');if(t){let e=t.getBoundingClientRect();e.top<60?$("bottom"):$("top")}},[i.tag]),tp=l(()=>{let t=/^(?:https?:\/\/)?([^/]+)\.myshopify\.com/;return Z?Z.match(t)?.[1]:""},[Z]),tu=l(()=>`https://admin.shopify.com/store/${tp}`,[tp]),th=l(()=>G?`${tu}/products/${G}`:"",[tu,G]),tm=l(()=>z?`${tu}/articles/${z.replace("gid://shopify/Article/","")}`:"",[z,tu]),tg=l(()=>tt?.isSelectOnPage,[tt?.isSelectOnPage]),tf=l(()=>tt?.settingType,[tt?.settingType]),tb=l(()=>tt?.item?.targets?.find(t=>t.uid===i.uid&&t?.type!=="PAGE")&&"TARGET"===tf,[tt?.item?.targets,i.uid,tf]),tv=l(()=>tt?.item?.self?.uid===i.uid&&tt?.item?.self.type!=="PAGE"&&"TRIGGER"===tf,[tt?.item?.self?.type,tt?.item?.self?.uid,i.uid,tf]),tw=l(()=>!tb&&!tv,[tb,tv]),tS=l(()=>D||x,[D,x]),tL=l(()=>Q||x||tc()>25&&"Section"===i.tag||!!Y,[tc,Q,x,i.tag,Y]),tM=r(t=>{let e=t.detail;if(e?.articleId&&q(e.articleId),e?.productId&&_(e.productId),e?.componentUid==i.uid){N(!0),ts(),te&&(O(to()),K(ti()),W(tn()));let t=R(i.uid).filter(t=>!("ROOT"===t.uid||"Section"===t.tag&&H||t.editorConfigs?.toolbar?.hide||t.editorConfigs?.component?.noSetting)).slice(0,3);k(t)}else N(!1),k([]),A(!1)},[i.uid,te,R,to,ti,tn,H,ts]),tx=d(t=>t.dismissPublishError),tZ=r(()=>{tx(i.uid)},[tx,i.uid]),ty=r(()=>"Section"!==i.tag?-1:P?.childrens?.length?P.childrens.findIndex(t=>t==i.uid):-1,[P?.childrens,i.uid,i.tag]),tR=l(()=>ty()>=25,[ty]),tP=l(()=>!!Y||tR,[Y,tR]);if(a(()=>(window.addEventListener("editor:active-component",tM),()=>{window.removeEventListener("editor:active-component",tM)}),[tM]),"section"===i.type||i.editorConfigs?.toolbar?.hide)return null;let tH=t=>{let e=t?.childrens?.length??0;if("Row"===t.label){let t=1===e?L("Row {colNumber} col",{colNumber:e}):L("Row {colNumber} cols",{colNumber:e});return t}return L(t.label)},tV=t=>{if(!I.length)return;let e=t?.target||null,o=e.closest("[data-toolbar-active]");if(!e||!o)return;if(T)B(!1),A(!1);else{let t=tC(o,o);if(t)B(!0);else{let t=o.getBoundingClientRect();t.top<36*I.length?B(!0):B(!1)}A(!0)}let i=new CustomEvent("editor:toolbar:show-parents",{bubbles:!0,detail:{value:!T}});window.dispatchEvent(i)},tE=()=>{if(tr.includes(i.tag)){window.open(tm,"_blank");return}if(tl.includes(i.tag)){window.open(th,"_blank");return}window.open(tu,"_blank")},tT=t=>{t.preventDefault(),t.stopPropagation();let e=new CustomEvent("editor:toolbar:delete-component",{bubbles:!0,detail:{componentUid:i.uid,isThemeSection:M,isShopifySection:x}});return window.dispatchEvent(e),!1},tA=t=>{t.preventDefault(),t.stopPropagation();let e=new CustomEvent("editor:toolbar:duplicate-component",{bubbles:!0,detail:{componentUid:i.uid,isThemeSection:M,isShopifySection:x}});return window.dispatchEvent(e),!1},tj=()=>i.customLabel||i.label,tB=t=>{t.preventDefault(),t.stopPropagation();let e=new CustomEvent("editor:toolbar:zoom-out-component",{bubbles:!0,detail:{componentUid:i.uid}});return window.dispatchEvent(e),!1},tI=()=>{E(null),window.removeEventListener("editor:close-add-section-popup",tI)},tk=(t,e)=>{if(t.preventDefault(),t.stopPropagation(),tc()>=25)return!1;let o=t.target;if(o){E(e);let t=o.getBoundingClientRect(),n=new CustomEvent("editor:toolbar:add-section",{bubbles:!0,detail:{componentUid:i.uid,position:e,top:t.top+t.height/2}});window.dispatchEvent(n),window.addEventListener("editor:close-add-section-popup",tI)}return!1},tF=()=>{if(x)return i.name?.includes("Shopify section:")?i.name:`Shopify section: ${i.name}`;let t=i.name&&i.name===`Section ${i.uid}`;return tc()>=20?`${t?"Section":i?.name} ${ty()+1}/25`:t?`${L("Section")} ${ty()+1}`:i?.name},t$=()=>{let{isShopifySection:t,tag:e}=i;return!t&&(!M||!!H)&&g.includes(e)&&!Y},tD="Section"===i.tag&&!i.isThemeSection&&"STATIC"!==y&&"POST_PURCHASE"!==y&&!i.isShopifySection&&25>ty()&&!Y;return t(e,{children:[!("Section"==i.tag&&H)&&t("div",{"data-toolbar":!0,"data-toolbar-section":"Section"==i.tag,"data-toolbar-theme-section":"Section"==i.tag&&!!M||H,"data-toolbar-shopify-section":"Section"==i.tag&&!!x,"data-toolbar-limit":ty()>=25||!!Y,children:[t("div",{"data-toolbar-show-parent":!0,onClick:t=>tV(t),"aria-hidden":"true",children:[tv&&o("div",{className:"gp-hidden gp-w-[12px] interaction-use-custom-element",children:o("svg",{width:"12",height:"13",viewBox:"0 0 12 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.36799 0.430523C4.51596 0.205675 4.76709 0.0703125 5.03626 0.0703125H9.88576C10.2042 0.0703125 10.395 0.424378 10.2198 0.69034L8.36968 3.4992C8.28209 3.63218 8.37747 3.80922 8.53671 3.80922H10.749C11.1111 3.80922 11.2869 4.25204 11.0233 4.50036L3.03971 12.0217C2.7572 12.2878 2.29932 12.0361 2.37262 11.655L3.27994 6.93698C3.30366 6.81364 3.20915 6.69921 3.08354 6.69921H0.984651C0.66625 6.69921 0.475479 6.34529 0.650515 6.07932L4.36799 0.430523Z",fill:"#F9F9F9"})})}),tb&&o("div",{className:"gp-hidden gp-w-[14px] interaction-use-custom-element",children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.32785 3.66159C7.87459 3.58351 8.25451 3.077 8.17643 2.53026C8.09836 1.98353 7.59184 1.6036 7.0451 1.68168C3.92866 2.12673 1.5332 4.80488 1.5332 8.04424C1.5332 11.594 4.41085 14.4716 7.9606 14.4716C11.1706 14.4716 13.8294 12.1194 14.3105 9.04446C14.3959 8.49881 14.0227 7.98727 13.4771 7.9019C12.9314 7.81654 12.4199 8.18967 12.3345 8.73531C12.0034 10.852 10.1702 12.4716 7.9606 12.4716C5.51541 12.4716 3.5332 10.4894 3.5332 8.04424C3.5332 5.81431 5.18273 3.96793 7.32785 3.66159ZM10.3432 1.97548C10.6232 1.69551 11.102 1.83654 11.1855 2.22355L11.6106 4.19339C11.6313 4.28936 11.7063 4.36432 11.8023 4.38503L13.7721 4.81013C14.1591 4.89365 14.3001 5.37247 14.0202 5.65243L12.3432 7.32945C12.1244 7.54819 11.8168 7.65338 11.5099 7.61436L10.1528 7.44178C9.84592 7.40276 9.53827 7.50795 9.31953 7.72669L8.66719 8.37903C8.35477 8.69145 7.86633 8.70954 7.57623 8.41943C7.28613 8.12933 7.30421 7.64089 7.61663 7.32847L8.26898 6.67613C8.48771 6.45739 8.5929 6.14974 8.55388 5.84287L8.38131 4.48575C8.34228 4.17888 8.44748 3.87123 8.66621 3.6525L10.3432 1.97548ZM8.19853 5.1916C8.35319 5.72179 8.04877 6.27697 7.51858 6.43163C6.83078 6.63226 6.32988 7.2683 6.32988 8.01873C6.32988 8.9316 7.06991 9.67164 7.98279 9.67164C8.73014 9.67164 9.36406 9.17486 9.56743 8.49131C9.72492 7.96195 10.2817 7.6605 10.8111 7.81799C11.3404 7.97548 11.6419 8.53227 11.4844 9.06163C11.0356 10.57 9.63916 11.6716 7.98279 11.6716C5.96535 11.6716 4.32988 10.0362 4.32988 8.01873C4.32988 6.35558 5.44054 4.95445 6.95851 4.51165C7.4887 4.35699 8.04387 4.66141 8.19853 5.1916Z",fill:"#F9F9F9"})})}),U&&tw&&o("div",{"data-toolbar-icon-drag":!0,children:t("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[o("path",{d:"M5.5 4.5C6.32843 4.5 7 3.82843 7 3C7 2.17157 6.32843 1.5 5.5 1.5C4.67157 1.5 4 2.17157 4 3C4 3.82843 4.67157 4.5 5.5 4.5Z",fill:"currentColor"}),o("path",{d:"M5.5 9.5C6.32843 9.5 7 8.82843 7 8C7 7.17157 6.32843 6.5 5.5 6.5C4.67157 6.5 4 7.17157 4 8C4 8.82843 4.67157 9.5 5.5 9.5Z",fill:"currentColor"}),o("path",{d:"M7 13C7 13.8284 6.32843 14.5 5.5 14.5C4.67157 14.5 4 13.8284 4 13C4 12.1716 4.67157 11.5 5.5 11.5C6.32843 11.5 7 12.1716 7 13Z",fill:"currentColor"}),o("path",{d:"M10.5 4.5C11.3284 4.5 12 3.82843 12 3C12 2.17157 11.3284 1.5 10.5 1.5C9.67157 1.5 9 2.17157 9 3C9 3.82843 9.67157 4.5 10.5 4.5Z",fill:"currentColor"}),o("path",{d:"M12 8C12 8.82843 11.3284 9.5 10.5 9.5C9.67157 9.5 9 8.82843 9 8C9 7.17157 9.67157 6.5 10.5 6.5C11.3284 6.5 12 7.17157 12 8Z",fill:"currentColor"}),o("path",{d:"M10.5 14.5C11.3284 14.5 12 13.8284 12 13C12 12.1716 11.3284 11.5 10.5 11.5C9.67157 11.5 9 12.1716 9 13C9 13.8284 9.67157 14.5 10.5 14.5Z",fill:"currentColor"})]})}),"Section"==i.tag?t("div",{"data-toolbar-name":!0,children:[tF(),U&&x&&!i.isShopifyVisibility&&t("svg",{"data-toolbar-visibility":!0,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.1252 9.99773C13.1243 8.27226 11.7248 6.87423 9.99935 6.87506C8.27386 6.87561 6.87518 8.27455 6.87518 10.0001C6.87518 11.7259 8.27429 13.1251 10.0002 13.1251C11.7257 13.1251 13.125 11.727 13.1252 10.0011V9.99773ZM9.99985 8.12506C11.035 8.12451 11.8746 8.96322 11.8752 9.99839V10.0004C11.8752 11.0357 11.0359 11.8751 10.0002 11.8751C8.96465 11.8751 8.12518 11.0356 8.12518 10.0001C8.12518 8.96472 8.96451 8.12533 9.99985 8.12506Z",fill:"#F9F9F9"}),o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.99885 4.37593C5.66421 4.37604 2.80603 7.64523 1.79548 9.00983C1.35636 9.60279 1.35918 10.4 1.80012 10.9902C2.81706 12.3514 5.69374 15.6241 9.99886 15.6241C14.3806 15.6241 17.2194 12.3452 18.2168 10.9808C18.6473 10.392 18.6442 9.60472 18.211 9.01902C17.2056 7.65938 14.3429 4.37583 9.99885 4.37593ZM2.80002 9.75374C3.77049 8.44326 6.30207 5.62602 9.99888 5.62593C13.7041 5.62585 16.24 8.45598 17.206 9.76225C17.3146 9.9091 17.3149 10.0965 17.2077 10.2431C16.254 11.5477 13.7416 14.3741 9.99886 14.3741C6.33149 14.3741 3.78173 11.5541 2.80152 10.242C2.69021 10.0931 2.69001 9.90229 2.80002 9.75374Z",fill:"#F9F9F9"}),o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.0763 3.26988C18.3415 3.58809 18.2985 4.06101 17.9803 4.32619L2.98032 16.8262C2.66211 17.0914 2.18919 17.0484 1.92402 16.7302C1.65884 16.412 1.70184 15.939 2.02004 15.6739L17.02 3.17385C17.3383 2.90868 17.8112 2.95167 18.0763 3.26988Z",fill:"#F9F9F9"})]})]}):o("div",{"data-toolbar-name":!0,children:L(tj())}),U&&"Section"!==i.tag&&I.length>0&&o("div",{"data-toolbar-icon-parent":!0,"data-toolbar-icon-parent-open":T,children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:o("path",{d:"M5.65522 10C5.07265 10 4.7809 9.22865 5.19284 8.77753L7.53762 6.20974C7.79298 5.93009 8.20702 5.93009 8.46238 6.20974L10.8072 8.77754C11.2191 9.22866 10.9274 10 10.3448 10H5.65522Z",fill:"currentColor"})})})]}),U&&T&&I.map((e,i)=>t("div",{"data-toolbar-parent":!0,"data-component-tag":e.tag,"data-parent-uid":e.uid,"data-toolbar-theme-section":H,"data-toolbar-parent-revert":j,style:{top:j?`${36*(i+1)}px`:`${-36*(i+1)}px`},children:[o("div",{"data-toolbar-icon-drag":!0,children:t("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[o("path",{d:"M5.5 4.5C6.32843 4.5 7 3.82843 7 3C7 2.17157 6.32843 1.5 5.5 1.5C4.67157 1.5 4 2.17157 4 3C4 3.82843 4.67157 4.5 5.5 4.5Z",fill:"currentColor"}),o("path",{d:"M5.5 9.5C6.32843 9.5 7 8.82843 7 8C7 7.17157 6.32843 6.5 5.5 6.5C4.67157 6.5 4 7.17157 4 8C4 8.82843 4.67157 9.5 5.5 9.5Z",fill:"currentColor"}),o("path",{d:"M7 13C7 13.8284 6.32843 14.5 5.5 14.5C4.67157 14.5 4 13.8284 4 13C4 12.1716 4.67157 11.5 5.5 11.5C6.32843 11.5 7 12.1716 7 13Z",fill:"currentColor"}),o("path",{d:"M10.5 4.5C11.3284 4.5 12 3.82843 12 3C12 2.17157 11.3284 1.5 10.5 1.5C9.67157 1.5 9 2.17157 9 3C9 3.82843 9.67157 4.5 10.5 4.5Z",fill:"currentColor"}),o("path",{d:"M12 8C12 8.82843 11.3284 9.5 10.5 9.5C9.67157 9.5 9 8.82843 9 8C9 7.17157 9.67157 6.5 10.5 6.5C11.3284 6.5 12 7.17157 12 8Z",fill:"currentColor"}),o("path",{d:"M10.5 14.5C11.3284 14.5 12 13.8284 12 13C12 12.1716 11.3284 11.5 10.5 11.5C9.67157 11.5 9 12.1716 9 13C9 13.8284 9.67157 14.5 10.5 14.5Z",fill:"currentColor"})]})}),o("div",{"data-toolbar-name":!0,children:tH(e)})]},e.uid)),U&&!tg&&t(e,{children:[" ",tD&&o(c,{...i}),t$()&&o(f,{...i}),"Sticky"==i.tag&&o("div",{"data-toolbar-zoom-out":!0,onClick:t=>tB(t),"aria-hidden":"true",children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.5 7C14.7761 7 15 6.77614 15 6.5C15 6.22386 14.7761 6 14.5 6L10.7072 6L14.8536 1.85355C15.0489 1.65829 15.0489 1.34171 14.8536 1.14645C14.6584 0.951186 14.3418 0.951185 14.1465 1.14645L10 5.29297L10 1.5C10 1.22386 9.77614 1 9.5 1C9.22386 1 9 1.22386 9 1.5L9 6.5C9 6.77614 9.22386 7 9.5 7L14.5 7ZM6 10.7073L6 14.5C6 14.7761 6.22386 15 6.5 15C6.77614 15 7 14.7761 7 14.5L7 9.5C7 9.22386 6.77614 9 6.5 9H1.5C1.22386 9 1 9.22386 1 9.5C1 9.77614 1.22386 10 1.5 10H5.29306L1.14662 14.1464C0.951353 14.3417 0.951353 14.6583 1.14662 14.8536C1.34188 15.0488 1.65846 15.0488 1.85372 14.8536L6 10.7073Z",fill:"currentColor"})})}),ta.includes(i.tag)&&o(s,{"data-toolbar-title":!0,enable:!0,"data-toolbar-disable":!1,text:L("Edit content in Shopify"),position:"top",onClick:tE,"aria-hidden":"true",children:t("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.61129 2.47348C8.61129 2.47348 8.47099 2.51557 8.23248 2.59274C8.19039 2.46647 8.13427 2.30512 8.05009 2.15079C7.78352 1.6387 7.39068 1.37212 6.91366 1.36511C6.87858 1.36511 6.85052 1.36511 6.81545 1.37212C6.80843 1.36511 6.80142 1.35634 6.7944 1.34757C6.78739 1.3388 6.78037 1.33003 6.77336 1.32302C6.56992 1.09854 6.30335 0.993314 5.98768 1.00033C5.37737 1.02137 4.76706 1.46332 4.269 2.249C3.91825 2.80319 3.65869 3.49767 3.58153 4.03082C3.38823 4.09074 3.21092 4.14586 3.05516 4.19429C2.64595 4.32151 2.3851 4.40261 2.37494 4.40261C2.01718 4.51485 2.01016 4.52888 1.96106 4.85859C1.92598 5.11113 1 12.2945 1 12.2945L7.14764 13.3583C7.18955 13.118 7.30454 12.8953 7.47848 12.7214L8.70249 11.4974V2.45945C8.66741 2.45945 8.63234 2.46647 8.61129 2.47348ZM6.82948 3.02767L6.62554 3.09101C6.27515 3.19989 5.90094 3.31617 5.5317 3.42752C5.65797 2.94349 5.89648 2.46647 6.19111 2.15079C6.30335 2.03154 6.45067 1.90527 6.63306 1.8281C6.80142 2.18587 6.83649 2.68393 6.82948 3.02767ZM5.99469 1.4072C6.13499 1.4072 6.26126 1.43526 6.36649 1.50541C6.19813 1.58959 6.0438 1.71586 5.88947 1.87721C5.50364 2.29109 5.202 2.94349 5.08274 3.56783C4.74459 3.66991 4.41804 3.77199 4.10838 3.8688L4.01646 3.89753C4.22691 2.90841 5.05468 1.43526 5.99469 1.4072ZM4.80214 7.0122C4.81874 7.26957 5.09737 7.44833 5.43473 7.66478C5.95252 7.99699 6.60867 8.41798 6.66813 9.3482C6.7453 10.5548 6.02977 11.3826 4.99154 11.4457C3.7569 11.5229 3.06943 10.7933 3.06943 10.7933L3.32899 9.67791C3.32899 9.67791 4.01646 10.197 4.56363 10.1619C4.92139 10.1409 5.04767 9.84627 5.04065 9.64283C5.01607 9.26796 4.73308 9.06671 4.41569 8.84101C4.00848 8.55142 3.54465 8.22157 3.49735 7.4331C3.42018 6.24756 4.19885 5.05501 5.91051 4.94277C6.57694 4.90068 6.91366 5.06904 6.91366 5.06904L6.52082 6.53518C6.52082 6.53518 6.08589 6.33876 5.56678 6.36682C4.80915 6.41592 4.79512 6.89294 4.80214 7.0122ZM7.23635 2.9014C7.22934 2.59274 7.19426 2.15781 7.04695 1.78601C7.50994 1.87721 7.74143 2.39632 7.83964 2.71199C7.70008 2.75665 7.54275 2.80575 7.37118 2.8593L7.23635 2.9014Z",fill:"currentColor"}),o("path",{d:"M10.7719 3.44156C10.7757 3.47543 11.1733 6.16931 11.541 8.65883L8.95503 11.2448V2.57871C9.16548 2.78214 9.71265 3.31528 9.71265 3.31528C9.71265 3.31528 10.6106 3.32931 10.6597 3.33633C10.7088 3.34334 10.7649 3.37842 10.7719 3.44156Z",fill:"currentColor"}),o("path",{d:"M14.8056 8.644L14.0424 7.88088C13.7832 7.62163 13.3629 7.62163 13.1036 7.88088L12.1519 8.83258L13.8539 10.5345L14.8056 9.58282C15.0648 9.32357 15.0648 8.90325 14.8056 8.644Z",fill:"currentColor"}),o("path",{d:"M7.85018 13.0942L11.6419 9.30246L13.3438 11.0044L9.55212 14.7961C9.43782 14.9104 9.28573 14.9791 9.1244 14.9892L7.93427 15.0641C7.73484 15.0767 7.56961 14.9114 7.58216 14.712L7.65706 13.5219C7.66721 13.3606 7.73588 13.2085 7.85018 13.0942Z",fill:"currentColor"})]})}),o(s,{enable:"Section"==i.tag&&tc()>=25||x,text:x?L("Disabled. Please edit in Shopify Editor"):L("Page has reached Shopify’s 25 section-limit"),position:"bottom",width:"200px","data-toolbar-duplicate":!0,"data-toolbar-disable":tL,onClick:tL?void 0:t=>tA(t),"aria-hidden":"true",className:tL?"!gp-cursor-not-allowed":"",children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.08423 1.21289C5.53194 1.21289 5.08423 1.66061 5.08423 2.21289V3.78711H4.26172C3.43329 3.78711 2.76172 4.45868 2.76172 5.28711V13.2871C2.76172 14.1155 3.43329 14.7871 4.26172 14.7871H10.2617C11.0901 14.7871 11.7617 14.1155 11.7617 13.2871V12.4629H13.0842C13.6365 12.4629 14.0842 12.0152 14.0842 11.4629V2.21289C14.0842 1.66061 13.6365 1.21289 13.0842 1.21289H6.08423ZM10.7617 12.4629H6.08423C5.53194 12.4629 5.08423 12.0152 5.08423 11.4629V4.78711H4.26172C3.98558 4.78711 3.76172 5.01097 3.76172 5.28711V13.2871C3.76172 13.5633 3.98558 13.7871 4.26172 13.7871H10.2617C10.5379 13.7871 10.7617 13.5633 10.7617 13.2871V12.4629Z",fill:"currentColor"})})}),o(s,{"data-toolbar-delete":!0,onClick:t=>tS?null:tT(t),enable:tS,"data-toolbar-disable":tS,text:x?L("Disabled. Please edit in Shopify Editor"):J.text,width:J.width,position:x?"bottom":F,"aria-hidden":"true",className:tS?"!gp-cursor-not-allowed":"",children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 2.88965V2.38965C11 1.56122 10.3284 0.889648 9.5 0.889648H6.5C5.67157 0.889648 5 1.56122 5 2.38965V2.88965H2C1.72386 2.88965 1.5 3.11351 1.5 3.38965C1.5 3.66579 1.72386 3.88965 2 3.88965H3.21997V13.1099C3.21997 14.2144 4.1154 15.1099 5.21997 15.1099H11.22C12.3245 15.1099 13.22 14.2144 13.22 13.1099V3.88965H14C14.2761 3.88965 14.5 3.66579 14.5 3.38965C14.5 3.11351 14.2761 2.88965 14 2.88965H11ZM6 2.88965H10V2.38965C10 2.11351 9.77614 1.88965 9.5 1.88965H6.5C6.22386 1.88965 6 2.11351 6 2.38965V2.88965ZM6.24976 6.13965C6.66397 6.13965 6.99976 6.47543 6.99976 6.88965V11.3896C6.99976 11.8039 6.66397 12.1396 6.24976 12.1396C5.83554 12.1396 5.49976 11.8039 5.49976 11.3896V6.88965C5.49976 6.47543 5.83554 6.13965 6.24976 6.13965ZM10.4998 6.88965C10.4998 6.47543 10.164 6.13965 9.74976 6.13965C9.33554 6.13965 8.99976 6.47543 8.99976 6.88965V11.3896C8.99976 11.8039 9.33554 12.1396 9.74976 12.1396C10.164 12.1396 10.4998 11.8039 10.4998 11.3896V6.88965Z",fill:"currentColor"})})})]}),o(v,{uid:i.uid})]},i.uid),"STATIC"!==y&&"POST_PURCHASE"!==y&&25>ty()&&o(u,{...i}),o("div",{"data-outline":!0,"data-outline-section":"Section"==i.tag,"data-outline-theme-section":"Section"==i.tag&&!!M||H,"data-outline-shopify-section":"Section"==i.tag&&!!x,"data-outline-limit":tP,"data-outline-error":!!Y},"outline-"+i.uid),"Section"==i.tag&&!H&&t(e,{children:[o(s,{enable:tc()>=25,text:L("Page has reached Shopify’s 25 section-limit"),position:"top","data-toolbar-add-top":!0,"data-toolbar-disable":tc()>=25,"data-toolbar-add-open":"above"==V,onClick:t=>tk(t,"above"),"aria-hidden":"true",children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:o("path",{d:"M8.45 3.95C8.45 3.70147 8.24853 3.5 8 3.5C7.75147 3.5 7.55 3.70147 7.55 3.95V7.55H3.95C3.70147 7.55 3.5 7.75147 3.5 8C3.5 8.24853 3.70147 8.45 3.95 8.45H7.55V12.05C7.55 12.2985 7.75147 12.5 8 12.5C8.24853 12.5 8.45 12.2985 8.45 12.05V8.45H12.05C12.2985 8.45 12.5 8.24853 12.5 8C12.5 7.75147 12.2985 7.55 12.05 7.55H8.45V3.95Z",fill:"#212121"})})}),o(s,{enable:tc()>=25,text:L("Page has reached Shopify’s 25 section-limit"),position:"top","data-toolbar-add-bottom":!0,"data-toolbar-disable":tc()>=25,"data-toolbar-add-open":"below"==V,onClick:t=>tk(t,"below"),"aria-hidden":"true",children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:o("path",{d:"M8.45 3.95C8.45 3.70147 8.24853 3.5 8 3.5C7.75147 3.5 7.55 3.70147 7.55 3.95V7.55H3.95C3.70147 7.55 3.5 7.75147 3.5 8C3.5 8.24853 3.70147 8.45 3.95 8.45H7.55V12.05C7.55 12.2985 7.75147 12.5 8 12.5C8.24853 12.5 8.45 12.2985 8.45 12.05V8.45H12.05C12.2985 8.45 12.5 8.24853 12.5 8C12.5 7.75147 12.2985 7.55 12.05 7.55H8.45V3.95Z",fill:"#212121"})})})]}),Y&&o(p,{errorSectionInfo:Y,onDismiss:tZ}),g.includes(i.tag)&&U&&o(b,{...i}),U&&o(h,{...i})]})};var ComponentToolbarPreview$1=i(ComponentToolbarPreview);export{ComponentToolbarPreview$1 as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getResponsiveValueByScreen as e}from"./get-resonsive-value.js";let 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)=>{let l=o?`${t?.desktop}${o}`:t?.desktop,i=o?`${t?.tablet}${o}`:t?.tablet,a=o?`${t?.mobile}${o}`:t?.mobile,s={};return l&&(s[`--${e}`]=l),i&&i!==l&&(s[`--${e}-tablet`]=i),a&&a!==i&&(s[`--${e}-mobile`]=a),s},
|
|
1
|
+
import{getResponsiveValueByScreen as e}from"./get-resonsive-value.js";let 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)=>{let l=o?`${t?.desktop}${o}`:t?.desktop,i=o?`${t?.tablet}${o}`:t?.tablet,a=o?`${t?.mobile}${o}`:t?.mobile,s={};return l&&(s[`--${e}`]=l),i&&i!==l&&(s[`--${e}-tablet`]=i),a&&a!==i&&(s[`--${e}-mobile`]=a),s},makeWidth=(t,o)=>{let l=(t,o,l)=>{let i=e(o,t),a=l?.[t]===void 0?l?.desktop:l?.[t];return a?"100%":!1===a?i??i:i||"auto"},i=l("desktop",t,o),a=l("tablet",t,o),s=l("mobile",t,o),m={};return i&&(m.desktop=i),a&&a!==i&&(m.tablet=a),s&&s!==a&&(m.mobile=s),m},makeGlobalSizeWidthResponsive=e=>{let t=e?.desktop?.width,o=e?.tablet?.width,l=e?.mobile?.width,i={};return t&&(i["--w"]=t),o&&o!==t&&(i["--w-tablet"]=o),l&&l!==o&&(i["--w-mobile"]=l),i},makeGlobalSizeHeightResponsive=e=>{let t=e?.desktop?.height,o=e?.tablet?.height,l=e?.mobile?.height,i={};return t&&(i["--h"]=t),o&&o!==t&&(i["--h-tablet"]=o),l&&l!==o&&(i["--h-mobile"]=l),i},makeHeight=(e,t)=>{let o=(e,t,o)=>{let l=t?.[e],i=o?.[e];return i?"auto":!1===i?l??l:l},l=o("desktop",e,t),i=o("tablet",e,t),a=o("mobile",e,t),s={};return l&&(s.desktop=l),i&&i!==l&&(s.tablet=i),a&&a!==i&&(s.mobile=a),s},makeAspectRatio=(t,o,l)=>{let i={},a=["desktop","mobile","tablet"];return a.forEach(a=>{let s=e(t,a);"none"!==s&&(i={...i,[a]:"custom"!==s?s:`${e(o,"desktop")}/${e(l,"desktop")}`})}),i},makeLineClamp=(t,o)=>{let l=(t,o,l)=>{let i=e(o,t),a=e(l,t);return 0===i?"0":a||void 0===a?i:"unset"},i=l("desktop",t,o),a=l("tablet",t,o),s=l("mobile",t,o),m={};return i&&(m.desktop=i),a&&a!==i&&(m.tablet=a),s&&s!==a&&(m.mobile=s),m},getResponsiveWidthValue=(e,t,o)=>o?`${t?.[e]}${o}`:t?.[e]==="default"?"1200px":t?.[e],makeStyleResponsiveWidth=(e,t)=>{let o=getResponsiveWidthValue("desktop",e,t),l=getResponsiveWidthValue("tablet",e,t),i=getResponsiveWidthValue("mobile",e,t),a={};return o&&(a["--w"]=o),l&&l!==o&&(a["--w-tablet"]=l),i&&i!==l&&(a["--w-mobile"]=i),a},getResponsiveWidthValueWithoutAuto=(e,t,o)=>{if(o)return`${t?.[e]}${o}`;switch(t?.[e]){case"default":return"1200px";case"Auto":return"100%";default:return t?.[e]}},makeStyleResponsiveWidthWithoutAuto=(e,t)=>{let o=getResponsiveWidthValueWithoutAuto("desktop",e,t),l=getResponsiveWidthValueWithoutAuto("tablet",e,t),i=getResponsiveWidthValueWithoutAuto("mobile",e,t),a={};return o&&(a["--w"]=o),l&&l!==o&&(a["--w-tablet"]=l),i&&i!==l&&(a["--w-mobile"]=i),a};export{makeAspectRatio,makeGlobalSizeHeightResponsive,makeGlobalSizeWidthResponsive,makeHeight,makeLineClamp,makeStyle,makeStyleKey,makeStyleResponsive,makeStyleResponsiveState,makeStyleResponsiveWidth,makeStyleResponsiveWidthWithoutAuto,makeStyleState,makeWidth,removeNullUndefined};
|
package/dist/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{default as AddOn}from"./components/AddOn.js";export{default as Render}from"./components/Render.js";export{default as RenderPreview}from"./components/RenderPreview.js";export{RenderChildren,default as RenderLiquid,WrapRenderChildren}from"./components/Render.liquid.js";export{AddonProvider,useAddon,useAddons}from"./contexts/AddonContext.js";export{BuilderComponentProvider,useBuilderComponent}from"./contexts/BuilderComponent.js";export{BuilderProvider,useBuilderStore}from"./contexts/BuilderContext.js";export{BuilderPreviewProvider,useBuilderPreviewStore}from"./contexts/BuilderPreviewContext.js";export{CartLineProvider,useCartLineStore}from"./contexts/CartLineContext.js";export{ProductListProvider,useProductListStore}from"./contexts/ProductListContext.js";export{ProductProvider,useProductStore}from"./contexts/ProductContext.js";export{SectionProvider,useSection,useSectionStore}from"./contexts/SectionContext.js";export{ShopProvider,useShopStore}from"./contexts/ShopContext.js";export{PageProvider,usePageStore}from"./contexts/PageContext.js";export{CollectionProvider,useCollectionStore}from"./contexts/CollectionContext.js";export{ModalProvider,useModalStore}from"./contexts/ModalContext.js";export{ArticleListProvider,useArticleListStore}from"./contexts/ArticleListContext.js";export{ArticleProvider,useArticleStore}from"./contexts/ArticleContext.js";export{I18nProvider,useI18nStore}from"./contexts/I18nContext.js";export{PageViewUpDocument}from"./graphql/mutations/page-view-up.generated.js";export{CollectionDetailFilterDocument}from"./graphql/queries/collection-detail-filter.generated.js";export{CollectionDocument}from"./graphql/queries/collection.generated.js";export{CollectionsDocument}from"./graphql/queries/collections.generated.js";export{PublishedThemePagesDocument}from"./graphql/queries/published-theme-pages.generated.js";export{ProductsDocument}from"./graphql/queries/products.generated.js";export{StorePropertyDocument}from"./graphql/queries/store-property.generated.js";export{PreviewThemePageDocument}from"./graphql/queries/preview-page.generated.js";export{PublishedShopMetasDocument}from"./graphql/queries/published-shop-metas.generated.js";export{ShopShopifyDocument}from"./graphql/queries/shop-shopify.generated.js";export{ArticlesDocument}from"./graphql/queries/articles.generated.js";export{BlogsDocument}from"./graphql/queries/blogs.generated.js";export{ProductWithSellingPlansSelectFragment,ProductsWithSellingPlansDocument}from"./graphql/queries/products-with-selling-plans.generated.js";export{ProductVariantsWithSellingPlansDocument}from"./graphql/queries/product-variant-with-selling-plans.generated.js";export{LibraryTemplateDocument}from"./graphql-app-api/queries/LibraryTemplate.generated.js";export{ThemePageDocument}from"./graphql-app-api/queries/ThemePage.generated.js";export{SaleFunnelDiscountsDocument}from"./graphql-app-api/queries/SaleFunnelDiscounts.generated.js";export{LibrarySaleFunnelDocument}from"./graphql-app-api/queries/LibrarySaleFunnelDiscount.generated.js";export{ShopLibraryPageDocument}from"./graphql-app-api/queries/ShopLibraryPage.generated.js";export{SaleFunnelOfferDocument}from"./graphql-app-api/queries/SaleFunnelOffer.generated.js";export{ThemePageMetaDocument}from"./graphql-app-api/queries/ThemePageMeta.generated.js";export{composeBorderCss,composeBorderResponsive,getBorderRadiusStyle,getBorderStyle,handleConvertBorderColor,handleConvertBorderStyle,handleConvertBorderWidth,handleConvertClassColor,handleConvertClassColorDynamicBtn,handleConvertInputBorderColor}from"./helpers/borders.js";export{getCarouselContainerHeight,makeContainerWidthOrHeight,makeDotGapToCarouselStyle}from"./helpers/carousel.js";export{cls}from"./helpers/cls.js";export{animations}from"./helpers/animations.js";export{filterToolbarPreview}from"./helpers/filter-toolbar-preview.js";export{flattenConnection}from"./helpers/flatten-connection.js";export{getResponsiveStateValue,getResponsiveValue,getResponsiveValueByScreen,isColumnDirectionExist}from"./helpers/get-resonsive-value.js";export{getShortName}from"./helpers/get-shortname.js";export{default as globalEvent}from"./helpers/GlobalEvent.js";export{default as isBrowser}from"./helpers/is-browser.js";export{isEmptyChildren}from"./helpers/is-empty-children.js";export{default as isSafari}from"./helpers/is-safari.js";export{normalizeBuilderData}from"./helpers/normalize-builder-data.js";export{prefetchQueries}from"./helpers/prefetch-queries.js";export{validateEmail}from"./helpers/email.js";export{loadScript}from"./helpers/load-script.js";export{composeSpacing,getSpacingVariable}from"./helpers/spacing.js";export{genVariable}from"./helpers/css-variable.js";import*as e from"./helpers/tracking/fpixel.js";import*as o from"./helpers/tracking/gtag.js";import*as t from"./helpers/tracking/tiktokpixel.js";export{GRADIENT_BGR_KEY,composeBackgroundCss,getBgByDevice,getBgImageByDevice,getBgVideoByDevice,getColor,getCombinedBackgroundImage,getGradientBgrStyleByDevice,getGradientBgrStyleForButton,getGradientImageBgrStyleByDevice,getStyleBackgroundByDevice,getStyleBgColor,makeFixedBgAttachment}from"./helpers/background.js";export{composeBackgroundImageCss,getBgImageSourceByDevice,getStyleBackgroundImage,getStyleBgImageSource}from"./helpers/backgroundImage.js";export{composeTextColorCss,getGlobalColorCSSProp,getGlobalColorClass,getGlobalColorResponsiveClass,getGlobalColorResponsiveStyle,getGlobalColorStateClass,getGlobalColorStateClassDynamicBtn,getGlobalColorStateResponsiveClass,getGlobalColorStateResponsiveClassDynamicBtn,getGlobalColorStateResponsiveStyle,getGlobalColorStateStyle,getGlobalColorStyle,getSingleColorVariable,isColor}from"./helpers/colors.js";export{composeAdvanceStyle,composeAdvanceStyleForPostPurchase,convertBoxShadowV1ToV2,filterAttrInStyle,getCornerStyle,removeAttrInStyle,removePaddingYInStyle,splitStyle}from"./helpers/compose-advance-style.js";export{composeClasses}from"./helpers/composeClasses.js";export{baseAssetURL,isLocalEnv}from"./helpers/convert.js";export{convertHTML}from"./helpers/covert-entities-html.js";export{composePositionLineHeight,composePostionIconList}from"./helpers/icon-list.js";export{isDefined}from"./helpers/is-defined.js";export{composeGridLayout,convertOldLayout,getLayoutClasses,gridToArrayRegex,optionLayoutStyle}from"./helpers/layout.js";export{makeAspectRatio,makeGlobalSizeHeightResponsive,makeGlobalSizeWidthResponsive,makeHeight,makeLineClamp,makeStyle,makeStyleKey,makeStyleResponsive,makeStyleResponsiveByScreen,makeStyleResponsiveState,makeStyleResponsiveWidth,makeStyleResponsiveWidthWithoutAuto,makeStyleState,makeWidth,removeNullUndefined}from"./helpers/make-style.js";export{convertTextAlignToJustify,getAlignmentClasses}from"./helpers/align.js";export{filterHoverVariables,filterTruthyStyles}from"./helpers/filter-styles.js";export{cloneDeep}from"./helpers/clone-deep.js";export{hasTranslatedLiquid}from"./helpers/liquid.js";export{checkInStock}from"./helpers/variant.js";export{checkAvailableVariantInStock,getSelectedVariant,parseSelectedOption}from"./helpers/product.js";export{generateCollectionQueryKey,generateProductQueryKey,generateProductsQueryKey}from"./helpers/query.js";export{composeCornerCss,composeRadius,composeRadiusResponsive,getCornerCSSFromGlobal,getCustomRadius,getRadiusCSSFromGlobal,getRadiusStyleActiveState}from"./helpers/radius.js";export{RenderIf,composeMemo,dataStringify,props,removeUndefinedValuesFromObject,sanitizeLiquid,styles,template}from"./helpers/render.js";export{composeShadow,composeShadowCss,getResponsiveStyleShadow,getResponsiveStyleShadowWithoutState,getStyleShadow,getStyleShadowState,parseValueWithUnit}from"./helpers/shadow.js";export{composeSize,composeSizeCss,genSizeClass,getAspectRatioGlobalSize,getFlexGrowClassByShapeGlobalSize,getGlobalSizeGap,getHeightByShapeGlobalSize,getPaddingGlobalSize,getPaddingStyleByDevice,getResponsiveStylePadding,getValueByDevice,getWidthByShapeGlobalSize,getWidthHeightGlobalSize,makeGlobalSize,makeGlobalSizeIcon,makeStyleWithDefault}from"./helpers/size.js";export{composeFallbackTypographyStyle,composeFontFamilyTypographyV2,composeTextHoverColorCss,composeTypography,composeTypographyAttr,composeTypographyClassName,composeTypographyCss,composeTypographyStyle,composeTypographyV2,composeTypographyV2Css,genTypoClass}from"./helpers/typography.js";export{useArticlesQuery,useBlogsQuery}from"./hooks/articles/useArticlesQuery.js";export{useAddToCart}from"./hooks/cart/use-add-to-cart.js";export{useCartData}from"./hooks/cart/use-cart-data.js";export{useCartDiscountCodesUpdate}from"./hooks/cart/use-cart-discount-codes-update.js";export{useCartNoteUpdate}from"./hooks/cart/use-cart-note-update.js";export{useCreateCart}from"./hooks/cart/use-create-cart.js";export{useRemoveCartItem}from"./hooks/cart/use-remove-cart-item.js";export{useUpdateCartItem}from"./hooks/cart/use-update-cart-item.js";export{useCheckoutUrl,useConnectedShopify,useCurrency,useEditorMode,useIsSampleProduct,useIsStorefrontProduct,useLocale,useMatchMutate,useMobileOnly,useMoneyFormat,usePageType,usePluginEnable,useStoreFront,useSwatches,useTimezone}from"./hooks/shop.js";export{useCollectionQuery}from"./hooks/shop/use-collection-query.js";export{useCollectionsQuery}from"./hooks/shop/use-collections-query.js";export{useProductQuery}from"./hooks/shop/use-product-query.js";export{useProductOffersQuery}from"./hooks/shop/useProductOffersQuery.js";export{useFetchHandle}from"./hooks/useFetchHandle.js";export{useProductsQuery,useProductsQueryAll}from"./hooks/shop/use-products-query.js";export{useCurrentDevice}from"./hooks/use-current-device.js";export{useLazyVideo}from"./hooks/use-lazy-video.js";export{default as useCartId}from"./hooks/useCartId.js";export{default as useCartLine}from"./hooks/useCartLine.js";export{default as useCartUI}from"./hooks/useCartUI.js";export{useCollection}from"./hooks/useCollection.js";export{convertDecimalToNumber,formatMoney,shopifyPriceRounding,useFormatMoney}from"./hooks/useFormatMoney.js";export{useId}from"react";export{default as useInitialSwatchesOptions}from"./hooks/useInitialSwatchesOptions.js";export{default as useIsomorphicLayoutEffect}from"./hooks/useIsomorphicLayoutEffect.js";export{default as useLoadScript}from"./hooks/useLoadScript.js";export{default as useMoney}from"./hooks/useMoney.js";export{usePrevious}from"./hooks/usePrevious.js";export{tGlobal as t,useI18n}from"./hooks/useI18n.js";export{useStickyStore}from"./hooks/useStickyStore.js";export{useCheckAvailableVariantInStock,useCurrentVariant,useCurrentVariantInStock,useFeaturedImageGlobal,useHasPreSelected,useIsSyncProduct,useProduct,useProductBundleDiscount,useProductOfferDiscount,useProductProperties,useProductShopifyEditLink,useQuantity,useSelectedOption,useUniqProductID,useVariant,useVariantOutStock,useVariants}from"./hooks/useProduct.js";export{useShopifyLink}from"./hooks/shop/useShopifyLink.js";export{useProductList,useProductListProducts,useProductListSettings,useProductListStyles}from"./hooks/useProductList.js";export{default as useSuspenseFetch}from"./hooks/useSuspenseFetch.js";export{default as useSwatchesOptions}from"./hooks/useSwatchesOptions.js";export{useRenderMode}from"./hooks/useRenderMode.js";export{usePreviewSharePage}from"./hooks/usePreviewSharePage.js";export{RenderModeEnv}from"./types/builder.js";export{InteractionTargetEvent,InteractionTriggerEvent}from"./types/custom.js";import*as r from"./types/shop.js";import*as s from"./types/appAPI.js";export{OptionNormalStyle,OptionSpecialStyle}from"./types/global-style.js";export{AnimationDirectionType,AnimationEasingType,AnimationSetting,AnimationTriggerType,AnimationType,AnimationZoomDirectionType}from"./types/animations.js";export{calculateFirstProduct,getCollection}from"./helpers/queries/get-collection.js";export{fetchMedias,fetchVariants,getProduct}from"./helpers/queries/get-product.js";export{getProductBySlug}from"./helpers/queries/get-product-by-slug.js";export{getAppBlocks}from"./helpers/third-party/getAppBlocks.js";export{addAppBlockId}from"./helpers/third-party/addAppBlockId.js";export{useInteraction}from"./helpers/interaction/index.js";export{createStoreFrontFetcher,hasPublicStoreFrontData}from"./helpers/create-store-front-fetcher.js";export{DEVICES,EMPTY_DEVICE_VALUE}from"./constants/device.js";export{e as fpixel,o as gtag,t as tiktokpixel,r as ShopType,s as AppAPIType};
|
|
1
|
+
export{default as AddOn}from"./components/AddOn.js";export{default as Render}from"./components/Render.js";export{default as RenderPreview}from"./components/RenderPreview.js";export{RenderChildren,default as RenderLiquid,WrapRenderChildren}from"./components/Render.liquid.js";export{AddonProvider,useAddon,useAddons}from"./contexts/AddonContext.js";export{BuilderComponentProvider,useBuilderComponent}from"./contexts/BuilderComponent.js";export{BuilderProvider,useBuilderStore}from"./contexts/BuilderContext.js";export{BuilderPreviewProvider,useBuilderPreviewStore}from"./contexts/BuilderPreviewContext.js";export{CartLineProvider,useCartLineStore}from"./contexts/CartLineContext.js";export{ProductListProvider,useProductListStore}from"./contexts/ProductListContext.js";export{ProductProvider,useProductStore}from"./contexts/ProductContext.js";export{SectionProvider,useSection,useSectionStore}from"./contexts/SectionContext.js";export{ShopProvider,useShopStore}from"./contexts/ShopContext.js";export{PageProvider,usePageStore}from"./contexts/PageContext.js";export{CollectionProvider,useCollectionStore}from"./contexts/CollectionContext.js";export{ModalProvider,useModalStore}from"./contexts/ModalContext.js";export{ArticleListProvider,useArticleListStore}from"./contexts/ArticleListContext.js";export{ArticleProvider,useArticleStore}from"./contexts/ArticleContext.js";export{I18nProvider,useI18nStore}from"./contexts/I18nContext.js";export{PageViewUpDocument}from"./graphql/mutations/page-view-up.generated.js";export{CollectionDetailFilterDocument}from"./graphql/queries/collection-detail-filter.generated.js";export{CollectionDocument}from"./graphql/queries/collection.generated.js";export{CollectionsDocument}from"./graphql/queries/collections.generated.js";export{PublishedThemePagesDocument}from"./graphql/queries/published-theme-pages.generated.js";export{ProductsDocument}from"./graphql/queries/products.generated.js";export{StorePropertyDocument}from"./graphql/queries/store-property.generated.js";export{PreviewThemePageDocument}from"./graphql/queries/preview-page.generated.js";export{PublishedShopMetasDocument}from"./graphql/queries/published-shop-metas.generated.js";export{ShopShopifyDocument}from"./graphql/queries/shop-shopify.generated.js";export{ArticlesDocument}from"./graphql/queries/articles.generated.js";export{BlogsDocument}from"./graphql/queries/blogs.generated.js";export{ProductWithSellingPlansSelectFragment,ProductsWithSellingPlansDocument}from"./graphql/queries/products-with-selling-plans.generated.js";export{ProductVariantsWithSellingPlansDocument}from"./graphql/queries/product-variant-with-selling-plans.generated.js";export{LibraryTemplateDocument}from"./graphql-app-api/queries/LibraryTemplate.generated.js";export{ThemePageDocument}from"./graphql-app-api/queries/ThemePage.generated.js";export{SaleFunnelDiscountsDocument}from"./graphql-app-api/queries/SaleFunnelDiscounts.generated.js";export{LibrarySaleFunnelDocument}from"./graphql-app-api/queries/LibrarySaleFunnelDiscount.generated.js";export{ShopLibraryPageDocument}from"./graphql-app-api/queries/ShopLibraryPage.generated.js";export{SaleFunnelOfferDocument}from"./graphql-app-api/queries/SaleFunnelOffer.generated.js";export{ThemePageMetaDocument}from"./graphql-app-api/queries/ThemePageMeta.generated.js";export{composeBorderCss,composeBorderResponsive,getBorderRadiusStyle,getBorderStyle,handleConvertBorderColor,handleConvertBorderStyle,handleConvertBorderWidth,handleConvertClassColor,handleConvertClassColorDynamicBtn,handleConvertInputBorderColor}from"./helpers/borders.js";export{getCarouselContainerHeight,makeContainerWidthOrHeight,makeDotGapToCarouselStyle}from"./helpers/carousel.js";export{cls}from"./helpers/cls.js";export{animations}from"./helpers/animations.js";export{filterToolbarPreview}from"./helpers/filter-toolbar-preview.js";export{flattenConnection}from"./helpers/flatten-connection.js";export{getResponsiveStateValue,getResponsiveValue,getResponsiveValueByScreen,isColumnDirectionExist}from"./helpers/get-resonsive-value.js";export{getShortName}from"./helpers/get-shortname.js";export{default as globalEvent}from"./helpers/GlobalEvent.js";export{default as isBrowser}from"./helpers/is-browser.js";export{isEmptyChildren}from"./helpers/is-empty-children.js";export{default as isSafari}from"./helpers/is-safari.js";export{normalizeBuilderData}from"./helpers/normalize-builder-data.js";export{prefetchQueries}from"./helpers/prefetch-queries.js";export{validateEmail}from"./helpers/email.js";export{loadScript}from"./helpers/load-script.js";export{composeSpacing,getSpacingVariable}from"./helpers/spacing.js";export{genVariable}from"./helpers/css-variable.js";import*as e from"./helpers/tracking/fpixel.js";import*as o from"./helpers/tracking/gtag.js";import*as t from"./helpers/tracking/tiktokpixel.js";export{GRADIENT_BGR_KEY,composeBackgroundCss,getBgByDevice,getBgImageByDevice,getBgVideoByDevice,getColor,getCombinedBackgroundImage,getGradientBgrStyleByDevice,getGradientBgrStyleForButton,getGradientImageBgrStyleByDevice,getStyleBackgroundByDevice,getStyleBgColor,makeFixedBgAttachment}from"./helpers/background.js";export{composeBackgroundImageCss,getBgImageSourceByDevice,getStyleBackgroundImage,getStyleBgImageSource}from"./helpers/backgroundImage.js";export{composeTextColorCss,getGlobalColorCSSProp,getGlobalColorClass,getGlobalColorResponsiveClass,getGlobalColorResponsiveStyle,getGlobalColorStateClass,getGlobalColorStateClassDynamicBtn,getGlobalColorStateResponsiveClass,getGlobalColorStateResponsiveClassDynamicBtn,getGlobalColorStateResponsiveStyle,getGlobalColorStateStyle,getGlobalColorStyle,getSingleColorVariable,isColor}from"./helpers/colors.js";export{composeAdvanceStyle,composeAdvanceStyleForPostPurchase,convertBoxShadowV1ToV2,filterAttrInStyle,getCornerStyle,removeAttrInStyle,removePaddingYInStyle,splitStyle}from"./helpers/compose-advance-style.js";export{composeClasses}from"./helpers/composeClasses.js";export{baseAssetURL,isLocalEnv}from"./helpers/convert.js";export{convertHTML}from"./helpers/covert-entities-html.js";export{composePositionLineHeight,composePostionIconList}from"./helpers/icon-list.js";export{isDefined}from"./helpers/is-defined.js";export{composeGridLayout,convertOldLayout,getLayoutClasses,gridToArrayRegex,optionLayoutStyle}from"./helpers/layout.js";export{makeAspectRatio,makeGlobalSizeHeightResponsive,makeGlobalSizeWidthResponsive,makeHeight,makeLineClamp,makeStyle,makeStyleKey,makeStyleResponsive,makeStyleResponsiveState,makeStyleResponsiveWidth,makeStyleResponsiveWidthWithoutAuto,makeStyleState,makeWidth,removeNullUndefined}from"./helpers/make-style.js";export{convertTextAlignToJustify,getAlignmentClasses}from"./helpers/align.js";export{filterHoverVariables,filterTruthyStyles}from"./helpers/filter-styles.js";export{cloneDeep}from"./helpers/clone-deep.js";export{hasTranslatedLiquid}from"./helpers/liquid.js";export{checkInStock}from"./helpers/variant.js";export{checkAvailableVariantInStock,getSelectedVariant,parseSelectedOption}from"./helpers/product.js";export{generateCollectionQueryKey,generateProductQueryKey,generateProductsQueryKey}from"./helpers/query.js";export{composeCornerCss,composeRadius,composeRadiusResponsive,getCornerCSSFromGlobal,getCustomRadius,getRadiusCSSFromGlobal,getRadiusStyleActiveState}from"./helpers/radius.js";export{RenderIf,composeMemo,dataStringify,props,removeUndefinedValuesFromObject,sanitizeLiquid,styles,template}from"./helpers/render.js";export{composeShadow,composeShadowCss,getResponsiveStyleShadow,getResponsiveStyleShadowWithoutState,getStyleShadow,getStyleShadowState,parseValueWithUnit}from"./helpers/shadow.js";export{composeSize,composeSizeCss,genSizeClass,getAspectRatioGlobalSize,getFlexGrowClassByShapeGlobalSize,getGlobalSizeGap,getHeightByShapeGlobalSize,getPaddingGlobalSize,getPaddingStyleByDevice,getResponsiveStylePadding,getValueByDevice,getWidthByShapeGlobalSize,getWidthHeightGlobalSize,makeGlobalSize,makeGlobalSizeIcon,makeStyleWithDefault}from"./helpers/size.js";export{composeFallbackTypographyStyle,composeFontFamilyTypographyV2,composeTextHoverColorCss,composeTypography,composeTypographyAttr,composeTypographyClassName,composeTypographyCss,composeTypographyStyle,composeTypographyV2,composeTypographyV2Css,genTypoClass}from"./helpers/typography.js";export{useArticlesQuery,useBlogsQuery}from"./hooks/articles/useArticlesQuery.js";export{useAddToCart}from"./hooks/cart/use-add-to-cart.js";export{useCartData}from"./hooks/cart/use-cart-data.js";export{useCartDiscountCodesUpdate}from"./hooks/cart/use-cart-discount-codes-update.js";export{useCartNoteUpdate}from"./hooks/cart/use-cart-note-update.js";export{useCreateCart}from"./hooks/cart/use-create-cart.js";export{useRemoveCartItem}from"./hooks/cart/use-remove-cart-item.js";export{useUpdateCartItem}from"./hooks/cart/use-update-cart-item.js";export{useCheckoutUrl,useConnectedShopify,useCurrency,useEditorMode,useIsSampleProduct,useIsStorefrontProduct,useLocale,useMatchMutate,useMobileOnly,useMoneyFormat,usePageType,usePluginEnable,useStoreFront,useSwatches,useTimezone}from"./hooks/shop.js";export{useCollectionQuery}from"./hooks/shop/use-collection-query.js";export{useCollectionsQuery}from"./hooks/shop/use-collections-query.js";export{useProductQuery}from"./hooks/shop/use-product-query.js";export{useProductOffersQuery}from"./hooks/shop/useProductOffersQuery.js";export{useFetchHandle}from"./hooks/useFetchHandle.js";export{useProductsQuery,useProductsQueryAll}from"./hooks/shop/use-products-query.js";export{useCurrentDevice}from"./hooks/use-current-device.js";export{useLazyVideo}from"./hooks/use-lazy-video.js";export{default as useCartId}from"./hooks/useCartId.js";export{default as useCartLine}from"./hooks/useCartLine.js";export{default as useCartUI}from"./hooks/useCartUI.js";export{useCollection}from"./hooks/useCollection.js";export{convertDecimalToNumber,formatMoney,shopifyPriceRounding,useFormatMoney}from"./hooks/useFormatMoney.js";export{useId}from"react";export{default as useInitialSwatchesOptions}from"./hooks/useInitialSwatchesOptions.js";export{default as useIsomorphicLayoutEffect}from"./hooks/useIsomorphicLayoutEffect.js";export{default as useLoadScript}from"./hooks/useLoadScript.js";export{default as useMoney}from"./hooks/useMoney.js";export{usePrevious}from"./hooks/usePrevious.js";export{tGlobal as t,useI18n}from"./hooks/useI18n.js";export{useStickyStore}from"./hooks/useStickyStore.js";export{useCheckAvailableVariantInStock,useCurrentVariant,useCurrentVariantInStock,useFeaturedImageGlobal,useHasPreSelected,useIsSyncProduct,useProduct,useProductBundleDiscount,useProductOfferDiscount,useProductProperties,useProductShopifyEditLink,useQuantity,useSelectedOption,useUniqProductID,useVariant,useVariantOutStock,useVariants}from"./hooks/useProduct.js";export{useShopifyLink}from"./hooks/shop/useShopifyLink.js";export{useProductList,useProductListProducts,useProductListSettings,useProductListStyles}from"./hooks/useProductList.js";export{default as useSuspenseFetch}from"./hooks/useSuspenseFetch.js";export{default as useSwatchesOptions}from"./hooks/useSwatchesOptions.js";export{useRenderMode}from"./hooks/useRenderMode.js";export{usePreviewSharePage}from"./hooks/usePreviewSharePage.js";export{RenderModeEnv}from"./types/builder.js";export{InteractionTargetEvent,InteractionTriggerEvent}from"./types/custom.js";import*as r from"./types/shop.js";import*as s from"./types/appAPI.js";export{OptionNormalStyle,OptionSpecialStyle}from"./types/global-style.js";export{AnimationDirectionType,AnimationEasingType,AnimationSetting,AnimationTriggerType,AnimationType,AnimationZoomDirectionType}from"./types/animations.js";export{calculateFirstProduct,getCollection}from"./helpers/queries/get-collection.js";export{fetchMedias,fetchVariants,getProduct}from"./helpers/queries/get-product.js";export{getProductBySlug}from"./helpers/queries/get-product-by-slug.js";export{getAppBlocks}from"./helpers/third-party/getAppBlocks.js";export{addAppBlockId}from"./helpers/third-party/addAppBlockId.js";export{useInteraction}from"./helpers/interaction/index.js";export{createStoreFrontFetcher,hasPublicStoreFrontData}from"./helpers/create-store-front-fetcher.js";export{DEVICES,EMPTY_DEVICE_VALUE}from"./constants/device.js";export{e as fpixel,o as gtag,t as tiktokpixel,r as ShopType,s as AppAPIType};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -43926,18 +43926,9 @@ declare const makeStyle: <T extends ShortHandProperty, K>(style: Record<T, K>) =
|
|
|
43926
43926
|
declare const makeStyleState: <T extends ShortHandProperty, K>(name: T, value?: Partial<Record<StateType, K>> | undefined) => {};
|
|
43927
43927
|
declare const makeStyleResponsiveState: <T extends ShortHandProperty, K>(name: T, value?: Partial<Record<NameDevices, Partial<Record<StateType, K>>>> | undefined) => {};
|
|
43928
43928
|
declare const makeStyleResponsive: <T extends ShortHandProperty, K>(name: T, value?: Partial<Record<NameDevices, K>> | undefined, unit?: string) => Record<ResponsiveKey<T>, K>;
|
|
43929
|
-
declare const makeStyleResponsiveByScreen: <T extends ShortHandProperty, K>(name: T, value?: Partial<Record<NameDevices, K>> | undefined, unit?: string) => Record<ResponsiveKey<T>, K>;
|
|
43930
43929
|
declare const makeWidth: (widthValue?: ObjectDevices<string | number>, fullWidthValue?: ObjectDevices<boolean>) => ObjectDevices<string | number>;
|
|
43931
|
-
declare const makeGlobalSizeWidthResponsive: (globalSize?: ObjectDevices<SizeSettingGlobal>) =>
|
|
43932
|
-
|
|
43933
|
-
'--w-tablet': string | undefined;
|
|
43934
|
-
'--w-mobile': string | undefined;
|
|
43935
|
-
};
|
|
43936
|
-
declare const makeGlobalSizeHeightResponsive: (globalSize?: ObjectDevices<SizeSettingGlobal>) => {
|
|
43937
|
-
'--h': string | undefined;
|
|
43938
|
-
'--h-tablet': string | undefined;
|
|
43939
|
-
'--h-mobile': string | undefined;
|
|
43940
|
-
};
|
|
43930
|
+
declare const makeGlobalSizeWidthResponsive: (globalSize?: ObjectDevices<SizeSettingGlobal>) => Record<string, string | undefined>;
|
|
43931
|
+
declare const makeGlobalSizeHeightResponsive: (globalSize?: ObjectDevices<SizeSettingGlobal>) => Record<string, string | undefined>;
|
|
43941
43932
|
declare const makeHeight: (heighValue?: ObjectDevices<string | number>, autoHeight?: ObjectDevices<boolean>) => ObjectDevices<string | number | undefined>;
|
|
43942
43933
|
declare const makeAspectRatio: (aspectRatio?: ObjectDevices<string>, aspectWidth?: ObjectDevices<string | number>, aspectHeight?: ObjectDevices<string | number>) => ObjectDevices<string>;
|
|
43943
43934
|
declare const makeLineClamp: (lineClampValue?: ObjectDevices<number>, hasLineClampValue?: ObjectDevices<boolean>) => ObjectDevices<string | number | undefined>;
|
|
@@ -56658,4 +56649,4 @@ declare const hasPublicStoreFrontData: (publicStoreFrontData: PublicStoreFrontDa
|
|
|
56658
56649
|
declare const DEVICES: NameDevices[];
|
|
56659
56650
|
declare const EMPTY_DEVICE_VALUE: undefined;
|
|
56660
56651
|
|
|
56661
|
-
export { AddOn, AddonProvider, AddonProviderProps, AdvancedType, AirProductReview, AliReviewsWidgetType, AlignItemProp, AlignProp, AnimationBaseSetting, AnimationConfig, AnimationDirectionType, AnimationEasingType, AnimationFadeSettingType, AnimationSetting, AnimationSettingType, AnimationShakeSettingType, AnimationSlideSettingType, AnimationTrigger, AnimationTriggerType, AnimationType, AnimationZoomDirectionType, AnimationZoomSettingType, appAPI as AppAPIType, ArticleListProvider, ArticleListProviderProps, ArticleProvider, ArticleProviderProps, ArticlesDocument, ArticlesQueryResponse, ArticlesQueryVariables, Background, BackgroundImageValue, BackgroundMedia, BackgroundVideoValue, BaseProps, BasePropsWrap, BlockEntity, BlogsDocument, BlogsQueryResponse, BlogsQueryVariables, BogosWidgetType, BoldSubscriptionsWidgetType, Border, BorderStyle, BuilderComponentProvider, BuilderComponentProviderProps, BuilderEntity, BuilderEntityNested, BuilderPreviewProvider, BuilderPreviewProviderProps, BuilderProvider, BuilderProviderProps, BuilderState, Builtin, CSSStateKey, CartLineProvider, CartLineProviderProps, CollectionDetailFilterDocument, CollectionDetailFilterQueryResponse, CollectionDetailFilterQueryVariables, CollectionDocument, CollectionProvider, CollectionProviderProps, CollectionQueryResponse, CollectionQueryVariables, CollectionSelectFragment, CollectionsDocument, CollectionsQueryResponse, CollectionsQueryVariables, ColorKey, ColorType$1 as ColorType, ColorValueType, Component, ComponentPreset, ComponentSetting, ContainerProp, ControlProp, ControlTriggerAction, ControlUI, CornerRadius, CornerRadiusType, CustomComponentConfig, DEVICES, DeepPartial, DotStyle, Dropdown, DynamicCollection, DynamicProduct, EMPTY_DEVICE_VALUE, ExtractState, FastBundleWidgetType, FeraReviewsV3WidgetType, FeraReviewsWidgetType, FetchCollectionArgs, FetchFunc, FetchProductParams, FlexDirectionProp, FontName, FontStyleType, GRADIENT_BGR_KEY, GlobalStyleConfig, GlobalStyleResponsiveConfig, GlobalSwatchesData, GraphQLConnection, GroupPropType, GrowaveWidgetTypeV1, GrowaveWidgetTypeV2, HSLAColorType, HSLColorType, HexColorType, I18nProvider, I18nProviderProps, ImageShape$1 as ImageShape, InitComponentType, InstantJudgeMeReviewsWidgetType, InstantKlaviyoWidgetType, InstantLooxReviewsWidgetType, Interaction, InteractionCondition, InteractionElement, InteractionTarget, InteractionTargetEvent, InteractionTargetEventObject, InteractionTriggerEvent, JudgeMeReviewsWidgetType, KlaviyoWidgetType, LaiProductReviewsAdvancedWidgetType, LaiProductReviewsWidgetType, LibrarySaleFunnelDocument, LibrarySaleFunnelQueryResponse, LibrarySaleFunnelQueryVariables, LibrarySection, LibraryTemplate, LibraryTemplateDocument, LibraryTemplateQueryResponse, LibraryTemplateQueryVariables, LooxReviewsWidgetType, LooxReviewsWidgetTypeV2, MediaSelectFragment, ModalProvider, ModalProviderProps, NameDevices, NestedKeys, ObjectDeviceGlobalType, ObjectDevices, ObjectLayoutValue, OmnisendWidgetType, OnlyOne, OpinewDesignWidgetType, OpinewWidgetType, Option$4 as Option, OptionNormalStyle, OptionSpecialStyle, Options$1 as Options, PaddingType, PageContext, PageProvider, PageProviderProps, PageSection, PageType, PageViewUpDocument, PageViewUpMutationResponse, PageViewUpMutationVariables, PickyStoryWidgetType, PostPurchaseTypo, PreOrderNowWodWidgetType, PreviewThemePageDocument, PreviewThemePageQueryResponse, PreviewThemePageQueryVariables, Primitive, ProductInputAnalytic, ProductListProvider, ProductListProviderProps, ProductOffer, ProductProvider, ProductProviderProps, ProductReviewsWidgetType, ProductSelectFragment, ProductVariantsWithSellingPlansDocument, ProductVariantsWithSellingPlansQueryResponse, ProductVariantsWithSellingPlansQueryVariables, ProductVariantsWithSellingPlansSelectFragment, ProductWithSellingPlansSelectFragment, ProductsDocument, ProductsQueryResponse, ProductsQueryVariables, ProductsWithSellingPlansDetailFragment, ProductsWithSellingPlansDocument, ProductsWithSellingPlansQueryResponse, ProductsWithSellingPlansQueryVariables, PublicStoreFrontData, PublishErrorSectionListEventDetail, PublishedShopMetasDocument, PublishedShopMetasQueryResponse, PublishedShopMetasQueryVariables, PublishedThemePageSelectFragment, PublishedThemePagesDocument, PublishedThemePagesQueryResponse, PublishedThemePagesQueryVariables, RGBAColorType, RGBColorType, Ratio$1 as Ratio, RawChild, RenderMemo as Render, RenderChildren, RenderIf, Render as RenderLiquid, RenderMode, RenderModeEnv, RenderPreviewMemo as RenderPreview, RequiredCursorEdge, ResponsiveKey, ResponsiveStateProp, RivyoWidgetType, RoundedSize, RyviuWidgetType, SaleFunnelDiscount$1 as SaleFunnelDiscount, SaleFunnelDiscountEdge$1 as SaleFunnelDiscountEdge, SaleFunnelDiscountObjectType$1 as SaleFunnelDiscountObjectType, SaleFunnelDiscountType$1 as SaleFunnelDiscountType, SaleFunnelDiscountValueType$1 as SaleFunnelDiscountValueType, SaleFunnelDiscountsDocument, SaleFunnelDiscountsQueryResponse, SaleFunnelDiscountsQueryVariables, SaleFunnelOffer, SaleFunnelOfferDocument, SaleFunnelOfferQueryResponse, SaleFunnelOfferQueryVariables, Scalars$1 as Scalars, ScaleByDirection, SectionCategory, SectionData, SectionEntity, SectionProvider, SectionProviderProps, Setting, SettingByAnimationType, SettingByAnimationValues, SettingUIControl, SettingUIGroup, ShadowProps, ShadowStyle, ShadowStyleApplied, ShadowType, Shop, ShopLibraryPage, ShopLibraryPageDocument, ShopLibraryPageQueryResponse, ShopLibraryPageQueryVariables, ShopLibrarySection, ShopProvider, ShopProviderProps, ShopShopifyDocument, ShopShopifyQueryResponse, ShopShopifyQueryVariables, shop as ShopType, SizeProps, SizeSetting$1 as SizeSetting, SizeSettingGlobal, SizeType, SpacingType, StampedWidgetType, StampedWidgetTypeV2, StateProp, StateSelector, StateType, StoreConfig, StorePropertyDocument, StorePropertyQueryResponse, StorePropertyQueryVariables, SwatchesOptionType, SwatchesOptionValue, TagShopWidgetType, TemplateCategory, TemplatePackage, Theme, ThemePage, ThemePageDocument, ThemePageMetaDocument, ThemePageMetaQueryResponse, ThemePageMetaQueryVariables, ThemePageQueryResponse, ThemePageQueryVariables, ThemeSection, ThemeSectionStatus$1 as ThemeSectionStatus, ThemeStyle, TransformProp, TriggerConfig, TrustooWidgetType, TypographyProps, TypographySetting, TypographySettingV2, TypographyType, TypographyV2Attrs, TypographyV2Family, TypographyV2FontFamilyType, TypographyV2Props, UltimateSalesBoostWidgetType, ValidateType, VariantSelectFragment, VitalsWidgetType, WiserV2WidgetType, WiserWidgetType, WrapRenderChildren, YotpoReviewsWidgetType, addAppBlockId, animations, baseAssetURL, calculateFirstProduct, checkAvailableVariantInStock, checkInStock, cloneDeep, cls, composeAdvanceStyle, composeAdvanceStyleForPostPurchase, composeBackgroundCss, composeBackgroundImageCss, composeBorderCss, composeBorderResponsive, composeClasses, composeCornerCss, composeFallbackTypographyStyle, composeFontFamilyTypographyV2, composeGridLayout, composeMemo, composePositionLineHeight, composePostionIconList, composeRadius, composeRadiusResponsive, composeShadow, composeShadowCss, composeSize, composeSizeCss, composeSpacing, composeTextColorCss, composeTextHoverColorCss, composeTypography, composeTypographyAttr, composeTypographyClassName, composeTypographyCss, composeTypographyStyle, composeTypographyV2, composeTypographyV2Css, convertBoxShadowV1ToV2, convertDecimalToNumber, convertHTML, convertOldLayout, convertTextAlignToJustify, createStoreFrontFetcher, dataStringify, fetchMedias, fetchVariants, filterAttrInStyle, filterHoverVariables, filterToolbarPreview, filterTruthyStyles, flattenConnection, formatMoney, fpixel, genSizeClass, genTypoClass, genVariable, generateCollectionQueryKey, generateProductQueryKey, generateProductsQueryKey, getAlignmentClasses, getAppBlocks, getAspectRatioGlobalSize, getBgByDevice, getBgImageByDevice, getBgImageSourceByDevice, getBgVideoByDevice, getBorderRadiusStyle, getBorderStyle, getCarouselContainerHeight, getCollection, getColor, getCombinedBackgroundImage, getCornerCSSFromGlobal, getCornerStyle, getCustomRadius, getFlexGrowClassByShapeGlobalSize, getGlobalColorCSSProp, getGlobalColorClass, getGlobalColorResponsiveClass, getGlobalColorResponsiveStyle, getGlobalColorStateClass, getGlobalColorStateClassDynamicBtn, getGlobalColorStateResponsiveClass, getGlobalColorStateResponsiveClassDynamicBtn, getGlobalColorStateResponsiveStyle, getGlobalColorStateStyle, getGlobalColorStyle, getGlobalSizeGap, getGradientBgrStyleByDevice, getGradientBgrStyleForButton, getGradientImageBgrStyleByDevice, getHeightByShapeGlobalSize, getLayoutClasses, getPaddingGlobalSize, getPaddingStyleByDevice, getProduct, getProductBySlug, getRadiusCSSFromGlobal, getRadiusStyleActiveState, getResponsiveStateValue, getResponsiveStylePadding, getResponsiveStyleShadow, getResponsiveStyleShadowWithoutState, getResponsiveValue, getResponsiveValueByScreen, getSelectedVariant, getShortName, getSingleColorVariable, getSpacingVariable, getStyleBackgroundByDevice, getStyleBackgroundImage, getStyleBgColor, getStyleBgImageSource, getStyleShadow, getStyleShadowState, getValueByDevice, getWidthByShapeGlobalSize, getWidthHeightGlobalSize, globalEvent, gridToArrayRegex, gtag, handleConvertBorderColor, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertClassColor, handleConvertClassColorDynamicBtn, handleConvertInputBorderColor, hasPublicStoreFrontData, hasTranslatedLiquid, isBrowser, isColor, isColumnDirectionExist, isDefined, isEmptyChildren, isLocalEnv, isSafari, loadScript, makeAspectRatio, makeContainerWidthOrHeight, makeDotGapToCarouselStyle, makeFixedBgAttachment, makeGlobalSize, makeGlobalSizeHeightResponsive, makeGlobalSizeIcon, makeGlobalSizeWidthResponsive, makeHeight, makeLineClamp, makeStyle, makeStyleKey, makeStyleResponsive, makeStyleResponsiveByScreen, makeStyleResponsiveState, makeStyleResponsiveWidth, makeStyleResponsiveWidthWithoutAuto, makeStyleState, makeStyleWithDefault, makeWidth, normalizeBuilderData, optionLayoutStyle, parseSelectedOption, parseValueWithUnit, prefetchQueries, props, removeAttrInStyle, removeNullUndefined, removePaddingYInStyle, removeUndefinedValuesFromObject, sanitizeLiquid, shopifyPriceRounding, splitStyle, styles, tGlobal as t, template, tiktokpixel, useAddToCart, useAddon, useAddons, useArticleListStore, useArticleStore, useArticlesQuery, useBlogsQuery, useBuilderComponent, useBuilderPreviewStore, useBuilderStore, useCartData, useCartDiscountCodesUpdate, useCartId, useCartLine, useCartLineStore, useCartNoteUpdate, useCartUI, useCheckAvailableVariantInStock, useCheckoutUrl, useCollection, useCollectionQuery, useCollectionStore, useCollectionsQuery, useConnectedShopify, useCreateCart, useCurrency, useCurrentDevice, useCurrentVariant, useCurrentVariantInStock, useEditorMode, useFeaturedImageGlobal, useFetchHandle, useFormatMoney, useHasPreSelected, useI18n, useI18nStore, useInitialSwatchesOptions, useInteraction, useIsSampleProduct, useIsStorefrontProduct, useIsSyncProduct, useIsomorphicLayoutEffect, useLazyVideo, useLoadScript, useLocale, useMatchMutate, useMobileOnly, useModalStore, useMoney, useMoneyFormat, usePageStore, usePageType, usePluginEnable, usePreviewSharePage, usePrevious, useProduct, useProductBundleDiscount, useProductList, useProductListProducts, useProductListSettings, useProductListStore, useProductListStyles, useProductOfferDiscount, useProductOffersQuery, useProductProperties, useProductQuery, useProductShopifyEditLink, useProductStore, useProductsQuery, useProductsQueryAll, useQuantity, useRemoveCartItem, useRenderMode, useSection, useSectionStore, useSelectedOption, useShopStore, useShopifyLink, useStickyStore, useStoreFront, useSuspenseFetch, useSwatches, useSwatchesOptions, useTimezone, useUniqProductID, useUpdateCartItem, useVariant, useVariantOutStock, useVariants, validateEmail };
|
|
56652
|
+
export { AddOn, AddonProvider, AddonProviderProps, AdvancedType, AirProductReview, AliReviewsWidgetType, AlignItemProp, AlignProp, AnimationBaseSetting, AnimationConfig, AnimationDirectionType, AnimationEasingType, AnimationFadeSettingType, AnimationSetting, AnimationSettingType, AnimationShakeSettingType, AnimationSlideSettingType, AnimationTrigger, AnimationTriggerType, AnimationType, AnimationZoomDirectionType, AnimationZoomSettingType, appAPI as AppAPIType, ArticleListProvider, ArticleListProviderProps, ArticleProvider, ArticleProviderProps, ArticlesDocument, ArticlesQueryResponse, ArticlesQueryVariables, Background, BackgroundImageValue, BackgroundMedia, BackgroundVideoValue, BaseProps, BasePropsWrap, BlockEntity, BlogsDocument, BlogsQueryResponse, BlogsQueryVariables, BogosWidgetType, BoldSubscriptionsWidgetType, Border, BorderStyle, BuilderComponentProvider, BuilderComponentProviderProps, BuilderEntity, BuilderEntityNested, BuilderPreviewProvider, BuilderPreviewProviderProps, BuilderProvider, BuilderProviderProps, BuilderState, Builtin, CSSStateKey, CartLineProvider, CartLineProviderProps, CollectionDetailFilterDocument, CollectionDetailFilterQueryResponse, CollectionDetailFilterQueryVariables, CollectionDocument, CollectionProvider, CollectionProviderProps, CollectionQueryResponse, CollectionQueryVariables, CollectionSelectFragment, CollectionsDocument, CollectionsQueryResponse, CollectionsQueryVariables, ColorKey, ColorType$1 as ColorType, ColorValueType, Component, ComponentPreset, ComponentSetting, ContainerProp, ControlProp, ControlTriggerAction, ControlUI, CornerRadius, CornerRadiusType, CustomComponentConfig, DEVICES, DeepPartial, DotStyle, Dropdown, DynamicCollection, DynamicProduct, EMPTY_DEVICE_VALUE, ExtractState, FastBundleWidgetType, FeraReviewsV3WidgetType, FeraReviewsWidgetType, FetchCollectionArgs, FetchFunc, FetchProductParams, FlexDirectionProp, FontName, FontStyleType, GRADIENT_BGR_KEY, GlobalStyleConfig, GlobalStyleResponsiveConfig, GlobalSwatchesData, GraphQLConnection, GroupPropType, GrowaveWidgetTypeV1, GrowaveWidgetTypeV2, HSLAColorType, HSLColorType, HexColorType, I18nProvider, I18nProviderProps, ImageShape$1 as ImageShape, InitComponentType, InstantJudgeMeReviewsWidgetType, InstantKlaviyoWidgetType, InstantLooxReviewsWidgetType, Interaction, InteractionCondition, InteractionElement, InteractionTarget, InteractionTargetEvent, InteractionTargetEventObject, InteractionTriggerEvent, JudgeMeReviewsWidgetType, KlaviyoWidgetType, LaiProductReviewsAdvancedWidgetType, LaiProductReviewsWidgetType, LibrarySaleFunnelDocument, LibrarySaleFunnelQueryResponse, LibrarySaleFunnelQueryVariables, LibrarySection, LibraryTemplate, LibraryTemplateDocument, LibraryTemplateQueryResponse, LibraryTemplateQueryVariables, LooxReviewsWidgetType, LooxReviewsWidgetTypeV2, MediaSelectFragment, ModalProvider, ModalProviderProps, NameDevices, NestedKeys, ObjectDeviceGlobalType, ObjectDevices, ObjectLayoutValue, OmnisendWidgetType, OnlyOne, OpinewDesignWidgetType, OpinewWidgetType, Option$4 as Option, OptionNormalStyle, OptionSpecialStyle, Options$1 as Options, PaddingType, PageContext, PageProvider, PageProviderProps, PageSection, PageType, PageViewUpDocument, PageViewUpMutationResponse, PageViewUpMutationVariables, PickyStoryWidgetType, PostPurchaseTypo, PreOrderNowWodWidgetType, PreviewThemePageDocument, PreviewThemePageQueryResponse, PreviewThemePageQueryVariables, Primitive, ProductInputAnalytic, ProductListProvider, ProductListProviderProps, ProductOffer, ProductProvider, ProductProviderProps, ProductReviewsWidgetType, ProductSelectFragment, ProductVariantsWithSellingPlansDocument, ProductVariantsWithSellingPlansQueryResponse, ProductVariantsWithSellingPlansQueryVariables, ProductVariantsWithSellingPlansSelectFragment, ProductWithSellingPlansSelectFragment, ProductsDocument, ProductsQueryResponse, ProductsQueryVariables, ProductsWithSellingPlansDetailFragment, ProductsWithSellingPlansDocument, ProductsWithSellingPlansQueryResponse, ProductsWithSellingPlansQueryVariables, PublicStoreFrontData, PublishErrorSectionListEventDetail, PublishedShopMetasDocument, PublishedShopMetasQueryResponse, PublishedShopMetasQueryVariables, PublishedThemePageSelectFragment, PublishedThemePagesDocument, PublishedThemePagesQueryResponse, PublishedThemePagesQueryVariables, RGBAColorType, RGBColorType, Ratio$1 as Ratio, RawChild, RenderMemo as Render, RenderChildren, RenderIf, Render as RenderLiquid, RenderMode, RenderModeEnv, RenderPreviewMemo as RenderPreview, RequiredCursorEdge, ResponsiveKey, ResponsiveStateProp, RivyoWidgetType, RoundedSize, RyviuWidgetType, SaleFunnelDiscount$1 as SaleFunnelDiscount, SaleFunnelDiscountEdge$1 as SaleFunnelDiscountEdge, SaleFunnelDiscountObjectType$1 as SaleFunnelDiscountObjectType, SaleFunnelDiscountType$1 as SaleFunnelDiscountType, SaleFunnelDiscountValueType$1 as SaleFunnelDiscountValueType, SaleFunnelDiscountsDocument, SaleFunnelDiscountsQueryResponse, SaleFunnelDiscountsQueryVariables, SaleFunnelOffer, SaleFunnelOfferDocument, SaleFunnelOfferQueryResponse, SaleFunnelOfferQueryVariables, Scalars$1 as Scalars, ScaleByDirection, SectionCategory, SectionData, SectionEntity, SectionProvider, SectionProviderProps, Setting, SettingByAnimationType, SettingByAnimationValues, SettingUIControl, SettingUIGroup, ShadowProps, ShadowStyle, ShadowStyleApplied, ShadowType, Shop, ShopLibraryPage, ShopLibraryPageDocument, ShopLibraryPageQueryResponse, ShopLibraryPageQueryVariables, ShopLibrarySection, ShopProvider, ShopProviderProps, ShopShopifyDocument, ShopShopifyQueryResponse, ShopShopifyQueryVariables, shop as ShopType, SizeProps, SizeSetting$1 as SizeSetting, SizeSettingGlobal, SizeType, SpacingType, StampedWidgetType, StampedWidgetTypeV2, StateProp, StateSelector, StateType, StoreConfig, StorePropertyDocument, StorePropertyQueryResponse, StorePropertyQueryVariables, SwatchesOptionType, SwatchesOptionValue, TagShopWidgetType, TemplateCategory, TemplatePackage, Theme, ThemePage, ThemePageDocument, ThemePageMetaDocument, ThemePageMetaQueryResponse, ThemePageMetaQueryVariables, ThemePageQueryResponse, ThemePageQueryVariables, ThemeSection, ThemeSectionStatus$1 as ThemeSectionStatus, ThemeStyle, TransformProp, TriggerConfig, TrustooWidgetType, TypographyProps, TypographySetting, TypographySettingV2, TypographyType, TypographyV2Attrs, TypographyV2Family, TypographyV2FontFamilyType, TypographyV2Props, UltimateSalesBoostWidgetType, ValidateType, VariantSelectFragment, VitalsWidgetType, WiserV2WidgetType, WiserWidgetType, WrapRenderChildren, YotpoReviewsWidgetType, addAppBlockId, animations, baseAssetURL, calculateFirstProduct, checkAvailableVariantInStock, checkInStock, cloneDeep, cls, composeAdvanceStyle, composeAdvanceStyleForPostPurchase, composeBackgroundCss, composeBackgroundImageCss, composeBorderCss, composeBorderResponsive, composeClasses, composeCornerCss, composeFallbackTypographyStyle, composeFontFamilyTypographyV2, composeGridLayout, composeMemo, composePositionLineHeight, composePostionIconList, composeRadius, composeRadiusResponsive, composeShadow, composeShadowCss, composeSize, composeSizeCss, composeSpacing, composeTextColorCss, composeTextHoverColorCss, composeTypography, composeTypographyAttr, composeTypographyClassName, composeTypographyCss, composeTypographyStyle, composeTypographyV2, composeTypographyV2Css, convertBoxShadowV1ToV2, convertDecimalToNumber, convertHTML, convertOldLayout, convertTextAlignToJustify, createStoreFrontFetcher, dataStringify, fetchMedias, fetchVariants, filterAttrInStyle, filterHoverVariables, filterToolbarPreview, filterTruthyStyles, flattenConnection, formatMoney, fpixel, genSizeClass, genTypoClass, genVariable, generateCollectionQueryKey, generateProductQueryKey, generateProductsQueryKey, getAlignmentClasses, getAppBlocks, getAspectRatioGlobalSize, getBgByDevice, getBgImageByDevice, getBgImageSourceByDevice, getBgVideoByDevice, getBorderRadiusStyle, getBorderStyle, getCarouselContainerHeight, getCollection, getColor, getCombinedBackgroundImage, getCornerCSSFromGlobal, getCornerStyle, getCustomRadius, getFlexGrowClassByShapeGlobalSize, getGlobalColorCSSProp, getGlobalColorClass, getGlobalColorResponsiveClass, getGlobalColorResponsiveStyle, getGlobalColorStateClass, getGlobalColorStateClassDynamicBtn, getGlobalColorStateResponsiveClass, getGlobalColorStateResponsiveClassDynamicBtn, getGlobalColorStateResponsiveStyle, getGlobalColorStateStyle, getGlobalColorStyle, getGlobalSizeGap, getGradientBgrStyleByDevice, getGradientBgrStyleForButton, getGradientImageBgrStyleByDevice, getHeightByShapeGlobalSize, getLayoutClasses, getPaddingGlobalSize, getPaddingStyleByDevice, getProduct, getProductBySlug, getRadiusCSSFromGlobal, getRadiusStyleActiveState, getResponsiveStateValue, getResponsiveStylePadding, getResponsiveStyleShadow, getResponsiveStyleShadowWithoutState, getResponsiveValue, getResponsiveValueByScreen, getSelectedVariant, getShortName, getSingleColorVariable, getSpacingVariable, getStyleBackgroundByDevice, getStyleBackgroundImage, getStyleBgColor, getStyleBgImageSource, getStyleShadow, getStyleShadowState, getValueByDevice, getWidthByShapeGlobalSize, getWidthHeightGlobalSize, globalEvent, gridToArrayRegex, gtag, handleConvertBorderColor, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertClassColor, handleConvertClassColorDynamicBtn, handleConvertInputBorderColor, hasPublicStoreFrontData, hasTranslatedLiquid, isBrowser, isColor, isColumnDirectionExist, isDefined, isEmptyChildren, isLocalEnv, isSafari, loadScript, makeAspectRatio, makeContainerWidthOrHeight, makeDotGapToCarouselStyle, makeFixedBgAttachment, makeGlobalSize, makeGlobalSizeHeightResponsive, makeGlobalSizeIcon, makeGlobalSizeWidthResponsive, makeHeight, makeLineClamp, makeStyle, makeStyleKey, makeStyleResponsive, makeStyleResponsiveState, makeStyleResponsiveWidth, makeStyleResponsiveWidthWithoutAuto, makeStyleState, makeStyleWithDefault, makeWidth, normalizeBuilderData, optionLayoutStyle, parseSelectedOption, parseValueWithUnit, prefetchQueries, props, removeAttrInStyle, removeNullUndefined, removePaddingYInStyle, removeUndefinedValuesFromObject, sanitizeLiquid, shopifyPriceRounding, splitStyle, styles, tGlobal as t, template, tiktokpixel, useAddToCart, useAddon, useAddons, useArticleListStore, useArticleStore, useArticlesQuery, useBlogsQuery, useBuilderComponent, useBuilderPreviewStore, useBuilderStore, useCartData, useCartDiscountCodesUpdate, useCartId, useCartLine, useCartLineStore, useCartNoteUpdate, useCartUI, useCheckAvailableVariantInStock, useCheckoutUrl, useCollection, useCollectionQuery, useCollectionStore, useCollectionsQuery, useConnectedShopify, useCreateCart, useCurrency, useCurrentDevice, useCurrentVariant, useCurrentVariantInStock, useEditorMode, useFeaturedImageGlobal, useFetchHandle, useFormatMoney, useHasPreSelected, useI18n, useI18nStore, useInitialSwatchesOptions, useInteraction, useIsSampleProduct, useIsStorefrontProduct, useIsSyncProduct, useIsomorphicLayoutEffect, useLazyVideo, useLoadScript, useLocale, useMatchMutate, useMobileOnly, useModalStore, useMoney, useMoneyFormat, usePageStore, usePageType, usePluginEnable, usePreviewSharePage, usePrevious, useProduct, useProductBundleDiscount, useProductList, useProductListProducts, useProductListSettings, useProductListStore, useProductListStyles, useProductOfferDiscount, useProductOffersQuery, useProductProperties, useProductQuery, useProductShopifyEditLink, useProductStore, useProductsQuery, useProductsQueryAll, useQuantity, useRemoveCartItem, useRenderMode, useSection, useSectionStore, useSelectedOption, useShopStore, useShopifyLink, useStickyStore, useStoreFront, useSuspenseFetch, useSwatches, useSwatchesOptions, useTimezone, useUniqProductID, useUpdateCartItem, useVariant, useVariantOutStock, useVariants, validateEmail };
|