@gem-sdk/core 2.0.0-staging.754 → 2.0.0-staging.764
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/resize/Spacing.js +1 -1
- package/dist/cjs/helpers/align.js +1 -1
- package/dist/cjs/helpers/background.js +1 -1
- package/dist/cjs/helpers/borders.js +1 -1
- package/dist/cjs/helpers/carousel.js +1 -1
- package/dist/cjs/helpers/compose-advance-style.js +1 -1
- package/dist/cjs/helpers/layout.js +1 -1
- package/dist/esm/components/resize/Spacing.js +1 -1
- package/dist/esm/helpers/align.js +1 -1
- package/dist/esm/helpers/background.js +1 -1
- package/dist/esm/helpers/borders.js +1 -1
- package/dist/esm/helpers/carousel.js +1 -1
- package/dist/esm/helpers/compose-advance-style.js +1 -1
- package/dist/esm/helpers/layout.js +1 -1
- package/dist/types/index.d.ts +50 -52
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),react=require("react");require("zustand");var BuilderPreviewContext=require("../../contexts/BuilderPreviewContext.js");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),
|
|
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=
|
|
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
|
|
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,4 +1,4 @@
|
|
|
1
|
-
"use strict";var colors=require("./colors.js"),makeStyle=require("./make-style.js"),constant=require("./constant.js");const getBorderStyle=o=>makeStyle.makeStyle({b:o?.border,bc:colors.getSingleColorVariable(o?.color),bw:o?.width}),getBorderRadiusStyle=(o,e)=>{let r=Object.entries(e||{}).reduce((o,[e,r])=>({...o,[`--${e}`]:r}),{});return Object.entries(o||{}).reduce((o,[e,r])=>({...o,[`--${e}`]:r}),r)},handleConvertBorderStyle=(o,e)=>{if(!o)return;if("desktop"in o||"tablet"in o||"mobile"in o){let r={desktop:{normal:"button"!==e||o.desktop?.normal?.borderType!=="none"||o.desktop?.normal?.isCustom?o.desktop?.normal?.border:"solid",hover:"button"!==e||o.desktop?.hover?.borderType!=="none"||o.desktop?.hover?.isCustom?o.desktop?.hover?.border:"solid",focus:"button"!==e||o.desktop?.focus?.borderType!=="none"||o.desktop?.focus?.isCustom?o.desktop?.focus?.border:"solid"},tablet:{normal:"button"!==e||o.tablet?.normal?.borderType!=="none"||o.tablet?.normal?.isCustom?o.tablet?.normal?.border:"solid",hover:"button"!==e||o.tablet?.hover?.borderType!=="none"||o.tablet?.hover?.isCustom?o.tablet?.hover?.border:"solid",focus:"button"!==e||o.tablet?.focus?.borderType!=="none"||o.tablet?.focus?.isCustom?o.tablet?.focus?.border:"solid"},mobile:{normal:"button"!==e||o.mobile?.normal?.borderType!=="none"||o.mobile?.normal?.isCustom?o.mobile?.normal?.border:"solid",hover:"button"!==e||o.mobile?.hover?.borderType!=="none"||o.mobile?.hover?.isCustom?o.mobile?.hover?.border:"solid",focus:"button"!==e||o.mobile?.focus?.borderType!=="none"||o.mobile?.focus?.isCustom?o.mobile?.focus?.border:"solid"}};return makeStyle.makeStyleResponsiveState("bs",r)}let r={normal:"button"!==e||o.normal?.borderType!=="none"||o.normal?.isCustom?o?.normal?.border:"solid",hover:"button"!==e||o.hover?.borderType!=="none"||o.hover?.isCustom?o?.hover?.border:"solid",focus:"button"!==e||o.focus?.borderType!=="none"||o.focus?.isCustom?o?.focus?.border:"solid"};return makeStyle.makeStyleState("bs",r)},handleConvertBorderWidth=(o,e)=>{if(!o)return;if("desktop"in o||"tablet"in o||"mobile"in o){let r={desktop:{normal:"button"!==e||o.desktop?.normal?.borderType!=="none"||o?.desktop?.normal?.isCustom?o.desktop?.normal?.width:"1px 1px 1px 1px",hover:"button"!==e||o.desktop?.hover?.borderType!=="none"||o?.desktop?.normal?.isCustom?o.desktop?.hover?.width:"1px 1px 1px 1px",focus:"button"!==e||o.desktop?.focus?.borderType!=="none"||o?.desktop?.normal?.isCustom?o.desktop?.focus?.width:"1px 1px 1px 1px"},tablet:{normal:"button"!==e||o.tablet?.normal?.borderType!=="none"||o?.tablet?.normal?.isCustom?o.tablet?.normal?.width:"1px 1px 1px 1px",hover:"button"!==e||o.tablet?.hover?.borderType!=="none"||o?.tablet?.hover?.isCustom?o.tablet?.hover?.width:"1px 1px 1px 1px",focus:"button"!==e||o.tablet?.focus?.borderType!=="none"||o?.tablet?.focus?.isCustom?o.tablet?.focus?.width:"1px 1px 1px 1px"},mobile:{normal:"button"!==e||o.mobile?.normal?.borderType!=="none"||o?.mobile?.normal?.isCustom?o.mobile?.normal?.width:"1px 1px 1px 1px",hover:"button"!==e||o.mobile?.hover?.borderType!=="none"||o?.mobile?.hover?.isCustom?o.mobile?.hover?.width:"1px 1px 1px 1px",focus:"button"!==e||o.mobile?.focus?.borderType!=="none"||o?.mobile?.focus?.isCustom?o.mobile?.focus?.width:"1px 1px 1px 1px"}};return makeStyle.makeStyleResponsiveState("bw",r)}let r={normal:"button"!==e||o.normal?.borderType!=="none"||o.normal?.isCustom?o?.normal?.width:"1px 1px 1px 1px",hover:"button"!==e||o.hover?.borderType!=="none"||o.hover?.isCustom?o?.hover?.width:"1px 1px 1px 1px",focus:"button"!==e||o.focus?.borderType!=="none"||o.focus?.isCustom?o?.focus?.width:"1px 1px 1px 1px"};return makeStyle.makeStyleState("bw",r)},getInputBorderWidth=(o,e)=>({desktop:{normal:o.desktop?.normal?.width?.split(" ")?.[e],hover:o.desktop?.hover?.width?.split(" ")?.[e]},tablet:{normal:o.tablet?.normal?.width?.split(" ")?.[e],hover:o.tablet?.hover?.width?.split(" ")?.[e]},mobile:{normal:o.mobile?.normal?.width?.split(" ")?.[e],hover:o.mobile?.hover?.width?.split(" ")?.[e]}}),handleConvertInputBorderWidth=(o,e)=>{if(o&&("desktop"in o||"tablet"in o||"mobile"in o))return{...makeStyle.makeStyleResponsiveState("btw",getInputBorderWidth(o,0)),...makeStyle.makeStyleResponsiveState("bbw",getInputBorderWidth(o,2)),..."minimalist"===e?makeStyle.makeStyleResponsiveState("brw",getInputBorderWidth(o,1)):{},..."minimalist"===e?makeStyle.makeStyleResponsiveState("blw",getInputBorderWidth(o,3)):{}}},handleConvertBorderColor=o=>{if(!o)return;if("desktop"in o||"tablet"in o||"mobile"in o){let e={desktop:{normal:o.desktop?.normal?.color,hover:o.desktop?.hover?.color,focus:o.desktop?.focus?.color},tablet:{normal:o.tablet?.normal?.color,hover:o.tablet?.hover?.color,focus:o.tablet?.focus?.color},mobile:{normal:o.mobile?.normal?.color,hover:o.mobile?.hover?.color,focus:o.mobile?.focus?.color}};return colors.getGlobalColorStateResponsiveStyle("bc",e)}let e={normal:o?.normal?.color,hover:o?.hover?.color,focus:o?.focus?.color};return colors.getGlobalColorStateStyle("bc",e)},handleConvertInputBorderColor=o=>{if(!o)return;if("desktop"in o||"tablet"in o||"mobile"in o){let e={desktop:{normal:o.desktop?.normal?.color,hover:o.desktop?.hover?.color,focus:o.desktop?.focus?.color},tablet:{normal:o.tablet?.normal?.color,hover:o.tablet?.hover?.color,focus:o.tablet?.focus?.color},mobile:{normal:o.mobile?.normal?.color,hover:o.mobile?.hover?.color,focus:o.mobile?.focus?.color}};return{...colors.getGlobalColorStateResponsiveStyle("btc",e),...colors.getGlobalColorStateResponsiveStyle("bbc",e)}}let e={normal:o?.normal?.color,hover:o?.hover?.color,focus:o?.focus?.color};return colors.getGlobalColorStateStyle("bc",e)},handleConvertClassColor=o=>{if(!o)return;if("desktop"in o||"tablet"in o||"mobile"in o){let e={desktop:{normal:o.desktop?.normal?.color,hover:o.desktop?.hover?.color,focus:o.desktop?.focus?.color},tablet:{normal:o.tablet?.normal?.color,hover:o.tablet?.hover?.color,focus:o.tablet?.focus?.color},mobile:{normal:o.mobile?.normal?.color,hover:o.mobile?.hover?.color,focus:o.mobile?.focus?.color}};return colors.getGlobalColorStateResponsiveClass("border",e)}let e={normal:o?.normal?.color,hover:o?.hover?.color,focus:o?.focus?.color};return colors.getGlobalColorStateClass("border",e)},handleConvertClassColorDynamicBtn=o=>{if(!o)return;if("desktop"in o||"tablet"in o||"mobile"in o){let e={desktop:{normal:o.desktop?.normal?.color,hover:o.desktop?.hover?.color,focus:o.desktop?.focus?.color},tablet:{normal:o.tablet?.normal?.color,hover:o.tablet?.hover?.color,focus:o.tablet?.focus?.color},mobile:{normal:o.mobile?.normal?.color,hover:o.mobile?.hover?.color,focus:o.mobile?.focus?.color}};return colors.getGlobalColorStateResponsiveClassDynamicBtn("border",e)}let e={normal:o?.normal?.color,hover:o?.hover?.color,focus:o?.focus?.color};return colors.getGlobalColorStateClassDynamicBtn("border",e)},composeBorderCss=(o,e)=>{if(!o)return"";let r=e?.important?" !important":"",{border:t,width:l,color:s}=o;return`${t?`border-style: ${t}${r};`:""}
|
|
1
|
+
"use strict";var colors=require("./colors.js"),makeStyle=require("./make-style.js"),constant=require("./constant.js");const getBorderStyle=o=>makeStyle.makeStyle({b:o?.border,bc:colors.getSingleColorVariable(o?.color),bw:o?.width}),getBorderRadiusStyle=(o,e)=>{let r=Object.entries(e||{}).reduce((o,[e,r])=>({...o,[`--${e}`]:r}),{});return Object.entries(o||{}).reduce((o,[e,r])=>({...o,[`--${e}`]:r}),r)},handleConvertBorderStyle=(o,e)=>{if(!o)return;if("desktop"in o||"tablet"in o||"mobile"in o){let r={desktop:{normal:"button"!==e||o.desktop?.normal?.borderType!=="none"||o.desktop?.normal?.isCustom?o.desktop?.normal?.border:"solid",hover:"button"!==e||o.desktop?.hover?.borderType!=="none"||o.desktop?.hover?.isCustom?o.desktop?.hover?.border:"solid",focus:"button"!==e||o.desktop?.focus?.borderType!=="none"||o.desktop?.focus?.isCustom?o.desktop?.focus?.border:"solid"},tablet:{normal:"button"!==e||o.tablet?.normal?.borderType!=="none"||o.tablet?.normal?.isCustom?o.tablet?.normal?.border:"solid",hover:"button"!==e||o.tablet?.hover?.borderType!=="none"||o.tablet?.hover?.isCustom?o.tablet?.hover?.border:"solid",focus:"button"!==e||o.tablet?.focus?.borderType!=="none"||o.tablet?.focus?.isCustom?o.tablet?.focus?.border:"solid"},mobile:{normal:"button"!==e||o.mobile?.normal?.borderType!=="none"||o.mobile?.normal?.isCustom?o.mobile?.normal?.border:"solid",hover:"button"!==e||o.mobile?.hover?.borderType!=="none"||o.mobile?.hover?.isCustom?o.mobile?.hover?.border:"solid",focus:"button"!==e||o.mobile?.focus?.borderType!=="none"||o.mobile?.focus?.isCustom?o.mobile?.focus?.border:"solid"}};return makeStyle.makeStyleResponsiveState("bs",r)}let r={normal:"button"!==e||o.normal?.borderType!=="none"||o.normal?.isCustom?o?.normal?.border:"solid",hover:"button"!==e||o.hover?.borderType!=="none"||o.hover?.isCustom?o?.hover?.border:"solid",focus:"button"!==e||o.focus?.borderType!=="none"||o.focus?.isCustom?o?.focus?.border:"solid"};return makeStyle.makeStyleState("bs",r)},handleConvertBorderWidth=(o,e)=>{if(!o)return;if("desktop"in o||"tablet"in o||"mobile"in o){let r={desktop:{normal:"button"!==e||o.desktop?.normal?.borderType!=="none"||o?.desktop?.normal?.isCustom?o.desktop?.normal?.width:"1px 1px 1px 1px",hover:"button"!==e||o.desktop?.hover?.borderType!=="none"||o?.desktop?.normal?.isCustom?o.desktop?.hover?.width:"1px 1px 1px 1px",focus:"button"!==e||o.desktop?.focus?.borderType!=="none"||o?.desktop?.normal?.isCustom?o.desktop?.focus?.width:"1px 1px 1px 1px"},tablet:{normal:"button"!==e||o.tablet?.normal?.borderType!=="none"||o?.tablet?.normal?.isCustom?o.tablet?.normal?.width:"1px 1px 1px 1px",hover:"button"!==e||o.tablet?.hover?.borderType!=="none"||o?.tablet?.hover?.isCustom?o.tablet?.hover?.width:"1px 1px 1px 1px",focus:"button"!==e||o.tablet?.focus?.borderType!=="none"||o?.tablet?.focus?.isCustom?o.tablet?.focus?.width:"1px 1px 1px 1px"},mobile:{normal:"button"!==e||o.mobile?.normal?.borderType!=="none"||o?.mobile?.normal?.isCustom?o.mobile?.normal?.width:"1px 1px 1px 1px",hover:"button"!==e||o.mobile?.hover?.borderType!=="none"||o?.mobile?.hover?.isCustom?o.mobile?.hover?.width:"1px 1px 1px 1px",focus:"button"!==e||o.mobile?.focus?.borderType!=="none"||o?.mobile?.focus?.isCustom?o.mobile?.focus?.width:"1px 1px 1px 1px"}};return makeStyle.makeStyleResponsiveState("bw",r)}let r={normal:"button"!==e||o.normal?.borderType!=="none"||o.normal?.isCustom?o?.normal?.width:"1px 1px 1px 1px",hover:"button"!==e||o.hover?.borderType!=="none"||o.hover?.isCustom?o?.hover?.width:"1px 1px 1px 1px",focus:"button"!==e||o.focus?.borderType!=="none"||o.focus?.isCustom?o?.focus?.width:"1px 1px 1px 1px"};return makeStyle.makeStyleState("bw",r)},getInputBorderWidth=(o,e)=>({desktop:{normal:o.desktop?.normal?.width?.split(" ")?.[e],hover:o.desktop?.hover?.width?.split(" ")?.[e]},tablet:{normal:o.tablet?.normal?.width?.split(" ")?.[e],hover:o.tablet?.hover?.width?.split(" ")?.[e]},mobile:{normal:o.mobile?.normal?.width?.split(" ")?.[e],hover:o.mobile?.hover?.width?.split(" ")?.[e]}}),handleConvertInputBorderWidth=(o,e)=>{if(o&&("desktop"in o||"tablet"in o||"mobile"in o))return{...makeStyle.makeStyleResponsiveState("btw",getInputBorderWidth(o,0)),...makeStyle.makeStyleResponsiveState("bbw",getInputBorderWidth(o,2)),..."minimalist"===e?makeStyle.makeStyleResponsiveState("brw",getInputBorderWidth(o,1)):{},..."minimalist"===e?makeStyle.makeStyleResponsiveState("blw",getInputBorderWidth(o,3)):{}}},handleConvertBorderColor=o=>{if(!o)return;if("desktop"in o||"tablet"in o||"mobile"in o){let e={desktop:{normal:o.desktop?.normal?.color,hover:o.desktop?.hover?.color,focus:o.desktop?.focus?.color},tablet:{normal:o.tablet?.normal?.color,hover:o.tablet?.hover?.color,focus:o.tablet?.focus?.color},mobile:{normal:o.mobile?.normal?.color,hover:o.mobile?.hover?.color,focus:o.mobile?.focus?.color}};return colors.getGlobalColorStateResponsiveStyle("bc",e)}let e={normal:o?.normal?.color,hover:o?.hover?.color,focus:o?.focus?.color};return colors.getGlobalColorStateStyle("bc",e)},handleConvertInputBorderColor=o=>{if(!o)return;if("desktop"in o||"tablet"in o||"mobile"in o){let e={desktop:{normal:o.desktop?.normal?.color,hover:o.desktop?.hover?.color,focus:o.desktop?.focus?.color},tablet:{normal:o.tablet?.normal?.color,hover:o.tablet?.hover?.color,focus:o.tablet?.focus?.color},mobile:{normal:o.mobile?.normal?.color,hover:o.mobile?.hover?.color,focus:o.mobile?.focus?.color}};return{...colors.getGlobalColorStateResponsiveStyle("btc",e),...colors.getGlobalColorStateResponsiveStyle("bbc",e),...colors.getGlobalColorStateResponsiveStyle("blc",e),...colors.getGlobalColorStateResponsiveStyle("brc",e)}}let e={normal:o?.normal?.color,hover:o?.hover?.color,focus:o?.focus?.color};return colors.getGlobalColorStateStyle("bc",e)},handleConvertClassColor=o=>{if(!o)return;if("desktop"in o||"tablet"in o||"mobile"in o){let e={desktop:{normal:o.desktop?.normal?.color,hover:o.desktop?.hover?.color,focus:o.desktop?.focus?.color},tablet:{normal:o.tablet?.normal?.color,hover:o.tablet?.hover?.color,focus:o.tablet?.focus?.color},mobile:{normal:o.mobile?.normal?.color,hover:o.mobile?.hover?.color,focus:o.mobile?.focus?.color}};return colors.getGlobalColorStateResponsiveClass("border",e)}let e={normal:o?.normal?.color,hover:o?.hover?.color,focus:o?.focus?.color};return colors.getGlobalColorStateClass("border",e)},handleConvertClassColorDynamicBtn=o=>{if(!o)return;if("desktop"in o||"tablet"in o||"mobile"in o){let e={desktop:{normal:o.desktop?.normal?.color,hover:o.desktop?.hover?.color,focus:o.desktop?.focus?.color},tablet:{normal:o.tablet?.normal?.color,hover:o.tablet?.hover?.color,focus:o.tablet?.focus?.color},mobile:{normal:o.mobile?.normal?.color,hover:o.mobile?.hover?.color,focus:o.mobile?.focus?.color}};return colors.getGlobalColorStateResponsiveClassDynamicBtn("border",e)}let e={normal:o?.normal?.color,hover:o?.hover?.color,focus:o?.focus?.color};return colors.getGlobalColorStateClassDynamicBtn("border",e)},composeBorderCss=(o,e)=>{if(!o)return"";let r=e?.important?" !important":"",{border:t,width:l,color:s}=o;return`${t?`border-style: ${t}${r};`:""}
|
|
2
2
|
${l?`border-width: ${l}${r};`:""}
|
|
3
3
|
${s?`border-color: ${colors.getSingleColorVariable(s)}${r};`:""}
|
|
4
4
|
`},composeBorderResponsive=o=>{let e={};return Object.assign(e,composeBorderDevice(o?.desktop,"desktop")),Object.assign(e,composeBorderDevice(o?.tablet,"tablet")),Object.assign(e,composeBorderDevice(o?.mobile,"mobile")),e},composeBorderDevice=(o,e)=>{let r=e&&"desktop"!==e?constant.devicesMapping?.[e]:"";return{[`--b${r}`]:o?.border,[`--bc${r}`]:colors.getSingleColorVariable(o?.color),[`--bw${r}`]:o?.width}};exports.composeBorderCss=composeBorderCss,exports.composeBorderResponsive=composeBorderResponsive,exports.getBorderRadiusStyle=getBorderRadiusStyle,exports.getBorderStyle=getBorderStyle,exports.handleConvertBorderColor=handleConvertBorderColor,exports.handleConvertBorderStyle=handleConvertBorderStyle,exports.handleConvertBorderWidth=handleConvertBorderWidth,exports.handleConvertClassColor=handleConvertClassColor,exports.handleConvertClassColorDynamicBtn=handleConvertClassColorDynamicBtn,exports.handleConvertInputBorderColor=handleConvertInputBorderColor,exports.handleConvertInputBorderWidth=handleConvertInputBorderWidth;
|
|
@@ -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=
|
|
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=["
|
|
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=>
|
|
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
|
|
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=
|
|
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
|
|
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,4 +1,4 @@
|
|
|
1
|
-
import{getSingleColorVariable as o,getGlobalColorStateResponsiveStyle as e,getGlobalColorStateStyle as r,getGlobalColorStateResponsiveClass as t,getGlobalColorStateClass as l,getGlobalColorStateResponsiveClassDynamicBtn as n,getGlobalColorStateClassDynamicBtn as s}from"./colors.js";import{makeStyle as b,makeStyleResponsiveState as d,makeStyleState as i}from"./make-style.js";import{devicesMapping as m}from"./constant.js";let getBorderStyle=e=>b({b:e?.border,bc:o(e?.color),bw:e?.width}),getBorderRadiusStyle=(o,e)=>{let r=Object.entries(e||{}).reduce((o,[e,r])=>({...o,[`--${e}`]:r}),{});return Object.entries(o||{}).reduce((o,[e,r])=>({...o,[`--${e}`]:r}),r)},handleConvertBorderStyle=(o,e)=>{if(!o)return;if("desktop"in o||"tablet"in o||"mobile"in o){let r={desktop:{normal:"button"!==e||o.desktop?.normal?.borderType!=="none"||o.desktop?.normal?.isCustom?o.desktop?.normal?.border:"solid",hover:"button"!==e||o.desktop?.hover?.borderType!=="none"||o.desktop?.hover?.isCustom?o.desktop?.hover?.border:"solid",focus:"button"!==e||o.desktop?.focus?.borderType!=="none"||o.desktop?.focus?.isCustom?o.desktop?.focus?.border:"solid"},tablet:{normal:"button"!==e||o.tablet?.normal?.borderType!=="none"||o.tablet?.normal?.isCustom?o.tablet?.normal?.border:"solid",hover:"button"!==e||o.tablet?.hover?.borderType!=="none"||o.tablet?.hover?.isCustom?o.tablet?.hover?.border:"solid",focus:"button"!==e||o.tablet?.focus?.borderType!=="none"||o.tablet?.focus?.isCustom?o.tablet?.focus?.border:"solid"},mobile:{normal:"button"!==e||o.mobile?.normal?.borderType!=="none"||o.mobile?.normal?.isCustom?o.mobile?.normal?.border:"solid",hover:"button"!==e||o.mobile?.hover?.borderType!=="none"||o.mobile?.hover?.isCustom?o.mobile?.hover?.border:"solid",focus:"button"!==e||o.mobile?.focus?.borderType!=="none"||o.mobile?.focus?.isCustom?o.mobile?.focus?.border:"solid"}};return d("bs",r)}let r={normal:"button"!==e||o.normal?.borderType!=="none"||o.normal?.isCustom?o?.normal?.border:"solid",hover:"button"!==e||o.hover?.borderType!=="none"||o.hover?.isCustom?o?.hover?.border:"solid",focus:"button"!==e||o.focus?.borderType!=="none"||o.focus?.isCustom?o?.focus?.border:"solid"};return i("bs",r)},handleConvertBorderWidth=(o,e)=>{if(!o)return;if("desktop"in o||"tablet"in o||"mobile"in o){let r={desktop:{normal:"button"!==e||o.desktop?.normal?.borderType!=="none"||o?.desktop?.normal?.isCustom?o.desktop?.normal?.width:"1px 1px 1px 1px",hover:"button"!==e||o.desktop?.hover?.borderType!=="none"||o?.desktop?.normal?.isCustom?o.desktop?.hover?.width:"1px 1px 1px 1px",focus:"button"!==e||o.desktop?.focus?.borderType!=="none"||o?.desktop?.normal?.isCustom?o.desktop?.focus?.width:"1px 1px 1px 1px"},tablet:{normal:"button"!==e||o.tablet?.normal?.borderType!=="none"||o?.tablet?.normal?.isCustom?o.tablet?.normal?.width:"1px 1px 1px 1px",hover:"button"!==e||o.tablet?.hover?.borderType!=="none"||o?.tablet?.hover?.isCustom?o.tablet?.hover?.width:"1px 1px 1px 1px",focus:"button"!==e||o.tablet?.focus?.borderType!=="none"||o?.tablet?.focus?.isCustom?o.tablet?.focus?.width:"1px 1px 1px 1px"},mobile:{normal:"button"!==e||o.mobile?.normal?.borderType!=="none"||o?.mobile?.normal?.isCustom?o.mobile?.normal?.width:"1px 1px 1px 1px",hover:"button"!==e||o.mobile?.hover?.borderType!=="none"||o?.mobile?.hover?.isCustom?o.mobile?.hover?.width:"1px 1px 1px 1px",focus:"button"!==e||o.mobile?.focus?.borderType!=="none"||o?.mobile?.focus?.isCustom?o.mobile?.focus?.width:"1px 1px 1px 1px"}};return d("bw",r)}let r={normal:"button"!==e||o.normal?.borderType!=="none"||o.normal?.isCustom?o?.normal?.width:"1px 1px 1px 1px",hover:"button"!==e||o.hover?.borderType!=="none"||o.hover?.isCustom?o?.hover?.width:"1px 1px 1px 1px",focus:"button"!==e||o.focus?.borderType!=="none"||o.focus?.isCustom?o?.focus?.width:"1px 1px 1px 1px"};return i("bw",r)},getInputBorderWidth=(o,e)=>({desktop:{normal:o.desktop?.normal?.width?.split(" ")?.[e],hover:o.desktop?.hover?.width?.split(" ")?.[e]},tablet:{normal:o.tablet?.normal?.width?.split(" ")?.[e],hover:o.tablet?.hover?.width?.split(" ")?.[e]},mobile:{normal:o.mobile?.normal?.width?.split(" ")?.[e],hover:o.mobile?.hover?.width?.split(" ")?.[e]}}),handleConvertInputBorderWidth=(o,e)=>{if(o&&("desktop"in o||"tablet"in o||"mobile"in o))return{...d("btw",getInputBorderWidth(o,0)),...d("bbw",getInputBorderWidth(o,2)),..."minimalist"===e?d("brw",getInputBorderWidth(o,1)):{},..."minimalist"===e?d("blw",getInputBorderWidth(o,3)):{}}},handleConvertBorderColor=o=>{if(!o)return;if("desktop"in o||"tablet"in o||"mobile"in o){let r={desktop:{normal:o.desktop?.normal?.color,hover:o.desktop?.hover?.color,focus:o.desktop?.focus?.color},tablet:{normal:o.tablet?.normal?.color,hover:o.tablet?.hover?.color,focus:o.tablet?.focus?.color},mobile:{normal:o.mobile?.normal?.color,hover:o.mobile?.hover?.color,focus:o.mobile?.focus?.color}};return e("bc",r)}let t={normal:o?.normal?.color,hover:o?.hover?.color,focus:o?.focus?.color};return r("bc",t)},handleConvertInputBorderColor=o=>{if(!o)return;if("desktop"in o||"tablet"in o||"mobile"in o){let r={desktop:{normal:o.desktop?.normal?.color,hover:o.desktop?.hover?.color,focus:o.desktop?.focus?.color},tablet:{normal:o.tablet?.normal?.color,hover:o.tablet?.hover?.color,focus:o.tablet?.focus?.color},mobile:{normal:o.mobile?.normal?.color,hover:o.mobile?.hover?.color,focus:o.mobile?.focus?.color}};return{...e("btc",r),...e("bbc",r)}}let t={normal:o?.normal?.color,hover:o?.hover?.color,focus:o?.focus?.color};return r("bc",t)},handleConvertClassColor=o=>{if(!o)return;if("desktop"in o||"tablet"in o||"mobile"in o){let e={desktop:{normal:o.desktop?.normal?.color,hover:o.desktop?.hover?.color,focus:o.desktop?.focus?.color},tablet:{normal:o.tablet?.normal?.color,hover:o.tablet?.hover?.color,focus:o.tablet?.focus?.color},mobile:{normal:o.mobile?.normal?.color,hover:o.mobile?.hover?.color,focus:o.mobile?.focus?.color}};return t("border",e)}let e={normal:o?.normal?.color,hover:o?.hover?.color,focus:o?.focus?.color};return l("border",e)},handleConvertClassColorDynamicBtn=o=>{if(!o)return;if("desktop"in o||"tablet"in o||"mobile"in o){let e={desktop:{normal:o.desktop?.normal?.color,hover:o.desktop?.hover?.color,focus:o.desktop?.focus?.color},tablet:{normal:o.tablet?.normal?.color,hover:o.tablet?.hover?.color,focus:o.tablet?.focus?.color},mobile:{normal:o.mobile?.normal?.color,hover:o.mobile?.hover?.color,focus:o.mobile?.focus?.color}};return n("border",e)}let e={normal:o?.normal?.color,hover:o?.hover?.color,focus:o?.focus?.color};return s("border",e)},composeBorderCss=(e,r)=>{if(!e)return"";let t=r?.important?" !important":"",{border:l,width:n,color:s}=e;return`${l?`border-style: ${l}${t};`:""}
|
|
1
|
+
import{getSingleColorVariable as o,getGlobalColorStateResponsiveStyle as e,getGlobalColorStateStyle as r,getGlobalColorStateResponsiveClass as t,getGlobalColorStateClass as l,getGlobalColorStateResponsiveClassDynamicBtn as n,getGlobalColorStateClassDynamicBtn as s}from"./colors.js";import{makeStyle as b,makeStyleResponsiveState as d,makeStyleState as i}from"./make-style.js";import{devicesMapping as m}from"./constant.js";let getBorderStyle=e=>b({b:e?.border,bc:o(e?.color),bw:e?.width}),getBorderRadiusStyle=(o,e)=>{let r=Object.entries(e||{}).reduce((o,[e,r])=>({...o,[`--${e}`]:r}),{});return Object.entries(o||{}).reduce((o,[e,r])=>({...o,[`--${e}`]:r}),r)},handleConvertBorderStyle=(o,e)=>{if(!o)return;if("desktop"in o||"tablet"in o||"mobile"in o){let r={desktop:{normal:"button"!==e||o.desktop?.normal?.borderType!=="none"||o.desktop?.normal?.isCustom?o.desktop?.normal?.border:"solid",hover:"button"!==e||o.desktop?.hover?.borderType!=="none"||o.desktop?.hover?.isCustom?o.desktop?.hover?.border:"solid",focus:"button"!==e||o.desktop?.focus?.borderType!=="none"||o.desktop?.focus?.isCustom?o.desktop?.focus?.border:"solid"},tablet:{normal:"button"!==e||o.tablet?.normal?.borderType!=="none"||o.tablet?.normal?.isCustom?o.tablet?.normal?.border:"solid",hover:"button"!==e||o.tablet?.hover?.borderType!=="none"||o.tablet?.hover?.isCustom?o.tablet?.hover?.border:"solid",focus:"button"!==e||o.tablet?.focus?.borderType!=="none"||o.tablet?.focus?.isCustom?o.tablet?.focus?.border:"solid"},mobile:{normal:"button"!==e||o.mobile?.normal?.borderType!=="none"||o.mobile?.normal?.isCustom?o.mobile?.normal?.border:"solid",hover:"button"!==e||o.mobile?.hover?.borderType!=="none"||o.mobile?.hover?.isCustom?o.mobile?.hover?.border:"solid",focus:"button"!==e||o.mobile?.focus?.borderType!=="none"||o.mobile?.focus?.isCustom?o.mobile?.focus?.border:"solid"}};return d("bs",r)}let r={normal:"button"!==e||o.normal?.borderType!=="none"||o.normal?.isCustom?o?.normal?.border:"solid",hover:"button"!==e||o.hover?.borderType!=="none"||o.hover?.isCustom?o?.hover?.border:"solid",focus:"button"!==e||o.focus?.borderType!=="none"||o.focus?.isCustom?o?.focus?.border:"solid"};return i("bs",r)},handleConvertBorderWidth=(o,e)=>{if(!o)return;if("desktop"in o||"tablet"in o||"mobile"in o){let r={desktop:{normal:"button"!==e||o.desktop?.normal?.borderType!=="none"||o?.desktop?.normal?.isCustom?o.desktop?.normal?.width:"1px 1px 1px 1px",hover:"button"!==e||o.desktop?.hover?.borderType!=="none"||o?.desktop?.normal?.isCustom?o.desktop?.hover?.width:"1px 1px 1px 1px",focus:"button"!==e||o.desktop?.focus?.borderType!=="none"||o?.desktop?.normal?.isCustom?o.desktop?.focus?.width:"1px 1px 1px 1px"},tablet:{normal:"button"!==e||o.tablet?.normal?.borderType!=="none"||o?.tablet?.normal?.isCustom?o.tablet?.normal?.width:"1px 1px 1px 1px",hover:"button"!==e||o.tablet?.hover?.borderType!=="none"||o?.tablet?.hover?.isCustom?o.tablet?.hover?.width:"1px 1px 1px 1px",focus:"button"!==e||o.tablet?.focus?.borderType!=="none"||o?.tablet?.focus?.isCustom?o.tablet?.focus?.width:"1px 1px 1px 1px"},mobile:{normal:"button"!==e||o.mobile?.normal?.borderType!=="none"||o?.mobile?.normal?.isCustom?o.mobile?.normal?.width:"1px 1px 1px 1px",hover:"button"!==e||o.mobile?.hover?.borderType!=="none"||o?.mobile?.hover?.isCustom?o.mobile?.hover?.width:"1px 1px 1px 1px",focus:"button"!==e||o.mobile?.focus?.borderType!=="none"||o?.mobile?.focus?.isCustom?o.mobile?.focus?.width:"1px 1px 1px 1px"}};return d("bw",r)}let r={normal:"button"!==e||o.normal?.borderType!=="none"||o.normal?.isCustom?o?.normal?.width:"1px 1px 1px 1px",hover:"button"!==e||o.hover?.borderType!=="none"||o.hover?.isCustom?o?.hover?.width:"1px 1px 1px 1px",focus:"button"!==e||o.focus?.borderType!=="none"||o.focus?.isCustom?o?.focus?.width:"1px 1px 1px 1px"};return i("bw",r)},getInputBorderWidth=(o,e)=>({desktop:{normal:o.desktop?.normal?.width?.split(" ")?.[e],hover:o.desktop?.hover?.width?.split(" ")?.[e]},tablet:{normal:o.tablet?.normal?.width?.split(" ")?.[e],hover:o.tablet?.hover?.width?.split(" ")?.[e]},mobile:{normal:o.mobile?.normal?.width?.split(" ")?.[e],hover:o.mobile?.hover?.width?.split(" ")?.[e]}}),handleConvertInputBorderWidth=(o,e)=>{if(o&&("desktop"in o||"tablet"in o||"mobile"in o))return{...d("btw",getInputBorderWidth(o,0)),...d("bbw",getInputBorderWidth(o,2)),..."minimalist"===e?d("brw",getInputBorderWidth(o,1)):{},..."minimalist"===e?d("blw",getInputBorderWidth(o,3)):{}}},handleConvertBorderColor=o=>{if(!o)return;if("desktop"in o||"tablet"in o||"mobile"in o){let r={desktop:{normal:o.desktop?.normal?.color,hover:o.desktop?.hover?.color,focus:o.desktop?.focus?.color},tablet:{normal:o.tablet?.normal?.color,hover:o.tablet?.hover?.color,focus:o.tablet?.focus?.color},mobile:{normal:o.mobile?.normal?.color,hover:o.mobile?.hover?.color,focus:o.mobile?.focus?.color}};return e("bc",r)}let t={normal:o?.normal?.color,hover:o?.hover?.color,focus:o?.focus?.color};return r("bc",t)},handleConvertInputBorderColor=o=>{if(!o)return;if("desktop"in o||"tablet"in o||"mobile"in o){let r={desktop:{normal:o.desktop?.normal?.color,hover:o.desktop?.hover?.color,focus:o.desktop?.focus?.color},tablet:{normal:o.tablet?.normal?.color,hover:o.tablet?.hover?.color,focus:o.tablet?.focus?.color},mobile:{normal:o.mobile?.normal?.color,hover:o.mobile?.hover?.color,focus:o.mobile?.focus?.color}};return{...e("btc",r),...e("bbc",r),...e("blc",r),...e("brc",r)}}let t={normal:o?.normal?.color,hover:o?.hover?.color,focus:o?.focus?.color};return r("bc",t)},handleConvertClassColor=o=>{if(!o)return;if("desktop"in o||"tablet"in o||"mobile"in o){let e={desktop:{normal:o.desktop?.normal?.color,hover:o.desktop?.hover?.color,focus:o.desktop?.focus?.color},tablet:{normal:o.tablet?.normal?.color,hover:o.tablet?.hover?.color,focus:o.tablet?.focus?.color},mobile:{normal:o.mobile?.normal?.color,hover:o.mobile?.hover?.color,focus:o.mobile?.focus?.color}};return t("border",e)}let e={normal:o?.normal?.color,hover:o?.hover?.color,focus:o?.focus?.color};return l("border",e)},handleConvertClassColorDynamicBtn=o=>{if(!o)return;if("desktop"in o||"tablet"in o||"mobile"in o){let e={desktop:{normal:o.desktop?.normal?.color,hover:o.desktop?.hover?.color,focus:o.desktop?.focus?.color},tablet:{normal:o.tablet?.normal?.color,hover:o.tablet?.hover?.color,focus:o.tablet?.focus?.color},mobile:{normal:o.mobile?.normal?.color,hover:o.mobile?.hover?.color,focus:o.mobile?.focus?.color}};return n("border",e)}let e={normal:o?.normal?.color,hover:o?.hover?.color,focus:o?.focus?.color};return s("border",e)},composeBorderCss=(e,r)=>{if(!e)return"";let t=r?.important?" !important":"",{border:l,width:n,color:s}=e;return`${l?`border-style: ${l}${t};`:""}
|
|
2
2
|
${n?`border-width: ${n}${t};`:""}
|
|
3
3
|
${s?`border-color: ${o(s)}${t};`:""}
|
|
4
4
|
`},composeBorderResponsive=o=>{let e={};return Object.assign(e,composeBorderDevice(o?.desktop,"desktop")),Object.assign(e,composeBorderDevice(o?.tablet,"tablet")),Object.assign(e,composeBorderDevice(o?.mobile,"mobile")),e},composeBorderDevice=(e,r)=>{let t=r&&"desktop"!==r?m?.[r]:"";return{[`--b${t}`]:e?.border,[`--bc${t}`]:o(e?.color),[`--bw${t}`]:e?.width}};export{composeBorderCss,composeBorderResponsive,getBorderRadiusStyle,getBorderStyle,handleConvertBorderColor,handleConvertBorderStyle,handleConvertBorderWidth,handleConvertClassColor,handleConvertClassColorDynamicBtn,handleConvertInputBorderColor,handleConvertInputBorderWidth};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getResponsiveValueByScreen as
|
|
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
|
|
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{
|
|
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};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -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
|
|
34203
|
-
type ObjectDevices<T> = Partial<Record<NameDevices
|
|
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
|
|
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
|
|
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
|
|
35439
|
-
declare const getResponsiveStateValue: <I>(k: StateType, input?: Partial<Record<NameDevices
|
|
35440
|
-
declare const getResponsiveValueByScreen: <T>(value?: Partial<Record<NameDevices
|
|
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
|
|
35547
|
-
declare const makeStyleResponsive: <T extends ShortHandProperty, K>(name: T, value?: Partial<Record<NameDevices
|
|
35548
|
-
declare const makeStyleResponsiveByScreen: <T extends ShortHandProperty, K>(name: T, value?: Partial<Record<NameDevices
|
|
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
|
|
35564
|
-
declare const makeStyleResponsiveWidthWithoutAuto: <T extends ShortHandProperty, K>(value?: Partial<Record<NameDevices
|
|
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
|
|
36308
|
+
compoDefaultValue?: any | Record<NameDevices, any>;
|
|
36310
36309
|
} & SettingUICompo & SettingUIGroup;
|
|
36311
36310
|
type ControlTriggerAction$1 = {
|
|
36312
36311
|
controlId: string;
|
|
@@ -37646,7 +37645,6 @@ type ComponentPreset = {
|
|
|
37646
37645
|
rootOverride?: Record<string, any>;
|
|
37647
37646
|
};
|
|
37648
37647
|
|
|
37649
|
-
type Devices = 'desktop' | 'tablet' | 'mobile';
|
|
37650
37648
|
type Options$1 = {
|
|
37651
37649
|
liquid?: boolean;
|
|
37652
37650
|
ignoreBgAttachment?: boolean;
|
|
@@ -37654,7 +37652,7 @@ type Options$1 = {
|
|
|
37654
37652
|
ignoreBackgroundImageProperties?: boolean;
|
|
37655
37653
|
ignoreBackgroundColor?: boolean;
|
|
37656
37654
|
};
|
|
37657
|
-
declare const getBgVideoByDevice: (value?: Partial<Record<
|
|
37655
|
+
declare const getBgVideoByDevice: (value?: Partial<Record<NameDevices, Background>>, device?: NameDevices) => Background | undefined;
|
|
37658
37656
|
declare const getStyleBackgroundByDevice: (background?: ObjectDevices<Background>, options?: Options$1) => {
|
|
37659
37657
|
"--bga"?: string | undefined;
|
|
37660
37658
|
"--bga-tablet"?: string | undefined;
|
|
@@ -37677,7 +37675,7 @@ declare const getStyleBackgroundByDevice: (background?: ObjectDevices<Background
|
|
|
37677
37675
|
};
|
|
37678
37676
|
declare const getStyleBgColor: (background: ObjectDevices<Background>) => Record<ResponsiveKey<"bgc">, string>;
|
|
37679
37677
|
declare const getColor: (color?: string) => string | undefined;
|
|
37680
|
-
declare const getBgImageByDevice: (background: ObjectDevices<Background>, device:
|
|
37678
|
+
declare const getBgImageByDevice: (background: ObjectDevices<Background>, device: NameDevices, options?: Options$1) => string | undefined;
|
|
37681
37679
|
declare const composeBackgroundCss: (backgroundColor?: ColorValueType) => string;
|
|
37682
37680
|
declare const makeFixedBgAttachment: (background?: ObjectDevices<Background>) => {
|
|
37683
37681
|
wrapper: {
|
|
@@ -37689,10 +37687,10 @@ declare const makeFixedBgAttachment: (background?: ObjectDevices<Background>) =>
|
|
|
37689
37687
|
} | undefined;
|
|
37690
37688
|
declare const GRADIENT_BGR_KEY = "linear-gradient";
|
|
37691
37689
|
declare const getGradientBgrStyleForButton: (backgroundStyle: Partial<Record<StateType, ColorValueType>> | undefined) => Record<string, string> | undefined;
|
|
37692
|
-
declare const getGradientBgrStyleByDevice: (backgroundStyle: Partial<Record<
|
|
37690
|
+
declare const getGradientBgrStyleByDevice: (backgroundStyle: Partial<Record<NameDevices, Background>> | undefined, ignoreBackgroundImage?: Record<NameDevices, boolean>) => {} | undefined;
|
|
37693
37691
|
declare const getBgByDevice: (data: {
|
|
37694
|
-
backgroundColor: Partial<Record<
|
|
37695
|
-
backgroundImage: Partial<Record<
|
|
37692
|
+
backgroundColor: Partial<Record<NameDevices, string>> | undefined;
|
|
37693
|
+
backgroundImage: Partial<Record<NameDevices, BackgroundImageValue>> | undefined;
|
|
37696
37694
|
}) => {
|
|
37697
37695
|
"--bgr": string;
|
|
37698
37696
|
"--bgr-tablet": string;
|
|
@@ -37716,7 +37714,7 @@ declare const getStyleBgImageSource: (backgroundImage: StateProp<BackgroundImage
|
|
|
37716
37714
|
declare const getBgImageSourceByDevice: (backgroundImage: StateProp<BackgroundImageValue>, state: StateType, options?: Options) => string;
|
|
37717
37715
|
declare const composeBackgroundImageCss: (config?: ObjectDevices<StateProp<BackgroundImageValue>> | StateProp<BackgroundImageValue>, options?: {
|
|
37718
37716
|
useLiquid?: boolean;
|
|
37719
|
-
device?:
|
|
37717
|
+
device?: NameDevices;
|
|
37720
37718
|
state?: 'normal' | 'hover';
|
|
37721
37719
|
responsive?: boolean;
|
|
37722
37720
|
}) => string | undefined;
|
|
@@ -37741,7 +37739,7 @@ declare const composeTextColorCss: (color?: ColorValueType) => string;
|
|
|
37741
37739
|
type AdvanceValue = Primitive | ObjectDevices<Primitive>;
|
|
37742
37740
|
declare const composeAdvanceStyleForPostPurchase: (data?: Record<string, AdvanceValue>, tag?: string) => React.CSSProperties;
|
|
37743
37741
|
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
|
|
37742
|
+
declare const convertBoxShadowV1ToV2: (hasBoxShadow: Partial<Record<StateType, boolean>>, value: Partial<Record<NameDevices, Primitive>>, tag: string | undefined) => Partial<Record<StateType, boolean>>;
|
|
37745
37743
|
declare const splitStyle: (keys: ShortHandProperty[], style?: React.CSSProperties) => React.CSSProperties[];
|
|
37746
37744
|
declare const filterAttrInStyle: (style?: React.CSSProperties, filterKeys?: string[]) => {
|
|
37747
37745
|
[x: string]: any;
|
|
@@ -42624,8 +42622,8 @@ declare const composePositionLineHeight: ({ compose, lineHeight, device, positio
|
|
|
42624
42622
|
compose: PostionType;
|
|
42625
42623
|
lineHeight: string;
|
|
42626
42624
|
device: NameDevices;
|
|
42627
|
-
position?: Partial<Record<NameDevices
|
|
42628
|
-
iconWidth?: Partial<Record<NameDevices
|
|
42625
|
+
position?: Partial<Record<NameDevices, "center" | "baseline">> | undefined;
|
|
42626
|
+
iconWidth?: Partial<Record<NameDevices, number>> | undefined;
|
|
42629
42627
|
}) => void;
|
|
42630
42628
|
|
|
42631
42629
|
declare function isDefined<T>(argument: T | undefined): argument is T;
|
|
@@ -42634,10 +42632,10 @@ declare const gridToArrayRegex: RegExp;
|
|
|
42634
42632
|
declare const optionLayoutStyle: (column?: ObjectDevices<string | number>) => React.CSSProperties;
|
|
42635
42633
|
declare const composeGridLayout: (layout?: ObjectDevices<ObjectLayoutValue>) => React.CSSProperties;
|
|
42636
42634
|
declare const convertOldLayout: (layout?: ObjectDevices<string>) => ObjectDevices<ObjectLayoutValue>;
|
|
42637
|
-
declare const getLayoutClasses: (layout: Partial<Record<NameDevices
|
|
42635
|
+
declare const getLayoutClasses: (layout: Partial<Record<NameDevices, string>> | undefined) => Record<string, boolean>;
|
|
42638
42636
|
|
|
42639
|
-
declare const convertTextAlignToJustify: (align: Partial<Record<NameDevices
|
|
42640
|
-
declare const getAlignmentClasses: (align: Partial<Record<NameDevices
|
|
42637
|
+
declare const convertTextAlignToJustify: (align: Partial<Record<NameDevices, AlignProp>> | undefined) => Record<string, boolean>;
|
|
42638
|
+
declare const getAlignmentClasses: (align: Partial<Record<NameDevices, AlignProp>> | undefined) => Record<string, boolean>;
|
|
42641
42639
|
|
|
42642
42640
|
declare function filterTruthyStyles<T extends Record<string, any>>(styles: T): Partial<T>;
|
|
42643
42641
|
|
|
@@ -42686,8 +42684,8 @@ declare const generateCollectionQueryKey: (args: FetchCollectionArgs) => ['query
|
|
|
42686
42684
|
declare const generateProductsQueryKey: (args: FetchProductsParams) => ['query/products', FetchProductsParams];
|
|
42687
42685
|
|
|
42688
42686
|
declare const getCornerCSSFromGlobal: (corner?: CornerRadius) => React.CSSProperties;
|
|
42689
|
-
declare const getRadiusCSSFromGlobal: (state: StateType, key?: RoundedSize, device?: NameDevices
|
|
42690
|
-
declare const getCustomRadius: (state: StateType, radius?: CornerRadius, device?: NameDevices
|
|
42687
|
+
declare const getRadiusCSSFromGlobal: (state: StateType, key?: RoundedSize, device?: NameDevices) => React.CSSProperties;
|
|
42688
|
+
declare const getCustomRadius: (state: StateType, radius?: CornerRadius, device?: NameDevices) => React.CSSProperties;
|
|
42691
42689
|
declare const composeRadius: (value?: StateProp<CornerRadius> | ResponsiveStateProp<CornerRadius>) => React.CSSProperties;
|
|
42692
42690
|
declare const composeRadiusResponsive: (radiusValue?: ObjectDevices<CornerRadius>) => React.CSSProperties;
|
|
42693
42691
|
declare const getRadiusStyleActiveState: (radiusValue?: StateProp<CornerRadius>) => React.CSSProperties;
|
|
@@ -45985,14 +45983,14 @@ declare const getGlobalSizeGap: (globalSize?: ObjectDevices<SizeSettingGlobal>)
|
|
|
45985
45983
|
'--gg-tablet': string | undefined;
|
|
45986
45984
|
'--gg-mobile': string | undefined;
|
|
45987
45985
|
};
|
|
45988
|
-
declare const makeStyleWithDefault: <T extends ShortHandProperty, K>(name: T, value?: Partial<Record<NameDevices
|
|
45989
|
-
declare const getWidthHeightGlobalSize: (type: 'width' | 'height', globalSize?: ObjectDevices<SizeSettingGlobal>) => Partial<Record<NameDevices
|
|
45990
|
-
declare const getHeightByShapeGlobalSize: (shapeByLayout?: ObjectDevices<SizeSettingGlobal>) => Partial<Record<NameDevices
|
|
45991
|
-
declare const getWidthByShapeGlobalSize: (shapeByLayout?: ObjectDevices<SizeSettingGlobal>, defaultAuto?: boolean, defaultFull?: boolean) => Partial<Record<NameDevices
|
|
45986
|
+
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>;
|
|
45987
|
+
declare const getWidthHeightGlobalSize: (type: 'width' | 'height', globalSize?: ObjectDevices<SizeSettingGlobal>) => Partial<Record<NameDevices, string | number>>;
|
|
45988
|
+
declare const getHeightByShapeGlobalSize: (shapeByLayout?: ObjectDevices<SizeSettingGlobal>) => Partial<Record<NameDevices, string>>;
|
|
45989
|
+
declare const getWidthByShapeGlobalSize: (shapeByLayout?: ObjectDevices<SizeSettingGlobal>, defaultAuto?: boolean, defaultFull?: boolean) => Partial<Record<NameDevices, string>>;
|
|
45992
45990
|
declare const getAspectRatioGlobalSize: (shape?: ObjectDevices<SizeSettingGlobal>) => ObjectDevices<string>;
|
|
45993
45991
|
declare const getPaddingGlobalSize: (globalSize?: ObjectDevices<SizeSettingGlobal>) => React.CSSProperties;
|
|
45994
|
-
declare const getValueByDevice: <T>(value: any, device: NameDevices
|
|
45995
|
-
declare const getPaddingStyleByDevice: (value?: PaddingType, device?: NameDevices
|
|
45992
|
+
declare const getValueByDevice: <T>(value: any, device: NameDevices) => T;
|
|
45993
|
+
declare const getPaddingStyleByDevice: (value?: PaddingType, device?: NameDevices) => {
|
|
45996
45994
|
[x: string]: string | undefined;
|
|
45997
45995
|
};
|
|
45998
45996
|
declare const getResponsiveStylePadding: (value?: ObjectDevices<PaddingType>) => {
|
|
@@ -47726,7 +47724,7 @@ declare const useProductsQuery: (ids?: string[], options?: SWRConfiguration<Prod
|
|
|
47726
47724
|
}) => swr__internal.SWRResponse<ProductsQueryResponse, any, Partial<swr__internal.PublicConfiguration<ProductsQueryResponse, any, (arg: ["query/products", FetchProductsParams]) => swr__internal.FetcherResponse<ProductsQueryResponse>>> | undefined>;
|
|
47727
47725
|
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
47726
|
|
|
47729
|
-
declare const useCurrentDevice: () => NameDevices
|
|
47727
|
+
declare const useCurrentDevice: () => NameDevices;
|
|
47730
47728
|
|
|
47731
47729
|
declare const useLazyVideo: () => void;
|
|
47732
47730
|
|
|
@@ -47884,24 +47882,24 @@ declare const useShopifyLink: ({ productId, articleId }: ShopifyLinkParam) => {
|
|
|
47884
47882
|
declare const useProductList: () => CollectionProductSelectFragment | undefined;
|
|
47885
47883
|
declare const useProductListProducts: () => (ProductQuickSelectFragment | undefined)[] | undefined;
|
|
47886
47884
|
declare const useProductListSettings: () => {
|
|
47887
|
-
loop?: Partial<Record<NameDevices
|
|
47888
|
-
scrollMode?: Partial<Record<NameDevices
|
|
47889
|
-
slidesToShow?: Partial<Record<NameDevices
|
|
47890
|
-
spacing?: Partial<Record<NameDevices
|
|
47885
|
+
loop?: Partial<Record<NameDevices, boolean>> | undefined;
|
|
47886
|
+
scrollMode?: Partial<Record<NameDevices, "snap" | "free" | "free-snap">> | undefined;
|
|
47887
|
+
slidesToShow?: Partial<Record<NameDevices, number | "auto">> | undefined;
|
|
47888
|
+
spacing?: Partial<Record<NameDevices, number>> | undefined;
|
|
47891
47889
|
layout?: "slider" | "grid" | undefined;
|
|
47892
|
-
dot?: Partial<Record<NameDevices
|
|
47893
|
-
dotStyle?: Partial<Record<NameDevices
|
|
47894
|
-
arrow?: Partial<Record<NameDevices
|
|
47895
|
-
controlOverContent?: Partial<Record<NameDevices
|
|
47890
|
+
dot?: Partial<Record<NameDevices, boolean>> | undefined;
|
|
47891
|
+
dotStyle?: Partial<Record<NameDevices, "none" | "inside" | "outside">> | undefined;
|
|
47892
|
+
arrow?: Partial<Record<NameDevices, boolean>> | undefined;
|
|
47893
|
+
controlOverContent?: Partial<Record<NameDevices, boolean>> | undefined;
|
|
47896
47894
|
speed?: number | undefined;
|
|
47897
47895
|
} | undefined;
|
|
47898
47896
|
declare const useProductListStyles: () => {
|
|
47899
|
-
horizontalGutter?: Partial<Record<NameDevices
|
|
47900
|
-
verticalGutter?: Partial<Record<NameDevices
|
|
47901
|
-
fullWidth?: Partial<Record<NameDevices
|
|
47902
|
-
spacing?: Partial<Record<NameDevices
|
|
47903
|
-
width?: Partial<Record<NameDevices
|
|
47904
|
-
height?: Partial<Record<NameDevices
|
|
47897
|
+
horizontalGutter?: Partial<Record<NameDevices, string>> | undefined;
|
|
47898
|
+
verticalGutter?: Partial<Record<NameDevices, string>> | undefined;
|
|
47899
|
+
fullWidth?: Partial<Record<NameDevices, boolean>> | undefined;
|
|
47900
|
+
spacing?: Partial<Record<NameDevices, number>> | undefined;
|
|
47901
|
+
width?: Partial<Record<NameDevices, string>> | undefined;
|
|
47902
|
+
height?: Partial<Record<NameDevices, string>> | undefined;
|
|
47905
47903
|
} | undefined;
|
|
47906
47904
|
|
|
47907
47905
|
declare const useSuspenseFetch: <T>(key: string | any[], promise: () => Promise<T>) => {
|
|
@@ -47966,6 +47964,6 @@ declare const useInteraction: () => {
|
|
|
47966
47964
|
interactionListenerLoaded: (callback: () => void) => void;
|
|
47967
47965
|
};
|
|
47968
47966
|
|
|
47969
|
-
declare const DEVICES: NameDevices
|
|
47967
|
+
declare const DEVICES: NameDevices[];
|
|
47970
47968
|
|
|
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 };
|
|
47969
|
+
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 };
|