@gem-sdk/core 1.14.0-dev.577 → 1.14.0-dev.579
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/theme-section/ThemeSectionStatus.js +1 -1
- package/dist/cjs/helpers/animations.js +1 -1
- package/dist/cjs/helpers/compose-advance-style.js +1 -1
- package/dist/cjs/hooks/animation/useAnimationConfig.js +1 -1
- package/dist/cjs/hooks/animation/useAnimationTarget.js +1 -1
- package/dist/cjs/hooks/animation/useApplyAnimation.js +1 -1
- package/dist/esm/components/ComponentToolbarPreview.js +1 -1
- package/dist/esm/components/theme-section/ThemeSectionStatus.js +1 -1
- package/dist/esm/helpers/animations.js +1 -1
- package/dist/esm/helpers/compose-advance-style.js +1 -1
- package/dist/esm/hooks/animation/useAnimationConfig.js +1 -1
- package/dist/esm/hooks/animation/useAnimationTarget.js +1 -1
- package/dist/esm/hooks/animation/useApplyAnimation.js +1 -1
- package/dist/types/index.d.ts +4 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var jsxRuntime=require("react/jsx-runtime"),react=require("react");require("zustand");var BuilderPreviewContext=require("../contexts/BuilderPreviewContext.js"),ShopContext=require("../contexts/ShopContext.js");require("@gem-sdk/adapter-shopify"),require("swr"),require("swr/mutation"),require("vanilla-lazyload"),require("../hooks/useCartUI.js");var CreateThemeSection=require("./theme-section/CreateThemeSection.js"),Tooltip=require("./toolbar/Tooltip.js"),ThemeSectionStatus=require("./theme-section/ThemeSectionStatus.js"),Resize=require("./resize/Resize.js");require("../helpers/convert.js");const SECTION_LIMIT=25,notVisible=e=>{let t=getComputedStyle(e).overflow;return"visible"!==t},isSection=e=>{let t=e.getAttribute("data-component-tag");return"Section"===t},ComponentToolbarPreview=({...e})=>{let t=e.isThemeSection,i=ShopContext.useShopStore(e=>e.pageType),o=BuilderPreviewContext.useBuilderPreviewStore(e=>e.getParents),n=BuilderPreviewContext.useBuilderPreviewStore(e=>e.getItem("ROOT")),r=BuilderPreviewContext.useBuilderPreviewStore(e=>e.isThemeSectionEditor),[l,a]=react.useState(null),[s,d]=react.useState(!1),[u,C]=react.useState(!1),[c,h]=react.useState([]),x=(e,t)=>{let i=c.length,o=e.getBoundingClientRect(),n=t.getBoundingClientRect();return o.top-n.top<36*i},m=(e,t)=>{let i=t||e;if(e&&!isSection(e))return notVisible(e)&&x(t,e)?e:e.parentElement?m(e.parentElement,i):void 0},p=react.useCallback(t=>{let i=t.detail;if(i?.componentUid==e.uid){let t=o(e.uid).filter(e=>!("ROOT"===e.uid||"Section"===e.tag&&r||e.editorConfigs?.toolbar?.hide||e.editorConfigs?.component?.noSetting)).slice(0,3);h(t)}else h([]),d(!1)},[h,o,e.uid,r]);if(react.useEffect(()=>(window.addEventListener("editor:active-component",p),()=>{window.removeEventListener("editor:active-component",p)}),[p]),"section"===e.type||e.editorConfigs?.toolbar?.hide)return null;let j=()=>n?.childrens?.length||0,v=()=>"Section"!==e.tag?-1:n?.childrens?.length?n.childrens.findIndex(t=>t==e.uid):-1,b=e=>{if(!c.length)return;let t=e?.target||null,i=t.closest("[data-toolbar-active]");if(!t||!i)return;if(s)C(!1),d(!1);else{let e=m(i,i);if(e)C(!0);else{let e=i.getBoundingClientRect();e.top<36*c.length?C(!0):C(!1)}d(!0)}let o=new CustomEvent("editor:toolbar:show-parents",{bubbles:!0,detail:{value:!s}});window.dispatchEvent(o)},g=i=>{i.preventDefault(),i.stopPropagation();let o=new CustomEvent("editor:toolbar:delete-component",{bubbles:!0,detail:{componentUid:e.uid,isThemeSection:t}});return window.dispatchEvent(o),!1},R=i=>{if(i.preventDefault(),i.stopPropagation(),j()>=25&&"Section"==e.tag)return!1;let o=new CustomEvent("editor:toolbar:duplicate-component",{bubbles:!0,detail:{componentUid:e.uid,isThemeSection:t}});return window.dispatchEvent(o),!1},w=()=>{let t=e.tag;if("IconListV2"===t)return"Item list";if("IconList"===t)return"Advanced list";let i=e.customLabel||e.label;return i},f=t=>{t.preventDefault(),t.stopPropagation();let i=new CustomEvent("editor:toolbar:zoom-out-component",{bubbles:!0,detail:{componentUid:e.uid}});return window.dispatchEvent(i),!1},S=()=>{a(null),window.removeEventListener("editor:close-add-section-popup",S)},T=(t,i)=>{if(t.preventDefault(),t.stopPropagation(),j()>=25)return!1;let o=t.target;if(o){a(i);let t=o.getBoundingClientRect(),n=new CustomEvent("editor:toolbar:add-section",{bubbles:!0,detail:{componentUid:e.uid,position:i,top:t.top+t.height/2}});window.dispatchEvent(n),window.addEventListener("editor:close-add-section-popup",S)}return!1},V=()=>{let t=e.name&&e.name===`Section ${e.uid}`;return j()>=20?t?"Section":`${e?.name} ${v()+1}/25`:t?`Section ${v()+1}`:e?.name};return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[!("Section"==e.tag&&r)&&jsxRuntime.jsxs("div",{"data-toolbar":!0,"data-toolbar-section":"Section"==e.tag,"data-toolbar-theme-section":"Section"==e.tag&&!!t||r,"data-toolbar-limit":v()>=25,children:[jsxRuntime.jsxs("div",{"data-toolbar-show-parent":!0,onClick:e=>b(e),"aria-hidden":"true",children:[jsxRuntime.jsx("div",{"data-toolbar-icon-drag":!0,children:jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[jsxRuntime.jsx("path",{d:"M5.5 4.5C6.32843 4.5 7 3.82843 7 3C7 2.17157 6.32843 1.5 5.5 1.5C4.67157 1.5 4 2.17157 4 3C4 3.82843 4.67157 4.5 5.5 4.5Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M5.5 9.5C6.32843 9.5 7 8.82843 7 8C7 7.17157 6.32843 6.5 5.5 6.5C4.67157 6.5 4 7.17157 4 8C4 8.82843 4.67157 9.5 5.5 9.5Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M7 13C7 13.8284 6.32843 14.5 5.5 14.5C4.67157 14.5 4 13.8284 4 13C4 12.1716 4.67157 11.5 5.5 11.5C6.32843 11.5 7 12.1716 7 13Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M10.5 4.5C11.3284 4.5 12 3.82843 12 3C12 2.17157 11.3284 1.5 10.5 1.5C9.67157 1.5 9 2.17157 9 3C9 3.82843 9.67157 4.5 10.5 4.5Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M12 8C12 8.82843 11.3284 9.5 10.5 9.5C9.67157 9.5 9 8.82843 9 8C9 7.17157 9.67157 6.5 10.5 6.5C11.3284 6.5 12 7.17157 12 8Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M10.5 14.5C11.3284 14.5 12 13.8284 12 13C12 12.1716 11.3284 11.5 10.5 11.5C9.67157 11.5 9 12.1716 9 13C9 13.8284 9.67157 14.5 10.5 14.5Z",fill:"currentColor"})]})}),"Section"==e.tag?jsxRuntime.jsx("div",{"data-toolbar-name":!0,children:V()}):jsxRuntime.jsx("div",{"data-toolbar-name":!0,children:w()}),"Section"!==e.tag&&c.length>0&&jsxRuntime.jsx("div",{"data-toolbar-icon-parent":!0,"data-toolbar-icon-parent-open":s,children:jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:jsxRuntime.jsx("path",{d:"M5.65522 10C5.07265 10 4.7809 9.22865 5.19284 8.77753L7.53762 6.20974C7.79298 5.93009 8.20702 5.93009 8.46238 6.20974L10.8072 8.77754C11.2191 9.22866 10.9274 10 10.3448 10H5.65522Z",fill:"currentColor"})})})]}),s&&c.map((e,t)=>{let i=e?.childrens?.length??0,o=e.label;return"Row"===e.label&&(o=i<=1?e.label+" "+i+" col":e.label+" "+i+" cols"),jsxRuntime.jsxs("div",{"data-toolbar-parent":!0,"data-parent-uid":e.uid,"data-toolbar-theme-section":r,"data-toolbar-parent-revert":u,style:{top:u?`${36*(t+1)}px`:`${-36*(t+1)}px`},children:[jsxRuntime.jsx("div",{"data-toolbar-icon-drag":!0,children:jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[jsxRuntime.jsx("path",{d:"M5.5 4.5C6.32843 4.5 7 3.82843 7 3C7 2.17157 6.32843 1.5 5.5 1.5C4.67157 1.5 4 2.17157 4 3C4 3.82843 4.67157 4.5 5.5 4.5Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M5.5 9.5C6.32843 9.5 7 8.82843 7 8C7 7.17157 6.32843 6.5 5.5 6.5C4.67157 6.5 4 7.17157 4 8C4 8.82843 4.67157 9.5 5.5 9.5Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M7 13C7 13.8284 6.32843 14.5 5.5 14.5C4.67157 14.5 4 13.8284 4 13C4 12.1716 4.67157 11.5 5.5 11.5C6.32843 11.5 7 12.1716 7 13Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M10.5 4.5C11.3284 4.5 12 3.82843 12 3C12 2.17157 11.3284 1.5 10.5 1.5C9.67157 1.5 9 2.17157 9 3C9 3.82843 9.67157 4.5 10.5 4.5Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M12 8C12 8.82843 11.3284 9.5 10.5 9.5C9.67157 9.5 9 8.82843 9 8C9 7.17157 9.67157 6.5 10.5 6.5C11.3284 6.5 12 7.17157 12 8Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M10.5 14.5C11.3284 14.5 12 13.8284 12 13C12 12.1716 11.3284 11.5 10.5 11.5C9.67157 11.5 9 12.1716 9 13C9 13.8284 9.67157 14.5 10.5 14.5Z",fill:"currentColor"})]})}),jsxRuntime.jsx("div",{"data-toolbar-name":!0,children:o})]},e.uid)}),"Section"===e.tag&&!e.isThemeSection&&"STATIC"!==i&&25>v()&&jsxRuntime.jsx(CreateThemeSection.CreateThemeSection,{...e}),"Sticky"==e.tag&&jsxRuntime.jsx("div",{"data-toolbar-zoom-out":!0,onClick:e=>f(e),"aria-hidden":"true",children:jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.5 7C14.7761 7 15 6.77614 15 6.5C15 6.22386 14.7761 6 14.5 6L10.7072 6L14.8536 1.85355C15.0489 1.65829 15.0489 1.34171 14.8536 1.14645C14.6584 0.951186 14.3418 0.951185 14.1465 1.14645L10 5.29297L10 1.5C10 1.22386 9.77614 1 9.5 1C9.22386 1 9 1.22386 9 1.5L9 6.5C9 6.77614 9.22386 7 9.5 7L14.5 7ZM6 10.7073L6 14.5C6 14.7761 6.22386 15 6.5 15C6.77614 15 7 14.7761 7 14.5L7 9.5C7 9.22386 6.77614 9 6.5 9H1.5C1.22386 9 1 9.22386 1 9.5C1 9.77614 1.22386 10 1.5 10H5.29306L1.14662 14.1464C0.951353 14.3417 0.951353 14.6583 1.14662 14.8536C1.34188 15.0488 1.65846 15.0488 1.85372 14.8536L6 10.7073Z",fill:"currentColor"})})}),jsxRuntime.jsx(Tooltip.default,{enable:"Section"==e.tag&&j()>=25,text:"Page has reached Shopify’s 25 section-limit",position:"bottom","data-toolbar-duplicate":!0,"data-toolbar-disable":"Section"==e.tag&&j()>=25,onClick:e=>R(e),"aria-hidden":"true",children:jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.08423 1.21289C5.53194 1.21289 5.08423 1.66061 5.08423 2.21289V3.78711H4.26172C3.43329 3.78711 2.76172 4.45868 2.76172 5.28711V13.2871C2.76172 14.1155 3.43329 14.7871 4.26172 14.7871H10.2617C11.0901 14.7871 11.7617 14.1155 11.7617 13.2871V12.4629H13.0842C13.6365 12.4629 14.0842 12.0152 14.0842 11.4629V2.21289C14.0842 1.66061 13.6365 1.21289 13.0842 1.21289H6.08423ZM10.7617 12.4629H6.08423C5.53194 12.4629 5.08423 12.0152 5.08423 11.4629V4.78711H4.26172C3.98558 4.78711 3.76172 5.01097 3.76172 5.28711V13.2871C3.76172 13.5633 3.98558 13.7871 4.26172 13.7871H10.2617C10.5379 13.7871 10.7617 13.5633 10.7617 13.2871V12.4629Z",fill:"currentColor"})})}),jsxRuntime.jsx("div",{"data-toolbar-delete":!0,onClick:e=>g(e),"aria-hidden":"true",children:jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 2.88965V2.38965C11 1.56122 10.3284 0.889648 9.5 0.889648H6.5C5.67157 0.889648 5 1.56122 5 2.38965V2.88965H2C1.72386 2.88965 1.5 3.11351 1.5 3.38965C1.5 3.66579 1.72386 3.88965 2 3.88965H3.21997V13.1099C3.21997 14.2144 4.1154 15.1099 5.21997 15.1099H11.22C12.3245 15.1099 13.22 14.2144 13.22 13.1099V3.88965H14C14.2761 3.88965 14.5 3.66579 14.5 3.38965C14.5 3.11351 14.2761 2.88965 14 2.88965H11ZM6 2.88965H10V2.38965C10 2.11351 9.77614 1.88965 9.5 1.88965H6.5C6.22386 1.88965 6 2.11351 6 2.38965V2.88965ZM6.24976 6.13965C6.66397 6.13965 6.99976 6.47543 6.99976 6.88965V11.3896C6.99976 11.8039 6.66397 12.1396 6.24976 12.1396C5.83554 12.1396 5.49976 11.8039 5.49976 11.3896V6.88965C5.49976 6.47543 5.83554 6.13965 6.24976 6.13965ZM10.4998 6.88965C10.4998 6.47543 10.164 6.13965 9.74976 6.13965C9.33554 6.13965 8.99976 6.47543 8.99976 6.88965V11.3896C8.99976 11.8039 9.33554 12.1396 9.74976 12.1396C10.164 12.1396 10.4998 11.8039 10.4998 11.3896V6.88965Z",fill:"currentColor"})})})]}),"STATIC"!==i&&25>v()&&jsxRuntime.jsx(ThemeSectionStatus.ThemeSectionStatus,{...e}),jsxRuntime.jsx("div",{"data-outline":!0,"data-outline-section":"Section"==e.tag,"data-outline-theme-section":"Section"==e.tag&&!!t||r,"data-outline-limit":v()>=25}),"Section"==e.tag&&!r&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Tooltip.default,{enable:j()>=25,text:"Page has reached Shopify’s 25 section-limit",position:"top","data-toolbar-add-top":!0,"data-toolbar-disable":j()>=25,"data-toolbar-add-open":"above"==l,onClick:e=>T(e,"above"),"aria-hidden":"true",children:jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:jsxRuntime.jsx("path",{d:"M8.45 3.95C8.45 3.70147 8.24853 3.5 8 3.5C7.75147 3.5 7.55 3.70147 7.55 3.95V7.55H3.95C3.70147 7.55 3.5 7.75147 3.5 8C3.5 8.24853 3.70147 8.45 3.95 8.45H7.55V12.05C7.55 12.2985 7.75147 12.5 8 12.5C8.24853 12.5 8.45 12.2985 8.45 12.05V8.45H12.05C12.2985 8.45 12.5 8.24853 12.5 8C12.5 7.75147 12.2985 7.55 12.05 7.55H8.45V3.95Z",fill:"#212121"})})}),jsxRuntime.jsx(Tooltip.default,{enable:j()>=25,text:"Page has reached Shopify’s 25 section-limit",position:"top","data-toolbar-add-bottom":!0,"data-toolbar-disable":j()>=25,"data-toolbar-add-open":"below"==l,onClick:e=>T(e,"below"),"aria-hidden":"true",children:jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:jsxRuntime.jsx("path",{d:"M8.45 3.95C8.45 3.70147 8.24853 3.5 8 3.5C7.75147 3.5 7.55 3.70147 7.55 3.95V7.55H3.95C3.70147 7.55 3.5 7.75147 3.5 8C3.5 8.24853 3.70147 8.45 3.95 8.45H7.55V12.05C7.55 12.2985 7.75147 12.5 8 12.5C8.24853 12.5 8.45 12.2985 8.45 12.05V8.45H12.05C12.2985 8.45 12.5 8.24853 12.5 8C12.5 7.75147 12.2985 7.55 12.05 7.55H8.45V3.95Z",fill:"#212121"})})})]}),jsxRuntime.jsx(Resize.default,{...e})]})};exports.ComponentToolbarPreview=ComponentToolbarPreview;
|
|
1
|
+
"use strict";var jsxRuntime=require("react/jsx-runtime"),react=require("react");require("zustand");var BuilderPreviewContext=require("../contexts/BuilderPreviewContext.js"),ShopContext=require("../contexts/ShopContext.js");require("@gem-sdk/adapter-shopify"),require("swr"),require("swr/mutation"),require("vanilla-lazyload"),require("../hooks/useCartUI.js");var CreateThemeSection=require("./theme-section/CreateThemeSection.js"),Tooltip=require("./toolbar/Tooltip.js"),ThemeSectionStatus=require("./theme-section/ThemeSectionStatus.js"),Resize=require("./resize/Resize.js");require("../helpers/convert.js");const SECTION_LIMIT=25,notVisible=e=>{let t=getComputedStyle(e).overflow;return"visible"!==t},isSection=e=>{let t=e.getAttribute("data-component-tag");return"Section"===t},ComponentToolbarPreview=({...e})=>{let t=e.isThemeSection,i=ShopContext.useShopStore(e=>e.pageType),o=BuilderPreviewContext.useBuilderPreviewStore(e=>e.getParents),n=BuilderPreviewContext.useBuilderPreviewStore(e=>e.getItem("ROOT")),r=BuilderPreviewContext.useBuilderPreviewStore(e=>e.isThemeSectionEditor),[l,a]=react.useState(null),[s,d]=react.useState(!1),[u,C]=react.useState(!1),[c,h]=react.useState([]),x=(e,t)=>{let i=c.length,o=e.getBoundingClientRect(),n=t.getBoundingClientRect();return o.top-n.top<36*i},m=(e,t)=>{let i=t||e;if(e&&!isSection(e))return notVisible(e)&&x(t,e)?e:e.parentElement?m(e.parentElement,i):void 0},p=react.useCallback(t=>{let i=t.detail;if(i?.componentUid==e.uid){let t=o(e.uid).filter(e=>!("ROOT"===e.uid||"Section"===e.tag&&r||e.editorConfigs?.toolbar?.hide||e.editorConfigs?.component?.noSetting)).slice(0,3);h(t)}else h([]),d(!1)},[h,o,e.uid,r]);if(react.useEffect(()=>(window.addEventListener("editor:active-component",p),()=>{window.removeEventListener("editor:active-component",p)}),[p]),"section"===e.type||e.editorConfigs?.toolbar?.hide)return null;let j=()=>n?.childrens?.length||0,v=()=>"Section"!==e.tag?-1:n?.childrens?.length?n.childrens.findIndex(t=>t==e.uid):-1,b=e=>{if(!c.length)return;let t=e?.target||null,i=t.closest("[data-toolbar-active]");if(!t||!i)return;if(s)C(!1),d(!1);else{let e=m(i,i);if(e)C(!0);else{let e=i.getBoundingClientRect();e.top<36*c.length?C(!0):C(!1)}d(!0)}let o=new CustomEvent("editor:toolbar:show-parents",{bubbles:!0,detail:{value:!s}});window.dispatchEvent(o)},g=i=>{i.preventDefault(),i.stopPropagation();let o=new CustomEvent("editor:toolbar:delete-component",{bubbles:!0,detail:{componentUid:e.uid,isThemeSection:t}});return window.dispatchEvent(o),!1},R=i=>{if(i.preventDefault(),i.stopPropagation(),j()>=25&&"Section"==e.tag)return!1;let o=new CustomEvent("editor:toolbar:duplicate-component",{bubbles:!0,detail:{componentUid:e.uid,isThemeSection:t}});return window.dispatchEvent(o),!1},w=()=>{let t=e.tag;if("IconListV2"===t)return"Item list";if("IconList"===t)return"Advanced list";let i=e.customLabel||e.label;return i},f=t=>{t.preventDefault(),t.stopPropagation();let i=new CustomEvent("editor:toolbar:zoom-out-component",{bubbles:!0,detail:{componentUid:e.uid}});return window.dispatchEvent(i),!1},S=()=>{a(null),window.removeEventListener("editor:close-add-section-popup",S)},T=(t,i)=>{if(t.preventDefault(),t.stopPropagation(),j()>=25)return!1;let o=t.target;if(o){a(i);let t=o.getBoundingClientRect(),n=new CustomEvent("editor:toolbar:add-section",{bubbles:!0,detail:{componentUid:e.uid,position:i,top:t.top+t.height/2}});window.dispatchEvent(n),window.addEventListener("editor:close-add-section-popup",S)}return!1},V=()=>{let t=e.name&&e.name===`Section ${e.uid}`;return j()>=20?`${t?"Section":e?.name} ${v()+1}/25`:t?`Section ${v()+1}`:e?.name};return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[!("Section"==e.tag&&r)&&jsxRuntime.jsxs("div",{"data-toolbar":!0,"data-toolbar-section":"Section"==e.tag,"data-toolbar-theme-section":"Section"==e.tag&&!!t||r,"data-toolbar-limit":v()>=25,children:[jsxRuntime.jsxs("div",{"data-toolbar-show-parent":!0,onClick:e=>b(e),"aria-hidden":"true",children:[jsxRuntime.jsx("div",{"data-toolbar-icon-drag":!0,children:jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[jsxRuntime.jsx("path",{d:"M5.5 4.5C6.32843 4.5 7 3.82843 7 3C7 2.17157 6.32843 1.5 5.5 1.5C4.67157 1.5 4 2.17157 4 3C4 3.82843 4.67157 4.5 5.5 4.5Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M5.5 9.5C6.32843 9.5 7 8.82843 7 8C7 7.17157 6.32843 6.5 5.5 6.5C4.67157 6.5 4 7.17157 4 8C4 8.82843 4.67157 9.5 5.5 9.5Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M7 13C7 13.8284 6.32843 14.5 5.5 14.5C4.67157 14.5 4 13.8284 4 13C4 12.1716 4.67157 11.5 5.5 11.5C6.32843 11.5 7 12.1716 7 13Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M10.5 4.5C11.3284 4.5 12 3.82843 12 3C12 2.17157 11.3284 1.5 10.5 1.5C9.67157 1.5 9 2.17157 9 3C9 3.82843 9.67157 4.5 10.5 4.5Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M12 8C12 8.82843 11.3284 9.5 10.5 9.5C9.67157 9.5 9 8.82843 9 8C9 7.17157 9.67157 6.5 10.5 6.5C11.3284 6.5 12 7.17157 12 8Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M10.5 14.5C11.3284 14.5 12 13.8284 12 13C12 12.1716 11.3284 11.5 10.5 11.5C9.67157 11.5 9 12.1716 9 13C9 13.8284 9.67157 14.5 10.5 14.5Z",fill:"currentColor"})]})}),"Section"==e.tag?jsxRuntime.jsx("div",{"data-toolbar-name":!0,children:V()}):jsxRuntime.jsx("div",{"data-toolbar-name":!0,children:w()}),"Section"!==e.tag&&c.length>0&&jsxRuntime.jsx("div",{"data-toolbar-icon-parent":!0,"data-toolbar-icon-parent-open":s,children:jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:jsxRuntime.jsx("path",{d:"M5.65522 10C5.07265 10 4.7809 9.22865 5.19284 8.77753L7.53762 6.20974C7.79298 5.93009 8.20702 5.93009 8.46238 6.20974L10.8072 8.77754C11.2191 9.22866 10.9274 10 10.3448 10H5.65522Z",fill:"currentColor"})})})]}),s&&c.map((e,t)=>{let i=e?.childrens?.length??0,o=e.label;return"Row"===e.label&&(o=i<=1?e.label+" "+i+" col":e.label+" "+i+" cols"),jsxRuntime.jsxs("div",{"data-toolbar-parent":!0,"data-parent-uid":e.uid,"data-toolbar-theme-section":r,"data-toolbar-parent-revert":u,style:{top:u?`${36*(t+1)}px`:`${-36*(t+1)}px`},children:[jsxRuntime.jsx("div",{"data-toolbar-icon-drag":!0,children:jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[jsxRuntime.jsx("path",{d:"M5.5 4.5C6.32843 4.5 7 3.82843 7 3C7 2.17157 6.32843 1.5 5.5 1.5C4.67157 1.5 4 2.17157 4 3C4 3.82843 4.67157 4.5 5.5 4.5Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M5.5 9.5C6.32843 9.5 7 8.82843 7 8C7 7.17157 6.32843 6.5 5.5 6.5C4.67157 6.5 4 7.17157 4 8C4 8.82843 4.67157 9.5 5.5 9.5Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M7 13C7 13.8284 6.32843 14.5 5.5 14.5C4.67157 14.5 4 13.8284 4 13C4 12.1716 4.67157 11.5 5.5 11.5C6.32843 11.5 7 12.1716 7 13Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M10.5 4.5C11.3284 4.5 12 3.82843 12 3C12 2.17157 11.3284 1.5 10.5 1.5C9.67157 1.5 9 2.17157 9 3C9 3.82843 9.67157 4.5 10.5 4.5Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M12 8C12 8.82843 11.3284 9.5 10.5 9.5C9.67157 9.5 9 8.82843 9 8C9 7.17157 9.67157 6.5 10.5 6.5C11.3284 6.5 12 7.17157 12 8Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M10.5 14.5C11.3284 14.5 12 13.8284 12 13C12 12.1716 11.3284 11.5 10.5 11.5C9.67157 11.5 9 12.1716 9 13C9 13.8284 9.67157 14.5 10.5 14.5Z",fill:"currentColor"})]})}),jsxRuntime.jsx("div",{"data-toolbar-name":!0,children:o})]},e.uid)}),"Section"===e.tag&&!e.isThemeSection&&"STATIC"!==i&&25>v()&&jsxRuntime.jsx(CreateThemeSection.CreateThemeSection,{...e}),"Sticky"==e.tag&&jsxRuntime.jsx("div",{"data-toolbar-zoom-out":!0,onClick:e=>f(e),"aria-hidden":"true",children:jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.5 7C14.7761 7 15 6.77614 15 6.5C15 6.22386 14.7761 6 14.5 6L10.7072 6L14.8536 1.85355C15.0489 1.65829 15.0489 1.34171 14.8536 1.14645C14.6584 0.951186 14.3418 0.951185 14.1465 1.14645L10 5.29297L10 1.5C10 1.22386 9.77614 1 9.5 1C9.22386 1 9 1.22386 9 1.5L9 6.5C9 6.77614 9.22386 7 9.5 7L14.5 7ZM6 10.7073L6 14.5C6 14.7761 6.22386 15 6.5 15C6.77614 15 7 14.7761 7 14.5L7 9.5C7 9.22386 6.77614 9 6.5 9H1.5C1.22386 9 1 9.22386 1 9.5C1 9.77614 1.22386 10 1.5 10H5.29306L1.14662 14.1464C0.951353 14.3417 0.951353 14.6583 1.14662 14.8536C1.34188 15.0488 1.65846 15.0488 1.85372 14.8536L6 10.7073Z",fill:"currentColor"})})}),jsxRuntime.jsx(Tooltip.default,{enable:"Section"==e.tag&&j()>=25,text:"Page has reached Shopify’s 25 section-limit",position:"bottom","data-toolbar-duplicate":!0,"data-toolbar-disable":"Section"==e.tag&&j()>=25,onClick:e=>R(e),"aria-hidden":"true",children:jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.08423 1.21289C5.53194 1.21289 5.08423 1.66061 5.08423 2.21289V3.78711H4.26172C3.43329 3.78711 2.76172 4.45868 2.76172 5.28711V13.2871C2.76172 14.1155 3.43329 14.7871 4.26172 14.7871H10.2617C11.0901 14.7871 11.7617 14.1155 11.7617 13.2871V12.4629H13.0842C13.6365 12.4629 14.0842 12.0152 14.0842 11.4629V2.21289C14.0842 1.66061 13.6365 1.21289 13.0842 1.21289H6.08423ZM10.7617 12.4629H6.08423C5.53194 12.4629 5.08423 12.0152 5.08423 11.4629V4.78711H4.26172C3.98558 4.78711 3.76172 5.01097 3.76172 5.28711V13.2871C3.76172 13.5633 3.98558 13.7871 4.26172 13.7871H10.2617C10.5379 13.7871 10.7617 13.5633 10.7617 13.2871V12.4629Z",fill:"currentColor"})})}),jsxRuntime.jsx("div",{"data-toolbar-delete":!0,onClick:e=>g(e),"aria-hidden":"true",children:jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 2.88965V2.38965C11 1.56122 10.3284 0.889648 9.5 0.889648H6.5C5.67157 0.889648 5 1.56122 5 2.38965V2.88965H2C1.72386 2.88965 1.5 3.11351 1.5 3.38965C1.5 3.66579 1.72386 3.88965 2 3.88965H3.21997V13.1099C3.21997 14.2144 4.1154 15.1099 5.21997 15.1099H11.22C12.3245 15.1099 13.22 14.2144 13.22 13.1099V3.88965H14C14.2761 3.88965 14.5 3.66579 14.5 3.38965C14.5 3.11351 14.2761 2.88965 14 2.88965H11ZM6 2.88965H10V2.38965C10 2.11351 9.77614 1.88965 9.5 1.88965H6.5C6.22386 1.88965 6 2.11351 6 2.38965V2.88965ZM6.24976 6.13965C6.66397 6.13965 6.99976 6.47543 6.99976 6.88965V11.3896C6.99976 11.8039 6.66397 12.1396 6.24976 12.1396C5.83554 12.1396 5.49976 11.8039 5.49976 11.3896V6.88965C5.49976 6.47543 5.83554 6.13965 6.24976 6.13965ZM10.4998 6.88965C10.4998 6.47543 10.164 6.13965 9.74976 6.13965C9.33554 6.13965 8.99976 6.47543 8.99976 6.88965V11.3896C8.99976 11.8039 9.33554 12.1396 9.74976 12.1396C10.164 12.1396 10.4998 11.8039 10.4998 11.3896V6.88965Z",fill:"currentColor"})})})]}),"STATIC"!==i&&25>v()&&jsxRuntime.jsx(ThemeSectionStatus.ThemeSectionStatusWrapper,{...e}),jsxRuntime.jsx("div",{"data-outline":!0,"data-outline-section":"Section"==e.tag,"data-outline-theme-section":"Section"==e.tag&&!!t||r,"data-outline-limit":v()>=25}),"Section"==e.tag&&!r&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Tooltip.default,{enable:j()>=25,text:"Page has reached Shopify’s 25 section-limit",position:"top","data-toolbar-add-top":!0,"data-toolbar-disable":j()>=25,"data-toolbar-add-open":"above"==l,onClick:e=>T(e,"above"),"aria-hidden":"true",children:jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:jsxRuntime.jsx("path",{d:"M8.45 3.95C8.45 3.70147 8.24853 3.5 8 3.5C7.75147 3.5 7.55 3.70147 7.55 3.95V7.55H3.95C3.70147 7.55 3.5 7.75147 3.5 8C3.5 8.24853 3.70147 8.45 3.95 8.45H7.55V12.05C7.55 12.2985 7.75147 12.5 8 12.5C8.24853 12.5 8.45 12.2985 8.45 12.05V8.45H12.05C12.2985 8.45 12.5 8.24853 12.5 8C12.5 7.75147 12.2985 7.55 12.05 7.55H8.45V3.95Z",fill:"#212121"})})}),jsxRuntime.jsx(Tooltip.default,{enable:j()>=25,text:"Page has reached Shopify’s 25 section-limit",position:"top","data-toolbar-add-bottom":!0,"data-toolbar-disable":j()>=25,"data-toolbar-add-open":"below"==l,onClick:e=>T(e,"below"),"aria-hidden":"true",children:jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:jsxRuntime.jsx("path",{d:"M8.45 3.95C8.45 3.70147 8.24853 3.5 8 3.5C7.75147 3.5 7.55 3.70147 7.55 3.95V7.55H3.95C3.70147 7.55 3.5 7.75147 3.5 8C3.5 8.24853 3.70147 8.45 3.95 8.45H7.55V12.05C7.55 12.2985 7.75147 12.5 8 12.5C8.24853 12.5 8.45 12.2985 8.45 12.05V8.45H12.05C12.2985 8.45 12.5 8.24853 12.5 8C12.5 7.75147 12.2985 7.55 12.05 7.55H8.45V3.95Z",fill:"#212121"})})})]}),jsxRuntime.jsx(Resize.default,{...e})]})};exports.ComponentToolbarPreview=ComponentToolbarPreview;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var jsxRuntime=require("react/jsx-runtime");const
|
|
1
|
+
"use strict";var jsxRuntime=require("react/jsx-runtime");const getStatusMessage=e=>{switch(e){case"DRAFT":return"This Theme Section is Draft. Publish page will also publish Theme Section.";case"NEED_PUBLISHING":return"Need to republish. Go to global edit and publish this section"}},ThemeSectionStatusWrapper=({tag:e,status:t,isThemeSection:s})=>{let i="Section"===e&&s&&("DRAFT"===t||"NEED_PUBLISHING"===t),n=getStatusMessage(t);return jsxRuntime.jsx(jsxRuntime.Fragment,{children:i&&jsxRuntime.jsxs("div",{"data-theme-section-status":!0,children:[jsxRuntime.jsx("div",{"data-theme-section-status-icon":!0,children:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15 8C15 11.866 11.866 15 8 15C4.13401 15 1 11.866 1 8C1 4.13401 4.13401 1 8 1C11.866 1 15 4.13401 15 8ZM8.4668 4.61597C8.4668 4.89211 8.24294 5.11597 7.9668 5.11597C7.69065 5.11597 7.4668 4.89211 7.4668 4.61597C7.4668 4.33982 7.69065 4.11597 7.9668 4.11597C8.24294 4.11597 8.4668 4.33982 8.4668 4.61597ZM6.91309 5.48633C6.63694 5.48633 6.41309 5.71019 6.41309 5.98633C6.41309 6.26247 6.63694 6.48633 6.91309 6.48633H7.56006V10.3839C7.56006 10.9362 8.00777 11.3839 8.56006 11.3839H9.57144C9.84758 11.3839 10.0714 11.1601 10.0714 10.8839C10.0714 10.6078 9.84758 10.3839 9.57144 10.3839H8.56006V6.48633C8.56006 5.93404 8.11234 5.48633 7.56006 5.48633H6.91309Z",fill:"#9144DA"})})}),n&&jsxRuntime.jsx("span",{"data-theme-section-status-text":!0,children:n})]})})};exports.ThemeSectionStatusWrapper=ThemeSectionStatusWrapper;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const EASING={ease:"cubic-bezier(0.46,0.03,0.52,0.96)","ease-in":"cubic-bezier(0.55,0.08,0.68,0.53)","ease-out":"cubic-bezier(0.46,0.03,0.52,0.96)",linear:"linear"},animations=()=>{let t=t=>{let r=JSON.parse(JSON.stringify(t)),e=["delay","speed","scale","intensity"];return e.forEach(t=>{if(!r?.[t])return;if("scale"===t){if(!r?.zoomDirection)throw TypeError("zoomDirection not found on zoom preset");let[e,a]=r?.scale?.in??[1,1],[n,i]=r?.scale?.out??[1,1];r[t]={in:[Number(e)/100,Number(a)/100],out:[Number(n)/100,Number(i)/100]};return}let e=Number(r?.[t]);if("delay"===t?r[t]=1e3*e:r[t]=e,!isFinite(e))throw TypeError(`${t} must be a number`)}),r},r=(r,e)=>{let n=t(e),{direction:i,distance:o}=n,l=["left","right"].includes(i??"")?"X":"Y",m=["left","down"].includes(i??"")?"-":"",f=[{opacity:0,transform:`translate${l}(${m}${o??
|
|
1
|
+
"use strict";const EASING={ease:"cubic-bezier(0.46,0.03,0.52,0.96)","ease-in":"cubic-bezier(0.55,0.08,0.68,0.53)","ease-out":"cubic-bezier(0.46,0.03,0.52,0.96)",linear:"linear"},animations=()=>{let t=t=>{let r=JSON.parse(JSON.stringify(t)),e=["delay","speed","scale","intensity"];return e.forEach(t=>{if(!r?.[t])return;if("scale"===t){if(!r?.zoomDirection)throw TypeError("zoomDirection not found on zoom preset");let[e,a]=r?.scale?.in??[1,1],[n,i]=r?.scale?.out??[1,1];r[t]={in:[Number(e)/100,Number(a)/100],out:[Number(n)/100,Number(i)/100]};return}let e=Number(r?.[t]);if("delay"===t?r[t]=1e3*e:r[t]=e,!isFinite(e))throw TypeError(`${t} must be a number`)}),r},r=(r,e)=>{let n=t(e),{direction:i,distance:o}=n,l=["left","right"].includes(i??"")?"X":"Y",m=["left","down"].includes(i??"")?"-":"",f=[{opacity:0,transform:`translate${l}(${m}${o??50}%)`},{opacity:1,transform:`translate${l}(0)`}];return s(r,f,{...a(n,500)})},e=(r,e)=>{let n=t(e),i=[{opacity:0},{opacity:1}];return s(r,i,{...a(n,500)})},a=(t,r)=>{let e=t=>t?1.5/t*1e3:r,{loop:a,delay:n,speed:i,easing:o}=t??{},s=e(i),l=n??0,m=a?s+l:s;return{iterations:a?1/0:1,duration:m,delay:l,easing:EASING[o??"linear"]}},n=(r,e)=>{let n=t(e),{scale:i,zoomDirection:o,isFade:l}=n,[m,f]=i.in,[u,c]=i.out,p=[{transform:`scale(${m}, ${m})`,opacity:l?0:1},{transform:`scale(${f??1.2}, ${f??1.2})`,opacity:1}],d=[{transform:`scale(${u}, ${u})`,opacity:l?0:1},{transform:`scale(${c??.8}, ${c??.8})`,opacity:1}],y="in"===o?p:d;return s(r,y,{...a(n,700)})},i=(t,r,e)=>{if(!r)return t;let a=r/e,n=[...t].pop();return[...t,{...n,offset:1-a}]},o=(r,e)=>{let n=t(e),{intensity:i}=n??{},o=[{transform:"translate3d(0, 0, 0)"}],l=[{transform:"translate3d(4px, 0, 0)"},{transform:"translate3d(-4px, 0, 0)"},{transform:"translate3d(4px, 0, 0)"}],m=[];Array.from(Array(i??1).keys()).forEach(()=>{m=[...m,...l]});let f=[{transform:"translate3d(-1px, 0, 0)"},{transform:"translate3d(2px, 0, 0)"},{transform:"translate3d(-4px, 0, 0)"},...m,{transform:"translate3d(-4px, 0, 0)"},{transform:"translate3d(2px, 0, 0)"},{transform:"translate3d(-1px, 0, 0)"}];return s(r,i?f:o,{...a(n??{},820)})},s=(t,r,e)=>{let a=new KeyframeEffect(t,e.iterations&&1===e.iterations?r:i(r,e?.delay??0,e?.duration??0),{...e});return new Animation(a,document.timeline)};return{zoom:n,shake:o,fade:e,slide:r}};exports.animations=animations;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var borders=require("./borders.js"),colors=require("./colors.js"),constant=require("./constant.js"),makeStyle=require("./make-style.js"),radius=require("./radius.js"),shadow=require("./shadow.js");const composeSpacing=({source:e,spacing:o,type:s,suffix:a=""})=>{let{top:t,left:r,bottom:
|
|
1
|
+
"use strict";var borders=require("./borders.js"),colors=require("./colors.js"),constant=require("./constant.js"),makeStyle=require("./make-style.js"),radius=require("./radius.js"),shadow=require("./shadow.js");const composeSpacing=({source:e,spacing:o,type:s,suffix:a=""})=>{let{top:t,left:r,bottom:i,right:c}=o;t&&(e[`--${s}t${a}`]=t),r&&(e[`--${s}l${a}`]=r),i&&(e[`--${s}b${a}`]=i),c&&(e[`--${s}r${a}`]=c)},composeSpacingV2=({source:e,spacing:o,suffix:s="",tag:a=""})=>{if(o&&o.margin){let{top:t,left:r,bottom:i,right:c}=o.margin;t&&(e[`--mt${s}`]=t),r&&(e[`--ml${s}`]=constant.layoutComponent.includes(a)&&"0px"===r?"auto":r),i&&(e[`--mb${s}`]=i),c&&(e[`--mr${s}`]=constant.layoutComponent.includes(a)&&"0px"===c?"auto":c)}if(o&&o.padding){let{top:a,left:t,bottom:r,right:i}=o.padding;a&&(e[`--pt${s}`]=a),t&&(e[`--pl${s}`]=t),r&&(e[`--pb${s}`]=r),i&&(e[`--pr${s}`]=i)}},getAttrValue=(e,o,s)=>{if(null!=o)switch(e){case"bgc":case"c":return colors.isColor(o.toString())?o:`var(--g-c-${o})`;case"d":if(!o)return"none";if(o&&s&&constant.layoutComponent.includes(s))return"grid";return"block";default:return o}};function composeAdvanceStyle(e,o){if(!e)return{};let s={"--pos":"relative"},a=["desktop","tablet","mobile"],t=["hover","normal"];return Object.keys(e).forEach(r=>{let i=e[r];if("cssClass"===r||null==i)return;let c=e.hasBoxShadow?e.hasBoxShadow:{};if("object"==typeof i){if(Array.isArray(i))return;Object.keys(i).forEach(n=>{if(a.includes(n)){let e=i[n];if(void 0!==e){if("border"===r&&Object.assign(s,borders.handleConvertBorderStyle(i),borders.handleConvertBorderWidth(i),borders.handleConvertBorderColor(i)),"rounded"===r&&Object.assign(s,radius.composeRadius(i)),"pos"==r&&"static"==e&&(e="relative"),"desktop"===n)switch(r){case"padding":composeSpacing({source:s,spacing:e,type:"p"});break;case"margin":composeSpacing({source:s,spacing:e,type:"m"});break;case"spacing-setting":composeSpacingV2({source:s,spacing:e,tag:o});break;case"m":case"p":break;default:s[`--${r}`]=getAttrValue(r,e,o)}else switch(r){case"padding":composeSpacing({source:s,spacing:e,type:"p",suffix:`-${n}`});break;case"margin":composeSpacing({source:s,spacing:e,type:"m",suffix:`-${n}`});break;case"spacing-setting":composeSpacingV2({source:s,spacing:e,suffix:`-${n}`,tag:o});break;case"m":case"p":break;default:s[`--${r}-${n}`]=getAttrValue(r,e,o)}}}else if(t.includes(n))switch(r){case"hasBoxShadow":break;case"boxShadow":Object.assign(s,shadow.getStyleShadowState(i,"box-shadow",c))}else"border"===r&&("none"===i.border&&(i.border="solid",i.color="#121212",i.isCustom=!0,i.width="0px",i.position="all"),Object.assign(s,borders.getBorderStyle(i))),"rounded"===r&&Object.assign(s,radius.getCornerCSSFromGlobal(i)),"hasBoxShadow"===r&&Object.assign(s,shadow.getStyleShadow({value:e.boxShadow,styleAppliedFor:"box-shadow",isEnableShadow:e.hasBoxShadow})),"boxShadow"===r&&Object.assign(s,shadow.getStyleShadow({value:i,styleAppliedFor:"box-shadow",isEnableShadow:e.hasBoxShadow}))})}else s[`--${r}`]=getAttrValue(r,i,o),"hasBoxShadow"===r&&e.boxShadow&&Object.assign(s,shadow.getStyleShadow({value:e.boxShadow,styleAppliedFor:"box-shadow",isEnableShadow:e.hasBoxShadow}))}),s}const splitStyle=(e,o={})=>{let s=e.map(e=>makeStyle.makeStyleKey(e)).flat(),a=Object.keys(o).filter(e=>s.includes(e)),t=a.reduce((e,s)=>({...e,[s]:o[s]}),{}),r=Object.keys(o).filter(e=>!a.includes(e)).reduce((e,s)=>({...e,[s]:o[s]}),{});return[t,r]};exports.composeAdvanceStyle=composeAdvanceStyle,exports.splitStyle=splitStyle;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var react=require("react"),useCurrentDevice=require("../use-current-device.js");const useAnimationConfig=e=>{let n=useCurrentDevice.useCurrentDevice(),t=react.useMemo(()=>e?.advanced?.animation?.[n],[n,e?.advanced?.animation]),r=()=>{let{trigger:e,triggerConfig:n}=t,{animation:r,setting:i}=n[e];return{type:r,setting:i[r]}},i=t?.enabled;return{isEnabledAnimation:i,getAnimationConfig:r}};exports.useAnimationConfig=useAnimationConfig;
|
|
1
|
+
"use strict";var react=require("react"),useCurrentDevice=require("../use-current-device.js");const useAnimationConfig=e=>{let n=useCurrentDevice.useCurrentDevice(),t=react.useMemo(()=>e?.advanced?.animation?.[n],[n,e?.advanced?.animation]),r=react.useCallback(()=>{let{trigger:e,triggerConfig:n}=t,{animation:r,setting:i}=n[e];return{type:r,setting:i[r]}},[t]),i=t?.enabled;return{isEnabledAnimation:i,getAnimationConfig:r}};exports.useAnimationConfig=useAnimationConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var react=require("react"),useAnimationConfig=require("./useAnimationConfig.js");const SPACING_ACTIVE_ATTRIBUTE="data-spacing",TOOLBAR_ACTIVE_ATTRIBUTE="data-toolbar-active",OUTLINE_ACTIVE_ATTRIBUTE="data-outline-active",TOOLBAR_ADD_SECTION_ACTIVE_ATTRIBUTE="data-toolbar-add-active",useAnimationTarget=t=>{let{isEnabledAnimation:e}=useAnimationConfig.useAnimationConfig(t),r=t.tag,a=t.uid,o=react.useRef(null),u=react.useRef([]),T=t=>{if(u.current)for(let e of u.current)t?(e.toolbar?.setAttribute(TOOLBAR_ACTIVE_ATTRIBUTE,"true"),e.outline?.setAttribute(OUTLINE_ACTIVE_ATTRIBUTE,"true"),e.spacing?.setAttribute(SPACING_ACTIVE_ATTRIBUTE,"true"),e.addSectionTop?.setAttribute(TOOLBAR_ADD_SECTION_ACTIVE_ATTRIBUTE,"true"),e.addSectionBottom?.setAttribute(TOOLBAR_ADD_SECTION_ACTIVE_ATTRIBUTE,"true")):(e.toolbar?.removeAttribute(TOOLBAR_ACTIVE_ATTRIBUTE),e.outline?.removeAttribute(OUTLINE_ACTIVE_ATTRIBUTE),e.spacing?.removeAttribute(SPACING_ACTIVE_ATTRIBUTE),e.addSectionTop?.removeAttribute(TOOLBAR_ADD_SECTION_ACTIVE_ATTRIBUTE),e.addSectionBottom?.removeAttribute(TOOLBAR_ADD_SECTION_ACTIVE_ATTRIBUTE))},i=t=>{let e=t.querySelector("[data-toolbar-add-top]"),r=t.querySelector("[data-toolbar-add-bottom]"),a=Array.from(t.children),o=a.find(t=>null!==t.getAttribute("data-toolbar")),u=a.find(t=>null!==t.getAttribute("data-outline"));return{sectionToolbar:o,sectionOutline:u,sectionAddTop:e,sectionAddBottom:r}},n=react.useCallback(t=>t.reduce((t,e)=>{let a=null,o=null,u=e,T=e.querySelector("[data-toolbar][data-toolbar-active]"),n=e.querySelector("[data-outline][data-outline-active]"),A=Array.from(u.children),c=A.find(t=>null!==t.getAttribute("data-spacing"));switch(r){case"Button":case"SubmitButton":case"ProductButton":case"DynamicCheckout":u=e.querySelector("button");break;case"ProductProperties":u=e.querySelector("input");break;case"Icon":u=e.firstElementChild;break;case"ProductTag":u=e?.children[0]?.children[0];break;case"Section":{u=e;let{sectionOutline:t,sectionToolbar:r,sectionAddTop:A,sectionAddBottom:c}=i(u);n=t,T=r,a=A,o=c;break}default:u=e}let l={target:u,toolbar:T,outline:n,spacing:c,addSectionTop:a,addSectionBottom:o};return t.push(l),t},[]),[r]),A=react.useCallback(()=>{if(!e)return;o.current||(o.current=document.querySelectorAll(`[data-uid="${a}"]`));let t=Array.from(o.current);if(!t.length)return;let r=n(t);u.current=r},[a,n,e]);return
|
|
1
|
+
"use strict";var react=require("react"),useAnimationConfig=require("./useAnimationConfig.js");const SPACING_ACTIVE_ATTRIBUTE="data-spacing",TOOLBAR_ACTIVE_ATTRIBUTE="data-toolbar-active",OUTLINE_ACTIVE_ATTRIBUTE="data-outline-active",TOOLBAR_ADD_SECTION_ACTIVE_ATTRIBUTE="data-toolbar-add-active",useAnimationTarget=t=>{let{isEnabledAnimation:e}=useAnimationConfig.useAnimationConfig(t),r=t.tag,a=t.uid,o=react.useRef(null),u=react.useRef([]),T=t=>{if(u.current)for(let e of u.current)t?(e.toolbar?.setAttribute(TOOLBAR_ACTIVE_ATTRIBUTE,"true"),e.outline?.setAttribute(OUTLINE_ACTIVE_ATTRIBUTE,"true"),e.spacing?.setAttribute(SPACING_ACTIVE_ATTRIBUTE,"true"),e.addSectionTop?.setAttribute(TOOLBAR_ADD_SECTION_ACTIVE_ATTRIBUTE,"true"),e.addSectionBottom?.setAttribute(TOOLBAR_ADD_SECTION_ACTIVE_ATTRIBUTE,"true")):(e.toolbar?.removeAttribute(TOOLBAR_ACTIVE_ATTRIBUTE),e.outline?.removeAttribute(OUTLINE_ACTIVE_ATTRIBUTE),e.spacing?.removeAttribute(SPACING_ACTIVE_ATTRIBUTE),e.addSectionTop?.removeAttribute(TOOLBAR_ADD_SECTION_ACTIVE_ATTRIBUTE),e.addSectionBottom?.removeAttribute(TOOLBAR_ADD_SECTION_ACTIVE_ATTRIBUTE))},i=t=>{let e=t.querySelector("[data-toolbar-add-top]"),r=t.querySelector("[data-toolbar-add-bottom]"),a=Array.from(t.children),o=a.find(t=>null!==t.getAttribute("data-toolbar")),u=a.find(t=>null!==t.getAttribute("data-outline"));return{sectionToolbar:o,sectionOutline:u,sectionAddTop:e,sectionAddBottom:r}},n=react.useCallback(t=>t.reduce((t,e)=>{let a=null,o=null,u=e,T=e.querySelector("[data-toolbar][data-toolbar-active]"),n=e.querySelector("[data-outline][data-outline-active]"),A=Array.from(u.children),c=A.find(t=>null!==t.getAttribute("data-spacing"));switch(r){case"Button":case"SubmitButton":case"ProductButton":case"DynamicCheckout":u=e.querySelector(".gp-button-base");break;case"ProductProperties":u=e.querySelector("input");break;case"Icon":u=e.firstElementChild;break;case"ProductTag":u=e?.children[0]?.children[0];break;case"Section":{u=e;let{sectionOutline:t,sectionToolbar:r,sectionAddTop:A,sectionAddBottom:c}=i(u);n=t,T=r,a=A,o=c;break}default:u=e}let l={target:u,toolbar:T,outline:n,spacing:c,addSectionTop:a,addSectionBottom:o};return t.push(l),t},[]),[r]),A=react.useCallback(()=>{if(!e)return;o.current||(o.current=document.querySelectorAll(`[data-uid="${a}"]`));let t=Array.from(o.current);if(!t.length)return;let r=n(t);u.current=r},[a,n,e]);return{targetObjects:u,setToolbarActive:T,initListOfTargets:A}};exports.useAnimationTarget=useAnimationTarget;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var react=require("react"),useAnimations=require("../useAnimations.js"),useAnimationTarget=require("./useAnimationTarget.js"),useAnimationConfig=require("./useAnimationConfig.js"),useAnimationActions=require("./useAnimationActions.js"),useAnimationPreview=require("./useAnimationPreview.js"),animations=require("../../types/animations.js");const useApplyAnimation=({props:e})=>{let{uid:i}=e,n=useAnimations.useAnimations(),{initListOfTargets:t,targetObjects:a,setToolbarActive:s}=useAnimationTarget.useAnimationTarget(e),{isEnabledAnimation:r,getAnimationConfig:o}=useAnimationConfig.useAnimationConfig(e),{setAnimation:u,cancelAnimation:m,playAnimation:A,setAnimationOnFinish:c}=useAnimationActions.useAnimationActions(),{previewAnimation:p}=useAnimationPreview.useAnimationPreview({props:e,playAnimation:A,cancelAnimation:m,setAnimationOnFinish:c,setToolbarActive:s}),v=react.useCallback(({target:e,setting:i,type:t})=>n[t](e,i),[n]),w=react.useCallback(()=>{let{type:e,setting:i}=o();if(!e||e===animations.AnimationType.None||!a.current.length){m();return}let n=a.current.map(n=>v({type:e,setting:i,target:n.target}));m(),u(n)},[o,a,m,u,v]);react.useEffect(()=>(r?w():m(),()=>{m()}),[i,w,m,r]),react.useEffect(()=>(window.addEventListener("preview-animation",p),()=>{window.removeEventListener("preview-animation",p)}),[p]),react.useEffect(()=>(window.addEventListener("init-animation-target",t),()=>{window.removeEventListener("init-animation-target",t)}),[t])};exports.default=useApplyAnimation;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var react=require("react"),useAnimations=require("../useAnimations.js"),useAnimationTarget=require("./useAnimationTarget.js"),useAnimationConfig=require("./useAnimationConfig.js"),useAnimationActions=require("./useAnimationActions.js"),useAnimationPreview=require("./useAnimationPreview.js"),animations=require("../../types/animations.js");const useApplyAnimation=({props:e})=>{let{uid:i}=e,n=useAnimations.useAnimations(),{initListOfTargets:t,targetObjects:a,setToolbarActive:s}=useAnimationTarget.useAnimationTarget(e),{isEnabledAnimation:r,getAnimationConfig:o}=useAnimationConfig.useAnimationConfig(e),{setAnimation:u,cancelAnimation:m,playAnimation:A,setAnimationOnFinish:c}=useAnimationActions.useAnimationActions(),{previewAnimation:p}=useAnimationPreview.useAnimationPreview({props:e,playAnimation:A,cancelAnimation:m,setAnimationOnFinish:c,setToolbarActive:s}),v=react.useCallback(({target:e,setting:i,type:t})=>n[t](e,i),[n]),w=react.useCallback(()=>{let{type:e,setting:i}=o();if(!e||e===animations.AnimationType.None||!a.current.length){m();return}let n=a.current.map(n=>v({type:e,setting:i,target:n.target}));m(),u(n)},[o,a,m,u,v]);react.useEffect(()=>(r?(t(),w()):m(),()=>{m()}),[i,w,m,r,t]),react.useEffect(()=>(window.addEventListener("preview-animation",p),()=>{window.removeEventListener("preview-animation",p)}),[p]),react.useEffect(()=>(window.addEventListener("init-animation-target",t),()=>{window.removeEventListener("init-animation-target",t)}),[t])};exports.default=useApplyAnimation;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as t,Fragment as e,jsx as o}from"react/jsx-runtime";import{useState as i,useCallback as n,useEffect as l}from"react";import"zustand";import{useBuilderPreviewStore as r}from"../contexts/BuilderPreviewContext.js";import{useShopStore as a}from"../contexts/ShopContext.js";import"@gem-sdk/adapter-shopify";import"swr";import"swr/mutation";import"vanilla-lazyload";import"../hooks/useCartUI.js";import{CreateThemeSection as d}from"./theme-section/CreateThemeSection.js";import C from"./toolbar/Tooltip.js";import{ThemeSectionStatus as c}from"./theme-section/ThemeSectionStatus.js";import h from"./resize/Resize.js";import"../helpers/convert.js";let SECTION_LIMIT=25,notVisible=t=>{let e=getComputedStyle(t).overflow;return"visible"!==e},isSection=t=>{let e=t.getAttribute("data-component-tag");return"Section"===e},ComponentToolbarPreview=({...s})=>{let p=s.isThemeSection,u=a(t=>t.pageType),m=r(t=>t.getParents),b=r(t=>t.getItem("ROOT")),g=r(t=>t.isThemeSectionEditor),[v,f]=i(null),[w,S]=i(!1),[V,H]=i(!1),[M,Z]=i([]),x=(t,e)=>{let o=M.length,i=t.getBoundingClientRect(),n=e.getBoundingClientRect();return i.top-n.top<36*o},L=(t,e)=>{let o=e||t;if(t&&!isSection(t))return notVisible(t)&&x(e,t)?t:t.parentElement?L(t.parentElement,o):void 0},T=n(t=>{let e=t.detail;if(e?.componentUid==s.uid){let t=m(s.uid).filter(t=>!("ROOT"===t.uid||"Section"===t.tag&&g||t.editorConfigs?.toolbar?.hide||t.editorConfigs?.component?.noSetting)).slice(0,3);Z(t)}else Z([]),S(!1)},[Z,m,s.uid,g]);if(l(()=>(window.addEventListener("editor:active-component",T),()=>{window.removeEventListener("editor:active-component",T)}),[T]),"section"===s.type||s.editorConfigs?.toolbar?.hide)return null;let E=()=>b?.childrens?.length||0,R=()=>"Section"!==s.tag?-1:b?.childrens?.length?b.childrens.findIndex(t=>t==s.uid):-1,B=t=>{if(!M.length)return;let e=t?.target||null,o=e.closest("[data-toolbar-active]");if(!e||!o)return;if(w)H(!1),S(!1);else{let t=L(o,o);if(t)H(!0);else{let t=o.getBoundingClientRect();t.top<36*M.length?H(!0):H(!1)}S(!0)}let i=new CustomEvent("editor:toolbar:show-parents",{bubbles:!0,detail:{value:!w}});window.dispatchEvent(i)},I=t=>{t.preventDefault(),t.stopPropagation();let e=new CustomEvent("editor:toolbar:delete-component",{bubbles:!0,detail:{componentUid:s.uid,isThemeSection:p}});return window.dispatchEvent(e),!1},P=t=>{if(t.preventDefault(),t.stopPropagation(),E()>=25&&"Section"==s.tag)return!1;let e=new CustomEvent("editor:toolbar:duplicate-component",{bubbles:!0,detail:{componentUid:s.uid,isThemeSection:p}});return window.dispatchEvent(e),!1},y=()=>{let t=s.tag;if("IconListV2"===t)return"Item list";if("IconList"===t)return"Advanced list";let e=s.customLabel||s.label;return e},j=t=>{t.preventDefault(),t.stopPropagation();let e=new CustomEvent("editor:toolbar:zoom-out-component",{bubbles:!0,detail:{componentUid:s.uid}});return window.dispatchEvent(e),!1},k=()=>{f(null),window.removeEventListener("editor:close-add-section-popup",k)},z=(t,e)=>{if(t.preventDefault(),t.stopPropagation(),E()>=25)return!1;let o=t.target;if(o){f(e);let t=o.getBoundingClientRect(),i=new CustomEvent("editor:toolbar:add-section",{bubbles:!0,detail:{componentUid:s.uid,position:e,top:t.top+t.height/2}});window.dispatchEvent(i),window.addEventListener("editor:close-add-section-popup",k)}return!1},U=()=>{let t=s.name&&s.name===`Section ${s.uid}`;return E()>=20?t?"Section":`${s?.name} ${R()+1}/25`:t?`Section ${R()+1}`:s?.name};return t(e,{children:[!("Section"==s.tag&&g)&&t("div",{"data-toolbar":!0,"data-toolbar-section":"Section"==s.tag,"data-toolbar-theme-section":"Section"==s.tag&&!!p||g,"data-toolbar-limit":R()>=25,children:[t("div",{"data-toolbar-show-parent":!0,onClick:t=>B(t),"aria-hidden":"true",children:[o("div",{"data-toolbar-icon-drag":!0,children:t("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[o("path",{d:"M5.5 4.5C6.32843 4.5 7 3.82843 7 3C7 2.17157 6.32843 1.5 5.5 1.5C4.67157 1.5 4 2.17157 4 3C4 3.82843 4.67157 4.5 5.5 4.5Z",fill:"currentColor"}),o("path",{d:"M5.5 9.5C6.32843 9.5 7 8.82843 7 8C7 7.17157 6.32843 6.5 5.5 6.5C4.67157 6.5 4 7.17157 4 8C4 8.82843 4.67157 9.5 5.5 9.5Z",fill:"currentColor"}),o("path",{d:"M7 13C7 13.8284 6.32843 14.5 5.5 14.5C4.67157 14.5 4 13.8284 4 13C4 12.1716 4.67157 11.5 5.5 11.5C6.32843 11.5 7 12.1716 7 13Z",fill:"currentColor"}),o("path",{d:"M10.5 4.5C11.3284 4.5 12 3.82843 12 3C12 2.17157 11.3284 1.5 10.5 1.5C9.67157 1.5 9 2.17157 9 3C9 3.82843 9.67157 4.5 10.5 4.5Z",fill:"currentColor"}),o("path",{d:"M12 8C12 8.82843 11.3284 9.5 10.5 9.5C9.67157 9.5 9 8.82843 9 8C9 7.17157 9.67157 6.5 10.5 6.5C11.3284 6.5 12 7.17157 12 8Z",fill:"currentColor"}),o("path",{d:"M10.5 14.5C11.3284 14.5 12 13.8284 12 13C12 12.1716 11.3284 11.5 10.5 11.5C9.67157 11.5 9 12.1716 9 13C9 13.8284 9.67157 14.5 10.5 14.5Z",fill:"currentColor"})]})}),"Section"==s.tag?o("div",{"data-toolbar-name":!0,children:U()}):o("div",{"data-toolbar-name":!0,children:y()}),"Section"!==s.tag&&M.length>0&&o("div",{"data-toolbar-icon-parent":!0,"data-toolbar-icon-parent-open":w,children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:o("path",{d:"M5.65522 10C5.07265 10 4.7809 9.22865 5.19284 8.77753L7.53762 6.20974C7.79298 5.93009 8.20702 5.93009 8.46238 6.20974L10.8072 8.77754C11.2191 9.22866 10.9274 10 10.3448 10H5.65522Z",fill:"currentColor"})})})]}),w&&M.map((e,i)=>{let n=e?.childrens?.length??0,l=e.label;return"Row"===e.label&&(l=n<=1?e.label+" "+n+" col":e.label+" "+n+" cols"),t("div",{"data-toolbar-parent":!0,"data-parent-uid":e.uid,"data-toolbar-theme-section":g,"data-toolbar-parent-revert":V,style:{top:V?`${36*(i+1)}px`:`${-36*(i+1)}px`},children:[o("div",{"data-toolbar-icon-drag":!0,children:t("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[o("path",{d:"M5.5 4.5C6.32843 4.5 7 3.82843 7 3C7 2.17157 6.32843 1.5 5.5 1.5C4.67157 1.5 4 2.17157 4 3C4 3.82843 4.67157 4.5 5.5 4.5Z",fill:"currentColor"}),o("path",{d:"M5.5 9.5C6.32843 9.5 7 8.82843 7 8C7 7.17157 6.32843 6.5 5.5 6.5C4.67157 6.5 4 7.17157 4 8C4 8.82843 4.67157 9.5 5.5 9.5Z",fill:"currentColor"}),o("path",{d:"M7 13C7 13.8284 6.32843 14.5 5.5 14.5C4.67157 14.5 4 13.8284 4 13C4 12.1716 4.67157 11.5 5.5 11.5C6.32843 11.5 7 12.1716 7 13Z",fill:"currentColor"}),o("path",{d:"M10.5 4.5C11.3284 4.5 12 3.82843 12 3C12 2.17157 11.3284 1.5 10.5 1.5C9.67157 1.5 9 2.17157 9 3C9 3.82843 9.67157 4.5 10.5 4.5Z",fill:"currentColor"}),o("path",{d:"M12 8C12 8.82843 11.3284 9.5 10.5 9.5C9.67157 9.5 9 8.82843 9 8C9 7.17157 9.67157 6.5 10.5 6.5C11.3284 6.5 12 7.17157 12 8Z",fill:"currentColor"}),o("path",{d:"M10.5 14.5C11.3284 14.5 12 13.8284 12 13C12 12.1716 11.3284 11.5 10.5 11.5C9.67157 11.5 9 12.1716 9 13C9 13.8284 9.67157 14.5 10.5 14.5Z",fill:"currentColor"})]})}),o("div",{"data-toolbar-name":!0,children:l})]},e.uid)}),"Section"===s.tag&&!s.isThemeSection&&"STATIC"!==u&&25>R()&&o(d,{...s}),"Sticky"==s.tag&&o("div",{"data-toolbar-zoom-out":!0,onClick:t=>j(t),"aria-hidden":"true",children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.5 7C14.7761 7 15 6.77614 15 6.5C15 6.22386 14.7761 6 14.5 6L10.7072 6L14.8536 1.85355C15.0489 1.65829 15.0489 1.34171 14.8536 1.14645C14.6584 0.951186 14.3418 0.951185 14.1465 1.14645L10 5.29297L10 1.5C10 1.22386 9.77614 1 9.5 1C9.22386 1 9 1.22386 9 1.5L9 6.5C9 6.77614 9.22386 7 9.5 7L14.5 7ZM6 10.7073L6 14.5C6 14.7761 6.22386 15 6.5 15C6.77614 15 7 14.7761 7 14.5L7 9.5C7 9.22386 6.77614 9 6.5 9H1.5C1.22386 9 1 9.22386 1 9.5C1 9.77614 1.22386 10 1.5 10H5.29306L1.14662 14.1464C0.951353 14.3417 0.951353 14.6583 1.14662 14.8536C1.34188 15.0488 1.65846 15.0488 1.85372 14.8536L6 10.7073Z",fill:"currentColor"})})}),o(C,{enable:"Section"==s.tag&&E()>=25,text:"Page has reached Shopify’s 25 section-limit",position:"bottom","data-toolbar-duplicate":!0,"data-toolbar-disable":"Section"==s.tag&&E()>=25,onClick:t=>P(t),"aria-hidden":"true",children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.08423 1.21289C5.53194 1.21289 5.08423 1.66061 5.08423 2.21289V3.78711H4.26172C3.43329 3.78711 2.76172 4.45868 2.76172 5.28711V13.2871C2.76172 14.1155 3.43329 14.7871 4.26172 14.7871H10.2617C11.0901 14.7871 11.7617 14.1155 11.7617 13.2871V12.4629H13.0842C13.6365 12.4629 14.0842 12.0152 14.0842 11.4629V2.21289C14.0842 1.66061 13.6365 1.21289 13.0842 1.21289H6.08423ZM10.7617 12.4629H6.08423C5.53194 12.4629 5.08423 12.0152 5.08423 11.4629V4.78711H4.26172C3.98558 4.78711 3.76172 5.01097 3.76172 5.28711V13.2871C3.76172 13.5633 3.98558 13.7871 4.26172 13.7871H10.2617C10.5379 13.7871 10.7617 13.5633 10.7617 13.2871V12.4629Z",fill:"currentColor"})})}),o("div",{"data-toolbar-delete":!0,onClick:t=>I(t),"aria-hidden":"true",children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 2.88965V2.38965C11 1.56122 10.3284 0.889648 9.5 0.889648H6.5C5.67157 0.889648 5 1.56122 5 2.38965V2.88965H2C1.72386 2.88965 1.5 3.11351 1.5 3.38965C1.5 3.66579 1.72386 3.88965 2 3.88965H3.21997V13.1099C3.21997 14.2144 4.1154 15.1099 5.21997 15.1099H11.22C12.3245 15.1099 13.22 14.2144 13.22 13.1099V3.88965H14C14.2761 3.88965 14.5 3.66579 14.5 3.38965C14.5 3.11351 14.2761 2.88965 14 2.88965H11ZM6 2.88965H10V2.38965C10 2.11351 9.77614 1.88965 9.5 1.88965H6.5C6.22386 1.88965 6 2.11351 6 2.38965V2.88965ZM6.24976 6.13965C6.66397 6.13965 6.99976 6.47543 6.99976 6.88965V11.3896C6.99976 11.8039 6.66397 12.1396 6.24976 12.1396C5.83554 12.1396 5.49976 11.8039 5.49976 11.3896V6.88965C5.49976 6.47543 5.83554 6.13965 6.24976 6.13965ZM10.4998 6.88965C10.4998 6.47543 10.164 6.13965 9.74976 6.13965C9.33554 6.13965 8.99976 6.47543 8.99976 6.88965V11.3896C8.99976 11.8039 9.33554 12.1396 9.74976 12.1396C10.164 12.1396 10.4998 11.8039 10.4998 11.3896V6.88965Z",fill:"currentColor"})})})]}),"STATIC"!==u&&25>R()&&o(c,{...s}),o("div",{"data-outline":!0,"data-outline-section":"Section"==s.tag,"data-outline-theme-section":"Section"==s.tag&&!!p||g,"data-outline-limit":R()>=25}),"Section"==s.tag&&!g&&t(e,{children:[o(C,{enable:E()>=25,text:"Page has reached Shopify’s 25 section-limit",position:"top","data-toolbar-add-top":!0,"data-toolbar-disable":E()>=25,"data-toolbar-add-open":"above"==v,onClick:t=>z(t,"above"),"aria-hidden":"true",children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:o("path",{d:"M8.45 3.95C8.45 3.70147 8.24853 3.5 8 3.5C7.75147 3.5 7.55 3.70147 7.55 3.95V7.55H3.95C3.70147 7.55 3.5 7.75147 3.5 8C3.5 8.24853 3.70147 8.45 3.95 8.45H7.55V12.05C7.55 12.2985 7.75147 12.5 8 12.5C8.24853 12.5 8.45 12.2985 8.45 12.05V8.45H12.05C12.2985 8.45 12.5 8.24853 12.5 8C12.5 7.75147 12.2985 7.55 12.05 7.55H8.45V3.95Z",fill:"#212121"})})}),o(C,{enable:E()>=25,text:"Page has reached Shopify’s 25 section-limit",position:"top","data-toolbar-add-bottom":!0,"data-toolbar-disable":E()>=25,"data-toolbar-add-open":"below"==v,onClick:t=>z(t,"below"),"aria-hidden":"true",children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:o("path",{d:"M8.45 3.95C8.45 3.70147 8.24853 3.5 8 3.5C7.75147 3.5 7.55 3.70147 7.55 3.95V7.55H3.95C3.70147 7.55 3.5 7.75147 3.5 8C3.5 8.24853 3.70147 8.45 3.95 8.45H7.55V12.05C7.55 12.2985 7.75147 12.5 8 12.5C8.24853 12.5 8.45 12.2985 8.45 12.05V8.45H12.05C12.2985 8.45 12.5 8.24853 12.5 8C12.5 7.75147 12.2985 7.55 12.05 7.55H8.45V3.95Z",fill:"#212121"})})})]}),o(h,{...s})]})};export{ComponentToolbarPreview};
|
|
1
|
+
import{jsxs as t,Fragment as e,jsx as o}from"react/jsx-runtime";import{useState as i,useCallback as n,useEffect as l}from"react";import"zustand";import{useBuilderPreviewStore as r}from"../contexts/BuilderPreviewContext.js";import{useShopStore as a}from"../contexts/ShopContext.js";import"@gem-sdk/adapter-shopify";import"swr";import"swr/mutation";import"vanilla-lazyload";import"../hooks/useCartUI.js";import{CreateThemeSection as d}from"./theme-section/CreateThemeSection.js";import C from"./toolbar/Tooltip.js";import{ThemeSectionStatusWrapper as c}from"./theme-section/ThemeSectionStatus.js";import h from"./resize/Resize.js";import"../helpers/convert.js";let SECTION_LIMIT=25,notVisible=t=>{let e=getComputedStyle(t).overflow;return"visible"!==e},isSection=t=>{let e=t.getAttribute("data-component-tag");return"Section"===e},ComponentToolbarPreview=({...s})=>{let p=s.isThemeSection,u=a(t=>t.pageType),m=r(t=>t.getParents),b=r(t=>t.getItem("ROOT")),g=r(t=>t.isThemeSectionEditor),[v,f]=i(null),[w,S]=i(!1),[V,H]=i(!1),[M,Z]=i([]),x=(t,e)=>{let o=M.length,i=t.getBoundingClientRect(),n=e.getBoundingClientRect();return i.top-n.top<36*o},L=(t,e)=>{let o=e||t;if(t&&!isSection(t))return notVisible(t)&&x(e,t)?t:t.parentElement?L(t.parentElement,o):void 0},T=n(t=>{let e=t.detail;if(e?.componentUid==s.uid){let t=m(s.uid).filter(t=>!("ROOT"===t.uid||"Section"===t.tag&&g||t.editorConfigs?.toolbar?.hide||t.editorConfigs?.component?.noSetting)).slice(0,3);Z(t)}else Z([]),S(!1)},[Z,m,s.uid,g]);if(l(()=>(window.addEventListener("editor:active-component",T),()=>{window.removeEventListener("editor:active-component",T)}),[T]),"section"===s.type||s.editorConfigs?.toolbar?.hide)return null;let E=()=>b?.childrens?.length||0,R=()=>"Section"!==s.tag?-1:b?.childrens?.length?b.childrens.findIndex(t=>t==s.uid):-1,B=t=>{if(!M.length)return;let e=t?.target||null,o=e.closest("[data-toolbar-active]");if(!e||!o)return;if(w)H(!1),S(!1);else{let t=L(o,o);if(t)H(!0);else{let t=o.getBoundingClientRect();t.top<36*M.length?H(!0):H(!1)}S(!0)}let i=new CustomEvent("editor:toolbar:show-parents",{bubbles:!0,detail:{value:!w}});window.dispatchEvent(i)},I=t=>{t.preventDefault(),t.stopPropagation();let e=new CustomEvent("editor:toolbar:delete-component",{bubbles:!0,detail:{componentUid:s.uid,isThemeSection:p}});return window.dispatchEvent(e),!1},P=t=>{if(t.preventDefault(),t.stopPropagation(),E()>=25&&"Section"==s.tag)return!1;let e=new CustomEvent("editor:toolbar:duplicate-component",{bubbles:!0,detail:{componentUid:s.uid,isThemeSection:p}});return window.dispatchEvent(e),!1},y=()=>{let t=s.tag;if("IconListV2"===t)return"Item list";if("IconList"===t)return"Advanced list";let e=s.customLabel||s.label;return e},j=t=>{t.preventDefault(),t.stopPropagation();let e=new CustomEvent("editor:toolbar:zoom-out-component",{bubbles:!0,detail:{componentUid:s.uid}});return window.dispatchEvent(e),!1},k=()=>{f(null),window.removeEventListener("editor:close-add-section-popup",k)},z=(t,e)=>{if(t.preventDefault(),t.stopPropagation(),E()>=25)return!1;let o=t.target;if(o){f(e);let t=o.getBoundingClientRect(),i=new CustomEvent("editor:toolbar:add-section",{bubbles:!0,detail:{componentUid:s.uid,position:e,top:t.top+t.height/2}});window.dispatchEvent(i),window.addEventListener("editor:close-add-section-popup",k)}return!1},U=()=>{let t=s.name&&s.name===`Section ${s.uid}`;return E()>=20?`${t?"Section":s?.name} ${R()+1}/25`:t?`Section ${R()+1}`:s?.name};return t(e,{children:[!("Section"==s.tag&&g)&&t("div",{"data-toolbar":!0,"data-toolbar-section":"Section"==s.tag,"data-toolbar-theme-section":"Section"==s.tag&&!!p||g,"data-toolbar-limit":R()>=25,children:[t("div",{"data-toolbar-show-parent":!0,onClick:t=>B(t),"aria-hidden":"true",children:[o("div",{"data-toolbar-icon-drag":!0,children:t("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[o("path",{d:"M5.5 4.5C6.32843 4.5 7 3.82843 7 3C7 2.17157 6.32843 1.5 5.5 1.5C4.67157 1.5 4 2.17157 4 3C4 3.82843 4.67157 4.5 5.5 4.5Z",fill:"currentColor"}),o("path",{d:"M5.5 9.5C6.32843 9.5 7 8.82843 7 8C7 7.17157 6.32843 6.5 5.5 6.5C4.67157 6.5 4 7.17157 4 8C4 8.82843 4.67157 9.5 5.5 9.5Z",fill:"currentColor"}),o("path",{d:"M7 13C7 13.8284 6.32843 14.5 5.5 14.5C4.67157 14.5 4 13.8284 4 13C4 12.1716 4.67157 11.5 5.5 11.5C6.32843 11.5 7 12.1716 7 13Z",fill:"currentColor"}),o("path",{d:"M10.5 4.5C11.3284 4.5 12 3.82843 12 3C12 2.17157 11.3284 1.5 10.5 1.5C9.67157 1.5 9 2.17157 9 3C9 3.82843 9.67157 4.5 10.5 4.5Z",fill:"currentColor"}),o("path",{d:"M12 8C12 8.82843 11.3284 9.5 10.5 9.5C9.67157 9.5 9 8.82843 9 8C9 7.17157 9.67157 6.5 10.5 6.5C11.3284 6.5 12 7.17157 12 8Z",fill:"currentColor"}),o("path",{d:"M10.5 14.5C11.3284 14.5 12 13.8284 12 13C12 12.1716 11.3284 11.5 10.5 11.5C9.67157 11.5 9 12.1716 9 13C9 13.8284 9.67157 14.5 10.5 14.5Z",fill:"currentColor"})]})}),"Section"==s.tag?o("div",{"data-toolbar-name":!0,children:U()}):o("div",{"data-toolbar-name":!0,children:y()}),"Section"!==s.tag&&M.length>0&&o("div",{"data-toolbar-icon-parent":!0,"data-toolbar-icon-parent-open":w,children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:o("path",{d:"M5.65522 10C5.07265 10 4.7809 9.22865 5.19284 8.77753L7.53762 6.20974C7.79298 5.93009 8.20702 5.93009 8.46238 6.20974L10.8072 8.77754C11.2191 9.22866 10.9274 10 10.3448 10H5.65522Z",fill:"currentColor"})})})]}),w&&M.map((e,i)=>{let n=e?.childrens?.length??0,l=e.label;return"Row"===e.label&&(l=n<=1?e.label+" "+n+" col":e.label+" "+n+" cols"),t("div",{"data-toolbar-parent":!0,"data-parent-uid":e.uid,"data-toolbar-theme-section":g,"data-toolbar-parent-revert":V,style:{top:V?`${36*(i+1)}px`:`${-36*(i+1)}px`},children:[o("div",{"data-toolbar-icon-drag":!0,children:t("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[o("path",{d:"M5.5 4.5C6.32843 4.5 7 3.82843 7 3C7 2.17157 6.32843 1.5 5.5 1.5C4.67157 1.5 4 2.17157 4 3C4 3.82843 4.67157 4.5 5.5 4.5Z",fill:"currentColor"}),o("path",{d:"M5.5 9.5C6.32843 9.5 7 8.82843 7 8C7 7.17157 6.32843 6.5 5.5 6.5C4.67157 6.5 4 7.17157 4 8C4 8.82843 4.67157 9.5 5.5 9.5Z",fill:"currentColor"}),o("path",{d:"M7 13C7 13.8284 6.32843 14.5 5.5 14.5C4.67157 14.5 4 13.8284 4 13C4 12.1716 4.67157 11.5 5.5 11.5C6.32843 11.5 7 12.1716 7 13Z",fill:"currentColor"}),o("path",{d:"M10.5 4.5C11.3284 4.5 12 3.82843 12 3C12 2.17157 11.3284 1.5 10.5 1.5C9.67157 1.5 9 2.17157 9 3C9 3.82843 9.67157 4.5 10.5 4.5Z",fill:"currentColor"}),o("path",{d:"M12 8C12 8.82843 11.3284 9.5 10.5 9.5C9.67157 9.5 9 8.82843 9 8C9 7.17157 9.67157 6.5 10.5 6.5C11.3284 6.5 12 7.17157 12 8Z",fill:"currentColor"}),o("path",{d:"M10.5 14.5C11.3284 14.5 12 13.8284 12 13C12 12.1716 11.3284 11.5 10.5 11.5C9.67157 11.5 9 12.1716 9 13C9 13.8284 9.67157 14.5 10.5 14.5Z",fill:"currentColor"})]})}),o("div",{"data-toolbar-name":!0,children:l})]},e.uid)}),"Section"===s.tag&&!s.isThemeSection&&"STATIC"!==u&&25>R()&&o(d,{...s}),"Sticky"==s.tag&&o("div",{"data-toolbar-zoom-out":!0,onClick:t=>j(t),"aria-hidden":"true",children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.5 7C14.7761 7 15 6.77614 15 6.5C15 6.22386 14.7761 6 14.5 6L10.7072 6L14.8536 1.85355C15.0489 1.65829 15.0489 1.34171 14.8536 1.14645C14.6584 0.951186 14.3418 0.951185 14.1465 1.14645L10 5.29297L10 1.5C10 1.22386 9.77614 1 9.5 1C9.22386 1 9 1.22386 9 1.5L9 6.5C9 6.77614 9.22386 7 9.5 7L14.5 7ZM6 10.7073L6 14.5C6 14.7761 6.22386 15 6.5 15C6.77614 15 7 14.7761 7 14.5L7 9.5C7 9.22386 6.77614 9 6.5 9H1.5C1.22386 9 1 9.22386 1 9.5C1 9.77614 1.22386 10 1.5 10H5.29306L1.14662 14.1464C0.951353 14.3417 0.951353 14.6583 1.14662 14.8536C1.34188 15.0488 1.65846 15.0488 1.85372 14.8536L6 10.7073Z",fill:"currentColor"})})}),o(C,{enable:"Section"==s.tag&&E()>=25,text:"Page has reached Shopify’s 25 section-limit",position:"bottom","data-toolbar-duplicate":!0,"data-toolbar-disable":"Section"==s.tag&&E()>=25,onClick:t=>P(t),"aria-hidden":"true",children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.08423 1.21289C5.53194 1.21289 5.08423 1.66061 5.08423 2.21289V3.78711H4.26172C3.43329 3.78711 2.76172 4.45868 2.76172 5.28711V13.2871C2.76172 14.1155 3.43329 14.7871 4.26172 14.7871H10.2617C11.0901 14.7871 11.7617 14.1155 11.7617 13.2871V12.4629H13.0842C13.6365 12.4629 14.0842 12.0152 14.0842 11.4629V2.21289C14.0842 1.66061 13.6365 1.21289 13.0842 1.21289H6.08423ZM10.7617 12.4629H6.08423C5.53194 12.4629 5.08423 12.0152 5.08423 11.4629V4.78711H4.26172C3.98558 4.78711 3.76172 5.01097 3.76172 5.28711V13.2871C3.76172 13.5633 3.98558 13.7871 4.26172 13.7871H10.2617C10.5379 13.7871 10.7617 13.5633 10.7617 13.2871V12.4629Z",fill:"currentColor"})})}),o("div",{"data-toolbar-delete":!0,onClick:t=>I(t),"aria-hidden":"true",children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 2.88965V2.38965C11 1.56122 10.3284 0.889648 9.5 0.889648H6.5C5.67157 0.889648 5 1.56122 5 2.38965V2.88965H2C1.72386 2.88965 1.5 3.11351 1.5 3.38965C1.5 3.66579 1.72386 3.88965 2 3.88965H3.21997V13.1099C3.21997 14.2144 4.1154 15.1099 5.21997 15.1099H11.22C12.3245 15.1099 13.22 14.2144 13.22 13.1099V3.88965H14C14.2761 3.88965 14.5 3.66579 14.5 3.38965C14.5 3.11351 14.2761 2.88965 14 2.88965H11ZM6 2.88965H10V2.38965C10 2.11351 9.77614 1.88965 9.5 1.88965H6.5C6.22386 1.88965 6 2.11351 6 2.38965V2.88965ZM6.24976 6.13965C6.66397 6.13965 6.99976 6.47543 6.99976 6.88965V11.3896C6.99976 11.8039 6.66397 12.1396 6.24976 12.1396C5.83554 12.1396 5.49976 11.8039 5.49976 11.3896V6.88965C5.49976 6.47543 5.83554 6.13965 6.24976 6.13965ZM10.4998 6.88965C10.4998 6.47543 10.164 6.13965 9.74976 6.13965C9.33554 6.13965 8.99976 6.47543 8.99976 6.88965V11.3896C8.99976 11.8039 9.33554 12.1396 9.74976 12.1396C10.164 12.1396 10.4998 11.8039 10.4998 11.3896V6.88965Z",fill:"currentColor"})})})]}),"STATIC"!==u&&25>R()&&o(c,{...s}),o("div",{"data-outline":!0,"data-outline-section":"Section"==s.tag,"data-outline-theme-section":"Section"==s.tag&&!!p||g,"data-outline-limit":R()>=25}),"Section"==s.tag&&!g&&t(e,{children:[o(C,{enable:E()>=25,text:"Page has reached Shopify’s 25 section-limit",position:"top","data-toolbar-add-top":!0,"data-toolbar-disable":E()>=25,"data-toolbar-add-open":"above"==v,onClick:t=>z(t,"above"),"aria-hidden":"true",children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:o("path",{d:"M8.45 3.95C8.45 3.70147 8.24853 3.5 8 3.5C7.75147 3.5 7.55 3.70147 7.55 3.95V7.55H3.95C3.70147 7.55 3.5 7.75147 3.5 8C3.5 8.24853 3.70147 8.45 3.95 8.45H7.55V12.05C7.55 12.2985 7.75147 12.5 8 12.5C8.24853 12.5 8.45 12.2985 8.45 12.05V8.45H12.05C12.2985 8.45 12.5 8.24853 12.5 8C12.5 7.75147 12.2985 7.55 12.05 7.55H8.45V3.95Z",fill:"#212121"})})}),o(C,{enable:E()>=25,text:"Page has reached Shopify’s 25 section-limit",position:"top","data-toolbar-add-bottom":!0,"data-toolbar-disable":E()>=25,"data-toolbar-add-open":"below"==v,onClick:t=>z(t,"below"),"aria-hidden":"true",children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:o("path",{d:"M8.45 3.95C8.45 3.70147 8.24853 3.5 8 3.5C7.75147 3.5 7.55 3.70147 7.55 3.95V7.55H3.95C3.70147 7.55 3.5 7.75147 3.5 8C3.5 8.24853 3.70147 8.45 3.95 8.45H7.55V12.05C7.55 12.2985 7.75147 12.5 8 12.5C8.24853 12.5 8.45 12.2985 8.45 12.05V8.45H12.05C12.2985 8.45 12.5 8.24853 12.5 8C12.5 7.75147 12.2985 7.55 12.05 7.55H8.45V3.95Z",fill:"#212121"})})})]}),o(h,{...s})]})};export{ComponentToolbarPreview};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,Fragment as t,jsxs as i}from"react/jsx-runtime";let
|
|
1
|
+
import{jsx as e,Fragment as t,jsxs as i}from"react/jsx-runtime";let getStatusMessage=e=>{switch(e){case"DRAFT":return"This Theme Section is Draft. Publish page will also publish Theme Section.";case"NEED_PUBLISHING":return"Need to republish. Go to global edit and publish this section"}},ThemeSectionStatusWrapper=({tag:s,status:a,isThemeSection:l})=>{let n="Section"===s&&l&&("DRAFT"===a||"NEED_PUBLISHING"===a),h=getStatusMessage(a);return e(t,{children:n&&i("div",{"data-theme-section-status":!0,children:[e("div",{"data-theme-section-status-icon":!0,children:e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:e("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15 8C15 11.866 11.866 15 8 15C4.13401 15 1 11.866 1 8C1 4.13401 4.13401 1 8 1C11.866 1 15 4.13401 15 8ZM8.4668 4.61597C8.4668 4.89211 8.24294 5.11597 7.9668 5.11597C7.69065 5.11597 7.4668 4.89211 7.4668 4.61597C7.4668 4.33982 7.69065 4.11597 7.9668 4.11597C8.24294 4.11597 8.4668 4.33982 8.4668 4.61597ZM6.91309 5.48633C6.63694 5.48633 6.41309 5.71019 6.41309 5.98633C6.41309 6.26247 6.63694 6.48633 6.91309 6.48633H7.56006V10.3839C7.56006 10.9362 8.00777 11.3839 8.56006 11.3839H9.57144C9.84758 11.3839 10.0714 11.1601 10.0714 10.8839C10.0714 10.6078 9.84758 10.3839 9.57144 10.3839H8.56006V6.48633C8.56006 5.93404 8.11234 5.48633 7.56006 5.48633H6.91309Z",fill:"#9144DA"})})}),h&&e("span",{"data-theme-section-status-text":!0,children:h})]})})};export{ThemeSectionStatusWrapper};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let EASING={ease:"cubic-bezier(0.46,0.03,0.52,0.96)","ease-in":"cubic-bezier(0.55,0.08,0.68,0.53)","ease-out":"cubic-bezier(0.46,0.03,0.52,0.96)",linear:"linear"},animations=()=>{let r=r=>{let t=JSON.parse(JSON.stringify(r)),e=["delay","speed","scale","intensity"];return e.forEach(r=>{if(!t?.[r])return;if("scale"===r){if(!t?.zoomDirection)throw TypeError("zoomDirection not found on zoom preset");let[e,a]=t?.scale?.in??[1,1],[n,o]=t?.scale?.out??[1,1];t[r]={in:[Number(e)/100,Number(a)/100],out:[Number(n)/100,Number(o)/100]};return}let e=Number(t?.[r]);if("delay"===r?t[r]=1e3*e:t[r]=e,!isFinite(e))throw TypeError(`${r} must be a number`)}),t},t=(t,e)=>{let n=r(e),{direction:o,distance:i}=n,l=["left","right"].includes(o??"")?"X":"Y",f=["left","down"].includes(o??"")?"-":"",m=[{opacity:0,transform:`translate${l}(${f}${i??
|
|
1
|
+
let EASING={ease:"cubic-bezier(0.46,0.03,0.52,0.96)","ease-in":"cubic-bezier(0.55,0.08,0.68,0.53)","ease-out":"cubic-bezier(0.46,0.03,0.52,0.96)",linear:"linear"},animations=()=>{let r=r=>{let t=JSON.parse(JSON.stringify(r)),e=["delay","speed","scale","intensity"];return e.forEach(r=>{if(!t?.[r])return;if("scale"===r){if(!t?.zoomDirection)throw TypeError("zoomDirection not found on zoom preset");let[e,a]=t?.scale?.in??[1,1],[n,o]=t?.scale?.out??[1,1];t[r]={in:[Number(e)/100,Number(a)/100],out:[Number(n)/100,Number(o)/100]};return}let e=Number(t?.[r]);if("delay"===r?t[r]=1e3*e:t[r]=e,!isFinite(e))throw TypeError(`${r} must be a number`)}),t},t=(t,e)=>{let n=r(e),{direction:o,distance:i}=n,l=["left","right"].includes(o??"")?"X":"Y",f=["left","down"].includes(o??"")?"-":"",m=[{opacity:0,transform:`translate${l}(${f}${i??50}%)`},{opacity:1,transform:`translate${l}(0)`}];return s(t,m,{...a(n,500)})},e=(t,e)=>{let n=r(e),o=[{opacity:0},{opacity:1}];return s(t,o,{...a(n,500)})},a=(r,t)=>{let e=r=>r?1.5/r*1e3:t,{loop:a,delay:n,speed:o,easing:i}=r??{},s=e(o),l=n??0,f=a?s+l:s;return{iterations:a?1/0:1,duration:f,delay:l,easing:EASING[i??"linear"]}},n=(t,e)=>{let n=r(e),{scale:o,zoomDirection:i,isFade:l}=n,[f,m]=o.in,[u,c]=o.out,p=[{transform:`scale(${f}, ${f})`,opacity:l?0:1},{transform:`scale(${m??1.2}, ${m??1.2})`,opacity:1}],d=[{transform:`scale(${u}, ${u})`,opacity:l?0:1},{transform:`scale(${c??.8}, ${c??.8})`,opacity:1}],y="in"===i?p:d;return s(t,y,{...a(n,700)})},o=(r,t,e)=>{if(!t)return r;let a=t/e,n=[...r].pop();return[...r,{...n,offset:1-a}]},i=(t,e)=>{let n=r(e),{intensity:o}=n??{},i=[{transform:"translate3d(0, 0, 0)"}],l=[{transform:"translate3d(4px, 0, 0)"},{transform:"translate3d(-4px, 0, 0)"},{transform:"translate3d(4px, 0, 0)"}],f=[];Array.from(Array(o??1).keys()).forEach(()=>{f=[...f,...l]});let m=[{transform:"translate3d(-1px, 0, 0)"},{transform:"translate3d(2px, 0, 0)"},{transform:"translate3d(-4px, 0, 0)"},...f,{transform:"translate3d(-4px, 0, 0)"},{transform:"translate3d(2px, 0, 0)"},{transform:"translate3d(-1px, 0, 0)"}];return s(t,o?m:i,{...a(n??{},820)})},s=(r,t,e)=>{let a=new KeyframeEffect(r,e.iterations&&1===e.iterations?t:o(t,e?.delay??0,e?.duration??0),{...e});return new Animation(a,document.timeline)};return{zoom:n,shake:i,fade:e,slide:t}};export{animations};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{handleConvertBorderStyle as e,handleConvertBorderWidth as s,handleConvertBorderColor as a,getBorderStyle as o}from"./borders.js";import{isColor as t}from"./colors.js";import{layoutComponent as r}from"./constant.js";import{makeStyleKey as i}from"./make-style.js";import{composeRadius as c,getCornerCSSFromGlobal as n}from"./radius.js";import{getStyleShadowState as l,getStyleShadow as p}from"./shadow.js";let composeSpacing=({source:e,spacing:s,type:a,suffix:o=""})=>{let{top:t,left:r,bottom:i,right:c}=s;t&&(e[`--${a}t${o}`]=t),r&&(e[`--${a}l${o}`]=r),i&&(e[`--${a}b${o}`]=i),c&&(e[`--${a}r${o}`]=c)},composeSpacingV2=({source:e,spacing:s,suffix:a="",tag:o=""})=>{if(s&&s.margin){let{top:t,left:i,bottom:c,right:n}=s.margin;t&&(e[`--mt${a}`]=t),i&&(e[`--ml${a}`]=r.includes(o)&&"0px"===i?"auto":i),c&&(e[`--mb${a}`]=c),n&&(e[`--mr${a}`]=r.includes(o)&&"0px"===n?"auto":n)}if(s&&s.padding){let{top:o,left:t,bottom:r,right:i}=s.padding;o&&(e[`--pt${a}`]=o),t&&(e[`--pl${a}`]=t),r&&(e[`--pb${a}`]=r),i&&(e[`--pr${a}`]=i)}},getAttrValue=(e,s,a)=>{if(null!=s)switch(e){case"bgc":case"c":return t(s.toString())?s:`var(--g-c-${s})`;case"d":if(!s)return"none";if(s&&a&&r.includes(a))return"grid";return"block";default:return s}};function composeAdvanceStyle(t,r){if(!t)return{};let i={},d=["desktop","tablet","mobile"],u=["hover","normal"];return Object.keys(t).forEach(b=>{let g=t[b];if("cssClass"===b||null==g)return;let m=t.hasBoxShadow?t.hasBoxShadow:{};if("object"==typeof g){if(Array.isArray(g))return;Object.keys(g).forEach(h=>{if(d.includes(h)){let o=g[h];if(void 0!==o){if("border"===b&&Object.assign(i,e(g),s(g),a(g)),"rounded"===b&&Object.assign(i,c(g)),"desktop"===h)switch(b){case"padding":composeSpacing({source:i,spacing:o,type:"p"});break;case"margin":composeSpacing({source:i,spacing:o,type:"m"});break;case"spacing-setting":composeSpacingV2({source:i,spacing:o,tag:r});break;case"m":case"p":break;default:i[`--${b}`]=getAttrValue(b,o,r)}else switch(b){case"padding":composeSpacing({source:i,spacing:o,type:"p",suffix:`-${h}`});break;case"margin":composeSpacing({source:i,spacing:o,type:"m",suffix:`-${h}`});break;case"spacing-setting":composeSpacingV2({source:i,spacing:o,suffix:`-${h}`,tag:r});break;case"m":case"p":break;default:i[`--${b}-${h}`]=getAttrValue(b,o,r)}}}else if(u.includes(h))switch(b){case"hasBoxShadow":break;case"boxShadow":Object.assign(i,l(g,"box-shadow",m))}else"border"===b&&("none"===g.border&&(g.border="solid",g.color="#121212",g.isCustom=!0,g.width="0px",g.position="all"),Object.assign(i,o(g))),"rounded"===b&&Object.assign(i,n(g)),"hasBoxShadow"===b&&Object.assign(i,p({value:t.boxShadow,styleAppliedFor:"box-shadow",isEnableShadow:t.hasBoxShadow})),"boxShadow"===b&&Object.assign(i,p({value:g,styleAppliedFor:"box-shadow",isEnableShadow:t.hasBoxShadow}))})}else i[`--${b}`]=getAttrValue(b,g,r),"hasBoxShadow"===b&&t.boxShadow&&Object.assign(i,p({value:t.boxShadow,styleAppliedFor:"box-shadow",isEnableShadow:t.hasBoxShadow}))}),i}let splitStyle=(e,s={})=>{let a=e.map(e=>i(e)).flat(),o=Object.keys(s).filter(e=>a.includes(e)),t=o.reduce((e,a)=>({...e,[a]:s[a]}),{}),r=Object.keys(s).filter(e=>!o.includes(e)).reduce((e,a)=>({...e,[a]:s[a]}),{});return[t,r]};export{composeAdvanceStyle,splitStyle};
|
|
1
|
+
import{handleConvertBorderStyle as e,handleConvertBorderWidth as s,handleConvertBorderColor as a,getBorderStyle as o}from"./borders.js";import{isColor as t}from"./colors.js";import{layoutComponent as r}from"./constant.js";import{makeStyleKey as i}from"./make-style.js";import{composeRadius as c,getCornerCSSFromGlobal as n}from"./radius.js";import{getStyleShadowState as l,getStyleShadow as p}from"./shadow.js";let composeSpacing=({source:e,spacing:s,type:a,suffix:o=""})=>{let{top:t,left:r,bottom:i,right:c}=s;t&&(e[`--${a}t${o}`]=t),r&&(e[`--${a}l${o}`]=r),i&&(e[`--${a}b${o}`]=i),c&&(e[`--${a}r${o}`]=c)},composeSpacingV2=({source:e,spacing:s,suffix:a="",tag:o=""})=>{if(s&&s.margin){let{top:t,left:i,bottom:c,right:n}=s.margin;t&&(e[`--mt${a}`]=t),i&&(e[`--ml${a}`]=r.includes(o)&&"0px"===i?"auto":i),c&&(e[`--mb${a}`]=c),n&&(e[`--mr${a}`]=r.includes(o)&&"0px"===n?"auto":n)}if(s&&s.padding){let{top:o,left:t,bottom:r,right:i}=s.padding;o&&(e[`--pt${a}`]=o),t&&(e[`--pl${a}`]=t),r&&(e[`--pb${a}`]=r),i&&(e[`--pr${a}`]=i)}},getAttrValue=(e,s,a)=>{if(null!=s)switch(e){case"bgc":case"c":return t(s.toString())?s:`var(--g-c-${s})`;case"d":if(!s)return"none";if(s&&a&&r.includes(a))return"grid";return"block";default:return s}};function composeAdvanceStyle(t,r){if(!t)return{};let i={"--pos":"relative"},d=["desktop","tablet","mobile"],u=["hover","normal"];return Object.keys(t).forEach(b=>{let g=t[b];if("cssClass"===b||null==g)return;let m=t.hasBoxShadow?t.hasBoxShadow:{};if("object"==typeof g){if(Array.isArray(g))return;Object.keys(g).forEach(h=>{if(d.includes(h)){let o=g[h];if(void 0!==o){if("border"===b&&Object.assign(i,e(g),s(g),a(g)),"rounded"===b&&Object.assign(i,c(g)),"pos"==b&&"static"==o&&(o="relative"),"desktop"===h)switch(b){case"padding":composeSpacing({source:i,spacing:o,type:"p"});break;case"margin":composeSpacing({source:i,spacing:o,type:"m"});break;case"spacing-setting":composeSpacingV2({source:i,spacing:o,tag:r});break;case"m":case"p":break;default:i[`--${b}`]=getAttrValue(b,o,r)}else switch(b){case"padding":composeSpacing({source:i,spacing:o,type:"p",suffix:`-${h}`});break;case"margin":composeSpacing({source:i,spacing:o,type:"m",suffix:`-${h}`});break;case"spacing-setting":composeSpacingV2({source:i,spacing:o,suffix:`-${h}`,tag:r});break;case"m":case"p":break;default:i[`--${b}-${h}`]=getAttrValue(b,o,r)}}}else if(u.includes(h))switch(b){case"hasBoxShadow":break;case"boxShadow":Object.assign(i,l(g,"box-shadow",m))}else"border"===b&&("none"===g.border&&(g.border="solid",g.color="#121212",g.isCustom=!0,g.width="0px",g.position="all"),Object.assign(i,o(g))),"rounded"===b&&Object.assign(i,n(g)),"hasBoxShadow"===b&&Object.assign(i,p({value:t.boxShadow,styleAppliedFor:"box-shadow",isEnableShadow:t.hasBoxShadow})),"boxShadow"===b&&Object.assign(i,p({value:g,styleAppliedFor:"box-shadow",isEnableShadow:t.hasBoxShadow}))})}else i[`--${b}`]=getAttrValue(b,g,r),"hasBoxShadow"===b&&t.boxShadow&&Object.assign(i,p({value:t.boxShadow,styleAppliedFor:"box-shadow",isEnableShadow:t.hasBoxShadow}))}),i}let splitStyle=(e,s={})=>{let a=e.map(e=>i(e)).flat(),o=Object.keys(s).filter(e=>a.includes(e)),t=o.reduce((e,a)=>({...e,[a]:s[a]}),{}),r=Object.keys(s).filter(e=>!o.includes(e)).reduce((e,a)=>({...e,[a]:s[a]}),{});return[t,r]};export{composeAdvanceStyle,splitStyle};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useMemo as e}from"react";import{useCurrentDevice as
|
|
1
|
+
import{useMemo as e,useCallback as n}from"react";import{useCurrentDevice as t}from"../use-current-device.js";let useAnimationConfig=i=>{let a=t(),r=e(()=>i?.advanced?.animation?.[a],[a,i?.advanced?.animation]),o=n(()=>{let{trigger:e,triggerConfig:n}=r,{animation:t,setting:i}=n[e];return{type:t,setting:i[t]}},[r]),m=r?.enabled;return{isEnabledAnimation:m,getAnimationConfig:o}};export{useAnimationConfig};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useRef as t,useCallback as e
|
|
1
|
+
import{useRef as t,useCallback as e}from"react";import{useAnimationConfig as r}from"./useAnimationConfig.js";let SPACING_ACTIVE_ATTRIBUTE="data-spacing",TOOLBAR_ACTIVE_ATTRIBUTE="data-toolbar-active",OUTLINE_ACTIVE_ATTRIBUTE="data-outline-active",TOOLBAR_ADD_SECTION_ACTIVE_ATTRIBUTE="data-toolbar-add-active",useAnimationTarget=a=>{let{isEnabledAnimation:T}=r(a),o=a.tag,u=a.uid,A=t(null),i=t([]),n=t=>{if(i.current)for(let e of i.current)t?(e.toolbar?.setAttribute(TOOLBAR_ACTIVE_ATTRIBUTE,"true"),e.outline?.setAttribute(OUTLINE_ACTIVE_ATTRIBUTE,"true"),e.spacing?.setAttribute(SPACING_ACTIVE_ATTRIBUTE,"true"),e.addSectionTop?.setAttribute(TOOLBAR_ADD_SECTION_ACTIVE_ATTRIBUTE,"true"),e.addSectionBottom?.setAttribute(TOOLBAR_ADD_SECTION_ACTIVE_ATTRIBUTE,"true")):(e.toolbar?.removeAttribute(TOOLBAR_ACTIVE_ATTRIBUTE),e.outline?.removeAttribute(OUTLINE_ACTIVE_ATTRIBUTE),e.spacing?.removeAttribute(SPACING_ACTIVE_ATTRIBUTE),e.addSectionTop?.removeAttribute(TOOLBAR_ADD_SECTION_ACTIVE_ATTRIBUTE),e.addSectionBottom?.removeAttribute(TOOLBAR_ADD_SECTION_ACTIVE_ATTRIBUTE))},l=t=>{let e=t.querySelector("[data-toolbar-add-top]"),r=t.querySelector("[data-toolbar-add-bottom]"),a=Array.from(t.children),T=a.find(t=>null!==t.getAttribute("data-toolbar")),o=a.find(t=>null!==t.getAttribute("data-outline"));return{sectionToolbar:T,sectionOutline:o,sectionAddTop:e,sectionAddBottom:r}},c=e(t=>t.reduce((t,e)=>{let r=null,a=null,T=e,u=e.querySelector("[data-toolbar][data-toolbar-active]"),A=e.querySelector("[data-outline][data-outline-active]"),i=Array.from(T.children),n=i.find(t=>null!==t.getAttribute("data-spacing"));switch(o){case"Button":case"SubmitButton":case"ProductButton":case"DynamicCheckout":T=e.querySelector(".gp-button-base");break;case"ProductProperties":T=e.querySelector("input");break;case"Icon":T=e.firstElementChild;break;case"ProductTag":T=e?.children[0]?.children[0];break;case"Section":{T=e;let{sectionOutline:t,sectionToolbar:o,sectionAddTop:i,sectionAddBottom:n}=l(T);A=t,u=o,r=i,a=n;break}default:T=e}let c={target:T,toolbar:u,outline:A,spacing:n,addSectionTop:r,addSectionBottom:a};return t.push(c),t},[]),[o]),d=e(()=>{if(!T)return;A.current||(A.current=document.querySelectorAll(`[data-uid="${u}"]`));let t=Array.from(A.current);if(!t.length)return;let e=c(t);i.current=e},[u,c,T]);return{targetObjects:i,setToolbarActive:n,initListOfTargets:d}};export{useAnimationTarget};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useCallback as t,useEffect as i}from"react";import{useAnimations as e}from"../useAnimations.js";import{useAnimationTarget as n}from"./useAnimationTarget.js";import{useAnimationConfig as o}from"./useAnimationConfig.js";import{useAnimationActions as r}from"./useAnimationActions.js";import{useAnimationPreview as m}from"./useAnimationPreview.js";import{AnimationType as a}from"../../types/animations.js";let useApplyAnimation=({props:s})=>{let{uid:p}=s,u=e(),{initListOfTargets:w,targetObjects:d,setToolbarActive:f}=n(s),{isEnabledAnimation:A,getAnimationConfig:v}=o(s),{setAnimation:l,cancelAnimation:g,playAnimation:j,setAnimationOnFinish:c}=r(),{previewAnimation:E}=m({props:s,playAnimation:j,cancelAnimation:g,setAnimationOnFinish:c,setToolbarActive:f}),L=t(({target:t,setting:i,type:e})=>u[e](t,i),[u]),y=t(()=>{let{type:t,setting:i}=v();if(!t||t===a.None||!d.current.length){g();return}let e=d.current.map(e=>L({type:t,setting:i,target:e.target}));g(),l(e)},[v,d,g,l,L]);i(()=>(A?y():g(),()=>{g()}),[p,y,g,A]),i(()=>(window.addEventListener("preview-animation",E),()=>{window.removeEventListener("preview-animation",E)}),[E]),i(()=>(window.addEventListener("init-animation-target",w),()=>{window.removeEventListener("init-animation-target",w)}),[w])};export{useApplyAnimation as default};
|
|
1
|
+
import{useCallback as t,useEffect as i}from"react";import{useAnimations as e}from"../useAnimations.js";import{useAnimationTarget as n}from"./useAnimationTarget.js";import{useAnimationConfig as o}from"./useAnimationConfig.js";import{useAnimationActions as r}from"./useAnimationActions.js";import{useAnimationPreview as m}from"./useAnimationPreview.js";import{AnimationType as a}from"../../types/animations.js";let useApplyAnimation=({props:s})=>{let{uid:p}=s,u=e(),{initListOfTargets:w,targetObjects:d,setToolbarActive:f}=n(s),{isEnabledAnimation:A,getAnimationConfig:v}=o(s),{setAnimation:l,cancelAnimation:g,playAnimation:j,setAnimationOnFinish:c}=r(),{previewAnimation:E}=m({props:s,playAnimation:j,cancelAnimation:g,setAnimationOnFinish:c,setToolbarActive:f}),L=t(({target:t,setting:i,type:e})=>u[e](t,i),[u]),y=t(()=>{let{type:t,setting:i}=v();if(!t||t===a.None||!d.current.length){g();return}let e=d.current.map(e=>L({type:t,setting:i,target:e.target}));g(),l(e)},[v,d,g,l,L]);i(()=>(A?(w(),y()):g(),()=>{g()}),[p,y,g,A,w]),i(()=>(window.addEventListener("preview-animation",E),()=>{window.removeEventListener("preview-animation",E)}),[E]),i(()=>(window.addEventListener("init-animation-target",w),()=>{window.removeEventListener("init-animation-target",w)}),[w])};export{useApplyAnimation as default};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -41,6 +41,7 @@ type BlockEntity = {
|
|
|
41
41
|
type?: 'component';
|
|
42
42
|
isThemeSection?: boolean;
|
|
43
43
|
needPublishing?: boolean;
|
|
44
|
+
status?: ThemeSectionStatus;
|
|
44
45
|
};
|
|
45
46
|
type SectionEntity = {
|
|
46
47
|
uid: string;
|
|
@@ -49,8 +50,10 @@ type SectionEntity = {
|
|
|
49
50
|
type: 'section';
|
|
50
51
|
name?: string;
|
|
51
52
|
isThemeSection?: boolean;
|
|
53
|
+
status?: ThemeSectionStatus;
|
|
52
54
|
needPublishing?: boolean;
|
|
53
55
|
};
|
|
56
|
+
type ThemeSectionStatus = 'DRAFT' | 'PUBLISHED' | 'NEED_PUBLISHING';
|
|
54
57
|
type BuilderEntity = BlockEntity | SectionEntity;
|
|
55
58
|
type BuilderEntityNested = Omit<BlockEntity, 'childrens'> & {
|
|
56
59
|
childrens?: BuilderEntityNested[];
|
|
@@ -10212,4 +10215,4 @@ type PublishedThemePageSelectFragment = Pick<PublishedThemePage, 'id' | 'name' |
|
|
|
10212
10215
|
|
|
10213
10216
|
declare const getProductBySlug: (fetcher: FetchFunc, slug?: string) => Promise<ProductSelectFragment>;
|
|
10214
10217
|
|
|
10215
|
-
export { AddOn, AddonProvider, AddonProviderProps, AliReviewsWidgetType, AlignItemProp, AlignProp, AnimationBaseSetting, AnimationConfig, AnimationDirectionType, AnimationEasingType, AnimationFadeSettingType, AnimationSetting, AnimationSettingType, AnimationShakeSettingType, AnimationSlideSettingType, AnimationTrigger, AnimationTriggerType, AnimationType, AnimationZoomDirectionType, AnimationZoomSettingType, Background, BaseProps, BasePropsWrap, BlockEntity, BoldSubscriptionsWidgetType, Border, BorderStyle, BuilderComponentProvider, BuilderComponentProviderProps, BuilderEntity, BuilderEntityNested, BuilderPreviewProvider, BuilderPreviewProviderProps, BuilderProvider, BuilderProviderProps, BuilderState, Builtin, CartLineProvider, CartLineProviderProps, CollectionDetailFilterDocument, CollectionDetailFilterQueryResponse, CollectionDetailFilterQueryVariables, CollectionDocument, CollectionProvider, CollectionProviderProps, CollectionQueryResponse, CollectionQueryVariables, CollectionSelectFragment, CollectionsDocument, CollectionsQueryResponse, CollectionsQueryVariables, ColorKey, ColorType$1 as ColorType, ColorValueType, Component, ComponentPreset, ComponentSetting, ContainerProp, ControlProp, ControlTriggerAction, ControlUI, CornerRadius, CornerRadiusType, CustomComponentConfig, DeepPartial, DynamicCollection, DynamicProduct, ExtractState, FeraReviewsV3WidgetType, FeraReviewsWidgetType, FetchCollectionArgs, FetchFunc, FetchProductParams, FlexDirectionProp, FontName, GRADIENT_BGR_KEY, GlobalStyleConfig, GlobalStyleResponsiveConfig, GlobalSwatchesData, GraphQLConnection, GroupPropType, GrowaveWidgetType, HSLAColorType, HSLColorType, HexColorType, ImageShape$1 as ImageShape, InitComponentType, InstantJudgeMeReviewsWidgetType, InstantKlaviyoWidgetType, InstantLooxReviewsWidgetType, JudgeMeReviewsWidgetType, KlaviyoWidgetType, LaiProductReviewsAdvancedWidgetType, LaiProductReviewsWidgetType, LooxReviewsWidgetType, ModalProvider, ModalProviderProps, NameDevices$1 as NameDevices, NestedKeys, ObjectDeviceGlobalType, ObjectDevices, ObjectLayoutValue, OmnisendWidgetType, OpinewDesignWidgetType, OpinewWidgetType, OptionNormalStyle, OptionSpecialStyle, Options, PageContext, PageProvider, PageProviderProps, PageType, PageViewUpDocument, PageViewUpMutationResponse, PageViewUpMutationVariables, PickyStoryWidgetType, PreviewPageDocument, PreviewPageQueryResponse, PreviewPageQueryVariables, Primitive, ProductInputAnalytic, ProductListProvider, ProductListProviderProps, ProductProvider, ProductProviderProps, ProductReviewsWidgetType, ProductSelectFragment, ProductsDocument, ProductsQueryResponse, ProductsQueryVariables, PublishedThemePageSelectFragment, PublishedThemePagesDocument, PublishedThemePagesQueryResponse, PublishedThemePagesQueryVariables, RGBAColorType, RGBColorType, Ratio$1 as Ratio, RenderMemo as Render, RenderChildren, RenderIf, Render as RenderLiquid, RenderMode, RenderPreviewMemo as RenderPreview, RequiredCursorEdge, ResponsiveKey, ResponsiveStateProp, RivyoWidgetType, RoundedSize, RyviuWidgetType, ScaleByDirection, SectionData, SectionEntity, SectionProvider, SectionProviderProps, SettingByAnimationType, SettingByAnimationValues, ShadowProps, ShadowStyle, ShadowStyleApplied, ShadowType, ShopProvider, ShopProviderProps, shop as ShopType, SizeProps, SizeSetting, SizeSettingGlobal, SizeType, SpacingType, StampedWidgetType, StateProp, StateSelector, StateType, StoreConfig, StorePropertyDocument, StorePropertyQueryResponse, StorePropertyQueryVariables, SwatchesOptionType, SwatchesOptionValue, TransformProp, TriggerConfig, TrustooWidgetType, TypographyProps, TypographySetting, TypographySettingV2, TypographyType, TypographyV2Attrs, TypographyV2Props, UltimateSalesBoostWidgetType, VariantSelectFragment, VitalsWidgetType, WiserWidgetType, WrapRenderChildren, YotpoReviewsWidgetType, animations, baseAssetURL, calculateFirstProduct, checkAvailableVariantInStock, cls, composeAdvanceStyle, composeBackgroundCss, composeBorderCss, composeCornerCss, composeGridLayout, composeMemo, composePositionLineHeight, composePostionIconList, composeRadius, composeRadiusResponsive, composeShadowCss, composeSize, composeSizeCss, composeSpacing, composeTextColorCss, composeTypography, composeTypographyAttr, composeTypographyClassName, composeTypographyCss, composeTypographyStyle, composeTypographyV2, composeTypographyV2Css, convertOldLayout, dataStringify, fetchMedias, fetchVariants, filterToolbarPreview, flattenConnection, fpixel, genSizeClass, genTypoClass, genVariable, generateCollectionQueryKey, generateProductQueryKey, generateProductsQueryKey, getAspectRatioGlobalSize, getBgImageByDevice, getBorderStyle, getCarouselContainerHeight, getCollection, getCornerCSSFromGlobal, getCustomRadius, getGlobalColorCSSProp, getGlobalColorClass, getGlobalColorResponsiveClass, getGlobalColorResponsiveStyle, getGlobalColorStateClass, getGlobalColorStateClassDynamicBtn, getGlobalColorStateResponsiveClass, getGlobalColorStateResponsiveClassDynamicBtn, getGlobalColorStateResponsiveStyle, getGlobalColorStateStyle, getGlobalColorStyle, getGlobalSizeGap, getGradientBgrStyleByDevice, getGradientBgrStyleForButton, getHeightByShapeGlobalSize, getPaddingGlobalSize, getProduct, getProductBySlug, getRadiusCSSFromGlobal, getRadiusStyleActiveState, getResponsiveStateValue, getResponsiveValue, getResponsiveValueByScreen, getSelectedVariant, getShortName, getSingleColorVariable, getSpacingVariable, getStyleBackgroundByDevice, getStyleShadow, getStyleShadowState, getWidthByShapeGlobalSize, getWidthHeightGlobalSize, globalEvent, gridToArrayRegex, gtag, handleConvertBorderColor, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertClassColor, handleConvertClassColorDynamicBtn, isBrowser, isColor, isColumnDirectionExist, isDefined, isEmptyChildren, isLocalEnv, isSafari, loadScript, makeAspectRatio, makeDotGapToCarouselStyle, makeFixedBgAttachment, makeGlobalSize, makeGlobalSizeHeightResponsive, makeGlobalSizeWidthResponsive, makeHeight, makeLineClamp, makeStyle, makeStyleKey, makeStyleResponsive, makeStyleResponsiveState, makeStyleState, makeStyleWithDefault, makeWidth, normalizeBuilderData, optionLayoutStyle, parseSelectedOption, parseValueWithUnit, prefetchQueries, props, removeNullUndefined, splitStyle, styles, template, tiktokpixel, useAddToCart, useAddon, useAddons, useBuilderComponent, useBuilderPreviewStore, useBuilderStore, useCartData, useCartDiscountCodesUpdate, useCartId, useCartLine, useCartLineStore, useCartNoteUpdate, useCartUI, useCheckAvailableVariantInStock, useCheckoutUrl, useCollection, useCollectionQuery, useCollectionStore, useCollectionsQuery, useConnectedShopify, useCreateCart, useCurrency, useCurrentDevice, useCurrentVariant, useCurrentVariantInStock, useEditorMode, useFeaturedImageGlobal, useFormatMoney, useInitialSwatchesOptions, useIsSampleProduct, useIsStorefrontProduct, useIsSyncProduct, useIsomorphicLayoutEffect, useLazyVideo, useLoadScript, useLocale, useMatchMutate, useMobileOnly, useModalStore, useMoney, useMoneyFormat, usePageStore, usePageType, usePluginEnable, usePrevious, useProduct, useProductList, useProductListProducts, useProductListSettings, useProductListStore, useProductListStyles, useProductProperties, useProductQuery, useProductStore, useProductsQuery, useQuantity, useRemoveCartItem, useSection, useSectionStore, useSelectedOption, useShopStore, useStoreFront, useSuspenseFetch, useSwatches, useSwatchesOptions, useUniqProductID, useUpdateCartItem, useVariant, useVariantOutStock, useVariants, validateEmail };
|
|
10218
|
+
export { AddOn, AddonProvider, AddonProviderProps, AliReviewsWidgetType, AlignItemProp, AlignProp, AnimationBaseSetting, AnimationConfig, AnimationDirectionType, AnimationEasingType, AnimationFadeSettingType, AnimationSetting, AnimationSettingType, AnimationShakeSettingType, AnimationSlideSettingType, AnimationTrigger, AnimationTriggerType, AnimationType, AnimationZoomDirectionType, AnimationZoomSettingType, Background, BaseProps, BasePropsWrap, BlockEntity, BoldSubscriptionsWidgetType, Border, BorderStyle, BuilderComponentProvider, BuilderComponentProviderProps, BuilderEntity, BuilderEntityNested, BuilderPreviewProvider, BuilderPreviewProviderProps, BuilderProvider, BuilderProviderProps, BuilderState, Builtin, CartLineProvider, CartLineProviderProps, CollectionDetailFilterDocument, CollectionDetailFilterQueryResponse, CollectionDetailFilterQueryVariables, CollectionDocument, CollectionProvider, CollectionProviderProps, CollectionQueryResponse, CollectionQueryVariables, CollectionSelectFragment, CollectionsDocument, CollectionsQueryResponse, CollectionsQueryVariables, ColorKey, ColorType$1 as ColorType, ColorValueType, Component, ComponentPreset, ComponentSetting, ContainerProp, ControlProp, ControlTriggerAction, ControlUI, CornerRadius, CornerRadiusType, CustomComponentConfig, DeepPartial, DynamicCollection, DynamicProduct, ExtractState, FeraReviewsV3WidgetType, FeraReviewsWidgetType, FetchCollectionArgs, FetchFunc, FetchProductParams, FlexDirectionProp, FontName, GRADIENT_BGR_KEY, GlobalStyleConfig, GlobalStyleResponsiveConfig, GlobalSwatchesData, GraphQLConnection, GroupPropType, GrowaveWidgetType, HSLAColorType, HSLColorType, HexColorType, ImageShape$1 as ImageShape, InitComponentType, InstantJudgeMeReviewsWidgetType, InstantKlaviyoWidgetType, InstantLooxReviewsWidgetType, JudgeMeReviewsWidgetType, KlaviyoWidgetType, LaiProductReviewsAdvancedWidgetType, LaiProductReviewsWidgetType, LooxReviewsWidgetType, ModalProvider, ModalProviderProps, NameDevices$1 as NameDevices, NestedKeys, ObjectDeviceGlobalType, ObjectDevices, ObjectLayoutValue, OmnisendWidgetType, OpinewDesignWidgetType, OpinewWidgetType, OptionNormalStyle, OptionSpecialStyle, Options, PageContext, PageProvider, PageProviderProps, PageType, PageViewUpDocument, PageViewUpMutationResponse, PageViewUpMutationVariables, PickyStoryWidgetType, PreviewPageDocument, PreviewPageQueryResponse, PreviewPageQueryVariables, Primitive, ProductInputAnalytic, ProductListProvider, ProductListProviderProps, ProductProvider, ProductProviderProps, ProductReviewsWidgetType, ProductSelectFragment, ProductsDocument, ProductsQueryResponse, ProductsQueryVariables, PublishedThemePageSelectFragment, PublishedThemePagesDocument, PublishedThemePagesQueryResponse, PublishedThemePagesQueryVariables, RGBAColorType, RGBColorType, Ratio$1 as Ratio, RenderMemo as Render, RenderChildren, RenderIf, Render as RenderLiquid, RenderMode, RenderPreviewMemo as RenderPreview, RequiredCursorEdge, ResponsiveKey, ResponsiveStateProp, RivyoWidgetType, RoundedSize, RyviuWidgetType, ScaleByDirection, SectionData, SectionEntity, SectionProvider, SectionProviderProps, SettingByAnimationType, SettingByAnimationValues, ShadowProps, ShadowStyle, ShadowStyleApplied, ShadowType, ShopProvider, ShopProviderProps, shop as ShopType, SizeProps, SizeSetting, SizeSettingGlobal, SizeType, SpacingType, StampedWidgetType, StateProp, StateSelector, StateType, StoreConfig, StorePropertyDocument, StorePropertyQueryResponse, StorePropertyQueryVariables, SwatchesOptionType, SwatchesOptionValue, ThemeSectionStatus, TransformProp, TriggerConfig, TrustooWidgetType, TypographyProps, TypographySetting, TypographySettingV2, TypographyType, TypographyV2Attrs, TypographyV2Props, UltimateSalesBoostWidgetType, VariantSelectFragment, VitalsWidgetType, WiserWidgetType, WrapRenderChildren, YotpoReviewsWidgetType, animations, baseAssetURL, calculateFirstProduct, checkAvailableVariantInStock, cls, composeAdvanceStyle, composeBackgroundCss, composeBorderCss, composeCornerCss, composeGridLayout, composeMemo, composePositionLineHeight, composePostionIconList, composeRadius, composeRadiusResponsive, composeShadowCss, composeSize, composeSizeCss, composeSpacing, composeTextColorCss, composeTypography, composeTypographyAttr, composeTypographyClassName, composeTypographyCss, composeTypographyStyle, composeTypographyV2, composeTypographyV2Css, convertOldLayout, dataStringify, fetchMedias, fetchVariants, filterToolbarPreview, flattenConnection, fpixel, genSizeClass, genTypoClass, genVariable, generateCollectionQueryKey, generateProductQueryKey, generateProductsQueryKey, getAspectRatioGlobalSize, getBgImageByDevice, getBorderStyle, getCarouselContainerHeight, getCollection, getCornerCSSFromGlobal, getCustomRadius, getGlobalColorCSSProp, getGlobalColorClass, getGlobalColorResponsiveClass, getGlobalColorResponsiveStyle, getGlobalColorStateClass, getGlobalColorStateClassDynamicBtn, getGlobalColorStateResponsiveClass, getGlobalColorStateResponsiveClassDynamicBtn, getGlobalColorStateResponsiveStyle, getGlobalColorStateStyle, getGlobalColorStyle, getGlobalSizeGap, getGradientBgrStyleByDevice, getGradientBgrStyleForButton, getHeightByShapeGlobalSize, getPaddingGlobalSize, getProduct, getProductBySlug, getRadiusCSSFromGlobal, getRadiusStyleActiveState, getResponsiveStateValue, getResponsiveValue, getResponsiveValueByScreen, getSelectedVariant, getShortName, getSingleColorVariable, getSpacingVariable, getStyleBackgroundByDevice, getStyleShadow, getStyleShadowState, getWidthByShapeGlobalSize, getWidthHeightGlobalSize, globalEvent, gridToArrayRegex, gtag, handleConvertBorderColor, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertClassColor, handleConvertClassColorDynamicBtn, isBrowser, isColor, isColumnDirectionExist, isDefined, isEmptyChildren, isLocalEnv, isSafari, loadScript, makeAspectRatio, makeDotGapToCarouselStyle, makeFixedBgAttachment, makeGlobalSize, makeGlobalSizeHeightResponsive, makeGlobalSizeWidthResponsive, makeHeight, makeLineClamp, makeStyle, makeStyleKey, makeStyleResponsive, makeStyleResponsiveState, makeStyleState, makeStyleWithDefault, makeWidth, normalizeBuilderData, optionLayoutStyle, parseSelectedOption, parseValueWithUnit, prefetchQueries, props, removeNullUndefined, splitStyle, styles, template, tiktokpixel, useAddToCart, useAddon, useAddons, useBuilderComponent, useBuilderPreviewStore, useBuilderStore, useCartData, useCartDiscountCodesUpdate, useCartId, useCartLine, useCartLineStore, useCartNoteUpdate, useCartUI, useCheckAvailableVariantInStock, useCheckoutUrl, useCollection, useCollectionQuery, useCollectionStore, useCollectionsQuery, useConnectedShopify, useCreateCart, useCurrency, useCurrentDevice, useCurrentVariant, useCurrentVariantInStock, useEditorMode, useFeaturedImageGlobal, useFormatMoney, useInitialSwatchesOptions, useIsSampleProduct, useIsStorefrontProduct, useIsSyncProduct, useIsomorphicLayoutEffect, useLazyVideo, useLoadScript, useLocale, useMatchMutate, useMobileOnly, useModalStore, useMoney, useMoneyFormat, usePageStore, usePageType, usePluginEnable, usePrevious, useProduct, useProductList, useProductListProducts, useProductListSettings, useProductListStore, useProductListStyles, useProductProperties, useProductQuery, useProductStore, useProductsQuery, useQuantity, useRemoveCartItem, useSection, useSectionStore, useSelectedOption, useShopStore, useStoreFront, useSuspenseFetch, useSwatches, useSwatchesOptions, useUniqProductID, useUpdateCartItem, useVariant, useVariantOutStock, useVariants, validateEmail };
|