@gem-sdk/core 2.0.0-staging.757 → 2.0.0-staging.766

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");require("zustand");var BuilderPreviewContext=require("../../contexts/BuilderPreviewContext.js");require("react-transition-group"),require("@gem-sdk/core"),require("swr"),require("swr/infinite");var shop=require("../../hooks/shop.js");function Spacing(e){let t=BuilderPreviewContext.useBuilderPreviewStore(e=>e.isThemeSectionEditor),r=shop.usePageType(),n=react.useRef(null),a=react.useRef(null),i=react.useRef(null),o=react.useRef(!1),u=react.useRef(0),s=react.useRef(0),l=react.useRef(null),[c,d]=react.useState(0),[m,p]=react.useState(!1),g=react.useRef(null),v=e=>{let t=e.clientY,r=Math.ceil(t-u.current),n=s.current||0,a=n+r>=0?`${n+r}px`:"0px";return{newValue:a}},b=e=>{if(n.current&&a.current){let{newValue:t}=v(e);a.current.style.height=t,n.current.style.top=t;let r=n.current.closest("[data-toolbar-wrap]");r&&(r.style.marginBottom=t,E(t))}},f=()=>{h()},w=()=>{i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{o.current=!0;let e=new CustomEvent("editor:toolbar:resize-spacing",{bubbles:!0,detail:{value:!0}});window.dispatchEvent(e),document.addEventListener("mousemove",b),document.addEventListener("mouseup",f)},100)},h=()=>{i.current&&clearTimeout(i.current),o.current=!1;let t=new CustomEvent("editor:toolbar:resize-spacing",{bubbles:!0,detail:{value:!1}});if(window.dispatchEvent(t),n.current){let t=getComputedStyle(n.current),r=t.top,a=new CustomEvent("editor:toolbar:change-margin-bottom",{bubbles:!0,detail:{componentUid:e.uid,marginBottom:r}});window.dispatchEvent(a)}let r=n.current?.closest("[data-toolbar-wrap]");r&&(r.style.marginBottom=""),document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",f)},x=(e,t)=>{let r=e.children.length;if(r)for(let n=0;n<r;n++){let r=e.children[n];if(r){let e=r.getAttribute(t);if(e)return r}}},j=e=>{let t=e.getAttribute("data-component-tag");return"Row"===t||"Product"===t},y=react.useCallback(e=>{let t=n.current?.closest("[data-toolbar-wrap]");if(!t)return;let r=x(t,"data-toolbar");if(!r)return;let i=r.getAttribute("data-toolbar-active");if(!i)return;let o=getComputedStyle(t),u=x(t,"data-spacing"),s=u?.querySelector("[data-spacing-margin-bottom]")||null;if(s&&a.current&&n.current){let r=o.marginBottom;if(e&&E(r),0>parseFloat(r)&&(r="0"),a.current.style.height=r,n.current.style.top=r,s.setAttribute("data-spacing-margin-bottom-active","true"),j(t))a.current.style.left="0";else{let e=o.paddingLeft,t=`-${e}`,r=`translate(${t}, -100%)`;a.current.style.left=t,n.current.style.transform=r}}},[]),E=e=>{let t=parseFloat(e);d(t),p(!0),g.current&&clearTimeout(g.current),g.current=setTimeout(()=>{p(!1)},2e3);let r=t<=28&&t>=0?t/2+16:t>28?0:16;l.current&&(l.current.style.transform=`translateY(${r}px)`)},R=usePrevious(e.advanced?.["spacing-setting"]);react.useEffect(()=>{let t=q(R,e.advanced?.["spacing-setting"]);y(t)},[R,e.advanced,y]);let q=(e,t)=>["desktop","tablet","mobile"].some(r=>JSON.stringify(e?.[r]?.margin?.bottom)!==JSON.stringify(t?.[r]?.margin?.bottom)),S=react.useCallback(()=>{y()},[y]);return react.useEffect(()=>(window.addEventListener("editor:toolbar:update-margin-bottom",()=>y),window.addEventListener("editor:toolbar:update-padding-left",()=>y),window.addEventListener("resize",S),()=>{window.removeEventListener("editor:toolbar:update-margin-bottom",()=>y),window.removeEventListener("editor:toolbar:update-padding-left",()=>y),window.removeEventListener("resize",S)}),[S,y]),jsxRuntime.jsx(jsxRuntime.Fragment,{children:"Section"!==e.tag&&"POST_PURCHASE"!==r&&jsxRuntime.jsx("div",{"data-spacing":!0,"data-spacing-theme-section":t,className:"gp-absolute gp-w-full gp-bottom-0",children:jsxRuntime.jsxs("div",{"data-spacing-margin-bottom":!0,children:[jsxRuntime.jsxs("div",{"data-spacing-margin-bottom-bg":!0,ref:a,children:[jsxRuntime.jsx("div",{"data-spacing-margin-bottom-value":!0}),jsxRuntime.jsx("div",{"data-active":m,"data-value-number":!0,ref:l,children:c})]}),jsxRuntime.jsx("div",{ref:n,"data-spacing-margin-bottom-drag":!0,onMouseDown:e=>{if(n.current){let t=getComputedStyle(n.current);u.current=e.clientY,s.current=parseFloat(t.top),w()}},onMouseUp:()=>{h()},role:"presentation"})]})})})}require("classnames"),require("dayjs"),require("../../helpers/convert.js"),require("@gem-sdk/adapter-shopify"),require("swr/mutation"),require("vanilla-lazyload"),require("../../hooks/useCartUI.js"),require("../../hooks/useStickyStore.js");const usePrevious=e=>{let t=react.useRef();return react.useEffect(()=>{t.current=e},[e]),t.current};exports.default=Spacing;
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),react=require("react");require("zustand");var BuilderPreviewContext=require("../../contexts/BuilderPreviewContext.js"),device=require("../../constants/device.js");require("react-transition-group"),require("@gem-sdk/core"),require("swr"),require("swr/infinite");var shop=require("../../hooks/shop.js");function Spacing(e){let t=BuilderPreviewContext.useBuilderPreviewStore(e=>e.isThemeSectionEditor),r=shop.usePageType(),n=react.useRef(null),a=react.useRef(null),i=react.useRef(null),o=react.useRef(!1),u=react.useRef(0),s=react.useRef(0),c=react.useRef(null),[l,d]=react.useState(0),[m,p]=react.useState(!1),g=react.useRef(null),v=e=>{let t=e.clientY,r=Math.ceil(t-u.current),n=s.current||0,a=n+r>=0?`${n+r}px`:"0px";return{newValue:a}},f=e=>{if(n.current&&a.current){let{newValue:t}=v(e);a.current.style.height=t,n.current.style.top=t;let r=n.current.closest("[data-toolbar-wrap]");r&&(r.style.marginBottom=t,y(t))}},b=()=>{h()},w=()=>{i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{o.current=!0;let e=new CustomEvent("editor:toolbar:resize-spacing",{bubbles:!0,detail:{value:!0}});window.dispatchEvent(e),document.addEventListener("mousemove",f),document.addEventListener("mouseup",b)},100)},h=()=>{i.current&&clearTimeout(i.current),o.current=!1;let t=new CustomEvent("editor:toolbar:resize-spacing",{bubbles:!0,detail:{value:!1}});if(window.dispatchEvent(t),n.current){let t=getComputedStyle(n.current),r=t.top,a=new CustomEvent("editor:toolbar:change-margin-bottom",{bubbles:!0,detail:{componentUid:e.uid,marginBottom:r}});window.dispatchEvent(a)}let r=n.current?.closest("[data-toolbar-wrap]");r&&(r.style.marginBottom=""),document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",b)},x=(e,t)=>{let r=e.children.length;if(r)for(let n=0;n<r;n++){let r=e.children[n];if(r){let e=r.getAttribute(t);if(e)return r}}},j=e=>{let t=e.getAttribute("data-component-tag");return"Row"===t||"Product"===t},E=react.useCallback(e=>{let t=n.current?.closest("[data-toolbar-wrap]");if(!t)return;let r=x(t,"data-toolbar");if(!r)return;let i=r.getAttribute("data-toolbar-active");if(!i)return;let o=getComputedStyle(t),u=x(t,"data-spacing"),s=u?.querySelector("[data-spacing-margin-bottom]")||null;if(s&&a.current&&n.current){let r=o.marginBottom;if(e&&y(r),0>parseFloat(r)&&(r="0"),a.current.style.height=r,n.current.style.top=r,s.setAttribute("data-spacing-margin-bottom-active","true"),j(t))a.current.style.left="0";else{let e=o.paddingLeft,t=`-${e}`,r=`translate(${t}, -100%)`;a.current.style.left=t,n.current.style.transform=r}}},[]),y=e=>{let t=parseFloat(e);d(t),p(!0),g.current&&clearTimeout(g.current),g.current=setTimeout(()=>{p(!1)},2e3);let r=t<=28&&t>=0?t/2+16:t>28?0:16;c.current&&(c.current.style.transform=`translateY(${r}px)`)},R=usePrevious(e.advanced?.["spacing-setting"]);react.useEffect(()=>{let t=q(R,e.advanced?.["spacing-setting"]);E(t)},[R,e.advanced,E]);let q=(e,t)=>device.DEVICES.some(r=>JSON.stringify(e?.[r]?.margin?.bottom)!==JSON.stringify(t?.[r]?.margin?.bottom)),S=react.useCallback(()=>{E()},[E]);return react.useEffect(()=>(window.addEventListener("editor:toolbar:update-margin-bottom",()=>E),window.addEventListener("editor:toolbar:update-padding-left",()=>E),window.addEventListener("resize",S),()=>{window.removeEventListener("editor:toolbar:update-margin-bottom",()=>E),window.removeEventListener("editor:toolbar:update-padding-left",()=>E),window.removeEventListener("resize",S)}),[S,E]),jsxRuntime.jsx(jsxRuntime.Fragment,{children:"Section"!==e.tag&&"POST_PURCHASE"!==r&&jsxRuntime.jsx("div",{"data-spacing":!0,"data-spacing-theme-section":t,className:"gp-absolute gp-w-full gp-bottom-0",children:jsxRuntime.jsxs("div",{"data-spacing-margin-bottom":!0,children:[jsxRuntime.jsxs("div",{"data-spacing-margin-bottom-bg":!0,ref:a,children:[jsxRuntime.jsx("div",{"data-spacing-margin-bottom-value":!0}),jsxRuntime.jsx("div",{"data-active":m,"data-value-number":!0,ref:c,children:l})]}),jsxRuntime.jsx("div",{ref:n,"data-spacing-margin-bottom-drag":!0,onMouseDown:e=>{if(n.current){let t=getComputedStyle(n.current);u.current=e.clientY,s.current=parseFloat(t.top),w()}},onMouseUp:()=>{h()},role:"presentation"})]})})})}require("classnames"),require("dayjs"),require("../../helpers/convert.js"),require("@gem-sdk/adapter-shopify"),require("swr/mutation"),require("vanilla-lazyload"),require("../../hooks/useCartUI.js"),require("../../hooks/useStickyStore.js");const usePrevious=e=>{let t=react.useRef();return react.useEffect(()=>{t.current=e},[e]),t.current};exports.default=Spacing;
@@ -1 +1 @@
1
- "use strict";const convertTextAlignToJustify=t=>{let e=["desktop","tablet","mobile"],s={};return e.forEach(e=>{let n="desktop"===e?"":`${e}:`;s[`${n}gp-justify-start`]=t?.[e]==="left",s[`${n}gp-justify-center`]=t?.[e]==="center",s[`${n}gp-justify-end`]=t?.[e]==="right"}),s},getAlignmentClasses=t=>{let e=["desktop","tablet","mobile"];return e.reduce((e,s)=>{let n="desktop"===s?"":`${s}:`,r=t?.[s];return r&&(e[`${n}gp-justify-start`]="left"===r,e[`${n}gp-justify-center`]="center"===r,e[`${n}gp-justify-end`]="right"===r),e},{})};exports.convertTextAlignToJustify=convertTextAlignToJustify,exports.getAlignmentClasses=getAlignmentClasses;
1
+ "use strict";var device=require("../constants/device.js");const convertTextAlignToJustify=e=>{let t={};return device.DEVICES.forEach(s=>{let i="desktop"===s?"":`${s}:`;t[`${i}gp-justify-start`]=e?.[s]==="left",t[`${i}gp-justify-center`]=e?.[s]==="center",t[`${i}gp-justify-end`]=e?.[s]==="right"}),t},getAlignmentClasses=e=>device.DEVICES.reduce((t,s)=>{let i="desktop"===s?"":`${s}:`,n=e?.[s];return n&&(t[`${i}gp-justify-start`]="left"===n,t[`${i}gp-justify-center`]="center"===n,t[`${i}gp-justify-end`]="right"===n),t},{});exports.convertTextAlignToJustify=convertTextAlignToJustify,exports.getAlignmentClasses=getAlignmentClasses;
@@ -1 +1 @@
1
- "use strict";var constant=require("./constant.js"),colors=require("./colors.js"),makeStyle=require("./make-style.js"),getResonsiveValue=require("./get-resonsive-value.js");const isEmptyBg=e=>e?.videoHtml5===void 0&&e?.video===void 0&&!e?.videoType,getBgVideoByDevice=(e,t="desktop")=>{let o=e?.[t];if(isEmptyBg(o)&&"desktop"!==t){let t=e?.tablet;o=isEmptyBg(t)?e?.desktop:t}return o},getStyleBackgroundByDevice=(e,t)=>e?{...t?.ignoreBackgroundColor?{}:{...getStyleBgColor(e)},...t?.ignoreBackgroundImage?{}:{...getStyleBgImage(e,t)},...t?.ignoreBackgroundImageProperties?{}:{...getStyleBgPosition(e),...getStyleBgSize(e),...getStyleBgRepeat(e)},...t?.ignoreBgAttachment?{}:getStyleBgAttachment(e)}:{},getStyleBgColor=e=>{let t={desktop:getBgColorByDevice(e,"desktop"),tablet:getBgColorByDevice(e,"tablet"),mobile:getBgColorByDevice(e,"mobile")};return makeStyle.makeStyleResponsive("bgc",t)},getBgColorByDevice=(e,t)=>getColor(e?.[t]?.color),getColor=e=>e?colors.isColor(e?.toString())?e:`var(--g-c-${e})`:void 0,getStyleBgImage=(e,t)=>{let o={desktop:getBgImageByDevice(e,"desktop",t),tablet:getBgImageByDevice(e,"tablet",t),mobile:getBgImageByDevice(e,"mobile",t)};return makeStyle.makeStyleResponsive("bgi",o)},getBgImageByDevice=(e,t,o)=>{let g=e?.[t]?.type==="video";if(g)return;if(e?.[t]?.type==="color")return"url()";let i=e?.[t]?.image?.backupFileKey,l=e?.[t]?.image?.storage,r=e?.[t]?.image?.src,a=i,s=r?.match(/\/files\/([^\/]+\.(jpg|jpeg|gif|png|webp|svg))/)?.[1];return(i&&s&&s!=i&&(a=s),"FILE_CONTENT"===l&&o?.liquid&&a&&(r=`{{ "${a.replace(".jpeg",".jpg")}" | file_url }}`),("THEME"===l||!l)&&o?.liquid&&a&&(r=`{{ "${a}" | asset_url }}`),"string"==typeof r&&r)?`url(${r})`:void 0!==r?"none":void 0},getStyleBgPosition=e=>{let t={desktop:getBgPositionByDevice(e,"desktop")||"50% 50%",tablet:getBgPositionByDevice(e,"tablet"),mobile:getBgPositionByDevice(e,"mobile")};return makeStyle.makeStyleResponsive("bgp",t)},getBgPositionByDevice=(e,t)=>{let o=e?.[t]?.position;return o&&`${o.x}% ${o.y}%`},getStyleBgSize=e=>{let t={desktop:getBgSizeByDevice(e,"desktop")||"cover",tablet:getBgSizeByDevice(e,"tablet"),mobile:getBgSizeByDevice(e,"mobile")};return makeStyle.makeStyleResponsive("bgs",t)},getBgSizeByDevice=(e,t)=>e?.[t]?.size,getStyleBgRepeat=e=>{let t={desktop:getBgRepeatByDevice(e,"desktop")||"no-repeat",tablet:getBgRepeatByDevice(e,"tablet"),mobile:getBgRepeatByDevice(e,"mobile")};return makeStyle.makeStyleResponsive("bgr",t)},getBgRepeatByDevice=(e,t)=>e?.[t]?.repeat,getStyleBgAttachment=e=>{let t={desktop:getBgAttachmentByDevice(e,"desktop"),tablet:getBgAttachmentByDevice(e,"tablet"),mobile:getBgAttachmentByDevice(e,"mobile")};return makeStyle.makeStyleResponsive("bga",t)},getBgAttachmentByDevice=(e,t)=>e?.[t]?.attachment,composeBackgroundCss=e=>`${e?`background-color: ${colors.getSingleColorVariable(e)};`:void 0}`,makeFixedBgAttachment=e=>{if(!e)return;e.tablet=e.tablet?e.tablet:e.desktop,e.mobile=e.mobile?e.mobile:e.tablet;let t={desktop:getBgAttachmentByDevice(e,"desktop"),tablet:getBgAttachmentByDevice(e,"tablet"),mobile:getBgAttachmentByDevice(e,"mobile")},o={desktop:{...makeFixedBgAttachmentByDevice("desktop",t.desktop)},tablet:{...makeFixedBgAttachmentByDevice("tablet",t.tablet)},mobile:{...makeFixedBgAttachmentByDevice("mobile",t.mobile)}};return{wrapper:{...o.desktop?.wrapper,...o.tablet?.wrapper,...o.mobile?.wrapper},content:{...o.desktop?.content,...o.tablet?.content,...o.mobile?.content}}},makeFixedBgAttachmentByDevice=(e,t)=>{let o=constant.devicesMapping[e]??"";return"fixed"===t?{wrapper:{[`--pos${o}`]:"absolute",[`--top${o}`]:"0",[`--left${o}`]:"0",[`--w${o}`]:"100%",[`--h${o}`]:"100%"},content:{[`--pos${o}`]:"fixed",[`--w${o}`]:"100vw",[`--h${o}`]:"100vh",[`--bga${o}`]:"unset"}}:{wrapper:{[`--pos${o}`]:"absolute"},content:{[`--w${o}`]:"100%",[`--h${o}`]:"100%",[`--pos${o}`]:"absolute",[`--bga${o}`]:t}}},GRADIENT_BGR_KEY="linear-gradient",getGradientBgrStyleForButton=e=>{if(!e)return;let t={};for(let o of Object.keys(e)){let g=e[o];if(!g?.startsWith(GRADIENT_BGR_KEY))continue;let i="normal"===o?"--bgi":"--hvr-bgi";t[i]=g}return t},getGradientBgrStyleByDevice=(e,t)=>{if(!e)return;let o={};return["desktop","tablet","mobile"].forEach(g=>{if(e[g]?.color?.includes(GRADIENT_BGR_KEY)){let i=`${getBgImageByDevice(e,g)||"url()"}, ${e[g]?.color}`;Object.assign(o,{[`--bgc${"desktop"!==g?"-"+g:""}`]:e[g]?.color,[`--bgi${"desktop"!==g?"-"+g:""}`]:t?.[g]?i:`${e[g]?.color}`})}}),o},getBgByDevice=e=>{let{backgroundColor:t,backgroundImage:o}=e;if(!t&&!o)return;let g={desktop:getResonsiveValue.getResponsiveValueByScreen(o,"desktop"),tablet:getResonsiveValue.getResponsiveValueByScreen(o,"tablet"),mobile:getResonsiveValue.getResponsiveValueByScreen(o,"mobile")},i={};return["desktop","tablet","mobile"].forEach(e=>{let l=getResonsiveValue.getResponsiveValueByScreen(t,e),r=o?getBgImageByDevice(g,e):void 0;l?.includes(GRADIENT_BGR_KEY)?Object.assign(i,{[`--bgi${"desktop"!==e?"-"+e:""}`]:l}):Object.assign(i,{[`--bgc${"desktop"!==e?"-"+e:""}`]:l,[`--bgi${"desktop"!==e?"-"+e:""}`]:"none"}),r&&"none"!==r&&Object.assign(i,{[`--bgi${"desktop"!==e?"-"+e:""}`]:r})}),{...i,...getStyleBgPosition(o),...getStyleBgSize(o),...getStyleBgRepeat(o)}};exports.GRADIENT_BGR_KEY=GRADIENT_BGR_KEY,exports.composeBackgroundCss=composeBackgroundCss,exports.getBgByDevice=getBgByDevice,exports.getBgImageByDevice=getBgImageByDevice,exports.getBgVideoByDevice=getBgVideoByDevice,exports.getColor=getColor,exports.getGradientBgrStyleByDevice=getGradientBgrStyleByDevice,exports.getGradientBgrStyleForButton=getGradientBgrStyleForButton,exports.getStyleBackgroundByDevice=getStyleBackgroundByDevice,exports.getStyleBgColor=getStyleBgColor,exports.makeFixedBgAttachment=makeFixedBgAttachment;
1
+ "use strict";var constant=require("./constant.js"),colors=require("./colors.js"),makeStyle=require("./make-style.js"),getResonsiveValue=require("./get-resonsive-value.js"),device=require("../constants/device.js");const isEmptyBg=e=>e?.videoHtml5===void 0&&e?.video===void 0&&!e?.videoType,getBgVideoByDevice=(e,t="desktop")=>{let o=e?.[t];if(isEmptyBg(o)&&"desktop"!==t){let t=e?.tablet;o=isEmptyBg(t)?e?.desktop:t}return o},getStyleBackgroundByDevice=(e,t)=>e?{...t?.ignoreBackgroundColor?{}:{...getStyleBgColor(e)},...t?.ignoreBackgroundImage?{}:{...getStyleBgImage(e,t)},...t?.ignoreBackgroundImageProperties?{}:{...getStyleBgPosition(e),...getStyleBgSize(e),...getStyleBgRepeat(e)},...t?.ignoreBgAttachment?{}:getStyleBgAttachment(e)}:{},getStyleBgColor=e=>{let t={desktop:getBgColorByDevice(e,"desktop"),tablet:getBgColorByDevice(e,"tablet"),mobile:getBgColorByDevice(e,"mobile")};return makeStyle.makeStyleResponsive("bgc",t)},getBgColorByDevice=(e,t)=>getColor(e?.[t]?.color),getColor=e=>e?colors.isColor(e?.toString())?e:`var(--g-c-${e})`:void 0,getStyleBgImage=(e,t)=>{let o={desktop:getBgImageByDevice(e,"desktop",t),tablet:getBgImageByDevice(e,"tablet",t),mobile:getBgImageByDevice(e,"mobile",t)};return makeStyle.makeStyleResponsive("bgi",o)},getBgImageByDevice=(e,t,o)=>{let g=e?.[t]?.type==="video";if(g)return;if(e?.[t]?.type==="color")return"url()";let i=e?.[t]?.image?.backupFileKey,l=e?.[t]?.image?.storage,r=e?.[t]?.image?.src,a=i,s=r?.match(/\/files\/([^\/]+\.(jpg|jpeg|gif|png|webp|svg))/)?.[1];return(i&&s&&s!=i&&(a=s),"FILE_CONTENT"===l&&o?.liquid&&a&&(r=`{{ "${a.replace(".jpeg",".jpg")}" | file_url }}`),("THEME"===l||!l)&&o?.liquid&&a&&(r=`{{ "${a}" | asset_url }}`),"string"==typeof r&&r)?`url(${r})`:void 0!==r?"none":void 0},getStyleBgPosition=e=>{let t={desktop:getBgPositionByDevice(e,"desktop")||"50% 50%",tablet:getBgPositionByDevice(e,"tablet"),mobile:getBgPositionByDevice(e,"mobile")};return makeStyle.makeStyleResponsive("bgp",t)},getBgPositionByDevice=(e,t)=>{let o=e?.[t]?.position;return o&&`${o.x}% ${o.y}%`},getStyleBgSize=e=>{let t={desktop:getBgSizeByDevice(e,"desktop")||"cover",tablet:getBgSizeByDevice(e,"tablet"),mobile:getBgSizeByDevice(e,"mobile")};return makeStyle.makeStyleResponsive("bgs",t)},getBgSizeByDevice=(e,t)=>e?.[t]?.size,getStyleBgRepeat=e=>{let t={desktop:getBgRepeatByDevice(e,"desktop")||"no-repeat",tablet:getBgRepeatByDevice(e,"tablet"),mobile:getBgRepeatByDevice(e,"mobile")};return makeStyle.makeStyleResponsive("bgr",t)},getBgRepeatByDevice=(e,t)=>e?.[t]?.repeat,getStyleBgAttachment=e=>{let t={desktop:getBgAttachmentByDevice(e,"desktop"),tablet:getBgAttachmentByDevice(e,"tablet"),mobile:getBgAttachmentByDevice(e,"mobile")};return makeStyle.makeStyleResponsive("bga",t)},getBgAttachmentByDevice=(e,t)=>e?.[t]?.attachment,composeBackgroundCss=e=>`${e?`background-color: ${colors.getSingleColorVariable(e)};`:void 0}`,makeFixedBgAttachment=e=>{if(!e)return;e.tablet=e.tablet?e.tablet:e.desktop,e.mobile=e.mobile?e.mobile:e.tablet;let t={desktop:getBgAttachmentByDevice(e,"desktop"),tablet:getBgAttachmentByDevice(e,"tablet"),mobile:getBgAttachmentByDevice(e,"mobile")},o={desktop:{...makeFixedBgAttachmentByDevice("desktop",t.desktop)},tablet:{...makeFixedBgAttachmentByDevice("tablet",t.tablet)},mobile:{...makeFixedBgAttachmentByDevice("mobile",t.mobile)}};return{wrapper:{...o.desktop?.wrapper,...o.tablet?.wrapper,...o.mobile?.wrapper},content:{...o.desktop?.content,...o.tablet?.content,...o.mobile?.content}}},makeFixedBgAttachmentByDevice=(e,t)=>{let o=constant.devicesMapping[e]??"";return"fixed"===t?{wrapper:{[`--pos${o}`]:"absolute",[`--top${o}`]:"0",[`--left${o}`]:"0",[`--w${o}`]:"100%",[`--h${o}`]:"100%"},content:{[`--pos${o}`]:"fixed",[`--w${o}`]:"100vw",[`--h${o}`]:"100vh",[`--bga${o}`]:"unset"}}:{wrapper:{[`--pos${o}`]:"absolute"},content:{[`--w${o}`]:"100%",[`--h${o}`]:"100%",[`--pos${o}`]:"absolute",[`--bga${o}`]:t}}},GRADIENT_BGR_KEY="linear-gradient",getGradientBgrStyleForButton=e=>{if(!e)return;let t={};for(let o of Object.keys(e)){let g=e[o];if(!g?.startsWith(GRADIENT_BGR_KEY))continue;let i="normal"===o?"--bgi":"--hvr-bgi";t[i]=g}return t},getGradientBgrStyleByDevice=(e,t)=>{if(!e)return;let o={};return device.DEVICES.forEach(g=>{if(e[g]?.color?.includes(GRADIENT_BGR_KEY)){let i=`${getBgImageByDevice(e,g)||"url()"}, ${e[g]?.color}`;Object.assign(o,{[`--bgc${"desktop"!==g?"-"+g:""}`]:e[g]?.color,[`--bgi${"desktop"!==g?"-"+g:""}`]:t?.[g]?i:`${e[g]?.color}`})}}),o},getBgByDevice=e=>{let{backgroundColor:t,backgroundImage:o}=e;if(!t&&!o)return;let g={desktop:getResonsiveValue.getResponsiveValueByScreen(o,"desktop"),tablet:getResonsiveValue.getResponsiveValueByScreen(o,"tablet"),mobile:getResonsiveValue.getResponsiveValueByScreen(o,"mobile")},i={};return device.DEVICES.forEach(e=>{let l=getResonsiveValue.getResponsiveValueByScreen(t,e),r=o?getBgImageByDevice(g,e):void 0;l?.includes(GRADIENT_BGR_KEY)?Object.assign(i,{[`--bgi${"desktop"!==e?"-"+e:""}`]:l}):Object.assign(i,{[`--bgc${"desktop"!==e?"-"+e:""}`]:l,[`--bgi${"desktop"!==e?"-"+e:""}`]:"none"}),r&&"none"!==r&&Object.assign(i,{[`--bgi${"desktop"!==e?"-"+e:""}`]:r})}),{...i,...getStyleBgPosition(o),...getStyleBgSize(o),...getStyleBgRepeat(o)}};exports.GRADIENT_BGR_KEY=GRADIENT_BGR_KEY,exports.composeBackgroundCss=composeBackgroundCss,exports.getBgByDevice=getBgByDevice,exports.getBgImageByDevice=getBgImageByDevice,exports.getBgVideoByDevice=getBgVideoByDevice,exports.getColor=getColor,exports.getGradientBgrStyleByDevice=getGradientBgrStyleByDevice,exports.getGradientBgrStyleForButton=getGradientBgrStyleForButton,exports.getStyleBackgroundByDevice=getStyleBackgroundByDevice,exports.getStyleBgColor=getStyleBgColor,exports.makeFixedBgAttachment=makeFixedBgAttachment;
@@ -1 +1 @@
1
- "use strict";var getResonsiveValue=require("./get-resonsive-value.js");const getCarouselContainerHeight=e=>{let t=e=>"outside"===e?"auto":"100%";return{desktop:t(getResonsiveValue.getResponsiveValueByScreen(e,"desktop")),tablet:t(getResonsiveValue.getResponsiveValueByScreen(e,"tablet")),mobile:t(getResonsiveValue.getResponsiveValueByScreen(e,"mobile"))}},makeContainerWidthOrHeight=e=>{let t=e=>e?"w":"h",s=getCarouselContainerHeight(e.dotStyle);return{[`--${t(getResonsiveValue.getResponsiveValueByScreen(e?.vertical,"desktop"))}`]:s.desktop,[`--${t(getResonsiveValue.getResponsiveValueByScreen(e?.vertical,"tablet"))}-tablet`]:s.tablet,[`--${t(getResonsiveValue.getResponsiveValueByScreen(e?.vertical,"mobile"))}-mobile`]:s.mobile}},makeDotGapToCarouselStyle=(e,t,s)=>{let o={},a=["desktop","tablet","mobile"],l=(e,t)=>"outside"===e?t?"ml":"mt":t?"right":"bottom";return a.map(e=>{let s=getResonsiveValue.getResponsiveValueByScreen(t,e,0);o={...o,[e]:`${s&&"Auto"!==s?s:"0"}px`}}),{[`--${l(getResonsiveValue.getResponsiveValueByScreen(e,"desktop"),getResonsiveValue.getResponsiveValueByScreen(s,"desktop"))}`]:o.desktop,[`--${l(getResonsiveValue.getResponsiveValueByScreen(e,"tablet"),getResonsiveValue.getResponsiveValueByScreen(s,"tablet"))}-tablet`]:o.tablet,[`--${l(getResonsiveValue.getResponsiveValueByScreen(e,"mobile"),getResonsiveValue.getResponsiveValueByScreen(s,"mobile"))}-mobile`]:o.mobile}};exports.getCarouselContainerHeight=getCarouselContainerHeight,exports.makeContainerWidthOrHeight=makeContainerWidthOrHeight,exports.makeDotGapToCarouselStyle=makeDotGapToCarouselStyle;
1
+ "use strict";var getResonsiveValue=require("./get-resonsive-value.js"),device=require("../constants/device.js");const getCarouselContainerHeight=e=>{let t=e=>"outside"===e?"auto":"100%";return{desktop:t(getResonsiveValue.getResponsiveValueByScreen(e,"desktop")),tablet:t(getResonsiveValue.getResponsiveValueByScreen(e,"tablet")),mobile:t(getResonsiveValue.getResponsiveValueByScreen(e,"mobile"))}},makeContainerWidthOrHeight=e=>{let t=e=>e?"w":"h",s=getCarouselContainerHeight(e.dotStyle);return{[`--${t(getResonsiveValue.getResponsiveValueByScreen(e?.vertical,"desktop"))}`]:s.desktop,[`--${t(getResonsiveValue.getResponsiveValueByScreen(e?.vertical,"tablet"))}-tablet`]:s.tablet,[`--${t(getResonsiveValue.getResponsiveValueByScreen(e?.vertical,"mobile"))}-mobile`]:s.mobile}},makeDotGapToCarouselStyle=(e,t,s)=>{let o={},a=(e,t)=>"outside"===e?t?"ml":"mt":t?"right":"bottom";return device.DEVICES.map(e=>{let s=getResonsiveValue.getResponsiveValueByScreen(t,e,0);o={...o,[e]:`${s&&"Auto"!==s?s:"0"}px`}}),{[`--${a(getResonsiveValue.getResponsiveValueByScreen(e,"desktop"),getResonsiveValue.getResponsiveValueByScreen(s,"desktop"))}`]:o.desktop,[`--${a(getResonsiveValue.getResponsiveValueByScreen(e,"tablet"),getResonsiveValue.getResponsiveValueByScreen(s,"tablet"))}-tablet`]:o.tablet,[`--${a(getResonsiveValue.getResponsiveValueByScreen(e,"mobile"),getResonsiveValue.getResponsiveValueByScreen(s,"mobile"))}-mobile`]:o.mobile}};exports.getCarouselContainerHeight=getCarouselContainerHeight,exports.makeContainerWidthOrHeight=makeContainerWidthOrHeight,exports.makeDotGapToCarouselStyle=makeDotGapToCarouselStyle;
@@ -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:t,type:o,suffix:r=""})=>{let{top:a,left:s,bottom:n,right:i}=t;a&&(e[`--${o}t${r}`]=a),s&&(e[`--${o}l${r}`]=s),n&&(e[`--${o}b${r}`]=n),i&&(e[`--${o}r${r}`]=i)},composeSpacingV2=({source:e,spacing:t,suffix:o="",tag:r=""})=>{if(t&&t.margin){let{top:a,left:s,bottom:n,right:i}=t.margin;a&&(e[`--mt${o}`]=a),s&&(e[`--ml${o}`]=constant.layoutComponent.includes(r)&&"0px"===s?"auto":s),n&&(e[`--mb${o}`]=n),i&&(e[`--mr${o}`]=constant.layoutComponent.includes(r)&&"0px"===i?"auto":i)}if(t&&t.padding){let{top:r,left:a,bottom:s,right:n}=t.padding;r&&(e[`--pt${o}`]=r),a&&(e[`--pl${o}`]=a),s&&(e[`--pb${o}`]=s),n&&(e[`--pr${o}`]=n)}},getAttrValue=(e,t,o)=>{if(null!=t)switch(e){case"bgc":case"c":return colors.isColor(t.toString())?t:`var(--g-c-${t})`;case"d":if(!t)return"none";if(t&&o&&constant.layoutComponent.includes(o))return"grid";return"block";case"animation":case"hasBoxShadow":case"rounded":case"boxShadow":case"border":return;default:return t}},postPurchasePaddingMapping={loose:"21px",extraLoose:"38px",tight:"9px",extraTight:"5px",base:"14px"},composeAdvanceStyleForPostPurchase=(e,t)=>{if(!e)return{};let o={};return Object.keys(e).forEach(r=>{let a=e[r];if("blockPadding"===r){let e=postPurchasePaddingMapping[a];o["--pb"]=getAttrValue(r,e,t),o["--pt"]=getAttrValue(r,e,t),o["--mb"]="0px",o["--mt"]="0px"}if("inlinePadding"===r){let e=postPurchasePaddingMapping[a];o["--pl"]=getAttrValue(r,e,t),o["--pr"]=getAttrValue(r,e,t)}}),o};function composeAdvanceStyle(e,t,o){if(!e)return{};let r={},a=["desktop","tablet","mobile"],s=["hover","normal"];Object.keys(e).forEach(n=>{let i=e[n];if("cssClass"===n||null==i)return;let c=e.hasBoxShadow?e.hasBoxShadow:{};if("object"==typeof i){if(Array.isArray(i))return;Object.keys(i).forEach(o=>{if(a.includes(o)){let e=i[o];if(void 0!==e){"border"===n&&Object.assign(r,borders.handleConvertBorderStyle(i),borders.handleConvertBorderWidth(i),borders.handleConvertBorderColor(i)),"rounded"===n&&Object.assign(r,radius.composeRadius(i)),"boxShadow"===n&&Object.assign(r,shadow.getResponsiveStyleShadow(i,"box-shadow",c));let a=getAttrValue(n,e,t);if("desktop"===o)switch(n){case"padding":composeSpacing({source:r,spacing:e,type:"p"});break;case"margin":composeSpacing({source:r,spacing:e,type:"m"});break;case"spacing-setting":composeSpacingV2({source:r,spacing:e,tag:t});break;case"m":case"p":break;default:a&&(r[`--${n}`]=a)}else switch(n){case"padding":composeSpacing({source:r,spacing:e,type:"p",suffix:`-${o}`});break;case"margin":composeSpacing({source:r,spacing:e,type:"m",suffix:`-${o}`});break;case"spacing-setting":composeSpacingV2({source:r,spacing:e,suffix:`-${o}`,tag:t});break;case"m":case"p":break;default:a&&(r[`--${n}-${o}`]=a)}}}else if(s.includes(o))switch(n){case"hasBoxShadow":break;case"boxShadow":Object.assign(r,shadow.getStyleShadowState(i,"box-shadow",c))}else"border"===n&&("none"===i.border&&(i.border="solid",i.color="#121212",i.isCustom=!0,i.width="0px",i.position="all"),Object.assign(r,borders.getBorderStyle(i))),"rounded"===n&&Object.assign(r,radius.getCornerCSSFromGlobal(i)),"hasBoxShadow"===n&&Object.assign(r,shadow.getStyleShadow({value:e.boxShadow,styleAppliedFor:"box-shadow",isEnableShadow:e.hasBoxShadow})),"boxShadow"===n&&Object.assign(r,shadow.getStyleShadow({value:i,styleAppliedFor:"box-shadow",isEnableShadow:e.hasBoxShadow}))})}else{let o=getAttrValue(n,i,t);o&&(r[`--${n}`]=o),"hasBoxShadow"===n&&e.boxShadow&&Object.assign(r,shadow.getStyleShadow({value:e.boxShadow,styleAppliedFor:"box-shadow",isEnableShadow:e.hasBoxShadow}))}if("blockPadding"===n&&"POST_PURCHASE"===o){let e=postPurchasePaddingMapping[i];r["--pb"]=getAttrValue(n,e,t),r["--pt"]=getAttrValue(n,e,t),r["--mb"]="0px",r["--mt"]="0px"}if("inlinePadding"===n&&"POST_PURCHASE"===o){let e=postPurchasePaddingMapping[i];r["--pl"]=getAttrValue(n,e,t),r["--pr"]=getAttrValue(n,e,t)}});let n="POST_PURCHASE"===o?composeAdvanceStyleForPostPurchase(e,t):{};return{...r,...n}}const convertBoxShadowV1ToV2=(e,t,o)=>{let r=["Section","Row","Text","Heading","Image","Button","HeroBanner","ImageComparison","Countdown","Video"],a=["ProductTitle","ProductDescription","ProductPrice","ProductVendor","Product","ProductSku","StockCounter","Sticky","ProductBadge","ProductViewMore","ProductButton","DynamicCheckout","ProductList","ProductQuantity","ProductVariants"],s=["Icon","IconListHoz","Line","IconList","IconListV2","Tabs","Accordion","Marquee","Breadcrumb","EstimateDate"],n=["Newsletter","ContactForm","TextField","FormTextarea","FormEmail","FormDropdown","FormCheckbox","SubmitButton","TextInput"],i=["CollectionTitle","CollectionDescription","CollectionBanner","CollectionToolbar","CollectionPaginator"],c=[...r,...a,...s,...n,...i],l=e;return c.includes(o||"")&&(l={desktop:t.desktop??{},tablet:t.tablet??t.desktop??{},mobile:t.mobile??t.tablet??t.desktop??{}}),l},splitStyle=(e,t={})=>{let o=e.map(e=>makeStyle.makeStyleKey(e)).flat(),r=Object.keys(t).filter(e=>o.includes(e)),a=r.reduce((e,o)=>({...e,[o]:t[o]}),{}),s=Object.keys(t).filter(e=>!r.includes(e)).reduce((e,o)=>({...e,[o]:t[o]}),{});return[a,s]},filterAttrInStyle=(e,t)=>{if(!e||!t)return{};let o={...e};return Object.entries(o).forEach(([e])=>{t.includes(e)||delete o[e]}),o},removeAttrInStyle=(e,t)=>{if(!e||!t)return{};let o={...e};return Object.entries(o).forEach(([e])=>{t.includes(e)&&delete o[e]}),o},getCornerStyle=e=>composeAdvanceStyle({rounded:e?.rounded}),removePaddingYInStyle=e=>{let t=["--pt","--pt-tablet","--pt-mobile","--pb","--pb-tablet","--pb-mobile"];return removeAttrInStyle(e,t)};exports.composeAdvanceStyle=composeAdvanceStyle,exports.composeAdvanceStyleForPostPurchase=composeAdvanceStyleForPostPurchase,exports.convertBoxShadowV1ToV2=convertBoxShadowV1ToV2,exports.filterAttrInStyle=filterAttrInStyle,exports.getCornerStyle=getCornerStyle,exports.removeAttrInStyle=removeAttrInStyle,exports.removePaddingYInStyle=removePaddingYInStyle,exports.splitStyle=splitStyle;
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"),device=require("../constants/device.js");const composeSpacing=({source:e,spacing:t,type:o,suffix:r=""})=>{let{top:a,left:s,bottom:n,right:i}=t;a&&(e[`--${o}t${r}`]=a),s&&(e[`--${o}l${r}`]=s),n&&(e[`--${o}b${r}`]=n),i&&(e[`--${o}r${r}`]=i)},composeSpacingV2=({source:e,spacing:t,suffix:o="",tag:r=""})=>{if(t&&t.margin){let{top:a,left:s,bottom:n,right:i}=t.margin;a&&(e[`--mt${o}`]=a),s&&(e[`--ml${o}`]=constant.layoutComponent.includes(r)&&"0px"===s?"auto":s),n&&(e[`--mb${o}`]=n),i&&(e[`--mr${o}`]=constant.layoutComponent.includes(r)&&"0px"===i?"auto":i)}if(t&&t.padding){let{top:r,left:a,bottom:s,right:n}=t.padding;r&&(e[`--pt${o}`]=r),a&&(e[`--pl${o}`]=a),s&&(e[`--pb${o}`]=s),n&&(e[`--pr${o}`]=n)}},getAttrValue=(e,t,o)=>{if(null!=t)switch(e){case"bgc":case"c":return colors.isColor(t.toString())?t:`var(--g-c-${t})`;case"d":if(!t)return"none";if(t&&o&&constant.layoutComponent.includes(o))return"grid";return"block";case"animation":case"hasBoxShadow":case"rounded":case"boxShadow":case"border":return;default:return t}},postPurchasePaddingMapping={loose:"21px",extraLoose:"38px",tight:"9px",extraTight:"5px",base:"14px"},composeAdvanceStyleForPostPurchase=(e,t)=>{if(!e)return{};let o={};return Object.keys(e).forEach(r=>{let a=e[r];if("blockPadding"===r){let e=postPurchasePaddingMapping[a];o["--pb"]=getAttrValue(r,e,t),o["--pt"]=getAttrValue(r,e,t),o["--mb"]="0px",o["--mt"]="0px"}if("inlinePadding"===r){let e=postPurchasePaddingMapping[a];o["--pl"]=getAttrValue(r,e,t),o["--pr"]=getAttrValue(r,e,t)}}),o};function composeAdvanceStyle(e,t,o){if(!e)return{};let r={},a=["hover","normal"];Object.keys(e).forEach(s=>{let n=e[s];if("cssClass"===s||null==n)return;let i=e.hasBoxShadow?e.hasBoxShadow:{};if("object"==typeof n){if(Array.isArray(n))return;Object.keys(n).forEach(o=>{if(device.DEVICES.includes(o)){let e=n[o];if(void 0!==e){"border"===s&&Object.assign(r,borders.handleConvertBorderStyle(n),borders.handleConvertBorderWidth(n),borders.handleConvertBorderColor(n)),"rounded"===s&&Object.assign(r,radius.composeRadius(n)),"boxShadow"===s&&Object.assign(r,shadow.getResponsiveStyleShadow(n,"box-shadow",i));let a=getAttrValue(s,e,t);if("desktop"===o)switch(s){case"padding":composeSpacing({source:r,spacing:e,type:"p"});break;case"margin":composeSpacing({source:r,spacing:e,type:"m"});break;case"spacing-setting":composeSpacingV2({source:r,spacing:e,tag:t});break;case"m":case"p":break;default:a&&(r[`--${s}`]=a)}else switch(s){case"padding":composeSpacing({source:r,spacing:e,type:"p",suffix:`-${o}`});break;case"margin":composeSpacing({source:r,spacing:e,type:"m",suffix:`-${o}`});break;case"spacing-setting":composeSpacingV2({source:r,spacing:e,suffix:`-${o}`,tag:t});break;case"m":case"p":break;default:a&&(r[`--${s}-${o}`]=a)}}}else if(a.includes(o))switch(s){case"hasBoxShadow":break;case"boxShadow":Object.assign(r,shadow.getStyleShadowState(n,"box-shadow",i))}else"border"===s&&("none"===n.border&&(n.border="solid",n.color="#121212",n.isCustom=!0,n.width="0px",n.position="all"),Object.assign(r,borders.getBorderStyle(n))),"rounded"===s&&Object.assign(r,radius.getCornerCSSFromGlobal(n)),"hasBoxShadow"===s&&Object.assign(r,shadow.getStyleShadow({value:e.boxShadow,styleAppliedFor:"box-shadow",isEnableShadow:e.hasBoxShadow})),"boxShadow"===s&&Object.assign(r,shadow.getStyleShadow({value:n,styleAppliedFor:"box-shadow",isEnableShadow:e.hasBoxShadow}))})}else{let o=getAttrValue(s,n,t);o&&(r[`--${s}`]=o),"hasBoxShadow"===s&&e.boxShadow&&Object.assign(r,shadow.getStyleShadow({value:e.boxShadow,styleAppliedFor:"box-shadow",isEnableShadow:e.hasBoxShadow}))}if("blockPadding"===s&&"POST_PURCHASE"===o){let e=postPurchasePaddingMapping[n];r["--pb"]=getAttrValue(s,e,t),r["--pt"]=getAttrValue(s,e,t),r["--mb"]="0px",r["--mt"]="0px"}if("inlinePadding"===s&&"POST_PURCHASE"===o){let e=postPurchasePaddingMapping[n];r["--pl"]=getAttrValue(s,e,t),r["--pr"]=getAttrValue(s,e,t)}});let s="POST_PURCHASE"===o?composeAdvanceStyleForPostPurchase(e,t):{};return{...r,...s}}const convertBoxShadowV1ToV2=(e,t,o)=>{let r=["Section","Row","Text","Heading","Image","Button","HeroBanner","ImageComparison","Countdown","Video"],a=["ProductTitle","ProductDescription","ProductPrice","ProductVendor","Product","ProductSku","StockCounter","Sticky","ProductBadge","ProductViewMore","ProductButton","DynamicCheckout","ProductList","ProductQuantity","ProductVariants"],s=["Icon","IconListHoz","Line","IconList","IconListV2","Tabs","Accordion","Marquee","Breadcrumb","EstimateDate"],n=["Newsletter","ContactForm","TextField","FormTextarea","FormEmail","FormDropdown","FormCheckbox","SubmitButton","TextInput"],i=["CollectionTitle","CollectionDescription","CollectionBanner","CollectionToolbar","CollectionPaginator"],c=[...r,...a,...s,...n,...i],d=e;return c.includes(o||"")&&(d={desktop:t.desktop??{},tablet:t.tablet??t.desktop??{},mobile:t.mobile??t.tablet??t.desktop??{}}),d},splitStyle=(e,t={})=>{let o=e.map(e=>makeStyle.makeStyleKey(e)).flat(),r=Object.keys(t).filter(e=>o.includes(e)),a=r.reduce((e,o)=>({...e,[o]:t[o]}),{}),s=Object.keys(t).filter(e=>!r.includes(e)).reduce((e,o)=>({...e,[o]:t[o]}),{});return[a,s]},filterAttrInStyle=(e,t)=>{if(!e||!t)return{};let o={...e};return Object.entries(o).forEach(([e])=>{t.includes(e)||delete o[e]}),o},removeAttrInStyle=(e,t)=>{if(!e||!t)return{};let o={...e};return Object.entries(o).forEach(([e])=>{t.includes(e)&&delete o[e]}),o},getCornerStyle=e=>composeAdvanceStyle({rounded:e?.rounded}),removePaddingYInStyle=e=>{let t=["--pt","--pt-tablet","--pt-mobile","--pb","--pb-tablet","--pb-mobile"];return removeAttrInStyle(e,t)};exports.composeAdvanceStyle=composeAdvanceStyle,exports.composeAdvanceStyleForPostPurchase=composeAdvanceStyleForPostPurchase,exports.convertBoxShadowV1ToV2=convertBoxShadowV1ToV2,exports.filterAttrInStyle=filterAttrInStyle,exports.getCornerStyle=getCornerStyle,exports.removeAttrInStyle=removeAttrInStyle,exports.removePaddingYInStyle=removePaddingYInStyle,exports.splitStyle=splitStyle;
@@ -1 +1 @@
1
- "use strict";var constant=require("./constant.js"),getResonsiveValue=require("./get-resonsive-value.js");const gridToArrayRegex=/[^\s()]+(?:\([^\s()]+(?:\([^()]+\))?(?:, *[^\s()]+(?:\([^()]+\))?)*\))?/g,optionLayoutStyle=e=>{if(!e)return{};let t={};for(let[o,r]of Object.entries(e))Object.assign(t,{[`--gtc${constant.devicesMapping?.[o]}`]:`repeat(${parseFloat(r+"")||1}, minmax(0, 1fr))`});return t},composeGridLayout=e=>{let t=getResonsiveValue.getResponsiveValue(e,"display"),o=("fit"===getResonsiveValue.getResponsiveValueByScreen(t,"desktop")?e?.desktop?.cols?.map(()=>"minmax(0, auto)"):e?.desktop?.cols?.map(e=>`minmax(0, ${e}fr)`))?.join(" "),r=("fit"===getResonsiveValue.getResponsiveValueByScreen(t,"tablet")?e?.tablet?.cols?.map(()=>"minmax(0, auto)"):e?.tablet?.cols?.map(e=>`minmax(0, ${e}fr)`))?.join(" "),a=("fit"===getResonsiveValue.getResponsiveValueByScreen(t,"mobile")?e?.mobile?.cols?.map(()=>"minmax(0, auto)"):e?.mobile?.cols?.map(e=>`minmax(0, ${e}fr)`))?.join(" ");return{"--gtc":o,"--gtc-tablet":r,"--gtc-mobile":a}},gridToArray=e=>e?e.match(gridToArrayRegex)??[]:[],convertOldLayout=e=>{let t=gridToArray(e?.desktop).length,o=gridToArray(e?.tablet).length,r=gridToArray(e?.mobile).length;return{desktop:{cols:t?Array.from({length:t},()=>12/t):void 0,display:"fill"},tablet:{cols:o?Array.from({length:o},()=>12/o):void 0},mobile:{cols:r?Array.from({length:r},()=>12/r):void 0}}},getLayoutClasses=e=>{let t=["desktop","tablet","mobile"];return t.reduce((t,o)=>{let r="desktop"===o?"":`${o}:`,a=e?.[o];return a&&(t[`${r}gp-flex-col`]="vertical"===a,t[`${r}gp-flex-row`]="horizontal"===a),t},{})};exports.composeGridLayout=composeGridLayout,exports.convertOldLayout=convertOldLayout,exports.getLayoutClasses=getLayoutClasses,exports.gridToArrayRegex=gridToArrayRegex,exports.optionLayoutStyle=optionLayoutStyle;
1
+ "use strict";var device=require("../constants/device.js"),constant=require("./constant.js"),getResonsiveValue=require("./get-resonsive-value.js");const gridToArrayRegex=/[^\s()]+(?:\([^\s()]+(?:\([^()]+\))?(?:, *[^\s()]+(?:\([^()]+\))?)*\))?/g,optionLayoutStyle=e=>{if(!e)return{};let t={};for(let[o,r]of Object.entries(e))Object.assign(t,{[`--gtc${constant.devicesMapping?.[o]}`]:`repeat(${parseFloat(r+"")||1}, minmax(0, 1fr))`});return t},composeGridLayout=e=>{let t=getResonsiveValue.getResponsiveValue(e,"display"),o=("fit"===getResonsiveValue.getResponsiveValueByScreen(t,"desktop")?e?.desktop?.cols?.map(()=>"minmax(0, auto)"):e?.desktop?.cols?.map(e=>`minmax(0, ${e}fr)`))?.join(" "),r=("fit"===getResonsiveValue.getResponsiveValueByScreen(t,"tablet")?e?.tablet?.cols?.map(()=>"minmax(0, auto)"):e?.tablet?.cols?.map(e=>`minmax(0, ${e}fr)`))?.join(" "),a=("fit"===getResonsiveValue.getResponsiveValueByScreen(t,"mobile")?e?.mobile?.cols?.map(()=>"minmax(0, auto)"):e?.mobile?.cols?.map(e=>`minmax(0, ${e}fr)`))?.join(" ");return{"--gtc":o,"--gtc-tablet":r,"--gtc-mobile":a}},gridToArray=e=>e?e.match(gridToArrayRegex)??[]:[],convertOldLayout=e=>{let t=gridToArray(e?.desktop).length,o=gridToArray(e?.tablet).length,r=gridToArray(e?.mobile).length;return{desktop:{cols:t?Array.from({length:t},()=>12/t):void 0,display:"fill"},tablet:{cols:o?Array.from({length:o},()=>12/o):void 0},mobile:{cols:r?Array.from({length:r},()=>12/r):void 0}}},getLayoutClasses=e=>device.DEVICES.reduce((t,o)=>{let r="desktop"===o?"":`${o}:`,a=e?.[o];return a&&(t[`${r}gp-flex-col`]="vertical"===a,t[`${r}gp-flex-row`]="horizontal"===a),t},{});exports.composeGridLayout=composeGridLayout,exports.convertOldLayout=convertOldLayout,exports.getLayoutClasses=getLayoutClasses,exports.gridToArrayRegex=gridToArrayRegex,exports.optionLayoutStyle=optionLayoutStyle;
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsx as t,Fragment as e,jsxs as r}from"react/jsx-runtime";import{useRef as n,useState as o,useCallback as i,useEffect as a}from"react";import"zustand";import{useBuilderPreviewStore as l}from"../../contexts/BuilderPreviewContext.js";import"react-transition-group";import"@gem-sdk/core";import"swr";import"swr/infinite";import{usePageType as s}from"../../hooks/shop.js";import"classnames";import"dayjs";import"../../helpers/convert.js";import"@gem-sdk/adapter-shopify";import"swr/mutation";import"vanilla-lazyload";import"../../hooks/useCartUI.js";import"../../hooks/useStickyStore.js";function Spacing(u){let d=l(t=>t.isThemeSectionEditor),c=s(),m=n(null),p=n(null),g=n(null),v=n(!1),b=n(0),f=n(0),w=n(null),[h,y]=o(0),[E,S]=o(!1),L=n(null),C=t=>{let e=t.clientY,r=Math.ceil(e-b.current),n=f.current||0,o=n+r>=0?`${n+r}px`:"0px";return{newValue:o}},j=t=>{if(m.current&&p.current){let{newValue:e}=C(t);p.current.style.height=e,m.current.style.top=e;let r=m.current.closest("[data-toolbar-wrap]");r&&(r.style.marginBottom=e,B(e))}},k=()=>{T()},x=()=>{g.current&&clearTimeout(g.current),g.current=setTimeout(()=>{v.current=!0;let t=new CustomEvent("editor:toolbar:resize-spacing",{bubbles:!0,detail:{value:!0}});window.dispatchEvent(t),document.addEventListener("mousemove",j),document.addEventListener("mouseup",k)},100)},T=()=>{g.current&&clearTimeout(g.current),v.current=!1;let t=new CustomEvent("editor:toolbar:resize-spacing",{bubbles:!0,detail:{value:!1}});if(window.dispatchEvent(t),m.current){let t=getComputedStyle(m.current),e=t.top,r=new CustomEvent("editor:toolbar:change-margin-bottom",{bubbles:!0,detail:{componentUid:u.uid,marginBottom:e}});window.dispatchEvent(r)}let e=m.current?.closest("[data-toolbar-wrap]");e&&(e.style.marginBottom=""),document.removeEventListener("mousemove",j),document.removeEventListener("mouseup",k)},z=(t,e)=>{let r=t.children.length;if(r)for(let n=0;n<r;n++){let r=t.children[n];if(r){let t=r.getAttribute(e);if(t)return r}}},P=t=>{let e=t.getAttribute("data-component-tag");return"Row"===e||"Product"===e},A=i(t=>{let e=m.current?.closest("[data-toolbar-wrap]");if(!e)return;let r=z(e,"data-toolbar");if(!r)return;let n=r.getAttribute("data-toolbar-active");if(!n)return;let o=getComputedStyle(e),i=z(e,"data-spacing"),a=i?.querySelector("[data-spacing-margin-bottom]")||null;if(a&&p.current&&m.current){let r=o.marginBottom;if(t&&B(r),0>parseFloat(r)&&(r="0"),p.current.style.height=r,m.current.style.top=r,a.setAttribute("data-spacing-margin-bottom-active","true"),P(e))p.current.style.left="0";else{let t=o.paddingLeft,e=`-${t}`,r=`translate(${e}, -100%)`;p.current.style.left=e,m.current.style.transform=r}}},[]),B=t=>{let e=parseFloat(t);y(e),S(!0),L.current&&clearTimeout(L.current),L.current=setTimeout(()=>{S(!1)},2e3);let r=e<=28&&e>=0?e/2+16:e>28?0:16;w.current&&(w.current.style.transform=`translateY(${r}px)`)},U=usePrevious(u.advanced?.["spacing-setting"]);a(()=>{let t=$(U,u.advanced?.["spacing-setting"]);A(t)},[U,u.advanced,A]);let $=(t,e)=>["desktop","tablet","mobile"].some(r=>JSON.stringify(t?.[r]?.margin?.bottom)!==JSON.stringify(e?.[r]?.margin?.bottom)),F=i(()=>{A()},[A]);return a(()=>(window.addEventListener("editor:toolbar:update-margin-bottom",()=>A),window.addEventListener("editor:toolbar:update-padding-left",()=>A),window.addEventListener("resize",F),()=>{window.removeEventListener("editor:toolbar:update-margin-bottom",()=>A),window.removeEventListener("editor:toolbar:update-padding-left",()=>A),window.removeEventListener("resize",F)}),[F,A]),t(e,{children:"Section"!==u.tag&&"POST_PURCHASE"!==c&&t("div",{"data-spacing":!0,"data-spacing-theme-section":d,className:"gp-absolute gp-w-full gp-bottom-0",children:r("div",{"data-spacing-margin-bottom":!0,children:[r("div",{"data-spacing-margin-bottom-bg":!0,ref:p,children:[t("div",{"data-spacing-margin-bottom-value":!0}),t("div",{"data-active":E,"data-value-number":!0,ref:w,children:h})]}),t("div",{ref:m,"data-spacing-margin-bottom-drag":!0,onMouseDown:t=>{if(m.current){let e=getComputedStyle(m.current);b.current=t.clientY,f.current=parseFloat(e.top),x()}},onMouseUp:()=>{T()},role:"presentation"})]})})})}let usePrevious=t=>{let e=n();return a(()=>{e.current=t},[t]),e.current};export{Spacing as default};
2
+ import{jsx as t,Fragment as e,jsxs as r}from"react/jsx-runtime";import{useRef as n,useState as o,useCallback as i,useEffect as a}from"react";import"zustand";import{useBuilderPreviewStore as l}from"../../contexts/BuilderPreviewContext.js";import{DEVICES as s}from"../../constants/device.js";import"react-transition-group";import"@gem-sdk/core";import"swr";import"swr/infinite";import{usePageType as u}from"../../hooks/shop.js";import"classnames";import"dayjs";import"../../helpers/convert.js";import"@gem-sdk/adapter-shopify";import"swr/mutation";import"vanilla-lazyload";import"../../hooks/useCartUI.js";import"../../hooks/useStickyStore.js";function Spacing(c){let d=l(t=>t.isThemeSectionEditor),m=u(),p=n(null),g=n(null),v=n(null),b=n(!1),f=n(0),w=n(0),h=n(null),[y,E]=o(0),[S,L]=o(!1),C=n(null),j=t=>{let e=t.clientY,r=Math.ceil(e-f.current),n=w.current||0,o=n+r>=0?`${n+r}px`:"0px";return{newValue:o}},x=t=>{if(p.current&&g.current){let{newValue:e}=j(t);g.current.style.height=e,p.current.style.top=e;let r=p.current.closest("[data-toolbar-wrap]");r&&(r.style.marginBottom=e,U(e))}},T=()=>{z()},k=()=>{v.current&&clearTimeout(v.current),v.current=setTimeout(()=>{b.current=!0;let t=new CustomEvent("editor:toolbar:resize-spacing",{bubbles:!0,detail:{value:!0}});window.dispatchEvent(t),document.addEventListener("mousemove",x),document.addEventListener("mouseup",T)},100)},z=()=>{v.current&&clearTimeout(v.current),b.current=!1;let t=new CustomEvent("editor:toolbar:resize-spacing",{bubbles:!0,detail:{value:!1}});if(window.dispatchEvent(t),p.current){let t=getComputedStyle(p.current),e=t.top,r=new CustomEvent("editor:toolbar:change-margin-bottom",{bubbles:!0,detail:{componentUid:c.uid,marginBottom:e}});window.dispatchEvent(r)}let e=p.current?.closest("[data-toolbar-wrap]");e&&(e.style.marginBottom=""),document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",T)},P=(t,e)=>{let r=t.children.length;if(r)for(let n=0;n<r;n++){let r=t.children[n];if(r){let t=r.getAttribute(e);if(t)return r}}},A=t=>{let e=t.getAttribute("data-component-tag");return"Row"===e||"Product"===e},B=i(t=>{let e=p.current?.closest("[data-toolbar-wrap]");if(!e)return;let r=P(e,"data-toolbar");if(!r)return;let n=r.getAttribute("data-toolbar-active");if(!n)return;let o=getComputedStyle(e),i=P(e,"data-spacing"),a=i?.querySelector("[data-spacing-margin-bottom]")||null;if(a&&g.current&&p.current){let r=o.marginBottom;if(t&&U(r),0>parseFloat(r)&&(r="0"),g.current.style.height=r,p.current.style.top=r,a.setAttribute("data-spacing-margin-bottom-active","true"),A(e))g.current.style.left="0";else{let t=o.paddingLeft,e=`-${t}`,r=`translate(${e}, -100%)`;g.current.style.left=e,p.current.style.transform=r}}},[]),U=t=>{let e=parseFloat(t);E(e),L(!0),C.current&&clearTimeout(C.current),C.current=setTimeout(()=>{L(!1)},2e3);let r=e<=28&&e>=0?e/2+16:e>28?0:16;h.current&&(h.current.style.transform=`translateY(${r}px)`)},$=usePrevious(c.advanced?.["spacing-setting"]);a(()=>{let t=F($,c.advanced?.["spacing-setting"]);B(t)},[$,c.advanced,B]);let F=(t,e)=>s.some(r=>JSON.stringify(t?.[r]?.margin?.bottom)!==JSON.stringify(e?.[r]?.margin?.bottom)),M=i(()=>{B()},[B]);return a(()=>(window.addEventListener("editor:toolbar:update-margin-bottom",()=>B),window.addEventListener("editor:toolbar:update-padding-left",()=>B),window.addEventListener("resize",M),()=>{window.removeEventListener("editor:toolbar:update-margin-bottom",()=>B),window.removeEventListener("editor:toolbar:update-padding-left",()=>B),window.removeEventListener("resize",M)}),[M,B]),t(e,{children:"Section"!==c.tag&&"POST_PURCHASE"!==m&&t("div",{"data-spacing":!0,"data-spacing-theme-section":d,className:"gp-absolute gp-w-full gp-bottom-0",children:r("div",{"data-spacing-margin-bottom":!0,children:[r("div",{"data-spacing-margin-bottom-bg":!0,ref:g,children:[t("div",{"data-spacing-margin-bottom-value":!0}),t("div",{"data-active":S,"data-value-number":!0,ref:h,children:y})]}),t("div",{ref:p,"data-spacing-margin-bottom-drag":!0,onMouseDown:t=>{if(p.current){let e=getComputedStyle(p.current);f.current=t.clientY,w.current=parseFloat(e.top),k()}},onMouseUp:()=>{z()},role:"presentation"})]})})})}let usePrevious=t=>{let e=n();return a(()=>{e.current=t},[t]),e.current};export{Spacing as default};
@@ -1 +1 @@
1
- let convertTextAlignToJustify=t=>{let e=["desktop","tablet","mobile"],s={};return e.forEach(e=>{let r="desktop"===e?"":`${e}:`;s[`${r}gp-justify-start`]=t?.[e]==="left",s[`${r}gp-justify-center`]=t?.[e]==="center",s[`${r}gp-justify-end`]=t?.[e]==="right"}),s},getAlignmentClasses=t=>{let e=["desktop","tablet","mobile"];return e.reduce((e,s)=>{let r="desktop"===s?"":`${s}:`,l=t?.[s];return l&&(e[`${r}gp-justify-start`]="left"===l,e[`${r}gp-justify-center`]="center"===l,e[`${r}gp-justify-end`]="right"===l),e},{})};export{convertTextAlignToJustify,getAlignmentClasses};
1
+ import{DEVICES as t}from"../constants/device.js";let convertTextAlignToJustify=e=>{let s={};return t.forEach(t=>{let r="desktop"===t?"":`${t}:`;s[`${r}gp-justify-start`]=e?.[t]==="left",s[`${r}gp-justify-center`]=e?.[t]==="center",s[`${r}gp-justify-end`]=e?.[t]==="right"}),s},getAlignmentClasses=e=>t.reduce((t,s)=>{let r="desktop"===s?"":`${s}:`,n=e?.[s];return n&&(t[`${r}gp-justify-start`]="left"===n,t[`${r}gp-justify-center`]="center"===n,t[`${r}gp-justify-end`]="right"===n),t},{});export{convertTextAlignToJustify,getAlignmentClasses};
@@ -1 +1 @@
1
- import{devicesMapping as e}from"./constant.js";import{isColor as t,getSingleColorVariable as o}from"./colors.js";import{makeStyleResponsive as g}from"./make-style.js";import{getResponsiveValueByScreen as i}from"./get-resonsive-value.js";let isEmptyBg=e=>e?.videoHtml5===void 0&&e?.video===void 0&&!e?.videoType,getBgVideoByDevice=(e,t="desktop")=>{let o=e?.[t];if(isEmptyBg(o)&&"desktop"!==t){let t=e?.tablet;o=isEmptyBg(t)?e?.desktop:t}return o},getStyleBackgroundByDevice=(e,t)=>e?{...t?.ignoreBackgroundColor?{}:{...getStyleBgColor(e)},...t?.ignoreBackgroundImage?{}:{...getStyleBgImage(e,t)},...t?.ignoreBackgroundImageProperties?{}:{...getStyleBgPosition(e),...getStyleBgSize(e),...getStyleBgRepeat(e)},...t?.ignoreBgAttachment?{}:getStyleBgAttachment(e)}:{},getStyleBgColor=e=>{let t={desktop:getBgColorByDevice(e,"desktop"),tablet:getBgColorByDevice(e,"tablet"),mobile:getBgColorByDevice(e,"mobile")};return g("bgc",t)},getBgColorByDevice=(e,t)=>getColor(e?.[t]?.color),getColor=e=>e?t(e?.toString())?e:`var(--g-c-${e})`:void 0,getStyleBgImage=(e,t)=>{let o={desktop:getBgImageByDevice(e,"desktop",t),tablet:getBgImageByDevice(e,"tablet",t),mobile:getBgImageByDevice(e,"mobile",t)};return g("bgi",o)},getBgImageByDevice=(e,t,o)=>{let g=e?.[t]?.type==="video";if(g)return;if(e?.[t]?.type==="color")return"url()";let i=e?.[t]?.image?.backupFileKey,l=e?.[t]?.image?.storage,r=e?.[t]?.image?.src,B=i,a=r?.match(/\/files\/([^\/]+\.(jpg|jpeg|gif|png|webp|svg))/)?.[1];return(i&&a&&a!=i&&(B=a),"FILE_CONTENT"===l&&o?.liquid&&B&&(r=`{{ "${B.replace(".jpeg",".jpg")}" | file_url }}`),("THEME"===l||!l)&&o?.liquid&&B&&(r=`{{ "${B}" | asset_url }}`),"string"==typeof r&&r)?`url(${r})`:void 0!==r?"none":void 0},getStyleBgPosition=e=>{let t={desktop:getBgPositionByDevice(e,"desktop")||"50% 50%",tablet:getBgPositionByDevice(e,"tablet"),mobile:getBgPositionByDevice(e,"mobile")};return g("bgp",t)},getBgPositionByDevice=(e,t)=>{let o=e?.[t]?.position;return o&&`${o.x}% ${o.y}%`},getStyleBgSize=e=>{let t={desktop:getBgSizeByDevice(e,"desktop")||"cover",tablet:getBgSizeByDevice(e,"tablet"),mobile:getBgSizeByDevice(e,"mobile")};return g("bgs",t)},getBgSizeByDevice=(e,t)=>e?.[t]?.size,getStyleBgRepeat=e=>{let t={desktop:getBgRepeatByDevice(e,"desktop")||"no-repeat",tablet:getBgRepeatByDevice(e,"tablet"),mobile:getBgRepeatByDevice(e,"mobile")};return g("bgr",t)},getBgRepeatByDevice=(e,t)=>e?.[t]?.repeat,getStyleBgAttachment=e=>{let t={desktop:getBgAttachmentByDevice(e,"desktop"),tablet:getBgAttachmentByDevice(e,"tablet"),mobile:getBgAttachmentByDevice(e,"mobile")};return g("bga",t)},getBgAttachmentByDevice=(e,t)=>e?.[t]?.attachment,composeBackgroundCss=e=>`${e?`background-color: ${o(e)};`:void 0}`,makeFixedBgAttachment=e=>{if(!e)return;e.tablet=e.tablet?e.tablet:e.desktop,e.mobile=e.mobile?e.mobile:e.tablet;let t={desktop:getBgAttachmentByDevice(e,"desktop"),tablet:getBgAttachmentByDevice(e,"tablet"),mobile:getBgAttachmentByDevice(e,"mobile")},o={desktop:{...makeFixedBgAttachmentByDevice("desktop",t.desktop)},tablet:{...makeFixedBgAttachmentByDevice("tablet",t.tablet)},mobile:{...makeFixedBgAttachmentByDevice("mobile",t.mobile)}};return{wrapper:{...o.desktop?.wrapper,...o.tablet?.wrapper,...o.mobile?.wrapper},content:{...o.desktop?.content,...o.tablet?.content,...o.mobile?.content}}},makeFixedBgAttachmentByDevice=(t,o)=>{let g=e[t]??"";return"fixed"===o?{wrapper:{[`--pos${g}`]:"absolute",[`--top${g}`]:"0",[`--left${g}`]:"0",[`--w${g}`]:"100%",[`--h${g}`]:"100%"},content:{[`--pos${g}`]:"fixed",[`--w${g}`]:"100vw",[`--h${g}`]:"100vh",[`--bga${g}`]:"unset"}}:{wrapper:{[`--pos${g}`]:"absolute"},content:{[`--w${g}`]:"100%",[`--h${g}`]:"100%",[`--pos${g}`]:"absolute",[`--bga${g}`]:o}}},GRADIENT_BGR_KEY="linear-gradient",getGradientBgrStyleForButton=e=>{if(!e)return;let t={};for(let o of Object.keys(e)){let g=e[o];if(!g?.startsWith(GRADIENT_BGR_KEY))continue;let i="normal"===o?"--bgi":"--hvr-bgi";t[i]=g}return t},getGradientBgrStyleByDevice=(e,t)=>{if(!e)return;let o={};return["desktop","tablet","mobile"].forEach(g=>{if(e[g]?.color?.includes(GRADIENT_BGR_KEY)){let i=`${getBgImageByDevice(e,g)||"url()"}, ${e[g]?.color}`;Object.assign(o,{[`--bgc${"desktop"!==g?"-"+g:""}`]:e[g]?.color,[`--bgi${"desktop"!==g?"-"+g:""}`]:t?.[g]?i:`${e[g]?.color}`})}}),o},getBgByDevice=e=>{let{backgroundColor:t,backgroundImage:o}=e;if(!t&&!o)return;let g={desktop:i(o,"desktop"),tablet:i(o,"tablet"),mobile:i(o,"mobile")},l={};return["desktop","tablet","mobile"].forEach(e=>{let r=i(t,e),B=o?getBgImageByDevice(g,e):void 0;r?.includes(GRADIENT_BGR_KEY)?Object.assign(l,{[`--bgi${"desktop"!==e?"-"+e:""}`]:r}):Object.assign(l,{[`--bgc${"desktop"!==e?"-"+e:""}`]:r,[`--bgi${"desktop"!==e?"-"+e:""}`]:"none"}),B&&"none"!==B&&Object.assign(l,{[`--bgi${"desktop"!==e?"-"+e:""}`]:B})}),{...l,...getStyleBgPosition(o),...getStyleBgSize(o),...getStyleBgRepeat(o)}};export{GRADIENT_BGR_KEY,composeBackgroundCss,getBgByDevice,getBgImageByDevice,getBgVideoByDevice,getColor,getGradientBgrStyleByDevice,getGradientBgrStyleForButton,getStyleBackgroundByDevice,getStyleBgColor,makeFixedBgAttachment};
1
+ import{devicesMapping as e}from"./constant.js";import{isColor as t,getSingleColorVariable as o}from"./colors.js";import{makeStyleResponsive as g}from"./make-style.js";import{getResponsiveValueByScreen as i}from"./get-resonsive-value.js";import{DEVICES as l}from"../constants/device.js";let isEmptyBg=e=>e?.videoHtml5===void 0&&e?.video===void 0&&!e?.videoType,getBgVideoByDevice=(e,t="desktop")=>{let o=e?.[t];if(isEmptyBg(o)&&"desktop"!==t){let t=e?.tablet;o=isEmptyBg(t)?e?.desktop:t}return o},getStyleBackgroundByDevice=(e,t)=>e?{...t?.ignoreBackgroundColor?{}:{...getStyleBgColor(e)},...t?.ignoreBackgroundImage?{}:{...getStyleBgImage(e,t)},...t?.ignoreBackgroundImageProperties?{}:{...getStyleBgPosition(e),...getStyleBgSize(e),...getStyleBgRepeat(e)},...t?.ignoreBgAttachment?{}:getStyleBgAttachment(e)}:{},getStyleBgColor=e=>{let t={desktop:getBgColorByDevice(e,"desktop"),tablet:getBgColorByDevice(e,"tablet"),mobile:getBgColorByDevice(e,"mobile")};return g("bgc",t)},getBgColorByDevice=(e,t)=>getColor(e?.[t]?.color),getColor=e=>e?t(e?.toString())?e:`var(--g-c-${e})`:void 0,getStyleBgImage=(e,t)=>{let o={desktop:getBgImageByDevice(e,"desktop",t),tablet:getBgImageByDevice(e,"tablet",t),mobile:getBgImageByDevice(e,"mobile",t)};return g("bgi",o)},getBgImageByDevice=(e,t,o)=>{let g=e?.[t]?.type==="video";if(g)return;if(e?.[t]?.type==="color")return"url()";let i=e?.[t]?.image?.backupFileKey,l=e?.[t]?.image?.storage,r=e?.[t]?.image?.src,B=i,a=r?.match(/\/files\/([^\/]+\.(jpg|jpeg|gif|png|webp|svg))/)?.[1];return(i&&a&&a!=i&&(B=a),"FILE_CONTENT"===l&&o?.liquid&&B&&(r=`{{ "${B.replace(".jpeg",".jpg")}" | file_url }}`),("THEME"===l||!l)&&o?.liquid&&B&&(r=`{{ "${B}" | asset_url }}`),"string"==typeof r&&r)?`url(${r})`:void 0!==r?"none":void 0},getStyleBgPosition=e=>{let t={desktop:getBgPositionByDevice(e,"desktop")||"50% 50%",tablet:getBgPositionByDevice(e,"tablet"),mobile:getBgPositionByDevice(e,"mobile")};return g("bgp",t)},getBgPositionByDevice=(e,t)=>{let o=e?.[t]?.position;return o&&`${o.x}% ${o.y}%`},getStyleBgSize=e=>{let t={desktop:getBgSizeByDevice(e,"desktop")||"cover",tablet:getBgSizeByDevice(e,"tablet"),mobile:getBgSizeByDevice(e,"mobile")};return g("bgs",t)},getBgSizeByDevice=(e,t)=>e?.[t]?.size,getStyleBgRepeat=e=>{let t={desktop:getBgRepeatByDevice(e,"desktop")||"no-repeat",tablet:getBgRepeatByDevice(e,"tablet"),mobile:getBgRepeatByDevice(e,"mobile")};return g("bgr",t)},getBgRepeatByDevice=(e,t)=>e?.[t]?.repeat,getStyleBgAttachment=e=>{let t={desktop:getBgAttachmentByDevice(e,"desktop"),tablet:getBgAttachmentByDevice(e,"tablet"),mobile:getBgAttachmentByDevice(e,"mobile")};return g("bga",t)},getBgAttachmentByDevice=(e,t)=>e?.[t]?.attachment,composeBackgroundCss=e=>`${e?`background-color: ${o(e)};`:void 0}`,makeFixedBgAttachment=e=>{if(!e)return;e.tablet=e.tablet?e.tablet:e.desktop,e.mobile=e.mobile?e.mobile:e.tablet;let t={desktop:getBgAttachmentByDevice(e,"desktop"),tablet:getBgAttachmentByDevice(e,"tablet"),mobile:getBgAttachmentByDevice(e,"mobile")},o={desktop:{...makeFixedBgAttachmentByDevice("desktop",t.desktop)},tablet:{...makeFixedBgAttachmentByDevice("tablet",t.tablet)},mobile:{...makeFixedBgAttachmentByDevice("mobile",t.mobile)}};return{wrapper:{...o.desktop?.wrapper,...o.tablet?.wrapper,...o.mobile?.wrapper},content:{...o.desktop?.content,...o.tablet?.content,...o.mobile?.content}}},makeFixedBgAttachmentByDevice=(t,o)=>{let g=e[t]??"";return"fixed"===o?{wrapper:{[`--pos${g}`]:"absolute",[`--top${g}`]:"0",[`--left${g}`]:"0",[`--w${g}`]:"100%",[`--h${g}`]:"100%"},content:{[`--pos${g}`]:"fixed",[`--w${g}`]:"100vw",[`--h${g}`]:"100vh",[`--bga${g}`]:"unset"}}:{wrapper:{[`--pos${g}`]:"absolute"},content:{[`--w${g}`]:"100%",[`--h${g}`]:"100%",[`--pos${g}`]:"absolute",[`--bga${g}`]:o}}},GRADIENT_BGR_KEY="linear-gradient",getGradientBgrStyleForButton=e=>{if(!e)return;let t={};for(let o of Object.keys(e)){let g=e[o];if(!g?.startsWith(GRADIENT_BGR_KEY))continue;let i="normal"===o?"--bgi":"--hvr-bgi";t[i]=g}return t},getGradientBgrStyleByDevice=(e,t)=>{if(!e)return;let o={};return l.forEach(g=>{if(e[g]?.color?.includes(GRADIENT_BGR_KEY)){let i=`${getBgImageByDevice(e,g)||"url()"}, ${e[g]?.color}`;Object.assign(o,{[`--bgc${"desktop"!==g?"-"+g:""}`]:e[g]?.color,[`--bgi${"desktop"!==g?"-"+g:""}`]:t?.[g]?i:`${e[g]?.color}`})}}),o},getBgByDevice=e=>{let{backgroundColor:t,backgroundImage:o}=e;if(!t&&!o)return;let g={desktop:i(o,"desktop"),tablet:i(o,"tablet"),mobile:i(o,"mobile")},r={};return l.forEach(e=>{let l=i(t,e),B=o?getBgImageByDevice(g,e):void 0;l?.includes(GRADIENT_BGR_KEY)?Object.assign(r,{[`--bgi${"desktop"!==e?"-"+e:""}`]:l}):Object.assign(r,{[`--bgc${"desktop"!==e?"-"+e:""}`]:l,[`--bgi${"desktop"!==e?"-"+e:""}`]:"none"}),B&&"none"!==B&&Object.assign(r,{[`--bgi${"desktop"!==e?"-"+e:""}`]:B})}),{...r,...getStyleBgPosition(o),...getStyleBgSize(o),...getStyleBgRepeat(o)}};export{GRADIENT_BGR_KEY,composeBackgroundCss,getBgByDevice,getBgImageByDevice,getBgVideoByDevice,getColor,getGradientBgrStyleByDevice,getGradientBgrStyleForButton,getStyleBackgroundByDevice,getStyleBgColor,makeFixedBgAttachment};
@@ -1 +1 @@
1
- import{getResponsiveValueByScreen as e}from"./get-resonsive-value.js";let getCarouselContainerHeight=t=>{let o=e=>"outside"===e?"auto":"100%";return{desktop:o(e(t,"desktop")),tablet:o(e(t,"tablet")),mobile:o(e(t,"mobile"))}},makeContainerWidthOrHeight=t=>{let o=e=>e?"w":"h",l=getCarouselContainerHeight(t.dotStyle);return{[`--${o(e(t?.vertical,"desktop"))}`]:l.desktop,[`--${o(e(t?.vertical,"tablet"))}-tablet`]:l.tablet,[`--${o(e(t?.vertical,"mobile"))}-mobile`]:l.mobile}},makeDotGapToCarouselStyle=(t,o,l)=>{let a={},i=["desktop","tablet","mobile"],r=(e,t)=>"outside"===e?t?"ml":"mt":t?"right":"bottom";return i.map(t=>{let l=e(o,t,0);a={...a,[t]:`${l&&"Auto"!==l?l:"0"}px`}}),{[`--${r(e(t,"desktop"),e(l,"desktop"))}`]:a.desktop,[`--${r(e(t,"tablet"),e(l,"tablet"))}-tablet`]:a.tablet,[`--${r(e(t,"mobile"),e(l,"mobile"))}-mobile`]:a.mobile}};export{getCarouselContainerHeight,makeContainerWidthOrHeight,makeDotGapToCarouselStyle};
1
+ import{getResponsiveValueByScreen as t}from"./get-resonsive-value.js";import{DEVICES as e}from"../constants/device.js";let getCarouselContainerHeight=e=>{let o=t=>"outside"===t?"auto":"100%";return{desktop:o(t(e,"desktop")),tablet:o(t(e,"tablet")),mobile:o(t(e,"mobile"))}},makeContainerWidthOrHeight=e=>{let o=t=>t?"w":"h",l=getCarouselContainerHeight(e.dotStyle);return{[`--${o(t(e?.vertical,"desktop"))}`]:l.desktop,[`--${o(t(e?.vertical,"tablet"))}-tablet`]:l.tablet,[`--${o(t(e?.vertical,"mobile"))}-mobile`]:l.mobile}},makeDotGapToCarouselStyle=(o,l,a)=>{let i={},r=(t,e)=>"outside"===t?e?"ml":"mt":e?"right":"bottom";return e.map(e=>{let o=t(l,e,0);i={...i,[e]:`${o&&"Auto"!==o?o:"0"}px`}}),{[`--${r(t(o,"desktop"),t(a,"desktop"))}`]:i.desktop,[`--${r(t(o,"tablet"),t(a,"tablet"))}-tablet`]:i.tablet,[`--${r(t(o,"mobile"),t(a,"mobile"))}-mobile`]:i.mobile}};export{getCarouselContainerHeight,makeContainerWidthOrHeight,makeDotGapToCarouselStyle};
@@ -1 +1 @@
1
- import{handleConvertBorderStyle as e,handleConvertBorderWidth as t,handleConvertBorderColor as o,getBorderStyle as a}from"./borders.js";import{isColor as r}from"./colors.js";import{layoutComponent as s}from"./constant.js";import{makeStyleKey as i}from"./make-style.js";import{composeRadius as n,getCornerCSSFromGlobal as c}from"./radius.js";import{getResponsiveStyleShadow as l,getStyleShadowState as d,getStyleShadow as p}from"./shadow.js";let composeSpacing=({source:e,spacing:t,type:o,suffix:a=""})=>{let{top:r,left:s,bottom:i,right:n}=t;r&&(e[`--${o}t${a}`]=r),s&&(e[`--${o}l${a}`]=s),i&&(e[`--${o}b${a}`]=i),n&&(e[`--${o}r${a}`]=n)},composeSpacingV2=({source:e,spacing:t,suffix:o="",tag:a=""})=>{if(t&&t.margin){let{top:r,left:i,bottom:n,right:c}=t.margin;r&&(e[`--mt${o}`]=r),i&&(e[`--ml${o}`]=s.includes(a)&&"0px"===i?"auto":i),n&&(e[`--mb${o}`]=n),c&&(e[`--mr${o}`]=s.includes(a)&&"0px"===c?"auto":c)}if(t&&t.padding){let{top:a,left:r,bottom:s,right:i}=t.padding;a&&(e[`--pt${o}`]=a),r&&(e[`--pl${o}`]=r),s&&(e[`--pb${o}`]=s),i&&(e[`--pr${o}`]=i)}},getAttrValue=(e,t,o)=>{if(null!=t)switch(e){case"bgc":case"c":return r(t.toString())?t:`var(--g-c-${t})`;case"d":if(!t)return"none";if(t&&o&&s.includes(o))return"grid";return"block";case"animation":case"hasBoxShadow":case"rounded":case"boxShadow":case"border":return;default:return t}},postPurchasePaddingMapping={loose:"21px",extraLoose:"38px",tight:"9px",extraTight:"5px",base:"14px"},composeAdvanceStyleForPostPurchase=(e,t)=>{if(!e)return{};let o={};return Object.keys(e).forEach(a=>{let r=e[a];if("blockPadding"===a){let e=postPurchasePaddingMapping[r];o["--pb"]=getAttrValue(a,e,t),o["--pt"]=getAttrValue(a,e,t),o["--mb"]="0px",o["--mt"]="0px"}if("inlinePadding"===a){let e=postPurchasePaddingMapping[r];o["--pl"]=getAttrValue(a,e,t),o["--pr"]=getAttrValue(a,e,t)}}),o};function composeAdvanceStyle(r,s,i){if(!r)return{};let u={},b=["desktop","tablet","mobile"],g=["hover","normal"];Object.keys(r).forEach(m=>{let h=r[m];if("cssClass"===m||null==h)return;let S=r.hasBoxShadow?r.hasBoxShadow:{};if("object"==typeof h){if(Array.isArray(h))return;Object.keys(h).forEach(i=>{if(b.includes(i)){let a=h[i];if(void 0!==a){"border"===m&&Object.assign(u,e(h),t(h),o(h)),"rounded"===m&&Object.assign(u,n(h)),"boxShadow"===m&&Object.assign(u,l(h,"box-shadow",S));let r=getAttrValue(m,a,s);if("desktop"===i)switch(m){case"padding":composeSpacing({source:u,spacing:a,type:"p"});break;case"margin":composeSpacing({source:u,spacing:a,type:"m"});break;case"spacing-setting":composeSpacingV2({source:u,spacing:a,tag:s});break;case"m":case"p":break;default:r&&(u[`--${m}`]=r)}else switch(m){case"padding":composeSpacing({source:u,spacing:a,type:"p",suffix:`-${i}`});break;case"margin":composeSpacing({source:u,spacing:a,type:"m",suffix:`-${i}`});break;case"spacing-setting":composeSpacingV2({source:u,spacing:a,suffix:`-${i}`,tag:s});break;case"m":case"p":break;default:r&&(u[`--${m}-${i}`]=r)}}}else if(g.includes(i))switch(m){case"hasBoxShadow":break;case"boxShadow":Object.assign(u,d(h,"box-shadow",S))}else"border"===m&&("none"===h.border&&(h.border="solid",h.color="#121212",h.isCustom=!0,h.width="0px",h.position="all"),Object.assign(u,a(h))),"rounded"===m&&Object.assign(u,c(h)),"hasBoxShadow"===m&&Object.assign(u,p({value:r.boxShadow,styleAppliedFor:"box-shadow",isEnableShadow:r.hasBoxShadow})),"boxShadow"===m&&Object.assign(u,p({value:h,styleAppliedFor:"box-shadow",isEnableShadow:r.hasBoxShadow}))})}else{let e=getAttrValue(m,h,s);e&&(u[`--${m}`]=e),"hasBoxShadow"===m&&r.boxShadow&&Object.assign(u,p({value:r.boxShadow,styleAppliedFor:"box-shadow",isEnableShadow:r.hasBoxShadow}))}if("blockPadding"===m&&"POST_PURCHASE"===i){let e=postPurchasePaddingMapping[h];u["--pb"]=getAttrValue(m,e,s),u["--pt"]=getAttrValue(m,e,s),u["--mb"]="0px",u["--mt"]="0px"}if("inlinePadding"===m&&"POST_PURCHASE"===i){let e=postPurchasePaddingMapping[h];u["--pl"]=getAttrValue(m,e,s),u["--pr"]=getAttrValue(m,e,s)}});let m="POST_PURCHASE"===i?composeAdvanceStyleForPostPurchase(r,s):{};return{...u,...m}}let convertBoxShadowV1ToV2=(e,t,o)=>{let a=["Section","Row","Text","Heading","Image","Button","HeroBanner","ImageComparison","Countdown","Video"],r=["ProductTitle","ProductDescription","ProductPrice","ProductVendor","Product","ProductSku","StockCounter","Sticky","ProductBadge","ProductViewMore","ProductButton","DynamicCheckout","ProductList","ProductQuantity","ProductVariants"],s=["Icon","IconListHoz","Line","IconList","IconListV2","Tabs","Accordion","Marquee","Breadcrumb","EstimateDate"],i=["Newsletter","ContactForm","TextField","FormTextarea","FormEmail","FormDropdown","FormCheckbox","SubmitButton","TextInput"],n=["CollectionTitle","CollectionDescription","CollectionBanner","CollectionToolbar","CollectionPaginator"],c=[...a,...r,...s,...i,...n],l=e;return c.includes(o||"")&&(l={desktop:t.desktop??{},tablet:t.tablet??t.desktop??{},mobile:t.mobile??t.tablet??t.desktop??{}}),l},splitStyle=(e,t={})=>{let o=e.map(e=>i(e)).flat(),a=Object.keys(t).filter(e=>o.includes(e)),r=a.reduce((e,o)=>({...e,[o]:t[o]}),{}),s=Object.keys(t).filter(e=>!a.includes(e)).reduce((e,o)=>({...e,[o]:t[o]}),{});return[r,s]},filterAttrInStyle=(e,t)=>{if(!e||!t)return{};let o={...e};return Object.entries(o).forEach(([e])=>{t.includes(e)||delete o[e]}),o},removeAttrInStyle=(e,t)=>{if(!e||!t)return{};let o={...e};return Object.entries(o).forEach(([e])=>{t.includes(e)&&delete o[e]}),o},getCornerStyle=e=>composeAdvanceStyle({rounded:e?.rounded}),removePaddingYInStyle=e=>{let t=["--pt","--pt-tablet","--pt-mobile","--pb","--pb-tablet","--pb-mobile"];return removeAttrInStyle(e,t)};export{composeAdvanceStyle,composeAdvanceStyleForPostPurchase,convertBoxShadowV1ToV2,filterAttrInStyle,getCornerStyle,removeAttrInStyle,removePaddingYInStyle,splitStyle};
1
+ import{handleConvertBorderStyle as e,handleConvertBorderWidth as t,handleConvertBorderColor as o,getBorderStyle as a}from"./borders.js";import{isColor as r}from"./colors.js";import{layoutComponent as s}from"./constant.js";import{makeStyleKey as i}from"./make-style.js";import{composeRadius as n,getCornerCSSFromGlobal as c}from"./radius.js";import{getResponsiveStyleShadow as l,getStyleShadowState as d,getStyleShadow as p}from"./shadow.js";import{DEVICES as u}from"../constants/device.js";let composeSpacing=({source:e,spacing:t,type:o,suffix:a=""})=>{let{top:r,left:s,bottom:i,right:n}=t;r&&(e[`--${o}t${a}`]=r),s&&(e[`--${o}l${a}`]=s),i&&(e[`--${o}b${a}`]=i),n&&(e[`--${o}r${a}`]=n)},composeSpacingV2=({source:e,spacing:t,suffix:o="",tag:a=""})=>{if(t&&t.margin){let{top:r,left:i,bottom:n,right:c}=t.margin;r&&(e[`--mt${o}`]=r),i&&(e[`--ml${o}`]=s.includes(a)&&"0px"===i?"auto":i),n&&(e[`--mb${o}`]=n),c&&(e[`--mr${o}`]=s.includes(a)&&"0px"===c?"auto":c)}if(t&&t.padding){let{top:a,left:r,bottom:s,right:i}=t.padding;a&&(e[`--pt${o}`]=a),r&&(e[`--pl${o}`]=r),s&&(e[`--pb${o}`]=s),i&&(e[`--pr${o}`]=i)}},getAttrValue=(e,t,o)=>{if(null!=t)switch(e){case"bgc":case"c":return r(t.toString())?t:`var(--g-c-${t})`;case"d":if(!t)return"none";if(t&&o&&s.includes(o))return"grid";return"block";case"animation":case"hasBoxShadow":case"rounded":case"boxShadow":case"border":return;default:return t}},postPurchasePaddingMapping={loose:"21px",extraLoose:"38px",tight:"9px",extraTight:"5px",base:"14px"},composeAdvanceStyleForPostPurchase=(e,t)=>{if(!e)return{};let o={};return Object.keys(e).forEach(a=>{let r=e[a];if("blockPadding"===a){let e=postPurchasePaddingMapping[r];o["--pb"]=getAttrValue(a,e,t),o["--pt"]=getAttrValue(a,e,t),o["--mb"]="0px",o["--mt"]="0px"}if("inlinePadding"===a){let e=postPurchasePaddingMapping[r];o["--pl"]=getAttrValue(a,e,t),o["--pr"]=getAttrValue(a,e,t)}}),o};function composeAdvanceStyle(r,s,i){if(!r)return{};let b={},g=["hover","normal"];Object.keys(r).forEach(m=>{let h=r[m];if("cssClass"===m||null==h)return;let S=r.hasBoxShadow?r.hasBoxShadow:{};if("object"==typeof h){if(Array.isArray(h))return;Object.keys(h).forEach(i=>{if(u.includes(i)){let a=h[i];if(void 0!==a){"border"===m&&Object.assign(b,e(h),t(h),o(h)),"rounded"===m&&Object.assign(b,n(h)),"boxShadow"===m&&Object.assign(b,l(h,"box-shadow",S));let r=getAttrValue(m,a,s);if("desktop"===i)switch(m){case"padding":composeSpacing({source:b,spacing:a,type:"p"});break;case"margin":composeSpacing({source:b,spacing:a,type:"m"});break;case"spacing-setting":composeSpacingV2({source:b,spacing:a,tag:s});break;case"m":case"p":break;default:r&&(b[`--${m}`]=r)}else switch(m){case"padding":composeSpacing({source:b,spacing:a,type:"p",suffix:`-${i}`});break;case"margin":composeSpacing({source:b,spacing:a,type:"m",suffix:`-${i}`});break;case"spacing-setting":composeSpacingV2({source:b,spacing:a,suffix:`-${i}`,tag:s});break;case"m":case"p":break;default:r&&(b[`--${m}-${i}`]=r)}}}else if(g.includes(i))switch(m){case"hasBoxShadow":break;case"boxShadow":Object.assign(b,d(h,"box-shadow",S))}else"border"===m&&("none"===h.border&&(h.border="solid",h.color="#121212",h.isCustom=!0,h.width="0px",h.position="all"),Object.assign(b,a(h))),"rounded"===m&&Object.assign(b,c(h)),"hasBoxShadow"===m&&Object.assign(b,p({value:r.boxShadow,styleAppliedFor:"box-shadow",isEnableShadow:r.hasBoxShadow})),"boxShadow"===m&&Object.assign(b,p({value:h,styleAppliedFor:"box-shadow",isEnableShadow:r.hasBoxShadow}))})}else{let e=getAttrValue(m,h,s);e&&(b[`--${m}`]=e),"hasBoxShadow"===m&&r.boxShadow&&Object.assign(b,p({value:r.boxShadow,styleAppliedFor:"box-shadow",isEnableShadow:r.hasBoxShadow}))}if("blockPadding"===m&&"POST_PURCHASE"===i){let e=postPurchasePaddingMapping[h];b["--pb"]=getAttrValue(m,e,s),b["--pt"]=getAttrValue(m,e,s),b["--mb"]="0px",b["--mt"]="0px"}if("inlinePadding"===m&&"POST_PURCHASE"===i){let e=postPurchasePaddingMapping[h];b["--pl"]=getAttrValue(m,e,s),b["--pr"]=getAttrValue(m,e,s)}});let m="POST_PURCHASE"===i?composeAdvanceStyleForPostPurchase(r,s):{};return{...b,...m}}let convertBoxShadowV1ToV2=(e,t,o)=>{let a=["Section","Row","Text","Heading","Image","Button","HeroBanner","ImageComparison","Countdown","Video"],r=["ProductTitle","ProductDescription","ProductPrice","ProductVendor","Product","ProductSku","StockCounter","Sticky","ProductBadge","ProductViewMore","ProductButton","DynamicCheckout","ProductList","ProductQuantity","ProductVariants"],s=["Icon","IconListHoz","Line","IconList","IconListV2","Tabs","Accordion","Marquee","Breadcrumb","EstimateDate"],i=["Newsletter","ContactForm","TextField","FormTextarea","FormEmail","FormDropdown","FormCheckbox","SubmitButton","TextInput"],n=["CollectionTitle","CollectionDescription","CollectionBanner","CollectionToolbar","CollectionPaginator"],c=[...a,...r,...s,...i,...n],l=e;return c.includes(o||"")&&(l={desktop:t.desktop??{},tablet:t.tablet??t.desktop??{},mobile:t.mobile??t.tablet??t.desktop??{}}),l},splitStyle=(e,t={})=>{let o=e.map(e=>i(e)).flat(),a=Object.keys(t).filter(e=>o.includes(e)),r=a.reduce((e,o)=>({...e,[o]:t[o]}),{}),s=Object.keys(t).filter(e=>!a.includes(e)).reduce((e,o)=>({...e,[o]:t[o]}),{});return[r,s]},filterAttrInStyle=(e,t)=>{if(!e||!t)return{};let o={...e};return Object.entries(o).forEach(([e])=>{t.includes(e)||delete o[e]}),o},removeAttrInStyle=(e,t)=>{if(!e||!t)return{};let o={...e};return Object.entries(o).forEach(([e])=>{t.includes(e)&&delete o[e]}),o},getCornerStyle=e=>composeAdvanceStyle({rounded:e?.rounded}),removePaddingYInStyle=e=>{let t=["--pt","--pt-tablet","--pt-mobile","--pb","--pb-tablet","--pb-mobile"];return removeAttrInStyle(e,t)};export{composeAdvanceStyle,composeAdvanceStyleForPostPurchase,convertBoxShadowV1ToV2,filterAttrInStyle,getCornerStyle,removeAttrInStyle,removePaddingYInStyle,splitStyle};
@@ -1 +1 @@
1
- import{devicesMapping as t}from"./constant.js";import{getResponsiveValueByScreen as o,getResponsiveValue as e}from"./get-resonsive-value.js";let gridToArrayRegex=/[^\s()]+(?:\([^\s()]+(?:\([^()]+\))?(?:, *[^\s()]+(?:\([^()]+\))?)*\))?/g,optionLayoutStyle=o=>{if(!o)return{};let e={};for(let[r,a]of Object.entries(o))Object.assign(e,{[`--gtc${t?.[r]}`]:`repeat(${parseFloat(a+"")||1}, minmax(0, 1fr))`});return e},composeGridLayout=t=>{let r=e(t,"display"),a=("fit"===o(r,"desktop")?t?.desktop?.cols?.map(()=>"minmax(0, auto)"):t?.desktop?.cols?.map(t=>`minmax(0, ${t}fr)`))?.join(" "),l=("fit"===o(r,"tablet")?t?.tablet?.cols?.map(()=>"minmax(0, auto)"):t?.tablet?.cols?.map(t=>`minmax(0, ${t}fr)`))?.join(" "),i=("fit"===o(r,"mobile")?t?.mobile?.cols?.map(()=>"minmax(0, auto)"):t?.mobile?.cols?.map(t=>`minmax(0, ${t}fr)`))?.join(" ");return{"--gtc":a,"--gtc-tablet":l,"--gtc-mobile":i}},gridToArray=t=>t?t.match(gridToArrayRegex)??[]:[],convertOldLayout=t=>{let o=gridToArray(t?.desktop).length,e=gridToArray(t?.tablet).length,r=gridToArray(t?.mobile).length;return{desktop:{cols:o?Array.from({length:o},()=>12/o):void 0,display:"fill"},tablet:{cols:e?Array.from({length:e},()=>12/e):void 0},mobile:{cols:r?Array.from({length:r},()=>12/r):void 0}}},getLayoutClasses=t=>{let o=["desktop","tablet","mobile"];return o.reduce((o,e)=>{let r="desktop"===e?"":`${e}:`,a=t?.[e];return a&&(o[`${r}gp-flex-col`]="vertical"===a,o[`${r}gp-flex-row`]="horizontal"===a),o},{})};export{composeGridLayout,convertOldLayout,getLayoutClasses,gridToArrayRegex,optionLayoutStyle};
1
+ import{DEVICES as t}from"../constants/device.js";import{devicesMapping as o}from"./constant.js";import{getResponsiveValueByScreen as e,getResponsiveValue as r}from"./get-resonsive-value.js";let gridToArrayRegex=/[^\s()]+(?:\([^\s()]+(?:\([^()]+\))?(?:, *[^\s()]+(?:\([^()]+\))?)*\))?/g,optionLayoutStyle=t=>{if(!t)return{};let e={};for(let[r,a]of Object.entries(t))Object.assign(e,{[`--gtc${o?.[r]}`]:`repeat(${parseFloat(a+"")||1}, minmax(0, 1fr))`});return e},composeGridLayout=t=>{let o=r(t,"display"),a=("fit"===e(o,"desktop")?t?.desktop?.cols?.map(()=>"minmax(0, auto)"):t?.desktop?.cols?.map(t=>`minmax(0, ${t}fr)`))?.join(" "),l=("fit"===e(o,"tablet")?t?.tablet?.cols?.map(()=>"minmax(0, auto)"):t?.tablet?.cols?.map(t=>`minmax(0, ${t}fr)`))?.join(" "),i=("fit"===e(o,"mobile")?t?.mobile?.cols?.map(()=>"minmax(0, auto)"):t?.mobile?.cols?.map(t=>`minmax(0, ${t}fr)`))?.join(" ");return{"--gtc":a,"--gtc-tablet":l,"--gtc-mobile":i}},gridToArray=t=>t?t.match(gridToArrayRegex)??[]:[],convertOldLayout=t=>{let o=gridToArray(t?.desktop).length,e=gridToArray(t?.tablet).length,r=gridToArray(t?.mobile).length;return{desktop:{cols:o?Array.from({length:o},()=>12/o):void 0,display:"fill"},tablet:{cols:e?Array.from({length:e},()=>12/e):void 0},mobile:{cols:r?Array.from({length:r},()=>12/r):void 0}}},getLayoutClasses=o=>t.reduce((t,e)=>{let r="desktop"===e?"":`${e}:`,a=o?.[e];return a&&(t[`${r}gp-flex-col`]="vertical"===a,t[`${r}gp-flex-row`]="horizontal"===a),t},{});export{composeGridLayout,convertOldLayout,getLayoutClasses,gridToArrayRegex,optionLayoutStyle};
@@ -34199,8 +34199,8 @@ type BasePropsWrap<S = unknown, Style = unknown, A = Record<string, any>> = Base
34199
34199
  builderAttrs?: Record<string, any>;
34200
34200
  style?: React.CSSProperties;
34201
34201
  };
34202
- type NameDevices$1 = 'desktop' | 'tablet' | 'mobile';
34203
- type ObjectDevices<T> = Partial<Record<NameDevices$1, T>>;
34202
+ type NameDevices = 'desktop' | 'tablet' | 'mobile';
34203
+ type ObjectDevices<T> = Partial<Record<NameDevices, T>>;
34204
34204
  type StateType = 'normal' | 'hover' | 'focus' | 'active' | 'price' | 'compareAtPrice';
34205
34205
  type StateProp<T> = Partial<Record<StateType, T>>;
34206
34206
  type ResponsiveStateProp<T> = ObjectDevices<StateProp<T>>;
@@ -34249,7 +34249,6 @@ type AirProductReview = 'review_box' | 'star_rating' | 'review_carousel';
34249
34249
  type FastBundleWidgetType = 'fbt_position' | 'product_bundles' | 'product_bundle_with_ids' | 'volume_position';
34250
34250
  type DotStyle = 'none' | 'inside' | 'outside';
34251
34251
 
34252
- type NameDevices = 'desktop' | 'tablet' | 'mobile';
34253
34252
  type TypographyV2Family = string | {
34254
34253
  value: string;
34255
34254
  type: TypographyV2FontFamilyType;
@@ -35402,7 +35401,7 @@ declare const composeBorderCss: (borderV?: Border | undefined, options?: {
35402
35401
  }) => string;
35403
35402
  declare const composeBorderResponsive: (borderValue?: ObjectDevices<Border>) => React.CSSProperties;
35404
35403
 
35405
- declare const getCarouselContainerHeight: <T>(dotStyle?: Partial<Record<NameDevices$1, T>> | undefined) => {
35404
+ declare const getCarouselContainerHeight: <T>(dotStyle?: Partial<Record<NameDevices, T>> | undefined) => {
35406
35405
  desktop: string | undefined;
35407
35406
  tablet: string | undefined;
35408
35407
  mobile: string | undefined;
@@ -35413,7 +35412,7 @@ declare const makeContainerWidthOrHeight: <T extends ShortHandProperty>(setting:
35413
35412
  }) => {
35414
35413
  [x: string]: string | undefined;
35415
35414
  };
35416
- declare const makeDotGapToCarouselStyle: <T extends ShortHandProperty, K>(dotStyle?: ObjectDevices<DotStyle>, dotGapToCarousel?: Partial<Record<NameDevices$1, K>> | undefined, vertical?: ObjectDevices<boolean>) => {
35415
+ declare const makeDotGapToCarouselStyle: <T extends ShortHandProperty, K>(dotStyle?: ObjectDevices<DotStyle>, dotGapToCarousel?: Partial<Record<NameDevices, K>> | undefined, vertical?: ObjectDevices<boolean>) => {
35417
35416
  [x: string]: string | undefined;
35418
35417
  };
35419
35418
 
@@ -35435,9 +35434,9 @@ declare const filterToolbarPreview: (children: React.ReactNode, keep?: boolean)
35435
35434
  */
35436
35435
  declare const flattenConnection: <T>(connection?: Maybe$1<GraphQLConnection<T>>) => Maybe$1<T>[];
35437
35436
 
35438
- declare const getResponsiveValue: <I, K extends keyof I>(input?: Partial<Record<NameDevices$1, I>> | undefined, k?: K | undefined) => Partial<Record<NameDevices$1, I[K]>>;
35439
- declare const getResponsiveStateValue: <I>(k: StateType, input?: Partial<Record<NameDevices$1, Partial<Record<StateType, I>>>> | undefined) => Partial<Record<NameDevices$1, I>>;
35440
- declare const getResponsiveValueByScreen: <T>(value?: Partial<Record<NameDevices$1, T>> | undefined, breakpoint?: NameDevices$1 | undefined, defaultValue?: T | undefined) => T | undefined;
35437
+ declare const getResponsiveValue: <I, K extends keyof I>(input?: Partial<Record<NameDevices, I>> | undefined, k?: K | undefined) => Partial<Record<NameDevices, I[K]>>;
35438
+ declare const getResponsiveStateValue: <I>(k: StateType, input?: Partial<Record<NameDevices, Partial<Record<StateType, I>>>> | undefined) => Partial<Record<NameDevices, I>>;
35439
+ declare const getResponsiveValueByScreen: <T>(value?: Partial<Record<NameDevices, T>> | undefined, breakpoint?: NameDevices | undefined, defaultValue?: T | undefined) => T | undefined;
35441
35440
  declare const isColumnDirectionExist: (layout: ObjectDevices<ObjectLayoutValue>, breakpoint: keyof ObjectDevices<ObjectLayoutValue>) => boolean;
35442
35441
 
35443
35442
  declare function getShortName(name: string): string;
@@ -35543,9 +35542,9 @@ declare const makeStyle: <T extends ShortHandProperty, K>(style: Record<T, K>) =
35543
35542
  [k: string]: Record<`--${T}`, K>;
35544
35543
  };
35545
35544
  declare const makeStyleState: <T extends ShortHandProperty, K>(name: T, value?: Partial<Record<StateType, K>> | undefined) => {};
35546
- declare const makeStyleResponsiveState: <T extends ShortHandProperty, K>(name: T, value?: Partial<Record<NameDevices$1, Partial<Record<StateType, K>>>> | undefined) => {};
35547
- declare const makeStyleResponsive: <T extends ShortHandProperty, K>(name: T, value?: Partial<Record<NameDevices$1, K>> | undefined, unit?: string) => Record<ResponsiveKey<T>, K>;
35548
- declare const makeStyleResponsiveByScreen: <T extends ShortHandProperty, K>(name: T, value?: Partial<Record<NameDevices$1, K>> | undefined, unit?: string) => Record<ResponsiveKey<T>, K>;
35545
+ declare const makeStyleResponsiveState: <T extends ShortHandProperty, K>(name: T, value?: Partial<Record<NameDevices, Partial<Record<StateType, K>>>> | undefined) => {};
35546
+ declare const makeStyleResponsive: <T extends ShortHandProperty, K>(name: T, value?: Partial<Record<NameDevices, K>> | undefined, unit?: string) => Record<ResponsiveKey<T>, K>;
35547
+ declare const makeStyleResponsiveByScreen: <T extends ShortHandProperty, K>(name: T, value?: Partial<Record<NameDevices, K>> | undefined, unit?: string) => Record<ResponsiveKey<T>, K>;
35549
35548
  declare const makeWidth: (widthValue?: ObjectDevices<string | number>, fullWidthValue?: ObjectDevices<boolean>) => ObjectDevices<string | number>;
35550
35549
  declare const makeGlobalSizeWidthResponsive: (globalSize?: ObjectDevices<SizeSettingGlobal>) => {
35551
35550
  '--w': string | undefined;
@@ -35560,8 +35559,8 @@ declare const makeGlobalSizeHeightResponsive: (globalSize?: ObjectDevices<SizeSe
35560
35559
  declare const makeHeight: (heighValue?: ObjectDevices<string | number>, autoHeight?: ObjectDevices<boolean>) => ObjectDevices<string | number | undefined>;
35561
35560
  declare const makeAspectRatio: (aspectRatio?: ObjectDevices<string>, aspectWidth?: ObjectDevices<string | number>, aspectHeight?: ObjectDevices<string | number>) => ObjectDevices<string>;
35562
35561
  declare const makeLineClamp: (lineClampValue?: ObjectDevices<number>, hasLineClampValue?: ObjectDevices<boolean>) => ObjectDevices<string | number | undefined>;
35563
- declare const makeStyleResponsiveWidth: <T extends ShortHandProperty, K>(value?: Partial<Record<NameDevices$1, K>> | undefined, unit?: string) => Record<ResponsiveKey<T>, K>;
35564
- declare const makeStyleResponsiveWidthWithoutAuto: <T extends ShortHandProperty, K>(value?: Partial<Record<NameDevices$1, K>> | undefined, unit?: string) => Record<ResponsiveKey<T>, K>;
35562
+ declare const makeStyleResponsiveWidth: <T extends ShortHandProperty, K>(value?: Partial<Record<NameDevices, K>> | undefined, unit?: string) => Record<ResponsiveKey<T>, K>;
35563
+ declare const makeStyleResponsiveWidthWithoutAuto: <T extends ShortHandProperty, K>(value?: Partial<Record<NameDevices, K>> | undefined, unit?: string) => Record<ResponsiveKey<T>, K>;
35565
35564
 
35566
35565
  type ResponsiveConfig<T> = {
35567
35566
  desktop: {
@@ -36306,7 +36305,7 @@ type SettingUIControl = {
36306
36305
  controlChangeTrigger?: ControlTrigger;
36307
36306
  tabs?: SettingUITab[];
36308
36307
  info?: LabelWithLang;
36309
- compoDefaultValue?: any | Record<NameDevices$1, any>;
36308
+ compoDefaultValue?: any | Record<NameDevices, any>;
36310
36309
  } & SettingUICompo & SettingUIGroup;
36311
36310
  type ControlTriggerAction$1 = {
36312
36311
  controlId: string;
@@ -37298,6 +37297,17 @@ type BackgroundMedia = {
37298
37297
  loop?: boolean;
37299
37298
  lazyLoad?: boolean;
37300
37299
  preload?: boolean;
37300
+ fallbackVideo?: Record<string, any> | undefined;
37301
+ fallbackImage?: FallbackImageProps | undefined;
37302
+ };
37303
+ type FallbackImageProps = {
37304
+ src?: string;
37305
+ width?: number;
37306
+ height?: number;
37307
+ backupFileKey?: string;
37308
+ storage?: 'THEME' | 'FILE_CONTENT';
37309
+ backupFilePath?: string;
37310
+ hiddenLCP?: boolean;
37301
37311
  };
37302
37312
  type BgSize = 'cover' | 'contain';
37303
37313
  type BgRepeat = 'repeat' | 'repeat-x' | 'repeat-y' | 'no-repeat';
@@ -37646,7 +37656,6 @@ type ComponentPreset = {
37646
37656
  rootOverride?: Record<string, any>;
37647
37657
  };
37648
37658
 
37649
- type Devices = 'desktop' | 'tablet' | 'mobile';
37650
37659
  type Options$1 = {
37651
37660
  liquid?: boolean;
37652
37661
  ignoreBgAttachment?: boolean;
@@ -37654,7 +37663,7 @@ type Options$1 = {
37654
37663
  ignoreBackgroundImageProperties?: boolean;
37655
37664
  ignoreBackgroundColor?: boolean;
37656
37665
  };
37657
- declare const getBgVideoByDevice: (value?: Partial<Record<Devices, Background>>, device?: Devices) => Background | undefined;
37666
+ declare const getBgVideoByDevice: (value?: Partial<Record<NameDevices, Background>>, device?: NameDevices) => Background | undefined;
37658
37667
  declare const getStyleBackgroundByDevice: (background?: ObjectDevices<Background>, options?: Options$1) => {
37659
37668
  "--bga"?: string | undefined;
37660
37669
  "--bga-tablet"?: string | undefined;
@@ -37677,7 +37686,7 @@ declare const getStyleBackgroundByDevice: (background?: ObjectDevices<Background
37677
37686
  };
37678
37687
  declare const getStyleBgColor: (background: ObjectDevices<Background>) => Record<ResponsiveKey<"bgc">, string>;
37679
37688
  declare const getColor: (color?: string) => string | undefined;
37680
- declare const getBgImageByDevice: (background: ObjectDevices<Background>, device: Devices, options?: Options$1) => string | undefined;
37689
+ declare const getBgImageByDevice: (background: ObjectDevices<Background>, device: NameDevices, options?: Options$1) => string | undefined;
37681
37690
  declare const composeBackgroundCss: (backgroundColor?: ColorValueType) => string;
37682
37691
  declare const makeFixedBgAttachment: (background?: ObjectDevices<Background>) => {
37683
37692
  wrapper: {
@@ -37689,10 +37698,10 @@ declare const makeFixedBgAttachment: (background?: ObjectDevices<Background>) =>
37689
37698
  } | undefined;
37690
37699
  declare const GRADIENT_BGR_KEY = "linear-gradient";
37691
37700
  declare const getGradientBgrStyleForButton: (backgroundStyle: Partial<Record<StateType, ColorValueType>> | undefined) => Record<string, string> | undefined;
37692
- declare const getGradientBgrStyleByDevice: (backgroundStyle: Partial<Record<Devices, Background>> | undefined, ignoreBackgroundImage?: Record<Devices, boolean>) => {} | undefined;
37701
+ declare const getGradientBgrStyleByDevice: (backgroundStyle: Partial<Record<NameDevices, Background>> | undefined, ignoreBackgroundImage?: Record<NameDevices, boolean>) => {} | undefined;
37693
37702
  declare const getBgByDevice: (data: {
37694
- backgroundColor: Partial<Record<Devices, string>> | undefined;
37695
- backgroundImage: Partial<Record<Devices, BackgroundImageValue>> | undefined;
37703
+ backgroundColor: Partial<Record<NameDevices, string>> | undefined;
37704
+ backgroundImage: Partial<Record<NameDevices, BackgroundImageValue>> | undefined;
37696
37705
  }) => {
37697
37706
  "--bgr": string;
37698
37707
  "--bgr-tablet": string;
@@ -37716,7 +37725,7 @@ declare const getStyleBgImageSource: (backgroundImage: StateProp<BackgroundImage
37716
37725
  declare const getBgImageSourceByDevice: (backgroundImage: StateProp<BackgroundImageValue>, state: StateType, options?: Options) => string;
37717
37726
  declare const composeBackgroundImageCss: (config?: ObjectDevices<StateProp<BackgroundImageValue>> | StateProp<BackgroundImageValue>, options?: {
37718
37727
  useLiquid?: boolean;
37719
- device?: 'desktop' | 'tablet' | 'mobile';
37728
+ device?: NameDevices;
37720
37729
  state?: 'normal' | 'hover';
37721
37730
  responsive?: boolean;
37722
37731
  }) => string | undefined;
@@ -37741,7 +37750,7 @@ declare const composeTextColorCss: (color?: ColorValueType) => string;
37741
37750
  type AdvanceValue = Primitive | ObjectDevices<Primitive>;
37742
37751
  declare const composeAdvanceStyleForPostPurchase: (data?: Record<string, AdvanceValue>, tag?: string) => React.CSSProperties;
37743
37752
  declare function composeAdvanceStyle(data?: Record<string, AdvanceValue>, tag?: string, pageType?: PublishedThemePageType$1): React.CSSProperties;
37744
- declare const convertBoxShadowV1ToV2: (hasBoxShadow: Partial<Record<StateType, boolean>>, value: Partial<Record<NameDevices$1, Primitive>>, tag: string | undefined) => Partial<Record<StateType, boolean>>;
37753
+ declare const convertBoxShadowV1ToV2: (hasBoxShadow: Partial<Record<StateType, boolean>>, value: Partial<Record<NameDevices, Primitive>>, tag: string | undefined) => Partial<Record<StateType, boolean>>;
37745
37754
  declare const splitStyle: (keys: ShortHandProperty[], style?: React.CSSProperties) => React.CSSProperties[];
37746
37755
  declare const filterAttrInStyle: (style?: React.CSSProperties, filterKeys?: string[]) => {
37747
37756
  [x: string]: any;
@@ -42624,8 +42633,8 @@ declare const composePositionLineHeight: ({ compose, lineHeight, device, positio
42624
42633
  compose: PostionType;
42625
42634
  lineHeight: string;
42626
42635
  device: NameDevices;
42627
- position?: Partial<Record<NameDevices$1, "center" | "baseline">> | undefined;
42628
- iconWidth?: Partial<Record<NameDevices$1, number>> | undefined;
42636
+ position?: Partial<Record<NameDevices, "center" | "baseline">> | undefined;
42637
+ iconWidth?: Partial<Record<NameDevices, number>> | undefined;
42629
42638
  }) => void;
42630
42639
 
42631
42640
  declare function isDefined<T>(argument: T | undefined): argument is T;
@@ -42634,10 +42643,10 @@ declare const gridToArrayRegex: RegExp;
42634
42643
  declare const optionLayoutStyle: (column?: ObjectDevices<string | number>) => React.CSSProperties;
42635
42644
  declare const composeGridLayout: (layout?: ObjectDevices<ObjectLayoutValue>) => React.CSSProperties;
42636
42645
  declare const convertOldLayout: (layout?: ObjectDevices<string>) => ObjectDevices<ObjectLayoutValue>;
42637
- declare const getLayoutClasses: (layout: Partial<Record<NameDevices$1, string>> | undefined) => Record<string, boolean>;
42646
+ declare const getLayoutClasses: (layout: Partial<Record<NameDevices, string>> | undefined) => Record<string, boolean>;
42638
42647
 
42639
- declare const convertTextAlignToJustify: (align: Partial<Record<NameDevices$1, AlignProp>> | undefined) => Record<string, boolean>;
42640
- declare const getAlignmentClasses: (align: Partial<Record<NameDevices$1, AlignProp>> | undefined) => Record<string, boolean>;
42648
+ declare const convertTextAlignToJustify: (align: Partial<Record<NameDevices, AlignProp>> | undefined) => Record<string, boolean>;
42649
+ declare const getAlignmentClasses: (align: Partial<Record<NameDevices, AlignProp>> | undefined) => Record<string, boolean>;
42641
42650
 
42642
42651
  declare function filterTruthyStyles<T extends Record<string, any>>(styles: T): Partial<T>;
42643
42652
 
@@ -42686,8 +42695,8 @@ declare const generateCollectionQueryKey: (args: FetchCollectionArgs) => ['query
42686
42695
  declare const generateProductsQueryKey: (args: FetchProductsParams) => ['query/products', FetchProductsParams];
42687
42696
 
42688
42697
  declare const getCornerCSSFromGlobal: (corner?: CornerRadius) => React.CSSProperties;
42689
- declare const getRadiusCSSFromGlobal: (state: StateType, key?: RoundedSize, device?: NameDevices$1) => React.CSSProperties;
42690
- declare const getCustomRadius: (state: StateType, radius?: CornerRadius, device?: NameDevices$1) => React.CSSProperties;
42698
+ declare const getRadiusCSSFromGlobal: (state: StateType, key?: RoundedSize, device?: NameDevices) => React.CSSProperties;
42699
+ declare const getCustomRadius: (state: StateType, radius?: CornerRadius, device?: NameDevices) => React.CSSProperties;
42691
42700
  declare const composeRadius: (value?: StateProp<CornerRadius> | ResponsiveStateProp<CornerRadius>) => React.CSSProperties;
42692
42701
  declare const composeRadiusResponsive: (radiusValue?: ObjectDevices<CornerRadius>) => React.CSSProperties;
42693
42702
  declare const getRadiusStyleActiveState: (radiusValue?: StateProp<CornerRadius>) => React.CSSProperties;
@@ -45985,14 +45994,14 @@ declare const getGlobalSizeGap: (globalSize?: ObjectDevices<SizeSettingGlobal>)
45985
45994
  '--gg-tablet': string | undefined;
45986
45995
  '--gg-mobile': string | undefined;
45987
45996
  };
45988
- declare const makeStyleWithDefault: <T extends ShortHandProperty, K>(name: T, value?: Partial<Record<NameDevices$1, K>> | undefined, defaultVal?: Partial<Record<NameDevices$1, K>> | undefined) => Record<ResponsiveKey<T>, K>;
45989
- declare const getWidthHeightGlobalSize: (type: 'width' | 'height', globalSize?: ObjectDevices<SizeSettingGlobal>) => Partial<Record<NameDevices$1, string | number>>;
45990
- declare const getHeightByShapeGlobalSize: (shapeByLayout?: ObjectDevices<SizeSettingGlobal>) => Partial<Record<NameDevices$1, string>>;
45991
- declare const getWidthByShapeGlobalSize: (shapeByLayout?: ObjectDevices<SizeSettingGlobal>, defaultAuto?: boolean, defaultFull?: boolean) => Partial<Record<NameDevices$1, string>>;
45997
+ declare const makeStyleWithDefault: <T extends ShortHandProperty, K>(name: T, value?: Partial<Record<NameDevices, K>> | undefined, defaultVal?: Partial<Record<NameDevices, K>> | undefined) => Record<ResponsiveKey<T>, K>;
45998
+ declare const getWidthHeightGlobalSize: (type: 'width' | 'height', globalSize?: ObjectDevices<SizeSettingGlobal>) => Partial<Record<NameDevices, string | number>>;
45999
+ declare const getHeightByShapeGlobalSize: (shapeByLayout?: ObjectDevices<SizeSettingGlobal>) => Partial<Record<NameDevices, string>>;
46000
+ declare const getWidthByShapeGlobalSize: (shapeByLayout?: ObjectDevices<SizeSettingGlobal>, defaultAuto?: boolean, defaultFull?: boolean) => Partial<Record<NameDevices, string>>;
45992
46001
  declare const getAspectRatioGlobalSize: (shape?: ObjectDevices<SizeSettingGlobal>) => ObjectDevices<string>;
45993
46002
  declare const getPaddingGlobalSize: (globalSize?: ObjectDevices<SizeSettingGlobal>) => React.CSSProperties;
45994
- declare const getValueByDevice: <T>(value: any, device: NameDevices$1) => T;
45995
- declare const getPaddingStyleByDevice: (value?: PaddingType, device?: NameDevices$1) => {
46003
+ declare const getValueByDevice: <T>(value: any, device: NameDevices) => T;
46004
+ declare const getPaddingStyleByDevice: (value?: PaddingType, device?: NameDevices) => {
45996
46005
  [x: string]: string | undefined;
45997
46006
  };
45998
46007
  declare const getResponsiveStylePadding: (value?: ObjectDevices<PaddingType>) => {
@@ -47726,7 +47735,7 @@ declare const useProductsQuery: (ids?: string[], options?: SWRConfiguration<Prod
47726
47735
  }) => swr__internal.SWRResponse<ProductsQueryResponse, any, Partial<swr__internal.PublicConfiguration<ProductsQueryResponse, any, (arg: ["query/products", FetchProductsParams]) => swr__internal.FetcherResponse<ProductsQueryResponse>>> | undefined>;
47727
47736
  declare const useProductsQueryAll: (variable?: VariableRelatedStyles | undefined, options?: SWRConfiguration<ProductsQueryResponse>) => swr__internal.SWRResponse<ProductsQueryResponse, any, Partial<swr__internal.PublicConfiguration<ProductsQueryResponse, any, (arg: ["query/products", any]) => swr__internal.FetcherResponse<ProductsQueryResponse>>> | undefined>;
47728
47737
 
47729
- declare const useCurrentDevice: () => NameDevices$1;
47738
+ declare const useCurrentDevice: () => NameDevices;
47730
47739
 
47731
47740
  declare const useLazyVideo: () => void;
47732
47741
 
@@ -47884,24 +47893,24 @@ declare const useShopifyLink: ({ productId, articleId }: ShopifyLinkParam) => {
47884
47893
  declare const useProductList: () => CollectionProductSelectFragment | undefined;
47885
47894
  declare const useProductListProducts: () => (ProductQuickSelectFragment | undefined)[] | undefined;
47886
47895
  declare const useProductListSettings: () => {
47887
- loop?: Partial<Record<NameDevices$1, boolean>> | undefined;
47888
- scrollMode?: Partial<Record<NameDevices$1, "snap" | "free" | "free-snap">> | undefined;
47889
- slidesToShow?: Partial<Record<NameDevices$1, number | "auto">> | undefined;
47890
- spacing?: Partial<Record<NameDevices$1, number>> | undefined;
47896
+ loop?: Partial<Record<NameDevices, boolean>> | undefined;
47897
+ scrollMode?: Partial<Record<NameDevices, "snap" | "free" | "free-snap">> | undefined;
47898
+ slidesToShow?: Partial<Record<NameDevices, number | "auto">> | undefined;
47899
+ spacing?: Partial<Record<NameDevices, number>> | undefined;
47891
47900
  layout?: "slider" | "grid" | undefined;
47892
- dot?: Partial<Record<NameDevices$1, boolean>> | undefined;
47893
- dotStyle?: Partial<Record<NameDevices$1, "none" | "inside" | "outside">> | undefined;
47894
- arrow?: Partial<Record<NameDevices$1, boolean>> | undefined;
47895
- controlOverContent?: Partial<Record<NameDevices$1, boolean>> | undefined;
47901
+ dot?: Partial<Record<NameDevices, boolean>> | undefined;
47902
+ dotStyle?: Partial<Record<NameDevices, "none" | "inside" | "outside">> | undefined;
47903
+ arrow?: Partial<Record<NameDevices, boolean>> | undefined;
47904
+ controlOverContent?: Partial<Record<NameDevices, boolean>> | undefined;
47896
47905
  speed?: number | undefined;
47897
47906
  } | undefined;
47898
47907
  declare const useProductListStyles: () => {
47899
- horizontalGutter?: Partial<Record<NameDevices$1, string>> | undefined;
47900
- verticalGutter?: Partial<Record<NameDevices$1, string>> | undefined;
47901
- fullWidth?: Partial<Record<NameDevices$1, boolean>> | undefined;
47902
- spacing?: Partial<Record<NameDevices$1, number>> | undefined;
47903
- width?: Partial<Record<NameDevices$1, string>> | undefined;
47904
- height?: Partial<Record<NameDevices$1, string>> | undefined;
47908
+ horizontalGutter?: Partial<Record<NameDevices, string>> | undefined;
47909
+ verticalGutter?: Partial<Record<NameDevices, string>> | undefined;
47910
+ fullWidth?: Partial<Record<NameDevices, boolean>> | undefined;
47911
+ spacing?: Partial<Record<NameDevices, number>> | undefined;
47912
+ width?: Partial<Record<NameDevices, string>> | undefined;
47913
+ height?: Partial<Record<NameDevices, string>> | undefined;
47905
47914
  } | undefined;
47906
47915
 
47907
47916
  declare const useSuspenseFetch: <T>(key: string | any[], promise: () => Promise<T>) => {
@@ -47966,6 +47975,6 @@ declare const useInteraction: () => {
47966
47975
  interactionListenerLoaded: (callback: () => void) => void;
47967
47976
  };
47968
47977
 
47969
- declare const DEVICES: NameDevices$1[];
47978
+ declare const DEVICES: NameDevices[];
47970
47979
 
47971
- export { AddOn, AddonProvider, AddonProviderProps, AdvancedType, AirProductReview, AliReviewsWidgetType, AlignItemProp, AlignProp, AnimationBaseSetting, AnimationConfig, AnimationDirectionType, AnimationEasingType, AnimationFadeSettingType, AnimationSetting, AnimationSettingType, AnimationShakeSettingType, AnimationSlideSettingType, AnimationTrigger, AnimationTriggerType, AnimationType, AnimationZoomDirectionType, AnimationZoomSettingType, appAPI as AppAPIType, ArticleListProvider, ArticleListProviderProps, ArticleProvider, ArticleProviderProps, ArticlesDocument, ArticlesQueryResponse, ArticlesQueryVariables, Background, BackgroundImageValue, BackgroundMedia, BackgroundVideoValue, BaseProps, BasePropsWrap, BlockEntity, BlogsDocument, BlogsQueryResponse, BlogsQueryVariables, BogosWidgetType, BoldSubscriptionsWidgetType, Border, BorderStyle, BuilderComponentProvider, BuilderComponentProviderProps, BuilderEntity, BuilderEntityNested, BuilderPreviewProvider, BuilderPreviewProviderProps, BuilderProvider, BuilderProviderProps, BuilderState, Builtin, CSSStateKey, CartLineProvider, CartLineProviderProps, CollectionDetailFilterDocument, CollectionDetailFilterQueryResponse, CollectionDetailFilterQueryVariables, CollectionDocument, CollectionProvider, CollectionProviderProps, CollectionQueryResponse, CollectionQueryVariables, CollectionSelectFragment, CollectionsDocument, CollectionsQueryResponse, CollectionsQueryVariables, ColorKey, ColorType$1 as ColorType, ColorValueType, Component, ComponentPreset, ComponentSetting, ContainerProp, ControlProp, ControlTriggerAction, ControlUI, CornerRadius, CornerRadiusType, CustomComponentConfig, DEVICES, DeepPartial, DotStyle, Dropdown, DynamicCollection, DynamicProduct, ExtractState, FastBundleWidgetType, FeraReviewsV3WidgetType, FeraReviewsWidgetType, FetchCollectionArgs, FetchFunc, FetchProductParams, FlexDirectionProp, FontName, GRADIENT_BGR_KEY, GlobalStyleConfig, GlobalStyleResponsiveConfig, GlobalSwatchesData, GraphQLConnection, GroupPropType, GrowaveWidgetTypeV1, GrowaveWidgetTypeV2, HSLAColorType, HSLColorType, HexColorType, I18nProvider, I18nProviderProps, ImageShape$1 as ImageShape, InitComponentType, InstantJudgeMeReviewsWidgetType, InstantKlaviyoWidgetType, InstantLooxReviewsWidgetType, Interaction, InteractionCondition, InteractionElement, InteractionTarget, InteractionTargetEvent, InteractionTargetEventObject, InteractionTriggerEvent, JudgeMeReviewsWidgetType, KlaviyoWidgetType, LaiProductReviewsAdvancedWidgetType, LaiProductReviewsWidgetType, LibrarySaleFunnelDocument, LibrarySaleFunnelQueryResponse, LibrarySaleFunnelQueryVariables, LibraryTemplateDocument, LibraryTemplateQueryResponse, LibraryTemplateQueryVariables, LooxReviewsWidgetType, LooxReviewsWidgetTypeV2, MediaSelectFragment, ModalProvider, ModalProviderProps, NameDevices$1 as NameDevices, NestedKeys, ObjectDeviceGlobalType, ObjectDevices, ObjectLayoutValue, OmnisendWidgetType, OnlyOne, OpinewDesignWidgetType, OpinewWidgetType, Option$4 as Option, OptionNormalStyle, OptionSpecialStyle, Options$1 as Options, PaddingType, PageContext, PageProvider, PageProviderProps, PageType, PageViewUpDocument, PageViewUpMutationResponse, PageViewUpMutationVariables, PickyStoryWidgetType, PostPurchaseTypo, PreOrderNowWodWidgetType, PreviewThemePageDocument, PreviewThemePageQueryResponse, PreviewThemePageQueryVariables, Primitive, ProductInputAnalytic, ProductListProvider, ProductListProviderProps, ProductOffer, ProductProvider, ProductProviderProps, ProductReviewsWidgetType, ProductSelectFragment, ProductsDocument, ProductsQueryResponse, ProductsQueryVariables, PublicStoreFrontData, PublishedShopMetasDocument, PublishedShopMetasQueryResponse, PublishedShopMetasQueryVariables, PublishedThemePageSelectFragment, PublishedThemePagesDocument, PublishedThemePagesQueryResponse, PublishedThemePagesQueryVariables, RGBAColorType, RGBColorType, Ratio$1 as Ratio, RawChild, RenderMemo as Render, RenderChildren, RenderIf, Render as RenderLiquid, RenderMode, RenderPreviewMemo as RenderPreview, RequiredCursorEdge, ResponsiveKey, ResponsiveStateProp, RivyoWidgetType, RoundedSize, RyviuWidgetType, SaleFunnelDiscount$1 as SaleFunnelDiscount, SaleFunnelDiscountEdge$1 as SaleFunnelDiscountEdge, SaleFunnelDiscountObjectType$1 as SaleFunnelDiscountObjectType, SaleFunnelDiscountType$1 as SaleFunnelDiscountType, SaleFunnelDiscountValueType$1 as SaleFunnelDiscountValueType, SaleFunnelDiscountsDocument, SaleFunnelDiscountsQueryResponse, SaleFunnelDiscountsQueryVariables, SaleFunnelOfferDocument, SaleFunnelOfferQueryResponse, SaleFunnelOfferQueryVariables, Scalars$1 as Scalars, ScaleByDirection, SectionData, SectionEntity, SectionProvider, SectionProviderProps, Setting, SettingByAnimationType, SettingByAnimationValues, SettingUIControl, SettingUIGroup, ShadowProps, ShadowStyle, ShadowStyleApplied, ShadowType, ShopLibraryPageDocument, ShopLibraryPageQueryResponse, ShopLibraryPageQueryVariables, ShopProvider, ShopProviderProps, ShopShopifyDocument, ShopShopifyQueryResponse, ShopShopifyQueryVariables, shop as ShopType, SizeProps, SizeSetting$1 as SizeSetting, SizeSettingGlobal, SizeType, SpacingType, StampedWidgetType, StampedWidgetTypeV2, StateProp, StateSelector, StateType, StoreConfig, StorePropertyDocument, StorePropertyQueryResponse, StorePropertyQueryVariables, SwatchesOptionType, SwatchesOptionValue, TagShopWidgetType, ThemePageDocument, ThemePageQueryResponse, ThemePageQueryVariables, ThemeSectionStatus$1 as ThemeSectionStatus, TransformProp, TriggerConfig, TrustooWidgetType, TypographyProps, TypographySetting, TypographySettingV2, TypographyType, TypographyV2Attrs, TypographyV2Props, UltimateSalesBoostWidgetType, ValidateType, VariableRelatedStyles, VariantSelectFragment, VitalsWidgetType, WiserV2WidgetType, WiserWidgetType, WrapRenderChildren, YotpoReviewsWidgetType, addAppBlockId, animations, baseAssetURL, calculateFirstProduct, checkAvailableVariantInStock, checkInStock, cls, composeAdvanceStyle, composeAdvanceStyleForPostPurchase, composeBackgroundCss, composeBackgroundImageCss, composeBorderCss, composeBorderResponsive, composeClasses, composeCornerCss, composeFallbackTypographyStyle, composeFontFamilyTypographyV2, composeGridLayout, composeMemo, composePositionLineHeight, composePostionIconList, composeRadius, composeRadiusResponsive, composeShadow, composeShadowCss, composeSize, composeSizeCss, composeSpacing, composeTextColorCss, composeTextHoverColorCss, composeTypography, composeTypographyAttr, composeTypographyClassName, composeTypographyCss, composeTypographyStyle, composeTypographyV2, composeTypographyV2Css, convertBoxShadowV1ToV2, convertHTML, convertOldLayout, convertTextAlignToJustify, dataStringify, fetchMedias, fetchVariants, filterAttrInStyle, filterToolbarPreview, filterTruthyStyles, flattenConnection, formatMoney, fpixel, genSizeClass, genTypoClass, genVariable, generateCollectionQueryKey, generateProductQueryKey, generateProductsQueryKey, getAlignmentClasses, getAppBlocks, getAspectRatioGlobalSize, getBgByDevice, getBgImageByDevice, getBgImageSourceByDevice, getBgVideoByDevice, getBorderRadiusStyle, getBorderStyle, getCarouselContainerHeight, getCollection, getColor, getCornerCSSFromGlobal, getCornerStyle, getCustomRadius, getFlexGrowClassByShapeGlobalSize, getGlobalColorCSSProp, getGlobalColorClass, getGlobalColorResponsiveClass, getGlobalColorResponsiveStyle, getGlobalColorStateClass, getGlobalColorStateClassDynamicBtn, getGlobalColorStateResponsiveClass, getGlobalColorStateResponsiveClassDynamicBtn, getGlobalColorStateResponsiveStyle, getGlobalColorStateStyle, getGlobalColorStyle, getGlobalSizeGap, getGradientBgrStyleByDevice, getGradientBgrStyleForButton, getHeightByShapeGlobalSize, getLayoutClasses, getPaddingGlobalSize, getPaddingStyleByDevice, getProduct, getProductBySlug, getRadiusCSSFromGlobal, getRadiusStyleActiveState, getResponsiveStateValue, getResponsiveStylePadding, getResponsiveStyleShadow, getResponsiveStyleShadowWithoutState, getResponsiveValue, getResponsiveValueByScreen, getSelectedVariant, getShortName, getSingleColorVariable, getSpacingVariable, getStyleBackgroundByDevice, getStyleBackgroundImage, getStyleBgColor, getStyleBgImageSource, getStyleShadow, getStyleShadowState, getValueByDevice, getWidthByShapeGlobalSize, getWidthHeightGlobalSize, globalEvent, gridToArrayRegex, gtag, handleConvertBorderColor, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertClassColor, handleConvertClassColorDynamicBtn, handleConvertInputBorderColor, handleConvertInputBorderWidth, isBrowser, isColor, isColumnDirectionExist, isDefined, isEmptyChildren, isLocalEnv, isSafari, loadScript, makeAspectRatio, makeContainerWidthOrHeight, makeDotGapToCarouselStyle, makeFixedBgAttachment, makeGlobalSize, makeGlobalSizeHeightResponsive, makeGlobalSizeIcon, makeGlobalSizeWidthResponsive, makeHeight, makeLineClamp, makeStyle, makeStyleKey, makeStyleResponsive, makeStyleResponsiveByScreen, makeStyleResponsiveState, makeStyleResponsiveWidth, makeStyleResponsiveWidthWithoutAuto, makeStyleState, makeStyleWithDefault, makeWidth, normalizeBuilderData, optionLayoutStyle, parseSelectedOption, parseValueWithUnit, prefetchQueries, props, removeAttrInStyle, removeNullUndefined, removePaddingYInStyle, removeUndefinedValuesFromObject, sanitizeLiquid, shopifyPriceRounding, splitStyle, styles, template, tiktokpixel, useAddToCart, useAddon, useAddons, useArticleListStore, useArticleStore, useArticlesQuery, useBlogsQuery, useBuilderComponent, useBuilderPreviewStore, useBuilderStore, useCartData, useCartDiscountCodesUpdate, useCartId, useCartLine, useCartLineStore, useCartNoteUpdate, useCartUI, useCheckAvailableVariantInStock, useCheckoutUrl, useCollection, useCollectionQuery, useCollectionStore, useCollectionsQuery, useConnectedShopify, useCreateCart, useCurrency, useCurrentDevice, useCurrentVariant, useCurrentVariantInStock, useEditorMode, useFeaturedImageGlobal, useFormatMoney, useHasPreSelected, useI18n, useI18nStore, useInitialSwatchesOptions, useInteraction, useIsSampleProduct, useIsStorefrontProduct, useIsSyncProduct, useIsomorphicLayoutEffect, useLazyVideo, useLoadScript, useLocale, useMatchMutate, useMobileOnly, useModalStore, useMoney, useMoneyFormat, usePageStore, usePageType, usePluginEnable, usePrevious, useProduct, useProductBundleDiscount, useProductList, useProductListProducts, useProductListSettings, useProductListStore, useProductListStyles, useProductOfferDiscount, useProductProperties, useProductQuery, useProductShopifyEditLink, useProductStore, useProductsQuery, useProductsQueryAll, useQuantity, useRemoveCartItem, useSection, useSectionStore, useSelectedOption, useShopStore, useShopifyLink, useStickyStore, useStoreFront, useSuspenseFetch, useSwatches, useSwatchesOptions, useTimezone, useUniqProductID, useUpdateCartItem, useVariant, useVariantOutStock, useVariants, validateEmail };
47980
+ export { AddOn, AddonProvider, AddonProviderProps, AdvancedType, AirProductReview, AliReviewsWidgetType, AlignItemProp, AlignProp, AnimationBaseSetting, AnimationConfig, AnimationDirectionType, AnimationEasingType, AnimationFadeSettingType, AnimationSetting, AnimationSettingType, AnimationShakeSettingType, AnimationSlideSettingType, AnimationTrigger, AnimationTriggerType, AnimationType, AnimationZoomDirectionType, AnimationZoomSettingType, appAPI as AppAPIType, ArticleListProvider, ArticleListProviderProps, ArticleProvider, ArticleProviderProps, ArticlesDocument, ArticlesQueryResponse, ArticlesQueryVariables, Background, BackgroundImageValue, BackgroundMedia, BackgroundVideoValue, BaseProps, BasePropsWrap, BlockEntity, BlogsDocument, BlogsQueryResponse, BlogsQueryVariables, BogosWidgetType, BoldSubscriptionsWidgetType, Border, BorderStyle, BuilderComponentProvider, BuilderComponentProviderProps, BuilderEntity, BuilderEntityNested, BuilderPreviewProvider, BuilderPreviewProviderProps, BuilderProvider, BuilderProviderProps, BuilderState, Builtin, CSSStateKey, CartLineProvider, CartLineProviderProps, CollectionDetailFilterDocument, CollectionDetailFilterQueryResponse, CollectionDetailFilterQueryVariables, CollectionDocument, CollectionProvider, CollectionProviderProps, CollectionQueryResponse, CollectionQueryVariables, CollectionSelectFragment, CollectionsDocument, CollectionsQueryResponse, CollectionsQueryVariables, ColorKey, ColorType$1 as ColorType, ColorValueType, Component, ComponentPreset, ComponentSetting, ContainerProp, ControlProp, ControlTriggerAction, ControlUI, CornerRadius, CornerRadiusType, CustomComponentConfig, DEVICES, DeepPartial, DotStyle, Dropdown, DynamicCollection, DynamicProduct, ExtractState, FastBundleWidgetType, FeraReviewsV3WidgetType, FeraReviewsWidgetType, FetchCollectionArgs, FetchFunc, FetchProductParams, FlexDirectionProp, FontName, GRADIENT_BGR_KEY, GlobalStyleConfig, GlobalStyleResponsiveConfig, GlobalSwatchesData, GraphQLConnection, GroupPropType, GrowaveWidgetTypeV1, GrowaveWidgetTypeV2, HSLAColorType, HSLColorType, HexColorType, I18nProvider, I18nProviderProps, ImageShape$1 as ImageShape, InitComponentType, InstantJudgeMeReviewsWidgetType, InstantKlaviyoWidgetType, InstantLooxReviewsWidgetType, Interaction, InteractionCondition, InteractionElement, InteractionTarget, InteractionTargetEvent, InteractionTargetEventObject, InteractionTriggerEvent, JudgeMeReviewsWidgetType, KlaviyoWidgetType, LaiProductReviewsAdvancedWidgetType, LaiProductReviewsWidgetType, LibrarySaleFunnelDocument, LibrarySaleFunnelQueryResponse, LibrarySaleFunnelQueryVariables, LibraryTemplateDocument, LibraryTemplateQueryResponse, LibraryTemplateQueryVariables, LooxReviewsWidgetType, LooxReviewsWidgetTypeV2, MediaSelectFragment, ModalProvider, ModalProviderProps, NameDevices, NestedKeys, ObjectDeviceGlobalType, ObjectDevices, ObjectLayoutValue, OmnisendWidgetType, OnlyOne, OpinewDesignWidgetType, OpinewWidgetType, Option$4 as Option, OptionNormalStyle, OptionSpecialStyle, Options$1 as Options, PaddingType, PageContext, PageProvider, PageProviderProps, PageType, PageViewUpDocument, PageViewUpMutationResponse, PageViewUpMutationVariables, PickyStoryWidgetType, PostPurchaseTypo, PreOrderNowWodWidgetType, PreviewThemePageDocument, PreviewThemePageQueryResponse, PreviewThemePageQueryVariables, Primitive, ProductInputAnalytic, ProductListProvider, ProductListProviderProps, ProductOffer, ProductProvider, ProductProviderProps, ProductReviewsWidgetType, ProductSelectFragment, ProductsDocument, ProductsQueryResponse, ProductsQueryVariables, PublicStoreFrontData, PublishedShopMetasDocument, PublishedShopMetasQueryResponse, PublishedShopMetasQueryVariables, PublishedThemePageSelectFragment, PublishedThemePagesDocument, PublishedThemePagesQueryResponse, PublishedThemePagesQueryVariables, RGBAColorType, RGBColorType, Ratio$1 as Ratio, RawChild, RenderMemo as Render, RenderChildren, RenderIf, Render as RenderLiquid, RenderMode, RenderPreviewMemo as RenderPreview, RequiredCursorEdge, ResponsiveKey, ResponsiveStateProp, RivyoWidgetType, RoundedSize, RyviuWidgetType, SaleFunnelDiscount$1 as SaleFunnelDiscount, SaleFunnelDiscountEdge$1 as SaleFunnelDiscountEdge, SaleFunnelDiscountObjectType$1 as SaleFunnelDiscountObjectType, SaleFunnelDiscountType$1 as SaleFunnelDiscountType, SaleFunnelDiscountValueType$1 as SaleFunnelDiscountValueType, SaleFunnelDiscountsDocument, SaleFunnelDiscountsQueryResponse, SaleFunnelDiscountsQueryVariables, SaleFunnelOfferDocument, SaleFunnelOfferQueryResponse, SaleFunnelOfferQueryVariables, Scalars$1 as Scalars, ScaleByDirection, SectionData, SectionEntity, SectionProvider, SectionProviderProps, Setting, SettingByAnimationType, SettingByAnimationValues, SettingUIControl, SettingUIGroup, ShadowProps, ShadowStyle, ShadowStyleApplied, ShadowType, ShopLibraryPageDocument, ShopLibraryPageQueryResponse, ShopLibraryPageQueryVariables, ShopProvider, ShopProviderProps, ShopShopifyDocument, ShopShopifyQueryResponse, ShopShopifyQueryVariables, shop as ShopType, SizeProps, SizeSetting$1 as SizeSetting, SizeSettingGlobal, SizeType, SpacingType, StampedWidgetType, StampedWidgetTypeV2, StateProp, StateSelector, StateType, StoreConfig, StorePropertyDocument, StorePropertyQueryResponse, StorePropertyQueryVariables, SwatchesOptionType, SwatchesOptionValue, TagShopWidgetType, ThemePageDocument, ThemePageQueryResponse, ThemePageQueryVariables, ThemeSectionStatus$1 as ThemeSectionStatus, TransformProp, TriggerConfig, TrustooWidgetType, TypographyProps, TypographySetting, TypographySettingV2, TypographyType, TypographyV2Attrs, TypographyV2Props, UltimateSalesBoostWidgetType, ValidateType, VariableRelatedStyles, VariantSelectFragment, VitalsWidgetType, WiserV2WidgetType, WiserWidgetType, WrapRenderChildren, YotpoReviewsWidgetType, addAppBlockId, animations, baseAssetURL, calculateFirstProduct, checkAvailableVariantInStock, checkInStock, cls, composeAdvanceStyle, composeAdvanceStyleForPostPurchase, composeBackgroundCss, composeBackgroundImageCss, composeBorderCss, composeBorderResponsive, composeClasses, composeCornerCss, composeFallbackTypographyStyle, composeFontFamilyTypographyV2, composeGridLayout, composeMemo, composePositionLineHeight, composePostionIconList, composeRadius, composeRadiusResponsive, composeShadow, composeShadowCss, composeSize, composeSizeCss, composeSpacing, composeTextColorCss, composeTextHoverColorCss, composeTypography, composeTypographyAttr, composeTypographyClassName, composeTypographyCss, composeTypographyStyle, composeTypographyV2, composeTypographyV2Css, convertBoxShadowV1ToV2, convertHTML, convertOldLayout, convertTextAlignToJustify, dataStringify, fetchMedias, fetchVariants, filterAttrInStyle, filterToolbarPreview, filterTruthyStyles, flattenConnection, formatMoney, fpixel, genSizeClass, genTypoClass, genVariable, generateCollectionQueryKey, generateProductQueryKey, generateProductsQueryKey, getAlignmentClasses, getAppBlocks, getAspectRatioGlobalSize, getBgByDevice, getBgImageByDevice, getBgImageSourceByDevice, getBgVideoByDevice, getBorderRadiusStyle, getBorderStyle, getCarouselContainerHeight, getCollection, getColor, getCornerCSSFromGlobal, getCornerStyle, getCustomRadius, getFlexGrowClassByShapeGlobalSize, getGlobalColorCSSProp, getGlobalColorClass, getGlobalColorResponsiveClass, getGlobalColorResponsiveStyle, getGlobalColorStateClass, getGlobalColorStateClassDynamicBtn, getGlobalColorStateResponsiveClass, getGlobalColorStateResponsiveClassDynamicBtn, getGlobalColorStateResponsiveStyle, getGlobalColorStateStyle, getGlobalColorStyle, getGlobalSizeGap, getGradientBgrStyleByDevice, getGradientBgrStyleForButton, getHeightByShapeGlobalSize, getLayoutClasses, getPaddingGlobalSize, getPaddingStyleByDevice, getProduct, getProductBySlug, getRadiusCSSFromGlobal, getRadiusStyleActiveState, getResponsiveStateValue, getResponsiveStylePadding, getResponsiveStyleShadow, getResponsiveStyleShadowWithoutState, getResponsiveValue, getResponsiveValueByScreen, getSelectedVariant, getShortName, getSingleColorVariable, getSpacingVariable, getStyleBackgroundByDevice, getStyleBackgroundImage, getStyleBgColor, getStyleBgImageSource, getStyleShadow, getStyleShadowState, getValueByDevice, getWidthByShapeGlobalSize, getWidthHeightGlobalSize, globalEvent, gridToArrayRegex, gtag, handleConvertBorderColor, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertClassColor, handleConvertClassColorDynamicBtn, handleConvertInputBorderColor, handleConvertInputBorderWidth, isBrowser, isColor, isColumnDirectionExist, isDefined, isEmptyChildren, isLocalEnv, isSafari, loadScript, makeAspectRatio, makeContainerWidthOrHeight, makeDotGapToCarouselStyle, makeFixedBgAttachment, makeGlobalSize, makeGlobalSizeHeightResponsive, makeGlobalSizeIcon, makeGlobalSizeWidthResponsive, makeHeight, makeLineClamp, makeStyle, makeStyleKey, makeStyleResponsive, makeStyleResponsiveByScreen, makeStyleResponsiveState, makeStyleResponsiveWidth, makeStyleResponsiveWidthWithoutAuto, makeStyleState, makeStyleWithDefault, makeWidth, normalizeBuilderData, optionLayoutStyle, parseSelectedOption, parseValueWithUnit, prefetchQueries, props, removeAttrInStyle, removeNullUndefined, removePaddingYInStyle, removeUndefinedValuesFromObject, sanitizeLiquid, shopifyPriceRounding, splitStyle, styles, template, tiktokpixel, useAddToCart, useAddon, useAddons, useArticleListStore, useArticleStore, useArticlesQuery, useBlogsQuery, useBuilderComponent, useBuilderPreviewStore, useBuilderStore, useCartData, useCartDiscountCodesUpdate, useCartId, useCartLine, useCartLineStore, useCartNoteUpdate, useCartUI, useCheckAvailableVariantInStock, useCheckoutUrl, useCollection, useCollectionQuery, useCollectionStore, useCollectionsQuery, useConnectedShopify, useCreateCart, useCurrency, useCurrentDevice, useCurrentVariant, useCurrentVariantInStock, useEditorMode, useFeaturedImageGlobal, useFormatMoney, useHasPreSelected, useI18n, useI18nStore, useInitialSwatchesOptions, useInteraction, useIsSampleProduct, useIsStorefrontProduct, useIsSyncProduct, useIsomorphicLayoutEffect, useLazyVideo, useLoadScript, useLocale, useMatchMutate, useMobileOnly, useModalStore, useMoney, useMoneyFormat, usePageStore, usePageType, usePluginEnable, usePrevious, useProduct, useProductBundleDiscount, useProductList, useProductListProducts, useProductListSettings, useProductListStore, useProductListStyles, useProductOfferDiscount, useProductProperties, useProductQuery, useProductShopifyEditLink, useProductStore, useProductsQuery, useProductsQueryAll, useQuantity, useRemoveCartItem, useSection, useSectionStore, useSelectedOption, useShopStore, useShopifyLink, useStickyStore, useStoreFront, useSuspenseFetch, useSwatches, useSwatchesOptions, useTimezone, useUniqProductID, useUpdateCartItem, useVariant, useVariantOutStock, useVariants, validateEmail };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/core",
3
- "version": "2.0.0-staging.757",
3
+ "version": "2.0.0-staging.766",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",