@gem-sdk/pages 2.0.0-dev.1156 → 2.0.0-dev.1175

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),react=require("react"),getDOMElementParents=require("./toolbar/utils/getDOMElementParents.js"),_const=require("./toolbar/const.js"),getChildrenByAttrSelector=require("./toolbar/utils/getChildrenByAttrSelector.js"),findOverflowParent=require("./toolbar/utils/findOverflowParent.js"),waitForElementToExist=require("./toolbar/utils/waitForElementToExist.js"),isOverParent=require("./toolbar/utils/isOverParent.js"),findDOMClosest=require("./toolbar/utils/findDOMClosest.js");const Toolbar=()=>{let t=react.useRef(null),e=react.useRef(!1),r=react.useRef(),o=react.useRef(!1),a=react.useRef([]),i=react.useRef([]),n=react.useRef([]),l=({state:t,$toolbar:e,$component:r})=>{let o=findOverflowParent.findOverflowParent(r,e),a=e.getBoundingClientRect(),i=r.getBoundingClientRect(),n=window.innerWidth;o?i?.height<=60?e.setAttribute(`data-toolbar-${t}-revert`,"true"):e.setAttribute(`data-toolbar-${t}-inside`,"true"):a.top<_const.TOOLBAR_ACTIVE_HEIGHT+1&&(i?.height<=60?e.setAttribute(`data-toolbar-${t}-revert`,"true"):e.setAttribute(`data-toolbar-${t}-inside`,"true")),i.left+a.width>n&&e.setAttribute(`data-toolbar-${t}-overflow`,"true");let l=r?.closest('[aria-label="Dialog body"]');if(l){let r=l.getBoundingClientRect(),o=r.left+r.width-20;i.left+a.width>o&&e.setAttribute(`data-toolbar-${t}-overflow`,"true")}},d=react.useCallback(({$component:t,componentUid:e,focus:r,isPreventSection:o,isParent:n})=>{if(!t&&!e)return;if(!t){let r=document.body.querySelector("#storefront")?.querySelector(`[data-uid="${e}"]`);if(!r)return;t=r}if(!e){let r=t.getAttribute("data-uid");if(!r)return;e=r}a.current.push(t);let d=getChildrenByAttrSelector.getChildrenByAttrSelector(t,"data-toolbar"),u=getChildrenByAttrSelector.getChildrenByAttrSelector(t,"data-outline"),c=getChildrenByAttrSelector.getChildrenByAttrSelector(t,"data-toolbar-add-top"),s=getChildrenByAttrSelector.getChildrenByAttrSelector(t,"data-toolbar-add-bottom"),b=getChildrenByAttrSelector.getChildrenByAttrSelector(t,"data-theme-section-status");o&&b&&b.setAttribute("data-theme-section-status-active","true"),d&&(d.removeAttribute("style"),n||d.setAttribute("data-toolbar-hover","true"),r&&d.setAttribute("data-toolbar-hover-focus","true"),l({$toolbar:d,$component:t,state:"hover"})),u&&(u.setAttribute("data-outline-hover","true"),n&&u.setAttribute("data-outline-parent-hover","true"),o&&(i.current.push(t),u.setAttribute("data-outline-overlay-theme-section","true")),r&&u.setAttribute("data-outline-hover-focus","true")),c&&!n&&c.setAttribute("data-toolbar-add-hover","true"),s&&!n&&s.setAttribute("data-toolbar-add-hover","true")},[]),u=react.useCallback(({$component:t,componentUid:e})=>{if(!t){let r=document.body.querySelector("#storefront")?.querySelector(`[data-uid="${e}"]`);if(!r)return;t=r}let r=getDOMElementParents.getDOMElementParents(t,'[data-uid][data-component-type="component"]:not([data-component-no-setting])',1);if(r.length){for(let t of r)t&&d({$component:t,isParent:!0});c({$component:t,$parents:r})}},[d]),c=({$component:t,$parents:e})=>{if(!t||!e?.length)return;let r=getChildrenByAttrSelector.getChildrenByAttrSelector(t,"data-toolbar-hover-focus");if(r){let t=r.getBoundingClientRect(),o=!!r.getAttribute("data-toolbar-hover-revert"),a=!!r.getAttribute("data-toolbar-hover-inside"),i=1;for(let r of e)if(r){let e=r.getAttribute("data-component-tag");if("Section"===e)continue;let n=getChildrenByAttrSelector.getChildrenByAttrSelector(r,"data-toolbar-hover");if(n){let e=n.getAttribute("data-toolbar-active");if(e)continue;let r=n.getBoundingClientRect(),l=o||a;if(isOverParent.isOverParent({current:t,parent:r,index:i,revert:l})){let e=getComputedStyle(n),o=t.top-r.top,a=t.left-r.left,d=parseFloat(e.top)+o-(_const.TOOLBAR_HOVER_HEIGHT-1)*i;l&&(d=parseFloat(e.top)-o+(_const.TOOLBAR_HOVER_HEIGHT-1)*i);let u=parseFloat(e.left)+a;n.setAttribute("style",`top: ${d}px;left: ${u}px;`),i++}}}}},s=react.useCallback(()=>{let t=["data-outline-overlay-theme-section","data-theme-section-status-active"],e=i.current;if(e.length)for(let r of e){let e=r.querySelectorAll(t.map(t=>`[${t}]`).join(","));e&&t.forEach(t=>{e.forEach(e=>e.removeAttribute(t))})}i.current=[]},[]),b=react.useCallback(()=>{let t=["data-toolbar-hover-focus","data-toolbar-hover","data-outline-hover-focus","data-toolbar-hover-revert","data-toolbar-hover-inside","data-outline-hover","data-toolbar-add-hover","data-outline-parent-hover","data-toolbar-hover-overflow"],e=a.current;if(e.length)for(let r of e){let e=r.querySelectorAll(t.map(t=>`[${t}]`).join(","));e&&t.forEach(t=>{e.forEach(e=>e.removeAttribute(t))})}s(),a.current=[]},[s]),f=react.useCallback(()=>{t.current=null;let e=["data-toolbar-active","data-outline-active","data-toolbar-add-active","data-toolbar-active-revert","data-toolbar-active-inside","data-spacing-margin-bottom-active","data-toolbar-force-hover","data-outline-force-hover","data-toolbar-active-overflow"],o=n.current;if(o.length)for(let t of o){let r=t.querySelectorAll(e.map(t=>`[${t}]`).join(","));r&&e.forEach(t=>{r.forEach(e=>e.removeAttribute(t))})}n.current=[],m(!1),r.current&&r.current()},[]),v=react.useCallback(({$component:t})=>{if(!t)return;let e=getComputedStyle(t),r=getChildrenByAttrSelector.getChildrenByAttrSelector(t,"data-spacing"),o=r?.querySelector("[data-spacing-margin-bottom]")||null;if(o){let t=o.querySelector("[data-spacing-margin-bottom-bg]")||null,r=o.querySelector("[data-spacing-margin-bottom-drag]")||null;if(t&&r){let a=e.marginBottom;t.style.height=a,r.style.top=a,o.setAttribute("data-spacing-margin-bottom-active","true")}}},[]),h=({componentUid:t,productId:e,articleId:r,marqueeKey:o})=>r?`${r?`[data-article-id="${r}"][data-uid="${t}"], [data-article-id="${r}"] [data-uid="${t}"]`:`[data-uid="${t}"]`}`:o?`[marquee-item-key="${o}"] [data-uid="${t}"]`:`${e?`[data-product-id="${e}"][data-uid="${t}"], [data-product-id="${e}"] [data-uid="${t}"]`:`[data-uid="${t}"]`}`,g=react.useCallback(async({componentUid:e,productId:r,timeAwait:o=600,articleId:a,forceReActive:i,marqueeKey:d})=>{if(!e)return;let u=h({componentUid:e,productId:r,articleId:a,marqueeKey:d}),c=await waitForElementToExist.waitForElementToExist(u,o);if(!c||!i&&e==t.current?.componentUid&&r==t.current?.productId&&a==t.current?.articleId&&d==t.current?.marqueeKey)return;(e!==t.current?.componentUid||r!==t.current?.productId||a!==t.current?.articleId||i)&&f(),(i||e===t.current?.componentUid)&&r===t.current?.productId&&d===t.current?.marqueeKey||f(),n.current.push(c);let s=getChildrenByAttrSelector.getChildrenByAttrSelector(c,"data-toolbar"),g=getChildrenByAttrSelector.getChildrenByAttrSelector(c,"data-outline"),m=getChildrenByAttrSelector.getChildrenByAttrSelector(c,"data-toolbar-add-top"),A=getChildrenByAttrSelector.getChildrenByAttrSelector(c,"data-toolbar-add-bottom");s&&(t.current={componentUid:e,productId:r,articleId:a,marqueeKey:d},s.removeAttribute("style"),s.setAttribute("data-toolbar-active","true"),l({$toolbar:s,$component:c,state:"active"})),g&&g.setAttribute("data-outline-active","true"),m&&m.setAttribute("data-toolbar-add-active","true"),A&&A.setAttribute("data-toolbar-add-active","true");let{$isChildOfMarquee:p,$section:y}=findDOMClosest.findDOMClosest(c,{$isChildOfMarquee:'[data-component-tag="Marquee"]',$section:'[data-component-tag="Section"]'});if(y&&(r||a||p)){let t=y.querySelectorAll(`[data-uid="${e}"]`);t?.length&&t.forEach(t=>{n.current.push(t);let e=getChildrenByAttrSelector.getChildrenByAttrSelector(t,"data-outline");e&&e.setAttribute("data-outline-active","true")})}v({$component:c}),b()},[f,b,v]),m=async e=>{if(e){if(t.current?.componentUid){let r=h({...t.current}),o=await waitForElementToExist.waitForElementToExist(r,500);if(o){let t=getChildrenByAttrSelector.getChildrenByAttrSelector(o,"data-toolbar"),r=getChildrenByAttrSelector.getChildrenByAttrSelector(o,"data-outline"),a=getChildrenByAttrSelector.getChildrenByAttrSelector(o,"data-spacing");t&&e&&t.setAttribute("data-toolbar-editor-inline-focus","true"),r&&e&&r.setAttribute("data-outline-editor-inline-focus","true"),a&&e&&a.setAttribute("data-spacing-hidden","true")}}}else{let t=document.body.querySelector("#storefront")?.querySelectorAll("[data-outline-editor-inline-focus],[data-toolbar-editor-inline-focus],[data-spacing-hidden]");t?.length&&t.forEach(t=>{t&&(t.removeAttribute("data-toolbar-editor-inline-focus"),t.removeAttribute("data-outline-editor-inline-focus"),t.removeAttribute("data-spacing-hidden"))})}},A=react.useCallback(e=>{let r=e.closest("[data-theme-section]"),o=r?.getAttribute("data-uid"),a=r&&o===t.current?.componentUid;if(!a)return;i.current.push(r);let n=getChildrenByAttrSelector.getChildrenByAttrSelector(r,"data-theme-section-status");n&&n.setAttribute("data-theme-section-status-active","true")},[]),p=async({value:e})=>{if(!e||!t.current)return;let r=!1,o=h({...t.current}),a=await waitForElementToExist.waitForElementToExist(o,500);if(a){let e=a?.querySelectorAll("[data-toolbar-parent]");if(e.length){let o=t=>{if(r)return;let e=t.getAttribute("data-parent-uid");if(!e)return;let o=document.body.querySelector("#storefront")?.querySelectorAll(`[data-uid="${e}"]`);o?.length&&o.forEach(t=>{let e=getChildrenByAttrSelector.getChildrenByAttrSelector(t,"data-outline");e&&(e.setAttribute("data-outline-force-hover","true"),e.setAttribute("data-outline-force-overlay","true"))})},a=t=>{let e=t.getAttribute("data-parent-uid");if(!e)return;let r=document.body.querySelector("#storefront")?.querySelectorAll(`[data-uid="${e}"]`);r?.length&&r.forEach(t=>{let e=getChildrenByAttrSelector.getChildrenByAttrSelector(t,"data-outline");e&&(e.removeAttribute("data-outline-force-hover"),e.removeAttribute("data-outline-force-overlay"))})},i=async e=>{r=!0;let o=e.getAttribute("data-parent-uid");if(!o)return;let i=async()=>{let t=await waitForElementToExist.waitForElementToExist(`[data-uid="${o}"]`,500),e=t?.closest("[data-product-id]");return!!e?.getAttribute("data-product-id")},n=async()=>{let t=await waitForElementToExist.waitForElementToExist(`[data-uid="${o}"]`,500),e=t?.closest("[data-article-id]");return!!e?.getAttribute("data-article-id")},l="",d="";await i()&&(l=t.current?.productId||""),await n()&&(d=t.current?.articleId||"");let u=new CustomEvent("editor:toolbar:force-active-component",{bubbles:!0,detail:{componentUid:o,productId:l,articleId:d,elementTag:e.getAttribute("data-component-tag")||""}});a(e),window.dispatchEvent(u),setTimeout(()=>{r=!1},0)};e.forEach(t=>{t.addEventListener("mouseover",()=>o(t)),t.addEventListener("mouseout",()=>a(t)),t.addEventListener("click",()=>i(t))})}}},y=react.useCallback(r=>{if(e.current||o.current)return;let a=r.target;if(!a||"function"!=typeof a.closest){s(),b();return}let{$toolbarHover:i,$component:n,$themeSection:l,$shopifySection:c}=findDOMClosest.findDOMClosest(a,{$toolbarHover:"[data-toolbar-hover]",$component:"[data-toolbar-wrap]",$themeSection:"[data-theme-section]",$shopifySection:"[data-shopify-section]"});if(i)return;let f=n?.getAttribute("data-uid");if(!n||!f||"ROOT"==f){b();return}let v=getChildrenByAttrSelector.getChildrenByAttrSelector(n,"data-toolbar");if(!f||"ROOT"==f||v?.getAttribute("data-toolbar-hover-focus"))return;v?.getAttribute("data-toolbar-hover-focus")||b(),A(a);let h=l||c;if(f==t.current?.componentUid){if(t.current.productId){let e=n.closest("[data-product-id]");if(e){let r=e.getAttribute("data-product-id");if(r==t.current.productId){b();return}}}if(!h)return;d({$component:h,focus:!0,isPreventSection:!0})}h?d({$component:h,focus:!0,isPreventSection:!0}):(d({$component:n,componentUid:f,focus:!0}),u({$component:n,componentUid:f}))},[A,b,d,u,s,t]),C=react.useCallback(t=>{if(e.current)return;let r=t.detail;r?.componentUid?g({componentUid:r.componentUid,productId:r.productId,articleId:r.articleId,marqueeKey:r.marqueeKey}):f()},[g,f,e]),S=react.useCallback(()=>{b()},[b]),w=react.useCallback(t=>{let r=t.detail;r.value&&(b(),f()),e.current=r.value},[b,f]),E=react.useCallback(t=>{let e=t.detail;e.value?m(!0):m(!1)},[]),B=react.useCallback(t=>{if(e.current)return;let r=t.detail;p({value:r?.value||!1})},[]),$=react.useCallback(t=>{let e=t.detail;e?.value?(b(),o.current=!0):o.current=!1},[b]),q=(t,e)=>{if(!t)return;let r=document.body.querySelector("#storefront")?.querySelectorAll(`[data-uid="${t}"]`);r?.length&&r.forEach(t=>{let r=getChildrenByAttrSelector.getChildrenByAttrSelector(t,"data-outline");r&&("in"===e?(r.setAttribute("data-outline-force-hover","true"),r.setAttribute("data-outline-force-overlay","true")):(r.removeAttribute("data-outline-force-hover"),r.removeAttribute("data-outline-force-overlay")))})},O=react.useCallback(t=>{if(e.current)return;let r=t.detail;r?.componentUid&&q(r?.componentUid,r?.type)},[e]),T=e=>{let r=e.detail;t.current?.componentUid&&r?.componentUid==t.current?.componentUid&&g({...t.current})};return react.useEffect(()=>(document.addEventListener("mousemove",y),window.addEventListener("editor:active-component",C),window.addEventListener("editor:focus-outside-preview",S),window.addEventListener("editor:is-dragging",w),window.addEventListener("editor:is-editing-text-editor",E),window.addEventListener("editor:toolbar:show-parents",B),window.addEventListener("editor:toolbar:resize-spacing",$),window.addEventListener("editor:hover-component",O),window.addEventListener("editor:component:render",T),()=>{document.removeEventListener("mousemove",y),window.removeEventListener("editor:active-component",C),window.removeEventListener("editor:is-dragging",S),window.removeEventListener("editor:is-dragging",w),window.removeEventListener("editor:is-editing-text-editor",E),window.removeEventListener("editor:toolbar:show-parents",B),window.removeEventListener("editor:toolbar:resize-spacing",$),window.removeEventListener("editor:hover-component",O),window.removeEventListener("editor:component:render",T)}),[y,C,S,w,E,B,$,O,T]),jsxRuntime.jsx(jsxRuntime.Fragment,{})};var Toolbar$1=react.memo(Toolbar);exports.default=Toolbar$1;
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),react=require("react"),getDOMElementParents=require("./toolbar/utils/getDOMElementParents.js"),_const=require("./toolbar/const.js"),getChildrenByAttrSelector=require("./toolbar/utils/getChildrenByAttrSelector.js"),findOverflowParent=require("./toolbar/utils/findOverflowParent.js"),waitForElementToExist=require("./toolbar/utils/waitForElementToExist.js"),isOverParent=require("./toolbar/utils/isOverParent.js"),findDOMClosest=require("./toolbar/utils/findDOMClosest.js");const Toolbar=()=>{let t=react.useRef(null),e=react.useRef(!1),r=react.useRef(),o=react.useRef(!1),a=react.useRef([]),i=react.useRef([]),n=react.useRef([]),l=({state:t,$toolbar:e,$component:r})=>{let o=findOverflowParent.findOverflowParent(r,e),a=e.getBoundingClientRect(),i=r.getBoundingClientRect(),n=window.innerWidth;o?i?.height<=60?e.setAttribute(`data-toolbar-${t}-revert`,"true"):e.setAttribute(`data-toolbar-${t}-inside`,"true"):a.top<_const.TOOLBAR_ACTIVE_HEIGHT+1&&(i?.height<=60?e.setAttribute(`data-toolbar-${t}-revert`,"true"):e.setAttribute(`data-toolbar-${t}-inside`,"true")),i.left+a.width>n&&e.setAttribute(`data-toolbar-${t}-overflow`,"true");let l=r?.closest('[aria-label="Dialog body"]');if(l){let r=l.getBoundingClientRect(),o=r.left+r.width-20;i.left+a.width>o&&e.setAttribute(`data-toolbar-${t}-overflow`,"true")}},d=react.useCallback(({$component:t,componentUid:e,focus:r,isPreventSection:o,isParent:n})=>{if(!t&&!e)return;if(!t){let r=document.body.querySelector("#storefront")?.querySelector(`[data-uid="${e}"]`);if(!r)return;t=r}if(!e){let r=t.getAttribute("data-uid");if(!r)return;e=r}a.current.push(t);let d=getChildrenByAttrSelector.getChildrenByAttrSelector(t,"data-toolbar"),u=getChildrenByAttrSelector.getChildrenByAttrSelector(t,"data-outline"),c=getChildrenByAttrSelector.getChildrenByAttrSelector(t,"data-toolbar-add-top"),s=getChildrenByAttrSelector.getChildrenByAttrSelector(t,"data-toolbar-add-bottom"),b=getChildrenByAttrSelector.getChildrenByAttrSelector(t,"data-theme-section-status");o&&b&&b.setAttribute("data-theme-section-status-active","true"),d&&(d.removeAttribute("style"),n||d.setAttribute("data-toolbar-hover","true"),r&&d.setAttribute("data-toolbar-hover-focus","true"),l({$toolbar:d,$component:t,state:"hover"})),u&&(u.setAttribute("data-outline-hover","true"),n&&u.setAttribute("data-outline-parent-hover","true"),o&&(i.current.push(t),u.setAttribute("data-outline-overlay-theme-section","true")),r&&u.setAttribute("data-outline-hover-focus","true")),c&&!n&&c.setAttribute("data-toolbar-add-hover","true"),s&&!n&&s.setAttribute("data-toolbar-add-hover","true")},[]),u=react.useCallback(({$component:t,componentUid:e})=>{if(!t){let r=document.body.querySelector("#storefront")?.querySelector(`[data-uid="${e}"]`);if(!r)return;t=r}let r=getDOMElementParents.getDOMElementParents(t,'[data-uid][data-component-type="component"]:not([data-component-no-setting])',1);if(r.length){for(let t of r)t&&d({$component:t,isParent:!0});c({$component:t,$parents:r})}},[d]),c=({$component:t,$parents:e})=>{if(!t||!e?.length)return;let r=getChildrenByAttrSelector.getChildrenByAttrSelector(t,"data-toolbar-hover-focus");if(r){let t=r.getBoundingClientRect(),o=!!r.getAttribute("data-toolbar-hover-revert"),a=!!r.getAttribute("data-toolbar-hover-inside"),i=1;for(let r of e)if(r){let e=r.getAttribute("data-component-tag");if("Section"===e)continue;let n=getChildrenByAttrSelector.getChildrenByAttrSelector(r,"data-toolbar-hover");if(n){let e=n.getAttribute("data-toolbar-active");if(e)continue;let r=n.getBoundingClientRect(),l=o||a;if(isOverParent.isOverParent({current:t,parent:r,index:i,revert:l})){let e=getComputedStyle(n),o=t.top-r.top,a=t.left-r.left,d=parseFloat(e.top)+o-(_const.TOOLBAR_HOVER_HEIGHT-1)*i;l&&(d=parseFloat(e.top)-o+(_const.TOOLBAR_HOVER_HEIGHT-1)*i);let u=parseFloat(e.left)+a;n.setAttribute("style",`top: ${d}px;left: ${u}px;`),i++}}}}},s=react.useCallback(()=>{let t=["data-outline-overlay-theme-section","data-theme-section-status-active"],e=i.current;if(e.length)for(let r of e){let e=r.querySelectorAll(t.map(t=>`[${t}]`).join(","));e&&t.forEach(t=>{e.forEach(e=>e.removeAttribute(t))})}i.current=[]},[]),b=react.useCallback(()=>{let t=["data-toolbar-hover-focus","data-toolbar-hover","data-outline-hover-focus","data-toolbar-hover-revert","data-toolbar-hover-inside","data-outline-hover","data-toolbar-add-hover","data-outline-parent-hover","data-toolbar-hover-overflow"],e=a.current;if(e.length)for(let r of e){let e=r.querySelectorAll(t.map(t=>`[${t}]`).join(","));e&&t.forEach(t=>{e.forEach(e=>e.removeAttribute(t))})}s(),a.current=[]},[s]),f=react.useCallback(()=>{t.current=null;let e=["data-toolbar-active","data-outline-active","data-toolbar-add-active","data-toolbar-active-revert","data-toolbar-active-inside","data-spacing-margin-bottom-active","data-toolbar-force-hover","data-outline-force-hover","data-toolbar-active-overflow"],o=n.current;if(o.length)for(let t of o){let r=t.querySelectorAll(e.map(t=>`[${t}]`).join(","));r&&e.forEach(t=>{r.forEach(e=>e.removeAttribute(t))})}n.current=[],g(!1),r.current&&r.current()},[]),m=react.useCallback(({$component:t})=>{if(!t)return;let e=getComputedStyle(t),r=getChildrenByAttrSelector.getChildrenByAttrSelector(t,"data-spacing"),o=r?.querySelector("[data-spacing-margin-bottom]")||null;if(o){let t=o.querySelector("[data-spacing-margin-bottom-bg]")||null,r=o.querySelector("[data-spacing-margin-bottom-drag]")||null;if(t&&r){let a=e.marginBottom;t.style.height=a,r.style.top=a,o.setAttribute("data-spacing-margin-bottom-active","true")}}},[]),v=({componentUid:t,productId:e,articleId:r,marqueeKey:o,carouselItemKey:a})=>r?`${r?`[data-article-id="${r}"][data-uid="${t}"], [data-article-id="${r}"] [data-uid="${t}"]`:`[data-uid="${t}"]`}`:o?`[marquee-item-key="${o}"] [data-uid="${t}"]`:a?`[data-carousel-item-key="${a}"] [data-uid="${t}"]`:`${e?`[data-product-id="${e}"][data-uid="${t}"], [data-product-id="${e}"] [data-uid="${t}"]`:`[data-uid="${t}"]`}`,h=react.useCallback(async({componentUid:e,productId:r,timeAwait:o=600,articleId:a,forceReActive:i,marqueeKey:d,carouselItemKey:u})=>{if(!e)return;let c=v({componentUid:e,productId:r,articleId:a,marqueeKey:d,carouselItemKey:u}),s=await waitForElementToExist.waitForElementToExist(c,o);if(!s||!i&&e==t.current?.componentUid&&r==t.current?.productId&&a==t.current?.articleId&&d==t.current?.marqueeKey&&u==t.current?.carouselItemKey)return;(e!==t.current?.componentUid||r!==t.current?.productId||a!==t.current?.articleId||u!==t.current?.carouselItemKey||i)&&f(),(i||e===t.current?.componentUid)&&r===t.current?.productId&&d===t.current?.marqueeKey&&u===t.current?.carouselItemKey||f(),n.current.push(s);let h=getChildrenByAttrSelector.getChildrenByAttrSelector(s,"data-toolbar"),g=getChildrenByAttrSelector.getChildrenByAttrSelector(s,"data-outline"),A=getChildrenByAttrSelector.getChildrenByAttrSelector(s,"data-toolbar-add-top"),y=getChildrenByAttrSelector.getChildrenByAttrSelector(s,"data-toolbar-add-bottom");h&&(t.current={componentUid:e,productId:r,articleId:a,marqueeKey:d,carouselItemKey:u},h.removeAttribute("style"),h.setAttribute("data-toolbar-active","true"),l({$toolbar:h,$component:s,state:"active"})),g&&g.setAttribute("data-outline-active","true"),A&&A.setAttribute("data-toolbar-add-active","true"),y&&y.setAttribute("data-toolbar-add-active","true");let{$isChildOfMarquee:p,$section:C}=findDOMClosest.findDOMClosest(s,{$isChildOfMarquee:'[data-component-tag="Marquee"]',$section:'[data-component-tag="Section"]'});if(C&&(r||a||p)){let t=C.querySelectorAll(`[data-uid="${e}"]`);t?.length&&t.forEach(t=>{n.current.push(t);let e=getChildrenByAttrSelector.getChildrenByAttrSelector(t,"data-outline");e&&e.setAttribute("data-outline-active","true")})}m({$component:s}),b()},[f,b,m]),g=async e=>{if(e){if(t.current?.componentUid){let r=v({...t.current}),o=await waitForElementToExist.waitForElementToExist(r,500);if(o){let t=getChildrenByAttrSelector.getChildrenByAttrSelector(o,"data-toolbar"),r=getChildrenByAttrSelector.getChildrenByAttrSelector(o,"data-outline"),a=getChildrenByAttrSelector.getChildrenByAttrSelector(o,"data-spacing");t&&e&&t.setAttribute("data-toolbar-editor-inline-focus","true"),r&&e&&r.setAttribute("data-outline-editor-inline-focus","true"),a&&e&&a.setAttribute("data-spacing-hidden","true")}}}else{let t=document.body.querySelector("#storefront")?.querySelectorAll("[data-outline-editor-inline-focus],[data-toolbar-editor-inline-focus],[data-spacing-hidden]");t?.length&&t.forEach(t=>{t&&(t.removeAttribute("data-toolbar-editor-inline-focus"),t.removeAttribute("data-outline-editor-inline-focus"),t.removeAttribute("data-spacing-hidden"))})}},A=react.useCallback(e=>{let r=e.closest("[data-theme-section]"),o=r?.getAttribute("data-uid"),a=r&&o===t.current?.componentUid;if(!a)return;i.current.push(r);let n=getChildrenByAttrSelector.getChildrenByAttrSelector(r,"data-theme-section-status");n&&n.setAttribute("data-theme-section-status-active","true")},[]),y=async({value:e})=>{if(!e||!t.current)return;let r=!1,o=v({...t.current}),a=await waitForElementToExist.waitForElementToExist(o,500);if(a){let e=a?.querySelectorAll("[data-toolbar-parent]");if(e.length){let o=t=>{if(r)return;let e=t.getAttribute("data-parent-uid");if(!e)return;let o=document.body.querySelector("#storefront")?.querySelectorAll(`[data-uid="${e}"]`);o?.length&&o.forEach(t=>{let e=getChildrenByAttrSelector.getChildrenByAttrSelector(t,"data-outline");e&&(e.setAttribute("data-outline-force-hover","true"),e.setAttribute("data-outline-force-overlay","true"))})},a=t=>{let e=t.getAttribute("data-parent-uid");if(!e)return;let r=document.body.querySelector("#storefront")?.querySelectorAll(`[data-uid="${e}"]`);r?.length&&r.forEach(t=>{let e=getChildrenByAttrSelector.getChildrenByAttrSelector(t,"data-outline");e&&(e.removeAttribute("data-outline-force-hover"),e.removeAttribute("data-outline-force-overlay"))})},i=async e=>{r=!0;let o=e.getAttribute("data-parent-uid");if(!o)return;let i=async()=>{let t=await waitForElementToExist.waitForElementToExist(`[data-uid="${o}"]`,500),e=t?.closest("[data-product-id]");return!!e?.getAttribute("data-product-id")},n=async()=>{let t=await waitForElementToExist.waitForElementToExist(`[data-uid="${o}"]`,500),e=t?.closest("[data-article-id]");return!!e?.getAttribute("data-article-id")},l=async()=>{let t=await waitForElementToExist.waitForElementToExist(`[data-uid="${o}"]`,500),e=t?.closest("[data-carousel-item-key]");return!!e?.getAttribute("data-carousel-item-key")},d="",u="",c="";await i()&&(d=t.current?.productId||""),await n()&&(u=t.current?.articleId||""),await l()&&(c=t.current?.carouselItemKey||"");let s=new CustomEvent("editor:toolbar:force-active-component",{bubbles:!0,detail:{componentUid:o,productId:d,articleId:u,carouselItemKey:c,elementTag:e.getAttribute("data-component-tag")||""}});a(e),window.dispatchEvent(s),setTimeout(()=>{r=!1},0)};e.forEach(t=>{t.addEventListener("mouseover",()=>o(t)),t.addEventListener("mouseout",()=>a(t)),t.addEventListener("click",()=>i(t))})}}},p=react.useCallback(r=>{if(e.current||o.current)return;let a=r.target;if(!a||"function"!=typeof a.closest){s(),b();return}let{$toolbarHover:i,$component:n,$themeSection:l,$shopifySection:c}=findDOMClosest.findDOMClosest(a,{$toolbarHover:"[data-toolbar-hover]",$component:"[data-toolbar-wrap]",$themeSection:"[data-theme-section]",$shopifySection:"[data-shopify-section]"});if(i)return;let f=n?.getAttribute("data-uid");if(!n||!f||"ROOT"==f){b();return}let m=getChildrenByAttrSelector.getChildrenByAttrSelector(n,"data-toolbar");if(!f||"ROOT"==f||m?.getAttribute("data-toolbar-hover-focus"))return;m?.getAttribute("data-toolbar-hover-focus")||b(),A(a);let v=l||c;if(f==t.current?.componentUid){if(t.current.productId){let e=n.closest("[data-product-id]");if(e){let r=e.getAttribute("data-product-id");if(r==t.current.productId){b();return}}}if(!v)return;d({$component:v,focus:!0,isPreventSection:!0})}v?d({$component:v,focus:!0,isPreventSection:!0}):(d({$component:n,componentUid:f,focus:!0}),u({$component:n,componentUid:f}))},[A,b,d,u,s,t]),C=react.useCallback(t=>{if(e.current)return;let r=t.detail;r?.componentUid?h({componentUid:r.componentUid,productId:r.productId,articleId:r.articleId,marqueeKey:r.marqueeKey,carouselItemKey:r.carouselItemKey}):f()},[h,f,e]),w=react.useCallback(()=>{b()},[b]),E=react.useCallback(t=>{let r=t.detail;r.value&&(b(),f()),e.current=r.value},[b,f]),S=react.useCallback(t=>{let e=t.detail;e.value?g(!0):g(!1)},[]),B=react.useCallback(t=>{if(e.current)return;let r=t.detail;y({value:r?.value||!1})},[]),$=react.useCallback(t=>{let e=t.detail;e?.value?(b(),o.current=!0):o.current=!1},[b]),q=(t,e)=>{if(!t)return;let r=document.body.querySelector("#storefront")?.querySelectorAll(`[data-uid="${t}"]`);r?.length&&r.forEach(t=>{let r=getChildrenByAttrSelector.getChildrenByAttrSelector(t,"data-outline");r&&("in"===e?(r.setAttribute("data-outline-force-hover","true"),r.setAttribute("data-outline-force-overlay","true")):(r.removeAttribute("data-outline-force-hover"),r.removeAttribute("data-outline-force-overlay")))})},O=react.useCallback(t=>{if(e.current)return;let r=t.detail;r?.componentUid&&q(r?.componentUid,r?.type)},[e]),T=e=>{let r=e.detail;t.current?.componentUid&&r?.componentUid==t.current?.componentUid&&h({...t.current})};return react.useEffect(()=>(document.addEventListener("mousemove",p),window.addEventListener("editor:active-component",C),window.addEventListener("editor:focus-outside-preview",w),window.addEventListener("editor:is-dragging",E),window.addEventListener("editor:is-editing-text-editor",S),window.addEventListener("editor:toolbar:show-parents",B),window.addEventListener("editor:toolbar:resize-spacing",$),window.addEventListener("editor:hover-component",O),window.addEventListener("editor:component:render",T),()=>{document.removeEventListener("mousemove",p),window.removeEventListener("editor:active-component",C),window.removeEventListener("editor:is-dragging",w),window.removeEventListener("editor:is-dragging",E),window.removeEventListener("editor:is-editing-text-editor",S),window.removeEventListener("editor:toolbar:show-parents",B),window.removeEventListener("editor:toolbar:resize-spacing",$),window.removeEventListener("editor:hover-component",O),window.removeEventListener("editor:component:render",T)}),[p,C,w,E,S,B,$,O,T]),jsxRuntime.jsx(jsxRuntime.Fragment,{})};var Toolbar$1=react.memo(Toolbar);exports.default=Toolbar$1;
@@ -1 +1 @@
1
- "use strict";var nextjs=require("@sentry/nextjs"),normalize=require("../helpers/normalize.js"),parseJson=require("../helpers/parse-json.js"),genCss=require("../helpers/gen-css.js"),googleFonts=require("../google-fonts.js"),customFonts=require("../custom-fonts.js");const getSharePageProps=e=>async t=>{try{let{sharedPage:s,customFonts:o}=await e([t]);if(!s)return null;let{page:r,themeStyle:n,share:a,pageSections:l,pageMeta:i,shopMeta:u,products:p,collections:g,articles:m}=s,c=normalize.parseBuilderTemplateV2(s),[h,F,d]=await Promise.all([googleFonts.getFontStyleFromPageTemplate(c),googleFonts.getFontFromGlobalStyle(n?.data),customFonts.getCustomFonts(o)]),j={defaultTitle:u?.shop?.name??"",title:a?.title,openGraph:{site_name:u?.shop?.name??"",locale:u?.localization?.country?.isoCode??"",title:a?.title??u?.shop?.name??"",description:a?.description??u?.shop?.description??"",images:a?.thumbnails?a.thumbnails:[]},nofollow:!0,noindex:!0};return parseJson.serializableJson({seo:j,builderData:c,page:r,themeStyle:genCss.genCSS(n?.data,!1),share:a,pageSections:l,pageMeta:i,shopMeta:u,products:p,collections:g,articles:m,elementFontStyle:h,fontStyle:F,customFonts:d})}catch(e){return nextjs.captureException(e),null}};exports.getSharePageProps=getSharePageProps;
1
+ "use strict";var nextjs=require("@sentry/nextjs"),normalize=require("../helpers/normalize.js"),parseJson=require("../helpers/parse-json.js"),genCss=require("../helpers/gen-css.js"),googleFonts=require("../google-fonts.js"),customFonts=require("../custom-fonts.js");const getSharePageProps=e=>async t=>{try{let{sharedPage:s,customFonts:o,products:r,collections:n,articles:a}=await e([t]);if(!s)return null;let{page:l,themeStyle:i,share:u,pageMeta:p,shopMeta:g}=s,{sectionPosition:m}=l,c=normalize.parseBuilderTemplateV2({...s,sectionPosition:m}),[h,F,d]=await Promise.all([googleFonts.getFontStyleFromPageTemplate(c),googleFonts.getFontFromGlobalStyle(i?.data),customFonts.getCustomFonts(o)]),j={defaultTitle:g?.shop?.name??"",title:u?.title,openGraph:{site_name:g?.shop?.name??"",locale:g?.localization?.country?.isoCode??"",title:u?.title??g?.shop?.name??"",description:u?.description??g?.shop?.description??"",images:u?.thumbnails?u.thumbnails:[]},nofollow:!0,noindex:!0};return parseJson.serializableJson({seo:j,builderData:c,page:l,themeStyle:genCss.genCSS(i?.data,!1),share:u,pageMeta:p,shopMeta:g,products:r,collections:n,articles:a,elementFontStyle:h,fontStyle:F,customFonts:d})}catch(e){return nextjs.captureException(e),null}};exports.getSharePageProps=getSharePageProps;
@@ -1 +1 @@
1
- "use strict";var getStorefrontApi=require("./get-storefront-api.js"),extractOperation=require("./helpers/extract-operation.js");const createFetcher=e=>{let r=e||process.env.NEXT_PUBLIC_SHOP_TOKEN;return async e=>{let[t,o,n]=e;if(!r)throw Error("shopToken is not defined");let s=process.env.NEXT_PUBLIC_API_URL;if(!s)throw Error("NEXT_PUBLIC_API_URL is not defined");let i=extractOperation.extractOperation(t);i&&(s=`${s}?gp-online-store-operation=${i}`);let a={"Content-Type":"application/json","X-GemX-Shop-Token":r};return fetch(s,{method:"POST",headers:a,body:JSON.stringify({query:t,variables:o,operationName:n})}).then(e=>e.json()).then(e=>e.errors?Promise.reject(e.errors):e.data)}},createAppAPIFetcher=(e,r)=>{let t=process.env.NEXT_APP_API_URL;return async o=>{let[n,s,i]=o;if(!e)throw Error("shopToken is not defined");if(!t)throw Error("NEXT_APP_API_URL is not defined");let a=extractOperation.extractOperation(n);a&&(t=`${t}?gp-online-store-operation=${a}`);let c={"Content-Type":"application/json",Authorization:`Token ${e}`,"X-GemX-Shop-ID":r||""};return fetch(`${t}?gp-online-store-operation=${i}`,{method:"POST",headers:c,body:JSON.stringify({query:n,variables:s,operationName:i})}).then(e=>e.json()).then(e=>e.errors?Promise.reject(e.errors):e.data)}},createShopifyFetcher=(e,r)=>{let t=e??process.env.NEXT_PUBLIC_STOREFRONT_TOKEN,o=r??process.env.NEXT_PUBLIC_STOREFRONT_HANDLE;return async e=>{if(!t)throw Error("NEXT_PUBLIC_STOREFRONT_TOKEN is not defined");if(!o)throw Error("NEXT_PUBLIC_STOREFRONT_HANDLE is not defined");let r={"Content-Type":"application/json","X-Shopify-Storefront-Access-Token":t},[n,s]=e;return fetch(getStorefrontApi.getStorefrontApi(o),{method:"POST",headers:r,body:JSON.stringify({query:n,variables:s})}).then(e=>e.json()).then(e=>e.errors?Promise.reject(e.errors):e.data)}},createTemplateFetcher=e=>{let r=process.env.NEXT_PUBLIC_URL_SHARE_PAGE;return async()=>{if(!r)throw Error("NEXT_PUBLIC_URL_SHARE_PAGE is not defined");try{let t=await fetch(`${r}/share/page/${e}`,{method:"GET"});if(!t.ok)throw Error(`HTTP error! status: ${t.status}`);let o=await t.json();if(o.errors)throw Error(`API errors: ${JSON.stringify(o.errors)}`);return o.result}catch(e){throw console.error("Template fetcher error:",e),e}}};exports.createAppAPIFetcher=createAppAPIFetcher,exports.createFetcher=createFetcher,exports.createShopifyFetcher=createShopifyFetcher,exports.createTemplateFetcher=createTemplateFetcher;
1
+ "use strict";var getStorefrontApi=require("./get-storefront-api.js"),extractOperation=require("./helpers/extract-operation.js");const createFetcher=e=>{let r=e||process.env.NEXT_PUBLIC_SHOP_TOKEN;return async e=>{let[t,o,n]=e;if(!r)throw Error("shopToken is not defined");let s=process.env.NEXT_PUBLIC_API_URL;if(!s)throw Error("NEXT_PUBLIC_API_URL is not defined");let i=extractOperation.extractOperation(t);i&&(s=`${s}?gp-online-store-operation=${i}`);let a={"Content-Type":"application/json","X-GemX-Shop-Token":r};return fetch(s,{method:"POST",headers:a,body:JSON.stringify({query:t,variables:o,operationName:n})}).then(e=>e.json()).then(e=>e.errors?Promise.reject(e.errors):e.data)}},createAppAPIFetcher=(e,r)=>{let t=process.env.NEXT_APP_API_URL;return async o=>{let[n,s,i]=o;if(!e)throw Error("shopToken is not defined");if(!t)throw Error("NEXT_APP_API_URL is not defined");let a=extractOperation.extractOperation(n);a&&(t=`${t}?gp-online-store-operation=${a}`);let c={"Content-Type":"application/json",Authorization:`Token ${e}`,"X-GemX-Shop-ID":r||""};return fetch(`${t}?gp-online-store-operation=${i}`,{method:"POST",headers:c,body:JSON.stringify({query:n,variables:s,operationName:i})}).then(e=>e.json()).then(e=>e.errors?Promise.reject(e.errors):e.data)}},createShopifyFetcher=(e,r)=>{let t=e??process.env.NEXT_PUBLIC_STOREFRONT_TOKEN,o=r??process.env.NEXT_PUBLIC_STOREFRONT_HANDLE;return async e=>{if(!t)throw Error("NEXT_PUBLIC_STOREFRONT_TOKEN is not defined");if(!o)throw Error("NEXT_PUBLIC_STOREFRONT_HANDLE is not defined");let r={"Content-Type":"application/json","X-Shopify-Storefront-Access-Token":t},[n,s]=e;return fetch(getStorefrontApi.getStorefrontApi(o),{method:"POST",headers:r,body:JSON.stringify({query:n,variables:s})}).then(e=>e.json()).then(e=>e.errors?Promise.reject(e.errors):e.data)}},createTemplateFetcher=e=>{let r=process.env.NEXT_PUBLIC_URL_SHARE_PAGE;return async t=>{if(!r)throw Error("NEXT_PUBLIC_URL_SHARE_PAGE is not defined");try{let t;let o=await fetch(`${r}/share/page/${e}`,{method:"GET"});if(!o.ok)throw Error(`HTTP error! status: ${o.status}`);try{t=await o.text()}catch(e){throw Error(`Invalid JSON response: ${e}`)}let n=JSON.parse(t);if(n.errors)throw Error(`API errors: ${JSON.stringify(n.errors)}`);return n.result}catch(e){throw console.error("Template fetcher error:",e),e}}};exports.createAppAPIFetcher=createAppAPIFetcher,exports.createFetcher=createFetcher,exports.createShopifyFetcher=createShopifyFetcher,exports.createTemplateFetcher=createTemplateFetcher;
@@ -1,5 +1,5 @@
1
- "use strict";var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),nextSeo=require("next-seo"),Head=require("next/head"),router=require("next/router"),parseHtml=require("../libs/parse-html.js"),react=require("react");const PreviewTemplate=({components:e,builderData:t,sectionData:s,seo:r,themeStyle:n,fontStyle:a,elementFontStyle:i,customCodeHeader:l,customFonts:u,productOffers:o,publicStoreFrontData:m,dynamicDiscountOffer:c,isPreview:d,pageBackground:x})=>{let g=router.useRouter(),{t:p}=core.useI18n(),j="custom-code-header";return(react.useEffect(()=>{let e=document.querySelectorAll(`[class*="${j}-"]`),t=[];e.length>1&&e.forEach(e=>{let s=e.className;if(t.includes(s)){e.remove();return}t.push(s)})},[]),g.isFallback)?jsxRuntime.jsx("div",{className:"gp-flex gp-h-[100vh] gp-items-center gp-justify-center",children:jsxRuntime.jsxs("div",{className:"gp-flex gp-gap-2",children:[jsxRuntime.jsx("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_alternate] gp-rounded-full gp-bg-slate-800"}),jsxRuntime.jsx("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_200ms_linear_alternate] gp-rounded-full gp-bg-slate-800"}),jsxRuntime.jsx("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_500ms_alternate] gp-rounded-full gp-bg-slate-800"})]})}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(nextSeo.NextSeo,{...r}),jsxRuntime.jsxs(Head,{children:[parseHtml.parseHtml(j,l,!0),n&&jsxRuntime.jsx("style",{"data-id":"global-style",type:"text/css",dangerouslySetInnerHTML:{__html:n}},"global-style"),a&&jsxRuntime.jsx("style",{"data-id":"google-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:a}},"google-fonts"),i&&i.map(e=>jsxRuntime.jsx("style",{"data-id":"google-element-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:e}},e)),u&&jsxRuntime.jsx("style",{"data-id":"custom-element-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:u}},a),x?.isUsePageBackground&&x?.background&&jsxRuntime.jsx("style",{children:`
1
+ "use strict";var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),nextSeo=require("next-seo"),Head=require("next/head"),router=require("next/router"),parseHtml=require("../libs/parse-html.js"),react=require("react");const PreviewTemplate=({components:e,builderData:t,sectionData:s,seo:r,themeStyle:n,fontStyle:a,elementFontStyle:i,customCodeHeader:l,customFonts:u,products:o,collections:c,articles:m,pageBackground:d,publicStoreFrontData:x})=>{let g=router.useRouter(),{t:p}=core.useI18n(),j="custom-code-header";return(react.useEffect(()=>{let e=document.querySelectorAll(`[class*="${j}-"]`),t=[];e.length>1&&e.forEach(e=>{let s=e.className;if(t.includes(s)){e.remove();return}t.push(s)})},[]),g.isFallback)?jsxRuntime.jsx("div",{className:"gp-flex gp-h-[100vh] gp-items-center gp-justify-center",children:jsxRuntime.jsxs("div",{className:"gp-flex gp-gap-2",children:[jsxRuntime.jsx("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_alternate] gp-rounded-full gp-bg-slate-800"}),jsxRuntime.jsx("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_200ms_linear_alternate] gp-rounded-full gp-bg-slate-800"}),jsxRuntime.jsx("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_500ms_alternate] gp-rounded-full gp-bg-slate-800"})]})}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(nextSeo.NextSeo,{...r}),jsxRuntime.jsxs(Head,{children:[parseHtml.parseHtml(j,l,!0),n&&jsxRuntime.jsx("style",{"data-id":"global-style",type:"text/css",dangerouslySetInnerHTML:{__html:n}},"global-style"),a&&jsxRuntime.jsx("style",{"data-id":"google-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:a}},"google-fonts"),i&&i.map(e=>jsxRuntime.jsx("style",{"data-id":"google-element-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:e}},e)),u&&jsxRuntime.jsx("style",{"data-id":"custom-element-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:u}},a),d?.isUsePageBackground&&d?.background&&jsxRuntime.jsx("style",{children:`
2
2
  body {
3
- background: ${x.background};
3
+ background: ${d.background};
4
4
  }
5
- `},`page_background_${x?.background}`)]}),jsxRuntime.jsx(core.PageProvider,{productOffers:o,publicStoreFrontData:m,dynamicDiscountOffer:c,children:jsxRuntime.jsx(core.BuilderComponentProvider,{components:e,children:jsxRuntime.jsx("div",{children:jsxRuntime.jsx(core.SectionProvider,{data:s,children:jsxRuntime.jsx(core.I18nProvider,{t:p,children:t?.map(e=>jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx(core.BuilderProvider,{state:e.data,lazy:e.lazy,priority:e.priority,isPreview:d,children:jsxRuntime.jsx(core.Render,{uid:e.uid})},e.uid)}))})})})})})]})};exports.PreviewTemplate=PreviewTemplate;
5
+ `},`page_background_${d?.background}`)]}),jsxRuntime.jsx(core.PageProvider,{products:o,collections:c,articles:m,publicStoreFrontData:x,children:jsxRuntime.jsx(core.BuilderComponentProvider,{components:e,children:jsxRuntime.jsx("div",{children:jsxRuntime.jsx(core.SectionProvider,{data:s,children:jsxRuntime.jsx(core.I18nProvider,{t:p,children:t?.map(e=>jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx(core.BuilderProvider,{state:e.data,lazy:e.lazy,priority:e.priority,isPreview:!0,children:jsxRuntime.jsx(core.Render,{uid:e.uid})},e.uid)}))})})})})})]})};exports.PreviewTemplate=PreviewTemplate;
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsx as t,Fragment as e}from"react/jsx-runtime";import{memo as r,useRef as o,useCallback as a,useEffect as i}from"react";import{getDOMElementParents as n}from"./toolbar/utils/getDOMElementParents.js";import{TOOLBAR_ACTIVE_HEIGHT as d,TOOLBAR_HOVER_HEIGHT as u}from"./toolbar/const.js";import{getChildrenByAttrSelector as l}from"./toolbar/utils/getChildrenByAttrSelector.js";import{findOverflowParent as c}from"./toolbar/utils/findOverflowParent.js";import{waitForElementToExist as s}from"./toolbar/utils/waitForElementToExist.js";import{isOverParent as b}from"./toolbar/utils/isOverParent.js";import{findDOMClosest as f}from"./toolbar/utils/findDOMClosest.js";let Toolbar=()=>{let r=o(null),v=o(!1),m=o(),p=o(!1),h=o([]),g=o([]),A=o([]),w=({state:t,$toolbar:e,$component:r})=>{let o=c(r,e),a=e.getBoundingClientRect(),i=r.getBoundingClientRect(),n=window.innerWidth;o?i?.height<=60?e.setAttribute(`data-toolbar-${t}-revert`,"true"):e.setAttribute(`data-toolbar-${t}-inside`,"true"):a.top<d+1&&(i?.height<=60?e.setAttribute(`data-toolbar-${t}-revert`,"true"):e.setAttribute(`data-toolbar-${t}-inside`,"true")),i.left+a.width>n&&e.setAttribute(`data-toolbar-${t}-overflow`,"true");let u=r?.closest('[aria-label="Dialog body"]');if(u){let r=u.getBoundingClientRect(),o=r.left+r.width-20;i.left+a.width>o&&e.setAttribute(`data-toolbar-${t}-overflow`,"true")}},y=a(({$component:t,componentUid:e,focus:r,isPreventSection:o,isParent:a})=>{if(!t&&!e)return;if(!t){let r=document.body.querySelector("#storefront")?.querySelector(`[data-uid="${e}"]`);if(!r)return;t=r}if(!e){let r=t.getAttribute("data-uid");if(!r)return;e=r}h.current.push(t);let i=l(t,"data-toolbar"),n=l(t,"data-outline"),d=l(t,"data-toolbar-add-top"),u=l(t,"data-toolbar-add-bottom"),c=l(t,"data-theme-section-status");o&&c&&c.setAttribute("data-theme-section-status-active","true"),i&&(i.removeAttribute("style"),a||i.setAttribute("data-toolbar-hover","true"),r&&i.setAttribute("data-toolbar-hover-focus","true"),w({$toolbar:i,$component:t,state:"hover"})),n&&(n.setAttribute("data-outline-hover","true"),a&&n.setAttribute("data-outline-parent-hover","true"),o&&(g.current.push(t),n.setAttribute("data-outline-overlay-theme-section","true")),r&&n.setAttribute("data-outline-hover-focus","true")),d&&!a&&d.setAttribute("data-toolbar-add-hover","true"),u&&!a&&u.setAttribute("data-toolbar-add-hover","true")},[]),$=a(({$component:t,componentUid:e})=>{if(!t){let r=document.body.querySelector("#storefront")?.querySelector(`[data-uid="${e}"]`);if(!r)return;t=r}let r=n(t,'[data-uid][data-component-type="component"]:not([data-component-no-setting])',1);if(r.length){for(let t of r)t&&y({$component:t,isParent:!0});E({$component:t,$parents:r})}},[y]),E=({$component:t,$parents:e})=>{if(!t||!e?.length)return;let r=l(t,"data-toolbar-hover-focus");if(r){let t=r.getBoundingClientRect(),o=!!r.getAttribute("data-toolbar-hover-revert"),a=!!r.getAttribute("data-toolbar-hover-inside"),i=1;for(let r of e)if(r){let e=r.getAttribute("data-component-tag");if("Section"===e)continue;let n=l(r,"data-toolbar-hover");if(n){let e=n.getAttribute("data-toolbar-active");if(e)continue;let r=n.getBoundingClientRect(),d=o||a;if(b({current:t,parent:r,index:i,revert:d})){let e=getComputedStyle(n),o=t.top-r.top,a=t.left-r.left,l=parseFloat(e.top)+o-(u-1)*i;d&&(l=parseFloat(e.top)-o+(u-1)*i);let c=parseFloat(e.left)+a;n.setAttribute("style",`top: ${l}px;left: ${c}px;`),i++}}}}},S=a(()=>{let t=["data-outline-overlay-theme-section","data-theme-section-status-active"],e=g.current;if(e.length)for(let r of e){let e=r.querySelectorAll(t.map(t=>`[${t}]`).join(","));e&&t.forEach(t=>{e.forEach(e=>e.removeAttribute(t))})}g.current=[]},[]),q=a(()=>{let t=["data-toolbar-hover-focus","data-toolbar-hover","data-outline-hover-focus","data-toolbar-hover-revert","data-toolbar-hover-inside","data-outline-hover","data-toolbar-add-hover","data-outline-parent-hover","data-toolbar-hover-overflow"],e=h.current;if(e.length)for(let r of e){let e=r.querySelectorAll(t.map(t=>`[${t}]`).join(","));e&&t.forEach(t=>{e.forEach(e=>e.removeAttribute(t))})}S(),h.current=[]},[S]),L=a(()=>{r.current=null;let t=["data-toolbar-active","data-outline-active","data-toolbar-add-active","data-toolbar-active-revert","data-toolbar-active-inside","data-spacing-margin-bottom-active","data-toolbar-force-hover","data-outline-force-hover","data-toolbar-active-overflow"],e=A.current;if(e.length)for(let r of e){let e=r.querySelectorAll(t.map(t=>`[${t}]`).join(","));e&&t.forEach(t=>{e.forEach(e=>e.removeAttribute(t))})}A.current=[],C(!1),m.current&&m.current()},[]),U=a(({$component:t})=>{if(!t)return;let e=getComputedStyle(t),r=l(t,"data-spacing"),o=r?.querySelector("[data-spacing-margin-bottom]")||null;if(o){let t=o.querySelector("[data-spacing-margin-bottom-bg]")||null,r=o.querySelector("[data-spacing-margin-bottom-drag]")||null;if(t&&r){let a=e.marginBottom;t.style.height=a,r.style.top=a,o.setAttribute("data-spacing-margin-bottom-active","true")}}},[]),I=({componentUid:t,productId:e,articleId:r,marqueeKey:o})=>r?`${r?`[data-article-id="${r}"][data-uid="${t}"], [data-article-id="${r}"] [data-uid="${t}"]`:`[data-uid="${t}"]`}`:o?`[marquee-item-key="${o}"] [data-uid="${t}"]`:`${e?`[data-product-id="${e}"][data-uid="${t}"], [data-product-id="${e}"] [data-uid="${t}"]`:`[data-uid="${t}"]`}`,j=a(async({componentUid:t,productId:e,timeAwait:o=600,articleId:a,forceReActive:i,marqueeKey:n})=>{if(!t)return;let d=I({componentUid:t,productId:e,articleId:a,marqueeKey:n}),u=await s(d,o);if(!u||!i&&t==r.current?.componentUid&&e==r.current?.productId&&a==r.current?.articleId&&n==r.current?.marqueeKey)return;(t!==r.current?.componentUid||e!==r.current?.productId||a!==r.current?.articleId||i)&&L(),(i||t===r.current?.componentUid)&&e===r.current?.productId&&n===r.current?.marqueeKey||L(),A.current.push(u);let c=l(u,"data-toolbar"),b=l(u,"data-outline"),v=l(u,"data-toolbar-add-top"),m=l(u,"data-toolbar-add-bottom");c&&(r.current={componentUid:t,productId:e,articleId:a,marqueeKey:n},c.removeAttribute("style"),c.setAttribute("data-toolbar-active","true"),w({$toolbar:c,$component:u,state:"active"})),b&&b.setAttribute("data-outline-active","true"),v&&v.setAttribute("data-toolbar-add-active","true"),m&&m.setAttribute("data-toolbar-add-active","true");let{$isChildOfMarquee:p,$section:h}=f(u,{$isChildOfMarquee:'[data-component-tag="Marquee"]',$section:'[data-component-tag="Section"]'});if(h&&(e||a||p)){let e=h.querySelectorAll(`[data-uid="${t}"]`);e?.length&&e.forEach(t=>{A.current.push(t);let e=l(t,"data-outline");e&&e.setAttribute("data-outline-active","true")})}U({$component:u}),q()},[L,q,U]),C=async t=>{if(t){if(r.current?.componentUid){let e=I({...r.current}),o=await s(e,500);if(o){let e=l(o,"data-toolbar"),r=l(o,"data-outline"),a=l(o,"data-spacing");e&&t&&e.setAttribute("data-toolbar-editor-inline-focus","true"),r&&t&&r.setAttribute("data-outline-editor-inline-focus","true"),a&&t&&a.setAttribute("data-spacing-hidden","true")}}}else{let t=document.body.querySelector("#storefront")?.querySelectorAll("[data-outline-editor-inline-focus],[data-toolbar-editor-inline-focus],[data-spacing-hidden]");t?.length&&t.forEach(t=>{t&&(t.removeAttribute("data-toolbar-editor-inline-focus"),t.removeAttribute("data-outline-editor-inline-focus"),t.removeAttribute("data-spacing-hidden"))})}},O=a(t=>{let e=t.closest("[data-theme-section]"),o=e?.getAttribute("data-uid"),a=e&&o===r.current?.componentUid;if(!a)return;g.current.push(e);let i=l(e,"data-theme-section-status");i&&i.setAttribute("data-theme-section-status-active","true")},[]),T=async({value:t})=>{if(!t||!r.current)return;let e=!1,o=I({...r.current}),a=await s(o,500);if(a){let t=a?.querySelectorAll("[data-toolbar-parent]");if(t.length){let o=t=>{if(e)return;let r=t.getAttribute("data-parent-uid");if(!r)return;let o=document.body.querySelector("#storefront")?.querySelectorAll(`[data-uid="${r}"]`);o?.length&&o.forEach(t=>{let e=l(t,"data-outline");e&&(e.setAttribute("data-outline-force-hover","true"),e.setAttribute("data-outline-force-overlay","true"))})},a=t=>{let e=t.getAttribute("data-parent-uid");if(!e)return;let r=document.body.querySelector("#storefront")?.querySelectorAll(`[data-uid="${e}"]`);r?.length&&r.forEach(t=>{let e=l(t,"data-outline");e&&(e.removeAttribute("data-outline-force-hover"),e.removeAttribute("data-outline-force-overlay"))})},i=async t=>{e=!0;let o=t.getAttribute("data-parent-uid");if(!o)return;let i=async()=>{let t=await s(`[data-uid="${o}"]`,500),e=t?.closest("[data-product-id]");return!!e?.getAttribute("data-product-id")},n=async()=>{let t=await s(`[data-uid="${o}"]`,500),e=t?.closest("[data-article-id]");return!!e?.getAttribute("data-article-id")},d="",u="";await i()&&(d=r.current?.productId||""),await n()&&(u=r.current?.articleId||"");let l=new CustomEvent("editor:toolbar:force-active-component",{bubbles:!0,detail:{componentUid:o,productId:d,articleId:u,elementTag:t.getAttribute("data-component-tag")||""}});a(t),window.dispatchEvent(l),setTimeout(()=>{e=!1},0)};t.forEach(t=>{t.addEventListener("mouseover",()=>o(t)),t.addEventListener("mouseout",()=>a(t)),t.addEventListener("click",()=>i(t))})}}},x=a(t=>{if(v.current||p.current)return;let e=t.target;if(!e||"function"!=typeof e.closest){S(),q();return}let{$toolbarHover:o,$component:a,$themeSection:i,$shopifySection:n}=f(e,{$toolbarHover:"[data-toolbar-hover]",$component:"[data-toolbar-wrap]",$themeSection:"[data-theme-section]",$shopifySection:"[data-shopify-section]"});if(o)return;let d=a?.getAttribute("data-uid");if(!a||!d||"ROOT"==d){q();return}let u=l(a,"data-toolbar");if(!d||"ROOT"==d||u?.getAttribute("data-toolbar-hover-focus"))return;u?.getAttribute("data-toolbar-hover-focus")||q(),O(e);let c=i||n;if(d==r.current?.componentUid){if(r.current.productId){let t=a.closest("[data-product-id]");if(t){let e=t.getAttribute("data-product-id");if(e==r.current.productId){q();return}}}if(!c)return;y({$component:c,focus:!0,isPreventSection:!0})}c?y({$component:c,focus:!0,isPreventSection:!0}):(y({$component:a,componentUid:d,focus:!0}),$({$component:a,componentUid:d}))},[O,q,y,$,S,r]),B=a(t=>{if(v.current)return;let e=t.detail;e?.componentUid?j({componentUid:e.componentUid,productId:e.productId,articleId:e.articleId,marqueeKey:e.marqueeKey}):L()},[j,L,v]),R=a(()=>{q()},[q]),P=a(t=>{let e=t.detail;e.value&&(q(),L()),v.current=e.value},[q,L]),F=a(t=>{let e=t.detail;e.value?C(!0):C(!1)},[]),K=a(t=>{if(v.current)return;let e=t.detail;T({value:e?.value||!1})},[]),M=a(t=>{let e=t.detail;e?.value?(q(),p.current=!0):p.current=!1},[q]),D=(t,e)=>{if(!t)return;let r=document.body.querySelector("#storefront")?.querySelectorAll(`[data-uid="${t}"]`);r?.length&&r.forEach(t=>{let r=l(t,"data-outline");r&&("in"===e?(r.setAttribute("data-outline-force-hover","true"),r.setAttribute("data-outline-force-overlay","true")):(r.removeAttribute("data-outline-force-hover"),r.removeAttribute("data-outline-force-overlay")))})},k=a(t=>{if(v.current)return;let e=t.detail;e?.componentUid&&D(e?.componentUid,e?.type)},[v]),z=t=>{let e=t.detail;r.current?.componentUid&&e?.componentUid==r.current?.componentUid&&j({...r.current})};return i(()=>(document.addEventListener("mousemove",x),window.addEventListener("editor:active-component",B),window.addEventListener("editor:focus-outside-preview",R),window.addEventListener("editor:is-dragging",P),window.addEventListener("editor:is-editing-text-editor",F),window.addEventListener("editor:toolbar:show-parents",K),window.addEventListener("editor:toolbar:resize-spacing",M),window.addEventListener("editor:hover-component",k),window.addEventListener("editor:component:render",z),()=>{document.removeEventListener("mousemove",x),window.removeEventListener("editor:active-component",B),window.removeEventListener("editor:is-dragging",R),window.removeEventListener("editor:is-dragging",P),window.removeEventListener("editor:is-editing-text-editor",F),window.removeEventListener("editor:toolbar:show-parents",K),window.removeEventListener("editor:toolbar:resize-spacing",M),window.removeEventListener("editor:hover-component",k),window.removeEventListener("editor:component:render",z)}),[x,B,R,P,F,K,M,k,z]),t(e,{})};var Toolbar$1=r(Toolbar);export{Toolbar$1 as default};
2
+ import{jsx as t,Fragment as e}from"react/jsx-runtime";import{memo as r,useRef as o,useCallback as a,useEffect as i}from"react";import{getDOMElementParents as n}from"./toolbar/utils/getDOMElementParents.js";import{TOOLBAR_ACTIVE_HEIGHT as d,TOOLBAR_HOVER_HEIGHT as u}from"./toolbar/const.js";import{getChildrenByAttrSelector as l}from"./toolbar/utils/getChildrenByAttrSelector.js";import{findOverflowParent as c}from"./toolbar/utils/findOverflowParent.js";import{waitForElementToExist as s}from"./toolbar/utils/waitForElementToExist.js";import{isOverParent as b}from"./toolbar/utils/isOverParent.js";import{findDOMClosest as m}from"./toolbar/utils/findDOMClosest.js";let Toolbar=()=>{let r=o(null),f=o(!1),v=o(),p=o(!1),h=o([]),g=o([]),A=o([]),y=({state:t,$toolbar:e,$component:r})=>{let o=c(r,e),a=e.getBoundingClientRect(),i=r.getBoundingClientRect(),n=window.innerWidth;o?i?.height<=60?e.setAttribute(`data-toolbar-${t}-revert`,"true"):e.setAttribute(`data-toolbar-${t}-inside`,"true"):a.top<d+1&&(i?.height<=60?e.setAttribute(`data-toolbar-${t}-revert`,"true"):e.setAttribute(`data-toolbar-${t}-inside`,"true")),i.left+a.width>n&&e.setAttribute(`data-toolbar-${t}-overflow`,"true");let u=r?.closest('[aria-label="Dialog body"]');if(u){let r=u.getBoundingClientRect(),o=r.left+r.width-20;i.left+a.width>o&&e.setAttribute(`data-toolbar-${t}-overflow`,"true")}},w=a(({$component:t,componentUid:e,focus:r,isPreventSection:o,isParent:a})=>{if(!t&&!e)return;if(!t){let r=document.body.querySelector("#storefront")?.querySelector(`[data-uid="${e}"]`);if(!r)return;t=r}if(!e){let r=t.getAttribute("data-uid");if(!r)return;e=r}h.current.push(t);let i=l(t,"data-toolbar"),n=l(t,"data-outline"),d=l(t,"data-toolbar-add-top"),u=l(t,"data-toolbar-add-bottom"),c=l(t,"data-theme-section-status");o&&c&&c.setAttribute("data-theme-section-status-active","true"),i&&(i.removeAttribute("style"),a||i.setAttribute("data-toolbar-hover","true"),r&&i.setAttribute("data-toolbar-hover-focus","true"),y({$toolbar:i,$component:t,state:"hover"})),n&&(n.setAttribute("data-outline-hover","true"),a&&n.setAttribute("data-outline-parent-hover","true"),o&&(g.current.push(t),n.setAttribute("data-outline-overlay-theme-section","true")),r&&n.setAttribute("data-outline-hover-focus","true")),d&&!a&&d.setAttribute("data-toolbar-add-hover","true"),u&&!a&&u.setAttribute("data-toolbar-add-hover","true")},[]),$=a(({$component:t,componentUid:e})=>{if(!t){let r=document.body.querySelector("#storefront")?.querySelector(`[data-uid="${e}"]`);if(!r)return;t=r}let r=n(t,'[data-uid][data-component-type="component"]:not([data-component-no-setting])',1);if(r.length){for(let t of r)t&&w({$component:t,isParent:!0});E({$component:t,$parents:r})}},[w]),E=({$component:t,$parents:e})=>{if(!t||!e?.length)return;let r=l(t,"data-toolbar-hover-focus");if(r){let t=r.getBoundingClientRect(),o=!!r.getAttribute("data-toolbar-hover-revert"),a=!!r.getAttribute("data-toolbar-hover-inside"),i=1;for(let r of e)if(r){let e=r.getAttribute("data-component-tag");if("Section"===e)continue;let n=l(r,"data-toolbar-hover");if(n){let e=n.getAttribute("data-toolbar-active");if(e)continue;let r=n.getBoundingClientRect(),d=o||a;if(b({current:t,parent:r,index:i,revert:d})){let e=getComputedStyle(n),o=t.top-r.top,a=t.left-r.left,l=parseFloat(e.top)+o-(u-1)*i;d&&(l=parseFloat(e.top)-o+(u-1)*i);let c=parseFloat(e.left)+a;n.setAttribute("style",`top: ${l}px;left: ${c}px;`),i++}}}}},S=a(()=>{let t=["data-outline-overlay-theme-section","data-theme-section-status-active"],e=g.current;if(e.length)for(let r of e){let e=r.querySelectorAll(t.map(t=>`[${t}]`).join(","));e&&t.forEach(t=>{e.forEach(e=>e.removeAttribute(t))})}g.current=[]},[]),q=a(()=>{let t=["data-toolbar-hover-focus","data-toolbar-hover","data-outline-hover-focus","data-toolbar-hover-revert","data-toolbar-hover-inside","data-outline-hover","data-toolbar-add-hover","data-outline-parent-hover","data-toolbar-hover-overflow"],e=h.current;if(e.length)for(let r of e){let e=r.querySelectorAll(t.map(t=>`[${t}]`).join(","));e&&t.forEach(t=>{e.forEach(e=>e.removeAttribute(t))})}S(),h.current=[]},[S]),L=a(()=>{r.current=null;let t=["data-toolbar-active","data-outline-active","data-toolbar-add-active","data-toolbar-active-revert","data-toolbar-active-inside","data-spacing-margin-bottom-active","data-toolbar-force-hover","data-outline-force-hover","data-toolbar-active-overflow"],e=A.current;if(e.length)for(let r of e){let e=r.querySelectorAll(t.map(t=>`[${t}]`).join(","));e&&t.forEach(t=>{e.forEach(e=>e.removeAttribute(t))})}A.current=[],C(!1),v.current&&v.current()},[]),I=a(({$component:t})=>{if(!t)return;let e=getComputedStyle(t),r=l(t,"data-spacing"),o=r?.querySelector("[data-spacing-margin-bottom]")||null;if(o){let t=o.querySelector("[data-spacing-margin-bottom-bg]")||null,r=o.querySelector("[data-spacing-margin-bottom-drag]")||null;if(t&&r){let a=e.marginBottom;t.style.height=a,r.style.top=a,o.setAttribute("data-spacing-margin-bottom-active","true")}}},[]),U=({componentUid:t,productId:e,articleId:r,marqueeKey:o,carouselItemKey:a})=>r?`${r?`[data-article-id="${r}"][data-uid="${t}"], [data-article-id="${r}"] [data-uid="${t}"]`:`[data-uid="${t}"]`}`:o?`[marquee-item-key="${o}"] [data-uid="${t}"]`:a?`[data-carousel-item-key="${a}"] [data-uid="${t}"]`:`${e?`[data-product-id="${e}"][data-uid="${t}"], [data-product-id="${e}"] [data-uid="${t}"]`:`[data-uid="${t}"]`}`,j=a(async({componentUid:t,productId:e,timeAwait:o=600,articleId:a,forceReActive:i,marqueeKey:n,carouselItemKey:d})=>{if(!t)return;let u=U({componentUid:t,productId:e,articleId:a,marqueeKey:n,carouselItemKey:d}),c=await s(u,o);if(!c||!i&&t==r.current?.componentUid&&e==r.current?.productId&&a==r.current?.articleId&&n==r.current?.marqueeKey&&d==r.current?.carouselItemKey)return;(t!==r.current?.componentUid||e!==r.current?.productId||a!==r.current?.articleId||d!==r.current?.carouselItemKey||i)&&L(),(i||t===r.current?.componentUid)&&e===r.current?.productId&&n===r.current?.marqueeKey&&d===r.current?.carouselItemKey||L(),A.current.push(c);let b=l(c,"data-toolbar"),f=l(c,"data-outline"),v=l(c,"data-toolbar-add-top"),p=l(c,"data-toolbar-add-bottom");b&&(r.current={componentUid:t,productId:e,articleId:a,marqueeKey:n,carouselItemKey:d},b.removeAttribute("style"),b.setAttribute("data-toolbar-active","true"),y({$toolbar:b,$component:c,state:"active"})),f&&f.setAttribute("data-outline-active","true"),v&&v.setAttribute("data-toolbar-add-active","true"),p&&p.setAttribute("data-toolbar-add-active","true");let{$isChildOfMarquee:h,$section:g}=m(c,{$isChildOfMarquee:'[data-component-tag="Marquee"]',$section:'[data-component-tag="Section"]'});if(g&&(e||a||h)){let e=g.querySelectorAll(`[data-uid="${t}"]`);e?.length&&e.forEach(t=>{A.current.push(t);let e=l(t,"data-outline");e&&e.setAttribute("data-outline-active","true")})}I({$component:c}),q()},[L,q,I]),C=async t=>{if(t){if(r.current?.componentUid){let e=U({...r.current}),o=await s(e,500);if(o){let e=l(o,"data-toolbar"),r=l(o,"data-outline"),a=l(o,"data-spacing");e&&t&&e.setAttribute("data-toolbar-editor-inline-focus","true"),r&&t&&r.setAttribute("data-outline-editor-inline-focus","true"),a&&t&&a.setAttribute("data-spacing-hidden","true")}}}else{let t=document.body.querySelector("#storefront")?.querySelectorAll("[data-outline-editor-inline-focus],[data-toolbar-editor-inline-focus],[data-spacing-hidden]");t?.length&&t.forEach(t=>{t&&(t.removeAttribute("data-toolbar-editor-inline-focus"),t.removeAttribute("data-outline-editor-inline-focus"),t.removeAttribute("data-spacing-hidden"))})}},K=a(t=>{let e=t.closest("[data-theme-section]"),o=e?.getAttribute("data-uid"),a=e&&o===r.current?.componentUid;if(!a)return;g.current.push(e);let i=l(e,"data-theme-section-status");i&&i.setAttribute("data-theme-section-status-active","true")},[]),O=async({value:t})=>{if(!t||!r.current)return;let e=!1,o=U({...r.current}),a=await s(o,500);if(a){let t=a?.querySelectorAll("[data-toolbar-parent]");if(t.length){let o=t=>{if(e)return;let r=t.getAttribute("data-parent-uid");if(!r)return;let o=document.body.querySelector("#storefront")?.querySelectorAll(`[data-uid="${r}"]`);o?.length&&o.forEach(t=>{let e=l(t,"data-outline");e&&(e.setAttribute("data-outline-force-hover","true"),e.setAttribute("data-outline-force-overlay","true"))})},a=t=>{let e=t.getAttribute("data-parent-uid");if(!e)return;let r=document.body.querySelector("#storefront")?.querySelectorAll(`[data-uid="${e}"]`);r?.length&&r.forEach(t=>{let e=l(t,"data-outline");e&&(e.removeAttribute("data-outline-force-hover"),e.removeAttribute("data-outline-force-overlay"))})},i=async t=>{e=!0;let o=t.getAttribute("data-parent-uid");if(!o)return;let i=async()=>{let t=await s(`[data-uid="${o}"]`,500),e=t?.closest("[data-product-id]");return!!e?.getAttribute("data-product-id")},n=async()=>{let t=await s(`[data-uid="${o}"]`,500),e=t?.closest("[data-article-id]");return!!e?.getAttribute("data-article-id")},d=async()=>{let t=await s(`[data-uid="${o}"]`,500),e=t?.closest("[data-carousel-item-key]");return!!e?.getAttribute("data-carousel-item-key")},u="",l="",c="";await i()&&(u=r.current?.productId||""),await n()&&(l=r.current?.articleId||""),await d()&&(c=r.current?.carouselItemKey||"");let b=new CustomEvent("editor:toolbar:force-active-component",{bubbles:!0,detail:{componentUid:o,productId:u,articleId:l,carouselItemKey:c,elementTag:t.getAttribute("data-component-tag")||""}});a(t),window.dispatchEvent(b),setTimeout(()=>{e=!1},0)};t.forEach(t=>{t.addEventListener("mouseover",()=>o(t)),t.addEventListener("mouseout",()=>a(t)),t.addEventListener("click",()=>i(t))})}}},T=a(t=>{if(f.current||p.current)return;let e=t.target;if(!e||"function"!=typeof e.closest){S(),q();return}let{$toolbarHover:o,$component:a,$themeSection:i,$shopifySection:n}=m(e,{$toolbarHover:"[data-toolbar-hover]",$component:"[data-toolbar-wrap]",$themeSection:"[data-theme-section]",$shopifySection:"[data-shopify-section]"});if(o)return;let d=a?.getAttribute("data-uid");if(!a||!d||"ROOT"==d){q();return}let u=l(a,"data-toolbar");if(!d||"ROOT"==d||u?.getAttribute("data-toolbar-hover-focus"))return;u?.getAttribute("data-toolbar-hover-focus")||q(),K(e);let c=i||n;if(d==r.current?.componentUid){if(r.current.productId){let t=a.closest("[data-product-id]");if(t){let e=t.getAttribute("data-product-id");if(e==r.current.productId){q();return}}}if(!c)return;w({$component:c,focus:!0,isPreventSection:!0})}c?w({$component:c,focus:!0,isPreventSection:!0}):(w({$component:a,componentUid:d,focus:!0}),$({$component:a,componentUid:d}))},[K,q,w,$,S,r]),x=a(t=>{if(f.current)return;let e=t.detail;e?.componentUid?j({componentUid:e.componentUid,productId:e.productId,articleId:e.articleId,marqueeKey:e.marqueeKey,carouselItemKey:e.carouselItemKey}):L()},[j,L,f]),B=a(()=>{q()},[q]),R=a(t=>{let e=t.detail;e.value&&(q(),L()),f.current=e.value},[q,L]),P=a(t=>{let e=t.detail;e.value?C(!0):C(!1)},[]),k=a(t=>{if(f.current)return;let e=t.detail;O({value:e?.value||!1})},[]),F=a(t=>{let e=t.detail;e?.value?(q(),p.current=!0):p.current=!1},[q]),M=(t,e)=>{if(!t)return;let r=document.body.querySelector("#storefront")?.querySelectorAll(`[data-uid="${t}"]`);r?.length&&r.forEach(t=>{let r=l(t,"data-outline");r&&("in"===e?(r.setAttribute("data-outline-force-hover","true"),r.setAttribute("data-outline-force-overlay","true")):(r.removeAttribute("data-outline-force-hover"),r.removeAttribute("data-outline-force-overlay")))})},D=a(t=>{if(f.current)return;let e=t.detail;e?.componentUid&&M(e?.componentUid,e?.type)},[f]),z=t=>{let e=t.detail;r.current?.componentUid&&e?.componentUid==r.current?.componentUid&&j({...r.current})};return i(()=>(document.addEventListener("mousemove",T),window.addEventListener("editor:active-component",x),window.addEventListener("editor:focus-outside-preview",B),window.addEventListener("editor:is-dragging",R),window.addEventListener("editor:is-editing-text-editor",P),window.addEventListener("editor:toolbar:show-parents",k),window.addEventListener("editor:toolbar:resize-spacing",F),window.addEventListener("editor:hover-component",D),window.addEventListener("editor:component:render",z),()=>{document.removeEventListener("mousemove",T),window.removeEventListener("editor:active-component",x),window.removeEventListener("editor:is-dragging",B),window.removeEventListener("editor:is-dragging",R),window.removeEventListener("editor:is-editing-text-editor",P),window.removeEventListener("editor:toolbar:show-parents",k),window.removeEventListener("editor:toolbar:resize-spacing",F),window.removeEventListener("editor:hover-component",D),window.removeEventListener("editor:component:render",z)}),[T,x,B,R,P,k,F,D,z]),t(e,{})};var Toolbar$1=r(Toolbar);export{Toolbar$1 as default};
@@ -1 +1 @@
1
- import{captureException as e}from"@sentry/nextjs";import{parseBuilderTemplateV2 as t}from"../helpers/normalize.js";import{serializableJson as o}from"../helpers/parse-json.js";import{genCSS as r}from"../helpers/gen-css.js";import{getFontStyleFromPageTemplate as s,getFontFromGlobalStyle as a}from"../google-fonts.js";import{getCustomFonts as i}from"../custom-fonts.js";let getSharePageProps=l=>async n=>{try{let{sharedPage:e,customFonts:m}=await l([n]);if(!e)return null;let{page:p,themeStyle:h,share:c,pageSections:u,pageMeta:f,shopMeta:d,products:g,collections:j,articles:y}=e,P=t(e),[b,w,x]=await Promise.all([s(P),a(h?.data),i(m)]),S={defaultTitle:d?.shop?.name??"",title:c?.title,openGraph:{site_name:d?.shop?.name??"",locale:d?.localization?.country?.isoCode??"",title:c?.title??d?.shop?.name??"",description:c?.description??d?.shop?.description??"",images:c?.thumbnails?c.thumbnails:[]},nofollow:!0,noindex:!0};return o({seo:S,builderData:P,page:p,themeStyle:r(h?.data,!1),share:c,pageSections:u,pageMeta:f,shopMeta:d,products:g,collections:j,articles:y,elementFontStyle:b,fontStyle:w,customFonts:x})}catch(t){return e(t),null}};export{getSharePageProps};
1
+ import{captureException as e}from"@sentry/nextjs";import{parseBuilderTemplateV2 as t}from"../helpers/normalize.js";import{serializableJson as o}from"../helpers/parse-json.js";import{genCSS as r}from"../helpers/gen-css.js";import{getFontStyleFromPageTemplate as s,getFontFromGlobalStyle as a}from"../google-fonts.js";import{getCustomFonts as i}from"../custom-fonts.js";let getSharePageProps=l=>async n=>{try{let{sharedPage:e,customFonts:m,products:p,collections:h,articles:c}=await l([n]);if(!e)return null;let{page:u,themeStyle:f,share:d,pageMeta:g,shopMeta:j}=e,{sectionPosition:y}=u,P=t({...e,sectionPosition:y}),[b,w,x]=await Promise.all([s(P),a(f?.data),i(m)]),S={defaultTitle:j?.shop?.name??"",title:d?.title,openGraph:{site_name:j?.shop?.name??"",locale:j?.localization?.country?.isoCode??"",title:d?.title??j?.shop?.name??"",description:d?.description??j?.shop?.description??"",images:d?.thumbnails?d.thumbnails:[]},nofollow:!0,noindex:!0};return o({seo:S,builderData:P,page:u,themeStyle:r(f?.data,!1),share:d,pageMeta:g,shopMeta:j,products:p,collections:h,articles:c,elementFontStyle:b,fontStyle:w,customFonts:x})}catch(t){return e(t),null}};export{getSharePageProps};
@@ -1 +1 @@
1
- import{getStorefrontApi as e}from"./get-storefront-api.js";import{extractOperation as r}from"./helpers/extract-operation.js";let createFetcher=e=>{let t=e||process.env.NEXT_PUBLIC_SHOP_TOKEN;return async e=>{let[o,n,s]=e;if(!t)throw Error("shopToken is not defined");let i=process.env.NEXT_PUBLIC_API_URL;if(!i)throw Error("NEXT_PUBLIC_API_URL is not defined");let h=r(o);h&&(i=`${i}?gp-online-store-operation=${h}`);let a={"Content-Type":"application/json","X-GemX-Shop-Token":t};return fetch(i,{method:"POST",headers:a,body:JSON.stringify({query:o,variables:n,operationName:s})}).then(e=>e.json()).then(e=>e.errors?Promise.reject(e.errors):e.data)}},createAppAPIFetcher=(e,t)=>{let o=process.env.NEXT_APP_API_URL;return async n=>{let[s,i,h]=n;if(!e)throw Error("shopToken is not defined");if(!o)throw Error("NEXT_APP_API_URL is not defined");let a=r(s);a&&(o=`${o}?gp-online-store-operation=${a}`);let c={"Content-Type":"application/json",Authorization:`Token ${e}`,"X-GemX-Shop-ID":t||""};return fetch(`${o}?gp-online-store-operation=${h}`,{method:"POST",headers:c,body:JSON.stringify({query:s,variables:i,operationName:h})}).then(e=>e.json()).then(e=>e.errors?Promise.reject(e.errors):e.data)}},createShopifyFetcher=(r,t)=>{let o=r??process.env.NEXT_PUBLIC_STOREFRONT_TOKEN,n=t??process.env.NEXT_PUBLIC_STOREFRONT_HANDLE;return async r=>{if(!o)throw Error("NEXT_PUBLIC_STOREFRONT_TOKEN is not defined");if(!n)throw Error("NEXT_PUBLIC_STOREFRONT_HANDLE is not defined");let t={"Content-Type":"application/json","X-Shopify-Storefront-Access-Token":o},[s,i]=r;return fetch(e(n),{method:"POST",headers:t,body:JSON.stringify({query:s,variables:i})}).then(e=>e.json()).then(e=>e.errors?Promise.reject(e.errors):e.data)}},createTemplateFetcher=e=>{let r=process.env.NEXT_PUBLIC_URL_SHARE_PAGE;return async()=>{if(!r)throw Error("NEXT_PUBLIC_URL_SHARE_PAGE is not defined");try{let t=await fetch(`${r}/share/page/${e}`,{method:"GET"});if(!t.ok)throw Error(`HTTP error! status: ${t.status}`);let o=await t.json();if(o.errors)throw Error(`API errors: ${JSON.stringify(o.errors)}`);return o.result}catch(e){throw console.error("Template fetcher error:",e),e}}};export{createAppAPIFetcher,createFetcher,createShopifyFetcher,createTemplateFetcher};
1
+ import{getStorefrontApi as e}from"./get-storefront-api.js";import{extractOperation as r}from"./helpers/extract-operation.js";let createFetcher=e=>{let t=e||process.env.NEXT_PUBLIC_SHOP_TOKEN;return async e=>{let[o,n,s]=e;if(!t)throw Error("shopToken is not defined");let i=process.env.NEXT_PUBLIC_API_URL;if(!i)throw Error("NEXT_PUBLIC_API_URL is not defined");let a=r(o);a&&(i=`${i}?gp-online-store-operation=${a}`);let h={"Content-Type":"application/json","X-GemX-Shop-Token":t};return fetch(i,{method:"POST",headers:h,body:JSON.stringify({query:o,variables:n,operationName:s})}).then(e=>e.json()).then(e=>e.errors?Promise.reject(e.errors):e.data)}},createAppAPIFetcher=(e,t)=>{let o=process.env.NEXT_APP_API_URL;return async n=>{let[s,i,a]=n;if(!e)throw Error("shopToken is not defined");if(!o)throw Error("NEXT_APP_API_URL is not defined");let h=r(s);h&&(o=`${o}?gp-online-store-operation=${h}`);let c={"Content-Type":"application/json",Authorization:`Token ${e}`,"X-GemX-Shop-ID":t||""};return fetch(`${o}?gp-online-store-operation=${a}`,{method:"POST",headers:c,body:JSON.stringify({query:s,variables:i,operationName:a})}).then(e=>e.json()).then(e=>e.errors?Promise.reject(e.errors):e.data)}},createShopifyFetcher=(r,t)=>{let o=r??process.env.NEXT_PUBLIC_STOREFRONT_TOKEN,n=t??process.env.NEXT_PUBLIC_STOREFRONT_HANDLE;return async r=>{if(!o)throw Error("NEXT_PUBLIC_STOREFRONT_TOKEN is not defined");if(!n)throw Error("NEXT_PUBLIC_STOREFRONT_HANDLE is not defined");let t={"Content-Type":"application/json","X-Shopify-Storefront-Access-Token":o},[s,i]=r;return fetch(e(n),{method:"POST",headers:t,body:JSON.stringify({query:s,variables:i})}).then(e=>e.json()).then(e=>e.errors?Promise.reject(e.errors):e.data)}},createTemplateFetcher=e=>{let r=process.env.NEXT_PUBLIC_URL_SHARE_PAGE;return async t=>{if(!r)throw Error("NEXT_PUBLIC_URL_SHARE_PAGE is not defined");try{let t;let o=await fetch(`${r}/share/page/${e}`,{method:"GET"});if(!o.ok)throw Error(`HTTP error! status: ${o.status}`);try{t=await o.text()}catch(e){throw Error(`Invalid JSON response: ${e}`)}let n=JSON.parse(t);if(n.errors)throw Error(`API errors: ${JSON.stringify(n.errors)}`);return n.result}catch(e){throw console.error("Template fetcher error:",e),e}}};export{createAppAPIFetcher,createFetcher,createShopifyFetcher,createTemplateFetcher};
@@ -1,5 +1,5 @@
1
- import{jsx as e,jsxs as t,Fragment as a}from"react/jsx-runtime";import{useI18n as r,PageProvider as l,BuilderComponentProvider as s,SectionProvider as n,I18nProvider as i,BuilderProvider as o,Render as d}from"@gem-sdk/core";import{NextSeo as p}from"next-seo";import c from"next/head";import{useRouter as g}from"next/router";import{parseHtml as m}from"../libs/parse-html.js";import{useEffect as u}from"react";let PreviewTemplate=({components:h,builderData:f,sectionData:y,seo:_,themeStyle:b,fontStyle:x,elementFontStyle:k,customCodeHeader:v,customFonts:N,productOffers:S,publicStoreFrontData:T,dynamicDiscountOffer:q,isPreview:H,pageBackground:I})=>{let L=g(),{t:M}=r(),P="custom-code-header";return(u(()=>{let e=document.querySelectorAll(`[class*="${P}-"]`),t=[];e.length>1&&e.forEach(e=>{let a=e.className;if(t.includes(a)){e.remove();return}t.push(a)})},[]),L.isFallback)?e("div",{className:"gp-flex gp-h-[100vh] gp-items-center gp-justify-center",children:t("div",{className:"gp-flex gp-gap-2",children:[e("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_alternate] gp-rounded-full gp-bg-slate-800"}),e("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_200ms_linear_alternate] gp-rounded-full gp-bg-slate-800"}),e("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_500ms_alternate] gp-rounded-full gp-bg-slate-800"})]})}):t(a,{children:[e(p,{..._}),t(c,{children:[m(P,v,!0),b&&e("style",{"data-id":"global-style",type:"text/css",dangerouslySetInnerHTML:{__html:b}},"global-style"),x&&e("style",{"data-id":"google-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:x}},"google-fonts"),k&&k.map(t=>e("style",{"data-id":"google-element-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:t}},t)),N&&e("style",{"data-id":"custom-element-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:N}},x),I?.isUsePageBackground&&I?.background&&e("style",{children:`
1
+ import{jsx as e,jsxs as t,Fragment as a}from"react/jsx-runtime";import{useI18n as l,PageProvider as r,BuilderComponentProvider as s,SectionProvider as n,I18nProvider as i,BuilderProvider as o,Render as d}from"@gem-sdk/core";import{NextSeo as p}from"next-seo";import c from"next/head";import{useRouter as g}from"next/router";import{parseHtml as m}from"../libs/parse-html.js";import{useEffect as u}from"react";let PreviewTemplate=({components:h,builderData:f,sectionData:y,seo:_,themeStyle:b,fontStyle:x,elementFontStyle:k,customCodeHeader:v,customFonts:N,products:S,collections:T,articles:q,pageBackground:H,publicStoreFrontData:I})=>{let L=g(),{t:M}=l(),P="custom-code-header";return(u(()=>{let e=document.querySelectorAll(`[class*="${P}-"]`),t=[];e.length>1&&e.forEach(e=>{let a=e.className;if(t.includes(a)){e.remove();return}t.push(a)})},[]),L.isFallback)?e("div",{className:"gp-flex gp-h-[100vh] gp-items-center gp-justify-center",children:t("div",{className:"gp-flex gp-gap-2",children:[e("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_alternate] gp-rounded-full gp-bg-slate-800"}),e("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_200ms_linear_alternate] gp-rounded-full gp-bg-slate-800"}),e("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_500ms_alternate] gp-rounded-full gp-bg-slate-800"})]})}):t(a,{children:[e(p,{..._}),t(c,{children:[m(P,v,!0),b&&e("style",{"data-id":"global-style",type:"text/css",dangerouslySetInnerHTML:{__html:b}},"global-style"),x&&e("style",{"data-id":"google-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:x}},"google-fonts"),k&&k.map(t=>e("style",{"data-id":"google-element-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:t}},t)),N&&e("style",{"data-id":"custom-element-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:N}},x),H?.isUsePageBackground&&H?.background&&e("style",{children:`
2
2
  body {
3
- background: ${I.background};
3
+ background: ${H.background};
4
4
  }
5
- `},`page_background_${I?.background}`)]}),e(l,{productOffers:S,publicStoreFrontData:T,dynamicDiscountOffer:q,children:e(s,{components:h,children:e("div",{children:e(n,{data:y,children:e(i,{t:M,children:f?.map(t=>e(a,{children:e(o,{state:t.data,lazy:t.lazy,priority:t.priority,isPreview:H,children:e(d,{uid:t.uid})},t.uid)}))})})})})})]})};export{PreviewTemplate};
5
+ `},`page_background_${H?.background}`)]}),e(r,{products:S,collections:T,articles:q,publicStoreFrontData:I,children:e(s,{components:h,children:e("div",{children:e(n,{data:y,children:e(i,{t:M,children:f?.map(t=>e(a,{children:e(o,{state:t.data,lazy:t.lazy,priority:t.priority,isPreview:!0,children:e(d,{uid:t.uid})},t.uid)}))})})})})})]})};export{PreviewTemplate};
@@ -106,9 +106,11 @@ type SharePageAPIResponse = {
106
106
  sharedPage: SharePageProps;
107
107
  products: any;
108
108
  collections: any;
109
+ articles: any;
109
110
  customFonts: ShopType.CustomFont[];
110
111
  };
111
- type SharePageProps = {
112
+ type SharePageProps = PageBuilderPropsV2 & {
113
+ publicStoreFrontData?: PublicStoreFrontData | null;
112
114
  seo?: NextSeoProps;
113
115
  builderData?: {
114
116
  uid: string;
@@ -119,7 +121,14 @@ type SharePageProps = {
119
121
  page?: any;
120
122
  themeStyle?: any;
121
123
  share?: any;
122
- pageSections?: any;
124
+ pageSections?: {
125
+ id: BigInt;
126
+ themePageID: BigInt;
127
+ shopID: BigInt;
128
+ cid: string;
129
+ name: string;
130
+ component: any;
131
+ };
123
132
  pageMeta?: any;
124
133
  shopMeta?: any;
125
134
  products?: any;
@@ -295,6 +304,6 @@ declare const BuilderPage: React.FC<BuilderPageProps>;
295
304
 
296
305
  declare const StaticPageV2: React.FC<StaticPagePropsV2 & AdditionalPageBuilderProps>;
297
306
 
298
- declare const PreviewTemplate: React.FC<StaticPagePropsV2 & AdditionalPageBuilderProps>;
307
+ declare const PreviewTemplate: React.FC<SharePageProps & AdditionalPageBuilderProps>;
299
308
 
300
309
  export { AppPropsWithLayout, BuilderPage, CollectionDetailPage, ErrorBoundary, ErrorFallback, FacebookPixel, GoogleAnalytic, NextPageWithLayout, Page404, Page500, PageBuilderProps, PageBuilderPropsV2, PreviewPage, PreviewTemplate, ProductDetailPage, SharePageAPIResponse, SharePageProps, StaticPage, StaticPagePropsV2, StaticPageV2, TikTokPixel, createAppAPIFetcher, createFetcher, createShopifyFetcher, createTemplateFetcher, genCSS, getBuilderProps, getCollectionProps, getFallbackV2, getFontFromGlobalStyle, getFontFromGroupSetting, getFonts, getFontsFromDataBuilder, getHomePageProps, getHomePagePropsV2, getLayout, getPostPurchasePropsPreview, getPreviewProps, getProductProps, getSharePageProps, getStaticPagePropsPreview, getStaticPagePropsV2, getStaticPaths, getStorefrontApi, isBot, normalizePageSectionResponseV2, parseBuilderTemplateV2, retryWithDelay, usePagePreview, useTrackingView };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/pages",
3
- "version": "2.0.0-dev.1156",
3
+ "version": "2.0.0-dev.1175",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",
@@ -26,7 +26,7 @@
26
26
  "next": "14.2.20"
27
27
  },
28
28
  "devDependencies": {
29
- "@gem-sdk/core": "2.0.0-dev.1156",
29
+ "@gem-sdk/core": "2.0.0-dev.1175",
30
30
  "@gem-sdk/plugin-cookie-bar": "2.0.0-dev.1156",
31
31
  "@gem-sdk/plugin-quick-view": "2.0.0-dev.1156",
32
32
  "@gem-sdk/plugin-sticky-add-to-cart": "2.0.0-dev.1156"