@gem-sdk/core 23.0.0-dev.4 → 23.0.0-dev.48
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/components/Render.liquid.js +9 -9
- package/dist/cjs/components/guardElementScriptTags.js +1 -0
- package/dist/cjs/components/theme-section/CreateThemeSection.js +1 -1
- package/dist/cjs/components/toolbar/ErrorBannerParts.js +2 -0
- package/dist/cjs/components/toolbar/PasteErrorBanner.js +2 -0
- package/dist/cjs/components/toolbar/PasteErrorPageBanner.js +2 -0
- package/dist/cjs/components/toolbar/SectionErrorBanner.js +1 -1
- package/dist/cjs/components/toolbar/pasteErrorBannerLayout.js +1 -0
- package/dist/cjs/constants/listImage.js +1 -0
- package/dist/cjs/constants/plan.js +1 -0
- package/dist/cjs/contexts/BuilderPreviewContext.js +1 -1
- package/dist/cjs/graphql/queries/preview-page.generated.js +2 -1
- package/dist/cjs/graphql/queries/published-theme-pages.generated.js +2 -1
- package/dist/cjs/helpers/convert.js +1 -1
- package/dist/cjs/helpers/pasteError.js +1 -0
- package/dist/cjs/helpers/queries/get-collection.js +1 -1
- package/dist/cjs/helpers/shadow.js +1 -1
- package/dist/cjs/hooks/useInitialSwatchesOptions.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/modules/canary/constants/config.js +1 -0
- package/dist/cjs/modules/canary/utils/element.js +1 -0
- package/dist/esm/components/ComponentToolbarPreview.js +1 -1
- package/dist/esm/components/Render.liquid.js +9 -9
- package/dist/esm/components/guardElementScriptTags.js +1 -0
- package/dist/esm/components/theme-section/CreateThemeSection.js +1 -1
- package/dist/esm/components/toolbar/ErrorBannerParts.js +2 -0
- package/dist/esm/components/toolbar/PasteErrorBanner.js +2 -0
- package/dist/esm/components/toolbar/PasteErrorPageBanner.js +2 -0
- package/dist/esm/components/toolbar/SectionErrorBanner.js +1 -1
- package/dist/esm/components/toolbar/pasteErrorBannerLayout.js +1 -0
- package/dist/esm/constants/listImage.js +1 -0
- package/dist/esm/constants/plan.js +1 -0
- package/dist/esm/contexts/BuilderPreviewContext.js +1 -1
- package/dist/esm/graphql/queries/preview-page.generated.js +2 -1
- package/dist/esm/graphql/queries/published-theme-pages.generated.js +2 -1
- package/dist/esm/helpers/convert.js +1 -1
- package/dist/esm/helpers/pasteError.js +1 -0
- package/dist/esm/helpers/queries/get-collection.js +1 -1
- package/dist/esm/helpers/shadow.js +1 -1
- package/dist/esm/hooks/useInitialSwatchesOptions.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/modules/canary/constants/config.js +1 -0
- package/dist/esm/modules/canary/utils/element.js +1 -0
- package/dist/types/index.d.ts +54 -13
- package/package.json +3 -3
- /package/dist/cjs/components/src/product/{helpers → common}/variant-presets.js +0 -0
- /package/dist/esm/components/src/product/{helpers → common}/variant-presets.js +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsxs as e,Fragment as t,jsx as i}from"react/jsx-runtime";import{ThemeSectionStatusWrapper as o}from"./theme-section/ThemeSectionStatus.js";import{memo as r,useState as l,useMemo as n,useCallback as a,useEffect as d}from"react";import"zustand";import{useBuilderPreviewStore as C}from"../contexts/BuilderPreviewContext.js";import{usePageStore as s}from"../contexts/PageContext.js";import{CreateThemeSection as p}from"./theme-section/CreateThemeSection.js";import{usePostPurchase as c}from"../hooks/useToolbarPostPurchase.js";import{SectionErrorBanner as h}from"./toolbar/SectionErrorBanner.js";import{InteractionSuffix as u}from"./InteractionSuffix.js";import g from"./upgrade-element/UpgradeElement.js";import{useI18nStore as m}from"@gem-sdk/core";import f from"./toolbar/Tooltip.js";import b from"./resize/Resize.js";import"../graphql/queries/product-variants.generated.js";import"../graphql/queries/collection-detail-filter.generated.js";import"../graphql/queries/collection.generated.js";import"../graphql/queries/collections.generated.js";import"../graphql/queries/published-theme-pages.generated.js";import"../graphql/queries/store-property.generated.js";import"../graphql/queries/preview-page.generated.js";import"../graphql/queries/published-shop-metas.generated.js";import"../graphql/queries/shop-shopify.generated.js";import"../graphql/queries/articles.generated.js";import"../graphql/queries/blogs.generated.js";import"../graphql/queries/products-with-selling-plans.generated.js";import"../graphql/queries/product-variant-with-selling-plans.generated.js";import"../graphql/queries/productsV2.generated.js";import"../graphql/queries/product-little-detail.generated.js";import"../graphql/queries/product-medias.generated.js";import"swr";import"../helpers/convert.js";import"crc-32";import{useShopStore as v}from"../contexts/ShopContext.js";import"@gem-sdk/adapter-shopify";import"swr/mutation";import"swr/infinite";import"vanilla-lazyload";import"../hooks/useCartUI.js";import"../graphql/queries/product-value-label.generated.js";import"../hooks/useStickyStore.js";import"../types/builder.js";import"../types/custom.js";import"../types/animations.js";let w=e=>{let t=getComputedStyle(e).overflow;return"visible"!==t},S=e=>{let t=e.getAttribute("data-component-tag");return"Section"===t};var L=r(r=>{let{t:L}=m(),y=r.isThemeSection,x=!!r.isShopifySection,M=v(e=>e.storefrontUrl),Z=v(e=>e.pageType),q=C(e=>e.getParents),j=C(e=>e.getItem("ROOT")),R=C(e=>e.isThemeSectionEditor),[H,V]=l(null),[P,E]=l(!1),[T,A]=l(!1),[B,k]=l([]),[$,F]=l("top"),[I,D]=l(!1),[U,O]=l(!1),[N,z]=l(""),[_,G]=l(""),[J,K]=l({width:"",text:""}),[Q,W]=l(!1),X=C(e=>e.errorSectionList),Y=n(()=>{if(!X)return null;let e=X?.find(e=>e.uid===r.uid);return e},[X,r.uid]),ee=s(e=>e.interactionData),et=n(()=>"POST_PURCHASE"===Z,[Z]),{checkDisableDelete:ei,getTooltipText:eo,checkDisableDuplicate:er}=c(r.uid,r.tag||""),el=["ProductTitle","ProductDescription","ProductPrice"],en=["ArticleTitle","ArticleContent","ArticleImage","ArticleAuthor","ArticleCategory","ArticleDate","ArticleExcerpt","ArticleTags"],ea=[...el,...en],ed=(e,t)=>{let i=B.length,o=e.getBoundingClientRect(),r=t.getBoundingClientRect();return o.top-r.top<36*i},eC=(e,t)=>{let i=t||e;if(e&&!S(e))return w(e)&&ed(t,e)?e:e.parentElement?eC(e.parentElement,i):void 0},es=a(()=>j?.childrens?.length||0,[j?.childrens?.length]),ep=a(()=>{if("Section"==r.tag)return"bottom";let e=document.body.querySelector("#storefront")?.querySelector('[data-toolbar-active="true"]');if(e){let t=e.getBoundingClientRect();t.top<60?F("bottom"):F("top")}},[r.tag]),ec=n(()=>M?M.match(/^(?:https?:\/\/)?([^/]+)\.myshopify\.com/)?.[1]:"",[M]),eh=n(()=>`https://admin.shopify.com/store/${ec}`,[ec]),eu=n(()=>N?`${eh}/products/${N}`:"",[eh,N]),eg=n(()=>_?`${eh}/articles/${_.replace("gid://shopify/Article/","")}`:"",[_,eh]),em=n(()=>ee?.isSelectOnPage,[ee?.isSelectOnPage]),ef=n(()=>ee?.settingType,[ee?.settingType]),eb=n(()=>ee?.item?.targets?.find(e=>e.uid===r.uid&&e?.type!=="PAGE")&&"TARGET"===ef,[ee?.item?.targets,r.uid,ef]),ev=n(()=>ee?.item?.self?.uid===r.uid&&ee?.item?.self.type!=="PAGE"&&"TRIGGER"===ef,[ee?.item?.self?.type,ee?.item?.self?.uid,r.uid,ef]),ew=n(()=>!eb&&!ev,[eb,ev]),eS=n(()=>I||x,[I,x]),eL=n(()=>Q||x||es()>25&&"Section"===r.tag||!!Y,[es,Q,x,r.tag,Y]),ey=C(e=>e.activeComponentDetail),ex=a(e=>{if(e?.articleId&&G(e.articleId),e?.productId&&z(e.productId),e?.componentUid==r.uid){O(!0),ep(),et&&(D(ei()),K(eo()),W(er()));let e=q(r.uid).filter(e=>!("ROOT"===e.uid||"Section"===e.tag&&R||e.editorConfigs?.toolbar?.hide||e.editorConfigs?.component?.noSetting)).slice(0,3);k(e)}else O(!1),k([]),E(!1)},[r.uid,et,q,ei,eo,er,R,ep]),eM=C(e=>e.dismissPublishError),eZ=a(()=>{eM(r.uid)},[eM,r.uid]),eq=a(()=>"Section"!==r.tag?-1:j?.childrens?.length?j.childrens.findIndex(e=>e==r.uid):-1,[j?.childrens,r.uid,r.tag]),ej=n(()=>eq()>=25,[eq]),eR=n(()=>!!Y||ej,[Y,ej]);if(d(()=>{ex(ey)},[ey]),"section"===r.type||r.editorConfigs?.toolbar?.hide)return null;let eH=e=>{let t=e?.childrens?.length??0;if("Row"===e.label){let e=1===t?L("Row {colNumber} col",{colNumber:t}):L("Row {colNumber} cols",{colNumber:t});return e}return L(e.label)},eV=e=>{if(!B.length)return;let t=e?.target||null,i=t.closest("[data-toolbar-active]");if(!t||!i)return;if(P)A(!1),E(!1);else{let e=eC(i,i);if(e)A(!0);else{let e=i.getBoundingClientRect();e.top<36*B.length?A(!0):A(!1)}E(!0)}let o=new CustomEvent("editor:toolbar:show-parents",{bubbles:!0,detail:{value:!P}});window.dispatchEvent(o)},eP=e=>{e.preventDefault(),e.stopPropagation();let t=new CustomEvent("editor:toolbar:delete-component",{bubbles:!0,detail:{componentUid:r.uid,isThemeSection:y,isShopifySection:x}});return window.dispatchEvent(t),!1},eE=e=>{e.preventDefault(),e.stopPropagation();let t=new CustomEvent("editor:toolbar:duplicate-component",{bubbles:!0,detail:{componentUid:r.uid,isThemeSection:y,isShopifySection:x}});return window.dispatchEvent(t),!1},eT=e=>{e.preventDefault(),e.stopPropagation();let t=new CustomEvent("editor:toolbar:zoom-out-component",{bubbles:!0,detail:{componentUid:r.uid}});return window.dispatchEvent(t),!1},eA=()=>{V(null),window.removeEventListener("editor:close-add-section-popup",eA)},eB=(e,t)=>{if(e.preventDefault(),e.stopPropagation(),es()>=25)return!1;let i=e.target;if(i){V(t);let e=i.getBoundingClientRect(),o=new CustomEvent("editor:toolbar:add-section",{bubbles:!0,detail:{componentUid:r.uid,position:t,top:e.top+e.height/2}});window.dispatchEvent(o),window.addEventListener("editor:close-add-section-popup",eA)}return!1},ek="Section"===r.tag&&!r.isThemeSection&&"STATIC"!==Z&&"POST_PURCHASE"!==Z&&!r.isShopifySection&&25>eq()&&!Y;return e(t,{children:[!("Section"==r.tag&&R)&&e("div",{"data-toolbar":!0,"data-toolbar-section":"Section"==r.tag,"data-toolbar-theme-section":"Section"==r.tag&&!!y||R,"data-toolbar-shopify-section":"Section"==r.tag&&!!x,"data-toolbar-limit":eq()>=25||!!Y,children:[e("div",{"data-toolbar-show-parent":!0,onClick:e=>eV(e),"aria-hidden":"true",children:[ev&&i("div",{className:"gp-hidden gp-w-[12px] interaction-use-custom-element",children:i("svg",{width:"12",height:"13",viewBox:"0 0 12 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:i("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"})})}),eb&&i("div",{className:"gp-hidden gp-w-[14px] interaction-use-custom-element",children:i("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:i("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&&ew&&i("div",{"data-toolbar-icon-drag":!0,children:e("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[i("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"}),i("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"}),i("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"}),i("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"}),i("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"}),i("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"==r.tag?e("div",{"data-toolbar-name":!0,children:[(()=>{if(x)return r.name?.includes("Shopify section:")?`${L("Shopify section")}: ${r.name.replace("Shopify section:","")}`:`${L("Shopify section")}: ${r.name}`;let e=r.name&&r.name===`Section ${r.uid}`;return es()>=20?`${e?L("Section"):r?.name} ${eq()+1}/25`:e?`${L("Section")} ${eq()+1}`:r?.name})(),U&&x&&!r.isShopifyVisibility&&e("svg",{"data-toolbar-visibility":!0,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i("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"}),i("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"}),i("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"})]})]}):i("div",{"data-toolbar-name":!0,children:L(r.customLabel||r.label)}),U&&"Section"!==r.tag&&B.length>0&&i("div",{"data-toolbar-icon-parent":!0,"data-toolbar-icon-parent-open":P,children:i("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:i("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&&P&&B.map((t,o)=>e("div",{"data-toolbar-parent":!0,"data-component-tag":t.tag,"data-parent-uid":t.uid,"data-toolbar-theme-section":R,"data-toolbar-parent-revert":T,style:{top:T?`${36*(o+1)}px`:`${-36*(o+1)}px`},children:[i("div",{"data-toolbar-icon-drag":!0,children:e("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[i("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"}),i("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"}),i("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"}),i("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"}),i("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"}),i("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"})]})}),i("div",{"data-toolbar-name":!0,children:eH(t)})]},t.uid)),U&&!em&&e(t,{children:[i(g,{...r}),ek&&i(p,{...r}),"Sticky"==r.tag&&i("div",{"data-toolbar-zoom-out":!0,onClick:e=>eT(e),"aria-hidden":"true",children:i("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:i("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"})})}),ea.includes(r.tag)&&i(f,{"data-toolbar-title":!0,enable:!0,"data-toolbar-disable":!1,text:L("Edit content in Shopify"),position:"top",onClick:()=>{if(en.includes(r.tag)){window.open(eg,"_blank");return}if(el.includes(r.tag)){window.open(eu,"_blank");return}window.open(eh,"_blank")},"aria-hidden":"true",children:e("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i("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"}),i("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"}),i("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"}),i("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"})]})}),i(f,{enable:"Section"==r.tag&&es()>=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":eL,onClick:eL?void 0:e=>eE(e),"aria-hidden":"true",className:eL?"!gp-cursor-not-allowed":"",children:i("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:i("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"})})}),i(f,{"data-toolbar-delete":!0,onClick:e=>eS?null:eP(e),enable:eS,"data-toolbar-disable":eS,text:x?L("Disabled. Please edit in Shopify Editor"):J.text,width:J.width,position:x?"bottom":$,"aria-hidden":"true",className:eS?"!gp-cursor-not-allowed":"",children:i("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:i("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"})})})]}),i(u,{uid:r.uid})]},r.uid),"STATIC"!==Z&&"POST_PURCHASE"!==Z&&25>eq()&&i(o,{...r}),i("div",{"data-outline":!0,"data-outline-section":"Section"==r.tag,"data-outline-theme-section":"Section"==r.tag&&!!y||R,"data-outline-shopify-section":"Section"==r.tag&&!!x,"data-outline-limit":eR,"data-outline-error":!!Y},"outline-"+r.uid),"Section"==r.tag&&!R&&e(t,{children:[i(f,{enable:es()>=25,text:L("Page has reached Shopify’s 25 section-limit"),position:"top","data-toolbar-add-top":!0,"data-toolbar-disable":es()>=25,"data-toolbar-add-open":"above"==H,onClick:e=>eB(e,"above"),"aria-hidden":"true",children:i("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:i("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"})})}),i(f,{enable:es()>=25,text:L("Page has reached Shopify’s 25 section-limit"),position:"top","data-toolbar-add-bottom":!0,"data-toolbar-disable":es()>=25,"data-toolbar-add-open":"below"==H,onClick:e=>eB(e,"below"),"aria-hidden":"true",children:i("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:i("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&&i(h,{errorSectionInfo:Y,onDismiss:eZ}),U&&i(b,{...r})]})});export{L as default};
|
|
2
|
+
import{jsxs as e,Fragment as t,jsx as i}from"react/jsx-runtime";import{ThemeSectionStatusWrapper as o}from"./theme-section/ThemeSectionStatus.js";import{memo as r,useState as l,useMemo as n,useCallback as a,useEffect as d}from"react";import"zustand";import{useBuilderPreviewStore as s}from"../contexts/BuilderPreviewContext.js";import{usePageStore as C}from"../contexts/PageContext.js";import{CreateThemeSection as p}from"./theme-section/CreateThemeSection.js";import{usePostPurchase as c}from"../hooks/useToolbarPostPurchase.js";import{SectionErrorBanner as u}from"./toolbar/SectionErrorBanner.js";import{getVisiblePublishError as h}from"../helpers/pasteError.js";import{PasteErrorBanner as m}from"./toolbar/PasteErrorBanner.js";import{InteractionSuffix as g}from"./InteractionSuffix.js";import f from"./upgrade-element/UpgradeElement.js";import{useI18nStore as b}from"@gem-sdk/core";import v from"./toolbar/Tooltip.js";import w from"./resize/Resize.js";import"../graphql/queries/product-variants.generated.js";import"../graphql/queries/collection-detail-filter.generated.js";import"../graphql/queries/collection.generated.js";import"../graphql/queries/collections.generated.js";import"../graphql/queries/published-theme-pages.generated.js";import"../graphql/queries/store-property.generated.js";import"../graphql/queries/preview-page.generated.js";import"../graphql/queries/published-shop-metas.generated.js";import"../graphql/queries/shop-shopify.generated.js";import"../graphql/queries/articles.generated.js";import"../graphql/queries/blogs.generated.js";import"../graphql/queries/products-with-selling-plans.generated.js";import"../graphql/queries/product-variant-with-selling-plans.generated.js";import"../graphql/queries/productsV2.generated.js";import"../graphql/queries/product-little-detail.generated.js";import"../graphql/queries/product-medias.generated.js";import"swr";import"../helpers/convert.js";import"crc-32";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"../graphql/queries/product-value-label.generated.js";import"../hooks/useStickyStore.js";import"../types/builder.js";import"../types/custom.js";import"../types/animations.js";let L=e=>{let t=getComputedStyle(e).overflow;return"visible"!==t},y=e=>{let t=e.getAttribute("data-component-tag");return"Section"===t};var x=r(r=>{let{t:x}=b(),M=r.isThemeSection,Z=!!r.isShopifySection,j=S(e=>e.storefrontUrl),q=S(e=>e.pageType),R=s(e=>e.getParents),E=s(e=>e.getItem("ROOT")),H=s(e=>e.isThemeSectionEditor),[P,V]=l(null),[T,B]=l(!1),[A,k]=l(!1),[$,F]=l([]),[U,I]=l("top"),[D,O]=l(!1),[N,z]=l(!1),[_,G]=l(""),[J,K]=l(""),[Q,W]=l({width:"",text:""}),[X,Y]=l(!1),ee=s(e=>e.errorSectionList),et=n(()=>{if(!ee)return null;let e=ee?.find(e=>e.uid===r.uid);return e},[ee,r.uid]),ei=n(()=>h({list:ee,uid:r.uid}),[ee,r.uid]),eo=s(e=>e.pasteError),er=s(e=>e.setPasteError),el=eo?.anchorUid===r.uid?eo:null,en=!!eo&&eo.sectionUid===r.uid,ea=en?void 0:ei,ed=C(e=>e.interactionData),es=n(()=>"POST_PURCHASE"===q,[q]),{checkDisableDelete:eC,getTooltipText:ep,checkDisableDuplicate:ec}=c(r.uid,r.tag||""),eu=["ProductTitle","ProductDescription","ProductPrice"],eh=["ArticleTitle","ArticleContent","ArticleImage","ArticleAuthor","ArticleCategory","ArticleDate","ArticleExcerpt","ArticleTags"],em=[...eu,...eh],eg=(e,t)=>{let i=$.length,o=e.getBoundingClientRect(),r=t.getBoundingClientRect();return o.top-r.top<36*i},ef=(e,t)=>{let i=t||e;if(e&&!y(e))return L(e)&&eg(t,e)?e:e.parentElement?ef(e.parentElement,i):void 0},eb=a(()=>E?.childrens?.length||0,[E?.childrens?.length]),ev=a(()=>{if("Section"==r.tag)return"bottom";let e=document.body.querySelector("#storefront")?.querySelector('[data-toolbar-active="true"]');if(e){let t=e.getBoundingClientRect();t.top<60?I("bottom"):I("top")}},[r.tag]),ew=n(()=>j?j.match(/^(?:https?:\/\/)?([^/]+)\.myshopify\.com/)?.[1]:"",[j]),eS=n(()=>`https://admin.shopify.com/store/${ew}`,[ew]),eL=n(()=>_?`${eS}/products/${_}`:"",[eS,_]),ey=n(()=>J?`${eS}/articles/${J.replace("gid://shopify/Article/","")}`:"",[J,eS]),ex=n(()=>ed?.isSelectOnPage,[ed?.isSelectOnPage]),eM=n(()=>ed?.settingType,[ed?.settingType]),eZ=n(()=>ed?.item?.targets?.find(e=>e.uid===r.uid&&e?.type!=="PAGE")&&"TARGET"===eM,[ed?.item?.targets,r.uid,eM]),ej=n(()=>ed?.item?.self?.uid===r.uid&&ed?.item?.self.type!=="PAGE"&&"TRIGGER"===eM,[ed?.item?.self?.type,ed?.item?.self?.uid,r.uid,eM]),eq=n(()=>!eZ&&!ej,[eZ,ej]),eR=n(()=>D||Z,[D,Z]),eE=n(()=>X||Z||eb()>25&&"Section"===r.tag||!!et,[eb,X,Z,r.tag,et]),eH=s(e=>e.activeComponentDetail),eP=a(e=>{if(e?.articleId&&K(e.articleId),e?.productId&&G(e.productId),e?.componentUid==r.uid){z(!0),ev(),es&&(O(eC()),W(ep()),Y(ec()));let e=R(r.uid).filter(e=>!("ROOT"===e.uid||"Section"===e.tag&&H||e.editorConfigs?.toolbar?.hide||e.editorConfigs?.component?.noSetting)).slice(0,3);F(e)}else z(!1),F([]),B(!1)},[r.uid,es,R,eC,ep,ec,H,ev]),eV=s(e=>e.dismissPublishError),eT=a(()=>{ei&&eV({uid:r.uid,type:ei.type})},[eV,r.uid,ei]),eB=a(()=>er(null),[er]),eA=a(()=>"Section"!==r.tag?-1:E?.childrens?.length?E.childrens.findIndex(e=>e==r.uid):-1,[E?.childrens,r.uid,r.tag]),ek=n(()=>eA()>=25,[eA]),e$=n(()=>!!et||ek,[et,ek]);if(d(()=>{eP(eH)},[eH]),"section"===r.type||r.editorConfigs?.toolbar?.hide)return null;let eF=e=>{let t=e?.childrens?.length??0;if("Row"===e.label){let e=1===t?x("Row {colNumber} col",{colNumber:t}):x("Row {colNumber} cols",{colNumber:t});return e}return x(e.label)},eU=e=>{if(!$.length)return;let t=e?.target||null,i=t.closest("[data-toolbar-active]");if(!t||!i)return;if(T)k(!1),B(!1);else{let e=ef(i,i);if(e)k(!0);else{let e=i.getBoundingClientRect();e.top<36*$.length?k(!0):k(!1)}B(!0)}let o=new CustomEvent("editor:toolbar:show-parents",{bubbles:!0,detail:{value:!T}});window.dispatchEvent(o)},eI=e=>{e.preventDefault(),e.stopPropagation();let t=new CustomEvent("editor:toolbar:delete-component",{bubbles:!0,detail:{componentUid:r.uid,isThemeSection:M,isShopifySection:Z}});return window.dispatchEvent(t),!1},eD=e=>{e.preventDefault(),e.stopPropagation();let t=new CustomEvent("editor:toolbar:duplicate-component",{bubbles:!0,detail:{componentUid:r.uid,isThemeSection:M,isShopifySection:Z}});return window.dispatchEvent(t),!1},eO=e=>{e.preventDefault(),e.stopPropagation();let t=new CustomEvent("editor:toolbar:zoom-out-component",{bubbles:!0,detail:{componentUid:r.uid}});return window.dispatchEvent(t),!1},eN=()=>{V(null),window.removeEventListener("editor:close-add-section-popup",eN)},ez=(e,t)=>{if(e.preventDefault(),e.stopPropagation(),eb()>=25)return!1;let i=e.target;if(i){V(t);let e=i.getBoundingClientRect(),o=new CustomEvent("editor:toolbar:add-section",{bubbles:!0,detail:{componentUid:r.uid,position:t,top:e.top+e.height/2}});window.dispatchEvent(o),window.addEventListener("editor:close-add-section-popup",eN)}return!1},e_="Section"===r.tag&&!r.isThemeSection&&"STATIC"!==q&&"POST_PURCHASE"!==q&&!r.isShopifySection&&25>eA()&&!et;return e(t,{children:[!("Section"==r.tag&&H)&&e("div",{"data-toolbar":!0,"data-toolbar-section":"Section"==r.tag,"data-toolbar-theme-section":"Section"==r.tag&&!!M||H,"data-toolbar-shopify-section":"Section"==r.tag&&!!Z,"data-toolbar-limit":eA()>=25||!!et,children:[e("div",{"data-toolbar-show-parent":!0,onClick:e=>eU(e),"aria-hidden":"true",children:[ej&&i("div",{className:"gp-hidden gp-w-[12px] interaction-use-custom-element",children:i("svg",{width:"12",height:"13",viewBox:"0 0 12 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:i("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"})})}),eZ&&i("div",{className:"gp-hidden gp-w-[14px] interaction-use-custom-element",children:i("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:i("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"})})}),N&&eq&&i("div",{"data-toolbar-icon-drag":!0,children:e("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[i("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"}),i("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"}),i("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"}),i("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"}),i("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"}),i("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"==r.tag?e("div",{"data-toolbar-name":!0,children:[(()=>{if(Z)return r.name?.includes("Shopify section:")?`${x("Shopify section")}: ${r.name.replace("Shopify section:","")}`:`${x("Shopify section")}: ${r.name}`;let e=r.name&&r.name===`Section ${r.uid}`;return eb()>=20?`${e?x("Section"):r?.name} ${eA()+1}/25`:e?`${x("Section")} ${eA()+1}`:r?.name})(),N&&Z&&!r.isShopifyVisibility&&e("svg",{"data-toolbar-visibility":!0,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i("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"}),i("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"}),i("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"})]})]}):i("div",{"data-toolbar-name":!0,children:x(r.customLabel||r.label)}),N&&"Section"!==r.tag&&$.length>0&&i("div",{"data-toolbar-icon-parent":!0,"data-toolbar-icon-parent-open":T,children:i("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:i("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"})})})]}),N&&T&&$.map((t,o)=>e("div",{"data-toolbar-parent":!0,"data-component-tag":t.tag,"data-parent-uid":t.uid,"data-toolbar-theme-section":H,"data-toolbar-parent-revert":A,style:{top:A?`${36*(o+1)}px`:`${-36*(o+1)}px`},children:[i("div",{"data-toolbar-icon-drag":!0,children:e("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[i("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"}),i("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"}),i("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"}),i("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"}),i("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"}),i("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"})]})}),i("div",{"data-toolbar-name":!0,children:eF(t)})]},t.uid)),N&&!ex&&e(t,{children:[i(f,{...r}),e_&&i(p,{...r}),"Sticky"==r.tag&&i("div",{"data-toolbar-zoom-out":!0,onClick:e=>eO(e),"aria-hidden":"true",children:i("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:i("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"})})}),em.includes(r.tag)&&i(v,{"data-toolbar-title":!0,enable:!0,"data-toolbar-disable":!1,text:x("Edit content in Shopify"),position:"top",onClick:()=>{if(eh.includes(r.tag)){window.open(ey,"_blank");return}if(eu.includes(r.tag)){window.open(eL,"_blank");return}window.open(eS,"_blank")},"aria-hidden":"true",children:e("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i("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"}),i("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"}),i("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"}),i("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"})]})}),i(v,{enable:"Section"==r.tag&&eb()>=25||Z,text:Z?x("Disabled. Please edit in Shopify Editor"):x("Page has reached Shopify’s 25 section-limit"),position:"bottom",width:"200px","data-toolbar-duplicate":!0,"data-toolbar-disable":eE,onClick:eE?void 0:e=>eD(e),"aria-hidden":"true",className:eE?"!gp-cursor-not-allowed":"",children:i("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:i("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"})})}),i(v,{"data-toolbar-delete":!0,onClick:e=>eR?null:eI(e),enable:eR,"data-toolbar-disable":eR,text:Z?x("Disabled. Please edit in Shopify Editor"):Q.text,width:Q.width,position:Z?"bottom":U,"aria-hidden":"true",className:eR?"!gp-cursor-not-allowed":"",children:i("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:i("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"})})})]}),i(g,{uid:r.uid})]},r.uid),"STATIC"!==q&&"POST_PURCHASE"!==q&&25>eA()&&i(o,{...r}),i("div",{"data-outline":!0,"data-outline-section":"Section"==r.tag,"data-outline-theme-section":"Section"==r.tag&&!!M||H,"data-outline-shopify-section":"Section"==r.tag&&!!Z,"data-outline-limit":e$,"data-outline-error":!!et},"outline-"+r.uid),"Section"==r.tag&&!H&&e(t,{children:[i(v,{enable:eb()>=25,text:x("Page has reached Shopify’s 25 section-limit"),position:"top","data-toolbar-add-top":!0,"data-toolbar-disable":eb()>=25,"data-toolbar-add-open":"above"==P,onClick:e=>ez(e,"above"),"aria-hidden":"true",children:i("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:i("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"})})}),i(v,{enable:eb()>=25,text:x("Page has reached Shopify’s 25 section-limit"),position:"top","data-toolbar-add-bottom":!0,"data-toolbar-disable":eb()>=25,"data-toolbar-add-open":"below"==P,onClick:e=>ez(e,"below"),"aria-hidden":"true",children:i("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:i("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"})})})]}),ea&&i(u,{errorSectionInfo:ea,onDismiss:eT}),el&&i(m,{message:el.message,targetUid:el.positionUid??r.uid,onDismiss:eB}),N&&i(w,{...r})]})});export{x as default};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{makeStyleResponsive as e}from"../helpers/make-style.js";import"react/jsx-runtime";import"react";import"zustand";import"swr";import"../graphql/queries/articles.generated.js";import"../graphql/queries/blogs.generated.js";import"@gem-sdk/adapter-shopify";import"swr/mutation";import"../graphql/queries/product-variants.generated.js";import"../graphql/queries/collection-detail-filter.generated.js";import"../graphql/queries/collection.generated.js";import"../graphql/queries/collections.generated.js";import"../graphql/queries/published-theme-pages.generated.js";import"../graphql/queries/store-property.generated.js";import"../graphql/queries/preview-page.generated.js";import"../graphql/queries/published-shop-metas.generated.js";import"../graphql/queries/shop-shopify.generated.js";import"../graphql/queries/products-with-selling-plans.generated.js";import"../graphql/queries/product-variant-with-selling-plans.generated.js";import"../graphql/queries/product-little-detail.generated.js";import"../graphql/queries/product-medias.generated.js";import"../graphql/queries/productsV2.generated.js";import"swr/infinite";import"vanilla-lazyload";import"../hooks/useCartUI.js";import"../graphql/queries/product-value-label.generated.js";import"../hooks/useStickyStore.js";import"../types/builder.js";import"../types/custom.js";import"../types/animations.js";import"react-transition-group";import{disableWrap as t,customRenderChildren as r}from"./constant.js";import"@gem-sdk/core";import{composeAdvanceStyle as i}from"../helpers/compose-advance-style.js";import{
|
|
3
|
-
${
|
|
4
|
-
</div>`;let{cssCode:
|
|
2
|
+
import{makeStyleResponsive as e}from"../helpers/make-style.js";import"react/jsx-runtime";import"react";import"zustand";import"swr";import"../graphql/queries/articles.generated.js";import"../graphql/queries/blogs.generated.js";import"@gem-sdk/adapter-shopify";import"swr/mutation";import"../graphql/queries/product-variants.generated.js";import"../graphql/queries/collection-detail-filter.generated.js";import"../graphql/queries/collection.generated.js";import"../graphql/queries/collections.generated.js";import"../graphql/queries/published-theme-pages.generated.js";import"../graphql/queries/store-property.generated.js";import"../graphql/queries/preview-page.generated.js";import"../graphql/queries/published-shop-metas.generated.js";import"../graphql/queries/shop-shopify.generated.js";import"../graphql/queries/products-with-selling-plans.generated.js";import"../graphql/queries/product-variant-with-selling-plans.generated.js";import"../graphql/queries/product-little-detail.generated.js";import"../graphql/queries/product-medias.generated.js";import"../graphql/queries/productsV2.generated.js";import"swr/infinite";import"vanilla-lazyload";import"../hooks/useCartUI.js";import"../graphql/queries/product-value-label.generated.js";import"../hooks/useStickyStore.js";import"../types/builder.js";import"../types/custom.js";import"../types/animations.js";import"react-transition-group";import{disableWrap as t,customRenderChildren as r}from"./constant.js";import"@gem-sdk/core";import{composeAdvanceStyle as i}from"../helpers/compose-advance-style.js";import{IS_LIQUID as s,baseAssetURL as a,isLocalEnv as l}from"../helpers/convert.js";import{LIST_IMAGE_LIQUID_VARS as n}from"../constants/listImage.js";import"crc-32";import{RenderIf as d,template as o}from"../helpers/render.js";import{guardElementScriptTags as p}from"./guardElementScriptTags.js";import{resolveComponentTag as u}from"../modules/canary/utils/element.js";let c=["product","variant","product_form_id","productSelectedVariant","form",...Object.values(n)].map(e=>`${e}: ${e}`).join(", "),g=["CarouselItem","CarouselItemV3"],m=["Text","Heading"],h=["IconListV2","IconList"],b=["IconList","ProductVariants"],q=({uid:e,builder:a,components:l,parentId:n,extraFiles:p={},pageContext:c,additionalSettings:q,...$})=>{if(!s)throw Error("RenderLiquid requires IS_LIQUID=true. This process renders Liquid but is built for TSX, so the shared helpers would take the React branch and the output would be wrong.");let k=a[e],w=u({elementTag:k?.tag,components:l,pageContext:c});if(!w||!k||k?.type==="section")return{liquid:"",extraFiles:p};{let s={extraFiles:{}},p=i(k.advanced,k.tag),u="";u=t.includes(k.tag)?d(k?.childrens?.length,()=>w({builderProps:{uid:e,builderData:k},styles:k.styles,setting:k.settings,style:p,advanced:k.advanced,parentId:g.includes(k.tag)?n:null,pageContext:c,...q,...$,builderAttrs:{...$.builderAttrs},rawChildren:k.childrens.map(e=>({...a[e],uid:e,builder:a,components:l,customProps:s,pageContext:c,...q})),children:r.includes(k.tag)?"":v({uid:e,customProps:s},k.childrens.map(e=>y({uid:e,builder:a,components:l,customProps:s,parentTag:k.tag,pageContext:c,...q})))}),()=>w({builderProps:{uid:e,builderData:k},styles:k.styles,setting:k.settings,advanced:k.advanced,style:p,isText:!!m.includes(k.tag)||null,parentId:g.includes(k.tag)?n:null,pageContext:c,...$,builderAttrs:{...$.builderAttrs}})):o`<div gp-el-wrapper style="${h.includes(k.tag)?"":p}" class="${k.uid} ${k?.childrens?.length||"IconListItemHoz"!==k.tag?"":"hidden"}">
|
|
3
|
+
${d(k?.childrens?.length,()=>w({builderProps:{uid:e,builderData:k},styles:k.styles,setting:k.settings,advanced:{...b.includes(k.tag)?k?.advanced:{},cssClass:k?.advanced?.cssClass},pageContext:c,...q,...$,builderAttrs:{...$.builderAttrs},rawChildren:k.childrens.map(e=>({...a[e],uid:e,builder:a,components:l,customProps:s,pageContext:c,...q})),children:r.includes(k.tag)?"":v({uid:e,customProps:s},k.childrens.map(e=>y({uid:e,builder:a,components:l,customProps:s,parentTag:k.tag,pageContext:c,...q})))}),()=>w({builderProps:{uid:e,builderData:k},styles:k.styles,setting:k.settings,advanced:{...b.includes(k.tag)?k?.advanced:{},cssClass:k?.advanced?.cssClass},pageContext:c,...q,isText:!!m.includes(k.tag)||null,style:h.includes(k.tag)?p:null,...$,builderAttrs:{...$.builderAttrs}}))}
|
|
4
|
+
</div>`;let{cssCode:x,jsCode:I}=j(k);return x&&(u+=x),I&&(u+=I),{liquid:u=f(k,u),extraFiles:s.extraFiles}}},j=e=>{let{css:t,javascript:r,rootClassName:i}=e.advanced?.editorData||{},s=t?.replaceAll(i,e.uid),a=r?.replaceAll(i,e.uid),l=d(!!t,o`
|
|
5
5
|
<style id="${`custom-css-${e?.uid}`}">
|
|
6
6
|
${s}
|
|
7
7
|
</style>
|
|
8
|
-
`),
|
|
8
|
+
`),n=d(!!r,o`
|
|
9
9
|
<script id="${`custom-js-${e?.uid}`}">
|
|
10
10
|
try {
|
|
11
11
|
${a}
|
|
12
12
|
} catch(err){}
|
|
13
13
|
</script>
|
|
14
|
-
`);return{cssCode:
|
|
14
|
+
`);return{cssCode:l,jsCode:n}},f=(t,r)=>{let{advanced:i,tag:s}=t,{animation:n,op:p,hasAnimationInteraction:u,displayInitInteraction:c}=i??{},g=(e,t)=>e?.triggerConfig?.[t]?.animation??"none",m=e=>{if("desktop"===e);else if("tablet"===e)return n?.tablet??n?.desktop;else if("mobile"===e)return n?.mobile??n?.tablet??n?.desktop;return n?.desktop},h=g(m("desktop"),"appear"),b=g(m("desktop"),"hover"),q=g(m("tablet"),"appear"),j=g(m("mobile"),"appear"),f=n?.desktop?.enabled&&("none"!==h||"none"!==b)||n?.tablet?.enabled&&"none"!==q||n?.mobile?.enabled&&"none"!==j||!!u,y=n?.desktop?.enabled&&("none"!==h||"none"!==b)||n?.tablet?.enabled&&"none"!==q||n?.mobile?.enabled&&"none"!==j;if(!f)return r;let v=e=>m(e)?.enabled&&!["shake","none"].includes(g(m(e),"appear"))?"hidden":"visible",$={desktop:v("desktop"),tablet:v("tablet"),mobile:v("mobile")};return o`
|
|
15
15
|
<gp-animation
|
|
16
16
|
gp-interaction-wrapper
|
|
17
|
-
display-init="${!1===
|
|
17
|
+
display-init="${!1===c?"hide":"show"}"
|
|
18
18
|
style="${{display:"contents"}}"
|
|
19
19
|
>
|
|
20
|
-
<script gp-data type="application/json">${JSON.stringify({config:
|
|
20
|
+
<script gp-data type="application/json">${JSON.stringify({config:n,tag:s,opacity:p,notEnableAnimationWhenInit:!y})}</script>
|
|
21
21
|
<div style="${{...e("v",$),display:"contents"}}">${r}</div>
|
|
22
22
|
</gp-animation>
|
|
23
|
-
${l
|
|
24
|
-
`},
|
|
23
|
+
${d(l,'<script src="{{ \'gp-animation-v7-5.js\' | asset_url }}" defer="defer"></script>',`<script src="${a}/assets-v2/gp-animation-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
24
|
+
`},y=e=>{let t=q(e);for(let r in t.extraFiles)Object.prototype.hasOwnProperty.call(t.extraFiles,r)&&(e.customProps.extraFiles[r]=t.extraFiles[r]);let r=new TextEncoder,i=t?.liquid?r.encode(t.liquid).length:0;if(Math.ceil(i/1024)>=180){let r=`gp-section-snippet-${e.uid}`;return e.customProps.extraFiles[r]=t.liquid,`{% render '${r}', ${c} %}`}return t.liquid},v=({uid:e,customProps:t},r)=>{let i="";if(r?.length)for(let s=0;s<r.length;s++){let a=r[s];if(a){let r=i+a,l=new TextEncoder,n=r?l.encode(r).length:0;if(Math.ceil(n/1024)>=180){let r=`gp-section-snippet-${e+s}`;t.extraFiles[r]=a,i+=`{% render '${r}', ${c} %}`}else i+=a}}return i},$=e=>{let{liquid:t,extraFiles:r}=q(e),i=Object.fromEntries(Object.entries(r).map(([e,t])=>[e,p(t)]));return{liquid:p(t),extraFiles:i}};export{y as RenderChildren,v as WrapRenderChildren,$ as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let s=/<script\b[^>]*?="(?:https?:\/\/[^"]*\/assets-v2\/|\{\{\s*')(gp-[\w.-]+?\.js)[^"]*"[^>]*>\s*<\/script>/g,e=/(\{%-?\s*capture\b[\s\S]*?\{%-?\s*endcapture\s*-?%\})/,t=/\W/g,p=e=>e.replace(s,(s,e)=>{let p=`gp_script_${e.replace(t,"_")}`;return`{%- unless ${p} -%}{%- assign ${p} = true -%}${s}{%- endunless -%}`}),r=s=>s.split(e).map((s,e)=>e%2?s:p(s)).join("");export{r as guardElementScriptTags};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import{ThemeSectionTooltip as i}from"./ThemeSectionTooltip.js";import{useRef as o,useState as
|
|
2
|
+
import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import{ThemeSectionTooltip as i}from"./ThemeSectionTooltip.js";import{useRef as o,useState as s}from"react";import"zustand";import{useI18nStore as a}from"../../contexts/I18nContext.js";import{isFreePlan as p}from"../../constants/plan.js";import"../constant.js";import{useShopStore as n}from"../../contexts/ShopContext.js";import"@gem-sdk/core";import"../../graphql/queries/product-variants.generated.js";import"../../graphql/queries/collection-detail-filter.generated.js";import"../../graphql/queries/collection.generated.js";import"../../graphql/queries/collections.generated.js";import"../../graphql/queries/published-theme-pages.generated.js";import"../../graphql/queries/store-property.generated.js";import"../../graphql/queries/preview-page.generated.js";import"../../graphql/queries/published-shop-metas.generated.js";import"../../graphql/queries/shop-shopify.generated.js";import"../../graphql/queries/articles.generated.js";import"../../graphql/queries/blogs.generated.js";import"../../graphql/queries/products-with-selling-plans.generated.js";import"../../graphql/queries/product-variant-with-selling-plans.generated.js";import"../../graphql/queries/productsV2.generated.js";import"../../graphql/queries/product-little-detail.generated.js";import"../../graphql/queries/product-medias.generated.js";import"swr";import"../../helpers/convert.js";import"crc-32";import"@gem-sdk/adapter-shopify";import"swr/mutation";import"swr/infinite";import"vanilla-lazyload";import"../../hooks/useCartUI.js";import"../../graphql/queries/product-value-label.generated.js";import"../../hooks/useStickyStore.js";import"../../types/builder.js";import"../../types/custom.js";import"../../types/animations.js";let l=({...l})=>{let{t:m}=a(),d=n(e=>e.plan),c=n(e=>e.createThemeSectionCount),u=n(e=>e.limitCreateThemeSection),h=p(d),g=h||u?.isLimit,q=g||void 0===c||c<1,j=o(),[C,v]=s(!1),b=(e,t)=>{e.preventDefault(),e.stopPropagation(),t?.disabled||(g?w():f(),j.current&&clearTimeout(j.current),v(!1))},w=()=>{let e=new CustomEvent("editor:toolbar:upgrade",{bubbles:!0});window.dispatchEvent(e)},f=()=>{let e=new CustomEvent("editor:toolbar:create-theme-section",{bubbles:!0,detail:{componentUid:l.uid}});window.dispatchEvent(e)};return e(t,{children:r(i,{isFreeLimit:h,limitCreateThemeSection:u,isShow:C,isRender:q,onActions:b,onMouseEnter:()=>{q&&(j.current&&clearTimeout(j.current),j.current=setTimeout(()=>{v(!0)},600))},onMouseLeave:()=>{q&&(j.current&&clearTimeout(j.current),v(!1))},children:[q&&e("div",{"data-toolbar-create-theme-section":!0,children:"You can create reusable sections"}),e("div",{"data-toolbar-active-create-theme-section-wrapper":!0,children:r("div",{"data-toolbar-active-create-theme-section":!0,onClick:e=>b(e,{disabled:!!g}),"aria-hidden":"true",children:[r("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[e("path",{d:"M1 2C1 1.44772 1.44772 1 2 1H6C6.55228 1 7 1.44772 7 2V6C7 6.55228 6.55228 7 6 7H2C1.44772 7 1 6.55228 1 6V2Z",fill:"#F9F9F9"}),e("path",{d:"M9 10C9 9.44772 9.44772 9 10 9H14C14.5523 9 15 9.44772 15 10V14C15 14.5523 14.5523 15 14 15H10C9.44772 15 9 14.5523 9 14V10Z",fill:"#F9F9F9"}),e("path",{d:"M2 9C1.44772 9 1 9.44772 1 10V14C1 14.5523 1.44772 15 2 15H6C6.55228 15 7 14.5523 7 14V10C7 9.44772 6.55228 9 6 9H2Z",fill:"#F9F9F9"})]}),e("p",{children:m("Create Theme Section")})]})})]})})};export{l as CreateThemeSection};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import{jsxs as C,jsx as l}from"react/jsx-runtime";let e="gp-bg-[#FEE8EB] gp-text-[#8E0B21]",r=({className:e})=>C("svg",{className:e,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l("path",{d:"M11 13.5C11 14.0523 10.5523 14.5 10 14.5C9.44772 14.5 9 14.0523 9 13.5C9 12.9477 9.44772 12.5 10 12.5C10.5523 12.5 11 12.9477 11 13.5Z",fill:"currentColor"}),l("path",{d:"M10.75 6.25001C10.75 5.8358 10.4142 5.50001 10 5.5C9.5858 5.49999 9.25001 5.83578 9.25 6.24999L9.24994 10.75C9.24993 11.1642 9.58572 11.5 9.99993 11.5C10.4141 11.5 10.7499 11.1642 10.7499 10.75L10.75 6.25001Z",fill:"currentColor"}),l("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 17C13.866 17 17 13.866 17 10C17 6.13401 13.866 3 10 3C6.13401 3 3 6.13401 3 10C3 13.866 6.13401 17 10 17ZM10 15.5C13.0376 15.5 15.5 13.0376 15.5 10C15.5 6.96243 13.0376 4.5 10 4.5C6.96243 4.5 4.5 6.96243 4.5 10C4.5 13.0376 6.96243 15.5 10 15.5Z",fill:"currentColor"})]}),o=({className:C})=>l("svg",{className:C,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:l("path",{d:"M11.1755 12.0243C11.4099 12.2586 11.7898 12.2586 12.0241 12.0243C12.2584 11.79 12.2584 11.4101 12.0241 11.1758L8.84833 8.00005L12.0241 4.82431C12.2584 4.59 12.2584 4.2101 12.0241 3.97579C11.7898 3.74147 11.4099 3.74147 11.1755 3.97579L7.9998 7.15152L4.82407 3.97578C4.58975 3.74147 4.20986 3.74147 3.97554 3.97578C3.74123 4.2101 3.74123 4.59 3.97554 4.82431L7.15128 8.00005L3.97554 11.1758C3.74123 11.4101 3.74123 11.79 3.97554 12.0243C4.20986 12.2586 4.58975 12.2586 4.82407 12.0243L7.9998 8.84858L11.1755 12.0243Z",fill:"#212121"})});export{e as ERROR_BANNER_COLOR_CLASSES,r as ErrorAlertIcon,o as ErrorCloseIcon};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import{jsxs as e,jsx as r}from"react/jsx-runtime";import{UNMEASURED_BANNER_STYLE as t,PAGE_BANNER_LAYOUT as n,getLayoutSnapshot as a,getBannerLayout as o}from"./pasteErrorBannerLayout.js";import{ERROR_BANNER_COLOR_CLASSES as l,ErrorAlertIcon as s,ErrorCloseIcon as i}from"./ErrorBannerParts.js";import p from"../../hooks/useIsomorphicLayoutEffect.js";import{useRef as m,useEffect as c,useState as u}from"react";let f=({$banner:e,targetUid:r})=>{let t=`[data-uid="${r}"]`;return e.closest(t)??e.parentElement?.querySelector(t)??e.ownerDocument.querySelector(t)},g=({$banner:e,targetUid:r,message:t})=>{let[l,s]=u(null);return p(()=>{if(!r){s(n);return}let t=e.current;if(!t)return;let l=f({$banner:t,targetUid:r}),i="",p=0,m=()=>{l?.isConnected||(l=f({$banner:t,targetUid:r}));let e=l?a({$banner:t,$target:l}):"";l&&e!==i&&(i=e,s(o({$banner:t,$target:l}))),p=requestAnimationFrame(m)};return m(),()=>cancelAnimationFrame(p)},[e,r,t]),l},d=({message:n,targetUid:a,onDismiss:o})=>{let p=m(null),u=g({$banner:p,targetUid:a,message:n}),f=u?.placement;return c(()=>{f&&p.current?.scrollIntoView({block:"nearest",behavior:"smooth"})},[n,f]),e("div",{ref:p,role:"alert","data-paste-error-banner":f,style:u?.style??t,className:`gp-flex gp-items-start gp-gap-2 gp-px-2 gp-py-2.5 gp-text-xs gp-leading-5 ${l}`,children:[r(s,{className:"gp-flex-shrink-0"}),r("div",{className:"gp-flex-1 gp-min-w-0",children:n}),r("button",{className:"gp-flex-shrink-0 gp-p-0.5",type:"button",onClick:o,children:r(i,{})})]})};export{d as PasteErrorBanner};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import{jsx as e}from"react/jsx-runtime";import{PasteErrorBanner as r}from"./PasteErrorBanner.js";import{useCallback as t}from"react";import"zustand";import{useBuilderPreviewStore as s}from"../../contexts/BuilderPreviewContext.js";import"react-transition-group";import"../constant.js";import"swr";import"@gem-sdk/core";import"../../graphql/queries/product-variants.generated.js";import"../../graphql/queries/collection-detail-filter.generated.js";import"../../graphql/queries/collection.generated.js";import"../../graphql/queries/collections.generated.js";import"../../graphql/queries/published-theme-pages.generated.js";import"../../graphql/queries/store-property.generated.js";import"../../graphql/queries/preview-page.generated.js";import"../../graphql/queries/published-shop-metas.generated.js";import"../../graphql/queries/shop-shopify.generated.js";import"../../graphql/queries/articles.generated.js";import"../../graphql/queries/blogs.generated.js";import"../../graphql/queries/products-with-selling-plans.generated.js";import"../../graphql/queries/product-variant-with-selling-plans.generated.js";import"../../graphql/queries/productsV2.generated.js";import"../../graphql/queries/product-little-detail.generated.js";import"../../graphql/queries/product-medias.generated.js";import"../../helpers/convert.js";import"crc-32";import"@gem-sdk/adapter-shopify";import"swr/mutation";import"swr/infinite";import"vanilla-lazyload";import"../../hooks/useCartUI.js";import"../../graphql/queries/product-value-label.generated.js";import"../../hooks/useStickyStore.js";import"../../types/builder.js";import"../../types/custom.js";import"../../types/animations.js";let i=()=>{let i=s(e=>e.pasteError),o=s(e=>e.setPasteError),p=t(()=>o(null),[o]);return!i||i.anchorUid?null:e(r,{message:i.message,onDismiss:p})};export{i as PasteErrorPageBanner};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsx as e,jsxs as
|
|
2
|
+
import{jsx as e,jsxs as r}from"react/jsx-runtime";import{ERROR_BANNER_COLOR_CLASSES as t,ErrorAlertIcon as i,ErrorCloseIcon as l}from"./ErrorBannerParts.js";let n="https://help.gempages.net/articles/section-limit#maximum-limit-of-elements-per-section",s=({errorSectionInfo:s,onDismiss:o})=>s.isDismissed?null:e("div",{"data-toolbar-error-banner":!0,className:`gp-flex gp-items-center gp-px-2 gp-top-0 gp-w-full gp-absolute gp-border-t gp-border-t-[#8E0B21] gp-text-xs gp-leading-5 ${t}`,children:r("div",{className:"gp-flex gp-gap-1.5 gp-w-full",children:[e(i,{className:"gp-flex-shrink-0 gp-mt-2.5"}),r("div",{className:"gp-w-full gp-py-2.5",children:["LIQUID_SYNTAX_ERROR"===s.type&&"This section contains a syntax error in the code. Please review and fix it, then try verifying again.","SECTION_SIZE_EXCEED_256KB"===s.type&&r("div",{children:["This section is over Shopify's 256KB limit. Please follow ",e("a",{target:"_blank",href:n,className:"gp-underline gp-cursor-pointer",onClick:e=>{e.preventDefault(),e.stopPropagation(),window.open(n,"_blank")},rel:"noreferrer",children:"our guide"})," ","to optimize, then try verifying again."]}),"MISSING_SECTION_IN_THEME"===s.type&&"This section was deleted from your live theme. Please delete it from this page, or restore all sections by Force publish."]}),e("button",{className:"gp-p-1.5 gp-flex-shrink-0 gp-mt-1 gp-h-7",onClick:o,type:"button",children:e(l,{})})]})});export{s as SectionErrorBanner};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let t={INSIDE:"inside",BELOW:"below",PAGE:"page"},e={position:"absolute",zIndex:31,boxSizing:"border-box",maxWidth:"none",fontFamily:"Inter, sans-serif",fontWeight:400,fontStyle:"normal",textAlign:"left",textTransform:"none",letterSpacing:"normal",whiteSpace:"normal"},n={...e,top:0,left:0,visibility:"hidden"},i={placement:t.PAGE,style:{...e,position:"fixed",zIndex:1e3,top:8,left:8,right:8,borderRadius:8}},l=({value:t,min:e,max:n})=>Math.min(Math.max(t,e),Math.max(e,n)),o=({target:n,origin:i,viewportWidth:o,insideHeight:r})=>{let a=n.width<250,h=r>n.height;if(!a&&!h)return{placement:t.INSIDE,style:{...e,top:n.top-i.top,left:n.left-i.left,width:n.width}};let d=Math.min(Math.max(n.width,250),o),f=l({value:n.left,min:0,max:o-d});return{placement:t.BELOW,style:{...e,top:n.top+n.height+4-i.top,left:f-i.left,width:d,borderRadius:8}}},r=({$banner:t,width:e})=>{let n=t.style.width;t.style.width=`${e}px`;let i=t.offsetHeight;return t.style.width=n,i},a=t=>{let e=t.getBoundingClientRect();return{top:e.top+t.clientTop,left:e.left+t.clientLeft}},h=({$banner:t,$target:e})=>{let n=t.offsetParent;if(!n)return"";let i=e.getBoundingClientRect(),l=a(n),o=t.ownerDocument.documentElement.clientWidth;return[i.top,i.left,i.width,i.height,l.top,l.left,o].join()},d=({$banner:t,$target:e})=>{let n=t.offsetParent;if(!n)return null;let i=e.getBoundingClientRect();return o({target:i,origin:a(n),viewportWidth:t.ownerDocument.documentElement.clientWidth,insideHeight:r({$banner:t,width:i.width})})};export{t as BANNER_PLACEMENT,i as PAGE_BANNER_LAYOUT,n as UNMEASURED_BANNER_STYLE,o as calcBannerLayout,d as getBannerLayout,h as getLayoutSnapshot};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let _={LOADING:"gp_list_img_loading",FETCH_PRIORITY:"gp_list_img_fetchpriority",SIZES:"gp_list_img_sizes"};export{_ as LIST_IMAGE_LIQUID_VARS};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e=["starter","trial","trial2022"],r=r=>e.includes(r??"");export{e as FREE_PLANS,r as isFreePlan};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsx as e}from"react/jsx-runtime";import{UPDATABLE_ITEM_ATTRS as t}from"./types/builderPreviewContext.js";import{useContext as i,createContext as
|
|
2
|
+
import{jsx as e}from"react/jsx-runtime";import{UPDATABLE_ITEM_ATTRS as t}from"./types/builderPreviewContext.js";import{useContext as i,createContext as r,useMemo as s,useEffect as n,Suspense as d,Fragment as l}from"react";import{normalizeBuilderData as a}from"../helpers/normalize-builder-data.js";import{resolvePasteErrorInfo as o}from"../helpers/pasteError.js";import{cloneDeep as c}from"../helpers/clone-deep.js";import{useStore as u,createStore as p}from"zustand";function f(e,t,i){let r=e.splice(t,1)[0];void 0!==r&&e.splice(i,0,r)}let h=r(null),m={uid:"ROOT",tag:"Root",label:"Root",childrens:[]},y=(e,i,r)=>p((s,n)=>({state:e,loaded:!1,isThemeSectionEditor:!!r,pageName:i,dynamicProduct:null,dynamicCollection:null,errorSectionList:null,pasteError:null,activeComponentDetail:null,addItem:e=>{let{position:t,data:i}=e,r=n().state,d=Date.now();if("section"===e.type){if(!Array.isArray(i)){let e=i.uid,n=r.ROOT;n.childrens?n.childrens.splice(t??0,0,e):n.childrens=[e],n.dateModified=d,s({state:{...r,[e]:{uid:e,type:"section",label:i.label},ROOT:c(n)}})}}else{let{id:i,data:n}=e,l=i?r[i]??r.ROOT:r.ROOT;if("section"===l.type)return;if(Array.isArray(n)){let e=n.map(e=>e.uid),i=n.reduceRight((e,t)=>{let i=a(t);return{...e,...i}},{});l.dateModified=d,l.childrens=l.childrens??[],l.childrens.splice(t??0,0,...e),s({state:{...r,...i,[l.uid]:c(l)}})}else{let e=a(n);l.dateModified=d,l.childrens=l.childrens??[],l.childrens.splice(t??0,0,n.uid),s({state:{...r,...e,[l.uid]:c(l)}})}}},changeItemProp:(e,t,i)=>{if(!i||!["setting","style","advanced"].includes(i))return;let r=n().state,d=r[e];if(d?.type!=="section"&&d){let n=Date.now();switch(d.dateModified=n,i){case"setting":s({state:{...r,[e]:{...d,settings:{...d.settings,...t}}}});break;case"style":s({state:{...r,[e]:{...d,styles:{...d.styles,...t}}}});break;case"advanced":s({state:{...r,[e]:{...d,advanced:{...d.advanced,...t}}}})}}},forceChangeItemProp:(e,t,i)=>{if(!i||!["setting","style","advanced"].includes(i))return;let r=n().state,d=r[e];if(d?.type!=="section"&&d){let n=Date.now();switch(d.dateModified=n,i){case"setting":s({state:{...r,[e]:{...d,settings:t}}});break;case"style":s({state:{...r,[e]:{...d,styles:t}}});break;case"advanced":s({state:{...r,[e]:{...d,advanced:t}}})}}},changeItemPropByKey:({id:e,key:t,data:i,group:r})=>{if(!r||!["setting","style","advanced"].includes(r))return;let d=n().state,l=d[e];if(l?.type!=="section"&&l){let n={style:l.styles??{},advanced:l.advanced??{},setting:l.settings??{}};void 0===i?(console.warn("Data is undefined"),delete n[r][t]):n[r][t]=i,s({state:{...d,[e]:{...l,settings:{...n.setting},styles:{...n.style},advanced:{...n.advanced}}}})}},getItem:e=>n().state[e],getState:()=>n().state,removeItem:e=>{if("ROOT"===e)s({state:{ROOT:m}});else{let t=n().state;!function e(t,i){let r=i[t];r&&(delete i[t],"section"!==r.type&&r.childrens?.map(t=>e(t,i)))}(e,t);let i=Object.entries(t).find(([,t])=>"section"!==t.type&&t.childrens?.includes(e));if(i){let r=Date.now(),[n,d]=i;if("section"===d.type)return;d.childrens=d.childrens?.filter(t=>t!==e),d.dateModified=r,s({state:{...t,[n]:c(d)}})}}},moveItem:(e,t,i)=>{let r=n().state,d=r[e],l=r[t];if(d&&l&&"section"!==l.type){if("section"===d.type){let t=r.ROOT;if(!t.childrens)return;let n=t.childrens.findIndex(t=>t===e);f(t.childrens,n,i??0),s({state:{...r,ROOT:c(t)}})}else{let n=Object.entries(r).find(([,t])=>"section"!==t.type&&t.childrens?.includes(e));if(d&&n){let a=Date.now(),[,o]=n;if("section"===o.type)return;if(o.dateModified=a,t===o.uid&&o.childrens){let t=o.childrens.findIndex(t=>t===e);o.childrens&&t!==i&&(f(o.childrens,t,i??0),s({state:{...r,[o.uid]:c(o)}}))}else o.childrens=o.childrens?.filter(t=>t!==e),l&&(l.dateModified=a,l.childrens=l.childrens??[],l.childrens.splice(i??0,0,d.uid),s({state:{...r,[l.uid]:c(l),[o.uid]:c(o)}}))}}}},forceChangeState:e=>{s({state:e,loaded:!0})},initState:e=>{if(Array.isArray(e)){let t=e.map(e=>e.uid),i=e.reduceRight((e,t)=>{let i=a(t);return{...e,...i}},{});s({loaded:!0,state:{ROOT:{...m,childrens:t},...i}})}else{let t=a(e);s({loaded:!0,state:{ROOT:{...m,childrens:[e.uid]},...t}})}},addSection:(e,t)=>{let i=n().state,r=i.ROOT;r.childrens||(r.childrens=[]),r.childrens.splice(t??0,0,e.uid),s({state:{...i,ROOT:c(r)}})},getParents:(e,t)=>{let i=n().state,r=[],s=0,d=e;for(;!t||!(s>=t);){let e=Object.entries(i).find(([,e])=>"section"!==e.type&&e.childrens?.includes(d));if(!e)break;let[,t]=e;if(!t)break;r.push(t),d=t.uid,s++}return r},updateItemName:(e,t)=>{let i=n().state,r=i[e];r&&(r.name=t,s({state:{...i,[e]:c(r)}}))},updateItemAttribute:(e,i,r)=>{if(!r||!t.includes(r))return;let d=n().state,l=d[e];if(l){if("section"!==l.type){let e=Date.now();l.dateModified=e}let t={...l,[r]:i};s({state:{...d,[e]:t}})}},updateAllItemAttribute:(e,t)=>{if("tag"!==e)return;let i=n().state,r={};for(let{uid:s,value:n}of t){let t=i[s];if(!t)continue;let d={...t,..."section"!==t.type&&{dateModified:Date.now()},[e]:n};r[s]=d}Object.keys(r).length>0&&s({state:{...i,...r}})},dismissPublishError:({uid:e,type:t})=>{let i=n().errorSectionList;if(!Array.isArray(i))return;let r=i.map(i=>i.uid===e&&i.type===t?{...i,isDismissed:!0}:i);s({errorSectionList:r})},setErrorSectionList:e=>s({errorSectionList:e}),setPasteError:e=>{if(!e){s({pasteError:null});return}let{getItem:t,getParents:i}=n(),r=o({detail:e,target:t(e.uid),parents:i(e.uid)});s({pasteError:r})},setActiveComponentDetail:e=>{let t=n().pasteError,i=!!t&&e?.componentUid!==t.uid;s({activeComponentDetail:e,...i&&{pasteError:null}})}})),v=({children:t,state:i,isThemeSectionEditor:r,pageName:a,lazy:o,...c})=>{let u=o?d:l,p=s(()=>y(i,a,r),[i,r,a]);return n(()=>{let e=e=>{let t=e.detail??null;p.getState().setActiveComponentDetail(t)},t=e=>{let t=e.detail??null;p.getState().setPasteError(t)};return window.addEventListener("editor:active-component",e),window.addEventListener("editor:paste-error",t),()=>{window.removeEventListener("editor:active-component",e),window.removeEventListener("editor:paste-error",t)}},[p]),e(u,{children:e(h.Provider,{...c,value:p,children:t})})},O=(e,t)=>{let r=i(h);if(!r)throw Error("useBuilderPreviewStore must be used within a BuilderPreviewProvider");return u(r,e,t)};export{v as BuilderPreviewProvider,O as useBuilderPreviewStore};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let e="local"===process.env.NEXT_CONVERT_ENV,s=process.env.GP_BASE_ASSET_URL||"https://assets.gemcommerce.com";export{s as baseAssetURL,e as isLocalEnv};
|
|
1
|
+
let e="local"===process.env.NEXT_CONVERT_ENV,s=process.env.GP_BASE_ASSET_URL||"https://assets.gemcommerce.com",c="true"===process.env.IS_LIQUID;export{c as IS_LIQUID,s as baseAssetURL,e as isLocalEnv};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e={SECTION_SIZE_EXCEED_256KB:1,LIQUID_SYNTAX_ERROR:2,MISSING_SECTION_IN_THEME:3},i=e=>{if("undefined"==typeof document)return!1;let i=document.querySelectorAll(`[data-uid="${e}"]`);return Array.from(i).some(e=>e.getClientRects().length>0)},t=e=>"ROOT"!==e.uid&&"section"!==e.type&&i(e.uid),r=e=>!("section"!==e.type&&e.editorConfigs?.toolbar?.hide)&&t(e),d=({detail:e,target:i,parents:d})=>{let o=i?[i,...d]:d;return{uid:e.uid,message:e.message,anchorUid:o.find(r)?.uid,positionUid:o.find(t)?.uid,sectionUid:o.find(e=>"Section"===e.tag)?.uid}},o=({list:i,uid:t})=>{if(i)return i.filter(e=>e.uid===t&&!e.isDismissed).sort((i,t)=>e[t.type]-e[i.type])[0]};export{o as getVisiblePublishError,d as resolvePasteErrorInfo};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ProductVariantsDocument as e}from"../../graphql/queries/product-variants.generated.js";import{CollectionDetailFilterDocument as r}from"../../graphql/queries/collection-detail-filter.generated.js";import"../../graphql/queries/collection.generated.js";import"../../graphql/queries/collections.generated.js";import"../../graphql/queries/published-theme-pages.generated.js";import"../../graphql/queries/store-property.generated.js";import"../../graphql/queries/preview-page.generated.js";import"../../graphql/queries/published-shop-metas.generated.js";import"../../graphql/queries/shop-shopify.generated.js";import"../../graphql/queries/articles.generated.js";import"../../graphql/queries/blogs.generated.js";import"../../graphql/queries/products-with-selling-plans.generated.js";import"../../graphql/queries/product-variant-with-selling-plans.generated.js";import{isDefined as t}from"../is-defined.js";let o=async(e,r)=>{let t=await d(e,r);if(!t)throw Error("collections not found");let o=await a(e,t,r.isSample);return o},s=async(e,t)=>e([r.toString(),t]),i=(e,r,t)=>{let o=e-t*r;return e<t?e:o>0?t:t+o},n=(e,r)=>{let t=[],o=0;for(;o<e.length;)t.push(e.slice(o,r+o)),o+=r;return t},d=async(e,r)=>{let t,o,n,d,a;let l=1;if(r.numberOfProducts){let c=Math.ceil(r.numberOfProducts/8);for(;l<=c&&!1!==d;){t={firstVariant:1,firstMedia:30,orderBy:{field:"
|
|
1
|
+
import{ProductVariantsDocument as e}from"../../graphql/queries/product-variants.generated.js";import{CollectionDetailFilterDocument as r}from"../../graphql/queries/collection-detail-filter.generated.js";import"../../graphql/queries/collection.generated.js";import"../../graphql/queries/collections.generated.js";import"../../graphql/queries/published-theme-pages.generated.js";import"../../graphql/queries/store-property.generated.js";import"../../graphql/queries/preview-page.generated.js";import"../../graphql/queries/published-shop-metas.generated.js";import"../../graphql/queries/shop-shopify.generated.js";import"../../graphql/queries/articles.generated.js";import"../../graphql/queries/blogs.generated.js";import"../../graphql/queries/products-with-selling-plans.generated.js";import"../../graphql/queries/product-variant-with-selling-plans.generated.js";import{isDefined as t}from"../is-defined.js";let o=async(e,r)=>{let t=await d(e,r);if(!t)throw Error("collections not found");let o=await a(e,t,r.isSample);return o},s=async(e,t)=>e([r.toString(),t]),i=(e,r,t)=>{let o=e-t*r;return e<t?e:o>0?t:t+o},n=(e,r)=>{let t=[],o=0;for(;o<e.length;)t.push(e.slice(o,r+o)),o+=r;return t},d=async(e,r)=>{let t,o,n,d,a;let l=1;if(r.numberOfProducts){let c=Math.ceil(r.numberOfProducts/8),p=!r.id||"latest"===r.id.toLowerCase();for(;l<=c&&!1!==d;){t={firstVariant:1,firstMedia:30,orderBy:{field:"PLATFORM_UPDATED_AT",direction:"DESC"},orderByMedia:{field:"POSITION",direction:"ASC"},firstProduct:i(r.numberOfProducts,l,8),...p?{where:{hasCollectionProducts:!0,isSample:r.isSample}}:{where:{baseID:r.id}},orderByProduct:function(e){switch(e){case"TITLE_ASC":case"none":default:return{direction:"ASC",field:"TITLE"};case"TITLE_DESC":return{direction:"DESC",field:"TITLE"};case"CREATED_AT_ASC":return{direction:"ASC",field:"CREATED_AT"};case"CREATED_AT_DESC":return{direction:"DESC",field:"CREATED_AT"}}}(r.orderBy),whereProduct:{status:"ACTIVE",...r.isStorefront&&{isStorefront:r.isStorefront},isSample:r.isSample},...o?{productsAfter:o}:void 0};let c=await s(e,t);if(o=c?.collections?.edges?.[0]?.node?.products?.pageInfo?.endCursor,1===l?(n=c,a=n?.collections?.edges?.[0]):a?.node?.products&&c?.collections?.edges?.[0]?.node?.products?.edges&&(a.node.products={pageInfo:c?.collections?.edges?.[0]?.node?.products?.pageInfo,edges:a.node?.products?.edges.concat(c?.collections?.edges?.[0]?.node?.products?.edges)}),l++,!a?.node?.products?.pageInfo?.hasNextPage){d=!1;break}}return n}},a=async(e,r,o)=>{let s=r?.collections?.edges?.[0]?.node;if(!s)return r;let i=s?.products?.edges,n=i?.map(e=>e?.node?.baseID).filter(t),d=await l(e,{ids:n,isSample:o}),a=i?.map(e=>{let r=d?.variants?.edges?.filter(r=>r?.node?.id===e?.node?.id);return{...e,node:e.node?{...e.node,variants:e.node?.variants?{...e.node?.variants,edges:r?.[0]?.node?.variants?.edges??e.node?.variants.edges??[]}:void 0}:void 0}})??[],c={...r,collections:{edges:[{node:{...s,products:{edges:a}},cursor:void 0}]}};return c},l=async(r,{ids:t,isSample:o,isStorefront:s})=>{let i=n(t??[],8),d=async t=>{try{return await r([e.toString(),{...t,orderByVariant:{field:"POSITION",direction:"ASC"}}])}catch{return{}}},a=i.map(e=>{let r={firstVariant:100,first:e.length,orderBy:{field:"TITLE",direction:"ASC"},where:{status:"ACTIVE",isSample:o,...s&&{isStorefront:s},...e.length&&{baseIDIn:e.sort()}}};return d(r)}),l=await Promise.all(a),c=l?.reduce((e,r)=>e.concat(r?.variants?.edges??[]),[]);return{variants:{edges:c}}};export{i as calculateFirstProduct,o as getCollection};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getSingleColorVariable as e}from"./colors.js";import{getShortName as t}from"./get-shortname.js";import{stateMapping as o}from"./constant.js";let a=e=>{let t=e.match(
|
|
1
|
+
import{getSingleColorVariable as e}from"./colors.js";import{getShortName as t}from"./get-shortname.js";import{stateMapping as o}from"./constant.js";let a=e=>{let t=e.trim().match(/^([+-]?(?:\d+\.?\d*|\.\d+))([a-z%]+)$/i);if(t&&3===t.length){let e=Number(t[1]??0),o=t[2];return{value:e,unit:o??"px"}}return{value:0,unit:"px"}},l=(l,n=!1)=>{let{styleAppliedFor:s,value:r,isEnableShadow:i}=l||{},{state:b}=l||{};if(b||(b="normal"),!s||!r)return{};let p="none"===r.type||!1===r.enable;if(void 0===r.distance&&!p)return{};let{value:d,unit:m}=a(`${r?.distance}`);return{[`-${n?"":o?.[b]||""}-${t(s)}${l.screen?`-${l.screen}`:""}`]:i&&!p?`${Math.cos(parseFloat(`${r?.angle}`)*Math.PI/180)*parseFloat(`${d}`)}${m} ${Math.sin(parseFloat(`${r?.angle}`)*Math.PI/180)*parseFloat(`${d}`)}${m} ${r?.blur} ${"box-shadow"===s?r?.spread+" ":""}${e(r?.color)}`:"none"}},n=(e,t,o,a)=>{if(!e||!t)return{};let n={};for(let[s,r]of Object.entries(e))Object.assign(n,l({value:r,state:s,styleAppliedFor:t,isEnableShadow:o?.[s],screen:a??""}));return n},s=(e,t,o)=>{if(e&&("desktop"in e||"tablet"in e||"mobile"in e))return{...n(e.desktop,t,o.desktop),...e.tablet&&(o.tablet??o.desktop)?n(e.tablet,t,o.tablet??o.desktop,"tablet"):void 0,...e.mobile&&(o.mobile??o.tablet??o.desktop)?n(e.mobile,t,o.mobile??o.tablet??o.desktop,"mobile"):void 0}},r=(e,t,o)=>{if(e&&("desktop"in e||"tablet"in e||"mobile"in e))return{...l({value:e.desktop,styleAppliedFor:t,isEnableShadow:o.desktop}),...e.tablet&&(o.tablet??o.desktop)?l({value:e.tablet,styleAppliedFor:t,isEnableShadow:o.tablet??o.desktop,screen:"tablet"}):void 0,...e.mobile&&(o.mobile??o.tablet??o.desktop)?l({value:e.mobile,styleAppliedFor:t,isEnableShadow:o.mobile??o.tablet??o.desktop,screen:"mobile"}):void 0}},i=e=>({...n(e?.desktop,"box-shadow",{normal:e?.desktop?.normal?.type!=="none",focus:e?.desktop?.focus?.type!=="none",hover:e?.desktop?.hover?.type!=="none"}),...n(e?.tablet,"box-shadow",{normal:e?.tablet?.normal?.type!=="none",focus:e?.tablet?.focus?.type!=="none",hover:e?.tablet?.hover?.type!=="none"},"tablet"),...n(e?.mobile,"box-shadow",{normal:e?.mobile?.normal?.type!=="none",focus:e?.mobile?.focus?.type!=="none",hover:e?.mobile?.hover?.type!=="none"},"mobile")}),b=({hasBoxShadow:t,boxShadowValue:o,important:l})=>{if(!t||!o)return;let{value:n,unit:s}=a(`${o?.distance}`);return`box-shadow: ${Math.cos(parseFloat(`${o?.angle}`)*Math.PI/180)*parseFloat(`${n}`)}${s} ${Math.sin(parseFloat(`${o?.angle}`)*Math.PI/180)*parseFloat(`${n}`)}${s} ${o?.blur} ${o?.spread+" "}${e(o?.color)}${l?" !important":""};`};export{i as composeShadow,b as composeShadowCss,s as getResponsiveStyleShadow,r as getResponsiveStyleShadowWithoutState,l as getStyleShadow,n as getStyleShadowState,a as parseValueWithUnit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ProductOptionNameDocument as e}from"../graphql/queries/product-value-label.generated.js";import{colorPreset as r}from"../components/src/product/
|
|
1
|
+
import{ProductOptionNameDocument as e}from"../graphql/queries/product-value-label.generated.js";import{colorPreset as r}from"../components/src/product/common/variant-presets.js";import{useShopStore as t}from"../contexts/ShopContext.js";import{useFetchHandle as o}from"./useFetchHandle.js";import"react/jsx-runtime";import"react";import"zustand";import"../graphql/queries/articles.generated.js";import"../graphql/queries/blogs.generated.js";import i from"swr";import"@gem-sdk/adapter-shopify";import"swr/mutation";import{useSwatches as s}from"./shop.js";import"../graphql/queries/product-variants.generated.js";import"../graphql/queries/collection-detail-filter.generated.js";import"../graphql/queries/collection.generated.js";import"../graphql/queries/collections.generated.js";import"../graphql/queries/published-theme-pages.generated.js";import"../graphql/queries/store-property.generated.js";import"../graphql/queries/preview-page.generated.js";import"../graphql/queries/published-shop-metas.generated.js";import"../graphql/queries/shop-shopify.generated.js";import"../graphql/queries/products-with-selling-plans.generated.js";import"../graphql/queries/product-variant-with-selling-plans.generated.js";import"../graphql/queries/product-little-detail.generated.js";import"../graphql/queries/product-medias.generated.js";import"../graphql/queries/productsV2.generated.js";import"swr/infinite";import"vanilla-lazyload";import"./useCartUI.js";import"./useStickyStore.js";import"../types/builder.js";import"../types/custom.js";import"../types/animations.js";import"react-transition-group";import"../components/constant.js";import"@gem-sdk/core";import a from"../helpers/is-browser.js";import"../helpers/convert.js";import"crc-32";let p=!1,l=!1,n=e=>{let r=o(),n=t(e=>e.changeSwatches),{swatches:m}=s(),{data:u}=i(["/query/productOptionName",{productOptionName:[]}],async()=>d(r),{revalidateOnMount:!0}),c=[];if(m?.forEach(e=>{c.push(e.optionTitle)}),u?.productOptionName?.forEach(e=>{c.includes(e)||(p=!0,m?.push({optionTitle:e,optionType:"rectangle_list",optionValues:[]}))}),!e)return[];g(m,e),a()&&m?.length&&(p||l)&&(window?.parent?.postMessage?.(JSON.stringify({type:"update-swatches",swatches:m}),"*"),n(m)),p=!1},m=(e,t)=>{let o=e?r[e.toLocaleLowerCase()]:void 0,i=o?[o]:[],s=t?.[0];return!s&&i.length&&(l=!0),s?[s]:i},u=(e,r)=>{let t=[],o=e.find(e=>e.name===r);return o?.values.forEach(e=>{e.label&&!t.includes(e.label)&&t.push(e.label)}),t},c=e=>{let r=[];return e.forEach(e=>{e.label&&!r.includes(e.label)&&r.push(e.label)}),r},g=(e,r)=>(e&&e?.map(e=>{let t=u(r,e.optionTitle),o=c(e.optionValues);t.forEach(r=>{o.includes(r)||e.optionValues.push({label:r,colors:m(r),imageUrl:""})}),e.optionValues=e.optionValues.map(e=>(void 0===e.imageUrl&&(p=!0),{label:e.label??"",colors:m(e.label,e.colors),imageUrl:e.imageUrl??""}))}),e),d=async r=>{let t=async t=>{let o=await r([e.toString(),t]);return o};return t({})};export{n as default};
|
package/dist/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{RenderChildren,default as RenderLiquid,WrapRenderChildren}from"./components/Render.liquid.js";export{default as RenderPreview}from"./components/RenderPreview.js";export{default as Render}from"./components/Render.js";export{default as AddOn}from"./components/AddOn.js";export{BuilderPreviewProvider,useBuilderPreviewStore}from"./contexts/BuilderPreviewContext.js";export{BuilderComponentProvider,useBuilderComponent}from"./contexts/BuilderComponent.js";export{ProductListProvider,useProductListStore}from"./contexts/ProductListContext.js";export{ArticleListProvider,useArticleListStore}from"./contexts/ArticleListContext.js";export{CollectionProvider,useCollectionStore}from"./contexts/CollectionContext.js";export{CartLineProvider,useCartLineStore}from"./contexts/CartLineContext.js";export{SectionProvider,useSection,useSectionStore}from"./contexts/SectionContext.js";export{ProductProvider,useProductStore}from"./contexts/ProductContext.js";export{BuilderProvider,useBuilderStore}from"./contexts/BuilderContext.js";export{ArticleProvider,useArticleStore}from"./contexts/ArticleContext.js";export{ModalProvider,useModalStore}from"./contexts/ModalContext.js";export{AddonProvider,useAddon,useAddons}from"./contexts/AddonContext.js";export{ShopProvider,useShopStore}from"./contexts/ShopContext.js";export{PageProvider,usePageStore}from"./contexts/PageContext.js";export{I18nProvider,useI18nStore}from"./contexts/I18nContext.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{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{getResponsiveStateValue,getResponsiveValue,getResponsiveValueByScreen,isColumnDirectionExist}from"./helpers/get-resonsive-value.js";export{normalizeBuilderData}from"./helpers/normalize-builder-data.js";export{composeSpacing,getSpacingVariable}from"./helpers/spacing.js";export{default as filterToolbarPreview}from"./helpers/filter-toolbar-preview.js";export{flattenConnection}from"./helpers/flatten-connection.js";export{prefetchQueries}from"./helpers/prefetch-queries.js";export{default as isEmptyChildren}from"./helpers/is-empty-children.js";export{getShortName}from"./helpers/get-shortname.js";export{loadScript}from"./helpers/load-script.js";export{animations}from"./helpers/animations.js";export{default as globalEvent}from"./helpers/GlobalEvent.js";export{validateEmail}from"./helpers/email.js";export{default as isBrowser}from"./helpers/is-browser.js";export{default as isSafari}from"./helpers/is-safari.js";export{getProductQueryAll,getProducts}from"./helpers/queries/get-products.js";export{genVariable}from"./helpers/css-variable.js";import*as e from"./helpers/tracking/tiktokpixel.js";import*as o from"./helpers/tracking/fpixel.js";import*as t from"./helpers/tracking/gtag.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{checkHasChangeContent,createTranslateKey,extractOuterTagContent,getThemeSectionTranslateKey,getValueSettingFromSchema,replaceOuterTagContent}from"./helpers/createTranslateKey.js";export{getHashCode}from"./helpers/getHashCode.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{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{useSafeGetProductListSettings}from"./hooks/useProductList.js";export{RenderModeEnv}from"./types/builder.js";export{InteractionTargetEvent,InteractionTriggerEvent,SectionMode}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{BLACKLIST_TAGS}from"./constants/index.js";export{DEVICES,EMPTY_DEVICE_VALUE}from"./constants/device.js";export{PICKED_PRODUCT_STATUSES}from"./constants/product.js";export{e as tiktokpixel,o as fpixel,t as gtag,r as ShopType,s as AppAPIType};
|
|
1
|
+
export{RenderChildren,default as RenderLiquid,WrapRenderChildren}from"./components/Render.liquid.js";export{PasteErrorPageBanner}from"./components/toolbar/PasteErrorPageBanner.js";export{default as RenderPreview}from"./components/RenderPreview.js";export{default as Render}from"./components/Render.js";export{default as AddOn}from"./components/AddOn.js";export{BuilderPreviewProvider,useBuilderPreviewStore}from"./contexts/BuilderPreviewContext.js";export{BuilderComponentProvider,useBuilderComponent}from"./contexts/BuilderComponent.js";export{ProductListProvider,useProductListStore}from"./contexts/ProductListContext.js";export{ArticleListProvider,useArticleListStore}from"./contexts/ArticleListContext.js";export{CollectionProvider,useCollectionStore}from"./contexts/CollectionContext.js";export{CartLineProvider,useCartLineStore}from"./contexts/CartLineContext.js";export{SectionProvider,useSection,useSectionStore}from"./contexts/SectionContext.js";export{ProductProvider,useProductStore}from"./contexts/ProductContext.js";export{BuilderProvider,useBuilderStore}from"./contexts/BuilderContext.js";export{ArticleProvider,useArticleStore}from"./contexts/ArticleContext.js";export{ModalProvider,useModalStore}from"./contexts/ModalContext.js";export{AddonProvider,useAddon,useAddons}from"./contexts/AddonContext.js";export{ShopProvider,useShopStore}from"./contexts/ShopContext.js";export{PageProvider,usePageStore}from"./contexts/PageContext.js";export{I18nProvider,useI18nStore}from"./contexts/I18nContext.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{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{getResponsiveStateValue,getResponsiveValue,getResponsiveValueByScreen,isColumnDirectionExist}from"./helpers/get-resonsive-value.js";export{normalizeBuilderData}from"./helpers/normalize-builder-data.js";export{composeSpacing,getSpacingVariable}from"./helpers/spacing.js";export{default as filterToolbarPreview}from"./helpers/filter-toolbar-preview.js";export{flattenConnection}from"./helpers/flatten-connection.js";export{prefetchQueries}from"./helpers/prefetch-queries.js";export{default as isEmptyChildren}from"./helpers/is-empty-children.js";export{getShortName}from"./helpers/get-shortname.js";export{loadScript}from"./helpers/load-script.js";export{animations}from"./helpers/animations.js";export{default as globalEvent}from"./helpers/GlobalEvent.js";export{validateEmail}from"./helpers/email.js";export{default as isBrowser}from"./helpers/is-browser.js";export{default as isSafari}from"./helpers/is-safari.js";export{getProductQueryAll,getProducts}from"./helpers/queries/get-products.js";export{genVariable}from"./helpers/css-variable.js";import*as e from"./helpers/tracking/tiktokpixel.js";import*as o from"./helpers/tracking/fpixel.js";import*as t from"./helpers/tracking/gtag.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{IS_LIQUID,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{checkHasChangeContent,createTranslateKey,extractOuterTagContent,getThemeSectionTranslateKey,getValueSettingFromSchema,replaceOuterTagContent}from"./helpers/createTranslateKey.js";export{getHashCode}from"./helpers/getHashCode.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{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{useSafeGetProductListSettings}from"./hooks/useProductList.js";export{RenderModeEnv}from"./types/builder.js";export{InteractionTargetEvent,InteractionTriggerEvent,SectionMode}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{BLACKLIST_TAGS}from"./constants/index.js";export{DEVICES,EMPTY_DEVICE_VALUE}from"./constants/device.js";export{FREE_PLANS,isFreePlan}from"./constants/plan.js";export{LIST_IMAGE_LIQUID_VARS}from"./constants/listImage.js";export{PICKED_PRODUCT_STATUSES}from"./constants/product.js";export{e as tiktokpixel,o as fpixel,t as gtag,r as ShopType,s as AppAPIType};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e={ProductImagesV3:{allowDomainList:["stephen-gems.myshopify.com"],newElementTag:"ProductImagesV3Embla"}};export{e as ALLOW_BETA_TRY_OUT_MAP};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ALLOW_BETA_TRY_OUT_MAP as e}from"../constants/config.js";let t=({elementTag:t,shopifyDomain:o})=>{if(!t)return;let n=e?.[t];if(n&&n.allowDomainList.includes(o))return n.newElementTag},o=({elementTag:e,components:o,pageContext:n})=>{let r=o?.[e||""],i=n?.shopifyDomain?.trim().toLocaleLowerCase();if(!i)return r;let l=t({shopifyDomain:i,elementTag:e});return l&&o?.[l]||r};export{o as resolveComponentTag};
|